@absolutejs/absolute 0.20.0-beta.173 → 0.20.0-beta.175

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/changelog.json +71 -0
  3. package/dist/angular/browser.js +13 -2
  4. package/dist/angular/browser.js.map +3 -3
  5. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  6. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  7. package/dist/angular/index.js +113 -34
  8. package/dist/angular/index.js.map +12 -9
  9. package/dist/angular/server.js +113 -34
  10. package/dist/angular/server.js.map +12 -9
  11. package/dist/build.js +946 -731
  12. package/dist/build.js.map +40 -37
  13. package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
  14. package/dist/cli/{compile-ndc36zna.js → compile-w2z6c9vt.js} +16 -14
  15. package/dist/cli/config/server.js +85 -65
  16. package/dist/cli/{dev-x49583aj.js → dev-8br5mr7t.js} +17 -3
  17. package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
  18. package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
  19. package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
  20. package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
  21. package/dist/cli/index-4j1twret.js +22 -0
  22. package/dist/cli/{index-z794p5qg.js → index-6522t968.js} +43 -21
  23. package/dist/cli/{index-25e7k849.js → index-7z1hh3fg.js} +4 -4
  24. package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
  25. package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
  26. package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
  27. package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
  28. package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
  29. package/dist/cli/index.js +11 -11
  30. package/dist/cli/{islands-p4vgx7a2.js → islands-bx67g15t.js} +8 -7
  31. package/dist/cli/{mobile-nqdkk3gd.js → mobile-we5q51ey.js} +5 -4
  32. package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
  33. package/dist/cli/{start-t3cq57wn.js → start-srs11bm8.js} +5 -4
  34. package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
  35. package/dist/client/chunks/index-4j1snyh2.js +18 -0
  36. package/dist/client/chunks/index-4j1snyh2.js.map +10 -0
  37. package/dist/client/chunks/{index-6b66nzyf.js → index-a3rpg5kw.js} +6 -16
  38. package/dist/client/chunks/{index-6b66nzyf.js.map → index-a3rpg5kw.js.map} +3 -4
  39. package/dist/client/chunks/{islands-s2ta5ajb.js → islands-mfjmdwnb.js} +11 -4
  40. package/dist/client/chunks/{islands-s2ta5ajb.js.map → islands-mfjmdwnb.js.map} +3 -3
  41. package/dist/client/chunks/{react-dcvkaba2.js → react-sprprqzs.js} +20 -4
  42. package/dist/client/chunks/react-sprprqzs.js.map +10 -0
  43. package/dist/client/chunks/svelte-6ewphsvj.js +30 -0
  44. package/dist/client/chunks/svelte-6ewphsvj.js.map +10 -0
  45. package/dist/client/chunks/{vue-a84fzp3v.js → vue-db6ppn1f.js} +14 -4
  46. package/dist/client/chunks/vue-db6ppn1f.js.map +10 -0
  47. package/dist/client/index.js +65 -8
  48. package/dist/client/index.js.map +4 -4
  49. package/dist/client/navigation.js +5 -3
  50. package/dist/client/navigation.js.map +2 -2
  51. package/dist/client/prefetch.js +1 -1
  52. package/dist/dev/client/handlers/islands.ts +85 -0
  53. package/dist/dev/client/hmrClient.ts +6 -0
  54. package/dist/dev/importCostReport.js +45 -26
  55. package/dist/index.js +1080 -852
  56. package/dist/index.js.map +41 -38
  57. package/dist/islands/index.js +57 -10
  58. package/dist/islands/index.js.map +9 -7
  59. package/dist/mobile/index.js +115 -95
  60. package/dist/mobile/index.js.map +6 -5
  61. package/dist/mobile/remoteMacAgentEntry.js +205 -651
  62. package/dist/react/browser.js +15 -4
  63. package/dist/react/browser.js.map +5 -5
  64. package/dist/react/components/client.js +506 -0
  65. package/dist/react/components/index.js +14 -15
  66. package/dist/react/components/index.js.map +4 -4
  67. package/dist/react/components/server/index.js +728 -0
  68. package/dist/react/hooks/index.js +14 -15
  69. package/dist/react/hooks/index.js.map +4 -4
  70. package/dist/react/index.js +66 -6
  71. package/dist/react/index.js.map +11 -9
  72. package/dist/react/router/browser.js +7 -8
  73. package/dist/react/router/browser.js.map +4 -4
  74. package/dist/react/router/index.js +7 -8
  75. package/dist/react/router/index.js.map +4 -4
  76. package/dist/react/server.js +14 -1
  77. package/dist/react/server.js.map +4 -4
  78. package/dist/src/build/buildReactServerComponents.d.ts +4 -0
  79. package/dist/src/build/islandEntries.d.ts +5 -0
  80. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
  81. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
  82. package/dist/src/client/hydrators/react.d.ts +7 -0
  83. package/dist/src/client/hydrators/svelte.d.ts +3 -0
  84. package/dist/src/client/hydrators/vue.d.ts +3 -0
  85. package/dist/src/client/preserveIslandMarkup.d.ts +5 -0
  86. package/dist/src/core/islandServerGeneration.d.ts +3 -0
  87. package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
  88. package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
  89. package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
  90. package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
  91. package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
  92. package/dist/src/react/components/client.d.ts +4 -0
  93. package/dist/src/react/components/server/index.d.ts +8 -0
  94. package/dist/src/react/serverComponents/constants.d.ts +2 -1
  95. package/dist/src/utils/lazyTypescript.d.ts +3 -0
  96. package/dist/svelte/index.js +66 -6
  97. package/dist/svelte/index.js.map +10 -8
  98. package/dist/svelte/server.js +38 -3
  99. package/dist/svelte/server.js.map +6 -5
  100. package/dist/types/build.d.ts +3 -2
  101. package/dist/types/globals.d.ts +15 -0
  102. package/dist/vue/browser.js +26 -16
  103. package/dist/vue/browser.js.map +5 -5
  104. package/dist/vue/index.js +65 -21
  105. package/dist/vue/index.js.map +10 -9
  106. package/package.json +1 -1
  107. package/dist/client/chunks/react-dcvkaba2.js.map +0 -10
  108. package/dist/client/chunks/svelte-4yfa5bxa.js +0 -17
  109. package/dist/client/chunks/svelte-4yfa5bxa.js.map +0 -10
  110. package/dist/client/chunks/vue-a84fzp3v.js.map +0 -10
@@ -1,10 +1,12 @@
1
1
  // @bun
2
+ import {
3
+ lazyTypescript
4
+ } from "./index-4j1twret.js";
2
5
  import {
3
6
  toModuleSpecifier
4
- } from "./index-q3snnhyd.js";
7
+ } from "./index-enbw9484.js";
5
8
 
6
9
  // src/cli/generate/routeWiring.ts
7
- import ts from "typescript";
8
10
  import { existsSync, readFileSync, readdirSync, writeFileSync } from "fs";
9
11
  import { dirname, join } from "path";
10
12
  var DEFAULT_SEPARATOR = `
@@ -19,24 +21,24 @@ var applyEdits = (text, edits) => {
19
21
  return output;
20
22
  };
21
23
  var stripExtension = (path) => path.replace(/\.[^./\\]+$/, "");
22
- var parse = (path, text) => ts.createSourceFile(path, text, ts.ScriptTarget.Latest, true);
24
+ var parse = (path, text) => lazyTypescript.createSourceFile(path, text, lazyTypescript.ScriptTarget.Latest, true);
23
25
  var findElysiaNew = (sourceFile) => {
24
26
  let found = null;
25
27
  const visit = (node) => {
26
28
  if (found)
27
29
  return;
28
- if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "Elysia") {
30
+ if (lazyTypescript.isNewExpression(node) && lazyTypescript.isIdentifier(node.expression) && node.expression.text === "Elysia") {
29
31
  found = node;
30
32
  return;
31
33
  }
32
- ts.forEachChild(node, visit);
34
+ lazyTypescript.forEachChild(node, visit);
33
35
  };
34
36
  visit(sourceFile);
35
37
  return found;
36
38
  };
37
39
  var climbChain = (start) => {
38
40
  let top = start;
39
- while (ts.isPropertyAccessExpression(top.parent) && top.parent.expression === top && ts.isCallExpression(top.parent.parent) && top.parent.parent.expression === top.parent) {
41
+ while (lazyTypescript.isPropertyAccessExpression(top.parent) && top.parent.expression === top && lazyTypescript.isCallExpression(top.parent.parent) && top.parent.parent.expression === top.parent) {
40
42
  top = top.parent.parent;
41
43
  }
42
44
  return top;
@@ -44,22 +46,22 @@ var climbChain = (start) => {
44
46
  var collectCalls = (top) => {
45
47
  const calls = [];
46
48
  let node = top;
47
- while (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) {
49
+ while (lazyTypescript.isCallExpression(node) && lazyTypescript.isPropertyAccessExpression(node.expression)) {
48
50
  calls.push(node);
49
51
  node = node.expression.expression;
50
52
  }
51
53
  return calls.reverse();
52
54
  };
53
- var methodName = (call) => ts.isPropertyAccessExpression(call.expression) ? call.expression.name.text : null;
55
+ var methodName = (call) => lazyTypescript.isPropertyAccessExpression(call.expression) ? call.expression.name.text : null;
54
56
  var isBoundary = (call) => {
55
57
  const name = methodName(call);
56
58
  const [arg] = call.arguments;
57
- if (name === "use" && arg && ts.isIdentifier(arg)) {
59
+ if (name === "use" && arg && lazyTypescript.isIdentifier(arg)) {
58
60
  return BOUNDARY_USE.has(arg.text);
59
61
  }
60
- return name === "on" && arg !== undefined && ts.isStringLiteralLike(arg);
62
+ return name === "on" && arg !== undefined && lazyTypescript.isStringLiteralLike(arg);
61
63
  };
62
- var receiverEnd = (call) => ts.isPropertyAccessExpression(call.expression) ? call.expression.expression.getEnd() : call.getEnd();
64
+ var receiverEnd = (call) => lazyTypescript.isPropertyAccessExpression(call.expression) ? call.expression.expression.getEnd() : call.getEnd();
63
65
  var separatorBefore = (text, offset) => {
64
66
  const match = text.slice(offset).match(/^(\s*\n[ \t]*)\./);
65
67
  return match ? match[1] : DEFAULT_SEPARATOR;
@@ -76,22 +78,22 @@ var findRouteInsertion = (text, top) => {
76
78
  const sepProbe = last ? receiverEnd(last) : top.getEnd();
77
79
  return { offset, separator: separatorBefore(text, sepProbe) };
78
80
  };
79
- var namedImportDecl = (sourceFile, module) => sourceFile.statements.find((statement) => ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === module && statement.importClause !== undefined && !statement.importClause.isTypeOnly && statement.importClause.namedBindings !== undefined && ts.isNamedImports(statement.importClause.namedBindings));
81
+ var namedImportDecl = (sourceFile, module) => sourceFile.statements.find((statement) => lazyTypescript.isImportDeclaration(statement) && lazyTypescript.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === module && statement.importClause !== undefined && !statement.importClause.isTypeOnly && statement.importClause.namedBindings !== undefined && lazyTypescript.isNamedImports(statement.importClause.namedBindings));
80
82
  var importedNames = (decl) => {
81
83
  const bindings = decl.importClause?.namedBindings;
82
- if (!bindings || !ts.isNamedImports(bindings))
84
+ if (!bindings || !lazyTypescript.isNamedImports(bindings))
83
85
  return new Set;
84
86
  return new Set(bindings.elements.map((element) => (element.propertyName ?? element.name).text));
85
87
  };
86
88
  var lastImportEnd = (sourceFile) => {
87
89
  let end = 0;
88
90
  for (const statement of sourceFile.statements) {
89
- if (ts.isImportDeclaration(statement))
91
+ if (lazyTypescript.isImportDeclaration(statement))
90
92
  end = statement.getEnd();
91
93
  }
92
94
  return end;
93
95
  };
94
- var hasTypeImport = (sourceFile, module, local) => sourceFile.statements.some((statement) => ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === module && statement.getText().includes(local));
96
+ var hasTypeImport = (sourceFile, module, local) => sourceFile.statements.some((statement) => lazyTypescript.isImportDeclaration(statement) && lazyTypescript.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === module && statement.getText().includes(local));
95
97
  var renderTypeImport = (spec) => {
96
98
  if (spec.kind === "typeDefault") {
97
99
  return `import type ${spec.local} from '${spec.module}';`;
@@ -114,7 +116,7 @@ var groupNamed = (specs) => {
114
116
  };
115
117
  var mergeNamedEdit = (decl, sourceFile, missing) => {
116
118
  const bindings = decl.importClause?.namedBindings;
117
- if (!bindings || !ts.isNamedImports(bindings))
119
+ if (!bindings || !lazyTypescript.isNamedImports(bindings))
118
120
  return null;
119
121
  const { elements } = bindings;
120
122
  const additions = missing.join(", ");
@@ -0,0 +1,22 @@
1
+ // @bun
2
+ // src/utils/lazyTypescript.ts
3
+ import { createRequire } from "module";
4
+ var loaded;
5
+ var loadTypescript = () => {
6
+ if (loaded)
7
+ return loaded;
8
+ const requireFromHere = createRequire(import.meta.url);
9
+ const typescript = requireFromHere("typescript");
10
+ loaded = typescript;
11
+ return typescript;
12
+ };
13
+ var createLazyTypescript = () => {
14
+ const target = Object.create(null);
15
+ return new Proxy(target, {
16
+ get: (_target, key) => Reflect.get(loadTypescript(), key),
17
+ has: (_target, key) => Reflect.has(loadTypescript(), key)
18
+ });
19
+ };
20
+ var lazyTypescript = createLazyTypescript();
21
+
22
+ export { lazyTypescript };
@@ -1,11 +1,16 @@
1
1
  // @bun
2
+ import {
3
+ lazyTypescript
4
+ } from "./index-4j1twret.js";
5
+
2
6
  // src/core/islandManifest.ts
3
7
  var toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1);
4
8
  var getIslandManifestKey = (framework, component) => `Island${toIslandFrameworkSegment(framework)}${component}`;
5
9
 
6
10
  // src/build/islandEntries.ts
11
+ import { mkdirSync, rmSync, statSync, writeFileSync } from "fs";
7
12
  import { dirname, extname, join, relative, resolve } from "path";
8
- import ts from "typescript";
13
+ import { fileURLToPath } from "url";
9
14
  // src/core/islands.ts
10
15
  var isRecord = (value) => typeof value === "object" && value !== null;
11
16
  var getIslandBuildReference = (component) => {
@@ -31,12 +36,29 @@ var resolveRegistryExport = (mod) => {
31
36
  var hasSvelteImport = (source) => /from\s+['"][^'"]+\.svelte['"]/.test(source);
32
37
  var resolveIslandSourcePath = (registryPath, sourcePath) => {
33
38
  if (sourcePath.startsWith("file://")) {
34
- return new URL(sourcePath).pathname;
39
+ return fileURLToPath(sourcePath);
35
40
  }
36
41
  return resolve(dirname(registryPath), sourcePath);
37
42
  };
43
+ var isExistingFile = (path) => {
44
+ try {
45
+ return statSync(path).isFile();
46
+ } catch {
47
+ return false;
48
+ }
49
+ };
50
+ var resolveIslandSourceFile = (registryPath, sourcePath) => {
51
+ const joinedPath = resolveIslandSourcePath(registryPath, sourcePath);
52
+ if (isExistingFile(joinedPath))
53
+ return joinedPath;
54
+ try {
55
+ return Bun.resolveSync(joinedPath, dirname(registryPath));
56
+ } catch {
57
+ return joinedPath;
58
+ }
59
+ };
38
60
  var getObjectPropertyName = (name) => {
39
- if (ts.isIdentifier(name) || ts.isStringLiteral(name)) {
61
+ if (lazyTypescript.isIdentifier(name) || lazyTypescript.isStringLiteral(name)) {
40
62
  return name.text;
41
63
  }
42
64
  return null;
@@ -51,7 +73,7 @@ var collectDefaultImport = (imports, importClause, source) => {
51
73
  };
52
74
  var collectNamedImports = (imports, importClause, source) => {
53
75
  const bindings = importClause.namedBindings;
54
- if (!bindings || !ts.isNamedImports(bindings))
76
+ if (!bindings || !lazyTypescript.isNamedImports(bindings))
55
77
  return;
56
78
  for (const element of bindings.elements) {
57
79
  imports.set(element.name.text, {
@@ -67,7 +89,7 @@ var collectRegistryHelperImports = (importClause, source, registryFactoryNames,
67
89
  const bindings = importClause.namedBindings;
68
90
  if (!bindings)
69
91
  return;
70
- if (ts.isNamespaceImport(bindings)) {
92
+ if (lazyTypescript.isNamespaceImport(bindings)) {
71
93
  registryNamespaceNames.add(bindings.name.text);
72
94
  return;
73
95
  }
@@ -87,13 +109,13 @@ var addRegistryEntries = (frameworkNode, framework, imports, definitions, regist
87
109
  const frameworkRegistry = registry[framework] ?? {};
88
110
  registry[framework] = frameworkRegistry;
89
111
  for (const property of frameworkNode.properties) {
90
- if (!ts.isPropertyAssignment(property) && !ts.isShorthandPropertyAssignment(property))
112
+ if (!lazyTypescript.isPropertyAssignment(property) && !lazyTypescript.isShorthandPropertyAssignment(property))
91
113
  continue;
92
114
  const componentName = getObjectPropertyName(property.name);
93
115
  if (!componentName)
94
116
  continue;
95
- const initializer = ts.isPropertyAssignment(property) ? property.initializer : property.name;
96
- if (!ts.isIdentifier(initializer))
117
+ const initializer = lazyTypescript.isPropertyAssignment(property) ? property.initializer : property.name;
118
+ if (!lazyTypescript.isIdentifier(initializer))
97
119
  continue;
98
120
  const reference = imports.get(initializer.text);
99
121
  if (!reference)
@@ -108,7 +130,7 @@ var addRegistryEntries = (frameworkNode, framework, imports, definitions, regist
108
130
  };
109
131
  var processDefineIslandRegistry = (node, imports, definitions, registry) => {
110
132
  const [firstArg] = node.arguments;
111
- if (!firstArg || !ts.isObjectLiteralExpression(firstArg))
133
+ if (!firstArg || !lazyTypescript.isObjectLiteralExpression(firstArg))
112
134
  return;
113
135
  const validFrameworks = [
114
136
  "react",
@@ -117,7 +139,7 @@ var processDefineIslandRegistry = (node, imports, definitions, registry) => {
117
139
  "angular"
118
140
  ];
119
141
  for (const property of firstArg.properties) {
120
- if (!ts.isPropertyAssignment(property))
142
+ if (!lazyTypescript.isPropertyAssignment(property))
121
143
  continue;
122
144
  const frameworkName = getObjectPropertyName(property.name);
123
145
  if (!frameworkName)
@@ -125,31 +147,31 @@ var processDefineIslandRegistry = (node, imports, definitions, registry) => {
125
147
  const framework = validFrameworks.find((f) => f === frameworkName);
126
148
  if (!framework)
127
149
  continue;
128
- if (!ts.isObjectLiteralExpression(property.initializer))
150
+ if (!lazyTypescript.isObjectLiteralExpression(property.initializer))
129
151
  continue;
130
152
  addRegistryEntries(property.initializer, framework, imports, definitions, registry);
131
153
  }
132
154
  };
133
155
  var walkRegistryNode = (node, imports, registryFactoryNames, registryNamespaceNames, definitions, registry) => {
134
- if (ts.isCallExpression(node) && isDefineIslandRegistryCall(node.expression, registryFactoryNames, registryNamespaceNames)) {
156
+ if (lazyTypescript.isCallExpression(node) && isDefineIslandRegistryCall(node.expression, registryFactoryNames, registryNamespaceNames)) {
135
157
  processDefineIslandRegistry(node, imports, definitions, registry);
136
158
  }
137
- ts.forEachChild(node, (child) => walkRegistryNode(child, imports, registryFactoryNames, registryNamespaceNames, definitions, registry));
159
+ lazyTypescript.forEachChild(node, (child) => walkRegistryNode(child, imports, registryFactoryNames, registryNamespaceNames, definitions, registry));
138
160
  };
139
161
  var isDefineIslandRegistryCall = (expression, registryFactoryNames, registryNamespaceNames) => {
140
- if (ts.isIdentifier(expression)) {
162
+ if (lazyTypescript.isIdentifier(expression)) {
141
163
  return registryFactoryNames.has(expression.text);
142
164
  }
143
- return ts.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && ts.isIdentifier(expression.expression) && registryNamespaceNames.has(expression.expression.text);
165
+ return lazyTypescript.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && lazyTypescript.isIdentifier(expression.expression) && registryNamespaceNames.has(expression.expression.text);
144
166
  };
145
167
  var hasIslandRegistryNamedExport = (sourceFile) => {
146
168
  for (const statement of sourceFile.statements) {
147
- if (ts.isVariableStatement(statement) && statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) && statement.declarationList.declarations.some((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === "islandRegistry")) {
169
+ if (lazyTypescript.isVariableStatement(statement) && statement.modifiers?.some((modifier) => modifier.kind === lazyTypescript.SyntaxKind.ExportKeyword) && statement.declarationList.declarations.some((declaration) => lazyTypescript.isIdentifier(declaration.name) && declaration.name.text === "islandRegistry")) {
148
170
  return true;
149
171
  }
150
- if (!ts.isExportDeclaration(statement) || !statement.exportClause)
172
+ if (!lazyTypescript.isExportDeclaration(statement) || !statement.exportClause)
151
173
  continue;
152
- if (!ts.isNamedExports(statement.exportClause))
174
+ if (!lazyTypescript.isNamedExports(statement.exportClause))
153
175
  continue;
154
176
  if (statement.exportClause.elements.some((element) => element.name.text === "islandRegistry")) {
155
177
  return true;
@@ -159,7 +181,7 @@ var hasIslandRegistryNamedExport = (sourceFile) => {
159
181
  };
160
182
  var collectImportDeclarations = (sourceFile, registryPath, imports, registryFactoryNames, registryNamespaceNames) => {
161
183
  for (const statement of sourceFile.statements) {
162
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier))
184
+ if (!lazyTypescript.isImportDeclaration(statement) || !lazyTypescript.isStringLiteral(statement.moduleSpecifier))
163
185
  continue;
164
186
  const { importClause } = statement;
165
187
  if (!importClause)
@@ -171,7 +193,7 @@ var collectImportDeclarations = (sourceFile, registryPath, imports, registryFact
171
193
  }
172
194
  };
173
195
  var parseIslandRegistryBuildInfo = (registrySource, registryPath) => {
174
- const sourceFile = ts.createSourceFile(registryPath, registrySource, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
196
+ const sourceFile = lazyTypescript.createSourceFile(registryPath, registrySource, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.TS);
175
197
  const imports = new Map;
176
198
  const registryFactoryNames = new Set(["defineIslandRegistry"]);
177
199
  const registryNamespaceNames = new Set;
@@ -229,4 +251,4 @@ var loadIslandRegistryBuildInfo = async (registryPath) => {
229
251
  };
230
252
  };
231
253
 
232
- export { getIslandManifestKey, loadIslandRegistryBuildInfo };
254
+ export { getIslandManifestKey, resolveIslandSourceFile, loadIslandRegistryBuildInfo };
@@ -9,9 +9,6 @@ import {
9
9
  registerInstance,
10
10
  resolveProjectName
11
11
  } from "./index-71gchbzt.js";
12
- import {
13
- loadIslandRegistryBuildInfo
14
- } from "./index-z794p5qg.js";
15
12
  import {
16
13
  createIslandRegistryDefinitionPlugin,
17
14
  createBunStringRawUnicodePlugin,
@@ -20,7 +17,7 @@ import {
20
17
  createElysiaOpenApiTypeboxPlugin,
21
18
  createOptionalPeerPlugin,
22
19
  resolveServerBundleExternals
23
- } from "./index-rervww4p.js";
20
+ } from "./index-zyd80s3h.js";
24
21
  import {
25
22
  normalizeAbsoluteMobileConfig2
26
23
  } from "./index-t7yf3vxs.js";
@@ -30,6 +27,9 @@ import {
30
27
  import {
31
28
  loadConfig
32
29
  } from "./index-wk0pyxrg.js";
30
+ import {
31
+ loadIslandRegistryBuildInfo
32
+ } from "./index-6522t968.js";
33
33
  import {
34
34
  stripStringsAndComments
35
35
  } from "./index-prs14ys9.js";
@@ -9,6 +9,9 @@ import {
9
9
  projectUsesAbsoluteSync2,
10
10
  resolveAbsoluteMobileAuthManifest2
11
11
  } from "./index-pch0v1z6.js";
12
+ import {
13
+ lazyTypescript
14
+ } from "./index-4j1twret.js";
12
15
 
13
16
  // src/mobile/expoProject.ts
14
17
  import {
@@ -544,7 +547,6 @@ var discoverAbsoluteSyncSchema = (projectRoot) => {
544
547
  import { existsSync, readFileSync as readFileSync2 } from "fs";
545
548
  import { extname, join as join3, relative, resolve as resolve3 } from "path";
546
549
  import { fileURLToPath } from "url";
547
- import ts from "typescript";
548
550
  var DEVICES_PACKAGE = "@absolutejs/devices";
549
551
  var ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABILITIES = [
550
552
  "keyboard",
@@ -749,29 +751,29 @@ var importedCapabilities = (source, file) => {
749
751
  const names = new Set;
750
752
  const namespaces = new Set;
751
753
  const visit = (node) => {
752
- if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text === DEVICES_PACKAGE && !node.importClause?.isTypeOnly) {
754
+ if (lazyTypescript.isImportDeclaration(node) && lazyTypescript.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text === DEVICES_PACKAGE && !node.importClause?.isTypeOnly) {
753
755
  const bindings = node.importClause?.namedBindings;
754
- if (bindings && ts.isNamedImports(bindings)) {
756
+ if (bindings && lazyTypescript.isNamedImports(bindings)) {
755
757
  for (const element of bindings.elements)
756
758
  if (!element.isTypeOnly)
757
759
  names.add((element.propertyName ?? element.name).text);
758
760
  }
759
- if (bindings && ts.isNamespaceImport(bindings))
761
+ if (bindings && lazyTypescript.isNamespaceImport(bindings))
760
762
  namespaces.add(bindings.name.text);
761
763
  }
762
- if (ts.isExportDeclaration(node) && !node.isTypeOnly && node.moduleSpecifier !== undefined && ts.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text === DEVICES_PACKAGE && node.exportClause && ts.isNamedExports(node.exportClause)) {
764
+ if (lazyTypescript.isExportDeclaration(node) && !node.isTypeOnly && node.moduleSpecifier !== undefined && lazyTypescript.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text === DEVICES_PACKAGE && node.exportClause && lazyTypescript.isNamedExports(node.exportClause)) {
763
765
  for (const element of node.exportClause.elements)
764
766
  if (!element.isTypeOnly)
765
767
  names.add((element.propertyName ?? element.name).text);
766
768
  }
767
- if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && namespaces.has(node.expression.text))
769
+ if (lazyTypescript.isPropertyAccessExpression(node) && lazyTypescript.isIdentifier(node.expression) && namespaces.has(node.expression.text))
768
770
  names.add(node.name.text);
769
- ts.forEachChild(node, visit);
771
+ lazyTypescript.forEachChild(node, visit);
770
772
  };
771
773
  const extension = extname(file).toLowerCase();
772
774
  const sources = extension === ".svelte" || extension === ".vue" ? [...source.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/giu)].map((match) => match[1]).filter((value) => value !== undefined) : [source];
773
775
  for (const [index, script] of sources.entries())
774
- visit(ts.createSourceFile(`${file}#script-${index}`, script, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX));
776
+ visit(lazyTypescript.createSourceFile(`${file}#script-${index}`, script, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.TSX));
775
777
  return names;
776
778
  };
777
779
  var assertAbsoluteDeviceCapabilityPackages = (projectRoot, plan) => {
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  loadConfig
4
4
  } from "./index-wk0pyxrg.js";
5
+ import {
6
+ lazyTypescript
7
+ } from "./index-4j1twret.js";
5
8
  import {
6
9
  isRecord
7
10
  } from "./index-tx0kx9zx.js";
@@ -135,12 +138,10 @@ var frameworks = {
135
138
  import { dirname, isAbsolute, join, relative, resolve as resolve3 } from "path";
136
139
 
137
140
  // src/cli/config/absolute/resolveAbsoluteConfig.ts
138
- import ts2 from "typescript";
139
141
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
140
142
  import { resolve as resolve2 } from "path";
141
143
 
142
144
  // src/cli/config/schema/fromType.ts
143
- import ts from "typescript";
144
145
  import {
145
146
  existsSync,
146
147
  mkdirSync,
@@ -160,14 +161,14 @@ var isFrameworkRepo = (cwd) => {
160
161
  }
161
162
  };
162
163
  var compilerOptionsFor = (cwd) => {
163
- const tsconfigPath = ts.findConfigFile(cwd, ts.sys.fileExists, "tsconfig.json");
164
+ const tsconfigPath = lazyTypescript.findConfigFile(cwd, lazyTypescript.sys.fileExists, "tsconfig.json");
164
165
  const parseConfigHost = {
165
- ...ts.sys,
166
+ ...lazyTypescript.sys,
166
167
  onUnRecoverableConfigFileDiagnostic: () => {}
167
168
  };
168
- const base = tsconfigPath && ts.getParsedCommandLineOfConfigFile(tsconfigPath, {}, parseConfigHost)?.options;
169
+ const base = tsconfigPath && lazyTypescript.getParsedCommandLineOfConfigFile(tsconfigPath, {}, parseConfigHost)?.options;
169
170
  return {
170
- ...base ?? ts.getDefaultCompilerOptions(),
171
+ ...base ?? lazyTypescript.getDefaultCompilerOptions(),
171
172
  noEmit: true,
172
173
  skipDefaultLibCheck: true,
173
174
  skipLibCheck: true,
@@ -223,7 +224,7 @@ var writeDiskCache = (cwd, typeName, signature, fields, specifier) => {
223
224
  writeFileSync(cacheFile(cwd, typeName, specifier), JSON.stringify({ fields, signature }));
224
225
  } catch {}
225
226
  };
226
- var docOf = (symbol, checker) => ts.displayPartsToString(symbol.getDocumentationComment(checker)).trim();
227
+ var docOf = (symbol, checker) => lazyTypescript.displayPartsToString(symbol.getDocumentationComment(checker)).trim();
227
228
  var typeOfSymbol = (symbol, checker) => {
228
229
  const declaration = symbol.valueDeclaration ?? symbol.declarations?.[0];
229
230
  return declaration ? checker.getTypeOfSymbolAtLocation(symbol, declaration) : checker.getDeclaredTypeOfSymbol(symbol);
@@ -244,10 +245,10 @@ var toSchema = (type, checker, depth, seen) => {
244
245
  });
245
246
  if (depth > MAX_DEPTH)
246
247
  return opaque();
247
- const parts = unionParts(type).filter((part) => !hasFlag(part, ts.TypeFlags.Undefined) && !hasFlag(part, ts.TypeFlags.Null));
248
+ const parts = unionParts(type).filter((part) => !hasFlag(part, lazyTypescript.TypeFlags.Undefined) && !hasFlag(part, lazyTypescript.TypeFlags.Null));
248
249
  if (parts.length === 0)
249
250
  return opaque();
250
- if (parts.every((part) => hasFlag(part, ts.TypeFlags.BooleanLike))) {
251
+ if (parts.every((part) => hasFlag(part, lazyTypescript.TypeFlags.BooleanLike))) {
251
252
  return { kind: "boolean" };
252
253
  }
253
254
  const choices = parts.map(literalChoice);
@@ -268,13 +269,13 @@ var single = (type, checker, depth, seen) => {
268
269
  kind: "opaque",
269
270
  typeText: checker.typeToString(type)
270
271
  });
271
- if (hasFlag(type, ts.TypeFlags.BooleanLike))
272
+ if (hasFlag(type, lazyTypescript.TypeFlags.BooleanLike))
272
273
  return { kind: "boolean" };
273
- if (hasFlag(type, ts.TypeFlags.NumberLike))
274
+ if (hasFlag(type, lazyTypescript.TypeFlags.NumberLike))
274
275
  return { kind: "number" };
275
- if (hasFlag(type, ts.TypeFlags.StringLike))
276
+ if (hasFlag(type, lazyTypescript.TypeFlags.StringLike))
276
277
  return { kind: "string" };
277
- if (!hasFlag(type, ts.TypeFlags.Object))
278
+ if (!hasFlag(type, lazyTypescript.TypeFlags.Object))
278
279
  return opaque();
279
280
  if (type.getCallSignatures().length > 0)
280
281
  return opaque();
@@ -295,7 +296,7 @@ var single = (type, checker, depth, seen) => {
295
296
  const fields = props.map((symbol) => ({
296
297
  description: docOf(symbol, checker),
297
298
  name: symbol.getName(),
298
- optional: (symbol.flags & ts.SymbolFlags.Optional) !== 0,
299
+ optional: (symbol.flags & lazyTypescript.SymbolFlags.Optional) !== 0,
299
300
  schema: toSchema(typeOfSymbol(symbol, checker), checker, depth + 1, seen)
300
301
  }));
301
302
  return { fields, kind: "object" };
@@ -317,21 +318,21 @@ var introspectFrom = (cwd, specifier, typeName, options, exclude) => {
317
318
  declare const value: ${typeName};
318
319
  export { value };
319
320
  `;
320
- const host = ts.createCompilerHost(options, true);
321
+ const host = lazyTypescript.createCompilerHost(options, true);
321
322
  const getSourceFile = host.getSourceFile.bind(host);
322
- host.getSourceFile = (fileName, languageVersion, onError, shouldCreate) => fileName === virtualPath ? ts.createSourceFile(fileName, source, languageVersion, true) : getSourceFile(fileName, languageVersion, onError, shouldCreate);
323
+ host.getSourceFile = (fileName, languageVersion, onError, shouldCreate) => fileName === virtualPath ? lazyTypescript.createSourceFile(fileName, source, languageVersion, true) : getSourceFile(fileName, languageVersion, onError, shouldCreate);
323
324
  const fileExists = host.fileExists.bind(host);
324
325
  host.fileExists = (fileName) => fileName === virtualPath ? true : fileExists(fileName);
325
326
  const readFile = host.readFile.bind(host);
326
327
  host.readFile = (fileName) => fileName === virtualPath ? source : readFile(fileName);
327
- const program = ts.createProgram([virtualPath], options, host);
328
+ const program = lazyTypescript.createProgram([virtualPath], options, host);
328
329
  const checker = program.getTypeChecker();
329
330
  const sourceFile = program.getSourceFile(virtualPath);
330
331
  if (!sourceFile)
331
332
  return [];
332
333
  const nodes = [];
333
334
  sourceFile.forEachChild((node) => {
334
- if (!ts.isVariableStatement(node))
335
+ if (!lazyTypescript.isVariableStatement(node))
335
336
  return;
336
337
  const [declaration] = node.declarationList.declarations;
337
338
  if (!declaration)
@@ -344,7 +345,7 @@ export { value };
344
345
  nodes.push({
345
346
  description: docOf(symbol, checker),
346
347
  name,
347
- optional: (symbol.flags & ts.SymbolFlags.Optional) !== 0,
348
+ optional: (symbol.flags & lazyTypescript.SymbolFlags.Optional) !== 0,
348
349
  schema: toSchema(typeOfSymbol(symbol, checker), checker, 1, new Set)
349
350
  });
350
351
  }
@@ -405,18 +406,18 @@ var findConfigPath = (cwd, override) => {
405
406
  }
406
407
  return null;
407
408
  };
408
- var parseSource = (configPath, text) => ts2.createSourceFile(configPath, text, ts2.ScriptTarget.Latest, true);
409
+ var parseSource = (configPath, text) => lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true);
409
410
  var findConfigObject = (sourceFile) => {
410
411
  const pending = [sourceFile];
411
412
  while (pending.length > 0) {
412
413
  const node = pending.pop();
413
414
  if (!node)
414
415
  continue;
415
- const [firstArgument] = ts2.isCallExpression(node) ? node.arguments : [];
416
- if (ts2.isCallExpression(node) && ts2.isIdentifier(node.expression) && node.expression.text === "defineConfig" && firstArgument && ts2.isObjectLiteralExpression(firstArgument)) {
416
+ const [firstArgument] = lazyTypescript.isCallExpression(node) ? node.arguments : [];
417
+ if (lazyTypescript.isCallExpression(node) && lazyTypescript.isIdentifier(node.expression) && node.expression.text === "defineConfig" && firstArgument && lazyTypescript.isObjectLiteralExpression(firstArgument)) {
417
418
  return firstArgument;
418
419
  }
419
- if (ts2.isExportAssignment(node) && ts2.isObjectLiteralExpression(node.expression)) {
420
+ if (lazyTypescript.isExportAssignment(node) && lazyTypescript.isObjectLiteralExpression(node.expression)) {
420
421
  return node.expression;
421
422
  }
422
423
  node.forEachChild((child) => {
@@ -430,25 +431,25 @@ var parseConfigObject = (configPath) => {
430
431
  return { object: findConfigObject(parseSource(configPath, text)), text };
431
432
  };
432
433
  var evalLiteral = (node) => {
433
- if (ts2.isStringLiteralLike(node)) {
434
+ if (lazyTypescript.isStringLiteralLike(node)) {
434
435
  return { opaque: false, value: node.text };
435
436
  }
436
- if (node.kind === ts2.SyntaxKind.TrueKeyword) {
437
+ if (node.kind === lazyTypescript.SyntaxKind.TrueKeyword) {
437
438
  return { opaque: false, value: true };
438
439
  }
439
- if (node.kind === ts2.SyntaxKind.FalseKeyword) {
440
+ if (node.kind === lazyTypescript.SyntaxKind.FalseKeyword) {
440
441
  return { opaque: false, value: false };
441
442
  }
442
- if (node.kind === ts2.SyntaxKind.NullKeyword) {
443
+ if (node.kind === lazyTypescript.SyntaxKind.NullKeyword) {
443
444
  return { opaque: false, value: null };
444
445
  }
445
- if (ts2.isNumericLiteral(node)) {
446
+ if (lazyTypescript.isNumericLiteral(node)) {
446
447
  return { opaque: false, value: Number(node.text) };
447
448
  }
448
- if (ts2.isPrefixUnaryExpression(node) && node.operator === ts2.SyntaxKind.MinusToken && ts2.isNumericLiteral(node.operand)) {
449
+ if (lazyTypescript.isPrefixUnaryExpression(node) && node.operator === lazyTypescript.SyntaxKind.MinusToken && lazyTypescript.isNumericLiteral(node.operand)) {
449
450
  return { opaque: false, value: -Number(node.operand.text) };
450
451
  }
451
- if (ts2.isArrayLiteralExpression(node)) {
452
+ if (lazyTypescript.isArrayLiteralExpression(node)) {
452
453
  const items = [];
453
454
  for (const element of node.elements) {
454
455
  const result = evalLiteral(element);
@@ -458,10 +459,10 @@ var evalLiteral = (node) => {
458
459
  }
459
460
  return { opaque: false, value: items };
460
461
  }
461
- if (ts2.isObjectLiteralExpression(node)) {
462
+ if (lazyTypescript.isObjectLiteralExpression(node)) {
462
463
  const object = {};
463
464
  for (const property of node.properties) {
464
- if (!ts2.isPropertyAssignment(property) || !(ts2.isIdentifier(property.name) || ts2.isStringLiteral(property.name))) {
465
+ if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
465
466
  return { opaque: true, value: undefined };
466
467
  }
467
468
  const result = evalLiteral(property.initializer);
@@ -480,7 +481,7 @@ var readCurrent = (configPath) => {
480
481
  if (!object)
481
482
  return { current, opaqueKeys };
482
483
  for (const property of object.properties) {
483
- if (!ts2.isPropertyAssignment(property) || !(ts2.isIdentifier(property.name) || ts2.isStringLiteral(property.name))) {
484
+ if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
484
485
  continue;
485
486
  }
486
487
  const name = property.name.text;
@@ -1,13 +1,15 @@
1
1
  // @bun
2
+ import {
3
+ lazyTypescript
4
+ } from "./index-4j1twret.js";
2
5
  import {
3
6
  findConfigObject
4
- } from "./index-q3snnhyd.js";
7
+ } from "./index-enbw9484.js";
5
8
  import {
6
9
  isRecord
7
10
  } from "./index-tx0kx9zx.js";
8
11
 
9
12
  // src/cli/config/absolute/editAbsoluteConfig.ts
10
- import ts from "typescript";
11
13
  import { readFileSync, writeFileSync } from "fs";
12
14
 
13
15
  // src/cli/config/schema/serialize.ts
@@ -55,11 +57,11 @@ var lineStartOffset = (text, position) => {
55
57
  return index;
56
58
  };
57
59
  var indentBefore = (text, position) => text.slice(lineStartOffset(text, position), position);
58
- var findProperty = (object, name) => object.properties.find((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) || ts.isStringLiteral(property.name)) && property.name.text === name);
60
+ var findProperty = (object, name) => object.properties.find((property) => lazyTypescript.isPropertyAssignment(property) && (lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name)) && property.name.text === name);
59
61
  var applyAbsoluteConfigEdit = (configPath, request) => {
60
62
  try {
61
63
  const text = readFileSync(configPath, "utf-8");
62
- const sourceFile = ts.createSourceFile(configPath, text, ts.ScriptTarget.Latest, true);
64
+ const sourceFile = lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true);
63
65
  const object = findConfigObject(sourceFile);
64
66
  if (!object) {
65
67
  return {