@lovrabet/lovrabet-cli 2.2.3-beta.2 → 2.2.4-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 (182) 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.d.ts +2 -0
  36. package/lib/commands/notification/config-list.js +1 -0
  37. package/lib/commands/notification/index.d.ts +2 -0
  38. package/lib/commands/notification/index.js +1 -0
  39. package/lib/commands/notification/shared.d.ts +13 -0
  40. package/lib/commands/notification/shared.js +1 -0
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.d.ts +2 -0
  43. package/lib/commands/permit/dataset-get.js +1 -0
  44. package/lib/commands/permit/dataset-set.d.ts +2 -0
  45. package/lib/commands/permit/dataset-set.js +1 -0
  46. package/lib/commands/permit/index.d.ts +2 -0
  47. package/lib/commands/permit/index.js +1 -0
  48. package/lib/commands/permit/page-get.d.ts +2 -0
  49. package/lib/commands/permit/page-get.js +1 -0
  50. package/lib/commands/permit/page-set.d.ts +2 -0
  51. package/lib/commands/permit/page-set.js +1 -0
  52. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  53. package/lib/commands/permit/role-menus-set.js +1 -0
  54. package/lib/commands/permit/role-menus.d.ts +2 -0
  55. package/lib/commands/permit/role-menus.js +1 -0
  56. package/lib/commands/permit/shared.d.ts +52 -0
  57. package/lib/commands/permit/shared.js +1 -0
  58. package/lib/commands/personal-bff/index.js +1 -1
  59. package/lib/commands/registry.js +1 -1
  60. package/lib/commands/role/create.d.ts +2 -0
  61. package/lib/commands/role/create.js +1 -0
  62. package/lib/commands/role/delete.d.ts +2 -0
  63. package/lib/commands/role/delete.js +1 -0
  64. package/lib/commands/role/detail.d.ts +2 -0
  65. package/lib/commands/role/detail.js +1 -0
  66. package/lib/commands/role/index.d.ts +2 -0
  67. package/lib/commands/role/index.js +1 -0
  68. package/lib/commands/role/list.d.ts +2 -0
  69. package/lib/commands/role/list.js +1 -0
  70. package/lib/commands/role/shared.d.ts +33 -0
  71. package/lib/commands/role/shared.js +1 -0
  72. package/lib/commands/role/update.d.ts +2 -0
  73. package/lib/commands/role/update.js +1 -0
  74. package/lib/commands/role/user-add.d.ts +2 -0
  75. package/lib/commands/role/user-add.js +1 -0
  76. package/lib/commands/role/user-remove.d.ts +2 -0
  77. package/lib/commands/role/user-remove.js +1 -0
  78. package/lib/commands/schedule/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.js +1 -1
  82. package/lib/commands/service/index.js +1 -1
  83. package/lib/commands/service/registry.js +1 -1
  84. package/lib/commands/skill/commands/create.js +1 -1
  85. package/lib/commands/skill/commands/diagram.js +1 -1
  86. package/lib/commands/skill/commands/install.js +1 -1
  87. package/lib/commands/skill/commands/list.js +1 -1
  88. package/lib/commands/skill/commands/push.js +1 -1
  89. package/lib/commands/skill/commands/validate.js +1 -1
  90. package/lib/commands/skill/diagram.js +1 -1
  91. package/lib/commands/skill/flags.js +1 -1
  92. package/lib/commands/skill/index.js +1 -1
  93. package/lib/commands/skill/manifest-helpers.js +1 -1
  94. package/lib/commands/skill/push-execute.js +1 -1
  95. package/lib/commands/skill/push-flow-helpers.js +1 -1
  96. package/lib/commands/skill/push-retarget.js +1 -1
  97. package/lib/commands/skill/scopes.js +1 -1
  98. package/lib/commands/skill/summary.js +1 -1
  99. package/lib/commands/skill/templates.js +1 -1
  100. package/lib/commands/skill/validate.js +1 -1
  101. package/lib/commands/sql/detail.js +1 -1
  102. package/lib/commands/sql/exec.js +1 -1
  103. package/lib/commands/sql/index.js +1 -1
  104. package/lib/commands/update.js +1 -1
  105. package/lib/commands/user-account/bind.js +1 -1
  106. package/lib/commands/user-account/index.js +1 -1
  107. package/lib/commands/workspace/index.js +1 -1
  108. package/lib/config/schema.js +1 -1
  109. package/lib/constant/app.js +1 -1
  110. package/lib/constant/auth-mode.js +1 -1
  111. package/lib/constant/cli.js +1 -1
  112. package/lib/constant/defaults.js +1 -1
  113. package/lib/constant/distribution.js +1 -1
  114. package/lib/constant/domain.js +1 -1
  115. package/lib/constant/env.js +1 -1
  116. package/lib/constant/output.js +1 -1
  117. package/lib/constant/product.js +1 -1
  118. package/lib/constant/risk.js +1 -1
  119. package/lib/constant/url.js +1 -1
  120. package/lib/context.js +1 -1
  121. package/lib/core/api-client.d.ts +161 -0
  122. package/lib/core/api-client.js +1 -1
  123. package/lib/core/db-resolver.js +1 -1
  124. package/lib/core/sdk-client.js +1 -1
  125. package/lib/errors.js +1 -1
  126. package/lib/framework/build-all-flags.js +1 -1
  127. package/lib/framework/dryrun.js +1 -1
  128. package/lib/framework/flags.js +1 -1
  129. package/lib/framework/help.js +1 -1
  130. package/lib/framework/index.js +1 -1
  131. package/lib/framework/output.js +1 -1
  132. package/lib/framework/preparse.js +1 -1
  133. package/lib/framework/rate-limit.js +1 -1
  134. package/lib/framework/raw-flags.js +1 -1
  135. package/lib/framework/response.js +1 -1
  136. package/lib/framework/runner-confirmation.js +1 -1
  137. package/lib/framework/runner-error.js +1 -1
  138. package/lib/framework/runner.js +1 -1
  139. package/lib/framework/schema-export.js +1 -1
  140. package/lib/framework/service-order.js +1 -1
  141. package/lib/framework/types.js +1 -1
  142. package/lib/generated/build-info.d.ts +4 -4
  143. package/lib/generated/build-info.js +1 -1
  144. package/lib/help.js +1 -1
  145. package/lib/postinstall.js +1 -1
  146. package/lib/runtime/confirmation.js +1 -1
  147. package/lib/runtime/event.js +1 -1
  148. package/lib/runtime/index.js +1 -1
  149. package/lib/runtime/queue.js +1 -1
  150. package/lib/runtime/resolve.js +1 -1
  151. package/lib/skills/builtin-skill.js +1 -1
  152. package/lib/skills/npx-skills-add.js +1 -1
  153. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  154. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  155. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  156. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  157. package/lib/skills/runtime-skill-sync/links.js +1 -1
  158. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  159. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  160. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  161. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  162. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  163. package/lib/skills/runtime-skill-sync/push.js +1 -1
  164. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  165. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  167. package/lib/skills/runtime-skill-sync.js +1 -1
  168. package/lib/skills/skill-presence.js +1 -1
  169. package/lib/utils/apply-jq-filter.js +1 -1
  170. package/lib/utils/logger.js +1 -1
  171. package/lib/utils/lossless-json.js +1 -1
  172. package/lib/utils/params.js +1 -1
  173. package/lib/utils/platform.js +1 -1
  174. package/lib/utils/update-notice.js +1 -1
  175. package/lib/utils/version.js +1 -1
  176. package/lib/utils/write-cli-side-channel.js +1 -1
  177. package/package.json +1 -1
  178. package/skills/lovrabet/SKILL.md +19 -6
  179. package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
  180. package/skills/lovrabet/references/lovrabet-auth.md +1 -5
  181. package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
  182. package/skills/lovrabet.manifest.json +5 -3
@@ -1 +1 @@
1
- function a28_0x4336(){const _0x3ceb87=['read','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','21oapSQD','7543737MMAsOj','121VvhSbb','18557SwZvLY','15579456UKoUgL','16ojPxcw','string','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','str','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','126964PKorFU','101834kcTuUh','appCode','694090eYGily','128xaObxh','1240278QxWMja','code','5bryyuW','sdk-doc'];a28_0x4336=function(){return _0x3ceb87;};return a28_0x4336();}function a28_0x1d3a(_0x29a9d6,_0x3bd99c){_0x29a9d6=_0x29a9d6-0x186;const _0x4336f5=a28_0x4336();let _0x1d3aa7=_0x4336f5[_0x29a9d6];return _0x1d3aa7;}const a28_0x4b53cc=a28_0x1d3a;(function(_0x1bf8a8,_0x2fb2ec){const _0x5a4644=a28_0x1d3a,_0x2c47f3=_0x1bf8a8();while(!![]){try{const _0x264530=-parseInt(_0x5a4644(0x193))/0x1*(parseInt(_0x5a4644(0x18d))/0x2)+parseInt(_0x5a4644(0x188))/0x3*(parseInt(_0x5a4644(0x192))/0x4)+-parseInt(_0x5a4644(0x199))/0x5*(-parseInt(_0x5a4644(0x197))/0x6)+parseInt(_0x5a4644(0x18b))/0x7*(parseInt(_0x5a4644(0x196))/0x8)+-parseInt(_0x5a4644(0x189))/0x9+-parseInt(_0x5a4644(0x195))/0xa*(-parseInt(_0x5a4644(0x18a))/0xb)+parseInt(_0x5a4644(0x18c))/0xc;if(_0x264530===_0x2fb2ec)break;else _0x2c47f3['push'](_0x2c47f3['shift']());}catch(_0x2d9424){_0x2c47f3['push'](_0x2c47f3['shift']());}}}(a28_0x4336,0xd6e6e));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x4b53cc(0x187);export function formatDatasetSdkMarkdown(_0xc5525c){const _0x2a473a=a28_0x4b53cc,_0x831231=typeof _0xc5525c===_0x2a473a(0x18e)?_0xc5525c['trim']():'';return _0x831231||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x4b53cc(0x19a),'description':a28_0x4b53cc(0x18f),'risk':a28_0x4b53cc(0x186),'flags':[{...CODE_FLAG,'description':a28_0x4b53cc(0x191)}],async 'execute'(_0x50f9b4){const _0x3183e3=a28_0x4b53cc,_0x822357=_0x50f9b4[_0x3183e3(0x190)](_0x3183e3(0x198)),_0x412fa0=await getDatasetSdkUsageDoc(_0x822357,_0x50f9b4[_0x3183e3(0x194)]);return{'ok':!![],'data':{'code':_0x822357,'appCode':_0x50f9b4[_0x3183e3(0x194)],'markdown':formatDatasetSdkMarkdown(_0x412fa0)}};}};
1
+ const a28_0x352012=a28_0x367e;(function(_0x9c5a2e,_0x432d42){const _0x3194e3=a28_0x367e,_0x54f300=_0x9c5a2e();while(!![]){try{const _0x11885d=parseInt(_0x3194e3(0x17e))/0x1*(parseInt(_0x3194e3(0x174))/0x2)+-parseInt(_0x3194e3(0x171))/0x3*(parseInt(_0x3194e3(0x17a))/0x4)+-parseInt(_0x3194e3(0x17c))/0x5*(-parseInt(_0x3194e3(0x17f))/0x6)+-parseInt(_0x3194e3(0x175))/0x7+-parseInt(_0x3194e3(0x178))/0x8+-parseInt(_0x3194e3(0x177))/0x9+parseInt(_0x3194e3(0x17b))/0xa;if(_0x11885d===_0x432d42)break;else _0x54f300['push'](_0x54f300['shift']());}catch(_0x23e394){_0x54f300['push'](_0x54f300['shift']());}}}(a28_0x50d9,0x92a92));function a28_0x367e(_0x23b9df,_0x55174f){_0x23b9df=_0x23b9df-0x16e;const _0x50d9c3=a28_0x50d9();let _0x367e5b=_0x50d9c3[_0x23b9df];return _0x367e5b;}function a28_0x50d9(){const _0x49fd8d=['1sgkQYZ','6WJIKHn','dataset','code','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','1098093ypelfI','read','str','1916178VxaNgt','1268722uYjCXI','trim','4010454eAofNp','9481152qfMwCf','appCode','4aOkvOF','6619300BdciWB','5793650YLHbXk','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档'];a28_0x50d9=function(){return _0x49fd8d;};return a28_0x50d9();}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x352012(0x17d);export function formatDatasetSdkMarkdown(_0x2675ab){const _0x22afbd=a28_0x352012,_0x5d176c=typeof _0x2675ab==='string'?_0x2675ab[_0x22afbd(0x176)]():'';return _0x5d176c||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x352012(0x16e),'command':'sdk-doc','description':a28_0x352012(0x170),'risk':a28_0x352012(0x172),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x12e2ce){const _0x220711=a28_0x352012,_0x16113e=_0x12e2ce[_0x220711(0x173)](_0x220711(0x16f)),_0x529c2d=await getDatasetSdkUsageDoc(_0x16113e,_0x12e2ce['appCode']);return{'ok':!![],'data':{'code':_0x16113e,'appCode':_0x12e2ce[_0x220711(0x179)],'markdown':formatDatasetSdkMarkdown(_0x529c2d)}};}};
@@ -1 +1 @@
1
- const a29_0x165c59=a29_0x1d9a;(function(_0x1c2f88,_0x1e9c6c){const _0x54a014=a29_0x1d9a,_0x12589a=_0x1c2f88();while(!![]){try{const _0x2289fd=parseInt(_0x54a014(0xf2))/0x1*(parseInt(_0x54a014(0xdd))/0x2)+parseInt(_0x54a014(0xe4))/0x3+-parseInt(_0x54a014(0x111))/0x4*(parseInt(_0x54a014(0x109))/0x5)+-parseInt(_0x54a014(0xd1))/0x6*(parseInt(_0x54a014(0xce))/0x7)+parseInt(_0x54a014(0x128))/0x8*(-parseInt(_0x54a014(0x126))/0x9)+-parseInt(_0x54a014(0xf4))/0xa*(-parseInt(_0x54a014(0xe3))/0xb)+-parseInt(_0x54a014(0x104))/0xc*(-parseInt(_0x54a014(0xe1))/0xd);if(_0x2289fd===_0x1e9c6c)break;else _0x12589a['push'](_0x12589a['shift']());}catch(_0x44e702){_0x12589a['push'](_0x12589a['shift']());}}}(a29_0x34de,0x1a0f4));import a29_0x84d7e2 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x1d9a(_0x2d7758,_0x3fe904){_0x2d7758=_0x2d7758-0xc6;const _0x34de55=a29_0x34de();let _0x1d9a31=_0x34de55[_0x2d7758];return _0x1d9a31;}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(_0x2a0d8c){const _0x35eaf7=a29_0x1d9a,_0x5d4b82=getCliVersion(),_0x2d6da0=buildConfigFromFlags({});await initGlobalEnvironment(_0x2d6da0),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](CLI_BIN_NAME+_0x35eaf7(0xfa))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)]('─'[_0x35eaf7(0xdc)](0x32))),console['log'](_0x35eaf7(0xd8)+_0x5d4b82),console[_0x35eaf7(0x114)](_0x35eaf7(0xf9)+process[_0x35eaf7(0xcf)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xf5)+process[_0x35eaf7(0x120)]+'\x20'+process[_0x35eaf7(0x101)]);const _0x452c54=inspectBuiltinSkill();console['log'](),console['log'](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xd6))),console[_0x35eaf7(0x114)](a29_0x84d7e2['gray'](_0x35eaf7(0x12d)['repeat'](0x1e))),console['log']('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x452c54[_0x35eaf7(0xe6)]===_0x35eaf7(0xea)?a29_0x84d7e2['green'](_0x35eaf7(0xfb)):a29_0x84d7e2[_0x35eaf7(0xfe)]('✗\x20'+_0x452c54[_0x35eaf7(0xe6)]))),console[_0x35eaf7(0x114)](_0x35eaf7(0x12c)+_0x452c54[_0x35eaf7(0x102)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x10d)+(_0x452c54['skillVersion']||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x112)))),console[_0x35eaf7(0x114)](_0x35eaf7(0xfd)+(_0x452c54[_0x35eaf7(0xd9)]||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12a))));_0x452c54[_0x35eaf7(0xe6)]!==_0x35eaf7(0xea)&&console[_0x35eaf7(0x114)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x452c54[_0x35eaf7(0xe0)]);_0x452c54[_0x35eaf7(0x117)]&&console[_0x35eaf7(0x114)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x452c54['reason']);console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xcb))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0x161bd1=getGlobalConfigPath(),_0x117f25=getProjectConfigPath();console[_0x35eaf7(0x114)](_0x35eaf7(0xf3)+(_0x161bd1||a29_0x84d7e2['gray'](_0x35eaf7(0x12a)))),console['log'](_0x35eaf7(0xff)+(_0x117f25||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12a)))),console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2['bold']('\x20\x20Config\x20JSON')),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0x1a415f=(_0x36f52a,_0x241be6)=>{const _0x548f37=_0x35eaf7;if(!_0x241be6){console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2['gray'](_0x548f37(0xda)));return;}const _0x511718=inspectCliConfigJsonFile(_0x241be6);if(_0x511718[_0x548f37(0x118)]==='ok')console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0x123)](_0x548f37(0xc8)));else{if(_0x511718[_0x548f37(0x118)]===_0x548f37(0xc6))console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0x125)](_0x548f37(0x10a)));else _0x511718[_0x548f37(0x118)]===_0x548f37(0xca)?console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xf8)](_0x548f37(0x112))):(console[_0x548f37(0x114)]('\x20\x20'+_0x36f52a[_0x548f37(0x10e)](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xfe)]('✗\x20Invalid\x20JSON')),console[_0x548f37(0x114)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x84d7e2[_0x548f37(0xfe)](_0x511718[_0x548f37(0x116)])));}};_0x1a415f(_0x35eaf7(0xe7),_0x161bd1),_0x1a415f(_0x35eaf7(0x10b),_0x117f25),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xec))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)]('\x20\x20─'['repeat'](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xdb)+(_0x2d6da0[_0x35eaf7(0xcd)]||a29_0x84d7e2[_0x35eaf7(0xfe)](_0x35eaf7(0xd4)))),console[_0x35eaf7(0x114)](_0x35eaf7(0x11a)+_0x2d6da0[_0x35eaf7(0x115)]);const _0x525f7f=isLegacyCompatConfigKey(_0x35eaf7(0x122))?a29_0x84d7e2[_0x35eaf7(0xf8)](_0x2d6da0['locale']+'\x20(legacy/compat\x20only)'):_0x2d6da0['locale'];console[_0x35eaf7(0x114)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x525f7f),console[_0x35eaf7(0x114)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2d6da0[_0x35eaf7(0x11b)]||a29_0x84d7e2['gray'](_0x35eaf7(0x11d)))),console['log'](_0x35eaf7(0xdf)+(_0x2d6da0['currentApp']||a29_0x84d7e2['gray'](_0x35eaf7(0x11d)))),console[_0x35eaf7(0x114)](_0x35eaf7(0x105)+(_0x2d6da0['format']||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0xcc)+DEFAULT_CONFIG_VALUES[_0x35eaf7(0xc7)]+')'))),console['log'](_0x35eaf7(0xf0)+(_0x2d6da0[_0x35eaf7(0xe5)]??a29_0x84d7e2[_0x35eaf7(0xf8)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x2d6da0[_0x35eaf7(0xed)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x124)+_0x2d6da0[_0x35eaf7(0x119)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xe8)+AUTH_MODE[_0x35eaf7(0x110)]),console['log'](_0x35eaf7(0x10c)+(_0x2d6da0[_0x35eaf7(0xd7)]?a29_0x84d7e2[_0x35eaf7(0x123)]('(set,\x20length='+_0x2d6da0[_0x35eaf7(0xd7)]['length']+')'):a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x11d)))),console['log'](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0xfc))),console['log'](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)['repeat'](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xd5)+getApiDomain()),console[_0x35eaf7(0x114)](_0x35eaf7(0x129)+getUserDomain()),console[_0x35eaf7(0x114)](_0x35eaf7(0x107)+getRuntimeDomain()),console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2['bold'](_0x35eaf7(0x127))),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x12d)[_0x35eaf7(0xdc)](0x1e)));const _0xf6715d=inspectServiceRegistry();console[_0x35eaf7(0x114)](_0x35eaf7(0xd0)+_0xf6715d[_0x35eaf7(0x100)]),console[_0x35eaf7(0x114)](_0x35eaf7(0x12b)+formatServiceRegistryStatus(_0xf6715d)),console[_0x35eaf7(0x114)](_0x35eaf7(0x106)+_0xf6715d[_0x35eaf7(0x108)]),console[_0x35eaf7(0x114)](_0x35eaf7(0xf6)+_0xf6715d[_0x35eaf7(0xeb)]);for(const _0x385d2c of _0xf6715d[_0x35eaf7(0xe9)]){console['log']('\x20\x20'+(_0x385d2c[_0x35eaf7(0xef)]+':')[_0x35eaf7(0x10e)](0x11)+'\x20'+(_0x385d2c[_0x35eaf7(0x103)]||a29_0x84d7e2[_0x35eaf7(0xf8)](_0x35eaf7(0x11e)))+'\x20('+_0x385d2c[_0x35eaf7(0xeb)]+_0x35eaf7(0x11f)),console[_0x35eaf7(0x114)]('\x20\x20'+''[_0x35eaf7(0x10e)](0x11)+_0x35eaf7(0xc9)+_0x385d2c[_0x35eaf7(0xf7)]['path']);}return console[_0x35eaf7(0x114)](),console[_0x35eaf7(0x114)](a29_0x84d7e2[_0x35eaf7(0x10f)](_0x35eaf7(0x11c))),console['log'](a29_0x84d7e2[_0x35eaf7(0xf8)]('\x20\x20─'[_0x35eaf7(0xdc)](0x1e))),console[_0x35eaf7(0x114)](_0x35eaf7(0xe2)+a29_0x84d7e2[_0x35eaf7(0x123)](AUTH_MODE[_0x35eaf7(0x110)]+_0x35eaf7(0xf1))),console[_0x35eaf7(0x114)](_0x35eaf7(0xee)+a29_0x84d7e2[_0x35eaf7(0xf8)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x35eaf7(0x114)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5403b5){const _0x1a1cb0=a29_0x1d9a;if(_0x5403b5[_0x1a1cb0(0x118)]==='ok')return a29_0x84d7e2[_0x1a1cb0(0x123)](_0x1a1cb0(0x121));if(_0x5403b5[_0x1a1cb0(0x118)]===_0x1a1cb0(0xca))return a29_0x84d7e2[_0x1a1cb0(0xf8)]('(not\x20found)');if(_0x5403b5[_0x1a1cb0(0x118)]===_0x1a1cb0(0xc6))return a29_0x84d7e2[_0x1a1cb0(0x125)](_0x1a1cb0(0xde));return a29_0x84d7e2[_0x1a1cb0(0xfe)]('✗\x20Invalid'+(_0x5403b5['message']?':\x20'+_0x5403b5[_0x1a1cb0(0x116)]:''));}export const doctorDefinition={'service':a29_0x165c59(0xd3),'command':a29_0x165c59(0x113),'description':a29_0x165c59(0xd2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a29_0x34de(){const _0x456bdc=['\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','source','gray','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','✓\x20current','\x20\x20API\x20Endpoints','\x20\x20Installed\x20Path:\x20\x20','red','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','registryPath','arch','packageVersion','name','1650084cUplvc','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','serviceCount','35eRhqYv','⚠\x20Empty\x20(treated\x20as\x20{})','Project','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','padEnd','bold','ClientAk','85760sBvZbR','(missing)','check','log','env','message','reason','status','verbose','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','\x20\x20Auth','(none)','(unnamed)','\x20commands)','platform','✓\x20Loaded','locale','green','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','9hjMjhe','\x20\x20Service\x20Tree','299480pLAprY','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','\x20\x20─','empty','format','✓\x20Valid\x20JSON','\x20Imported\x20from:\x20','missing','\x20\x20Config\x20Files','(default:\x20','appCode','28CQQfwX','version','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','304800xyJchU','Diagnose\x20CLI\x20configuration\x20and\x20environment','doctor','(not\x20set)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','accessKey','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','installedPath','(no\x20file)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','125042uqfVri','⚠\x20Empty','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','repairCommand','13gaQYiJ','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','8525XBUiRb','336606rFZZrM','pageSize','state','Global','\x20\x20auth\x20(effective):\x20','services','current','commandCount','\x20\x20Merged\x20Config','riskLevel','\x20\x20Session\x20check:\x20\x20\x20','serviceCode','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','1vfnXCo','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2390ycuCBC'];a29_0x34de=function(){return _0x456bdc;};return a29_0x34de();}
1
+ const a29_0x40e4fe=a29_0x1928;(function(_0x27e3fa,_0x3fcb8c){const _0x20d207=a29_0x1928,_0x580d04=_0x27e3fa();while(!![]){try{const _0x3a16e0=-parseInt(_0x20d207(0x135))/0x1*(-parseInt(_0x20d207(0x136))/0x2)+-parseInt(_0x20d207(0xfc))/0x3*(-parseInt(_0x20d207(0x108))/0x4)+-parseInt(_0x20d207(0xdc))/0x5+-parseInt(_0x20d207(0x129))/0x6*(parseInt(_0x20d207(0x100))/0x7)+-parseInt(_0x20d207(0xe2))/0x8+-parseInt(_0x20d207(0x103))/0x9*(-parseInt(_0x20d207(0x10b))/0xa)+-parseInt(_0x20d207(0xe8))/0xb*(-parseInt(_0x20d207(0xea))/0xc);if(_0x3a16e0===_0x3fcb8c)break;else _0x580d04['push'](_0x580d04['shift']());}catch(_0x3243ec){_0x580d04['push'](_0x580d04['shift']());}}}(a29_0x2db2,0xc4436));import a29_0x3c4d3e from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x2db2(){const _0x3d4ce6=['\x20\x20Session\x20check:\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','length','padEnd','Project','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','ClientAk','locale','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','name','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','current','commandCount','✓\x20Valid\x20JSON','platform','state','\x20doctor','arch','✓\x20Loaded','currentApp','env','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','pageSize','18fgzBLt','reason','bold','verbose','version','repeat','\x20\x20API\x20Endpoints','green','skillVersion','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','7UhcfiZ','441380KbtHOl','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','⚠\x20Empty','(default)','(not\x20set)','(none)','message','\x20\x20Package\x20Version:\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','6999220Zbukwe','\x20\x20Auth','path','\x20\x20Merged\x20Config','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','4890448VZMatw','(unnamed)','\x20\x20Config\x20JSON','\x20\x20auth\x20(effective):\x20','\x20(legacy/compat\x20only)','\x20\x20runtimeDomain:\x20\x20\x20','572vZloME','source','39252MHtHpG','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','accessKey','read','missing','\x20\x20Built-in\x20Skill','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✓\x20current','gray','status','repairCommand','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','red','doctor','format','(not\x20found)','865827TdUxKl','registryPath','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','2538669ajHxPj','log','defaultApp','18rezFjM','packageVersion','✗\x20Invalid\x20JSON','services','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','20ejgkzY','riskLevel','\x20\x20Installed\x20Path:\x20\x20','3725390fVjDPa','installedPath'];a29_0x2db2=function(){return _0x3d4ce6;};return a29_0x2db2();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x1928(_0x570efa,_0x5959fd){_0x570efa=_0x570efa-0xd2;const _0x2db23c=a29_0x2db2();let _0x192829=_0x2db23c[_0x570efa];return _0x192829;}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(_0xd48886){const _0x3e20ba=a29_0x1928,_0x1459f8=getCliVersion(),_0x319811=buildConfigFromFlags({});await initGlobalEnvironment(_0x319811),console[_0x3e20ba(0x101)](),console[_0x3e20ba(0x101)](a29_0x3c4d3e['bold'](CLI_BIN_NAME+_0x3e20ba(0x121))),console['log'](a29_0x3c4d3e[_0x3e20ba(0xf4)]('─'['repeat'](0x32))),console[_0x3e20ba(0x101)](_0x3e20ba(0x11b)+_0x1459f8),console[_0x3e20ba(0x101)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3e20ba(0x12d)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3e20ba(0x11f)]+'\x20'+process[_0x3e20ba(0x122)]);const _0x1e1a91=inspectBuiltinSkill();console['log'](),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0x12b)](_0x3e20ba(0xf0))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)['repeat'](0x1e))),console[_0x3e20ba(0x101)](_0x3e20ba(0xd9)+(_0x1e1a91[_0x3e20ba(0x120)]===_0x3e20ba(0x11c)?a29_0x3c4d3e[_0x3e20ba(0x130)](_0x3e20ba(0xf3)):a29_0x3c4d3e[_0x3e20ba(0xf8)]('✗\x20'+_0x1e1a91[_0x3e20ba(0x120)]))),console[_0x3e20ba(0x101)](_0x3e20ba(0xd8)+_0x1e1a91[_0x3e20ba(0x104)]),console[_0x3e20ba(0x101)](_0x3e20ba(0x113)+(_0x1e1a91[_0x3e20ba(0x131)]||a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xe1)))),console[_0x3e20ba(0x101)](_0x3e20ba(0x10a)+(_0x1e1a91[_0x3e20ba(0x10c)]||a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xfb))));_0x1e1a91[_0x3e20ba(0x120)]!==_0x3e20ba(0x11c)&&console[_0x3e20ba(0x101)](_0x3e20ba(0xfe)+_0x1e1a91[_0x3e20ba(0xf6)]);_0x1e1a91[_0x3e20ba(0x12a)]&&console['log'](_0x3e20ba(0x107)+_0x1e1a91[_0x3e20ba(0x12a)]);console['log'](),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0x12b)](_0x3e20ba(0x119))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)[_0x3e20ba(0x12e)](0x1e)));const _0x107768=getGlobalConfigPath(),_0x429fd4=getProjectConfigPath();console[_0x3e20ba(0x101)](_0x3e20ba(0xeb)+(_0x107768||a29_0x3c4d3e[_0x3e20ba(0xf4)]('(not\x20found)'))),console[_0x3e20ba(0x101)](_0x3e20ba(0x114)+(_0x429fd4||a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xfb)))),console[_0x3e20ba(0x101)](),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0x12b)](_0x3e20ba(0xe4))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)[_0x3e20ba(0x12e)](0x1e)));const _0x46cdc1=(_0x314ade,_0x41bb99)=>{const _0x16d391=_0x3e20ba;if(!_0x41bb99){console['log']('\x20\x20'+_0x314ade[_0x16d391(0x110)](0x11)+'\x20'+a29_0x3c4d3e[_0x16d391(0xf4)](_0x16d391(0x134)));return;}const _0xf1dc4=inspectCliConfigJsonFile(_0x41bb99);if(_0xf1dc4[_0x16d391(0xf5)]==='ok')console[_0x16d391(0x101)]('\x20\x20'+_0x314ade[_0x16d391(0x110)](0x11)+'\x20'+a29_0x3c4d3e[_0x16d391(0x130)](_0x16d391(0x11e)));else{if(_0xf1dc4[_0x16d391(0xf5)]==='empty')console[_0x16d391(0x101)]('\x20\x20'+_0x314ade['padEnd'](0x11)+'\x20'+a29_0x3c4d3e[_0x16d391(0x115)](_0x16d391(0xf1)));else _0xf1dc4[_0x16d391(0xf5)]===_0x16d391(0xef)?console['log']('\x20\x20'+_0x314ade['padEnd'](0x11)+'\x20'+a29_0x3c4d3e[_0x16d391(0xf4)](_0x16d391(0xe1))):(console[_0x16d391(0x101)]('\x20\x20'+_0x314ade[_0x16d391(0x110)](0x11)+'\x20'+a29_0x3c4d3e[_0x16d391(0xf8)](_0x16d391(0x105))),console[_0x16d391(0x101)]('\x20\x20'+''[_0x16d391(0x110)](0x11)+'\x20'+a29_0x3c4d3e['red'](_0xf1dc4[_0x16d391(0xd7)])));}};_0x46cdc1(_0x3e20ba(0xff),_0x107768),_0x46cdc1(_0x3e20ba(0x111),_0x429fd4),console[_0x3e20ba(0x101)](),console['log'](a29_0x3c4d3e['bold'](_0x3e20ba(0xdf))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)[_0x3e20ba(0x12e)](0x1e))),console[_0x3e20ba(0x101)](_0x3e20ba(0x118)+(_0x319811[_0x3e20ba(0x138)]||a29_0x3c4d3e[_0x3e20ba(0xf8)](_0x3e20ba(0xd5)))),console[_0x3e20ba(0x101)](_0x3e20ba(0xe0)+_0x319811[_0x3e20ba(0x125)]);const _0x1d028a=isLegacyCompatConfigKey(_0x3e20ba(0x117))?a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x319811[_0x3e20ba(0x117)]+_0x3e20ba(0xe6)):_0x319811[_0x3e20ba(0x117)];console[_0x3e20ba(0x101)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1d028a),console[_0x3e20ba(0x101)](_0x3e20ba(0x127)+(_0x319811[_0x3e20ba(0x102)]||a29_0x3c4d3e[_0x3e20ba(0xf4)]('(none)'))),console[_0x3e20ba(0x101)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x319811[_0x3e20ba(0x124)]||a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd6)))),console[_0x3e20ba(0x101)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x319811[_0x3e20ba(0xfa)]||a29_0x3c4d3e[_0x3e20ba(0xf4)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x3e20ba(0xfa)]+')'))),console[_0x3e20ba(0x101)](_0x3e20ba(0x132)+(_0x319811[_0x3e20ba(0x128)]??a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd4)))),console[_0x3e20ba(0x101)](_0x3e20ba(0xf2)+_0x319811[_0x3e20ba(0x109)]),console[_0x3e20ba(0x101)](_0x3e20ba(0x133)+_0x319811[_0x3e20ba(0x12c)]),console['log'](_0x3e20ba(0xe5)+AUTH_MODE['ClientAk']),console[_0x3e20ba(0x101)](_0x3e20ba(0x112)+(_0x319811[_0x3e20ba(0xed)]?a29_0x3c4d3e[_0x3e20ba(0x130)]('(set,\x20length='+_0x319811[_0x3e20ba(0xed)][_0x3e20ba(0x10f)]+')'):a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd6)))),console[_0x3e20ba(0x101)](),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0x12b)](_0x3e20ba(0x12f))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)]('\x20\x20─'[_0x3e20ba(0x12e)](0x1e))),console[_0x3e20ba(0x101)](_0x3e20ba(0xf7)+getApiDomain()),console[_0x3e20ba(0x101)](_0x3e20ba(0xda)+getUserDomain()),console[_0x3e20ba(0x101)](_0x3e20ba(0xe7)+getRuntimeDomain()),console[_0x3e20ba(0x101)](),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0x12b)]('\x20\x20Service\x20Tree')),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)[_0x3e20ba(0x12e)](0x1e)));const _0x313515=inspectServiceRegistry();console[_0x3e20ba(0x101)](_0x3e20ba(0x139)+_0x313515[_0x3e20ba(0xfd)]),console['log'](_0x3e20ba(0x126)+formatServiceRegistryStatus(_0x313515)),console[_0x3e20ba(0x101)](_0x3e20ba(0x137)+_0x313515['serviceCount']),console[_0x3e20ba(0x101)](_0x3e20ba(0xdb)+_0x313515[_0x3e20ba(0x11d)]);for(const _0x4d7f45 of _0x313515[_0x3e20ba(0x106)]){console['log']('\x20\x20'+(_0x4d7f45[_0x3e20ba(0xec)]+':')[_0x3e20ba(0x110)](0x11)+'\x20'+(_0x4d7f45[_0x3e20ba(0x11a)]||a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xe3)))+'\x20('+_0x4d7f45[_0x3e20ba(0x11d)]+'\x20commands)'),console[_0x3e20ba(0x101)]('\x20\x20'+''[_0x3e20ba(0x110)](0x11)+'\x20Imported\x20from:\x20'+_0x4d7f45[_0x3e20ba(0xe9)][_0x3e20ba(0xde)]);}return console[_0x3e20ba(0x101)](),console[_0x3e20ba(0x101)](a29_0x3c4d3e['bold'](_0x3e20ba(0xdd))),console[_0x3e20ba(0x101)](a29_0x3c4d3e[_0x3e20ba(0xf4)](_0x3e20ba(0xd2)[_0x3e20ba(0x12e)](0x1e))),console[_0x3e20ba(0x101)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x3c4d3e[_0x3e20ba(0x130)](AUTH_MODE[_0x3e20ba(0x116)]+'\x20(accessKey)')),console[_0x3e20ba(0x101)](_0x3e20ba(0x10d)+a29_0x3c4d3e[_0x3e20ba(0xf4)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x28a974){const _0x151a71=a29_0x1928;if(_0x28a974['status']==='ok')return a29_0x3c4d3e[_0x151a71(0x130)](_0x151a71(0x123));if(_0x28a974[_0x151a71(0xf5)]===_0x151a71(0xef))return a29_0x3c4d3e[_0x151a71(0xf4)](_0x151a71(0xfb));if(_0x28a974[_0x151a71(0xf5)]==='empty')return a29_0x3c4d3e['yellow'](_0x151a71(0xd3));return a29_0x3c4d3e[_0x151a71(0xf8)]('✗\x20Invalid'+(_0x28a974[_0x151a71(0xd7)]?':\x20'+_0x28a974[_0x151a71(0xd7)]:''));}export const doctorDefinition={'service':a29_0x40e4fe(0xf9),'command':'check','description':a29_0x40e4fe(0x10e),'risk':a29_0x40e4fe(0xee),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a30_0x2473(_0x5b4e14,_0x21e8a8){_0x5b4e14=_0x5b4e14-0x1a9;const _0x24b932=a30_0x24b9();let _0x2473ef=_0x24b932[_0x5b4e14];return _0x2473ef;}const a30_0x572d72=a30_0x2473;(function(_0x211e9f,_0x17e179){const _0x347566=a30_0x2473,_0x49dfbf=_0x211e9f();while(!![]){try{const _0x236fd3=-parseInt(_0x347566(0x1cd))/0x1*(-parseInt(_0x347566(0x1ca))/0x2)+parseInt(_0x347566(0x1c8))/0x3*(-parseInt(_0x347566(0x1ac))/0x4)+parseInt(_0x347566(0x1ae))/0x5+parseInt(_0x347566(0x1c1))/0x6+-parseInt(_0x347566(0x1ce))/0x7+-parseInt(_0x347566(0x1b1))/0x8+-parseInt(_0x347566(0x1b5))/0x9*(-parseInt(_0x347566(0x1b4))/0xa);if(_0x236fd3===_0x17e179)break;else _0x49dfbf['push'](_0x49dfbf['shift']());}catch(_0x6d8b8e){_0x49dfbf['push'](_0x49dfbf['shift']());}}}(a30_0x24b9,0x3c22e));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':a30_0x572d72(0x1aa),'type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a30_0x572d72(0x1b9),'type':a30_0x572d72(0x1a9),'required':!![],'description':a30_0x572d72(0x1be)},DOWNLOAD_FLAG={'name':a30_0x572d72(0x1b3),'type':'boolean','description':a30_0x572d72(0x1b8)},LONG_TERM_FLAG={'name':a30_0x572d72(0x1bc),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x1b6704){const _0xaca31=a30_0x572d72,_0x530202=_0x1b6704[_0xaca31(0x1c6)]();if(!_0x530202)throw CliErrors[_0xaca31(0x1c7)](_0xaca31(0x1c5));return _0x530202;}function a30_0x24b9(){const _0x4b5c55=['385794sqQPmz','Uploaded\x20file:\x20','bool','2SvKXUe','2068787YnMcqE','string','file','read','1952cFqXTr','build','759920kqWjhe','Preview:\x20upload\x20','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','3825640eQzYnL','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','download','2295190VTDMJI','18VVHGxH','File','path','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','filepath','\x20to\x20runtime\x20app\x20','filePath','long-term','appCode','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','str','/client/uploadFile','1190640ZjDdYG','description','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','query-url','filePath\x20is\x20required.','trim','validation','1077WQJtYb','POST'];a30_0x24b9=function(){return _0x4b5c55;};return a30_0x24b9();}const fileUpload={'service':'file','command':'upload','description':a30_0x572d72(0x1b2),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x1650ed){const _0x3a17d4=a30_0x572d72,_0x14205b=requireRuntimeUploadFile(_0x1650ed[_0x3a17d4(0x1bf)](_0x3a17d4(0x1aa)),'File');return dryRun(_0x3a17d4(0x1c9),_0x3a17d4(0x1c0))['body']({'appCode':_0x1650ed[_0x3a17d4(0x1bd)],'multipart':{'file':_0x14205b}})[_0x3a17d4(0x1c2)](_0x3a17d4(0x1af)+_0x14205b[_0x3a17d4(0x1b7)]+_0x3a17d4(0x1ba)+_0x1650ed[_0x3a17d4(0x1bd)])[_0x3a17d4(0x1ad)]();},async 'execute'(_0x46fa90){const _0x5bd865=a30_0x572d72,_0x362604=requireRuntimeUploadFile(_0x46fa90[_0x5bd865(0x1bf)]('file'),_0x5bd865(0x1b6)),_0x1839b3=await uploadRuntimeFile(_0x46fa90[_0x5bd865(0x1bd)],_0x362604[_0x5bd865(0x1b7)]);return{'ok':!![],'data':_0x1839b3,'message':_0x1839b3[_0x5bd865(0x1bb)]?_0x5bd865(0x1cb)+_0x1839b3[_0x5bd865(0x1bb)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x5bd865(0x1c3)};}},fileQueryUrl={'service':'file','command':a30_0x572d72(0x1c4),'description':a30_0x572d72(0x1b0),'risk':a30_0x572d72(0x1ab),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x17847f){const _0x5226d4=a30_0x572d72,_0x50f129=requireFilePath(_0x17847f[_0x5226d4(0x1bf)](_0x5226d4(0x1b9))),_0x1476f7=await queryRuntimeFileUrl(_0x50f129,{'download':_0x17847f[_0x5226d4(0x1cc)](_0x5226d4(0x1b3)),'longTerm':_0x17847f[_0x5226d4(0x1cc)](_0x5226d4(0x1bc))});return{'ok':!![],'data':_0x1476f7};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x4d113a=a30_0x5218;(function(_0x14c03e,_0x1a2f7d){const _0x19103f=a30_0x5218,_0x361526=_0x14c03e();while(!![]){try{const _0x5b8b68=parseInt(_0x19103f(0xfe))/0x1*(parseInt(_0x19103f(0x119))/0x2)+-parseInt(_0x19103f(0x118))/0x3*(parseInt(_0x19103f(0xf9))/0x4)+-parseInt(_0x19103f(0x106))/0x5*(-parseInt(_0x19103f(0xfa))/0x6)+-parseInt(_0x19103f(0x108))/0x7+parseInt(_0x19103f(0x113))/0x8+-parseInt(_0x19103f(0x116))/0x9*(-parseInt(_0x19103f(0x104))/0xa)+parseInt(_0x19103f(0x10e))/0xb*(-parseInt(_0x19103f(0x107))/0xc);if(_0x5b8b68===_0x1a2f7d)break;else _0x361526['push'](_0x361526['shift']());}catch(_0x5d03f5){_0x361526['push'](_0x361526['shift']());}}}(a30_0x39dc,0x27bf8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a30_0x5218(_0x568133,_0x143fc8){_0x568133=_0x568133-0xf6;const _0x39dceb=a30_0x39dc();let _0x521883=_0x39dceb[_0x568133];return _0x521883;}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x4d113a(0x10c),'type':a30_0x4d113a(0x114),'required':!![],'description':a30_0x4d113a(0x103)},FILEPATH_FLAG={'name':'filepath','type':'string','required':!![],'description':a30_0x4d113a(0x117)},DOWNLOAD_FLAG={'name':a30_0x4d113a(0x111),'type':'boolean','description':a30_0x4d113a(0x10f)},LONG_TERM_FLAG={'name':a30_0x4d113a(0x105),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x39dc(){const _0x15535a=['909054ftIqWi','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','71103EZHoeV','2xsgDIJ','query-url','read','path','bool','4bXQrfK','6UacFrQ','filePath','description','File','22106NmSEnB','appCode','trim','upload','/client/uploadFile','Path\x20to\x20the\x20local\x20file\x20to\x20upload','20LbbEDp','long-term','1527695CtTzKV','36htXCUE','2006109soRpQg','str','build','validation','file','filePath\x20is\x20required.','220198fJJfOw','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','download','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','27944krZoUp','string','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'];a30_0x39dc=function(){return _0x15535a;};return a30_0x39dc();}function requireFilePath(_0xdbc876){const _0x2093cf=a30_0x4d113a,_0x221cbe=_0xdbc876[_0x2093cf(0x100)]();if(!_0x221cbe)throw CliErrors[_0x2093cf(0x10b)](_0x2093cf(0x10d));return _0x221cbe;}const fileUpload={'service':a30_0x4d113a(0x10c),'command':a30_0x4d113a(0x101),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x4d113a(0xf6),'flags':[FILE_FLAG],async 'dryRun'(_0x471d43){const _0x4d5541=a30_0x4d113a,_0x3f50a0=requireRuntimeUploadFile(_0x471d43['str'](_0x4d5541(0x10c)),_0x4d5541(0xfd));return dryRun('POST',_0x4d5541(0x102))['body']({'appCode':_0x471d43['appCode'],'multipart':{'file':_0x3f50a0}})[_0x4d5541(0xfc)]('Preview:\x20upload\x20'+_0x3f50a0[_0x4d5541(0xf7)]+'\x20to\x20runtime\x20app\x20'+_0x471d43[_0x4d5541(0xff)])[_0x4d5541(0x10a)]();},async 'execute'(_0x51644b){const _0x298052=a30_0x4d113a,_0x5e1cf0=requireRuntimeUploadFile(_0x51644b[_0x298052(0x109)](_0x298052(0x10c)),_0x298052(0xfd)),_0x4491fd=await uploadRuntimeFile(_0x51644b[_0x298052(0xff)],_0x5e1cf0[_0x298052(0xf7)]);return{'ok':!![],'data':_0x4491fd,'message':_0x4491fd['filePath']?'Uploaded\x20file:\x20'+_0x4491fd[_0x298052(0xfb)]+_0x298052(0x115):_0x298052(0x112)};}},fileQueryUrl={'service':a30_0x4d113a(0x10c),'command':a30_0x4d113a(0x11a),'description':a30_0x4d113a(0x110),'risk':a30_0x4d113a(0xf6),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4b08bf){const _0x171362=a30_0x4d113a,_0x991a41=requireFilePath(_0x4b08bf[_0x171362(0x109)]('filepath')),_0x230be0=await queryRuntimeFileUrl(_0x991a41,{'download':_0x4b08bf[_0x171362(0xf8)](_0x171362(0x111)),'longTerm':_0x4b08bf[_0x171362(0xf8)](_0x171362(0x105))});return{'ok':!![],'data':_0x230be0};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x22aff8=a31_0x2727;(function(_0x102919,_0x4320b8){const _0x9440f9=a31_0x2727,_0x542502=_0x102919();while(!![]){try{const _0x4bb653=parseInt(_0x9440f9(0x134))/0x1+parseInt(_0x9440f9(0x12c))/0x2*(-parseInt(_0x9440f9(0x13f))/0x3)+-parseInt(_0x9440f9(0x147))/0x4*(parseInt(_0x9440f9(0x143))/0x5)+-parseInt(_0x9440f9(0x140))/0x6+-parseInt(_0x9440f9(0x13c))/0x7+parseInt(_0x9440f9(0x127))/0x8+-parseInt(_0x9440f9(0x122))/0x9*(-parseInt(_0x9440f9(0x124))/0xa);if(_0x4bb653===_0x4320b8)break;else _0x542502['push'](_0x542502['shift']());}catch(_0x1d086f){_0x542502['push'](_0x542502['shift']());}}}(a31_0x3c00,0xc7608));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';function a31_0x2727(_0x913079,_0x152dac){_0x913079=_0x913079-0x120;const _0x3c0011=a31_0x3c00();let _0x2727aa=_0x3c0011[_0x913079];return _0x2727aa;}import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a31_0x22aff8(0x12e),'required':!![]},{'name':'appcode','type':a31_0x22aff8(0x145),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':a31_0x22aff8(0x145),'description':a31_0x22aff8(0x148),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x22aff8(0x129),'description':a31_0x22aff8(0x123)+PRODUCT_CONFIG[a31_0x22aff8(0x138)]+a31_0x22aff8(0x144),'default':![]},{'name':a31_0x22aff8(0x136),'type':a31_0x22aff8(0x129),'description':a31_0x22aff8(0x130),'default':![]}];export async function runAppImport(_0x1c9d4c){const _0x156033=a31_0x22aff8,_0x2ba212=_0x1c9d4c['global']?_0x156033(0x125):_0x156033(0x135),_0x285b5f=resolveWriteConfigPath(_0x2ba212);await runFromImport(_0x1c9d4c,_0x285b5f);}function a31_0x3c00(){const _0x23c0a9=['global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','9922368MIcMCY','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`.','boolean','validation','Failed\x20to\x20parse\x20source\x20file:\x20','349260wFEdoj','log','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','app','Skip\x20confirmation\x20when\x20overwriting','message','includes','apps','666880vlnnrK','project','yes','utf8','newConfigFileName','cwd','entries','riskLevel','4923898asmAla','appcode','file','3ApBVpu','1529886FPxvJu','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','env','5UoiALb',')\x20instead\x20of\x20project','string','parse','3337468gToCWk','Override\x20imported\x20default\x20env','Invalid\x20env\x20\x22','Source\x20file\x20not\x20found:\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Imported\x20from\x20','36iorWVC','Write\x20to\x20global\x20(~/','2192160AOoSsf'];a31_0x3c00=function(){return _0x23c0a9;};return a31_0x3c00();}async function runFromImport(_0x2ff606,_0x489408){const _0x41b6a3=a31_0x22aff8,_0x3d0f99=resolveFilePath(_0x2ff606[_0x41b6a3(0x13e)]);if(!existsSync(_0x3d0f99))throw CliErrors['validation'](_0x41b6a3(0x14a)+_0x3d0f99);const _0x3fb004=readSourceFile(_0x3d0f99),_0xf2b8d=convertToRuntimeConfig(_0x3fb004);_0x2ff606[_0x41b6a3(0x13d)]&&(_0xf2b8d[_0x41b6a3(0x13d)]=String(_0x2ff606[_0x41b6a3(0x13d)]));_0x2ff606[_0x41b6a3(0x142)]&&(_0xf2b8d[_0x41b6a3(0x142)]=resolveImportEnv(_0x2ff606));if(!_0xf2b8d['appcode'])throw CliErrors[_0x41b6a3(0x12a)](_0x41b6a3(0x126),_0x41b6a3(0x128));await writeImportConfig(_0x489408,_0xf2b8d,_0x2ff606),console[_0x41b6a3(0x12d)](_0x41b6a3(0x121)+_0x3d0f99),console['log']('\x20\x20config:\x20\x20'+_0x489408),console['log']('\x20\x20appcode:\x20'+_0xf2b8d[_0x41b6a3(0x13d)]);if(_0xf2b8d['defaultApp'])console[_0x41b6a3(0x12d)]('\x20\x20default:\x20'+_0xf2b8d['defaultApp']);}function convertToRuntimeConfig(_0x401f96){const _0xd41b09=a31_0x22aff8;if(_0x401f96[_0xd41b09(0x133)]&&typeof _0x401f96[_0xd41b09(0x133)]==='object')throw CliErrors['validation'](_0xd41b09(0x120),_0xd41b09(0x141));const _0x220e25={};for(const _0x53d643 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x401f96[_0x53d643]!==undefined&&(_0x220e25[_0x53d643]=_0x401f96[_0x53d643]);}return!_0x220e25[_0xd41b09(0x13b)]&&(_0x220e25[_0xd41b09(0x13b)]=DEFAULT_CONFIG_VALUES[_0xd41b09(0x13b)]),_0x220e25;}async function writeImportConfig(_0x30c84d,_0x26d64e,_0x2562d3){const _0x3f9527=a31_0x22aff8;let _0x8c9eb7={};existsSync(_0x30c84d)&&!_0x2562d3[_0x3f9527(0x136)]&&(_0x8c9eb7=readConfigFile(_0x30c84d));for(const [_0x5c617d,_0x214a4d]of Object[_0x3f9527(0x13a)](_0x26d64e)){_0x214a4d!==undefined&&(_0x8c9eb7[_0x5c617d]=_0x214a4d);}if(_0x8c9eb7['app'])delete _0x8c9eb7[_0x3f9527(0x12f)];writeConfigFile(_0x30c84d,_0x8c9eb7);}function resolveFilePath(_0x1dd5c3){const _0x44709b=a31_0x22aff8;return isAbsolute(_0x1dd5c3)?_0x1dd5c3:resolve(process[_0x44709b(0x139)](),_0x1dd5c3);}function readSourceFile(_0x27b061){const _0x128bf4=a31_0x22aff8;try{const _0x2f0d80=readFileSync(_0x27b061,{'encoding':_0x128bf4(0x137)});return JSON[_0x128bf4(0x146)](_0x2f0d80);}catch(_0x4fd2ff){throw CliErrors[_0x128bf4(0x12a)](_0x128bf4(0x12b)+_0x4fd2ff[_0x128bf4(0x131)]);}}function resolveImportEnv(_0x177614){const _0x2f4fb7=a31_0x22aff8,_0x335c2d=_0x177614[_0x2f4fb7(0x142)];if(_0x335c2d===undefined||_0x335c2d==='')return DEFAULT_CONFIG_VALUES[_0x2f4fb7(0x142)];if(!RUNTIME_ENV_VALUES[_0x2f4fb7(0x132)](_0x335c2d))throw CliErrors[_0x2f4fb7(0x12a)](_0x2f4fb7(0x149)+_0x335c2d+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x335c2d;}
1
+ const a31_0x119f1e=a31_0xa0da;(function(_0x377677,_0x44dd66){const _0x4c4651=a31_0xa0da,_0x4194da=_0x377677();while(!![]){try{const _0x396c7b=parseInt(_0x4c4651(0x1ba))/0x1+parseInt(_0x4c4651(0x1c2))/0x2+-parseInt(_0x4c4651(0x1b4))/0x3+parseInt(_0x4c4651(0x1b7))/0x4*(parseInt(_0x4c4651(0x1a5))/0x5)+parseInt(_0x4c4651(0x1c7))/0x6*(parseInt(_0x4c4651(0x1b2))/0x7)+parseInt(_0x4c4651(0x1b8))/0x8+-parseInt(_0x4c4651(0x1bd))/0x9;if(_0x396c7b===_0x44dd66)break;else _0x4194da['push'](_0x4194da['shift']());}catch(_0x3c78c8){_0x4194da['push'](_0x4194da['shift']());}}}(a31_0x3330,0x6c7cb));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';function a31_0x3330(){const _0x3aea1c=['9571554YMxmLo','Override\x20imported\x20default\x20appcode','appcode','join','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','577038icXKWA',')\x20instead\x20of\x20project','newConfigFileName','riskLevel','\x20\x20config:\x20\x20','24CbHYjC','Invalid\x20env\x20\x22','Source\x20file\x20not\x20found:\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','app','boolean','entries','validation','561185wOLhfg','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`.','cwd','string','file','defaultApp','parse','yes','utf8','Write\x20to\x20global\x20(~/','global','\x22.\x20Allowed:\x20','\x20\x20default:\x20','565523ljjbFl','apps','2125341emWVrc','log','Imported\x20from\x20','24futykf','1570112mSKEgC','Skip\x20confirmation\x20when\x20overwriting','734955KDGSgA','Override\x20imported\x20default\x20env','object'];a31_0x3330=function(){return _0x3aea1c;};return a31_0x3330();}import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';function a31_0xa0da(_0x5d1963,_0x2e976e){_0x5d1963=_0x5d1963-0x19d;const _0x3330bf=a31_0x3330();let _0xa0da57=_0x3330bf[_0x5d1963];return _0xa0da57;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':a31_0x119f1e(0x1a8),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x119f1e(0x1bf),'type':a31_0x119f1e(0x1a8),'description':a31_0x119f1e(0x1be)},{'name':'env','type':'string','description':a31_0x119f1e(0x1bb),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x119f1e(0x1af),'type':a31_0x119f1e(0x1a2),'description':a31_0x119f1e(0x1ae)+PRODUCT_CONFIG[a31_0x119f1e(0x1c4)]+a31_0x119f1e(0x1c3),'default':![]},{'name':a31_0x119f1e(0x1ac),'type':a31_0x119f1e(0x1a2),'description':a31_0x119f1e(0x1b9),'default':![]}];export async function runAppImport(_0x59fa66){const _0x3b4d28=a31_0x119f1e,_0x485544=_0x59fa66[_0x3b4d28(0x1af)]?_0x3b4d28(0x1af):'project',_0x54f0db=resolveWriteConfigPath(_0x485544);await runFromImport(_0x59fa66,_0x54f0db);}async function runFromImport(_0x21d84c,_0x3a19ce){const _0x52b73d=a31_0x119f1e,_0x164268=resolveFilePath(_0x21d84c[_0x52b73d(0x1a9)]);if(!existsSync(_0x164268))throw CliErrors[_0x52b73d(0x1a4)](_0x52b73d(0x19e)+_0x164268);const _0x33d634=readSourceFile(_0x164268),_0x32afb4=convertToRuntimeConfig(_0x33d634);_0x21d84c['appcode']&&(_0x32afb4[_0x52b73d(0x1bf)]=String(_0x21d84c[_0x52b73d(0x1bf)]));_0x21d84c[_0x52b73d(0x1a0)]&&(_0x32afb4[_0x52b73d(0x1a0)]=resolveImportEnv(_0x21d84c));if(!_0x32afb4['appcode'])throw CliErrors[_0x52b73d(0x1a4)](_0x52b73d(0x1c1),_0x52b73d(0x1a6));await writeImportConfig(_0x3a19ce,_0x32afb4,_0x21d84c),console[_0x52b73d(0x1b5)](_0x52b73d(0x1b6)+_0x164268),console[_0x52b73d(0x1b5)](_0x52b73d(0x1c6)+_0x3a19ce),console['log']('\x20\x20appcode:\x20'+_0x32afb4['appcode']);if(_0x32afb4[_0x52b73d(0x1aa)])console[_0x52b73d(0x1b5)](_0x52b73d(0x1b1)+_0x32afb4['defaultApp']);}function convertToRuntimeConfig(_0x33ba36){const _0xcc5708=a31_0x119f1e;if(_0x33ba36[_0xcc5708(0x1b3)]&&typeof _0x33ba36[_0xcc5708(0x1b3)]===_0xcc5708(0x1bc))throw CliErrors['validation'](_0xcc5708(0x19f),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x588ffb={};for(const _0x1ed02a of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x33ba36[_0x1ed02a]!==undefined&&(_0x588ffb[_0x1ed02a]=_0x33ba36[_0x1ed02a]);}return!_0x588ffb[_0xcc5708(0x1c5)]&&(_0x588ffb['riskLevel']=DEFAULT_CONFIG_VALUES[_0xcc5708(0x1c5)]),_0x588ffb;}async function writeImportConfig(_0x1bc49e,_0x18683d,_0x25b7d5){const _0x5b2618=a31_0x119f1e;let _0x34c198={};existsSync(_0x1bc49e)&&!_0x25b7d5[_0x5b2618(0x1ac)]&&(_0x34c198=readConfigFile(_0x1bc49e));for(const [_0x3b0c2c,_0x167087]of Object[_0x5b2618(0x1a3)](_0x18683d)){_0x167087!==undefined&&(_0x34c198[_0x3b0c2c]=_0x167087);}if(_0x34c198[_0x5b2618(0x1a1)])delete _0x34c198[_0x5b2618(0x1a1)];writeConfigFile(_0x1bc49e,_0x34c198);}function resolveFilePath(_0x1b4046){const _0x4e9f97=a31_0x119f1e;return isAbsolute(_0x1b4046)?_0x1b4046:resolve(process[_0x4e9f97(0x1a7)](),_0x1b4046);}function readSourceFile(_0x1ec7a5){const _0x19d5ee=a31_0x119f1e;try{const _0x2a6170=readFileSync(_0x1ec7a5,{'encoding':_0x19d5ee(0x1ad)});return JSON[_0x19d5ee(0x1ab)](_0x2a6170);}catch(_0x2de699){throw CliErrors['validation']('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x2de699['message']);}}function resolveImportEnv(_0x233367){const _0x8d3ad8=a31_0x119f1e,_0x2cfea2=_0x233367[_0x8d3ad8(0x1a0)];if(_0x2cfea2===undefined||_0x2cfea2==='')return DEFAULT_CONFIG_VALUES[_0x8d3ad8(0x1a0)];if(!RUNTIME_ENV_VALUES['includes'](_0x2cfea2))throw CliErrors[_0x8d3ad8(0x1a4)](_0x8d3ad8(0x19d)+_0x2cfea2+_0x8d3ad8(0x1b0)+RUNTIME_ENV_VALUES[_0x8d3ad8(0x1c0)](',\x20'));return _0x2cfea2;}
@@ -1 +1 @@
1
- const a32_0x1ab630=a32_0x153c;(function(_0x354491,_0x59b61f){const _0x5cf9dd=a32_0x153c,_0x5b7066=_0x354491();while(!![]){try{const _0x21f448=-parseInt(_0x5cf9dd(0x177))/0x1+-parseInt(_0x5cf9dd(0x165))/0x2*(-parseInt(_0x5cf9dd(0x171))/0x3)+parseInt(_0x5cf9dd(0x169))/0x4*(-parseInt(_0x5cf9dd(0x17d))/0x5)+parseInt(_0x5cf9dd(0x185))/0x6*(-parseInt(_0x5cf9dd(0x166))/0x7)+-parseInt(_0x5cf9dd(0x173))/0x8+parseInt(_0x5cf9dd(0x155))/0x9*(parseInt(_0x5cf9dd(0x16a))/0xa)+parseInt(_0x5cf9dd(0x178))/0xb;if(_0x21f448===_0x59b61f)break;else _0x5b7066['push'](_0x5b7066['shift']());}catch(_0x4ecfd0){_0x5b7066['push'](_0x5b7066['shift']());}}}(a32_0x32ed,0xa34aa));function a32_0x32ed(){const _0x3ce4ef=['isFinite','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','description','39TyYCnC','ragErrorMessage','6464720buXCUh','metadata','verbose','build','893478ETawKj','42087166zTnlfl','utf8','num','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','POST','5yVGUCO','create','/client/knowledge-base/personal/','scope','str','Personal\x20knowledge-base\x20entry\x20title','flag','Personal\x20knowledge-base\x20entry\x20ID','90ZQrzwX','body','--topk\x20must\x20be\x20a\x20positive\x20number.','write','list','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','Created\x20KB\x20entry\x20','query','file','update','File\x20is\x20not\x20a\x20regular\x20file:\x20','topk','appCode','createTime','updateTime','content','read','search','File\x20path\x20is\x20required.','ragStatus','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','390627tyJyMS','bool','trim','version','score','validation','weightedScore','map','userId','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','docId','number','string','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','isFile','Updated\x20KB\x20entry\x20','79242izHFvi','351589JgdPUt','detail','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','5043068vFIGSL','10zwxjSF','Override\x20the\x20existing\x20entry\x20title','/update','title'];a32_0x32ed=function(){return _0x3ce4ef;};return a32_0x32ed();}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_0x1ab630(0x16d),'type':a32_0x1ab630(0x161),'required':!![],'description':a32_0x1ab630(0x182)},FILE_FLAG={'name':a32_0x1ab630(0x18d),'type':a32_0x1ab630(0x161),'required':!![],'description':a32_0x1ab630(0x18a)},QUERY_FLAG={'name':a32_0x1ab630(0x18c),'type':a32_0x1ab630(0x161),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x1ab630(0x14b),'type':a32_0x1ab630(0x160),'description':a32_0x1ab630(0x17b)};function readKnowledgeFile(_0x14a104){const _0x4a1581=a32_0x1ab630;if(!_0x14a104)throw CliErrors[_0x4a1581(0x15a)](_0x4a1581(0x152));if(!existsSync(_0x14a104))throw CliErrors[_0x4a1581(0x15a)]('File\x20not\x20found:\x20'+_0x14a104);if(!statSync(_0x14a104)[_0x4a1581(0x163)]())throw CliErrors[_0x4a1581(0x15a)](_0x4a1581(0x18f)+_0x14a104);return readFileSync(_0x14a104,_0x4a1581(0x179));}function summarizePersonalItem(_0xd1fe02){const _0x328c19=a32_0x1ab630;return{'id':_0xd1fe02['id'],'title':_0xd1fe02['title'],'version':_0xd1fe02['version'],'ragStatus':_0xd1fe02[_0x328c19(0x153)],'ragErrorMessage':_0xd1fe02['ragErrorMessage'],'updateTime':_0xd1fe02['updateTime']};}function detailPersonalItem(_0x2a9386){const _0x475fec=a32_0x1ab630;return{'id':_0x2a9386['id'],'appCode':_0x2a9386['appCode'],'scope':_0x2a9386[_0x475fec(0x180)],'userId':_0x2a9386[_0x475fec(0x15d)],'title':_0x2a9386[_0x475fec(0x16d)],'content':_0x2a9386['content']??'','version':_0x2a9386[_0x475fec(0x158)],'ragStatus':_0x2a9386[_0x475fec(0x153)],'ragErrorMessage':_0x2a9386[_0x475fec(0x172)],'createTime':_0x2a9386[_0x475fec(0x14d)],'updateTime':_0x2a9386[_0x475fec(0x14e)]};}function summarizeSearchHit(_0x504ec7){const _0x4981df=a32_0x1ab630;return{'scope':_0x504ec7['scope'],'title':_0x504ec7[_0x4981df(0x16d)],'docId':_0x504ec7[_0x4981df(0x15f)],'score':_0x504ec7[_0x4981df(0x159)],'weightedScore':_0x504ec7[_0x4981df(0x15b)],'content':_0x504ec7[_0x4981df(0x14f)],'metadata':_0x504ec7[_0x4981df(0x174)]};}function readTopK(_0x1e8c5e){const _0x9cd33c=a32_0x1ab630,_0x892e9=_0x1e8c5e[_0x9cd33c(0x183)]('topk');if(_0x892e9===undefined||_0x892e9===null||_0x892e9==='')return undefined;const _0x8f513e=_0x1e8c5e[_0x9cd33c(0x17a)](_0x9cd33c(0x14b));if(!Number[_0x9cd33c(0x16e)](_0x8f513e)||_0x8f513e<0x1)throw CliErrors[_0x9cd33c(0x15a)](_0x9cd33c(0x187));return _0x8f513e;}function a32_0x153c(_0x13c557,_0x4bc37e){_0x13c557=_0x13c557-0x14b;const _0x32ed94=a32_0x32ed();let _0x153cf6=_0x32ed94[_0x13c557];return _0x153cf6;}const kbList={'service':'kb','command':a32_0x1ab630(0x189),'description':a32_0x1ab630(0x162),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x4c9ed1){const _0x4f8070=a32_0x1ab630,_0x3e3903=await listPersonalKnowledgeBaseItems(_0x4c9ed1[_0x4f8070(0x14c)]);if(_0x4c9ed1[_0x4f8070(0x156)](_0x4f8070(0x175)))return{'ok':!![],'data':{'total':_0x3e3903['length'],'items':_0x3e3903}};return{'ok':!![],'data':{'total':_0x3e3903['length'],'items':_0x3e3903[_0x4f8070(0x15c)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x1ab630(0x167),'description':a32_0x1ab630(0x154),'risk':a32_0x1ab630(0x150),'flags':[{...ID_FLAG,'description':a32_0x1ab630(0x184)}],async 'execute'(_0x57840c){const _0x3e2968=await getPersonalKnowledgeBaseItem(_0x57840c['num']('id'),_0x57840c['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x3e2968)};}},kbCreate={'service':'kb','command':a32_0x1ab630(0x17e),'description':'根据本地文件创建个人知识库条目','risk':'write','confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4df7b4){const _0x247805=a32_0x1ab630,_0x4019d6=_0x4df7b4[_0x247805(0x181)](_0x247805(0x16d)),_0x27adbc=readKnowledgeFile(_0x4df7b4[_0x247805(0x181)](_0x247805(0x18d))),_0x251a12=await createPersonalKnowledgeBaseItem(_0x4df7b4[_0x247805(0x14c)],{'title':_0x4019d6,'content':_0x27adbc});return{'ok':!![],'data':summarizePersonalItem(_0x251a12),'message':_0x247805(0x18b)+_0x251a12['id']+'\x20('+_0x251a12['title']+')'};},async 'dryRun'(_0x513913){const _0x19906d=a32_0x1ab630,_0x349d28=_0x513913['str'](_0x19906d(0x16d)),_0x484b9a=readKnowledgeFile(_0x513913['str'](_0x19906d(0x18d)));return dryRun(_0x19906d(0x17c),'/client/knowledge-base/personal/create')[_0x19906d(0x186)]({'appCode':_0x513913[_0x19906d(0x14c)],'title':_0x349d28,'content':_0x484b9a})[_0x19906d(0x170)](_0x19906d(0x16f)+_0x349d28+'\x22')[_0x19906d(0x176)]();}},kbUpdate={'service':'kb','command':a32_0x1ab630(0x18e),'description':'根据本地文件更新个人知识库条目','risk':a32_0x1ab630(0x188),'confirmationDescription':a32_0x1ab630(0x15e),'flags':[{...ID_FLAG,'description':a32_0x1ab630(0x184)},{...TITLE_FLAG,'required':![],'description':a32_0x1ab630(0x16b)},FILE_FLAG],async 'execute'(_0x4965d9){const _0x1cbf5f=a32_0x1ab630,_0x169747=_0x4965d9['num']('id'),_0x5a712a=readKnowledgeFile(_0x4965d9[_0x1cbf5f(0x181)]('file')),_0x3e16fb=_0x4965d9[_0x1cbf5f(0x181)]('title')||(await getPersonalKnowledgeBaseItem(_0x169747,_0x4965d9[_0x1cbf5f(0x14c)]))['title'],_0x406335=await updatePersonalKnowledgeBaseItem(_0x169747,_0x4965d9[_0x1cbf5f(0x14c)],{'title':_0x3e16fb,'content':_0x5a712a});return{'ok':!![],'data':summarizePersonalItem(_0x406335),'message':_0x1cbf5f(0x164)+_0x406335['id']+'\x20('+_0x406335[_0x1cbf5f(0x16d)]+')'};},async 'dryRun'(_0x1dec22){const _0x4b963f=a32_0x1ab630,_0x18268d=_0x1dec22[_0x4b963f(0x17a)]('id'),_0x5b8e58=readKnowledgeFile(_0x1dec22['str'](_0x4b963f(0x18d))),_0x58a132=_0x1dec22[_0x4b963f(0x181)](_0x4b963f(0x16d))||(await getPersonalKnowledgeBaseItem(_0x18268d,_0x1dec22['appCode']))[_0x4b963f(0x16d)];return dryRun(_0x4b963f(0x17c),_0x4b963f(0x17f)+_0x18268d+_0x4b963f(0x16c))[_0x4b963f(0x186)]({'appCode':_0x1dec22[_0x4b963f(0x14c)],'title':_0x58a132,'content':_0x5b8e58})[_0x4b963f(0x170)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x18268d)[_0x4b963f(0x176)]();}},kbSearch={'service':'kb','command':a32_0x1ab630(0x151),'description':a32_0x1ab630(0x168),'risk':a32_0x1ab630(0x150),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x69783c){const _0x599f90=a32_0x1ab630;if(!_0x69783c[_0x599f90(0x181)]('query')[_0x599f90(0x157)]())throw CliErrors[_0x599f90(0x15a)]('Search\x20query\x20is\x20required.');readTopK(_0x69783c);},async 'execute'(_0x17c1c4){const _0x4d7809=a32_0x1ab630,_0xe2e9ae=_0x17c1c4['str'](_0x4d7809(0x18c))[_0x4d7809(0x157)](),_0x5e196b=readTopK(_0x17c1c4),_0x3010a1=await searchKnowledgeBase(_0x17c1c4['appCode'],{'query':_0xe2e9ae,'topK':_0x5e196b});return{'ok':!![],'data':{'total':_0x3010a1['length'],'hits':_0x3010a1[_0x4d7809(0x15c)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x514b7c=a32_0x28e4;(function(_0x18c9a1,_0x4c3ea9){const _0x2ec9b5=a32_0x28e4,_0x489da3=_0x18c9a1();while(!![]){try{const _0x5331e9=-parseInt(_0x2ec9b5(0x8f))/0x1+parseInt(_0x2ec9b5(0x82))/0x2+parseInt(_0x2ec9b5(0xab))/0x3+-parseInt(_0x2ec9b5(0xa8))/0x4+-parseInt(_0x2ec9b5(0x85))/0x5+parseInt(_0x2ec9b5(0xb4))/0x6*(-parseInt(_0x2ec9b5(0xa5))/0x7)+parseInt(_0x2ec9b5(0xbf))/0x8;if(_0x5331e9===_0x4c3ea9)break;else _0x489da3['push'](_0x489da3['shift']());}catch(_0x50958d){_0x489da3['push'](_0x489da3['shift']());}}}(a32_0x2a56,0x31718));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';function a32_0x2a56(){const _0x475a03=['Personal\x20knowledge-base\x20entry\x20title','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','verbose','Personal\x20knowledge-base\x20entry\x20ID','355074yhtVne','flag','topk','utf8','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','version','create','score','validation','title','Updated\x20KB\x20entry\x20','/client/knowledge-base/personal/create','detail','read','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','number','isFile','list','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','weightedScore','scope','56vbqwVH','userId','Search\x20query\x20is\x20required.','436144zYVTZs','updateTime','ragStatus','215955DLxRqE','File\x20is\x20not\x20a\x20regular\x20file:\x20','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','file','POST','length','update','bool','/update','119706uRiobj','string','--topk\x20must\x20be\x20a\x20positive\x20number.','body','metadata','query','Created\x20KB\x20entry\x20','str','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','write','根据本地文件创建个人知识库条目','7015368WPJPTz','createTime','117910bZaNVZ','num','content','908115snaSVw','trim','build','ragErrorMessage','map','appCode'];a32_0x2a56=function(){return _0x475a03;};return a32_0x2a56();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a32_0x514b7c(0xb5),'required':!![],'description':a32_0x514b7c(0x8b)},FILE_FLAG={'name':a32_0x514b7c(0xae),'type':a32_0x514b7c(0xb5),'required':!![],'description':a32_0x514b7c(0x8c)},QUERY_FLAG={'name':a32_0x514b7c(0xb9),'type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x514b7c(0x91),'type':a32_0x514b7c(0x9e),'description':a32_0x514b7c(0xa2)};function readKnowledgeFile(_0x2371e9){const _0x586ea5=a32_0x514b7c;if(!_0x2371e9)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x2371e9))throw CliErrors[_0x586ea5(0x97)]('File\x20not\x20found:\x20'+_0x2371e9);if(!statSync(_0x2371e9)[_0x586ea5(0x9f)]())throw CliErrors[_0x586ea5(0x97)](_0x586ea5(0xac)+_0x2371e9);return readFileSync(_0x2371e9,_0x586ea5(0x92));}function summarizePersonalItem(_0x4f9192){const _0xaf527f=a32_0x514b7c;return{'id':_0x4f9192['id'],'title':_0x4f9192[_0xaf527f(0x98)],'version':_0x4f9192[_0xaf527f(0x94)],'ragStatus':_0x4f9192[_0xaf527f(0xaa)],'ragErrorMessage':_0x4f9192['ragErrorMessage'],'updateTime':_0x4f9192[_0xaf527f(0xa9)]};}function detailPersonalItem(_0x566245){const _0x6485d4=a32_0x514b7c;return{'id':_0x566245['id'],'appCode':_0x566245['appCode'],'scope':_0x566245[_0x6485d4(0xa4)],'userId':_0x566245[_0x6485d4(0xa6)],'title':_0x566245['title'],'content':_0x566245['content']??'','version':_0x566245['version'],'ragStatus':_0x566245['ragStatus'],'ragErrorMessage':_0x566245[_0x6485d4(0x88)],'createTime':_0x566245[_0x6485d4(0xc0)],'updateTime':_0x566245[_0x6485d4(0xa9)]};}function a32_0x28e4(_0x3f28b0,_0x54abcb){_0x3f28b0=_0x3f28b0-0x82;const _0x2a5611=a32_0x2a56();let _0x28e451=_0x2a5611[_0x3f28b0];return _0x28e451;}function summarizeSearchHit(_0x1413a9){const _0x36f39d=a32_0x514b7c;return{'scope':_0x1413a9['scope'],'title':_0x1413a9[_0x36f39d(0x98)],'docId':_0x1413a9['docId'],'score':_0x1413a9[_0x36f39d(0x96)],'weightedScore':_0x1413a9[_0x36f39d(0xa3)],'content':_0x1413a9[_0x36f39d(0x84)],'metadata':_0x1413a9[_0x36f39d(0xb8)]};}function readTopK(_0x5b7095){const _0x39e59c=a32_0x514b7c,_0x102b9f=_0x5b7095[_0x39e59c(0x90)](_0x39e59c(0x91));if(_0x102b9f===undefined||_0x102b9f===null||_0x102b9f==='')return undefined;const _0x21d0ae=_0x5b7095[_0x39e59c(0x83)](_0x39e59c(0x91));if(!Number['isFinite'](_0x21d0ae)||_0x21d0ae<0x1)throw CliErrors['validation'](_0x39e59c(0xb6));return _0x21d0ae;}const kbList={'service':'kb','command':a32_0x514b7c(0xa0),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x514b7c(0x9c),'flags':[VERBOSE_FLAG],async 'execute'(_0x188232){const _0x21d6a7=a32_0x514b7c,_0x2a9a56=await listPersonalKnowledgeBaseItems(_0x188232[_0x21d6a7(0x8a)]);if(_0x188232[_0x21d6a7(0xb2)](_0x21d6a7(0x8d)))return{'ok':!![],'data':{'total':_0x2a9a56[_0x21d6a7(0xb0)],'items':_0x2a9a56}};return{'ok':!![],'data':{'total':_0x2a9a56[_0x21d6a7(0xb0)],'items':_0x2a9a56[_0x21d6a7(0x89)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x514b7c(0x9b),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x514b7c(0x9c),'flags':[{...ID_FLAG,'description':a32_0x514b7c(0x8e)}],async 'execute'(_0x5e0a2){const _0x418e18=a32_0x514b7c,_0x1e126f=await getPersonalKnowledgeBaseItem(_0x5e0a2[_0x418e18(0x83)]('id'),_0x5e0a2[_0x418e18(0x8a)]);return{'ok':!![],'data':detailPersonalItem(_0x1e126f)};}},kbCreate={'service':'kb','command':a32_0x514b7c(0x95),'description':a32_0x514b7c(0xbe),'risk':'write','confirmationDescription':a32_0x514b7c(0xbc),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x357299){const _0x4b6e6d=a32_0x514b7c,_0x57d7bb=_0x357299[_0x4b6e6d(0xbb)](_0x4b6e6d(0x98)),_0x50f0d2=readKnowledgeFile(_0x357299['str']('file')),_0x1e1a4b=await createPersonalKnowledgeBaseItem(_0x357299['appCode'],{'title':_0x57d7bb,'content':_0x50f0d2});return{'ok':!![],'data':summarizePersonalItem(_0x1e1a4b),'message':_0x4b6e6d(0xba)+_0x1e1a4b['id']+'\x20('+_0x1e1a4b[_0x4b6e6d(0x98)]+')'};},async 'dryRun'(_0x50425d){const _0x1f8053=a32_0x514b7c,_0x2e182f=_0x50425d['str'](_0x1f8053(0x98)),_0x56ebab=readKnowledgeFile(_0x50425d[_0x1f8053(0xbb)](_0x1f8053(0xae)));return dryRun('POST',_0x1f8053(0x9a))[_0x1f8053(0xb7)]({'appCode':_0x50425d['appCode'],'title':_0x2e182f,'content':_0x56ebab})['description'](_0x1f8053(0xad)+_0x2e182f+'\x22')[_0x1f8053(0x87)]();}},kbUpdate={'service':'kb','command':a32_0x514b7c(0xb1),'description':'根据本地文件更新个人知识库条目','risk':a32_0x514b7c(0xbd),'confirmationDescription':a32_0x514b7c(0x9d),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x15f4fd){const _0x59b440=a32_0x514b7c,_0x3fc787=_0x15f4fd[_0x59b440(0x83)]('id'),_0x55b41c=readKnowledgeFile(_0x15f4fd['str']('file')),_0x2e9d7f=_0x15f4fd[_0x59b440(0xbb)]('title')||(await getPersonalKnowledgeBaseItem(_0x3fc787,_0x15f4fd[_0x59b440(0x8a)]))[_0x59b440(0x98)],_0x90706f=await updatePersonalKnowledgeBaseItem(_0x3fc787,_0x15f4fd[_0x59b440(0x8a)],{'title':_0x2e9d7f,'content':_0x55b41c});return{'ok':!![],'data':summarizePersonalItem(_0x90706f),'message':_0x59b440(0x99)+_0x90706f['id']+'\x20('+_0x90706f['title']+')'};},async 'dryRun'(_0x273e41){const _0xf124f5=a32_0x514b7c,_0x76768a=_0x273e41[_0xf124f5(0x83)]('id'),_0x137a1b=readKnowledgeFile(_0x273e41[_0xf124f5(0xbb)](_0xf124f5(0xae))),_0x153faf=_0x273e41[_0xf124f5(0xbb)]('title')||(await getPersonalKnowledgeBaseItem(_0x76768a,_0x273e41['appCode']))[_0xf124f5(0x98)];return dryRun(_0xf124f5(0xaf),'/client/knowledge-base/personal/'+_0x76768a+_0xf124f5(0xb3))[_0xf124f5(0xb7)]({'appCode':_0x273e41[_0xf124f5(0x8a)],'title':_0x153faf,'content':_0x137a1b})['description'](_0xf124f5(0xa1)+_0x76768a)[_0xf124f5(0x87)]();}},kbSearch={'service':'kb','command':'search','description':a32_0x514b7c(0x93),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x513cfb){const _0x54d704=a32_0x514b7c;if(!_0x513cfb[_0x54d704(0xbb)]('query')[_0x54d704(0x86)]())throw CliErrors[_0x54d704(0x97)](_0x54d704(0xa7));readTopK(_0x513cfb);},async 'execute'(_0x420793){const _0xf1e2fc=a32_0x514b7c,_0x387630=_0x420793['str'](_0xf1e2fc(0xb9))[_0xf1e2fc(0x86)](),_0x3d5547=readTopK(_0x420793),_0x4841dc=await searchKnowledgeBase(_0x420793['appCode'],{'query':_0x387630,'topK':_0x3d5547});return{'ok':!![],'data':{'total':_0x4841dc['length'],'hits':_0x4841dc[_0xf1e2fc(0x89)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x31bd6a=a33_0x2ba3;function a33_0x2ba3(_0x11feb3,_0x1e87f5){_0x11feb3=_0x11feb3-0x1ae;const _0x10c23a=a33_0x10c2();let _0x2ba303=_0x10c23a[_0x11feb3];return _0x2ba303;}(function(_0x8c8f04,_0x96735a){const _0x2f1244=a33_0x2ba3,_0x319f5f=_0x8c8f04();while(!![]){try{const _0x341bd6=-parseInt(_0x2f1244(0x1c3))/0x1+parseInt(_0x2f1244(0x1af))/0x2*(-parseInt(_0x2f1244(0x1cb))/0x3)+parseInt(_0x2f1244(0x1b1))/0x4+parseInt(_0x2f1244(0x1c4))/0x5*(parseInt(_0x2f1244(0x1ba))/0x6)+parseInt(_0x2f1244(0x1c2))/0x7*(-parseInt(_0x2f1244(0x1bd))/0x8)+parseInt(_0x2f1244(0x1c9))/0x9*(parseInt(_0x2f1244(0x1b3))/0xa)+parseInt(_0x2f1244(0x1c7))/0xb*(parseInt(_0x2f1244(0x1b7))/0xc);if(_0x341bd6===_0x96735a)break;else _0x319f5f['push'](_0x319f5f['shift']());}catch(_0x3b276f){_0x319f5f['push'](_0x319f5f['shift']());}}}(a33_0x10c2,0xc9f2d));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x10c2(){const _0x40bf25=['details','96aSSqOH','toLocaleString','4368376KLtqIv','success','1253390qNntgs','stringify','warn','duration','1211652ETDflX','length','show','1101732CVVdeS','*\x20No\x20logs\x20found','message','24584ORGgyq','\x20\x20\x20Duration:\x20','keys','level','en-US','483ULmlDt','1054154hEiEAk','20GTOCTU','command','\x20\x20\x20Details:\x20','165fasqAf','error','27EAUwGp','readLogs','101487ZgyHEB','read','log','logs'];a33_0x10c2=function(){return _0x40bf25;};return a33_0x10c2();}function printLogs(_0x4ba8d4){const _0x3890f5=a33_0x2ba3;if(_0x4ba8d4['length']===0x0){console['log'](_0x3890f5(0x1bb));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x4ba8d4['forEach']((_0x3f3644,_0x2da4a5)=>{const _0x5cf773=_0x3890f5,_0x2fdbc6=new Date(_0x3f3644['timestamp'])[_0x5cf773(0x1b0)](_0x5cf773(0x1c1)),_0x564ecc=_0x3f3644['level']===_0x5cf773(0x1b2)?'√':_0x3f3644[_0x5cf773(0x1c0)]===_0x5cf773(0x1c8)?'×':_0x3f3644['level']===_0x5cf773(0x1b5)?'!':'i';console[_0x5cf773(0x1cd)](_0x2da4a5+0x1+'.\x20'+_0x564ecc+'\x20['+_0x3f3644[_0x5cf773(0x1c5)]+']\x20'+_0x3f3644[_0x5cf773(0x1bc)]),console[_0x5cf773(0x1cd)]('\x20\x20\x20Time:\x20'+_0x2fdbc6),_0x3f3644['duration']&&console[_0x5cf773(0x1cd)](_0x5cf773(0x1be)+_0x3f3644[_0x5cf773(0x1b6)]+'ms'),_0x3f3644[_0x5cf773(0x1ae)]&&Object[_0x5cf773(0x1bf)](_0x3f3644[_0x5cf773(0x1ae)])[_0x5cf773(0x1b8)]>0x0&&console['log'](_0x5cf773(0x1c6)+JSON[_0x5cf773(0x1b4)](_0x3f3644[_0x5cf773(0x1ae)],null,0x2)),console[_0x5cf773(0x1cd)]('');});}export const logsDefinitions=[{'service':a33_0x31bd6a(0x1ce),'command':a33_0x31bd6a(0x1b9),'description':'View\x20command\x20history\x20logs','risk':a33_0x31bd6a(0x1cc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x383df6){const _0x2d229f=a33_0x31bd6a;return printLogs(logger[_0x2d229f(0x1ca)]()),{'ok':!![]};}}];
1
+ function a33_0x2972(){const _0x30369f=['\x20logs:\x0a','3580016zLkOKM','show','\x20\x20\x20Time:\x20','success','length','6690REtLTG','208ZUzCwg','*\x20No\x20logs\x20found','error','\x20\x20\x20Details:\x20','8430itvJhP','details','read','readLogs','19704XMKWcl','8770uINxxf','14sVHVMZ','keys','forEach','\x20\x20\x20Duration:\x20','1135456VRgGPA','View\x20command\x20history\x20logs','103YnMorP','250CoJilu','306rbHjaN','message','3579468bsCBlb','log','stringify','warn','level','en-US','logs','timestamp','duration','toLocaleString'];a33_0x2972=function(){return _0x30369f;};return a33_0x2972();}function a33_0x339e(_0x5d59e5,_0x24643f){_0x5d59e5=_0x5d59e5-0x82;const _0x297263=a33_0x2972();let _0x339e56=_0x297263[_0x5d59e5];return _0x339e56;}const a33_0x40b4f9=a33_0x339e;(function(_0x206711,_0x16051e){const _0x1cc77d=a33_0x339e,_0x59dcca=_0x206711();while(!![]){try{const _0x18b6a8=parseInt(_0x1cc77d(0x93))/0x1*(-parseInt(_0x1cc77d(0x82))/0x2)+parseInt(_0x1cc77d(0x8b))/0x3*(parseInt(_0x1cc77d(0x83))/0x4)+-parseInt(_0x1cc77d(0x94))/0x5*(parseInt(_0x1cc77d(0x87))/0x6)+-parseInt(_0x1cc77d(0x8d))/0x7*(-parseInt(_0x1cc77d(0x91))/0x8)+parseInt(_0x1cc77d(0x95))/0x9*(parseInt(_0x1cc77d(0x8c))/0xa)+-parseInt(_0x1cc77d(0xa2))/0xb+parseInt(_0x1cc77d(0x97))/0xc;if(_0x18b6a8===_0x16051e)break;else _0x59dcca['push'](_0x59dcca['shift']());}catch(_0x25ba5e){_0x59dcca['push'](_0x59dcca['shift']());}}}(a33_0x2972,0x34112));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2a986d){const _0x525823=a33_0x339e;if(_0x2a986d[_0x525823(0xa6)]===0x0){console['log'](_0x525823(0x84));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x525823(0xa1)),_0x2a986d[_0x525823(0x8f)]((_0x533784,_0x4f940a)=>{const _0x1c2391=_0x525823,_0x4cd7d1=new Date(_0x533784[_0x1c2391(0x9e)])[_0x1c2391(0xa0)](_0x1c2391(0x9c)),_0x152e69=_0x533784[_0x1c2391(0x9b)]===_0x1c2391(0xa5)?'√':_0x533784[_0x1c2391(0x9b)]===_0x1c2391(0x85)?'×':_0x533784['level']===_0x1c2391(0x9a)?'!':'i';console[_0x1c2391(0x98)](_0x4f940a+0x1+'.\x20'+_0x152e69+'\x20['+_0x533784['command']+']\x20'+_0x533784[_0x1c2391(0x96)]),console['log'](_0x1c2391(0xa4)+_0x4cd7d1),_0x533784[_0x1c2391(0x9f)]&&console['log'](_0x1c2391(0x90)+_0x533784[_0x1c2391(0x9f)]+'ms'),_0x533784[_0x1c2391(0x88)]&&Object[_0x1c2391(0x8e)](_0x533784['details'])[_0x1c2391(0xa6)]>0x0&&console[_0x1c2391(0x98)](_0x1c2391(0x86)+JSON[_0x1c2391(0x99)](_0x533784[_0x1c2391(0x88)],null,0x2)),console[_0x1c2391(0x98)]('');});}export const logsDefinitions=[{'service':a33_0x40b4f9(0x9d),'command':a33_0x40b4f9(0xa3),'description':a33_0x40b4f9(0x92),'risk':a33_0x40b4f9(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x353778){const _0x1101d0=a33_0x40b4f9;return printLogs(logger[_0x1101d0(0x8a)]()),{'ok':!![]};}}];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigList: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a34_0xe75bc3=a34_0x2184;(function(_0x524158,_0x3f5b16){const _0x404175=a34_0x2184,_0x5b987d=_0x524158();while(!![]){try{const _0x514954=parseInt(_0x404175(0xb3))/0x1*(parseInt(_0x404175(0xbf))/0x2)+-parseInt(_0x404175(0xb2))/0x3+parseInt(_0x404175(0xb7))/0x4*(parseInt(_0x404175(0xae))/0x5)+-parseInt(_0x404175(0xac))/0x6+-parseInt(_0x404175(0xb0))/0x7+-parseInt(_0x404175(0xad))/0x8+-parseInt(_0x404175(0xb5))/0x9*(-parseInt(_0x404175(0xb8))/0xa);if(_0x514954===_0x3f5b16)break;else _0x5b987d['push'](_0x5b987d['shift']());}catch(_0x36c7aa){_0x5b987d['push'](_0x5b987d['shift']());}}}(a34_0x2576,0xba441));function a34_0x2576(){const _0x5401ad=['Found\x20','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','EMAIL','length','673742JykrBI','type','6035424YGQxQi','8340808DANcwh','235hiwFvx','notification','4189346JhIFEc','\x20notification\x20config(s)','96276udNYNc','4GlVCha','map','7543611kruMyG','Notification\x20channel\x20type','106924RWfLPz','10WLXIUd','config-list','appCode'];a34_0x2576=function(){return _0x5401ad;};return a34_0x2576();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a34_0x2184(_0x36a042,_0x14c747){_0x36a042=_0x36a042-0xab;const _0x257640=a34_0x2576();let _0x218400=_0x257640[_0x36a042];return _0x218400;}export const notificationConfigList={'service':a34_0xe75bc3(0xaf),'command':a34_0xe75bc3(0xb9),'description':a34_0xe75bc3(0xbc),'risk':'read','flags':[{'name':a34_0xe75bc3(0xab),'type':'string','description':a34_0xe75bc3(0xb6),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a34_0xe75bc3(0xbd)}],async 'validate'(_0x551c7a){readNotificationChannelType(_0x551c7a);},async 'execute'(_0x2bb2c5){const _0x56b8b8=a34_0xe75bc3,_0x4fffc4=readNotificationChannelType(_0x2bb2c5),_0x343413=await listNotificationChannelConfigs(_0x2bb2c5[_0x56b8b8(0xba)],_0x4fffc4),_0x24c28e=_0x343413[_0x56b8b8(0xb4)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2bb2c5[_0x56b8b8(0xba)],'channelType':_0x4fffc4,'count':_0x24c28e[_0x56b8b8(0xbe)],'configs':_0x24c28e},'message':_0x56b8b8(0xbb)+_0x24c28e['length']+'\x20'+_0x4fffc4+_0x56b8b8(0xb1)};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationDefinitions: CommandDefinition[];
@@ -0,0 +1 @@
1
+ function a35_0x3791(_0x54d177,_0x532f55){_0x54d177=_0x54d177-0x19c;const _0x5b25c1=a35_0x5b25();let _0x37918f=_0x5b25c1[_0x54d177];return _0x37918f;}function a35_0x5b25(){const _0x3253a8=['204892UbhFVO','4808ItSwpX','510336xXzZqg','81DpyvoJ','1280554xMMtCQ','153528wIMJsy','310902lyMHKM','30Iwhwcw','20LPpUCu','21eoDbXT','610626xWERRJ','810hoDiBi'];a35_0x5b25=function(){return _0x3253a8;};return a35_0x5b25();}(function(_0x3ca378,_0x354b75){const _0xc43d1=a35_0x3791,_0x58f82e=_0x3ca378();while(!![]){try{const _0xc5ada=parseInt(_0xc43d1(0x1a0))/0x1+-parseInt(_0xc43d1(0x1a3))/0x2*(parseInt(_0xc43d1(0x1a1))/0x3)+-parseInt(_0xc43d1(0x1a2))/0x4*(-parseInt(_0xc43d1(0x19e))/0x5)+parseInt(_0xc43d1(0x19c))/0x6*(parseInt(_0xc43d1(0x19f))/0x7)+parseInt(_0xc43d1(0x1a7))/0x8*(-parseInt(_0xc43d1(0x1a5))/0x9)+-parseInt(_0xc43d1(0x19d))/0xa*(-parseInt(_0xc43d1(0x1a6))/0xb)+-parseInt(_0xc43d1(0x1a4))/0xc;if(_0xc5ada===_0x354b75)break;else _0x58f82e['push'](_0x58f82e['shift']());}catch(_0x11929f){_0x58f82e['push'](_0x58f82e['shift']());}}}(a35_0x5b25,0x6f4cc));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
@@ -0,0 +1,13 @@
1
+ import type { NotificationChannelType } from "../../core/api-client.js";
2
+ import type { RuntimeContext } from "../../framework/types.js";
3
+ export declare const NOTIFICATION_CHANNEL_TYPES: NotificationChannelType[];
4
+ export declare function readNotificationChannelType(ctx: RuntimeContext): NotificationChannelType;
5
+ export declare function projectNotificationListConfig(item: unknown, index: number): {
6
+ id: string | number | null;
7
+ configCode: string;
8
+ configName: string;
9
+ channelType: string;
10
+ description: string | null;
11
+ createTime: string | null;
12
+ updateTime: string | null;
13
+ };
@@ -0,0 +1 @@
1
+ const a36_0x2525e3=a36_0xda59;(function(_0x55e52e,_0x2c8830){const _0x34c6f8=a36_0xda59,_0x1aa1b8=_0x55e52e();while(!![]){try{const _0x860d64=-parseInt(_0x34c6f8(0x85))/0x1*(-parseInt(_0x34c6f8(0x73))/0x2)+-parseInt(_0x34c6f8(0x8b))/0x3*(parseInt(_0x34c6f8(0x87))/0x4)+parseInt(_0x34c6f8(0x74))/0x5+-parseInt(_0x34c6f8(0x7e))/0x6+parseInt(_0x34c6f8(0x75))/0x7+-parseInt(_0x34c6f8(0x7f))/0x8*(-parseInt(_0x34c6f8(0x6e))/0x9)+-parseInt(_0x34c6f8(0x83))/0xa;if(_0x860d64===_0x2c8830)break;else _0x1aa1b8['push'](_0x1aa1b8['shift']());}catch(_0x3f2dbc){_0x1aa1b8['push'](_0x1aa1b8['shift']());}}}(a36_0x423b,0x81da7));import{CliErrors}from'../../errors.js';function a36_0xda59(_0x4e8236,_0x173d2d){_0x4e8236=_0x4e8236-0x6d;const _0x423b52=a36_0x423b();let _0xda59c2=_0x423b52[_0x4e8236];return _0xda59c2;}export const NOTIFICATION_CHANNEL_TYPES=[a36_0x2525e3(0x71),'FEISHU',a36_0x2525e3(0x76),'WECOM','WEBHOOK'];export function readNotificationChannelType(_0x420236){const _0x3b5ee5=a36_0x2525e3,_0x2a36f6=_0x420236[_0x3b5ee5(0x70)](_0x3b5ee5(0x77))[_0x3b5ee5(0x81)]()||_0x3b5ee5(0x71);if(!NOTIFICATION_CHANNEL_TYPES[_0x3b5ee5(0x7b)](_0x2a36f6))throw CliErrors['validation'](_0x3b5ee5(0x7d)+_0x2a36f6,_0x3b5ee5(0x79)+NOTIFICATION_CHANNEL_TYPES[_0x3b5ee5(0x8a)](',\x20')+'.');return _0x2a36f6;}function a36_0x423b(){const _0x3dbdbe=['1229823iJiYrL','DINGTALK','type','configCode','Allowed\x20values:\x20','\x20is\x20missing\x20required\x20field\x20\x22','includes','Item\x20','Invalid\x20--type:\x20','2408010umMxvd','2888CmdvFf','object','trim','isArray','9069820WlNwPQ','string','20BKgCoz','test','4OcbzJv','updateTime','Invalid\x20notification\x20config\x20response.','join','1076421QVwSGu','configName','18738WGChMK','apiError','str','EMAIL','createTime','88464lNSjkr','1935360CvxZQQ'];a36_0x423b=function(){return _0x3dbdbe;};return a36_0x423b();}export function projectNotificationListConfig(_0x288e73,_0x3186a2){const _0x572d17=a36_0x2525e3,_0x2025cb=requireResponseObject(_0x288e73,_0x3186a2);return{'id':normalizeNullableId(_0x2025cb['id'],_0x3186a2),'configCode':requireResponseString(_0x2025cb[_0x572d17(0x78)],_0x572d17(0x78),_0x3186a2),'configName':requireResponseString(_0x2025cb[_0x572d17(0x6d)],_0x572d17(0x6d),_0x3186a2),'channelType':requireResponseString(_0x2025cb['channelType'],'channelType',_0x3186a2),'description':normalizeNullableString(_0x2025cb['description']),'createTime':normalizeNullableString(_0x2025cb[_0x572d17(0x72)]),'updateTime':normalizeNullableString(_0x2025cb[_0x572d17(0x88)])};}function requireResponseObject(_0x1c6fa0,_0x590e25){const _0x46db40=a36_0x2525e3;if(typeof _0x1c6fa0!==_0x46db40(0x80)||_0x1c6fa0===null||Array[_0x46db40(0x82)](_0x1c6fa0))throw CliErrors['apiError'](_0x46db40(0x89),_0x46db40(0x7c)+(_0x590e25+0x1)+'\x20must\x20be\x20an\x20object.');return _0x1c6fa0;}function requireResponseString(_0x3914e5,_0x36d3dc,_0x594960){const _0x30b835=a36_0x2525e3;if(typeof _0x3914e5!==_0x30b835(0x84)||!_0x3914e5[_0x30b835(0x81)]())throw CliErrors[_0x30b835(0x6f)](_0x30b835(0x89),'Item\x20'+(_0x594960+0x1)+_0x30b835(0x7a)+_0x36d3dc+'\x22.');return _0x3914e5[_0x30b835(0x81)]();}function normalizeNullableString(_0x37f36f){const _0x42753f=a36_0x2525e3;return typeof _0x37f36f===_0x42753f(0x84)&&_0x37f36f[_0x42753f(0x81)]()?_0x37f36f[_0x42753f(0x81)]():null;}function normalizeNullableId(_0x376d91,_0x458e7f){const _0x4f00b6=a36_0x2525e3;if(_0x376d91===undefined||_0x376d91===null)return null;if(typeof _0x376d91==='number'&&Number['isSafeInteger'](_0x376d91))return _0x376d91;if(typeof _0x376d91==='string'&&/^-?\d+$/[_0x4f00b6(0x86)](_0x376d91[_0x4f00b6(0x81)]()))return _0x376d91['trim']();throw CliErrors[_0x4f00b6(0x6f)]('Invalid\x20notification\x20config\x20response.',_0x4f00b6(0x7c)+(_0x458e7f+0x1)+'\x20has\x20invalid\x20field\x20\x22id\x22.');}
@@ -1 +1 @@
1
- const a34_0xf00df9=a34_0x3a3c;(function(_0x387e37,_0x561691){const _0x16b2a5=a34_0x3a3c,_0x2eb880=_0x387e37();while(!![]){try{const _0x5b6eed=parseInt(_0x16b2a5(0x130))/0x1+parseInt(_0x16b2a5(0x13b))/0x2+-parseInt(_0x16b2a5(0x135))/0x3*(-parseInt(_0x16b2a5(0x10d))/0x4)+parseInt(_0x16b2a5(0x10e))/0x5+-parseInt(_0x16b2a5(0x11d))/0x6*(parseInt(_0x16b2a5(0x121))/0x7)+parseInt(_0x16b2a5(0x111))/0x8*(parseInt(_0x16b2a5(0x11c))/0x9)+-parseInt(_0x16b2a5(0x113))/0xa;if(_0x5b6eed===_0x561691)break;else _0x2eb880['push'](_0x2eb880['shift']());}catch(_0x14cf38){_0x2eb880['push'](_0x2eb880['shift']());}}}(a34_0x5241,0xf182e));function a34_0x3a3c(_0x445ff1,_0x2eb290){_0x445ff1=_0x445ff1-0x106;const _0x5241f4=a34_0x5241();let _0x3a3cac=_0x5241f4[_0x445ff1];return _0x3a3cac;}function a34_0x5241(){const _0x36c841=['Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','filter','join','body','recognize','139599ROYXtB','6TACFFa','read','filePath','Preview:\x20recognize\x20','9852269PNmmdV','/client/queryFileUrl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','imageUrl','fileUrl','appCode','Invoice','.\x20Supported\x20scenes:\x20','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url','build','trim','ocr','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','File\x20upload\x20response\x20missing\x20filePath.','676044FmbEmA','POST','<filePath\x20returned\x20by\x20/client/uploadFile>','\x20OCR','description','17742muEjbd','idCard','general','string','General','\x20OCR\x20from\x20URL','32316ebCsMl','apiError','image-file','File\x20URL\x20response\x20missing\x20fileUrl.','validation','form','path','length','904JaHaDy','5398700GHzFib','imageFile','IdCard','240TCJtqx','invoice','11771390nczFPb','/client/ocr','toLowerCase','/client/uploadFile'];a34_0x5241=function(){return _0x36c841;};return a34_0x5241();}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=[a34_0xf00df9(0x112),'general',a34_0xf00df9(0x10a),a34_0xf00df9(0x136)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0xf00df9(0x127),'general':a34_0xf00df9(0x139),'form':'Table','idCard':a34_0xf00df9(0x110)},SCENE_FLAG={'name':'scene','type':a34_0xf00df9(0x138),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0xf00df9(0x12e)},IMAGE_FILE_FLAG={'name':a34_0xf00df9(0x107),'type':a34_0xf00df9(0x138),'description':a34_0xf00df9(0x129)},IMAGE_URL_FLAG={'name':a34_0xf00df9(0x12a),'type':a34_0xf00df9(0x138),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x2f069e){const _0x146caa=a34_0xf00df9,_0x716196=_0x2f069e[_0x146caa(0x12c)]()[_0x146caa(0x115)]();if(_0x716196==='idcard')return _0x146caa(0x136);if(_0x716196===_0x146caa(0x112)||_0x716196===_0x146caa(0x137)||_0x716196===_0x146caa(0x10a))return _0x716196;throw CliErrors[_0x146caa(0x109)]('Unsupported\x20OCR\x20scene:\x20'+_0x2f069e+_0x146caa(0x128)+SUPPORTED_SCENES[_0x146caa(0x119)](',\x20'));}function selectedInputs(_0x575fb1){const _0x4a8df2=a34_0xf00df9,_0x444bc2=_0x575fb1['str'](_0x4a8df2(0x107))[_0x4a8df2(0x12c)](),_0x41d98b=_0x575fb1['str'](_0x4a8df2(0x12a))[_0x4a8df2(0x12c)]();return{'imageFile':_0x444bc2,'imageUrl':_0x41d98b,'count':[_0x444bc2,_0x41d98b][_0x4a8df2(0x118)](Boolean)[_0x4a8df2(0x10c)]};}function validateInputSelection(_0x4b4cfa){const _0x3fb4f6=a34_0xf00df9,_0x44e4b6=selectedInputs(_0x4b4cfa);if(_0x44e4b6['count']!==0x1)throw CliErrors['validation'](_0x3fb4f6(0x117));return _0x44e4b6;}function withScene(_0x2f96db,_0x375155,_0x370732){const _0x5c8141=a34_0xf00df9;return{..._0x2f96db,'scene':_0x375155,..._0x370732?{'sourceFile':{'fileName':_0x370732['fileName'],'filePath':_0x370732[_0x5c8141(0x11f)]}}:{}};}const ocrRecognize={'service':a34_0xf00df9(0x12d),'command':a34_0xf00df9(0x11b),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0xf00df9(0x11e),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xe41d49){const _0x3e1a45=a34_0xf00df9,_0x398429=normalizeScene(_0xe41d49['str']('scene')),_0x1acf27=SCENE_TO_LEGACY_TYPE[_0x398429],_0x1e1750=validateInputSelection(_0xe41d49);if(_0x1e1750[_0x3e1a45(0x124)])return dryRun(_0x3e1a45(0x131),'/client/ocr')[_0x3e1a45(0x11a)]({'appCode':_0xe41d49[_0x3e1a45(0x126)],'url':_0x1e1750[_0x3e1a45(0x124)],'type':_0x1acf27})[_0x3e1a45(0x134)](_0x3e1a45(0x120)+_0x398429+_0x3e1a45(0x13a))[_0x3e1a45(0x12b)]();const _0x394d4d=requireRuntimeUploadFile(_0x1e1750[_0x3e1a45(0x10f)],_0x3e1a45(0x107));return dryRun(_0x3e1a45(0x131),_0x3e1a45(0x116))['body']({'steps':[{'method':'POST','url':_0x3e1a45(0x116),'body':{'appCode':_0xe41d49[_0x3e1a45(0x126)],'multipart':{'file':_0x394d4d}}},{'method':_0x3e1a45(0x131),'url':_0x3e1a45(0x122),'body':{'filePath':_0x3e1a45(0x132),'downloadFlag':![]}},{'method':_0x3e1a45(0x131),'url':_0x3e1a45(0x114),'body':{'appCode':_0xe41d49[_0x3e1a45(0x126)],'url':_0x3e1a45(0x123),'type':_0x1acf27}}]})['description']('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x398429+_0x3e1a45(0x133))[_0x3e1a45(0x12b)]();},async 'execute'(_0x111b73){const _0xe4d0b5=a34_0xf00df9,_0x1f084f=normalizeScene(_0x111b73['str']('scene')),_0x3bacd6=SCENE_TO_LEGACY_TYPE[_0x1f084f],_0x1fe254=validateInputSelection(_0x111b73);if(_0x1fe254[_0xe4d0b5(0x124)]){const _0x23c4fa=await recognizeRuntimeOcr(_0x111b73[_0xe4d0b5(0x126)],{'url':_0x1fe254[_0xe4d0b5(0x124)],'type':_0x3bacd6});return{'ok':!![],'data':withScene(_0x23c4fa,_0x1f084f)};}const _0x3eab81=requireRuntimeUploadFile(_0x1fe254[_0xe4d0b5(0x10f)],'image-file'),_0x21f68a=await uploadRuntimeFile(_0x111b73[_0xe4d0b5(0x126)],_0x3eab81[_0xe4d0b5(0x10b)]);if(!_0x21f68a[_0xe4d0b5(0x11f)])throw CliErrors[_0xe4d0b5(0x106)](_0xe4d0b5(0x12f));const _0x27e18c=await queryRuntimeFileUrl(_0x21f68a[_0xe4d0b5(0x11f)],{'download':![]});if(!_0x27e18c['fileUrl'])throw CliErrors[_0xe4d0b5(0x106)](_0xe4d0b5(0x108));const _0x2ba41c=await recognizeRuntimeOcr(_0x111b73['appCode'],{'url':_0x27e18c[_0xe4d0b5(0x125)],'type':_0x3bacd6});return{'ok':!![],'data':withScene(_0x2ba41c,_0x1f084f,_0x21f68a)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a37_0x25b890=a37_0x7d32;(function(_0x34c21a,_0x5669ea){const _0x4d5bb5=a37_0x7d32,_0x22197b=_0x34c21a();while(!![]){try{const _0x17a872=parseInt(_0x4d5bb5(0x12b))/0x1*(parseInt(_0x4d5bb5(0x143))/0x2)+parseInt(_0x4d5bb5(0x117))/0x3*(parseInt(_0x4d5bb5(0x113))/0x4)+parseInt(_0x4d5bb5(0x111))/0x5+parseInt(_0x4d5bb5(0x136))/0x6+-parseInt(_0x4d5bb5(0x13a))/0x7*(parseInt(_0x4d5bb5(0x130))/0x8)+-parseInt(_0x4d5bb5(0x12e))/0x9+-parseInt(_0x4d5bb5(0x131))/0xa;if(_0x17a872===_0x5669ea)break;else _0x22197b['push'](_0x22197b['shift']());}catch(_0x206a79){_0x22197b['push'](_0x22197b['shift']());}}}(a37_0x4012,0xea183));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a37_0x25b890(0x10c),a37_0x25b890(0x10d),'form',a37_0x25b890(0x12a)],SCENE_TO_LEGACY_TYPE={'invoice':a37_0x25b890(0x139),'general':a37_0x25b890(0x11c),'form':a37_0x25b890(0x126),'idCard':a37_0x25b890(0x112)},SCENE_FLAG={'name':a37_0x25b890(0x11b),'type':a37_0x25b890(0x137),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a37_0x25b890(0x11a)},IMAGE_FILE_FLAG={'name':a37_0x25b890(0x127),'type':a37_0x25b890(0x137),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a37_0x25b890(0x12d)};function normalizeScene(_0x466e29){const _0x1d14c2=a37_0x25b890,_0x30cce9=_0x466e29[_0x1d14c2(0x13e)]()[_0x1d14c2(0x13d)]();if(_0x30cce9===_0x1d14c2(0x11f))return'idCard';if(_0x30cce9===_0x1d14c2(0x10c)||_0x30cce9===_0x1d14c2(0x10d)||_0x30cce9===_0x1d14c2(0x129))return _0x30cce9;throw CliErrors[_0x1d14c2(0x145)](_0x1d14c2(0x134)+_0x466e29+_0x1d14c2(0x122)+SUPPORTED_SCENES[_0x1d14c2(0x13c)](',\x20'));}function selectedInputs(_0x3b3e65){const _0x4a212f=a37_0x25b890,_0x453bbc=_0x3b3e65[_0x4a212f(0x116)]('image-file')[_0x4a212f(0x13e)](),_0x359fd7=_0x3b3e65[_0x4a212f(0x116)](_0x4a212f(0x132))['trim']();return{'imageFile':_0x453bbc,'imageUrl':_0x359fd7,'count':[_0x453bbc,_0x359fd7][_0x4a212f(0x114)](Boolean)[_0x4a212f(0x12f)]};}function validateInputSelection(_0x3f92ad){const _0x410f60=a37_0x25b890,_0x4ea7e4=selectedInputs(_0x3f92ad);if(_0x4ea7e4[_0x410f60(0x121)]!==0x1)throw CliErrors[_0x410f60(0x145)](_0x410f60(0x115));return _0x4ea7e4;}function a37_0x7d32(_0x5e4f9e,_0x272acf){_0x5e4f9e=_0x5e4f9e-0x10c;const _0x40128e=a37_0x4012();let _0x7d323d=_0x40128e[_0x5e4f9e];return _0x7d323d;}function withScene(_0x2d8eaf,_0x11d637,_0x2e8fda){const _0x34b519=a37_0x25b890;return{..._0x2d8eaf,'scene':_0x11d637,..._0x2e8fda?{'sourceFile':{'fileName':_0x2e8fda[_0x34b519(0x11d)],'filePath':_0x2e8fda[_0x34b519(0x128)]}}:{}};}const ocrRecognize={'service':'ocr','command':a37_0x25b890(0x142),'description':a37_0x25b890(0x125),'risk':a37_0x25b890(0x140),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3ab300){const _0x8422d9=a37_0x25b890,_0x59bf02=normalizeScene(_0x3ab300[_0x8422d9(0x116)]('scene')),_0x46e1ab=SCENE_TO_LEGACY_TYPE[_0x59bf02],_0x1aba73=validateInputSelection(_0x3ab300);if(_0x1aba73[_0x8422d9(0x124)])return dryRun(_0x8422d9(0x13f),_0x8422d9(0x12c))[_0x8422d9(0x135)]({'appCode':_0x3ab300[_0x8422d9(0x144)],'url':_0x1aba73['imageUrl'],'type':_0x46e1ab})['description'](_0x8422d9(0x110)+_0x59bf02+'\x20OCR\x20from\x20URL')[_0x8422d9(0x13b)]();const _0x3d4591=requireRuntimeUploadFile(_0x1aba73[_0x8422d9(0x10f)],_0x8422d9(0x127));return dryRun(_0x8422d9(0x13f),_0x8422d9(0x120))['body']({'steps':[{'method':_0x8422d9(0x13f),'url':'/client/uploadFile','body':{'appCode':_0x3ab300[_0x8422d9(0x144)],'multipart':{'file':_0x3d4591}}},{'method':'POST','url':'/client/queryFileUrl','body':{'filePath':_0x8422d9(0x10e),'downloadFlag':![]}},{'method':_0x8422d9(0x13f),'url':_0x8422d9(0x12c),'body':{'appCode':_0x3ab300['appCode'],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0x46e1ab}}]})[_0x8422d9(0x119)](_0x8422d9(0x138)+_0x59bf02+'\x20OCR')[_0x8422d9(0x13b)]();},async 'execute'(_0x203de8){const _0x301fbd=a37_0x25b890,_0x7a5b09=normalizeScene(_0x203de8[_0x301fbd(0x116)]('scene')),_0x3e691d=SCENE_TO_LEGACY_TYPE[_0x7a5b09],_0x11b2c3=validateInputSelection(_0x203de8);if(_0x11b2c3[_0x301fbd(0x124)]){const _0x23815f=await recognizeRuntimeOcr(_0x203de8[_0x301fbd(0x144)],{'url':_0x11b2c3[_0x301fbd(0x124)],'type':_0x3e691d});return{'ok':!![],'data':withScene(_0x23815f,_0x7a5b09)};}const _0x247c42=requireRuntimeUploadFile(_0x11b2c3[_0x301fbd(0x10f)],'image-file'),_0x964720=await uploadRuntimeFile(_0x203de8['appCode'],_0x247c42[_0x301fbd(0x118)]);if(!_0x964720[_0x301fbd(0x128)])throw CliErrors['apiError'](_0x301fbd(0x123));const _0x4a6302=await queryRuntimeFileUrl(_0x964720['filePath'],{'download':![]});if(!_0x4a6302[_0x301fbd(0x141)])throw CliErrors[_0x301fbd(0x11e)](_0x301fbd(0x133));const _0x45e9a4=await recognizeRuntimeOcr(_0x203de8[_0x301fbd(0x144)],{'url':_0x4a6302[_0x301fbd(0x141)],'type':_0x3e691d});return{'ok':!![],'data':withScene(_0x45e9a4,_0x7a5b09,_0x964720)};}};export const ocrDefinitions=[ocrRecognize];function a37_0x4012(){const _0x22f121=['Table','image-file','filePath','form','idCard','35arbrYw','/client/ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','1753767kVIhnu','length','7302472ZkfdEY','12017570FFbirs','image-url','File\x20URL\x20response\x20missing\x20fileUrl.','Unsupported\x20OCR\x20scene:\x20','body','8721012iOPwEw','string','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Invoice','7EFNOGj','build','join','toLowerCase','trim','POST','read','fileUrl','recognize','25790Gydhdx','appCode','validation','invoice','general','<filePath\x20returned\x20by\x20/client/uploadFile>','imageFile','Preview:\x20recognize\x20','392585kTFiVd','IdCard','1776VHIakp','filter','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','str','8682NwdCZM','path','description','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','scene','General','fileName','apiError','idcard','/client/uploadFile','count','.\x20Supported\x20scenes:\x20','File\x20upload\x20response\x20missing\x20filePath.','imageUrl','使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字'];a37_0x4012=function(){return _0x22f121;};return a37_0x4012();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitDatasetGet: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a38_0x63513a=a38_0x2742;(function(_0x48103a,_0x4c6e71){const _0x55dd25=a38_0x2742,_0x574297=_0x48103a();while(!![]){try{const _0x2d47e2=parseInt(_0x55dd25(0x187))/0x1*(-parseInt(_0x55dd25(0x18a))/0x2)+parseInt(_0x55dd25(0x17a))/0x3+parseInt(_0x55dd25(0x18d))/0x4*(parseInt(_0x55dd25(0x182))/0x5)+parseInt(_0x55dd25(0x18c))/0x6*(parseInt(_0x55dd25(0x181))/0x7)+-parseInt(_0x55dd25(0x18e))/0x8+parseInt(_0x55dd25(0x17e))/0x9*(-parseInt(_0x55dd25(0x189))/0xa)+parseInt(_0x55dd25(0x184))/0xb;if(_0x2d47e2===_0x4c6e71)break;else _0x574297['push'](_0x574297['shift']());}catch(_0x2a4897){_0x574297['push'](_0x574297['shift']());}}}(a38_0x2282,0xab1ff));function a38_0x2742(_0x215ad9,_0x9dda03){_0x215ad9=_0x215ad9-0x17a;const _0x22823d=a38_0x2282();let _0x2742cf=_0x22823d[_0x215ad9];return _0x2742cf;}function a38_0x2282(){const _0xa2156d=['140NnITjw','3640672CecCxp','1938516YQGWNX','str','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','trim','5475699NsgMZM','appCode','roleName','7UkHqLI','2555kHAzzw','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','6629249HOJDVL','role','string','443kGyyYo','permit','10VqPzRk','3974zQoNaL','runtime','8267682OOdGkq'];a38_0x2282=function(){return _0xa2156d;};return a38_0x2282();}import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a38_0x63513a(0x188),'command':'dataset-get','description':a38_0x63513a(0x17c),'risk':'read','flags':[{'name':a38_0x63513a(0x185),'type':a38_0x63513a(0x186),'description':a38_0x63513a(0x183)}],async 'execute'(_0x3be682){const _0x369c4a=a38_0x63513a,_0x5917e1=_0x3be682[_0x369c4a(0x17b)]('role')[_0x369c4a(0x17d)]();if(!_0x5917e1)return{'ok':!![],'data':{'scope':'runtime','datasets':await listRuntimeDatasetRolePermits(_0x3be682[_0x369c4a(0x17f)])}};const _0x4155c5=await resolveRuntimeRoleRef(_0x3be682['appCode'],_0x5917e1);return{'ok':!![],'data':{'scope':_0x369c4a(0x18b),'role':{'id':_0x4155c5['id'],'roleName':_0x4155c5[_0x369c4a(0x180)],'roleType':_0x4155c5['roleType']},'datasets':await listRuntimeDatasetPermits(_0x3be682['appCode'],_0x4155c5['id'])}};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitDatasetSet: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a39_0x7e8486=a39_0x1846;(function(_0x305b88,_0x429abd){const _0x4937e7=a39_0x1846,_0x49a8ef=_0x305b88();while(!![]){try{const _0x2009b5=parseInt(_0x4937e7(0xea))/0x1+-parseInt(_0x4937e7(0x105))/0x2*(parseInt(_0x4937e7(0x11b))/0x3)+-parseInt(_0x4937e7(0xf2))/0x4*(-parseInt(_0x4937e7(0x10e))/0x5)+-parseInt(_0x4937e7(0x119))/0x6*(parseInt(_0x4937e7(0xe5))/0x7)+parseInt(_0x4937e7(0x106))/0x8+-parseInt(_0x4937e7(0xf1))/0x9*(parseInt(_0x4937e7(0xf5))/0xa)+-parseInt(_0x4937e7(0xe8))/0xb*(parseInt(_0x4937e7(0x11c))/0xc);if(_0x2009b5===_0x429abd)break;else _0x49a8ef['push'](_0x49a8ef['shift']());}catch(_0x2c3099){_0x49a8ef['push'](_0x49a8ef['shift']());}}}(a39_0x2729,0x68489));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';function a39_0x1846(_0x40d7c1,_0x34fffc){_0x40d7c1=_0x40d7c1-0xe1;const _0x272903=a39_0x2729();let _0x1846d2=_0x272903[_0x40d7c1];return _0x1846d2;}import{CliErrors}from'../../errors.js';function a39_0x2729(){const _0x4b2945=['312wClSVg','find','length','string','join','--actions','str','\x20already\x20reflects\x20','3717553eZfJYH','permitList','Runtime\x20dataset\x20','51007XczaNM','before','617492icTpbT','bool','dataPermitList','DATA_DETAIL','permitId','\x20does\x20not\x20expose\x20','DATA_UPDATE','1629xCYPWu','1450088gywthV','appCode','includes','7310FENSET','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','toUpperCase','DATA_EXPORT','resourceType','Comma-separated\x20runtime\x20dataset\x20codes','\x20for\x20role\x20','datasets','roles','Comma-separated\x20actions:\x20','after','revoke','--datasets','\x20was\x20not\x20found.','datasetCodes','DATA_CREATE','14dZpqmc','1994768cWvOBO','datasetCode','\x20selected\x20runtime\x20dataset\x20actions','changed','role','filter','dataset-set','validation','5gKdusn','/client/permit/resource/batch-save-dataset','Dataset\x20','grant','DATA_ROW','map','build','push','operation','dataset-','rolePermit','6kutAeW','Preview:\x20','7827eMpnFc'];a39_0x2729=function(){return _0x4b2945;};return a39_0x2729();}import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a39_0x7e8486(0x104),a39_0x7e8486(0xf0),'DATA_DELETE',a39_0x7e8486(0xed),a39_0x7e8486(0xf8),a39_0x7e8486(0x112)],DATASETS_FLAG={'name':a39_0x7e8486(0xfc),'type':a39_0x7e8486(0x11f),'required':!![],'description':a39_0x7e8486(0xfa)},ACTIONS_FLAG={'name':'actions','type':a39_0x7e8486(0x11f),'required':!![],'description':a39_0x7e8486(0xfe)+DATA_ACTIONS[a39_0x7e8486(0xe1)](',\x20')};async function prepare(_0x58758c){const _0x3a1275=a39_0x7e8486;await assertRuntimePermissionManager(_0x58758c[_0x3a1275(0xf3)]);const _0xf70f90=assertGrantOrRevoke(_0x58758c['bool'](_0x3a1275(0x111)),_0x58758c['bool'](_0x3a1275(0x100))),_0x278c4d=await resolveRuntimeRoleRef(_0x58758c[_0x3a1275(0xf3)],_0x58758c[_0x3a1275(0xe3)](_0x3a1275(0x10a)));assertRuntimePermitRoleConfigurable(_0x278c4d);const _0x52512c=splitRefs(_0x58758c['str'](_0x3a1275(0xfc)),_0x3a1275(0x101)),_0x198f19=[...new Set(splitRefs(_0x58758c[_0x3a1275(0xe3)]('actions'),_0x3a1275(0xe2))[_0x3a1275(0x113)](_0x351b49=>_0x351b49[_0x3a1275(0xf7)]()))],_0x5638d2=_0x198f19[_0x3a1275(0x10b)](_0x121b9=>!DATA_ACTIONS[_0x3a1275(0xf4)](_0x121b9));if(_0x5638d2[_0x3a1275(0x11e)]>0x0)throw CliErrors[_0x3a1275(0x10d)]('Invalid\x20dataset\x20actions:\x20'+_0x5638d2[_0x3a1275(0xe1)](',\x20')+'.');const _0x3fdf63=await listRuntimeDatasetRolePermits(_0x58758c['appCode']),_0x4b58e9=await listRuntimePermitRoles(_0x58758c[_0x3a1275(0xf3)]),_0x6070a5=[],_0x44e7d9=[],_0x44b67e=[],_0x32b84d=[];for(const _0x235af8 of _0x52512c){const _0x35a0ce=_0x3fdf63[_0x3a1275(0x11d)](_0x9c1a2d=>_0x9c1a2d[_0x3a1275(0x107)]===_0x235af8);if(!_0x35a0ce)throw CliErrors['validation'](_0x3a1275(0xe7)+_0x235af8+_0x3a1275(0x102));for(const _0x5a9bca of _0x198f19){const _0x3851c5=_0x35a0ce[_0x3a1275(0xec)][_0x3a1275(0x11d)](_0x438f44=>_0x438f44[_0x3a1275(0xf9)]===_0x5a9bca);if(!_0x3851c5)throw CliErrors[_0x3a1275(0x10d)](_0x3a1275(0x110)+_0x235af8+_0x3a1275(0xef)+_0x5a9bca+'.');const _0x5e8fa8=applyRuntimeRolePermission(_0x3851c5[_0x3a1275(0x118)],_0x278c4d,_0x4b58e9,_0xf70f90);_0x44e7d9[_0x3a1275(0x115)]({'datasetCode':_0x235af8,'resourceType':_0x5a9bca,'rolePermit':_0x3851c5[_0x3a1275(0x118)]}),_0x44b67e[_0x3a1275(0x115)]({'datasetCode':_0x235af8,'resourceType':_0x5a9bca,'rolePermit':_0x5e8fa8['roles']}),_0x5e8fa8[_0x3a1275(0x109)]?_0x6070a5[_0x3a1275(0x115)]({..._0x3851c5[_0x3a1275(0xee)]!=null?{'id':_0x3851c5['permitId']}:{},'appCode':_0x58758c[_0x3a1275(0xf3)],'resourceCode':_0x235af8,'resourceType':_0x5a9bca,'resourceName':_0x3851c5['resourceName'],'rolePermit':_0x5e8fa8[_0x3a1275(0xfd)]}):_0x32b84d[_0x3a1275(0x115)](_0x235af8+'/'+_0x5a9bca+_0x3a1275(0xe4)+_0xf70f90+_0x3a1275(0xfb)+_0x278c4d['id']+'.');}}return{'operation':_0xf70f90,'role':_0x278c4d,'datasetCodes':_0x52512c,'actions':_0x198f19,'permitList':_0x6070a5,'before':_0x44e7d9,'after':_0x44b67e,'warnings':_0x32b84d};}export const permitDatasetSet={'service':'permit','command':a39_0x7e8486(0x10c),'description':a39_0x7e8486(0xf6),'risk':'high-risk-write','confirmationDescription':'授予或收回目标角色对指定数据集动作的权限;变更会影响该角色用户的数据操作能力。','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x2e73c3){const _0x3f9854=a39_0x7e8486;assertGrantOrRevoke(_0x2e73c3[_0x3f9854(0xeb)](_0x3f9854(0x111)),_0x2e73c3[_0x3f9854(0xeb)]('revoke'));},async 'dryRun'(_0x4d2baf){const _0x197f64=a39_0x7e8486,_0x131eba=await prepare(_0x4d2baf);return dryRun('POST',_0x197f64(0x10f))['body']({'appCode':_0x4d2baf[_0x197f64(0xf3)],'permitList':_0x131eba[_0x197f64(0xe6)]})['description'](_0x197f64(0x11a)+_0x131eba[_0x197f64(0x116)]+_0x197f64(0x108))[_0x197f64(0x114)]();},async 'execute'(_0xd1e34){const _0x4bbbe4=a39_0x7e8486,_0x523ec9=await prepare(_0xd1e34);return _0x523ec9['permitList']['length']>0x0&&await saveRuntimeDatasetRolePermits(_0xd1e34[_0x4bbbe4(0xf3)],_0x523ec9['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x4bbbe4(0x117)+_0x523ec9[_0x4bbbe4(0x116)],{'roleId':_0x523ec9['role']['id'],'datasetCodes':_0x523ec9[_0x4bbbe4(0x103)],'actions':_0x523ec9['actions']},_0x523ec9[_0x4bbbe4(0xe9)],_0x523ec9[_0x4bbbe4(0xff)],{'method':'POST','path':_0x4bbbe4(0x10f)},_0x523ec9['warnings'])};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitDefinitions: CommandDefinition[];
@@ -0,0 +1 @@
1
+ (function(_0x29098c,_0x2baa0a){const _0x3ba5b3=a40_0x2209,_0x1345a2=_0x29098c();while(!![]){try{const _0x3c4775=-parseInt(_0x3ba5b3(0x146))/0x1+parseInt(_0x3ba5b3(0x14e))/0x2*(parseInt(_0x3ba5b3(0x14b))/0x3)+-parseInt(_0x3ba5b3(0x147))/0x4*(-parseInt(_0x3ba5b3(0x14c))/0x5)+parseInt(_0x3ba5b3(0x145))/0x6*(parseInt(_0x3ba5b3(0x14a))/0x7)+parseInt(_0x3ba5b3(0x148))/0x8+parseInt(_0x3ba5b3(0x14f))/0x9+parseInt(_0x3ba5b3(0x14d))/0xa*(-parseInt(_0x3ba5b3(0x149))/0xb);if(_0x3c4775===_0x2baa0a)break;else _0x1345a2['push'](_0x1345a2['shift']());}catch(_0x19fb23){_0x1345a2['push'](_0x1345a2['shift']());}}}(a40_0x2428,0x349d8));function a40_0x2209(_0x4f476b,_0x57f127){_0x4f476b=_0x4f476b-0x145;const _0x242866=a40_0x2428();let _0x220959=_0x242866[_0x4f476b];return _0x220959;}function a40_0x2428(){const _0x2f2791=['658152FlpLYs','3143vYPaPE','202098sOjrit','816635CJrDFO','120wOMZQT','4GnYzTV','2604870CfCTue','978EhWDkn','42368LCTmSm','4WHicuX','2521504stmkjJ'];a40_0x2428=function(){return _0x2f2791;};return a40_0x2428();}import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitPageGet: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a41_0x51b103=a41_0x426d;(function(_0x5e9ae4,_0x12ae24){const _0x4ee5ef=a41_0x426d,_0x15d0cf=_0x5e9ae4();while(!![]){try{const _0x261661=-parseInt(_0x4ee5ef(0x192))/0x1*(-parseInt(_0x4ee5ef(0x18f))/0x2)+parseInt(_0x4ee5ef(0x18b))/0x3+-parseInt(_0x4ee5ef(0x194))/0x4+-parseInt(_0x4ee5ef(0x191))/0x5+parseInt(_0x4ee5ef(0x188))/0x6+-parseInt(_0x4ee5ef(0x18c))/0x7*(parseInt(_0x4ee5ef(0x18e))/0x8)+parseInt(_0x4ee5ef(0x18d))/0x9;if(_0x261661===_0x12ae24)break;else _0x15d0cf['push'](_0x15d0cf['shift']());}catch(_0x1f82e7){_0x15d0cf['push'](_0x15d0cf['shift']());}}}(a41_0xcb3f,0x9972e));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a41_0x426d(_0x46fb6e,_0x2a362c){_0x46fb6e=_0x46fb6e-0x188;const _0xcb3f37=a41_0xcb3f();let _0x426def=_0xcb3f37[_0x46fb6e];return _0x426def;}export const permitPageGet={'service':a41_0x51b103(0x189),'command':a41_0x51b103(0x190),'description':a41_0x51b103(0x193),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x15d186){const _0x58b121=a41_0x51b103,_0x4c1f0d=await getRuntimePagePermit(_0x15d186['num'](_0x58b121(0x18a)));return{'ok':!![],'data':{'scope':'runtime','page':projectRuntimePagePermit(_0x4c1f0d)}};}};function a41_0xcb3f(){const _0x1854fe=['permit','menu-id','219480ZJOhKN','474516tHtiEU','21918312NyXVPz','32elyZhg','647982fHCcpS','page-get','6018390lwWJiZ','1uOhglL','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','4400240NlQTiM','2225382kVPmxL'];a41_0xcb3f=function(){return _0x1854fe;};return a41_0xcb3f();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitPageSet: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a42_0x437ee1=a42_0xc87b;(function(_0x79759,_0x4ae3a2){const _0xbf9d4a=a42_0xc87b,_0x15a8c9=_0x79759();while(!![]){try{const _0x1e5eea=parseInt(_0xbf9d4a(0x1fc))/0x1*(-parseInt(_0xbf9d4a(0x1f5))/0x2)+parseInt(_0xbf9d4a(0x1f7))/0x3*(parseInt(_0xbf9d4a(0x1f9))/0x4)+parseInt(_0xbf9d4a(0x1fe))/0x5+-parseInt(_0xbf9d4a(0x20d))/0x6*(parseInt(_0xbf9d4a(0x20f))/0x7)+-parseInt(_0xbf9d4a(0x1fa))/0x8+-parseInt(_0xbf9d4a(0x20c))/0x9*(parseInt(_0xbf9d4a(0x203))/0xa)+-parseInt(_0xbf9d4a(0x201))/0xb*(-parseInt(_0xbf9d4a(0x206))/0xc);if(_0x1e5eea===_0x4ae3a2)break;else _0x15a8c9['push'](_0x15a8c9['shift']());}catch(_0x593ad8){_0x15a8c9['push'](_0x15a8c9['shift']());}}}(a42_0x3abc,0x81d92));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(_0x4f47f4){const _0x34d116=a42_0xc87b;await assertRuntimePermissionManager(_0x4f47f4[_0x34d116(0x20b)]);const _0x1ac9f4=_0x4f47f4['num'](_0x34d116(0x209)),_0x34fac7=await getRuntimePagePermit(_0x1ac9f4);if(_0x34fac7[_0x34d116(0x20b)]&&_0x34fac7[_0x34d116(0x20b)]!==_0x4f47f4[_0x34d116(0x20b)])throw CliErrors['validation']('Menu\x20'+_0x1ac9f4+_0x34d116(0x207)+_0x4f47f4[_0x34d116(0x20b)]+'.');const _0x333d71=structuredClone(_0x34fac7),_0x2b0565=[];for(const _0xf7e272 of PAGE_SLOT_SPECS){if(_0x4f47f4[_0x34d116(0x1f8)](_0xf7e272['flag'])===undefined)continue;const _0x3eb589=_0x34fac7[_0xf7e272[_0x34d116(0x202)]];if(!_0x3eb589)throw CliErrors[_0x34d116(0x1f3)]('Page\x20menu\x20'+_0x1ac9f4+_0x34d116(0x205)+_0xf7e272[_0x34d116(0x202)]+'.');_0x3eb589[_0x34d116(0x211)]=await resolveRuntimePermitRoles(_0x4f47f4[_0x34d116(0x20b)],splitRefs(_0x4f47f4[_0x34d116(0x200)](_0xf7e272[_0x34d116(0x1f8)]),'--'+_0xf7e272['flag']),_0xf7e272['allowSelf']),_0x2b0565[_0x34d116(0x210)](_0xf7e272['key']);}if(_0x2b0565[_0x34d116(0x216)]===0x0)throw CliErrors[_0x34d116(0x1f3)](_0x34d116(0x1fb));return{'menuId':_0x1ac9f4,'page':_0x34fac7,'before':_0x333d71,'slots':_0x2b0565};}export const permitPageSet={'service':'permit','command':a42_0x437ee1(0x1f6),'description':a42_0x437ee1(0x1fd),'risk':'high-risk-write','confirmationDescription':a42_0x437ee1(0x204),'flags':[MENU_ID_FLAG,...PAGE_ROLE_FLAGS],async 'dryRun'(_0x453a60){const _0x37f9ac=a42_0x437ee1,_0xc3755f=await prepare(_0x453a60);return dryRun(_0x37f9ac(0x1f4),'/client/permit/page/save')[_0x37f9ac(0x208)](_0xc3755f[_0x37f9ac(0x213)])[_0x37f9ac(0x214)](_0x37f9ac(0x20e)+_0xc3755f[_0x37f9ac(0x212)]['join'](',\x20'))[_0x37f9ac(0x20a)]();},async 'execute'(_0xbb6d6c){const _0x44f57f=a42_0x437ee1,_0x3a18e6=await prepare(_0xbb6d6c),_0x36d827=await saveRuntimePagePermit(_0x3a18e6[_0x44f57f(0x213)]);return{'ok':!![],'data':runtimePermitWriteResult('page-set',{'menuId':_0x3a18e6[_0x44f57f(0x215)],'slots':_0x3a18e6[_0x44f57f(0x212)]},projectRuntimePagePermit(_0x3a18e6[_0x44f57f(0x1ff)]),projectRuntimePagePermit(_0x36d827),{'method':_0x44f57f(0x1f4),'path':'/client/permit/page/save'})};}};function a42_0xc87b(_0x13c653,_0x16a89e){_0x13c653=_0x13c653-0x1f3;const _0x3abc14=a42_0x3abc();let _0xc87b88=_0x3abc14[_0x13c653];return _0xc87b88;}function a42_0x3abc(){const _0x148960=['str','22070059urhPgh','key','290uZpLpP','修改指定运行页面的角色权限槽位;未获授权的用户可能无法查看页面或执行数据操作。','\x20does\x20not\x20expose\x20','12EDniBw','\x20does\x20not\x20belong\x20to\x20app\x20','body','menu-id','build','appCode','204705XEgWqw','2796rXJCZp','Preview:\x20update\x20page\x20permission\x20slots\x20','15533eGLPvN','push','rolePermit','slots','page','description','menuId','length','validation','POST','2634tfxCrC','page-set','63SfxuFD','flag','142536HGPAyP','307096gSwGFu','Pass\x20at\x20least\x20one\x20page\x20role\x20flag\x20to\x20update.','639YOHiBa','Set\x20selected\x20runtime\x20page\x20permission\x20slots','1753920ZviFBj','before'];a42_0x3abc=function(){return _0x148960;};return a42_0x3abc();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitRoleMenusSet: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a43_0xb05171=a43_0x5167;(function(_0xba514a,_0x14332a){const _0x441b82=a43_0x5167,_0x2b1226=_0xba514a();while(!![]){try{const _0x5210ae=-parseInt(_0x441b82(0xc4))/0x1*(-parseInt(_0x441b82(0xb3))/0x2)+parseInt(_0x441b82(0xd3))/0x3+parseInt(_0x441b82(0xc0))/0x4+-parseInt(_0x441b82(0xb7))/0x5+parseInt(_0x441b82(0xbb))/0x6*(-parseInt(_0x441b82(0xbc))/0x7)+parseInt(_0x441b82(0xc8))/0x8*(-parseInt(_0x441b82(0xc9))/0x9)+parseInt(_0x441b82(0xcd))/0xa*(parseInt(_0x441b82(0xc5))/0xb);if(_0x5210ae===_0x14332a)break;else _0x2b1226['push'](_0x2b1226['shift']());}catch(_0x21d393){_0x2b1226['push'](_0x2b1226['shift']());}}}(a43_0x2a6f,0x583a1));import{listRuntimeMenuRolePermits,listRuntimePermitRoles,saveRuntimeMenuRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a43_0x5167(_0x1fe80e,_0x257cc7){_0x1fe80e=_0x1fe80e-0xa9;const _0x2a6f87=a43_0x2a6f();let _0x516741=_0x2a6f87[_0x1fe80e];return _0x516741;}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,flattenRuntimeMenuRolePermits,GRANT_FLAG,menuPermitDto,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const MENUS_FLAG={'name':a43_0xb05171(0xae),'type':a43_0xb05171(0xc2),'required':!![],'description':a43_0xb05171(0xb9)};async function prepare(_0x54a6c9){const _0x302db1=a43_0xb05171;await assertRuntimePermissionManager(_0x54a6c9['appCode']);const _0x1c0d60=assertGrantOrRevoke(_0x54a6c9[_0x302db1(0xd7)](_0x302db1(0xc6)),_0x54a6c9[_0x302db1(0xd7)](_0x302db1(0xd4))),_0x49b255=await resolveRuntimeRoleRef(_0x54a6c9[_0x302db1(0xd8)],_0x54a6c9['str'](_0x302db1(0xd0)));assertRuntimePermitRoleConfigurable(_0x49b255);const _0x1e6717=[...new Set(splitRefs(_0x54a6c9[_0x302db1(0xc3)]('menus'),_0x302db1(0xb4))[_0x302db1(0xaf)](_0x1f3a11=>{const _0x3c1a5e=_0x302db1,_0x50e890=Number(_0x1f3a11);if(!/^\d+$/['test'](_0x1f3a11)||!Number['isSafeInteger'](_0x50e890)||_0x50e890<=0x0)throw CliErrors[_0x3c1a5e(0xc1)]('Invalid\x20runtime\x20menu\x20ID:\x20'+_0x1f3a11+'.');return _0x50e890;}))],_0x1f5f2f=flattenRuntimeMenuRolePermits(await listRuntimeMenuRolePermits(_0x54a6c9['appCode'])),_0x436e8c=await listRuntimePermitRoles(_0x54a6c9['appCode']),_0x4173d0=[],_0x426590=[],_0x22ac20=[],_0x49b6d9=[];for(const _0x117097 of _0x1e6717){const _0x5dacf8=_0x1f5f2f['find'](_0x42c028=>_0x42c028['id']===_0x117097);if(!_0x5dacf8)throw CliErrors[_0x302db1(0xc1)](_0x302db1(0xbf)+_0x117097+_0x302db1(0xa9));const _0x52b861=applyRuntimeRolePermission(_0x5dacf8[_0x302db1(0xb0)],_0x49b255,_0x436e8c,_0x1c0d60);_0x426590[_0x302db1(0xca)]({'menuId':_0x117097,'rolePermit':_0x5dacf8[_0x302db1(0xb0)]}),_0x22ac20[_0x302db1(0xca)]({'menuId':_0x117097,'rolePermit':_0x52b861[_0x302db1(0xd1)]});if(_0x52b861[_0x302db1(0xcb)])_0x4173d0[_0x302db1(0xca)](menuPermitDto(_0x54a6c9[_0x302db1(0xd8)],_0x5dacf8,_0x52b861[_0x302db1(0xd1)]));else _0x49b6d9[_0x302db1(0xca)]('Runtime\x20menu\x20'+_0x117097+_0x302db1(0xcf)+_0x1c0d60+_0x302db1(0xab)+_0x49b255['id']+'.');}return{'operation':_0x1c0d60,'role':_0x49b255,'menuIds':_0x1e6717,'permitList':_0x4173d0,'before':_0x426590,'after':_0x22ac20,'warnings':_0x49b6d9};}function a43_0x2a6f(){const _0x31321a=['\x20for\x20role\x20','high-risk-write','warnings','menus','map','rolePermit','/client/permit/resource/batch-save-menu','body','48GAnKlx','--menus','POST','role-menus-set','2002775byBJVS','operation','Comma-separated\x20runtime\x20menu\x20IDs','length','12TajLPl','242494biMjoI','permitList','Grant\x20or\x20revoke\x20selected\x20runtime\x20menus\x20for\x20one\x20role','Runtime\x20menu\x20','2842876GbrHSg','validation','string','str','18017bymnAl','11WDjrZb','grant','build','1587656hnIaiY','27ruPcMP','push','changed','permit','1501070DiNfJO','\x20selected\x20runtime\x20menus','\x20already\x20reflects\x20','role','roles','after','400059ekcbwu','revoke','授予或收回目标角色对指定运行菜单的访问权限;变更会影响该角色用户的菜单可见性。','menu-','bool','appCode','\x20was\x20not\x20found.','Preview:\x20'];a43_0x2a6f=function(){return _0x31321a;};return a43_0x2a6f();}export const permitRoleMenusSet={'service':a43_0xb05171(0xcc),'command':a43_0xb05171(0xb6),'description':a43_0xb05171(0xbe),'risk':a43_0xb05171(0xac),'confirmationDescription':a43_0xb05171(0xd5),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG],async 'validate'(_0x4f5dae){const _0x462cd0=a43_0xb05171;assertGrantOrRevoke(_0x4f5dae['bool']('grant'),_0x4f5dae['bool'](_0x462cd0(0xd4)));},async 'dryRun'(_0x128353){const _0x412202=a43_0xb05171,_0x540b4c=await prepare(_0x128353);return dryRun('POST',_0x412202(0xb1))[_0x412202(0xb2)]({'appCode':_0x128353[_0x412202(0xd8)],'permitList':_0x540b4c[_0x412202(0xbd)]})['description'](_0x412202(0xaa)+_0x540b4c[_0x412202(0xb8)]+_0x412202(0xce))[_0x412202(0xc7)]();},async 'execute'(_0x2c4c8f){const _0x270f29=a43_0xb05171,_0x131739=await prepare(_0x2c4c8f);return _0x131739[_0x270f29(0xbd)][_0x270f29(0xba)]>0x0&&await saveRuntimeMenuRolePermits(_0x2c4c8f[_0x270f29(0xd8)],_0x131739[_0x270f29(0xbd)]),{'ok':!![],'data':runtimePermitWriteResult(_0x270f29(0xd6)+_0x131739[_0x270f29(0xb8)],{'roleId':_0x131739[_0x270f29(0xd0)]['id'],'menuIds':_0x131739['menuIds']},_0x131739['before'],_0x131739[_0x270f29(0xd2)],{'method':_0x270f29(0xb5),'path':_0x270f29(0xb1)},_0x131739[_0x270f29(0xad)])};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitRoleMenus: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a44_0x15001d=a44_0x210a;(function(_0x133f5f,_0x3bfbc9){const _0x4cb2d2=a44_0x210a,_0x3b2739=_0x133f5f();while(!![]){try{const _0x3457fd=parseInt(_0x4cb2d2(0x1f1))/0x1+-parseInt(_0x4cb2d2(0x1f2))/0x2+-parseInt(_0x4cb2d2(0x1f8))/0x3*(-parseInt(_0x4cb2d2(0x1f4))/0x4)+parseInt(_0x4cb2d2(0x200))/0x5*(parseInt(_0x4cb2d2(0x1f5))/0x6)+parseInt(_0x4cb2d2(0x1f3))/0x7*(-parseInt(_0x4cb2d2(0x1f0))/0x8)+-parseInt(_0x4cb2d2(0x1ff))/0x9*(parseInt(_0x4cb2d2(0x1f7))/0xa)+parseInt(_0x4cb2d2(0x1fb))/0xb;if(_0x3457fd===_0x3bfbc9)break;else _0x3b2739['push'](_0x3b2739['shift']());}catch(_0x4b8cb0){_0x3b2739['push'](_0x3b2739['shift']());}}}(a44_0x1e1b,0xdc030));function a44_0x210a(_0xc02558,_0x39d5d9){_0xc02558=_0xc02558-0x1f0;const _0x1e1b1a=a44_0x1e1b();let _0x210a42=_0x1e1b1a[_0xc02558];return _0x210a42;}import{getRuntimeRoleMenuResources}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a44_0x1e1b(){const _0x46d3ed=['24120ZnThge','1570281wvaDwv','runtime','roleName','27674999FVHMpf','str','roleType','permit','4797KDEUHD','4110nFXmFs','read','11207696EQWLHV','106866arSmyk','425576PBOCiK','7njxBbn','4QnGRMI','4776ZsstPn','Show\x20evaluated\x20runtime\x20menu\x20access\x20for\x20one\x20role'];a44_0x1e1b=function(){return _0x46d3ed;};return a44_0x1e1b();}import{ROLE_REF_FLAG}from'../../commands/permit/shared.js';export const permitRoleMenus={'service':a44_0x15001d(0x1fe),'command':'role-menus','description':a44_0x15001d(0x1f6),'risk':a44_0x15001d(0x201),'flags':[ROLE_REF_FLAG],async 'execute'(_0x3e41e2){const _0x3ad3db=a44_0x15001d,_0x44df4d=await resolveRuntimeRoleRef(_0x3e41e2['appCode'],_0x3e41e2[_0x3ad3db(0x1fc)]('role')),_0xe97299=await getRuntimeRoleMenuResources(_0x3e41e2['appCode'],_0x44df4d['id']);return{'ok':!![],'data':{'scope':_0x3ad3db(0x1f9),'role':{'id':_0x44df4d['id'],'roleName':_0x44df4d[_0x3ad3db(0x1fa)],'roleType':_0x44df4d[_0x3ad3db(0x1fd)]},'menus':_0xe97299}};}};
@@ -0,0 +1,52 @@
1
+ import { type RuntimeAppRole, type RuntimeMenuRolePermitNode, type RuntimePagePermit, type RuntimePermitRole, type RuntimeResourcePermit } from "../../core/api-client.js";
2
+ import type { FlagDef } from "../../framework/types.js";
3
+ export declare const MENU_ID_FLAG: FlagDef;
4
+ export declare const ROLE_REF_FLAG: FlagDef;
5
+ export declare const GRANT_FLAG: FlagDef;
6
+ export declare const REVOKE_FLAG: FlagDef;
7
+ export declare const PAGE_SLOT_SPECS: readonly [{
8
+ readonly flag: "menu-roles";
9
+ readonly key: "menuPermit";
10
+ readonly allowSelf: false;
11
+ }, {
12
+ readonly flag: "create-roles";
13
+ readonly key: "dataCreate";
14
+ readonly allowSelf: false;
15
+ }, {
16
+ readonly flag: "update-roles";
17
+ readonly key: "dataUpdate";
18
+ readonly allowSelf: false;
19
+ }, {
20
+ readonly flag: "delete-roles";
21
+ readonly key: "dataDelete";
22
+ readonly allowSelf: false;
23
+ }, {
24
+ readonly flag: "detail-roles";
25
+ readonly key: "dataDetail";
26
+ readonly allowSelf: false;
27
+ }, {
28
+ readonly flag: "export-roles";
29
+ readonly key: "dataExport";
30
+ readonly allowSelf: false;
31
+ }, {
32
+ readonly flag: "row-roles";
33
+ readonly key: "dataPermit";
34
+ readonly allowSelf: true;
35
+ }];
36
+ export declare const PAGE_ROLE_FLAGS: FlagDef[];
37
+ export declare function splitRefs(value: string, label: string): string[];
38
+ export declare function assertGrantOrRevoke(grant: boolean, revoke: boolean): "grant" | "revoke";
39
+ export declare function resolveRuntimePermitRoles(appCode: string, refs: string[], allowSelf: boolean): Promise<RuntimePermitRole[]>;
40
+ export declare function assertRuntimePermissionManager(appCode: string): Promise<void>;
41
+ export declare function assertRuntimePermitRoleConfigurable(role: RuntimeAppRole): void;
42
+ export declare function applyRuntimeRolePermission(current: RuntimePermitRole[] | null | undefined, target: RuntimeAppRole, allRoles: RuntimePermitRole[], operation: "grant" | "revoke"): {
43
+ roles: RuntimePermitRole[] | null;
44
+ changed: boolean;
45
+ };
46
+ export declare function projectRuntimePagePermit(page: RuntimePagePermit): Record<string, unknown>;
47
+ export declare function flattenRuntimeMenuRolePermits(roots: RuntimeMenuRolePermitNode[]): RuntimeMenuRolePermitNode[];
48
+ export declare function runtimePermitWriteResult(operation: string, selector: Record<string, unknown>, before: unknown, after: unknown, backend: {
49
+ method: string;
50
+ path: string;
51
+ }, warnings?: string[]): Record<string, unknown>;
52
+ export declare function menuPermitDto(appCode: string, node: RuntimeMenuRolePermitNode, rolePermit: RuntimePermitRole[] | null): RuntimeResourcePermit;
@@ -0,0 +1 @@
1
+ const a45_0x52913b=a45_0x5c0f;function a45_0x33ea(){const _0x2bbbe5=['key','2164686AtTUIC','runtime','userId','Configure\x20USER,\x20CUSTOM,\x20or\x20an\x20applicable\x20special\x20role\x20instead.','6CcNYPp','menu-roles','2655BqHxEU','631108WrjYUE','detail-roles','row-roles','\x20has\x20full\x20runtime\x20access\x20and\x20cannot\x20be\x20a\x20resource\x20permission\x20target.','556WjToWJ','SELF','MENU','Ask\x20an\x20application\x20manager\x20to\x20perform\x20this\x20operation.','trim','Permission\x20role\x20\x22','SELF\x20is\x20only\x20valid\x20for\x20--row-roles.','resourceCode','dataCreate','Cannot\x20revoke\x20the\x20last\x20role\x20from\x20a\x20runtime\x20resource.','revoke','Runtime\x20menu\x20ID','13608wKRbpz','OWNER','find','validation','926871mZKAlw','30xSEzyZ','toUpperCase','ALL','map','rolePermit','isSafeInteger','\x22\x20was\x20not\x20found.','appCode','963DiOeFY','filter','roleName','ADMIN','dataExport','children','export-roles','userList','permitId','resourceType','Grant\x20the\x20selected\x20resources\x20to\x20the\x20role','menu-id','boolean','\x20must\x20contain\x20at\x20least\x20one\x20value.','datasetCode','some','values','delete-roles','menuId','1272708TwAlUf','label','roleType','pageId','Runtime\x20resource\x20permission\x20changes\x20require\x20an\x20ADMIN\x20or\x20OWNER\x20role.','30PRBygW','Use\x20a\x20role\x20ID\x20from\x20`lovrabet\x20role\x20list`.','270214ChmTjF','length','dataUpdate','Revoke\x20the\x20selected\x20resources\x20from\x20the\x20role','\x20runtime\x20role\x20','grant','menuPermit','flag','push','Comma-separated\x20runtime\x20role\x20IDs\x20or\x20names','39HwDwVz','string'];a45_0x33ea=function(){return _0x2bbbe5;};return a45_0x33ea();}(function(_0x5574d0,_0x5abbe5){const _0x4eec0c=a45_0x5c0f,_0x394038=_0x5574d0();while(!![]){try{const _0x53778a=parseInt(_0x4eec0c(0xd9))/0x1*(-parseInt(_0x4eec0c(0xc0))/0x2)+-parseInt(_0x4eec0c(0xb5))/0x3+parseInt(_0x4eec0c(0xbc))/0x4*(parseInt(_0x4eec0c(0xd1))/0x5)+-parseInt(_0x4eec0c(0xb9))/0x6*(parseInt(_0x4eec0c(0xf3))/0x7)+-parseInt(_0x4eec0c(0xcc))/0x8*(-parseInt(_0x4eec0c(0xbb))/0x9)+-parseInt(_0x4eec0c(0xf1))/0xa*(parseInt(_0x4eec0c(0xd0))/0xb)+-parseInt(_0x4eec0c(0xec))/0xc*(-parseInt(_0x4eec0c(0xfd))/0xd);if(_0x53778a===_0x5abbe5)break;else _0x394038['push'](_0x394038['shift']());}catch(_0x28b547){_0x394038['push'](_0x394038['shift']());}}}(a45_0x33ea,0x76a55));import{getLoginUserInfo,listRuntimePermitRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a45_0x52913b(0xe4),'type':'number','required':!![],'description':a45_0x52913b(0xcb)};export const ROLE_REF_FLAG={'name':'role','type':a45_0x52913b(0xfe),'required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};export const GRANT_FLAG={'name':a45_0x52913b(0xf8),'type':a45_0x52913b(0xe5),'description':a45_0x52913b(0xe3)};export const REVOKE_FLAG={'name':a45_0x52913b(0xca),'type':'boolean','description':a45_0x52913b(0xf6)};export const PAGE_SLOT_SPECS=[{'flag':a45_0x52913b(0xba),'key':a45_0x52913b(0xf9),'allowSelf':![]},{'flag':'create-roles','key':a45_0x52913b(0xc8),'allowSelf':![]},{'flag':'update-roles','key':a45_0x52913b(0xf5),'allowSelf':![]},{'flag':a45_0x52913b(0xea),'key':'dataDelete','allowSelf':![]},{'flag':a45_0x52913b(0xbd),'key':'dataDetail','allowSelf':![]},{'flag':a45_0x52913b(0xdf),'key':a45_0x52913b(0xdd),'allowSelf':![]},{'flag':a45_0x52913b(0xbe),'key':'dataPermit','allowSelf':!![]}];export const PAGE_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x413913=>({'name':_0x413913[a45_0x52913b(0xfa)],'type':'string','description':a45_0x52913b(0xfc)}));export function splitRefs(_0x428eb1,_0x5766a2){const _0x4c924f=a45_0x52913b,_0xf0eb7d=[...new Set(_0x428eb1['split'](',')[_0x4c924f(0xd4)](_0x2fe435=>_0x2fe435[_0x4c924f(0xc4)]())['filter'](Boolean))];if(_0xf0eb7d[_0x4c924f(0xf4)]===0x0)throw CliErrors['validation'](_0x5766a2+_0x4c924f(0xe6));return _0xf0eb7d;}export function assertGrantOrRevoke(_0xd09d0c,_0x535d8a){const _0x3ef673=a45_0x52913b;if(_0xd09d0c===_0x535d8a)throw CliErrors[_0x3ef673(0xcf)]('Pass\x20exactly\x20one\x20of\x20--grant\x20or\x20--revoke.');return _0xd09d0c?'grant':_0x3ef673(0xca);}function a45_0x5c0f(_0x1ad5c6,_0x88f171){_0x1ad5c6=_0x1ad5c6-0xb5;const _0x33eacf=a45_0x33ea();let _0x5c0f64=_0x33eacf[_0x1ad5c6];return _0x5c0f64;}function resolvePermitRole(_0x27bb26,_0x3ddb85){const _0x42ff84=a45_0x52913b,_0x50a0e9=_0x3ddb85['trim'](),_0x4b86d8=/^-?\d+$/['test'](_0x50a0e9)?_0x27bb26[_0x42ff84(0xda)](_0x5da00a=>_0x5da00a['id']===Number(_0x50a0e9)):_0x27bb26['filter'](_0x2aef0a=>_0x2aef0a[_0x42ff84(0xdb)]===_0x50a0e9||_0x2aef0a[_0x42ff84(0xee)]===_0x50a0e9[_0x42ff84(0xd2)]());if(_0x4b86d8[_0x42ff84(0xf4)]!==0x1)throw CliErrors[_0x42ff84(0xcf)](_0x4b86d8['length']===0x0?_0x42ff84(0xc5)+_0x50a0e9+_0x42ff84(0xd7):_0x42ff84(0xc5)+_0x50a0e9+'\x22\x20is\x20ambiguous.',_0x42ff84(0xf2));return _0x4b86d8[0x0];}export async function resolveRuntimePermitRoles(_0x1309e4,_0x310a40,_0xa7a8d1){const _0x32735b=a45_0x52913b,_0x50155=await listRuntimePermitRoles(_0x1309e4,{'needSelf':!![],'needPublic':!![]}),_0x5acb62=[...new Map(_0x310a40[_0x32735b(0xd4)](_0x44aa81=>resolvePermitRole(_0x50155,_0x44aa81))[_0x32735b(0xd4)](_0xad05b2=>[_0xad05b2['id'],_0xad05b2]))[_0x32735b(0xe9)]()],_0x173e11=_0x5acb62[_0x32735b(0xce)](_0x37dd02=>_0x37dd02[_0x32735b(0xee)]===_0x32735b(0xdc)||_0x37dd02[_0x32735b(0xee)]===_0x32735b(0xcd));if(_0x173e11)throw CliErrors['validation'](_0x173e11[_0x32735b(0xee)]+_0x32735b(0xbf),_0x32735b(0xb8));if(!_0xa7a8d1&&_0x5acb62[_0x32735b(0xe8)](_0x21a8f3=>_0x21a8f3[_0x32735b(0xee)]===_0x32735b(0xc1)))throw CliErrors[_0x32735b(0xcf)](_0x32735b(0xc6));return _0x5acb62;}export async function assertRuntimePermissionManager(_0x1d6fba){const _0x269841=a45_0x52913b,_0x24abd3=await getLoginUserInfo(),_0x22c135=_0x24abd3['userId']??_0x24abd3['id'],_0x310b8f=Number(_0x22c135);if(!Number[_0x269841(0xd6)](_0x310b8f)||_0x310b8f<=0x0)throw CliErrors['validation']('Cannot\x20resolve\x20the\x20current\x20AK\x20userId\x20for\x20permission\x20management.');const _0x33887a=await listRuntimeRoleUsers(_0x1d6fba),_0x4ddc95=_0x33887a[_0x269841(0xe8)](_0x2af7be=>(_0x2af7be[_0x269841(0xee)]===_0x269841(0xdc)||_0x2af7be['roleType']===_0x269841(0xcd))&&_0x2af7be[_0x269841(0xe0)]['some'](_0x1c2e92=>_0x1c2e92[_0x269841(0xb7)]===_0x310b8f));if(!_0x4ddc95)throw CliErrors[_0x269841(0xcf)](_0x269841(0xf0),_0x269841(0xc3));}export function assertRuntimePermitRoleConfigurable(_0x3650b3){const _0x379915=a45_0x52913b;if(_0x3650b3['roleType']==='ADMIN'||_0x3650b3[_0x379915(0xee)]===_0x379915(0xcd))throw CliErrors['validation']('Cannot\x20change\x20resource\x20permissions\x20for\x20'+_0x3650b3[_0x379915(0xee)]+_0x379915(0xf7)+_0x3650b3[_0x379915(0xdb)]+'.','ADMIN\x20and\x20OWNER\x20have\x20full\x20runtime\x20access;\x20configure\x20USER\x20or\x20CUSTOM\x20instead.');}function asPermitRole(_0x2055c9){const _0x15cbc6=a45_0x52913b;return{'id':_0x2055c9['id'],'roleName':_0x2055c9[_0x15cbc6(0xdb)],'roleType':_0x2055c9[_0x15cbc6(0xee)],'allowed':!![]};}export function applyRuntimeRolePermission(_0x5d60d3,_0x115a5a,_0x517e5a,_0x4da496){const _0x4e5ddc=a45_0x52913b,_0x4559e4=!_0x5d60d3||_0x5d60d3[_0x4e5ddc(0xf4)]===0x0,_0x4701ec=_0x5d60d3?.['some'](_0x30507e=>_0x30507e[_0x4e5ddc(0xee)]===_0x4e5ddc(0xd3))??![];if(_0x4da496===_0x4e5ddc(0xf8)&&(_0x4559e4||_0x4701ec))return{'roles':_0x5d60d3??null,'changed':![]};let _0x23daa4=_0x4559e4||_0x4701ec?_0x517e5a[_0x4e5ddc(0xda)](_0x1ffdde=>_0x1ffdde['id']>0x0):[..._0x5d60d3];const _0x5973bf=_0x23daa4[_0x4e5ddc(0xe8)](_0x200071=>_0x200071['id']===_0x115a5a['id']);if(_0x4da496==='grant'){if(_0x5973bf)return{'roles':_0x23daa4,'changed':![]};return _0x23daa4[_0x4e5ddc(0xfb)](asPermitRole(_0x115a5a)),{'roles':_0x23daa4,'changed':!![]};}if(!_0x5973bf)return{'roles':_0x23daa4,'changed':_0x4559e4||_0x4701ec};_0x23daa4=_0x23daa4[_0x4e5ddc(0xda)](_0x42d3d4=>_0x42d3d4['id']!==_0x115a5a['id']);if(_0x23daa4['length']===0x0)throw CliErrors[_0x4e5ddc(0xcf)](_0x4e5ddc(0xc9),'The\x20current\x20service\x20contract\x20does\x20not\x20persist\x20an\x20empty\x20rolePermit;\x20grant\x20another\x20role\x20first.');return{'roles':_0x23daa4,'changed':!![]};}export function projectRuntimePagePermit(_0x39fc2e){const _0x5b26c5=a45_0x52913b,_0x3851eb={'menuId':_0x39fc2e[_0x5b26c5(0xeb)],'pageId':_0x39fc2e[_0x5b26c5(0xef)],'appCode':_0x39fc2e[_0x5b26c5(0xd8)],'datasetCode':_0x39fc2e[_0x5b26c5(0xe7)]};for(const _0x16ca8b of PAGE_SLOT_SPECS){const _0x5c42e4=_0x39fc2e[_0x16ca8b[_0x5b26c5(0xff)]];_0x5c42e4&&(_0x3851eb[_0x16ca8b[_0x5b26c5(0xff)]]={'resourceCode':_0x5c42e4[_0x5b26c5(0xc7)],'resourceType':_0x5c42e4[_0x5b26c5(0xe2)],'roles':(_0x5c42e4[_0x5b26c5(0xd5)]??[])[_0x5b26c5(0xd4)](_0x48c828=>({'id':_0x48c828['id'],'roleName':_0x48c828[_0x5b26c5(0xdb)],'roleType':_0x48c828[_0x5b26c5(0xee)]}))});}return _0x3851eb;}export function flattenRuntimeMenuRolePermits(_0xee6fef){const _0x4b8fa6=[],_0x47221a=_0xec7a60=>{const _0xe19942=a45_0x5c0f;_0x4b8fa6[_0xe19942(0xfb)](_0xec7a60);for(const _0x13dc05 of _0xec7a60[_0xe19942(0xde)]??[])_0x47221a(_0x13dc05);};for(const _0x372578 of _0xee6fef)_0x47221a(_0x372578);return _0x4b8fa6;}export function runtimePermitWriteResult(_0x4296f0,_0x1c8cac,_0x44e31c,_0x19fedb,_0x22a535,_0x54a079=[]){const _0x4fecd0=a45_0x52913b;return{'operation':_0x4296f0,'scope':_0x4fecd0(0xb6),'selector':_0x1c8cac,'before':_0x44e31c,'after':_0x19fedb,'dryRun':![],'backend':_0x22a535,'warnings':_0x54a079};}export function menuPermitDto(_0x2f2fbf,_0x53c583,_0x5dc868){const _0x2fd7f0=a45_0x52913b;return{..._0x53c583[_0x2fd7f0(0xe1)]!=null?{'id':_0x53c583[_0x2fd7f0(0xe1)]}:{},'appCode':_0x2f2fbf,'menuId':_0x53c583['id'],'pageId':_0x53c583[_0x2fd7f0(0xef)]??null,'resourceCode':String(_0x53c583['id']),'resourceType':_0x2fd7f0(0xc2),'resourceName':_0x53c583[_0x2fd7f0(0xed)],'rolePermit':_0x5dc868};}