e10-data 0.1.5 → 0.1.6

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/bin/e10-data.mjs +2 -1
  2. package/package.json +1 -1
package/bin/e10-data.mjs CHANGED
@@ -1001,8 +1001,8 @@ async function expLock(args, json) {
1001
1001
  printExpData(r, "有效锁");
1002
1002
  return;
1003
1003
  }
1004
- const token = need("lock-token", args);
1005
1004
  if (act === "heartbeat") {
1005
+ const token = need("lock-token", args);
1006
1006
  const r = await postJson("/api/dw/expert-repository/v1/repositories/locks/heartbeat?lockToken=" + encodeURIComponent(token), {});
1007
1007
  if (json) return r;
1008
1008
  if (!expOk(r)) throw new Error(expFailMsg(r));
@@ -1010,6 +1010,7 @@ async function expLock(args, json) {
1010
1010
  return;
1011
1011
  }
1012
1012
  if (act === "release") {
1013
+ const token = need("lock-token", args);
1013
1014
  const req = new Request(BASE + "/api/dw/expert-repository/v1/repositories/locks?lockToken=" + encodeURIComponent(token), { method: "DELETE" });
1014
1015
  const resp = await fetch(req, { headers: { "cookie": auth.cookie, "eteamsid": auth.eteamsid, "accept": "application/json" } });
1015
1016
  const text = await resp.text();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "e10-data",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "泛微 E10 数据接口统一 CLI(data-assistant 专家配套):DSL 查询/数据源/文档/词库/关联字段翻译/环境参数配置中心(conf)/专家包版本管理,认证复用 weaver-e10-login 登录态",
5
5
  "author": "e10-dw",
6
6
  "license": "MIT",