@lovrabet/lovrabet-cli 2.2.6 → 2.2.7-beta.1

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 (158) 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.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  140. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  141. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  142. package/lib/skills/runtime-skill-sync/push.js +1 -1
  143. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  144. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  146. package/lib/skills/runtime-skill-sync.js +1 -1
  147. package/lib/skills/skill-presence.js +1 -1
  148. package/lib/utils/apply-jq-filter.js +1 -1
  149. package/lib/utils/logger.js +1 -1
  150. package/lib/utils/lossless-json.js +1 -1
  151. package/lib/utils/params.js +1 -1
  152. package/lib/utils/platform.js +1 -1
  153. package/lib/utils/update-notice.js +1 -1
  154. package/lib/utils/version.js +1 -1
  155. package/lib/utils/write-cli-side-channel.js +1 -1
  156. package/package.json +1 -1
  157. package/skills/lovrabet/SKILL.md +1 -1
  158. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a28_0x4c184a=a28_0x12c2;(function(_0x577494,_0x4f5203){const _0x57b727=a28_0x12c2,_0x1b6e13=_0x577494();while(!![]){try{const _0x30b23e=parseInt(_0x57b727(0x18f))/0x1*(parseInt(_0x57b727(0x193))/0x2)+-parseInt(_0x57b727(0x18d))/0x3+parseInt(_0x57b727(0x18c))/0x4*(parseInt(_0x57b727(0x18a))/0x5)+-parseInt(_0x57b727(0x198))/0x6*(parseInt(_0x57b727(0x194))/0x7)+parseInt(_0x57b727(0x18b))/0x8+-parseInt(_0x57b727(0x189))/0x9*(-parseInt(_0x57b727(0x188))/0xa)+-parseInt(_0x57b727(0x18e))/0xb;if(_0x30b23e===_0x4f5203)break;else _0x1b6e13['push'](_0x1b6e13['shift']());}catch(_0xd7d6a4){_0x1b6e13['push'](_0x1b6e13['shift']());}}}(a28_0x7e66,0xbd220));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x12c2(_0x1ef6f8,_0x3c4848){_0x1ef6f8=_0x1ef6f8-0x186;const _0x7e6608=a28_0x7e66();let _0x12c25e=_0x7e6608[_0x1ef6f8];return _0x12c25e;}const DEFAULT_MARKDOWN=a28_0x4c184a(0x197);export function formatDatasetSdkMarkdown(_0x22070e){const _0x5b1946=a28_0x4c184a,_0x304569=typeof _0x22070e==='string'?_0x22070e[_0x5b1946(0x191)]():'';return _0x304569||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x4c184a(0x187),'command':a28_0x4c184a(0x192),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':'read','flags':[{...CODE_FLAG,'description':a28_0x4c184a(0x186)}],async 'execute'(_0x5246c3){const _0x4475af=a28_0x4c184a,_0x28e9fd=_0x5246c3[_0x4475af(0x196)](_0x4475af(0x190)),_0x577d57=await getDatasetSdkUsageDoc(_0x28e9fd,_0x5246c3[_0x4475af(0x195)]);return{'ok':!![],'data':{'code':_0x28e9fd,'appCode':_0x5246c3[_0x4475af(0x195)],'markdown':formatDatasetSdkMarkdown(_0x577d57)}};}};function a28_0x7e66(){const _0x8a19b5=['8146880WCIDVs','20BJjWQw','2068479OVkTdZ','15454692rRBxUA','635223fZYDmw','code','trim','sdk-doc','2yuOraR','56faQeGc','appCode','str','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','911832QAZmZe','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','dataset','10KOxjqQ','13419459lDJAwy','940295BrEncn'];a28_0x7e66=function(){return _0x8a19b5;};return a28_0x7e66();}
1
+ const a28_0x1e230f=a28_0x3a6b;(function(_0xd9cb8b,_0x4903ab){const _0x4b8e34=a28_0x3a6b,_0x407e06=_0xd9cb8b();while(!![]){try{const _0x5e44ef=-parseInt(_0x4b8e34(0xb3))/0x1*(parseInt(_0x4b8e34(0xa6))/0x2)+parseInt(_0x4b8e34(0xac))/0x3+-parseInt(_0x4b8e34(0xb1))/0x4+-parseInt(_0x4b8e34(0xab))/0x5*(parseInt(_0x4b8e34(0xad))/0x6)+-parseInt(_0x4b8e34(0xa3))/0x7+parseInt(_0x4b8e34(0xa7))/0x8+parseInt(_0x4b8e34(0xae))/0x9;if(_0x5e44ef===_0x4903ab)break;else _0x407e06['push'](_0x407e06['shift']());}catch(_0x5887cd){_0x407e06['push'](_0x407e06['shift']());}}}(a28_0x18d0,0x89ff8));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x1e230f(0xa5);function a28_0x3a6b(_0x421993,_0xe70146){_0x421993=_0x421993-0xa2;const _0x18d03f=a28_0x18d0();let _0x3a6b4a=_0x18d03f[_0x421993];return _0x3a6b4a;}export function formatDatasetSdkMarkdown(_0x3d84cb){const _0x9313e1=a28_0x1e230f,_0x4d4c10=typeof _0x3d84cb===_0x9313e1(0xb0)?_0x3d84cb[_0x9313e1(0xa9)]():'';return _0x4d4c10||DEFAULT_MARKDOWN;}function a28_0x18d0(){const _0x7ffed9=['sdk-doc','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','4YcNZIY','6043824AMSFWg','dataset','trim','read','17190awWiBP','1638561lpFiId','1524SeZuQx','14830038bvNCkz','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','string','1327436SHSlPB','appCode','275988eqVMvw','code','4389840PPGQXm'];a28_0x18d0=function(){return _0x7ffed9;};return a28_0x18d0();}export const datasetSdkDoc={'service':a28_0x1e230f(0xa8),'command':a28_0x1e230f(0xa4),'description':a28_0x1e230f(0xaf),'risk':a28_0x1e230f(0xaa),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x16e31e){const _0x41c396=a28_0x1e230f,_0x57989d=_0x16e31e['str'](_0x41c396(0xa2)),_0x41c6e2=await getDatasetSdkUsageDoc(_0x57989d,_0x16e31e[_0x41c396(0xb2)]);return{'ok':!![],'data':{'code':_0x57989d,'appCode':_0x16e31e[_0x41c396(0xb2)],'markdown':formatDatasetSdkMarkdown(_0x41c6e2)}};}};
@@ -1 +1 @@
1
- function a29_0x10bb(_0x17238d,_0x260e79){_0x17238d=_0x17238d-0xdf;const _0x1880d8=a29_0x1880();let _0x10bbd5=_0x1880d8[_0x17238d];return _0x10bbd5;}const a29_0x2e8d3e=a29_0x10bb;function a29_0x1880(){const _0x120730=['\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','\x20\x20Auth','riskLevel','empty','\x20\x20Config\x20JSON','✗\x20Invalid\x20JSON','appCode','skillVersion','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','133wGJNrY','✓\x20Loaded','(default:\x20','4Crgxxd','\x20\x20Installed\x20Path:\x20\x20','✓\x20Valid\x20JSON','\x20(legacy/compat\x20only)','⚠\x20Empty\x20(treated\x20as\x20{})','env','accessKey','✗\x20Invalid','path','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','\x20(accessKey)','751665HaHcfD','name','check','state','verbose','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20Built-in\x20Skill','reason','bold','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Service\x20Tree','repeat','(not\x20set)','\x20commands)','serviceCode','\x20\x20Merged\x20Config','ClientAk','registryPath','missing','(unnamed)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','1360675eomMku','\x20\x20─','commandCount','Project','installedPath','Global','179256BrQRSG','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','29652uUbdcP','red','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','locale','16251960OjctBO','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','(missing)','message','\x20\x20Config\x20Files','\x20\x20auth\x20(effective):\x20','log','5390904wvgbQL','(not\x20found)','read','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','\x20\x20runtimeDomain:\x20\x20\x20','format','defaultApp','510kFTRNO','⚠\x20Empty','13051449XwuciC','arch','padEnd','gray','green','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'];a29_0x1880=function(){return _0x120730;};return a29_0x1880();}(function(_0x2760c5,_0x578e84){const _0x3320f2=a29_0x10bb,_0xcfeeaa=_0x2760c5();while(!![]){try{const _0x39e73e=parseInt(_0x3320f2(0x122))/0x1+parseInt(_0x3320f2(0xff))/0x2*(parseInt(_0x3320f2(0x10b))/0x3)+-parseInt(_0x3320f2(0x12a))/0x4*(parseInt(_0x3320f2(0xe1))/0x5)+-parseInt(_0x3320f2(0x136))/0x6+parseInt(_0x3320f2(0xfc))/0x7*(parseInt(_0x3320f2(0x128))/0x8)+-parseInt(_0x3320f2(0xe3))/0x9+parseInt(_0x3320f2(0x12e))/0xa;if(_0x39e73e===_0x578e84)break;else _0xcfeeaa['push'](_0xcfeeaa['shift']());}catch(_0xb5cbfb){_0xcfeeaa['push'](_0xcfeeaa['shift']());}}}(a29_0x1880,0xc5407));import a29_0x39541f 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(_0x4354fd){const _0x1a2f80=a29_0x10bb,_0x701429=getCliVersion(),_0x1dc0c4=buildConfigFromFlags({});await initGlobalEnvironment(_0x1dc0c4),console[_0x1a2f80(0x135)](),console['log'](a29_0x39541f[_0x1a2f80(0x114)](CLI_BIN_NAME+'\x20doctor')),console[_0x1a2f80(0x135)](a29_0x39541f[_0x1a2f80(0xe6)]('─'[_0x1a2f80(0x117)](0x32))),console[_0x1a2f80(0x135)](_0x1a2f80(0x12c)+_0x701429),console[_0x1a2f80(0x135)](_0x1a2f80(0x108)+process[_0x1a2f80(0x109)]),console[_0x1a2f80(0x135)](_0x1a2f80(0xf9)+process['platform']+'\x20'+process[_0x1a2f80(0xe4)]);const _0x4253e5=inspectBuiltinSkill();console[_0x1a2f80(0x135)](),console[_0x1a2f80(0x135)](a29_0x39541f[_0x1a2f80(0x114)](_0x1a2f80(0x112))),console['log'](a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x123)[_0x1a2f80(0x117)](0x1e))),console['log'](_0x1a2f80(0xf7)+(_0x4253e5[_0x1a2f80(0x10e)]==='current'?a29_0x39541f['green']('✓\x20current'):a29_0x39541f[_0x1a2f80(0x12b)]('✗\x20'+_0x4253e5[_0x1a2f80(0x10e)]))),console[_0x1a2f80(0x135)]('\x20\x20Package\x20Version:\x20'+_0x4253e5['packageVersion']),console[_0x1a2f80(0x135)](_0x1a2f80(0x115)+(_0x4253e5[_0x1a2f80(0xf3)]||a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x131)))),console[_0x1a2f80(0x135)](_0x1a2f80(0x100)+(_0x4253e5[_0x1a2f80(0x126)]||a29_0x39541f['gray'](_0x1a2f80(0x137))));_0x4253e5[_0x1a2f80(0x10e)]!=='current'&&console[_0x1a2f80(0x135)](_0x1a2f80(0xf8)+_0x4253e5['repairCommand']);_0x4253e5['reason']&&console['log'](_0x1a2f80(0x110)+_0x4253e5[_0x1a2f80(0x113)]);console['log'](),console[_0x1a2f80(0x135)](a29_0x39541f[_0x1a2f80(0x114)](_0x1a2f80(0x133))),console['log'](a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x123)[_0x1a2f80(0x117)](0x1e)));const _0x1e0249=getGlobalConfigPath(),_0x51e55b=getProjectConfigPath();console[_0x1a2f80(0x135)](_0x1a2f80(0xf4)+(_0x1e0249||a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x137)))),console[_0x1a2f80(0x135)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x51e55b||a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x137)))),console[_0x1a2f80(0x135)](),console[_0x1a2f80(0x135)](a29_0x39541f[_0x1a2f80(0x114)](_0x1a2f80(0xf0))),console['log'](a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x123)[_0x1a2f80(0x117)](0x1e)));const _0xc9c5c2=(_0x406f45,_0xab5269)=>{const _0xe3c0b5=_0x1a2f80;if(!_0xab5269){console[_0xe3c0b5(0x135)]('\x20\x20'+_0x406f45['padEnd'](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0xe6)]('(no\x20file)'));return;}const _0x3d98d3=inspectCliConfigJsonFile(_0xab5269);if(_0x3d98d3[_0xe3c0b5(0xfb)]==='ok')console[_0xe3c0b5(0x135)]('\x20\x20'+_0x406f45[_0xe3c0b5(0xe5)](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0xe7)](_0xe3c0b5(0x101)));else{if(_0x3d98d3['status']===_0xe3c0b5(0xef))console[_0xe3c0b5(0x135)]('\x20\x20'+_0x406f45[_0xe3c0b5(0xe5)](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0xe9)](_0xe3c0b5(0x103)));else _0x3d98d3[_0xe3c0b5(0xfb)]===_0xe3c0b5(0x11e)?console[_0xe3c0b5(0x135)]('\x20\x20'+_0x406f45[_0xe3c0b5(0xe5)](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0xe6)](_0xe3c0b5(0x131))):(console[_0xe3c0b5(0x135)]('\x20\x20'+_0x406f45['padEnd'](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0x12b)](_0xe3c0b5(0xf1))),console[_0xe3c0b5(0x135)]('\x20\x20'+''[_0xe3c0b5(0xe5)](0x11)+'\x20'+a29_0x39541f[_0xe3c0b5(0x12b)](_0x3d98d3[_0xe3c0b5(0x132)])));}};_0xc9c5c2(_0x1a2f80(0x127),_0x1e0249),_0xc9c5c2(_0x1a2f80(0x125),_0x51e55b),console[_0x1a2f80(0x135)](),console['log'](a29_0x39541f[_0x1a2f80(0x114)](_0x1a2f80(0x11b))),console[_0x1a2f80(0x135)](a29_0x39541f[_0x1a2f80(0xe6)]('\x20\x20─'['repeat'](0x1e))),console[_0x1a2f80(0x135)](_0x1a2f80(0xfa)+(_0x1dc0c4[_0x1a2f80(0xf2)]||a29_0x39541f[_0x1a2f80(0x12b)](_0x1a2f80(0x118)))),console[_0x1a2f80(0x135)](_0x1a2f80(0x129)+_0x1dc0c4[_0x1a2f80(0x104)]);const _0x1e0cab=isLegacyCompatConfigKey(_0x1a2f80(0x12d))?a29_0x39541f[_0x1a2f80(0xe6)](_0x1dc0c4[_0x1a2f80(0x12d)]+_0x1a2f80(0x102)):_0x1dc0c4['locale'];console['log'](_0x1a2f80(0x120)+_0x1e0cab),console[_0x1a2f80(0x135)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1dc0c4[_0x1a2f80(0xe0)]||a29_0x39541f[_0x1a2f80(0xe6)]('(none)'))),console[_0x1a2f80(0x135)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1dc0c4[_0x1a2f80(0xf5)]||a29_0x39541f['gray'](_0x1a2f80(0x111)))),console[_0x1a2f80(0x135)](_0x1a2f80(0x12f)+(_0x1dc0c4[_0x1a2f80(0xdf)]||a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0xfe)+DEFAULT_CONFIG_VALUES[_0x1a2f80(0xdf)]+')'))),console[_0x1a2f80(0x135)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1dc0c4['pageSize']??a29_0x39541f[_0x1a2f80(0xe6)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x1dc0c4[_0x1a2f80(0xee)]),console[_0x1a2f80(0x135)](_0x1a2f80(0xe8)+_0x1dc0c4[_0x1a2f80(0x10f)]),console['log'](_0x1a2f80(0x134)+AUTH_MODE[_0x1a2f80(0x11c)]),console[_0x1a2f80(0x135)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x1dc0c4[_0x1a2f80(0x105)]?a29_0x39541f[_0x1a2f80(0xe7)]('(set,\x20length='+_0x1dc0c4['accessKey']['length']+')'):a29_0x39541f[_0x1a2f80(0xe6)]('(none)'))),console[_0x1a2f80(0x135)](),console['log'](a29_0x39541f[_0x1a2f80(0x114)]('\x20\x20API\x20Endpoints')),console['log'](a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x123)[_0x1a2f80(0x117)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x1a2f80(0x135)](_0x1a2f80(0xea)+getUserDomain()),console[_0x1a2f80(0x135)](_0x1a2f80(0x13b)+getRuntimeDomain()),console[_0x1a2f80(0x135)](),console['log'](a29_0x39541f[_0x1a2f80(0x114)](_0x1a2f80(0x116))),console[_0x1a2f80(0x135)](a29_0x39541f['gray'](_0x1a2f80(0x123)[_0x1a2f80(0x117)](0x1e)));const _0x3c715a=inspectServiceRegistry();console['log']('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3c715a[_0x1a2f80(0x11d)]),console[_0x1a2f80(0x135)](_0x1a2f80(0xeb)+formatServiceRegistryStatus(_0x3c715a)),console[_0x1a2f80(0x135)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3c715a['serviceCount']),console[_0x1a2f80(0x135)](_0x1a2f80(0x139)+_0x3c715a[_0x1a2f80(0x124)]);for(const _0x519b1e of _0x3c715a[_0x1a2f80(0x130)]){console[_0x1a2f80(0x135)]('\x20\x20'+(_0x519b1e[_0x1a2f80(0x11a)]+':')[_0x1a2f80(0xe5)](0x11)+'\x20'+(_0x519b1e[_0x1a2f80(0x10c)]||a29_0x39541f[_0x1a2f80(0xe6)](_0x1a2f80(0x11f)))+'\x20('+_0x519b1e[_0x1a2f80(0x124)]+_0x1a2f80(0x119)),console['log']('\x20\x20'+''['padEnd'](0x11)+_0x1a2f80(0x13a)+_0x519b1e['source'][_0x1a2f80(0x107)]);}return console[_0x1a2f80(0x135)](),console[_0x1a2f80(0x135)](a29_0x39541f['bold'](_0x1a2f80(0xed))),console['log'](a29_0x39541f[_0x1a2f80(0xe6)]('\x20\x20─'[_0x1a2f80(0x117)](0x1e))),console[_0x1a2f80(0x135)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x39541f[_0x1a2f80(0xe7)](AUTH_MODE[_0x1a2f80(0x11c)]+_0x1a2f80(0x10a))),console[_0x1a2f80(0x135)](_0x1a2f80(0x121)+a29_0x39541f[_0x1a2f80(0xe6)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x1a2f80(0x135)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2abd0c){const _0x2e7bee=a29_0x10bb;if(_0x2abd0c[_0x2e7bee(0xfb)]==='ok')return a29_0x39541f[_0x2e7bee(0xe7)](_0x2e7bee(0xfd));if(_0x2abd0c[_0x2e7bee(0xfb)]===_0x2e7bee(0x11e))return a29_0x39541f[_0x2e7bee(0xe6)]('(not\x20found)');if(_0x2abd0c[_0x2e7bee(0xfb)]===_0x2e7bee(0xef))return a29_0x39541f[_0x2e7bee(0xe9)](_0x2e7bee(0xe2));return a29_0x39541f[_0x2e7bee(0x12b)](_0x2e7bee(0x106)+(_0x2abd0c[_0x2e7bee(0x132)]?':\x20'+_0x2abd0c['message']:''));}export const doctorDefinition={'service':a29_0x2e8d3e(0xec),'command':a29_0x2e8d3e(0x10d),'description':a29_0x2e8d3e(0xf6),'risk':a29_0x2e8d3e(0x138),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x161508=a29_0x1e25;(function(_0x11c17d,_0x55a9d2){const _0x547c3c=a29_0x1e25,_0x28ac94=_0x11c17d();while(!![]){try{const _0x22d2f3=-parseInt(_0x547c3c(0x246))/0x1+parseInt(_0x547c3c(0x208))/0x2*(-parseInt(_0x547c3c(0x251))/0x3)+parseInt(_0x547c3c(0x22a))/0x4*(parseInt(_0x547c3c(0x234))/0x5)+-parseInt(_0x547c3c(0x24e))/0x6+-parseInt(_0x547c3c(0x248))/0x7*(parseInt(_0x547c3c(0x1fb))/0x8)+parseInt(_0x547c3c(0x244))/0x9*(parseInt(_0x547c3c(0x22b))/0xa)+-parseInt(_0x547c3c(0x22c))/0xb*(-parseInt(_0x547c3c(0x242))/0xc);if(_0x22d2f3===_0x55a9d2)break;else _0x28ac94['push'](_0x28ac94['shift']());}catch(_0x5c5bc0){_0x28ac94['push'](_0x28ac94['shift']());}}}(a29_0x53e9,0xc131a));import a29_0x120a03 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x1e25(_0x37066f,_0x2bf527){_0x37066f=_0x37066f-0x1f2;const _0x53e945=a29_0x53e9();let _0x1e2509=_0x53e945[_0x37066f];return _0x1e2509;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x53e9(){const _0xb2690=['(no\x20file)','\x20\x20Auth','1545UWwrVq','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','serviceCode','(none)','version','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','platform','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','empty','yellow','161568ZDgbVH','env','216774ilSevR','\x20commands)','1358517CURAUN','green','7xLxaBA','ClientAk','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','check','source','9324072yWfZNa','log','\x20\x20─','6UItUss','path','padEnd','accessKey','repeat','⚠\x20Empty','arch','(unnamed)','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','gray','3563440hOenfS','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','red','✗\x20Invalid\x20JSON','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repairCommand','verbose','\x20doctor','pageSize','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','message','825338zkFGCF','(default)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)','Project','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','locale','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','current','registryPath','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','format','(set,\x20length=','serviceCount','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','appCode','Global','read','\x20\x20Config\x20JSON','commandCount','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','(not\x20found)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','✓\x20Loaded','✓\x20Valid\x20JSON','1812AUybjx','470qebZOC','3025LSQzxx','\x20(accessKey)','✓\x20current','state','bold','doctor'];a29_0x53e9=function(){return _0xb2690;};return a29_0x53e9();}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(_0x787b8a){const _0x4099a6=a29_0x1e25,_0x58fdae=getCliVersion(),_0x12e9bd=buildConfigFromFlags({});await initGlobalEnvironment(_0x12e9bd),console['log'](),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x230)](CLI_BIN_NAME+_0x4099a6(0x203))),console[_0x4099a6(0x24f)](a29_0x120a03['gray']('─'['repeat'](0x32))),console[_0x4099a6(0x24f)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x58fdae),console[_0x4099a6(0x24f)](_0x4099a6(0x21c)+process[_0x4099a6(0x239)]),console[_0x4099a6(0x24f)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x4099a6(0x23d)]+'\x20'+process[_0x4099a6(0x1f4)]);const _0x1ccdb9=inspectBuiltinSkill();console[_0x4099a6(0x24f)](),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x230)]('\x20\x20Built-in\x20Skill')),console[_0x4099a6(0x24f)](a29_0x120a03['gray'](_0x4099a6(0x250)[_0x4099a6(0x1f2)](0x1e))),console[_0x4099a6(0x24f)](_0x4099a6(0x1fc)+(_0x1ccdb9['state']===_0x4099a6(0x211)?a29_0x120a03['green'](_0x4099a6(0x22e)):a29_0x120a03[_0x4099a6(0x1fe)]('✗\x20'+_0x1ccdb9[_0x4099a6(0x22f)]))),console[_0x4099a6(0x24f)]('\x20\x20Package\x20Version:\x20'+_0x1ccdb9[_0x4099a6(0x21d)]),console[_0x4099a6(0x24f)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x1ccdb9['skillVersion']||a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x20e)))),console['log']('\x20\x20Installed\x20Path:\x20\x20'+(_0x1ccdb9['installedPath']||a29_0x120a03['gray'](_0x4099a6(0x225))));_0x1ccdb9[_0x4099a6(0x22f)]!=='current'&&console[_0x4099a6(0x24f)](_0x4099a6(0x200)+_0x1ccdb9[_0x4099a6(0x201)]);_0x1ccdb9['reason']&&console[_0x4099a6(0x24f)](_0x4099a6(0x1f7)+_0x1ccdb9['reason']);console['log'](),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x230)]('\x20\x20Config\x20Files')),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x250)['repeat'](0x1e)));const _0x449a69=getGlobalConfigPath(),_0x41e90c=getProjectConfigPath();console[_0x4099a6(0x24f)](_0x4099a6(0x23a)+(_0x449a69||a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x225)))),console['log'](_0x4099a6(0x23e)+(_0x41e90c||a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x225)))),console['log'](),console['log'](a29_0x120a03[_0x4099a6(0x230)](_0x4099a6(0x221))),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x250)[_0x4099a6(0x1f2)](0x1e)));const _0x3c9430=(_0x1d0a56,_0xa2dc7b)=>{const _0x5e7909=_0x4099a6;if(!_0xa2dc7b){console['log']('\x20\x20'+_0x1d0a56[_0x5e7909(0x253)](0x11)+'\x20'+a29_0x120a03['gray'](_0x5e7909(0x232)));return;}const _0x378fd2=inspectCliConfigJsonFile(_0xa2dc7b);if(_0x378fd2['status']==='ok')console[_0x5e7909(0x24f)]('\x20\x20'+_0x1d0a56['padEnd'](0x11)+'\x20'+a29_0x120a03[_0x5e7909(0x247)](_0x5e7909(0x229)));else{if(_0x378fd2[_0x5e7909(0x224)]==='empty')console[_0x5e7909(0x24f)]('\x20\x20'+_0x1d0a56[_0x5e7909(0x253)](0x11)+'\x20'+a29_0x120a03[_0x5e7909(0x241)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x378fd2[_0x5e7909(0x224)]==='missing'?console[_0x5e7909(0x24f)]('\x20\x20'+_0x1d0a56[_0x5e7909(0x253)](0x11)+'\x20'+a29_0x120a03[_0x5e7909(0x1fa)](_0x5e7909(0x20e))):(console[_0x5e7909(0x24f)]('\x20\x20'+_0x1d0a56['padEnd'](0x11)+'\x20'+a29_0x120a03[_0x5e7909(0x1fe)](_0x5e7909(0x1ff))),console[_0x5e7909(0x24f)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x120a03[_0x5e7909(0x1fe)](_0x378fd2[_0x5e7909(0x207)])));}};_0x3c9430(_0x4099a6(0x21f),_0x449a69),_0x3c9430(_0x4099a6(0x20c),_0x41e90c),console[_0x4099a6(0x24f)](),console['log'](a29_0x120a03['bold']('\x20\x20Merged\x20Config')),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x250)['repeat'](0x1e))),console['log'](_0x4099a6(0x219)+(_0x12e9bd[_0x4099a6(0x21e)]||a29_0x120a03[_0x4099a6(0x1fe)]('(not\x20set)'))),console[_0x4099a6(0x24f)](_0x4099a6(0x24a)+_0x12e9bd[_0x4099a6(0x243)]);const _0x28f18e=isLegacyCompatConfigKey('locale')?a29_0x120a03[_0x4099a6(0x1fa)](_0x12e9bd[_0x4099a6(0x20f)]+_0x4099a6(0x20b)):_0x12e9bd['locale'];console[_0x4099a6(0x24f)](_0x4099a6(0x205)+_0x28f18e),console[_0x4099a6(0x24f)](_0x4099a6(0x23f)+(_0x12e9bd[_0x4099a6(0x1f8)]||a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x238)))),console['log'](_0x4099a6(0x217)+(_0x12e9bd[_0x4099a6(0x236)]||a29_0x120a03['gray']('(none)'))),console['log'](_0x4099a6(0x20a)+(_0x12e9bd[_0x4099a6(0x214)]||a29_0x120a03['gray'](_0x4099a6(0x206)+DEFAULT_CONFIG_VALUES[_0x4099a6(0x214)]+')'))),console['log'](_0x4099a6(0x235)+(_0x12e9bd[_0x4099a6(0x204)]??a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x209)))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x12e9bd['riskLevel']),console[_0x4099a6(0x24f)](_0x4099a6(0x21a)+_0x12e9bd[_0x4099a6(0x202)]),console[_0x4099a6(0x24f)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x4099a6(0x249)]),console['log']('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x12e9bd['accessKey']?a29_0x120a03[_0x4099a6(0x247)](_0x4099a6(0x215)+_0x12e9bd[_0x4099a6(0x254)][_0x4099a6(0x1fd)]+')'):a29_0x120a03[_0x4099a6(0x1fa)]('(none)'))),console[_0x4099a6(0x24f)](),console[_0x4099a6(0x24f)](a29_0x120a03['bold'](_0x4099a6(0x24b))),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x1fa)]('\x20\x20─'[_0x4099a6(0x1f2)](0x1e))),console[_0x4099a6(0x24f)](_0x4099a6(0x226)+getApiDomain()),console[_0x4099a6(0x24f)](_0x4099a6(0x213)+getUserDomain()),console['log'](_0x4099a6(0x1f6)+getRuntimeDomain()),console[_0x4099a6(0x24f)](),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x230)]('\x20\x20Service\x20Tree')),console['log'](a29_0x120a03['gray'](_0x4099a6(0x250)['repeat'](0x1e)));const _0x1a5773=inspectServiceRegistry();console[_0x4099a6(0x24f)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1a5773[_0x4099a6(0x212)]),console[_0x4099a6(0x24f)](_0x4099a6(0x223)+formatServiceRegistryStatus(_0x1a5773)),console[_0x4099a6(0x24f)](_0x4099a6(0x23c)+_0x1a5773[_0x4099a6(0x216)]),console['log'](_0x4099a6(0x20d)+_0x1a5773[_0x4099a6(0x222)]);for(const _0x193849 of _0x1a5773[_0x4099a6(0x23b)]){console[_0x4099a6(0x24f)]('\x20\x20'+(_0x193849[_0x4099a6(0x237)]+':')[_0x4099a6(0x253)](0x11)+'\x20'+(_0x193849['name']||a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x1f5)))+'\x20('+_0x193849[_0x4099a6(0x222)]+_0x4099a6(0x245)),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20Imported\x20from:\x20'+_0x193849[_0x4099a6(0x24d)][_0x4099a6(0x252)]);}return console[_0x4099a6(0x24f)](),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x230)](_0x4099a6(0x233))),console[_0x4099a6(0x24f)](a29_0x120a03[_0x4099a6(0x1fa)]('\x20\x20─'[_0x4099a6(0x1f2)](0x1e))),console[_0x4099a6(0x24f)](_0x4099a6(0x210)+a29_0x120a03[_0x4099a6(0x247)](AUTH_MODE[_0x4099a6(0x249)]+_0x4099a6(0x22d))),console['log'](_0x4099a6(0x218)+a29_0x120a03[_0x4099a6(0x1fa)](_0x4099a6(0x227))),console[_0x4099a6(0x24f)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5efcc9){const _0x447102=a29_0x1e25;if(_0x5efcc9['status']==='ok')return a29_0x120a03[_0x447102(0x247)](_0x447102(0x228));if(_0x5efcc9[_0x447102(0x224)]==='missing')return a29_0x120a03[_0x447102(0x1fa)](_0x447102(0x225));if(_0x5efcc9[_0x447102(0x224)]===_0x447102(0x240))return a29_0x120a03[_0x447102(0x241)](_0x447102(0x1f3));return a29_0x120a03['red'](_0x447102(0x21b)+(_0x5efcc9[_0x447102(0x207)]?':\x20'+_0x5efcc9['message']:''));}export const doctorDefinition={'service':a29_0x161508(0x231),'command':a29_0x161508(0x24c),'description':a29_0x161508(0x1f9),'risk':a29_0x161508(0x220),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x1a904a=a30_0x4caf;(function(_0x475f4a,_0x4cef67){const _0x2f8d98=a30_0x4caf,_0xfeffe5=_0x475f4a();while(!![]){try{const _0x2b6877=-parseInt(_0x2f8d98(0x10f))/0x1+-parseInt(_0x2f8d98(0x129))/0x2+-parseInt(_0x2f8d98(0x12c))/0x3*(-parseInt(_0x2f8d98(0x11a))/0x4)+-parseInt(_0x2f8d98(0x122))/0x5*(parseInt(_0x2f8d98(0x10d))/0x6)+parseInt(_0x2f8d98(0x12a))/0x7*(parseInt(_0x2f8d98(0x111))/0x8)+parseInt(_0x2f8d98(0x118))/0x9+-parseInt(_0x2f8d98(0x108))/0xa;if(_0x2b6877===_0x4cef67)break;else _0xfeffe5['push'](_0xfeffe5['shift']());}catch(_0x5dd1b3){_0xfeffe5['push'](_0xfeffe5['shift']());}}}(a30_0x3a3b,0x76c84));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':a30_0x1a904a(0x117),'required':!![],'description':a30_0x1a904a(0x11e)},FILEPATH_FLAG={'name':a30_0x1a904a(0x10c),'type':a30_0x1a904a(0x117),'required':!![],'description':a30_0x1a904a(0x12b)},DOWNLOAD_FLAG={'name':'download','type':a30_0x1a904a(0x127),'description':a30_0x1a904a(0x12d)},LONG_TERM_FLAG={'name':a30_0x1a904a(0x107),'type':a30_0x1a904a(0x127),'description':a30_0x1a904a(0x124)};function requireFilePath(_0x591aae){const _0x36905f=a30_0x1a904a,_0x3c3021=_0x591aae[_0x36905f(0x119)]();if(!_0x3c3021)throw CliErrors['validation'](_0x36905f(0x109));return _0x3c3021;}const fileUpload={'service':a30_0x1a904a(0x11f),'command':'upload','description':a30_0x1a904a(0x115),'risk':a30_0x1a904a(0x11b),'flags':[FILE_FLAG],async 'dryRun'(_0x50141d){const _0x54dc9=a30_0x1a904a,_0x2e8c12=requireRuntimeUploadFile(_0x50141d[_0x54dc9(0x10a)](_0x54dc9(0x11f)),_0x54dc9(0x116));return dryRun(_0x54dc9(0x11c),_0x54dc9(0x10e))[_0x54dc9(0x126)]({'appCode':_0x50141d[_0x54dc9(0x121)],'multipart':{'file':_0x2e8c12}})['description'](_0x54dc9(0x128)+_0x2e8c12[_0x54dc9(0x120)]+_0x54dc9(0x114)+_0x50141d[_0x54dc9(0x121)])[_0x54dc9(0x125)]();},async 'execute'(_0x857b3b){const _0xf57664=a30_0x1a904a,_0x41679e=requireRuntimeUploadFile(_0x857b3b[_0xf57664(0x10a)](_0xf57664(0x11f)),_0xf57664(0x116)),_0x4b25da=await uploadRuntimeFile(_0x857b3b[_0xf57664(0x121)],_0x41679e[_0xf57664(0x120)]);return{'ok':!![],'data':_0x4b25da,'message':_0x4b25da[_0xf57664(0x113)]?_0xf57664(0x10b)+_0x4b25da[_0xf57664(0x113)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0xf57664(0x112)};}},fileQueryUrl={'service':a30_0x1a904a(0x11f),'command':'query-url','description':a30_0x1a904a(0x11d),'risk':a30_0x1a904a(0x11b),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x134edf){const _0x5a68cd=a30_0x1a904a,_0x2f258c=requireFilePath(_0x134edf[_0x5a68cd(0x10a)](_0x5a68cd(0x10c))),_0x25bf77=await queryRuntimeFileUrl(_0x2f258c,{'download':_0x134edf[_0x5a68cd(0x123)](_0x5a68cd(0x110)),'longTerm':_0x134edf[_0x5a68cd(0x123)](_0x5a68cd(0x107))});return{'ok':!![],'data':_0x25bf77};}};function a30_0x4caf(_0xe39064,_0x5b95c5){_0xe39064=_0xe39064-0x107;const _0x3a3b66=a30_0x3a3b();let _0x4caf59=_0x3a3b66[_0xe39064];return _0x4caf59;}function a30_0x3a3b(){const _0x5272bc=['str','Uploaded\x20file:\x20','filepath','1176102xseAJF','/client/uploadFile','137999PDfwTi','download','1248ymCtHq','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filePath','\x20to\x20runtime\x20app\x20','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','File','string','6857910lTKQAh','trim','20456FbcERa','read','POST','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','path','appCode','5SylJWB','bool','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','build','body','boolean','Preview:\x20upload\x20','107286eYjtpB','37499RURAmg','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','111yWGbKJ','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','long-term','9127090SaBZGP','filePath\x20is\x20required.'];a30_0x3a3b=function(){return _0x5272bc;};return a30_0x3a3b();}export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x2e7c67=a30_0x189b;(function(_0x2b2a07,_0xbbe963){const _0x335f36=a30_0x189b,_0x48c5a0=_0x2b2a07();while(!![]){try{const _0x4db30e=parseInt(_0x335f36(0x1c9))/0x1*(-parseInt(_0x335f36(0x1cc))/0x2)+parseInt(_0x335f36(0x1c1))/0x3+parseInt(_0x335f36(0x1b6))/0x4*(-parseInt(_0x335f36(0x1be))/0x5)+-parseInt(_0x335f36(0x1c8))/0x6+-parseInt(_0x335f36(0x1b2))/0x7+-parseInt(_0x335f36(0x1a5))/0x8+-parseInt(_0x335f36(0x1ab))/0x9*(-parseInt(_0x335f36(0x1bd))/0xa);if(_0x4db30e===_0xbbe963)break;else _0x48c5a0['push'](_0x48c5a0['shift']());}catch(_0xfcf269){_0x48c5a0['push'](_0x48c5a0['shift']());}}}(a30_0x56bc,0xa17bc));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x56bc(){const _0x1f5f52=['Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','2219232PcapGT','Uploaded\x20file:\x20','build','download','bool','body','filepath','926028TwPQep','4102YLZVJA','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','\x20to\x20runtime\x20app\x20','42EUdsOx','4957848BXSOAe','trim','/client/uploadFile','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Preview:\x20upload\x20','File','19375263URlpTZ','appCode','query-url','file','filePath','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','long-term','8114414BJrDVD','upload','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','filePath\x20is\x20required.','2804ZpasIH','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','read','description','string','path','validation','10PUXshe','1510qMbVQY','boolean'];a30_0x56bc=function(){return _0x1f5f52;};return a30_0x56bc();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x2e7c67(0x1ae),'type':'string','required':!![],'description':a30_0x2e7c67(0x1a8)},FILEPATH_FLAG={'name':a30_0x2e7c67(0x1c7),'type':a30_0x2e7c67(0x1ba),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x2e7c67(0x1c4),'type':a30_0x2e7c67(0x1bf),'description':a30_0x2e7c67(0x1b4)},LONG_TERM_FLAG={'name':a30_0x2e7c67(0x1b1),'type':a30_0x2e7c67(0x1bf),'description':a30_0x2e7c67(0x1b7)};function requireFilePath(_0x4c15b2){const _0x5b6755=a30_0x2e7c67,_0x27c336=_0x4c15b2[_0x5b6755(0x1a6)]();if(!_0x27c336)throw CliErrors[_0x5b6755(0x1bc)](_0x5b6755(0x1b5));return _0x27c336;}function a30_0x189b(_0x5cc890,_0x1dd57e){_0x5cc890=_0x5cc890-0x1a5;const _0x56bc76=a30_0x56bc();let _0x189bea=_0x56bc76[_0x5cc890];return _0x189bea;}const fileUpload={'service':'file','command':a30_0x2e7c67(0x1b3),'description':a30_0x2e7c67(0x1b0),'risk':a30_0x2e7c67(0x1b8),'flags':[FILE_FLAG],async 'dryRun'(_0x20b40e){const _0x5b2f56=a30_0x2e7c67,_0x19dba1=requireRuntimeUploadFile(_0x20b40e['str'](_0x5b2f56(0x1ae)),'File');return dryRun('POST',_0x5b2f56(0x1a7))[_0x5b2f56(0x1c6)]({'appCode':_0x20b40e[_0x5b2f56(0x1ac)],'multipart':{'file':_0x19dba1}})[_0x5b2f56(0x1b9)](_0x5b2f56(0x1a9)+_0x19dba1[_0x5b2f56(0x1bb)]+_0x5b2f56(0x1cb)+_0x20b40e[_0x5b2f56(0x1ac)])[_0x5b2f56(0x1c3)]();},async 'execute'(_0x14d69c){const _0x1dfafe=a30_0x2e7c67,_0x3cdfb1=requireRuntimeUploadFile(_0x14d69c['str'](_0x1dfafe(0x1ae)),_0x1dfafe(0x1aa)),_0x46d4f4=await uploadRuntimeFile(_0x14d69c[_0x1dfafe(0x1ac)],_0x3cdfb1[_0x1dfafe(0x1bb)]);return{'ok':!![],'data':_0x46d4f4,'message':_0x46d4f4[_0x1dfafe(0x1af)]?_0x1dfafe(0x1c2)+_0x46d4f4[_0x1dfafe(0x1af)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x1dfafe(0x1ca)};}},fileQueryUrl={'service':'file','command':a30_0x2e7c67(0x1ad),'description':a30_0x2e7c67(0x1c0),'risk':a30_0x2e7c67(0x1b8),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x17c1ca){const _0x42fa2f=a30_0x2e7c67,_0x1d0ffb=requireFilePath(_0x17c1ca['str']('filepath')),_0x24de20=await queryRuntimeFileUrl(_0x1d0ffb,{'download':_0x17c1ca[_0x42fa2f(0x1c5)]('download'),'longTerm':_0x17c1ca[_0x42fa2f(0x1c5)]('long-term')});return{'ok':!![],'data':_0x24de20};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x177992=a31_0xcf69;(function(_0x3eada9,_0x4c3d88){const _0x52d0c9=a31_0xcf69,_0x5ba5e7=_0x3eada9();while(!![]){try{const _0x447d46=parseInt(_0x52d0c9(0x14b))/0x1+-parseInt(_0x52d0c9(0x12e))/0x2*(parseInt(_0x52d0c9(0x133))/0x3)+-parseInt(_0x52d0c9(0x14a))/0x4*(-parseInt(_0x52d0c9(0x152))/0x5)+-parseInt(_0x52d0c9(0x141))/0x6*(parseInt(_0x52d0c9(0x134))/0x7)+-parseInt(_0x52d0c9(0x136))/0x8*(-parseInt(_0x52d0c9(0x14c))/0x9)+parseInt(_0x52d0c9(0x131))/0xa*(-parseInt(_0x52d0c9(0x13f))/0xb)+parseInt(_0x52d0c9(0x148))/0xc;if(_0x447d46===_0x4c3d88)break;else _0x5ba5e7['push'](_0x5ba5e7['shift']());}catch(_0x53783c){_0x5ba5e7['push'](_0x5ba5e7['shift']());}}}(a31_0xc50d,0x78a20));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';import{PRODUCT_CONFIG}from'../constant/product.js';function a31_0xcf69(_0x310617,_0x435687){_0x310617=_0x310617-0x12b;const _0xc50d83=a31_0xc50d();let _0xcf6982=_0xc50d83[_0x310617];return _0xcf6982;}export const appImportFlagDefs=[{'name':a31_0x177992(0x130),'type':a31_0x177992(0x146),'description':a31_0x177992(0x137),'required':!![]},{'name':a31_0x177992(0x14e),'type':a31_0x177992(0x146),'description':a31_0x177992(0x12d)},{'name':a31_0x177992(0x142),'type':a31_0x177992(0x146),'description':a31_0x177992(0x140),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x177992(0x14d),'type':a31_0x177992(0x156),'description':a31_0x177992(0x153)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x177992(0x156),'description':a31_0x177992(0x13e),'default':![]}];export async function runAppImport(_0x2144fd){const _0x5a09aa=a31_0x177992,_0x517a3a=_0x2144fd['global']?_0x5a09aa(0x14d):'project',_0xae1579=resolveWriteConfigPath(_0x517a3a);await runFromImport(_0x2144fd,_0xae1579);}async function runFromImport(_0x5afcb4,_0xae273b){const _0x124c00=a31_0x177992,_0x125e63=resolveFilePath(_0x5afcb4[_0x124c00(0x130)]);if(!existsSync(_0x125e63))throw CliErrors[_0x124c00(0x145)]('Source\x20file\x20not\x20found:\x20'+_0x125e63);const _0x4033e5=readSourceFile(_0x125e63),_0x21aea4=convertToRuntimeConfig(_0x4033e5);_0x5afcb4[_0x124c00(0x14e)]&&(_0x21aea4[_0x124c00(0x14e)]=String(_0x5afcb4[_0x124c00(0x14e)]));_0x5afcb4[_0x124c00(0x142)]&&(_0x21aea4[_0x124c00(0x142)]=resolveImportEnv(_0x5afcb4));if(!_0x21aea4[_0x124c00(0x14e)])throw CliErrors['validation'](_0x124c00(0x13c),_0x124c00(0x149));await writeImportConfig(_0xae273b,_0x21aea4,_0x5afcb4),console[_0x124c00(0x13b)](_0x124c00(0x13d)+_0x125e63),console[_0x124c00(0x13b)](_0x124c00(0x14f)+_0xae273b),console[_0x124c00(0x13b)]('\x20\x20appcode:\x20'+_0x21aea4['appcode']);if(_0x21aea4[_0x124c00(0x12f)])console['log'](_0x124c00(0x139)+_0x21aea4[_0x124c00(0x12f)]);}function a31_0xc50d(){const _0x1f07c6=['255871oooHRS','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','6576lHTbjD','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','utf8','\x20\x20default:\x20','includes','log','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Imported\x20from\x20','Skip\x20confirmation\x20when\x20overwriting','6562402mKJBLa','Override\x20imported\x20default\x20env','102KnJZtp','env','entries','parse','validation','string','yes','14932920ltzFAc','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`.','9796TLfdAz','418465DPPJiT','5499juxFzg','global','appcode','\x20\x20config:\x20\x20','message','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','15xbViHv','Write\x20to\x20global\x20(~/','apps','cwd','boolean','\x22.\x20Allowed:\x20','Failed\x20to\x20parse\x20source\x20file:\x20','Override\x20imported\x20default\x20appcode','2iPVwzM','defaultApp','file','10cyhYAT','riskLevel','1381107mOoVdr'];a31_0xc50d=function(){return _0x1f07c6;};return a31_0xc50d();}function convertToRuntimeConfig(_0x54194d){const _0x2a6f80=a31_0x177992;if(_0x54194d[_0x2a6f80(0x154)]&&typeof _0x54194d[_0x2a6f80(0x154)]==='object')throw CliErrors[_0x2a6f80(0x145)](_0x2a6f80(0x151),_0x2a6f80(0x135));const _0xc0757a={};for(const _0x398861 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x54194d[_0x398861]!==undefined&&(_0xc0757a[_0x398861]=_0x54194d[_0x398861]);}return!_0xc0757a[_0x2a6f80(0x132)]&&(_0xc0757a['riskLevel']=DEFAULT_CONFIG_VALUES[_0x2a6f80(0x132)]),_0xc0757a;}async function writeImportConfig(_0x59d349,_0x209121,_0x144e31){const _0x41995b=a31_0x177992;let _0x2d16c5={};existsSync(_0x59d349)&&!_0x144e31[_0x41995b(0x147)]&&(_0x2d16c5=readConfigFile(_0x59d349));for(const [_0x2301b5,_0x58d769]of Object[_0x41995b(0x143)](_0x209121)){_0x58d769!==undefined&&(_0x2d16c5[_0x2301b5]=_0x58d769);}if(_0x2d16c5['app'])delete _0x2d16c5['app'];writeConfigFile(_0x59d349,_0x2d16c5);}function resolveFilePath(_0x372d45){const _0x2514c2=a31_0x177992;return isAbsolute(_0x372d45)?_0x372d45:resolve(process[_0x2514c2(0x155)](),_0x372d45);}function readSourceFile(_0x263cf2){const _0x5b13e2=a31_0x177992;try{const _0x2bfda3=readFileSync(_0x263cf2,{'encoding':_0x5b13e2(0x138)});return JSON[_0x5b13e2(0x144)](_0x2bfda3);}catch(_0x1cb71){throw CliErrors[_0x5b13e2(0x145)](_0x5b13e2(0x12c)+_0x1cb71[_0x5b13e2(0x150)]);}}function resolveImportEnv(_0x52d741){const _0x1810b3=a31_0x177992,_0x27141e=_0x52d741['env'];if(_0x27141e===undefined||_0x27141e==='')return DEFAULT_CONFIG_VALUES[_0x1810b3(0x142)];if(!RUNTIME_ENV_VALUES[_0x1810b3(0x13a)](_0x27141e))throw CliErrors[_0x1810b3(0x145)]('Invalid\x20env\x20\x22'+_0x27141e+_0x1810b3(0x12b)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x27141e;}
1
+ const a31_0x130419=a31_0x39a2;(function(_0x5efe1a,_0xe49edf){const _0x415900=a31_0x39a2,_0x5ede52=_0x5efe1a();while(!![]){try{const _0x321ddb=-parseInt(_0x415900(0x10b))/0x1*(-parseInt(_0x415900(0x115))/0x2)+parseInt(_0x415900(0x132))/0x3+-parseInt(_0x415900(0x127))/0x4+parseInt(_0x415900(0x134))/0x5*(-parseInt(_0x415900(0x119))/0x6)+parseInt(_0x415900(0x109))/0x7+parseInt(_0x415900(0x10c))/0x8*(-parseInt(_0x415900(0x120))/0x9)+-parseInt(_0x415900(0x114))/0xa;if(_0x321ddb===_0xe49edf)break;else _0x5ede52['push'](_0x5ede52['shift']());}catch(_0x543773){_0x5ede52['push'](_0x5ede52['shift']());}}}(a31_0x213d,0x9c561));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';function a31_0x39a2(_0x5d1df7,_0x27fa5d){_0x5d1df7=_0x5d1df7-0x109;const _0x213d49=a31_0x213d();let _0x39a257=_0x213d49[_0x5d1df7];return _0x39a257;}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':a31_0x130419(0x112),'type':a31_0x130419(0x117),'description':a31_0x130419(0x131),'required':!![]},{'name':a31_0x130419(0x122),'type':a31_0x130419(0x117),'description':a31_0x130419(0x12e)},{'name':a31_0x130419(0x10f),'type':a31_0x130419(0x117),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x130419(0x11d),'type':'boolean','description':a31_0x130419(0x113)+PRODUCT_CONFIG['newConfigFileName']+a31_0x130419(0x124),'default':![]},{'name':'yes','type':'boolean','description':a31_0x130419(0x12b),'default':![]}];export async function runAppImport(_0x5aff23){const _0x42e50e=a31_0x130419,_0x235b3c=_0x5aff23[_0x42e50e(0x11d)]?_0x42e50e(0x11d):_0x42e50e(0x11f),_0x4e4ce3=resolveWriteConfigPath(_0x235b3c);await runFromImport(_0x5aff23,_0x4e4ce3);}async function runFromImport(_0x556360,_0x5a28be){const _0x5c4bee=a31_0x130419,_0x525ec5=resolveFilePath(_0x556360[_0x5c4bee(0x112)]);if(!existsSync(_0x525ec5))throw CliErrors[_0x5c4bee(0x125)](_0x5c4bee(0x121)+_0x525ec5);const _0x56bf47=readSourceFile(_0x525ec5),_0x4defa7=convertToRuntimeConfig(_0x56bf47);_0x556360[_0x5c4bee(0x122)]&&(_0x4defa7['appcode']=String(_0x556360[_0x5c4bee(0x122)]));_0x556360[_0x5c4bee(0x10f)]&&(_0x4defa7['env']=resolveImportEnv(_0x556360));if(!_0x4defa7[_0x5c4bee(0x122)])throw CliErrors['validation'](_0x5c4bee(0x111),_0x5c4bee(0x12a));await writeImportConfig(_0x5a28be,_0x4defa7,_0x556360),console[_0x5c4bee(0x10a)](_0x5c4bee(0x11a)+_0x525ec5),console['log'](_0x5c4bee(0x11b)+_0x5a28be),console[_0x5c4bee(0x10a)](_0x5c4bee(0x126)+_0x4defa7[_0x5c4bee(0x122)]);if(_0x4defa7[_0x5c4bee(0x12f)])console[_0x5c4bee(0x10a)]('\x20\x20default:\x20'+_0x4defa7['defaultApp']);}function a31_0x213d(){const _0x1a6532=['Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','file','Write\x20to\x20global\x20(~/','3243100SEwWRC','124082CHfrVF','entries','string','includes','2910NREtKK','Imported\x20from\x20','\x20\x20config:\x20\x20','utf8','global','Invalid\x20env\x20\x22','project','4597704MReSNM','Source\x20file\x20not\x20found:\x20','appcode','message',')\x20instead\x20of\x20project','validation','\x20\x20appcode:\x20','2302256rXsgTm','join','riskLevel','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`.','Skip\x20confirmation\x20when\x20overwriting','apps','object','Override\x20imported\x20default\x20appcode','defaultApp','parse','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','885918EBDccc','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','905uZMufj','4653481Nbldau','log','19aOhIUG','8ydSSXB','app','Failed\x20to\x20parse\x20source\x20file:\x20','env','yes'];a31_0x213d=function(){return _0x1a6532;};return a31_0x213d();}function convertToRuntimeConfig(_0x5ab2c0){const _0x36d1cc=a31_0x130419;if(_0x5ab2c0[_0x36d1cc(0x12c)]&&typeof _0x5ab2c0[_0x36d1cc(0x12c)]===_0x36d1cc(0x12d))throw CliErrors[_0x36d1cc(0x125)](_0x36d1cc(0x133),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0xeee509={};for(const _0x438c71 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5ab2c0[_0x438c71]!==undefined&&(_0xeee509[_0x438c71]=_0x5ab2c0[_0x438c71]);}return!_0xeee509[_0x36d1cc(0x129)]&&(_0xeee509['riskLevel']=DEFAULT_CONFIG_VALUES[_0x36d1cc(0x129)]),_0xeee509;}async function writeImportConfig(_0x5e55a8,_0x3da8d0,_0x4cdcae){const _0x25106d=a31_0x130419;let _0x5df454={};existsSync(_0x5e55a8)&&!_0x4cdcae[_0x25106d(0x110)]&&(_0x5df454=readConfigFile(_0x5e55a8));for(const [_0xdd5627,_0x27e7dc]of Object[_0x25106d(0x116)](_0x3da8d0)){_0x27e7dc!==undefined&&(_0x5df454[_0xdd5627]=_0x27e7dc);}if(_0x5df454[_0x25106d(0x10d)])delete _0x5df454[_0x25106d(0x10d)];writeConfigFile(_0x5e55a8,_0x5df454);}function resolveFilePath(_0x4db61b){return isAbsolute(_0x4db61b)?_0x4db61b:resolve(process['cwd'](),_0x4db61b);}function readSourceFile(_0x1f044d){const _0x365c07=a31_0x130419;try{const _0x3c5660=readFileSync(_0x1f044d,{'encoding':_0x365c07(0x11c)});return JSON[_0x365c07(0x130)](_0x3c5660);}catch(_0x164df6){throw CliErrors[_0x365c07(0x125)](_0x365c07(0x10e)+_0x164df6[_0x365c07(0x123)]);}}function resolveImportEnv(_0x57517f){const _0x5ed09b=a31_0x130419,_0x426642=_0x57517f[_0x5ed09b(0x10f)];if(_0x426642===undefined||_0x426642==='')return DEFAULT_CONFIG_VALUES[_0x5ed09b(0x10f)];if(!RUNTIME_ENV_VALUES[_0x5ed09b(0x118)](_0x426642))throw CliErrors[_0x5ed09b(0x125)](_0x5ed09b(0x11e)+_0x426642+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x5ed09b(0x128)](',\x20'));return _0x426642;}
@@ -1 +1 @@
1
- const a32_0x3bf69c=a32_0x359e;(function(_0x5a8a61,_0x4a2924){const _0x1e6d67=a32_0x359e,_0x3b9059=_0x5a8a61();while(!![]){try{const _0x9eddd1=-parseInt(_0x1e6d67(0xea))/0x1+parseInt(_0x1e6d67(0xe9))/0x2+-parseInt(_0x1e6d67(0x115))/0x3+parseInt(_0x1e6d67(0x123))/0x4*(parseInt(_0x1e6d67(0x112))/0x5)+parseInt(_0x1e6d67(0xe4))/0x6+-parseInt(_0x1e6d67(0xee))/0x7+-parseInt(_0x1e6d67(0x120))/0x8*(-parseInt(_0x1e6d67(0xfc))/0x9);if(_0x9eddd1===_0x4a2924)break;else _0x3b9059['push'](_0x3b9059['shift']());}catch(_0x123c98){_0x3b9059['push'](_0x3b9059['shift']());}}}(a32_0x51a2,0x8b38c));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a32_0x359e(_0x58b56b,_0x30ccff){_0x58b56b=_0x58b56b-0xe2;const _0x51a222=a32_0x51a2();let _0x359e1d=_0x51a222[_0x58b56b];return _0x359e1d;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a32_0x51a2(){const _0x4726d2=['str','updateTime','create','Search\x20query\x20is\x20required.','trim','detail','/client/knowledge-base/personal/','appCode','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','content','search','flag','version','15174xRSMJL','File\x20not\x20found:\x20','file','utf8','Created\x20KB\x20entry\x20','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','title','ragErrorMessage','length','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Personal\x20knowledge-base\x20entry\x20ID','Updated\x20KB\x20entry\x20','Override\x20the\x20existing\x20entry\x20title','/update','Personal\x20knowledge-base\x20entry\x20title','/client/knowledge-base/personal/create','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','topk','verbose','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','POST','185FjIuOn','--topk\x20must\x20be\x20a\x20positive\x20number.','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','2627493QDAtgn','validation','score','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','根据本地文件创建个人知识库条目','write','map','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','userId','scope','根据本地文件更新个人知识库条目','7192ybkUof','string','description','1956BPtNGC','num','query','list','body','docId','3241716UVlgsi','read','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','File\x20path\x20is\x20required.','build','1588638JfhSJW','494515VVIZrT','isFinite','number','ragStatus','6494698gMVRpJ'];a32_0x51a2=function(){return _0x4726d2;};return a32_0x51a2();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x3bf69c(0x102),'type':a32_0x3bf69c(0x121),'required':!![],'description':a32_0x3bf69c(0x10a)},FILE_FLAG={'name':a32_0x3bf69c(0xfe),'type':a32_0x3bf69c(0x121),'required':!![],'description':a32_0x3bf69c(0x11c)},QUERY_FLAG={'name':'query','type':a32_0x3bf69c(0x121),'required':!![],'description':a32_0x3bf69c(0x10f)},TOPK_FLAG={'name':a32_0x3bf69c(0x10d),'type':a32_0x3bf69c(0xec),'description':a32_0x3bf69c(0x110)};function readKnowledgeFile(_0x216cef){const _0x683cdc=a32_0x3bf69c;if(!_0x216cef)throw CliErrors[_0x683cdc(0x116)](_0x683cdc(0xe7));if(!existsSync(_0x216cef))throw CliErrors[_0x683cdc(0x116)](_0x683cdc(0xfd)+_0x216cef);if(!statSync(_0x216cef)['isFile']())throw CliErrors[_0x683cdc(0x116)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x216cef);return readFileSync(_0x216cef,_0x683cdc(0xff));}function summarizePersonalItem(_0x398fd9){const _0x53931c=a32_0x3bf69c;return{'id':_0x398fd9['id'],'title':_0x398fd9[_0x53931c(0x102)],'version':_0x398fd9[_0x53931c(0xfb)],'ragStatus':_0x398fd9['ragStatus'],'ragErrorMessage':_0x398fd9[_0x53931c(0x103)],'updateTime':_0x398fd9['updateTime']};}function detailPersonalItem(_0x3a68d6){const _0x2c4224=a32_0x3bf69c;return{'id':_0x3a68d6['id'],'appCode':_0x3a68d6['appCode'],'scope':_0x3a68d6['scope'],'userId':_0x3a68d6[_0x2c4224(0x11d)],'title':_0x3a68d6[_0x2c4224(0x102)],'content':_0x3a68d6[_0x2c4224(0xf8)]??'','version':_0x3a68d6[_0x2c4224(0xfb)],'ragStatus':_0x3a68d6[_0x2c4224(0xed)],'ragErrorMessage':_0x3a68d6[_0x2c4224(0x103)],'createTime':_0x3a68d6['createTime'],'updateTime':_0x3a68d6[_0x2c4224(0xf0)]};}function summarizeSearchHit(_0x6bf788){const _0x391fa9=a32_0x3bf69c;return{'scope':_0x6bf788[_0x391fa9(0x11e)],'title':_0x6bf788[_0x391fa9(0x102)],'docId':_0x6bf788[_0x391fa9(0xe3)],'score':_0x6bf788[_0x391fa9(0x117)],'weightedScore':_0x6bf788['weightedScore'],'content':_0x6bf788['content'],'metadata':_0x6bf788['metadata']};}function readTopK(_0x348e3c){const _0x52737b=a32_0x3bf69c,_0x58f74b=_0x348e3c[_0x52737b(0xfa)](_0x52737b(0x10d));if(_0x58f74b===undefined||_0x58f74b===null||_0x58f74b==='')return undefined;const _0x2e1bd2=_0x348e3c[_0x52737b(0x124)](_0x52737b(0x10d));if(!Number[_0x52737b(0xeb)](_0x2e1bd2)||_0x2e1bd2<0x1)throw CliErrors[_0x52737b(0x116)](_0x52737b(0x113));return _0x2e1bd2;}const kbList={'service':'kb','command':a32_0x3bf69c(0x126),'description':a32_0x3bf69c(0x101),'risk':a32_0x3bf69c(0xe5),'flags':[VERBOSE_FLAG],async 'execute'(_0x1fe18c){const _0x45e5df=a32_0x3bf69c,_0x125ad5=await listPersonalKnowledgeBaseItems(_0x1fe18c[_0x45e5df(0xf6)]);if(_0x1fe18c['bool'](_0x45e5df(0x10e)))return{'ok':!![],'data':{'total':_0x125ad5[_0x45e5df(0x104)],'items':_0x125ad5}};return{'ok':!![],'data':{'total':_0x125ad5[_0x45e5df(0x104)],'items':_0x125ad5[_0x45e5df(0x11b)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x3bf69c(0xf4),'description':a32_0x3bf69c(0x114),'risk':a32_0x3bf69c(0xe5),'flags':[{...ID_FLAG,'description':a32_0x3bf69c(0x106)}],async 'execute'(_0x1733a3){const _0x4e8997=a32_0x3bf69c,_0x1c3fec=await getPersonalKnowledgeBaseItem(_0x1733a3['num']('id'),_0x1733a3[_0x4e8997(0xf6)]);return{'ok':!![],'data':detailPersonalItem(_0x1c3fec)};}},kbCreate={'service':'kb','command':a32_0x3bf69c(0xf1),'description':a32_0x3bf69c(0x119),'risk':a32_0x3bf69c(0x11a),'confirmationDescription':a32_0x3bf69c(0x118),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x270464){const _0x248d4a=a32_0x3bf69c,_0x1fda0a=_0x270464[_0x248d4a(0xef)](_0x248d4a(0x102)),_0x578355=readKnowledgeFile(_0x270464[_0x248d4a(0xef)]('file')),_0x5cf7a9=await createPersonalKnowledgeBaseItem(_0x270464[_0x248d4a(0xf6)],{'title':_0x1fda0a,'content':_0x578355});return{'ok':!![],'data':summarizePersonalItem(_0x5cf7a9),'message':_0x248d4a(0x100)+_0x5cf7a9['id']+'\x20('+_0x5cf7a9[_0x248d4a(0x102)]+')'};},async 'dryRun'(_0x28ed03){const _0x20e98e=a32_0x3bf69c,_0x4eb596=_0x28ed03[_0x20e98e(0xef)](_0x20e98e(0x102)),_0x3249c8=readKnowledgeFile(_0x28ed03[_0x20e98e(0xef)](_0x20e98e(0xfe)));return dryRun('POST',_0x20e98e(0x10b))[_0x20e98e(0xe2)]({'appCode':_0x28ed03[_0x20e98e(0xf6)],'title':_0x4eb596,'content':_0x3249c8})['description'](_0x20e98e(0xe6)+_0x4eb596+'\x22')[_0x20e98e(0xe8)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x3bf69c(0x11f),'risk':a32_0x3bf69c(0x11a),'confirmationDescription':a32_0x3bf69c(0xf7),'flags':[{...ID_FLAG,'description':a32_0x3bf69c(0x106)},{...TITLE_FLAG,'required':![],'description':a32_0x3bf69c(0x108)},FILE_FLAG],async 'execute'(_0x4d748b){const _0x5b66e5=a32_0x3bf69c,_0x48fdf3=_0x4d748b['num']('id'),_0x4efd0b=readKnowledgeFile(_0x4d748b[_0x5b66e5(0xef)]('file')),_0x4f1337=_0x4d748b['str']('title')||(await getPersonalKnowledgeBaseItem(_0x48fdf3,_0x4d748b[_0x5b66e5(0xf6)]))[_0x5b66e5(0x102)],_0x1d82a1=await updatePersonalKnowledgeBaseItem(_0x48fdf3,_0x4d748b['appCode'],{'title':_0x4f1337,'content':_0x4efd0b});return{'ok':!![],'data':summarizePersonalItem(_0x1d82a1),'message':_0x5b66e5(0x107)+_0x1d82a1['id']+'\x20('+_0x1d82a1[_0x5b66e5(0x102)]+')'};},async 'dryRun'(_0xeb9cd8){const _0x10b453=a32_0x3bf69c,_0x11cbfa=_0xeb9cd8[_0x10b453(0x124)]('id'),_0x53cac7=readKnowledgeFile(_0xeb9cd8[_0x10b453(0xef)](_0x10b453(0xfe))),_0x136585=_0xeb9cd8[_0x10b453(0xef)](_0x10b453(0x102))||(await getPersonalKnowledgeBaseItem(_0x11cbfa,_0xeb9cd8['appCode']))[_0x10b453(0x102)];return dryRun(_0x10b453(0x111),_0x10b453(0xf5)+_0x11cbfa+_0x10b453(0x109))[_0x10b453(0xe2)]({'appCode':_0xeb9cd8[_0x10b453(0xf6)],'title':_0x136585,'content':_0x53cac7})[_0x10b453(0x122)](_0x10b453(0x105)+_0x11cbfa)['build']();}},kbSearch={'service':'kb','command':a32_0x3bf69c(0xf9),'description':a32_0x3bf69c(0x10c),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x5c69df){const _0x5de772=a32_0x3bf69c;if(!_0x5c69df['str'](_0x5de772(0x125))[_0x5de772(0xf3)]())throw CliErrors['validation'](_0x5de772(0xf2));readTopK(_0x5c69df);},async 'execute'(_0xed3150){const _0x350de6=a32_0x3bf69c,_0x2bb656=_0xed3150[_0x350de6(0xef)]('query')['trim'](),_0x4bd059=readTopK(_0xed3150),_0x268a5b=await searchKnowledgeBase(_0xed3150['appCode'],{'query':_0x2bb656,'topK':_0x4bd059});return{'ok':!![],'data':{'total':_0x268a5b[_0x350de6(0x104)],'hits':_0x268a5b[_0x350de6(0x11b)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x1f63cd=a32_0x4d08;(function(_0x2aeb87,_0xc4a391){const _0x2a8a1b=a32_0x4d08,_0x1634ae=_0x2aeb87();while(!![]){try{const _0x2d8f46=parseInt(_0x2a8a1b(0x1e0))/0x1*(parseInt(_0x2a8a1b(0x1fe))/0x2)+-parseInt(_0x2a8a1b(0x1df))/0x3+parseInt(_0x2a8a1b(0x1e2))/0x4*(parseInt(_0x2a8a1b(0x1cc))/0x5)+-parseInt(_0x2a8a1b(0x1f9))/0x6+parseInt(_0x2a8a1b(0x20a))/0x7+-parseInt(_0x2a8a1b(0x206))/0x8+parseInt(_0x2a8a1b(0x1f3))/0x9;if(_0x2d8f46===_0xc4a391)break;else _0x1634ae['push'](_0x1634ae['shift']());}catch(_0x5e06f6){_0x1634ae['push'](_0x1634ae['shift']());}}}(a32_0x2d36,0x96597));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x2d36(){const _0x2586ae=['metadata','num','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','3099264TWOJyP','number','list','bool','7330050xGnVgj','description','File\x20not\x20found:\x20','5uUFNIs','map','--topk\x20must\x20be\x20a\x20positive\x20number.','verbose','create','File\x20is\x20not\x20a\x20regular\x20file:\x20','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','Search\x20query\x20is\x20required.','Updated\x20KB\x20entry\x20','updateTime','title','POST','query','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','validation','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','trim','Personal\x20knowledge-base\x20entry\x20title','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','3286908FKkZdn','63aVEOQG','File\x20path\x20is\x20required.','3601792zKkhUy','scope','Created\x20KB\x20entry\x20','score','根据本地文件创建个人知识库条目','flag','search','Personal\x20knowledge-base\x20entry\x20ID','content','string','ragStatus','body','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','isFinite','read','file','createTime','6379191YTeJUL','isFile','str','/update','/client/knowledge-base/personal/','length','3648666BIRSgt','topk','docId','appCode','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','1606SNKpYZ','build','ragErrorMessage','version','write'];a32_0x2d36=function(){return _0x2586ae;};return a32_0x2d36();}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_0x1f63cd(0x1d6),'type':a32_0x1f63cd(0x1eb),'required':!![],'description':a32_0x1f63cd(0x1dd)},FILE_FLAG={'name':a32_0x1f63cd(0x1f1),'type':a32_0x1f63cd(0x1eb),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x1f63cd(0x1d8),'type':a32_0x1f63cd(0x1eb),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x1f63cd(0x1fa),'type':a32_0x1f63cd(0x207),'description':a32_0x1f63cd(0x1ee)};function readKnowledgeFile(_0x4f9030){const _0x2b3dfa=a32_0x1f63cd;if(!_0x4f9030)throw CliErrors[_0x2b3dfa(0x1da)](_0x2b3dfa(0x1e1));if(!existsSync(_0x4f9030))throw CliErrors['validation'](_0x2b3dfa(0x1cb)+_0x4f9030);if(!statSync(_0x4f9030)[_0x2b3dfa(0x1f4)]())throw CliErrors[_0x2b3dfa(0x1da)](_0x2b3dfa(0x1d1)+_0x4f9030);return readFileSync(_0x4f9030,'utf8');}function summarizePersonalItem(_0x583273){const _0x522185=a32_0x1f63cd;return{'id':_0x583273['id'],'title':_0x583273[_0x522185(0x1d6)],'version':_0x583273[_0x522185(0x201)],'ragStatus':_0x583273[_0x522185(0x1ec)],'ragErrorMessage':_0x583273[_0x522185(0x200)],'updateTime':_0x583273[_0x522185(0x1d5)]};}function detailPersonalItem(_0x3b760a){const _0x1d8f85=a32_0x1f63cd;return{'id':_0x3b760a['id'],'appCode':_0x3b760a[_0x1d8f85(0x1fc)],'scope':_0x3b760a[_0x1d8f85(0x1e3)],'userId':_0x3b760a['userId'],'title':_0x3b760a[_0x1d8f85(0x1d6)],'content':_0x3b760a[_0x1d8f85(0x1ea)]??'','version':_0x3b760a[_0x1d8f85(0x201)],'ragStatus':_0x3b760a[_0x1d8f85(0x1ec)],'ragErrorMessage':_0x3b760a[_0x1d8f85(0x200)],'createTime':_0x3b760a[_0x1d8f85(0x1f2)],'updateTime':_0x3b760a[_0x1d8f85(0x1d5)]};}function summarizeSearchHit(_0x289d2d){const _0x117c26=a32_0x1f63cd;return{'scope':_0x289d2d[_0x117c26(0x1e3)],'title':_0x289d2d['title'],'docId':_0x289d2d[_0x117c26(0x1fb)],'score':_0x289d2d[_0x117c26(0x1e5)],'weightedScore':_0x289d2d['weightedScore'],'content':_0x289d2d[_0x117c26(0x1ea)],'metadata':_0x289d2d[_0x117c26(0x203)]};}function a32_0x4d08(_0x4af459,_0x83d0e4){_0x4af459=_0x4af459-0x1ca;const _0x2d36eb=a32_0x2d36();let _0x4d086b=_0x2d36eb[_0x4af459];return _0x4d086b;}function readTopK(_0x5d77af){const _0x449872=a32_0x1f63cd,_0x14dfee=_0x5d77af[_0x449872(0x1e7)](_0x449872(0x1fa));if(_0x14dfee===undefined||_0x14dfee===null||_0x14dfee==='')return undefined;const _0x325f13=_0x5d77af[_0x449872(0x204)](_0x449872(0x1fa));if(!Number[_0x449872(0x1ef)](_0x325f13)||_0x325f13<0x1)throw CliErrors[_0x449872(0x1da)](_0x449872(0x1ce));return _0x325f13;}const kbList={'service':'kb','command':a32_0x1f63cd(0x208),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x1f63cd(0x1f0),'flags':[VERBOSE_FLAG],async 'execute'(_0xf675ea){const _0x52286e=a32_0x1f63cd,_0x3e6e0c=await listPersonalKnowledgeBaseItems(_0xf675ea[_0x52286e(0x1fc)]);if(_0xf675ea[_0x52286e(0x209)](_0x52286e(0x1cf)))return{'ok':!![],'data':{'total':_0x3e6e0c[_0x52286e(0x1f8)],'items':_0x3e6e0c}};return{'ok':!![],'data':{'total':_0x3e6e0c[_0x52286e(0x1f8)],'items':_0x3e6e0c[_0x52286e(0x1cd)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x1f63cd(0x1de),'risk':a32_0x1f63cd(0x1f0),'flags':[{...ID_FLAG,'description':a32_0x1f63cd(0x1e9)}],async 'execute'(_0x2f7cc0){const _0x419cd4=a32_0x1f63cd,_0x3f73f4=await getPersonalKnowledgeBaseItem(_0x2f7cc0[_0x419cd4(0x204)]('id'),_0x2f7cc0['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x3f73f4)};}},kbCreate={'service':'kb','command':a32_0x1f63cd(0x1d0),'description':a32_0x1f63cd(0x1e6),'risk':a32_0x1f63cd(0x202),'confirmationDescription':a32_0x1f63cd(0x1d9),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x49bbcf){const _0x19b0e9=a32_0x1f63cd,_0x5cab5d=_0x49bbcf[_0x19b0e9(0x1f5)]('title'),_0x279d67=readKnowledgeFile(_0x49bbcf[_0x19b0e9(0x1f5)](_0x19b0e9(0x1f1))),_0x27952d=await createPersonalKnowledgeBaseItem(_0x49bbcf[_0x19b0e9(0x1fc)],{'title':_0x5cab5d,'content':_0x279d67});return{'ok':!![],'data':summarizePersonalItem(_0x27952d),'message':_0x19b0e9(0x1e4)+_0x27952d['id']+'\x20('+_0x27952d[_0x19b0e9(0x1d6)]+')'};},async 'dryRun'(_0x5023f3){const _0x4e0d3b=a32_0x1f63cd,_0x410ba9=_0x5023f3[_0x4e0d3b(0x1f5)](_0x4e0d3b(0x1d6)),_0x271806=readKnowledgeFile(_0x5023f3[_0x4e0d3b(0x1f5)]('file'));return dryRun(_0x4e0d3b(0x1d7),'/client/knowledge-base/personal/create')[_0x4e0d3b(0x1ed)]({'appCode':_0x5023f3[_0x4e0d3b(0x1fc)],'title':_0x410ba9,'content':_0x271806})[_0x4e0d3b(0x1ca)](_0x4e0d3b(0x1fd)+_0x410ba9+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':'根据本地文件更新个人知识库条目','risk':a32_0x1f63cd(0x202),'confirmationDescription':a32_0x1f63cd(0x1d2),'flags':[{...ID_FLAG,'description':a32_0x1f63cd(0x1e9)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0xf411df){const _0x1a1908=a32_0x1f63cd,_0x1043f9=_0xf411df[_0x1a1908(0x204)]('id'),_0x18af10=readKnowledgeFile(_0xf411df['str'](_0x1a1908(0x1f1))),_0x21bc52=_0xf411df[_0x1a1908(0x1f5)](_0x1a1908(0x1d6))||(await getPersonalKnowledgeBaseItem(_0x1043f9,_0xf411df['appCode']))[_0x1a1908(0x1d6)],_0x26b803=await updatePersonalKnowledgeBaseItem(_0x1043f9,_0xf411df[_0x1a1908(0x1fc)],{'title':_0x21bc52,'content':_0x18af10});return{'ok':!![],'data':summarizePersonalItem(_0x26b803),'message':_0x1a1908(0x1d4)+_0x26b803['id']+'\x20('+_0x26b803[_0x1a1908(0x1d6)]+')'};},async 'dryRun'(_0xde0922){const _0x1f15c3=a32_0x1f63cd,_0x4ad513=_0xde0922['num']('id'),_0xfcda96=readKnowledgeFile(_0xde0922[_0x1f15c3(0x1f5)](_0x1f15c3(0x1f1))),_0x2b1082=_0xde0922[_0x1f15c3(0x1f5)](_0x1f15c3(0x1d6))||(await getPersonalKnowledgeBaseItem(_0x4ad513,_0xde0922[_0x1f15c3(0x1fc)]))['title'];return dryRun(_0x1f15c3(0x1d7),_0x1f15c3(0x1f7)+_0x4ad513+_0x1f15c3(0x1f6))[_0x1f15c3(0x1ed)]({'appCode':_0xde0922[_0x1f15c3(0x1fc)],'title':_0x2b1082,'content':_0xfcda96})[_0x1f15c3(0x1ca)](_0x1f15c3(0x205)+_0x4ad513)[_0x1f15c3(0x1ff)]();}},kbSearch={'service':'kb','command':a32_0x1f63cd(0x1e8),'description':a32_0x1f63cd(0x1db),'risk':a32_0x1f63cd(0x1f0),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4af226){const _0x447521=a32_0x1f63cd;if(!_0x4af226[_0x447521(0x1f5)](_0x447521(0x1d8))[_0x447521(0x1dc)]())throw CliErrors['validation'](_0x447521(0x1d3));readTopK(_0x4af226);},async 'execute'(_0x48e71c){const _0x476967=a32_0x1f63cd,_0x2248a1=_0x48e71c[_0x476967(0x1f5)]('query')[_0x476967(0x1dc)](),_0x26860a=readTopK(_0x48e71c),_0x3cc3db=await searchKnowledgeBase(_0x48e71c[_0x476967(0x1fc)],{'query':_0x2248a1,'topK':_0x26860a});return{'ok':!![],'data':{'total':_0x3cc3db[_0x476967(0x1f8)],'hits':_0x3cc3db[_0x476967(0x1cd)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x35872e=a33_0x3899;(function(_0x312891,_0x16a774){const _0x44494e=a33_0x3899,_0x57484f=_0x312891();while(!![]){try{const _0x1c3ecf=parseInt(_0x44494e(0x15c))/0x1*(parseInt(_0x44494e(0x153))/0x2)+-parseInt(_0x44494e(0x168))/0x3*(parseInt(_0x44494e(0x155))/0x4)+-parseInt(_0x44494e(0x15b))/0x5+parseInt(_0x44494e(0x14c))/0x6*(parseInt(_0x44494e(0x15e))/0x7)+-parseInt(_0x44494e(0x165))/0x8*(-parseInt(_0x44494e(0x15a))/0x9)+-parseInt(_0x44494e(0x161))/0xa+parseInt(_0x44494e(0x15f))/0xb;if(_0x1c3ecf===_0x16a774)break;else _0x57484f['push'](_0x57484f['shift']());}catch(_0x5512ce){_0x57484f['push'](_0x57484f['shift']());}}}(a33_0x5108,0xbf696));function a33_0x3899(_0x5abbaf,_0x16b4cd){_0x5abbaf=_0x5abbaf-0x147;const _0x51080a=a33_0x5108();let _0x3899b2=_0x51080a[_0x5abbaf];return _0x3899b2;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2ea169){const _0x25bf11=a33_0x3899;if(_0x2ea169[_0x25bf11(0x149)]===0x0){console[_0x25bf11(0x148)](_0x25bf11(0x147));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x25bf11(0x14d)),_0x2ea169[_0x25bf11(0x14e)]((_0x1f0f1e,_0x39a789)=>{const _0x46bf27=_0x25bf11,_0x50c5e2=new Date(_0x1f0f1e[_0x46bf27(0x163)])['toLocaleString'](_0x46bf27(0x166)),_0x5ee906=_0x1f0f1e[_0x46bf27(0x164)]==='success'?'√':_0x1f0f1e[_0x46bf27(0x164)]==='error'?'×':_0x1f0f1e['level']===_0x46bf27(0x14b)?'!':'i';console[_0x46bf27(0x148)](_0x39a789+0x1+'.\x20'+_0x5ee906+'\x20['+_0x1f0f1e[_0x46bf27(0x157)]+']\x20'+_0x1f0f1e[_0x46bf27(0x154)]),console['log'](_0x46bf27(0x150)+_0x50c5e2),_0x1f0f1e['duration']&&console['log'](_0x46bf27(0x167)+_0x1f0f1e[_0x46bf27(0x162)]+'ms'),_0x1f0f1e[_0x46bf27(0x152)]&&Object[_0x46bf27(0x15d)](_0x1f0f1e[_0x46bf27(0x152)])[_0x46bf27(0x149)]>0x0&&console['log'](_0x46bf27(0x160)+JSON[_0x46bf27(0x159)](_0x1f0f1e[_0x46bf27(0x152)],null,0x2)),console[_0x46bf27(0x148)]('');});}export const logsDefinitions=[{'service':a33_0x35872e(0x158),'command':a33_0x35872e(0x14a),'description':a33_0x35872e(0x156),'risk':a33_0x35872e(0x14f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x172570){const _0x282a05=a33_0x35872e;return printLogs(logger[_0x282a05(0x151)]()),{'ok':!![]};}}];function a33_0x5108(){const _0x5354d2=['details','358xUEvso','message','976nDjhJf','View\x20command\x20history\x20logs','command','logs','stringify','540CiZDYY','3528565qhkDtz','6105VyKEaZ','keys','1781318kAcsLs','25955842kwHrPy','\x20\x20\x20Details:\x20','13762600uEzbpt','duration','timestamp','level','75728Xsgwdh','en-US','\x20\x20\x20Duration:\x20','17322vkMnpi','*\x20No\x20logs\x20found','log','length','show','warn','6cGogTI','\x20logs:\x0a','forEach','read','\x20\x20\x20Time:\x20','readLogs'];a33_0x5108=function(){return _0x5354d2;};return a33_0x5108();}
1
+ const a33_0x15fcef=a33_0x401c;(function(_0x5ae3a5,_0x25b164){const _0x144d27=a33_0x401c,_0x2789b2=_0x5ae3a5();while(!![]){try{const _0x229030=parseInt(_0x144d27(0x129))/0x1+parseInt(_0x144d27(0x134))/0x2*(-parseInt(_0x144d27(0x12c))/0x3)+parseInt(_0x144d27(0x13f))/0x4+-parseInt(_0x144d27(0x13a))/0x5*(parseInt(_0x144d27(0x13b))/0x6)+-parseInt(_0x144d27(0x127))/0x7+-parseInt(_0x144d27(0x124))/0x8*(-parseInt(_0x144d27(0x133))/0x9)+-parseInt(_0x144d27(0x12f))/0xa;if(_0x229030===_0x25b164)break;else _0x2789b2['push'](_0x2789b2['shift']());}catch(_0x5b493c){_0x2789b2['push'](_0x2789b2['shift']());}}}(a33_0x43a6,0xb8ce6));function a33_0x43a6(){const _0x39a5d5=['command','en-US','\x20\x20\x20Duration:\x20','length','245ccOYvB','51414RabdOh','level','log','timestamp','3925848nukxUJ','View\x20command\x20history\x20logs','16NgEbhA','success','\x20\x20\x20Details:\x20','4499677aaHQlN','keys','881139NasQRd','stringify','toLocaleString','1907679ulCVbb','error','show','7053980JyCJlL','details','logs','\x20logs:\x0a','5842566NfhiGR','2fZlsxd','message'];a33_0x43a6=function(){return _0x39a5d5;};return a33_0x43a6();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2607cc){const _0x53fcc4=a33_0x401c;if(_0x2607cc[_0x53fcc4(0x139)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x53fcc4(0x13d)]('*\x20'+CLI_DISPLAY_NAME+_0x53fcc4(0x132)),_0x2607cc['forEach']((_0x1ec1fd,_0x234658)=>{const _0x2b0bb3=_0x53fcc4,_0x49afa2=new Date(_0x1ec1fd[_0x2b0bb3(0x13e)])[_0x2b0bb3(0x12b)](_0x2b0bb3(0x137)),_0x32fda0=_0x1ec1fd[_0x2b0bb3(0x13c)]===_0x2b0bb3(0x125)?'√':_0x1ec1fd[_0x2b0bb3(0x13c)]===_0x2b0bb3(0x12d)?'×':_0x1ec1fd[_0x2b0bb3(0x13c)]==='warn'?'!':'i';console[_0x2b0bb3(0x13d)](_0x234658+0x1+'.\x20'+_0x32fda0+'\x20['+_0x1ec1fd[_0x2b0bb3(0x136)]+']\x20'+_0x1ec1fd[_0x2b0bb3(0x135)]),console[_0x2b0bb3(0x13d)]('\x20\x20\x20Time:\x20'+_0x49afa2),_0x1ec1fd['duration']&&console[_0x2b0bb3(0x13d)](_0x2b0bb3(0x138)+_0x1ec1fd['duration']+'ms'),_0x1ec1fd['details']&&Object[_0x2b0bb3(0x128)](_0x1ec1fd['details'])[_0x2b0bb3(0x139)]>0x0&&console[_0x2b0bb3(0x13d)](_0x2b0bb3(0x126)+JSON[_0x2b0bb3(0x12a)](_0x1ec1fd[_0x2b0bb3(0x130)],null,0x2)),console[_0x2b0bb3(0x13d)]('');});}function a33_0x401c(_0x3b2551,_0x4300bb){_0x3b2551=_0x3b2551-0x124;const _0x43a6a0=a33_0x43a6();let _0x401ce7=_0x43a6a0[_0x3b2551];return _0x401ce7;}export const logsDefinitions=[{'service':a33_0x15fcef(0x131),'command':a33_0x15fcef(0x12e),'description':a33_0x15fcef(0x140),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1404a7){return printLogs(logger['readLogs']()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x2cde7e=a34_0x4073;function a34_0x4073(_0x1d0038,_0x4c9402){_0x1d0038=_0x1d0038-0x17c;const _0x523bed=a34_0x523b();let _0x4073e3=_0x523bed[_0x1d0038];return _0x4073e3;}(function(_0x46e771,_0x2e9d63){const _0xbcb796=a34_0x4073,_0x161215=_0x46e771();while(!![]){try{const _0x1f4149=-parseInt(_0xbcb796(0x181))/0x1+parseInt(_0xbcb796(0x17f))/0x2*(-parseInt(_0xbcb796(0x188))/0x3)+parseInt(_0xbcb796(0x187))/0x4+parseInt(_0xbcb796(0x186))/0x5+parseInt(_0xbcb796(0x18b))/0x6+parseInt(_0xbcb796(0x18f))/0x7+-parseInt(_0xbcb796(0x180))/0x8*(parseInt(_0xbcb796(0x18a))/0x9);if(_0x1f4149===_0x2e9d63)break;else _0x161215['push'](_0x161215['shift']());}catch(_0x5d09da){_0x161215['push'](_0x161215['shift']());}}}(a34_0x523b,0xd75d4));import{listNotificationChannelConfigs}from'../../core/api-client.js';function a34_0x523b(){const _0x2a8a91=['2tmOUsL','118648LNYgAu','890240uDyYTM','appCode','type','string','length','3823390LNDxqY','5218576mcfDCD','3056973bDlZtF','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','621mxpLGD','3136482UrGzIq','EMAIL','Found\x20','config-list','8558431isTSTP','Notification\x20channel\x20type','map','\x20notification\x20config(s)','read'];a34_0x523b=function(){return _0x2a8a91;};return a34_0x523b();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a34_0x2cde7e(0x18e),'description':a34_0x2cde7e(0x189),'risk':a34_0x2cde7e(0x17e),'flags':[{'name':a34_0x2cde7e(0x183),'type':a34_0x2cde7e(0x184),'description':a34_0x2cde7e(0x190),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a34_0x2cde7e(0x18c)}],async 'validate'(_0x49c563){readNotificationChannelType(_0x49c563);},async 'execute'(_0x1db7a4){const _0x4e4888=a34_0x2cde7e,_0x310c81=readNotificationChannelType(_0x1db7a4),_0x27dbc6=await listNotificationChannelConfigs(_0x1db7a4[_0x4e4888(0x182)],_0x310c81),_0x1a30ef=_0x27dbc6[_0x4e4888(0x17c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1db7a4[_0x4e4888(0x182)],'channelType':_0x310c81,'count':_0x1a30ef[_0x4e4888(0x185)],'configs':_0x1a30ef},'message':_0x4e4888(0x18d)+_0x1a30ef[_0x4e4888(0x185)]+'\x20'+_0x310c81+_0x4e4888(0x17d)};}};
1
+ const a34_0x58c058=a34_0x3c9f;(function(_0x413bd2,_0x5a7004){const _0x206fa9=a34_0x3c9f,_0x4e9e5f=_0x413bd2();while(!![]){try{const _0x5a1c5b=parseInt(_0x206fa9(0x1d8))/0x1*(-parseInt(_0x206fa9(0x1dc))/0x2)+parseInt(_0x206fa9(0x1d7))/0x3*(-parseInt(_0x206fa9(0x1e2))/0x4)+parseInt(_0x206fa9(0x1da))/0x5+-parseInt(_0x206fa9(0x1d5))/0x6+-parseInt(_0x206fa9(0x1e3))/0x7*(-parseInt(_0x206fa9(0x1d2))/0x8)+-parseInt(_0x206fa9(0x1df))/0x9+-parseInt(_0x206fa9(0x1dd))/0xa*(-parseInt(_0x206fa9(0x1d6))/0xb);if(_0x5a1c5b===_0x5a7004)break;else _0x4e9e5f['push'](_0x4e9e5f['shift']());}catch(_0x150b41){_0x4e9e5f['push'](_0x4e9e5f['shift']());}}}(a34_0x38a1,0x8c6bc));import{listNotificationChannelConfigs}from'../../core/api-client.js';function a34_0x38a1(){const _0x21b4e8=['1238hFXwCa','20PPTZxR','appCode','900927HgVVha','length','map','264rrckaX','3461269tTwSUR','string','notification','Notification\x20channel\x20type','16DFqdag','Found\x20','config-list','4755120LvUGWX','5575273FkymPk','46275QJJUJI','791ebTJDD','EMAIL','4864230qPoRDc','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a34_0x38a1=function(){return _0x21b4e8;};return a34_0x38a1();}function a34_0x3c9f(_0x49d0fb,_0x781e92){_0x49d0fb=_0x49d0fb-0x1d0;const _0x38a1eb=a34_0x38a1();let _0x3c9f87=_0x38a1eb[_0x49d0fb];return _0x3c9f87;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a34_0x58c058(0x1d0),'command':a34_0x58c058(0x1d4),'description':a34_0x58c058(0x1db),'risk':'read','flags':[{'name':'type','type':a34_0x58c058(0x1e4),'description':a34_0x58c058(0x1d1),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a34_0x58c058(0x1d9)}],async 'validate'(_0x2985d0){readNotificationChannelType(_0x2985d0);},async 'execute'(_0x3bd20a){const _0x2ac38a=a34_0x58c058,_0x40dbf0=readNotificationChannelType(_0x3bd20a),_0x4ccc13=await listNotificationChannelConfigs(_0x3bd20a[_0x2ac38a(0x1de)],_0x40dbf0),_0x11c93b=_0x4ccc13[_0x2ac38a(0x1e1)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3bd20a[_0x2ac38a(0x1de)],'channelType':_0x40dbf0,'count':_0x11c93b[_0x2ac38a(0x1e0)],'configs':_0x11c93b},'message':_0x2ac38a(0x1d3)+_0x11c93b[_0x2ac38a(0x1e0)]+'\x20'+_0x40dbf0+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- (function(_0x377f0e,_0x4f57ba){const _0x2923c6=a35_0x3749,_0x41f1b6=_0x377f0e();while(!![]){try{const _0x2c37ac=-parseInt(_0x2923c6(0x1d0))/0x1*(parseInt(_0x2923c6(0x1d4))/0x2)+-parseInt(_0x2923c6(0x1cf))/0x3*(parseInt(_0x2923c6(0x1cd))/0x4)+parseInt(_0x2923c6(0x1d1))/0x5+parseInt(_0x2923c6(0x1ce))/0x6*(parseInt(_0x2923c6(0x1d3))/0x7)+-parseInt(_0x2923c6(0x1cc))/0x8*(parseInt(_0x2923c6(0x1ca))/0x9)+-parseInt(_0x2923c6(0x1cb))/0xa+parseInt(_0x2923c6(0x1d2))/0xb;if(_0x2c37ac===_0x4f57ba)break;else _0x41f1b6['push'](_0x41f1b6['shift']());}catch(_0x2d6d9f){_0x41f1b6['push'](_0x41f1b6['shift']());}}}(a35_0x3992,0x3ecc5));function a35_0x3749(_0x530fcf,_0x2637af){_0x530fcf=_0x530fcf-0x1ca;const _0x399288=a35_0x3992();let _0x3749d6=_0x399288[_0x530fcf];return _0x3749d6;}function a35_0x3992(){const _0x377ab1=['50885RceirI','515315kySSlR','5125417KEYuTR','217pUWDQB','2hzHOnk','1710BEujhk','4018430vWjhnl','6336NnoTWL','132tTZMjJ','64560DcIpVk','3831vWWSEv'];a35_0x3992=function(){return _0x377ab1;};return a35_0x3992();}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ function a35_0x13bd(_0xc7a3e6,_0x2d598d){_0xc7a3e6=_0xc7a3e6-0x143;const _0x2b7245=a35_0x2b72();let _0x13bd85=_0x2b7245[_0xc7a3e6];return _0x13bd85;}(function(_0x21f23c,_0xdb1aef){const _0x1662d6=a35_0x13bd,_0x3fba53=_0x21f23c();while(!![]){try{const _0x11837d=-parseInt(_0x1662d6(0x149))/0x1+parseInt(_0x1662d6(0x147))/0x2+-parseInt(_0x1662d6(0x144))/0x3*(-parseInt(_0x1662d6(0x148))/0x4)+parseInt(_0x1662d6(0x14a))/0x5*(parseInt(_0x1662d6(0x14b))/0x6)+parseInt(_0x1662d6(0x145))/0x7+parseInt(_0x1662d6(0x146))/0x8*(-parseInt(_0x1662d6(0x143))/0x9)+-parseInt(_0x1662d6(0x14c))/0xa;if(_0x11837d===_0xdb1aef)break;else _0x3fba53['push'](_0x3fba53['shift']());}catch(_0xcdef80){_0x3fba53['push'](_0x3fba53['shift']());}}}(a35_0x2b72,0x89e88));function a35_0x2b72(){const _0x9160b0=['1487400IlAIbN','5564CsRAcg','51853UvvwRW','5gRMwql','6240006gzbcdy','8046350kqeynf','111519LnEKQf','1089njpVWK','954779IaePxc','648svzDVg'];a35_0x2b72=function(){return _0x9160b0;};return a35_0x2b72();}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
@@ -1 +1 @@
1
- const a36_0x23052e=a36_0x3627;(function(_0xbfd202,_0x21eb18){const _0x58e883=a36_0x3627,_0x195830=_0xbfd202();while(!![]){try{const _0x288ad6=parseInt(_0x58e883(0x6c))/0x1*(-parseInt(_0x58e883(0x7a))/0x2)+-parseInt(_0x58e883(0x8c))/0x3+-parseInt(_0x58e883(0x82))/0x4+-parseInt(_0x58e883(0x6f))/0x5+parseInt(_0x58e883(0x88))/0x6*(-parseInt(_0x58e883(0x7d))/0x7)+-parseInt(_0x58e883(0x77))/0x8+parseInt(_0x58e883(0x75))/0x9;if(_0x288ad6===_0x21eb18)break;else _0x195830['push'](_0x195830['shift']());}catch(_0x2a4ca9){_0x195830['push'](_0x195830['shift']());}}}(a36_0xa71f,0x9159d));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a36_0x23052e(0x73),a36_0x23052e(0x74),a36_0x23052e(0x79),a36_0x23052e(0x7c),a36_0x23052e(0x80)];export function readNotificationChannelType(_0x125f87){const _0x1a3fa3=a36_0x23052e,_0xf15728=_0x125f87[_0x1a3fa3(0x8a)](_0x1a3fa3(0x6e))[_0x1a3fa3(0x78)]()||'EMAIL';if(!NOTIFICATION_CHANNEL_TYPES[_0x1a3fa3(0x72)](_0xf15728))throw CliErrors[_0x1a3fa3(0x6a)](_0x1a3fa3(0x7b)+_0xf15728,_0x1a3fa3(0x6d)+NOTIFICATION_CHANNEL_TYPES[_0x1a3fa3(0x83)](',\x20')+'.');return _0xf15728;}function a36_0xa71f(){const _0x28acdd=['configCode','apiError','389514TMAWfJ','\x20is\x20missing\x20required\x20field\x20\x22','str','updateTime','815472rYXWvi','validation','channelType','3NIgkSz','Allowed\x20values:\x20','type','485845lmoeIP','isArray','Invalid\x20notification\x20config\x20response.','includes','EMAIL','FEISHU','30499470HPcRrb','string','5888184sLPSIQ','trim','DINGTALK','308662JVvlCg','Invalid\x20--type:\x20','WECOM','28pfHwOf','test','number','WEBHOOK','Item\x20','3863152WIvHQL','join','configName','description'];a36_0xa71f=function(){return _0x28acdd;};return a36_0xa71f();}export function projectNotificationListConfig(_0x45cdc2,_0x2cf70c){const _0xe652b0=a36_0x23052e,_0x5dd37b=requireResponseObject(_0x45cdc2,_0x2cf70c);return{'id':normalizeNullableId(_0x5dd37b['id'],_0x2cf70c),'configCode':requireResponseString(_0x5dd37b[_0xe652b0(0x86)],'configCode',_0x2cf70c),'configName':requireResponseString(_0x5dd37b['configName'],_0xe652b0(0x84),_0x2cf70c),'channelType':requireResponseString(_0x5dd37b['channelType'],_0xe652b0(0x6b),_0x2cf70c),'description':normalizeNullableString(_0x5dd37b[_0xe652b0(0x85)]),'createTime':normalizeNullableString(_0x5dd37b['createTime']),'updateTime':normalizeNullableString(_0x5dd37b[_0xe652b0(0x8b)])};}function requireResponseObject(_0x44723a,_0x1d31f1){const _0x188e77=a36_0x23052e;if(typeof _0x44723a!=='object'||_0x44723a===null||Array[_0x188e77(0x70)](_0x44723a))throw CliErrors[_0x188e77(0x87)](_0x188e77(0x71),_0x188e77(0x81)+(_0x1d31f1+0x1)+'\x20must\x20be\x20an\x20object.');return _0x44723a;}function a36_0x3627(_0x2ed638,_0x3f5b7f){_0x2ed638=_0x2ed638-0x6a;const _0xa71fee=a36_0xa71f();let _0x3627c9=_0xa71fee[_0x2ed638];return _0x3627c9;}function requireResponseString(_0x13aa22,_0x4d04c6,_0x14ad6e){const _0x2b7fac=a36_0x23052e;if(typeof _0x13aa22!==_0x2b7fac(0x76)||!_0x13aa22[_0x2b7fac(0x78)]())throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x14ad6e+0x1)+_0x2b7fac(0x89)+_0x4d04c6+'\x22.');return _0x13aa22[_0x2b7fac(0x78)]();}function normalizeNullableString(_0x31a624){const _0x4bdc58=a36_0x23052e;return typeof _0x31a624===_0x4bdc58(0x76)&&_0x31a624[_0x4bdc58(0x78)]()?_0x31a624[_0x4bdc58(0x78)]():null;}function normalizeNullableId(_0x18570e,_0x5b9391){const _0x10849e=a36_0x23052e;if(_0x18570e===undefined||_0x18570e===null)return null;if(typeof _0x18570e===_0x10849e(0x7f)&&Number['isSafeInteger'](_0x18570e))return _0x18570e;if(typeof _0x18570e===_0x10849e(0x76)&&/^-?\d+$/[_0x10849e(0x7e)](_0x18570e['trim']()))return _0x18570e[_0x10849e(0x78)]();throw CliErrors[_0x10849e(0x87)](_0x10849e(0x71),_0x10849e(0x81)+(_0x5b9391+0x1)+'\x20has\x20invalid\x20field\x20\x22id\x22.');}
1
+ const a36_0x77c98b=a36_0x19fc;(function(_0x1795a5,_0x17c841){const _0x96ca5d=a36_0x19fc,_0xe20f8a=_0x1795a5();while(!![]){try{const _0x3107fe=parseInt(_0x96ca5d(0x1b3))/0x1+-parseInt(_0x96ca5d(0x1c1))/0x2+-parseInt(_0x96ca5d(0x1c0))/0x3*(-parseInt(_0x96ca5d(0x1ba))/0x4)+parseInt(_0x96ca5d(0x1b9))/0x5*(parseInt(_0x96ca5d(0x1b0))/0x6)+parseInt(_0x96ca5d(0x1c2))/0x7*(parseInt(_0x96ca5d(0x1a8))/0x8)+-parseInt(_0x96ca5d(0x1ae))/0x9+parseInt(_0x96ca5d(0x1b5))/0xa*(-parseInt(_0x96ca5d(0x1c4))/0xb);if(_0x3107fe===_0x17c841)break;else _0xe20f8a['push'](_0xe20f8a['shift']());}catch(_0x596fc4){_0xe20f8a['push'](_0xe20f8a['shift']());}}}(a36_0x10b8,0x43862));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a36_0x77c98b(0x1ad),a36_0x77c98b(0x1af),'DINGTALK','WECOM','WEBHOOK'];export function readNotificationChannelType(_0xd70875){const _0x446b6c=a36_0x77c98b,_0x4b7bf9=_0xd70875['str']('type')[_0x446b6c(0x1be)]()||_0x446b6c(0x1ad);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4b7bf9))throw CliErrors[_0x446b6c(0x1b1)](_0x446b6c(0x1aa)+_0x4b7bf9,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x446b6c(0x1bb)](',\x20')+'.');return _0x4b7bf9;}export function projectNotificationListConfig(_0x2218cd,_0x203f47){const _0x8f06d0=a36_0x77c98b,_0x2de188=requireResponseObject(_0x2218cd,_0x203f47);return{'id':normalizeNullableId(_0x2de188['id'],_0x203f47),'configCode':requireResponseString(_0x2de188[_0x8f06d0(0x1ac)],_0x8f06d0(0x1ac),_0x203f47),'configName':requireResponseString(_0x2de188[_0x8f06d0(0x1b8)],_0x8f06d0(0x1b8),_0x203f47),'channelType':requireResponseString(_0x2de188[_0x8f06d0(0x1bf)],'channelType',_0x203f47),'description':normalizeNullableString(_0x2de188['description']),'createTime':normalizeNullableString(_0x2de188[_0x8f06d0(0x1bd)]),'updateTime':normalizeNullableString(_0x2de188['updateTime'])};}function requireResponseObject(_0x1b3cf6,_0x3c2970){const _0xd29433=a36_0x77c98b;if(typeof _0x1b3cf6!=='object'||_0x1b3cf6===null||Array['isArray'](_0x1b3cf6))throw CliErrors[_0xd29433(0x1b7)]('Invalid\x20notification\x20config\x20response.',_0xd29433(0x1c3)+(_0x3c2970+0x1)+'\x20must\x20be\x20an\x20object.');return _0x1b3cf6;}function requireResponseString(_0x542ed5,_0x44169b,_0x236317){const _0x34d11e=a36_0x77c98b;if(typeof _0x542ed5!==_0x34d11e(0x1b4)||!_0x542ed5[_0x34d11e(0x1be)]())throw CliErrors['apiError'](_0x34d11e(0x1bc),'Item\x20'+(_0x236317+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x44169b+'\x22.');return _0x542ed5[_0x34d11e(0x1be)]();}function a36_0x10b8(){const _0x181482=['1740825OMyJFU','FEISHU','2334QnTUaV','validation','number','421916oRSVnM','string','4520tTYgjP','\x20has\x20invalid\x20field\x20\x22id\x22.','apiError','configName','2045DeDRuG','3620Navpme','join','Invalid\x20notification\x20config\x20response.','createTime','trim','channelType','1119JvapwS','58902CrccuL','51303XDlcWe','Item\x20','16621KfgrVU','288XHUisF','test','Invalid\x20--type:\x20','isSafeInteger','configCode','EMAIL'];a36_0x10b8=function(){return _0x181482;};return a36_0x10b8();}function normalizeNullableString(_0x4d6f33){const _0x4cf3f5=a36_0x77c98b;return typeof _0x4d6f33==='string'&&_0x4d6f33[_0x4cf3f5(0x1be)]()?_0x4d6f33[_0x4cf3f5(0x1be)]():null;}function a36_0x19fc(_0x5e25ca,_0x4f2ad4){_0x5e25ca=_0x5e25ca-0x1a8;const _0x10b803=a36_0x10b8();let _0x19fc8f=_0x10b803[_0x5e25ca];return _0x19fc8f;}function normalizeNullableId(_0x2f1978,_0x1901d){const _0x4aa033=a36_0x77c98b;if(_0x2f1978===undefined||_0x2f1978===null)return null;if(typeof _0x2f1978===_0x4aa033(0x1b2)&&Number[_0x4aa033(0x1ab)](_0x2f1978))return _0x2f1978;if(typeof _0x2f1978===_0x4aa033(0x1b4)&&/^-?\d+$/[_0x4aa033(0x1a9)](_0x2f1978[_0x4aa033(0x1be)]()))return _0x2f1978[_0x4aa033(0x1be)]();throw CliErrors[_0x4aa033(0x1b7)]('Invalid\x20notification\x20config\x20response.',_0x4aa033(0x1c3)+(_0x1901d+0x1)+_0x4aa033(0x1b6));}
@@ -1 +1 @@
1
- const a37_0x3939bf=a37_0x5695;(function(_0x24e847,_0x2604da){const _0x585470=a37_0x5695,_0x34aa92=_0x24e847();while(!![]){try{const _0x233aa3=-parseInt(_0x585470(0x8c))/0x1*(-parseInt(_0x585470(0x97))/0x2)+parseInt(_0x585470(0x9d))/0x3+-parseInt(_0x585470(0xb0))/0x4+parseInt(_0x585470(0x92))/0x5*(-parseInt(_0x585470(0x93))/0x6)+-parseInt(_0x585470(0xae))/0x7+-parseInt(_0x585470(0x94))/0x8*(-parseInt(_0x585470(0xac))/0x9)+-parseInt(_0x585470(0xb5))/0xa*(-parseInt(_0x585470(0xaa))/0xb);if(_0x233aa3===_0x2604da)break;else _0x34aa92['push'](_0x34aa92['shift']());}catch(_0x507ba2){_0x34aa92['push'](_0x34aa92['shift']());}}}(a37_0x5cec,0xb6414));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_0x5cec(){const _0x408edb=['imageUrl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','str','apiError','5TqBUDU','7002024AhLVjQ','1738024iQSVJm','.\x20Supported\x20scenes:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','844958LUlKvb','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','body','form','File\x20upload\x20response\x20missing\x20filePath.','appCode','4095423cRIXNf','general','fileUrl','<filePath\x20returned\x20by\x20/client/uploadFile>','length','description','build','Table','\x20OCR\x20from\x20URL','/client/uploadFile','scene','Preview:\x20recognize\x20','Invoice','33nsVWKz','filePath','18UrKQJH','image-url','2874613MbViRO','read','1059124MbWjQt','File\x20URL\x20response\x20missing\x20fileUrl.','POST','invoice','/client/queryFileUrl','1222780KGuejO','image-file','count','\x20OCR','imageFile','Unsupported\x20OCR\x20scene:\x20','General','recognize','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','idCard','/client/ocr','trim','IdCard','string','fileName','1JIysvB','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.'];a37_0x5cec=function(){return _0x408edb;};return a37_0x5cec();}const SUPPORTED_SCENES=[a37_0x3939bf(0xb3),a37_0x3939bf(0x9e),'form',a37_0x3939bf(0xbe)],SCENE_TO_LEGACY_TYPE={'invoice':a37_0x3939bf(0xa9),'general':a37_0x3939bf(0xbb),'form':a37_0x3939bf(0xa4),'idCard':a37_0x3939bf(0x89)},SCENE_FLAG={'name':'scene','type':a37_0x3939bf(0x8a),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a37_0x3939bf(0xb6),'type':a37_0x3939bf(0x8a),'description':a37_0x3939bf(0x98)},IMAGE_URL_FLAG={'name':a37_0x3939bf(0xad),'type':'string','description':a37_0x3939bf(0x96)};function normalizeScene(_0x5c4515){const _0x115262=a37_0x3939bf,_0x38edcf=_0x5c4515[_0x115262(0x88)]()['toLowerCase']();if(_0x38edcf==='idcard')return'idCard';if(_0x38edcf===_0x115262(0xb3)||_0x38edcf===_0x115262(0x9e)||_0x38edcf===_0x115262(0x9a))return _0x38edcf;throw CliErrors['validation'](_0x115262(0xba)+_0x5c4515+_0x115262(0x95)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x43e59e){const _0x54fae0=a37_0x3939bf,_0x4d7ec8=_0x43e59e['str']('image-file')[_0x54fae0(0x88)](),_0x415cdf=_0x43e59e['str'](_0x54fae0(0xad))[_0x54fae0(0x88)]();return{'imageFile':_0x4d7ec8,'imageUrl':_0x415cdf,'count':[_0x4d7ec8,_0x415cdf]['filter'](Boolean)[_0x54fae0(0xa1)]};}function validateInputSelection(_0x33a372){const _0x529144=a37_0x3939bf,_0x4023d9=selectedInputs(_0x33a372);if(_0x4023d9[_0x529144(0xb7)]!==0x1)throw CliErrors['validation'](_0x529144(0x8d));return _0x4023d9;}function withScene(_0x2a68d8,_0x4531d9,_0xacb0e1){const _0x19dcf8=a37_0x3939bf;return{..._0x2a68d8,'scene':_0x4531d9,..._0xacb0e1?{'sourceFile':{'fileName':_0xacb0e1[_0x19dcf8(0x8b)],'filePath':_0xacb0e1[_0x19dcf8(0xab)]}}:{}};}function a37_0x5695(_0x3b51ae,_0x56e2de){_0x3b51ae=_0x3b51ae-0x87;const _0x5cecdb=a37_0x5cec();let _0x5695e4=_0x5cecdb[_0x3b51ae];return _0x5695e4;}const ocrRecognize={'service':'ocr','command':a37_0x3939bf(0xbc),'description':'提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','risk':a37_0x3939bf(0xaf),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x192661){const _0x3129d3=a37_0x3939bf,_0x36a252=normalizeScene(_0x192661[_0x3129d3(0x90)](_0x3129d3(0xa7))),_0x4a6725=SCENE_TO_LEGACY_TYPE[_0x36a252],_0x675ddc=validateInputSelection(_0x192661);if(_0x675ddc[_0x3129d3(0x8e)])return dryRun(_0x3129d3(0xb2),_0x3129d3(0x87))[_0x3129d3(0x99)]({'appCode':_0x192661['appCode'],'url':_0x675ddc['imageUrl'],'type':_0x4a6725})[_0x3129d3(0xa2)](_0x3129d3(0xa8)+_0x36a252+_0x3129d3(0xa5))[_0x3129d3(0xa3)]();const _0x59b613=requireRuntimeUploadFile(_0x675ddc[_0x3129d3(0xb9)],_0x3129d3(0xb6));return dryRun(_0x3129d3(0xb2),_0x3129d3(0xa6))[_0x3129d3(0x99)]({'steps':[{'method':_0x3129d3(0xb2),'url':_0x3129d3(0xa6),'body':{'appCode':_0x192661[_0x3129d3(0x9c)],'multipart':{'file':_0x59b613}}},{'method':'POST','url':_0x3129d3(0xb4),'body':{'filePath':_0x3129d3(0xa0),'downloadFlag':![]}},{'method':_0x3129d3(0xb2),'url':_0x3129d3(0x87),'body':{'appCode':_0x192661[_0x3129d3(0x9c)],'url':_0x3129d3(0x8f),'type':_0x4a6725}}]})[_0x3129d3(0xa2)](_0x3129d3(0xbd)+_0x36a252+_0x3129d3(0xb8))['build']();},async 'execute'(_0x454683){const _0x3404bc=a37_0x3939bf,_0x1f6977=normalizeScene(_0x454683[_0x3404bc(0x90)](_0x3404bc(0xa7))),_0x242d50=SCENE_TO_LEGACY_TYPE[_0x1f6977],_0x2cb6a5=validateInputSelection(_0x454683);if(_0x2cb6a5['imageUrl']){const _0x52fc70=await recognizeRuntimeOcr(_0x454683['appCode'],{'url':_0x2cb6a5['imageUrl'],'type':_0x242d50});return{'ok':!![],'data':withScene(_0x52fc70,_0x1f6977)};}const _0x236c8e=requireRuntimeUploadFile(_0x2cb6a5[_0x3404bc(0xb9)],'image-file'),_0x50555b=await uploadRuntimeFile(_0x454683[_0x3404bc(0x9c)],_0x236c8e['path']);if(!_0x50555b[_0x3404bc(0xab)])throw CliErrors['apiError'](_0x3404bc(0x9b));const _0x331f3b=await queryRuntimeFileUrl(_0x50555b[_0x3404bc(0xab)],{'download':![]});if(!_0x331f3b[_0x3404bc(0x9f)])throw CliErrors[_0x3404bc(0x91)](_0x3404bc(0xb1));const _0xbca7fe=await recognizeRuntimeOcr(_0x454683['appCode'],{'url':_0x331f3b[_0x3404bc(0x9f)],'type':_0x242d50});return{'ok':!![],'data':withScene(_0xbca7fe,_0x1f6977,_0x50555b)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a37_0x590580=a37_0x293d;(function(_0x503f3b,_0xd3a96c){const _0x1f8384=a37_0x293d,_0x232336=_0x503f3b();while(!![]){try{const _0x1f8c7e=-parseInt(_0x1f8384(0x1aa))/0x1+parseInt(_0x1f8384(0x1b1))/0x2*(parseInt(_0x1f8384(0x1af))/0x3)+parseInt(_0x1f8384(0x1bd))/0x4+-parseInt(_0x1f8384(0x1cf))/0x5*(parseInt(_0x1f8384(0x1b3))/0x6)+-parseInt(_0x1f8384(0x1d6))/0x7*(-parseInt(_0x1f8384(0x1d0))/0x8)+-parseInt(_0x1f8384(0x1b0))/0x9*(parseInt(_0x1f8384(0x1bf))/0xa)+parseInt(_0x1f8384(0x1ae))/0xb;if(_0x1f8c7e===_0xd3a96c)break;else _0x232336['push'](_0x232336['shift']());}catch(_0x24e1c4){_0x232336['push'](_0x232336['shift']());}}}(a37_0x250d,0xd892d));function a37_0x293d(_0x9b6bab,_0x3b7af5){_0x9b6bab=_0x9b6bab-0x1aa;const _0x250d39=a37_0x250d();let _0x293de0=_0x250d39[_0x9b6bab];return _0x293de0;}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_0x590580(0x1c9),a37_0x590580(0x1c1),a37_0x590580(0x1cc),a37_0x590580(0x1e2)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a37_0x590580(0x1d7),'form':'Table','idCard':a37_0x590580(0x1be)},SCENE_FLAG={'name':a37_0x590580(0x1b8),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a37_0x590580(0x1de),'type':'string','description':a37_0x590580(0x1d3)},IMAGE_URL_FLAG={'name':a37_0x590580(0x1c5),'type':a37_0x590580(0x1b4),'description':a37_0x590580(0x1d9)};function normalizeScene(_0x317afc){const _0xb2f0e0=a37_0x590580,_0xab5a05=_0x317afc['trim']()['toLowerCase']();if(_0xab5a05===_0xb2f0e0(0x1c6))return _0xb2f0e0(0x1e2);if(_0xab5a05===_0xb2f0e0(0x1c9)||_0xab5a05==='general'||_0xab5a05===_0xb2f0e0(0x1cc))return _0xab5a05;throw CliErrors[_0xb2f0e0(0x1e1)](_0xb2f0e0(0x1d2)+_0x317afc+_0xb2f0e0(0x1e3)+SUPPORTED_SCENES[_0xb2f0e0(0x1e0)](',\x20'));}function selectedInputs(_0x1d893f){const _0x3b60e1=a37_0x590580,_0x398736=_0x1d893f[_0x3b60e1(0x1b9)](_0x3b60e1(0x1de))[_0x3b60e1(0x1b2)](),_0x5d3159=_0x1d893f[_0x3b60e1(0x1b9)](_0x3b60e1(0x1c5))[_0x3b60e1(0x1b2)]();return{'imageFile':_0x398736,'imageUrl':_0x5d3159,'count':[_0x398736,_0x5d3159][_0x3b60e1(0x1c7)](Boolean)[_0x3b60e1(0x1b5)]};}function validateInputSelection(_0x2e953f){const _0x5818a3=a37_0x590580,_0x1d767b=selectedInputs(_0x2e953f);if(_0x1d767b[_0x5818a3(0x1bc)]!==0x1)throw CliErrors[_0x5818a3(0x1e1)](_0x5818a3(0x1da));return _0x1d767b;}function withScene(_0x2708ac,_0x8d51bc,_0x594411){const _0xf28e6e=a37_0x590580;return{..._0x2708ac,'scene':_0x8d51bc,..._0x594411?{'sourceFile':{'fileName':_0x594411['fileName'],'filePath':_0x594411[_0xf28e6e(0x1c3)]}}:{}};}const ocrRecognize={'service':a37_0x590580(0x1d5),'command':a37_0x590580(0x1d8),'description':a37_0x590580(0x1db),'risk':a37_0x590580(0x1dc),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23e25e){const _0x378d34=a37_0x590580,_0x59519d=normalizeScene(_0x23e25e[_0x378d34(0x1b9)](_0x378d34(0x1b8))),_0x5ec0a0=SCENE_TO_LEGACY_TYPE[_0x59519d],_0x2b115e=validateInputSelection(_0x23e25e);if(_0x2b115e['imageUrl'])return dryRun(_0x378d34(0x1c0),_0x378d34(0x1c4))[_0x378d34(0x1ce)]({'appCode':_0x23e25e[_0x378d34(0x1c8)],'url':_0x2b115e[_0x378d34(0x1bb)],'type':_0x5ec0a0})[_0x378d34(0x1ba)](_0x378d34(0x1b7)+_0x59519d+_0x378d34(0x1ad))['build']();const _0x357d36=requireRuntimeUploadFile(_0x2b115e[_0x378d34(0x1ab)],'image-file');return dryRun(_0x378d34(0x1c0),_0x378d34(0x1d4))['body']({'steps':[{'method':'POST','url':'/client/uploadFile','body':{'appCode':_0x23e25e[_0x378d34(0x1c8)],'multipart':{'file':_0x357d36}}},{'method':_0x378d34(0x1c0),'url':_0x378d34(0x1b6),'body':{'filePath':_0x378d34(0x1cb),'downloadFlag':![]}},{'method':_0x378d34(0x1c0),'url':'/client/ocr','body':{'appCode':_0x23e25e['appCode'],'url':_0x378d34(0x1ca),'type':_0x5ec0a0}}]})['description'](_0x378d34(0x1ac)+_0x59519d+'\x20OCR')[_0x378d34(0x1dd)]();},async 'execute'(_0x51575c){const _0x2c0fa1=a37_0x590580,_0x2050aa=normalizeScene(_0x51575c[_0x2c0fa1(0x1b9)]('scene')),_0x5e30fe=SCENE_TO_LEGACY_TYPE[_0x2050aa],_0x3c5824=validateInputSelection(_0x51575c);if(_0x3c5824['imageUrl']){const _0x8e7041=await recognizeRuntimeOcr(_0x51575c['appCode'],{'url':_0x3c5824[_0x2c0fa1(0x1bb)],'type':_0x5e30fe});return{'ok':!![],'data':withScene(_0x8e7041,_0x2050aa)};}const _0x249849=requireRuntimeUploadFile(_0x3c5824[_0x2c0fa1(0x1ab)],_0x2c0fa1(0x1de)),_0x3f42f7=await uploadRuntimeFile(_0x51575c[_0x2c0fa1(0x1c8)],_0x249849[_0x2c0fa1(0x1df)]);if(!_0x3f42f7['filePath'])throw CliErrors['apiError'](_0x2c0fa1(0x1cd));const _0xaee4e7=await queryRuntimeFileUrl(_0x3f42f7[_0x2c0fa1(0x1c3)],{'download':![]});if(!_0xaee4e7['fileUrl'])throw CliErrors['apiError'](_0x2c0fa1(0x1c2));const _0x1705f2=await recognizeRuntimeOcr(_0x51575c['appCode'],{'url':_0xaee4e7[_0x2c0fa1(0x1d1)],'type':_0x5e30fe});return{'ok':!![],'data':withScene(_0x1705f2,_0x2050aa,_0x3f42f7)};}};export const ocrDefinitions=[ocrRecognize];function a37_0x250d(){const _0x123c17=['/client/ocr','image-url','idcard','filter','appCode','invoice','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','<filePath\x20returned\x20by\x20/client/uploadFile>','form','File\x20upload\x20response\x20missing\x20filePath.','body','7030KdaNtP','736XfWYYd','fileUrl','Unsupported\x20OCR\x20scene:\x20','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','/client/uploadFile','ocr','9079JaVHxk','General','recognize','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','read','build','image-file','path','join','validation','idCard','.\x20Supported\x20scenes:\x20','794707YeTGdA','imageFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','\x20OCR\x20from\x20URL','23151084DTcIfe','3acMLIN','882fbmlvL','35230RlawNp','trim','1884kkpVzR','string','length','/client/queryFileUrl','Preview:\x20recognize\x20','scene','str','description','imageUrl','count','3786636jhCRoF','IdCard','108670erETxQ','POST','general','File\x20URL\x20response\x20missing\x20fileUrl.','filePath'];a37_0x250d=function(){return _0x123c17;};return a37_0x250d();}
@@ -1 +1 @@
1
- const a38_0xc4aee9=a38_0x225a;(function(_0x6f9485,_0x3679b9){const _0x51829c=a38_0x225a,_0x2908df=_0x6f9485();while(!![]){try{const _0x2e1568=-parseInt(_0x51829c(0xfe))/0x1+-parseInt(_0x51829c(0x102))/0x2*(parseInt(_0x51829c(0x101))/0x3)+-parseInt(_0x51829c(0x107))/0x4+-parseInt(_0x51829c(0xff))/0x5+parseInt(_0x51829c(0x105))/0x6+parseInt(_0x51829c(0xfa))/0x7*(parseInt(_0x51829c(0xf9))/0x8)+parseInt(_0x51829c(0x106))/0x9*(parseInt(_0x51829c(0xfc))/0xa);if(_0x2e1568===_0x3679b9)break;else _0x2908df['push'](_0x2908df['shift']());}catch(_0x384de6){_0x2908df['push'](_0x2908df['shift']());}}}(a38_0x26b8,0x9cf25));function a38_0x225a(_0x22539c,_0x3734be){_0x22539c=_0x22539c-0xf8;const _0x26b875=a38_0x26b8();let _0x225ad5=_0x26b875[_0x22539c];return _0x225ad5;}import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a38_0x26b8(){const _0x29251b=['permit','appCode','8phDFnY','2013662fomEfw','str','20tVxCVM','roleType','341659cwzfUi','2085230yXymrz','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','501VWZCCA','8300FsGagG','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','dataset-get','2515014vqCoYt','8063163PEFYfZ','1616164EMlogF','role','runtime'];a38_0x26b8=function(){return _0x29251b;};return a38_0x26b8();}export const permitDatasetGet={'service':a38_0xc4aee9(0x10a),'command':a38_0xc4aee9(0x104),'description':a38_0xc4aee9(0x103),'risk':'read','flags':[{'name':a38_0xc4aee9(0x108),'type':'string','description':a38_0xc4aee9(0x100)}],async 'execute'(_0x194d17){const _0x5a9e67=a38_0xc4aee9,_0xe2c4c2=_0x194d17[_0x5a9e67(0xfb)](_0x5a9e67(0x108))['trim']();if(!_0xe2c4c2)return{'ok':!![],'data':{'scope':'runtime','datasets':await listRuntimeDatasetRolePermits(_0x194d17[_0x5a9e67(0xf8)])}};const _0xb0ed0e=await resolveRuntimeRoleRef(_0x194d17[_0x5a9e67(0xf8)],_0xe2c4c2);return{'ok':!![],'data':{'scope':_0x5a9e67(0x109),'role':{'id':_0xb0ed0e['id'],'roleName':_0xb0ed0e['roleName'],'roleType':_0xb0ed0e[_0x5a9e67(0xfd)]},'datasets':await listRuntimeDatasetPermits(_0x194d17[_0x5a9e67(0xf8)],_0xb0ed0e['id'])}};}};
1
+ const a38_0x505fce=a38_0x4269;function a38_0x4269(_0x7db238,_0x5eaade){_0x7db238=_0x7db238-0x172;const _0x3a7001=a38_0x3a70();let _0x42696c=_0x3a7001[_0x7db238];return _0x42696c;}(function(_0x18494b,_0x1ffebf){const _0x3f3435=a38_0x4269,_0x217fe9=_0x18494b();while(!![]){try{const _0x55c09a=parseInt(_0x3f3435(0x176))/0x1*(parseInt(_0x3f3435(0x185))/0x2)+parseInt(_0x3f3435(0x17b))/0x3*(parseInt(_0x3f3435(0x180))/0x4)+-parseInt(_0x3f3435(0x175))/0x5*(parseInt(_0x3f3435(0x17d))/0x6)+-parseInt(_0x3f3435(0x17a))/0x7+-parseInt(_0x3f3435(0x17f))/0x8+-parseInt(_0x3f3435(0x177))/0x9+-parseInt(_0x3f3435(0x181))/0xa*(-parseInt(_0x3f3435(0x172))/0xb);if(_0x55c09a===_0x1ffebf)break;else _0x217fe9['push'](_0x217fe9['shift']());}catch(_0x5df1d3){_0x217fe9['push'](_0x217fe9['shift']());}}}(a38_0x3a70,0x80279));function a38_0x3a70(){const _0x2d24b8=['role','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','46dkxGPN','appCode','22vNpdGb','permit','read','4941070bnHRLw','10276QQBNuZ','116919CtBjPH','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','runtime','5569095mDJjIp','12534zNZTtT','dataset-get','6JRHKrD','string','5723976KAfWoY','812STNqaT','9763630OOyUsU','str'];a38_0x3a70=function(){return _0x2d24b8;};return a38_0x3a70();}import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a38_0x505fce(0x173),'command':a38_0x505fce(0x17c),'description':a38_0x505fce(0x184),'risk':a38_0x505fce(0x174),'flags':[{'name':a38_0x505fce(0x183),'type':a38_0x505fce(0x17e),'description':a38_0x505fce(0x178)}],async 'execute'(_0x9a557b){const _0x3c9cae=a38_0x505fce,_0x2ffd08=_0x9a557b[_0x3c9cae(0x182)]('role')['trim']();if(!_0x2ffd08)return{'ok':!![],'data':{'scope':_0x3c9cae(0x179),'datasets':await listRuntimeDatasetRolePermits(_0x9a557b[_0x3c9cae(0x186)])}};const _0x387415=await resolveRuntimeRoleRef(_0x9a557b[_0x3c9cae(0x186)],_0x2ffd08);return{'ok':!![],'data':{'scope':_0x3c9cae(0x179),'role':{'id':_0x387415['id'],'roleName':_0x387415['roleName'],'roleType':_0x387415['roleType']},'datasets':await listRuntimeDatasetPermits(_0x9a557b[_0x3c9cae(0x186)],_0x387415['id'])}};}};
@@ -1 +1 @@
1
- const a39_0x36c29d=a39_0x38b9;(function(_0x59f6b8,_0x407011){const _0x82559b=a39_0x38b9,_0xd41708=_0x59f6b8();while(!![]){try{const _0x22c7b7=-parseInt(_0x82559b(0xd5))/0x1*(parseInt(_0x82559b(0x101))/0x2)+-parseInt(_0x82559b(0x105))/0x3+-parseInt(_0x82559b(0xf5))/0x4+parseInt(_0x82559b(0xee))/0x5*(-parseInt(_0x82559b(0xe8))/0x6)+parseInt(_0x82559b(0x106))/0x7+parseInt(_0x82559b(0xd1))/0x8+parseInt(_0x82559b(0xe2))/0x9;if(_0x22c7b7===_0x407011)break;else _0xd41708['push'](_0xd41708['shift']());}catch(_0x2a01d0){_0xd41708['push'](_0xd41708['shift']());}}}(a39_0x1aeb,0x64304));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';function a39_0x1aeb(){const _0x5a49ad=['changed','push','includes','str','254802iWdRuS','DATA_ROW','permitId','\x20does\x20not\x20expose\x20','roles','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','5nsDVOe','find','DATA_DELETE','dataset-','DATA_CREATE','appCode','dataPermitList','2108424ESFIwS','DATA_UPDATE','string','operation','/client/permit/resource/batch-save-dataset','before','--actions','map','Comma-separated\x20runtime\x20dataset\x20codes','join','\x20already\x20reflects\x20','resourceName','4eDPBCd','DATA_DETAIL','permit','dataset-set','1138887FkXHPG','4867828mSzOaw','rolePermit','resourceType','actions','permitList','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','--datasets','bool','1371440AnPYfh','Preview:\x20','build','grant','278149xzwvmE','POST','role','\x20selected\x20runtime\x20dataset\x20actions','toUpperCase','revoke','high-risk-write','Dataset\x20','length','Invalid\x20dataset\x20actions:\x20','validation','datasets','datasetCodes','9441342tuwEgw','body'];a39_0x1aeb=function(){return _0x5a49ad;};return a39_0x1aeb();}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_0x36c29d(0xf2),a39_0x36c29d(0xf6),a39_0x36c29d(0xf0),a39_0x36c29d(0x102),'DATA_EXPORT',a39_0x36c29d(0xe9)],DATASETS_FLAG={'name':'datasets','type':a39_0x36c29d(0xf7),'required':!![],'description':a39_0x36c29d(0xfd)},ACTIONS_FLAG={'name':'actions','type':a39_0x36c29d(0xf7),'required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS['join'](',\x20')};function a39_0x38b9(_0x57b88c,_0x17681a){_0x57b88c=_0x57b88c-0xce;const _0x1aeb60=a39_0x1aeb();let _0x38b929=_0x1aeb60[_0x57b88c];return _0x38b929;}async function prepare(_0xbdb43e){const _0x5d4459=a39_0x36c29d;await assertRuntimePermissionManager(_0xbdb43e['appCode']);const _0x8acca=assertGrantOrRevoke(_0xbdb43e[_0x5d4459(0xd0)](_0x5d4459(0xd4)),_0xbdb43e[_0x5d4459(0xd0)](_0x5d4459(0xda))),_0x18a87e=await resolveRuntimeRoleRef(_0xbdb43e[_0x5d4459(0xf3)],_0xbdb43e[_0x5d4459(0xe7)](_0x5d4459(0xd7)));assertRuntimePermitRoleConfigurable(_0x18a87e);const _0x71d8a9=splitRefs(_0xbdb43e[_0x5d4459(0xe7)](_0x5d4459(0xe0)),_0x5d4459(0xcf)),_0x4f01bd=[...new Set(splitRefs(_0xbdb43e[_0x5d4459(0xe7)](_0x5d4459(0x109)),_0x5d4459(0xfb))[_0x5d4459(0xfc)](_0x2e471f=>_0x2e471f[_0x5d4459(0xd9)]()))],_0x4a0c99=_0x4f01bd['filter'](_0x493164=>!DATA_ACTIONS[_0x5d4459(0xe6)](_0x493164));if(_0x4a0c99[_0x5d4459(0xdd)]>0x0)throw CliErrors['validation'](_0x5d4459(0xde)+_0x4a0c99[_0x5d4459(0xfe)](',\x20')+'.');const _0x1ade73=await listRuntimeDatasetRolePermits(_0xbdb43e['appCode']),_0x59242b=await listRuntimePermitRoles(_0xbdb43e['appCode']),_0x1e1c4c=[],_0x5674cf=[],_0x3c822c=[],_0x17c30e=[];for(const _0x5eb613 of _0x71d8a9){const _0x78110f=_0x1ade73['find'](_0x4d99be=>_0x4d99be['datasetCode']===_0x5eb613);if(!_0x78110f)throw CliErrors[_0x5d4459(0xdf)]('Runtime\x20dataset\x20'+_0x5eb613+'\x20was\x20not\x20found.');for(const _0x3c9e85 of _0x4f01bd){const _0x163e4c=_0x78110f[_0x5d4459(0xf4)][_0x5d4459(0xef)](_0x5248b5=>_0x5248b5[_0x5d4459(0x108)]===_0x3c9e85);if(!_0x163e4c)throw CliErrors[_0x5d4459(0xdf)](_0x5d4459(0xdc)+_0x5eb613+_0x5d4459(0xeb)+_0x3c9e85+'.');const _0x2fdedf=applyRuntimeRolePermission(_0x163e4c[_0x5d4459(0x107)],_0x18a87e,_0x59242b,_0x8acca);_0x5674cf[_0x5d4459(0xe5)]({'datasetCode':_0x5eb613,'resourceType':_0x3c9e85,'rolePermit':_0x163e4c['rolePermit']}),_0x3c822c[_0x5d4459(0xe5)]({'datasetCode':_0x5eb613,'resourceType':_0x3c9e85,'rolePermit':_0x2fdedf[_0x5d4459(0xec)]}),_0x2fdedf[_0x5d4459(0xe4)]?_0x1e1c4c[_0x5d4459(0xe5)]({..._0x163e4c[_0x5d4459(0xea)]!=null?{'id':_0x163e4c[_0x5d4459(0xea)]}:{},'appCode':_0xbdb43e[_0x5d4459(0xf3)],'resourceCode':_0x5eb613,'resourceType':_0x3c9e85,'resourceName':_0x163e4c[_0x5d4459(0x100)],'rolePermit':_0x2fdedf['roles']}):_0x17c30e[_0x5d4459(0xe5)](_0x5eb613+'/'+_0x3c9e85+_0x5d4459(0xff)+_0x8acca+'\x20for\x20role\x20'+_0x18a87e['id']+'.');}}return{'operation':_0x8acca,'role':_0x18a87e,'datasetCodes':_0x71d8a9,'actions':_0x4f01bd,'permitList':_0x1e1c4c,'before':_0x5674cf,'after':_0x3c822c,'warnings':_0x17c30e};}export const permitDatasetSet={'service':a39_0x36c29d(0x103),'command':a39_0x36c29d(0x104),'description':a39_0x36c29d(0xce),'risk':a39_0x36c29d(0xdb),'confirmationDescription':a39_0x36c29d(0xed),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x419d23){const _0x5ba90f=a39_0x36c29d;assertGrantOrRevoke(_0x419d23[_0x5ba90f(0xd0)](_0x5ba90f(0xd4)),_0x419d23[_0x5ba90f(0xd0)](_0x5ba90f(0xda)));},async 'dryRun'(_0xeb1e72){const _0x44b36e=a39_0x36c29d,_0x403e97=await prepare(_0xeb1e72);return dryRun(_0x44b36e(0xd6),_0x44b36e(0xf9))[_0x44b36e(0xe3)]({'appCode':_0xeb1e72[_0x44b36e(0xf3)],'permitList':_0x403e97[_0x44b36e(0x10a)]})['description'](_0x44b36e(0xd2)+_0x403e97['operation']+_0x44b36e(0xd8))[_0x44b36e(0xd3)]();},async 'execute'(_0x45398e){const _0x52b031=a39_0x36c29d,_0x5b6538=await prepare(_0x45398e);return _0x5b6538[_0x52b031(0x10a)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0x45398e['appCode'],_0x5b6538[_0x52b031(0x10a)]),{'ok':!![],'data':runtimePermitWriteResult(_0x52b031(0xf1)+_0x5b6538[_0x52b031(0xf8)],{'roleId':_0x5b6538['role']['id'],'datasetCodes':_0x5b6538[_0x52b031(0xe1)],'actions':_0x5b6538[_0x52b031(0x109)]},_0x5b6538[_0x52b031(0xfa)],_0x5b6538['after'],{'method':_0x52b031(0xd6),'path':'/client/permit/resource/batch-save-dataset'},_0x5b6538['warnings'])};}};
1
+ const a39_0x159f44=a39_0x3ddb;(function(_0x539223,_0x172044){const _0x536fab=a39_0x3ddb,_0x5837f4=_0x539223();while(!![]){try{const _0x3fb0f0=parseInt(_0x536fab(0x1cd))/0x1*(-parseInt(_0x536fab(0x1ac))/0x2)+-parseInt(_0x536fab(0x1b6))/0x3*(parseInt(_0x536fab(0x1aa))/0x4)+parseInt(_0x536fab(0x1c4))/0x5+parseInt(_0x536fab(0x1bd))/0x6*(parseInt(_0x536fab(0x1a8))/0x7)+-parseInt(_0x536fab(0x1a5))/0x8*(parseInt(_0x536fab(0x1bf))/0x9)+-parseInt(_0x536fab(0x1b5))/0xa+-parseInt(_0x536fab(0x1c2))/0xb*(-parseInt(_0x536fab(0x19f))/0xc);if(_0x3fb0f0===_0x172044)break;else _0x5837f4['push'](_0x5837f4['shift']());}catch(_0x3e2302){_0x5837f4['push'](_0x5837f4['shift']());}}}(a39_0x1c0c,0x4e783));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';function a39_0x3ddb(_0x45326e,_0x6337c7){_0x45326e=_0x45326e-0x18e;const _0x1c0c01=a39_0x1c0c();let _0x3ddbb1=_0x1c0c01[_0x45326e];return _0x3ddbb1;}const DATA_ACTIONS=[a39_0x159f44(0x19a),a39_0x159f44(0x1be),a39_0x159f44(0x1a1),a39_0x159f44(0x194),a39_0x159f44(0x191),'DATA_ROW'],DATASETS_FLAG={'name':a39_0x159f44(0x1b2),'type':'string','required':!![],'description':'Comma-separated\x20runtime\x20dataset\x20codes'},ACTIONS_FLAG={'name':a39_0x159f44(0x1ad),'type':'string','required':!![],'description':'Comma-separated\x20actions:\x20'+DATA_ACTIONS[a39_0x159f44(0x1bc)](',\x20')};function a39_0x1c0c(){const _0x414b4c=['after','dataset-set','datasets','/client/permit/resource/batch-save-dataset','before','48620aqBKGG','4113HWcBkF','role','operation','resourceType','str','roles','join','1126050SYPyFZ','DATA_UPDATE','18SebkUR','\x20selected\x20runtime\x20dataset\x20actions','POST','41195BOLvBS','datasetCode','119835HGYQYo','Invalid\x20dataset\x20actions:\x20','revoke','includes','\x20was\x20not\x20found.','Runtime\x20dataset\x20','high-risk-write','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','warnings','1pLDkwQ','body','permitList','Dataset\x20','dataset-','DATA_EXPORT','--datasets','validation','DATA_DETAIL','push','changed','permit','find','datasetCodes','DATA_CREATE','length','Preview:\x20','\x20already\x20reflects\x20','permitId','4476vAAYUL','map','DATA_DELETE','\x20does\x20not\x20expose\x20','rolePermit','filter','1507264OzoWTz','description','\x20for\x20role\x20','7tzyXfj','grant','1220xzOlqI','appCode','974566smJaaT','actions','bool','--actions'];a39_0x1c0c=function(){return _0x414b4c;};return a39_0x1c0c();}async function prepare(_0xc5e954){const _0x443907=a39_0x159f44;await assertRuntimePermissionManager(_0xc5e954[_0x443907(0x1ab)]);const _0x593492=assertGrantOrRevoke(_0xc5e954[_0x443907(0x1ae)](_0x443907(0x1a9)),_0xc5e954[_0x443907(0x1ae)](_0x443907(0x1c6))),_0x327ae7=await resolveRuntimeRoleRef(_0xc5e954[_0x443907(0x1ab)],_0xc5e954[_0x443907(0x1ba)](_0x443907(0x1b7)));assertRuntimePermitRoleConfigurable(_0x327ae7);const _0x2b5a26=splitRefs(_0xc5e954['str'](_0x443907(0x1b2)),_0x443907(0x192)),_0x156177=[...new Set(splitRefs(_0xc5e954[_0x443907(0x1ba)]('actions'),_0x443907(0x1af))[_0x443907(0x1a0)](_0x40ada7=>_0x40ada7['toUpperCase']()))],_0x1eed50=_0x156177[_0x443907(0x1a4)](_0x3a3500=>!DATA_ACTIONS[_0x443907(0x1c7)](_0x3a3500));if(_0x1eed50[_0x443907(0x19b)]>0x0)throw CliErrors['validation'](_0x443907(0x1c5)+_0x1eed50[_0x443907(0x1bc)](',\x20')+'.');const _0x331ae8=await listRuntimeDatasetRolePermits(_0xc5e954[_0x443907(0x1ab)]),_0x37722=await listRuntimePermitRoles(_0xc5e954['appCode']),_0x20bb2c=[],_0x4bb4e9=[],_0x1ea316=[],_0x26d8f0=[];for(const _0x4a2f0f of _0x2b5a26){const _0x1a0f3f=_0x331ae8[_0x443907(0x198)](_0x5ba156=>_0x5ba156[_0x443907(0x1c3)]===_0x4a2f0f);if(!_0x1a0f3f)throw CliErrors['validation'](_0x443907(0x1c9)+_0x4a2f0f+_0x443907(0x1c8));for(const _0x560de2 of _0x156177){const _0x25c2fa=_0x1a0f3f['dataPermitList'][_0x443907(0x198)](_0x354a63=>_0x354a63[_0x443907(0x1b9)]===_0x560de2);if(!_0x25c2fa)throw CliErrors[_0x443907(0x193)](_0x443907(0x18f)+_0x4a2f0f+_0x443907(0x1a2)+_0x560de2+'.');const _0x517a71=applyRuntimeRolePermission(_0x25c2fa[_0x443907(0x1a3)],_0x327ae7,_0x37722,_0x593492);_0x4bb4e9[_0x443907(0x195)]({'datasetCode':_0x4a2f0f,'resourceType':_0x560de2,'rolePermit':_0x25c2fa[_0x443907(0x1a3)]}),_0x1ea316[_0x443907(0x195)]({'datasetCode':_0x4a2f0f,'resourceType':_0x560de2,'rolePermit':_0x517a71[_0x443907(0x1bb)]}),_0x517a71[_0x443907(0x196)]?_0x20bb2c[_0x443907(0x195)]({..._0x25c2fa['permitId']!=null?{'id':_0x25c2fa[_0x443907(0x19e)]}:{},'appCode':_0xc5e954[_0x443907(0x1ab)],'resourceCode':_0x4a2f0f,'resourceType':_0x560de2,'resourceName':_0x25c2fa['resourceName'],'rolePermit':_0x517a71['roles']}):_0x26d8f0[_0x443907(0x195)](_0x4a2f0f+'/'+_0x560de2+_0x443907(0x19d)+_0x593492+_0x443907(0x1a7)+_0x327ae7['id']+'.');}}return{'operation':_0x593492,'role':_0x327ae7,'datasetCodes':_0x2b5a26,'actions':_0x156177,'permitList':_0x20bb2c,'before':_0x4bb4e9,'after':_0x1ea316,'warnings':_0x26d8f0};}export const permitDatasetSet={'service':a39_0x159f44(0x197),'command':a39_0x159f44(0x1b1),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','risk':a39_0x159f44(0x1ca),'confirmationDescription':a39_0x159f44(0x1cb),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x8675b9){const _0x2a9744=a39_0x159f44;assertGrantOrRevoke(_0x8675b9[_0x2a9744(0x1ae)]('grant'),_0x8675b9[_0x2a9744(0x1ae)]('revoke'));},async 'dryRun'(_0x47b025){const _0x54b8ca=a39_0x159f44,_0x553e7a=await prepare(_0x47b025);return dryRun(_0x54b8ca(0x1c1),_0x54b8ca(0x1b3))[_0x54b8ca(0x1ce)]({'appCode':_0x47b025[_0x54b8ca(0x1ab)],'permitList':_0x553e7a[_0x54b8ca(0x18e)]})[_0x54b8ca(0x1a6)](_0x54b8ca(0x19c)+_0x553e7a[_0x54b8ca(0x1b8)]+_0x54b8ca(0x1c0))['build']();},async 'execute'(_0xa5a393){const _0x1d9e9e=a39_0x159f44,_0x2fdded=await prepare(_0xa5a393);return _0x2fdded[_0x1d9e9e(0x18e)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0xa5a393[_0x1d9e9e(0x1ab)],_0x2fdded[_0x1d9e9e(0x18e)]),{'ok':!![],'data':runtimePermitWriteResult(_0x1d9e9e(0x190)+_0x2fdded[_0x1d9e9e(0x1b8)],{'roleId':_0x2fdded[_0x1d9e9e(0x1b7)]['id'],'datasetCodes':_0x2fdded[_0x1d9e9e(0x199)],'actions':_0x2fdded[_0x1d9e9e(0x1ad)]},_0x2fdded[_0x1d9e9e(0x1b4)],_0x2fdded[_0x1d9e9e(0x1b0)],{'method':'POST','path':_0x1d9e9e(0x1b3)},_0x2fdded[_0x1d9e9e(0x1cc)])};}};
@@ -1 +1 @@
1
- (function(_0x5a994e,_0x33e898){const _0x1a1ca3=a40_0x11f6,_0xf447de=_0x5a994e();while(!![]){try{const _0x3831ef=-parseInt(_0x1a1ca3(0x1aa))/0x1*(parseInt(_0x1a1ca3(0x1a9))/0x2)+-parseInt(_0x1a1ca3(0x1a8))/0x3*(parseInt(_0x1a1ca3(0x1ab))/0x4)+-parseInt(_0x1a1ca3(0x1ac))/0x5+-parseInt(_0x1a1ca3(0x1a7))/0x6*(parseInt(_0x1a1ca3(0x1a6))/0x7)+parseInt(_0x1a1ca3(0x1a4))/0x8+-parseInt(_0x1a1ca3(0x1a5))/0x9+parseInt(_0x1a1ca3(0x1a3))/0xa*(parseInt(_0x1a1ca3(0x1ad))/0xb);if(_0x3831ef===_0x33e898)break;else _0xf447de['push'](_0xf447de['shift']());}catch(_0x2019f8){_0xf447de['push'](_0xf447de['shift']());}}}(a40_0x2228,0xda062));import{permitPageGet}from'../../commands/permit/page-get.js';function a40_0x2228(){const _0x2e8106=['171jWDbXU','25268vofECG','105xFghyf','68532AQqmWJ','5762750uTmEwW','8074wQdZdd','67890RUjHjJ','10611608FdXCPC','8439570Rwlllr','28420xzbDSy','1512xNlwEE'];a40_0x2228=function(){return _0x2e8106;};return a40_0x2228();}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';function a40_0x11f6(_0x3ee72e,_0x5e493b){_0x3ee72e=_0x3ee72e-0x1a3;const _0x22284e=a40_0x2228();let _0x11f61e=_0x22284e[_0x3ee72e];return _0x11f61e;}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x25352b,_0xd1f189){const _0x39dd65=a40_0x5bc4,_0x494c78=_0x25352b();while(!![]){try{const _0x379dc4=parseInt(_0x39dd65(0x70))/0x1*(-parseInt(_0x39dd65(0x6e))/0x2)+-parseInt(_0x39dd65(0x6b))/0x3+parseInt(_0x39dd65(0x67))/0x4+-parseInt(_0x39dd65(0x68))/0x5+-parseInt(_0x39dd65(0x69))/0x6*(-parseInt(_0x39dd65(0x6d))/0x7)+-parseInt(_0x39dd65(0x6f))/0x8*(parseInt(_0x39dd65(0x6a))/0x9)+parseInt(_0x39dd65(0x6c))/0xa;if(_0x379dc4===_0xd1f189)break;else _0x494c78['push'](_0x494c78['shift']());}catch(_0x1dcad2){_0x494c78['push'](_0x494c78['shift']());}}}(a40_0xb7fb,0x5d1e7));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_0xb7fb(){const _0x2303be=['529970amIXeL','611664CQYNtO','81513ftHbRL','1954707MsWUuE','10661780XsHzZZ','49eHCknm','145648FfrZAI','208zFVtKF','7SmSpro','417768EOQVqd'];a40_0xb7fb=function(){return _0x2303be;};return a40_0xb7fb();}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a40_0x5bc4(_0x3b3cae,_0x3cacc0){_0x3b3cae=_0x3b3cae-0x67;const _0xb7fb0=a40_0xb7fb();let _0x5bc448=_0xb7fb0[_0x3b3cae];return _0x5bc448;}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- const a41_0x62176c=a41_0x49c4;(function(_0x34d785,_0x4cf1bc){const _0x95ccf7=a41_0x49c4,_0x14814c=_0x34d785();while(!![]){try{const _0x36e4ac=parseInt(_0x95ccf7(0x144))/0x1+-parseInt(_0x95ccf7(0x148))/0x2+parseInt(_0x95ccf7(0x13d))/0x3*(-parseInt(_0x95ccf7(0x140))/0x4)+parseInt(_0x95ccf7(0x142))/0x5*(-parseInt(_0x95ccf7(0x14b))/0x6)+parseInt(_0x95ccf7(0x146))/0x7*(parseInt(_0x95ccf7(0x149))/0x8)+-parseInt(_0x95ccf7(0x143))/0x9+-parseInt(_0x95ccf7(0x147))/0xa*(-parseInt(_0x95ccf7(0x14a))/0xb);if(_0x36e4ac===_0x4cf1bc)break;else _0x14814c['push'](_0x14814c['shift']());}catch(_0x589060){_0x14814c['push'](_0x14814c['shift']());}}}(a41_0x558f,0x1f752));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a41_0x62176c(0x141),'command':a41_0x62176c(0x13e),'description':a41_0x62176c(0x13f),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x5c50e7){const _0x59f9f1=a41_0x62176c,_0x442cdd=await getRuntimePagePermit(_0x5c50e7['num'](_0x59f9f1(0x145)));return{'ok':!![],'data':{'scope':'runtime','page':projectRuntimePagePermit(_0x442cdd)}};}};function a41_0x49c4(_0x49b3e9,_0x4968b2){_0x49b3e9=_0x49b3e9-0x13d;const _0x558f36=a41_0x558f();let _0x49c417=_0x558f36[_0x49b3e9];return _0x49c417;}function a41_0x558f(){const _0x4ffee1=['permit','595NojWig','503586hZGpJh','126198cZdkbh','menu-id','20783vbZaDN','3705410sQiyEt','271270bpGgyq','488gjxZVB','11lZrhUt','7746bUFXhC','305670PvcwrU','page-get','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','8XKzgvM'];a41_0x558f=function(){return _0x4ffee1;};return a41_0x558f();}
1
+ function a41_0x1b53(){const _0x5c6b36=['3QfKthm','3333128UlOGij','5eYRyQg','1707572ShXNhY','672uaOSZa','38310nbnAmQ','3787371XRWYoe','1165102xdfPqL','num','50610laULDM','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','page-get','27545990WIOYWM','permit'];a41_0x1b53=function(){return _0x5c6b36;};return a41_0x1b53();}const a41_0x495286=a41_0xf518;(function(_0x57e83d,_0x5e0e4c){const _0xd024ee=a41_0xf518,_0x51104b=_0x57e83d();while(!![]){try{const _0x4a1a74=parseInt(_0xd024ee(0x13d))/0x1+parseInt(_0xd024ee(0x149))/0x2*(-parseInt(_0xd024ee(0x142))/0x3)+-parseInt(_0xd024ee(0x145))/0x4*(parseInt(_0xd024ee(0x144))/0x5)+-parseInt(_0xd024ee(0x147))/0x6*(parseInt(_0xd024ee(0x146))/0x7)+-parseInt(_0xd024ee(0x143))/0x8+-parseInt(_0xd024ee(0x148))/0x9+parseInt(_0xd024ee(0x140))/0xa;if(_0x4a1a74===_0x5e0e4c)break;else _0x51104b['push'](_0x51104b['shift']());}catch(_0x1fafb0){_0x51104b['push'](_0x51104b['shift']());}}}(a41_0x1b53,0x54501));import{getRuntimePagePermit}from'../../core/api-client.js';function a41_0xf518(_0x671c75,_0x44626a){_0x671c75=_0x671c75-0x13c;const _0x1b5322=a41_0x1b53();let _0xf51803=_0x1b5322[_0x671c75];return _0xf51803;}import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a41_0x495286(0x141),'command':a41_0x495286(0x13f),'description':a41_0x495286(0x13e),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x3356b1){const _0x58bc33=a41_0x495286,_0x12be37=await getRuntimePagePermit(_0x3356b1[_0x58bc33(0x13c)]('menu-id'));return{'ok':!![],'data':{'scope':'runtime','page':projectRuntimePagePermit(_0x12be37)}};}};
@@ -1 +1 @@
1
- const a42_0x29c2e4=a42_0x3b3a;(function(_0xfab520,_0x8ec148){const _0x13d051=a42_0x3b3a,_0x26751f=_0xfab520();while(!![]){try{const _0x2e7a0e=-parseInt(_0x13d051(0xed))/0x1+-parseInt(_0x13d051(0xe0))/0x2+parseInt(_0x13d051(0x100))/0x3+-parseInt(_0x13d051(0xe6))/0x4+-parseInt(_0x13d051(0xe8))/0x5*(-parseInt(_0x13d051(0xe1))/0x6)+-parseInt(_0x13d051(0xf8))/0x7*(parseInt(_0x13d051(0xfd))/0x8)+-parseInt(_0x13d051(0xe2))/0x9*(-parseInt(_0x13d051(0xf2))/0xa);if(_0x2e7a0e===_0x8ec148)break;else _0x26751f['push'](_0x26751f['shift']());}catch(_0x35a3ff){_0x26751f['push'](_0x26751f['shift']());}}}(a42_0x3053,0x68f39));function a42_0x3b3a(_0x6d2ef2,_0x590274){_0x6d2ef2=_0x6d2ef2-0xde;const _0x3053b0=a42_0x3053();let _0x3b3af8=_0x3053b0[_0x6d2ef2];return _0x3b3af8;}function a42_0x3053(){const _0x1f0e1e=['menu-id','POST','str','page-set','permit','2287803DTqHXG','\x20does\x20not\x20expose\x20','menuId','key','join','8CVVmfR','Set\x20selected\x20runtime\x20page\x20permission\x20slots','body','351069rSMXCu','build','slots','/client/permit/page/save','page','1713064PkmQRi','12IWhDwe','12784383wmWcHI','\x20does\x20not\x20belong\x20to\x20app\x20','修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','appCode','1127652UhoERV','Menu\x20','1817430FisLVI','high-risk-write','num','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','validation','369327mGrfgP','length','Preview:\x20update\x20page\x20permission\x20slots\x20','flag','rolePermit','10ADGyRJ'];a42_0x3053=function(){return _0x1f0e1e;};return a42_0x3053();}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(_0x1b43b8){const _0x317c22=a42_0x3b3a;await assertRuntimePermissionManager(_0x1b43b8[_0x317c22(0xe5)]);const _0x4b04cd=_0x1b43b8[_0x317c22(0xea)](_0x317c22(0xf3)),_0x34df66=await getRuntimePagePermit(_0x4b04cd);if(_0x34df66[_0x317c22(0xe5)]&&_0x34df66[_0x317c22(0xe5)]!==_0x1b43b8[_0x317c22(0xe5)])throw CliErrors['validation'](_0x317c22(0xe7)+_0x4b04cd+_0x317c22(0xe3)+_0x1b43b8[_0x317c22(0xe5)]+'.');const _0x27a81c=structuredClone(_0x34df66),_0x336acf=[];for(const _0x2414fa of PAGE_SLOT_SPECS){if(_0x1b43b8[_0x317c22(0xf0)](_0x2414fa[_0x317c22(0xf0)])===undefined)continue;const _0x2b7a46=_0x34df66[_0x2414fa[_0x317c22(0xfb)]];if(!_0x2b7a46)throw CliErrors[_0x317c22(0xec)]('Page\x20menu\x20'+_0x4b04cd+_0x317c22(0xf9)+_0x2414fa['key']+'.');_0x2b7a46[_0x317c22(0xf1)]=await resolveRuntimePermitRoles(_0x1b43b8[_0x317c22(0xe5)],splitRefs(_0x1b43b8[_0x317c22(0xf5)](_0x2414fa['flag']),'--'+_0x2414fa[_0x317c22(0xf0)]),_0x2414fa['allowSelf']),_0x336acf['push'](_0x2414fa[_0x317c22(0xfb)]);}if(_0x336acf[_0x317c22(0xee)]===0x0)throw CliErrors[_0x317c22(0xec)](_0x317c22(0xeb));return{'menuId':_0x4b04cd,'page':_0x34df66,'before':_0x27a81c,'slots':_0x336acf};}export const permitPageSet={'service':a42_0x29c2e4(0xf7),'command':a42_0x29c2e4(0xf6),'description':a42_0x29c2e4(0xfe),'risk':a42_0x29c2e4(0xe9),'confirmationDescription':a42_0x29c2e4(0xe4),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x39397f){const _0x50b154=a42_0x29c2e4,_0x44cbd7=await prepare(_0x39397f);return dryRun(_0x50b154(0xf4),_0x50b154(0xde))[_0x50b154(0xff)](_0x44cbd7[_0x50b154(0xdf)])['description'](_0x50b154(0xef)+_0x44cbd7[_0x50b154(0x102)][_0x50b154(0xfc)](',\x20'))[_0x50b154(0x101)]();},async 'execute'(_0x108623){const _0x435085=a42_0x29c2e4,_0x304658=await prepare(_0x108623),_0x59d664=await saveRuntimePagePermit(_0x304658[_0x435085(0xdf)]);return{'ok':!![],'data':runtimePermitWriteResult(_0x435085(0xf6),{'menuId':_0x304658[_0x435085(0xfa)],'slots':_0x304658[_0x435085(0x102)]},projectRuntimePagePermit(_0x304658['before']),projectRuntimePagePermit(_0x59d664),{'method':_0x435085(0xf4),'path':_0x435085(0xde)})};}};
1
+ function a42_0x156d(_0x145077,_0x4d7458){_0x145077=_0x145077-0x191;const _0x2103f2=a42_0x2103();let _0x156df7=_0x2103f2[_0x145077];return _0x156df7;}const a42_0x443a0b=a42_0x156d;(function(_0x215596,_0x227121){const _0x437840=a42_0x156d,_0x3c6180=_0x215596();while(!![]){try{const _0x4a67ad=-parseInt(_0x437840(0x196))/0x1*(parseInt(_0x437840(0x1ad))/0x2)+parseInt(_0x437840(0x197))/0x3+parseInt(_0x437840(0x19f))/0x4+parseInt(_0x437840(0x195))/0x5+parseInt(_0x437840(0x1b4))/0x6*(-parseInt(_0x437840(0x1af))/0x7)+parseInt(_0x437840(0x1a7))/0x8+parseInt(_0x437840(0x1b1))/0x9*(-parseInt(_0x437840(0x19e))/0xa);if(_0x4a67ad===_0x227121)break;else _0x3c6180['push'](_0x3c6180['shift']());}catch(_0x457099){_0x3c6180['push'](_0x3c6180['shift']());}}}(a42_0x2103,0x33251));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';function a42_0x2103(){const _0x269d74=['\x20does\x20not\x20belong\x20to\x20app\x20','permit','num','134116GvbBNq','push','141134pKPPxs','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','4820139rBtEmq','key','body','12bgHNiL','description','high-risk-write','str','page','length','Preview:\x20update\x20page\x20permission\x20slots\x20','1228440pMnYny','1txJGue','334245jxnTuD','POST','rolePermit','validation','allowSelf','build','\x20does\x20not\x20expose\x20','10eSKqaW','1207284ydrfkq','flag','menu-id','appCode','page-set','join','Menu\x20','/client/permit/page/save','1548144KZwSBO','menuId','slots'];a42_0x2103=function(){return _0x269d74;};return a42_0x2103();}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(_0x55c2ce){const _0x53e535=a42_0x156d;await assertRuntimePermissionManager(_0x55c2ce[_0x53e535(0x1a2)]);const _0x2d4b00=_0x55c2ce[_0x53e535(0x1ac)](_0x53e535(0x1a1)),_0x1a1be9=await getRuntimePagePermit(_0x2d4b00);if(_0x1a1be9['appCode']&&_0x1a1be9['appCode']!==_0x55c2ce[_0x53e535(0x1a2)])throw CliErrors['validation'](_0x53e535(0x1a5)+_0x2d4b00+_0x53e535(0x1aa)+_0x55c2ce[_0x53e535(0x1a2)]+'.');const _0x4ae52b=structuredClone(_0x1a1be9),_0x1dc5f2=[];for(const _0x4da71f of PAGE_SLOT_SPECS){if(_0x55c2ce['flag'](_0x4da71f[_0x53e535(0x1a0)])===undefined)continue;const _0x21f8cf=_0x1a1be9[_0x4da71f['key']];if(!_0x21f8cf)throw CliErrors[_0x53e535(0x19a)]('Page\x20menu\x20'+_0x2d4b00+_0x53e535(0x19d)+_0x4da71f[_0x53e535(0x1b2)]+'.');_0x21f8cf[_0x53e535(0x199)]=await resolveRuntimePermitRoles(_0x55c2ce[_0x53e535(0x1a2)],splitRefs(_0x55c2ce[_0x53e535(0x191)](_0x4da71f[_0x53e535(0x1a0)]),'--'+_0x4da71f['flag']),_0x4da71f[_0x53e535(0x19b)]),_0x1dc5f2[_0x53e535(0x1ae)](_0x4da71f[_0x53e535(0x1b2)]);}if(_0x1dc5f2[_0x53e535(0x193)]===0x0)throw CliErrors[_0x53e535(0x19a)](_0x53e535(0x1b0));return{'menuId':_0x2d4b00,'page':_0x1a1be9,'before':_0x4ae52b,'slots':_0x1dc5f2};}export const permitPageSet={'service':a42_0x443a0b(0x1ab),'command':a42_0x443a0b(0x1a3),'description':'Set\x20selected\x20runtime\x20page\x20permission\x20slots','risk':a42_0x443a0b(0x1b6),'confirmationDescription':'修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x270bfe){const _0x4a4811=a42_0x443a0b,_0x4ca54e=await prepare(_0x270bfe);return dryRun('POST',_0x4a4811(0x1a6))[_0x4a4811(0x1b3)](_0x4ca54e[_0x4a4811(0x192)])[_0x4a4811(0x1b5)](_0x4a4811(0x194)+_0x4ca54e[_0x4a4811(0x1a9)][_0x4a4811(0x1a4)](',\x20'))[_0x4a4811(0x19c)]();},async 'execute'(_0x757459){const _0x390bb7=a42_0x443a0b,_0x33271f=await prepare(_0x757459),_0x471801=await saveRuntimePagePermit(_0x33271f[_0x390bb7(0x192)]);return{'ok':!![],'data':runtimePermitWriteResult('page-set',{'menuId':_0x33271f[_0x390bb7(0x1a8)],'slots':_0x33271f[_0x390bb7(0x1a9)]},projectRuntimePagePermit(_0x33271f['before']),projectRuntimePagePermit(_0x471801),{'method':_0x390bb7(0x198),'path':_0x390bb7(0x1a6)})};}};