@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 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorToastContainer.web.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.web.tsx"],"names":[],"mappings":"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","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and 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 */\nimport React, { useCallback, useMemo } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\n\nimport * as LogBoxData from \"../Data/LogBoxData\";\nimport { LogBoxLog } from \"../Data/LogBoxLog\";\nimport { useLogs } from \"../Data/LogContext\";\nimport { useRejectionHandler } from \"../useRejectionHandler\";\nimport { ErrorToast } from \"./ErrorToast\";\n\nexport function ErrorToastContainer() {\n useRejectionHandler();\n const { logs, isDisabled } = useLogs();\n if (!logs.length || isDisabled) {\n return null;\n }\n return <ErrorToastStack logs={logs} />;\n}\n\nfunction ErrorToastStack({ logs }: { logs: LogBoxLog[] }) {\n const onDismissWarns = useCallback(() => {\n LogBoxData.clearWarnings();\n }, []);\n\n const onDismissErrors = useCallback(() => {\n LogBoxData.clearErrors();\n }, []);\n\n const setSelectedLog = useCallback((index: number): void => {\n LogBoxData.setSelectedLog(index);\n }, []);\n\n function openLog(log: LogBoxLog) {\n let index = logs.length - 1;\n\n // Stop at zero because if we don't find any log, we'll open the first log.\n while (index > 0 && logs[index] !== log) {\n index -= 1;\n }\n setSelectedLog(index);\n }\n\n const warnings = useMemo(\n () => logs.filter((log) => log.level === \"warn\"),\n [logs]\n );\n\n const errors = useMemo(\n () => logs.filter((log) => log.level === \"error\" || log.level === \"fatal\"),\n [logs]\n );\n\n return (\n <View style={styles.list}>\n {warnings.length > 0 && (\n <ErrorToast\n log={warnings[warnings.length - 1]}\n level=\"warn\"\n totalLogCount={warnings.length}\n onPressOpen={() => openLog(warnings[warnings.length - 1])}\n onPressDismiss={onDismissWarns}\n />\n )}\n\n {errors.length > 0 && (\n <ErrorToast\n log={errors[errors.length - 1]}\n level=\"error\"\n totalLogCount={errors.length}\n onPressOpen={() => openLog(errors[errors.length - 1])}\n onPressDismiss={onDismissErrors}\n />\n )}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n list: {\n bottom: 6,\n left: 10,\n right: 10,\n position: \"absolute\",\n maxWidth: 320,\n },\n});\n\nexport default LogBoxData.withSubscription(ErrorToastContainer);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorToastMessage.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrE,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,eAYvE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ErrorToastMessage = void 0;
|
|
30
|
+
const react_views_1 = require("@bacons/react-views");
|
|
31
|
+
const react_1 = __importDefault(require("react"));
|
|
32
|
+
const LogBoxMessage_1 = require("../UI/LogBoxMessage");
|
|
33
|
+
const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
|
|
34
|
+
function ErrorToastMessage({ message }) {
|
|
35
|
+
return (react_1.default.createElement(react_views_1.Text, { numberOfLines: 1, selectable: false, style: styles.text }, message && (react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { plaintext: true, message: message, style: styles.substitutionText }))));
|
|
36
|
+
}
|
|
37
|
+
exports.ErrorToastMessage = ErrorToastMessage;
|
|
38
|
+
const styles = react_views_1.StyleSheet.create({
|
|
39
|
+
text: {
|
|
40
|
+
paddingLeft: 8,
|
|
41
|
+
color: LogBoxStyle.getTextColor(1),
|
|
42
|
+
flex: 1,
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
lineHeight: 22,
|
|
45
|
+
},
|
|
46
|
+
substitutionText: {
|
|
47
|
+
color: LogBoxStyle.getTextColor(0.6),
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=ErrorToastMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorToastMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuD;AACvD,kDAA0B;AAG1B,uDAAoD;AACpD,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA6B;IACtE,OAAO,CACL,8BAAC,kBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IAC1D,OAAO,IAAI,CACV,8BAAC,6BAAa,IACZ,SAAS,QACT,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,gBAAgB,GAC9B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAZD,8CAYC;AAED,MAAM,MAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, Text } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport type { Message as MessageType } from \"../Data/parseLogBoxLog\";\nimport { LogBoxMessage } from \"../UI/LogBoxMessage\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\nexport function ErrorToastMessage({ message }: { message?: MessageType }) {\n return (\n <Text numberOfLines={1} selectable={false} style={styles.text}>\n {message && (\n <LogBoxMessage\n plaintext\n message={message}\n style={styles.substitutionText}\n />\n )}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n paddingLeft: 8,\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 14,\n lineHeight: 22,\n },\n substitutionText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRejectionHandler.d.ts","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,wBAAgB,mBAAmB,oCA6ClC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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.useRejectionHandler = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ExceptionsManager_1 = __importDefault(require("./modules/ExceptionsManager"));
|
|
9
|
+
function useStackTraceLimit(limit) {
|
|
10
|
+
const current = react_1.default.useRef(0);
|
|
11
|
+
react_1.default.useEffect(() => {
|
|
12
|
+
try {
|
|
13
|
+
const currentLimit = Error.stackTraceLimit;
|
|
14
|
+
Error.stackTraceLimit = limit;
|
|
15
|
+
current.current = currentLimit;
|
|
16
|
+
}
|
|
17
|
+
catch { }
|
|
18
|
+
return () => {
|
|
19
|
+
try {
|
|
20
|
+
Error.stackTraceLimit = current.current;
|
|
21
|
+
}
|
|
22
|
+
catch { }
|
|
23
|
+
};
|
|
24
|
+
}, [limit]);
|
|
25
|
+
}
|
|
26
|
+
function useRejectionHandler() {
|
|
27
|
+
const hasError = react_1.default.useRef(false);
|
|
28
|
+
useStackTraceLimit(35);
|
|
29
|
+
react_1.default.useEffect(() => {
|
|
30
|
+
function onUnhandledError(ev) {
|
|
31
|
+
hasError.current = true;
|
|
32
|
+
const error = ev === null || ev === void 0 ? void 0 : ev.error;
|
|
33
|
+
if (!error ||
|
|
34
|
+
!(error instanceof Error) ||
|
|
35
|
+
typeof error.stack !== "string") {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
ExceptionsManager_1.default.handleException(error);
|
|
39
|
+
}
|
|
40
|
+
function onUnhandledRejection(ev) {
|
|
41
|
+
hasError.current = true;
|
|
42
|
+
const reason = ev === null || ev === void 0 ? void 0 : ev.reason;
|
|
43
|
+
if (!reason ||
|
|
44
|
+
!(reason instanceof Error) ||
|
|
45
|
+
typeof reason.stack !== "string") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
ExceptionsManager_1.default.handleException(reason);
|
|
49
|
+
}
|
|
50
|
+
window.addEventListener("unhandledrejection", onUnhandledRejection);
|
|
51
|
+
window.addEventListener("error", onUnhandledError);
|
|
52
|
+
return () => {
|
|
53
|
+
window.removeEventListener("error", onUnhandledError);
|
|
54
|
+
window.removeEventListener("unhandledrejection", onUnhandledRejection);
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
return hasError;
|
|
58
|
+
}
|
|
59
|
+
exports.useRejectionHandler = useRejectionHandler;
|
|
60
|
+
//# sourceMappingURL=useRejectionHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRejectionHandler.js","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oFAA4D;AAE5D,SAAS,kBAAkB,CAAC,KAAK;IAC/B,MAAM,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChC,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI;YACF,MAAM,YAAY,GAAG,KAAK,CAAC,eAAe,CAAC;YAC3C,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC;YAC9B,OAAO,CAAC,OAAO,GAAG,YAAY,CAAC;SAChC;QAAC,MAAM,GAAE;QACV,OAAO,GAAG,EAAE;YACV,IAAI;gBACF,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;aACzC;YAAC,MAAM,GAAE;QACZ,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACd,CAAC;AAED,SAAgB,mBAAmB;IACjC,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAErC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAEvB,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,SAAS,gBAAgB,CAAC,EAAc;YACtC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YAExB,MAAM,KAAK,GAAG,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,KAAK,CAAC;YACxB,IACE,CAAC,KAAK;gBACN,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;gBACzB,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAC/B;gBACA,OAAO;aACR;YAED,2BAAiB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;QAED,SAAS,oBAAoB,CAAC,EAAyB;YACrD,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YAExB,MAAM,MAAM,GAAG,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,CAAC;YAC1B,IACE,CAAC,MAAM;gBACP,CAAC,CAAC,MAAM,YAAY,KAAK,CAAC;gBAC1B,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAChC;gBACA,OAAO;aACR;YAED,2BAAiB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;QACpE,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;YACtD,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;QACzE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,QAAQ,CAAC;AAClB,CAAC;AA7CD,kDA6CC","sourcesContent":["import React from \"react\";\n\nimport ExceptionsManager from \"./modules/ExceptionsManager\";\n\nfunction useStackTraceLimit(limit) {\n const current = React.useRef(0);\n React.useEffect(() => {\n try {\n const currentLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = limit;\n current.current = currentLimit;\n } catch {}\n return () => {\n try {\n Error.stackTraceLimit = current.current;\n } catch {}\n };\n }, [limit]);\n}\n\nexport function useRejectionHandler() {\n const hasError = React.useRef(false);\n\n useStackTraceLimit(35);\n\n React.useEffect(() => {\n function onUnhandledError(ev: ErrorEvent) {\n hasError.current = true;\n\n const error = ev?.error;\n if (\n !error ||\n !(error instanceof Error) ||\n typeof error.stack !== \"string\"\n ) {\n return;\n }\n\n ExceptionsManager.handleException(error);\n }\n\n function onUnhandledRejection(ev: PromiseRejectionEvent) {\n hasError.current = true;\n\n const reason = ev?.reason;\n if (\n !reason ||\n !(reason instanceof Error) ||\n typeof reason.stack !== \"string\"\n ) {\n return;\n }\n\n ExceptionsManager.handleException(reason);\n }\n\n window.addEventListener(\"unhandledrejection\", onUnhandledRejection);\n window.addEventListener(\"error\", onUnhandledError);\n return () => {\n window.removeEventListener(\"error\", onUnhandledError);\n window.removeEventListener(\"unhandledrejection\", onUnhandledRejection);\n };\n }, []);\n\n return hasError;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDevServer.d.ts","sourceRoot":"","sources":["../src/getDevServer.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY;;IAcd,0DAA0D;;;CAkB7D,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
const expo_modules_core_1 = require("expo-modules-core");
|
|
7
|
+
const qs_1 = __importDefault(require("qs"));
|
|
8
|
+
const getDevServer = () => {
|
|
9
|
+
// Disable for SSR
|
|
10
|
+
if (!expo_modules_core_1.Platform.isDOMAvailable) {
|
|
11
|
+
return {
|
|
12
|
+
bundleLoadedFromServer: true,
|
|
13
|
+
fullBundleUrl: "",
|
|
14
|
+
url: "",
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
// The bundle is always loaded from a server in the browser.
|
|
19
|
+
bundleLoadedFromServer: true,
|
|
20
|
+
/** URL but ensures that platform query param is added. */
|
|
21
|
+
get fullBundleUrl() {
|
|
22
|
+
if ((document === null || document === void 0 ? void 0 : document.currentScript) && "src" in document.currentScript) {
|
|
23
|
+
return document.currentScript.src;
|
|
24
|
+
}
|
|
25
|
+
const url = window.location.toString();
|
|
26
|
+
const query = qs_1.default.parse(url);
|
|
27
|
+
return (location.origin +
|
|
28
|
+
location.pathname +
|
|
29
|
+
"?" +
|
|
30
|
+
qs_1.default.stringify({ ...query, platform: expo_modules_core_1.Platform.OS }));
|
|
31
|
+
},
|
|
32
|
+
url: location.origin + location.pathname,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
module.exports = getDevServer;
|
|
36
|
+
exports.default = getDevServer;
|
|
37
|
+
//# sourceMappingURL=getDevServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDevServer.js","sourceRoot":"","sources":["../src/getDevServer.ts"],"names":[],"mappings":";;;;;AAAA,yDAA6C;AAC7C,4CAAoB;AAEpB,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,kBAAkB;IAClB,IAAI,CAAC,4BAAQ,CAAC,cAAc,EAAE;QAC5B,OAAO;YACL,sBAAsB,EAAE,IAAI;YAC5B,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;SACR,CAAC;KACH;IAED,OAAO;QACL,4DAA4D;QAC5D,sBAAsB,EAAE,IAAI;QAE5B,0DAA0D;QAC1D,IAAI,aAAa;YACf,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,KAAK,IAAI,QAAQ,CAAC,aAAa,EAAE;gBAC9D,OAAO,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;aACnC;YAED,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACvC,MAAM,KAAK,GAAG,YAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAE5B,OAAO,CACL,QAAQ,CAAC,MAAM;gBACf,QAAQ,CAAC,QAAQ;gBACjB,GAAG;gBACH,YAAE,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,4BAAQ,CAAC,EAAE,EAAE,CAAC,CAClD,CAAC;QACJ,CAAC;QACD,GAAG,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,QAAQ;KACzC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,YAAY,CAAC;AAC9B,kBAAe,YAAY,CAAC","sourcesContent":["import { Platform } from \"expo-modules-core\";\nimport qs from \"qs\";\n\nconst getDevServer = () => {\n // Disable for SSR\n if (!Platform.isDOMAvailable) {\n return {\n bundleLoadedFromServer: true,\n fullBundleUrl: \"\",\n url: \"\",\n };\n }\n\n return {\n // The bundle is always loaded from a server in the browser.\n bundleLoadedFromServer: true,\n\n /** URL but ensures that platform query param is added. */\n get fullBundleUrl() {\n if (document?.currentScript && \"src\" in document.currentScript) {\n return document.currentScript.src;\n }\n\n const url = window.location.toString();\n const query = qs.parse(url);\n\n return (\n location.origin +\n location.pathname +\n \"?\" +\n qs.stringify({ ...query, platform: Platform.OS })\n );\n },\n url: location.origin + location.pathname,\n };\n};\n\nmodule.exports = getDevServer;\nexport default getDevServer;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=getDevServer.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDevServer.native.d.ts","sourceRoot":"","sources":["../src/getDevServer.native.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDevServer.native.js","sourceRoot":"","sources":["../src/getDevServer.native.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC","sourcesContent":["module.exports = require(\"react-native/Libraries/Core/Devtools/getDevServer\");\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,qBAAmB","sourcesContent":["import \"./effects\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageSocket.d.ts","sourceRoot":"","sources":["../src/messageSocket.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ,QAAuD,CAAC;AACtE,QAAA,MAAM,aAAa,WAElB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-env browser */
|
|
2
|
+
// Setup websocket messages for reloading the page from the command line.
|
|
3
|
+
// This is normally setup on the native client.
|
|
4
|
+
const protocol = window.location.protocol === "https:" ? "wss" : "ws";
|
|
5
|
+
const messageSocket = new WebSocket(`${protocol}://${window.location.host}/message`);
|
|
6
|
+
messageSocket.onmessage = (message) => {
|
|
7
|
+
const data = JSON.parse(String(message.data));
|
|
8
|
+
switch (data.method) {
|
|
9
|
+
case "sendDevCommand":
|
|
10
|
+
switch (data.params.name) {
|
|
11
|
+
case "reload":
|
|
12
|
+
window.location.reload();
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
break;
|
|
16
|
+
case "reload":
|
|
17
|
+
window.location.reload();
|
|
18
|
+
break;
|
|
19
|
+
case "devMenu":
|
|
20
|
+
// no-op
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=messageSocket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageSocket.js","sourceRoot":"","sources":["../src/messageSocket.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,yEAAyE;AACzE,+CAA+C;AAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,MAAM,aAAa,GAAG,IAAI,SAAS,CACjC,GAAG,QAAQ,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAChD,CAAC;AACF,aAAa,CAAC,SAAS,GAAG,CAAC,OAAO,EAAE,EAAE;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,QAAQ,IAAI,CAAC,MAAM,EAAE;QACnB,KAAK,gBAAgB;YACnB,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACxB,KAAK,QAAQ;oBACX,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;oBACzB,MAAM;aACT;YACD,MAAM;QACR,KAAK,QAAQ;YACX,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,MAAM;QACR,KAAK,SAAS;YACZ,QAAQ;YACR,MAAM;KACT;AACH,CAAC,CAAC","sourcesContent":["/* eslint-env browser */\n\n// Setup websocket messages for reloading the page from the command line.\n// This is normally setup on the native client.\n\nconst protocol = window.location.protocol === \"https:\" ? \"wss\" : \"ws\";\nconst messageSocket = new WebSocket(\n `${protocol}://${window.location.host}/message`\n);\nmessageSocket.onmessage = (message) => {\n const data = JSON.parse(String(message.data));\n switch (data.method) {\n case \"sendDevCommand\":\n switch (data.params.name) {\n case \"reload\":\n window.location.reload();\n break;\n }\n break;\n case \"reload\":\n window.location.reload();\n break;\n case \"devMenu\":\n // no-op\n break;\n }\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const ReactRefreshRuntime: any;
|
|
2
|
+
declare const Refresh: {
|
|
3
|
+
performFullRefresh(): void;
|
|
4
|
+
createSignatureFunctionForTransform: any;
|
|
5
|
+
isLikelyComponentType: any;
|
|
6
|
+
getFamilyByType: any;
|
|
7
|
+
register: any;
|
|
8
|
+
performReactRefresh(): void;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=setupFastRefresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupFastRefresh.d.ts","sourceRoot":"","sources":["../src/setupFastRefresh.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,mBAAmB,KAAmC,CAAC;AAG7D,QAAA,MAAM,OAAO;;;;;;;CAqBZ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This needs to run before the renderer initializes.
|
|
2
|
+
const ReactRefreshRuntime = require("react-refresh/runtime");
|
|
3
|
+
ReactRefreshRuntime.injectIntoGlobalHook(global);
|
|
4
|
+
const Refresh = {
|
|
5
|
+
performFullRefresh() {
|
|
6
|
+
location.reload();
|
|
7
|
+
},
|
|
8
|
+
createSignatureFunctionForTransform: ReactRefreshRuntime.createSignatureFunctionForTransform,
|
|
9
|
+
isLikelyComponentType: ReactRefreshRuntime.isLikelyComponentType,
|
|
10
|
+
getFamilyByType: ReactRefreshRuntime.getFamilyByType,
|
|
11
|
+
register: ReactRefreshRuntime.register,
|
|
12
|
+
performReactRefresh() {
|
|
13
|
+
if (ReactRefreshRuntime.hasUnrecoverableErrors()) {
|
|
14
|
+
location.reload();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
ReactRefreshRuntime.performReactRefresh();
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
// The metro require polyfill can not have dependencies (applies for all polyfills).
|
|
21
|
+
// Expose `Refresh` by assigning it to global to make it available in the polyfill.
|
|
22
|
+
global[(global.__METRO_GLOBAL_PREFIX__ || "") + "__ReactRefresh"] = Refresh;
|
|
23
|
+
//# sourceMappingURL=setupFastRefresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupFastRefresh.js","sourceRoot":"","sources":["../src/setupFastRefresh.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,mBAAmB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC7D,mBAAmB,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,OAAO,GAAG;IACd,kBAAkB;QAChB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAED,mCAAmC,EACjC,mBAAmB,CAAC,mCAAmC;IAEzD,qBAAqB,EAAE,mBAAmB,CAAC,qBAAqB;IAEhE,eAAe,EAAE,mBAAmB,CAAC,eAAe;IAEpD,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;IAEtC,mBAAmB;QACjB,IAAI,mBAAmB,CAAC,sBAAsB,EAAE,EAAE;YAChD,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,OAAO;SACR;QACD,mBAAmB,CAAC,mBAAmB,EAAE,CAAC;IAC5C,CAAC;CACF,CAAC;AAEF,oFAAoF;AACpF,mFAAmF;AACnF,MAAM,CAAC,CAAC,MAAM,CAAC,uBAAuB,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,GAAG,OAAO,CAAC","sourcesContent":["// This needs to run before the renderer initializes.\n\nconst ReactRefreshRuntime = require(\"react-refresh/runtime\");\nReactRefreshRuntime.injectIntoGlobalHook(global);\n\nconst Refresh = {\n performFullRefresh() {\n location.reload();\n },\n\n createSignatureFunctionForTransform:\n ReactRefreshRuntime.createSignatureFunctionForTransform,\n\n isLikelyComponentType: ReactRefreshRuntime.isLikelyComponentType,\n\n getFamilyByType: ReactRefreshRuntime.getFamilyByType,\n\n register: ReactRefreshRuntime.register,\n\n performReactRefresh() {\n if (ReactRefreshRuntime.hasUnrecoverableErrors()) {\n location.reload();\n return;\n }\n ReactRefreshRuntime.performReactRefresh();\n },\n};\n\n// The metro require polyfill can not have dependencies (applies for all polyfills).\n// Expose `Refresh` by assigning it to global to make it available in the polyfill.\nglobal[(global.__METRO_GLOBAL_PREFIX__ || \"\") + \"__ReactRefresh\"] = Refresh;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupHMR.d.ts","sourceRoot":"","sources":["../src/setupHMR.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const HMRClient_1 = __importDefault(require("./HMRClient"));
|
|
8
|
+
// Sets up developer tools for React Native web.
|
|
9
|
+
if (!react_native_1.Platform.isTesting) {
|
|
10
|
+
HMRClient_1.default.log("log", [`JavaScript logs will appear in your browser console`]);
|
|
11
|
+
}
|
|
12
|
+
// This is called native on native platforms
|
|
13
|
+
HMRClient_1.default.setup({ isEnabled: true });
|
|
14
|
+
//# sourceMappingURL=setupHMR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupHMR.js","sourceRoot":"","sources":["../src/setupHMR.ts"],"names":[],"mappings":";;;;;AAAA,+CAAwC;AAExC,4DAAoC;AAEpC,gDAAgD;AAChD,IAAI,CAAC,uBAAQ,CAAC,SAAS,EAAE;IACvB,mBAAS,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,qDAAqD,CAAC,CAAC,CAAC;CAC/E;AAED,4CAA4C;AAC5C,mBAAS,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { Platform } from \"react-native\";\n\nimport HMRClient from \"./HMRClient\";\n\n// Sets up developer tools for React Native web.\nif (!Platform.isTesting) {\n HMRClient.log(\"log\", [`JavaScript logs will appear in your browser console`]);\n}\n\n// This is called native on native platforms\nHMRClient.setup({ isEnabled: true });\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./build/error-overlay";
|
package/error-overlay.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./build/error-overlay");
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@expo/metro-runtime",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Tools for making experimental Metro bundler features work",
|
|
5
|
+
"main": "build",
|
|
6
|
+
"files": [
|
|
7
|
+
"build",
|
|
8
|
+
"asyncRequire.js",
|
|
9
|
+
"error-overlay.js",
|
|
10
|
+
"error-overlay.d.ts",
|
|
11
|
+
"assets"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "expo-module build",
|
|
15
|
+
"clean": "expo-module clean",
|
|
16
|
+
"lint": "expo-module lint",
|
|
17
|
+
"test": "expo-module test",
|
|
18
|
+
"prepare": "expo-module prepare",
|
|
19
|
+
"prepublishOnly": "expo-module prepublishOnly",
|
|
20
|
+
"expo-module": "expo-module"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/expo/router.git"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react-native": "*"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"expo",
|
|
31
|
+
"metro",
|
|
32
|
+
"fast-refresh",
|
|
33
|
+
"react-native"
|
|
34
|
+
],
|
|
35
|
+
"author": "Evan Bacon",
|
|
36
|
+
"license": "BSD-3-Clause",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@bacons/react-views": "^1.1.3",
|
|
39
|
+
"qs": "^6.10.3"
|
|
40
|
+
}
|
|
41
|
+
}
|