@hyzyn/dsh-safe 0.11.0 → 0.11.1

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.
Files changed (2) hide show
  1. package/lib/repair.js +4 -2
  2. package/package.json +1 -1
package/lib/repair.js CHANGED
@@ -24,12 +24,14 @@ const out = (line) => process.stdout.write(`${line}\n`)
24
24
  * repair 可修复的失败特征:问题出在"包的安装状态或版本适配"上,重装/升级
25
25
  * 插件包可能修复——
26
26
  * - 模块解析失败:包缺失/损坏/未安装 → 重装即愈;
27
- * - ESM 导出不匹配(does not provide an export/import binding):插件与
27
+ * - ESM 导出不匹配(does not provide an [export|import binding]):插件与
28
28
  * 当前 dsh API 版本不兼容,升级插件到适配版本可能修复(真实案例:
29
29
  * describe-image 隔离于 dsh-settings 导出变更)。修复失败不恢复、无损。
30
+ * 注意:台账 reason 经 summarizeLine 截断过(160 字符),关键短语可能被
31
+ * "…" 切断,因此导出不匹配的特征只匹配到 "does not provide an" 为止。
30
32
  */
31
33
  const REPAIRABLE_RE =
32
- /Cannot find package|could not be resolved|ERR_MODULE_NOT_FOUND|does not provide an (?:export|import binding)/i
34
+ /Cannot find package|could not be resolved|ERR_MODULE_NOT_FOUND|does not provide an( (?:export|import binding))?/i
33
35
 
34
36
  function parseRepairArgs(args) {
35
37
  const opts = { id: undefined, profile: undefined, to: undefined, yes: false, dryRun: false }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyzyn/dsh-safe",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "dsh 启动保险丝:社区插件不兼容导致 dsh 启动失败时,自动禁用坏插件并重试",
5
5
  "type": "module",
6
6
  "license": "MIT",