@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/build.js
CHANGED
|
@@ -113,7 +113,10 @@ var getDurationString = (duration) => {
|
|
|
113
113
|
} else if (duration < MILLISECONDS_IN_A_MINUTE) {
|
|
114
114
|
durationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;
|
|
115
115
|
} else {
|
|
116
|
-
|
|
116
|
+
const totalSeconds = Math.round(duration / MILLISECONDS_IN_A_SECOND);
|
|
117
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
118
|
+
const seconds = totalSeconds % 60;
|
|
119
|
+
durationString = seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
117
120
|
}
|
|
118
121
|
return durationString;
|
|
119
122
|
};
|
|
@@ -43498,6 +43501,7 @@ var init_lowerDeferSyntax = __esm(() => {
|
|
|
43498
43501
|
// src/build/compileAngular.ts
|
|
43499
43502
|
var exports_compileAngular = {};
|
|
43500
43503
|
__export(exports_compileAngular, {
|
|
43504
|
+
compileAngularFiles: () => compileAngularFiles,
|
|
43501
43505
|
compileAngularFileJIT: () => compileAngularFileJIT,
|
|
43502
43506
|
compileAngularFile: () => compileAngularFile,
|
|
43503
43507
|
compileAngular: () => compileAngular
|
|
@@ -43711,7 +43715,7 @@ ${registrations}
|
|
|
43711
43715
|
if (typeof hostSource === "string")
|
|
43712
43716
|
return hostSource;
|
|
43713
43717
|
return fs2.readFile(fileName, "utf-8");
|
|
43714
|
-
}, precomputeAotResourceTransforms = async (
|
|
43718
|
+
}, precomputeAotResourceTransforms = async (inputPaths, readFile4, stylePreprocessors) => {
|
|
43715
43719
|
const transformedSources = new Map;
|
|
43716
43720
|
const visited = new Set;
|
|
43717
43721
|
const transformFile = async (filePath) => {
|
|
@@ -43731,10 +43735,16 @@ ${registrations}
|
|
|
43731
43735
|
await transformFile(resolvedImport);
|
|
43732
43736
|
}));
|
|
43733
43737
|
};
|
|
43734
|
-
await transformFile(inputPath);
|
|
43738
|
+
await Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));
|
|
43735
43739
|
return transformedSources;
|
|
43736
|
-
},
|
|
43737
|
-
const
|
|
43740
|
+
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
43741
|
+
const islandMetadataByOutputPath = new Map(inputPaths.map((inputPath) => {
|
|
43742
|
+
const outputPath = resolve16(join15(outDir, relative9(process.cwd(), resolve16(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
43743
|
+
return [
|
|
43744
|
+
outputPath,
|
|
43745
|
+
buildIslandMetadataExports(readFileSync9(inputPath, "utf-8"))
|
|
43746
|
+
];
|
|
43747
|
+
}));
|
|
43738
43748
|
const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
|
|
43739
43749
|
const tsPath = __require.resolve("typescript");
|
|
43740
43750
|
const tsRootDir = dirname10(tsPath);
|
|
@@ -43785,7 +43795,7 @@ ${registrations}
|
|
|
43785
43795
|
emitted[relativePath] = text;
|
|
43786
43796
|
};
|
|
43787
43797
|
const originalReadFile = host.readFile;
|
|
43788
|
-
const aotTransformedSources = await precomputeAotResourceTransforms(
|
|
43798
|
+
const aotTransformedSources = await precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors);
|
|
43789
43799
|
host.readFile = (fileName) => {
|
|
43790
43800
|
const source = originalReadFile ? originalReadFile.call(host, fileName) : undefined;
|
|
43791
43801
|
if (typeof source !== "string")
|
|
@@ -43810,7 +43820,7 @@ ${registrations}
|
|
|
43810
43820
|
emitFlags: EmitFlags.Default,
|
|
43811
43821
|
host,
|
|
43812
43822
|
options,
|
|
43813
|
-
rootNames:
|
|
43823
|
+
rootNames: inputPaths
|
|
43814
43824
|
}));
|
|
43815
43825
|
} finally {
|
|
43816
43826
|
host.readFile = originalReadFile;
|
|
@@ -43836,13 +43846,13 @@ ${registrations}
|
|
|
43836
43846
|
return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
|
|
43837
43847
|
});
|
|
43838
43848
|
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
43839
|
-
processedContent +=
|
|
43849
|
+
processedContent += islandMetadataByOutputPath.get(resolve16(target)) ?? "";
|
|
43840
43850
|
return { content: processedContent, target };
|
|
43841
43851
|
});
|
|
43842
43852
|
await Promise.all(entries.map(({ target }) => fs2.mkdir(dirname10(target), { recursive: true })));
|
|
43843
43853
|
await Promise.all(entries.map(({ target, content }) => fs2.writeFile(target, content, "utf-8")));
|
|
43844
43854
|
return entries.map(({ target }) => target);
|
|
43845
|
-
}, jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
43855
|
+
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
43846
43856
|
const re2 = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
43847
43857
|
let match;
|
|
43848
43858
|
while ((match = re2.exec(source)) !== null) {
|
|
@@ -44250,11 +44260,12 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44250
44260
|
const compiledRoot = compiledParent;
|
|
44251
44261
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44252
44262
|
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44263
|
+
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve16(entry)), compiledRoot, stylePreprocessors);
|
|
44253
44264
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44254
44265
|
const resolvedEntry = resolve16(entry);
|
|
44255
44266
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
44256
|
-
const compileEntry = () =>
|
|
44257
|
-
let outputs = await compileEntry();
|
|
44267
|
+
const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
|
|
44268
|
+
let outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44258
44269
|
const fileBase = basename6(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
44259
44270
|
const jsName = `${fileBase}.js`;
|
|
44260
44271
|
const compiledFallbackPaths = [
|
|
@@ -44281,7 +44292,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44281
44292
|
rawServerFile = resolveRawServerFile([]);
|
|
44282
44293
|
}
|
|
44283
44294
|
if (rawServerFile && !existsSync16(rawServerFile)) {
|
|
44284
|
-
outputs = await compileEntry();
|
|
44295
|
+
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44285
44296
|
rawServerFile = resolveRawServerFile(outputs);
|
|
44286
44297
|
}
|
|
44287
44298
|
if (!rawServerFile || !existsSync16(rawServerFile)) {
|
|
@@ -50094,5 +50105,5 @@ export {
|
|
|
50094
50105
|
build
|
|
50095
50106
|
};
|
|
50096
50107
|
|
|
50097
|
-
//# debugId=
|
|
50108
|
+
//# debugId=366BD10A28027E4564756E2164756E21
|
|
50098
50109
|
//# sourceMappingURL=build.js.map
|