@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/build.js
CHANGED
|
@@ -14992,9 +14992,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14992
14992
|
const pageInjectionForHash = providersInjection?.pagesByFile.get(resolvedEntry);
|
|
14993
14993
|
const providersHashInput = providersInjection ? (() => {
|
|
14994
14994
|
let providersSourceContent = "";
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14995
|
+
if (providersInjection.appProvidersSource) {
|
|
14996
|
+
try {
|
|
14997
|
+
providersSourceContent = readFileSync19(providersInjection.appProvidersSource, "utf-8");
|
|
14998
|
+
} catch {}
|
|
14999
|
+
}
|
|
14998
15000
|
return JSON.stringify({
|
|
14999
15001
|
basePath: pageInjectionForHash?.basePath ?? null,
|
|
15000
15002
|
hasRoutes: pageInjectionForHash?.hasRoutes ?? false,
|
|
@@ -15031,20 +15033,22 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
15031
15033
|
const pageInjection = providersInjection?.pagesByFile.get(resolvedEntry);
|
|
15032
15034
|
rewritten = rewritten.replace(/\n\/\* __ABS_PROVIDERS_INJECTION_START \*\/[\s\S]*?\/\* __ABS_PROVIDERS_INJECTION_END \*\/\n?/g, "");
|
|
15033
15035
|
if (providersInjection && pageInjection) {
|
|
15034
|
-
const
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
const
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15036
|
+
const importLines = [];
|
|
15037
|
+
const fragments = [];
|
|
15038
|
+
if (providersInjection.appProvidersSource) {
|
|
15039
|
+
const compiledAppProvidersPath = (() => {
|
|
15040
|
+
const angularDirAbs = resolve21(outRoot);
|
|
15041
|
+
const appSourceAbs = resolve21(providersInjection.appProvidersSource);
|
|
15042
|
+
const rel = relative11(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
|
|
15043
|
+
return join28(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
15044
|
+
})();
|
|
15045
|
+
const appProvidersSpec = (() => {
|
|
15046
|
+
const rel = relative11(dirname14(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
|
|
15047
|
+
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
15048
|
+
})();
|
|
15049
|
+
importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
|
|
15050
|
+
fragments.push("...__abs_globalProviders");
|
|
15051
|
+
}
|
|
15048
15052
|
if (pageInjection.hasRoutes) {
|
|
15049
15053
|
importLines.push(`import { provideRouter as __abs_provideRouter, withComponentInputBinding as __abs_withComponentInputBinding, withViewTransitions as __abs_withViewTransitions } from "@angular/router";`);
|
|
15050
15054
|
fragments.push("__abs_provideRouter(routes, __abs_withComponentInputBinding(), __abs_withViewTransitions())");
|
|
@@ -15053,13 +15057,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
15053
15057
|
importLines.push(`import { APP_BASE_HREF as __abs_APP_BASE_HREF } from "@angular/common";`);
|
|
15054
15058
|
fragments.push(`{ provide: __abs_APP_BASE_HREF, useValue: ${JSON.stringify(pageInjection.basePath)} }`);
|
|
15055
15059
|
}
|
|
15056
|
-
|
|
15060
|
+
if (fragments.length > 0) {
|
|
15061
|
+
rewritten += `
|
|
15057
15062
|
/* __ABS_PROVIDERS_INJECTION_START */
|
|
15058
15063
|
${importLines.join(`
|
|
15059
15064
|
`)}
|
|
15060
15065
|
export const providers = [${fragments.join(", ")}];
|
|
15061
15066
|
/* __ABS_PROVIDERS_INJECTION_END */
|
|
15062
15067
|
`;
|
|
15068
|
+
}
|
|
15063
15069
|
}
|
|
15064
15070
|
await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
15065
15071
|
const relativePath = relative11(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
@@ -20133,34 +20139,24 @@ ${content.slice(firstUseIdx)}`;
|
|
|
20133
20139
|
const { parseAngularProvidersImport: parseAngularProvidersImport2 } = await Promise.resolve().then(() => (init_parseAngularConfigImports(), exports_parseAngularConfigImports));
|
|
20134
20140
|
const scanResult = runAngularHandlerScan2(projectRoot, angularDir);
|
|
20135
20141
|
const providersImport = parseAngularProvidersImport2(projectRoot);
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20145
|
-
|
|
20146
|
-
|
|
20147
|
-
|
|
20148
|
-
|
|
20149
|
-
});
|
|
20150
|
-
}
|
|
20151
|
-
for (const route of scanResult.pageRoutes) {
|
|
20152
|
-
if (pagesByFile.has(route.pageFile))
|
|
20153
|
-
continue;
|
|
20154
|
-
pagesByFile.set(route.pageFile, {
|
|
20155
|
-
basePath: null,
|
|
20156
|
-
hasRoutes: route.hasRoutes
|
|
20157
|
-
});
|
|
20158
|
-
}
|
|
20159
|
-
angularProvidersInjection = {
|
|
20160
|
-
appProvidersSource: providersImport.absolutePath,
|
|
20161
|
-
pagesByFile
|
|
20162
|
-
};
|
|
20142
|
+
angularAppProvidersSource = providersImport?.absolutePath;
|
|
20143
|
+
const pagesByFile = new Map;
|
|
20144
|
+
const basePathByKey = new Map;
|
|
20145
|
+
for (const call of scanResult.calls) {
|
|
20146
|
+
basePathByKey.set(call.manifestKey, call.mountPath?.endsWith("/*") ? call.mountPath.slice(0, -1) : null);
|
|
20147
|
+
}
|
|
20148
|
+
for (const route of scanResult.pageRoutes) {
|
|
20149
|
+
const basePath = basePathByKey.get(route.manifestKey) ?? null;
|
|
20150
|
+
const normalizedBase = basePath === "/" ? null : basePath;
|
|
20151
|
+
pagesByFile.set(route.pageFile, {
|
|
20152
|
+
basePath: normalizedBase,
|
|
20153
|
+
hasRoutes: route.hasRoutes
|
|
20154
|
+
});
|
|
20163
20155
|
}
|
|
20156
|
+
angularProvidersInjection = {
|
|
20157
|
+
appProvidersSource: providersImport?.absolutePath ?? null,
|
|
20158
|
+
pagesByFile
|
|
20159
|
+
};
|
|
20164
20160
|
});
|
|
20165
20161
|
}
|
|
20166
20162
|
const [
|
|
@@ -24967,7 +24963,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24967
24963
|
const projectRoot = process.cwd();
|
|
24968
24964
|
const resolvedAngularDir = resolve40(angularDir);
|
|
24969
24965
|
const providersImport = parseAngularProvidersImport2(projectRoot);
|
|
24970
|
-
const providersInjection =
|
|
24966
|
+
const providersInjection = (() => {
|
|
24971
24967
|
const scan = runAngularHandlerScan2(projectRoot, resolvedAngularDir);
|
|
24972
24968
|
const basePathByKey = new Map;
|
|
24973
24969
|
for (const call of scan.calls) {
|
|
@@ -24982,10 +24978,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24982
24978
|
});
|
|
24983
24979
|
}
|
|
24984
24980
|
return {
|
|
24985
|
-
appProvidersSource: providersImport
|
|
24981
|
+
appProvidersSource: providersImport?.absolutePath ?? null,
|
|
24986
24982
|
pagesByFile
|
|
24987
24983
|
};
|
|
24988
|
-
})()
|
|
24984
|
+
})();
|
|
24989
24985
|
const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true, getStyleTransformConfig(state.config), providersInjection);
|
|
24990
24986
|
(async () => {
|
|
24991
24987
|
try {
|
|
@@ -27162,5 +27158,5 @@ export {
|
|
|
27162
27158
|
build
|
|
27163
27159
|
};
|
|
27164
27160
|
|
|
27165
|
-
//# debugId=
|
|
27161
|
+
//# debugId=A8397E1AEC19B09664756E2164756E21
|
|
27166
27162
|
//# sourceMappingURL=build.js.map
|