vite-plugin-zephyr 1.1.2 → 1.2.0
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/README.md +45 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +44 -6
- package/dist/index.mjs +3 -0
- package/dist/lib/internal/extract/extract-entrypoint.d.mts +11 -0
- package/dist/lib/internal/extract/extract-entrypoint.d.ts +2 -1
- package/dist/lib/internal/extract/extract-entrypoint.js +53 -38
- package/dist/lib/internal/extract/extract-entrypoint.mjs +32 -0
- package/dist/lib/internal/extract/extract_mf_plugin.d.mts +10 -0
- package/dist/lib/internal/extract/extract_mf_plugin.d.ts +6 -2
- package/dist/lib/internal/extract/extract_mf_plugin.js +48 -5
- package/dist/lib/internal/extract/extract_mf_plugin.mjs +17 -0
- package/dist/lib/internal/extract/extract_vite_assets_map.d.mts +4 -0
- package/dist/lib/internal/extract/extract_vite_assets_map.d.ts +2 -1
- package/dist/lib/internal/extract/extract_vite_assets_map.js +65 -35
- package/dist/lib/internal/extract/extract_vite_assets_map.mjs +49 -0
- package/dist/lib/internal/extract/load_public_dir.d.mts +10 -0
- package/dist/lib/internal/extract/load_public_dir.d.ts +5 -2
- package/dist/lib/internal/extract/load_public_dir.js +57 -19
- package/dist/lib/internal/extract/load_public_dir.mjs +31 -0
- package/dist/lib/internal/extract/load_static_assets.d.mts +4 -0
- package/dist/lib/internal/extract/load_static_assets.d.ts +3 -2
- package/dist/lib/internal/extract/load_static_assets.js +60 -35
- package/dist/lib/internal/extract/load_static_assets.mjs +29 -0
- package/dist/lib/internal/extract/load_static_entries.d.mts +10 -0
- package/dist/lib/internal/extract/load_static_entries.d.ts +5 -2
- package/dist/lib/internal/extract/load_static_entries.js +56 -14
- package/dist/lib/internal/extract/load_static_entries.mjs +31 -0
- package/dist/lib/internal/extract/merge_vite_output_assets.d.mts +13 -0
- package/dist/lib/internal/extract/merge_vite_output_assets.d.ts +13 -0
- package/dist/lib/internal/extract/merge_vite_output_assets.js +68 -0
- package/dist/lib/internal/extract/merge_vite_output_assets.mjs +31 -0
- package/dist/lib/internal/mf-vite-etl/ensure_runtime_plugin.d.mts +31 -0
- package/dist/lib/internal/mf-vite-etl/ensure_runtime_plugin.d.ts +11 -0
- package/dist/lib/internal/mf-vite-etl/ensure_runtime_plugin.js +56 -15
- package/dist/lib/internal/mf-vite-etl/ensure_runtime_plugin.mjs +21 -0
- package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.d.mts +13 -0
- package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.d.ts +1 -0
- package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.js +55 -19
- package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.mjs +24 -0
- package/dist/lib/internal/mf-vite-etl/federation-metadata.d.mts +38 -0
- package/dist/lib/internal/mf-vite-etl/federation-metadata.d.ts +38 -0
- package/dist/lib/internal/mf-vite-etl/federation-metadata.js +154 -0
- package/dist/lib/internal/mf-vite-etl/federation-metadata.mjs +111 -0
- package/dist/lib/internal/mf-vite-etl/runtime_plugin.mjs +68 -159
- package/dist/lib/internal/partial-build-scope.d.mts +12 -0
- package/dist/lib/internal/partial-build-scope.d.ts +12 -0
- package/dist/lib/internal/partial-build-scope.js +83 -0
- package/dist/lib/internal/partial-build-scope.mjs +43 -0
- package/dist/lib/internal/types/zephyr-internal-options.d.mts +13 -0
- package/dist/lib/internal/types/zephyr-internal-options.d.ts +6 -2
- package/dist/lib/internal/types/zephyr-internal-options.js +18 -1
- package/dist/lib/internal/types/zephyr-internal-options.mjs +1 -0
- package/dist/lib/internal/types/zephyr-output.d.mts +23 -0
- package/dist/lib/internal/types/zephyr-output.d.ts +23 -0
- package/dist/lib/internal/types/zephyr-output.js +20 -0
- package/dist/lib/internal/types/zephyr-output.mjs +1 -0
- package/dist/lib/internal/utils/normalize-entrypoint.d.mts +11 -0
- package/dist/lib/internal/utils/normalize-entrypoint.d.ts +1 -0
- package/dist/lib/internal/utils/normalize-entrypoint.js +42 -24
- package/dist/lib/internal/utils/normalize-entrypoint.mjs +12 -0
- package/dist/lib/internal/utils/normalize-vite-path.d.mts +10 -0
- package/dist/lib/internal/utils/normalize-vite-path.d.ts +10 -0
- package/dist/lib/internal/utils/normalize-vite-path.js +51 -0
- package/dist/lib/internal/utils/normalize-vite-path.mjs +11 -0
- package/dist/lib/vite-plugin-zephyr-partial.d.mts +6 -0
- package/dist/lib/vite-plugin-zephyr-partial.d.ts +5 -8
- package/dist/lib/vite-plugin-zephyr-partial.js +75 -27
- package/dist/lib/vite-plugin-zephyr-partial.mjs +64 -0
- package/dist/lib/vite-plugin-zephyr.d.mts +21 -0
- package/dist/lib/vite-plugin-zephyr.d.ts +16 -3
- package/dist/lib/vite-plugin-zephyr.js +685 -239
- package/dist/lib/vite-plugin-zephyr.mjs +662 -0
- package/dist/rslib-runtime.mjs +21 -0
- package/package.json +53 -44
- package/dist/index.js.map +0 -1
- package/dist/lib/internal/extract/extract-entrypoint.js.map +0 -1
- package/dist/lib/internal/extract/extract_mf_plugin.js.map +0 -1
- package/dist/lib/internal/extract/extract_vite_assets_map.js.map +0 -1
- package/dist/lib/internal/extract/load_public_dir.js.map +0 -1
- package/dist/lib/internal/extract/load_static_assets.js.map +0 -1
- package/dist/lib/internal/extract/load_static_entries.js.map +0 -1
- package/dist/lib/internal/mf-vite-etl/ensure_runtime_plugin.js.map +0 -1
- package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.js.map +0 -1
- package/dist/lib/internal/types/zephyr-internal-options.js.map +0 -1
- package/dist/lib/internal/utils/normalize-entrypoint.js.map +0 -1
- package/dist/lib/vite-plugin-zephyr-partial.js.map +0 -1
- package/dist/lib/vite-plugin-zephyr.js.map +0 -1
- package/dist/package.json +0 -85
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,30 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
load_public_dir: ()=>load_public_dir
|
|
32
|
+
});
|
|
33
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
34
|
+
const external_zephyr_agent_namespaceObject = require("zephyr-agent");
|
|
35
|
+
const normalize_vite_path_js_namespaceObject = require("../utils/normalize-vite-path.js");
|
|
36
|
+
async function load_public_dir({ publicDir, outDir, target }) {
|
|
37
|
+
const files = 'tap-app' === target ? await (0, external_zephyr_agent_namespaceObject.readDirRecursiveWithContents)(publicDir, {
|
|
38
|
+
includeIgnoredPaths: true,
|
|
39
|
+
failOnError: true
|
|
40
|
+
}) : await (0, external_zephyr_agent_namespaceObject.readDirRecursiveWithContents)(publicDir);
|
|
41
|
+
const normalizedOutDir = (0, external_node_path_namespaceObject.resolve)(outDir);
|
|
42
|
+
return files.filter((file)=>file.fullPath !== normalizedOutDir && !file.fullPath.startsWith(normalizedOutDir + '/')).map((file)=>{
|
|
43
|
+
const fileName = (0, external_node_path_namespaceObject.basename)(file.fullPath);
|
|
18
44
|
return {
|
|
19
45
|
name: fileName,
|
|
20
|
-
names: [
|
|
46
|
+
names: [
|
|
47
|
+
fileName
|
|
48
|
+
],
|
|
21
49
|
needsCodeReference: false,
|
|
22
50
|
source: file.content,
|
|
23
51
|
type: 'asset',
|
|
24
|
-
fileName: (0,
|
|
52
|
+
fileName: 'tap-app' === target ? (0, normalize_vite_path_js_namespaceObject.normalizeFilesystemVitePath)(file.relativePath) : (0, normalize_vite_path_js_namespaceObject.normalizeVitePath)(file.relativePath),
|
|
25
53
|
originalFileName: fileName,
|
|
26
|
-
originalFileNames: [
|
|
54
|
+
originalFileNames: [
|
|
55
|
+
fileName
|
|
56
|
+
]
|
|
27
57
|
};
|
|
28
58
|
});
|
|
29
59
|
}
|
|
60
|
+
exports.load_public_dir = __webpack_exports__.load_public_dir;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"load_public_dir"
|
|
63
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
64
|
+
Object.defineProperty(exports, '__esModule', {
|
|
65
|
+
value: true
|
|
66
|
+
});
|
|
67
|
+
|
|
30
68
|
//# sourceMappingURL=load_public_dir.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { basename, resolve } from "node:path";
|
|
3
|
+
import { readDirRecursiveWithContents } from "zephyr-agent";
|
|
4
|
+
import { normalizeFilesystemVitePath, normalizeVitePath } from "../utils/normalize-vite-path.mjs";
|
|
5
|
+
async function load_public_dir({ publicDir, outDir, target }) {
|
|
6
|
+
const files = 'tap-app' === target ? await readDirRecursiveWithContents(publicDir, {
|
|
7
|
+
includeIgnoredPaths: true,
|
|
8
|
+
failOnError: true
|
|
9
|
+
}) : await readDirRecursiveWithContents(publicDir);
|
|
10
|
+
const normalizedOutDir = resolve(outDir);
|
|
11
|
+
return files.filter((file)=>file.fullPath !== normalizedOutDir && !file.fullPath.startsWith(normalizedOutDir + '/')).map((file)=>{
|
|
12
|
+
const fileName = basename(file.fullPath);
|
|
13
|
+
return {
|
|
14
|
+
name: fileName,
|
|
15
|
+
names: [
|
|
16
|
+
fileName
|
|
17
|
+
],
|
|
18
|
+
needsCodeReference: false,
|
|
19
|
+
source: file.content,
|
|
20
|
+
type: 'asset',
|
|
21
|
+
fileName: 'tap-app' === target ? normalizeFilesystemVitePath(file.relativePath) : normalizeVitePath(file.relativePath),
|
|
22
|
+
originalFileName: fileName,
|
|
23
|
+
originalFileNames: [
|
|
24
|
+
fileName
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { load_public_dir };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=load_public_dir.mjs.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ZephyrInternalOptions } from '../types/zephyr-internal-options.mjs';
|
|
2
|
+
import type { ZephyrOutputBundle } from '../types/zephyr-output.mjs';
|
|
3
|
+
export declare function loadStaticAssets(vite_internal_options: ZephyrInternalOptions): Promise<ZephyrOutputBundle>;
|
|
4
|
+
//# sourceMappingURL=load_static_assets.d.mts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { OutputBundle } from 'rollup';
|
|
2
1
|
import type { ZephyrInternalOptions } from '../types/zephyr-internal-options';
|
|
3
|
-
|
|
2
|
+
import type { ZephyrOutputBundle } from '../types/zephyr-output';
|
|
3
|
+
export declare function loadStaticAssets(vite_internal_options: ZephyrInternalOptions): Promise<ZephyrOutputBundle>;
|
|
4
|
+
//# sourceMappingURL=load_static_assets.d.ts.map
|
|
@@ -1,41 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
loadStaticAssets: ()=>loadStaticAssets
|
|
32
|
+
});
|
|
33
|
+
const external_load_public_dir_js_namespaceObject = require("./load_public_dir.js");
|
|
34
|
+
const external_load_static_entries_js_namespaceObject = require("./load_static_entries.js");
|
|
35
|
+
const external_merge_vite_output_assets_js_namespaceObject = require("./merge_vite_output_assets.js");
|
|
7
36
|
async function loadStaticAssets(vite_internal_options) {
|
|
8
|
-
var _a, e_1, _b, _c;
|
|
9
37
|
const bundle = {};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
vite_internal_options.publicDir
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
bundle[asset.fileName] = asset;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
33
|
-
finally {
|
|
34
|
-
try {
|
|
35
|
-
if (!_d && !_a && (_b = _e.return)) await _b.call(_e);
|
|
36
|
-
}
|
|
37
|
-
finally { if (e_1) throw e_1.error; }
|
|
38
|
-
}
|
|
38
|
+
const assetSources = [
|
|
39
|
+
vite_internal_options.publicDir ? (0, external_load_public_dir_js_namespaceObject.load_public_dir)({
|
|
40
|
+
outDir: vite_internal_options.outDir,
|
|
41
|
+
publicDir: vite_internal_options.publicDir,
|
|
42
|
+
target: vite_internal_options.target
|
|
43
|
+
}) : [],
|
|
44
|
+
(0, external_load_static_entries_js_namespaceObject.load_static_entries)({
|
|
45
|
+
root: vite_internal_options.root,
|
|
46
|
+
outDir: vite_internal_options.outDir,
|
|
47
|
+
target: vite_internal_options.target
|
|
48
|
+
})
|
|
49
|
+
];
|
|
50
|
+
for await (const assets of assetSources)(0, external_merge_vite_output_assets_js_namespaceObject.mergeViteOutputAssets)(bundle, assets.map((asset)=>[
|
|
51
|
+
asset.fileName,
|
|
52
|
+
asset
|
|
53
|
+
]), {
|
|
54
|
+
target: vite_internal_options.target
|
|
55
|
+
});
|
|
39
56
|
return bundle;
|
|
40
57
|
}
|
|
58
|
+
exports.loadStaticAssets = __webpack_exports__.loadStaticAssets;
|
|
59
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
60
|
+
"loadStaticAssets"
|
|
61
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
62
|
+
Object.defineProperty(exports, '__esModule', {
|
|
63
|
+
value: true
|
|
64
|
+
});
|
|
65
|
+
|
|
41
66
|
//# sourceMappingURL=load_static_assets.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { load_public_dir } from "./load_public_dir.mjs";
|
|
3
|
+
import { load_static_entries } from "./load_static_entries.mjs";
|
|
4
|
+
import { mergeViteOutputAssets } from "./merge_vite_output_assets.mjs";
|
|
5
|
+
async function loadStaticAssets(vite_internal_options) {
|
|
6
|
+
const bundle = {};
|
|
7
|
+
const assetSources = [
|
|
8
|
+
vite_internal_options.publicDir ? load_public_dir({
|
|
9
|
+
outDir: vite_internal_options.outDir,
|
|
10
|
+
publicDir: vite_internal_options.publicDir,
|
|
11
|
+
target: vite_internal_options.target
|
|
12
|
+
}) : [],
|
|
13
|
+
load_static_entries({
|
|
14
|
+
root: vite_internal_options.root,
|
|
15
|
+
outDir: vite_internal_options.outDir,
|
|
16
|
+
target: vite_internal_options.target
|
|
17
|
+
})
|
|
18
|
+
];
|
|
19
|
+
for await (const assets of assetSources)mergeViteOutputAssets(bundle, assets.map((asset)=>[
|
|
20
|
+
asset.fileName,
|
|
21
|
+
asset
|
|
22
|
+
]), {
|
|
23
|
+
target: vite_internal_options.target
|
|
24
|
+
});
|
|
25
|
+
return bundle;
|
|
26
|
+
}
|
|
27
|
+
export { loadStaticAssets };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=load_static_assets.mjs.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ZephyrBuildTarget } from 'zephyr-agent';
|
|
2
|
+
import type { ZephyrOutputAsset } from '../types/zephyr-output.mjs';
|
|
3
|
+
interface LoadStaticEntriesOptions {
|
|
4
|
+
root: string;
|
|
5
|
+
outDir: string;
|
|
6
|
+
target?: ZephyrBuildTarget;
|
|
7
|
+
}
|
|
8
|
+
export declare function load_static_entries(props: LoadStaticEntriesOptions): Promise<ZephyrOutputAsset[]>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=load_static_entries.d.mts.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ZephyrBuildTarget } from 'zephyr-agent';
|
|
2
|
+
import type { ZephyrOutputAsset } from '../types/zephyr-output';
|
|
2
3
|
interface LoadStaticEntriesOptions {
|
|
3
4
|
root: string;
|
|
4
5
|
outDir: string;
|
|
6
|
+
target?: ZephyrBuildTarget;
|
|
5
7
|
}
|
|
6
|
-
export declare function load_static_entries(props: LoadStaticEntriesOptions): Promise<
|
|
8
|
+
export declare function load_static_entries(props: LoadStaticEntriesOptions): Promise<ZephyrOutputAsset[]>;
|
|
7
9
|
export {};
|
|
10
|
+
//# sourceMappingURL=load_static_entries.d.ts.map
|
|
@@ -1,26 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
load_static_entries: ()=>load_static_entries
|
|
32
|
+
});
|
|
33
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
34
|
+
const external_zephyr_agent_namespaceObject = require("zephyr-agent");
|
|
35
|
+
const normalize_vite_path_js_namespaceObject = require("../utils/normalize-vite-path.js");
|
|
7
36
|
async function load_static_entries(props) {
|
|
8
|
-
const root_dist_dir = (0,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
37
|
+
const root_dist_dir = (0, external_node_path_namespaceObject.resolve)(props.root, props.outDir);
|
|
38
|
+
const files = 'tap-app' === props.target ? await (0, external_zephyr_agent_namespaceObject.readDirRecursiveWithContents)(root_dist_dir, {
|
|
39
|
+
includeIgnoredPaths: true,
|
|
40
|
+
failOnError: true
|
|
41
|
+
}) : await (0, external_zephyr_agent_namespaceObject.readDirRecursiveWithContents)(root_dist_dir);
|
|
42
|
+
return files.map((file)=>{
|
|
43
|
+
const fileName = (0, external_node_path_namespaceObject.basename)(file.fullPath);
|
|
14
44
|
return {
|
|
15
|
-
fileName: (0,
|
|
45
|
+
fileName: 'tap-app' === props.target ? (0, normalize_vite_path_js_namespaceObject.normalizeFilesystemVitePath)(file.relativePath) : (0, normalize_vite_path_js_namespaceObject.normalizeVitePath)(file.relativePath),
|
|
16
46
|
name: fileName,
|
|
17
|
-
names: [
|
|
47
|
+
names: [
|
|
48
|
+
fileName
|
|
49
|
+
],
|
|
18
50
|
needsCodeReference: false,
|
|
19
51
|
source: file.content,
|
|
20
52
|
type: 'asset',
|
|
21
53
|
originalFileName: fileName,
|
|
22
|
-
originalFileNames: [
|
|
54
|
+
originalFileNames: [
|
|
55
|
+
fileName
|
|
56
|
+
]
|
|
23
57
|
};
|
|
24
58
|
});
|
|
25
59
|
}
|
|
60
|
+
exports.load_static_entries = __webpack_exports__.load_static_entries;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"load_static_entries"
|
|
63
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
64
|
+
Object.defineProperty(exports, '__esModule', {
|
|
65
|
+
value: true
|
|
66
|
+
});
|
|
67
|
+
|
|
26
68
|
//# sourceMappingURL=load_static_entries.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { basename, resolve } from "node:path";
|
|
3
|
+
import { readDirRecursiveWithContents } from "zephyr-agent";
|
|
4
|
+
import { normalizeFilesystemVitePath, normalizeVitePath } from "../utils/normalize-vite-path.mjs";
|
|
5
|
+
async function load_static_entries(props) {
|
|
6
|
+
const root_dist_dir = resolve(props.root, props.outDir);
|
|
7
|
+
const files = 'tap-app' === props.target ? await readDirRecursiveWithContents(root_dist_dir, {
|
|
8
|
+
includeIgnoredPaths: true,
|
|
9
|
+
failOnError: true
|
|
10
|
+
}) : await readDirRecursiveWithContents(root_dist_dir);
|
|
11
|
+
return files.map((file)=>{
|
|
12
|
+
const fileName = basename(file.fullPath);
|
|
13
|
+
return {
|
|
14
|
+
fileName: 'tap-app' === props.target ? normalizeFilesystemVitePath(file.relativePath) : normalizeVitePath(file.relativePath),
|
|
15
|
+
name: fileName,
|
|
16
|
+
names: [
|
|
17
|
+
fileName
|
|
18
|
+
],
|
|
19
|
+
needsCodeReference: false,
|
|
20
|
+
source: file.content,
|
|
21
|
+
type: 'asset',
|
|
22
|
+
originalFileName: fileName,
|
|
23
|
+
originalFileNames: [
|
|
24
|
+
fileName
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { load_static_entries };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=load_static_entries.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ZephyrBuildTarget } from 'zephyr-agent';
|
|
2
|
+
import type { ZephyrOutput, ZephyrOutputBundle } from '../types/zephyr-output.mjs';
|
|
3
|
+
export interface MergeViteOutputAssetsOptions {
|
|
4
|
+
/** TAP paths are protocol values and must already use their published spelling. */
|
|
5
|
+
target?: ZephyrBuildTarget;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Merge Vite output using Vite's historical last-writer-wins behavior for conventional
|
|
9
|
+
* builds. TAP paths are immutable descriptor inputs, so a conflicting later artifact must
|
|
10
|
+
* instead fail publication.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeViteOutputAssets(bundle: ZephyrOutputBundle, assets: Iterable<readonly [string, ZephyrOutput]>, { target }?: MergeViteOutputAssetsOptions): void;
|
|
13
|
+
//# sourceMappingURL=merge_vite_output_assets.d.mts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ZephyrBuildTarget } from 'zephyr-agent';
|
|
2
|
+
import type { ZephyrOutput, ZephyrOutputBundle } from '../types/zephyr-output';
|
|
3
|
+
export interface MergeViteOutputAssetsOptions {
|
|
4
|
+
/** TAP paths are protocol values and must already use their published spelling. */
|
|
5
|
+
target?: ZephyrBuildTarget;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Merge Vite output using Vite's historical last-writer-wins behavior for conventional
|
|
9
|
+
* builds. TAP paths are immutable descriptor inputs, so a conflicting later artifact must
|
|
10
|
+
* instead fail publication.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeViteOutputAssets(bundle: ZephyrOutputBundle, assets: Iterable<readonly [string, ZephyrOutput]>, { target }?: MergeViteOutputAssetsOptions): void;
|
|
13
|
+
//# sourceMappingURL=merge_vite_output_assets.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
mergeViteOutputAssets: ()=>mergeViteOutputAssets
|
|
32
|
+
});
|
|
33
|
+
const external_zephyr_agent_namespaceObject = require("zephyr-agent");
|
|
34
|
+
const normalize_vite_path_js_namespaceObject = require("../utils/normalize-vite-path.js");
|
|
35
|
+
function outputBytes(asset) {
|
|
36
|
+
if ('chunk' === asset.type) return Buffer.from(asset.code, 'utf8');
|
|
37
|
+
return 'string' == typeof asset.source ? Buffer.from(asset.source, 'utf8') : Buffer.from(asset.source);
|
|
38
|
+
}
|
|
39
|
+
function hasSameBytes(left, right) {
|
|
40
|
+
return outputBytes(left).equals(outputBytes(right));
|
|
41
|
+
}
|
|
42
|
+
function mergeViteOutputAssets(bundle, assets, { target } = {}) {
|
|
43
|
+
for (const [assetPath, asset] of assets){
|
|
44
|
+
const normalizedPath = (0, normalize_vite_path_js_namespaceObject.normalizeVitePath)(assetPath);
|
|
45
|
+
if ('tap-app' === target && assetPath !== normalizedPath) throw new external_zephyr_agent_namespaceObject.ZephyrError(external_zephyr_agent_namespaceObject.ZeErrors.ERR_DEPLOY_LOCAL_BUILD, {
|
|
46
|
+
message: `Vite TAP artifact path must use its canonical snapshot spelling: ${JSON.stringify(assetPath)} (expected ${JSON.stringify(normalizedPath)}).`
|
|
47
|
+
});
|
|
48
|
+
if ('tap-app' === target) {
|
|
49
|
+
const existing = bundle[normalizedPath];
|
|
50
|
+
if (existing) {
|
|
51
|
+
if (!hasSameBytes(existing, asset)) throw new external_zephyr_agent_namespaceObject.ZephyrError(external_zephyr_agent_namespaceObject.ZeErrors.ERR_DEPLOY_LOCAL_BUILD, {
|
|
52
|
+
message: `Vite emitted conflicting assets for "${normalizedPath}".`
|
|
53
|
+
});
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
bundle[normalizedPath] = asset;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.mergeViteOutputAssets = __webpack_exports__.mergeViteOutputAssets;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"mergeViteOutputAssets"
|
|
63
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
64
|
+
Object.defineProperty(exports, '__esModule', {
|
|
65
|
+
value: true
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=merge_vite_output_assets.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { ZeErrors, ZephyrError } from "zephyr-agent";
|
|
3
|
+
import { normalizeVitePath } from "../utils/normalize-vite-path.mjs";
|
|
4
|
+
function outputBytes(asset) {
|
|
5
|
+
if ('chunk' === asset.type) return Buffer.from(asset.code, 'utf8');
|
|
6
|
+
return 'string' == typeof asset.source ? Buffer.from(asset.source, 'utf8') : Buffer.from(asset.source);
|
|
7
|
+
}
|
|
8
|
+
function hasSameBytes(left, right) {
|
|
9
|
+
return outputBytes(left).equals(outputBytes(right));
|
|
10
|
+
}
|
|
11
|
+
function mergeViteOutputAssets(bundle, assets, { target } = {}) {
|
|
12
|
+
for (const [assetPath, asset] of assets){
|
|
13
|
+
const normalizedPath = normalizeVitePath(assetPath);
|
|
14
|
+
if ('tap-app' === target && assetPath !== normalizedPath) throw new ZephyrError(ZeErrors.ERR_DEPLOY_LOCAL_BUILD, {
|
|
15
|
+
message: `Vite TAP artifact path must use its canonical snapshot spelling: ${JSON.stringify(assetPath)} (expected ${JSON.stringify(normalizedPath)}).`
|
|
16
|
+
});
|
|
17
|
+
if ('tap-app' === target) {
|
|
18
|
+
const existing = bundle[normalizedPath];
|
|
19
|
+
if (existing) {
|
|
20
|
+
if (!hasSameBytes(existing, asset)) throw new ZephyrError(ZeErrors.ERR_DEPLOY_LOCAL_BUILD, {
|
|
21
|
+
message: `Vite emitted conflicting assets for "${normalizedPath}".`
|
|
22
|
+
});
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
bundle[normalizedPath] = asset;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export { mergeViteOutputAssets };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=merge_vite_output_assets.mjs.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ModuleFederationRemoteConfig {
|
|
2
|
+
name: string;
|
|
3
|
+
entry: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ModuleFederationManifestOptions {
|
|
8
|
+
fileName?: string;
|
|
9
|
+
filePath?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ModuleFederationLibraryOptions {
|
|
12
|
+
type?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface ModuleFederationOptions {
|
|
16
|
+
name?: string;
|
|
17
|
+
filename?: string;
|
|
18
|
+
library?: string | string[] | ModuleFederationLibraryOptions;
|
|
19
|
+
remotes?: Record<string, string | ModuleFederationRemoteConfig>;
|
|
20
|
+
exposes?: Record<string, string>;
|
|
21
|
+
runtimePlugins?: string[];
|
|
22
|
+
shared?: Record<string, unknown>;
|
|
23
|
+
manifest?: boolean | ModuleFederationManifestOptions;
|
|
24
|
+
dts?: boolean | Record<string, unknown>;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare const ZEPHYR_MF_RUNTIME_PLUGIN_ID = "virtual:zephyr-mf-runtime-plugin";
|
|
28
|
+
export declare const RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID = "\0virtual:zephyr-mf-runtime-plugin";
|
|
29
|
+
export declare function getRuntimePluginPath(): string;
|
|
30
|
+
export declare function ensureRuntimePlugin(mfConfig: ModuleFederationOptions): ModuleFederationOptions;
|
|
31
|
+
//# sourceMappingURL=ensure_runtime_plugin.d.mts.map
|
|
@@ -4,13 +4,23 @@ export interface ModuleFederationRemoteConfig {
|
|
|
4
4
|
type?: string;
|
|
5
5
|
[key: string]: unknown;
|
|
6
6
|
}
|
|
7
|
+
export interface ModuleFederationManifestOptions {
|
|
8
|
+
fileName?: string;
|
|
9
|
+
filePath?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ModuleFederationLibraryOptions {
|
|
12
|
+
type?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
7
15
|
export interface ModuleFederationOptions {
|
|
8
16
|
name?: string;
|
|
9
17
|
filename?: string;
|
|
18
|
+
library?: string | string[] | ModuleFederationLibraryOptions;
|
|
10
19
|
remotes?: Record<string, string | ModuleFederationRemoteConfig>;
|
|
11
20
|
exposes?: Record<string, string>;
|
|
12
21
|
runtimePlugins?: string[];
|
|
13
22
|
shared?: Record<string, unknown>;
|
|
23
|
+
manifest?: boolean | ModuleFederationManifestOptions;
|
|
14
24
|
dts?: boolean | Record<string, unknown>;
|
|
15
25
|
[key: string]: unknown;
|
|
16
26
|
}
|
|
@@ -18,3 +28,4 @@ export declare const ZEPHYR_MF_RUNTIME_PLUGIN_ID = "virtual:zephyr-mf-runtime-pl
|
|
|
18
28
|
export declare const RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID = "\0virtual:zephyr-mf-runtime-plugin";
|
|
19
29
|
export declare function getRuntimePluginPath(): string;
|
|
20
30
|
export declare function ensureRuntimePlugin(mfConfig: ModuleFederationOptions): ModuleFederationOptions;
|
|
31
|
+
//# sourceMappingURL=ensure_runtime_plugin.d.ts.map
|