@wrongstack/plugins 0.291.1 → 0.292.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/dist/duplicate-code-detector/index.d.ts.map +1 -1
- package/dist/duplicate-code-detector.js +35 -18
- package/dist/format-on-save/index.d.ts.map +1 -1
- package/dist/format-on-save.js +65 -27
- package/dist/git-autocommit/index.d.ts.map +1 -1
- package/dist/git-autocommit.js +54 -42
- package/dist/index.js +529 -310
- package/dist/notify-hub/index.d.ts +0 -39
- package/dist/notify-hub/index.d.ts.map +1 -1
- package/dist/notify-hub/webhook-channel.d.ts +56 -0
- package/dist/notify-hub/webhook-channel.d.ts.map +1 -0
- package/dist/notify-hub.js +241 -102
- package/dist/shell-check/index.d.ts.map +1 -1
- package/dist/shell-check.js +60 -36
- package/dist/spec-linker.js +529 -310
- package/dist/type-gate/index.d.ts.map +1 -1
- package/dist/type-gate.js +12 -23
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type-gate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type-gate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAuM/C,QAAA,MAAM,MAAM,EAAE,MAiOb,CAAC;eAEa,MAAM"}
|
package/dist/type-gate.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/type-gate/index.ts
|
|
2
|
-
import { execFileSync } from "node:child_process";
|
|
3
2
|
import { existsSync } from "node:fs";
|
|
4
3
|
|
|
5
4
|
// src/runtime/index.ts
|
|
@@ -243,7 +242,7 @@ function validateTsConfigPath(p) {
|
|
|
243
242
|
const sanitized = sanitizeRunnerPath(p);
|
|
244
243
|
return sanitized;
|
|
245
244
|
}
|
|
246
|
-
function runTypeCheck(cfg) {
|
|
245
|
+
async function runTypeCheck(cfg) {
|
|
247
246
|
const start = Date.now();
|
|
248
247
|
const rawTsConfig = cfg.tsConfigPath;
|
|
249
248
|
const validTsConfig = rawTsConfig && rawTsConfig !== "tsconfig.json" ? validateTsConfigPath(rawTsConfig) : null;
|
|
@@ -257,7 +256,7 @@ function runTypeCheck(cfg) {
|
|
|
257
256
|
if (!resolved) return null;
|
|
258
257
|
argv = [resolved.cmd, ...resolved.args];
|
|
259
258
|
} else {
|
|
260
|
-
argv = ["npx", "tsc", "--noEmit"];
|
|
259
|
+
argv = ["npx", "tsc", "--noEmit", "--incremental"];
|
|
261
260
|
if (tsConfig && tsConfig !== "tsconfig.json") {
|
|
262
261
|
argv = [...argv, "-p", tsConfig];
|
|
263
262
|
}
|
|
@@ -265,24 +264,14 @@ function runTypeCheck(cfg) {
|
|
|
265
264
|
if (!cfg.command && tsConfig && !existsSync(tsConfig)) {
|
|
266
265
|
return null;
|
|
267
266
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
shell: false
|
|
277
|
-
});
|
|
278
|
-
stdout = out;
|
|
279
|
-
} catch (err) {
|
|
280
|
-
const e = err;
|
|
281
|
-
if (e.killed) return null;
|
|
282
|
-
stdout = e.stdout ?? "";
|
|
283
|
-
stderr = e.stderr ?? "";
|
|
284
|
-
}
|
|
285
|
-
void runRunnerCommand;
|
|
267
|
+
const result = await runRunnerCommand([argv[0], ...argv.slice(1)], {
|
|
268
|
+
cwd: process.cwd(),
|
|
269
|
+
timeoutMs: cfg.timeoutMs
|
|
270
|
+
});
|
|
271
|
+
if (result.timedOut) return null;
|
|
272
|
+
if (result.spawnError) return null;
|
|
273
|
+
const stdout = result.stdout;
|
|
274
|
+
const stderr = result.stderr;
|
|
286
275
|
const combined = `${stdout}
|
|
287
276
|
${stderr}`.trim();
|
|
288
277
|
const durationMs = Date.now() - start;
|
|
@@ -365,7 +354,7 @@ var plugin = {
|
|
|
365
354
|
state.lastResult = null;
|
|
366
355
|
state.hookUnregister = null;
|
|
367
356
|
const cfg = readConfig(api.config.extensions?.["type-gate"]);
|
|
368
|
-
const hook = (input) => {
|
|
357
|
+
const hook = async (input) => {
|
|
369
358
|
if (!cfg.enabled) return;
|
|
370
359
|
if (input.toolResult?.isError) return;
|
|
371
360
|
const inp = input.toolInput ?? {};
|
|
@@ -378,7 +367,7 @@ var plugin = {
|
|
|
378
367
|
return;
|
|
379
368
|
}
|
|
380
369
|
state.invocationCount += 1;
|
|
381
|
-
const result = runTypeCheck(cfg);
|
|
370
|
+
const result = await runTypeCheck(cfg);
|
|
382
371
|
if (!result) {
|
|
383
372
|
state.errorCount += 1;
|
|
384
373
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/plugins",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.292.0",
|
|
4
4
|
"description": "Official WrongStack plugin collection — 64 focused, single-purpose plugins for code quality, security, observability, planning, and agent coordination",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ECOSTACK TECHNOLOGY OÜ",
|
|
@@ -282,8 +282,8 @@
|
|
|
282
282
|
"vitest": "^4.1.10"
|
|
283
283
|
},
|
|
284
284
|
"dependencies": {
|
|
285
|
-
"@wrongstack/core": "0.
|
|
286
|
-
"@wrongstack/tools": "0.
|
|
285
|
+
"@wrongstack/core": "0.292.0",
|
|
286
|
+
"@wrongstack/tools": "0.292.0"
|
|
287
287
|
},
|
|
288
288
|
"scripts": {
|
|
289
289
|
"build": "node ../../scripts/build-package.mjs",
|