@absolutejs/absolute 0.19.0-beta.757 → 0.19.0-beta.758
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 +4 -1
- 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/angular/server.js
CHANGED
|
@@ -2536,7 +2536,10 @@ var getDurationString = (duration) => {
|
|
|
2536
2536
|
} else if (duration < MILLISECONDS_IN_A_MINUTE) {
|
|
2537
2537
|
durationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;
|
|
2538
2538
|
} else {
|
|
2539
|
-
|
|
2539
|
+
const totalSeconds = Math.round(duration / MILLISECONDS_IN_A_SECOND);
|
|
2540
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
2541
|
+
const seconds = totalSeconds % 60;
|
|
2542
|
+
durationString = seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
2540
2543
|
}
|
|
2541
2544
|
return durationString;
|
|
2542
2545
|
};
|
|
@@ -3219,6 +3222,7 @@ var init_lowerDeferSyntax = __esm(() => {
|
|
|
3219
3222
|
// src/build/compileAngular.ts
|
|
3220
3223
|
var exports_compileAngular = {};
|
|
3221
3224
|
__export(exports_compileAngular, {
|
|
3225
|
+
compileAngularFiles: () => compileAngularFiles,
|
|
3222
3226
|
compileAngularFileJIT: () => compileAngularFileJIT,
|
|
3223
3227
|
compileAngularFile: () => compileAngularFile,
|
|
3224
3228
|
compileAngular: () => compileAngular
|
|
@@ -3432,7 +3436,7 @@ ${registrations}
|
|
|
3432
3436
|
if (typeof hostSource === "string")
|
|
3433
3437
|
return hostSource;
|
|
3434
3438
|
return fs.readFile(fileName, "utf-8");
|
|
3435
|
-
}, precomputeAotResourceTransforms = async (
|
|
3439
|
+
}, precomputeAotResourceTransforms = async (inputPaths, readFile2, stylePreprocessors) => {
|
|
3436
3440
|
const transformedSources = new Map;
|
|
3437
3441
|
const visited = new Set;
|
|
3438
3442
|
const transformFile = async (filePath) => {
|
|
@@ -3452,10 +3456,16 @@ ${registrations}
|
|
|
3452
3456
|
await transformFile(resolvedImport);
|
|
3453
3457
|
}));
|
|
3454
3458
|
};
|
|
3455
|
-
await transformFile(inputPath);
|
|
3459
|
+
await Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));
|
|
3456
3460
|
return transformedSources;
|
|
3457
|
-
},
|
|
3458
|
-
const
|
|
3461
|
+
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
3462
|
+
const islandMetadataByOutputPath = new Map(inputPaths.map((inputPath) => {
|
|
3463
|
+
const outputPath = resolve6(join5(outDir, relative3(process.cwd(), resolve6(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
3464
|
+
return [
|
|
3465
|
+
outputPath,
|
|
3466
|
+
buildIslandMetadataExports(readFileSync4(inputPath, "utf-8"))
|
|
3467
|
+
];
|
|
3468
|
+
}));
|
|
3459
3469
|
const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
|
|
3460
3470
|
const tsPath = __require.resolve("typescript");
|
|
3461
3471
|
const tsRootDir = dirname4(tsPath);
|
|
@@ -3506,7 +3516,7 @@ ${registrations}
|
|
|
3506
3516
|
emitted[relativePath] = text;
|
|
3507
3517
|
};
|
|
3508
3518
|
const originalReadFile = host.readFile;
|
|
3509
|
-
const aotTransformedSources = await precomputeAotResourceTransforms(
|
|
3519
|
+
const aotTransformedSources = await precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors);
|
|
3510
3520
|
host.readFile = (fileName) => {
|
|
3511
3521
|
const source = originalReadFile ? originalReadFile.call(host, fileName) : undefined;
|
|
3512
3522
|
if (typeof source !== "string")
|
|
@@ -3531,7 +3541,7 @@ ${registrations}
|
|
|
3531
3541
|
emitFlags: EmitFlags.Default,
|
|
3532
3542
|
host,
|
|
3533
3543
|
options,
|
|
3534
|
-
rootNames:
|
|
3544
|
+
rootNames: inputPaths
|
|
3535
3545
|
}));
|
|
3536
3546
|
} finally {
|
|
3537
3547
|
host.readFile = originalReadFile;
|
|
@@ -3557,13 +3567,13 @@ ${registrations}
|
|
|
3557
3567
|
return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
|
|
3558
3568
|
});
|
|
3559
3569
|
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
3560
|
-
processedContent +=
|
|
3570
|
+
processedContent += islandMetadataByOutputPath.get(resolve6(target)) ?? "";
|
|
3561
3571
|
return { content: processedContent, target };
|
|
3562
3572
|
});
|
|
3563
3573
|
await Promise.all(entries.map(({ target }) => fs.mkdir(dirname4(target), { recursive: true })));
|
|
3564
3574
|
await Promise.all(entries.map(({ target, content }) => fs.writeFile(target, content, "utf-8")));
|
|
3565
3575
|
return entries.map(({ target }) => target);
|
|
3566
|
-
}, jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
3576
|
+
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
3567
3577
|
const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
3568
3578
|
let match;
|
|
3569
3579
|
while ((match = re.exec(source)) !== null) {
|
|
@@ -3971,11 +3981,12 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
3971
3981
|
const compiledRoot = compiledParent;
|
|
3972
3982
|
const indexesDir = join5(compiledParent, "indexes");
|
|
3973
3983
|
await fs.mkdir(indexesDir, { recursive: true });
|
|
3984
|
+
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve6(entry)), compiledRoot, stylePreprocessors);
|
|
3974
3985
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
3975
3986
|
const resolvedEntry = resolve6(entry);
|
|
3976
3987
|
const relativeEntry = relative3(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
3977
|
-
const compileEntry = () =>
|
|
3978
|
-
let outputs = await compileEntry();
|
|
3988
|
+
const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
|
|
3989
|
+
let outputs = hmr ? await compileEntry() : aotOutputs;
|
|
3979
3990
|
const fileBase = basename3(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
3980
3991
|
const jsName = `${fileBase}.js`;
|
|
3981
3992
|
const compiledFallbackPaths = [
|
|
@@ -4002,7 +4013,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4002
4013
|
rawServerFile = resolveRawServerFile([]);
|
|
4003
4014
|
}
|
|
4004
4015
|
if (rawServerFile && !existsSync5(rawServerFile)) {
|
|
4005
|
-
outputs = await compileEntry();
|
|
4016
|
+
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
4006
4017
|
rawServerFile = resolveRawServerFile(outputs);
|
|
4007
4018
|
}
|
|
4008
4019
|
if (!rawServerFile || !existsSync5(rawServerFile)) {
|
|
@@ -5443,5 +5454,5 @@ export {
|
|
|
5443
5454
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
5444
5455
|
};
|
|
5445
5456
|
|
|
5446
|
-
//# debugId=
|
|
5457
|
+
//# debugId=E05F6DFD53809BC964756E2164756E21
|
|
5447
5458
|
//# sourceMappingURL=server.js.map
|