vite-plugin-zephyr 0.0.24 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/load_extra_files_from_dist.js +26 -29
- package/dist/lib/load_extra_files_from_dist.js.map +1 -1
- package/dist/lib/load_public_dir.js +27 -30
- package/dist/lib/load_public_dir.js.map +1 -1
- package/dist/lib/load_static_entries.js +24 -27
- package/dist/lib/load_static_entries.js.map +1 -1
- package/dist/lib/resolve_remote_dependency.js +22 -25
- package/dist/lib/resolve_remote_dependency.js.map +1 -1
- package/dist/lib/vite-plugin-zephyr-partial.js +115 -117
- package/dist/lib/vite-plugin-zephyr-partial.js.map +1 -1
- package/dist/lib/vite-plugin-zephyr.js +72 -74
- package/dist/lib/vite-plugin-zephyr.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +3 -3
@@ -1,40 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.load_extra_files_from_dist = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
4
|
const node_path_1 = require("node:path");
|
6
5
|
const node_fs_1 = require("node:fs");
|
7
6
|
const vite_1 = require("vite");
|
8
7
|
const node_util_1 = require("node:util");
|
9
|
-
function load_extra_files_from_dist(props) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
}
|
8
|
+
async function load_extra_files_from_dist(props) {
|
9
|
+
const { root, bundle } = 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;
|
33
19
|
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
20
|
+
const fileName = (0, vite_1.normalizePath)((0, node_path_1.relative)(root_dist_dir, destFile));
|
21
|
+
if (!(fileName in bundle)) {
|
22
|
+
publicAssets.push({
|
23
|
+
fileName,
|
24
|
+
name: file,
|
25
|
+
needsCodeReference: false,
|
26
|
+
source: await (0, node_util_1.promisify)(node_fs_1.readFile)(destFile),
|
27
|
+
type: 'asset',
|
28
|
+
originalFileName: file,
|
29
|
+
});
|
30
|
+
}
|
31
|
+
}
|
32
|
+
};
|
33
|
+
await loadDir(root_dist_dir);
|
34
|
+
return publicAssets;
|
38
35
|
}
|
39
36
|
exports.load_extra_files_from_dist = load_extra_files_from_dist;
|
40
37
|
//# sourceMappingURL=load_extra_files_from_dist.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"load_extra_files_from_dist.js","sourceRoot":"","sources":["../../src/lib/load_extra_files_from_dist.ts"],"names":[],"mappings":"
|
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;AAQ/B,KAAK,UAAU,0BAA0B,CAAC,KAAoC;IACnF,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClD,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,IAAI,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,CAAC;gBAC1B,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;IACH,CAAC,CAAC;IACF,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;IAE7B,OAAO,YAAY,CAAC;AACtB,CAAC;AA7BD,gEA6BC"}
|
@@ -1,41 +1,38 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.load_public_dir = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
4
|
const node_fs_1 = require("node:fs");
|
6
5
|
const node_path_1 = require("node:path");
|
7
6
|
const vite_1 = require("vite");
|
8
7
|
const node_util_1 = require("node:util");
|
9
|
-
function load_public_dir(props) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
}
|
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;
|
34
16
|
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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;
|
39
36
|
}
|
40
37
|
exports.load_public_dir = load_public_dir;
|
41
38
|
//# sourceMappingURL=load_public_dir.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"load_public_dir.js","sourceRoot":"","sources":["../../src/lib/load_public_dir.ts"],"names":[],"mappings":"
|
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;AAO/B,KAAK,UAAU,eAAe,CAAC,KAA2B;IAC/D,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;AA5BD,0CA4BC"}
|
@@ -1,38 +1,35 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.load_static_entries = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
4
|
const node_path_1 = require("node:path");
|
6
5
|
const node_fs_1 = require("node:fs");
|
7
6
|
const vite_1 = require("vite");
|
8
7
|
const node_util_1 = require("node:util");
|
9
|
-
function load_static_entries(props) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
});
|
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;
|
31
19
|
}
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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;
|
36
33
|
}
|
37
34
|
exports.load_static_entries = load_static_entries;
|
38
35
|
//# sourceMappingURL=load_static_entries.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"load_static_entries.js","sourceRoot":"","sources":["../../src/lib/load_static_entries.ts"],"names":[],"mappings":"
|
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;AAO/B,KAAK,UAAU,mBAAmB,CAAC,KAA+B;IACvE,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;AA3BD,kDA2BC"}
|
@@ -1,33 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.resolve_remote_dependency = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
4
|
const zephyr_edge_contract_1 = require("zephyr-edge-contract");
|
6
|
-
function resolve_remote_dependency(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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;
|
5
|
+
async function resolve_remote_dependency({ name, version }) {
|
6
|
+
const resolveDependency = new URL(`${zephyr_edge_contract_1.ze_api_gateway.resolve}/${encodeURIComponent(name)}/${encodeURIComponent(version)}`, (0, zephyr_edge_contract_1.ZE_API_ENDPOINT)());
|
7
|
+
(0, zephyr_edge_contract_1.ze_log)('Resolving dependency', name, version, resolveDependency);
|
8
|
+
try {
|
9
|
+
const token = await (0, zephyr_edge_contract_1.getToken)();
|
10
|
+
const res = await fetch(resolveDependency, {
|
11
|
+
method: 'GET',
|
12
|
+
headers: {
|
13
|
+
'Content-Type': 'application/json',
|
14
|
+
Authorization: 'Bearer ' + token,
|
15
|
+
Accept: 'application/json',
|
16
|
+
},
|
17
|
+
});
|
18
|
+
if (!res.ok) {
|
19
|
+
throw new Error(res.statusText);
|
26
20
|
}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
21
|
+
const response = (await res.json());
|
22
|
+
(0, zephyr_edge_contract_1.ze_log)('[Vite]: resolve remote dependency response: ', response);
|
23
|
+
return response === null || response === void 0 ? void 0 : response.value;
|
24
|
+
}
|
25
|
+
catch (err) {
|
26
|
+
(0, zephyr_edge_contract_1.ze_error)('ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION', `Could not resolve '${name}' with version '${version}'`);
|
27
|
+
}
|
31
28
|
}
|
32
29
|
exports.resolve_remote_dependency = resolve_remote_dependency;
|
33
30
|
//# sourceMappingURL=resolve_remote_dependency.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resolve_remote_dependency.js","sourceRoot":"","sources":["../../src/lib/resolve_remote_dependency.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"resolve_remote_dependency.js","sourceRoot":"","sources":["../../src/lib/resolve_remote_dependency.ts"],"names":[],"mappings":";;;AAAA,+DAAmG;AAE5F,KAAK,UAAU,yBAAyB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAqC;IAClG,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;IACF,IAAA,6BAAM,EAAC,sBAAsB,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACjE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,IAAA,+BAAQ,GAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,iBAAiB,EAAE;YACzC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,SAAS,GAAG,KAAK;gBAChC,MAAM,EAAE,kBAAkB;aAC3B;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QACD,MAAM,QAAQ,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA8C,CAAC;QAEjF,IAAA,6BAAM,EAAC,8CAA8C,EAAE,QAAQ,CAAC,CAAC;QACjE,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC;IACzB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAA,+BAAQ,EAAC,uCAAuC,EAAE,sBAAsB,IAAI,mBAAmB,OAAO,GAAG,CAAC,CAAC;IAC7G,CAAC;AACH,CAAC;AA3BD,8DA2BC"}
|
@@ -14,151 +14,149 @@ function withZephyrPartial() {
|
|
14
14
|
name: 'with-zephyr-partial',
|
15
15
|
apply: 'build',
|
16
16
|
enforce: 'post',
|
17
|
-
configResolved: (config) =>
|
17
|
+
configResolved: async (config) => {
|
18
18
|
Object.assign(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) =>
|
24
|
+
},
|
25
|
+
writeBundle: async (options, _bundle) => {
|
26
26
|
vite_internal_options.dir = options.dir;
|
27
27
|
bundle = _bundle;
|
28
|
-
}
|
29
|
-
closeBundle: () =>
|
28
|
+
},
|
29
|
+
closeBundle: async () => {
|
30
30
|
const publicAssets = [];
|
31
31
|
if (vite_internal_options.publicDir) {
|
32
|
-
const _public_assets =
|
32
|
+
const _public_assets = await (0, load_public_dir_1.load_public_dir)({
|
33
33
|
outDir: vite_internal_options.outDir,
|
34
34
|
publicDir: vite_internal_options.publicDir,
|
35
35
|
});
|
36
36
|
publicAssets.push(..._public_assets);
|
37
37
|
}
|
38
|
-
const _extra_assets =
|
38
|
+
const _extra_assets = await (0, load_extra_files_from_dist_1.load_extra_files_from_dist)({
|
39
39
|
root: vite_internal_options.root,
|
40
40
|
outDir: vite_internal_options.outDir,
|
41
41
|
bundle,
|
42
42
|
});
|
43
43
|
publicAssets.push(..._extra_assets);
|
44
44
|
const assets = Object.assign({}, bundle, ...publicAssets.map((asset) => ({ [asset.fileName]: asset })));
|
45
|
-
|
46
|
-
}
|
45
|
+
await _zephyr_partial({ assets, vite_internal_options });
|
46
|
+
},
|
47
47
|
};
|
48
48
|
}
|
49
49
|
exports.withZephyrPartial = withZephyrPartial;
|
50
|
-
function _zephyr_partial(options) {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
50
|
+
async function _zephyr_partial(options) {
|
51
|
+
var _a;
|
52
|
+
const { assets, vite_internal_options } = options;
|
53
|
+
const path_to_execution_dir = vite_internal_options.root;
|
54
|
+
(0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
|
55
|
+
const packageJson = await (0, zephyr_agent_1.getPackageJson)(path_to_execution_dir);
|
56
|
+
(0, zephyr_edge_contract_1.ze_log)('Loaded Package JSON', packageJson);
|
57
|
+
if (!packageJson)
|
58
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
|
59
|
+
const gitInfo = await (0, zephyr_agent_1.getGitInfo)();
|
60
|
+
(0, zephyr_edge_contract_1.ze_log)('Loaded Git Info', gitInfo);
|
61
|
+
if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
|
62
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_NO_GIT_INFO', 'Can you confirm the current directory has initialized as a git repository?');
|
63
|
+
if (!(packageJson === null || packageJson === void 0 ? void 0 : packageJson.name))
|
64
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION', 'package.json must have a name and version.');
|
65
|
+
const application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
|
66
|
+
org: gitInfo.app.org,
|
67
|
+
project: gitInfo.app.project,
|
68
|
+
name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
|
69
|
+
});
|
70
|
+
(0, zephyr_edge_contract_1.ze_log)('Going to check auth token or get it...');
|
71
|
+
await (0, zephyr_agent_1.checkAuth)();
|
72
|
+
(0, zephyr_edge_contract_1.ze_log)('Got auth token, going to get application configuration and build id...');
|
73
|
+
const [appConfig, buildId, hash_set] = await Promise.all([
|
74
|
+
(0, zephyr_agent_1.getApplicationConfiguration)({ application_uid }),
|
75
|
+
(0, zephyr_agent_1.getBuildId)(application_uid),
|
76
|
+
(0, zephyr_agent_1.get_hash_list)(application_uid),
|
77
|
+
]);
|
78
|
+
const { username, email, EDGE_URL } = appConfig;
|
79
|
+
(0, zephyr_edge_contract_1.ze_log)('Got application configuration', { username, email, EDGE_URL });
|
80
|
+
if (!buildId)
|
81
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_GET_BUILD_ID');
|
82
|
+
const pluginOptions = {
|
83
|
+
pluginName: 'rollup-plugin-zephyr',
|
84
|
+
application_uid,
|
85
|
+
buildEnv: 'local',
|
86
|
+
username,
|
87
|
+
app: {
|
88
|
+
name: packageJson.name,
|
89
|
+
version: packageJson.version,
|
67
90
|
org: gitInfo.app.org,
|
68
91
|
project: gitInfo.app.project,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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;
|
92
|
+
},
|
93
|
+
git: gitInfo.git,
|
94
|
+
isCI,
|
95
|
+
zeConfig: {
|
96
|
+
user: username,
|
97
|
+
edge_url: EDGE_URL,
|
98
|
+
buildId,
|
99
|
+
},
|
100
|
+
mfConfig: void 0,
|
101
|
+
};
|
102
|
+
(0, zephyr_edge_contract_1.ze_log)('\n--------\n zephyr agent started. \n ------ \n');
|
103
|
+
const logEvent = (0, zephyr_agent_1.logger)(pluginOptions);
|
104
|
+
logEvent({
|
105
|
+
level: 'info',
|
106
|
+
action: 'build:info:user',
|
107
|
+
ignore: true,
|
108
|
+
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`,
|
109
|
+
});
|
110
|
+
const zeStart = Date.now();
|
111
|
+
const extractBuffer = (asset) => {
|
112
|
+
switch (asset.type) {
|
113
|
+
case 'chunk':
|
114
|
+
return asset.code;
|
115
|
+
case 'asset':
|
116
|
+
return typeof asset.source === 'string' ? asset.source : new TextDecoder().decode(asset.source);
|
117
|
+
default:
|
118
|
+
return void 0;
|
119
|
+
}
|
120
|
+
};
|
121
|
+
const getAssetType = (asset) => asset.type;
|
122
|
+
const assetsMap = Object.keys(assets).reduce((memo, filepath) => {
|
123
|
+
const asset = assets[filepath];
|
124
|
+
const buffer = extractBuffer(asset);
|
125
|
+
if (!buffer && buffer !== '') {
|
126
|
+
logEvent({
|
127
|
+
action: 'ze:build:assets:unknown-asset-type',
|
128
|
+
level: 'error',
|
129
|
+
message: `unknown asset type: ${getAssetType(asset)}`,
|
130
|
+
});
|
136
131
|
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
132
|
}
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
133
|
+
const assetMap = (0, zephyr_agent_1.getZeBuildAsset)({ filepath, content: buffer });
|
134
|
+
memo[assetMap.hash] = assetMap;
|
135
|
+
return memo;
|
136
|
+
}, {});
|
137
|
+
const snapshot = (0, zephyr_agent_1.createSnapshot)({
|
138
|
+
options: pluginOptions,
|
139
|
+
assets: assetsMap,
|
140
|
+
username,
|
141
|
+
email,
|
142
|
+
});
|
143
|
+
await (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));
|
144
|
+
const missingAssets = (0, zephyr_agent_1.get_missing_assets)({ assetsMap, hash_set });
|
145
|
+
const assetsUploadSuccess = await (0, zephyr_agent_1.zeUploadAssets)(pluginOptions, {
|
146
|
+
missingAssets,
|
147
|
+
assetsMap,
|
148
|
+
count: Object.keys(assets).length,
|
149
|
+
});
|
150
|
+
if (!assetsUploadSuccess)
|
151
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_FAILED_UPLOAD_ASSETS', assetsUploadSuccess);
|
152
|
+
if (missingAssets.length) {
|
153
|
+
await (0, zephyr_agent_1.update_hash_list)(application_uid, assetsMap);
|
154
|
+
}
|
155
|
+
await (0, zephyr_edge_contract_1.savePartialAssetMap)(application_uid, (_a = vite_internal_options.configFile) !== null && _a !== void 0 ? _a : 'partial', assetsMap);
|
156
|
+
logEvent({
|
157
|
+
level: 'info',
|
158
|
+
action: 'build:deploy:done',
|
159
|
+
message: `Deployment took ${(0, zephyr_edge_contract_1.yellow)(`${Date.now() - zeStart}`)}ms`,
|
162
160
|
});
|
163
161
|
}
|
164
162
|
//# 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,
|
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,E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AAS,CAAC,CAAC;IAErG,QAAQ,CAAC;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,mBAAmB,IAAA,6BAAM,EAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,IAAI;KAClE,CAAC,CAAC;AACL,CAAC"}
|
@@ -23,7 +23,7 @@ function zephyrPlugin(_options) {
|
|
23
23
|
return {
|
24
24
|
name: 'with-zephyr',
|
25
25
|
enforce: 'post',
|
26
|
-
configResolved: (config) =>
|
26
|
+
configResolved: async (config) => {
|
27
27
|
var _a;
|
28
28
|
Object.assign(vite_internal_options, {
|
29
29
|
root: config.root,
|
@@ -31,11 +31,11 @@ function zephyrPlugin(_options) {
|
|
31
31
|
publicDir: config.publicDir,
|
32
32
|
});
|
33
33
|
(0, zephyr_edge_contract_1.ze_log)('Configuring with Zephyr...');
|
34
|
-
packageJson =
|
34
|
+
packageJson = await (0, zephyr_agent_1.getPackageJson)(vite_internal_options.root);
|
35
35
|
(0, zephyr_edge_contract_1.ze_log)('Loaded package.json.', packageJson);
|
36
36
|
if (!packageJson)
|
37
37
|
return (0, zephyr_edge_contract_1.ze_error)('ERR_PACKAGE_JSON_NOT_FOUND');
|
38
|
-
gitInfo =
|
38
|
+
gitInfo = await (0, zephyr_agent_1.getGitInfo)();
|
39
39
|
(0, zephyr_edge_contract_1.ze_log)('Loaded Git Info.', gitInfo);
|
40
40
|
if (!gitInfo || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.org) || !(gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.app.project))
|
41
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? ');
|
@@ -47,8 +47,8 @@ function zephyrPlugin(_options) {
|
|
47
47
|
name: packageJson === null || packageJson === void 0 ? void 0 : packageJson.name,
|
48
48
|
});
|
49
49
|
(0, zephyr_edge_contract_1.ze_log)('vite-zephyr-options', vite_internal_options);
|
50
|
-
}
|
51
|
-
transform: (code, id) =>
|
50
|
+
},
|
51
|
+
transform: async (code, id) => {
|
52
52
|
const extractedRemotes = _options ? (0, remote_map_parser_1.parseRemoteMap)(code, id) : undefined;
|
53
53
|
if (extractedRemotes === undefined) {
|
54
54
|
return code;
|
@@ -64,7 +64,7 @@ function zephyrPlugin(_options) {
|
|
64
64
|
name: name,
|
65
65
|
});
|
66
66
|
(0, zephyr_edge_contract_1.ze_log)('Resolving remote:', remote_application_uuid, name);
|
67
|
-
const remoteDetails =
|
67
|
+
const remoteDetails = await (0, resolve_remote_dependency_1.resolve_remote_dependency)({ name: remote_application_uuid, version: name });
|
68
68
|
(0, zephyr_edge_contract_1.ze_log)('Resolved remote:', remoteDetails);
|
69
69
|
if (!remoteDetails) {
|
70
70
|
continue;
|
@@ -81,88 +81,86 @@ function zephyrPlugin(_options) {
|
|
81
81
|
}
|
82
82
|
(0, zephyr_edge_contract_1.ze_log)('Writing remotesMap to bundle:', remotes);
|
83
83
|
return code.slice(0, startIndex) + JSON.stringify(remotes) + code.slice(endIndex);
|
84
|
-
}
|
85
|
-
closeBundle: () =>
|
84
|
+
},
|
85
|
+
closeBundle: async () => {
|
86
86
|
const publicAssets = [];
|
87
87
|
if (vite_internal_options.publicDir) {
|
88
|
-
const _public_assets =
|
88
|
+
const _public_assets = await (0, load_public_dir_1.load_public_dir)({
|
89
89
|
outDir: vite_internal_options.outDir,
|
90
90
|
publicDir: vite_internal_options.publicDir,
|
91
91
|
});
|
92
92
|
publicAssets.push(..._public_assets);
|
93
93
|
}
|
94
|
-
const _static_assets =
|
94
|
+
const _static_assets = await (0, load_static_entries_1.load_static_entries)({
|
95
95
|
root: vite_internal_options.root,
|
96
96
|
outDir: vite_internal_options.outDir,
|
97
97
|
});
|
98
98
|
publicAssets.push(..._static_assets);
|
99
99
|
const assets = Object.assign({}, ...publicAssets.map((asset) => ({ [asset.fileName]: asset })));
|
100
|
-
|
101
|
-
}
|
100
|
+
await _zephyr({ assets, vite_internal_options, application_uid, packageJson, gitInfo });
|
101
|
+
},
|
102
102
|
};
|
103
103
|
}
|
104
|
-
function _zephyr(options) {
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
zeStart,
|
165
|
-
});
|
104
|
+
async function _zephyr(options) {
|
105
|
+
const { assets: _assets, vite_internal_options, application_uid, packageJson, gitInfo } = options;
|
106
|
+
(0, zephyr_edge_contract_1.ze_log)('Going to check auth token or get it...');
|
107
|
+
await (0, zephyr_agent_1.checkAuth)();
|
108
|
+
(0, zephyr_edge_contract_1.ze_log)('Got auth token, going to get application configuration and build id...');
|
109
|
+
const [appConfig, buildId, hash_set] = await Promise.all([
|
110
|
+
(0, zephyr_agent_1.getApplicationConfiguration)({ application_uid }),
|
111
|
+
(0, zephyr_agent_1.getBuildId)(application_uid),
|
112
|
+
(0, zephyr_agent_1.get_hash_list)(application_uid),
|
113
|
+
]);
|
114
|
+
const { username, email, EDGE_URL } = appConfig;
|
115
|
+
(0, zephyr_edge_contract_1.ze_log)('Got application configuration', { username, email, EDGE_URL });
|
116
|
+
if (!buildId)
|
117
|
+
return (0, zephyr_edge_contract_1.ze_error)('ERR_GET_BUILD_ID');
|
118
|
+
const pluginOptions = {
|
119
|
+
pluginName: 'vite-plugin-zephyr',
|
120
|
+
application_uid,
|
121
|
+
buildEnv: 'local',
|
122
|
+
username,
|
123
|
+
app: {
|
124
|
+
name: packageJson.name,
|
125
|
+
version: packageJson.version,
|
126
|
+
org: gitInfo.app.org,
|
127
|
+
project: gitInfo.app.project,
|
128
|
+
},
|
129
|
+
git: gitInfo === null || gitInfo === void 0 ? void 0 : gitInfo.git,
|
130
|
+
isCI,
|
131
|
+
zeConfig: {
|
132
|
+
user: username,
|
133
|
+
edge_url: EDGE_URL,
|
134
|
+
buildId,
|
135
|
+
},
|
136
|
+
mfConfig: void 0,
|
137
|
+
};
|
138
|
+
(0, zephyr_edge_contract_1.ze_log)('\nzephyr agent started.\n');
|
139
|
+
const logEvent = (0, zephyr_agent_1.logger)(pluginOptions);
|
140
|
+
logEvent({
|
141
|
+
level: 'info',
|
142
|
+
action: 'build:info:user',
|
143
|
+
ignore: true,
|
144
|
+
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`,
|
145
|
+
});
|
146
|
+
const zeStart = Date.now();
|
147
|
+
const partialAssetMap = await (0, zephyr_edge_contract_1.getPartialAssetMap)(application_uid);
|
148
|
+
await (0, zephyr_edge_contract_1.removePartialAssetMap)(application_uid);
|
149
|
+
const assets = Object.assign({}, _assets, ...Object.values(partialAssetMap !== null && partialAssetMap !== void 0 ? partialAssetMap : {}));
|
150
|
+
const assetsMap = (0, zephyr_agent_1.buildAssetsMap)(assets, extractBuffer, getAssetType);
|
151
|
+
const missingAssets = (0, zephyr_agent_1.get_missing_assets)({ assetsMap, hash_set });
|
152
|
+
await (0, zephyr_agent_1.upload)({
|
153
|
+
pluginOptions,
|
154
|
+
assets: {
|
155
|
+
assetsMap,
|
156
|
+
missingAssets,
|
157
|
+
outputPath: vite_internal_options.outDir,
|
158
|
+
count: Object.keys(assets).length,
|
159
|
+
},
|
160
|
+
// @ts-expect-error TODO: fix this types to get legacy and current working
|
161
|
+
getDashData: zephyr_agent_1.zeGetDashData,
|
162
|
+
appConfig,
|
163
|
+
zeStart,
|
166
164
|
});
|
167
165
|
}
|
168
166
|
function extractBuffer(asset) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAG9B,+
|
1
|
+
{"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAG9B,+CAasB;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,OAAgB,CAAC;IACrB,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,KAAK,EAAE,MAAsB,EAAE,EAAE;;YAC/C,MAAM,CAAC,MAAM,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,SAAS;QACT,OAAO;KACR,CAAC,CAAC;AACL,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,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
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite-plugin-zephyr",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.26",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -13,8 +13,8 @@
|
|
13
13
|
"json5": "2.2.3",
|
14
14
|
"rollup": "^4.22.5",
|
15
15
|
"vite": "^5.4.8",
|
16
|
-
"zephyr-agent": "0.0.
|
17
|
-
"zephyr-edge-contract": "0.0.
|
16
|
+
"zephyr-agent": "0.0.26",
|
17
|
+
"zephyr-edge-contract": "0.0.26"
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
20
|
"@types/is-ci": "^3.0.4"
|