@hcmai/cli 0.21.8 → 0.21.10

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/dist/index.js CHANGED
@@ -3403,9 +3403,9 @@ async function loginCommand(args) {
3403
3403
  }
3404
3404
  const err = e;
3405
3405
  if (err.isAxiosError) {
3406
- const { fromAxiosError: fromAxiosError26 } = await import("@hcmai/sdk");
3406
+ const { fromAxiosError: fromAxiosError27 } = await import("@hcmai/sdk");
3407
3407
  exitWithError(
3408
- fromAxiosError26(
3408
+ fromAxiosError27(
3409
3409
  e,
3410
3410
  envName
3411
3411
  )
@@ -5698,7 +5698,7 @@ async function interactionsRespondCommand(action, interactionId, args) {
5698
5698
  // src/commands/download.ts
5699
5699
  init_auth_guard();
5700
5700
  init_exit();
5701
- import { downloadDocument } from "@hcmai/sdk";
5701
+ import { downloadDocument, fromAxiosError as fromAxiosError11 } from "@hcmai/sdk";
5702
5702
  import { HcmClient as HcmClient13 } from "@hcmai/sdk";
5703
5703
  async function downloadCommand(documentId, args) {
5704
5704
  try {
@@ -5710,8 +5710,12 @@ async function downloadCommand(documentId, args) {
5710
5710
  return;
5711
5711
  } catch (e) {
5712
5712
  const status = e?.response?.status;
5713
- if (status === 401 || status === 403) {
5713
+ if (status === 401) {
5714
5714
  exitWithError(new Error(`\u4E0B\u8F7D\u672A\u6388\u6743\uFF08${status}\uFF09\u2014\u2014\u8BF7 hcm login \u540E\u91CD\u8BD5`));
5715
+ } else if (status === 403) {
5716
+ const denied = fromAxiosError11(e, args.env);
5717
+ denied.message += "\uFF1B\u8BF7\u6838\u5BF9\u9644\u4EF6\u7684\u4E1A\u52A1\u5F52\u5C5E\u3001\u5B57\u6BB5\u6743\u9650\u548C\u7EC4\u7EC7\u8303\u56F4\uFF0C\u6743\u9650\u62D2\u7EDD\u65E0\u9700\u91CD\u590D\u767B\u5F55\u3002";
5718
+ exitWithError(denied);
5715
5719
  } else if (status === 404) {
5716
5720
  exitWithError(new Error("\u6587\u6863\u4E0D\u5B58\u5728\u6216\u5DF2\u6E05\u7406\uFF08404\uFF09\u2014\u2014\u6838\u5BF9 documentId"));
5717
5721
  } else {
@@ -5726,7 +5730,7 @@ init_exit();
5726
5730
  import {
5727
5731
  deleteDocument,
5728
5732
  HcmClient as HcmClient14,
5729
- fromAxiosError as fromAxiosError11,
5733
+ fromAxiosError as fromAxiosError12,
5730
5734
  formatObject as formatObject11
5731
5735
  } from "@hcmai/sdk";
5732
5736
  async function documentDeleteCommand(documentId, args) {
@@ -5737,7 +5741,7 @@ async function documentDeleteCommand(documentId, args) {
5737
5741
  process.exitCode = 0;
5738
5742
  } catch (e) {
5739
5743
  const err = e;
5740
- if (err?.isAxiosError) exitWithError(fromAxiosError11(err, args.env));
5744
+ if (err?.isAxiosError) exitWithError(fromAxiosError12(err, args.env));
5741
5745
  exitWithError(e);
5742
5746
  }
5743
5747
  }
@@ -5745,7 +5749,7 @@ async function documentDeleteCommand(documentId, args) {
5745
5749
  // src/commands/trace.ts
5746
5750
  init_exit();
5747
5751
  init_auth_guard();
5748
- import { HcmClient as HcmClient15, formatObject as formatObject12, formatRows as formatRows5, fromAxiosError as fromAxiosError12 } from "@hcmai/sdk";
5752
+ import { HcmClient as HcmClient15, formatObject as formatObject12, formatRows as formatRows5, fromAxiosError as fromAxiosError13 } from "@hcmai/sdk";
5749
5753
  function parsePositiveInt2(value, fallback, flag) {
5750
5754
  const n = Number(value ?? fallback);
5751
5755
  if (!Number.isInteger(n) || n <= 0) {
@@ -6202,7 +6206,7 @@ async function traceCommand(traceId, args) {
6202
6206
  } catch (e) {
6203
6207
  const err = e;
6204
6208
  if (err?.isAxiosError) {
6205
- exitWithError(fromAxiosError12(err, args.profile));
6209
+ exitWithError(fromAxiosError13(err, args.profile));
6206
6210
  }
6207
6211
  exitWithError(e);
6208
6212
  }
@@ -6214,7 +6218,7 @@ init_auth_guard();
6214
6218
  import {
6215
6219
  HcmClient as HcmClient16,
6216
6220
  formatObject as formatObject13,
6217
- fromAxiosError as fromAxiosError13,
6221
+ fromAxiosError as fromAxiosError14,
6218
6222
  getCacheStats,
6219
6223
  clearModelCache,
6220
6224
  clearMetaCache
@@ -6232,7 +6236,7 @@ function emit(result, args, human) {
6232
6236
  }
6233
6237
  function fail3(e, args) {
6234
6238
  const err = e;
6235
- if (err?.isAxiosError) exitWithError(fromAxiosError13(err, args.env));
6239
+ if (err?.isAxiosError) exitWithError(fromAxiosError14(err, args.env));
6236
6240
  exitWithError(e);
6237
6241
  process.exit(1);
6238
6242
  }
@@ -6272,7 +6276,7 @@ import { readFileSync as readFileSync3 } from "fs";
6272
6276
  import {
6273
6277
  HcmClient as HcmClient17,
6274
6278
  formatObject as formatObject14,
6275
- fromAxiosError as fromAxiosError14,
6279
+ fromAxiosError as fromAxiosError15,
6276
6280
  scriptDryRun,
6277
6281
  validateScriptManifest,
6278
6282
  queryScriptLogs,
@@ -6291,7 +6295,7 @@ function emit2(result, args, human) {
6291
6295
  }
6292
6296
  function fail4(e, args) {
6293
6297
  const err = e;
6294
- if (err?.isAxiosError) exitWithError(fromAxiosError14(err, args.env));
6298
+ if (err?.isAxiosError) exitWithError(fromAxiosError15(err, args.env));
6295
6299
  exitWithError(e);
6296
6300
  process.exit(1);
6297
6301
  }
@@ -6383,7 +6387,7 @@ init_auth_guard();
6383
6387
  import {
6384
6388
  HcmClient as HcmClient18,
6385
6389
  formatObject as formatObject15,
6386
- fromAxiosError as fromAxiosError15,
6390
+ fromAxiosError as fromAxiosError16,
6387
6391
  uploadDocument as uploadDocument2
6388
6392
  } from "@hcmai/sdk";
6389
6393
  var DEFAULT_UPLOAD_CATEGORY = "attachment";
@@ -6394,8 +6398,18 @@ async function uploadCommand(filePath, args) {
6394
6398
  const meta2 = await uploadDocument2(
6395
6399
  client3.raw(),
6396
6400
  filePath,
6397
- args.category ?? DEFAULT_UPLOAD_CATEGORY
6401
+ args.category ?? DEFAULT_UPLOAD_CATEGORY,
6402
+ args.model || args.originId || args.field ? { model: args.model ?? "", originId: args.originId ?? "", field: args.field ?? "", state: args.state } : void 0
6398
6403
  );
6404
+ if (meta2.bindingStatus === "PENDING_REFERENCE") {
6405
+ process.stderr.write("\u9644\u4EF6\u5DF2\u4E0A\u4F20\uFF0C\u5F52\u5C5E\u5F85\u4FDD\u5B58\uFF1A\u8BF7\u5C06 documentId \u4FDD\u5B58\u5230\u6307\u5B9A\u4E1A\u52A1\u5B57\u6BB5\uFF0C\u518D\u56DE\u8BFB Document.getByDocumentId \u786E\u8BA4 originId/field\u3002\u5DF2\u6709\u5B57\u6BB5\u5F15\u7528\u53EF\u8C03\u7528 Document.bindToField \u5E76\u63D0\u4F9B reason\u3002\n");
6406
+ }
6407
+ if (meta2.bindingStatus === "CREATOR_ONLY_MODEL_POLICY_UNDECLARED") {
6408
+ process.stderr.write("\u9644\u4EF6\u4ECD\u4EC5\u4E0A\u4F20\u4EBA\u53EF\u8BFB\uFF1A\u8BE5\u6A21\u578B\u672A\u58F0\u660E\u4E1A\u52A1\u9644\u4EF6\u6388\u6743\uFF0C\u8BF7\u4F7F\u7528\u4E1A\u52A1\u4E13\u7528\u4E0A\u4F20/\u5F52\u5C5E\u5165\u53E3\u3002\n");
6409
+ }
6410
+ if (meta2.bindingStatus === "UNBOUND_BACKEND_CONTRACT_UNAVAILABLE") {
6411
+ process.stderr.write("\u9644\u4EF6\u5DF2\u4E0A\u4F20\uFF0C\u4F46\u670D\u52A1\u7AEF\u672A\u786E\u8BA4\u4E1A\u52A1\u5F52\u5C5E\uFF1A\u8BF7\u66F4\u65B0\u540E\u7AEF\u540E\u56DE\u8BFB\u5F52\u5C5E\uFF0C\u4E0D\u80FD\u628A\u4E0A\u4F20\u6210\u529F\u89C6\u4E3A\u7ED1\u5B9A\u6210\u529F\u3002\n");
6412
+ }
6399
6413
  const fmt = args.output ?? "json";
6400
6414
  if (fmt !== "json") {
6401
6415
  process.stdout.write(
@@ -6414,7 +6428,7 @@ async function uploadCommand(filePath, args) {
6414
6428
  } else if (status === 413) {
6415
6429
  exitWithError(new Error("\u6587\u4EF6\u8D85\u51FA\u670D\u52A1\u7AEF\u5927\u5C0F\u4E0A\u9650\uFF08413\uFF09"));
6416
6430
  } else if (err?.isAxiosError) {
6417
- exitWithError(fromAxiosError15(err, args.env));
6431
+ exitWithError(fromAxiosError16(err, args.env));
6418
6432
  } else {
6419
6433
  exitWithError(e);
6420
6434
  }
@@ -6427,7 +6441,7 @@ init_auth_guard();
6427
6441
  import {
6428
6442
  HcmClient as HcmClient19,
6429
6443
  formatObject as formatObject16,
6430
- fromAxiosError as fromAxiosError16,
6444
+ fromAxiosError as fromAxiosError17,
6431
6445
  packDataPackage,
6432
6446
  installDataPackageArtifactAsync,
6433
6447
  waitForInstallRun,
@@ -6530,7 +6544,7 @@ async function datapackageInstallCommand(artifactPath, args) {
6530
6544
  if (err?.code === "ENOENT") {
6531
6545
  exitWithError(new Error(`\u5236\u54C1\u6587\u4EF6\u4E0D\u5B58\u5728\uFF1A${artifactPath}`));
6532
6546
  } else if (err?.isAxiosError) {
6533
- exitWithError(fromAxiosError16(err, args.env));
6547
+ exitWithError(fromAxiosError17(err, args.env));
6534
6548
  } else {
6535
6549
  exitWithError(e);
6536
6550
  }
@@ -6562,7 +6576,7 @@ async function datapackageStatusCommand(runId, args) {
6562
6576
  return;
6563
6577
  } catch (e) {
6564
6578
  const err = e;
6565
- if (err?.isAxiosError) exitWithError(fromAxiosError16(err, args.env));
6579
+ if (err?.isAxiosError) exitWithError(fromAxiosError17(err, args.env));
6566
6580
  else exitWithError(e);
6567
6581
  }
6568
6582
  }
@@ -6604,7 +6618,7 @@ import {
6604
6618
  matchSkills,
6605
6619
  filterByStage,
6606
6620
  formatObject as formatObject19,
6607
- fromAxiosError as fromAxiosError17,
6621
+ fromAxiosError as fromAxiosError18,
6608
6622
  loadGlobalConfig as loadGlobalConfig6,
6609
6623
  discoverProjectEnv as discoverProjectEnv3,
6610
6624
  resolveEnvContext as resolveEnvContext5,
@@ -7580,7 +7594,7 @@ function fail6(e, args) {
7580
7594
  if (err?.response?.status === 404) {
7581
7595
  exitWithError(new Error("\u8BE5\u73AF\u5883\u6CA1\u6709\u8FD9\u4E2A\u6280\u80FD \u2014\u2014 \u8DD1 `hcm skills list` \u770B\u76EE\u5F55\uFF08\u6280\u80FD\u968F\u4EA7\u54C1\u7248\u672C\u8D70\uFF09"));
7582
7596
  }
7583
- if (err?.isAxiosError) exitWithError(fromAxiosError17(err, args.env));
7597
+ if (err?.isAxiosError) exitWithError(fromAxiosError18(err, args.env));
7584
7598
  exitWithError(e);
7585
7599
  process.exit(1);
7586
7600
  }
@@ -9220,7 +9234,7 @@ import {
9220
9234
  normalizeOrigin as normalizeOrigin4,
9221
9235
  createHttpClient as createHttpClient3,
9222
9236
  formatObject as formatObject20,
9223
- fromAxiosError as fromAxiosError18,
9237
+ fromAxiosError as fromAxiosError19,
9224
9238
  loadGlobalConfig as loadGlobalConfig7,
9225
9239
  resolveEnvContext as resolveEnvContext6,
9226
9240
  printResolvedEnvironment as printResolvedEnvironment5,
@@ -9290,7 +9304,7 @@ PostgreSQL \u6838\u9A8C=${receipt.pgVerified}\uFF1B\u6574\u4F53\u6838\u9A8C=${re
9290
9304
  } catch (error) {
9291
9305
  if (attempted) process.stderr.write("TENANT_RESET_RESULT_UNKNOWN\uFF1A\u672C\u6B21\u5DF2\u5C1D\u8BD5\u4E00\u6B21\u91CD\u7F6E\uFF0C\u7ED3\u679C\u672A\u786E\u8BA4\uFF1B\u672A\u81EA\u52A8\u91CD\u8BD5\u3002\u4E0D\u8981\u76F2\u76EE\u91CD\u8DD1\uFF0C\u8BF7\u6838\u67E5\u670D\u52A1\u7AEF\u6D41\u6C34\u4E0E\u5F53\u524D\u79DF\u6237\u72B6\u6001\u3002\n");
9292
9306
  const e = error;
9293
- exitWithError(e?.isAxiosError ? fromAxiosError18(error, args.env) : error);
9307
+ exitWithError(e?.isAxiosError ? fromAxiosError19(error, args.env) : error);
9294
9308
  }
9295
9309
  }
9296
9310
  async function resolveBootstrapKey(args, stdinTaken) {
@@ -9420,7 +9434,7 @@ async function tenantBootstrapCommand(args) {
9420
9434
  if (err?.response?.status === 403) {
9421
9435
  exitWithError(new Error("bootstrap key \u65E0\u6548\uFF08403\uFF09\u2014\u2014 \u6838\u5BF9\u90E8\u7F72\u65B9\u63D0\u4F9B\u7684 key\uFF0C\u52FF\u590D\u7528\u5176\u4ED6\u73AF\u5883\u7684"));
9422
9436
  } else if (err?.isAxiosError) {
9423
- exitWithError(fromAxiosError18(err, args.env));
9437
+ exitWithError(fromAxiosError19(err, args.env));
9424
9438
  } else {
9425
9439
  exitWithError(e);
9426
9440
  }
@@ -9434,7 +9448,7 @@ import nodePath from "path";
9434
9448
  import {
9435
9449
  HcmClient as HcmClient21,
9436
9450
  formatObject as formatObject21,
9437
- fromAxiosError as fromAxiosError19,
9451
+ fromAxiosError as fromAxiosError20,
9438
9452
  listTenantMeta,
9439
9453
  getTenantMeta,
9440
9454
  saveTenantMeta,
@@ -9466,7 +9480,7 @@ function fail7(e, args, mode = "write") {
9466
9480
  new Error(formatMetaForbiddenMessage(mode))
9467
9481
  );
9468
9482
  }
9469
- if (err?.isAxiosError) exitWithError(fromAxiosError19(err, args.env));
9483
+ if (err?.isAxiosError) exitWithError(fromAxiosError20(err, args.env));
9470
9484
  exitWithError(e);
9471
9485
  process.exit(1);
9472
9486
  }
@@ -9790,14 +9804,14 @@ import {
9790
9804
  runMiniSmokeChecks,
9791
9805
  saveWorkspaceFileContent,
9792
9806
  validateMiniProject,
9793
- fromAxiosError as fromAxiosError21,
9807
+ fromAxiosError as fromAxiosError22,
9794
9808
  CliError as CliError25,
9795
9809
  CliErrorCode as CliErrorCode26
9796
9810
  } from "@hcmai/sdk";
9797
9811
 
9798
9812
  // src/commands/workspace-push-progress.ts
9799
9813
  import { isAxiosError } from "axios";
9800
- import { CliError as CliError24, CliErrorCode as CliErrorCode25, fromAxiosError as fromAxiosError20 } from "@hcmai/sdk";
9814
+ import { CliError as CliError24, CliErrorCode as CliErrorCode25, fromAxiosError as fromAxiosError21 } from "@hcmai/sdk";
9801
9815
  var PUSH_DEADLINE_MS = 3e5;
9802
9816
  var HEARTBEAT_MS = 1e4;
9803
9817
  async function withWorkspacePushProgress(run3, profile) {
@@ -9867,7 +9881,7 @@ async function withWorkspacePushProgress(run3, profile) {
9867
9881
  return await Promise.race([operation, deadline]);
9868
9882
  } catch (error) {
9869
9883
  if (!isAxiosError(error)) throw error;
9870
- const translated = fromAxiosError20(error, profile);
9884
+ const translated = fromAxiosError21(error, profile);
9871
9885
  throw new CliError24({
9872
9886
  code: translated.code,
9873
9887
  message: translated.message,
@@ -11347,7 +11361,7 @@ function formatStatusSummary(summary) {
11347
11361
  }
11348
11362
  function exitWorkspaceError(err, profile) {
11349
11363
  const maybeAxios = err;
11350
- const translated = maybeAxios?.isAxiosError ? fromAxiosError21(err, profile) : err;
11364
+ const translated = maybeAxios?.isAxiosError ? fromAxiosError22(err, profile) : err;
11351
11365
  if (translated instanceof CliError25 && translated.code === CliErrorCode26.AUTH_FAILED) {
11352
11366
  exitWithError(new CliError25({
11353
11367
  code: translated.code,
@@ -11460,7 +11474,7 @@ import {
11460
11474
  CliErrorCode as CliErrorCode27,
11461
11475
  formatObject as formatObject23,
11462
11476
  formatRows as formatRows7,
11463
- fromAxiosError as fromAxiosError22,
11477
+ fromAxiosError as fromAxiosError23,
11464
11478
  loadEnv as loadEnv4,
11465
11479
  saveEnv as saveEnv3,
11466
11480
  loadIdentity as loadIdentity4,
@@ -11515,7 +11529,7 @@ async function identityShow(name, args) {
11515
11529
  const details = await inspectIdentity(name);
11516
11530
  return exitOk(formatObject23(details, { format: args.output ?? "json" }));
11517
11531
  } catch (e) {
11518
- exitWithError(axios4.isAxiosError(e) ? fromAxiosError22(e, name) : e);
11532
+ exitWithError(axios4.isAxiosError(e) ? fromAxiosError23(e, name) : e);
11519
11533
  }
11520
11534
  }
11521
11535
  async function identityList(args) {
@@ -18160,7 +18174,7 @@ import {
18160
18174
  ROUND_EXIT_CODES,
18161
18175
  computeReconSourceKey,
18162
18176
  formatObject as formatObject31,
18163
- fromAxiosError as fromAxiosError23,
18177
+ fromAxiosError as fromAxiosError24,
18164
18178
  httpProbe as httpProbe3,
18165
18179
  inspectRound,
18166
18180
  renderRound,
@@ -18182,7 +18196,7 @@ async function deliveryReconCommand(args) {
18182
18196
  process.stdout.write(formatObject31(summary, { format: args.output ?? "json" }) + "\n");
18183
18197
  } catch (e) {
18184
18198
  const err = e;
18185
- if (err?.isAxiosError) exitWithError(fromAxiosError23(err, args.env));
18199
+ if (err?.isAxiosError) exitWithError(fromAxiosError24(err, args.env));
18186
18200
  exitWithError(e);
18187
18201
  process.exit(1);
18188
18202
  }
@@ -18994,7 +19008,7 @@ import {
18994
19008
  HcmClient as HcmClient30,
18995
19009
  adminResetPassword,
18996
19010
  formatObject as formatObject32,
18997
- fromAxiosError as fromAxiosError24,
19011
+ fromAxiosError as fromAxiosError25,
18998
19012
  CliError as CliError37,
18999
19013
  CliErrorCode as CliErrorCode38
19000
19014
  } from "@hcmai/sdk";
@@ -19030,7 +19044,7 @@ async function userResetPasswordCommand(args) {
19030
19044
  process.stdout.write(formatObject32(result, { format: args.output ?? "json" }) + "\n");
19031
19045
  } catch (cause) {
19032
19046
  const err = cause;
19033
- if (err?.isAxiosError) exitWithError(fromAxiosError24(err, args.env));
19047
+ if (err?.isAxiosError) exitWithError(fromAxiosError25(err, args.env));
19034
19048
  exitWithError(cause);
19035
19049
  }
19036
19050
  }
@@ -19052,7 +19066,7 @@ init_auth_guard();
19052
19066
  import {
19053
19067
  HcmClient as HcmClient31,
19054
19068
  formatObject as formatObject33,
19055
- fromAxiosError as fromAxiosError25
19069
+ fromAxiosError as fromAxiosError26
19056
19070
  } from "@hcmai/sdk";
19057
19071
  async function modelsCommand(keyword, args) {
19058
19072
  try {
@@ -19089,7 +19103,7 @@ async function modelsCommand(keyword, args) {
19089
19103
  return;
19090
19104
  } catch (e) {
19091
19105
  const err = e;
19092
- if (err?.isAxiosError) exitWithError(fromAxiosError25(err, args.profile));
19106
+ if (err?.isAxiosError) exitWithError(fromAxiosError26(err, args.profile));
19093
19107
  exitWithError(e);
19094
19108
  }
19095
19109
  }
@@ -19357,7 +19371,7 @@ var cache = program.command("cache").description("\u6A21\u578B\u7F13\u5B58\u8FD0
19357
19371
  cache.command("stats <Model>").description("\u67E5\u770B\u6A21\u578B\u7F13\u5B58\u7EDF\u8BA1").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((model, opts) => cacheStatsCommand(model, opts));
19358
19372
  cache.command("clear <Model>").description("\u6E05\u6A21\u578B\u5B9E\u4F53\u7F13\u5B58\uFF08\u5E42\u7B49\uFF0C\u4E0D\u7834\u574F\u6570\u636E\uFF09").option("--id <id>", "\u53EA\u6E05\u5355\u6761\uFF08\u9ED8\u8BA4\u6E05\u5168\u90E8\uFF09").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((model, opts) => cacheClearCommand(model, opts));
19359
19373
  cache.command("clear-meta <Model>").description("\u6E05\u5143\u6570\u636E\u7F13\u5B58\uFF08Code \u7EA7 YAML + Action \u5B9A\u4E49\uFF09\u2014\u2014\u6539 meta YAML \u540E\u5FC5\u8DD1").option("--type <type>", "\u5143\u6570\u636E\u7C7B\u578B\uFF1Alist | info | view | filter | page\u2026\uFF08\u9ED8\u8BA4\u5168\u6E05\uFF09").option("--state <state>", "\u72B6\u6001\u53D8\u4F53\uFF08\u5982 self\uFF09\uFF0C\u914D\u5408 --type").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((model, opts) => cacheClearMetaCommand(model, opts));
19360
- program.command("upload <file>").description("\u4E0A\u4F20\u672C\u5730\u6587\u4EF6\u5230 HCM \u6587\u6863\u670D\u52A1\uFF0C\u8FD4\u56DE documentId").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").option(
19374
+ program.command("upload <file>").description("\u4E0A\u4F20\u672C\u5730\u6587\u4EF6\u5230 HCM \u6587\u6863\u670D\u52A1\uFF0C\u8FD4\u56DE documentId").option("--model <name>", "\u4E1A\u52A1\u9644\u4EF6\u5F52\u5C5E\u6A21\u578B\uFF0C\u987B\u4E0E --origin-id/--field \u540C\u65F6\u63D0\u4F9B").option("--origin-id <uuid>", "\u771F\u5B9E\u4E1A\u52A1\u8BB0\u5F55 ID\uFF08\u5F52\u5C5E\u5728\u8BE5\u8BB0\u5F55\u5B57\u6BB5\u4FDD\u5B58\u5F15\u7528\u540E\u786E\u8BA4\uFF09").option("--field <key>", "\u670D\u52A1\u7AEF\u58F0\u660E\u7684\u9644\u4EF6\u5B57\u6BB5").option("--state <name>", "\u9644\u4EF6\u5B57\u6BB5\u6240\u5728\u4FE1\u606F\u9875\u72B6\u6001\uFF08\u7F3A\u7701 default\uFF09").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").option(
19361
19375
  "--category <name>",
19362
19376
  "\u5B58\u50A8\u5206\u7C7B\uFF08\u987B\u662F\u76EE\u6807\u73AF\u5883\u91CC\u771F\u5B9E\u5B58\u5728\u7684\u5206\u7C7B\uFF0C\u5982 flex-report / template / attachment\uFF09",
19363
19377
  "attachment"