@cejel/cejel 0.1.3 → 0.1.4
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/LICENSE +656 -10
- package/README.md +73 -8
- package/dist/{chunk-QQVCIG4N.js → chunk-SQNTNX5U.js} +1645 -3038
- package/dist/index.js +13 -4
- package/dist/mcp/index.js +216 -216
- package/package.json +9 -7
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
createWitanAttestation,
|
|
3
4
|
formatExternalSourceLine,
|
|
4
5
|
renderWitanBadgeEndpoint,
|
|
5
6
|
renderWitanBadgeSvg,
|
|
6
7
|
renderWitanHtmlReport,
|
|
7
|
-
runCejelScan
|
|
8
|
-
|
|
8
|
+
runCejelScan,
|
|
9
|
+
serializeWitanReport
|
|
10
|
+
} from "./chunk-SQNTNX5U.js";
|
|
9
11
|
|
|
10
12
|
// src/index.ts
|
|
11
13
|
import { mkdirSync, readFileSync, realpathSync, writeFileSync } from "fs";
|
|
@@ -132,7 +134,7 @@ var usageOptions = CLI_FLAG_SPECS.map(
|
|
|
132
134
|
).join("\n");
|
|
133
135
|
var USAGE = `cejel \u2014 a trust certificate for your codebase
|
|
134
136
|
|
|
135
|
-
Usage: npx
|
|
137
|
+
Usage: npx cejel [path] [options]
|
|
136
138
|
|
|
137
139
|
Options:
|
|
138
140
|
${usageOptions}
|
|
@@ -160,8 +162,14 @@ async function runWitanFreeCli(args) {
|
|
|
160
162
|
ingestPatterns: options.ingestPatterns,
|
|
161
163
|
warnOnEmptyIngestMatch: !options.quiet
|
|
162
164
|
});
|
|
165
|
+
const attestation = createWitanAttestation(report, { toolVersion: cliVersion() });
|
|
163
166
|
mkdirSync(options.outDir, { recursive: true });
|
|
164
|
-
writeFileSync(join(options.outDir, "report.json"),
|
|
167
|
+
writeFileSync(join(options.outDir, "report.json"), serializeWitanReport(report), "utf8");
|
|
168
|
+
writeFileSync(
|
|
169
|
+
join(options.outDir, "attestation.json"),
|
|
170
|
+
JSON.stringify(attestation, null, 2),
|
|
171
|
+
"utf8"
|
|
172
|
+
);
|
|
165
173
|
writeFileSync(join(options.outDir, "certificate.html"), renderWitanHtmlReport(report), "utf8");
|
|
166
174
|
writeFileSync(
|
|
167
175
|
join(options.outDir, "badge.json"),
|
|
@@ -176,6 +184,7 @@ async function runWitanFreeCli(args) {
|
|
|
176
184
|
`
|
|
177
185
|
Wrote:
|
|
178
186
|
${options.outDir}/report.json
|
|
187
|
+
${options.outDir}/attestation.json
|
|
179
188
|
${options.outDir}/certificate.html
|
|
180
189
|
${options.outDir}/badge.json
|
|
181
190
|
${options.outDir}/badge.svg
|