@lovrabet/lovrabet-cli 2.2.5-beta.2 → 2.2.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 (160) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.d.ts +3 -3
  102. package/lib/core/api-client.js +1 -1
  103. package/lib/core/db-resolver.js +1 -1
  104. package/lib/core/sdk-client.js +1 -1
  105. package/lib/errors.js +1 -1
  106. package/lib/framework/build-all-flags.js +1 -1
  107. package/lib/framework/dryrun.js +1 -1
  108. package/lib/framework/flags.js +1 -1
  109. package/lib/framework/help.js +1 -1
  110. package/lib/framework/index.js +1 -1
  111. package/lib/framework/output.js +1 -1
  112. package/lib/framework/preparse.js +1 -1
  113. package/lib/framework/rate-limit.js +1 -1
  114. package/lib/framework/raw-flags.js +1 -1
  115. package/lib/framework/response.js +1 -1
  116. package/lib/framework/runner-confirmation.js +1 -1
  117. package/lib/framework/runner-error.js +1 -1
  118. package/lib/framework/runner.js +1 -1
  119. package/lib/framework/schema-export.js +1 -1
  120. package/lib/framework/service-order.js +1 -1
  121. package/lib/framework/types.js +1 -1
  122. package/lib/generated/build-info.d.ts +4 -4
  123. package/lib/generated/build-info.js +1 -1
  124. package/lib/help.js +1 -1
  125. package/lib/postinstall.js +1 -1
  126. package/lib/runtime/confirmation.js +1 -1
  127. package/lib/runtime/event.js +1 -1
  128. package/lib/runtime/index.js +1 -1
  129. package/lib/runtime/queue.js +1 -1
  130. package/lib/runtime/resolve.js +1 -1
  131. package/lib/skills/builtin-skill.js +1 -1
  132. package/lib/skills/npx-skills-add.js +1 -1
  133. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  134. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  135. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  136. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  137. package/lib/skills/runtime-skill-sync/links.js +1 -1
  138. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  139. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.js +1 -1
  148. package/lib/skills/skill-presence.js +1 -1
  149. package/lib/utils/apply-jq-filter.js +1 -1
  150. package/lib/utils/logger.js +1 -1
  151. package/lib/utils/lossless-json.js +1 -1
  152. package/lib/utils/params.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/update-notice.js +1 -1
  155. package/lib/utils/version.js +1 -1
  156. package/lib/utils/write-cli-side-channel.js +1 -1
  157. package/package.json +1 -1
  158. package/skills/lovrabet/SKILL.md +4 -4
  159. package/skills/lovrabet/references/lovrabet-schedule-workflow.md +7 -6
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a28_0x3e6f2c=a28_0x3ec7;(function(_0x18d23b,_0x20d667){const _0x4ddfc2=a28_0x3ec7,_0x84e57c=_0x18d23b();while(!![]){try{const _0x41343e=-parseInt(_0x4ddfc2(0x142))/0x1*(-parseInt(_0x4ddfc2(0x144))/0x2)+parseInt(_0x4ddfc2(0x133))/0x3+parseInt(_0x4ddfc2(0x139))/0x4+parseInt(_0x4ddfc2(0x13a))/0x5+-parseInt(_0x4ddfc2(0x141))/0x6*(-parseInt(_0x4ddfc2(0x135))/0x7)+parseInt(_0x4ddfc2(0x13c))/0x8+-parseInt(_0x4ddfc2(0x136))/0x9;if(_0x41343e===_0x20d667)break;else _0x84e57c['push'](_0x84e57c['shift']());}catch(_0x2ae87e){_0x84e57c['push'](_0x84e57c['shift']());}}}(a28_0x346c,0xd2158));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0x3ec7(_0x505108,_0x46d066){_0x505108=_0x505108-0x133;const _0x346c64=a28_0x346c();let _0x3ec777=_0x346c64[_0x505108];return _0x3ec777;}import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x346c(){const _0x5e493b=['trim','7KZsYup','50486670ivKgGo','code','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','5292824iTFTte','5764950sVUPxh','sdk-doc','4081320nenDHh','string','appCode','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','str','4190682lkhBmY','11841DtkNTP','read','218RNfdmZ','4483971jOBFGE'];a28_0x346c=function(){return _0x5e493b;};return a28_0x346c();}const DEFAULT_MARKDOWN=a28_0x3e6f2c(0x138);export function formatDatasetSdkMarkdown(_0x460ed0){const _0x4bc492=a28_0x3e6f2c,_0x3f3cfe=typeof _0x460ed0===_0x4bc492(0x13d)?_0x460ed0[_0x4bc492(0x134)]():'';return _0x3f3cfe||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x3e6f2c(0x13b),'description':a28_0x3e6f2c(0x13f),'risk':a28_0x3e6f2c(0x143),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x34b89c){const _0x53110e=a28_0x3e6f2c,_0x10bfb3=_0x34b89c[_0x53110e(0x140)](_0x53110e(0x137)),_0x50efa0=await getDatasetSdkUsageDoc(_0x10bfb3,_0x34b89c[_0x53110e(0x13e)]);return{'ok':!![],'data':{'code':_0x10bfb3,'appCode':_0x34b89c[_0x53110e(0x13e)],'markdown':formatDatasetSdkMarkdown(_0x50efa0)}};}};
1
+ function a28_0x52d1(_0x5ac164,_0x5ed267){_0x5ac164=_0x5ac164-0x151;const _0x4c5f88=a28_0x4c5f();let _0x52d155=_0x4c5f88[_0x5ac164];return _0x52d155;}const a28_0x1cc6aa=a28_0x52d1;(function(_0x56c86d,_0x12b723){const _0x363beb=a28_0x52d1,_0x12f836=_0x56c86d();while(!![]){try{const _0x1db5cb=-parseInt(_0x363beb(0x151))/0x1+-parseInt(_0x363beb(0x158))/0x2+-parseInt(_0x363beb(0x154))/0x3+parseInt(_0x363beb(0x15a))/0x4+parseInt(_0x363beb(0x15f))/0x5+parseInt(_0x363beb(0x15e))/0x6*(parseInt(_0x363beb(0x153))/0x7)+-parseInt(_0x363beb(0x15b))/0x8*(-parseInt(_0x363beb(0x162))/0x9);if(_0x1db5cb===_0x12b723)break;else _0x12f836['push'](_0x12f836['shift']());}catch(_0x24dc4b){_0x12f836['push'](_0x12f836['shift']());}}}(a28_0x4c5f,0x2ca2c));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x4c5f(){const _0x3ede74=['1360445VZRZAy','str','code','4581uOhKep','163682AMHxYW','dataset','14441uKbiZH','755535YpVrOS','trim','string','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','568090zZSZrg','sdk-doc','669812fEInDz','2648BbMTlj','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','appCode','798KoaOJi'];a28_0x4c5f=function(){return _0x3ede74;};return a28_0x4c5f();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x20dc15){const _0x35ee5a=a28_0x52d1,_0x137f08=typeof _0x20dc15===_0x35ee5a(0x156)?_0x20dc15[_0x35ee5a(0x155)]():'';return _0x137f08||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x1cc6aa(0x152),'command':a28_0x1cc6aa(0x159),'description':a28_0x1cc6aa(0x157),'risk':'read','flags':[{...CODE_FLAG,'description':a28_0x1cc6aa(0x15c)}],async 'execute'(_0x48425f){const _0x50a803=a28_0x1cc6aa,_0x24c7a2=_0x48425f[_0x50a803(0x160)](_0x50a803(0x161)),_0xc728cd=await getDatasetSdkUsageDoc(_0x24c7a2,_0x48425f[_0x50a803(0x15d)]);return{'ok':!![],'data':{'code':_0x24c7a2,'appCode':_0x48425f['appCode'],'markdown':formatDatasetSdkMarkdown(_0xc728cd)}};}};
@@ -1 +1 @@
1
- const a29_0x156c7c=a29_0x1aae;function a29_0x1aae(_0x17e6a4,_0x3fcc70){_0x17e6a4=_0x17e6a4-0x16c;const _0x1b9723=a29_0x1b97();let _0x1aae6a=_0x1b9723[_0x17e6a4];return _0x1aae6a;}(function(_0x52dd69,_0x341dea){const _0x46c781=a29_0x1aae,_0x50d85d=_0x52dd69();while(!![]){try{const _0x2e9fc4=-parseInt(_0x46c781(0x187))/0x1+parseInt(_0x46c781(0x189))/0x2*(-parseInt(_0x46c781(0x1b9))/0x3)+parseInt(_0x46c781(0x1ba))/0x4+-parseInt(_0x46c781(0x1c2))/0x5*(parseInt(_0x46c781(0x1c9))/0x6)+-parseInt(_0x46c781(0x190))/0x7+-parseInt(_0x46c781(0x1c4))/0x8*(-parseInt(_0x46c781(0x1ad))/0x9)+-parseInt(_0x46c781(0x197))/0xa*(-parseInt(_0x46c781(0x1c5))/0xb);if(_0x2e9fc4===_0x341dea)break;else _0x50d85d['push'](_0x50d85d['shift']());}catch(_0xf8be11){_0x50d85d['push'](_0x50d85d['shift']());}}}(a29_0x1b97,0x31336));function a29_0x1b97(){const _0x5204f4=['\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','repeat','env','red','\x20\x20Auth','yellow','(default)','log','Project','status','\x20(accessKey)','\x20\x20─','9rmCFZJ','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','riskLevel','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','read','\x20\x20Service\x20Tree','currentApp','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','26793KMwixW','1495124yfdCfK','padEnd','bold','gray','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20doctor','empty','90735ZUQcCY','length','1794880NtGuzN','4430569zttZHk','✓\x20current','format','defaultApp','108KOQNiN','repairCommand','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','✗\x20Invalid\x20JSON','\x20\x20API\x20Endpoints','(none)','⚠\x20Empty','commandCount','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','verbose','message','(not\x20found)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skillVersion','source','(no\x20file)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','name','\x20\x20Built-in\x20Skill','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','reason','Global','ClientAk','124167yfHrOS','accessKey','58ejGiJc','Diagnose\x20CLI\x20configuration\x20and\x20environment','doctor','\x20\x20Installed\x20Path:\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','627074eEmauR','(removed\x20—\x20cookie\x20auth\x20disabled)','path','state','\x20\x20Package\x20Version:\x20','\x20\x20auth\x20(effective):\x20','packageVersion','10plhgYo','serviceCount','✓\x20Loaded','\x20\x20Merged\x20Config','current','green','locale','missing','serviceCode'];a29_0x1b97=function(){return _0x5204f4;};return a29_0x1b97();}import a29_0x108f4c from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x24dc79){const _0x5cabf9=a29_0x1aae,_0x4b5600=getCliVersion(),_0x415bf6=buildConfigFromFlags({});await initGlobalEnvironment(_0x415bf6),console[_0x5cabf9(0x1a8)](),console[_0x5cabf9(0x1a8)](a29_0x108f4c['bold'](CLI_BIN_NAME+_0x5cabf9(0x1c0))),console[_0x5cabf9(0x1a8)](a29_0x108f4c['gray']('─'['repeat'](0x32))),console[_0x5cabf9(0x1a8)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x4b5600),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1a0)+process['version']),console[_0x5cabf9(0x1a8)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5cabf9(0x1a1)]+'\x20'+process['arch']);const _0x345dcb=inspectBuiltinSkill();console[_0x5cabf9(0x1a8)](),console['log'](a29_0x108f4c['bold'](_0x5cabf9(0x181))),console['log'](a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1ac)['repeat'](0x1e))),console['log'](_0x5cabf9(0x1ae)+(_0x345dcb['state']===_0x5cabf9(0x19b)?a29_0x108f4c[_0x5cabf9(0x19c)](_0x5cabf9(0x1c6)):a29_0x108f4c[_0x5cabf9(0x1a4)]('✗\x20'+_0x345dcb[_0x5cabf9(0x193)]))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x194)+_0x345dcb[_0x5cabf9(0x196)]),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1b8)+(_0x345dcb[_0x5cabf9(0x17b)]||a29_0x108f4c[_0x5cabf9(0x1bd)]('(missing)'))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x18c)+(_0x345dcb['installedPath']||a29_0x108f4c['gray'](_0x5cabf9(0x179))));_0x345dcb['state']!=='current'&&console[_0x5cabf9(0x1a8)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x345dcb[_0x5cabf9(0x16c)]);_0x345dcb[_0x5cabf9(0x184)]&&console[_0x5cabf9(0x1a8)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x345dcb[_0x5cabf9(0x184)]);console[_0x5cabf9(0x1a8)](),console['log'](a29_0x108f4c[_0x5cabf9(0x1bc)]('\x20\x20Config\x20Files')),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1ac)[_0x5cabf9(0x1a2)](0x1e)));const _0x2949cd=getGlobalConfigPath(),_0xe7d06a=getProjectConfigPath();console[_0x5cabf9(0x1a8)](_0x5cabf9(0x16e)+(_0x2949cd||a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x179)))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1b7)+(_0xe7d06a||a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x179)))),console[_0x5cabf9(0x1a8)](),console['log'](a29_0x108f4c[_0x5cabf9(0x1bc)]('\x20\x20Config\x20JSON')),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1ac)['repeat'](0x1e)));const _0x50978e=(_0x35a774,_0xc07180)=>{const _0x31bee0=_0x5cabf9;if(!_0xc07180){console['log']('\x20\x20'+_0x35a774['padEnd'](0x11)+'\x20'+a29_0x108f4c['gray'](_0x31bee0(0x17d)));return;}const _0x45091c=inspectCliConfigJsonFile(_0xc07180);if(_0x45091c['status']==='ok')console[_0x31bee0(0x1a8)]('\x20\x20'+_0x35a774[_0x31bee0(0x1bb)](0x11)+'\x20'+a29_0x108f4c[_0x31bee0(0x19c)]('✓\x20Valid\x20JSON'));else{if(_0x45091c[_0x31bee0(0x1aa)]===_0x31bee0(0x1c1))console['log']('\x20\x20'+_0x35a774[_0x31bee0(0x1bb)](0x11)+'\x20'+a29_0x108f4c[_0x31bee0(0x1a6)](_0x31bee0(0x18f)));else _0x45091c[_0x31bee0(0x1aa)]===_0x31bee0(0x19e)?console[_0x31bee0(0x1a8)]('\x20\x20'+_0x35a774['padEnd'](0x11)+'\x20'+a29_0x108f4c[_0x31bee0(0x1bd)]('(missing)')):(console['log']('\x20\x20'+_0x35a774[_0x31bee0(0x1bb)](0x11)+'\x20'+a29_0x108f4c[_0x31bee0(0x1a4)](_0x31bee0(0x171))),console[_0x31bee0(0x1a8)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x108f4c[_0x31bee0(0x1a4)](_0x45091c[_0x31bee0(0x178)])));}};_0x50978e(_0x5cabf9(0x185),_0x2949cd),_0x50978e(_0x5cabf9(0x1a9),_0xe7d06a),console[_0x5cabf9(0x1a8)](),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bc)](_0x5cabf9(0x19a))),console['log'](a29_0x108f4c['gray'](_0x5cabf9(0x1ac)[_0x5cabf9(0x1a2)](0x1e))),console['log'](_0x5cabf9(0x16f)+(_0x415bf6['appCode']||a29_0x108f4c['red']('(not\x20set)'))),console[_0x5cabf9(0x1a8)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x415bf6[_0x5cabf9(0x1a3)]);const _0x14c2a0=isLegacyCompatConfigKey(_0x5cabf9(0x19d))?a29_0x108f4c[_0x5cabf9(0x1bd)](_0x415bf6[_0x5cabf9(0x19d)]+'\x20(legacy/compat\x20only)'):_0x415bf6['locale'];console['log'](_0x5cabf9(0x17a)+_0x14c2a0),console[_0x5cabf9(0x1a8)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x415bf6[_0x5cabf9(0x1c8)]||a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x173)))),console['log'](_0x5cabf9(0x1bf)+(_0x415bf6[_0x5cabf9(0x1b6)]||a29_0x108f4c['gray']('(none)'))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x182)+(_0x415bf6[_0x5cabf9(0x1c7)]||a29_0x108f4c[_0x5cabf9(0x1bd)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x5cabf9(0x1c7)]+')'))),console[_0x5cabf9(0x1a8)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x415bf6[_0x5cabf9(0x17f)]??a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1a7)))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1b1)+_0x415bf6[_0x5cabf9(0x1b0)]),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x17e)+_0x415bf6[_0x5cabf9(0x177)]),console['log'](_0x5cabf9(0x195)+AUTH_MODE[_0x5cabf9(0x186)]),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x18d)+(_0x415bf6['accessKey']?a29_0x108f4c[_0x5cabf9(0x19c)]('(set,\x20length='+_0x415bf6[_0x5cabf9(0x188)][_0x5cabf9(0x1c3)]+')'):a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x173)))),console[_0x5cabf9(0x1a8)](),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bc)](_0x5cabf9(0x172))),console['log'](a29_0x108f4c['gray'](_0x5cabf9(0x1ac)[_0x5cabf9(0x1a2)](0x1e))),console[_0x5cabf9(0x1a8)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1be)+getUserDomain()),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1b2)+getRuntimeDomain()),console[_0x5cabf9(0x1a8)](),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bc)](_0x5cabf9(0x1b5))),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1ac)[_0x5cabf9(0x1a2)](0x1e)));const _0x3d4269=inspectServiceRegistry();console[_0x5cabf9(0x1a8)](_0x5cabf9(0x183)+_0x3d4269['registryPath']),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x18e)+formatServiceRegistryStatus(_0x3d4269)),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x1b3)+_0x3d4269[_0x5cabf9(0x198)]),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x176)+_0x3d4269[_0x5cabf9(0x175)]);for(const _0x4893b6 of _0x3d4269['services']){console['log']('\x20\x20'+(_0x4893b6[_0x5cabf9(0x19f)]+':')['padEnd'](0x11)+'\x20'+(_0x4893b6[_0x5cabf9(0x180)]||a29_0x108f4c[_0x5cabf9(0x1bd)]('(unnamed)'))+'\x20('+_0x4893b6[_0x5cabf9(0x175)]+'\x20commands)'),console['log']('\x20\x20'+''['padEnd'](0x11)+_0x5cabf9(0x1af)+_0x4893b6[_0x5cabf9(0x17c)][_0x5cabf9(0x192)]);}return console[_0x5cabf9(0x1a8)](),console['log'](a29_0x108f4c[_0x5cabf9(0x1bc)](_0x5cabf9(0x1a5))),console[_0x5cabf9(0x1a8)](a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x1ac)[_0x5cabf9(0x1a2)](0x1e))),console[_0x5cabf9(0x1a8)](_0x5cabf9(0x16d)+a29_0x108f4c[_0x5cabf9(0x19c)](AUTH_MODE[_0x5cabf9(0x186)]+_0x5cabf9(0x1ab))),console[_0x5cabf9(0x1a8)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x108f4c[_0x5cabf9(0x1bd)](_0x5cabf9(0x191))),console[_0x5cabf9(0x1a8)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x31bba3){const _0x31249d=a29_0x1aae;if(_0x31bba3[_0x31249d(0x1aa)]==='ok')return a29_0x108f4c[_0x31249d(0x19c)](_0x31249d(0x199));if(_0x31bba3[_0x31249d(0x1aa)]===_0x31249d(0x19e))return a29_0x108f4c[_0x31249d(0x1bd)]('(not\x20found)');if(_0x31bba3[_0x31249d(0x1aa)]==='empty')return a29_0x108f4c[_0x31249d(0x1a6)](_0x31249d(0x174));return a29_0x108f4c[_0x31249d(0x1a4)](_0x31249d(0x170)+(_0x31bba3[_0x31249d(0x178)]?':\x20'+_0x31bba3[_0x31249d(0x178)]:''));}export const doctorDefinition={'service':a29_0x156c7c(0x18b),'command':'check','description':a29_0x156c7c(0x18a),'risk':a29_0x156c7c(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x404151=a29_0x4ed9;(function(_0x4f6846,_0x35deab){const _0x305ad3=a29_0x4ed9,_0x4479da=_0x4f6846();while(!![]){try{const _0xf3cb12=parseInt(_0x305ad3(0x1f2))/0x1+parseInt(_0x305ad3(0x225))/0x2*(-parseInt(_0x305ad3(0x1f7))/0x3)+parseInt(_0x305ad3(0x220))/0x4+parseInt(_0x305ad3(0x1d1))/0x5+parseInt(_0x305ad3(0x1d2))/0x6+parseInt(_0x305ad3(0x20e))/0x7*(parseInt(_0x305ad3(0x201))/0x8)+-parseInt(_0x305ad3(0x204))/0x9*(parseInt(_0x305ad3(0x1f1))/0xa);if(_0xf3cb12===_0x35deab)break;else _0x4479da['push'](_0x4479da['shift']());}catch(_0x3ad198){_0x4479da['push'](_0x4479da['shift']());}}}(a29_0x5d22,0x22ce1));import a29_0x4a9b64 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0x4ed9(_0x4d02b2,_0xbfc460){_0x4d02b2=_0x4d02b2-0x1ce;const _0x5d2240=a29_0x5d22();let _0x4ed946=_0x5d2240[_0x4d02b2];return _0x4ed946;}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a29_0x5d22(){const _0x253f28=['status','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','green','state','red','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','path','⚠\x20Empty','✓\x20Loaded','env','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','(default)','\x20\x20Config\x20JSON','accessKey','\x20\x20Service\x20Tree','appCode','source','218490FtZjCt','274838KwiMOz','(none)','\x20\x20Package\x20Version:\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','17637daToMo','\x20\x20Built-in\x20Skill','(removed\x20—\x20cookie\x20auth\x20disabled)','⚠\x20Empty\x20(treated\x20as\x20{})','(unnamed)','✓\x20current','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','skillVersion','\x20\x20─','serviceCode','16lFslWm','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','riskLevel','117MUEpyo','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','bold','\x20\x20auth\x20(effective):\x20','reason','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','length','99358opFXxi','check','version','missing','serviceCount','pageSize','defaultApp','verbose','(missing)','\x20(legacy/compat\x20only)','locale','✗\x20Invalid','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','log','arch','format','currentApp','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','171932RfFOXL','name','empty','current','packageVersion','4DYvvDZ','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20API\x20Endpoints','Project','repeat','padEnd','\x20\x20Session\x20check:\x20\x20\x20','gray','commandCount','211405QaLIpF','299196eenCdo','\x20Imported\x20from:\x20','yellow','read','registryPath','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','platform','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x5d22=function(){return _0x253f28;};return a29_0x5d22();}async function execute(_0x5e4502){const _0xa41d85=a29_0x4ed9,_0x278d65=getCliVersion(),_0x3dfae6=buildConfigFromFlags({});await initGlobalEnvironment(_0x3dfae6),console[_0xa41d85(0x21b)](),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x207)](CLI_BIN_NAME+'\x20doctor')),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)]('─'[_0xa41d85(0x22c)](0x32))),console[_0xa41d85(0x21b)](_0xa41d85(0x1e4)+_0x278d65),console[_0xa41d85(0x21b)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xa41d85(0x210)]),console[_0xa41d85(0x21b)](_0xa41d85(0x205)+process[_0xa41d85(0x1d8)]+'\x20'+process[_0xa41d85(0x21c)]);const _0x2dda50=inspectBuiltinSkill();console[_0xa41d85(0x21b)](),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x207)](_0xa41d85(0x1f8))),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)]('\x20\x20─'[_0xa41d85(0x22c)](0x1e))),console[_0xa41d85(0x21b)](_0xa41d85(0x1f6)+(_0x2dda50[_0xa41d85(0x1e0)]===_0xa41d85(0x223)?a29_0x4a9b64['green'](_0xa41d85(0x1fc)):a29_0x4a9b64['red']('✗\x20'+_0x2dda50[_0xa41d85(0x1e0)]))),console[_0xa41d85(0x21b)](_0xa41d85(0x1f4)+_0x2dda50[_0xa41d85(0x224)]),console[_0xa41d85(0x21b)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x2dda50[_0xa41d85(0x1fe)]||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x216)))),console[_0xa41d85(0x21b)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x2dda50[_0xa41d85(0x1e3)]||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x229))));_0x2dda50[_0xa41d85(0x1e0)]!==_0xa41d85(0x223)&&console[_0xa41d85(0x21b)](_0xa41d85(0x1d9)+_0x2dda50['repairCommand']);_0x2dda50[_0xa41d85(0x209)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2dda50['reason']);console[_0xa41d85(0x21b)](),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x207)]('\x20\x20Config\x20Files')),console[_0xa41d85(0x21b)](a29_0x4a9b64['gray'](_0xa41d85(0x1ff)[_0xa41d85(0x22c)](0x1e)));const _0x58b1a7=getGlobalConfigPath(),_0x5e5ede=getProjectConfigPath();console[_0xa41d85(0x21b)](_0xa41d85(0x1dc)+(_0x58b1a7||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x229)))),console['log'](_0xa41d85(0x21f)+(_0x5e5ede||a29_0x4a9b64['gray'](_0xa41d85(0x229)))),console['log'](),console['log'](a29_0x4a9b64[_0xa41d85(0x207)](_0xa41d85(0x1ec))),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)]('\x20\x20─'[_0xa41d85(0x22c)](0x1e)));const _0x4a3b99=(_0x4063c4,_0x1b5e53)=>{const _0xd5ef92=_0xa41d85;if(!_0x1b5e53){console['log']('\x20\x20'+_0x4063c4[_0xd5ef92(0x22d)](0x11)+'\x20'+a29_0x4a9b64['gray'](_0xd5ef92(0x227)));return;}const _0xf2aefa=inspectCliConfigJsonFile(_0x1b5e53);if(_0xf2aefa[_0xd5ef92(0x1da)]==='ok')console[_0xd5ef92(0x21b)]('\x20\x20'+_0x4063c4['padEnd'](0x11)+'\x20'+a29_0x4a9b64[_0xd5ef92(0x1df)]('✓\x20Valid\x20JSON'));else{if(_0xf2aefa[_0xd5ef92(0x1da)]===_0xd5ef92(0x222))console[_0xd5ef92(0x21b)]('\x20\x20'+_0x4063c4[_0xd5ef92(0x22d)](0x11)+'\x20'+a29_0x4a9b64[_0xd5ef92(0x1d4)](_0xd5ef92(0x1fa)));else _0xf2aefa['status']===_0xd5ef92(0x211)?console['log']('\x20\x20'+_0x4063c4['padEnd'](0x11)+'\x20'+a29_0x4a9b64['gray'](_0xd5ef92(0x216))):(console[_0xd5ef92(0x21b)]('\x20\x20'+_0x4063c4['padEnd'](0x11)+'\x20'+a29_0x4a9b64[_0xd5ef92(0x1e1)]('✗\x20Invalid\x20JSON')),console[_0xd5ef92(0x21b)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x4a9b64['red'](_0xf2aefa[_0xd5ef92(0x20c)])));}};_0x4a3b99('Global',_0x58b1a7),_0x4a3b99(_0xa41d85(0x22b),_0x5e5ede),console[_0xa41d85(0x21b)](),console['log'](a29_0x4a9b64[_0xa41d85(0x207)]('\x20\x20Merged\x20Config')),console['log'](a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1ff)[_0xa41d85(0x22c)](0x1e))),console['log'](_0xa41d85(0x228)+(_0x3dfae6[_0xa41d85(0x1ef)]||a29_0x4a9b64[_0xa41d85(0x1e1)]('(not\x20set)'))),console['log'](_0xa41d85(0x1e2)+_0x3dfae6[_0xa41d85(0x1e8)]);const _0x5ce0ed=isLegacyCompatConfigKey(_0xa41d85(0x218))?a29_0x4a9b64[_0xa41d85(0x1cf)](_0x3dfae6[_0xa41d85(0x218)]+_0xa41d85(0x217)):_0x3dfae6[_0xa41d85(0x218)];console[_0xa41d85(0x21b)](_0xa41d85(0x20b)+_0x5ce0ed),console[_0xa41d85(0x21b)](_0xa41d85(0x226)+(_0x3dfae6[_0xa41d85(0x214)]||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1f3)))),console['log'](_0xa41d85(0x202)+(_0x3dfae6[_0xa41d85(0x21e)]||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1f3)))),console['log'](_0xa41d85(0x1f5)+(_0x3dfae6[_0xa41d85(0x21d)]||a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1de)+DEFAULT_CONFIG_VALUES[_0xa41d85(0x21d)]+')'))),console[_0xa41d85(0x21b)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3dfae6[_0xa41d85(0x213)]??a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1eb)))),console[_0xa41d85(0x21b)](_0xa41d85(0x21a)+_0x3dfae6[_0xa41d85(0x203)]),console[_0xa41d85(0x21b)](_0xa41d85(0x1e9)+_0x3dfae6[_0xa41d85(0x215)]),console[_0xa41d85(0x21b)](_0xa41d85(0x208)+AUTH_MODE['ClientAk']),console[_0xa41d85(0x21b)](_0xa41d85(0x1d7)+(_0x3dfae6[_0xa41d85(0x1ed)]?a29_0x4a9b64[_0xa41d85(0x1df)]('(set,\x20length='+_0x3dfae6['accessKey'][_0xa41d85(0x20d)]+')'):a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1f3)))),console['log'](),console['log'](a29_0x4a9b64[_0xa41d85(0x207)](_0xa41d85(0x22a))),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1ff)[_0xa41d85(0x22c)](0x1e))),console[_0xa41d85(0x21b)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0xa41d85(0x1db)+getUserDomain()),console[_0xa41d85(0x21b)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0xa41d85(0x21b)](),console['log'](a29_0x4a9b64[_0xa41d85(0x207)](_0xa41d85(0x1ee))),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)](_0xa41d85(0x1ff)['repeat'](0x1e)));const _0x51754d=inspectServiceRegistry();console['log'](_0xa41d85(0x1fd)+_0x51754d[_0xa41d85(0x1d6)]),console['log'](_0xa41d85(0x1dd)+formatServiceRegistryStatus(_0x51754d)),console[_0xa41d85(0x21b)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x51754d[_0xa41d85(0x212)]),console['log'](_0xa41d85(0x20a)+_0x51754d[_0xa41d85(0x1d0)]);for(const _0x3b4617 of _0x51754d['services']){console[_0xa41d85(0x21b)]('\x20\x20'+(_0x3b4617[_0xa41d85(0x200)]+':')[_0xa41d85(0x22d)](0x11)+'\x20'+(_0x3b4617[_0xa41d85(0x221)]||a29_0x4a9b64['gray'](_0xa41d85(0x1fb)))+'\x20('+_0x3b4617['commandCount']+'\x20commands)'),console[_0xa41d85(0x21b)]('\x20\x20'+''[_0xa41d85(0x22d)](0x11)+_0xa41d85(0x1d3)+_0x3b4617[_0xa41d85(0x1f0)][_0xa41d85(0x1e5)]);}return console[_0xa41d85(0x21b)](),console['log'](a29_0x4a9b64[_0xa41d85(0x207)](_0xa41d85(0x206))),console[_0xa41d85(0x21b)](a29_0x4a9b64[_0xa41d85(0x1cf)]('\x20\x20─'[_0xa41d85(0x22c)](0x1e))),console[_0xa41d85(0x21b)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x4a9b64[_0xa41d85(0x1df)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0xa41d85(0x21b)](_0xa41d85(0x1ce)+a29_0x4a9b64['gray'](_0xa41d85(0x1f9))),console[_0xa41d85(0x21b)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x380637){const _0x4ba258=a29_0x4ed9;if(_0x380637[_0x4ba258(0x1da)]==='ok')return a29_0x4a9b64[_0x4ba258(0x1df)](_0x4ba258(0x1e7));if(_0x380637[_0x4ba258(0x1da)]===_0x4ba258(0x211))return a29_0x4a9b64[_0x4ba258(0x1cf)]('(not\x20found)');if(_0x380637[_0x4ba258(0x1da)]===_0x4ba258(0x222))return a29_0x4a9b64['yellow'](_0x4ba258(0x1e6));return a29_0x4a9b64[_0x4ba258(0x1e1)](_0x4ba258(0x219)+(_0x380637[_0x4ba258(0x20c)]?':\x20'+_0x380637['message']:''));}export const doctorDefinition={'service':a29_0x404151(0x1ea),'command':a29_0x404151(0x20f),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x404151(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x5b33a7=a30_0x1c4a;(function(_0x2ef2be,_0x524431){const _0x176633=a30_0x1c4a,_0x3268e0=_0x2ef2be();while(!![]){try{const _0x3da620=parseInt(_0x176633(0x182))/0x1*(-parseInt(_0x176633(0x181))/0x2)+parseInt(_0x176633(0x18b))/0x3*(-parseInt(_0x176633(0x16d))/0x4)+-parseInt(_0x176633(0x179))/0x5+-parseInt(_0x176633(0x18c))/0x6+-parseInt(_0x176633(0x18d))/0x7*(parseInt(_0x176633(0x18a))/0x8)+-parseInt(_0x176633(0x173))/0x9*(parseInt(_0x176633(0x17d))/0xa)+parseInt(_0x176633(0x17a))/0xb;if(_0x3da620===_0x524431)break;else _0x3268e0['push'](_0x3268e0['shift']());}catch(_0x58fa2d){_0x3268e0['push'](_0x3268e0['shift']());}}}(a30_0x470a,0x23196));function a30_0x1c4a(_0x988e72,_0x57553e){_0x988e72=_0x988e72-0x16b;const _0x470a9c=a30_0x470a();let _0x1c4a1d=_0x470a9c[_0x988e72];return _0x1c4a1d;}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x470a(){const _0x43e165=['Path\x20to\x20the\x20local\x20file\x20to\x20upload','/client/uploadFile','File','716UBHEKa','248zigxns','\x20to\x20runtime\x20app\x20','Preview:\x20upload\x20','build','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','validation','bool','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','141544PNXChT','26067jxbDgq','203226TFSyTe','49dlHYbC','filepath','upload','boolean','path','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filePath','file','92bVeJSz','string','read','POST','appCode','Uploaded\x20file:\x20','144630wNCdxj','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','download','body','filePath\x20is\x20required.','222320pMLjhA','7510723dcCoFs','long-term','str','30BagOMk'];a30_0x470a=function(){return _0x43e165;};return a30_0x470a();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x5b33a7(0x16c),'type':a30_0x5b33a7(0x16e),'required':!![],'description':a30_0x5b33a7(0x17e)},FILEPATH_FLAG={'name':a30_0x5b33a7(0x18e),'type':a30_0x5b33a7(0x16e),'required':!![],'description':a30_0x5b33a7(0x186)},DOWNLOAD_FLAG={'name':a30_0x5b33a7(0x176),'type':a30_0x5b33a7(0x190),'description':a30_0x5b33a7(0x189)},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':a30_0x5b33a7(0x192)};function requireFilePath(_0xf6b42f){const _0x145a19=a30_0x5b33a7,_0x4c465f=_0xf6b42f['trim']();if(!_0x4c465f)throw CliErrors[_0x145a19(0x187)](_0x145a19(0x178));return _0x4c465f;}const fileUpload={'service':a30_0x5b33a7(0x16c),'command':a30_0x5b33a7(0x18f),'description':a30_0x5b33a7(0x174),'risk':a30_0x5b33a7(0x16f),'flags':[FILE_FLAG],async 'dryRun'(_0x353064){const _0x4e8026=a30_0x5b33a7,_0x4c7ed7=requireRuntimeUploadFile(_0x353064['str'](_0x4e8026(0x16c)),'File');return dryRun(_0x4e8026(0x170),_0x4e8026(0x17f))[_0x4e8026(0x177)]({'appCode':_0x353064[_0x4e8026(0x171)],'multipart':{'file':_0x4c7ed7}})['description'](_0x4e8026(0x184)+_0x4c7ed7[_0x4e8026(0x191)]+_0x4e8026(0x183)+_0x353064[_0x4e8026(0x171)])[_0x4e8026(0x185)]();},async 'execute'(_0x433baf){const _0x4f05fe=a30_0x5b33a7,_0x4ee210=requireRuntimeUploadFile(_0x433baf[_0x4f05fe(0x17c)](_0x4f05fe(0x16c)),_0x4f05fe(0x180)),_0xb0d713=await uploadRuntimeFile(_0x433baf[_0x4f05fe(0x171)],_0x4ee210['path']);return{'ok':!![],'data':_0xb0d713,'message':_0xb0d713[_0x4f05fe(0x16b)]?_0x4f05fe(0x172)+_0xb0d713['filePath']+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x5b33a7(0x16c),'command':'query-url','description':a30_0x5b33a7(0x175),'risk':a30_0x5b33a7(0x16f),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1c1698){const _0x5c084f=a30_0x5b33a7,_0x2613c9=requireFilePath(_0x1c1698['str'](_0x5c084f(0x18e))),_0x3b9014=await queryRuntimeFileUrl(_0x2613c9,{'download':_0x1c1698[_0x5c084f(0x188)]('download'),'longTerm':_0x1c1698['bool'](_0x5c084f(0x17b))});return{'ok':!![],'data':_0x3b9014};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x3f5300=a30_0x3856;function a30_0x5191(){const _0x1ebc05=['upload','/client/uploadFile','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','path','2RZlEDE','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','1390770StLhsf','428554wFQmxX','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','validation','Preview:\x20upload\x20','7820OriLqV','\x20to\x20runtime\x20app\x20','POST','download','4359076lUAzfs','241295RQLcAg','5019216lxwAhb','1026457IcWVHy','read','file','11412fUiNAX','filePath','boolean','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filePath\x20is\x20required.','appCode','trim','string','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','long-term','File','str','description','66QzvlSo'];a30_0x5191=function(){return _0x1ebc05;};return a30_0x5191();}(function(_0x3b8ee6,_0x27301d){const _0x480a1a=a30_0x3856,_0x296bac=_0x3b8ee6();while(!![]){try{const _0x54f1c5=-parseInt(_0x480a1a(0x159))/0x1*(parseInt(_0x480a1a(0x14b))/0x2)+-parseInt(_0x480a1a(0x14d))/0x3+parseInt(_0x480a1a(0x156))/0x4+parseInt(_0x480a1a(0x157))/0x5*(parseInt(_0x480a1a(0x145))/0x6)+parseInt(_0x480a1a(0x14e))/0x7+-parseInt(_0x480a1a(0x158))/0x8+parseInt(_0x480a1a(0x15c))/0x9*(parseInt(_0x480a1a(0x152))/0xa);if(_0x54f1c5===_0x27301d)break;else _0x296bac['push'](_0x296bac['shift']());}catch(_0x12f072){_0x296bac['push'](_0x296bac['shift']());}}}(a30_0x5191,0x87bbf));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x3856(_0x3d3b72,_0x4cc09e){_0x3d3b72=_0x3d3b72-0x13b;const _0x51911b=a30_0x5191();let _0x385659=_0x51911b[_0x3d3b72];return _0x385659;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x3f5300(0x15b),'type':a30_0x3f5300(0x13f),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x3f5300(0x13f),'required':!![],'description':a30_0x3f5300(0x14c)},DOWNLOAD_FLAG={'name':a30_0x3f5300(0x155),'type':a30_0x3f5300(0x15e),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x3f5300(0x141),'type':a30_0x3f5300(0x15e),'description':a30_0x3f5300(0x14f)};function requireFilePath(_0x3008da){const _0x27afb3=a30_0x3f5300,_0x5da421=_0x3008da[_0x27afb3(0x13e)]();if(!_0x5da421)throw CliErrors[_0x27afb3(0x150)](_0x27afb3(0x13c));return _0x5da421;}const fileUpload={'service':'file','command':a30_0x3f5300(0x146),'description':a30_0x3f5300(0x140),'risk':a30_0x3f5300(0x15a),'flags':[FILE_FLAG],async 'dryRun'(_0x312020){const _0x42a84e=a30_0x3f5300,_0x150fe5=requireRuntimeUploadFile(_0x312020['str'](_0x42a84e(0x15b)),_0x42a84e(0x142));return dryRun(_0x42a84e(0x154),_0x42a84e(0x147))['body']({'appCode':_0x312020[_0x42a84e(0x13d)],'multipart':{'file':_0x150fe5}})[_0x42a84e(0x144)](_0x42a84e(0x151)+_0x150fe5[_0x42a84e(0x14a)]+_0x42a84e(0x153)+_0x312020['appCode'])['build']();},async 'execute'(_0x59c04c){const _0x294238=a30_0x3f5300,_0x54714d=requireRuntimeUploadFile(_0x59c04c[_0x294238(0x143)](_0x294238(0x15b)),'File'),_0x3e410c=await uploadRuntimeFile(_0x59c04c['appCode'],_0x54714d['path']);return{'ok':!![],'data':_0x3e410c,'message':_0x3e410c[_0x294238(0x15d)]?'Uploaded\x20file:\x20'+_0x3e410c[_0x294238(0x15d)]+_0x294238(0x148):_0x294238(0x13b)};}},fileQueryUrl={'service':a30_0x3f5300(0x15b),'command':'query-url','description':a30_0x3f5300(0x149),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x5751cf){const _0x9f4e58=a30_0x3f5300,_0xe4ecc9=requireFilePath(_0x5751cf['str']('filepath')),_0x50d2ea=await queryRuntimeFileUrl(_0xe4ecc9,{'download':_0x5751cf['bool'](_0x9f4e58(0x155)),'longTerm':_0x5751cf['bool'](_0x9f4e58(0x141))});return{'ok':!![],'data':_0x50d2ea};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x9098d7=a31_0x4e1d;(function(_0xd7597,_0x3c759c){const _0x3c1bc0=a31_0x4e1d,_0x53db10=_0xd7597();while(!![]){try{const _0x9544bd=-parseInt(_0x3c1bc0(0x179))/0x1+parseInt(_0x3c1bc0(0x164))/0x2+parseInt(_0x3c1bc0(0x17a))/0x3+-parseInt(_0x3c1bc0(0x165))/0x4*(-parseInt(_0x3c1bc0(0x16b))/0x5)+-parseInt(_0x3c1bc0(0x152))/0x6*(parseInt(_0x3c1bc0(0x15e))/0x7)+-parseInt(_0x3c1bc0(0x151))/0x8*(parseInt(_0x3c1bc0(0x161))/0x9)+-parseInt(_0x3c1bc0(0x16c))/0xa*(-parseInt(_0x3c1bc0(0x154))/0xb);if(_0x9544bd===_0x3c759c)break;else _0x53db10['push'](_0x53db10['shift']());}catch(_0x23bff0){_0x53db10['push'](_0x53db10['shift']());}}}(a31_0xc798,0xd26d1));function a31_0x4e1d(_0x59e1db,_0x5ea75d){_0x59e1db=_0x59e1db-0x151;const _0xc79803=a31_0xc798();let _0x4e1ddd=_0xc79803[_0x59e1db];return _0x4e1ddd;}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';function a31_0xc798(){const _0x42da4b=['riskLevel','3082078sIDPBI','1082420dtgqWN','apps','log','appcode','Override\x20imported\x20default\x20env','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','15TSifOV','10022660xcYCym','boolean','newConfigFileName','project','Source\x20file\x20not\x20found:\x20','env','Failed\x20to\x20parse\x20source\x20file:\x20','Invalid\x20env\x20\x22','Write\x20to\x20global\x20(~/','\x20\x20config:\x20\x20','global','string','cwd','1697502ZRBGod','275349JYZCFy','2593496DOCcEq','6nMyLRi','defaultApp','11psIOqf','\x22.\x20Allowed:\x20','entries','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','parse','validation','yes','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','object','app','1673854IMYyjH','file','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','18qumPWk','message'];a31_0xc798=function(){return _0x42da4b;};return a31_0xc798();}import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':a31_0x9098d7(0x177),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':'appcode','type':a31_0x9098d7(0x177),'description':'Override\x20imported\x20default\x20appcode'},{'name':a31_0x9098d7(0x171),'type':a31_0x9098d7(0x177),'description':a31_0x9098d7(0x169),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x9098d7(0x176),'type':a31_0x9098d7(0x16d),'description':a31_0x9098d7(0x174)+PRODUCT_CONFIG[a31_0x9098d7(0x16e)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x9098d7(0x15a),'type':a31_0x9098d7(0x16d),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x1c32f4){const _0x435933=a31_0x9098d7,_0xc2e66f=_0x1c32f4[_0x435933(0x176)]?_0x435933(0x176):_0x435933(0x16f),_0x3de6d4=resolveWriteConfigPath(_0xc2e66f);await runFromImport(_0x1c32f4,_0x3de6d4);}async function runFromImport(_0xffd65d,_0x3b2cdc){const _0xf67803=a31_0x9098d7,_0x468653=resolveFilePath(_0xffd65d[_0xf67803(0x15f)]);if(!existsSync(_0x468653))throw CliErrors[_0xf67803(0x159)](_0xf67803(0x170)+_0x468653);const _0x3ad1cf=readSourceFile(_0x468653),_0x4e6b2c=convertToRuntimeConfig(_0x3ad1cf);_0xffd65d[_0xf67803(0x168)]&&(_0x4e6b2c[_0xf67803(0x168)]=String(_0xffd65d[_0xf67803(0x168)]));_0xffd65d[_0xf67803(0x171)]&&(_0x4e6b2c['env']=resolveImportEnv(_0xffd65d));if(!_0x4e6b2c[_0xf67803(0x168)])throw CliErrors['validation'](_0xf67803(0x160),_0xf67803(0x15b));await writeImportConfig(_0x3b2cdc,_0x4e6b2c,_0xffd65d),console[_0xf67803(0x167)]('Imported\x20from\x20'+_0x468653),console[_0xf67803(0x167)](_0xf67803(0x175)+_0x3b2cdc),console[_0xf67803(0x167)]('\x20\x20appcode:\x20'+_0x4e6b2c[_0xf67803(0x168)]);if(_0x4e6b2c[_0xf67803(0x153)])console[_0xf67803(0x167)]('\x20\x20default:\x20'+_0x4e6b2c[_0xf67803(0x153)]);}function convertToRuntimeConfig(_0x36de7b){const _0x5a4584=a31_0x9098d7;if(_0x36de7b['apps']&&typeof _0x36de7b[_0x5a4584(0x166)]===_0x5a4584(0x15c))throw CliErrors[_0x5a4584(0x159)](_0x5a4584(0x157),_0x5a4584(0x16a));const _0x419adb={};for(const _0x1e649f of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x36de7b[_0x1e649f]!==undefined&&(_0x419adb[_0x1e649f]=_0x36de7b[_0x1e649f]);}return!_0x419adb['riskLevel']&&(_0x419adb[_0x5a4584(0x163)]=DEFAULT_CONFIG_VALUES[_0x5a4584(0x163)]),_0x419adb;}async function writeImportConfig(_0x4b6ae8,_0x3cfd2e,_0x2c0b3f){const _0x3d738c=a31_0x9098d7;let _0x3c1cb8={};existsSync(_0x4b6ae8)&&!_0x2c0b3f['yes']&&(_0x3c1cb8=readConfigFile(_0x4b6ae8));for(const [_0x50e0f5,_0x3c62d3]of Object[_0x3d738c(0x156)](_0x3cfd2e)){_0x3c62d3!==undefined&&(_0x3c1cb8[_0x50e0f5]=_0x3c62d3);}if(_0x3c1cb8[_0x3d738c(0x15d)])delete _0x3c1cb8[_0x3d738c(0x15d)];writeConfigFile(_0x4b6ae8,_0x3c1cb8);}function resolveFilePath(_0x19bc9a){const _0x2c5f4b=a31_0x9098d7;return isAbsolute(_0x19bc9a)?_0x19bc9a:resolve(process[_0x2c5f4b(0x178)](),_0x19bc9a);}function readSourceFile(_0x424cae){const _0x19a3c0=a31_0x9098d7;try{const _0x3b6342=readFileSync(_0x424cae,{'encoding':'utf8'});return JSON[_0x19a3c0(0x158)](_0x3b6342);}catch(_0xf8ee65){throw CliErrors[_0x19a3c0(0x159)](_0x19a3c0(0x172)+_0xf8ee65[_0x19a3c0(0x162)]);}}function resolveImportEnv(_0x282459){const _0x579baa=a31_0x9098d7,_0x5cd721=_0x282459[_0x579baa(0x171)];if(_0x5cd721===undefined||_0x5cd721==='')return DEFAULT_CONFIG_VALUES[_0x579baa(0x171)];if(!RUNTIME_ENV_VALUES['includes'](_0x5cd721))throw CliErrors[_0x579baa(0x159)](_0x579baa(0x173)+_0x5cd721+_0x579baa(0x155)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x5cd721;}
1
+ const a31_0x4ccc79=a31_0x3d24;(function(_0x58b7ce,_0x1dd8a8){const _0x5887cf=a31_0x3d24,_0x55a2b7=_0x58b7ce();while(!![]){try{const _0x3ba435=parseInt(_0x5887cf(0x20f))/0x1+parseInt(_0x5887cf(0x206))/0x2*(parseInt(_0x5887cf(0x207))/0x3)+parseInt(_0x5887cf(0x219))/0x4*(parseInt(_0x5887cf(0x217))/0x5)+-parseInt(_0x5887cf(0x220))/0x6*(-parseInt(_0x5887cf(0x21e))/0x7)+-parseInt(_0x5887cf(0x21c))/0x8+parseInt(_0x5887cf(0x1f6))/0x9+-parseInt(_0x5887cf(0x200))/0xa;if(_0x3ba435===_0x1dd8a8)break;else _0x55a2b7['push'](_0x55a2b7['shift']());}catch(_0x1daeb9){_0x55a2b7['push'](_0x55a2b7['shift']());}}}(a31_0x859e,0x2b8e3));import{existsSync,readFileSync}from'node:fs';function a31_0x3d24(_0x232afb,_0x230c9a){_0x232afb=_0x232afb-0x1f4;const _0x859e4b=a31_0x859e();let _0x3d24d9=_0x859e4b[_0x232afb];return _0x3d24d9;}import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':a31_0x4ccc79(0x20e),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x4ccc79(0x204),'type':a31_0x4ccc79(0x20e),'description':a31_0x4ccc79(0x212)},{'name':a31_0x4ccc79(0x1f7),'type':a31_0x4ccc79(0x20e),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4ccc79(0x205),'type':a31_0x4ccc79(0x218),'description':a31_0x4ccc79(0x221)+PRODUCT_CONFIG[a31_0x4ccc79(0x20d)]+a31_0x4ccc79(0x1f8),'default':![]},{'name':'yes','type':a31_0x4ccc79(0x218),'description':a31_0x4ccc79(0x211),'default':![]}];export async function runAppImport(_0x207b9a){const _0x2c3941=a31_0x4ccc79,_0x47722f=_0x207b9a['global']?'global':_0x2c3941(0x1f4),_0x16796a=resolveWriteConfigPath(_0x47722f);await runFromImport(_0x207b9a,_0x16796a);}async function runFromImport(_0x11151a,_0x30d9af){const _0x4901b0=a31_0x4ccc79,_0x101364=resolveFilePath(_0x11151a[_0x4901b0(0x20c)]);if(!existsSync(_0x101364))throw CliErrors[_0x4901b0(0x1fa)](_0x4901b0(0x210)+_0x101364);const _0x1f8cb4=readSourceFile(_0x101364),_0x423a09=convertToRuntimeConfig(_0x1f8cb4);_0x11151a[_0x4901b0(0x204)]&&(_0x423a09[_0x4901b0(0x204)]=String(_0x11151a['appcode']));_0x11151a['env']&&(_0x423a09[_0x4901b0(0x1f7)]=resolveImportEnv(_0x11151a));if(!_0x423a09[_0x4901b0(0x204)])throw CliErrors['validation'](_0x4901b0(0x20b),_0x4901b0(0x209));await writeImportConfig(_0x30d9af,_0x423a09,_0x11151a),console['log']('Imported\x20from\x20'+_0x101364),console['log'](_0x4901b0(0x202)+_0x30d9af),console[_0x4901b0(0x21b)](_0x4901b0(0x222)+_0x423a09[_0x4901b0(0x204)]);if(_0x423a09['defaultApp'])console[_0x4901b0(0x21b)](_0x4901b0(0x1fc)+_0x423a09['defaultApp']);}function convertToRuntimeConfig(_0x35e825){const _0x4d09eb=a31_0x4ccc79;if(_0x35e825[_0x4d09eb(0x201)]&&typeof _0x35e825[_0x4d09eb(0x201)]===_0x4d09eb(0x1f5))throw CliErrors['validation'](_0x4d09eb(0x1ff),_0x4d09eb(0x1f9));const _0x1fb26f={};for(const _0x4c7f26 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x35e825[_0x4c7f26]!==undefined&&(_0x1fb26f[_0x4c7f26]=_0x35e825[_0x4c7f26]);}return!_0x1fb26f[_0x4d09eb(0x215)]&&(_0x1fb26f['riskLevel']=DEFAULT_CONFIG_VALUES[_0x4d09eb(0x215)]),_0x1fb26f;}async function writeImportConfig(_0x285d31,_0x5a1b87,_0x4c9b00){const _0xcfec36=a31_0x4ccc79;let _0x249eb6={};existsSync(_0x285d31)&&!_0x4c9b00[_0xcfec36(0x1fb)]&&(_0x249eb6=readConfigFile(_0x285d31));for(const [_0x5661eb,_0xe482b1]of Object[_0xcfec36(0x213)](_0x5a1b87)){_0xe482b1!==undefined&&(_0x249eb6[_0x5661eb]=_0xe482b1);}if(_0x249eb6[_0xcfec36(0x214)])delete _0x249eb6[_0xcfec36(0x214)];writeConfigFile(_0x285d31,_0x249eb6);}function resolveFilePath(_0x4b92eb){const _0x3434c7=a31_0x4ccc79;return isAbsolute(_0x4b92eb)?_0x4b92eb:resolve(process[_0x3434c7(0x20a)](),_0x4b92eb);}function readSourceFile(_0x48ad24){const _0x141dcd=a31_0x4ccc79;try{const _0x2f3c12=readFileSync(_0x48ad24,{'encoding':_0x141dcd(0x203)});return JSON[_0x141dcd(0x21f)](_0x2f3c12);}catch(_0x1f6167){throw CliErrors[_0x141dcd(0x1fa)](_0x141dcd(0x216)+_0x1f6167[_0x141dcd(0x21d)]);}}function resolveImportEnv(_0x1db4c6){const _0x5f3036=a31_0x4ccc79,_0x4efc56=_0x1db4c6[_0x5f3036(0x1f7)];if(_0x4efc56===undefined||_0x4efc56==='')return DEFAULT_CONFIG_VALUES[_0x5f3036(0x1f7)];if(!RUNTIME_ENV_VALUES[_0x5f3036(0x1fd)](_0x4efc56))throw CliErrors[_0x5f3036(0x1fa)](_0x5f3036(0x21a)+_0x4efc56+_0x5f3036(0x208)+RUNTIME_ENV_VALUES[_0x5f3036(0x1fe)](',\x20'));return _0x4efc56;}function a31_0x859e(){const _0x3941a2=['cwd','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','file','newConfigFileName','string','267964OWKCuP','Source\x20file\x20not\x20found:\x20','Skip\x20confirmation\x20when\x20overwriting','Override\x20imported\x20default\x20appcode','entries','app','riskLevel','Failed\x20to\x20parse\x20source\x20file:\x20','745LWNRCg','boolean','6196gQPJNh','Invalid\x20env\x20\x22','log','1753864fQDGDu','message','2313332bTCfIM','parse','6beURFI','Write\x20to\x20global\x20(~/','\x20\x20appcode:\x20','project','object','3150270cWZWlF','env',')\x20instead\x20of\x20project','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','validation','yes','\x20\x20default:\x20','includes','join','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','9683100jYrqTy','apps','\x20\x20config:\x20\x20','utf8','appcode','global','2GMHACK','560025mTxFJG','\x22.\x20Allowed:\x20','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.'];a31_0x859e=function(){return _0x3941a2;};return a31_0x859e();}
@@ -1 +1 @@
1
- const a32_0x2fc661=a32_0x306e;(function(_0xf1ff4,_0x2c89e5){const _0x34c6f9=a32_0x306e,_0x3f5510=_0xf1ff4();while(!![]){try{const _0x523b4a=-parseInt(_0x34c6f9(0x1c9))/0x1+parseInt(_0x34c6f9(0x1b2))/0x2+-parseInt(_0x34c6f9(0x1ac))/0x3+-parseInt(_0x34c6f9(0x1cb))/0x4+parseInt(_0x34c6f9(0x1b5))/0x5*(parseInt(_0x34c6f9(0x1a8))/0x6)+parseInt(_0x34c6f9(0x1bd))/0x7*(parseInt(_0x34c6f9(0x1be))/0x8)+parseInt(_0x34c6f9(0x1c5))/0x9*(parseInt(_0x34c6f9(0x1d0))/0xa);if(_0x523b4a===_0x2c89e5)break;else _0x3f5510['push'](_0x3f5510['shift']());}catch(_0x1b48fc){_0x3f5510['push'](_0x3f5510['shift']());}}}(a32_0xfaba,0x3c096));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a32_0x2fc661(0x1ab),'required':!![],'description':a32_0x2fc661(0x1b0)},FILE_FLAG={'name':a32_0x2fc661(0x1d7),'type':a32_0x2fc661(0x1ab),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':'topk','type':a32_0x2fc661(0x1cf),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x4edbfb){const _0x8a8fbf=a32_0x2fc661;if(!_0x4edbfb)throw CliErrors[_0x8a8fbf(0x1a4)](_0x8a8fbf(0x1bc));if(!existsSync(_0x4edbfb))throw CliErrors[_0x8a8fbf(0x1a4)]('File\x20not\x20found:\x20'+_0x4edbfb);if(!statSync(_0x4edbfb)[_0x8a8fbf(0x1a2)]())throw CliErrors[_0x8a8fbf(0x1a4)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4edbfb);return readFileSync(_0x4edbfb,'utf8');}function summarizePersonalItem(_0x3885c2){const _0x461289=a32_0x2fc661;return{'id':_0x3885c2['id'],'title':_0x3885c2[_0x461289(0x1a3)],'version':_0x3885c2['version'],'ragStatus':_0x3885c2[_0x461289(0x1b6)],'ragErrorMessage':_0x3885c2[_0x461289(0x1d3)],'updateTime':_0x3885c2[_0x461289(0x1b7)]};}function detailPersonalItem(_0x5802d9){const _0x332ff4=a32_0x2fc661;return{'id':_0x5802d9['id'],'appCode':_0x5802d9[_0x332ff4(0x1b3)],'scope':_0x5802d9['scope'],'userId':_0x5802d9[_0x332ff4(0x1bf)],'title':_0x5802d9[_0x332ff4(0x1a3)],'content':_0x5802d9[_0x332ff4(0x1b1)]??'','version':_0x5802d9['version'],'ragStatus':_0x5802d9[_0x332ff4(0x1b6)],'ragErrorMessage':_0x5802d9[_0x332ff4(0x1d3)],'createTime':_0x5802d9[_0x332ff4(0x1ad)],'updateTime':_0x5802d9[_0x332ff4(0x1b7)]};}function summarizeSearchHit(_0x493e8b){const _0x35349a=a32_0x2fc661;return{'scope':_0x493e8b['scope'],'title':_0x493e8b[_0x35349a(0x1a3)],'docId':_0x493e8b[_0x35349a(0x1a7)],'score':_0x493e8b[_0x35349a(0x1a1)],'weightedScore':_0x493e8b[_0x35349a(0x1d5)],'content':_0x493e8b['content'],'metadata':_0x493e8b['metadata']};}function readTopK(_0x584ed4){const _0x1a6f60=a32_0x2fc661,_0x582309=_0x584ed4[_0x1a6f60(0x1ce)](_0x1a6f60(0x1b4));if(_0x582309===undefined||_0x582309===null||_0x582309==='')return undefined;const _0x2c8d5e=_0x584ed4[_0x1a6f60(0x1b9)](_0x1a6f60(0x1b4));if(!Number['isFinite'](_0x2c8d5e)||_0x2c8d5e<0x1)throw CliErrors[_0x1a6f60(0x1a4)](_0x1a6f60(0x1ae));return _0x2c8d5e;}function a32_0x306e(_0x51b4e9,_0x5976f1){_0x51b4e9=_0x51b4e9-0x1a1;const _0xfaba77=a32_0xfaba();let _0x306efe=_0xfaba77[_0x51b4e9];return _0x306efe;}const kbList={'service':'kb','command':'list','description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x51a64c){const _0x3b0e6d=a32_0x2fc661,_0x2d510b=await listPersonalKnowledgeBaseItems(_0x51a64c['appCode']);if(_0x51a64c[_0x3b0e6d(0x1c3)]('verbose'))return{'ok':!![],'data':{'total':_0x2d510b[_0x3b0e6d(0x1ba)],'items':_0x2d510b}};return{'ok':!![],'data':{'total':_0x2d510b[_0x3b0e6d(0x1ba)],'items':_0x2d510b[_0x3b0e6d(0x1c6)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x2fc661(0x1bb),'description':a32_0x2fc661(0x1c2),'risk':a32_0x2fc661(0x1c8),'flags':[{...ID_FLAG,'description':a32_0x2fc661(0x1ca)}],async 'execute'(_0x16a85a){const _0x39bc21=a32_0x2fc661,_0xc1596b=await getPersonalKnowledgeBaseItem(_0x16a85a[_0x39bc21(0x1b9)]('id'),_0x16a85a[_0x39bc21(0x1b3)]);return{'ok':!![],'data':detailPersonalItem(_0xc1596b)};}},kbCreate={'service':'kb','command':'create','description':a32_0x2fc661(0x1c4),'risk':a32_0x2fc661(0x1d2),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x58ab99){const _0x2cc6ba=a32_0x2fc661,_0x36160a=_0x58ab99['str'](_0x2cc6ba(0x1a3)),_0x6bdfb2=readKnowledgeFile(_0x58ab99[_0x2cc6ba(0x1a6)](_0x2cc6ba(0x1d7))),_0x2aa64f=await createPersonalKnowledgeBaseItem(_0x58ab99[_0x2cc6ba(0x1b3)],{'title':_0x36160a,'content':_0x6bdfb2});return{'ok':!![],'data':summarizePersonalItem(_0x2aa64f),'message':'Created\x20KB\x20entry\x20'+_0x2aa64f['id']+'\x20('+_0x2aa64f[_0x2cc6ba(0x1a3)]+')'};},async 'dryRun'(_0x258003){const _0x4fbdae=a32_0x2fc661,_0xd1df96=_0x258003['str'](_0x4fbdae(0x1a3)),_0x461250=readKnowledgeFile(_0x258003[_0x4fbdae(0x1a6)](_0x4fbdae(0x1d7)));return dryRun(_0x4fbdae(0x1c0),_0x4fbdae(0x1a5))[_0x4fbdae(0x1cd)]({'appCode':_0x258003[_0x4fbdae(0x1b3)],'title':_0xd1df96,'content':_0x461250})['description'](_0x4fbdae(0x1d1)+_0xd1df96+'\x22')[_0x4fbdae(0x1c1)]();}},kbUpdate={'service':'kb','command':a32_0x2fc661(0x1d8),'description':'根据本地文件更新个人知识库条目','risk':a32_0x2fc661(0x1d2),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':a32_0x2fc661(0x1ca)},{...TITLE_FLAG,'required':![],'description':a32_0x2fc661(0x1b8)},FILE_FLAG],async 'execute'(_0x164608){const _0x58f35c=a32_0x2fc661,_0x3870cd=_0x164608[_0x58f35c(0x1b9)]('id'),_0x196428=readKnowledgeFile(_0x164608[_0x58f35c(0x1a6)](_0x58f35c(0x1d7))),_0x1d0b7b=_0x164608[_0x58f35c(0x1a6)](_0x58f35c(0x1a3))||(await getPersonalKnowledgeBaseItem(_0x3870cd,_0x164608['appCode']))[_0x58f35c(0x1a3)],_0x21cb56=await updatePersonalKnowledgeBaseItem(_0x3870cd,_0x164608[_0x58f35c(0x1b3)],{'title':_0x1d0b7b,'content':_0x196428});return{'ok':!![],'data':summarizePersonalItem(_0x21cb56),'message':_0x58f35c(0x1aa)+_0x21cb56['id']+'\x20('+_0x21cb56['title']+')'};},async 'dryRun'(_0x3c2506){const _0x28007c=a32_0x2fc661,_0xff21a8=_0x3c2506['num']('id'),_0x1849ae=readKnowledgeFile(_0x3c2506[_0x28007c(0x1a6)](_0x28007c(0x1d7))),_0x4fe3e4=_0x3c2506[_0x28007c(0x1a6)](_0x28007c(0x1a3))||(await getPersonalKnowledgeBaseItem(_0xff21a8,_0x3c2506[_0x28007c(0x1b3)]))['title'];return dryRun('POST',_0x28007c(0x1c7)+_0xff21a8+'/update')[_0x28007c(0x1cd)]({'appCode':_0x3c2506['appCode'],'title':_0x4fe3e4,'content':_0x1849ae})[_0x28007c(0x1d6)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0xff21a8)[_0x28007c(0x1c1)]();}},kbSearch={'service':'kb','command':a32_0x2fc661(0x1d4),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x2fc661(0x1c8),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x5eebbf){const _0x21786d=a32_0x2fc661;if(!_0x5eebbf['str'](_0x21786d(0x1a9))[_0x21786d(0x1cc)]())throw CliErrors[_0x21786d(0x1a4)](_0x21786d(0x1af));readTopK(_0x5eebbf);},async 'execute'(_0x3be303){const _0x2d20ed=a32_0x2fc661,_0x5e5c03=_0x3be303[_0x2d20ed(0x1a6)](_0x2d20ed(0x1a9))['trim'](),_0x20d95c=readTopK(_0x3be303),_0x504e44=await searchKnowledgeBase(_0x3be303[_0x2d20ed(0x1b3)],{'query':_0x5e5c03,'topK':_0x20d95c});return{'ok':!![],'data':{'total':_0x504e44['length'],'hits':_0x504e44[_0x2d20ed(0x1c6)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0xfaba(){const _0x49f55b=['str','docId','161922CeKsKi','query','Updated\x20KB\x20entry\x20','string','1366665ATDuQb','createTime','--topk\x20must\x20be\x20a\x20positive\x20number.','Search\x20query\x20is\x20required.','Personal\x20knowledge-base\x20entry\x20title','content','710676xqTfGk','appCode','topk','30PwDKOy','ragStatus','updateTime','Override\x20the\x20existing\x20entry\x20title','num','length','detail','File\x20path\x20is\x20required.','24031WrMNuQ','776KzinHr','userId','POST','build','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','bool','根据本地文件创建个人知识库条目','1255545QwbwkG','map','/client/knowledge-base/personal/','read','118647uoaBbe','Personal\x20knowledge-base\x20entry\x20ID','1236636dDLIaW','trim','body','flag','number','20maHhRr','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','write','ragErrorMessage','search','weightedScore','description','file','update','score','isFile','title','validation','/client/knowledge-base/personal/create'];a32_0xfaba=function(){return _0x49f55b;};return a32_0xfaba();}
1
+ function a32_0x5315(_0x24dcfe,_0x464b6d){_0x24dcfe=_0x24dcfe-0x116;const _0x284523=a32_0x2845();let _0x5315ce=_0x284523[_0x24dcfe];return _0x5315ce;}const a32_0x19d02c=a32_0x5315;(function(_0x54837d,_0x237340){const _0x1b8a45=a32_0x5315,_0x594be5=_0x54837d();while(!![]){try{const _0x528133=-parseInt(_0x1b8a45(0x13d))/0x1+-parseInt(_0x1b8a45(0x14d))/0x2+-parseInt(_0x1b8a45(0x116))/0x3*(parseInt(_0x1b8a45(0x12a))/0x4)+parseInt(_0x1b8a45(0x150))/0x5+parseInt(_0x1b8a45(0x14f))/0x6+parseInt(_0x1b8a45(0x146))/0x7+parseInt(_0x1b8a45(0x13e))/0x8;if(_0x528133===_0x237340)break;else _0x594be5['push'](_0x594be5['shift']());}catch(_0x1c6b85){_0x594be5['push'](_0x594be5['shift']());}}}(a32_0x2845,0xa4a39));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x19d02c(0x122),'type':'string','required':!![],'description':a32_0x19d02c(0x128)},FILE_FLAG={'name':'file','type':'string','required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':'topk','type':a32_0x19d02c(0x11e),'description':a32_0x19d02c(0x14c)};function readKnowledgeFile(_0xe0537e){const _0x291c30=a32_0x19d02c;if(!_0xe0537e)throw CliErrors[_0x291c30(0x131)]('File\x20path\x20is\x20required.');if(!existsSync(_0xe0537e))throw CliErrors['validation'](_0x291c30(0x11d)+_0xe0537e);if(!statSync(_0xe0537e)[_0x291c30(0x127)]())throw CliErrors['validation'](_0x291c30(0x144)+_0xe0537e);return readFileSync(_0xe0537e,_0x291c30(0x12d));}function a32_0x2845(){const _0x4c1c6f=['verbose','create','1346072FChkOI','12745544PChXfB','score','根据本地文件创建个人知识库条目','file','appCode','/client/knowledge-base/personal/create','File\x20is\x20not\x20a\x20regular\x20file:\x20','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','4517730zAeCZx','--topk\x20must\x20be\x20a\x20positive\x20number.','Updated\x20KB\x20entry\x20','content','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','topk','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','516822tKVcQW','updateTime','640524WQqFGE','1427275avWyOi','userId','weightedScore','num','ragStatus','834wappcc','search','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','version','根据本地文件更新个人知识库条目','read','length','File\x20not\x20found:\x20','number','trim','description','str','title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','query','metadata','Created\x20KB\x20entry\x20','isFile','Personal\x20knowledge-base\x20entry\x20title','map','5064RWiRRa','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','utf8','ragErrorMessage','POST','build','validation','/update','/client/knowledge-base/personal/','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','body','docId','scope','update','write','Personal\x20knowledge-base\x20entry\x20ID'];a32_0x2845=function(){return _0x4c1c6f;};return a32_0x2845();}function summarizePersonalItem(_0x53b0c1){const _0x1280cc=a32_0x19d02c;return{'id':_0x53b0c1['id'],'title':_0x53b0c1[_0x1280cc(0x122)],'version':_0x53b0c1[_0x1280cc(0x119)],'ragStatus':_0x53b0c1[_0x1280cc(0x154)],'ragErrorMessage':_0x53b0c1[_0x1280cc(0x12e)],'updateTime':_0x53b0c1[_0x1280cc(0x14e)]};}function detailPersonalItem(_0x4c1fad){const _0x3d716e=a32_0x19d02c;return{'id':_0x4c1fad['id'],'appCode':_0x4c1fad[_0x3d716e(0x142)],'scope':_0x4c1fad[_0x3d716e(0x137)],'userId':_0x4c1fad[_0x3d716e(0x151)],'title':_0x4c1fad[_0x3d716e(0x122)],'content':_0x4c1fad[_0x3d716e(0x149)]??'','version':_0x4c1fad['version'],'ragStatus':_0x4c1fad[_0x3d716e(0x154)],'ragErrorMessage':_0x4c1fad[_0x3d716e(0x12e)],'createTime':_0x4c1fad['createTime'],'updateTime':_0x4c1fad[_0x3d716e(0x14e)]};}function summarizeSearchHit(_0xe3230d){const _0x43fe21=a32_0x19d02c;return{'scope':_0xe3230d[_0x43fe21(0x137)],'title':_0xe3230d['title'],'docId':_0xe3230d[_0x43fe21(0x136)],'score':_0xe3230d[_0x43fe21(0x13f)],'weightedScore':_0xe3230d[_0x43fe21(0x152)],'content':_0xe3230d[_0x43fe21(0x149)],'metadata':_0xe3230d[_0x43fe21(0x125)]};}function readTopK(_0x2aeb0c){const _0x3157e4=a32_0x19d02c,_0x21f07b=_0x2aeb0c['flag']('topk');if(_0x21f07b===undefined||_0x21f07b===null||_0x21f07b==='')return undefined;const _0x2b8c01=_0x2aeb0c[_0x3157e4(0x153)](_0x3157e4(0x14b));if(!Number['isFinite'](_0x2b8c01)||_0x2b8c01<0x1)throw CliErrors['validation'](_0x3157e4(0x147));return _0x2b8c01;}const kbList={'service':'kb','command':'list','description':a32_0x19d02c(0x12c),'risk':a32_0x19d02c(0x11b),'flags':[VERBOSE_FLAG],async 'execute'(_0xb03347){const _0x3c5943=a32_0x19d02c,_0x5104da=await listPersonalKnowledgeBaseItems(_0xb03347[_0x3c5943(0x142)]);if(_0xb03347['bool'](_0x3c5943(0x13b)))return{'ok':!![],'data':{'total':_0x5104da[_0x3c5943(0x11c)],'items':_0x5104da}};return{'ok':!![],'data':{'total':_0x5104da[_0x3c5943(0x11c)],'items':_0x5104da[_0x3c5943(0x129)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x19d02c(0x118),'risk':a32_0x19d02c(0x11b),'flags':[{...ID_FLAG,'description':a32_0x19d02c(0x13a)}],async 'execute'(_0x629dbc){const _0x284560=a32_0x19d02c,_0x3215e6=await getPersonalKnowledgeBaseItem(_0x629dbc[_0x284560(0x153)]('id'),_0x629dbc[_0x284560(0x142)]);return{'ok':!![],'data':detailPersonalItem(_0x3215e6)};}},kbCreate={'service':'kb','command':a32_0x19d02c(0x13c),'description':a32_0x19d02c(0x140),'risk':a32_0x19d02c(0x139),'confirmationDescription':a32_0x19d02c(0x14a),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x2fb378){const _0x389026=a32_0x19d02c,_0x541854=_0x2fb378['str'](_0x389026(0x122)),_0x53b25a=readKnowledgeFile(_0x2fb378[_0x389026(0x121)]('file')),_0x2205b8=await createPersonalKnowledgeBaseItem(_0x2fb378[_0x389026(0x142)],{'title':_0x541854,'content':_0x53b25a});return{'ok':!![],'data':summarizePersonalItem(_0x2205b8),'message':_0x389026(0x126)+_0x2205b8['id']+'\x20('+_0x2205b8['title']+')'};},async 'dryRun'(_0x1a6be5){const _0x5dfe5f=a32_0x19d02c,_0x1670bf=_0x1a6be5[_0x5dfe5f(0x121)](_0x5dfe5f(0x122)),_0x4116c5=readKnowledgeFile(_0x1a6be5[_0x5dfe5f(0x121)](_0x5dfe5f(0x141)));return dryRun(_0x5dfe5f(0x12f),_0x5dfe5f(0x143))[_0x5dfe5f(0x135)]({'appCode':_0x1a6be5[_0x5dfe5f(0x142)],'title':_0x1670bf,'content':_0x4116c5})[_0x5dfe5f(0x120)](_0x5dfe5f(0x12b)+_0x1670bf+'\x22')[_0x5dfe5f(0x130)]();}},kbUpdate={'service':'kb','command':a32_0x19d02c(0x138),'description':a32_0x19d02c(0x11a),'risk':a32_0x19d02c(0x139),'confirmationDescription':a32_0x19d02c(0x134),'flags':[{...ID_FLAG,'description':a32_0x19d02c(0x13a)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x299c16){const _0x11ffa4=a32_0x19d02c,_0x5edf5c=_0x299c16['num']('id'),_0x2a49dd=readKnowledgeFile(_0x299c16[_0x11ffa4(0x121)](_0x11ffa4(0x141))),_0x5defa9=_0x299c16[_0x11ffa4(0x121)](_0x11ffa4(0x122))||(await getPersonalKnowledgeBaseItem(_0x5edf5c,_0x299c16[_0x11ffa4(0x142)]))['title'],_0x37a001=await updatePersonalKnowledgeBaseItem(_0x5edf5c,_0x299c16[_0x11ffa4(0x142)],{'title':_0x5defa9,'content':_0x2a49dd});return{'ok':!![],'data':summarizePersonalItem(_0x37a001),'message':_0x11ffa4(0x148)+_0x37a001['id']+'\x20('+_0x37a001[_0x11ffa4(0x122)]+')'};},async 'dryRun'(_0x181ea2){const _0x2836e4=a32_0x19d02c,_0x19b930=_0x181ea2[_0x2836e4(0x153)]('id'),_0xa3bd43=readKnowledgeFile(_0x181ea2[_0x2836e4(0x121)](_0x2836e4(0x141))),_0x14258d=_0x181ea2[_0x2836e4(0x121)](_0x2836e4(0x122))||(await getPersonalKnowledgeBaseItem(_0x19b930,_0x181ea2[_0x2836e4(0x142)]))[_0x2836e4(0x122)];return dryRun(_0x2836e4(0x12f),_0x2836e4(0x133)+_0x19b930+_0x2836e4(0x132))[_0x2836e4(0x135)]({'appCode':_0x181ea2[_0x2836e4(0x142)],'title':_0x14258d,'content':_0xa3bd43})[_0x2836e4(0x120)](_0x2836e4(0x123)+_0x19b930)[_0x2836e4(0x130)]();}},kbSearch={'service':'kb','command':a32_0x19d02c(0x117),'description':a32_0x19d02c(0x145),'risk':a32_0x19d02c(0x11b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x1475f1){const _0x472a55=a32_0x19d02c;if(!_0x1475f1[_0x472a55(0x121)](_0x472a55(0x124))[_0x472a55(0x11f)]())throw CliErrors[_0x472a55(0x131)]('Search\x20query\x20is\x20required.');readTopK(_0x1475f1);},async 'execute'(_0x1ca6b9){const _0x350645=a32_0x19d02c,_0x5e2753=_0x1ca6b9[_0x350645(0x121)](_0x350645(0x124))[_0x350645(0x11f)](),_0x4673b1=readTopK(_0x1ca6b9),_0x4e8e65=await searchKnowledgeBase(_0x1ca6b9[_0x350645(0x142)],{'query':_0x5e2753,'topK':_0x4673b1});return{'ok':!![],'data':{'total':_0x4e8e65['length'],'hits':_0x4e8e65['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- function a33_0x8c52(){const _0x47b071=['timestamp','70802dNIHty','4SKHRUg','638295wXlulj','1470246DcRZNX','success','message','readLogs','View\x20command\x20history\x20logs','level','logs','log','7FTALlv','1615gSajtU','\x20\x20\x20Duration:\x20','\x20logs:\x0a','1553751rzEWcS','show','details','1254640oVSHwB','command','warn','2252fXPASN','duration','length','toLocaleString','\x20\x20\x20Time:\x20','349920kLzrSp'];a33_0x8c52=function(){return _0x47b071;};return a33_0x8c52();}function a33_0x3fa5(_0x23fc77,_0x34003e){_0x23fc77=_0x23fc77-0xb8;const _0x8c5243=a33_0x8c52();let _0x3fa570=_0x8c5243[_0x23fc77];return _0x3fa570;}const a33_0x56a89b=a33_0x3fa5;(function(_0xc066e1,_0x4433bf){const _0x48085e=a33_0x3fa5,_0x5f49df=_0xc066e1();while(!![]){try{const _0x3d0774=-parseInt(_0x48085e(0xba))/0x1*(parseInt(_0x48085e(0xbb))/0x2)+parseInt(_0x48085e(0xbc))/0x3+-parseInt(_0x48085e(0xcf))/0x4*(parseInt(_0x48085e(0xc6))/0x5)+parseInt(_0x48085e(0xbd))/0x6*(parseInt(_0x48085e(0xc5))/0x7)+parseInt(_0x48085e(0xb8))/0x8+-parseInt(_0x48085e(0xc9))/0x9+parseInt(_0x48085e(0xcc))/0xa;if(_0x3d0774===_0x4433bf)break;else _0x5f49df['push'](_0x5f49df['shift']());}catch(_0x2d929d){_0x5f49df['push'](_0x5f49df['shift']());}}}(a33_0x8c52,0x1ff66));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2e9f43){const _0xd66c05=a33_0x3fa5;if(_0x2e9f43[_0xd66c05(0xd1)]===0x0){console[_0xd66c05(0xc4)]('*\x20No\x20logs\x20found');return;}console[_0xd66c05(0xc4)]('*\x20'+CLI_DISPLAY_NAME+_0xd66c05(0xc8)),_0x2e9f43['forEach']((_0x2edbb9,_0x28d93c)=>{const _0x24242e=_0xd66c05,_0x421e8d=new Date(_0x2edbb9[_0x24242e(0xb9)])[_0x24242e(0xd2)]('en-US'),_0xa0fc59=_0x2edbb9['level']===_0x24242e(0xbe)?'√':_0x2edbb9[_0x24242e(0xc2)]==='error'?'×':_0x2edbb9[_0x24242e(0xc2)]===_0x24242e(0xce)?'!':'i';console[_0x24242e(0xc4)](_0x28d93c+0x1+'.\x20'+_0xa0fc59+'\x20['+_0x2edbb9[_0x24242e(0xcd)]+']\x20'+_0x2edbb9[_0x24242e(0xbf)]),console[_0x24242e(0xc4)](_0x24242e(0xd3)+_0x421e8d),_0x2edbb9[_0x24242e(0xd0)]&&console[_0x24242e(0xc4)](_0x24242e(0xc7)+_0x2edbb9[_0x24242e(0xd0)]+'ms'),_0x2edbb9[_0x24242e(0xcb)]&&Object['keys'](_0x2edbb9[_0x24242e(0xcb)])[_0x24242e(0xd1)]>0x0&&console[_0x24242e(0xc4)]('\x20\x20\x20Details:\x20'+JSON['stringify'](_0x2edbb9[_0x24242e(0xcb)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a33_0x56a89b(0xc3),'command':a33_0x56a89b(0xca),'description':a33_0x56a89b(0xc1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x489d7b){const _0x3db80=a33_0x56a89b;return printLogs(logger[_0x3db80(0xc0)]()),{'ok':!![]};}}];
1
+ const a33_0x15008b=a33_0x15b4;(function(_0x1aea70,_0x479245){const _0x5d3b50=a33_0x15b4,_0x11641a=_0x1aea70();while(!![]){try{const _0x4c655b=-parseInt(_0x5d3b50(0x1a1))/0x1*(parseInt(_0x5d3b50(0x192))/0x2)+-parseInt(_0x5d3b50(0x1a2))/0x3*(parseInt(_0x5d3b50(0x1b1))/0x4)+parseInt(_0x5d3b50(0x196))/0x5+-parseInt(_0x5d3b50(0x19a))/0x6*(parseInt(_0x5d3b50(0x194))/0x7)+-parseInt(_0x5d3b50(0x1a7))/0x8+parseInt(_0x5d3b50(0x1af))/0x9*(parseInt(_0x5d3b50(0x1a0))/0xa)+-parseInt(_0x5d3b50(0x19c))/0xb*(-parseInt(_0x5d3b50(0x1b2))/0xc);if(_0x4c655b===_0x479245)break;else _0x11641a['push'](_0x11641a['shift']());}catch(_0x11643d){_0x11641a['push'](_0x11641a['shift']());}}}(a33_0x33f8,0x357cc));function a33_0x15b4(_0x47ef77,_0x41a70f){_0x47ef77=_0x47ef77-0x192;const _0x33f8a0=a33_0x33f8();let _0x15b43c=_0x33f8a0[_0x47ef77];return _0x15b43c;}import{logger}from'../../utils/logger.js';function a33_0x33f8(){const _0x4a339c=['length','90zbUhxY','readLogs','12UbRime','4387452RpjJAm','read','View\x20command\x20history\x20logs','71498QrcGsN','\x20\x20\x20Time:\x20','35fHdCtP','success','734745Bjqhcq','toLocaleString','duration','error','409140iHOUXD','forEach','11QYbEXM','level','warn','\x20logs:\x0a','430840VdAcfM','1mWfMWY','325245OAiQqB','\x20\x20\x20Details:\x20','show','command','logs','179056oDRiua','message','*\x20No\x20logs\x20found','log','\x20\x20\x20Duration:\x20','details','stringify'];a33_0x33f8=function(){return _0x4a339c;};return a33_0x33f8();}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x4ccb3e){const _0x341968=a33_0x15b4;if(_0x4ccb3e[_0x341968(0x1ae)]===0x0){console[_0x341968(0x1aa)](_0x341968(0x1a9));return;}console[_0x341968(0x1aa)]('*\x20'+CLI_DISPLAY_NAME+_0x341968(0x19f)),_0x4ccb3e[_0x341968(0x19b)]((_0x46938b,_0x31d978)=>{const _0x18af71=_0x341968,_0xa154e=new Date(_0x46938b['timestamp'])[_0x18af71(0x197)]('en-US'),_0x32b4e7=_0x46938b['level']===_0x18af71(0x195)?'√':_0x46938b[_0x18af71(0x19d)]===_0x18af71(0x199)?'×':_0x46938b[_0x18af71(0x19d)]===_0x18af71(0x19e)?'!':'i';console[_0x18af71(0x1aa)](_0x31d978+0x1+'.\x20'+_0x32b4e7+'\x20['+_0x46938b[_0x18af71(0x1a5)]+']\x20'+_0x46938b[_0x18af71(0x1a8)]),console[_0x18af71(0x1aa)](_0x18af71(0x193)+_0xa154e),_0x46938b[_0x18af71(0x198)]&&console['log'](_0x18af71(0x1ab)+_0x46938b[_0x18af71(0x198)]+'ms'),_0x46938b['details']&&Object['keys'](_0x46938b[_0x18af71(0x1ac)])[_0x18af71(0x1ae)]>0x0&&console[_0x18af71(0x1aa)](_0x18af71(0x1a3)+JSON[_0x18af71(0x1ad)](_0x46938b['details'],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a33_0x15008b(0x1a6),'command':a33_0x15008b(0x1a4),'description':a33_0x15008b(0x1b4),'risk':a33_0x15008b(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3393c6){const _0x2fd1f6=a33_0x15008b;return printLogs(logger[_0x2fd1f6(0x1b0)]()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x490d7f=a34_0x18d3;(function(_0x49501e,_0x448bb3){const _0x5ee01a=a34_0x18d3,_0x660122=_0x49501e();while(!![]){try{const _0x1134d9=parseInt(_0x5ee01a(0x161))/0x1*(parseInt(_0x5ee01a(0x163))/0x2)+-parseInt(_0x5ee01a(0x168))/0x3*(-parseInt(_0x5ee01a(0x159))/0x4)+parseInt(_0x5ee01a(0x15d))/0x5+parseInt(_0x5ee01a(0x15f))/0x6*(-parseInt(_0x5ee01a(0x158))/0x7)+-parseInt(_0x5ee01a(0x15c))/0x8+-parseInt(_0x5ee01a(0x156))/0x9+-parseInt(_0x5ee01a(0x166))/0xa;if(_0x1134d9===_0x448bb3)break;else _0x660122['push'](_0x660122['shift']());}catch(_0x29e287){_0x660122['push'](_0x660122['shift']());}}}(a34_0x3f96,0xeef0d));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a34_0x18d3(_0x32b8de,_0x43b044){_0x32b8de=_0x32b8de-0x156;const _0x3f961d=a34_0x3f96();let _0x18d34f=_0x3f961d[_0x32b8de];return _0x18d34f;}function a34_0x3f96(){const _0x434d60=['6444603fdpBNP','map','104818vOnbHL','28lsibgT','\x20notification\x20config(s)','string','2037064ZiyHCi','1362450JjQeav','appCode','402xBjSoW','type','1878913ErhjIS','EMAIL','2aSptAf','length','Notification\x20channel\x20type','1128670INEmjT','Found\x20','391767QbDYzd','config-list'];a34_0x3f96=function(){return _0x434d60;};return a34_0x3f96();}export const notificationConfigList={'service':'notification','command':a34_0x490d7f(0x169),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[{'name':a34_0x490d7f(0x160),'type':a34_0x490d7f(0x15b),'description':a34_0x490d7f(0x165),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a34_0x490d7f(0x162)}],async 'validate'(_0x5b5580){readNotificationChannelType(_0x5b5580);},async 'execute'(_0xb20810){const _0x307352=a34_0x490d7f,_0x30b1f3=readNotificationChannelType(_0xb20810),_0x24cd50=await listNotificationChannelConfigs(_0xb20810[_0x307352(0x15e)],_0x30b1f3),_0x163ae3=_0x24cd50[_0x307352(0x157)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xb20810[_0x307352(0x15e)],'channelType':_0x30b1f3,'count':_0x163ae3['length'],'configs':_0x163ae3},'message':_0x307352(0x167)+_0x163ae3[_0x307352(0x164)]+'\x20'+_0x30b1f3+_0x307352(0x15a)};}};
1
+ function a34_0x37f0(_0x26bc89,_0x11ef9f){_0x26bc89=_0x26bc89-0x10f;const _0x5171fb=a34_0x5171();let _0x37f000=_0x5171fb[_0x26bc89];return _0x37f000;}function a34_0x5171(){const _0x26807f=['621607GspXGE','notification','map','type','16diZsoZ','2462900dyyyZL','length','1585173ifothQ','5087445YgITSp','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','\x20notification\x20config(s)','7435192TjaGaB','9qoyExU','config-list','string','Notification\x20channel\x20type','50eTGvFm','66ilcgdQ','361484cHMuvf','144426agbWAd'];a34_0x5171=function(){return _0x26807f;};return a34_0x5171();}const a34_0x2072f=a34_0x37f0;(function(_0x1804ab,_0x4134ec){const _0x12d5cc=a34_0x37f0,_0x34aa3d=_0x1804ab();while(!![]){try{const _0x422597=-parseInt(_0x12d5cc(0x111))/0x1*(-parseInt(_0x12d5cc(0x120))/0x2)+parseInt(_0x12d5cc(0x114))/0x3+-parseInt(_0x12d5cc(0x11f))/0x4*(parseInt(_0x12d5cc(0x11d))/0x5)+parseInt(_0x12d5cc(0x11e))/0x6*(parseInt(_0x12d5cc(0x121))/0x7)+-parseInt(_0x12d5cc(0x118))/0x8*(parseInt(_0x12d5cc(0x119))/0x9)+parseInt(_0x12d5cc(0x112))/0xa+-parseInt(_0x12d5cc(0x115))/0xb;if(_0x422597===_0x4134ec)break;else _0x34aa3d['push'](_0x34aa3d['shift']());}catch(_0x2d334a){_0x34aa3d['push'](_0x34aa3d['shift']());}}}(a34_0x5171,0x953e0));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a34_0x2072f(0x122),'command':a34_0x2072f(0x11a),'description':a34_0x2072f(0x116),'risk':'read','flags':[{'name':a34_0x2072f(0x110),'type':a34_0x2072f(0x11b),'description':a34_0x2072f(0x11c),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x316071){readNotificationChannelType(_0x316071);},async 'execute'(_0x1237dc){const _0x270d52=a34_0x2072f,_0x27c733=readNotificationChannelType(_0x1237dc),_0x1de283=await listNotificationChannelConfigs(_0x1237dc['appCode'],_0x27c733),_0x152342=_0x1de283[_0x270d52(0x10f)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1237dc['appCode'],'channelType':_0x27c733,'count':_0x152342[_0x270d52(0x113)],'configs':_0x152342},'message':'Found\x20'+_0x152342[_0x270d52(0x113)]+'\x20'+_0x27c733+_0x270d52(0x117)};}};
@@ -1 +1 @@
1
- function a35_0x50ed(){const _0x171220=['4305966ydVKYK','720599jLwTYK','20720tinreu','50jKTOJk','12303WGBPmh','45uwwxlW','4247464DdVCKL','4996152aMlTrd','623472VqrzuB'];a35_0x50ed=function(){return _0x171220;};return a35_0x50ed();}(function(_0xe428a8,_0x492b8f){const _0x536c5b=a35_0x1b1d,_0x3bda01=_0xe428a8();while(!![]){try{const _0x38684b=-parseInt(_0x536c5b(0x17d))/0x1+parseInt(_0x536c5b(0x17f))/0x2*(parseInt(_0x536c5b(0x180))/0x3)+-parseInt(_0x536c5b(0x17b))/0x4+parseInt(_0x536c5b(0x17e))/0x5+-parseInt(_0x536c5b(0x17c))/0x6+-parseInt(_0x536c5b(0x17a))/0x7+parseInt(_0x536c5b(0x179))/0x8*(parseInt(_0x536c5b(0x178))/0x9);if(_0x38684b===_0x492b8f)break;else _0x3bda01['push'](_0x3bda01['shift']());}catch(_0x3c8d12){_0x3bda01['push'](_0x3bda01['shift']());}}}(a35_0x50ed,0x6eb5e));function a35_0x1b1d(_0x283d2e,_0x5b9ef3){_0x283d2e=_0x283d2e-0x178;const _0x50ed53=a35_0x50ed();let _0x1b1df6=_0x50ed53[_0x283d2e];return _0x1b1df6;}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0x44fd3b,_0x5d6626){const _0x290f64=a35_0x58ac,_0x3a40c1=_0x44fd3b();while(!![]){try{const _0x394db2=-parseInt(_0x290f64(0x142))/0x1*(-parseInt(_0x290f64(0x141))/0x2)+-parseInt(_0x290f64(0x147))/0x3*(-parseInt(_0x290f64(0x140))/0x4)+parseInt(_0x290f64(0x13e))/0x5*(-parseInt(_0x290f64(0x144))/0x6)+-parseInt(_0x290f64(0x146))/0x7+-parseInt(_0x290f64(0x145))/0x8*(parseInt(_0x290f64(0x143))/0x9)+-parseInt(_0x290f64(0x13f))/0xa+parseInt(_0x290f64(0x148))/0xb;if(_0x394db2===_0x5d6626)break;else _0x3a40c1['push'](_0x3a40c1['shift']());}catch(_0x5204cd){_0x3a40c1['push'](_0x3a40c1['shift']());}}}(a35_0x38cc,0x865f8));function a35_0x38cc(){const _0x598a8b=['8743394rprxzG','4440jWcOyn','6271850nJRFHf','4bHsvji','1566366TEPgku','1lzsXIA','249129kYjfSd','5796SlbMZf','104PAtKZa','1752562GqPLWC','3202701QJNSVy'];a35_0x38cc=function(){return _0x598a8b;};return a35_0x38cc();}import{notificationConfigList}from'../../commands/notification/config-list.js';function a35_0x58ac(_0x2a6102,_0x2101da){_0x2a6102=_0x2a6102-0x13e;const _0x38ccb1=a35_0x38cc();let _0x58acf8=_0x38ccb1[_0x2a6102];return _0x58acf8;}export const notificationDefinitions=[notificationConfigList];
@@ -1 +1 @@
1
- const a36_0x34bef4=a36_0x52ff;(function(_0x52126a,_0x4a83a8){const _0x1a3d15=a36_0x52ff,_0x3fd6a5=_0x52126a();while(!![]){try{const _0x34e242=-parseInt(_0x1a3d15(0x19b))/0x1*(parseInt(_0x1a3d15(0x1b2))/0x2)+-parseInt(_0x1a3d15(0x195))/0x3*(-parseInt(_0x1a3d15(0x199))/0x4)+parseInt(_0x1a3d15(0x194))/0x5*(-parseInt(_0x1a3d15(0x1a1))/0x6)+-parseInt(_0x1a3d15(0x1a5))/0x7+-parseInt(_0x1a3d15(0x19e))/0x8*(parseInt(_0x1a3d15(0x1a2))/0x9)+parseInt(_0x1a3d15(0x196))/0xa+-parseInt(_0x1a3d15(0x191))/0xb*(-parseInt(_0x1a3d15(0x1a7))/0xc);if(_0x34e242===_0x4a83a8)break;else _0x3fd6a5['push'](_0x3fd6a5['shift']());}catch(_0x1afccd){_0x3fd6a5['push'](_0x3fd6a5['shift']());}}}(a36_0x3e3f,0x532fd));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a36_0x34bef4(0x1a4),'FEISHU',a36_0x34bef4(0x193),a36_0x34bef4(0x1a6),a36_0x34bef4(0x1a0)];export function readNotificationChannelType(_0x2cc3ac){const _0x2142d9=a36_0x34bef4,_0x2ff9f8=_0x2cc3ac['str'](_0x2142d9(0x190))[_0x2142d9(0x1a3)]()||_0x2142d9(0x1a4);if(!NOTIFICATION_CHANNEL_TYPES[_0x2142d9(0x19a)](_0x2ff9f8))throw CliErrors[_0x2142d9(0x1b4)](_0x2142d9(0x1ae)+_0x2ff9f8,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x2142d9(0x1af)](',\x20')+'.');return _0x2ff9f8;}export function projectNotificationListConfig(_0x254284,_0x35b2e7){const _0x3a026a=a36_0x34bef4,_0x1f8f10=requireResponseObject(_0x254284,_0x35b2e7);return{'id':normalizeNullableId(_0x1f8f10['id'],_0x35b2e7),'configCode':requireResponseString(_0x1f8f10['configCode'],_0x3a026a(0x1a8),_0x35b2e7),'configName':requireResponseString(_0x1f8f10[_0x3a026a(0x197)],_0x3a026a(0x197),_0x35b2e7),'channelType':requireResponseString(_0x1f8f10[_0x3a026a(0x1aa)],_0x3a026a(0x1aa),_0x35b2e7),'description':normalizeNullableString(_0x1f8f10[_0x3a026a(0x192)]),'createTime':normalizeNullableString(_0x1f8f10['createTime']),'updateTime':normalizeNullableString(_0x1f8f10[_0x3a026a(0x1b1)])};}function requireResponseObject(_0xff29f6,_0x15fd64){const _0x24570a=a36_0x34bef4;if(typeof _0xff29f6!==_0x24570a(0x1b3)||_0xff29f6===null||Array[_0x24570a(0x19f)](_0xff29f6))throw CliErrors[_0x24570a(0x19c)](_0x24570a(0x18f),_0x24570a(0x198)+(_0x15fd64+0x1)+_0x24570a(0x1ad));return _0xff29f6;}function a36_0x52ff(_0x18befc,_0xce7f93){_0x18befc=_0x18befc-0x18f;const _0x3e3f2c=a36_0x3e3f();let _0x52ff87=_0x3e3f2c[_0x18befc];return _0x52ff87;}function requireResponseString(_0x45e365,_0x4ee74b,_0x13d697){const _0x7cd8f1=a36_0x34bef4;if(typeof _0x45e365!==_0x7cd8f1(0x19d)||!_0x45e365[_0x7cd8f1(0x1a3)]())throw CliErrors[_0x7cd8f1(0x19c)]('Invalid\x20notification\x20config\x20response.',_0x7cd8f1(0x198)+(_0x13d697+0x1)+_0x7cd8f1(0x1ac)+_0x4ee74b+'\x22.');return _0x45e365[_0x7cd8f1(0x1a3)]();}function a36_0x3e3f(){const _0x354ade=['1336rYPMsC','isArray','WEBHOOK','3165924YOzZFr','27063aBLziX','trim','EMAIL','4495785FYyQMQ','WECOM','156gTUKvt','configCode','test','channelType','\x20has\x20invalid\x20field\x20\x22id\x22.','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','Invalid\x20--type:\x20','join','isSafeInteger','updateTime','10618Daucen','object','validation','Invalid\x20notification\x20config\x20response.','type','1702965PCwgiK','description','DINGTALK','5nhGasP','6hSvhMH','668360vsuBNq','configName','Item\x20','142828JrugMO','includes','26JkBVSS','apiError','string'];a36_0x3e3f=function(){return _0x354ade;};return a36_0x3e3f();}function normalizeNullableString(_0x1137c2){const _0x73d7e9=a36_0x34bef4;return typeof _0x1137c2===_0x73d7e9(0x19d)&&_0x1137c2['trim']()?_0x1137c2[_0x73d7e9(0x1a3)]():null;}function normalizeNullableId(_0x5b971a,_0x552638){const _0xacabf4=a36_0x34bef4;if(_0x5b971a===undefined||_0x5b971a===null)return null;if(typeof _0x5b971a==='number'&&Number[_0xacabf4(0x1b0)](_0x5b971a))return _0x5b971a;if(typeof _0x5b971a===_0xacabf4(0x19d)&&/^-?\d+$/[_0xacabf4(0x1a9)](_0x5b971a[_0xacabf4(0x1a3)]()))return _0x5b971a['trim']();throw CliErrors[_0xacabf4(0x19c)](_0xacabf4(0x18f),_0xacabf4(0x198)+(_0x552638+0x1)+_0xacabf4(0x1ab));}
1
+ const a36_0x11a04b=a36_0x12df;(function(_0x1948ca,_0x1d6221){const _0x165719=a36_0x12df,_0x58c811=_0x1948ca();while(!![]){try{const _0x262d6b=parseInt(_0x165719(0x13f))/0x1+-parseInt(_0x165719(0x147))/0x2+parseInt(_0x165719(0x14f))/0x3*(parseInt(_0x165719(0x15a))/0x4)+-parseInt(_0x165719(0x160))/0x5*(-parseInt(_0x165719(0x140))/0x6)+-parseInt(_0x165719(0x15b))/0x7*(-parseInt(_0x165719(0x152))/0x8)+-parseInt(_0x165719(0x15f))/0x9*(parseInt(_0x165719(0x158))/0xa)+-parseInt(_0x165719(0x13e))/0xb;if(_0x262d6b===_0x1d6221)break;else _0x58c811['push'](_0x58c811['shift']());}catch(_0x127c08){_0x58c811['push'](_0x58c811['shift']());}}}(a36_0x19c8,0x29cfb));import{CliErrors}from'../../errors.js';function a36_0x12df(_0x58d2a8,_0x45b516){_0x58d2a8=_0x58d2a8-0x13c;const _0x19c8a8=a36_0x19c8();let _0x12df71=_0x19c8a8[_0x58d2a8];return _0x12df71;}export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a36_0x11a04b(0x13d),a36_0x11a04b(0x151),a36_0x11a04b(0x153),a36_0x11a04b(0x14d)];export function readNotificationChannelType(_0x46c789){const _0x54d95a=a36_0x11a04b,_0x57d508=_0x46c789[_0x54d95a(0x148)](_0x54d95a(0x162))[_0x54d95a(0x141)]()||_0x54d95a(0x149);if(!NOTIFICATION_CHANNEL_TYPES[_0x54d95a(0x161)](_0x57d508))throw CliErrors[_0x54d95a(0x13c)](_0x54d95a(0x15d)+_0x57d508,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x54d95a(0x155)](',\x20')+'.');return _0x57d508;}export function projectNotificationListConfig(_0x1fb61c,_0x182cec){const _0x313e8b=a36_0x11a04b,_0x451574=requireResponseObject(_0x1fb61c,_0x182cec);return{'id':normalizeNullableId(_0x451574['id'],_0x182cec),'configCode':requireResponseString(_0x451574[_0x313e8b(0x143)],'configCode',_0x182cec),'configName':requireResponseString(_0x451574[_0x313e8b(0x15e)],_0x313e8b(0x15e),_0x182cec),'channelType':requireResponseString(_0x451574[_0x313e8b(0x144)],_0x313e8b(0x144),_0x182cec),'description':normalizeNullableString(_0x451574[_0x313e8b(0x14a)]),'createTime':normalizeNullableString(_0x451574[_0x313e8b(0x142)]),'updateTime':normalizeNullableString(_0x451574[_0x313e8b(0x145)])};}function requireResponseObject(_0x13c247,_0x31a34d){const _0x370d33=a36_0x11a04b;if(typeof _0x13c247!==_0x370d33(0x14c)||_0x13c247===null||Array['isArray'](_0x13c247))throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x370d33(0x15c)+(_0x31a34d+0x1)+_0x370d33(0x14e));return _0x13c247;}function requireResponseString(_0x4f2ba8,_0x2f4c41,_0x23f6b2){const _0xa36e7c=a36_0x11a04b;if(typeof _0x4f2ba8!==_0xa36e7c(0x146)||!_0x4f2ba8[_0xa36e7c(0x141)]())throw CliErrors[_0xa36e7c(0x157)]('Invalid\x20notification\x20config\x20response.',_0xa36e7c(0x15c)+(_0x23f6b2+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2f4c41+'\x22.');return _0x4f2ba8[_0xa36e7c(0x141)]();}function normalizeNullableString(_0x5741e0){const _0x23fc4c=a36_0x11a04b;return typeof _0x5741e0===_0x23fc4c(0x146)&&_0x5741e0[_0x23fc4c(0x141)]()?_0x5741e0[_0x23fc4c(0x141)]():null;}function a36_0x19c8(){const _0x1805b8=['configName','775179RRNsBS','830kaKYHS','includes','type','validation','FEISHU','4945006SKXgjO','215829HQVUPY','6852ovMLtI','trim','createTime','configCode','channelType','updateTime','string','47224kIVZQl','str','EMAIL','description','test','object','WEBHOOK','\x20must\x20be\x20an\x20object.','3ClkOkY','Invalid\x20notification\x20config\x20response.','DINGTALK','8yGQzfa','WECOM','\x20has\x20invalid\x20field\x20\x22id\x22.','join','isSafeInteger','apiError','20AwWGZs','number','309788NhCnmm','2336817UHseCZ','Item\x20','Invalid\x20--type:\x20'];a36_0x19c8=function(){return _0x1805b8;};return a36_0x19c8();}function normalizeNullableId(_0x2d8a5d,_0x4478fb){const _0x586e86=a36_0x11a04b;if(_0x2d8a5d===undefined||_0x2d8a5d===null)return null;if(typeof _0x2d8a5d===_0x586e86(0x159)&&Number[_0x586e86(0x156)](_0x2d8a5d))return _0x2d8a5d;if(typeof _0x2d8a5d===_0x586e86(0x146)&&/^-?\d+$/[_0x586e86(0x14b)](_0x2d8a5d['trim']()))return _0x2d8a5d['trim']();throw CliErrors[_0x586e86(0x157)](_0x586e86(0x150),'Item\x20'+(_0x4478fb+0x1)+_0x586e86(0x154));}
@@ -1 +1 @@
1
- function a37_0x18b4(_0x2ed946,_0xa12f77){_0x2ed946=_0x2ed946-0x113;const _0x35fb03=a37_0x35fb();let _0x18b4c2=_0x35fb03[_0x2ed946];return _0x18b4c2;}const a37_0x449bae=a37_0x18b4;(function(_0x4d246b,_0x19b21c){const _0x3aa9aa=a37_0x18b4,_0x584563=_0x4d246b();while(!![]){try{const _0x158ced=-parseInt(_0x3aa9aa(0x12c))/0x1+parseInt(_0x3aa9aa(0x132))/0x2*(-parseInt(_0x3aa9aa(0x115))/0x3)+parseInt(_0x3aa9aa(0x11a))/0x4*(parseInt(_0x3aa9aa(0x12d))/0x5)+-parseInt(_0x3aa9aa(0x121))/0x6+parseInt(_0x3aa9aa(0x14d))/0x7*(-parseInt(_0x3aa9aa(0x146))/0x8)+parseInt(_0x3aa9aa(0x131))/0x9*(-parseInt(_0x3aa9aa(0x116))/0xa)+parseInt(_0x3aa9aa(0x141))/0xb;if(_0x158ced===_0x19b21c)break;else _0x584563['push'](_0x584563['shift']());}catch(_0xc9adc){_0x584563['push'](_0x584563['shift']());}}}(a37_0x35fb,0x99790));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a37_0x449bae(0x142),a37_0x449bae(0x139),a37_0x449bae(0x118),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':'General','form':a37_0x449bae(0x134),'idCard':a37_0x449bae(0x145)},SCENE_FLAG={'name':a37_0x449bae(0x120),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a37_0x449bae(0x140)},IMAGE_FILE_FLAG={'name':'image-file','type':a37_0x449bae(0x143),'description':a37_0x449bae(0x11b)},IMAGE_URL_FLAG={'name':a37_0x449bae(0x13c),'type':a37_0x449bae(0x143),'description':a37_0x449bae(0x14c)};function normalizeScene(_0x8668c7){const _0x216957=a37_0x449bae,_0x47ec9c=_0x8668c7['trim']()[_0x216957(0x13a)]();if(_0x47ec9c===_0x216957(0x136))return _0x216957(0x123);if(_0x47ec9c===_0x216957(0x142)||_0x47ec9c==='general'||_0x47ec9c===_0x216957(0x118))return _0x47ec9c;throw CliErrors[_0x216957(0x12f)](_0x216957(0x13e)+_0x8668c7+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x5f2c9b){const _0x37121e=a37_0x449bae,_0x2b6fc4=_0x5f2c9b[_0x37121e(0x130)](_0x37121e(0x128))['trim'](),_0x497f16=_0x5f2c9b['str']('image-url')[_0x37121e(0x11e)]();return{'imageFile':_0x2b6fc4,'imageUrl':_0x497f16,'count':[_0x2b6fc4,_0x497f16][_0x37121e(0x12b)](Boolean)[_0x37121e(0x126)]};}function validateInputSelection(_0x1aa6eb){const _0x50aca5=a37_0x449bae,_0x38dc33=selectedInputs(_0x1aa6eb);if(_0x38dc33[_0x50aca5(0x144)]!==0x1)throw CliErrors['validation'](_0x50aca5(0x117));return _0x38dc33;}function a37_0x35fb(){const _0x157346=['ocr','trim','/client/ocr','scene','5206884moKhAY','File\x20upload\x20response\x20missing\x20filePath.','idCard','fileUrl','apiError','length','/client/uploadFile','image-file','Preview:\x20recognize\x20','description','filter','252058ftFAgE','75DsNaCc','filePath','validation','str','4455xPuAyq','4uHrMDR','\x20OCR\x20from\x20URL','Table','\x20OCR','idcard','path','recognize','general','toLowerCase','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','image-url','imageUrl','Unsupported\x20OCR\x20scene:\x20','read','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','15228334BkBPKc','invoice','string','count','IdCard','7192FKrsqC','/client/queryFileUrl','File\x20URL\x20response\x20missing\x20fileUrl.','appCode','imageFile','POST','Publicly\x20accessible\x20image\x20or\x20file\x20URL','434zLbCAm','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','build','313125FtSovC','12650HMuysr','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','form','fileName','334604vyDaaq','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','body'];a37_0x35fb=function(){return _0x157346;};return a37_0x35fb();}function withScene(_0x5ebafd,_0x2dd8ec,_0x278afa){const _0x1db68c=a37_0x449bae;return{..._0x5ebafd,'scene':_0x2dd8ec,..._0x278afa?{'sourceFile':{'fileName':_0x278afa[_0x1db68c(0x119)],'filePath':_0x278afa[_0x1db68c(0x12e)]}}:{}};}const ocrRecognize={'service':a37_0x449bae(0x11d),'command':a37_0x449bae(0x138),'description':a37_0x449bae(0x13b),'risk':a37_0x449bae(0x13f),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f0562){const _0x8d3eb7=a37_0x449bae,_0x266a05=normalizeScene(_0x3f0562[_0x8d3eb7(0x130)]('scene')),_0x45995e=SCENE_TO_LEGACY_TYPE[_0x266a05],_0x54370d=validateInputSelection(_0x3f0562);if(_0x54370d[_0x8d3eb7(0x13d)])return dryRun(_0x8d3eb7(0x14b),_0x8d3eb7(0x11f))[_0x8d3eb7(0x11c)]({'appCode':_0x3f0562[_0x8d3eb7(0x149)],'url':_0x54370d[_0x8d3eb7(0x13d)],'type':_0x45995e})['description'](_0x8d3eb7(0x129)+_0x266a05+_0x8d3eb7(0x133))[_0x8d3eb7(0x114)]();const _0x59c233=requireRuntimeUploadFile(_0x54370d[_0x8d3eb7(0x14a)],_0x8d3eb7(0x128));return dryRun(_0x8d3eb7(0x14b),_0x8d3eb7(0x127))['body']({'steps':[{'method':'POST','url':_0x8d3eb7(0x127),'body':{'appCode':_0x3f0562[_0x8d3eb7(0x149)],'multipart':{'file':_0x59c233}}},{'method':_0x8d3eb7(0x14b),'url':_0x8d3eb7(0x147),'body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x8d3eb7(0x14b),'url':_0x8d3eb7(0x11f),'body':{'appCode':_0x3f0562[_0x8d3eb7(0x149)],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0x45995e}}]})[_0x8d3eb7(0x12a)](_0x8d3eb7(0x113)+_0x266a05+_0x8d3eb7(0x135))[_0x8d3eb7(0x114)]();},async 'execute'(_0x3c03ec){const _0x4dc191=a37_0x449bae,_0x3bfee5=normalizeScene(_0x3c03ec['str'](_0x4dc191(0x120))),_0x30b4b9=SCENE_TO_LEGACY_TYPE[_0x3bfee5],_0x1abfd8=validateInputSelection(_0x3c03ec);if(_0x1abfd8[_0x4dc191(0x13d)]){const _0x2e40cc=await recognizeRuntimeOcr(_0x3c03ec['appCode'],{'url':_0x1abfd8[_0x4dc191(0x13d)],'type':_0x30b4b9});return{'ok':!![],'data':withScene(_0x2e40cc,_0x3bfee5)};}const _0x4f3fc2=requireRuntimeUploadFile(_0x1abfd8[_0x4dc191(0x14a)],_0x4dc191(0x128)),_0x4a800d=await uploadRuntimeFile(_0x3c03ec['appCode'],_0x4f3fc2[_0x4dc191(0x137)]);if(!_0x4a800d[_0x4dc191(0x12e)])throw CliErrors[_0x4dc191(0x125)](_0x4dc191(0x122));const _0x2ea90a=await queryRuntimeFileUrl(_0x4a800d[_0x4dc191(0x12e)],{'download':![]});if(!_0x2ea90a['fileUrl'])throw CliErrors[_0x4dc191(0x125)](_0x4dc191(0x148));const _0x276e69=await recognizeRuntimeOcr(_0x3c03ec['appCode'],{'url':_0x2ea90a[_0x4dc191(0x124)],'type':_0x30b4b9});return{'ok':!![],'data':withScene(_0x276e69,_0x3bfee5,_0x4a800d)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a37_0x4a7f1c=a37_0x4a77;(function(_0x5e872a,_0x1a1b98){const _0x4953b9=a37_0x4a77,_0xa42450=_0x5e872a();while(!![]){try{const _0x27df34=-parseInt(_0x4953b9(0x170))/0x1+parseInt(_0x4953b9(0x164))/0x2+parseInt(_0x4953b9(0x188))/0x3*(parseInt(_0x4953b9(0x172))/0x4)+-parseInt(_0x4953b9(0x16e))/0x5+parseInt(_0x4953b9(0x17c))/0x6+-parseInt(_0x4953b9(0x182))/0x7+parseInt(_0x4953b9(0x176))/0x8;if(_0x27df34===_0x1a1b98)break;else _0xa42450['push'](_0xa42450['shift']());}catch(_0x59ec94){_0xa42450['push'](_0xa42450['shift']());}}}(a37_0x2b86,0x6b218));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x2b86(){const _0x2581af=['3017334LkUJQc','recognize','length','idcard','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','path','2730287wZPWDm','imageUrl','General','string','read','Invoice','321aRvCHS','Publicly\x20accessible\x20image\x20or\x20file\x20URL','\x20OCR\x20from\x20URL','image-file','IdCard','form','validation','scene','filePath','idCard','fileName','/client/uploadFile','File\x20URL\x20response\x20missing\x20fileUrl.','str','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','POST','build','245226xhnFIJ','trim','imageFile','fileUrl','/client/ocr','description','appCode','<filePath\x20returned\x20by\x20/client/uploadFile>','\x20OCR','join','1346410hImIaW','apiError','330356hBxHMR','general','20056NIWzlk','filter','Preview:\x20recognize\x20','image-url','2131896kEtDyk','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','invoice','toLowerCase','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解'];a37_0x2b86=function(){return _0x2581af;};return a37_0x2b86();}const SUPPORTED_SCENES=[a37_0x4a7f1c(0x179),a37_0x4a7f1c(0x171),'form',a37_0x4a7f1c(0x15c)],SCENE_TO_LEGACY_TYPE={'invoice':a37_0x4a7f1c(0x187),'general':a37_0x4a7f1c(0x184),'form':'Table','idCard':a37_0x4a7f1c(0x157)},SCENE_FLAG={'name':a37_0x4a7f1c(0x15a),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a37_0x4a7f1c(0x178)},IMAGE_FILE_FLAG={'name':a37_0x4a7f1c(0x156),'type':a37_0x4a7f1c(0x185),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a37_0x4a7f1c(0x175),'type':'string','description':a37_0x4a7f1c(0x189)};function a37_0x4a77(_0x3a8569,_0x435ee2){_0x3a8569=_0x3a8569-0x156;const _0x2b8644=a37_0x2b86();let _0x4a77b8=_0x2b8644[_0x3a8569];return _0x4a77b8;}function normalizeScene(_0x182999){const _0x551276=a37_0x4a7f1c,_0xf17ebd=_0x182999['trim']()[_0x551276(0x17a)]();if(_0xf17ebd===_0x551276(0x17f))return'idCard';if(_0xf17ebd===_0x551276(0x179)||_0xf17ebd===_0x551276(0x171)||_0xf17ebd===_0x551276(0x158))return _0xf17ebd;throw CliErrors[_0x551276(0x159)]('Unsupported\x20OCR\x20scene:\x20'+_0x182999+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x551276(0x16d)](',\x20'));}function selectedInputs(_0x2e86cc){const _0x3d8d85=a37_0x4a7f1c,_0x165b5b=_0x2e86cc['str'](_0x3d8d85(0x156))[_0x3d8d85(0x165)](),_0x5b8023=_0x2e86cc[_0x3d8d85(0x160)](_0x3d8d85(0x175))[_0x3d8d85(0x165)]();return{'imageFile':_0x165b5b,'imageUrl':_0x5b8023,'count':[_0x165b5b,_0x5b8023][_0x3d8d85(0x173)](Boolean)[_0x3d8d85(0x17e)]};}function validateInputSelection(_0x5ef69b){const _0x16e679=a37_0x4a7f1c,_0x29bc32=selectedInputs(_0x5ef69b);if(_0x29bc32['count']!==0x1)throw CliErrors['validation'](_0x16e679(0x180));return _0x29bc32;}function withScene(_0x157600,_0x332914,_0x12ce1e){const _0x2b4577=a37_0x4a7f1c;return{..._0x157600,'scene':_0x332914,..._0x12ce1e?{'sourceFile':{'fileName':_0x12ce1e[_0x2b4577(0x15d)],'filePath':_0x12ce1e[_0x2b4577(0x15b)]}}:{}};}const ocrRecognize={'service':'ocr','command':a37_0x4a7f1c(0x17d),'description':a37_0x4a7f1c(0x17b),'risk':a37_0x4a7f1c(0x186),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x438af6){const _0x2bc0d5=a37_0x4a7f1c,_0x1cfff3=normalizeScene(_0x438af6['str'](_0x2bc0d5(0x15a))),_0x3e097e=SCENE_TO_LEGACY_TYPE[_0x1cfff3],_0x100731=validateInputSelection(_0x438af6);if(_0x100731[_0x2bc0d5(0x183)])return dryRun(_0x2bc0d5(0x162),_0x2bc0d5(0x168))['body']({'appCode':_0x438af6['appCode'],'url':_0x100731['imageUrl'],'type':_0x3e097e})[_0x2bc0d5(0x169)](_0x2bc0d5(0x174)+_0x1cfff3+_0x2bc0d5(0x18a))[_0x2bc0d5(0x163)]();const _0x3a4c72=requireRuntimeUploadFile(_0x100731[_0x2bc0d5(0x166)],_0x2bc0d5(0x156));return dryRun(_0x2bc0d5(0x162),'/client/uploadFile')['body']({'steps':[{'method':_0x2bc0d5(0x162),'url':_0x2bc0d5(0x15e),'body':{'appCode':_0x438af6[_0x2bc0d5(0x16a)],'multipart':{'file':_0x3a4c72}}},{'method':_0x2bc0d5(0x162),'url':'/client/queryFileUrl','body':{'filePath':_0x2bc0d5(0x16b),'downloadFlag':![]}},{'method':_0x2bc0d5(0x162),'url':_0x2bc0d5(0x168),'body':{'appCode':_0x438af6[_0x2bc0d5(0x16a)],'url':_0x2bc0d5(0x161),'type':_0x3e097e}}]})[_0x2bc0d5(0x169)](_0x2bc0d5(0x177)+_0x1cfff3+_0x2bc0d5(0x16c))[_0x2bc0d5(0x163)]();},async 'execute'(_0x2f6b01){const _0x418927=a37_0x4a7f1c,_0x11983d=normalizeScene(_0x2f6b01[_0x418927(0x160)]('scene')),_0x8debca=SCENE_TO_LEGACY_TYPE[_0x11983d],_0x89027a=validateInputSelection(_0x2f6b01);if(_0x89027a['imageUrl']){const _0x58bb2e=await recognizeRuntimeOcr(_0x2f6b01[_0x418927(0x16a)],{'url':_0x89027a[_0x418927(0x183)],'type':_0x8debca});return{'ok':!![],'data':withScene(_0x58bb2e,_0x11983d)};}const _0x578e1d=requireRuntimeUploadFile(_0x89027a['imageFile'],_0x418927(0x156)),_0x52417f=await uploadRuntimeFile(_0x2f6b01[_0x418927(0x16a)],_0x578e1d[_0x418927(0x181)]);if(!_0x52417f[_0x418927(0x15b)])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x7343d1=await queryRuntimeFileUrl(_0x52417f[_0x418927(0x15b)],{'download':![]});if(!_0x7343d1['fileUrl'])throw CliErrors[_0x418927(0x16f)](_0x418927(0x15f));const _0xb281ef=await recognizeRuntimeOcr(_0x2f6b01[_0x418927(0x16a)],{'url':_0x7343d1[_0x418927(0x167)],'type':_0x8debca});return{'ok':!![],'data':withScene(_0xb281ef,_0x11983d,_0x52417f)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- function a38_0x3690(_0x2b081c,_0x2ad0ea){_0x2b081c=_0x2b081c-0x75;const _0x3abd5b=a38_0x3abd();let _0x3690ce=_0x3abd5b[_0x2b081c];return _0x3690ce;}const a38_0x1ad75f=a38_0x3690;(function(_0x2cb892,_0x555fd3){const _0x1c38dc=a38_0x3690,_0x422c2a=_0x2cb892();while(!![]){try{const _0x51db4c=parseInt(_0x1c38dc(0x7c))/0x1+parseInt(_0x1c38dc(0x75))/0x2+parseInt(_0x1c38dc(0x88))/0x3+-parseInt(_0x1c38dc(0x7e))/0x4+parseInt(_0x1c38dc(0x7f))/0x5+parseInt(_0x1c38dc(0x79))/0x6+-parseInt(_0x1c38dc(0x84))/0x7*(parseInt(_0x1c38dc(0x83))/0x8);if(_0x51db4c===_0x555fd3)break;else _0x422c2a['push'](_0x422c2a['shift']());}catch(_0x45ceeb){_0x422c2a['push'](_0x422c2a['shift']());}}}(a38_0x3abd,0xe0a83));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a38_0x3abd(){const _0x230e7e=['roleName','dataset-get','trim','4276953ODSbSA','1413028aTJKRk','str','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','roleType','5787252lgbZaX','role','runtime','1676806nsvgfr','string','4212852LbrUoz','5044400GCmkWT','appCode','permit','read','632auJADx','337505jUlccB'];a38_0x3abd=function(){return _0x230e7e;};return a38_0x3abd();}export const permitDatasetGet={'service':a38_0x1ad75f(0x81),'command':a38_0x1ad75f(0x86),'description':a38_0x1ad75f(0x77),'risk':a38_0x1ad75f(0x82),'flags':[{'name':a38_0x1ad75f(0x7a),'type':a38_0x1ad75f(0x7d),'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'}],async 'execute'(_0x5b26ed){const _0x5cf9f8=a38_0x1ad75f,_0x2d61dc=_0x5b26ed[_0x5cf9f8(0x76)](_0x5cf9f8(0x7a))[_0x5cf9f8(0x87)]();if(!_0x2d61dc)return{'ok':!![],'data':{'scope':_0x5cf9f8(0x7b),'datasets':await listRuntimeDatasetRolePermits(_0x5b26ed[_0x5cf9f8(0x80)])}};const _0x214db2=await resolveRuntimeRoleRef(_0x5b26ed[_0x5cf9f8(0x80)],_0x2d61dc);return{'ok':!![],'data':{'scope':_0x5cf9f8(0x7b),'role':{'id':_0x214db2['id'],'roleName':_0x214db2[_0x5cf9f8(0x85)],'roleType':_0x214db2[_0x5cf9f8(0x78)]},'datasets':await listRuntimeDatasetPermits(_0x5b26ed['appCode'],_0x214db2['id'])}};}};
1
+ function a38_0x34b5(){const _0x280ca3=['read','role','56305xMbyrm','str','2717QjWuBm','appCode','484672TNjdIQ','134892ORFCcP','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','permit','20kkDXvM','3lOfBib','string','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','1991114IeguZx','112OqAuZO','27130jdzUwc','runtime','830921KZpGjx','roleName','11201544vQDume'];a38_0x34b5=function(){return _0x280ca3;};return a38_0x34b5();}const a38_0x590594=a38_0x2a2b;function a38_0x2a2b(_0x20813c,_0x4de0fa){_0x20813c=_0x20813c-0x73;const _0x34b530=a38_0x34b5();let _0x2a2b1f=_0x34b530[_0x20813c];return _0x2a2b1f;}(function(_0x20b3a2,_0x28e32c){const _0x34bf7a=a38_0x2a2b,_0x20aa12=_0x20b3a2();while(!![]){try{const _0xf5e092=parseInt(_0x34bf7a(0x76))/0x1+-parseInt(_0x34bf7a(0x87))/0x2*(-parseInt(_0x34bf7a(0x84))/0x3)+parseInt(_0x34bf7a(0x83))/0x4*(-parseInt(_0x34bf7a(0x7b))/0x5)+-parseInt(_0x34bf7a(0x80))/0x6+parseInt(_0x34bf7a(0x73))/0x7*(parseInt(_0x34bf7a(0x7f))/0x8)+-parseInt(_0x34bf7a(0x78))/0x9+-parseInt(_0x34bf7a(0x74))/0xa*(parseInt(_0x34bf7a(0x7d))/0xb);if(_0xf5e092===_0x28e32c)break;else _0x20aa12['push'](_0x20aa12['shift']());}catch(_0x1f800a){_0x20aa12['push'](_0x20aa12['shift']());}}}(a38_0x34b5,0xc3e04));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a38_0x590594(0x82),'command':'dataset-get','description':a38_0x590594(0x81),'risk':a38_0x590594(0x79),'flags':[{'name':a38_0x590594(0x7a),'type':a38_0x590594(0x85),'description':a38_0x590594(0x86)}],async 'execute'(_0x2e6cfa){const _0x2cc48f=a38_0x590594,_0x3eedf5=_0x2e6cfa[_0x2cc48f(0x7c)](_0x2cc48f(0x7a))['trim']();if(!_0x3eedf5)return{'ok':!![],'data':{'scope':_0x2cc48f(0x75),'datasets':await listRuntimeDatasetRolePermits(_0x2e6cfa[_0x2cc48f(0x7e)])}};const _0x70c633=await resolveRuntimeRoleRef(_0x2e6cfa['appCode'],_0x3eedf5);return{'ok':!![],'data':{'scope':_0x2cc48f(0x75),'role':{'id':_0x70c633['id'],'roleName':_0x70c633[_0x2cc48f(0x77)],'roleType':_0x70c633['roleType']},'datasets':await listRuntimeDatasetPermits(_0x2e6cfa[_0x2cc48f(0x7e)],_0x70c633['id'])}};}};
@@ -1 +1 @@
1
- const a39_0x2d6e34=a39_0x5d87;function a39_0x5d87(_0x1f635e,_0x3e45b9){_0x1f635e=_0x1f635e-0x105;const _0x3929bd=a39_0x3929();let _0x5d8769=_0x3929bd[_0x1f635e];return _0x5d8769;}(function(_0x28a117,_0x137f1b){const _0x564f3b=a39_0x5d87,_0x4e8812=_0x28a117();while(!![]){try{const _0x2d5c50=-parseInt(_0x564f3b(0x133))/0x1+-parseInt(_0x564f3b(0x10f))/0x2*(-parseInt(_0x564f3b(0x12d))/0x3)+-parseInt(_0x564f3b(0x107))/0x4+-parseInt(_0x564f3b(0x11e))/0x5*(-parseInt(_0x564f3b(0x123))/0x6)+parseInt(_0x564f3b(0x13c))/0x7*(-parseInt(_0x564f3b(0x11d))/0x8)+-parseInt(_0x564f3b(0x117))/0x9+-parseInt(_0x564f3b(0x10d))/0xa*(-parseInt(_0x564f3b(0x132))/0xb);if(_0x2d5c50===_0x137f1b)break;else _0x4e8812['push'](_0x4e8812['shift']());}catch(_0x1f9986){_0x4e8812['push'](_0x4e8812['shift']());}}}(a39_0x3929,0xd76a8));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=['DATA_CREATE',a39_0x2d6e34(0x119),'DATA_DELETE',a39_0x2d6e34(0x12f),a39_0x2d6e34(0x122),a39_0x2d6e34(0x116)],DATASETS_FLAG={'name':a39_0x2d6e34(0x10e),'type':'string','required':!![],'description':'Comma-separated\x20runtime\x20dataset\x20codes'},ACTIONS_FLAG={'name':a39_0x2d6e34(0x114),'type':a39_0x2d6e34(0x110),'required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS[a39_0x2d6e34(0x126)](',\x20')};async function prepare(_0x4d35e6){const _0x43d3fe=a39_0x2d6e34;await assertRuntimePermissionManager(_0x4d35e6[_0x43d3fe(0x113)]);const _0x26d44d=assertGrantOrRevoke(_0x4d35e6[_0x43d3fe(0x13f)](_0x43d3fe(0x10b)),_0x4d35e6[_0x43d3fe(0x13f)]('revoke')),_0x2a2855=await resolveRuntimeRoleRef(_0x4d35e6[_0x43d3fe(0x113)],_0x4d35e6[_0x43d3fe(0x118)]('role'));assertRuntimePermitRoleConfigurable(_0x2a2855);const _0x2e4e6e=splitRefs(_0x4d35e6[_0x43d3fe(0x118)](_0x43d3fe(0x10e)),_0x43d3fe(0x11b)),_0x26069c=[...new Set(splitRefs(_0x4d35e6['str'](_0x43d3fe(0x114)),_0x43d3fe(0x125))[_0x43d3fe(0x12b)](_0x23454a=>_0x23454a[_0x43d3fe(0x10c)]()))],_0x309d11=_0x26069c[_0x43d3fe(0x10a)](_0x4b4279=>!DATA_ACTIONS['includes'](_0x4b4279));if(_0x309d11[_0x43d3fe(0x139)]>0x0)throw CliErrors[_0x43d3fe(0x136)](_0x43d3fe(0x128)+_0x309d11[_0x43d3fe(0x126)](',\x20')+'.');const _0x21e3a3=await listRuntimeDatasetRolePermits(_0x4d35e6[_0x43d3fe(0x113)]),_0x29fc65=await listRuntimePermitRoles(_0x4d35e6[_0x43d3fe(0x113)]),_0x460205=[],_0x68bf9c=[],_0xeaaeed=[],_0x2cfda3=[];for(const _0x41451c of _0x2e4e6e){const _0x3e3214=_0x21e3a3['find'](_0x4ec7ad=>_0x4ec7ad['datasetCode']===_0x41451c);if(!_0x3e3214)throw CliErrors[_0x43d3fe(0x136)](_0x43d3fe(0x106)+_0x41451c+_0x43d3fe(0x121));for(const _0x368974 of _0x26069c){const _0x4c13c3=_0x3e3214[_0x43d3fe(0x127)][_0x43d3fe(0x131)](_0x3a55b0=>_0x3a55b0[_0x43d3fe(0x124)]===_0x368974);if(!_0x4c13c3)throw CliErrors[_0x43d3fe(0x136)]('Dataset\x20'+_0x41451c+_0x43d3fe(0x11c)+_0x368974+'.');const _0x2dc284=applyRuntimeRolePermission(_0x4c13c3['rolePermit'],_0x2a2855,_0x29fc65,_0x26d44d);_0x68bf9c[_0x43d3fe(0x11a)]({'datasetCode':_0x41451c,'resourceType':_0x368974,'rolePermit':_0x4c13c3['rolePermit']}),_0xeaaeed[_0x43d3fe(0x11a)]({'datasetCode':_0x41451c,'resourceType':_0x368974,'rolePermit':_0x2dc284[_0x43d3fe(0x112)]}),_0x2dc284[_0x43d3fe(0x134)]?_0x460205[_0x43d3fe(0x11a)]({..._0x4c13c3[_0x43d3fe(0x115)]!=null?{'id':_0x4c13c3['permitId']}:{},'appCode':_0x4d35e6[_0x43d3fe(0x113)],'resourceCode':_0x41451c,'resourceType':_0x368974,'resourceName':_0x4c13c3[_0x43d3fe(0x129)],'rolePermit':_0x2dc284[_0x43d3fe(0x112)]}):_0x2cfda3['push'](_0x41451c+'/'+_0x368974+_0x43d3fe(0x140)+_0x26d44d+'\x20for\x20role\x20'+_0x2a2855['id']+'.');}}return{'operation':_0x26d44d,'role':_0x2a2855,'datasetCodes':_0x2e4e6e,'actions':_0x26069c,'permitList':_0x460205,'before':_0x68bf9c,'after':_0xeaaeed,'warnings':_0x2cfda3};}function a39_0x3929(){const _0x2946a6=['permitList','length','dataset-','POST','7eHptEl','revoke','before','bool','\x20already\x20reflects\x20','build','Runtime\x20dataset\x20','798136GbNaIf','operation','permit','filter','grant','toUpperCase','50202440irXqYe','datasets','1812054sEBSiY','string','/client/permit/resource/batch-save-dataset','roles','appCode','actions','permitId','DATA_ROW','15074820ljGUVK','str','DATA_UPDATE','push','--datasets','\x20does\x20not\x20expose\x20','12633736GVSKaq','5iIZLNC','body','dataset-set','\x20was\x20not\x20found.','DATA_EXPORT','194148mnIJPE','resourceType','--actions','join','dataPermitList','Invalid\x20dataset\x20actions:\x20','resourceName','datasetCodes','map','role','3BaPuwt','high-risk-write','DATA_DETAIL','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','find','11uzYDvl','1622554pvDofD','changed','after','validation','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role'];a39_0x3929=function(){return _0x2946a6;};return a39_0x3929();}export const permitDatasetSet={'service':a39_0x2d6e34(0x109),'command':a39_0x2d6e34(0x120),'description':a39_0x2d6e34(0x137),'risk':a39_0x2d6e34(0x12e),'confirmationDescription':a39_0x2d6e34(0x130),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x4cd32a){const _0x5e8883=a39_0x2d6e34;assertGrantOrRevoke(_0x4cd32a['bool'](_0x5e8883(0x10b)),_0x4cd32a[_0x5e8883(0x13f)](_0x5e8883(0x13d)));},async 'dryRun'(_0x256a7a){const _0xd72e65=a39_0x2d6e34,_0x4400b8=await prepare(_0x256a7a);return dryRun(_0xd72e65(0x13b),_0xd72e65(0x111))[_0xd72e65(0x11f)]({'appCode':_0x256a7a[_0xd72e65(0x113)],'permitList':_0x4400b8[_0xd72e65(0x138)]})['description']('Preview:\x20'+_0x4400b8[_0xd72e65(0x108)]+'\x20selected\x20runtime\x20dataset\x20actions')[_0xd72e65(0x105)]();},async 'execute'(_0x4c0901){const _0x10b25d=a39_0x2d6e34,_0x306dc5=await prepare(_0x4c0901);return _0x306dc5[_0x10b25d(0x138)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0x4c0901[_0x10b25d(0x113)],_0x306dc5[_0x10b25d(0x138)]),{'ok':!![],'data':runtimePermitWriteResult(_0x10b25d(0x13a)+_0x306dc5[_0x10b25d(0x108)],{'roleId':_0x306dc5[_0x10b25d(0x12c)]['id'],'datasetCodes':_0x306dc5[_0x10b25d(0x12a)],'actions':_0x306dc5[_0x10b25d(0x114)]},_0x306dc5[_0x10b25d(0x13e)],_0x306dc5[_0x10b25d(0x135)],{'method':_0x10b25d(0x13b),'path':_0x10b25d(0x111)},_0x306dc5['warnings'])};}};
1
+ function a39_0x49c5(_0x59c4c7,_0x18536f){_0x59c4c7=_0x59c4c7-0xec;const _0x525715=a39_0x5257();let _0x49c59d=_0x525715[_0x59c4c7];return _0x49c59d;}const a39_0x28654f=a39_0x49c5;(function(_0xfa8e1e,_0x29f8fd){const _0x2ac84b=a39_0x49c5,_0x9d0aae=_0xfa8e1e();while(!![]){try{const _0xc2216d=-parseInt(_0x2ac84b(0x113))/0x1*(parseInt(_0x2ac84b(0xfc))/0x2)+-parseInt(_0x2ac84b(0x126))/0x3*(-parseInt(_0x2ac84b(0x119))/0x4)+-parseInt(_0x2ac84b(0xef))/0x5*(-parseInt(_0x2ac84b(0x10b))/0x6)+-parseInt(_0x2ac84b(0x12b))/0x7+parseInt(_0x2ac84b(0x11e))/0x8*(parseInt(_0x2ac84b(0x11b))/0x9)+parseInt(_0x2ac84b(0x106))/0xa+-parseInt(_0x2ac84b(0xf5))/0xb*(parseInt(_0x2ac84b(0x114))/0xc);if(_0xc2216d===_0x29f8fd)break;else _0x9d0aae['push'](_0x9d0aae['shift']());}catch(_0x5885e0){_0x9d0aae['push'](_0x9d0aae['shift']());}}}(a39_0x5257,0xe86d6));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a39_0x28654f(0x102),a39_0x28654f(0x117),a39_0x28654f(0x116),'DATA_DETAIL',a39_0x28654f(0xf1),a39_0x28654f(0xec)],DATASETS_FLAG={'name':a39_0x28654f(0x123),'type':'string','required':!![],'description':'Comma-separated\x20runtime\x20dataset\x20codes'},ACTIONS_FLAG={'name':a39_0x28654f(0xf3),'type':a39_0x28654f(0xfa),'required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS[a39_0x28654f(0xf0)](',\x20')};async function prepare(_0x249a7e){const _0x2a3086=a39_0x28654f;await assertRuntimePermissionManager(_0x249a7e[_0x2a3086(0xf7)]);const _0x57558f=assertGrantOrRevoke(_0x249a7e[_0x2a3086(0xf9)](_0x2a3086(0x10e)),_0x249a7e[_0x2a3086(0xf9)](_0x2a3086(0x108))),_0x564d71=await resolveRuntimeRoleRef(_0x249a7e[_0x2a3086(0xf7)],_0x249a7e[_0x2a3086(0x11f)](_0x2a3086(0x111)));assertRuntimePermitRoleConfigurable(_0x564d71);const _0x249dde=splitRefs(_0x249a7e['str'](_0x2a3086(0x123)),_0x2a3086(0xf4)),_0xea3f2a=[...new Set(splitRefs(_0x249a7e[_0x2a3086(0x11f)](_0x2a3086(0xf3)),_0x2a3086(0x127))['map'](_0x2352e3=>_0x2352e3[_0x2a3086(0x124)]()))],_0x41b4ee=_0xea3f2a[_0x2a3086(0x100)](_0x280184=>!DATA_ACTIONS[_0x2a3086(0xfb)](_0x280184));if(_0x41b4ee[_0x2a3086(0x109)]>0x0)throw CliErrors[_0x2a3086(0x101)](_0x2a3086(0x125)+_0x41b4ee['join'](',\x20')+'.');const _0x44bb29=await listRuntimeDatasetRolePermits(_0x249a7e[_0x2a3086(0xf7)]),_0xb04aca=await listRuntimePermitRoles(_0x249a7e['appCode']),_0x2f6311=[],_0x2152db=[],_0x313b04=[],_0x4a390d=[];for(const _0x4f569a of _0x249dde){const _0x2272b9=_0x44bb29[_0x2a3086(0xff)](_0x283ab9=>_0x283ab9[_0x2a3086(0x105)]===_0x4f569a);if(!_0x2272b9)throw CliErrors[_0x2a3086(0x101)](_0x2a3086(0xf2)+_0x4f569a+_0x2a3086(0x11c));for(const _0x8f4071 of _0xea3f2a){const _0x115868=_0x2272b9['dataPermitList'][_0x2a3086(0xff)](_0x483969=>_0x483969['resourceType']===_0x8f4071);if(!_0x115868)throw CliErrors['validation'](_0x2a3086(0x12a)+_0x4f569a+_0x2a3086(0xfe)+_0x8f4071+'.');const _0x2603c7=applyRuntimeRolePermission(_0x115868[_0x2a3086(0xed)],_0x564d71,_0xb04aca,_0x57558f);_0x2152db[_0x2a3086(0x10d)]({'datasetCode':_0x4f569a,'resourceType':_0x8f4071,'rolePermit':_0x115868[_0x2a3086(0xed)]}),_0x313b04[_0x2a3086(0x10d)]({'datasetCode':_0x4f569a,'resourceType':_0x8f4071,'rolePermit':_0x2603c7[_0x2a3086(0xf8)]}),_0x2603c7[_0x2a3086(0xee)]?_0x2f6311[_0x2a3086(0x10d)]({..._0x115868[_0x2a3086(0xf6)]!=null?{'id':_0x115868[_0x2a3086(0xf6)]}:{},'appCode':_0x249a7e['appCode'],'resourceCode':_0x4f569a,'resourceType':_0x8f4071,'resourceName':_0x115868[_0x2a3086(0x10c)],'rolePermit':_0x2603c7['roles']}):_0x4a390d[_0x2a3086(0x10d)](_0x4f569a+'/'+_0x8f4071+_0x2a3086(0x110)+_0x57558f+'\x20for\x20role\x20'+_0x564d71['id']+'.');}}return{'operation':_0x57558f,'role':_0x564d71,'datasetCodes':_0x249dde,'actions':_0xea3f2a,'permitList':_0x2f6311,'before':_0x2152db,'after':_0x313b04,'warnings':_0x4a390d};}function a39_0x5257(){const _0x2f4769=['permitId','appCode','roles','bool','string','includes','538oaQqBJ','body','\x20does\x20not\x20expose\x20','find','filter','validation','DATA_CREATE','build','Preview:\x20','datasetCode','1015720eaRpPe','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','revoke','length','/client/permit/resource/batch-save-dataset','328962btZGVD','resourceName','push','grant','datasetCodes','\x20already\x20reflects\x20','role','description','5647cCfWZN','24VdhvjL','permit','DATA_DELETE','DATA_UPDATE','dataset-','4ZpyWIi','dataset-set','315GoYDFT','\x20was\x20not\x20found.','POST','290968KKFDyL','str','high-risk-write','after','permitList','datasets','toUpperCase','Invalid\x20dataset\x20actions:\x20','4713573ejQxbg','--actions','operation','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','Dataset\x20','5140968sjVhjk','warnings','DATA_ROW','rolePermit','changed','85IhTSoY','join','DATA_EXPORT','Runtime\x20dataset\x20','actions','--datasets','3697749zGTnwy'];a39_0x5257=function(){return _0x2f4769;};return a39_0x5257();}export const permitDatasetSet={'service':a39_0x28654f(0x115),'command':a39_0x28654f(0x11a),'description':a39_0x28654f(0x107),'risk':a39_0x28654f(0x120),'confirmationDescription':a39_0x28654f(0x129),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x4d23b5){const _0x1aa376=a39_0x28654f;assertGrantOrRevoke(_0x4d23b5[_0x1aa376(0xf9)](_0x1aa376(0x10e)),_0x4d23b5[_0x1aa376(0xf9)](_0x1aa376(0x108)));},async 'dryRun'(_0x18b7da){const _0x16b111=a39_0x28654f,_0x59e739=await prepare(_0x18b7da);return dryRun(_0x16b111(0x11d),_0x16b111(0x10a))[_0x16b111(0xfd)]({'appCode':_0x18b7da[_0x16b111(0xf7)],'permitList':_0x59e739[_0x16b111(0x122)]})[_0x16b111(0x112)](_0x16b111(0x104)+_0x59e739[_0x16b111(0x128)]+'\x20selected\x20runtime\x20dataset\x20actions')[_0x16b111(0x103)]();},async 'execute'(_0x560930){const _0x49a7d2=a39_0x28654f,_0x3492a3=await prepare(_0x560930);return _0x3492a3[_0x49a7d2(0x122)][_0x49a7d2(0x109)]>0x0&&await saveRuntimeDatasetRolePermits(_0x560930[_0x49a7d2(0xf7)],_0x3492a3['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x49a7d2(0x118)+_0x3492a3[_0x49a7d2(0x128)],{'roleId':_0x3492a3[_0x49a7d2(0x111)]['id'],'datasetCodes':_0x3492a3[_0x49a7d2(0x10f)],'actions':_0x3492a3[_0x49a7d2(0xf3)]},_0x3492a3['before'],_0x3492a3[_0x49a7d2(0x121)],{'method':_0x49a7d2(0x11d),'path':_0x49a7d2(0x10a)},_0x3492a3[_0x49a7d2(0x12c)])};}};
@@ -1 +1 @@
1
- (function(_0x4c0157,_0x14b9c4){const _0xa797f6=a40_0x5435,_0x518d7b=_0x4c0157();while(!![]){try{const _0x1f7d28=parseInt(_0xa797f6(0x99))/0x1+-parseInt(_0xa797f6(0x96))/0x2*(parseInt(_0xa797f6(0x93))/0x3)+parseInt(_0xa797f6(0x95))/0x4+-parseInt(_0xa797f6(0x9b))/0x5+parseInt(_0xa797f6(0x97))/0x6*(parseInt(_0xa797f6(0x94))/0x7)+-parseInt(_0xa797f6(0x98))/0x8+parseInt(_0xa797f6(0x9a))/0x9;if(_0x1f7d28===_0x14b9c4)break;else _0x518d7b['push'](_0x518d7b['shift']());}catch(_0x457def){_0x518d7b['push'](_0x518d7b['shift']());}}}(a40_0x1017,0x8299e));function a40_0x1017(){const _0x17b701=['28146mDneOu','7728808bCPUIr','947445WFFbst','4098015DWTiEm','846620xYiYMv','1042557rMXaKi','1267rdkfGh','1844292UMonYS','6wTUanv'];a40_0x1017=function(){return _0x17b701;};return a40_0x1017();}import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';function a40_0x5435(_0x17f888,_0x4f5303){_0x17f888=_0x17f888-0x93;const _0x101708=a40_0x1017();let _0x543502=_0x101708[_0x17f888];return _0x543502;}export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x38d981,_0x4935df){const _0x4cbff0=a40_0x2fff,_0x3f3f99=_0x38d981();while(!![]){try{const _0x2f92d5=parseInt(_0x4cbff0(0x93))/0x1+parseInt(_0x4cbff0(0x98))/0x2*(-parseInt(_0x4cbff0(0x96))/0x3)+-parseInt(_0x4cbff0(0x95))/0x4+parseInt(_0x4cbff0(0x97))/0x5+parseInt(_0x4cbff0(0x94))/0x6+parseInt(_0x4cbff0(0x99))/0x7*(parseInt(_0x4cbff0(0x9a))/0x8)+-parseInt(_0x4cbff0(0x92))/0x9;if(_0x2f92d5===_0x4935df)break;else _0x3f3f99['push'](_0x3f3f99['shift']());}catch(_0x2b32d1){_0x3f3f99['push'](_0x3f3f99['shift']());}}}(a40_0x4f0f,0xcc788));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a40_0x2fff(_0x8dec92,_0x4d56e9){_0x8dec92=_0x8dec92-0x92;const _0x4f0fed=a40_0x4f0f();let _0x2ffff1=_0x4f0fed[_0x8dec92];return _0x2ffff1;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';function a40_0x4f0f(){const _0x55051a=['4jMitCr','14gzNQqG','1837920xZnQpV','4797360cbwqMy','258944hfUqUf','9453438cCjKyG','5050336QFwkIX','1733016rZBsfD','7472415lGBMQA'];a40_0x4f0f=function(){return _0x55051a;};return a40_0x4f0f();}import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- const a41_0x283a1a=a41_0xd615;(function(_0x296e6f,_0xb1aa89){const _0x20b515=a41_0xd615,_0x463cfb=_0x296e6f();while(!![]){try{const _0x13ee1c=parseInt(_0x20b515(0x14e))/0x1*(parseInt(_0x20b515(0x14a))/0x2)+parseInt(_0x20b515(0x144))/0x3+-parseInt(_0x20b515(0x150))/0x4*(-parseInt(_0x20b515(0x147))/0x5)+parseInt(_0x20b515(0x143))/0x6+-parseInt(_0x20b515(0x14f))/0x7+-parseInt(_0x20b515(0x14c))/0x8+-parseInt(_0x20b515(0x145))/0x9;if(_0x13ee1c===_0xb1aa89)break;else _0x463cfb['push'](_0x463cfb['shift']());}catch(_0x128341){_0x463cfb['push'](_0x463cfb['shift']());}}}(a41_0x1163,0x880fa));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a41_0x1163(){const _0x348ed3=['6489030WPRCKz','157578HrvxtS','8892495ioYJQq','runtime','30gzZJfD','menu-id','page-get','54308NIpmuV','num','4028992EesCOi','read','18eXiUUe','92764oXOkVY','292956VGfrYw'];a41_0x1163=function(){return _0x348ed3;};return a41_0x1163();}function a41_0xd615(_0x58b3d8,_0xd7883d){_0x58b3d8=_0x58b3d8-0x143;const _0x116336=a41_0x1163();let _0xd6152b=_0x116336[_0x58b3d8];return _0xd6152b;}export const permitPageGet={'service':'permit','command':a41_0x283a1a(0x149),'description':'Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','risk':a41_0x283a1a(0x14d),'flags':[MENU_ID_FLAG],async 'execute'(_0x31cf23){const _0x149095=a41_0x283a1a,_0x139d0a=await getRuntimePagePermit(_0x31cf23[_0x149095(0x14b)](_0x149095(0x148)));return{'ok':!![],'data':{'scope':_0x149095(0x146),'page':projectRuntimePagePermit(_0x139d0a)}};}};
1
+ const a41_0x3f9766=a41_0x1416;function a41_0x3b8b(){const _0x1770a0=['2760iSRLRV','26jTQErP','20853BOcDSz','3213GtVXcq','28075812FMGOXK','4517094FFSRNM','num','3723426EpYazU','5DIKoID','5288zHlQjR','read','24qSdFgC','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','10450026KeKSwb','runtime','65153TOFaFH','menu-id'];a41_0x3b8b=function(){return _0x1770a0;};return a41_0x3b8b();}function a41_0x1416(_0x295f72,_0x54f9f4){_0x295f72=_0x295f72-0xad;const _0x3b8baf=a41_0x3b8b();let _0x1416d2=_0x3b8baf[_0x295f72];return _0x1416d2;}(function(_0x3960f3,_0x124ac0){const _0x478b2f=a41_0x1416,_0xec4f8=_0x3960f3();while(!![]){try{const _0x1ba9af=parseInt(_0x478b2f(0xba))/0x1*(parseInt(_0x478b2f(0xb9))/0x2)+parseInt(_0x478b2f(0xbb))/0x3*(-parseInt(_0x478b2f(0xb0))/0x4)+parseInt(_0x478b2f(0xaf))/0x5*(parseInt(_0x478b2f(0xbd))/0x6)+-parseInt(_0x478b2f(0xae))/0x7*(parseInt(_0x478b2f(0xb2))/0x8)+-parseInt(_0x478b2f(0xb4))/0x9+parseInt(_0x478b2f(0xb8))/0xa*(parseInt(_0x478b2f(0xb6))/0xb)+parseInt(_0x478b2f(0xbc))/0xc;if(_0x1ba9af===_0x124ac0)break;else _0xec4f8['push'](_0xec4f8['shift']());}catch(_0x2a5767){_0xec4f8['push'](_0xec4f8['shift']());}}}(a41_0x3b8b,0xc9907));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':'page-get','description':a41_0x3f9766(0xb3),'risk':a41_0x3f9766(0xb1),'flags':[MENU_ID_FLAG],async 'execute'(_0x5a2168){const _0x286c0c=a41_0x3f9766,_0x698670=await getRuntimePagePermit(_0x5a2168[_0x286c0c(0xad)](_0x286c0c(0xb7)));return{'ok':!![],'data':{'scope':_0x286c0c(0xb5),'page':projectRuntimePagePermit(_0x698670)}};}};
@@ -1 +1 @@
1
- const a42_0x18ba77=a42_0xf0b3;(function(_0x21c79e,_0x5e6ae9){const _0x1b7146=a42_0xf0b3,_0x44e098=_0x21c79e();while(!![]){try{const _0x54f255=parseInt(_0x1b7146(0xb5))/0x1*(-parseInt(_0x1b7146(0xc8))/0x2)+-parseInt(_0x1b7146(0xc0))/0x3*(parseInt(_0x1b7146(0xb4))/0x4)+-parseInt(_0x1b7146(0xc4))/0x5*(-parseInt(_0x1b7146(0xaf))/0x6)+-parseInt(_0x1b7146(0xba))/0x7*(-parseInt(_0x1b7146(0xcd))/0x8)+parseInt(_0x1b7146(0xc1))/0x9*(parseInt(_0x1b7146(0xc6))/0xa)+parseInt(_0x1b7146(0xcc))/0xb*(-parseInt(_0x1b7146(0xad))/0xc)+parseInt(_0x1b7146(0xc7))/0xd*(-parseInt(_0x1b7146(0xb6))/0xe);if(_0x54f255===_0x5e6ae9)break;else _0x44e098['push'](_0x44e098['shift']());}catch(_0x4f308e){_0x44e098['push'](_0x44e098['shift']());}}}(a42_0x338e,0x33e92));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';function a42_0xf0b3(_0x2ef509,_0x20cea1){_0x2ef509=_0x2ef509-0xa9;const _0x338ee0=a42_0x338e();let _0xf0b336=_0x338ee0[_0x2ef509];return _0xf0b336;}function a42_0x338e(){const _0x3cd92f=['before','POST','22092ungvJU','validation','2274528YsvCQi','str','page-set','length','allowSelf','4OZnmsS','107fIcnkg','2282OfCPjp','\x20does\x20not\x20expose\x20','appCode','flag','2453885ErbELK','description','Set\x20selected\x20runtime\x20page\x20permission\x20slots','num','page','key','804624zmoOER','711tyCsDu','push','rolePermit','5feeUFm','/client/permit/page/save','25210NwGxOQ','24401qbMFdV','2276JIVSdx','Menu\x20','Preview:\x20update\x20page\x20permission\x20slots\x20','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','121HspxGC','8VhrcMZ','\x20does\x20not\x20belong\x20to\x20app\x20','menuId'];a42_0x338e=function(){return _0x3cd92f;};return a42_0x338e();}async function prepare(_0x5cc58f){const _0x5462f9=a42_0xf0b3;await assertRuntimePermissionManager(_0x5cc58f[_0x5462f9(0xb8)]);const _0x182b8a=_0x5cc58f[_0x5462f9(0xbd)]('menu-id'),_0xacbf27=await getRuntimePagePermit(_0x182b8a);if(_0xacbf27[_0x5462f9(0xb8)]&&_0xacbf27[_0x5462f9(0xb8)]!==_0x5cc58f['appCode'])throw CliErrors[_0x5462f9(0xae)](_0x5462f9(0xc9)+_0x182b8a+_0x5462f9(0xa9)+_0x5cc58f[_0x5462f9(0xb8)]+'.');const _0x114ece=structuredClone(_0xacbf27),_0x2cb8cd=[];for(const _0x30e185 of PAGE_SLOT_SPECS){if(_0x5cc58f[_0x5462f9(0xb9)](_0x30e185[_0x5462f9(0xb9)])===undefined)continue;const _0x592877=_0xacbf27[_0x30e185[_0x5462f9(0xbf)]];if(!_0x592877)throw CliErrors[_0x5462f9(0xae)]('Page\x20menu\x20'+_0x182b8a+_0x5462f9(0xb7)+_0x30e185[_0x5462f9(0xbf)]+'.');_0x592877[_0x5462f9(0xc3)]=await resolveRuntimePermitRoles(_0x5cc58f[_0x5462f9(0xb8)],splitRefs(_0x5cc58f[_0x5462f9(0xb0)](_0x30e185[_0x5462f9(0xb9)]),'--'+_0x30e185['flag']),_0x30e185[_0x5462f9(0xb3)]),_0x2cb8cd[_0x5462f9(0xc2)](_0x30e185[_0x5462f9(0xbf)]);}if(_0x2cb8cd[_0x5462f9(0xb2)]===0x0)throw CliErrors['validation'](_0x5462f9(0xcb));return{'menuId':_0x182b8a,'page':_0xacbf27,'before':_0x114ece,'slots':_0x2cb8cd};}export const permitPageSet={'service':'permit','command':'page-set','description':a42_0x18ba77(0xbc),'risk':'high-risk-write','confirmationDescription':'修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x48e498){const _0x5729d8=a42_0x18ba77,_0x1e6fcc=await prepare(_0x48e498);return dryRun(_0x5729d8(0xac),_0x5729d8(0xc5))['body'](_0x1e6fcc[_0x5729d8(0xbe)])[_0x5729d8(0xbb)](_0x5729d8(0xca)+_0x1e6fcc['slots']['join'](',\x20'))['build']();},async 'execute'(_0x8afac6){const _0x57a171=a42_0x18ba77,_0x364984=await prepare(_0x8afac6),_0x433294=await saveRuntimePagePermit(_0x364984[_0x57a171(0xbe)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x57a171(0xb1),{'menuId':_0x364984[_0x57a171(0xaa)],'slots':_0x364984['slots']},projectRuntimePagePermit(_0x364984[_0x57a171(0xab)]),projectRuntimePagePermit(_0x433294),{'method':_0x57a171(0xac),'path':_0x57a171(0xc5)})};}};
1
+ const a42_0x164436=a42_0x4b2c;(function(_0x372609,_0x202a35){const _0x51558b=a42_0x4b2c,_0x3cee7f=_0x372609();while(!![]){try{const _0x8e6918=parseInt(_0x51558b(0x188))/0x1*(-parseInt(_0x51558b(0x18c))/0x2)+-parseInt(_0x51558b(0x180))/0x3*(-parseInt(_0x51558b(0x197))/0x4)+parseInt(_0x51558b(0x187))/0x5*(-parseInt(_0x51558b(0x18f))/0x6)+parseInt(_0x51558b(0x19c))/0x7+-parseInt(_0x51558b(0x19d))/0x8+parseInt(_0x51558b(0x183))/0x9*(parseInt(_0x51558b(0x18a))/0xa)+-parseInt(_0x51558b(0x19a))/0xb*(-parseInt(_0x51558b(0x17f))/0xc);if(_0x8e6918===_0x202a35)break;else _0x3cee7f['push'](_0x3cee7f['shift']());}catch(_0x4542bf){_0x3cee7f['push'](_0x3cee7f['shift']());}}}(a42_0x1bd0,0xe643f));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';async function prepare(_0x24b90e){const _0x288338=a42_0x4b2c;await assertRuntimePermissionManager(_0x24b90e[_0x288338(0x18d)]);const _0x1fdc4d=_0x24b90e[_0x288338(0x199)](_0x288338(0x17e)),_0xb7e414=await getRuntimePagePermit(_0x1fdc4d);if(_0xb7e414['appCode']&&_0xb7e414[_0x288338(0x18d)]!==_0x24b90e[_0x288338(0x18d)])throw CliErrors[_0x288338(0x18e)](_0x288338(0x181)+_0x1fdc4d+'\x20does\x20not\x20belong\x20to\x20app\x20'+_0x24b90e[_0x288338(0x18d)]+'.');const _0x3e8c98=structuredClone(_0xb7e414),_0x44a1fd=[];for(const _0x4aba7e of PAGE_SLOT_SPECS){if(_0x24b90e[_0x288338(0x196)](_0x4aba7e[_0x288338(0x196)])===undefined)continue;const _0x3eed66=_0xb7e414[_0x4aba7e['key']];if(!_0x3eed66)throw CliErrors['validation'](_0x288338(0x194)+_0x1fdc4d+_0x288338(0x182)+_0x4aba7e[_0x288338(0x195)]+'.');_0x3eed66['rolePermit']=await resolveRuntimePermitRoles(_0x24b90e[_0x288338(0x18d)],splitRefs(_0x24b90e[_0x288338(0x190)](_0x4aba7e['flag']),'--'+_0x4aba7e[_0x288338(0x196)]),_0x4aba7e['allowSelf']),_0x44a1fd[_0x288338(0x189)](_0x4aba7e[_0x288338(0x195)]);}if(_0x44a1fd[_0x288338(0x17d)]===0x0)throw CliErrors['validation'](_0x288338(0x19f));return{'menuId':_0x1fdc4d,'page':_0xb7e414,'before':_0x3e8c98,'slots':_0x44a1fd};}function a42_0x4b2c(_0x4a2bac,_0x594c40){_0x4a2bac=_0x4a2bac-0x17d;const _0x1bd0ed=a42_0x1bd0();let _0x4b2c85=_0x1bd0ed[_0x4a2bac];return _0x4b2c85;}export const permitPageSet={'service':'permit','command':a42_0x164436(0x191),'description':a42_0x164436(0x184),'risk':a42_0x164436(0x198),'confirmationDescription':'修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x545d14){const _0x22071d=a42_0x164436,_0x4da3ca=await prepare(_0x545d14);return dryRun(_0x22071d(0x185),'/client/permit/page/save')[_0x22071d(0x18b)](_0x4da3ca[_0x22071d(0x192)])[_0x22071d(0x19b)](_0x22071d(0x193)+_0x4da3ca[_0x22071d(0x186)]['join'](',\x20'))[_0x22071d(0x19e)]();},async 'execute'(_0x5ea349){const _0x585261=a42_0x164436,_0x593f4d=await prepare(_0x5ea349),_0x35ec11=await saveRuntimePagePermit(_0x593f4d[_0x585261(0x192)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x585261(0x191),{'menuId':_0x593f4d['menuId'],'slots':_0x593f4d[_0x585261(0x186)]},projectRuntimePagePermit(_0x593f4d['before']),projectRuntimePagePermit(_0x35ec11),{'method':_0x585261(0x185),'path':'/client/permit/page/save'})};}};function a42_0x1bd0(){const _0x4a5459=['4397368JMzMlR','build','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','length','menu-id','5831184fsoJdC','15jGQOuP','Menu\x20','\x20does\x20not\x20expose\x20','7743321GEeUBq','Set\x20selected\x20runtime\x20page\x20permission\x20slots','POST','slots','2259825TcyaNf','2qAizul','push','10XiulTW','body','1827214psIUwJ','appCode','validation','6lZBWAe','str','page-set','page','Preview:\x20update\x20page\x20permission\x20slots\x20','Page\x20menu\x20','key','flag','221124zGqgjB','high-risk-write','num','33DdHLWB','description','8242129IqyXrn'];a42_0x1bd0=function(){return _0x4a5459;};return a42_0x1bd0();}