@secureci/cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -455,7 +455,6 @@ async function runInventory(files, options) {
|
|
|
455
455
|
}
|
|
456
456
|
// --dry-run: print the resolved inventory as JSON, touching nothing.
|
|
457
457
|
if (options.dryRun) {
|
|
458
|
-
// eslint-disable-next-line no-console
|
|
459
458
|
console.log(JSON.stringify({
|
|
460
459
|
actions,
|
|
461
460
|
advisories: advisoryReport.findings,
|
|
@@ -788,7 +787,6 @@ async function validateFiles(files, contractFile, recurse, format, offline) {
|
|
|
788
787
|
say(() => logger_1.logger.info(line.text));
|
|
789
788
|
}
|
|
790
789
|
if (quiet) {
|
|
791
|
-
// eslint-disable-next-line no-console
|
|
792
790
|
console.log((0, report_1.formatReport)(entries, format, { contract }));
|
|
793
791
|
if (!allValid)
|
|
794
792
|
process.exit(1);
|
|
@@ -66,7 +66,7 @@ function parsePipelineContract(filePath) {
|
|
|
66
66
|
parsed = YAML.parse(content);
|
|
67
67
|
}
|
|
68
68
|
catch (error) {
|
|
69
|
-
throw new Error(`Failed to parse contract file: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
69
|
+
throw new Error(`Failed to parse contract file: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
70
70
|
}
|
|
71
71
|
if (parsed === null || parsed === undefined) {
|
|
72
72
|
return {};
|
|
@@ -62,7 +62,9 @@ function parseWorkflow(filePath) {
|
|
|
62
62
|
}
|
|
63
63
|
catch (error) {
|
|
64
64
|
if (error instanceof Error) {
|
|
65
|
-
throw new Error(`Failed to parse workflow: ${error.message}
|
|
65
|
+
throw new Error(`Failed to parse workflow: ${error.message}`, {
|
|
66
|
+
cause: error
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
69
|
throw error;
|
|
68
70
|
}
|
|
@@ -94,7 +96,9 @@ function parseAction(filePath) {
|
|
|
94
96
|
}
|
|
95
97
|
catch (error) {
|
|
96
98
|
if (error instanceof Error) {
|
|
97
|
-
throw new Error(`Failed to parse action: ${error.message}
|
|
99
|
+
throw new Error(`Failed to parse action: ${error.message}`, {
|
|
100
|
+
cause: error
|
|
101
|
+
});
|
|
98
102
|
}
|
|
99
103
|
throw error;
|
|
100
104
|
}
|
|
@@ -225,7 +225,7 @@ function loadEvent(options, inputs, on) {
|
|
|
225
225
|
payload = JSON.parse(fs.readFileSync(options.eventPath, 'utf-8'));
|
|
226
226
|
}
|
|
227
227
|
catch (error) {
|
|
228
|
-
throw new Error(`Invalid event payload ${options.eventPath}: ${error instanceof Error ? error.message : String(error)}
|
|
228
|
+
throw new Error(`Invalid event payload ${options.eventPath}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
229
229
|
}
|
|
230
230
|
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {
|
|
231
231
|
throw new Error(`Invalid event payload ${options.eventPath}: expected a JSON object`);
|
|
@@ -280,7 +280,7 @@ function runPreIf(action, step, ctx) {
|
|
|
280
280
|
return (0, expression_1.evaluateCondition)(action.runs['pre-if'] ?? 'always()', ctx);
|
|
281
281
|
}
|
|
282
282
|
catch (error) {
|
|
283
|
-
throw new Error((0, expression_1.ifEvaluationError)(`step 'Pre ${step.name || step.uses}'`, error));
|
|
283
|
+
throw new Error((0, expression_1.ifEvaluationError)(`step 'Pre ${step.name || step.uses}'`, error), { cause: error });
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
//# sourceMappingURL=node-action.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secureci/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "SecureCI: validate, check against pipeline standards, and run GitHub Actions workflows locally",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"test:watch": "vitest",
|
|
20
20
|
"test:coverage": "vitest run --coverage",
|
|
21
21
|
"dev": "tsc --watch",
|
|
22
|
-
"lint": "eslint src
|
|
22
|
+
"lint": "eslint src",
|
|
23
23
|
"format": "prettier --write .",
|
|
24
24
|
"prepare": "npm run build"
|
|
25
25
|
},
|
|
@@ -63,18 +63,20 @@
|
|
|
63
63
|
"yaml": "^2.3.4"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@
|
|
66
|
+
"@eslint/js": "^10.0.1",
|
|
67
67
|
"@jabraf/prettier": "^3.0.1",
|
|
68
68
|
"@types/node": "^20.10.6",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
|
70
|
-
"@typescript-eslint/parser": "^8.71.1",
|
|
71
69
|
"@vitest/coverage-v8": "^4.1.12",
|
|
72
|
-
"eslint": "^
|
|
70
|
+
"eslint": "^10.14.0",
|
|
73
71
|
"postject": "1.0.0-alpha.6",
|
|
74
72
|
"typescript": "^5.3.3",
|
|
73
|
+
"typescript-eslint": "^8.72.1",
|
|
75
74
|
"vitest": "^4.1.12"
|
|
76
75
|
},
|
|
77
76
|
"volta": {
|
|
78
77
|
"node": "24.0.0"
|
|
78
|
+
},
|
|
79
|
+
"overrides": {
|
|
80
|
+
"minimatch": "^11.0.4"
|
|
79
81
|
}
|
|
80
82
|
}
|