vite-plugin-zephyr 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/load_static_entries.d.ts +1 -2
- package/dist/lib/load_static_entries.js +9 -16
- package/dist/lib/load_static_entries.js.map +1 -1
- package/dist/lib/remote_map_parser.d.ts +17 -0
- package/dist/lib/remote_map_parser.js +57 -0
- package/dist/lib/remote_map_parser.js.map +1 -0
- package/dist/lib/resolve_remote_dependency.d.ts +10 -0
- package/dist/lib/resolve_remote_dependency.js +32 -0
- package/dist/lib/resolve_remote_dependency.js.map +1 -0
- package/dist/lib/types/zephyr-internal-options.d.ts +7 -0
- package/dist/lib/types/zephyr-internal-options.js +3 -0
- package/dist/lib/types/zephyr-internal-options.js.map +1 -0
- package/dist/lib/vite-plugin-zephyr-partial.js +1 -1
- package/dist/lib/vite-plugin-zephyr-partial.js.map +1 -1
- package/dist/lib/vite-plugin-zephyr.d.ts +2 -1
- package/dist/lib/vite-plugin-zephyr.js +66 -29
- package/dist/lib/vite-plugin-zephyr.js.map +1 -1
- package/dist/package.json +5 -2
- package/package.json +7 -4
@@ -1,7 +1,6 @@
|
|
1
|
-
import { OutputAsset
|
1
|
+
import { OutputAsset } from 'rollup';
|
2
2
|
interface LoadStaticEntriesOptions {
|
3
3
|
root: string;
|
4
|
-
bundle: OutputBundle;
|
5
4
|
outDir: string;
|
6
5
|
}
|
7
6
|
export declare function load_static_entries(props: LoadStaticEntriesOptions): Promise<OutputAsset[]>;
|
@@ -6,14 +6,9 @@ const node_path_1 = require("node:path");
|
|
6
6
|
const node_fs_1 = require("node:fs");
|
7
7
|
const vite_1 = require("vite");
|
8
8
|
const node_util_1 = require("node:util");
|
9
|
-
const files_to_load = {
|
10
|
-
'index.html': true,
|
11
|
-
'404.html': true,
|
12
|
-
'q-data.json': true,
|
13
|
-
};
|
14
9
|
function load_static_entries(props) {
|
15
10
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
16
|
-
const { root
|
11
|
+
const { root } = props;
|
17
12
|
const publicAssets = [];
|
18
13
|
const root_dist_dir = (0, node_path_1.resolve)(root, props.outDir);
|
19
14
|
const loadDir = (destDir) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
@@ -25,16 +20,14 @@ function load_static_entries(props) {
|
|
25
20
|
continue;
|
26
21
|
}
|
27
22
|
const fileName = (0, vite_1.normalizePath)((0, node_path_1.relative)(root_dist_dir, destFile));
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
});
|
37
|
-
}
|
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
|
+
});
|
38
31
|
}
|
39
32
|
});
|
40
33
|
yield loadDir(root_dist_dir);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"load_static_entries.js","sourceRoot":"","sources":["../../src/lib/load_static_entries.ts"],"names":[],"mappings":";;;;AACA,yCAA8C;AAC9C,qCAA0D;AAC1D,+BAAqC;AACrC,yCAAsC;
|
1
|
+
{"version":3,"file":"load_static_entries.js","sourceRoot":"","sources":["../../src/lib/load_static_entries.ts"],"names":[],"mappings":";;;;AACA,yCAA8C;AAC9C,qCAA0D;AAC1D,+BAAqC;AACrC,yCAAsC;AAOtC,SAAsB,mBAAmB,CAAC,KAA+B;;QACvE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,YAAY,GAAkB,EAAE,CAAC;QAEvC,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAElD,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,YAAY,CAAC,IAAI,CAAC;oBAChB,QAAQ;oBACR,IAAI,EAAE,IAAI;oBACV,kBAAkB,EAAE,KAAK;oBACzB,MAAM,EAAE,MAAM,IAAA,qBAAS,EAAC,kBAAQ,CAAC,CAAC,QAAQ,CAAC;oBAC3C,IAAI,EAAE,OAAO;oBACb,gBAAgB,EAAE,IAAI;iBACvB,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAA,CAAC;QACF,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;QAC7B,OAAO,YAAY,CAAC;IACtB,CAAC;CAAA;AA3BD,kDA2BC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export interface RemoteMapExtraction {
|
2
|
+
remotesMap: {
|
3
|
+
[index: string]: {
|
4
|
+
url: string;
|
5
|
+
};
|
6
|
+
};
|
7
|
+
startIndex: number;
|
8
|
+
endIndex: number;
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* Parses the provided code to extract the remotesMap object.
|
12
|
+
*
|
13
|
+
* @param code - The code containing the remotesMap declaration.
|
14
|
+
* @returns An object containing the remotesMap as a Record<string, string> and the start and end indices of the remotesMap declaration in the code, or undefined if parsing fails.
|
15
|
+
*/
|
16
|
+
export declare function parseRemoteMap(code: string): Promise<RemoteMapExtraction | undefined>;
|
17
|
+
export declare function replaceProtocolAndHost(originalUrl: string, newProtocolAndHost: string): string;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.replaceProtocolAndHost = exports.parseRemoteMap = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const json5_1 = tslib_1.__importDefault(require("json5"));
|
6
|
+
const zephyr_edge_contract_1 = require("zephyr-edge-contract");
|
7
|
+
/**
|
8
|
+
* Parses the provided code to extract the remotesMap object.
|
9
|
+
*
|
10
|
+
* @param code - The code containing the remotesMap declaration.
|
11
|
+
* @returns An object containing the remotesMap as a Record<string, string> and the start and end indices of the remotesMap declaration in the code, or undefined if parsing fails.
|
12
|
+
*/
|
13
|
+
function parseRemoteMap(code) {
|
14
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
15
|
+
try {
|
16
|
+
const { js } = yield Promise.resolve().then(() => tslib_1.__importStar(require('@ast-grep/napi')));
|
17
|
+
const tree = js.parse(code);
|
18
|
+
const root = tree.root();
|
19
|
+
const objectNode = root.find(`const remotesMap = $OBJECT;`);
|
20
|
+
if (!objectNode) {
|
21
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', 'Failed to find remotesMap declaration.');
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
const variableDeclaratorNode = objectNode.children().find((child) => child.kind() === 'variable_declarator');
|
25
|
+
if (!variableDeclaratorNode) {
|
26
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', 'Failed to extract object literal from remotesMap declaration: variable_declarator.');
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
const objectLiteralNode = variableDeclaratorNode.children().find((child) => child.kind() === 'object');
|
30
|
+
if (!objectLiteralNode) {
|
31
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', 'Failed to extract object literal from remotesMap declaration: object');
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
const remotesMapObject = json5_1.default.parse(objectLiteralNode.text() || '');
|
35
|
+
return {
|
36
|
+
remotesMap: remotesMapObject,
|
37
|
+
startIndex: objectNode.range().start.index,
|
38
|
+
endIndex: objectNode.range().end.index,
|
39
|
+
};
|
40
|
+
}
|
41
|
+
catch (error) {
|
42
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', 'Failed to parse or modify remotesMap:', error);
|
43
|
+
}
|
44
|
+
return;
|
45
|
+
});
|
46
|
+
}
|
47
|
+
exports.parseRemoteMap = parseRemoteMap;
|
48
|
+
function replaceProtocolAndHost(originalUrl, newProtocolAndHost) {
|
49
|
+
const url = new URL(originalUrl);
|
50
|
+
const newUrl = new URL(newProtocolAndHost);
|
51
|
+
// Replace protocol and hostname
|
52
|
+
url.protocol = newUrl.protocol;
|
53
|
+
url.hostname = newUrl.hostname;
|
54
|
+
return url.toString();
|
55
|
+
}
|
56
|
+
exports.replaceProtocolAndHost = replaceProtocolAndHost;
|
57
|
+
//# sourceMappingURL=remote_map_parser.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"remote_map_parser.js","sourceRoot":"","sources":["../../src/lib/remote_map_parser.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,+DAAgD;AAUhD;;;;;GAKG;AACH,SAAsB,cAAc,CAAC,IAAY;;QAC/C,IAAI,CAAC;YACH,MAAM,EAAE,EAAE,EAAE,GAAG,gEAAa,gBAAgB,GAAC,CAAC;YAC9C,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAEzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAE5D,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,IAAA,+BAAQ,EAAC,uCAAuC,EAAE,wCAAwC,CAAC,CAAC;gBAC5F,OAAO;YACT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AAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAE/B,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AATD,wDASC"}
|
@@ -0,0 +1,10 @@
|
|
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
|
+
}
|
@@ -0,0 +1,32 @@
|
|
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
|
+
return response === null || response === void 0 ? void 0 : response.value;
|
25
|
+
}
|
26
|
+
catch (err) {
|
27
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', `Could not resolve '${name}' with version '${version}'`);
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
exports.resolve_remote_dependency = resolve_remote_dependency;
|
32
|
+
//# sourceMappingURL=resolve_remote_dependency.js.map
|
@@ -0,0 +1 @@
|
|
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;YACjF,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;AAzBD,8DAyBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zephyr-internal-options.js","sourceRoot":"","sources":["../../../src/lib/types/zephyr-internal-options.ts"],"names":[],"mappings":""}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.withZephyrPartial = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const isCI = require("is-ci");
|
5
|
+
const isCI = tslib_1.__importStar(require("is-ci"));
|
6
6
|
const zephyr_agent_1 = require("zephyr-agent");
|
7
7
|
const zephyr_edge_contract_1 = require("zephyr-edge-contract");
|
8
8
|
const load_extra_files_from_dist_1 = require("./load_extra_files_from_dist");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-plugin-zephyr-partial.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr-partial.ts"],"names":[],"mappings":";;;;AAAA,
|
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;g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CAAC;CAAA"}
|
@@ -2,18 +2,32 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.withZephyr = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const isCI = require("is-ci");
|
5
|
+
const isCI = tslib_1.__importStar(require("is-ci"));
|
6
6
|
const zephyr_agent_1 = require("zephyr-agent");
|
7
7
|
const zephyr_edge_contract_1 = require("zephyr-edge-contract");
|
8
8
|
const load_public_dir_1 = require("./load_public_dir");
|
9
9
|
const load_static_entries_1 = require("./load_static_entries");
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
const remote_map_parser_1 = require("./remote_map_parser");
|
11
|
+
const resolve_remote_dependency_1 = require("./resolve_remote_dependency");
|
12
|
+
const vite_plugin_federation_1 = tslib_1.__importDefault(require("@originjs/vite-plugin-federation"));
|
13
|
+
function withZephyr(_options) {
|
14
|
+
return zephyrPlugin(_options);
|
15
|
+
}
|
16
|
+
exports.withZephyr = withZephyr;
|
17
|
+
function zephyrPlugin(_options) {
|
18
|
+
let gitInfo;
|
19
|
+
let packageJson;
|
20
|
+
let application_uid;
|
13
21
|
const vite_internal_options = {};
|
14
22
|
return {
|
15
23
|
name: 'with-zephyr',
|
16
24
|
enforce: 'post',
|
25
|
+
config: (config) => {
|
26
|
+
config.plugins = config.plugins || [];
|
27
|
+
// only push the options when options are presented
|
28
|
+
_options &&
|
29
|
+
config.plugins.push((0, vite_plugin_federation_1.default)(Object.assign({}, _options)));
|
30
|
+
},
|
17
31
|
configResolved: (config) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
18
32
|
Object.assign(vite_internal_options, {
|
19
33
|
root: config.root,
|
@@ -21,9 +35,51 @@ function withZephyr() {
|
|
21
35
|
outDir: config.build.outDir,
|
22
36
|
publicDir: config.publicDir,
|
23
37
|
});
|
38
|
+
(0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
|
39
|
+
packageJson = yield (0, zephyr_agent_1.getPackageJson)(vite_internal_options.root);
|
40
|
+
(0, zephyr_edge_contract_1.ze_log)('Loaded package.json.', packageJson);
|
41
|
+
if (!packageJson)
|
42
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
|
43
|
+
gitInfo = yield (0, zephyr_agent_1.getGitInfo)();
|
44
|
+
(0, zephyr_edge_contract_1.ze_log)('Loaded Git Info.', gitInfo);
|
45
|
+
if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
|
46
|
+
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? ');
|
47
|
+
if (!(packageJson === null || packageJson === void 0 ? void 0 : packageJson.name))
|
48
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION');
|
49
|
+
application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
|
50
|
+
org: gitInfo.app.org,
|
51
|
+
project: gitInfo.app.project,
|
52
|
+
name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
|
53
|
+
});
|
54
|
+
(0, zephyr_edge_contract_1.ze_log)('vite-zephyr-options', vite_internal_options);
|
24
55
|
}),
|
25
|
-
|
26
|
-
|
56
|
+
// Used by Vite dev server for in memory bundles
|
57
|
+
transform: (code) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
58
|
+
// If there is no options getting passed in return undefined and pass the code directly to next step
|
59
|
+
const extractedRemoteMap = _options ? yield (0, remote_map_parser_1.parseRemoteMap)(code) : undefined;
|
60
|
+
if (extractedRemoteMap === undefined) {
|
61
|
+
return code;
|
62
|
+
}
|
63
|
+
const { remotesMap, startIndex, endIndex } = extractedRemoteMap;
|
64
|
+
for (const [remoteName, remoteConfig] of Object.entries(remotesMap)) {
|
65
|
+
const remote_application_uuid = (0, zephyr_edge_contract_1.createApplicationUID)({
|
66
|
+
org: gitInfo.app.org,
|
67
|
+
project: gitInfo.app.project,
|
68
|
+
name: remoteName,
|
69
|
+
});
|
70
|
+
(0, zephyr_edge_contract_1.ze_log)('Resolving remote:', remote_application_uuid, remoteName);
|
71
|
+
const remoteDetails = yield (0, resolve_remote_dependency_1.resolve_remote_dependency)({ name: remote_application_uuid, version: '*' });
|
72
|
+
(0, zephyr_edge_contract_1.ze_log)('Resolved remote:', remoteDetails);
|
73
|
+
if (!remoteDetails) {
|
74
|
+
continue;
|
75
|
+
}
|
76
|
+
(0, zephyr_edge_contract_1.ze_log)('Updating remote url:', remoteConfig.url, remoteDetails.remote_entry_url);
|
77
|
+
remoteConfig.url = (0, remote_map_parser_1.replaceProtocolAndHost)(remoteConfig.url, remoteDetails.remote_entry_url);
|
78
|
+
(0, zephyr_edge_contract_1.ze_log)('Updated remote url:', remoteConfig.url);
|
79
|
+
}
|
80
|
+
(0, zephyr_edge_contract_1.ze_log)('Writing remotesMap to bundle:', remotesMap);
|
81
|
+
const newObjectCode = `const remotesMap = ${JSON.stringify(remotesMap)};`;
|
82
|
+
return code.slice(0, startIndex) + newObjectCode + code.slice(endIndex);
|
27
83
|
}),
|
28
84
|
closeBundle: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
29
85
|
const publicAssets = [];
|
@@ -37,35 +93,16 @@ function withZephyr() {
|
|
37
93
|
const _static_assets = yield (0, load_static_entries_1.load_static_entries)({
|
38
94
|
root: vite_internal_options.root,
|
39
95
|
outDir: vite_internal_options.outDir,
|
40
|
-
bundle,
|
41
96
|
});
|
42
97
|
publicAssets.push(..._static_assets);
|
43
|
-
const assets = Object.assign({},
|
44
|
-
yield _zephyr({ assets, vite_internal_options });
|
98
|
+
const assets = Object.assign({}, ...publicAssets.map((asset) => ({ [asset.fileName]: asset })));
|
99
|
+
yield _zephyr({ assets, vite_internal_options, application_uid, packageJson, gitInfo });
|
45
100
|
}),
|
46
101
|
};
|
47
102
|
}
|
48
|
-
exports.withZephyr = withZephyr;
|
49
103
|
function _zephyr(options) {
|
50
104
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
51
|
-
const { assets: _assets, vite_internal_options } = options;
|
52
|
-
const path_to_execution_dir = vite_internal_options.root;
|
53
|
-
(0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
|
54
|
-
const packageJson = yield (0, zephyr_agent_1.getPackageJson)(path_to_execution_dir);
|
55
|
-
(0, zephyr_edge_contract_1.ze_log)('Loaded package.json.', packageJson);
|
56
|
-
if (!packageJson)
|
57
|
-
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
|
58
|
-
const gitInfo = yield (0, zephyr_agent_1.getGitInfo)();
|
59
|
-
(0, zephyr_edge_contract_1.ze_log)('Loaded Git Info.', gitInfo);
|
60
|
-
if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
|
61
|
-
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? ');
|
62
|
-
if (!(packageJson === null || packageJson === void 0 ? void 0 : packageJson.name))
|
63
|
-
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION');
|
64
|
-
const application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
|
65
|
-
org: gitInfo.app.org,
|
66
|
-
project: gitInfo.app.project,
|
67
|
-
name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
|
68
|
-
});
|
105
|
+
const { assets: _assets, vite_internal_options, application_uid, packageJson, gitInfo } = options;
|
69
106
|
(0, zephyr_edge_contract_1.ze_log)('Going to check auth token or get it...');
|
70
107
|
yield (0, zephyr_agent_1.checkAuth)();
|
71
108
|
(0, zephyr_edge_contract_1.ze_log)('Got auth token, going to get application configuration and build id...');
|
@@ -79,7 +116,7 @@ function _zephyr(options) {
|
|
79
116
|
if (!buildId)
|
80
117
|
return (0, zephyr_edge_contract_1.ze_error)('ERR_GET_BUILD_ID');
|
81
118
|
const pluginOptions = {
|
82
|
-
pluginName: '
|
119
|
+
pluginName: 'vite-plugin-zephyr',
|
83
120
|
application_uid,
|
84
121
|
buildEnv: 'local',
|
85
122
|
username,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;;;AAAA,
|
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,2DAA6E;AAC7E,2EAAwE;AACxE,sGAA2F;AAS3F,SAAgB,UAAU,CAAC,QAAsC;IAC/D,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAFD,gCAEC;AAED,SAAS,YAAY,CAAC,QAAsC;IAC1D,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,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;YACjB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;YAEtC,mDAAmD;YACnD,QAAQ;gBACN,MAAM,CAAC,OAAO,CAAC,IAAI,CACjB,IAAA,gCAAU,oBACL,QAAQ,EACX,CACH,CAAC;QACN,CAAC;QAED,cAAc,EAAE,CAAO,MAAsB,EAAE,EAAE;YAC/C,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBACnC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,U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KAAK,OAAO;YACV,OAAO,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAClG;YACE,OAAO,KAAK,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAgC;IACpD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC"}
|
package/dist/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite-plugin-zephyr",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.20",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -8,9 +8,12 @@
|
|
8
8
|
"build": "nx run vite-plugin-zephyr:build"
|
9
9
|
},
|
10
10
|
"dependencies": {
|
11
|
-
"vite": "^5",
|
11
|
+
"vite": "^5.4.6",
|
12
12
|
"rollup": "^4",
|
13
13
|
"is-ci": "^3",
|
14
|
+
"@ast-grep/napi": "0.27.0",
|
15
|
+
"@originjs/vite-plugin-federation": "^1.3.5",
|
16
|
+
"json5": "2.2.3",
|
14
17
|
"zephyr-edge-contract": "workspace:*",
|
15
18
|
"zephyr-agent": "workspace:*"
|
16
19
|
},
|
package/package.json
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite-plugin-zephyr",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.20",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"dependencies": {
|
8
|
-
"vite": "^5",
|
8
|
+
"vite": "^5.4.6",
|
9
9
|
"rollup": "^4",
|
10
10
|
"is-ci": "^3",
|
11
|
-
"
|
12
|
-
"
|
11
|
+
"@ast-grep/napi": "0.27.0",
|
12
|
+
"@originjs/vite-plugin-federation": "^1.3.5",
|
13
|
+
"json5": "2.2.3",
|
14
|
+
"zephyr-edge-contract": "0.0.20",
|
15
|
+
"zephyr-agent": "0.0.20"
|
13
16
|
},
|
14
17
|
"devDependencies": {
|
15
18
|
"@types/is-ci": "^3.0.4"
|