one 2.0.0-beta.45.1 → 2.0.0-beta.50.1
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/dist/cjs/babel-preset/index.cjs +3 -2
- package/dist/cjs/babel-preset/index.native.cjs +4 -2
- package/dist/cjs/babel-preset/index.native.js +4 -2
- package/dist/cjs/babel-preset/index.native.js.map +1 -1
- package/dist/cjs/cli/prebuild.cjs +10 -2
- package/dist/cjs/cli/prebuild.native.cjs +10 -2
- package/dist/cjs/cli/prebuild.native.js +10 -2
- package/dist/cjs/cli/prebuild.native.js.map +1 -1
- package/dist/cjs/cli.cjs +0 -5
- package/dist/cjs/cli.native.cjs +0 -5
- package/dist/cjs/cli.native.js +0 -5
- package/dist/cjs/cli.native.js.map +1 -1
- package/dist/cjs/index.cjs +5 -3
- package/dist/cjs/index.native.cjs +5 -3
- package/dist/cjs/index.native.js +5 -3
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/link/Link.cjs +2 -1
- package/dist/cjs/link/linking.native.cjs +8 -57
- package/dist/cjs/link/linking.native.js +8 -57
- package/dist/cjs/link/linking.native.js.map +1 -1
- package/dist/cjs/link/openExternalURL.native.cjs +2 -8
- package/dist/cjs/link/openExternalURL.native.js +2 -8
- package/dist/cjs/link/openExternalURL.native.js.map +1 -1
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.cjs +1 -0
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.cjs +7 -5
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.js +7 -5
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.js.map +1 -1
- package/dist/cjs/native/appManifest.cjs +64 -0
- package/dist/cjs/native/appManifest.native.cjs +83 -0
- package/dist/cjs/native/appManifest.native.js +85 -0
- package/dist/cjs/native/appManifest.native.js.map +1 -0
- package/dist/cjs/native/closure.cjs +74 -0
- package/dist/cjs/native/closure.native.cjs +80 -0
- package/dist/cjs/native/closure.native.js +82 -0
- package/dist/cjs/native/closure.native.js.map +1 -0
- package/dist/cjs/native/env.cjs +46 -0
- package/dist/cjs/native/env.native.cjs +67 -0
- package/dist/cjs/native/env.native.js +69 -0
- package/dist/cjs/native/env.native.js.map +1 -0
- package/dist/cjs/native/generator.cjs +160 -0
- package/dist/cjs/native/generator.native.cjs +246 -0
- package/dist/cjs/native/generator.native.js +248 -0
- package/dist/cjs/native/generator.native.js.map +1 -0
- package/dist/cjs/native/index.cjs +45 -0
- package/dist/cjs/native/index.native.cjs +47 -0
- package/dist/cjs/native/index.native.js +49 -0
- package/dist/cjs/native/index.native.js.map +1 -0
- package/dist/cjs/native/platform.cjs +145 -0
- package/dist/cjs/native/platform.native.cjs +166 -0
- package/dist/cjs/native/platform.native.js +168 -0
- package/dist/cjs/native/platform.native.js.map +1 -0
- package/dist/cjs/one.cjs +43 -0
- package/dist/cjs/one.native.cjs +47 -0
- package/dist/cjs/one.native.js +49 -0
- package/dist/cjs/one.native.js.map +1 -0
- package/dist/cjs/router/useScreens.cjs +2 -2
- package/dist/cjs/router/useScreens.native.cjs +1 -1
- package/dist/cjs/router/useScreens.native.js +1 -1
- package/dist/cjs/router/useScreens.native.js.map +1 -1
- package/dist/cjs/views/ErrorBoundary.native.cjs +2 -2
- package/dist/cjs/views/ErrorBoundary.native.js +2 -2
- package/dist/cjs/views/ErrorBoundary.native.js.map +1 -1
- package/dist/cjs/views/Navigator.cjs +2 -2
- package/dist/cjs/views/Navigator.native.cjs +2 -2
- package/dist/cjs/views/Navigator.native.js +2 -2
- package/dist/cjs/views/Navigator.native.js.map +1 -1
- package/dist/cjs/{__mocks__/expo-linking.cjs → vite/nativeBundler.cjs} +7 -12
- package/dist/cjs/{__mocks__/expo-linking.native.cjs → vite/nativeBundler.native.cjs} +7 -20
- package/dist/cjs/{__mocks__/expo-linking.native.js → vite/nativeBundler.native.js} +8 -21
- package/dist/cjs/vite/nativeBundler.native.js.map +1 -0
- package/dist/cjs/vite/one.cjs +14 -6
- package/dist/cjs/vite/one.native.cjs +15 -7
- package/dist/cjs/vite/one.native.js +15 -7
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/esm/babel-preset/index.mjs +3 -2
- package/dist/esm/babel-preset/index.mjs.map +1 -1
- package/dist/esm/babel-preset/index.native.js +4 -2
- package/dist/esm/babel-preset/index.native.js.map +1 -1
- package/dist/esm/cli/prebuild.mjs +10 -2
- package/dist/esm/cli/prebuild.mjs.map +1 -1
- package/dist/esm/cli/prebuild.native.js +10 -2
- package/dist/esm/cli/prebuild.native.js.map +1 -1
- package/dist/esm/cli.mjs +0 -5
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +0 -5
- package/dist/esm/cli.native.js.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/index.native.js +3 -2
- package/dist/esm/link/Link.mjs +2 -1
- package/dist/esm/link/Link.mjs.map +1 -1
- package/dist/esm/link/linking.native.js +7 -50
- package/dist/esm/link/linking.native.js.map +1 -1
- package/dist/esm/link/openExternalURL.native.js +1 -1
- package/dist/esm/link/openExternalURL.native.js.map +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.mjs +1 -0
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.mjs.map +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.native.js +7 -5
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.native.js.map +1 -1
- package/dist/esm/native/appManifest.mjs +44 -0
- package/dist/esm/native/appManifest.mjs.map +1 -0
- package/dist/esm/native/appManifest.native.js +61 -0
- package/dist/esm/native/appManifest.native.js.map +1 -0
- package/dist/esm/native/closure.mjs +48 -0
- package/dist/esm/native/closure.mjs.map +1 -0
- package/dist/esm/native/closure.native.js +52 -0
- package/dist/esm/native/closure.native.js.map +1 -0
- package/dist/esm/native/env.mjs +21 -0
- package/dist/esm/native/env.mjs.map +1 -0
- package/dist/esm/native/env.native.js +40 -0
- package/dist/esm/native/env.native.js.map +1 -0
- package/dist/esm/native/generator.mjs +135 -0
- package/dist/esm/native/generator.mjs.map +1 -0
- package/dist/esm/native/generator.native.js +219 -0
- package/dist/esm/native/generator.native.js.map +1 -0
- package/dist/esm/native/index.mjs +6 -0
- package/dist/esm/native/index.native.js +6 -0
- package/dist/esm/native/platform.mjs +117 -0
- package/dist/esm/native/platform.mjs.map +1 -0
- package/dist/esm/native/platform.native.js +136 -0
- package/dist/esm/native/platform.native.js.map +1 -0
- package/dist/esm/one.mjs +24 -0
- package/dist/esm/one.mjs.map +1 -0
- package/dist/esm/one.native.js +26 -0
- package/dist/esm/one.native.js.map +1 -0
- package/dist/esm/router/useScreens.mjs +1 -1
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/views/ErrorBoundary.native.js +1 -1
- package/dist/esm/views/ErrorBoundary.native.js.map +1 -1
- package/dist/esm/views/Navigator.mjs +1 -1
- package/dist/esm/views/Navigator.mjs.map +1 -1
- package/dist/esm/views/Navigator.native.js +1 -1
- package/dist/esm/views/Navigator.native.js.map +1 -1
- package/dist/esm/vite/nativeBundler.mjs +7 -0
- package/dist/esm/vite/nativeBundler.mjs.map +1 -0
- package/dist/esm/vite/nativeBundler.native.js +7 -0
- package/dist/esm/vite/nativeBundler.native.js.map +1 -0
- package/dist/esm/vite/one.mjs +14 -6
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +15 -7
- package/dist/esm/vite/one.native.js.map +1 -1
- package/env.d.ts +2 -2
- package/package.json +22 -18
- package/src/babel-preset/index.ts +4 -2
- package/src/cli/prebuild.test.ts +27 -7
- package/src/cli/prebuild.ts +11 -2
- package/src/cli/runAndroid.ts +2 -2
- package/src/cli/runIos.ts +2 -2
- package/src/cli.ts +0 -6
- package/src/fallbackViews/Sitemap.tsx +1 -1
- package/src/getDevServer.native.ts +1 -0
- package/src/index.ts +3 -2
- package/src/layouts/stack-utils/StackHeaderComponent.tsx +15 -11
- package/src/layouts/stack-utils/StackHeaderTitle.tsx +14 -15
- package/src/link/Link.web.tsx +2 -1
- package/src/link/linking.native.ts +4 -66
- package/src/link/openExternalURL.native.ts +1 -1
- package/src/metro-config/buildOneMetroResolverOverrides.test.ts +3 -0
- package/src/metro-config/buildOneMetroResolverOverrides.ts +1 -0
- package/src/native/appManifest.test.ts +28 -0
- package/src/native/appManifest.ts +81 -0
- package/src/native/closure.test.ts +30 -0
- package/src/native/closure.ts +66 -0
- package/src/native/env.test.ts +13 -0
- package/src/native/env.ts +32 -0
- package/src/native/generator.test.ts +39 -0
- package/src/native/generator.ts +205 -0
- package/src/native/index.ts +34 -0
- package/src/native/packedClosure.test.ts +116 -0
- package/src/native/platform.test.ts +46 -0
- package/src/native/platform.ts +173 -0
- package/src/one.test.ts +32 -0
- package/src/one.ts +37 -0
- package/src/router/useScreens.tsx +1 -1
- package/src/views/ErrorBoundary.tsx +1 -1
- package/src/views/Navigator.tsx +1 -1
- package/src/vite/nativeBundler.test.ts +19 -0
- package/src/vite/nativeBundler.ts +10 -0
- package/src/vite/one.ts +14 -6
- package/src/vite/types.ts +7 -0
- package/types/babel-preset/index.d.ts.map +1 -1
- package/types/cli/prebuild.d.ts +0 -1
- package/types/cli/prebuild.d.ts.map +1 -1
- package/types/getDevServer.native.d.ts.map +1 -1
- package/types/index.d.ts +3 -2
- package/types/index.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackHeaderComponent.d.ts +12 -9
- package/types/layouts/stack-utils/StackHeaderComponent.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackHeaderTitle.d.ts +11 -13
- package/types/layouts/stack-utils/StackHeaderTitle.d.ts.map +1 -1
- package/types/link/Link.web.d.ts.map +1 -1
- package/types/link/linking.native.d.ts.map +1 -1
- package/types/metro-config/buildOneMetroResolverOverrides.d.ts.map +1 -1
- package/types/native/appManifest.d.ts +26 -0
- package/types/native/appManifest.d.ts.map +1 -0
- package/types/native/closure.d.ts +17 -0
- package/types/native/closure.d.ts.map +1 -0
- package/types/native/env.d.ts +6 -0
- package/types/native/env.d.ts.map +1 -0
- package/types/native/generator.d.ts +36 -0
- package/types/native/generator.d.ts.map +1 -0
- package/types/native/index.d.ts +5 -0
- package/types/native/index.d.ts.map +1 -0
- package/types/native/platform.d.ts +26 -0
- package/types/native/platform.d.ts.map +1 -0
- package/types/one.d.ts +12 -0
- package/types/one.d.ts.map +1 -0
- package/types/vite/nativeBundler.d.ts +4 -0
- package/types/vite/nativeBundler.d.ts.map +1 -0
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/types.d.ts +6 -0
- package/types/vite/types.d.ts.map +1 -1
- package/dist/cjs/__mocks__/expo-linking.native.js.map +0 -1
- package/dist/cjs/__mocks__/expo-modules-core.cjs +0 -36
- package/dist/cjs/__mocks__/expo-modules-core.native.cjs +0 -77
- package/dist/cjs/__mocks__/expo-modules-core.native.js +0 -79
- package/dist/cjs/__mocks__/expo-modules-core.native.js.map +0 -1
- package/dist/esm/__mocks__/expo-linking.mjs +0 -7
- package/dist/esm/__mocks__/expo-linking.mjs.map +0 -1
- package/dist/esm/__mocks__/expo-linking.native.js +0 -15
- package/dist/esm/__mocks__/expo-linking.native.js.map +0 -1
- package/dist/esm/__mocks__/expo-modules-core.mjs +0 -11
- package/dist/esm/__mocks__/expo-modules-core.mjs.map +0 -1
- package/dist/esm/__mocks__/expo-modules-core.native.js +0 -50
- package/dist/esm/__mocks__/expo-modules-core.native.js.map +0 -1
- package/src/__mocks__/expo-linking.ts +0 -6
- package/src/__mocks__/expo-modules-core.ts +0 -11
- package/types/__mocks__/expo-linking.d.ts +0 -9
- package/types/__mocks__/expo-linking.d.ts.map +0 -1
- package/types/__mocks__/expo-modules-core.d.ts +0 -11
- package/types/__mocks__/expo-modules-core.d.ts.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -21,10 +19,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
19
|
}
|
|
22
20
|
return to;
|
|
23
21
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
-
value: mod,
|
|
26
|
-
enumerable: true
|
|
27
|
-
}) : target, mod));
|
|
28
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
23
|
var linking_native_exports = {};
|
|
30
24
|
__export(linking_native_exports, {
|
|
@@ -36,29 +30,12 @@ __export(linking_native_exports, {
|
|
|
36
30
|
getStateFromPath: () => import_getStateFromPath.getStateFromPath
|
|
37
31
|
});
|
|
38
32
|
module.exports = __toCommonJS(linking_native_exports);
|
|
39
|
-
var
|
|
40
|
-
var import_extractPathFromURL = require("../fork/extractPathFromURL.native.js");
|
|
33
|
+
var import_react_native = require("react-native");
|
|
41
34
|
var import_getPathFromState = require("../fork/getPathFromState.native.js");
|
|
42
35
|
var import_getStateFromPath = require("../fork/getStateFromPath.native.js");
|
|
43
|
-
var _globalThis_expo_modules;
|
|
44
|
-
var _globalThis_expo;
|
|
45
|
-
var isExpoGo = typeof expo !== "undefined" && ((_globalThis_expo = globalThis.expo) === null || _globalThis_expo === void 0 ? void 0 : (_globalThis_expo_modules = _globalThis_expo.modules) === null || _globalThis_expo_modules === void 0 ? void 0 : _globalThis_expo_modules.ExpoGo);
|
|
46
36
|
function getInitialURL() {
|
|
47
|
-
if (process.env.NODE_ENV === "test") {
|
|
48
|
-
var _Linking_getInitialURL;
|
|
49
|
-
return (_Linking_getInitialURL = Linking.getInitialURL()) !== null && _Linking_getInitialURL !== void 0 ? _Linking_getInitialURL : getRootURL();
|
|
50
|
-
}
|
|
51
37
|
return Promise.race([(async function() {
|
|
52
|
-
var url = await Linking.getInitialURL();
|
|
53
|
-
if (url && isExpoGo) {
|
|
54
|
-
var parsed = Linking.parse(url);
|
|
55
|
-
if (parsed.path === null || ["", "/"].includes((0, import_extractPathFromURL.adjustPathname)({
|
|
56
|
-
hostname: parsed.hostname,
|
|
57
|
-
pathname: parsed.path
|
|
58
|
-
}))) {
|
|
59
|
-
return getRootURL();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
38
|
+
var url = await import_react_native.Linking.getInitialURL();
|
|
62
39
|
return url !== null && url !== void 0 ? url : getRootURL();
|
|
63
40
|
})(), new Promise(function(resolve) {
|
|
64
41
|
return setTimeout(function() {
|
|
@@ -66,43 +43,17 @@ function getInitialURL() {
|
|
|
66
43
|
}, 150);
|
|
67
44
|
})]);
|
|
68
45
|
}
|
|
69
|
-
var _rootURL;
|
|
70
46
|
function getRootURL() {
|
|
71
|
-
|
|
72
|
-
_rootURL = Linking.createURL("/");
|
|
73
|
-
}
|
|
74
|
-
return _rootURL;
|
|
47
|
+
return "/";
|
|
75
48
|
}
|
|
76
49
|
function getDefaultLinkingPrefixes() {
|
|
77
|
-
|
|
78
|
-
var _Linking_collectManifestSchemes;
|
|
79
|
-
return (_ref = (_Linking_collectManifestSchemes = Linking.collectManifestSchemes) === null || _Linking_collectManifestSchemes === void 0 ? void 0 : _Linking_collectManifestSchemes.call(Linking).flatMap(function(scheme) {
|
|
80
|
-
var normalized = scheme.replace(/:\/+$/, "");
|
|
81
|
-
return [`${normalized}://`, `${normalized}:///`];
|
|
82
|
-
})) !== null && _ref !== void 0 ? _ref : [];
|
|
50
|
+
return [];
|
|
83
51
|
}
|
|
84
52
|
function addEventListener(listener) {
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var parsed = Linking.parse(url);
|
|
90
|
-
if (parsed.path === null || ["", "/"].includes((0, import_extractPathFromURL.adjustPathname)({
|
|
91
|
-
hostname: parsed.hostname,
|
|
92
|
-
pathname: parsed.path
|
|
93
|
-
}))) {
|
|
94
|
-
listener(getRootURL());
|
|
95
|
-
} else {
|
|
96
|
-
listener(url);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
} else {
|
|
100
|
-
callback = function(param) {
|
|
101
|
-
var { url } = param;
|
|
102
|
-
return listener(url);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
var subscription = Linking.addEventListener("url", callback);
|
|
53
|
+
var subscription = import_react_native.Linking.addEventListener("url", function(param) {
|
|
54
|
+
var { url } = param;
|
|
55
|
+
return listener(url);
|
|
56
|
+
});
|
|
106
57
|
return function() {
|
|
107
58
|
var _subscription_remove;
|
|
108
59
|
subscription === null || subscription === void 0 ? void 0 : (_subscription_remove = subscription.remove) === null || _subscription_remove === void 0 ? void 0 : _subscription_remove.call(subscription);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -21,10 +19,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
19
|
}
|
|
22
20
|
return to;
|
|
23
21
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
-
value: mod,
|
|
26
|
-
enumerable: true
|
|
27
|
-
}) : target, mod));
|
|
28
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
23
|
var linking_native_exports = {};
|
|
30
24
|
__export(linking_native_exports, {
|
|
@@ -36,29 +30,12 @@ __export(linking_native_exports, {
|
|
|
36
30
|
getStateFromPath: () => import_getStateFromPath.getStateFromPath
|
|
37
31
|
});
|
|
38
32
|
module.exports = __toCommonJS(linking_native_exports);
|
|
39
|
-
var
|
|
40
|
-
var import_extractPathFromURL = require("../fork/extractPathFromURL.native.js");
|
|
33
|
+
var import_react_native = require("react-native");
|
|
41
34
|
var import_getPathFromState = require("../fork/getPathFromState.native.js");
|
|
42
35
|
var import_getStateFromPath = require("../fork/getStateFromPath.native.js");
|
|
43
|
-
var _globalThis_expo_modules;
|
|
44
|
-
var _globalThis_expo;
|
|
45
|
-
var isExpoGo = typeof expo !== "undefined" && ((_globalThis_expo = globalThis.expo) === null || _globalThis_expo === void 0 ? void 0 : (_globalThis_expo_modules = _globalThis_expo.modules) === null || _globalThis_expo_modules === void 0 ? void 0 : _globalThis_expo_modules.ExpoGo);
|
|
46
36
|
function getInitialURL() {
|
|
47
|
-
if (process.env.NODE_ENV === "test") {
|
|
48
|
-
var _Linking_getInitialURL;
|
|
49
|
-
return (_Linking_getInitialURL = Linking.getInitialURL()) !== null && _Linking_getInitialURL !== void 0 ? _Linking_getInitialURL : getRootURL();
|
|
50
|
-
}
|
|
51
37
|
return Promise.race([(async function() {
|
|
52
|
-
var url = await Linking.getInitialURL();
|
|
53
|
-
if (url && isExpoGo) {
|
|
54
|
-
var parsed = Linking.parse(url);
|
|
55
|
-
if (parsed.path === null || ["", "/"].includes((0, import_extractPathFromURL.adjustPathname)({
|
|
56
|
-
hostname: parsed.hostname,
|
|
57
|
-
pathname: parsed.path
|
|
58
|
-
}))) {
|
|
59
|
-
return getRootURL();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
38
|
+
var url = await import_react_native.Linking.getInitialURL();
|
|
62
39
|
return url !== null && url !== void 0 ? url : getRootURL();
|
|
63
40
|
})(), new Promise(function(resolve) {
|
|
64
41
|
return setTimeout(function() {
|
|
@@ -66,43 +43,17 @@ function getInitialURL() {
|
|
|
66
43
|
}, 150);
|
|
67
44
|
})]);
|
|
68
45
|
}
|
|
69
|
-
var _rootURL;
|
|
70
46
|
function getRootURL() {
|
|
71
|
-
|
|
72
|
-
_rootURL = Linking.createURL("/");
|
|
73
|
-
}
|
|
74
|
-
return _rootURL;
|
|
47
|
+
return "/";
|
|
75
48
|
}
|
|
76
49
|
function getDefaultLinkingPrefixes() {
|
|
77
|
-
|
|
78
|
-
var _Linking_collectManifestSchemes;
|
|
79
|
-
return (_ref = (_Linking_collectManifestSchemes = Linking.collectManifestSchemes) === null || _Linking_collectManifestSchemes === void 0 ? void 0 : _Linking_collectManifestSchemes.call(Linking).flatMap(function(scheme) {
|
|
80
|
-
var normalized = scheme.replace(/:\/+$/, "");
|
|
81
|
-
return [`${normalized}://`, `${normalized}:///`];
|
|
82
|
-
})) !== null && _ref !== void 0 ? _ref : [];
|
|
50
|
+
return [];
|
|
83
51
|
}
|
|
84
52
|
function addEventListener(listener) {
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var parsed = Linking.parse(url);
|
|
90
|
-
if (parsed.path === null || ["", "/"].includes((0, import_extractPathFromURL.adjustPathname)({
|
|
91
|
-
hostname: parsed.hostname,
|
|
92
|
-
pathname: parsed.path
|
|
93
|
-
}))) {
|
|
94
|
-
listener(getRootURL());
|
|
95
|
-
} else {
|
|
96
|
-
listener(url);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
} else {
|
|
100
|
-
callback = function(param) {
|
|
101
|
-
var { url } = param;
|
|
102
|
-
return listener(url);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
var subscription = Linking.addEventListener("url", callback);
|
|
53
|
+
var subscription = import_react_native.Linking.addEventListener("url", function(param) {
|
|
54
|
+
var { url } = param;
|
|
55
|
+
return listener(url);
|
|
56
|
+
});
|
|
106
57
|
return function() {
|
|
107
58
|
var _subscription_remove;
|
|
108
59
|
subscription === null || subscription === void 0 ? void 0 : (_subscription_remove = subscription.remove) === null || _subscription_remove === void 0 ? void 0 : _subscription_remove.call(subscription);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linking.native.js","names":[],"sources":["cjs/link/linking.native.js"],"sourcesContent":["\"use strict\";\nvar
|
|
1
|
+
{"version":3,"file":"linking.native.js","names":[],"sources":["cjs/link/linking.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar linking_native_exports = {};\n__export(linking_native_exports, {\n addEventListener: () => addEventListener,\n getDefaultLinkingPrefixes: () => getDefaultLinkingPrefixes,\n getInitialURL: () => getInitialURL,\n getPathFromState: () => import_getPathFromState.getPathFromState,\n getRootURL: () => getRootURL,\n getStateFromPath: () => import_getStateFromPath.getStateFromPath\n});\nmodule.exports = __toCommonJS(linking_native_exports);\nvar import_react_native = require(\"react-native\");\nvar import_getPathFromState = require(\"../fork/getPathFromState\");\nvar import_getStateFromPath = require(\"../fork/getStateFromPath\");\nfunction getInitialURL() {\n return Promise.race([\n (async function() {\n var url = await import_react_native.Linking.getInitialURL();\n return url !== null && url !== void 0 ? url : getRootURL();\n })(),\n new Promise(function(resolve) {\n return (\n // Timeout in 150ms if `getInitialState` doesn't resolve\n // Workaround for https://github.com/facebook/react-native/issues/25675\n setTimeout(function() {\n return resolve(getRootURL());\n }, 150)\n );\n })\n ]);\n}\nfunction getRootURL() {\n return \"/\";\n}\nfunction getDefaultLinkingPrefixes() {\n return [];\n}\nfunction addEventListener(listener) {\n var subscription = import_react_native.Linking.addEventListener(\"url\", function(param) {\n var { url } = param;\n return listener(url);\n });\n return function() {\n var _subscription_remove;\n subscription === null || subscription === void 0 ? void 0 : (_subscription_remove = subscription.remove) === null || _subscription_remove === void 0 ? void 0 : _subscription_remove.call(subscription);\n };\n}\n//# sourceMappingURL=linking.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,yBAAyB,CAAC;AAC9B,SAAS,wBAAwB;CAC/B,wBAAwB;CACxB,iCAAiC;CACjC,qBAAqB;CACrB,wBAAwB,wBAAwB;CAChD,kBAAkB;CAClB,wBAAwB,wBAAwB;AAClD,CAAC;AACD,OAAO,UAAU,aAAa,sBAAsB;AACpD,IAAI,sBAAsB,QAAQ,cAAc;AAChD,IAAI,0BAA0B,QAAQ,oCAA0B;AAChE,IAAI,0BAA0B,QAAQ,oCAA0B;AAChE,SAAS,gBAAgB;CACvB,OAAO,QAAQ,KAAK,EACjB,iBAAiB;EAChB,IAAI,MAAM,MAAM,oBAAoB,QAAQ,cAAc;EAC1D,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,MAAM,WAAW;CAC3D,EAAC,CAAE,GACH,IAAI,QAAQ,SAAS,SAAS;EAC5B,OAGE,WAAW,WAAW;GACpB,OAAO,QAAQ,WAAW,CAAC;EAC7B,GAAG,GAAG;CAEV,CAAC,CACH,CAAC;AACH;AACA,SAAS,aAAa;CACpB,OAAO;AACT;AACA,SAAS,4BAA4B;CACnC,OAAO,CAAC;AACV;AACA,SAAS,iBAAiB,UAAU;CAClC,IAAI,eAAe,oBAAoB,QAAQ,iBAAiB,OAAO,SAAS,OAAO;EACrF,IAAI,EAAE,QAAQ;EACd,OAAO,SAAS,GAAG;CACrB,CAAC;CACD,OAAO,WAAW;EAChB,IAAI;EACJ,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,KAAK,uBAAuB,aAAa,YAAY,QAAQ,yBAAyB,KAAK,IAAI,KAAK,IAAI,qBAAqB,KAAK,YAAY;CACxM;AACF"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -21,15 +19,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
19
|
}
|
|
22
20
|
return to;
|
|
23
21
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
-
value: mod,
|
|
26
|
-
enumerable: true
|
|
27
|
-
}) : target, mod));
|
|
28
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
23
|
var openExternalURL_native_exports = {};
|
|
30
24
|
__export(openExternalURL_native_exports, { openExternalURL: () => openExternalURL });
|
|
31
25
|
module.exports = __toCommonJS(openExternalURL_native_exports);
|
|
32
|
-
var
|
|
26
|
+
var import_react_native = require("react-native");
|
|
33
27
|
function openExternalURL(url) {
|
|
34
|
-
Linking.openURL(url);
|
|
28
|
+
import_react_native.Linking.openURL(url);
|
|
35
29
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -21,17 +19,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
19
|
}
|
|
22
20
|
return to;
|
|
23
21
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
-
value: mod,
|
|
26
|
-
enumerable: true
|
|
27
|
-
}) : target, mod));
|
|
28
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
23
|
var openExternalURL_native_exports = {};
|
|
30
24
|
__export(openExternalURL_native_exports, { openExternalURL: () => openExternalURL });
|
|
31
25
|
module.exports = __toCommonJS(openExternalURL_native_exports);
|
|
32
|
-
var
|
|
26
|
+
var import_react_native = require("react-native");
|
|
33
27
|
function openExternalURL(url) {
|
|
34
|
-
Linking.openURL(url);
|
|
28
|
+
import_react_native.Linking.openURL(url);
|
|
35
29
|
}
|
|
36
30
|
|
|
37
31
|
//# sourceMappingURL=openExternalURL.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openExternalURL.native.js","names":[],"sources":["cjs/link/openExternalURL.native.js"],"sourcesContent":["\"use strict\";\nvar
|
|
1
|
+
{"version":3,"file":"openExternalURL.native.js","names":[],"sources":["cjs/link/openExternalURL.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar openExternalURL_native_exports = {};\n__export(openExternalURL_native_exports, {\n openExternalURL: () => openExternalURL\n});\nmodule.exports = __toCommonJS(openExternalURL_native_exports);\nvar import_react_native = require(\"react-native\");\nfunction openExternalURL(url) {\n import_react_native.Linking.openURL(url);\n}\n//# sourceMappingURL=openExternalURL.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iCAAiC,CAAC;AACtC,SAAS,gCAAgC,EACvC,uBAAuB,gBACzB,CAAC;AACD,OAAO,UAAU,aAAa,8BAA8B;AAC5D,IAAI,sBAAsB,QAAQ,cAAc;AAChD,SAAS,gBAAgB,KAAK;CAC5B,oBAAoB,QAAQ,QAAQ,GAAG;AACzC"}
|
|
@@ -36,6 +36,7 @@ function buildOneMetroResolverOverrides({ projectRoot }) {
|
|
|
36
36
|
return (defaultConfig) => {
|
|
37
37
|
const resolver = {
|
|
38
38
|
...defaultConfig?.resolver,
|
|
39
|
+
assetExts: [.../* @__PURE__ */ new Set([...defaultConfig?.resolver?.assetExts ?? [], "txt"])],
|
|
39
40
|
extraNodeModules: { ...defaultConfig?.resolver?.extraNodeModules },
|
|
40
41
|
nodeModulesPaths: defaultConfig?.resolver?.nodeModulesPaths,
|
|
41
42
|
resolveRequest: (context, moduleName, platform) => {
|
|
@@ -37,14 +37,16 @@ function buildOneMetroResolverOverrides(param) {
|
|
|
37
37
|
var emptyPath = require2.resolve("@vxrn/vite-plugin-metro/empty", { paths: [projectRoot] });
|
|
38
38
|
var projectPackagePath = import_path.default.join(projectRoot, "package.json");
|
|
39
39
|
return function(defaultConfig) {
|
|
40
|
-
var
|
|
40
|
+
var _ref;
|
|
41
|
+
var _defaultConfig_resolver, _defaultConfig_resolver1, _defaultConfig_resolver2;
|
|
41
42
|
var resolver = {
|
|
42
43
|
...defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.resolver,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
assetExts: [.../* @__PURE__ */ new Set([...(_ref = defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver = defaultConfig.resolver) === null || _defaultConfig_resolver === void 0 ? void 0 : _defaultConfig_resolver.assetExts) !== null && _ref !== void 0 ? _ref : [], "txt"])],
|
|
45
|
+
extraNodeModules: { ...defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver1 = defaultConfig.resolver) === null || _defaultConfig_resolver1 === void 0 ? void 0 : _defaultConfig_resolver1.extraNodeModules },
|
|
46
|
+
nodeModulesPaths: defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver2 = defaultConfig.resolver) === null || _defaultConfig_resolver2 === void 0 ? void 0 : _defaultConfig_resolver2.nodeModulesPaths,
|
|
45
47
|
resolveRequest: function(context, moduleName, platform) {
|
|
46
|
-
var
|
|
47
|
-
var defaultResolveRequest = (defaultConfig === null || defaultConfig === void 0 ? void 0 : (
|
|
48
|
+
var _defaultConfig_resolver3;
|
|
49
|
+
var defaultResolveRequest = (defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver3 = defaultConfig.resolver) === null || _defaultConfig_resolver3 === void 0 ? void 0 : _defaultConfig_resolver3.resolveRequest) || context.resolveRequest;
|
|
48
50
|
if (moduleName === "react-native-worklets" || moduleName.startsWith("react-native-worklets/")) {
|
|
49
51
|
return defaultResolveRequest({
|
|
50
52
|
...context,
|
|
@@ -37,14 +37,16 @@ function buildOneMetroResolverOverrides(param) {
|
|
|
37
37
|
var emptyPath = require2.resolve("@vxrn/vite-plugin-metro/empty", { paths: [projectRoot] });
|
|
38
38
|
var projectPackagePath = import_path.default.join(projectRoot, "package.json");
|
|
39
39
|
return function(defaultConfig) {
|
|
40
|
-
var
|
|
40
|
+
var _ref;
|
|
41
|
+
var _defaultConfig_resolver, _defaultConfig_resolver1, _defaultConfig_resolver2;
|
|
41
42
|
var resolver = {
|
|
42
43
|
...defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.resolver,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
assetExts: [.../* @__PURE__ */ new Set([...(_ref = defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver = defaultConfig.resolver) === null || _defaultConfig_resolver === void 0 ? void 0 : _defaultConfig_resolver.assetExts) !== null && _ref !== void 0 ? _ref : [], "txt"])],
|
|
45
|
+
extraNodeModules: { ...defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver1 = defaultConfig.resolver) === null || _defaultConfig_resolver1 === void 0 ? void 0 : _defaultConfig_resolver1.extraNodeModules },
|
|
46
|
+
nodeModulesPaths: defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver2 = defaultConfig.resolver) === null || _defaultConfig_resolver2 === void 0 ? void 0 : _defaultConfig_resolver2.nodeModulesPaths,
|
|
45
47
|
resolveRequest: function(context, moduleName, platform) {
|
|
46
|
-
var
|
|
47
|
-
var defaultResolveRequest = (defaultConfig === null || defaultConfig === void 0 ? void 0 : (
|
|
48
|
+
var _defaultConfig_resolver3;
|
|
49
|
+
var defaultResolveRequest = (defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver3 = defaultConfig.resolver) === null || _defaultConfig_resolver3 === void 0 ? void 0 : _defaultConfig_resolver3.resolveRequest) || context.resolveRequest;
|
|
48
50
|
if (moduleName === "react-native-worklets" || moduleName.startsWith("react-native-worklets/")) {
|
|
49
51
|
return defaultResolveRequest({
|
|
50
52
|
...context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildOneMetroResolverOverrides.native.js","names":[],"sources":["cjs/metro-config/buildOneMetroResolverOverrides.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar buildOneMetroResolverOverrides_exports = {};\n__export(buildOneMetroResolverOverrides_exports, {\n buildOneMetroResolverOverrides: () => buildOneMetroResolverOverrides\n});\nmodule.exports = __toCommonJS(buildOneMetroResolverOverrides_exports);\nvar import_module = __toESM(require(\"module\"), 1);\nvar import_path = __toESM(require(\"path\"), 1);\nfunction buildOneMetroResolverOverrides(param) {\n var { projectRoot } = param;\n var require2 = import_module.default.createRequire(projectRoot + \"/\");\n var emptyPath = require2.resolve(\"@vxrn/vite-plugin-metro/empty\", {\n paths: [\n projectRoot\n ]\n });\n var projectPackagePath = import_path.default.join(projectRoot, \"package.json\");\n return function(defaultConfig) {\n var _defaultConfig_resolver, _defaultConfig_resolver1;\n var resolver = {\n ...defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.resolver,\n
|
|
1
|
+
{"version":3,"file":"buildOneMetroResolverOverrides.native.js","names":[],"sources":["cjs/metro-config/buildOneMetroResolverOverrides.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar buildOneMetroResolverOverrides_exports = {};\n__export(buildOneMetroResolverOverrides_exports, {\n buildOneMetroResolverOverrides: () => buildOneMetroResolverOverrides\n});\nmodule.exports = __toCommonJS(buildOneMetroResolverOverrides_exports);\nvar import_module = __toESM(require(\"module\"), 1);\nvar import_path = __toESM(require(\"path\"), 1);\nfunction buildOneMetroResolverOverrides(param) {\n var { projectRoot } = param;\n var require2 = import_module.default.createRequire(projectRoot + \"/\");\n var emptyPath = require2.resolve(\"@vxrn/vite-plugin-metro/empty\", {\n paths: [\n projectRoot\n ]\n });\n var projectPackagePath = import_path.default.join(projectRoot, \"package.json\");\n return function(defaultConfig) {\n var _ref;\n var _defaultConfig_resolver, _defaultConfig_resolver1, _defaultConfig_resolver2;\n var resolver = {\n ...defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.resolver,\n assetExts: [\n .../* @__PURE__ */ new Set([\n ...(_ref = defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver = defaultConfig.resolver) === null || _defaultConfig_resolver === void 0 ? void 0 : _defaultConfig_resolver.assetExts) !== null && _ref !== void 0 ? _ref : [],\n \"txt\"\n ])\n ],\n extraNodeModules: {\n ...defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver1 = defaultConfig.resolver) === null || _defaultConfig_resolver1 === void 0 ? void 0 : _defaultConfig_resolver1.extraNodeModules\n },\n nodeModulesPaths: defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver2 = defaultConfig.resolver) === null || _defaultConfig_resolver2 === void 0 ? void 0 : _defaultConfig_resolver2.nodeModulesPaths,\n resolveRequest: function(context, moduleName, platform) {\n var _defaultConfig_resolver3;\n var defaultResolveRequest = (defaultConfig === null || defaultConfig === void 0 ? void 0 : (_defaultConfig_resolver3 = defaultConfig.resolver) === null || _defaultConfig_resolver3 === void 0 ? void 0 : _defaultConfig_resolver3.resolveRequest) || context.resolveRequest;\n if (moduleName === \"react-native-worklets\" || moduleName.startsWith(\"react-native-worklets/\")) {\n return defaultResolveRequest({\n ...context,\n originModulePath: projectPackagePath\n }, moduleName, platform);\n }\n if (moduleName.endsWith(\".css\")) {\n return {\n type: \"sourceFile\",\n filePath: emptyPath\n };\n }\n if (/_middleware.tsx?$/.test(moduleName)) {\n return {\n type: \"sourceFile\",\n filePath: emptyPath\n };\n }\n if (/\\.server(\\.[jt]sx?)?$/.test(moduleName)) {\n return {\n type: \"sourceFile\",\n filePath: emptyPath\n };\n }\n if (moduleName === \"react-native-svg\") {\n var res = defaultResolveRequest(context, moduleName, platform);\n var svgSrcSuffix = `${import_path.default.sep}src${import_path.default.sep}index.ts`;\n if (res && \"filePath\" in res && res.filePath.includes(svgSrcSuffix)) {\n return {\n ...res,\n filePath: res.filePath.replace(svgSrcSuffix, `${import_path.default.sep}lib${import_path.default.sep}commonjs${import_path.default.sep}index.js`)\n };\n }\n return res;\n }\n var res1 = defaultResolveRequest(context, moduleName, platform);\n if (res1 && \"filePath\" in res1 && /\\.server\\.[jt]sx?$/.test(res1.filePath)) {\n return {\n type: \"sourceFile\",\n filePath: emptyPath\n };\n }\n return res1;\n }\n };\n return {\n ...defaultConfig,\n resolver\n };\n };\n}\n//# sourceMappingURL=buildOneMetroResolverOverrides.js.map\n"],"mappings":"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"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var appManifest_exports = {};
|
|
22
|
+
__export(appManifest_exports, { validateNativeApp: () => validateNativeApp });
|
|
23
|
+
module.exports = __toCommonJS(appManifest_exports);
|
|
24
|
+
const TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;
|
|
25
|
+
const SCHEME = /^[a-z][a-z0-9+.-]*$/i;
|
|
26
|
+
const VERSION = /^\d+\.\d+\.\d+/;
|
|
27
|
+
const REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
|
|
28
|
+
const DEPLOYMENT_TARGET = /^\d+\.\d+$/;
|
|
29
|
+
function fail(message) {
|
|
30
|
+
throw new Error(`[one] invalid native.app: ${message}`);
|
|
31
|
+
}
|
|
32
|
+
function validateNativeApp(manifest) {
|
|
33
|
+
if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
|
|
34
|
+
if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
|
|
35
|
+
if (!TARGET_NAME.test(manifest.name)) {
|
|
36
|
+
fail(`name "${manifest.name}" must start with a letter and contain only letters, digits, and underscore`);
|
|
37
|
+
}
|
|
38
|
+
const schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [manifest.scheme];
|
|
39
|
+
for (const scheme of schemes) {
|
|
40
|
+
if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
|
|
41
|
+
fail(`scheme "${scheme}" must be a valid uri scheme`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {
|
|
45
|
+
fail(`version "${manifest.version}" must start with major.minor.patch`);
|
|
46
|
+
}
|
|
47
|
+
if (manifest.ios !== void 0) {
|
|
48
|
+
if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {
|
|
49
|
+
fail(`ios.bundleId "${manifest.ios.bundleId}" must be reverse-dns`);
|
|
50
|
+
}
|
|
51
|
+
if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
|
|
52
|
+
fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (manifest.android !== void 0) {
|
|
56
|
+
if (!manifest.android.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {
|
|
57
|
+
fail(`android.applicationId "${manifest.android.applicationId}" must be reverse-dns`);
|
|
58
|
+
}
|
|
59
|
+
if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {
|
|
60
|
+
fail(`android.minSdk "${manifest.android.minSdk}" must be an integer from 21 to 36`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return manifest;
|
|
64
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var appManifest_exports = {};
|
|
24
|
+
__export(appManifest_exports, { validateNativeApp: () => validateNativeApp });
|
|
25
|
+
module.exports = __toCommonJS(appManifest_exports);
|
|
26
|
+
var TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;
|
|
27
|
+
var SCHEME = /^[a-z][a-z0-9+.-]*$/i;
|
|
28
|
+
var VERSION = /^\d+\.\d+\.\d+/;
|
|
29
|
+
var REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
|
|
30
|
+
var DEPLOYMENT_TARGET = /^\d+\.\d+$/;
|
|
31
|
+
function fail(message) {
|
|
32
|
+
throw new Error(`[one] invalid native.app: ${message}`);
|
|
33
|
+
}
|
|
34
|
+
function validateNativeApp(manifest) {
|
|
35
|
+
if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
|
|
36
|
+
if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
|
|
37
|
+
if (!TARGET_NAME.test(manifest.name)) {
|
|
38
|
+
fail(`name "${manifest.name}" must start with a letter and contain only letters, digits, and underscore`);
|
|
39
|
+
}
|
|
40
|
+
var schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [manifest.scheme];
|
|
41
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
42
|
+
try {
|
|
43
|
+
for (var _iterator = schemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
44
|
+
var scheme = _step.value;
|
|
45
|
+
if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
|
|
46
|
+
fail(`scheme "${scheme}" must be a valid uri scheme`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch (err) {
|
|
50
|
+
_didIteratorError = true;
|
|
51
|
+
_iteratorError = err;
|
|
52
|
+
} finally {
|
|
53
|
+
try {
|
|
54
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
55
|
+
_iterator.return();
|
|
56
|
+
}
|
|
57
|
+
} finally {
|
|
58
|
+
if (_didIteratorError) {
|
|
59
|
+
throw _iteratorError;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {
|
|
64
|
+
fail(`version "${manifest.version}" must start with major.minor.patch`);
|
|
65
|
+
}
|
|
66
|
+
if (manifest.ios !== void 0) {
|
|
67
|
+
if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {
|
|
68
|
+
fail(`ios.bundleId "${manifest.ios.bundleId}" must be reverse-dns`);
|
|
69
|
+
}
|
|
70
|
+
if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
|
|
71
|
+
fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (manifest.android !== void 0) {
|
|
75
|
+
if (!manifest.android.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {
|
|
76
|
+
fail(`android.applicationId "${manifest.android.applicationId}" must be reverse-dns`);
|
|
77
|
+
}
|
|
78
|
+
if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {
|
|
79
|
+
fail(`android.minSdk "${manifest.android.minSdk}" must be an integer from 21 to 36`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return manifest;
|
|
83
|
+
}
|