@absolutejs/absolute 0.19.0-beta.1137 → 0.19.0-beta.1139
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/build.js +28 -2
- package/dist/build.js.map +3 -3
- package/dist/cli/index.js +62 -16
- package/dist/index.js +35 -3
- package/dist/index.js.map +4 -4
- package/dist/src/cli/scripts/eslint.d.ts +23 -1
- package/dist/src/cli/scripts/eslintChunked.d.ts +7 -0
- package/dist/src/cli/scripts/lintProof.d.ts +5 -4
- package/dist/vue/index.js +15 -3
- package/dist/vue/index.js.map +3 -3
- package/dist/vue/server.js +15 -3
- package/dist/vue/server.js.map +3 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-1uueeZ/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-1uueeZ/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-1uueeZ/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/build.js
CHANGED
|
@@ -14415,6 +14415,32 @@ var resolveDevClientDir3 = () => {
|
|
|
14415
14415
|
].join(`
|
|
14416
14416
|
`) : nonVueLines.join(`
|
|
14417
14417
|
`);
|
|
14418
|
+
}, wrapServerAsyncComponentLoader = (code) => {
|
|
14419
|
+
const vueImportRegex = /import\s+\{([^}]+)\}\s+from\s+['"]vue['"];?/;
|
|
14420
|
+
const match = code.match(vueImportRegex);
|
|
14421
|
+
if (!match?.[1])
|
|
14422
|
+
return code;
|
|
14423
|
+
const specifiers = match[1].split(",").map((specifier) => specifier.trim());
|
|
14424
|
+
const asyncComponentIndex = specifiers.findIndex((specifier) => /^defineAsyncComponent(?:\s+as\s+[A-Za-z_$][\w$]*)?$/.test(specifier));
|
|
14425
|
+
if (asyncComponentIndex === -1)
|
|
14426
|
+
return code;
|
|
14427
|
+
const asyncComponentSpecifier = specifiers[asyncComponentIndex] ?? "";
|
|
14428
|
+
const localName = asyncComponentSpecifier.match(/\s+as\s+([A-Za-z_$][\w$]*)$/)?.[1] ?? "defineAsyncComponent";
|
|
14429
|
+
const importedName = "__absoluteDefineAsyncComponent";
|
|
14430
|
+
specifiers[asyncComponentIndex] = `defineAsyncComponent as ${importedName}`;
|
|
14431
|
+
const wrapper = `
|
|
14432
|
+
const __absoluteResolveAsyncVueComponent = async (loader) => {
|
|
14433
|
+
const loaded = await loader();
|
|
14434
|
+
return loaded && typeof loaded === "object" && "default" in loaded
|
|
14435
|
+
? loaded.default
|
|
14436
|
+
: loaded;
|
|
14437
|
+
};
|
|
14438
|
+
const ${localName} = (source) => ${importedName}(
|
|
14439
|
+
typeof source === "function"
|
|
14440
|
+
? () => __absoluteResolveAsyncVueComponent(source)
|
|
14441
|
+
: { ...source, loader: () => __absoluteResolveAsyncVueComponent(source.loader) },
|
|
14442
|
+
);`;
|
|
14443
|
+
return code.replace(vueImportRegex, `import { ${specifiers.join(", ")} } from 'vue';${wrapper}`);
|
|
14418
14444
|
}, compileVueFile = async (sourceFilePath, outputDirs, cacheMap, isEntryPoint, vueRootDir, compiler, stylePreprocessors) => {
|
|
14419
14445
|
const cachedResult = cacheMap.get(sourceFilePath);
|
|
14420
14446
|
if (cachedResult)
|
|
@@ -14553,7 +14579,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
14553
14579
|
`));
|
|
14554
14580
|
};
|
|
14555
14581
|
const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
|
|
14556
|
-
const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
|
|
14582
|
+
const serverCode = wrapServerAsyncComponentLoader(assembleModule(generateRenderFunction(true), "ssrRender", false)) + islandMetadataExports;
|
|
14557
14583
|
const clientOutputPath = join29(outputDirs.client, `${relativeWithoutExtension}.js`);
|
|
14558
14584
|
const serverOutputPath = join29(outputDirs.server, `${relativeWithoutExtension}.js`);
|
|
14559
14585
|
const rewritePackageImports = (code, outputPath, mode) => {
|
|
@@ -29207,5 +29233,5 @@ export {
|
|
|
29207
29233
|
build
|
|
29208
29234
|
};
|
|
29209
29235
|
|
|
29210
|
-
//# debugId=
|
|
29236
|
+
//# debugId=DDCA4043EC9AE59A64756E2164756E21
|
|
29211
29237
|
//# sourceMappingURL=build.js.map
|