@absolutejs/absolute 0.20.0-beta.44 → 0.20.0-beta.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13352,10 +13352,11 @@ var isTestSourcePath = (file2) => {
13352
13352
  };
13353
13353
 
13354
13354
  // src/mobile/deviceCapabilities.ts
13355
- import { readFileSync as readFileSync17 } from "fs";
13355
+ import { existsSync as existsSync23, readFileSync as readFileSync17 } from "fs";
13356
13356
  import { extname as extname7, join as join29, relative as relative11, resolve as resolve25 } from "path";
13357
+ import { fileURLToPath as fileURLToPath2 } from "url";
13357
13358
  import ts8 from "typescript";
13358
- var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/devices-capacitor", SOURCE_GLOB, IGNORED_DIRECTORIES, IDENTIFIER_PATTERN, CAPACITOR_MODULE_PATTERN, CAPACITOR_PACKAGE_PATTERN, ANDROID_PERMISSION_PATTERN, IOS_USAGE_DESCRIPTIONS, IOS_PRIVACY_ACCESSED_API_REASONS, IOS_PRIVACY_ACCESSED_APIS, object = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
13359
+ var DEVICES_PACKAGE = "@absolutejs/devices", ADAPTERS, SOURCE_GLOB, IGNORED_DIRECTORIES, IDENTIFIER_PATTERN, providerModulePattern = (provider) => new RegExp(`^@absolutejs/devices-${provider}/[a-z][a-z0-9-]*$`, "u"), providerPackagePattern = (provider) => provider === "capacitor" ? /^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u : /^(?:expo-[a-z][a-z0-9-]*|@react-native-[a-z0-9-]+\/[a-z][a-z0-9-]*)@\d+\.\d+\.\d+$/u, providerLabel = (provider) => provider === "capacitor" ? "Capacitor" : "Expo", ANDROID_PERMISSION_PATTERN, IOS_USAGE_DESCRIPTIONS, IOS_PRIVACY_ACCESSED_API_REASONS, IOS_PRIVACY_ACCESSED_APIS, object = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
13359
13360
  const value = JSON.parse(readFileSync17(path, "utf8"));
13360
13361
  if (!object(value))
13361
13362
  throw new TypeError(`${path} must contain an object.`);
@@ -13415,7 +13416,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13415
13416
  ...systemBars === true ? { systemBars: true } : {},
13416
13417
  ...usageDescriptions === undefined ? {} : { usageDescriptions: [...usageDescriptions] }
13417
13418
  };
13418
- }, parseProvider = (name, value) => {
13419
+ }, parseProvider = (name, value, providerName) => {
13419
13420
  if (!IDENTIFIER_PATTERN.test(name))
13420
13421
  throw new TypeError("Device capability names must be identifiers.");
13421
13422
  if (!object(value))
@@ -13424,10 +13425,13 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13424
13425
  const module = text(value.module, `${name}.module`);
13425
13426
  if (!IDENTIFIER_PATTERN.test(factory))
13426
13427
  throw new TypeError(`${name}.factory must be a JavaScript identifier.`);
13427
- if (!CAPACITOR_MODULE_PATTERN.test(module))
13428
- throw new TypeError(`${name}.module must be an official devices-capacitor subpath.`);
13429
- if (!Array.isArray(value.packages) || !value.packages.every((spec) => typeof spec === "string" && CAPACITOR_PACKAGE_PATTERN.test(spec)))
13430
- throw new TypeError(`${name}.packages must contain exact official Capacitor package versions.`);
13428
+ if (!providerModulePattern(providerName).test(module))
13429
+ throw new TypeError(`${name}.module must be an official devices-${providerName} subpath.`);
13430
+ if (!Array.isArray(value.packages) || !value.packages.every((spec) => typeof spec === "string" && providerPackagePattern(providerName).test(spec)))
13431
+ throw new TypeError(`${name}.packages must contain exact official ${providerLabel(providerName)} package versions.`);
13432
+ const { plugins } = value;
13433
+ if (plugins !== undefined && (!Array.isArray(plugins) || !plugins.every((plugin) => typeof plugin === "string" && /^expo-[a-z][a-z0-9-]*$/u.test(plugin))))
13434
+ throw new TypeError(`${name}.plugins must contain Expo config plugin names.`);
13431
13435
  let native;
13432
13436
  const { native: nativeMetadata } = value;
13433
13437
  if (nativeMetadata !== undefined) {
@@ -13445,6 +13449,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13445
13449
  factory,
13446
13450
  module,
13447
13451
  ...native === undefined ? {} : { native },
13452
+ ...plugins === undefined ? {} : { plugins: [...plugins] },
13448
13453
  packages: [...value.packages]
13449
13454
  };
13450
13455
  }, absoluteDeviceNativeRequirements = (plan) => {
@@ -13474,18 +13479,27 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13474
13479
  ...new Set(plan.capabilities.flatMap((name) => plan.providers[name]?.native?.ios?.usageDescriptions ?? []))
13475
13480
  ].sort()
13476
13481
  };
13477
- }, loadAbsoluteDeviceCapabilityProviders = (projectRoot) => {
13478
- const path = join29(resolve25(projectRoot), "node_modules", CAPACITOR_ADAPTER, "package.json");
13482
+ }, loadAbsoluteDeviceCapabilityProviders = (projectRoot, provider = "capacitor") => {
13483
+ const adapter = ADAPTERS[provider];
13484
+ let path = join29(resolve25(projectRoot), "node_modules", adapter, "package.json");
13485
+ try {
13486
+ readFileSync17(path, "utf8");
13487
+ } catch {
13488
+ path = fileURLToPath2(import.meta.resolve(`${adapter}/package.json`));
13489
+ }
13479
13490
  const manifest = readJson(path);
13480
13491
  const { absolutejs } = manifest;
13481
13492
  const devices = object(absolutejs) ? absolutejs.devices : undefined;
13482
- if (!object(devices) || devices.format !== 1 || devices.provider !== "capacitor" || !object(devices.capabilities))
13483
- throw new TypeError(`${CAPACITOR_ADAPTER} does not publish supported capability metadata.`);
13484
- const entries = Object.entries(devices.capabilities).map(([name, provider]) => ({
13493
+ if (!object(devices) || devices.format !== 1 || devices.provider !== provider || !object(devices.capabilities))
13494
+ throw new TypeError(`${adapter} does not publish supported capability metadata.`);
13495
+ const entries = Object.entries(devices.capabilities).map(([name, capability]) => ({
13485
13496
  name,
13486
- provider: parseProvider(name, provider)
13497
+ provider: parseProvider(name, capability, provider)
13487
13498
  }));
13488
- return Object.fromEntries(entries.sort((left, right) => left.name.localeCompare(right.name)).map(({ name, provider }) => [name, provider]));
13499
+ return Object.fromEntries(entries.sort((left, right) => left.name.localeCompare(right.name)).map(({ name, provider: capabilityProvider }) => [
13500
+ name,
13501
+ capabilityProvider
13502
+ ]));
13489
13503
  }, isIgnored = (path) => path.split("/").some((segment) => IGNORED_DIRECTORIES.has(segment)), importedCapabilities = (source, file2) => {
13490
13504
  const names = new Set;
13491
13505
  const namespaces = new Set;
@@ -13542,6 +13556,8 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13542
13556
  return packages;
13543
13557
  }, discoverAbsoluteDeviceCapabilities = (projectRoot, providers = loadAbsoluteDeviceCapabilityProviders(projectRoot)) => {
13544
13558
  const root = resolve25(projectRoot);
13559
+ if (!existsSync23(root))
13560
+ return [];
13545
13561
  const known = new Set(Object.keys(providers));
13546
13562
  const capabilities = new Set;
13547
13563
  for (const path of SOURCE_GLOB.scanSync({ cwd: root })) {
@@ -13568,14 +13584,14 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13568
13584
  return true;
13569
13585
  }
13570
13586
  return false;
13571
- }, resolveAbsoluteDeviceCapabilityPlan = (projectRoot) => {
13572
- const allProviders = loadAbsoluteDeviceCapabilityProviders(projectRoot);
13587
+ }, resolveAbsoluteDeviceCapabilityPlan = (projectRoot, provider = "capacitor") => {
13588
+ const allProviders = loadAbsoluteDeviceCapabilityProviders(projectRoot, provider);
13573
13589
  const capabilities = discoverAbsoluteDeviceCapabilities(projectRoot, allProviders);
13574
13590
  const providers = {};
13575
13591
  for (const name of capabilities) {
13576
- const provider = allProviders[name];
13577
- if (provider)
13578
- providers[name] = provider;
13592
+ const capabilityProvider = allProviders[name];
13593
+ if (capabilityProvider)
13594
+ providers[name] = capabilityProvider;
13579
13595
  }
13580
13596
  return {
13581
13597
  capabilities,
@@ -13586,6 +13602,10 @@ var DEVICES_PACKAGE = "@absolutejs/devices", CAPACITOR_ADAPTER = "@absolutejs/de
13586
13602
  };
13587
13603
  };
13588
13604
  var init_deviceCapabilities = __esm(() => {
13605
+ ADAPTERS = {
13606
+ capacitor: "@absolutejs/devices-capacitor",
13607
+ expo: "@absolutejs/devices-expo"
13608
+ };
13589
13609
  SOURCE_GLOB = new Bun.Glob("**/*.{js,jsx,ts,tsx,svelte,vue}");
13590
13610
  IGNORED_DIRECTORIES = new Set([
13591
13611
  ".absolutejs",
@@ -13599,8 +13619,6 @@ var init_deviceCapabilities = __esm(() => {
13599
13619
  "tests"
13600
13620
  ]);
13601
13621
  IDENTIFIER_PATTERN = /^[A-Za-z_$][\w$]*$/u;
13602
- CAPACITOR_MODULE_PATTERN = /^@absolutejs\/devices-capacitor\/[a-z][a-z0-9-]*$/u;
13603
- CAPACITOR_PACKAGE_PATTERN = /^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u;
13604
13622
  ANDROID_PERMISSION_PATTERN = /^android\.permission\.[A-Z][A-Z0-9_]*$/u;
13605
13623
  IOS_USAGE_DESCRIPTIONS = new Set([
13606
13624
  "camera",
@@ -13618,7 +13636,7 @@ var init_deviceCapabilities = __esm(() => {
13618
13636
  });
13619
13637
 
13620
13638
  // node_modules/@absolutejs/sync/dist/client/index.js
13621
- var RUNTIME_TRANSPORT, host, isRegistry = (value) => typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "installations")) && Array.isArray(Reflect.get(value, "clients")), registry, SyncLocalDataPolicyError, SyncLocalStoreSchemaError, positiveVersion = (value, label) => {
13639
+ var RUNTIME_TRANSPORT, host, isRegistry = (value) => typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "installations")) && Array.isArray(Reflect.get(value, "clients")), registry, pools, SyncLocalDataPolicyError, SyncLocalStoreSchemaError, positiveVersion = (value, label) => {
13622
13640
  if (!Number.isSafeInteger(value) || value < 1)
13623
13641
  throw new SyncLocalStoreSchemaError("INVALID_PLAN", `${label} must be a positive safe integer`);
13624
13642
  return value;
@@ -13723,6 +13741,7 @@ var init_client = __esm(() => {
13723
13741
  });
13724
13742
  return created;
13725
13743
  })();
13744
+ pools = new Map;
13726
13745
  SyncLocalDataPolicyError = class SyncLocalDataPolicyError extends Error {
13727
13746
  code;
13728
13747
  constructor(code, message) {
@@ -14611,7 +14630,7 @@ var exports_parseAngularConfigImports = {};
14611
14630
  __export(exports_parseAngularConfigImports, {
14612
14631
  parseAngularProvidersImport: () => parseAngularProvidersImport
14613
14632
  });
14614
- import { existsSync as existsSync23, readFileSync as readFileSync22 } from "fs";
14633
+ import { existsSync as existsSync24, readFileSync as readFileSync22 } from "fs";
14615
14634
  import { dirname as dirname18, isAbsolute as isAbsolute3, join as join35 } from "path";
14616
14635
  import ts12 from "typescript";
14617
14636
  var findDefineConfigCall = (sf) => {
@@ -14668,7 +14687,7 @@ var findDefineConfigCall = (sf) => {
14668
14687
  const envOverride = process.env.ABSOLUTE_CONFIG;
14669
14688
  if (envOverride) {
14670
14689
  const resolved = isAbsolute3(envOverride) ? envOverride : join35(projectRoot, envOverride);
14671
- if (existsSync23(resolved))
14690
+ if (existsSync24(resolved))
14672
14691
  return resolved;
14673
14692
  }
14674
14693
  const candidates = [
@@ -14678,7 +14697,7 @@ var findDefineConfigCall = (sf) => {
14678
14697
  join35(projectRoot, "absolute.config.mjs")
14679
14698
  ];
14680
14699
  for (const candidate of candidates) {
14681
- if (existsSync23(candidate))
14700
+ if (existsSync24(candidate))
14682
14701
  return candidate;
14683
14702
  }
14684
14703
  return null;
@@ -14779,7 +14798,7 @@ __export(exports_compileSvelte, {
14779
14798
  clearSvelteCompilerCache: () => clearSvelteCompilerCache,
14780
14799
  compileSvelte: () => compileSvelte
14781
14800
  });
14782
- import { existsSync as existsSync24 } from "fs";
14801
+ import { existsSync as existsSync25 } from "fs";
14783
14802
  import { mkdir as mkdir9, stat as stat2 } from "fs/promises";
14784
14803
  import {
14785
14804
  dirname as dirname19,
@@ -14795,11 +14814,11 @@ var {write: write2, file: file2, Transpiler: Transpiler2 } = globalThis.Bun;
14795
14814
  var resolveDevClientDir2 = () => {
14796
14815
  const projectRoot = process.cwd();
14797
14816
  const fromSource = resolve27(import.meta.dir, "../dev/client");
14798
- if (existsSync24(fromSource) && fromSource.startsWith(projectRoot)) {
14817
+ if (existsSync25(fromSource) && fromSource.startsWith(projectRoot)) {
14799
14818
  return fromSource;
14800
14819
  }
14801
14820
  const fromNodeModules = resolve27(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
14802
- if (existsSync24(fromNodeModules))
14821
+ if (existsSync25(fromNodeModules))
14803
14822
  return fromNodeModules;
14804
14823
  return resolve27(import.meta.dir, "./dev/client");
14805
14824
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
@@ -14902,7 +14921,7 @@ var resolveDevClientDir2 = () => {
14902
14921
  const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
14903
14922
  const prevHash = sourceHashCache.get(src);
14904
14923
  const persistent = persistentCache.get(src);
14905
- if (prevHash === contentHash && persistent && existsSync24(persistent.ssr) && existsSync24(persistent.client)) {
14924
+ if (prevHash === contentHash && persistent && existsSync25(persistent.ssr) && existsSync25(persistent.client)) {
14906
14925
  cache.set(src, persistent);
14907
14926
  return persistent;
14908
14927
  }
@@ -15624,7 +15643,7 @@ __export(exports_compileVue, {
15624
15643
  generateVueHmrId: () => generateVueHmrId,
15625
15644
  vueHmrMetadata: () => vueHmrMetadata
15626
15645
  });
15627
- import { existsSync as existsSync25, readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
15646
+ import { existsSync as existsSync26, readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
15628
15647
  import { mkdir as mkdir10 } from "fs/promises";
15629
15648
  import {
15630
15649
  basename as basename11,
@@ -15638,11 +15657,11 @@ var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
15638
15657
  var resolveDevClientDir3 = () => {
15639
15658
  const projectRoot = process.cwd();
15640
15659
  const fromSource = resolve28(import.meta.dir, "../dev/client");
15641
- if (existsSync25(fromSource) && fromSource.startsWith(projectRoot)) {
15660
+ if (existsSync26(fromSource) && fromSource.startsWith(projectRoot)) {
15642
15661
  return fromSource;
15643
15662
  }
15644
15663
  const fromNodeModules = resolve28(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
15645
- if (existsSync25(fromNodeModules))
15664
+ if (existsSync26(fromNodeModules))
15646
15665
  return fromNodeModules;
15647
15666
  return resolve28(import.meta.dir, "./dev/client");
15648
15667
  }, devClientDir3, hmrClientPath4, transpiler4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
@@ -15695,7 +15714,7 @@ var resolveDevClientDir3 = () => {
15695
15714
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
15696
15715
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
15697
15716
  const importedPath = resolve28(dirname20(cssFilePath), relPath);
15698
- if (!existsSync25(importedPath))
15717
+ if (!existsSync26(importedPath))
15699
15718
  return match;
15700
15719
  const importedContent = readFileSync24(importedPath, "utf-8");
15701
15720
  return inlineCssImports(importedContent, importedPath, visited);
@@ -15704,10 +15723,10 @@ var resolveDevClientDir3 = () => {
15704
15723
  if (helper.endsWith(".ts"))
15705
15724
  return resolve28(sourceDir, helper);
15706
15725
  const direct = resolve28(sourceDir, `${helper}.ts`);
15707
- if (existsSync25(direct))
15726
+ if (existsSync26(direct))
15708
15727
  return direct;
15709
15728
  const indexed = resolve28(sourceDir, helper, "index.ts");
15710
- if (existsSync25(indexed))
15729
+ if (existsSync26(indexed))
15711
15730
  return indexed;
15712
15731
  return direct;
15713
15732
  }, toJs = (filePath, sourceDir) => {
@@ -15723,10 +15742,10 @@ var resolveDevClientDir3 = () => {
15723
15742
  }
15724
15743
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
15725
15744
  const directTs = resolve28(sourceDir, `${filePath}.ts`);
15726
- if (existsSync25(directTs))
15745
+ if (existsSync26(directTs))
15727
15746
  return `${filePath}.js`;
15728
15747
  const indexedTs = resolve28(sourceDir, filePath, "index.ts");
15729
- if (existsSync25(indexedTs))
15748
+ if (existsSync26(indexedTs))
15730
15749
  return `${filePath}/index.js`;
15731
15750
  }
15732
15751
  return `${filePath}.js`;
@@ -15787,7 +15806,7 @@ const ${localName} = (source) => ${importedName}(
15787
15806
  const contentHash = Bun.hash(sourceContent).toString(BASE_36_RADIX);
15788
15807
  const prevHash = vueSourceHashCache.get(sourceFilePath);
15789
15808
  const persistent = persistentBuildCache.get(sourceFilePath);
15790
- if (prevHash === contentHash && persistent && existsSync25(persistent.clientPath) && existsSync25(persistent.serverPath)) {
15809
+ if (prevHash === contentHash && persistent && existsSync26(persistent.clientPath) && existsSync26(persistent.serverPath)) {
15791
15810
  cacheMap.set(sourceFilePath, persistent);
15792
15811
  return persistent;
15793
15812
  }
@@ -15827,8 +15846,8 @@ const ${localName} = (source) => ${importedName}(
15827
15846
  const hasScript = descriptor.script || descriptor.scriptSetup;
15828
15847
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
15829
15848
  fs: {
15830
- fileExists: existsSync25,
15831
- readFile: (file4) => existsSync25(file4) ? readFileSync24(file4, "utf-8") : undefined,
15849
+ fileExists: existsSync26,
15850
+ readFile: (file4) => existsSync26(file4) ? readFileSync24(file4, "utf-8") : undefined,
15832
15851
  realpath: realpathSync2
15833
15852
  },
15834
15853
  id: componentId,
@@ -15990,7 +16009,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
15990
16009
  const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
15991
16010
  for (const { importPath } of routes) {
15992
16011
  const childPath = resolve28(dirname20(entryPath), importPath);
15993
- if (expanded.has(childPath) || !existsSync25(childPath)) {
16012
+ if (expanded.has(childPath) || !existsSync26(childPath)) {
15994
16013
  continue;
15995
16014
  }
15996
16015
  expanded.add(childPath);
@@ -16196,7 +16215,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
16196
16215
  continue;
16197
16216
  }
16198
16217
  const resolved = resolveHelperTsPath(helperDir, dep);
16199
- if (!existsSync25(resolved))
16218
+ if (!existsSync26(resolved))
16200
16219
  continue;
16201
16220
  if (allTsHelperPaths.has(resolved))
16202
16221
  continue;
@@ -16723,7 +16742,7 @@ __export(exports_compileAngular, {
16723
16742
  compileAngularFiles: () => compileAngularFiles,
16724
16743
  invalidateAngularJitCache: () => invalidateAngularJitCache
16725
16744
  });
16726
- import { existsSync as existsSync26, readFileSync as readFileSync25, promises as fs5 } from "fs";
16745
+ import { existsSync as existsSync27, readFileSync as readFileSync25, promises as fs5 } from "fs";
16727
16746
  import { join as join38, basename as basename12, sep as sep3, dirname as dirname21, resolve as resolve29, relative as relative14 } from "path";
16728
16747
  var {Glob: Glob6 } = globalThis.Bun;
16729
16748
  import ts14 from "typescript";
@@ -16780,7 +16799,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
16780
16799
  join38(candidate, "index.js"),
16781
16800
  join38(candidate, "index.jsx")
16782
16801
  ];
16783
- return candidates.find((file4) => existsSync26(file4));
16802
+ return candidates.find((file4) => existsSync27(file4));
16784
16803
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
16785
16804
  const baseDir = resolve29(rootDir);
16786
16805
  const tsconfigAliases = readTsconfigPathAliases();
@@ -16861,11 +16880,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
16861
16880
  }, resolveDevClientDir4 = () => {
16862
16881
  const projectRoot = process.cwd();
16863
16882
  const fromSource = resolve29(import.meta.dir, "../dev/client");
16864
- if (existsSync26(fromSource) && fromSource.startsWith(projectRoot)) {
16883
+ if (existsSync27(fromSource) && fromSource.startsWith(projectRoot)) {
16865
16884
  return fromSource;
16866
16885
  }
16867
16886
  const fromNodeModules = resolve29(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
16868
- if (existsSync26(fromNodeModules))
16887
+ if (existsSync27(fromNodeModules))
16869
16888
  return fromNodeModules;
16870
16889
  return resolve29(import.meta.dir, "./dev/client");
16871
16890
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
@@ -16911,11 +16930,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
16911
16930
  return `${path}${query}`;
16912
16931
  const importerDir = dirname21(importerOutputPath);
16913
16932
  const fileCandidate = resolve29(importerDir, `${path}.js`);
16914
- if (outputFiles?.has(fileCandidate) || existsSync26(fileCandidate)) {
16933
+ if (outputFiles?.has(fileCandidate) || existsSync27(fileCandidate)) {
16915
16934
  return `${path}.js${query}`;
16916
16935
  }
16917
16936
  const indexCandidate = resolve29(importerDir, path, "index.js");
16918
- if (outputFiles?.has(indexCandidate) || existsSync26(indexCandidate)) {
16937
+ if (outputFiles?.has(indexCandidate) || existsSync27(indexCandidate)) {
16919
16938
  return `${path}/index.js${query}`;
16920
16939
  }
16921
16940
  return `${path}.js${query}`;
@@ -16953,7 +16972,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
16953
16972
  join38(basePath, "index.mts"),
16954
16973
  join38(basePath, "index.cts")
16955
16974
  ];
16956
- return candidates.map((candidate) => resolve29(candidate)).find((candidate) => existsSync26(candidate) && !candidate.endsWith(".d.ts")) ?? null;
16975
+ return candidates.map((candidate) => resolve29(candidate)).find((candidate) => existsSync27(candidate) && !candidate.endsWith(".d.ts")) ?? null;
16957
16976
  }, readFileForAotTransform = async (fileName, readFile9) => {
16958
16977
  const hostSource = readFile9?.(fileName);
16959
16978
  if (typeof hostSource === "string")
@@ -17034,7 +17053,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
17034
17053
  if (visited.has(resolvedPath))
17035
17054
  return;
17036
17055
  visited.add(resolvedPath);
17037
- if (!existsSync26(resolvedPath) || resolvedPath.endsWith(".d.ts"))
17056
+ if (!existsSync27(resolvedPath) || resolvedPath.endsWith(".d.ts"))
17038
17057
  return;
17039
17058
  stats.filesVisited += 1;
17040
17059
  const source = await readFileForAotTransform(resolvedPath, readFile9);
@@ -17208,7 +17227,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
17208
17227
  return null;
17209
17228
  }, resolveAngularDeferImportSpecifier = () => {
17210
17229
  const sourceEntry = resolve29(import.meta.dir, "../angular/components/index.ts");
17211
- if (existsSync26(sourceEntry)) {
17230
+ if (existsSync27(sourceEntry)) {
17212
17231
  return sourceEntry.replace(/\\/g, "/");
17213
17232
  }
17214
17233
  return "@absolutejs/absolute/angular/components";
@@ -17336,7 +17355,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
17336
17355
  ${fields}
17337
17356
  `);
17338
17357
  }, readAndEscapeFile = async (filePath, stylePreprocessors) => {
17339
- if (!existsSync26(filePath)) {
17358
+ if (!existsSync27(filePath)) {
17340
17359
  throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
17341
17360
  }
17342
17361
  const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
@@ -17345,7 +17364,7 @@ ${fields}
17345
17364
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
17346
17365
  if (templateUrlMatch?.[1]) {
17347
17366
  const templatePath = join38(fileDir, templateUrlMatch[1]);
17348
- if (!existsSync26(templatePath)) {
17367
+ if (!existsSync27(templatePath)) {
17349
17368
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
17350
17369
  }
17351
17370
  const templateRaw2 = await fs5.readFile(templatePath, "utf-8");
@@ -17376,7 +17395,7 @@ ${fields}
17376
17395
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
17377
17396
  if (templateUrlMatch?.[1]) {
17378
17397
  const templatePath = join38(fileDir, templateUrlMatch[1]);
17379
- if (!existsSync26(templatePath)) {
17398
+ if (!existsSync27(templatePath)) {
17380
17399
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
17381
17400
  }
17382
17401
  const templateRaw2 = readFileSync25(templatePath, "utf-8");
@@ -17524,7 +17543,7 @@ ${fields}
17524
17543
  join38(candidate, "index.js"),
17525
17544
  join38(candidate, "index.jsx")
17526
17545
  ];
17527
- return candidates.find((file4) => existsSync26(file4));
17546
+ return candidates.find((file4) => existsSync27(file4));
17528
17547
  };
17529
17548
  const resolveLocalImport = (specifier, fromDir) => {
17530
17549
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
@@ -17599,7 +17618,7 @@ ${fields}
17599
17618
  if (visited.has(resolved))
17600
17619
  return;
17601
17620
  visited.add(resolved);
17602
- if (resolved.endsWith(".json") && existsSync26(resolved)) {
17621
+ if (resolved.endsWith(".json") && existsSync27(resolved)) {
17603
17622
  const inputDir2 = dirname21(resolved);
17604
17623
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
17605
17624
  const targetDir2 = join38(outDir, relativeDir2);
@@ -17612,7 +17631,7 @@ ${fields}
17612
17631
  let actualPath = resolved;
17613
17632
  if (!actualPath.endsWith(".ts"))
17614
17633
  actualPath += ".ts";
17615
- if (!existsSync26(actualPath))
17634
+ if (!existsSync27(actualPath))
17616
17635
  return;
17617
17636
  let sourceCode = await fs5.readFile(actualPath, "utf-8");
17618
17637
  const inlined = await inlineResources(sourceCode, dirname21(actualPath), stylePreprocessors);
@@ -17650,7 +17669,7 @@ ${fields}
17650
17669
  const isEntry = resolve29(actualPath) === resolve29(entryPath);
17651
17670
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
17652
17671
  const cacheKey2 = actualPath;
17653
- const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync26(targetPath);
17672
+ const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync27(targetPath);
17654
17673
  if (shouldWriteFile) {
17655
17674
  const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
17656
17675
  const preservedInjection = await readPreservedInjection(targetPath);
@@ -17663,7 +17682,7 @@ ${fields}
17663
17682
  };
17664
17683
  await transpileFile(inputPath);
17665
17684
  const entryOutputPath = toOutputPath(entryPath);
17666
- if (existsSync26(entryOutputPath)) {
17685
+ if (existsSync27(entryOutputPath)) {
17667
17686
  const entryOutput = await fs5.readFile(entryOutputPath, "utf-8");
17668
17687
  const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
17669
17688
  `);
@@ -17689,7 +17708,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
17689
17708
  await traceAngularPhase("aot/copy-json-resources", async () => {
17690
17709
  const cwd = process.cwd();
17691
17710
  const angularSrcDir = resolve29(outRoot);
17692
- if (!existsSync26(angularSrcDir))
17711
+ if (!existsSync27(angularSrcDir))
17693
17712
  return;
17694
17713
  const jsonGlob = new Glob6("**/*.json");
17695
17714
  for (const rel of jsonGlob.scanSync({
@@ -17724,15 +17743,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
17724
17743
  ...candidatePaths.map((file4) => resolve29(file4)),
17725
17744
  ...compiledFallbackPaths
17726
17745
  ];
17727
- let candidate = normalizedCandidates.find((file4) => existsSync26(file4) && file4.endsWith(`${sep3}${relativeEntry}`));
17746
+ let candidate = normalizedCandidates.find((file4) => existsSync27(file4) && file4.endsWith(`${sep3}${relativeEntry}`));
17728
17747
  if (!candidate) {
17729
- candidate = normalizedCandidates.find((file4) => existsSync26(file4) && file4.endsWith(`${sep3}pages${sep3}${jsName}`));
17748
+ candidate = normalizedCandidates.find((file4) => existsSync27(file4) && file4.endsWith(`${sep3}pages${sep3}${jsName}`));
17730
17749
  }
17731
17750
  if (!candidate) {
17732
- candidate = normalizedCandidates.find((file4) => existsSync26(file4) && file4.endsWith(`${sep3}${jsName}`));
17751
+ candidate = normalizedCandidates.find((file4) => existsSync27(file4) && file4.endsWith(`${sep3}${jsName}`));
17733
17752
  }
17734
17753
  if (!candidate) {
17735
- candidate = normalizedCandidates.find((file4) => existsSync26(file4));
17754
+ candidate = normalizedCandidates.find((file4) => existsSync27(file4));
17736
17755
  }
17737
17756
  return candidate;
17738
17757
  };
@@ -17740,11 +17759,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
17740
17759
  if (!rawServerFile) {
17741
17760
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
17742
17761
  }
17743
- if (rawServerFile && !existsSync26(rawServerFile)) {
17762
+ if (rawServerFile && !existsSync27(rawServerFile)) {
17744
17763
  outputs = hmr ? await compileEntry() : aotOutputs;
17745
17764
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
17746
17765
  }
17747
- if (!rawServerFile || !existsSync26(rawServerFile)) {
17766
+ if (!rawServerFile || !existsSync27(rawServerFile)) {
17748
17767
  throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
17749
17768
  ...outputs,
17750
17769
  ...compiledFallbackPaths
@@ -17780,7 +17799,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
17780
17799
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
17781
17800
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
17782
17801
  const clientFile = join38(indexesDir, jsName);
17783
- if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync26(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
17802
+ if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync27(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
17784
17803
  return {
17785
17804
  clientPath: clientFile,
17786
17805
  indexUnchanged: true,
@@ -18785,7 +18804,7 @@ __export(exports_fastHmrCompiler, {
18785
18804
  takePendingModule: () => takePendingModule,
18786
18805
  tryFastHmr: () => tryFastHmr
18787
18806
  });
18788
- import { existsSync as existsSync27, readFileSync as readFileSync26, statSync as statSync2 } from "fs";
18807
+ import { existsSync as existsSync28, readFileSync as readFileSync26, statSync as statSync2 } from "fs";
18789
18808
  import { dirname as dirname22, extname as extname9, relative as relative15, resolve as resolve30 } from "path";
18790
18809
  import ts18 from "typescript";
18791
18810
  var fail = (reason, detail, location) => ({
@@ -19109,7 +19128,7 @@ var fail = (reason, detail, location) => ({
19109
19128
  `${base}/index.tsx`
19110
19129
  ];
19111
19130
  for (const candidate of candidates) {
19112
- if (!existsSync27(candidate))
19131
+ if (!existsSync28(candidate))
19113
19132
  continue;
19114
19133
  let content;
19115
19134
  try {
@@ -19874,7 +19893,7 @@ var fail = (reason, detail, location) => ({
19874
19893
  if (visited.has(startDtsPath))
19875
19894
  return null;
19876
19895
  visited.add(startDtsPath);
19877
- if (!existsSync27(startDtsPath))
19896
+ if (!existsSync28(startDtsPath))
19878
19897
  return null;
19879
19898
  let content;
19880
19899
  try {
@@ -19927,16 +19946,16 @@ var fail = (reason, detail, location) => ({
19927
19946
  `${base}/index.d.cts`
19928
19947
  ];
19929
19948
  for (const c of candidates) {
19930
- if (existsSync27(c))
19949
+ if (existsSync28(c))
19931
19950
  return c;
19932
19951
  }
19933
19952
  return null;
19934
19953
  }, findPackageDtsForJs = (jsPath) => {
19935
19954
  const sibling = jsPath.replace(/\.[mc]?js$/, ".d.ts");
19936
- if (existsSync27(sibling))
19955
+ if (existsSync28(sibling))
19937
19956
  return sibling;
19938
19957
  const mirror = jsPath.replace(/\/dist\//, "/dist/src/").replace(/\.[mc]?js$/, ".d.ts");
19939
- if (existsSync27(mirror))
19958
+ if (existsSync28(mirror))
19940
19959
  return mirror;
19941
19960
  return null;
19942
19961
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
@@ -19949,7 +19968,7 @@ var fail = (reason, detail, location) => ({
19949
19968
  `${base}/index.tsx`
19950
19969
  ];
19951
19970
  for (const candidate of candidates) {
19952
- if (!existsSync27(candidate))
19971
+ if (!existsSync28(candidate))
19953
19972
  continue;
19954
19973
  const info = getChildComponentInfoFromTsSource(candidate, className);
19955
19974
  if (info)
@@ -20163,11 +20182,11 @@ var fail = (reason, detail, location) => ({
20163
20182
  const resolved = resolve30(componentDir, spec);
20164
20183
  for (const ext of TS_EXTENSIONS) {
20165
20184
  const candidate = resolved + ext;
20166
- if (existsSync27(candidate))
20185
+ if (existsSync28(candidate))
20167
20186
  return candidate;
20168
20187
  }
20169
20188
  const indexCandidate = resolve30(resolved, "index.ts");
20170
- if (existsSync27(indexCandidate))
20189
+ if (existsSync28(indexCandidate))
20171
20190
  return indexCandidate;
20172
20191
  }
20173
20192
  return null;
@@ -20405,7 +20424,7 @@ ${transpiled}
20405
20424
  }${staticPatch}`;
20406
20425
  }, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
20407
20426
  const abs = resolve30(componentDir, url);
20408
- if (!existsSync27(abs))
20427
+ if (!existsSync28(abs))
20409
20428
  return null;
20410
20429
  const ext = extname9(abs).toLowerCase();
20411
20430
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
@@ -20445,7 +20464,7 @@ ${block}
20445
20464
  return cached;
20446
20465
  const tsconfigPath = resolve30(projectRoot, "tsconfig.json");
20447
20466
  const opts = {};
20448
- if (existsSync27(tsconfigPath)) {
20467
+ if (existsSync28(tsconfigPath)) {
20449
20468
  try {
20450
20469
  const text2 = readFileSync26(tsconfigPath, "utf8");
20451
20470
  const parsed = ts18.parseConfigFileTextToJson(tsconfigPath, text2);
@@ -20472,7 +20491,7 @@ ${block}
20472
20491
  }, tryFastHmr = async (params) => {
20473
20492
  const { componentFilePath, className } = params;
20474
20493
  const projectRoot = params.projectRoot ?? process.cwd();
20475
- if (!existsSync27(componentFilePath)) {
20494
+ if (!existsSync28(componentFilePath)) {
20476
20495
  return fail("file-not-found", componentFilePath);
20477
20496
  }
20478
20497
  let compiler;
@@ -20528,7 +20547,7 @@ ${block}
20528
20547
  templatePath = componentFilePath;
20529
20548
  } else if (decoratorMeta.templateUrl) {
20530
20549
  const tplAbs = resolve30(componentDir, decoratorMeta.templateUrl);
20531
- if (!existsSync27(tplAbs)) {
20550
+ if (!existsSync28(tplAbs)) {
20532
20551
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
20533
20552
  }
20534
20553
  templateText = readFileSync26(tplAbs, "utf8");
@@ -21297,7 +21316,7 @@ __export(exports_compileEmber, {
21297
21316
  getEmberCompiledRoot: () => getEmberCompiledRoot,
21298
21317
  getEmberServerCompiledDir: () => getEmberServerCompiledDir
21299
21318
  });
21300
- import { existsSync as existsSync28 } from "fs";
21319
+ import { existsSync as existsSync29 } from "fs";
21301
21320
  import { mkdir as mkdir11, rm as rm8 } from "fs/promises";
21302
21321
  import { basename as basename13, dirname as dirname23, extname as extname10, join as join39, resolve as resolve31 } from "path";
21303
21322
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
@@ -21399,7 +21418,7 @@ export const importSync = (specifier) => {
21399
21418
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
21400
21419
  for (const ext of extensionsToTry) {
21401
21420
  const candidate = candidateBase + ext;
21402
- if (existsSync28(candidate))
21421
+ if (existsSync29(candidate))
21403
21422
  return { path: candidate };
21404
21423
  }
21405
21424
  return;
@@ -21419,7 +21438,7 @@ export const importSync = (specifier) => {
21419
21438
  if (standalonePackages.has(args.path))
21420
21439
  return;
21421
21440
  const internal = join39(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
21422
- if (existsSync28(internal))
21441
+ if (existsSync29(internal))
21423
21442
  return { path: internal };
21424
21443
  return;
21425
21444
  });
@@ -21549,7 +21568,7 @@ __export(exports_buildReactVendor, {
21549
21568
  buildReactVendor: () => buildReactVendor,
21550
21569
  computeVendorPaths: () => computeVendorPaths
21551
21570
  });
21552
- import { existsSync as existsSync29, mkdirSync as mkdirSync8 } from "fs";
21571
+ import { existsSync as existsSync30, mkdirSync as mkdirSync8 } from "fs";
21553
21572
  import { join as join40, resolve as resolve32 } from "path";
21554
21573
  import { rm as rm9 } from "fs/promises";
21555
21574
  var {build: bunBuild3 } = globalThis.Bun;
@@ -21563,7 +21582,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
21563
21582
  resolve32(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
21564
21583
  ];
21565
21584
  for (const candidate of candidates) {
21566
- if (existsSync29(candidate)) {
21585
+ if (existsSync30(candidate)) {
21567
21586
  return candidate.replace(/\\/g, "/");
21568
21587
  }
21569
21588
  }
@@ -22030,7 +22049,7 @@ var init_buildSvelteVendor = __esm(() => {
22030
22049
  import {
22031
22050
  copyFileSync as copyFileSync2,
22032
22051
  cpSync,
22033
- existsSync as existsSync30,
22052
+ existsSync as existsSync31,
22034
22053
  mkdirSync as mkdirSync12,
22035
22054
  readdirSync as readdirSync5,
22036
22055
  readFileSync as readFileSync27,
@@ -22263,7 +22282,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
22263
22282
  copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
22264
22283
  }
22265
22284
  }, copyReactDevIndexes = (reactIndexesPath, reactPagesPath, devIndexDir, readDir) => {
22266
- if (!existsSync30(reactIndexesPath)) {
22285
+ if (!existsSync31(reactIndexesPath)) {
22267
22286
  return;
22268
22287
  }
22269
22288
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
@@ -22279,7 +22298,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
22279
22298
  for (const entry of sveltePageEntries) {
22280
22299
  const name = basename14(entry).replace(/\.svelte(\.(ts|js))?$/, "");
22281
22300
  const indexFile = join44(svelteIndexDir, "pages", `${name}.js`);
22282
- if (!existsSync30(indexFile))
22301
+ if (!existsSync31(indexFile))
22283
22302
  continue;
22284
22303
  let content = readFileSync27(indexFile, "utf-8");
22285
22304
  const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
@@ -22292,7 +22311,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
22292
22311
  for (const entry of vuePageEntries) {
22293
22312
  const name = basename14(entry, ".vue");
22294
22313
  const indexFile = join44(vueIndexDir, `${name}.js`);
22295
- if (!existsSync30(indexFile))
22314
+ if (!existsSync31(indexFile))
22296
22315
  continue;
22297
22316
  let content = readFileSync27(indexFile, "utf-8");
22298
22317
  const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
@@ -23536,7 +23555,7 @@ ${content.slice(firstUseIdx)}`;
23536
23555
  }
23537
23556
  if (!hmr) {
23538
23557
  const reactVendorDir = join44(buildPath, "react", "vendor");
23539
- const vendorChunkPaths = existsSync30(reactVendorDir) ? [
23558
+ const vendorChunkPaths = existsSync31(reactVendorDir) ? [
23540
23559
  ...new Glob8("**/*.js").scanSync({
23541
23560
  absolute: true,
23542
23561
  cwd: reactVendorDir
@@ -23962,7 +23981,7 @@ var init_build = __esm(() => {
23962
23981
  });
23963
23982
 
23964
23983
  // src/build/buildEmberVendor.ts
23965
- import { mkdirSync as mkdirSync13, existsSync as existsSync31 } from "fs";
23984
+ import { mkdirSync as mkdirSync13, existsSync as existsSync32 } from "fs";
23966
23985
  import { join as join45 } from "path";
23967
23986
  import { rm as rm13 } from "fs/promises";
23968
23987
  var {build: bunBuild8 } = globalThis.Bun;
@@ -24016,7 +24035,7 @@ export const importSync = (specifier) => {
24016
24035
  return { resolveTo: specifier, specifier };
24017
24036
  }
24018
24037
  const emberInternalPath = join45(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
24019
- if (!existsSync31(emberInternalPath)) {
24038
+ if (!existsSync32(emberInternalPath)) {
24020
24039
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
24021
24040
  }
24022
24041
  return { resolveTo: emberInternalPath, specifier };
@@ -24048,7 +24067,7 @@ export const importSync = (specifier) => {
24048
24067
  return;
24049
24068
  }
24050
24069
  const internal = join45(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
24051
- if (existsSync31(internal)) {
24070
+ if (existsSync32(internal)) {
24052
24071
  return { path: internal };
24053
24072
  }
24054
24073
  return;
@@ -24220,7 +24239,7 @@ __export(exports_dependencyGraph, {
24220
24239
  getAffectedFiles: () => getAffectedFiles,
24221
24240
  removeFileFromGraph: () => removeFileFromGraph
24222
24241
  });
24223
- import { existsSync as existsSync32, readFileSync as readFileSync28 } from "fs";
24242
+ import { existsSync as existsSync33, readFileSync as readFileSync28 } from "fs";
24224
24243
  var {Glob: Glob9 } = globalThis.Bun;
24225
24244
  import { resolve as resolve34 } from "path";
24226
24245
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -24250,10 +24269,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24250
24269
  ];
24251
24270
  for (const ext of extensions) {
24252
24271
  const withExt = normalized + ext;
24253
- if (existsSync32(withExt))
24272
+ if (existsSync33(withExt))
24254
24273
  return withExt;
24255
24274
  }
24256
- if (existsSync32(normalized))
24275
+ if (existsSync33(normalized))
24257
24276
  return normalized;
24258
24277
  return null;
24259
24278
  }, clearExistingDependents = (graph, normalizedPath) => {
@@ -24268,7 +24287,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24268
24287
  }
24269
24288
  }, addFileToGraph = (graph, filePath) => {
24270
24289
  const normalizedPath = resolve34(filePath);
24271
- if (!existsSync32(normalizedPath))
24290
+ if (!existsSync33(normalizedPath))
24272
24291
  return;
24273
24292
  const dependencies = extractDependencies(normalizedPath);
24274
24293
  clearExistingDependents(graph, normalizedPath);
@@ -24294,7 +24313,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24294
24313
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
24295
24314
  const processedFiles = new Set;
24296
24315
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
24297
- const resolvedDirs = directories.map((dir) => resolve34(dir)).filter((dir) => existsSync32(dir));
24316
+ const resolvedDirs = directories.map((dir) => resolve34(dir)).filter((dir) => existsSync33(dir));
24298
24317
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
24299
24318
  for (const file5 of allFiles) {
24300
24319
  const fullPath = resolve34(file5);
@@ -24548,7 +24567,7 @@ var init_clientManager = __esm(() => {
24548
24567
  });
24549
24568
 
24550
24569
  // src/dev/pathUtils.ts
24551
- import { existsSync as existsSync33, readdirSync as readdirSync6, readFileSync as readFileSync29 } from "fs";
24570
+ import { existsSync as existsSync34, readdirSync as readdirSync6, readFileSync as readFileSync29 } from "fs";
24552
24571
  import { dirname as dirname25, resolve as resolve36 } from "path";
24553
24572
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
24554
24573
  if (shouldIgnorePath(filePath, resolved)) {
@@ -24722,7 +24741,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
24722
24741
  push(cfg.stylesDir);
24723
24742
  for (const candidate of ["src", "db", "assets", "styles"]) {
24724
24743
  const abs = normalizePath2(resolve36(cwd2, candidate));
24725
- if (existsSync33(abs) && !roots.includes(abs))
24744
+ if (existsSync34(abs) && !roots.includes(abs))
24726
24745
  roots.push(abs);
24727
24746
  }
24728
24747
  try {
@@ -24815,7 +24834,7 @@ var init_pathUtils = __esm(() => {
24815
24834
 
24816
24835
  // src/dev/fileWatcher.ts
24817
24836
  import { watch } from "fs";
24818
- import { existsSync as existsSync34, readdirSync as readdirSync7, statSync as statSync4 } from "fs";
24837
+ import { existsSync as existsSync35, readdirSync as readdirSync7, statSync as statSync4 } from "fs";
24819
24838
  import { dirname as dirname26, join as join46, resolve as resolve37 } from "path";
24820
24839
  var safeRemoveFromGraph = (graph, fullPath) => {
24821
24840
  try {
@@ -24882,12 +24901,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
24882
24901
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
24883
24902
  return;
24884
24903
  }
24885
- if (event === "rename" && !existsSync34(fullPath)) {
24904
+ if (event === "rename" && !existsSync35(fullPath)) {
24886
24905
  safeRemoveFromGraph(state.dependencyGraph, fullPath);
24887
24906
  onFileChange(fullPath);
24888
24907
  return;
24889
24908
  }
24890
- if (existsSync34(fullPath)) {
24909
+ if (existsSync35(fullPath)) {
24891
24910
  onFileChange(fullPath);
24892
24911
  safeAddToGraph(state.dependencyGraph, fullPath);
24893
24912
  }
@@ -24897,7 +24916,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
24897
24916
  const stylesDir = state.resolvedPaths?.stylesDir;
24898
24917
  paths.forEach((path) => {
24899
24918
  const absolutePath = resolve37(path).replace(/\\/g, "/");
24900
- if (!existsSync34(absolutePath)) {
24919
+ if (!existsSync35(absolutePath)) {
24901
24920
  return;
24902
24921
  }
24903
24922
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -24908,7 +24927,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
24908
24927
  const stylesDir = state.resolvedPaths?.stylesDir;
24909
24928
  watchPaths.forEach((path) => {
24910
24929
  const absolutePath = resolve37(path).replace(/\\/g, "/");
24911
- if (!existsSync34(absolutePath)) {
24930
+ if (!existsSync35(absolutePath)) {
24912
24931
  return;
24913
24932
  }
24914
24933
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -25847,7 +25866,7 @@ __export(exports_moduleServer, {
25847
25866
  warmCompilers: () => warmCompilers,
25848
25867
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
25849
25868
  });
25850
- import { existsSync as existsSync35, readFileSync as readFileSync32, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
25869
+ import { existsSync as existsSync36, readFileSync as readFileSync32, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
25851
25870
  import { basename as basename16, dirname as dirname29, extname as extname13, join as join48, resolve as resolve43, relative as relative17 } from "path";
25852
25871
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
25853
25872
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
@@ -25868,10 +25887,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
25868
25887
  ${stubs}
25869
25888
  `;
25870
25889
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
25871
- const directHit = extensions.find((ext) => existsSync35(resolve43(projectRoot, srcPath + ext)));
25890
+ const directHit = extensions.find((ext) => existsSync36(resolve43(projectRoot, srcPath + ext)));
25872
25891
  if (directHit)
25873
25892
  return srcPath + directHit;
25874
- const indexHit = extensions.find((ext) => existsSync35(resolve43(projectRoot, srcPath, `index${ext}`)));
25893
+ const indexHit = extensions.find((ext) => existsSync36(resolve43(projectRoot, srcPath, `index${ext}`)));
25875
25894
  if (indexHit)
25876
25895
  return `${srcPath}/index${indexHit}`;
25877
25896
  return srcPath;
@@ -25932,12 +25951,12 @@ ${stubs}
25932
25951
  if (!subpath) {
25933
25952
  const pkgDir = resolve43(projectRoot, "node_modules", packageName ?? "");
25934
25953
  const pkgJsonPath = join48(pkgDir, "package.json");
25935
- if (existsSync35(pkgJsonPath)) {
25954
+ if (existsSync36(pkgJsonPath)) {
25936
25955
  const pkg = JSON.parse(readFileSync32(pkgJsonPath, "utf-8"));
25937
25956
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
25938
25957
  if (esmEntry) {
25939
25958
  const resolved = resolve43(pkgDir, esmEntry);
25940
- if (existsSync35(resolved))
25959
+ if (existsSync36(resolved))
25941
25960
  return relative17(projectRoot, resolved);
25942
25961
  }
25943
25962
  }
@@ -26299,9 +26318,9 @@ ${code}`;
26299
26318
  const hasScript = descriptor.script || descriptor.scriptSetup;
26300
26319
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
26301
26320
  fs: {
26302
- fileExists: existsSync35,
26321
+ fileExists: existsSync36,
26303
26322
  realpath: realpathSync3,
26304
- readFile: (file5) => existsSync35(file5) ? readFileSync32(file5, "utf-8") : undefined
26323
+ readFile: (file5) => existsSync36(file5) ? readFileSync32(file5, "utf-8") : undefined
26305
26324
  },
26306
26325
  id: componentId,
26307
26326
  inlineTemplate: false
@@ -26331,11 +26350,11 @@ ${code}`;
26331
26350
  `);
26332
26351
  return result;
26333
26352
  }, resolveSvelteModulePath = (path) => {
26334
- if (existsSync35(path))
26353
+ if (existsSync36(path))
26335
26354
  return path;
26336
- if (existsSync35(`${path}.ts`))
26355
+ if (existsSync36(`${path}.ts`))
26337
26356
  return `${path}.ts`;
26338
- if (existsSync35(`${path}.js`))
26357
+ if (existsSync36(`${path}.js`))
26339
26358
  return `${path}.js`;
26340
26359
  return path;
26341
26360
  }, jsResponse = (body) => {
@@ -26486,7 +26505,7 @@ export default {};
26486
26505
  return { ext, filePath: resolveSvelteModulePath(filePath) };
26487
26506
  if (ext)
26488
26507
  return { ext, filePath };
26489
- const found = MODULE_EXTENSIONS.find((candidate) => existsSync35(filePath + candidate));
26508
+ const found = MODULE_EXTENSIONS.find((candidate) => existsSync36(filePath + candidate));
26490
26509
  if (!found)
26491
26510
  return { ext, filePath };
26492
26511
  const resolved = filePath + found;
@@ -27034,7 +27053,7 @@ var handleHTMXUpdate = async (htmxFilePath) => {
27034
27053
  var init_simpleHTMXHMR = () => {};
27035
27054
 
27036
27055
  // src/dev/rebuildTrigger.ts
27037
- import { existsSync as existsSync36, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
27056
+ import { existsSync as existsSync37, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
27038
27057
  import {
27039
27058
  basename as basename17,
27040
27059
  dirname as dirname31,
@@ -27148,7 +27167,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
27148
27167
  detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
27149
27168
  }
27150
27169
  return { ...parsed, framework: detectedFw };
27151
- }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync36(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
27170
+ }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync37(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
27152
27171
  const { config } = state;
27153
27172
  const cwd2 = process.cwd();
27154
27173
  const absDeleted = resolvePath3(deletedFile).replace(/\\/g, "/");
@@ -27194,7 +27213,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
27194
27213
  if (!dependents || dependents.size === 0) {
27195
27214
  return;
27196
27215
  }
27197
- const dependentFiles = Array.from(dependents).filter((file5) => existsSync36(file5));
27216
+ const dependentFiles = Array.from(dependents).filter((file5) => existsSync37(file5));
27198
27217
  if (dependentFiles.length === 0) {
27199
27218
  return;
27200
27219
  }
@@ -27210,7 +27229,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
27210
27229
  try {
27211
27230
  const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
27212
27231
  affectedFiles.forEach((affectedFile) => {
27213
- if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync36(affectedFile)) {
27232
+ if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync37(affectedFile)) {
27214
27233
  validFiles.push(affectedFile);
27215
27234
  processedFiles.add(affectedFile);
27216
27235
  }
@@ -27235,7 +27254,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
27235
27254
  collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
27236
27255
  }, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
27237
27256
  filePathSet.forEach((filePathInSet) => {
27238
- if (!existsSync36(filePathInSet)) {
27257
+ if (!existsSync37(filePathInSet)) {
27239
27258
  collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
27240
27259
  return;
27241
27260
  }
@@ -27500,7 +27519,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
27500
27519
  return componentFile;
27501
27520
  }
27502
27521
  const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
27503
- if (existsSync36(tsCounterpart)) {
27522
+ if (existsSync37(tsCounterpart)) {
27504
27523
  return tsCounterpart;
27505
27524
  }
27506
27525
  if (!graph)
@@ -28370,7 +28389,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
28370
28389
  }
28371
28390
  return ctx;
28372
28391
  }, runSvelteBundleRebuild = async (state, svelteFiles, config) => {
28373
- const existingSvelteFiles = svelteFiles.filter((file5) => existsSync36(file5));
28392
+ const existingSvelteFiles = svelteFiles.filter((file5) => existsSync37(file5));
28374
28393
  if (existingSvelteFiles.length === 0)
28375
28394
  return;
28376
28395
  const svelteDir = config.svelteDirectory ?? "";
@@ -30725,14 +30744,14 @@ __export(exports_devtoolsJson, {
30725
30744
  normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
30726
30745
  resolveDevtoolsUuidCachePath: () => resolveDevtoolsUuidCachePath
30727
30746
  });
30728
- import { existsSync as existsSync37, mkdirSync as mkdirSync15, readFileSync as readFileSync33, writeFileSync as writeFileSync10 } from "fs";
30747
+ import { existsSync as existsSync38, mkdirSync as mkdirSync15, readFileSync as readFileSync33, writeFileSync as writeFileSync10 } from "fs";
30729
30748
  import { dirname as dirname32, join as join51, resolve as resolve48 } from "path";
30730
30749
  import { Elysia as Elysia7 } from "elysia";
30731
30750
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
30732
30751
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
30733
30752
  return uuid;
30734
30753
  }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve48(uuidCachePath ?? join51(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
30735
- if (!existsSync37(cachePath))
30754
+ if (!existsSync38(cachePath))
30736
30755
  return null;
30737
30756
  try {
30738
30757
  const value = readFileSync33(cachePath, "utf-8").trim();
@@ -30785,13 +30804,13 @@ var exports_imageOptimizer = {};
30785
30804
  __export(exports_imageOptimizer, {
30786
30805
  imageOptimizer: () => imageOptimizer
30787
30806
  });
30788
- import { existsSync as existsSync38 } from "fs";
30807
+ import { existsSync as existsSync39 } from "fs";
30789
30808
  import { resolve as resolve49 } from "path";
30790
30809
  import { Elysia as Elysia8 } from "elysia";
30791
30810
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
30792
30811
  try {
30793
30812
  const resolved = validateSafePath(path, baseDir);
30794
- if (existsSync38(resolved))
30813
+ if (existsSync39(resolved))
30795
30814
  return resolved;
30796
30815
  return null;
30797
30816
  } catch {
@@ -31070,7 +31089,7 @@ var init_requestInspector = __esm(() => {
31070
31089
  // src/mobile/nativeAuth.ts
31071
31090
  import { readFileSync as readFileSync34 } from "fs";
31072
31091
  import { join as join52 } from "path";
31073
- var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.75.6", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.2", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
31092
+ var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.75.6", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.2", ABSOLUTE_EXPO_SYNC_CORE_VERSION = "2.31.0", ABSOLUTE_EXPO_SYNC_PACKAGE = "@absolutejs/sync-expo", ABSOLUTE_EXPO_SYNC_VERSION = "0.0.2", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
31074
31093
  try {
31075
31094
  return JSON.parse(readFileSync34(join52(projectRoot, "package.json"), "utf8"));
31076
31095
  } catch {
@@ -31120,15 +31139,27 @@ __export(exports_devDeviceAdapter, {
31120
31139
  import { access as access3, mkdtemp as mkdtemp3, rm as rm15, writeFile as writeFile9 } from "fs/promises";
31121
31140
  import { join as join53 } from "path";
31122
31141
  import { tmpdir } from "os";
31123
- var absoluteNativeDevAdapterSource = (projectRoot, mobile, resolveModule = (specifier) => specifier, expoAdapterModule = "@absolutejs/absolute/mobile/expo-devices", expoAuthModule = "@absolutejs/absolute/mobile/expo-auth") => {
31142
+ var absoluteNativeDevAdapterSource = (projectRoot, mobile, resolveModule = (specifier) => specifier, expoAdapterModule = "@absolutejs/absolute/mobile/expo-devices", expoAuthModule = "@absolutejs/absolute/mobile/expo-auth", expoSyncModule = "@absolutejs/absolute/mobile/expo-sync") => {
31124
31143
  if ((mobile.engine ?? "capacitor") === "expo") {
31125
- const auth = projectUsesAbsoluteAuth(projectRoot) ? resolveAbsoluteMobileAuthManifest(projectRoot, normalizeAbsoluteMobileConfig(mobile, projectRoot)) : undefined;
31144
+ const plan2 = resolveAbsoluteDeviceCapabilityPlan(projectRoot, "expo");
31145
+ const normalized = normalizeAbsoluteMobileConfig(mobile, projectRoot);
31146
+ const auth = projectUsesAbsoluteAuth(projectRoot) ? resolveAbsoluteMobileAuthManifest(projectRoot, normalized) : undefined;
31147
+ const sync = Boolean(auth && projectUsesAbsoluteSync(projectRoot));
31148
+ const syncConfig = sync ? {
31149
+ background: {
31150
+ endpoint: new URL("/__absolute/sync/background", normalized.productionOrigin).href,
31151
+ intervalMinutes: 15
31152
+ },
31153
+ socketTickets: true,
31154
+ storageSchema: discoverAbsoluteSyncSchema(projectRoot)
31155
+ } : undefined;
31126
31156
  return `import { installAbsoluteExpoWebDeviceAdapter } from ${JSON.stringify(expoAdapterModule)};
31127
31157
  ${auth ? `import { createAbsoluteExpoShellAuth } from ${JSON.stringify(expoAuthModule)};` : ""}
31128
- installAbsoluteExpoWebDeviceAdapter();
31129
- ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).catch(error => console.error('[Absolute Mobile] Expo Auth initialization failed:', error));` : ""}`;
31158
+ ${sync ? `import { installAbsoluteExpoShellSync } from ${JSON.stringify(expoSyncModule)};` : ""}
31159
+ installAbsoluteExpoWebDeviceAdapter(${JSON.stringify(plan2.capabilities)});
31160
+ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth => { ${sync ? `installAbsoluteExpoShellSync(auth, ${JSON.stringify(syncConfig)});` : ""} }).catch(error => console.error('[Absolute Mobile] Expo runtime initialization failed:', error));` : ""}`;
31130
31161
  }
31131
- const plan = resolveAbsoluteDeviceCapabilityPlan(projectRoot);
31162
+ const plan = resolveAbsoluteDeviceCapabilityPlan(projectRoot, "capacitor");
31132
31163
  const imports = plan.capabilities.map((name, index) => {
31133
31164
  const provider = plan.providers[name];
31134
31165
  if (!provider)
@@ -31170,11 +31201,25 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).catch(error
31170
31201
  if (path)
31171
31202
  return path;
31172
31203
  throw new TypeError("The AbsoluteJS Expo Auth development adapter is missing.");
31204
+ }, expoSyncPath = async () => {
31205
+ const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
31206
+ const path2 = join53(import.meta.dir, `shellExpoSync.${extension}`);
31207
+ try {
31208
+ await access3(path2);
31209
+ return path2;
31210
+ } catch {
31211
+ return;
31212
+ }
31213
+ }));
31214
+ const path = candidates.find((candidate) => candidate !== undefined);
31215
+ if (path)
31216
+ return path;
31217
+ throw new TypeError("The AbsoluteJS Expo Sync development adapter is missing.");
31173
31218
  }, buildAbsoluteNativeDevAdapter = async (projectRoot, mobile) => {
31174
31219
  const temporaryDirectory = await mkdtemp3(join53(tmpdir(), "absolutejs-native-dev-adapter-"));
31175
31220
  const entry = join53(temporaryDirectory, "entry.ts");
31176
31221
  try {
31177
- await writeFile9(entry, absoluteNativeDevAdapterSource(projectRoot, mobile, (specifier) => Bun.resolveSync(specifier, projectRoot), await expoAdapterPath(), await expoAuthPath()));
31222
+ await writeFile9(entry, absoluteNativeDevAdapterSource(projectRoot, mobile, (specifier) => Bun.resolveSync(specifier, projectRoot), await expoAdapterPath(), await expoAuthPath(), await expoSyncPath()));
31178
31223
  const result = await Bun.build({
31179
31224
  entrypoints: [entry],
31180
31225
  format: "esm",
@@ -31193,6 +31238,7 @@ var init_devDeviceAdapter = __esm(() => {
31193
31238
  init_config();
31194
31239
  init_deviceCapabilities();
31195
31240
  init_nativeAuth();
31241
+ init_syncSchema();
31196
31242
  });
31197
31243
 
31198
31244
  // src/core/prerender.ts
@@ -31431,7 +31477,7 @@ __export(exports_serverEntryWatcher, {
31431
31477
  });
31432
31478
  import {
31433
31479
  copyFileSync as copyFileSync4,
31434
- existsSync as existsSync41,
31480
+ existsSync as existsSync42,
31435
31481
  readdirSync as readdirSync12,
31436
31482
  readFileSync as readFileSync39,
31437
31483
  statSync as statSync8,
@@ -31462,7 +31508,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ENTRY_IMPORT_RETR
31462
31508
  if (globalThis.__absoluteEntryWatcherStarted)
31463
31509
  return;
31464
31510
  const originalEntry = process.env.ABSOLUTE_SERVER_ENTRY ?? Bun.main;
31465
- if (!originalEntry || !existsSync41(originalEntry))
31511
+ if (!originalEntry || !existsSync42(originalEntry))
31466
31512
  return;
31467
31513
  globalThis.__absoluteEntryWatcherStarted = true;
31468
31514
  globalThis.__absoluteEntryWatcherReady = false;
@@ -32461,7 +32507,7 @@ var handleHTMXPageRequest = async (pagePath, options = {}) => {
32461
32507
  };
32462
32508
  // src/core/prepare.ts
32463
32509
  import { createHash as createHash8 } from "crypto";
32464
- import { existsSync as existsSync39, readdirSync as readdirSync10, readFileSync as readFileSync36 } from "fs";
32510
+ import { existsSync as existsSync40, readdirSync as readdirSync10, readFileSync as readFileSync36 } from "fs";
32465
32511
  import { basename as basename18, join as join55, relative as relative20, resolve as resolvePath4 } from "path";
32466
32512
  import { Elysia as Elysia10, NotFound } from "elysia";
32467
32513
 
@@ -33807,7 +33853,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
33807
33853
  if (!fileName)
33808
33854
  continue;
33809
33855
  const srcPath = resolvePath4(devIndexDir, fileName);
33810
- if (!existsSync39(srcPath))
33856
+ if (!existsSync40(srcPath))
33811
33857
  continue;
33812
33858
  const rel = relative20(process.cwd(), srcPath).replace(/\\/g, "/");
33813
33859
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
@@ -33825,7 +33871,7 @@ var registerIconVersioning = (buildDir) => {
33825
33871
  const path = href.split("?")[0] ?? href;
33826
33872
  const filePath = join55(buildDir, path);
33827
33873
  let versioned = href;
33828
- if (existsSync39(filePath)) {
33874
+ if (existsSync40(filePath)) {
33829
33875
  const hash = createHash8("sha256").update(readFileSync36(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
33830
33876
  versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
33831
33877
  }
@@ -33949,7 +33995,7 @@ var prepareDev = async (config, buildDir) => {
33949
33995
  };
33950
33996
  var loadPrerenderMap = (prerenderDir) => {
33951
33997
  const map = new Map;
33952
- if (!existsSync39(prerenderDir))
33998
+ if (!existsSync40(prerenderDir))
33953
33999
  return map;
33954
34000
  let entries;
33955
34001
  try {
@@ -33968,7 +34014,7 @@ var loadPrerenderMap = (prerenderDir) => {
33968
34014
  };
33969
34015
  var loadMobileCompatibilityPlugin = async (buildDir) => {
33970
34016
  const root = join55(buildDir, ".absolutejs", "mobile-compatibility");
33971
- if (!existsSync39(join55(root, "current.json"))) {
34017
+ if (!existsSync40(join55(root, "current.json"))) {
33972
34018
  return new Elysia10({ name: "absolutejs-mobile-compatibility-empty" });
33973
34019
  }
33974
34020
  const options = await loadAbsoluteMobileMaterializedBundle(root);
@@ -34030,12 +34076,12 @@ var prepare = async (configOrPath) => {
34030
34076
  recordStep("load production manifest and island metadata", stepStartedAt);
34031
34077
  stepStartedAt = performance.now();
34032
34078
  const conventionsPath = join55(buildDir, "conventions.json");
34033
- if (existsSync39(conventionsPath)) {
34079
+ if (existsSync40(conventionsPath)) {
34034
34080
  const conventions2 = JSON.parse(readFileSync36(conventionsPath, "utf-8"));
34035
34081
  setConventions(conventions2);
34036
34082
  }
34037
34083
  const spaRoutesPath = join55(buildDir, "spa-routes.json");
34038
- if (existsSync39(spaRoutesPath)) {
34084
+ if (existsSync40(spaRoutesPath)) {
34039
34085
  setSpaRouteManifest(JSON.parse(readFileSync36(spaRoutesPath, "utf-8")));
34040
34086
  }
34041
34087
  recordStep("load production conventions", stepStartedAt);
@@ -34153,7 +34199,7 @@ import { buildGlobalWSHandler } from "elysia/ws";
34153
34199
  // src/dev/devCert.ts
34154
34200
  import {
34155
34201
  copyFileSync as copyFileSync3,
34156
- existsSync as existsSync40,
34202
+ existsSync as existsSync41,
34157
34203
  mkdirSync as mkdirSync17,
34158
34204
  readFileSync as readFileSync37,
34159
34205
  rmSync as rmSync4
@@ -34169,7 +34215,7 @@ var DEFAULT_CERTIFICATE_HOSTS = ["localhost", "127.0.0.1", "::1"];
34169
34215
  var CERTIFICATE_HOSTNAME_PATTERN = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?))*$/u;
34170
34216
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
34171
34217
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
34172
- var certFilesExist = () => existsSync40(CERT_PATH) && existsSync40(KEY_PATH);
34218
+ var certFilesExist = () => existsSync41(CERT_PATH) && existsSync41(KEY_PATH);
34173
34219
  var normalizeDevCertificateHosts = (hosts = []) => {
34174
34220
  const normalized = new Set(DEFAULT_CERTIFICATE_HOSTS);
34175
34221
  for (const host2 of hosts) {
@@ -34646,7 +34692,7 @@ var generateHeadElement = ({
34646
34692
  };
34647
34693
  // src/utils/defineEnv.ts
34648
34694
  var {env: bunEnv } = globalThis.Bun;
34649
- import { existsSync as existsSync42, readFileSync as readFileSync40 } from "fs";
34695
+ import { existsSync as existsSync43, readFileSync as readFileSync40 } from "fs";
34650
34696
  import { resolve as resolve51 } from "path";
34651
34697
 
34652
34698
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
@@ -40683,7 +40729,7 @@ ${lines.join(`
40683
40729
  var checkEnvFileSecurity = (properties) => {
40684
40730
  const cwd2 = process.cwd();
40685
40731
  const envPath = resolve51(cwd2, ".env");
40686
- if (!existsSync42(envPath))
40732
+ if (!existsSync43(envPath))
40687
40733
  return;
40688
40734
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
40689
40735
  if (sensitiveKeys.length === 0)
@@ -40693,7 +40739,7 @@ var checkEnvFileSecurity = (properties) => {
40693
40739
  if (presentKeys.length === 0)
40694
40740
  return;
40695
40741
  const gitignorePath = resolve51(cwd2, ".gitignore");
40696
- if (existsSync42(gitignorePath)) {
40742
+ if (existsSync43(gitignorePath)) {
40697
40743
  const gitignore = readFileSync40(gitignorePath, "utf-8");
40698
40744
  if (gitignore.split(`
40699
40745
  `).some((line) => line.trim() === ".env"))
@@ -40726,7 +40772,7 @@ var getEnv = (key) => {
40726
40772
  return environmentVariable;
40727
40773
  };
40728
40774
  // src/utils/projectRoot.ts
40729
- import { existsSync as existsSync43 } from "fs";
40775
+ import { existsSync as existsSync44 } from "fs";
40730
40776
  import { dirname as dirname34, resolve as resolve52 } from "path";
40731
40777
  var CONFIG_CANDIDATES = [
40732
40778
  "absolute.config.ts",
@@ -40736,7 +40782,7 @@ var CONFIG_CANDIDATES = [
40736
40782
  "absolute.config.mts",
40737
40783
  "absolute.config.cts"
40738
40784
  ];
40739
- var hasAbsoluteConfig = (directory) => CONFIG_CANDIDATES.some((name) => existsSync43(resolve52(directory, name)));
40785
+ var hasAbsoluteConfig = (directory) => CONFIG_CANDIDATES.some((name) => existsSync44(resolve52(directory, name)));
40740
40786
  var findProjectRoot = () => {
40741
40787
  const start = process.cwd();
40742
40788
  let packageRoot = null;
@@ -40745,7 +40791,7 @@ var findProjectRoot = () => {
40745
40791
  if (hasAbsoluteConfig(directory)) {
40746
40792
  return directory;
40747
40793
  }
40748
- if (packageRoot === null && existsSync43(resolve52(directory, "package.json"))) {
40794
+ if (packageRoot === null && existsSync44(resolve52(directory, "package.json"))) {
40749
40795
  packageRoot = directory;
40750
40796
  }
40751
40797
  const parent = dirname34(directory);
@@ -40994,5 +41040,5 @@ export {
40994
41040
  wrapPageHandlerWithStreamingSlots
40995
41041
  };
40996
41042
 
40997
- //# debugId=9F0F483ABB21912064756E2164756E21
41043
+ //# debugId=F434733973E11FBE64756E2164756E21
40998
41044
  //# sourceMappingURL=index.js.map