@wrongstack/plugins 0.286.0 → 0.289.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 +20 -11
- package/dist/accessibility-auditor/index.d.ts.map +1 -1
- package/dist/accessibility-auditor.js +67 -55
- package/dist/api-compatibility-gate.js +1 -1
- package/dist/auto-doc.js +1 -1
- package/dist/auto-i18n-extractor/index.d.ts.map +1 -1
- package/dist/auto-i18n-extractor.js +20 -12
- package/dist/changelog-writer.js +1 -1
- package/dist/code-metrics/index.d.ts.map +1 -1
- package/dist/code-metrics.js +63 -50
- package/dist/commit-validator.js +1 -1
- package/dist/config-validator.js +1 -1
- package/dist/cost-tracker/index.d.ts.map +1 -1
- package/dist/cost-tracker.js +4 -2
- package/dist/cron/index.d.ts.map +1 -1
- package/dist/cron.js +29 -0
- package/dist/dead-code-detector/index.d.ts.map +1 -1
- package/dist/dead-code-detector.js +28 -19
- package/dist/dep-guard.js +1 -1
- package/dist/diff-summary/index.d.ts.map +1 -1
- package/dist/diff-summary.js +19 -11
- package/dist/doc-sync-guard/index.d.ts.map +1 -1
- package/dist/doc-sync-guard.js +25 -16
- package/dist/duplicate-code-detector/index.d.ts.map +1 -1
- package/dist/duplicate-code-detector.js +70 -57
- package/dist/error-lens.js +1 -1
- package/dist/feature-flag-tracker/index.d.ts.map +1 -1
- package/dist/feature-flag-tracker.js +69 -56
- package/dist/file-watcher/index.d.ts.map +1 -1
- package/dist/file-watcher.js +21 -4
- package/dist/format-on-save/index.d.ts.map +1 -1
- package/dist/format-on-save.js +19 -11
- package/dist/git-autocommit.js +1 -1
- package/dist/import-organizer/index.d.ts.map +1 -1
- package/dist/import-organizer.js +23 -14
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1167 -1048
- package/dist/interface-contract-guard/index.d.ts.map +1 -1
- package/dist/interface-contract-guard.js +64 -51
- package/dist/lint-gate/index.d.ts.map +1 -1
- package/dist/lint-gate.js +61 -30
- package/dist/migration-planner/index.d.ts +12 -2
- package/dist/migration-planner/index.d.ts.map +1 -1
- package/dist/migration-planner.js +210 -28
- package/dist/pr-drafter.js +1 -1
- package/dist/prompt-firewall/index.d.ts +14 -6
- package/dist/prompt-firewall/index.d.ts.map +1 -1
- package/dist/prompt-firewall.js +7 -6
- package/dist/refactor-suggester/index.d.ts.map +1 -1
- package/dist/refactor-suggester.js +69 -56
- package/dist/release-notes-generator/index.d.ts +3 -1
- package/dist/release-notes-generator/index.d.ts.map +1 -1
- package/dist/release-notes-generator.js +152 -12
- package/dist/runtime/index.d.ts +36 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/llm.d.ts +33 -0
- package/dist/runtime/llm.d.ts.map +1 -0
- package/dist/runtime.js +119 -25
- package/dist/schema-evolution-guard/index.d.ts.map +1 -1
- package/dist/schema-evolution-guard.js +22 -13
- package/dist/secret-scanner/index.d.ts.map +1 -1
- package/dist/secret-scanner.js +17 -6
- package/dist/security-hotspot-scanner/index.d.ts.map +1 -1
- package/dist/security-hotspot-scanner.js +24 -15
- package/dist/session-recap.js +1 -1
- package/dist/spec-linker.js +1167 -1048
- package/dist/test-generator/index.d.ts +5 -3
- package/dist/test-generator/index.d.ts.map +1 -1
- package/dist/test-generator.js +169 -26
- package/dist/test-runner-gate/index.d.ts.map +1 -1
- package/dist/test-runner-gate.js +65 -43
- package/dist/type-gate/index.d.ts.map +1 -1
- package/dist/type-gate.js +23 -35
- package/package.json +3 -3
package/dist/type-gate.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// src/type-gate/index.ts
|
|
2
2
|
import { execFileSync } from "node:child_process";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
|
-
import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2 } from "node:path";
|
|
5
4
|
|
|
6
5
|
// src/runtime/index.ts
|
|
7
6
|
import { execFile } from "node:child_process";
|
|
8
|
-
import { basename, isAbsolute, relative, resolve } from "node:path";
|
|
7
|
+
import { basename, extname, isAbsolute, relative, resolve } from "node:path";
|
|
9
8
|
var META_CHARS = /["'`;&|<>\r\n]/;
|
|
10
9
|
var MAX_BUFFER_BYTES = 16 * 1024 * 1024;
|
|
11
10
|
function hasLeadingDash(arg) {
|
|
@@ -104,12 +103,15 @@ function runRunnerCommand(argv, options) {
|
|
|
104
103
|
});
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
107
|
-
|
|
106
|
+
let timedOut = false;
|
|
108
107
|
let spawnErrored = false;
|
|
109
108
|
const stdoutChunks = [];
|
|
110
109
|
const stderrChunks = [];
|
|
111
110
|
let stdoutBytes = 0;
|
|
112
111
|
let stderrBytes = 0;
|
|
112
|
+
options.signal?.addEventListener("abort", () => {
|
|
113
|
+
timedOut = true;
|
|
114
|
+
}, { once: true });
|
|
113
115
|
const child = execFile(
|
|
114
116
|
argv[0],
|
|
115
117
|
argv.slice(1),
|
|
@@ -121,12 +123,12 @@ function runRunnerCommand(argv, options) {
|
|
|
121
123
|
windowsHide: true,
|
|
122
124
|
shell: false
|
|
123
125
|
},
|
|
124
|
-
(err
|
|
126
|
+
(err) => {
|
|
125
127
|
if (timedOut) {
|
|
126
128
|
resolvePromise({
|
|
127
129
|
code: null,
|
|
128
|
-
stdout: Buffer.concat(
|
|
129
|
-
stderr: Buffer.concat(
|
|
130
|
+
stdout: Buffer.concat(stdoutChunks).toString("utf8"),
|
|
131
|
+
stderr: Buffer.concat(stderrChunks).toString("utf8"),
|
|
130
132
|
timedOut: true,
|
|
131
133
|
spawnError: false
|
|
132
134
|
});
|
|
@@ -135,8 +137,8 @@ function runRunnerCommand(argv, options) {
|
|
|
135
137
|
if (spawnErrored) {
|
|
136
138
|
resolvePromise({
|
|
137
139
|
code: 127,
|
|
138
|
-
stdout: Buffer.concat(
|
|
139
|
-
stderr: Buffer.concat(
|
|
140
|
+
stdout: Buffer.concat(stdoutChunks).toString("utf8"),
|
|
141
|
+
stderr: Buffer.concat(stderrChunks).toString("utf8"),
|
|
140
142
|
timedOut: false,
|
|
141
143
|
spawnError: true
|
|
142
144
|
});
|
|
@@ -147,14 +149,8 @@ function runRunnerCommand(argv, options) {
|
|
|
147
149
|
const code = typeof anyErr.code === "number" ? anyErr.code : 1;
|
|
148
150
|
resolvePromise({
|
|
149
151
|
code,
|
|
150
|
-
stdout: Buffer.concat(
|
|
151
|
-
|
|
152
|
-
...anyErr.stdout ? [Buffer.isBuffer(anyErr.stdout) ? anyErr.stdout : Buffer.from(anyErr.stdout)] : []
|
|
153
|
-
]).toString("utf8"),
|
|
154
|
-
stderr: Buffer.concat([
|
|
155
|
-
...stderrChunks,
|
|
156
|
-
...anyErr.stderr ? [Buffer.isBuffer(anyErr.stderr) ? anyErr.stderr : Buffer.from(anyErr.stderr)] : []
|
|
157
|
-
]).toString("utf8"),
|
|
152
|
+
stdout: Buffer.concat(stdoutChunks).toString("utf8"),
|
|
153
|
+
stderr: Buffer.concat(stderrChunks).toString("utf8"),
|
|
158
154
|
timedOut: false,
|
|
159
155
|
spawnError: false
|
|
160
156
|
});
|
|
@@ -162,19 +158,18 @@ function runRunnerCommand(argv, options) {
|
|
|
162
158
|
}
|
|
163
159
|
resolvePromise({
|
|
164
160
|
code: 0,
|
|
165
|
-
stdout: Buffer.concat(
|
|
166
|
-
|
|
167
|
-
...Buffer.isBuffer(stdout) ? [stdout] : [Buffer.from(stdout)]
|
|
168
|
-
]).toString("utf8"),
|
|
169
|
-
stderr: Buffer.concat([
|
|
170
|
-
...stderrChunks,
|
|
171
|
-
...Buffer.isBuffer(stderr) ? [stderr] : [Buffer.from(stderr)]
|
|
172
|
-
]).toString("utf8"),
|
|
161
|
+
stdout: Buffer.concat(stdoutChunks).toString("utf8"),
|
|
162
|
+
stderr: Buffer.concat(stderrChunks).toString("utf8"),
|
|
173
163
|
timedOut: false,
|
|
174
164
|
spawnError: false
|
|
175
165
|
});
|
|
176
166
|
}
|
|
177
167
|
);
|
|
168
|
+
child.on("exit", (_code, signal) => {
|
|
169
|
+
if (signal !== null) {
|
|
170
|
+
timedOut = true;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
178
173
|
child.stdout?.on("data", (chunk) => {
|
|
179
174
|
stdoutBytes += chunk.length;
|
|
180
175
|
if (stdoutBytes <= MAX_BUFFER_BYTES) stdoutChunks.push(chunk);
|
|
@@ -190,6 +185,9 @@ function runRunnerCommand(argv, options) {
|
|
|
190
185
|
});
|
|
191
186
|
});
|
|
192
187
|
}
|
|
188
|
+
function withinProject(p) {
|
|
189
|
+
return withinProjectPath(process.cwd(), p) || relative(process.cwd(), p) === ".";
|
|
190
|
+
}
|
|
193
191
|
|
|
194
192
|
// src/type-gate/index.ts
|
|
195
193
|
var API_VERSION = "^0.1.10";
|
|
@@ -225,16 +223,6 @@ function readConfig(raw) {
|
|
|
225
223
|
runOnChange: Array.isArray(r["runOnChange"]) ? r["runOnChange"].filter((x) => typeof x === "string") : DEFAULTS.runOnChange
|
|
226
224
|
};
|
|
227
225
|
}
|
|
228
|
-
function withinProject(p) {
|
|
229
|
-
if (typeof p !== "string" || p.length === 0 || p.length > 4096) return false;
|
|
230
|
-
const root = process.cwd();
|
|
231
|
-
const resolved = isAbsolute2(p) ? resolve2(p) : resolve2(root, p);
|
|
232
|
-
const rel = relative2(root, resolved);
|
|
233
|
-
if (rel === "" || rel === ".") return true;
|
|
234
|
-
if (rel.startsWith("..")) return false;
|
|
235
|
-
if (isAbsolute2(rel)) return false;
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
226
|
var TSC_RUNTIME = {
|
|
239
227
|
id: "typescript",
|
|
240
228
|
packageManager: "pnpm",
|
|
@@ -421,7 +409,7 @@ Fix the type error(s) or adjust the change.`;
|
|
|
421
409
|
}
|
|
422
410
|
return { additionalContext: message };
|
|
423
411
|
};
|
|
424
|
-
state.hookUnregister = api.registerHook("PostToolUse", "write|edit", hook);
|
|
412
|
+
state.hookUnregister = api.registerHook("PostToolUse", "write|edit", hook, { background: true });
|
|
425
413
|
api.tools.register({
|
|
426
414
|
name: "type_gate_status",
|
|
427
415
|
description: "Reports type-gate state: command, tsconfig, severity, and per-session pass/fail/error counters.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/plugins",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.289.0",
|
|
4
4
|
"description": "Official WrongStack plugin collection — 63 focused, single-purpose plugins for code quality, security, observability, planning, and agent coordination",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ECOSTACK TECHNOLOGY OÜ",
|
|
@@ -278,8 +278,8 @@
|
|
|
278
278
|
"vitest": "^4.1.9"
|
|
279
279
|
},
|
|
280
280
|
"dependencies": {
|
|
281
|
-
"@wrongstack/core": "0.
|
|
282
|
-
"@wrongstack/tools": "0.
|
|
281
|
+
"@wrongstack/core": "0.289.0",
|
|
282
|
+
"@wrongstack/tools": "0.289.0"
|
|
283
283
|
},
|
|
284
284
|
"scripts": {
|
|
285
285
|
"build": "node ../../scripts/build-package.mjs",
|