parcel-reporter-zephyr 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAssetsMap = getAssetsMap;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
5
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
6
6
|
const zephyr_agent_1 = require("zephyr-agent");
|
|
7
7
|
function getAssetsMap(assets) {
|
|
8
8
|
// Convert Map to a plain object (Record<string, ParcelOutputAsset>)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-assets-map.js","sourceRoot":"","sources":["../../src/lib/get-assets-map.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"get-assets-map.js","sourceRoot":"","sources":["../../src/lib/get-assets-map.ts"],"names":[],"mappings":";;AAWA,oCAYC;;AAvBD,oDAA8B;AAE9B,+CAAsD;AAStD,SAAgB,YAAY,CAAC,MAAsC;IACjE,oEAAoE;IACpE,MAAM,YAAY,GAAsC,EAAE,CAAC;IAE3D,8BAA8B;IAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5C,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAExD,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,OAAO,IAAA,6BAAc,EAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAsB,EAAE;IACrE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAA,qBAAM,EAAC,GAAG,CAAC,CAAC;YACZ,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACtC,CAAC,CAAC,KAAK,CAAC,OAAO;QACf,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAU,EAAE;IACxD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -2,32 +2,37 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onBuildSuccess = onBuildSuccess;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const get_assets_map_1 = require("./get-assets-map");
|
|
5
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
7
6
|
const zephyr_agent_1 = require("zephyr-agent");
|
|
7
|
+
const get_assets_map_1 = require("./get-assets-map");
|
|
8
8
|
const assets = new Map();
|
|
9
9
|
async function onBuildSuccess(props) {
|
|
10
10
|
const { event, zephyr_engine_defer } = props;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
name
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
try {
|
|
12
|
+
const zephyr_engine = await zephyr_engine_defer;
|
|
13
|
+
// Start a new build
|
|
14
|
+
await zephyr_engine.start_new_build();
|
|
15
|
+
// Collect assets from the build
|
|
16
|
+
event.bundleGraph.getBundles().forEach((bundle) => {
|
|
17
|
+
const filePath = bundle.filePath;
|
|
18
|
+
if (!filePath)
|
|
19
|
+
return;
|
|
20
|
+
const name = node_path_1.default.basename(filePath);
|
|
21
|
+
assets.set(name, {
|
|
22
|
+
name: name,
|
|
23
|
+
filePath,
|
|
24
|
+
type: bundle.type,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
// Upload assets and finish the build
|
|
28
|
+
await zephyr_engine.upload_assets({
|
|
29
|
+
assetsMap: (0, get_assets_map_1.getAssetsMap)(assets),
|
|
30
|
+
buildStats: await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine),
|
|
24
31
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
await zephyr_engine.build_finished();
|
|
32
|
+
await zephyr_engine.build_finished();
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
(0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
38
|
//# sourceMappingURL=on-build-success.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-build-success.js","sourceRoot":"","sources":["../../src/lib/on-build-success.ts"],"names":[],"mappings":";;AAYA,
|
|
1
|
+
{"version":3,"file":"on-build-success.js","sourceRoot":"","sources":["../../src/lib/on-build-success.ts"],"names":[],"mappings":";;AAYA,wCAiCC;;AA5CD,kEAA6B;AAC7B,+CAAsF;AACtF,qDAAwE;AAExE,MAAM,MAAM,GAAG,IAAI,GAAG,EAA6B,CAAC;AAO7C,KAAK,UAAU,cAAc,CAAC,KAA0B;IAC7D,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAE7C,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;QAEhD,oBAAoB;QACpB,MAAM,aAAa,CAAC,eAAe,EAAE,CAAC;QAEtC,gCAAgC;QAChC,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YACjC,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAEtB,MAAM,IAAI,GAAG,mBAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAErC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;gBACf,IAAI,EAAE,IAAI;gBACV,QAAQ;gBACR,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,qCAAqC;QACrC,MAAM,aAAa,CAAC,aAAa,CAAC;YAChC,SAAS,EAAE,IAAA,6BAAY,EAAC,MAAM,CAAC;YAC/B,UAAU,EAAE,MAAM,IAAA,8BAAe,EAAC,aAAa,CAAC;SACjD,CAAC,CAAC;QAEH,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,oBAAK,EAAC,OAAO,EAAE,0BAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parcel-reporter-zephyr",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
|
+
"description": "Parcel reporter for Zephyr",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ZephyrCloudIO/zephyr-packages.git",
|
|
8
|
+
"directory": "libs/parcel-reporter-zephyr"
|
|
9
|
+
},
|
|
4
10
|
"license": "Apache-2.0",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "ZephyrCloudIO",
|
|
13
|
+
"url": "https://github.com/ZephyrCloudIO"
|
|
14
|
+
},
|
|
15
|
+
"type": "commonjs",
|
|
5
16
|
"main": "dist/index.js",
|
|
6
17
|
"types": "dist/index.d.ts",
|
|
7
18
|
"scripts": {
|
|
@@ -9,17 +20,20 @@
|
|
|
9
20
|
"patch-version": "pnpm version"
|
|
10
21
|
},
|
|
11
22
|
"dependencies": {
|
|
12
|
-
"
|
|
23
|
+
"@parcel/core": "catalog:parcel",
|
|
13
24
|
"@parcel/plugin": "catalog:parcel",
|
|
14
25
|
"@parcel/types": "catalog:parcel",
|
|
15
|
-
"
|
|
26
|
+
"is-ci": "catalog:plugin-shared",
|
|
16
27
|
"zephyr-agent": "workspace:*"
|
|
17
28
|
},
|
|
18
29
|
"devDependencies": {
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "catalog:eslint",
|
|
20
30
|
"@types/is-ci": "catalog:typescript",
|
|
21
|
-
"
|
|
22
|
-
"@
|
|
31
|
+
"@types/jest": "catalog:typescript",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "catalog:eslint",
|
|
33
|
+
"ts-jest": "catalog:typescript"
|
|
23
34
|
},
|
|
24
|
-
"
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true
|
|
38
|
+
}
|
|
25
39
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parcel-reporter-zephyr",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
|
+
"description": "Parcel reporter for Zephyr",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ZephyrCloudIO/zephyr-packages.git",
|
|
8
|
+
"directory": "libs/parcel-reporter-zephyr"
|
|
9
|
+
},
|
|
4
10
|
"license": "Apache-2.0",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "ZephyrCloudIO",
|
|
13
|
+
"url": "https://github.com/ZephyrCloudIO"
|
|
14
|
+
},
|
|
15
|
+
"type": "commonjs",
|
|
5
16
|
"main": "dist/index.js",
|
|
6
17
|
"types": "dist/index.d.ts",
|
|
7
18
|
"dependencies": {
|
|
8
|
-
"
|
|
19
|
+
"@parcel/core": "^2.13.3",
|
|
9
20
|
"@parcel/plugin": "^2.13.3",
|
|
10
21
|
"@parcel/types": "^2.13.3",
|
|
11
|
-
"
|
|
12
|
-
"zephyr-agent": "0.0.
|
|
22
|
+
"is-ci": "^4.1.0",
|
|
23
|
+
"zephyr-agent": "0.0.43"
|
|
13
24
|
},
|
|
14
25
|
"devDependencies": {
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
16
26
|
"@types/is-ci": "3.0.4",
|
|
17
|
-
"
|
|
18
|
-
"@
|
|
27
|
+
"@types/jest": "29.5.14",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
29
|
+
"ts-jest": "^29.2.6"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"provenance": true
|
|
19
34
|
},
|
|
20
35
|
"scripts": {
|
|
21
36
|
"build": "nx run parcel-reporter-zephyr:build",
|