@absolutejs/absolute 0.19.0-beta.947 → 0.19.0-beta.949
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +38 -21
- package/dist/angular/index.js.map +5 -6
- package/dist/angular/server.js +38 -21
- package/dist/angular/server.js.map +5 -6
- package/dist/build.js +843 -369
- package/dist/build.js.map +17 -17
- package/dist/cli/index.js +206 -50
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +2 -2
- package/dist/index.js +1139 -460
- package/dist/index.js.map +19 -19
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +2 -2
- package/dist/react/index.js +2 -27
- package/dist/react/index.js.map +4 -5
- package/dist/react/server.js +1 -26
- package/dist/react/server.js.map +4 -5
- package/dist/src/angular/pageHandler.d.ts +0 -1
- package/dist/src/build/compileAngular.d.ts +1 -0
- package/dist/src/build/compileTailwind.d.ts +4 -3
- package/dist/src/build/tailwindCompiler.d.ts +2 -2
- package/dist/src/core/devBuild.d.ts +17 -0
- package/dist/src/dev/serverEntryWatcher.d.ts +4 -0
- package/dist/src/react/pageHandler.d.ts +0 -1
- package/dist/src/svelte/pageHandler.d.ts +0 -1
- package/dist/src/vue/pageHandler.d.ts +0 -1
- package/dist/svelte/index.js +2 -25
- package/dist/svelte/index.js.map +4 -5
- package/dist/svelte/server.js +1 -24
- package/dist/svelte/server.js.map +4 -5
- package/dist/types/globals.d.ts +19 -0
- package/dist/vue/index.js +2 -25
- package/dist/vue/index.js.map +4 -5
- package/dist/vue/server.js +1 -24
- package/dist/vue/server.js.map +4 -5
- package/package.json +1 -1
- package/dist/src/core/ssrCache.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-Xnx2Lz/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-Xnx2Lz/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-Xnx2Lz/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/angular/index.js
CHANGED
|
@@ -533,7 +533,7 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
|
|
|
533
533
|
value: propValue
|
|
534
534
|
})).filter((entry) => entry.token).map((entry) => ({ provide: entry.token, useValue: entry.value }));
|
|
535
535
|
return [...providers, ...propProviders];
|
|
536
|
-
},
|
|
536
|
+
}, isInjectionToken = (value) => {
|
|
537
537
|
if (!value || typeof value !== "object") {
|
|
538
538
|
return false;
|
|
539
539
|
}
|
|
@@ -2945,14 +2945,6 @@ var init_logger = __esm(() => {
|
|
|
2945
2945
|
};
|
|
2946
2946
|
});
|
|
2947
2947
|
|
|
2948
|
-
// src/core/ssrCache.ts
|
|
2949
|
-
var dirtyFrameworks, isSsrCacheDirty = (framework) => dirtyFrameworks.has(framework), markSsrCacheDirty = (framework) => {
|
|
2950
|
-
dirtyFrameworks.add(framework);
|
|
2951
|
-
};
|
|
2952
|
-
var init_ssrCache = __esm(() => {
|
|
2953
|
-
dirtyFrameworks = new Set;
|
|
2954
|
-
});
|
|
2955
|
-
|
|
2956
2948
|
// src/islands/sourceMetadata.ts
|
|
2957
2949
|
var islandFrameworks2, islandHydrationModes2, isIslandFramework2 = (value) => islandFrameworks2.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes2.some((hydrate) => hydrate === value), parseIslandTagAttributes = (attributeString) => {
|
|
2958
2950
|
const frameworkMatch = attributeString.match(/\bframework\s*=\s*["']([^"']+)["']/);
|
|
@@ -3504,6 +3496,7 @@ var init_generatedDir = () => {};
|
|
|
3504
3496
|
// src/build/compileAngular.ts
|
|
3505
3497
|
var exports_compileAngular = {};
|
|
3506
3498
|
__export(exports_compileAngular, {
|
|
3499
|
+
invalidateAngularJitCache: () => invalidateAngularJitCache,
|
|
3507
3500
|
compileAngularFiles: () => compileAngularFiles,
|
|
3508
3501
|
compileAngularFileJIT: () => compileAngularFileJIT,
|
|
3509
3502
|
compileAngularFile: () => compileAngularFile,
|
|
@@ -3511,6 +3504,7 @@ __export(exports_compileAngular, {
|
|
|
3511
3504
|
});
|
|
3512
3505
|
import { existsSync as existsSync4, readFileSync as readFileSync4, promises as fs } from "fs";
|
|
3513
3506
|
import { join as join7, basename as basename3, sep, dirname as dirname4, resolve as resolve6, relative as relative4 } from "path";
|
|
3507
|
+
var {Glob } = globalThis.Bun;
|
|
3514
3508
|
import ts from "typescript";
|
|
3515
3509
|
var traceAngularPhase = async (name, fn, metadata) => {
|
|
3516
3510
|
const tracePhase = globalThis.__absoluteBuildTracePhase;
|
|
@@ -3970,7 +3964,9 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3970
3964
|
await fs.writeFile(target, content, "utf-8");
|
|
3971
3965
|
})), { outputs: entries.length });
|
|
3972
3966
|
return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
|
|
3973
|
-
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache,
|
|
3967
|
+
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, invalidateAngularJitCache = (filePath) => {
|
|
3968
|
+
jitContentCache.delete(resolve6(filePath));
|
|
3969
|
+
}, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
3974
3970
|
const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
3975
3971
|
let match;
|
|
3976
3972
|
while ((match = re.exec(source)) !== null) {
|
|
@@ -4396,6 +4392,25 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4396
4392
|
const indexesDir = join7(compiledParent, "indexes");
|
|
4397
4393
|
await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
|
|
4398
4394
|
const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve6(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
|
|
4395
|
+
if (!hmr) {
|
|
4396
|
+
await traceAngularPhase("aot/copy-json-resources", async () => {
|
|
4397
|
+
const cwd = process.cwd();
|
|
4398
|
+
const angularSrcDir = resolve6(outRoot);
|
|
4399
|
+
if (!existsSync4(angularSrcDir))
|
|
4400
|
+
return;
|
|
4401
|
+
const jsonGlob = new Glob("**/*.json");
|
|
4402
|
+
for (const rel of jsonGlob.scanSync({
|
|
4403
|
+
absolute: false,
|
|
4404
|
+
cwd: angularSrcDir
|
|
4405
|
+
})) {
|
|
4406
|
+
const sourcePath = join7(angularSrcDir, rel);
|
|
4407
|
+
const cwdRel = relative4(cwd, sourcePath);
|
|
4408
|
+
const targetPath = join7(compiledRoot, cwdRel);
|
|
4409
|
+
await fs.mkdir(dirname4(targetPath), { recursive: true });
|
|
4410
|
+
await fs.copyFile(sourcePath, targetPath);
|
|
4411
|
+
}
|
|
4412
|
+
});
|
|
4413
|
+
}
|
|
4399
4414
|
const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
|
|
4400
4415
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
4401
4416
|
const resolvedEntry = resolve6(entry);
|
|
@@ -4469,7 +4484,6 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4469
4484
|
rewritten = `import '@angular/compiler';
|
|
4470
4485
|
${rewritten}`;
|
|
4471
4486
|
}
|
|
4472
|
-
rewritten = rewritten.replace(new RegExp(`templateUrl:\\s*['"]\\.\\/${fileBase}\\.html['"]`), `templateUrl: '../../pages/${fileBase}.html'`);
|
|
4473
4487
|
if (detectedClassName && !rewritten.includes("export default")) {
|
|
4474
4488
|
rewritten += `
|
|
4475
4489
|
export default ${componentClassName};
|
|
@@ -14632,7 +14646,6 @@ var captureStreamingSlotWarningCallsite = () => {
|
|
|
14632
14646
|
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({ handlerCallsite: metadata?.handlerCallsite, hasWarned: false }, task);
|
|
14633
14647
|
|
|
14634
14648
|
// src/angular/pageHandler.ts
|
|
14635
|
-
init_ssrCache();
|
|
14636
14649
|
init_ssrRender();
|
|
14637
14650
|
var lastSelector = "angular-page";
|
|
14638
14651
|
var isRecord5 = (value) => typeof value === "object" && value !== null;
|
|
@@ -14687,6 +14700,18 @@ var ensureAngularSsrNodeModules = async (outDir) => {
|
|
|
14687
14700
|
};
|
|
14688
14701
|
var resolveRuntimeAngularModulePath = async (pagePath) => {
|
|
14689
14702
|
if (!pagePath.endsWith(".ts")) {
|
|
14703
|
+
if (true) {
|
|
14704
|
+
try {
|
|
14705
|
+
const { stat } = await import("fs/promises");
|
|
14706
|
+
const stats = await stat(pagePath);
|
|
14707
|
+
return {
|
|
14708
|
+
path: pagePath,
|
|
14709
|
+
cacheBuster: stats.mtimeMs.toString(BASE_36_RADIX)
|
|
14710
|
+
};
|
|
14711
|
+
} catch {
|
|
14712
|
+
return { path: pagePath, cacheBuster: undefined };
|
|
14713
|
+
}
|
|
14714
|
+
}
|
|
14690
14715
|
return {
|
|
14691
14716
|
path: pagePath,
|
|
14692
14717
|
cacheBuster: undefined
|
|
@@ -14751,14 +14776,6 @@ var handleAngularPageRequest = async (input) => {
|
|
|
14751
14776
|
headTag: resolvedHeadTag,
|
|
14752
14777
|
props: maybeProps
|
|
14753
14778
|
});
|
|
14754
|
-
if (isSsrCacheDirty("angular")) {
|
|
14755
|
-
clearSelectorCache();
|
|
14756
|
-
const script = resolvedIndexPath ? `<script>import(${JSON.stringify(resolvedIndexPath)});</script>` : "";
|
|
14757
|
-
const html = `<!DOCTYPE html><html>${resolvedHeadTag}<body><${lastSelector}></${lastSelector}>${script}</body></html>`;
|
|
14758
|
-
return new Response(html, {
|
|
14759
|
-
headers: { "Content-Type": "text/html" }
|
|
14760
|
-
});
|
|
14761
|
-
}
|
|
14762
14779
|
try {
|
|
14763
14780
|
assertNoHandlerProviders(input);
|
|
14764
14781
|
const handlerCallsite = options?.collectStreamingSlots === true ? undefined : getCurrentRouteRegistrationCallsite() ?? captureStreamingSlotWarningCallsite();
|
|
@@ -15218,5 +15235,5 @@ export {
|
|
|
15218
15235
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
15219
15236
|
};
|
|
15220
15237
|
|
|
15221
|
-
//# debugId=
|
|
15238
|
+
//# debugId=E393049A68F0022464756E2164756E21
|
|
15222
15239
|
//# sourceMappingURL=index.js.map
|