@absolutejs/absolute 0.19.0-beta.845 → 0.19.0-beta.846
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 +29 -21
- package/dist/angular/index.js.map +10 -9
- package/dist/angular/server.js +29 -21
- package/dist/angular/server.js.map +10 -9
- package/dist/build.js +939 -496
- package/dist/build.js.map +15 -12
- package/dist/cli/index.js +547 -286
- package/dist/client/index.js +16 -9
- package/dist/client/index.js.map +6 -5
- package/dist/dev/client/handlers/angular.ts +309 -19
- package/dist/dev/client/handlers/angularRuntime.ts +468 -0
- package/dist/dev/client/hmrToast.ts +150 -0
- package/dist/index.js +986 -543
- package/dist/index.js.map +16 -13
- package/dist/islands/index.js +16 -9
- package/dist/islands/index.js.map +6 -5
- package/dist/react/index.js +16 -9
- package/dist/react/index.js.map +6 -5
- package/dist/src/build/rewriteImports.d.ts +6 -14
- package/dist/src/build/rewriteImportsPlugin.d.ts +48 -0
- package/dist/src/dev/angular/editTypeDetection.d.ts +8 -0
- package/dist/src/dev/pathUtils.d.ts +3 -0
- package/dist/src/utils/buildDirectoryLock.d.ts +26 -3
- package/dist/src/utils/loadConfig.d.ts +5 -0
- package/dist/src/utils/resolveDevPort.d.ts +21 -0
- package/dist/src/utils/runtimeMode.d.ts +3 -0
- package/dist/svelte/index.js +16 -9
- package/dist/svelte/index.js.map +6 -5
- package/dist/types/build.d.ts +15 -0
- package/dist/types/globals.d.ts +12 -0
- package/dist/vue/index.js +16 -9
- package/dist/vue/index.js.map +6 -5
- package/package.json +1 -1
package/dist/angular/server.js
CHANGED
|
@@ -274,6 +274,9 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
274
274
|
};
|
|
275
275
|
var init_resolveAngularPackage = () => {};
|
|
276
276
|
|
|
277
|
+
// src/utils/runtimeMode.ts
|
|
278
|
+
var ENV_VAR = "NODE_ENV", isProductionRuntime = () => process.env[ENV_VAR] === "production", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development";
|
|
279
|
+
|
|
277
280
|
// src/angular/angularPatch.ts
|
|
278
281
|
var exports_angularPatch = {};
|
|
279
282
|
__export(exports_angularPatch, {
|
|
@@ -356,7 +359,8 @@ var ensureHead = (doc) => {
|
|
|
356
359
|
}
|
|
357
360
|
layoutPatchApplied = true;
|
|
358
361
|
}, applyPatches = async () => {
|
|
359
|
-
const
|
|
362
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-server") : "@angular/platform-server";
|
|
363
|
+
const { \u{275}DominoAdapter } = await import(spec);
|
|
360
364
|
if (!\u{275}DominoAdapter?.prototype) {
|
|
361
365
|
console.warn("[Angular Patch] \u0275DominoAdapter not found, skipping patches");
|
|
362
366
|
return false;
|
|
@@ -423,18 +427,21 @@ var initDominoAdapter = (platformServer) => {
|
|
|
423
427
|
console.error("Failed to initialize DominoAdapter:", err);
|
|
424
428
|
}
|
|
425
429
|
}, loadAngularDeps = async () => {
|
|
426
|
-
if (
|
|
427
|
-
await import(
|
|
430
|
+
if (!isProductionRuntime()) {
|
|
431
|
+
await import("@angular/compiler");
|
|
428
432
|
}
|
|
429
433
|
const { applyPatches: applyPatches2 } = await Promise.resolve().then(() => (init_angularPatch(), exports_angularPatch));
|
|
430
434
|
await applyPatches2();
|
|
435
|
+
const useBareSpecifiers = !isProductionRuntime();
|
|
431
436
|
const [platformBrowser, platformServer, common, core] = await Promise.all([
|
|
432
|
-
import(resolveAngularRuntimePath("@angular/platform-browser")),
|
|
433
|
-
import(resolveAngularRuntimePath("@angular/platform-server")),
|
|
434
|
-
import(resolveAngularRuntimePath("@angular/common")),
|
|
435
|
-
import(resolveAngularRuntimePath("@angular/core"))
|
|
437
|
+
useBareSpecifiers ? import("@angular/platform-browser") : import(resolveAngularRuntimePath("@angular/platform-browser")),
|
|
438
|
+
useBareSpecifiers ? import("@angular/platform-server") : import(resolveAngularRuntimePath("@angular/platform-server")),
|
|
439
|
+
useBareSpecifiers ? import("@angular/common") : import(resolveAngularRuntimePath("@angular/common")),
|
|
440
|
+
useBareSpecifiers ? import("@angular/core") : import(resolveAngularRuntimePath("@angular/core"))
|
|
436
441
|
]);
|
|
437
|
-
if (
|
|
442
|
+
if (!isDevelopmentRuntime()) {
|
|
443
|
+
core.enableProdMode();
|
|
444
|
+
}
|
|
438
445
|
initDominoAdapter(platformServer);
|
|
439
446
|
return {
|
|
440
447
|
APP_BASE_HREF: common.APP_BASE_HREF,
|
|
@@ -3444,16 +3451,16 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3444
3451
|
return fromNodeModules;
|
|
3445
3452
|
return resolve5(import.meta.dir, "./dev/client");
|
|
3446
3453
|
}, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
|
|
3447
|
-
const
|
|
3448
|
-
const
|
|
3454
|
+
const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
|
|
3455
|
+
const entityNames = [];
|
|
3449
3456
|
let match;
|
|
3450
|
-
while ((match =
|
|
3457
|
+
while ((match = entityClassRegex.exec(content)) !== null) {
|
|
3451
3458
|
if (match[1])
|
|
3452
|
-
|
|
3459
|
+
entityNames.push(match[1]);
|
|
3453
3460
|
}
|
|
3454
|
-
if (
|
|
3461
|
+
if (entityNames.length === 0)
|
|
3455
3462
|
return content;
|
|
3456
|
-
const registrations =
|
|
3463
|
+
const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
|
|
3457
3464
|
`);
|
|
3458
3465
|
const hmrBlock = `
|
|
3459
3466
|
// Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
|
|
@@ -5138,7 +5145,8 @@ init_angularDeps();
|
|
|
5138
5145
|
init_resolveAngularPackage();
|
|
5139
5146
|
var noopAnimationProvidersPromise = null;
|
|
5140
5147
|
var loadNoopAnimationProviders = async () => {
|
|
5141
|
-
const
|
|
5148
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-browser/animations") : "@angular/platform-browser/animations";
|
|
5149
|
+
const animations = await import(spec);
|
|
5142
5150
|
return animations.provideNoopAnimations();
|
|
5143
5151
|
};
|
|
5144
5152
|
var buildServerAnimationProviders = (usesLegacyAnimations) => {
|
|
@@ -5187,7 +5195,8 @@ var buildRedirectEventHandler = (responseInit, routerModule) => {
|
|
|
5187
5195
|
var buildRouterRedirectProviders = async (deps, responseInit) => {
|
|
5188
5196
|
let routerModule;
|
|
5189
5197
|
try {
|
|
5190
|
-
|
|
5198
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/router") : "@angular/router";
|
|
5199
|
+
routerModule = await import(spec);
|
|
5191
5200
|
} catch {
|
|
5192
5201
|
return [];
|
|
5193
5202
|
}
|
|
@@ -5456,7 +5465,6 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
5456
5465
|
// src/angular/pageHandler.ts
|
|
5457
5466
|
init_ssrCache();
|
|
5458
5467
|
init_ssrRender();
|
|
5459
|
-
init_resolveAngularPackage();
|
|
5460
5468
|
var lastSelector = "angular-page";
|
|
5461
5469
|
var isRecord5 = (value) => typeof value === "object" && value !== null;
|
|
5462
5470
|
var isAngularComponent2 = (value) => typeof value === "function";
|
|
@@ -5477,10 +5485,10 @@ var resolvePageComponent = (pageModule) => {
|
|
|
5477
5485
|
};
|
|
5478
5486
|
var compilerImportPromise = null;
|
|
5479
5487
|
var ensureAngularCompiler = () => {
|
|
5480
|
-
if (
|
|
5481
|
-
;
|
|
5488
|
+
if (isProductionRuntime())
|
|
5489
|
+
return Promise.resolve();
|
|
5482
5490
|
if (!compilerImportPromise) {
|
|
5483
|
-
compilerImportPromise = import(
|
|
5491
|
+
compilerImportPromise = import("@angular/compiler");
|
|
5484
5492
|
}
|
|
5485
5493
|
return compilerImportPromise;
|
|
5486
5494
|
};
|
|
@@ -5659,5 +5667,5 @@ export {
|
|
|
5659
5667
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
5660
5668
|
};
|
|
5661
5669
|
|
|
5662
|
-
//# debugId=
|
|
5670
|
+
//# debugId=5D5DF5C464BA5C9964756E2164756E21
|
|
5663
5671
|
//# sourceMappingURL=server.js.map
|