@absolutejs/absolute 0.20.0-beta.172 → 0.20.0-beta.174

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 (93) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +3 -2
  3. package/changelog.json +68 -0
  4. package/dist/angular/browser.js +12 -12
  5. package/dist/angular/browser.js.map +6 -7
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +2 -6
  7. package/dist/angular/components/core/streamingSlotRegistry.js +3 -7
  8. package/dist/angular/components/defer-slot.component.js +12 -7
  9. package/dist/angular/components/stream-slot.component.js +3 -1
  10. package/dist/angular/index.js +86 -39
  11. package/dist/angular/index.js.map +11 -10
  12. package/dist/angular/server.js +85 -38
  13. package/dist/angular/server.js.map +10 -9
  14. package/dist/build/buildWorker.js +135 -57
  15. package/dist/build.js +1817 -1623
  16. package/dist/build.js.map +38 -36
  17. package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
  18. package/dist/cli/{compile-ndc36zna.js → compile-n6fs2vmx.js} +16 -14
  19. package/dist/cli/config/server.js +128 -77
  20. package/dist/cli/{dev-x49583aj.js → dev-6h1f0mzq.js} +1 -1
  21. package/dist/cli/{doctor-repprx92.js → doctor-m36tmx4d.js} +70 -15
  22. package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
  23. package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
  24. package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
  25. package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
  26. package/dist/cli/index-4j1twret.js +22 -0
  27. package/dist/cli/{index-25e7k849.js → index-bhyd3ejc.js} +4 -4
  28. package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
  29. package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
  30. package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
  31. package/dist/cli/{index-z794p5qg.js → index-mqevg32w.js} +22 -19
  32. package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
  33. package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
  34. package/dist/cli/index.js +12 -12
  35. package/dist/cli/{islands-p4vgx7a2.js → islands-vk05sj6v.js} +5 -4
  36. package/dist/cli/{mobile-nqdkk3gd.js → mobile-62b6j3j7.js} +5 -4
  37. package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
  38. package/dist/cli/{start-t3cq57wn.js → start-jh6kyp92.js} +5 -4
  39. package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
  40. package/dist/core/streamingSlotRegistrar.js +2 -5
  41. package/dist/core/streamingSlotRegistrar.js.map +4 -5
  42. package/dist/core/streamingSlotRegistry.js +2 -5
  43. package/dist/core/streamingSlotRegistry.js.map +4 -5
  44. package/dist/dev/importCostReport.js +45 -26
  45. package/dist/dev/serverBootstrap.js +2 -1
  46. package/dist/index.js +1748 -1550
  47. package/dist/index.js.map +40 -38
  48. package/dist/islands/index.js +2 -2
  49. package/dist/islands/index.js.map +3 -3
  50. package/dist/mobile/browser.js +2 -2
  51. package/dist/mobile/browser.js.map +3 -3
  52. package/dist/mobile/index.js +116 -96
  53. package/dist/mobile/index.js.map +7 -6
  54. package/dist/mobile/remoteMacAgentEntry.js +205 -651
  55. package/dist/react/components/index.js +2 -5
  56. package/dist/react/components/index.js.map +5 -6
  57. package/dist/react/index.js +45 -16
  58. package/dist/react/index.js.map +8 -8
  59. package/dist/react/router/browser.js.map +2 -2
  60. package/dist/react/router/index.js.map +2 -2
  61. package/dist/react/server.js +45 -16
  62. package/dist/react/server.js.map +8 -8
  63. package/dist/src/angular/components/defer-slot.component.d.ts +1 -0
  64. package/dist/src/build/missingReactRouter.d.ts +8 -0
  65. package/dist/src/build/vueModuleOutputPath.d.ts +10 -6
  66. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
  67. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
  68. package/dist/src/cli/scripts/doctor.d.ts +10 -0
  69. package/dist/src/core/streamingSlotWarningScope.d.ts +3 -0
  70. package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
  71. package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
  72. package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
  73. package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
  74. package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
  75. package/dist/src/dev/hot/reload.d.ts +5 -0
  76. package/dist/src/dev/hot/runtime.d.ts +2 -0
  77. package/dist/src/dev/srcPath.d.ts +2 -1
  78. package/dist/src/react/pageHandler.d.ts +5 -0
  79. package/dist/src/react/router/Link.d.ts +6 -1
  80. package/dist/src/react/serverComponents/pageHandler.d.ts +2 -0
  81. package/dist/src/utils/lazyTypescript.d.ts +3 -0
  82. package/dist/src/utils/portInUse.d.ts +16 -0
  83. package/dist/svelte/index.js +39 -12
  84. package/dist/svelte/index.js.map +6 -6
  85. package/dist/svelte/server.js +39 -12
  86. package/dist/svelte/server.js.map +6 -6
  87. package/dist/vue/components/index.js +2 -5
  88. package/dist/vue/components/index.js.map +4 -5
  89. package/dist/vue/index.js +39 -12
  90. package/dist/vue/index.js.map +6 -6
  91. package/dist/vue/server.js +39 -12
  92. package/dist/vue/server.js.map +6 -6
  93. package/package.json +1 -1
@@ -1,11 +1,14 @@
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
7
11
  import { dirname, extname, join, relative, resolve } from "path";
8
- import ts from "typescript";
9
12
  // src/core/islands.ts
10
13
  var isRecord = (value) => typeof value === "object" && value !== null;
11
14
  var getIslandBuildReference = (component) => {
@@ -36,7 +39,7 @@ var resolveIslandSourcePath = (registryPath, sourcePath) => {
36
39
  return resolve(dirname(registryPath), sourcePath);
37
40
  };
38
41
  var getObjectPropertyName = (name) => {
39
- if (ts.isIdentifier(name) || ts.isStringLiteral(name)) {
42
+ if (lazyTypescript.isIdentifier(name) || lazyTypescript.isStringLiteral(name)) {
40
43
  return name.text;
41
44
  }
42
45
  return null;
@@ -51,7 +54,7 @@ var collectDefaultImport = (imports, importClause, source) => {
51
54
  };
52
55
  var collectNamedImports = (imports, importClause, source) => {
53
56
  const bindings = importClause.namedBindings;
54
- if (!bindings || !ts.isNamedImports(bindings))
57
+ if (!bindings || !lazyTypescript.isNamedImports(bindings))
55
58
  return;
56
59
  for (const element of bindings.elements) {
57
60
  imports.set(element.name.text, {
@@ -67,7 +70,7 @@ var collectRegistryHelperImports = (importClause, source, registryFactoryNames,
67
70
  const bindings = importClause.namedBindings;
68
71
  if (!bindings)
69
72
  return;
70
- if (ts.isNamespaceImport(bindings)) {
73
+ if (lazyTypescript.isNamespaceImport(bindings)) {
71
74
  registryNamespaceNames.add(bindings.name.text);
72
75
  return;
73
76
  }
@@ -87,13 +90,13 @@ var addRegistryEntries = (frameworkNode, framework, imports, definitions, regist
87
90
  const frameworkRegistry = registry[framework] ?? {};
88
91
  registry[framework] = frameworkRegistry;
89
92
  for (const property of frameworkNode.properties) {
90
- if (!ts.isPropertyAssignment(property) && !ts.isShorthandPropertyAssignment(property))
93
+ if (!lazyTypescript.isPropertyAssignment(property) && !lazyTypescript.isShorthandPropertyAssignment(property))
91
94
  continue;
92
95
  const componentName = getObjectPropertyName(property.name);
93
96
  if (!componentName)
94
97
  continue;
95
- const initializer = ts.isPropertyAssignment(property) ? property.initializer : property.name;
96
- if (!ts.isIdentifier(initializer))
98
+ const initializer = lazyTypescript.isPropertyAssignment(property) ? property.initializer : property.name;
99
+ if (!lazyTypescript.isIdentifier(initializer))
97
100
  continue;
98
101
  const reference = imports.get(initializer.text);
99
102
  if (!reference)
@@ -108,7 +111,7 @@ var addRegistryEntries = (frameworkNode, framework, imports, definitions, regist
108
111
  };
109
112
  var processDefineIslandRegistry = (node, imports, definitions, registry) => {
110
113
  const [firstArg] = node.arguments;
111
- if (!firstArg || !ts.isObjectLiteralExpression(firstArg))
114
+ if (!firstArg || !lazyTypescript.isObjectLiteralExpression(firstArg))
112
115
  return;
113
116
  const validFrameworks = [
114
117
  "react",
@@ -117,7 +120,7 @@ var processDefineIslandRegistry = (node, imports, definitions, registry) => {
117
120
  "angular"
118
121
  ];
119
122
  for (const property of firstArg.properties) {
120
- if (!ts.isPropertyAssignment(property))
123
+ if (!lazyTypescript.isPropertyAssignment(property))
121
124
  continue;
122
125
  const frameworkName = getObjectPropertyName(property.name);
123
126
  if (!frameworkName)
@@ -125,31 +128,31 @@ var processDefineIslandRegistry = (node, imports, definitions, registry) => {
125
128
  const framework = validFrameworks.find((f) => f === frameworkName);
126
129
  if (!framework)
127
130
  continue;
128
- if (!ts.isObjectLiteralExpression(property.initializer))
131
+ if (!lazyTypescript.isObjectLiteralExpression(property.initializer))
129
132
  continue;
130
133
  addRegistryEntries(property.initializer, framework, imports, definitions, registry);
131
134
  }
132
135
  };
133
136
  var walkRegistryNode = (node, imports, registryFactoryNames, registryNamespaceNames, definitions, registry) => {
134
- if (ts.isCallExpression(node) && isDefineIslandRegistryCall(node.expression, registryFactoryNames, registryNamespaceNames)) {
137
+ if (lazyTypescript.isCallExpression(node) && isDefineIslandRegistryCall(node.expression, registryFactoryNames, registryNamespaceNames)) {
135
138
  processDefineIslandRegistry(node, imports, definitions, registry);
136
139
  }
137
- ts.forEachChild(node, (child) => walkRegistryNode(child, imports, registryFactoryNames, registryNamespaceNames, definitions, registry));
140
+ lazyTypescript.forEachChild(node, (child) => walkRegistryNode(child, imports, registryFactoryNames, registryNamespaceNames, definitions, registry));
138
141
  };
139
142
  var isDefineIslandRegistryCall = (expression, registryFactoryNames, registryNamespaceNames) => {
140
- if (ts.isIdentifier(expression)) {
143
+ if (lazyTypescript.isIdentifier(expression)) {
141
144
  return registryFactoryNames.has(expression.text);
142
145
  }
143
- return ts.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && ts.isIdentifier(expression.expression) && registryNamespaceNames.has(expression.expression.text);
146
+ return lazyTypescript.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && lazyTypescript.isIdentifier(expression.expression) && registryNamespaceNames.has(expression.expression.text);
144
147
  };
145
148
  var hasIslandRegistryNamedExport = (sourceFile) => {
146
149
  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")) {
150
+ 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
151
  return true;
149
152
  }
150
- if (!ts.isExportDeclaration(statement) || !statement.exportClause)
153
+ if (!lazyTypescript.isExportDeclaration(statement) || !statement.exportClause)
151
154
  continue;
152
- if (!ts.isNamedExports(statement.exportClause))
155
+ if (!lazyTypescript.isNamedExports(statement.exportClause))
153
156
  continue;
154
157
  if (statement.exportClause.elements.some((element) => element.name.text === "islandRegistry")) {
155
158
  return true;
@@ -159,7 +162,7 @@ var hasIslandRegistryNamedExport = (sourceFile) => {
159
162
  };
160
163
  var collectImportDeclarations = (sourceFile, registryPath, imports, registryFactoryNames, registryNamespaceNames) => {
161
164
  for (const statement of sourceFile.statements) {
162
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier))
165
+ if (!lazyTypescript.isImportDeclaration(statement) || !lazyTypescript.isStringLiteral(statement.moduleSpecifier))
163
166
  continue;
164
167
  const { importClause } = statement;
165
168
  if (!importClause)
@@ -171,7 +174,7 @@ var collectImportDeclarations = (sourceFile, registryPath, imports, registryFact
171
174
  }
172
175
  };
173
176
  var parseIslandRegistryBuildInfo = (registrySource, registryPath) => {
174
- const sourceFile = ts.createSourceFile(registryPath, registrySource, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
177
+ const sourceFile = lazyTypescript.createSourceFile(registryPath, registrySource, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.TS);
175
178
  const imports = new Map;
176
179
  const registryFactoryNames = new Set(["defineIslandRegistry"]);
177
180
  const registryNamespaceNames = new Set;
@@ -1,13 +1,16 @@
1
1
  // @bun
2
+ import {
3
+ lazyTypescript
4
+ } from "./index-4j1twret.js";
2
5
  import {
3
6
  frameworks,
4
7
  sharedDirFor,
5
8
  toModuleSpecifier
6
- } from "./index-q3snnhyd.js";
9
+ } from "./index-enbw9484.js";
7
10
  import {
8
11
  findRoutingFile,
9
12
  wireRoute
10
- } from "./index-gyjxrnnz.js";
13
+ } from "./index-23hvdyxf.js";
11
14
 
12
15
  // src/cli/generate/naming.ts
13
16
  var tokenize = (raw) => raw.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[^a-zA-Z0-9]+/).filter((token) => token.length > 0).map((token) => token.toLowerCase());
@@ -32,7 +35,6 @@ import {
32
35
  import { dirname as dirname2, join as join2, relative } from "path";
33
36
 
34
37
  // src/cli/generate/cssStrategy.ts
35
- import ts from "typescript";
36
38
  import { existsSync } from "fs";
37
39
  import { join } from "path";
38
40
  var CSS_SUFFIX = "CSS";
@@ -44,28 +46,28 @@ var DEFAULT_CSS = `main {
44
46
  }
45
47
  `;
46
48
  var cssAssetArg = (node) => {
47
- if (!ts.isCallExpression(node) || !ts.isIdentifier(node.expression) || node.expression.text !== "asset") {
49
+ if (!lazyTypescript.isCallExpression(node) || !lazyTypescript.isIdentifier(node.expression) || node.expression.text !== "asset") {
48
50
  return null;
49
51
  }
50
52
  const [, arg] = node.arguments;
51
- if (arg && ts.isStringLiteralLike(arg) && arg.text.endsWith(CSS_SUFFIX)) {
53
+ if (arg && lazyTypescript.isStringLiteralLike(arg) && arg.text.endsWith(CSS_SUFFIX)) {
52
54
  return arg.text;
53
55
  }
54
56
  return null;
55
57
  };
56
58
  var detectSharedKey = (routingText) => {
57
- const sourceFile = ts.createSourceFile("routing.ts", routingText, ts.ScriptTarget.Latest, true);
59
+ const sourceFile = lazyTypescript.createSourceFile("routing.ts", routingText, lazyTypescript.ScriptTarget.Latest, true);
58
60
  let hoisted = null;
59
61
  const inlineCounts = new Map;
60
62
  const visit = (node) => {
61
63
  const key = cssAssetArg(node);
62
64
  if (key) {
63
- if (ts.isVariableDeclaration(node.parent))
65
+ if (lazyTypescript.isVariableDeclaration(node.parent))
64
66
  hoisted ??= key;
65
67
  else
66
68
  inlineCounts.set(key, (inlineCounts.get(key) ?? 0) + 1);
67
69
  }
68
- ts.forEachChild(node, visit);
70
+ lazyTypescript.forEachChild(node, visit);
69
71
  };
70
72
  visit(sourceFile);
71
73
  if (hoisted)
@@ -103,7 +105,6 @@ var planCss = (routingText, stylesDir, pascal, kebab) => {
103
105
  };
104
106
 
105
107
  // src/cli/generate/navData.ts
106
- import ts2 from "typescript";
107
108
  import { existsSync as existsSync2, mkdirSync, readFileSync, writeFileSync } from "fs";
108
109
  import { dirname } from "path";
109
110
  var NAV_DATA_TEMPLATE = `type NavItem = {
@@ -118,18 +119,18 @@ var findNavArray = (sourceFile) => {
118
119
  const visit = (node) => {
119
120
  if (found)
120
121
  return;
121
- if (ts2.isVariableDeclaration(node) && ts2.isIdentifier(node.name) && node.name.text === "navData" && node.initializer && ts2.isArrayLiteralExpression(node.initializer)) {
122
+ if (lazyTypescript.isVariableDeclaration(node) && lazyTypescript.isIdentifier(node.name) && node.name.text === "navData" && node.initializer && lazyTypescript.isArrayLiteralExpression(node.initializer)) {
122
123
  found = node.initializer;
123
124
  return;
124
125
  }
125
- ts2.forEachChild(node, visit);
126
+ lazyTypescript.forEachChild(node, visit);
126
127
  };
127
128
  visit(sourceFile);
128
129
  return found;
129
130
  };
130
131
  var readStringProperty = (object, name) => {
131
- const property = object.properties.find((candidate) => ts2.isPropertyAssignment(candidate) && ts2.isIdentifier(candidate.name) && candidate.name.text === name);
132
- if (!property || !ts2.isStringLiteralLike(property.initializer)) {
132
+ const property = object.properties.find((candidate) => lazyTypescript.isPropertyAssignment(candidate) && lazyTypescript.isIdentifier(candidate.name) && candidate.name.text === name);
133
+ if (!property || !lazyTypescript.isStringLiteralLike(property.initializer)) {
133
134
  return null;
134
135
  }
135
136
  return property.initializer.text;
@@ -137,7 +138,7 @@ var readStringProperty = (object, name) => {
137
138
  var parseNavItems = (array) => {
138
139
  const items = [];
139
140
  for (const element of array.elements) {
140
- if (!ts2.isObjectLiteralExpression(element))
141
+ if (!lazyTypescript.isObjectLiteralExpression(element))
141
142
  continue;
142
143
  const href = readStringProperty(element, "href");
143
144
  const label = readStringProperty(element, "label");
@@ -150,7 +151,7 @@ var readNavItems = (navDataPath) => {
150
151
  if (!existsSync2(navDataPath))
151
152
  return [];
152
153
  const text = readFileSync(navDataPath, "utf-8");
153
- const sourceFile = ts2.createSourceFile(navDataPath, text, ts2.ScriptTarget.Latest, true);
154
+ const sourceFile = lazyTypescript.createSourceFile(navDataPath, text, lazyTypescript.ScriptTarget.Latest, true);
154
155
  const array = findNavArray(sourceFile);
155
156
  return array ? parseNavItems(array) : [];
156
157
  };
@@ -197,7 +198,7 @@ var upsertNavItem = (navDataPath, item) => {
197
198
  return { changed: created, created, items: existing };
198
199
  }
199
200
  const text = readFileSync(navDataPath, "utf-8");
200
- const sourceFile = ts2.createSourceFile(navDataPath, text, ts2.ScriptTarget.Latest, true);
201
+ const sourceFile = lazyTypescript.createSourceFile(navDataPath, text, lazyTypescript.ScriptTarget.Latest, true);
201
202
  const array = findNavArray(sourceFile);
202
203
  if (!array)
203
204
  return { changed: created, created, items: existing };