@lovrabet/lovrabet-cli 2.3.1-beta.3 → 2.3.1-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/init.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/notification/config-list.js +1 -1
  37. package/lib/commands/notification/index.js +1 -1
  38. package/lib/commands/notification/shared.js +1 -1
  39. package/lib/commands/ocr/index.js +1 -1
  40. package/lib/commands/permit/dataset-get.js +1 -1
  41. package/lib/commands/permit/dataset-set.js +1 -1
  42. package/lib/commands/permit/index.js +1 -1
  43. package/lib/commands/permit/page-get.js +1 -1
  44. package/lib/commands/permit/page-set.js +1 -1
  45. package/lib/commands/permit/role-menus-set.js +1 -1
  46. package/lib/commands/permit/role-menus.js +1 -1
  47. package/lib/commands/permit/shared.js +1 -1
  48. package/lib/commands/personal-bff/index.js +1 -1
  49. package/lib/commands/registry.js +1 -1
  50. package/lib/commands/role/create.js +1 -1
  51. package/lib/commands/role/delete.js +1 -1
  52. package/lib/commands/role/detail.js +1 -1
  53. package/lib/commands/role/index.js +1 -1
  54. package/lib/commands/role/list.js +1 -1
  55. package/lib/commands/role/shared.js +1 -1
  56. package/lib/commands/role/update.js +1 -1
  57. package/lib/commands/role/user-add.js +1 -1
  58. package/lib/commands/role/user-remove.js +1 -1
  59. package/lib/commands/schedule/index.js +1 -1
  60. package/lib/commands/schema.js +1 -1
  61. package/lib/commands/service/dynamic.js +1 -1
  62. package/lib/commands/service/function-name-adapter.js +1 -1
  63. package/lib/commands/service/index.js +1 -1
  64. package/lib/commands/service/registry.js +1 -1
  65. package/lib/commands/skill/commands/create.js +1 -1
  66. package/lib/commands/skill/commands/diagram.js +1 -1
  67. package/lib/commands/skill/commands/install.js +1 -1
  68. package/lib/commands/skill/commands/list.js +1 -1
  69. package/lib/commands/skill/commands/push.js +1 -1
  70. package/lib/commands/skill/commands/validate.js +1 -1
  71. package/lib/commands/skill/diagram.js +1 -1
  72. package/lib/commands/skill/flags.js +1 -1
  73. package/lib/commands/skill/index.js +1 -1
  74. package/lib/commands/skill/manifest-helpers.js +1 -1
  75. package/lib/commands/skill/push-execute.js +1 -1
  76. package/lib/commands/skill/push-flow-helpers.js +1 -1
  77. package/lib/commands/skill/push-retarget.js +1 -1
  78. package/lib/commands/skill/scopes.js +1 -1
  79. package/lib/commands/skill/summary.js +1 -1
  80. package/lib/commands/skill/templates.js +1 -1
  81. package/lib/commands/skill/validate.js +1 -1
  82. package/lib/commands/sql/detail.js +1 -1
  83. package/lib/commands/sql/exec.js +1 -1
  84. package/lib/commands/sql/index.js +1 -1
  85. package/lib/commands/update.js +1 -1
  86. package/lib/commands/user-account/bind.js +1 -1
  87. package/lib/commands/user-account/index.js +1 -1
  88. package/lib/commands/workspace/index.js +1 -1
  89. package/lib/config/domain-config.js +1 -1
  90. package/lib/config/schema.js +1 -1
  91. package/lib/constant/app.js +1 -1
  92. package/lib/constant/auth-mode.js +1 -1
  93. package/lib/constant/cli.js +1 -1
  94. package/lib/constant/defaults.js +1 -1
  95. package/lib/constant/distribution.js +1 -1
  96. package/lib/constant/domain.d.ts +3 -3
  97. package/lib/constant/domain.js +1 -1
  98. package/lib/constant/env.js +1 -1
  99. package/lib/constant/output.js +1 -1
  100. package/lib/constant/product.js +1 -1
  101. package/lib/constant/region.js +1 -1
  102. package/lib/constant/risk.js +1 -1
  103. package/lib/constant/url.js +1 -1
  104. package/lib/context.js +1 -1
  105. package/lib/core/api-client.d.ts +0 -16
  106. package/lib/core/api-client.js +1 -1
  107. package/lib/core/db-resolver.js +1 -1
  108. package/lib/core/kb-search-client.d.ts +30 -0
  109. package/lib/core/kb-search-client.js +1 -0
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/build-all-flags.js +1 -1
  113. package/lib/framework/dryrun.js +1 -1
  114. package/lib/framework/flags.js +1 -1
  115. package/lib/framework/help.js +1 -1
  116. package/lib/framework/index.js +1 -1
  117. package/lib/framework/output.js +1 -1
  118. package/lib/framework/preparse.js +1 -1
  119. package/lib/framework/rate-limit.js +1 -1
  120. package/lib/framework/raw-flags.js +1 -1
  121. package/lib/framework/response.js +1 -1
  122. package/lib/framework/runner-confirmation.js +1 -1
  123. package/lib/framework/runner-error.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/service-order.js +1 -1
  127. package/lib/framework/types.d.ts +2 -0
  128. package/lib/framework/types.js +1 -1
  129. package/lib/generated/build-info.d.ts +4 -4
  130. package/lib/generated/build-info.js +1 -1
  131. package/lib/generated/official-routing.js +1 -1
  132. package/lib/generated/routing-contract.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/postinstall.js +1 -1
  135. package/lib/runtime/confirmation.js +1 -1
  136. package/lib/runtime/event.js +1 -1
  137. package/lib/runtime/index.js +1 -1
  138. package/lib/runtime/queue.js +1 -1
  139. package/lib/runtime/resolve.js +1 -1
  140. package/lib/skills/builtin-skill.js +1 -1
  141. package/lib/skills/npx-skills-add.js +1 -1
  142. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  143. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  144. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  145. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  146. package/lib/skills/runtime-skill-sync/links.js +1 -1
  147. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  148. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  149. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  150. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  151. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  152. package/lib/skills/runtime-skill-sync/push.js +1 -1
  153. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  154. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  155. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  156. package/lib/skills/runtime-skill-sync.js +1 -1
  157. package/lib/skills/skill-presence.js +1 -1
  158. package/lib/utils/access-key-redaction.js +1 -1
  159. package/lib/utils/apply-jq-filter.js +1 -1
  160. package/lib/utils/cli-version-check.js +1 -1
  161. package/lib/utils/cli-version-policy.js +1 -1
  162. package/lib/utils/logger.js +1 -1
  163. package/lib/utils/lossless-json.js +1 -1
  164. package/lib/utils/params.js +1 -1
  165. package/lib/utils/platform.js +1 -1
  166. package/lib/utils/update-notice.js +1 -1
  167. package/lib/utils/version.js +1 -1
  168. package/lib/utils/write-cli-side-channel.js +1 -1
  169. package/package.json +1 -1
  170. package/skills/lovrabet/SKILL.md +2 -2
  171. package/skills/lovrabet/references/lovrabet-config-commands.md +3 -1
  172. package/skills/lovrabet/references/lovrabet-config.md +2 -2
  173. package/skills/lovrabet/references/lovrabet-doctor.md +2 -0
  174. package/skills/lovrabet/references/lovrabet-kb-workflow.md +3 -1
  175. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a54_0x5a0f3b=a54_0x5c0d;(function(_0x35c485,_0x354a07){const _0xaa0f1c=a54_0x5c0d,_0x143a13=_0x35c485();while(!![]){try{const _0x5f3a0d=parseInt(_0xaa0f1c(0x1dc))/0x1+parseInt(_0xaa0f1c(0x1e1))/0x2+parseInt(_0xaa0f1c(0x1f3))/0x3+parseInt(_0xaa0f1c(0x214))/0x4+-parseInt(_0xaa0f1c(0x1f9))/0x5*(-parseInt(_0xaa0f1c(0x1df))/0x6)+parseInt(_0xaa0f1c(0x1f1))/0x7*(parseInt(_0xaa0f1c(0x213))/0x8)+-parseInt(_0xaa0f1c(0x1fe))/0x9;if(_0x5f3a0d===_0x354a07)break;else _0x143a13['push'](_0x143a13['shift']());}catch(_0x5bc265){_0x143a13['push'](_0x143a13['shift']());}}}(a54_0x5b68,0x62435));function a54_0x5b68(){const _0x4fc431=['\x20is\x20not\x20in\x20runtime\x20role\x20','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','OWNER','369601aAfwRM','expect-user-count','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','39846GGStKb','number','516518NDniNO','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20user\x20',',\x20found\x20','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','Missing\x20runtime\x20role\x20reference.','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','roleType','User\x20','\x22\x20was\x20not\x20found\x20in\x20app\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','string','\x22\x20is\x20ambiguous.','appCode','Runtime\x20numeric\x20userId','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','68663DrHJyj','Pass\x20--role\x20<id|name>.','854340tIhaML','\x20was\x20not\x20found\x20in\x20app\x20','validation','userCount','remark','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','200LLnEUV','paging','trim','join','Runtime\x20role\x20name\x20\x22','12875310sQRKPR','totalCount','num','Runtime\x20role\x20id\x20','ADMIN','code','items','filter','runtime','flag','userId','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','map','userName','userList','applyUserList','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','isSafeInteger','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','str','roleName','424OOlAgq','539672ZtRsrm','push','CUSTOM','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','role','Pass\x20one\x20role\x20ID:\x20','includes','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','USER','test','Cannot\x20','length','user','\x20built-in\x20runtime\x20role\x20'];a54_0x5b68=function(){return _0x4fc431;};return a54_0x5b68();}import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=[a54_0x5a0f3b(0x202),a54_0x5a0f3b(0x1d2),a54_0x5a0f3b(0x1db),'CUSTOM'];const BUILTIN_ROLE_TYPES=[a54_0x5a0f3b(0x202),'USER',a54_0x5a0f3b(0x1db)];export const ROLE_ID_FLAG={'name':'id','type':a54_0x5a0f3b(0x1e0),'required':!![],'description':a54_0x5a0f3b(0x1e5)};export const ROLE_REF_FLAG={'name':a54_0x5a0f3b(0x1ce),'type':a54_0x5a0f3b(0x1ec),'required':!![],'description':a54_0x5a0f3b(0x20e)};export const USER_ID_FLAG={'name':a54_0x5a0f3b(0x1d6),'type':a54_0x5a0f3b(0x1ec),'required':!![],'description':a54_0x5a0f3b(0x1ef)};export const EXPECT_USER_COUNT_FLAG={'name':a54_0x5a0f3b(0x1dd),'type':a54_0x5a0f3b(0x1e0),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};function a54_0x5c0d(_0x4a3bab,_0x2f3700){_0x4a3bab=_0x4a3bab-0x1cd;const _0x5b68bb=a54_0x5b68();let _0x5c0d07=_0x5b68bb[_0x4a3bab];return _0x5c0d07;}export function isBuiltinRuntimeRole(_0x23e434){const _0x241df6=a54_0x5a0f3b;return BUILTIN_ROLE_TYPES[_0x241df6(0x1d0)](_0x23e434);}export function assertCustomRuntimeRole(_0x4a3b46,_0x467296){const _0x5dcd86=a54_0x5a0f3b;if(_0x4a3b46[_0x5dcd86(0x1e8)]!==_0x5dcd86(0x216))throw CliErrors[_0x5dcd86(0x1f5)](_0x5dcd86(0x1d4)+_0x467296+_0x5dcd86(0x1d7)+_0x4a3b46[_0x5dcd86(0x212)]+'\x20('+_0x4a3b46[_0x5dcd86(0x1e8)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x225aa1){const _0x2a4fd3=a54_0x5a0f3b;return{'id':_0x225aa1['id'],'roleName':_0x225aa1['roleName'],'roleType':_0x225aa1['roleType'],'remark':_0x225aa1[_0x2a4fd3(0x1f7)],'userCount':_0x225aa1[_0x2a4fd3(0x1f6)]??0x0,'permitCount':_0x225aa1['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0x225aa1['roleType'])};}export async function getRuntimeRoleById(_0x4ace8a,_0x2fe065){const _0x28f853=a54_0x5a0f3b;if(!Number['isSafeInteger'](_0x2fe065)||_0x2fe065<=0x0)throw CliErrors['validation'](_0x28f853(0x1eb));const _0x58cef9=(await listAllRuntimeRoles(_0x4ace8a))[_0x28f853(0x205)](_0x422470=>_0x422470['id']===_0x2fe065&&(!_0x422470[_0x28f853(0x1ee)]||_0x422470[_0x28f853(0x1ee)]===_0x4ace8a));if(_0x58cef9[_0x28f853(0x1d5)]!==0x1)throw CliErrors[_0x28f853(0x1f5)](_0x28f853(0x201)+_0x2fe065+_0x28f853(0x1f4)+_0x4ace8a+'.',_0x28f853(0x1de));return _0x58cef9[0x0];}export async function listAllRuntimeRoles(_0x24ed2e,_0x3fcff7={}){const _0x2f66a6=a54_0x5a0f3b,_0x40237e=0x64,_0x40fa4b=[];for(let _0x39dc06=0x1;;_0x39dc06+=0x1){const _0x5e5507=await listRuntimeAppRoles(_0x24ed2e,{..._0x3fcff7[_0x2f66a6(0x212)]?{'roleName':_0x3fcff7[_0x2f66a6(0x212)]}:{},'currentPage':_0x39dc06,'pageSize':_0x40237e});_0x40fa4b[_0x2f66a6(0x215)](..._0x5e5507[_0x2f66a6(0x204)]);if(_0x5e5507[_0x2f66a6(0x204)][_0x2f66a6(0x1d5)]<_0x40237e||_0x5e5507[_0x2f66a6(0x1fa)]&&_0x40fa4b[_0x2f66a6(0x1d5)]>=_0x5e5507[_0x2f66a6(0x1fa)][_0x2f66a6(0x1ff)])return _0x40fa4b;}}export async function resolveRuntimeRoleRef(_0x1b7190,_0x36e279){const _0x5b6700=a54_0x5a0f3b,_0x135ea5=_0x36e279['trim']();if(!_0x135ea5)throw CliErrors[_0x5b6700(0x1f5)](_0x5b6700(0x1e6),_0x5b6700(0x1f2));if(/^\d+$/[_0x5b6700(0x1d3)](_0x135ea5))return getRuntimeRoleById(_0x1b7190,Number(_0x135ea5));const _0x460ed2=(await listAllRuntimeRoles(_0x1b7190))[_0x5b6700(0x205)](_0x5b16a9=>_0x5b16a9[_0x5b6700(0x212)]===_0x135ea5);if(_0x460ed2['length']===0x0)throw CliErrors[_0x5b6700(0x1f5)](_0x5b6700(0x1fd)+_0x135ea5+_0x5b6700(0x1ea)+_0x1b7190+'.',_0x5b6700(0x1d9));if(_0x460ed2[_0x5b6700(0x1d5)]>0x1)throw CliErrors[_0x5b6700(0x1f5)](_0x5b6700(0x1fd)+_0x135ea5+_0x5b6700(0x1ed),_0x5b6700(0x1cf)+_0x460ed2[_0x5b6700(0x20a)](_0x50d1b6=>_0x50d1b6['id'])[_0x5b6700(0x1fc)](',\x20')+'.');return _0x460ed2[0x0];}function parseRuntimeUserId(_0xd8ccf7){const _0x2d792f=a54_0x5a0f3b,_0x30e371=_0xd8ccf7[_0x2d792f(0x1fb)]();if(!/^\d+$/[_0x2d792f(0x1d3)](_0x30e371))throw CliErrors[_0x2d792f(0x1f5)](_0x2d792f(0x1cd),_0x2d792f(0x209));const _0x1c855a=Number(_0x30e371);if(!Number[_0x2d792f(0x20f)](_0x1c855a)||_0x1c855a<=0x0)throw CliErrors[_0x2d792f(0x1f5)](_0x2d792f(0x1e7));return _0x1c855a;}export async function prepareRuntimeMemberMutation(_0x45f6e8,_0x23c259){const _0x2095ba=a54_0x5a0f3b,_0x3e7907=await resolveRuntimeRoleRef(_0x45f6e8[_0x2095ba(0x1ee)],_0x45f6e8[_0x2095ba(0x211)](_0x2095ba(0x1ce)));if(_0x3e7907[_0x2095ba(0x1e8)]==='OWNER')throw CliErrors[_0x2095ba(0x1f5)](_0x2095ba(0x210),_0x2095ba(0x1e2));const _0x2c9cc6=parseRuntimeUserId(_0x45f6e8[_0x2095ba(0x211)](_0x2095ba(0x1d6))),_0x14fbbd=(await listRuntimeRoleUsers(_0x45f6e8['appCode']))[_0x2095ba(0x20a)](_0x25be63=>({..._0x25be63,'userList':[..._0x25be63[_0x2095ba(0x20c)]??[]],'applyUserList':[..._0x25be63[_0x2095ba(0x20d)]??[]]})),_0x20b454=_0x14fbbd['find'](_0x5afd6d=>_0x5afd6d['id']===_0x3e7907['id']);if(!_0x20b454)throw CliErrors[_0x2095ba(0x1f5)]('Runtime\x20role\x20'+_0x3e7907['id']+_0x2095ba(0x1f8),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x3e0dd1=_0x20b454[_0x2095ba(0x20c)][_0x2095ba(0x20a)](_0x508b0b=>_0x508b0b['userId']),_0x3b885e=_0x45f6e8[_0x2095ba(0x207)](_0x2095ba(0x1dd));if(_0x3b885e!==undefined&&_0x3b885e!==null&&_0x3b885e!==''){const _0x41e89d=_0x45f6e8[_0x2095ba(0x200)](_0x2095ba(0x1dd));if(!Number['isSafeInteger'](_0x41e89d)||_0x41e89d<0x0)throw CliErrors[_0x2095ba(0x1f5)](_0x2095ba(0x1f0));if(_0x3e0dd1[_0x2095ba(0x1d5)]!==_0x41e89d)throw CliErrors[_0x2095ba(0x1f5)](_0x2095ba(0x1d1)+_0x41e89d+_0x2095ba(0x1e4)+_0x3e0dd1['length']+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x147717=_0x3e0dd1[_0x2095ba(0x1d0)](_0x2c9cc6),_0x2ad243=[];let _0x51b547=!![];if(_0x23c259==='user-add'){const _0x276182=await listRuntimeAppUsers(_0x45f6e8['appCode']),_0x3a3475=_0x276182[_0x2095ba(0x205)](_0x79298c=>Number(_0x79298c[_0x2095ba(0x203)])===_0x2c9cc6);if(_0x3a3475[_0x2095ba(0x1d5)]!==0x1||!_0x3a3475[0x0][_0x2095ba(0x20b)]?.[_0x2095ba(0x1fb)]())throw CliErrors['validation'](_0x2095ba(0x1e3)+_0x2c9cc6+_0x2095ba(0x1f4)+_0x45f6e8[_0x2095ba(0x1ee)]+'.',_0x2095ba(0x1da));_0x147717?(_0x51b547=![],_0x2ad243[_0x2095ba(0x215)](_0x2095ba(0x1e9)+_0x2c9cc6+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x3e7907['id']+'.')):_0x20b454['userList'][_0x2095ba(0x215)]({'userId':_0x2c9cc6,'username':_0x3a3475[0x0][_0x2095ba(0x20b)]});}else!_0x147717?(_0x51b547=![],_0x2ad243[_0x2095ba(0x215)](_0x2095ba(0x1e9)+_0x2c9cc6+_0x2095ba(0x1d8)+_0x3e7907['id']+'.')):_0x20b454[_0x2095ba(0x20c)]=_0x20b454['userList']['filter'](_0x80beb=>_0x80beb['userId']!==_0x2c9cc6);return{'role':_0x3e7907,'userId':_0x2c9cc6,'roleList':_0x14fbbd,'before':{'userIds':_0x3e0dd1},'after':{'userIds':_0x20b454[_0x2095ba(0x20c)]['map'](_0x44be39=>_0x44be39[_0x2095ba(0x208)])},'shouldWrite':_0x51b547,'warnings':_0x2ad243};}export function runtimeRoleWriteResult(_0x16773f,_0x567104,_0x54fe0a,_0x263cb6,_0xfba7f3,_0x44deda=[]){const _0x4e1f19=a54_0x5a0f3b;return{'operation':_0x16773f,'scope':_0x4e1f19(0x206),'selector':_0x567104,'before':_0x54fe0a,'after':_0x263cb6,'dryRun':![],'backend':_0xfba7f3,'warnings':_0x44deda};}
1
+ const a54_0x4cac13=a54_0x1dbb;(function(_0x252681,_0x583d8f){const _0x447dc6=a54_0x1dbb,_0x442e4f=_0x252681();while(!![]){try{const _0x5c6709=-parseInt(_0x447dc6(0xda))/0x1+-parseInt(_0x447dc6(0xcc))/0x2*(-parseInt(_0x447dc6(0xd8))/0x3)+parseInt(_0x447dc6(0xd6))/0x4+parseInt(_0x447dc6(0xe6))/0x5+parseInt(_0x447dc6(0xe0))/0x6+parseInt(_0x447dc6(0xea))/0x7*(-parseInt(_0x447dc6(0xed))/0x8)+-parseInt(_0x447dc6(0xdc))/0x9;if(_0x5c6709===_0x583d8f)break;else _0x442e4f['push'](_0x442e4f['shift']());}catch(_0x122b3d){_0x442e4f['push'](_0x442e4f['shift']());}}}(a54_0x74fe,0x5e9b8));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const RUNTIME_ROLE_TYPES=['ADMIN',a54_0x4cac13(0xc7),'OWNER','CUSTOM'];function a54_0x74fe(){const _0x45d9b7=['num','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','Runtime\x20role\x20id\x20','Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.','flag','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','Runtime\x20numeric\x20userId','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','\x20built-in\x20runtime\x20role\x20','filter','validation','roleName','join','Runtime\x20userId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','\x20is\x20already\x20in\x20runtime\x20role\x20','role','User\x20',',\x20found\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','remark','OWNER','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','includes','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20role\x20','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','applyUserList','CUSTOM','Runtime\x20user\x20','items','userName','push','USER','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','user','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.','2TwLtjK','str','totalCount','expect-user-count','code','roleType','user-add','map','trim','length','1918812ChKCqj','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','537399OFQybp','number','12054EHkKsi','\x20was\x20not\x20found\x20in\x20app\x20','2742039mkzJHU','\x20is\x20not\x20in\x20runtime\x20role\x20','string','find','1975230lErumx','\x22\x20is\x20ambiguous.','\x22\x20was\x20not\x20found\x20in\x20app\x20','isSafeInteger','Runtime\x20role\x20name\x20\x22','userList','170300WZKSth','paging','permitCount','appCode','28wYptMr','Pass\x20--role\x20<id|name>.','Pass\x20one\x20role\x20ID:\x20','635728CvixXz','Cannot\x20','test'];a54_0x74fe=function(){return _0x45d9b7;};return a54_0x74fe();}const BUILTIN_ROLE_TYPES=['ADMIN',a54_0x4cac13(0xc7),a54_0x4cac13(0x106)];export const ROLE_ID_FLAG={'name':'id','type':a54_0x4cac13(0xd9),'required':!![],'description':'Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list'};export const ROLE_REF_FLAG={'name':'role','type':a54_0x4cac13(0xde),'required':!![],'description':a54_0x4cac13(0xf2)};export const USER_ID_FLAG={'name':a54_0x4cac13(0xca),'type':a54_0x4cac13(0xde),'required':!![],'description':a54_0x4cac13(0xf7)};export const EXPECT_USER_COUNT_FLAG={'name':a54_0x4cac13(0xcf),'type':'number','description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x8689f6){const _0x3562cc=a54_0x4cac13;return BUILTIN_ROLE_TYPES[_0x3562cc(0x108)](_0x8689f6);}export function assertCustomRuntimeRole(_0xb0f5a7,_0x29942b){const _0xe01478=a54_0x4cac13;if(_0xb0f5a7[_0xe01478(0xd1)]!==_0xe01478(0x10d))throw CliErrors['validation'](_0xe01478(0xee)+_0x29942b+_0xe01478(0xf9)+_0xb0f5a7[_0xe01478(0xfc)]+'\x20('+_0xb0f5a7[_0xe01478(0xd1)]+').','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRuntimeRole(_0x596e63){const _0x1ee66e=a54_0x4cac13;return{'id':_0x596e63['id'],'roleName':_0x596e63[_0x1ee66e(0xfc)],'roleType':_0x596e63[_0x1ee66e(0xd1)],'remark':_0x596e63[_0x1ee66e(0x105)],'userCount':_0x596e63['userCount']??0x0,'permitCount':_0x596e63[_0x1ee66e(0xe8)]??0x0,'builtin':isBuiltinRuntimeRole(_0x596e63['roleType'])};}export async function getRuntimeRoleById(_0x1cfc40,_0x26035d){const _0x21e7f5=a54_0x4cac13;if(!Number[_0x21e7f5(0xe3)](_0x26035d)||_0x26035d<=0x0)throw CliErrors[_0x21e7f5(0xfb)](_0x21e7f5(0x10b));const _0x53d3ac=(await listAllRuntimeRoles(_0x1cfc40))[_0x21e7f5(0xfa)](_0x1d02be=>_0x1d02be['id']===_0x26035d&&(!_0x1d02be[_0x21e7f5(0xe9)]||_0x1d02be['appCode']===_0x1cfc40));if(_0x53d3ac[_0x21e7f5(0xd5)]!==0x1)throw CliErrors[_0x21e7f5(0xfb)](_0x21e7f5(0xf3)+_0x26035d+_0x21e7f5(0xdb)+_0x1cfc40+'.',_0x21e7f5(0x107));return _0x53d3ac[0x0];}export async function listAllRuntimeRoles(_0xdb456c,_0x260653={}){const _0x34a80c=a54_0x4cac13,_0x129e7f=0x64,_0x4352d8=[];for(let _0x1e0bf3=0x1;;_0x1e0bf3+=0x1){const _0x38e7d3=await listRuntimeAppRoles(_0xdb456c,{..._0x260653[_0x34a80c(0xfc)]?{'roleName':_0x260653['roleName']}:{},'currentPage':_0x1e0bf3,'pageSize':_0x129e7f});_0x4352d8[_0x34a80c(0xc6)](..._0x38e7d3[_0x34a80c(0xc4)]);if(_0x38e7d3[_0x34a80c(0xc4)][_0x34a80c(0xd5)]<_0x129e7f||_0x38e7d3['paging']&&_0x4352d8['length']>=_0x38e7d3[_0x34a80c(0xe7)][_0x34a80c(0xce)])return _0x4352d8;}}function a54_0x1dbb(_0x3c9934,_0x16c12d){_0x3c9934=_0x3c9934-0xc4;const _0x74fec6=a54_0x74fe();let _0x1dbb58=_0x74fec6[_0x3c9934];return _0x1dbb58;}export async function resolveRuntimeRoleRef(_0x5c8f94,_0xb34242){const _0x1f61f5=a54_0x4cac13,_0x2bd4aa=_0xb34242[_0x1f61f5(0xd4)]();if(!_0x2bd4aa)throw CliErrors[_0x1f61f5(0xfb)]('Missing\x20runtime\x20role\x20reference.',_0x1f61f5(0xeb));if(/^\d+$/[_0x1f61f5(0xef)](_0x2bd4aa))return getRuntimeRoleById(_0x5c8f94,Number(_0x2bd4aa));const _0x100051=(await listAllRuntimeRoles(_0x5c8f94))['filter'](_0xfdd9bb=>_0xfdd9bb[_0x1f61f5(0xfc)]===_0x2bd4aa);if(_0x100051[_0x1f61f5(0xd5)]===0x0)throw CliErrors['validation'](_0x1f61f5(0xe4)+_0x2bd4aa+_0x1f61f5(0xe2)+_0x5c8f94+'.',_0x1f61f5(0xf1));if(_0x100051[_0x1f61f5(0xd5)]>0x1)throw CliErrors['validation']('Runtime\x20role\x20name\x20\x22'+_0x2bd4aa+_0x1f61f5(0xe1),_0x1f61f5(0xec)+_0x100051[_0x1f61f5(0xd3)](_0x593b16=>_0x593b16['id'])[_0x1f61f5(0xfd)](',\x20')+'.');return _0x100051[0x0];}function parseRuntimeUserId(_0x14632c){const _0x189b6c=a54_0x4cac13,_0x449792=_0x14632c[_0x189b6c(0xd4)]();if(!/^\d+$/[_0x189b6c(0xef)](_0x449792))throw CliErrors[_0x189b6c(0xfb)](_0x189b6c(0xf8),_0x189b6c(0xc9));const _0x4ca047=Number(_0x449792);if(!Number['isSafeInteger'](_0x4ca047)||_0x4ca047<=0x0)throw CliErrors[_0x189b6c(0xfb)](_0x189b6c(0xfe));return _0x4ca047;}export async function prepareRuntimeMemberMutation(_0x4c7bd3,_0x4f6fa8){const _0x861a8e=a54_0x4cac13,_0x4e4d9f=await resolveRuntimeRoleRef(_0x4c7bd3[_0x861a8e(0xe9)],_0x4c7bd3['str'](_0x861a8e(0x101)));if(_0x4e4d9f[_0x861a8e(0xd1)]==='OWNER')throw CliErrors[_0x861a8e(0xfb)](_0x861a8e(0xc8),_0x861a8e(0x109));const _0x104a27=parseRuntimeUserId(_0x4c7bd3[_0x861a8e(0xcd)](_0x861a8e(0xca))),_0x1f025e=(await listRuntimeRoleUsers(_0x4c7bd3[_0x861a8e(0xe9)]))[_0x861a8e(0xd3)](_0x37627b=>({..._0x37627b,'userList':[..._0x37627b['userList']??[]],'applyUserList':[..._0x37627b[_0x861a8e(0x10c)]??[]]})),_0x40945c=_0x1f025e[_0x861a8e(0xdf)](_0x5adf16=>_0x5adf16['id']===_0x4e4d9f['id']);if(!_0x40945c)throw CliErrors[_0x861a8e(0xfb)](_0x861a8e(0x10a)+_0x4e4d9f['id']+_0x861a8e(0x104),_0x861a8e(0xf4));const _0x1abda8=_0x40945c['userList'][_0x861a8e(0xd3)](_0x5217ff=>_0x5217ff['userId']),_0x4e6609=_0x4c7bd3[_0x861a8e(0xf5)](_0x861a8e(0xcf));if(_0x4e6609!==undefined&&_0x4e6609!==null&&_0x4e6609!==''){const _0x56aa91=_0x4c7bd3[_0x861a8e(0xf0)](_0x861a8e(0xcf));if(!Number[_0x861a8e(0xe3)](_0x56aa91)||_0x56aa91<0x0)throw CliErrors['validation'](_0x861a8e(0xf6));if(_0x1abda8[_0x861a8e(0xd5)]!==_0x56aa91)throw CliErrors['validation'](_0x861a8e(0xff)+_0x56aa91+_0x861a8e(0x103)+_0x1abda8[_0x861a8e(0xd5)]+'.',_0x861a8e(0xcb));}const _0x1bdeb3=_0x1abda8[_0x861a8e(0x108)](_0x104a27),_0x666ef6=[];let _0x30afb4=!![];if(_0x4f6fa8===_0x861a8e(0xd2)){const _0x2632ce=await listRuntimeAppUsers(_0x4c7bd3[_0x861a8e(0xe9)]),_0x569eea=_0x2632ce[_0x861a8e(0xfa)](_0x3f110f=>Number(_0x3f110f[_0x861a8e(0xd0)])===_0x104a27);if(_0x569eea[_0x861a8e(0xd5)]!==0x1||!_0x569eea[0x0]['userName']?.['trim']())throw CliErrors[_0x861a8e(0xfb)](_0x861a8e(0x10e)+_0x104a27+_0x861a8e(0xdb)+_0x4c7bd3[_0x861a8e(0xe9)]+'.',_0x861a8e(0xd7));_0x1bdeb3?(_0x30afb4=![],_0x666ef6['push'](_0x861a8e(0x102)+_0x104a27+_0x861a8e(0x100)+_0x4e4d9f['id']+'.')):_0x40945c[_0x861a8e(0xe5)][_0x861a8e(0xc6)]({'userId':_0x104a27,'username':_0x569eea[0x0][_0x861a8e(0xc5)]});}else!_0x1bdeb3?(_0x30afb4=![],_0x666ef6['push'](_0x861a8e(0x102)+_0x104a27+_0x861a8e(0xdd)+_0x4e4d9f['id']+'.')):_0x40945c['userList']=_0x40945c[_0x861a8e(0xe5)][_0x861a8e(0xfa)](_0xc64485=>_0xc64485['userId']!==_0x104a27);return{'role':_0x4e4d9f,'userId':_0x104a27,'roleList':_0x1f025e,'before':{'userIds':_0x1abda8},'after':{'userIds':_0x40945c['userList'][_0x861a8e(0xd3)](_0xcda91b=>_0xcda91b['userId'])},'shouldWrite':_0x30afb4,'warnings':_0x666ef6};}export function runtimeRoleWriteResult(_0x6ccb2d,_0x31c574,_0x2a97a5,_0x3fa4b5,_0x36cb18,_0x4cde50=[]){return{'operation':_0x6ccb2d,'scope':'runtime','selector':_0x31c574,'before':_0x2a97a5,'after':_0x3fa4b5,'dryRun':![],'backend':_0x36cb18,'warnings':_0x4cde50};}
@@ -1 +1 @@
1
- const a55_0x18118d=a55_0x8c3f;(function(_0x4ce2ce,_0x5c2e9b){const _0x461d6c=a55_0x8c3f,_0x537069=_0x4ce2ce();while(!![]){try{const _0x56cc92=-parseInt(_0x461d6c(0x158))/0x1+-parseInt(_0x461d6c(0x155))/0x2*(-parseInt(_0x461d6c(0x160))/0x3)+parseInt(_0x461d6c(0x149))/0x4*(-parseInt(_0x461d6c(0x14f))/0x5)+-parseInt(_0x461d6c(0x15b))/0x6*(parseInt(_0x461d6c(0x15e))/0x7)+parseInt(_0x461d6c(0x156))/0x8+-parseInt(_0x461d6c(0x153))/0x9*(-parseInt(_0x461d6c(0x15a))/0xa)+-parseInt(_0x461d6c(0x148))/0xb*(-parseInt(_0x461d6c(0x146))/0xc);if(_0x56cc92===_0x5c2e9b)break;else _0x537069['push'](_0x537069['shift']());}catch(_0x176278){_0x537069['push'](_0x537069['shift']());}}}(a55_0x5bf9,0x7baea));import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x52b3f7){const _0x2fc617=a55_0x8c3f,_0x53a1c7=_0x52b3f7['flag']('name')!==undefined,_0x3fb78d=_0x52b3f7[_0x2fc617(0x147)](_0x2fc617(0x143))!==undefined;if(!_0x53a1c7&&!_0x3fb78d)throw CliErrors['validation'](_0x2fc617(0x15f));const _0x14ae01=_0x52b3f7[_0x2fc617(0x14e)](_0x2fc617(0x14d))['trim'](),_0x47549d=_0x52b3f7[_0x2fc617(0x14e)](_0x2fc617(0x143))[_0x2fc617(0x150)]();if(_0x53a1c7&&!_0x14ae01)throw CliErrors[_0x2fc617(0x15c)](_0x2fc617(0x144));if(_0x3fb78d&&!_0x47549d)throw CliErrors['validation'](_0x2fc617(0x151),_0x2fc617(0x14b));return{..._0x53a1c7?{'roleName':_0x14ae01}:{},..._0x3fb78d?{'remark':_0x47549d}:{}};}function a55_0x8c3f(_0x5a37bb,_0x9e69e5){_0x5a37bb=_0x5a37bb-0x13f;const _0x5bf944=a55_0x5bf9();let _0x8c3fae=_0x5bf944[_0x5a37bb];return _0x8c3fae;}function a55_0x5bf9(){const _0x422b1e=['13425900bIYBZd','flag','11CKoPaP','629572aAXieq','num','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','high-risk-write','name','str','10QnXCrA','trim','--remark\x20must\x20not\x20be\x20blank.','role','72WUXiEp','POST','63422hHKbip','1814136xYooPX','New\x20role\x20name','165062EGPIRf','Update\x20a\x20runtime\x20CUSTOM\x20role','286170TOyrGG','282QPQhvS','validation','update','92309ltqdNE','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','3oqBZrM','appCode','Changes\x20the\x20custom\x20role\x20name\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20display\x20updates\x20immediately.','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','/client/permit/role/update','remark','--name\x20must\x20not\x20be\x20blank.','string'];a55_0x5bf9=function(){return _0x422b1e;};return a55_0x5bf9();}async function prepare(_0x2f271b){const _0x13776b=a55_0x8c3f,_0x312ee2=await getRuntimeRoleById(_0x2f271b[_0x13776b(0x13f)],_0x2f271b[_0x13776b(0x14a)]('id'));return assertCustomRuntimeRole(_0x312ee2,'update'),{'role':_0x312ee2,'body':{'id':_0x312ee2['id'],'appCode':_0x2f271b[_0x13776b(0x13f)],...updateFields(_0x2f271b)}};}export const roleUpdate={'service':a55_0x18118d(0x152),'command':a55_0x18118d(0x15d),'description':a55_0x18118d(0x159),'risk':a55_0x18118d(0x14c),'confirmationDescription':a55_0x18118d(0x140),'flags':[ROLE_ID_FLAG,{'name':a55_0x18118d(0x14d),'type':a55_0x18118d(0x145),'description':a55_0x18118d(0x157)},{'name':a55_0x18118d(0x143),'type':'string','description':'New\x20non-empty\x20role\x20remark'}],async 'validate'(_0x3caed1){updateFields(_0x3caed1);},async 'dryRun'(_0x4735b3){const _0x34a4e2=a55_0x18118d,{body:_0x339f9e}=await prepare(_0x4735b3);return dryRun(_0x34a4e2(0x154),_0x34a4e2(0x142))['body'](_0x339f9e)['description'](_0x34a4e2(0x141))['build']();},async 'execute'(_0x126285){const _0x11cfb0=a55_0x18118d,{role:_0x156f8c,body:_0x46894b}=await prepare(_0x126285),_0xed8fbf=await updateRuntimeAppRole(_0x46894b);return{'ok':!![],'data':runtimeRoleWriteResult(_0x11cfb0(0x15d),{'roleId':_0x156f8c['id']},projectRuntimeRole(_0x156f8c),projectRuntimeRole(_0xed8fbf),{'method':'POST','path':_0x11cfb0(0x142)})};}};
1
+ const a55_0x116258=a55_0x3474;(function(_0x4a3db,_0x517dde){const _0x4ccab1=a55_0x3474,_0x130c52=_0x4a3db();while(!![]){try{const _0x47c56a=-parseInt(_0x4ccab1(0x111))/0x1+-parseInt(_0x4ccab1(0x105))/0x2+-parseInt(_0x4ccab1(0x104))/0x3*(parseInt(_0x4ccab1(0x102))/0x4)+parseInt(_0x4ccab1(0x10d))/0x5+-parseInt(_0x4ccab1(0xf9))/0x6+-parseInt(_0x4ccab1(0x109))/0x7*(-parseInt(_0x4ccab1(0x112))/0x8)+parseInt(_0x4ccab1(0x10a))/0x9*(parseInt(_0x4ccab1(0x100))/0xa);if(_0x47c56a===_0x517dde)break;else _0x130c52['push'](_0x130c52['shift']());}catch(_0x455cc6){_0x130c52['push'](_0x130c52['shift']());}}}(a55_0x2904,0x3cecc));function a55_0x3474(_0x4129e2,_0x5d3c37){_0x4129e2=_0x4129e2-0xf4;const _0x290449=a55_0x2904();let _0x347458=_0x290449[_0x4129e2];return _0x347458;}import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x1a357d){const _0x4186d5=a55_0x3474,_0x31c095=_0x1a357d[_0x4186d5(0xfc)]('name')!==undefined,_0x1a08cf=_0x1a357d[_0x4186d5(0xfc)](_0x4186d5(0x10e))!==undefined;if(!_0x31c095&&!_0x1a08cf)throw CliErrors[_0x4186d5(0xfa)](_0x4186d5(0x10b));const _0x2d8c9d=_0x1a357d[_0x4186d5(0xfb)](_0x4186d5(0x107))[_0x4186d5(0xff)](),_0x32b1dc=_0x1a357d[_0x4186d5(0xfb)](_0x4186d5(0x10e))[_0x4186d5(0xff)]();if(_0x31c095&&!_0x2d8c9d)throw CliErrors[_0x4186d5(0xfa)](_0x4186d5(0xf4));if(_0x1a08cf&&!_0x32b1dc)throw CliErrors[_0x4186d5(0xfa)](_0x4186d5(0xfe),'The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.');return{..._0x31c095?{'roleName':_0x2d8c9d}:{},..._0x1a08cf?{'remark':_0x32b1dc}:{}};}async function prepare(_0x339350){const _0x492afa=a55_0x3474,_0xf06b22=await getRuntimeRoleById(_0x339350[_0x492afa(0x101)],_0x339350['num']('id'));return assertCustomRuntimeRole(_0xf06b22,_0x492afa(0x106)),{'role':_0xf06b22,'body':{'id':_0xf06b22['id'],'appCode':_0x339350['appCode'],...updateFields(_0x339350)}};}export const roleUpdate={'service':a55_0x116258(0x110),'command':a55_0x116258(0x106),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role','risk':a55_0x116258(0x114),'confirmationDescription':a55_0x116258(0x10c),'flags':[ROLE_ID_FLAG,{'name':a55_0x116258(0x107),'type':a55_0x116258(0xf5),'description':a55_0x116258(0xf7)},{'name':a55_0x116258(0x10e),'type':'string','description':a55_0x116258(0x10f)}],async 'validate'(_0x722717){updateFields(_0x722717);},async 'dryRun'(_0x758bb5){const _0x459b04=a55_0x116258,{body:_0x3220f9}=await prepare(_0x758bb5);return dryRun(_0x459b04(0x108),_0x459b04(0xfd))[_0x459b04(0x113)](_0x3220f9)[_0x459b04(0x103)](_0x459b04(0xf8))[_0x459b04(0xf6)]();},async 'execute'(_0x4f3655){const _0x56e00d=a55_0x116258,{role:_0x8251ec,body:_0x50b2ba}=await prepare(_0x4f3655),_0x31b267=await updateRuntimeAppRole(_0x50b2ba);return{'ok':!![],'data':runtimeRoleWriteResult(_0x56e00d(0x106),{'roleId':_0x8251ec['id']},projectRuntimeRole(_0x8251ec),projectRuntimeRole(_0x31b267),{'method':_0x56e00d(0x108),'path':_0x56e00d(0xfd)})};}};function a55_0x2904(){const _0xe14024=['string','build','New\x20role\x20name','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','307344JwRrPl','validation','str','flag','/client/permit/role/update','--remark\x20must\x20not\x20be\x20blank.','trim','9353690roWLUU','appCode','76jswvQV','description','35985FNJOgj','835068FkxLYB','update','name','POST','33257OBFhxL','9wgVYED','Pass\x20--name\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','Changes\x20the\x20custom\x20role\x20name\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20display\x20updates\x20immediately.','1129645XDesfe','remark','New\x20non-empty\x20role\x20remark','role','490645HYKTjA','464ekPmYS','body','high-risk-write','--name\x20must\x20not\x20be\x20blank.'];a55_0x2904=function(){return _0xe14024;};return a55_0x2904();}
@@ -1 +1 @@
1
- const a56_0x901b76=a56_0x3c07;(function(_0x32c58d,_0x39d449){const _0xde02f8=a56_0x3c07,_0x33d59d=_0x32c58d();while(!![]){try{const _0x52e310=parseInt(_0xde02f8(0x12f))/0x1+-parseInt(_0xde02f8(0x12d))/0x2*(-parseInt(_0xde02f8(0x130))/0x3)+-parseInt(_0xde02f8(0x133))/0x4*(parseInt(_0xde02f8(0x120))/0x5)+parseInt(_0xde02f8(0x11f))/0x6*(parseInt(_0xde02f8(0x129))/0x7)+-parseInt(_0xde02f8(0x11b))/0x8+-parseInt(_0xde02f8(0x121))/0x9*(-parseInt(_0xde02f8(0x125))/0xa)+-parseInt(_0xde02f8(0x132))/0xb;if(_0x52e310===_0x39d449)break;else _0x33d59d['push'](_0x33d59d['shift']());}catch(_0x59a690){_0x33d59d['push'](_0x33d59d['shift']());}}}(a56_0x26f3,0xa09fa));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a56_0x26f3(){const _0x4ea8d0=['1073418GJSCWT','roleList','8341322UPQZGg','65180EoCuNZ','before','user-add','5447688JXPNxK','after','POST','build','18186aATciT','170aBYsoO','5094fwWnHh','description','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','Preview:\x20add\x20runtime\x20role\x20member','16070YyuzlZ','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','appCode','shouldWrite','1575xlAQpx','role','userId','warnings','4tsrGsW','high-risk-write','344058xaQVfj'];a56_0x26f3=function(){return _0x4ea8d0;};return a56_0x26f3();}import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a56_0x3c07(_0x34f7c5,_0x3cf7c2){_0x34f7c5=_0x34f7c5-0x11a;const _0x26f337=a56_0x26f3();let _0x3c0796=_0x26f337[_0x34f7c5];return _0x3c0796;}export const roleUserAdd={'service':a56_0x901b76(0x12a),'command':a56_0x901b76(0x11a),'description':a56_0x901b76(0x123),'risk':a56_0x901b76(0x12e),'confirmationDescription':a56_0x901b76(0x126),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x3dff23){const _0x47a87f=a56_0x901b76,_0x19a8bf=await prepareRuntimeMemberMutation(_0x3dff23,_0x47a87f(0x11a));return dryRun(_0x47a87f(0x11d),'/client/permit/user-role/update-user-list')['body']({'appCode':_0x3dff23['appCode'],'roleList':_0x19a8bf[_0x47a87f(0x131)]})[_0x47a87f(0x122)](_0x19a8bf[_0x47a87f(0x128)]?_0x47a87f(0x124):_0x19a8bf[_0x47a87f(0x12c)][0x0])[_0x47a87f(0x11e)]();},async 'execute'(_0x4c8cd2){const _0x3558b5=a56_0x901b76,_0x34d11e=await prepareRuntimeMemberMutation(_0x4c8cd2,'user-add');return _0x34d11e[_0x3558b5(0x128)]&&await updateRuntimeRoleUsers(_0x4c8cd2[_0x3558b5(0x127)],_0x34d11e[_0x3558b5(0x131)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x3558b5(0x11a),{'roleId':_0x34d11e[_0x3558b5(0x12a)]['id'],'userId':_0x34d11e[_0x3558b5(0x12b)]},_0x34d11e[_0x3558b5(0x134)],_0x34d11e[_0x3558b5(0x11c)],{'method':'POST','path':'/client/permit/user-role/update-user-list'},_0x34d11e[_0x3558b5(0x12c)])};}};
1
+ function a56_0x110c(_0x431602,_0x626b49){_0x431602=_0x431602-0x1f2;const _0xe89704=a56_0xe897();let _0x110c64=_0xe89704[_0x431602];return _0x110c64;}const a56_0x547251=a56_0x110c;(function(_0x33ae53,_0x122450){const _0xc51753=a56_0x110c,_0x42d600=_0x33ae53();while(!![]){try{const _0x34180f=-parseInt(_0xc51753(0x208))/0x1*(-parseInt(_0xc51753(0x1f9))/0x2)+-parseInt(_0xc51753(0x1f8))/0x3*(-parseInt(_0xc51753(0x1fc))/0x4)+parseInt(_0xc51753(0x206))/0x5*(-parseInt(_0xc51753(0x1fd))/0x6)+parseInt(_0xc51753(0x201))/0x7*(parseInt(_0xc51753(0x1f6))/0x8)+-parseInt(_0xc51753(0x205))/0x9*(-parseInt(_0xc51753(0x1fa))/0xa)+parseInt(_0xc51753(0x200))/0xb+parseInt(_0xc51753(0x203))/0xc*(-parseInt(_0xc51753(0x1f7))/0xd);if(_0x34180f===_0x122450)break;else _0x42d600['push'](_0x42d600['shift']());}catch(_0x4d5d56){_0x42d600['push'](_0x42d600['shift']());}}}(a56_0xe897,0xdd506));function a56_0xe897(){const _0x263302=['body','/client/permit/user-role/update-user-list','after','role','userId','roleList','POST','942352HVsuMb','1948427YdRVTU','3xUCRlP','182508ZEEVcm','7630jkbZqm','high-risk-write','3127660uGKSvf','1068rBbRGd','appCode','warnings','1209263rWLUlT','21workOC','before','180urHFWa','Preview:\x20add\x20runtime\x20role\x20member','16857mvyfyg','4450DaVozX','user-add','7bLUArB'];a56_0xe897=function(){return _0x263302;};return a56_0xe897();}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':a56_0x547251(0x1f2),'command':'user-add','description':'Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','risk':a56_0x547251(0x1fb),'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'(_0x481b6b){const _0x5da7d9=a56_0x547251,_0x2ef63b=await prepareRuntimeMemberMutation(_0x481b6b,'user-add');return dryRun(_0x5da7d9(0x1f5),_0x5da7d9(0x20a))[_0x5da7d9(0x209)]({'appCode':_0x481b6b[_0x5da7d9(0x1fe)],'roleList':_0x2ef63b[_0x5da7d9(0x1f4)]})['description'](_0x2ef63b['shouldWrite']?_0x5da7d9(0x204):_0x2ef63b['warnings'][0x0])['build']();},async 'execute'(_0x51c4b3){const _0x248c7f=a56_0x547251,_0x38607e=await prepareRuntimeMemberMutation(_0x51c4b3,_0x248c7f(0x207));return _0x38607e['shouldWrite']&&await updateRuntimeRoleUsers(_0x51c4b3['appCode'],_0x38607e[_0x248c7f(0x1f4)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x248c7f(0x207),{'roleId':_0x38607e[_0x248c7f(0x1f2)]['id'],'userId':_0x38607e[_0x248c7f(0x1f3)]},_0x38607e[_0x248c7f(0x202)],_0x38607e[_0x248c7f(0x20b)],{'method':'POST','path':'/client/permit/user-role/update-user-list'},_0x38607e[_0x248c7f(0x1ff)])};}};
@@ -1 +1 @@
1
- const a57_0x69d8a1=a57_0xfa67;(function(_0x293bd9,_0x5dbe75){const _0x49ca53=a57_0xfa67,_0x5de5aa=_0x293bd9();while(!![]){try{const _0x1a97be=-parseInt(_0x49ca53(0x1c7))/0x1+-parseInt(_0x49ca53(0x1b2))/0x2*(parseInt(_0x49ca53(0x1b8))/0x3)+-parseInt(_0x49ca53(0x1c3))/0x4+parseInt(_0x49ca53(0x1c0))/0x5*(-parseInt(_0x49ca53(0x1b9))/0x6)+-parseInt(_0x49ca53(0x1b7))/0x7+parseInt(_0x49ca53(0x1b1))/0x8+-parseInt(_0x49ca53(0x1c2))/0x9*(-parseInt(_0x49ca53(0x1c1))/0xa);if(_0x1a97be===_0x5dbe75)break;else _0x5de5aa['push'](_0x5de5aa['shift']());}catch(_0x4d3fd9){_0x5de5aa['push'](_0x5de5aa['shift']());}}}(a57_0x2ee5,0x3b536));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a57_0xfa67(_0x120076,_0xdeea00){_0x120076=_0x120076-0x1b0;const _0x2ee539=a57_0x2ee5();let _0xfa679b=_0x2ee539[_0x120076];return _0xfa679b;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':a57_0x69d8a1(0x1bf),'description':a57_0x69d8a1(0x1ba),'risk':a57_0x69d8a1(0x1be),'confirmationDescription':a57_0x69d8a1(0x1c5),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x4fb345){const _0x171151=a57_0x69d8a1,_0x216de0=await prepareRuntimeMemberMutation(_0x4fb345,'user-remove');return dryRun(_0x171151(0x1b3),_0x171151(0x1c4))['body']({'appCode':_0x4fb345['appCode'],'roleList':_0x216de0[_0x171151(0x1bc)]})['description'](_0x216de0[_0x171151(0x1b6)]?_0x171151(0x1b4):_0x216de0[_0x171151(0x1b5)][0x0])[_0x171151(0x1bb)]();},async 'execute'(_0x4942ac){const _0x340126=a57_0x69d8a1,_0x2f6ce2=await prepareRuntimeMemberMutation(_0x4942ac,_0x340126(0x1bf));return _0x2f6ce2[_0x340126(0x1b6)]&&await updateRuntimeRoleUsers(_0x4942ac['appCode'],_0x2f6ce2[_0x340126(0x1bc)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x340126(0x1bf),{'roleId':_0x2f6ce2[_0x340126(0x1b0)]['id'],'userId':_0x2f6ce2[_0x340126(0x1bd)]},_0x2f6ce2[_0x340126(0x1c6)],_0x2f6ce2['after'],{'method':_0x340126(0x1b3),'path':_0x340126(0x1c4)},_0x2f6ce2['warnings'])};}};function a57_0x2ee5(){const _0x1b2889=['Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','build','roleList','userId','high-risk-write','user-remove','181295uWxlAN','228570xnkPYP','657TrTbjM','1307072IygYbh','/client/permit/user-role/update-user-list','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','before','315728JpgjmI','role','1383640ZDmdUZ','739922EXmowy','POST','Preview:\x20remove\x20runtime\x20role\x20member','warnings','shouldWrite','802858UcxpXB','3NloyKv','78bGZroG'];a57_0x2ee5=function(){return _0x1b2889;};return a57_0x2ee5();}
1
+ const a57_0xca8c53=a57_0x93a9;function a57_0x10c3(){const _0x44c63f=['roleList','shouldWrite','user-remove','before','43Zfablw','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','body','130606vwbSUS','high-risk-write','build','35318nsDJee','143dRWiNR','description','910WGuAON','756896IMjtXJ','userId','56508EPEBOv','Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','15894oQLHcV','/client/permit/user-role/update-user-list','147RozYIc','role','3EBIlUJ','16137UsylgS','775zpJFzd','403HYhZvm','164344RCgGda','warnings','POST','appCode'];a57_0x10c3=function(){return _0x44c63f;};return a57_0x10c3();}(function(_0x1b4806,_0x32a5e7){const _0x1aadca=a57_0x93a9,_0x1d52d0=_0x1b4806();while(!![]){try{const _0x1ee543=parseInt(_0x1aadca(0x7f))/0x1*(parseInt(_0x1aadca(0x85))/0x2)+parseInt(_0x1aadca(0x73))/0x3*(-parseInt(_0x1aadca(0x89))/0x4)+-parseInt(_0x1aadca(0x75))/0x5*(parseInt(_0x1aadca(0x6f))/0x6)+-parseInt(_0x1aadca(0x71))/0x7*(-parseInt(_0x1aadca(0x77))/0x8)+-parseInt(_0x1aadca(0x74))/0x9*(-parseInt(_0x1aadca(0x88))/0xa)+parseInt(_0x1aadca(0x86))/0xb*(-parseInt(_0x1aadca(0x6d))/0xc)+parseInt(_0x1aadca(0x76))/0xd*(-parseInt(_0x1aadca(0x82))/0xe);if(_0x1ee543===_0x32a5e7)break;else _0x1d52d0['push'](_0x1d52d0['shift']());}catch(_0x135af7){_0x1d52d0['push'](_0x1d52d0['shift']());}}}(a57_0x10c3,0x628d4));import{updateRuntimeRoleUsers}from'../../core/api-client.js';function a57_0x93a9(_0xd51880,_0x4be6a2){_0xd51880=_0xd51880-0x6d;const _0x10c31a=a57_0x10c3();let _0x93a9d1=_0x10c31a[_0xd51880];return _0x93a9d1;}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':'role','command':a57_0xca8c53(0x7d),'description':a57_0xca8c53(0x80),'risk':a57_0xca8c53(0x83),'confirmationDescription':a57_0xca8c53(0x6e),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0xb342ee){const _0x10de83=a57_0xca8c53,_0x4fea9d=await prepareRuntimeMemberMutation(_0xb342ee,_0x10de83(0x7d));return dryRun('POST',_0x10de83(0x70))[_0x10de83(0x81)]({'appCode':_0xb342ee[_0x10de83(0x7a)],'roleList':_0x4fea9d[_0x10de83(0x7b)]})[_0x10de83(0x87)](_0x4fea9d[_0x10de83(0x7c)]?'Preview:\x20remove\x20runtime\x20role\x20member':_0x4fea9d[_0x10de83(0x78)][0x0])[_0x10de83(0x84)]();},async 'execute'(_0x148f37){const _0xb4ffb1=a57_0xca8c53,_0x1a535d=await prepareRuntimeMemberMutation(_0x148f37,_0xb4ffb1(0x7d));return _0x1a535d['shouldWrite']&&await updateRuntimeRoleUsers(_0x148f37[_0xb4ffb1(0x7a)],_0x1a535d['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0xb4ffb1(0x7d),{'roleId':_0x1a535d[_0xb4ffb1(0x72)]['id'],'userId':_0x1a535d[_0xb4ffb1(0x8a)]},_0x1a535d[_0xb4ffb1(0x7e)],_0x1a535d['after'],{'method':_0xb4ffb1(0x79),'path':_0xb4ffb1(0x70)},_0x1a535d[_0xb4ffb1(0x78)])};}};
@@ -1 +1 @@
1
- const a58_0xbc541e=a58_0x164e;(function(_0x520010,_0x200c66){const _0x27bc69=a58_0x164e,_0xda8843=_0x520010();while(!![]){try{const _0x18ef2f=-parseInt(_0x27bc69(0x176))/0x1+-parseInt(_0x27bc69(0x185))/0x2*(-parseInt(_0x27bc69(0x154))/0x3)+-parseInt(_0x27bc69(0x182))/0x4+parseInt(_0x27bc69(0x17e))/0x5*(-parseInt(_0x27bc69(0x15c))/0x6)+-parseInt(_0x27bc69(0x179))/0x7+-parseInt(_0x27bc69(0x18b))/0x8+parseInt(_0x27bc69(0x15e))/0x9*(parseInt(_0x27bc69(0x15f))/0xa);if(_0x18ef2f===_0x200c66)break;else _0xda8843['push'](_0xda8843['shift']());}catch(_0x1ce076){_0xda8843['push'](_0xda8843['shift']());}}}(a58_0x143b,0x19afa));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':'string','required':!![],'enum':[a58_0xbc541e(0x184),a58_0xbc541e(0x173)],'description':a58_0xbc541e(0x163)},CRON_FLAG={'name':'cron','type':a58_0xbc541e(0x190),'description':a58_0xbc541e(0x193)},SCHEDULED_AT_FLAG={'name':a58_0xbc541e(0x18f),'type':a58_0xbc541e(0x190),'description':a58_0xbc541e(0x17f)},TITLE_FLAG={'name':a58_0xbc541e(0x157),'type':'string','required':!![],'description':a58_0xbc541e(0x16b)},PROMPT_FLAG={'name':a58_0xbc541e(0x17d),'type':a58_0xbc541e(0x190),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':'model','type':a58_0xbc541e(0x190),'enum':[a58_0xbc541e(0x192),a58_0xbc541e(0x16d),a58_0xbc541e(0x178)],'default':a58_0xbc541e(0x16d),'description':a58_0xbc541e(0x188)},SCHEDULE_ID_FLAG={'name':a58_0xbc541e(0x17a),'type':a58_0xbc541e(0x190),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a58_0xbc541e(0x14f)}},LIMIT_FLAG={'name':a58_0xbc541e(0x151),'type':a58_0xbc541e(0x174),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a58_0xbc541e(0x183),'type':a58_0xbc541e(0x190),'description':a58_0xbc541e(0x152)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a58_0x143b(){const _0x4c49a1=['trim','num','--title\x20must\x20not\x20be\x20blank.','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','run','Queued\x20Task\x20','Schedule\x20title','DELETE','deepseek-v4-flash-0731','Preview:\x20create\x20an\x20Agent\x20schedule','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','length','Schedule\x20input\x20is\x20valid','appCode','ONCE','number','str','55551dVbFIv','/api/harness/apps/','deepseek-v4-pro-0813','558593PIfAWB','schedule-id','\x20from\x20schedule\x20','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','prompt','1945olPSyM','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','delete','POST','47784CwFOEu','cursor','CRON','23362BTZnGJ','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','validation','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','UTC','high-risk-write','539288KMpciQ','build','/schedules','list','scheduled-at','string','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','kimi/k3','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','isSafeInteger','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','description','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','limit','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Preview:\x20delete\x20schedule\x20','15TJEvTX','detail','read','title','schedule','scheduleId','--prompt\x20must\x20not\x20be\x20blank.','body','2058hNUFQp','cron','9cPkJiB','3949390LsOjHw','create','kind','Created\x20','Schedule\x20kind:\x20CRON\x20or\x20ONCE','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.'];a58_0x143b=function(){return _0x4c49a1;};return a58_0x143b();}function readScheduleInput(_0x29498b){const _0x72a9c8=a58_0xbc541e,_0x421766=_0x29498b[_0x72a9c8(0x175)](_0x72a9c8(0x161)),_0x189bb3=_0x29498b[_0x72a9c8(0x175)](_0x72a9c8(0x157))['trim'](),_0x4534f6=_0x29498b['str']('prompt')[_0x72a9c8(0x165)](),_0x3b0195=_0x29498b[_0x72a9c8(0x175)]('model'),_0x46f3cc=_0x29498b[_0x72a9c8(0x175)](_0x72a9c8(0x15d)),_0xcdd597=_0x29498b[_0x72a9c8(0x175)](_0x72a9c8(0x18f));if(!_0x189bb3)throw CliErrors[_0x72a9c8(0x187)](_0x72a9c8(0x167));if(!_0x4534f6)throw CliErrors[_0x72a9c8(0x187)](_0x72a9c8(0x15a));if(_0x421766===_0x72a9c8(0x184)){if(!_0x46f3cc||_0xcdd597)throw CliErrors[_0x72a9c8(0x187)](_0x72a9c8(0x191));return{'kind':_0x421766,'timezone':'UTC','cron':_0x46f3cc,'title':_0x189bb3,'prompt':_0x4534f6,'model':_0x3b0195};}if(_0x421766===_0x72a9c8(0x173)){if(!_0xcdd597||_0x46f3cc)throw CliErrors[_0x72a9c8(0x187)](_0x72a9c8(0x17c));return{'kind':_0x421766,'timezone':_0x72a9c8(0x189),'scheduledAt':_0xcdd597,'title':_0x189bb3,'prompt':_0x4534f6,'model':_0x3b0195};}throw CliErrors[_0x72a9c8(0x187)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x26517f){const _0x263fd8=a58_0xbc541e;return _0x263fd8(0x177)+encodeURIComponent(_0x26517f)+_0x263fd8(0x18d);}function scheduleItemPath(_0x5b60a5,_0x5d2aab){return scheduleCollectionPath(_0x5b60a5)+'/'+encodeURIComponent(_0x5d2aab);}function a58_0x164e(_0x55e82f,_0x5f3c3e){_0x55e82f=_0x55e82f-0x14e;const _0x143ba4=a58_0x143b();let _0x164e21=_0x143ba4[_0x55e82f];return _0x164e21;}const scheduleValidate={'service':a58_0xbc541e(0x158),'command':'validate','description':a58_0xbc541e(0x168),'risk':a58_0xbc541e(0x156),'flags':INPUT_FLAGS,async 'validate'(_0x425627){readScheduleInput(_0x425627);},async 'execute'(_0x53851f){const _0x509523=a58_0xbc541e,_0x47ef1b=readScheduleInput(_0x53851f),_0x527157=await validateRuntimeSchedule(_0x53851f[_0x509523(0x172)],_0x47ef1b);return{'ok':!![],'data':_0x527157,'message':_0x509523(0x171)};}},scheduleCreate={'service':a58_0xbc541e(0x158),'command':a58_0xbc541e(0x160),'description':a58_0xbc541e(0x150),'risk':a58_0xbc541e(0x18a),'confirmationDescription':a58_0xbc541e(0x186),'flags':INPUT_FLAGS,async 'validate'(_0x33ea3a){readScheduleInput(_0x33ea3a);},async 'execute'(_0x56fdf4){const _0x3a6273=a58_0xbc541e,_0x58fd11=readScheduleInput(_0x56fdf4),_0xdd1073=await validateRuntimeSchedule(_0x56fdf4[_0x3a6273(0x172)],_0x58fd11),_0x26c94e=await createRuntimeSchedule(_0x56fdf4[_0x3a6273(0x172)],_0xdd1073);return{'ok':!![],'data':_0x26c94e,'message':_0x3a6273(0x162)+_0x26c94e[_0x3a6273(0x161)]+'\x20schedule\x20'+_0x26c94e[_0x3a6273(0x159)]};},async 'dryRun'(_0x42951b){const _0x397ff8=a58_0xbc541e,_0x2f2b93=readScheduleInput(_0x42951b);return dryRun('POST',scheduleCollectionPath(_0x42951b[_0x397ff8(0x172)]))[_0x397ff8(0x15b)](_0x2f2b93)[_0x397ff8(0x197)](_0x397ff8(0x16e))[_0x397ff8(0x18c)]();}},scheduleList={'service':a58_0xbc541e(0x158),'command':a58_0xbc541e(0x18e),'description':a58_0xbc541e(0x194),'risk':a58_0xbc541e(0x156),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x30886a){const _0x4a2ab1=a58_0xbc541e,_0x5bf6dc=_0x30886a['num'](_0x4a2ab1(0x151));if(!Number[_0x4a2ab1(0x195)](_0x5bf6dc)||_0x5bf6dc<0x1||_0x5bf6dc>0x64)throw CliErrors['validation'](_0x4a2ab1(0x164));const _0x45a489=_0x30886a[_0x4a2ab1(0x175)](_0x4a2ab1(0x183));if(_0x45a489&&(_0x45a489[_0x4a2ab1(0x170)]>0x400||_0x45a489[_0x4a2ab1(0x165)]()!==_0x45a489))throw CliErrors[_0x4a2ab1(0x187)](_0x4a2ab1(0x14e));},async 'execute'(_0x322aff){const _0x3f6b55=a58_0xbc541e,_0x7715ca=_0x322aff[_0x3f6b55(0x175)]('cursor'),_0x1bdef8=await listRuntimeSchedules(_0x322aff[_0x3f6b55(0x172)],{'kind':_0x322aff[_0x3f6b55(0x175)](_0x3f6b55(0x161)),'limit':_0x322aff[_0x3f6b55(0x166)](_0x3f6b55(0x151)),..._0x7715ca?{'cursor':_0x7715ca}:{}});return{'ok':!![],'data':_0x1bdef8};}},scheduleDetail={'service':a58_0xbc541e(0x158),'command':a58_0xbc541e(0x155),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a58_0xbc541e(0x156),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xeb65c8){const _0x2f71a9=a58_0xbc541e,_0x59a3c8=await getRuntimeSchedule(_0xeb65c8['appCode'],_0xeb65c8[_0x2f71a9(0x175)](_0x2f71a9(0x17a)));return{'ok':!![],'data':_0x59a3c8};}},scheduleRun={'service':a58_0xbc541e(0x158),'command':a58_0xbc541e(0x169),'description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':a58_0xbc541e(0x18a),'confirmationDescription':a58_0xbc541e(0x196),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5a03e1){const _0x5714e8=a58_0xbc541e,_0x57925f=_0x5a03e1['str']('schedule-id'),_0x37c39d=await runRuntimeSchedule(_0x5a03e1[_0x5714e8(0x172)],_0x57925f);return{'ok':!![],'data':_0x37c39d,'message':_0x5714e8(0x16a)+_0x37c39d['taskId']+_0x5714e8(0x17b)+_0x57925f};},async 'dryRun'(_0x23dffa){const _0x38f693=a58_0xbc541e,_0x147b9f=_0x23dffa[_0x38f693(0x175)](_0x38f693(0x17a));return dryRun(_0x38f693(0x181),scheduleItemPath(_0x23dffa[_0x38f693(0x172)],_0x147b9f)+'/run')[_0x38f693(0x197)]('Preview:\x20run\x20schedule\x20'+_0x147b9f+'\x20immediately')[_0x38f693(0x18c)]();}},scheduleDelete={'service':a58_0xbc541e(0x158),'command':a58_0xbc541e(0x180),'description':a58_0xbc541e(0x16f),'risk':a58_0xbc541e(0x18a),'confirmationDescription':'Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x23f2c2){const _0x5d99c8=a58_0xbc541e,_0x5dbd4b=_0x23f2c2['str'](_0x5d99c8(0x17a)),_0x1f9d56=await deleteRuntimeSchedule(_0x23f2c2['appCode'],_0x5dbd4b);return{'ok':!![],'data':_0x1f9d56,'message':'Deleted\x20schedule\x20'+_0x5dbd4b};},async 'dryRun'(_0x17cd11){const _0x18beb8=a58_0xbc541e,_0x3a8f59=_0x17cd11[_0x18beb8(0x175)](_0x18beb8(0x17a));return dryRun(_0x18beb8(0x16c),scheduleItemPath(_0x17cd11[_0x18beb8(0x172)],_0x3a8f59))[_0x18beb8(0x197)](_0x18beb8(0x153)+_0x3a8f59)[_0x18beb8(0x18c)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a58_0x19ff61=a58_0x4514;(function(_0x137411,_0x8db248){const _0x3c8d68=a58_0x4514,_0x7ab612=_0x137411();while(!![]){try{const _0x26a537=-parseInt(_0x3c8d68(0xb8))/0x1+parseInt(_0x3c8d68(0xb3))/0x2*(-parseInt(_0x3c8d68(0xaf))/0x3)+parseInt(_0x3c8d68(0xe2))/0x4*(parseInt(_0x3c8d68(0xb2))/0x5)+-parseInt(_0x3c8d68(0xb4))/0x6+-parseInt(_0x3c8d68(0xab))/0x7+parseInt(_0x3c8d68(0xd2))/0x8+parseInt(_0x3c8d68(0xe1))/0x9;if(_0x26a537===_0x8db248)break;else _0x7ab612['push'](_0x7ab612['shift']());}catch(_0x20a711){_0x7ab612['push'](_0x7ab612['shift']());}}}(a58_0x10f6,0x2835f));function a58_0x10f6(){const _0x1fde7b=['high-risk-write','Schedule\x20kind:\x20CRON\x20or\x20ONCE','body','limit','create','2832705hlfNnB','115480HKtlrI','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','cron','kimi/k3','trim','Schedule\x20input\x20is\x20valid','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','UTC','Preview:\x20run\x20schedule\x20','Page\x20size\x20from\x201\x20to\x20100','CRON','build','description','1418536xbzuLr','/schedules','deepseek-v4-flash-0731','ONCE','4938mPgiXB','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Preview:\x20delete\x20schedule\x20','40fcxISB','118bmOSPU','216924Aoyxbm','str','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','Schedule\x20title','252982urFUzk','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','list','read','title','string','POST','kind','--prompt\x20must\x20not\x20be\x20blank.','Deleted\x20schedule\x20','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','--title\x20must\x20not\x20be\x20blank.','/run','DELETE','prompt','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','length','cursor','num','appCode','validation','validate','schedule-id','\x20immediately','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','scheduleId','1663168nAoYla','\x20from\x20schedule\x20','schedule','detail','Queued\x20Task\x20','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','taskId','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'];a58_0x10f6=function(){return _0x1fde7b;};return a58_0x10f6();}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':a58_0x19ff61(0xbf),'type':a58_0x19ff61(0xbd),'required':!![],'enum':[a58_0x19ff61(0xa8),a58_0x19ff61(0xae)],'description':a58_0x19ff61(0xdd)},CRON_FLAG={'name':'cron','type':a58_0x19ff61(0xbd),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a58_0x19ff61(0xbd),'description':a58_0x19ff61(0xa4)},TITLE_FLAG={'name':'title','type':'string','required':!![],'description':a58_0x19ff61(0xb7)},PROMPT_FLAG={'name':a58_0x19ff61(0xc6),'type':a58_0x19ff61(0xbd),'required':!![],'description':a58_0x19ff61(0xdb)},MODEL_FLAG={'name':'model','type':'string','enum':[a58_0x19ff61(0xe6),a58_0x19ff61(0xad),'deepseek-v4-pro-0813'],'default':a58_0x19ff61(0xad),'description':a58_0x19ff61(0xe3)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a58_0x19ff61(0xbd),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a58_0x19ff61(0xda)}},LIMIT_FLAG={'name':a58_0x19ff61(0xdf),'type':'number','default':0x14,'description':a58_0x19ff61(0xa7)},CURSOR_FLAG={'name':a58_0x19ff61(0xc9),'type':a58_0x19ff61(0xbd),'description':a58_0x19ff61(0xd9)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x3ccb23){const _0x5a5976=a58_0x19ff61,_0x252302=_0x3ccb23[_0x5a5976(0xb5)](_0x5a5976(0xbf)),_0x325689=_0x3ccb23[_0x5a5976(0xb5)](_0x5a5976(0xbc))[_0x5a5976(0xe7)](),_0x1d6d49=_0x3ccb23[_0x5a5976(0xb5)](_0x5a5976(0xc6))[_0x5a5976(0xe7)](),_0x4a7c54=_0x3ccb23['str']('model'),_0x3c7f1b=_0x3ccb23['str'](_0x5a5976(0xe5)),_0x3657c4=_0x3ccb23[_0x5a5976(0xb5)]('scheduled-at');if(!_0x325689)throw CliErrors[_0x5a5976(0xcc)](_0x5a5976(0xc3));if(!_0x1d6d49)throw CliErrors['validation'](_0x5a5976(0xc0));if(_0x252302===_0x5a5976(0xa8)){if(!_0x3c7f1b||_0x3657c4)throw CliErrors[_0x5a5976(0xcc)](_0x5a5976(0xb6));return{'kind':_0x252302,'timezone':_0x5a5976(0xa5),'cron':_0x3c7f1b,'title':_0x325689,'prompt':_0x1d6d49,'model':_0x4a7c54};}if(_0x252302===_0x5a5976(0xae)){if(!_0x3657c4||_0x3c7f1b)throw CliErrors['validation']('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x252302,'timezone':_0x5a5976(0xa5),'scheduledAt':_0x3657c4,'title':_0x325689,'prompt':_0x1d6d49,'model':_0x4a7c54};}throw CliErrors[_0x5a5976(0xcc)](_0x5a5976(0xb0));}function scheduleCollectionPath(_0xc75d0d){const _0x3ad5ed=a58_0x19ff61;return'/api/harness/apps/'+encodeURIComponent(_0xc75d0d)+_0x3ad5ed(0xac);}function scheduleItemPath(_0x1d68ce,_0x5ced9b){return scheduleCollectionPath(_0x1d68ce)+'/'+encodeURIComponent(_0x5ced9b);}const scheduleValidate={'service':'schedule','command':a58_0x19ff61(0xcd),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a58_0x19ff61(0xbb),'flags':INPUT_FLAGS,async 'validate'(_0x16d160){readScheduleInput(_0x16d160);},async 'execute'(_0x171d3d){const _0x16e8c5=a58_0x19ff61,_0x4c6a25=readScheduleInput(_0x171d3d),_0x3ded96=await validateRuntimeSchedule(_0x171d3d[_0x16e8c5(0xcb)],_0x4c6a25);return{'ok':!![],'data':_0x3ded96,'message':_0x16e8c5(0xe8)};}},scheduleCreate={'service':'schedule','command':a58_0x19ff61(0xe0),'description':'Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','risk':a58_0x19ff61(0xdc),'confirmationDescription':a58_0x19ff61(0xd0),'flags':INPUT_FLAGS,async 'validate'(_0x3a6b22){readScheduleInput(_0x3a6b22);},async 'execute'(_0xc5b0dd){const _0x43509f=a58_0x19ff61,_0x506dd2=readScheduleInput(_0xc5b0dd),_0x34aff1=await validateRuntimeSchedule(_0xc5b0dd[_0x43509f(0xcb)],_0x506dd2),_0x181a82=await createRuntimeSchedule(_0xc5b0dd[_0x43509f(0xcb)],_0x34aff1);return{'ok':!![],'data':_0x181a82,'message':'Created\x20'+_0x181a82[_0x43509f(0xbf)]+'\x20schedule\x20'+_0x181a82[_0x43509f(0xd1)]};},async 'dryRun'(_0xc56842){const _0x2187dd=a58_0x19ff61,_0x349670=readScheduleInput(_0xc56842);return dryRun(_0x2187dd(0xbe),scheduleCollectionPath(_0xc56842[_0x2187dd(0xcb)]))[_0x2187dd(0xde)](_0x349670)[_0x2187dd(0xaa)]('Preview:\x20create\x20an\x20Agent\x20schedule')['build']();}},scheduleList={'service':a58_0x19ff61(0xd4),'command':a58_0x19ff61(0xba),'description':a58_0x19ff61(0xe4),'risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x1dc3fb){const _0x471722=a58_0x19ff61,_0x575272=_0x1dc3fb[_0x471722(0xca)]('limit');if(!Number['isSafeInteger'](_0x575272)||_0x575272<0x1||_0x575272>0x64)throw CliErrors[_0x471722(0xcc)](_0x471722(0xb9));const _0x550929=_0x1dc3fb[_0x471722(0xb5)](_0x471722(0xc9));if(_0x550929&&(_0x550929[_0x471722(0xc8)]>0x400||_0x550929['trim']()!==_0x550929))throw CliErrors[_0x471722(0xcc)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x3f607b){const _0x55755a=a58_0x19ff61,_0x257d8a=_0x3f607b[_0x55755a(0xb5)](_0x55755a(0xc9)),_0x26dfdc=await listRuntimeSchedules(_0x3f607b[_0x55755a(0xcb)],{'kind':_0x3f607b[_0x55755a(0xb5)](_0x55755a(0xbf)),'limit':_0x3f607b[_0x55755a(0xca)]('limit'),..._0x257d8a?{'cursor':_0x257d8a}:{}});return{'ok':!![],'data':_0x26dfdc};}},scheduleDetail={'service':a58_0x19ff61(0xd4),'command':a58_0x19ff61(0xd5),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a58_0x19ff61(0xbb),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x502aef){const _0x27e7dc=a58_0x19ff61,_0xbca519=await getRuntimeSchedule(_0x502aef['appCode'],_0x502aef[_0x27e7dc(0xb5)](_0x27e7dc(0xce)));return{'ok':!![],'data':_0xbca519};}},scheduleRun={'service':'schedule','command':'run','description':'Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','risk':a58_0x19ff61(0xdc),'confirmationDescription':a58_0x19ff61(0xc2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xd7b05d){const _0x29e81f=a58_0x19ff61,_0x122ba9=_0xd7b05d['str'](_0x29e81f(0xce)),_0x45918f=await runRuntimeSchedule(_0xd7b05d['appCode'],_0x122ba9);return{'ok':!![],'data':_0x45918f,'message':_0x29e81f(0xd6)+_0x45918f[_0x29e81f(0xd8)]+_0x29e81f(0xd3)+_0x122ba9};},async 'dryRun'(_0x2c69a5){const _0x17767b=a58_0x19ff61,_0x4983af=_0x2c69a5[_0x17767b(0xb5)](_0x17767b(0xce));return dryRun(_0x17767b(0xbe),scheduleItemPath(_0x2c69a5['appCode'],_0x4983af)+_0x17767b(0xc4))[_0x17767b(0xaa)](_0x17767b(0xa6)+_0x4983af+_0x17767b(0xcf))[_0x17767b(0xa9)]();}},scheduleDelete={'service':a58_0x19ff61(0xd4),'command':'delete','description':a58_0x19ff61(0xc7),'risk':a58_0x19ff61(0xdc),'confirmationDescription':a58_0x19ff61(0xd7),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5c4029){const _0xc0b334=a58_0x19ff61,_0x323f44=_0x5c4029[_0xc0b334(0xb5)](_0xc0b334(0xce)),_0x4a80f8=await deleteRuntimeSchedule(_0x5c4029[_0xc0b334(0xcb)],_0x323f44);return{'ok':!![],'data':_0x4a80f8,'message':_0xc0b334(0xc1)+_0x323f44};},async 'dryRun'(_0x57450e){const _0x489f60=a58_0x19ff61,_0x400368=_0x57450e[_0x489f60(0xb5)](_0x489f60(0xce));return dryRun(_0x489f60(0xc5),scheduleItemPath(_0x57450e[_0x489f60(0xcb)],_0x400368))[_0x489f60(0xaa)](_0x489f60(0xb1)+_0x400368)[_0x489f60(0xa9)]();}};function a58_0x4514(_0x297289,_0x40d7d0){_0x297289=_0x297289-0xa4;const _0x10f61d=a58_0x10f6();let _0x4514b7=_0x10f61d[_0x297289];return _0x4514b7;}export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- function a59_0x55cb(_0x5f22fa,_0x5a1b1a){_0x5f22fa=_0x5f22fa-0x1a7;const _0x544c09=a59_0x544c();let _0x55cbd1=_0x544c09[_0x5f22fa];return _0x55cbd1;}const a59_0x3432d8=a59_0x55cb;(function(_0x3cc50f,_0x12e5e9){const _0x531c37=a59_0x55cb,_0xaa57b5=_0x3cc50f();while(!![]){try{const _0x48582c=parseInt(_0x531c37(0x1ad))/0x1*(-parseInt(_0x531c37(0x1a9))/0x2)+-parseInt(_0x531c37(0x1b1))/0x3+parseInt(_0x531c37(0x1a7))/0x4*(-parseInt(_0x531c37(0x1a8))/0x5)+parseInt(_0x531c37(0x1b0))/0x6*(-parseInt(_0x531c37(0x1ae))/0x7)+parseInt(_0x531c37(0x1aa))/0x8+parseInt(_0x531c37(0x1b2))/0x9+parseInt(_0x531c37(0x1ac))/0xa;if(_0x48582c===_0x12e5e9)break;else _0xaa57b5['push'](_0xaa57b5['shift']());}catch(_0x4b760f){_0xaa57b5['push'](_0xaa57b5['shift']());}}}(a59_0x544c,0x7a30f));import{buildSchemaPayload}from'../framework/schema-export.js';function a59_0x544c(){const _0x3459dc=['2551820DLhVVR','32emVwrK','484928OZaiwG','export','19441960glEwLf','37952dVhfNK','14fjaWRy','Export\x20machine-readable\x20command\x20schema\x20(JSON)','491070RFJBln','2252235ySbgKk','4749426JbzWeL','read','4xGuaiV'];a59_0x544c=function(){return _0x3459dc;};return a59_0x544c();}async function execute(_0x3f7d2d){const _0xa8315c=await buildSchemaPayload();return{'ok':!![],'data':_0xa8315c};}export const schemaDefinition={'service':'schema','command':a59_0x3432d8(0x1ab),'description':a59_0x3432d8(0x1af),'risk':a59_0x3432d8(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ function a59_0xf268(_0x19b8f2,_0x5ddaf9){_0x19b8f2=_0x19b8f2-0xdd;const _0x174814=a59_0x1748();let _0xf26825=_0x174814[_0x19b8f2];return _0xf26825;}const a59_0x192b5f=a59_0xf268;(function(_0x55a137,_0xbf475f){const _0x7054a4=a59_0xf268,_0x2fce79=_0x55a137();while(!![]){try{const _0x1936ff=-parseInt(_0x7054a4(0xe8))/0x1+-parseInt(_0x7054a4(0xe4))/0x2*(-parseInt(_0x7054a4(0xe0))/0x3)+-parseInt(_0x7054a4(0xdd))/0x4+-parseInt(_0x7054a4(0xe2))/0x5+parseInt(_0x7054a4(0xe6))/0x6*(parseInt(_0x7054a4(0xe3))/0x7)+parseInt(_0x7054a4(0xe5))/0x8*(parseInt(_0x7054a4(0xe1))/0x9)+parseInt(_0x7054a4(0xde))/0xa*(-parseInt(_0x7054a4(0xe7))/0xb);if(_0x1936ff===_0xbf475f)break;else _0x2fce79['push'](_0x2fce79['shift']());}catch(_0x3e12e7){_0x2fce79['push'](_0x2fce79['shift']());}}}(a59_0x1748,0xd551f));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x25ed9d){const _0x1b9190=await buildSchemaPayload();return{'ok':!![],'data':_0x1b9190};}function a59_0x1748(){const _0xd8e87a=['529212OkfAoV','506KQABRg','540778JHtMvJ','1042408inCSTG','294490dPAnva','schema','618HiJghp','18UqTgLn','4626965GUiyNY','119ZxUJOM','15558MfGQvb','3413112YlMyUY'];a59_0x1748=function(){return _0xd8e87a;};return a59_0x1748();}export const schemaDefinition={'service':a59_0x192b5f(0xdf),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x1b79d0,_0x1ba72b){const _0x370121=a60_0x9c62,_0x599094=_0x1b79d0();while(!![]){try{const _0xfb5de5=-parseInt(_0x370121(0x176))/0x1*(-parseInt(_0x370121(0x12a))/0x2)+-parseInt(_0x370121(0x14d))/0x3*(-parseInt(_0x370121(0x13e))/0x4)+-parseInt(_0x370121(0x12b))/0x5+parseInt(_0x370121(0x142))/0x6+parseInt(_0x370121(0x12c))/0x7*(parseInt(_0x370121(0x120))/0x8)+parseInt(_0x370121(0x123))/0x9*(-parseInt(_0x370121(0x173))/0xa)+parseInt(_0x370121(0x14a))/0xb;if(_0xfb5de5===_0x1ba72b)break;else _0x599094['push'](_0x599094['shift']());}catch(_0x5cd955){_0x599094['push'](_0x599094['shift']());}}}(a60_0x1c70,0xbe20f));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 a60_0x9c62(_0x2fb754,_0x3ee86f){_0x2fb754=_0x2fb754-0x11f;const _0x1c70f2=a60_0x1c70();let _0x9c62ac=_0x1c70f2[_0x2fb754];return _0x9c62ac;}import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x1b37c6,_0x291cdc){const _0x56012e=a60_0x9c62,_0x4151cd=listLocalServiceTrees();let _0x1090b3;for(const _0x51f40f of _0x4151cd){const _0x29d601=matchServiceTreeCommand(_0x51f40f,_0x1b37c6);if(!_0x29d601)continue;(!_0x1090b3||_0x29d601[_0x56012e(0x11f)][_0x56012e(0x131)][_0x56012e(0x181)]>_0x1090b3[_0x56012e(0x11f)]['fullPath'][_0x56012e(0x181)])&&(_0x1090b3={'tree':_0x51f40f,'command':_0x29d601['command'],'remainingArgs':_0x29d601[_0x56012e(0x137)]});}if(!_0x1090b3)return undefined;const _0x371050={..._0x291cdc};return applyAppBinding(_0x1090b3[_0x56012e(0x145)],_0x1090b3[_0x56012e(0x11f)],_0x371050),{'definition':buildDynamicCommandDefinition(_0x1090b3[_0x56012e(0x145)],_0x1090b3[_0x56012e(0x11f)]),'args':_0x1090b3[_0x56012e(0x137)],'flags':_0x371050,'tree':_0x1090b3[_0x56012e(0x145)],'command':_0x1090b3[_0x56012e(0x11f)]};}export function generateDynamicServiceHelp(_0x2f6f2f){const _0x523e08=a60_0x9c62,_0x2ca8b4=listLocalServiceTrees()[_0x523e08(0x16b)](_0x11978d=>_0x11978d[_0x523e08(0x148)]['code']===_0x2f6f2f);if(!_0x2ca8b4)return undefined;const _0x52c9f1=[CLI_BIN_NAME+'\x20'+_0x2f6f2f+_0x523e08(0x162),'',_0x2ca8b4[_0x523e08(0x148)][_0x523e08(0x177)]||_0x2f6f2f,_0x2ca8b4['service']['description']?'\x20\x20'+_0x2ca8b4[_0x523e08(0x148)][_0x523e08(0x16a)]:'','',_0x523e08(0x139),..._0x2ca8b4[_0x523e08(0x174)][_0x523e08(0x15c)](_0x1604a5=>{const _0x13d7ce=_0x523e08,_0x2c652f=_0x1604a5[_0x13d7ce(0x131)][_0x13d7ce(0x13d)](0x1)[_0x13d7ce(0x159)]('\x20'),_0x52a831=_0x1604a5['risk']==='read'?'':'\x20['+_0x1604a5[_0x13d7ce(0x157)]+']';return'\x20\x20'+_0x2c652f[_0x13d7ce(0x16e)](0x18)+'\x20'+(_0x1604a5['description']||'')+_0x52a831;}),'','Use\x20`'+CLI_BIN_NAME+_0x523e08(0x154)+_0x2f6f2f+'`\x20to\x20inspect\x20the\x20manifest.'][_0x523e08(0x155)](Boolean);return _0x52c9f1[_0x523e08(0x159)]('\x0a');}function a60_0x1c70(){const _0x2a0981=['padEnd','\x20completed\x20in\x20','bff','type','cliName','3575690lDNWbM','commands','Service\x20command\x20','28199HCtupZ','name','some','bffId','target','validation','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','datatable','ctx.','mapTo','flags','length','required','appCode','command','1930856lwBjCh','push','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','27QjlulK','SERVICE_TREE','\x20\x20\x20\x20functionName:\x20','Preview\x20dynamic\x20service\x20command:\x20','\x20\x20SERVICE\x20TREE\x20TARGET','const','params','10ZImRZQ','4425740CMxoXP','7caGrAN','trim','scriptName','\x20\x20\x20\x20','startsWith','fullPath','read','\x20\x20\x20\x20kind:\x20\x20\x20\x20','args','Unknown\x20appRef\x20\x22','source','remainingArgs','appRef','Commands:','entries','fromEntries','tableName','slice','1002548KPBQnI','env','\x20\x20\x20\x20datasetCode:\x20','string','3981960LTbfFg','datasetCode','Unsupported\x20service\x20target\x20kind:\x20','tree','flatMap','now','service','loginName','15839703eZBpoX','\x20\x20\x20\x20datatable:\x20','\x20\x20MAP\x20TO','3eSJOuh','\x22.\x20','code','\x22\x20in\x20service\x20command\x20','userName','bffCode','kind','\x20service\x20detail\x20--service\x20','filter','data','risk','nickname','join','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','Run\x20service\x20command\x20','map','\x20->\x20','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','nickName','cliPath','\x20<command>\x20[flags]','envName','high-risk-write','employeeId','operator','sql','app','\x20\x20\x20\x20command:\x20','description','find','default','sqlCode'];a60_0x1c70=function(){return _0x2a0981;};return a60_0x1c70();}export function listDynamicServiceEntries(){const _0x511c57=a60_0x9c62;return listLocalServices()[_0x511c57(0x15c)](_0x134ca0=>{const _0x56c10c=_0x511c57,_0x3dbe3f=_0x134ca0['normalizedManifest'];return{'service':_0x3dbe3f[_0x56c10c(0x148)][_0x56c10c(0x14f)],'label':_0x3dbe3f[_0x56c10c(0x148)][_0x56c10c(0x177)]||_0x3dbe3f[_0x56c10c(0x148)][_0x56c10c(0x14f)],'commands':_0x3dbe3f['commands'][_0x56c10c(0x15c)](_0x2bda06=>({'command':dynamicCommandName(_0x2bda06),'description':_0x2bda06[_0x56c10c(0x16a)]||_0x56c10c(0x15b)+_0x2bda06[_0x56c10c(0x161)],'tag':riskTag(_0x2bda06[_0x56c10c(0x157)])}))};});}export function getDynamicServiceEntry(_0x3a0db1){const _0x16ec70=a60_0x9c62;return listDynamicServiceEntries()[_0x16ec70(0x16b)](_0x3b6ac9=>_0x3b6ac9[_0x16ec70(0x148)]===_0x3a0db1);}export function listDynamicServiceDefinitions(_0x133f80){const _0x3e708f=a60_0x9c62;return listLocalServiceTrees()[_0x3e708f(0x155)](_0x222923=>!_0x133f80||_0x222923[_0x3e708f(0x148)][_0x3e708f(0x14f)]===_0x133f80)[_0x3e708f(0x146)](_0x20b421=>_0x20b421[_0x3e708f(0x174)]['map'](_0x534646=>buildDynamicCommandDefinition(_0x20b421,_0x534646)));}export function getDynamicServiceDefinitions(_0x55790c){const _0x52050a=a60_0x9c62,_0x73b5ac=listDynamicServiceDefinitions(_0x55790c);return _0x73b5ac[_0x52050a(0x181)]>0x0?_0x73b5ac:undefined;}export function findDynamicServiceDefinition(_0x32415d,_0x110a3f){const _0x23d059=a60_0x9c62;return listDynamicServiceDefinitions(_0x32415d)[_0x23d059(0x16b)](_0x41dbbb=>_0x41dbbb[_0x23d059(0x11f)]===_0x110a3f);}export function buildDynamicCommandDefinition(_0x1ac1d2,_0x1d3225){const _0x38021c=a60_0x9c62;return{'service':_0x1ac1d2['service'][_0x38021c(0x14f)],'command':dynamicCommandName(_0x1d3225),'description':_0x1d3225['description']||_0x38021c(0x15b)+_0x1d3225['cliPath'],'risk':_0x1d3225[_0x38021c(0x157)],..._0x1d3225[_0x38021c(0x157)]==='read'?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x1d3225)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x1d3225[_0x38021c(0x134)]['map'](_0x392865=>({'name':_0x392865[_0x38021c(0x177)],'description':_0x392865[_0x38021c(0x16a)]||_0x392865[_0x38021c(0x177)],'required':_0x392865[_0x38021c(0x182)]})),'flags':_0x1d3225[_0x38021c(0x180)][_0x38021c(0x15c)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x1d3225),async 'dryRun'(_0x4e7564){const _0x5d3f45=_0x38021c,_0x96f53f=await compilePlan(_0x1d3225,_0x4e7564);return{'method':_0x5d3f45(0x124),'url':_0x1d3225[_0x5d3f45(0x161)],'body':{'target':targetPreview(_0x96f53f),'params':_0x96f53f[_0x5d3f45(0x129)]},'description':_0x5d3f45(0x126)+_0x1d3225[_0x5d3f45(0x161)]};},async 'execute'(_0x1a3f72){const _0x3c4112=_0x38021c,_0x21f929=await compilePlan(_0x1d3225,_0x1a3f72),_0x784b8a=Date['now'](),_0x389f99=await executePlan(_0x21f929,_0x1d3225,_0x1a3f72),_0x921021=Date[_0x3c4112(0x147)]()-_0x784b8a;return{'ok':!![],'data':{'service':_0x1ac1d2[_0x3c4112(0x148)],'command':_0x1d3225[_0x3c4112(0x161)],'target':targetPreview(_0x21f929),'result':_0x389f99,'elapsed':_0x921021},'message':'Service\x20command\x20'+_0x1d3225['cliPath']+_0x3c4112(0x16f)+_0x921021+'ms'};}};}function buildDynamicConfirmationDescription(_0x1dd291){const _0xba9f93=a60_0x9c62,_0x96c054=_0x1dd291[_0xba9f93(0x16a)]||_0x1dd291['cliPath'],_0x34c8d0=_0x1dd291[_0xba9f93(0x157)]===_0xba9f93(0x164)?_0xba9f93(0x122):'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.';return _0xba9f93(0x15f)+_0x96c054+_0xba9f93(0x14e)+_0x34c8d0;}function dynamicCommandName(_0x25a9b2){const _0x2aa826=a60_0x9c62;return _0x25a9b2[_0x2aa826(0x131)][_0x2aa826(0x13d)](0x1)[_0x2aa826(0x159)]('\x20');}function riskTag(_0x3c460f){const _0x58971b=a60_0x9c62;return _0x3c460f===_0x58971b(0x132)?'':'\x20\x20['+_0x3c460f+']';}function flagToCommandFlag(_0x3241c1){const _0x4626b4=a60_0x9c62;return{'name':_0x3241c1[_0x4626b4(0x172)],'type':_0x3241c1[_0x4626b4(0x171)]==='json'?_0x4626b4(0x141):_0x3241c1[_0x4626b4(0x171)],'description':_0x3241c1[_0x4626b4(0x16a)]||_0x3241c1[_0x4626b4(0x177)],'required':_0x3241c1[_0x4626b4(0x182)],'default':isPrimitiveFlagDefault(_0x3241c1[_0x4626b4(0x16c)])?_0x3241c1[_0x4626b4(0x16c)]:undefined,'enum':_0x3241c1['enum']};}async function compilePlan(_0x186faa,_0x1d8b85){const _0x442739=a60_0x9c62;return compileServiceTreeCommand(_0x186faa,{'flags':_0x1d8b85['rawFlags'],'args':_0x1d8b85[_0x442739(0x134)],'context':await buildServiceContext(_0x186faa,_0x1d8b85)});}async function buildServiceContext(_0x25c919,_0x3371b4){const _0x4e7b60=a60_0x9c62,_0x14459b={'appCode':_0x3371b4[_0x4e7b60(0x183)],'env':_0x3371b4['envName'],'envName':_0x3371b4[_0x4e7b60(0x163)]};if(!usesRuntimeContext(_0x25c919))return _0x14459b;const _0x128bcd=await getLoginUserInfo(),_0x42d82d=pickFirst(_0x128bcd['userId'],_0x128bcd['id']);return{..._0x14459b,'user':_0x128bcd,'userId':_0x42d82d,'id':_0x128bcd['id'],'username':pickFirst(_0x128bcd['username'],_0x128bcd[_0x4e7b60(0x151)],_0x128bcd[_0x4e7b60(0x149)]),'userName':_0x128bcd['userName'],'nickname':pickFirst(_0x128bcd[_0x4e7b60(0x158)],_0x128bcd['nickName']),'nickName':_0x128bcd[_0x4e7b60(0x160)],'tenantCode':_0x128bcd['tenantCode'],'employeeId':_0x128bcd[_0x4e7b60(0x165)]};}function usesRuntimeContext(_0x43515f){const _0x1df44a=a60_0x9c62;return _0x43515f['mapTo'][_0x1df44a(0x178)](_0x338b50=>typeof _0x338b50[_0x1df44a(0x136)]===_0x1df44a(0x141)&&(_0x338b50[_0x1df44a(0x136)][_0x1df44a(0x130)]('context.')||_0x338b50[_0x1df44a(0x136)]['startsWith'](_0x1df44a(0x17e))));}function pickFirst(..._0xbc8018){const _0x3b2a82=a60_0x9c62;return _0xbc8018[_0x3b2a82(0x16b)](_0x180fe1=>_0x180fe1!==undefined&&_0x180fe1!==null);}async function executePlan(_0x4641d1,_0x3b068d,_0x2cb028){const _0x1a3480=a60_0x9c62;if(_0x4641d1[_0x1a3480(0x153)]===_0x1a3480(0x156)){const _0x20e94a=await resolveDatasetCode(_0x4641d1,_0x3b068d,_0x2cb028);return executeData(_0x20e94a,_0x4641d1['command'],_0x4641d1[_0x1a3480(0x129)]);}if(_0x4641d1['kind']===_0x1a3480(0x167)){if(!_0x4641d1[_0x1a3480(0x16d)])throw CliErrors['validation'](_0x1a3480(0x175)+_0x3b068d[_0x1a3480(0x161)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x4641d1[_0x1a3480(0x16d)],normalizeScalarParams(_0x4641d1['params']));}if(_0x4641d1['kind']===_0x1a3480(0x170)){const _0x3a9fa8=_0x4641d1['scriptName']||_0x4641d1['bffCode']||(_0x4641d1['bffId']==null?'':String(_0x4641d1[_0x1a3480(0x179)]));if(!_0x3a9fa8)throw CliErrors[_0x1a3480(0x17b)](_0x1a3480(0x175)+_0x3b068d[_0x1a3480(0x161)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0x3a9fa8,_0x4641d1[_0x1a3480(0x129)]);}throw CliErrors['validation'](_0x1a3480(0x144)+_0x4641d1['kind']);}async function resolveDatasetCode(_0x3b79c8,_0x21f8d3,_0x15b17f){const _0x56ddd6=a60_0x9c62;if(_0x3b79c8[_0x56ddd6(0x143)])return _0x3b79c8['datasetCode'];if(!_0x3b79c8[_0x56ddd6(0x17d)])throw CliErrors[_0x56ddd6(0x17b)](_0x56ddd6(0x175)+_0x21f8d3[_0x56ddd6(0x161)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x2e972c=await listDatasets(_0x15b17f[_0x56ddd6(0x183)]),_0x124f0f=_0x2e972c['find'](_0x2c84ce=>_0x2c84ce['dbtableConfig']?.[_0x56ddd6(0x13c)]===_0x3b79c8[_0x56ddd6(0x17d)]);if(!_0x124f0f?.[_0x56ddd6(0x14f)])throw CliErrors[_0x56ddd6(0x17b)]('Cannot\x20resolve\x20datatable\x20\x22'+_0x3b79c8[_0x56ddd6(0x17d)]+_0x56ddd6(0x15e)+_0x15b17f['appCode']+'.',_0x56ddd6(0x15a));return _0x124f0f[_0x56ddd6(0x14f)];}function applyAppBinding(_0x3f52df,_0x12161b,_0x182a3b){const _0x475428=a60_0x9c62,_0x5b4311=_0x12161b[_0x475428(0x17a)][_0x475428(0x138)];if(!_0x5b4311)return;const _0x4b8acd=_0x3f52df['appBindings'][_0x5b4311];if(!_0x4b8acd)throw CliErrors['validation'](_0x475428(0x135)+_0x5b4311+_0x475428(0x150)+_0x12161b[_0x475428(0x161)]+'.',_0x475428(0x17c));const _0x3fd6ff=_0x4b8acd['appcode']||_0x4b8acd[_0x475428(0x183)];_0x3fd6ff&&!hasText(_0x182a3b['appcode'])&&(_0x182a3b['appcode']=_0x3fd6ff),_0x4b8acd[_0x475428(0x168)]&&!hasText(_0x182a3b['app'])&&!hasText(_0x182a3b['appcode'])&&(_0x182a3b[_0x475428(0x168)]=_0x4b8acd[_0x475428(0x168)]),_0x4b8acd['env']&&!hasText(_0x182a3b[_0x475428(0x13f)])&&(_0x182a3b[_0x475428(0x13f)]=_0x4b8acd['env']);}function renderDynamicCommandHelp(_0x1c6d68){const _0x48be6e=a60_0x9c62,_0x288f7f=[_0x48be6e(0x127),_0x48be6e(0x133)+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x153)],_0x48be6e(0x169)+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x11f)]];if(_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x143)])_0x288f7f['push'](_0x48be6e(0x140)+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x143)]);if(_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x17d)])_0x288f7f[_0x48be6e(0x121)](_0x48be6e(0x14b)+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x17d)]);if(_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x16d)])_0x288f7f[_0x48be6e(0x121)]('\x20\x20\x20\x20sqlCode:\x20'+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x16d)]);if(_0x1c6d68[_0x48be6e(0x17a)]['scriptName'])_0x288f7f[_0x48be6e(0x121)](_0x48be6e(0x125)+_0x1c6d68[_0x48be6e(0x17a)][_0x48be6e(0x12e)]);if(_0x1c6d68[_0x48be6e(0x17f)][_0x48be6e(0x181)]>0x0){_0x288f7f[_0x48be6e(0x121)]('',_0x48be6e(0x14c));for(const _0x559d7c of _0x1c6d68[_0x48be6e(0x17f)]){_0x288f7f['push'](_0x48be6e(0x12f)+(_0x559d7c[_0x48be6e(0x136)]||_0x48be6e(0x128))+_0x48be6e(0x15d)+_0x559d7c[_0x48be6e(0x17a)]+(_0x559d7c[_0x48be6e(0x166)]?'.'+_0x559d7c[_0x48be6e(0x166)]:''));}}return _0x288f7f[_0x48be6e(0x159)]('\x0a');}function targetPreview(_0x123178){const _0x2d0117=a60_0x9c62;return{'kind':_0x123178['kind'],'command':_0x123178['command'],'appRef':_0x123178[_0x2d0117(0x138)],'datasetCode':_0x123178[_0x2d0117(0x143)],'datatable':_0x123178[_0x2d0117(0x17d)],'sqlCode':_0x123178[_0x2d0117(0x16d)],'bffCode':_0x123178[_0x2d0117(0x152)],'bffId':_0x123178['bffId'],'functionName':_0x123178[_0x2d0117(0x12e)]};}function normalizeScalarParams(_0x4a7741){const _0x250d05=a60_0x9c62;return Object[_0x250d05(0x13b)](Object[_0x250d05(0x13a)](_0x4a7741)[_0x250d05(0x155)](([,_0x16c8d4])=>typeof _0x16c8d4==='string'||typeof _0x16c8d4==='number'));}function hasText(_0x2942df){const _0x13c557=a60_0x9c62;return typeof _0x2942df==='string'&&_0x2942df[_0x13c557(0x12d)]()['length']>0x0;}function isPrimitiveFlagDefault(_0x4c96cc){const _0x37b97b=a60_0x9c62;return _0x4c96cc===undefined||typeof _0x4c96cc===_0x37b97b(0x141)||typeof _0x4c96cc==='number'||typeof _0x4c96cc==='boolean';}
1
+ (function(_0xae5ba8,_0x176630){const _0x549870=a60_0x481b,_0x41d920=_0xae5ba8();while(!![]){try{const _0x35840a=-parseInt(_0x549870(0x17e))/0x1+parseInt(_0x549870(0x18e))/0x2*(parseInt(_0x549870(0x161))/0x3)+-parseInt(_0x549870(0x1a2))/0x4+-parseInt(_0x549870(0x178))/0x5*(-parseInt(_0x549870(0x1a3))/0x6)+-parseInt(_0x549870(0x180))/0x7*(-parseInt(_0x549870(0x19a))/0x8)+parseInt(_0x549870(0x15b))/0x9*(parseInt(_0x549870(0x169))/0xa)+parseInt(_0x549870(0x185))/0xb*(-parseInt(_0x549870(0x176))/0xc);if(_0x35840a===_0x176630)break;else _0x41d920['push'](_0x41d920['shift']());}catch(_0x74d19){_0x41d920['push'](_0x41d920['shift']());}}}(a60_0x5b53,0xb1356));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';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x25716a,_0x25dfd3){const _0x59fcac=a60_0x481b,_0x1b539c=listLocalServiceTrees();let _0x4fd831;for(const _0x3bda03 of _0x1b539c){const _0x216059=matchServiceTreeCommand(_0x3bda03,_0x25716a);if(!_0x216059)continue;(!_0x4fd831||_0x216059[_0x59fcac(0x184)]['fullPath'][_0x59fcac(0x168)]>_0x4fd831[_0x59fcac(0x184)][_0x59fcac(0x18c)]['length'])&&(_0x4fd831={'tree':_0x3bda03,'command':_0x216059['command'],'remainingArgs':_0x216059['remainingArgs']});}if(!_0x4fd831)return undefined;const _0xf18f27={..._0x25dfd3};return applyAppBinding(_0x4fd831[_0x59fcac(0x1ab)],_0x4fd831['command'],_0xf18f27),{'definition':buildDynamicCommandDefinition(_0x4fd831[_0x59fcac(0x1ab)],_0x4fd831[_0x59fcac(0x184)]),'args':_0x4fd831[_0x59fcac(0x154)],'flags':_0xf18f27,'tree':_0x4fd831[_0x59fcac(0x1ab)],'command':_0x4fd831[_0x59fcac(0x184)]};}export function generateDynamicServiceHelp(_0x34319f){const _0x62018f=a60_0x481b,_0x1f8d4d=listLocalServiceTrees()[_0x62018f(0x151)](_0x3e9a62=>_0x3e9a62[_0x62018f(0x160)][_0x62018f(0x1a9)]===_0x34319f);if(!_0x1f8d4d)return undefined;const _0x3394f9=[CLI_BIN_NAME+'\x20'+_0x34319f+_0x62018f(0x17a),'',_0x1f8d4d[_0x62018f(0x160)]['name']||_0x34319f,_0x1f8d4d[_0x62018f(0x160)][_0x62018f(0x195)]?'\x20\x20'+_0x1f8d4d[_0x62018f(0x160)][_0x62018f(0x195)]:'','',_0x62018f(0x162),..._0x1f8d4d['commands'][_0x62018f(0x198)](_0x28203c=>{const _0x364c8e=_0x62018f,_0x208be6=_0x28203c[_0x364c8e(0x18c)]['slice'](0x1)['join']('\x20'),_0x1ce24c=_0x28203c[_0x364c8e(0x167)]==='read'?'':'\x20['+_0x28203c[_0x364c8e(0x167)]+']';return'\x20\x20'+_0x208be6['padEnd'](0x18)+'\x20'+(_0x28203c[_0x364c8e(0x195)]||'')+_0x1ce24c;}),'',_0x62018f(0x1b0)+CLI_BIN_NAME+_0x62018f(0x1a0)+_0x34319f+_0x62018f(0x148)]['filter'](Boolean);return _0x3394f9[_0x62018f(0x1a5)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x42ca3c=>{const _0x235cd0=a60_0x481b,_0x1563ea=_0x42ca3c[_0x235cd0(0x181)];return{'service':_0x1563ea[_0x235cd0(0x160)][_0x235cd0(0x1a9)],'label':_0x1563ea[_0x235cd0(0x160)][_0x235cd0(0x149)]||_0x1563ea[_0x235cd0(0x160)][_0x235cd0(0x1a9)],'commands':_0x1563ea[_0x235cd0(0x187)][_0x235cd0(0x198)](_0x44447d=>({'command':dynamicCommandName(_0x44447d),'description':_0x44447d['description']||_0x235cd0(0x153)+_0x44447d[_0x235cd0(0x17d)],'tag':riskTag(_0x44447d[_0x235cd0(0x167)])}))};});}export function getDynamicServiceEntry(_0x4891ff){const _0xc06c9c=a60_0x481b;return listDynamicServiceEntries()[_0xc06c9c(0x151)](_0x521eb7=>_0x521eb7['service']===_0x4891ff);}export function listDynamicServiceDefinitions(_0x1f8862){const _0x2d1956=a60_0x481b;return listLocalServiceTrees()[_0x2d1956(0x188)](_0x55bc8a=>!_0x1f8862||_0x55bc8a[_0x2d1956(0x160)][_0x2d1956(0x1a9)]===_0x1f8862)['flatMap'](_0x29d42f=>_0x29d42f['commands']['map'](_0x2aba25=>buildDynamicCommandDefinition(_0x29d42f,_0x2aba25)));}export function getDynamicServiceDefinitions(_0x4ae948){const _0x11464b=listDynamicServiceDefinitions(_0x4ae948);return _0x11464b['length']>0x0?_0x11464b:undefined;}export function findDynamicServiceDefinition(_0x45c8c0,_0x1d33fd){const _0x12f07b=a60_0x481b;return listDynamicServiceDefinitions(_0x45c8c0)['find'](_0x5782b8=>_0x5782b8[_0x12f07b(0x184)]===_0x1d33fd);}export function buildDynamicCommandDefinition(_0x15093c,_0x20b067){const _0x42e5db=a60_0x481b;return{'service':_0x15093c[_0x42e5db(0x160)][_0x42e5db(0x1a9)],'command':dynamicCommandName(_0x20b067),'description':_0x20b067[_0x42e5db(0x195)]||'Run\x20service\x20command\x20'+_0x20b067['cliPath'],'risk':_0x20b067[_0x42e5db(0x167)],..._0x20b067[_0x42e5db(0x167)]==='read'?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x20b067)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x20b067[_0x42e5db(0x1a8)]['map'](_0x2be766=>({'name':_0x2be766[_0x42e5db(0x149)],'description':_0x2be766['description']||_0x2be766[_0x42e5db(0x149)],'required':_0x2be766['required']})),'flags':_0x20b067['flags'][_0x42e5db(0x198)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x20b067),async 'dryRun'(_0x4ebc48){const _0x5b13ad=_0x42e5db,_0x5ab143=await compilePlan(_0x20b067,_0x4ebc48);return{'method':_0x5b13ad(0x16e),'url':_0x20b067[_0x5b13ad(0x17d)],'body':{'target':targetPreview(_0x5ab143),'params':_0x5ab143[_0x5b13ad(0x15d)]},'description':_0x5b13ad(0x14e)+_0x20b067[_0x5b13ad(0x17d)]};},async 'execute'(_0x1cdfd9){const _0x1f0df5=_0x42e5db,_0x19ef9a=await compilePlan(_0x20b067,_0x1cdfd9),_0x1cba85=Date['now'](),_0x8735ab=await executePlan(_0x19ef9a,_0x20b067,_0x1cdfd9),_0xe01a14=Date[_0x1f0df5(0x182)]()-_0x1cba85;return{'ok':!![],'data':{'service':_0x15093c[_0x1f0df5(0x160)],'command':_0x20b067[_0x1f0df5(0x17d)],'target':targetPreview(_0x19ef9a),'result':_0x8735ab,'elapsed':_0xe01a14},'message':_0x1f0df5(0x14d)+_0x20b067['cliPath']+_0x1f0df5(0x15c)+_0xe01a14+'ms'};}};}function buildDynamicConfirmationDescription(_0x4b842a){const _0x56e383=a60_0x481b,_0x4198f3=_0x4b842a[_0x56e383(0x195)]||_0x4b842a['cliPath'],_0x44df30=_0x4b842a[_0x56e383(0x167)]===_0x56e383(0x18f)?'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.':'The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.';return _0x56e383(0x173)+_0x4198f3+_0x56e383(0x150)+_0x44df30;}function dynamicCommandName(_0x26fbc4){const _0xf10600=a60_0x481b;return _0x26fbc4[_0xf10600(0x18c)][_0xf10600(0x16b)](0x1)[_0xf10600(0x1a5)]('\x20');}function riskTag(_0x27c9fc){const _0x10a2b8=a60_0x481b;return _0x27c9fc===_0x10a2b8(0x15f)?'':_0x10a2b8(0x17b)+_0x27c9fc+']';}function flagToCommandFlag(_0x2c375c){const _0x45909a=a60_0x481b;return{'name':_0x2c375c[_0x45909a(0x15a)],'type':_0x2c375c[_0x45909a(0x159)]==='json'?'string':_0x2c375c[_0x45909a(0x159)],'description':_0x2c375c[_0x45909a(0x195)]||_0x2c375c[_0x45909a(0x149)],'required':_0x2c375c[_0x45909a(0x196)],'default':isPrimitiveFlagDefault(_0x2c375c['default'])?_0x2c375c['default']:undefined,'enum':_0x2c375c[_0x45909a(0x1a6)]};}function a60_0x481b(_0x4a7b3c,_0x7d9438){_0x4a7b3c=_0x4a7b3c-0x148;const _0x5b5365=a60_0x5b53();let _0x481ba0=_0x5b5365[_0x4a7b3c];return _0x481ba0;}async function compilePlan(_0x265bfe,_0x23ec41){const _0x199296=a60_0x481b;return compileServiceTreeCommand(_0x265bfe,{'flags':_0x23ec41[_0x199296(0x16a)],'args':_0x23ec41['args'],'context':await buildServiceContext(_0x265bfe,_0x23ec41)});}async function buildServiceContext(_0x1d32b8,_0x1745f6){const _0x1aafb2=a60_0x481b,_0x3a07a6={'appCode':_0x1745f6[_0x1aafb2(0x1b1)],'env':_0x1745f6[_0x1aafb2(0x158)],'envName':_0x1745f6[_0x1aafb2(0x158)]};if(!usesRuntimeContext(_0x1d32b8))return _0x3a07a6;const _0x1f18d0=await getLoginUserInfo(),_0x415313=pickFirst(_0x1f18d0[_0x1aafb2(0x1b3)],_0x1f18d0['id']);return{..._0x3a07a6,'user':_0x1f18d0,'userId':_0x415313,'id':_0x1f18d0['id'],'username':pickFirst(_0x1f18d0['username'],_0x1f18d0[_0x1aafb2(0x156)],_0x1f18d0['loginName']),'userName':_0x1f18d0[_0x1aafb2(0x156)],'nickname':pickFirst(_0x1f18d0[_0x1aafb2(0x16d)],_0x1f18d0[_0x1aafb2(0x19f)]),'nickName':_0x1f18d0[_0x1aafb2(0x19f)],'tenantCode':_0x1f18d0['tenantCode'],'employeeId':_0x1f18d0[_0x1aafb2(0x183)]};}function usesRuntimeContext(_0x2bd49c){const _0x22f91a=a60_0x481b;return _0x2bd49c[_0x22f91a(0x15e)]['some'](_0x4b19be=>typeof _0x4b19be['source']===_0x22f91a(0x174)&&(_0x4b19be[_0x22f91a(0x1af)][_0x22f91a(0x16f)](_0x22f91a(0x186))||_0x4b19be[_0x22f91a(0x1af)][_0x22f91a(0x16f)](_0x22f91a(0x166))));}function a60_0x5b53(){const _0x1787cf=['name','\x20\x20\x20\x20datatable:\x20','Unsupported\x20service\x20target\x20kind:\x20','\x20\x20MAP\x20TO','Service\x20command\x20','Preview\x20dynamic\x20service\x20command:\x20','boolean','\x22.\x20','find','bffCode','Run\x20service\x20command\x20','remainingArgs','scriptName','userName','appRef','envName','type','cliName','9FVXcZf','\x20completed\x20in\x20','params','mapTo','read','service','1402374OhdWsZ','Commands:','appBindings','entries','\x20\x20\x20\x20datasetCode:\x20','ctx.','risk','length','4727250RwhiTj','rawFlags','slice','number','nickname','SERVICE_TREE','startsWith','\x20\x20\x20\x20sqlCode:\x20','data','\x20->\x20','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','string','\x20requires\x20target.functionName.','1343256FSVDof','kind','15SbISFQ','push','\x20<command>\x20[flags]','\x20\x20[','datasetCode','cliPath','294758spoJiH','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','2232818adPaio','normalizedManifest','now','employeeId','command','66zSfdGX','context.','commands','filter','validation','env','target','fullPath','\x22\x20in\x20service\x20command\x20','2UmcuIc','high-risk-write','\x20\x20\x20\x20functionName:\x20','fromEntries','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','bff','datatable','description','required','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','map','\x20requires\x20target.sqlCode.','8ihomIc','dbtableConfig','tableName','operator','appcode','nickName','\x20service\x20detail\x20--service\x20','\x20\x20SERVICE\x20TREE\x20TARGET','2613416JsdXNl','2172858IyShzX','bffId','join','enum','\x20\x20\x20\x20','args','code','sql','tree','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','app','Cannot\x20resolve\x20datatable\x20\x22','source','Use\x20`','appCode','sqlCode','userId','`\x20to\x20inspect\x20the\x20manifest.'];a60_0x5b53=function(){return _0x1787cf;};return a60_0x5b53();}function pickFirst(..._0x234ab6){const _0x271683=a60_0x481b;return _0x234ab6[_0x271683(0x151)](_0x17c809=>_0x17c809!==undefined&&_0x17c809!==null);}async function executePlan(_0x425518,_0x50a59a,_0x20f8db){const _0x1b3cc1=a60_0x481b;if(_0x425518[_0x1b3cc1(0x177)]===_0x1b3cc1(0x171)){const _0x3346cc=await resolveDatasetCode(_0x425518,_0x50a59a,_0x20f8db);return executeData(_0x3346cc,_0x425518['command'],_0x425518[_0x1b3cc1(0x15d)]);}if(_0x425518['kind']===_0x1b3cc1(0x1aa)){if(!_0x425518['sqlCode'])throw CliErrors['validation']('Service\x20command\x20'+_0x50a59a[_0x1b3cc1(0x17d)]+_0x1b3cc1(0x199));return executeSdkSql(_0x425518[_0x1b3cc1(0x1b2)],normalizeScalarParams(_0x425518[_0x1b3cc1(0x15d)]));}if(_0x425518[_0x1b3cc1(0x177)]===_0x1b3cc1(0x193)){const _0x1507cf=_0x425518[_0x1b3cc1(0x155)]||_0x425518[_0x1b3cc1(0x152)]||(_0x425518[_0x1b3cc1(0x1a4)]==null?'':String(_0x425518['bffId']));if(!_0x1507cf)throw CliErrors['validation'](_0x1b3cc1(0x14d)+_0x50a59a[_0x1b3cc1(0x17d)]+_0x1b3cc1(0x175));return executeSdkBff(_0x1507cf,_0x425518['params']);}throw CliErrors[_0x1b3cc1(0x189)](_0x1b3cc1(0x14b)+_0x425518[_0x1b3cc1(0x177)]);}async function resolveDatasetCode(_0x30eed2,_0x41f653,_0x46a382){const _0xe91e4e=a60_0x481b;if(_0x30eed2[_0xe91e4e(0x17c)])return _0x30eed2['datasetCode'];if(!_0x30eed2[_0xe91e4e(0x194)])throw CliErrors[_0xe91e4e(0x189)](_0xe91e4e(0x14d)+_0x41f653[_0xe91e4e(0x17d)]+_0xe91e4e(0x17f));const _0x4bd4e5=await listDatasets(_0x46a382['appCode']),_0x49f739=_0x4bd4e5[_0xe91e4e(0x151)](_0x54c6ae=>_0x54c6ae[_0xe91e4e(0x19b)]?.[_0xe91e4e(0x19c)]===_0x30eed2[_0xe91e4e(0x194)]);if(!_0x49f739?.['code'])throw CliErrors[_0xe91e4e(0x189)](_0xe91e4e(0x1ae)+_0x30eed2['datatable']+_0xe91e4e(0x1ac)+_0x46a382[_0xe91e4e(0x1b1)]+'.',_0xe91e4e(0x192));return _0x49f739['code'];}function applyAppBinding(_0x4cfbf0,_0x561daf,_0x1b5cf3){const _0x3dde1d=a60_0x481b,_0x57f32b=_0x561daf[_0x3dde1d(0x18b)][_0x3dde1d(0x157)];if(!_0x57f32b)return;const _0x3be328=_0x4cfbf0[_0x3dde1d(0x163)][_0x57f32b];if(!_0x3be328)throw CliErrors[_0x3dde1d(0x189)]('Unknown\x20appRef\x20\x22'+_0x57f32b+_0x3dde1d(0x18d)+_0x561daf[_0x3dde1d(0x17d)]+'.',_0x3dde1d(0x197));const _0x185c1b=_0x3be328[_0x3dde1d(0x19e)]||_0x3be328['appCode'];_0x185c1b&&!hasText(_0x1b5cf3[_0x3dde1d(0x19e)])&&(_0x1b5cf3[_0x3dde1d(0x19e)]=_0x185c1b),_0x3be328[_0x3dde1d(0x1ad)]&&!hasText(_0x1b5cf3['app'])&&!hasText(_0x1b5cf3[_0x3dde1d(0x19e)])&&(_0x1b5cf3[_0x3dde1d(0x1ad)]=_0x3be328[_0x3dde1d(0x1ad)]),_0x3be328[_0x3dde1d(0x18a)]&&!hasText(_0x1b5cf3[_0x3dde1d(0x18a)])&&(_0x1b5cf3[_0x3dde1d(0x18a)]=_0x3be328[_0x3dde1d(0x18a)]);}function renderDynamicCommandHelp(_0x45b790){const _0x11966b=a60_0x481b,_0x25f43a=[_0x11966b(0x1a1),'\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0x45b790[_0x11966b(0x18b)][_0x11966b(0x177)],'\x20\x20\x20\x20command:\x20'+_0x45b790['target'][_0x11966b(0x184)]];if(_0x45b790['target'][_0x11966b(0x17c)])_0x25f43a[_0x11966b(0x179)](_0x11966b(0x165)+_0x45b790[_0x11966b(0x18b)]['datasetCode']);if(_0x45b790[_0x11966b(0x18b)][_0x11966b(0x194)])_0x25f43a[_0x11966b(0x179)](_0x11966b(0x14a)+_0x45b790[_0x11966b(0x18b)][_0x11966b(0x194)]);if(_0x45b790[_0x11966b(0x18b)][_0x11966b(0x1b2)])_0x25f43a[_0x11966b(0x179)](_0x11966b(0x170)+_0x45b790[_0x11966b(0x18b)][_0x11966b(0x1b2)]);if(_0x45b790[_0x11966b(0x18b)][_0x11966b(0x155)])_0x25f43a[_0x11966b(0x179)](_0x11966b(0x190)+_0x45b790[_0x11966b(0x18b)][_0x11966b(0x155)]);if(_0x45b790['mapTo'][_0x11966b(0x168)]>0x0){_0x25f43a[_0x11966b(0x179)]('',_0x11966b(0x14c));for(const _0x354540 of _0x45b790[_0x11966b(0x15e)]){_0x25f43a[_0x11966b(0x179)](_0x11966b(0x1a7)+(_0x354540['source']||'const')+_0x11966b(0x172)+_0x354540['target']+(_0x354540[_0x11966b(0x19d)]?'.'+_0x354540[_0x11966b(0x19d)]:''));}}return _0x25f43a[_0x11966b(0x1a5)]('\x0a');}function targetPreview(_0x504ddc){const _0x428c5f=a60_0x481b;return{'kind':_0x504ddc[_0x428c5f(0x177)],'command':_0x504ddc[_0x428c5f(0x184)],'appRef':_0x504ddc['appRef'],'datasetCode':_0x504ddc[_0x428c5f(0x17c)],'datatable':_0x504ddc['datatable'],'sqlCode':_0x504ddc[_0x428c5f(0x1b2)],'bffCode':_0x504ddc[_0x428c5f(0x152)],'bffId':_0x504ddc[_0x428c5f(0x1a4)],'functionName':_0x504ddc[_0x428c5f(0x155)]};}function normalizeScalarParams(_0xcbdfe2){const _0x51a73c=a60_0x481b;return Object[_0x51a73c(0x191)](Object[_0x51a73c(0x164)](_0xcbdfe2)['filter'](([,_0x7c20dd])=>typeof _0x7c20dd===_0x51a73c(0x174)||typeof _0x7c20dd===_0x51a73c(0x16c)));}function hasText(_0x1f205b){const _0x20c702=a60_0x481b;return typeof _0x1f205b===_0x20c702(0x174)&&_0x1f205b['trim']()[_0x20c702(0x168)]>0x0;}function isPrimitiveFlagDefault(_0x2755f9){const _0x3fad1f=a60_0x481b;return _0x2755f9===undefined||typeof _0x2755f9==='string'||typeof _0x2755f9===_0x3fad1f(0x16c)||typeof _0x2755f9===_0x3fad1f(0x14f);}
@@ -1 +1 @@
1
- (function(_0x535b76,_0x4d59f5){const _0x41ec31=a61_0x16ef,_0x5c4de8=_0x535b76();while(!![]){try{const _0x3bcbba=parseInt(_0x41ec31(0x76))/0x1*(-parseInt(_0x41ec31(0x93))/0x2)+parseInt(_0x41ec31(0x7d))/0x3*(parseInt(_0x41ec31(0x94))/0x4)+parseInt(_0x41ec31(0x95))/0x5+parseInt(_0x41ec31(0x92))/0x6+parseInt(_0x41ec31(0x72))/0x7*(parseInt(_0x41ec31(0x8e))/0x8)+parseInt(_0x41ec31(0x91))/0x9*(parseInt(_0x41ec31(0x8a))/0xa)+-parseInt(_0x41ec31(0x71))/0xb;if(_0x3bcbba===_0x4d59f5)break;else _0x5c4de8['push'](_0x5c4de8['shift']());}catch(_0x1a4100){_0x5c4de8['push'](_0x5c4de8['shift']());}}}(a61_0x2419,0x3f78e));export function adaptServiceTreeManifestForLegacyFramework(_0x193cda){const _0x2b4e0d=a61_0x16ef,_0x550da1=cloneJsonValue(_0x193cda),_0x53c47d=[];if(!isObjectRecord(_0x550da1))return{'manifest':_0x550da1,'errors':_0x53c47d};return Array[_0x2b4e0d(0x87)](_0x550da1['commands'])&&_0x550da1[_0x2b4e0d(0x88)][_0x2b4e0d(0x81)]((_0x2c73db,_0x10e179)=>{const _0x1c0092=_0x2b4e0d;if(!isObjectRecord(_0x2c73db))return;adaptBffTarget(_0x2c73db[_0x1c0092(0x8f)],_0x1c0092(0x74)+_0x10e179+_0x1c0092(0x85),_0x53c47d);}),adaptResources(_0x550da1['resources'],_0x2b4e0d(0x73),_0x53c47d),{'manifest':_0x550da1,'errors':_0x53c47d};}export function toPublicServiceTreeTarget(_0x361e3b){const _0x50e5fd=a61_0x16ef,{scriptName:_0x25bf48,..._0x107d60}=_0x361e3b;return typeof _0x25bf48===_0x50e5fd(0x8b)&&_0x25bf48[_0x50e5fd(0x7c)]()&&(_0x107d60[_0x50e5fd(0x86)]=_0x25bf48),_0x107d60;}export function toPublicNormalizedServiceTree(_0x2f7e32){const _0x93c66d=a61_0x16ef;return{..._0x2f7e32,'commands':_0x2f7e32['commands']['map'](_0x47460=>({..._0x47460,'target':toPublicServiceTreeTarget(_0x47460[_0x93c66d(0x8f)])}))};}function adaptResources(_0xfae42e,_0x366e0b,_0x392174){const _0x51ba9e=a61_0x16ef;if(!isObjectRecord(_0xfae42e))return;for(const [_0x74515f,_0x349bd5]of Object['entries'](_0xfae42e)){if(!isObjectRecord(_0x349bd5))continue;const _0x1e4cc9=_0x366e0b+'.'+_0x74515f;if(isObjectRecord(_0x349bd5[_0x51ba9e(0x78)]))for(const [_0x5c97ef,_0x622bc8]of Object[_0x51ba9e(0x7e)](_0x349bd5[_0x51ba9e(0x78)])){if(!isObjectRecord(_0x622bc8))continue;const _0x53643a=_0x1e4cc9+_0x51ba9e(0x7b)+_0x5c97ef,_0x330681=isObjectRecord(_0x622bc8[_0x51ba9e(0x8f)])&&_0x622bc8[_0x51ba9e(0x8f)][_0x51ba9e(0x89)]===_0x51ba9e(0x83);adaptBffTarget(_0x622bc8[_0x51ba9e(0x8f)],_0x53643a+_0x51ba9e(0x79),_0x392174),(_0x330681||isBffAction(_0x622bc8))&&adaptFunctionNameField(_0x622bc8,_0x53643a,_0x392174);}adaptResources(_0x349bd5[_0x51ba9e(0x82)],_0x1e4cc9+_0x51ba9e(0x7f),_0x392174);}}function a61_0x16ef(_0xaf8fb1,_0x144580){_0xaf8fb1=_0xaf8fb1-0x71;const _0x241985=a61_0x2419();let _0x16ef9c=_0x241985[_0xaf8fb1];return _0x16ef9c;}function adaptBffTarget(_0x4bc4b9,_0x2f8a1e,_0x2dd988){const _0xc219e0=a61_0x16ef;if(!isObjectRecord(_0x4bc4b9)||_0x4bc4b9[_0xc219e0(0x89)]!==_0xc219e0(0x83))return;adaptFunctionNameField(_0x4bc4b9,_0x2f8a1e,_0x2dd988);}function adaptFunctionNameField(_0x227b2f,_0x5930f9,_0x20fc6c){const _0x2c95e0=a61_0x16ef;Object[_0x2c95e0(0x80)][_0x2c95e0(0x77)][_0x2c95e0(0x75)](_0x227b2f,_0x2c95e0(0x8c))&&_0x20fc6c[_0x2c95e0(0x8d)]({'level':_0x2c95e0(0x97),'path':_0x5930f9+_0x2c95e0(0x7a),'message':_0x2c95e0(0x96)});if(Object[_0x2c95e0(0x80)][_0x2c95e0(0x77)][_0x2c95e0(0x75)](_0x227b2f,_0x2c95e0(0x86))){if(typeof _0x227b2f[_0x2c95e0(0x86)]!==_0x2c95e0(0x8b)||!_0x227b2f['functionName'][_0x2c95e0(0x7c)]()){_0x20fc6c[_0x2c95e0(0x8d)]({'level':'error','path':_0x5930f9+_0x2c95e0(0x98),'message':'functionName\x20must\x20be\x20a\x20non-empty\x20string.'}),delete _0x227b2f[_0x2c95e0(0x86)];return;}_0x227b2f[_0x2c95e0(0x8c)]=_0x227b2f[_0x2c95e0(0x86)],delete _0x227b2f[_0x2c95e0(0x86)];}}function isBffAction(_0x43c73f){const _0x4479f9=a61_0x16ef;return _0x43c73f['kind']==='bff'||_0x43c73f['action']===_0x4479f9(0x90)||_0x43c73f[_0x4479f9(0x8f)]===_0x4479f9(0x90);}function a61_0x2419(){const _0x4aae47=['2626106qrNCJn','$.resources','$.commands[','call','26781TXbUlY','hasOwnProperty','actions','.target','.scriptName','.actions.','trim','7041TvPhXh','entries','.resources','prototype','forEach','resources','bff','object','].target','functionName','isArray','commands','kind','3613170PkuRDf','string','scriptName','push','8zJxnsQ','target','bff.exec','9llheqd','1023342zWHejG','6ELPssS','28wIRiXU','1182470ZUIZoQ','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','error','.functionName','9015930OZzWCb'];a61_0x2419=function(){return _0x4aae47;};return a61_0x2419();}function cloneJsonValue(_0x27316b){const _0x80b01e=a61_0x16ef;if(Array[_0x80b01e(0x87)](_0x27316b))return _0x27316b['map'](_0x38ec8b=>cloneJsonValue(_0x38ec8b));if(isObjectRecord(_0x27316b))return Object['fromEntries'](Object['entries'](_0x27316b)['map'](([_0x243377,_0x1be9c2])=>[_0x243377,cloneJsonValue(_0x1be9c2)]));return _0x27316b;}function isObjectRecord(_0x22b510){const _0x19c63a=a61_0x16ef;return Boolean(_0x22b510)&&typeof _0x22b510===_0x19c63a(0x84)&&!Array[_0x19c63a(0x87)](_0x22b510);}
1
+ (function(_0x24cc2a,_0x456326){const _0x405df0=a61_0x3d5a,_0x3f530b=_0x24cc2a();while(!![]){try{const _0x1d8bc1=parseInt(_0x405df0(0x8b))/0x1+parseInt(_0x405df0(0x86))/0x2*(-parseInt(_0x405df0(0x90))/0x3)+-parseInt(_0x405df0(0x80))/0x4+-parseInt(_0x405df0(0x88))/0x5+parseInt(_0x405df0(0x78))/0x6*(-parseInt(_0x405df0(0x77))/0x7)+parseInt(_0x405df0(0x97))/0x8+-parseInt(_0x405df0(0x93))/0x9*(-parseInt(_0x405df0(0x7f))/0xa);if(_0x1d8bc1===_0x456326)break;else _0x3f530b['push'](_0x3f530b['shift']());}catch(_0x324b40){_0x3f530b['push'](_0x3f530b['shift']());}}}(a61_0x3973,0x7a6bf));export function adaptServiceTreeManifestForLegacyFramework(_0x494999){const _0x424d65=a61_0x3d5a,_0x4043c2=cloneJsonValue(_0x494999),_0x52bae2=[];if(!isObjectRecord(_0x4043c2))return{'manifest':_0x4043c2,'errors':_0x52bae2};return Array['isArray'](_0x4043c2['commands'])&&_0x4043c2['commands'][_0x424d65(0x95)]((_0x2d4d6b,_0x47d640)=>{const _0x458696=_0x424d65;if(!isObjectRecord(_0x2d4d6b))return;adaptBffTarget(_0x2d4d6b[_0x458696(0x92)],'$.commands['+_0x47d640+_0x458696(0x8a),_0x52bae2);}),adaptResources(_0x4043c2[_0x424d65(0x94)],'$.resources',_0x52bae2),{'manifest':_0x4043c2,'errors':_0x52bae2};}export function toPublicServiceTreeTarget(_0x3d2d6e){const _0x58a7de=a61_0x3d5a,{scriptName:_0x28b686,..._0x3958dc}=_0x3d2d6e;return typeof _0x28b686===_0x58a7de(0x96)&&_0x28b686[_0x58a7de(0x7e)]()&&(_0x3958dc[_0x58a7de(0x9b)]=_0x28b686),_0x3958dc;}export function toPublicNormalizedServiceTree(_0x2c8d6e){const _0x42ad52=a61_0x3d5a;return{..._0x2c8d6e,'commands':_0x2c8d6e[_0x42ad52(0x9e)]['map'](_0x2e7afa=>({..._0x2e7afa,'target':toPublicServiceTreeTarget(_0x2e7afa[_0x42ad52(0x92)])}))};}function a61_0x3973(){const _0x1f016e=['kind','push','trim','330OZrXbA','1584284JWBvOH','.functionName','isArray','.target','actions','.resources','55100RhNBGd','map','4802575iwdMRf','scriptName','].target','211666mhrGYn','.actions.','bff','bff.exec','action','6JmLrqx','.scriptName','target','463779GrnbIQ','resources','forEach','string','2142616xbkQTa','call','error','entries','functionName','prototype','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','commands','7iTNbNC','1601346jXBwkR','hasOwnProperty','functionName\x20must\x20be\x20a\x20non-empty\x20string.','fromEntries'];a61_0x3973=function(){return _0x1f016e;};return a61_0x3973();}function adaptResources(_0xf7183e,_0x513a56,_0x9d1c58){const _0x385bd0=a61_0x3d5a;if(!isObjectRecord(_0xf7183e))return;for(const [_0x2ff93c,_0x2da5da]of Object[_0x385bd0(0x9a)](_0xf7183e)){if(!isObjectRecord(_0x2da5da))continue;const _0x1023a3=_0x513a56+'.'+_0x2ff93c;if(isObjectRecord(_0x2da5da[_0x385bd0(0x84)]))for(const [_0x1d88c5,_0x47de59]of Object['entries'](_0x2da5da[_0x385bd0(0x84)])){if(!isObjectRecord(_0x47de59))continue;const _0x1cb65f=_0x1023a3+_0x385bd0(0x8c)+_0x1d88c5,_0x4548d3=isObjectRecord(_0x47de59[_0x385bd0(0x92)])&&_0x47de59[_0x385bd0(0x92)][_0x385bd0(0x7c)]===_0x385bd0(0x8d);adaptBffTarget(_0x47de59[_0x385bd0(0x92)],_0x1cb65f+_0x385bd0(0x83),_0x9d1c58),(_0x4548d3||isBffAction(_0x47de59))&&adaptFunctionNameField(_0x47de59,_0x1cb65f,_0x9d1c58);}adaptResources(_0x2da5da['resources'],_0x1023a3+_0x385bd0(0x85),_0x9d1c58);}}function adaptBffTarget(_0x3d6896,_0x42c5bb,_0x16fc86){if(!isObjectRecord(_0x3d6896)||_0x3d6896['kind']!=='bff')return;adaptFunctionNameField(_0x3d6896,_0x42c5bb,_0x16fc86);}function adaptFunctionNameField(_0x2a81f0,_0x208302,_0x2cebdb){const _0x377c4e=a61_0x3d5a;Object[_0x377c4e(0x9c)][_0x377c4e(0x79)]['call'](_0x2a81f0,_0x377c4e(0x89))&&_0x2cebdb[_0x377c4e(0x7d)]({'level':_0x377c4e(0x99),'path':_0x208302+_0x377c4e(0x91),'message':_0x377c4e(0x9d)});if(Object[_0x377c4e(0x9c)][_0x377c4e(0x79)][_0x377c4e(0x98)](_0x2a81f0,'functionName')){if(typeof _0x2a81f0[_0x377c4e(0x9b)]!==_0x377c4e(0x96)||!_0x2a81f0[_0x377c4e(0x9b)]['trim']()){_0x2cebdb[_0x377c4e(0x7d)]({'level':_0x377c4e(0x99),'path':_0x208302+_0x377c4e(0x81),'message':_0x377c4e(0x7a)}),delete _0x2a81f0['functionName'];return;}_0x2a81f0[_0x377c4e(0x89)]=_0x2a81f0[_0x377c4e(0x9b)],delete _0x2a81f0[_0x377c4e(0x9b)];}}function a61_0x3d5a(_0x12725b,_0x5e03fa){_0x12725b=_0x12725b-0x77;const _0x3973a1=a61_0x3973();let _0x3d5a3f=_0x3973a1[_0x12725b];return _0x3d5a3f;}function isBffAction(_0x32144c){const _0x5d7890=a61_0x3d5a;return _0x32144c[_0x5d7890(0x7c)]===_0x5d7890(0x8d)||_0x32144c[_0x5d7890(0x8f)]===_0x5d7890(0x8e)||_0x32144c['target']==='bff.exec';}function cloneJsonValue(_0x16f6ee){const _0xde4cc2=a61_0x3d5a;if(Array[_0xde4cc2(0x82)](_0x16f6ee))return _0x16f6ee[_0xde4cc2(0x87)](_0x47c694=>cloneJsonValue(_0x47c694));if(isObjectRecord(_0x16f6ee))return Object[_0xde4cc2(0x7b)](Object['entries'](_0x16f6ee)[_0xde4cc2(0x87)](([_0xf369bd,_0x5627a5])=>[_0xf369bd,cloneJsonValue(_0x5627a5)]));return _0x16f6ee;}function isObjectRecord(_0xd8abd1){const _0x5cf694=a61_0x3d5a;return Boolean(_0xd8abd1)&&typeof _0xd8abd1==='object'&&!Array[_0x5cf694(0x82)](_0xd8abd1);}
@@ -1 +1 @@
1
- const a62_0x228818=a62_0x2f4e;(function(_0xada9ae,_0x23493a){const _0x3fb780=a62_0x2f4e,_0x9f7fa6=_0xada9ae();while(!![]){try{const _0x244825=-parseInt(_0x3fb780(0x125))/0x1*(parseInt(_0x3fb780(0x145))/0x2)+parseInt(_0x3fb780(0x12f))/0x3*(parseInt(_0x3fb780(0x105))/0x4)+-parseInt(_0x3fb780(0x132))/0x5*(-parseInt(_0x3fb780(0x114))/0x6)+-parseInt(_0x3fb780(0x13f))/0x7+-parseInt(_0x3fb780(0x13b))/0x8*(-parseInt(_0x3fb780(0x104))/0x9)+-parseInt(_0x3fb780(0x141))/0xa+parseInt(_0x3fb780(0x144))/0xb*(parseInt(_0x3fb780(0x13a))/0xc);if(_0x244825===_0x23493a)break;else _0x9f7fa6['push'](_0x9f7fa6['shift']());}catch(_0x4066f3){_0x9f7fa6['push'](_0x9f7fa6['shift']());}}}(a62_0x105f,0xbd060));function a62_0x2f4e(_0x3476df,_0x2aeab6){_0x3476df=_0x3476df-0x104;const _0x105ff1=a62_0x105f();let _0x2f4eeb=_0x105ff1[_0x3476df];return _0x2f4eeb;}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':a62_0x228818(0x110),'type':a62_0x228818(0x146),'required':!![],'description':a62_0x228818(0x139)},SERVICE_FLAG={'name':'service','type':a62_0x228818(0x146),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x204dfb){const _0x152aad=a62_0x228818;return{'serviceCode':_0x204dfb[_0x152aad(0x147)],'name':_0x204dfb[_0x152aad(0x10b)][_0x152aad(0x133)]['name'],'version':_0x204dfb[_0x152aad(0x113)],'importedAt':_0x204dfb[_0x152aad(0x13c)],'source':_0x204dfb[_0x152aad(0x12e)],'commandCount':_0x204dfb[_0x152aad(0x10b)][_0x152aad(0x123)]['length'],'commands':_0x204dfb[_0x152aad(0x10b)][_0x152aad(0x123)][_0x152aad(0x11f)](_0x3c30d7=>({'path':_0x3c30d7['cliPath'],'description':_0x3c30d7[_0x152aad(0x10e)],'risk':_0x3c30d7[_0x152aad(0x12b)],'target':toPublicServiceTreeTarget(_0x3c30d7['target']),'flags':_0x3c30d7['flags'][_0x152aad(0x11f)](_0x8bdb00=>({'name':_0x8bdb00[_0x152aad(0x121)],'cliName':_0x8bdb00['cliName'],'type':_0x8bdb00[_0x152aad(0x129)],'required':_0x8bdb00['required']===!![]}))}))};}function a62_0x105f(){const _0x286c06=['Service\x20manifest\x20validation\x20passed.','errors','hash','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Imported\x20','kind','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','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.','map','list','name','\x20service\x20','commands','filePath','31CuEhRX','serviceCount','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','registry','type','entry','risk','str','replaced','source','3904899ZHPkgx','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.','read','1240UITgRM','service','write','detail','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Updated','manifest','Service\x20Tree\x20manifest\x20file\x20path','539940RQYuSy','64iHcIvx','importedAt','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','\x20service(s).','5455520aBPzKQ','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','7112400NBEzjN','length','cliPath','242DHFzTf','83770taKJng','string','serviceCode','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','888066aLSOoE','4NzpQNJ','Removed\x20service\x20','warnings','entries','imported','reduce','normalizedManifest','\x20service(s),\x20updated\x20','report','description','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','file','updated','registryIndex','version','11670OSZsVB','manifests','registryPath'];a62_0x105f=function(){return _0x286c06;};return a62_0x105f();}function summarizeLoadedManifest(_0x1b951f){const _0x1b5643=a62_0x228818;return{'service':_0x1b951f[_0x1b5643(0x10b)]?.['service'],'version':_0x1b951f[_0x1b5643(0x10b)]?.[_0x1b5643(0x113)],'commandCount':_0x1b951f['normalizedManifest']?.[_0x1b5643(0x123)][_0x1b5643(0x142)]??0x0,'commands':_0x1b951f['normalizedManifest']?.[_0x1b5643(0x123)][_0x1b5643(0x11f)](_0x1a10bc=>({'path':_0x1a10bc[_0x1b5643(0x143)],'risk':_0x1a10bc[_0x1b5643(0x12b)],'target':toPublicServiceTreeTarget(_0x1a10bc['target'])}))??[],'registryIndex':_0x1b951f[_0x1b5643(0x112)],'registryServiceCode':_0x1b951f['registryServiceCode'],'errors':_0x1b951f['report']['errors'],'warnings':_0x1b951f['report'][_0x1b5643(0x107)]};}export const serviceDefinitions=[{'service':'service','command':'validate','description':a62_0x228818(0x11d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0xfeca59){const _0x504c0d=a62_0x228818,_0x203174=loadServiceManifestFromFile(_0xfeca59[_0x504c0d(0x12c)](_0x504c0d(0x110)));if(!_0x203174[_0x504c0d(0x10d)]['ok'])return{'ok':![],'data':{'file':_0x203174[_0x504c0d(0x124)],'hash':_0x203174[_0x504c0d(0x119)],'kind':_0x203174[_0x504c0d(0x11c)],'serviceCount':_0x203174[_0x504c0d(0x115)][_0x504c0d(0x142)],'services':_0x203174[_0x504c0d(0x115)]['map'](summarizeLoadedManifest),'errors':_0x203174[_0x504c0d(0x10d)][_0x504c0d(0x118)],'warnings':_0x203174[_0x504c0d(0x10d)][_0x504c0d(0x107)]},'message':formatValidationFailure(_0x203174[_0x504c0d(0x10d)])};if(_0x203174[_0x504c0d(0x11c)]===_0x504c0d(0x128)||_0x203174['manifests'][_0x504c0d(0x142)]!==0x1)return{'ok':!![],'data':{'file':_0x203174['filePath'],'hash':_0x203174['hash'],'kind':_0x203174['kind'],'serviceCount':_0x203174['manifests']['length'],'commandCount':_0x203174[_0x504c0d(0x115)][_0x504c0d(0x10a)]((_0x35ca1b,_0x10b6b7)=>_0x35ca1b+(_0x10b6b7[_0x504c0d(0x10b)]?.[_0x504c0d(0x123)][_0x504c0d(0x142)]??0x0),0x0),'services':_0x203174[_0x504c0d(0x115)]['map'](summarizeLoadedManifest),'warnings':_0x203174[_0x504c0d(0x10d)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x203174['filePath'],'hash':_0x203174[_0x504c0d(0x119)],'kind':_0x203174['kind'],'service':_0x203174[_0x504c0d(0x10b)]?.[_0x504c0d(0x133)],'version':_0x203174['normalizedManifest']?.['version'],'commandCount':_0x203174[_0x504c0d(0x10b)]?.['commands'][_0x504c0d(0x142)]??0x0,'commands':_0x203174[_0x504c0d(0x10b)]?.[_0x504c0d(0x123)][_0x504c0d(0x11f)](_0x58667f=>({'path':_0x58667f[_0x504c0d(0x143)],'risk':_0x58667f[_0x504c0d(0x12b)],'target':toPublicServiceTreeTarget(_0x58667f['target'])})),'warnings':_0x203174[_0x504c0d(0x10d)][_0x504c0d(0x107)]},'message':_0x504c0d(0x117)};}},{'service':a62_0x228818(0x133),'command':'import','description':a62_0x228818(0x136),'risk':a62_0x228818(0x134),'confirmationDescription':a62_0x228818(0x11e),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x1b3abb){const _0x266586=a62_0x228818,_0xc84ed0=loadServiceManifestFromFile(_0x1b3abb[_0x266586(0x12c)](_0x266586(0x110)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0xc84ed0['filePath'],'hash':_0xc84ed0[_0x266586(0x119)],'kind':_0xc84ed0['kind'],'ok':_0xc84ed0['report']['ok'],'service':_0xc84ed0[_0x266586(0x10b)]?.[_0x266586(0x133)],'version':_0xc84ed0[_0x266586(0x10b)]?.[_0x266586(0x113)],'serviceCount':_0xc84ed0['manifests'][_0x266586(0x142)],'services':_0xc84ed0['manifests'][_0x266586(0x11f)](_0xaaf988=>({'service':_0xaaf988[_0x266586(0x10b)]?.[_0x266586(0x133)],'version':_0xaaf988[_0x266586(0x10b)]?.[_0x266586(0x113)],'commandCount':_0xaaf988[_0x266586(0x10b)]?.['commands']['length']??0x0,'errors':_0xaaf988['report'][_0x266586(0x118)]})),'errors':_0xc84ed0[_0x266586(0x10d)][_0x266586(0x118)],'commandCount':_0xc84ed0[_0x266586(0x10b)]?.[_0x266586(0x123)][_0x266586(0x142)]??0x0},'description':_0x266586(0x10f)};},async 'execute'(_0x4045d9){const _0x34f782=a62_0x228818,_0x4635a7=importServiceManifest(_0x4045d9[_0x34f782(0x12c)](_0x34f782(0x110)));if(_0x4635a7[_0x34f782(0x108)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x4635a7['registryPath'],'imported':_0x4635a7['imported'],'updated':_0x4635a7['updated'],'serviceCount':_0x4635a7['serviceCount'],'services':_0x4635a7['entries']['map'](summarizeService)},'message':_0x34f782(0x11b)+_0x4635a7[_0x34f782(0x109)]+_0x34f782(0x10c)+_0x4635a7[_0x34f782(0x111)]+_0x34f782(0x13e)};return{'ok':!![],'data':{'registryPath':_0x4635a7[_0x34f782(0x116)],'replaced':_0x4635a7[_0x34f782(0x12d)],'imported':_0x4635a7[_0x34f782(0x109)],'updated':_0x4635a7[_0x34f782(0x111)],'serviceCount':_0x4635a7[_0x34f782(0x126)],'service':summarizeService(_0x4635a7[_0x34f782(0x12a)])},'message':(_0x4635a7[_0x34f782(0x12d)]?_0x34f782(0x137):'Imported')+_0x34f782(0x122)+_0x4635a7[_0x34f782(0x12a)][_0x34f782(0x147)]+'.'};}},{'service':'service','command':'export','description':a62_0x228818(0x127),'risk':a62_0x228818(0x134),'confirmationDescription':a62_0x228818(0x130),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1c2124){const _0x2ab852=a62_0x228818,_0x5a5178=getLocalServiceEntry(_0x1c2124[_0x2ab852(0x12c)](_0x2ab852(0x133)));return{'method':'WRITE','url':_0x1c2124[_0x2ab852(0x12c)](_0x2ab852(0x110)),'body':{'service':_0x1c2124[_0x2ab852(0x12c)]('service'),'found':Boolean(_0x5a5178),'version':_0x5a5178?.[_0x2ab852(0x113)],'source':_0x5a5178?.[_0x2ab852(0x12e)]},'description':_0x2ab852(0x11a)};},async 'execute'(_0x54b02e){const _0xe07a5f=a62_0x228818,_0x383920=exportServiceManifest(_0x54b02e[_0xe07a5f(0x12c)](_0xe07a5f(0x133)),_0x54b02e[_0xe07a5f(0x12c)](_0xe07a5f(0x110)));return{'ok':!![],'data':{'registryPath':_0x383920[_0xe07a5f(0x116)],'file':_0x383920[_0xe07a5f(0x124)],'service':summarizeService(_0x383920[_0xe07a5f(0x12a)])},'message':'Exported\x20service\x20'+_0x383920[_0xe07a5f(0x12a)][_0xe07a5f(0x147)]+'.'};}},{'service':a62_0x228818(0x133),'command':a62_0x228818(0x120),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x2731b7=a62_0x228818,_0x3f0f8a=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x3f0f8a[_0x2731b7(0x142)],'services':_0x3f0f8a[_0x2731b7(0x11f)](summarizeService)}};}},{'service':'service','command':'remove','description':a62_0x228818(0x13d),'risk':a62_0x228818(0x134),'confirmationDescription':a62_0x228818(0x140),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x37250b){const _0x57e33a=a62_0x228818,_0x4a0a90=getLocalServiceEntry(_0x37250b[_0x57e33a(0x12c)](_0x57e33a(0x133)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x37250b[_0x57e33a(0x12c)]('service'),'found':Boolean(_0x4a0a90),'version':_0x4a0a90?.['version'],'source':_0x4a0a90?.[_0x57e33a(0x12e)]},'description':_0x57e33a(0x148)};},async 'execute'(_0xfc5890){const _0x2decbc=a62_0x228818,_0x59ee29=removeServiceManifest(_0xfc5890[_0x2decbc(0x12c)](_0x2decbc(0x133)));return{'ok':!![],'data':{'registryPath':_0x59ee29[_0x2decbc(0x116)],'serviceCount':_0x59ee29[_0x2decbc(0x126)],'service':summarizeService(_0x59ee29['entry'])},'message':_0x2decbc(0x106)+_0x59ee29[_0x2decbc(0x12a)]['serviceCode']+'.'};}},{'service':'service','command':a62_0x228818(0x135),'description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':a62_0x228818(0x131),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x4c832f){const _0xf2eaa7=a62_0x228818,_0x4d2911=getLocalServiceEntry(_0x4c832f[_0xf2eaa7(0x12c)](_0xf2eaa7(0x133)));if(!_0x4d2911)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x4c832f[_0xf2eaa7(0x12c)](_0xf2eaa7(0x133))},'message':'Local\x20service\x20not\x20found:\x20'+_0x4c832f[_0xf2eaa7(0x12c)](_0xf2eaa7(0x133))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x4d2911),'manifest':_0x4d2911[_0xf2eaa7(0x138)],'normalizedManifest':toPublicNormalizedServiceTree(_0x4d2911[_0xf2eaa7(0x10b)])}};}}];
1
+ const a62_0x259ac9=a62_0x583a;(function(_0x3e23c1,_0x19e89e){const _0x4eb4bd=a62_0x583a,_0x1edfa9=_0x3e23c1();while(!![]){try{const _0x4039bd=parseInt(_0x4eb4bd(0x13a))/0x1*(-parseInt(_0x4eb4bd(0x15e))/0x2)+-parseInt(_0x4eb4bd(0x15a))/0x3*(parseInt(_0x4eb4bd(0x12c))/0x4)+-parseInt(_0x4eb4bd(0x12e))/0x5*(-parseInt(_0x4eb4bd(0x161))/0x6)+parseInt(_0x4eb4bd(0x129))/0x7+-parseInt(_0x4eb4bd(0x14e))/0x8+-parseInt(_0x4eb4bd(0x13d))/0x9*(-parseInt(_0x4eb4bd(0x152))/0xa)+-parseInt(_0x4eb4bd(0x126))/0xb;if(_0x4039bd===_0x19e89e)break;else _0x1edfa9['push'](_0x1edfa9['shift']());}catch(_0x45d5b4){_0x1edfa9['push'](_0x1edfa9['shift']());}}}(a62_0x37e5,0x87e78));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';function a62_0x37e5(){const _0x27a668=['map','10peFXqr','report','remove','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','type','registryPath','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.','Local\x20service\x20code,\x20for\x20example\x20crm','errors','read','updated','length','715783eigOZw','file','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.','1017FbSGhI','\x20service(s).','filePath','serviceCode','registry','entries','name','warnings','list','Exported\x20service\x20','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','hash','imported','flags','WRITE','target','kind','453000FHNjDW','cliPath','lower\x20kebab-case\x20service\x20code','write','21970ejaQOB','commands','Updated','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','service','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Local\x20service\x20not\x20found:\x20','importedAt','11292FUesJt','source','\x20service\x20','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','2sXVoyM','registryServiceCode','str','1654314hCPLef','risk','normalizedManifest','detail','\x20service(s),\x20updated\x20','export','Service\x20Tree\x20manifest\x20file\x20path','Service\x20manifest\x20validation\x20passed.','replaced','version','entry','335698FNxfId','manifests','manifest','4656981WfeAlg','reduce','serviceCount','112XZUXKY'];a62_0x37e5=function(){return _0x27a668;};return a62_0x37e5();}const FILE_FLAG={'name':a62_0x259ac9(0x13b),'type':'string','required':!![],'description':a62_0x259ac9(0x167)},SERVICE_FLAG={'name':a62_0x259ac9(0x156),'type':'string','required':!![],'description':a62_0x259ac9(0x135),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a62_0x259ac9(0x150)}};function summarizeService(_0x2b3944){const _0x429df7=a62_0x259ac9;return{'serviceCode':_0x2b3944[_0x429df7(0x140)],'name':_0x2b3944['normalizedManifest'][_0x429df7(0x156)][_0x429df7(0x143)],'version':_0x2b3944['version'],'importedAt':_0x2b3944[_0x429df7(0x159)],'source':_0x2b3944['source'],'commandCount':_0x2b3944['normalizedManifest'][_0x429df7(0x153)][_0x429df7(0x139)],'commands':_0x2b3944[_0x429df7(0x163)]['commands']['map'](_0x473ba9=>({'path':_0x473ba9[_0x429df7(0x14f)],'description':_0x473ba9['description'],'risk':_0x473ba9['risk'],'target':toPublicServiceTreeTarget(_0x473ba9[_0x429df7(0x14c)]),'flags':_0x473ba9[_0x429df7(0x14a)][_0x429df7(0x12d)](_0x4c4b00=>({'name':_0x4c4b00[_0x429df7(0x143)],'cliName':_0x4c4b00['cliName'],'type':_0x4c4b00[_0x429df7(0x132)],'required':_0x4c4b00['required']===!![]}))}))};}function summarizeLoadedManifest(_0x1b8523){const _0xda4018=a62_0x259ac9;return{'service':_0x1b8523[_0xda4018(0x163)]?.[_0xda4018(0x156)],'version':_0x1b8523[_0xda4018(0x163)]?.[_0xda4018(0x16a)],'commandCount':_0x1b8523[_0xda4018(0x163)]?.[_0xda4018(0x153)]['length']??0x0,'commands':_0x1b8523[_0xda4018(0x163)]?.['commands']['map'](_0x25322b=>({'path':_0x25322b[_0xda4018(0x14f)],'risk':_0x25322b['risk'],'target':toPublicServiceTreeTarget(_0x25322b[_0xda4018(0x14c)])}))??[],'registryIndex':_0x1b8523['registryIndex'],'registryServiceCode':_0x1b8523[_0xda4018(0x15f)],'errors':_0x1b8523[_0xda4018(0x12f)][_0xda4018(0x136)],'warnings':_0x1b8523['report'][_0xda4018(0x144)]};}function a62_0x583a(_0x5d9eba,_0x39a0b0){_0x5d9eba=_0x5d9eba-0x126;const _0x37e521=a62_0x37e5();let _0x583a4e=_0x37e521[_0x5d9eba];return _0x583a4e;}export const serviceDefinitions=[{'service':a62_0x259ac9(0x156),'command':'validate','description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a62_0x259ac9(0x137),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x38e656){const _0x43d826=a62_0x259ac9,_0x7234c6=loadServiceManifestFromFile(_0x38e656[_0x43d826(0x160)](_0x43d826(0x13b)));if(!_0x7234c6['report']['ok'])return{'ok':![],'data':{'file':_0x7234c6[_0x43d826(0x13f)],'hash':_0x7234c6[_0x43d826(0x148)],'kind':_0x7234c6[_0x43d826(0x14d)],'serviceCount':_0x7234c6[_0x43d826(0x127)][_0x43d826(0x139)],'services':_0x7234c6[_0x43d826(0x127)][_0x43d826(0x12d)](summarizeLoadedManifest),'errors':_0x7234c6[_0x43d826(0x12f)][_0x43d826(0x136)],'warnings':_0x7234c6[_0x43d826(0x12f)]['warnings']},'message':formatValidationFailure(_0x7234c6[_0x43d826(0x12f)])};if(_0x7234c6[_0x43d826(0x14d)]===_0x43d826(0x141)||_0x7234c6[_0x43d826(0x127)][_0x43d826(0x139)]!==0x1)return{'ok':!![],'data':{'file':_0x7234c6[_0x43d826(0x13f)],'hash':_0x7234c6[_0x43d826(0x148)],'kind':_0x7234c6['kind'],'serviceCount':_0x7234c6[_0x43d826(0x127)][_0x43d826(0x139)],'commandCount':_0x7234c6[_0x43d826(0x127)][_0x43d826(0x12a)]((_0x770db9,_0x24a29f)=>_0x770db9+(_0x24a29f[_0x43d826(0x163)]?.['commands']['length']??0x0),0x0),'services':_0x7234c6[_0x43d826(0x127)]['map'](summarizeLoadedManifest),'warnings':_0x7234c6[_0x43d826(0x12f)]['warnings']},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x7234c6[_0x43d826(0x13f)],'hash':_0x7234c6[_0x43d826(0x148)],'kind':_0x7234c6[_0x43d826(0x14d)],'service':_0x7234c6['normalizedManifest']?.[_0x43d826(0x156)],'version':_0x7234c6['normalizedManifest']?.[_0x43d826(0x16a)],'commandCount':_0x7234c6[_0x43d826(0x163)]?.[_0x43d826(0x153)][_0x43d826(0x139)]??0x0,'commands':_0x7234c6[_0x43d826(0x163)]?.[_0x43d826(0x153)][_0x43d826(0x12d)](_0x581728=>({'path':_0x581728[_0x43d826(0x14f)],'risk':_0x581728[_0x43d826(0x162)],'target':toPublicServiceTreeTarget(_0x581728[_0x43d826(0x14c)])})),'warnings':_0x7234c6[_0x43d826(0x12f)][_0x43d826(0x144)]},'message':_0x43d826(0x168)};}},{'service':a62_0x259ac9(0x156),'command':'import','description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':a62_0x259ac9(0x151),'confirmationDescription':a62_0x259ac9(0x13c),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5beead){const _0x30055f=a62_0x259ac9,_0x210f6a=loadServiceManifestFromFile(_0x5beead[_0x30055f(0x160)](_0x30055f(0x13b)));return{'method':_0x30055f(0x14b),'url':getServiceRegistryPath(),'body':{'file':_0x210f6a['filePath'],'hash':_0x210f6a[_0x30055f(0x148)],'kind':_0x210f6a[_0x30055f(0x14d)],'ok':_0x210f6a['report']['ok'],'service':_0x210f6a[_0x30055f(0x163)]?.['service'],'version':_0x210f6a[_0x30055f(0x163)]?.[_0x30055f(0x16a)],'serviceCount':_0x210f6a['manifests']['length'],'services':_0x210f6a['manifests'][_0x30055f(0x12d)](_0x1dabd1=>({'service':_0x1dabd1[_0x30055f(0x163)]?.[_0x30055f(0x156)],'version':_0x1dabd1[_0x30055f(0x163)]?.['version'],'commandCount':_0x1dabd1['normalizedManifest']?.[_0x30055f(0x153)]['length']??0x0,'errors':_0x1dabd1[_0x30055f(0x12f)]['errors']})),'errors':_0x210f6a[_0x30055f(0x12f)]['errors'],'commandCount':_0x210f6a[_0x30055f(0x163)]?.[_0x30055f(0x153)][_0x30055f(0x139)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x11474b){const _0x33470c=a62_0x259ac9,_0x3268b2=importServiceManifest(_0x11474b[_0x33470c(0x160)](_0x33470c(0x13b)));if(_0x3268b2[_0x33470c(0x142)][_0x33470c(0x139)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x3268b2['registryPath'],'imported':_0x3268b2[_0x33470c(0x149)],'updated':_0x3268b2[_0x33470c(0x138)],'serviceCount':_0x3268b2[_0x33470c(0x12b)],'services':_0x3268b2['entries']['map'](summarizeService)},'message':'Imported\x20'+_0x3268b2[_0x33470c(0x149)]+_0x33470c(0x165)+_0x3268b2[_0x33470c(0x138)]+_0x33470c(0x13e)};return{'ok':!![],'data':{'registryPath':_0x3268b2['registryPath'],'replaced':_0x3268b2[_0x33470c(0x169)],'imported':_0x3268b2[_0x33470c(0x149)],'updated':_0x3268b2['updated'],'serviceCount':_0x3268b2[_0x33470c(0x12b)],'service':summarizeService(_0x3268b2['entry'])},'message':(_0x3268b2[_0x33470c(0x169)]?_0x33470c(0x154):'Imported')+_0x33470c(0x15c)+_0x3268b2[_0x33470c(0x16b)][_0x33470c(0x140)]+'.'};}},{'service':a62_0x259ac9(0x156),'command':a62_0x259ac9(0x166),'description':a62_0x259ac9(0x131),'risk':a62_0x259ac9(0x151),'confirmationDescription':a62_0x259ac9(0x134),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1c185a){const _0x508939=a62_0x259ac9,_0x55082f=getLocalServiceEntry(_0x1c185a[_0x508939(0x160)](_0x508939(0x156)));return{'method':_0x508939(0x14b),'url':_0x1c185a[_0x508939(0x160)](_0x508939(0x13b)),'body':{'service':_0x1c185a['str'](_0x508939(0x156)),'found':Boolean(_0x55082f),'version':_0x55082f?.['version'],'source':_0x55082f?.[_0x508939(0x15b)]},'description':_0x508939(0x155)};},async 'execute'(_0x3e054d){const _0x5b4f61=a62_0x259ac9,_0x29d455=exportServiceManifest(_0x3e054d[_0x5b4f61(0x160)](_0x5b4f61(0x156)),_0x3e054d['str'](_0x5b4f61(0x13b)));return{'ok':!![],'data':{'registryPath':_0x29d455[_0x5b4f61(0x133)],'file':_0x29d455[_0x5b4f61(0x13f)],'service':summarizeService(_0x29d455[_0x5b4f61(0x16b)])},'message':_0x5b4f61(0x146)+_0x29d455[_0x5b4f61(0x16b)][_0x5b4f61(0x140)]+'.'};}},{'service':a62_0x259ac9(0x156),'command':a62_0x259ac9(0x145),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xfbdcb4=a62_0x259ac9,_0x3e7588=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x3e7588[_0xfbdcb4(0x139)],'services':_0x3e7588[_0xfbdcb4(0x12d)](summarizeService)}};}},{'service':a62_0x259ac9(0x156),'command':a62_0x259ac9(0x130),'description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':a62_0x259ac9(0x151),'confirmationDescription':a62_0x259ac9(0x15d),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x58e497){const _0x1e2370=a62_0x259ac9,_0x1810e7=getLocalServiceEntry(_0x58e497[_0x1e2370(0x160)](_0x1e2370(0x156)));return{'method':_0x1e2370(0x14b),'url':getServiceRegistryPath(),'body':{'service':_0x58e497[_0x1e2370(0x160)](_0x1e2370(0x156)),'found':Boolean(_0x1810e7),'version':_0x1810e7?.[_0x1e2370(0x16a)],'source':_0x1810e7?.['source']},'description':_0x1e2370(0x157)};},async 'execute'(_0x5ef80b){const _0x1dfd3e=a62_0x259ac9,_0x5b279f=removeServiceManifest(_0x5ef80b[_0x1dfd3e(0x160)](_0x1dfd3e(0x156)));return{'ok':!![],'data':{'registryPath':_0x5b279f[_0x1dfd3e(0x133)],'serviceCount':_0x5b279f[_0x1dfd3e(0x12b)],'service':summarizeService(_0x5b279f[_0x1dfd3e(0x16b)])},'message':'Removed\x20service\x20'+_0x5b279f['entry'][_0x1dfd3e(0x140)]+'.'};}},{'service':a62_0x259ac9(0x156),'command':a62_0x259ac9(0x164),'description':a62_0x259ac9(0x147),'risk':a62_0x259ac9(0x137),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x375447){const _0x2b9f1f=a62_0x259ac9,_0x3b2433=getLocalServiceEntry(_0x375447[_0x2b9f1f(0x160)]('service'));if(!_0x3b2433)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x375447[_0x2b9f1f(0x160)]('service')},'message':_0x2b9f1f(0x158)+_0x375447[_0x2b9f1f(0x160)]('service')};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x3b2433),'manifest':_0x3b2433[_0x2b9f1f(0x128)],'normalizedManifest':toPublicNormalizedServiceTree(_0x3b2433[_0x2b9f1f(0x163)])}};}}];
@@ -1 +1 @@
1
- const a63_0x41826b=a63_0x4ea0;(function(_0x4fc57b,_0x5c5241){const _0x53969b=a63_0x4ea0,_0x1c745f=_0x4fc57b();while(!![]){try{const _0x12cbe6=-parseInt(_0x53969b(0x17c))/0x1*(parseInt(_0x53969b(0x183))/0x2)+-parseInt(_0x53969b(0x197))/0x3*(parseInt(_0x53969b(0x1ad))/0x4)+parseInt(_0x53969b(0x182))/0x5*(-parseInt(_0x53969b(0x199))/0x6)+-parseInt(_0x53969b(0x198))/0x7+parseInt(_0x53969b(0x170))/0x8*(parseInt(_0x53969b(0x18d))/0x9)+parseInt(_0x53969b(0x16a))/0xa*(-parseInt(_0x53969b(0x174))/0xb)+parseInt(_0x53969b(0x186))/0xc;if(_0x12cbe6===_0x5c5241)break;else _0x1c745f['push'](_0x1c745f['shift']());}catch(_0x16dc36){_0x1c745f['push'](_0x1c745f['shift']());}}}(a63_0x1bd8,0x58166));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=a63_0x41826b(0x192);function a63_0x1bd8(){const _0x587b3a=['hex','schemaVersion','CliError','missing','description','5xnGvwi','3174tHKXHq','filePath','name','34711848YJHnrt','digest','Remove\x20or\x20migrate\x20','importedAt','validation','isArray','string','9vHglRo','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','cliPath','Local\x20service\x20not\x20found:\x20','service.json','Invalid\x20service\x20manifest\x20JSON:\x20','registryIndex','ENOENT','manifest','213GqjqAP','3425807TegwoT','2421438OeXPeZ','warnings','object','path','trim','message','Invalid\x20service\x20registry\x20JSON:\x20','sha256','kind','command','commands','Unsupported\x20schemaVersion:\x20','empty','slice','invalid','source','normalizedManifest','version','map','parse','39260VFloFj','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','updatedAt','utf8','toISOString','bff\x20target\x20requires\x20functionName.','stringify','splice','join','homeDirName','now','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','code','Cannot\x20write\x20service\x20registry:\x20','findIndex','Service\x20manifest\x20validation\x20failed:\x0a','file','manifests','flatMap','errors','1024550kluREh','].manifest.','push','localeCompare','serviceCode','target','574064EFkcSX','service','report','.tmp','55MHYuFc','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','services','$.services[','update','commandCount','length','startsWith','316jXrgqq'];a63_0x1bd8=function(){return _0x587b3a;};return a63_0x1bd8();}export function getServiceRegistryPath(_0x508bff={}){const _0x16248e=a63_0x41826b;return resolve(_0x508bff['homeDir']??homedir(),PRODUCT_CONFIG[_0x16248e(0x1b6)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x364b8f={}){const _0x24e2b3=a63_0x41826b,_0x3557ce=getServiceRegistryPath(_0x364b8f);if(!existsSync(_0x3557ce))return emptyServiceRegistry();try{const _0xa277e3=readFileSync(_0x3557ce,_0x24e2b3(0x1b0));if(!_0xa277e3[_0x24e2b3(0x19d)]())return emptyServiceRegistry();const _0x344796=JSON[_0x24e2b3(0x1ac)](_0xa277e3);if(_0x344796['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x24e2b3(0x18a)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x344796['schemaVersion']),_0x24e2b3(0x188)+_0x3557ce+'.');if(!Array['isArray'](_0x344796[_0x24e2b3(0x176)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x344796[_0x24e2b3(0x1af)],'services':_0x344796[_0x24e2b3(0x176)]};}catch(_0x15a705){if(_0x15a705 instanceof Error&&_0x15a705['name']===_0x24e2b3(0x17f))throw _0x15a705;throw CliErrors[_0x24e2b3(0x18a)](_0x24e2b3(0x19f)+_0x3557ce,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x37908e,_0x304c83={}){const _0x290fb5=a63_0x41826b,_0x1ac3ad=getServiceRegistryPath(_0x304c83),_0x5bdfd8=dirname(_0x1ac3ad);!existsSync(_0x5bdfd8)&&mkdirSync(_0x5bdfd8,{'recursive':!![]});const _0x22b105=_0x1ac3ad+_0x290fb5(0x173);try{writeFileSync(_0x22b105,JSON[_0x290fb5(0x1b3)](_0x37908e,null,0x2)+'\x0a',{'encoding':_0x290fb5(0x1b0),'mode':0x180}),renameSync(_0x22b105,_0x1ac3ad);}catch(_0x5b787d){try{unlinkSync(_0x22b105);}catch{}if(_0x5b787d?.[_0x290fb5(0x1b9)]===_0x290fb5(0x195))throw CliErrors[_0x290fb5(0x18a)](_0x290fb5(0x1ba)+_0x1ac3ad);throw _0x5b787d;}return _0x1ac3ad;}export function loadServiceManifestFromFile(_0x2726d2){const _0x1af796=a63_0x41826b,_0x20c043=resolve(_0x2726d2);if(!existsSync(_0x20c043))throw CliErrors[_0x1af796(0x18a)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x2726d2);let _0x3c47e7;const _0x20405f=readFileSync(_0x20c043,'utf8');try{_0x3c47e7=JSON[_0x1af796(0x1ac)](_0x20405f);}catch{throw CliErrors[_0x1af796(0x18a)](_0x1af796(0x193)+_0x2726d2,_0x1af796(0x18e));}const _0x408d9e=sha256(_0x20405f),_0x13cfbd=extractLoadedServiceManifests(_0x3c47e7,_0x408d9e),_0x5a0ebd=aggregateValidationReports(_0x13cfbd),_0x49b6da=_0x13cfbd[0x0];return{'filePath':_0x20c043,'hash':_0x408d9e,'kind':isServiceRegistryLike(_0x3c47e7)?'registry':_0x1af796(0x196),'manifest':_0x49b6da?.[_0x1af796(0x196)]??_0x3c47e7,'report':_0x5a0ebd,'normalizedManifest':_0x13cfbd[_0x1af796(0x17a)]===0x1?_0x49b6da?.['normalizedManifest']:undefined,'manifests':_0x13cfbd};}export function importServiceManifest(_0x59c1fd,_0x351832={}){const _0x5bd49e=a63_0x41826b,_0xbf600f=loadServiceManifestFromFile(_0x59c1fd);if(!_0xbf600f[_0x5bd49e(0x172)]['ok'])throw CliErrors[_0x5bd49e(0x18a)](formatValidationFailure(_0xbf600f[_0x5bd49e(0x172)]),_0x5bd49e(0x18f));if(_0xbf600f[_0x5bd49e(0x1be)][_0x5bd49e(0x17a)]===0x0)throw CliErrors[_0x5bd49e(0x18a)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x5bd49e(0x1ae));const _0x26ff3d=readServiceRegistry(_0x351832),_0x4fc87e=(_0x351832[_0x5bd49e(0x1b7)]??(()=>new Date()))()[_0x5bd49e(0x1b1)](),_0x2f75e9=[];let _0x50b6e1=0x0,_0x4a83bb=0x0;for(const _0x30d14f of _0xbf600f[_0x5bd49e(0x1be)]){if(!_0x30d14f[_0x5bd49e(0x1a9)])continue;const _0x5a3030=_0x30d14f[_0x5bd49e(0x1a9)]['service'][_0x5bd49e(0x1b9)],_0xf4562={'serviceCode':_0x5a3030,'version':_0x30d14f[_0x5bd49e(0x1a9)][_0x5bd49e(0x1aa)],'importedAt':_0x4fc87e,'source':{'type':_0x5bd49e(0x1bd),'path':_0xbf600f[_0x5bd49e(0x184)],'hash':_0x30d14f['sourceHash']},'manifest':_0x30d14f[_0x5bd49e(0x196)],'normalizedManifest':_0x30d14f[_0x5bd49e(0x1a9)]},_0x1cc624=_0x26ff3d[_0x5bd49e(0x176)][_0x5bd49e(0x1bb)](_0x53d15a=>_0x53d15a[_0x5bd49e(0x16e)]===_0x5a3030);_0x1cc624>=0x0?(_0x26ff3d[_0x5bd49e(0x176)][_0x1cc624]=_0xf4562,_0x4a83bb++):(_0x26ff3d[_0x5bd49e(0x176)][_0x5bd49e(0x16c)](_0xf4562),_0x50b6e1++),_0x2f75e9['push'](_0xf4562);}_0x26ff3d[_0x5bd49e(0x176)]['sort']((_0x3b2350,_0x3e9219)=>_0x3b2350[_0x5bd49e(0x16e)][_0x5bd49e(0x16d)](_0x3e9219[_0x5bd49e(0x16e)])),_0x26ff3d[_0x5bd49e(0x1af)]=_0x4fc87e;const _0x4ac782=writeServiceRegistry(_0x26ff3d,_0x351832);return{'registryPath':_0x4ac782,'entry':_0x2f75e9[0x0],'replaced':_0x2f75e9[_0x5bd49e(0x17a)]===0x1?_0x4a83bb===0x1:_0x4a83bb>0x0,'entries':_0x2f75e9,'imported':_0x50b6e1,'updated':_0x4a83bb,'serviceCount':_0x26ff3d[_0x5bd49e(0x176)][_0x5bd49e(0x17a)]};}export function exportServiceManifest(_0x250fb7,_0x4477d6,_0x53d0bf={}){const _0x3c709b=a63_0x41826b,_0x51d02a=getServiceRegistryPath(_0x53d0bf),_0x115548=getLocalServiceEntry(_0x250fb7,_0x53d0bf);if(!_0x115548)throw CliErrors[_0x3c709b(0x18a)](_0x3c709b(0x191)+_0x250fb7,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x6948cf=resolve(_0x4477d6),_0x2a0a12=dirname(_0x6948cf);return!existsSync(_0x2a0a12)&&mkdirSync(_0x2a0a12,{'recursive':!![]}),writeFileSync(_0x6948cf,JSON['stringify'](_0x115548[_0x3c709b(0x196)],null,0x2)+'\x0a',{'encoding':_0x3c709b(0x1b0),'mode':0x180}),{'registryPath':_0x51d02a,'filePath':_0x6948cf,'entry':_0x115548};}export function removeServiceManifest(_0x4c4111,_0x1be55d={}){const _0x3f01ef=a63_0x41826b,_0x340011=readServiceRegistry(_0x1be55d),_0xb7487f=_0x4c4111[_0x3f01ef(0x19d)](),_0x2d1152=_0x340011['services'][_0x3f01ef(0x1bb)](_0x133d71=>_0x133d71[_0x3f01ef(0x16e)]===_0xb7487f);if(_0x2d1152<0x0)throw CliErrors[_0x3f01ef(0x18a)](_0x3f01ef(0x191)+_0xb7487f,_0x3f01ef(0x175));const [_0x3323ea]=_0x340011[_0x3f01ef(0x176)][_0x3f01ef(0x1b4)](_0x2d1152,0x1),_0x46b8ba=(_0x1be55d['now']??(()=>new Date()))()['toISOString']();_0x340011[_0x3f01ef(0x1af)]=_0x46b8ba;const _0xead0bd=writeServiceRegistry(_0x340011,_0x1be55d);return{'registryPath':_0xead0bd,'entry':_0x3323ea,'serviceCount':_0x340011['services'][_0x3f01ef(0x17a)]};}function a63_0x4ea0(_0x55d1ff,_0x40a6e4){_0x55d1ff=_0x55d1ff-0x168;const _0x1bd83e=a63_0x1bd8();let _0x4ea07a=_0x1bd83e[_0x55d1ff];return _0x4ea07a;}export function listLocalServices(_0x49771f={}){return readServiceRegistry(_0x49771f)['services'];}export function getLocalServiceEntry(_0x44af6c,_0x5e30ab={}){const _0x107dba=a63_0x41826b;return readServiceRegistry(_0x5e30ab)['services']['find'](_0x2efaab=>_0x2efaab[_0x107dba(0x16e)]===_0x44af6c[_0x107dba(0x19d)]());}export function listLocalServiceTrees(_0x511afd={}){const _0x263207=a63_0x41826b;return readServiceRegistry(_0x511afd)[_0x263207(0x176)][_0x263207(0x1ab)](_0x35bf8c=>_0x35bf8c['normalizedManifest']);}export function inspectServiceRegistry(_0x6fbd54={}){const _0x2309f1=a63_0x41826b,_0x4b3324=getServiceRegistryPath(_0x6fbd54);if(!existsSync(_0x4b3324))return emptyServiceRegistryInspection(_0x4b3324,_0x2309f1(0x180),![]);try{const _0x1ddd79=readFileSync(_0x4b3324,_0x2309f1(0x1b0));if(!_0x1ddd79[_0x2309f1(0x19d)]())return emptyServiceRegistryInspection(_0x4b3324,_0x2309f1(0x1a5),!![]);const _0x39a82e=JSON['parse'](_0x1ddd79);if(_0x39a82e[_0x2309f1(0x17e)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x4b3324,_0x2309f1(0x1a7),!![]),'schemaVersion':_0x39a82e[_0x2309f1(0x17e)],'message':_0x2309f1(0x1a4)+String(_0x39a82e[_0x2309f1(0x17e)])};if(!Array[_0x2309f1(0x18b)](_0x39a82e[_0x2309f1(0x176)]))return{...emptyServiceRegistryInspection(_0x4b3324,_0x2309f1(0x1a7),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x39a82e[_0x2309f1(0x1af)],'message':'services\x20must\x20be\x20an\x20array'};const _0x449da9=_0x39a82e[_0x2309f1(0x176)][_0x2309f1(0x1ab)](summarizeLocalServiceEntry);return{'registryPath':_0x4b3324,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x39a82e[_0x2309f1(0x1af)],'serviceCount':_0x449da9[_0x2309f1(0x17a)],'commandCount':_0x449da9['reduce']((_0x328f54,_0x2ee114)=>_0x328f54+_0x2ee114[_0x2309f1(0x179)],0x0),'services':_0x449da9};}catch(_0x5ab656){return{...emptyServiceRegistryInspection(_0x4b3324,_0x2309f1(0x1a7),!![]),'message':_0x5ab656 instanceof Error?_0x5ab656[_0x2309f1(0x19e)]:String(_0x5ab656)};}}export function formatValidationFailure(_0x186861){const _0x1df35c=a63_0x41826b,_0x52106d=_0x186861[_0x1df35c(0x169)][_0x1df35c(0x1ab)](_0x169ca4=>_0x169ca4['path']+':\x20'+_0x169ca4[_0x1df35c(0x19e)]);return _0x1df35c(0x1bc)+_0x52106d[_0x1df35c(0x1b5)]('\x0a');}function extractLoadedServiceManifests(_0x5c1401,_0x344424){const _0x19004b=a63_0x41826b;if(!isServiceRegistryLike(_0x5c1401)){const _0x365d69=_0x5c1401,{manifest:_0x32ccb6,errors:_0x28757d}=adaptServiceTreeManifestForLegacyFramework(_0x365d69),_0x461787=validateServiceTreeManifest(_0x32ccb6),_0x1cd25b=mergeValidationErrors(_0x461787,_0x28757d);return[{'manifest':_0x365d69,'report':_0x1cd25b,'normalizedManifest':_0x1cd25b['ok']?normalizeServiceTreeManifest(_0x32ccb6):undefined,'sourceHash':_0x344424}];}return _0x5c1401[_0x19004b(0x176)][_0x19004b(0x1ab)]((_0x4c56d0,_0x3f7c97)=>{const _0x3a441c=_0x19004b,_0x57eb94=isObjectRecord(_0x4c56d0)?_0x4c56d0['manifest']:undefined,{manifest:_0x44fd75,errors:_0x34d880}=adaptServiceTreeManifestForLegacyFramework(_0x57eb94),_0x302cdc=validateServiceTreeManifest(_0x44fd75),_0x27480a=mergeValidationErrors(_0x302cdc,_0x34d880),_0x13c484=isObjectRecord(_0x4c56d0)&&typeof _0x4c56d0[_0x3a441c(0x16e)]===_0x3a441c(0x18c)?_0x4c56d0['serviceCode']:undefined;return{'manifest':_0x57eb94,'report':_0x27480a,'normalizedManifest':_0x27480a['ok']?normalizeServiceTreeManifest(_0x44fd75):undefined,'sourceHash':sha256(JSON[_0x3a441c(0x1b3)](_0x57eb94,null,0x2)+'\x0a'),'registryIndex':_0x3f7c97,'registryServiceCode':_0x13c484};});}function mergeValidationErrors(_0x3ae0ee,_0x4b8cd8){const _0x1304df=a63_0x41826b,_0x218def=_0x3ae0ee[_0x1304df(0x169)]['map'](_0x140d76=>_0x140d76[_0x1304df(0x19e)]===_0x1304df(0x1b8)?{..._0x140d76,'message':_0x1304df(0x1b2)}:_0x140d76),_0x13ff16=[..._0x4b8cd8,..._0x218def];return{'ok':_0x13ff16[_0x1304df(0x17a)]===0x0,'errors':_0x13ff16,'warnings':_0x3ae0ee[_0x1304df(0x19a)]};}function aggregateValidationReports(_0xbeb43c){const _0xecf9=a63_0x41826b,_0x58ad3c=_0xbeb43c['flatMap'](_0x20c3e=>_0x20c3e[_0xecf9(0x194)]===undefined?_0x20c3e[_0xecf9(0x172)][_0xecf9(0x169)]:_0x20c3e[_0xecf9(0x172)][_0xecf9(0x169)][_0xecf9(0x1ab)](_0x3dbd57=>({..._0x3dbd57,'path':prefixRegistryIssuePath(_0x20c3e[_0xecf9(0x194)],_0x3dbd57[_0xecf9(0x19c)])}))),_0x522c39=_0xbeb43c[_0xecf9(0x168)](_0x5cf3c0=>_0x5cf3c0[_0xecf9(0x194)]===undefined?_0x5cf3c0[_0xecf9(0x172)][_0xecf9(0x19a)]:_0x5cf3c0[_0xecf9(0x172)][_0xecf9(0x19a)][_0xecf9(0x1ab)](_0x432bda=>({..._0x432bda,'path':prefixRegistryIssuePath(_0x5cf3c0['registryIndex'],_0x432bda[_0xecf9(0x19c)])})));return{'ok':_0x58ad3c['length']===0x0,'errors':_0x58ad3c,'warnings':_0x522c39};}function prefixRegistryIssuePath(_0x56def7,_0x13b132){const _0x119e9c=a63_0x41826b;if(_0x13b132==='$')return'$.services['+_0x56def7+'].manifest';if(_0x13b132['startsWith']('$.'))return _0x119e9c(0x177)+_0x56def7+'].manifest'+_0x13b132[_0x119e9c(0x1a6)](0x1);if(_0x13b132[_0x119e9c(0x17b)]('$['))return'$.services['+_0x56def7+'].manifest'+_0x13b132[_0x119e9c(0x1a6)](0x1);return _0x119e9c(0x177)+_0x56def7+_0x119e9c(0x16b)+_0x13b132;}function isServiceRegistryLike(_0x540b74){const _0x2d955e=a63_0x41826b;return isObjectRecord(_0x540b74)&&_0x540b74[_0x2d955e(0x17e)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x540b74[_0x2d955e(0x176)]);}function isObjectRecord(_0x256c1b){const _0x5aac60=a63_0x41826b;return Boolean(_0x256c1b)&&typeof _0x256c1b===_0x5aac60(0x19b)&&!Array[_0x5aac60(0x18b)](_0x256c1b);}function emptyServiceRegistryInspection(_0x5ba721,_0x346c15,_0x2e2827){return{'registryPath':_0x5ba721,'exists':_0x2e2827,'status':_0x346c15,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x5f0108){const _0x25a9b4=a63_0x41826b,_0x416838=_0x5f0108[_0x25a9b4(0x1a9)],_0x36b297=_0x416838[_0x25a9b4(0x1a3)]['map'](_0x51de80=>({'path':_0x51de80[_0x25a9b4(0x190)],'description':_0x51de80[_0x25a9b4(0x181)],'risk':_0x51de80['risk'],'targetKind':_0x51de80[_0x25a9b4(0x16f)][_0x25a9b4(0x1a1)],'targetCommand':_0x51de80[_0x25a9b4(0x16f)][_0x25a9b4(0x1a2)]}));return{'serviceCode':_0x5f0108['serviceCode'],'name':_0x416838[_0x25a9b4(0x171)][_0x25a9b4(0x185)],'description':_0x416838['service']['description'],'version':_0x5f0108[_0x25a9b4(0x1aa)],'importedAt':_0x5f0108[_0x25a9b4(0x189)],'source':_0x5f0108[_0x25a9b4(0x1a8)],'commandCount':_0x36b297[_0x25a9b4(0x17a)],'commands':_0x36b297};}function sha256(_0x34e5e1){const _0x160eb5=a63_0x41826b;return createHash(_0x160eb5(0x1a0))[_0x160eb5(0x178)](_0x34e5e1)[_0x160eb5(0x187)](_0x160eb5(0x17d));}
1
+ (function(_0x49e1d3,_0x3ce2d3){const _0x47cc35=a63_0x33f7,_0x4e0c15=_0x49e1d3();while(!![]){try{const _0x1e3310=parseInt(_0x47cc35(0x177))/0x1*(parseInt(_0x47cc35(0x16d))/0x2)+-parseInt(_0x47cc35(0x135))/0x3+parseInt(_0x47cc35(0x167))/0x4+parseInt(_0x47cc35(0x155))/0x5*(parseInt(_0x47cc35(0x168))/0x6)+parseInt(_0x47cc35(0x15b))/0x7+-parseInt(_0x47cc35(0x160))/0x8+-parseInt(_0x47cc35(0x162))/0x9*(-parseInt(_0x47cc35(0x157))/0xa);if(_0x1e3310===_0x3ce2d3)break;else _0x4e0c15['push'](_0x4e0c15['shift']());}catch(_0x1a710a){_0x4e0c15['push'](_0x4e0c15['shift']());}}}(a63_0xe65b,0xb721f));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';function a63_0xe65b(){const _0x3e7809=['command','join','Cannot\x20write\x20service\x20registry:\x20','homeDirName','report','length','4066266GHeJgp','Invalid\x20service\x20manifest\x20JSON:\x20','services','startsWith','Remove\x20or\x20migrate\x20','hex','errors','object','bff\x20target\x20requires\x20functionName.','Invalid\x20service\x20registry\x20JSON:\x20','sort','manifests','update','code','splice','Service\x20manifest\x20validation\x20failed:\x0a','manifest','slice','Local\x20service\x20not\x20found:\x20','Unsupported\x20schemaVersion:\x20','services\x20must\x20be\x20an\x20array','sourceHash','toISOString','updatedAt','stringify','now','Service\x20manifest\x20file\x20not\x20found:\x20','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','service','risk','schemaVersion','warnings','25nochGQ','find','10EjEMcm','path','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','8603707tcceQW','].manifest','invalid','kind','trim','10822176VPIduo','message','1422072mlDCDr','commandCount','target','normalizedManifest','.tmp','3605744MqerHg','491574YiqyjI','file','name','utf8','importedAt','304046UfvGvP','map','validation','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','missing','findIndex','cliPath','isArray','description','digest','5IzUSjK','parse','version','commands','serviceCode','ENOENT','$.services[','push','empty','registryIndex'];a63_0xe65b=function(){return _0x3e7809;};return a63_0xe65b();}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='service.json';export function getServiceRegistryPath(_0x125dfe={}){const _0x177735=a63_0x33f7;return resolve(_0x125dfe['homeDir']??homedir(),PRODUCT_CONFIG[_0x177735(0x132)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0xcc343a={}){const _0x511fa1=a63_0x33f7,_0x5d38eb=getServiceRegistryPath(_0xcc343a);if(!existsSync(_0x5d38eb))return emptyServiceRegistry();try{const _0x2d7877=readFileSync(_0x5d38eb,_0x511fa1(0x16b));if(!_0x2d7877[_0x511fa1(0x15f)]())return emptyServiceRegistry();const _0x460009=JSON[_0x511fa1(0x178)](_0x2d7877);if(_0x460009[_0x511fa1(0x153)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x511fa1(0x16f)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x460009[_0x511fa1(0x153)]),_0x511fa1(0x139)+_0x5d38eb+'.');if(!Array[_0x511fa1(0x174)](_0x460009[_0x511fa1(0x137)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x460009[_0x511fa1(0x14c)],'services':_0x460009[_0x511fa1(0x137)]};}catch(_0xbe0a00){if(_0xbe0a00 instanceof Error&&_0xbe0a00[_0x511fa1(0x16a)]==='CliError')throw _0xbe0a00;throw CliErrors[_0x511fa1(0x16f)](_0x511fa1(0x13e)+_0x5d38eb,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x13ef2d,_0x146b8b={}){const _0x113951=a63_0x33f7,_0xb54d48=getServiceRegistryPath(_0x146b8b),_0x2db1c8=dirname(_0xb54d48);!existsSync(_0x2db1c8)&&mkdirSync(_0x2db1c8,{'recursive':!![]});const _0x5dfd9e=_0xb54d48+_0x113951(0x166);try{writeFileSync(_0x5dfd9e,JSON['stringify'](_0x13ef2d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5dfd9e,_0xb54d48);}catch(_0x31b5b4){try{unlinkSync(_0x5dfd9e);}catch{}if(_0x31b5b4?.[_0x113951(0x142)]===_0x113951(0x17c))throw CliErrors[_0x113951(0x16f)](_0x113951(0x131)+_0xb54d48);throw _0x31b5b4;}return _0xb54d48;}export function loadServiceManifestFromFile(_0x5a0cf5){const _0x3a8f13=a63_0x33f7,_0x1f0b70=resolve(_0x5a0cf5);if(!existsSync(_0x1f0b70))throw CliErrors[_0x3a8f13(0x16f)](_0x3a8f13(0x14f)+_0x5a0cf5);let _0x1a10f7;const _0xc905ca=readFileSync(_0x1f0b70,_0x3a8f13(0x16b));try{_0x1a10f7=JSON[_0x3a8f13(0x178)](_0xc905ca);}catch{throw CliErrors['validation'](_0x3a8f13(0x136)+_0x5a0cf5,_0x3a8f13(0x159));}const _0x43f95a=sha256(_0xc905ca),_0x2b02e6=extractLoadedServiceManifests(_0x1a10f7,_0x43f95a),_0x54000a=aggregateValidationReports(_0x2b02e6),_0x1f3bcc=_0x2b02e6[0x0];return{'filePath':_0x1f0b70,'hash':_0x43f95a,'kind':isServiceRegistryLike(_0x1a10f7)?'registry':_0x3a8f13(0x145),'manifest':_0x1f3bcc?.[_0x3a8f13(0x145)]??_0x1a10f7,'report':_0x54000a,'normalizedManifest':_0x2b02e6[_0x3a8f13(0x134)]===0x1?_0x1f3bcc?.[_0x3a8f13(0x165)]:undefined,'manifests':_0x2b02e6};}export function importServiceManifest(_0x39e946,_0x35ba6f={}){const _0xd81f59=a63_0x33f7,_0x463ae1=loadServiceManifestFromFile(_0x39e946);if(!_0x463ae1[_0xd81f59(0x133)]['ok'])throw CliErrors[_0xd81f59(0x16f)](formatValidationFailure(_0x463ae1[_0xd81f59(0x133)]),_0xd81f59(0x15a));if(_0x463ae1[_0xd81f59(0x140)][_0xd81f59(0x134)]===0x0)throw CliErrors[_0xd81f59(0x16f)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0xd81f59(0x170));const _0xf1ee82=readServiceRegistry(_0x35ba6f),_0x22bc2d=(_0x35ba6f[_0xd81f59(0x14e)]??(()=>new Date()))()[_0xd81f59(0x14b)](),_0x201707=[];let _0x39d9f8=0x0,_0x4f8244=0x0;for(const _0x1dcf4e of _0x463ae1[_0xd81f59(0x140)]){if(!_0x1dcf4e[_0xd81f59(0x165)])continue;const _0x47e318=_0x1dcf4e['normalizedManifest'][_0xd81f59(0x151)]['code'],_0x1c95fb={'serviceCode':_0x47e318,'version':_0x1dcf4e[_0xd81f59(0x165)][_0xd81f59(0x179)],'importedAt':_0x22bc2d,'source':{'type':_0xd81f59(0x169),'path':_0x463ae1['filePath'],'hash':_0x1dcf4e[_0xd81f59(0x14a)]},'manifest':_0x1dcf4e['manifest'],'normalizedManifest':_0x1dcf4e['normalizedManifest']},_0x125ae1=_0xf1ee82[_0xd81f59(0x137)]['findIndex'](_0xf3f51a=>_0xf3f51a[_0xd81f59(0x17b)]===_0x47e318);_0x125ae1>=0x0?(_0xf1ee82[_0xd81f59(0x137)][_0x125ae1]=_0x1c95fb,_0x4f8244++):(_0xf1ee82[_0xd81f59(0x137)][_0xd81f59(0x17e)](_0x1c95fb),_0x39d9f8++),_0x201707[_0xd81f59(0x17e)](_0x1c95fb);}_0xf1ee82[_0xd81f59(0x137)][_0xd81f59(0x13f)]((_0x1e5cae,_0x529638)=>_0x1e5cae[_0xd81f59(0x17b)]['localeCompare'](_0x529638[_0xd81f59(0x17b)])),_0xf1ee82['updatedAt']=_0x22bc2d;const _0x3a0106=writeServiceRegistry(_0xf1ee82,_0x35ba6f);return{'registryPath':_0x3a0106,'entry':_0x201707[0x0],'replaced':_0x201707[_0xd81f59(0x134)]===0x1?_0x4f8244===0x1:_0x4f8244>0x0,'entries':_0x201707,'imported':_0x39d9f8,'updated':_0x4f8244,'serviceCount':_0xf1ee82[_0xd81f59(0x137)][_0xd81f59(0x134)]};}export function exportServiceManifest(_0x259cd7,_0x32472c,_0x3174fb={}){const _0x25d66c=a63_0x33f7,_0x386676=getServiceRegistryPath(_0x3174fb),_0x492bb6=getLocalServiceEntry(_0x259cd7,_0x3174fb);if(!_0x492bb6)throw CliErrors['validation'](_0x25d66c(0x147)+_0x259cd7,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x23ae42=resolve(_0x32472c),_0x4a0eed=dirname(_0x23ae42);return!existsSync(_0x4a0eed)&&mkdirSync(_0x4a0eed,{'recursive':!![]}),writeFileSync(_0x23ae42,JSON['stringify'](_0x492bb6[_0x25d66c(0x145)],null,0x2)+'\x0a',{'encoding':_0x25d66c(0x16b),'mode':0x180}),{'registryPath':_0x386676,'filePath':_0x23ae42,'entry':_0x492bb6};}export function removeServiceManifest(_0x1c57e1,_0x2ebae0={}){const _0x2071a9=a63_0x33f7,_0xb79078=readServiceRegistry(_0x2ebae0),_0x1f4664=_0x1c57e1[_0x2071a9(0x15f)](),_0x125049=_0xb79078[_0x2071a9(0x137)][_0x2071a9(0x172)](_0x4a3b72=>_0x4a3b72[_0x2071a9(0x17b)]===_0x1f4664);if(_0x125049<0x0)throw CliErrors[_0x2071a9(0x16f)](_0x2071a9(0x147)+_0x1f4664,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x323b58]=_0xb79078[_0x2071a9(0x137)][_0x2071a9(0x143)](_0x125049,0x1),_0x494c7a=(_0x2ebae0[_0x2071a9(0x14e)]??(()=>new Date()))()[_0x2071a9(0x14b)]();_0xb79078[_0x2071a9(0x14c)]=_0x494c7a;const _0x25904f=writeServiceRegistry(_0xb79078,_0x2ebae0);return{'registryPath':_0x25904f,'entry':_0x323b58,'serviceCount':_0xb79078[_0x2071a9(0x137)][_0x2071a9(0x134)]};}export function listLocalServices(_0x5e89fc={}){const _0x5d180e=a63_0x33f7;return readServiceRegistry(_0x5e89fc)[_0x5d180e(0x137)];}export function getLocalServiceEntry(_0x3bb5d6,_0x2bbb3b={}){const _0x2a804a=a63_0x33f7;return readServiceRegistry(_0x2bbb3b)[_0x2a804a(0x137)][_0x2a804a(0x156)](_0x510b01=>_0x510b01[_0x2a804a(0x17b)]===_0x3bb5d6[_0x2a804a(0x15f)]());}export function listLocalServiceTrees(_0x3d38cd={}){return readServiceRegistry(_0x3d38cd)['services']['map'](_0x46f27b=>_0x46f27b['normalizedManifest']);}export function inspectServiceRegistry(_0x5b9aa9={}){const _0x537b45=a63_0x33f7,_0x42cc34=getServiceRegistryPath(_0x5b9aa9);if(!existsSync(_0x42cc34))return emptyServiceRegistryInspection(_0x42cc34,_0x537b45(0x171),![]);try{const _0x10f6d0=readFileSync(_0x42cc34,_0x537b45(0x16b));if(!_0x10f6d0[_0x537b45(0x15f)]())return emptyServiceRegistryInspection(_0x42cc34,_0x537b45(0x17f),!![]);const _0x2fbd89=JSON[_0x537b45(0x178)](_0x10f6d0);if(_0x2fbd89['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x42cc34,'invalid',!![]),'schemaVersion':_0x2fbd89[_0x537b45(0x153)],'message':_0x537b45(0x148)+String(_0x2fbd89[_0x537b45(0x153)])};if(!Array[_0x537b45(0x174)](_0x2fbd89['services']))return{...emptyServiceRegistryInspection(_0x42cc34,_0x537b45(0x15d),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2fbd89[_0x537b45(0x14c)],'message':_0x537b45(0x149)};const _0x355c59=_0x2fbd89[_0x537b45(0x137)][_0x537b45(0x16e)](summarizeLocalServiceEntry);return{'registryPath':_0x42cc34,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2fbd89[_0x537b45(0x14c)],'serviceCount':_0x355c59['length'],'commandCount':_0x355c59['reduce']((_0x14e270,_0x27e181)=>_0x14e270+_0x27e181[_0x537b45(0x163)],0x0),'services':_0x355c59};}catch(_0x3d8323){return{...emptyServiceRegistryInspection(_0x42cc34,_0x537b45(0x15d),!![]),'message':_0x3d8323 instanceof Error?_0x3d8323[_0x537b45(0x161)]:String(_0x3d8323)};}}export function formatValidationFailure(_0x47754f){const _0x260003=a63_0x33f7,_0x888b87=_0x47754f[_0x260003(0x13b)][_0x260003(0x16e)](_0x28595c=>_0x28595c[_0x260003(0x158)]+':\x20'+_0x28595c[_0x260003(0x161)]);return _0x260003(0x144)+_0x888b87[_0x260003(0x130)]('\x0a');}function extractLoadedServiceManifests(_0x1e0102,_0x5dcb28){const _0x1662c5=a63_0x33f7;if(!isServiceRegistryLike(_0x1e0102)){const _0x35a341=_0x1e0102,{manifest:_0x3f7d8a,errors:_0x33f86b}=adaptServiceTreeManifestForLegacyFramework(_0x35a341),_0x45a184=validateServiceTreeManifest(_0x3f7d8a),_0x280ad3=mergeValidationErrors(_0x45a184,_0x33f86b);return[{'manifest':_0x35a341,'report':_0x280ad3,'normalizedManifest':_0x280ad3['ok']?normalizeServiceTreeManifest(_0x3f7d8a):undefined,'sourceHash':_0x5dcb28}];}return _0x1e0102[_0x1662c5(0x137)][_0x1662c5(0x16e)]((_0x2670bd,_0x3fb16e)=>{const _0x4165b4=_0x1662c5,_0x11da2d=isObjectRecord(_0x2670bd)?_0x2670bd['manifest']:undefined,{manifest:_0x46c36a,errors:_0x3103e5}=adaptServiceTreeManifestForLegacyFramework(_0x11da2d),_0x3ebf64=validateServiceTreeManifest(_0x46c36a),_0x453f2d=mergeValidationErrors(_0x3ebf64,_0x3103e5),_0x357e0b=isObjectRecord(_0x2670bd)&&typeof _0x2670bd[_0x4165b4(0x17b)]==='string'?_0x2670bd[_0x4165b4(0x17b)]:undefined;return{'manifest':_0x11da2d,'report':_0x453f2d,'normalizedManifest':_0x453f2d['ok']?normalizeServiceTreeManifest(_0x46c36a):undefined,'sourceHash':sha256(JSON[_0x4165b4(0x14d)](_0x11da2d,null,0x2)+'\x0a'),'registryIndex':_0x3fb16e,'registryServiceCode':_0x357e0b};});}function mergeValidationErrors(_0x5158ba,_0x2e6e97){const _0x4c6f65=a63_0x33f7,_0x3e8509=_0x5158ba['errors']['map'](_0x5173b4=>_0x5173b4[_0x4c6f65(0x161)]===_0x4c6f65(0x150)?{..._0x5173b4,'message':_0x4c6f65(0x13d)}:_0x5173b4),_0x55f422=[..._0x2e6e97,..._0x3e8509];return{'ok':_0x55f422[_0x4c6f65(0x134)]===0x0,'errors':_0x55f422,'warnings':_0x5158ba[_0x4c6f65(0x154)]};}function aggregateValidationReports(_0x2dc8cd){const _0xcb0cde=a63_0x33f7,_0x279e69=_0x2dc8cd['flatMap'](_0x251dde=>_0x251dde[_0xcb0cde(0x180)]===undefined?_0x251dde['report'][_0xcb0cde(0x13b)]:_0x251dde[_0xcb0cde(0x133)][_0xcb0cde(0x13b)]['map'](_0x2e4a76=>({..._0x2e4a76,'path':prefixRegistryIssuePath(_0x251dde[_0xcb0cde(0x180)],_0x2e4a76[_0xcb0cde(0x158)])}))),_0x4eaf53=_0x2dc8cd['flatMap'](_0x55914a=>_0x55914a[_0xcb0cde(0x180)]===undefined?_0x55914a[_0xcb0cde(0x133)][_0xcb0cde(0x154)]:_0x55914a[_0xcb0cde(0x133)]['warnings']['map'](_0x2daf5b=>({..._0x2daf5b,'path':prefixRegistryIssuePath(_0x55914a[_0xcb0cde(0x180)],_0x2daf5b['path'])})));return{'ok':_0x279e69[_0xcb0cde(0x134)]===0x0,'errors':_0x279e69,'warnings':_0x4eaf53};}function prefixRegistryIssuePath(_0x2ec56a,_0x7a0081){const _0x26d298=a63_0x33f7;if(_0x7a0081==='$')return _0x26d298(0x17d)+_0x2ec56a+_0x26d298(0x15c);if(_0x7a0081[_0x26d298(0x138)]('$.'))return _0x26d298(0x17d)+_0x2ec56a+_0x26d298(0x15c)+_0x7a0081[_0x26d298(0x146)](0x1);if(_0x7a0081['startsWith']('$['))return'$.services['+_0x2ec56a+_0x26d298(0x15c)+_0x7a0081[_0x26d298(0x146)](0x1);return _0x26d298(0x17d)+_0x2ec56a+'].manifest.'+_0x7a0081;}function a63_0x33f7(_0x511db3,_0x2e6ebd){_0x511db3=_0x511db3-0x130;const _0xe65b09=a63_0xe65b();let _0x33f723=_0xe65b09[_0x511db3];return _0x33f723;}function isServiceRegistryLike(_0x32449d){const _0x5e381d=a63_0x33f7;return isObjectRecord(_0x32449d)&&_0x32449d[_0x5e381d(0x153)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x5e381d(0x174)](_0x32449d['services']);}function isObjectRecord(_0x333d73){const _0x12da82=a63_0x33f7;return Boolean(_0x333d73)&&typeof _0x333d73===_0x12da82(0x13c)&&!Array[_0x12da82(0x174)](_0x333d73);}function emptyServiceRegistryInspection(_0x1e8b22,_0x2c637b,_0x4869d0){return{'registryPath':_0x1e8b22,'exists':_0x4869d0,'status':_0x2c637b,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1aca3e){const _0x515bad=a63_0x33f7,_0x847b06=_0x1aca3e[_0x515bad(0x165)],_0x33b0fd=_0x847b06[_0x515bad(0x17a)]['map'](_0x5f233b=>({'path':_0x5f233b[_0x515bad(0x173)],'description':_0x5f233b['description'],'risk':_0x5f233b[_0x515bad(0x152)],'targetKind':_0x5f233b[_0x515bad(0x164)][_0x515bad(0x15e)],'targetCommand':_0x5f233b[_0x515bad(0x164)][_0x515bad(0x181)]}));return{'serviceCode':_0x1aca3e[_0x515bad(0x17b)],'name':_0x847b06[_0x515bad(0x151)]['name'],'description':_0x847b06[_0x515bad(0x151)][_0x515bad(0x175)],'version':_0x1aca3e[_0x515bad(0x179)],'importedAt':_0x1aca3e[_0x515bad(0x16c)],'source':_0x1aca3e['source'],'commandCount':_0x33b0fd[_0x515bad(0x134)],'commands':_0x33b0fd};}function sha256(_0x47d786){const _0x1b7a7b=a63_0x33f7;return createHash('sha256')[_0x1b7a7b(0x141)](_0x47d786)[_0x1b7a7b(0x176)](_0x1b7a7b(0x13a));}