@absolutejs/absolute 0.19.0-beta.1019 → 0.19.0-beta.1020
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 +25 -19
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +25 -19
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +45 -49
- package/dist/build.js.map +5 -5
- package/dist/index.js +45 -49
- package/dist/index.js.map +5 -5
- package/dist/src/build/compileAngular.d.ts +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15218,9 +15218,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
15218
15218
|
const pageInjectionForHash = providersInjection?.pagesByFile.get(resolvedEntry);
|
|
15219
15219
|
const providersHashInput = providersInjection ? (() => {
|
|
15220
15220
|
let providersSourceContent = "";
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15221
|
+
if (providersInjection.appProvidersSource) {
|
|
15222
|
+
try {
|
|
15223
|
+
providersSourceContent = readFileSync21(providersInjection.appProvidersSource, "utf-8");
|
|
15224
|
+
} catch {}
|
|
15225
|
+
}
|
|
15224
15226
|
return JSON.stringify({
|
|
15225
15227
|
basePath: pageInjectionForHash?.basePath ?? null,
|
|
15226
15228
|
hasRoutes: pageInjectionForHash?.hasRoutes ?? false,
|
|
@@ -15257,20 +15259,22 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
15257
15259
|
const pageInjection = providersInjection?.pagesByFile.get(resolvedEntry);
|
|
15258
15260
|
rewritten = rewritten.replace(/\n\/\* __ABS_PROVIDERS_INJECTION_START \*\/[\s\S]*?\/\* __ABS_PROVIDERS_INJECTION_END \*\/\n?/g, "");
|
|
15259
15261
|
if (providersInjection && pageInjection) {
|
|
15260
|
-
const
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
const
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15262
|
+
const importLines = [];
|
|
15263
|
+
const fragments = [];
|
|
15264
|
+
if (providersInjection.appProvidersSource) {
|
|
15265
|
+
const compiledAppProvidersPath = (() => {
|
|
15266
|
+
const angularDirAbs = resolve24(outRoot);
|
|
15267
|
+
const appSourceAbs = resolve24(providersInjection.appProvidersSource);
|
|
15268
|
+
const rel = relative11(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
|
|
15269
|
+
return join29(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
15270
|
+
})();
|
|
15271
|
+
const appProvidersSpec = (() => {
|
|
15272
|
+
const rel = relative11(dirname16(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
|
|
15273
|
+
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
15274
|
+
})();
|
|
15275
|
+
importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
|
|
15276
|
+
fragments.push("...__abs_globalProviders");
|
|
15277
|
+
}
|
|
15274
15278
|
if (pageInjection.hasRoutes) {
|
|
15275
15279
|
importLines.push(`import { provideRouter as __abs_provideRouter, withComponentInputBinding as __abs_withComponentInputBinding, withViewTransitions as __abs_withViewTransitions } from "@angular/router";`);
|
|
15276
15280
|
fragments.push("__abs_provideRouter(routes, __abs_withComponentInputBinding(), __abs_withViewTransitions())");
|
|
@@ -15279,13 +15283,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
15279
15283
|
importLines.push(`import { APP_BASE_HREF as __abs_APP_BASE_HREF } from "@angular/common";`);
|
|
15280
15284
|
fragments.push(`{ provide: __abs_APP_BASE_HREF, useValue: ${JSON.stringify(pageInjection.basePath)} }`);
|
|
15281
15285
|
}
|
|
15282
|
-
|
|
15286
|
+
if (fragments.length > 0) {
|
|
15287
|
+
rewritten += `
|
|
15283
15288
|
/* __ABS_PROVIDERS_INJECTION_START */
|
|
15284
15289
|
${importLines.join(`
|
|
15285
15290
|
`)}
|
|
15286
15291
|
export const providers = [${fragments.join(", ")}];
|
|
15287
15292
|
/* __ABS_PROVIDERS_INJECTION_END */
|
|
15288
15293
|
`;
|
|
15294
|
+
}
|
|
15289
15295
|
}
|
|
15290
15296
|
await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
15291
15297
|
const relativePath = relative11(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
@@ -20359,34 +20365,24 @@ ${content.slice(firstUseIdx)}`;
|
|
|
20359
20365
|
const { parseAngularProvidersImport: parseAngularProvidersImport2 } = await Promise.resolve().then(() => (init_parseAngularConfigImports(), exports_parseAngularConfigImports));
|
|
20360
20366
|
const scanResult = runAngularHandlerScan2(projectRoot, angularDir);
|
|
20361
20367
|
const providersImport = parseAngularProvidersImport2(projectRoot);
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
});
|
|
20376
|
-
}
|
|
20377
|
-
for (const route of scanResult.pageRoutes) {
|
|
20378
|
-
if (pagesByFile.has(route.pageFile))
|
|
20379
|
-
continue;
|
|
20380
|
-
pagesByFile.set(route.pageFile, {
|
|
20381
|
-
basePath: null,
|
|
20382
|
-
hasRoutes: route.hasRoutes
|
|
20383
|
-
});
|
|
20384
|
-
}
|
|
20385
|
-
angularProvidersInjection = {
|
|
20386
|
-
appProvidersSource: providersImport.absolutePath,
|
|
20387
|
-
pagesByFile
|
|
20388
|
-
};
|
|
20368
|
+
angularAppProvidersSource = providersImport?.absolutePath;
|
|
20369
|
+
const pagesByFile = new Map;
|
|
20370
|
+
const basePathByKey = new Map;
|
|
20371
|
+
for (const call of scanResult.calls) {
|
|
20372
|
+
basePathByKey.set(call.manifestKey, call.mountPath?.endsWith("/*") ? call.mountPath.slice(0, -1) : null);
|
|
20373
|
+
}
|
|
20374
|
+
for (const route of scanResult.pageRoutes) {
|
|
20375
|
+
const basePath = basePathByKey.get(route.manifestKey) ?? null;
|
|
20376
|
+
const normalizedBase = basePath === "/" ? null : basePath;
|
|
20377
|
+
pagesByFile.set(route.pageFile, {
|
|
20378
|
+
basePath: normalizedBase,
|
|
20379
|
+
hasRoutes: route.hasRoutes
|
|
20380
|
+
});
|
|
20389
20381
|
}
|
|
20382
|
+
angularProvidersInjection = {
|
|
20383
|
+
appProvidersSource: providersImport?.absolutePath ?? null,
|
|
20384
|
+
pagesByFile
|
|
20385
|
+
};
|
|
20390
20386
|
});
|
|
20391
20387
|
}
|
|
20392
20388
|
const [
|
|
@@ -24990,7 +24986,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24990
24986
|
const projectRoot = process.cwd();
|
|
24991
24987
|
const resolvedAngularDir = resolve41(angularDir);
|
|
24992
24988
|
const providersImport = parseAngularProvidersImport2(projectRoot);
|
|
24993
|
-
const providersInjection =
|
|
24989
|
+
const providersInjection = (() => {
|
|
24994
24990
|
const scan = runAngularHandlerScan2(projectRoot, resolvedAngularDir);
|
|
24995
24991
|
const basePathByKey = new Map;
|
|
24996
24992
|
for (const call of scan.calls) {
|
|
@@ -25005,10 +25001,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
25005
25001
|
});
|
|
25006
25002
|
}
|
|
25007
25003
|
return {
|
|
25008
|
-
appProvidersSource: providersImport
|
|
25004
|
+
appProvidersSource: providersImport?.absolutePath ?? null,
|
|
25009
25005
|
pagesByFile
|
|
25010
25006
|
};
|
|
25011
|
-
})()
|
|
25007
|
+
})();
|
|
25012
25008
|
const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true, getStyleTransformConfig(state.config), providersInjection);
|
|
25013
25009
|
(async () => {
|
|
25014
25010
|
try {
|
|
@@ -35968,5 +35964,5 @@ export {
|
|
|
35968
35964
|
ANGULAR_INIT_TIMEOUT_MS
|
|
35969
35965
|
};
|
|
35970
35966
|
|
|
35971
|
-
//# debugId=
|
|
35967
|
+
//# debugId=ACF648A580478F0564756E2164756E21
|
|
35972
35968
|
//# sourceMappingURL=index.js.map
|