@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/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
|
};
|
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
|