one 2.7.6 → 2.8.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/One.podspec +3 -0
- package/android/build.gradle +8 -1
- package/android/consumer-rules.pro +6 -0
- package/dist/cjs/Root.cjs +1 -1
- package/dist/cjs/Root.native.cjs +3 -3
- package/dist/cjs/Root.native.js +3 -3
- package/dist/cjs/Root.native.js.map +1 -1
- package/dist/cjs/cli/build.cjs +1 -1
- package/dist/cjs/cli/build.native.cjs +1 -1
- package/dist/cjs/cli/build.native.js +1 -1
- package/dist/cjs/cli/build.native.js.map +1 -1
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.cjs +1 -1
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.cjs +1 -1
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.js +1 -1
- package/dist/cjs/metro-config/buildOneMetroResolverOverrides.native.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.cjs +10 -4
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.cjs +10 -4
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js +10 -4
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/cjs/metro-config/withOne.cjs +2 -2
- package/dist/cjs/metro-config/withOne.native.cjs +2 -2
- package/dist/cjs/metro-config/withOne.native.js +2 -2
- package/dist/cjs/metro-config/withOne.native.js.map +1 -1
- package/dist/cjs/vite/one.cjs +5 -5
- package/dist/cjs/vite/one.native.cjs +5 -5
- package/dist/cjs/vite/one.native.js +5 -5
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/workerdDevPlugin.cjs +3 -3
- package/dist/cjs/vite/plugins/workerdDevPlugin.native.cjs +3 -3
- package/dist/cjs/vite/plugins/workerdDevPlugin.native.js +3 -3
- package/dist/cjs/vite/plugins/workerdDevPlugin.native.js.map +1 -1
- package/dist/esm/Root.mjs +1 -1
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +3 -3
- package/dist/esm/Root.native.js.map +1 -1
- package/dist/esm/cli/build.mjs +1 -1
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +1 -1
- package/dist/esm/cli/build.native.js.map +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.mjs +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.mjs.map +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.native.js +1 -1
- package/dist/esm/metro-config/buildOneMetroResolverOverrides.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs +10 -4
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js +10 -4
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/esm/metro-config/withOne.mjs +1 -1
- package/dist/esm/metro-config/withOne.mjs.map +1 -1
- package/dist/esm/metro-config/withOne.native.js +1 -1
- package/dist/esm/metro-config/withOne.native.js.map +1 -1
- package/dist/esm/vite/one.mjs +1 -1
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +1 -1
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/workerdDevPlugin.mjs +2 -2
- package/dist/esm/vite/plugins/workerdDevPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/workerdDevPlugin.native.js +2 -2
- package/dist/esm/vite/plugins/workerdDevPlugin.native.js.map +1 -1
- package/ios/PrivacyInfo.xcprivacy +52 -0
- package/metro-entry.js +1 -1
- package/package.json +79 -42
- package/src/Root.serverContext.test.tsx +52 -0
- package/src/Root.tsx +5 -3
- package/src/__tests__/polyfills-mobile-metro.test.ts +2 -2
- package/src/cli/build.ts +1 -1
- package/src/metro-config/buildOneMetroResolverOverrides.ts +1 -1
- package/src/metro-config/getViteMetroPluginOptions.integration.test.ts +5 -3
- package/src/metro-config/getViteMetroPluginOptions.ts +10 -4
- package/src/metro-config/withOne.ts +3 -1
- package/src/native/packedClosure.test.ts +68 -6
- package/src/native/shippedAndroid.test.ts +21 -0
- package/src/native/shippedArtifacts.test.ts +81 -0
- package/src/vite/one.ts +2 -1
- package/src/vite/plugins/workerdDevPlugin.ts +2 -2
- package/types/Frozen.d.ts +1 -1
- package/types/Frozen.d.ts.map +1 -1
- package/types/Frozen.native.d.ts +1 -1
- package/types/Frozen.native.d.ts.map +1 -1
- package/types/Root.d.ts +1 -1
- package/types/Root.d.ts.map +1 -1
- package/types/fallbackViews/Sitemap.d.ts +1 -1
- package/types/fallbackViews/Sitemap.d.ts.map +1 -1
- package/types/fallbackViews/Sitemap.web.d.ts +2 -1
- package/types/fallbackViews/Sitemap.web.d.ts.map +1 -1
- package/types/fallbackViews/Unmatched.d.ts +2 -1
- package/types/fallbackViews/Unmatched.d.ts.map +1 -1
- package/types/fallbackViews/Unmatched.web.d.ts +2 -1
- package/types/fallbackViews/Unmatched.web.d.ts.map +1 -1
- package/types/headless/Presentations.d.ts +1 -1
- package/types/headless/Presentations.d.ts.map +1 -1
- package/types/headless/keepMounted.d.ts +1 -1
- package/types/headless/keepMounted.d.ts.map +1 -1
- package/types/headless/useDrawer.d.ts +1 -1
- package/types/headless/useDrawer.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackScreen.d.ts +1 -1
- package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackToolbar.d.ts +1 -1
- package/types/layouts/stack-utils/StackToolbar.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackToolbarBottomHost.d.ts +1 -1
- package/types/layouts/stack-utils/StackToolbarBottomHost.d.ts.map +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
- package/types/metro-config/withOne.d.ts.map +1 -1
- package/types/platform/AndroidMenu.d.ts +2 -2
- package/types/platform/AndroidMenu.d.ts.map +1 -1
- package/types/platform/Animators.native.d.ts +2 -2
- package/types/platform/Animators.native.d.ts.map +1 -1
- package/types/platform/ArrangementView.d.ts +1 -1
- package/types/platform/ArrangementView.d.ts.map +1 -1
- package/types/platform/ArrangementView.native.d.ts +1 -1
- package/types/platform/ArrangementView.native.d.ts.map +1 -1
- package/types/platform/Containers.native.d.ts +34 -34
- package/types/platform/Containers.native.d.ts.map +1 -1
- package/types/platform/Menu.native.d.ts +2 -2
- package/types/platform/Menu.native.d.ts.map +1 -1
- package/types/platform/NavigationSplitView.native.d.ts +1 -1
- package/types/platform/NavigationSplitView.native.d.ts.map +1 -1
- package/types/platform/NavigationStack.native.d.ts +2 -2
- package/types/platform/NavigationStack.native.d.ts.map +1 -1
- package/types/platform/Pager.native.d.ts +1 -1
- package/types/platform/Pager.native.d.ts.map +1 -1
- package/types/platform/Popover.native.d.ts +1 -1
- package/types/platform/Popover.native.d.ts.map +1 -1
- package/types/platform/Sheet.native.d.ts +2 -2
- package/types/platform/Sheet.native.d.ts.map +1 -1
- package/types/platform/Tabs.native.d.ts +1 -1
- package/types/platform/Tabs.native.d.ts.map +1 -1
- package/types/platform/adaptive/ReservedRegions.d.ts +1 -1
- package/types/platform/adaptive/ReservedRegions.d.ts.map +1 -1
- package/types/platform/adaptive/ReservedRegions.native.d.ts +1 -1
- package/types/platform/adaptive/ReservedRegions.native.d.ts.map +1 -1
- package/types/platform/compose.android.d.ts +101 -101
- package/types/platform/compose.android.d.ts.map +1 -1
- package/types/platform/effects/Blur.d.ts +1 -1
- package/types/platform/effects/Blur.d.ts.map +1 -1
- package/types/platform/effects/Blur.native.d.ts +1 -1
- package/types/platform/effects/Blur.native.d.ts.map +1 -1
- package/types/platform/effects/EdgeFade.d.ts +1 -1
- package/types/platform/effects/EdgeFade.d.ts.map +1 -1
- package/types/platform/effects/EdgeFade.native.d.ts +1 -1
- package/types/platform/effects/EdgeFade.native.d.ts.map +1 -1
- package/types/platform/effects/Mask.d.ts +1 -1
- package/types/platform/effects/Mask.d.ts.map +1 -1
- package/types/platform/effects/Mask.native.d.ts +1 -1
- package/types/platform/effects/Mask.native.d.ts.map +1 -1
- package/types/platform/generated/Controls.native.d.ts +55 -55
- package/types/platform/generated/Controls.native.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +58 -58
- package/types/platform/menu/index.native.d.ts +1 -1
- package/types/platform/menu/index.native.d.ts.map +1 -1
- package/types/platform/native-source/view.native.d.ts +1 -1
- package/types/platform/native-source/view.native.d.ts.map +1 -1
- package/types/platform/split-view/split-view.d.ts +2 -2
- package/types/platform/split-view/split-view.d.ts.map +1 -1
- package/types/platform/split-view/split-view.native.d.ts +3 -3
- package/types/platform/split-view/split-view.native.d.ts.map +1 -1
- package/types/platform/swift/index.native.d.ts +1 -1
- package/types/platform/swift/index.native.d.ts.map +1 -1
- package/types/platform/toolbar/index.native.d.ts +2 -2
- package/types/platform/toolbar/index.native.d.ts.map +1 -1
- package/types/platform/ui/Icon.android.d.ts +1 -1
- package/types/platform/ui/Icon.android.d.ts.map +1 -1
- package/types/platform/ui/Image.d.ts +1 -1
- package/types/platform/ui/Image.d.ts.map +1 -1
- package/types/platform/ui/Image.native.d.ts +1 -1
- package/types/platform/ui/Image.native.d.ts.map +1 -1
- package/types/platform/ui/Map.android.d.ts +1 -1
- package/types/platform/ui/Map.android.d.ts.map +1 -1
- package/types/platform/ui/Map.ios.d.ts +1 -1
- package/types/platform/ui/Map.ios.d.ts.map +1 -1
- package/types/platform/ui/PictureInPicture.d.ts +1 -1
- package/types/platform/ui/PictureInPicture.d.ts.map +1 -1
- package/types/platform/ui/PictureInPicture.native.d.ts +1 -1
- package/types/platform/ui/PictureInPicture.native.d.ts.map +1 -1
- package/types/platform/ui/Portal.d.ts +2 -2
- package/types/platform/ui/Portal.d.ts.map +1 -1
- package/types/platform/ui/Portal.native.d.ts +2 -2
- package/types/platform/ui/Portal.native.d.ts.map +1 -1
- package/types/platform/universal/TextInput/index.android.d.ts +1 -1
- package/types/platform/universal/TextInput/index.android.d.ts.map +1 -1
- package/types/platform/universal/TextInput/index.d.ts +1 -1
- package/types/platform/universal/TextInput/index.d.ts.map +1 -1
- package/types/platform/universal/TextInput/index.ios.d.ts +1 -1
- package/types/platform/universal/TextInput/index.ios.d.ts.map +1 -1
- package/types/platform/web/DomView.d.ts +1 -1
- package/types/platform/web/DomView.d.ts.map +1 -1
- package/types/platform/zoom/index.native.d.ts +3 -3
- package/types/platform/zoom/index.native.d.ts.map +1 -1
- package/types/router/Route.d.ts +1 -1
- package/types/router/Route.d.ts.map +1 -1
- package/types/router/RouteInfoContext.d.ts +1 -1
- package/types/router/RouteInfoContext.d.ts.map +1 -1
- package/types/router/web/WebStackView.d.ts +1 -1
- package/types/router/web/WebStackView.d.ts.map +1 -1
- package/types/safe-area-context/NativeSafeAreaProvider.d.ts +1 -1
- package/types/safe-area-context/NativeSafeAreaProvider.d.ts.map +1 -1
- package/types/safe-area-context/NativeSafeAreaProvider.native.d.ts +2 -1
- package/types/safe-area-context/NativeSafeAreaProvider.native.d.ts.map +1 -1
- package/types/safe-area-context/SafeAreaContext.d.ts +1 -1
- package/types/safe-area-context/SafeAreaContext.d.ts.map +1 -1
- package/types/server/ServerContextScript.d.ts +1 -1
- package/types/server/ServerContextScript.d.ts.map +1 -1
- package/types/ui/TabList.d.ts +1 -1
- package/types/ui/TabList.d.ts.map +1 -1
- package/types/ui/TabSlot.d.ts +3 -3
- package/types/ui/TabSlot.d.ts.map +1 -1
- package/types/ui/TabTrigger.d.ts +1 -1
- package/types/ui/TabTrigger.d.ts.map +1 -1
- package/types/ui/Tabs.d.ts +1 -1
- package/types/ui/Tabs.d.ts.map +1 -1
- package/types/views/ErrorBoundary.d.ts +2 -1
- package/types/views/ErrorBoundary.d.ts.map +1 -1
- package/types/views/ErrorBoundary.web.d.ts +2 -1
- package/types/views/ErrorBoundary.web.d.ts.map +1 -1
- package/types/views/LoadProgressBar.d.ts +1 -1
- package/types/views/LoadProgressBar.d.ts.map +1 -1
- package/types/views/LoadProgressBar.web.d.ts +2 -1
- package/types/views/LoadProgressBar.web.d.ts.map +1 -1
- package/types/views/Navigator.d.ts +6 -6
- package/types/views/Navigator.d.ts.map +1 -1
- package/types/views/RootErrorBoundary.d.ts +1 -1
- package/types/views/RootErrorBoundary.d.ts.map +1 -1
- package/types/views/RootErrorBoundary.web.d.ts +1 -1
- package/types/views/RootErrorBoundary.web.d.ts.map +1 -1
- package/types/views/RouteErrorView.d.ts +1 -1
- package/types/views/RouteErrorView.d.ts.map +1 -1
- package/types/views/RouteErrorView.web.d.ts +1 -1
- package/types/views/RouteErrorView.web.d.ts.map +1 -1
- package/types/views/Try.d.ts +1 -1
- package/types/views/Try.d.ts.map +1 -1
- package/types/vite/DevHead.d.ts +1 -1
- package/types/vite/DevHead.d.ts.map +1 -1
- package/types/vite/one.d.ts.map +1 -1
package/One.podspec
CHANGED
|
@@ -33,6 +33,9 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
|
|
34
34
|
s.exclude_files = 'ios/Tests/**/*'
|
|
35
35
|
s.source_files = 'ios/**/*.{h,m,swift,mm,cpp}', 'cpp/**/*.{h,cpp}'
|
|
36
|
+
# required-reason api declarations (user defaults, boot time, file
|
|
37
|
+
# timestamps, disk space); xcode aggregates these into the app manifest.
|
|
38
|
+
s.resource_bundles = { 'One' => ['ios/PrivacyInfo.xcprivacy'] }
|
|
36
39
|
# c entries the app's bridging header imports without importing the one module.
|
|
37
40
|
# nitrogen appends its own public headers after these.
|
|
38
41
|
s.public_header_files = 'ios/Nitro/OneUpdatesLauncherBridge.h', 'ios/Nitro/OneLaunchScreen.h', 'ios/Nitro/OneBackgroundTasksBridge.h', 'ios/Nitro/OneAppIntentsBridge.h', 'ios/OneNativeSourceEventsBridge.h'
|
package/android/build.gradle
CHANGED
|
@@ -52,6 +52,7 @@ android {
|
|
|
52
52
|
defaultConfig {
|
|
53
53
|
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
54
54
|
targetSdkVersion safeExtGet("targetSdkVersion", 35)
|
|
55
|
+
consumerProguardFiles "consumer-rules.pro"
|
|
55
56
|
|
|
56
57
|
// worklets only builds the ABIs in reactNativeArchitectures. this
|
|
57
58
|
// library has to match, or a narrower app ABI still configures the
|
|
@@ -62,7 +63,13 @@ android {
|
|
|
62
63
|
}
|
|
63
64
|
externalNativeBuild {
|
|
64
65
|
cmake {
|
|
65
|
-
arguments "-DANDROID_STL=c++_shared"
|
|
66
|
+
arguments "-DANDROID_STL=c++_shared",
|
|
67
|
+
// 16 kb page sizes (play requires them past targetSdk 34):
|
|
68
|
+
// the pinned ndk 27 defaults to 4 kb, and react native's
|
|
69
|
+
// gradle plugin injects this flag into app modules only,
|
|
70
|
+
// never libraries, so without it libOne.so fails to load
|
|
71
|
+
// on 16 kb page devices.
|
|
72
|
+
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
|
66
73
|
// the prefab dependencies (worklets) build only these abis,
|
|
67
74
|
// so building more would link against nothing.
|
|
68
75
|
abiFilters(*reactNativeArchitectures())
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# kept for apps that build release with r8 (expo sdk 58 turns it on by default).
|
|
2
|
+
# nitro autolinking constructs each Hybrid* implementation from c++ by class
|
|
3
|
+
# name, so nothing in java references them and r8 would remove them.
|
|
4
|
+
-keep class com.margelo.nitro.one.Hybrid* { <init>(); }
|
|
5
|
+
# OneNativeSyncJni.cpp resolves this registry and its static methods by name.
|
|
6
|
+
-keep class dev.onejs.onenative.OneNativeSyncRegistry { public static *; }
|
package/dist/cjs/Root.cjs
CHANGED
|
@@ -52,8 +52,8 @@ function getCachedSSRLocation(path) {
|
|
|
52
52
|
return url;
|
|
53
53
|
}
|
|
54
54
|
const ServerAsyncLocalIDContext = (0, import_react.createContext)(null);
|
|
55
|
-
globalThis["__vxrnGetContextFromReactContext"] = () => (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
56
55
|
function Root(props) {
|
|
56
|
+
globalThis["__vxrnGetContextFromReactContext"] = () => (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
57
57
|
if (import_constants.isNative) {
|
|
58
58
|
(0, import_screensFeatureFlags.initScreensFeatureFlags)();
|
|
59
59
|
}
|
package/dist/cjs/Root.native.cjs
CHANGED
|
@@ -54,11 +54,11 @@ function getCachedSSRLocation(path) {
|
|
|
54
54
|
return url;
|
|
55
55
|
}
|
|
56
56
|
var ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);
|
|
57
|
-
globalThis["__vxrnGetContextFromReactContext"] = function() {
|
|
58
|
-
return (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
59
|
-
};
|
|
60
57
|
function Root(props) {
|
|
61
58
|
var _globalThis___vxrnrequestAsyncLocalStore;
|
|
59
|
+
globalThis["__vxrnGetContextFromReactContext"] = function() {
|
|
60
|
+
return (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
61
|
+
};
|
|
62
62
|
if (import_constants.isNative) {
|
|
63
63
|
(0, import_screensFeatureFlags.initScreensFeatureFlags)();
|
|
64
64
|
}
|
package/dist/cjs/Root.native.js
CHANGED
|
@@ -54,11 +54,11 @@ function getCachedSSRLocation(path) {
|
|
|
54
54
|
return url;
|
|
55
55
|
}
|
|
56
56
|
var ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);
|
|
57
|
-
globalThis["__vxrnGetContextFromReactContext"] = function() {
|
|
58
|
-
return (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
59
|
-
};
|
|
60
57
|
function Root(props) {
|
|
61
58
|
var _globalThis___vxrnrequestAsyncLocalStore;
|
|
59
|
+
globalThis["__vxrnGetContextFromReactContext"] = function() {
|
|
60
|
+
return (0, import_react.useContext)(ServerAsyncLocalIDContext);
|
|
61
|
+
};
|
|
62
62
|
if (import_constants.isNative) {
|
|
63
63
|
(0, import_screensFeatureFlags.initScreensFeatureFlags)();
|
|
64
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Root.native.js","names":[],"sources":["cjs/Root.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 Root_exports = {};\n__export(Root_exports, {\n Root: () => Root\n});\nmodule.exports = __toCommonJS(Root_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"./fork/theme\");\nvar import_color_scheme = require(\"@vxrn/color-scheme\");\nvar import_react = require(\"react\");\nvar import_constants = require(\"./constants\");\nvar import_screensFeatureFlags = require(\"./screensFeatureFlags\");\nvar import_SpaShellContext = require(\"./router/SpaShellContext\");\nvar import_NavigationContainer = require(\"./fork/NavigationContainer\");\nvar import_getURL = require(\"./getURL\");\nvar import_FlagsContext = require(\"./router/FlagsContext\");\nvar import_linkingConfig = require(\"./router/linkingConfig\");\nvar import_router = require(\"./router/router\");\nvar import_serverLocationContext = require(\"./router/serverLocationContext\");\nvar import_useInitializeOneRouter = require(\"./router/useInitializeOneRouter\");\nvar import_useViteRoutes = require(\"./router/useViteRoutes\");\nvar import_evictOldest = require(\"./utils/evictOldest\");\nvar import_useServerHeadInsertion = require(\"./useServerHeadInsertion\");\nvar import_PreloadLinks = require(\"./views/PreloadLinks\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nvar import_RootErrorBoundary = require(\"./views/RootErrorBoundary\");\nvar import_ScrollBehavior = require(\"./views/ScrollBehavior\");\nvar ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n var url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, (0, import_getURL.getURL)());\n (0, import_evictOldest.evictOldest)(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nvar ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nglobalThis[\"__vxrnGetContextFromReactContext\"] = function() {\n return (0, import_react.useContext)(ServerAsyncLocalIDContext);\n};\nfunction Root(props) {\n var _globalThis___vxrnrequestAsyncLocalStore;\n if (import_constants.isNative) {\n (0, import_screensFeatureFlags.initScreensFeatureFlags)();\n }\n var { path, routes, routeOptions, isClient, navigationContainerProps, onRenderId, linking } = props;\n var context = (0, import_useViteRoutes.useViteRoutes)(routes, props.routerRoot, routeOptions, globalThis[\"__vxrnVersion\"]);\n var location = import_constants.isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n var store = (0, import_useInitializeOneRouter.useInitializeOneRouter)(context, location, linking);\n var userScheme = (0, import_color_scheme.useUserScheme)();\n var Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n var id = (0, import_react.useId)();\n onRenderId === null || onRenderId === void 0 ? void 0 : onRenderId(id);\n var value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : ((_globalThis___vxrnrequestAsyncLocalStore = globalThis[\"__vxrnrequestAsyncLocalStore\"]) === null || _globalThis___vxrnrequestAsyncLocalStore === void 0 ? void 0 : _globalThis___vxrnrequestAsyncLocalStore.getStore()) || null;\n var deferredPreloads = props.deferredPreloads;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerAsyncLocalIDContext.Provider, {\n value,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_useServerHeadInsertion.ServerRenderID.Provider, {\n value: id,\n children: [\n typeof window === \"undefined\" && (deferredPreloads === null || deferredPreloads === void 0 ? void 0 : deferredPreloads.map(function(src) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n rel: \"modulepreload\",\n fetchPriority: \"low\",\n href: src\n }, src);\n })),\n /* one owns the safe area provider on every platform: apps read it\n through One.UI.SafeArea and never mount their own */\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_safe_area_context.SafeAreaProvider, {\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NavigationContainer.NavigationContainer, {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: (0, import_linkingConfig.getResolvedLinking)(),\n onUnhandledAction,\n onStateChange: import_router.handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? import_theme.DarkTheme : import_theme.DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {\n value: location,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {})\n })\n ]\n })\n })\n })\n }),\n typeof window !== \"undefined\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PreloadLinks.PreloadLinks, {}, \"preload-links\")\n ]\n })\n });\n if (props.flags) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FlagsContext.FlagsContext.Provider, {\n value: props.flags,\n children: contents\n });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.StrictMode, {\n children: contents\n });\n }\n if (isClient) {\n var _globalThis_SERVER_CONTEXT_KEY;\n var serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n if (serverMode === \"spa\") {\n var [show, setShow] = (0, import_react.useState)(false);\n (0, import_react.useLayoutEffect)(function() {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n var [isSpaShell, setIsSpaShell] = (0, import_react.useState)(true);\n (0, import_react.useLayoutEffect)(function() {\n setIsSpaShell(false);\n }, []);\n (0, import_react.useLayoutEffect)(function() {\n if (!isSpaShell) {\n var initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(function() {\n var _store_navigationRef;\n if (window.location.pathname + window.location.search !== initialPath) return;\n var nav = (_store_navigationRef = store.navigationRef) === null || _store_navigationRef === void 0 ? void 0 : _store_navigationRef.current;\n if (!nav) return;\n var linking2 = (0, import_linkingConfig.getResolvedLinking)();\n if (linking2 === null || linking2 === void 0 ? void 0 : linking2.getStateFromPath) {\n var freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [\n isSpaShell\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: isSpaShell,\n children: contents\n });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: true,\n children: contents\n });\n }\n return contents;\n}\nvar onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = function onUnhandledAction2(action) {\n var payload = action.payload;\n var message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload === null || payload === void 0 ? void 0 : payload.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = function onUnhandledAction2() {\n };\n}\n//# sourceMappingURL=Root.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,eAAe,CAAC;AACpB,SAAS,cAAc,EACrB,YAAY,KACd,CAAC;AACD,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,CAAC;CACH;CACA,OAAO;AACT;AACA,IAAI;AACJ,IAAI,QAAQ,IAAI,aAAa,cAAc;CACzC,oBAAoB,SAAS,mBAAmB,QAAQ;EACtD,IAAI,UAAU,OAAO;EACrB,IAAI,UAAU,eAAe,OAAO,KAAK,GAAG,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,MAAM,GAAG;EAC7G,QAAQ,OAAO,MAAf;GACE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;IACH,IAAI,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,MAAM;KAClE,WAAW;;6BAEQ,QAAQ,KAAK;IAClC,OAAO;KACL,WAAW;;;IAGb;IACA;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,oBAAoB,SAAS,qBAAqB,CAClD;AACF"}
|
|
1
|
+
{"version":3,"file":"Root.native.js","names":[],"sources":["cjs/Root.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 Root_exports = {};\n__export(Root_exports, {\n Root: () => Root\n});\nmodule.exports = __toCommonJS(Root_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"./fork/theme\");\nvar import_color_scheme = require(\"@vxrn/color-scheme\");\nvar import_react = require(\"react\");\nvar import_constants = require(\"./constants\");\nvar import_screensFeatureFlags = require(\"./screensFeatureFlags\");\nvar import_SpaShellContext = require(\"./router/SpaShellContext\");\nvar import_NavigationContainer = require(\"./fork/NavigationContainer\");\nvar import_getURL = require(\"./getURL\");\nvar import_FlagsContext = require(\"./router/FlagsContext\");\nvar import_linkingConfig = require(\"./router/linkingConfig\");\nvar import_router = require(\"./router/router\");\nvar import_serverLocationContext = require(\"./router/serverLocationContext\");\nvar import_useInitializeOneRouter = require(\"./router/useInitializeOneRouter\");\nvar import_useViteRoutes = require(\"./router/useViteRoutes\");\nvar import_evictOldest = require(\"./utils/evictOldest\");\nvar import_useServerHeadInsertion = require(\"./useServerHeadInsertion\");\nvar import_PreloadLinks = require(\"./views/PreloadLinks\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nvar import_RootErrorBoundary = require(\"./views/RootErrorBoundary\");\nvar import_ScrollBehavior = require(\"./views/ScrollBehavior\");\nvar ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n var url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, (0, import_getURL.getURL)());\n (0, import_evictOldest.evictOldest)(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nvar ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nfunction Root(props) {\n var _globalThis___vxrnrequestAsyncLocalStore;\n globalThis[\"__vxrnGetContextFromReactContext\"] = function() {\n return (0, import_react.useContext)(ServerAsyncLocalIDContext);\n };\n if (import_constants.isNative) {\n (0, import_screensFeatureFlags.initScreensFeatureFlags)();\n }\n var { path, routes, routeOptions, isClient, navigationContainerProps, onRenderId, linking } = props;\n var context = (0, import_useViteRoutes.useViteRoutes)(routes, props.routerRoot, routeOptions, globalThis[\"__vxrnVersion\"]);\n var location = import_constants.isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n var store = (0, import_useInitializeOneRouter.useInitializeOneRouter)(context, location, linking);\n var userScheme = (0, import_color_scheme.useUserScheme)();\n var Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n var id = (0, import_react.useId)();\n onRenderId === null || onRenderId === void 0 ? void 0 : onRenderId(id);\n var value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : ((_globalThis___vxrnrequestAsyncLocalStore = globalThis[\"__vxrnrequestAsyncLocalStore\"]) === null || _globalThis___vxrnrequestAsyncLocalStore === void 0 ? void 0 : _globalThis___vxrnrequestAsyncLocalStore.getStore()) || null;\n var deferredPreloads = props.deferredPreloads;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerAsyncLocalIDContext.Provider, {\n value,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_useServerHeadInsertion.ServerRenderID.Provider, {\n value: id,\n children: [\n typeof window === \"undefined\" && (deferredPreloads === null || deferredPreloads === void 0 ? void 0 : deferredPreloads.map(function(src) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n rel: \"modulepreload\",\n fetchPriority: \"low\",\n href: src\n }, src);\n })),\n /* one owns the safe area provider on every platform: apps read it\n through One.UI.SafeArea and never mount their own */\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_safe_area_context.SafeAreaProvider, {\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NavigationContainer.NavigationContainer, {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: (0, import_linkingConfig.getResolvedLinking)(),\n onUnhandledAction,\n onStateChange: import_router.handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? import_theme.DarkTheme : import_theme.DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {\n value: location,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {})\n })\n ]\n })\n })\n })\n }),\n typeof window !== \"undefined\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PreloadLinks.PreloadLinks, {}, \"preload-links\")\n ]\n })\n });\n if (props.flags) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FlagsContext.FlagsContext.Provider, {\n value: props.flags,\n children: contents\n });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.StrictMode, {\n children: contents\n });\n }\n if (isClient) {\n var _globalThis_SERVER_CONTEXT_KEY;\n var serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n if (serverMode === \"spa\") {\n var [show, setShow] = (0, import_react.useState)(false);\n (0, import_react.useLayoutEffect)(function() {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n var [isSpaShell, setIsSpaShell] = (0, import_react.useState)(true);\n (0, import_react.useLayoutEffect)(function() {\n setIsSpaShell(false);\n }, []);\n (0, import_react.useLayoutEffect)(function() {\n if (!isSpaShell) {\n var initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(function() {\n var _store_navigationRef;\n if (window.location.pathname + window.location.search !== initialPath) return;\n var nav = (_store_navigationRef = store.navigationRef) === null || _store_navigationRef === void 0 ? void 0 : _store_navigationRef.current;\n if (!nav) return;\n var linking2 = (0, import_linkingConfig.getResolvedLinking)();\n if (linking2 === null || linking2 === void 0 ? void 0 : linking2.getStateFromPath) {\n var freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [\n isSpaShell\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: isSpaShell,\n children: contents\n });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: true,\n children: contents\n });\n }\n return contents;\n}\nvar onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = function onUnhandledAction2(action) {\n var payload = action.payload;\n var message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload === null || payload === void 0 ? void 0 : payload.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = function onUnhandledAction2() {\n };\n}\n//# sourceMappingURL=Root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GX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,oBAAoB,SAAS,qBAAqB,CAClD;AACF"}
|
package/dist/cjs/cli/build.cjs
CHANGED
|
@@ -891,7 +891,7 @@ export default {
|
|
|
891
891
|
alias: [
|
|
892
892
|
{
|
|
893
893
|
find: /^react-native\/Libraries\/.*/,
|
|
894
|
-
replacement: (0, import_resolve.resolvePath)("@vxrn/
|
|
894
|
+
replacement: (0, import_resolve.resolvePath)("@vxrn/utils/empty", options.root)
|
|
895
895
|
},
|
|
896
896
|
{
|
|
897
897
|
find: /^(react-native\/asset-registry|@react-native\/assets-registry\/registry)$/,
|
|
@@ -1302,7 +1302,7 @@ export default {
|
|
|
1302
1302
|
alias: [
|
|
1303
1303
|
{
|
|
1304
1304
|
find: /^react-native\/Libraries\/.*/,
|
|
1305
|
-
replacement: (0, import_resolve.resolvePath)("@vxrn/
|
|
1305
|
+
replacement: (0, import_resolve.resolvePath)("@vxrn/utils/empty", options.root)
|
|
1306
1306
|
},
|
|
1307
1307
|
{
|
|
1308
1308
|
find: /^(react-native\/asset-registry|@react-native\/assets-registry\/registry)$/,
|
|
@@ -1302,7 +1302,7 @@ export default {
|
|
|
1302
1302
|
alias: [
|
|
1303
1303
|
{
|
|
1304
1304
|
find: /^react-native\/Libraries\/.*/,
|
|
1305
|
-
replacement: (0, import_resolve.resolvePath)("@vxrn/
|
|
1305
|
+
replacement: (0, import_resolve.resolvePath)("@vxrn/utils/empty", options.root)
|
|
1306
1306
|
},
|
|
1307
1307
|
{
|
|
1308
1308
|
find: /^(react-native\/asset-registry|@react-native\/assets-registry\/registry)$/,
|