codex-plugin-doctor 1.20.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 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.20.0
373
+ - uses: Esquetta/CodexPluginDoctor@v1.21.0
374
374
  with:
375
- version: "1.20.0"
375
+ version: "1.21.0"
376
376
  path: .
377
377
  runtime: "true"
378
378
  policy: codex-publish
@@ -15,7 +15,11 @@ async function fileExists(filePath) {
15
15
  }
16
16
  async function runNpmAudit(cwd) {
17
17
  return new Promise((resolve, reject) => {
18
- execFile("npm", ["audit", "--json"], { cwd, shell: process.platform === "win32", timeout: 120_000 }, (error, stdout, stderr) => {
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
- return "npm";
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 { stdout } = await execFileAsync(npmCommand(), [
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-plugin-doctor",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "CLI-first validator for Codex plugins, skills, and MCP package surfaces with runtime MCP protocol validation.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",