@dsh-workbench/adapter-probe 1.1.15 → 1.1.17

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.
@@ -30,9 +30,24 @@ async function runtimeList(options) {
30
30
  retry: 'safe',
31
31
  timeoutMs: OPENCLI_TIMEOUT_MS,
32
32
  })
33
- .then((value) => ({ ok: true, stdout: value.exitCode === 0 ? value.stdout : '', stderr: value.stderr }), (error) => ({ ok: false, stdout: '', stderr: String(error) }));
33
+ .then((value) => ({
34
+ ok: true,
35
+ exitCode: value.exitCode,
36
+ timedOut: value.timedOut,
37
+ stdout: value.stdout,
38
+ stderr: value.stderr,
39
+ }), (error) => ({ ok: false, problem: String(error) }));
34
40
  if (!result.ok)
35
- return { failure: result.stderr };
41
+ return { failure: `plugin list 没跑起来:${result.problem}` };
42
+ if (result.timedOut) {
43
+ return { failure: `plugin list 超过 ${String(Math.round(OPENCLI_TIMEOUT_MS / 1000))} 秒没返回` };
44
+ }
45
+ if (result.exitCode !== 0) {
46
+ const tail = `${result.stderr}\n${result.stdout}`.trim().split('\n').slice(-3).join(' | ');
47
+ return {
48
+ failure: `plugin list 退出码 ${String(result.exitCode)}${tail === '' ? '' : `:${tail}`}`,
49
+ };
50
+ }
36
51
  const list = parsePluginList(result.stdout);
37
52
  return list === undefined ? { failure: 'plugin list 的输出读不懂(不是 JSON 数组)' } : { list };
38
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-workbench/adapter-probe",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "Workbench adapter-probe adapter.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,10 +14,10 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "proper-lockfile": "^4.1.2",
17
- "@dsh-workbench/adapter-profile": "1.1.15",
18
- "@dsh-workbench/adapter-runtime": "1.1.15",
19
- "@dsh-workbench/adapter-supply": "1.1.15",
20
- "@dsh-workbench/shared": "1.1.15"
17
+ "@dsh-workbench/adapter-profile": "1.1.17",
18
+ "@dsh-workbench/adapter-runtime": "1.1.17",
19
+ "@dsh-workbench/shared": "1.1.17",
20
+ "@dsh-workbench/adapter-supply": "1.1.17"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^24.19.0",