@lovrabet/lovrabet-cli 2.2.4 → 2.2.5-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 (160) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.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.d.ts +7 -0
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.d.ts +1 -1
  148. package/lib/skills/runtime-skill-sync.js +1 -1
  149. package/lib/skills/skill-presence.js +1 -1
  150. package/lib/utils/apply-jq-filter.js +1 -1
  151. package/lib/utils/logger.js +1 -1
  152. package/lib/utils/lossless-json.js +1 -1
  153. package/lib/utils/params.js +1 -1
  154. package/lib/utils/platform.js +1 -1
  155. package/lib/utils/update-notice.js +1 -1
  156. package/lib/utils/version.js +1 -1
  157. package/lib/utils/write-cli-side-channel.js +1 -1
  158. package/package.json +1 -1
  159. package/skills/lovrabet/SKILL.md +1 -1
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a28_0x17ea(){const _0x190c4c=['Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','dataset','1491078uQlmaI','313835losShd','string','sdk-doc','8eKvOVd','14258ikQQpR','798OXbHMa','appCode','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','trim','83gfZBfX','1467CIifsQ','99GxdvCI','1978404DFTxFO','str','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','3624ftQoZX','473000visDIk','14250PCafaT'];a28_0x17ea=function(){return _0x190c4c;};return a28_0x17ea();}const a28_0x17de47=a28_0x52f1;(function(_0x5cb87f,_0x53a181){const _0x37b9cf=a28_0x52f1,_0x1e6263=_0x5cb87f();while(!![]){try{const _0x2aafba=-parseInt(_0x37b9cf(0x15c))/0x1*(parseInt(_0x37b9cf(0x157))/0x2)+-parseInt(_0x37b9cf(0x152))/0x3+-parseInt(_0x37b9cf(0x156))/0x4*(-parseInt(_0x37b9cf(0x153))/0x5)+-parseInt(_0x37b9cf(0x14d))/0x6*(-parseInt(_0x37b9cf(0x158))/0x7)+-parseInt(_0x37b9cf(0x14e))/0x8+parseInt(_0x37b9cf(0x15d))/0x9*(-parseInt(_0x37b9cf(0x14f))/0xa)+parseInt(_0x37b9cf(0x149))/0xb*(parseInt(_0x37b9cf(0x14a))/0xc);if(_0x2aafba===_0x53a181)break;else _0x1e6263['push'](_0x1e6263['shift']());}catch(_0x2d2044){_0x1e6263['push'](_0x1e6263['shift']());}}}(a28_0x17ea,0x48c4c));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0x52f1(_0x46051b,_0x8790b7){_0x46051b=_0x46051b-0x149;const _0x17eadf=a28_0x17ea();let _0x52f1b3=_0x17eadf[_0x46051b];return _0x52f1b3;}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x17de47(0x14c);export function formatDatasetSdkMarkdown(_0x1f4e22){const _0x4d14f8=a28_0x17de47,_0x45f3c2=typeof _0x1f4e22===_0x4d14f8(0x154)?_0x1f4e22[_0x4d14f8(0x15b)]():'';return _0x45f3c2||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x17de47(0x151),'command':a28_0x17de47(0x155),'description':a28_0x17de47(0x150),'risk':'read','flags':[{...CODE_FLAG,'description':a28_0x17de47(0x15a)}],async 'execute'(_0x6b3452){const _0x22cc60=a28_0x17de47,_0x289fec=_0x6b3452[_0x22cc60(0x14b)]('code'),_0x3817a5=await getDatasetSdkUsageDoc(_0x289fec,_0x6b3452[_0x22cc60(0x159)]);return{'ok':!![],'data':{'code':_0x289fec,'appCode':_0x6b3452['appCode'],'markdown':formatDatasetSdkMarkdown(_0x3817a5)}};}};
1
+ function a28_0x1a73(_0x1623e3,_0x4a2502){_0x1623e3=_0x1623e3-0xb5;const _0x32122a=a28_0x3212();let _0x1a73e5=_0x32122a[_0x1623e3];return _0x1a73e5;}const a28_0x4d63eb=a28_0x1a73;(function(_0x4a4336,_0x32af3a){const _0x4994fd=a28_0x1a73,_0x5b36fd=_0x4a4336();while(!![]){try{const _0x15b72c=-parseInt(_0x4994fd(0xb8))/0x1+-parseInt(_0x4994fd(0xc6))/0x2*(-parseInt(_0x4994fd(0xb9))/0x3)+parseInt(_0x4994fd(0xc5))/0x4*(-parseInt(_0x4994fd(0xc3))/0x5)+parseInt(_0x4994fd(0xc2))/0x6*(-parseInt(_0x4994fd(0xc4))/0x7)+-parseInt(_0x4994fd(0xc7))/0x8+parseInt(_0x4994fd(0xc8))/0x9*(-parseInt(_0x4994fd(0xc0))/0xa)+-parseInt(_0x4994fd(0xc1))/0xb*(-parseInt(_0x4994fd(0xb6))/0xc);if(_0x15b72c===_0x32af3a)break;else _0x5b36fd['push'](_0x5b36fd['shift']());}catch(_0x23cb07){_0x5b36fd['push'](_0x5b36fd['shift']());}}}(a28_0x3212,0xb9222));function a28_0x3212(){const _0x496fd1=['string','450ZxyHdV','5363578MJwhAr','186lKmrnZ','3592535Mkegzf','135849JbFUvA','4jXAHsv','6766rTgrDF','3047592kBvWst','64341oiSLbS','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','84NmVSJv','str','791103utCiUx','141GoqMdc','dataset','read','appCode','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','code'];a28_0x3212=function(){return _0x496fd1;};return a28_0x3212();}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x35761e){const _0xc4c13e=a28_0x1a73,_0x52ee88=typeof _0x35761e===_0xc4c13e(0xbf)?_0x35761e['trim']():'';return _0x52ee88||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x4d63eb(0xba),'command':'sdk-doc','description':a28_0x4d63eb(0xbd),'risk':a28_0x4d63eb(0xbb),'flags':[{...CODE_FLAG,'description':a28_0x4d63eb(0xb5)}],async 'execute'(_0x427493){const _0x286495=a28_0x4d63eb,_0x30a8a1=_0x427493[_0x286495(0xb7)](_0x286495(0xbe)),_0xd2c26e=await getDatasetSdkUsageDoc(_0x30a8a1,_0x427493['appCode']);return{'ok':!![],'data':{'code':_0x30a8a1,'appCode':_0x427493[_0x286495(0xbc)],'markdown':formatDatasetSdkMarkdown(_0xd2c26e)}};}};
@@ -1 +1 @@
1
- const a29_0x4d1fd8=a29_0x2f33;(function(_0x17b5bc,_0x42635c){const _0x2f4564=a29_0x2f33,_0x39c0cf=_0x17b5bc();while(!![]){try{const _0x478cdf=parseInt(_0x2f4564(0x122))/0x1*(parseInt(_0x2f4564(0x108))/0x2)+parseInt(_0x2f4564(0x146))/0x3+-parseInt(_0x2f4564(0x115))/0x4*(-parseInt(_0x2f4564(0x149))/0x5)+-parseInt(_0x2f4564(0x137))/0x6+parseInt(_0x2f4564(0x117))/0x7*(-parseInt(_0x2f4564(0x114))/0x8)+parseInt(_0x2f4564(0x107))/0x9*(parseInt(_0x2f4564(0x110))/0xa)+parseInt(_0x2f4564(0x148))/0xb*(-parseInt(_0x2f4564(0x14f))/0xc);if(_0x478cdf===_0x42635c)break;else _0x39c0cf['push'](_0x39c0cf['shift']());}catch(_0x62d220){_0x39c0cf['push'](_0x39c0cf['shift']());}}}(a29_0x4d56,0x66ffe));import a29_0x1dd661 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(_0x40221d){const _0x569cf0=a29_0x2f33,_0x38fc32=getCliVersion(),_0x400c44=buildConfigFromFlags({});await initGlobalEnvironment(_0x400c44),console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](CLI_BIN_NAME+'\x20doctor')),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)]('─'[_0x569cf0(0x14e)](0x32))),console[_0x569cf0(0xf5)](_0x569cf0(0x129)+_0x38fc32),console[_0x569cf0(0xf5)](_0x569cf0(0x132)+process[_0x569cf0(0x136)]),console['log'](_0x569cf0(0x14d)+process[_0x569cf0(0x112)]+'\x20'+process[_0x569cf0(0x109)]);const _0x5ddce9=inspectBuiltinSkill();console[_0x569cf0(0xf5)](),console['log'](a29_0x1dd661['bold']('\x20\x20Built-in\x20Skill')),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x124)[_0x569cf0(0x14e)](0x1e))),console[_0x569cf0(0xf5)](_0x569cf0(0xf6)+(_0x5ddce9[_0x569cf0(0x118)]===_0x569cf0(0x144)?a29_0x1dd661[_0x569cf0(0x133)](_0x569cf0(0x14b)):a29_0x1dd661[_0x569cf0(0x11c)]('✗\x20'+_0x5ddce9[_0x569cf0(0x118)]))),console[_0x569cf0(0xf5)](_0x569cf0(0x10f)+_0x5ddce9[_0x569cf0(0x11e)]),console[_0x569cf0(0xf5)](_0x569cf0(0xff)+(_0x5ddce9['skillVersion']||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x139)))),console[_0x569cf0(0xf5)](_0x569cf0(0x12b)+(_0x5ddce9[_0x569cf0(0x102)]||a29_0x1dd661['gray'](_0x569cf0(0x12d))));_0x5ddce9[_0x569cf0(0x118)]!=='current'&&console[_0x569cf0(0xf5)](_0x569cf0(0x11f)+_0x5ddce9[_0x569cf0(0xfa)]);_0x5ddce9[_0x569cf0(0x138)]&&console[_0x569cf0(0xf5)](_0x569cf0(0x13d)+_0x5ddce9['reason']);console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](_0x569cf0(0x120))),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)]('\x20\x20─'[_0x569cf0(0x14e)](0x1e)));const _0x5b0bd4=getGlobalConfigPath(),_0x51a223=getProjectConfigPath();console[_0x569cf0(0xf5)](_0x569cf0(0x12c)+(_0x5b0bd4||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x12d)))),console[_0x569cf0(0xf5)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x51a223||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x12d)))),console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](_0x569cf0(0x141))),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x124)[_0x569cf0(0x14e)](0x1e)));const _0x4b19d8=(_0x52d63e,_0x10dc1d)=>{const _0x1fec40=_0x569cf0;if(!_0x10dc1d){console[_0x1fec40(0xf5)]('\x20\x20'+_0x52d63e[_0x1fec40(0x150)](0x11)+'\x20'+a29_0x1dd661['gray'](_0x1fec40(0x134)));return;}const _0x570b31=inspectCliConfigJsonFile(_0x10dc1d);if(_0x570b31['status']==='ok')console[_0x1fec40(0xf5)]('\x20\x20'+_0x52d63e['padEnd'](0x11)+'\x20'+a29_0x1dd661[_0x1fec40(0x133)](_0x1fec40(0x130)));else{if(_0x570b31['status']===_0x1fec40(0x10d))console[_0x1fec40(0xf5)]('\x20\x20'+_0x52d63e[_0x1fec40(0x150)](0x11)+'\x20'+a29_0x1dd661[_0x1fec40(0x123)](_0x1fec40(0x13a)));else _0x570b31[_0x1fec40(0x113)]==='missing'?console[_0x1fec40(0xf5)]('\x20\x20'+_0x52d63e[_0x1fec40(0x150)](0x11)+'\x20'+a29_0x1dd661['gray']('(missing)')):(console[_0x1fec40(0xf5)]('\x20\x20'+_0x52d63e[_0x1fec40(0x150)](0x11)+'\x20'+a29_0x1dd661[_0x1fec40(0x11c)](_0x1fec40(0x12a))),console[_0x1fec40(0xf5)]('\x20\x20'+''[_0x1fec40(0x150)](0x11)+'\x20'+a29_0x1dd661[_0x1fec40(0x11c)](_0x570b31[_0x1fec40(0x10b)])));}};_0x4b19d8('Global',_0x5b0bd4),_0x4b19d8(_0x569cf0(0x10e),_0x51a223),console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)]('\x20\x20Merged\x20Config')),console[_0x569cf0(0xf5)](a29_0x1dd661['gray'](_0x569cf0(0x124)[_0x569cf0(0x14e)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x400c44['appCode']||a29_0x1dd661[_0x569cf0(0x11c)]('(not\x20set)'))),console[_0x569cf0(0xf5)](_0x569cf0(0x101)+_0x400c44[_0x569cf0(0x13e)]);const _0x3a3391=isLegacyCompatConfigKey(_0x569cf0(0x13b))?a29_0x1dd661[_0x569cf0(0xfc)](_0x400c44[_0x569cf0(0x13b)]+_0x569cf0(0x119)):_0x400c44[_0x569cf0(0x13b)];console[_0x569cf0(0xf5)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3a3391),console[_0x569cf0(0xf5)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x400c44[_0x569cf0(0x11a)]||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0xf7)))),console['log'](_0x569cf0(0x147)+(_0x400c44[_0x569cf0(0x127)]||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0xf7)))),console[_0x569cf0(0xf5)](_0x569cf0(0xfb)+(_0x400c44[_0x569cf0(0x104)]||a29_0x1dd661['gray'](_0x569cf0(0x11b)+DEFAULT_CONFIG_VALUES[_0x569cf0(0x104)]+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x400c44['pageSize']??a29_0x1dd661[_0x569cf0(0xfc)]('(default)'))),console[_0x569cf0(0xf5)](_0x569cf0(0x14a)+_0x400c44[_0x569cf0(0x111)]),console[_0x569cf0(0xf5)](_0x569cf0(0x126)+_0x400c44[_0x569cf0(0x116)]),console[_0x569cf0(0xf5)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console['log'](_0x569cf0(0x121)+(_0x400c44['accessKey']?a29_0x1dd661[_0x569cf0(0x133)](_0x569cf0(0xf4)+_0x400c44[_0x569cf0(0x145)][_0x569cf0(0xf8)]+')'):a29_0x1dd661[_0x569cf0(0xfc)]('(none)'))),console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](_0x569cf0(0x13c))),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)]('\x20\x20─'[_0x569cf0(0x14e)](0x1e))),console[_0x569cf0(0xf5)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x569cf0(0xf5)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x569cf0(0xf5)](_0x569cf0(0x13f)+getRuntimeDomain()),console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](_0x569cf0(0x142))),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfc)]('\x20\x20─'[_0x569cf0(0x14e)](0x1e)));const _0x30700f=inspectServiceRegistry();console['log']('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30700f['registryPath']),console[_0x569cf0(0xf5)](_0x569cf0(0x12f)+formatServiceRegistryStatus(_0x30700f)),console['log']('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30700f['serviceCount']),console[_0x569cf0(0xf5)](_0x569cf0(0x100)+_0x30700f[_0x569cf0(0x131)]);for(const _0x950e9c of _0x30700f[_0x569cf0(0x105)]){console[_0x569cf0(0xf5)]('\x20\x20'+(_0x950e9c[_0x569cf0(0x106)]+':')['padEnd'](0x11)+'\x20'+(_0x950e9c[_0x569cf0(0x140)]||a29_0x1dd661[_0x569cf0(0xfc)](_0x569cf0(0x125)))+'\x20('+_0x950e9c[_0x569cf0(0x131)]+_0x569cf0(0x14c)),console[_0x569cf0(0xf5)]('\x20\x20'+''[_0x569cf0(0x150)](0x11)+_0x569cf0(0x12e)+_0x950e9c[_0x569cf0(0x10c)]['path']);}return console[_0x569cf0(0xf5)](),console[_0x569cf0(0xf5)](a29_0x1dd661[_0x569cf0(0xfd)](_0x569cf0(0x103))),console[_0x569cf0(0xf5)](a29_0x1dd661['gray'](_0x569cf0(0x124)[_0x569cf0(0x14e)](0x1e))),console[_0x569cf0(0xf5)](_0x569cf0(0xfe)+a29_0x1dd661[_0x569cf0(0x133)](AUTH_MODE[_0x569cf0(0x135)]+_0x569cf0(0x128))),console[_0x569cf0(0xf5)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x1dd661[_0x569cf0(0xfc)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x569cf0(0xf5)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1300fc){const _0x4b2680=a29_0x2f33;if(_0x1300fc['status']==='ok')return a29_0x1dd661[_0x4b2680(0x133)]('✓\x20Loaded');if(_0x1300fc[_0x4b2680(0x113)]===_0x4b2680(0x143))return a29_0x1dd661[_0x4b2680(0xfc)](_0x4b2680(0x12d));if(_0x1300fc[_0x4b2680(0x113)]===_0x4b2680(0x10d))return a29_0x1dd661[_0x4b2680(0x123)]('⚠\x20Empty');return a29_0x1dd661['red']('✗\x20Invalid'+(_0x1300fc[_0x4b2680(0x10b)]?':\x20'+_0x1300fc[_0x4b2680(0x10b)]:''));}function a29_0x4d56(){const _0xf38d4a=['✓\x20Valid\x20JSON','commandCount','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','(no\x20file)','ClientAk','version','2393604wIYMdQ','reason','(missing)','⚠\x20Empty\x20(treated\x20as\x20{})','locale','\x20\x20API\x20Endpoints','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','\x20\x20runtimeDomain:\x20\x20\x20','name','\x20\x20Config\x20JSON','\x20\x20Service\x20Tree','missing','current','accessKey','1567734AzIxfO','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','121wBXHxM','5PQmqTL','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✓\x20current','\x20commands)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','repeat','1101432xjmslN','padEnd','(set,\x20length=','log','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','length','read','repairCommand','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','bold','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20\x20Auth','format','services','serviceCode','1947987BqVKGq','488914dupojx','arch','doctor','message','source','empty','Project','\x20\x20Package\x20Version:\x20','30rCHacn','riskLevel','platform','status','24numFhH','123212JylXEt','verbose','246435gtuHVq','state','\x20(legacy/compat\x20only)','defaultApp','(default:\x20','red','Diagnose\x20CLI\x20configuration\x20and\x20environment','packageVersion','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','3zDATXz','yellow','\x20\x20─','(unnamed)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20(accessKey)','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20Imported\x20from:\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x4d56=function(){return _0xf38d4a;};return a29_0x4d56();}function a29_0x2f33(_0x24a497,_0x590473){_0x24a497=_0x24a497-0xf4;const _0x4d5609=a29_0x4d56();let _0x2f33d0=_0x4d5609[_0x24a497];return _0x2f33d0;}export const doctorDefinition={'service':a29_0x4d1fd8(0x10a),'command':'check','description':a29_0x4d1fd8(0x11d),'risk':a29_0x4d1fd8(0xf9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x254266=a29_0x44c0;(function(_0x50a65e,_0x4857d4){const _0x19c094=a29_0x44c0,_0x3e3fab=_0x50a65e();while(!![]){try{const _0x3d45c4=-parseInt(_0x19c094(0xde))/0x1+-parseInt(_0x19c094(0xbf))/0x2+-parseInt(_0x19c094(0xbd))/0x3+parseInt(_0x19c094(0x103))/0x4*(parseInt(_0x19c094(0xd2))/0x5)+parseInt(_0x19c094(0xee))/0x6*(parseInt(_0x19c094(0xe4))/0x7)+-parseInt(_0x19c094(0xad))/0x8*(-parseInt(_0x19c094(0xb9))/0x9)+-parseInt(_0x19c094(0xeb))/0xa*(parseInt(_0x19c094(0xe7))/0xb);if(_0x3d45c4===_0x4857d4)break;else _0x3e3fab['push'](_0x3e3fab['shift']());}catch(_0x30c689){_0x3e3fab['push'](_0x3e3fab['shift']());}}}(a29_0x22d2,0xca9c5));function a29_0x22d2(){const _0xafd9b6=['\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','672723vHNmUo','installedPath','1132872doQpsf','Project','\x20Imported\x20from:\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20Config\x20JSON','(missing)','accessKey','(not\x20found)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','✗\x20Invalid\x20JSON','(none)','platform','reason','red','message','28895brjHOK','✓\x20current','path','serviceCount','\x20\x20Config\x20Files','verbose','riskLevel','format','repairCommand','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','packageVersion','empty','19481hTZMit','read','✓\x20Loaded','env','\x20(legacy/compat\x20only)','length','35ElohcO','\x20doctor','name','55OPwMRF','log','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','status','1050710iFYVuk','Global','commandCount','1394994VwIyJo','missing','padEnd','(not\x20set)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','yellow','registryPath','repeat','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Merged\x20Config','services','current','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','green','source','gray','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','bold','ClientAk','692IgRiBI','\x20(accessKey)','state','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','25152mwLpNU','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','currentApp','pageSize','appCode','\x20\x20─','✓\x20Valid\x20JSON','\x20\x20Built-in\x20Skill','⚠\x20Empty','(set,\x20length=','9WIQYHP'];a29_0x22d2=function(){return _0xafd9b6;};return a29_0x22d2();}import a29_0x35763f 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(_0x39479d){const _0x5a3e5d=a29_0x44c0,_0x469afc=getCliVersion(),_0x42a0a9=buildConfigFromFlags({});await initGlobalEnvironment(_0x42a0a9),console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0x101)](CLI_BIN_NAME+_0x5a3e5d(0xe5))),console[_0x5a3e5d(0xe8)](a29_0x35763f['gray']('─'[_0x5a3e5d(0xf5)](0x32))),console[_0x5a3e5d(0xe8)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x469afc),console[_0x5a3e5d(0xe8)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x5a3e5d(0xe8)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5a3e5d(0xce)]+'\x20'+process[_0x5a3e5d(0xb0)]);const _0x384962=inspectBuiltinSkill();console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0x101)](_0x5a3e5d(0xb6))),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)[_0x5a3e5d(0xf5)](0x1e))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xca)+(_0x384962[_0x5a3e5d(0x105)]===_0x5a3e5d(0xfa)?a29_0x35763f[_0x5a3e5d(0xfc)](_0x5a3e5d(0xd3)):a29_0x35763f[_0x5a3e5d(0xd0)]('✗\x20'+_0x384962[_0x5a3e5d(0x105)]))),console[_0x5a3e5d(0xe8)]('\x20\x20Package\x20Version:\x20'+_0x384962[_0x5a3e5d(0xdc)]),console[_0x5a3e5d(0xe8)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x384962['skillVersion']||a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xc5)))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xf7)+(_0x384962[_0x5a3e5d(0xbe)]||a29_0x35763f['gray']('(not\x20found)')));_0x384962[_0x5a3e5d(0x105)]!==_0x5a3e5d(0xfa)&&console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xc2)+_0x384962[_0x5a3e5d(0xda)]);_0x384962[_0x5a3e5d(0xcf)]&&console[_0x5a3e5d(0xe8)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x384962[_0x5a3e5d(0xcf)]);console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0x101)](_0x5a3e5d(0xd6))),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)[_0x5a3e5d(0xf5)](0x1e)));const _0x1629cf=getGlobalConfigPath(),_0x432cfd=getProjectConfigPath();console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xc8)+(_0x1629cf||a29_0x35763f['gray'](_0x5a3e5d(0xc7)))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xaf)+(_0x432cfd||a29_0x35763f[_0x5a3e5d(0xfe)]('(not\x20found)'))),console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0x101)](_0x5a3e5d(0xc4))),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)[_0x5a3e5d(0xf5)](0x1e)));const _0x183025=(_0x3dc4c9,_0x56e19c)=>{const _0x51b3f5=_0x5a3e5d;if(!_0x56e19c){console[_0x51b3f5(0xe8)]('\x20\x20'+_0x3dc4c9[_0x51b3f5(0xf0)](0x11)+'\x20'+a29_0x35763f[_0x51b3f5(0xfe)]('(no\x20file)'));return;}const _0x1f1824=inspectCliConfigJsonFile(_0x56e19c);if(_0x1f1824[_0x51b3f5(0xea)]==='ok')console[_0x51b3f5(0xe8)]('\x20\x20'+_0x3dc4c9[_0x51b3f5(0xf0)](0x11)+'\x20'+a29_0x35763f[_0x51b3f5(0xfc)](_0x51b3f5(0xb5)));else{if(_0x1f1824[_0x51b3f5(0xea)]===_0x51b3f5(0xdd))console[_0x51b3f5(0xe8)]('\x20\x20'+_0x3dc4c9[_0x51b3f5(0xf0)](0x11)+'\x20'+a29_0x35763f[_0x51b3f5(0xf3)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x1f1824[_0x51b3f5(0xea)]===_0x51b3f5(0xef)?console['log']('\x20\x20'+_0x3dc4c9['padEnd'](0x11)+'\x20'+a29_0x35763f['gray'](_0x51b3f5(0xc5))):(console['log']('\x20\x20'+_0x3dc4c9[_0x51b3f5(0xf0)](0x11)+'\x20'+a29_0x35763f['red'](_0x51b3f5(0xcc))),console['log']('\x20\x20'+''[_0x51b3f5(0xf0)](0x11)+'\x20'+a29_0x35763f[_0x51b3f5(0xd0)](_0x1f1824['message'])));}};_0x183025(_0x5a3e5d(0xec),_0x1629cf),_0x183025(_0x5a3e5d(0xc0),_0x432cfd),console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f['bold'](_0x5a3e5d(0xf8))),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)['repeat'](0x1e))),console[_0x5a3e5d(0xe8)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x42a0a9[_0x5a3e5d(0xb3)]||a29_0x35763f[_0x5a3e5d(0xd0)](_0x5a3e5d(0xf1)))),console[_0x5a3e5d(0xe8)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x42a0a9[_0x5a3e5d(0xe1)]);const _0x3a1668=isLegacyCompatConfigKey(_0x5a3e5d(0x100))?a29_0x35763f['gray'](_0x42a0a9['locale']+_0x5a3e5d(0xe2)):_0x42a0a9[_0x5a3e5d(0x100)];console[_0x5a3e5d(0xe8)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3a1668),console[_0x5a3e5d(0xe8)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x42a0a9['defaultApp']||a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xcd)))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xfb)+(_0x42a0a9[_0x5a3e5d(0xb1)]||a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xcd)))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xbc)+(_0x42a0a9[_0x5a3e5d(0xd9)]||a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xc3)+DEFAULT_CONFIG_VALUES[_0x5a3e5d(0xd9)]+')'))),console['log'](_0x5a3e5d(0xae)+(_0x42a0a9[_0x5a3e5d(0xb2)]??a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xc9)))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xe9)+_0x42a0a9[_0x5a3e5d(0xd8)]),console['log'](_0x5a3e5d(0xac)+_0x42a0a9[_0x5a3e5d(0xd7)]),console[_0x5a3e5d(0xe8)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x5a3e5d(0x102)]),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xf2)+(_0x42a0a9[_0x5a3e5d(0xc6)]?a29_0x35763f[_0x5a3e5d(0xfc)](_0x5a3e5d(0xb8)+_0x42a0a9[_0x5a3e5d(0xc6)][_0x5a3e5d(0xe3)]+')'):a29_0x35763f[_0x5a3e5d(0xfe)]('(none)'))),console[_0x5a3e5d(0xe8)](),console['log'](a29_0x35763f[_0x5a3e5d(0x101)]('\x20\x20API\x20Endpoints')),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)['repeat'](0x1e))),console['log'](_0x5a3e5d(0xdb)+getApiDomain()),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xba)+getUserDomain()),console[_0x5a3e5d(0xe8)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0x101)]('\x20\x20Service\x20Tree')),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)]('\x20\x20─'[_0x5a3e5d(0xf5)](0x1e)));const _0xeedb59=inspectServiceRegistry();console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xab)+_0xeedb59[_0x5a3e5d(0xf4)]),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xff)+formatServiceRegistryStatus(_0xeedb59)),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xf6)+_0xeedb59[_0x5a3e5d(0xd5)]),console[_0x5a3e5d(0xe8)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xeedb59['commandCount']);for(const _0x4eb935 of _0xeedb59[_0x5a3e5d(0xf9)]){console[_0x5a3e5d(0xe8)]('\x20\x20'+(_0x4eb935['serviceCode']+':')[_0x5a3e5d(0xf0)](0x11)+'\x20'+(_0x4eb935[_0x5a3e5d(0xe6)]||a29_0x35763f[_0x5a3e5d(0xfe)]('(unnamed)'))+'\x20('+_0x4eb935[_0x5a3e5d(0xed)]+'\x20commands)'),console[_0x5a3e5d(0xe8)]('\x20\x20'+''['padEnd'](0x11)+_0x5a3e5d(0xc1)+_0x4eb935[_0x5a3e5d(0xfd)][_0x5a3e5d(0xd4)]);}return console[_0x5a3e5d(0xe8)](),console[_0x5a3e5d(0xe8)](a29_0x35763f['bold']('\x20\x20Auth')),console[_0x5a3e5d(0xe8)](a29_0x35763f[_0x5a3e5d(0xfe)](_0x5a3e5d(0xb4)[_0x5a3e5d(0xf5)](0x1e))),console['log']('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x35763f[_0x5a3e5d(0xfc)](AUTH_MODE['ClientAk']+_0x5a3e5d(0x104))),console[_0x5a3e5d(0xe8)](_0x5a3e5d(0xcb)+a29_0x35763f['gray'](_0x5a3e5d(0xbb))),console[_0x5a3e5d(0xe8)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2d8e49){const _0x54146d=a29_0x44c0;if(_0x2d8e49[_0x54146d(0xea)]==='ok')return a29_0x35763f['green'](_0x54146d(0xe0));if(_0x2d8e49[_0x54146d(0xea)]==='missing')return a29_0x35763f[_0x54146d(0xfe)](_0x54146d(0xc7));if(_0x2d8e49[_0x54146d(0xea)]==='empty')return a29_0x35763f[_0x54146d(0xf3)](_0x54146d(0xb7));return a29_0x35763f['red']('✗\x20Invalid'+(_0x2d8e49[_0x54146d(0xd1)]?':\x20'+_0x2d8e49['message']:''));}function a29_0x44c0(_0x866572,_0x50e544){_0x866572=_0x866572-0xab;const _0x22d2a1=a29_0x22d2();let _0x44c0f2=_0x22d2a1[_0x866572];return _0x44c0f2;}export const doctorDefinition={'service':'doctor','command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x254266(0xdf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x1d1a9e=a30_0x4902;(function(_0x3a4738,_0x12f7cf){const _0xf6857d=a30_0x4902,_0x162992=_0x3a4738();while(!![]){try{const _0x136432=parseInt(_0xf6857d(0xcf))/0x1+-parseInt(_0xf6857d(0xdc))/0x2*(parseInt(_0xf6857d(0xca))/0x3)+-parseInt(_0xf6857d(0xc0))/0x4+-parseInt(_0xf6857d(0xbd))/0x5*(-parseInt(_0xf6857d(0xc2))/0x6)+parseInt(_0xf6857d(0xce))/0x7+-parseInt(_0xf6857d(0xdd))/0x8+parseInt(_0xf6857d(0xd0))/0x9*(parseInt(_0xf6857d(0xc3))/0xa);if(_0x136432===_0x12f7cf)break;else _0x162992['push'](_0x162992['shift']());}catch(_0x1c74fa){_0x162992['push'](_0x162992['shift']());}}}(a30_0x2479,0x35806));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x4902(_0xa7d92a,_0x1ed759){_0xa7d92a=_0xa7d92a-0xb7;const _0x2479d4=a30_0x2479();let _0x4902ec=_0x2479d4[_0xa7d92a];return _0x4902ec;}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x1d1a9e(0xb8),'type':a30_0x1d1a9e(0xd6),'required':!![],'description':a30_0x1d1a9e(0xd1)},FILEPATH_FLAG={'name':a30_0x1d1a9e(0xd7),'type':'string','required':!![],'description':a30_0x1d1a9e(0xb9)},DOWNLOAD_FLAG={'name':a30_0x1d1a9e(0xc8),'type':a30_0x1d1a9e(0xbe),'description':a30_0x1d1a9e(0xc5)},LONG_TERM_FLAG={'name':a30_0x1d1a9e(0xdb),'type':a30_0x1d1a9e(0xbe),'description':a30_0x1d1a9e(0xc1)};function requireFilePath(_0xdb7fcb){const _0x36c4d1=a30_0x1d1a9e,_0x3b5dc4=_0xdb7fcb['trim']();if(!_0x3b5dc4)throw CliErrors[_0x36c4d1(0xc7)](_0x36c4d1(0xcb));return _0x3b5dc4;}const fileUpload={'service':a30_0x1d1a9e(0xb8),'command':'upload','description':a30_0x1d1a9e(0xbb),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x1a9629){const _0x2b80be=a30_0x1d1a9e,_0x1ebdbc=requireRuntimeUploadFile(_0x1a9629[_0x2b80be(0xd4)]('file'),_0x2b80be(0xbc));return dryRun(_0x2b80be(0xda),'/client/uploadFile')[_0x2b80be(0xc4)]({'appCode':_0x1a9629[_0x2b80be(0xc6)],'multipart':{'file':_0x1ebdbc}})['description'](_0x2b80be(0xbf)+_0x1ebdbc[_0x2b80be(0xb7)]+_0x2b80be(0xcc)+_0x1a9629['appCode'])[_0x2b80be(0xd2)]();},async 'execute'(_0x20bbd5){const _0x4c2c24=a30_0x1d1a9e,_0x5456e3=requireRuntimeUploadFile(_0x20bbd5[_0x4c2c24(0xd4)]('file'),_0x4c2c24(0xbc)),_0x41eb76=await uploadRuntimeFile(_0x20bbd5['appCode'],_0x5456e3[_0x4c2c24(0xb7)]);return{'ok':!![],'data':_0x41eb76,'message':_0x41eb76[_0x4c2c24(0xd8)]?_0x4c2c24(0xd9)+_0x41eb76[_0x4c2c24(0xd8)]+_0x4c2c24(0xc9):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x1d1a9e(0xb8),'command':a30_0x1d1a9e(0xcd),'description':a30_0x1d1a9e(0xba),'risk':a30_0x1d1a9e(0xd5),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4f71a4){const _0x2be07a=a30_0x1d1a9e,_0x455eae=requireFilePath(_0x4f71a4[_0x2be07a(0xd4)](_0x2be07a(0xd7))),_0x5de488=await queryRuntimeFileUrl(_0x455eae,{'download':_0x4f71a4[_0x2be07a(0xd3)]('download'),'longTerm':_0x4f71a4[_0x2be07a(0xd3)]('long-term')});return{'ok':!![],'data':_0x5de488};}};export const fileDefinitions=[fileUpload,fileQueryUrl];function a30_0x2479(){const _0x765b09=['Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','6avOjQA','426670QpVGXG','body','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','appCode','validation','download','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3xpffFr','filePath\x20is\x20required.','\x20to\x20runtime\x20app\x20','query-url','2964605IAAWYS','35142fwbewF','9FrRorn','Path\x20to\x20the\x20local\x20file\x20to\x20upload','build','bool','str','read','string','filepath','filePath','Uploaded\x20file:\x20','POST','long-term','15814WPxflB','1331024HqCnBS','path','file','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','File','245715oMUzfk','boolean','Preview:\x20upload\x20','628160sBUHzD'];a30_0x2479=function(){return _0x765b09;};return a30_0x2479();}
1
+ function a30_0x3db7(_0x14e1a1,_0xe79c0e){_0x14e1a1=_0x14e1a1-0xd5;const _0x11da4c=a30_0x11da();let _0x3db7b7=_0x11da4c[_0x14e1a1];return _0x3db7b7;}const a30_0x5bd9d7=a30_0x3db7;(function(_0x177da8,_0x56224a){const _0x5582fa=a30_0x3db7,_0x41681a=_0x177da8();while(!![]){try{const _0x234ef5=parseInt(_0x5582fa(0xe7))/0x1*(parseInt(_0x5582fa(0xdd))/0x2)+parseInt(_0x5582fa(0xdc))/0x3+-parseInt(_0x5582fa(0xf1))/0x4*(parseInt(_0x5582fa(0xf5))/0x5)+parseInt(_0x5582fa(0xe8))/0x6*(-parseInt(_0x5582fa(0xf0))/0x7)+-parseInt(_0x5582fa(0xdb))/0x8+parseInt(_0x5582fa(0xdf))/0x9+-parseInt(_0x5582fa(0xf6))/0xa*(-parseInt(_0x5582fa(0xe4))/0xb);if(_0x234ef5===_0x56224a)break;else _0x41681a['push'](_0x41681a['shift']());}catch(_0x488863){_0x41681a['push'](_0x41681a['shift']());}}}(a30_0x11da,0xe4f4d));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_0x5bd9d7(0xe2),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a30_0x5bd9d7(0xf8),'type':'string','required':!![],'description':a30_0x5bd9d7(0xd7)},DOWNLOAD_FLAG={'name':'download','type':a30_0x5bd9d7(0xe6),'description':a30_0x5bd9d7(0xf4)},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x11da(){const _0x111469=['bool','read','File','long-term','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','file','2293795MyXSgz','7051076RyEeDu','/client/uploadFile','POST','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','5PiePfZ','20lkBbdm','\x20to\x20runtime\x20app\x20','filepath','build','upload','filePath\x20is\x20required.','filePath','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Uploaded\x20file:\x20','path','validation','13551144nriGap','5450655WbNTPT','34436PfSEmo','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','2044089GqiHEb','query-url','appCode','string','Preview:\x20upload\x20','16535057bZGWuA','str','boolean','19mTiSIy','18IezOvj','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'];a30_0x11da=function(){return _0x111469;};return a30_0x11da();}function requireFilePath(_0x243c7a){const _0x27b503=a30_0x5bd9d7,_0x415566=_0x243c7a['trim']();if(!_0x415566)throw CliErrors[_0x27b503(0xda)](_0x27b503(0xd5));return _0x415566;}const fileUpload={'service':a30_0x5bd9d7(0xef),'command':a30_0x5bd9d7(0xfa),'description':a30_0x5bd9d7(0xde),'risk':a30_0x5bd9d7(0xeb),'flags':[FILE_FLAG],async 'dryRun'(_0x1828f1){const _0x1c15a0=a30_0x5bd9d7,_0x2221ef=requireRuntimeUploadFile(_0x1828f1[_0x1c15a0(0xe5)](_0x1c15a0(0xef)),_0x1c15a0(0xec));return dryRun(_0x1c15a0(0xf3),_0x1c15a0(0xf2))['body']({'appCode':_0x1828f1['appCode'],'multipart':{'file':_0x2221ef}})['description'](_0x1c15a0(0xe3)+_0x2221ef[_0x1c15a0(0xd9)]+_0x1c15a0(0xf7)+_0x1828f1['appCode'])[_0x1c15a0(0xf9)]();},async 'execute'(_0x51e41c){const _0x2f16bb=a30_0x5bd9d7,_0x3b7b6e=requireRuntimeUploadFile(_0x51e41c[_0x2f16bb(0xe5)](_0x2f16bb(0xef)),_0x2f16bb(0xec)),_0x5535b4=await uploadRuntimeFile(_0x51e41c[_0x2f16bb(0xe1)],_0x3b7b6e[_0x2f16bb(0xd9)]);return{'ok':!![],'data':_0x5535b4,'message':_0x5535b4['filePath']?_0x2f16bb(0xd8)+_0x5535b4[_0x2f16bb(0xd6)]+_0x2f16bb(0xe9):_0x2f16bb(0xee)};}},fileQueryUrl={'service':a30_0x5bd9d7(0xef),'command':a30_0x5bd9d7(0xe0),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x5bd9d7(0xeb),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x56f019){const _0x3d80db=a30_0x5bd9d7,_0x39aa4e=requireFilePath(_0x56f019[_0x3d80db(0xe5)]('filepath')),_0x13e5f4=await queryRuntimeFileUrl(_0x39aa4e,{'download':_0x56f019[_0x3d80db(0xea)]('download'),'longTerm':_0x56f019[_0x3d80db(0xea)](_0x3d80db(0xed))});return{'ok':!![],'data':_0x13e5f4};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x2a8276=a31_0x1e1c;(function(_0x24d07a,_0x49861c){const _0x2b9605=a31_0x1e1c,_0x1af73f=_0x24d07a();while(!![]){try{const _0x19dd78=-parseInt(_0x2b9605(0x16e))/0x1*(-parseInt(_0x2b9605(0x186))/0x2)+parseInt(_0x2b9605(0x189))/0x3+parseInt(_0x2b9605(0x185))/0x4+-parseInt(_0x2b9605(0x174))/0x5*(-parseInt(_0x2b9605(0x17c))/0x6)+-parseInt(_0x2b9605(0x177))/0x7*(parseInt(_0x2b9605(0x180))/0x8)+-parseInt(_0x2b9605(0x171))/0x9*(-parseInt(_0x2b9605(0x16b))/0xa)+parseInt(_0x2b9605(0x16d))/0xb*(-parseInt(_0x2b9605(0x193))/0xc);if(_0x19dd78===_0x49861c)break;else _0x1af73f['push'](_0x1af73f['shift']());}catch(_0x92f476){_0x1af73f['push'](_0x1af73f['shift']());}}}(a31_0x489d,0x67d07));import{existsSync,readFileSync}from'node:fs';function a31_0x1e1c(_0x912b37,_0x277aab){_0x912b37=_0x912b37-0x165;const _0x489d6c=a31_0x489d();let _0x1e1ca6=_0x489d6c[_0x912b37];return _0x1e1ca6;}import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';function a31_0x489d(){const _0x305ba7=['50DAuyLX','global','12632422SExAKg','1401zRCECE','utf8','boolean','977643LHqggH','object','Skip\x20confirmation\x20when\x20overwriting','170CIhEGu','project','env','203IERWFQ','Invalid\x20env\x20\x22','\x20\x20appcode:\x20','\x20\x20config:\x20\x20','log','69798atsLLu','validation','defaultApp','yes','41840zmNgBF','app','includes','appcode','Failed\x20to\x20parse\x20source\x20file:\x20','147024pMnkSO','202ImVpiY','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Imported\x20from\x20','1825143vWjJhf','\x20\x20default:\x20','newConfigFileName','message','entries','apps','file','Override\x20imported\x20default\x20env','join','cwd','12CNwabh','Override\x20imported\x20default\x20appcode','Write\x20to\x20global\x20(~/','\x22.\x20Allowed:\x20','string','parse','riskLevel'];a31_0x489d=function(){return _0x305ba7;};return a31_0x489d();}import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a31_0x2a8276(0x18f),'type':a31_0x2a8276(0x168),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x2a8276(0x183),'type':a31_0x2a8276(0x168),'description':a31_0x2a8276(0x165)},{'name':a31_0x2a8276(0x176),'type':'string','description':a31_0x2a8276(0x190),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2a8276(0x16c),'type':a31_0x2a8276(0x170),'description':a31_0x2a8276(0x166)+PRODUCT_CONFIG[a31_0x2a8276(0x18b)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x2a8276(0x17f),'type':'boolean','description':a31_0x2a8276(0x173),'default':![]}];export async function runAppImport(_0x387e5e){const _0x1a28b2=a31_0x2a8276,_0x5cd4f5=_0x387e5e[_0x1a28b2(0x16c)]?_0x1a28b2(0x16c):_0x1a28b2(0x175),_0x4b909e=resolveWriteConfigPath(_0x5cd4f5);await runFromImport(_0x387e5e,_0x4b909e);}async function runFromImport(_0x1bb653,_0x3806b2){const _0x14be2e=a31_0x2a8276,_0x25e65a=resolveFilePath(_0x1bb653[_0x14be2e(0x18f)]);if(!existsSync(_0x25e65a))throw CliErrors['validation']('Source\x20file\x20not\x20found:\x20'+_0x25e65a);const _0x515130=readSourceFile(_0x25e65a),_0xa412b4=convertToRuntimeConfig(_0x515130);_0x1bb653[_0x14be2e(0x183)]&&(_0xa412b4[_0x14be2e(0x183)]=String(_0x1bb653['appcode']));_0x1bb653[_0x14be2e(0x176)]&&(_0xa412b4[_0x14be2e(0x176)]=resolveImportEnv(_0x1bb653));if(!_0xa412b4[_0x14be2e(0x183)])throw CliErrors[_0x14be2e(0x17d)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','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`.');await writeImportConfig(_0x3806b2,_0xa412b4,_0x1bb653),console['log'](_0x14be2e(0x188)+_0x25e65a),console[_0x14be2e(0x17b)](_0x14be2e(0x17a)+_0x3806b2),console['log'](_0x14be2e(0x179)+_0xa412b4[_0x14be2e(0x183)]);if(_0xa412b4[_0x14be2e(0x17e)])console['log'](_0x14be2e(0x18a)+_0xa412b4[_0x14be2e(0x17e)]);}function convertToRuntimeConfig(_0x3764e4){const _0x315180=a31_0x2a8276;if(_0x3764e4[_0x315180(0x18e)]&&typeof _0x3764e4[_0x315180(0x18e)]===_0x315180(0x172))throw CliErrors[_0x315180(0x17d)](_0x315180(0x187),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x4ac573={};for(const _0x12ac86 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x3764e4[_0x12ac86]!==undefined&&(_0x4ac573[_0x12ac86]=_0x3764e4[_0x12ac86]);}return!_0x4ac573[_0x315180(0x16a)]&&(_0x4ac573[_0x315180(0x16a)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x4ac573;}async function writeImportConfig(_0x3e7493,_0x3023a7,_0x3b5e29){const _0x14462f=a31_0x2a8276;let _0x11295c={};existsSync(_0x3e7493)&&!_0x3b5e29[_0x14462f(0x17f)]&&(_0x11295c=readConfigFile(_0x3e7493));for(const [_0x320768,_0xd4d934]of Object[_0x14462f(0x18d)](_0x3023a7)){_0xd4d934!==undefined&&(_0x11295c[_0x320768]=_0xd4d934);}if(_0x11295c[_0x14462f(0x181)])delete _0x11295c[_0x14462f(0x181)];writeConfigFile(_0x3e7493,_0x11295c);}function resolveFilePath(_0x555d14){const _0x327b5a=a31_0x2a8276;return isAbsolute(_0x555d14)?_0x555d14:resolve(process[_0x327b5a(0x192)](),_0x555d14);}function readSourceFile(_0x345461){const _0x3fb9b6=a31_0x2a8276;try{const _0x373eee=readFileSync(_0x345461,{'encoding':_0x3fb9b6(0x16f)});return JSON[_0x3fb9b6(0x169)](_0x373eee);}catch(_0x50568e){throw CliErrors[_0x3fb9b6(0x17d)](_0x3fb9b6(0x184)+_0x50568e[_0x3fb9b6(0x18c)]);}}function resolveImportEnv(_0x5dd858){const _0x509fc2=a31_0x2a8276,_0x5ddf24=_0x5dd858[_0x509fc2(0x176)];if(_0x5ddf24===undefined||_0x5ddf24==='')return DEFAULT_CONFIG_VALUES[_0x509fc2(0x176)];if(!RUNTIME_ENV_VALUES[_0x509fc2(0x182)](_0x5ddf24))throw CliErrors[_0x509fc2(0x17d)](_0x509fc2(0x178)+_0x5ddf24+_0x509fc2(0x167)+RUNTIME_ENV_VALUES[_0x509fc2(0x191)](',\x20'));return _0x5ddf24;}
1
+ const a31_0x2158d7=a31_0x3483;(function(_0x59a6db,_0x692f9b){const _0x5d1485=a31_0x3483,_0x5cddc2=_0x59a6db();while(!![]){try{const _0x31b26b=-parseInt(_0x5d1485(0x148))/0x1+-parseInt(_0x5d1485(0x157))/0x2*(parseInt(_0x5d1485(0x137))/0x3)+parseInt(_0x5d1485(0x139))/0x4+parseInt(_0x5d1485(0x15d))/0x5+-parseInt(_0x5d1485(0x13f))/0x6+parseInt(_0x5d1485(0x140))/0x7*(parseInt(_0x5d1485(0x144))/0x8)+parseInt(_0x5d1485(0x13d))/0x9;if(_0x31b26b===_0x692f9b)break;else _0x5cddc2['push'](_0x5cddc2['shift']());}catch(_0x887087){_0x5cddc2['push'](_0x5cddc2['shift']());}}}(a31_0x3535,0xacb97));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';export const appImportFlagDefs=[{'name':a31_0x2158d7(0x147),'type':a31_0x2158d7(0x159),'description':a31_0x2158d7(0x136),'required':!![]},{'name':a31_0x2158d7(0x15b),'type':a31_0x2158d7(0x159),'description':a31_0x2158d7(0x156)},{'name':a31_0x2158d7(0x149),'type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2158d7(0x13a),'type':a31_0x2158d7(0x132),'description':a31_0x2158d7(0x14d)+PRODUCT_CONFIG[a31_0x2158d7(0x142)]+a31_0x2158d7(0x151),'default':![]},{'name':a31_0x2158d7(0x150),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x12c00a){const _0xcecfb3=a31_0x2158d7,_0x4892b1=_0x12c00a[_0xcecfb3(0x13a)]?_0xcecfb3(0x13a):_0xcecfb3(0x15e),_0x4d7196=resolveWriteConfigPath(_0x4892b1);await runFromImport(_0x12c00a,_0x4d7196);}async function runFromImport(_0x438546,_0x37d1b0){const _0x543817=a31_0x2158d7,_0x5603c7=resolveFilePath(_0x438546[_0x543817(0x147)]);if(!existsSync(_0x5603c7))throw CliErrors['validation'](_0x543817(0x14b)+_0x5603c7);const _0x3548c5=readSourceFile(_0x5603c7),_0x249f4b=convertToRuntimeConfig(_0x3548c5);_0x438546['appcode']&&(_0x249f4b[_0x543817(0x15b)]=String(_0x438546['appcode']));_0x438546[_0x543817(0x149)]&&(_0x249f4b[_0x543817(0x149)]=resolveImportEnv(_0x438546));if(!_0x249f4b[_0x543817(0x15b)])throw CliErrors[_0x543817(0x14f)](_0x543817(0x145),_0x543817(0x15c));await writeImportConfig(_0x37d1b0,_0x249f4b,_0x438546),console[_0x543817(0x158)](_0x543817(0x154)+_0x5603c7),console['log'](_0x543817(0x146)+_0x37d1b0),console[_0x543817(0x158)](_0x543817(0x133)+_0x249f4b['appcode']);if(_0x249f4b[_0x543817(0x15a)])console[_0x543817(0x158)](_0x543817(0x152)+_0x249f4b['defaultApp']);}function convertToRuntimeConfig(_0x5e24c3){const _0x4b1ec7=a31_0x2158d7;if(_0x5e24c3[_0x4b1ec7(0x134)]&&typeof _0x5e24c3[_0x4b1ec7(0x134)]===_0x4b1ec7(0x143))throw CliErrors[_0x4b1ec7(0x14f)](_0x4b1ec7(0x141),_0x4b1ec7(0x153));const _0x387213={};for(const _0x5ba268 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5e24c3[_0x5ba268]!==undefined&&(_0x387213[_0x5ba268]=_0x5e24c3[_0x5ba268]);}return!_0x387213[_0x4b1ec7(0x138)]&&(_0x387213[_0x4b1ec7(0x138)]=DEFAULT_CONFIG_VALUES[_0x4b1ec7(0x138)]),_0x387213;}async function writeImportConfig(_0x215aeb,_0x4ef6f,_0x17a060){const _0x308b6a=a31_0x2158d7;let _0x5515aa={};existsSync(_0x215aeb)&&!_0x17a060[_0x308b6a(0x150)]&&(_0x5515aa=readConfigFile(_0x215aeb));for(const [_0x360196,_0x158afe]of Object[_0x308b6a(0x135)](_0x4ef6f)){_0x158afe!==undefined&&(_0x5515aa[_0x360196]=_0x158afe);}if(_0x5515aa[_0x308b6a(0x155)])delete _0x5515aa['app'];writeConfigFile(_0x215aeb,_0x5515aa);}function a31_0x3535(){const _0x456899=[')\x20instead\x20of\x20project','\x20\x20default:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Imported\x20from\x20','app','Override\x20imported\x20default\x20appcode','12jEwWDh','log','string','defaultApp','appcode','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`.','1457875biNyko','project','boolean','\x20\x20appcode:\x20','apps','entries','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','281322UqnPMx','riskLevel','656404ldEYhp','global','Failed\x20to\x20parse\x20source\x20file:\x20','\x22.\x20Allowed:\x20','16350885deXeJV','includes','3978426KFVTTl','7OEtuWA','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','newConfigFileName','object','4816568fmriEI','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20\x20config:\x20\x20','file','941318baoOQo','env','cwd','Source\x20file\x20not\x20found:\x20','parse','Write\x20to\x20global\x20(~/','utf8','validation','yes'];a31_0x3535=function(){return _0x456899;};return a31_0x3535();}function a31_0x3483(_0x529284,_0x1825d9){_0x529284=_0x529284-0x132;const _0x353502=a31_0x3535();let _0x3483b9=_0x353502[_0x529284];return _0x3483b9;}function resolveFilePath(_0x51f048){const _0x1123f1=a31_0x2158d7;return isAbsolute(_0x51f048)?_0x51f048:resolve(process[_0x1123f1(0x14a)](),_0x51f048);}function readSourceFile(_0x593d31){const _0xf56e8e=a31_0x2158d7;try{const _0x459600=readFileSync(_0x593d31,{'encoding':_0xf56e8e(0x14e)});return JSON[_0xf56e8e(0x14c)](_0x459600);}catch(_0x5d8b59){throw CliErrors['validation'](_0xf56e8e(0x13b)+_0x5d8b59['message']);}}function resolveImportEnv(_0x2ff73d){const _0x5766f1=a31_0x2158d7,_0x26bcae=_0x2ff73d[_0x5766f1(0x149)];if(_0x26bcae===undefined||_0x26bcae==='')return DEFAULT_CONFIG_VALUES[_0x5766f1(0x149)];if(!RUNTIME_ENV_VALUES[_0x5766f1(0x13e)](_0x26bcae))throw CliErrors[_0x5766f1(0x14f)]('Invalid\x20env\x20\x22'+_0x26bcae+_0x5766f1(0x13c)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x26bcae;}
@@ -1 +1 @@
1
- const a32_0x11f8d6=a32_0xe0ff;(function(_0x577ae4,_0x3cc430){const _0x3b1bd1=a32_0xe0ff,_0x5dbc42=_0x577ae4();while(!![]){try{const _0x24fb47=parseInt(_0x3b1bd1(0xea))/0x1+-parseInt(_0x3b1bd1(0x10c))/0x2+-parseInt(_0x3b1bd1(0xfe))/0x3*(parseInt(_0x3b1bd1(0xf1))/0x4)+-parseInt(_0x3b1bd1(0x111))/0x5*(-parseInt(_0x3b1bd1(0xe5))/0x6)+parseInt(_0x3b1bd1(0xe1))/0x7+parseInt(_0x3b1bd1(0xef))/0x8+parseInt(_0x3b1bd1(0xda))/0x9;if(_0x24fb47===_0x3cc430)break;else _0x5dbc42['push'](_0x5dbc42['shift']());}catch(_0x410586){_0x5dbc42['push'](_0x5dbc42['shift']());}}}(a32_0xfa07,0xa1bc8));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x11f8d6(0x108),'type':a32_0x11f8d6(0xd3),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':'file','type':a32_0x11f8d6(0xd3),'required':!![],'description':a32_0x11f8d6(0xd8)},QUERY_FLAG={'name':a32_0x11f8d6(0x101),'type':a32_0x11f8d6(0xd3),'required':!![],'description':a32_0x11f8d6(0x10e)},TOPK_FLAG={'name':a32_0x11f8d6(0xfa),'type':a32_0x11f8d6(0xf9),'description':a32_0x11f8d6(0xe9)};function readKnowledgeFile(_0x1173b5){const _0x47a076=a32_0x11f8d6;if(!_0x1173b5)throw CliErrors['validation'](_0x47a076(0xdc));if(!existsSync(_0x1173b5))throw CliErrors[_0x47a076(0x109)](_0x47a076(0xd9)+_0x1173b5);if(!statSync(_0x1173b5)[_0x47a076(0xe7)]())throw CliErrors[_0x47a076(0x109)](_0x47a076(0xe3)+_0x1173b5);return readFileSync(_0x1173b5,_0x47a076(0xee));}function a32_0xe0ff(_0x440a0d,_0x3b0524){_0x440a0d=_0x440a0d-0xd2;const _0xfa07c9=a32_0xfa07();let _0xe0ffc8=_0xfa07c9[_0x440a0d];return _0xe0ffc8;}function summarizePersonalItem(_0x8a51d9){const _0x513d1d=a32_0x11f8d6;return{'id':_0x8a51d9['id'],'title':_0x8a51d9[_0x513d1d(0x108)],'version':_0x8a51d9['version'],'ragStatus':_0x8a51d9['ragStatus'],'ragErrorMessage':_0x8a51d9['ragErrorMessage'],'updateTime':_0x8a51d9['updateTime']};}function detailPersonalItem(_0x1a13a3){const _0x30ea47=a32_0x11f8d6;return{'id':_0x1a13a3['id'],'appCode':_0x1a13a3[_0x30ea47(0xf6)],'scope':_0x1a13a3[_0x30ea47(0xf3)],'userId':_0x1a13a3['userId'],'title':_0x1a13a3[_0x30ea47(0x108)],'content':_0x1a13a3['content']??'','version':_0x1a13a3[_0x30ea47(0x10b)],'ragStatus':_0x1a13a3[_0x30ea47(0xd5)],'ragErrorMessage':_0x1a13a3[_0x30ea47(0xe6)],'createTime':_0x1a13a3[_0x30ea47(0x110)],'updateTime':_0x1a13a3[_0x30ea47(0xf2)]};}function summarizeSearchHit(_0x770616){const _0x205d91=a32_0x11f8d6;return{'scope':_0x770616['scope'],'title':_0x770616['title'],'docId':_0x770616[_0x205d91(0xfb)],'score':_0x770616[_0x205d91(0xf4)],'weightedScore':_0x770616[_0x205d91(0xeb)],'content':_0x770616[_0x205d91(0xdf)],'metadata':_0x770616[_0x205d91(0x10a)]};}function readTopK(_0xd05d3d){const _0x522b0e=a32_0x11f8d6,_0x5ef6f6=_0xd05d3d['flag'](_0x522b0e(0xfa));if(_0x5ef6f6===undefined||_0x5ef6f6===null||_0x5ef6f6==='')return undefined;const _0x170cc3=_0xd05d3d[_0x522b0e(0x104)](_0x522b0e(0xfa));if(!Number[_0x522b0e(0xfc)](_0x170cc3)||_0x170cc3<0x1)throw CliErrors[_0x522b0e(0x109)](_0x522b0e(0xd4));return _0x170cc3;}function a32_0xfa07(){const _0x45b26a=['body','string','--topk\x20must\x20be\x20a\x20positive\x20number.','ragStatus','根据本地文件更新个人知识库条目','create','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','File\x20not\x20found:\x20','685584TBnJZQ','trim','File\x20path\x20is\x20required.','read','list','content','根据本地文件创建个人知识库条目','2350236ESQQLY','bool','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20knowledge-base\x20entry\x20ID','565914BPxWFY','ragErrorMessage','isFile','build','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','136668OILqUB','weightedScore','file','detail','utf8','4569688axpwAH','POST','196948uNkjij','updateTime','scope','score','/client/knowledge-base/personal/','appCode','str','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','number','topk','docId','isFinite','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','3BkRSaJ','Created\x20KB\x20entry\x20','description','query','length','Updated\x20KB\x20entry\x20','num','map','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','verbose','title','validation','metadata','version','1382102HCtxGF','write','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','createTime','15xADLuc'];a32_0xfa07=function(){return _0x45b26a;};return a32_0xfa07();}const kbList={'service':'kb','command':a32_0x11f8d6(0xde),'description':a32_0x11f8d6(0x106),'risk':a32_0x11f8d6(0xdd),'flags':[VERBOSE_FLAG],async 'execute'(_0x414c7d){const _0x21f0d3=a32_0x11f8d6,_0x5e53fd=await listPersonalKnowledgeBaseItems(_0x414c7d[_0x21f0d3(0xf6)]);if(_0x414c7d[_0x21f0d3(0xe2)](_0x21f0d3(0x107)))return{'ok':!![],'data':{'total':_0x5e53fd[_0x21f0d3(0x102)],'items':_0x5e53fd}};return{'ok':!![],'data':{'total':_0x5e53fd['length'],'items':_0x5e53fd[_0x21f0d3(0x105)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x11f8d6(0xed),'description':a32_0x11f8d6(0x10f),'risk':a32_0x11f8d6(0xdd),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x4cf99d){const _0x55d1c5=a32_0x11f8d6,_0x37e240=await getPersonalKnowledgeBaseItem(_0x4cf99d[_0x55d1c5(0x104)]('id'),_0x4cf99d[_0x55d1c5(0xf6)]);return{'ok':!![],'data':detailPersonalItem(_0x37e240)};}},kbCreate={'service':'kb','command':a32_0x11f8d6(0xd7),'description':a32_0x11f8d6(0xe0),'risk':a32_0x11f8d6(0x10d),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3176ba){const _0x261046=a32_0x11f8d6,_0x18f217=_0x3176ba[_0x261046(0xf7)](_0x261046(0x108)),_0x12f778=readKnowledgeFile(_0x3176ba['str'](_0x261046(0xec))),_0x48c8f6=await createPersonalKnowledgeBaseItem(_0x3176ba[_0x261046(0xf6)],{'title':_0x18f217,'content':_0x12f778});return{'ok':!![],'data':summarizePersonalItem(_0x48c8f6),'message':_0x261046(0xff)+_0x48c8f6['id']+'\x20('+_0x48c8f6[_0x261046(0x108)]+')'};},async 'dryRun'(_0x14ed24){const _0x121633=a32_0x11f8d6,_0x55097d=_0x14ed24[_0x121633(0xf7)](_0x121633(0x108)),_0xb56ee6=readKnowledgeFile(_0x14ed24[_0x121633(0xf7)](_0x121633(0xec)));return dryRun(_0x121633(0xf0),'/client/knowledge-base/personal/create')['body']({'appCode':_0x14ed24[_0x121633(0xf6)],'title':_0x55097d,'content':_0xb56ee6})[_0x121633(0x100)](_0x121633(0xfd)+_0x55097d+'\x22')[_0x121633(0xe8)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x11f8d6(0xd6),'risk':a32_0x11f8d6(0x10d),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':a32_0x11f8d6(0xe4)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x2adc0b){const _0x36e703=a32_0x11f8d6,_0x32c559=_0x2adc0b[_0x36e703(0x104)]('id'),_0x450f64=readKnowledgeFile(_0x2adc0b[_0x36e703(0xf7)](_0x36e703(0xec))),_0x1f04d9=_0x2adc0b[_0x36e703(0xf7)](_0x36e703(0x108))||(await getPersonalKnowledgeBaseItem(_0x32c559,_0x2adc0b[_0x36e703(0xf6)]))[_0x36e703(0x108)],_0x3d4a14=await updatePersonalKnowledgeBaseItem(_0x32c559,_0x2adc0b[_0x36e703(0xf6)],{'title':_0x1f04d9,'content':_0x450f64});return{'ok':!![],'data':summarizePersonalItem(_0x3d4a14),'message':_0x36e703(0x103)+_0x3d4a14['id']+'\x20('+_0x3d4a14[_0x36e703(0x108)]+')'};},async 'dryRun'(_0x30c8a0){const _0x293dfc=a32_0x11f8d6,_0x249712=_0x30c8a0[_0x293dfc(0x104)]('id'),_0x4aa163=readKnowledgeFile(_0x30c8a0[_0x293dfc(0xf7)](_0x293dfc(0xec))),_0x30fee0=_0x30c8a0['str'](_0x293dfc(0x108))||(await getPersonalKnowledgeBaseItem(_0x249712,_0x30c8a0[_0x293dfc(0xf6)]))[_0x293dfc(0x108)];return dryRun(_0x293dfc(0xf0),_0x293dfc(0xf5)+_0x249712+'/update')[_0x293dfc(0xd2)]({'appCode':_0x30c8a0[_0x293dfc(0xf6)],'title':_0x30fee0,'content':_0x4aa163})[_0x293dfc(0x100)](_0x293dfc(0xf8)+_0x249712)[_0x293dfc(0xe8)]();}},kbSearch={'service':'kb','command':'search','description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x11f8d6(0xdd),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x37d689){const _0x332acd=a32_0x11f8d6;if(!_0x37d689['str']('query')[_0x332acd(0xdb)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x37d689);},async 'execute'(_0x38ad3e){const _0x16fe40=a32_0x11f8d6,_0x3ecab9=_0x38ad3e['str'](_0x16fe40(0x101))['trim'](),_0x4cbec0=readTopK(_0x38ad3e),_0x39708d=await searchKnowledgeBase(_0x38ad3e['appCode'],{'query':_0x3ecab9,'topK':_0x4cbec0});return{'ok':!![],'data':{'total':_0x39708d[_0x16fe40(0x102)],'hits':_0x39708d[_0x16fe40(0x105)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x1debae=a32_0x3ff9;(function(_0x446607,_0x280614){const _0x1df029=a32_0x3ff9,_0x4b7ed9=_0x446607();while(!![]){try{const _0x350a89=parseInt(_0x1df029(0xa9))/0x1*(parseInt(_0x1df029(0x8a))/0x2)+parseInt(_0x1df029(0x87))/0x3+-parseInt(_0x1df029(0xaf))/0x4*(-parseInt(_0x1df029(0xae))/0x5)+parseInt(_0x1df029(0x8d))/0x6*(parseInt(_0x1df029(0xa7))/0x7)+-parseInt(_0x1df029(0x88))/0x8+-parseInt(_0x1df029(0x8c))/0x9*(parseInt(_0x1df029(0xb5))/0xa)+-parseInt(_0x1df029(0xa2))/0xb*(parseInt(_0x1df029(0x89))/0xc);if(_0x350a89===_0x280614)break;else _0x4b7ed9['push'](_0x4b7ed9['shift']());}catch(_0x1dcf0d){_0x4b7ed9['push'](_0x4b7ed9['shift']());}}}(a32_0x5bb7,0x8cf84));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x1debae(0xb6),'type':a32_0x1debae(0x8b),'required':!![],'description':a32_0x1debae(0xb7)},QUERY_FLAG={'name':'query','type':a32_0x1debae(0x8b),'required':!![],'description':a32_0x1debae(0x9b)},TOPK_FLAG={'name':a32_0x1debae(0xa5),'type':a32_0x1debae(0x8f),'description':a32_0x1debae(0x91)};function a32_0x5bb7(){const _0x2feb69=['Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','write','--topk\x20must\x20be\x20a\x20positive\x20number.','query','map','description','/client/knowledge-base/personal/','/update','ragErrorMessage','body','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Created\x20KB\x20entry\x20','validation','str','list','updateTime','create','353331GnhJal','verbose','content','topk','bool','7HFDdgB','ragStatus','457644TDSqMd','Override\x20the\x20existing\x20entry\x20title','weightedScore','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','userId','3131945zYJMuj','4fvMlhb','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','POST','build','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','836810AtqJxM','file','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','appCode','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','isFinite','/client/knowledge-base/personal/create','Personal\x20knowledge-base\x20entry\x20ID','search','read','scope','detail','version','title','根据本地文件创建个人知识库条目','根据本地文件更新个人知识库条目','Updated\x20KB\x20entry\x20','1761396pOXKsj','7528592QMYJPM','72kcnNfn','2vMLeMg','string','18Ckyecu','1244454wEwkCn','trim','number','num'];a32_0x5bb7=function(){return _0x2feb69;};return a32_0x5bb7();}function a32_0x3ff9(_0x361d2b,_0x167563){_0x361d2b=_0x361d2b-0x86;const _0x5bb750=a32_0x5bb7();let _0x3ff9a2=_0x5bb750[_0x361d2b];return _0x3ff9a2;}function readKnowledgeFile(_0x1de607){const _0x32f904=a32_0x1debae;if(!_0x1de607)throw CliErrors[_0x32f904(0x9d)]('File\x20path\x20is\x20required.');if(!existsSync(_0x1de607))throw CliErrors[_0x32f904(0x9d)]('File\x20not\x20found:\x20'+_0x1de607);if(!statSync(_0x1de607)['isFile']())throw CliErrors['validation'](_0x32f904(0xb0)+_0x1de607);return readFileSync(_0x1de607,'utf8');}function summarizePersonalItem(_0xe8d2d2){const _0x1dec00=a32_0x1debae;return{'id':_0xe8d2d2['id'],'title':_0xe8d2d2[_0x1dec00(0xc2)],'version':_0xe8d2d2['version'],'ragStatus':_0xe8d2d2[_0x1dec00(0xa8)],'ragErrorMessage':_0xe8d2d2[_0x1dec00(0x99)],'updateTime':_0xe8d2d2[_0x1dec00(0xa0)]};}function detailPersonalItem(_0x124ad9){const _0x1908d6=a32_0x1debae;return{'id':_0x124ad9['id'],'appCode':_0x124ad9[_0x1908d6(0xb8)],'scope':_0x124ad9['scope'],'userId':_0x124ad9[_0x1908d6(0xad)],'title':_0x124ad9[_0x1908d6(0xc2)],'content':_0x124ad9[_0x1908d6(0xa4)]??'','version':_0x124ad9[_0x1908d6(0xc1)],'ragStatus':_0x124ad9[_0x1908d6(0xa8)],'ragErrorMessage':_0x124ad9[_0x1908d6(0x99)],'createTime':_0x124ad9['createTime'],'updateTime':_0x124ad9['updateTime']};}function summarizeSearchHit(_0x1115cc){const _0x49a28a=a32_0x1debae;return{'scope':_0x1115cc[_0x49a28a(0xbf)],'title':_0x1115cc['title'],'docId':_0x1115cc['docId'],'score':_0x1115cc['score'],'weightedScore':_0x1115cc[_0x49a28a(0xab)],'content':_0x1115cc['content'],'metadata':_0x1115cc['metadata']};}function readTopK(_0x43011e){const _0x9be17d=a32_0x1debae,_0x50e3a=_0x43011e['flag'](_0x9be17d(0xa5));if(_0x50e3a===undefined||_0x50e3a===null||_0x50e3a==='')return undefined;const _0xcabf6=_0x43011e[_0x9be17d(0x90)](_0x9be17d(0xa5));if(!Number[_0x9be17d(0xba)](_0xcabf6)||_0xcabf6<0x1)throw CliErrors[_0x9be17d(0x9d)](_0x9be17d(0x93));return _0xcabf6;}const kbList={'service':'kb','command':a32_0x1debae(0x9f),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x1debae(0xbe),'flags':[VERBOSE_FLAG],async 'execute'(_0x1416f2){const _0x243c5b=a32_0x1debae,_0x2bdf77=await listPersonalKnowledgeBaseItems(_0x1416f2[_0x243c5b(0xb8)]);if(_0x1416f2[_0x243c5b(0xa6)](_0x243c5b(0xa3)))return{'ok':!![],'data':{'total':_0x2bdf77[_0x243c5b(0xb1)],'items':_0x2bdf77}};return{'ok':!![],'data':{'total':_0x2bdf77['length'],'items':_0x2bdf77[_0x243c5b(0x95)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x1debae(0xc0),'description':a32_0x1debae(0xb9),'risk':a32_0x1debae(0xbe),'flags':[{...ID_FLAG,'description':a32_0x1debae(0xbc)}],async 'execute'(_0x90063b){const _0x42f288=a32_0x1debae,_0x42c8a7=await getPersonalKnowledgeBaseItem(_0x90063b[_0x42f288(0x90)]('id'),_0x90063b[_0x42f288(0xb8)]);return{'ok':!![],'data':detailPersonalItem(_0x42c8a7)};}},kbCreate={'service':'kb','command':a32_0x1debae(0xa1),'description':a32_0x1debae(0xc3),'risk':a32_0x1debae(0x92),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4d7a0f){const _0x2edabf=a32_0x1debae,_0x7a3208=_0x4d7a0f[_0x2edabf(0x9e)](_0x2edabf(0xc2)),_0x45010f=readKnowledgeFile(_0x4d7a0f[_0x2edabf(0x9e)]('file')),_0x4cc052=await createPersonalKnowledgeBaseItem(_0x4d7a0f[_0x2edabf(0xb8)],{'title':_0x7a3208,'content':_0x45010f});return{'ok':!![],'data':summarizePersonalItem(_0x4cc052),'message':_0x2edabf(0x9c)+_0x4cc052['id']+'\x20('+_0x4cc052[_0x2edabf(0xc2)]+')'};},async 'dryRun'(_0x471f77){const _0x11b2b7=a32_0x1debae,_0x358631=_0x471f77['str'](_0x11b2b7(0xc2)),_0x2c2c3c=readKnowledgeFile(_0x471f77['str'](_0x11b2b7(0xb6)));return dryRun(_0x11b2b7(0xb2),_0x11b2b7(0xbb))[_0x11b2b7(0x9a)]({'appCode':_0x471f77[_0x11b2b7(0xb8)],'title':_0x358631,'content':_0x2c2c3c})[_0x11b2b7(0x96)](_0x11b2b7(0xac)+_0x358631+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':a32_0x1debae(0xc4),'risk':'write','confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':a32_0x1debae(0xbc)},{...TITLE_FLAG,'required':![],'description':a32_0x1debae(0xaa)},FILE_FLAG],async 'execute'(_0x21a852){const _0x474a56=a32_0x1debae,_0x5d06c4=_0x21a852['num']('id'),_0x305d81=readKnowledgeFile(_0x21a852['str'](_0x474a56(0xb6))),_0x612f13=_0x21a852[_0x474a56(0x9e)]('title')||(await getPersonalKnowledgeBaseItem(_0x5d06c4,_0x21a852[_0x474a56(0xb8)]))[_0x474a56(0xc2)],_0x268cc7=await updatePersonalKnowledgeBaseItem(_0x5d06c4,_0x21a852[_0x474a56(0xb8)],{'title':_0x612f13,'content':_0x305d81});return{'ok':!![],'data':summarizePersonalItem(_0x268cc7),'message':_0x474a56(0x86)+_0x268cc7['id']+'\x20('+_0x268cc7[_0x474a56(0xc2)]+')'};},async 'dryRun'(_0x4fa407){const _0x5f5cc8=a32_0x1debae,_0x3b9a07=_0x4fa407[_0x5f5cc8(0x90)]('id'),_0x3d685c=readKnowledgeFile(_0x4fa407[_0x5f5cc8(0x9e)]('file')),_0x4be8de=_0x4fa407['str'](_0x5f5cc8(0xc2))||(await getPersonalKnowledgeBaseItem(_0x3b9a07,_0x4fa407[_0x5f5cc8(0xb8)]))[_0x5f5cc8(0xc2)];return dryRun(_0x5f5cc8(0xb2),_0x5f5cc8(0x97)+_0x3b9a07+_0x5f5cc8(0x98))[_0x5f5cc8(0x9a)]({'appCode':_0x4fa407[_0x5f5cc8(0xb8)],'title':_0x4be8de,'content':_0x3d685c})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x3b9a07)[_0x5f5cc8(0xb3)]();}},kbSearch={'service':'kb','command':a32_0x1debae(0xbd),'description':a32_0x1debae(0xb4),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x238106){const _0x2d6e6a=a32_0x1debae;if(!_0x238106['str'](_0x2d6e6a(0x94))[_0x2d6e6a(0x8e)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x238106);},async 'execute'(_0x5c3392){const _0x2a01f6=a32_0x1debae,_0x5dcaa8=_0x5c3392[_0x2a01f6(0x9e)](_0x2a01f6(0x94))[_0x2a01f6(0x8e)](),_0x440b46=readTopK(_0x5c3392),_0x596cc9=await searchKnowledgeBase(_0x5c3392['appCode'],{'query':_0x5dcaa8,'topK':_0x440b46});return{'ok':!![],'data':{'total':_0x596cc9[_0x2a01f6(0xb1)],'hits':_0x596cc9[_0x2a01f6(0x95)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x26396c=a33_0x53ed;function a33_0x53ed(_0x2757c7,_0x61a0a8){_0x2757c7=_0x2757c7-0xe0;const _0x241459=a33_0x2414();let _0x53edde=_0x241459[_0x2757c7];return _0x53edde;}(function(_0x3d585c,_0x586bc4){const _0x2094bf=a33_0x53ed,_0x3dd496=_0x3d585c();while(!![]){try{const _0x2a881a=parseInt(_0x2094bf(0xfe))/0x1*(-parseInt(_0x2094bf(0xfa))/0x2)+parseInt(_0x2094bf(0xed))/0x3+parseInt(_0x2094bf(0xf8))/0x4+-parseInt(_0x2094bf(0xe6))/0x5+parseInt(_0x2094bf(0xf3))/0x6+parseInt(_0x2094bf(0xe0))/0x7+parseInt(_0x2094bf(0xe1))/0x8*(-parseInt(_0x2094bf(0xec))/0x9);if(_0x2a881a===_0x586bc4)break;else _0x3dd496['push'](_0x3dd496['shift']());}catch(_0xa35363){_0x3dd496['push'](_0x3dd496['shift']());}}}(a33_0x2414,0x5c6cf));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1bc263){const _0x4aee01=a33_0x53ed;if(_0x1bc263[_0x4aee01(0xf1)]===0x0){console['log'](_0x4aee01(0xf7));return;}console[_0x4aee01(0xe7)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x1bc263[_0x4aee01(0xf2)]((_0x2de9bc,_0x392a4d)=>{const _0x5be58e=_0x4aee01,_0x41b3f7=new Date(_0x2de9bc[_0x5be58e(0xee)])[_0x5be58e(0xf6)](_0x5be58e(0xe3)),_0x1102a4=_0x2de9bc[_0x5be58e(0xef)]===_0x5be58e(0xea)?'√':_0x2de9bc['level']==='error'?'×':_0x2de9bc[_0x5be58e(0xef)]===_0x5be58e(0xfb)?'!':'i';console['log'](_0x392a4d+0x1+'.\x20'+_0x1102a4+'\x20['+_0x2de9bc[_0x5be58e(0xf9)]+']\x20'+_0x2de9bc[_0x5be58e(0xfd)]),console['log'](_0x5be58e(0xfc)+_0x41b3f7),_0x2de9bc[_0x5be58e(0xe5)]&&console[_0x5be58e(0xe7)](_0x5be58e(0xeb)+_0x2de9bc[_0x5be58e(0xe5)]+'ms'),_0x2de9bc['details']&&Object['keys'](_0x2de9bc[_0x5be58e(0xf5)])[_0x5be58e(0xf1)]>0x0&&console[_0x5be58e(0xe7)](_0x5be58e(0xe9)+JSON[_0x5be58e(0xe2)](_0x2de9bc[_0x5be58e(0xf5)],null,0x2)),console[_0x5be58e(0xe7)]('');});}function a33_0x2414(){const _0x1ed420=['duration','646470OStaNW','log','show','\x20\x20\x20Details:\x20','success','\x20\x20\x20Duration:\x20','27agHcgq','1899396pcSiqb','timestamp','level','read','length','forEach','4065684nHBAWd','readLogs','details','toLocaleString','*\x20No\x20logs\x20found','1495128hZCDkJ','command','4qHVZRN','warn','\x20\x20\x20Time:\x20','message','53769IdkwAf','4449214ZioUwq','4545928qFwYKY','stringify','en-US','View\x20command\x20history\x20logs'];a33_0x2414=function(){return _0x1ed420;};return a33_0x2414();}export const logsDefinitions=[{'service':'logs','command':a33_0x26396c(0xe8),'description':a33_0x26396c(0xe4),'risk':a33_0x26396c(0xf0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1ea2e1){const _0x15f646=a33_0x26396c;return printLogs(logger[_0x15f646(0xf4)]()),{'ok':!![]};}}];
1
+ const a33_0x278a16=a33_0x4767;function a33_0x4767(_0x222182,_0x363850){_0x222182=_0x222182-0xc6;const _0x773c23=a33_0x773c();let _0x4767ed=_0x773c23[_0x222182];return _0x4767ed;}(function(_0x15062a,_0x15c776){const _0x350f8c=a33_0x4767,_0x54402a=_0x15062a();while(!![]){try{const _0x33cd58=parseInt(_0x350f8c(0xcb))/0x1*(-parseInt(_0x350f8c(0xd1))/0x2)+-parseInt(_0x350f8c(0xd3))/0x3*(parseInt(_0x350f8c(0xde))/0x4)+parseInt(_0x350f8c(0xdf))/0x5*(-parseInt(_0x350f8c(0xda))/0x6)+parseInt(_0x350f8c(0xd9))/0x7*(-parseInt(_0x350f8c(0xd0))/0x8)+parseInt(_0x350f8c(0xd7))/0x9*(parseInt(_0x350f8c(0xe4))/0xa)+parseInt(_0x350f8c(0xe3))/0xb+parseInt(_0x350f8c(0xd8))/0xc;if(_0x33cd58===_0x15c776)break;else _0x54402a['push'](_0x54402a['shift']());}catch(_0x57ad18){_0x54402a['push'](_0x54402a['shift']());}}}(a33_0x773c,0xc43d2));function a33_0x773c(){const _0x2085b4=['logs','details','12661869eJMbTr','163580riwejD','stringify','\x20\x20\x20Duration:\x20','warn','\x20\x20\x20Details:\x20','message','\x20\x20\x20Time:\x20','level','log','278873vzecGa','readLogs','forEach','error','keys','12928iaCPBs','2RCcDIq','*\x20No\x20logs\x20found','27ojhCde','success','toLocaleString','duration','738BbXHIO','24756996cGVAHL','5047VRjSUW','1174074mpKVLv','en-US','command','length','416872eEuKOQ','35gRDHBt','\x20logs:\x0a'];a33_0x773c=function(){return _0x2085b4;};return a33_0x773c();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x245bb2){const _0x58433c=a33_0x4767;if(_0x245bb2[_0x58433c(0xdd)]===0x0){console[_0x58433c(0xca)](_0x58433c(0xd2));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x58433c(0xe0)),_0x245bb2[_0x58433c(0xcd)]((_0x3b61fc,_0x399f8a)=>{const _0x404be5=_0x58433c,_0x32c7d1=new Date(_0x3b61fc['timestamp'])[_0x404be5(0xd5)](_0x404be5(0xdb)),_0x38e370=_0x3b61fc[_0x404be5(0xc9)]===_0x404be5(0xd4)?'√':_0x3b61fc[_0x404be5(0xc9)]===_0x404be5(0xce)?'×':_0x3b61fc[_0x404be5(0xc9)]===_0x404be5(0xe7)?'!':'i';console['log'](_0x399f8a+0x1+'.\x20'+_0x38e370+'\x20['+_0x3b61fc[_0x404be5(0xdc)]+']\x20'+_0x3b61fc[_0x404be5(0xc7)]),console['log'](_0x404be5(0xc8)+_0x32c7d1),_0x3b61fc[_0x404be5(0xd6)]&&console[_0x404be5(0xca)](_0x404be5(0xe6)+_0x3b61fc[_0x404be5(0xd6)]+'ms'),_0x3b61fc[_0x404be5(0xe2)]&&Object[_0x404be5(0xcf)](_0x3b61fc[_0x404be5(0xe2)])[_0x404be5(0xdd)]>0x0&&console[_0x404be5(0xca)](_0x404be5(0xc6)+JSON[_0x404be5(0xe5)](_0x3b61fc[_0x404be5(0xe2)],null,0x2)),console[_0x404be5(0xca)]('');});}export const logsDefinitions=[{'service':a33_0x278a16(0xe1),'command':'show','description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2cc8d2){const _0x544da9=a33_0x278a16;return printLogs(logger[_0x544da9(0xcc)]()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0xb2c464=a34_0x3b70;(function(_0x2173ec,_0x2a26ca){const _0x45fa6c=a34_0x3b70,_0x1da7c7=_0x2173ec();while(!![]){try{const _0x3032ed=-parseInt(_0x45fa6c(0x98))/0x1*(parseInt(_0x45fa6c(0x9e))/0x2)+-parseInt(_0x45fa6c(0x9b))/0x3*(parseInt(_0x45fa6c(0xa1))/0x4)+-parseInt(_0x45fa6c(0x99))/0x5+-parseInt(_0x45fa6c(0x93))/0x6+-parseInt(_0x45fa6c(0x90))/0x7*(parseInt(_0x45fa6c(0xa0))/0x8)+-parseInt(_0x45fa6c(0x94))/0x9*(-parseInt(_0x45fa6c(0x9a))/0xa)+parseInt(_0x45fa6c(0xa3))/0xb*(parseInt(_0x45fa6c(0xa2))/0xc);if(_0x3032ed===_0x2a26ca)break;else _0x1da7c7['push'](_0x1da7c7['shift']());}catch(_0x42b57c){_0x1da7c7['push'](_0x1da7c7['shift']());}}}(a34_0x1c44,0xaf2f4));function a34_0x3b70(_0x4d55c2,_0x3353e7){_0x4d55c2=_0x4d55c2-0x8e;const _0x1c447e=a34_0x1c44();let _0x3b70b5=_0x1c447e[_0x4d55c2];return _0x3b70b5;}function a34_0x1c44(){const _0x1cd0ad=['1614411hmyYoM','length','EMAIL','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','13577bgNwnW','3442675jJHKIr','60SpyzbO','1297632ajegud','map','type','194giiveB','config-list','56SXKJXL','4xmdnDX','75324hghFkO','6886sxFTBb','Notification\x20channel\x20type','\x20notification\x20config(s)','1002239iNEmrw','Found\x20','appCode','5086998XmXHzA'];a34_0x1c44=function(){return _0x1cd0ad;};return a34_0x1c44();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a34_0xb2c464(0x9f),'description':a34_0xb2c464(0x97),'risk':'read','flags':[{'name':a34_0xb2c464(0x9d),'type':'string','description':a34_0xb2c464(0x8e),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a34_0xb2c464(0x96)}],async 'validate'(_0x162304){readNotificationChannelType(_0x162304);},async 'execute'(_0x428caa){const _0x1adb8d=a34_0xb2c464,_0x16d1b5=readNotificationChannelType(_0x428caa),_0x3d8855=await listNotificationChannelConfigs(_0x428caa[_0x1adb8d(0x92)],_0x16d1b5),_0x1b7fbd=_0x3d8855[_0x1adb8d(0x9c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x428caa[_0x1adb8d(0x92)],'channelType':_0x16d1b5,'count':_0x1b7fbd[_0x1adb8d(0x95)],'configs':_0x1b7fbd},'message':_0x1adb8d(0x91)+_0x1b7fbd[_0x1adb8d(0x95)]+'\x20'+_0x16d1b5+_0x1adb8d(0x8f)};}};
1
+ function a34_0x3f3f(_0xbc886d,_0x14a917){_0xbc886d=_0xbc886d-0x16e;const _0xfb753e=a34_0xfb75();let _0x3f3fc0=_0xfb753e[_0xbc886d];return _0x3f3fc0;}const a34_0x2847d0=a34_0x3f3f;(function(_0x1f265d,_0x160f7f){const _0xe232ea=a34_0x3f3f,_0x4e3db0=_0x1f265d();while(!![]){try{const _0x22866e=-parseInt(_0xe232ea(0x182))/0x1+-parseInt(_0xe232ea(0x181))/0x2*(-parseInt(_0xe232ea(0x178))/0x3)+parseInt(_0xe232ea(0x180))/0x4*(-parseInt(_0xe232ea(0x183))/0x5)+-parseInt(_0xe232ea(0x176))/0x6*(parseInt(_0xe232ea(0x17e))/0x7)+parseInt(_0xe232ea(0x171))/0x8*(parseInt(_0xe232ea(0x175))/0x9)+-parseInt(_0xe232ea(0x16e))/0xa*(parseInt(_0xe232ea(0x172))/0xb)+parseInt(_0xe232ea(0x174))/0xc;if(_0x22866e===_0x160f7f)break;else _0x4e3db0['push'](_0x4e3db0['shift']());}catch(_0x1c7611){_0x4e3db0['push'](_0x4e3db0['shift']());}}}(a34_0xfb75,0xb8b04));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a34_0x2847d0(0x179),'command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a34_0x2847d0(0x17a),'flags':[{'name':a34_0x2847d0(0x17c),'type':a34_0x2847d0(0x170),'description':a34_0x2847d0(0x16f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x382fc2){readNotificationChannelType(_0x382fc2);},async 'execute'(_0x38e526){const _0x52fd6f=a34_0x2847d0,_0x2da069=readNotificationChannelType(_0x38e526),_0x295af5=await listNotificationChannelConfigs(_0x38e526[_0x52fd6f(0x17d)],_0x2da069),_0xb0c3c1=_0x295af5[_0x52fd6f(0x17b)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x38e526['appCode'],'channelType':_0x2da069,'count':_0xb0c3c1[_0x52fd6f(0x177)],'configs':_0xb0c3c1},'message':_0x52fd6f(0x17f)+_0xb0c3c1[_0x52fd6f(0x177)]+'\x20'+_0x2da069+_0x52fd6f(0x173)};}};function a34_0xfb75(){const _0x27489c=['Found\x20','4ZUzTSz','2aEDCYa','1354259DtlZiK','1782105IZeImo','10250qQrvDm','Notification\x20channel\x20type','string','1448ZPVPvr','12188RRCFkI','\x20notification\x20config(s)','36732012bfFPDf','5139IYYgyk','4458rFvISH','length','2889210jBCmpu','notification','read','map','type','appCode','4942LJnMNq'];a34_0xfb75=function(){return _0x27489c;};return a34_0xfb75();}
@@ -1 +1 @@
1
- (function(_0x596a71,_0x2de9eb){const _0x3e7a34=a35_0x44d2,_0xa30af5=_0x596a71();while(!![]){try{const _0x31a06d=-parseInt(_0x3e7a34(0x1c7))/0x1+-parseInt(_0x3e7a34(0x1ca))/0x2+parseInt(_0x3e7a34(0x1c6))/0x3*(-parseInt(_0x3e7a34(0x1c4))/0x4)+-parseInt(_0x3e7a34(0x1c8))/0x5+-parseInt(_0x3e7a34(0x1cc))/0x6+parseInt(_0x3e7a34(0x1cb))/0x7*(-parseInt(_0x3e7a34(0x1c9))/0x8)+parseInt(_0x3e7a34(0x1c5))/0x9*(parseInt(_0x3e7a34(0x1cd))/0xa);if(_0x31a06d===_0x2de9eb)break;else _0xa30af5['push'](_0xa30af5['shift']());}catch(_0x1da82c){_0xa30af5['push'](_0xa30af5['shift']());}}}(a35_0x352c,0xe2143));import{notificationConfigList}from'../../commands/notification/config-list.js';function a35_0x352c(){const _0x205344=['28kpZSns','4878678wvzyOa','42420PtNodr','20908KcosXD','14571lFOOOd','582pWuDPy','1827436qPmFWk','3648950fkhgdb','1400352xbKaoC','1714452GKiljN'];a35_0x352c=function(){return _0x205344;};return a35_0x352c();}function a35_0x44d2(_0xc4dc4e,_0x3997aa){_0xc4dc4e=_0xc4dc4e-0x1c4;const _0x352c4e=a35_0x352c();let _0x44d2e8=_0x352c4e[_0xc4dc4e];return _0x44d2e8;}export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0x35f910,_0xbe6aa5){const _0x2dadce=a35_0x2624,_0xd2e362=_0x35f910();while(!![]){try{const _0x336ff3=parseInt(_0x2dadce(0x146))/0x1+parseInt(_0x2dadce(0x145))/0x2+-parseInt(_0x2dadce(0x14b))/0x3*(parseInt(_0x2dadce(0x14c))/0x4)+parseInt(_0x2dadce(0x147))/0x5*(-parseInt(_0x2dadce(0x149))/0x6)+parseInt(_0x2dadce(0x14a))/0x7+parseInt(_0x2dadce(0x144))/0x8+-parseInt(_0x2dadce(0x148))/0x9*(-parseInt(_0x2dadce(0x143))/0xa);if(_0x336ff3===_0xbe6aa5)break;else _0xd2e362['push'](_0xd2e362['shift']());}catch(_0x1f5e50){_0xd2e362['push'](_0xd2e362['shift']());}}}(a35_0x51c2,0xac9ab));import{notificationConfigList}from'../../commands/notification/config-list.js';function a35_0x2624(_0x305139,_0x47f19b){_0x305139=_0x305139-0x143;const _0x51c2cc=a35_0x51c2();let _0x262428=_0x51c2cc[_0x305139];return _0x262428;}function a35_0x51c2(){const _0x30e06c=['136008xKcNcK','191119JJcZLi','85ikIHQm','5024898cSIzpf','453414uSrIZD','5854177kjhBif','68358WGqMaG','224KMbTHZ','20DoRuaC','8444784PVAkJp'];a35_0x51c2=function(){return _0x30e06c;};return a35_0x51c2();}export const notificationDefinitions=[notificationConfigList];
@@ -1 +1 @@
1
- const a36_0x359117=a36_0x2842;(function(_0x604f46,_0x13ca2a){const _0x3d772d=a36_0x2842,_0xfad630=_0x604f46();while(!![]){try{const _0x14a97a=-parseInt(_0x3d772d(0x7b))/0x1*(-parseInt(_0x3d772d(0x7d))/0x2)+parseInt(_0x3d772d(0x72))/0x3+-parseInt(_0x3d772d(0x87))/0x4+parseInt(_0x3d772d(0x91))/0x5+-parseInt(_0x3d772d(0x7e))/0x6+parseInt(_0x3d772d(0x77))/0x7+parseInt(_0x3d772d(0x84))/0x8;if(_0x14a97a===_0x13ca2a)break;else _0xfad630['push'](_0xfad630['shift']());}catch(_0x5a2771){_0xfad630['push'](_0xfad630['shift']());}}}(a36_0x4683,0xd465d));function a36_0x4683(){const _0x266813=['updateTime','type','\x20has\x20invalid\x20field\x20\x22id\x22.','apiError','channelType','isArray','Item\x20','634080PXMEbM','string','WEBHOOK','WECOM','configCode','2490867OIlhnR','trim','number','Invalid\x20notification\x20config\x20response.','description','8004941WCzIDc','Invalid\x20--type:\x20','Allowed\x20values:\x20','test','1hrfbok','object','221506bRlrMb','8106942CxRtbX','join','isSafeInteger','configName','validation','EMAIL','10295320wLApWt','includes','\x20must\x20be\x20an\x20object.','5108792XdTsHW','DINGTALK','\x20is\x20missing\x20required\x20field\x20\x22'];a36_0x4683=function(){return _0x266813;};return a36_0x4683();}function a36_0x2842(_0x2bf159,_0x33b6ec){_0x2bf159=_0x2bf159-0x6e;const _0x468394=a36_0x4683();let _0x28428c=_0x468394[_0x2bf159];return _0x28428c;}import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a36_0x359117(0x83),'FEISHU',a36_0x359117(0x88),a36_0x359117(0x70),a36_0x359117(0x6f)];export function readNotificationChannelType(_0x4183ee){const _0x3f8711=a36_0x359117,_0xdd0115=_0x4183ee['str'](_0x3f8711(0x8b))[_0x3f8711(0x73)]()||_0x3f8711(0x83);if(!NOTIFICATION_CHANNEL_TYPES[_0x3f8711(0x85)](_0xdd0115))throw CliErrors[_0x3f8711(0x82)](_0x3f8711(0x78)+_0xdd0115,_0x3f8711(0x79)+NOTIFICATION_CHANNEL_TYPES[_0x3f8711(0x7f)](',\x20')+'.');return _0xdd0115;}export function projectNotificationListConfig(_0x1e6f12,_0x4d6e30){const _0x27a9e3=a36_0x359117,_0x46acdf=requireResponseObject(_0x1e6f12,_0x4d6e30);return{'id':normalizeNullableId(_0x46acdf['id'],_0x4d6e30),'configCode':requireResponseString(_0x46acdf['configCode'],_0x27a9e3(0x71),_0x4d6e30),'configName':requireResponseString(_0x46acdf[_0x27a9e3(0x81)],'configName',_0x4d6e30),'channelType':requireResponseString(_0x46acdf[_0x27a9e3(0x8e)],_0x27a9e3(0x8e),_0x4d6e30),'description':normalizeNullableString(_0x46acdf[_0x27a9e3(0x76)]),'createTime':normalizeNullableString(_0x46acdf['createTime']),'updateTime':normalizeNullableString(_0x46acdf[_0x27a9e3(0x8a)])};}function requireResponseObject(_0x3b65e4,_0x288a1e){const _0x3b75e2=a36_0x359117;if(typeof _0x3b65e4!==_0x3b75e2(0x7c)||_0x3b65e4===null||Array[_0x3b75e2(0x8f)](_0x3b65e4))throw CliErrors[_0x3b75e2(0x8d)](_0x3b75e2(0x75),_0x3b75e2(0x90)+(_0x288a1e+0x1)+_0x3b75e2(0x86));return _0x3b65e4;}function requireResponseString(_0x68b41a,_0x38b62a,_0x53c5f4){const _0x53a0a8=a36_0x359117;if(typeof _0x68b41a!==_0x53a0a8(0x6e)||!_0x68b41a[_0x53a0a8(0x73)]())throw CliErrors[_0x53a0a8(0x8d)](_0x53a0a8(0x75),'Item\x20'+(_0x53c5f4+0x1)+_0x53a0a8(0x89)+_0x38b62a+'\x22.');return _0x68b41a[_0x53a0a8(0x73)]();}function normalizeNullableString(_0xafb9a3){const _0x2e1530=a36_0x359117;return typeof _0xafb9a3===_0x2e1530(0x6e)&&_0xafb9a3['trim']()?_0xafb9a3[_0x2e1530(0x73)]():null;}function normalizeNullableId(_0x40726e,_0xae4df9){const _0xfd770d=a36_0x359117;if(_0x40726e===undefined||_0x40726e===null)return null;if(typeof _0x40726e===_0xfd770d(0x74)&&Number[_0xfd770d(0x80)](_0x40726e))return _0x40726e;if(typeof _0x40726e===_0xfd770d(0x6e)&&/^-?\d+$/[_0xfd770d(0x7a)](_0x40726e['trim']()))return _0x40726e[_0xfd770d(0x73)]();throw CliErrors[_0xfd770d(0x8d)](_0xfd770d(0x75),'Item\x20'+(_0xae4df9+0x1)+_0xfd770d(0x8c));}
1
+ const a36_0x5e7af0=a36_0x1bb9;(function(_0x14307b,_0x4491cf){const _0x52e83c=a36_0x1bb9,_0x2ca706=_0x14307b();while(!![]){try{const _0x4834e0=parseInt(_0x52e83c(0x92))/0x1+-parseInt(_0x52e83c(0xa8))/0x2+parseInt(_0x52e83c(0x8e))/0x3+parseInt(_0x52e83c(0x8f))/0x4*(-parseInt(_0x52e83c(0x86))/0x5)+parseInt(_0x52e83c(0xa5))/0x6*(-parseInt(_0x52e83c(0x89))/0x7)+parseInt(_0x52e83c(0x8a))/0x8+parseInt(_0x52e83c(0x95))/0x9;if(_0x4834e0===_0x4491cf)break;else _0x2ca706['push'](_0x2ca706['shift']());}catch(_0xad9774){_0x2ca706['push'](_0x2ca706['shift']());}}}(a36_0x7e72,0xf0307));function a36_0x1bb9(_0x33cc6e,_0x5c503b){_0x33cc6e=_0x33cc6e-0x84;const _0x7e7226=a36_0x7e72();let _0x1bb987=_0x7e7226[_0x33cc6e];return _0x1bb987;}import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a36_0x5e7af0(0x9a),a36_0x5e7af0(0xa1),'DINGTALK',a36_0x5e7af0(0xa0),a36_0x5e7af0(0xa6)];export function readNotificationChannelType(_0x2cea13){const _0x149dcb=a36_0x5e7af0,_0x2138bf=_0x2cea13[_0x149dcb(0x93)](_0x149dcb(0x90))[_0x149dcb(0x9c)]()||_0x149dcb(0x9a);if(!NOTIFICATION_CHANNEL_TYPES[_0x149dcb(0x99)](_0x2138bf))throw CliErrors[_0x149dcb(0x88)](_0x149dcb(0x9b)+_0x2138bf,_0x149dcb(0x94)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x2138bf;}export function projectNotificationListConfig(_0x503948,_0x4cf539){const _0x4890e5=a36_0x5e7af0,_0x3d5ed8=requireResponseObject(_0x503948,_0x4cf539);return{'id':normalizeNullableId(_0x3d5ed8['id'],_0x4cf539),'configCode':requireResponseString(_0x3d5ed8[_0x4890e5(0xa2)],'configCode',_0x4cf539),'configName':requireResponseString(_0x3d5ed8[_0x4890e5(0x9d)],_0x4890e5(0x9d),_0x4cf539),'channelType':requireResponseString(_0x3d5ed8[_0x4890e5(0xa7)],'channelType',_0x4cf539),'description':normalizeNullableString(_0x3d5ed8[_0x4890e5(0x8d)]),'createTime':normalizeNullableString(_0x3d5ed8[_0x4890e5(0x87)]),'updateTime':normalizeNullableString(_0x3d5ed8[_0x4890e5(0x91)])};}function requireResponseObject(_0x21d9e4,_0x5a9b57){const _0xcaad18=a36_0x5e7af0;if(typeof _0x21d9e4!==_0xcaad18(0x8b)||_0x21d9e4===null||Array[_0xcaad18(0x9f)](_0x21d9e4))throw CliErrors[_0xcaad18(0x96)](_0xcaad18(0xa9),'Item\x20'+(_0x5a9b57+0x1)+_0xcaad18(0x9e));return _0x21d9e4;}function requireResponseString(_0x34ed31,_0x1015fd,_0x482275){const _0x1481ea=a36_0x5e7af0;if(typeof _0x34ed31!==_0x1481ea(0xa3)||!_0x34ed31[_0x1481ea(0x9c)]())throw CliErrors[_0x1481ea(0x96)]('Invalid\x20notification\x20config\x20response.',_0x1481ea(0x97)+(_0x482275+0x1)+_0x1481ea(0x8c)+_0x1015fd+'\x22.');return _0x34ed31['trim']();}function normalizeNullableString(_0xe5a1b4){const _0x2ad57a=a36_0x5e7af0;return typeof _0xe5a1b4===_0x2ad57a(0xa3)&&_0xe5a1b4[_0x2ad57a(0x9c)]()?_0xe5a1b4['trim']():null;}function normalizeNullableId(_0x104951,_0x466cb0){const _0x22e716=a36_0x5e7af0;if(_0x104951===undefined||_0x104951===null)return null;if(typeof _0x104951===_0x22e716(0x84)&&Number[_0x22e716(0x98)](_0x104951))return _0x104951;if(typeof _0x104951===_0x22e716(0xa3)&&/^-?\d+$/[_0x22e716(0xa4)](_0x104951[_0x22e716(0x9c)]()))return _0x104951[_0x22e716(0x9c)]();throw CliErrors[_0x22e716(0x96)](_0x22e716(0xa9),'Item\x20'+(_0x466cb0+0x1)+_0x22e716(0x85));}function a36_0x7e72(){const _0x1348ff=['str','Allowed\x20values:\x20','15930900OJDUqD','apiError','Item\x20','isSafeInteger','includes','EMAIL','Invalid\x20--type:\x20','trim','configName','\x20must\x20be\x20an\x20object.','isArray','WECOM','FEISHU','configCode','string','test','31740sSyckx','WEBHOOK','channelType','1191254XdaMjD','Invalid\x20notification\x20config\x20response.','number','\x20has\x20invalid\x20field\x20\x22id\x22.','5OWUWnh','createTime','validation','1715NYuAZA','4770248efyuzL','object','\x20is\x20missing\x20required\x20field\x20\x22','description','1231905hOIqRz','6387504DempiL','type','updateTime','1695352cQGoDb'];a36_0x7e72=function(){return _0x1348ff;};return a36_0x7e72();}
@@ -1 +1 @@
1
- const a37_0x589fff=a37_0x3d47;(function(_0x9f4119,_0x5ae4b4){const _0x326e54=a37_0x3d47,_0xc98bf4=_0x9f4119();while(!![]){try{const _0x2e6c14=parseInt(_0x326e54(0x146))/0x1+-parseInt(_0x326e54(0x143))/0x2+-parseInt(_0x326e54(0x14a))/0x3*(-parseInt(_0x326e54(0x15d))/0x4)+parseInt(_0x326e54(0x16b))/0x5+-parseInt(_0x326e54(0x168))/0x6+parseInt(_0x326e54(0x13f))/0x7+parseInt(_0x326e54(0x15c))/0x8*(parseInt(_0x326e54(0x141))/0x9);if(_0x2e6c14===_0x5ae4b4)break;else _0xc98bf4['push'](_0xc98bf4['shift']());}catch(_0x426c8f){_0xc98bf4['push'](_0xc98bf4['shift']());}}}(a37_0x2c0f,0xd4231));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=['invoice','general',a37_0x589fff(0x16c),a37_0x589fff(0x158)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a37_0x589fff(0x13c),'form':a37_0x589fff(0x154),'idCard':a37_0x589fff(0x16a)},SCENE_FLAG={'name':a37_0x589fff(0x16e),'type':a37_0x589fff(0x156),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a37_0x589fff(0x160)},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a37_0x589fff(0x163),'type':'string','description':a37_0x589fff(0x14d)};function normalizeScene(_0xfe323e){const _0x21f341=a37_0x589fff,_0x55feda=_0xfe323e[_0x21f341(0x169)]()[_0x21f341(0x161)]();if(_0x55feda===_0x21f341(0x145))return _0x21f341(0x158);if(_0x55feda==='invoice'||_0x55feda==='general'||_0x55feda===_0x21f341(0x16c))return _0x55feda;throw CliErrors['validation'](_0x21f341(0x151)+_0xfe323e+_0x21f341(0x15b)+SUPPORTED_SCENES[_0x21f341(0x157)](',\x20'));}function selectedInputs(_0x4879e9){const _0x15c5f6=a37_0x589fff,_0x409e41=_0x4879e9['str']('image-file')['trim'](),_0x132261=_0x4879e9[_0x15c5f6(0x15a)](_0x15c5f6(0x163))['trim']();return{'imageFile':_0x409e41,'imageUrl':_0x132261,'count':[_0x409e41,_0x132261]['filter'](Boolean)[_0x15c5f6(0x16f)]};}function a37_0x2c0f(){const _0x7369cb=['imageUrl','description','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','60882kRIAIK','imageFile','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','File\x20upload\x20response\x20missing\x20filePath.','Preview:\x20recognize\x20','body','Unsupported\x20OCR\x20scene:\x20','validation','<filePath\x20returned\x20by\x20/client/uploadFile>','Table','/client/queryFileUrl','string','join','idCard','\x20OCR\x20from\x20URL','str','.\x20Supported\x20scenes:\x20','8JvzqTN','152eLxevf','filePath','image-file','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','toLowerCase','File\x20URL\x20response\x20missing\x20fileUrl.','image-url','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','POST','read','appCode','7259220MsgEsq','trim','IdCard','1075025nImyAD','form','recognize','scene','length','General','/client/ocr','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','228277pmwqAQ','/client/uploadFile','5019417DgVZRn','\x20OCR','229598PIDlws','fileUrl','idcard','617081CZdmHg'];a37_0x2c0f=function(){return _0x7369cb;};return a37_0x2c0f();}function validateInputSelection(_0x20ff2b){const _0x18999b=a37_0x589fff,_0x13b36d=selectedInputs(_0x20ff2b);if(_0x13b36d['count']!==0x1)throw CliErrors[_0x18999b(0x152)](_0x18999b(0x13e));return _0x13b36d;}function a37_0x3d47(_0x5e2e04,_0x1563fa){_0x5e2e04=_0x5e2e04-0x13c;const _0x2c0f91=a37_0x2c0f();let _0x3d47d4=_0x2c0f91[_0x5e2e04];return _0x3d47d4;}function withScene(_0x1d24dd,_0x4f7d11,_0x115d36){return{..._0x1d24dd,'scene':_0x4f7d11,..._0x115d36?{'sourceFile':{'fileName':_0x115d36['fileName'],'filePath':_0x115d36['filePath']}}:{}};}const ocrRecognize={'service':a37_0x589fff(0x14c),'command':a37_0x589fff(0x16d),'description':a37_0x589fff(0x149),'risk':a37_0x589fff(0x166),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3c2faf){const _0x44a624=a37_0x589fff,_0x40bb85=normalizeScene(_0x3c2faf[_0x44a624(0x15a)]('scene')),_0x5266cb=SCENE_TO_LEGACY_TYPE[_0x40bb85],_0x224022=validateInputSelection(_0x3c2faf);if(_0x224022[_0x44a624(0x147)])return dryRun(_0x44a624(0x165),_0x44a624(0x13d))[_0x44a624(0x150)]({'appCode':_0x3c2faf[_0x44a624(0x167)],'url':_0x224022[_0x44a624(0x147)],'type':_0x5266cb})['description'](_0x44a624(0x14f)+_0x40bb85+_0x44a624(0x159))['build']();const _0x3120b0=requireRuntimeUploadFile(_0x224022[_0x44a624(0x14b)],_0x44a624(0x15f));return dryRun(_0x44a624(0x165),_0x44a624(0x140))[_0x44a624(0x150)]({'steps':[{'method':_0x44a624(0x165),'url':'/client/uploadFile','body':{'appCode':_0x3c2faf[_0x44a624(0x167)],'multipart':{'file':_0x3120b0}}},{'method':'POST','url':_0x44a624(0x155),'body':{'filePath':_0x44a624(0x153),'downloadFlag':![]}},{'method':_0x44a624(0x165),'url':_0x44a624(0x13d),'body':{'appCode':_0x3c2faf[_0x44a624(0x167)],'url':_0x44a624(0x164),'type':_0x5266cb}}]})[_0x44a624(0x148)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x40bb85+_0x44a624(0x142))['build']();},async 'execute'(_0x140754){const _0x54fe27=a37_0x589fff,_0x1d3c17=normalizeScene(_0x140754[_0x54fe27(0x15a)]('scene')),_0x408ec8=SCENE_TO_LEGACY_TYPE[_0x1d3c17],_0x597723=validateInputSelection(_0x140754);if(_0x597723[_0x54fe27(0x147)]){const _0x3954d7=await recognizeRuntimeOcr(_0x140754['appCode'],{'url':_0x597723[_0x54fe27(0x147)],'type':_0x408ec8});return{'ok':!![],'data':withScene(_0x3954d7,_0x1d3c17)};}const _0x2c0b78=requireRuntimeUploadFile(_0x597723['imageFile'],_0x54fe27(0x15f)),_0x2bae48=await uploadRuntimeFile(_0x140754['appCode'],_0x2c0b78['path']);if(!_0x2bae48[_0x54fe27(0x15e)])throw CliErrors['apiError'](_0x54fe27(0x14e));const _0x452d74=await queryRuntimeFileUrl(_0x2bae48[_0x54fe27(0x15e)],{'download':![]});if(!_0x452d74[_0x54fe27(0x144)])throw CliErrors['apiError'](_0x54fe27(0x162));const _0x110228=await recognizeRuntimeOcr(_0x140754[_0x54fe27(0x167)],{'url':_0x452d74[_0x54fe27(0x144)],'type':_0x408ec8});return{'ok':!![],'data':withScene(_0x110228,_0x1d3c17,_0x2bae48)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a37_0x591628=a37_0x35fc;(function(_0x447487,_0x2613de){const _0x5924e2=a37_0x35fc,_0x4312a8=_0x447487();while(!![]){try{const _0x54f598=-parseInt(_0x5924e2(0x15c))/0x1*(parseInt(_0x5924e2(0x15f))/0x2)+parseInt(_0x5924e2(0x144))/0x3*(parseInt(_0x5924e2(0x143))/0x4)+-parseInt(_0x5924e2(0x13d))/0x5*(parseInt(_0x5924e2(0x165))/0x6)+-parseInt(_0x5924e2(0x153))/0x7*(parseInt(_0x5924e2(0x169))/0x8)+parseInt(_0x5924e2(0x15d))/0x9+-parseInt(_0x5924e2(0x147))/0xa*(parseInt(_0x5924e2(0x167))/0xb)+parseInt(_0x5924e2(0x138))/0xc;if(_0x54f598===_0x2613de)break;else _0x4312a8['push'](_0x4312a8['shift']());}catch(_0x39bf2b){_0x4312a8['push'](_0x4312a8['shift']());}}}(a37_0x2af1,0x3e7d8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a37_0x2af1(){const _0x42128a=['POST','770imbvcO','Invoice','ocr','path','description','filePath','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','build','apiError','95159xRtJYq','4345542DTYyME','imageFile','6aSqVDA','invoice','appCode','\x20OCR','join','IdCard','482994IZDSeL','image-url','11vCFupZ','form','13264suvOYp','str','filter','validation','File\x20URL\x20response\x20missing\x20fileUrl.','\x20OCR\x20from\x20URL','count','imageUrl','File\x20upload\x20response\x20missing\x20filePath.','idCard','3615744kNqFGv','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Publicly\x20accessible\x20image\x20or\x20file\x20URL','20acdIEX','string','fileUrl','/client/ocr','idcard','length','28fMsHjS','131613rzRgfb','.\x20Supported\x20scenes:\x20','trim','454340lRyyld','recognize','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','scene','/client/uploadFile','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','body','/client/queryFileUrl','<filePath\x20returned\x20by\x20/client/uploadFile>','image-file','Preview:\x20recognize\x20'];a37_0x2af1=function(){return _0x42128a;};return a37_0x2af1();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a37_0x591628(0x160),'general',a37_0x591628(0x168),a37_0x591628(0x172)],SCENE_TO_LEGACY_TYPE={'invoice':a37_0x591628(0x154),'general':'General','form':'Table','idCard':a37_0x591628(0x164)},SCENE_FLAG={'name':a37_0x591628(0x14a),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a37_0x591628(0x13b)},IMAGE_FILE_FLAG={'name':a37_0x591628(0x150),'type':a37_0x591628(0x13e),'description':a37_0x591628(0x139)},IMAGE_URL_FLAG={'name':a37_0x591628(0x166),'type':'string','description':a37_0x591628(0x13c)};function normalizeScene(_0x5e351d){const _0x43aa2a=a37_0x591628,_0x3592cf=_0x5e351d[_0x43aa2a(0x146)]()['toLowerCase']();if(_0x3592cf===_0x43aa2a(0x141))return _0x43aa2a(0x172);if(_0x3592cf==='invoice'||_0x3592cf===_0x43aa2a(0x13a)||_0x3592cf==='form')return _0x3592cf;throw CliErrors[_0x43aa2a(0x16c)]('Unsupported\x20OCR\x20scene:\x20'+_0x5e351d+_0x43aa2a(0x145)+SUPPORTED_SCENES[_0x43aa2a(0x163)](',\x20'));}function selectedInputs(_0xd49204){const _0x270bd6=a37_0x591628,_0x5e9cf5=_0xd49204[_0x270bd6(0x16a)](_0x270bd6(0x150))[_0x270bd6(0x146)](),_0x5263bf=_0xd49204[_0x270bd6(0x16a)](_0x270bd6(0x166))[_0x270bd6(0x146)]();return{'imageFile':_0x5e9cf5,'imageUrl':_0x5263bf,'count':[_0x5e9cf5,_0x5263bf][_0x270bd6(0x16b)](Boolean)[_0x270bd6(0x142)]};}function a37_0x35fc(_0x2de724,_0x22604d){_0x2de724=_0x2de724-0x138;const _0x2af130=a37_0x2af1();let _0x35fc9e=_0x2af130[_0x2de724];return _0x35fc9e;}function validateInputSelection(_0xda7f27){const _0x178230=a37_0x591628,_0x340d80=selectedInputs(_0xda7f27);if(_0x340d80[_0x178230(0x16f)]!==0x1)throw CliErrors['validation'](_0x178230(0x14c));return _0x340d80;}function withScene(_0x262452,_0x6e9f2f,_0xa0e6da){const _0xbdb817=a37_0x591628;return{..._0x262452,'scene':_0x6e9f2f,..._0xa0e6da?{'sourceFile':{'fileName':_0xa0e6da['fileName'],'filePath':_0xa0e6da[_0xbdb817(0x158)]}}:{}};}const ocrRecognize={'service':a37_0x591628(0x155),'command':a37_0x591628(0x148),'description':'提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x333909){const _0x284236=a37_0x591628,_0x3f6a94=normalizeScene(_0x333909['str'](_0x284236(0x14a))),_0x577644=SCENE_TO_LEGACY_TYPE[_0x3f6a94],_0x5117d0=validateInputSelection(_0x333909);if(_0x5117d0[_0x284236(0x170)])return dryRun(_0x284236(0x152),_0x284236(0x140))[_0x284236(0x14d)]({'appCode':_0x333909[_0x284236(0x161)],'url':_0x5117d0[_0x284236(0x170)],'type':_0x577644})[_0x284236(0x157)](_0x284236(0x151)+_0x3f6a94+_0x284236(0x16e))[_0x284236(0x15a)]();const _0x574c6b=requireRuntimeUploadFile(_0x5117d0[_0x284236(0x15e)],'image-file');return dryRun(_0x284236(0x152),_0x284236(0x14b))['body']({'steps':[{'method':_0x284236(0x152),'url':_0x284236(0x14b),'body':{'appCode':_0x333909['appCode'],'multipart':{'file':_0x574c6b}}},{'method':'POST','url':_0x284236(0x14e),'body':{'filePath':_0x284236(0x14f),'downloadFlag':![]}},{'method':_0x284236(0x152),'url':_0x284236(0x140),'body':{'appCode':_0x333909[_0x284236(0x161)],'url':_0x284236(0x149),'type':_0x577644}}]})[_0x284236(0x157)](_0x284236(0x159)+_0x3f6a94+_0x284236(0x162))['build']();},async 'execute'(_0x40fde1){const _0x1c1cfd=a37_0x591628,_0x3d27df=normalizeScene(_0x40fde1[_0x1c1cfd(0x16a)](_0x1c1cfd(0x14a))),_0x336d2b=SCENE_TO_LEGACY_TYPE[_0x3d27df],_0x538285=validateInputSelection(_0x40fde1);if(_0x538285[_0x1c1cfd(0x170)]){const _0x356957=await recognizeRuntimeOcr(_0x40fde1[_0x1c1cfd(0x161)],{'url':_0x538285['imageUrl'],'type':_0x336d2b});return{'ok':!![],'data':withScene(_0x356957,_0x3d27df)};}const _0x1e2fc9=requireRuntimeUploadFile(_0x538285['imageFile'],_0x1c1cfd(0x150)),_0x169d6b=await uploadRuntimeFile(_0x40fde1['appCode'],_0x1e2fc9[_0x1c1cfd(0x156)]);if(!_0x169d6b[_0x1c1cfd(0x158)])throw CliErrors[_0x1c1cfd(0x15b)](_0x1c1cfd(0x171));const _0x283911=await queryRuntimeFileUrl(_0x169d6b[_0x1c1cfd(0x158)],{'download':![]});if(!_0x283911[_0x1c1cfd(0x13f)])throw CliErrors[_0x1c1cfd(0x15b)](_0x1c1cfd(0x16d));const _0x3ee500=await recognizeRuntimeOcr(_0x40fde1[_0x1c1cfd(0x161)],{'url':_0x283911[_0x1c1cfd(0x13f)],'type':_0x336d2b});return{'ok':!![],'data':withScene(_0x3ee500,_0x3d27df,_0x169d6b)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a38_0x1c5886=a38_0x5746;(function(_0x1709ba,_0x588292){const _0x52385b=a38_0x5746,_0x4fe33e=_0x1709ba();while(!![]){try{const _0x566042=parseInt(_0x52385b(0xba))/0x1*(parseInt(_0x52385b(0xb4))/0x2)+-parseInt(_0x52385b(0xaf))/0x3*(-parseInt(_0x52385b(0xb6))/0x4)+-parseInt(_0x52385b(0xac))/0x5*(-parseInt(_0x52385b(0xb0))/0x6)+parseInt(_0x52385b(0xaa))/0x7*(parseInt(_0x52385b(0xa9))/0x8)+parseInt(_0x52385b(0xa7))/0x9+-parseInt(_0x52385b(0xb2))/0xa+-parseInt(_0x52385b(0xad))/0xb;if(_0x566042===_0x588292)break;else _0x4fe33e['push'](_0x4fe33e['shift']());}catch(_0x20262c){_0x4fe33e['push'](_0x4fe33e['shift']());}}}(a38_0x55b6,0xe456f));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';function a38_0x5746(_0x586ae6,_0x32d617){_0x586ae6=_0x586ae6-0xa7;const _0x55b6c0=a38_0x55b6();let _0x574628=_0x55b6c0[_0x586ae6];return _0x574628;}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a38_0x1c5886(0xbc),'command':a38_0x1c5886(0xb8),'description':a38_0x1c5886(0xa8),'risk':a38_0x1c5886(0xb1),'flags':[{'name':a38_0x1c5886(0xb5),'type':'string','description':a38_0x1c5886(0xb7)}],async 'execute'(_0x21a60d){const _0x893a67=a38_0x1c5886,_0x3d3e54=_0x21a60d[_0x893a67(0xab)](_0x893a67(0xb5))[_0x893a67(0xbb)]();if(!_0x3d3e54)return{'ok':!![],'data':{'scope':_0x893a67(0xae),'datasets':await listRuntimeDatasetRolePermits(_0x21a60d[_0x893a67(0xb9)])}};const _0x3743c2=await resolveRuntimeRoleRef(_0x21a60d[_0x893a67(0xb9)],_0x3d3e54);return{'ok':!![],'data':{'scope':'runtime','role':{'id':_0x3743c2['id'],'roleName':_0x3743c2['roleName'],'roleType':_0x3743c2[_0x893a67(0xb3)]},'datasets':await listRuntimeDatasetPermits(_0x21a60d['appCode'],_0x3743c2['id'])}};}};function a38_0x55b6(){const _0x5cc853=['384TsvhRC','read','11720060fWEUvE','roleType','182ZyYzFU','role','4AXtmTu','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','dataset-get','appCode','2294LKSnAS','trim','permit','4377069gBVVPK','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','22312bCEguS','2583jXzHTH','str','48130pDNbBT','3888984viaRLY','runtime','361587Siexgz'];a38_0x55b6=function(){return _0x5cc853;};return a38_0x55b6();}
1
+ const a38_0x4611c3=a38_0x3130;(function(_0x32a497,_0x58edaa){const _0xdfc2b9=a38_0x3130,_0x5c9e9e=_0x32a497();while(!![]){try{const _0x34cec0=parseInt(_0xdfc2b9(0xf4))/0x1+parseInt(_0xdfc2b9(0xf5))/0x2+parseInt(_0xdfc2b9(0xf1))/0x3*(parseInt(_0xdfc2b9(0xf6))/0x4)+parseInt(_0xdfc2b9(0xe8))/0x5*(-parseInt(_0xdfc2b9(0xfb))/0x6)+parseInt(_0xdfc2b9(0xf3))/0x7*(parseInt(_0xdfc2b9(0xf2))/0x8)+parseInt(_0xdfc2b9(0xef))/0x9*(parseInt(_0xdfc2b9(0xee))/0xa)+-parseInt(_0xdfc2b9(0xe6))/0xb*(parseInt(_0xdfc2b9(0xf0))/0xc);if(_0x34cec0===_0x58edaa)break;else _0x5c9e9e['push'](_0x5c9e9e['shift']());}catch(_0x33e62b){_0x5c9e9e['push'](_0x5c9e9e['shift']());}}}(a38_0x3c09,0x4fa14));function a38_0x3130(_0x16dc92,_0x2bd55f){_0x16dc92=_0x16dc92-0xe4;const _0x3c0966=a38_0x3c09();let _0x3130ba=_0x3c0966[_0x16dc92];return _0x3130ba;}import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a38_0x3c09(){const _0x3da19e=['Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','2616312tXRGOH','dataset-get','roleType','76318WEvgGu','role','5lQnzKp','appCode','runtime','roleName','trim','string','374620xYHgrk','45AmTwGK','2316ppChZH','1162275TLTbfC','16rVlliQ','2005339kJXkJv','496342KSWexV','914438RnyCRE','4rEBsUK','read','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','permit'];a38_0x3c09=function(){return _0x3da19e;};return a38_0x3c09();}export const permitDatasetGet={'service':a38_0x4611c3(0xf9),'command':a38_0x4611c3(0xe4),'description':a38_0x4611c3(0xfa),'risk':a38_0x4611c3(0xf7),'flags':[{'name':a38_0x4611c3(0xe7),'type':a38_0x4611c3(0xed),'description':a38_0x4611c3(0xf8)}],async 'execute'(_0x4105a3){const _0x6bf38f=a38_0x4611c3,_0x5a046a=_0x4105a3['str'](_0x6bf38f(0xe7))[_0x6bf38f(0xec)]();if(!_0x5a046a)return{'ok':!![],'data':{'scope':_0x6bf38f(0xea),'datasets':await listRuntimeDatasetRolePermits(_0x4105a3['appCode'])}};const _0x19bd76=await resolveRuntimeRoleRef(_0x4105a3[_0x6bf38f(0xe9)],_0x5a046a);return{'ok':!![],'data':{'scope':_0x6bf38f(0xea),'role':{'id':_0x19bd76['id'],'roleName':_0x19bd76[_0x6bf38f(0xeb)],'roleType':_0x19bd76[_0x6bf38f(0xe5)]},'datasets':await listRuntimeDatasetPermits(_0x4105a3[_0x6bf38f(0xe9)],_0x19bd76['id'])}};}};
@@ -1 +1 @@
1
- const a39_0x4d0b7d=a39_0x3c24;function a39_0x3c24(_0x524361,_0x5efec7){_0x524361=_0x524361-0x16b;const _0xfbe8b4=a39_0xfbe8();let _0x3c2480=_0xfbe8b4[_0x524361];return _0x3c2480;}(function(_0x118cf5,_0x5bc6a2){const _0x511267=a39_0x3c24,_0x4f4087=_0x118cf5();while(!![]){try{const _0x4e3509=parseInt(_0x511267(0x18b))/0x1*(parseInt(_0x511267(0x1ac))/0x2)+parseInt(_0x511267(0x19f))/0x3*(parseInt(_0x511267(0x185))/0x4)+parseInt(_0x511267(0x1ab))/0x5*(parseInt(_0x511267(0x16e))/0x6)+-parseInt(_0x511267(0x17e))/0x7*(parseInt(_0x511267(0x19c))/0x8)+-parseInt(_0x511267(0x180))/0x9+-parseInt(_0x511267(0x1a5))/0xa*(-parseInt(_0x511267(0x1a4))/0xb)+-parseInt(_0x511267(0x19d))/0xc*(parseInt(_0x511267(0x193))/0xd);if(_0x4e3509===_0x5bc6a2)break;else _0x4f4087['push'](_0x4f4087['shift']());}catch(_0x47c5d2){_0x4f4087['push'](_0x4f4087['shift']());}}}(a39_0xfbe8,0xee2da));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';function a39_0xfbe8(){const _0x52c8f3=['DATA_ROW','\x20does\x20not\x20expose\x20','/client/permit/resource/batch-save-dataset','348629lgTPge','high-risk-write','build','Comma-separated\x20actions:\x20','str','datasetCode','roles','dataset-set','2779413lYMNQB','\x20for\x20role\x20','DATA_DETAIL','Runtime\x20dataset\x20','actions','warnings','role','revoke','bool','472Cflqav','24zLtFzq','grant','2686827AmxTda','validation','Invalid\x20dataset\x20actions:\x20','length','DATA_EXPORT','5647939ZIVEzx','30PDvVbs','changed','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','datasets','resourceType','map','5435yXJLpp','4sdqwta','permitList','resourceName','DATA_DELETE','toUpperCase','POST','3684OhguSQ','after','push','datasetCodes','operation','Comma-separated\x20runtime\x20dataset\x20codes','\x20selected\x20runtime\x20dataset\x20actions','string','permit','includes','\x20was\x20not\x20found.','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','filter','dataPermitList','DATA_CREATE','--actions','230699LNpJcP','\x20already\x20reflects\x20','4076901bbDPNf','DATA_UPDATE','Dataset\x20','rolePermit','appCode','4BhqANL','find','permitId'];a39_0xfbe8=function(){return _0x52c8f3;};return a39_0xfbe8();}import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a39_0x4d0b7d(0x17c),a39_0x4d0b7d(0x181),a39_0x4d0b7d(0x16b),a39_0x4d0b7d(0x195),a39_0x4d0b7d(0x1a3),a39_0x4d0b7d(0x188)],DATASETS_FLAG={'name':a39_0x4d0b7d(0x1a8),'type':a39_0x4d0b7d(0x175),'required':!![],'description':a39_0x4d0b7d(0x173)},ACTIONS_FLAG={'name':'actions','type':a39_0x4d0b7d(0x175),'required':!![],'description':a39_0x4d0b7d(0x18e)+DATA_ACTIONS['join'](',\x20')};async function prepare(_0x1aba44){const _0x24e325=a39_0x4d0b7d;await assertRuntimePermissionManager(_0x1aba44['appCode']);const _0x358114=assertGrantOrRevoke(_0x1aba44[_0x24e325(0x19b)](_0x24e325(0x19e)),_0x1aba44['bool'](_0x24e325(0x19a))),_0x869cc6=await resolveRuntimeRoleRef(_0x1aba44['appCode'],_0x1aba44[_0x24e325(0x18f)](_0x24e325(0x199)));assertRuntimePermitRoleConfigurable(_0x869cc6);const _0xfe508=splitRefs(_0x1aba44[_0x24e325(0x18f)](_0x24e325(0x1a8)),'--datasets'),_0x429886=[...new Set(splitRefs(_0x1aba44[_0x24e325(0x18f)](_0x24e325(0x197)),_0x24e325(0x17d))[_0x24e325(0x1aa)](_0x16ab0b=>_0x16ab0b[_0x24e325(0x16c)]()))],_0x457504=_0x429886[_0x24e325(0x17a)](_0xdb1aa4=>!DATA_ACTIONS[_0x24e325(0x177)](_0xdb1aa4));if(_0x457504[_0x24e325(0x1a2)]>0x0)throw CliErrors[_0x24e325(0x1a0)](_0x24e325(0x1a1)+_0x457504['join'](',\x20')+'.');const _0x2d7148=await listRuntimeDatasetRolePermits(_0x1aba44[_0x24e325(0x184)]),_0x4dd356=await listRuntimePermitRoles(_0x1aba44[_0x24e325(0x184)]),_0xf1b22a=[],_0x2fe295=[],_0x56ebae=[],_0x47bc20=[];for(const _0x3ff449 of _0xfe508){const _0x4488b7=_0x2d7148[_0x24e325(0x186)](_0x1a9dd1=>_0x1a9dd1[_0x24e325(0x190)]===_0x3ff449);if(!_0x4488b7)throw CliErrors[_0x24e325(0x1a0)](_0x24e325(0x196)+_0x3ff449+_0x24e325(0x178));for(const _0xb2049f of _0x429886){const _0x3d7448=_0x4488b7[_0x24e325(0x17b)]['find'](_0x32e164=>_0x32e164[_0x24e325(0x1a9)]===_0xb2049f);if(!_0x3d7448)throw CliErrors[_0x24e325(0x1a0)](_0x24e325(0x182)+_0x3ff449+_0x24e325(0x189)+_0xb2049f+'.');const _0x331fc4=applyRuntimeRolePermission(_0x3d7448['rolePermit'],_0x869cc6,_0x4dd356,_0x358114);_0x2fe295[_0x24e325(0x170)]({'datasetCode':_0x3ff449,'resourceType':_0xb2049f,'rolePermit':_0x3d7448[_0x24e325(0x183)]}),_0x56ebae[_0x24e325(0x170)]({'datasetCode':_0x3ff449,'resourceType':_0xb2049f,'rolePermit':_0x331fc4[_0x24e325(0x191)]}),_0x331fc4[_0x24e325(0x1a6)]?_0xf1b22a[_0x24e325(0x170)]({..._0x3d7448['permitId']!=null?{'id':_0x3d7448[_0x24e325(0x187)]}:{},'appCode':_0x1aba44[_0x24e325(0x184)],'resourceCode':_0x3ff449,'resourceType':_0xb2049f,'resourceName':_0x3d7448[_0x24e325(0x1ae)],'rolePermit':_0x331fc4[_0x24e325(0x191)]}):_0x47bc20[_0x24e325(0x170)](_0x3ff449+'/'+_0xb2049f+_0x24e325(0x17f)+_0x358114+_0x24e325(0x194)+_0x869cc6['id']+'.');}}return{'operation':_0x358114,'role':_0x869cc6,'datasetCodes':_0xfe508,'actions':_0x429886,'permitList':_0xf1b22a,'before':_0x2fe295,'after':_0x56ebae,'warnings':_0x47bc20};}export const permitDatasetSet={'service':a39_0x4d0b7d(0x176),'command':a39_0x4d0b7d(0x192),'description':a39_0x4d0b7d(0x1a7),'risk':a39_0x4d0b7d(0x18c),'confirmationDescription':a39_0x4d0b7d(0x179),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x9f1b79){const _0xa33a38=a39_0x4d0b7d;assertGrantOrRevoke(_0x9f1b79[_0xa33a38(0x19b)](_0xa33a38(0x19e)),_0x9f1b79[_0xa33a38(0x19b)](_0xa33a38(0x19a)));},async 'dryRun'(_0x1ce694){const _0x5d03d6=a39_0x4d0b7d,_0x3ea41e=await prepare(_0x1ce694);return dryRun(_0x5d03d6(0x16d),'/client/permit/resource/batch-save-dataset')['body']({'appCode':_0x1ce694[_0x5d03d6(0x184)],'permitList':_0x3ea41e['permitList']})['description']('Preview:\x20'+_0x3ea41e[_0x5d03d6(0x172)]+_0x5d03d6(0x174))[_0x5d03d6(0x18d)]();},async 'execute'(_0x662998){const _0x20d572=a39_0x4d0b7d,_0x13bbc9=await prepare(_0x662998);return _0x13bbc9[_0x20d572(0x1ad)][_0x20d572(0x1a2)]>0x0&&await saveRuntimeDatasetRolePermits(_0x662998['appCode'],_0x13bbc9['permitList']),{'ok':!![],'data':runtimePermitWriteResult('dataset-'+_0x13bbc9[_0x20d572(0x172)],{'roleId':_0x13bbc9[_0x20d572(0x199)]['id'],'datasetCodes':_0x13bbc9[_0x20d572(0x171)],'actions':_0x13bbc9['actions']},_0x13bbc9['before'],_0x13bbc9[_0x20d572(0x16f)],{'method':'POST','path':_0x20d572(0x18a)},_0x13bbc9[_0x20d572(0x198)])};}};
1
+ const a39_0x317ea6=a39_0x4e18;(function(_0x5cf787,_0x2f2a2f){const _0xd40994=a39_0x4e18,_0x1ee78d=_0x5cf787();while(!![]){try{const _0x6d1677=parseInt(_0xd40994(0xa2))/0x1*(parseInt(_0xd40994(0x99))/0x2)+-parseInt(_0xd40994(0xac))/0x3+-parseInt(_0xd40994(0xa0))/0x4+-parseInt(_0xd40994(0x9b))/0x5*(parseInt(_0xd40994(0xb1))/0x6)+-parseInt(_0xd40994(0xb4))/0x7*(-parseInt(_0xd40994(0x88))/0x8)+-parseInt(_0xd40994(0xa9))/0x9*(parseInt(_0xd40994(0xa7))/0xa)+-parseInt(_0xd40994(0x83))/0xb*(-parseInt(_0xd40994(0xb3))/0xc);if(_0x6d1677===_0x2f2a2f)break;else _0x1ee78d['push'](_0x1ee78d['shift']());}catch(_0x227037){_0x1ee78d['push'](_0x1ee78d['shift']());}}}(a39_0x3357,0x7a805));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=['DATA_CREATE','DATA_UPDATE',a39_0x317ea6(0x90),'DATA_DETAIL',a39_0x317ea6(0xb5),a39_0x317ea6(0x84)],DATASETS_FLAG={'name':a39_0x317ea6(0xab),'type':a39_0x317ea6(0xb8),'required':!![],'description':'Comma-separated\x20runtime\x20dataset\x20codes'},ACTIONS_FLAG={'name':a39_0x317ea6(0xa6),'type':a39_0x317ea6(0xb8),'required':!![],'description':a39_0x317ea6(0xb9)+DATA_ACTIONS['join'](',\x20')};async function prepare(_0x466e90){const _0xda2a6b=a39_0x317ea6;await assertRuntimePermissionManager(_0x466e90[_0xda2a6b(0x8b)]);const _0x3dfd50=assertGrantOrRevoke(_0x466e90[_0xda2a6b(0xad)](_0xda2a6b(0xa4)),_0x466e90[_0xda2a6b(0xad)]('revoke')),_0x19008b=await resolveRuntimeRoleRef(_0x466e90[_0xda2a6b(0x8b)],_0x466e90[_0xda2a6b(0xa1)](_0xda2a6b(0x8f)));assertRuntimePermitRoleConfigurable(_0x19008b);const _0xd2d863=splitRefs(_0x466e90[_0xda2a6b(0xa1)](_0xda2a6b(0xab)),_0xda2a6b(0x93)),_0x452bff=[...new Set(splitRefs(_0x466e90['str'](_0xda2a6b(0xa6)),'--actions')[_0xda2a6b(0xaa)](_0x403d87=>_0x403d87[_0xda2a6b(0x9d)]()))],_0x2106a2=_0x452bff[_0xda2a6b(0x8c)](_0x468593=>!DATA_ACTIONS[_0xda2a6b(0x96)](_0x468593));if(_0x2106a2[_0xda2a6b(0x95)]>0x0)throw CliErrors[_0xda2a6b(0x9c)](_0xda2a6b(0xa3)+_0x2106a2['join'](',\x20')+'.');const _0xb73215=await listRuntimeDatasetRolePermits(_0x466e90[_0xda2a6b(0x8b)]),_0x3381a7=await listRuntimePermitRoles(_0x466e90[_0xda2a6b(0x8b)]),_0x1cbcce=[],_0x53e5d0=[],_0x1fc014=[],_0x54d864=[];for(const _0x273858 of _0xd2d863){const _0x453291=_0xb73215['find'](_0x3d312a=>_0x3d312a[_0xda2a6b(0xb2)]===_0x273858);if(!_0x453291)throw CliErrors[_0xda2a6b(0x9c)]('Runtime\x20dataset\x20'+_0x273858+'\x20was\x20not\x20found.');for(const _0x136eb7 of _0x452bff){const _0x169b70=_0x453291[_0xda2a6b(0x8e)][_0xda2a6b(0xb0)](_0x3a525e=>_0x3a525e[_0xda2a6b(0x92)]===_0x136eb7);if(!_0x169b70)throw CliErrors[_0xda2a6b(0x9c)](_0xda2a6b(0xbc)+_0x273858+'\x20does\x20not\x20expose\x20'+_0x136eb7+'.');const _0x121667=applyRuntimeRolePermission(_0x169b70[_0xda2a6b(0x8a)],_0x19008b,_0x3381a7,_0x3dfd50);_0x53e5d0[_0xda2a6b(0x94)]({'datasetCode':_0x273858,'resourceType':_0x136eb7,'rolePermit':_0x169b70[_0xda2a6b(0x8a)]}),_0x1fc014['push']({'datasetCode':_0x273858,'resourceType':_0x136eb7,'rolePermit':_0x121667[_0xda2a6b(0x97)]}),_0x121667['changed']?_0x1cbcce['push']({..._0x169b70['permitId']!=null?{'id':_0x169b70[_0xda2a6b(0x86)]}:{},'appCode':_0x466e90['appCode'],'resourceCode':_0x273858,'resourceType':_0x136eb7,'resourceName':_0x169b70[_0xda2a6b(0xb6)],'rolePermit':_0x121667[_0xda2a6b(0x97)]}):_0x54d864[_0xda2a6b(0x94)](_0x273858+'/'+_0x136eb7+'\x20already\x20reflects\x20'+_0x3dfd50+_0xda2a6b(0x9e)+_0x19008b['id']+'.');}}return{'operation':_0x3dfd50,'role':_0x19008b,'datasetCodes':_0xd2d863,'actions':_0x452bff,'permitList':_0x1cbcce,'before':_0x53e5d0,'after':_0x1fc014,'warnings':_0x54d864};}export const permitDatasetSet={'service':a39_0x317ea6(0xa8),'command':a39_0x317ea6(0x89),'description':'Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','risk':a39_0x317ea6(0xae),'confirmationDescription':a39_0x317ea6(0xbb),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x55a0b0){const _0x15a76b=a39_0x317ea6;assertGrantOrRevoke(_0x55a0b0[_0x15a76b(0xad)](_0x15a76b(0xa4)),_0x55a0b0[_0x15a76b(0xad)](_0x15a76b(0xb7)));},async 'dryRun'(_0x39ac00){const _0x2f0616=a39_0x317ea6,_0x358235=await prepare(_0x39ac00);return dryRun(_0x2f0616(0x98),'/client/permit/resource/batch-save-dataset')['body']({'appCode':_0x39ac00[_0x2f0616(0x8b)],'permitList':_0x358235[_0x2f0616(0x9a)]})[_0x2f0616(0x9f)](_0x2f0616(0xa5)+_0x358235[_0x2f0616(0x91)]+'\x20selected\x20runtime\x20dataset\x20actions')['build']();},async 'execute'(_0x4321f6){const _0x34b8e5=a39_0x317ea6,_0x3d8ac0=await prepare(_0x4321f6);return _0x3d8ac0['permitList']['length']>0x0&&await saveRuntimeDatasetRolePermits(_0x4321f6['appCode'],_0x3d8ac0[_0x34b8e5(0x9a)]),{'ok':!![],'data':runtimePermitWriteResult(_0x34b8e5(0x85)+_0x3d8ac0[_0x34b8e5(0x91)],{'roleId':_0x3d8ac0[_0x34b8e5(0x8f)]['id'],'datasetCodes':_0x3d8ac0['datasetCodes'],'actions':_0x3d8ac0['actions']},_0x3d8ac0[_0x34b8e5(0xba)],_0x3d8ac0[_0x34b8e5(0x8d)],{'method':'POST','path':_0x34b8e5(0x87)},_0x3d8ac0[_0x34b8e5(0xaf)])};}};function a39_0x4e18(_0x286def,_0x1d31d2){_0x286def=_0x286def-0x83;const _0x335704=a39_0x3357();let _0x4e181c=_0x335704[_0x286def];return _0x4e181c;}function a39_0x3357(){const _0x1269a1=['dataset-','permitId','/client/permit/resource/batch-save-dataset','16kJcFQb','dataset-set','rolePermit','appCode','filter','after','dataPermitList','role','DATA_DELETE','operation','resourceType','--datasets','push','length','includes','roles','POST','108986yWlrvn','permitList','15590PntirF','validation','toUpperCase','\x20for\x20role\x20','description','3085788YTtIWB','str','15Yuyuwu','Invalid\x20dataset\x20actions:\x20','grant','Preview:\x20','actions','80NfIEdB','permit','1032948ZmeTJF','map','datasets','584019qmFSXO','bool','high-risk-write','warnings','find','66BbHwma','datasetCode','372GyrtCV','1702204fJpUmP','DATA_EXPORT','resourceName','revoke','string','Comma-separated\x20actions:\x20','before','授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','Dataset\x20','396220KnltZc','DATA_ROW'];a39_0x3357=function(){return _0x1269a1;};return a39_0x3357();}
@@ -1 +1 @@
1
- function a40_0x3315(_0x2c4073,_0x5318c3){_0x2c4073=_0x2c4073-0x1c0;const _0x5cee29=a40_0x5cee();let _0x3315ed=_0x5cee29[_0x2c4073];return _0x3315ed;}(function(_0x2a9d53,_0x473ba5){const _0x42509d=a40_0x3315,_0xfc150d=_0x2a9d53();while(!![]){try{const _0x3b8c8b=parseInt(_0x42509d(0x1c2))/0x1*(parseInt(_0x42509d(0x1c3))/0x2)+parseInt(_0x42509d(0x1c6))/0x3+-parseInt(_0x42509d(0x1c5))/0x4*(parseInt(_0x42509d(0x1c1))/0x5)+-parseInt(_0x42509d(0x1c0))/0x6*(-parseInt(_0x42509d(0x1cb))/0x7)+parseInt(_0x42509d(0x1c9))/0x8*(-parseInt(_0x42509d(0x1c8))/0x9)+-parseInt(_0x42509d(0x1c4))/0xa+parseInt(_0x42509d(0x1c7))/0xb*(parseInt(_0x42509d(0x1ca))/0xc);if(_0x3b8c8b===_0x473ba5)break;else _0xfc150d['push'](_0xfc150d['shift']());}catch(_0x236e52){_0xfc150d['push'](_0xfc150d['shift']());}}}(a40_0x5cee,0x9951f));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a40_0x5cee(){const _0x55ea44=['4457383SqiMss','6nBafax','15fcmUxW','36151gUSAbJ','28urwYnF','1704360ergole','468356JoetVm','33510iHyGPJ','11zKupnl','36OQSuGN','841816omBEBy','4998684dGrLQa'];a40_0x5cee=function(){return _0x55ea44;};return a40_0x5cee();}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(_0x12ed5c,_0x6147fe){const _0xbec5c1=a40_0x5e9a,_0x31587b=_0x12ed5c();while(!![]){try{const _0x3ed431=-parseInt(_0xbec5c1(0x17a))/0x1+-parseInt(_0xbec5c1(0x177))/0x2+-parseInt(_0xbec5c1(0x173))/0x3*(parseInt(_0xbec5c1(0x172))/0x4)+parseInt(_0xbec5c1(0x174))/0x5+-parseInt(_0xbec5c1(0x179))/0x6+-parseInt(_0xbec5c1(0x175))/0x7*(parseInt(_0xbec5c1(0x178))/0x8)+parseInt(_0xbec5c1(0x176))/0x9;if(_0x3ed431===_0x6147fe)break;else _0x31587b['push'](_0x31587b['shift']());}catch(_0x1c04d6){_0x31587b['push'](_0x31587b['shift']());}}}(a40_0x3f47,0xea874));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a40_0x5e9a(_0x24ff5c,_0x4b0bdb){_0x24ff5c=_0x24ff5c-0x172;const _0x3f4783=a40_0x3f47();let _0x5e9aaa=_0x3f4783[_0x24ff5c];return _0x5e9aaa;}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];function a40_0x3f47(){const _0x325bc7=['36274896rNSdoq','2790702BouqYZ','3390784IqYlVE','653346ivifJR','915713VvQXTc','4PEYcip','255183wKjGaW','5652460LKszju','28hXjSlG'];a40_0x3f47=function(){return _0x325bc7;};return a40_0x3f47();}
@@ -1 +1 @@
1
- const a41_0x3e9ec4=a41_0x4106;function a41_0x308e(){const _0x3e3fb1=['108TdWBlP','5186475MavuoL','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','364196dXhLOG','1764264xXUWZE','1341747Gxxhbd','1200234uqNNfB','176VcXdqz','runtime','3832488WaIWRg','89589XCdPXG','permit','num'];a41_0x308e=function(){return _0x3e3fb1;};return a41_0x308e();}(function(_0x55e6c5,_0x32b12){const _0x54a0c6=a41_0x4106,_0x202de9=_0x55e6c5();while(!![]){try{const _0xd72e49=-parseInt(_0x54a0c6(0x95))/0x1+parseInt(_0x54a0c6(0x96))/0x2+-parseInt(_0x54a0c6(0x8d))/0x3*(-parseInt(_0x54a0c6(0x90))/0x4)+parseInt(_0x54a0c6(0x91))/0x5+parseInt(_0x54a0c6(0x94))/0x6+parseInt(_0x54a0c6(0x93))/0x7*(-parseInt(_0x54a0c6(0x8a))/0x8)+parseInt(_0x54a0c6(0x8c))/0x9;if(_0xd72e49===_0x32b12)break;else _0x202de9['push'](_0x202de9['shift']());}catch(_0x576193){_0x202de9['push'](_0x202de9['shift']());}}}(a41_0x308e,0xa556a));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a41_0x4106(_0x94e9ab,_0x54d4e0){_0x94e9ab=_0x94e9ab-0x8a;const _0x308e90=a41_0x308e();let _0x41060e=_0x308e90[_0x94e9ab];return _0x41060e;}export const permitPageGet={'service':a41_0x3e9ec4(0x8e),'command':'page-get','description':a41_0x3e9ec4(0x92),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x1d0eed){const _0x4ff72e=a41_0x3e9ec4,_0xa6dbd3=await getRuntimePagePermit(_0x1d0eed[_0x4ff72e(0x8f)]('menu-id'));return{'ok':!![],'data':{'scope':_0x4ff72e(0x8b),'page':projectRuntimePagePermit(_0xa6dbd3)}};}};
1
+ const a41_0xa4dce=a41_0x18b7;function a41_0x4bf1(){const _0x304281=['num','11iwmWmv','558igIuWY','30605fvGFYR','2XpGcDD','15344610UrdsFD','permit','2202504lvbzTw','666478jLDydW','14HkClVW','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','9VhzDCg','1776515HTsuJs','menu-id','page-get','14494266nxAZbV','846628NmsfEf','runtime','348geZrDD'];a41_0x4bf1=function(){return _0x304281;};return a41_0x4bf1();}(function(_0x1487dc,_0x40c423){const _0x3d4ac0=a41_0x18b7,_0x24fe28=_0x1487dc();while(!![]){try{const _0x282f66=parseInt(_0x3d4ac0(0x8b))/0x1*(parseInt(_0x3d4ac0(0x87))/0x2)+-parseInt(_0x3d4ac0(0x7b))/0x3*(parseInt(_0x3d4ac0(0x80))/0x4)+parseInt(_0x3d4ac0(0x86))/0x5*(parseInt(_0x3d4ac0(0x85))/0x6)+parseInt(_0x3d4ac0(0x79))/0x7*(-parseInt(_0x3d4ac0(0x8a))/0x8)+-parseInt(_0x3d4ac0(0x7f))/0x9+-parseInt(_0x3d4ac0(0x88))/0xa*(parseInt(_0x3d4ac0(0x84))/0xb)+parseInt(_0x3d4ac0(0x82))/0xc*(parseInt(_0x3d4ac0(0x7c))/0xd);if(_0x282f66===_0x40c423)break;else _0x24fe28['push'](_0x24fe28['shift']());}catch(_0x3644e3){_0x24fe28['push'](_0x24fe28['shift']());}}}(a41_0x4bf1,0xd3f62));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a41_0x18b7(_0x2edf63,_0x4d9343){_0x2edf63=_0x2edf63-0x79;const _0x4bf174=a41_0x4bf1();let _0x18b75d=_0x4bf174[_0x2edf63];return _0x18b75d;}export const permitPageGet={'service':a41_0xa4dce(0x89),'command':a41_0xa4dce(0x7e),'description':a41_0xa4dce(0x7a),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x420505){const _0x316278=a41_0xa4dce,_0x26a3f7=await getRuntimePagePermit(_0x420505[_0x316278(0x83)](_0x316278(0x7d)));return{'ok':!![],'data':{'scope':_0x316278(0x81),'page':projectRuntimePagePermit(_0x26a3f7)}};}};
@@ -1 +1 @@
1
- function a42_0x399e(){const _0x5355d3=['join','32036104dGHeqw','9770418ojQJTK','key','slots','/client/permit/page/save','permit','appCode','10272ysjiKR','validation','description','\x20does\x20not\x20expose\x20','5791480POYScZ','page','Preview:\x20update\x20page\x20permission\x20slots\x20','\x20does\x20not\x20belong\x20to\x20app\x20','rolePermit','str','108282DvhNPn','high-risk-write','1572rcRUIB','3332408ZzAwux','POST','num','Page\x20menu\x20','7184849zZPVeC','page-set','length','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','Menu\x20','menuId','9TRATqX','修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','Set\x20selected\x20runtime\x20page\x20permission\x20slots','build','flag'];a42_0x399e=function(){return _0x5355d3;};return a42_0x399e();}const a42_0x296a4f=a42_0x3e88;function a42_0x3e88(_0x48cd82,_0x4ef4ea){_0x48cd82=_0x48cd82-0xe3;const _0x399e36=a42_0x399e();let _0x3e8800=_0x399e36[_0x48cd82];return _0x3e8800;}(function(_0x551d74,_0x2928ba){const _0xf3af5c=a42_0x3e88,_0x450361=_0x551d74();while(!![]){try{const _0x2bc40d=parseInt(_0xf3af5c(0x104))/0x1+parseInt(_0xf3af5c(0xe3))/0x2+-parseInt(_0xf3af5c(0x106))/0x3*(-parseInt(_0xf3af5c(0xfa))/0x4)+parseInt(_0xf3af5c(0xfe))/0x5+parseInt(_0xf3af5c(0xf4))/0x6+-parseInt(_0xf3af5c(0xe7))/0x7+-parseInt(_0xf3af5c(0xf3))/0x8*(parseInt(_0xf3af5c(0xed))/0x9);if(_0x2bc40d===_0x2928ba)break;else _0x450361['push'](_0x450361['shift']());}catch(_0xdf34af){_0x450361['push'](_0x450361['shift']());}}}(a42_0x399e,0xd5d79));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(_0xc08c5d){const _0x13129d=a42_0x3e88;await assertRuntimePermissionManager(_0xc08c5d[_0x13129d(0xf9)]);const _0x273b77=_0xc08c5d[_0x13129d(0xe5)]('menu-id'),_0x1442d5=await getRuntimePagePermit(_0x273b77);if(_0x1442d5['appCode']&&_0x1442d5[_0x13129d(0xf9)]!==_0xc08c5d['appCode'])throw CliErrors[_0x13129d(0xfb)](_0x13129d(0xeb)+_0x273b77+_0x13129d(0x101)+_0xc08c5d[_0x13129d(0xf9)]+'.');const _0xf0267d=structuredClone(_0x1442d5),_0x3bd89e=[];for(const _0x408f66 of PAGE_SLOT_SPECS){if(_0xc08c5d[_0x13129d(0xf1)](_0x408f66[_0x13129d(0xf1)])===undefined)continue;const _0x3623fb=_0x1442d5[_0x408f66['key']];if(!_0x3623fb)throw CliErrors[_0x13129d(0xfb)](_0x13129d(0xe6)+_0x273b77+_0x13129d(0xfd)+_0x408f66['key']+'.');_0x3623fb[_0x13129d(0x102)]=await resolveRuntimePermitRoles(_0xc08c5d['appCode'],splitRefs(_0xc08c5d[_0x13129d(0x103)](_0x408f66['flag']),'--'+_0x408f66[_0x13129d(0xf1)]),_0x408f66['allowSelf']),_0x3bd89e['push'](_0x408f66[_0x13129d(0xf5)]);}if(_0x3bd89e[_0x13129d(0xe9)]===0x0)throw CliErrors[_0x13129d(0xfb)](_0x13129d(0xea));return{'menuId':_0x273b77,'page':_0x1442d5,'before':_0xf0267d,'slots':_0x3bd89e};}export const permitPageSet={'service':a42_0x296a4f(0xf8),'command':a42_0x296a4f(0xe8),'description':a42_0x296a4f(0xef),'risk':a42_0x296a4f(0x105),'confirmationDescription':a42_0x296a4f(0xee),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x3ba969){const _0x2fd612=a42_0x296a4f,_0x8f8cd5=await prepare(_0x3ba969);return dryRun('POST',_0x2fd612(0xf7))['body'](_0x8f8cd5[_0x2fd612(0xff)])[_0x2fd612(0xfc)](_0x2fd612(0x100)+_0x8f8cd5[_0x2fd612(0xf6)][_0x2fd612(0xf2)](',\x20'))[_0x2fd612(0xf0)]();},async 'execute'(_0x23bcb6){const _0x4611fd=a42_0x296a4f,_0xbb000d=await prepare(_0x23bcb6),_0x1187d9=await saveRuntimePagePermit(_0xbb000d['page']);return{'ok':!![],'data':runtimePermitWriteResult(_0x4611fd(0xe8),{'menuId':_0xbb000d[_0x4611fd(0xec)],'slots':_0xbb000d[_0x4611fd(0xf6)]},projectRuntimePagePermit(_0xbb000d['before']),projectRuntimePagePermit(_0x1187d9),{'method':_0x4611fd(0xe4),'path':'/client/permit/page/save'})};}};
1
+ function a42_0x507f(_0x4f3d48,_0x19b357){_0x4f3d48=_0x4f3d48-0x160;const _0x19224a=a42_0x1922();let _0x507fc4=_0x19224a[_0x4f3d48];return _0x507fc4;}const a42_0x5e2e1a=a42_0x507f;(function(_0x53437f,_0x1e4e70){const _0x3ed4f7=a42_0x507f,_0x34ec97=_0x53437f();while(!![]){try{const _0x23bea2=-parseInt(_0x3ed4f7(0x181))/0x1+-parseInt(_0x3ed4f7(0x17b))/0x2*(-parseInt(_0x3ed4f7(0x163))/0x3)+parseInt(_0x3ed4f7(0x17a))/0x4*(-parseInt(_0x3ed4f7(0x16b))/0x5)+-parseInt(_0x3ed4f7(0x161))/0x6*(parseInt(_0x3ed4f7(0x16d))/0x7)+parseInt(_0x3ed4f7(0x169))/0x8+parseInt(_0x3ed4f7(0x174))/0x9*(parseInt(_0x3ed4f7(0x178))/0xa)+-parseInt(_0x3ed4f7(0x180))/0xb*(-parseInt(_0x3ed4f7(0x173))/0xc);if(_0x23bea2===_0x1e4e70)break;else _0x34ec97['push'](_0x34ec97['shift']());}catch(_0x40f183){_0x34ec97['push'](_0x34ec97['shift']());}}}(a42_0x1922,0x26416));import{getRuntimePagePermit,saveRuntimePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertRuntimePermissionManager,MENU_ID_FLAG,PAGE_ROLE_FLAGS,PAGE_SLOT_SPECS,projectRuntimePagePermit,resolveRuntimePermitRoles,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';function a42_0x1922(){const _0x66fab=['774652vUdGdQ','271972RspcId','str','/client/permit/page/save','key','Set\x20selected\x20runtime\x20page\x20permission\x20slots','407209FlKSQE','298814rkjHlg','修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','appCode','page','push','236706pCmvTT','allowSelf','6CIakie','build','page-set','length','join','validation','510320jcBvsm','\x20does\x20not\x20belong\x20to\x20app\x20','5pdzLuG','\x20does\x20not\x20expose\x20','42EksGEo','body','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','Menu\x20','flag','high-risk-write','156hawnZo','619812fJBlcR','Preview:\x20update\x20page\x20permission\x20slots\x20','description','slots','10QwFzco','POST'];a42_0x1922=function(){return _0x66fab;};return a42_0x1922();}async function prepare(_0x45a0e7){const _0x304c3a=a42_0x507f;await assertRuntimePermissionManager(_0x45a0e7[_0x304c3a(0x183)]);const _0x124ef2=_0x45a0e7['num']('menu-id'),_0x3ac14a=await getRuntimePagePermit(_0x124ef2);if(_0x3ac14a[_0x304c3a(0x183)]&&_0x3ac14a[_0x304c3a(0x183)]!==_0x45a0e7[_0x304c3a(0x183)])throw CliErrors[_0x304c3a(0x168)](_0x304c3a(0x170)+_0x124ef2+_0x304c3a(0x16a)+_0x45a0e7['appCode']+'.');const _0x2edde8=structuredClone(_0x3ac14a),_0x1ed4e4=[];for(const _0x3e18bf of PAGE_SLOT_SPECS){if(_0x45a0e7[_0x304c3a(0x171)](_0x3e18bf[_0x304c3a(0x171)])===undefined)continue;const _0x4caa6f=_0x3ac14a[_0x3e18bf[_0x304c3a(0x17e)]];if(!_0x4caa6f)throw CliErrors[_0x304c3a(0x168)]('Page\x20menu\x20'+_0x124ef2+_0x304c3a(0x16c)+_0x3e18bf['key']+'.');_0x4caa6f['rolePermit']=await resolveRuntimePermitRoles(_0x45a0e7[_0x304c3a(0x183)],splitRefs(_0x45a0e7[_0x304c3a(0x17c)](_0x3e18bf[_0x304c3a(0x171)]),'--'+_0x3e18bf['flag']),_0x3e18bf[_0x304c3a(0x162)]),_0x1ed4e4[_0x304c3a(0x160)](_0x3e18bf['key']);}if(_0x1ed4e4[_0x304c3a(0x166)]===0x0)throw CliErrors['validation'](_0x304c3a(0x16f));return{'menuId':_0x124ef2,'page':_0x3ac14a,'before':_0x2edde8,'slots':_0x1ed4e4};}export const permitPageSet={'service':'permit','command':a42_0x5e2e1a(0x165),'description':a42_0x5e2e1a(0x17f),'risk':a42_0x5e2e1a(0x172),'confirmationDescription':a42_0x5e2e1a(0x182),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x3fb50b){const _0x100917=a42_0x5e2e1a,_0x48f66a=await prepare(_0x3fb50b);return dryRun(_0x100917(0x179),_0x100917(0x17d))[_0x100917(0x16e)](_0x48f66a[_0x100917(0x184)])[_0x100917(0x176)](_0x100917(0x175)+_0x48f66a['slots'][_0x100917(0x167)](',\x20'))[_0x100917(0x164)]();},async 'execute'(_0x19d5e5){const _0x32d887=a42_0x5e2e1a,_0x4e0f7d=await prepare(_0x19d5e5),_0x5d91a2=await saveRuntimePagePermit(_0x4e0f7d['page']);return{'ok':!![],'data':runtimePermitWriteResult(_0x32d887(0x165),{'menuId':_0x4e0f7d['menuId'],'slots':_0x4e0f7d[_0x32d887(0x177)]},projectRuntimePagePermit(_0x4e0f7d['before']),projectRuntimePagePermit(_0x5d91a2),{'method':_0x32d887(0x179),'path':'/client/permit/page/save'})};}};