@absolutejs/absolute 0.20.0-beta.179 → 0.20.0-beta.180
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 +23 -0
- package/changelog.json +45 -0
- package/dist/angular/browser.js +2 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +21 -6
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +21 -6
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +5357 -4945
- package/dist/build.js.map +27 -24
- package/dist/cli/build-fntmf42w.js +495 -0
- package/dist/cli/{buildDepVendor-qvsh6dsj.js → buildDepVendor-qnwfct22.js} +5 -3
- package/dist/cli/buildReactServerComponents-fq6mw10d.js +13 -0
- package/dist/cli/{compile-p5yv6ecp.js → compile-54rb8szn.js} +94 -125
- package/dist/cli/config/server.js +10 -5
- package/dist/cli/{dev-2hbcsvkp.js → dev-6s6g5tnk.js} +13 -14
- package/dist/cli/{expoProject-1qtw97js.js → expoProject-acgfaj3f.js} +2 -1
- package/dist/cli/generatedDir-239r7csr.js +9 -0
- package/dist/cli/{index-cksezef8.js → index-0gd30trc.js} +105 -851
- package/dist/cli/index-2wvysvjc.js +40 -0
- package/dist/cli/index-42xjh6gg.js +282 -0
- package/dist/cli/{index-qw98g1p6.js → index-47e8fwha.js} +4 -1
- package/dist/cli/index-65kqn88a.js +8 -0
- package/dist/cli/{index-2bxfhs32.js → index-6f448d7m.js} +0 -26
- package/dist/cli/index-972xxwgj.js +16 -0
- package/dist/cli/index-aqe25w4h.js +39 -0
- package/dist/cli/index-assqancr.js +51 -0
- package/dist/cli/{index-2shf4aya.js → index-c8rcfe5a.js} +4 -6
- package/dist/cli/index-cba1cemz.js +8 -0
- package/dist/cli/{index-3ff5ztt3.js → index-djkrb7pc.js} +1 -7
- package/dist/cli/index-dkfwkpc8.js +138 -0
- package/dist/cli/{index-92g14j47.js → index-dw44xa4x.js} +2 -1
- package/dist/cli/index-evsnq0n2.js +17 -0
- package/dist/cli/index-fxwf3n2v.js +224 -0
- package/dist/cli/{index-zyd80s3h.js → index-js2hksgv.js} +21 -295
- package/dist/cli/{index-bp60baze.js → index-jyap0bhv.js} +1 -1
- package/dist/cli/{index-9dzdbbfc.js → index-kx2d067c.js} +8 -6
- package/dist/cli/index-pb31zan6.js +9 -0
- package/dist/cli/index-sq0478b0.js +281 -0
- package/dist/cli/index-va274tsf.js +7 -0
- package/dist/cli/{index-yd672jyq.js → index-w6xsk8cv.js} +4 -1
- package/dist/cli/index-w79snsxv.js +461 -0
- package/dist/cli/index-x1vvn549.js +835 -0
- package/dist/cli/index-xf9sfr8a.js +243 -0
- package/dist/cli/index-ycqdxy55.js +754 -0
- package/dist/cli/index-z74cqxz0.js +131 -0
- package/dist/cli/index.js +10 -9
- package/dist/cli/{islands-6zgb7501.js → islands-17tfx8jf.js} +6 -17
- package/dist/cli/{ls-0hfx323m.js → ls-0wr74w0b.js} +10 -58
- package/dist/cli/{mobile-93vaawcz.js → mobile-hpqpy61f.js} +11 -8
- package/dist/cli/{prerender-010z771p.js → prerender-w65xp6h8.js} +2 -1
- package/dist/cli/{rewriteImports-z6629aww.js → rewriteImports-np2d2kvc.js} +4 -11
- package/dist/cli/rewriteImportsPlugin-c6hcb3x6.js +12 -0
- package/dist/cli/{start-asxb79rc.js → start-mbn2zgs2.js} +6 -4
- package/dist/cli/staticAnalyzeSpaRoutes-2nev05m1.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-6vgzp0rs.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-f85q9dqk.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-yakmg22g.js +7 -0
- package/dist/cli/{typecheck-m2j4tkdk.js → typecheck-488txsfc.js} +92 -18
- package/dist/cli/vueCompiler-8bzdmf08.js +7 -0
- package/dist/client/chunks/{react-khr6ewhr.js → react-g8r290b8.js} +37 -2
- package/dist/client/chunks/react-g8r290b8.js.map +10 -0
- package/dist/client/chunks/vue-zcpmka32.js +85 -0
- package/dist/client/chunks/vue-zcpmka32.js.map +10 -0
- package/dist/client/index.js +58 -10
- package/dist/client/index.js.map +4 -4
- package/dist/dev/client/handlers/vue.ts +116 -0
- package/dist/index.js +2472 -2058
- package/dist/index.js.map +26 -23
- package/dist/islands/browser.js +2 -2
- package/dist/islands/browser.js.map +3 -3
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +2 -2
- package/dist/react/browser.js.map +3 -3
- package/dist/react/index.js +42 -11
- package/dist/react/index.js.map +10 -10
- package/dist/react/server.js +42 -11
- package/dist/react/server.js.map +10 -10
- package/dist/src/angular/ssrRender.d.ts +2 -2
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/build/generateManifest.d.ts +15 -0
- package/dist/src/build/manifestKeys.d.ts +22 -0
- package/dist/src/cli/add/dependencies.d.ts +1 -1
- package/dist/src/cli/scripts/typecheck.d.ts +11 -0
- package/dist/src/client/hydrators/react.d.ts +10 -0
- package/dist/src/client/hydrators/vue.d.ts +13 -0
- package/dist/src/client/islandRuntime.d.ts +1 -1
- package/dist/src/core/islandManifest.d.ts +4 -0
- package/dist/src/core/islandPageContext.d.ts +8 -2
- package/dist/src/core/lookup.d.ts +16 -1
- package/dist/src/dev/importCost/instrument.d.ts +1 -1
- package/dist/src/dev/manifestKeysRefresher.d.ts +6 -0
- package/dist/src/dev/spaRouteRefresh.d.ts +13 -0
- package/dist/src/mobile/androidConformance.d.ts +1 -1
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +5 -0
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/src/vue/components/Image.d.ts +4 -4
- package/dist/src/vue/components/StreamSlot.d.ts +1 -1
- package/dist/src/vue/components/SuspenseSlot.d.ts +2 -2
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +4 -0
- package/dist/svelte/browser.js +2 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +25 -9
- package/dist/svelte/index.js.map +8 -8
- package/dist/svelte/server.js +25 -9
- package/dist/svelte/server.js.map +8 -8
- package/dist/types/globals.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/island.d.ts +1 -1
- package/dist/types/manifest.d.ts +25 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +21 -6
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +21 -6
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
- package/dist/client/chunks/react-khr6ewhr.js.map +0 -10
- package/dist/client/chunks/vue-db6ppn1f.js +0 -32
- package/dist/client/chunks/vue-db6ppn1f.js.map +0 -10
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
compileSpecifierRewriter,
|
|
4
|
+
rewriteContentSpecifiers
|
|
5
|
+
} from "./index-jyap0bhv.js";
|
|
6
|
+
|
|
7
|
+
// src/build/rewriteImportsPlugin.ts
|
|
8
|
+
import { readdir } from "fs/promises";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
var REEXPORT_PATTERN = /__reExport\(\s*[A-Za-z_$][\w$]*\s*,\s*([A-Za-z_$][\w$]*)\s*\)/g;
|
|
11
|
+
var IMPORT_PATH_PATTERN = /(?:from\s+|import\s*)["']([^"']+)["']/g;
|
|
12
|
+
var isMissingFile = (error) => error instanceof Error && ("code" in error) && error.code === "ENOENT";
|
|
13
|
+
var fixMissingReExportNamespacesInContent = (content) => {
|
|
14
|
+
const missing = collectMissingNamespaceImports(content);
|
|
15
|
+
if (missing.length === 0)
|
|
16
|
+
return content;
|
|
17
|
+
const inserts = missing.map((entry) => `import * as ${entry.ident} from "${entry.path}";`).join(`
|
|
18
|
+
`);
|
|
19
|
+
return `${inserts}
|
|
20
|
+
${content}`;
|
|
21
|
+
};
|
|
22
|
+
var isIdentifierBound = (content, ident) => {
|
|
23
|
+
const nsImportRe = new RegExp(`\\bimport\\s*\\*\\s*as\\s+${ident}\\s+from\\b`);
|
|
24
|
+
const declRe = new RegExp(`\\b(?:const|let|var|function|class)\\s+${ident}\\b`);
|
|
25
|
+
const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
|
|
26
|
+
return nsImportRe.test(content) || declRe.test(content) || namedImportRe.test(content);
|
|
27
|
+
};
|
|
28
|
+
var findNamespaceSourcePath = (content, ident) => {
|
|
29
|
+
IMPORT_PATH_PATTERN.lastIndex = 0;
|
|
30
|
+
for (const [, importPath] of content.matchAll(IMPORT_PATH_PATTERN)) {
|
|
31
|
+
if (!importPath)
|
|
32
|
+
continue;
|
|
33
|
+
const base = importPath.split("/").pop()?.replace(/\.[mc]?js$/, "");
|
|
34
|
+
if (!base)
|
|
35
|
+
continue;
|
|
36
|
+
const normalized = base.startsWith("_") ? base.slice(1) : base;
|
|
37
|
+
if (normalized === ident || normalized.endsWith(`_${ident}`)) {
|
|
38
|
+
return importPath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
};
|
|
43
|
+
var collectMissingNamespaceImports = (content) => {
|
|
44
|
+
REEXPORT_PATTERN.lastIndex = 0;
|
|
45
|
+
const missing = [];
|
|
46
|
+
const seen = new Set;
|
|
47
|
+
for (const [, ident] of content.matchAll(REEXPORT_PATTERN)) {
|
|
48
|
+
if (!ident || seen.has(ident))
|
|
49
|
+
continue;
|
|
50
|
+
if (isIdentifierBound(content, ident))
|
|
51
|
+
continue;
|
|
52
|
+
const sourcePath = findNamespaceSourcePath(content, ident);
|
|
53
|
+
if (!sourcePath)
|
|
54
|
+
continue;
|
|
55
|
+
seen.add(ident);
|
|
56
|
+
missing.push({ ident, path: sourcePath });
|
|
57
|
+
}
|
|
58
|
+
return missing;
|
|
59
|
+
};
|
|
60
|
+
var isReadableArtifact = (artifact) => artifact.path.endsWith(".js");
|
|
61
|
+
var readArtifactText = async (artifact) => {
|
|
62
|
+
try {
|
|
63
|
+
return await artifact.text();
|
|
64
|
+
} catch (error) {
|
|
65
|
+
if (isMissingFile(error))
|
|
66
|
+
return;
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var readFileText = async (filePath) => {
|
|
71
|
+
try {
|
|
72
|
+
return await Bun.file(filePath).text();
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if (isMissingFile(error))
|
|
75
|
+
return;
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var writeFileText = async (filePath, content) => {
|
|
80
|
+
try {
|
|
81
|
+
await Bun.write(filePath, content);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
if (isMissingFile(error))
|
|
84
|
+
return;
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var rewriteArtifact = async (artifact, vendorPaths) => {
|
|
89
|
+
if (Object.keys(vendorPaths).length === 0)
|
|
90
|
+
return;
|
|
91
|
+
const original = await readArtifactText(artifact);
|
|
92
|
+
if (original === undefined)
|
|
93
|
+
return;
|
|
94
|
+
const rewritten = rewriteImportsInContent2(original, vendorPaths);
|
|
95
|
+
if (rewritten === original)
|
|
96
|
+
return;
|
|
97
|
+
await writeFileText(artifact.path, rewritten);
|
|
98
|
+
};
|
|
99
|
+
var rewriteBuildOutputsWith2 = async (outputs, resolveVendorPaths) => {
|
|
100
|
+
await Promise.all(outputs.filter(isReadableArtifact).map((artifact) => rewriteArtifact(artifact, resolveVendorPaths(artifact))));
|
|
101
|
+
};
|
|
102
|
+
var rewriteImportsInContent2 = (content, vendorPaths) => {
|
|
103
|
+
if (Object.keys(vendorPaths).length === 0)
|
|
104
|
+
return content;
|
|
105
|
+
return rewriteContentSpecifiers(content, compileSpecifierRewriter(vendorPaths), { sweep: false });
|
|
106
|
+
};
|
|
107
|
+
var listJsFiles = async (dir) => {
|
|
108
|
+
try {
|
|
109
|
+
const entries = await readdir(dir);
|
|
110
|
+
return entries.filter((entry) => entry.endsWith(".js")).map((entry) => join(dir, entry));
|
|
111
|
+
} catch {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
var rewriteVendorFile = async (filePath, vendorPaths) => {
|
|
116
|
+
const original = await readFileText(filePath);
|
|
117
|
+
if (original === undefined)
|
|
118
|
+
return;
|
|
119
|
+
const next = fixMissingReExportNamespacesInContent(rewriteImportsInContent2(original, vendorPaths));
|
|
120
|
+
if (next === original)
|
|
121
|
+
return;
|
|
122
|
+
await writeFileText(filePath, next);
|
|
123
|
+
};
|
|
124
|
+
var rewriteVendorDirectories2 = async (vendorDirs, vendorPaths) => {
|
|
125
|
+
if (Object.keys(vendorPaths).length === 0)
|
|
126
|
+
return;
|
|
127
|
+
const fileLists = await Promise.all(vendorDirs.map(listJsFiles));
|
|
128
|
+
await Promise.all(fileLists.flat().map((filePath) => rewriteVendorFile(filePath, vendorPaths)));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export { rewriteBuildOutputsWith2, rewriteImportsInContent2, rewriteVendorDirectories2 };
|
package/dist/cli/index.js
CHANGED
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
UNFOUND_INDEX,
|
|
7
7
|
WORKSPACE_COMMAND_ARGS_OFFSET
|
|
8
8
|
} from "./index-t8jmj8w1.js";
|
|
9
|
+
import"./index-va274tsf.js";
|
|
9
10
|
import {
|
|
10
11
|
markBoot
|
|
11
|
-
} from "./index-
|
|
12
|
+
} from "./index-c8rcfe5a.js";
|
|
12
13
|
import {
|
|
13
14
|
sendTelemetryEvent
|
|
14
15
|
} from "./index-qyxd5n9a.js";
|
|
@@ -54,7 +55,7 @@ if (command === "dev") {
|
|
|
54
55
|
}
|
|
55
56
|
const positionalArgs = stripNamedArgs("--config", "--android-device", "--ios-device").filter((arg) => arg !== "--no-mobile" && arg !== "--eager");
|
|
56
57
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
57
|
-
const { dev } = await import("./dev-
|
|
58
|
+
const { dev } = await import("./dev-6s6g5tnk.js");
|
|
58
59
|
await dev(serverEntry, configPath, {
|
|
59
60
|
androidDevice,
|
|
60
61
|
eager: args.includes("--eager"),
|
|
@@ -70,7 +71,7 @@ if (command === "dev") {
|
|
|
70
71
|
const configPath = parseNamedArg("--config");
|
|
71
72
|
const positionalArgs = stripNamedArgs("--outdir", "--config").filter((arg) => arg !== "--prebuilt");
|
|
72
73
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
73
|
-
const { start } = await import("./start-
|
|
74
|
+
const { start } = await import("./start-mbn2zgs2.js");
|
|
74
75
|
await start(serverEntry, outdir, configPath, {
|
|
75
76
|
prebuilt: args.includes("--prebuilt")
|
|
76
77
|
});
|
|
@@ -80,7 +81,7 @@ if (command === "dev") {
|
|
|
80
81
|
const configPath = parseNamedArg("--config");
|
|
81
82
|
const positionalArgs = stripNamedArgs("--outdir", "--config");
|
|
82
83
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
83
|
-
const { start } = await import("./start-
|
|
84
|
+
const { start } = await import("./start-mbn2zgs2.js");
|
|
84
85
|
await start(serverEntry, outdir, configPath, { prepareOnly: true });
|
|
85
86
|
} else if (command === "build") {
|
|
86
87
|
sendTelemetryEvent("cli:command", { command });
|
|
@@ -121,7 +122,7 @@ if (command === "dev") {
|
|
|
121
122
|
await prettier(args);
|
|
122
123
|
} else if (command === "ls") {
|
|
123
124
|
sendTelemetryEvent("cli:command", { command: "ls" });
|
|
124
|
-
const { runLs } = await import("./ls-
|
|
125
|
+
const { runLs } = await import("./ls-0wr74w0b.js");
|
|
125
126
|
await runLs(args);
|
|
126
127
|
} else if (command === "ps") {
|
|
127
128
|
sendTelemetryEvent("cli:command", { command: "ps" });
|
|
@@ -188,7 +189,7 @@ if (command === "dev") {
|
|
|
188
189
|
await runInspect(args);
|
|
189
190
|
} else if (command === "islands") {
|
|
190
191
|
sendTelemetryEvent("cli:command", { command: "islands" });
|
|
191
|
-
const { runIslands } = await import("./islands-
|
|
192
|
+
const { runIslands } = await import("./islands-17tfx8jf.js");
|
|
192
193
|
await runIslands(args);
|
|
193
194
|
} else if (command === "info") {
|
|
194
195
|
sendTelemetryEvent("cli:command", { command });
|
|
@@ -205,13 +206,13 @@ if (command === "dev") {
|
|
|
205
206
|
const configPath = parseNamedArg("--config");
|
|
206
207
|
const positionalArgs = stripNamedArgs("--outdir", "--outfile", "--config");
|
|
207
208
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
208
|
-
const { compile } = await import("./compile-
|
|
209
|
+
const { compile } = await import("./compile-54rb8szn.js");
|
|
209
210
|
await compile(serverEntry, outdir, outfile, configPath);
|
|
210
211
|
} else if (command === "mobile") {
|
|
211
212
|
sendTelemetryEvent("cli:command", {
|
|
212
213
|
command: `mobile:${workspaceCommand ?? "unknown"}`
|
|
213
214
|
});
|
|
214
|
-
const { runMobile } = await import("./mobile-
|
|
215
|
+
const { runMobile } = await import("./mobile-hpqpy61f.js");
|
|
215
216
|
try {
|
|
216
217
|
await runMobile(args);
|
|
217
218
|
} catch (error) {
|
|
@@ -221,7 +222,7 @@ if (command === "dev") {
|
|
|
221
222
|
} else if (command === "typecheck") {
|
|
222
223
|
sendTelemetryEvent("cli:command", { command });
|
|
223
224
|
const configPath = parseNamedArg("--config");
|
|
224
|
-
const { typecheck } = await import("./typecheck-
|
|
225
|
+
const { typecheck } = await import("./typecheck-488txsfc.js");
|
|
225
226
|
await typecheck(configPath);
|
|
226
227
|
} else if (command === "migrate") {
|
|
227
228
|
sendTelemetryEvent("cli:command", { command });
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
colors,
|
|
9
9
|
padLine
|
|
10
10
|
} from "./index-9djrap79.js";
|
|
11
|
+
import {
|
|
12
|
+
scanEntryPoints
|
|
13
|
+
} from "./index-972xxwgj.js";
|
|
11
14
|
import {
|
|
12
15
|
formatBytes
|
|
13
16
|
} from "./index-7854xf0m.js";
|
|
@@ -15,30 +18,16 @@ import {
|
|
|
15
18
|
getIslandManifestKey,
|
|
16
19
|
resolveIslandSourceFile,
|
|
17
20
|
loadIslandRegistryBuildInfo
|
|
18
|
-
} from "./index-
|
|
21
|
+
} from "./index-w6xsk8cv.js";
|
|
19
22
|
|
|
20
23
|
// src/cli/scripts/islands.ts
|
|
21
|
-
import { existsSync
|
|
24
|
+
import { existsSync, readFileSync as readFileSync2, statSync } from "fs";
|
|
22
25
|
import { join, relative, resolve as resolve2 } from "path";
|
|
23
26
|
|
|
24
27
|
// src/islands/pageMetadata.ts
|
|
25
28
|
import { readFileSync } from "fs";
|
|
26
29
|
import { resolve } from "path";
|
|
27
30
|
|
|
28
|
-
// src/build/scanEntryPoints.ts
|
|
29
|
-
import { existsSync } from "fs";
|
|
30
|
-
var {Glob } = globalThis.Bun;
|
|
31
|
-
var scanEntryPoints = async (dir, pattern) => {
|
|
32
|
-
if (!existsSync(dir))
|
|
33
|
-
return [];
|
|
34
|
-
const entryPaths = [];
|
|
35
|
-
const glob = new Glob(pattern);
|
|
36
|
-
for await (const file of glob.scan({ absolute: true, cwd: dir })) {
|
|
37
|
-
entryPaths.push(file);
|
|
38
|
-
}
|
|
39
|
-
return entryPaths;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
31
|
// src/islands/sourceMetadata.ts
|
|
43
32
|
var islandFrameworks = [
|
|
44
33
|
"react",
|
|
@@ -213,7 +202,7 @@ var fileSize = (path) => {
|
|
|
213
202
|
};
|
|
214
203
|
var readManifestSizes = (manifestDir) => {
|
|
215
204
|
const manifestPath = join(manifestDir, "manifest.json");
|
|
216
|
-
if (!
|
|
205
|
+
if (!existsSync(manifestPath))
|
|
217
206
|
return null;
|
|
218
207
|
const manifest = JSON.parse(readFileSync2(manifestPath, "utf-8"));
|
|
219
208
|
const sizes = new Map;
|
|
@@ -12,67 +12,19 @@ import {
|
|
|
12
12
|
padLine,
|
|
13
13
|
visibleLength
|
|
14
14
|
} from "./index-9djrap79.js";
|
|
15
|
+
import {
|
|
16
|
+
scanConventions
|
|
17
|
+
} from "./index-assqancr.js";
|
|
15
18
|
import {
|
|
16
19
|
toPascal
|
|
17
|
-
} from "./index-
|
|
20
|
+
} from "./index-dw44xa4x.js";
|
|
18
21
|
import {
|
|
19
22
|
getDurationString
|
|
20
23
|
} from "./index-pr1skxen.js";
|
|
21
24
|
|
|
22
25
|
// src/cli/scripts/ls.ts
|
|
23
|
-
import { existsSync
|
|
24
|
-
import { basename
|
|
25
|
-
|
|
26
|
-
// src/build/scanConventions.ts
|
|
27
|
-
import { basename } from "path";
|
|
28
|
-
var {Glob } = globalThis.Bun;
|
|
29
|
-
import { existsSync } from "fs";
|
|
30
|
-
var CONVENTION_RE = /^(?:(.+)\.)?(error|loading|not-found)\.[^.]+$/;
|
|
31
|
-
var classifyFile = (file, pageFiles, defaults, pages) => {
|
|
32
|
-
const fileName = basename(file);
|
|
33
|
-
const match = CONVENTION_RE.exec(fileName);
|
|
34
|
-
if (!match) {
|
|
35
|
-
pageFiles.push(file);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const [, pageName, kind] = match;
|
|
39
|
-
if (!pageName) {
|
|
40
|
-
if (kind === "error")
|
|
41
|
-
defaults.error = file;
|
|
42
|
-
else if (kind === "loading")
|
|
43
|
-
defaults.loading = file;
|
|
44
|
-
else if (kind === "not-found")
|
|
45
|
-
defaults.notFound = file;
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (!pages[pageName])
|
|
49
|
-
pages[pageName] = {};
|
|
50
|
-
if (kind === "error")
|
|
51
|
-
pages[pageName].error = file;
|
|
52
|
-
else if (kind === "loading")
|
|
53
|
-
pages[pageName].loading = file;
|
|
54
|
-
};
|
|
55
|
-
var scanConventions = async (pagesDir, pattern) => {
|
|
56
|
-
if (!existsSync(pagesDir)) {
|
|
57
|
-
const pageFiles = [];
|
|
58
|
-
return { conventions: undefined, pageFiles };
|
|
59
|
-
}
|
|
60
|
-
const pageFiles = [];
|
|
61
|
-
const defaults = {};
|
|
62
|
-
const pages = {};
|
|
63
|
-
const glob = new Glob(pattern);
|
|
64
|
-
for await (const file of glob.scan({ absolute: true, cwd: pagesDir })) {
|
|
65
|
-
classifyFile(file, pageFiles, defaults, pages);
|
|
66
|
-
}
|
|
67
|
-
const hasConventions = defaults.error !== undefined || defaults.loading !== undefined || defaults.notFound !== undefined || Object.keys(pages).length > 0;
|
|
68
|
-
const conventions = hasConventions ? {
|
|
69
|
-
...defaults.error || defaults.loading || defaults.notFound ? { defaults } : {},
|
|
70
|
-
...Object.keys(pages).length > 0 ? { pages } : {}
|
|
71
|
-
} : undefined;
|
|
72
|
-
return { conventions, pageFiles };
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// src/cli/scripts/ls.ts
|
|
26
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
27
|
+
import { basename, extname, join, relative } from "path";
|
|
76
28
|
var DEFAULT_BUILD_DIR = "build";
|
|
77
29
|
var LABEL_ORDER = ["React", "Vue", "Svelte", "Angular", "HTML", "HTMX"];
|
|
78
30
|
var ARTIFACT_SUFFIXES = [
|
|
@@ -129,7 +81,7 @@ var scanFramework = async (spec) => {
|
|
|
129
81
|
if (pageFiles.length === 0)
|
|
130
82
|
return null;
|
|
131
83
|
const pages = pageFiles.map((file) => ({
|
|
132
|
-
name:
|
|
84
|
+
name: basename(file, extname(file)),
|
|
133
85
|
sizeBytes: null,
|
|
134
86
|
sourcePath: relativeOrSelf(file)
|
|
135
87
|
}));
|
|
@@ -150,10 +102,10 @@ var mergeByLabel = (groups) => {
|
|
|
150
102
|
});
|
|
151
103
|
};
|
|
152
104
|
var resolveDiskPath = (buildDir, value) => {
|
|
153
|
-
if (
|
|
105
|
+
if (existsSync(value))
|
|
154
106
|
return value;
|
|
155
107
|
const underBuild = join(buildDir, value);
|
|
156
|
-
if (
|
|
108
|
+
if (existsSync(underBuild))
|
|
157
109
|
return underBuild;
|
|
158
110
|
return join(process.cwd(), value);
|
|
159
111
|
};
|
|
@@ -309,7 +261,7 @@ var runLs = async (args) => {
|
|
|
309
261
|
}
|
|
310
262
|
const sizesDir = resolveSizesDir(args, candidates);
|
|
311
263
|
const manifestPath = join(sizesDir, "manifest.json");
|
|
312
|
-
if (!
|
|
264
|
+
if (!existsSync(manifestPath)) {
|
|
313
265
|
printDim(`No build at ${relativeOrSelf(manifestPath)}. Run \`absolute build\` first, or pass \`--outdir <dir>\`.`);
|
|
314
266
|
return;
|
|
315
267
|
}
|
|
@@ -10,10 +10,6 @@ import {
|
|
|
10
10
|
assertNativePackageVersions,
|
|
11
11
|
packageNameFromSpec,
|
|
12
12
|
packagesNeedingExactInstall,
|
|
13
|
-
discoverAbsoluteSyncSchema,
|
|
14
|
-
absoluteDeviceNativeRequirements,
|
|
15
|
-
assertAbsoluteDeviceCapabilityPackages,
|
|
16
|
-
resolveAbsoluteDeviceCapabilityPlan,
|
|
17
13
|
ABSOLUTE_MOBILE_UPDATE_FORMAT,
|
|
18
14
|
absoluteMobileUpdateSigningPayload,
|
|
19
15
|
canonicalizeAbsoluteMobileUpdate,
|
|
@@ -26,11 +22,17 @@ import {
|
|
|
26
22
|
renderAbsoluteMobileBrandingPreview,
|
|
27
23
|
writeAbsoluteExpoProject2,
|
|
28
24
|
syncAbsoluteExpoWebAssets2
|
|
29
|
-
} from "./index-
|
|
25
|
+
} from "./index-0gd30trc.js";
|
|
30
26
|
import {
|
|
31
27
|
projectUsesAbsoluteAuth2,
|
|
32
28
|
projectUsesAbsoluteSync2
|
|
33
29
|
} from "./index-pch0v1z6.js";
|
|
30
|
+
import {
|
|
31
|
+
discoverAbsoluteSyncSchema,
|
|
32
|
+
absoluteDeviceNativeRequirements,
|
|
33
|
+
assertAbsoluteDeviceCapabilityPackages,
|
|
34
|
+
resolveAbsoluteDeviceCapabilityPlan
|
|
35
|
+
} from "./index-ycqdxy55.js";
|
|
34
36
|
import"./index-4j1twret.js";
|
|
35
37
|
import {
|
|
36
38
|
normalizeAbsoluteMobileConfig2
|
|
@@ -63,7 +65,7 @@ import {
|
|
|
63
65
|
resolveAbsoluteMobileRoute,
|
|
64
66
|
ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
|
|
65
67
|
ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT
|
|
66
|
-
} from "./index-
|
|
68
|
+
} from "./index-js2hksgv.js";
|
|
67
69
|
import {
|
|
68
70
|
buildAbsoluteExpoAndroidWslBundle2
|
|
69
71
|
} from "./index-3sfcmb49.js";
|
|
@@ -79,7 +81,7 @@ import {
|
|
|
79
81
|
} from "./index-prza6tkp.js";
|
|
80
82
|
import {
|
|
81
83
|
start2
|
|
82
|
-
} from "./index-
|
|
84
|
+
} from "./index-kx2d067c.js";
|
|
83
85
|
import {
|
|
84
86
|
captureAbsoluteRemoteMacCommand2,
|
|
85
87
|
getAbsoluteRemoteMacProfile2,
|
|
@@ -99,7 +101,8 @@ import {
|
|
|
99
101
|
import {
|
|
100
102
|
formatBytes
|
|
101
103
|
} from "./index-7854xf0m.js";
|
|
102
|
-
import"./index-
|
|
104
|
+
import"./index-42xjh6gg.js";
|
|
105
|
+
import"./index-w6xsk8cv.js";
|
|
103
106
|
import {
|
|
104
107
|
sendTelemetryEvent
|
|
105
108
|
} from "./index-qyxd5n9a.js";
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import"./index-jyap0bhv.js";
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./index-bp60baze.js";
|
|
6
|
-
|
|
7
|
-
// src/build/rewriteImportsPlugin.ts
|
|
8
|
-
var rewriteImportsInContent = (content, vendorPaths) => {
|
|
9
|
-
if (Object.keys(vendorPaths).length === 0)
|
|
10
|
-
return content;
|
|
11
|
-
return rewriteContentSpecifiers(content, compileSpecifierRewriter(vendorPaths), { sweep: false });
|
|
12
|
-
};
|
|
4
|
+
rewriteImportsInContent2
|
|
5
|
+
} from "./index-z74cqxz0.js";
|
|
13
6
|
|
|
14
7
|
// src/build/rewriteImports.ts
|
|
15
8
|
var rewriteImports = async (outputPaths, vendorPaths) => {
|
|
@@ -28,7 +21,7 @@ var rewriteImports = async (outputPaths, vendorPaths) => {
|
|
|
28
21
|
return;
|
|
29
22
|
throw err;
|
|
30
23
|
}
|
|
31
|
-
const rewritten =
|
|
24
|
+
const rewritten = rewriteImportsInContent2(original, vendorPaths);
|
|
32
25
|
if (rewritten === original)
|
|
33
26
|
return;
|
|
34
27
|
try {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
rewriteBuildOutputsWith2,
|
|
4
|
+
rewriteImportsInContent2,
|
|
5
|
+
rewriteVendorDirectories2
|
|
6
|
+
} from "./index-z74cqxz0.js";
|
|
7
|
+
import"./index-jyap0bhv.js";
|
|
8
|
+
export {
|
|
9
|
+
rewriteBuildOutputsWith2 as rewriteBuildOutputsWith,
|
|
10
|
+
rewriteImportsInContent2 as rewriteImportsInContent,
|
|
11
|
+
rewriteVendorDirectories2 as rewriteVendorDirectories
|
|
12
|
+
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
start2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-kx2d067c.js";
|
|
5
|
+
import"./index-js2hksgv.js";
|
|
6
|
+
import"./index-42xjh6gg.js";
|
|
7
|
+
import"./index-w6xsk8cv.js";
|
|
7
8
|
import"./index-71gchbzt.js";
|
|
8
9
|
import"./index-wk0pyxrg.js";
|
|
9
10
|
import"./index-qyxd5n9a.js";
|
|
10
11
|
import"./index-43a1vvb7.js";
|
|
11
12
|
import"./index-t7yf3vxs.js";
|
|
12
|
-
import"./index-
|
|
13
|
+
import"./index-0gd30trc.js";
|
|
14
|
+
import"./index-ycqdxy55.js";
|
|
13
15
|
import"./index-4j1twret.js";
|
|
14
16
|
import"./index-pch0v1z6.js";
|
|
15
17
|
import"./index-125cfzvn.js";
|