dsh-client-auto-continue 0.5.4 → 0.5.5

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
@@ -244,6 +244,8 @@ npm run test # node tests/simulate.mjs — 22 behavioral scenarios
244
244
 
245
245
  While `npm run watch` runs, the profile's client-hmr row polls `lib/client.js` every 500 ms and hot-reloads the plugin in the browser — no server restart needed for code changes.
246
246
 
247
+ CI runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check) on every push / PR and gates releases — the tag workflow refuses to publish while the check fails.
248
+
247
249
  ---
248
250
 
249
251
  ## Activity
package/README.zh.md CHANGED
@@ -240,6 +240,8 @@ npm run test # node tests/simulate.mjs — 22 个行为场景
240
240
 
241
241
  `npm run watch` 运行时, profile 的 client-hmr 行每 500ms 轮询 `lib/client.js` 并在浏览器中热重载插件——改代码无需重启服务。
242
242
 
243
+ CI 在每次 push / PR 时跑 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check) 体检, 并作为发布的前置条件——体检失败时 tag 流程拒绝发布。
244
+
243
245
  ---
244
246
 
245
247
  ## 活跃度
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-client-auto-continue",
3
3
  "description": "DSH Web UI plugin: automatically sends \"继续\" (continue) when a request is interrupted by network errors or other non-human causes",
4
- "version": "0.5.4",
4
+ "version": "0.5.5",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -0,0 +1,33 @@
1
+ /**
2
+ * CI runner for the dsh-plugin-check health check
3
+ * (https://github.com/omdsh-dev/dsh-plugin-check).
4
+ *
5
+ * The checker is a dsh tool rather than a CLI, so this script drives its
6
+ * `checkRepo` export directly. It exits non-zero when the verdict is `fail`,
7
+ * which makes it usable as a daily push / PR check and as a release gate.
8
+ *
9
+ * Environment:
10
+ * CHECKER_DIR where the checker repo was cloned (default /tmp/dsh-plugin-check)
11
+ * CHECK_TARGET the plugin repo directory to check (default process.cwd())
12
+ */
13
+ const checkerDir = process.env.CHECKER_DIR ?? '/tmp/dsh-plugin-check';
14
+ const target = process.env.CHECK_TARGET ?? process.cwd();
15
+
16
+ const { checkRepo } = await import(`${checkerDir}/lib/index.js`);
17
+
18
+ const report = await checkRepo(target, false);
19
+
20
+ console.log(`repo: ${report.repo} | kind: ${report.kind} | verdict: ${report.verdict}`);
21
+ console.log(
22
+ `checks: total=${report.checks.total} passed=${report.checks.passed} ` +
23
+ `failed=${report.checks.failed} warned=${report.checks.warned} skipped=${report.checks.skipped}`,
24
+ );
25
+ for (const error of report.errors) console.log(`ERROR ${error.code} - ${error.detail}`);
26
+ for (const warning of report.warnings) console.log(`WARNING ${warning.code} - ${warning.detail}`);
27
+ for (const skipped of report.skipped) console.log(`SKIPPED ${skipped}`);
28
+
29
+ if (report.verdict === 'fail') {
30
+ console.error('plugin_check: FAIL — fix the errors above');
31
+ process.exit(1);
32
+ }
33
+ console.log('plugin_check: PASS');