@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.
- package/CHANGELOG.md +39 -0
- package/README.md +3 -2
- package/changelog.json +68 -0
- package/dist/angular/browser.js +12 -12
- package/dist/angular/browser.js.map +6 -7
- package/dist/angular/components/core/streamingSlotRegistrar.js +2 -6
- package/dist/angular/components/core/streamingSlotRegistry.js +3 -7
- package/dist/angular/components/defer-slot.component.js +12 -7
- package/dist/angular/components/stream-slot.component.js +3 -1
- package/dist/angular/index.js +86 -39
- package/dist/angular/index.js.map +11 -10
- package/dist/angular/server.js +85 -38
- package/dist/angular/server.js.map +10 -9
- package/dist/build/buildWorker.js +135 -57
- package/dist/build.js +1817 -1623
- package/dist/build.js.map +38 -36
- package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
- package/dist/cli/{compile-ndc36zna.js → compile-n6fs2vmx.js} +16 -14
- package/dist/cli/config/server.js +128 -77
- package/dist/cli/{dev-x49583aj.js → dev-6h1f0mzq.js} +1 -1
- package/dist/cli/{doctor-repprx92.js → doctor-m36tmx4d.js} +70 -15
- package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
- package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
- package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
- package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
- package/dist/cli/index-4j1twret.js +22 -0
- package/dist/cli/{index-25e7k849.js → index-bhyd3ejc.js} +4 -4
- package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
- package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
- package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
- package/dist/cli/{index-z794p5qg.js → index-mqevg32w.js} +22 -19
- package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
- package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
- package/dist/cli/index.js +12 -12
- package/dist/cli/{islands-p4vgx7a2.js → islands-vk05sj6v.js} +5 -4
- package/dist/cli/{mobile-nqdkk3gd.js → mobile-62b6j3j7.js} +5 -4
- package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
- package/dist/cli/{start-t3cq57wn.js → start-jh6kyp92.js} +5 -4
- package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
- package/dist/core/streamingSlotRegistrar.js +2 -5
- package/dist/core/streamingSlotRegistrar.js.map +4 -5
- package/dist/core/streamingSlotRegistry.js +2 -5
- package/dist/core/streamingSlotRegistry.js.map +4 -5
- package/dist/dev/importCostReport.js +45 -26
- package/dist/dev/serverBootstrap.js +2 -1
- package/dist/index.js +1748 -1550
- package/dist/index.js.map +40 -38
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/mobile/browser.js +2 -2
- package/dist/mobile/browser.js.map +3 -3
- package/dist/mobile/index.js +116 -96
- package/dist/mobile/index.js.map +7 -6
- package/dist/mobile/remoteMacAgentEntry.js +205 -651
- package/dist/react/components/index.js +2 -5
- package/dist/react/components/index.js.map +5 -6
- package/dist/react/index.js +45 -16
- package/dist/react/index.js.map +8 -8
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +45 -16
- package/dist/react/server.js.map +8 -8
- package/dist/src/angular/components/defer-slot.component.d.ts +1 -0
- package/dist/src/build/missingReactRouter.d.ts +8 -0
- package/dist/src/build/vueModuleOutputPath.d.ts +10 -6
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
- package/dist/src/cli/scripts/doctor.d.ts +10 -0
- package/dist/src/core/streamingSlotWarningScope.d.ts +3 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
- package/dist/src/dev/hot/reload.d.ts +5 -0
- package/dist/src/dev/hot/runtime.d.ts +2 -0
- package/dist/src/dev/srcPath.d.ts +2 -1
- package/dist/src/react/pageHandler.d.ts +5 -0
- package/dist/src/react/router/Link.d.ts +6 -1
- package/dist/src/react/serverComponents/pageHandler.d.ts +2 -0
- package/dist/src/utils/lazyTypescript.d.ts +3 -0
- package/dist/src/utils/portInUse.d.ts +16 -0
- package/dist/svelte/index.js +39 -12
- package/dist/svelte/index.js.map +6 -6
- package/dist/svelte/server.js +39 -12
- package/dist/svelte/server.js.map +6 -6
- package/dist/vue/components/index.js +2 -5
- package/dist/vue/components/index.js.map +4 -5
- package/dist/vue/index.js +39 -12
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +39 -12
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
lazyTypescript
|
|
4
|
+
} from "./index-4j1twret.js";
|
|
2
5
|
import {
|
|
3
6
|
introspectType,
|
|
4
7
|
readAbsoluteConfigValues,
|
|
@@ -6,19 +9,19 @@ import {
|
|
|
6
9
|
frameworks,
|
|
7
10
|
configuredFrameworks,
|
|
8
11
|
resolveProject
|
|
9
|
-
} from "./index-
|
|
10
|
-
import {
|
|
11
|
-
applyAbsoluteConfigEdit
|
|
12
|
-
} from "./index-b1wht4q5.js";
|
|
12
|
+
} from "./index-enbw9484.js";
|
|
13
13
|
import"./index-wk0pyxrg.js";
|
|
14
14
|
import"./index-t8jmj8w1.js";
|
|
15
|
-
import
|
|
16
|
-
generatePage
|
|
17
|
-
} from "./index-vh68jb0e.js";
|
|
18
|
-
import"./index-gyjxrnnz.js";
|
|
15
|
+
import"./index-23hvdyxf.js";
|
|
19
16
|
import {
|
|
20
17
|
colors
|
|
21
18
|
} from "./index-9djrap79.js";
|
|
19
|
+
import {
|
|
20
|
+
generatePage
|
|
21
|
+
} from "./index-pkw3jktb.js";
|
|
22
|
+
import {
|
|
23
|
+
applyAbsoluteConfigEdit
|
|
24
|
+
} from "./index-kes8he5s.js";
|
|
22
25
|
import {
|
|
23
26
|
installFrameworkDependencies,
|
|
24
27
|
installPackages
|
|
@@ -476,7 +479,6 @@ var AUTH_SCAFFOLDS = {
|
|
|
476
479
|
var isScaffoldableFeature = (id) => (id in AUTH_SCAFFOLDS);
|
|
477
480
|
|
|
478
481
|
// src/cli/config/auth/resolveAuthState.ts
|
|
479
|
-
import ts2 from "typescript";
|
|
480
482
|
import { existsSync as existsSync3, readdirSync, readFileSync as readFileSync3 } from "fs";
|
|
481
483
|
import { join as join2, relative, resolve as resolve2 } from "path";
|
|
482
484
|
|
|
@@ -597,7 +599,6 @@ var AUTH_FEATURES = [
|
|
|
597
599
|
];
|
|
598
600
|
|
|
599
601
|
// src/cli/config/auth/resolveAuthSettings.ts
|
|
600
|
-
import ts from "typescript";
|
|
601
602
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
602
603
|
import { resolve } from "path";
|
|
603
604
|
var AUTH_PACKAGE = "@absolutejs/auth";
|
|
@@ -618,18 +619,18 @@ var findAuthSettingsPath = (cwd, override) => {
|
|
|
618
619
|
}
|
|
619
620
|
return null;
|
|
620
621
|
};
|
|
621
|
-
var parseSource = (configPath, text) =>
|
|
622
|
+
var parseSource = (configPath, text) => lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true);
|
|
622
623
|
var findAuthSettingsObject = (sourceFile) => {
|
|
623
624
|
const pending = [sourceFile];
|
|
624
625
|
while (pending.length > 0) {
|
|
625
626
|
const node = pending.pop();
|
|
626
627
|
if (!node)
|
|
627
628
|
continue;
|
|
628
|
-
const [firstArgument] =
|
|
629
|
-
if (
|
|
629
|
+
const [firstArgument] = lazyTypescript.isCallExpression(node) ? node.arguments : [];
|
|
630
|
+
if (lazyTypescript.isCallExpression(node) && lazyTypescript.isIdentifier(node.expression) && node.expression.text === "defineAuthSettings" && firstArgument && lazyTypescript.isObjectLiteralExpression(firstArgument)) {
|
|
630
631
|
return firstArgument;
|
|
631
632
|
}
|
|
632
|
-
if (
|
|
633
|
+
if (lazyTypescript.isExportAssignment(node) && lazyTypescript.isObjectLiteralExpression(node.expression)) {
|
|
633
634
|
return node.expression;
|
|
634
635
|
}
|
|
635
636
|
node.forEachChild((child) => {
|
|
@@ -646,24 +647,24 @@ var parseAuthSettingsObject = (configPath) => {
|
|
|
646
647
|
};
|
|
647
648
|
};
|
|
648
649
|
var evalLiteral = (node) => {
|
|
649
|
-
if (
|
|
650
|
+
if (lazyTypescript.isStringLiteralLike(node))
|
|
650
651
|
return { opaque: false, value: node.text };
|
|
651
|
-
if (node.kind ===
|
|
652
|
+
if (node.kind === lazyTypescript.SyntaxKind.TrueKeyword) {
|
|
652
653
|
return { opaque: false, value: true };
|
|
653
654
|
}
|
|
654
|
-
if (node.kind ===
|
|
655
|
+
if (node.kind === lazyTypescript.SyntaxKind.FalseKeyword) {
|
|
655
656
|
return { opaque: false, value: false };
|
|
656
657
|
}
|
|
657
|
-
if (node.kind ===
|
|
658
|
+
if (node.kind === lazyTypescript.SyntaxKind.NullKeyword) {
|
|
658
659
|
return { opaque: false, value: null };
|
|
659
660
|
}
|
|
660
|
-
if (
|
|
661
|
+
if (lazyTypescript.isNumericLiteral(node)) {
|
|
661
662
|
return { opaque: false, value: Number(node.text) };
|
|
662
663
|
}
|
|
663
|
-
if (
|
|
664
|
+
if (lazyTypescript.isPrefixUnaryExpression(node) && node.operator === lazyTypescript.SyntaxKind.MinusToken && lazyTypescript.isNumericLiteral(node.operand)) {
|
|
664
665
|
return { opaque: false, value: -Number(node.operand.text) };
|
|
665
666
|
}
|
|
666
|
-
if (
|
|
667
|
+
if (lazyTypescript.isArrayLiteralExpression(node)) {
|
|
667
668
|
const items = [];
|
|
668
669
|
for (const element of node.elements) {
|
|
669
670
|
const result = evalLiteral(element);
|
|
@@ -682,7 +683,7 @@ var readCurrent = (configPath) => {
|
|
|
682
683
|
if (!object)
|
|
683
684
|
return { current, opaqueKeys };
|
|
684
685
|
for (const property of object.properties) {
|
|
685
|
-
if (!
|
|
686
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
|
|
686
687
|
continue;
|
|
687
688
|
}
|
|
688
689
|
const name = property.name.text;
|
|
@@ -786,10 +787,10 @@ var candidateFiles = (root) => {
|
|
|
786
787
|
}
|
|
787
788
|
return found;
|
|
788
789
|
};
|
|
789
|
-
var isAuthPackageImport = (statement) =>
|
|
790
|
+
var isAuthPackageImport = (statement) => lazyTypescript.isImportDeclaration(statement) && lazyTypescript.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === AUTH_PACKAGE2;
|
|
790
791
|
var addAuthNames = (statement, names) => {
|
|
791
792
|
const bindings = statement.importClause?.namedBindings;
|
|
792
|
-
if (!bindings || !
|
|
793
|
+
if (!bindings || !lazyTypescript.isNamedImports(bindings))
|
|
793
794
|
return;
|
|
794
795
|
for (const element of bindings.elements) {
|
|
795
796
|
const imported = element.propertyName?.text ?? element.name.text;
|
|
@@ -806,9 +807,9 @@ var authBindings = (sourceFile) => {
|
|
|
806
807
|
}
|
|
807
808
|
return names;
|
|
808
809
|
};
|
|
809
|
-
var isAuthCall = (node, bindings) =>
|
|
810
|
+
var isAuthCall = (node, bindings) => lazyTypescript.isIdentifier(node.expression) && bindings.has(node.expression.text);
|
|
810
811
|
var providerCountOf = (property) => {
|
|
811
|
-
if (!
|
|
812
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !lazyTypescript.isObjectLiteralExpression(property.initializer)) {
|
|
812
813
|
return null;
|
|
813
814
|
}
|
|
814
815
|
return property.initializer.properties.length;
|
|
@@ -816,10 +817,10 @@ var providerCountOf = (property) => {
|
|
|
816
817
|
var readConfigKeys = (object) => {
|
|
817
818
|
const keys = new Set;
|
|
818
819
|
let providerCount = null;
|
|
819
|
-
const usesSpread = object.properties.some((property) =>
|
|
820
|
+
const usesSpread = object.properties.some((property) => lazyTypescript.isSpreadAssignment(property));
|
|
820
821
|
for (const property of object.properties) {
|
|
821
822
|
const { name } = property;
|
|
822
|
-
if (name === undefined || !
|
|
823
|
+
if (name === undefined || !lazyTypescript.isIdentifier(name))
|
|
823
824
|
continue;
|
|
824
825
|
keys.add(name.text);
|
|
825
826
|
if (name.text !== "providersConfiguration")
|
|
@@ -830,7 +831,7 @@ var readConfigKeys = (object) => {
|
|
|
830
831
|
};
|
|
831
832
|
var matchFromCall = (node) => {
|
|
832
833
|
const [arg] = node.arguments;
|
|
833
|
-
if (arg &&
|
|
834
|
+
if (arg && lazyTypescript.isObjectLiteralExpression(arg))
|
|
834
835
|
return readConfigKeys(arg);
|
|
835
836
|
return { keys: new Set, providerCount: null, usesSpread: true };
|
|
836
837
|
};
|
|
@@ -845,7 +846,7 @@ var findSetupInFile = (path) => {
|
|
|
845
846
|
const text = readFileOrNull(path);
|
|
846
847
|
if (text === null || !text.includes(AUTH_PACKAGE2))
|
|
847
848
|
return null;
|
|
848
|
-
const sourceFile =
|
|
849
|
+
const sourceFile = lazyTypescript.createSourceFile(path, text, lazyTypescript.ScriptTarget.Latest, true);
|
|
849
850
|
const bindings = authBindings(sourceFile);
|
|
850
851
|
if (bindings.size === 0)
|
|
851
852
|
return null;
|
|
@@ -854,7 +855,7 @@ var findSetupInFile = (path) => {
|
|
|
854
855
|
const node = pending.pop();
|
|
855
856
|
if (!node)
|
|
856
857
|
continue;
|
|
857
|
-
if (
|
|
858
|
+
if (lazyTypescript.isCallExpression(node) && isAuthCall(node, bindings)) {
|
|
858
859
|
return matchFromCall(node);
|
|
859
860
|
}
|
|
860
861
|
node.forEachChild((child) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
lazyTypescript
|
|
4
|
+
} from "./index-4j1twret.js";
|
|
2
5
|
import {
|
|
3
6
|
maskLiterals,
|
|
4
7
|
compileSpecifierRewriter,
|
|
5
8
|
rewriteContentSpecifiers
|
|
6
9
|
} from "./index-bp60baze.js";
|
|
7
|
-
import {
|
|
8
|
-
loadIslandRegistryBuildInfo
|
|
9
|
-
} from "./index-z794p5qg.js";
|
|
10
10
|
import {
|
|
11
11
|
createIslandRegistryDefinitionPlugin,
|
|
12
12
|
createBunStringRawUnicodePlugin,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
createElysiaOpenApiTypeboxPlugin,
|
|
16
16
|
createOptionalPeerPlugin,
|
|
17
17
|
resolveServerBundleExternals
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-zyd80s3h.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeAbsoluteMobileConfig2
|
|
21
21
|
} from "./index-t7yf3vxs.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-cksezef8.js";
|
|
23
23
|
import {
|
|
24
24
|
ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV2,
|
|
25
25
|
installAbsoluteMobileAuthEnvironment2
|
|
@@ -43,6 +43,9 @@ import"./index-43a1vvb7.js";
|
|
|
43
43
|
import {
|
|
44
44
|
isRecord
|
|
45
45
|
} from "./index-tx0kx9zx.js";
|
|
46
|
+
import {
|
|
47
|
+
loadIslandRegistryBuildInfo
|
|
48
|
+
} from "./index-mqevg32w.js";
|
|
46
49
|
import {
|
|
47
50
|
stripStringsAndComments
|
|
48
51
|
} from "./index-prs14ys9.js";
|
|
@@ -68,7 +71,6 @@ var {env } = globalThis.Bun;
|
|
|
68
71
|
|
|
69
72
|
// src/build/compiledClientGraph.ts
|
|
70
73
|
import { createHash } from "crypto";
|
|
71
|
-
import ts from "typescript";
|
|
72
74
|
import {
|
|
73
75
|
existsSync,
|
|
74
76
|
readdirSync,
|
|
@@ -78,10 +80,10 @@ import {
|
|
|
78
80
|
} from "fs";
|
|
79
81
|
import { dirname, isAbsolute, join, relative, resolve } from "path";
|
|
80
82
|
var assetUrlEdit = (node, tree, urls) => {
|
|
81
|
-
if (!
|
|
83
|
+
if (!lazyTypescript.isNewExpression(node) || !lazyTypescript.isIdentifier(node.expression) || node.expression.text !== "URL")
|
|
82
84
|
return;
|
|
83
85
|
const [path, base] = node.arguments ?? [];
|
|
84
|
-
if (!path || !
|
|
86
|
+
if (!path || !lazyTypescript.isStringLiteral(path) || base?.getText(tree) !== "import.meta.url" || !urls[path.text])
|
|
85
87
|
return;
|
|
86
88
|
const edit = {
|
|
87
89
|
end: path.end,
|
|
@@ -93,22 +95,22 @@ var assetUrlEdit = (node, tree, urls) => {
|
|
|
93
95
|
var rewriteAssetUrlConstructors = (source, urls) => {
|
|
94
96
|
if (!/\bnew\s+URL\s*\(/u.test(source))
|
|
95
97
|
return source;
|
|
96
|
-
const tree =
|
|
98
|
+
const tree = lazyTypescript.createSourceFile("client.js", source, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.JS);
|
|
97
99
|
const edits = [];
|
|
98
100
|
const visit = (node) => {
|
|
99
101
|
const edit = assetUrlEdit(node, tree, urls);
|
|
100
102
|
if (edit)
|
|
101
103
|
edits.push(edit);
|
|
102
|
-
|
|
104
|
+
lazyTypescript.forEachChild(node, visit);
|
|
103
105
|
};
|
|
104
106
|
visit(tree);
|
|
105
107
|
return edits.sort((left, right) => right.start - left.start).reduce((text, edit) => text.slice(0, edit.start) + edit.value + text.slice(edit.end), source);
|
|
106
108
|
};
|
|
107
109
|
var referencedAsset = (node, tree, file, directory) => {
|
|
108
|
-
if (!
|
|
110
|
+
if (!lazyTypescript.isNewExpression(node) || !lazyTypescript.isIdentifier(node.expression) || node.expression.text !== "URL")
|
|
109
111
|
return;
|
|
110
112
|
const [path, base] = node.arguments ?? [];
|
|
111
|
-
if (!path || !
|
|
113
|
+
if (!path || !lazyTypescript.isStringLiteral(path) || base?.getText(tree) !== "import.meta.url")
|
|
112
114
|
return;
|
|
113
115
|
return path.text.startsWith("/") ? resolve(directory, path.text.slice(1)) : resolve(dirname(file), path.text);
|
|
114
116
|
};
|
|
@@ -121,14 +123,14 @@ var includeUrlDependencies = (files, directory, allowed) => {
|
|
|
121
123
|
const source = readFileSync(file, "utf8");
|
|
122
124
|
if (!/\bnew\s+URL\s*\(/u.test(source))
|
|
123
125
|
continue;
|
|
124
|
-
const tree =
|
|
126
|
+
const tree = lazyTypescript.createSourceFile("client.js", source, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.JS);
|
|
125
127
|
const visit = (node) => {
|
|
126
128
|
const target = referencedAsset(node, tree, file, directory);
|
|
127
129
|
if (target && allowed.has(target) && !included.has(target)) {
|
|
128
130
|
included.add(target);
|
|
129
131
|
files.push(target);
|
|
130
132
|
}
|
|
131
|
-
|
|
133
|
+
lazyTypescript.forEachChild(node, visit);
|
|
132
134
|
};
|
|
133
135
|
visit(tree);
|
|
134
136
|
}
|