@expo/metro-runtime 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +3 -0
- package/assets/alert-triangle.png +0 -0
- package/assets/chevron-left.png +0 -0
- package/assets/chevron-right.png +0 -0
- package/assets/close.png +0 -0
- package/assets/loader.png +0 -0
- package/asyncRequire.js +1 -0
- package/build/HMRClient.d.ts +17 -0
- package/build/HMRClient.d.ts.map +1 -0
- package/build/HMRClient.js +250 -0
- package/build/HMRClient.js.map +1 -0
- package/build/HMRClient.native.d.ts +1 -0
- package/build/HMRClient.native.d.ts.map +1 -0
- package/build/HMRClient.native.js +2 -0
- package/build/HMRClient.native.js.map +1 -0
- package/build/LoadingView.d.ts +8 -0
- package/build/LoadingView.d.ts.map +1 -0
- package/build/LoadingView.js +21 -0
- package/build/LoadingView.js.map +1 -0
- package/build/LoadingView.native.d.ts +1 -0
- package/build/LoadingView.native.d.ts.map +1 -0
- package/build/LoadingView.native.js +2 -0
- package/build/LoadingView.native.js.map +1 -0
- package/build/asyncRequire/buildAsyncRequire.d.ts +24 -0
- package/build/asyncRequire/buildAsyncRequire.d.ts.map +1 -0
- package/build/asyncRequire/buildAsyncRequire.js +50 -0
- package/build/asyncRequire/buildAsyncRequire.js.map +1 -0
- package/build/asyncRequire/buildUrlForBundle.d.ts +8 -0
- package/build/asyncRequire/buildUrlForBundle.d.ts.map +1 -0
- package/build/asyncRequire/buildUrlForBundle.js +25 -0
- package/build/asyncRequire/buildUrlForBundle.js.map +1 -0
- package/build/asyncRequire/buildUrlForBundle.native.d.ts +2 -0
- package/build/asyncRequire/buildUrlForBundle.native.d.ts.map +1 -0
- package/build/asyncRequire/buildUrlForBundle.native.js +25 -0
- package/build/asyncRequire/buildUrlForBundle.native.js.map +1 -0
- package/build/asyncRequire/fetchAsync.d.ts +5 -0
- package/build/asyncRequire/fetchAsync.d.ts.map +1 -0
- package/build/asyncRequire/fetchAsync.js +19 -0
- package/build/asyncRequire/fetchAsync.js.map +1 -0
- package/build/asyncRequire/fetchAsync.native.d.ts +12 -0
- package/build/asyncRequire/fetchAsync.native.d.ts.map +1 -0
- package/build/asyncRequire/fetchAsync.native.js +57 -0
- package/build/asyncRequire/fetchAsync.native.js.map +1 -0
- package/build/asyncRequire/fetchThenEval.d.ts +7 -0
- package/build/asyncRequire/fetchThenEval.d.ts.map +1 -0
- package/build/asyncRequire/fetchThenEval.js +30 -0
- package/build/asyncRequire/fetchThenEval.js.map +1 -0
- package/build/asyncRequire/fetchThenEval.web.d.ts +6 -0
- package/build/asyncRequire/fetchThenEval.web.d.ts.map +1 -0
- package/build/asyncRequire/fetchThenEval.web.js +29 -0
- package/build/asyncRequire/fetchThenEval.web.js.map +1 -0
- package/build/asyncRequire/index.d.ts +2 -0
- package/build/asyncRequire/index.d.ts.map +1 -0
- package/build/asyncRequire/index.js +5 -0
- package/build/asyncRequire/index.js.map +1 -0
- package/build/asyncRequire/loadBundle.android.d.ts +2 -0
- package/build/asyncRequire/loadBundle.android.d.ts.map +1 -0
- package/build/asyncRequire/loadBundle.android.js +22 -0
- package/build/asyncRequire/loadBundle.android.js.map +1 -0
- package/build/asyncRequire/loadBundle.d.ts +2 -0
- package/build/asyncRequire/loadBundle.d.ts.map +1 -0
- package/build/asyncRequire/loadBundle.js +6 -0
- package/build/asyncRequire/loadBundle.js.map +1 -0
- package/build/asyncRequire/loadBundlePolyfill.d.ts +7 -0
- package/build/asyncRequire/loadBundlePolyfill.d.ts.map +1 -0
- package/build/asyncRequire/loadBundlePolyfill.js +40 -0
- package/build/asyncRequire/loadBundlePolyfill.js.map +1 -0
- package/build/effects.d.ts +2 -0
- package/build/effects.d.ts.map +1 -0
- package/build/effects.js +16 -0
- package/build/effects.js.map +1 -0
- package/build/effects.native.d.ts +1 -0
- package/build/effects.native.d.ts.map +1 -0
- package/build/effects.native.js +1 -0
- package/build/effects.native.js.map +1 -0
- package/build/error-overlay/Data/LogBoxData.d.ts +60 -0
- package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -0
- package/build/error-overlay/Data/LogBoxData.js +386 -0
- package/build/error-overlay/Data/LogBoxData.js.map +1 -0
- package/build/error-overlay/Data/LogBoxLog.d.ts +61 -0
- package/build/error-overlay/Data/LogBoxLog.d.ts.map +1 -0
- package/build/error-overlay/Data/LogBoxLog.js +148 -0
- package/build/error-overlay/Data/LogBoxLog.js.map +1 -0
- package/build/error-overlay/Data/LogBoxSymbolication.d.ts +17 -0
- package/build/error-overlay/Data/LogBoxSymbolication.d.ts.map +1 -0
- package/build/error-overlay/Data/LogBoxSymbolication.js +56 -0
- package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -0
- package/build/error-overlay/Data/LogContext.d.ts +14 -0
- package/build/error-overlay/Data/LogContext.d.ts.map +1 -0
- package/build/error-overlay/Data/LogContext.js +27 -0
- package/build/error-overlay/Data/LogContext.js.map +1 -0
- package/build/error-overlay/Data/parseLogBoxLog.d.ts +45 -0
- package/build/error-overlay/Data/parseLogBoxLog.d.ts.map +1 -0
- package/build/error-overlay/Data/parseLogBoxLog.js +286 -0
- package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -0
- package/build/error-overlay/ErrorOverlay.d.ts +18 -0
- package/build/error-overlay/ErrorOverlay.d.ts.map +1 -0
- package/build/error-overlay/ErrorOverlay.js +146 -0
- package/build/error-overlay/ErrorOverlay.js.map +1 -0
- package/build/error-overlay/LogBox.d.ts +16 -0
- package/build/error-overlay/LogBox.d.ts.map +1 -0
- package/build/error-overlay/LogBox.js +31 -0
- package/build/error-overlay/LogBox.js.map +1 -0
- package/build/error-overlay/LogBox.web.d.ts +23 -0
- package/build/error-overlay/LogBox.web.d.ts.map +1 -0
- package/build/error-overlay/LogBox.web.js +129 -0
- package/build/error-overlay/LogBox.web.js.map +1 -0
- package/build/error-overlay/UI/AnsiHighlight.d.ts +6 -0
- package/build/error-overlay/UI/AnsiHighlight.d.ts.map +1 -0
- package/build/error-overlay/UI/AnsiHighlight.js +86 -0
- package/build/error-overlay/UI/AnsiHighlight.js.map +1 -0
- package/build/error-overlay/UI/LogBoxButton.d.ts +14 -0
- package/build/error-overlay/UI/LogBoxButton.d.ts.map +1 -0
- package/build/error-overlay/UI/LogBoxButton.js +59 -0
- package/build/error-overlay/UI/LogBoxButton.js.map +1 -0
- package/build/error-overlay/UI/LogBoxMessage.d.ts +11 -0
- package/build/error-overlay/UI/LogBoxMessage.d.ts.map +1 -0
- package/build/error-overlay/UI/LogBoxMessage.js +53 -0
- package/build/error-overlay/UI/LogBoxMessage.js.map +1 -0
- package/build/error-overlay/UI/LogBoxStyle.d.ts +22 -0
- package/build/error-overlay/UI/LogBoxStyle.d.ts.map +1 -0
- package/build/error-overlay/UI/LogBoxStyle.js +68 -0
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -0
- package/build/error-overlay/UI/constants.d.ts +2 -0
- package/build/error-overlay/UI/constants.d.ts.map +1 -0
- package/build/error-overlay/UI/constants.js +10 -0
- package/build/error-overlay/UI/constants.js.map +1 -0
- package/build/error-overlay/formatProjectFilePath.d.ts +2 -0
- package/build/error-overlay/formatProjectFilePath.d.ts.map +1 -0
- package/build/error-overlay/formatProjectFilePath.js +27 -0
- package/build/error-overlay/formatProjectFilePath.js.map +1 -0
- package/build/error-overlay/index.d.ts +3 -0
- package/build/error-overlay/index.d.ts.map +1 -0
- package/build/error-overlay/index.js +30 -0
- package/build/error-overlay/index.js.map +1 -0
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts +38 -0
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts.map +1 -0
- package/build/error-overlay/modules/ExceptionsManager/index.js +80 -0
- package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -0
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts +2 -0
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts.map +1 -0
- package/build/error-overlay/modules/ExceptionsManager/index.native.js +3 -0
- package/build/error-overlay/modules/ExceptionsManager/index.native.js.map +1 -0
- package/build/error-overlay/modules/NativeLogBox/index.d.ts +6 -0
- package/build/error-overlay/modules/NativeLogBox/index.d.ts.map +1 -0
- package/build/error-overlay/modules/NativeLogBox/index.js +34 -0
- package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -0
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts +3 -0
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts.map +1 -0
- package/build/error-overlay/modules/NativeLogBox/index.native.js +8 -0
- package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -0
- package/build/error-overlay/modules/openFileInEditor/index.d.ts +3 -0
- package/build/error-overlay/modules/openFileInEditor/index.d.ts.map +1 -0
- package/build/error-overlay/modules/openFileInEditor/index.js +15 -0
- package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -0
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts +3 -0
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts.map +1 -0
- package/build/error-overlay/modules/openFileInEditor/index.native.js +8 -0
- package/build/error-overlay/modules/openFileInEditor/index.native.js.map +1 -0
- package/build/error-overlay/modules/parseErrorStack/index.d.ts +6 -0
- package/build/error-overlay/modules/parseErrorStack/index.d.ts.map +1 -0
- package/build/error-overlay/modules/parseErrorStack/index.js +25 -0
- package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -0
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.d.ts +3 -0
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.d.ts.map +1 -0
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js +9 -0
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js.map +1 -0
- package/build/error-overlay/modules/stringifySafe/index.d.ts +20 -0
- package/build/error-overlay/modules/stringifySafe/index.d.ts.map +1 -0
- package/build/error-overlay/modules/stringifySafe/index.js +117 -0
- package/build/error-overlay/modules/stringifySafe/index.js.map +1 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts +24 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts.map +1 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.js +19 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.js.map +1 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.d.ts +3 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.d.ts.map +1 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js +8 -0
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts +5 -0
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +113 -0
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorFooter.d.ts +7 -0
- package/build/error-overlay/overlay/LogBoxInspectorFooter.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js +111 -0
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts +8 -0
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js +139 -0
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts +12 -0
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +116 -0
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorSection.d.ts +8 -0
- package/build/error-overlay/overlay/LogBoxInspectorSection.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorSection.js +70 -0
- package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts +8 -0
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +127 -0
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts +11 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +103 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts +10 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts.map +1 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +177 -0
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -0
- package/build/error-overlay/toast/ErrorToast.d.ts +11 -0
- package/build/error-overlay/toast/ErrorToast.d.ts.map +1 -0
- package/build/error-overlay/toast/ErrorToast.js +147 -0
- package/build/error-overlay/toast/ErrorToast.js.map +1 -0
- package/build/error-overlay/toast/ErrorToastContainer.d.ts +4 -0
- package/build/error-overlay/toast/ErrorToastContainer.d.ts.map +1 -0
- package/build/error-overlay/toast/ErrorToastContainer.js +7 -0
- package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -0
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts +12 -0
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts.map +1 -0
- package/build/error-overlay/toast/ErrorToastContainer.web.js +83 -0
- package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -0
- package/build/error-overlay/toast/ErrorToastMessage.d.ts +5 -0
- package/build/error-overlay/toast/ErrorToastMessage.d.ts.map +1 -0
- package/build/error-overlay/toast/ErrorToastMessage.js +50 -0
- package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -0
- package/build/error-overlay/useRejectionHandler.d.ts +3 -0
- package/build/error-overlay/useRejectionHandler.d.ts.map +1 -0
- package/build/error-overlay/useRejectionHandler.js +60 -0
- package/build/error-overlay/useRejectionHandler.js.map +1 -0
- package/build/getDevServer.d.ts +8 -0
- package/build/getDevServer.d.ts.map +1 -0
- package/build/getDevServer.js +37 -0
- package/build/getDevServer.js.map +1 -0
- package/build/getDevServer.native.d.ts +1 -0
- package/build/getDevServer.native.d.ts.map +1 -0
- package/build/getDevServer.native.js +2 -0
- package/build/getDevServer.native.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +4 -0
- package/build/index.js.map +1 -0
- package/build/messageSocket.d.ts +3 -0
- package/build/messageSocket.d.ts.map +1 -0
- package/build/messageSocket.js +24 -0
- package/build/messageSocket.js.map +1 -0
- package/build/setupFastRefresh.d.ts +10 -0
- package/build/setupFastRefresh.d.ts.map +1 -0
- package/build/setupFastRefresh.js +23 -0
- package/build/setupFastRefresh.js.map +1 -0
- package/build/setupHMR.d.ts +2 -0
- package/build/setupHMR.d.ts.map +1 -0
- package/build/setupHMR.js +14 -0
- package/build/setupHMR.js.map +1 -0
- package/error-overlay.d.ts +1 -0
- package/error-overlay.js +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Evan Bacon.
|
|
3
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export declare function fetchAsync(url: string): Promise<{
|
|
9
|
+
body: string;
|
|
10
|
+
headers: Record<string, string>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=fetchAsync.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAsync.native.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/fetchAsync.native.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CA2D5D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Evan Bacon.
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.fetchAsync = void 0;
|
|
14
|
+
const react_native_1 = require("react-native");
|
|
15
|
+
// @ts-expect-error
|
|
16
|
+
const RCTNetworking_1 = __importDefault(require("react-native/Libraries/Network/RCTNetworking"));
|
|
17
|
+
function fetchAsync(url) {
|
|
18
|
+
let id = null;
|
|
19
|
+
let responseText = null;
|
|
20
|
+
let headers = {};
|
|
21
|
+
let dataListener = null;
|
|
22
|
+
let completeListener = null;
|
|
23
|
+
let responseListener = null;
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
dataListener = RCTNetworking_1.default.addListener("didReceiveNetworkData", ([requestId, response]) => {
|
|
26
|
+
if (requestId === id) {
|
|
27
|
+
responseText = response;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
responseListener = RCTNetworking_1.default.addListener("didReceiveNetworkResponse", ([requestId, status, responseHeaders]) => {
|
|
31
|
+
if (requestId === id) {
|
|
32
|
+
headers = responseHeaders;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
completeListener = RCTNetworking_1.default.addListener("didCompleteNetworkResponse", ([requestId, error]) => {
|
|
36
|
+
if (requestId === id) {
|
|
37
|
+
if (error) {
|
|
38
|
+
reject(error);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
resolve({ body: responseText, headers });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
RCTNetworking_1.default.sendRequest("GET", "asyncRequest", url, {
|
|
46
|
+
"expo-platform": react_native_1.Platform.OS,
|
|
47
|
+
}, "", "text", false, 0, (requestId) => {
|
|
48
|
+
id = requestId;
|
|
49
|
+
}, true);
|
|
50
|
+
}).finally(() => {
|
|
51
|
+
dataListener === null || dataListener === void 0 ? void 0 : dataListener.remove();
|
|
52
|
+
completeListener === null || completeListener === void 0 ? void 0 : completeListener.remove();
|
|
53
|
+
responseListener === null || responseListener === void 0 ? void 0 : responseListener.remove();
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.fetchAsync = fetchAsync;
|
|
57
|
+
//# sourceMappingURL=fetchAsync.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAsync.native.js","sourceRoot":"","sources":["../../src/asyncRequire/fetchAsync.native.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;AAEH,+CAAwC;AACxC,mBAAmB;AACnB,iGAAsE;AAEtE,SAAgB,UAAU,CACxB,GAAW;IAEX,IAAI,EAAE,GAAkB,IAAI,CAAC;IAC7B,IAAI,YAAY,GAAkB,IAAI,CAAC;IACvC,IAAI,OAAO,GAA2B,EAAE,CAAC;IACzC,IAAI,YAAY,GAAkC,IAAI,CAAC;IACvD,IAAI,gBAAgB,GAAkC,IAAI,CAAC;IAC3D,IAAI,gBAAgB,GAAkC,IAAI,CAAC;IAC3D,OAAO,IAAI,OAAO,CAChB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAClB,YAAY,GAAG,uBAAU,CAA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CAAC;AACL,CAAC;AA7DD,gCA6DC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Platform } from \"react-native\";\n// @ts-expect-error\nimport Networking from \"react-native/Libraries/Network/RCTNetworking\";\n\nexport function fetchAsync(\n url: string\n): Promise<{ body: string; headers: Record<string, string> }> {\n let id: string | null = null;\n let responseText: string | null = null;\n let headers: Record<string, string> = {};\n let dataListener: { remove: () => void } | null = null;\n let completeListener: { remove: () => void } | null = null;\n let responseListener: { remove: () => void } | null = null;\n return new Promise<{ body: string; headers: Record<string, string> }>(\n (resolve, reject) => {\n dataListener = Networking.addListener(\n \"didReceiveNetworkData\",\n ([requestId, response]) => {\n if (requestId === id) {\n responseText = response;\n }\n }\n );\n responseListener = Networking.addListener(\n \"didReceiveNetworkResponse\",\n ([requestId, status, responseHeaders]) => {\n if (requestId === id) {\n headers = responseHeaders;\n }\n }\n );\n completeListener = Networking.addListener(\n \"didCompleteNetworkResponse\",\n ([requestId, error]) => {\n if (requestId === id) {\n if (error) {\n reject(error);\n } else {\n resolve({ body: responseText!, headers });\n }\n }\n }\n );\n Networking.sendRequest(\n \"GET\",\n \"asyncRequest\",\n url,\n {\n \"expo-platform\": Platform.OS,\n },\n \"\",\n \"text\",\n false,\n 0,\n (requestId) => {\n id = requestId;\n },\n true\n );\n }\n ).finally(() => {\n dataListener?.remove();\n completeListener?.remove();\n responseListener?.remove();\n });\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a bundle for a URL using fetch + eval on native and script tag injection on web.
|
|
3
|
+
*
|
|
4
|
+
* @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchThenEvalAsync(url: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=fetchThenEval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchThenEval.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/fetchThenEval.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchThenEvalAsync = void 0;
|
|
4
|
+
const fetchAsync_1 = require("./fetchAsync");
|
|
5
|
+
/**
|
|
6
|
+
* Load a bundle for a URL using fetch + eval on native and script tag injection on web.
|
|
7
|
+
*
|
|
8
|
+
* @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.
|
|
9
|
+
*/
|
|
10
|
+
function fetchThenEvalAsync(url) {
|
|
11
|
+
return (0, fetchAsync_1.fetchAsync)(url).then(({ body, headers }) => {
|
|
12
|
+
if (headers["Content-Type"] != null &&
|
|
13
|
+
headers["Content-Type"].indexOf("application/json") >= 0) {
|
|
14
|
+
// Errors are returned as JSON.
|
|
15
|
+
throw new Error(JSON.parse(body).message || `Unknown error fetching '${url}'`);
|
|
16
|
+
}
|
|
17
|
+
// NOTE(EvanBacon): All of this code is ignored in development mode at the root.
|
|
18
|
+
// Some engines do not support `sourceURL` as a comment. We expose a
|
|
19
|
+
// `globalEvalWithSourceUrl` function to handle updates in that case.
|
|
20
|
+
if (global.globalEvalWithSourceUrl) {
|
|
21
|
+
global.globalEvalWithSourceUrl(body, url);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// eslint-disable-next-line no-eval
|
|
25
|
+
eval(body);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.fetchThenEvalAsync = fetchThenEvalAsync;
|
|
30
|
+
//# sourceMappingURL=fetchThenEval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchThenEval.js","sourceRoot":"","sources":["../../src/asyncRequire/fetchThenEval.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAM1C;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,OAAO,IAAA,uBAAU,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,IACE,OAAO,CAAC,cAAc,CAAC,IAAI,IAAI;YAC/B,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,EACxD;YACA,+BAA+B;YAC/B,MAAM,IAAI,KAAK,CACb,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,2BAA2B,GAAG,GAAG,CAC9D,CAAC;SACH;QAED,gFAAgF;QAEhF,oEAAoE;QACpE,qEAAqE;QACrE,IAAI,MAAM,CAAC,uBAAuB,EAAE;YAClC,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC3C;aAAM;YACL,mCAAmC;YACnC,IAAI,CAAC,IAAI,CAAC,CAAC;SACZ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAvBD,gDAuBC","sourcesContent":["import { fetchAsync } from \"./fetchAsync\";\n\ndeclare let global: {\n globalEvalWithSourceUrl?: any;\n};\n\n/**\n * Load a bundle for a URL using fetch + eval on native and script tag injection on web.\n *\n * @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.\n */\nexport function fetchThenEvalAsync(url: string): Promise<void> {\n return fetchAsync(url).then(({ body, headers }) => {\n if (\n headers[\"Content-Type\"] != null &&\n headers[\"Content-Type\"].indexOf(\"application/json\") >= 0\n ) {\n // Errors are returned as JSON.\n throw new Error(\n JSON.parse(body).message || `Unknown error fetching '${url}'`\n );\n }\n\n // NOTE(EvanBacon): All of this code is ignored in development mode at the root.\n\n // Some engines do not support `sourceURL` as a comment. We expose a\n // `globalEvalWithSourceUrl` function to handle updates in that case.\n if (global.globalEvalWithSourceUrl) {\n global.globalEvalWithSourceUrl(body, url);\n } else {\n // eslint-disable-next-line no-eval\n eval(body);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchThenEval.web.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/fetchThenEval.web.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,EACE,UAAU,EACV,KAAK,EACL,WAAW,GACZ,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GACpE,OAAO,CAAC,IAAI,CAAC,CAuBf"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchThenEvalAsync = void 0;
|
|
4
|
+
// Basically `__webpack_require__.l`.
|
|
5
|
+
function fetchThenEvalAsync(url, { scriptType, nonce, crossOrigin, } = {}) {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
const script = document.createElement("script");
|
|
8
|
+
if (scriptType)
|
|
9
|
+
script.type = scriptType;
|
|
10
|
+
if (nonce)
|
|
11
|
+
script.setAttribute("nonce", nonce);
|
|
12
|
+
// script.setAttribute('data-expo-metro', ...);
|
|
13
|
+
script.src = url;
|
|
14
|
+
if (crossOrigin && script.src.indexOf(window.location.origin + "/") !== 0) {
|
|
15
|
+
script.crossOrigin = crossOrigin;
|
|
16
|
+
}
|
|
17
|
+
script.onload = () => {
|
|
18
|
+
script.parentNode && script.parentNode.removeChild(script);
|
|
19
|
+
resolve();
|
|
20
|
+
};
|
|
21
|
+
script.onerror = (error) => {
|
|
22
|
+
script.parentNode && script.parentNode.removeChild(script);
|
|
23
|
+
reject(error);
|
|
24
|
+
};
|
|
25
|
+
document.head.appendChild(script);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.fetchThenEvalAsync = fetchThenEvalAsync;
|
|
29
|
+
//# sourceMappingURL=fetchThenEval.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchThenEval.web.js","sourceRoot":"","sources":["../../src/asyncRequire/fetchThenEval.web.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,SAAgB,kBAAkB,CAChC,GAAW,EACX,EACE,UAAU,EACV,KAAK,EACL,WAAW,MACsD,EAAE;IAErE,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,IAAI,UAAU;YAAE,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;QACzC,IAAI,KAAK;YAAE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/C,+CAA+C;QAC/C,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QAEjB,IAAI,WAAW,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE;YACzE,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;SAClC;QAED,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE;YACnB,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAC3D,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAC3D,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC;AA9BD,gDA8BC","sourcesContent":["// Basically `__webpack_require__.l`.\nexport function fetchThenEvalAsync(\n url: string,\n {\n scriptType,\n nonce,\n crossOrigin,\n }: { scriptType?: string; nonce?: string; crossOrigin?: string } = {}\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const script = document.createElement(\"script\");\n if (scriptType) script.type = scriptType;\n if (nonce) script.setAttribute(\"nonce\", nonce);\n // script.setAttribute('data-expo-metro', ...);\n script.src = url;\n\n if (crossOrigin && script.src.indexOf(window.location.origin + \"/\") !== 0) {\n script.crossOrigin = crossOrigin;\n }\n\n script.onload = () => {\n script.parentNode && script.parentNode.removeChild(script);\n resolve();\n };\n\n script.onerror = (error) => {\n script.parentNode && script.parentNode.removeChild(script);\n reject(error);\n };\n document.head.appendChild(script);\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asyncRequire/index.ts"],"names":[],"mappings":";;AAAA,2DAAwD;AAExD,MAAM,CAAC,OAAO,GAAG,IAAA,qCAAiB,EAAC,OAAc,CAAC,CAAC","sourcesContent":["import { buildAsyncRequire } from \"./buildAsyncRequire\";\n\nmodule.exports = buildAsyncRequire(require as any);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundle.android.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/loadBundle.android.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAYhE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loadBundleAsync = void 0;
|
|
7
|
+
const NativeDevSplitBundleLoader_1 = __importDefault(require("react-native/Libraries/Utilities/NativeDevSplitBundleLoader"));
|
|
8
|
+
const loadBundlePolyfill_1 = require("./loadBundlePolyfill");
|
|
9
|
+
function loadBundleAsync(bundlePath) {
|
|
10
|
+
if (
|
|
11
|
+
// NOTE(EvanBacon): This is broken on iOS afaict
|
|
12
|
+
NativeDevSplitBundleLoader_1.default === null || NativeDevSplitBundleLoader_1.default === void 0 ? void 0 : NativeDevSplitBundleLoader_1.default.loadBundle) {
|
|
13
|
+
return NativeDevSplitBundleLoader_1.default.loadBundle(bundlePath).catch((e) => {
|
|
14
|
+
// On Android 'e' is not an instance of Error, which seems to be a bug.
|
|
15
|
+
// As a workaround, re-throw an Error to not break the error handling code.
|
|
16
|
+
throw new Error(e.message);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return (0, loadBundlePolyfill_1.loadBundleAsync)(bundlePath);
|
|
20
|
+
}
|
|
21
|
+
exports.loadBundleAsync = loadBundleAsync;
|
|
22
|
+
//# sourceMappingURL=loadBundle.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundle.android.js","sourceRoot":"","sources":["../../src/asyncRequire/loadBundle.android.ts"],"names":[],"mappings":";;;;;;AAAA,6HAAqG;AAErG,6DAAkF;AAElF,SAAgB,eAAe,CAAC,UAAkB;IAChD;IACE,gDAAgD;IAChD,oCAA0B,aAA1B,oCAA0B,uBAA1B,oCAA0B,CAAE,UAAU,EACtC;QACA,OAAO,oCAA0B,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;YACnE,uEAAuE;YACvE,2EAA2E;YAC3E,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAA,oCAAuB,EAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAZD,0CAYC","sourcesContent":["import NativeDevSplitBundleLoader from \"react-native/Libraries/Utilities/NativeDevSplitBundleLoader\";\n\nimport { loadBundleAsync as loadBundlePolyfillAsync } from \"./loadBundlePolyfill\";\n\nexport function loadBundleAsync(bundlePath: string): Promise<any> {\n if (\n // NOTE(EvanBacon): This is broken on iOS afaict\n NativeDevSplitBundleLoader?.loadBundle\n ) {\n return NativeDevSplitBundleLoader.loadBundle(bundlePath).catch((e) => {\n // On Android 'e' is not an instance of Error, which seems to be a bug.\n // As a workaround, re-throw an Error to not break the error handling code.\n throw new Error(e.message);\n });\n }\n return loadBundlePolyfillAsync(bundlePath);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundle.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/loadBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadBundleAsync = void 0;
|
|
4
|
+
var loadBundlePolyfill_1 = require("./loadBundlePolyfill");
|
|
5
|
+
Object.defineProperty(exports, "loadBundleAsync", { enumerable: true, get: function () { return loadBundlePolyfill_1.loadBundleAsync; } });
|
|
6
|
+
//# sourceMappingURL=loadBundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundle.js","sourceRoot":"","sources":["../../src/asyncRequire/loadBundle.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAA9C,qHAAA,eAAe,OAAA","sourcesContent":["export { loadBundleAsync } from \"./loadBundlePolyfill\";\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a bundle for a URL using fetch + eval on native and script tag injection on web.
|
|
3
|
+
*
|
|
4
|
+
* @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadBundleAsync(bundlePath: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=loadBundlePolyfill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundlePolyfill.d.ts","sourceRoot":"","sources":["../../src/asyncRequire/loadBundlePolyfill.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBjE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loadBundleAsync = void 0;
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const HMRClient_1 = __importDefault(require("../HMRClient"));
|
|
9
|
+
const LoadingView_1 = __importDefault(require("../LoadingView"));
|
|
10
|
+
const buildUrlForBundle_1 = require("./buildUrlForBundle");
|
|
11
|
+
const fetchThenEval_1 = require("./fetchThenEval");
|
|
12
|
+
let pendingRequests = 0;
|
|
13
|
+
/**
|
|
14
|
+
* Load a bundle for a URL using fetch + eval on native and script tag injection on web.
|
|
15
|
+
*
|
|
16
|
+
* @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.
|
|
17
|
+
*/
|
|
18
|
+
function loadBundleAsync(bundlePath) {
|
|
19
|
+
const requestUrl = (0, buildUrlForBundle_1.buildUrlForBundle)(bundlePath, {
|
|
20
|
+
modulesOnly: "true",
|
|
21
|
+
runModule: "false",
|
|
22
|
+
platform: react_native_1.Platform.OS,
|
|
23
|
+
// The JavaScript loader does not support bytecode.
|
|
24
|
+
runtimeBytecodeVersion: null,
|
|
25
|
+
});
|
|
26
|
+
// Send a signal to the `expo` package to show the loading indicator.
|
|
27
|
+
LoadingView_1.default.showMessage("Downloading...", "load");
|
|
28
|
+
pendingRequests++;
|
|
29
|
+
return (0, fetchThenEval_1.fetchThenEvalAsync)(requestUrl)
|
|
30
|
+
.then(() => {
|
|
31
|
+
HMRClient_1.default.registerBundle(requestUrl);
|
|
32
|
+
})
|
|
33
|
+
.finally(() => {
|
|
34
|
+
if (!--pendingRequests) {
|
|
35
|
+
LoadingView_1.default.hide();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.loadBundleAsync = loadBundleAsync;
|
|
40
|
+
//# sourceMappingURL=loadBundlePolyfill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBundlePolyfill.js","sourceRoot":"","sources":["../../src/asyncRequire/loadBundlePolyfill.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAwC;AAExC,6DAAqC;AACrC,iEAAyC;AACzC,2DAAwD;AACxD,mDAAqD;AAErD,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB;;;;GAIG;AACH,SAAgB,eAAe,CAAC,UAAkB;IAChD,MAAM,UAAU,GAAG,IAAA,qCAAiB,EAAC,UAAU,EAAE;QAC/C,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,uBAAQ,CAAC,EAAE;QACrB,mDAAmD;QACnD,sBAAsB,EAAE,IAAI;KAC7B,CAAC,CAAC;IAEH,qEAAqE;IACrE,qBAAW,CAAC,WAAW,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAClD,eAAe,EAAE,CAAC;IAElB,OAAO,IAAA,kCAAkB,EAAC,UAAU,CAAC;SAClC,IAAI,CAAC,GAAG,EAAE;QACT,mBAAS,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC;SACD,OAAO,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,EAAE,eAAe,EAAE;YACtB,qBAAW,CAAC,IAAI,EAAE,CAAC;SACpB;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AAtBD,0CAsBC","sourcesContent":["import { Platform } from \"react-native\";\n\nimport HMRClient from \"../HMRClient\";\nimport LoadingView from \"../LoadingView\";\nimport { buildUrlForBundle } from \"./buildUrlForBundle\";\nimport { fetchThenEvalAsync } from \"./fetchThenEval\";\n\nlet pendingRequests = 0;\n\n/**\n * Load a bundle for a URL using fetch + eval on native and script tag injection on web.\n *\n * @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon`.\n */\nexport function loadBundleAsync(bundlePath: string): Promise<void> {\n const requestUrl = buildUrlForBundle(bundlePath, {\n modulesOnly: \"true\",\n runModule: \"false\",\n platform: Platform.OS,\n // The JavaScript loader does not support bytecode.\n runtimeBytecodeVersion: null,\n });\n\n // Send a signal to the `expo` package to show the loading indicator.\n LoadingView.showMessage(\"Downloading...\", \"load\");\n pendingRequests++;\n\n return fetchThenEvalAsync(requestUrl)\n .then(() => {\n HMRClient.registerBundle(requestUrl);\n })\n .finally(() => {\n if (!--pendingRequests) {\n LoadingView.hide();\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":""}
|
package/build/effects.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const expo_modules_core_1 = require("expo-modules-core");
|
|
4
|
+
if (
|
|
5
|
+
// Only during development.
|
|
6
|
+
global.__DEV__ &&
|
|
7
|
+
// Disable for SSR
|
|
8
|
+
expo_modules_core_1.Platform.isDOMAvailable &&
|
|
9
|
+
// Disable for non-metro runtimes
|
|
10
|
+
// NOTE(EvanBacon): This can probably be removed in favor of `expo/metro-config` injecting this file.
|
|
11
|
+
global.__METRO_GLOBAL_PREFIX__ != null) {
|
|
12
|
+
require("./setupFastRefresh");
|
|
13
|
+
require("./setupHMR");
|
|
14
|
+
require("./messageSocket");
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":";;AAAA,yDAA6C;AAU7C;AACE,2BAA2B;AAC3B,MAAM,CAAC,OAAO;IACd,kBAAkB;IAClB,4BAAQ,CAAC,cAAc;IACvB,iCAAiC;IACjC,qGAAqG;IACrG,MAAM,CAAC,uBAAuB,IAAI,IAAI,EACtC;IACA,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9B,OAAO,CAAC,YAAY,CAAC,CAAC;IACtB,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC5B","sourcesContent":["import { Platform } from \"expo-modules-core\";\n\ndeclare let global: {\n __DEV__?: boolean;\n RN$Bridgeless?: boolean;\n __METRO_GLOBAL_PREFIX__?: string;\n __RCTProfileIsProfiling?: boolean;\n WebSocket: any;\n};\n\nif (\n // Only during development.\n global.__DEV__ &&\n // Disable for SSR\n Platform.isDOMAvailable &&\n // Disable for non-metro runtimes\n // NOTE(EvanBacon): This can probably be removed in favor of `expo/metro-config` injecting this file.\n global.__METRO_GLOBAL_PREFIX__ != null\n) {\n require(\"./setupFastRefresh\");\n require(\"./setupHMR\");\n require(\"./messageSocket\");\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=effects.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.native.d.ts","sourceRoot":"","sources":["../src/effects.native.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=effects.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.native.js","sourceRoot":"","sources":["../src/effects.native.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Evan Bacon.
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { LogBoxLog, StackType } from "./LogBoxLog";
|
|
10
|
+
import type { LogLevel } from "./LogBoxLog";
|
|
11
|
+
import type { Message, Category, ComponentStack, ExtendedExceptionData } from "./parseLogBoxLog";
|
|
12
|
+
export declare type LogBoxLogs = Set<LogBoxLog>;
|
|
13
|
+
export declare type LogData = {
|
|
14
|
+
level: LogLevel;
|
|
15
|
+
message: Message;
|
|
16
|
+
category: Category;
|
|
17
|
+
componentStack: ComponentStack;
|
|
18
|
+
};
|
|
19
|
+
declare type ExtendedError = any;
|
|
20
|
+
export declare type Observer = (options: {
|
|
21
|
+
logs: LogBoxLogs;
|
|
22
|
+
isDisabled: boolean;
|
|
23
|
+
selectedLogIndex: number;
|
|
24
|
+
}) => void;
|
|
25
|
+
export declare type IgnorePattern = string | RegExp;
|
|
26
|
+
export declare type Subscription = {
|
|
27
|
+
unsubscribe: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare type WarningInfo = {
|
|
30
|
+
finalFormat: string;
|
|
31
|
+
forceDialogImmediately: boolean;
|
|
32
|
+
suppressDialog_LEGACY: boolean;
|
|
33
|
+
suppressCompletely: boolean;
|
|
34
|
+
monitorEvent: string | null;
|
|
35
|
+
monitorListVersion: number;
|
|
36
|
+
monitorSampleRate: number;
|
|
37
|
+
};
|
|
38
|
+
export declare type WarningFilter = (format: string) => WarningInfo;
|
|
39
|
+
export declare function reportLogBoxError(error: ExtendedError, componentStack?: string): void;
|
|
40
|
+
export declare function reportUnexpectedLogBoxError(error: ExtendedError, componentStack?: string): void;
|
|
41
|
+
export declare function isLogBoxErrorMessage(message: string): boolean;
|
|
42
|
+
export declare function isMessageIgnored(message: string): boolean;
|
|
43
|
+
export declare function addLog(log: LogData): void;
|
|
44
|
+
export declare function addException(error: ExtendedExceptionData): void;
|
|
45
|
+
export declare function symbolicateLogNow(type: StackType, log: LogBoxLog): void;
|
|
46
|
+
export declare function retrySymbolicateLogNow(type: StackType, log: LogBoxLog): void;
|
|
47
|
+
export declare function symbolicateLogLazy(type: StackType, log: LogBoxLog): void;
|
|
48
|
+
export declare function clear(): void;
|
|
49
|
+
export declare function setSelectedLog(proposedNewIndex: number): void;
|
|
50
|
+
export declare function clearWarnings(): void;
|
|
51
|
+
export declare function clearErrors(): void;
|
|
52
|
+
export declare function dismiss(log: LogBoxLog): void;
|
|
53
|
+
export declare function getIgnorePatterns(): IgnorePattern[];
|
|
54
|
+
export declare function addIgnorePatterns(patterns: IgnorePattern[]): void;
|
|
55
|
+
export declare function setDisabled(value: boolean): void;
|
|
56
|
+
export declare function isDisabled(): boolean;
|
|
57
|
+
export declare function observe(observer: Observer): Subscription;
|
|
58
|
+
export declare function withSubscription(WrappedComponent: React.FC<object>): React.Component<object>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=LogBoxData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogBoxData.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/Data/LogBoxData.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,KAAK,EAC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