@xinhehuimeng/cli 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xinhehuimeng/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "心河 OA 客户端 CLI(Node 版):多维表格 / 应用 / 权限的唯一命令行入口",
5
5
  "keywords": [
6
6
  "xinhe-oa",
@@ -393,13 +393,16 @@ async function ruleUpdate(runtime, id, args) {
393
393
  });
394
394
  if (version !== null) body.version = version;
395
395
  const path = `/reports/rules/${id}`;
396
- const spec = requestSpec({ body: sortKeysDeep(body) });
396
+ const spec = requestSpec({
397
+ body: sortKeysDeep(body),
398
+ idempotencyKey: idempotencyKey('report-rule-update'),
399
+ });
397
400
  if (runtime.dryRun) return runtime.dryRunReport('PATCH', path, spec);
398
401
  const response = await runtime.sendAuthed('PATCH', path, spec);
399
402
  const data = dataOf(response);
400
403
  if (isPlainObject(data)) {
401
404
  data.note =
402
- '改版只对**下个周期**生效:在途周期已开窗,实例冻结的是当时的规则版本(docs/38 §4.5)';
405
+ '规则改动带版本号并写审计;已提交报告继续使用提交时冻结的规则快照';
403
406
  }
404
407
  runtime.finishFrom(response, data);
405
408
  }
@@ -411,7 +414,9 @@ async function ruleArchive(runtime, id) {
411
414
  `xinhe-oa-cli report rule --archive ${id}`,
412
415
  );
413
416
  const path = `/reports/rules/${id}/archive`;
414
- const spec = requestSpec();
417
+ const spec = requestSpec({
418
+ idempotencyKey: idempotencyKey('report-rule-archive'),
419
+ });
415
420
  if (runtime.dryRun) return runtime.dryRunReport('POST', path, spec);
416
421
  const response = await runtime.sendAuthed('POST', path, spec);
417
422
  runtime.finishFrom(response, dataOf(response));
package/src/version.js CHANGED
@@ -6,7 +6,7 @@
6
6
  //
7
7
  // 这个常量与 `package.json` 的 `version` **必须一致**:`test/version.test.js`
8
8
  // 会逐字比对,`npm version` 之后忘了改这里就会红。
9
- export const VERSION = '0.2.2';
9
+ export const VERSION = '0.2.3';
10
10
 
11
11
  /**
12
12
  * npm 包名(升级指引 `npm i -g <包名>@latest` 与 `doctor` 的 npm 探测都用它)。