@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) 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/approval/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/import-excel.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.js +1 -1
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.js +1 -1
  43. package/lib/commands/permit/dataset-set.js +1 -1
  44. package/lib/commands/permit/index.js +1 -1
  45. package/lib/commands/permit/page-get.js +1 -1
  46. package/lib/commands/permit/page-set.js +1 -1
  47. package/lib/commands/permit/role-menus-set.js +1 -1
  48. package/lib/commands/permit/role-menus.js +1 -1
  49. package/lib/commands/permit/shared.js +1 -1
  50. package/lib/commands/personal-bff/index.js +1 -1
  51. package/lib/commands/registry.js +1 -1
  52. package/lib/commands/role/create.js +1 -1
  53. package/lib/commands/role/delete.js +1 -1
  54. package/lib/commands/role/detail.js +1 -1
  55. package/lib/commands/role/index.js +1 -1
  56. package/lib/commands/role/list.js +1 -1
  57. package/lib/commands/role/shared.js +1 -1
  58. package/lib/commands/role/update.js +1 -1
  59. package/lib/commands/role/user-add.js +1 -1
  60. package/lib/commands/role/user-remove.js +1 -1
  61. package/lib/commands/schedule/index.js +1 -1
  62. package/lib/commands/schema.js +1 -1
  63. package/lib/commands/service/dynamic.js +1 -1
  64. package/lib/commands/service/function-name-adapter.js +1 -1
  65. package/lib/commands/service/index.js +1 -1
  66. package/lib/commands/service/registry.js +1 -1
  67. package/lib/commands/skill/commands/create.js +1 -1
  68. package/lib/commands/skill/commands/diagram.js +1 -1
  69. package/lib/commands/skill/commands/install.js +1 -1
  70. package/lib/commands/skill/commands/list.js +1 -1
  71. package/lib/commands/skill/commands/push.js +1 -1
  72. package/lib/commands/skill/commands/validate.js +1 -1
  73. package/lib/commands/skill/diagram.js +1 -1
  74. package/lib/commands/skill/flags.js +1 -1
  75. package/lib/commands/skill/index.js +1 -1
  76. package/lib/commands/skill/manifest-helpers.js +1 -1
  77. package/lib/commands/skill/push-execute.js +1 -1
  78. package/lib/commands/skill/push-flow-helpers.js +1 -1
  79. package/lib/commands/skill/push-retarget.js +1 -1
  80. package/lib/commands/skill/scopes.js +1 -1
  81. package/lib/commands/skill/summary.js +1 -1
  82. package/lib/commands/skill/templates.js +1 -1
  83. package/lib/commands/skill/validate.js +1 -1
  84. package/lib/commands/sql/detail.js +1 -1
  85. package/lib/commands/sql/exec.js +1 -1
  86. package/lib/commands/sql/index.js +1 -1
  87. package/lib/commands/update.js +1 -1
  88. package/lib/commands/user-account/bind.js +1 -1
  89. package/lib/commands/user-account/index.js +1 -1
  90. package/lib/commands/workspace/index.js +1 -1
  91. package/lib/config/domain-config.js +1 -1
  92. package/lib/config/schema.js +1 -1
  93. package/lib/constant/app.js +1 -1
  94. package/lib/constant/auth-mode.js +1 -1
  95. package/lib/constant/cli.js +1 -1
  96. package/lib/constant/defaults.js +1 -1
  97. package/lib/constant/distribution.js +1 -1
  98. package/lib/constant/domain.js +1 -1
  99. package/lib/constant/env.js +1 -1
  100. package/lib/constant/output.js +1 -1
  101. package/lib/constant/product.js +1 -1
  102. package/lib/constant/region.js +1 -1
  103. package/lib/constant/risk.js +1 -1
  104. package/lib/constant/url.js +1 -1
  105. package/lib/context.js +1 -1
  106. package/lib/core/api-client.d.ts +10 -0
  107. package/lib/core/api-client.js +1 -1
  108. package/lib/core/db-resolver.js +1 -1
  109. package/lib/core/kb-search-client.js +1 -1
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/access-error.js +1 -1
  113. package/lib/framework/build-all-flags.js +1 -1
  114. package/lib/framework/dryrun.js +1 -1
  115. package/lib/framework/flags.js +1 -1
  116. package/lib/framework/help.js +1 -1
  117. package/lib/framework/index.js +1 -1
  118. package/lib/framework/output.js +1 -1
  119. package/lib/framework/preparse.js +1 -1
  120. package/lib/framework/rate-limit.js +1 -1
  121. package/lib/framework/raw-flags.js +1 -1
  122. package/lib/framework/response.js +1 -1
  123. package/lib/framework/runner-confirmation.js +1 -1
  124. package/lib/framework/runner-error.js +1 -1
  125. package/lib/framework/runner.js +1 -1
  126. package/lib/framework/schema-export.js +1 -1
  127. package/lib/framework/service-order.js +1 -1
  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/services/dataset-import/auto-id-runner.d.ts +3 -1
  141. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  142. package/lib/services/dataset-import/excel-reader.js +1 -1
  143. package/lib/services/dataset-import/image-bytes.d.ts +3 -0
  144. package/lib/services/dataset-import/image-bytes.js +1 -0
  145. package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
  146. package/lib/services/dataset-import/image-ooxml.js +1 -0
  147. package/lib/services/dataset-import/image-runner.d.ts +48 -0
  148. package/lib/services/dataset-import/image-runner.js +1 -0
  149. package/lib/services/dataset-import/metadata.js +1 -1
  150. package/lib/services/dataset-import/preview.js +1 -1
  151. package/lib/services/dataset-import/runner.d.ts +10 -1
  152. package/lib/services/dataset-import/runner.js +1 -1
  153. package/lib/services/dataset-import/types.d.ts +28 -1
  154. package/lib/skills/builtin-skill.js +1 -1
  155. package/lib/skills/npx-skills-add.js +1 -1
  156. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  157. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  158. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  159. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  160. package/lib/skills/runtime-skill-sync/links.js +1 -1
  161. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  162. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  163. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  164. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  165. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  166. package/lib/skills/runtime-skill-sync/push.js +1 -1
  167. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  168. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  169. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  170. package/lib/skills/runtime-skill-sync.js +1 -1
  171. package/lib/skills/skill-presence.js +1 -1
  172. package/lib/utils/access-key-redaction.js +1 -1
  173. package/lib/utils/apply-jq-filter.js +1 -1
  174. package/lib/utils/cli-version-check.js +1 -1
  175. package/lib/utils/cli-version-policy.js +1 -1
  176. package/lib/utils/logger.js +1 -1
  177. package/lib/utils/lossless-json.js +1 -1
  178. package/lib/utils/params.js +1 -1
  179. package/lib/utils/positive-safe-integer.js +1 -1
  180. package/lib/utils/redaction.js +1 -1
  181. package/lib/utils/update-notice.js +1 -1
  182. package/lib/utils/version.js +1 -1
  183. package/lib/utils/write-cli-side-channel.js +1 -1
  184. package/package.json +4 -1
  185. package/skills/lovrabet/SKILL.md +3 -1
  186. package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
  187. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a55_0x3b2115=a55_0x4265;(function(_0x17381a,_0x3f05b8){const _0x80eb40=a55_0x4265,_0x545866=_0x17381a();while(!![]){try{const _0x4ab0fe=-parseInt(_0x80eb40(0xad))/0x1+-parseInt(_0x80eb40(0xa0))/0x2*(-parseInt(_0x80eb40(0xb5))/0x3)+-parseInt(_0x80eb40(0xa6))/0x4*(-parseInt(_0x80eb40(0xb4))/0x5)+parseInt(_0x80eb40(0xa5))/0x6+parseInt(_0x80eb40(0x99))/0x7+parseInt(_0x80eb40(0xa7))/0x8+-parseInt(_0x80eb40(0xb6))/0x9;if(_0x4ab0fe===_0x3f05b8)break;else _0x545866['push'](_0x545866['shift']());}catch(_0x306762){_0x545866['push'](_0x545866['shift']());}}}(a55_0x26b0,0xe75b4));import{listRuntimeAppRoles}from'../../core/api-client.js';function a55_0x26b0(){const _0x4ab5e8=['page','map','Runtime\x20role\x20type','type','number','10bqrYna','603924hswOWL','5702670TzQMtq','trim','Invalid\x20runtime\x20role\x20type:\x20','items','validation','785295LaFQQr','name','pagesize','runtime','read','toUpperCase','string','2aASfRN','role','list','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','appCode','678714afhwPb','3011240tjsRqn','1043472asIDHe','isSafeInteger','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','str','num','includes','481400Cfokng','Fuzzy\x20role-name\x20filter'];a55_0x26b0=function(){return _0x4ab5e8;};return a55_0x26b0();}import{CliErrors}from'../../errors.js';import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';function a55_0x4265(_0x27bb74,_0xd6103f){_0x27bb74=_0x27bb74-0x99;const _0x26b09e=a55_0x26b0();let _0x426527=_0x26b09e[_0x27bb74];return _0x426527;}export const roleList={'service':a55_0x3b2115(0xa1),'command':a55_0x3b2115(0xa2),'description':a55_0x3b2115(0xa3),'risk':a55_0x3b2115(0x9d),'flags':[{'name':'type','type':a55_0x3b2115(0x9f),'enum':RUNTIME_ROLE_TYPES,'description':a55_0x3b2115(0xb1)},{'name':a55_0x3b2115(0x9a),'type':a55_0x3b2115(0x9f),'description':a55_0x3b2115(0xae)},{'name':'page','type':a55_0x3b2115(0xb3),'default':0x1,'description':'Page\x20number'},{'name':a55_0x3b2115(0x9b),'type':a55_0x3b2115(0xb3),'default':0x64,'description':'Page\x20size\x20from\x201\x20to\x20100'}],async 'validate'(_0x3c65c2){const _0x2a0b90=a55_0x3b2115,_0x21113c=_0x3c65c2[_0x2a0b90(0xaa)](_0x2a0b90(0xb2))[_0x2a0b90(0x9e)]();if(_0x21113c&&!RUNTIME_ROLE_TYPES[_0x2a0b90(0xac)](_0x21113c))throw CliErrors[_0x2a0b90(0xba)](_0x2a0b90(0xb8)+_0x21113c+'.');const _0x53f92f=_0x3c65c2[_0x2a0b90(0xab)](_0x2a0b90(0xaf),0x1),_0x423689=_0x3c65c2[_0x2a0b90(0xab)]('pagesize',0x64);if(!Number[_0x2a0b90(0xa8)](_0x53f92f)||_0x53f92f<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20a\x20positive\x20integer.');if(!Number[_0x2a0b90(0xa8)](_0x423689)||_0x423689<0x1||_0x423689>0x64)throw CliErrors[_0x2a0b90(0xba)](_0x2a0b90(0xa9));},async 'execute'(_0x4810da){const _0x2fb12b=a55_0x3b2115,_0x23b68c=_0x4810da['str'](_0x2fb12b(0xb2))[_0x2fb12b(0x9e)](),_0x5dade1=_0x4810da[_0x2fb12b(0xaa)](_0x2fb12b(0x9a))[_0x2fb12b(0xb7)](),_0x590751=_0x4810da[_0x2fb12b(0xab)](_0x2fb12b(0xaf),0x1),_0x3c2db4=_0x4810da['num'](_0x2fb12b(0x9b),0x64);if(_0x23b68c){const _0x4aa944=(await listAllRuntimeRoles(_0x4810da[_0x2fb12b(0xa4)],{..._0x5dade1?{'roleName':_0x5dade1}:{}}))['filter'](_0x4d2062=>_0x4d2062['roleType']===_0x23b68c),_0x511546=(_0x590751-0x1)*_0x3c2db4;return{'ok':!![],'data':{'scope':_0x2fb12b(0x9c),'roles':_0x4aa944['slice'](_0x511546,_0x511546+_0x3c2db4)[_0x2fb12b(0xb0)](projectRuntimeRole),'paging':{'currentPage':_0x590751,'pageSize':_0x3c2db4,'totalCount':_0x4aa944['length']}}};}const _0x24f3ff=await listRuntimeAppRoles(_0x4810da[_0x2fb12b(0xa4)],{..._0x5dade1?{'roleName':_0x5dade1}:{},'currentPage':_0x590751,'pageSize':_0x3c2db4});return{'ok':!![],'data':{'scope':_0x2fb12b(0x9c),'roles':_0x24f3ff[_0x2fb12b(0xb9)]['map'](projectRuntimeRole),'paging':_0x24f3ff['paging']}};}};
1
+ const a55_0x4ce81=a55_0x4242;(function(_0x393f0f,_0x50b3d9){const _0x135baf=a55_0x4242,_0x481910=_0x393f0f();while(!![]){try{const _0x80f870=parseInt(_0x135baf(0xd9))/0x1*(-parseInt(_0x135baf(0xce))/0x2)+-parseInt(_0x135baf(0xb5))/0x3*(parseInt(_0x135baf(0xbf))/0x4)+parseInt(_0x135baf(0xb3))/0x5+-parseInt(_0x135baf(0xcc))/0x6+-parseInt(_0x135baf(0xc3))/0x7+parseInt(_0x135baf(0xd4))/0x8+-parseInt(_0x135baf(0xc4))/0x9*(-parseInt(_0x135baf(0xd1))/0xa);if(_0x80f870===_0x50b3d9)break;else _0x481910['push'](_0x481910['shift']());}catch(_0x47c639){_0x481910['push'](_0x481910['shift']());}}}(a55_0x5e45,0xcedd1));import{listRuntimeAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a55_0x4242(_0x31ffcc,_0x1f6dca){_0x31ffcc=_0x31ffcc-0xb3;const _0x5e45ba=a55_0x5e45();let _0x424232=_0x5e45ba[_0x31ffcc];return _0x424232;}function a55_0x5e45(){const _0x314005=['page','183GQWADA','7141060WfYMTr','Runtime\x20role\x20type','84AsMpUg','roleType','runtime','Invalid\x20runtime\x20role\x20type:\x20','role','isSafeInteger','slice','length','read','str','91864nJEzFw','type','map','includes','5864089LutSZV','2027601TYKjCA','filter','appCode','name','number','validation','List\x20runtime\x20roles\x20for\x20the\x20current\x20app','--pagesize\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','8448852AoAksq','num','13126vpwsIY','string','toUpperCase','110ywuktq','list','Page\x20size\x20from\x201\x20to\x20100','8246944rWZLDM','--page\x20must\x20be\x20a\x20positive\x20integer.','paging','pagesize'];a55_0x5e45=function(){return _0x314005;};return a55_0x5e45();}import{listAllRuntimeRoles,projectRuntimeRole,RUNTIME_ROLE_TYPES}from'../../commands/role/shared.js';export const roleList={'service':a55_0x4ce81(0xb9),'command':a55_0x4ce81(0xd2),'description':a55_0x4ce81(0xca),'risk':a55_0x4ce81(0xbd),'flags':[{'name':a55_0x4ce81(0xc0),'type':a55_0x4ce81(0xcf),'enum':RUNTIME_ROLE_TYPES,'description':a55_0x4ce81(0xb4)},{'name':'name','type':a55_0x4ce81(0xcf),'description':'Fuzzy\x20role-name\x20filter'},{'name':a55_0x4ce81(0xd8),'type':a55_0x4ce81(0xc8),'default':0x1,'description':'Page\x20number'},{'name':a55_0x4ce81(0xd7),'type':a55_0x4ce81(0xc8),'default':0x64,'description':a55_0x4ce81(0xd3)}],async 'validate'(_0x1a4238){const _0x1270ab=a55_0x4ce81,_0x560b4c=_0x1a4238[_0x1270ab(0xbe)](_0x1270ab(0xc0))[_0x1270ab(0xd0)]();if(_0x560b4c&&!RUNTIME_ROLE_TYPES[_0x1270ab(0xc2)](_0x560b4c))throw CliErrors[_0x1270ab(0xc9)](_0x1270ab(0xb8)+_0x560b4c+'.');const _0x18568a=_0x1a4238[_0x1270ab(0xcd)](_0x1270ab(0xd8),0x1),_0x56ed84=_0x1a4238[_0x1270ab(0xcd)](_0x1270ab(0xd7),0x64);if(!Number[_0x1270ab(0xba)](_0x18568a)||_0x18568a<0x1)throw CliErrors[_0x1270ab(0xc9)](_0x1270ab(0xd5));if(!Number['isSafeInteger'](_0x56ed84)||_0x56ed84<0x1||_0x56ed84>0x64)throw CliErrors['validation'](_0x1270ab(0xcb));},async 'execute'(_0xf312af){const _0xda8489=a55_0x4ce81,_0x19b410=_0xf312af['str']('type')[_0xda8489(0xd0)](),_0x31bb52=_0xf312af[_0xda8489(0xbe)](_0xda8489(0xc7))['trim'](),_0x397586=_0xf312af['num'](_0xda8489(0xd8),0x1),_0x3c266b=_0xf312af[_0xda8489(0xcd)]('pagesize',0x64);if(_0x19b410){const _0x10b3d9=(await listAllRuntimeRoles(_0xf312af[_0xda8489(0xc6)],{..._0x31bb52?{'roleName':_0x31bb52}:{}}))[_0xda8489(0xc5)](_0x112633=>_0x112633[_0xda8489(0xb6)]===_0x19b410),_0x125394=(_0x397586-0x1)*_0x3c266b;return{'ok':!![],'data':{'scope':_0xda8489(0xb7),'roles':_0x10b3d9[_0xda8489(0xbb)](_0x125394,_0x125394+_0x3c266b)[_0xda8489(0xc1)](projectRuntimeRole),'paging':{'currentPage':_0x397586,'pageSize':_0x3c266b,'totalCount':_0x10b3d9[_0xda8489(0xbc)]}}};}const _0x1017cd=await listRuntimeAppRoles(_0xf312af[_0xda8489(0xc6)],{..._0x31bb52?{'roleName':_0x31bb52}:{},'currentPage':_0x397586,'pageSize':_0x3c266b});return{'ok':!![],'data':{'scope':_0xda8489(0xb7),'roles':_0x1017cd['items'][_0xda8489(0xc1)](projectRuntimeRole),'paging':_0x1017cd[_0xda8489(0xd6)]}};}};
@@ -1 +1 @@
1
- const a56_0x4ecfc9=a56_0x3365;(function(_0x5eb394,_0x508d64){const _0x432dbb=a56_0x3365,_0x560bb2=_0x5eb394();while(!![]){try{const _0x5d94b6=-parseInt(_0x432dbb(0x18f))/0x1*(parseInt(_0x432dbb(0x18b))/0x2)+-parseInt(_0x432dbb(0x1c9))/0x3*(parseInt(_0x432dbb(0x1c7))/0x4)+-parseInt(_0x432dbb(0x199))/0x5*(-parseInt(_0x432dbb(0x1b0))/0x6)+-parseInt(_0x432dbb(0x1a8))/0x7+-parseInt(_0x432dbb(0x1a9))/0x8*(-parseInt(_0x432dbb(0x1cb))/0x9)+-parseInt(_0x432dbb(0x1a6))/0xa+parseInt(_0x432dbb(0x1a4))/0xb;if(_0x5d94b6===_0x508d64)break;else _0x560bb2['push'](_0x560bb2['shift']());}catch(_0x4255b6){_0x560bb2['push'](_0x560bb2['shift']());}}}(a56_0xcff2,0x30fcb));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=[a56_0x4ecfc9(0x1c8),a56_0x4ecfc9(0x19b),a56_0x4ecfc9(0x19c),a56_0x4ecfc9(0x187)];const BUILTIN_ROLE_TYPES=[a56_0x4ecfc9(0x1c8),a56_0x4ecfc9(0x19b),a56_0x4ecfc9(0x19c)];export const ROLE_ID_FLAG={'name':'id','type':a56_0x4ecfc9(0x189),'required':!![],'description':a56_0x4ecfc9(0x194)};export const ROLE_REF_FLAG={'name':'role','type':a56_0x4ecfc9(0x1c5),'required':!![],'description':a56_0x4ecfc9(0x1af)};export const ROLE_CODE_FLAG={'name':'role-code','type':'string','description':'Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)'};function a56_0xcff2(){const _0x421f67=['validation','permitCount','join','string','push','50536bYKuJi','ADMIN','66YNbxPc','includes','18PViGML','expect-user-count','Pass\x20--role\x20<id|name>.','userCount','Runtime\x20role\x20','items',',\x20found\x20','totalCount','CUSTOM','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','number','Cannot\x20','6rRDVro','roleCode','userList','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','104743ZssliE','appCode','roleType','str','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','userId','--role-code\x20cannot\x20exceed\x2064\x20characters.','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','roleName','5zMCbHp','paging','USER','OWNER','Runtime\x20role\x20id\x20','\x20was\x20not\x20found\x20in\x20app\x20','Missing\x20runtime\x20role\x20reference.','user','--role-code\x20must\x20not\x20be\x20blank.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','6997122lJVBPQ','filter','2662880AkmpgT','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','2288853ZrrNzR','1411064uTayxZ','Runtime\x20numeric\x20userId','Runtime\x20user\x20','length','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','num','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','2383362GfNfyv','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','isSafeInteger','User\x20','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','find','\x20is\x20already\x20in\x20runtime\x20role\x20','remark','applyUserList','trim','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','test','\x20is\x20not\x20in\x20runtime\x20role\x20','runtime','\x20built-in\x20runtime\x20role\x20','flag','Runtime\x20role\x20name\x20\x22','map'];a56_0xcff2=function(){return _0x421f67;};return a56_0xcff2();}export const USER_ID_FLAG={'name':a56_0x4ecfc9(0x1a0),'type':a56_0x4ecfc9(0x1c5),'required':!![],'description':a56_0x4ecfc9(0x1aa)};export const EXPECT_USER_COUNT_FLAG={'name':a56_0x4ecfc9(0x180),'type':a56_0x4ecfc9(0x189),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x47e253){const _0x501e02=a56_0x4ecfc9;return BUILTIN_ROLE_TYPES[_0x501e02(0x1ca)](_0x47e253);}export function assertCustomRuntimeRole(_0x4f57a9,_0x10b9cb){const _0x4ed591=a56_0x4ecfc9;if(_0x4f57a9[_0x4ed591(0x191)]!==_0x4ed591(0x187))throw CliErrors[_0x4ed591(0x1c2)](_0x4ed591(0x18a)+_0x10b9cb+_0x4ed591(0x1be)+_0x4f57a9[_0x4ed591(0x198)]+'\x20('+_0x4f57a9['roleType']+').',_0x4ed591(0x1ad));}export function projectRuntimeRole(_0x22e955){const _0x288c71=a56_0x4ecfc9;return{'id':_0x22e955['id'],'roleCode':_0x22e955[_0x288c71(0x18c)],'roleName':_0x22e955['roleName'],'roleType':_0x22e955[_0x288c71(0x191)],'remark':_0x22e955[_0x288c71(0x1b7)],'userCount':_0x22e955[_0x288c71(0x182)]??0x0,'permitCount':_0x22e955[_0x288c71(0x1c3)]??0x0,'builtin':isBuiltinRuntimeRole(_0x22e955[_0x288c71(0x191)])};}export function readOptionalRuntimeRoleCode(_0x9041f7){const _0x37d4d4=a56_0x4ecfc9,_0x5573dd=_0x9041f7[_0x37d4d4(0x1bf)]('role-code');if(_0x5573dd===undefined||_0x5573dd===null)return undefined;const _0x6c56a0=String(_0x5573dd)[_0x37d4d4(0x1b9)]();if(!_0x6c56a0)throw CliErrors[_0x37d4d4(0x1c2)](_0x37d4d4(0x1a1));if(_0x6c56a0[_0x37d4d4(0x1ac)]>0x40)throw CliErrors[_0x37d4d4(0x1c2)](_0x37d4d4(0x196));return _0x6c56a0;}export async function getRuntimeRoleById(_0x50ebd4,_0x3370b3){const _0x1f1010=a56_0x4ecfc9;if(!Number[_0x1f1010(0x1b2)](_0x3370b3)||_0x3370b3<=0x0)throw CliErrors[_0x1f1010(0x1c2)](_0x1f1010(0x1ba));const _0x3d1d22=(await listAllRuntimeRoles(_0x50ebd4))[_0x1f1010(0x1a5)](_0x5a708b=>_0x5a708b['id']===_0x3370b3&&(!_0x5a708b[_0x1f1010(0x190)]||_0x5a708b[_0x1f1010(0x190)]===_0x50ebd4));if(_0x3d1d22[_0x1f1010(0x1ac)]!==0x1)throw CliErrors[_0x1f1010(0x1c2)](_0x1f1010(0x19d)+_0x3370b3+_0x1f1010(0x19e)+_0x50ebd4+'.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.');return _0x3d1d22[0x0];}export async function listAllRuntimeRoles(_0x7600d8,_0x4ece32={}){const _0x5dfbbd=a56_0x4ecfc9,_0x53079b=0x64,_0x4e28ad=[];for(let _0x292889=0x1;;_0x292889+=0x1){const _0x582305=await listRuntimeAppRoles(_0x7600d8,{..._0x4ece32[_0x5dfbbd(0x198)]?{'roleName':_0x4ece32['roleName']}:{},'currentPage':_0x292889,'pageSize':_0x53079b});_0x4e28ad[_0x5dfbbd(0x1c6)](..._0x582305['items']);if(_0x582305[_0x5dfbbd(0x184)]['length']<_0x53079b||_0x582305['paging']&&_0x4e28ad[_0x5dfbbd(0x1ac)]>=_0x582305[_0x5dfbbd(0x19a)][_0x5dfbbd(0x186)])return _0x4e28ad;}}export async function resolveRuntimeRoleRef(_0xa590dd,_0x4cac15){const _0x3e4065=a56_0x4ecfc9,_0x34bcfd=_0x4cac15[_0x3e4065(0x1b9)]();if(!_0x34bcfd)throw CliErrors[_0x3e4065(0x1c2)](_0x3e4065(0x19f),_0x3e4065(0x181));if(/^\d+$/[_0x3e4065(0x1bb)](_0x34bcfd))return getRuntimeRoleById(_0xa590dd,Number(_0x34bcfd));const _0x3a8bf3=(await listAllRuntimeRoles(_0xa590dd))[_0x3e4065(0x1a5)](_0xdc8ee3=>_0xdc8ee3['roleName']===_0x34bcfd);if(_0x3a8bf3[_0x3e4065(0x1ac)]===0x0)throw CliErrors[_0x3e4065(0x1c2)]('Runtime\x20role\x20name\x20\x22'+_0x34bcfd+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0xa590dd+'.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.');if(_0x3a8bf3[_0x3e4065(0x1ac)]>0x1)throw CliErrors[_0x3e4065(0x1c2)](_0x3e4065(0x1c0)+_0x34bcfd+'\x22\x20is\x20ambiguous.','Pass\x20one\x20role\x20ID:\x20'+_0x3a8bf3[_0x3e4065(0x1c1)](_0x1371ea=>_0x1371ea['id'])[_0x3e4065(0x1c4)](',\x20')+'.');return _0x3a8bf3[0x0];}function parseRuntimeUserId(_0x1aab0f){const _0x263363=a56_0x4ecfc9,_0x166c47=_0x1aab0f['trim'](),_0x574c28=normalizePositiveSafeInteger(_0x166c47);if(_0x574c28===undefined)throw CliErrors[_0x263363(0x1c2)](_0x263363(0x1a7),_0x263363(0x1b4));return _0x574c28;}export async function prepareRuntimeMemberMutation(_0x555faa,_0x2b3408){const _0x1a1988=a56_0x4ecfc9,_0x3b9994=await resolveRuntimeRoleRef(_0x555faa[_0x1a1988(0x190)],_0x555faa['str']('role'));if(_0x3b9994[_0x1a1988(0x191)]==='OWNER')throw CliErrors[_0x1a1988(0x1c2)](_0x1a1988(0x188),'Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x3790ca=parseRuntimeUserId(_0x555faa[_0x1a1988(0x192)](_0x1a1988(0x1a0))),_0x1c5577=(await listRuntimeRoleUsers(_0x555faa[_0x1a1988(0x190)]))[_0x1a1988(0x1c1)](_0x1a60da=>({..._0x1a60da,'userList':[..._0x1a60da[_0x1a1988(0x18d)]??[]],'applyUserList':[..._0x1a60da[_0x1a1988(0x1b8)]??[]]})),_0x5a8572=_0x1c5577[_0x1a1988(0x1b5)](_0x59c150=>_0x59c150['id']===_0x3b9994['id']);if(!_0x5a8572)throw CliErrors[_0x1a1988(0x1c2)](_0x1a1988(0x183)+_0x3b9994['id']+_0x1a1988(0x1b1),_0x1a1988(0x197));const _0x165934=_0x5a8572[_0x1a1988(0x18d)][_0x1a1988(0x1c1)](_0x35e0bb=>_0x35e0bb[_0x1a1988(0x195)]),_0x27fec6=_0x555faa[_0x1a1988(0x1bf)](_0x1a1988(0x180));if(_0x27fec6!==undefined&&_0x27fec6!==null&&_0x27fec6!==''){const _0x1be771=_0x555faa[_0x1a1988(0x1ae)](_0x1a1988(0x180));if(!Number[_0x1a1988(0x1b2)](_0x1be771)||_0x1be771<0x0)throw CliErrors[_0x1a1988(0x1c2)](_0x1a1988(0x18e));if(_0x165934[_0x1a1988(0x1ac)]!==_0x1be771)throw CliErrors[_0x1a1988(0x1c2)](_0x1a1988(0x193)+_0x1be771+_0x1a1988(0x185)+_0x165934[_0x1a1988(0x1ac)]+'.',_0x1a1988(0x1a3));}const _0x2c27c1=_0x165934[_0x1a1988(0x1ca)](_0x3790ca),_0x56328e=[];let _0x3a9752=!![];if(_0x2b3408==='user-add'){const _0x59791a=await listRuntimeAppUsers(_0x555faa[_0x1a1988(0x190)]),_0x459afa=_0x59791a['filter'](_0x1db629=>Number(_0x1db629['code'])===_0x3790ca);if(_0x459afa[_0x1a1988(0x1ac)]!==0x1||!_0x459afa[0x0]['userName']?.['trim']())throw CliErrors[_0x1a1988(0x1c2)](_0x1a1988(0x1ab)+_0x3790ca+_0x1a1988(0x19e)+_0x555faa[_0x1a1988(0x190)]+'.',_0x1a1988(0x1a2));_0x2c27c1?(_0x3a9752=![],_0x56328e[_0x1a1988(0x1c6)](_0x1a1988(0x1b3)+_0x3790ca+_0x1a1988(0x1b6)+_0x3b9994['id']+'.')):_0x5a8572[_0x1a1988(0x18d)][_0x1a1988(0x1c6)]({'userId':_0x3790ca,'username':_0x459afa[0x0]['userName']});}else!_0x2c27c1?(_0x3a9752=![],_0x56328e[_0x1a1988(0x1c6)](_0x1a1988(0x1b3)+_0x3790ca+_0x1a1988(0x1bc)+_0x3b9994['id']+'.')):_0x5a8572[_0x1a1988(0x18d)]=_0x5a8572[_0x1a1988(0x18d)]['filter'](_0x19ff26=>_0x19ff26[_0x1a1988(0x195)]!==_0x3790ca);return{'role':_0x3b9994,'userId':_0x3790ca,'roleList':_0x1c5577,'before':{'userIds':_0x165934},'after':{'userIds':_0x5a8572[_0x1a1988(0x18d)][_0x1a1988(0x1c1)](_0x222676=>_0x222676[_0x1a1988(0x195)])},'shouldWrite':_0x3a9752,'warnings':_0x56328e};}function a56_0x3365(_0x348764,_0x2a19f4){_0x348764=_0x348764-0x180;const _0xcff209=a56_0xcff2();let _0x33655b=_0xcff209[_0x348764];return _0x33655b;}export function runtimeRoleWriteResult(_0xc34ecc,_0x3d4e06,_0x5392a4,_0x19330e,_0x3c8c16,_0xa06ecc=[]){const _0x4901a7=a56_0x4ecfc9;return{'operation':_0xc34ecc,'scope':_0x4901a7(0x1bd),'selector':_0x3d4e06,'before':_0x5392a4,'after':_0x19330e,'dryRun':![],'backend':_0x3c8c16,'warnings':_0xa06ecc};}
1
+ const a56_0x31f84a=a56_0x2acc;(function(_0x5a08b0,_0x3b3320){const _0x5568ac=a56_0x2acc,_0x6d798a=_0x5a08b0();while(!![]){try{const _0x3de01d=parseInt(_0x5568ac(0x1c9))/0x1+parseInt(_0x5568ac(0x1e0))/0x2+-parseInt(_0x5568ac(0x1c3))/0x3+-parseInt(_0x5568ac(0x1f0))/0x4*(parseInt(_0x5568ac(0x1b5))/0x5)+-parseInt(_0x5568ac(0x1b6))/0x6*(parseInt(_0x5568ac(0x1bb))/0x7)+-parseInt(_0x5568ac(0x1de))/0x8*(-parseInt(_0x5568ac(0x1b9))/0x9)+parseInt(_0x5568ac(0x1b7))/0xa;if(_0x3de01d===_0x3b3320)break;else _0x6d798a['push'](_0x6d798a['shift']());}catch(_0x3ce331){_0x6d798a['push'](_0x6d798a['shift']());}}}(a56_0x5d6a,0x1ed54));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=['ADMIN',a56_0x31f84a(0x1e2),a56_0x31f84a(0x1ee),a56_0x31f84a(0x1cd)];const BUILTIN_ROLE_TYPES=[a56_0x31f84a(0x1d5),'USER',a56_0x31f84a(0x1ee)];export const ROLE_ID_FLAG={'name':'id','type':a56_0x31f84a(0x1f8),'required':!![],'description':'Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list'};export const ROLE_REF_FLAG={'name':a56_0x31f84a(0x1cb),'type':'string','required':!![],'description':'Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name'};function a56_0x2acc(_0x112d67,_0x53a801){_0x112d67=_0x112d67-0x1b4;const _0x5d6ad1=a56_0x5d6a();let _0x2acc50=_0x5d6ad1[_0x112d67];return _0x2acc50;}export const ROLE_CODE_FLAG={'name':'role-code','type':'string','description':a56_0x31f84a(0x1c6)};export const USER_ID_FLAG={'name':a56_0x31f84a(0x1f5),'type':a56_0x31f84a(0x1f6),'required':!![],'description':'Runtime\x20numeric\x20userId'};export const EXPECT_USER_COUNT_FLAG={'name':a56_0x31f84a(0x1db),'type':a56_0x31f84a(0x1f8),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x2c4b14){const _0x37c3f0=a56_0x31f84a;return BUILTIN_ROLE_TYPES[_0x37c3f0(0x1e3)](_0x2c4b14);}export function assertCustomRuntimeRole(_0x3cca00,_0x2e7d59){const _0x19e760=a56_0x31f84a;if(_0x3cca00[_0x19e760(0x1e8)]!==_0x19e760(0x1cd))throw CliErrors[_0x19e760(0x1ea)](_0x19e760(0x1f9)+_0x2e7d59+_0x19e760(0x1be)+_0x3cca00['roleName']+'\x20('+_0x3cca00[_0x19e760(0x1e8)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x484fa0){const _0x594098=a56_0x31f84a;return{'id':_0x484fa0['id'],'roleCode':_0x484fa0[_0x594098(0x1cf)],'roleName':_0x484fa0[_0x594098(0x1da)],'roleType':_0x484fa0[_0x594098(0x1e8)],'remark':_0x484fa0[_0x594098(0x1fa)],'userCount':_0x484fa0[_0x594098(0x1ca)]??0x0,'permitCount':_0x484fa0[_0x594098(0x1eb)]??0x0,'builtin':isBuiltinRuntimeRole(_0x484fa0['roleType'])};}function a56_0x5d6a(){const _0x59f66e=['--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x22\x20was\x20not\x20found\x20in\x20app\x20','applyUserList','roleName','expect-user-count','Runtime\x20role\x20name\x20\x22','flag','789648XksvwB','\x20is\x20already\x20in\x20runtime\x20role\x20','267032FmCrKx','find','USER','includes','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','code','items','role-code','roleType','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','validation','permitCount','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','OWNER','filter','12308fHVjUQ','appCode','userName','map','Runtime\x20user\x20','user','string','\x22\x20is\x20ambiguous.','number','Cannot\x20','remark','push','Runtime\x20role\x20','User\x20','400FaQAzz','186pyhNvc','1986100RAIncT','user-add','9HJsemM','trim','15008KZRZyc','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','--role-code\x20must\x20not\x20be\x20blank.','\x20built-in\x20runtime\x20role\x20','\x20is\x20not\x20in\x20runtime\x20role\x20','Runtime\x20role\x20id\x20','--role-code\x20cannot\x20exceed\x2064\x20characters.','userId','488046QfRiHd','str','userList','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','Pass\x20one\x20role\x20ID:\x20','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','170766sUQxWI','userCount','role','test','CUSTOM','length','roleCode','Missing\x20runtime\x20role\x20reference.','isSafeInteger',',\x20found\x20','paging','join','ADMIN','totalCount'];a56_0x5d6a=function(){return _0x59f66e;};return a56_0x5d6a();}export function readOptionalRuntimeRoleCode(_0xbb0d35){const _0x4cc189=a56_0x31f84a,_0x2b1368=_0xbb0d35[_0x4cc189(0x1dd)](_0x4cc189(0x1e7));if(_0x2b1368===undefined||_0x2b1368===null)return undefined;const _0x1ff1c6=String(_0x2b1368)['trim']();if(!_0x1ff1c6)throw CliErrors[_0x4cc189(0x1ea)](_0x4cc189(0x1bd));if(_0x1ff1c6[_0x4cc189(0x1ce)]>0x40)throw CliErrors[_0x4cc189(0x1ea)](_0x4cc189(0x1c1));return _0x1ff1c6;}export async function getRuntimeRoleById(_0x7d5e4e,_0x26af90){const _0x3e07bd=a56_0x31f84a;if(!Number[_0x3e07bd(0x1d1)](_0x26af90)||_0x26af90<=0x0)throw CliErrors[_0x3e07bd(0x1ea)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x44bdd9=(await listAllRuntimeRoles(_0x7d5e4e))[_0x3e07bd(0x1ef)](_0x39d2cc=>_0x39d2cc['id']===_0x26af90&&(!_0x39d2cc['appCode']||_0x39d2cc[_0x3e07bd(0x1f1)]===_0x7d5e4e));if(_0x44bdd9[_0x3e07bd(0x1ce)]!==0x1)throw CliErrors[_0x3e07bd(0x1ea)](_0x3e07bd(0x1c0)+_0x26af90+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x7d5e4e+'.',_0x3e07bd(0x1e9));return _0x44bdd9[0x0];}export async function listAllRuntimeRoles(_0x513d3c,_0x4c16a8={}){const _0x33c415=a56_0x31f84a,_0x430dce=0x64,_0x4c4d86=[];for(let _0x10f383=0x1;;_0x10f383+=0x1){const _0x1a1cf3=await listRuntimeAppRoles(_0x513d3c,{..._0x4c16a8[_0x33c415(0x1da)]?{'roleName':_0x4c16a8[_0x33c415(0x1da)]}:{},'currentPage':_0x10f383,'pageSize':_0x430dce});_0x4c4d86[_0x33c415(0x1fb)](..._0x1a1cf3[_0x33c415(0x1e6)]);if(_0x1a1cf3['items'][_0x33c415(0x1ce)]<_0x430dce||_0x1a1cf3[_0x33c415(0x1d3)]&&_0x4c4d86[_0x33c415(0x1ce)]>=_0x1a1cf3[_0x33c415(0x1d3)][_0x33c415(0x1d6)])return _0x4c4d86;}}export async function resolveRuntimeRoleRef(_0x116d77,_0x21c436){const _0x32d578=a56_0x31f84a,_0x4a5112=_0x21c436[_0x32d578(0x1ba)]();if(!_0x4a5112)throw CliErrors[_0x32d578(0x1ea)](_0x32d578(0x1d0),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x32d578(0x1cc)](_0x4a5112))return getRuntimeRoleById(_0x116d77,Number(_0x4a5112));const _0x2efe33=(await listAllRuntimeRoles(_0x116d77))[_0x32d578(0x1ef)](_0x345c19=>_0x345c19[_0x32d578(0x1da)]===_0x4a5112);if(_0x2efe33[_0x32d578(0x1ce)]===0x0)throw CliErrors[_0x32d578(0x1ea)]('Runtime\x20role\x20name\x20\x22'+_0x4a5112+_0x32d578(0x1d8)+_0x116d77+'.',_0x32d578(0x1bc));if(_0x2efe33['length']>0x1)throw CliErrors[_0x32d578(0x1ea)](_0x32d578(0x1dc)+_0x4a5112+_0x32d578(0x1f7),_0x32d578(0x1c7)+_0x2efe33[_0x32d578(0x1f3)](_0x15544e=>_0x15544e['id'])[_0x32d578(0x1d4)](',\x20')+'.');return _0x2efe33[0x0];}function parseRuntimeUserId(_0x1bf6cd){const _0xf6387a=a56_0x31f84a,_0x49c10c=_0x1bf6cd[_0xf6387a(0x1ba)](),_0x3c3720=normalizePositiveSafeInteger(_0x49c10c);if(_0x3c3720===undefined)throw CliErrors[_0xf6387a(0x1ea)]('Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.',_0xf6387a(0x1e4));return _0x3c3720;}export async function prepareRuntimeMemberMutation(_0x35c16f,_0x202a5a){const _0x35bf35=a56_0x31f84a,_0x13fb5f=await resolveRuntimeRoleRef(_0x35c16f[_0x35bf35(0x1f1)],_0x35c16f['str']('role'));if(_0x13fb5f[_0x35bf35(0x1e8)]===_0x35bf35(0x1ee))throw CliErrors[_0x35bf35(0x1ea)]('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x13f5b3=parseRuntimeUserId(_0x35c16f[_0x35bf35(0x1c4)](_0x35bf35(0x1f5))),_0x286f9e=(await listRuntimeRoleUsers(_0x35c16f['appCode']))[_0x35bf35(0x1f3)](_0x2e63cb=>({..._0x2e63cb,'userList':[..._0x2e63cb[_0x35bf35(0x1c5)]??[]],'applyUserList':[..._0x2e63cb[_0x35bf35(0x1d9)]??[]]})),_0x47cb01=_0x286f9e[_0x35bf35(0x1e1)](_0x1ae717=>_0x1ae717['id']===_0x13fb5f['id']);if(!_0x47cb01)throw CliErrors[_0x35bf35(0x1ea)](_0x35bf35(0x1fc)+_0x13fb5f['id']+'\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.',_0x35bf35(0x1ec));const _0x152476=_0x47cb01['userList'][_0x35bf35(0x1f3)](_0x8ef30c=>_0x8ef30c[_0x35bf35(0x1c2)]),_0x3e5314=_0x35c16f[_0x35bf35(0x1dd)](_0x35bf35(0x1db));if(_0x3e5314!==undefined&&_0x3e5314!==null&&_0x3e5314!==''){const _0x5ba67e=_0x35c16f['num'](_0x35bf35(0x1db));if(!Number[_0x35bf35(0x1d1)](_0x5ba67e)||_0x5ba67e<0x0)throw CliErrors[_0x35bf35(0x1ea)](_0x35bf35(0x1d7));if(_0x152476[_0x35bf35(0x1ce)]!==_0x5ba67e)throw CliErrors[_0x35bf35(0x1ea)]('Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20'+_0x5ba67e+_0x35bf35(0x1d2)+_0x152476[_0x35bf35(0x1ce)]+'.',_0x35bf35(0x1ed));}const _0x529dde=_0x152476['includes'](_0x13f5b3),_0x4d2c2=[];let _0x96c5d8=!![];if(_0x202a5a===_0x35bf35(0x1b8)){const _0x538ca3=await listRuntimeAppUsers(_0x35c16f[_0x35bf35(0x1f1)]),_0x498ca4=_0x538ca3[_0x35bf35(0x1ef)](_0x4599ee=>Number(_0x4599ee[_0x35bf35(0x1e5)])===_0x13f5b3);if(_0x498ca4[_0x35bf35(0x1ce)]!==0x1||!_0x498ca4[0x0]['userName']?.[_0x35bf35(0x1ba)]())throw CliErrors[_0x35bf35(0x1ea)](_0x35bf35(0x1f4)+_0x13f5b3+'\x20was\x20not\x20found\x20in\x20app\x20'+_0x35c16f[_0x35bf35(0x1f1)]+'.',_0x35bf35(0x1c8));_0x529dde?(_0x96c5d8=![],_0x4d2c2['push'](_0x35bf35(0x1b4)+_0x13f5b3+_0x35bf35(0x1df)+_0x13fb5f['id']+'.')):_0x47cb01[_0x35bf35(0x1c5)]['push']({'userId':_0x13f5b3,'username':_0x498ca4[0x0][_0x35bf35(0x1f2)]});}else!_0x529dde?(_0x96c5d8=![],_0x4d2c2[_0x35bf35(0x1fb)]('User\x20'+_0x13f5b3+_0x35bf35(0x1bf)+_0x13fb5f['id']+'.')):_0x47cb01[_0x35bf35(0x1c5)]=_0x47cb01[_0x35bf35(0x1c5)]['filter'](_0x3dcfe7=>_0x3dcfe7[_0x35bf35(0x1c2)]!==_0x13f5b3);return{'role':_0x13fb5f,'userId':_0x13f5b3,'roleList':_0x286f9e,'before':{'userIds':_0x152476},'after':{'userIds':_0x47cb01[_0x35bf35(0x1c5)]['map'](_0x5d270e=>_0x5d270e['userId'])},'shouldWrite':_0x96c5d8,'warnings':_0x4d2c2};}export function runtimeRoleWriteResult(_0x43b8c8,_0xf1324c,_0x3626bc,_0x315631,_0x536ba9,_0x43c9df=[]){return{'operation':_0x43b8c8,'scope':'runtime','selector':_0xf1324c,'before':_0x3626bc,'after':_0x315631,'dryRun':![],'backend':_0x536ba9,'warnings':_0x43c9df};}
@@ -1 +1 @@
1
- function a57_0x3363(_0x496040,_0x290568){_0x496040=_0x496040-0xb9;const _0x3fcc84=a57_0x3fcc();let _0x336308=_0x3fcc84[_0x496040];return _0x336308;}const a57_0x29af92=a57_0x3363;(function(_0x4ea9cd,_0x102deb){const _0x10bf73=a57_0x3363,_0x31cafd=_0x4ea9cd();while(!![]){try{const _0x2d0aee=parseInt(_0x10bf73(0xc9))/0x1+parseInt(_0x10bf73(0xc6))/0x2*(-parseInt(_0x10bf73(0xbe))/0x3)+parseInt(_0x10bf73(0xd7))/0x4+parseInt(_0x10bf73(0xc3))/0x5+-parseInt(_0x10bf73(0xc8))/0x6+-parseInt(_0x10bf73(0xd4))/0x7*(parseInt(_0x10bf73(0xd1))/0x8)+parseInt(_0x10bf73(0xc1))/0x9;if(_0x2d0aee===_0x102deb)break;else _0x31cafd['push'](_0x31cafd['shift']());}catch(_0x8f0b50){_0x31cafd['push'](_0x31cafd['shift']());}}}(a57_0x3fcc,0x85689));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x118abe){const _0x301c33=a57_0x3363,_0x2d62c8=_0x118abe['flag']('role-code')!==undefined,_0x36987=_0x118abe[_0x301c33(0xd2)](_0x301c33(0xbd))!==undefined,_0x1a24ad=_0x118abe['flag']('remark')!==undefined;if(!_0x2d62c8&&!_0x36987&&!_0x1a24ad)throw CliErrors['validation'](_0x301c33(0xca));const _0x18b91a=readOptionalRuntimeRoleCode(_0x118abe),_0x21dd11=_0x118abe[_0x301c33(0xc7)]('name')[_0x301c33(0xc0)](),_0x3eabd9=_0x118abe[_0x301c33(0xc7)](_0x301c33(0xcd))['trim']();if(_0x36987&&!_0x21dd11)throw CliErrors[_0x301c33(0xd6)](_0x301c33(0xc4));if(_0x1a24ad&&!_0x3eabd9)throw CliErrors[_0x301c33(0xd6)]('--remark\x20must\x20not\x20be\x20blank.','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.');return{..._0x18b91a?{'roleCode':_0x18b91a}:{},..._0x36987?{'roleName':_0x21dd11}:{},..._0x1a24ad?{'remark':_0x3eabd9}:{}};}function a57_0x3fcc(){const _0x71ad61=['Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','role','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','296XGnPEr','flag','body','100324lcZNVF','high-risk-write','validation','4357308ImNQrQ','New\x20non-empty\x20role\x20remark','description','POST','build','name','665526Vihdae','/client/permit/role/update','trim','2183967XpCVpS','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','852770IjCjAq','--name\x20must\x20not\x20be\x20blank.','string','2JRAbCh','str','3141174bLKCFm','319552HrYqZS','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','appCode','update','remark'];a57_0x3fcc=function(){return _0x71ad61;};return a57_0x3fcc();}async function prepare(_0x30f581){const _0x568459=a57_0x3363,_0x2b9493=await getRuntimeRoleById(_0x30f581[_0x568459(0xcb)],_0x30f581['num']('id'));return assertCustomRuntimeRole(_0x2b9493,_0x568459(0xcc)),{'role':_0x2b9493,'body':{'id':_0x2b9493['id'],'appCode':_0x30f581[_0x568459(0xcb)],...updateFields(_0x30f581)}};}export const roleUpdate={'service':a57_0x29af92(0xcf),'command':a57_0x29af92(0xcc),'description':a57_0x29af92(0xd0),'risk':a57_0x29af92(0xd5),'confirmationDescription':a57_0x29af92(0xc2),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a57_0x29af92(0xbd),'type':'string','description':'New\x20role\x20name'},{'name':a57_0x29af92(0xcd),'type':a57_0x29af92(0xc5),'description':a57_0x29af92(0xb9)}],async 'validate'(_0x2b5d31){updateFields(_0x2b5d31);},async 'dryRun'(_0x4a9716){const _0x577b09=a57_0x29af92,{body:_0x3a7e6d}=await prepare(_0x4a9716);return dryRun(_0x577b09(0xbb),_0x577b09(0xbf))[_0x577b09(0xd3)](_0x3a7e6d)[_0x577b09(0xba)](_0x577b09(0xce))[_0x577b09(0xbc)]();},async 'execute'(_0x913502){const _0x2f82c1=a57_0x29af92,{role:_0x33e2df,body:_0x36726b}=await prepare(_0x913502),_0xa49a21=await updateRuntimeAppRole(_0x36726b);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x33e2df['id']},projectRuntimeRole(_0x33e2df),projectRuntimeRole(_0xa49a21),{'method':_0x2f82c1(0xbb),'path':_0x2f82c1(0xbf)})};}};
1
+ function a57_0x9f88(){const _0x3ba260=['remark','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','name','109160cWLJVg','116ZZQOwE','--remark\x20must\x20not\x20be\x20blank.','high-risk-write','str','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','string','464400qhbVVr','10027200GHWLOd','3272096pVbfoN','--name\x20must\x20not\x20be\x20blank.','validation','/client/permit/role/update','appCode','5260302IUDsjQ','flag','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','update','77eZvRIm','trim','role-code','17JEUCnP','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','499026iKALJB','POST','147854glyzON','body'];a57_0x9f88=function(){return _0x3ba260;};return a57_0x9f88();}const a57_0x2eba2a=a57_0x145d;(function(_0x1d8b93,_0x547a1e){const _0x205376=a57_0x145d,_0x3daa75=_0x1d8b93();while(!![]){try{const _0x884c06=-parseInt(_0x205376(0xa7))/0x1*(-parseInt(_0x205376(0xab))/0x2)+-parseInt(_0x205376(0xb7))/0x3+parseInt(_0x205376(0xb1))/0x4*(parseInt(_0x205376(0xb0))/0x5)+parseInt(_0x205376(0xa9))/0x6*(-parseInt(_0x205376(0xc2))/0x7)+-parseInt(_0x205376(0xb9))/0x8+-parseInt(_0x205376(0xbe))/0x9+parseInt(_0x205376(0xb8))/0xa;if(_0x884c06===_0x547a1e)break;else _0x3daa75['push'](_0x3daa75['shift']());}catch(_0xc0bf94){_0x3daa75['push'](_0x3daa75['shift']());}}}(a57_0x9f88,0xca7fc));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a57_0x145d(_0x3fa98e,_0x2c96e4){_0x3fa98e=_0x3fa98e-0xa6;const _0x9f8881=a57_0x9f88();let _0x145dc1=_0x9f8881[_0x3fa98e];return _0x145dc1;}import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x157629){const _0x40965a=a57_0x145d,_0x3a034a=_0x157629['flag'](_0x40965a(0xa6))!==undefined,_0x4b5863=_0x157629[_0x40965a(0xbf)](_0x40965a(0xaf))!==undefined,_0x4c76ca=_0x157629['flag'](_0x40965a(0xad))!==undefined;if(!_0x3a034a&&!_0x4b5863&&!_0x4c76ca)throw CliErrors[_0x40965a(0xbb)](_0x40965a(0xb5));const _0x1be0b2=readOptionalRuntimeRoleCode(_0x157629),_0x43469c=_0x157629[_0x40965a(0xb4)](_0x40965a(0xaf))[_0x40965a(0xc3)](),_0x4c2c50=_0x157629[_0x40965a(0xb4)](_0x40965a(0xad))[_0x40965a(0xc3)]();if(_0x4b5863&&!_0x43469c)throw CliErrors['validation'](_0x40965a(0xba));if(_0x4c76ca&&!_0x4c2c50)throw CliErrors[_0x40965a(0xbb)](_0x40965a(0xb2),_0x40965a(0xa8));return{..._0x1be0b2?{'roleCode':_0x1be0b2}:{},..._0x4b5863?{'roleName':_0x43469c}:{},..._0x4c76ca?{'remark':_0x4c2c50}:{}};}async function prepare(_0x55dc52){const _0x53d667=a57_0x145d,_0xa4576a=await getRuntimeRoleById(_0x55dc52[_0x53d667(0xbd)],_0x55dc52['num']('id'));return assertCustomRuntimeRole(_0xa4576a,_0x53d667(0xc1)),{'role':_0xa4576a,'body':{'id':_0xa4576a['id'],'appCode':_0x55dc52[_0x53d667(0xbd)],...updateFields(_0x55dc52)}};}export const roleUpdate={'service':'role','command':a57_0x2eba2a(0xc1),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','risk':a57_0x2eba2a(0xb3),'confirmationDescription':a57_0x2eba2a(0xae),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a57_0x2eba2a(0xaf),'type':a57_0x2eba2a(0xb6),'description':'New\x20role\x20name'},{'name':a57_0x2eba2a(0xad),'type':a57_0x2eba2a(0xb6),'description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x1fd6ab){updateFields(_0x1fd6ab);},async 'dryRun'(_0x1837d4){const _0x5a5756=a57_0x2eba2a,{body:_0x23f8ca}=await prepare(_0x1837d4);return dryRun(_0x5a5756(0xaa),_0x5a5756(0xbc))[_0x5a5756(0xac)](_0x23f8ca)['description'](_0x5a5756(0xc0))['build']();},async 'execute'(_0x4c9dcf){const _0x3a6160=a57_0x2eba2a,{role:_0x105c02,body:_0x22e4d0}=await prepare(_0x4c9dcf),_0x407fb4=await updateRuntimeAppRole(_0x22e4d0);return{'ok':!![],'data':runtimeRoleWriteResult(_0x3a6160(0xc1),{'roleId':_0x105c02['id']},projectRuntimeRole(_0x105c02),projectRuntimeRole(_0x407fb4),{'method':_0x3a6160(0xaa),'path':_0x3a6160(0xbc)})};}};
@@ -1 +1 @@
1
- function a58_0x1746(){const _0x503c6f=['before','role','userId','roleList','2047304wVcjmF','/client/permit/user-role/update-user-list','build','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','1891230WKAuKe','after','POST','appCode','warnings','1471376HjbFaY','high-risk-write','description','1037307RpuPML','2621060TVuarT','946904qpStZZ','user-add','shouldWrite','3103PDbJaS','86qBNMSu','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.'];a58_0x1746=function(){return _0x503c6f;};return a58_0x1746();}const a58_0x4e7c33=a58_0x4555;(function(_0x2e2fb0,_0x70ebd0){const _0x235df0=a58_0x4555,_0x112da6=_0x2e2fb0();while(!![]){try{const _0x55669f=-parseInt(_0x235df0(0x121))/0x1*(-parseInt(_0x235df0(0x122))/0x2)+-parseInt(_0x235df0(0x11c))/0x3+parseInt(_0x235df0(0x11e))/0x4+-parseInt(_0x235df0(0x11d))/0x5+parseInt(_0x235df0(0x12c))/0x6+parseInt(_0x235df0(0x128))/0x7+parseInt(_0x235df0(0x131))/0x8;if(_0x55669f===_0x70ebd0)break;else _0x112da6['push'](_0x112da6['shift']());}catch(_0xc5aaa3){_0x112da6['push'](_0x112da6['shift']());}}}(a58_0x1746,0x473bd));function a58_0x4555(_0x6fc87,_0x55f095){_0x6fc87=_0x6fc87-0x11c;const _0x1746fe=a58_0x1746();let _0x45556d=_0x1746fe[_0x6fc87];return _0x45556d;}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a58_0x4e7c33(0x125),'command':'user-add','description':a58_0x4e7c33(0x12b),'risk':a58_0x4e7c33(0x132),'confirmationDescription':a58_0x4e7c33(0x123),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x3e30ce){const _0x3d9c97=a58_0x4e7c33,_0x116138=await prepareRuntimeMemberMutation(_0x3e30ce,_0x3d9c97(0x11f));return dryRun(_0x3d9c97(0x12e),_0x3d9c97(0x129))['body']({'appCode':_0x3e30ce[_0x3d9c97(0x12f)],'roleList':_0x116138[_0x3d9c97(0x127)]})[_0x3d9c97(0x133)](_0x116138[_0x3d9c97(0x120)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x116138[_0x3d9c97(0x130)][0x0])[_0x3d9c97(0x12a)]();},async 'execute'(_0x191705){const _0x3cb4a4=a58_0x4e7c33,_0x183e14=await prepareRuntimeMemberMutation(_0x191705,_0x3cb4a4(0x11f));return _0x183e14[_0x3cb4a4(0x120)]&&await updateRuntimeRoleUsers(_0x191705[_0x3cb4a4(0x12f)],_0x183e14[_0x3cb4a4(0x127)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x183e14[_0x3cb4a4(0x125)]['id'],'userId':_0x183e14[_0x3cb4a4(0x126)]},_0x183e14[_0x3cb4a4(0x124)],_0x183e14[_0x3cb4a4(0x12d)],{'method':_0x3cb4a4(0x12e),'path':_0x3cb4a4(0x129)},_0x183e14['warnings'])};}};
1
+ const a58_0xebe470=a58_0xfd65;(function(_0x389435,_0x2588bd){const _0x343364=a58_0xfd65,_0x1e6659=_0x389435();while(!![]){try{const _0x245e1b=-parseInt(_0x343364(0x139))/0x1*(-parseInt(_0x343364(0x13a))/0x2)+-parseInt(_0x343364(0x13c))/0x3*(parseInt(_0x343364(0x12a))/0x4)+parseInt(_0x343364(0x13d))/0x5*(parseInt(_0x343364(0x140))/0x6)+-parseInt(_0x343364(0x138))/0x7+parseInt(_0x343364(0x136))/0x8*(parseInt(_0x343364(0x12b))/0x9)+parseInt(_0x343364(0x131))/0xa*(-parseInt(_0x343364(0x133))/0xb)+parseInt(_0x343364(0x13b))/0xc*(parseInt(_0x343364(0x12f))/0xd);if(_0x245e1b===_0x2588bd)break;else _0x1e6659['push'](_0x1e6659['shift']());}catch(_0x18a78e){_0x1e6659['push'](_0x1e6659['shift']());}}}(a58_0x492a,0x7a77e));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a58_0xfd65(_0x3aa598,_0x13a299){_0x3aa598=_0x3aa598-0x129;const _0x492a7a=a58_0x492a();let _0xfd65ab=_0x492a7a[_0x3aa598];return _0xfd65ab;}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a58_0xebe470(0x13e),'command':'user-add','description':'Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','risk':a58_0xebe470(0x13f),'confirmationDescription':'Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x129464){const _0x12ee3f=a58_0xebe470,_0xe9eeff=await prepareRuntimeMemberMutation(_0x129464,'user-add');return dryRun(_0x12ee3f(0x141),_0x12ee3f(0x135))['body']({'appCode':_0x129464[_0x12ee3f(0x130)],'roleList':_0xe9eeff['roleList']})['description'](_0xe9eeff[_0x12ee3f(0x134)]?_0x12ee3f(0x137):_0xe9eeff[_0x12ee3f(0x12d)][0x0])['build']();},async 'execute'(_0x189d46){const _0x47aa9a=a58_0xebe470,_0x4619e9=await prepareRuntimeMemberMutation(_0x189d46,_0x47aa9a(0x12c));return _0x4619e9[_0x47aa9a(0x134)]&&await updateRuntimeRoleUsers(_0x189d46[_0x47aa9a(0x130)],_0x4619e9[_0x47aa9a(0x12e)]),{'ok':!![],'data':runtimeRoleWriteResult('user-add',{'roleId':_0x4619e9[_0x47aa9a(0x13e)]['id'],'userId':_0x4619e9['userId']},_0x4619e9[_0x47aa9a(0x129)],_0x4619e9[_0x47aa9a(0x132)],{'method':_0x47aa9a(0x141),'path':_0x47aa9a(0x135)},_0x4619e9[_0x47aa9a(0x12d)])};}};function a58_0x492a(){const _0x2c8a83=['1NRFsun','1072878hOjxut','12sLUEvA','190389DuoWex','2490QqDciR','role','high-risk-write','6774bzutRN','POST','before','36snQHuk','45xlovuZ','user-add','warnings','roleList','17977739URoWfa','appCode','10EydrKl','after','7266754PxLbvf','shouldWrite','/client/permit/user-role/update-user-list','286320rzYylo','Preview:\x20add\x20runtime\x20role\x20member','6489861KuJKrr'];a58_0x492a=function(){return _0x2c8a83;};return a58_0x492a();}
@@ -1 +1 @@
1
- const a59_0x23ef7e=a59_0x3de2;function a59_0x15f8(){const _0x5eb2c9=['24390204XRYOox','117QMFcAl','POST','287203mWOpMz','role','warnings','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','/client/permit/user-role/update-user-list','build','shouldWrite','424250bCgnEh','after','10828008ZoGgIp','335cwpeBz','appCode','userId','user-remove','14337RHEPRm','roleList','1072207XPKmHR','high-risk-write','28828ypbyuZ','24DBIrAi','body','11QiGBsF','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','548zqBeRp','description','before'];a59_0x15f8=function(){return _0x5eb2c9;};return a59_0x15f8();}(function(_0x5db5a2,_0x1ef6e8){const _0x482e12=a59_0x3de2,_0x4124cd=_0x5db5a2();while(!![]){try{const _0x7e74fa=parseInt(_0x482e12(0x174))/0x1+parseInt(_0x482e12(0x15e))/0x2*(parseInt(_0x482e12(0x172))/0x3)+parseInt(_0x482e12(0x176))/0x4*(-parseInt(_0x482e12(0x16e))/0x5)+parseInt(_0x482e12(0x177))/0x6*(parseInt(_0x482e12(0x164))/0x7)+parseInt(_0x482e12(0x16d))/0x8+parseInt(_0x482e12(0x162))/0x9*(-parseInt(_0x482e12(0x16b))/0xa)+-parseInt(_0x482e12(0x179))/0xb*(parseInt(_0x482e12(0x161))/0xc);if(_0x7e74fa===_0x1ef6e8)break;else _0x4124cd['push'](_0x4124cd['shift']());}catch(_0x2991f5){_0x4124cd['push'](_0x4124cd['shift']());}}}(a59_0x15f8,0xcb367));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a59_0x3de2(_0x40a725,_0x31410f){_0x40a725=_0x40a725-0x15e;const _0x15f89d=a59_0x15f8();let _0x3de2e7=_0x15f89d[_0x40a725];return _0x3de2e7;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':a59_0x23ef7e(0x171),'description':a59_0x23ef7e(0x167),'risk':a59_0x23ef7e(0x175),'confirmationDescription':a59_0x23ef7e(0x17a),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x309d46){const _0x51734c=a59_0x23ef7e,_0xb404fd=await prepareRuntimeMemberMutation(_0x309d46,_0x51734c(0x171));return dryRun(_0x51734c(0x163),'/client/permit/user-role/update-user-list')[_0x51734c(0x178)]({'appCode':_0x309d46[_0x51734c(0x16f)],'roleList':_0xb404fd[_0x51734c(0x173)]})[_0x51734c(0x15f)](_0xb404fd['shouldWrite']?'Preview:\x20remove\x20runtime\x20role\x20member':_0xb404fd[_0x51734c(0x166)][0x0])[_0x51734c(0x169)]();},async 'execute'(_0x22e460){const _0x2965b3=a59_0x23ef7e,_0x1b532c=await prepareRuntimeMemberMutation(_0x22e460,_0x2965b3(0x171));return _0x1b532c[_0x2965b3(0x16a)]&&await updateRuntimeRoleUsers(_0x22e460[_0x2965b3(0x16f)],_0x1b532c[_0x2965b3(0x173)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x2965b3(0x171),{'roleId':_0x1b532c[_0x2965b3(0x165)]['id'],'userId':_0x1b532c[_0x2965b3(0x170)]},_0x1b532c[_0x2965b3(0x160)],_0x1b532c[_0x2965b3(0x16c)],{'method':_0x2965b3(0x163),'path':_0x2965b3(0x168)},_0x1b532c[_0x2965b3(0x166)])};}};
1
+ function a59_0x54d2(_0x19bc60,_0x4921e1){_0x19bc60=_0x19bc60-0x1af;const _0x2d0363=a59_0x2d03();let _0x54d245=_0x2d0363[_0x19bc60];return _0x54d245;}function a59_0x2d03(){const _0x28f838=['530iJvGkZ','before','user-remove','body','shouldWrite','830685SwIBfi','userId','1325947EfxvnQ','Preview:\x20remove\x20runtime\x20role\x20member','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','build','roleList','role','32QPFUGm','4346070iIpRNy','3805170XpxRSb','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','4mMsSPy','/client/permit/user-role/update-user-list','15787400kdMbMS','POST','description','appCode','1355hAzSdj','2234313zGCTyt','warnings','after'];a59_0x2d03=function(){return _0x28f838;};return a59_0x2d03();}const a59_0x773b04=a59_0x54d2;(function(_0x8d562f,_0x41a93f){const _0x3391d5=a59_0x54d2,_0x26bf0a=_0x8d562f();while(!![]){try{const _0x118b02=parseInt(_0x3391d5(0x1c6))/0x1*(parseInt(_0x3391d5(0x1af))/0x2)+parseInt(_0x3391d5(0x1b4))/0x3+parseInt(_0x3391d5(0x1c0))/0x4*(-parseInt(_0x3391d5(0x1be))/0x5)+parseInt(_0x3391d5(0x1bd))/0x6+-parseInt(_0x3391d5(0x1b6))/0x7+-parseInt(_0x3391d5(0x1bc))/0x8*(parseInt(_0x3391d5(0x1c7))/0x9)+parseInt(_0x3391d5(0x1c2))/0xa;if(_0x118b02===_0x41a93f)break;else _0x26bf0a['push'](_0x26bf0a['shift']());}catch(_0x5f3e36){_0x26bf0a['push'](_0x26bf0a['shift']());}}}(a59_0x2d03,0xf30f4));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a59_0x773b04(0x1bb),'command':'user-remove','description':a59_0x773b04(0x1b8),'risk':'high-risk-write','confirmationDescription':a59_0x773b04(0x1bf),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x69fc03){const _0x5142e8=a59_0x773b04,_0xa7adf2=await prepareRuntimeMemberMutation(_0x69fc03,_0x5142e8(0x1b1));return dryRun(_0x5142e8(0x1c3),_0x5142e8(0x1c1))[_0x5142e8(0x1b2)]({'appCode':_0x69fc03['appCode'],'roleList':_0xa7adf2[_0x5142e8(0x1ba)]})[_0x5142e8(0x1c4)](_0xa7adf2[_0x5142e8(0x1b3)]?_0x5142e8(0x1b7):_0xa7adf2[_0x5142e8(0x1c8)][0x0])[_0x5142e8(0x1b9)]();},async 'execute'(_0x7be2b5){const _0x96ad7d=a59_0x773b04,_0x102a27=await prepareRuntimeMemberMutation(_0x7be2b5,'user-remove');return _0x102a27[_0x96ad7d(0x1b3)]&&await updateRuntimeRoleUsers(_0x7be2b5[_0x96ad7d(0x1c5)],_0x102a27[_0x96ad7d(0x1ba)]),{'ok':!![],'data':runtimeRoleWriteResult('user-remove',{'roleId':_0x102a27[_0x96ad7d(0x1bb)]['id'],'userId':_0x102a27[_0x96ad7d(0x1b5)]},_0x102a27[_0x96ad7d(0x1b0)],_0x102a27[_0x96ad7d(0x1c9)],{'method':_0x96ad7d(0x1c3),'path':_0x96ad7d(0x1c1)},_0x102a27[_0x96ad7d(0x1c8)])};}};
@@ -1 +1 @@
1
- const a60_0x3609e2=a60_0x484c;(function(_0x279d01,_0x3f0fef){const _0x17d63b=a60_0x484c,_0x1eb9bc=_0x279d01();while(!![]){try{const _0x3f78f5=parseInt(_0x17d63b(0x153))/0x1+parseInt(_0x17d63b(0x143))/0x2+parseInt(_0x17d63b(0x155))/0x3*(parseInt(_0x17d63b(0x148))/0x4)+parseInt(_0x17d63b(0x14a))/0x5*(-parseInt(_0x17d63b(0x149))/0x6)+-parseInt(_0x17d63b(0x161))/0x7+-parseInt(_0x17d63b(0x13d))/0x8*(-parseInt(_0x17d63b(0x138))/0x9)+parseInt(_0x17d63b(0x13e))/0xa*(-parseInt(_0x17d63b(0x16c))/0xb);if(_0x3f78f5===_0x3f0fef)break;else _0x1eb9bc['push'](_0x1eb9bc['shift']());}catch(_0x585151){_0x1eb9bc['push'](_0x1eb9bc['shift']());}}}(a60_0x27ce,0xb143c));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0x484c(_0x2134cc,_0x3e834c){_0x2134cc=_0x2134cc-0x133;const _0x27ce24=a60_0x27ce();let _0x484c7f=_0x27ce24[_0x2134cc];return _0x484c7f;}const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':'kind','type':a60_0x3609e2(0x168),'required':!![],'enum':['CRON','ONCE'],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a60_0x3609e2(0x164),'type':a60_0x3609e2(0x168),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a60_0x3609e2(0x165),'type':'string','required':!![],'description':a60_0x3609e2(0x158)},PROMPT_FLAG={'name':a60_0x3609e2(0x156),'type':a60_0x3609e2(0x168),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':'model','type':'string','enum':[a60_0x3609e2(0x135),a60_0x3609e2(0x170),a60_0x3609e2(0x16e)],'default':'deepseek-v4-flash-0731','description':a60_0x3609e2(0x162)},SCHEDULE_ID_FLAG={'name':a60_0x3609e2(0x16a),'type':a60_0x3609e2(0x168),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a60_0x3609e2(0x144)}},LIMIT_FLAG={'name':a60_0x3609e2(0x14e),'type':a60_0x3609e2(0x151),'default':0x14,'description':a60_0x3609e2(0x145)},CURSOR_FLAG={'name':'cursor','type':a60_0x3609e2(0x168),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a60_0x27ce(){const _0x54c31f=['Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','73114gqmCxo','\x20immediately','3WzgOVt','prompt','\x20from\x20schedule\x20','Schedule\x20title','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','detail','POST','Created\x20','validate','run','cursor','description','4842446wzrSIH','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','model','cron','title','high-risk-write','Show\x20one\x20schedule\x20by\x20schedule\x20ID','string','body','schedule-id','num','7401669xkViit','/schedules','deepseek-v4-pro-0813','schedule','deepseek-v4-flash-0731','length','kind','Preview:\x20delete\x20schedule\x20','read','--title\x20must\x20not\x20be\x20blank.','CRON','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','kimi/k3','str','build','9768501ToObhB','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','delete','DELETE','validation','8SdRtvD','10eLgTyY','list','--prompt\x20must\x20not\x20be\x20blank.','Preview:\x20create\x20an\x20Agent\x20schedule','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','1963336IgdqFe','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Page\x20size\x20from\x201\x20to\x20100','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','appCode','3071164mhrNXU','4903374QcztMZ','5sxELqo','trim','scheduleId','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','limit','/run','create','number'];a60_0x27ce=function(){return _0x54c31f;};return a60_0x27ce();}function readScheduleInput(_0x3b7bbd){const _0xd14b83=a60_0x3609e2,_0x5a0919=_0x3b7bbd['str'](_0xd14b83(0x172)),_0x503654=_0x3b7bbd[_0xd14b83(0x136)](_0xd14b83(0x165))[_0xd14b83(0x14b)](),_0x59a825=_0x3b7bbd['str'](_0xd14b83(0x156))[_0xd14b83(0x14b)](),_0x1c5a1e=_0x3b7bbd[_0xd14b83(0x136)](_0xd14b83(0x163)),_0x24460b=_0x3b7bbd[_0xd14b83(0x136)](_0xd14b83(0x164)),_0x42a620=_0x3b7bbd[_0xd14b83(0x136)]('scheduled-at');if(!_0x503654)throw CliErrors['validation'](_0xd14b83(0x175));if(!_0x59a825)throw CliErrors[_0xd14b83(0x13c)](_0xd14b83(0x140));if(_0x5a0919===_0xd14b83(0x133)){if(!_0x24460b||_0x42a620)throw CliErrors[_0xd14b83(0x13c)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x5a0919,'timezone':'UTC','cron':_0x24460b,'title':_0x503654,'prompt':_0x59a825,'model':_0x1c5a1e};}if(_0x5a0919==='ONCE'){if(!_0x42a620||_0x24460b)throw CliErrors[_0xd14b83(0x13c)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x5a0919,'timezone':'UTC','scheduledAt':_0x42a620,'title':_0x503654,'prompt':_0x59a825,'model':_0x1c5a1e};}throw CliErrors['validation'](_0xd14b83(0x159));}function scheduleCollectionPath(_0xd1a3b6){const _0x1cfdec=a60_0x3609e2;return'/api/harness/apps/'+encodeURIComponent(_0xd1a3b6)+_0x1cfdec(0x16d);}function scheduleItemPath(_0x13dac3,_0x163a6b){return scheduleCollectionPath(_0x13dac3)+'/'+encodeURIComponent(_0x163a6b);}const scheduleValidate={'service':'schedule','command':a60_0x3609e2(0x15d),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x33dfc1){readScheduleInput(_0x33dfc1);},async 'execute'(_0x17b44d){const _0x29a0e0=a60_0x3609e2,_0x5343d2=readScheduleInput(_0x17b44d),_0x54ae12=await validateRuntimeSchedule(_0x17b44d[_0x29a0e0(0x147)],_0x5343d2);return{'ok':!![],'data':_0x54ae12,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a60_0x3609e2(0x16f),'command':a60_0x3609e2(0x150),'description':a60_0x3609e2(0x152),'risk':a60_0x3609e2(0x166),'confirmationDescription':a60_0x3609e2(0x139),'flags':INPUT_FLAGS,async 'validate'(_0x46c7c3){readScheduleInput(_0x46c7c3);},async 'execute'(_0x499434){const _0x3c3918=a60_0x3609e2,_0x39d85a=readScheduleInput(_0x499434),_0x3e83e3=await validateRuntimeSchedule(_0x499434['appCode'],_0x39d85a),_0x3f1845=await createRuntimeSchedule(_0x499434[_0x3c3918(0x147)],_0x3e83e3);return{'ok':!![],'data':_0x3f1845,'message':_0x3c3918(0x15c)+_0x3f1845[_0x3c3918(0x172)]+'\x20schedule\x20'+_0x3f1845[_0x3c3918(0x14c)]};},async 'dryRun'(_0x57b031){const _0x374d53=a60_0x3609e2,_0x370d47=readScheduleInput(_0x57b031);return dryRun(_0x374d53(0x15b),scheduleCollectionPath(_0x57b031[_0x374d53(0x147)]))[_0x374d53(0x169)](_0x370d47)[_0x374d53(0x160)](_0x374d53(0x141))[_0x374d53(0x137)]();}},scheduleList={'service':a60_0x3609e2(0x16f),'command':a60_0x3609e2(0x13f),'description':a60_0x3609e2(0x146),'risk':a60_0x3609e2(0x174),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x2cb15e){const _0x3a18ff=a60_0x3609e2,_0x1fa53a=_0x2cb15e[_0x3a18ff(0x16b)](_0x3a18ff(0x14e));if(!Number['isSafeInteger'](_0x1fa53a)||_0x1fa53a<0x1||_0x1fa53a>0x64)throw CliErrors['validation'](_0x3a18ff(0x142));const _0x3ad979=_0x2cb15e[_0x3a18ff(0x136)](_0x3a18ff(0x15f));if(_0x3ad979&&(_0x3ad979[_0x3a18ff(0x171)]>0x400||_0x3ad979[_0x3a18ff(0x14b)]()!==_0x3ad979))throw CliErrors[_0x3a18ff(0x13c)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x35c037){const _0x195bc5=a60_0x3609e2,_0x10ce34=_0x35c037[_0x195bc5(0x136)](_0x195bc5(0x15f)),_0x2da211=await listRuntimeSchedules(_0x35c037[_0x195bc5(0x147)],{'kind':_0x35c037[_0x195bc5(0x136)](_0x195bc5(0x172)),'limit':_0x35c037[_0x195bc5(0x16b)](_0x195bc5(0x14e)),..._0x10ce34?{'cursor':_0x10ce34}:{}});return{'ok':!![],'data':_0x2da211};}},scheduleDetail={'service':a60_0x3609e2(0x16f),'command':a60_0x3609e2(0x15a),'description':a60_0x3609e2(0x167),'risk':a60_0x3609e2(0x174),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x10a602){const _0x383dd4=a60_0x3609e2,_0x3620de=await getRuntimeSchedule(_0x10a602[_0x383dd4(0x147)],_0x10a602[_0x383dd4(0x136)](_0x383dd4(0x16a)));return{'ok':!![],'data':_0x3620de};}},scheduleRun={'service':a60_0x3609e2(0x16f),'command':a60_0x3609e2(0x15e),'description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':'high-risk-write','confirmationDescription':a60_0x3609e2(0x14d),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x32a199){const _0x4a3004=a60_0x3609e2,_0x361b0a=_0x32a199[_0x4a3004(0x136)](_0x4a3004(0x16a)),_0x52ffa3=await runRuntimeSchedule(_0x32a199[_0x4a3004(0x147)],_0x361b0a);return{'ok':!![],'data':_0x52ffa3,'message':'Queued\x20Task\x20'+_0x52ffa3['taskId']+_0x4a3004(0x157)+_0x361b0a};},async 'dryRun'(_0x45a6c6){const _0x545375=a60_0x3609e2,_0x477932=_0x45a6c6[_0x545375(0x136)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x45a6c6['appCode'],_0x477932)+_0x545375(0x14f))[_0x545375(0x160)]('Preview:\x20run\x20schedule\x20'+_0x477932+_0x545375(0x154))[_0x545375(0x137)]();}},scheduleDelete={'service':a60_0x3609e2(0x16f),'command':a60_0x3609e2(0x13a),'description':a60_0x3609e2(0x134),'risk':a60_0x3609e2(0x166),'confirmationDescription':'Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xb8a390){const _0x36214b=a60_0x3609e2,_0x8a3287=_0xb8a390[_0x36214b(0x136)](_0x36214b(0x16a)),_0x32292d=await deleteRuntimeSchedule(_0xb8a390[_0x36214b(0x147)],_0x8a3287);return{'ok':!![],'data':_0x32292d,'message':'Deleted\x20schedule\x20'+_0x8a3287};},async 'dryRun'(_0x533c9c){const _0x2f6ab7=a60_0x3609e2,_0x1fa527=_0x533c9c[_0x2f6ab7(0x136)](_0x2f6ab7(0x16a));return dryRun(_0x2f6ab7(0x13b),scheduleItemPath(_0x533c9c[_0x2f6ab7(0x147)],_0x1fa527))[_0x2f6ab7(0x160)](_0x2f6ab7(0x173)+_0x1fa527)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ function a60_0x1723(){const _0xeb434=['cursor','411612CnHKrw','Preview:\x20run\x20schedule\x20','POST','/run','model','deepseek-v4-flash-0731','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','Preview:\x20delete\x20schedule\x20','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','713412aPwYMd','Schedule\x20kind:\x20CRON\x20or\x20ONCE','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','detail','ONCE','--prompt\x20must\x20not\x20be\x20blank.','validation','isSafeInteger','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','prompt','UTC','read','body','3lbLwDM','num','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','high-risk-write','build','1771qrWBKN','appCode','DELETE','/schedules','schedule','370AEcGGq','description','limit','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','string','Schedule\x20UUID','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','trim','596600kYCmdL','Page\x20size\x20from\x201\x20to\x20100','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','validate','/api/harness/apps/','Schedule\x20title','Created\x20','schedule-id','--title\x20must\x20not\x20be\x20blank.','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','kimi/k3','title','scheduleId','cron','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','delete','28252GZdcgS','Deleted\x20schedule\x20','5FJMFDL','list','\x20from\x20schedule\x20','Preview:\x20create\x20an\x20Agent\x20schedule','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','str','Show\x20one\x20schedule\x20by\x20schedule\x20ID','4333rFeKHT','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','number','run','deepseek-v4-pro-0813','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','Queued\x20Task\x20','21537oWhybg','CRON','\x20immediately','Schedule\x20input\x20is\x20valid','kind'];a60_0x1723=function(){return _0xeb434;};return a60_0x1723();}function a60_0xaa00(_0x125779,_0x2d611b){_0x125779=_0x125779-0x6d;const _0x172350=a60_0x1723();let _0xaa0098=_0x172350[_0x125779];return _0xaa0098;}const a60_0xb7b196=a60_0xaa00;(function(_0x25d82a,_0x1a944f){const _0x525010=a60_0xaa00,_0x1f4437=_0x25d82a();while(!![]){try{const _0x4ded7c=-parseInt(_0x525010(0x8b))/0x1+-parseInt(_0x525010(0xab))/0x2*(parseInt(_0x525010(0x86))/0x3)+parseInt(_0x525010(0x6f))/0x4*(parseInt(_0x525010(0xad))/0x5)+-parseInt(_0x525010(0x78))/0x6+parseInt(_0x525010(0xb4))/0x7+parseInt(_0x525010(0x98))/0x8+-parseInt(_0x525010(0xbb))/0x9*(-parseInt(_0x525010(0x90))/0xa);if(_0x4ded7c===_0x1a944f)break;else _0x1f4437['push'](_0x1f4437['shift']());}catch(_0x28e416){_0x1f4437['push'](_0x1f4437['shift']());}}}(a60_0x1723,0x202ff));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':'kind','type':a60_0xb7b196(0x94),'required':!![],'enum':['CRON',a60_0xb7b196(0x7d)],'description':a60_0xb7b196(0x79)},CRON_FLAG={'name':a60_0xb7b196(0xa5),'type':a60_0xb7b196(0x94),'description':a60_0xb7b196(0x9a)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a60_0xb7b196(0x94),'description':a60_0xb7b196(0xb9)},TITLE_FLAG={'name':'title','type':a60_0xb7b196(0x94),'required':!![],'description':a60_0xb7b196(0x9d)},PROMPT_FLAG={'name':a60_0xb7b196(0x82),'type':a60_0xb7b196(0x94),'required':!![],'description':a60_0xb7b196(0x77)},MODEL_FLAG={'name':a60_0xb7b196(0x73),'type':'string','enum':[a60_0xb7b196(0xa2),a60_0xb7b196(0x74),a60_0xb7b196(0xb8)],'default':'deepseek-v4-flash-0731','description':a60_0xb7b196(0xa7)},SCHEDULE_ID_FLAG={'name':a60_0xb7b196(0x9f),'type':a60_0xb7b196(0x94),'required':!![],'description':a60_0xb7b196(0x95),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a60_0xb7b196(0x7a)}},LIMIT_FLAG={'name':'limit','type':a60_0xb7b196(0xb6),'default':0x14,'description':a60_0xb7b196(0x99)},CURSOR_FLAG={'name':'cursor','type':a60_0xb7b196(0x94),'description':a60_0xb7b196(0x7b)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x43c0ed){const _0x45bf70=a60_0xb7b196,_0x494a41=_0x43c0ed[_0x45bf70(0xb2)](_0x45bf70(0x6d)),_0x35a4bf=_0x43c0ed[_0x45bf70(0xb2)](_0x45bf70(0xa3))[_0x45bf70(0x97)](),_0x35b0dc=_0x43c0ed['str'](_0x45bf70(0x82))[_0x45bf70(0x97)](),_0x2ebe6f=_0x43c0ed[_0x45bf70(0xb2)](_0x45bf70(0x73)),_0x1b2e76=_0x43c0ed[_0x45bf70(0xb2)](_0x45bf70(0xa5)),_0x453331=_0x43c0ed[_0x45bf70(0xb2)]('scheduled-at');if(!_0x35a4bf)throw CliErrors[_0x45bf70(0x7f)](_0x45bf70(0xa0));if(!_0x35b0dc)throw CliErrors['validation'](_0x45bf70(0x7e));if(_0x494a41===_0x45bf70(0xbc)){if(!_0x1b2e76||_0x453331)throw CliErrors['validation'](_0x45bf70(0x81));return{'kind':_0x494a41,'timezone':'UTC','cron':_0x1b2e76,'title':_0x35a4bf,'prompt':_0x35b0dc,'model':_0x2ebe6f};}if(_0x494a41===_0x45bf70(0x7d)){if(!_0x453331||_0x1b2e76)throw CliErrors[_0x45bf70(0x7f)](_0x45bf70(0xb1));return{'kind':_0x494a41,'timezone':_0x45bf70(0x83),'scheduledAt':_0x453331,'title':_0x35a4bf,'prompt':_0x35b0dc,'model':_0x2ebe6f};}throw CliErrors[_0x45bf70(0x7f)](_0x45bf70(0x88));}function scheduleCollectionPath(_0x6d71c9){const _0x33b8a8=a60_0xb7b196;return _0x33b8a8(0x9c)+encodeURIComponent(_0x6d71c9)+_0x33b8a8(0x8e);}function scheduleItemPath(_0x1bd0e1,_0x16561e){return scheduleCollectionPath(_0x1bd0e1)+'/'+encodeURIComponent(_0x16561e);}const scheduleValidate={'service':'schedule','command':a60_0xb7b196(0x9b),'description':a60_0xb7b196(0xa9),'risk':a60_0xb7b196(0x84),'flags':INPUT_FLAGS,async 'validate'(_0x3fd4e6){readScheduleInput(_0x3fd4e6);},async 'execute'(_0x4d4d73){const _0x25eb7b=a60_0xb7b196,_0x33d890=readScheduleInput(_0x4d4d73),_0x4b7f21=await validateRuntimeSchedule(_0x4d4d73[_0x25eb7b(0x8c)],_0x33d890);return{'ok':!![],'data':_0x4b7f21,'message':_0x25eb7b(0xbe)};}},scheduleCreate={'service':a60_0xb7b196(0x8f),'command':'create','description':a60_0xb7b196(0x75),'risk':a60_0xb7b196(0x89),'confirmationDescription':a60_0xb7b196(0xb5),'flags':INPUT_FLAGS,async 'validate'(_0x2437b8){readScheduleInput(_0x2437b8);},async 'execute'(_0x31376e){const _0x28416f=a60_0xb7b196,_0x4e830d=readScheduleInput(_0x31376e),_0x485c6d=await validateRuntimeSchedule(_0x31376e[_0x28416f(0x8c)],_0x4e830d),_0x1777ba=await createRuntimeSchedule(_0x31376e[_0x28416f(0x8c)],_0x485c6d);return{'ok':!![],'data':_0x1777ba,'message':_0x28416f(0x9e)+_0x1777ba[_0x28416f(0x6d)]+'\x20schedule\x20'+_0x1777ba[_0x28416f(0xa4)]};},async 'dryRun'(_0x440add){const _0x5afa22=a60_0xb7b196,_0x5cd145=readScheduleInput(_0x440add);return dryRun('POST',scheduleCollectionPath(_0x440add[_0x5afa22(0x8c)]))[_0x5afa22(0x85)](_0x5cd145)['description'](_0x5afa22(0xb0))[_0x5afa22(0x8a)]();}},scheduleList={'service':a60_0xb7b196(0x8f),'command':a60_0xb7b196(0xae),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a60_0xb7b196(0x84),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x59a1d7){const _0x40980f=a60_0xb7b196,_0x5a0ced=_0x59a1d7[_0x40980f(0x87)](_0x40980f(0x92));if(!Number[_0x40980f(0x80)](_0x5a0ced)||_0x5a0ced<0x1||_0x5a0ced>0x64)throw CliErrors[_0x40980f(0x7f)](_0x40980f(0x96));const _0xe315f9=_0x59a1d7['str'](_0x40980f(0x6e));if(_0xe315f9&&(_0xe315f9['length']>0x400||_0xe315f9['trim']()!==_0xe315f9))throw CliErrors[_0x40980f(0x7f)](_0x40980f(0xa1));},async 'execute'(_0x59bf14){const _0x2f00b1=a60_0xb7b196,_0x2d5b76=_0x59bf14[_0x2f00b1(0xb2)](_0x2f00b1(0x6e)),_0x4a8892=await listRuntimeSchedules(_0x59bf14[_0x2f00b1(0x8c)],{'kind':_0x59bf14['str']('kind'),'limit':_0x59bf14[_0x2f00b1(0x87)]('limit'),..._0x2d5b76?{'cursor':_0x2d5b76}:{}});return{'ok':!![],'data':_0x4a8892};}},scheduleDetail={'service':'schedule','command':a60_0xb7b196(0x7c),'description':a60_0xb7b196(0xb3),'risk':a60_0xb7b196(0x84),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1bf018){const _0x38fc8c=a60_0xb7b196,_0x3351af=await getRuntimeSchedule(_0x1bf018[_0x38fc8c(0x8c)],_0x1bf018[_0x38fc8c(0xb2)](_0x38fc8c(0x9f)));return{'ok':!![],'data':_0x3351af};}},scheduleRun={'service':'schedule','command':a60_0xb7b196(0xb7),'description':a60_0xb7b196(0xa8),'risk':a60_0xb7b196(0x89),'confirmationDescription':'Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x286852){const _0x122ebc=a60_0xb7b196,_0x2f2346=_0x286852[_0x122ebc(0xb2)](_0x122ebc(0x9f)),_0x2091d5=await runRuntimeSchedule(_0x286852['appCode'],_0x2f2346);return{'ok':!![],'data':_0x2091d5,'message':_0x122ebc(0xba)+_0x2091d5['taskId']+_0x122ebc(0xaf)+_0x2f2346};},async 'dryRun'(_0x12a0e8){const _0xb4366=a60_0xb7b196,_0x38b15d=_0x12a0e8[_0xb4366(0xb2)](_0xb4366(0x9f));return dryRun(_0xb4366(0x71),scheduleItemPath(_0x12a0e8[_0xb4366(0x8c)],_0x38b15d)+_0xb4366(0x72))['description'](_0xb4366(0x70)+_0x38b15d+_0xb4366(0xbd))[_0xb4366(0x8a)]();}},scheduleDelete={'service':'schedule','command':a60_0xb7b196(0xaa),'description':a60_0xb7b196(0x93),'risk':a60_0xb7b196(0x89),'confirmationDescription':a60_0xb7b196(0xa6),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2bf4c7){const _0xae4fa=a60_0xb7b196,_0x87fcca=_0x2bf4c7[_0xae4fa(0xb2)](_0xae4fa(0x9f)),_0x16561a=await deleteRuntimeSchedule(_0x2bf4c7['appCode'],_0x87fcca);return{'ok':!![],'data':_0x16561a,'message':_0xae4fa(0xac)+_0x87fcca};},async 'dryRun'(_0xdc00e2){const _0x288ddf=a60_0xb7b196,_0x5a2466=_0xdc00e2[_0x288ddf(0xb2)](_0x288ddf(0x9f));return dryRun(_0x288ddf(0x8d),scheduleItemPath(_0xdc00e2[_0x288ddf(0x8c)],_0x5a2466))[_0x288ddf(0x91)](_0x288ddf(0x76)+_0x5a2466)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a61_0x1048e0=a61_0x2af9;function a61_0x2af9(_0x48c7fa,_0x5bebb9){_0x48c7fa=_0x48c7fa-0x155;const _0x1a19f1=a61_0x1a19();let _0x2af99c=_0x1a19f1[_0x48c7fa];return _0x2af99c;}(function(_0x631626,_0x1731d7){const _0x88c5bd=a61_0x2af9,_0x5e6537=_0x631626();while(!![]){try{const _0x43ec38=parseInt(_0x88c5bd(0x15a))/0x1+parseInt(_0x88c5bd(0x159))/0x2*(parseInt(_0x88c5bd(0x15e))/0x3)+parseInt(_0x88c5bd(0x155))/0x4+-parseInt(_0x88c5bd(0x160))/0x5+parseInt(_0x88c5bd(0x157))/0x6*(parseInt(_0x88c5bd(0x158))/0x7)+parseInt(_0x88c5bd(0x15b))/0x8+parseInt(_0x88c5bd(0x156))/0x9*(-parseInt(_0x88c5bd(0x15c))/0xa);if(_0x43ec38===_0x1731d7)break;else _0x5e6537['push'](_0x5e6537['shift']());}catch(_0x2f515d){_0x5e6537['push'](_0x5e6537['shift']());}}}(a61_0x1a19,0xf23a0));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x21fed3){const _0x4f860c=await buildSchemaPayload();return{'ok':!![],'data':_0x4f860c};}export const schemaDefinition={'service':a61_0x1048e0(0x15f),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a61_0x1048e0(0x15d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a61_0x1a19(){const _0x3e8ca3=['2197223sFynyG','1414bTBkHR','1157633hULsQr','5489784SbXuYu','11390vHQjRf','read','8367uxJPfy','schema','522970QsybPH','3192472oDoNLX','32751ihFzGG','12sUzKbj'];a61_0x1a19=function(){return _0x3e8ca3;};return a61_0x1a19();}
1
+ const a61_0x17f267=a61_0x4d31;(function(_0x5389de,_0x17c3da){const _0x4bd0ed=a61_0x4d31,_0x3c1f92=_0x5389de();while(!![]){try{const _0x50e492=-parseInt(_0x4bd0ed(0xe8))/0x1*(-parseInt(_0x4bd0ed(0xe2))/0x2)+parseInt(_0x4bd0ed(0xe3))/0x3*(-parseInt(_0x4bd0ed(0xe4))/0x4)+-parseInt(_0x4bd0ed(0xea))/0x5*(-parseInt(_0x4bd0ed(0xe5))/0x6)+-parseInt(_0x4bd0ed(0xe6))/0x7*(-parseInt(_0x4bd0ed(0xeb))/0x8)+-parseInt(_0x4bd0ed(0xdf))/0x9*(parseInt(_0x4bd0ed(0xec))/0xa)+-parseInt(_0x4bd0ed(0xe1))/0xb+parseInt(_0x4bd0ed(0xe7))/0xc;if(_0x50e492===_0x17c3da)break;else _0x3c1f92['push'](_0x3c1f92['shift']());}catch(_0x53594b){_0x3c1f92['push'](_0x3c1f92['shift']());}}}(a61_0x4f48,0x8718e));function a61_0x4d31(_0x5dab8b,_0x1f6a53){_0x5dab8b=_0x5dab8b-0xdf;const _0x4f4829=a61_0x4f48();let _0x4d311c=_0x4f4829[_0x5dab8b];return _0x4d311c;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1ef73d){const _0x538153=await buildSchemaPayload();return{'ok':!![],'data':_0x538153};}export const schemaDefinition={'service':a61_0x17f267(0xed),'command':'export','description':a61_0x17f267(0xe0),'risk':a61_0x17f267(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a61_0x4f48(){const _0x253175=['97765hYWKUQ','6126576oDcYaY','5377990RxNKpe','schema','9DzNWIo','Export\x20machine-readable\x20command\x20schema\x20(JSON)','8049536BJJvFJ','2bQuSbs','85317MLEImS','96RdthnE','180iSkwjF','7JHjjSu','11861820fkakdp','164572FqZEDt','read'];a61_0x4f48=function(){return _0x253175;};return a61_0x4f48();}
@@ -1 +1 @@
1
- (function(_0x4f9c7d,_0x43f208){const _0x48e353=a62_0x52e7,_0x59b17e=_0x4f9c7d();while(!![]){try{const _0x1db19f=parseInt(_0x48e353(0x7a))/0x1+parseInt(_0x48e353(0x74))/0x2*(-parseInt(_0x48e353(0xb7))/0x3)+parseInt(_0x48e353(0xa4))/0x4*(-parseInt(_0x48e353(0xc0))/0x5)+parseInt(_0x48e353(0x82))/0x6+-parseInt(_0x48e353(0x8b))/0x7*(-parseInt(_0x48e353(0x90))/0x8)+-parseInt(_0x48e353(0x8a))/0x9*(parseInt(_0x48e353(0xb0))/0xa)+-parseInt(_0x48e353(0xa9))/0xb;if(_0x1db19f===_0x43f208)break;else _0x59b17e['push'](_0x59b17e['shift']());}catch(_0x55b774){_0x59b17e['push'](_0x59b17e['shift']());}}}(a62_0x4c38,0x7b0c8));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';function a62_0x52e7(_0x348ee0,_0x47c669){_0x348ee0=_0x348ee0-0x6c;const _0x4c385b=a62_0x4c38();let _0x52e714=_0x4c385b[_0x348ee0];return _0x52e714;}import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x1cde27,_0x654d87){const _0x28f4be=a62_0x52e7,_0x51406b=listLocalServiceTrees();let _0x1da949;for(const _0x5a1165 of _0x51406b){const _0x2be3af=matchServiceTreeCommand(_0x5a1165,_0x1cde27);if(!_0x2be3af)continue;(!_0x1da949||_0x2be3af[_0x28f4be(0x78)][_0x28f4be(0x81)]['length']>_0x1da949['command'][_0x28f4be(0x81)][_0x28f4be(0x9e)])&&(_0x1da949={'tree':_0x5a1165,'command':_0x2be3af[_0x28f4be(0x78)],'remainingArgs':_0x2be3af[_0x28f4be(0xc7)]});}if(!_0x1da949)return undefined;const _0x16eee1={..._0x654d87};return applyAppBinding(_0x1da949[_0x28f4be(0x72)],_0x1da949[_0x28f4be(0x78)],_0x16eee1),{'definition':buildDynamicCommandDefinition(_0x1da949[_0x28f4be(0x72)],_0x1da949[_0x28f4be(0x78)]),'args':_0x1da949[_0x28f4be(0xc7)],'flags':_0x16eee1,'tree':_0x1da949[_0x28f4be(0x72)],'command':_0x1da949[_0x28f4be(0x78)]};}export function generateDynamicServiceHelp(_0x47586b){const _0x55ff03=a62_0x52e7,_0x46310=listLocalServiceTrees()[_0x55ff03(0xbd)](_0x39c8b1=>_0x39c8b1[_0x55ff03(0xab)][_0x55ff03(0xa8)]===_0x47586b);if(!_0x46310)return undefined;const _0x5e5b1d=[CLI_BIN_NAME+'\x20'+_0x47586b+_0x55ff03(0xaf),'',_0x46310[_0x55ff03(0xab)][_0x55ff03(0x75)]||_0x47586b,_0x46310[_0x55ff03(0xab)][_0x55ff03(0x7e)]?'\x20\x20'+_0x46310[_0x55ff03(0xab)]['description']:'','',_0x55ff03(0xc9),..._0x46310[_0x55ff03(0xd5)][_0x55ff03(0x70)](_0x3de367=>{const _0x2085f4=_0x55ff03,_0x58adc4=_0x3de367['fullPath'][_0x2085f4(0xb3)](0x1)['join']('\x20'),_0x2e60a2=_0x3de367[_0x2085f4(0x6f)]===_0x2085f4(0x87)?'':'\x20['+_0x3de367[_0x2085f4(0x6f)]+']';return'\x20\x20'+_0x58adc4['padEnd'](0x18)+'\x20'+(_0x3de367[_0x2085f4(0x7e)]||'')+_0x2e60a2;}),'',_0x55ff03(0x6e)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x47586b+_0x55ff03(0xc5)][_0x55ff03(0xb9)](Boolean);return _0x5e5b1d['join']('\x0a');}export function listDynamicServiceEntries(){const _0x51f687=a62_0x52e7;return listLocalServices()[_0x51f687(0x70)](_0x3c0119=>{const _0x4d31c7=_0x51f687,_0xedf080=_0x3c0119[_0x4d31c7(0xd7)];return{'service':_0xedf080[_0x4d31c7(0xab)][_0x4d31c7(0xa8)],'label':_0xedf080[_0x4d31c7(0xab)]['name']||_0xedf080[_0x4d31c7(0xab)]['code'],'commands':_0xedf080[_0x4d31c7(0xd5)]['map'](_0x21903b=>({'command':dynamicCommandName(_0x21903b),'description':_0x21903b[_0x4d31c7(0x7e)]||'Run\x20service\x20command\x20'+_0x21903b['cliPath'],'tag':riskTag(_0x21903b['risk'])}))};});}export function getDynamicServiceEntry(_0xa83358){const _0x579db1=a62_0x52e7;return listDynamicServiceEntries()[_0x579db1(0xbd)](_0x20359=>_0x20359['service']===_0xa83358);}export function listDynamicServiceDefinitions(_0x62cec4){const _0x46f16a=a62_0x52e7;return listLocalServiceTrees()[_0x46f16a(0xb9)](_0x465fac=>!_0x62cec4||_0x465fac['service'][_0x46f16a(0xa8)]===_0x62cec4)[_0x46f16a(0xd4)](_0x1cbd78=>_0x1cbd78[_0x46f16a(0xd5)][_0x46f16a(0x70)](_0x43593b=>buildDynamicCommandDefinition(_0x1cbd78,_0x43593b)));}export function getDynamicServiceDefinitions(_0x357234){const _0xa3ab37=a62_0x52e7,_0x534c80=listDynamicServiceDefinitions(_0x357234);return _0x534c80[_0xa3ab37(0x9e)]>0x0?_0x534c80:undefined;}export function findDynamicServiceDefinition(_0x406b82,_0x535e62){const _0x194301=a62_0x52e7;return listDynamicServiceDefinitions(_0x406b82)[_0x194301(0xbd)](_0x1415cb=>_0x1415cb[_0x194301(0x78)]===_0x535e62);}export function buildDynamicCommandDefinition(_0x2b3b93,_0x3c4107){const _0x329869=a62_0x52e7;return{'service':_0x2b3b93[_0x329869(0xab)][_0x329869(0xa8)],'command':dynamicCommandName(_0x3c4107),'description':_0x3c4107[_0x329869(0x7e)]||_0x329869(0xbe)+_0x3c4107[_0x329869(0x88)],'risk':_0x3c4107[_0x329869(0x6f)],..._0x3c4107[_0x329869(0x6f)]===_0x329869(0x87)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x3c4107)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x3c4107[_0x329869(0x92)][_0x329869(0x70)](_0x3cd04b=>({'name':_0x3cd04b[_0x329869(0x75)],'description':_0x3cd04b['description']||_0x3cd04b[_0x329869(0x75)],'required':_0x3cd04b[_0x329869(0xb5)]})),'flags':_0x3c4107[_0x329869(0xc1)][_0x329869(0x70)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x3c4107),async 'dryRun'(_0x505d39){const _0x591e4d=_0x329869,_0x473e8d=await compilePlan(_0x3c4107,_0x505d39);return{'method':'SERVICE_TREE','url':_0x3c4107[_0x591e4d(0x88)],'body':{'target':targetPreview(_0x473e8d),'params':_0x473e8d[_0x591e4d(0x9d)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x3c4107['cliPath']};},async 'execute'(_0x2a131b){const _0x3b26ad=_0x329869,_0x301cd4=await compilePlan(_0x3c4107,_0x2a131b),_0x835e28=Date['now'](),_0x444985=await executePlan(_0x301cd4,_0x3c4107,_0x2a131b),_0x3b0ac9=Date[_0x3b26ad(0xaa)]()-_0x835e28;return{'ok':!![],'data':{'service':_0x2b3b93[_0x3b26ad(0xab)],'command':_0x3c4107[_0x3b26ad(0x88)],'target':targetPreview(_0x301cd4),'result':_0x444985,'elapsed':_0x3b0ac9},'message':_0x3b26ad(0xcb)+_0x3c4107[_0x3b26ad(0x88)]+_0x3b26ad(0x71)+_0x3b0ac9+'ms'};}};}function buildDynamicConfirmationDescription(_0x51a3fa){const _0x9f898b=a62_0x52e7,_0x374f48=_0x51a3fa[_0x9f898b(0x7e)]||_0x51a3fa['cliPath'],_0x45439f=_0x51a3fa[_0x9f898b(0x6f)]===_0x9f898b(0xd6)?_0x9f898b(0xba):_0x9f898b(0x7c);return _0x9f898b(0xca)+_0x374f48+_0x9f898b(0x9b)+_0x45439f;}function dynamicCommandName(_0x3f376a){const _0x4cae5e=a62_0x52e7;return _0x3f376a[_0x4cae5e(0x81)]['slice'](0x1)[_0x4cae5e(0x9a)]('\x20');}function riskTag(_0x1696ac){const _0x3129d4=a62_0x52e7;return _0x1696ac===_0x3129d4(0x87)?'':'\x20\x20['+_0x1696ac+']';}function flagToCommandFlag(_0x5076c2){const _0x2da393=a62_0x52e7;return{'name':_0x5076c2[_0x2da393(0x76)],'type':_0x5076c2[_0x2da393(0xc8)]===_0x2da393(0x7f)?'string':_0x5076c2[_0x2da393(0xc8)],'description':_0x5076c2[_0x2da393(0x7e)]||_0x5076c2[_0x2da393(0x75)],'required':_0x5076c2[_0x2da393(0xb5)],'default':isPrimitiveFlagDefault(_0x5076c2[_0x2da393(0xb1)])?_0x5076c2[_0x2da393(0xb1)]:undefined,'enum':_0x5076c2[_0x2da393(0x80)]};}async function compilePlan(_0x1fc470,_0x5a49b0){const _0x3d15ad=a62_0x52e7;return compileServiceTreeCommand(_0x1fc470,{'flags':_0x5a49b0[_0x3d15ad(0x91)],'args':_0x5a49b0[_0x3d15ad(0x92)],'context':await buildServiceContext(_0x1fc470,_0x5a49b0)});}async function buildServiceContext(_0x50d3db,_0x4424ac){const _0x25bf70=a62_0x52e7,_0x2e1ea2={'appCode':_0x4424ac[_0x25bf70(0xa3)],'env':_0x4424ac[_0x25bf70(0xa7)],'envName':_0x4424ac['envName']};if(!usesRuntimeContext(_0x50d3db))return _0x2e1ea2;const _0x46289b=await getLoginUserInfo(),_0x341624=pickFirst(_0x46289b['userId'],_0x46289b['id']);return{..._0x2e1ea2,'user':_0x46289b,'userId':_0x341624,'id':_0x46289b['id'],'username':pickFirst(_0x46289b[_0x25bf70(0xc6)],_0x46289b['userName'],_0x46289b[_0x25bf70(0x94)]),'userName':_0x46289b['userName'],'nickname':pickFirst(_0x46289b['nickname'],_0x46289b[_0x25bf70(0x99)]),'nickName':_0x46289b[_0x25bf70(0x99)],'tenantCode':_0x46289b[_0x25bf70(0xad)],'employeeId':_0x46289b[_0x25bf70(0xd0)]};}function usesRuntimeContext(_0x1e9e83){const _0x42e9b7=a62_0x52e7;return _0x1e9e83[_0x42e9b7(0x79)]['some'](_0x4b08a1=>typeof _0x4b08a1[_0x42e9b7(0xc3)]===_0x42e9b7(0xa1)&&(_0x4b08a1['source'][_0x42e9b7(0x8e)]('context.')||_0x4b08a1[_0x42e9b7(0xc3)][_0x42e9b7(0x8e)]('ctx.')));}function pickFirst(..._0x38d2c7){const _0x169782=a62_0x52e7;return _0x38d2c7[_0x169782(0xbd)](_0x97bb3d=>_0x97bb3d!==undefined&&_0x97bb3d!==null);}async function executePlan(_0x494608,_0x3db7d2,_0x1d6185){const _0x54d44e=a62_0x52e7;if(_0x494608[_0x54d44e(0x97)]===_0x54d44e(0xbf)){const _0x22de5a=await resolveDatasetCode(_0x494608,_0x3db7d2,_0x1d6185);return executeData(_0x22de5a,_0x494608[_0x54d44e(0x78)],_0x494608[_0x54d44e(0x9d)]);}if(_0x494608[_0x54d44e(0x97)]===_0x54d44e(0xb6)){if(!_0x494608[_0x54d44e(0xa6)])throw CliErrors[_0x54d44e(0xa5)](_0x54d44e(0xcb)+_0x3db7d2[_0x54d44e(0x88)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x494608[_0x54d44e(0xa6)],normalizeScalarParams(_0x494608[_0x54d44e(0x9d)]));}if(_0x494608[_0x54d44e(0x97)]===_0x54d44e(0xbc)){const _0x532ba9=_0x494608[_0x54d44e(0x6d)]||_0x494608['bffCode']||(_0x494608[_0x54d44e(0xa2)]==null?'':String(_0x494608['bffId']));if(!_0x532ba9)throw CliErrors[_0x54d44e(0xa5)](_0x54d44e(0xcb)+_0x3db7d2[_0x54d44e(0x88)]+_0x54d44e(0xce));return executeSdkBff(_0x532ba9,_0x494608[_0x54d44e(0x9d)]);}throw CliErrors[_0x54d44e(0xa5)](_0x54d44e(0x9c)+_0x494608['kind']);}async function resolveDatasetCode(_0x2391f0,_0x535742,_0x30a82b){const _0x2e94cc=a62_0x52e7;if(_0x2391f0['datasetCode'])return _0x2391f0['datasetCode'];if(!_0x2391f0[_0x2e94cc(0x95)])throw CliErrors['validation'](_0x2e94cc(0xcb)+_0x535742[_0x2e94cc(0x88)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x1ca9ea=await listDatasets(_0x30a82b[_0x2e94cc(0xa3)]),_0x213140=_0x1ca9ea[_0x2e94cc(0xbd)](_0x231cef=>_0x231cef[_0x2e94cc(0xb4)]?.[_0x2e94cc(0xbb)]===_0x2391f0[_0x2e94cc(0x95)]);if(!_0x213140?.['code'])throw CliErrors[_0x2e94cc(0xa5)](_0x2e94cc(0xd3)+_0x2391f0[_0x2e94cc(0x95)]+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x30a82b[_0x2e94cc(0xa3)]+'.',_0x2e94cc(0xac));return _0x213140[_0x2e94cc(0xa8)];}function a62_0x4c38(){const _0x10b747=['slice','dbtableConfig','required','sql','3jDLonV','bffCode','filter','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','tableName','bff','find','Run\x20service\x20command\x20','data','10JHdScs','flags','\x20\x20SERVICE\x20TREE\x20TARGET','source','\x20->\x20','`\x20to\x20inspect\x20the\x20manifest.','username','remainingArgs','type','Commands:','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','Service\x20command\x20','operator','appcode','\x20requires\x20target.functionName.','appRef','employeeId','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','\x20\x20\x20\x20datatable:\x20','Cannot\x20resolve\x20datatable\x20\x22','flatMap','commands','high-risk-write','normalizedManifest','appBindings','scriptName','Use\x20`','risk','map','\x20completed\x20in\x20','tree','target','804286NhNktx','name','cliName','app','command','mapTo','712500YmqvJH','trim','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','\x20\x20\x20\x20kind:\x20\x20\x20\x20','description','json','enum','fullPath','4673466llpBbh','\x20\x20\x20\x20sqlCode:\x20','Unknown\x20appRef\x20\x22','push','env','read','cliPath','\x20\x20\x20\x20','18gEfyCM','114884hipriC','number','\x20\x20\x20\x20datasetCode:\x20','startsWith','entries','248onkyVR','rawFlags','args','datasetCode','loginName','datatable','const','kind','\x20\x20MAP\x20TO','nickName','join','\x22.\x20','Unsupported\x20service\x20target\x20kind:\x20','params','length','\x20\x20\x20\x20functionName:\x20','fromEntries','string','bffId','appCode','229112SfXoPI','validation','sqlCode','envName','code','10033914DDQudL','now','service','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','tenantCode','boolean','\x20<command>\x20[flags]','336510GUERGe','default','\x20\x20\x20\x20command:\x20'];a62_0x4c38=function(){return _0x10b747;};return a62_0x4c38();}function applyAppBinding(_0x109e92,_0x1ad92c,_0x499a44){const _0x499fac=a62_0x52e7,_0x3b81aa=_0x1ad92c[_0x499fac(0x73)][_0x499fac(0xcf)];if(!_0x3b81aa)return;const _0x17f4b0=_0x109e92[_0x499fac(0x6c)][_0x3b81aa];if(!_0x17f4b0)throw CliErrors[_0x499fac(0xa5)](_0x499fac(0x84)+_0x3b81aa+'\x22\x20in\x20service\x20command\x20'+_0x1ad92c[_0x499fac(0x88)]+'.',_0x499fac(0xd1));const _0x246437=_0x17f4b0[_0x499fac(0xcd)]||_0x17f4b0['appCode'];_0x246437&&!hasText(_0x499a44['appcode'])&&(_0x499a44[_0x499fac(0xcd)]=_0x246437),_0x17f4b0[_0x499fac(0x77)]&&!hasText(_0x499a44[_0x499fac(0x77)])&&!hasText(_0x499a44[_0x499fac(0xcd)])&&(_0x499a44[_0x499fac(0x77)]=_0x17f4b0[_0x499fac(0x77)]),_0x17f4b0[_0x499fac(0x86)]&&!hasText(_0x499a44[_0x499fac(0x86)])&&(_0x499a44[_0x499fac(0x86)]=_0x17f4b0['env']);}function renderDynamicCommandHelp(_0x37260c){const _0x3e915b=a62_0x52e7,_0x3b23c9=[_0x3e915b(0xc2),_0x3e915b(0x7d)+_0x37260c['target']['kind'],_0x3e915b(0xb2)+_0x37260c[_0x3e915b(0x73)][_0x3e915b(0x78)]];if(_0x37260c[_0x3e915b(0x73)][_0x3e915b(0x93)])_0x3b23c9[_0x3e915b(0x85)](_0x3e915b(0x8d)+_0x37260c[_0x3e915b(0x73)][_0x3e915b(0x93)]);if(_0x37260c['target'][_0x3e915b(0x95)])_0x3b23c9['push'](_0x3e915b(0xd2)+_0x37260c[_0x3e915b(0x73)][_0x3e915b(0x95)]);if(_0x37260c[_0x3e915b(0x73)][_0x3e915b(0xa6)])_0x3b23c9[_0x3e915b(0x85)](_0x3e915b(0x83)+_0x37260c[_0x3e915b(0x73)]['sqlCode']);if(_0x37260c[_0x3e915b(0x73)][_0x3e915b(0x6d)])_0x3b23c9[_0x3e915b(0x85)](_0x3e915b(0x9f)+_0x37260c[_0x3e915b(0x73)]['scriptName']);if(_0x37260c['mapTo'][_0x3e915b(0x9e)]>0x0){_0x3b23c9['push']('',_0x3e915b(0x98));for(const _0x5a88ed of _0x37260c['mapTo']){_0x3b23c9[_0x3e915b(0x85)](_0x3e915b(0x89)+(_0x5a88ed[_0x3e915b(0xc3)]||_0x3e915b(0x96))+_0x3e915b(0xc4)+_0x5a88ed[_0x3e915b(0x73)]+(_0x5a88ed['operator']?'.'+_0x5a88ed[_0x3e915b(0xcc)]:''));}}return _0x3b23c9['join']('\x0a');}function targetPreview(_0x58eebd){const _0x14caaa=a62_0x52e7;return{'kind':_0x58eebd['kind'],'command':_0x58eebd[_0x14caaa(0x78)],'appRef':_0x58eebd[_0x14caaa(0xcf)],'datasetCode':_0x58eebd[_0x14caaa(0x93)],'datatable':_0x58eebd[_0x14caaa(0x95)],'sqlCode':_0x58eebd['sqlCode'],'bffCode':_0x58eebd[_0x14caaa(0xb8)],'bffId':_0x58eebd['bffId'],'functionName':_0x58eebd[_0x14caaa(0x6d)]};}function normalizeScalarParams(_0x5cc18f){const _0x1b2e50=a62_0x52e7;return Object[_0x1b2e50(0xa0)](Object[_0x1b2e50(0x8f)](_0x5cc18f)[_0x1b2e50(0xb9)](([,_0x1219f3])=>typeof _0x1219f3===_0x1b2e50(0xa1)||typeof _0x1219f3==='number'));}function hasText(_0x230435){const _0x35dd90=a62_0x52e7;return typeof _0x230435===_0x35dd90(0xa1)&&_0x230435[_0x35dd90(0x7b)]()[_0x35dd90(0x9e)]>0x0;}function isPrimitiveFlagDefault(_0x133d73){const _0x3f9f5e=a62_0x52e7;return _0x133d73===undefined||typeof _0x133d73===_0x3f9f5e(0xa1)||typeof _0x133d73===_0x3f9f5e(0x8c)||typeof _0x133d73===_0x3f9f5e(0xae);}
1
+ (function(_0xd91b86,_0x5e1962){const _0xbd5f61=a62_0x50fa,_0x2faf91=_0xd91b86();while(!![]){try{const _0x5314ef=parseInt(_0xbd5f61(0x18b))/0x1*(parseInt(_0xbd5f61(0x198))/0x2)+parseInt(_0xbd5f61(0x194))/0x3+parseInt(_0xbd5f61(0x1c1))/0x4*(-parseInt(_0xbd5f61(0x16d))/0x5)+parseInt(_0xbd5f61(0x1c3))/0x6+parseInt(_0xbd5f61(0x1d5))/0x7+parseInt(_0xbd5f61(0x16f))/0x8+-parseInt(_0xbd5f61(0x1a7))/0x9;if(_0x5314ef===_0x5e1962)break;else _0x2faf91['push'](_0x2faf91['shift']());}catch(_0x5b4374){_0x2faf91['push'](_0x2faf91['shift']());}}}(a62_0xaf64,0x88509));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';function a62_0xaf64(){const _0x1e2ec3=['bff','target','appcode','json','normalizedManifest','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','Cannot\x20resolve\x20datatable\x20\x22','risk','fullPath','20uarrzx','\x20\x20\x20\x20command:\x20','4890882BMdPlG','args','envName','env','datasetCode','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','loginName','name','Preview\x20dynamic\x20service\x20command:\x20','\x20<command>\x20[flags]','Service\x20command\x20','commands','`\x20to\x20inspect\x20the\x20manifest.','number','startsWith','map','\x20service\x20detail\x20--service\x20','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','6043464htkUaf','\x20->\x20','required','1047035SzcwhP','\x20\x20\x20\x20datasetCode:\x20','8267320ehLBhT','boolean','code','now','datatable','tree','params','type','\x20\x20\x20\x20sqlCode:\x20','bffId','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','userName','kind','slice','trim','appBindings','service','\x20completed\x20in\x20','scriptName','default','find','bffCode','push','description','some','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','length','flatMap','439xSaKmE','filter','\x20\x20\x20\x20kind:\x20\x20\x20\x20','\x20\x20[','app','validation','\x20requires\x20target.functionName.','\x20\x20SERVICE\x20TREE\x20TARGET','enum','592050aAuzPs','join','nickName','appRef','2162hcUpxT','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','nickname','\x20\x20\x20\x20datatable:\x20','padEnd','Commands:','operator','SERVICE_TREE','data','\x20\x20\x20\x20','ctx.','command','Unsupported\x20service\x20target\x20kind:\x20','userId','context.','16005987paNzlM','string','cliName','mapTo','tenantCode','appCode','Use\x20`','read','cliPath','tableName','sqlCode','Unknown\x20appRef\x20\x22','Run\x20service\x20command\x20','source','remainingArgs','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','dbtableConfig'];a62_0xaf64=function(){return _0x1e2ec3;};return a62_0xaf64();}import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0xfe3d0e,_0x37597f){const _0x5ebf21=a62_0x50fa,_0x10097b=listLocalServiceTrees();let _0x54ec50;for(const _0x31fd01 of _0x10097b){const _0x4abd39=matchServiceTreeCommand(_0x31fd01,_0xfe3d0e);if(!_0x4abd39)continue;(!_0x54ec50||_0x4abd39['command']['fullPath'][_0x5ebf21(0x189)]>_0x54ec50[_0x5ebf21(0x1a3)][_0x5ebf21(0x1c0)][_0x5ebf21(0x189)])&&(_0x54ec50={'tree':_0x31fd01,'command':_0x4abd39[_0x5ebf21(0x1a3)],'remainingArgs':_0x4abd39[_0x5ebf21(0x1b5)]});}if(!_0x54ec50)return undefined;const _0x241c36={..._0x37597f};return applyAppBinding(_0x54ec50[_0x5ebf21(0x174)],_0x54ec50[_0x5ebf21(0x1a3)],_0x241c36),{'definition':buildDynamicCommandDefinition(_0x54ec50[_0x5ebf21(0x174)],_0x54ec50[_0x5ebf21(0x1a3)]),'args':_0x54ec50[_0x5ebf21(0x1b5)],'flags':_0x241c36,'tree':_0x54ec50[_0x5ebf21(0x174)],'command':_0x54ec50[_0x5ebf21(0x1a3)]};}export function generateDynamicServiceHelp(_0x402c01){const _0x418e09=a62_0x50fa,_0x344948=listLocalServiceTrees()[_0x418e09(0x183)](_0x220659=>_0x220659[_0x418e09(0x17f)][_0x418e09(0x171)]===_0x402c01);if(!_0x344948)return undefined;const _0x221722=[CLI_BIN_NAME+'\x20'+_0x402c01+_0x418e09(0x1cc),'',_0x344948[_0x418e09(0x17f)][_0x418e09(0x1ca)]||_0x402c01,_0x344948[_0x418e09(0x17f)]['description']?'\x20\x20'+_0x344948[_0x418e09(0x17f)][_0x418e09(0x186)]:'','',_0x418e09(0x19d),..._0x344948[_0x418e09(0x1ce)]['map'](_0x5b58c5=>{const _0x1346a2=_0x418e09,_0x3cc0e7=_0x5b58c5['fullPath'][_0x1346a2(0x17c)](0x1)[_0x1346a2(0x195)]('\x20'),_0x49e082=_0x5b58c5[_0x1346a2(0x1bf)]==='read'?'':'\x20['+_0x5b58c5['risk']+']';return'\x20\x20'+_0x3cc0e7[_0x1346a2(0x19c)](0x18)+'\x20'+(_0x5b58c5['description']||'')+_0x49e082;}),'',_0x418e09(0x1ad)+CLI_BIN_NAME+_0x418e09(0x1d3)+_0x402c01+_0x418e09(0x1cf)][_0x418e09(0x18c)](Boolean);return _0x221722[_0x418e09(0x195)]('\x0a');}export function listDynamicServiceEntries(){const _0x3e5e6e=a62_0x50fa;return listLocalServices()[_0x3e5e6e(0x1d2)](_0xa17754=>{const _0x276e37=_0x3e5e6e,_0x3b665b=_0xa17754[_0x276e37(0x1bc)];return{'service':_0x3b665b[_0x276e37(0x17f)][_0x276e37(0x171)],'label':_0x3b665b[_0x276e37(0x17f)][_0x276e37(0x1ca)]||_0x3b665b[_0x276e37(0x17f)][_0x276e37(0x171)],'commands':_0x3b665b[_0x276e37(0x1ce)][_0x276e37(0x1d2)](_0x3bf469=>({'command':dynamicCommandName(_0x3bf469),'description':_0x3bf469[_0x276e37(0x186)]||'Run\x20service\x20command\x20'+_0x3bf469[_0x276e37(0x1af)],'tag':riskTag(_0x3bf469[_0x276e37(0x1bf)])}))};});}export function getDynamicServiceEntry(_0x5e0993){const _0x35b073=a62_0x50fa;return listDynamicServiceEntries()['find'](_0x29be58=>_0x29be58[_0x35b073(0x17f)]===_0x5e0993);}function a62_0x50fa(_0x344966,_0x22f832){_0x344966=_0x344966-0x16b;const _0xaf649d=a62_0xaf64();let _0x50fab2=_0xaf649d[_0x344966];return _0x50fab2;}export function listDynamicServiceDefinitions(_0x438270){const _0x34e89b=a62_0x50fa;return listLocalServiceTrees()['filter'](_0x3f7a41=>!_0x438270||_0x3f7a41[_0x34e89b(0x17f)][_0x34e89b(0x171)]===_0x438270)[_0x34e89b(0x18a)](_0xb10ff8=>_0xb10ff8[_0x34e89b(0x1ce)][_0x34e89b(0x1d2)](_0x498d85=>buildDynamicCommandDefinition(_0xb10ff8,_0x498d85)));}export function getDynamicServiceDefinitions(_0x45dce9){const _0x31926e=a62_0x50fa,_0x5d217e=listDynamicServiceDefinitions(_0x45dce9);return _0x5d217e[_0x31926e(0x189)]>0x0?_0x5d217e:undefined;}export function findDynamicServiceDefinition(_0x88c73c,_0x356d24){const _0x331e8d=a62_0x50fa;return listDynamicServiceDefinitions(_0x88c73c)[_0x331e8d(0x183)](_0x1b9093=>_0x1b9093[_0x331e8d(0x1a3)]===_0x356d24);}export function buildDynamicCommandDefinition(_0x174663,_0x435863){const _0x40b996=a62_0x50fa;return{'service':_0x174663[_0x40b996(0x17f)][_0x40b996(0x171)],'command':dynamicCommandName(_0x435863),'description':_0x435863['description']||_0x40b996(0x1b3)+_0x435863[_0x40b996(0x1af)],'risk':_0x435863[_0x40b996(0x1bf)],..._0x435863['risk']===_0x40b996(0x1ae)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x435863)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x435863[_0x40b996(0x1c4)][_0x40b996(0x1d2)](_0x193abe=>({'name':_0x193abe['name'],'description':_0x193abe['description']||_0x193abe[_0x40b996(0x1ca)],'required':_0x193abe[_0x40b996(0x16c)]})),'flags':_0x435863['flags']['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x435863),async 'dryRun'(_0x45ddbb){const _0x16bb56=_0x40b996,_0x14a537=await compilePlan(_0x435863,_0x45ddbb);return{'method':_0x16bb56(0x19f),'url':_0x435863['cliPath'],'body':{'target':targetPreview(_0x14a537),'params':_0x14a537[_0x16bb56(0x175)]},'description':_0x16bb56(0x1cb)+_0x435863['cliPath']};},async 'execute'(_0x3e2297){const _0x41330e=_0x40b996,_0x3234e3=await compilePlan(_0x435863,_0x3e2297),_0x99cf5a=Date['now'](),_0x4ec764=await executePlan(_0x3234e3,_0x435863,_0x3e2297),_0xaa7850=Date[_0x41330e(0x172)]()-_0x99cf5a;return{'ok':!![],'data':{'service':_0x174663[_0x41330e(0x17f)],'command':_0x435863[_0x41330e(0x1af)],'target':targetPreview(_0x3234e3),'result':_0x4ec764,'elapsed':_0xaa7850},'message':_0x41330e(0x1cd)+_0x435863['cliPath']+_0x41330e(0x180)+_0xaa7850+'ms'};}};}function buildDynamicConfirmationDescription(_0x2541be){const _0x11067a=a62_0x50fa,_0x4a80a9=_0x2541be['description']||_0x2541be[_0x11067a(0x1af)],_0x11e941=_0x2541be[_0x11067a(0x1bf)]==='high-risk-write'?_0x11067a(0x1b6):_0x11067a(0x1bd);return _0x11067a(0x1d4)+_0x4a80a9+'\x22.\x20'+_0x11e941;}function dynamicCommandName(_0x134b36){const _0x38243c=a62_0x50fa;return _0x134b36['fullPath']['slice'](0x1)[_0x38243c(0x195)]('\x20');}function riskTag(_0x5e7c0d){const _0x40b6c6=a62_0x50fa;return _0x5e7c0d===_0x40b6c6(0x1ae)?'':_0x40b6c6(0x18e)+_0x5e7c0d+']';}function flagToCommandFlag(_0x4061bc){const _0x57a6f3=a62_0x50fa;return{'name':_0x4061bc[_0x57a6f3(0x1a9)],'type':_0x4061bc[_0x57a6f3(0x176)]===_0x57a6f3(0x1bb)?_0x57a6f3(0x1a8):_0x4061bc[_0x57a6f3(0x176)],'description':_0x4061bc[_0x57a6f3(0x186)]||_0x4061bc[_0x57a6f3(0x1ca)],'required':_0x4061bc[_0x57a6f3(0x16c)],'default':isPrimitiveFlagDefault(_0x4061bc['default'])?_0x4061bc[_0x57a6f3(0x182)]:undefined,'enum':_0x4061bc[_0x57a6f3(0x193)]};}async function compilePlan(_0x7bd3d7,_0x598ac1){const _0x145a8c=a62_0x50fa;return compileServiceTreeCommand(_0x7bd3d7,{'flags':_0x598ac1['rawFlags'],'args':_0x598ac1[_0x145a8c(0x1c4)],'context':await buildServiceContext(_0x7bd3d7,_0x598ac1)});}async function buildServiceContext(_0x2eb391,_0x50d6ac){const _0x276374=a62_0x50fa,_0x42d237={'appCode':_0x50d6ac[_0x276374(0x1ac)],'env':_0x50d6ac[_0x276374(0x1c5)],'envName':_0x50d6ac[_0x276374(0x1c5)]};if(!usesRuntimeContext(_0x2eb391))return _0x42d237;const _0x5cc2ab=await getLoginUserInfo(),_0x28a338=pickFirst(_0x5cc2ab[_0x276374(0x1a5)],_0x5cc2ab['id']);return{..._0x42d237,'user':_0x5cc2ab,'userId':_0x28a338,'id':_0x5cc2ab['id'],'username':pickFirst(_0x5cc2ab['username'],_0x5cc2ab[_0x276374(0x17a)],_0x5cc2ab[_0x276374(0x1c9)]),'userName':_0x5cc2ab[_0x276374(0x17a)],'nickname':pickFirst(_0x5cc2ab[_0x276374(0x19a)],_0x5cc2ab['nickName']),'nickName':_0x5cc2ab[_0x276374(0x196)],'tenantCode':_0x5cc2ab[_0x276374(0x1ab)],'employeeId':_0x5cc2ab['employeeId']};}function usesRuntimeContext(_0x518a9b){const _0x5ed287=a62_0x50fa;return _0x518a9b[_0x5ed287(0x1aa)][_0x5ed287(0x187)](_0x1f516f=>typeof _0x1f516f[_0x5ed287(0x1b4)]===_0x5ed287(0x1a8)&&(_0x1f516f['source'][_0x5ed287(0x1d1)](_0x5ed287(0x1a6))||_0x1f516f['source']['startsWith'](_0x5ed287(0x1a2))));}function pickFirst(..._0x270325){const _0x10f93c=a62_0x50fa;return _0x270325[_0x10f93c(0x183)](_0xaddd49=>_0xaddd49!==undefined&&_0xaddd49!==null);}async function executePlan(_0x37d917,_0x10eefe,_0x2a964b){const _0x58c77d=a62_0x50fa;if(_0x37d917['kind']===_0x58c77d(0x1a0)){const _0x464296=await resolveDatasetCode(_0x37d917,_0x10eefe,_0x2a964b);return executeData(_0x464296,_0x37d917['command'],_0x37d917[_0x58c77d(0x175)]);}if(_0x37d917[_0x58c77d(0x17b)]==='sql'){if(!_0x37d917[_0x58c77d(0x1b1)])throw CliErrors[_0x58c77d(0x190)](_0x58c77d(0x1cd)+_0x10eefe['cliPath']+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x37d917[_0x58c77d(0x1b1)],normalizeScalarParams(_0x37d917[_0x58c77d(0x175)]));}if(_0x37d917[_0x58c77d(0x17b)]===_0x58c77d(0x1b8)){const _0x2bc443=_0x37d917[_0x58c77d(0x181)]||_0x37d917[_0x58c77d(0x184)]||(_0x37d917[_0x58c77d(0x178)]==null?'':String(_0x37d917[_0x58c77d(0x178)]));if(!_0x2bc443)throw CliErrors['validation'](_0x58c77d(0x1cd)+_0x10eefe['cliPath']+_0x58c77d(0x191));return executeSdkBff(_0x2bc443,_0x37d917[_0x58c77d(0x175)]);}throw CliErrors[_0x58c77d(0x190)](_0x58c77d(0x1a4)+_0x37d917[_0x58c77d(0x17b)]);}async function resolveDatasetCode(_0x2ed2c,_0x241903,_0x5916b2){const _0x4c7cf8=a62_0x50fa;if(_0x2ed2c['datasetCode'])return _0x2ed2c[_0x4c7cf8(0x1c7)];if(!_0x2ed2c[_0x4c7cf8(0x173)])throw CliErrors['validation'](_0x4c7cf8(0x1cd)+_0x241903[_0x4c7cf8(0x1af)]+_0x4c7cf8(0x1c8));const _0x5afe07=await listDatasets(_0x5916b2[_0x4c7cf8(0x1ac)]),_0x5c7526=_0x5afe07[_0x4c7cf8(0x183)](_0x5dd0d7=>_0x5dd0d7[_0x4c7cf8(0x1b7)]?.[_0x4c7cf8(0x1b0)]===_0x2ed2c[_0x4c7cf8(0x173)]);if(!_0x5c7526?.[_0x4c7cf8(0x171)])throw CliErrors['validation'](_0x4c7cf8(0x1be)+_0x2ed2c[_0x4c7cf8(0x173)]+_0x4c7cf8(0x199)+_0x5916b2['appCode']+'.',_0x4c7cf8(0x188));return _0x5c7526['code'];}function applyAppBinding(_0x476382,_0x4b4c5f,_0xe11486){const _0x2bc445=a62_0x50fa,_0x56f894=_0x4b4c5f['target'][_0x2bc445(0x197)];if(!_0x56f894)return;const _0x379594=_0x476382[_0x2bc445(0x17e)][_0x56f894];if(!_0x379594)throw CliErrors[_0x2bc445(0x190)](_0x2bc445(0x1b2)+_0x56f894+'\x22\x20in\x20service\x20command\x20'+_0x4b4c5f['cliPath']+'.',_0x2bc445(0x179));const _0x256f20=_0x379594[_0x2bc445(0x1ba)]||_0x379594[_0x2bc445(0x1ac)];_0x256f20&&!hasText(_0xe11486[_0x2bc445(0x1ba)])&&(_0xe11486[_0x2bc445(0x1ba)]=_0x256f20),_0x379594[_0x2bc445(0x18f)]&&!hasText(_0xe11486[_0x2bc445(0x18f)])&&!hasText(_0xe11486['appcode'])&&(_0xe11486[_0x2bc445(0x18f)]=_0x379594[_0x2bc445(0x18f)]),_0x379594[_0x2bc445(0x1c6)]&&!hasText(_0xe11486[_0x2bc445(0x1c6)])&&(_0xe11486[_0x2bc445(0x1c6)]=_0x379594['env']);}function renderDynamicCommandHelp(_0x3483c5){const _0x34bc12=a62_0x50fa,_0xa6deb=[_0x34bc12(0x192),_0x34bc12(0x18d)+_0x3483c5['target'][_0x34bc12(0x17b)],_0x34bc12(0x1c2)+_0x3483c5['target'][_0x34bc12(0x1a3)]];if(_0x3483c5['target'][_0x34bc12(0x1c7)])_0xa6deb['push'](_0x34bc12(0x16e)+_0x3483c5[_0x34bc12(0x1b9)][_0x34bc12(0x1c7)]);if(_0x3483c5[_0x34bc12(0x1b9)]['datatable'])_0xa6deb[_0x34bc12(0x185)](_0x34bc12(0x19b)+_0x3483c5['target'][_0x34bc12(0x173)]);if(_0x3483c5[_0x34bc12(0x1b9)][_0x34bc12(0x1b1)])_0xa6deb['push'](_0x34bc12(0x177)+_0x3483c5[_0x34bc12(0x1b9)][_0x34bc12(0x1b1)]);if(_0x3483c5['target'][_0x34bc12(0x181)])_0xa6deb[_0x34bc12(0x185)]('\x20\x20\x20\x20functionName:\x20'+_0x3483c5[_0x34bc12(0x1b9)]['scriptName']);if(_0x3483c5[_0x34bc12(0x1aa)][_0x34bc12(0x189)]>0x0){_0xa6deb['push']('','\x20\x20MAP\x20TO');for(const _0x568ba1 of _0x3483c5[_0x34bc12(0x1aa)]){_0xa6deb[_0x34bc12(0x185)](_0x34bc12(0x1a1)+(_0x568ba1[_0x34bc12(0x1b4)]||'const')+_0x34bc12(0x16b)+_0x568ba1[_0x34bc12(0x1b9)]+(_0x568ba1['operator']?'.'+_0x568ba1[_0x34bc12(0x19e)]:''));}}return _0xa6deb[_0x34bc12(0x195)]('\x0a');}function targetPreview(_0x2482bd){const _0x1749bd=a62_0x50fa;return{'kind':_0x2482bd[_0x1749bd(0x17b)],'command':_0x2482bd[_0x1749bd(0x1a3)],'appRef':_0x2482bd[_0x1749bd(0x197)],'datasetCode':_0x2482bd[_0x1749bd(0x1c7)],'datatable':_0x2482bd[_0x1749bd(0x173)],'sqlCode':_0x2482bd[_0x1749bd(0x1b1)],'bffCode':_0x2482bd[_0x1749bd(0x184)],'bffId':_0x2482bd[_0x1749bd(0x178)],'functionName':_0x2482bd[_0x1749bd(0x181)]};}function normalizeScalarParams(_0x7cfc98){const _0x3b9f0f=a62_0x50fa;return Object['fromEntries'](Object['entries'](_0x7cfc98)[_0x3b9f0f(0x18c)](([,_0x3fd0e1])=>typeof _0x3fd0e1===_0x3b9f0f(0x1a8)||typeof _0x3fd0e1===_0x3b9f0f(0x1d0)));}function hasText(_0x382751){const _0x4c4162=a62_0x50fa;return typeof _0x382751===_0x4c4162(0x1a8)&&_0x382751[_0x4c4162(0x17d)]()[_0x4c4162(0x189)]>0x0;}function isPrimitiveFlagDefault(_0x5c5232){const _0x2d5085=a62_0x50fa;return _0x5c5232===undefined||typeof _0x5c5232===_0x2d5085(0x1a8)||typeof _0x5c5232==='number'||typeof _0x5c5232===_0x2d5085(0x170);}
@@ -1 +1 @@
1
- (function(_0x317667,_0x2403d2){const _0x121f36=a63_0x5c83,_0x25eb37=_0x317667();while(!![]){try{const _0x450041=-parseInt(_0x121f36(0xf7))/0x1*(-parseInt(_0x121f36(0xf5))/0x2)+-parseInt(_0x121f36(0xd9))/0x3+-parseInt(_0x121f36(0xdf))/0x4+parseInt(_0x121f36(0xe8))/0x5*(-parseInt(_0x121f36(0xf8))/0x6)+-parseInt(_0x121f36(0xf1))/0x7*(-parseInt(_0x121f36(0xea))/0x8)+-parseInt(_0x121f36(0xf3))/0x9*(parseInt(_0x121f36(0xe6))/0xa)+parseInt(_0x121f36(0xde))/0xb;if(_0x450041===_0x2403d2)break;else _0x25eb37['push'](_0x25eb37['shift']());}catch(_0x17a074){_0x25eb37['push'](_0x25eb37['shift']());}}}(a63_0x4ddd,0x63285));function a63_0x5c83(_0x5c9a5c,_0x5199bf){_0x5c9a5c=_0x5c9a5c-0xd8;const _0x4ddd36=a63_0x4ddd();let _0x5c8384=_0x4ddd36[_0x5c9a5c];return _0x5c8384;}export function adaptServiceTreeManifestForLegacyFramework(_0x190ea8){const _0x5b23f3=a63_0x5c83,_0x357345=cloneJsonValue(_0x190ea8),_0x40db44=[];if(!isObjectRecord(_0x357345))return{'manifest':_0x357345,'errors':_0x40db44};return Array[_0x5b23f3(0xec)](_0x357345[_0x5b23f3(0xf2)])&&_0x357345[_0x5b23f3(0xf2)][_0x5b23f3(0xf4)]((_0x3f3184,_0x357ed1)=>{const _0x1789ec=_0x5b23f3;if(!isObjectRecord(_0x3f3184))return;adaptBffTarget(_0x3f3184[_0x1789ec(0xed)],'$.commands['+_0x357ed1+_0x1789ec(0xf0),_0x40db44);}),adaptResources(_0x357345[_0x5b23f3(0xeb)],'$.resources',_0x40db44),{'manifest':_0x357345,'errors':_0x40db44};}export function toPublicServiceTreeTarget(_0x2d5e18){const _0x24d60c=a63_0x5c83,{scriptName:_0x1b90d3,..._0x4b22a5}=_0x2d5e18;return typeof _0x1b90d3===_0x24d60c(0xf9)&&_0x1b90d3[_0x24d60c(0xe2)]()&&(_0x4b22a5[_0x24d60c(0xef)]=_0x1b90d3),_0x4b22a5;}export function toPublicNormalizedServiceTree(_0x2fd2e6){const _0x1700e7=a63_0x5c83;return{..._0x2fd2e6,'commands':_0x2fd2e6[_0x1700e7(0xf2)]['map'](_0x5fd58=>({..._0x5fd58,'target':toPublicServiceTreeTarget(_0x5fd58['target'])}))};}function adaptResources(_0x13cbb2,_0x2b7803,_0x4fbe7a){const _0x316573=a63_0x5c83;if(!isObjectRecord(_0x13cbb2))return;for(const [_0x1e6c63,_0x1f22c4]of Object['entries'](_0x13cbb2)){if(!isObjectRecord(_0x1f22c4))continue;const _0x43a957=_0x2b7803+'.'+_0x1e6c63;if(isObjectRecord(_0x1f22c4['actions']))for(const [_0x485708,_0x10438c]of Object[_0x316573(0xdc)](_0x1f22c4['actions'])){if(!isObjectRecord(_0x10438c))continue;const _0x4e56b6=_0x43a957+_0x316573(0xfb)+_0x485708,_0xb93101=isObjectRecord(_0x10438c[_0x316573(0xed)])&&_0x10438c[_0x316573(0xed)]['kind']===_0x316573(0xf6);adaptBffTarget(_0x10438c['target'],_0x4e56b6+_0x316573(0xe7),_0x4fbe7a),(_0xb93101||isBffAction(_0x10438c))&&adaptFunctionNameField(_0x10438c,_0x4e56b6,_0x4fbe7a);}adaptResources(_0x1f22c4[_0x316573(0xeb)],_0x43a957+_0x316573(0xdd),_0x4fbe7a);}}function adaptBffTarget(_0xae7c28,_0x35a882,_0x2e6330){const _0x3a6a24=a63_0x5c83;if(!isObjectRecord(_0xae7c28)||_0xae7c28[_0x3a6a24(0xdb)]!==_0x3a6a24(0xf6))return;adaptFunctionNameField(_0xae7c28,_0x35a882,_0x2e6330);}function adaptFunctionNameField(_0x559ab8,_0x406ec4,_0x273dd9){const _0x3014a4=a63_0x5c83;Object['prototype'][_0x3014a4(0xe5)]['call'](_0x559ab8,_0x3014a4(0xd8))&&_0x273dd9['push']({'level':'error','path':_0x406ec4+_0x3014a4(0xe0),'message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x3014a4(0xe4)][_0x3014a4(0xe5)][_0x3014a4(0xee)](_0x559ab8,_0x3014a4(0xef))){if(typeof _0x559ab8[_0x3014a4(0xef)]!==_0x3014a4(0xf9)||!_0x559ab8[_0x3014a4(0xef)][_0x3014a4(0xe2)]()){_0x273dd9[_0x3014a4(0xda)]({'level':_0x3014a4(0xe9),'path':_0x406ec4+'.functionName','message':'functionName\x20must\x20be\x20a\x20non-empty\x20string.'}),delete _0x559ab8['functionName'];return;}_0x559ab8[_0x3014a4(0xd8)]=_0x559ab8[_0x3014a4(0xef)],delete _0x559ab8['functionName'];}}function a63_0x4ddd(){const _0x2b28f6=['kind','entries','.resources','16278174RMWYVb','1981880UhCoLA','.scriptName','object','trim','action','prototype','hasOwnProperty','55780HJehfy','.target','5LpxKXu','error','2338472YYLszg','resources','isArray','target','call','functionName','].target','14bbirBQ','commands','1206rLdDkf','forEach','2BIhFsa','bff','304553SKZPqS','377070SEfvcS','string','map','.actions.','scriptName','1971267zjpSRi','push'];a63_0x4ddd=function(){return _0x2b28f6;};return a63_0x4ddd();}function isBffAction(_0xabb1a9){const _0x51d227=a63_0x5c83;return _0xabb1a9[_0x51d227(0xdb)]===_0x51d227(0xf6)||_0xabb1a9[_0x51d227(0xe3)]==='bff.exec'||_0xabb1a9[_0x51d227(0xed)]==='bff.exec';}function cloneJsonValue(_0x26a1cd){const _0x5d5807=a63_0x5c83;if(Array[_0x5d5807(0xec)](_0x26a1cd))return _0x26a1cd[_0x5d5807(0xfa)](_0x14954e=>cloneJsonValue(_0x14954e));if(isObjectRecord(_0x26a1cd))return Object['fromEntries'](Object['entries'](_0x26a1cd)[_0x5d5807(0xfa)](([_0x639884,_0x4e5efd])=>[_0x639884,cloneJsonValue(_0x4e5efd)]));return _0x26a1cd;}function isObjectRecord(_0x39de3d){const _0x39ca9e=a63_0x5c83;return Boolean(_0x39de3d)&&typeof _0x39de3d===_0x39ca9e(0xe1)&&!Array[_0x39ca9e(0xec)](_0x39de3d);}
1
+ (function(_0x21c418,_0x33df52){const _0x8c9122=a63_0x2ddc,_0x57713f=_0x21c418();while(!![]){try{const _0x2c27c6=parseInt(_0x8c9122(0xa7))/0x1+parseInt(_0x8c9122(0x95))/0x2*(-parseInt(_0x8c9122(0x99))/0x3)+parseInt(_0x8c9122(0x8c))/0x4*(-parseInt(_0x8c9122(0xa0))/0x5)+parseInt(_0x8c9122(0x9f))/0x6+-parseInt(_0x8c9122(0xa1))/0x7*(parseInt(_0x8c9122(0xa3))/0x8)+parseInt(_0x8c9122(0x96))/0x9+-parseInt(_0x8c9122(0xab))/0xa;if(_0x2c27c6===_0x33df52)break;else _0x57713f['push'](_0x57713f['shift']());}catch(_0x4c2b2f){_0x57713f['push'](_0x57713f['shift']());}}}(a63_0x504f,0x7f6e1));export function adaptServiceTreeManifestForLegacyFramework(_0x132070){const _0x21f756=a63_0x2ddc,_0x4058a8=cloneJsonValue(_0x132070),_0x38b6d5=[];if(!isObjectRecord(_0x4058a8))return{'manifest':_0x4058a8,'errors':_0x38b6d5};return Array[_0x21f756(0x9a)](_0x4058a8[_0x21f756(0x8b)])&&_0x4058a8[_0x21f756(0x8b)][_0x21f756(0xaf)]((_0x23dc5e,_0x14b621)=>{const _0x4a01e8=_0x21f756;if(!isObjectRecord(_0x23dc5e))return;adaptBffTarget(_0x23dc5e['target'],_0x4a01e8(0xb0)+_0x14b621+'].target',_0x38b6d5);}),adaptResources(_0x4058a8[_0x21f756(0x93)],_0x21f756(0x98),_0x38b6d5),{'manifest':_0x4058a8,'errors':_0x38b6d5};}function a63_0x504f(){const _0xff611f=['kind','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','action','.actions.','resources','bff.exec','8dhsngo','7931952bMYZrd','push','$.resources','351660cmKHeO','isArray','target','bff','call','map','5854554TQKwVh','263890sEbUuw','231035RpFNSk','error','104lHQkDK','trim','functionName','object','915675woVyDg','string','fromEntries','actions','7195280HhJYmP','functionName\x20must\x20be\x20a\x20non-empty\x20string.','hasOwnProperty','.target','forEach','$.commands[','scriptName','.scriptName','commands','48qrJVkn','entries','prototype'];a63_0x504f=function(){return _0xff611f;};return a63_0x504f();}export function toPublicServiceTreeTarget(_0x2d5200){const _0x59fd2f=a63_0x2ddc,{scriptName:_0x484b27,..._0x31bcef}=_0x2d5200;return typeof _0x484b27===_0x59fd2f(0xa8)&&_0x484b27[_0x59fd2f(0xa4)]()&&(_0x31bcef[_0x59fd2f(0xa5)]=_0x484b27),_0x31bcef;}export function toPublicNormalizedServiceTree(_0x17bc13){const _0x7d7b9f=a63_0x2ddc;return{..._0x17bc13,'commands':_0x17bc13[_0x7d7b9f(0x8b)][_0x7d7b9f(0x9e)](_0x4b031c=>({..._0x4b031c,'target':toPublicServiceTreeTarget(_0x4b031c[_0x7d7b9f(0x9b)])}))};}function a63_0x2ddc(_0x394e39,_0x2cda33){_0x394e39=_0x394e39-0x8a;const _0x504ff6=a63_0x504f();let _0x2ddc3b=_0x504ff6[_0x394e39];return _0x2ddc3b;}function adaptResources(_0x108572,_0x53622e,_0x31eeab){const _0x353078=a63_0x2ddc;if(!isObjectRecord(_0x108572))return;for(const [_0x1aea0e,_0x4f2141]of Object['entries'](_0x108572)){if(!isObjectRecord(_0x4f2141))continue;const _0x4c76fb=_0x53622e+'.'+_0x1aea0e;if(isObjectRecord(_0x4f2141[_0x353078(0xaa)]))for(const [_0x5b9961,_0x2474fa]of Object[_0x353078(0x8d)](_0x4f2141[_0x353078(0xaa)])){if(!isObjectRecord(_0x2474fa))continue;const _0x1b7f28=_0x4c76fb+_0x353078(0x92)+_0x5b9961,_0x116f17=isObjectRecord(_0x2474fa['target'])&&_0x2474fa['target'][_0x353078(0x8f)]===_0x353078(0x9c);adaptBffTarget(_0x2474fa[_0x353078(0x9b)],_0x1b7f28+_0x353078(0xae),_0x31eeab),(_0x116f17||isBffAction(_0x2474fa))&&adaptFunctionNameField(_0x2474fa,_0x1b7f28,_0x31eeab);}adaptResources(_0x4f2141[_0x353078(0x93)],_0x4c76fb+'.resources',_0x31eeab);}}function adaptBffTarget(_0x13b36a,_0x42bd63,_0x4e50f2){if(!isObjectRecord(_0x13b36a)||_0x13b36a['kind']!=='bff')return;adaptFunctionNameField(_0x13b36a,_0x42bd63,_0x4e50f2);}function adaptFunctionNameField(_0x38f24c,_0x170a0a,_0x5c1477){const _0x58f93d=a63_0x2ddc;Object[_0x58f93d(0x8e)]['hasOwnProperty'][_0x58f93d(0x9d)](_0x38f24c,_0x58f93d(0xb1))&&_0x5c1477[_0x58f93d(0x97)]({'level':'error','path':_0x170a0a+_0x58f93d(0x8a),'message':_0x58f93d(0x90)});if(Object['prototype'][_0x58f93d(0xad)][_0x58f93d(0x9d)](_0x38f24c,_0x58f93d(0xa5))){if(typeof _0x38f24c[_0x58f93d(0xa5)]!==_0x58f93d(0xa8)||!_0x38f24c['functionName'][_0x58f93d(0xa4)]()){_0x5c1477[_0x58f93d(0x97)]({'level':_0x58f93d(0xa2),'path':_0x170a0a+'.functionName','message':_0x58f93d(0xac)}),delete _0x38f24c[_0x58f93d(0xa5)];return;}_0x38f24c[_0x58f93d(0xb1)]=_0x38f24c[_0x58f93d(0xa5)],delete _0x38f24c[_0x58f93d(0xa5)];}}function isBffAction(_0x3b721f){const _0x2668ee=a63_0x2ddc;return _0x3b721f[_0x2668ee(0x8f)]==='bff'||_0x3b721f[_0x2668ee(0x91)]===_0x2668ee(0x94)||_0x3b721f[_0x2668ee(0x9b)]===_0x2668ee(0x94);}function cloneJsonValue(_0x58e08d){const _0x22c150=a63_0x2ddc;if(Array[_0x22c150(0x9a)](_0x58e08d))return _0x58e08d[_0x22c150(0x9e)](_0x42d13f=>cloneJsonValue(_0x42d13f));if(isObjectRecord(_0x58e08d))return Object[_0x22c150(0xa9)](Object[_0x22c150(0x8d)](_0x58e08d)[_0x22c150(0x9e)](([_0x4844ce,_0x3017ce])=>[_0x4844ce,cloneJsonValue(_0x3017ce)]));return _0x58e08d;}function isObjectRecord(_0x1d3124){const _0x4f51d3=a63_0x2ddc;return Boolean(_0x1d3124)&&typeof _0x1d3124===_0x4f51d3(0xa6)&&!Array[_0x4f51d3(0x9a)](_0x1d3124);}
@@ -1 +1 @@
1
- function a64_0x4881(_0x534755,_0x336a64){_0x534755=_0x534755-0x14e;const _0x535a29=a64_0x535a();let _0x488197=_0x535a29[_0x534755];return _0x488197;}const a64_0x40686e=a64_0x4881;(function(_0x51caaf,_0x44a015){const _0x1c20e3=a64_0x4881,_0x756b64=_0x51caaf();while(!![]){try{const _0x4ccdba=-parseInt(_0x1c20e3(0x178))/0x1*(-parseInt(_0x1c20e3(0x165))/0x2)+-parseInt(_0x1c20e3(0x17c))/0x3*(parseInt(_0x1c20e3(0x15b))/0x4)+-parseInt(_0x1c20e3(0x185))/0x5+-parseInt(_0x1c20e3(0x18c))/0x6+parseInt(_0x1c20e3(0x16f))/0x7+-parseInt(_0x1c20e3(0x158))/0x8+parseInt(_0x1c20e3(0x152))/0x9*(parseInt(_0x1c20e3(0x166))/0xa);if(_0x4ccdba===_0x44a015)break;else _0x756b64['push'](_0x756b64['shift']());}catch(_0x3f8408){_0x756b64['push'](_0x756b64['shift']());}}}(a64_0x535a,0xeafe5));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a64_0x40686e(0x194),'type':a64_0x40686e(0x187),'required':!![],'description':a64_0x40686e(0x15e)},SERVICE_FLAG={'name':'service','type':a64_0x40686e(0x187),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x5400ec){const _0x106096=a64_0x40686e;return{'serviceCode':_0x5400ec[_0x106096(0x156)],'name':_0x5400ec['normalizedManifest'][_0x106096(0x18f)]['name'],'version':_0x5400ec[_0x106096(0x190)],'importedAt':_0x5400ec[_0x106096(0x17b)],'source':_0x5400ec[_0x106096(0x17f)],'commandCount':_0x5400ec[_0x106096(0x179)][_0x106096(0x184)][_0x106096(0x18d)],'commands':_0x5400ec[_0x106096(0x179)]['commands']['map'](_0x1bbeed=>({'path':_0x1bbeed[_0x106096(0x15f)],'description':_0x1bbeed[_0x106096(0x150)],'risk':_0x1bbeed[_0x106096(0x151)],'target':toPublicServiceTreeTarget(_0x1bbeed[_0x106096(0x17a)]),'flags':_0x1bbeed[_0x106096(0x198)][_0x106096(0x159)](_0x345a0f=>({'name':_0x345a0f['name'],'cliName':_0x345a0f[_0x106096(0x171)],'type':_0x345a0f[_0x106096(0x163)],'required':_0x345a0f[_0x106096(0x15c)]===!![]}))}))};}function summarizeLoadedManifest(_0x5f2022){const _0x126e6f=a64_0x40686e;return{'service':_0x5f2022[_0x126e6f(0x179)]?.[_0x126e6f(0x18f)],'version':_0x5f2022[_0x126e6f(0x179)]?.['version'],'commandCount':_0x5f2022[_0x126e6f(0x179)]?.[_0x126e6f(0x184)][_0x126e6f(0x18d)]??0x0,'commands':_0x5f2022[_0x126e6f(0x179)]?.[_0x126e6f(0x184)][_0x126e6f(0x159)](_0x3174cf=>({'path':_0x3174cf['cliPath'],'risk':_0x3174cf[_0x126e6f(0x151)],'target':toPublicServiceTreeTarget(_0x3174cf[_0x126e6f(0x17a)])}))??[],'registryIndex':_0x5f2022[_0x126e6f(0x196)],'registryServiceCode':_0x5f2022[_0x126e6f(0x161)],'errors':_0x5f2022[_0x126e6f(0x170)][_0x126e6f(0x189)],'warnings':_0x5f2022[_0x126e6f(0x170)]['warnings']};}function a64_0x535a(){const _0x3a05c2=['importedAt','128421MHQWGO','Service\x20manifest\x20validation\x20passed.','import','source','list','\x20service\x20','str','registryPath','commands','6976955zqIvqO','detail','string','registry','errors','serviceCount','kind','9229860slOEnG','length','entry','service','version','\x20service(s).','manifests','replaced','file','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','registryIndex','Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','flags','Service\x20registry\x20validation\x20passed.','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','warnings','description','risk','27WVhzKa','WRITE','entries','updated','serviceCode','reduce','9826360lfrKSI','map','write','40xoXstB','required','imported','Service\x20Tree\x20manifest\x20file\x20path','cliPath','Exported\x20service\x20','registryServiceCode','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','type','hash','152806gsmFBw','13954130TaZuPS','Updated','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','filePath','read','\x20service(s),\x20updated\x20','Removed\x20service\x20','manifest','9029699AcrGry','report','cliName','Local\x20service\x20not\x20found:\x20','export','Imported\x20','remove','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','1ItDSts','normalizedManifest','target'];a64_0x535a=function(){return _0x3a05c2;};return a64_0x535a();}export const serviceDefinitions=[{'service':a64_0x40686e(0x18f),'command':'validate','description':a64_0x40686e(0x19a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x33b361){const _0x4e3545=a64_0x40686e,_0x2b1287=loadServiceManifestFromFile(_0x33b361['str'](_0x4e3545(0x194)));if(!_0x2b1287['report']['ok'])return{'ok':![],'data':{'file':_0x2b1287[_0x4e3545(0x16a)],'hash':_0x2b1287[_0x4e3545(0x164)],'kind':_0x2b1287[_0x4e3545(0x18b)],'serviceCount':_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x18d)],'services':_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x159)](summarizeLoadedManifest),'errors':_0x2b1287[_0x4e3545(0x170)]['errors'],'warnings':_0x2b1287[_0x4e3545(0x170)][_0x4e3545(0x14f)]},'message':formatValidationFailure(_0x2b1287[_0x4e3545(0x170)])};if(_0x2b1287[_0x4e3545(0x18b)]===_0x4e3545(0x188)||_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x18d)]!==0x1)return{'ok':!![],'data':{'file':_0x2b1287[_0x4e3545(0x16a)],'hash':_0x2b1287[_0x4e3545(0x164)],'kind':_0x2b1287[_0x4e3545(0x18b)],'serviceCount':_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x18d)],'commandCount':_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x157)]((_0x1ea9cd,_0x540985)=>_0x1ea9cd+(_0x540985[_0x4e3545(0x179)]?.['commands'][_0x4e3545(0x18d)]??0x0),0x0),'services':_0x2b1287[_0x4e3545(0x192)][_0x4e3545(0x159)](summarizeLoadedManifest),'warnings':_0x2b1287[_0x4e3545(0x170)]['warnings']},'message':_0x4e3545(0x199)};return{'ok':!![],'data':{'file':_0x2b1287[_0x4e3545(0x16a)],'hash':_0x2b1287[_0x4e3545(0x164)],'kind':_0x2b1287[_0x4e3545(0x18b)],'service':_0x2b1287[_0x4e3545(0x179)]?.[_0x4e3545(0x18f)],'version':_0x2b1287[_0x4e3545(0x179)]?.[_0x4e3545(0x190)],'commandCount':_0x2b1287[_0x4e3545(0x179)]?.[_0x4e3545(0x184)][_0x4e3545(0x18d)]??0x0,'commands':_0x2b1287[_0x4e3545(0x179)]?.['commands'][_0x4e3545(0x159)](_0xae7a34=>({'path':_0xae7a34['cliPath'],'risk':_0xae7a34[_0x4e3545(0x151)],'target':toPublicServiceTreeTarget(_0xae7a34[_0x4e3545(0x17a)])})),'warnings':_0x2b1287[_0x4e3545(0x170)][_0x4e3545(0x14f)]},'message':_0x4e3545(0x17d)};}},{'service':a64_0x40686e(0x18f),'command':a64_0x40686e(0x17e),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a64_0x40686e(0x15a),'confirmationDescription':'Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x3d750a){const _0x1f283d=a64_0x40686e,_0x58e05c=loadServiceManifestFromFile(_0x3d750a[_0x1f283d(0x182)]('file'));return{'method':_0x1f283d(0x153),'url':getServiceRegistryPath(),'body':{'file':_0x58e05c['filePath'],'hash':_0x58e05c['hash'],'kind':_0x58e05c[_0x1f283d(0x18b)],'ok':_0x58e05c[_0x1f283d(0x170)]['ok'],'service':_0x58e05c[_0x1f283d(0x179)]?.[_0x1f283d(0x18f)],'version':_0x58e05c['normalizedManifest']?.[_0x1f283d(0x190)],'serviceCount':_0x58e05c['manifests'][_0x1f283d(0x18d)],'services':_0x58e05c[_0x1f283d(0x192)][_0x1f283d(0x159)](_0x3e9686=>({'service':_0x3e9686['normalizedManifest']?.[_0x1f283d(0x18f)],'version':_0x3e9686[_0x1f283d(0x179)]?.['version'],'commandCount':_0x3e9686['normalizedManifest']?.[_0x1f283d(0x184)][_0x1f283d(0x18d)]??0x0,'errors':_0x3e9686['report'][_0x1f283d(0x189)]})),'errors':_0x58e05c['report']['errors'],'commandCount':_0x58e05c['normalizedManifest']?.['commands']['length']??0x0},'description':_0x1f283d(0x169)};},async 'execute'(_0x59c335){const _0x4f8d66=a64_0x40686e,_0x1281df=importServiceManifest(_0x59c335['str'](_0x4f8d66(0x194)));if(_0x1281df[_0x4f8d66(0x154)][_0x4f8d66(0x18d)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x1281df[_0x4f8d66(0x183)],'imported':_0x1281df[_0x4f8d66(0x15d)],'updated':_0x1281df[_0x4f8d66(0x155)],'serviceCount':_0x1281df[_0x4f8d66(0x18a)],'services':_0x1281df['entries']['map'](summarizeService)},'message':_0x4f8d66(0x174)+_0x1281df[_0x4f8d66(0x15d)]+_0x4f8d66(0x16c)+_0x1281df[_0x4f8d66(0x155)]+_0x4f8d66(0x191)};return{'ok':!![],'data':{'registryPath':_0x1281df[_0x4f8d66(0x183)],'replaced':_0x1281df[_0x4f8d66(0x193)],'imported':_0x1281df[_0x4f8d66(0x15d)],'updated':_0x1281df[_0x4f8d66(0x155)],'serviceCount':_0x1281df[_0x4f8d66(0x18a)],'service':summarizeService(_0x1281df[_0x4f8d66(0x18e)])},'message':(_0x1281df[_0x4f8d66(0x193)]?_0x4f8d66(0x167):'Imported')+_0x4f8d66(0x181)+_0x1281df[_0x4f8d66(0x18e)][_0x4f8d66(0x156)]+'.'};}},{'service':a64_0x40686e(0x18f),'command':a64_0x40686e(0x173),'description':a64_0x40686e(0x176),'risk':a64_0x40686e(0x15a),'confirmationDescription':a64_0x40686e(0x197),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x9cbcf3){const _0x242677=a64_0x40686e,_0x4fe01b=getLocalServiceEntry(_0x9cbcf3[_0x242677(0x182)](_0x242677(0x18f)));return{'method':_0x242677(0x153),'url':_0x9cbcf3[_0x242677(0x182)](_0x242677(0x194)),'body':{'service':_0x9cbcf3['str'](_0x242677(0x18f)),'found':Boolean(_0x4fe01b),'version':_0x4fe01b?.[_0x242677(0x190)],'source':_0x4fe01b?.[_0x242677(0x17f)]},'description':_0x242677(0x195)};},async 'execute'(_0x560800){const _0x4adab4=a64_0x40686e,_0x50f19b=exportServiceManifest(_0x560800[_0x4adab4(0x182)](_0x4adab4(0x18f)),_0x560800[_0x4adab4(0x182)]('file'));return{'ok':!![],'data':{'registryPath':_0x50f19b[_0x4adab4(0x183)],'file':_0x50f19b[_0x4adab4(0x16a)],'service':summarizeService(_0x50f19b[_0x4adab4(0x18e)])},'message':_0x4adab4(0x160)+_0x50f19b[_0x4adab4(0x18e)][_0x4adab4(0x156)]+'.'};}},{'service':a64_0x40686e(0x18f),'command':a64_0x40686e(0x180),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a64_0x40686e(0x16b),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x37ed14=a64_0x40686e,_0x188075=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x188075[_0x37ed14(0x18d)],'services':_0x188075[_0x37ed14(0x159)](summarizeService)}};}},{'service':'service','command':a64_0x40686e(0x175),'description':a64_0x40686e(0x14e),'risk':a64_0x40686e(0x15a),'confirmationDescription':a64_0x40686e(0x162),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x2dda5a){const _0x50dee9=a64_0x40686e,_0x25adeb=getLocalServiceEntry(_0x2dda5a['str'](_0x50dee9(0x18f)));return{'method':_0x50dee9(0x153),'url':getServiceRegistryPath(),'body':{'service':_0x2dda5a[_0x50dee9(0x182)]('service'),'found':Boolean(_0x25adeb),'version':_0x25adeb?.[_0x50dee9(0x190)],'source':_0x25adeb?.[_0x50dee9(0x17f)]},'description':_0x50dee9(0x168)};},async 'execute'(_0x4f138a){const _0x1d2ca2=a64_0x40686e,_0x5dcf40=removeServiceManifest(_0x4f138a[_0x1d2ca2(0x182)](_0x1d2ca2(0x18f)));return{'ok':!![],'data':{'registryPath':_0x5dcf40[_0x1d2ca2(0x183)],'serviceCount':_0x5dcf40[_0x1d2ca2(0x18a)],'service':summarizeService(_0x5dcf40[_0x1d2ca2(0x18e)])},'message':_0x1d2ca2(0x16d)+_0x5dcf40[_0x1d2ca2(0x18e)][_0x1d2ca2(0x156)]+'.'};}},{'service':a64_0x40686e(0x18f),'command':a64_0x40686e(0x186),'description':a64_0x40686e(0x177),'risk':a64_0x40686e(0x16b),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x2290e6){const _0x5e6405=a64_0x40686e,_0x24b6cd=getLocalServiceEntry(_0x2290e6[_0x5e6405(0x182)]('service'));if(!_0x24b6cd)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x2290e6[_0x5e6405(0x182)](_0x5e6405(0x18f))},'message':_0x5e6405(0x172)+_0x2290e6[_0x5e6405(0x182)](_0x5e6405(0x18f))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x24b6cd),'manifest':_0x24b6cd[_0x5e6405(0x16e)],'normalizedManifest':toPublicNormalizedServiceTree(_0x24b6cd[_0x5e6405(0x179)])}};}}];
1
+ function a64_0x30ec(){const _0x5ecade=['serviceCount','updated','registryPath','Imported','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','1701dcDbUx','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','source','string','hash','registry','19285700ARLKCm','remove','entries','cliPath','risk','Local\x20service\x20code,\x20for\x20example\x20crm','importedAt','serviceCode','\x20service(s),\x20updated\x20','read','str','Exported\x20service\x20','imported','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','list','map','7132572qDNzwD','Writes\x20the\x20local\x20Service\x20Tree\x20manifest\x20for\x20the\x20given\x20service\x20to\x20a\x20JSON\x20file.\x20An\x20existing\x20file\x20at\x20the\x20target\x20may\x20be\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','registryIndex','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','registryServiceCode','length','filePath','Updated','2733LijAuj','1122926iYcvDe','entry','target','version','errors','manifest','service','normalizedManifest','report','reduce','Removed\x20service\x20','kind','Imported\x20','162NOvhwP','export','import','flags','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','\x20service(s).','3826236HYuzPR','description','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Local\x20service\x20not\x20found:\x20','manifests','name','required','5cNuaDT','warnings','\x20service\x20','file','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','cliName','59992mefHxa','75809KUdrIv','WRITE','replaced','commands','write','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','lower\x20kebab-case\x20service\x20code'];a64_0x30ec=function(){return _0x5ecade;};return a64_0x30ec();}const a64_0x9e401d=a64_0x2a20;(function(_0x701c93,_0x5f3134){const _0x10b162=a64_0x2a20,_0x32983d=_0x701c93();while(!![]){try{const _0x2f9047=-parseInt(_0x10b162(0x107))/0x1+-parseInt(_0x10b162(0xf3))/0x2*(parseInt(_0x10b162(0xe5))/0x3)+-parseInt(_0x10b162(0xf9))/0x4+-parseInt(_0x10b162(0x100))/0x5*(-parseInt(_0x10b162(0xdc))/0x6)+parseInt(_0x10b162(0xe6))/0x7+parseInt(_0x10b162(0x106))/0x8*(-parseInt(_0x10b162(0x113))/0x9)+parseInt(_0x10b162(0xcc))/0xa;if(_0x2f9047===_0x5f3134)break;else _0x32983d['push'](_0x32983d['shift']());}catch(_0x44cee2){_0x32983d['push'](_0x32983d['shift']());}}}(a64_0x30ec,0xb8268));function a64_0x2a20(_0x495a82,_0x54f99e){_0x495a82=_0x495a82-0xcb;const _0x30ec77=a64_0x30ec();let _0x2a2050=_0x30ec77[_0x495a82];return _0x2a2050;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a64_0x9e401d(0x116),'required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':a64_0x9e401d(0xec),'type':a64_0x9e401d(0x116),'required':!![],'description':a64_0x9e401d(0xd1),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a64_0x9e401d(0x10d)}};function summarizeService(_0x439dde){const _0x48d70b=a64_0x9e401d;return{'serviceCode':_0x439dde['serviceCode'],'name':_0x439dde[_0x48d70b(0xed)][_0x48d70b(0xec)][_0x48d70b(0xfe)],'version':_0x439dde[_0x48d70b(0xe9)],'importedAt':_0x439dde[_0x48d70b(0xd2)],'source':_0x439dde[_0x48d70b(0x115)],'commandCount':_0x439dde[_0x48d70b(0xed)]['commands'][_0x48d70b(0xe2)],'commands':_0x439dde[_0x48d70b(0xed)][_0x48d70b(0x10a)][_0x48d70b(0xdb)](_0xc64dde=>({'path':_0xc64dde[_0x48d70b(0xcf)],'description':_0xc64dde[_0x48d70b(0xfa)],'risk':_0xc64dde['risk'],'target':toPublicServiceTreeTarget(_0xc64dde[_0x48d70b(0xe8)]),'flags':_0xc64dde[_0x48d70b(0xf6)][_0x48d70b(0xdb)](_0x2297d5=>({'name':_0x2297d5[_0x48d70b(0xfe)],'cliName':_0x2297d5[_0x48d70b(0x105)],'type':_0x2297d5['type'],'required':_0x2297d5[_0x48d70b(0xff)]===!![]}))}))};}function summarizeLoadedManifest(_0x36e929){const _0x10345a=a64_0x9e401d;return{'service':_0x36e929[_0x10345a(0xed)]?.[_0x10345a(0xec)],'version':_0x36e929[_0x10345a(0xed)]?.['version'],'commandCount':_0x36e929[_0x10345a(0xed)]?.[_0x10345a(0x10a)][_0x10345a(0xe2)]??0x0,'commands':_0x36e929['normalizedManifest']?.[_0x10345a(0x10a)]['map'](_0x146505=>({'path':_0x146505['cliPath'],'risk':_0x146505['risk'],'target':toPublicServiceTreeTarget(_0x146505[_0x10345a(0xe8)])}))??[],'registryIndex':_0x36e929[_0x10345a(0xde)],'registryServiceCode':_0x36e929[_0x10345a(0xe1)],'errors':_0x36e929['report'][_0x10345a(0xea)],'warnings':_0x36e929[_0x10345a(0xee)]['warnings']};}export const serviceDefinitions=[{'service':'service','command':'validate','description':a64_0x9e401d(0xfb),'risk':a64_0x9e401d(0xd5),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x14a44c){const _0x22c295=a64_0x9e401d,_0x4873e4=loadServiceManifestFromFile(_0x14a44c[_0x22c295(0xd6)]('file'));if(!_0x4873e4[_0x22c295(0xee)]['ok'])return{'ok':![],'data':{'file':_0x4873e4[_0x22c295(0xe3)],'hash':_0x4873e4[_0x22c295(0x117)],'kind':_0x4873e4[_0x22c295(0xf1)],'serviceCount':_0x4873e4[_0x22c295(0xfd)][_0x22c295(0xe2)],'services':_0x4873e4['manifests'][_0x22c295(0xdb)](summarizeLoadedManifest),'errors':_0x4873e4[_0x22c295(0xee)]['errors'],'warnings':_0x4873e4[_0x22c295(0xee)]['warnings']},'message':formatValidationFailure(_0x4873e4[_0x22c295(0xee)])};if(_0x4873e4[_0x22c295(0xf1)]===_0x22c295(0xcb)||_0x4873e4[_0x22c295(0xfd)][_0x22c295(0xe2)]!==0x1)return{'ok':!![],'data':{'file':_0x4873e4['filePath'],'hash':_0x4873e4[_0x22c295(0x117)],'kind':_0x4873e4[_0x22c295(0xf1)],'serviceCount':_0x4873e4[_0x22c295(0xfd)][_0x22c295(0xe2)],'commandCount':_0x4873e4[_0x22c295(0xfd)][_0x22c295(0xef)]((_0x37220b,_0x45779f)=>_0x37220b+(_0x45779f[_0x22c295(0xed)]?.['commands'][_0x22c295(0xe2)]??0x0),0x0),'services':_0x4873e4['manifests'][_0x22c295(0xdb)](summarizeLoadedManifest),'warnings':_0x4873e4[_0x22c295(0xee)][_0x22c295(0x101)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x4873e4[_0x22c295(0xe3)],'hash':_0x4873e4['hash'],'kind':_0x4873e4[_0x22c295(0xf1)],'service':_0x4873e4['normalizedManifest']?.[_0x22c295(0xec)],'version':_0x4873e4[_0x22c295(0xed)]?.[_0x22c295(0xe9)],'commandCount':_0x4873e4[_0x22c295(0xed)]?.[_0x22c295(0x10a)][_0x22c295(0xe2)]??0x0,'commands':_0x4873e4[_0x22c295(0xed)]?.['commands'][_0x22c295(0xdb)](_0x2ecc0a=>({'path':_0x2ecc0a[_0x22c295(0xcf)],'risk':_0x2ecc0a[_0x22c295(0xd0)],'target':toPublicServiceTreeTarget(_0x2ecc0a[_0x22c295(0xe8)])})),'warnings':_0x4873e4[_0x22c295(0xee)][_0x22c295(0x101)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a64_0x9e401d(0xec),'command':a64_0x9e401d(0xf5),'description':a64_0x9e401d(0x112),'risk':a64_0x9e401d(0x10b),'confirmationDescription':a64_0x9e401d(0xd9),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x47c469){const _0x95dfe6=a64_0x9e401d,_0x130574=loadServiceManifestFromFile(_0x47c469[_0x95dfe6(0xd6)]('file'));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x130574['filePath'],'hash':_0x130574[_0x95dfe6(0x117)],'kind':_0x130574[_0x95dfe6(0xf1)],'ok':_0x130574[_0x95dfe6(0xee)]['ok'],'service':_0x130574[_0x95dfe6(0xed)]?.[_0x95dfe6(0xec)],'version':_0x130574[_0x95dfe6(0xed)]?.[_0x95dfe6(0xe9)],'serviceCount':_0x130574[_0x95dfe6(0xfd)][_0x95dfe6(0xe2)],'services':_0x130574[_0x95dfe6(0xfd)]['map'](_0x478b97=>({'service':_0x478b97[_0x95dfe6(0xed)]?.[_0x95dfe6(0xec)],'version':_0x478b97[_0x95dfe6(0xed)]?.[_0x95dfe6(0xe9)],'commandCount':_0x478b97[_0x95dfe6(0xed)]?.[_0x95dfe6(0x10a)]['length']??0x0,'errors':_0x478b97['report'][_0x95dfe6(0xea)]})),'errors':_0x130574[_0x95dfe6(0xee)][_0x95dfe6(0xea)],'commandCount':_0x130574[_0x95dfe6(0xed)]?.[_0x95dfe6(0x10a)]['length']??0x0},'description':_0x95dfe6(0xe0)};},async 'execute'(_0x4a6ceb){const _0x4c7182=a64_0x9e401d,_0x47b38b=importServiceManifest(_0x4a6ceb['str']('file'));if(_0x47b38b[_0x4c7182(0xce)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x47b38b['registryPath'],'imported':_0x47b38b[_0x4c7182(0xd8)],'updated':_0x47b38b['updated'],'serviceCount':_0x47b38b[_0x4c7182(0x10e)],'services':_0x47b38b[_0x4c7182(0xce)][_0x4c7182(0xdb)](summarizeService)},'message':_0x4c7182(0xf2)+_0x47b38b['imported']+_0x4c7182(0xd4)+_0x47b38b['updated']+_0x4c7182(0xf8)};return{'ok':!![],'data':{'registryPath':_0x47b38b[_0x4c7182(0x110)],'replaced':_0x47b38b[_0x4c7182(0x109)],'imported':_0x47b38b[_0x4c7182(0xd8)],'updated':_0x47b38b[_0x4c7182(0x10f)],'serviceCount':_0x47b38b['serviceCount'],'service':summarizeService(_0x47b38b[_0x4c7182(0xe7)])},'message':(_0x47b38b['replaced']?_0x4c7182(0xe4):_0x4c7182(0x111))+_0x4c7182(0x102)+_0x47b38b[_0x4c7182(0xe7)][_0x4c7182(0xd3)]+'.'};}},{'service':a64_0x9e401d(0xec),'command':a64_0x9e401d(0xf4),'description':a64_0x9e401d(0xf7),'risk':'write','confirmationDescription':a64_0x9e401d(0xdd),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x4bd9de){const _0xd9b8c8=a64_0x9e401d,_0xc43131=getLocalServiceEntry(_0x4bd9de[_0xd9b8c8(0xd6)]('service'));return{'method':_0xd9b8c8(0x108),'url':_0x4bd9de['str'](_0xd9b8c8(0x103)),'body':{'service':_0x4bd9de[_0xd9b8c8(0xd6)](_0xd9b8c8(0xec)),'found':Boolean(_0xc43131),'version':_0xc43131?.[_0xd9b8c8(0xe9)],'source':_0xc43131?.[_0xd9b8c8(0x115)]},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x25e1a0){const _0xd8f757=a64_0x9e401d,_0x3200d9=exportServiceManifest(_0x25e1a0[_0xd8f757(0xd6)]('service'),_0x25e1a0[_0xd8f757(0xd6)](_0xd8f757(0x103)));return{'ok':!![],'data':{'registryPath':_0x3200d9['registryPath'],'file':_0x3200d9[_0xd8f757(0xe3)],'service':summarizeService(_0x3200d9['entry'])},'message':_0xd8f757(0xd7)+_0x3200d9[_0xd8f757(0xe7)]['serviceCode']+'.'};}},{'service':'service','command':a64_0x9e401d(0xda),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x1e0d0a=a64_0x9e401d,_0x50836c=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x50836c['length'],'services':_0x50836c[_0x1e0d0a(0xdb)](summarizeService)}};}},{'service':a64_0x9e401d(0xec),'command':a64_0x9e401d(0xcd),'description':a64_0x9e401d(0x10c),'risk':a64_0x9e401d(0x10b),'confirmationDescription':a64_0x9e401d(0x114),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0xb0da2a){const _0x80ede9=a64_0x9e401d,_0x246ab3=getLocalServiceEntry(_0xb0da2a[_0x80ede9(0xd6)](_0x80ede9(0xec)));return{'method':_0x80ede9(0x108),'url':getServiceRegistryPath(),'body':{'service':_0xb0da2a['str'](_0x80ede9(0xec)),'found':Boolean(_0x246ab3),'version':_0x246ab3?.['version'],'source':_0x246ab3?.[_0x80ede9(0x115)]},'description':_0x80ede9(0x104)};},async 'execute'(_0x10c32f){const _0x553afd=a64_0x9e401d,_0x1b2b65=removeServiceManifest(_0x10c32f[_0x553afd(0xd6)](_0x553afd(0xec)));return{'ok':!![],'data':{'registryPath':_0x1b2b65[_0x553afd(0x110)],'serviceCount':_0x1b2b65['serviceCount'],'service':summarizeService(_0x1b2b65[_0x553afd(0xe7)])},'message':_0x553afd(0xf0)+_0x1b2b65['entry'][_0x553afd(0xd3)]+'.'};}},{'service':'service','command':'detail','description':a64_0x9e401d(0xdf),'risk':a64_0x9e401d(0xd5),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x30db27){const _0xb05b81=a64_0x9e401d,_0xcc19b0=getLocalServiceEntry(_0x30db27['str'](_0xb05b81(0xec)));if(!_0xcc19b0)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x30db27[_0xb05b81(0xd6)](_0xb05b81(0xec))},'message':_0xb05b81(0xfc)+_0x30db27[_0xb05b81(0xd6)](_0xb05b81(0xec))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0xcc19b0),'manifest':_0xcc19b0[_0xb05b81(0xeb)],'normalizedManifest':toPublicNormalizedServiceTree(_0xcc19b0[_0xb05b81(0xed)])}};}}];
@@ -1 +1 @@
1
- (function(_0x18fef3,_0x3ec6da){const _0x1e30ff=a65_0x3123,_0x2212a3=_0x18fef3();while(!![]){try{const _0x47fb82=parseInt(_0x1e30ff(0x1b0))/0x1*(-parseInt(_0x1e30ff(0x1b6))/0x2)+-parseInt(_0x1e30ff(0x182))/0x3*(-parseInt(_0x1e30ff(0x17c))/0x4)+parseInt(_0x1e30ff(0x1c5))/0x5+parseInt(_0x1e30ff(0x174))/0x6+-parseInt(_0x1e30ff(0x190))/0x7+parseInt(_0x1e30ff(0x1bc))/0x8+parseInt(_0x1e30ff(0x1ad))/0x9;if(_0x47fb82===_0x3ec6da)break;else _0x2212a3['push'](_0x2212a3['shift']());}catch(_0x233736){_0x2212a3['push'](_0x2212a3['shift']());}}}(a65_0x17fd,0x4b901));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a65_0x3123(_0x473275,_0x5f9c66){_0x473275=_0x473275-0x173;const _0x17fd29=a65_0x17fd();let _0x31236e=_0x17fd29[_0x473275];return _0x31236e;}import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x2409e6={}){const _0x2c9121=a65_0x3123;return resolve(_0x2409e6[_0x2c9121(0x1a6)]??homedir(),PRODUCT_CONFIG[_0x2c9121(0x195)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x460410={}){const _0x1ad8b4=a65_0x3123,_0x34af07=getServiceRegistryPath(_0x460410);if(!existsSync(_0x34af07))return emptyServiceRegistry();try{const _0x50765f=readFileSync(_0x34af07,_0x1ad8b4(0x199));if(!_0x50765f[_0x1ad8b4(0x1ac)]())return emptyServiceRegistry();const _0x17e825=JSON[_0x1ad8b4(0x1b4)](_0x50765f);if(_0x17e825[_0x1ad8b4(0x19f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x1ad8b4(0x1a2)](_0x1ad8b4(0x183)+String(_0x17e825[_0x1ad8b4(0x19f)]),_0x1ad8b4(0x1c2)+_0x34af07+'.');if(!Array[_0x1ad8b4(0x189)](_0x17e825['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x17e825[_0x1ad8b4(0x1ab)],'services':_0x17e825[_0x1ad8b4(0x1c0)]};}catch(_0x147ad0){if(_0x147ad0 instanceof Error&&_0x147ad0[_0x1ad8b4(0x1c6)]==='CliError')throw _0x147ad0;throw CliErrors[_0x1ad8b4(0x1a2)](_0x1ad8b4(0x17d)+_0x34af07,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x5205af,_0x40fb45={}){const _0x14f01c=a65_0x3123,_0x1f60e5=getServiceRegistryPath(_0x40fb45),_0x7063a7=dirname(_0x1f60e5);!existsSync(_0x7063a7)&&mkdirSync(_0x7063a7,{'recursive':!![]});const _0x99aeea=_0x1f60e5+'.tmp';try{writeFileSync(_0x99aeea,JSON[_0x14f01c(0x1a7)](_0x5205af,null,0x2)+'\x0a',{'encoding':_0x14f01c(0x199),'mode':0x180}),renameSync(_0x99aeea,_0x1f60e5);}catch(_0x2af52a){try{unlinkSync(_0x99aeea);}catch{}if(_0x2af52a?.[_0x14f01c(0x1b1)]===_0x14f01c(0x1b3))throw CliErrors[_0x14f01c(0x1a2)](_0x14f01c(0x1c7)+_0x1f60e5);throw _0x2af52a;}return _0x1f60e5;}export function loadServiceManifestFromFile(_0x5eaa13){const _0x3b4e8e=a65_0x3123,_0xe2ea67=resolve(_0x5eaa13);if(!existsSync(_0xe2ea67))throw CliErrors[_0x3b4e8e(0x1a2)](_0x3b4e8e(0x17e)+_0x5eaa13);let _0x5de86f;const _0x3537ee=readFileSync(_0xe2ea67,_0x3b4e8e(0x199));try{_0x5de86f=JSON[_0x3b4e8e(0x1b4)](_0x3537ee);}catch{throw CliErrors[_0x3b4e8e(0x1a2)](_0x3b4e8e(0x1a8)+_0x5eaa13,_0x3b4e8e(0x179));}const _0x253962=sha256(_0x3537ee),_0x3cc0b1=extractLoadedServiceManifests(_0x5de86f,_0x253962),_0x4d7012=aggregateValidationReports(_0x3cc0b1),_0x5c419b=_0x3cc0b1[0x0];return{'filePath':_0xe2ea67,'hash':_0x253962,'kind':isServiceRegistryLike(_0x5de86f)?_0x3b4e8e(0x18f):'manifest','manifest':_0x5c419b?.[_0x3b4e8e(0x18c)]??_0x5de86f,'report':_0x4d7012,'normalizedManifest':_0x3cc0b1[_0x3b4e8e(0x1b2)]===0x1?_0x5c419b?.[_0x3b4e8e(0x184)]:undefined,'manifests':_0x3cc0b1};}export function importServiceManifest(_0x3c1b14,_0x1be9e8={}){const _0x4d9dbc=a65_0x3123,_0x102f9b=loadServiceManifestFromFile(_0x3c1b14);if(!_0x102f9b[_0x4d9dbc(0x1aa)]['ok'])throw CliErrors[_0x4d9dbc(0x1a2)](formatValidationFailure(_0x102f9b['report']),_0x4d9dbc(0x19d));if(_0x102f9b['manifests'][_0x4d9dbc(0x1b2)]===0x0)throw CliErrors[_0x4d9dbc(0x1a2)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x4d9dbc(0x1ae));const _0x57604a=readServiceRegistry(_0x1be9e8),_0x121790=(_0x1be9e8[_0x4d9dbc(0x1a4)]??(()=>new Date()))()[_0x4d9dbc(0x187)](),_0x2d4b07=[];let _0x1c261a=0x0,_0x4b3807=0x0;for(const _0x404c70 of _0x102f9b[_0x4d9dbc(0x178)]){if(!_0x404c70[_0x4d9dbc(0x184)])continue;const _0x24514e=_0x404c70['normalizedManifest'][_0x4d9dbc(0x1b5)][_0x4d9dbc(0x1b1)],_0x4a4432={'serviceCode':_0x24514e,'version':_0x404c70[_0x4d9dbc(0x184)][_0x4d9dbc(0x19c)],'importedAt':_0x121790,'source':{'type':_0x4d9dbc(0x1c4),'path':_0x102f9b[_0x4d9dbc(0x1a1)],'hash':_0x404c70[_0x4d9dbc(0x1af)]},'manifest':_0x404c70['manifest'],'normalizedManifest':_0x404c70[_0x4d9dbc(0x184)]},_0x294f2e=_0x57604a[_0x4d9dbc(0x1c0)][_0x4d9dbc(0x17f)](_0x174938=>_0x174938[_0x4d9dbc(0x1c9)]===_0x24514e);_0x294f2e>=0x0?(_0x57604a[_0x4d9dbc(0x1c0)][_0x294f2e]=_0x4a4432,_0x4b3807++):(_0x57604a['services']['push'](_0x4a4432),_0x1c261a++),_0x2d4b07[_0x4d9dbc(0x1c8)](_0x4a4432);}_0x57604a[_0x4d9dbc(0x1c0)][_0x4d9dbc(0x1a3)]((_0x419050,_0x4ea05a)=>_0x419050[_0x4d9dbc(0x1c9)][_0x4d9dbc(0x173)](_0x4ea05a[_0x4d9dbc(0x1c9)])),_0x57604a[_0x4d9dbc(0x1ab)]=_0x121790;const _0x5bc734=writeServiceRegistry(_0x57604a,_0x1be9e8);return{'registryPath':_0x5bc734,'entry':_0x2d4b07[0x0],'replaced':_0x2d4b07[_0x4d9dbc(0x1b2)]===0x1?_0x4b3807===0x1:_0x4b3807>0x0,'entries':_0x2d4b07,'imported':_0x1c261a,'updated':_0x4b3807,'serviceCount':_0x57604a['services'][_0x4d9dbc(0x1b2)]};}export function exportServiceManifest(_0x234ada,_0x16283b,_0x25fc0c={}){const _0x55a8a9=a65_0x3123,_0xc191f6=getServiceRegistryPath(_0x25fc0c),_0x45d8a9=getLocalServiceEntry(_0x234ada,_0x25fc0c);if(!_0x45d8a9)throw CliErrors['validation'](_0x55a8a9(0x1b9)+_0x234ada,_0x55a8a9(0x1c1));const _0x34587d=resolve(_0x16283b),_0x3262e6=dirname(_0x34587d);return!existsSync(_0x3262e6)&&mkdirSync(_0x3262e6,{'recursive':!![]}),writeFileSync(_0x34587d,JSON[_0x55a8a9(0x1a7)](_0x45d8a9[_0x55a8a9(0x18c)],null,0x2)+'\x0a',{'encoding':_0x55a8a9(0x199),'mode':0x180}),{'registryPath':_0xc191f6,'filePath':_0x34587d,'entry':_0x45d8a9};}export function removeServiceManifest(_0xa22750,_0x291674={}){const _0x39715e=a65_0x3123,_0x444c2e=readServiceRegistry(_0x291674),_0x483904=_0xa22750['trim'](),_0x3444b2=_0x444c2e[_0x39715e(0x1c0)][_0x39715e(0x17f)](_0x68ceba=>_0x68ceba[_0x39715e(0x1c9)]===_0x483904);if(_0x3444b2<0x0)throw CliErrors['validation'](_0x39715e(0x1b9)+_0x483904,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x256d81]=_0x444c2e[_0x39715e(0x1c0)][_0x39715e(0x18b)](_0x3444b2,0x1),_0x411a4c=(_0x291674['now']??(()=>new Date()))()[_0x39715e(0x187)]();_0x444c2e[_0x39715e(0x1ab)]=_0x411a4c;const _0x24902d=writeServiceRegistry(_0x444c2e,_0x291674);return{'registryPath':_0x24902d,'entry':_0x256d81,'serviceCount':_0x444c2e['services'][_0x39715e(0x1b2)]};}export function listLocalServices(_0x5f28e1={}){const _0x403d51=a65_0x3123;return readServiceRegistry(_0x5f28e1)[_0x403d51(0x1c0)];}export function getLocalServiceEntry(_0x36c5a3,_0x5ea5b1={}){const _0x119f50=a65_0x3123;return readServiceRegistry(_0x5ea5b1)['services'][_0x119f50(0x198)](_0x929b45=>_0x929b45[_0x119f50(0x1c9)]===_0x36c5a3[_0x119f50(0x1ac)]());}export function listLocalServiceTrees(_0x253dc4={}){const _0x193e2b=a65_0x3123;return readServiceRegistry(_0x253dc4)[_0x193e2b(0x1c0)][_0x193e2b(0x17a)](_0x9a7c76=>_0x9a7c76[_0x193e2b(0x184)]);}export function inspectServiceRegistry(_0x4b5c72={}){const _0x56861b=a65_0x3123,_0x5bd38d=getServiceRegistryPath(_0x4b5c72);if(!existsSync(_0x5bd38d))return emptyServiceRegistryInspection(_0x5bd38d,_0x56861b(0x1bf),![]);try{const _0x4567a3=readFileSync(_0x5bd38d,_0x56861b(0x199));if(!_0x4567a3['trim']())return emptyServiceRegistryInspection(_0x5bd38d,'empty',!![]);const _0x1647c0=JSON[_0x56861b(0x1b4)](_0x4567a3);if(_0x1647c0[_0x56861b(0x19f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x5bd38d,'invalid',!![]),'schemaVersion':_0x1647c0[_0x56861b(0x19f)],'message':_0x56861b(0x19e)+String(_0x1647c0[_0x56861b(0x19f)])};if(!Array[_0x56861b(0x189)](_0x1647c0[_0x56861b(0x1c0)]))return{...emptyServiceRegistryInspection(_0x5bd38d,_0x56861b(0x197),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1647c0[_0x56861b(0x1ab)],'message':_0x56861b(0x185)};const _0x3e54e1=_0x1647c0[_0x56861b(0x1c0)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x5bd38d,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1647c0[_0x56861b(0x1ab)],'serviceCount':_0x3e54e1[_0x56861b(0x1b2)],'commandCount':_0x3e54e1[_0x56861b(0x1a9)]((_0x330825,_0x16f3a7)=>_0x330825+_0x16f3a7['commandCount'],0x0),'services':_0x3e54e1};}catch(_0xa9e599){return{...emptyServiceRegistryInspection(_0x5bd38d,_0x56861b(0x197),!![]),'message':_0xa9e599 instanceof Error?_0xa9e599['message']:String(_0xa9e599)};}}export function formatValidationFailure(_0x48b895){const _0xb2c3d=a65_0x3123,_0x4268af=_0x48b895['errors'][_0xb2c3d(0x17a)](_0x9ea281=>_0x9ea281[_0xb2c3d(0x191)]+':\x20'+_0x9ea281[_0xb2c3d(0x1be)]);return _0xb2c3d(0x1b8)+_0x4268af[_0xb2c3d(0x181)]('\x0a');}function extractLoadedServiceManifests(_0x1db92d,_0x1c8176){const _0x3a93e7=a65_0x3123;if(!isServiceRegistryLike(_0x1db92d)){const _0x4f8e9e=_0x1db92d,{manifest:_0x2328fb,errors:_0x2f94c8}=adaptServiceTreeManifestForLegacyFramework(_0x4f8e9e),_0x287cd2=validateServiceTreeManifest(_0x2328fb),_0x495bdb=mergeValidationErrors(_0x287cd2,_0x2f94c8);return[{'manifest':_0x4f8e9e,'report':_0x495bdb,'normalizedManifest':_0x495bdb['ok']?normalizeServiceTreeManifest(_0x2328fb):undefined,'sourceHash':_0x1c8176}];}return _0x1db92d[_0x3a93e7(0x1c0)][_0x3a93e7(0x17a)]((_0x11281,_0x3e3a9c)=>{const _0x1ae6ba=_0x3a93e7,_0x5cbc0d=isObjectRecord(_0x11281)?_0x11281[_0x1ae6ba(0x18c)]:undefined,{manifest:_0x29c402,errors:_0x3e964d}=adaptServiceTreeManifestForLegacyFramework(_0x5cbc0d),_0x7a901=validateServiceTreeManifest(_0x29c402),_0x22b7a7=mergeValidationErrors(_0x7a901,_0x3e964d),_0x20091d=isObjectRecord(_0x11281)&&typeof _0x11281[_0x1ae6ba(0x1c9)]==='string'?_0x11281[_0x1ae6ba(0x1c9)]:undefined;return{'manifest':_0x5cbc0d,'report':_0x22b7a7,'normalizedManifest':_0x22b7a7['ok']?normalizeServiceTreeManifest(_0x29c402):undefined,'sourceHash':sha256(JSON[_0x1ae6ba(0x1a7)](_0x5cbc0d,null,0x2)+'\x0a'),'registryIndex':_0x3e3a9c,'registryServiceCode':_0x20091d};});}function a65_0x17fd(){const _0xd1d005=['cliPath','330464onbjVt','update','message','missing','services','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Remove\x20or\x20migrate\x20','startsWith','file','2151180KMsgrT','name','Cannot\x20write\x20service\x20registry:\x20','push','serviceCode','localeCompare','1352610WjAwhu','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','commands','].manifest.','manifests','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','map','risk','278612ODndvG','Invalid\x20service\x20registry\x20JSON:\x20','Service\x20manifest\x20file\x20not\x20found:\x20','findIndex','command','join','3NVtFsf','Unsupported\x20service\x20registry\x20schemaVersion:\x20','normalizedManifest','services\x20must\x20be\x20an\x20array','registryIndex','toISOString','kind','isArray','importedAt','splice','manifest','description','errors','registry','2023189AkzZNq','path','slice','warnings','].manifest','homeDirName','flatMap','invalid','find','utf8','object','bff\x20target\x20requires\x20functionName.','version','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','Unsupported\x20schemaVersion:\x20','schemaVersion','$.services[','filePath','validation','sort','now','digest','homeDir','stringify','Invalid\x20service\x20manifest\x20JSON:\x20','reduce','report','updatedAt','trim','123741XeIMBN','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','sourceHash','1JnhfjP','code','length','ENOENT','parse','service','363698WVXVxS','sha256','Service\x20manifest\x20validation\x20failed:\x0a','Local\x20service\x20not\x20found:\x20','target'];a65_0x17fd=function(){return _0xd1d005;};return a65_0x17fd();}function mergeValidationErrors(_0x1f016b,_0x4e5537){const _0x792155=a65_0x3123,_0x562301=_0x1f016b[_0x792155(0x18e)]['map'](_0x9a91db=>_0x9a91db['message']===_0x792155(0x175)?{..._0x9a91db,'message':_0x792155(0x19b)}:_0x9a91db),_0x2db628=[..._0x4e5537,..._0x562301];return{'ok':_0x2db628[_0x792155(0x1b2)]===0x0,'errors':_0x2db628,'warnings':_0x1f016b[_0x792155(0x193)]};}function aggregateValidationReports(_0x607a12){const _0x48b1c6=a65_0x3123,_0x57c858=_0x607a12[_0x48b1c6(0x196)](_0x28d2c6=>_0x28d2c6[_0x48b1c6(0x186)]===undefined?_0x28d2c6[_0x48b1c6(0x1aa)]['errors']:_0x28d2c6[_0x48b1c6(0x1aa)][_0x48b1c6(0x18e)][_0x48b1c6(0x17a)](_0x39ab32=>({..._0x39ab32,'path':prefixRegistryIssuePath(_0x28d2c6[_0x48b1c6(0x186)],_0x39ab32[_0x48b1c6(0x191)])}))),_0x20806f=_0x607a12[_0x48b1c6(0x196)](_0x2bc2aa=>_0x2bc2aa[_0x48b1c6(0x186)]===undefined?_0x2bc2aa[_0x48b1c6(0x1aa)][_0x48b1c6(0x193)]:_0x2bc2aa[_0x48b1c6(0x1aa)]['warnings']['map'](_0x1cd2f5=>({..._0x1cd2f5,'path':prefixRegistryIssuePath(_0x2bc2aa[_0x48b1c6(0x186)],_0x1cd2f5[_0x48b1c6(0x191)])})));return{'ok':_0x57c858[_0x48b1c6(0x1b2)]===0x0,'errors':_0x57c858,'warnings':_0x20806f};}function prefixRegistryIssuePath(_0x58258c,_0xaa907d){const _0x9b350c=a65_0x3123;if(_0xaa907d==='$')return _0x9b350c(0x1a0)+_0x58258c+'].manifest';if(_0xaa907d[_0x9b350c(0x1c3)]('$.'))return _0x9b350c(0x1a0)+_0x58258c+'].manifest'+_0xaa907d[_0x9b350c(0x192)](0x1);if(_0xaa907d[_0x9b350c(0x1c3)]('$['))return _0x9b350c(0x1a0)+_0x58258c+_0x9b350c(0x194)+_0xaa907d['slice'](0x1);return _0x9b350c(0x1a0)+_0x58258c+_0x9b350c(0x177)+_0xaa907d;}function isServiceRegistryLike(_0x49bfbe){const _0x5e9f63=a65_0x3123;return isObjectRecord(_0x49bfbe)&&_0x49bfbe['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x49bfbe[_0x5e9f63(0x1c0)]);}function isObjectRecord(_0x2bcbe9){const _0x93f8de=a65_0x3123;return Boolean(_0x2bcbe9)&&typeof _0x2bcbe9===_0x93f8de(0x19a)&&!Array[_0x93f8de(0x189)](_0x2bcbe9);}function emptyServiceRegistryInspection(_0x2df677,_0x1cdae3,_0x2af5b8){return{'registryPath':_0x2df677,'exists':_0x2af5b8,'status':_0x1cdae3,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x159935){const _0x441169=a65_0x3123,_0x36e5fe=_0x159935[_0x441169(0x184)],_0x25047a=_0x36e5fe[_0x441169(0x176)]['map'](_0x52d1dc=>({'path':_0x52d1dc[_0x441169(0x1bb)],'description':_0x52d1dc[_0x441169(0x18d)],'risk':_0x52d1dc[_0x441169(0x17b)],'targetKind':_0x52d1dc[_0x441169(0x1ba)][_0x441169(0x188)],'targetCommand':_0x52d1dc['target'][_0x441169(0x180)]}));return{'serviceCode':_0x159935[_0x441169(0x1c9)],'name':_0x36e5fe[_0x441169(0x1b5)][_0x441169(0x1c6)],'description':_0x36e5fe[_0x441169(0x1b5)][_0x441169(0x18d)],'version':_0x159935[_0x441169(0x19c)],'importedAt':_0x159935[_0x441169(0x18a)],'source':_0x159935['source'],'commandCount':_0x25047a[_0x441169(0x1b2)],'commands':_0x25047a};}function sha256(_0x3d50f5){const _0x77c879=a65_0x3123;return createHash(_0x77c879(0x1b7))[_0x77c879(0x1bd)](_0x3d50f5)[_0x77c879(0x1a5)]('hex');}
1
+ const a65_0x3c8b72=a65_0x1675;(function(_0x4b86d5,_0x50365d){const _0x3a15f4=a65_0x1675,_0x5bfcf6=_0x4b86d5();while(!![]){try{const _0x26d529=-parseInt(_0x3a15f4(0xd2))/0x1+parseInt(_0x3a15f4(0xd0))/0x2+-parseInt(_0x3a15f4(0xcc))/0x3+-parseInt(_0x3a15f4(0xea))/0x4+-parseInt(_0x3a15f4(0xd6))/0x5+-parseInt(_0x3a15f4(0xc5))/0x6+parseInt(_0x3a15f4(0xe5))/0x7;if(_0x26d529===_0x50365d)break;else _0x5bfcf6['push'](_0x5bfcf6['shift']());}catch(_0x2cafe5){_0x5bfcf6['push'](_0x5bfcf6['shift']());}}}(a65_0x1167,0xdce7b));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a65_0x3c8b72(0xbc);export function getServiceRegistryPath(_0x2aa3ee={}){const _0x43da64=a65_0x3c8b72;return resolve(_0x2aa3ee[_0x43da64(0xba)]??homedir(),PRODUCT_CONFIG[_0x43da64(0xf9)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x1c7a39={}){const _0x1c99a7=a65_0x3c8b72,_0xb93e25=getServiceRegistryPath(_0x1c7a39);if(!existsSync(_0xb93e25))return emptyServiceRegistry();try{const _0x45ab66=readFileSync(_0xb93e25,_0x1c99a7(0xe3));if(!_0x45ab66[_0x1c99a7(0xf8)]())return emptyServiceRegistry();const _0x15d1e0=JSON['parse'](_0x45ab66);if(_0x15d1e0[_0x1c99a7(0xdb)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x1c99a7(0xe9)](_0x1c99a7(0xee)+String(_0x15d1e0[_0x1c99a7(0xdb)]),_0x1c99a7(0xce)+_0xb93e25+'.');if(!Array[_0x1c99a7(0x105)](_0x15d1e0[_0x1c99a7(0xff)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x15d1e0[_0x1c99a7(0x102)],'services':_0x15d1e0[_0x1c99a7(0xff)]};}catch(_0x5b81d1){if(_0x5b81d1 instanceof Error&&_0x5b81d1[_0x1c99a7(0xe8)]==='CliError')throw _0x5b81d1;throw CliErrors['validation'](_0x1c99a7(0xfd)+_0xb93e25,_0x1c99a7(0xca));}}export function writeServiceRegistry(_0x5b73ac,_0x463a61={}){const _0x50fc9b=a65_0x3c8b72,_0x362535=getServiceRegistryPath(_0x463a61),_0x517ccf=dirname(_0x362535);!existsSync(_0x517ccf)&&mkdirSync(_0x517ccf,{'recursive':!![]});const _0x28bc79=_0x362535+_0x50fc9b(0xe4);try{writeFileSync(_0x28bc79,JSON[_0x50fc9b(0x109)](_0x5b73ac,null,0x2)+'\x0a',{'encoding':_0x50fc9b(0xe3),'mode':0x180}),renameSync(_0x28bc79,_0x362535);}catch(_0x462fe3){try{unlinkSync(_0x28bc79);}catch{}if(_0x462fe3?.[_0x50fc9b(0xc0)]===_0x50fc9b(0xbb))throw CliErrors[_0x50fc9b(0xe9)]('Cannot\x20write\x20service\x20registry:\x20'+_0x362535);throw _0x462fe3;}return _0x362535;}export function loadServiceManifestFromFile(_0x55760e){const _0x5e6f96=a65_0x3c8b72,_0x1b8be6=resolve(_0x55760e);if(!existsSync(_0x1b8be6))throw CliErrors[_0x5e6f96(0xe9)](_0x5e6f96(0xf0)+_0x55760e);let _0x58dd81;const _0x2f3876=readFileSync(_0x1b8be6,_0x5e6f96(0xe3));try{_0x58dd81=JSON[_0x5e6f96(0xc8)](_0x2f3876);}catch{throw CliErrors[_0x5e6f96(0xe9)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x55760e,_0x5e6f96(0xc1));}const _0x334b23=sha256(_0x2f3876),_0x2264e7=extractLoadedServiceManifests(_0x58dd81,_0x334b23),_0x565a18=aggregateValidationReports(_0x2264e7),_0x2c5537=_0x2264e7[0x0];return{'filePath':_0x1b8be6,'hash':_0x334b23,'kind':isServiceRegistryLike(_0x58dd81)?_0x5e6f96(0xc3):_0x5e6f96(0xfa),'manifest':_0x2c5537?.[_0x5e6f96(0xfa)]??_0x58dd81,'report':_0x565a18,'normalizedManifest':_0x2264e7[_0x5e6f96(0x101)]===0x1?_0x2c5537?.['normalizedManifest']:undefined,'manifests':_0x2264e7};}export function importServiceManifest(_0x49e17c,_0x4c88a7={}){const _0x1fa27d=a65_0x3c8b72,_0x58e6c0=loadServiceManifestFromFile(_0x49e17c);if(!_0x58e6c0[_0x1fa27d(0x104)]['ok'])throw CliErrors[_0x1fa27d(0xe9)](formatValidationFailure(_0x58e6c0[_0x1fa27d(0x104)]),_0x1fa27d(0xf5));if(_0x58e6c0[_0x1fa27d(0xdf)][_0x1fa27d(0x101)]===0x0)throw CliErrors[_0x1fa27d(0xe9)](_0x1fa27d(0x107),_0x1fa27d(0xf3));const _0x4a9995=readServiceRegistry(_0x4c88a7),_0x398f5e=(_0x4c88a7['now']??(()=>new Date()))()[_0x1fa27d(0xe6)](),_0x3167aa=[];let _0x7f54e1=0x0,_0x302c4e=0x0;for(const _0x5a0709 of _0x58e6c0[_0x1fa27d(0xdf)]){if(!_0x5a0709[_0x1fa27d(0xbd)])continue;const _0x3958de=_0x5a0709['normalizedManifest'][_0x1fa27d(0xe7)][_0x1fa27d(0xc0)],_0x4d35ae={'serviceCode':_0x3958de,'version':_0x5a0709[_0x1fa27d(0xbd)][_0x1fa27d(0xc6)],'importedAt':_0x398f5e,'source':{'type':_0x1fa27d(0xbf),'path':_0x58e6c0['filePath'],'hash':_0x5a0709['sourceHash']},'manifest':_0x5a0709['manifest'],'normalizedManifest':_0x5a0709[_0x1fa27d(0xbd)]},_0x37c3e7=_0x4a9995[_0x1fa27d(0xff)][_0x1fa27d(0xd4)](_0x147f33=>_0x147f33['serviceCode']===_0x3958de);_0x37c3e7>=0x0?(_0x4a9995['services'][_0x37c3e7]=_0x4d35ae,_0x302c4e++):(_0x4a9995[_0x1fa27d(0xff)][_0x1fa27d(0xf1)](_0x4d35ae),_0x7f54e1++),_0x3167aa[_0x1fa27d(0xf1)](_0x4d35ae);}_0x4a9995[_0x1fa27d(0xff)]['sort']((_0x4cae27,_0x1be729)=>_0x4cae27[_0x1fa27d(0xb9)][_0x1fa27d(0xed)](_0x1be729[_0x1fa27d(0xb9)])),_0x4a9995[_0x1fa27d(0x102)]=_0x398f5e;const _0xa3843a=writeServiceRegistry(_0x4a9995,_0x4c88a7);return{'registryPath':_0xa3843a,'entry':_0x3167aa[0x0],'replaced':_0x3167aa[_0x1fa27d(0x101)]===0x1?_0x302c4e===0x1:_0x302c4e>0x0,'entries':_0x3167aa,'imported':_0x7f54e1,'updated':_0x302c4e,'serviceCount':_0x4a9995[_0x1fa27d(0xff)][_0x1fa27d(0x101)]};}function a65_0x1675(_0x1caed7,_0x122240){_0x1caed7=_0x1caed7-0xb9;const _0x116712=a65_0x1167();let _0x167567=_0x116712[_0x1caed7];return _0x167567;}export function exportServiceManifest(_0x5d58df,_0x5f29e8,_0x16be6e={}){const _0x4c8277=a65_0x3c8b72,_0x35473d=getServiceRegistryPath(_0x16be6e),_0x450cf2=getLocalServiceEntry(_0x5d58df,_0x16be6e);if(!_0x450cf2)throw CliErrors[_0x4c8277(0xe9)](_0x4c8277(0xcf)+_0x5d58df,_0x4c8277(0xe2));const _0x31e4f9=resolve(_0x5f29e8),_0x44975a=dirname(_0x31e4f9);return!existsSync(_0x44975a)&&mkdirSync(_0x44975a,{'recursive':!![]}),writeFileSync(_0x31e4f9,JSON[_0x4c8277(0x109)](_0x450cf2[_0x4c8277(0xfa)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x35473d,'filePath':_0x31e4f9,'entry':_0x450cf2};}export function removeServiceManifest(_0x41482d,_0x6cf9cb={}){const _0x4a835c=a65_0x3c8b72,_0x36fa5c=readServiceRegistry(_0x6cf9cb),_0x35b2ee=_0x41482d[_0x4a835c(0xf8)](),_0x2c8182=_0x36fa5c['services']['findIndex'](_0x27f7c4=>_0x27f7c4[_0x4a835c(0xb9)]===_0x35b2ee);if(_0x2c8182<0x0)throw CliErrors[_0x4a835c(0xe9)](_0x4a835c(0xcf)+_0x35b2ee,_0x4a835c(0xe2));const [_0x434519]=_0x36fa5c[_0x4a835c(0xff)][_0x4a835c(0xfc)](_0x2c8182,0x1),_0x582761=(_0x6cf9cb['now']??(()=>new Date()))()['toISOString']();_0x36fa5c[_0x4a835c(0x102)]=_0x582761;const _0x5e11ba=writeServiceRegistry(_0x36fa5c,_0x6cf9cb);return{'registryPath':_0x5e11ba,'entry':_0x434519,'serviceCount':_0x36fa5c[_0x4a835c(0xff)]['length']};}export function listLocalServices(_0x23e7e0={}){return readServiceRegistry(_0x23e7e0)['services'];}export function getLocalServiceEntry(_0x30b4cd,_0x33aea4={}){const _0x90f362=a65_0x3c8b72;return readServiceRegistry(_0x33aea4)[_0x90f362(0xff)][_0x90f362(0xc9)](_0x3290a0=>_0x3290a0[_0x90f362(0xb9)]===_0x30b4cd[_0x90f362(0xf8)]());}export function listLocalServiceTrees(_0x9e0f2d={}){const _0x43b5ef=a65_0x3c8b72;return readServiceRegistry(_0x9e0f2d)[_0x43b5ef(0xff)][_0x43b5ef(0xd1)](_0x20f5dc=>_0x20f5dc['normalizedManifest']);}export function inspectServiceRegistry(_0x45d3ba={}){const _0x505740=a65_0x3c8b72,_0x147345=getServiceRegistryPath(_0x45d3ba);if(!existsSync(_0x147345))return emptyServiceRegistryInspection(_0x147345,_0x505740(0xf2),![]);try{const _0x3f11ab=readFileSync(_0x147345,_0x505740(0xe3));if(!_0x3f11ab[_0x505740(0xf8)]())return emptyServiceRegistryInspection(_0x147345,_0x505740(0xd8),!![]);const _0x1faeac=JSON[_0x505740(0xc8)](_0x3f11ab);if(_0x1faeac[_0x505740(0xdb)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x147345,'invalid',!![]),'schemaVersion':_0x1faeac[_0x505740(0xdb)],'message':_0x505740(0xd7)+String(_0x1faeac[_0x505740(0xdb)])};if(!Array['isArray'](_0x1faeac[_0x505740(0xff)]))return{...emptyServiceRegistryInspection(_0x147345,_0x505740(0x108),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1faeac[_0x505740(0x102)],'message':_0x505740(0x103)};const _0x8042a8=_0x1faeac[_0x505740(0xff)][_0x505740(0xd1)](summarizeLocalServiceEntry);return{'registryPath':_0x147345,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1faeac[_0x505740(0x102)],'serviceCount':_0x8042a8[_0x505740(0x101)],'commandCount':_0x8042a8[_0x505740(0xcb)]((_0x5ebb1f,_0x4a7003)=>_0x5ebb1f+_0x4a7003[_0x505740(0xdc)],0x0),'services':_0x8042a8};}catch(_0x524845){return{...emptyServiceRegistryInspection(_0x147345,_0x505740(0x108),!![]),'message':_0x524845 instanceof Error?_0x524845[_0x505740(0xe0)]:String(_0x524845)};}}export function formatValidationFailure(_0x306b5a){const _0x4e6b84=a65_0x3c8b72,_0x82a88b=_0x306b5a[_0x4e6b84(0xde)][_0x4e6b84(0xd1)](_0x4e42cb=>_0x4e42cb[_0x4e6b84(0x100)]+':\x20'+_0x4e42cb[_0x4e6b84(0xe0)]);return _0x4e6b84(0xdd)+_0x82a88b[_0x4e6b84(0xcd)]('\x0a');}function extractLoadedServiceManifests(_0x5a3988,_0x4edf74){const _0x13ae0a=a65_0x3c8b72;if(!isServiceRegistryLike(_0x5a3988)){const _0x5c1d08=_0x5a3988,{manifest:_0x1e9783,errors:_0x396452}=adaptServiceTreeManifestForLegacyFramework(_0x5c1d08),_0x46e652=validateServiceTreeManifest(_0x1e9783),_0x19f740=mergeValidationErrors(_0x46e652,_0x396452);return[{'manifest':_0x5c1d08,'report':_0x19f740,'normalizedManifest':_0x19f740['ok']?normalizeServiceTreeManifest(_0x1e9783):undefined,'sourceHash':_0x4edf74}];}return _0x5a3988[_0x13ae0a(0xff)][_0x13ae0a(0xd1)]((_0x570289,_0x93885d)=>{const _0x1240e2=_0x13ae0a,_0x3e7195=isObjectRecord(_0x570289)?_0x570289[_0x1240e2(0xfa)]:undefined,{manifest:_0x190a04,errors:_0x4563bb}=adaptServiceTreeManifestForLegacyFramework(_0x3e7195),_0x277e86=validateServiceTreeManifest(_0x190a04),_0x320d86=mergeValidationErrors(_0x277e86,_0x4563bb),_0x293c8c=isObjectRecord(_0x570289)&&typeof _0x570289[_0x1240e2(0xb9)]===_0x1240e2(0xc2)?_0x570289[_0x1240e2(0xb9)]:undefined;return{'manifest':_0x3e7195,'report':_0x320d86,'normalizedManifest':_0x320d86['ok']?normalizeServiceTreeManifest(_0x190a04):undefined,'sourceHash':sha256(JSON[_0x1240e2(0x109)](_0x3e7195,null,0x2)+'\x0a'),'registryIndex':_0x93885d,'registryServiceCode':_0x293c8c};});}function mergeValidationErrors(_0x211bba,_0x159ce1){const _0x16bcce=a65_0x3c8b72,_0x187103=_0x211bba[_0x16bcce(0xde)][_0x16bcce(0xd1)](_0x677b36=>_0x677b36[_0x16bcce(0xe0)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0x677b36,'message':'bff\x20target\x20requires\x20functionName.'}:_0x677b36),_0x4bdf1f=[..._0x159ce1,..._0x187103];return{'ok':_0x4bdf1f['length']===0x0,'errors':_0x4bdf1f,'warnings':_0x211bba[_0x16bcce(0xfb)]};}function aggregateValidationReports(_0x1dbe1e){const _0x41d8fe=a65_0x3c8b72,_0x3a9f07=_0x1dbe1e['flatMap'](_0xde1845=>_0xde1845['registryIndex']===undefined?_0xde1845[_0x41d8fe(0x104)][_0x41d8fe(0xde)]:_0xde1845[_0x41d8fe(0x104)][_0x41d8fe(0xde)]['map'](_0x4d54e3=>({..._0x4d54e3,'path':prefixRegistryIssuePath(_0xde1845['registryIndex'],_0x4d54e3[_0x41d8fe(0x100)])}))),_0x2b423f=_0x1dbe1e[_0x41d8fe(0xd9)](_0x6b2693=>_0x6b2693['registryIndex']===undefined?_0x6b2693[_0x41d8fe(0x104)][_0x41d8fe(0xfb)]:_0x6b2693[_0x41d8fe(0x104)][_0x41d8fe(0xfb)][_0x41d8fe(0xd1)](_0x2d10fc=>({..._0x2d10fc,'path':prefixRegistryIssuePath(_0x6b2693[_0x41d8fe(0x106)],_0x2d10fc[_0x41d8fe(0x100)])})));return{'ok':_0x3a9f07['length']===0x0,'errors':_0x3a9f07,'warnings':_0x2b423f};}function prefixRegistryIssuePath(_0x1c5f22,_0x36d55b){const _0x37513b=a65_0x3c8b72;if(_0x36d55b==='$')return _0x37513b(0xc4)+_0x1c5f22+'].manifest';if(_0x36d55b[_0x37513b(0xfe)]('$.'))return _0x37513b(0xc4)+_0x1c5f22+_0x37513b(0xd5)+_0x36d55b[_0x37513b(0xec)](0x1);if(_0x36d55b['startsWith']('$['))return _0x37513b(0xc4)+_0x1c5f22+_0x37513b(0xd5)+_0x36d55b[_0x37513b(0xec)](0x1);return _0x37513b(0xc4)+_0x1c5f22+'].manifest.'+_0x36d55b;}function isServiceRegistryLike(_0x22aa7c){const _0x24e3e8=a65_0x3c8b72;return isObjectRecord(_0x22aa7c)&&_0x22aa7c[_0x24e3e8(0xdb)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x24e3e8(0x105)](_0x22aa7c[_0x24e3e8(0xff)]);}function isObjectRecord(_0x469666){const _0x29083f=a65_0x3c8b72;return Boolean(_0x469666)&&typeof _0x469666==='object'&&!Array[_0x29083f(0x105)](_0x469666);}function a65_0x1167(){const _0x3164d0=['push','missing','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','kind','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','update','risk','trim','homeDirName','manifest','warnings','splice','Invalid\x20service\x20registry\x20JSON:\x20','startsWith','services','path','length','updatedAt','services\x20must\x20be\x20an\x20array','report','isArray','registryIndex','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','invalid','stringify','serviceCode','homeDir','ENOENT','service.json','normalizedManifest','importedAt','file','code','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','string','registry','$.services[','6924930wBKyMj','version','command','parse','find','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','reduce','455847npxged','join','Remove\x20or\x20migrate\x20','Local\x20service\x20not\x20found:\x20','460004AktKPu','map','935288HiWAsT','target','findIndex','].manifest','8008065FLdcll','Unsupported\x20schemaVersion:\x20','empty','flatMap','description','schemaVersion','commandCount','Service\x20manifest\x20validation\x20failed:\x0a','errors','manifests','message','source','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','utf8','.tmp','32463109NLgssD','toISOString','service','name','validation','479028DnINTw','commands','slice','localeCompare','Unsupported\x20service\x20registry\x20schemaVersion:\x20','digest','Service\x20manifest\x20file\x20not\x20found:\x20'];a65_0x1167=function(){return _0x3164d0;};return a65_0x1167();}function emptyServiceRegistryInspection(_0x387b5e,_0x58099c,_0x3d6c6a){return{'registryPath':_0x387b5e,'exists':_0x3d6c6a,'status':_0x58099c,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1eb6df){const _0x2030d3=a65_0x3c8b72,_0x181e7e=_0x1eb6df[_0x2030d3(0xbd)],_0x624a4b=_0x181e7e[_0x2030d3(0xeb)][_0x2030d3(0xd1)](_0x3ec288=>({'path':_0x3ec288['cliPath'],'description':_0x3ec288[_0x2030d3(0xda)],'risk':_0x3ec288[_0x2030d3(0xf7)],'targetKind':_0x3ec288[_0x2030d3(0xd3)][_0x2030d3(0xf4)],'targetCommand':_0x3ec288[_0x2030d3(0xd3)][_0x2030d3(0xc7)]}));return{'serviceCode':_0x1eb6df[_0x2030d3(0xb9)],'name':_0x181e7e['service']['name'],'description':_0x181e7e['service']['description'],'version':_0x1eb6df['version'],'importedAt':_0x1eb6df[_0x2030d3(0xbe)],'source':_0x1eb6df[_0x2030d3(0xe1)],'commandCount':_0x624a4b[_0x2030d3(0x101)],'commands':_0x624a4b};}function sha256(_0x1f841f){const _0x4c8144=a65_0x3c8b72;return createHash('sha256')[_0x4c8144(0xf6)](_0x1f841f)[_0x4c8144(0xef)]('hex');}