@deepwhale-cn/dsh-contract-check 0.1.4 → 0.1.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.
Files changed (2) hide show
  1. package/lib/client.js +1 -1
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -22,7 +22,7 @@ window.__ModuleLoader__.load({
22
22
  for (const f of files) payload.push({ name: (dir ? (f.webkitRelativePath || f.name) : f.name), data: await 读成base64(f) });
23
23
  const r = await fetch(API + '/upload', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ files: payload }) });
24
24
  const j = await r.json();
25
- if (!j.ok) { alert('上传失败:' + (j.error || '未知错误')); return resolve(null); }
25
+ if (!j.ok) { alert(j.error === 'not found' || /404/.test(String(j.error)) ? '插件后端还是旧版:重启 DSH 后这个按钮才生效。\n临时办法:直接在输入框粘贴文件路径,仍可用旧版继续。' : '上传失败:' + (j.error || '未知错误')); return resolve(null); }
26
26
  resolve(dir ? j.dir : j.path);
27
27
  } catch (e) { resolve(null); }
28
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepwhale-cn/dsh-contract-check",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "深鲸合同体检:扫描合同文本,检查 10 项必备条款(主体/标的/价款/期限/违约/争议/保密/知识产权/不可抗力/解除)是否缺失",
5
5
  "type": "module",
6
6
  "license": "MIT",