This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

2
node_modules/expo-updates/build/ExpoUpdates.d.ts generated vendored Normal file
View File

@ -0,0 +1,2 @@
declare const _default: import("@unimodules/core").ProxyNativeModule;
export default _default;

3
node_modules/expo-updates/build/ExpoUpdates.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
import { NativeModulesProxy } from '@unimodules/core';
export default NativeModulesProxy.ExpoUpdates || {};
//# sourceMappingURL=ExpoUpdates.js.map

1
node_modules/expo-updates/build/ExpoUpdates.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"ExpoUpdates.js","sourceRoot":"","sources":["../src/ExpoUpdates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,eAAe,kBAAkB,CAAC,WAAW,IAAK,EAAU,CAAC","sourcesContent":["import { NativeModulesProxy } from '@unimodules/core';\nexport default NativeModulesProxy.ExpoUpdates || ({} as any);\n"]}

5
node_modules/expo-updates/build/ExpoUpdates.web.d.ts generated vendored Normal file
View File

@ -0,0 +1,5 @@
declare const _default: {
readonly name: string;
reload(): Promise<void>;
};
export default _default;

12
node_modules/expo-updates/build/ExpoUpdates.web.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
export default {
get name() {
return 'ExpoUpdates';
},
async reload() {
if (!canUseDOM)
return;
window.location.reload(true);
},
};
//# sourceMappingURL=ExpoUpdates.web.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ExpoUpdates.web.js","sourceRoot":"","sources":["../src/ExpoUpdates.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,eAAe;IACb,IAAI,IAAI;QACN,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC","sourcesContent":["import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nexport default {\n get name(): string {\n return 'ExpoUpdates';\n },\n async reload(): Promise<void> {\n if (!canUseDOM) return;\n window.location.reload(true);\n },\n};\n"]}

14
node_modules/expo-updates/build/Updates.d.ts generated vendored Normal file
View File

@ -0,0 +1,14 @@
import { EventSubscription } from 'fbemitter';
import { Listener, LocalAssets, Manifest, UpdateCheckResult, UpdateEvent, UpdateFetchResult } from './Updates.types';
export * from './Updates.types';
export declare const updateId: string | null;
export declare const releaseChannel: string;
export declare const localAssets: LocalAssets;
export declare const isEmergencyLaunch: boolean;
export declare const isUsingEmbeddedAssets: boolean;
export declare const manifest: Manifest | object;
export declare function reloadAsync(): Promise<void>;
export declare function checkForUpdateAsync(): Promise<UpdateCheckResult>;
export declare function fetchUpdateAsync(): Promise<UpdateFetchResult>;
export declare function clearUpdateCacheExperimentalAsync(_sdkVersion?: string): void;
export declare function addListener(listener: Listener<UpdateEvent>): EventSubscription;

90
node_modules/expo-updates/build/Updates.js generated vendored Normal file
View File

@ -0,0 +1,90 @@
import { RCTDeviceEventEmitter, CodedError, NativeModulesProxy, UnavailabilityError, } from '@unimodules/core';
import { EventEmitter } from 'fbemitter';
import ExpoUpdates from './ExpoUpdates';
export * from './Updates.types';
export const updateId = ExpoUpdates.updateId && typeof ExpoUpdates.updateId === 'string'
? ExpoUpdates.updateId.toLowerCase()
: null;
export const releaseChannel = ExpoUpdates.releaseChannel ?? 'default';
export const localAssets = ExpoUpdates.localAssets ?? {};
export const isEmergencyLaunch = ExpoUpdates.isEmergencyLaunch || false;
export const isUsingEmbeddedAssets = ExpoUpdates.isUsingEmbeddedAssets || false;
let _manifest = ExpoUpdates.manifest;
if (ExpoUpdates.manifestString) {
_manifest = JSON.parse(ExpoUpdates.manifestString);
}
export const manifest = _manifest ?? {};
const isUsingDeveloperTool = !!manifest.developer?.tool;
const isUsingExpoDevelopmentClient = NativeModulesProxy.ExponentConstants?.appOwnership === 'expo';
const manualUpdatesInstructions = isUsingExpoDevelopmentClient
? 'To test manual updates, publish your project using `expo publish` and open the published ' +
'version in this development client.'
: 'To test manual updates, make a release build with `npm run ios --configuration Release` or ' +
'`npm run android --variant Release`.';
export async function reloadAsync() {
if (!ExpoUpdates.reload) {
throw new UnavailabilityError('Updates', 'reloadAsync');
}
if (__DEV__ && !isUsingExpoDevelopmentClient) {
throw new CodedError('ERR_UPDATES_DISABLED', `You cannot use the Updates module in development mode in a production app. ${manualUpdatesInstructions}`);
}
await ExpoUpdates.reload();
}
export async function checkForUpdateAsync() {
if (!ExpoUpdates.checkForUpdateAsync) {
throw new UnavailabilityError('Updates', 'checkForUpdateAsync');
}
if (__DEV__ || isUsingDeveloperTool) {
throw new CodedError('ERR_UPDATES_DISABLED', `You cannot check for updates in development mode. ${manualUpdatesInstructions}`);
}
const result = await ExpoUpdates.checkForUpdateAsync();
if (result.manifestString) {
result.manifest = JSON.parse(result.manifestString);
delete result.manifestString;
}
return result;
}
export async function fetchUpdateAsync() {
if (!ExpoUpdates.fetchUpdateAsync) {
throw new UnavailabilityError('Updates', 'fetchUpdateAsync');
}
if (__DEV__ || isUsingDeveloperTool) {
throw new CodedError('ERR_UPDATES_DISABLED', `You cannot fetch updates in development mode. ${manualUpdatesInstructions}`);
}
const result = await ExpoUpdates.fetchUpdateAsync();
if (result.manifestString) {
result.manifest = JSON.parse(result.manifestString);
delete result.manifestString;
}
return result;
}
export function clearUpdateCacheExperimentalAsync(_sdkVersion) {
console.warn("This method is no longer necessary. `expo-updates` now automatically deletes your app's old bundle files!");
}
let _emitter;
function _getEmitter() {
if (!_emitter) {
_emitter = new EventEmitter();
RCTDeviceEventEmitter.addListener('Expo.nativeUpdatesEvent', _emitEvent);
}
return _emitter;
}
function _emitEvent(params) {
let newParams = params;
if (typeof params === 'string') {
newParams = JSON.parse(params);
}
if (newParams.manifestString) {
newParams.manifest = JSON.parse(newParams.manifestString);
delete newParams.manifestString;
}
if (!_emitter) {
throw new Error(`EventEmitter must be initialized to use from its listener`);
}
_emitter.emit('Expo.updatesEvent', newParams);
}
export function addListener(listener) {
const emitter = _getEmitter();
return emitter.addListener('Expo.updatesEvent', listener);
}
//# sourceMappingURL=Updates.js.map

1
node_modules/expo-updates/build/Updates.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

32
node_modules/expo-updates/build/Updates.types.d.ts generated vendored Normal file
View File

@ -0,0 +1,32 @@
import Constants from 'expo-constants';
export declare enum UpdateEventType {
UPDATE_AVAILABLE = "updateAvailable",
NO_UPDATE_AVAILABLE = "noUpdateAvailable",
ERROR = "error"
}
export declare type Manifest = typeof Constants.manifest;
export declare type UpdateCheckResult = {
isAvailable: false;
} | {
isAvailable: true;
manifest: Manifest;
};
export declare type UpdateFetchResult = {
isNew: false;
} | {
isNew: true;
manifest: Manifest;
};
export declare type Listener<E> = (event: E) => void;
export declare type UpdateEvent = {
type: UpdateEventType.NO_UPDATE_AVAILABLE;
} | {
type: UpdateEventType.UPDATE_AVAILABLE;
manifest: Manifest;
} | {
type: UpdateEventType.ERROR;
message: string;
};
export declare type LocalAssets = {
[remoteUrl: string]: string;
};

7
node_modules/expo-updates/build/Updates.types.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
export var UpdateEventType;
(function (UpdateEventType) {
UpdateEventType["UPDATE_AVAILABLE"] = "updateAvailable";
UpdateEventType["NO_UPDATE_AVAILABLE"] = "noUpdateAvailable";
UpdateEventType["ERROR"] = "error";
})(UpdateEventType || (UpdateEventType = {}));
//# sourceMappingURL=Updates.types.js.map

1
node_modules/expo-updates/build/Updates.types.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Updates.types.js","sourceRoot":"","sources":["../src/Updates.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uDAAoC,CAAA;IACpC,4DAAyC,CAAA;IACzC,kCAAe,CAAA;AACjB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B","sourcesContent":["import Constants from 'expo-constants';\n\nexport enum UpdateEventType {\n UPDATE_AVAILABLE = 'updateAvailable',\n NO_UPDATE_AVAILABLE = 'noUpdateAvailable',\n ERROR = 'error',\n}\n\n// TODO(eric): move source of truth for manifest type to this module\nexport type Manifest = typeof Constants.manifest;\n\nexport type UpdateCheckResult = { isAvailable: false } | { isAvailable: true; manifest: Manifest };\n\nexport type UpdateFetchResult = { isNew: false } | { isNew: true; manifest: Manifest };\n\nexport type Listener<E> = (event: E) => void;\n\nexport type UpdateEvent =\n | { type: UpdateEventType.NO_UPDATE_AVAILABLE }\n | { type: UpdateEventType.UPDATE_AVAILABLE; manifest: Manifest }\n | { type: UpdateEventType.ERROR; message: string };\n\nexport type LocalAssets = { [remoteUrl: string]: string };\n"]}

1
node_modules/expo-updates/build/index.d.ts generated vendored Normal file
View File

@ -0,0 +1 @@
export * from './Updates';

2
node_modules/expo-updates/build/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
export * from './Updates';
//# sourceMappingURL=index.js.map

1
node_modules/expo-updates/build/index.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from './Updates';\n"]}