@absolutejs/absolute 0.19.0-beta.845 → 0.19.0-beta.847
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 +45 -23
- package/dist/angular/index.js.map +11 -10
- package/dist/angular/server.js +45 -23
- package/dist/angular/server.js.map +11 -10
- package/dist/build.js +955 -498
- package/dist/build.js.map +16 -13
- 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 +1002 -545
- package/dist/index.js.map +17 -14
- package/dist/islands/index.js +32 -11
- package/dist/islands/index.js.map +7 -6
- package/dist/react/index.js +32 -11
- package/dist/react/index.js.map +7 -6
- 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 +32 -11
- package/dist/svelte/index.js.map +7 -6
- package/dist/svelte/server.js +17 -3
- package/dist/svelte/server.js.map +3 -3
- package/dist/types/build.d.ts +15 -0
- package/dist/types/globals.d.ts +12 -0
- package/dist/vue/index.js +32 -11
- package/dist/vue/index.js.map +7 -6
- 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,
|
|
@@ -1428,6 +1435,18 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1428
1435
|
return runPostcss(await readFile(filePath, "utf-8"), filePath, config);
|
|
1429
1436
|
}
|
|
1430
1437
|
return compileStyleSource(filePath, undefined, undefined, config);
|
|
1438
|
+
}, CSS_IMPORT_PATTERN, resolveCssImportsSync = (content, baseDir, visited) => {
|
|
1439
|
+
return content.replace(CSS_IMPORT_PATTERN, (match, importPath) => {
|
|
1440
|
+
const fullPath = isAbsolute(importPath) ? importPath : resolve3(baseDir, importPath);
|
|
1441
|
+
if (visited.has(fullPath))
|
|
1442
|
+
return "";
|
|
1443
|
+
if (!existsSync3(fullPath))
|
|
1444
|
+
return match;
|
|
1445
|
+
const nextVisited = new Set(visited);
|
|
1446
|
+
nextVisited.add(fullPath);
|
|
1447
|
+
const imported = readFileSync3(fullPath, "utf-8");
|
|
1448
|
+
return resolveCssImportsSync(imported, dirname(fullPath), nextVisited);
|
|
1449
|
+
});
|
|
1431
1450
|
}, compileStyleFileIfNeededSync = (filePath, config) => {
|
|
1432
1451
|
const rawContents = readFileSync3(filePath, "utf-8");
|
|
1433
1452
|
const language = getStyleLanguage(filePath);
|
|
@@ -1445,7 +1464,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1445
1464
|
}
|
|
1446
1465
|
const contents = withAdditionalData(rawContents, options.additionalData);
|
|
1447
1466
|
const loadPaths = normalizeLoadPaths(filePath, options.loadPaths);
|
|
1448
|
-
|
|
1467
|
+
const compiled = sass.compileString(contents, {
|
|
1449
1468
|
importers: [
|
|
1450
1469
|
createSassImporter(filePath, loadPaths, language, config)
|
|
1451
1470
|
],
|
|
@@ -1454,6 +1473,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1454
1473
|
syntax: language === "sass" ? "indented" : "scss",
|
|
1455
1474
|
url: new URL(`file://${filePath}`)
|
|
1456
1475
|
}).css;
|
|
1476
|
+
return resolveCssImportsSync(compiled, dirname(filePath), new Set([filePath]));
|
|
1457
1477
|
}
|
|
1458
1478
|
if (language === "less") {
|
|
1459
1479
|
throw new Error(`Unable to compile ${filePath}: Less styleUrl preprocessing is async-only. Import the Less file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
|
|
@@ -1461,7 +1481,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1461
1481
|
if (language === "stylus") {
|
|
1462
1482
|
throw new Error(`Unable to compile ${filePath}: Stylus styleUrl preprocessing is async-only. Import the Stylus file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
|
|
1463
1483
|
}
|
|
1464
|
-
return rawContents;
|
|
1484
|
+
return resolveCssImportsSync(rawContents, dirname(filePath), new Set([filePath]));
|
|
1465
1485
|
}, getCssOutputExtension = (filePath) => isPreprocessableStylePath(filePath) ? ".css" : extname(filePath);
|
|
1466
1486
|
var init_stylePreprocessor = __esm(() => {
|
|
1467
1487
|
CSS_EXTENSION_PATTERN = /\.css$/i;
|
|
@@ -1474,6 +1494,7 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
1474
1494
|
styleDependencyGraph = new Map;
|
|
1475
1495
|
styleOutputHashes = new Map;
|
|
1476
1496
|
stylePreprocessorPlugin = createStylePreprocessorPlugin();
|
|
1497
|
+
CSS_IMPORT_PATTERN = /@import\s+["']([^"']+)["']\s*;?/g;
|
|
1477
1498
|
});
|
|
1478
1499
|
|
|
1479
1500
|
// src/core/svelteServerModule.ts
|
|
@@ -3444,16 +3465,16 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3444
3465
|
return fromNodeModules;
|
|
3445
3466
|
return resolve5(import.meta.dir, "./dev/client");
|
|
3446
3467
|
}, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
|
|
3447
|
-
const
|
|
3448
|
-
const
|
|
3468
|
+
const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
|
|
3469
|
+
const entityNames = [];
|
|
3449
3470
|
let match;
|
|
3450
|
-
while ((match =
|
|
3471
|
+
while ((match = entityClassRegex.exec(content)) !== null) {
|
|
3451
3472
|
if (match[1])
|
|
3452
|
-
|
|
3473
|
+
entityNames.push(match[1]);
|
|
3453
3474
|
}
|
|
3454
|
-
if (
|
|
3475
|
+
if (entityNames.length === 0)
|
|
3455
3476
|
return content;
|
|
3456
|
-
const registrations =
|
|
3477
|
+
const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
|
|
3457
3478
|
`);
|
|
3458
3479
|
const hmrBlock = `
|
|
3459
3480
|
// Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
|
|
@@ -5138,7 +5159,8 @@ init_angularDeps();
|
|
|
5138
5159
|
init_resolveAngularPackage();
|
|
5139
5160
|
var noopAnimationProvidersPromise = null;
|
|
5140
5161
|
var loadNoopAnimationProviders = async () => {
|
|
5141
|
-
const
|
|
5162
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-browser/animations") : "@angular/platform-browser/animations";
|
|
5163
|
+
const animations = await import(spec);
|
|
5142
5164
|
return animations.provideNoopAnimations();
|
|
5143
5165
|
};
|
|
5144
5166
|
var buildServerAnimationProviders = (usesLegacyAnimations) => {
|
|
@@ -5187,7 +5209,8 @@ var buildRedirectEventHandler = (responseInit, routerModule) => {
|
|
|
5187
5209
|
var buildRouterRedirectProviders = async (deps, responseInit) => {
|
|
5188
5210
|
let routerModule;
|
|
5189
5211
|
try {
|
|
5190
|
-
|
|
5212
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/router") : "@angular/router";
|
|
5213
|
+
routerModule = await import(spec);
|
|
5191
5214
|
} catch {
|
|
5192
5215
|
return [];
|
|
5193
5216
|
}
|
|
@@ -5456,7 +5479,6 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
5456
5479
|
// src/angular/pageHandler.ts
|
|
5457
5480
|
init_ssrCache();
|
|
5458
5481
|
init_ssrRender();
|
|
5459
|
-
init_resolveAngularPackage();
|
|
5460
5482
|
var lastSelector = "angular-page";
|
|
5461
5483
|
var isRecord5 = (value) => typeof value === "object" && value !== null;
|
|
5462
5484
|
var isAngularComponent2 = (value) => typeof value === "function";
|
|
@@ -5477,10 +5499,10 @@ var resolvePageComponent = (pageModule) => {
|
|
|
5477
5499
|
};
|
|
5478
5500
|
var compilerImportPromise = null;
|
|
5479
5501
|
var ensureAngularCompiler = () => {
|
|
5480
|
-
if (
|
|
5481
|
-
;
|
|
5502
|
+
if (isProductionRuntime())
|
|
5503
|
+
return Promise.resolve();
|
|
5482
5504
|
if (!compilerImportPromise) {
|
|
5483
|
-
compilerImportPromise = import(
|
|
5505
|
+
compilerImportPromise = import("@angular/compiler");
|
|
5484
5506
|
}
|
|
5485
5507
|
return compilerImportPromise;
|
|
5486
5508
|
};
|
|
@@ -5659,5 +5681,5 @@ export {
|
|
|
5659
5681
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
5660
5682
|
};
|
|
5661
5683
|
|
|
5662
|
-
//# debugId=
|
|
5684
|
+
//# debugId=216491911F82DBB864756E2164756E21
|
|
5663
5685
|
//# sourceMappingURL=server.js.map
|