@lovrabet/lovrabet-cli 2.3.6-beta.3 → 2.3.6

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 (180) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/approval/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/import-excel.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.js +1 -1
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.js +1 -1
  43. package/lib/commands/permit/dataset-set.js +1 -1
  44. package/lib/commands/permit/index.js +1 -1
  45. package/lib/commands/permit/page-get.js +1 -1
  46. package/lib/commands/permit/page-set.js +1 -1
  47. package/lib/commands/permit/role-menus-set.js +1 -1
  48. package/lib/commands/permit/role-menus.js +1 -1
  49. package/lib/commands/permit/shared.js +1 -1
  50. package/lib/commands/personal-bff/index.js +1 -1
  51. package/lib/commands/registry.js +1 -1
  52. package/lib/commands/role/create.js +1 -1
  53. package/lib/commands/role/delete.js +1 -1
  54. package/lib/commands/role/detail.js +1 -1
  55. package/lib/commands/role/index.js +1 -1
  56. package/lib/commands/role/list.js +1 -1
  57. package/lib/commands/role/shared.js +1 -1
  58. package/lib/commands/role/update.js +1 -1
  59. package/lib/commands/role/user-add.js +1 -1
  60. package/lib/commands/role/user-remove.js +1 -1
  61. package/lib/commands/schedule/index.js +1 -1
  62. package/lib/commands/schema.js +1 -1
  63. package/lib/commands/service/dynamic.js +1 -1
  64. package/lib/commands/service/function-name-adapter.js +1 -1
  65. package/lib/commands/service/index.js +1 -1
  66. package/lib/commands/service/registry.js +1 -1
  67. package/lib/commands/skill/commands/create.js +1 -1
  68. package/lib/commands/skill/commands/diagram.js +1 -1
  69. package/lib/commands/skill/commands/install.js +1 -1
  70. package/lib/commands/skill/commands/list.js +1 -1
  71. package/lib/commands/skill/commands/push.js +1 -1
  72. package/lib/commands/skill/commands/validate.js +1 -1
  73. package/lib/commands/skill/diagram.js +1 -1
  74. package/lib/commands/skill/flags.js +1 -1
  75. package/lib/commands/skill/index.js +1 -1
  76. package/lib/commands/skill/manifest-helpers.js +1 -1
  77. package/lib/commands/skill/push-execute.js +1 -1
  78. package/lib/commands/skill/push-flow-helpers.js +1 -1
  79. package/lib/commands/skill/push-retarget.js +1 -1
  80. package/lib/commands/skill/scopes.js +1 -1
  81. package/lib/commands/skill/summary.js +1 -1
  82. package/lib/commands/skill/templates.js +1 -1
  83. package/lib/commands/skill/validate.js +1 -1
  84. package/lib/commands/sql/detail.js +1 -1
  85. package/lib/commands/sql/exec.js +1 -1
  86. package/lib/commands/sql/index.js +1 -1
  87. package/lib/commands/update.js +1 -1
  88. package/lib/commands/user-account/bind.js +1 -1
  89. package/lib/commands/user-account/index.js +1 -1
  90. package/lib/commands/workspace/index.js +1 -1
  91. package/lib/config/domain-config.js +1 -1
  92. package/lib/config/schema.js +1 -1
  93. package/lib/constant/app.js +1 -1
  94. package/lib/constant/auth-mode.js +1 -1
  95. package/lib/constant/cli.js +1 -1
  96. package/lib/constant/defaults.js +1 -1
  97. package/lib/constant/distribution.js +1 -1
  98. package/lib/constant/domain.js +1 -1
  99. package/lib/constant/env.js +1 -1
  100. package/lib/constant/output.js +1 -1
  101. package/lib/constant/product.js +1 -1
  102. package/lib/constant/region.js +1 -1
  103. package/lib/constant/risk.js +1 -1
  104. package/lib/constant/url.js +1 -1
  105. package/lib/context.js +1 -1
  106. package/lib/core/api-client.js +1 -1
  107. package/lib/core/db-resolver.js +1 -1
  108. package/lib/core/kb-management-client.js +1 -1
  109. package/lib/core/kb-search-client.js +1 -1
  110. package/lib/core/sdk-client.js +1 -1
  111. package/lib/errors.js +1 -1
  112. package/lib/framework/access-error.js +1 -1
  113. package/lib/framework/build-all-flags.js +1 -1
  114. package/lib/framework/dryrun.js +1 -1
  115. package/lib/framework/flags.js +1 -1
  116. package/lib/framework/help.js +1 -1
  117. package/lib/framework/index.js +1 -1
  118. package/lib/framework/output.js +1 -1
  119. package/lib/framework/preparse.js +1 -1
  120. package/lib/framework/rate-limit.js +1 -1
  121. package/lib/framework/raw-flags.js +1 -1
  122. package/lib/framework/response.js +1 -1
  123. package/lib/framework/runner-confirmation.js +1 -1
  124. package/lib/framework/runner-error.js +1 -1
  125. package/lib/framework/runner.js +1 -1
  126. package/lib/framework/schema-export.js +1 -1
  127. package/lib/framework/service-order.js +1 -1
  128. package/lib/framework/types.js +1 -1
  129. package/lib/generated/build-info.d.ts +4 -4
  130. package/lib/generated/build-info.js +1 -1
  131. package/lib/generated/official-routing.js +1 -1
  132. package/lib/generated/routing-contract.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/postinstall.js +1 -1
  135. package/lib/runtime/confirmation.js +1 -1
  136. package/lib/runtime/event.js +1 -1
  137. package/lib/runtime/index.js +1 -1
  138. package/lib/runtime/queue.js +1 -1
  139. package/lib/runtime/resolve.js +1 -1
  140. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  141. package/lib/services/dataset-import/excel-reader.js +1 -1
  142. package/lib/services/dataset-import/image-bytes.js +1 -1
  143. package/lib/services/dataset-import/image-ooxml.js +1 -1
  144. package/lib/services/dataset-import/image-runner.js +1 -1
  145. package/lib/services/dataset-import/metadata.js +1 -1
  146. package/lib/services/dataset-import/preview.js +1 -1
  147. package/lib/services/dataset-import/runner.js +1 -1
  148. package/lib/skills/builtin-skill.js +1 -1
  149. package/lib/skills/npx-skills-add.js +1 -1
  150. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  151. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  152. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  153. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  154. package/lib/skills/runtime-skill-sync/links.js +1 -1
  155. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  156. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  157. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  158. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  159. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  160. package/lib/skills/runtime-skill-sync/push.js +1 -1
  161. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  162. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  163. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  164. package/lib/skills/runtime-skill-sync.js +1 -1
  165. package/lib/skills/skill-presence.js +1 -1
  166. package/lib/utils/access-key-redaction.js +1 -1
  167. package/lib/utils/apply-jq-filter.js +1 -1
  168. package/lib/utils/cli-version-check.js +1 -1
  169. package/lib/utils/cli-version-policy.js +1 -1
  170. package/lib/utils/logger.js +1 -1
  171. package/lib/utils/lossless-json.js +1 -1
  172. package/lib/utils/params.js +1 -1
  173. package/lib/utils/positive-safe-integer.js +1 -1
  174. package/lib/utils/redaction.js +1 -1
  175. package/lib/utils/update-notice.js +1 -1
  176. package/lib/utils/version.js +1 -1
  177. package/lib/utils/write-cli-side-channel.js +1 -1
  178. package/package.json +1 -1
  179. package/skills/lovrabet/SKILL.md +1 -1
  180. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a56_0x1d6628=a56_0x10cd;(function(_0x947cca,_0x50e754){const _0x1058ab=a56_0x10cd,_0x234211=_0x947cca();while(!![]){try{const _0x3ca3f4=parseInt(_0x1058ab(0x186))/0x1*(-parseInt(_0x1058ab(0x17c))/0x2)+-parseInt(_0x1058ab(0x155))/0x3+-parseInt(_0x1058ab(0x17a))/0x4*(-parseInt(_0x1058ab(0x167))/0x5)+parseInt(_0x1058ab(0x151))/0x6*(parseInt(_0x1058ab(0x18e))/0x7)+-parseInt(_0x1058ab(0x16f))/0x8+parseInt(_0x1058ab(0x159))/0x9*(-parseInt(_0x1058ab(0x153))/0xa)+parseInt(_0x1058ab(0x17d))/0xb*(parseInt(_0x1058ab(0x16c))/0xc);if(_0x3ca3f4===_0x50e754)break;else _0x234211['push'](_0x234211['shift']());}catch(_0xd478b7){_0x234211['push'](_0x234211['shift']());}}}(a56_0x26bf,0xc919f));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=[a56_0x1d6628(0x181),a56_0x1d6628(0x171),'OWNER',a56_0x1d6628(0x18f)];const BUILTIN_ROLE_TYPES=['ADMIN',a56_0x1d6628(0x171),a56_0x1d6628(0x161)];export const ROLE_ID_FLAG={'name':'id','type':a56_0x1d6628(0x16b),'required':!![],'description':a56_0x1d6628(0x174)};export const ROLE_REF_FLAG={'name':'role','type':a56_0x1d6628(0x15b),'required':!![],'description':a56_0x1d6628(0x163)};export const ROLE_CODE_FLAG={'name':a56_0x1d6628(0x17f),'type':a56_0x1d6628(0x15b),'description':a56_0x1d6628(0x162)};export const USER_ID_FLAG={'name':a56_0x1d6628(0x170),'type':a56_0x1d6628(0x15b),'required':!![],'description':'Runtime\x20numeric\x20userId'};function a56_0x10cd(_0x2291eb,_0x23ada3){_0x2291eb=_0x2291eb-0x151;const _0x26bfb2=a56_0x26bf();let _0x10cddc=_0x26bfb2[_0x2291eb];return _0x10cddc;}export const EXPECT_USER_COUNT_FLAG={'name':a56_0x1d6628(0x16e),'type':a56_0x1d6628(0x16b),'description':'Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed'};export function isBuiltinRuntimeRole(_0x2c21a8){const _0x1b5ad4=a56_0x1d6628;return BUILTIN_ROLE_TYPES[_0x1b5ad4(0x15f)](_0x2c21a8);}export function assertCustomRuntimeRole(_0x527e23,_0x5b1c3a){const _0x5d544a=a56_0x1d6628;if(_0x527e23[_0x5d544a(0x166)]!=='CUSTOM')throw CliErrors[_0x5d544a(0x172)](_0x5d544a(0x193)+_0x5b1c3a+_0x5d544a(0x180)+_0x527e23[_0x5d544a(0x15e)]+'\x20('+_0x527e23['roleType']+').',_0x5d544a(0x18d));}export function projectRuntimeRole(_0x4ed694){const _0x3e2b69=a56_0x1d6628;return{'id':_0x4ed694['id'],'roleCode':_0x4ed694[_0x3e2b69(0x157)],'roleName':_0x4ed694['roleName'],'roleType':_0x4ed694[_0x3e2b69(0x166)],'remark':_0x4ed694['remark'],'userCount':_0x4ed694[_0x3e2b69(0x17e)]??0x0,'permitCount':_0x4ed694[_0x3e2b69(0x178)]??0x0,'builtin':isBuiltinRuntimeRole(_0x4ed694[_0x3e2b69(0x166)])};}export function readOptionalRuntimeRoleCode(_0x1c81d9){const _0x510363=a56_0x1d6628,_0x1e5555=_0x1c81d9[_0x510363(0x165)](_0x510363(0x17f));if(_0x1e5555===undefined||_0x1e5555===null)return undefined;const _0x49b818=String(_0x1e5555)['trim']();if(!_0x49b818)throw CliErrors[_0x510363(0x172)](_0x510363(0x15c));if(_0x49b818['length']>0x40)throw CliErrors[_0x510363(0x172)](_0x510363(0x164));return _0x49b818;}export async function getRuntimeRoleById(_0x24fd0b,_0x3e0381){const _0x2f41f0=a56_0x1d6628;if(!Number[_0x2f41f0(0x19a)](_0x3e0381)||_0x3e0381<=0x0)throw CliErrors[_0x2f41f0(0x172)](_0x2f41f0(0x192));const _0x5a047a=(await listAllRuntimeRoles(_0x24fd0b))[_0x2f41f0(0x154)](_0x4ec925=>_0x4ec925['id']===_0x3e0381&&(!_0x4ec925['appCode']||_0x4ec925[_0x2f41f0(0x152)]===_0x24fd0b));if(_0x5a047a['length']!==0x1)throw CliErrors['validation'](_0x2f41f0(0x158)+_0x3e0381+_0x2f41f0(0x189)+_0x24fd0b+'.',_0x2f41f0(0x177));return _0x5a047a[0x0];}export async function listAllRuntimeRoles(_0x32c68c,_0x2a27fd={}){const _0x8caea7=a56_0x1d6628,_0x16d55d=0x64,_0x1f3e7f=[];for(let _0x271caf=0x1;;_0x271caf+=0x1){const _0x3e35ea=await listRuntimeAppRoles(_0x32c68c,{..._0x2a27fd[_0x8caea7(0x15e)]?{'roleName':_0x2a27fd['roleName']}:{},'currentPage':_0x271caf,'pageSize':_0x16d55d});_0x1f3e7f[_0x8caea7(0x16d)](..._0x3e35ea[_0x8caea7(0x182)]);if(_0x3e35ea[_0x8caea7(0x182)][_0x8caea7(0x15a)]<_0x16d55d||_0x3e35ea[_0x8caea7(0x190)]&&_0x1f3e7f['length']>=_0x3e35ea[_0x8caea7(0x190)][_0x8caea7(0x195)])return _0x1f3e7f;}}export async function resolveRuntimeRoleRef(_0x25f43b,_0x31d6ae){const _0x198f17=a56_0x1d6628,_0x124fc3=_0x31d6ae[_0x198f17(0x173)]();if(!_0x124fc3)throw CliErrors[_0x198f17(0x172)]('Missing\x20runtime\x20role\x20reference.',_0x198f17(0x18a));if(/^\d+$/[_0x198f17(0x175)](_0x124fc3))return getRuntimeRoleById(_0x25f43b,Number(_0x124fc3));const _0x2cc314=(await listAllRuntimeRoles(_0x25f43b))[_0x198f17(0x154)](_0x579e1b=>_0x579e1b[_0x198f17(0x15e)]===_0x124fc3);if(_0x2cc314[_0x198f17(0x15a)]===0x0)throw CliErrors[_0x198f17(0x172)]('Runtime\x20role\x20name\x20\x22'+_0x124fc3+'\x22\x20was\x20not\x20found\x20in\x20app\x20'+_0x25f43b+'.',_0x198f17(0x176));if(_0x2cc314['length']>0x1)throw CliErrors[_0x198f17(0x172)](_0x198f17(0x17b)+_0x124fc3+'\x22\x20is\x20ambiguous.',_0x198f17(0x196)+_0x2cc314[_0x198f17(0x184)](_0x1a52ef=>_0x1a52ef['id'])[_0x198f17(0x183)](',\x20')+'.');return _0x2cc314[0x0];}function parseRuntimeUserId(_0x255793){const _0x39ea9c=a56_0x1d6628,_0x136ede=_0x255793[_0x39ea9c(0x173)](),_0x5ba6c9=normalizePositiveSafeInteger(_0x136ede);if(_0x5ba6c9===undefined)throw CliErrors[_0x39ea9c(0x172)]('Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.',_0x39ea9c(0x156));return _0x5ba6c9;}export async function prepareRuntimeMemberMutation(_0x2ddfbc,_0x4a7949){const _0x3dba7c=a56_0x1d6628,_0x53af69=await resolveRuntimeRoleRef(_0x2ddfbc['appCode'],_0x2ddfbc[_0x3dba7c(0x188)]('role'));if(_0x53af69['roleType']===_0x3dba7c(0x161))throw CliErrors[_0x3dba7c(0x172)](_0x3dba7c(0x15d),_0x3dba7c(0x169));const _0x110452=parseRuntimeUserId(_0x2ddfbc['str'](_0x3dba7c(0x170))),_0x591565=(await listRuntimeRoleUsers(_0x2ddfbc[_0x3dba7c(0x152)]))[_0x3dba7c(0x184)](_0x1b9335=>({..._0x1b9335,'userList':[..._0x1b9335[_0x3dba7c(0x199)]??[]],'applyUserList':[..._0x1b9335[_0x3dba7c(0x160)]??[]]})),_0x172727=_0x591565[_0x3dba7c(0x194)](_0x33c11e=>_0x33c11e['id']===_0x53af69['id']);if(!_0x172727)throw CliErrors['validation'](_0x3dba7c(0x198)+_0x53af69['id']+_0x3dba7c(0x197),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x547924=_0x172727[_0x3dba7c(0x199)][_0x3dba7c(0x184)](_0x328365=>_0x328365[_0x3dba7c(0x18b)]),_0x28a698=_0x2ddfbc[_0x3dba7c(0x165)](_0x3dba7c(0x16e));if(_0x28a698!==undefined&&_0x28a698!==null&&_0x28a698!==''){const _0xe268e4=_0x2ddfbc['num']('expect-user-count');if(!Number['isSafeInteger'](_0xe268e4)||_0xe268e4<0x0)throw CliErrors[_0x3dba7c(0x172)](_0x3dba7c(0x187));if(_0x547924[_0x3dba7c(0x15a)]!==_0xe268e4)throw CliErrors[_0x3dba7c(0x172)](_0x3dba7c(0x16a)+_0xe268e4+',\x20found\x20'+_0x547924[_0x3dba7c(0x15a)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x1c566a=_0x547924[_0x3dba7c(0x15f)](_0x110452),_0x70f688=[];let _0x3e697a=!![];if(_0x4a7949==='user-add'){const _0x3c569e=await listRuntimeAppUsers(_0x2ddfbc[_0x3dba7c(0x152)]),_0x18856a=_0x3c569e['filter'](_0x1f82d6=>Number(_0x1f82d6[_0x3dba7c(0x18c)])===_0x110452);if(_0x18856a[_0x3dba7c(0x15a)]!==0x1||!_0x18856a[0x0][_0x3dba7c(0x168)]?.['trim']())throw CliErrors[_0x3dba7c(0x172)]('Runtime\x20user\x20'+_0x110452+_0x3dba7c(0x189)+_0x2ddfbc[_0x3dba7c(0x152)]+'.',_0x3dba7c(0x185));_0x1c566a?(_0x3e697a=![],_0x70f688['push'](_0x3dba7c(0x179)+_0x110452+'\x20is\x20already\x20in\x20runtime\x20role\x20'+_0x53af69['id']+'.')):_0x172727[_0x3dba7c(0x199)][_0x3dba7c(0x16d)]({'userId':_0x110452,'username':_0x18856a[0x0][_0x3dba7c(0x168)]});}else!_0x1c566a?(_0x3e697a=![],_0x70f688['push'](_0x3dba7c(0x179)+_0x110452+'\x20is\x20not\x20in\x20runtime\x20role\x20'+_0x53af69['id']+'.')):_0x172727[_0x3dba7c(0x199)]=_0x172727[_0x3dba7c(0x199)][_0x3dba7c(0x154)](_0x32606a=>_0x32606a[_0x3dba7c(0x18b)]!==_0x110452);return{'role':_0x53af69,'userId':_0x110452,'roleList':_0x591565,'before':{'userIds':_0x547924},'after':{'userIds':_0x172727[_0x3dba7c(0x199)][_0x3dba7c(0x184)](_0x52225d=>_0x52225d[_0x3dba7c(0x18b)])},'shouldWrite':_0x3e697a,'warnings':_0x70f688};}function a56_0x26bf(){const _0x2cf97a=['isSafeInteger','66lyYYTK','appCode','455450DcdarA','filter','1748055NgAjHP','Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.','roleCode','Runtime\x20role\x20id\x20','135IMPfMZ','length','string','--role-code\x20must\x20not\x20be\x20blank.','OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','roleName','includes','applyUserList','OWNER','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)','Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','--role-code\x20cannot\x20exceed\x2064\x20characters.','flag','roleType','5lGKHXh','userName','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','number','804JqkfWL','push','expect-user-count','11838312QPrsJt','user','USER','validation','trim','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','test','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','permitCount','User\x20','5586492RHHckK','Runtime\x20role\x20name\x20\x22','8026hcOBhD','408936rdEjsh','userCount','role-code','\x20built-in\x20runtime\x20role\x20','ADMIN','items','join','map','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','269qmUeVs','--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.','str','\x20was\x20not\x20found\x20in\x20app\x20','Pass\x20--role\x20<id|name>.','userId','code','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','484554UfBPLu','CUSTOM','paging','runtime','Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.','Cannot\x20','find','totalCount','Pass\x20one\x20role\x20ID:\x20','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','Runtime\x20role\x20','userList'];a56_0x26bf=function(){return _0x2cf97a;};return a56_0x26bf();}export function runtimeRoleWriteResult(_0x3dfc2c,_0x471a8c,_0x1ac21e,_0x40b76e,_0x5f0dc1,_0x51fce2=[]){const _0x58dc1c=a56_0x1d6628;return{'operation':_0x3dfc2c,'scope':_0x58dc1c(0x191),'selector':_0x471a8c,'before':_0x1ac21e,'after':_0x40b76e,'dryRun':![],'backend':_0x5f0dc1,'warnings':_0x51fce2};}
1
+ const a56_0x2a0c01=a56_0x12ff;(function(_0x131120,_0x2a1f0a){const _0x4eef3d=a56_0x12ff,_0x566305=_0x131120();while(!![]){try{const _0x33477b=-parseInt(_0x4eef3d(0x109))/0x1*(parseInt(_0x4eef3d(0x10b))/0x2)+-parseInt(_0x4eef3d(0xdf))/0x3*(parseInt(_0x4eef3d(0x113))/0x4)+parseInt(_0x4eef3d(0x118))/0x5+-parseInt(_0x4eef3d(0xd4))/0x6*(-parseInt(_0x4eef3d(0xda))/0x7)+parseInt(_0x4eef3d(0x104))/0x8*(-parseInt(_0x4eef3d(0xf5))/0x9)+-parseInt(_0x4eef3d(0xff))/0xa*(-parseInt(_0x4eef3d(0x11b))/0xb)+parseInt(_0x4eef3d(0xe7))/0xc*(parseInt(_0x4eef3d(0x11c))/0xd);if(_0x33477b===_0x2a1f0a)break;else _0x566305['push'](_0x566305['shift']());}catch(_0xac430b){_0x566305['push'](_0x566305['shift']());}}}(a56_0x56e0,0x70e7f));import{listRuntimeAppUsers,listRuntimeAppRoles,listRuntimeRoleUsers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{normalizePositiveSafeInteger}from'../../utils/positive-safe-integer.js';export const RUNTIME_ROLE_TYPES=['ADMIN','USER',a56_0x2a0c01(0xe8),a56_0x2a0c01(0x101)];const BUILTIN_ROLE_TYPES=[a56_0x2a0c01(0x117),a56_0x2a0c01(0xf1),a56_0x2a0c01(0xe8)];export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a56_0x2a0c01(0x106)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a56_0x2a0c01(0xf0)};export const ROLE_CODE_FLAG={'name':a56_0x2a0c01(0x102),'type':a56_0x2a0c01(0xd7),'description':a56_0x2a0c01(0xef)};export const USER_ID_FLAG={'name':a56_0x2a0c01(0xe5),'type':a56_0x2a0c01(0xd7),'required':!![],'description':a56_0x2a0c01(0x115)};function a56_0x56e0(){const _0x461abf=['Runtime\x20role\x20ID\x20or\x20exact\x20role\x20name','USER','--role-code\x20must\x20not\x20be\x20blank.','\x20is\x20already\x20in\x20runtime\x20role\x20','includes','6515973VpuUUX','expect-user-count','Missing\x20runtime\x20role\x20reference.','Runtime\x20role\x20member\x20count\x20changed:\x20expected\x20','paging','number','test','Pass\x20one\x20role\x20ID:\x20','\x22\x20is\x20ambiguous.','\x20built-in\x20runtime\x20role\x20','510PCoxyU','items','CUSTOM','role-code',',\x20found\x20','8TbCIDc','push','Runtime\x20role\x20ID\x20returned\x20by\x20role\x20list','runtime','flag','206ZYaXtp','\x22\x20was\x20not\x20found\x20in\x20app\x20','4204CPFWQp','find','userCount','Runtime\x20role\x20name\x20\x22','Only\x20CUSTOM\x20runtime\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Cannot\x20','Run\x20`lovrabet\x20role\x20list`\x20and\x20use\x20a\x20role\x20from\x20the\x20current\x20app.','Run\x20`lovrabet\x20role\x20list`\x20or\x20pass\x20--role\x20<id>.','4zKqzNf','totalCount','Runtime\x20numeric\x20userId','appCode','ADMIN','233040CkFjqz','userName','map','178409SNXEUF','13wIBrEV','join','num','User\x20','--role-code\x20cannot\x20exceed\x2064\x20characters.','Runtime\x20role\x20id\x20','1670814dMAgVX','roleType','remark','string','validation','Reject\x20when\x20the\x20target\x20role\x20member\x20count\x20has\x20changed','7YYPqjj','isSafeInteger','length','Runtime\x20role\x20membership\x20requires\x20a\x20numeric\x20userId.','\x20was\x20not\x20found\x20in\x20app\x20','113469zAKQmQ','userList','Runtime\x20role\x20','user-add','\x20is\x20not\x20in\x20runtime\x20role\x20','roleName','user','Use\x20a\x20numeric\x20userId\x20returned\x20by\x20the\x20current\x20application\x27s\x20personnel\x20list.','6060588WJXPuV','OWNER','roleCode','filter','\x20is\x20missing\x20from\x20the\x20grouped\x20member\x20snapshot.','userId','Pass\x20--role\x20<id|name>.','trim','Globally\x20unique\x20roleCode\x20(maximum\x2064\x20characters)'];a56_0x56e0=function(){return _0x461abf;};return a56_0x56e0();}export const EXPECT_USER_COUNT_FLAG={'name':a56_0x2a0c01(0xf6),'type':a56_0x2a0c01(0xfa),'description':a56_0x2a0c01(0xd9)};function a56_0x12ff(_0x1e03c0,_0x31099a){_0x1e03c0=_0x1e03c0-0xd2;const _0x56e012=a56_0x56e0();let _0x12ffa9=_0x56e012[_0x1e03c0];return _0x12ffa9;}export function isBuiltinRuntimeRole(_0x31e0d0){const _0x99f1f2=a56_0x2a0c01;return BUILTIN_ROLE_TYPES[_0x99f1f2(0xf4)](_0x31e0d0);}export function assertCustomRuntimeRole(_0x32c5e7,_0x5480f8){const _0x511940=a56_0x2a0c01;if(_0x32c5e7['roleType']!=='CUSTOM')throw CliErrors[_0x511940(0xd8)](_0x511940(0x110)+_0x5480f8+_0x511940(0xfe)+_0x32c5e7[_0x511940(0xe4)]+'\x20('+_0x32c5e7[_0x511940(0xd5)]+').',_0x511940(0x10f));}export function projectRuntimeRole(_0x59fcd8){const _0xb79c15=a56_0x2a0c01;return{'id':_0x59fcd8['id'],'roleCode':_0x59fcd8[_0xb79c15(0xe9)],'roleName':_0x59fcd8['roleName'],'roleType':_0x59fcd8['roleType'],'remark':_0x59fcd8[_0xb79c15(0xd6)],'userCount':_0x59fcd8[_0xb79c15(0x10d)]??0x0,'permitCount':_0x59fcd8['permitCount']??0x0,'builtin':isBuiltinRuntimeRole(_0x59fcd8[_0xb79c15(0xd5)])};}export function readOptionalRuntimeRoleCode(_0x12e523){const _0x3cc14a=a56_0x2a0c01,_0x4ba2ac=_0x12e523['flag'](_0x3cc14a(0x102));if(_0x4ba2ac===undefined||_0x4ba2ac===null)return undefined;const _0x910930=String(_0x4ba2ac)[_0x3cc14a(0xee)]();if(!_0x910930)throw CliErrors[_0x3cc14a(0xd8)](_0x3cc14a(0xf2));if(_0x910930[_0x3cc14a(0xdc)]>0x40)throw CliErrors[_0x3cc14a(0xd8)](_0x3cc14a(0xd2));return _0x910930;}export async function getRuntimeRoleById(_0x5d08a2,_0x199bdf){const _0x402657=a56_0x2a0c01;if(!Number['isSafeInteger'](_0x199bdf)||_0x199bdf<=0x0)throw CliErrors[_0x402657(0xd8)]('Role\x20ID\x20must\x20be\x20a\x20positive\x20integer.');const _0x49cc4e=(await listAllRuntimeRoles(_0x5d08a2))[_0x402657(0xea)](_0x36e5b0=>_0x36e5b0['id']===_0x199bdf&&(!_0x36e5b0[_0x402657(0x116)]||_0x36e5b0[_0x402657(0x116)]===_0x5d08a2));if(_0x49cc4e[_0x402657(0xdc)]!==0x1)throw CliErrors['validation'](_0x402657(0xd3)+_0x199bdf+_0x402657(0xde)+_0x5d08a2+'.',_0x402657(0x111));return _0x49cc4e[0x0];}export async function listAllRuntimeRoles(_0xbdecea,_0x2a95c3={}){const _0x5dcaaa=a56_0x2a0c01,_0x5333f9=0x64,_0x27664b=[];for(let _0x253c64=0x1;;_0x253c64+=0x1){const _0xcea34=await listRuntimeAppRoles(_0xbdecea,{..._0x2a95c3[_0x5dcaaa(0xe4)]?{'roleName':_0x2a95c3[_0x5dcaaa(0xe4)]}:{},'currentPage':_0x253c64,'pageSize':_0x5333f9});_0x27664b[_0x5dcaaa(0x105)](..._0xcea34[_0x5dcaaa(0x100)]);if(_0xcea34[_0x5dcaaa(0x100)][_0x5dcaaa(0xdc)]<_0x5333f9||_0xcea34[_0x5dcaaa(0xf9)]&&_0x27664b[_0x5dcaaa(0xdc)]>=_0xcea34[_0x5dcaaa(0xf9)][_0x5dcaaa(0x114)])return _0x27664b;}}export async function resolveRuntimeRoleRef(_0x4b8636,_0x4987bf){const _0x61d400=a56_0x2a0c01,_0x4e1e49=_0x4987bf[_0x61d400(0xee)]();if(!_0x4e1e49)throw CliErrors[_0x61d400(0xd8)](_0x61d400(0xf7),_0x61d400(0xed));if(/^\d+$/[_0x61d400(0xfb)](_0x4e1e49))return getRuntimeRoleById(_0x4b8636,Number(_0x4e1e49));const _0x521643=(await listAllRuntimeRoles(_0x4b8636))['filter'](_0x73ddfc=>_0x73ddfc[_0x61d400(0xe4)]===_0x4e1e49);if(_0x521643[_0x61d400(0xdc)]===0x0)throw CliErrors[_0x61d400(0xd8)](_0x61d400(0x10e)+_0x4e1e49+_0x61d400(0x10a)+_0x4b8636+'.',_0x61d400(0x112));if(_0x521643[_0x61d400(0xdc)]>0x1)throw CliErrors['validation'](_0x61d400(0x10e)+_0x4e1e49+_0x61d400(0xfd),_0x61d400(0xfc)+_0x521643['map'](_0x2dded2=>_0x2dded2['id'])[_0x61d400(0x11d)](',\x20')+'.');return _0x521643[0x0];}function parseRuntimeUserId(_0x445401){const _0x3d91aa=a56_0x2a0c01,_0x446ebf=_0x445401[_0x3d91aa(0xee)](),_0x40558c=normalizePositiveSafeInteger(_0x446ebf);if(_0x40558c===undefined)throw CliErrors[_0x3d91aa(0xd8)](_0x3d91aa(0xdd),'Pass\x20--user\x20<userId>;\x20name\x20and\x20account\x20lookup\x20are\x20not\x20available\x20in\x20runtime\x20scope.');return _0x40558c;}export async function prepareRuntimeMemberMutation(_0x312033,_0x1f0c6b){const _0x5eeb03=a56_0x2a0c01,_0x430fdc=await resolveRuntimeRoleRef(_0x312033[_0x5eeb03(0x116)],_0x312033['str']('role'));if(_0x430fdc[_0x5eeb03(0xd5)]==='OWNER')throw CliErrors['validation']('OWNER\x20runtime\x20role\x20membership\x20cannot\x20be\x20changed\x20with\x20this\x20command.','Transfer\x20or\x20manage\x20application\x20ownership\x20through\x20the\x20dedicated\x20application\x20workflow.');const _0x338318=parseRuntimeUserId(_0x312033['str']('user')),_0x274ac7=(await listRuntimeRoleUsers(_0x312033['appCode']))[_0x5eeb03(0x11a)](_0x4ad23a=>({..._0x4ad23a,'userList':[..._0x4ad23a[_0x5eeb03(0xe0)]??[]],'applyUserList':[..._0x4ad23a['applyUserList']??[]]})),_0x167d99=_0x274ac7[_0x5eeb03(0x10c)](_0x1fcaf0=>_0x1fcaf0['id']===_0x430fdc['id']);if(!_0x167d99)throw CliErrors[_0x5eeb03(0xd8)](_0x5eeb03(0xe1)+_0x430fdc['id']+_0x5eeb03(0xeb),'Reload\x20the\x20role\x20list\x20and\x20retry\x20after\x20the\x20server\x20state\x20is\x20consistent.');const _0x129886=_0x167d99['userList'][_0x5eeb03(0x11a)](_0x10c127=>_0x10c127[_0x5eeb03(0xec)]),_0x8b94a8=_0x312033[_0x5eeb03(0x108)](_0x5eeb03(0xf6));if(_0x8b94a8!==undefined&&_0x8b94a8!==null&&_0x8b94a8!==''){const _0x2ac426=_0x312033[_0x5eeb03(0x11e)]('expect-user-count');if(!Number[_0x5eeb03(0xdb)](_0x2ac426)||_0x2ac426<0x0)throw CliErrors[_0x5eeb03(0xd8)]('--expect-user-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x129886[_0x5eeb03(0xdc)]!==_0x2ac426)throw CliErrors[_0x5eeb03(0xd8)](_0x5eeb03(0xf8)+_0x2ac426+_0x5eeb03(0x103)+_0x129886[_0x5eeb03(0xdc)]+'.','Read\x20the\x20current\x20members\x20and\x20retry\x20with\x20the\x20new\x20expected\x20count.');}const _0x1ce75e=_0x129886[_0x5eeb03(0xf4)](_0x338318),_0x20a2cc=[];let _0xa29945=!![];if(_0x1f0c6b===_0x5eeb03(0xe2)){const _0x8d9b24=await listRuntimeAppUsers(_0x312033['appCode']),_0x434a28=_0x8d9b24[_0x5eeb03(0xea)](_0x1c5e64=>Number(_0x1c5e64['code'])===_0x338318);if(_0x434a28[_0x5eeb03(0xdc)]!==0x1||!_0x434a28[0x0][_0x5eeb03(0x119)]?.[_0x5eeb03(0xee)]())throw CliErrors['validation']('Runtime\x20user\x20'+_0x338318+_0x5eeb03(0xde)+_0x312033[_0x5eeb03(0x116)]+'.',_0x5eeb03(0xe6));_0x1ce75e?(_0xa29945=![],_0x20a2cc[_0x5eeb03(0x105)](_0x5eeb03(0x11f)+_0x338318+_0x5eeb03(0xf3)+_0x430fdc['id']+'.')):_0x167d99['userList'][_0x5eeb03(0x105)]({'userId':_0x338318,'username':_0x434a28[0x0]['userName']});}else!_0x1ce75e?(_0xa29945=![],_0x20a2cc[_0x5eeb03(0x105)]('User\x20'+_0x338318+_0x5eeb03(0xe3)+_0x430fdc['id']+'.')):_0x167d99[_0x5eeb03(0xe0)]=_0x167d99[_0x5eeb03(0xe0)][_0x5eeb03(0xea)](_0x5b5baa=>_0x5b5baa[_0x5eeb03(0xec)]!==_0x338318);return{'role':_0x430fdc,'userId':_0x338318,'roleList':_0x274ac7,'before':{'userIds':_0x129886},'after':{'userIds':_0x167d99[_0x5eeb03(0xe0)]['map'](_0x2449e7=>_0x2449e7[_0x5eeb03(0xec)])},'shouldWrite':_0xa29945,'warnings':_0x20a2cc};}export function runtimeRoleWriteResult(_0xad68c2,_0x4987a8,_0x3be2e2,_0x11ef4b,_0x379e4d,_0x4e026b=[]){const _0x53d419=a56_0x2a0c01;return{'operation':_0xad68c2,'scope':_0x53d419(0x107),'selector':_0x4987a8,'before':_0x3be2e2,'after':_0x11ef4b,'dryRun':![],'backend':_0x379e4d,'warnings':_0x4e026b};}
@@ -1 +1 @@
1
- const a57_0x1b9beb=a57_0x51e7;(function(_0x492a3e,_0xabc1a0){const _0x4e8b2d=a57_0x51e7,_0x2934bf=_0x492a3e();while(!![]){try{const _0x23a4eb=parseInt(_0x4e8b2d(0x1de))/0x1*(parseInt(_0x4e8b2d(0x1bf))/0x2)+parseInt(_0x4e8b2d(0x1d6))/0x3*(parseInt(_0x4e8b2d(0x1c9))/0x4)+-parseInt(_0x4e8b2d(0x1d0))/0x5+-parseInt(_0x4e8b2d(0x1c4))/0x6+parseInt(_0x4e8b2d(0x1e0))/0x7+-parseInt(_0x4e8b2d(0x1c2))/0x8+parseInt(_0x4e8b2d(0x1da))/0x9*(-parseInt(_0x4e8b2d(0x1cf))/0xa);if(_0x23a4eb===_0xabc1a0)break;else _0x2934bf['push'](_0x2934bf['shift']());}catch(_0x2fc73){_0x2934bf['push'](_0x2934bf['shift']());}}}(a57_0xecc0,0x3d69c));import{updateRuntimeAppRole}from'../../core/api-client.js';function a57_0xecc0(){const _0x51bd22=['appCode','str','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','117ClVmyo','role-code','high-risk-write','role','1VQFObJ','POST','975723VBVinQ','New\x20role\x20name','/client/permit/role/update','571046HePkXy','validation','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','539720vBfRSL','string','1576128aNgIDD','build','remark','--name\x20must\x20not\x20be\x20blank.','trim','1403616fbscxg','flag','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','New\x20non-empty\x20role\x20remark','Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','3440ndpHTh','948215VZEsWU','update','description','name','--remark\x20must\x20not\x20be\x20blank.','num','3eSojoo'];a57_0xecc0=function(){return _0x51bd22;};return a57_0xecc0();}import{CliErrors}from'../../errors.js';function a57_0x51e7(_0x5c1857,_0x32e18d){_0x5c1857=_0x5c1857-0x1be;const _0xecc039=a57_0xecc0();let _0x51e777=_0xecc039[_0x5c1857];return _0x51e777;}import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x1b945){const _0x5d6d0d=a57_0x51e7,_0x4f682b=_0x1b945[_0x5d6d0d(0x1ca)](_0x5d6d0d(0x1db))!==undefined,_0x5409c6=_0x1b945[_0x5d6d0d(0x1ca)]('name')!==undefined,_0x15c288=_0x1b945[_0x5d6d0d(0x1ca)](_0x5d6d0d(0x1c6))!==undefined;if(!_0x4f682b&&!_0x5409c6&&!_0x15c288)throw CliErrors[_0x5d6d0d(0x1c0)](_0x5d6d0d(0x1cb));const _0x2878ee=readOptionalRuntimeRoleCode(_0x1b945),_0xfaf5a1=_0x1b945[_0x5d6d0d(0x1d8)](_0x5d6d0d(0x1d3))[_0x5d6d0d(0x1c8)](),_0x59ed5c=_0x1b945['str'](_0x5d6d0d(0x1c6))['trim']();if(_0x5409c6&&!_0xfaf5a1)throw CliErrors[_0x5d6d0d(0x1c0)](_0x5d6d0d(0x1c7));if(_0x15c288&&!_0x59ed5c)throw CliErrors[_0x5d6d0d(0x1c0)](_0x5d6d0d(0x1d4),_0x5d6d0d(0x1d9));return{..._0x2878ee?{'roleCode':_0x2878ee}:{},..._0x5409c6?{'roleName':_0xfaf5a1}:{},..._0x15c288?{'remark':_0x59ed5c}:{}};}async function prepare(_0x152c94){const _0xf6df2e=a57_0x51e7,_0x5e6ad3=await getRuntimeRoleById(_0x152c94[_0xf6df2e(0x1d7)],_0x152c94[_0xf6df2e(0x1d5)]('id'));return assertCustomRuntimeRole(_0x5e6ad3,_0xf6df2e(0x1d1)),{'role':_0x5e6ad3,'body':{'id':_0x5e6ad3['id'],'appCode':_0x152c94[_0xf6df2e(0x1d7)],...updateFields(_0x152c94)}};}export const roleUpdate={'service':a57_0x1b9beb(0x1dd),'command':a57_0x1b9beb(0x1d1),'description':a57_0x1b9beb(0x1ce),'risk':a57_0x1b9beb(0x1dc),'confirmationDescription':a57_0x1b9beb(0x1cd),'flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':'name','type':a57_0x1b9beb(0x1c3),'description':a57_0x1b9beb(0x1e1)},{'name':a57_0x1b9beb(0x1c6),'type':a57_0x1b9beb(0x1c3),'description':a57_0x1b9beb(0x1cc)}],async 'validate'(_0x3ceb16){updateFields(_0x3ceb16);},async 'dryRun'(_0x526e49){const _0x2be18e=a57_0x1b9beb,{body:_0x392580}=await prepare(_0x526e49);return dryRun(_0x2be18e(0x1df),_0x2be18e(0x1be))['body'](_0x392580)[_0x2be18e(0x1d2)](_0x2be18e(0x1c1))[_0x2be18e(0x1c5)]();},async 'execute'(_0x692afe){const _0x26964c=a57_0x1b9beb,{role:_0x7353f3,body:_0x5503b6}=await prepare(_0x692afe),_0x29a9b1=await updateRuntimeAppRole(_0x5503b6);return{'ok':!![],'data':runtimeRoleWriteResult('update',{'roleId':_0x7353f3['id']},projectRuntimeRole(_0x7353f3),projectRuntimeRole(_0x29a9b1),{'method':'POST','path':_0x26964c(0x1be)})};}};
1
+ const a57_0x305d6e=a57_0x1d83;(function(_0x38bfb5,_0x56fa04){const _0x107f11=a57_0x1d83,_0x2840c5=_0x38bfb5();while(!![]){try{const _0x26bd0c=-parseInt(_0x107f11(0x175))/0x1*(-parseInt(_0x107f11(0x172))/0x2)+parseInt(_0x107f11(0x181))/0x3+parseInt(_0x107f11(0x182))/0x4+parseInt(_0x107f11(0x180))/0x5+-parseInt(_0x107f11(0x17c))/0x6+-parseInt(_0x107f11(0x170))/0x7*(parseInt(_0x107f11(0x16e))/0x8)+parseInt(_0x107f11(0x169))/0x9;if(_0x26bd0c===_0x56fa04)break;else _0x2840c5['push'](_0x2840c5['shift']());}catch(_0x4f5d78){_0x2840c5['push'](_0x2840c5['shift']());}}}(a57_0x3b1e,0x2bdd3));function a57_0x1d83(_0x456e71,_0x5e3333){_0x456e71=_0x456e71-0x166;const _0x3b1ebb=a57_0x3b1e();let _0x1d83a8=_0x3b1ebb[_0x456e71];return _0x1d83a8;}import{updateRuntimeAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a57_0x3b1e(){const _0x2ca381=['/client/permit/role/update','appCode','validation','--remark\x20must\x20not\x20be\x20blank.','high-risk-write','string','2116452ZVXjLH','New\x20non-empty\x20role\x20remark','Pass\x20--role-code,\x20--name,\x20or\x20--remark\x20to\x20update\x20the\x20runtime\x20role.','str','95250MhcCdI','510066zpHqut','890324KUHHxS','--name\x20must\x20not\x20be\x20blank.','flag','Preview:\x20update\x20a\x20runtime\x20CUSTOM\x20role','New\x20role\x20name','562797ChcQTj','trim','name','num','update','104YDGEED','POST','23849BwVHdL','description','4MglTnT','remark','The\x20current\x20runtime\x20role\x20API\x20does\x20not\x20support\x20clearing\x20an\x20existing\x20remark.','51257qXpUHQ'];a57_0x3b1e=function(){return _0x2ca381;};return a57_0x3b1e();}import{dryRun}from'../../framework/dryrun.js';import{assertCustomRuntimeRole,getRuntimeRoleById,projectRuntimeRole,readOptionalRuntimeRoleCode,ROLE_CODE_FLAG,ROLE_ID_FLAG,runtimeRoleWriteResult}from'../../commands/role/shared.js';function updateFields(_0x36d163){const _0x35ca94=a57_0x1d83,_0x100978=_0x36d163[_0x35ca94(0x166)]('role-code')!==undefined,_0x1aaa2c=_0x36d163[_0x35ca94(0x166)](_0x35ca94(0x16b))!==undefined,_0x4758da=_0x36d163[_0x35ca94(0x166)]('remark')!==undefined;if(!_0x100978&&!_0x1aaa2c&&!_0x4758da)throw CliErrors[_0x35ca94(0x178)](_0x35ca94(0x17e));const _0x359af2=readOptionalRuntimeRoleCode(_0x36d163),_0x3233d4=_0x36d163[_0x35ca94(0x17f)](_0x35ca94(0x16b))[_0x35ca94(0x16a)](),_0x5d2016=_0x36d163[_0x35ca94(0x17f)](_0x35ca94(0x173))['trim']();if(_0x1aaa2c&&!_0x3233d4)throw CliErrors['validation'](_0x35ca94(0x183));if(_0x4758da&&!_0x5d2016)throw CliErrors[_0x35ca94(0x178)](_0x35ca94(0x179),_0x35ca94(0x174));return{..._0x359af2?{'roleCode':_0x359af2}:{},..._0x1aaa2c?{'roleName':_0x3233d4}:{},..._0x4758da?{'remark':_0x5d2016}:{}};}async function prepare(_0x2e0ef1){const _0x5aca16=a57_0x1d83,_0x378ec5=await getRuntimeRoleById(_0x2e0ef1[_0x5aca16(0x177)],_0x2e0ef1[_0x5aca16(0x16c)]('id'));return assertCustomRuntimeRole(_0x378ec5,_0x5aca16(0x16d)),{'role':_0x378ec5,'body':{'id':_0x378ec5['id'],'appCode':_0x2e0ef1['appCode'],...updateFields(_0x2e0ef1)}};}export const roleUpdate={'service':'role','command':a57_0x305d6e(0x16d),'description':'Update\x20a\x20runtime\x20CUSTOM\x20role\x27s\x20code,\x20name,\x20or\x20remark','risk':a57_0x305d6e(0x17a),'confirmationDescription':'Changes\x20the\x20custom\x20role\x20code,\x20name,\x20or\x20note\x20in\x20the\x20current\x20runtime\x20app.\x20The\x20role\x20updates\x20immediately.','flags':[ROLE_ID_FLAG,ROLE_CODE_FLAG,{'name':a57_0x305d6e(0x16b),'type':a57_0x305d6e(0x17b),'description':a57_0x305d6e(0x168)},{'name':a57_0x305d6e(0x173),'type':a57_0x305d6e(0x17b),'description':a57_0x305d6e(0x17d)}],async 'validate'(_0x2d6cd7){updateFields(_0x2d6cd7);},async 'dryRun'(_0x1037d1){const _0x4483a6=a57_0x305d6e,{body:_0x3b415d}=await prepare(_0x1037d1);return dryRun('POST',_0x4483a6(0x176))['body'](_0x3b415d)[_0x4483a6(0x171)](_0x4483a6(0x167))['build']();},async 'execute'(_0x4b4a5e){const _0x591324=a57_0x305d6e,{role:_0x40f10f,body:_0x23d272}=await prepare(_0x4b4a5e),_0x158809=await updateRuntimeAppRole(_0x23d272);return{'ok':!![],'data':runtimeRoleWriteResult(_0x591324(0x16d),{'roleId':_0x40f10f['id']},projectRuntimeRole(_0x40f10f),projectRuntimeRole(_0x158809),{'method':_0x591324(0x16f),'path':_0x591324(0x176)})};}};
@@ -1 +1 @@
1
- const a58_0x32b053=a58_0x342c;(function(_0x5c8fa4,_0xd204fe){const _0x56ae1d=a58_0x342c,_0x8bf75d=_0x5c8fa4();while(!![]){try{const _0x5ebf0a=-parseInt(_0x56ae1d(0x1c1))/0x1+parseInt(_0x56ae1d(0x1cb))/0x2+parseInt(_0x56ae1d(0x1c7))/0x3+-parseInt(_0x56ae1d(0x1c6))/0x4+-parseInt(_0x56ae1d(0x1bb))/0x5+parseInt(_0x56ae1d(0x1c2))/0x6*(parseInt(_0x56ae1d(0x1cd))/0x7)+-parseInt(_0x56ae1d(0x1c3))/0x8*(parseInt(_0x56ae1d(0x1ba))/0x9);if(_0x5ebf0a===_0xd204fe)break;else _0x8bf75d['push'](_0x8bf75d['shift']());}catch(_0x822776){_0x8bf75d['push'](_0x8bf75d['shift']());}}}(a58_0x2d15,0xba0f6));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a58_0x342c(_0x234d68,_0x36e7da){_0x234d68=_0x234d68-0x1b7;const _0x2d1581=a58_0x2d15();let _0x342c14=_0x2d1581[_0x234d68];return _0x342c14;}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';function a58_0x2d15(){const _0x264809=['490GbZRWW','user-add','role','roleList','warnings','38061ptLrPh','4488120kKgIAP','before','build','high-risk-write','/client/permit/user-role/update-user-list','userId','1133867JfmzBj','93192FjkouH','48XlmjLY','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','appCode','3189348eYolEM','3325539zQBheU','POST','shouldWrite','Adds\x20the\x20given\x20runtime\x20user\x20to\x20the\x20target\x20role.\x20The\x20user\x20receives\x20the\x20permissions\x20of\x20that\x20role.','2841102VdsyQb','body'];a58_0x2d15=function(){return _0x264809;};return a58_0x2d15();}export const roleUserAdd={'service':'role','command':a58_0x32b053(0x1ce),'description':a58_0x32b053(0x1c4),'risk':a58_0x32b053(0x1be),'confirmationDescription':a58_0x32b053(0x1ca),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x3224c0){const _0x2104b9=a58_0x32b053,_0x3c8074=await prepareRuntimeMemberMutation(_0x3224c0,_0x2104b9(0x1ce));return dryRun(_0x2104b9(0x1c8),_0x2104b9(0x1bf))[_0x2104b9(0x1cc)]({'appCode':_0x3224c0[_0x2104b9(0x1c5)],'roleList':_0x3c8074[_0x2104b9(0x1b8)]})['description'](_0x3c8074[_0x2104b9(0x1c9)]?'Preview:\x20add\x20runtime\x20role\x20member':_0x3c8074[_0x2104b9(0x1b9)][0x0])[_0x2104b9(0x1bd)]();},async 'execute'(_0xc08057){const _0x5295ed=a58_0x32b053,_0x9703ae=await prepareRuntimeMemberMutation(_0xc08057,_0x5295ed(0x1ce));return _0x9703ae['shouldWrite']&&await updateRuntimeRoleUsers(_0xc08057[_0x5295ed(0x1c5)],_0x9703ae[_0x5295ed(0x1b8)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x5295ed(0x1ce),{'roleId':_0x9703ae[_0x5295ed(0x1b7)]['id'],'userId':_0x9703ae[_0x5295ed(0x1c0)]},_0x9703ae[_0x5295ed(0x1bc)],_0x9703ae['after'],{'method':'POST','path':'/client/permit/user-role/update-user-list'},_0x9703ae[_0x5295ed(0x1b9)])};}};
1
+ const a58_0x484283=a58_0x1e82;(function(_0x1b2cf0,_0x1b18f4){const _0x2cc197=a58_0x1e82,_0x1a78aa=_0x1b2cf0();while(!![]){try{const _0x2c1265=-parseInt(_0x2cc197(0x156))/0x1+parseInt(_0x2cc197(0x143))/0x2+-parseInt(_0x2cc197(0x149))/0x3*(parseInt(_0x2cc197(0x146))/0x4)+parseInt(_0x2cc197(0x154))/0x5+parseInt(_0x2cc197(0x155))/0x6*(parseInt(_0x2cc197(0x14f))/0x7)+-parseInt(_0x2cc197(0x147))/0x8*(parseInt(_0x2cc197(0x151))/0x9)+parseInt(_0x2cc197(0x13e))/0xa;if(_0x2c1265===_0x1b18f4)break;else _0x1a78aa['push'](_0x1a78aa['shift']());}catch(_0x1182e5){_0x1a78aa['push'](_0x1a78aa['shift']());}}}(a58_0x361e,0x23a6b));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';function a58_0x1e82(_0x3d24ea,_0x49e7ca){_0x3d24ea=_0x3d24ea-0x13d;const _0x361ee3=a58_0x361e();let _0x1e82ac=_0x361ee3[_0x3d24ea];return _0x1e82ac;}function a58_0x361e(){const _0x4982eb=['6209WOwTQk','roleList','6714AiChCI','/client/permit/user-role/update-user-list','POST','57180KizuMf','876aOAMSd','60485pRHhPo','Add\x20a\x20numeric\x20userId\x20to\x20one\x20runtime\x20role','3699100xeMcDI','user-add','build','high-risk-write','warnings','289070xzOnjB','after','shouldWrite','1144972JekzMC','1744qWsjkv','before','3bLjZdC','description','role','Preview:\x20add\x20runtime\x20role\x20member','appCode','userId'];a58_0x361e=function(){return _0x4982eb;};return a58_0x361e();}import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':'role','command':'user-add','description':a58_0x484283(0x13d),'risk':a58_0x484283(0x141),'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'(_0x227440){const _0x3734df=a58_0x484283,_0x13a252=await prepareRuntimeMemberMutation(_0x227440,_0x3734df(0x13f));return dryRun(_0x3734df(0x153),_0x3734df(0x152))['body']({'appCode':_0x227440[_0x3734df(0x14d)],'roleList':_0x13a252[_0x3734df(0x150)]})[_0x3734df(0x14a)](_0x13a252[_0x3734df(0x145)]?_0x3734df(0x14c):_0x13a252[_0x3734df(0x142)][0x0])[_0x3734df(0x140)]();},async 'execute'(_0x144e16){const _0x32eb70=a58_0x484283,_0x5f29ae=await prepareRuntimeMemberMutation(_0x144e16,_0x32eb70(0x13f));return _0x5f29ae[_0x32eb70(0x145)]&&await updateRuntimeRoleUsers(_0x144e16[_0x32eb70(0x14d)],_0x5f29ae[_0x32eb70(0x150)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x32eb70(0x13f),{'roleId':_0x5f29ae[_0x32eb70(0x14b)]['id'],'userId':_0x5f29ae[_0x32eb70(0x14e)]},_0x5f29ae[_0x32eb70(0x148)],_0x5f29ae[_0x32eb70(0x144)],{'method':_0x32eb70(0x153),'path':_0x32eb70(0x152)},_0x5f29ae[_0x32eb70(0x142)])};}};
@@ -1 +1 @@
1
- function a59_0x16b1(_0x5238d8,_0x117ef2){_0x5238d8=_0x5238d8-0x103;const _0x1ea99a=a59_0x1ea9();let _0x16b1e9=_0x1ea99a[_0x5238d8];return _0x16b1e9;}const a59_0x2c68a5=a59_0x16b1;function a59_0x1ea9(){const _0x1b56e9=['POST','body','warnings','roleList','10YBRyby','3208SoDRlv','4405311wNeyYO','2955534SKWcRp','1149860KxnJjf','10186297IzCoRe','2079BcRLKA','/client/permit/user-role/update-user-list','Preview:\x20remove\x20runtime\x20role\x20member','20GDzFWd','role','2016540btQKIT','before','1254335OrWPDG','user-remove','high-risk-write','description','2FspLBy','appCode'];a59_0x1ea9=function(){return _0x1b56e9;};return a59_0x1ea9();}(function(_0x44e514,_0x3ba5c2){const _0x54e1d7=a59_0x16b1,_0x28b62d=_0x44e514();while(!![]){try{const _0x3c3440=parseInt(_0x54e1d7(0x10c))/0x1+-parseInt(_0x54e1d7(0x119))/0x2*(-parseInt(_0x54e1d7(0x113))/0x3)+parseInt(_0x54e1d7(0x111))/0x4*(-parseInt(_0x54e1d7(0x115))/0x5)+-parseInt(_0x54e1d7(0x10b))/0x6+-parseInt(_0x54e1d7(0x10e))/0x7*(-parseInt(_0x54e1d7(0x109))/0x8)+-parseInt(_0x54e1d7(0x10a))/0x9*(parseInt(_0x54e1d7(0x108))/0xa)+parseInt(_0x54e1d7(0x10d))/0xb;if(_0x3c3440===_0x3ba5c2)break;else _0x28b62d['push'](_0x28b62d['shift']());}catch(_0x147b17){_0x28b62d['push'](_0x28b62d['shift']());}}}(a59_0x1ea9,0x99fe9));import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a59_0x2c68a5(0x112),'command':a59_0x2c68a5(0x116),'description':'Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','risk':a59_0x2c68a5(0x117),'confirmationDescription':'Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x5e04b3){const _0x79958f=a59_0x2c68a5,_0x21a30b=await prepareRuntimeMemberMutation(_0x5e04b3,'user-remove');return dryRun('POST',_0x79958f(0x10f))[_0x79958f(0x105)]({'appCode':_0x5e04b3[_0x79958f(0x103)],'roleList':_0x21a30b[_0x79958f(0x107)]})[_0x79958f(0x118)](_0x21a30b['shouldWrite']?_0x79958f(0x110):_0x21a30b['warnings'][0x0])['build']();},async 'execute'(_0x1caa3a){const _0x3cb673=a59_0x2c68a5,_0x557d32=await prepareRuntimeMemberMutation(_0x1caa3a,_0x3cb673(0x116));return _0x557d32['shouldWrite']&&await updateRuntimeRoleUsers(_0x1caa3a[_0x3cb673(0x103)],_0x557d32[_0x3cb673(0x107)]),{'ok':!![],'data':runtimeRoleWriteResult(_0x3cb673(0x116),{'roleId':_0x557d32['role']['id'],'userId':_0x557d32['userId']},_0x557d32[_0x3cb673(0x114)],_0x557d32['after'],{'method':_0x3cb673(0x104),'path':_0x3cb673(0x10f)},_0x557d32[_0x3cb673(0x106)])};}};
1
+ const a59_0x2c3ed2=a59_0x2d05;function a59_0x2d05(_0x3ef748,_0xfd86d3){_0x3ef748=_0x3ef748-0x1b4;const _0x4bd394=a59_0x4bd3();let _0x2d0502=_0x4bd394[_0x3ef748];return _0x2d0502;}(function(_0x42796e,_0x114bca){const _0x2219f2=a59_0x2d05,_0x97a3f6=_0x42796e();while(!![]){try{const _0x51ac06=-parseInt(_0x2219f2(0x1c8))/0x1+-parseInt(_0x2219f2(0x1c4))/0x2+-parseInt(_0x2219f2(0x1c0))/0x3+parseInt(_0x2219f2(0x1ba))/0x4*(-parseInt(_0x2219f2(0x1b9))/0x5)+parseInt(_0x2219f2(0x1c9))/0x6*(parseInt(_0x2219f2(0x1be))/0x7)+parseInt(_0x2219f2(0x1b8))/0x8+-parseInt(_0x2219f2(0x1b5))/0x9*(-parseInt(_0x2219f2(0x1c5))/0xa);if(_0x51ac06===_0x114bca)break;else _0x97a3f6['push'](_0x97a3f6['shift']());}catch(_0x2cf113){_0x97a3f6['push'](_0x97a3f6['shift']());}}}(a59_0x4bd3,0x6ab77));function a59_0x4bd3(){const _0x17cb4a=['Removes\x20the\x20given\x20runtime\x20user\x20from\x20the\x20target\x20role.\x20The\x20user\x20loses\x20permissions\x20granted\x20only\x20by\x20that\x20role.','Remove\x20a\x20numeric\x20userId\x20from\x20one\x20runtime\x20role','before','4842OAdUhF','appCode','shouldWrite','336680sigaWE','198035AcVwre','48Rbzmbo','POST','userId','user-remove','1505FtraxZ','/client/permit/user-role/update-user-list','1852860ojoxVm','role','description','warnings','1144272AkMofL','35060hiODIt','build','roleList','210367WuKuKH','10722ZmYNfL'];a59_0x4bd3=function(){return _0x17cb4a;};return a59_0x4bd3();}import{updateRuntimeRoleUsers}from'../../core/api-client.js';import{dryRun}from'../../framework/dryrun.js';import{EXPECT_USER_COUNT_FLAG,prepareRuntimeMemberMutation,ROLE_REF_FLAG,runtimeRoleWriteResult,USER_ID_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a59_0x2c3ed2(0x1c1),'command':'user-remove','description':a59_0x2c3ed2(0x1cb),'risk':'high-risk-write','confirmationDescription':a59_0x2c3ed2(0x1ca),'flags':[ROLE_REF_FLAG,USER_ID_FLAG,EXPECT_USER_COUNT_FLAG],async 'dryRun'(_0x4a6037){const _0x2cdd2c=a59_0x2c3ed2,_0x3a2124=await prepareRuntimeMemberMutation(_0x4a6037,'user-remove');return dryRun('POST',_0x2cdd2c(0x1bf))['body']({'appCode':_0x4a6037[_0x2cdd2c(0x1b6)],'roleList':_0x3a2124[_0x2cdd2c(0x1c7)]})[_0x2cdd2c(0x1c2)](_0x3a2124[_0x2cdd2c(0x1b7)]?'Preview:\x20remove\x20runtime\x20role\x20member':_0x3a2124[_0x2cdd2c(0x1c3)][0x0])[_0x2cdd2c(0x1c6)]();},async 'execute'(_0x428835){const _0x549694=a59_0x2c3ed2,_0x2496fc=await prepareRuntimeMemberMutation(_0x428835,_0x549694(0x1bd));return _0x2496fc[_0x549694(0x1b7)]&&await updateRuntimeRoleUsers(_0x428835[_0x549694(0x1b6)],_0x2496fc['roleList']),{'ok':!![],'data':runtimeRoleWriteResult(_0x549694(0x1bd),{'roleId':_0x2496fc[_0x549694(0x1c1)]['id'],'userId':_0x2496fc[_0x549694(0x1bc)]},_0x2496fc[_0x549694(0x1b4)],_0x2496fc['after'],{'method':_0x549694(0x1bb),'path':_0x549694(0x1bf)},_0x2496fc['warnings'])};}};
@@ -1 +1 @@
1
- const a60_0x478f92=a60_0x3e4c;(function(_0x4401dd,_0x34ce22){const _0x52d7f6=a60_0x3e4c,_0x21cda5=_0x4401dd();while(!![]){try{const _0x2b5df2=-parseInt(_0x52d7f6(0x107))/0x1*(parseInt(_0x52d7f6(0x111))/0x2)+-parseInt(_0x52d7f6(0xf2))/0x3+parseInt(_0x52d7f6(0x10d))/0x4+parseInt(_0x52d7f6(0xfb))/0x5+-parseInt(_0x52d7f6(0xea))/0x6*(-parseInt(_0x52d7f6(0xe1))/0x7)+-parseInt(_0x52d7f6(0xf8))/0x8+-parseInt(_0x52d7f6(0xe7))/0x9;if(_0x2b5df2===_0x34ce22)break;else _0x21cda5['push'](_0x21cda5['shift']());}catch(_0x835fe9){_0x21cda5['push'](_0x21cda5['shift']());}}}(a60_0xf5a5,0xc35ea));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a60_0xf5a5(){const _0x3db628=['appCode','Preview:\x20delete\x20schedule\x20','deepseek-v4-flash-0731','validation','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','93053bTummM','trim','detail','schedule-id','cursor','schedule','5081156oyWkSF','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Schedule\x20UUID','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','34blrMqp','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','high-risk-write','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','UTC','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','string','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','limit','--title\x20must\x20not\x20be\x20blank.','\x20immediately','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','taskId','scheduleId','isSafeInteger','Queued\x20Task\x20','CRON','kind','list','49RKiRHU','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','/schedules','build','kimi/k3','title','4228470yQCFkE','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','POST','653244DitWYR','/api/harness/apps/','--prompt\x20must\x20not\x20be\x20blank.','\x20from\x20schedule\x20','run','ONCE','Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','prompt','1001433dGJlix','Page\x20size\x20from\x201\x20to\x20100','description','read','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','Schedule\x20title','2132896gwdevZ','/run','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','7099905VHSxdF','str','body','cron','model','length','scheduled-at'];a60_0xf5a5=function(){return _0x3db628;};return a60_0xf5a5();}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':a60_0x478f92(0xdf),'type':a60_0x478f92(0x119),'required':!![],'enum':[a60_0x478f92(0xde),a60_0x478f92(0xef)],'description':a60_0x478f92(0x10e)},CRON_FLAG={'name':a60_0x478f92(0xfe),'type':'string','description':a60_0x478f92(0xf6)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a60_0x478f92(0xe6),'type':'string','required':!![],'description':a60_0x478f92(0xf7)},PROMPT_FLAG={'name':a60_0x478f92(0xf1),'type':'string','required':!![],'description':a60_0x478f92(0x117)},MODEL_FLAG={'name':a60_0x478f92(0xff),'type':a60_0x478f92(0x119),'enum':[a60_0x478f92(0xe5),a60_0x478f92(0x104),'deepseek-v4-pro-0813'],'default':a60_0x478f92(0x104),'description':a60_0x478f92(0x106)},SCHEDULE_ID_FLAG={'name':a60_0x478f92(0x10a),'type':a60_0x478f92(0x119),'required':!![],'description':a60_0x478f92(0x10f),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a60_0x478f92(0x11b),'type':'number','default':0x14,'description':a60_0x478f92(0xf3)},CURSOR_FLAG={'name':a60_0x478f92(0x10b),'type':'string','description':a60_0x478f92(0x114)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x3e5966){const _0x23816e=a60_0x478f92,_0x1a4776=_0x3e5966[_0x23816e(0xfc)](_0x23816e(0xdf)),_0x3636b2=_0x3e5966[_0x23816e(0xfc)]('title')[_0x23816e(0x108)](),_0x32f009=_0x3e5966[_0x23816e(0xfc)]('prompt')['trim'](),_0x42068b=_0x3e5966[_0x23816e(0xfc)](_0x23816e(0xff)),_0x4a3596=_0x3e5966[_0x23816e(0xfc)](_0x23816e(0xfe)),_0x185f34=_0x3e5966[_0x23816e(0xfc)](_0x23816e(0x101));if(!_0x3636b2)throw CliErrors[_0x23816e(0x105)](_0x23816e(0x11c));if(!_0x32f009)throw CliErrors[_0x23816e(0x105)](_0x23816e(0xec));if(_0x1a4776===_0x23816e(0xde)){if(!_0x4a3596||_0x185f34)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x1a4776,'timezone':'UTC','cron':_0x4a3596,'title':_0x3636b2,'prompt':_0x32f009,'model':_0x42068b};}if(_0x1a4776===_0x23816e(0xef)){if(!_0x185f34||_0x4a3596)throw CliErrors[_0x23816e(0x105)](_0x23816e(0xd9));return{'kind':_0x1a4776,'timezone':_0x23816e(0x116),'scheduledAt':_0x185f34,'title':_0x3636b2,'prompt':_0x32f009,'model':_0x42068b};}throw CliErrors[_0x23816e(0x105)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a60_0x3e4c(_0x712715,_0x4d1c08){_0x712715=_0x712715-0xd8;const _0xf5a545=a60_0xf5a5();let _0x3e4c9d=_0xf5a545[_0x712715];return _0x3e4c9d;}function scheduleCollectionPath(_0x2a1bf4){const _0x50fde2=a60_0x478f92;return _0x50fde2(0xeb)+encodeURIComponent(_0x2a1bf4)+_0x50fde2(0xe3);}function scheduleItemPath(_0x4a4907,_0xbfa189){return scheduleCollectionPath(_0x4a4907)+'/'+encodeURIComponent(_0xbfa189);}const scheduleValidate={'service':a60_0x478f92(0x10c),'command':'validate','description':a60_0x478f92(0xe2),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x6c6b5d){readScheduleInput(_0x6c6b5d);},async 'execute'(_0x16aee5){const _0x19bdd0=readScheduleInput(_0x16aee5),_0xc248b9=await validateRuntimeSchedule(_0x16aee5['appCode'],_0x19bdd0);return{'ok':!![],'data':_0xc248b9,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a60_0x478f92(0x10c),'command':'create','description':a60_0x478f92(0x110),'risk':a60_0x478f92(0x113),'confirmationDescription':a60_0x478f92(0xf0),'flags':INPUT_FLAGS,async 'validate'(_0x571a4b){readScheduleInput(_0x571a4b);},async 'execute'(_0x214c92){const _0x122c82=a60_0x478f92,_0x54904e=readScheduleInput(_0x214c92),_0x20c657=await validateRuntimeSchedule(_0x214c92[_0x122c82(0x102)],_0x54904e),_0x22a417=await createRuntimeSchedule(_0x214c92[_0x122c82(0x102)],_0x20c657);return{'ok':!![],'data':_0x22a417,'message':'Created\x20'+_0x22a417['kind']+'\x20schedule\x20'+_0x22a417[_0x122c82(0xdb)]};},async 'dryRun'(_0x482ad6){const _0x534ceb=a60_0x478f92,_0x471438=readScheduleInput(_0x482ad6);return dryRun(_0x534ceb(0xe9),scheduleCollectionPath(_0x482ad6[_0x534ceb(0x102)]))[_0x534ceb(0xfd)](_0x471438)[_0x534ceb(0xf4)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0x534ceb(0xe4)]();}},scheduleList={'service':a60_0x478f92(0x10c),'command':a60_0x478f92(0xe0),'description':a60_0x478f92(0xe8),'risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x55fd83){const _0x3e1f41=a60_0x478f92,_0x36c682=_0x55fd83['num'](_0x3e1f41(0x11b));if(!Number[_0x3e1f41(0xdc)](_0x36c682)||_0x36c682<0x1||_0x36c682>0x64)throw CliErrors[_0x3e1f41(0x105)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x4ed6ef=_0x55fd83['str'](_0x3e1f41(0x10b));if(_0x4ed6ef&&(_0x4ed6ef[_0x3e1f41(0x100)]>0x400||_0x4ed6ef[_0x3e1f41(0x108)]()!==_0x4ed6ef))throw CliErrors[_0x3e1f41(0x105)](_0x3e1f41(0x118));},async 'execute'(_0x1bf19c){const _0x5871ba=a60_0x478f92,_0x296b39=_0x1bf19c[_0x5871ba(0xfc)](_0x5871ba(0x10b)),_0x11b734=await listRuntimeSchedules(_0x1bf19c[_0x5871ba(0x102)],{'kind':_0x1bf19c[_0x5871ba(0xfc)](_0x5871ba(0xdf)),'limit':_0x1bf19c['num'](_0x5871ba(0x11b)),..._0x296b39?{'cursor':_0x296b39}:{}});return{'ok':!![],'data':_0x11b734};}},scheduleDetail={'service':a60_0x478f92(0x10c),'command':a60_0x478f92(0x109),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a60_0x478f92(0xf5),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x28ed52){const _0x24ed4a=a60_0x478f92,_0x4b83df=await getRuntimeSchedule(_0x28ed52['appCode'],_0x28ed52[_0x24ed4a(0xfc)](_0x24ed4a(0x10a)));return{'ok':!![],'data':_0x4b83df};}},scheduleRun={'service':'schedule','command':a60_0x478f92(0xee),'description':a60_0x478f92(0x112),'risk':a60_0x478f92(0x113),'confirmationDescription':a60_0x478f92(0x11a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x6b5933){const _0x256c73=a60_0x478f92,_0xda5235=_0x6b5933[_0x256c73(0xfc)](_0x256c73(0x10a)),_0x45a890=await runRuntimeSchedule(_0x6b5933[_0x256c73(0x102)],_0xda5235);return{'ok':!![],'data':_0x45a890,'message':_0x256c73(0xdd)+_0x45a890[_0x256c73(0xda)]+_0x256c73(0xed)+_0xda5235};},async 'dryRun'(_0x6f723a){const _0x157c54=a60_0x478f92,_0x17abc7=_0x6f723a[_0x157c54(0xfc)]('schedule-id');return dryRun(_0x157c54(0xe9),scheduleItemPath(_0x6f723a[_0x157c54(0x102)],_0x17abc7)+_0x157c54(0xf9))[_0x157c54(0xf4)]('Preview:\x20run\x20schedule\x20'+_0x17abc7+_0x157c54(0xd8))[_0x157c54(0xe4)]();}},scheduleDelete={'service':a60_0x478f92(0x10c),'command':'delete','description':a60_0x478f92(0xfa),'risk':a60_0x478f92(0x113),'confirmationDescription':a60_0x478f92(0x115),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5d91b7){const _0x52acb6=a60_0x478f92,_0x254948=_0x5d91b7[_0x52acb6(0xfc)](_0x52acb6(0x10a)),_0x510592=await deleteRuntimeSchedule(_0x5d91b7[_0x52acb6(0x102)],_0x254948);return{'ok':!![],'data':_0x510592,'message':'Deleted\x20schedule\x20'+_0x254948};},async 'dryRun'(_0x5aff8b){const _0x152290=a60_0x478f92,_0x3817ea=_0x5aff8b[_0x152290(0xfc)]('schedule-id');return dryRun('DELETE',scheduleItemPath(_0x5aff8b[_0x152290(0x102)],_0x3817ea))[_0x152290(0xf4)](_0x152290(0x103)+_0x3817ea)[_0x152290(0xe4)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a60_0x13b800=a60_0xc906;(function(_0x3d74e2,_0x72ad8d){const _0x476cfb=a60_0xc906,_0x3f79e1=_0x3d74e2();while(!![]){try{const _0x74640f=-parseInt(_0x476cfb(0xc7))/0x1*(parseInt(_0x476cfb(0xc6))/0x2)+-parseInt(_0x476cfb(0x94))/0x3*(-parseInt(_0x476cfb(0xaf))/0x4)+-parseInt(_0x476cfb(0xb6))/0x5*(parseInt(_0x476cfb(0xb3))/0x6)+parseInt(_0x476cfb(0xcf))/0x7*(parseInt(_0x476cfb(0xd1))/0x8)+parseInt(_0x476cfb(0xa0))/0x9+-parseInt(_0x476cfb(0x9d))/0xa*(parseInt(_0x476cfb(0xb5))/0xb)+parseInt(_0x476cfb(0xc9))/0xc*(parseInt(_0x476cfb(0x92))/0xd);if(_0x74640f===_0x72ad8d)break;else _0x3f79e1['push'](_0x3f79e1['shift']());}catch(_0x36ab5a){_0x3f79e1['push'](_0x3f79e1['shift']());}}}(a60_0x4c7a,0x537f3));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a60_0xc906(_0x42a553,_0xc35142){_0x42a553=_0x42a553-0x8e;const _0x4c7af4=a60_0x4c7a();let _0xc9062e=_0x4c7af4[_0x42a553];return _0xc9062e;}import{CliErrors}from'../../errors.js';function a60_0x4c7a(){const _0x25d13f=['\x20schedule\x20','Show\x20one\x20schedule\x20by\x20schedule\x20ID','read','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','642844dYjMVc','1WhVwAK','run','696vMKCRU','validate','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','build','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','appCode','7mtizwt','UTC','450808MmXnAU','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','trim','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','model','detail','title','deepseek-v4-pro-0813','cron','isSafeInteger','Create\x20a\x20recurring\x20or\x20one-shot\x20Agent\x20schedule','str','100581iguHPL','limit','135tIDUsA','ONCE','scheduleId','kind','Schedule\x20title','POST','Preview:\x20run\x20schedule\x20','high-risk-write','create','2490iWPiHp','taskId','schedule','2165544nwaofP','list','DELETE','Ignores\x20the\x20original\x20trigger\x20time,\x20runs\x20the\x20schedule\x20once\x20now,\x20and\x20creates\x20a\x20new\x20Agent\x20Task.','cursor','string','Deleted\x20schedule\x20','\x20from\x20schedule\x20','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','body','schedule-id','deepseek-v4-flash-0731','\x20immediately','validation','CRON','60468FMiPYv','Created\x20','Schedule\x20UUID','length','60bbStNo','--title\x20must\x20not\x20be\x20blank.','9097UDSuky','278315oMqJuH','Run\x20the\x20schedule\x20once\x20immediately\x20and\x20create\x20a\x20Task','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Preview:\x20create\x20an\x20Agent\x20schedule','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','prompt','Delete\x20the\x20schedule\x20and\x20stop\x20future\x20triggers','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','description','num','kimi/k3'];a60_0x4c7a=function(){return _0x25d13f;};return a60_0x4c7a();}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':a60_0x13b800(0x97),'type':a60_0x13b800(0xa5),'required':!![],'enum':[a60_0x13b800(0xae),a60_0x13b800(0x95)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a60_0x13b800(0x8e),'type':a60_0x13b800(0xa5),'description':a60_0x13b800(0xcd)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a60_0x13b800(0xa5),'description':a60_0x13b800(0xa8)},TITLE_FLAG={'name':a60_0x13b800(0xd7),'type':a60_0x13b800(0xa5),'required':!![],'description':a60_0x13b800(0x98)},PROMPT_FLAG={'name':a60_0x13b800(0xbc),'type':a60_0x13b800(0xa5),'required':!![],'description':a60_0x13b800(0xbb)},MODEL_FLAG={'name':a60_0x13b800(0xd5),'type':a60_0x13b800(0xa5),'enum':[a60_0x13b800(0xc1),a60_0x13b800(0xab),a60_0x13b800(0xd8)],'default':a60_0x13b800(0xab),'description':a60_0x13b800(0xb9)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a60_0x13b800(0xa5),'required':!![],'description':a60_0x13b800(0xb1),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a60_0x13b800(0x93),'type':'number','default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a60_0x13b800(0xa4),'type':a60_0x13b800(0xa5),'description':a60_0x13b800(0xd2)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x4d174a){const _0xe1e0be=a60_0x13b800,_0x5506ad=_0x4d174a['str'](_0xe1e0be(0x97)),_0x2c0abd=_0x4d174a[_0xe1e0be(0x91)]('title')['trim'](),_0x32d5e8=_0x4d174a[_0xe1e0be(0x91)](_0xe1e0be(0xbc))[_0xe1e0be(0xd3)](),_0x342e51=_0x4d174a[_0xe1e0be(0x91)](_0xe1e0be(0xd5)),_0x420af6=_0x4d174a[_0xe1e0be(0x91)](_0xe1e0be(0x8e)),_0x49db1f=_0x4d174a[_0xe1e0be(0x91)]('scheduled-at');if(!_0x2c0abd)throw CliErrors[_0xe1e0be(0xad)](_0xe1e0be(0xb4));if(!_0x32d5e8)throw CliErrors[_0xe1e0be(0xad)]('--prompt\x20must\x20not\x20be\x20blank.');if(_0x5506ad===_0xe1e0be(0xae)){if(!_0x420af6||_0x49db1f)throw CliErrors[_0xe1e0be(0xad)](_0xe1e0be(0xcb));return{'kind':_0x5506ad,'timezone':_0xe1e0be(0xd0),'cron':_0x420af6,'title':_0x2c0abd,'prompt':_0x32d5e8,'model':_0x342e51};}if(_0x5506ad===_0xe1e0be(0x95)){if(!_0x49db1f||_0x420af6)throw CliErrors[_0xe1e0be(0xad)](_0xe1e0be(0xb8));return{'kind':_0x5506ad,'timezone':'UTC','scheduledAt':_0x49db1f,'title':_0x2c0abd,'prompt':_0x32d5e8,'model':_0x342e51};}throw CliErrors['validation'](_0xe1e0be(0xd4));}function scheduleCollectionPath(_0x4d3043){return'/api/harness/apps/'+encodeURIComponent(_0x4d3043)+'/schedules';}function scheduleItemPath(_0x5d1e2c,_0x225cfc){return scheduleCollectionPath(_0x5d1e2c)+'/'+encodeURIComponent(_0x225cfc);}const scheduleValidate={'service':'schedule','command':a60_0x13b800(0xca),'description':a60_0x13b800(0xc5),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x22ea78){readScheduleInput(_0x22ea78);},async 'execute'(_0x60dcc7){const _0x53282d=a60_0x13b800,_0x32d124=readScheduleInput(_0x60dcc7),_0x4f71ae=await validateRuntimeSchedule(_0x60dcc7[_0x53282d(0xce)],_0x32d124);return{'ok':!![],'data':_0x4f71ae,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':'schedule','command':a60_0x13b800(0x9c),'description':a60_0x13b800(0x90),'risk':a60_0x13b800(0x9b),'confirmationDescription':'Creates\x20a\x20schedule\x20in\x20the\x20current\x20app\x20that\x20can\x20auto-trigger\x20an\x20Agent.\x20At\x20the\x20scheduled\x20time\x20a\x20Task\x20is\x20created\x20and\x20run.','flags':INPUT_FLAGS,async 'validate'(_0x53d20b){readScheduleInput(_0x53d20b);},async 'execute'(_0x57720b){const _0x279857=a60_0x13b800,_0x19a32d=readScheduleInput(_0x57720b),_0x48f08e=await validateRuntimeSchedule(_0x57720b[_0x279857(0xce)],_0x19a32d),_0x2da404=await createRuntimeSchedule(_0x57720b[_0x279857(0xce)],_0x48f08e);return{'ok':!![],'data':_0x2da404,'message':_0x279857(0xb0)+_0x2da404['kind']+_0x279857(0xc2)+_0x2da404[_0x279857(0x96)]};},async 'dryRun'(_0x29f459){const _0x3a6496=a60_0x13b800,_0x2e0318=readScheduleInput(_0x29f459);return dryRun(_0x3a6496(0x99),scheduleCollectionPath(_0x29f459[_0x3a6496(0xce)]))[_0x3a6496(0xa9)](_0x2e0318)[_0x3a6496(0xbf)](_0x3a6496(0xba))[_0x3a6496(0xcc)]();}},scheduleList={'service':a60_0x13b800(0x9f),'command':a60_0x13b800(0xa1),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a60_0x13b800(0xc4),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3d76fd){const _0x5c2843=a60_0x13b800,_0x448065=_0x3d76fd[_0x5c2843(0xc0)](_0x5c2843(0x93));if(!Number[_0x5c2843(0x8f)](_0x448065)||_0x448065<0x1||_0x448065>0x64)throw CliErrors[_0x5c2843(0xad)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x20f43a=_0x3d76fd[_0x5c2843(0x91)](_0x5c2843(0xa4));if(_0x20f43a&&(_0x20f43a[_0x5c2843(0xb2)]>0x400||_0x20f43a[_0x5c2843(0xd3)]()!==_0x20f43a))throw CliErrors['validation'](_0x5c2843(0xbe));},async 'execute'(_0x5bba0d){const _0x49d999=a60_0x13b800,_0x1bfb2c=_0x5bba0d[_0x49d999(0x91)](_0x49d999(0xa4)),_0x3057e4=await listRuntimeSchedules(_0x5bba0d[_0x49d999(0xce)],{'kind':_0x5bba0d[_0x49d999(0x91)](_0x49d999(0x97)),'limit':_0x5bba0d[_0x49d999(0xc0)](_0x49d999(0x93)),..._0x1bfb2c?{'cursor':_0x1bfb2c}:{}});return{'ok':!![],'data':_0x3057e4};}},scheduleDetail={'service':a60_0x13b800(0x9f),'command':a60_0x13b800(0xd6),'description':a60_0x13b800(0xc3),'risk':a60_0x13b800(0xc4),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x454bb2){const _0x2a9c9a=a60_0x13b800,_0x2c9a22=await getRuntimeSchedule(_0x454bb2[_0x2a9c9a(0xce)],_0x454bb2[_0x2a9c9a(0x91)](_0x2a9c9a(0xaa)));return{'ok':!![],'data':_0x2c9a22};}},scheduleRun={'service':'schedule','command':a60_0x13b800(0xc8),'description':a60_0x13b800(0xb7),'risk':a60_0x13b800(0x9b),'confirmationDescription':a60_0x13b800(0xa3),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4b7f8f){const _0x4af613=a60_0x13b800,_0x185d8c=_0x4b7f8f[_0x4af613(0x91)](_0x4af613(0xaa)),_0x3f0dfa=await runRuntimeSchedule(_0x4b7f8f['appCode'],_0x185d8c);return{'ok':!![],'data':_0x3f0dfa,'message':'Queued\x20Task\x20'+_0x3f0dfa[_0x4af613(0x9e)]+_0x4af613(0xa7)+_0x185d8c};},async 'dryRun'(_0x4b9a33){const _0x4a1f50=a60_0x13b800,_0x1972e8=_0x4b9a33[_0x4a1f50(0x91)](_0x4a1f50(0xaa));return dryRun(_0x4a1f50(0x99),scheduleItemPath(_0x4b9a33[_0x4a1f50(0xce)],_0x1972e8)+'/run')[_0x4a1f50(0xbf)](_0x4a1f50(0x9a)+_0x1972e8+_0x4a1f50(0xac))[_0x4a1f50(0xcc)]();}},scheduleDelete={'service':a60_0x13b800(0x9f),'command':'delete','description':a60_0x13b800(0xbd),'risk':a60_0x13b800(0x9b),'confirmationDescription':'Permanently\x20deletes\x20the\x20schedule\x20and\x20stops\x20future\x20auto-triggers.\x20Historical\x20Tasks\x20already\x20created\x20are\x20not\x20affected.','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5b5b20){const _0x3c6ec3=a60_0x13b800,_0x17b44c=_0x5b5b20[_0x3c6ec3(0x91)](_0x3c6ec3(0xaa)),_0x432f0d=await deleteRuntimeSchedule(_0x5b5b20[_0x3c6ec3(0xce)],_0x17b44c);return{'ok':!![],'data':_0x432f0d,'message':_0x3c6ec3(0xa6)+_0x17b44c};},async 'dryRun'(_0x4dcb39){const _0x5ec9de=a60_0x13b800,_0x5db79a=_0x4dcb39[_0x5ec9de(0x91)](_0x5ec9de(0xaa));return dryRun(_0x5ec9de(0xa2),scheduleItemPath(_0x4dcb39[_0x5ec9de(0xce)],_0x5db79a))[_0x5ec9de(0xbf)]('Preview:\x20delete\x20schedule\x20'+_0x5db79a)[_0x5ec9de(0xcc)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a61_0x5e7138=a61_0x39f9;(function(_0x1a4c08,_0x2e4121){const _0x382ff7=a61_0x39f9,_0x52038b=_0x1a4c08();while(!![]){try{const _0x48a0ac=parseInt(_0x382ff7(0x19e))/0x1*(parseInt(_0x382ff7(0x19a))/0x2)+-parseInt(_0x382ff7(0x1a1))/0x3+parseInt(_0x382ff7(0x19f))/0x4*(parseInt(_0x382ff7(0x1a0))/0x5)+-parseInt(_0x382ff7(0x19b))/0x6+-parseInt(_0x382ff7(0x19d))/0x7+parseInt(_0x382ff7(0x1a3))/0x8*(-parseInt(_0x382ff7(0x1a2))/0x9)+-parseInt(_0x382ff7(0x199))/0xa;if(_0x48a0ac===_0x2e4121)break;else _0x52038b['push'](_0x52038b['shift']());}catch(_0x1ce01f){_0x52038b['push'](_0x52038b['shift']());}}}(a61_0x1f17,0xbe16d));function a61_0x39f9(_0xb7d30e,_0x30fd79){_0xb7d30e=_0xb7d30e-0x199;const _0x1f1722=a61_0x1f17();let _0x39f96c=_0x1f1722[_0xb7d30e];return _0x39f96c;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2fee58){const _0x3dc5b9=await buildSchemaPayload();return{'ok':!![],'data':_0x3dc5b9};}export const schemaDefinition={'service':'schema','command':'export','description':a61_0x5e7138(0x19c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a61_0x1f17(){const _0x326ec0=['1658890eHrtNA','2CxeMRd','930288mbbPCq','Export\x20machine-readable\x20command\x20schema\x20(JSON)','3236310IvdzPC','1456258IVAFKZ','4135660gNtlhI','5aNDiim','861801Jcmuqp','1458qTnbGl','31656GrTYzn'];a61_0x1f17=function(){return _0x326ec0;};return a61_0x1f17();}
1
+ const a61_0x34b6ec=a61_0x2a96;function a61_0x2a96(_0x30398c,_0x266861){_0x30398c=_0x30398c-0x154;const _0x3b5cd4=a61_0x3b5c();let _0x2a969b=_0x3b5cd4[_0x30398c];return _0x2a969b;}(function(_0x2f64a2,_0x4914b5){const _0x3e94d6=a61_0x2a96,_0x48cd7c=_0x2f64a2();while(!![]){try{const _0x140ff2=parseInt(_0x3e94d6(0x158))/0x1*(-parseInt(_0x3e94d6(0x154))/0x2)+-parseInt(_0x3e94d6(0x157))/0x3*(-parseInt(_0x3e94d6(0x15d))/0x4)+parseInt(_0x3e94d6(0x15c))/0x5*(-parseInt(_0x3e94d6(0x15b))/0x6)+parseInt(_0x3e94d6(0x156))/0x7+-parseInt(_0x3e94d6(0x15a))/0x8+-parseInt(_0x3e94d6(0x15e))/0x9*(parseInt(_0x3e94d6(0x159))/0xa)+parseInt(_0x3e94d6(0x15f))/0xb;if(_0x140ff2===_0x4914b5)break;else _0x48cd7c['push'](_0x48cd7c['shift']());}catch(_0x7e011e){_0x48cd7c['push'](_0x48cd7c['shift']());}}}(a61_0x3b5c,0xc8988));function a61_0x3b5c(){const _0x1536b9=['4LUShOp','82791HmDRkn','32017612zfrVzG','433064oTFYPB','schema','2067324ihzdIe','2349261oOkJeg','4eNfpMm','860YpfzZx','11056504GvhiBq','768996XOZhgq','5ITxGBp'];a61_0x3b5c=function(){return _0x1536b9;};return a61_0x3b5c();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x7b753d){const _0x20cd06=await buildSchemaPayload();return{'ok':!![],'data':_0x20cd06};}export const schemaDefinition={'service':a61_0x34b6ec(0x155),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x124398,_0x25da1e){const _0x39d8bc=a62_0x5e26,_0x18043c=_0x124398();while(!![]){try{const _0x11cbce=-parseInt(_0x39d8bc(0xaf))/0x1+-parseInt(_0x39d8bc(0xca))/0x2+-parseInt(_0x39d8bc(0x8b))/0x3*(-parseInt(_0x39d8bc(0xb9))/0x4)+parseInt(_0x39d8bc(0xae))/0x5+parseInt(_0x39d8bc(0x88))/0x6*(parseInt(_0x39d8bc(0x87))/0x7)+parseInt(_0x39d8bc(0xa9))/0x8*(-parseInt(_0x39d8bc(0xac))/0x9)+-parseInt(_0x39d8bc(0x99))/0xa;if(_0x11cbce===_0x25da1e)break;else _0x18043c['push'](_0x18043c['shift']());}catch(_0x3cb85e){_0x18043c['push'](_0x18043c['shift']());}}}(a62_0x39f5,0x3ab1e));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';function a62_0x5e26(_0x5c5416,_0x72388d){_0x5c5416=_0x5c5416-0x68;const _0x39f564=a62_0x39f5();let _0x5e2622=_0x39f564[_0x5c5416];return _0x5e2622;}import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x33537c,_0x5abf2a){const _0x2e6f92=a62_0x5e26,_0x1547d1=listLocalServiceTrees();let _0x1fe392;for(const _0x42f30e of _0x1547d1){const _0x384921=matchServiceTreeCommand(_0x42f30e,_0x33537c);if(!_0x384921)continue;(!_0x1fe392||_0x384921[_0x2e6f92(0x6f)]['fullPath']['length']>_0x1fe392['command'][_0x2e6f92(0xc1)][_0x2e6f92(0x8e)])&&(_0x1fe392={'tree':_0x42f30e,'command':_0x384921[_0x2e6f92(0x6f)],'remainingArgs':_0x384921[_0x2e6f92(0x6d)]});}if(!_0x1fe392)return undefined;const _0x257c74={..._0x5abf2a};return applyAppBinding(_0x1fe392[_0x2e6f92(0x7d)],_0x1fe392[_0x2e6f92(0x6f)],_0x257c74),{'definition':buildDynamicCommandDefinition(_0x1fe392['tree'],_0x1fe392[_0x2e6f92(0x6f)]),'args':_0x1fe392[_0x2e6f92(0x6d)],'flags':_0x257c74,'tree':_0x1fe392['tree'],'command':_0x1fe392[_0x2e6f92(0x6f)]};}export function generateDynamicServiceHelp(_0xc7ed8){const _0x2c69ad=a62_0x5e26,_0x541987=listLocalServiceTrees()[_0x2c69ad(0xb1)](_0x4df998=>_0x4df998[_0x2c69ad(0xab)]['code']===_0xc7ed8);if(!_0x541987)return undefined;const _0x11731c=[CLI_BIN_NAME+'\x20'+_0xc7ed8+'\x20<command>\x20[flags]','',_0x541987[_0x2c69ad(0xab)][_0x2c69ad(0xc8)]||_0xc7ed8,_0x541987[_0x2c69ad(0xab)]['description']?'\x20\x20'+_0x541987[_0x2c69ad(0xab)]['description']:'','',_0x2c69ad(0x72),..._0x541987[_0x2c69ad(0xa0)]['map'](_0x3052ce=>{const _0x1e3292=_0x2c69ad,_0x53b9f0=_0x3052ce[_0x1e3292(0xc1)][_0x1e3292(0xc4)](0x1)[_0x1e3292(0x83)]('\x20'),_0x568751=_0x3052ce['risk']===_0x1e3292(0xb7)?'':'\x20['+_0x3052ce[_0x1e3292(0x78)]+']';return'\x20\x20'+_0x53b9f0['padEnd'](0x18)+'\x20'+(_0x3052ce[_0x1e3292(0x7b)]||'')+_0x568751;}),'','Use\x20`'+CLI_BIN_NAME+_0x2c69ad(0x93)+_0xc7ed8+_0x2c69ad(0x8f)][_0x2c69ad(0x8a)](Boolean);return _0x11731c[_0x2c69ad(0x83)]('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x1c6fe1=>{const _0x1bd28a=a62_0x5e26,_0x403b8d=_0x1c6fe1[_0x1bd28a(0x6e)];return{'service':_0x403b8d[_0x1bd28a(0xab)][_0x1bd28a(0x7e)],'label':_0x403b8d['service'][_0x1bd28a(0xc8)]||_0x403b8d[_0x1bd28a(0xab)][_0x1bd28a(0x7e)],'commands':_0x403b8d[_0x1bd28a(0xa0)][_0x1bd28a(0xc3)](_0x12abd4=>({'command':dynamicCommandName(_0x12abd4),'description':_0x12abd4['description']||_0x1bd28a(0xa5)+_0x12abd4[_0x1bd28a(0xa4)],'tag':riskTag(_0x12abd4[_0x1bd28a(0x78)])}))};});}export function getDynamicServiceEntry(_0x366004){return listDynamicServiceEntries()['find'](_0x2fcad5=>_0x2fcad5['service']===_0x366004);}export function listDynamicServiceDefinitions(_0x3a8d28){const _0x3865a0=a62_0x5e26;return listLocalServiceTrees()[_0x3865a0(0x8a)](_0xccd7c2=>!_0x3a8d28||_0xccd7c2[_0x3865a0(0xab)][_0x3865a0(0x7e)]===_0x3a8d28)['flatMap'](_0x40f5ed=>_0x40f5ed[_0x3865a0(0xa0)][_0x3865a0(0xc3)](_0x2261f9=>buildDynamicCommandDefinition(_0x40f5ed,_0x2261f9)));}export function getDynamicServiceDefinitions(_0x19b427){const _0x171754=a62_0x5e26,_0x587fef=listDynamicServiceDefinitions(_0x19b427);return _0x587fef[_0x171754(0x8e)]>0x0?_0x587fef:undefined;}export function findDynamicServiceDefinition(_0x697f04,_0x5b7315){const _0x3a510f=a62_0x5e26;return listDynamicServiceDefinitions(_0x697f04)[_0x3a510f(0xb1)](_0x12124e=>_0x12124e['command']===_0x5b7315);}export function buildDynamicCommandDefinition(_0x4caf4a,_0x3c83bf){const _0x3541b4=a62_0x5e26;return{'service':_0x4caf4a[_0x3541b4(0xab)][_0x3541b4(0x7e)],'command':dynamicCommandName(_0x3c83bf),'description':_0x3c83bf[_0x3541b4(0x7b)]||_0x3541b4(0xa5)+_0x3c83bf[_0x3541b4(0xa4)],'risk':_0x3c83bf[_0x3541b4(0x78)],..._0x3c83bf[_0x3541b4(0x78)]===_0x3541b4(0xb7)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x3c83bf)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x3c83bf['args'][_0x3541b4(0xc3)](_0x3b59b5=>({'name':_0x3b59b5[_0x3541b4(0xc8)],'description':_0x3b59b5[_0x3541b4(0x7b)]||_0x3b59b5[_0x3541b4(0xc8)],'required':_0x3b59b5[_0x3541b4(0xa3)]})),'flags':_0x3c83bf[_0x3541b4(0xa8)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x3c83bf),async 'dryRun'(_0x197fcc){const _0x15bb50=_0x3541b4,_0x3fbeec=await compilePlan(_0x3c83bf,_0x197fcc);return{'method':'SERVICE_TREE','url':_0x3c83bf[_0x15bb50(0xa4)],'body':{'target':targetPreview(_0x3fbeec),'params':_0x3fbeec[_0x15bb50(0x85)]},'description':_0x15bb50(0x97)+_0x3c83bf[_0x15bb50(0xa4)]};},async 'execute'(_0x25e17c){const _0x42f4b1=_0x3541b4,_0x470264=await compilePlan(_0x3c83bf,_0x25e17c),_0x23929d=Date['now'](),_0x267fbe=await executePlan(_0x470264,_0x3c83bf,_0x25e17c),_0x3bb317=Date['now']()-_0x23929d;return{'ok':!![],'data':{'service':_0x4caf4a['service'],'command':_0x3c83bf['cliPath'],'target':targetPreview(_0x470264),'result':_0x267fbe,'elapsed':_0x3bb317},'message':_0x42f4b1(0x95)+_0x3c83bf[_0x42f4b1(0xa4)]+_0x42f4b1(0x92)+_0x3bb317+'ms'};}};}function buildDynamicConfirmationDescription(_0xdbf03c){const _0x21dcd2=a62_0x5e26,_0x456e91=_0xdbf03c['description']||_0xdbf03c['cliPath'],_0x190b5c=_0xdbf03c[_0x21dcd2(0x78)]===_0x21dcd2(0xba)?_0x21dcd2(0xbc):_0x21dcd2(0x9a);return _0x21dcd2(0x89)+_0x456e91+_0x21dcd2(0xc2)+_0x190b5c;}function dynamicCommandName(_0x340467){const _0x291b36=a62_0x5e26;return _0x340467['fullPath'][_0x291b36(0xc4)](0x1)['join']('\x20');}function riskTag(_0x6fe6ed){const _0x5caf23=a62_0x5e26;return _0x6fe6ed===_0x5caf23(0xb7)?'':'\x20\x20['+_0x6fe6ed+']';}function flagToCommandFlag(_0x43e6d2){const _0x4027c4=a62_0x5e26;return{'name':_0x43e6d2[_0x4027c4(0x90)],'type':_0x43e6d2['type']===_0x4027c4(0xbd)?_0x4027c4(0x79):_0x43e6d2[_0x4027c4(0x8c)],'description':_0x43e6d2[_0x4027c4(0x7b)]||_0x43e6d2[_0x4027c4(0xc8)],'required':_0x43e6d2[_0x4027c4(0xa3)],'default':isPrimitiveFlagDefault(_0x43e6d2[_0x4027c4(0xc9)])?_0x43e6d2[_0x4027c4(0xc9)]:undefined,'enum':_0x43e6d2[_0x4027c4(0x9f)]};}async function compilePlan(_0x313ed9,_0x1d1136){const _0x1b881c=a62_0x5e26;return compileServiceTreeCommand(_0x313ed9,{'flags':_0x1d1136['rawFlags'],'args':_0x1d1136[_0x1b881c(0x73)],'context':await buildServiceContext(_0x313ed9,_0x1d1136)});}async function buildServiceContext(_0x3c8deb,_0x3a9e0c){const _0x111116=a62_0x5e26,_0x3c4e00={'appCode':_0x3a9e0c[_0x111116(0x8d)],'env':_0x3a9e0c[_0x111116(0x7f)],'envName':_0x3a9e0c[_0x111116(0x7f)]};if(!usesRuntimeContext(_0x3c8deb))return _0x3c4e00;const _0x59dc91=await getLoginUserInfo(),_0xae7b09=pickFirst(_0x59dc91[_0x111116(0x91)],_0x59dc91['id']);return{..._0x3c4e00,'user':_0x59dc91,'userId':_0xae7b09,'id':_0x59dc91['id'],'username':pickFirst(_0x59dc91[_0x111116(0xa2)],_0x59dc91['userName'],_0x59dc91['loginName']),'userName':_0x59dc91[_0x111116(0x7c)],'nickname':pickFirst(_0x59dc91[_0x111116(0x68)],_0x59dc91[_0x111116(0xa6)]),'nickName':_0x59dc91[_0x111116(0xa6)],'tenantCode':_0x59dc91[_0x111116(0x9d)],'employeeId':_0x59dc91['employeeId']};}function usesRuntimeContext(_0x56c90b){const _0x415e95=a62_0x5e26;return _0x56c90b[_0x415e95(0x82)][_0x415e95(0xc7)](_0x938782=>typeof _0x938782[_0x415e95(0xbf)]===_0x415e95(0x79)&&(_0x938782[_0x415e95(0xbf)][_0x415e95(0xb3)](_0x415e95(0xb0))||_0x938782[_0x415e95(0xbf)]['startsWith']('ctx.')));}function pickFirst(..._0x951f5a){const _0x480a9b=a62_0x5e26;return _0x951f5a[_0x480a9b(0xb1)](_0xa4eb03=>_0xa4eb03!==undefined&&_0xa4eb03!==null);}async function executePlan(_0x3f521a,_0xafaa0b,_0x969039){const _0x5680f8=a62_0x5e26;if(_0x3f521a['kind']==='data'){const _0x356367=await resolveDatasetCode(_0x3f521a,_0xafaa0b,_0x969039);return executeData(_0x356367,_0x3f521a[_0x5680f8(0x6f)],_0x3f521a['params']);}if(_0x3f521a['kind']==='sql'){if(!_0x3f521a['sqlCode'])throw CliErrors[_0x5680f8(0xa1)](_0x5680f8(0x95)+_0xafaa0b['cliPath']+_0x5680f8(0xb6));return executeSdkSql(_0x3f521a[_0x5680f8(0x70)],normalizeScalarParams(_0x3f521a[_0x5680f8(0x85)]));}if(_0x3f521a[_0x5680f8(0x6c)]==='bff'){const _0x25c862=_0x3f521a[_0x5680f8(0x6b)]||_0x3f521a['bffCode']||(_0x3f521a['bffId']==null?'':String(_0x3f521a['bffId']));if(!_0x25c862)throw CliErrors['validation'](_0x5680f8(0x95)+_0xafaa0b['cliPath']+'\x20requires\x20target.functionName.');return executeSdkBff(_0x25c862,_0x3f521a[_0x5680f8(0x85)]);}throw CliErrors[_0x5680f8(0xa1)](_0x5680f8(0xbb)+_0x3f521a[_0x5680f8(0x6c)]);}function a62_0x39f5(){const _0x40f5c9=['app','\x20\x20\x20\x20datatable:\x20','tenantCode','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','enum','commands','validation','username','required','cliPath','Run\x20service\x20command\x20','nickName','env','flags','592856eGmjes','\x20\x20\x20\x20command:\x20','service','27URxDFW','tableName','834900zuPpcG','220478WSSdja','context.','find','\x20\x20SERVICE\x20TREE\x20TARGET','startsWith','\x20\x20MAP\x20TO','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','\x20requires\x20target.sqlCode.','read','appRef','4gncELU','high-risk-write','Unsupported\x20service\x20target\x20kind:\x20','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','json','operator','source','const','fullPath','\x22.\x20','map','slice','\x22\x20in\x20service\x20command\x20','appBindings','some','name','default','249702KxyZzJ','nickname','\x20\x20\x20\x20','push','scriptName','kind','remainingArgs','normalizedManifest','command','sqlCode','trim','Commands:','args','dbtableConfig','Unknown\x20appRef\x20\x22','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','\x20\x20\x20\x20sqlCode:\x20','risk','string','\x20->\x20','description','userName','tree','code','envName','datatable','datasetCode','mapTo','join','target','params','fromEntries','21mQYJRm','564654ppJozg','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','filter','1171437IekKoV','type','appCode','length','`\x20to\x20inspect\x20the\x20manifest.','cliName','userId','\x20completed\x20in\x20','\x20service\x20detail\x20--service\x20','\x20\x20\x20\x20datasetCode:\x20','Service\x20command\x20','appcode','Preview\x20dynamic\x20service\x20command:\x20','entries','317220OEtbYb','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.'];a62_0x39f5=function(){return _0x40f5c9;};return a62_0x39f5();}async function resolveDatasetCode(_0x95f370,_0x522eab,_0x2d4377){const _0x3dd793=a62_0x5e26;if(_0x95f370[_0x3dd793(0x81)])return _0x95f370[_0x3dd793(0x81)];if(!_0x95f370[_0x3dd793(0x80)])throw CliErrors[_0x3dd793(0xa1)](_0x3dd793(0x95)+_0x522eab[_0x3dd793(0xa4)]+_0x3dd793(0x9e));const _0x338673=await listDatasets(_0x2d4377['appCode']),_0x311db9=_0x338673[_0x3dd793(0xb1)](_0x5b78f1=>_0x5b78f1[_0x3dd793(0x74)]?.[_0x3dd793(0xad)]===_0x95f370['datatable']);if(!_0x311db9?.[_0x3dd793(0x7e)])throw CliErrors[_0x3dd793(0xa1)]('Cannot\x20resolve\x20datatable\x20\x22'+_0x95f370[_0x3dd793(0x80)]+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x2d4377['appCode']+'.',_0x3dd793(0xb5));return _0x311db9[_0x3dd793(0x7e)];}function applyAppBinding(_0x1b77ff,_0x10b62f,_0x1943a2){const _0x204161=a62_0x5e26,_0x2a3c73=_0x10b62f[_0x204161(0x84)][_0x204161(0xb8)];if(!_0x2a3c73)return;const _0x377757=_0x1b77ff[_0x204161(0xc6)][_0x2a3c73];if(!_0x377757)throw CliErrors['validation'](_0x204161(0x75)+_0x2a3c73+_0x204161(0xc5)+_0x10b62f[_0x204161(0xa4)]+'.',_0x204161(0x76));const _0x348009=_0x377757[_0x204161(0x96)]||_0x377757[_0x204161(0x8d)];_0x348009&&!hasText(_0x1943a2['appcode'])&&(_0x1943a2[_0x204161(0x96)]=_0x348009),_0x377757['app']&&!hasText(_0x1943a2[_0x204161(0x9b)])&&!hasText(_0x1943a2[_0x204161(0x96)])&&(_0x1943a2[_0x204161(0x9b)]=_0x377757['app']),_0x377757[_0x204161(0xa7)]&&!hasText(_0x1943a2[_0x204161(0xa7)])&&(_0x1943a2['env']=_0x377757[_0x204161(0xa7)]);}function renderDynamicCommandHelp(_0x5890e6){const _0x3638c6=a62_0x5e26,_0x4c5dbf=[_0x3638c6(0xb2),'\x20\x20\x20\x20kind:\x20\x20\x20\x20'+_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x6c)],_0x3638c6(0xaa)+_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x6f)]];if(_0x5890e6['target'][_0x3638c6(0x81)])_0x4c5dbf[_0x3638c6(0x6a)](_0x3638c6(0x94)+_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x81)]);if(_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x80)])_0x4c5dbf[_0x3638c6(0x6a)](_0x3638c6(0x9c)+_0x5890e6['target'][_0x3638c6(0x80)]);if(_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x70)])_0x4c5dbf[_0x3638c6(0x6a)](_0x3638c6(0x77)+_0x5890e6[_0x3638c6(0x84)][_0x3638c6(0x70)]);if(_0x5890e6['target'][_0x3638c6(0x6b)])_0x4c5dbf[_0x3638c6(0x6a)]('\x20\x20\x20\x20functionName:\x20'+_0x5890e6['target']['scriptName']);if(_0x5890e6[_0x3638c6(0x82)][_0x3638c6(0x8e)]>0x0){_0x4c5dbf[_0x3638c6(0x6a)]('',_0x3638c6(0xb4));for(const _0x1c75e7 of _0x5890e6[_0x3638c6(0x82)]){_0x4c5dbf['push'](_0x3638c6(0x69)+(_0x1c75e7[_0x3638c6(0xbf)]||_0x3638c6(0xc0))+_0x3638c6(0x7a)+_0x1c75e7[_0x3638c6(0x84)]+(_0x1c75e7[_0x3638c6(0xbe)]?'.'+_0x1c75e7[_0x3638c6(0xbe)]:''));}}return _0x4c5dbf['join']('\x0a');}function targetPreview(_0x2b8a13){const _0x32b40d=a62_0x5e26;return{'kind':_0x2b8a13[_0x32b40d(0x6c)],'command':_0x2b8a13[_0x32b40d(0x6f)],'appRef':_0x2b8a13['appRef'],'datasetCode':_0x2b8a13[_0x32b40d(0x81)],'datatable':_0x2b8a13[_0x32b40d(0x80)],'sqlCode':_0x2b8a13[_0x32b40d(0x70)],'bffCode':_0x2b8a13['bffCode'],'bffId':_0x2b8a13['bffId'],'functionName':_0x2b8a13[_0x32b40d(0x6b)]};}function normalizeScalarParams(_0xb1bdfd){const _0x2ca203=a62_0x5e26;return Object[_0x2ca203(0x86)](Object[_0x2ca203(0x98)](_0xb1bdfd)[_0x2ca203(0x8a)](([,_0x334588])=>typeof _0x334588===_0x2ca203(0x79)||typeof _0x334588==='number'));}function hasText(_0x57fc6b){const _0x318a71=a62_0x5e26;return typeof _0x57fc6b===_0x318a71(0x79)&&_0x57fc6b[_0x318a71(0x71)]()[_0x318a71(0x8e)]>0x0;}function isPrimitiveFlagDefault(_0x1173ea){const _0x23d7df=a62_0x5e26;return _0x1173ea===undefined||typeof _0x1173ea===_0x23d7df(0x79)||typeof _0x1173ea==='number'||typeof _0x1173ea==='boolean';}
1
+ function a62_0x1ba8(_0x439fe2,_0x29a894){_0x439fe2=_0x439fe2-0xba;const _0x52bf8a=a62_0x52bf();let _0x1ba829=_0x52bf8a[_0x439fe2];return _0x1ba829;}function a62_0x52bf(){const _0x4ccb6d=['description','remainingArgs','nickname','cliPath','sqlCode','16ImSmJH','command','1393860vrGrsN','rawFlags','cliName','operator','\x20\x20[','mapTo','Cannot\x20resolve\x20datatable\x20\x22','ctx.','177600gpkgLq','\x20\x20\x20\x20kind:\x20\x20\x20\x20','tableName','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20write.\x20It\x20may\x20change\x20business\x20data\x20or\x20service\x20state.','read','312390rEBetf','Service\x20command\x20','enum','The\x20manifest\x20marks\x20this\x20command\x20as\x20a\x20high-risk\x20write.\x20It\x20may\x20make\x20business\x20changes\x20that\x20are\x20hard\x20to\x20reverse.','map','args','\x20\x20\x20\x20datasetCode:\x20','\x20\x20\x20\x20sqlCode:\x20','appRef','flags','slice','\x20requires\x20target.functionName.','scriptName','string','18ZYKGTF','\x20<command>\x20[flags]','params','context.','boolean','\x20\x20\x20\x20functionName:\x20','bff','code','loginName','kind','\x20\x20SERVICE\x20TREE\x20TARGET','1474240FirtII','appcode','userId','validation','startsWith','326055Kdwaqr','datasetCode','SERVICE_TREE','\x22.\x20','app','fullPath','some','join','\x20service\x20detail\x20--service\x20','fromEntries','tree','default','userName','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','sql','\x20\x20\x20\x20datatable:\x20','\x20->\x20','This\x20will\x20run\x20Service\x20Tree\x20command\x20\x22','service','`\x20to\x20inspect\x20the\x20manifest.','Commands:','employeeId','appBindings','nickName','normalizedManifest','length','find','name','json','tenantCode','bffCode','399522TgRwcF','high-risk-write','target','Run\x20service\x20command\x20','commands','\x20\x20MAP\x20TO','1125901daaIVR','envName','push','bffId','entries','appCode','source','filter','type','\x20completed\x20in\x20','1gGRDVT','Use\x20`','risk','datatable','env','number'];a62_0x52bf=function(){return _0x4ccb6d;};return a62_0x52bf();}(function(_0x21bf8b,_0x3fd6a0){const _0x4b5e65=a62_0x1ba8,_0x5b72e2=_0x21bf8b();while(!![]){try{const _0x5810b3=parseInt(_0x4b5e65(0xe4))/0x1*(-parseInt(_0x4b5e65(0xd4))/0x2)+parseInt(_0x4b5e65(0x11c))/0x3+-parseInt(_0x4b5e65(0xf9))/0x4+parseInt(_0x4b5e65(0x117))/0x5+parseInt(_0x4b5e65(0xfe))/0x6+-parseInt(_0x4b5e65(0xda))/0x7*(parseInt(_0x4b5e65(0xef))/0x8)+parseInt(_0x4b5e65(0x10c))/0x9*(parseInt(_0x4b5e65(0xf1))/0xa);if(_0x5810b3===_0x3fd6a0)break;else _0x5b72e2['push'](_0x5b72e2['shift']());}catch(_0x12b469){_0x5b72e2['push'](_0x5b72e2['shift']());}}}(a62_0x52bf,0x2924b));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(_0x573db2,_0x3e07f6){const _0x544e2d=a62_0x1ba8,_0x4f01f1=listLocalServiceTrees();let _0x1cdb4f;for(const _0x446376 of _0x4f01f1){const _0x528bba=matchServiceTreeCommand(_0x446376,_0x573db2);if(!_0x528bba)continue;(!_0x1cdb4f||_0x528bba[_0x544e2d(0xf0)][_0x544e2d(0xba)][_0x544e2d(0xce)]>_0x1cdb4f[_0x544e2d(0xf0)][_0x544e2d(0xba)][_0x544e2d(0xce)])&&(_0x1cdb4f={'tree':_0x446376,'command':_0x528bba[_0x544e2d(0xf0)],'remainingArgs':_0x528bba[_0x544e2d(0xeb)]});}if(!_0x1cdb4f)return undefined;const _0x3478b4={..._0x3e07f6};return applyAppBinding(_0x1cdb4f[_0x544e2d(0xbf)],_0x1cdb4f[_0x544e2d(0xf0)],_0x3478b4),{'definition':buildDynamicCommandDefinition(_0x1cdb4f['tree'],_0x1cdb4f['command']),'args':_0x1cdb4f[_0x544e2d(0xeb)],'flags':_0x3478b4,'tree':_0x1cdb4f[_0x544e2d(0xbf)],'command':_0x1cdb4f[_0x544e2d(0xf0)]};}export function generateDynamicServiceHelp(_0x5d9a42){const _0x5d59b6=a62_0x1ba8,_0x34571c=listLocalServiceTrees()[_0x5d59b6(0xcf)](_0x2c7dcd=>_0x2c7dcd[_0x5d59b6(0xc7)][_0x5d59b6(0x113)]===_0x5d9a42);if(!_0x34571c)return undefined;const _0x5443f2=[CLI_BIN_NAME+'\x20'+_0x5d9a42+_0x5d59b6(0x10d),'',_0x34571c[_0x5d59b6(0xc7)]['name']||_0x5d9a42,_0x34571c['service'][_0x5d59b6(0xea)]?'\x20\x20'+_0x34571c[_0x5d59b6(0xc7)][_0x5d59b6(0xea)]:'','',_0x5d59b6(0xc9),..._0x34571c[_0x5d59b6(0xd8)][_0x5d59b6(0x102)](_0x1fdbe4=>{const _0x3275ee=_0x5d59b6,_0x5cfc61=_0x1fdbe4[_0x3275ee(0xba)]['slice'](0x1)[_0x3275ee(0xbc)]('\x20'),_0xc5931=_0x1fdbe4['risk']===_0x3275ee(0xfd)?'':'\x20['+_0x1fdbe4['risk']+']';return'\x20\x20'+_0x5cfc61['padEnd'](0x18)+'\x20'+(_0x1fdbe4[_0x3275ee(0xea)]||'')+_0xc5931;}),'',_0x5d59b6(0xe5)+CLI_BIN_NAME+_0x5d59b6(0xbd)+_0x5d9a42+_0x5d59b6(0xc8)]['filter'](Boolean);return _0x5443f2[_0x5d59b6(0xbc)]('\x0a');}export function listDynamicServiceEntries(){const _0x1f509f=a62_0x1ba8;return listLocalServices()[_0x1f509f(0x102)](_0x36f7d5=>{const _0x3027ea=_0x1f509f,_0x58b3af=_0x36f7d5[_0x3027ea(0xcd)];return{'service':_0x58b3af[_0x3027ea(0xc7)][_0x3027ea(0x113)],'label':_0x58b3af[_0x3027ea(0xc7)]['name']||_0x58b3af[_0x3027ea(0xc7)][_0x3027ea(0x113)],'commands':_0x58b3af[_0x3027ea(0xd8)][_0x3027ea(0x102)](_0x2ef983=>({'command':dynamicCommandName(_0x2ef983),'description':_0x2ef983[_0x3027ea(0xea)]||_0x3027ea(0xd7)+_0x2ef983['cliPath'],'tag':riskTag(_0x2ef983[_0x3027ea(0xe6)])}))};});}export function getDynamicServiceEntry(_0x11fb71){const _0x48f27f=a62_0x1ba8;return listDynamicServiceEntries()[_0x48f27f(0xcf)](_0x1a7fd3=>_0x1a7fd3[_0x48f27f(0xc7)]===_0x11fb71);}export function listDynamicServiceDefinitions(_0x31852f){const _0x4d2ceb=a62_0x1ba8;return listLocalServiceTrees()[_0x4d2ceb(0xe1)](_0x17786a=>!_0x31852f||_0x17786a[_0x4d2ceb(0xc7)]['code']===_0x31852f)['flatMap'](_0x52c09b=>_0x52c09b[_0x4d2ceb(0xd8)][_0x4d2ceb(0x102)](_0x2a77aa=>buildDynamicCommandDefinition(_0x52c09b,_0x2a77aa)));}export function getDynamicServiceDefinitions(_0x2b243f){const _0x29e570=a62_0x1ba8,_0x4ac4c7=listDynamicServiceDefinitions(_0x2b243f);return _0x4ac4c7[_0x29e570(0xce)]>0x0?_0x4ac4c7:undefined;}export function findDynamicServiceDefinition(_0x56978a,_0x3722c7){const _0x361dbf=a62_0x1ba8;return listDynamicServiceDefinitions(_0x56978a)['find'](_0x4abcb8=>_0x4abcb8[_0x361dbf(0xf0)]===_0x3722c7);}export function buildDynamicCommandDefinition(_0x462dbd,_0x133bd9){const _0x25dbe4=a62_0x1ba8;return{'service':_0x462dbd['service']['code'],'command':dynamicCommandName(_0x133bd9),'description':_0x133bd9[_0x25dbe4(0xea)]||_0x25dbe4(0xd7)+_0x133bd9[_0x25dbe4(0xed)],'risk':_0x133bd9['risk'],..._0x133bd9[_0x25dbe4(0xe6)]===_0x25dbe4(0xfd)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x133bd9)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x133bd9[_0x25dbe4(0x103)][_0x25dbe4(0x102)](_0x9801e1=>({'name':_0x9801e1[_0x25dbe4(0xd0)],'description':_0x9801e1['description']||_0x9801e1[_0x25dbe4(0xd0)],'required':_0x9801e1['required']})),'flags':_0x133bd9[_0x25dbe4(0x107)][_0x25dbe4(0x102)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x133bd9),async 'dryRun'(_0x245c70){const _0x150fe9=_0x25dbe4,_0x4ed791=await compilePlan(_0x133bd9,_0x245c70);return{'method':_0x150fe9(0x11e),'url':_0x133bd9['cliPath'],'body':{'target':targetPreview(_0x4ed791),'params':_0x4ed791[_0x150fe9(0x10e)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x133bd9[_0x150fe9(0xed)]};},async 'execute'(_0x3710c8){const _0x3380e6=_0x25dbe4,_0xe8add=await compilePlan(_0x133bd9,_0x3710c8),_0x2c42a0=Date['now'](),_0x39f583=await executePlan(_0xe8add,_0x133bd9,_0x3710c8),_0x2f8bb2=Date['now']()-_0x2c42a0;return{'ok':!![],'data':{'service':_0x462dbd[_0x3380e6(0xc7)],'command':_0x133bd9[_0x3380e6(0xed)],'target':targetPreview(_0xe8add),'result':_0x39f583,'elapsed':_0x2f8bb2},'message':_0x3380e6(0xff)+_0x133bd9[_0x3380e6(0xed)]+_0x3380e6(0xe3)+_0x2f8bb2+'ms'};}};}function buildDynamicConfirmationDescription(_0x53c452){const _0x1881d3=a62_0x1ba8,_0x5165f0=_0x53c452['description']||_0x53c452['cliPath'],_0x563cdb=_0x53c452['risk']===_0x1881d3(0xd5)?_0x1881d3(0x101):_0x1881d3(0xfc);return _0x1881d3(0xc6)+_0x5165f0+_0x1881d3(0x11f)+_0x563cdb;}function dynamicCommandName(_0x3225ab){const _0x1d794d=a62_0x1ba8;return _0x3225ab['fullPath'][_0x1d794d(0x108)](0x1)[_0x1d794d(0xbc)]('\x20');}function riskTag(_0x2f3fd4){const _0x4d68d3=a62_0x1ba8;return _0x2f3fd4===_0x4d68d3(0xfd)?'':_0x4d68d3(0xf5)+_0x2f3fd4+']';}function flagToCommandFlag(_0x2a06e0){const _0x4fbdb7=a62_0x1ba8;return{'name':_0x2a06e0[_0x4fbdb7(0xf3)],'type':_0x2a06e0[_0x4fbdb7(0xe2)]===_0x4fbdb7(0xd1)?'string':_0x2a06e0[_0x4fbdb7(0xe2)],'description':_0x2a06e0[_0x4fbdb7(0xea)]||_0x2a06e0[_0x4fbdb7(0xd0)],'required':_0x2a06e0['required'],'default':isPrimitiveFlagDefault(_0x2a06e0[_0x4fbdb7(0xc0)])?_0x2a06e0[_0x4fbdb7(0xc0)]:undefined,'enum':_0x2a06e0[_0x4fbdb7(0x100)]};}async function compilePlan(_0x125e50,_0xe46022){const _0x34a5f2=a62_0x1ba8;return compileServiceTreeCommand(_0x125e50,{'flags':_0xe46022[_0x34a5f2(0xf2)],'args':_0xe46022['args'],'context':await buildServiceContext(_0x125e50,_0xe46022)});}async function buildServiceContext(_0x20264b,_0x191669){const _0x45b48f=a62_0x1ba8,_0x4c6eeb={'appCode':_0x191669['appCode'],'env':_0x191669[_0x45b48f(0xdb)],'envName':_0x191669[_0x45b48f(0xdb)]};if(!usesRuntimeContext(_0x20264b))return _0x4c6eeb;const _0xe662b3=await getLoginUserInfo(),_0x26201d=pickFirst(_0xe662b3[_0x45b48f(0x119)],_0xe662b3['id']);return{..._0x4c6eeb,'user':_0xe662b3,'userId':_0x26201d,'id':_0xe662b3['id'],'username':pickFirst(_0xe662b3['username'],_0xe662b3['userName'],_0xe662b3[_0x45b48f(0x114)]),'userName':_0xe662b3[_0x45b48f(0xc1)],'nickname':pickFirst(_0xe662b3[_0x45b48f(0xec)],_0xe662b3[_0x45b48f(0xcc)]),'nickName':_0xe662b3[_0x45b48f(0xcc)],'tenantCode':_0xe662b3[_0x45b48f(0xd2)],'employeeId':_0xe662b3[_0x45b48f(0xca)]};}function usesRuntimeContext(_0x46c26f){const _0x5e4c19=a62_0x1ba8;return _0x46c26f['mapTo'][_0x5e4c19(0xbb)](_0x2a39ed=>typeof _0x2a39ed[_0x5e4c19(0xe0)]===_0x5e4c19(0x10b)&&(_0x2a39ed[_0x5e4c19(0xe0)][_0x5e4c19(0x11b)](_0x5e4c19(0x10f))||_0x2a39ed[_0x5e4c19(0xe0)][_0x5e4c19(0x11b)](_0x5e4c19(0xf8))));}function pickFirst(..._0x14165e){const _0xb67f8=a62_0x1ba8;return _0x14165e[_0xb67f8(0xcf)](_0x397340=>_0x397340!==undefined&&_0x397340!==null);}async function executePlan(_0x6a13a3,_0x350484,_0x326644){const _0x523f20=a62_0x1ba8;if(_0x6a13a3[_0x523f20(0x115)]==='data'){const _0x3769cc=await resolveDatasetCode(_0x6a13a3,_0x350484,_0x326644);return executeData(_0x3769cc,_0x6a13a3[_0x523f20(0xf0)],_0x6a13a3[_0x523f20(0x10e)]);}if(_0x6a13a3[_0x523f20(0x115)]===_0x523f20(0xc3)){if(!_0x6a13a3[_0x523f20(0xee)])throw CliErrors[_0x523f20(0x11a)](_0x523f20(0xff)+_0x350484['cliPath']+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x6a13a3['sqlCode'],normalizeScalarParams(_0x6a13a3[_0x523f20(0x10e)]));}if(_0x6a13a3['kind']===_0x523f20(0x112)){const _0x58eb54=_0x6a13a3[_0x523f20(0x10a)]||_0x6a13a3[_0x523f20(0xd3)]||(_0x6a13a3['bffId']==null?'':String(_0x6a13a3[_0x523f20(0xdd)]));if(!_0x58eb54)throw CliErrors[_0x523f20(0x11a)](_0x523f20(0xff)+_0x350484[_0x523f20(0xed)]+_0x523f20(0x109));return executeSdkBff(_0x58eb54,_0x6a13a3[_0x523f20(0x10e)]);}throw CliErrors[_0x523f20(0x11a)]('Unsupported\x20service\x20target\x20kind:\x20'+_0x6a13a3['kind']);}async function resolveDatasetCode(_0xcbf1d0,_0x2f0941,_0xfaf984){const _0x38533c=a62_0x1ba8;if(_0xcbf1d0[_0x38533c(0x11d)])return _0xcbf1d0[_0x38533c(0x11d)];if(!_0xcbf1d0[_0x38533c(0xe7)])throw CliErrors[_0x38533c(0x11a)](_0x38533c(0xff)+_0x2f0941[_0x38533c(0xed)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x4bb7d6=await listDatasets(_0xfaf984[_0x38533c(0xdf)]),_0x5d6740=_0x4bb7d6[_0x38533c(0xcf)](_0x353bb5=>_0x353bb5['dbtableConfig']?.[_0x38533c(0xfb)]===_0xcbf1d0['datatable']);if(!_0x5d6740?.[_0x38533c(0x113)])throw CliErrors[_0x38533c(0x11a)](_0x38533c(0xf7)+_0xcbf1d0['datatable']+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0xfaf984[_0x38533c(0xdf)]+'.',_0x38533c(0xc2));return _0x5d6740[_0x38533c(0x113)];}function applyAppBinding(_0x10067e,_0x106428,_0xd28158){const _0x464174=a62_0x1ba8,_0x2beea5=_0x106428[_0x464174(0xd6)][_0x464174(0x106)];if(!_0x2beea5)return;const _0x60dece=_0x10067e[_0x464174(0xcb)][_0x2beea5];if(!_0x60dece)throw CliErrors[_0x464174(0x11a)]('Unknown\x20appRef\x20\x22'+_0x2beea5+'\x22\x20in\x20service\x20command\x20'+_0x106428[_0x464174(0xed)]+'.','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.');const _0x5268c5=_0x60dece[_0x464174(0x118)]||_0x60dece['appCode'];_0x5268c5&&!hasText(_0xd28158[_0x464174(0x118)])&&(_0xd28158[_0x464174(0x118)]=_0x5268c5),_0x60dece['app']&&!hasText(_0xd28158[_0x464174(0x120)])&&!hasText(_0xd28158[_0x464174(0x118)])&&(_0xd28158[_0x464174(0x120)]=_0x60dece[_0x464174(0x120)]),_0x60dece[_0x464174(0xe8)]&&!hasText(_0xd28158['env'])&&(_0xd28158[_0x464174(0xe8)]=_0x60dece['env']);}function renderDynamicCommandHelp(_0x3c32f2){const _0x1dc7b1=a62_0x1ba8,_0x2872bc=[_0x1dc7b1(0x116),_0x1dc7b1(0xfa)+_0x3c32f2[_0x1dc7b1(0xd6)][_0x1dc7b1(0x115)],'\x20\x20\x20\x20command:\x20'+_0x3c32f2[_0x1dc7b1(0xd6)][_0x1dc7b1(0xf0)]];if(_0x3c32f2[_0x1dc7b1(0xd6)]['datasetCode'])_0x2872bc['push'](_0x1dc7b1(0x104)+_0x3c32f2[_0x1dc7b1(0xd6)]['datasetCode']);if(_0x3c32f2[_0x1dc7b1(0xd6)]['datatable'])_0x2872bc[_0x1dc7b1(0xdc)](_0x1dc7b1(0xc4)+_0x3c32f2[_0x1dc7b1(0xd6)]['datatable']);if(_0x3c32f2['target'][_0x1dc7b1(0xee)])_0x2872bc[_0x1dc7b1(0xdc)](_0x1dc7b1(0x105)+_0x3c32f2['target'][_0x1dc7b1(0xee)]);if(_0x3c32f2[_0x1dc7b1(0xd6)][_0x1dc7b1(0x10a)])_0x2872bc[_0x1dc7b1(0xdc)](_0x1dc7b1(0x111)+_0x3c32f2[_0x1dc7b1(0xd6)][_0x1dc7b1(0x10a)]);if(_0x3c32f2[_0x1dc7b1(0xf6)][_0x1dc7b1(0xce)]>0x0){_0x2872bc[_0x1dc7b1(0xdc)]('',_0x1dc7b1(0xd9));for(const _0x19a259 of _0x3c32f2[_0x1dc7b1(0xf6)]){_0x2872bc['push']('\x20\x20\x20\x20'+(_0x19a259[_0x1dc7b1(0xe0)]||'const')+_0x1dc7b1(0xc5)+_0x19a259['target']+(_0x19a259['operator']?'.'+_0x19a259[_0x1dc7b1(0xf4)]:''));}}return _0x2872bc[_0x1dc7b1(0xbc)]('\x0a');}function targetPreview(_0x25de2b){const _0x36b684=a62_0x1ba8;return{'kind':_0x25de2b[_0x36b684(0x115)],'command':_0x25de2b[_0x36b684(0xf0)],'appRef':_0x25de2b[_0x36b684(0x106)],'datasetCode':_0x25de2b[_0x36b684(0x11d)],'datatable':_0x25de2b['datatable'],'sqlCode':_0x25de2b[_0x36b684(0xee)],'bffCode':_0x25de2b['bffCode'],'bffId':_0x25de2b[_0x36b684(0xdd)],'functionName':_0x25de2b['scriptName']};}function normalizeScalarParams(_0x3f36e3){const _0x3a3c12=a62_0x1ba8;return Object[_0x3a3c12(0xbe)](Object[_0x3a3c12(0xde)](_0x3f36e3)[_0x3a3c12(0xe1)](([,_0x51280c])=>typeof _0x51280c===_0x3a3c12(0x10b)||typeof _0x51280c===_0x3a3c12(0xe9)));}function hasText(_0x453dca){const _0x3de7fc=a62_0x1ba8;return typeof _0x453dca==='string'&&_0x453dca['trim']()[_0x3de7fc(0xce)]>0x0;}function isPrimitiveFlagDefault(_0x327743){const _0x5d306d=a62_0x1ba8;return _0x327743===undefined||typeof _0x327743==='string'||typeof _0x327743===_0x5d306d(0xe9)||typeof _0x327743===_0x5d306d(0x110);}
@@ -1 +1 @@
1
- (function(_0x13077b,_0x3f688b){const _0x265985=a63_0x5cdb,_0x40b3fa=_0x13077b();while(!![]){try{const _0x23da6e=parseInt(_0x265985(0x1f8))/0x1+parseInt(_0x265985(0x1f6))/0x2+-parseInt(_0x265985(0x1e5))/0x3*(parseInt(_0x265985(0x1e2))/0x4)+-parseInt(_0x265985(0x1ff))/0x5+-parseInt(_0x265985(0x1e9))/0x6+parseInt(_0x265985(0x1eb))/0x7*(parseInt(_0x265985(0x1f5))/0x8)+parseInt(_0x265985(0x1fc))/0x9;if(_0x23da6e===_0x3f688b)break;else _0x40b3fa['push'](_0x40b3fa['shift']());}catch(_0x1afd0a){_0x40b3fa['push'](_0x40b3fa['shift']());}}}(a63_0x38fe,0x5aa44));export function adaptServiceTreeManifestForLegacyFramework(_0xd9007){const _0x5475d1=a63_0x5cdb,_0x29b9ad=cloneJsonValue(_0xd9007),_0xf42401=[];if(!isObjectRecord(_0x29b9ad))return{'manifest':_0x29b9ad,'errors':_0xf42401};return Array[_0x5475d1(0x1f2)](_0x29b9ad[_0x5475d1(0x1f1)])&&_0x29b9ad[_0x5475d1(0x1f1)][_0x5475d1(0x1dd)]((_0x4df5d1,_0x58afff)=>{const _0x1bc97b=_0x5475d1;if(!isObjectRecord(_0x4df5d1))return;adaptBffTarget(_0x4df5d1[_0x1bc97b(0x1fa)],'$.commands['+_0x58afff+_0x1bc97b(0x1e0),_0xf42401);}),adaptResources(_0x29b9ad['resources'],_0x5475d1(0x1fe),_0xf42401),{'manifest':_0x29b9ad,'errors':_0xf42401};}export function toPublicServiceTreeTarget(_0xe49ec2){const _0x1a34fc=a63_0x5cdb,{scriptName:_0x2127ee,..._0x4ef411}=_0xe49ec2;return typeof _0x2127ee===_0x1a34fc(0x201)&&_0x2127ee['trim']()&&(_0x4ef411[_0x1a34fc(0x1ed)]=_0x2127ee),_0x4ef411;}export function toPublicNormalizedServiceTree(_0x3de204){const _0x14d6eb=a63_0x5cdb;return{..._0x3de204,'commands':_0x3de204[_0x14d6eb(0x1f1)][_0x14d6eb(0x1ef)](_0x2392f9=>({..._0x2392f9,'target':toPublicServiceTreeTarget(_0x2392f9[_0x14d6eb(0x1fa)])}))};}function a63_0x5cdb(_0x589a98,_0xbc0f15){_0x589a98=_0x589a98-0x1dd;const _0x38fe3b=a63_0x38fe();let _0x5cdb73=_0x38fe3b[_0x589a98];return _0x5cdb73;}function adaptResources(_0x215101,_0x4671e7,_0x101c57){const _0x2d92ac=a63_0x5cdb;if(!isObjectRecord(_0x215101))return;for(const [_0x5d0db3,_0x7f7d7a]of Object['entries'](_0x215101)){if(!isObjectRecord(_0x7f7d7a))continue;const _0x1912c5=_0x4671e7+'.'+_0x5d0db3;if(isObjectRecord(_0x7f7d7a[_0x2d92ac(0x1de)]))for(const [_0x2e5a71,_0x1c4bbc]of Object[_0x2d92ac(0x1e1)](_0x7f7d7a[_0x2d92ac(0x1de)])){if(!isObjectRecord(_0x1c4bbc))continue;const _0x15f042=_0x1912c5+_0x2d92ac(0x1e8)+_0x2e5a71,_0x26ca11=isObjectRecord(_0x1c4bbc['target'])&&_0x1c4bbc[_0x2d92ac(0x1fa)][_0x2d92ac(0x1df)]===_0x2d92ac(0x1e3);adaptBffTarget(_0x1c4bbc['target'],_0x15f042+_0x2d92ac(0x1ee),_0x101c57),(_0x26ca11||isBffAction(_0x1c4bbc))&&adaptFunctionNameField(_0x1c4bbc,_0x15f042,_0x101c57);}adaptResources(_0x7f7d7a[_0x2d92ac(0x200)],_0x1912c5+_0x2d92ac(0x1f9),_0x101c57);}}function a63_0x38fe(){const _0x53f16b=['24itrGoF','258788OlwHky','scriptName','144969VsDFTd','.resources','target','fromEntries','10902330aGeSxy','call','$.resources','754635rIWnut','resources','string','forEach','actions','kind','].target','entries','465552kpBevY','bff','action','12AqcUFR','error','push','.actions.','3556824lXJZni','trim','221242JejBXT','bff.exec','functionName','.target','map','.scriptName','commands','isArray','prototype','hasOwnProperty'];a63_0x38fe=function(){return _0x53f16b;};return a63_0x38fe();}function adaptBffTarget(_0x5b10b2,_0x126bbf,_0x240afa){const _0x3d04af=a63_0x5cdb;if(!isObjectRecord(_0x5b10b2)||_0x5b10b2['kind']!==_0x3d04af(0x1e3))return;adaptFunctionNameField(_0x5b10b2,_0x126bbf,_0x240afa);}function adaptFunctionNameField(_0x4232cd,_0x36b429,_0x37cce7){const _0x354153=a63_0x5cdb;Object[_0x354153(0x1f3)]['hasOwnProperty'][_0x354153(0x1fd)](_0x4232cd,_0x354153(0x1f7))&&_0x37cce7[_0x354153(0x1e7)]({'level':_0x354153(0x1e6),'path':_0x36b429+_0x354153(0x1f0),'message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x354153(0x1f3)][_0x354153(0x1f4)][_0x354153(0x1fd)](_0x4232cd,_0x354153(0x1ed))){if(typeof _0x4232cd[_0x354153(0x1ed)]!==_0x354153(0x201)||!_0x4232cd[_0x354153(0x1ed)][_0x354153(0x1ea)]()){_0x37cce7[_0x354153(0x1e7)]({'level':_0x354153(0x1e6),'path':_0x36b429+'.functionName','message':'functionName\x20must\x20be\x20a\x20non-empty\x20string.'}),delete _0x4232cd[_0x354153(0x1ed)];return;}_0x4232cd[_0x354153(0x1f7)]=_0x4232cd[_0x354153(0x1ed)],delete _0x4232cd[_0x354153(0x1ed)];}}function isBffAction(_0x50296d){const _0x26d062=a63_0x5cdb;return _0x50296d[_0x26d062(0x1df)]==='bff'||_0x50296d[_0x26d062(0x1e4)]===_0x26d062(0x1ec)||_0x50296d[_0x26d062(0x1fa)]===_0x26d062(0x1ec);}function cloneJsonValue(_0x31b22a){const _0x4d688a=a63_0x5cdb;if(Array[_0x4d688a(0x1f2)](_0x31b22a))return _0x31b22a[_0x4d688a(0x1ef)](_0x755da3=>cloneJsonValue(_0x755da3));if(isObjectRecord(_0x31b22a))return Object[_0x4d688a(0x1fb)](Object[_0x4d688a(0x1e1)](_0x31b22a)[_0x4d688a(0x1ef)](([_0x2f6946,_0x54cc7c])=>[_0x2f6946,cloneJsonValue(_0x54cc7c)]));return _0x31b22a;}function isObjectRecord(_0x4ab044){const _0x5499eb=a63_0x5cdb;return Boolean(_0x4ab044)&&typeof _0x4ab044==='object'&&!Array[_0x5499eb(0x1f2)](_0x4ab044);}
1
+ (function(_0x5c4990,_0x1addf8){const _0x4b9d45=a63_0x22d7,_0x57af59=_0x5c4990();while(!![]){try{const _0x3e84c8=-parseInt(_0x4b9d45(0xe4))/0x1*(-parseInt(_0x4b9d45(0xc8))/0x2)+-parseInt(_0x4b9d45(0xe1))/0x3+-parseInt(_0x4b9d45(0xd1))/0x4+-parseInt(_0x4b9d45(0xe5))/0x5*(parseInt(_0x4b9d45(0xcc))/0x6)+-parseInt(_0x4b9d45(0xe6))/0x7+parseInt(_0x4b9d45(0xcd))/0x8*(parseInt(_0x4b9d45(0xdf))/0x9)+-parseInt(_0x4b9d45(0xcf))/0xa;if(_0x3e84c8===_0x1addf8)break;else _0x57af59['push'](_0x57af59['shift']());}catch(_0x51fa63){_0x57af59['push'](_0x57af59['shift']());}}}(a63_0x4726,0xb1d0e));export function adaptServiceTreeManifestForLegacyFramework(_0x1cd89e){const _0x3acb7b=a63_0x22d7,_0x2064be=cloneJsonValue(_0x1cd89e),_0x35df1b=[];if(!isObjectRecord(_0x2064be))return{'manifest':_0x2064be,'errors':_0x35df1b};return Array[_0x3acb7b(0xd2)](_0x2064be['commands'])&&_0x2064be[_0x3acb7b(0xe9)]['forEach']((_0x5c7b19,_0x2983cb)=>{const _0x17298e=_0x3acb7b;if(!isObjectRecord(_0x5c7b19))return;adaptBffTarget(_0x5c7b19[_0x17298e(0xd8)],_0x17298e(0xcb)+_0x2983cb+_0x17298e(0xde),_0x35df1b);}),adaptResources(_0x2064be[_0x3acb7b(0xda)],'$.resources',_0x35df1b),{'manifest':_0x2064be,'errors':_0x35df1b};}function a63_0x4726(){const _0x1325b0=['commands','.target','fromEntries','string','2530846hKLKhr','call','.scriptName','$.commands[','624kzSuUp','10802968QdVKCH','scriptName','22950BMMDGe','kind','1553452wyBnZI','isArray','.resources','functionName','trim','actions','push','target','prototype','resources','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','bff.exec','.actions.','].target','9PYgZOa','bff','2997585JOHbUW','hasOwnProperty','error','1naLxDo','2275stUcKu','3152009QLrZZo','map','entries'];a63_0x4726=function(){return _0x1325b0;};return a63_0x4726();}export function toPublicServiceTreeTarget(_0x304d62){const _0x5e55cf=a63_0x22d7,{scriptName:_0x4ca390,..._0x32d17c}=_0x304d62;return typeof _0x4ca390===_0x5e55cf(0xc7)&&_0x4ca390[_0x5e55cf(0xd5)]()&&(_0x32d17c[_0x5e55cf(0xd4)]=_0x4ca390),_0x32d17c;}export function toPublicNormalizedServiceTree(_0x44547c){const _0x5f590f=a63_0x22d7;return{..._0x44547c,'commands':_0x44547c[_0x5f590f(0xe9)][_0x5f590f(0xe7)](_0x4db13f=>({..._0x4db13f,'target':toPublicServiceTreeTarget(_0x4db13f[_0x5f590f(0xd8)])}))};}function adaptResources(_0x25d720,_0x2b0e19,_0x543c72){const _0x389e07=a63_0x22d7;if(!isObjectRecord(_0x25d720))return;for(const [_0x573497,_0x3adc61]of Object['entries'](_0x25d720)){if(!isObjectRecord(_0x3adc61))continue;const _0x14822f=_0x2b0e19+'.'+_0x573497;if(isObjectRecord(_0x3adc61[_0x389e07(0xd6)]))for(const [_0x134504,_0x1eced6]of Object[_0x389e07(0xe8)](_0x3adc61[_0x389e07(0xd6)])){if(!isObjectRecord(_0x1eced6))continue;const _0x5aa1c9=_0x14822f+_0x389e07(0xdd)+_0x134504,_0x49a102=isObjectRecord(_0x1eced6[_0x389e07(0xd8)])&&_0x1eced6[_0x389e07(0xd8)][_0x389e07(0xd0)]==='bff';adaptBffTarget(_0x1eced6[_0x389e07(0xd8)],_0x5aa1c9+_0x389e07(0xea),_0x543c72),(_0x49a102||isBffAction(_0x1eced6))&&adaptFunctionNameField(_0x1eced6,_0x5aa1c9,_0x543c72);}adaptResources(_0x3adc61[_0x389e07(0xda)],_0x14822f+_0x389e07(0xd3),_0x543c72);}}function adaptBffTarget(_0x369214,_0x573f9d,_0x448d85){const _0x122017=a63_0x22d7;if(!isObjectRecord(_0x369214)||_0x369214['kind']!==_0x122017(0xe0))return;adaptFunctionNameField(_0x369214,_0x573f9d,_0x448d85);}function adaptFunctionNameField(_0x1294f4,_0x406026,_0x37bd78){const _0x2f5d6f=a63_0x22d7;Object[_0x2f5d6f(0xd9)][_0x2f5d6f(0xe2)][_0x2f5d6f(0xc9)](_0x1294f4,_0x2f5d6f(0xce))&&_0x37bd78[_0x2f5d6f(0xd7)]({'level':'error','path':_0x406026+_0x2f5d6f(0xca),'message':_0x2f5d6f(0xdb)});if(Object['prototype'][_0x2f5d6f(0xe2)][_0x2f5d6f(0xc9)](_0x1294f4,_0x2f5d6f(0xd4))){if(typeof _0x1294f4[_0x2f5d6f(0xd4)]!==_0x2f5d6f(0xc7)||!_0x1294f4[_0x2f5d6f(0xd4)][_0x2f5d6f(0xd5)]()){_0x37bd78[_0x2f5d6f(0xd7)]({'level':_0x2f5d6f(0xe3),'path':_0x406026+'.functionName','message':'functionName\x20must\x20be\x20a\x20non-empty\x20string.'}),delete _0x1294f4[_0x2f5d6f(0xd4)];return;}_0x1294f4[_0x2f5d6f(0xce)]=_0x1294f4[_0x2f5d6f(0xd4)],delete _0x1294f4[_0x2f5d6f(0xd4)];}}function isBffAction(_0x2b4fad){const _0x363dfd=a63_0x22d7;return _0x2b4fad[_0x363dfd(0xd0)]===_0x363dfd(0xe0)||_0x2b4fad['action']===_0x363dfd(0xdc)||_0x2b4fad[_0x363dfd(0xd8)]===_0x363dfd(0xdc);}function cloneJsonValue(_0x15b0f5){const _0x37bf3a=a63_0x22d7;if(Array[_0x37bf3a(0xd2)](_0x15b0f5))return _0x15b0f5[_0x37bf3a(0xe7)](_0x153079=>cloneJsonValue(_0x153079));if(isObjectRecord(_0x15b0f5))return Object[_0x37bf3a(0xc6)](Object['entries'](_0x15b0f5)[_0x37bf3a(0xe7)](([_0x16edf7,_0x3f303a])=>[_0x16edf7,cloneJsonValue(_0x3f303a)]));return _0x15b0f5;}function a63_0x22d7(_0x476385,_0x1415df){_0x476385=_0x476385-0xc6;const _0x4726ea=a63_0x4726();let _0x22d71c=_0x4726ea[_0x476385];return _0x22d71c;}function isObjectRecord(_0x334539){return Boolean(_0x334539)&&typeof _0x334539==='object'&&!Array['isArray'](_0x334539);}
@@ -1 +1 @@
1
- const a64_0x14345f=a64_0x2562;(function(_0x554e96,_0x210d71){const _0xc94c4e=a64_0x2562,_0x2ab17a=_0x554e96();while(!![]){try{const _0x27ca91=-parseInt(_0xc94c4e(0x1e6))/0x1+-parseInt(_0xc94c4e(0x211))/0x2+-parseInt(_0xc94c4e(0x1d5))/0x3+parseInt(_0xc94c4e(0x1ec))/0x4*(-parseInt(_0xc94c4e(0x1e0))/0x5)+parseInt(_0xc94c4e(0x20e))/0x6+-parseInt(_0xc94c4e(0x1dd))/0x7+parseInt(_0xc94c4e(0x1fa))/0x8;if(_0x27ca91===_0x210d71)break;else _0x2ab17a['push'](_0x2ab17a['shift']());}catch(_0x2130db){_0x2ab17a['push'](_0x2ab17a['shift']());}}}(a64_0xce75,0xcb2fa));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a64_0xce75(){const _0x1e0cab=['Service\x20registry\x20validation\x20passed.','map','Imported\x20','type','kind','4512798WoLPqQ','source','import','Updated','filePath','normalizedManifest','description','entry','4189500UYIfOf','remove','errors','5kOrnjC','string','list','updated','replaced','export','279923JRyRol','validate','length','version','Local\x20service\x20not\x20found:\x20','importedAt','6208108ZOVCNM','target','str','warnings','Service\x20Tree\x20manifest\x20file\x20path','risk','commands','hash','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','read','flags','required','Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','manifests','47019832DkKQyu','manifest','cliPath','Imported','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Local\x20service\x20code,\x20for\x20example\x20crm','\x20service\x20','WRITE','write','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.','serviceCount','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','\x20service(s),\x20updated\x20','name','imported','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','serviceCode','registryIndex','Removed\x20service\x20','detail','2348130QoKvpk','service','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','3003736dYoYof','report','entries','file','registryPath','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','Exported\x20service\x20'];a64_0xce75=function(){return _0x1e0cab;};return a64_0xce75();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';function a64_0x2562(_0xd300fc,_0xcded7a){_0xd300fc=_0xd300fc-0x1ca;const _0xce7508=a64_0xce75();let _0x256228=_0xce7508[_0xd300fc];return _0x256228;}const FILE_FLAG={'name':a64_0x14345f(0x1cc),'type':a64_0x14345f(0x1e1),'required':!![],'description':a64_0x14345f(0x1f0)},SERVICE_FLAG={'name':a64_0x14345f(0x20f),'type':a64_0x14345f(0x1e1),'required':!![],'description':a64_0x14345f(0x1ff),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x597b95){const _0x2bf6dc=a64_0x14345f;return{'serviceCode':_0x597b95[_0x2bf6dc(0x20a)],'name':_0x597b95['normalizedManifest'][_0x2bf6dc(0x20f)][_0x2bf6dc(0x207)],'version':_0x597b95['version'],'importedAt':_0x597b95[_0x2bf6dc(0x1eb)],'source':_0x597b95[_0x2bf6dc(0x1d6)],'commandCount':_0x597b95[_0x2bf6dc(0x1da)]['commands'][_0x2bf6dc(0x1e8)],'commands':_0x597b95[_0x2bf6dc(0x1da)][_0x2bf6dc(0x1f2)][_0x2bf6dc(0x1d1)](_0x55adc5=>({'path':_0x55adc5[_0x2bf6dc(0x1fc)],'description':_0x55adc5[_0x2bf6dc(0x1db)],'risk':_0x55adc5[_0x2bf6dc(0x1f1)],'target':toPublicServiceTreeTarget(_0x55adc5[_0x2bf6dc(0x1ed)]),'flags':_0x55adc5[_0x2bf6dc(0x1f6)][_0x2bf6dc(0x1d1)](_0x5ba48a=>({'name':_0x5ba48a[_0x2bf6dc(0x207)],'cliName':_0x5ba48a['cliName'],'type':_0x5ba48a[_0x2bf6dc(0x1d3)],'required':_0x5ba48a[_0x2bf6dc(0x1f7)]===!![]}))}))};}function summarizeLoadedManifest(_0x92da02){const _0x3b64db=a64_0x14345f;return{'service':_0x92da02[_0x3b64db(0x1da)]?.['service'],'version':_0x92da02[_0x3b64db(0x1da)]?.['version'],'commandCount':_0x92da02[_0x3b64db(0x1da)]?.[_0x3b64db(0x1f2)][_0x3b64db(0x1e8)]??0x0,'commands':_0x92da02['normalizedManifest']?.[_0x3b64db(0x1f2)][_0x3b64db(0x1d1)](_0x35c880=>({'path':_0x35c880[_0x3b64db(0x1fc)],'risk':_0x35c880[_0x3b64db(0x1f1)],'target':toPublicServiceTreeTarget(_0x35c880['target'])}))??[],'registryIndex':_0x92da02[_0x3b64db(0x20b)],'registryServiceCode':_0x92da02['registryServiceCode'],'errors':_0x92da02[_0x3b64db(0x1ca)]['errors'],'warnings':_0x92da02[_0x3b64db(0x1ca)][_0x3b64db(0x1ef)]};}export const serviceDefinitions=[{'service':a64_0x14345f(0x20f),'command':a64_0x14345f(0x1e7),'description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a64_0x14345f(0x1f5),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2b7185){const _0x257e9f=a64_0x14345f,_0x2f08f8=loadServiceManifestFromFile(_0x2b7185[_0x257e9f(0x1ee)](_0x257e9f(0x1cc)));if(!_0x2f08f8[_0x257e9f(0x1ca)]['ok'])return{'ok':![],'data':{'file':_0x2f08f8[_0x257e9f(0x1d9)],'hash':_0x2f08f8[_0x257e9f(0x1f3)],'kind':_0x2f08f8[_0x257e9f(0x1d4)],'serviceCount':_0x2f08f8[_0x257e9f(0x1f9)][_0x257e9f(0x1e8)],'services':_0x2f08f8[_0x257e9f(0x1f9)][_0x257e9f(0x1d1)](summarizeLoadedManifest),'errors':_0x2f08f8['report']['errors'],'warnings':_0x2f08f8['report'][_0x257e9f(0x1ef)]},'message':formatValidationFailure(_0x2f08f8['report'])};if(_0x2f08f8['kind']==='registry'||_0x2f08f8['manifests'][_0x257e9f(0x1e8)]!==0x1)return{'ok':!![],'data':{'file':_0x2f08f8['filePath'],'hash':_0x2f08f8[_0x257e9f(0x1f3)],'kind':_0x2f08f8[_0x257e9f(0x1d4)],'serviceCount':_0x2f08f8[_0x257e9f(0x1f9)]['length'],'commandCount':_0x2f08f8[_0x257e9f(0x1f9)]['reduce']((_0x5677b3,_0x11fd6b)=>_0x5677b3+(_0x11fd6b[_0x257e9f(0x1da)]?.[_0x257e9f(0x1f2)][_0x257e9f(0x1e8)]??0x0),0x0),'services':_0x2f08f8[_0x257e9f(0x1f9)][_0x257e9f(0x1d1)](summarizeLoadedManifest),'warnings':_0x2f08f8[_0x257e9f(0x1ca)][_0x257e9f(0x1ef)]},'message':_0x257e9f(0x1d0)};return{'ok':!![],'data':{'file':_0x2f08f8['filePath'],'hash':_0x2f08f8[_0x257e9f(0x1f3)],'kind':_0x2f08f8['kind'],'service':_0x2f08f8[_0x257e9f(0x1da)]?.['service'],'version':_0x2f08f8[_0x257e9f(0x1da)]?.['version'],'commandCount':_0x2f08f8[_0x257e9f(0x1da)]?.['commands'][_0x257e9f(0x1e8)]??0x0,'commands':_0x2f08f8[_0x257e9f(0x1da)]?.[_0x257e9f(0x1f2)][_0x257e9f(0x1d1)](_0x507106=>({'path':_0x507106[_0x257e9f(0x1fc)],'risk':_0x507106[_0x257e9f(0x1f1)],'target':toPublicServiceTreeTarget(_0x507106[_0x257e9f(0x1ed)])})),'warnings':_0x2f08f8[_0x257e9f(0x1ca)][_0x257e9f(0x1ef)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a64_0x14345f(0x20f),'command':a64_0x14345f(0x1d7),'description':a64_0x14345f(0x1f4),'risk':'write','confirmationDescription':a64_0x14345f(0x203),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5ea0ae){const _0x1d8a96=a64_0x14345f,_0x327e12=loadServiceManifestFromFile(_0x5ea0ae[_0x1d8a96(0x1ee)]('file'));return{'method':_0x1d8a96(0x201),'url':getServiceRegistryPath(),'body':{'file':_0x327e12[_0x1d8a96(0x1d9)],'hash':_0x327e12[_0x1d8a96(0x1f3)],'kind':_0x327e12['kind'],'ok':_0x327e12['report']['ok'],'service':_0x327e12[_0x1d8a96(0x1da)]?.[_0x1d8a96(0x20f)],'version':_0x327e12[_0x1d8a96(0x1da)]?.[_0x1d8a96(0x1e9)],'serviceCount':_0x327e12[_0x1d8a96(0x1f9)][_0x1d8a96(0x1e8)],'services':_0x327e12[_0x1d8a96(0x1f9)][_0x1d8a96(0x1d1)](_0x462ee1=>({'service':_0x462ee1[_0x1d8a96(0x1da)]?.[_0x1d8a96(0x20f)],'version':_0x462ee1[_0x1d8a96(0x1da)]?.[_0x1d8a96(0x1e9)],'commandCount':_0x462ee1[_0x1d8a96(0x1da)]?.['commands'][_0x1d8a96(0x1e8)]??0x0,'errors':_0x462ee1[_0x1d8a96(0x1ca)]['errors']})),'errors':_0x327e12[_0x1d8a96(0x1ca)][_0x1d8a96(0x1df)],'commandCount':_0x327e12[_0x1d8a96(0x1da)]?.[_0x1d8a96(0x1f2)]['length']??0x0},'description':_0x1d8a96(0x209)};},async 'execute'(_0x16873e){const _0x4cb1df=a64_0x14345f,_0x5063e2=importServiceManifest(_0x16873e[_0x4cb1df(0x1ee)](_0x4cb1df(0x1cc)));if(_0x5063e2[_0x4cb1df(0x1cb)][_0x4cb1df(0x1e8)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x5063e2[_0x4cb1df(0x1cd)],'imported':_0x5063e2[_0x4cb1df(0x208)],'updated':_0x5063e2[_0x4cb1df(0x1e3)],'serviceCount':_0x5063e2['serviceCount'],'services':_0x5063e2[_0x4cb1df(0x1cb)][_0x4cb1df(0x1d1)](summarizeService)},'message':_0x4cb1df(0x1d2)+_0x5063e2[_0x4cb1df(0x208)]+_0x4cb1df(0x206)+_0x5063e2['updated']+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x5063e2[_0x4cb1df(0x1cd)],'replaced':_0x5063e2[_0x4cb1df(0x1e4)],'imported':_0x5063e2[_0x4cb1df(0x208)],'updated':_0x5063e2[_0x4cb1df(0x1e3)],'serviceCount':_0x5063e2[_0x4cb1df(0x204)],'service':summarizeService(_0x5063e2[_0x4cb1df(0x1dc)])},'message':(_0x5063e2[_0x4cb1df(0x1e4)]?_0x4cb1df(0x1d8):_0x4cb1df(0x1fd))+_0x4cb1df(0x200)+_0x5063e2['entry'][_0x4cb1df(0x20a)]+'.'};}},{'service':a64_0x14345f(0x20f),'command':a64_0x14345f(0x1e5),'description':a64_0x14345f(0x1ce),'risk':a64_0x14345f(0x202),'confirmationDescription':'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.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x2e60e9){const _0x4e6fcc=a64_0x14345f,_0x1c0bd0=getLocalServiceEntry(_0x2e60e9[_0x4e6fcc(0x1ee)](_0x4e6fcc(0x20f)));return{'method':'WRITE','url':_0x2e60e9[_0x4e6fcc(0x1ee)](_0x4e6fcc(0x1cc)),'body':{'service':_0x2e60e9[_0x4e6fcc(0x1ee)](_0x4e6fcc(0x20f)),'found':Boolean(_0x1c0bd0),'version':_0x1c0bd0?.[_0x4e6fcc(0x1e9)],'source':_0x1c0bd0?.[_0x4e6fcc(0x1d6)]},'description':_0x4e6fcc(0x210)};},async 'execute'(_0x3a71bf){const _0x4aa645=a64_0x14345f,_0x55ee56=exportServiceManifest(_0x3a71bf[_0x4aa645(0x1ee)](_0x4aa645(0x20f)),_0x3a71bf[_0x4aa645(0x1ee)](_0x4aa645(0x1cc)));return{'ok':!![],'data':{'registryPath':_0x55ee56['registryPath'],'file':_0x55ee56[_0x4aa645(0x1d9)],'service':summarizeService(_0x55ee56[_0x4aa645(0x1dc)])},'message':_0x4aa645(0x1cf)+_0x55ee56[_0x4aa645(0x1dc)][_0x4aa645(0x20a)]+'.'};}},{'service':a64_0x14345f(0x20f),'command':a64_0x14345f(0x1e2),'description':a64_0x14345f(0x1fe),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5a1516=a64_0x14345f,_0x38092f=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x38092f[_0x5a1516(0x1e8)],'services':_0x38092f[_0x5a1516(0x1d1)](summarizeService)}};}},{'service':'service','command':a64_0x14345f(0x1de),'description':'Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','risk':'write','confirmationDescription':a64_0x14345f(0x1f8),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x570586){const _0x4af293=a64_0x14345f,_0x191464=getLocalServiceEntry(_0x570586[_0x4af293(0x1ee)](_0x4af293(0x20f)));return{'method':_0x4af293(0x201),'url':getServiceRegistryPath(),'body':{'service':_0x570586[_0x4af293(0x1ee)](_0x4af293(0x20f)),'found':Boolean(_0x191464),'version':_0x191464?.[_0x4af293(0x1e9)],'source':_0x191464?.[_0x4af293(0x1d6)]},'description':_0x4af293(0x205)};},async 'execute'(_0x916bbb){const _0x5d7902=a64_0x14345f,_0x582e17=removeServiceManifest(_0x916bbb[_0x5d7902(0x1ee)]('service'));return{'ok':!![],'data':{'registryPath':_0x582e17['registryPath'],'serviceCount':_0x582e17[_0x5d7902(0x204)],'service':summarizeService(_0x582e17[_0x5d7902(0x1dc)])},'message':_0x5d7902(0x20c)+_0x582e17[_0x5d7902(0x1dc)][_0x5d7902(0x20a)]+'.'};}},{'service':a64_0x14345f(0x20f),'command':a64_0x14345f(0x20d),'description':'Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3c27ff){const _0x25b14c=a64_0x14345f,_0x1cab4f=getLocalServiceEntry(_0x3c27ff[_0x25b14c(0x1ee)](_0x25b14c(0x20f)));if(!_0x1cab4f)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3c27ff[_0x25b14c(0x1ee)](_0x25b14c(0x20f))},'message':_0x25b14c(0x1ea)+_0x3c27ff[_0x25b14c(0x1ee)](_0x25b14c(0x20f))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x1cab4f),'manifest':_0x1cab4f[_0x25b14c(0x1fb)],'normalizedManifest':toPublicNormalizedServiceTree(_0x1cab4f['normalizedManifest'])}};}}];
1
+ const a64_0x40ffd8=a64_0x2395;function a64_0x5ed3(){const _0x498c28=['cliName','source','cliPath','1461456KJjkSS','normalizedManifest','entries','serviceCode','WRITE','description','hash','1182VzduMk','name','registry','version','Imported','reduce','manifest','kind','string','remove','8ZRfmWr','read','60011UJavOF','service','target','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','109525lsFLGo','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.','risk','Updated','manifests','Service\x20Tree\x20manifest\x20file\x20path','errors','registryServiceCode','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','str','12175860rbPFRf','report','length','Service\x20manifest\x20validation\x20passed.','serviceCount','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','55GYQrzI','Local\x20service\x20code,\x20for\x20example\x20crm','replaced','filePath','validate','9199544MOdRaY','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','warnings','Reads\x20the\x20given\x20manifest\x20into\x20the\x20local\x20Service\x20Tree\x20registry.\x20An\x20existing\x20manifest\x20with\x20the\x20same\x20service\x20code\x20is\x20updated.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20local\x20file\x20paths.','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Export\x20the\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','lower\x20kebab-case\x20service\x20code','import','Remove\x20a\x20Service\x20Tree\x20manifest\x20from\x20the\x20local\x20runtime\x20registry','imported','flags','map','export','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','\x20service(s),\x20updated\x20','registryIndex','11583450KPXTuZ','file','importedAt','Local\x20service\x20not\x20found:\x20','commands','write','registryPath','updated','entry','9xLeOoF','315606BbReLB','164fiIFqq'];a64_0x5ed3=function(){return _0x498c28;};return a64_0x5ed3();}(function(_0x451487,_0x3b947c){const _0x561731=a64_0x2395,_0x3623c7=_0x451487();while(!![]){try{const _0x4a2fe8=-parseInt(_0x561731(0x193))/0x1+-parseInt(_0x561731(0x159))/0x2*(-parseInt(_0x561731(0x18e))/0x3)+parseInt(_0x561731(0x18f))/0x4*(parseInt(_0x561731(0x15f))/0x5)+parseInt(_0x561731(0x19a))/0x6*(-parseInt(_0x561731(0x15b))/0x7)+parseInt(_0x561731(0x174))/0x8*(-parseInt(_0x561731(0x18d))/0x9)+-parseInt(_0x561731(0x184))/0xa+parseInt(_0x561731(0x16f))/0xb*(parseInt(_0x561731(0x169))/0xc);if(_0x4a2fe8===_0x3b947c)break;else _0x3623c7['push'](_0x3623c7['shift']());}catch(_0x4672eb){_0x3623c7['push'](_0x3623c7['shift']());}}}(a64_0x5ed3,0xe3ebb));function a64_0x2395(_0x4f092f,_0x3bc0d3){_0x4f092f=_0x4f092f-0x158;const _0x5ed390=a64_0x5ed3();let _0x23956c=_0x5ed390[_0x4f092f];return _0x23956c;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a64_0x40ffd8(0x185),'type':a64_0x40ffd8(0x1a2),'required':!![],'description':a64_0x40ffd8(0x164)},SERVICE_FLAG={'name':a64_0x40ffd8(0x15c),'type':a64_0x40ffd8(0x1a2),'required':!![],'description':a64_0x40ffd8(0x170),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a64_0x40ffd8(0x17a)}};function summarizeService(_0x3391f5){const _0x217756=a64_0x40ffd8;return{'serviceCode':_0x3391f5[_0x217756(0x196)],'name':_0x3391f5[_0x217756(0x194)][_0x217756(0x15c)][_0x217756(0x19b)],'version':_0x3391f5[_0x217756(0x19d)],'importedAt':_0x3391f5[_0x217756(0x186)],'source':_0x3391f5[_0x217756(0x191)],'commandCount':_0x3391f5[_0x217756(0x194)][_0x217756(0x188)]['length'],'commands':_0x3391f5[_0x217756(0x194)][_0x217756(0x188)][_0x217756(0x17f)](_0xd9d7a3=>({'path':_0xd9d7a3['cliPath'],'description':_0xd9d7a3[_0x217756(0x198)],'risk':_0xd9d7a3[_0x217756(0x161)],'target':toPublicServiceTreeTarget(_0xd9d7a3[_0x217756(0x15d)]),'flags':_0xd9d7a3[_0x217756(0x17e)][_0x217756(0x17f)](_0x305c49=>({'name':_0x305c49[_0x217756(0x19b)],'cliName':_0x305c49[_0x217756(0x190)],'type':_0x305c49['type'],'required':_0x305c49['required']===!![]}))}))};}function summarizeLoadedManifest(_0x236150){const _0x422b89=a64_0x40ffd8;return{'service':_0x236150[_0x422b89(0x194)]?.[_0x422b89(0x15c)],'version':_0x236150[_0x422b89(0x194)]?.[_0x422b89(0x19d)],'commandCount':_0x236150[_0x422b89(0x194)]?.['commands'][_0x422b89(0x16b)]??0x0,'commands':_0x236150[_0x422b89(0x194)]?.[_0x422b89(0x188)][_0x422b89(0x17f)](_0x3c4abc=>({'path':_0x3c4abc['cliPath'],'risk':_0x3c4abc[_0x422b89(0x161)],'target':toPublicServiceTreeTarget(_0x3c4abc[_0x422b89(0x15d)])}))??[],'registryIndex':_0x236150[_0x422b89(0x183)],'registryServiceCode':_0x236150[_0x422b89(0x166)],'errors':_0x236150[_0x422b89(0x16a)][_0x422b89(0x165)],'warnings':_0x236150[_0x422b89(0x16a)]['warnings']};}export const serviceDefinitions=[{'service':'service','command':a64_0x40ffd8(0x173),'description':a64_0x40ffd8(0x175),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x346631){const _0x13a59d=a64_0x40ffd8,_0x7747c7=loadServiceManifestFromFile(_0x346631['str'](_0x13a59d(0x185)));if(!_0x7747c7['report']['ok'])return{'ok':![],'data':{'file':_0x7747c7[_0x13a59d(0x172)],'hash':_0x7747c7[_0x13a59d(0x199)],'kind':_0x7747c7['kind'],'serviceCount':_0x7747c7[_0x13a59d(0x163)][_0x13a59d(0x16b)],'services':_0x7747c7[_0x13a59d(0x163)]['map'](summarizeLoadedManifest),'errors':_0x7747c7[_0x13a59d(0x16a)]['errors'],'warnings':_0x7747c7[_0x13a59d(0x16a)][_0x13a59d(0x176)]},'message':formatValidationFailure(_0x7747c7['report'])};if(_0x7747c7[_0x13a59d(0x1a1)]===_0x13a59d(0x19c)||_0x7747c7['manifests']['length']!==0x1)return{'ok':!![],'data':{'file':_0x7747c7[_0x13a59d(0x172)],'hash':_0x7747c7[_0x13a59d(0x199)],'kind':_0x7747c7[_0x13a59d(0x1a1)],'serviceCount':_0x7747c7[_0x13a59d(0x163)][_0x13a59d(0x16b)],'commandCount':_0x7747c7[_0x13a59d(0x163)][_0x13a59d(0x19f)]((_0x5a5a75,_0x449349)=>_0x5a5a75+(_0x449349[_0x13a59d(0x194)]?.[_0x13a59d(0x188)][_0x13a59d(0x16b)]??0x0),0x0),'services':_0x7747c7[_0x13a59d(0x163)][_0x13a59d(0x17f)](summarizeLoadedManifest),'warnings':_0x7747c7[_0x13a59d(0x16a)][_0x13a59d(0x176)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x7747c7[_0x13a59d(0x172)],'hash':_0x7747c7[_0x13a59d(0x199)],'kind':_0x7747c7[_0x13a59d(0x1a1)],'service':_0x7747c7[_0x13a59d(0x194)]?.['service'],'version':_0x7747c7['normalizedManifest']?.[_0x13a59d(0x19d)],'commandCount':_0x7747c7[_0x13a59d(0x194)]?.['commands'][_0x13a59d(0x16b)]??0x0,'commands':_0x7747c7[_0x13a59d(0x194)]?.[_0x13a59d(0x188)][_0x13a59d(0x17f)](_0xc6e02=>({'path':_0xc6e02[_0x13a59d(0x192)],'risk':_0xc6e02[_0x13a59d(0x161)],'target':toPublicServiceTreeTarget(_0xc6e02[_0x13a59d(0x15d)])})),'warnings':_0x7747c7[_0x13a59d(0x16a)][_0x13a59d(0x176)]},'message':_0x13a59d(0x16c)};}},{'service':a64_0x40ffd8(0x15c),'command':a64_0x40ffd8(0x17b),'description':a64_0x40ffd8(0x16e),'risk':a64_0x40ffd8(0x189),'confirmationDescription':a64_0x40ffd8(0x177),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x552059){const _0x4d8be3=a64_0x40ffd8,_0x10a08c=loadServiceManifestFromFile(_0x552059['str'](_0x4d8be3(0x185)));return{'method':_0x4d8be3(0x197),'url':getServiceRegistryPath(),'body':{'file':_0x10a08c[_0x4d8be3(0x172)],'hash':_0x10a08c[_0x4d8be3(0x199)],'kind':_0x10a08c[_0x4d8be3(0x1a1)],'ok':_0x10a08c[_0x4d8be3(0x16a)]['ok'],'service':_0x10a08c[_0x4d8be3(0x194)]?.[_0x4d8be3(0x15c)],'version':_0x10a08c[_0x4d8be3(0x194)]?.[_0x4d8be3(0x19d)],'serviceCount':_0x10a08c['manifests'][_0x4d8be3(0x16b)],'services':_0x10a08c[_0x4d8be3(0x163)][_0x4d8be3(0x17f)](_0x8cf39=>({'service':_0x8cf39[_0x4d8be3(0x194)]?.[_0x4d8be3(0x15c)],'version':_0x8cf39[_0x4d8be3(0x194)]?.['version'],'commandCount':_0x8cf39[_0x4d8be3(0x194)]?.[_0x4d8be3(0x188)]['length']??0x0,'errors':_0x8cf39['report'][_0x4d8be3(0x165)]})),'errors':_0x10a08c[_0x4d8be3(0x16a)]['errors'],'commandCount':_0x10a08c[_0x4d8be3(0x194)]?.['commands'][_0x4d8be3(0x16b)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x38f983){const _0x2a5882=a64_0x40ffd8,_0x42378e=importServiceManifest(_0x38f983[_0x2a5882(0x168)]('file'));if(_0x42378e[_0x2a5882(0x195)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x42378e[_0x2a5882(0x18a)],'imported':_0x42378e[_0x2a5882(0x17d)],'updated':_0x42378e[_0x2a5882(0x18b)],'serviceCount':_0x42378e[_0x2a5882(0x16d)],'services':_0x42378e[_0x2a5882(0x195)][_0x2a5882(0x17f)](summarizeService)},'message':'Imported\x20'+_0x42378e[_0x2a5882(0x17d)]+_0x2a5882(0x182)+_0x42378e[_0x2a5882(0x18b)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x42378e[_0x2a5882(0x18a)],'replaced':_0x42378e['replaced'],'imported':_0x42378e[_0x2a5882(0x17d)],'updated':_0x42378e[_0x2a5882(0x18b)],'serviceCount':_0x42378e[_0x2a5882(0x16d)],'service':summarizeService(_0x42378e[_0x2a5882(0x18c)])},'message':(_0x42378e[_0x2a5882(0x171)]?_0x2a5882(0x162):_0x2a5882(0x19e))+'\x20service\x20'+_0x42378e[_0x2a5882(0x18c)][_0x2a5882(0x196)]+'.'};}},{'service':'service','command':a64_0x40ffd8(0x180),'description':a64_0x40ffd8(0x179),'risk':'write','confirmationDescription':a64_0x40ffd8(0x160),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1a9d65){const _0x2d62c0=a64_0x40ffd8,_0x540397=getLocalServiceEntry(_0x1a9d65[_0x2d62c0(0x168)](_0x2d62c0(0x15c)));return{'method':_0x2d62c0(0x197),'url':_0x1a9d65[_0x2d62c0(0x168)](_0x2d62c0(0x185)),'body':{'service':_0x1a9d65[_0x2d62c0(0x168)](_0x2d62c0(0x15c)),'found':Boolean(_0x540397),'version':_0x540397?.[_0x2d62c0(0x19d)],'source':_0x540397?.['source']},'description':_0x2d62c0(0x167)};},async 'execute'(_0x445740){const _0x23d9fe=a64_0x40ffd8,_0x1f5904=exportServiceManifest(_0x445740[_0x23d9fe(0x168)]('service'),_0x445740[_0x23d9fe(0x168)](_0x23d9fe(0x185)));return{'ok':!![],'data':{'registryPath':_0x1f5904[_0x23d9fe(0x18a)],'file':_0x1f5904['filePath'],'service':summarizeService(_0x1f5904[_0x23d9fe(0x18c)])},'message':'Exported\x20service\x20'+_0x1f5904[_0x23d9fe(0x18c)][_0x23d9fe(0x196)]+'.'};}},{'service':'service','command':'list','description':a64_0x40ffd8(0x178),'risk':a64_0x40ffd8(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x294357=a64_0x40ffd8,_0x43944a=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x43944a[_0x294357(0x16b)],'services':_0x43944a[_0x294357(0x17f)](summarizeService)}};}},{'service':a64_0x40ffd8(0x15c),'command':a64_0x40ffd8(0x158),'description':a64_0x40ffd8(0x17c),'risk':a64_0x40ffd8(0x189),'confirmationDescription':'Removes\x20the\x20given\x20service\x20manifest\x20from\x20the\x20local\x20Service\x20Tree\x20registry.\x20Dynamic\x20commands\x20from\x20that\x20manifest\x20will\x20no\x20longer\x20be\x20available.','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x4a91f5){const _0x27dae4=a64_0x40ffd8,_0x5a0973=getLocalServiceEntry(_0x4a91f5['str']('service'));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x4a91f5[_0x27dae4(0x168)](_0x27dae4(0x15c)),'found':Boolean(_0x5a0973),'version':_0x5a0973?.[_0x27dae4(0x19d)],'source':_0x5a0973?.['source']},'description':_0x27dae4(0x15e)};},async 'execute'(_0x512c64){const _0x4b37fc=a64_0x40ffd8,_0x41bbab=removeServiceManifest(_0x512c64[_0x4b37fc(0x168)](_0x4b37fc(0x15c)));return{'ok':!![],'data':{'registryPath':_0x41bbab[_0x4b37fc(0x18a)],'serviceCount':_0x41bbab[_0x4b37fc(0x16d)],'service':summarizeService(_0x41bbab[_0x4b37fc(0x18c)])},'message':'Removed\x20service\x20'+_0x41bbab[_0x4b37fc(0x18c)]['serviceCode']+'.'};}},{'service':'service','command':'detail','description':a64_0x40ffd8(0x181),'risk':a64_0x40ffd8(0x15a),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x29aaac){const _0x389d55=a64_0x40ffd8,_0x2ed9ec=getLocalServiceEntry(_0x29aaac[_0x389d55(0x168)](_0x389d55(0x15c)));if(!_0x2ed9ec)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x29aaac[_0x389d55(0x168)](_0x389d55(0x15c))},'message':_0x389d55(0x187)+_0x29aaac[_0x389d55(0x168)](_0x389d55(0x15c))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x2ed9ec),'manifest':_0x2ed9ec[_0x389d55(0x1a0)],'normalizedManifest':toPublicNormalizedServiceTree(_0x2ed9ec[_0x389d55(0x194)])}};}}];
@@ -1 +1 @@
1
- (function(_0x3f9c52,_0x39bced){const _0x3b15a4=a65_0x125d,_0x1a6408=_0x3f9c52();while(!![]){try{const _0x509013=-parseInt(_0x3b15a4(0x11d))/0x1*(parseInt(_0x3b15a4(0x121))/0x2)+parseInt(_0x3b15a4(0x11a))/0x3+parseInt(_0x3b15a4(0x105))/0x4*(parseInt(_0x3b15a4(0x137))/0x5)+parseInt(_0x3b15a4(0x104))/0x6+-parseInt(_0x3b15a4(0x147))/0x7+-parseInt(_0x3b15a4(0x11c))/0x8*(parseInt(_0x3b15a4(0x10f))/0x9)+parseInt(_0x3b15a4(0x11e))/0xa;if(_0x509013===_0x39bced)break;else _0x1a6408['push'](_0x1a6408['shift']());}catch(_0x631a62){_0x1a6408['push'](_0x1a6408['shift']());}}}(a65_0x2279,0x91488));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='service.json';export function getServiceRegistryPath(_0x3e51e9={}){const _0x9871b4=a65_0x125d;return resolve(_0x3e51e9[_0x9871b4(0x122)]??homedir(),PRODUCT_CONFIG[_0x9871b4(0x118)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x5d7275={}){const _0x5bf472=a65_0x125d,_0x57e7dc=getServiceRegistryPath(_0x5d7275);if(!existsSync(_0x57e7dc))return emptyServiceRegistry();try{const _0x4cab77=readFileSync(_0x57e7dc,'utf8');if(!_0x4cab77[_0x5bf472(0x113)]())return emptyServiceRegistry();const _0x510020=JSON[_0x5bf472(0x144)](_0x4cab77);if(_0x510020[_0x5bf472(0x139)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x5bf472(0x14f)](_0x5bf472(0x146)+String(_0x510020['schemaVersion']),'Remove\x20or\x20migrate\x20'+_0x57e7dc+'.');if(!Array['isArray'](_0x510020['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x510020[_0x5bf472(0x10d)],'services':_0x510020[_0x5bf472(0x138)]};}catch(_0x1e791f){if(_0x1e791f instanceof Error&&_0x1e791f['name']===_0x5bf472(0x116))throw _0x1e791f;throw CliErrors[_0x5bf472(0x14f)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x57e7dc,_0x5bf472(0x13b));}}export function writeServiceRegistry(_0x5c67a6,_0x13e4e6={}){const _0x24dd24=a65_0x125d,_0x293813=getServiceRegistryPath(_0x13e4e6),_0x4cf453=dirname(_0x293813);!existsSync(_0x4cf453)&&mkdirSync(_0x4cf453,{'recursive':!![]});const _0x4a2d5a=_0x293813+_0x24dd24(0x132);try{writeFileSync(_0x4a2d5a,JSON[_0x24dd24(0x13e)](_0x5c67a6,null,0x2)+'\x0a',{'encoding':_0x24dd24(0x115),'mode':0x180}),renameSync(_0x4a2d5a,_0x293813);}catch(_0x219685){try{unlinkSync(_0x4a2d5a);}catch{}if(_0x219685?.[_0x24dd24(0x110)]==='ENOENT')throw CliErrors[_0x24dd24(0x14f)]('Cannot\x20write\x20service\x20registry:\x20'+_0x293813);throw _0x219685;}return _0x293813;}function a65_0x125d(_0x397b0b,_0xdfb8d3){_0x397b0b=_0x397b0b-0x104;const _0x2279dd=a65_0x2279();let _0x125dac=_0x2279dd[_0x397b0b];return _0x125dac;}export function loadServiceManifestFromFile(_0x3bd980){const _0x4f4d57=a65_0x125d,_0x44897a=resolve(_0x3bd980);if(!existsSync(_0x44897a))throw CliErrors[_0x4f4d57(0x14f)](_0x4f4d57(0x142)+_0x3bd980);let _0x478a35;const _0x4799b7=readFileSync(_0x44897a,_0x4f4d57(0x115));try{_0x478a35=JSON['parse'](_0x4799b7);}catch{throw CliErrors[_0x4f4d57(0x14f)](_0x4f4d57(0x109)+_0x3bd980,_0x4f4d57(0x14e));}const _0x1f80cc=sha256(_0x4799b7),_0x1df21e=extractLoadedServiceManifests(_0x478a35,_0x1f80cc),_0x143b1e=aggregateValidationReports(_0x1df21e),_0x1fc498=_0x1df21e[0x0];return{'filePath':_0x44897a,'hash':_0x1f80cc,'kind':isServiceRegistryLike(_0x478a35)?_0x4f4d57(0x143):'manifest','manifest':_0x1fc498?.[_0x4f4d57(0x11b)]??_0x478a35,'report':_0x143b1e,'normalizedManifest':_0x1df21e[_0x4f4d57(0x13a)]===0x1?_0x1fc498?.[_0x4f4d57(0x14d)]:undefined,'manifests':_0x1df21e};}export function importServiceManifest(_0x90e782,_0xf6799={}){const _0x303a56=a65_0x125d,_0x14f4f9=loadServiceManifestFromFile(_0x90e782);if(!_0x14f4f9[_0x303a56(0x13c)]['ok'])throw CliErrors[_0x303a56(0x14f)](formatValidationFailure(_0x14f4f9[_0x303a56(0x13c)]),_0x303a56(0x150));if(_0x14f4f9[_0x303a56(0x14a)][_0x303a56(0x13a)]===0x0)throw CliErrors[_0x303a56(0x14f)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x303a56(0x12e));const _0x54b1da=readServiceRegistry(_0xf6799),_0x508f73=(_0xf6799[_0x303a56(0x131)]??(()=>new Date()))()[_0x303a56(0x120)](),_0x1c5348=[];let _0x3f74ee=0x0,_0x256b3c=0x0;for(const _0x5173ff of _0x14f4f9['manifests']){if(!_0x5173ff[_0x303a56(0x14d)])continue;const _0x130e8f=_0x5173ff[_0x303a56(0x14d)]['service']['code'],_0x84a062={'serviceCode':_0x130e8f,'version':_0x5173ff[_0x303a56(0x14d)][_0x303a56(0x12c)],'importedAt':_0x508f73,'source':{'type':'file','path':_0x14f4f9['filePath'],'hash':_0x5173ff[_0x303a56(0x140)]},'manifest':_0x5173ff['manifest'],'normalizedManifest':_0x5173ff[_0x303a56(0x14d)]},_0x3cdc43=_0x54b1da[_0x303a56(0x138)][_0x303a56(0x107)](_0x159480=>_0x159480[_0x303a56(0x123)]===_0x130e8f);_0x3cdc43>=0x0?(_0x54b1da['services'][_0x3cdc43]=_0x84a062,_0x256b3c++):(_0x54b1da[_0x303a56(0x138)][_0x303a56(0x10c)](_0x84a062),_0x3f74ee++),_0x1c5348[_0x303a56(0x10c)](_0x84a062);}_0x54b1da[_0x303a56(0x138)][_0x303a56(0x114)]((_0x2bfe68,_0x228ac1)=>_0x2bfe68[_0x303a56(0x123)]['localeCompare'](_0x228ac1[_0x303a56(0x123)])),_0x54b1da['updatedAt']=_0x508f73;const _0x3ed707=writeServiceRegistry(_0x54b1da,_0xf6799);return{'registryPath':_0x3ed707,'entry':_0x1c5348[0x0],'replaced':_0x1c5348['length']===0x1?_0x256b3c===0x1:_0x256b3c>0x0,'entries':_0x1c5348,'imported':_0x3f74ee,'updated':_0x256b3c,'serviceCount':_0x54b1da[_0x303a56(0x138)][_0x303a56(0x13a)]};}export function exportServiceManifest(_0x703378,_0x58f060,_0x5ba8dc={}){const _0x1cc716=a65_0x125d,_0x196bab=getServiceRegistryPath(_0x5ba8dc),_0x1260e0=getLocalServiceEntry(_0x703378,_0x5ba8dc);if(!_0x1260e0)throw CliErrors['validation'](_0x1cc716(0x14b)+_0x703378,_0x1cc716(0x111));const _0x4af67c=resolve(_0x58f060),_0x331dcf=dirname(_0x4af67c);return!existsSync(_0x331dcf)&&mkdirSync(_0x331dcf,{'recursive':!![]}),writeFileSync(_0x4af67c,JSON[_0x1cc716(0x13e)](_0x1260e0[_0x1cc716(0x11b)],null,0x2)+'\x0a',{'encoding':_0x1cc716(0x115),'mode':0x180}),{'registryPath':_0x196bab,'filePath':_0x4af67c,'entry':_0x1260e0};}export function removeServiceManifest(_0x291c48,_0x2a6d28={}){const _0x58c396=a65_0x125d,_0xadff55=readServiceRegistry(_0x2a6d28),_0x56789e=_0x291c48[_0x58c396(0x113)](),_0x48fe8e=_0xadff55[_0x58c396(0x138)][_0x58c396(0x107)](_0x2eb28e=>_0x2eb28e[_0x58c396(0x123)]===_0x56789e);if(_0x48fe8e<0x0)throw CliErrors[_0x58c396(0x14f)](_0x58c396(0x14b)+_0x56789e,_0x58c396(0x111));const [_0x34b632]=_0xadff55[_0x58c396(0x138)][_0x58c396(0x12b)](_0x48fe8e,0x1),_0x5e5c59=(_0x2a6d28[_0x58c396(0x131)]??(()=>new Date()))()[_0x58c396(0x120)]();_0xadff55[_0x58c396(0x10d)]=_0x5e5c59;const _0x5ef5ed=writeServiceRegistry(_0xadff55,_0x2a6d28);return{'registryPath':_0x5ef5ed,'entry':_0x34b632,'serviceCount':_0xadff55[_0x58c396(0x138)][_0x58c396(0x13a)]};}export function listLocalServices(_0x528a7c={}){const _0x39d4b6=a65_0x125d;return readServiceRegistry(_0x528a7c)[_0x39d4b6(0x138)];}export function getLocalServiceEntry(_0x2cc041,_0x59d139={}){const _0xc7ad28=a65_0x125d;return readServiceRegistry(_0x59d139)['services'][_0xc7ad28(0x127)](_0x5137b4=>_0x5137b4['serviceCode']===_0x2cc041[_0xc7ad28(0x113)]());}function a65_0x2279(){const _0x5111d8=['1422516kEFWjN','manifest','8kSzZxG','297639LvQHpu','25440900ZrXDoA','registryIndex','toISOString','6vrYhMB','homeDir','serviceCode','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','message','warnings','find','].manifest','target','$.services[','splice','version','string','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','description','map','now','.tmp','reduce','sha256','].manifest.','risk','15fJjqUR','services','schemaVersion','length','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','report','bff\x20target\x20requires\x20functionName.','stringify','isArray','sourceHash','startsWith','Service\x20manifest\x20file\x20not\x20found:\x20','registry','parse','errors','Unsupported\x20service\x20registry\x20schemaVersion:\x20','7579642XsuiKE','object','commands','manifests','Local\x20service\x20not\x20found:\x20','commandCount','normalizedManifest','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','validation','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','flatMap','service','991680GJPNUC','419944FRtAld','command','findIndex','join','Invalid\x20service\x20manifest\x20JSON:\x20','importedAt','path','push','updatedAt','Unsupported\x20schemaVersion:\x20','8349273VQnOEE','code','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','slice','trim','sort','utf8','CliError','update','homeDirName','invalid'];a65_0x2279=function(){return _0x5111d8;};return a65_0x2279();}export function listLocalServiceTrees(_0x1f94cf={}){const _0x5b3cbf=a65_0x125d;return readServiceRegistry(_0x1f94cf)[_0x5b3cbf(0x138)][_0x5b3cbf(0x130)](_0x7a367b=>_0x7a367b[_0x5b3cbf(0x14d)]);}export function inspectServiceRegistry(_0x543a42={}){const _0x5a20dd=a65_0x125d,_0xbbf45=getServiceRegistryPath(_0x543a42);if(!existsSync(_0xbbf45))return emptyServiceRegistryInspection(_0xbbf45,'missing',![]);try{const _0x424a56=readFileSync(_0xbbf45,_0x5a20dd(0x115));if(!_0x424a56['trim']())return emptyServiceRegistryInspection(_0xbbf45,'empty',!![]);const _0x1bf8b0=JSON[_0x5a20dd(0x144)](_0x424a56);if(_0x1bf8b0[_0x5a20dd(0x139)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0xbbf45,_0x5a20dd(0x119),!![]),'schemaVersion':_0x1bf8b0[_0x5a20dd(0x139)],'message':_0x5a20dd(0x10e)+String(_0x1bf8b0[_0x5a20dd(0x139)])};if(!Array[_0x5a20dd(0x13f)](_0x1bf8b0[_0x5a20dd(0x138)]))return{...emptyServiceRegistryInspection(_0xbbf45,_0x5a20dd(0x119),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1bf8b0['updatedAt'],'message':'services\x20must\x20be\x20an\x20array'};const _0xee3a23=_0x1bf8b0[_0x5a20dd(0x138)][_0x5a20dd(0x130)](summarizeLocalServiceEntry);return{'registryPath':_0xbbf45,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1bf8b0[_0x5a20dd(0x10d)],'serviceCount':_0xee3a23['length'],'commandCount':_0xee3a23[_0x5a20dd(0x133)]((_0x462a66,_0x2f6a82)=>_0x462a66+_0x2f6a82[_0x5a20dd(0x14c)],0x0),'services':_0xee3a23};}catch(_0x28e3b5){return{...emptyServiceRegistryInspection(_0xbbf45,_0x5a20dd(0x119),!![]),'message':_0x28e3b5 instanceof Error?_0x28e3b5['message']:String(_0x28e3b5)};}}export function formatValidationFailure(_0x406ab8){const _0x1004be=a65_0x125d,_0x16354a=_0x406ab8[_0x1004be(0x145)][_0x1004be(0x130)](_0x231000=>_0x231000[_0x1004be(0x10b)]+':\x20'+_0x231000[_0x1004be(0x125)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x16354a[_0x1004be(0x108)]('\x0a');}function extractLoadedServiceManifests(_0xf1c72a,_0x14fe31){const _0x3634c8=a65_0x125d;if(!isServiceRegistryLike(_0xf1c72a)){const _0x58fcbb=_0xf1c72a,{manifest:_0x3a2cd7,errors:_0x21bf83}=adaptServiceTreeManifestForLegacyFramework(_0x58fcbb),_0x5e25ce=validateServiceTreeManifest(_0x3a2cd7),_0x146ab4=mergeValidationErrors(_0x5e25ce,_0x21bf83);return[{'manifest':_0x58fcbb,'report':_0x146ab4,'normalizedManifest':_0x146ab4['ok']?normalizeServiceTreeManifest(_0x3a2cd7):undefined,'sourceHash':_0x14fe31}];}return _0xf1c72a[_0x3634c8(0x138)][_0x3634c8(0x130)]((_0x1e34a2,_0x9a9119)=>{const _0x293ac3=_0x3634c8,_0x2a7c04=isObjectRecord(_0x1e34a2)?_0x1e34a2[_0x293ac3(0x11b)]:undefined,{manifest:_0x29e2f1,errors:_0x2581af}=adaptServiceTreeManifestForLegacyFramework(_0x2a7c04),_0x3349ba=validateServiceTreeManifest(_0x29e2f1),_0x355c2b=mergeValidationErrors(_0x3349ba,_0x2581af),_0x193131=isObjectRecord(_0x1e34a2)&&typeof _0x1e34a2['serviceCode']===_0x293ac3(0x12d)?_0x1e34a2[_0x293ac3(0x123)]:undefined;return{'manifest':_0x2a7c04,'report':_0x355c2b,'normalizedManifest':_0x355c2b['ok']?normalizeServiceTreeManifest(_0x29e2f1):undefined,'sourceHash':sha256(JSON[_0x293ac3(0x13e)](_0x2a7c04,null,0x2)+'\x0a'),'registryIndex':_0x9a9119,'registryServiceCode':_0x193131};});}function mergeValidationErrors(_0x4fd979,_0x5aee3c){const _0x2735e7=a65_0x125d,_0x4ae218=_0x4fd979[_0x2735e7(0x145)][_0x2735e7(0x130)](_0x125b8d=>_0x125b8d[_0x2735e7(0x125)]===_0x2735e7(0x124)?{..._0x125b8d,'message':_0x2735e7(0x13d)}:_0x125b8d),_0x4d24f9=[..._0x5aee3c,..._0x4ae218];return{'ok':_0x4d24f9['length']===0x0,'errors':_0x4d24f9,'warnings':_0x4fd979[_0x2735e7(0x126)]};}function aggregateValidationReports(_0x38717a){const _0x261af8=a65_0x125d,_0x4c49b8=_0x38717a[_0x261af8(0x151)](_0x136d1b=>_0x136d1b[_0x261af8(0x11f)]===undefined?_0x136d1b['report'][_0x261af8(0x145)]:_0x136d1b['report'][_0x261af8(0x145)][_0x261af8(0x130)](_0x4206d9=>({..._0x4206d9,'path':prefixRegistryIssuePath(_0x136d1b[_0x261af8(0x11f)],_0x4206d9[_0x261af8(0x10b)])}))),_0x115b51=_0x38717a[_0x261af8(0x151)](_0x3a9fb9=>_0x3a9fb9['registryIndex']===undefined?_0x3a9fb9['report'][_0x261af8(0x126)]:_0x3a9fb9[_0x261af8(0x13c)][_0x261af8(0x126)][_0x261af8(0x130)](_0x55fa13=>({..._0x55fa13,'path':prefixRegistryIssuePath(_0x3a9fb9[_0x261af8(0x11f)],_0x55fa13[_0x261af8(0x10b)])})));return{'ok':_0x4c49b8[_0x261af8(0x13a)]===0x0,'errors':_0x4c49b8,'warnings':_0x115b51};}function prefixRegistryIssuePath(_0x3593a6,_0x1ea4d3){const _0x54d7c1=a65_0x125d;if(_0x1ea4d3==='$')return'$.services['+_0x3593a6+_0x54d7c1(0x128);if(_0x1ea4d3['startsWith']('$.'))return'$.services['+_0x3593a6+_0x54d7c1(0x128)+_0x1ea4d3[_0x54d7c1(0x112)](0x1);if(_0x1ea4d3[_0x54d7c1(0x141)]('$['))return _0x54d7c1(0x12a)+_0x3593a6+'].manifest'+_0x1ea4d3[_0x54d7c1(0x112)](0x1);return _0x54d7c1(0x12a)+_0x3593a6+_0x54d7c1(0x135)+_0x1ea4d3;}function isServiceRegistryLike(_0xb9ae1d){const _0x2e23fe=a65_0x125d;return isObjectRecord(_0xb9ae1d)&&_0xb9ae1d['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x2e23fe(0x13f)](_0xb9ae1d[_0x2e23fe(0x138)]);}function isObjectRecord(_0x1b8fb0){const _0x50bd84=a65_0x125d;return Boolean(_0x1b8fb0)&&typeof _0x1b8fb0===_0x50bd84(0x148)&&!Array[_0x50bd84(0x13f)](_0x1b8fb0);}function emptyServiceRegistryInspection(_0x18fb96,_0x437686,_0x2c5527){return{'registryPath':_0x18fb96,'exists':_0x2c5527,'status':_0x437686,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x28afd7){const _0x272690=a65_0x125d,_0x1a8909=_0x28afd7['normalizedManifest'],_0x20e371=_0x1a8909[_0x272690(0x149)]['map'](_0x2fa1d4=>({'path':_0x2fa1d4['cliPath'],'description':_0x2fa1d4[_0x272690(0x12f)],'risk':_0x2fa1d4[_0x272690(0x136)],'targetKind':_0x2fa1d4['target']['kind'],'targetCommand':_0x2fa1d4[_0x272690(0x129)][_0x272690(0x106)]}));return{'serviceCode':_0x28afd7[_0x272690(0x123)],'name':_0x1a8909[_0x272690(0x152)]['name'],'description':_0x1a8909[_0x272690(0x152)][_0x272690(0x12f)],'version':_0x28afd7[_0x272690(0x12c)],'importedAt':_0x28afd7[_0x272690(0x10a)],'source':_0x28afd7['source'],'commandCount':_0x20e371[_0x272690(0x13a)],'commands':_0x20e371};}function sha256(_0x369814){const _0x3f1bc3=a65_0x125d;return createHash(_0x3f1bc3(0x134))[_0x3f1bc3(0x117)](_0x369814)['digest']('hex');}
1
+ const a65_0x535a12=a65_0x3efa;(function(_0x3f7c9a,_0x3a5acc){const _0xac9b5b=a65_0x3efa,_0x40c38d=_0x3f7c9a();while(!![]){try{const _0x3c66db=-parseInt(_0xac9b5b(0x154))/0x1+parseInt(_0xac9b5b(0x157))/0x2+-parseInt(_0xac9b5b(0x180))/0x3*(parseInt(_0xac9b5b(0x176))/0x4)+parseInt(_0xac9b5b(0x172))/0x5*(parseInt(_0xac9b5b(0x15c))/0x6)+parseInt(_0xac9b5b(0x165))/0x7*(-parseInt(_0xac9b5b(0x14d))/0x8)+parseInt(_0xac9b5b(0x166))/0x9+parseInt(_0xac9b5b(0x162))/0xa;if(_0x3c66db===_0x3a5acc)break;else _0x40c38d['push'](_0x40c38d['shift']());}catch(_0x166968){_0x40c38d['push'](_0x40c38d['shift']());}}}(a65_0x2847,0x48fc6));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a65_0x2847(){const _0xc55b39=['toISOString','command','282500UforDy','invalid','splice','join','filePath','579114oKMekN','Invalid\x20service\x20registry\x20JSON:\x20','homeDir','push','warnings','normalizedManifest','3792820HGADQn','CliError','now','7LGCiHh','4313664MpmIXm','cliPath','file','message','Invalid\x20service\x20manifest\x20JSON:\x20','Cannot\x20write\x20service\x20registry:\x20','digest','name','code','target','schemaVersion','Service\x20manifest\x20file\x20not\x20found:\x20','5TzmEsg','serviceCode','updatedAt','missing','549924dTzFnv','source','startsWith','path','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','].manifest.','service','empty','services','service.json','3vYyxEH','hex','find','risk','slice','update','parse','flatMap','trim','commandCount','findIndex','ENOENT','bff\x20target\x20requires\x20functionName.','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','errors','string','stringify','registry','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','description','registryIndex','services\x20must\x20be\x20an\x20array','manifests','importedAt','.tmp','report','$.services[','sha256','homeDirName','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','length','validation','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','].manifest','utf8','object','3263800XvCJbf','manifest','Unsupported\x20service\x20registry\x20schemaVersion:\x20','version','map','localeCompare','isArray','251941KsqPRw'];a65_0x2847=function(){return _0xc55b39;};return a65_0x2847();}import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a65_0x3efa(_0x331250,_0x1737e4){_0x331250=_0x331250-0x143;const _0x2847b3=a65_0x2847();let _0x3efa21=_0x2847b3[_0x331250];return _0x3efa21;}import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a65_0x535a12(0x17f);export function getServiceRegistryPath(_0x138b41={}){const _0x5c2f2f=a65_0x535a12;return resolve(_0x138b41[_0x5c2f2f(0x15e)]??homedir(),PRODUCT_CONFIG[_0x5c2f2f(0x145)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x251f4d={}){const _0x442cc1=a65_0x535a12,_0x10c62c=getServiceRegistryPath(_0x251f4d);if(!existsSync(_0x10c62c))return emptyServiceRegistry();try{const _0x297290=readFileSync(_0x10c62c,_0x442cc1(0x14b));if(!_0x297290[_0x442cc1(0x188)]())return emptyServiceRegistry();const _0x1ab571=JSON[_0x442cc1(0x186)](_0x297290);if(_0x1ab571[_0x442cc1(0x170)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x442cc1(0x148)](_0x442cc1(0x14f)+String(_0x1ab571[_0x442cc1(0x170)]),'Remove\x20or\x20migrate\x20'+_0x10c62c+'.');if(!Array['isArray'](_0x1ab571[_0x442cc1(0x17e)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1ab571[_0x442cc1(0x174)],'services':_0x1ab571[_0x442cc1(0x17e)]};}catch(_0x5a84b1){if(_0x5a84b1 instanceof Error&&_0x5a84b1[_0x442cc1(0x16d)]===_0x442cc1(0x163))throw _0x5a84b1;throw CliErrors[_0x442cc1(0x148)](_0x442cc1(0x15d)+_0x10c62c,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x136781,_0x40ea75={}){const _0x436a6a=a65_0x535a12,_0x2cfcd6=getServiceRegistryPath(_0x40ea75),_0x1a5122=dirname(_0x2cfcd6);!existsSync(_0x1a5122)&&mkdirSync(_0x1a5122,{'recursive':!![]});const _0x388232=_0x2cfcd6+_0x436a6a(0x199);try{writeFileSync(_0x388232,JSON['stringify'](_0x136781,null,0x2)+'\x0a',{'encoding':_0x436a6a(0x14b),'mode':0x180}),renameSync(_0x388232,_0x2cfcd6);}catch(_0x154efb){try{unlinkSync(_0x388232);}catch{}if(_0x154efb?.[_0x436a6a(0x16e)]===_0x436a6a(0x18b))throw CliErrors[_0x436a6a(0x148)](_0x436a6a(0x16b)+_0x2cfcd6);throw _0x154efb;}return _0x2cfcd6;}export function loadServiceManifestFromFile(_0x6c4790){const _0x392c96=a65_0x535a12,_0x120039=resolve(_0x6c4790);if(!existsSync(_0x120039))throw CliErrors['validation'](_0x392c96(0x171)+_0x6c4790);let _0x180ce2;const _0x1eccb3=readFileSync(_0x120039,_0x392c96(0x14b));try{_0x180ce2=JSON[_0x392c96(0x186)](_0x1eccb3);}catch{throw CliErrors[_0x392c96(0x148)](_0x392c96(0x16a)+_0x6c4790,_0x392c96(0x17a));}const _0x1b75c4=sha256(_0x1eccb3),_0x5f2986=extractLoadedServiceManifests(_0x180ce2,_0x1b75c4),_0x33058b=aggregateValidationReports(_0x5f2986),_0x2ef0d6=_0x5f2986[0x0];return{'filePath':_0x120039,'hash':_0x1b75c4,'kind':isServiceRegistryLike(_0x180ce2)?_0x392c96(0x192):_0x392c96(0x14e),'manifest':_0x2ef0d6?.[_0x392c96(0x14e)]??_0x180ce2,'report':_0x33058b,'normalizedManifest':_0x5f2986['length']===0x1?_0x2ef0d6?.['normalizedManifest']:undefined,'manifests':_0x5f2986};}export function importServiceManifest(_0x4efc41,_0x3de9d0={}){const _0xfbc8a9=a65_0x535a12,_0x44649a=loadServiceManifestFromFile(_0x4efc41);if(!_0x44649a[_0xfbc8a9(0x19a)]['ok'])throw CliErrors[_0xfbc8a9(0x148)](formatValidationFailure(_0x44649a[_0xfbc8a9(0x19a)]),_0xfbc8a9(0x146));if(_0x44649a[_0xfbc8a9(0x197)]['length']===0x0)throw CliErrors[_0xfbc8a9(0x148)](_0xfbc8a9(0x193),_0xfbc8a9(0x149));const _0x25b0fd=readServiceRegistry(_0x3de9d0),_0x5e1f80=(_0x3de9d0[_0xfbc8a9(0x164)]??(()=>new Date()))()[_0xfbc8a9(0x155)](),_0x26bd50=[];let _0x4a1a6d=0x0,_0x1acb39=0x0;for(const _0x19e0b7 of _0x44649a[_0xfbc8a9(0x197)]){if(!_0x19e0b7['normalizedManifest'])continue;const _0x21b367=_0x19e0b7['normalizedManifest'][_0xfbc8a9(0x17c)][_0xfbc8a9(0x16e)],_0x3908a8={'serviceCode':_0x21b367,'version':_0x19e0b7[_0xfbc8a9(0x161)][_0xfbc8a9(0x150)],'importedAt':_0x5e1f80,'source':{'type':_0xfbc8a9(0x168),'path':_0x44649a[_0xfbc8a9(0x15b)],'hash':_0x19e0b7['sourceHash']},'manifest':_0x19e0b7[_0xfbc8a9(0x14e)],'normalizedManifest':_0x19e0b7['normalizedManifest']},_0x49cebb=_0x25b0fd[_0xfbc8a9(0x17e)][_0xfbc8a9(0x18a)](_0x12b2c3=>_0x12b2c3[_0xfbc8a9(0x173)]===_0x21b367);_0x49cebb>=0x0?(_0x25b0fd[_0xfbc8a9(0x17e)][_0x49cebb]=_0x3908a8,_0x1acb39++):(_0x25b0fd[_0xfbc8a9(0x17e)][_0xfbc8a9(0x15f)](_0x3908a8),_0x4a1a6d++),_0x26bd50['push'](_0x3908a8);}_0x25b0fd[_0xfbc8a9(0x17e)]['sort']((_0x1e9fdf,_0x4d6765)=>_0x1e9fdf[_0xfbc8a9(0x173)][_0xfbc8a9(0x152)](_0x4d6765[_0xfbc8a9(0x173)])),_0x25b0fd[_0xfbc8a9(0x174)]=_0x5e1f80;const _0x3d5b65=writeServiceRegistry(_0x25b0fd,_0x3de9d0);return{'registryPath':_0x3d5b65,'entry':_0x26bd50[0x0],'replaced':_0x26bd50['length']===0x1?_0x1acb39===0x1:_0x1acb39>0x0,'entries':_0x26bd50,'imported':_0x4a1a6d,'updated':_0x1acb39,'serviceCount':_0x25b0fd[_0xfbc8a9(0x17e)][_0xfbc8a9(0x147)]};}export function exportServiceManifest(_0xe180b1,_0x2bbbb7,_0x3b5c53={}){const _0x24a3d0=a65_0x535a12,_0x7d4906=getServiceRegistryPath(_0x3b5c53),_0x2a7cb7=getLocalServiceEntry(_0xe180b1,_0x3b5c53);if(!_0x2a7cb7)throw CliErrors['validation']('Local\x20service\x20not\x20found:\x20'+_0xe180b1,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x44741b=resolve(_0x2bbbb7),_0x21e1bd=dirname(_0x44741b);return!existsSync(_0x21e1bd)&&mkdirSync(_0x21e1bd,{'recursive':!![]}),writeFileSync(_0x44741b,JSON[_0x24a3d0(0x191)](_0x2a7cb7[_0x24a3d0(0x14e)],null,0x2)+'\x0a',{'encoding':_0x24a3d0(0x14b),'mode':0x180}),{'registryPath':_0x7d4906,'filePath':_0x44741b,'entry':_0x2a7cb7};}export function removeServiceManifest(_0x312064,_0x1d6554={}){const _0x53b4fa=a65_0x535a12,_0x3641dc=readServiceRegistry(_0x1d6554),_0x4d45a5=_0x312064['trim'](),_0x5a0257=_0x3641dc[_0x53b4fa(0x17e)][_0x53b4fa(0x18a)](_0x5561f2=>_0x5561f2['serviceCode']===_0x4d45a5);if(_0x5a0257<0x0)throw CliErrors[_0x53b4fa(0x148)]('Local\x20service\x20not\x20found:\x20'+_0x4d45a5,_0x53b4fa(0x18e));const [_0x37b72e]=_0x3641dc[_0x53b4fa(0x17e)][_0x53b4fa(0x159)](_0x5a0257,0x1),_0x219340=(_0x1d6554[_0x53b4fa(0x164)]??(()=>new Date()))()[_0x53b4fa(0x155)]();_0x3641dc['updatedAt']=_0x219340;const _0x3a3c31=writeServiceRegistry(_0x3641dc,_0x1d6554);return{'registryPath':_0x3a3c31,'entry':_0x37b72e,'serviceCount':_0x3641dc[_0x53b4fa(0x17e)]['length']};}export function listLocalServices(_0x557f0f={}){const _0x5177fb=a65_0x535a12;return readServiceRegistry(_0x557f0f)[_0x5177fb(0x17e)];}export function getLocalServiceEntry(_0x49eac2,_0x111833={}){const _0x2b47e9=a65_0x535a12;return readServiceRegistry(_0x111833)['services'][_0x2b47e9(0x182)](_0x127d85=>_0x127d85['serviceCode']===_0x49eac2[_0x2b47e9(0x188)]());}export function listLocalServiceTrees(_0x3122ba={}){const _0x137ef5=a65_0x535a12;return readServiceRegistry(_0x3122ba)[_0x137ef5(0x17e)]['map'](_0x125a26=>_0x125a26[_0x137ef5(0x161)]);}export function inspectServiceRegistry(_0x3086eb={}){const _0x1c251f=a65_0x535a12,_0x4adb78=getServiceRegistryPath(_0x3086eb);if(!existsSync(_0x4adb78))return emptyServiceRegistryInspection(_0x4adb78,_0x1c251f(0x175),![]);try{const _0x2f4357=readFileSync(_0x4adb78,'utf8');if(!_0x2f4357[_0x1c251f(0x188)]())return emptyServiceRegistryInspection(_0x4adb78,_0x1c251f(0x17d),!![]);const _0x261bc1=JSON['parse'](_0x2f4357);if(_0x261bc1['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x4adb78,'invalid',!![]),'schemaVersion':_0x261bc1[_0x1c251f(0x170)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x261bc1[_0x1c251f(0x170)])};if(!Array[_0x1c251f(0x153)](_0x261bc1[_0x1c251f(0x17e)]))return{...emptyServiceRegistryInspection(_0x4adb78,_0x1c251f(0x158),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x261bc1['updatedAt'],'message':_0x1c251f(0x196)};const _0x119d10=_0x261bc1[_0x1c251f(0x17e)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x4adb78,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x261bc1[_0x1c251f(0x174)],'serviceCount':_0x119d10[_0x1c251f(0x147)],'commandCount':_0x119d10['reduce']((_0x22ce56,_0x3a3bbe)=>_0x22ce56+_0x3a3bbe[_0x1c251f(0x189)],0x0),'services':_0x119d10};}catch(_0x3608f9){return{...emptyServiceRegistryInspection(_0x4adb78,_0x1c251f(0x158),!![]),'message':_0x3608f9 instanceof Error?_0x3608f9[_0x1c251f(0x169)]:String(_0x3608f9)};}}export function formatValidationFailure(_0x2a66c1){const _0x41a298=a65_0x535a12,_0x4c9fff=_0x2a66c1[_0x41a298(0x18f)][_0x41a298(0x151)](_0x4d7e7b=>_0x4d7e7b[_0x41a298(0x179)]+':\x20'+_0x4d7e7b[_0x41a298(0x169)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x4c9fff[_0x41a298(0x15a)]('\x0a');}function extractLoadedServiceManifests(_0x300026,_0x3819c0){const _0x1eed5a=a65_0x535a12;if(!isServiceRegistryLike(_0x300026)){const _0x1aad2e=_0x300026,{manifest:_0x11a0a4,errors:_0x72e483}=adaptServiceTreeManifestForLegacyFramework(_0x1aad2e),_0x5de9b=validateServiceTreeManifest(_0x11a0a4),_0x2777dd=mergeValidationErrors(_0x5de9b,_0x72e483);return[{'manifest':_0x1aad2e,'report':_0x2777dd,'normalizedManifest':_0x2777dd['ok']?normalizeServiceTreeManifest(_0x11a0a4):undefined,'sourceHash':_0x3819c0}];}return _0x300026[_0x1eed5a(0x17e)][_0x1eed5a(0x151)]((_0x3e50a9,_0x8d102f)=>{const _0x158c3a=_0x1eed5a,_0x1b8efb=isObjectRecord(_0x3e50a9)?_0x3e50a9[_0x158c3a(0x14e)]:undefined,{manifest:_0x11dac4,errors:_0x3d8496}=adaptServiceTreeManifestForLegacyFramework(_0x1b8efb),_0x5326f7=validateServiceTreeManifest(_0x11dac4),_0x560d0c=mergeValidationErrors(_0x5326f7,_0x3d8496),_0x13fa14=isObjectRecord(_0x3e50a9)&&typeof _0x3e50a9[_0x158c3a(0x173)]===_0x158c3a(0x190)?_0x3e50a9['serviceCode']:undefined;return{'manifest':_0x1b8efb,'report':_0x560d0c,'normalizedManifest':_0x560d0c['ok']?normalizeServiceTreeManifest(_0x11dac4):undefined,'sourceHash':sha256(JSON[_0x158c3a(0x191)](_0x1b8efb,null,0x2)+'\x0a'),'registryIndex':_0x8d102f,'registryServiceCode':_0x13fa14};});}function mergeValidationErrors(_0x78a6b5,_0x2f8aa1){const _0xa25a0d=a65_0x535a12,_0x8786a3=_0x78a6b5[_0xa25a0d(0x18f)][_0xa25a0d(0x151)](_0x47fc78=>_0x47fc78[_0xa25a0d(0x169)]===_0xa25a0d(0x18d)?{..._0x47fc78,'message':_0xa25a0d(0x18c)}:_0x47fc78),_0x4993cd=[..._0x2f8aa1,..._0x8786a3];return{'ok':_0x4993cd[_0xa25a0d(0x147)]===0x0,'errors':_0x4993cd,'warnings':_0x78a6b5[_0xa25a0d(0x160)]};}function aggregateValidationReports(_0x24e143){const _0x294421=a65_0x535a12,_0x45e8f8=_0x24e143[_0x294421(0x187)](_0x1ae525=>_0x1ae525[_0x294421(0x195)]===undefined?_0x1ae525[_0x294421(0x19a)][_0x294421(0x18f)]:_0x1ae525[_0x294421(0x19a)][_0x294421(0x18f)]['map'](_0x2ee533=>({..._0x2ee533,'path':prefixRegistryIssuePath(_0x1ae525[_0x294421(0x195)],_0x2ee533['path'])}))),_0x40b300=_0x24e143[_0x294421(0x187)](_0x518bd3=>_0x518bd3['registryIndex']===undefined?_0x518bd3['report'][_0x294421(0x160)]:_0x518bd3[_0x294421(0x19a)][_0x294421(0x160)][_0x294421(0x151)](_0x1dcff9=>({..._0x1dcff9,'path':prefixRegistryIssuePath(_0x518bd3['registryIndex'],_0x1dcff9[_0x294421(0x179)])})));return{'ok':_0x45e8f8['length']===0x0,'errors':_0x45e8f8,'warnings':_0x40b300};}function prefixRegistryIssuePath(_0x4abe87,_0x425e61){const _0x166fc9=a65_0x535a12;if(_0x425e61==='$')return'$.services['+_0x4abe87+'].manifest';if(_0x425e61[_0x166fc9(0x178)]('$.'))return _0x166fc9(0x143)+_0x4abe87+_0x166fc9(0x14a)+_0x425e61[_0x166fc9(0x184)](0x1);if(_0x425e61[_0x166fc9(0x178)]('$['))return _0x166fc9(0x143)+_0x4abe87+_0x166fc9(0x14a)+_0x425e61[_0x166fc9(0x184)](0x1);return _0x166fc9(0x143)+_0x4abe87+_0x166fc9(0x17b)+_0x425e61;}function isServiceRegistryLike(_0x3b19e5){const _0x234c08=a65_0x535a12;return isObjectRecord(_0x3b19e5)&&_0x3b19e5[_0x234c08(0x170)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x3b19e5[_0x234c08(0x17e)]);}function isObjectRecord(_0xcc9a99){const _0x4e2c87=a65_0x535a12;return Boolean(_0xcc9a99)&&typeof _0xcc9a99===_0x4e2c87(0x14c)&&!Array[_0x4e2c87(0x153)](_0xcc9a99);}function emptyServiceRegistryInspection(_0x3c3894,_0x560658,_0x5795f3){return{'registryPath':_0x3c3894,'exists':_0x5795f3,'status':_0x560658,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x3ef3f4){const _0x11ab84=a65_0x535a12,_0x12fcd1=_0x3ef3f4[_0x11ab84(0x161)],_0x1c31ff=_0x12fcd1['commands'][_0x11ab84(0x151)](_0x338a5a=>({'path':_0x338a5a[_0x11ab84(0x167)],'description':_0x338a5a[_0x11ab84(0x194)],'risk':_0x338a5a[_0x11ab84(0x183)],'targetKind':_0x338a5a[_0x11ab84(0x16f)]['kind'],'targetCommand':_0x338a5a[_0x11ab84(0x16f)][_0x11ab84(0x156)]}));return{'serviceCode':_0x3ef3f4[_0x11ab84(0x173)],'name':_0x12fcd1[_0x11ab84(0x17c)][_0x11ab84(0x16d)],'description':_0x12fcd1['service'][_0x11ab84(0x194)],'version':_0x3ef3f4[_0x11ab84(0x150)],'importedAt':_0x3ef3f4[_0x11ab84(0x198)],'source':_0x3ef3f4[_0x11ab84(0x177)],'commandCount':_0x1c31ff[_0x11ab84(0x147)],'commands':_0x1c31ff};}function sha256(_0x6f4d8b){const _0x56ef40=a65_0x535a12;return createHash(_0x56ef40(0x144))[_0x56ef40(0x185)](_0x6f4d8b)[_0x56ef40(0x16c)](_0x56ef40(0x181));}
@@ -1 +1 @@
1
- const a66_0x99eb60=a66_0x2c90;(function(_0x145eee,_0x4f4be7){const _0x4c5f30=a66_0x2c90,_0x4b2618=_0x145eee();while(!![]){try{const _0x222eff=-parseInt(_0x4c5f30(0x109))/0x1*(-parseInt(_0x4c5f30(0xfc))/0x2)+-parseInt(_0x4c5f30(0xf4))/0x3*(-parseInt(_0x4c5f30(0xfb))/0x4)+parseInt(_0x4c5f30(0xf7))/0x5*(-parseInt(_0x4c5f30(0x114))/0x6)+-parseInt(_0x4c5f30(0x100))/0x7+parseInt(_0x4c5f30(0xff))/0x8*(parseInt(_0x4c5f30(0x10b))/0x9)+parseInt(_0x4c5f30(0xf5))/0xa*(parseInt(_0x4c5f30(0x104))/0xb)+-parseInt(_0x4c5f30(0xf6))/0xc;if(_0x222eff===_0x4f4be7)break;else _0x4b2618['push'](_0x4b2618['shift']());}catch(_0x1f4f03){_0x4b2618['push'](_0x4b2618['shift']());}}}(a66_0x50de,0x2cb7c));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a66_0x99eb60(0x116),'command':a66_0x99eb60(0xf8),'description':a66_0x99eb60(0x10f),'risk':a66_0x99eb60(0xfe),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0xe3075d){const _0x27ef86=a66_0x99eb60,_0x2cb4de=buildSkillCreatePlan(_0xe3075d['str']('name'),_0xe3075d[_0x27ef86(0x107)]('type'),_0xe3075d[_0x27ef86(0x107)]('target'));return{'method':_0x27ef86(0xfa),'url':_0x2cb4de[_0x27ef86(0x106)],'body':{'skillName':_0x2cb4de[_0x27ef86(0x101)][_0x27ef86(0x117)],'type':_0x2cb4de[_0x27ef86(0x101)][_0x27ef86(0x112)],'selfContained':!![],'files':_0x2cb4de[_0x27ef86(0x101)][_0x27ef86(0x10a)][_0x27ef86(0x103)](_0x1af736=>_0x1af736['path'])},'description':_0x27ef86(0x10c)};},async 'execute'(_0x27430a){const _0x392e4e=a66_0x99eb60,_0x162a92=buildSkillCreatePlan(_0x27430a['str'](_0x392e4e(0xf3)),_0x27430a[_0x392e4e(0x107)]('type'),_0x27430a['str']('target'));return writeSkillDraft(_0x162a92,_0x27430a[_0x392e4e(0x111)](_0x392e4e(0xf9))),{'ok':!![],'data':{'skillName':_0x162a92[_0x392e4e(0x101)]['skillName'],'type':_0x162a92[_0x392e4e(0x101)][_0x392e4e(0x112)],'dir':_0x162a92[_0x392e4e(0x106)],'files':_0x162a92['rendered'][_0x392e4e(0x10a)][_0x392e4e(0x103)](_0x4cda2c=>_0x4cda2c[_0x392e4e(0x102)])},'message':_0x392e4e(0xfd)+_0x162a92[_0x392e4e(0x101)][_0x392e4e(0x117)]};}};function buildSkillCreatePlan(_0xdbb0b2,_0x345723,_0x416107){const _0x1e6d73=a66_0x99eb60,_0x1322eb=_0x345723[_0x1e6d73(0x115)](),_0x1503c3=renderSkillTemplate({'skillName':_0xdbb0b2,'type':_0x1322eb});!_0x1322eb&&writeCliSideChannelLine(_0x1e6d73(0x108));const _0x1dc901=resolve(normalizeSkillTarget(_0x416107));return{'rendered':_0x1503c3,'targetRoot':_0x1dc901,'skillDir':resolve(_0x1dc901,_0x1503c3[_0x1e6d73(0x117)])};}function a66_0x2c90(_0x12e6f6,_0x422d32){_0x12e6f6=_0x12e6f6-0xf2;const _0x50dead=a66_0x50de();let _0x2c90da=_0x50dead[_0x12e6f6];return _0x2c90da;}function normalizeSkillTarget(_0x5b3100){const _0x44b42d=a66_0x99eb60;return(_0x5b3100||DEFAULT_SKILL_TARGET)[_0x44b42d(0x115)]()||DEFAULT_SKILL_TARGET;}function a66_0x50de(){const _0x253f1f=['str','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','4352FFKTWr','files','441lIWOiv','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','isDirectory','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','Skill\x20directory\x20already\x20exists:\x20','bool','type','isSymbolicLink','32904kagYWj','trim','skill','skillName','utf8','name','3oFtOaU','2299520TQMqPB','4471452MYmBLT','190kjAIII','create','force','WRITE','1465028QuOuXH','104fspNmc','Created\x20local\x20Skill\x20draft\x20','read','12984pMwEET','965041XVkGCM','rendered','path','map','11BwBVLj','validation','skillDir'];a66_0x50de=function(){return _0x253f1f;};return a66_0x50de();}function writeSkillDraft(_0x5bf7f5,_0x5ceea2){const _0x5f5963=a66_0x99eb60;if(existsSync(_0x5bf7f5['skillDir'])){const _0x4d25bc=lstatSync(_0x5bf7f5[_0x5f5963(0x106)]);if(!_0x4d25bc[_0x5f5963(0x10e)]()||_0x4d25bc['isSymbolicLink']())throw CliErrors['validation'](_0x5f5963(0x10d)+_0x5bf7f5[_0x5f5963(0x106)]);if(!_0x5ceea2)throw CliErrors[_0x5f5963(0x105)](_0x5f5963(0x110)+_0x5bf7f5[_0x5f5963(0x106)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x3b51cd of _0x5bf7f5['rendered']['files']){const _0x12bf93=resolve(_0x5bf7f5[_0x5f5963(0x106)],_0x3b51cd[_0x5f5963(0x102)]),_0x4bf676=dirname(_0x12bf93);mkdirSync(_0x4bf676,{'recursive':!![]});if(existsSync(_0x12bf93)&&lstatSync(_0x12bf93)[_0x5f5963(0x113)]())throw CliErrors[_0x5f5963(0x105)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x12bf93);writeFileSync(_0x12bf93,_0x3b51cd['content'],_0x5f5963(0xf2));}}
1
+ function a66_0x2a3e(_0x29f877,_0x323f25){_0x29f877=_0x29f877-0xa4;const _0x214751=a66_0x2147();let _0x2a3ebd=_0x214751[_0x29f877];return _0x2a3ebd;}const a66_0x3467d9=a66_0x2a3e;(function(_0x105cc9,_0x404fc7){const _0x5ba1d6=a66_0x2a3e,_0x554e9b=_0x105cc9();while(!![]){try{const _0x283a36=parseInt(_0x5ba1d6(0xaf))/0x1*(parseInt(_0x5ba1d6(0xc5))/0x2)+parseInt(_0x5ba1d6(0xc6))/0x3*(parseInt(_0x5ba1d6(0xa5))/0x4)+parseInt(_0x5ba1d6(0xaa))/0x5+-parseInt(_0x5ba1d6(0xbd))/0x6+parseInt(_0x5ba1d6(0xb6))/0x7*(-parseInt(_0x5ba1d6(0xa8))/0x8)+-parseInt(_0x5ba1d6(0xb1))/0x9+-parseInt(_0x5ba1d6(0xb2))/0xa;if(_0x283a36===_0x404fc7)break;else _0x554e9b['push'](_0x554e9b['shift']());}catch(_0x1abc7c){_0x554e9b['push'](_0x554e9b['shift']());}}}(a66_0x2147,0xad411));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';function a66_0x2147(){const _0x16f9d4=['1748621ZzXNJn','utf8','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','map','isSymbolicLink','create','skillName','882480BGfStL','read','rendered','force','skill','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','Skill\x20directory\x20already\x20exists:\x20','target','60BeulqW','3YxEaKU','bool','name','880444LCrbcX','type','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','8bDkNdx','skillDir','4311665CsJbIE','files','str','Created\x20local\x20Skill\x20draft\x20','validation','14843HoNMSn','Refusing\x20to\x20overwrite\x20symlink:\x20','651591ACKtzP','3488030JsyqQL','path','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','isDirectory'];a66_0x2147=function(){return _0x16f9d4;};return a66_0x2147();}import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a66_0x3467d9(0xc1),'command':a66_0x3467d9(0xbb),'description':a66_0x3467d9(0xb4),'risk':a66_0x3467d9(0xbe),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x522b87){const _0x18055f=a66_0x3467d9,_0x2dbdba=buildSkillCreatePlan(_0x522b87['str']('name'),_0x522b87[_0x18055f(0xac)]('type'),_0x522b87[_0x18055f(0xac)](_0x18055f(0xc4)));return{'method':'WRITE','url':_0x2dbdba['skillDir'],'body':{'skillName':_0x2dbdba[_0x18055f(0xbf)][_0x18055f(0xbc)],'type':_0x2dbdba['rendered'][_0x18055f(0xa6)],'selfContained':!![],'files':_0x2dbdba[_0x18055f(0xbf)][_0x18055f(0xab)][_0x18055f(0xb9)](_0x490c94=>_0x490c94[_0x18055f(0xb3)])},'description':_0x18055f(0xb8)};},async 'execute'(_0x47d9a3){const _0x558822=a66_0x3467d9,_0xf4132f=buildSkillCreatePlan(_0x47d9a3['str'](_0x558822(0xa4)),_0x47d9a3['str']('type'),_0x47d9a3[_0x558822(0xac)](_0x558822(0xc4)));return writeSkillDraft(_0xf4132f,_0x47d9a3[_0x558822(0xc7)](_0x558822(0xc0))),{'ok':!![],'data':{'skillName':_0xf4132f['rendered'][_0x558822(0xbc)],'type':_0xf4132f[_0x558822(0xbf)][_0x558822(0xa6)],'dir':_0xf4132f[_0x558822(0xa9)],'files':_0xf4132f['rendered'][_0x558822(0xab)]['map'](_0xb122a3=>_0xb122a3[_0x558822(0xb3)])},'message':_0x558822(0xad)+_0xf4132f[_0x558822(0xbf)]['skillName']};}};function buildSkillCreatePlan(_0x2f25fe,_0x3a4ab2,_0x350e11){const _0x5d7bf7=a66_0x3467d9,_0x5a287b=_0x3a4ab2['trim'](),_0x580ccf=renderSkillTemplate({'skillName':_0x2f25fe,'type':_0x5a287b});!_0x5a287b&&writeCliSideChannelLine(_0x5d7bf7(0xa7));const _0x29a4cf=resolve(normalizeSkillTarget(_0x350e11));return{'rendered':_0x580ccf,'targetRoot':_0x29a4cf,'skillDir':resolve(_0x29a4cf,_0x580ccf[_0x5d7bf7(0xbc)])};}function normalizeSkillTarget(_0x1e33a7){return(_0x1e33a7||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x3e5ae4,_0x1d7397){const _0x436ef3=a66_0x3467d9;if(existsSync(_0x3e5ae4[_0x436ef3(0xa9)])){const _0x341d7b=lstatSync(_0x3e5ae4['skillDir']);if(!_0x341d7b[_0x436ef3(0xb5)]()||_0x341d7b['isSymbolicLink']())throw CliErrors[_0x436ef3(0xae)]('Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20'+_0x3e5ae4['skillDir']);if(!_0x1d7397)throw CliErrors[_0x436ef3(0xae)](_0x436ef3(0xc3)+_0x3e5ae4[_0x436ef3(0xa9)],_0x436ef3(0xc2));}for(const _0x29a3fe of _0x3e5ae4[_0x436ef3(0xbf)][_0x436ef3(0xab)]){const _0x2bb36e=resolve(_0x3e5ae4[_0x436ef3(0xa9)],_0x29a3fe[_0x436ef3(0xb3)]),_0x5dc3a5=dirname(_0x2bb36e);mkdirSync(_0x5dc3a5,{'recursive':!![]});if(existsSync(_0x2bb36e)&&lstatSync(_0x2bb36e)[_0x436ef3(0xba)]())throw CliErrors['validation'](_0x436ef3(0xb0)+_0x2bb36e);writeFileSync(_0x2bb36e,_0x29a3fe['content'],_0x436ef3(0xb7));}}