@openclaw/plugin-inspector 0.3.21 → 0.3.23

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/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.3.23 - 2026-08-30
6
+
7
+ ### Fixed
8
+
9
+ - Mask source comments in spans so inspecting large bundled JavaScript stays within serverless memory limits while preserving source offsets and findings.
10
+
11
+ ## 0.3.22 - 2026-08-30
12
+
13
+ ### Fixed
14
+
15
+ - Finish OpenClaw target archive extraction before cleanup so strict extraction errors cannot race unfinished filesystem writes.
16
+
17
+ ### Changed
18
+
19
+ - Refresh Crabbox hydration tooling to pnpm 11.24.0 and pnpm/action-setup 6.0.10.
20
+ - Update the code-scanning example to CodeQL's Node 24-based SARIF upload action.
21
+
5
22
  ## 0.3.21 - 2026-08-05
6
23
 
7
24
  ### Fixed
@@ -20,7 +20,7 @@ jobs:
20
20
  cache: npm
21
21
  - run: npm ci
22
22
  - run: npx @openclaw/plugin-inspector ci --no-openclaw --runtime --mock-sdk --allow-execute
23
- - uses: github/codeql-action/upload-sarif@v3
23
+ - uses: github/codeql-action/upload-sarif@v4
24
24
  if: always()
25
25
  with:
26
26
  sarif_file: reports/plugin-inspector.sarif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/plugin-inspector",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "private": false,
5
5
  "description": "Offline compatibility inspector for OpenClaw plugins.",
6
6
  "type": "module",
package/src/inspector.js CHANGED
@@ -727,38 +727,11 @@ function lineForOffset(text, offset) {
727
727
  }
728
728
 
729
729
  function stripComments(text) {
730
- let result = "";
731
- for (let index = 0; index < text.length; index += 1) {
732
- const char = text[index];
733
- const next = text[index + 1];
734
- if (char === "/" && next === "*") {
735
- result += " ";
736
- index += 2;
737
- while (index < text.length && !(text[index] === "*" && text[index + 1] === "/")) {
738
- result += blankCommentChar(text[index]);
739
- index += 1;
740
- }
741
- if (index < text.length) {
742
- result += " ";
743
- index += 1;
744
- }
745
- } else if (char === "/" && next === "/") {
746
- result += " ";
747
- index += 2;
748
- while (index < text.length && text[index] !== "\n" && text[index] !== "\r") {
749
- result += " ";
750
- index += 1;
751
- }
752
- index -= 1;
753
- } else {
754
- result += char;
755
- }
756
- }
757
- return result;
758
- }
759
-
760
- function blankCommentChar(char) {
761
- return char === "\n" || char === "\r" ? char : " ";
730
+ // Mask spans rather than building one string node per UTF-16 code unit.
731
+ // Keep offsets and CR/LF intact for findings, including unterminated comments.
732
+ return text.replace(/\/\*[\s\S]*?(?:\*\/|$)|\/\/[^\r\n]*/g, (comment) =>
733
+ comment.replace(/[^\r\n]+/g, (span) => " ".repeat(span.length)),
734
+ );
762
735
  }
763
736
 
764
737
  function sortDetails(details) {
@@ -149,7 +149,9 @@ async function preparePackageArchive(resolvedTarget, options) {
149
149
  try {
150
150
  const archivePath = path.join(temporaryDir, "openclaw.tgz");
151
151
  await writeFile(archivePath, archive);
152
- await extractTar({ cwd: temporaryDir, file: archivePath, strict: true });
152
+ // Async tar rejection can leave filesystem writes running. Finish extraction
153
+ // before finally removes its workspace, including when strict validation fails.
154
+ extractTar({ cwd: temporaryDir, file: archivePath, strict: true, sync: true });
153
155
  const packageDir = path.join(temporaryDir, "package");
154
156
  if (!(await isPreparedPackage(packageDir, resolvedTarget.version))) {
155
157
  throw new Error(`downloaded OpenClaw ${resolvedTarget.version} archive has unexpected package metadata`);