vite-plugin-zephyr 0.0.25 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/lib/internal/extract/extract_vite_assets_map.d.ts +3 -0
  4. package/dist/lib/internal/extract/extract_vite_assets_map.js +31 -0
  5. package/dist/lib/internal/extract/extract_vite_assets_map.js.map +1 -0
  6. package/dist/lib/internal/extract/load_public_dir.js +38 -0
  7. package/dist/lib/internal/extract/load_public_dir.js.map +1 -0
  8. package/dist/lib/internal/extract/load_static_assets.d.ts +3 -0
  9. package/dist/lib/internal/extract/load_static_assets.js +26 -0
  10. package/dist/lib/internal/extract/load_static_assets.js.map +1 -0
  11. package/dist/lib/internal/extract/load_static_entries.js +35 -0
  12. package/dist/lib/internal/extract/load_static_entries.js.map +1 -0
  13. package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.d.ts +2 -0
  14. package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.js +18 -0
  15. package/dist/lib/internal/mf-vite-etl/extract-mf-vite-remotes.js.map +1 -0
  16. package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.d.ts +2 -0
  17. package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.js +27 -0
  18. package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.js.map +1 -0
  19. package/dist/lib/{remote_map_parser.d.ts → internal/mf-vite-etl/remote_map_parser.d.ts} +2 -2
  20. package/dist/lib/{remote_map_parser.js → internal/mf-vite-etl/remote_map_parser.js} +12 -10
  21. package/dist/lib/internal/mf-vite-etl/remote_map_parser.js.map +1 -0
  22. package/dist/lib/{zephyr-internal-options.d.ts → internal/types/zephyr-internal-options.d.ts} +3 -1
  23. package/dist/lib/internal/types/zephyr-internal-options.js.map +1 -0
  24. package/dist/lib/vite-plugin-zephyr-partial.d.ts +1 -1
  25. package/dist/lib/vite-plugin-zephyr-partial.js +29 -145
  26. package/dist/lib/vite-plugin-zephyr-partial.js.map +1 -1
  27. package/dist/lib/vite-plugin-zephyr.d.ts +2 -2
  28. package/dist/lib/vite-plugin-zephyr.js +37 -158
  29. package/dist/lib/vite-plugin-zephyr.js.map +1 -1
  30. package/dist/package.json +2 -3
  31. package/package.json +2 -3
  32. package/dist/lib/load_extra_files_from_dist.d.ts +0 -8
  33. package/dist/lib/load_extra_files_from_dist.js +0 -40
  34. package/dist/lib/load_extra_files_from_dist.js.map +0 -1
  35. package/dist/lib/load_public_dir.js +0 -41
  36. package/dist/lib/load_public_dir.js.map +0 -1
  37. package/dist/lib/load_static_entries.js +0 -38
  38. package/dist/lib/load_static_entries.js.map +0 -1
  39. package/dist/lib/remote_map_parser.js.map +0 -1
  40. package/dist/lib/resolve_remote_dependency.d.ts +0 -10
  41. package/dist/lib/resolve_remote_dependency.js +0 -33
  42. package/dist/lib/resolve_remote_dependency.js.map +0 -1
  43. package/dist/lib/types/zephyr-internal-options.d.ts +0 -11
  44. package/dist/lib/types/zephyr-internal-options.js.map +0 -1
  45. package/dist/lib/zephyr-internal-options.js +0 -3
  46. package/dist/lib/zephyr-internal-options.js.map +0 -1
  47. /package/dist/lib/{load_public_dir.d.ts → internal/extract/load_public_dir.d.ts} +0 -0
  48. /package/dist/lib/{load_static_entries.d.ts → internal/extract/load_static_entries.d.ts} +0 -0
  49. /package/dist/lib/{types → internal/types}/zephyr-internal-options.js +0 -0
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { withZephyr } from './lib/vite-plugin-zephyr';
1
+ export { withZephyr, type ModuleFederationOptions } from './lib/vite-plugin-zephyr';
2
2
  export { withZephyrPartial } from './lib/vite-plugin-zephyr-partial';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAsD;AAA7C,gHAAA,UAAU,OAAA;AACnB,+EAAqE;AAA5D,+HAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAoF;AAA3E,gHAAA,UAAU,OAAA;AACnB,+EAAqE;AAA5D,+HAAA,iBAAiB,OAAA"}
@@ -0,0 +1,3 @@
1
+ import { ZeBuildAssetsMap, ZephyrEngine } from 'zephyr-agent';
2
+ import type { ZephyrInternalOptions } from '../types/zephyr-internal-options';
3
+ export declare function extract_vite_assets_map(zephyr_engine: ZephyrEngine, vite_internal_options: ZephyrInternalOptions): Promise<ZeBuildAssetsMap>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extract_vite_assets_map = void 0;
4
+ const zephyr_agent_1 = require("zephyr-agent");
5
+ const load_static_assets_1 = require("./load_static_assets");
6
+ async function extract_vite_assets_map(zephyr_engine, vite_internal_options) {
7
+ const application_uid = zephyr_engine.application_uid;
8
+ const assets = await (0, load_static_assets_1.loadStaticAssets)(vite_internal_options);
9
+ const partialAssetMap = await (0, zephyr_agent_1.getPartialAssetMap)(application_uid);
10
+ await (0, zephyr_agent_1.removePartialAssetMap)(application_uid);
11
+ const runtime_assets = vite_internal_options.assets;
12
+ const complete_assets = Object.assign({}, assets, ...Object.values(partialAssetMap !== null && partialAssetMap !== void 0 ? partialAssetMap : {}), runtime_assets);
13
+ return (0, zephyr_agent_1.buildAssetsMap)(complete_assets, extractBuffer, getAssetType);
14
+ }
15
+ exports.extract_vite_assets_map = extract_vite_assets_map;
16
+ function getAssetType(asset) {
17
+ return asset.type;
18
+ }
19
+ function extractBuffer(asset) {
20
+ switch (asset.type) {
21
+ case 'chunk':
22
+ return asset.code;
23
+ case 'asset':
24
+ return typeof asset.source === 'string'
25
+ ? asset.source
26
+ : new TextDecoder().decode(asset.source);
27
+ default:
28
+ return void 0;
29
+ }
30
+ }
31
+ //# sourceMappingURL=extract_vite_assets_map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract_vite_assets_map.js","sourceRoot":"","sources":["../../../../src/lib/internal/extract/extract_vite_assets_map.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,6DAAwD;AAGjD,KAAK,UAAU,uBAAuB,CAC3C,aAA2B,EAC3B,qBAA4C;IAE5C,MAAM,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,IAAA,qCAAgB,EAAC,qBAAqB,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAkB,EAAC,eAAe,CAAC,CAAC;IAClE,MAAM,IAAA,oCAAqB,EAAC,eAAe,CAAC,CAAC;IAE7C,MAAM,cAAc,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACpD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CACnC,EAAE,EACF,MAAM,EACN,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,EACvC,cAAc,CACf,CAAC;IACF,OAAO,IAAA,6BAAc,EAAC,eAAe,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC;AAjBD,0DAiBC;AAED,SAAS,YAAY,CAAC,KAAgC;IACpD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,SAAS,aAAa,CAAC,KAAgC;IACrD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB,KAAK,OAAO;YACV,OAAO,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;gBACrC,CAAC,CAAC,KAAK,CAAC,MAAM;gBACd,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C;YACE,OAAO,KAAK,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.load_public_dir = void 0;
4
+ const node_fs_1 = require("node:fs");
5
+ const node_path_1 = require("node:path");
6
+ const vite_1 = require("vite");
7
+ const node_util_1 = require("node:util");
8
+ async function load_public_dir(props) {
9
+ const { publicDir, outDir } = props;
10
+ const publicAssets = [];
11
+ const loadDir = async (srcDir, destDir) => {
12
+ for (const file of (0, node_fs_1.readdirSync)(srcDir)) {
13
+ const srcFile = (0, node_path_1.resolve)(srcDir, file);
14
+ if (srcFile === destDir) {
15
+ continue;
16
+ }
17
+ const destFile = (0, node_path_1.resolve)(destDir, file);
18
+ const stat = (0, node_fs_1.statSync)(srcFile);
19
+ if (stat.isDirectory()) {
20
+ await loadDir(srcFile, destFile);
21
+ }
22
+ else {
23
+ publicAssets.push({
24
+ fileName: (0, vite_1.normalizePath)((0, node_path_1.relative)(outDir, destFile)),
25
+ name: (0, node_path_1.basename)(file),
26
+ needsCodeReference: false,
27
+ source: await (0, node_util_1.promisify)(node_fs_1.readFile)(srcFile),
28
+ type: 'asset',
29
+ originalFileName: (0, node_path_1.basename)(file),
30
+ });
31
+ }
32
+ }
33
+ };
34
+ await loadDir(publicDir, outDir);
35
+ return publicAssets;
36
+ }
37
+ exports.load_public_dir = load_public_dir;
38
+ //# sourceMappingURL=load_public_dir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load_public_dir.js","sourceRoot":"","sources":["../../../../src/lib/internal/extract/load_public_dir.ts"],"names":[],"mappings":";;;AACA,qCAA0D;AAC1D,yCAAwD;AACxD,+BAAqC;AACrC,yCAAsC;AAO/B,KAAK,UAAU,eAAe,CACnC,KAA2B;IAE3B,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,OAAe,EAAE,EAAE;QACxD,KAAK,MAAM,IAAI,IAAI,IAAA,qBAAW,EAAC,MAAM,CAAC,EAAE,CAAC;YACvC,MAAM,OAAO,GAAG,IAAA,mBAAO,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACtC,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;gBACxB,SAAS;YACX,CAAC;YACD,MAAM,QAAQ,GAAG,IAAA,mBAAO,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACxC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,CAAC;YAC/B,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;gBACvB,MAAM,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,YAAY,CAAC,IAAI,CAAC;oBAChB,QAAQ,EAAE,IAAA,oBAAa,EAAC,IAAA,oBAAQ,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACnD,IAAI,EAAE,IAAA,oBAAQ,EAAC,IAAI,CAAC;oBACpB,kBAAkB,EAAE,KAAK;oBACzB,MAAM,EAAE,MAAM,IAAA,qBAAS,EAAC,kBAAQ,CAAC,CAAC,OAAO,CAAC;oBAC1C,IAAI,EAAE,OAAO;oBACb,gBAAgB,EAAE,IAAA,oBAAQ,EAAC,IAAI,CAAC;iBACjC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,MAAM,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,YAAY,CAAC;AACtB,CAAC;AA9BD,0CA8BC"}
@@ -0,0 +1,3 @@
1
+ import type { OutputBundle } from 'rollup';
2
+ import type { ZephyrInternalOptions } from '../types/zephyr-internal-options';
3
+ export declare function loadStaticAssets(vite_internal_options: ZephyrInternalOptions): Promise<OutputBundle>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadStaticAssets = void 0;
4
+ const load_public_dir_1 = require("./load_public_dir");
5
+ const load_static_entries_1 = require("./load_static_entries");
6
+ async function loadStaticAssets(vite_internal_options) {
7
+ const publicAssets = [];
8
+ if (vite_internal_options.publicDir) {
9
+ const _public_assets = await (0, load_public_dir_1.load_public_dir)({
10
+ outDir: vite_internal_options.outDir,
11
+ publicDir: vite_internal_options.publicDir,
12
+ });
13
+ publicAssets.push(..._public_assets);
14
+ }
15
+ const _static_assets = await (0, load_static_entries_1.load_static_entries)({
16
+ root: vite_internal_options.root,
17
+ outDir: vite_internal_options.outDir,
18
+ });
19
+ publicAssets.push(..._static_assets);
20
+ return publicAssets.reduce((acc, asset) => {
21
+ acc[asset.fileName] = asset;
22
+ return acc;
23
+ }, {});
24
+ }
25
+ exports.loadStaticAssets = loadStaticAssets;
26
+ //# sourceMappingURL=load_static_assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load_static_assets.js","sourceRoot":"","sources":["../../../../src/lib/internal/extract/load_static_assets.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AACpD,+DAA4D;AAGrD,KAAK,UAAU,gBAAgB,CACpC,qBAA4C;IAE5C,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAAI,qBAAqB,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAe,EAAC;YAC3C,MAAM,EAAE,qBAAqB,CAAC,MAAM;YACpC,SAAS,EAAE,qBAAqB,CAAC,SAAS;SAC3C,CAAC,CAAC;QACH,YAAY,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,IAAA,yCAAmB,EAAC;QAC/C,IAAI,EAAE,qBAAqB,CAAC,IAAI;QAChC,MAAM,EAAE,qBAAqB,CAAC,MAAM;KACrC,CAAC,CAAC;IACH,YAAY,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;IAErC,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACxC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAkB,CAAC,CAAC;AACzB,CAAC;AAvBD,4CAuBC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.load_static_entries = void 0;
4
+ const node_path_1 = require("node:path");
5
+ const node_fs_1 = require("node:fs");
6
+ const vite_1 = require("vite");
7
+ const node_util_1 = require("node:util");
8
+ async function load_static_entries(props) {
9
+ const { root } = props;
10
+ const publicAssets = [];
11
+ const root_dist_dir = (0, node_path_1.resolve)(root, props.outDir);
12
+ const loadDir = async (destDir) => {
13
+ for (const file of (0, node_fs_1.readdirSync)(destDir)) {
14
+ const destFile = (0, node_path_1.resolve)(destDir, file);
15
+ const stat = (0, node_fs_1.statSync)(destFile);
16
+ if (stat.isDirectory()) {
17
+ await loadDir(destFile);
18
+ continue;
19
+ }
20
+ const fileName = (0, vite_1.normalizePath)((0, node_path_1.relative)(root_dist_dir, destFile));
21
+ publicAssets.push({
22
+ fileName,
23
+ name: file,
24
+ needsCodeReference: false,
25
+ source: await (0, node_util_1.promisify)(node_fs_1.readFile)(destFile),
26
+ type: 'asset',
27
+ originalFileName: file,
28
+ });
29
+ }
30
+ };
31
+ await loadDir(root_dist_dir);
32
+ return publicAssets;
33
+ }
34
+ exports.load_static_entries = load_static_entries;
35
+ //# sourceMappingURL=load_static_entries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load_static_entries.js","sourceRoot":"","sources":["../../../../src/lib/internal/extract/load_static_entries.ts"],"names":[],"mappings":";;;AACA,yCAA8C;AAC9C,qCAA0D;AAC1D,+BAAqC;AACrC,yCAAsC;AAO/B,KAAK,UAAU,mBAAmB,CACvC,KAA+B;IAE/B,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAElD,MAAM,OAAO,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;QACxC,KAAK,MAAM,IAAI,IAAI,IAAA,qBAAW,EAAC,OAAO,CAAC,EAAE,CAAC;YACxC,MAAM,QAAQ,GAAG,IAAA,mBAAO,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACxC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,QAAQ,CAAC,CAAC;YAChC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;gBACvB,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACxB,SAAS;YACX,CAAC;YACD,MAAM,QAAQ,GAAG,IAAA,oBAAa,EAAC,IAAA,oBAAQ,EAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;YAClE,YAAY,CAAC,IAAI,CAAC;gBAChB,QAAQ;gBACR,IAAI,EAAE,IAAI;gBACV,kBAAkB,EAAE,KAAK;gBACzB,MAAM,EAAE,MAAM,IAAA,qBAAS,EAAC,kBAAQ,CAAC,CAAC,QAAQ,CAAC;gBAC3C,IAAI,EAAE,OAAO;gBACb,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IACF,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;IAC7B,OAAO,YAAY,CAAC;AACtB,CAAC;AA7BD,kDA6BC"}
@@ -0,0 +1,2 @@
1
+ import { ZeDependencyPair } from 'zephyr-agent';
2
+ export declare function extract_remotes_dependencies(code: string, id: string): ZeDependencyPair[] | undefined;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extract_remotes_dependencies = void 0;
4
+ const remote_map_parser_1 = require("./remote_map_parser");
5
+ function extract_remotes_dependencies(code, id) {
6
+ const dependencyPairs = [];
7
+ const extractedRemotes = (0, remote_map_parser_1.parseRemoteMap)(code, id);
8
+ if (extractedRemotes === undefined)
9
+ return;
10
+ const { remotesMap } = extractedRemotes;
11
+ for (const remote of remotesMap) {
12
+ const { name, entry: version } = remote;
13
+ dependencyPairs.push({ name, version });
14
+ }
15
+ return dependencyPairs;
16
+ }
17
+ exports.extract_remotes_dependencies = extract_remotes_dependencies;
18
+ //# sourceMappingURL=extract-mf-vite-remotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-mf-vite-remotes.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/extract-mf-vite-remotes.ts"],"names":[],"mappings":";;;AACA,2DAAqD;AAErD,SAAgB,4BAA4B,CAC1C,IAAY,EACZ,EAAU;IAEV,MAAM,eAAe,GAAuB,EAAE,CAAC;IAC/C,MAAM,gBAAgB,GAAG,IAAA,kCAAc,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,gBAAgB,KAAK,SAAS;QAAE,OAAO;IAE3C,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC;IAExC,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QACxC,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAhBD,oEAgBC"}
@@ -0,0 +1,2 @@
1
+ import { ZeResolvedDependency } from 'zephyr-agent';
2
+ export declare function load_resolved_remotes(resolved_remotes: ZeResolvedDependency[], code: string, id: string): string | undefined;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.load_resolved_remotes = void 0;
4
+ const remote_map_parser_1 = require("./remote_map_parser");
5
+ function load_resolved_remotes(resolved_remotes, code, id) {
6
+ const extractedRemotes = (0, remote_map_parser_1.parseRemoteMap)(code, id);
7
+ if (extractedRemotes === undefined)
8
+ return;
9
+ const remotes = [];
10
+ const { remotesMap, startIndex, endIndex } = extractedRemotes;
11
+ for (const remote of remotesMap) {
12
+ const { name, entry, type } = remote;
13
+ const remoteDetails = resolved_remotes.find((r) => r.name === name && r.version === entry);
14
+ if (!remoteDetails)
15
+ continue;
16
+ const updatedUrl = (0, remote_map_parser_1.replaceProtocolAndHost)(entry, remoteDetails.remote_entry_url);
17
+ remotes.push({
18
+ name,
19
+ type,
20
+ entryGlobalName: name,
21
+ entry: updatedUrl,
22
+ });
23
+ }
24
+ return code.slice(0, startIndex) + JSON.stringify(remotes) + code.slice(endIndex);
25
+ }
26
+ exports.load_resolved_remotes = load_resolved_remotes;
27
+ //# sourceMappingURL=load_resolved_remotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load_resolved_remotes.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/load_resolved_remotes.ts"],"names":[],"mappings":";;;AACA,2DAI6B;AAE7B,SAAgB,qBAAqB,CACnC,gBAAwC,EACxC,IAAY,EACZ,EAAU;IAEV,MAAM,gBAAgB,GAAG,IAAA,kCAAc,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,gBAAgB,KAAK,SAAS;QAAE,OAAO;IAE3C,MAAM,OAAO,GAAsC,EAAE,CAAC;IACtD,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;IAC9D,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QACrC,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAI,CACzC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,OAAO,KAAK,KAAK,CAC9C,CAAC;QACF,IAAI,CAAC,aAAa;YAAE,SAAS;QAE7B,MAAM,UAAU,GAAG,IAAA,0CAAsB,EAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC;YACX,IAAI;YACJ,IAAI;YACJ,eAAe,EAAE,IAAI;YACrB,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACpF,CAAC;AA1BD,sDA0BC"}
@@ -13,8 +13,8 @@ export interface RemoteMapExtraction {
13
13
  * Parses the provided code to extract the remotes object.
14
14
  *
15
15
  * @param code - The code containing the remotes object declaration.
16
- * @returns An object containing the remotes object and the start and end indices of the remotes object declaration in the code, or
17
- * undefined if parsing fails.
16
+ * @returns An object containing the remotes object and the start and end indices of the
17
+ * remotes object declaration in the code, or undefined if parsing fails.
18
18
  */
19
19
  export declare function parseRemoteMap(code: string, id: string): RemoteMapExtraction | undefined;
20
20
  export declare function replaceProtocolAndHost(originalUrl: string, newProtocolAndHost: string): string;
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.replaceProtocolAndHost = exports.parseRemoteMap = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const json5_1 = tslib_1.__importDefault(require("json5"));
6
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
7
6
  const acorn_1 = tslib_1.__importDefault(require("acorn"));
8
7
  const acorn_walk_1 = tslib_1.__importDefault(require("acorn-walk"));
8
+ const zephyr_agent_1 = require("zephyr-agent");
9
9
  /**
10
10
  * Parses the provided code to extract the remotes object.
11
11
  *
12
12
  * @param code - The code containing the remotes object declaration.
13
- * @returns An object containing the remotes object and the start and end indices of the remotes object declaration in the code, or
14
- * undefined if parsing fails.
13
+ * @returns An object containing the remotes object and the start and end indices of the
14
+ * remotes object declaration in the code, or undefined if parsing fails.
15
15
  */
16
16
  function parseRemoteMap(code, id) {
17
17
  if (!id.includes('localSharedImportMap')) {
@@ -30,7 +30,9 @@ function parseRemoteMap(code, id) {
30
30
  function findUsedRemotes(node) {
31
31
  if (node.type === 'VariableDeclaration' && node.kind === 'const') {
32
32
  for (const declarator of node.declarations) {
33
- if (declarator.id.type === 'Identifier' && declarator.id.name === 'usedRemotes' && declarator.init) {
33
+ if (declarator.id.type === 'Identifier' &&
34
+ declarator.id.name === 'usedRemotes' &&
35
+ declarator.init) {
34
36
  // Found the 'usedRemotes' variable
35
37
  arrayNode = declarator.init;
36
38
  break;
@@ -42,11 +44,11 @@ function parseRemoteMap(code, id) {
42
44
  VariableDeclaration: findUsedRemotes,
43
45
  });
44
46
  const endTime = Date.now();
45
- (0, zephyr_edge_contract_1.ze_log)(`parseRemoteMap took ${endTime - startTime}ms`);
47
+ (0, zephyr_agent_1.ze_log)(`parseRemoteMap took ${endTime - startTime}ms`);
46
48
  if (!arrayNode) {
47
49
  return;
48
50
  }
49
- (0, zephyr_edge_contract_1.ze_log)('vite.arrayNode found: ', arrayNode);
51
+ (0, zephyr_agent_1.ze_log)('vite.arrayNode found: ', arrayNode);
50
52
  // Get start and end indices
51
53
  const startIndex = arrayNode.start;
52
54
  const endIndex = arrayNode.end;
@@ -56,7 +58,7 @@ function parseRemoteMap(code, id) {
56
58
  try {
57
59
  // Use a faster JSON parser if possible
58
60
  remotesArray = JSON.parse(arrayText);
59
- (0, zephyr_edge_contract_1.ze_log)('vite.parseRemoteMap.remotesArray: ', remotesArray);
61
+ (0, zephyr_agent_1.ze_log)('vite.parseRemoteMap.remotesArray: ', remotesArray);
60
62
  }
61
63
  catch (error) {
62
64
  // Fallback to json5 only if necessary
@@ -75,15 +77,15 @@ function parseRemoteMap(code, id) {
75
77
  }
76
78
  exports.parseRemoteMap = parseRemoteMap;
77
79
  function replaceProtocolAndHost(originalUrl, newProtocolAndHost) {
78
- (0, zephyr_edge_contract_1.ze_log)('vite.replaceProtocalAndHost.originalUrl: ', originalUrl);
79
- (0, zephyr_edge_contract_1.ze_log)('vite.replaceProtocalAndHost: ', newProtocolAndHost);
80
+ (0, zephyr_agent_1.ze_log)('vite.replaceProtocalAndHost.originalUrl: ', originalUrl);
81
+ (0, zephyr_agent_1.ze_log)('vite.replaceProtocalAndHost: ', newProtocolAndHost);
80
82
  const url = new URL(originalUrl);
81
83
  const newUrl = new URL(newProtocolAndHost);
82
84
  // Replace protocol and hostname
83
85
  url.protocol = newUrl.protocol;
84
86
  url.hostname = newUrl.hostname;
85
87
  url.port = '';
86
- (0, zephyr_edge_contract_1.ze_log)('vite.transformedUrl: ', url.toString());
88
+ (0, zephyr_agent_1.ze_log)('vite.transformedUrl: ', url.toString());
87
89
  return url.toString();
88
90
  }
89
91
  exports.replaceProtocolAndHost = replaceProtocolAndHost;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote_map_parser.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/remote_map_parser.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,0DAA0B;AAC1B,oEAA8B;AAC9B,+CAAsC;AAetC;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,IAAY,EACZ,EAAU;IAEV,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,SAAiC,CAAC;IAEtC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,6BAA6B;IAC7B,MAAM,GAAG,GAAG,eAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QAC5B,WAAW,EAAE,QAAQ;QACrB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,IAAI,EAAE,kCAAkC;QACnD,MAAM,EAAE,IAAI,EAAE,gCAAgC;KAC/C,CAAC,CAAC;IAEH,oDAAoD;IACpD,SAAS,eAAe,CAAC,IAA+B;QACtD,IAAI,IAAI,CA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AC;QACxC,CAAC;QAAC,OAAO,UAAU,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU,EAAE,YAAY;QACxB,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC;AA1ED,wCA0EC;AAED,SAAgB,sBAAsB,CACpC,WAAmB,EACnB,kBAA0B;IAE1B,IAAA,qBAAM,EAAC,2CAA2C,EAAE,WAAW,CAAC,CAAC;IACjE,IAAA,qBAAM,EAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAAC;IAC5D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAE3C,gCAAgC;IAChC,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IAEd,IAAA,qBAAM,EAAC,uBAAuB,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAjBD,wDAiBC"}
@@ -1,7 +1,9 @@
1
+ import { OutputBundle } from 'rollup';
1
2
  export interface ZephyrInternalOptions {
2
3
  root: string;
3
- configFile: string;
4
4
  outDir: string;
5
+ configFile?: string;
5
6
  publicDir?: string;
6
7
  dir?: string;
8
+ assets?: OutputBundle;
7
9
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zephyr-internal-options.js","sourceRoot":"","sources":["../../../../src/lib/internal/types/zephyr-internal-options.ts"],"names":[],"mappings":""}
@@ -5,6 +5,6 @@ export declare function withZephyrPartial(): {
5
5
  apply: string;
6
6
  enforce: string;
7
7
  configResolved: (config: ResolvedConfig) => Promise<void>;
8
- writeBundle: (options: NormalizedOutputOptions, _bundle: OutputBundle) => Promise<void>;
8
+ writeBundle: (options: NormalizedOutputOptions, bundle: OutputBundle) => Promise<void>;
9
9
  closeBundle: () => Promise<void>;
10
10
  };
@@ -1,164 +1,48 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withZephyrPartial = void 0;
4
- const tslib_1 = require("tslib");
5
- const isCI = tslib_1.__importStar(require("is-ci"));
6
4
  const zephyr_agent_1 = require("zephyr-agent");
7
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
8
- const load_extra_files_from_dist_1 = require("./load_extra_files_from_dist");
9
- const load_public_dir_1 = require("./load_public_dir");
5
+ const extract_vite_assets_map_1 = require("./internal/extract/extract_vite_assets_map");
10
6
  function withZephyrPartial() {
11
- let bundle = {};
12
- const vite_internal_options = {};
7
+ const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
8
+ let resolve_vite_internal_options;
9
+ const vite_internal_options_defer = new Promise((resolve) => {
10
+ resolve_vite_internal_options = resolve;
11
+ });
13
12
  return {
14
13
  name: 'with-zephyr-partial',
15
14
  apply: 'build',
16
15
  enforce: 'post',
17
- configResolved: (config) => tslib_1.__awaiter(this, void 0, void 0, function* () {
18
- Object.assign(vite_internal_options, {
16
+ configResolved: async (config) => {
17
+ zephyr_defer_create(config.root);
18
+ resolve_vite_internal_options({
19
19
  root: config.root,
20
20
  configFile: config.configFile,
21
21
  outDir: config.build.outDir,
22
22
  publicDir: config.publicDir,
23
23
  });
24
- }),
25
- writeBundle: (options, _bundle) => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ },
25
+ writeBundle: async (options, bundle) => {
26
+ const vite_internal_options = await vite_internal_options_defer;
26
27
  vite_internal_options.dir = options.dir;
27
- bundle = _bundle;
28
- }),
29
- closeBundle: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
30
- const publicAssets = [];
31
- if (vite_internal_options.publicDir) {
32
- const _public_assets = yield (0, load_public_dir_1.load_public_dir)({
33
- outDir: vite_internal_options.outDir,
34
- publicDir: vite_internal_options.publicDir,
35
- });
36
- publicAssets.push(..._public_assets);
37
- }
38
- const _extra_assets = yield (0, load_extra_files_from_dist_1.load_extra_files_from_dist)({
39
- root: vite_internal_options.root,
40
- outDir: vite_internal_options.outDir,
41
- bundle,
42
- });
43
- publicAssets.push(..._extra_assets);
44
- const assets = Object.assign({}, bundle, ...publicAssets.map((asset) => ({ [asset.fileName]: asset })));
45
- yield _zephyr_partial({ assets, vite_internal_options });
46
- }),
28
+ vite_internal_options.assets = bundle;
29
+ },
30
+ closeBundle: async () => {
31
+ var _a;
32
+ const vite_internal_options = await vite_internal_options_defer;
33
+ const zephyr_engine = await zephyr_engine_defer;
34
+ const application_uid = zephyr_engine.application_uid;
35
+ // context import ^
36
+ const assetsMap = await (0, extract_vite_assets_map_1.extract_vite_assets_map)(zephyr_engine, vite_internal_options);
37
+ await (0, zephyr_agent_1.savePartialAssetMap)(application_uid, (_a = vite_internal_options.configFile) !== null && _a !== void 0 ? _a : 'partial', assetsMap);
38
+ // todo: initially partial build doesn't have deploy, but code below could enable it if needed
39
+ // await zephyr_engine.upload_assets({
40
+ // assetsMap,
41
+ // // todo: this should be updated if we have remotes
42
+ // buildStats: await zeBuildDashData(zephyr_engine),
43
+ // });
44
+ },
47
45
  };
48
46
  }
49
47
  exports.withZephyrPartial = withZephyrPartial;
50
- function _zephyr_partial(options) {
51
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
- var _a;
53
- const { assets, vite_internal_options } = options;
54
- const path_to_execution_dir = vite_internal_options.root;
55
- (0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
56
- const packageJson = yield (0, zephyr_agent_1.getPackageJson)(path_to_execution_dir);
57
- (0, zephyr_edge_contract_1.ze_log)('Loaded Package JSON', packageJson);
58
- if (!packageJson)
59
- return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
60
- const gitInfo = yield (0, zephyr_agent_1.getGitInfo)();
61
- (0, zephyr_edge_contract_1.ze_log)('Loaded Git Info', gitInfo);
62
- if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
63
- return (0, zephyr_edge_contract_1.ze_error)('ERR_NO_GIT_INFO', 'Can you confirm the current directory has initialized as a git repository?');
64
- if (!(packageJson === null || packageJson === void 0 ? void 0 : packageJson.name))
65
- return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION', 'package.json must have a name and version.');
66
- const application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
67
- org: gitInfo.app.org,
68
- project: gitInfo.app.project,
69
- name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
70
- });
71
- (0, zephyr_edge_contract_1.ze_log)('Going to check auth token or get it...');
72
- yield (0, zephyr_agent_1.checkAuth)();
73
- (0, zephyr_edge_contract_1.ze_log)('Got auth token, going to get application configuration and build id...');
74
- const [appConfig, buildId, hash_set] = yield Promise.all([
75
- (0, zephyr_agent_1.getApplicationConfiguration)({ application_uid }),
76
- (0, zephyr_agent_1.getBuildId)(application_uid),
77
- (0, zephyr_agent_1.get_hash_list)(application_uid),
78
- ]);
79
- const { username, email, EDGE_URL } = appConfig;
80
- (0, zephyr_edge_contract_1.ze_log)('Got application configuration', { username, email, EDGE_URL });
81
- if (!buildId)
82
- return (0, zephyr_edge_contract_1.ze_error)('ERR_GET_BUILD_ID');
83
- const pluginOptions = {
84
- pluginName: 'rollup-plugin-zephyr',
85
- application_uid,
86
- buildEnv: 'local',
87
- username,
88
- app: {
89
- name: packageJson.name,
90
- version: packageJson.version,
91
- org: gitInfo.app.org,
92
- project: gitInfo.app.project,
93
- },
94
- git: gitInfo.git,
95
- isCI,
96
- zeConfig: {
97
- user: username,
98
- edge_url: EDGE_URL,
99
- buildId,
100
- },
101
- mfConfig: void 0,
102
- };
103
- (0, zephyr_edge_contract_1.ze_log)('\n--------\n zephyr agent started. \n ------ \n');
104
- const logEvent = (0, zephyr_agent_1.logger)(pluginOptions);
105
- logEvent({
106
- level: 'info',
107
- action: 'build:info:user',
108
- ignore: true,
109
- message: `Hi ${(0, zephyr_edge_contract_1.cyanBright)(username)}!\n${(0, zephyr_edge_contract_1.white)(application_uid)}${(0, zephyr_edge_contract_1.yellow)(`#${buildId}`)}\n`,
110
- });
111
- const zeStart = Date.now();
112
- const extractBuffer = (asset) => {
113
- switch (asset.type) {
114
- case 'chunk':
115
- return asset.code;
116
- case 'asset':
117
- return typeof asset.source === 'string' ? asset.source : new TextDecoder().decode(asset.source);
118
- default:
119
- return void 0;
120
- }
121
- };
122
- const getAssetType = (asset) => asset.type;
123
- const assetsMap = Object.keys(assets).reduce((memo, filepath) => {
124
- const asset = assets[filepath];
125
- const buffer = extractBuffer(asset);
126
- if (!buffer && buffer !== '') {
127
- logEvent({
128
- action: 'ze:build:assets:unknown-asset-type',
129
- level: 'error',
130
- message: `unknown asset type: ${getAssetType(asset)}`,
131
- });
132
- return memo;
133
- }
134
- const assetMap = (0, zephyr_agent_1.getZeBuildAsset)({ filepath, content: buffer });
135
- memo[assetMap.hash] = assetMap;
136
- return memo;
137
- }, {});
138
- const snapshot = (0, zephyr_agent_1.createSnapshot)({
139
- options: pluginOptions,
140
- assets: assetsMap,
141
- username,
142
- email,
143
- });
144
- yield (0, zephyr_agent_1.zeUploadSnapshot)({ pluginOptions, snapshot, appConfig }).catch((err) => (0, zephyr_edge_contract_1.ze_error)('ERR_FAILED_UPLOAD_SNAPSHOTS', 'Failed to upload snapshot.', err));
145
- const missingAssets = (0, zephyr_agent_1.get_missing_assets)({ assetsMap, hash_set });
146
- const assetsUploadSuccess = yield (0, zephyr_agent_1.zeUploadAssets)(pluginOptions, {
147
- missingAssets,
148
- assetsMap,
149
- count: Object.keys(assets).length,
150
- });
151
- if (!assetsUploadSuccess)
152
- return (0, zephyr_edge_contract_1.ze_error)('ERR_FAILED_UPLOAD_ASSETS', assetsUploadSuccess);
153
- if (missingAssets.length) {
154
- yield (0, zephyr_agent_1.update_hash_list)(application_uid, assetsMap);
155
- }
156
- yield (0, zephyr_edge_contract_1.savePartialAssetMap)(application_uid, (_a = vite_internal_options.configFile) !== null && _a !== void 0 ? _a : 'partial', assetsMap);
157
- logEvent({
158
- level: 'info',
159
- action: 'build:deploy:done',
160
- message: `Deployment took ${(0, zephyr_edge_contract_1.yellow)(`${Date.now() - zeStart}`)}ms`,
161
- });
162
- });
163
- }
164
48
  //# sourceMappingURL=vite-plugin-zephyr-partial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin-zephyr-partial.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr-partial.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAG9B,+CAcsB;AACtB,+DAU8B;AAC9B,6EAA0E;AAC1E,uDAAoD;AAGpD,SAAgB,iBAAiB;IAC/B,IAAI,MAAM,GAAiB,EAAE,CAAC;IAC9B,MAAM,qBAAqB,GAAG,EAA2B,CAAC;IAE1D,OAAO;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,CAAO,MAAsB,EAAE,EAAE;YAC/C,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBACnC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;gBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;QACL,CAAC,CAAA;QAED,WAAW,EAAE,CAAO,OAAgC,EAAE,OAAqB,EAAE,EAAE;YAC7E,qBAAqB,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YACxC,MAAM,GAAG,OAAO,CAAC;QACnB,CAAC,CAAA;QAED,WAAW,EAAE,GAAS,EAAE;YACtB,MAAM,YAAY,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module-federation/vite';
3
- type FederationFunction = typeof federation;
3
+ export type ModuleFederationOptions = Parameters<typeof federation>[0];
4
4
  interface VitePluginZephyrOptions {
5
- mfConfig?: Parameters<FederationFunction>[0];
5
+ mfConfig?: ModuleFederationOptions;
6
6
  }
7
7
  export declare function withZephyr(_options?: VitePluginZephyrOptions): Plugin[];
8
8
  export {};
@@ -1,181 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withZephyr = void 0;
4
- const tslib_1 = require("tslib");
5
- const isCI = tslib_1.__importStar(require("is-ci"));
6
4
  const zephyr_agent_1 = require("zephyr-agent");
7
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
8
- const load_public_dir_1 = require("./load_public_dir");
9
- const load_static_entries_1 = require("./load_static_entries");
10
- const remote_map_parser_1 = require("./remote_map_parser");
11
- const resolve_remote_dependency_1 = require("./resolve_remote_dependency");
12
5
  const vite_1 = require("@module-federation/vite");
6
+ const extract_vite_assets_map_1 = require("./internal/extract/extract_vite_assets_map");
7
+ const extract_mf_vite_remotes_1 = require("./internal/mf-vite-etl/extract-mf-vite-remotes");
8
+ const load_resolved_remotes_1 = require("./internal/mf-vite-etl/load_resolved_remotes");
13
9
  function withZephyr(_options) {
14
10
  const mfConfig = _options === null || _options === void 0 ? void 0 : _options.mfConfig;
15
- return mfConfig ? (0, vite_1.federation)(mfConfig).concat([zephyrPlugin(_options)]) : [zephyrPlugin(_options)];
11
+ const plugins = [];
12
+ if (mfConfig) {
13
+ plugins.push(...(0, vite_1.federation)(mfConfig));
14
+ }
15
+ plugins.push(zephyrPlugin(_options));
16
+ return plugins;
16
17
  }
17
18
  exports.withZephyr = withZephyr;
18
19
  function zephyrPlugin(_options) {
19
- let gitInfo;
20
- let packageJson;
21
- let application_uid;
22
- const vite_internal_options = {};
20
+ const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
21
+ let resolve_vite_internal_options;
22
+ const vite_internal_options_defer = new Promise((resolve) => {
23
+ resolve_vite_internal_options = resolve;
24
+ });
23
25
  return {
24
26
  name: 'with-zephyr',
25
27
  enforce: 'post',
26
- configResolved: (config) => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ configResolved: async (config) => {
27
29
  var _a;
28
- Object.assign(vite_internal_options, {
30
+ zephyr_defer_create(config.root);
31
+ resolve_vite_internal_options({
29
32
  root: config.root,
30
33
  outDir: (_a = config.build) === null || _a === void 0 ? void 0 : _a.outDir,
31
34
  publicDir: config.publicDir,
32
35
  });
33
- (0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
34
- packageJson = yield (0, zephyr_agent_1.getPackageJson)(vite_internal_options.root);
35
- (0, zephyr_edge_contract_1.ze_log)('Loaded package.json.', packageJson);
36
- if (!packageJson)
37
- return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
38
- gitInfo = yield (0, zephyr_agent_1.getGitInfo)();
39
- (0, zephyr_edge_contract_1.ze_log)('Loaded Git Info.', gitInfo);
40
- if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
41
- return (0, zephyr_edge_contract_1.ze_error)('ERR_NO_GIT_INFO', 'Could not get git info. \n Can you confirm this directory has initialized as a git repository? ');
42
- if (!(packageJson === null || packageJson === void 0 ? void 0 : packageJson.name))
43
- return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION');
44
- application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
45
- org: gitInfo.app.org,
46
- project: gitInfo.app.project,
47
- name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
48
- });
49
- (0, zephyr_edge_contract_1.ze_log)('vite-zephyr-options', vite_internal_options);
50
- }),
51
- transform: (code, id) => tslib_1.__awaiter(this, void 0, void 0, function* () {
52
- const extractedRemotes = _options ? (0, remote_map_parser_1.parseRemoteMap)(code, id) : undefined;
53
- if (extractedRemotes === undefined) {
36
+ },
37
+ transform: async (code, id) => {
38
+ const zephyr_engine = await zephyr_engine_defer;
39
+ const dependencyPairs = (0, extract_mf_vite_remotes_1.extract_remotes_dependencies)(code, id);
40
+ if (!dependencyPairs)
54
41
  return code;
55
- }
56
- const { remotesMap, startIndex, endIndex } = extractedRemotes;
57
- const remotes = [];
58
- for (const remote of remotesMap) {
59
- const { name, entry, type } = remote;
60
- (0, zephyr_edge_contract_1.ze_log)('Remote details:', JSON.stringify(remotesMap));
61
- const remote_application_uuid = (0, zephyr_edge_contract_1.createApplicationUID)({
62
- org: gitInfo.app.org,
63
- project: gitInfo.app.project,
64
- name: name,
65
- });
66
- (0, zephyr_edge_contract_1.ze_log)('Resolving remote:', remote_application_uuid, name);
67
- const remoteDetails = yield (0, resolve_remote_dependency_1.resolve_remote_dependency)({ name: remote_application_uuid, version: name });
68
- (0, zephyr_edge_contract_1.ze_log)('Resolved remote:', remoteDetails);
69
- if (!remoteDetails) {
70
- continue;
71
- }
72
- const updatedUrl = (0, remote_map_parser_1.replaceProtocolAndHost)(entry, remoteDetails.remote_entry_url);
73
- (0, zephyr_edge_contract_1.ze_log)('Updating remote url:', entry, 'to ->', updatedUrl);
74
- remotes.push({
75
- name,
76
- type,
77
- entryGlobalName: name,
78
- entry: updatedUrl,
79
- });
80
- (0, zephyr_edge_contract_1.ze_log)('Updated remote url:', entry);
81
- }
82
- (0, zephyr_edge_contract_1.ze_log)('Writing remotesMap to bundle:', remotes);
83
- return code.slice(0, startIndex) + JSON.stringify(remotes) + code.slice(endIndex);
84
- }),
85
- closeBundle: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
86
- const publicAssets = [];
87
- if (vite_internal_options.publicDir) {
88
- const _public_assets = yield (0, load_public_dir_1.load_public_dir)({
89
- outDir: vite_internal_options.outDir,
90
- publicDir: vite_internal_options.publicDir,
91
- });
92
- publicAssets.push(..._public_assets);
93
- }
94
- const _static_assets = yield (0, load_static_entries_1.load_static_entries)({
95
- root: vite_internal_options.root,
96
- outDir: vite_internal_options.outDir,
42
+ const resolved_remotes = await zephyr_engine.resolve_remote_dependencies(dependencyPairs);
43
+ if (!resolved_remotes)
44
+ return code;
45
+ return (0, load_resolved_remotes_1.load_resolved_remotes)(resolved_remotes, code, id);
46
+ },
47
+ closeBundle: async () => {
48
+ const vite_internal_options = await vite_internal_options_defer;
49
+ const zephyr_engine = await zephyr_engine_defer;
50
+ await zephyr_engine.start_new_build();
51
+ const assetsMap = await (0, extract_vite_assets_map_1.extract_vite_assets_map)(zephyr_engine, vite_internal_options);
52
+ await zephyr_engine.upload_assets({
53
+ assetsMap,
54
+ buildStats: await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine),
97
55
  });
98
- publicAssets.push(..._static_assets);
99
- const assets = Object.assign({}, ...publicAssets.map((asset) => ({ [asset.fileName]: asset })));
100
- yield _zephyr({ assets, vite_internal_options, application_uid, packageJson, gitInfo });
101
- }),
56
+ await zephyr_engine.build_finished();
57
+ },
102
58
  };
103
59
  }
104
- function _zephyr(options) {
105
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
106
- const { assets: _assets, vite_internal_options, application_uid, packageJson, gitInfo } = options;
107
- (0, zephyr_edge_contract_1.ze_log)('Going to check auth token or get it...');
108
- yield (0, zephyr_agent_1.checkAuth)();
109
- (0, zephyr_edge_contract_1.ze_log)('Got auth token, going to get application configuration and build id...');
110
- const [appConfig, buildId, hash_set] = yield Promise.all([
111
- (0, zephyr_agent_1.getApplicationConfiguration)({ application_uid }),
112
- (0, zephyr_agent_1.getBuildId)(application_uid),
113
- (0, zephyr_agent_1.get_hash_list)(application_uid),
114
- ]);
115
- const { username, email, EDGE_URL } = appConfig;
116
- (0, zephyr_edge_contract_1.ze_log)('Got application configuration', { username, email, EDGE_URL });
117
- if (!buildId)
118
- return (0, zephyr_edge_contract_1.ze_error)('ERR_GET_BUILD_ID');
119
- const pluginOptions = {
120
- pluginName: 'vite-plugin-zephyr',
121
- application_uid,
122
- buildEnv: 'local',
123
- username,
124
- app: {
125
- name: packageJson.name,
126
- version: packageJson.version,
127
- org: gitInfo.app.org,
128
- project: gitInfo.app.project,
129
- },
130
- git: gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.git,
131
- isCI,
132
- zeConfig: {
133
- user: username,
134
- edge_url: EDGE_URL,
135
- buildId,
136
- },
137
- mfConfig: void 0,
138
- };
139
- (0, zephyr_edge_contract_1.ze_log)('\nzephyr agent started.\n');
140
- const logEvent = (0, zephyr_agent_1.logger)(pluginOptions);
141
- logEvent({
142
- level: 'info',
143
- action: 'build:info:user',
144
- ignore: true,
145
- message: `Hi ${(0, zephyr_edge_contract_1.cyanBright)(username)}!\n${(0, zephyr_edge_contract_1.white)(application_uid)}${(0, zephyr_edge_contract_1.yellow)(`#${buildId}`)}\n`,
146
- });
147
- const zeStart = Date.now();
148
- const partialAssetMap = yield (0, zephyr_edge_contract_1.getPartialAssetMap)(application_uid);
149
- yield (0, zephyr_edge_contract_1.removePartialAssetMap)(application_uid);
150
- const assets = Object.assign({}, _assets, ...Object.values(partialAssetMap !== null && partialAssetMap !== void 0 ? partialAssetMap : {}));
151
- const assetsMap = (0, zephyr_agent_1.buildAssetsMap)(assets, extractBuffer, getAssetType);
152
- const missingAssets = (0, zephyr_agent_1.get_missing_assets)({ assetsMap, hash_set });
153
- yield (0, zephyr_agent_1.upload)({
154
- pluginOptions,
155
- assets: {
156
- assetsMap,
157
- missingAssets,
158
- outputPath: vite_internal_options.outDir,
159
- count: Object.keys(assets).length,
160
- },
161
- // @ts-expect-error TODO: fix this types to get legacy and current working
162
- getDashData: zephyr_agent_1.zeGetDashData,
163
- appConfig,
164
- zeStart,
165
- });
166
- });
167
- }
168
- function extractBuffer(asset) {
169
- switch (asset.type) {
170
- case 'chunk':
171
- return asset.code;
172
- case 'asset':
173
- return typeof asset.source === 'string' ? asset.source : new TextDecoder().decode(asset.source);
174
- default:
175
- return void 0;
176
- }
177
- }
178
- function getAssetType(asset) {
179
- return asset.type;
180
- }
181
60
  //# sourceMappingURL=vite-plugin-zephyr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAG9B,+CAYsB;AACtB,+DAU8B;AAC9B,uDAAoD;AACpD,+DAA4D;AAE5D,2DAAkG;AAClG,2EAAwE;AACxE,kDAAqD;AAWrD,SAAgB,UAAU,CAAC,QAAkC;IAC3D,MAAM,QAAQ,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAC;IACpC,OAAO,QAAQ,CAAC,CAAC,CAAE,IAAA,iBAAU,EAAC,QAAQ,CAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnH,CAAC;AAHD,gCAGC;AAED,SAAS,YAAY,CAAC,QAAkC;IACtD,IAAI,OAA+C,CAAC;IACpD,IAAI,WAAuD,CAAC;IAC5D,IAAI,eAAuB,CAAC;IAE5B,MAAM,qBAAqB,GAAG,EAAkC,CAAC;IAEjE,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,MAAM;QAEf,cAAc,EAAE,CAAO,MAAsB,EAAE,EAAE;;YAC/C,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBACnC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAA,MAAM,CAAC,KAAK,0CAAE,MAAM;gBAC5B,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;YAEH,IAAA,6BAAM,EAAC,4BAA4B,CAAC,CAAC;YACrC,WAAW,GAAG,MAAM,IAAA,6BAAc,EAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAC/D,IAAA,6BAAM,EAAC,s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AC,IAAI;gBACjB,MAAM,EAAE,MAAA,MAAM,CAAC,KAAK,0CAAE,MAAM;gBAC5B,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;QACL,CAAC;QACD,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;YAC5B,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;YAEhD,MAAM,eAAe,GAAG,IAAA,sDAA4B,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/D,IAAI,CAAC,eAAe;gBAAE,OAAO,IAAI,CAAC;YAElC,MAAM,gBAAgB,GACpB,MAAM,aAAa,CAAC,2BAA2B,CAAC,eAAe,CAAC,CAAC;YACnE,IAAI,CAAC,gBAAgB;gBAAE,OAAO,IAAI,CAAC;YAEnC,OAAO,IAAA,6CAAqB,EAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3D,CAAC;QACD,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,MAAM,qBAAqB,GAAG,MAAM,2BAA2B,CAAC;YAChE,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;YAEhD,MAAM,aAAa,CAAC,eAAe,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,MAAM,IAAA,iDAAuB,EAC7C,aAAa,EACb,qBAAqB,CACtB,CAAC;YACF,MAAM,aAAa,CAAC,aAAa,CAAC;gBAChC,SAAS;gBACT,UAAU,EAAE,MAAM,IAAA,8BAAe,EAAC,aAAa,CAAC;aACjD,CAAC,CAAC;YACH,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;QACvC,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-zephyr",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,8 +16,7 @@
16
16
  "json5": "2.2.3",
17
17
  "rollup": "^4.22.5",
18
18
  "vite": "^5.4.8",
19
- "zephyr-agent": "workspace:*",
20
- "zephyr-edge-contract": "workspace:*"
19
+ "zephyr-agent": "workspace:*"
21
20
  },
22
21
  "devDependencies": {
23
22
  "@types/is-ci": "^3.0.4"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-zephyr",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,8 +13,7 @@
13
13
  "json5": "2.2.3",
14
14
  "rollup": "^4.22.5",
15
15
  "vite": "^5.4.8",
16
- "zephyr-agent": "0.0.25",
17
- "zephyr-edge-contract": "0.0.25"
16
+ "zephyr-agent": "0.0.27"
18
17
  },
19
18
  "devDependencies": {
20
19
  "@types/is-ci": "^3.0.4"
@@ -1,8 +0,0 @@
1
- import { OutputAsset, OutputBundle } from 'rollup';
2
- interface LoadExtraFilesFromDistOptions {
3
- root: string;
4
- bundle: OutputBundle;
5
- outDir: string;
6
- }
7
- export declare function load_extra_files_from_dist(props: LoadExtraFilesFromDistOptions): Promise<OutputAsset[]>;
8
- export {};
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.load_extra_files_from_dist = void 0;
4
- const tslib_1 = require("tslib");
5
- const node_path_1 = require("node:path");
6
- const node_fs_1 = require("node:fs");
7
- const vite_1 = require("vite");
8
- const node_util_1 = require("node:util");
9
- function load_extra_files_from_dist(props) {
10
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
- const { root, bundle } = props;
12
- const publicAssets = [];
13
- const root_dist_dir = (0, node_path_1.resolve)(root, props.outDir);
14
- const loadDir = (destDir) => tslib_1.__awaiter(this, void 0, void 0, function* () {
15
- for (const file of (0, node_fs_1.readdirSync)(destDir)) {
16
- const destFile = (0, node_path_1.resolve)(destDir, file);
17
- const stat = (0, node_fs_1.statSync)(destFile);
18
- if (stat.isDirectory()) {
19
- yield loadDir(destFile);
20
- continue;
21
- }
22
- const fileName = (0, vite_1.normalizePath)((0, node_path_1.relative)(root_dist_dir, destFile));
23
- if (!(fileName in bundle)) {
24
- publicAssets.push({
25
- fileName,
26
- name: file,
27
- needsCodeReference: false,
28
- source: yield (0, node_util_1.promisify)(node_fs_1.readFile)(destFile),
29
- type: 'asset',
30
- originalFileName: file,
31
- });
32
- }
33
- }
34
- });
35
- yield loadDir(root_dist_dir);
36
- return publicAssets;
37
- });
38
- }
39
- exports.load_extra_files_from_dist = load_extra_files_from_dist;
40
- //# sourceMappingURL=load_extra_files_from_dist.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_extra_files_from_dist.js","sourceRoot":"","sources":["../../src/lib/load_extra_files_from_dist.ts"],"names":[],"mappings":";;;;AACA,yCAA8C;AAC9C,qCAA0D;AAC1D,+BAAqC;AACrC,yCAAsC;AAQtC,SAAsB,0BAA0B,CAAC,KAAoC;;QACnF,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAC/B,MAAM,YAAY,GAAkB,EAAE,CAAC;QAEvC,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,CAAO,OAAe,EAAE,EAAE;YACxC,KAAK,MAAM,IAAI,IAAI,IAAA,qBAAW,EAAC,OAAO,CAAC,EAAE,CAAC;gBACxC,MAAM,QAAQ,GAAG,IAAA,mBAAO,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBACxC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,QAAQ,CAAC,CAAC;gBAChC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;oBACvB,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;oBACxB,SAAS;gBACX,CAAC;gBACD,MAAM,QAAQ,GAAG,IAAA,oBAAa,EAAC,IAAA,oBAAQ,EAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAClE,IAAI,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,CAAC;oBAC1B,YAAY,CAAC,IAAI,CAAC;wBAChB,QAAQ;wBACR,IAAI,EAAE,IAAI;wBACV,kBAAkB,EAAE,KAAK;wBACzB,MAAM,EAAE,MAAM,IAAA,qBAAS,EAAC,kBAAQ,CAAC,CAAC,QAAQ,CAAC;wBAC3C,IAAI,EAAE,OAAO;wBACb,gBAAgB,EAAE,IAAI;qBACvB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAA,CAAC;QACF,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;QAE7B,OAAO,YAAY,CAAC;IACtB,CAAC;CAAA;AA7BD,gEA6BC"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.load_public_dir = void 0;
4
- const tslib_1 = require("tslib");
5
- const node_fs_1 = require("node:fs");
6
- const node_path_1 = require("node:path");
7
- const vite_1 = require("vite");
8
- const node_util_1 = require("node:util");
9
- function load_public_dir(props) {
10
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
- const { publicDir, outDir } = props;
12
- const publicAssets = [];
13
- const loadDir = (srcDir, destDir) => tslib_1.__awaiter(this, void 0, void 0, function* () {
14
- for (const file of (0, node_fs_1.readdirSync)(srcDir)) {
15
- const srcFile = (0, node_path_1.resolve)(srcDir, file);
16
- if (srcFile === destDir) {
17
- continue;
18
- }
19
- const destFile = (0, node_path_1.resolve)(destDir, file);
20
- const stat = (0, node_fs_1.statSync)(srcFile);
21
- if (stat.isDirectory()) {
22
- yield loadDir(srcFile, destFile);
23
- }
24
- else {
25
- publicAssets.push({
26
- fileName: (0, vite_1.normalizePath)((0, node_path_1.relative)(outDir, destFile)),
27
- name: (0, node_path_1.basename)(file),
28
- needsCodeReference: false,
29
- source: yield (0, node_util_1.promisify)(node_fs_1.readFile)(srcFile),
30
- type: 'asset',
31
- originalFileName: (0, node_path_1.basename)(file),
32
- });
33
- }
34
- }
35
- });
36
- yield loadDir(publicDir, outDir);
37
- return publicAssets;
38
- });
39
- }
40
- exports.load_public_dir = load_public_dir;
41
- //# sourceMappingURL=load_public_dir.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_public_dir.js","sourceRoot":"","sources":["../../src/lib/load_public_dir.ts"],"names":[],"mappings":";;;;AACA,qCAA0D;AAC1D,yCAAwD;AACxD,+BAAqC;AACrC,yCAAsC;AAOtC,SAAsB,eAAe,CAAC,KAA2B;;QAC/D,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QACpC,MAAM,YAAY,GAAkB,EAAE,CAAC;QAEvC,MAAM,OAAO,GAAG,CAAO,MAAc,EAAE,OAAe,EAAE,EAAE;YACxD,KAAK,MAAM,IAAI,IAAI,IAAA,qBAAW,EAAC,MAAM,CAAC,EAAE,CAAC;gBACvC,MAAM,OAAO,GAAG,IAAA,mBAAO,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACtC,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;oBACxB,SAAS;gBACX,CAAC;gBACD,MAAM,QAAQ,GAAG,IAAA,mBAAO,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBACxC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,CAAC;gBAC/B,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;oBACvB,MAAM,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,YAAY,CAAC,IAAI,CAAC;wBAChB,QAAQ,EAAE,IAAA,oBAAa,EAAC,IAAA,oBAAQ,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;wBACnD,IAAI,EAAE,IAAA,oBAAQ,EAAC,IAAI,CAAC;wBACpB,kBAAkB,EAAE,KAAK;wBACzB,MAAM,EAAE,MAAM,IAAA,qBAAS,EAAC,kBAAQ,CAAC,CAAC,OAAO,CAAC;wBAC1C,IAAI,EAAE,OAAO;wBACb,gBAAgB,EAAE,IAAA,oBAAQ,EAAC,IAAI,CAAC;qBACjC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAA,CAAC;QACF,MAAM,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACjC,OAAO,YAAY,CAAC;IACtB,CAAC;CAAA;AA5BD,0CA4BC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.load_static_entries = void 0;
4
- const tslib_1 = require("tslib");
5
- const node_path_1 = require("node:path");
6
- const node_fs_1 = require("node:fs");
7
- const vite_1 = require("vite");
8
- const node_util_1 = require("node:util");
9
- function load_static_entries(props) {
10
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
- const { root } = props;
12
- const publicAssets = [];
13
- const root_dist_dir = (0, node_path_1.resolve)(root, props.outDir);
14
- const loadDir = (destDir) => tslib_1.__awaiter(this, void 0, void 0, function* () {
15
- for (const file of (0, node_fs_1.readdirSync)(destDir)) {
16
- const destFile = (0, node_path_1.resolve)(destDir, file);
17
- const stat = (0, node_fs_1.statSync)(destFile);
18
- if (stat.isDirectory()) {
19
- yield loadDir(destFile);
20
- continue;
21
- }
22
- const fileName = (0, vite_1.normalizePath)((0, node_path_1.relative)(root_dist_dir, destFile));
23
- publicAssets.push({
24
- fileName,
25
- name: file,
26
- needsCodeReference: false,
27
- source: yield (0, node_util_1.promisify)(node_fs_1.readFile)(destFile),
28
- type: 'asset',
29
- originalFileName: file,
30
- });
31
- }
32
- });
33
- yield loadDir(root_dist_dir);
34
- return publicAssets;
35
- });
36
- }
37
- exports.load_static_entries = load_static_entries;
38
- //# sourceMappingURL=load_static_entries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_static_entries.js","sourceR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,QAAQ,CAAC;IAC/B,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IAEd,IAAA,6BAAM,EAAC,uBAAuB,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAdD,wDAcC"}
@@ -1,10 +0,0 @@
1
- export declare function resolve_remote_dependency({ name, version }: {
2
- name: string;
3
- version: string;
4
- }): Promise<ResolvedDependency | void>;
5
- export interface ResolvedDependency {
6
- remote_name: string;
7
- default_url: string;
8
- application_uid: string;
9
- remote_entry_url: string;
10
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolve_remote_dependency = void 0;
4
- const tslib_1 = require("tslib");
5
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
6
- function resolve_remote_dependency(_a) {
7
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ name, version }) {
8
- const resolveDependency = new URL(`${zephyr_edge_contract_1.ze_api_gateway.resolve}/${encodeURIComponent(name)}/${encodeURIComponent(version)}`, (0, zephyr_edge_contract_1.ZE_API_ENDPOINT)());
9
- (0, zephyr_edge_contract_1.ze_log)('Resolving dependency', name, version, resolveDependency);
10
- try {
11
- const token = yield (0, zephyr_edge_contract_1.getToken)();
12
- const res = yield fetch(resolveDependency, {
13
- method: 'GET',
14
- headers: {
15
- 'Content-Type': 'application/json',
16
- Authorization: 'Bearer ' + token,
17
- Accept: 'application/json',
18
- },
19
- });
20
- if (!res.ok) {
21
- throw new Error(res.statusText);
22
- }
23
- const response = (yield res.json());
24
- (0, zephyr_edge_contract_1.ze_log)('[Vite]: resolve remote dependency response: ', response);
25
- return response === null || response === void 0 ? void 0 : response.value;
26
- }
27
- catch (err) {
28
- (0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', `Could not resolve '${name}' with version '${version}'`);
29
- }
30
- });
31
- }
32
- exports.resolve_remote_dependency = resolve_remote_dependency;
33
- //# sourceMappingURL=resolve_remote_dependency.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve_remote_dependency.js","sourceRoot":"","sources":["../../src/lib/resolve_remote_dependency.ts"],"names":[],"mappings":";;;;AAAA,+DAAmG;AAEnG,SAAsB,yBAAyB;iEAAC,EAAE,IAAI,EAAE,OAAO,EAAqC;QAClG,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,GAAG,qCAAc,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,EACtF,IAAA,sCAAe,GAAE,CAClB,CAAC;QACF,IAAA,6BAAM,EAAC,sBAAsB,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACjE,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAA,+BAAQ,GAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,iBAAiB,EAAE;gBACzC,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,SAAS,GAAG,KAAK;oBAChC,MAAM,EAAE,kBAAkB;iBAC3B;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAClC,CAAC;YACD,MAAM,QAAQ,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA8C,CAAC;YAEjF,IAAA,6BAAM,EAAC,8CAA8C,EAAE,QAAQ,CAAC,CAAC;YACjE,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC;QACzB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAA,+BAAQ,EAAC,uCAAuC,EAAE,sBAAsB,IAAI,mBAAmB,OAAO,GAAG,CAAC,CAAC;QAC7G,CAAC;IACH,CAAC;CAAA;AA3BD,8DA2BC"}
@@ -1,11 +0,0 @@
1
- export interface ZephyrInternalOptions {
2
- root: string;
3
- outDir: string;
4
- publicDir?: string;
5
- dir?: string;
6
- }
7
- export interface ZephyrPartialInternalOptions {
8
- root: string;
9
- outDir: string;
10
- publicDir?: string;
11
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"zephyr-internal-options.js","sourceRoot":"","sources":["../../../src/lib/types/zephyr-internal-options.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=zephyr-internal-options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zephyr-internal-options.js","sourceRoot":"","sources":["../../src/lib/zephyr-internal-options.ts"],"names":[],"mappings":""}