@lovrabet/lovrabet-cli 2.3.1-beta.3 → 2.3.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 (175) 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/init.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/notification/config-list.js +1 -1
  37. package/lib/commands/notification/index.js +1 -1
  38. package/lib/commands/notification/shared.js +1 -1
  39. package/lib/commands/ocr/index.js +1 -1
  40. package/lib/commands/permit/dataset-get.js +1 -1
  41. package/lib/commands/permit/dataset-set.js +1 -1
  42. package/lib/commands/permit/index.js +1 -1
  43. package/lib/commands/permit/page-get.js +1 -1
  44. package/lib/commands/permit/page-set.js +1 -1
  45. package/lib/commands/permit/role-menus-set.js +1 -1
  46. package/lib/commands/permit/role-menus.js +1 -1
  47. package/lib/commands/permit/shared.js +1 -1
  48. package/lib/commands/personal-bff/index.js +1 -1
  49. package/lib/commands/registry.js +1 -1
  50. package/lib/commands/role/create.js +1 -1
  51. package/lib/commands/role/delete.js +1 -1
  52. package/lib/commands/role/detail.js +1 -1
  53. package/lib/commands/role/index.js +1 -1
  54. package/lib/commands/role/list.js +1 -1
  55. package/lib/commands/role/shared.js +1 -1
  56. package/lib/commands/role/update.js +1 -1
  57. package/lib/commands/role/user-add.js +1 -1
  58. package/lib/commands/role/user-remove.js +1 -1
  59. package/lib/commands/schedule/index.js +1 -1
  60. package/lib/commands/schema.js +1 -1
  61. package/lib/commands/service/dynamic.js +1 -1
  62. package/lib/commands/service/function-name-adapter.js +1 -1
  63. package/lib/commands/service/index.js +1 -1
  64. package/lib/commands/service/registry.js +1 -1
  65. package/lib/commands/skill/commands/create.js +1 -1
  66. package/lib/commands/skill/commands/diagram.js +1 -1
  67. package/lib/commands/skill/commands/install.js +1 -1
  68. package/lib/commands/skill/commands/list.js +1 -1
  69. package/lib/commands/skill/commands/push.js +1 -1
  70. package/lib/commands/skill/commands/validate.js +1 -1
  71. package/lib/commands/skill/diagram.js +1 -1
  72. package/lib/commands/skill/flags.js +1 -1
  73. package/lib/commands/skill/index.js +1 -1
  74. package/lib/commands/skill/manifest-helpers.js +1 -1
  75. package/lib/commands/skill/push-execute.js +1 -1
  76. package/lib/commands/skill/push-flow-helpers.js +1 -1
  77. package/lib/commands/skill/push-retarget.js +1 -1
  78. package/lib/commands/skill/scopes.js +1 -1
  79. package/lib/commands/skill/summary.js +1 -1
  80. package/lib/commands/skill/templates.js +1 -1
  81. package/lib/commands/skill/validate.js +1 -1
  82. package/lib/commands/sql/detail.js +1 -1
  83. package/lib/commands/sql/exec.js +1 -1
  84. package/lib/commands/sql/index.js +1 -1
  85. package/lib/commands/update.js +1 -1
  86. package/lib/commands/user-account/bind.js +1 -1
  87. package/lib/commands/user-account/index.js +1 -1
  88. package/lib/commands/workspace/index.js +1 -1
  89. package/lib/config/domain-config.js +1 -1
  90. package/lib/config/schema.js +1 -1
  91. package/lib/constant/app.js +1 -1
  92. package/lib/constant/auth-mode.js +1 -1
  93. package/lib/constant/cli.js +1 -1
  94. package/lib/constant/defaults.js +1 -1
  95. package/lib/constant/distribution.js +1 -1
  96. package/lib/constant/domain.d.ts +3 -3
  97. package/lib/constant/domain.js +1 -1
  98. package/lib/constant/env.js +1 -1
  99. package/lib/constant/output.js +1 -1
  100. package/lib/constant/product.js +1 -1
  101. package/lib/constant/region.js +1 -1
  102. package/lib/constant/risk.js +1 -1
  103. package/lib/constant/url.js +1 -1
  104. package/lib/context.js +1 -1
  105. package/lib/core/api-client.d.ts +0 -16
  106. package/lib/core/api-client.js +1 -1
  107. package/lib/core/db-resolver.js +1 -1
  108. package/lib/core/kb-search-client.d.ts +30 -0
  109. package/lib/core/kb-search-client.js +1 -0
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/build-all-flags.js +1 -1
  113. package/lib/framework/dryrun.js +1 -1
  114. package/lib/framework/flags.js +1 -1
  115. package/lib/framework/help.js +1 -1
  116. package/lib/framework/index.js +1 -1
  117. package/lib/framework/output.js +1 -1
  118. package/lib/framework/preparse.js +1 -1
  119. package/lib/framework/rate-limit.js +1 -1
  120. package/lib/framework/raw-flags.js +1 -1
  121. package/lib/framework/response.js +1 -1
  122. package/lib/framework/runner-confirmation.js +1 -1
  123. package/lib/framework/runner-error.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/service-order.js +1 -1
  127. package/lib/framework/types.d.ts +2 -0
  128. package/lib/framework/types.js +1 -1
  129. package/lib/generated/build-info.d.ts +4 -4
  130. package/lib/generated/build-info.js +1 -1
  131. package/lib/generated/official-routing.js +1 -1
  132. package/lib/generated/routing-contract.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/postinstall.js +1 -1
  135. package/lib/runtime/confirmation.js +1 -1
  136. package/lib/runtime/event.js +1 -1
  137. package/lib/runtime/index.js +1 -1
  138. package/lib/runtime/queue.js +1 -1
  139. package/lib/runtime/resolve.js +1 -1
  140. package/lib/skills/builtin-skill.js +1 -1
  141. package/lib/skills/npx-skills-add.js +1 -1
  142. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  143. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  144. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  145. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  146. package/lib/skills/runtime-skill-sync/links.js +1 -1
  147. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  148. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  149. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  150. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  151. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  152. package/lib/skills/runtime-skill-sync/push.js +1 -1
  153. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  154. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  155. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  156. package/lib/skills/runtime-skill-sync.js +1 -1
  157. package/lib/skills/skill-presence.js +1 -1
  158. package/lib/utils/access-key-redaction.js +1 -1
  159. package/lib/utils/apply-jq-filter.js +1 -1
  160. package/lib/utils/cli-version-check.js +1 -1
  161. package/lib/utils/cli-version-policy.js +1 -1
  162. package/lib/utils/logger.js +1 -1
  163. package/lib/utils/lossless-json.js +1 -1
  164. package/lib/utils/params.js +1 -1
  165. package/lib/utils/platform.js +1 -1
  166. package/lib/utils/update-notice.js +1 -1
  167. package/lib/utils/version.js +1 -1
  168. package/lib/utils/write-cli-side-channel.js +1 -1
  169. package/package.json +1 -1
  170. package/skills/lovrabet/SKILL.md +2 -2
  171. package/skills/lovrabet/references/lovrabet-config-commands.md +3 -1
  172. package/skills/lovrabet/references/lovrabet-config.md +2 -2
  173. package/skills/lovrabet/references/lovrabet-doctor.md +2 -0
  174. package/skills/lovrabet/references/lovrabet-kb-workflow.md +3 -1
  175. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0xc956cf,_0x4b7f6a){const _0x57490d=a27_0x5a30,_0x471e75=_0xc956cf();while(!![]){try{const _0xe2ff09=parseInt(_0x57490d(0x1f8))/0x1*(parseInt(_0x57490d(0x1fe))/0x2)+-parseInt(_0x57490d(0x1fd))/0x3*(parseInt(_0x57490d(0x1fc))/0x4)+-parseInt(_0x57490d(0x1f4))/0x5*(parseInt(_0x57490d(0x1f9))/0x6)+parseInt(_0x57490d(0x1f5))/0x7+parseInt(_0x57490d(0x1fa))/0x8*(parseInt(_0x57490d(0x1f7))/0x9)+-parseInt(_0x57490d(0x1ff))/0xa*(parseInt(_0x57490d(0x1fb))/0xb)+parseInt(_0x57490d(0x1f6))/0xc;if(_0xe2ff09===_0x4b7f6a)break;else _0x471e75['push'](_0x471e75['shift']());}catch(_0x445346){_0x471e75['push'](_0x471e75['shift']());}}}(a27_0x1310,0x909a1));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a27_0x1310(){const _0x4e4206=['881150MgAuRx','15FoJchy','2874620qVGrMg','2219472YsrMUt','16893NhKTEH','1NxWaKg','535410pOJfOI','2080vzCPOo','33nalJbf','8uZfprr','1646751YtEFQd','2277074hLSBDn'];a27_0x1310=function(){return _0x4e4206;};return a27_0x1310();}function a27_0x5a30(_0x1e0f51,_0x227f80){_0x1e0f51=_0x1e0f51-0x1f4;const _0x1310b8=a27_0x1310();let _0x5a306b=_0x1310b8[_0x1e0f51];return _0x5a306b;}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ function a27_0x5358(_0xe1f38e,_0x391748){_0xe1f38e=_0xe1f38e-0xad;const _0x157736=a27_0x1577();let _0x53583b=_0x157736[_0xe1f38e];return _0x53583b;}(function(_0x375c00,_0x2a7fb6){const _0x1d38f2=a27_0x5358,_0x439dc2=_0x375c00();while(!![]){try{const _0x48edc2=-parseInt(_0x1d38f2(0xb5))/0x1*(parseInt(_0x1d38f2(0xad))/0x2)+parseInt(_0x1d38f2(0xb0))/0x3+parseInt(_0x1d38f2(0xb1))/0x4*(parseInt(_0x1d38f2(0xb2))/0x5)+-parseInt(_0x1d38f2(0xae))/0x6+parseInt(_0x1d38f2(0xb3))/0x7+-parseInt(_0x1d38f2(0xaf))/0x8+parseInt(_0x1d38f2(0xb4))/0x9;if(_0x48edc2===_0x2a7fb6)break;else _0x439dc2['push'](_0x439dc2['shift']());}catch(_0x3d7b68){_0x439dc2['push'](_0x439dc2['shift']());}}}(a27_0x1577,0x5bbbd));import{datasetList}from'../../commands/dataset/list.js';function a27_0x1577(){const _0x44f504=['4188009OptSRu','1843326gzQXgd','8419sFPNdz','162xPoiQe','3180042htNbkn','2429920Ekepzc','1151193kVakUI','1284hXvlbm','10975fhDauA'];a27_0x1577=function(){return _0x44f504;};return a27_0x1577();}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
@@ -1 +1 @@
1
- function a28_0x56dd(){const _0x1c9d4c=['description','source','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','232205qlXwsv','datasetKey','allFields','code','76ceKgud','string','1655298TwlzLI','9198010JWLyXR','8GdatFT','28702956aajZAk','map','list','read','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','name','1062181ivBmGc','3393502cpJJJU','str','dbtableConfig','1687JLdEUV','tableName','pkField','trim','22KqGoZD','3QZhMRy','21522WCLaOP','appCode'];a28_0x56dd=function(){return _0x1c9d4c;};return a28_0x56dd();}const a28_0x5ae78e=a28_0x46b6;(function(_0x3d0ec8,_0x4c5864){const _0x531ccb=a28_0x46b6,_0x1142c3=_0x3d0ec8();while(!![]){try{const _0x195e72=-parseInt(_0x531ccb(0x194))/0x1+-parseInt(_0x531ccb(0x195))/0x2*(-parseInt(_0x531ccb(0x17f))/0x3)+-parseInt(_0x531ccb(0x189))/0x4*(parseInt(_0x531ccb(0x185))/0x5)+-parseInt(_0x531ccb(0x180))/0x6*(-parseInt(_0x531ccb(0x198))/0x7)+parseInt(_0x531ccb(0x18d))/0x8*(-parseInt(_0x531ccb(0x18b))/0x9)+-parseInt(_0x531ccb(0x18c))/0xa*(parseInt(_0x531ccb(0x17e))/0xb)+parseInt(_0x531ccb(0x18e))/0xc;if(_0x195e72===_0x4c5864)break;else _0x1142c3['push'](_0x1142c3['shift']());}catch(_0x5108ae){_0x1142c3['push'](_0x1142c3['shift']());}}}(a28_0x56dd,0xf07d7));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x46b6(_0x403696,_0x58b93e){_0x403696=_0x403696-0x17d;const _0x56dd1d=a28_0x56dd();let _0x46b6d9=_0x56dd1d[_0x403696];return _0x46b6d9;}export const datasetList={'service':'dataset','command':a28_0x5ae78e(0x190),'description':a28_0x5ae78e(0x184),'risk':a28_0x5ae78e(0x191),'flags':[{'name':a28_0x5ae78e(0x193),'type':a28_0x5ae78e(0x18a),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a28_0x5ae78e(0x192)}],async 'execute'(_0xd646d4){const _0x1e540f=a28_0x5ae78e,_0x1ab5b0=_0xd646d4[_0x1e540f(0x196)](_0x1e540f(0x193)),_0x29b31b=_0xd646d4[_0x1e540f(0x196)](_0x1e540f(0x188)),_0x2999a6=await listDatasets(_0xd646d4[_0x1e540f(0x181)],{..._0x1ab5b0&&{'name':_0x1ab5b0},..._0x29b31b&&{'code':_0x29b31b}});return{'ok':!![],'data':{'total':_0x2999a6['length'],'datasets':_0x2999a6[_0x1e540f(0x18f)](_0x49a468=>{const _0x27ad67=_0x1e540f,_0x3084a2=_0x49a468[_0x27ad67(0x197)]??{};return{'id':_0x49a468['id'],'code':_0x49a468[_0x27ad67(0x188)],'name':_0x49a468[_0x27ad67(0x193)],'source':_0x49a468[_0x27ad67(0x183)],'description':_0x49a468[_0x27ad67(0x182)],'table':_0x3084a2[_0x27ad67(0x199)],'datasetKey':_0x3084a2[_0x27ad67(0x186)],'pk':_0x3084a2[_0x27ad67(0x19a)],'fields':_0x3084a2[_0x27ad67(0x187)]?_0x3084a2['allFields']['split'](',')[_0x27ad67(0x18f)](_0x4a0090=>_0x4a0090[_0x27ad67(0x17d)]()):[]};})}};}};
1
+ function a28_0x5629(_0x4c0bbc,_0x294393){_0x4c0bbc=_0x4c0bbc-0x185;const _0x5a32d7=a28_0x5a32();let _0x56297d=_0x5a32d7[_0x4c0bbc];return _0x56297d;}const a28_0x23c858=a28_0x5629;(function(_0x3219f6,_0x4f53a3){const _0x15212e=a28_0x5629,_0x55e878=_0x3219f6();while(!![]){try{const _0x1797d4=-parseInt(_0x15212e(0x18c))/0x1*(-parseInt(_0x15212e(0x186))/0x2)+parseInt(_0x15212e(0x198))/0x3*(-parseInt(_0x15212e(0x190))/0x4)+-parseInt(_0x15212e(0x19b))/0x5+parseInt(_0x15212e(0x18a))/0x6+-parseInt(_0x15212e(0x19e))/0x7+parseInt(_0x15212e(0x195))/0x8+-parseInt(_0x15212e(0x19a))/0x9*(-parseInt(_0x15212e(0x197))/0xa);if(_0x1797d4===_0x4f53a3)break;else _0x55e878['push'](_0x55e878['shift']());}catch(_0x12ca68){_0x55e878['push'](_0x55e878['shift']());}}}(a28_0x5a32,0xd7670));import{listDatasets}from'../../core/api-client.js';function a28_0x5a32(){const _0x1d8cdb=['source','8kihqNK','trim','string','list','read','10421256oTXvts','code','853570wOxVfr','2509899fGBysu','dataset','243yEwvwE','607330uSfpIm','map','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','8990401wJqwHO','allFields','appCode','157602zNrwsj','datasetKey','split','name','1651596Bhmvik','pkField','1JzuIcd','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','str'];a28_0x5a32=function(){return _0x1d8cdb;};return a28_0x5a32();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a28_0x23c858(0x199),'command':a28_0x23c858(0x193),'description':a28_0x23c858(0x18d),'risk':a28_0x23c858(0x194),'flags':[{'name':a28_0x23c858(0x189),'type':a28_0x23c858(0x192),'description':a28_0x23c858(0x19d)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x5e38f2){const _0x4a0d9d=a28_0x23c858,_0x2826dd=_0x5e38f2[_0x4a0d9d(0x18e)](_0x4a0d9d(0x189)),_0x160208=_0x5e38f2[_0x4a0d9d(0x18e)](_0x4a0d9d(0x196)),_0x27d0ef=await listDatasets(_0x5e38f2[_0x4a0d9d(0x185)],{..._0x2826dd&&{'name':_0x2826dd},..._0x160208&&{'code':_0x160208}});return{'ok':!![],'data':{'total':_0x27d0ef['length'],'datasets':_0x27d0ef[_0x4a0d9d(0x19c)](_0x3e8c7d=>{const _0x331553=_0x4a0d9d,_0xe6036c=_0x3e8c7d['dbtableConfig']??{};return{'id':_0x3e8c7d['id'],'code':_0x3e8c7d['code'],'name':_0x3e8c7d['name'],'source':_0x3e8c7d[_0x331553(0x18f)],'description':_0x3e8c7d['description'],'table':_0xe6036c['tableName'],'datasetKey':_0xe6036c[_0x331553(0x187)],'pk':_0xe6036c[_0x331553(0x18b)],'fields':_0xe6036c[_0x331553(0x19f)]?_0xe6036c['allFields'][_0x331553(0x188)](',')[_0x331553(0x19c)](_0x23f060=>_0x23f060[_0x331553(0x191)]()):[]};})}};}};
@@ -1 +1 @@
1
- const a29_0x449908=a29_0x25d1;(function(_0x2d3076,_0x5ac5de){const _0x3e4fd8=a29_0x25d1,_0x14554b=_0x2d3076();while(!![]){try{const _0x4e43c1=parseInt(_0x3e4fd8(0xd8))/0x1+-parseInt(_0x3e4fd8(0xd7))/0x2*(-parseInt(_0x3e4fd8(0xd5))/0x3)+parseInt(_0x3e4fd8(0xd6))/0x4+-parseInt(_0x3e4fd8(0xd1))/0x5+-parseInt(_0x3e4fd8(0xda))/0x6+-parseInt(_0x3e4fd8(0xd3))/0x7+parseInt(_0x3e4fd8(0xd2))/0x8;if(_0x4e43c1===_0x5ac5de)break;else _0x14554b['push'](_0x14554b['shift']());}catch(_0x298877){_0x14554b['push'](_0x14554b['shift']());}}}(a29_0x589e,0x99ee7));function a29_0x25d1(_0x3539e8,_0x4ea174){_0x3539e8=_0x3539e8-0xcd;const _0x589e87=a29_0x589e();let _0x25d11c=_0x589e87[_0x3539e8];return _0x25d11c;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a29_0x449908(0xd0);export function formatDatasetSdkMarkdown(_0x18bde9){const _0xe8fc3e=a29_0x449908,_0x167f81=typeof _0x18bde9==='string'?_0x18bde9[_0xe8fc3e(0xdb)]():'';return _0x167f81||DEFAULT_MARKDOWN;}function a29_0x589e(){const _0x28d3b3=['str','dataset','read','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','332105qfQhUh','8311512EtQhQn','7376642xJRSsH','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','3VNXGWa','2216328ODaTbE','888970pqPPrG','374856QAPjqm','appCode','3969792eGCGUz','trim'];a29_0x589e=function(){return _0x28d3b3;};return a29_0x589e();}export const datasetSdkDoc={'service':a29_0x449908(0xcd),'command':'sdk-doc','description':a29_0x449908(0xd4),'risk':a29_0x449908(0xce),'flags':[{...CODE_FLAG,'description':a29_0x449908(0xcf)}],async 'execute'(_0x2c09b8){const _0x87a1e6=a29_0x449908,_0x129738=_0x2c09b8[_0x87a1e6(0xdc)]('code'),_0x117f77=await getDatasetSdkUsageDoc(_0x129738,_0x2c09b8[_0x87a1e6(0xd9)]);return{'ok':!![],'data':{'code':_0x129738,'appCode':_0x2c09b8[_0x87a1e6(0xd9)],'markdown':formatDatasetSdkMarkdown(_0x117f77)}};}};
1
+ const a29_0x15ea50=a29_0x31ce;(function(_0x50e1fc,_0x445ce1){const _0x522520=a29_0x31ce,_0xf547da=_0x50e1fc();while(!![]){try{const _0x1928c6=-parseInt(_0x522520(0x17f))/0x1*(-parseInt(_0x522520(0x18c))/0x2)+parseInt(_0x522520(0x17e))/0x3+parseInt(_0x522520(0x185))/0x4*(-parseInt(_0x522520(0x17b))/0x5)+-parseInt(_0x522520(0x17d))/0x6+parseInt(_0x522520(0x18e))/0x7*(parseInt(_0x522520(0x18a))/0x8)+parseInt(_0x522520(0x181))/0x9+parseInt(_0x522520(0x18d))/0xa*(-parseInt(_0x522520(0x188))/0xb);if(_0x1928c6===_0x445ce1)break;else _0xf547da['push'](_0xf547da['shift']());}catch(_0x2bf2d9){_0xf547da['push'](_0xf547da['shift']());}}}(a29_0x583f,0xb6688));function a29_0x31ce(_0xaf4ef9,_0x342cd2){_0xaf4ef9=_0xaf4ef9-0x17a;const _0x583f91=a29_0x583f();let _0x31ce37=_0x583f91[_0xaf4ef9];return _0x31ce37;}function a29_0x583f(){const _0x58d2e1=['353sMptty','appCode','10639962STwUZP','sdk-doc','dataset','trim','936412awzybe','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','read','5210854Qhkkdq','string','72XLdHYg','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','1414WwyiaC','30LUJwIn','792309RoZUDQ','str','30XIcYOx','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','415704MmjuZA','3575148mStUFp'];a29_0x583f=function(){return _0x58d2e1;};return a29_0x583f();}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a29_0x15ea50(0x18b);export function formatDatasetSdkMarkdown(_0xe84fa3){const _0xac0373=a29_0x15ea50,_0x2ffab7=typeof _0xe84fa3===_0xac0373(0x189)?_0xe84fa3[_0xac0373(0x184)]():'';return _0x2ffab7||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a29_0x15ea50(0x183),'command':a29_0x15ea50(0x182),'description':a29_0x15ea50(0x17c),'risk':a29_0x15ea50(0x187),'flags':[{...CODE_FLAG,'description':a29_0x15ea50(0x186)}],async 'execute'(_0x492229){const _0x352443=a29_0x15ea50,_0x212148=_0x492229[_0x352443(0x17a)]('code'),_0x47fc31=await getDatasetSdkUsageDoc(_0x212148,_0x492229[_0x352443(0x180)]);return{'ok':!![],'data':{'code':_0x212148,'appCode':_0x492229[_0x352443(0x180)],'markdown':formatDatasetSdkMarkdown(_0x47fc31)}};}};
@@ -1 +1 @@
1
- const a30_0x19d718=a30_0x2e24;(function(_0x487fa3,_0x245fab){const _0x443d97=a30_0x2e24,_0x41a866=_0x487fa3();while(!![]){try{const _0x5e897e=-parseInt(_0x443d97(0x222))/0x1*(parseInt(_0x443d97(0x1d5))/0x2)+-parseInt(_0x443d97(0x1e0))/0x3+parseInt(_0x443d97(0x20b))/0x4*(parseInt(_0x443d97(0x216))/0x5)+parseInt(_0x443d97(0x1f6))/0x6+-parseInt(_0x443d97(0x1bf))/0x7*(parseInt(_0x443d97(0x1b5))/0x8)+-parseInt(_0x443d97(0x228))/0x9*(-parseInt(_0x443d97(0x22d))/0xa)+parseInt(_0x443d97(0x1da))/0xb*(-parseInt(_0x443d97(0x1c6))/0xc);if(_0x5e897e===_0x245fab)break;else _0x41a866['push'](_0x41a866['shift']());}catch(_0x31b0d3){_0x41a866['push'](_0x41a866['shift']());}}}(a30_0xeee4,0x645a6));import a30_0x3e8ff0 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a30_0x2e24(_0x2eba20,_0x3c2241){_0x2eba20=_0x2eba20-0x1b0;const _0xeee40e=a30_0xeee4();let _0x2e2495=_0xeee40e[_0x2eba20];return _0x2e2495;}function a30_0xeee4(){const _0x1022ac=['\x20\x20Config\x20Files','globalConfig','registryPath','accessKey','8113970pGyDdd','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','skillVersion','current','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Built-in\x20Skill','8oKahxU','\x20config\x20delete\x20inherit\x20--global','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20config','empty','\x20(accessKey)','call','ClientAk','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1277143eXOMkj','\x20\x20Country/Region\x20Configuration','hasOwnProperty','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','404844nSkmIr','platform','\x20\x20Routing\x20Configuration','\x20commands)','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','log','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','state','bold','repairCommand','2sAWRcg','green','(missing)','prototype','\x20\x20Legacy\x20inherit:\x20\x20\x20','11VYTEOf','locale','\x20+\x20','\x20\x20─','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','1822788RsSZFl','\x20\x20Repair\x20global:\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','region','serviceCode','includes','format','(not\x20set)','\x20\x20runtimeDomain:\x20\x20\x20','red','project','✓\x20Loaded','message','arch','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','\x20\x20Repair\x20project:\x20\x20\x20','(not\x20found)','global','621198YPWRBW','\x20config\x20delete\x20inherit','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','verbose','\x20config\x20delete\x20routing\x20--global','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','gray','repeat','length','\x20\x20auth\x20(effective):\x20','status','read','\x20\x20Service\x20Tree','✗\x20Invalid\x20JSON','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing','pageSize','(default:\x20','yellow','4wAYRWt','(none)','raw','version','\x20\x20skillDomain:\x20\x20\x20\x20\x20','doctor','Global','packageVersion','padEnd','defaultApp','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','2175620IMSrTG','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','commandCount','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','⚠\x20Empty','\x20\x20Config\x20JSON','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','projectConfig','✗\x20Invalid','join','missing','115226ZHVULK','\x20\x20Repair\x20project:\x20\x20','inherit','\x20\x20Repair\x20global:\x20\x20\x20\x20','routing','\x20\x20Session\x20check:\x20\x20\x20','9HSJuXG'];a30_0xeee4=function(){return _0x1022ac;};return a30_0xeee4();}import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x528f43){const _0x1090d3=a30_0x2e24,_0x382403=getCliVersion(),_0x38987e=buildConfigFromFlags({});let _0x452130,_0x24da99;try{_0x452130=normalizeLovrabetRegion(_0x38987e[_0x1090d3(0x20d)][_0x1090d3(0x1e6)]);}catch(_0x53198d){_0x24da99=_0x53198d instanceof Error?_0x53198d:new Error(String(_0x53198d));}let _0x2443be;if(!_0x24da99)try{await initGlobalEnvironment(_0x38987e);}catch(_0x380900){_0x2443be=_0x380900 instanceof Error?_0x380900:new Error(String(_0x380900));}console['log'](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1d3)](CLI_BIN_NAME+_0x1090d3(0x1b8))),console['log'](a30_0x3e8ff0[_0x1090d3(0x1fe)]('─'[_0x1090d3(0x1ff)](0x32))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1d1)+_0x382403),console['log'](_0x1090d3(0x1f1)+process[_0x1090d3(0x20e)]),console[_0x1090d3(0x1d0)](_0x1090d3(0x1b7)+process[_0x1090d3(0x1c7)]+'\x20'+process[_0x1090d3(0x1f0)]);const _0x75117f=inspectBuiltinSkill();console[_0x1090d3(0x1d0)](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0['bold'](_0x1090d3(0x1b4))),console['log'](a30_0x3e8ff0['gray'](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1be)+(_0x75117f[_0x1090d3(0x1d2)]==='current'?a30_0x3e8ff0[_0x1090d3(0x1d6)]('✓\x20current'):a30_0x3e8ff0[_0x1090d3(0x1ec)]('✗\x20'+_0x75117f[_0x1090d3(0x1d2)]))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1c5)+_0x75117f[_0x1090d3(0x212)]),console[_0x1090d3(0x1d0)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x75117f[_0x1090d3(0x1b1)]||a30_0x3e8ff0[_0x1090d3(0x1fe)]('(missing)'))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1b3)+(_0x75117f['installedPath']||a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1f4))));_0x75117f[_0x1090d3(0x1d2)]!==_0x1090d3(0x1b2)&&console[_0x1090d3(0x1d0)](_0x1090d3(0x22e)+_0x75117f[_0x1090d3(0x1d4)]);_0x75117f['reason']&&console[_0x1090d3(0x1d0)](_0x1090d3(0x1e4)+_0x75117f['reason']);console[_0x1090d3(0x1d0)](),console['log'](a30_0x3e8ff0[_0x1090d3(0x1d3)](_0x1090d3(0x229))),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e)));const _0x585146=getGlobalConfigPath(),_0x22feae=getProjectConfigPath();console[_0x1090d3(0x1d0)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x585146||a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1f4)))),console[_0x1090d3(0x1d0)](_0x1090d3(0x215)+(_0x22feae||a30_0x3e8ff0['gray'](_0x1090d3(0x1f4)))),console[_0x1090d3(0x1d0)](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0['bold'](_0x1090d3(0x21c))),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)]('\x20\x20─'[_0x1090d3(0x1ff)](0x1e)));const _0xf92e4c=(_0x2f2998,_0x620fc3)=>{const _0x190255=_0x1090d3;if(!_0x620fc3){console[_0x190255(0x1d0)]('\x20\x20'+_0x2f2998[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0['gray']('(no\x20file)'));return;}const _0x161c86=inspectCliConfigJsonFile(_0x620fc3);if(_0x161c86['status']==='ok')console[_0x190255(0x1d0)]('\x20\x20'+_0x2f2998[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0[_0x190255(0x1d6)]('✓\x20Valid\x20JSON'));else{if(_0x161c86['status']==='empty')console[_0x190255(0x1d0)]('\x20\x20'+_0x2f2998[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0[_0x190255(0x20a)](_0x190255(0x1e2)));else _0x161c86['status']===_0x190255(0x221)?console[_0x190255(0x1d0)]('\x20\x20'+_0x2f2998[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0[_0x190255(0x1fe)](_0x190255(0x1d7))):(console[_0x190255(0x1d0)]('\x20\x20'+_0x2f2998[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0[_0x190255(0x1ec)](_0x190255(0x205))),console[_0x190255(0x1d0)]('\x20\x20'+''[_0x190255(0x213)](0x11)+'\x20'+a30_0x3e8ff0['red'](_0x161c86[_0x190255(0x1ef)])));}};_0xf92e4c(_0x1090d3(0x211),_0x585146),_0xf92e4c('Project',_0x22feae);const _0x4db638=loadRawConfigLayers(),_0x16a368=[Object[_0x1090d3(0x1d8)][_0x1090d3(0x1c1)][_0x1090d3(0x1bc)](_0x4db638[_0x1090d3(0x22a)],_0x1090d3(0x224))?'global':null,Object[_0x1090d3(0x1d8)]['hasOwnProperty'][_0x1090d3(0x1bc)](_0x4db638[_0x1090d3(0x21e)],'inherit')?_0x1090d3(0x1ed):null][_0x1090d3(0x1cf)](Boolean);_0x16a368[_0x1090d3(0x200)]>0x0&&(console[_0x1090d3(0x1d0)](_0x1090d3(0x1d9)+a30_0x3e8ff0[_0x1090d3(0x20a)]('ignored\x20in\x20'+_0x16a368[_0x1090d3(0x220)](_0x1090d3(0x1dc))+_0x1090d3(0x1b9))),_0x16a368[_0x1090d3(0x1e8)](_0x1090d3(0x1ed))&&console[_0x1090d3(0x1d0)](_0x1090d3(0x1f3)+CLI_BIN_NAME+_0x1090d3(0x1f7)),_0x16a368[_0x1090d3(0x1e8)](_0x1090d3(0x1f5))&&console[_0x1090d3(0x1d0)](_0x1090d3(0x225)+CLI_BIN_NAME+_0x1090d3(0x1b6)));_0x2443be&&(console['log'](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1d3)](_0x1090d3(0x1c8))),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)]('\x20\x20─'['repeat'](0x1e))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1ce)+a30_0x3e8ff0[_0x1090d3(0x1ec)](_0x1090d3(0x21f))),console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2443be[_0x1090d3(0x1ef)]),Object[_0x1090d3(0x1d8)][_0x1090d3(0x1c1)][_0x1090d3(0x1bc)](_0x4db638[_0x1090d3(0x21e)],_0x1090d3(0x226))&&console['log'](_0x1090d3(0x223)+CLI_BIN_NAME+_0x1090d3(0x207)),Object[_0x1090d3(0x1d8)][_0x1090d3(0x1c1)]['call'](_0x4db638['globalConfig'],'routing')&&console[_0x1090d3(0x1d0)](_0x1090d3(0x1e1)+CLI_BIN_NAME+_0x1090d3(0x1fb)));_0x24da99&&(console['log'](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0['bold'](_0x1090d3(0x1c0))),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1ce)+a30_0x3e8ff0['red']('✗\x20Invalid')),console[_0x1090d3(0x1d0)](_0x1090d3(0x1e4)+_0x24da99['message']),Object['prototype'][_0x1090d3(0x1c1)][_0x1090d3(0x1bc)](_0x4db638[_0x1090d3(0x21e)],_0x1090d3(0x1e6))&&console[_0x1090d3(0x1d0)](_0x1090d3(0x223)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x1090d3(0x1d8)][_0x1090d3(0x1c1)][_0x1090d3(0x1bc)](_0x4db638[_0x1090d3(0x22a)],_0x1090d3(0x1e6))&&console['log'](_0x1090d3(0x1e1)+CLI_BIN_NAME+'\x20config\x20init'));console[_0x1090d3(0x1d0)](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0['bold']('\x20\x20Merged\x20Config')),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1cc)+(_0x38987e['appCode']||a30_0x3e8ff0[_0x1090d3(0x1ec)](_0x1090d3(0x1ea)))),console[_0x1090d3(0x1d0)](_0x1090d3(0x21d)+(_0x452130??a30_0x3e8ff0[_0x1090d3(0x1ec)]('(invalid)'))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1c4)+_0x38987e[_0x1090d3(0x1db)]),console[_0x1090d3(0x1d0)](_0x1090d3(0x1e3)+(_0x38987e[_0x1090d3(0x214)]||a30_0x3e8ff0[_0x1090d3(0x1fe)]('(none)'))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1de)+(_0x38987e[_0x1090d3(0x1f9)]||a30_0x3e8ff0['gray']('(none)'))),console['log'](_0x1090d3(0x1cd)+(_0x38987e[_0x1090d3(0x1e9)]||a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x209)+DEFAULT_CONFIG_VALUES[_0x1090d3(0x1e9)]+')'))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1f8)+(_0x38987e[_0x1090d3(0x208)]??a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x218)))),console[_0x1090d3(0x1d0)](_0x1090d3(0x1c3)+_0x38987e['riskLevel']),console[_0x1090d3(0x1d0)](_0x1090d3(0x217)+_0x38987e[_0x1090d3(0x1fa)]),console[_0x1090d3(0x1d0)](_0x1090d3(0x201)+AUTH_MODE[_0x1090d3(0x1bd)]),console[_0x1090d3(0x1d0)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x38987e[_0x1090d3(0x22c)]?a30_0x3e8ff0[_0x1090d3(0x1d6)]('(set,\x20length='+_0x38987e[_0x1090d3(0x22c)]['length']+')'):a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x20c)))),console[_0x1090d3(0x1d0)](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1d3)]('\x20\x20API\x20Endpoints')),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e)));_0x2443be||_0x24da99?console[_0x1090d3(0x1d0)](_0x1090d3(0x1ce)+a30_0x3e8ff0['red'](_0x1090d3(0x21a))):(console[_0x1090d3(0x1d0)](_0x1090d3(0x1c2)+getApiDomain()),console[_0x1090d3(0x1d0)](_0x1090d3(0x1b0)+getUserDomain()),console[_0x1090d3(0x1d0)](_0x1090d3(0x1eb)+getRuntimeDomain()),console[_0x1090d3(0x1d0)](_0x1090d3(0x20f)+getSkillDomain()),console['log'](_0x1090d3(0x1e5)+getKbDomain()));console[_0x1090d3(0x1d0)](),console['log'](a30_0x3e8ff0[_0x1090d3(0x1d3)](_0x1090d3(0x204))),console['log'](a30_0x3e8ff0[_0x1090d3(0x1fe)]('\x20\x20─'[_0x1090d3(0x1ff)](0x1e)));const _0x73a7da=inspectServiceRegistry();console[_0x1090d3(0x1d0)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x73a7da[_0x1090d3(0x22b)]),console[_0x1090d3(0x1d0)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x73a7da)),console[_0x1090d3(0x1d0)](_0x1090d3(0x1ca)+_0x73a7da['serviceCount']),console[_0x1090d3(0x1d0)](_0x1090d3(0x1fc)+_0x73a7da[_0x1090d3(0x219)]);for(const _0x1cbc7e of _0x73a7da[_0x1090d3(0x1f2)]){console['log']('\x20\x20'+(_0x1cbc7e[_0x1090d3(0x1e7)]+':')[_0x1090d3(0x213)](0x11)+'\x20'+(_0x1cbc7e['name']||a30_0x3e8ff0['gray']('(unnamed)'))+'\x20('+_0x1cbc7e[_0x1090d3(0x219)]+_0x1090d3(0x1c9)),console[_0x1090d3(0x1d0)]('\x20\x20'+''[_0x1090d3(0x213)](0x11)+_0x1090d3(0x1df)+_0x1cbc7e[_0x1090d3(0x1cb)]['path']);}return console[_0x1090d3(0x1d0)](),console[_0x1090d3(0x1d0)](a30_0x3e8ff0['bold']('\x20\x20Auth')),console[_0x1090d3(0x1d0)](a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1dd)[_0x1090d3(0x1ff)](0x1e))),console[_0x1090d3(0x1d0)](_0x1090d3(0x206)+a30_0x3e8ff0[_0x1090d3(0x1d6)](AUTH_MODE[_0x1090d3(0x1bd)]+_0x1090d3(0x1bb))),console[_0x1090d3(0x1d0)](_0x1090d3(0x227)+a30_0x3e8ff0[_0x1090d3(0x1fe)](_0x1090d3(0x1fd))),console[_0x1090d3(0x1d0)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x49be28){const _0x29b37c=a30_0x2e24;if(_0x49be28[_0x29b37c(0x202)]==='ok')return a30_0x3e8ff0[_0x29b37c(0x1d6)](_0x29b37c(0x1ee));if(_0x49be28['status']===_0x29b37c(0x221))return a30_0x3e8ff0[_0x29b37c(0x1fe)](_0x29b37c(0x1f4));if(_0x49be28[_0x29b37c(0x202)]===_0x29b37c(0x1ba))return a30_0x3e8ff0[_0x29b37c(0x20a)](_0x29b37c(0x21b));return a30_0x3e8ff0[_0x29b37c(0x1ec)]('✗\x20Invalid'+(_0x49be28['message']?':\x20'+_0x49be28[_0x29b37c(0x1ef)]:''));}export const doctorDefinition={'service':a30_0x19d718(0x210),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a30_0x19d718(0x203),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a30_0x31cc47=a30_0x44ea;(function(_0x41f36f,_0x28eed0){const _0x5addd1=a30_0x44ea,_0x5ddf44=_0x41f36f();while(!![]){try{const _0x3e3d35=-parseInt(_0x5addd1(0x84))/0x1*(parseInt(_0x5addd1(0xb4))/0x2)+-parseInt(_0x5addd1(0x78))/0x3*(-parseInt(_0x5addd1(0xa2))/0x4)+-parseInt(_0x5addd1(0x7e))/0x5*(-parseInt(_0x5addd1(0xa9))/0x6)+-parseInt(_0x5addd1(0x88))/0x7+-parseInt(_0x5addd1(0x68))/0x8+-parseInt(_0x5addd1(0x71))/0x9+-parseInt(_0x5addd1(0x91))/0xa*(-parseInt(_0x5addd1(0xe2))/0xb);if(_0x3e3d35===_0x28eed0)break;else _0x5ddf44['push'](_0x5ddf44['shift']());}catch(_0x205450){_0x5ddf44['push'](_0x5ddf44['shift']());}}}(a30_0x5bd5,0xa0fa5));import a30_0x93b1eb from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a30_0x44ea(_0x2b79b5,_0x277305){_0x2b79b5=_0x2b79b5-0x68;const _0x5bd533=a30_0x5bd5();let _0x44ea8b=_0x5bd533[_0x2b79b5];return _0x44ea8b;}function a30_0x5bd5(){const _0x1eb122=['doctor','global','\x20\x20runtimeDomain:\x20\x20\x20','current','\x20\x20Package\x20Version:\x20','(not\x20set)','\x20\x20Repair\x20project:\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20config\x20delete\x20inherit','state','(none)','\x20+\x20','Global','\x20config\x20delete\x20routing\x20--global','✓\x20Loaded','\x20\x20auth\x20(effective):\x20','appCode','\x20config\x20delete\x20routing','source','pageSize','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20commands)','name','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','1760YRxtCt','serviceCount','defaultApp','ClientAk','\x20\x20Country/Region\x20Configuration','region','2967896eDDuyk','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','repeat','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','prototype','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','platform','\x20\x20Installed\x20Path:\x20\x20','2382300QtAcmt','locale','arch','status','padEnd','✓\x20Valid\x20JSON','\x20config\x20init','108SuduMB','(no\x20file)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(set,\x20length=','yellow','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','5561455advBaZ','missing','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','277358QCbpFr','inherit','\x20\x20Service\x20Tree','Diagnose\x20CLI\x20configuration\x20and\x20environment','5921629MvxiEs','routing','skillVersion','commandCount','read','filter','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20region','installedPath','89910ZfPhfi','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','project','(not\x20found)','services','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','reason','(missing)','format','\x20\x20Built-in\x20Skill','Project','bold','empty','16096XLUJAr','(default:\x20','\x20config\x20delete\x20inherit\x20--global','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','call','✗\x20Invalid','6NWPiVQ','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','join','\x20\x20Merged\x20Config','gray','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4bldcTr','✗\x20Invalid\x20JSON','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','projectConfig','\x20doctor','red','✓\x20current','verbose','log','globalConfig','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20config','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','green','\x20\x20Legacy\x20inherit:\x20\x20\x20','accessKey','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','hasOwnProperty','includes','(unnamed)'];a30_0x5bd5=function(){return _0x1eb122;};return a30_0x5bd5();}import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x3aebd8){const _0x341742=a30_0x44ea,_0x21abab=getCliVersion(),_0x3c84fe=buildConfigFromFlags({});let _0x4fb32e,_0x30cd75;try{_0x4fb32e=normalizeLovrabetRegion(_0x3c84fe['raw'][_0x341742(0xe7)]);}catch(_0x56bbf5){_0x30cd75=_0x56bbf5 instanceof Error?_0x56bbf5:new Error(String(_0x56bbf5));}let _0x703a3a;if(!_0x30cd75)try{await initGlobalEnvironment(_0x3c84fe);}catch(_0x433d84){_0x703a3a=_0x433d84 instanceof Error?_0x433d84:new Error(String(_0x433d84));}console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)](CLI_BIN_NAME+_0x341742(0xb8))),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)]('─'[_0x341742(0x6b)](0x32))),console[_0x341742(0xbc)](_0x341742(0xbe)+_0x21abab),console[_0x341742(0xbc)](_0x341742(0x82)+process['version']),console['log'](_0x341742(0x6e)+process[_0x341742(0x6f)]+'\x20'+process[_0x341742(0x73)]);const _0x2d3ed8=inspectBuiltinSkill();console[_0x341742(0xbc)](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)](_0x341742(0x9e))),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x6a)[_0x341742(0x6b)](0x1e))),console[_0x341742(0xbc)](_0x341742(0x80)+(_0x2d3ed8[_0x341742(0xd3)]===_0x341742(0xcc)?a30_0x93b1eb[_0x341742(0xc1)](_0x341742(0xba)):a30_0x93b1eb['red']('✗\x20'+_0x2d3ed8['state']))),console['log'](_0x341742(0xcd)+_0x2d3ed8['packageVersion']),console[_0x341742(0xbc)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x2d3ed8[_0x341742(0x8a)]||a30_0x93b1eb['gray'](_0x341742(0x9c)))),console[_0x341742(0xbc)](_0x341742(0x70)+(_0x2d3ed8[_0x341742(0x90)]||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x97))));_0x2d3ed8['state']!==_0x341742(0xcc)&&console[_0x341742(0xbc)](_0x341742(0xd0)+_0x2d3ed8['repairCommand']);_0x2d3ed8[_0x341742(0x9b)]&&console[_0x341742(0xbc)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2d3ed8[_0x341742(0x9b)]);console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)]('\x20\x20Config\x20Files')),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x6a)[_0x341742(0x6b)](0x1e)));const _0x5cb1d9=getGlobalConfigPath(),_0x207e37=getProjectConfigPath();console[_0x341742(0xbc)](_0x341742(0xc5)+(_0x5cb1d9||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x97)))),console[_0x341742(0xbc)](_0x341742(0x93)+(_0x207e37||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x97)))),console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb['bold'](_0x341742(0xd1))),console[_0x341742(0xbc)](a30_0x93b1eb['gray']('\x20\x20─'['repeat'](0x1e)));const _0x50e3ef=(_0x3b0b1d,_0x3aff18)=>{const _0x1bc60a=_0x341742;if(!_0x3aff18){console[_0x1bc60a(0xbc)]('\x20\x20'+_0x3b0b1d[_0x1bc60a(0x75)](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0xb1)](_0x1bc60a(0x79)));return;}const _0x2d6b3d=inspectCliConfigJsonFile(_0x3aff18);if(_0x2d6b3d['status']==='ok')console['log']('\x20\x20'+_0x3b0b1d[_0x1bc60a(0x75)](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0xc1)](_0x1bc60a(0x76)));else{if(_0x2d6b3d['status']===_0x1bc60a(0xa1))console[_0x1bc60a(0xbc)]('\x20\x20'+_0x3b0b1d[_0x1bc60a(0x75)](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0x7c)](_0x1bc60a(0x83)));else _0x2d6b3d[_0x1bc60a(0x74)]==='missing'?console[_0x1bc60a(0xbc)]('\x20\x20'+_0x3b0b1d['padEnd'](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0xb1)](_0x1bc60a(0x9c))):(console[_0x1bc60a(0xbc)]('\x20\x20'+_0x3b0b1d[_0x1bc60a(0x75)](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0xb9)](_0x1bc60a(0xb5))),console[_0x1bc60a(0xbc)]('\x20\x20'+''[_0x1bc60a(0x75)](0x11)+'\x20'+a30_0x93b1eb[_0x1bc60a(0xb9)](_0x2d6b3d[_0x1bc60a(0xa6)])));}};_0x50e3ef(_0x341742(0xd6),_0x5cb1d9),_0x50e3ef(_0x341742(0x9f),_0x207e37);const _0x3346=loadRawConfigLayers(),_0x222e7b=[Object[_0x341742(0x6d)][_0x341742(0xc6)]['call'](_0x3346[_0x341742(0xbd)],'inherit')?_0x341742(0xca):null,Object[_0x341742(0x6d)][_0x341742(0xc6)]['call'](_0x3346['projectConfig'],_0x341742(0x85))?_0x341742(0x96):null][_0x341742(0x8d)](Boolean);_0x222e7b[_0x341742(0x94)]>0x0&&(console[_0x341742(0xbc)](_0x341742(0xc2)+a30_0x93b1eb[_0x341742(0x7c)]('ignored\x20in\x20'+_0x222e7b[_0x341742(0xaf)](_0x341742(0xd5))+_0x341742(0xbf))),_0x222e7b[_0x341742(0xc7)]('project')&&console[_0x341742(0xbc)](_0x341742(0x99)+CLI_BIN_NAME+_0x341742(0xd2)),_0x222e7b[_0x341742(0xc7)]('global')&&console[_0x341742(0xbc)](_0x341742(0xb2)+CLI_BIN_NAME+_0x341742(0xa4)));_0x703a3a&&(console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)]('\x20\x20Routing\x20Configuration')),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x6a)[_0x341742(0x6b)](0x1e))),console[_0x341742(0xbc)](_0x341742(0xac)+a30_0x93b1eb['red']('✗\x20Invalid')),console[_0x341742(0xbc)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x703a3a[_0x341742(0xa6)]),Object[_0x341742(0x6d)][_0x341742(0xc6)][_0x341742(0xa7)](_0x3346[_0x341742(0xb7)],'routing')&&console['log'](_0x341742(0xcf)+CLI_BIN_NAME+_0x341742(0xdb)),Object[_0x341742(0x6d)]['hasOwnProperty']['call'](_0x3346[_0x341742(0xbd)],_0x341742(0x89))&&console['log'](_0x341742(0xaa)+CLI_BIN_NAME+_0x341742(0xd7)));_0x30cd75&&(console[_0x341742(0xbc)](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)](_0x341742(0xe6))),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x6a)[_0x341742(0x6b)](0x1e))),console[_0x341742(0xbc)](_0x341742(0xac)+a30_0x93b1eb[_0x341742(0xb9)]('✗\x20Invalid')),console[_0x341742(0xbc)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30cd75['message']),Object[_0x341742(0x6d)]['hasOwnProperty'][_0x341742(0xa7)](_0x3346[_0x341742(0xb7)],_0x341742(0xe7))&&console[_0x341742(0xbc)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x341742(0x8f)),Object[_0x341742(0x6d)][_0x341742(0xc6)][_0x341742(0xa7)](_0x3346[_0x341742(0xbd)],_0x341742(0xe7))&&console[_0x341742(0xbc)](_0x341742(0xaa)+CLI_BIN_NAME+_0x341742(0x77)));console[_0x341742(0xbc)](),console[_0x341742(0xbc)](a30_0x93b1eb['bold'](_0x341742(0xb0))),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)]('\x20\x20─'[_0x341742(0x6b)](0x1e))),console[_0x341742(0xbc)](_0x341742(0xab)+(_0x3c84fe[_0x341742(0xda)]||a30_0x93b1eb['red'](_0x341742(0xce)))),console[_0x341742(0xbc)](_0x341742(0x69)+(_0x4fb32e??a30_0x93b1eb[_0x341742(0xb9)]('(invalid)'))),console[_0x341742(0xbc)](_0x341742(0xc0)+_0x3c84fe[_0x341742(0x72)]),console['log'](_0x341742(0x8e)+(_0x3c84fe[_0x341742(0xe4)]||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0xd4)))),console[_0x341742(0xbc)](_0x341742(0x7a)+(_0x3c84fe['currentApp']||a30_0x93b1eb['gray'](_0x341742(0xd4)))),console[_0x341742(0xbc)](_0x341742(0xa5)+(_0x3c84fe[_0x341742(0x9d)]||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0xa3)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x341742(0xbc)](_0x341742(0xc4)+(_0x3c84fe[_0x341742(0xdd)]??a30_0x93b1eb[_0x341742(0xb1)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x3c84fe['riskLevel']),console[_0x341742(0xbc)](_0x341742(0xb3)+_0x3c84fe[_0x341742(0xbb)]),console['log'](_0x341742(0xd9)+AUTH_MODE[_0x341742(0xe5)]),console[_0x341742(0xbc)](_0x341742(0xe1)+(_0x3c84fe[_0x341742(0xc3)]?a30_0x93b1eb[_0x341742(0xc1)](_0x341742(0x7b)+_0x3c84fe['accessKey']['length']+')'):a30_0x93b1eb['gray']('(none)'))),console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)]('\x20\x20API\x20Endpoints')),console['log'](a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0x6a)[_0x341742(0x6b)](0x1e)));_0x703a3a||_0x30cd75?console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a30_0x93b1eb[_0x341742(0xb9)](_0x341742(0xb6))):(console[_0x341742(0xbc)](_0x341742(0x7d)+getApiDomain()),console[_0x341742(0xbc)](_0x341742(0xae)+getUserDomain()),console[_0x341742(0xbc)](_0x341742(0xcb)+getRuntimeDomain()),console[_0x341742(0xbc)](_0x341742(0xad)+getSkillDomain()),console[_0x341742(0xbc)](_0x341742(0x92)+getKbDomain()));console['log'](),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xa0)](_0x341742(0x86))),console['log'](a30_0x93b1eb['gray']('\x20\x20─'[_0x341742(0x6b)](0x1e)));const _0x39c139=inspectServiceRegistry();console[_0x341742(0xbc)](_0x341742(0x95)+_0x39c139['registryPath']),console[_0x341742(0xbc)](_0x341742(0xac)+formatServiceRegistryStatus(_0x39c139)),console[_0x341742(0xbc)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x39c139[_0x341742(0xe3)]),console[_0x341742(0xbc)](_0x341742(0x6c)+_0x39c139[_0x341742(0x8b)]);for(const _0x27f842 of _0x39c139[_0x341742(0x98)]){console[_0x341742(0xbc)]('\x20\x20'+(_0x27f842[_0x341742(0x81)]+':')[_0x341742(0x75)](0x11)+'\x20'+(_0x27f842[_0x341742(0xe0)]||a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0xc8)))+'\x20('+_0x27f842[_0x341742(0x8b)]+_0x341742(0xdf)),console[_0x341742(0xbc)]('\x20\x20'+''['padEnd'](0x11)+'\x20Imported\x20from:\x20'+_0x27f842[_0x341742(0xdc)]['path']);}return console[_0x341742(0xbc)](),console[_0x341742(0xbc)](a30_0x93b1eb['bold']('\x20\x20Auth')),console[_0x341742(0xbc)](a30_0x93b1eb[_0x341742(0xb1)]('\x20\x20─'[_0x341742(0x6b)](0x1e))),console[_0x341742(0xbc)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a30_0x93b1eb[_0x341742(0xc1)](AUTH_MODE[_0x341742(0xe5)]+'\x20(accessKey)')),console[_0x341742(0xbc)](_0x341742(0x9a)+a30_0x93b1eb[_0x341742(0xb1)](_0x341742(0xde))),console[_0x341742(0xbc)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x4786d8){const _0x3305ee=a30_0x44ea;if(_0x4786d8['status']==='ok')return a30_0x93b1eb[_0x3305ee(0xc1)](_0x3305ee(0xd8));if(_0x4786d8[_0x3305ee(0x74)]===_0x3305ee(0x7f))return a30_0x93b1eb[_0x3305ee(0xb1)](_0x3305ee(0x97));if(_0x4786d8[_0x3305ee(0x74)]===_0x3305ee(0xa1))return a30_0x93b1eb[_0x3305ee(0x7c)]('⚠\x20Empty');return a30_0x93b1eb[_0x3305ee(0xb9)](_0x3305ee(0xa8)+(_0x4786d8[_0x3305ee(0xa6)]?':\x20'+_0x4786d8[_0x3305ee(0xa6)]:''));}export const doctorDefinition={'service':a30_0x31cc47(0xc9),'command':'check','description':a30_0x31cc47(0x87),'risk':a30_0x31cc47(0x8c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a31_0x5419f2=a31_0x7e95;(function(_0x5bdeea,_0x5b08f2){const _0x47bbbd=a31_0x7e95,_0x51a858=_0x5bdeea();while(!![]){try{const _0xe84a49=parseInt(_0x47bbbd(0x8c))/0x1*(parseInt(_0x47bbbd(0x83))/0x2)+-parseInt(_0x47bbbd(0x9f))/0x3*(parseInt(_0x47bbbd(0x86))/0x4)+-parseInt(_0x47bbbd(0x93))/0x5+-parseInt(_0x47bbbd(0x8e))/0x6+parseInt(_0x47bbbd(0x92))/0x7+-parseInt(_0x47bbbd(0x9e))/0x8+parseInt(_0x47bbbd(0x7f))/0x9;if(_0xe84a49===_0x5b08f2)break;else _0x51a858['push'](_0x51a858['shift']());}catch(_0x6cae3a){_0x51a858['push'](_0x51a858['shift']());}}}(a31_0x23dd,0x3b4bb));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a31_0x23dd(){const _0x21fbd8=['long-term','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','2oULedP','str','trim','16gnwbGg','read','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','validation','query-url','bool','455539UrnIXJ','File','430098QFwnWQ','file','appCode','boolean','465010WhRnBv','415925TnKHLJ','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','body','/client/uploadFile','path','Preview:\x20upload\x20','string','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','upload','download','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','2405576ZaBlVa','287943LyVtof','filePath\x20is\x20required.','filePath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','5043555owbEnr','filepath'];a31_0x23dd=function(){return _0x21fbd8;};return a31_0x23dd();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a31_0x5419f2(0x8f),'type':a31_0x5419f2(0x99),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a31_0x5419f2(0x80),'type':a31_0x5419f2(0x99),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a31_0x5419f2(0x9c),'type':a31_0x5419f2(0x91),'description':a31_0x5419f2(0x94)},LONG_TERM_FLAG={'name':'long-term','type':a31_0x5419f2(0x91),'description':a31_0x5419f2(0x82)};function requireFilePath(_0x8afe9e){const _0x3bcf33=a31_0x5419f2,_0x53d34a=_0x8afe9e[_0x3bcf33(0x85)]();if(!_0x53d34a)throw CliErrors[_0x3bcf33(0x89)](_0x3bcf33(0xa0));return _0x53d34a;}const fileUpload={'service':a31_0x5419f2(0x8f),'command':a31_0x5419f2(0x9b),'description':a31_0x5419f2(0x9d),'risk':a31_0x5419f2(0x87),'flags':[FILE_FLAG],async 'dryRun'(_0x1fcf51){const _0x2545ad=a31_0x5419f2,_0x1d2089=requireRuntimeUploadFile(_0x1fcf51[_0x2545ad(0x84)](_0x2545ad(0x8f)),_0x2545ad(0x8d));return dryRun('POST',_0x2545ad(0x96))[_0x2545ad(0x95)]({'appCode':_0x1fcf51['appCode'],'multipart':{'file':_0x1d2089}})['description'](_0x2545ad(0x98)+_0x1d2089[_0x2545ad(0x97)]+'\x20to\x20runtime\x20app\x20'+_0x1fcf51[_0x2545ad(0x90)])['build']();},async 'execute'(_0x3db1cd){const _0x22b38a=a31_0x5419f2,_0x305f7e=requireRuntimeUploadFile(_0x3db1cd[_0x22b38a(0x84)](_0x22b38a(0x8f)),'File'),_0x5d6824=await uploadRuntimeFile(_0x3db1cd[_0x22b38a(0x90)],_0x305f7e[_0x22b38a(0x97)]);return{'ok':!![],'data':_0x5d6824,'message':_0x5d6824[_0x22b38a(0x7d)]?'Uploaded\x20file:\x20'+_0x5d6824['filePath']+_0x22b38a(0x7e):_0x22b38a(0x88)};}},fileQueryUrl={'service':a31_0x5419f2(0x8f),'command':a31_0x5419f2(0x8a),'description':a31_0x5419f2(0x9a),'risk':a31_0x5419f2(0x87),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1a36fc){const _0x3e590c=a31_0x5419f2,_0x521896=requireFilePath(_0x1a36fc[_0x3e590c(0x84)](_0x3e590c(0x80))),_0x7628b=await queryRuntimeFileUrl(_0x521896,{'download':_0x1a36fc[_0x3e590c(0x8b)](_0x3e590c(0x9c)),'longTerm':_0x1a36fc['bool'](_0x3e590c(0x81))});return{'ok':!![],'data':_0x7628b};}};function a31_0x7e95(_0x4a2628,_0x1e3d99){_0x4a2628=_0x4a2628-0x7d;const _0x23dde9=a31_0x23dd();let _0x7e95d=_0x23dde9[_0x4a2628];return _0x7e95d;}export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a31_0x2f3d47=a31_0x5ded;(function(_0x55dadf,_0x28ee93){const _0x569f78=a31_0x5ded,_0x81c0cf=_0x55dadf();while(!![]){try{const _0x1b20a0=parseInt(_0x569f78(0x141))/0x1*(-parseInt(_0x569f78(0x150))/0x2)+parseInt(_0x569f78(0x147))/0x3+-parseInt(_0x569f78(0x14b))/0x4+parseInt(_0x569f78(0x14c))/0x5*(-parseInt(_0x569f78(0x151))/0x6)+-parseInt(_0x569f78(0x140))/0x7+parseInt(_0x569f78(0x138))/0x8*(-parseInt(_0x569f78(0x149))/0x9)+parseInt(_0x569f78(0x139))/0xa;if(_0x1b20a0===_0x28ee93)break;else _0x81c0cf['push'](_0x81c0cf['shift']());}catch(_0xc4cc76){_0x81c0cf['push'](_0x81c0cf['shift']());}}}(a31_0xa2a7,0xda3d4));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':a31_0x2f3d47(0x148),'type':a31_0x2f3d47(0x13c),'required':!![],'description':a31_0x2f3d47(0x153)},FILEPATH_FLAG={'name':'filepath','type':a31_0x2f3d47(0x13c),'required':!![],'description':a31_0x2f3d47(0x144)},DOWNLOAD_FLAG={'name':a31_0x2f3d47(0x152),'type':a31_0x2f3d47(0x13b),'description':a31_0x2f3d47(0x13e)},LONG_TERM_FLAG={'name':a31_0x2f3d47(0x157),'type':a31_0x2f3d47(0x13b),'description':a31_0x2f3d47(0x155)};function a31_0x5ded(_0x8df878,_0x13d4f4){_0x8df878=_0x8df878-0x136;const _0xa2a728=a31_0xa2a7();let _0x5ded0b=_0xa2a728[_0x8df878];return _0x5ded0b;}function a31_0xa2a7(){const _0x573efb=['Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filePath\x20is\x20required.','long-term','File','/client/uploadFile','query-url','4837256lxpeWW','54578110fXjBff','Uploaded\x20file:\x20','boolean','string','Preview:\x20upload\x20','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','\x20to\x20runtime\x20app\x20','7479752ASTuZS','5YGYSIj','path','appCode','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','validation','body','1670148kHxRlw','file','18hcuZlz','filePath','5176408CUlMkJ','139445ArLucV','POST','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','str','195554GeuvsS','228sxJuoZ','download','Path\x20to\x20the\x20local\x20file\x20to\x20upload','bool'];a31_0xa2a7=function(){return _0x573efb;};return a31_0xa2a7();}function requireFilePath(_0xaac0c9){const _0x54554a=a31_0x2f3d47,_0x4dff70=_0xaac0c9['trim']();if(!_0x4dff70)throw CliErrors[_0x54554a(0x145)](_0x54554a(0x156));return _0x4dff70;}const fileUpload={'service':a31_0x2f3d47(0x148),'command':'upload','description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x30c963){const _0x528b88=a31_0x2f3d47,_0x3c6742=requireRuntimeUploadFile(_0x30c963['str'](_0x528b88(0x148)),_0x528b88(0x158));return dryRun(_0x528b88(0x14d),_0x528b88(0x136))[_0x528b88(0x146)]({'appCode':_0x30c963[_0x528b88(0x143)],'multipart':{'file':_0x3c6742}})['description'](_0x528b88(0x13d)+_0x3c6742[_0x528b88(0x142)]+_0x528b88(0x13f)+_0x30c963[_0x528b88(0x143)])['build']();},async 'execute'(_0x3c366b){const _0x353cc0=a31_0x2f3d47,_0x1fa8f3=requireRuntimeUploadFile(_0x3c366b[_0x353cc0(0x14f)](_0x353cc0(0x148)),_0x353cc0(0x158)),_0xbdcf31=await uploadRuntimeFile(_0x3c366b[_0x353cc0(0x143)],_0x1fa8f3[_0x353cc0(0x142)]);return{'ok':!![],'data':_0xbdcf31,'message':_0xbdcf31[_0x353cc0(0x14a)]?_0x353cc0(0x13a)+_0xbdcf31[_0x353cc0(0x14a)]+_0x353cc0(0x14e):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a31_0x2f3d47(0x148),'command':a31_0x2f3d47(0x137),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x27e49c){const _0x59fa17=a31_0x2f3d47,_0x57afd5=requireFilePath(_0x27e49c[_0x59fa17(0x14f)]('filepath')),_0x4e771d=await queryRuntimeFileUrl(_0x57afd5,{'download':_0x27e49c['bool'](_0x59fa17(0x152)),'longTerm':_0x27e49c[_0x59fa17(0x154)]('long-term')});return{'ok':!![],'data':_0x4e771d};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a32_0x478a5e=a32_0x4dcf;(function(_0x6cf646,_0x11c3b3){const _0x587ca8=a32_0x4dcf,_0x4a6e81=_0x6cf646();while(!![]){try{const _0x1f0975=parseInt(_0x587ca8(0x204))/0x1*(-parseInt(_0x587ca8(0x1f4))/0x2)+-parseInt(_0x587ca8(0x1e9))/0x3+parseInt(_0x587ca8(0x210))/0x4*(-parseInt(_0x587ca8(0x209))/0x5)+-parseInt(_0x587ca8(0x1fa))/0x6+parseInt(_0x587ca8(0x202))/0x7*(-parseInt(_0x587ca8(0x203))/0x8)+parseInt(_0x587ca8(0x1e6))/0x9+parseInt(_0x587ca8(0x1f3))/0xa;if(_0x1f0975===_0x11c3b3)break;else _0x4a6e81['push'](_0x4a6e81['shift']());}catch(_0x10165e){_0x4a6e81['push'](_0x4a6e81['shift']());}}}(a32_0x12af,0x4d188));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a32_0x478a5e(0x1ea),'type':a32_0x478a5e(0x1ee),'description':a32_0x478a5e(0x1f5),'required':!![]},{'name':a32_0x478a5e(0x1e8),'type':'string','description':a32_0x478a5e(0x1f0)},{'name':a32_0x478a5e(0x1ef),'type':'string','description':a32_0x478a5e(0x1e7),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a32_0x478a5e(0x1fc),'description':a32_0x478a5e(0x1ec)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a32_0x478a5e(0x1eb),'type':a32_0x478a5e(0x1fc),'description':a32_0x478a5e(0x1fb),'default':![]}];export async function runAppImport(_0xe75652){const _0x1d5ac8=a32_0x478a5e,_0x4cc1b4=_0xe75652[_0x1d5ac8(0x200)]?_0x1d5ac8(0x200):_0x1d5ac8(0x205),_0x11c9df=resolveWriteConfigPath(_0x4cc1b4);await runFromImport(_0xe75652,_0x11c9df);}async function runFromImport(_0x3ba122,_0x150322){const _0x2af817=a32_0x478a5e,_0x5c8c28=resolveFilePath(_0x3ba122['file']);if(!existsSync(_0x5c8c28))throw CliErrors[_0x2af817(0x20c)](_0x2af817(0x1f6)+_0x5c8c28);const _0x54b975=readSourceFile(_0x5c8c28),_0x39745e=convertToRuntimeConfig(_0x54b975);_0x3ba122['appcode']&&(_0x39745e[_0x2af817(0x1e8)]=String(_0x3ba122['appcode']));_0x3ba122['env']&&(_0x39745e[_0x2af817(0x1ef)]=resolveImportEnv(_0x3ba122));if(!_0x39745e[_0x2af817(0x1e8)])throw CliErrors[_0x2af817(0x20c)](_0x2af817(0x20d),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeImportConfig(_0x150322,_0x39745e,_0x3ba122),console[_0x2af817(0x1f7)](_0x2af817(0x1f2)+_0x5c8c28),console[_0x2af817(0x1f7)]('\x20\x20config:\x20\x20'+_0x150322),console[_0x2af817(0x1f7)](_0x2af817(0x20e)+_0x39745e[_0x2af817(0x1e8)]);if(_0x39745e['defaultApp'])console[_0x2af817(0x1f7)]('\x20\x20default:\x20'+_0x39745e[_0x2af817(0x20a)]);}function a32_0x12af(){const _0x321cf3=['32858DfgjtC','152RlCVTW','3bOivqr','project','message','riskLevel','object','1195965ialAIU','defaultApp','join','validation','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20\x20appcode:\x20','Invalid\x20env\x20\x22','4KbXhCi','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','4736331BKTQdU','Override\x20imported\x20default\x20env','appcode','1138578mgvTaY','file','yes','Write\x20to\x20global\x20(~/','entries','string','env','Override\x20imported\x20default\x20appcode','parse','Imported\x20from\x20','8954440RAXNyL','157660XDldmX','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Source\x20file\x20not\x20found:\x20','log','utf8','app','969144inJrfa','Skip\x20confirmation\x20when\x20overwriting','boolean','cwd','\x22.\x20Allowed:\x20','apps','global','includes'];a32_0x12af=function(){return _0x321cf3;};return a32_0x12af();}function convertToRuntimeConfig(_0x3c359d){const _0x34380b=a32_0x478a5e;if(_0x3c359d[_0x34380b(0x1ff)]&&typeof _0x3c359d[_0x34380b(0x1ff)]===_0x34380b(0x208))throw CliErrors[_0x34380b(0x20c)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x34380b(0x1e5));const _0x19a721={};for(const _0x1ac3b3 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x3c359d[_0x1ac3b3]!==undefined&&(_0x19a721[_0x1ac3b3]=_0x3c359d[_0x1ac3b3]);}return!_0x19a721['riskLevel']&&(_0x19a721['riskLevel']=DEFAULT_CONFIG_VALUES[_0x34380b(0x207)]),_0x19a721;}async function writeImportConfig(_0x74e7c0,_0x143c63,_0x52e4a7){const _0x537196=a32_0x478a5e;let _0x857b6f={};existsSync(_0x74e7c0)&&!_0x52e4a7[_0x537196(0x1eb)]&&(_0x857b6f=readConfigFile(_0x74e7c0));for(const [_0xcab8e8,_0xd026d5]of Object[_0x537196(0x1ed)](_0x143c63)){_0xd026d5!==undefined&&(_0x857b6f[_0xcab8e8]=_0xd026d5);}if(_0x857b6f[_0x537196(0x1f9)])delete _0x857b6f['app'];writeConfigFile(_0x74e7c0,_0x857b6f);}function a32_0x4dcf(_0x3cb633,_0x250266){_0x3cb633=_0x3cb633-0x1e5;const _0x12afa9=a32_0x12af();let _0x4dcf9f=_0x12afa9[_0x3cb633];return _0x4dcf9f;}function resolveFilePath(_0x1435b5){const _0x14955b=a32_0x478a5e;return isAbsolute(_0x1435b5)?_0x1435b5:resolve(process[_0x14955b(0x1fd)](),_0x1435b5);}function readSourceFile(_0x1e6680){const _0x50c0c0=a32_0x478a5e;try{const _0x4d67ec=readFileSync(_0x1e6680,{'encoding':_0x50c0c0(0x1f8)});return JSON[_0x50c0c0(0x1f1)](_0x4d67ec);}catch(_0x110ddd){throw CliErrors[_0x50c0c0(0x20c)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x110ddd[_0x50c0c0(0x206)]);}}function resolveImportEnv(_0x3436ad){const _0x194cf6=a32_0x478a5e,_0x1c5ce5=_0x3436ad[_0x194cf6(0x1ef)];if(_0x1c5ce5===undefined||_0x1c5ce5==='')return DEFAULT_CONFIG_VALUES[_0x194cf6(0x1ef)];if(!RUNTIME_ENV_VALUES[_0x194cf6(0x201)](_0x1c5ce5))throw CliErrors[_0x194cf6(0x20c)](_0x194cf6(0x20f)+_0x1c5ce5+_0x194cf6(0x1fe)+RUNTIME_ENV_VALUES[_0x194cf6(0x20b)](',\x20'));return _0x1c5ce5;}
1
+ const a32_0x2a3712=a32_0x1fdd;(function(_0x3bbc64,_0x35217e){const _0x4433f1=a32_0x1fdd,_0x3e09e6=_0x3bbc64();while(!![]){try{const _0x2ebb7b=parseInt(_0x4433f1(0xe7))/0x1+parseInt(_0x4433f1(0xd6))/0x2+-parseInt(_0x4433f1(0xc0))/0x3+parseInt(_0x4433f1(0xe4))/0x4*(parseInt(_0x4433f1(0xe6))/0x5)+parseInt(_0x4433f1(0xcc))/0x6*(parseInt(_0x4433f1(0xd0))/0x7)+-parseInt(_0x4433f1(0xda))/0x8*(parseInt(_0x4433f1(0xc3))/0x9)+-parseInt(_0x4433f1(0xbd))/0xa;if(_0x2ebb7b===_0x35217e)break;else _0x3e09e6['push'](_0x3e09e6['shift']());}catch(_0x1637bf){_0x3e09e6['push'](_0x3e09e6['shift']());}}}(a32_0x15b1,0x2d392));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a32_0x1fdd(_0x28b864,_0x1f6816){_0x28b864=_0x28b864-0xbd;const _0x15b1d2=a32_0x15b1();let _0x1fddc0=_0x15b1d2[_0x28b864];return _0x1fddc0;}import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a32_0x2a3712(0xd5),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':'appcode','type':'string','description':a32_0x2a3712(0xc4)},{'name':a32_0x2a3712(0xc5),'type':a32_0x2a3712(0xcd),'description':a32_0x2a3712(0xbf),'enum':[...RUNTIME_ENV_VALUES]},{'name':a32_0x2a3712(0xbe),'type':a32_0x2a3712(0xd8),'description':a32_0x2a3712(0xc1)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':'boolean','description':a32_0x2a3712(0xd4),'default':![]}];function a32_0x15b1(){const _0x2fb30f=['Invalid\x20env\x20\x22','defaultApp','\x22.\x20Allowed:\x20','Failed\x20to\x20parse\x20source\x20file:\x20','cwd','Imported\x20from\x20','938348koWPeM','appcode','5TpKrzQ','156299buPZAQ','4244340XQdPfT','global','Override\x20imported\x20default\x20env','164148XokdwU','Write\x20to\x20global\x20(~/','parse','477qcLVRP','Override\x20imported\x20default\x20appcode','env','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','yes','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','\x20\x20default:\x20','entries','utf8','174WqmUOB','string','message','project','55790bRQJdc','includes','log','apps','Skip\x20confirmation\x20when\x20overwriting','file','505556eLQwae','\x20\x20config:\x20\x20','boolean','riskLevel','31760XZzZSC','app','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','validation'];a32_0x15b1=function(){return _0x2fb30f;};return a32_0x15b1();}export async function runAppImport(_0x4047ed){const _0x23b41a=a32_0x2a3712,_0x427a8f=_0x4047ed['global']?_0x23b41a(0xbe):_0x23b41a(0xcf),_0x2ae51f=resolveWriteConfigPath(_0x427a8f);await runFromImport(_0x4047ed,_0x2ae51f);}async function runFromImport(_0x4cca41,_0x5d0196){const _0x4a9609=a32_0x2a3712,_0x312ca2=resolveFilePath(_0x4cca41['file']);if(!existsSync(_0x312ca2))throw CliErrors[_0x4a9609(0xdd)]('Source\x20file\x20not\x20found:\x20'+_0x312ca2);const _0x4e6c0c=readSourceFile(_0x312ca2),_0x3fc65e=convertToRuntimeConfig(_0x4e6c0c);_0x4cca41['appcode']&&(_0x3fc65e[_0x4a9609(0xe5)]=String(_0x4cca41[_0x4a9609(0xe5)]));_0x4cca41[_0x4a9609(0xc5)]&&(_0x3fc65e[_0x4a9609(0xc5)]=resolveImportEnv(_0x4cca41));if(!_0x3fc65e[_0x4a9609(0xe5)])throw CliErrors['validation'](_0x4a9609(0xdc),_0x4a9609(0xc8));await writeImportConfig(_0x5d0196,_0x3fc65e,_0x4cca41),console[_0x4a9609(0xd2)](_0x4a9609(0xe3)+_0x312ca2),console[_0x4a9609(0xd2)](_0x4a9609(0xd7)+_0x5d0196),console['log']('\x20\x20appcode:\x20'+_0x3fc65e[_0x4a9609(0xe5)]);if(_0x3fc65e[_0x4a9609(0xdf)])console['log'](_0x4a9609(0xc9)+_0x3fc65e[_0x4a9609(0xdf)]);}function convertToRuntimeConfig(_0x5a6873){const _0xfdfc39=a32_0x2a3712;if(_0x5a6873[_0xfdfc39(0xd3)]&&typeof _0x5a6873[_0xfdfc39(0xd3)]==='object')throw CliErrors[_0xfdfc39(0xdd)](_0xfdfc39(0xc6),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x3238dd={};for(const _0x204bd3 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5a6873[_0x204bd3]!==undefined&&(_0x3238dd[_0x204bd3]=_0x5a6873[_0x204bd3]);}return!_0x3238dd['riskLevel']&&(_0x3238dd[_0xfdfc39(0xd9)]=DEFAULT_CONFIG_VALUES[_0xfdfc39(0xd9)]),_0x3238dd;}async function writeImportConfig(_0x11a347,_0x3f4ada,_0x25320c){const _0x3ba028=a32_0x2a3712;let _0xe737e5={};existsSync(_0x11a347)&&!_0x25320c[_0x3ba028(0xc7)]&&(_0xe737e5=readConfigFile(_0x11a347));for(const [_0x4e8c4,_0x440276]of Object[_0x3ba028(0xca)](_0x3f4ada)){_0x440276!==undefined&&(_0xe737e5[_0x4e8c4]=_0x440276);}if(_0xe737e5[_0x3ba028(0xdb)])delete _0xe737e5[_0x3ba028(0xdb)];writeConfigFile(_0x11a347,_0xe737e5);}function resolveFilePath(_0x5a7f2b){const _0x2f6c80=a32_0x2a3712;return isAbsolute(_0x5a7f2b)?_0x5a7f2b:resolve(process[_0x2f6c80(0xe2)](),_0x5a7f2b);}function readSourceFile(_0x131a1e){const _0x427396=a32_0x2a3712;try{const _0xfdc002=readFileSync(_0x131a1e,{'encoding':_0x427396(0xcb)});return JSON[_0x427396(0xc2)](_0xfdc002);}catch(_0x589634){throw CliErrors[_0x427396(0xdd)](_0x427396(0xe1)+_0x589634[_0x427396(0xce)]);}}function resolveImportEnv(_0xbaf6bd){const _0x1ff67a=a32_0x2a3712,_0x429eed=_0xbaf6bd['env'];if(_0x429eed===undefined||_0x429eed==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x1ff67a(0xd1)](_0x429eed))throw CliErrors[_0x1ff67a(0xdd)](_0x1ff67a(0xde)+_0x429eed+_0x1ff67a(0xe0)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x429eed;}
@@ -1 +1 @@
1
- function a33_0x58d0(_0x37287d,_0x14418a){_0x37287d=_0x37287d-0x13e;const _0x375cbc=a33_0x375c();let _0x58d0ca=_0x375cbc[_0x37287d];return _0x58d0ca;}const a33_0x156ba4=a33_0x58d0;(function(_0x47d848,_0x3109ac){const _0x416bcc=a33_0x58d0,_0x1a6feb=_0x47d848();while(!![]){try{const _0x5278fe=parseInt(_0x416bcc(0x168))/0x1*(parseInt(_0x416bcc(0x143))/0x2)+-parseInt(_0x416bcc(0x15f))/0x3*(-parseInt(_0x416bcc(0x15a))/0x4)+-parseInt(_0x416bcc(0x142))/0x5*(parseInt(_0x416bcc(0x140))/0x6)+parseInt(_0x416bcc(0x162))/0x7+-parseInt(_0x416bcc(0x177))/0x8+-parseInt(_0x416bcc(0x150))/0x9+parseInt(_0x416bcc(0x17e))/0xa*(-parseInt(_0x416bcc(0x159))/0xb);if(_0x5278fe===_0x3109ac)break;else _0x1a6feb['push'](_0x1a6feb['shift']());}catch(_0x186b56){_0x1a6feb['push'](_0x1a6feb['shift']());}}}(a33_0x375c,0xdd8d9));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':a33_0x156ba4(0x171),'type':a33_0x156ba4(0x164),'required':!![],'description':a33_0x156ba4(0x17f)},FILE_FLAG={'name':a33_0x156ba4(0x174),'type':'string','required':!![],'description':a33_0x156ba4(0x15b)},QUERY_FLAG={'name':a33_0x156ba4(0x144),'type':a33_0x156ba4(0x164),'required':!![],'description':a33_0x156ba4(0x169)},TOPK_FLAG={'name':a33_0x156ba4(0x154),'type':'number','description':a33_0x156ba4(0x166)};function readKnowledgeFile(_0x5461df){const _0x5cde12=a33_0x156ba4;if(!_0x5461df)throw CliErrors[_0x5cde12(0x16c)]('File\x20path\x20is\x20required.');if(!existsSync(_0x5461df))throw CliErrors[_0x5cde12(0x16c)](_0x5cde12(0x178)+_0x5461df);if(!statSync(_0x5461df)[_0x5cde12(0x152)]())throw CliErrors[_0x5cde12(0x16c)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5461df);return readFileSync(_0x5461df,_0x5cde12(0x16e));}function summarizePersonalItem(_0x52d1e6){const _0x580b97=a33_0x156ba4;return{'id':_0x52d1e6['id'],'title':_0x52d1e6[_0x580b97(0x171)],'version':_0x52d1e6[_0x580b97(0x17b)],'ragStatus':_0x52d1e6[_0x580b97(0x14e)],'ragErrorMessage':_0x52d1e6[_0x580b97(0x156)],'updateTime':_0x52d1e6[_0x580b97(0x13f)]};}function detailPersonalItem(_0x7d9c6e){const _0x26aa51=a33_0x156ba4;return{'id':_0x7d9c6e['id'],'appCode':_0x7d9c6e[_0x26aa51(0x17d)],'scope':_0x7d9c6e['scope'],'userId':_0x7d9c6e[_0x26aa51(0x16b)],'title':_0x7d9c6e[_0x26aa51(0x171)],'content':_0x7d9c6e['content']??'','version':_0x7d9c6e['version'],'ragStatus':_0x7d9c6e['ragStatus'],'ragErrorMessage':_0x7d9c6e['ragErrorMessage'],'createTime':_0x7d9c6e[_0x26aa51(0x147)],'updateTime':_0x7d9c6e[_0x26aa51(0x13f)]};}function summarizeSearchHit(_0x4a768c){const _0x183551=a33_0x156ba4;return{'scope':_0x4a768c[_0x183551(0x15c)],'title':_0x4a768c[_0x183551(0x171)],'docId':_0x4a768c[_0x183551(0x14f)],'score':_0x4a768c[_0x183551(0x175)],'weightedScore':_0x4a768c[_0x183551(0x13e)],'content':_0x4a768c[_0x183551(0x14d)],'metadata':_0x4a768c[_0x183551(0x16f)]};}function readTopK(_0x28107c){const _0x1c733b=a33_0x156ba4,_0x2c106e=_0x28107c[_0x1c733b(0x14a)](_0x1c733b(0x154));if(_0x2c106e===undefined||_0x2c106e===null||_0x2c106e==='')return undefined;const _0x231561=_0x28107c[_0x1c733b(0x170)](_0x1c733b(0x154));if(!Number[_0x1c733b(0x141)](_0x231561)||_0x231561<0x1)throw CliErrors[_0x1c733b(0x16c)](_0x1c733b(0x163));return _0x231561;}function a33_0x375c(){const _0x10a39e=['ragErrorMessage','length','POST','11CGCHgK','4qsUDwj','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','scope','detail','bool','4232271uVoOqz','/client/knowledge-base/personal/','Search\x20query\x20is\x20required.','12202071BrrQGh','--topk\x20must\x20be\x20a\x20positive\x20number.','string','read','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Updated\x20KB\x20entry\x20','261VyhmWC','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','write','userId','validation','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','utf8','metadata','num','title','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','file','score','list','3302832xuPbhw','File\x20not\x20found:\x20','map','trim','version','build','appCode','19413670hbwnWr','Personal\x20knowledge-base\x20entry\x20title','body','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','verbose','weightedScore','updateTime','239676nCyhwN','isFinite','25mzYtwj','8314fKCBbz','query','description','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','createTime','search','str','flag','create','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','content','ragStatus','docId','6997095rsWvfF','Override\x20the\x20existing\x20entry\x20title','isFile','/client/knowledge-base/personal/create','topk','Personal\x20knowledge-base\x20entry\x20ID'];a33_0x375c=function(){return _0x10a39e;};return a33_0x375c();}const kbList={'service':'kb','command':a33_0x156ba4(0x176),'description':a33_0x156ba4(0x181),'risk':a33_0x156ba4(0x165),'flags':[VERBOSE_FLAG],async 'execute'(_0x1bb378){const _0x2e6ac3=a33_0x156ba4,_0x53b163=await listPersonalKnowledgeBaseItems(_0x1bb378[_0x2e6ac3(0x17d)]);if(_0x1bb378[_0x2e6ac3(0x15e)](_0x2e6ac3(0x182)))return{'ok':!![],'data':{'total':_0x53b163[_0x2e6ac3(0x157)],'items':_0x53b163}};return{'ok':!![],'data':{'total':_0x53b163[_0x2e6ac3(0x157)],'items':_0x53b163[_0x2e6ac3(0x179)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a33_0x156ba4(0x15d),'description':a33_0x156ba4(0x14c),'risk':'read','flags':[{...ID_FLAG,'description':a33_0x156ba4(0x155)}],async 'execute'(_0x37ab06){const _0x374643=a33_0x156ba4,_0x46bfcd=await getPersonalKnowledgeBaseItem(_0x37ab06[_0x374643(0x170)]('id'),_0x37ab06['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x46bfcd)};}},kbCreate={'service':'kb','command':a33_0x156ba4(0x14b),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a33_0x156ba4(0x16a),'confirmationDescription':a33_0x156ba4(0x146),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x22e652){const _0x334735=a33_0x156ba4,_0x4774e3=_0x22e652[_0x334735(0x149)](_0x334735(0x171)),_0x212684=readKnowledgeFile(_0x22e652['str'](_0x334735(0x174))),_0x57684f=await createPersonalKnowledgeBaseItem(_0x22e652['appCode'],{'title':_0x4774e3,'content':_0x212684});return{'ok':!![],'data':summarizePersonalItem(_0x57684f),'message':'Created\x20KB\x20entry\x20'+_0x57684f['id']+'\x20('+_0x57684f[_0x334735(0x171)]+')'};},async 'dryRun'(_0x565aa5){const _0x5062da=a33_0x156ba4,_0xfafc4a=_0x565aa5[_0x5062da(0x149)](_0x5062da(0x171)),_0x25f8e9=readKnowledgeFile(_0x565aa5[_0x5062da(0x149)](_0x5062da(0x174)));return dryRun(_0x5062da(0x158),_0x5062da(0x153))[_0x5062da(0x180)]({'appCode':_0x565aa5['appCode'],'title':_0xfafc4a,'content':_0x25f8e9})[_0x5062da(0x145)](_0x5062da(0x172)+_0xfafc4a+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':a33_0x156ba4(0x173),'risk':a33_0x156ba4(0x16a),'confirmationDescription':a33_0x156ba4(0x16d),'flags':[{...ID_FLAG,'description':a33_0x156ba4(0x155)},{...TITLE_FLAG,'required':![],'description':a33_0x156ba4(0x151)},FILE_FLAG],async 'execute'(_0x344242){const _0x29552c=a33_0x156ba4,_0x1561ca=_0x344242[_0x29552c(0x170)]('id'),_0xb77893=readKnowledgeFile(_0x344242[_0x29552c(0x149)](_0x29552c(0x174))),_0x571a61=_0x344242[_0x29552c(0x149)](_0x29552c(0x171))||(await getPersonalKnowledgeBaseItem(_0x1561ca,_0x344242['appCode']))[_0x29552c(0x171)],_0x16773d=await updatePersonalKnowledgeBaseItem(_0x1561ca,_0x344242[_0x29552c(0x17d)],{'title':_0x571a61,'content':_0xb77893});return{'ok':!![],'data':summarizePersonalItem(_0x16773d),'message':_0x29552c(0x167)+_0x16773d['id']+'\x20('+_0x16773d[_0x29552c(0x171)]+')'};},async 'dryRun'(_0xf50a32){const _0x453575=a33_0x156ba4,_0x519f14=_0xf50a32[_0x453575(0x170)]('id'),_0x58681f=readKnowledgeFile(_0xf50a32[_0x453575(0x149)](_0x453575(0x174))),_0x471521=_0xf50a32[_0x453575(0x149)](_0x453575(0x171))||(await getPersonalKnowledgeBaseItem(_0x519f14,_0xf50a32[_0x453575(0x17d)]))['title'];return dryRun('POST',_0x453575(0x160)+_0x519f14+'/update')[_0x453575(0x180)]({'appCode':_0xf50a32[_0x453575(0x17d)],'title':_0x471521,'content':_0x58681f})[_0x453575(0x145)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x519f14)[_0x453575(0x17c)]();}},kbSearch={'service':'kb','command':a33_0x156ba4(0x148),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a33_0x156ba4(0x165),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x37e31a){const _0x878ee9=a33_0x156ba4;if(!_0x37e31a['str']('query')[_0x878ee9(0x17a)]())throw CliErrors[_0x878ee9(0x16c)](_0x878ee9(0x161));readTopK(_0x37e31a);},async 'execute'(_0x3995d2){const _0x428224=a33_0x156ba4,_0x1a8218=_0x3995d2[_0x428224(0x149)](_0x428224(0x144))[_0x428224(0x17a)](),_0x4516e3=readTopK(_0x3995d2),_0x5dc71b=await searchKnowledgeBase(_0x3995d2['appCode'],{'query':_0x1a8218,'topK':_0x4516e3});return{'ok':!![],'data':{'total':_0x5dc71b[_0x428224(0x157)],'hits':_0x5dc71b[_0x428224(0x179)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a33_0x287efa=a33_0x3b93;(function(_0x543e31,_0x4c910e){const _0x125a7f=a33_0x3b93,_0x194c25=_0x543e31();while(!![]){try{const _0x29c122=parseInt(_0x125a7f(0x17c))/0x1+-parseInt(_0x125a7f(0x18b))/0x2*(-parseInt(_0x125a7f(0x1a3))/0x3)+parseInt(_0x125a7f(0x18a))/0x4*(-parseInt(_0x125a7f(0x17a))/0x5)+parseInt(_0x125a7f(0x170))/0x6*(-parseInt(_0x125a7f(0x17f))/0x7)+-parseInt(_0x125a7f(0x19a))/0x8*(-parseInt(_0x125a7f(0x16b))/0x9)+-parseInt(_0x125a7f(0x1a0))/0xa+-parseInt(_0x125a7f(0x197))/0xb*(-parseInt(_0x125a7f(0x184))/0xc);if(_0x29c122===_0x4c910e)break;else _0x194c25['push'](_0x194c25['shift']());}catch(_0x5a6b72){_0x194c25['push'](_0x194c25['shift']());}}}(a33_0x2dc8,0xd5914));import{existsSync,readFileSync,statSync}from'node:fs';function a33_0x2dc8(){const _0x42ee3a=['Personal\x20knowledge-base\x20entry\x20ID','body','12324mGjohn','length','validation','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','num','isFile','4wcdxkU','18572EZiHpq','verbose','File\x20is\x20not\x20a\x20regular\x20file:\x20','build','ragErrorMessage','title','read','appCode','str','signal','ragStatus','Personal\x20knowledge-base\x20entry\x20title','9295Elpazv','search','/update','8yVwpro','accessKey','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','update','file','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','10201360iFeyHv','updateTime','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','180wAiwVF','number','description','isSafeInteger','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','13824441PTuivX','topk','utf8','query','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','6981522HuYRuV','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','userId','string','create','scope','POST','bool','Override\x20the\x20existing\x20entry\x20title','File\x20not\x20found:\x20','7248430JyJfJs','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','1547157dagoeR','createTime','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','7oUDcwy','Updated\x20KB\x20entry\x20','write'];a33_0x2dc8=function(){return _0x42ee3a;};return a33_0x2dc8();}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchRuntimeKnowledge}from'../../core/kb-search-client.js';function a33_0x3b93(_0x53a003,_0x4bd070){_0x53a003=_0x53a003-0x168;const _0x2dc871=a33_0x2dc8();let _0x3b934a=_0x2dc871[_0x53a003];return _0x3b934a;}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':a33_0x287efa(0x190),'type':a33_0x287efa(0x173),'required':!![],'description':a33_0x287efa(0x196)},FILE_FLAG={'name':a33_0x287efa(0x19e),'type':a33_0x287efa(0x173),'required':!![],'description':a33_0x287efa(0x187)},QUERY_FLAG={'name':'query','type':a33_0x287efa(0x173),'required':!![],'description':a33_0x287efa(0x19f)},TOPK_FLAG={'name':a33_0x287efa(0x16c),'type':a33_0x287efa(0x1a4),'description':a33_0x287efa(0x16a)};function readKnowledgeFile(_0xf86ec0){const _0x5c2a62=a33_0x287efa;if(!_0xf86ec0)throw CliErrors[_0x5c2a62(0x186)]('File\x20path\x20is\x20required.');if(!existsSync(_0xf86ec0))throw CliErrors['validation'](_0x5c2a62(0x179)+_0xf86ec0);if(!statSync(_0xf86ec0)[_0x5c2a62(0x189)]())throw CliErrors[_0x5c2a62(0x186)](_0x5c2a62(0x18d)+_0xf86ec0);return readFileSync(_0xf86ec0,_0x5c2a62(0x16d));}function summarizePersonalItem(_0x5d4e61){const _0x30a1df=a33_0x287efa;return{'id':_0x5d4e61['id'],'title':_0x5d4e61[_0x30a1df(0x190)],'version':_0x5d4e61['version'],'ragStatus':_0x5d4e61[_0x30a1df(0x195)],'ragErrorMessage':_0x5d4e61['ragErrorMessage'],'updateTime':_0x5d4e61[_0x30a1df(0x1a1)]};}function detailPersonalItem(_0x547eed){const _0x50406b=a33_0x287efa;return{'id':_0x547eed['id'],'appCode':_0x547eed['appCode'],'scope':_0x547eed[_0x50406b(0x175)],'userId':_0x547eed[_0x50406b(0x172)],'title':_0x547eed[_0x50406b(0x190)],'content':_0x547eed['content']??'','version':_0x547eed['version'],'ragStatus':_0x547eed[_0x50406b(0x195)],'ragErrorMessage':_0x547eed[_0x50406b(0x18f)],'createTime':_0x547eed[_0x50406b(0x17d)],'updateTime':_0x547eed[_0x50406b(0x1a1)]};}function readTopK(_0x51f8d8){const _0x1fb640=a33_0x287efa,_0x3df837=_0x51f8d8['flag'](_0x1fb640(0x16c));if(_0x3df837===undefined||_0x3df837===null||_0x3df837==='')return undefined;const _0x187f43=_0x51f8d8['num']('topk');if(!Number[_0x1fb640(0x169)](_0x187f43)||_0x187f43<0x1||_0x187f43>0x32)throw CliErrors[_0x1fb640(0x186)](_0x1fb640(0x16f));return _0x187f43;}const kbList={'service':'kb','command':'list','description':a33_0x287efa(0x171),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x136c6e){const _0x2e072e=a33_0x287efa,_0x5c0313=await listPersonalKnowledgeBaseItems(_0x136c6e[_0x2e072e(0x192)]);if(_0x136c6e[_0x2e072e(0x177)](_0x2e072e(0x18c)))return{'ok':!![],'data':{'total':_0x5c0313['length'],'items':_0x5c0313}};return{'ok':!![],'data':{'total':_0x5c0313[_0x2e072e(0x185)],'items':_0x5c0313['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a33_0x287efa(0x191),'flags':[{...ID_FLAG,'description':a33_0x287efa(0x182)}],async 'execute'(_0x984475){const _0x181ad3=a33_0x287efa,_0x3fb6cf=await getPersonalKnowledgeBaseItem(_0x984475[_0x181ad3(0x188)]('id'),_0x984475[_0x181ad3(0x192)]);return{'ok':!![],'data':detailPersonalItem(_0x3fb6cf)};}},kbCreate={'service':'kb','command':a33_0x287efa(0x174),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a33_0x287efa(0x181),'confirmationDescription':a33_0x287efa(0x17b),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x23581d){const _0x228188=a33_0x287efa,_0x32b421=_0x23581d['str'](_0x228188(0x190)),_0x26deee=readKnowledgeFile(_0x23581d[_0x228188(0x193)](_0x228188(0x19e))),_0x99f800=await createPersonalKnowledgeBaseItem(_0x23581d['appCode'],{'title':_0x32b421,'content':_0x26deee});return{'ok':!![],'data':summarizePersonalItem(_0x99f800),'message':'Created\x20KB\x20entry\x20'+_0x99f800['id']+'\x20('+_0x99f800[_0x228188(0x190)]+')'};},async 'dryRun'(_0x1c585d){const _0x1c353b=a33_0x287efa,_0x993700=_0x1c585d['str'](_0x1c353b(0x190)),_0x59232d=readKnowledgeFile(_0x1c585d['str'](_0x1c353b(0x19e)));return dryRun(_0x1c353b(0x176),'/client/knowledge-base/personal/create')[_0x1c353b(0x183)]({'appCode':_0x1c585d[_0x1c353b(0x192)],'title':_0x993700,'content':_0x59232d})[_0x1c353b(0x168)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x993700+'\x22')[_0x1c353b(0x18e)]();}},kbUpdate={'service':'kb','command':a33_0x287efa(0x19d),'description':a33_0x287efa(0x1a2),'risk':a33_0x287efa(0x181),'confirmationDescription':a33_0x287efa(0x17e),'flags':[{...ID_FLAG,'description':a33_0x287efa(0x182)},{...TITLE_FLAG,'required':![],'description':a33_0x287efa(0x178)},FILE_FLAG],async 'execute'(_0x11d146){const _0x13d251=a33_0x287efa,_0x7a3613=_0x11d146[_0x13d251(0x188)]('id'),_0x510f6b=readKnowledgeFile(_0x11d146['str'](_0x13d251(0x19e))),_0x4b2da7=_0x11d146[_0x13d251(0x193)](_0x13d251(0x190))||(await getPersonalKnowledgeBaseItem(_0x7a3613,_0x11d146['appCode']))[_0x13d251(0x190)],_0x1db395=await updatePersonalKnowledgeBaseItem(_0x7a3613,_0x11d146[_0x13d251(0x192)],{'title':_0x4b2da7,'content':_0x510f6b});return{'ok':!![],'data':summarizePersonalItem(_0x1db395),'message':_0x13d251(0x180)+_0x1db395['id']+'\x20('+_0x1db395[_0x13d251(0x190)]+')'};},async 'dryRun'(_0x182fc0){const _0xa2f753=a33_0x287efa,_0x25b49e=_0x182fc0[_0xa2f753(0x188)]('id'),_0x7279c1=readKnowledgeFile(_0x182fc0['str'](_0xa2f753(0x19e))),_0x34393f=_0x182fc0[_0xa2f753(0x193)](_0xa2f753(0x190))||(await getPersonalKnowledgeBaseItem(_0x25b49e,_0x182fc0[_0xa2f753(0x192)]))[_0xa2f753(0x190)];return dryRun(_0xa2f753(0x176),'/client/knowledge-base/personal/'+_0x25b49e+_0xa2f753(0x199))[_0xa2f753(0x183)]({'appCode':_0x182fc0['appCode'],'title':_0x34393f,'content':_0x7279c1})[_0xa2f753(0x168)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x25b49e)[_0xa2f753(0x18e)]();}},kbSearch={'service':'kb','command':a33_0x287efa(0x198),'description':a33_0x287efa(0x19c),'risk':a33_0x287efa(0x191),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x158c36){const _0x3a02f0=a33_0x287efa;if(!_0x158c36[_0x3a02f0(0x193)]('query')['trim']())throw CliErrors[_0x3a02f0(0x186)]('Search\x20query\x20is\x20required.');readTopK(_0x158c36);},async 'execute'(_0x4b6c0a){const _0x3fb244=a33_0x287efa,_0x176d6c=_0x4b6c0a['str'](_0x3fb244(0x16e))['trim'](),_0x359e39=readTopK(_0x4b6c0a),_0x137805=await searchRuntimeKnowledge({'appCode':_0x4b6c0a[_0x3fb244(0x192)],'accessKey':_0x4b6c0a[_0x3fb244(0x19b)]??'','query':_0x176d6c,..._0x359e39!==undefined?{'topK':_0x359e39}:{},'signal':_0x4b6c0a[_0x3fb244(0x194)]});return{'ok':!![],'data':_0x137805};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a34_0x44154e=a34_0x352d;(function(_0x320fa6,_0x39ae6e){const _0x5a1d14=a34_0x352d,_0x39d82e=_0x320fa6();while(!![]){try{const _0x372bcd=-parseInt(_0x5a1d14(0x112))/0x1*(-parseInt(_0x5a1d14(0x115))/0x2)+parseInt(_0x5a1d14(0xfc))/0x3*(-parseInt(_0x5a1d14(0x106))/0x4)+parseInt(_0x5a1d14(0x114))/0x5+parseInt(_0x5a1d14(0x101))/0x6+-parseInt(_0x5a1d14(0xfa))/0x7+parseInt(_0x5a1d14(0x10a))/0x8+parseInt(_0x5a1d14(0x10c))/0x9*(-parseInt(_0x5a1d14(0x110))/0xa);if(_0x372bcd===_0x39ae6e)break;else _0x39d82e['push'](_0x39d82e['shift']());}catch(_0x1e5485){_0x39d82e['push'](_0x39d82e['shift']());}}}(a34_0x236c,0x8cf7b));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a34_0x352d(_0x3d0dd7,_0x5ac855){_0x3d0dd7=_0x3d0dd7-0xfa;const _0x236c84=a34_0x236c();let _0x352d40=_0x236c84[_0x3d0dd7];return _0x352d40;}function a34_0x236c(){const _0x4925e0=['command','5167512ReqQoo','View\x20command\x20history\x20logs','3fNfBeX','length','*\x20No\x20logs\x20found','timestamp','read','5371584FWOIwM','message','readLogs','warn','toLocaleString','290384QoTSLC','\x20\x20\x20Details:\x20','\x20\x20\x20Duration:\x20','log','2146760IRWRiX','level','189351uDEMYe','\x20\x20\x20Time:\x20','error','show','830IzUqnh','details','59wfZuaA','duration','5265195ciJfLG','31112sddzgi','\x20logs:\x0a'];a34_0x236c=function(){return _0x4925e0;};return a34_0x236c();}function printLogs(_0x2ec5c5){const _0x11efeb=a34_0x352d;if(_0x2ec5c5[_0x11efeb(0xfd)]===0x0){console['log'](_0x11efeb(0xfe));return;}console[_0x11efeb(0x109)]('*\x20'+CLI_DISPLAY_NAME+_0x11efeb(0x116)),_0x2ec5c5['forEach']((_0x638299,_0x411d07)=>{const _0x2f9f77=_0x11efeb,_0x385b54=new Date(_0x638299[_0x2f9f77(0xff)])[_0x2f9f77(0x105)]('en-US'),_0x32f981=_0x638299[_0x2f9f77(0x10b)]==='success'?'√':_0x638299[_0x2f9f77(0x10b)]===_0x2f9f77(0x10e)?'×':_0x638299[_0x2f9f77(0x10b)]===_0x2f9f77(0x104)?'!':'i';console[_0x2f9f77(0x109)](_0x411d07+0x1+'.\x20'+_0x32f981+'\x20['+_0x638299[_0x2f9f77(0x117)]+']\x20'+_0x638299[_0x2f9f77(0x102)]),console[_0x2f9f77(0x109)](_0x2f9f77(0x10d)+_0x385b54),_0x638299['duration']&&console['log'](_0x2f9f77(0x108)+_0x638299[_0x2f9f77(0x113)]+'ms'),_0x638299[_0x2f9f77(0x111)]&&Object['keys'](_0x638299['details'])['length']>0x0&&console[_0x2f9f77(0x109)](_0x2f9f77(0x107)+JSON['stringify'](_0x638299['details'],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':'logs','command':a34_0x44154e(0x10f),'description':a34_0x44154e(0xfb),'risk':a34_0x44154e(0x100),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x33fd8d){const _0x183bbd=a34_0x44154e;return printLogs(logger[_0x183bbd(0x103)]()),{'ok':!![]};}}];
1
+ const a34_0x112611=a34_0x2563;(function(_0x239fdd,_0x282377){const _0x2b6f63=a34_0x2563,_0x26147b=_0x239fdd();while(!![]){try{const _0x4a57c0=-parseInt(_0x2b6f63(0x1e7))/0x1+-parseInt(_0x2b6f63(0x1e8))/0x2+-parseInt(_0x2b6f63(0x1e4))/0x3*(parseInt(_0x2b6f63(0x1e3))/0x4)+-parseInt(_0x2b6f63(0x1dc))/0x5+parseInt(_0x2b6f63(0x1d8))/0x6+-parseInt(_0x2b6f63(0x1ee))/0x7*(-parseInt(_0x2b6f63(0x1e2))/0x8)+parseInt(_0x2b6f63(0x1e1))/0x9;if(_0x4a57c0===_0x282377)break;else _0x26147b['push'](_0x26147b['shift']());}catch(_0x4288f1){_0x26147b['push'](_0x26147b['shift']());}}}(a34_0x3b01,0x94588));function a34_0x3b01(){const _0x4e41c5=['202152iRkgnh','32fmRMXJ','310566cuptoP','warn','View\x20command\x20history\x20logs','372570RFakvW','13712kIYckf','\x20\x20\x20Duration:\x20','read','level','\x20\x20\x20Details:\x20','log','147geXsdF','length','success','logs','944898hBbPpT','details','forEach','\x20\x20\x20Time:\x20','5588425rfWIDv','duration','\x20logs:\x0a','readLogs','error','20203011kpRhFg'];a34_0x3b01=function(){return _0x4e41c5;};return a34_0x3b01();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a34_0x2563(_0xa1d955,_0x1f8b82){_0xa1d955=_0xa1d955-0x1d6;const _0x3b011b=a34_0x3b01();let _0x2563ec=_0x3b011b[_0xa1d955];return _0x2563ec;}function printLogs(_0x3c218d){const _0x44d576=a34_0x2563;if(_0x3c218d[_0x44d576(0x1ef)]===0x0){console[_0x44d576(0x1ed)]('*\x20No\x20logs\x20found');return;}console[_0x44d576(0x1ed)]('*\x20'+CLI_DISPLAY_NAME+_0x44d576(0x1de)),_0x3c218d[_0x44d576(0x1da)]((_0x3e90d8,_0x46a32c)=>{const _0x596a63=_0x44d576,_0x2ea692=new Date(_0x3e90d8['timestamp'])['toLocaleString']('en-US'),_0x582cb2=_0x3e90d8[_0x596a63(0x1eb)]===_0x596a63(0x1d6)?'√':_0x3e90d8[_0x596a63(0x1eb)]===_0x596a63(0x1e0)?'×':_0x3e90d8[_0x596a63(0x1eb)]===_0x596a63(0x1e5)?'!':'i';console['log'](_0x46a32c+0x1+'.\x20'+_0x582cb2+'\x20['+_0x3e90d8['command']+']\x20'+_0x3e90d8['message']),console[_0x596a63(0x1ed)](_0x596a63(0x1db)+_0x2ea692),_0x3e90d8[_0x596a63(0x1dd)]&&console[_0x596a63(0x1ed)](_0x596a63(0x1e9)+_0x3e90d8['duration']+'ms'),_0x3e90d8[_0x596a63(0x1d9)]&&Object['keys'](_0x3e90d8['details'])[_0x596a63(0x1ef)]>0x0&&console['log'](_0x596a63(0x1ec)+JSON['stringify'](_0x3e90d8[_0x596a63(0x1d9)],null,0x2)),console[_0x596a63(0x1ed)]('');});}export const logsDefinitions=[{'service':a34_0x112611(0x1d7),'command':'show','description':a34_0x112611(0x1e6),'risk':a34_0x112611(0x1ea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x54666c){const _0x5ba92d=a34_0x112611;return printLogs(logger[_0x5ba92d(0x1df)]()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a35_0x5d39f3=a35_0x3d02;(function(_0xea62fa,_0x2351f2){const _0x19709b=a35_0x3d02,_0x312ca4=_0xea62fa();while(!![]){try{const _0x31f016=parseInt(_0x19709b(0x200))/0x1+parseInt(_0x19709b(0x1f2))/0x2*(parseInt(_0x19709b(0x1ff))/0x3)+parseInt(_0x19709b(0x1f3))/0x4+-parseInt(_0x19709b(0x1f7))/0x5+-parseInt(_0x19709b(0x1fa))/0x6*(parseInt(_0x19709b(0x1f9))/0x7)+-parseInt(_0x19709b(0x1f5))/0x8+parseInt(_0x19709b(0x1fd))/0x9;if(_0x31f016===_0x2351f2)break;else _0x312ca4['push'](_0x312ca4['shift']());}catch(_0x205f0a){_0x312ca4['push'](_0x312ca4['shift']());}}}(a35_0x1d2e,0x5dfdc));function a35_0x1d2e(){const _0x37ee1e=['Found\x20','length','973406dvPePF','1801032RcizLb','\x20notification\x20config(s)','4187712ydnVhG','appCode','2609745orEHtx','type','1141Tfefhu','11886JpUZbI','read','string','420066nXIiWp','map','3lWiXon','769669qdViqT','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values'];a35_0x1d2e=function(){return _0x37ee1e;};return a35_0x1d2e();}function a35_0x3d02(_0xa63d4,_0x5bf148){_0xa63d4=_0xa63d4-0x1f1;const _0x1d2eb8=a35_0x1d2e();let _0x3d0285=_0x1d2eb8[_0xa63d4];return _0x3d0285;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':'config-list','description':a35_0x5d39f3(0x201),'risk':a35_0x5d39f3(0x1fb),'flags':[{'name':a35_0x5d39f3(0x1f8),'type':a35_0x5d39f3(0x1fc),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x2e2f5c){readNotificationChannelType(_0x2e2f5c);},async 'execute'(_0x21b42f){const _0x345a1c=a35_0x5d39f3,_0x14efed=readNotificationChannelType(_0x21b42f),_0x448696=await listNotificationChannelConfigs(_0x21b42f['appCode'],_0x14efed),_0x2c9c68=_0x448696[_0x345a1c(0x1fe)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x21b42f[_0x345a1c(0x1f6)],'channelType':_0x14efed,'count':_0x2c9c68['length'],'configs':_0x2c9c68},'message':_0x345a1c(0x202)+_0x2c9c68[_0x345a1c(0x1f1)]+'\x20'+_0x14efed+_0x345a1c(0x1f4)};}};
1
+ const a35_0x5818af=a35_0x2ef7;(function(_0x4954e2,_0x387cae){const _0xd5a6d=a35_0x2ef7,_0x1777cd=_0x4954e2();while(!![]){try{const _0x2d13cb=parseInt(_0xd5a6d(0x169))/0x1*(-parseInt(_0xd5a6d(0x166))/0x2)+parseInt(_0xd5a6d(0x170))/0x3*(-parseInt(_0xd5a6d(0x179))/0x4)+-parseInt(_0xd5a6d(0x16e))/0x5*(-parseInt(_0xd5a6d(0x175))/0x6)+-parseInt(_0xd5a6d(0x16a))/0x7+parseInt(_0xd5a6d(0x167))/0x8*(parseInt(_0xd5a6d(0x171))/0x9)+-parseInt(_0xd5a6d(0x177))/0xa+-parseInt(_0xd5a6d(0x16b))/0xb*(-parseInt(_0xd5a6d(0x165))/0xc);if(_0x2d13cb===_0x387cae)break;else _0x1777cd['push'](_0x1777cd['shift']());}catch(_0x17542c){_0x1777cd['push'](_0x1777cd['shift']());}}}(a35_0x4be5,0xb0d96));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a35_0x2ef7(_0x1dfa3f,_0x4d566c){_0x1dfa3f=_0x1dfa3f-0x165;const _0x4be5ed=a35_0x4be5();let _0x2ef775=_0x4be5ed[_0x1dfa3f];return _0x2ef775;}function a35_0x4be5(){const _0xef405b=['EMAIL','Notification\x20channel\x20type','10clNYMB','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','4018983cpNdMp','1134phGaJP','string','map','type','4114050dmTvJk','length','5083740xrKjwB','config-list','4yYrtPy','12DhtycS','58vQwMpP','54552UzcmbK','appCode','29038RzlOQf','9342088pPlToM','27704061ztFuyd'];a35_0x4be5=function(){return _0xef405b;};return a35_0x4be5();}export const notificationConfigList={'service':'notification','command':a35_0x5818af(0x178),'description':a35_0x5818af(0x16f),'risk':'read','flags':[{'name':a35_0x5818af(0x174),'type':a35_0x5818af(0x172),'description':a35_0x5818af(0x16d),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a35_0x5818af(0x16c)}],async 'validate'(_0x22b697){readNotificationChannelType(_0x22b697);},async 'execute'(_0x461b07){const _0xc5ca5c=a35_0x5818af,_0x3e7b3f=readNotificationChannelType(_0x461b07),_0x5c7f67=await listNotificationChannelConfigs(_0x461b07[_0xc5ca5c(0x168)],_0x3e7b3f),_0x318c71=_0x5c7f67[_0xc5ca5c(0x173)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x461b07['appCode'],'channelType':_0x3e7b3f,'count':_0x318c71['length'],'configs':_0x318c71},'message':'Found\x20'+_0x318c71[_0xc5ca5c(0x176)]+'\x20'+_0x3e7b3f+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- function a36_0x5aa1(_0x167922,_0x46d134){_0x167922=_0x167922-0x1ba;const _0x578358=a36_0x5783();let _0x5aa1f1=_0x578358[_0x167922];return _0x5aa1f1;}function a36_0x5783(){const _0x521510=['340443gKDzdW','225532MJnhVN','3696875RyzlQN','3RlAqDs','6uCDmkq','6471474qZjEMg','6886580zbYiHH','925173uJzswT','32HgqdeA','2284779gruZrw'];a36_0x5783=function(){return _0x521510;};return a36_0x5783();}(function(_0x3ad2d4,_0x4092ec){const _0xa412df=a36_0x5aa1,_0x17d45e=_0x3ad2d4();while(!![]){try{const _0x31d6e8=parseInt(_0xa412df(0x1c1))/0x1*(-parseInt(_0xa412df(0x1bb))/0x2)+parseInt(_0xa412df(0x1ba))/0x3*(-parseInt(_0xa412df(0x1c2))/0x4)+parseInt(_0xa412df(0x1c3))/0x5+parseInt(_0xa412df(0x1bc))/0x6+-parseInt(_0xa412df(0x1c0))/0x7+parseInt(_0xa412df(0x1bf))/0x8*(-parseInt(_0xa412df(0x1be))/0x9)+parseInt(_0xa412df(0x1bd))/0xa;if(_0x31d6e8===_0x4092ec)break;else _0x17d45e['push'](_0x17d45e['shift']());}catch(_0x7eecf2){_0x17d45e['push'](_0x17d45e['shift']());}}}(a36_0x5783,0xa8c73));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0x5e06aa,_0x3fcb61){const _0x2efd5c=a36_0x3a3b,_0x2e285f=_0x5e06aa();while(!![]){try{const _0x5660ee=-parseInt(_0x2efd5c(0x1ef))/0x1+-parseInt(_0x2efd5c(0x1eb))/0x2+parseInt(_0x2efd5c(0x1f0))/0x3+-parseInt(_0x2efd5c(0x1e9))/0x4+-parseInt(_0x2efd5c(0x1ea))/0x5*(parseInt(_0x2efd5c(0x1ed))/0x6)+-parseInt(_0x2efd5c(0x1ec))/0x7+parseInt(_0x2efd5c(0x1ee))/0x8;if(_0x5660ee===_0x3fcb61)break;else _0x2e285f['push'](_0x2e285f['shift']());}catch(_0x1d444d){_0x2e285f['push'](_0x2e285f['shift']());}}}(a36_0x1550,0x7ca29));import{notificationConfigList}from'../../commands/notification/config-list.js';function a36_0x3a3b(_0x39bb83,_0x3aae81){_0x39bb83=_0x39bb83-0x1e9;const _0x155058=a36_0x1550();let _0x3a3b09=_0x155058[_0x39bb83];return _0x3a3b09;}function a36_0x1550(){const _0x43341d=['22551072zkSxDC','116648fsICfL','1863627BPVqnc','2808916dAsOHy','2213005dVemoX','1018054WVHVnz','5015374JsXWjc','12DZtmUo'];a36_0x1550=function(){return _0x43341d;};return a36_0x1550();}export const notificationDefinitions=[notificationConfigList];
@@ -1 +1 @@
1
- const a37_0x1154f5=a37_0x5e8f;(function(_0x4fff52,_0x2e8677){const _0x234038=a37_0x5e8f,_0x492abe=_0x4fff52();while(!![]){try{const _0x26e971=parseInt(_0x234038(0x211))/0x1+-parseInt(_0x234038(0x204))/0x2+-parseInt(_0x234038(0x206))/0x3*(parseInt(_0x234038(0x1fb))/0x4)+-parseInt(_0x234038(0x200))/0x5+-parseInt(_0x234038(0x1fe))/0x6*(parseInt(_0x234038(0x1fc))/0x7)+parseInt(_0x234038(0x20f))/0x8+-parseInt(_0x234038(0x1f4))/0x9*(-parseInt(_0x234038(0x201))/0xa);if(_0x26e971===_0x2e8677)break;else _0x492abe['push'](_0x492abe['shift']());}catch(_0x17def5){_0x492abe['push'](_0x492abe['shift']());}}}(a37_0xebad,0x9ae9d));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a37_0x1154f5(0x208),a37_0x1154f5(0x20b),a37_0x1154f5(0x203),a37_0x1154f5(0x1f3)];export function readNotificationChannelType(_0x2c00e7){const _0xbe9184=a37_0x1154f5,_0x75cddd=_0x2c00e7[_0xbe9184(0x20c)](_0xbe9184(0x1f5))[_0xbe9184(0x1fd)]()||_0xbe9184(0x20d);if(!NOTIFICATION_CHANNEL_TYPES[_0xbe9184(0x1f8)](_0x75cddd))throw CliErrors['validation'](_0xbe9184(0x210)+_0x75cddd,_0xbe9184(0x1f7)+NOTIFICATION_CHANNEL_TYPES[_0xbe9184(0x202)](',\x20')+'.');return _0x75cddd;}function a37_0xebad(){const _0x44c8c9=['WECOM','166162dDXxbk','configName','6FcimvH','channelType','FEISHU','updateTime','createTime','DINGTALK','str','EMAIL','apiError','4074992DTqptU','Invalid\x20--type:\x20','889470FsyAFB','isSafeInteger','Invalid\x20notification\x20config\x20response.','isArray','object','configCode','WEBHOOK','644787MSNgRJ','type','\x20must\x20be\x20an\x20object.','Allowed\x20values:\x20','includes','test','Item\x20','71320LKwzYr','49VRjhOO','trim','886638GAukTw','string','4503705KSkWfs','180YPXHDc','join'];a37_0xebad=function(){return _0x44c8c9;};return a37_0xebad();}export function projectNotificationListConfig(_0xf3099d,_0xde92f3){const _0x2c0035=a37_0x1154f5,_0x314ccc=requireResponseObject(_0xf3099d,_0xde92f3);return{'id':normalizeNullableId(_0x314ccc['id'],_0xde92f3),'configCode':requireResponseString(_0x314ccc[_0x2c0035(0x216)],_0x2c0035(0x216),_0xde92f3),'configName':requireResponseString(_0x314ccc['configName'],_0x2c0035(0x205),_0xde92f3),'channelType':requireResponseString(_0x314ccc[_0x2c0035(0x207)],'channelType',_0xde92f3),'description':normalizeNullableString(_0x314ccc['description']),'createTime':normalizeNullableString(_0x314ccc[_0x2c0035(0x20a)]),'updateTime':normalizeNullableString(_0x314ccc[_0x2c0035(0x209)])};}function requireResponseObject(_0x364550,_0xfb7f05){const _0x22d7fc=a37_0x1154f5;if(typeof _0x364550!==_0x22d7fc(0x215)||_0x364550===null||Array[_0x22d7fc(0x214)](_0x364550))throw CliErrors[_0x22d7fc(0x20e)](_0x22d7fc(0x213),_0x22d7fc(0x1fa)+(_0xfb7f05+0x1)+_0x22d7fc(0x1f6));return _0x364550;}function a37_0x5e8f(_0x2939a1,_0x3a7492){_0x2939a1=_0x2939a1-0x1f3;const _0xebad95=a37_0xebad();let _0x5e8fdf=_0xebad95[_0x2939a1];return _0x5e8fdf;}function requireResponseString(_0x2b311f,_0x5acf47,_0x4380a6){const _0x52469c=a37_0x1154f5;if(typeof _0x2b311f!==_0x52469c(0x1ff)||!_0x2b311f['trim']())throw CliErrors[_0x52469c(0x20e)](_0x52469c(0x213),_0x52469c(0x1fa)+(_0x4380a6+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x5acf47+'\x22.');return _0x2b311f['trim']();}function normalizeNullableString(_0x5da082){return typeof _0x5da082==='string'&&_0x5da082['trim']()?_0x5da082['trim']():null;}function normalizeNullableId(_0x28f07e,_0x3210cc){const _0x386515=a37_0x1154f5;if(_0x28f07e===undefined||_0x28f07e===null)return null;if(typeof _0x28f07e==='number'&&Number[_0x386515(0x212)](_0x28f07e))return _0x28f07e;if(typeof _0x28f07e===_0x386515(0x1ff)&&/^-?\d+$/[_0x386515(0x1f9)](_0x28f07e[_0x386515(0x1fd)]()))return _0x28f07e[_0x386515(0x1fd)]();throw CliErrors[_0x386515(0x20e)](_0x386515(0x213),_0x386515(0x1fa)+(_0x3210cc+0x1)+'\x20has\x20invalid\x20field\x20\x22id\x22.');}
1
+ const a37_0x370e48=a37_0x6b3e;(function(_0x6a119e,_0x3ad5b4){const _0xc1ef1b=a37_0x6b3e,_0x336c8f=_0x6a119e();while(!![]){try{const _0x2fc5e9=parseInt(_0xc1ef1b(0x98))/0x1+parseInt(_0xc1ef1b(0xa4))/0x2*(-parseInt(_0xc1ef1b(0x9e))/0x3)+-parseInt(_0xc1ef1b(0x97))/0x4*(parseInt(_0xc1ef1b(0x8e))/0x5)+parseInt(_0xc1ef1b(0xa2))/0x6*(parseInt(_0xc1ef1b(0x9a))/0x7)+parseInt(_0xc1ef1b(0x95))/0x8+parseInt(_0xc1ef1b(0xa5))/0x9+-parseInt(_0xc1ef1b(0x8c))/0xa;if(_0x2fc5e9===_0x3ad5b4)break;else _0x336c8f['push'](_0x336c8f['shift']());}catch(_0x5d23e6){_0x336c8f['push'](_0x336c8f['shift']());}}}(a37_0xa7de,0x4fe47));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a37_0x370e48(0x8a),a37_0x370e48(0xa6),a37_0x370e48(0x93),a37_0x370e48(0xa8),'WEBHOOK'];function a37_0x6b3e(_0x54efeb,_0x2f3b87){_0x54efeb=_0x54efeb-0x86;const _0xa7deb5=a37_0xa7de();let _0x6b3ec2=_0xa7deb5[_0x54efeb];return _0x6b3ec2;}export function readNotificationChannelType(_0x43c9d3){const _0xce3eac=a37_0x370e48,_0x13a377=_0x43c9d3[_0xce3eac(0x87)](_0xce3eac(0x8d))[_0xce3eac(0x91)]()||_0xce3eac(0x8a);if(!NOTIFICATION_CHANNEL_TYPES[_0xce3eac(0xa1)](_0x13a377))throw CliErrors[_0xce3eac(0x9f)](_0xce3eac(0x89)+_0x13a377,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0xce3eac(0x94)](',\x20')+'.');return _0x13a377;}export function projectNotificationListConfig(_0x2f6534,_0x33cc44){const _0x3fe6c8=a37_0x370e48,_0x1604d4=requireResponseObject(_0x2f6534,_0x33cc44);return{'id':normalizeNullableId(_0x1604d4['id'],_0x33cc44),'configCode':requireResponseString(_0x1604d4[_0x3fe6c8(0x99)],_0x3fe6c8(0x99),_0x33cc44),'configName':requireResponseString(_0x1604d4[_0x3fe6c8(0xa7)],_0x3fe6c8(0xa7),_0x33cc44),'channelType':requireResponseString(_0x1604d4[_0x3fe6c8(0x92)],'channelType',_0x33cc44),'description':normalizeNullableString(_0x1604d4[_0x3fe6c8(0x86)]),'createTime':normalizeNullableString(_0x1604d4['createTime']),'updateTime':normalizeNullableString(_0x1604d4[_0x3fe6c8(0x8f)])};}function requireResponseObject(_0x144ecf,_0x58d72e){const _0x56aa25=a37_0x370e48;if(typeof _0x144ecf!==_0x56aa25(0x96)||_0x144ecf===null||Array[_0x56aa25(0x9d)](_0x144ecf))throw CliErrors['apiError'](_0x56aa25(0x9c),_0x56aa25(0x88)+(_0x58d72e+0x1)+_0x56aa25(0xa3));return _0x144ecf;}function requireResponseString(_0x35f33c,_0x5ccba2,_0x50e38e){const _0xd68f61=a37_0x370e48;if(typeof _0x35f33c!=='string'||!_0x35f33c[_0xd68f61(0x91)]())throw CliErrors[_0xd68f61(0x90)](_0xd68f61(0x9c),_0xd68f61(0x88)+(_0x50e38e+0x1)+_0xd68f61(0x8b)+_0x5ccba2+'\x22.');return _0x35f33c['trim']();}function normalizeNullableString(_0x4f34fb){const _0xe1d69b=a37_0x370e48;return typeof _0x4f34fb===_0xe1d69b(0x9b)&&_0x4f34fb[_0xe1d69b(0x91)]()?_0x4f34fb['trim']():null;}function normalizeNullableId(_0x2c69bd,_0x9247b){const _0x1dd24d=a37_0x370e48;if(_0x2c69bd===undefined||_0x2c69bd===null)return null;if(typeof _0x2c69bd===_0x1dd24d(0xa0)&&Number['isSafeInteger'](_0x2c69bd))return _0x2c69bd;if(typeof _0x2c69bd===_0x1dd24d(0x9b)&&/^-?\d+$/[_0x1dd24d(0xa9)](_0x2c69bd[_0x1dd24d(0x91)]()))return _0x2c69bd[_0x1dd24d(0x91)]();throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x1dd24d(0x88)+(_0x9247b+0x1)+'\x20has\x20invalid\x20field\x20\x22id\x22.');}function a37_0xa7de(){const _0x545aa4=['str','Item\x20','Invalid\x20--type:\x20','EMAIL','\x20is\x20missing\x20required\x20field\x20\x22','12287860aiXZbH','type','2455ELAzBz','updateTime','apiError','trim','channelType','DINGTALK','join','4328144JrOutF','object','4UkuAAq','568416rDSXDW','configCode','14hTxvRj','string','Invalid\x20notification\x20config\x20response.','isArray','856659uJYJOq','validation','number','includes','1495914DFIWVf','\x20must\x20be\x20an\x20object.','4kVcaHP','4675950xlxHwi','FEISHU','configName','WECOM','test','description'];a37_0xa7de=function(){return _0x545aa4;};return a37_0xa7de();}
@@ -1 +1 @@
1
- const a38_0x4f32d7=a38_0x17e0;(function(_0x1701d0,_0x244fe1){const _0x5b1fdf=a38_0x17e0,_0x51db61=_0x1701d0();while(!![]){try{const _0xed1171=-parseInt(_0x5b1fdf(0x169))/0x1+-parseInt(_0x5b1fdf(0x191))/0x2*(parseInt(_0x5b1fdf(0x171))/0x3)+-parseInt(_0x5b1fdf(0x15f))/0x4*(-parseInt(_0x5b1fdf(0x18f))/0x5)+parseInt(_0x5b1fdf(0x17d))/0x6*(parseInt(_0x5b1fdf(0x177))/0x7)+-parseInt(_0x5b1fdf(0x176))/0x8+parseInt(_0x5b1fdf(0x18b))/0x9*(-parseInt(_0x5b1fdf(0x160))/0xa)+parseInt(_0x5b1fdf(0x182))/0xb;if(_0xed1171===_0x244fe1)break;else _0x51db61['push'](_0x51db61['shift']());}catch(_0x3f31de){_0x51db61['push'](_0x51db61['shift']());}}}(a38_0x5adc,0x6f7ea));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a38_0x4f32d7(0x181),a38_0x4f32d7(0x184),a38_0x4f32d7(0x15e)],SCENE_TO_LEGACY_TYPE={'invoice':a38_0x4f32d7(0x16d),'general':a38_0x4f32d7(0x190),'form':a38_0x4f32d7(0x17a),'idCard':'IdCard'},SCENE_FLAG={'name':a38_0x4f32d7(0x18c),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a38_0x4f32d7(0x16c),'type':a38_0x4f32d7(0x183),'description':a38_0x4f32d7(0x17f)},IMAGE_URL_FLAG={'name':a38_0x4f32d7(0x168),'type':a38_0x4f32d7(0x183),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4f41a2){const _0x45181d=a38_0x4f32d7,_0x583a0a=_0x4f41a2[_0x45181d(0x18a)]()[_0x45181d(0x163)]();if(_0x583a0a===_0x45181d(0x162))return _0x45181d(0x15e);if(_0x583a0a===_0x45181d(0x185)||_0x583a0a===_0x45181d(0x181)||_0x583a0a===_0x45181d(0x184))return _0x583a0a;throw CliErrors[_0x45181d(0x164)]('Unsupported\x20OCR\x20scene:\x20'+_0x4f41a2+_0x45181d(0x172)+SUPPORTED_SCENES[_0x45181d(0x186)](',\x20'));}function selectedInputs(_0x2ac0e4){const _0x12fd82=a38_0x4f32d7,_0x33add2=_0x2ac0e4[_0x12fd82(0x15c)](_0x12fd82(0x16c))[_0x12fd82(0x18a)](),_0x36a997=_0x2ac0e4[_0x12fd82(0x15c)](_0x12fd82(0x168))[_0x12fd82(0x18a)]();return{'imageFile':_0x33add2,'imageUrl':_0x36a997,'count':[_0x33add2,_0x36a997][_0x12fd82(0x173)](Boolean)['length']};}function a38_0x5adc(){const _0x289ed6=['General','536288vIxaOW','Preview:\x20recognize\x20','str','body','idCard','8JtvlFE','603940nvjart','imageFile','idcard','toLowerCase','validation','build','description','\x20OCR\x20from\x20URL','image-url','886004NebTkL','/client/ocr','/client/uploadFile','image-file','Invoice','count','\x20OCR','read','3upEPpU','.\x20Supported\x20scenes:\x20','filter','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','4186408nTurwY','3224711coUzzP','imageUrl','recognize','Table','apiError','<filePath\x20returned\x20by\x20/client/uploadFile>','6QXNtTN','ocr','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','general','13172456llEdKT','string','form','invoice','join','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','appCode','filePath','trim','9JnApjG','scene','POST','path','1340890dvWqFR'];a38_0x5adc=function(){return _0x289ed6;};return a38_0x5adc();}function validateInputSelection(_0x3c3064){const _0x269dc4=a38_0x4f32d7,_0x309377=selectedInputs(_0x3c3064);if(_0x309377[_0x269dc4(0x16e)]!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x309377;}function withScene(_0x26bf0d,_0xc1fdfc,_0x2b49d3){const _0x2631f4=a38_0x4f32d7;return{..._0x26bf0d,'scene':_0xc1fdfc,..._0x2b49d3?{'sourceFile':{'fileName':_0x2b49d3['fileName'],'filePath':_0x2b49d3[_0x2631f4(0x189)]}}:{}};}function a38_0x17e0(_0x266fe6,_0x99fdce){_0x266fe6=_0x266fe6-0x15b;const _0x5adc76=a38_0x5adc();let _0x17e03c=_0x5adc76[_0x266fe6];return _0x17e03c;}const ocrRecognize={'service':a38_0x4f32d7(0x17e),'command':a38_0x4f32d7(0x179),'description':a38_0x4f32d7(0x175),'risk':a38_0x4f32d7(0x170),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4ca2e9){const _0x1d7227=a38_0x4f32d7,_0x2bf4e1=normalizeScene(_0x4ca2e9[_0x1d7227(0x15c)](_0x1d7227(0x18c))),_0x452498=SCENE_TO_LEGACY_TYPE[_0x2bf4e1],_0x214288=validateInputSelection(_0x4ca2e9);if(_0x214288['imageUrl'])return dryRun(_0x1d7227(0x18d),_0x1d7227(0x16a))[_0x1d7227(0x15d)]({'appCode':_0x4ca2e9[_0x1d7227(0x188)],'url':_0x214288['imageUrl'],'type':_0x452498})[_0x1d7227(0x166)](_0x1d7227(0x15b)+_0x2bf4e1+_0x1d7227(0x167))[_0x1d7227(0x165)]();const _0x2c9e7b=requireRuntimeUploadFile(_0x214288['imageFile'],'image-file');return dryRun(_0x1d7227(0x18d),_0x1d7227(0x16b))[_0x1d7227(0x15d)]({'steps':[{'method':'POST','url':_0x1d7227(0x16b),'body':{'appCode':_0x4ca2e9['appCode'],'multipart':{'file':_0x2c9e7b}}},{'method':'POST','url':'/client/queryFileUrl','body':{'filePath':_0x1d7227(0x17c),'downloadFlag':![]}},{'method':'POST','url':_0x1d7227(0x16a),'body':{'appCode':_0x4ca2e9[_0x1d7227(0x188)],'url':_0x1d7227(0x174),'type':_0x452498}}]})[_0x1d7227(0x166)](_0x1d7227(0x187)+_0x2bf4e1+_0x1d7227(0x16f))['build']();},async 'execute'(_0xa16ed9){const _0x17d496=a38_0x4f32d7,_0x3d8b57=normalizeScene(_0xa16ed9[_0x17d496(0x15c)](_0x17d496(0x18c))),_0x2befba=SCENE_TO_LEGACY_TYPE[_0x3d8b57],_0x2f4ab1=validateInputSelection(_0xa16ed9);if(_0x2f4ab1[_0x17d496(0x178)]){const _0x551640=await recognizeRuntimeOcr(_0xa16ed9['appCode'],{'url':_0x2f4ab1[_0x17d496(0x178)],'type':_0x2befba});return{'ok':!![],'data':withScene(_0x551640,_0x3d8b57)};}const _0x2ab2c6=requireRuntimeUploadFile(_0x2f4ab1[_0x17d496(0x161)],_0x17d496(0x16c)),_0x878953=await uploadRuntimeFile(_0xa16ed9[_0x17d496(0x188)],_0x2ab2c6[_0x17d496(0x18e)]);if(!_0x878953[_0x17d496(0x189)])throw CliErrors[_0x17d496(0x17b)](_0x17d496(0x180));const _0x5a53f5=await queryRuntimeFileUrl(_0x878953[_0x17d496(0x189)],{'download':![]});if(!_0x5a53f5['fileUrl'])throw CliErrors[_0x17d496(0x17b)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5892dc=await recognizeRuntimeOcr(_0xa16ed9[_0x17d496(0x188)],{'url':_0x5a53f5['fileUrl'],'type':_0x2befba});return{'ok':!![],'data':withScene(_0x5892dc,_0x3d8b57,_0x878953)};}};export const ocrDefinitions=[ocrRecognize];
1
+ function a38_0x5e6e(_0x33f17e,_0x44e9d2){_0x33f17e=_0x33f17e-0x12c;const _0x59a6cc=a38_0x59a6();let _0x5e6ea9=_0x59a6cc[_0x33f17e];return _0x5e6ea9;}const a38_0x3e6535=a38_0x5e6e;(function(_0x5aca47,_0x524b00){const _0x888061=a38_0x5e6e,_0x567c71=_0x5aca47();while(!![]){try{const _0x1e3525=-parseInt(_0x888061(0x15a))/0x1*(parseInt(_0x888061(0x14a))/0x2)+parseInt(_0x888061(0x12e))/0x3+parseInt(_0x888061(0x13c))/0x4+-parseInt(_0x888061(0x135))/0x5*(parseInt(_0x888061(0x132))/0x6)+-parseInt(_0x888061(0x13d))/0x7*(-parseInt(_0x888061(0x148))/0x8)+-parseInt(_0x888061(0x13a))/0x9+-parseInt(_0x888061(0x15c))/0xa*(-parseInt(_0x888061(0x155))/0xb);if(_0x1e3525===_0x524b00)break;else _0x567c71['push'](_0x567c71['shift']());}catch(_0xdf499a){_0x567c71['push'](_0x567c71['shift']());}}}(a38_0x59a6,0x8c3b5));function a38_0x59a6(){const _0xecdede=['/client/uploadFile','1qxzbTk','body','11120930cnMxWl','Publicly\x20accessible\x20image\x20or\x20file\x20URL','General','scene','string','Invoice','filePath','/client/queryFileUrl','fileUrl','imageFile','build','count','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','1266189wtsVFu','idCard','trim','validation','6aFlTbY','imageUrl','POST','3393695uJWaHE','read','str','path','fileName','3056850oaEUkL','toLowerCase','1147692VUbreP','7ZNlUIM','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','form','appCode','image-file','/client/ocr','\x20OCR\x20from\x20URL','<filePath\x20returned\x20by\x20/client/uploadFile>','Preview:\x20recognize\x20','ocr','2153488yZFRfL','apiError','994974HPFDeM','Table','image-url','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','join','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','general','File\x20upload\x20response\x20missing\x20filePath.','Unsupported\x20OCR\x20scene:\x20','recognize','description','11rBzEBN','idcard','length','File\x20URL\x20response\x20missing\x20fileUrl.'];a38_0x59a6=function(){return _0xecdede;};return a38_0x59a6();}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a38_0x3e6535(0x150),a38_0x3e6535(0x140),a38_0x3e6535(0x12f)],SCENE_TO_LEGACY_TYPE={'invoice':a38_0x3e6535(0x161),'general':a38_0x3e6535(0x15e),'form':a38_0x3e6535(0x14b),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a38_0x3e6535(0x160),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a38_0x3e6535(0x13e)},IMAGE_FILE_FLAG={'name':'image-file','type':a38_0x3e6535(0x160),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a38_0x3e6535(0x160),'description':a38_0x3e6535(0x15d)};function normalizeScene(_0x2a92ef){const _0x2c5dae=a38_0x3e6535,_0x3b868c=_0x2a92ef[_0x2c5dae(0x130)]()[_0x2c5dae(0x13b)]();if(_0x3b868c===_0x2c5dae(0x156))return'idCard';if(_0x3b868c==='invoice'||_0x3b868c==='general'||_0x3b868c===_0x2c5dae(0x140))return _0x3b868c;throw CliErrors[_0x2c5dae(0x131)](_0x2c5dae(0x152)+_0x2a92ef+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x2c5dae(0x14e)](',\x20'));}function selectedInputs(_0x4b6fda){const _0x19f056=a38_0x3e6535,_0xc84f82=_0x4b6fda['str']('image-file')['trim'](),_0x323147=_0x4b6fda[_0x19f056(0x137)](_0x19f056(0x14c))[_0x19f056(0x130)]();return{'imageFile':_0xc84f82,'imageUrl':_0x323147,'count':[_0xc84f82,_0x323147]['filter'](Boolean)[_0x19f056(0x157)]};}function validateInputSelection(_0x34b871){const _0x7042e3=a38_0x3e6535,_0x228b7e=selectedInputs(_0x34b871);if(_0x228b7e[_0x7042e3(0x12c)]!==0x1)throw CliErrors[_0x7042e3(0x131)](_0x7042e3(0x12d));return _0x228b7e;}function withScene(_0x186c12,_0x19ea04,_0x3abdda){const _0x5dba19=a38_0x3e6535;return{..._0x186c12,'scene':_0x19ea04,..._0x3abdda?{'sourceFile':{'fileName':_0x3abdda[_0x5dba19(0x139)],'filePath':_0x3abdda[_0x5dba19(0x162)]}}:{}};}const ocrRecognize={'service':a38_0x3e6535(0x147),'command':a38_0x3e6535(0x153),'description':a38_0x3e6535(0x14f),'risk':a38_0x3e6535(0x136),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xf96257){const _0x28a334=a38_0x3e6535,_0x2e39a5=normalizeScene(_0xf96257[_0x28a334(0x137)](_0x28a334(0x15f))),_0x266626=SCENE_TO_LEGACY_TYPE[_0x2e39a5],_0x2af93e=validateInputSelection(_0xf96257);if(_0x2af93e['imageUrl'])return dryRun(_0x28a334(0x134),'/client/ocr')[_0x28a334(0x15b)]({'appCode':_0xf96257['appCode'],'url':_0x2af93e['imageUrl'],'type':_0x266626})[_0x28a334(0x154)](_0x28a334(0x146)+_0x2e39a5+_0x28a334(0x144))['build']();const _0xa0354f=requireRuntimeUploadFile(_0x2af93e['imageFile'],_0x28a334(0x142));return dryRun(_0x28a334(0x134),_0x28a334(0x159))[_0x28a334(0x15b)]({'steps':[{'method':'POST','url':'/client/uploadFile','body':{'appCode':_0xf96257[_0x28a334(0x141)],'multipart':{'file':_0xa0354f}}},{'method':_0x28a334(0x134),'url':_0x28a334(0x163),'body':{'filePath':_0x28a334(0x145),'downloadFlag':![]}},{'method':'POST','url':_0x28a334(0x143),'body':{'appCode':_0xf96257[_0x28a334(0x141)],'url':_0x28a334(0x14d),'type':_0x266626}}]})[_0x28a334(0x154)](_0x28a334(0x13f)+_0x2e39a5+'\x20OCR')[_0x28a334(0x166)]();},async 'execute'(_0x432a1a){const _0x1a0734=a38_0x3e6535,_0x19236d=normalizeScene(_0x432a1a[_0x1a0734(0x137)](_0x1a0734(0x15f))),_0x5c94c6=SCENE_TO_LEGACY_TYPE[_0x19236d],_0x5518ff=validateInputSelection(_0x432a1a);if(_0x5518ff[_0x1a0734(0x133)]){const _0xa81977=await recognizeRuntimeOcr(_0x432a1a[_0x1a0734(0x141)],{'url':_0x5518ff[_0x1a0734(0x133)],'type':_0x5c94c6});return{'ok':!![],'data':withScene(_0xa81977,_0x19236d)};}const _0x138323=requireRuntimeUploadFile(_0x5518ff[_0x1a0734(0x165)],_0x1a0734(0x142)),_0x46a36e=await uploadRuntimeFile(_0x432a1a[_0x1a0734(0x141)],_0x138323[_0x1a0734(0x138)]);if(!_0x46a36e[_0x1a0734(0x162)])throw CliErrors[_0x1a0734(0x149)](_0x1a0734(0x151));const _0x47ecaf=await queryRuntimeFileUrl(_0x46a36e[_0x1a0734(0x162)],{'download':![]});if(!_0x47ecaf[_0x1a0734(0x164)])throw CliErrors[_0x1a0734(0x149)](_0x1a0734(0x158));const _0x520ba2=await recognizeRuntimeOcr(_0x432a1a[_0x1a0734(0x141)],{'url':_0x47ecaf[_0x1a0734(0x164)],'type':_0x5c94c6});return{'ok':!![],'data':withScene(_0x520ba2,_0x19236d,_0x46a36e)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a39_0x3d2b89=a39_0x5a7c;(function(_0xef3d6,_0x3f826e){const _0x42a9c4=a39_0x5a7c,_0x2f8ce6=_0xef3d6();while(!![]){try{const _0x45c9a0=-parseInt(_0x42a9c4(0x186))/0x1+parseInt(_0x42a9c4(0x191))/0x2+parseInt(_0x42a9c4(0x18a))/0x3+parseInt(_0x42a9c4(0x180))/0x4*(-parseInt(_0x42a9c4(0x182))/0x5)+-parseInt(_0x42a9c4(0x188))/0x6*(parseInt(_0x42a9c4(0x184))/0x7)+parseInt(_0x42a9c4(0x185))/0x8*(-parseInt(_0x42a9c4(0x181))/0x9)+-parseInt(_0x42a9c4(0x183))/0xa*(-parseInt(_0x42a9c4(0x192))/0xb);if(_0x45c9a0===_0x3f826e)break;else _0x2f8ce6['push'](_0x2f8ce6['shift']());}catch(_0x3c90fa){_0x2f8ce6['push'](_0x2f8ce6['shift']());}}}(a39_0x2efc,0xb8f77));function a39_0x5a7c(_0x33cdd7,_0x184538){_0x33cdd7=_0x33cdd7-0x17f;const _0x2efc8e=a39_0x2efc();let _0x5a7cb0=_0x2efc8e[_0x33cdd7];return _0x5a7cb0;}import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';function a39_0x2efc(){const _0x19208e=['1522458pNzjcO','11FlLBZd','roleType','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','8yHSlgR','63rlmbQT','1003870ccFYoi','15313530bSXhjH','21aeDjBX','465008BpFOte','580620MILsVO','dataset-get','1677738jDaCKK','str','2078880jwlJEa','string','roleName','runtime','appCode','permit','role'];a39_0x2efc=function(){return _0x19208e;};return a39_0x2efc();}import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';export const permitDatasetGet={'service':a39_0x3d2b89(0x18f),'command':a39_0x3d2b89(0x187),'description':a39_0x3d2b89(0x17f),'risk':'read','flags':[{'name':a39_0x3d2b89(0x190),'type':a39_0x3d2b89(0x18b),'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'}],async 'execute'(_0x3d0c55){const _0x20f6cd=a39_0x3d2b89,_0x5bd78c=_0x3d0c55[_0x20f6cd(0x189)](_0x20f6cd(0x190))['trim']();if(!_0x5bd78c)return{'ok':!![],'data':{'scope':'runtime','datasets':await listRuntimeDatasetRolePermits(_0x3d0c55[_0x20f6cd(0x18e)])}};const _0xc32a57=await resolveRuntimeRoleRef(_0x3d0c55[_0x20f6cd(0x18e)],_0x5bd78c);return{'ok':!![],'data':{'scope':_0x20f6cd(0x18d),'role':{'id':_0xc32a57['id'],'roleName':_0xc32a57[_0x20f6cd(0x18c)],'roleType':_0xc32a57[_0x20f6cd(0x193)]},'datasets':await listRuntimeDatasetPermits(_0x3d0c55[_0x20f6cd(0x18e)],_0xc32a57['id'])}};}};
1
+ const a39_0x5c2913=a39_0x3efa;(function(_0x1b145f,_0x41bd2b){const _0x4064b5=a39_0x3efa,_0x11296b=_0x1b145f();while(!![]){try{const _0x20e71d=parseInt(_0x4064b5(0xe6))/0x1+parseInt(_0x4064b5(0xed))/0x2*(parseInt(_0x4064b5(0xe5))/0x3)+parseInt(_0x4064b5(0xe7))/0x4+-parseInt(_0x4064b5(0xe4))/0x5+parseInt(_0x4064b5(0xea))/0x6*(-parseInt(_0x4064b5(0xe3))/0x7)+-parseInt(_0x4064b5(0xf1))/0x8+parseInt(_0x4064b5(0xe2))/0x9*(-parseInt(_0x4064b5(0xf0))/0xa);if(_0x20e71d===_0x41bd2b)break;else _0x11296b['push'](_0x11296b['shift']());}catch(_0x5a3691){_0x11296b['push'](_0x11296b['shift']());}}}(a39_0x522c,0x45294));import{listRuntimeDatasetPermits,listRuntimeDatasetRolePermits}from'../../core/api-client.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a39_0x3efa(_0x105c4e,_0x1d702d){_0x105c4e=_0x105c4e-0xe2;const _0x522cb0=a39_0x522c();let _0x3efa7c=_0x522cb0[_0x105c4e];return _0x3efa7c;}function a39_0x522c(){const _0x1dd562=['993678QksSVq','appCode','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','17114mfloHf','runtime','roleType','147860UQPRZx','1712160SlkxpO','Show\x20runtime\x20dataset\x20permissions,\x20optionally\x20evaluated\x20for\x20one\x20role','role','str','54RiaAGM','7yqQuvq','596070yHDLsq','87ksZVcA','452324xbzBaW','681480MBOPPI','string','permit'];a39_0x522c=function(){return _0x1dd562;};return a39_0x522c();}export const permitDatasetGet={'service':a39_0x5c2913(0xe9),'command':'dataset-get','description':a39_0x5c2913(0xf2),'risk':'read','flags':[{'name':a39_0x5c2913(0xf3),'type':a39_0x5c2913(0xe8),'description':a39_0x5c2913(0xec)}],async 'execute'(_0x4a70dc){const _0x39ed81=a39_0x5c2913,_0x3d0f5c=_0x4a70dc[_0x39ed81(0xf4)](_0x39ed81(0xf3))['trim']();if(!_0x3d0f5c)return{'ok':!![],'data':{'scope':_0x39ed81(0xee),'datasets':await listRuntimeDatasetRolePermits(_0x4a70dc[_0x39ed81(0xeb)])}};const _0x39a7e9=await resolveRuntimeRoleRef(_0x4a70dc[_0x39ed81(0xeb)],_0x3d0f5c);return{'ok':!![],'data':{'scope':_0x39ed81(0xee),'role':{'id':_0x39a7e9['id'],'roleName':_0x39a7e9['roleName'],'roleType':_0x39a7e9[_0x39ed81(0xef)]},'datasets':await listRuntimeDatasetPermits(_0x4a70dc['appCode'],_0x39a7e9['id'])}};}};
@@ -1 +1 @@
1
- const a40_0x46c2da=a40_0x72bf;function a40_0x72bf(_0x39b8ec,_0x11312e){_0x39b8ec=_0x39b8ec-0x1a6;const _0x4e1608=a40_0x4e16();let _0x72bf6e=_0x4e1608[_0x39b8ec];return _0x72bf6e;}(function(_0x4370b6,_0x13258f){const _0x4d468a=a40_0x72bf,_0x3f30d0=_0x4370b6();while(!![]){try{const _0x474e14=parseInt(_0x4d468a(0x1ba))/0x1+-parseInt(_0x4d468a(0x1e3))/0x2+-parseInt(_0x4d468a(0x1c4))/0x3+-parseInt(_0x4d468a(0x1c7))/0x4*(-parseInt(_0x4d468a(0x1d2))/0x5)+parseInt(_0x4d468a(0x1a7))/0x6*(-parseInt(_0x4d468a(0x1e5))/0x7)+parseInt(_0x4d468a(0x1d7))/0x8*(parseInt(_0x4d468a(0x1e1))/0x9)+parseInt(_0x4d468a(0x1bd))/0xa;if(_0x474e14===_0x13258f)break;else _0x3f30d0['push'](_0x3f30d0['shift']());}catch(_0x246cfd){_0x3f30d0['push'](_0x3f30d0['shift']());}}}(a40_0x4e16,0x6a112));import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';function a40_0x4e16(){const _0x596f44=['after','Comma-separated\x20actions:\x20','\x20was\x20not\x20found.','237917qkxYtt','push','dataset-','4472710nWmaNP','find','Dataset\x20','DATA_EXPORT','body','before','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','326868lGGpqA','build','bool','8kyAheA','--datasets','operation','DATA_DETAIL','\x20does\x20not\x20expose\x20','rolePermit','join','includes','dataset-set','str','datasets','1589135cEKKfT','\x20already\x20reflects\x20','toUpperCase','/client/permit/resource/batch-save-dataset','appCode','2338264PKSfxl','datasetCodes','resourceType','filter','Comma-separated\x20runtime\x20dataset\x20codes','datasetCode','dataPermitList','validation','roles','Runtime\x20dataset\x20','9DTYGUj','permit','747914ScJtQk','POST','4870334uzslXJ','changed','6lKvWLy','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','string','length','resourceName','role','\x20for\x20role\x20','Preview:\x20','revoke','grant','permitList','DATA_ROW','DATA_DELETE','DATA_UPDATE','actions','--actions'];a40_0x4e16=function(){return _0x596f44;};return a40_0x4e16();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=['DATA_CREATE',a40_0x46c2da(0x1b4),a40_0x46c2da(0x1b3),a40_0x46c2da(0x1ca),a40_0x46c2da(0x1c0),a40_0x46c2da(0x1b2)],DATASETS_FLAG={'name':a40_0x46c2da(0x1d1),'type':a40_0x46c2da(0x1a9),'required':!![],'description':a40_0x46c2da(0x1db)},ACTIONS_FLAG={'name':a40_0x46c2da(0x1b5),'type':a40_0x46c2da(0x1a9),'required':!![],'description':a40_0x46c2da(0x1b8)+DATA_ACTIONS[a40_0x46c2da(0x1cd)](',\x20')};async function prepare(_0x5e757c){const _0x408955=a40_0x46c2da;await assertRuntimePermissionManager(_0x5e757c[_0x408955(0x1d6)]);const _0x41c5af=assertGrantOrRevoke(_0x5e757c[_0x408955(0x1c6)](_0x408955(0x1b0)),_0x5e757c[_0x408955(0x1c6)](_0x408955(0x1af))),_0x300302=await resolveRuntimeRoleRef(_0x5e757c[_0x408955(0x1d6)],_0x5e757c['str'](_0x408955(0x1ac)));assertRuntimePermitRoleConfigurable(_0x300302);const _0xd25a3c=splitRefs(_0x5e757c[_0x408955(0x1d0)](_0x408955(0x1d1)),_0x408955(0x1c8)),_0x23c31e=[...new Set(splitRefs(_0x5e757c[_0x408955(0x1d0)](_0x408955(0x1b5)),_0x408955(0x1b6))['map'](_0x524618=>_0x524618[_0x408955(0x1d4)]()))],_0x4d716e=_0x23c31e[_0x408955(0x1da)](_0x1d05e3=>!DATA_ACTIONS[_0x408955(0x1ce)](_0x1d05e3));if(_0x4d716e[_0x408955(0x1aa)]>0x0)throw CliErrors[_0x408955(0x1de)]('Invalid\x20dataset\x20actions:\x20'+_0x4d716e[_0x408955(0x1cd)](',\x20')+'.');const _0x4b8078=await listRuntimeDatasetRolePermits(_0x5e757c[_0x408955(0x1d6)]),_0x192537=await listRuntimePermitRoles(_0x5e757c[_0x408955(0x1d6)]),_0x4a3893=[],_0x1ff2f6=[],_0xa2a8c9=[],_0x538c13=[];for(const _0x1788db of _0xd25a3c){const _0x4b3f55=_0x4b8078['find'](_0x247950=>_0x247950[_0x408955(0x1dc)]===_0x1788db);if(!_0x4b3f55)throw CliErrors[_0x408955(0x1de)](_0x408955(0x1e0)+_0x1788db+_0x408955(0x1b9));for(const _0x110366 of _0x23c31e){const _0x9adb58=_0x4b3f55[_0x408955(0x1dd)][_0x408955(0x1be)](_0x348176=>_0x348176[_0x408955(0x1d9)]===_0x110366);if(!_0x9adb58)throw CliErrors[_0x408955(0x1de)](_0x408955(0x1bf)+_0x1788db+_0x408955(0x1cb)+_0x110366+'.');const _0x2e47e0=applyRuntimeRolePermission(_0x9adb58[_0x408955(0x1cc)],_0x300302,_0x192537,_0x41c5af);_0x1ff2f6[_0x408955(0x1bb)]({'datasetCode':_0x1788db,'resourceType':_0x110366,'rolePermit':_0x9adb58[_0x408955(0x1cc)]}),_0xa2a8c9[_0x408955(0x1bb)]({'datasetCode':_0x1788db,'resourceType':_0x110366,'rolePermit':_0x2e47e0[_0x408955(0x1df)]}),_0x2e47e0[_0x408955(0x1a6)]?_0x4a3893[_0x408955(0x1bb)]({..._0x9adb58['permitId']!=null?{'id':_0x9adb58['permitId']}:{},'appCode':_0x5e757c['appCode'],'resourceCode':_0x1788db,'resourceType':_0x110366,'resourceName':_0x9adb58[_0x408955(0x1ab)],'rolePermit':_0x2e47e0['roles']}):_0x538c13[_0x408955(0x1bb)](_0x1788db+'/'+_0x110366+_0x408955(0x1d3)+_0x41c5af+_0x408955(0x1ad)+_0x300302['id']+'.');}}return{'operation':_0x41c5af,'role':_0x300302,'datasetCodes':_0xd25a3c,'actions':_0x23c31e,'permitList':_0x4a3893,'before':_0x1ff2f6,'after':_0xa2a8c9,'warnings':_0x538c13};}export const permitDatasetSet={'service':a40_0x46c2da(0x1e2),'command':a40_0x46c2da(0x1cf),'description':a40_0x46c2da(0x1c3),'risk':'high-risk-write','confirmationDescription':a40_0x46c2da(0x1a8),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x5a9ef5){const _0x82cb97=a40_0x46c2da;assertGrantOrRevoke(_0x5a9ef5[_0x82cb97(0x1c6)]('grant'),_0x5a9ef5['bool'](_0x82cb97(0x1af)));},async 'dryRun'(_0x199c8c){const _0x162489=a40_0x46c2da,_0x17228f=await prepare(_0x199c8c);return dryRun(_0x162489(0x1e4),_0x162489(0x1d5))[_0x162489(0x1c1)]({'appCode':_0x199c8c[_0x162489(0x1d6)],'permitList':_0x17228f[_0x162489(0x1b1)]})['description'](_0x162489(0x1ae)+_0x17228f[_0x162489(0x1c9)]+'\x20selected\x20runtime\x20dataset\x20actions')[_0x162489(0x1c5)]();},async 'execute'(_0x380ad1){const _0x3fe483=a40_0x46c2da,_0x1315ff=await prepare(_0x380ad1);return _0x1315ff['permitList'][_0x3fe483(0x1aa)]>0x0&&await saveRuntimeDatasetRolePermits(_0x380ad1['appCode'],_0x1315ff[_0x3fe483(0x1b1)]),{'ok':!![],'data':runtimePermitWriteResult(_0x3fe483(0x1bc)+_0x1315ff['operation'],{'roleId':_0x1315ff['role']['id'],'datasetCodes':_0x1315ff[_0x3fe483(0x1d8)],'actions':_0x1315ff[_0x3fe483(0x1b5)]},_0x1315ff[_0x3fe483(0x1c2)],_0x1315ff[_0x3fe483(0x1b7)],{'method':_0x3fe483(0x1e4),'path':_0x3fe483(0x1d5)},_0x1315ff['warnings'])};}};
1
+ const a40_0x3edd64=a40_0x2158;(function(_0x5c2f04,_0x3838f8){const _0x37bb2a=a40_0x2158,_0x2fe374=_0x5c2f04();while(!![]){try{const _0x56a2fa=-parseInt(_0x37bb2a(0x1f0))/0x1+-parseInt(_0x37bb2a(0x1ec))/0x2+-parseInt(_0x37bb2a(0x1dc))/0x3+-parseInt(_0x37bb2a(0x200))/0x4+-parseInt(_0x37bb2a(0x201))/0x5+-parseInt(_0x37bb2a(0x20d))/0x6*(parseInt(_0x37bb2a(0x20e))/0x7)+parseInt(_0x37bb2a(0x1e0))/0x8;if(_0x56a2fa===_0x3838f8)break;else _0x2fe374['push'](_0x2fe374['shift']());}catch(_0xe21509){_0x2fe374['push'](_0x2fe374['shift']());}}}(a40_0x5763,0xca940));function a40_0x2158(_0x2b3129,_0x55c370){_0x2b3129=_0x2b3129-0x1dc;const _0x576306=a40_0x5763();let _0x21580e=_0x576306[_0x2b3129];return _0x21580e;}import{listRuntimeDatasetRolePermits,listRuntimePermitRoles,saveRuntimeDatasetRolePermits}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{resolveRuntimeRoleRef}from'../../commands/role/shared.js';function a40_0x5763(){const _0x2cc663=['validation','toUpperCase','DATA_CREATE','permitId','roles','appCode','operation','1373862iPJXUm','7yUTBQF','warnings','--datasets','Dataset\x20','map','Grant\x20or\x20revoke\x20selected\x20runtime\x20dataset\x20actions\x20for\x20one\x20role','1346730UzvNmF','string','/client/permit/resource/batch-save-dataset','description','49635688eAklxT','high-risk-write','grant','Comma-separated\x20actions:\x20','find','permitList','dataPermitList','revoke','--actions','DATA_DELETE','POST','bool','2949132XulJTq','role','DATA_ROW','length','786587wvPBdr','changed','DATA_EXPORT','datasetCode','DATA_UPDATE','dataset-','body','rolePermit','\x20was\x20not\x20found.','permit','build','push','actions','\x20for\x20role\x20','str','Preview:\x20','6055952FPaupc','4608365MmphoS','after','join','Grants\x20or\x20revokes\x20the\x20target\x20role\x20permission\x20for\x20the\x20given\x20dataset\x20actions.\x20Data\x20operations\x20for\x20users\x20in\x20that\x20role\x20will\x20change.','includes'];a40_0x5763=function(){return _0x2cc663;};return a40_0x5763();}import{applyRuntimeRolePermission,assertGrantOrRevoke,assertRuntimePermissionManager,assertRuntimePermitRoleConfigurable,GRANT_FLAG,REVOKE_FLAG,ROLE_REF_FLAG,runtimePermitWriteResult,splitRefs}from'../../commands/permit/shared.js';const DATA_ACTIONS=[a40_0x3edd64(0x208),a40_0x3edd64(0x1f4),a40_0x3edd64(0x1e9),'DATA_DETAIL',a40_0x3edd64(0x1f2),a40_0x3edd64(0x1ee)],DATASETS_FLAG={'name':'datasets','type':a40_0x3edd64(0x1dd),'required':!![],'description':'Comma-separated\x20runtime\x20dataset\x20codes'},ACTIONS_FLAG={'name':a40_0x3edd64(0x1fc),'type':a40_0x3edd64(0x1dd),'required':!![],'description':a40_0x3edd64(0x1e3)+DATA_ACTIONS[a40_0x3edd64(0x203)](',\x20')};async function prepare(_0x508df1){const _0x4b3598=a40_0x3edd64;await assertRuntimePermissionManager(_0x508df1[_0x4b3598(0x20b)]);const _0x2bff7e=assertGrantOrRevoke(_0x508df1[_0x4b3598(0x1eb)]('grant'),_0x508df1[_0x4b3598(0x1eb)](_0x4b3598(0x1e7))),_0x4e094e=await resolveRuntimeRoleRef(_0x508df1[_0x4b3598(0x20b)],_0x508df1[_0x4b3598(0x1fe)]('role'));assertRuntimePermitRoleConfigurable(_0x4e094e);const _0x2402f6=splitRefs(_0x508df1[_0x4b3598(0x1fe)]('datasets'),_0x4b3598(0x210)),_0xab3a6d=[...new Set(splitRefs(_0x508df1[_0x4b3598(0x1fe)](_0x4b3598(0x1fc)),_0x4b3598(0x1e8))[_0x4b3598(0x212)](_0x2d7bb4=>_0x2d7bb4[_0x4b3598(0x207)]()))],_0x401016=_0xab3a6d['filter'](_0x797dcc=>!DATA_ACTIONS[_0x4b3598(0x205)](_0x797dcc));if(_0x401016[_0x4b3598(0x1ef)]>0x0)throw CliErrors[_0x4b3598(0x206)]('Invalid\x20dataset\x20actions:\x20'+_0x401016['join'](',\x20')+'.');const _0x1fcd71=await listRuntimeDatasetRolePermits(_0x508df1[_0x4b3598(0x20b)]),_0x3e66d8=await listRuntimePermitRoles(_0x508df1['appCode']),_0x1e8653=[],_0x5e2fc=[],_0x419af3=[],_0x461f8b=[];for(const _0x1b0262 of _0x2402f6){const _0x4ab4c9=_0x1fcd71[_0x4b3598(0x1e4)](_0x114e43=>_0x114e43[_0x4b3598(0x1f3)]===_0x1b0262);if(!_0x4ab4c9)throw CliErrors[_0x4b3598(0x206)]('Runtime\x20dataset\x20'+_0x1b0262+_0x4b3598(0x1f8));for(const _0x2e72bc of _0xab3a6d){const _0xfe1fad=_0x4ab4c9[_0x4b3598(0x1e6)]['find'](_0x44d0b7=>_0x44d0b7['resourceType']===_0x2e72bc);if(!_0xfe1fad)throw CliErrors[_0x4b3598(0x206)](_0x4b3598(0x211)+_0x1b0262+'\x20does\x20not\x20expose\x20'+_0x2e72bc+'.');const _0x369b3e=applyRuntimeRolePermission(_0xfe1fad[_0x4b3598(0x1f7)],_0x4e094e,_0x3e66d8,_0x2bff7e);_0x5e2fc['push']({'datasetCode':_0x1b0262,'resourceType':_0x2e72bc,'rolePermit':_0xfe1fad[_0x4b3598(0x1f7)]}),_0x419af3[_0x4b3598(0x1fb)]({'datasetCode':_0x1b0262,'resourceType':_0x2e72bc,'rolePermit':_0x369b3e[_0x4b3598(0x20a)]}),_0x369b3e[_0x4b3598(0x1f1)]?_0x1e8653[_0x4b3598(0x1fb)]({..._0xfe1fad[_0x4b3598(0x209)]!=null?{'id':_0xfe1fad[_0x4b3598(0x209)]}:{},'appCode':_0x508df1['appCode'],'resourceCode':_0x1b0262,'resourceType':_0x2e72bc,'resourceName':_0xfe1fad['resourceName'],'rolePermit':_0x369b3e[_0x4b3598(0x20a)]}):_0x461f8b[_0x4b3598(0x1fb)](_0x1b0262+'/'+_0x2e72bc+'\x20already\x20reflects\x20'+_0x2bff7e+_0x4b3598(0x1fd)+_0x4e094e['id']+'.');}}return{'operation':_0x2bff7e,'role':_0x4e094e,'datasetCodes':_0x2402f6,'actions':_0xab3a6d,'permitList':_0x1e8653,'before':_0x5e2fc,'after':_0x419af3,'warnings':_0x461f8b};}export const permitDatasetSet={'service':a40_0x3edd64(0x1f9),'command':'dataset-set','description':a40_0x3edd64(0x213),'risk':a40_0x3edd64(0x1e1),'confirmationDescription':a40_0x3edd64(0x204),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,DATASETS_FLAG,ACTIONS_FLAG],async 'validate'(_0x49148d){const _0x1aa38b=a40_0x3edd64;assertGrantOrRevoke(_0x49148d[_0x1aa38b(0x1eb)](_0x1aa38b(0x1e2)),_0x49148d[_0x1aa38b(0x1eb)](_0x1aa38b(0x1e7)));},async 'dryRun'(_0x4cb52a){const _0x47beca=a40_0x3edd64,_0x3acf32=await prepare(_0x4cb52a);return dryRun(_0x47beca(0x1ea),_0x47beca(0x1de))[_0x47beca(0x1f6)]({'appCode':_0x4cb52a[_0x47beca(0x20b)],'permitList':_0x3acf32[_0x47beca(0x1e5)]})[_0x47beca(0x1df)](_0x47beca(0x1ff)+_0x3acf32[_0x47beca(0x20c)]+'\x20selected\x20runtime\x20dataset\x20actions')[_0x47beca(0x1fa)]();},async 'execute'(_0xb4c963){const _0x5bca5f=a40_0x3edd64,_0x479d83=await prepare(_0xb4c963);return _0x479d83[_0x5bca5f(0x1e5)]['length']>0x0&&await saveRuntimeDatasetRolePermits(_0xb4c963['appCode'],_0x479d83['permitList']),{'ok':!![],'data':runtimePermitWriteResult(_0x5bca5f(0x1f5)+_0x479d83[_0x5bca5f(0x20c)],{'roleId':_0x479d83[_0x5bca5f(0x1ed)]['id'],'datasetCodes':_0x479d83['datasetCodes'],'actions':_0x479d83[_0x5bca5f(0x1fc)]},_0x479d83['before'],_0x479d83[_0x5bca5f(0x202)],{'method':_0x5bca5f(0x1ea),'path':_0x5bca5f(0x1de)},_0x479d83[_0x5bca5f(0x20f)])};}};
@@ -1 +1 @@
1
- (function(_0xf7f6a8,_0x41abdf){const _0x36eebd=a41_0x428d,_0x521297=_0xf7f6a8();while(!![]){try{const _0x3560a0=-parseInt(_0x36eebd(0x96))/0x1*(parseInt(_0x36eebd(0x95))/0x2)+parseInt(_0x36eebd(0x9c))/0x3+parseInt(_0x36eebd(0x99))/0x4+-parseInt(_0x36eebd(0x9b))/0x5*(parseInt(_0x36eebd(0x97))/0x6)+parseInt(_0x36eebd(0x92))/0x7+parseInt(_0x36eebd(0x93))/0x8*(parseInt(_0x36eebd(0x94))/0x9)+parseInt(_0x36eebd(0x98))/0xa*(-parseInt(_0x36eebd(0x9a))/0xb);if(_0x3560a0===_0x41abdf)break;else _0x521297['push'](_0x521297['shift']());}catch(_0x15e6da){_0x521297['push'](_0x521297['shift']());}}}(a41_0x1bac,0x73be8));import{permitPageGet}from'../../commands/permit/page-get.js';function a41_0x428d(_0x329003,_0x26f0f3){_0x329003=_0x329003-0x92;const _0x1bacad=a41_0x1bac();let _0x428d4e=_0x1bacad[_0x329003];return _0x428d4e;}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';function a41_0x1bac(){const _0x4eec21=['2400430CviHzE','3515948LeMCPc','11mwjXNP','89365kMzAEV','420414eQfOSb','4297566UojKuF','2656cslHkC','15894FSJHbD','1366172sfZPrP','1yVbTsI','276vnBiXG'];a41_0x1bac=function(){return _0x4eec21;};return a41_0x1bac();}import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
1
+ (function(_0x314e57,_0x6841fb){const _0x42f677=a41_0x1fdf,_0x45bee5=_0x314e57();while(!![]){try{const _0x1849ee=parseInt(_0x42f677(0xac))/0x1+parseInt(_0x42f677(0xa9))/0x2+parseInt(_0x42f677(0xa7))/0x3*(parseInt(_0x42f677(0xaa))/0x4)+-parseInt(_0x42f677(0xae))/0x5+parseInt(_0x42f677(0xa6))/0x6*(parseInt(_0x42f677(0xa5))/0x7)+-parseInt(_0x42f677(0xaf))/0x8*(parseInt(_0x42f677(0xab))/0x9)+-parseInt(_0x42f677(0xa8))/0xa*(parseInt(_0x42f677(0xad))/0xb);if(_0x1849ee===_0x6841fb)break;else _0x45bee5['push'](_0x45bee5['shift']());}catch(_0x274bd4){_0x45bee5['push'](_0x45bee5['shift']());}}}(a41_0x170f,0x59aa3));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a41_0x1fdf(_0x46d610,_0x1001df){_0x46d610=_0x46d610-0xa5;const _0x170f21=a41_0x170f();let _0x1fdf76=_0x170f21[_0x46d610];return _0x1fdf76;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a41_0x170f(){const _0x2c931e=['1629DsyXEG','248919VIiwlf','11stOXeP','1114425JJjsFt','8944UKughR','598717XmDhTZ','36wMFGtb','24ojHVaC','2754110RiSSef','607808hBhlDJ','956wjKUOr'];a41_0x170f=function(){return _0x2c931e;};return a41_0x170f();}import{permitDatasetGet}from'../../commands/permit/dataset-get.js';import{permitDatasetSet}from'../../commands/permit/dataset-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitDatasetGet,permitDatasetSet];
@@ -1 +1 @@
1
- function a42_0x50e1(_0x1f9270,_0x2743d7){_0x1f9270=_0x1f9270-0x6b;const _0x2c04f4=a42_0x2c04();let _0x50e1c8=_0x2c04f4[_0x1f9270];return _0x50e1c8;}const a42_0x388994=a42_0x50e1;(function(_0x5691d6,_0x34bc11){const _0x474396=a42_0x50e1,_0x29ab6f=_0x5691d6();while(!![]){try{const _0x2c4ebc=-parseInt(_0x474396(0x6c))/0x1+-parseInt(_0x474396(0x6b))/0x2*(parseInt(_0x474396(0x78))/0x3)+parseInt(_0x474396(0x75))/0x4*(parseInt(_0x474396(0x76))/0x5)+-parseInt(_0x474396(0x6d))/0x6*(parseInt(_0x474396(0x79))/0x7)+-parseInt(_0x474396(0x6e))/0x8*(-parseInt(_0x474396(0x77))/0x9)+parseInt(_0x474396(0x73))/0xa*(-parseInt(_0x474396(0x70))/0xb)+parseInt(_0x474396(0x74))/0xc*(parseInt(_0x474396(0x71))/0xd);if(_0x2c4ebc===_0x34bc11)break;else _0x29ab6f['push'](_0x29ab6f['shift']());}catch(_0x5c707e){_0x29ab6f['push'](_0x29ab6f['shift']());}}}(a42_0x2c04,0x1dc30));import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';function a42_0x2c04(){const _0x112180=['5CumOEU','9810NNJIWr','2643sfIzTN','1239HTSLQL','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','permit','214RlZLLs','59333tfGdTZ','2058ONWpXS','1440wkByrU','read','11uSFIhZ','43511GCihwy','menu-id','2288710CqKTyr','1212YRBvDy','123356UjUqHR'];a42_0x2c04=function(){return _0x112180;};return a42_0x2c04();}export const permitPageGet={'service':a42_0x388994(0x7b),'command':'page-get','description':a42_0x388994(0x7a),'risk':a42_0x388994(0x6f),'flags':[MENU_ID_FLAG],async 'execute'(_0x4ab4c5){const _0x525370=a42_0x388994,_0x3931f0=await getRuntimePagePermit(_0x4ab4c5['num'](_0x525370(0x72)));return{'ok':!![],'data':{'scope':'runtime','page':projectRuntimePagePermit(_0x3931f0)}};}};
1
+ const a42_0x22bf2f=a42_0x3e0b;(function(_0x14505f,_0x440489){const _0x5b2726=a42_0x3e0b,_0x19da7f=_0x14505f();while(!![]){try{const _0x123bce=parseInt(_0x5b2726(0x78))/0x1*(parseInt(_0x5b2726(0x73))/0x2)+-parseInt(_0x5b2726(0x76))/0x3+-parseInt(_0x5b2726(0x7c))/0x4*(parseInt(_0x5b2726(0x82))/0x5)+parseInt(_0x5b2726(0x7e))/0x6*(parseInt(_0x5b2726(0x80))/0x7)+-parseInt(_0x5b2726(0x79))/0x8*(parseInt(_0x5b2726(0x7a))/0x9)+parseInt(_0x5b2726(0x7f))/0xa*(parseInt(_0x5b2726(0x74))/0xb)+parseInt(_0x5b2726(0x7d))/0xc*(parseInt(_0x5b2726(0x77))/0xd);if(_0x123bce===_0x440489)break;else _0x19da7f['push'](_0x19da7f['shift']());}catch(_0x3d78d5){_0x19da7f['push'](_0x19da7f['shift']());}}}(a42_0x1526,0xd5800));function a42_0x3e0b(_0x271d27,_0x173066){_0x271d27=_0x271d27-0x71;const _0x152669=a42_0x1526();let _0x3e0bd7=_0x152669[_0x271d27];return _0x3e0bd7;}function a42_0x1526(){const _0x1ddb34=['permit','25GIGwdb','runtime','page-get','2253728MSRFDh','7911255yznvEE','Get\x20runtime\x20page\x20permission\x20slots\x20by\x20menu\x20ID','4208481Ldbene','1226563XxCPQF','1hLVwrk','10610264KBeQCz','9RxCIXV','menu-id','522484qeWlRt','216FTTwfC','12XvzYmE','10lQfVWt','2493134PQAlSD'];a42_0x1526=function(){return _0x1ddb34;};return a42_0x1526();}import{getRuntimePagePermit}from'../../core/api-client.js';import{MENU_ID_FLAG,projectRuntimePagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a42_0x22bf2f(0x81),'command':a42_0x22bf2f(0x72),'description':a42_0x22bf2f(0x75),'risk':'read','flags':[MENU_ID_FLAG],async 'execute'(_0x5e5e9a){const _0x5ab03c=a42_0x22bf2f,_0xe3dc60=await getRuntimePagePermit(_0x5e5e9a['num'](_0x5ab03c(0x7b)));return{'ok':!![],'data':{'scope':_0x5ab03c(0x71),'page':projectRuntimePagePermit(_0xe3dc60)}};}};