codex-plugin-doctor 1.19.0 → 1.21.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/README.md +3 -3
- package/dist/core/dep-audit.js +5 -1
- package/dist/core/npm-package-doctor.js +12 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -370,9 +370,9 @@ jobs:
|
|
|
370
370
|
runs-on: ubuntu-latest
|
|
371
371
|
steps:
|
|
372
372
|
- uses: actions/checkout@v5
|
|
373
|
-
- uses: Esquetta/CodexPluginDoctor@v1.
|
|
373
|
+
- uses: Esquetta/CodexPluginDoctor@v1.21.0
|
|
374
374
|
with:
|
|
375
|
-
version: "1.
|
|
375
|
+
version: "1.21.0"
|
|
376
376
|
path: .
|
|
377
377
|
runtime: "true"
|
|
378
378
|
policy: codex-publish
|
|
@@ -384,7 +384,7 @@ jobs:
|
|
|
384
384
|
review-bundle-verify: "true"
|
|
385
385
|
```
|
|
386
386
|
|
|
387
|
-
The action writes `codex-plugin-doctor-summary.md`, `codex-plugin-doctor-report.json`, optional `codex-plugin-doctor.sarif`, optional `validation-corpus.json`, optional `output-contract.json`, and optional signed `review-bundle/` files to `codex-plugin-doctor-reports`, appends the Markdown report to the GitHub Actions step summary, uploads the report directory as an artifact, and then returns the real validation exit code. Review bundle generation requires a signing key environment variable such as `CODEX_PLUGIN_DOCTOR_SIGNING_KEY`. For runtime probing, SARIF output, corpus and contract artifacts, review bundle artifacts, installed plugin cache checks, CI policy presets, and pinned release examples, see [GitHub Action Usage](./docs/engineering/github-action-usage.md).
|
|
387
|
+
The action writes `codex-plugin-doctor-summary.md`, `codex-plugin-doctor-report.json`, `codex-plugin-doctor-action-manifest.json`, optional `codex-plugin-doctor.sarif`, optional `validation-corpus.json`, optional `output-contract.json`, and optional signed `review-bundle/` files to `codex-plugin-doctor-reports`, appends the Markdown report to the GitHub Actions step summary, uploads the report directory as an artifact, and then returns the real validation exit code. Review bundle generation requires a signing key environment variable such as `CODEX_PLUGIN_DOCTOR_SIGNING_KEY`. For runtime probing, SARIF output, corpus and contract artifacts, review bundle artifacts, installed plugin cache checks, CI policy presets, and pinned release examples, see [GitHub Action Usage](./docs/engineering/github-action-usage.md).
|
|
388
388
|
|
|
389
389
|
To self-test this repository after cloning it:
|
|
390
390
|
|
package/dist/core/dep-audit.js
CHANGED
|
@@ -15,7 +15,11 @@ async function fileExists(filePath) {
|
|
|
15
15
|
}
|
|
16
16
|
async function runNpmAudit(cwd) {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
|
-
|
|
18
|
+
const command = process.platform === "win32" ? process.env.ComSpec ?? "cmd.exe" : "npm";
|
|
19
|
+
const args = process.platform === "win32"
|
|
20
|
+
? ["/d", "/s", "/c", "npm", "audit", "--json"]
|
|
21
|
+
: ["audit", "--json"];
|
|
22
|
+
execFile(command, args, { cwd, timeout: 120_000 }, (error, stdout, stderr) => {
|
|
19
23
|
const parsed = (() => {
|
|
20
24
|
try {
|
|
21
25
|
return JSON.parse(stdout);
|
|
@@ -7,8 +7,14 @@ import { gunzip } from "node:zlib";
|
|
|
7
7
|
import { buildDoctorRecommendationsFromAnalysis, buildPackageAnalysis } from "./package-analysis.js";
|
|
8
8
|
const execFileAsync = promisify(execFile);
|
|
9
9
|
const gunzipAsync = promisify(gunzip);
|
|
10
|
-
function npmCommand() {
|
|
11
|
-
|
|
10
|
+
function npmCommand(args) {
|
|
11
|
+
if (process.platform === "win32") {
|
|
12
|
+
return {
|
|
13
|
+
command: process.env.ComSpec ?? "cmd.exe",
|
|
14
|
+
args: ["/d", "/s", "/c", "npm", ...args]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return { command: "npm", args };
|
|
12
18
|
}
|
|
13
19
|
function isPathWithinRoot(rootPath, candidatePath) {
|
|
14
20
|
const relativePath = path.relative(rootPath, candidatePath);
|
|
@@ -80,17 +86,17 @@ async function resolvePackageSpecForPack(packageSpec) {
|
|
|
80
86
|
}
|
|
81
87
|
async function packNpmPackage(packageSpec, destinationPath) {
|
|
82
88
|
const resolvedPackageSpec = await resolvePackageSpecForPack(packageSpec);
|
|
83
|
-
const
|
|
89
|
+
const npmPackCommand = npmCommand([
|
|
84
90
|
"pack",
|
|
85
91
|
resolvedPackageSpec,
|
|
86
92
|
"--json",
|
|
87
93
|
"--ignore-scripts",
|
|
88
94
|
"--pack-destination",
|
|
89
95
|
destinationPath
|
|
90
|
-
]
|
|
96
|
+
]);
|
|
97
|
+
const { stdout } = await execFileAsync(npmPackCommand.command, npmPackCommand.args, {
|
|
91
98
|
cwd: destinationPath,
|
|
92
|
-
maxBuffer: 10 * 1024 * 1024
|
|
93
|
-
shell: process.platform === "win32"
|
|
99
|
+
maxBuffer: 10 * 1024 * 1024
|
|
94
100
|
});
|
|
95
101
|
const packEntries = JSON.parse(stdout);
|
|
96
102
|
const metadata = packEntries[0];
|
package/package.json
CHANGED