one 2.6.4 → 2.6.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"assetRange.native.js","names":[],"sources":["esm/server/assetRange.native.js"],"sourcesContent":["async function withRange(request, response) {\n var range = request.headers.get(\"range\");\n if (!range || request.method !== \"GET\" || response.status !== 200 || response.headers.has(\"content-range\") || response.headers.has(\"content-encoding\")) {\n return response;\n }\n var match = /^bytes=(\\d*)-(\\d*)$/.exec(range.trim());\n if (!match || !match[1] && !match[2]) return response;\n var bytes = new Uint8Array(await response.arrayBuffer());\n var size = bytes.byteLength;\n var start;\n var end;\n if (!match[1]) {\n start = Math.max(0, size - Number(match[2]));\n end = size - 1;\n } else {\n start = Number(match[1]);\n end = match[2] ? Math.min(Number(match[2]), size - 1) : size - 1;\n }\n var headers = new Headers(response.headers);\n headers.set(\"accept-ranges\", \"bytes\");\n if (start >= size || start > end) {\n headers.set(\"content-range\", `bytes */${size}`);\n return new Response(null, {\n status: 416,\n headers\n });\n }\n headers.set(\"content-range\", `bytes ${start}-${end}/${size}`);\n headers.set(\"content-length\", String(end - start + 1));\n return new Response(bytes.subarray(start, end + 1), {\n status: 206,\n headers\n });\n}\nexport {\n withRange\n};\n//# sourceMappingURL=assetRange.js.map\n"],"mappings":";AAAA,eAAe,UAAU,SAAS,UAAU;CAC1C,IAAI,QAAQ,QAAQ,QAAQ,IAAI,OAAO;CACvC,IAAI,CAAC,SAAS,QAAQ,WAAW,SAAS,SAAS,WAAW,OAAO,SAAS,QAAQ,IAAI,eAAe,KAAK,SAAS,QAAQ,IAAI,kBAAkB,GAAG;EACtJ,OAAO;CACT;CACA,IAAI,QAAQ,sBAAsB,KAAK,MAAM,KAAK,CAAC;CACnD,IAAI,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,MAAM,IAAI,OAAO;CAC7C,IAAI,QAAQ,IAAI,WAAW,MAAM,SAAS,YAAY,CAAC;CACvD,IAAI,OAAO,MAAM;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI,CAAC,MAAM,IAAI;EACb,QAAQ,KAAK,IAAI,GAAG,OAAO,OAAO,MAAM,EAAE,CAAC;EAC3C,MAAM,OAAO;CACf,OAAO;EACL,QAAQ,OAAO,MAAM,EAAE;EACvB,MAAM,MAAM,KAAK,KAAK,IAAI,OAAO,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,OAAO;CACjE;CACA,IAAI,UAAU,IAAI,QAAQ,SAAS,OAAO;CAC1C,QAAQ,IAAI,iBAAiB,OAAO;CACpC,IAAI,SAAS,QAAQ,QAAQ,KAAK;EAChC,QAAQ,IAAI,iBAAiB,WAAW,MAAM;EAC9C,OAAO,IAAI,SAAS,MAAM;GACxB,QAAQ;GACR;EACF,CAAC;CACH;CACA,QAAQ,IAAI,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,MAAM;CAC5D,QAAQ,IAAI,kBAAkB,OAAO,MAAM,QAAQ,CAAC,CAAC;CACrD,OAAO,IAAI,SAAS,MAAM,SAAS,OAAO,MAAM,CAAC,GAAG;EAClD,QAAQ;EACR;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"assetRange.native.js","names":[],"sources":["esm/server/assetRange.native.js"],"sourcesContent":["async function withRange(request, response) {\n var range = request.headers.get(\"range\");\n if (!range || request.method !== \"GET\" || response.status !== 200 || !response.body || response.headers.has(\"content-range\") || response.headers.has(\"content-encoding\") || !ifRangeMatches(request.headers.get(\"if-range\"), response.headers)) {\n return response;\n }\n var match = /^bytes=(\\d*)-(\\d*)$/.exec(range.trim());\n if (!match || !match[1] && !match[2]) return response;\n var length = response.headers.get(\"content-length\");\n var known = length && /^\\d+$/.test(length) ? Number(length) : void 0;\n var headers = new Headers(response.headers);\n headers.set(\"accept-ranges\", \"bytes\");\n headers.delete(\"content-length\");\n var { size, kept, keptStart } = await readRange(response.body, match, known);\n var span = resolve(match, size);\n if (!span) {\n headers.set(\"content-range\", `bytes */${size}`);\n return new Response(null, {\n status: 416,\n headers\n });\n }\n headers.set(\"content-range\", `bytes ${span.start}-${span.end}/${size}`);\n headers.set(\"content-length\", String(span.end - span.start + 1));\n return new Response(kept.subarray(span.start - keptStart, span.end - keptStart + 1), {\n status: 206,\n headers\n });\n}\nfunction ifRangeMatches(ifRange, headers) {\n if (!ifRange) return true;\n var value = ifRange.trim();\n if (value.startsWith('\"')) {\n var etag = headers.get(\"etag\");\n return !!etag && !etag.startsWith(\"W/\") && etag === value;\n }\n if (value.startsWith(\"W/\")) return false;\n return headers.get(\"last-modified\") === value;\n}\nfunction resolve(match, size) {\n var start;\n var end;\n if (!match[1]) {\n start = Math.max(0, size - Number(match[2]));\n end = size - 1;\n } else {\n start = Number(match[1]);\n end = match[2] ? Math.min(Number(match[2]), size - 1) : size - 1;\n }\n if (start >= size || start > end) return;\n return {\n start,\n end\n };\n}\nasync function readRange(body, match, known) {\n var _resolve;\n var span = known === void 0 ? void 0 : (_resolve = resolve(match, known)) !== null && _resolve !== void 0 ? _resolve : {\n start: known,\n end: -1\n };\n var suffix = !span && !match[1] ? Number(match[2]) : 0;\n var from = span ? span.start : match[1] ? Number(match[1]) : 0;\n var to = span ? span.end : match[2] && match[1] ? Number(match[2]) : Number.POSITIVE_INFINITY;\n var chunks = [];\n var keptBytes = 0;\n var size = 0;\n var reader = body.getReader();\n while (known === void 0 || size <= to) {\n var { done, value } = await reader.read();\n if (done) break;\n var chunkStart = size;\n size += value.byteLength;\n if (suffix) {\n chunks.push(value);\n keptBytes += value.byteLength;\n while (chunks.length > 1 && keptBytes - chunks[0].byteLength >= suffix) {\n keptBytes -= chunks.shift().byteLength;\n }\n continue;\n }\n var lo = Math.max(from, chunkStart);\n var hi = Math.min(to + 1, size);\n if (hi > lo) {\n chunks.push(value.subarray(lo - chunkStart, hi - chunkStart));\n keptBytes += hi - lo;\n }\n }\n if (known !== void 0) {\n await reader.cancel();\n size = known;\n }\n var kept = new Uint8Array(keptBytes);\n var at = 0;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var chunk = _step.value;\n kept.set(chunk, at);\n at += chunk.byteLength;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return {\n size,\n kept,\n keptStart: suffix ? size - keptBytes : from\n };\n}\nexport {\n withRange\n};\n//# sourceMappingURL=assetRange.js.map\n"],"mappings":";AAAA,eAAe,UAAU,SAAS,UAAU;CAC1C,IAAI,QAAQ,QAAQ,QAAQ,IAAI,OAAO;CACvC,IAAI,CAAC,SAAS,QAAQ,WAAW,SAAS,SAAS,WAAW,OAAO,CAAC,SAAS,QAAQ,SAAS,QAAQ,IAAI,eAAe,KAAK,SAAS,QAAQ,IAAI,kBAAkB,KAAK,CAAC,eAAe,QAAQ,QAAQ,IAAI,UAAU,GAAG,SAAS,OAAO,GAAG;EAC9O,OAAO;CACT;CACA,IAAI,QAAQ,sBAAsB,KAAK,MAAM,KAAK,CAAC;CACnD,IAAI,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,MAAM,IAAI,OAAO;CAC7C,IAAI,SAAS,SAAS,QAAQ,IAAI,gBAAgB;CAClD,IAAI,QAAQ,UAAU,QAAQ,KAAK,MAAM,IAAI,OAAO,MAAM,IAAI,KAAK;CACnE,IAAI,UAAU,IAAI,QAAQ,SAAS,OAAO;CAC1C,QAAQ,IAAI,iBAAiB,OAAO;CACpC,QAAQ,OAAO,gBAAgB;CAC/B,IAAI,EAAE,MAAM,MAAM,cAAc,MAAM,UAAU,SAAS,MAAM,OAAO,KAAK;CAC3E,IAAI,OAAO,QAAQ,OAAO,IAAI;CAC9B,IAAI,CAAC,MAAM;EACT,QAAQ,IAA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ClB,MAAM,MAAM;EACd;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;EACL;EACA;EACA,WAAW,SAAS,OAAO,YAAY;CACzC;AACF"}
@@ -540,31 +540,45 @@ function one(options = {}) {
540
540
  ...dedupeSymlinks ? [ssrSymlinkDedupPlugin] : []
541
541
  ];
542
542
  const nativeWebDevAndProdPlugsin = [clientTreeShakePlugin({ routerRoot })];
543
+ let nativeFormPlugins = [];
544
+ const nativeFormPluginsCapture = {
545
+ name: "one:native-form-plugins",
546
+ configResolved(config) {
547
+ nativeFormPlugins = config.plugins.filter((plugin) => plugin.api?.vxrnNative);
548
+ }
549
+ };
543
550
  if (!nativeDisabled) {
544
551
  const viteBundlerOptions = nativeOptions?.bundler === "metro" ? void 0 : nativeOptions?.bundlerOptions;
545
- globalThis.__vxrnAddNativePlugins = (platform) => [
546
- backgroundComputationPlugin("native"),
547
- workletImportsPlugin({}),
548
- ...nativeApp ? [{
549
- name: "one:externalize-expo-for-native-app",
550
- resolveId(source) {
551
- if (/^(?:expo(?:-[^/]+)?|@expo\/[^/]+)(?:\/|$)/.test(source)) {
552
- return {
553
- id: source,
554
- external: true
555
- };
552
+ globalThis.__vxrnAddNativePlugins = (platform) => {
553
+ const listed = [
554
+ backgroundComputationPlugin("native"),
555
+ workletImportsPlugin({}),
556
+ ...nativeApp ? [{
557
+ name: "one:externalize-expo-for-native-app",
558
+ resolveId(source) {
559
+ if (/^(?:expo(?:-[^/]+)?|@expo\/[^/]+)(?:\/|$)/.test(source)) {
560
+ return {
561
+ id: source,
562
+ external: true
563
+ };
564
+ }
556
565
  }
557
- }
558
- }] : [],
559
- createAliasPlugin(withAbsorbedAliases(options.alias), platform),
560
- clientTreeShakePlugin({
561
- runtime: "rolldown",
562
- routerRoot
563
- }),
564
- ...viteBundlerOptions?.plugins ?? [],
565
- swiftPackagePlugin(platform, root),
566
- kotlinSourcePlugin(platform, root)
567
- ];
566
+ }] : [],
567
+ createAliasPlugin(withAbsorbedAliases(options.alias), platform),
568
+ clientTreeShakePlugin({
569
+ runtime: "rolldown",
570
+ routerRoot
571
+ }),
572
+ ...viteBundlerOptions?.plugins ?? []
573
+ ];
574
+ const listedNames = new Set(listed.map((plugin) => plugin.name));
575
+ return [
576
+ ...listed,
577
+ ...nativeFormPlugins.filter((plugin) => !listedNames.has(plugin.name)),
578
+ swiftPackagePlugin(platform, root),
579
+ kotlinSourcePlugin(platform, root)
580
+ ];
581
+ };
568
582
  globalThis.__vxrnNativeUserDefine = {
569
583
  ...viteBundlerOptions?.define,
570
584
  ...nativeAppName && {
@@ -610,6 +624,7 @@ function one(options = {}) {
610
624
  ...devAndProdPlugins,
611
625
  ...inspectorPlugins,
612
626
  ...nativeWebDevAndProdPlugsin,
627
+ ...nativeDisabled ? [] : [nativeFormPluginsCapture],
613
628
  createFileSystemRouterPlugin(options, routeIndex),
614
629
  generateFileSystemRouteTypesPlugin(options, routeIndex),
615
630
  fixDependenciesPlugin(options.patches),
@@ -1 +1 @@
1
- {"version":3,"file":"one.js","names":[],"sources":["esm/vite/one.js"],"sourcesContent":["import { configureVXRNCompilerPlugin } from \"@vxrn/compiler\";\nimport { resolvePath } from \"@vxrn/resolve\";\nimport { getPlatformEnvDefine } from \"@vxrn/vite-plugin-metro\";\nimport events from \"node:events\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { exactRegex } from \"rolldown/filter\";\nimport { normalizePath } from \"vite\";\nimport {\n autoDepOptimizePlugin,\n getOptionsFilled,\n loadEnv,\n nearestPackageJson,\n backgroundComputationPlugin,\n workletImportsPlugin\n} from \"vxrn\";\nimport vxrnVitePlugin from \"vxrn/vite-plugin\";\nimport { CACHE_KEY } from \"../constants\";\nimport { getViteMetroPluginOptions } from \"../metro-config/getViteMetroPluginOptions\";\nimport { setServerGlobals } from \"../server/setServerGlobals\";\nimport { getRouterRootFromOneOptions } from \"../utils/getRouterRootFromOneOptions\";\nimport { createRouteIndex } from \"../utils/routeIndex\";\nimport { absorbedPackageAliases } from \"../utils/absorbedPackages\";\nimport { ensureTSConfig } from \"./ensureTsConfig\";\nimport { setOneOptions } from \"./loadConfig\";\nimport { resolveNativeBundler } from \"./nativeBundler\";\nimport { bundledDevPlugin } from \"./plugins/bundledDevPlugin\";\nimport { clientTreeShakePlugin } from \"./plugins/clientTreeShakePlugin\";\nimport { createDevtoolsPlugin } from \"./plugins/devtoolsPlugin\";\nimport { createFileSystemRouterPlugin } from \"./plugins/fileSystemRouterPlugin\";\nimport { fixDependenciesPlugin } from \"./plugins/fixDependenciesPlugin\";\nimport { generateFileSystemRouteTypesPlugin } from \"./plugins/generateFileSystemRouteTypesPlugin\";\nimport { criticalCSSPlugin } from \"./plugins/criticalCSSPlugin\";\nimport { imageDataPlugin } from \"./plugins/imageDataPlugin\";\nimport { createRouteModuleHmrPlugin } from \"./plugins/routeModuleHmrPlugin\";\nimport { sourceInspectorPlugin } from \"./plugins/sourceInspectorPlugin\";\nimport { swiftPackagePlugin } from \"./plugins/swiftPackagePlugin\";\nimport { kotlinSourcePlugin } from \"./plugins/kotlinSourcePlugin\";\nimport { SSRCSSPlugin } from \"./plugins/SSRCSSPlugin\";\nimport { virtualEntryId } from \"./plugins/virtualEntryConstants\";\nimport { createVirtualEntry } from \"./plugins/virtualEntryPlugin\";\nimport { environmentGuardPlugin } from \"./plugins/environmentGuardPlugin\";\nimport { shouldEnableWorkerdDev } from \"./cloudflareWranglerConfig\";\nconst RN_DEEP_IMPORT_RE = /^react-native\\/Libraries\\/|react-native-web(-lite)?\\/.*\\/Libraries\\//;\nevents.setMaxListeners(1e3);\nglobalThis.__vxrnEnableNativeEnv = true;\nfunction one(options = {}) {\n setServerGlobals();\n const routerRoot = getRouterRootFromOneOptions(options);\n const nativeDisabled = options.native === false;\n const nativeOptions = options.native === false ? void 0 : options.native;\n const nativeAppName = nativeOptions?.app?.name || nativeOptions?.key;\n const nativeApp = nativeOptions?.app;\n const nativeAppVersion = nativeApp?.version;\n if (nativeDisabled) {\n globalThis.__vxrnEnableNativeEnv = false;\n }\n const metroOptions = (() => {\n if (nativeDisabled) return null;\n if (resolveNativeBundler({ bundler: nativeOptions?.bundler }) !== \"metro\") {\n const dropped = nativeOptions?.bundlerOptions;\n if (dropped?.babelConfig || dropped?.babelConfigOverrides) {\n console.warn(\n `[one] native.bundlerOptions configures babel plugins, but native.bundler is \"${nativeOptions?.bundler}\", which runs no babel. Those plugins will not run and whatever they were rewriting will reach the bundle untransformed.`\n );\n }\n return null;\n }\n if (process.env.ONE_METRO_MODE) {\n console.info(\"ONE_METRO_MODE environment variable is set, enabling Metro mode\");\n }\n const routerRoot2 = getRouterRootFromOneOptions(options);\n const defaultMetroOptions = getViteMetroPluginOptions({\n projectRoot: nativeOptions?.bundlerOptions?.argv?.projectRoot || process.cwd(),\n relativeRouterRoot: routerRoot2,\n ignoredRouteFiles: options.router?.ignoredRouteFiles,\n linking: options.router?.linking,\n userDefaultConfigOverrides: nativeOptions?.bundlerOptions?.defaultConfigOverrides,\n setupFile: options.setupFile\n });\n const userMetroOptions = nativeOptions?.bundlerOptions;\n const babelConfig = {\n ...defaultMetroOptions?.babelConfig,\n ...userMetroOptions?.babelConfig\n };\n return {\n ...defaultMetroOptions,\n ...userMetroOptions,\n defaultConfigOverrides: defaultMetroOptions?.defaultConfigOverrides,\n // defaultConfigOverrides is merged by getViteMetroPluginOptions, so we need to set it here again.\n argv: {\n ...defaultMetroOptions?.argv,\n ...userMetroOptions?.argv\n },\n babelConfig: {\n ...babelConfig,\n plugins: [\n ...babelConfig.plugins || [],\n ...options.react?.compiler === true || options.react?.compiler === \"native\" ? [\"babel-plugin-react-compiler\"] : []\n ]\n },\n mainModuleName: \"one/metro-entry\",\n // allow env var to enable lazy startup\n startup: process.env.ONE_METRO_LAZY ? \"lazy\" : userMetroOptions?.startup\n };\n })();\n const vxrnPlugins = [];\n if (!process.env.IS_VXRN_CLI) {\n console.warn(\"Experimental: running VxRN as a Vite plugin. This is not yet stable.\");\n vxrnPlugins.push(\n vxrnVitePlugin({\n metro: metroOptions,\n disableNative: nativeDisabled\n })\n );\n } else {\n if (!globalThis.__oneOptions) {\n setOneOptions(options);\n globalThis[\"__vxrnPluginConfig__\"] = options;\n globalThis[\"__vxrnMetroOptions__\"] = metroOptions;\n return [];\n }\n }\n if (options.config?.ensureTSConfig !== false) {\n void ensureTSConfig();\n }\n const vxrnOptions = getOptionsFilled();\n const root = vxrnOptions?.root || process.cwd();\n const compiler = options.react?.compiler;\n if (compiler) {\n configureVXRNCompilerPlugin({\n enableCompiler: (\n // pass through object config, regex, or function directly\n typeof compiler === \"object\" || typeof compiler === \"function\" ? compiler : compiler === \"native\" ? [\"ios\", \"android\"] : compiler === \"web\" ? [\"ssr\", \"client\"] : true\n )\n });\n }\n const autoDepsOptions = options.ssr?.autoDepsOptimization;\n const dedupeSymlinks = options.ssr?.dedupeSymlinkedModules ?? false;\n let ssrDedup_optimizedPackages = null;\n let ssrDedup_projectRoot = \"\";\n const ssrSymlinkDedupPlugin = {\n name: \"one:ssr-symlink-dedup\",\n enforce: \"pre\",\n configResolved(config) {\n if (!dedupeSymlinks) return;\n ssrDedup_projectRoot = config.root || process.cwd();\n const ssrInclude = config.ssr?.optimizeDeps?.include;\n if (!ssrInclude?.length) return;\n ssrDedup_optimizedPackages = /* @__PURE__ */ new Set();\n for (const entry of ssrInclude) {\n if (entry.startsWith(\"@\")) {\n const parts = entry.split(\"/\");\n ssrDedup_optimizedPackages.add(`${parts[0]}/${parts[1]}`);\n } else {\n ssrDedup_optimizedPackages.add(entry.split(\"/\")[0]);\n }\n }\n },\n async resolveId(source, importer, options2) {\n if (!dedupeSymlinks) return;\n if (source[0] === \".\" || source[0] === \"/\") return;\n let pkgName;\n let subpath = null;\n if (source.startsWith(\"@\")) {\n const parts = source.split(\"/\");\n pkgName = parts.length >= 2 ? `${parts[0]}/${parts[1]}` : source;\n if (parts.length > 2) subpath = `./${parts.slice(2).join(\"/\")}`;\n } else {\n const parts = source.split(\"/\");\n pkgName = parts[0];\n if (parts.length > 1) subpath = `./${parts.slice(1).join(\"/\")}`;\n }\n const resolved = await this.resolve(source, importer, {\n ...options2,\n skipSelf: true\n });\n if (!resolved?.id) return;\n if (resolved.id.includes(\"/node_modules/\")) return;\n const path2 = await import(\"node:path\");\n const fs = await import(\"node:fs\");\n const { join, dirname } = path2;\n const { realpathSync, existsSync: existsSync2, readFileSync: readFileSync2 } = fs;\n let dir = ssrDedup_projectRoot;\n while (dir !== dirname(dir)) {\n const nmPkgDir = join(dir, \"node_modules\", pkgName);\n if (existsSync2(nmPkgDir)) {\n if (subpath) {\n try {\n const pkg = JSON.parse(readFileSync2(join(nmPkgDir, \"package.json\"), \"utf8\"));\n const exportEntry = pkg.exports?.[subpath];\n if (exportEntry && typeof exportEntry === \"object\") {\n const target = exportEntry.import || exportEntry.module || exportEntry.default;\n if (target) {\n const fullPath = join(nmPkgDir, target);\n if (existsSync2(fullPath))\n return { id: normalizePath(fullPath), external: resolved.external };\n }\n }\n } catch {\n }\n }\n const realPkgDir = normalizePath(realpathSync(nmPkgDir));\n if (resolved.id.startsWith(realPkgDir)) {\n const relativePart = resolved.id.slice(realPkgDir.length);\n return {\n id: normalizePath(nmPkgDir) + relativePart,\n external: resolved.external\n };\n }\n break;\n }\n dir = dirname(dir);\n }\n }\n };\n const withAbsorbedAliases = (alias) => {\n const root2 = process.cwd();\n return {\n ...alias,\n native: { ...absorbedPackageAliases(root2, \"native\"), ...alias?.native }\n };\n };\n const createAliasPlugin = (alias, nativePlatform) => {\n const resolveMap = (map) => {\n if (!map) return null;\n const out = {};\n for (const [key, value] of Object.entries(map)) {\n try {\n out[key] = path.isAbsolute(value) ? value : resolvePath(value);\n } catch {\n out[key] = value;\n }\n }\n return out;\n };\n const resolved = {\n web: resolveMap(alias.web),\n native: resolveMap(alias.native),\n client: resolveMap(alias.client),\n ssr: resolveMap(alias.ssr),\n ios: resolveMap(alias.ios),\n android: resolveMap(alias.android)\n };\n const aliasKeys = [\n ...new Set(Object.values(resolved).flatMap((m) => m ? Object.keys(m) : []))\n ];\n const aliasFilter = aliasKeys.length ? new RegExp(\n `^(?:${aliasKeys.map((k) => k.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\")})$`\n ) : /(?!)/;\n return {\n name: \"one:alias\",\n enforce: \"pre\",\n // vite's dep optimizer resolves its include list without plugins, so the\n // absorbed packages also go in resolve.alias, which only web resolves with\n config: nativePlatform ? void 0 : () => ({\n resolve: {\n alias: Object.entries(absorbedPackageAliases(process.cwd(), \"web\")).map(\n ([name, replacement]) => ({ find: new RegExp(`^${name}$`), replacement })\n )\n }\n }),\n resolveId: {\n filter: { id: aliasFilter },\n handler(source) {\n const env = nativePlatform ?? this.environment?.name;\n const specific = env ? resolved[env] : null;\n if (specific && source in specific) {\n const id = specific[source];\n return {\n id,\n external: false,\n packageJsonPath: nearestPackageJson(id)\n };\n }\n const isWeb = !env || env === \"client\" || env === \"ssr\";\n const general = isWeb ? resolved.web : resolved.native;\n if (general && source in general) {\n const id = general[source];\n return {\n id,\n external: false,\n packageJsonPath: nearestPackageJson(id)\n };\n }\n }\n }\n };\n };\n const devAndProdPlugins = [\n {\n name: \"one:config\",\n __get: options\n },\n {\n name: \"one:env-prefix\",\n config(userConfig) {\n if (userConfig.envPrefix) return;\n return {\n envPrefix: [\"VITE_\", \"ONE_PUBLIC_\", \"EXPO_PUBLIC_\"]\n };\n }\n },\n bundledDevPlugin(!!options.web?.experimentalBundledDev),\n environmentGuardPlugin(options.environmentGuards),\n criticalCSSPlugin(),\n imageDataPlugin(),\n {\n name: \"one-define-client-env\",\n async config(userConfig, env) {\n const clientEnvDefine = options.skipEnv ? {} : (await loadEnv(\n vxrnOptions?.mode ?? userConfig?.mode ?? env?.mode ?? \"development\",\n process.cwd(),\n userConfig?.envPrefix\n )).clientEnvDefine;\n return {\n define: {\n ...clientEnvDefine,\n ...process.env.ONE_DEBUG_ROUTER && {\n \"process.env.ONE_DEBUG_ROUTER\": JSON.stringify(\n process.env.ONE_DEBUG_ROUTER\n )\n }\n }\n };\n }\n },\n ...autoDepsOptions === false ? [] : [\n autoDepOptimizePlugin({\n onScannedDeps({ hasReanimated, hasNativewind }) {\n configureVXRNCompilerPlugin({\n enableReanimated: hasReanimated,\n enableNativeCSS: nativeOptions?.css ?? hasNativewind,\n enableNativewind: hasNativewind\n });\n },\n root,\n include: /node_modules/,\n ...autoDepsOptions === true ? {} : autoDepsOptions\n })\n ],\n ...options.config?.tsConfigPaths === false ? [] : [\n (() => {\n let mappings = [];\n function loadMappings(resolvedRoot) {\n try {\n const configPath = path.resolve(resolvedRoot, \"tsconfig.json\");\n if (!existsSync(configPath)) return;\n const raw = readFileSync(configPath, \"utf-8\");\n const stripped = raw.replace(\n /\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g,\n (m, g) => g ? \"\" : m\n );\n const config = JSON.parse(stripped);\n const paths = config?.compilerOptions?.paths;\n const baseUrl = config?.compilerOptions?.baseUrl || \".\";\n if (!paths) return;\n for (const [pattern, targets] of Object.entries(\n paths\n )) {\n const target = targets[0];\n if (!target) continue;\n if (pattern.endsWith(\"/*\")) {\n const resolved = path.resolve(\n resolvedRoot,\n baseUrl,\n target.slice(0, -1)\n );\n mappings.push({\n prefix: pattern.slice(0, -1),\n replacement: resolved.endsWith(\"/\") ? resolved : resolved + \"/\",\n wildcard: true\n });\n } else {\n mappings.push({\n prefix: pattern,\n replacement: path.resolve(resolvedRoot, baseUrl, target),\n wildcard: false\n });\n }\n }\n } catch {\n }\n }\n loadMappings(root);\n const tsconfigPathsFilter = mappings.length ? new RegExp(\n mappings.map(\n (m) => `^${m.prefix.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}${m.wildcard ? \"\" : \"$\"}`\n ).join(\"|\")\n ) : /^[^./]/;\n return {\n name: \"one:tsconfig-paths\",\n enforce: \"pre\",\n config() {\n return {\n resolve: { tsconfigPaths: true }\n };\n },\n configResolved(config) {\n if (mappings.length === 0) {\n loadMappings(config.root);\n }\n },\n resolveId: {\n filter: { id: tsconfigPathsFilter },\n handler(source) {\n const resolved = (id) => ({\n id,\n packageJsonPath: nearestPackageJson(id)\n });\n const jsExts = [\n \".ts\",\n \".tsx\",\n \".js\",\n \".jsx\",\n \".mts\",\n \".mjs\",\n \".cjs\",\n \".cts\"\n ];\n for (const m of mappings) {\n let candidate;\n if (m.wildcard) {\n if (source.startsWith(m.prefix)) {\n candidate = m.replacement + source.slice(m.prefix.length);\n }\n } else if (source === m.prefix) {\n candidate = m.replacement;\n }\n if (!candidate) continue;\n if (jsExts.includes(path.extname(candidate)))\n return resolved(candidate);\n for (const e of jsExts) {\n if (existsSync(candidate + e)) return resolved(candidate + e);\n }\n for (const e of jsExts) {\n if (existsSync(candidate + \"/index\" + e))\n return resolved(candidate + \"/index\" + e);\n }\n return resolved(candidate);\n }\n }\n }\n };\n })()\n ],\n createAliasPlugin(withAbsorbedAliases(options.alias)),\n {\n // rolldown fails on deep react-native/Libraries/* imports during dep pre-bundling.\n // these are native-only paths that don't exist in react-native-web.\n name: \"one:redirect-rn-deep-imports\",\n enforce: \"pre\",\n // rust-side filter matching the two source patterns below, so the ~24k\n // non-matching imports in a build never enter js at all\n resolveId: {\n filter: { id: RN_DEEP_IMPORT_RE },\n handler(source) {\n if (this.environment?.name === \"client\" || this.environment?.name === \"ssr\" || this.environment?.name === \"worker\") {\n return \"\\0rn-empty-module\";\n }\n }\n },\n load: {\n filter: { id: exactRegex(\"\\0rn-empty-module\") },\n handler() {\n return \"export default {}; export {};\";\n }\n }\n },\n {\n name: \"one-aliases\",\n enforce: \"pre\",\n config() {\n let tslibLitePath = \"\";\n try {\n tslibLitePath = resolvePath(\"@vxrn/tslib-lite\", process.cwd());\n } catch (err) {\n console.info(`Can't find tslib-lite, falling back to tslib`);\n if (process.env.DEBUG) {\n console.error(err);\n }\n }\n return {\n resolve: {\n alias: {\n // testing getting transition between routes working\n // 'use-sync-external-store/with-selector': resolvePath(\n // 'use-sync-external-store/shim/with-selector'\n // ),\n ...tslibLitePath && {\n tslib: tslibLitePath\n }\n }\n }\n };\n }\n },\n {\n name: \"one:init-config\",\n config() {\n const setupFileDefines = (() => {\n if (!options.setupFile) return {};\n let setupFiles;\n if (typeof options.setupFile === \"string\") {\n setupFiles = {\n client: options.setupFile,\n server: options.setupFile,\n ios: options.setupFile,\n android: options.setupFile\n };\n } else if (\"native\" in options.setupFile) {\n setupFiles = {\n client: options.setupFile.client,\n server: options.setupFile.server,\n ios: options.setupFile.native,\n android: options.setupFile.native\n };\n } else {\n setupFiles = options.setupFile;\n }\n return {\n ...setupFiles.client && {\n \"process.env.ONE_SETUP_FILE_CLIENT\": JSON.stringify(setupFiles.client)\n },\n ...setupFiles.server && {\n \"process.env.ONE_SETUP_FILE_SERVER\": JSON.stringify(setupFiles.server)\n },\n ...setupFiles.ios && {\n \"process.env.ONE_SETUP_FILE_IOS\": JSON.stringify(setupFiles.ios)\n },\n ...setupFiles.android && {\n \"process.env.ONE_SETUP_FILE_ANDROID\": JSON.stringify(setupFiles.android)\n }\n };\n })();\n const serverURL = process.env.ONE_SERVER_URL || vxrnOptions?.server.url;\n return {\n // Platform env defined at root level for client (workaround for Vite bug with environment.client.define)\n define: {\n ...getPlatformEnvDefine(\"client\"),\n ...setupFileDefines,\n ...options.web?.defaultRenderMode && {\n \"process.env.ONE_DEFAULT_RENDER_MODE\": JSON.stringify(\n options.web.defaultRenderMode\n ),\n \"import.meta.env.ONE_DEFAULT_RENDER_MODE\": JSON.stringify(\n options.web.defaultRenderMode\n )\n },\n ...process.env.NODE_ENV !== \"production\" && serverURL && {\n \"process.env.ONE_SERVER_URL\": JSON.stringify(serverURL),\n \"import.meta.env.ONE_SERVER_URL\": JSON.stringify(serverURL)\n },\n ...options.web?.linkPrefetch && {\n \"process.env.ONE_LINK_PREFETCH\": JSON.stringify(options.web.linkPrefetch)\n },\n ...options.web?.skewProtection !== void 0 && {\n \"process.env.ONE_SKEW_PROTECTION\": JSON.stringify(\n options.web.skewProtection === true ? \"true\" : options.web.skewProtection === false ? \"false\" : options.web.skewProtection\n // 'proactive'\n )\n },\n ...options.web?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES\": JSON.stringify(\n options.web.suspendRoutes ? \"1\" : \"0\"\n )\n }\n },\n environments: {\n ssr: {\n define: getPlatformEnvDefine(\"ssr\")\n },\n ios: {\n define: {\n ...getPlatformEnvDefine(\"ios\"),\n ...nativeOptions?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES_NATIVE\": JSON.stringify(\n nativeOptions.suspendRoutes ? \"1\" : \"0\"\n )\n }\n }\n },\n android: {\n define: {\n ...getPlatformEnvDefine(\"android\"),\n ...nativeOptions?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES_NATIVE\": JSON.stringify(\n nativeOptions.suspendRoutes ? \"1\" : \"0\"\n )\n }\n }\n }\n },\n ssr: {\n // ensure server-only/client-only go through vite so our environmentGuardPlugin can handle them\n noExternal: [\"server-only\", \"client-only\"]\n }\n };\n }\n },\n {\n name: \"one:tamagui\",\n config() {\n return {\n define: {\n // safe to set because it only affects web in tamagui, and one is always react 19\n \"process.env.TAMAGUI_REACT_19\": '\"1\"'\n },\n environments: {\n ssr: {\n define: {\n \"process.env.TAMAGUI_IS_SERVER\": '\"1\"',\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n },\n ios: {\n define: {\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n },\n android: {\n define: {\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n }\n }\n };\n }\n },\n createRouteModuleHmrPlugin(routerRoot),\n // Plugins may transform the source code and add imports of `react/jsx-dev-runtime`, which won't be discovered by Vite's initial `scanImports` since the implementation is using ESbuild where such plugins are not executed.\n // Thus, if the project has a valid `react/jsx-dev-runtime` import, we tell Vite to optimize it, so Vite won't only discover it on the next page load and trigger a full reload.\n {\n name: \"one:optimize-dev-deps\",\n config(_, env) {\n if (env.mode === \"development\") {\n return {\n optimizeDeps: {\n include: [\"react/jsx-dev-runtime\", \"react/compiler-runtime\"]\n }\n };\n }\n }\n },\n {\n name: \"one:remove-server-from-client\",\n enforce: \"pre\",\n // both conditions are rust-side: only one-server-only modules that\n // actually contain the import cross into js\n transform: {\n filter: {\n id: /one-server-only/,\n code: 'import { AsyncLocalStorage } from \"node:async_hooks\"'\n },\n handler(code) {\n if (this.environment.name !== \"client\") return;\n return code.replace(\n `import { AsyncLocalStorage } from \"node:async_hooks\"`,\n `class AsyncLocalStorage {}`\n );\n }\n }\n },\n // packages in resolve.dedupe must also be pre-bundled for SSR to prevent\n // duplicate module instances (e.g. symlinked monorepo packages resolving\n // to different paths)\n {\n name: \"one:ssr-dedupe-prebundle\",\n config(config) {\n if (!dedupeSymlinks) return;\n const dedupeList = config.resolve?.dedupe;\n if (!Array.isArray(dedupeList) || dedupeList.length === 0) return;\n return {\n ssr: {\n optimizeDeps: {\n include: [...dedupeList]\n },\n noExternal: [...dedupeList]\n }\n };\n }\n },\n // fix: vite's ssr dep optimizer registers pre-bundled deps by their\n // node_modules path, but symlinks cause imports to resolve to the real\n // (source) path. the optimizer doesn't recognize the real path, so it\n // loads from source — creating a duplicate instance.\n // this plugin forces optimized SSR deps to resolve via node_modules.\n // off by default, and every hook bails on `!dedupeSymlinks`, so skip\n // registering it entirely rather than paying a napi round trip per import\n ...dedupeSymlinks ? [ssrSymlinkDedupPlugin] : []\n ];\n const nativeWebDevAndProdPlugsin = [clientTreeShakePlugin({ routerRoot })];\n if (!nativeDisabled) {\n const viteBundlerOptions = nativeOptions?.bundler === \"metro\" ? void 0 : nativeOptions?.bundlerOptions;\n globalThis.__vxrnAddNativePlugins = (platform) => [\n backgroundComputationPlugin(\"native\"),\n workletImportsPlugin({}),\n ...nativeApp ? [\n {\n name: \"one:externalize-expo-for-native-app\",\n resolveId(source) {\n if (/^(?:expo(?:-[^/]+)?|@expo\\/[^/]+)(?:\\/|$)/.test(source)) {\n return { id: source, external: true };\n }\n }\n }\n ] : [],\n createAliasPlugin(withAbsorbedAliases(options.alias), platform),\n clientTreeShakePlugin({ runtime: \"rolldown\", routerRoot }),\n ...viteBundlerOptions?.plugins ?? [],\n // last, so an app plugin that compiles .swift itself (a simulator) wins\n swiftPackagePlugin(platform, root),\n kotlinSourcePlugin(platform, root)\n ];\n globalThis.__vxrnNativeUserDefine = {\n ...viteBundlerOptions?.define,\n ...nativeAppName && {\n \"process.env.ONE_APP_NAME\": JSON.stringify(nativeAppName),\n \"import.meta.env.ONE_APP_NAME\": JSON.stringify(nativeAppName)\n }\n };\n }\n globalThis.__vxrnAddWebPluginsProd = devAndProdPlugins;\n const flags = {};\n const routeIndex = createRouteIndex({\n routerRoot: path.resolve(root, routerRoot),\n ignoredRouteFiles: options.router?.ignoredRouteFiles\n });\n if (!nativeDisabled) {\n globalThis.__vxrnNativeEntryConfig = {\n routerRoot,\n ignoredRouteFiles: options.router?.ignoredRouteFiles,\n linking: options.router?.linking,\n setupFile: options.setupFile,\n flags,\n app: nativeApp\n };\n }\n const inspectorPlugins = (() => {\n const devtools = options.devtools ?? true;\n const inspector = devtools === true || devtools !== false && (devtools.inspector ?? true);\n const editor = devtools !== true && devtools !== false ? devtools.editor : void 0;\n return inspector ? sourceInspectorPlugin({ editor }) : [];\n })();\n const workerdDevPlugins = shouldEnableWorkerdDev(options.web?.deploy, root) ? import(\"./plugins/workerdDevPlugin\").then(\n ({ createWorkerdDevPlugins }) => createWorkerdDevPlugins(options, root, routeIndex)\n ) : [];\n return [\n backgroundComputationPlugin(\"web\"),\n {\n name: \"one:background-worker-build\",\n config(config) {\n const plugins = config.worker?.plugins;\n return {\n worker: {\n plugins: () => [...plugins?.() ?? [], backgroundComputationPlugin(\"web\")]\n }\n };\n }\n },\n workerdDevPlugins,\n ...vxrnPlugins,\n ...devAndProdPlugins,\n ...inspectorPlugins,\n ...nativeWebDevAndProdPlugsin,\n /**\n * This is really the meat of one, where it handles requests:\n */\n createFileSystemRouterPlugin(options, routeIndex),\n generateFileSystemRouteTypesPlugin(options, routeIndex),\n fixDependenciesPlugin(options.patches),\n createVirtualEntry({\n ...options,\n flags,\n root: routerRoot,\n routeIndex\n }),\n {\n name: \"one-define-environment\",\n config() {\n return {\n define: {\n ...nativeAppName && {\n \"process.env.ONE_APP_NAME\": JSON.stringify(nativeAppName),\n \"import.meta.env.ONE_APP_NAME\": JSON.stringify(nativeAppName)\n },\n ...nativeAppVersion && {\n \"process.env.ONE_APP_VERSION\": JSON.stringify(nativeAppVersion),\n \"import.meta.env.ONE_APP_VERSION\": JSON.stringify(nativeAppVersion)\n },\n \"process.env.ONE_CACHE_KEY\": JSON.stringify(CACHE_KEY),\n \"import.meta.env.ONE_CACHE_KEY\": JSON.stringify(CACHE_KEY)\n }\n };\n }\n },\n SSRCSSPlugin({\n entries: [virtualEntryId]\n }),\n // devtools (always includes refresh preamble for HMR, optionally includes UI)\n ...(() => {\n const devtools = options.devtools ?? true;\n const includeUI = devtools !== false;\n return [\n // always include devtools plugin for refresh preamble (required for HMR)\n createDevtoolsPlugin({ includeUI })\n ];\n })()\n ];\n}\nexport {\n one\n};\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,oBAAoB;AAC1B,OAAO,gBAAgB,GAAG;AAC1B,WAAW,wBAAwB;AACnC,SAAS,IAAI,UAAU,CAAC,GAAG;CACzB,iBAAiB;CACjB,MAAM,aAAa,4BAA4B,OAAO;CACtD,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,MAAM,gBAAgB,QAAQ,WAAW,QAAQ,KAAK,I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K;EACjC;GACE,MAAM;GACN,OAAO,QAAQ;IACb,MAAM,UAAU,OAAO,QAAQ;IAC/B,OAAO,EACL,QAAQ,EACN,eAAe,CAAC,GAAG,UAAU,KAAK,CAAC,GAAG,4BAA4B,KAAK,CAAC,EAC1E,EACF;GACF;EACF;EACA;EACA,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EAIH,6BAA6B,SAAS,UAAU;EAChD,mCAAmC,SAAS,UAAU;EACtD,sBAAsB,QAAQ,OAAO;EACrC,mBAAmB;GACjB,GAAG;GACH;GACA,MAAM;GACN;EACF,CAAC;EACD;GACE,MAAM;GACN,SAAS;IACP,OAAO,EACL,QAAQ;KACN,GAAG,iBAAiB;MAClB,4BAA4B,KAAK,UAAU,aAAa;MACxD,gCAAgC,KAAK,UAAU,aAAa;KAC9D;KACA,GAAG,oBAAoB;MACrB,+BAA+B,KAAK,UAAU,gBAAgB;MAC9D,mCAAmC,KAAK,UAAU,gBAAgB;KACpE;KACA,6BAA6B,KAAK,UAAU,SAAS;KACrD,iCAAiC,KAAK,UAAU,SAAS;IAC3D,EACF;GACF;EACF;EACA,aAAa,EACX,SAAS,CAAC,cAAc,EAC1B,CAAC;EAED,UAAU;GACR,MAAM,WAAW,QAAQ,YAAY;GACrC,MAAM,YAAY,aAAa;GAC/B,OAAO,CAEL,qBAAqB,EAAE,UAAU,CAAC,CACpC;EACF,EAAC,CAAE;CACL;AACF"}
1
+ {"version":3,"file":"one.js","names":[],"sources":["esm/vite/one.js"],"sourcesContent":["import { configureVXRNCompilerPlugin } from \"@vxrn/compiler\";\nimport { resolvePath } from \"@vxrn/resolve\";\nimport { getPlatformEnvDefine } from \"@vxrn/vite-plugin-metro\";\nimport events from \"node:events\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { exactRegex } from \"rolldown/filter\";\nimport { normalizePath } from \"vite\";\nimport {\n autoDepOptimizePlugin,\n getOptionsFilled,\n loadEnv,\n nearestPackageJson,\n backgroundComputationPlugin,\n workletImportsPlugin\n} from \"vxrn\";\nimport vxrnVitePlugin from \"vxrn/vite-plugin\";\nimport { CACHE_KEY } from \"../constants\";\nimport { getViteMetroPluginOptions } from \"../metro-config/getViteMetroPluginOptions\";\nimport { setServerGlobals } from \"../server/setServerGlobals\";\nimport { getRouterRootFromOneOptions } from \"../utils/getRouterRootFromOneOptions\";\nimport { createRouteIndex } from \"../utils/routeIndex\";\nimport { absorbedPackageAliases } from \"../utils/absorbedPackages\";\nimport { ensureTSConfig } from \"./ensureTsConfig\";\nimport { setOneOptions } from \"./loadConfig\";\nimport { resolveNativeBundler } from \"./nativeBundler\";\nimport { bundledDevPlugin } from \"./plugins/bundledDevPlugin\";\nimport { clientTreeShakePlugin } from \"./plugins/clientTreeShakePlugin\";\nimport { createDevtoolsPlugin } from \"./plugins/devtoolsPlugin\";\nimport { createFileSystemRouterPlugin } from \"./plugins/fileSystemRouterPlugin\";\nimport { fixDependenciesPlugin } from \"./plugins/fixDependenciesPlugin\";\nimport { generateFileSystemRouteTypesPlugin } from \"./plugins/generateFileSystemRouteTypesPlugin\";\nimport { criticalCSSPlugin } from \"./plugins/criticalCSSPlugin\";\nimport { imageDataPlugin } from \"./plugins/imageDataPlugin\";\nimport { createRouteModuleHmrPlugin } from \"./plugins/routeModuleHmrPlugin\";\nimport { sourceInspectorPlugin } from \"./plugins/sourceInspectorPlugin\";\nimport { swiftPackagePlugin } from \"./plugins/swiftPackagePlugin\";\nimport { kotlinSourcePlugin } from \"./plugins/kotlinSourcePlugin\";\nimport { SSRCSSPlugin } from \"./plugins/SSRCSSPlugin\";\nimport { virtualEntryId } from \"./plugins/virtualEntryConstants\";\nimport { createVirtualEntry } from \"./plugins/virtualEntryPlugin\";\nimport { environmentGuardPlugin } from \"./plugins/environmentGuardPlugin\";\nimport { shouldEnableWorkerdDev } from \"./cloudflareWranglerConfig\";\nconst RN_DEEP_IMPORT_RE = /^react-native\\/Libraries\\/|react-native-web(-lite)?\\/.*\\/Libraries\\//;\nevents.setMaxListeners(1e3);\nglobalThis.__vxrnEnableNativeEnv = true;\nfunction one(options = {}) {\n setServerGlobals();\n const routerRoot = getRouterRootFromOneOptions(options);\n const nativeDisabled = options.native === false;\n const nativeOptions = options.native === false ? void 0 : options.native;\n const nativeAppName = nativeOptions?.app?.name || nativeOptions?.key;\n const nativeApp = nativeOptions?.app;\n const nativeAppVersion = nativeApp?.version;\n if (nativeDisabled) {\n globalThis.__vxrnEnableNativeEnv = false;\n }\n const metroOptions = (() => {\n if (nativeDisabled) return null;\n if (resolveNativeBundler({ bundler: nativeOptions?.bundler }) !== \"metro\") {\n const dropped = nativeOptions?.bundlerOptions;\n if (dropped?.babelConfig || dropped?.babelConfigOverrides) {\n console.warn(\n `[one] native.bundlerOptions configures babel plugins, but native.bundler is \"${nativeOptions?.bundler}\", which runs no babel. Those plugins will not run and whatever they were rewriting will reach the bundle untransformed.`\n );\n }\n return null;\n }\n if (process.env.ONE_METRO_MODE) {\n console.info(\"ONE_METRO_MODE environment variable is set, enabling Metro mode\");\n }\n const routerRoot2 = getRouterRootFromOneOptions(options);\n const defaultMetroOptions = getViteMetroPluginOptions({\n projectRoot: nativeOptions?.bundlerOptions?.argv?.projectRoot || process.cwd(),\n relativeRouterRoot: routerRoot2,\n ignoredRouteFiles: options.router?.ignoredRouteFiles,\n linking: options.router?.linking,\n userDefaultConfigOverrides: nativeOptions?.bundlerOptions?.defaultConfigOverrides,\n setupFile: options.setupFile\n });\n const userMetroOptions = nativeOptions?.bundlerOptions;\n const babelConfig = {\n ...defaultMetroOptions?.babelConfig,\n ...userMetroOptions?.babelConfig\n };\n return {\n ...defaultMetroOptions,\n ...userMetroOptions,\n defaultConfigOverrides: defaultMetroOptions?.defaultConfigOverrides,\n // defaultConfigOverrides is merged by getViteMetroPluginOptions, so we need to set it here again.\n argv: {\n ...defaultMetroOptions?.argv,\n ...userMetroOptions?.argv\n },\n babelConfig: {\n ...babelConfig,\n plugins: [\n ...babelConfig.plugins || [],\n ...options.react?.compiler === true || options.react?.compiler === \"native\" ? [\"babel-plugin-react-compiler\"] : []\n ]\n },\n mainModuleName: \"one/metro-entry\",\n // allow env var to enable lazy startup\n startup: process.env.ONE_METRO_LAZY ? \"lazy\" : userMetroOptions?.startup\n };\n })();\n const vxrnPlugins = [];\n if (!process.env.IS_VXRN_CLI) {\n console.warn(\"Experimental: running VxRN as a Vite plugin. This is not yet stable.\");\n vxrnPlugins.push(\n vxrnVitePlugin({\n metro: metroOptions,\n disableNative: nativeDisabled\n })\n );\n } else {\n if (!globalThis.__oneOptions) {\n setOneOptions(options);\n globalThis[\"__vxrnPluginConfig__\"] = options;\n globalThis[\"__vxrnMetroOptions__\"] = metroOptions;\n return [];\n }\n }\n if (options.config?.ensureTSConfig !== false) {\n void ensureTSConfig();\n }\n const vxrnOptions = getOptionsFilled();\n const root = vxrnOptions?.root || process.cwd();\n const compiler = options.react?.compiler;\n if (compiler) {\n configureVXRNCompilerPlugin({\n enableCompiler: (\n // pass through object config, regex, or function directly\n typeof compiler === \"object\" || typeof compiler === \"function\" ? compiler : compiler === \"native\" ? [\"ios\", \"android\"] : compiler === \"web\" ? [\"ssr\", \"client\"] : true\n )\n });\n }\n const autoDepsOptions = options.ssr?.autoDepsOptimization;\n const dedupeSymlinks = options.ssr?.dedupeSymlinkedModules ?? false;\n let ssrDedup_optimizedPackages = null;\n let ssrDedup_projectRoot = \"\";\n const ssrSymlinkDedupPlugin = {\n name: \"one:ssr-symlink-dedup\",\n enforce: \"pre\",\n configResolved(config) {\n if (!dedupeSymlinks) return;\n ssrDedup_projectRoot = config.root || process.cwd();\n const ssrInclude = config.ssr?.optimizeDeps?.include;\n if (!ssrInclude?.length) return;\n ssrDedup_optimizedPackages = /* @__PURE__ */ new Set();\n for (const entry of ssrInclude) {\n if (entry.startsWith(\"@\")) {\n const parts = entry.split(\"/\");\n ssrDedup_optimizedPackages.add(`${parts[0]}/${parts[1]}`);\n } else {\n ssrDedup_optimizedPackages.add(entry.split(\"/\")[0]);\n }\n }\n },\n async resolveId(source, importer, options2) {\n if (!dedupeSymlinks) return;\n if (source[0] === \".\" || source[0] === \"/\") return;\n let pkgName;\n let subpath = null;\n if (source.startsWith(\"@\")) {\n const parts = source.split(\"/\");\n pkgName = parts.length >= 2 ? `${parts[0]}/${parts[1]}` : source;\n if (parts.length > 2) subpath = `./${parts.slice(2).join(\"/\")}`;\n } else {\n const parts = source.split(\"/\");\n pkgName = parts[0];\n if (parts.length > 1) subpath = `./${parts.slice(1).join(\"/\")}`;\n }\n const resolved = await this.resolve(source, importer, {\n ...options2,\n skipSelf: true\n });\n if (!resolved?.id) return;\n if (resolved.id.includes(\"/node_modules/\")) return;\n const path2 = await import(\"node:path\");\n const fs = await import(\"node:fs\");\n const { join, dirname } = path2;\n const { realpathSync, existsSync: existsSync2, readFileSync: readFileSync2 } = fs;\n let dir = ssrDedup_projectRoot;\n while (dir !== dirname(dir)) {\n const nmPkgDir = join(dir, \"node_modules\", pkgName);\n if (existsSync2(nmPkgDir)) {\n if (subpath) {\n try {\n const pkg = JSON.parse(readFileSync2(join(nmPkgDir, \"package.json\"), \"utf8\"));\n const exportEntry = pkg.exports?.[subpath];\n if (exportEntry && typeof exportEntry === \"object\") {\n const target = exportEntry.import || exportEntry.module || exportEntry.default;\n if (target) {\n const fullPath = join(nmPkgDir, target);\n if (existsSync2(fullPath))\n return { id: normalizePath(fullPath), external: resolved.external };\n }\n }\n } catch {\n }\n }\n const realPkgDir = normalizePath(realpathSync(nmPkgDir));\n if (resolved.id.startsWith(realPkgDir)) {\n const relativePart = resolved.id.slice(realPkgDir.length);\n return {\n id: normalizePath(nmPkgDir) + relativePart,\n external: resolved.external\n };\n }\n break;\n }\n dir = dirname(dir);\n }\n }\n };\n const withAbsorbedAliases = (alias) => {\n const root2 = process.cwd();\n return {\n ...alias,\n native: { ...absorbedPackageAliases(root2, \"native\"), ...alias?.native }\n };\n };\n const createAliasPlugin = (alias, nativePlatform) => {\n const resolveMap = (map) => {\n if (!map) return null;\n const out = {};\n for (const [key, value] of Object.entries(map)) {\n try {\n out[key] = path.isAbsolute(value) ? value : resolvePath(value);\n } catch {\n out[key] = value;\n }\n }\n return out;\n };\n const resolved = {\n web: resolveMap(alias.web),\n native: resolveMap(alias.native),\n client: resolveMap(alias.client),\n ssr: resolveMap(alias.ssr),\n ios: resolveMap(alias.ios),\n android: resolveMap(alias.android)\n };\n const aliasKeys = [\n ...new Set(Object.values(resolved).flatMap((m) => m ? Object.keys(m) : []))\n ];\n const aliasFilter = aliasKeys.length ? new RegExp(\n `^(?:${aliasKeys.map((k) => k.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\")})$`\n ) : /(?!)/;\n return {\n name: \"one:alias\",\n enforce: \"pre\",\n // vite's dep optimizer resolves its include list without plugins, so the\n // absorbed packages also go in resolve.alias, which only web resolves with\n config: nativePlatform ? void 0 : () => ({\n resolve: {\n alias: Object.entries(absorbedPackageAliases(process.cwd(), \"web\")).map(\n ([name, replacement]) => ({ find: new RegExp(`^${name}$`), replacement })\n )\n }\n }),\n resolveId: {\n filter: { id: aliasFilter },\n handler(source) {\n const env = nativePlatform ?? this.environment?.name;\n const specific = env ? resolved[env] : null;\n if (specific && source in specific) {\n const id = specific[source];\n return {\n id,\n external: false,\n packageJsonPath: nearestPackageJson(id)\n };\n }\n const isWeb = !env || env === \"client\" || env === \"ssr\";\n const general = isWeb ? resolved.web : resolved.native;\n if (general && source in general) {\n const id = general[source];\n return {\n id,\n external: false,\n packageJsonPath: nearestPackageJson(id)\n };\n }\n }\n }\n };\n };\n const devAndProdPlugins = [\n {\n name: \"one:config\",\n __get: options\n },\n {\n name: \"one:env-prefix\",\n config(userConfig) {\n if (userConfig.envPrefix) return;\n return {\n envPrefix: [\"VITE_\", \"ONE_PUBLIC_\", \"EXPO_PUBLIC_\"]\n };\n }\n },\n bundledDevPlugin(!!options.web?.experimentalBundledDev),\n environmentGuardPlugin(options.environmentGuards),\n criticalCSSPlugin(),\n imageDataPlugin(),\n {\n name: \"one-define-client-env\",\n async config(userConfig, env) {\n const clientEnvDefine = options.skipEnv ? {} : (await loadEnv(\n vxrnOptions?.mode ?? userConfig?.mode ?? env?.mode ?? \"development\",\n process.cwd(),\n userConfig?.envPrefix\n )).clientEnvDefine;\n return {\n define: {\n ...clientEnvDefine,\n ...process.env.ONE_DEBUG_ROUTER && {\n \"process.env.ONE_DEBUG_ROUTER\": JSON.stringify(\n process.env.ONE_DEBUG_ROUTER\n )\n }\n }\n };\n }\n },\n ...autoDepsOptions === false ? [] : [\n autoDepOptimizePlugin({\n onScannedDeps({ hasReanimated, hasNativewind }) {\n configureVXRNCompilerPlugin({\n enableReanimated: hasReanimated,\n enableNativeCSS: nativeOptions?.css ?? hasNativewind,\n enableNativewind: hasNativewind\n });\n },\n root,\n include: /node_modules/,\n ...autoDepsOptions === true ? {} : autoDepsOptions\n })\n ],\n ...options.config?.tsConfigPaths === false ? [] : [\n (() => {\n let mappings = [];\n function loadMappings(resolvedRoot) {\n try {\n const configPath = path.resolve(resolvedRoot, \"tsconfig.json\");\n if (!existsSync(configPath)) return;\n const raw = readFileSync(configPath, \"utf-8\");\n const stripped = raw.replace(\n /\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g,\n (m, g) => g ? \"\" : m\n );\n const config = JSON.parse(stripped);\n const paths = config?.compilerOptions?.paths;\n const baseUrl = config?.compilerOptions?.baseUrl || \".\";\n if (!paths) return;\n for (const [pattern, targets] of Object.entries(\n paths\n )) {\n const target = targets[0];\n if (!target) continue;\n if (pattern.endsWith(\"/*\")) {\n const resolved = path.resolve(\n resolvedRoot,\n baseUrl,\n target.slice(0, -1)\n );\n mappings.push({\n prefix: pattern.slice(0, -1),\n replacement: resolved.endsWith(\"/\") ? resolved : resolved + \"/\",\n wildcard: true\n });\n } else {\n mappings.push({\n prefix: pattern,\n replacement: path.resolve(resolvedRoot, baseUrl, target),\n wildcard: false\n });\n }\n }\n } catch {\n }\n }\n loadMappings(root);\n const tsconfigPathsFilter = mappings.length ? new RegExp(\n mappings.map(\n (m) => `^${m.prefix.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}${m.wildcard ? \"\" : \"$\"}`\n ).join(\"|\")\n ) : /^[^./]/;\n return {\n name: \"one:tsconfig-paths\",\n enforce: \"pre\",\n config() {\n return {\n resolve: { tsconfigPaths: true }\n };\n },\n configResolved(config) {\n if (mappings.length === 0) {\n loadMappings(config.root);\n }\n },\n resolveId: {\n filter: { id: tsconfigPathsFilter },\n handler(source) {\n const resolved = (id) => ({\n id,\n packageJsonPath: nearestPackageJson(id)\n });\n const jsExts = [\n \".ts\",\n \".tsx\",\n \".js\",\n \".jsx\",\n \".mts\",\n \".mjs\",\n \".cjs\",\n \".cts\"\n ];\n for (const m of mappings) {\n let candidate;\n if (m.wildcard) {\n if (source.startsWith(m.prefix)) {\n candidate = m.replacement + source.slice(m.prefix.length);\n }\n } else if (source === m.prefix) {\n candidate = m.replacement;\n }\n if (!candidate) continue;\n if (jsExts.includes(path.extname(candidate)))\n return resolved(candidate);\n for (const e of jsExts) {\n if (existsSync(candidate + e)) return resolved(candidate + e);\n }\n for (const e of jsExts) {\n if (existsSync(candidate + \"/index\" + e))\n return resolved(candidate + \"/index\" + e);\n }\n return resolved(candidate);\n }\n }\n }\n };\n })()\n ],\n createAliasPlugin(withAbsorbedAliases(options.alias)),\n {\n // rolldown fails on deep react-native/Libraries/* imports during dep pre-bundling.\n // these are native-only paths that don't exist in react-native-web.\n name: \"one:redirect-rn-deep-imports\",\n enforce: \"pre\",\n // rust-side filter matching the two source patterns below, so the ~24k\n // non-matching imports in a build never enter js at all\n resolveId: {\n filter: { id: RN_DEEP_IMPORT_RE },\n handler(source) {\n if (this.environment?.name === \"client\" || this.environment?.name === \"ssr\" || this.environment?.name === \"worker\") {\n return \"\\0rn-empty-module\";\n }\n }\n },\n load: {\n filter: { id: exactRegex(\"\\0rn-empty-module\") },\n handler() {\n return \"export default {}; export {};\";\n }\n }\n },\n {\n name: \"one-aliases\",\n enforce: \"pre\",\n config() {\n let tslibLitePath = \"\";\n try {\n tslibLitePath = resolvePath(\"@vxrn/tslib-lite\", process.cwd());\n } catch (err) {\n console.info(`Can't find tslib-lite, falling back to tslib`);\n if (process.env.DEBUG) {\n console.error(err);\n }\n }\n return {\n resolve: {\n alias: {\n // testing getting transition between routes working\n // 'use-sync-external-store/with-selector': resolvePath(\n // 'use-sync-external-store/shim/with-selector'\n // ),\n ...tslibLitePath && {\n tslib: tslibLitePath\n }\n }\n }\n };\n }\n },\n {\n name: \"one:init-config\",\n config() {\n const setupFileDefines = (() => {\n if (!options.setupFile) return {};\n let setupFiles;\n if (typeof options.setupFile === \"string\") {\n setupFiles = {\n client: options.setupFile,\n server: options.setupFile,\n ios: options.setupFile,\n android: options.setupFile\n };\n } else if (\"native\" in options.setupFile) {\n setupFiles = {\n client: options.setupFile.client,\n server: options.setupFile.server,\n ios: options.setupFile.native,\n android: options.setupFile.native\n };\n } else {\n setupFiles = options.setupFile;\n }\n return {\n ...setupFiles.client && {\n \"process.env.ONE_SETUP_FILE_CLIENT\": JSON.stringify(setupFiles.client)\n },\n ...setupFiles.server && {\n \"process.env.ONE_SETUP_FILE_SERVER\": JSON.stringify(setupFiles.server)\n },\n ...setupFiles.ios && {\n \"process.env.ONE_SETUP_FILE_IOS\": JSON.stringify(setupFiles.ios)\n },\n ...setupFiles.android && {\n \"process.env.ONE_SETUP_FILE_ANDROID\": JSON.stringify(setupFiles.android)\n }\n };\n })();\n const serverURL = process.env.ONE_SERVER_URL || vxrnOptions?.server.url;\n return {\n // Platform env defined at root level for client (workaround for Vite bug with environment.client.define)\n define: {\n ...getPlatformEnvDefine(\"client\"),\n ...setupFileDefines,\n ...options.web?.defaultRenderMode && {\n \"process.env.ONE_DEFAULT_RENDER_MODE\": JSON.stringify(\n options.web.defaultRenderMode\n ),\n \"import.meta.env.ONE_DEFAULT_RENDER_MODE\": JSON.stringify(\n options.web.defaultRenderMode\n )\n },\n ...process.env.NODE_ENV !== \"production\" && serverURL && {\n \"process.env.ONE_SERVER_URL\": JSON.stringify(serverURL),\n \"import.meta.env.ONE_SERVER_URL\": JSON.stringify(serverURL)\n },\n ...options.web?.linkPrefetch && {\n \"process.env.ONE_LINK_PREFETCH\": JSON.stringify(options.web.linkPrefetch)\n },\n ...options.web?.skewProtection !== void 0 && {\n \"process.env.ONE_SKEW_PROTECTION\": JSON.stringify(\n options.web.skewProtection === true ? \"true\" : options.web.skewProtection === false ? \"false\" : options.web.skewProtection\n // 'proactive'\n )\n },\n ...options.web?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES\": JSON.stringify(\n options.web.suspendRoutes ? \"1\" : \"0\"\n )\n }\n },\n environments: {\n ssr: {\n define: getPlatformEnvDefine(\"ssr\")\n },\n ios: {\n define: {\n ...getPlatformEnvDefine(\"ios\"),\n ...nativeOptions?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES_NATIVE\": JSON.stringify(\n nativeOptions.suspendRoutes ? \"1\" : \"0\"\n )\n }\n }\n },\n android: {\n define: {\n ...getPlatformEnvDefine(\"android\"),\n ...nativeOptions?.suspendRoutes !== void 0 && {\n \"process.env.ONE_SUSPEND_ROUTES_NATIVE\": JSON.stringify(\n nativeOptions.suspendRoutes ? \"1\" : \"0\"\n )\n }\n }\n }\n },\n ssr: {\n // ensure server-only/client-only go through vite so our environmentGuardPlugin can handle them\n noExternal: [\"server-only\", \"client-only\"]\n }\n };\n }\n },\n {\n name: \"one:tamagui\",\n config() {\n return {\n define: {\n // safe to set because it only affects web in tamagui, and one is always react 19\n \"process.env.TAMAGUI_REACT_19\": '\"1\"'\n },\n environments: {\n ssr: {\n define: {\n \"process.env.TAMAGUI_IS_SERVER\": '\"1\"',\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n },\n ios: {\n define: {\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n },\n android: {\n define: {\n \"process.env.TAMAGUI_KEEP_THEMES\": '\"1\"'\n }\n }\n }\n };\n }\n },\n createRouteModuleHmrPlugin(routerRoot),\n // Plugins may transform the source code and add imports of `react/jsx-dev-runtime`, which won't be discovered by Vite's initial `scanImports` since the implementation is using ESbuild where such plugins are not executed.\n // Thus, if the project has a valid `react/jsx-dev-runtime` import, we tell Vite to optimize it, so Vite won't only discover it on the next page load and trigger a full reload.\n {\n name: \"one:optimize-dev-deps\",\n config(_, env) {\n if (env.mode === \"development\") {\n return {\n optimizeDeps: {\n include: [\"react/jsx-dev-runtime\", \"react/compiler-runtime\"]\n }\n };\n }\n }\n },\n {\n name: \"one:remove-server-from-client\",\n enforce: \"pre\",\n // both conditions are rust-side: only one-server-only modules that\n // actually contain the import cross into js\n transform: {\n filter: {\n id: /one-server-only/,\n code: 'import { AsyncLocalStorage } from \"node:async_hooks\"'\n },\n handler(code) {\n if (this.environment.name !== \"client\") return;\n return code.replace(\n `import { AsyncLocalStorage } from \"node:async_hooks\"`,\n `class AsyncLocalStorage {}`\n );\n }\n }\n },\n // packages in resolve.dedupe must also be pre-bundled for SSR to prevent\n // duplicate module instances (e.g. symlinked monorepo packages resolving\n // to different paths)\n {\n name: \"one:ssr-dedupe-prebundle\",\n config(config) {\n if (!dedupeSymlinks) return;\n const dedupeList = config.resolve?.dedupe;\n if (!Array.isArray(dedupeList) || dedupeList.length === 0) return;\n return {\n ssr: {\n optimizeDeps: {\n include: [...dedupeList]\n },\n noExternal: [...dedupeList]\n }\n };\n }\n },\n // fix: vite's ssr dep optimizer registers pre-bundled deps by their\n // node_modules path, but symlinks cause imports to resolve to the real\n // (source) path. the optimizer doesn't recognize the real path, so it\n // loads from source — creating a duplicate instance.\n // this plugin forces optimized SSR deps to resolve via node_modules.\n // off by default, and every hook bails on `!dedupeSymlinks`, so skip\n // registering it entirely rather than paying a napi round trip per import\n ...dedupeSymlinks ? [ssrSymlinkDedupPlugin] : []\n ];\n const nativeWebDevAndProdPlugsin = [clientTreeShakePlugin({ routerRoot })];\n let nativeFormPlugins = [];\n const nativeFormPluginsCapture = {\n name: \"one:native-form-plugins\",\n configResolved(config) {\n nativeFormPlugins = config.plugins.filter((plugin) => plugin.api?.vxrnNative);\n }\n };\n if (!nativeDisabled) {\n const viteBundlerOptions = nativeOptions?.bundler === \"metro\" ? void 0 : nativeOptions?.bundlerOptions;\n globalThis.__vxrnAddNativePlugins = (platform) => {\n const listed = [\n backgroundComputationPlugin(\"native\"),\n workletImportsPlugin({}),\n ...nativeApp ? [\n {\n name: \"one:externalize-expo-for-native-app\",\n resolveId(source) {\n if (/^(?:expo(?:-[^/]+)?|@expo\\/[^/]+)(?:\\/|$)/.test(source)) {\n return { id: source, external: true };\n }\n }\n }\n ] : [],\n createAliasPlugin(withAbsorbedAliases(options.alias), platform),\n clientTreeShakePlugin({ runtime: \"rolldown\", routerRoot }),\n ...viteBundlerOptions?.plugins ?? []\n ];\n const listedNames = new Set(listed.map((plugin) => plugin.name));\n return [\n ...listed,\n ...nativeFormPlugins.filter((plugin) => !listedNames.has(plugin.name)),\n // last, so an app plugin that compiles .swift itself (a simulator) wins\n swiftPackagePlugin(platform, root),\n kotlinSourcePlugin(platform, root)\n ];\n };\n globalThis.__vxrnNativeUserDefine = {\n ...viteBundlerOptions?.define,\n ...nativeAppName && {\n \"process.env.ONE_APP_NAME\": JSON.stringify(nativeAppName),\n \"import.meta.env.ONE_APP_NAME\": JSON.stringify(nativeAppName)\n }\n };\n }\n globalThis.__vxrnAddWebPluginsProd = devAndProdPlugins;\n const flags = {};\n const routeIndex = createRouteIndex({\n routerRoot: path.resolve(root, routerRoot),\n ignoredRouteFiles: options.router?.ignoredRouteFiles\n });\n if (!nativeDisabled) {\n globalThis.__vxrnNativeEntryConfig = {\n routerRoot,\n ignoredRouteFiles: options.router?.ignoredRouteFiles,\n linking: options.router?.linking,\n setupFile: options.setupFile,\n flags,\n app: nativeApp\n };\n }\n const inspectorPlugins = (() => {\n const devtools = options.devtools ?? true;\n const inspector = devtools === true || devtools !== false && (devtools.inspector ?? true);\n const editor = devtools !== true && devtools !== false ? devtools.editor : void 0;\n return inspector ? sourceInspectorPlugin({ editor }) : [];\n })();\n const workerdDevPlugins = shouldEnableWorkerdDev(options.web?.deploy, root) ? import(\"./plugins/workerdDevPlugin\").then(\n ({ createWorkerdDevPlugins }) => createWorkerdDevPlugins(options, root, routeIndex)\n ) : [];\n return [\n backgroundComputationPlugin(\"web\"),\n {\n name: \"one:background-worker-build\",\n config(config) {\n const plugins = config.worker?.plugins;\n return {\n worker: {\n plugins: () => [...plugins?.() ?? [], backgroundComputationPlugin(\"web\")]\n }\n };\n }\n },\n workerdDevPlugins,\n ...vxrnPlugins,\n ...devAndProdPlugins,\n ...inspectorPlugins,\n ...nativeWebDevAndProdPlugsin,\n ...nativeDisabled ? [] : [nativeFormPluginsCapture],\n /**\n * This is really the meat of one, where it handles requests:\n */\n createFileSystemRouterPlugin(options, routeIndex),\n generateFileSystemRouteTypesPlugin(options, routeIndex),\n fixDependenciesPlugin(options.patches),\n createVirtualEntry({\n ...options,\n flags,\n root: routerRoot,\n routeIndex\n }),\n {\n name: \"one-define-environment\",\n config() {\n return {\n define: {\n ...nativeAppName && {\n \"process.env.ONE_APP_NAME\": JSON.stringify(nativeAppName),\n \"import.meta.env.ONE_APP_NAME\": JSON.stringify(nativeAppName)\n },\n ...nativeAppVersion && {\n \"process.env.ONE_APP_VERSION\": JSON.stringify(nativeAppVersion),\n \"import.meta.env.ONE_APP_VERSION\": JSON.stringify(nativeAppVersion)\n },\n \"process.env.ONE_CACHE_KEY\": JSON.stringify(CACHE_KEY),\n \"import.meta.env.ONE_CACHE_KEY\": JSON.stringify(CACHE_KEY)\n }\n };\n }\n },\n SSRCSSPlugin({\n entries: [virtualEntryId]\n }),\n // devtools (always includes refresh preamble for HMR, optionally includes UI)\n ...(() => {\n const devtools = options.devtools ?? true;\n const includeUI = devtools !== false;\n return [\n // always include devtools plugin for refresh preamble (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gCAAgC,KAAK,UAAU,aAAa;KAC9D;KACA,GAAG,oBAAoB;MACrB,+BAA+B,KAAK,UAAU,gBAAgB;MAC9D,mCAAmC,KAAK,UAAU,gBAAgB;KACpE;KACA,6BAA6B,KAAK,UAAU,SAAS;KACrD,iCAAiC,KAAK,UAAU,SAAS;IAC3D,EACF;GACF;EACF;EACA,aAAa,EACX,SAAS,CAAC,cAAc,EAC1B,CAAC;EAED,UAAU;GACR,MAAM,WAAW,QAAQ,YAAY;GACrC,MAAM,YAAY,aAAa;GAC/B,OAAO,CAEL,qBAAqB,EAAE,UAAU,CAAC,CACpC;EACF,EAAC,CAAE;CACL;AACF"}
@@ -671,11 +671,21 @@ function one() {
671
671
  ...dedupeSymlinks ? [ssrSymlinkDedupPlugin] : []
672
672
  ];
673
673
  var nativeWebDevAndProdPlugsin = [clientTreeShakePlugin({ routerRoot })];
674
+ var nativeFormPlugins = [];
675
+ var nativeFormPluginsCapture = {
676
+ name: "one:native-form-plugins",
677
+ configResolved(config) {
678
+ nativeFormPlugins = config.plugins.filter(function(plugin) {
679
+ var _plugin_api;
680
+ return (_plugin_api = plugin.api) === null || _plugin_api === void 0 ? void 0 : _plugin_api.vxrnNative;
681
+ });
682
+ }
683
+ };
674
684
  if (!nativeDisabled) {
675
685
  var viteBundlerOptions = (nativeOptions === null || nativeOptions === void 0 ? void 0 : nativeOptions.bundler) === "metro" ? void 0 : nativeOptions === null || nativeOptions === void 0 ? void 0 : nativeOptions.bundlerOptions;
676
686
  globalThis.__vxrnAddNativePlugins = function(platform) {
677
687
  var _ref2;
678
- return [
688
+ var listed = [
679
689
  backgroundComputationPlugin("native"),
680
690
  workletImportsPlugin({}),
681
691
  ...nativeApp ? [{
@@ -694,7 +704,16 @@ function one() {
694
704
  runtime: "rolldown",
695
705
  routerRoot
696
706
  }),
697
- ...(_ref2 = viteBundlerOptions === null || viteBundlerOptions === void 0 ? void 0 : viteBundlerOptions.plugins) !== null && _ref2 !== void 0 ? _ref2 : [],
707
+ ...(_ref2 = viteBundlerOptions === null || viteBundlerOptions === void 0 ? void 0 : viteBundlerOptions.plugins) !== null && _ref2 !== void 0 ? _ref2 : []
708
+ ];
709
+ var listedNames = new Set(listed.map(function(plugin) {
710
+ return plugin.name;
711
+ }));
712
+ return [
713
+ ...listed,
714
+ ...nativeFormPlugins.filter(function(plugin) {
715
+ return !listedNames.has(plugin.name);
716
+ }),
698
717
  swiftPackagePlugin(platform, root),
699
718
  kotlinSourcePlugin(platform, root)
700
719
  ];
@@ -753,6 +772,7 @@ function one() {
753
772
  ...devAndProdPlugins,
754
773
  ...inspectorPlugins,
755
774
  ...nativeWebDevAndProdPlugsin,
775
+ ...nativeDisabled ? [] : [nativeFormPluginsCapture],
756
776
  createFileSystemRouterPlugin(options, routeIndex),
757
777
  generateFileSystemRouteTypesPlugin(options, routeIndex),
758
778
  fixDependenciesPlugin(options.patches),