@absolutejs/absolute 0.19.0-beta.757 → 0.19.0-beta.759
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/index.js +24 -13
- package/dist/angular/index.js.map +4 -4
- package/dist/angular/server.js +24 -13
- package/dist/angular/server.js.map +4 -4
- package/dist/build.js +24 -13
- package/dist/build.js.map +4 -4
- package/dist/cli/index.js +34 -10
- package/dist/index.js +24 -13
- package/dist/index.js.map +4 -4
- package/dist/react/index.js +5 -2
- package/dist/react/index.js.map +3 -3
- package/dist/react/server.js +5 -2
- package/dist/react/server.js.map +3 -3
- package/dist/src/build/compileAngular.d.ts +1 -0
- package/dist/svelte/index.js +5 -2
- package/dist/svelte/index.js.map +3 -3
- package/dist/svelte/server.js +5 -2
- package/dist/svelte/server.js.map +3 -3
- package/dist/vue/index.js +5 -2
- package/dist/vue/index.js.map +3 -3
- package/dist/vue/server.js +5 -2
- package/dist/vue/server.js.map +3 -3
- package/package.json +7 -7
package/dist/cli/index.js
CHANGED
|
@@ -33,7 +33,10 @@ var getDurationString = (duration) => {
|
|
|
33
33
|
} else if (duration < MILLISECONDS_IN_A_MINUTE) {
|
|
34
34
|
durationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;
|
|
35
35
|
} else {
|
|
36
|
-
|
|
36
|
+
const totalSeconds = Math.round(duration / MILLISECONDS_IN_A_SECOND);
|
|
37
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
38
|
+
const seconds = totalSeconds % 60;
|
|
39
|
+
durationString = seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
37
40
|
}
|
|
38
41
|
return durationString;
|
|
39
42
|
};
|
|
@@ -1255,7 +1258,7 @@ __export(exports_typecheck, {
|
|
|
1255
1258
|
typecheck: () => typecheck
|
|
1256
1259
|
});
|
|
1257
1260
|
import { resolve as resolve9, join as join7 } from "path";
|
|
1258
|
-
import { existsSync as existsSync10 } from "fs";
|
|
1261
|
+
import { existsSync as existsSync10, readFileSync as readFileSync10 } from "fs";
|
|
1259
1262
|
import { mkdir as mkdir2, writeFile } from "fs/promises";
|
|
1260
1263
|
var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), getTypecheckTargets = async (configPath2) => {
|
|
1261
1264
|
const rawConfig = await loadRawConfig(configPath2);
|
|
@@ -1329,7 +1332,31 @@ Found ${errorCount} error${suffix}.`;
|
|
|
1329
1332
|
resolve9(import.meta.dir, "../../../types", fileName)
|
|
1330
1333
|
];
|
|
1331
1334
|
return candidates.find((candidate) => existsSync10(candidate)) ?? candidates[0];
|
|
1332
|
-
},
|
|
1335
|
+
}, ABSOLUTE_TYPECHECK_FILES, readProjectTsconfig = () => {
|
|
1336
|
+
try {
|
|
1337
|
+
return JSON.parse(readFileSync10(resolve9("tsconfig.json"), "utf-8"));
|
|
1338
|
+
} catch {
|
|
1339
|
+
return {};
|
|
1340
|
+
}
|
|
1341
|
+
}, toGeneratedConfigPath = (path) => path.startsWith("/") ? path : `../${path}`, getProjectTypecheckIncludes = () => {
|
|
1342
|
+
const config = readProjectTsconfig();
|
|
1343
|
+
const includes = Array.isArray(config.include) && config.include.length > 0 ? config.include : TYPECHECK_INCLUDE;
|
|
1344
|
+
const files = Array.isArray(config.files) ? config.files : [];
|
|
1345
|
+
return [
|
|
1346
|
+
...includes.map(toGeneratedConfigPath),
|
|
1347
|
+
...files.map(toGeneratedConfigPath),
|
|
1348
|
+
...ABSOLUTE_TYPECHECK_FILES
|
|
1349
|
+
];
|
|
1350
|
+
}, getProjectTypecheckExcludes = () => {
|
|
1351
|
+
const config = readProjectTsconfig();
|
|
1352
|
+
const excludes = Array.isArray(config.exclude) ? config.exclude : [];
|
|
1353
|
+
return [
|
|
1354
|
+
...new Set([
|
|
1355
|
+
...TYPECHECK_EXCLUDE,
|
|
1356
|
+
...excludes.map(toGeneratedConfigPath)
|
|
1357
|
+
])
|
|
1358
|
+
];
|
|
1359
|
+
}, buildVueTscCheck = (cacheDir) => {
|
|
1333
1360
|
const vueTscBin = findBin("vue-tsc");
|
|
1334
1361
|
if (!vueTscBin) {
|
|
1335
1362
|
console.error("\x1B[31m\u2717\x1B[0m vue-tsc is required for Vue type checking. Install it: bun add -d vue-tsc");
|
|
@@ -1340,10 +1367,9 @@ Found ${errorCount} error${suffix}.`;
|
|
|
1340
1367
|
compilerOptions: {
|
|
1341
1368
|
rootDir: ".."
|
|
1342
1369
|
},
|
|
1343
|
-
exclude:
|
|
1370
|
+
exclude: getProjectTypecheckExcludes(),
|
|
1344
1371
|
extends: resolve9("tsconfig.json"),
|
|
1345
|
-
|
|
1346
|
-
include: ABSOLUTE_TYPECHECK_INCLUDE
|
|
1372
|
+
include: getProjectTypecheckIncludes()
|
|
1347
1373
|
}, null, "\t")).then(() => run("vue-tsc", [
|
|
1348
1374
|
vueTscBin,
|
|
1349
1375
|
"--noEmit",
|
|
@@ -1385,10 +1411,9 @@ Found ${errorCount} error${suffix}.`;
|
|
|
1385
1411
|
compilerOptions: {
|
|
1386
1412
|
rootDir: ".."
|
|
1387
1413
|
},
|
|
1388
|
-
exclude:
|
|
1414
|
+
exclude: getProjectTypecheckExcludes(),
|
|
1389
1415
|
extends: resolve9("tsconfig.json"),
|
|
1390
|
-
|
|
1391
|
-
include: ABSOLUTE_TYPECHECK_INCLUDE
|
|
1416
|
+
include: getProjectTypecheckIncludes()
|
|
1392
1417
|
}, null, "\t")).then(() => run("tsc", [
|
|
1393
1418
|
tscBin,
|
|
1394
1419
|
"--noEmit",
|
|
@@ -1482,7 +1507,6 @@ var init_typecheck = __esm(() => {
|
|
|
1482
1507
|
"../test/**/*",
|
|
1483
1508
|
"../scripts/**/*"
|
|
1484
1509
|
];
|
|
1485
|
-
ABSOLUTE_TYPECHECK_INCLUDE = [...TYPECHECK_INCLUDE];
|
|
1486
1510
|
ABSOLUTE_TYPECHECK_FILES = [
|
|
1487
1511
|
resolveAbsoluteTypeFile("style-module-shim.d.ts")
|
|
1488
1512
|
];
|
package/dist/index.js
CHANGED
|
@@ -3151,7 +3151,10 @@ var getDurationString = (duration) => {
|
|
|
3151
3151
|
} else if (duration < MILLISECONDS_IN_A_MINUTE) {
|
|
3152
3152
|
durationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;
|
|
3153
3153
|
} else {
|
|
3154
|
-
|
|
3154
|
+
const totalSeconds = Math.round(duration / MILLISECONDS_IN_A_SECOND);
|
|
3155
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
3156
|
+
const seconds = totalSeconds % 60;
|
|
3157
|
+
durationString = seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
3155
3158
|
}
|
|
3156
3159
|
return durationString;
|
|
3157
3160
|
};
|
|
@@ -43690,6 +43693,7 @@ var init_lowerDeferSyntax = __esm(() => {
|
|
|
43690
43693
|
// src/build/compileAngular.ts
|
|
43691
43694
|
var exports_compileAngular = {};
|
|
43692
43695
|
__export(exports_compileAngular, {
|
|
43696
|
+
compileAngularFiles: () => compileAngularFiles,
|
|
43693
43697
|
compileAngularFileJIT: () => compileAngularFileJIT,
|
|
43694
43698
|
compileAngularFile: () => compileAngularFile,
|
|
43695
43699
|
compileAngular: () => compileAngular
|
|
@@ -43903,7 +43907,7 @@ ${registrations}
|
|
|
43903
43907
|
if (typeof hostSource === "string")
|
|
43904
43908
|
return hostSource;
|
|
43905
43909
|
return fs2.readFile(fileName, "utf-8");
|
|
43906
|
-
}, precomputeAotResourceTransforms = async (
|
|
43910
|
+
}, precomputeAotResourceTransforms = async (inputPaths, readFile4, stylePreprocessors) => {
|
|
43907
43911
|
const transformedSources = new Map;
|
|
43908
43912
|
const visited = new Set;
|
|
43909
43913
|
const transformFile = async (filePath) => {
|
|
@@ -43923,10 +43927,16 @@ ${registrations}
|
|
|
43923
43927
|
await transformFile(resolvedImport);
|
|
43924
43928
|
}));
|
|
43925
43929
|
};
|
|
43926
|
-
await transformFile(inputPath);
|
|
43930
|
+
await Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));
|
|
43927
43931
|
return transformedSources;
|
|
43928
|
-
},
|
|
43929
|
-
const
|
|
43932
|
+
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
43933
|
+
const islandMetadataByOutputPath = new Map(inputPaths.map((inputPath) => {
|
|
43934
|
+
const outputPath = resolve19(join15(outDir, relative9(process.cwd(), resolve19(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
43935
|
+
return [
|
|
43936
|
+
outputPath,
|
|
43937
|
+
buildIslandMetadataExports(readFileSync10(inputPath, "utf-8"))
|
|
43938
|
+
];
|
|
43939
|
+
}));
|
|
43930
43940
|
const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
|
|
43931
43941
|
const tsPath = __require.resolve("typescript");
|
|
43932
43942
|
const tsRootDir = dirname11(tsPath);
|
|
@@ -43977,7 +43987,7 @@ ${registrations}
|
|
|
43977
43987
|
emitted[relativePath] = text;
|
|
43978
43988
|
};
|
|
43979
43989
|
const originalReadFile = host.readFile;
|
|
43980
|
-
const aotTransformedSources = await precomputeAotResourceTransforms(
|
|
43990
|
+
const aotTransformedSources = await precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors);
|
|
43981
43991
|
host.readFile = (fileName) => {
|
|
43982
43992
|
const source = originalReadFile ? originalReadFile.call(host, fileName) : undefined;
|
|
43983
43993
|
if (typeof source !== "string")
|
|
@@ -44002,7 +44012,7 @@ ${registrations}
|
|
|
44002
44012
|
emitFlags: EmitFlags.Default,
|
|
44003
44013
|
host,
|
|
44004
44014
|
options,
|
|
44005
|
-
rootNames:
|
|
44015
|
+
rootNames: inputPaths
|
|
44006
44016
|
}));
|
|
44007
44017
|
} finally {
|
|
44008
44018
|
host.readFile = originalReadFile;
|
|
@@ -44028,13 +44038,13 @@ ${registrations}
|
|
|
44028
44038
|
return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
|
|
44029
44039
|
});
|
|
44030
44040
|
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
44031
|
-
processedContent +=
|
|
44041
|
+
processedContent += islandMetadataByOutputPath.get(resolve19(target)) ?? "";
|
|
44032
44042
|
return { content: processedContent, target };
|
|
44033
44043
|
});
|
|
44034
44044
|
await Promise.all(entries.map(({ target }) => fs2.mkdir(dirname11(target), { recursive: true })));
|
|
44035
44045
|
await Promise.all(entries.map(({ target, content }) => fs2.writeFile(target, content, "utf-8")));
|
|
44036
44046
|
return entries.map(({ target }) => target);
|
|
44037
|
-
}, jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
44047
|
+
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
44038
44048
|
const re2 = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
44039
44049
|
let match;
|
|
44040
44050
|
while ((match = re2.exec(source)) !== null) {
|
|
@@ -44442,11 +44452,12 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44442
44452
|
const compiledRoot = compiledParent;
|
|
44443
44453
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44444
44454
|
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44455
|
+
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve19(entry)), compiledRoot, stylePreprocessors);
|
|
44445
44456
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44446
44457
|
const resolvedEntry = resolve19(entry);
|
|
44447
44458
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
44448
|
-
const compileEntry = () =>
|
|
44449
|
-
let outputs = await compileEntry();
|
|
44459
|
+
const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
|
|
44460
|
+
let outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44450
44461
|
const fileBase = basename7(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
44451
44462
|
const jsName = `${fileBase}.js`;
|
|
44452
44463
|
const compiledFallbackPaths = [
|
|
@@ -44473,7 +44484,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44473
44484
|
rawServerFile = resolveRawServerFile([]);
|
|
44474
44485
|
}
|
|
44475
44486
|
if (rawServerFile && !existsSync16(rawServerFile)) {
|
|
44476
|
-
outputs = await compileEntry();
|
|
44487
|
+
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44477
44488
|
rawServerFile = resolveRawServerFile(outputs);
|
|
44478
44489
|
}
|
|
44479
44490
|
if (!rawServerFile || !existsSync16(rawServerFile)) {
|
|
@@ -58554,5 +58565,5 @@ export {
|
|
|
58554
58565
|
ANGULAR_INIT_TIMEOUT_MS
|
|
58555
58566
|
};
|
|
58556
58567
|
|
|
58557
|
-
//# debugId=
|
|
58568
|
+
//# debugId=6AC746B610DD2DD564756E2164756E21
|
|
58558
58569
|
//# sourceMappingURL=index.js.map
|