@absolutejs/absolute 0.20.0-beta.172 → 0.20.0-beta.174
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/CHANGELOG.md +39 -0
- package/README.md +3 -2
- package/changelog.json +68 -0
- package/dist/angular/browser.js +12 -12
- package/dist/angular/browser.js.map +6 -7
- package/dist/angular/components/core/streamingSlotRegistrar.js +2 -6
- package/dist/angular/components/core/streamingSlotRegistry.js +3 -7
- package/dist/angular/components/defer-slot.component.js +12 -7
- package/dist/angular/components/stream-slot.component.js +3 -1
- package/dist/angular/index.js +86 -39
- package/dist/angular/index.js.map +11 -10
- package/dist/angular/server.js +85 -38
- package/dist/angular/server.js.map +10 -9
- package/dist/build/buildWorker.js +135 -57
- package/dist/build.js +1817 -1623
- package/dist/build.js.map +38 -36
- package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
- package/dist/cli/{compile-ndc36zna.js → compile-n6fs2vmx.js} +16 -14
- package/dist/cli/config/server.js +128 -77
- package/dist/cli/{dev-x49583aj.js → dev-6h1f0mzq.js} +1 -1
- package/dist/cli/{doctor-repprx92.js → doctor-m36tmx4d.js} +70 -15
- package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
- package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
- package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
- package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
- package/dist/cli/index-4j1twret.js +22 -0
- package/dist/cli/{index-25e7k849.js → index-bhyd3ejc.js} +4 -4
- package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
- package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
- package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
- package/dist/cli/{index-z794p5qg.js → index-mqevg32w.js} +22 -19
- package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
- package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
- package/dist/cli/index.js +12 -12
- package/dist/cli/{islands-p4vgx7a2.js → islands-vk05sj6v.js} +5 -4
- package/dist/cli/{mobile-nqdkk3gd.js → mobile-62b6j3j7.js} +5 -4
- package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
- package/dist/cli/{start-t3cq57wn.js → start-jh6kyp92.js} +5 -4
- package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
- package/dist/core/streamingSlotRegistrar.js +2 -5
- package/dist/core/streamingSlotRegistrar.js.map +4 -5
- package/dist/core/streamingSlotRegistry.js +2 -5
- package/dist/core/streamingSlotRegistry.js.map +4 -5
- package/dist/dev/importCostReport.js +45 -26
- package/dist/dev/serverBootstrap.js +2 -1
- package/dist/index.js +1748 -1550
- package/dist/index.js.map +40 -38
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/mobile/browser.js +2 -2
- package/dist/mobile/browser.js.map +3 -3
- package/dist/mobile/index.js +116 -96
- package/dist/mobile/index.js.map +7 -6
- package/dist/mobile/remoteMacAgentEntry.js +205 -651
- package/dist/react/components/index.js +2 -5
- package/dist/react/components/index.js.map +5 -6
- package/dist/react/index.js +45 -16
- package/dist/react/index.js.map +8 -8
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +45 -16
- package/dist/react/server.js.map +8 -8
- package/dist/src/angular/components/defer-slot.component.d.ts +1 -0
- package/dist/src/build/missingReactRouter.d.ts +8 -0
- package/dist/src/build/vueModuleOutputPath.d.ts +10 -6
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
- package/dist/src/cli/scripts/doctor.d.ts +10 -0
- package/dist/src/core/streamingSlotWarningScope.d.ts +3 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
- package/dist/src/dev/hot/reload.d.ts +5 -0
- package/dist/src/dev/hot/runtime.d.ts +2 -0
- package/dist/src/dev/srcPath.d.ts +2 -1
- package/dist/src/react/pageHandler.d.ts +5 -0
- package/dist/src/react/router/Link.d.ts +6 -1
- package/dist/src/react/serverComponents/pageHandler.d.ts +2 -0
- package/dist/src/utils/lazyTypescript.d.ts +3 -0
- package/dist/src/utils/portInUse.d.ts +16 -0
- package/dist/svelte/index.js +39 -12
- package/dist/svelte/index.js.map +6 -6
- package/dist/svelte/server.js +39 -12
- package/dist/svelte/server.js.map +6 -6
- package/dist/vue/components/index.js +2 -5
- package/dist/vue/components/index.js.map +4 -5
- package/dist/vue/index.js +39 -12
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +39 -12
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// .angular-partial-tmp-
|
|
3
|
-
var ENV_VAR = "NODE_ENV";
|
|
4
|
-
var isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
5
|
-
|
|
6
|
-
// .angular-partial-tmp-a5Gf1s/src/core/streamingSlotRegistrar.ts
|
|
2
|
+
// .angular-partial-tmp-dYHPyC/src/core/streamingSlotRegistrar.ts
|
|
7
3
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
8
4
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
9
5
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -44,7 +40,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
44
40
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
45
41
|
};
|
|
46
42
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
47
|
-
if (
|
|
43
|
+
if (isStreamingSlotCollectionActive()) {
|
|
48
44
|
return;
|
|
49
45
|
}
|
|
50
46
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// .angular-partial-tmp-
|
|
3
|
-
var ENV_VAR = "NODE_ENV";
|
|
4
|
-
var isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
5
|
-
|
|
6
|
-
// .angular-partial-tmp-a5Gf1s/src/core/streamingSlotRegistrar.ts
|
|
2
|
+
// .angular-partial-tmp-dYHPyC/src/core/streamingSlotRegistrar.ts
|
|
7
3
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
8
4
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
9
5
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -44,13 +40,13 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
44
40
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
45
41
|
};
|
|
46
42
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
47
|
-
if (
|
|
43
|
+
if (isStreamingSlotCollectionActive()) {
|
|
48
44
|
return;
|
|
49
45
|
}
|
|
50
46
|
getWarningController()?.maybeWarn(primitiveName);
|
|
51
47
|
};
|
|
52
48
|
|
|
53
|
-
// .angular-partial-tmp-
|
|
49
|
+
// .angular-partial-tmp-dYHPyC/src/core/streamingSlotRegistry.ts
|
|
54
50
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
55
51
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
56
52
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Input, inject, signal } from '@angular/core';
|
|
2
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Input, inject, PLATFORM_ID, signal } from '@angular/core';
|
|
2
|
+
import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
|
|
3
3
|
import { isStreamingSlotCollectionActive, registerStreamingSlot, warnMissingStreamingSlotCollector } from './core/streamingSlotRegistrar.js';
|
|
4
4
|
import { isAngularDeferSlotPayload } from './defer-slot-payload.js';
|
|
5
5
|
import { DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective } from './defer-slot-templates.directive.js';
|
|
@@ -7,6 +7,10 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export class DeferSlotComponent {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.cdr = inject(ChangeDetectorRef);
|
|
10
|
+
// Streaming slots exist only in the server render. In the browser the
|
|
11
|
+
// slot waits for the streamed payload instead, and must never touch the
|
|
12
|
+
// server-side registrar: its dev warning path reads NODE_ENV.
|
|
13
|
+
this.isServer = isPlatformServer(inject(PLATFORM_ID));
|
|
10
14
|
this.runtimeReady = signal(false, ...(ngDevMode ? [{ debugName: "runtimeReady" }] : /* istanbul ignore next */ []));
|
|
11
15
|
this.serverSlotRegistered = false;
|
|
12
16
|
this.id = '';
|
|
@@ -37,7 +41,8 @@ export class DeferSlotComponent {
|
|
|
37
41
|
const { id } = this;
|
|
38
42
|
if (!id)
|
|
39
43
|
return;
|
|
40
|
-
if (this.
|
|
44
|
+
if (this.isServer) {
|
|
45
|
+
this.registerServerSlot();
|
|
41
46
|
return;
|
|
42
47
|
}
|
|
43
48
|
const absoluteWindow = window;
|
|
@@ -51,10 +56,10 @@ export class DeferSlotComponent {
|
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
ngAfterViewInit() {
|
|
54
|
-
if (this.
|
|
55
|
-
|
|
56
|
-
if (typeof window === 'undefined')
|
|
59
|
+
if (this.isServer) {
|
|
60
|
+
this.registerServerSlot();
|
|
57
61
|
return;
|
|
62
|
+
}
|
|
58
63
|
requestAnimationFrame(() => {
|
|
59
64
|
this.runtimeReady.set(true);
|
|
60
65
|
this.cdr.markForCheck();
|
|
@@ -63,7 +68,7 @@ export class DeferSlotComponent {
|
|
|
63
68
|
});
|
|
64
69
|
}
|
|
65
70
|
ngOnDestroy() {
|
|
66
|
-
if (
|
|
71
|
+
if (this.isServer)
|
|
67
72
|
return;
|
|
68
73
|
const { id } = this;
|
|
69
74
|
if (!id)
|
|
@@ -34,8 +34,10 @@ export class StreamSlotComponent {
|
|
|
34
34
|
});
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
warnMissingStreamingSlotCollector('StreamSlot');
|
|
38
37
|
if (typeof window === 'undefined') {
|
|
38
|
+
// The collector warning is for server renders only; in the
|
|
39
|
+
// browser there is never a collector and nothing to warn about.
|
|
40
|
+
warnMissingStreamingSlotCollector('StreamSlot');
|
|
39
41
|
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(this.fallbackHtml));
|
|
40
42
|
return;
|
|
41
43
|
}
|
package/dist/angular/index.js
CHANGED
|
@@ -136,7 +136,7 @@ var init_cspNonceRef = __esm(() => {
|
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
// src/utils/runtimeMode.ts
|
|
139
|
-
var ENV_VAR = "NODE_ENV",
|
|
139
|
+
var ENV_VAR = "NODE_ENV", readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR], getNodeEnv = () => readEnv(), isDevelopmentRuntime = () => readEnv() === "development", isProductionRuntime = () => readEnv() === "production";
|
|
140
140
|
|
|
141
141
|
// src/utils/getDurationString.ts
|
|
142
142
|
var getDurationString = (duration) => {
|
|
@@ -338,13 +338,25 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
338
338
|
return;
|
|
339
339
|
warnedMissingBootstrap = true;
|
|
340
340
|
logWarn("A page contains islands, but the build manifest has no islands bootstrap, so they will render without hydrating. Set `islands.registry` in absolute.config.ts (a default bootstrap is generated from it) or point `islands.bootstrap` at a file that calls startIslands().");
|
|
341
|
-
},
|
|
341
|
+
}, MANIFEST_BUILD_DIR_KEY, getManifestBuildDir = () => {
|
|
342
|
+
const value = Reflect.get(globalThis, MANIFEST_BUILD_DIR_KEY);
|
|
343
|
+
return typeof value === "string" ? value : undefined;
|
|
344
|
+
}, WINDOWS_ABSOLUTE_PATH, withTrailingSlash = (path) => path.endsWith("/") ? path : `${path}/`, currentWorkingRoot = () => {
|
|
345
|
+
try {
|
|
346
|
+
return withTrailingSlash(process.cwd().replaceAll("\\", "/"));
|
|
347
|
+
} catch {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
}, isServerFilePath = (value) => {
|
|
342
351
|
if (WINDOWS_ABSOLUTE_PATH.test(value))
|
|
343
352
|
return true;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
353
|
+
const buildDir = getManifestBuildDir();
|
|
354
|
+
if (buildDir && value.startsWith(withTrailingSlash(buildDir)))
|
|
355
|
+
return true;
|
|
356
|
+
const root = currentWorkingRoot();
|
|
357
|
+
if (root && root !== "/" && value.startsWith(root))
|
|
358
|
+
return true;
|
|
359
|
+
return false;
|
|
348
360
|
}, toBrowserManifest = (manifest) => {
|
|
349
361
|
const browserManifest = {};
|
|
350
362
|
for (const [key, value] of Object.entries(manifest)) {
|
|
@@ -556,12 +568,13 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
556
568
|
return pipeStreamWithIslandMarkerDetection(stream, markup, () => warnIfBootstrapMissing(manifest));
|
|
557
569
|
}, setCurrentIslandManifest = (manifest, buildDir) => {
|
|
558
570
|
globalThis.__absoluteManifest = manifest;
|
|
559
|
-
|
|
571
|
+
Reflect.set(globalThis, MANIFEST_BUILD_DIR_KEY, buildDir?.replaceAll("\\", "/"));
|
|
560
572
|
};
|
|
561
573
|
var init_islandPageContext = __esm(() => {
|
|
562
574
|
init_escapeScriptContent();
|
|
563
575
|
init_cspNonceRef();
|
|
564
576
|
init_logger();
|
|
577
|
+
MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
|
|
565
578
|
WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
|
|
566
579
|
});
|
|
567
580
|
|
|
@@ -4943,6 +4956,26 @@ var init_partialPrerender = __esm(() => {
|
|
|
4943
4956
|
SINK_STORAGE_KEY = Symbol.for("absolutejs.partialPrerenderHolesSink");
|
|
4944
4957
|
});
|
|
4945
4958
|
|
|
4959
|
+
// src/utils/lazyTypescript.ts
|
|
4960
|
+
import { createRequire as createRequire2 } from "module";
|
|
4961
|
+
var loaded, loadTypescript = () => {
|
|
4962
|
+
if (loaded)
|
|
4963
|
+
return loaded;
|
|
4964
|
+
const requireFromHere = createRequire2(import.meta.url);
|
|
4965
|
+
const typescript = requireFromHere("typescript");
|
|
4966
|
+
loaded = typescript;
|
|
4967
|
+
return typescript;
|
|
4968
|
+
}, createLazyTypescript = () => {
|
|
4969
|
+
const target = Object.create(null);
|
|
4970
|
+
return new Proxy(target, {
|
|
4971
|
+
get: (_target, key) => Reflect.get(loadTypescript(), key),
|
|
4972
|
+
has: (_target, key) => Reflect.has(loadTypescript(), key)
|
|
4973
|
+
});
|
|
4974
|
+
}, lazyTypescript;
|
|
4975
|
+
var init_lazyTypescript = __esm(() => {
|
|
4976
|
+
lazyTypescript = createLazyTypescript();
|
|
4977
|
+
});
|
|
4978
|
+
|
|
4946
4979
|
// src/islands/sourceMetadata.ts
|
|
4947
4980
|
var islandFrameworks2, islandHydrationModes2, isIslandFramework2 = (value) => islandFrameworks2.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes2.some((hydrate) => hydrate === value), parseIslandTagAttributes = (attributeString) => {
|
|
4948
4981
|
const frameworkMatch = attributeString.match(/\bframework\s*=\s*["']([^"']+)["']/);
|
|
@@ -5492,22 +5525,22 @@ var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", g
|
|
|
5492
5525
|
var init_generatedDir = () => {};
|
|
5493
5526
|
|
|
5494
5527
|
// src/build/downlevelAsyncForZone.ts
|
|
5495
|
-
import ts from "typescript";
|
|
5496
5528
|
var ASYNC_KEYWORD, downlevelAsyncForZone = (code, fileName) => {
|
|
5497
5529
|
if (!isAngularZoneMode() || !ASYNC_KEYWORD.test(code))
|
|
5498
5530
|
return code;
|
|
5499
|
-
return
|
|
5531
|
+
return lazyTypescript.transpileModule(code, {
|
|
5500
5532
|
compilerOptions: {
|
|
5501
5533
|
importHelpers: false,
|
|
5502
|
-
module:
|
|
5534
|
+
module: lazyTypescript.ModuleKind.ESNext,
|
|
5503
5535
|
sourceMap: false,
|
|
5504
|
-
target:
|
|
5536
|
+
target: lazyTypescript.ScriptTarget.ES2016,
|
|
5505
5537
|
useDefineForClassFields: false
|
|
5506
5538
|
},
|
|
5507
5539
|
fileName: fileName.replace(/\.[cm]?[tj]sx?$/, ".js")
|
|
5508
5540
|
}).outputText;
|
|
5509
5541
|
};
|
|
5510
5542
|
var init_downlevelAsyncForZone = __esm(() => {
|
|
5543
|
+
init_lazyTypescript();
|
|
5511
5544
|
ASYNC_KEYWORD = /\basync\b/;
|
|
5512
5545
|
});
|
|
5513
5546
|
|
|
@@ -5521,7 +5554,6 @@ __export(exports_compileAngular, {
|
|
|
5521
5554
|
import { existsSync as existsSync5, readFileSync as readFileSync6, promises as fs } from "fs";
|
|
5522
5555
|
import { join as join9, basename as basename4, sep, dirname as dirname5, resolve as resolve6, relative as relative5 } from "path";
|
|
5523
5556
|
var {Glob } = globalThis.Bun;
|
|
5524
|
-
import ts2 from "typescript";
|
|
5525
5557
|
var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) => {
|
|
5526
5558
|
const temporaryPath = `${path}.tmp.${process.pid}.${atomicWriteSequence++}`;
|
|
5527
5559
|
try {
|
|
@@ -5536,7 +5568,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5536
5568
|
}, readTsconfigPathAliases = () => {
|
|
5537
5569
|
try {
|
|
5538
5570
|
const configPath = resolve6(process.cwd(), "tsconfig.json");
|
|
5539
|
-
const config =
|
|
5571
|
+
const config = lazyTypescript.readConfigFile(configPath, lazyTypescript.sys.readFile).config;
|
|
5540
5572
|
const compilerOptions = config?.compilerOptions ?? {};
|
|
5541
5573
|
const baseUrl = resolve6(process.cwd(), compilerOptions.baseUrl ?? ".");
|
|
5542
5574
|
const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
|
|
@@ -5665,7 +5697,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5665
5697
|
return resolve6(import.meta.dir, "./dev/client");
|
|
5666
5698
|
}, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
|
|
5667
5699
|
try {
|
|
5668
|
-
return
|
|
5700
|
+
return lazyTypescript.flattenDiagnosticMessageText(diagnostic.messageText, `
|
|
5669
5701
|
`);
|
|
5670
5702
|
} catch {
|
|
5671
5703
|
return String(diagnostic.messageText || "Unknown error");
|
|
@@ -5673,7 +5705,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5673
5705
|
}, throwOnCompilationErrors = (diagnostics) => {
|
|
5674
5706
|
if (!diagnostics?.length)
|
|
5675
5707
|
return;
|
|
5676
|
-
const errors = diagnostics.filter((diag) => diag.category ===
|
|
5708
|
+
const errors = diagnostics.filter((diag) => diag.category === lazyTypescript.DiagnosticCategory.Error);
|
|
5677
5709
|
if (!errors.length)
|
|
5678
5710
|
return;
|
|
5679
5711
|
const fullMessage = errors.map(formatDiagnosticMessage).join(`
|
|
@@ -5715,22 +5747,22 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5715
5747
|
}
|
|
5716
5748
|
return `${path}.js${query}`;
|
|
5717
5749
|
}, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
|
|
5718
|
-
const sourceFile =
|
|
5750
|
+
const sourceFile = lazyTypescript.createSourceFile(fileName, source, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.TS);
|
|
5719
5751
|
const specifiers = [];
|
|
5720
5752
|
const addSpecifier = (node) => {
|
|
5721
|
-
if (!node || !
|
|
5753
|
+
if (!node || !lazyTypescript.isStringLiteralLike(node))
|
|
5722
5754
|
return;
|
|
5723
5755
|
const specifier = node.text;
|
|
5724
5756
|
if (isRelativeModuleSpecifier(specifier))
|
|
5725
5757
|
specifiers.push(specifier);
|
|
5726
5758
|
};
|
|
5727
5759
|
const visit = (node) => {
|
|
5728
|
-
if (
|
|
5760
|
+
if (lazyTypescript.isImportDeclaration(node) || lazyTypescript.isExportDeclaration(node)) {
|
|
5729
5761
|
addSpecifier(node.moduleSpecifier);
|
|
5730
|
-
} else if (
|
|
5762
|
+
} else if (lazyTypescript.isCallExpression(node) && node.expression.kind === lazyTypescript.SyntaxKind.ImportKeyword) {
|
|
5731
5763
|
addSpecifier(node.arguments[0]);
|
|
5732
5764
|
}
|
|
5733
|
-
|
|
5765
|
+
lazyTypescript.forEachChild(node, visit);
|
|
5734
5766
|
};
|
|
5735
5767
|
visit(sourceFile);
|
|
5736
5768
|
return specifiers;
|
|
@@ -5878,25 +5910,25 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5878
5910
|
emitDecoratorMetadata: true,
|
|
5879
5911
|
esModuleInterop: true,
|
|
5880
5912
|
experimentalDecorators: true,
|
|
5881
|
-
module:
|
|
5882
|
-
moduleResolution:
|
|
5883
|
-
newLine:
|
|
5913
|
+
module: lazyTypescript.ModuleKind.ESNext,
|
|
5914
|
+
moduleResolution: lazyTypescript.ModuleResolutionKind.Bundler,
|
|
5915
|
+
newLine: lazyTypescript.NewLineKind.LineFeed,
|
|
5884
5916
|
noLib: false,
|
|
5885
5917
|
outDir,
|
|
5886
5918
|
skipLibCheck: true,
|
|
5887
|
-
target:
|
|
5919
|
+
target: lazyTypescript.ScriptTarget.ES2022,
|
|
5888
5920
|
...config.options
|
|
5889
5921
|
};
|
|
5890
|
-
options.target =
|
|
5922
|
+
options.target = lazyTypescript.ScriptTarget.ES2022;
|
|
5891
5923
|
options.experimentalDecorators = true;
|
|
5892
5924
|
options.emitDecoratorMetadata = true;
|
|
5893
|
-
options.newLine =
|
|
5925
|
+
options.newLine = lazyTypescript.NewLineKind.LineFeed;
|
|
5894
5926
|
options.outDir = outDir;
|
|
5895
5927
|
options.noEmit = false;
|
|
5896
5928
|
options.incremental = false;
|
|
5897
5929
|
options.tsBuildInfoFile = undefined;
|
|
5898
5930
|
options.rootDir = process.cwd();
|
|
5899
|
-
const host = await traceAngularPhase("aot/create-compiler-host", () =>
|
|
5931
|
+
const host = await traceAngularPhase("aot/create-compiler-host", () => lazyTypescript.createCompilerHost(options));
|
|
5900
5932
|
const originalGetDefaultLibLocation = host.getDefaultLibLocation;
|
|
5901
5933
|
host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
|
|
5902
5934
|
const originalGetDefaultLibFileName = host.getDefaultLibFileName;
|
|
@@ -5942,7 +5974,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
5942
5974
|
host.getSourceFile = (fileName, languageVersion, onError) => {
|
|
5943
5975
|
const source = transformedSources.get(resolve6(fileName));
|
|
5944
5976
|
if (source) {
|
|
5945
|
-
return
|
|
5977
|
+
return lazyTypescript.createSourceFile(fileName, source, languageVersion, true);
|
|
5946
5978
|
}
|
|
5947
5979
|
return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
|
|
5948
5980
|
};
|
|
@@ -6471,8 +6503,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
6471
6503
|
}
|
|
6472
6504
|
}
|
|
6473
6505
|
return allOutputs;
|
|
6474
|
-
}, ROUTER_OUTLET_PATTERN, COMPONENT_MARKER_PATTERN, isExportedClass = (statement) =>
|
|
6475
|
-
if (!
|
|
6506
|
+
}, ROUTER_OUTLET_PATTERN, COMPONENT_MARKER_PATTERN, isExportedClass = (statement) => lazyTypescript.isClassDeclaration(statement) && statement.name !== undefined && (lazyTypescript.getModifiers(statement) ?? []).some((modifier) => modifier.kind === lazyTypescript.SyntaxKind.ExportKeyword), statementReferencesClass = (statement, className, sourceFile) => {
|
|
6507
|
+
if (!lazyTypescript.isExpressionStatement(statement))
|
|
6476
6508
|
return false;
|
|
6477
6509
|
const text = statement.getText(sourceFile);
|
|
6478
6510
|
return new RegExp(`^\\s*${className}\\s*=`).test(text) || new RegExp(`\u0275setClassMetadata\\(\\s*${className}\\b`).test(text);
|
|
@@ -6480,16 +6512,16 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
6480
6512
|
const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
|
|
6481
6513
|
if (defaultMatch)
|
|
6482
6514
|
return defaultMatch[1] ?? null;
|
|
6483
|
-
const sourceFile =
|
|
6515
|
+
const sourceFile = lazyTypescript.createSourceFile("page.js", source, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.JS);
|
|
6484
6516
|
const exportedNames = new Set;
|
|
6485
6517
|
for (const statement of sourceFile.statements) {
|
|
6486
|
-
if (!
|
|
6518
|
+
if (!lazyTypescript.isExportDeclaration(statement) || statement.moduleSpecifier || !statement.exportClause || !lazyTypescript.isNamedExports(statement.exportClause))
|
|
6487
6519
|
continue;
|
|
6488
6520
|
for (const element of statement.exportClause.elements) {
|
|
6489
6521
|
exportedNames.add((element.propertyName ?? element.name).text);
|
|
6490
6522
|
}
|
|
6491
6523
|
}
|
|
6492
|
-
const candidates = sourceFile.statements.filter(
|
|
6524
|
+
const candidates = sourceFile.statements.filter(lazyTypescript.isClassDeclaration).filter((statement) => isExportedClass(statement) || exportedNames.has(statement.name?.text ?? "")).map((statement) => {
|
|
6493
6525
|
const className = statement.name?.text ?? "";
|
|
6494
6526
|
const related = sourceFile.statements.filter((other) => statementReferencesClass(other, className, sourceFile)).map((other) => other.getText(sourceFile));
|
|
6495
6527
|
const text = [statement.getText(sourceFile), ...related].join(`
|
|
@@ -6916,6 +6948,7 @@ window.__ABSOLUTE_PAGE_DISPOSE__ = async function() {
|
|
|
6916
6948
|
};
|
|
6917
6949
|
};
|
|
6918
6950
|
var init_compileAngular = __esm(() => {
|
|
6951
|
+
init_lazyTypescript();
|
|
6919
6952
|
init_constants();
|
|
6920
6953
|
init_sourceMetadata();
|
|
6921
6954
|
init_lowerDeferSyntax();
|
|
@@ -16238,7 +16271,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
16238
16271
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
16239
16272
|
};
|
|
16240
16273
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
16241
|
-
if (
|
|
16274
|
+
if (isStreamingSlotCollectionActive()) {
|
|
16242
16275
|
return;
|
|
16243
16276
|
}
|
|
16244
16277
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -16425,7 +16458,11 @@ var extractCallsiteFromStack = (stack) => {
|
|
|
16425
16458
|
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
16426
16459
|
return location ? normalizeCallsitePath2(location) : undefined;
|
|
16427
16460
|
};
|
|
16428
|
-
var buildMissingCollectorWarning = (primitiveName,
|
|
16461
|
+
var buildMissingCollectorWarning = (primitiveName, { explicitlyDisabled, handlerCallsite }) => {
|
|
16462
|
+
const fix = explicitlyDisabled ? "This page handler sets { collectStreamingSlots: false }, so the slot stays on its fallback and never streams. Remove the option (or set it to true) to stream this route." : "The slot stays on its fallback and never streams. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.";
|
|
16463
|
+
return `${primitiveName} rendered during SSR without streaming slot collection enabled. ${fix}${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
|
|
16464
|
+
};
|
|
16465
|
+
var productionWarnings = new Set;
|
|
16429
16466
|
setStreamingSlotWarningController({
|
|
16430
16467
|
maybeWarn: (primitiveName) => {
|
|
16431
16468
|
const store = getWarningStorage()?.getStore();
|
|
@@ -16433,7 +16470,13 @@ setStreamingSlotWarningController({
|
|
|
16433
16470
|
return;
|
|
16434
16471
|
}
|
|
16435
16472
|
store.hasWarned = true;
|
|
16436
|
-
|
|
16473
|
+
const message = buildMissingCollectorWarning(primitiveName, store);
|
|
16474
|
+
if (isProductionRuntime()) {
|
|
16475
|
+
if (productionWarnings.has(message))
|
|
16476
|
+
return;
|
|
16477
|
+
productionWarnings.add(message);
|
|
16478
|
+
}
|
|
16479
|
+
logWarn(message);
|
|
16437
16480
|
}
|
|
16438
16481
|
});
|
|
16439
16482
|
var captureStreamingSlotWarningCallsite = () => {
|
|
@@ -16446,7 +16489,11 @@ var captureStreamingSlotWarningCallsite = () => {
|
|
|
16446
16489
|
}
|
|
16447
16490
|
return extractCallsiteFromStack(stack);
|
|
16448
16491
|
};
|
|
16449
|
-
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
16492
|
+
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
16493
|
+
explicitlyDisabled: metadata?.explicitlyDisabled === true,
|
|
16494
|
+
handlerCallsite: metadata?.handlerCallsite,
|
|
16495
|
+
hasWarned: false
|
|
16496
|
+
}, task);
|
|
16450
16497
|
|
|
16451
16498
|
// src/angular/pageHandler.ts
|
|
16452
16499
|
init_ssrRender();
|
|
@@ -17153,8 +17200,8 @@ class StreamSlotComponent {
|
|
|
17153
17200
|
});
|
|
17154
17201
|
return;
|
|
17155
17202
|
}
|
|
17156
|
-
warnMissingStreamingSlotCollector("StreamSlot");
|
|
17157
17203
|
if (typeof window === "undefined") {
|
|
17204
|
+
warnMissingStreamingSlotCollector("StreamSlot");
|
|
17158
17205
|
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(this.fallbackHtml));
|
|
17159
17206
|
return;
|
|
17160
17207
|
}
|
|
@@ -17241,5 +17288,5 @@ export {
|
|
|
17241
17288
|
withPendingTask
|
|
17242
17289
|
};
|
|
17243
17290
|
|
|
17244
|
-
//# debugId=
|
|
17291
|
+
//# debugId=0E4E0A705DAAEB6064756E2164756E21
|
|
17245
17292
|
//# sourceMappingURL=index.js.map
|