@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/islands/index.js
CHANGED
|
@@ -152,6 +152,9 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
152
152
|
};
|
|
153
153
|
var init_resolveAngularPackage = () => {};
|
|
154
154
|
|
|
155
|
+
// src/utils/runtimeMode.ts
|
|
156
|
+
var ENV_VAR = "NODE_ENV", isProductionRuntime = () => process.env[ENV_VAR] === "production", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development";
|
|
157
|
+
|
|
155
158
|
// src/angular/angularPatch.ts
|
|
156
159
|
var exports_angularPatch = {};
|
|
157
160
|
__export(exports_angularPatch, {
|
|
@@ -234,7 +237,8 @@ var ensureHead = (doc) => {
|
|
|
234
237
|
}
|
|
235
238
|
layoutPatchApplied = true;
|
|
236
239
|
}, applyPatches = async () => {
|
|
237
|
-
const
|
|
240
|
+
const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-server") : "@angular/platform-server";
|
|
241
|
+
const { \u{275}DominoAdapter } = await import(spec);
|
|
238
242
|
if (!\u{275}DominoAdapter?.prototype) {
|
|
239
243
|
console.warn("[Angular Patch] \u0275DominoAdapter not found, skipping patches");
|
|
240
244
|
return false;
|
|
@@ -301,18 +305,21 @@ var initDominoAdapter = (platformServer) => {
|
|
|
301
305
|
console.error("Failed to initialize DominoAdapter:", err);
|
|
302
306
|
}
|
|
303
307
|
}, loadAngularDeps = async () => {
|
|
304
|
-
if (
|
|
305
|
-
await import(
|
|
308
|
+
if (!isProductionRuntime()) {
|
|
309
|
+
await import("@angular/compiler");
|
|
306
310
|
}
|
|
307
311
|
const { applyPatches: applyPatches2 } = await Promise.resolve().then(() => (init_angularPatch(), exports_angularPatch));
|
|
308
312
|
await applyPatches2();
|
|
313
|
+
const useBareSpecifiers = !isProductionRuntime();
|
|
309
314
|
const [platformBrowser, platformServer, common, core] = await Promise.all([
|
|
310
|
-
import(resolveAngularRuntimePath("@angular/platform-browser")),
|
|
311
|
-
import(resolveAngularRuntimePath("@angular/platform-server")),
|
|
312
|
-
import(resolveAngularRuntimePath("@angular/common")),
|
|
313
|
-
import(resolveAngularRuntimePath("@angular/core"))
|
|
315
|
+
useBareSpecifiers ? import("@angular/platform-browser") : import(resolveAngularRuntimePath("@angular/platform-browser")),
|
|
316
|
+
useBareSpecifiers ? import("@angular/platform-server") : import(resolveAngularRuntimePath("@angular/platform-server")),
|
|
317
|
+
useBareSpecifiers ? import("@angular/common") : import(resolveAngularRuntimePath("@angular/common")),
|
|
318
|
+
useBareSpecifiers ? import("@angular/core") : import(resolveAngularRuntimePath("@angular/core"))
|
|
314
319
|
]);
|
|
315
|
-
if (
|
|
320
|
+
if (!isDevelopmentRuntime()) {
|
|
321
|
+
core.enableProdMode();
|
|
322
|
+
}
|
|
316
323
|
initDominoAdapter(platformServer);
|
|
317
324
|
return {
|
|
318
325
|
APP_BASE_HREF: common.APP_BASE_HREF,
|
|
@@ -1416,6 +1423,18 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1416
1423
|
return runPostcss(await readFile(filePath, "utf-8"), filePath, config);
|
|
1417
1424
|
}
|
|
1418
1425
|
return compileStyleSource(filePath, undefined, undefined, config);
|
|
1426
|
+
}, CSS_IMPORT_PATTERN, resolveCssImportsSync = (content, baseDir, visited) => {
|
|
1427
|
+
return content.replace(CSS_IMPORT_PATTERN, (match, importPath) => {
|
|
1428
|
+
const fullPath = isAbsolute(importPath) ? importPath : resolve3(baseDir, importPath);
|
|
1429
|
+
if (visited.has(fullPath))
|
|
1430
|
+
return "";
|
|
1431
|
+
if (!existsSync3(fullPath))
|
|
1432
|
+
return match;
|
|
1433
|
+
const nextVisited = new Set(visited);
|
|
1434
|
+
nextVisited.add(fullPath);
|
|
1435
|
+
const imported = readFileSync3(fullPath, "utf-8");
|
|
1436
|
+
return resolveCssImportsSync(imported, dirname(fullPath), nextVisited);
|
|
1437
|
+
});
|
|
1419
1438
|
}, compileStyleFileIfNeededSync = (filePath, config) => {
|
|
1420
1439
|
const rawContents = readFileSync3(filePath, "utf-8");
|
|
1421
1440
|
const language = getStyleLanguage(filePath);
|
|
@@ -1433,7 +1452,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1433
1452
|
}
|
|
1434
1453
|
const contents = withAdditionalData(rawContents, options.additionalData);
|
|
1435
1454
|
const loadPaths = normalizeLoadPaths(filePath, options.loadPaths);
|
|
1436
|
-
|
|
1455
|
+
const compiled = sass.compileString(contents, {
|
|
1437
1456
|
importers: [
|
|
1438
1457
|
createSassImporter(filePath, loadPaths, language, config)
|
|
1439
1458
|
],
|
|
@@ -1442,6 +1461,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1442
1461
|
syntax: language === "sass" ? "indented" : "scss",
|
|
1443
1462
|
url: new URL(`file://${filePath}`)
|
|
1444
1463
|
}).css;
|
|
1464
|
+
return resolveCssImportsSync(compiled, dirname(filePath), new Set([filePath]));
|
|
1445
1465
|
}
|
|
1446
1466
|
if (language === "less") {
|
|
1447
1467
|
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.`);
|
|
@@ -1449,7 +1469,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1449
1469
|
if (language === "stylus") {
|
|
1450
1470
|
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.`);
|
|
1451
1471
|
}
|
|
1452
|
-
return rawContents;
|
|
1472
|
+
return resolveCssImportsSync(rawContents, dirname(filePath), new Set([filePath]));
|
|
1453
1473
|
}, getCssOutputExtension = (filePath) => isPreprocessableStylePath(filePath) ? ".css" : extname(filePath);
|
|
1454
1474
|
var init_stylePreprocessor = __esm(() => {
|
|
1455
1475
|
CSS_EXTENSION_PATTERN = /\.css$/i;
|
|
@@ -1462,6 +1482,7 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
1462
1482
|
styleDependencyGraph = new Map;
|
|
1463
1483
|
styleOutputHashes = new Map;
|
|
1464
1484
|
stylePreprocessorPlugin = createStylePreprocessorPlugin();
|
|
1485
|
+
CSS_IMPORT_PATTERN = /@import\s+["']([^"']+)["']\s*;?/g;
|
|
1465
1486
|
});
|
|
1466
1487
|
|
|
1467
1488
|
// src/core/svelteServerModule.ts
|
|
@@ -1913,5 +1934,5 @@ export {
|
|
|
1913
1934
|
createIslandStore
|
|
1914
1935
|
};
|
|
1915
1936
|
|
|
1916
|
-
//# debugId=
|
|
1937
|
+
//# debugId=5F21E5EDECC6E1BB64756E2164756E21
|
|
1917
1938
|
//# sourceMappingURL=index.js.map
|