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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +44 -1
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.d.ts +2 -0
  29. package/lib/commands/data/import-excel.js +1 -0
  30. package/lib/commands/data/index.js +1 -1
  31. package/lib/commands/dataset/detail.js +1 -1
  32. package/lib/commands/dataset/index.js +1 -1
  33. package/lib/commands/dataset/list.js +1 -1
  34. package/lib/commands/dataset/sdk-doc.js +1 -1
  35. package/lib/commands/doctor.js +1 -1
  36. package/lib/commands/file/index.js +1 -1
  37. package/lib/commands/init.js +1 -1
  38. package/lib/commands/kb/index.js +1 -1
  39. package/lib/commands/logs/index.js +1 -1
  40. package/lib/commands/notification/config-list.js +1 -1
  41. package/lib/commands/notification/index.js +1 -1
  42. package/lib/commands/notification/shared.js +1 -1
  43. package/lib/commands/ocr/index.js +1 -1
  44. package/lib/commands/permit/dataset-get.js +1 -1
  45. package/lib/commands/permit/dataset-set.js +1 -1
  46. package/lib/commands/permit/index.js +1 -1
  47. package/lib/commands/permit/page-get.js +1 -1
  48. package/lib/commands/permit/page-set.js +1 -1
  49. package/lib/commands/permit/role-menus-set.js +1 -1
  50. package/lib/commands/permit/role-menus.js +1 -1
  51. package/lib/commands/permit/shared.js +1 -1
  52. package/lib/commands/personal-bff/index.js +1 -1
  53. package/lib/commands/registry.js +1 -1
  54. package/lib/commands/role/create.js +1 -1
  55. package/lib/commands/role/delete.js +1 -1
  56. package/lib/commands/role/detail.js +1 -1
  57. package/lib/commands/role/index.js +1 -1
  58. package/lib/commands/role/list.js +1 -1
  59. package/lib/commands/role/shared.js +1 -1
  60. package/lib/commands/role/update.js +1 -1
  61. package/lib/commands/role/user-add.js +1 -1
  62. package/lib/commands/role/user-remove.js +1 -1
  63. package/lib/commands/schedule/index.js +1 -1
  64. package/lib/commands/schema.js +1 -1
  65. package/lib/commands/service/dynamic.js +1 -1
  66. package/lib/commands/service/function-name-adapter.js +1 -1
  67. package/lib/commands/service/index.js +1 -1
  68. package/lib/commands/service/registry.js +1 -1
  69. package/lib/commands/skill/commands/create.js +1 -1
  70. package/lib/commands/skill/commands/diagram.js +1 -1
  71. package/lib/commands/skill/commands/install.js +1 -1
  72. package/lib/commands/skill/commands/list.js +1 -1
  73. package/lib/commands/skill/commands/push.js +1 -1
  74. package/lib/commands/skill/commands/validate.js +1 -1
  75. package/lib/commands/skill/diagram.js +1 -1
  76. package/lib/commands/skill/flags.js +1 -1
  77. package/lib/commands/skill/index.js +1 -1
  78. package/lib/commands/skill/manifest-helpers.js +1 -1
  79. package/lib/commands/skill/push-execute.js +1 -1
  80. package/lib/commands/skill/push-flow-helpers.js +1 -1
  81. package/lib/commands/skill/push-retarget.js +1 -1
  82. package/lib/commands/skill/scopes.js +1 -1
  83. package/lib/commands/skill/summary.js +1 -1
  84. package/lib/commands/skill/templates.js +1 -1
  85. package/lib/commands/skill/validate.js +1 -1
  86. package/lib/commands/sql/detail.js +1 -1
  87. package/lib/commands/sql/exec.js +1 -1
  88. package/lib/commands/sql/index.js +1 -1
  89. package/lib/commands/update.js +1 -1
  90. package/lib/commands/user-account/bind.js +1 -1
  91. package/lib/commands/user-account/index.js +1 -1
  92. package/lib/commands/workspace/index.js +1 -1
  93. package/lib/config/domain-config.js +1 -1
  94. package/lib/config/schema.js +1 -1
  95. package/lib/constant/app.js +1 -1
  96. package/lib/constant/auth-mode.js +1 -1
  97. package/lib/constant/cli.js +1 -1
  98. package/lib/constant/defaults.js +1 -1
  99. package/lib/constant/distribution.js +1 -1
  100. package/lib/constant/domain.js +1 -1
  101. package/lib/constant/env.js +1 -1
  102. package/lib/constant/output.js +1 -1
  103. package/lib/constant/product.js +1 -1
  104. package/lib/constant/region.js +1 -1
  105. package/lib/constant/risk.js +1 -1
  106. package/lib/constant/url.js +1 -1
  107. package/lib/context.js +1 -1
  108. package/lib/core/api-client.d.ts +19 -5
  109. package/lib/core/api-client.js +1 -1
  110. package/lib/core/db-resolver.js +1 -1
  111. package/lib/core/kb-search-client.js +1 -1
  112. package/lib/core/sdk-client.js +1 -1
  113. package/lib/errors.d.ts +1 -0
  114. package/lib/errors.js +1 -1
  115. package/lib/framework/access-error.d.ts +5 -0
  116. package/lib/framework/access-error.js +1 -0
  117. package/lib/framework/build-all-flags.js +1 -1
  118. package/lib/framework/dryrun.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/preparse.js +1 -1
  124. package/lib/framework/rate-limit.js +1 -1
  125. package/lib/framework/raw-flags.js +1 -1
  126. package/lib/framework/response.js +1 -1
  127. package/lib/framework/runner-confirmation.js +1 -1
  128. package/lib/framework/runner-error.d.ts +2 -17
  129. package/lib/framework/runner-error.js +1 -1
  130. package/lib/framework/runner.js +1 -1
  131. package/lib/framework/schema-export.js +1 -1
  132. package/lib/framework/service-order.js +1 -1
  133. package/lib/framework/types.js +1 -1
  134. package/lib/generated/build-info.d.ts +4 -4
  135. package/lib/generated/build-info.js +1 -1
  136. package/lib/generated/official-routing.js +1 -1
  137. package/lib/generated/routing-contract.js +1 -1
  138. package/lib/help.js +1 -1
  139. package/lib/postinstall.js +1 -1
  140. package/lib/runtime/confirmation.js +1 -1
  141. package/lib/runtime/event.js +1 -1
  142. package/lib/runtime/index.js +1 -1
  143. package/lib/runtime/queue.js +1 -1
  144. package/lib/runtime/resolve.js +1 -1
  145. package/lib/services/dataset-import/auto-id-runner.d.ts +25 -0
  146. package/lib/services/dataset-import/auto-id-runner.js +1 -0
  147. package/lib/services/dataset-import/excel-reader.d.ts +3 -0
  148. package/lib/services/dataset-import/excel-reader.js +1 -0
  149. package/lib/services/dataset-import/metadata.d.ts +2 -0
  150. package/lib/services/dataset-import/metadata.js +1 -0
  151. package/lib/services/dataset-import/preview.d.ts +4 -0
  152. package/lib/services/dataset-import/preview.js +1 -0
  153. package/lib/services/dataset-import/runner.d.ts +63 -0
  154. package/lib/services/dataset-import/runner.js +1 -0
  155. package/lib/services/dataset-import/types.d.ts +33 -0
  156. package/lib/services/dataset-import/types.js +1 -0
  157. package/lib/skills/builtin-skill.js +1 -1
  158. package/lib/skills/npx-skills-add.js +1 -1
  159. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  160. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  161. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  162. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  163. package/lib/skills/runtime-skill-sync/links.js +1 -1
  164. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  165. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  166. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  167. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  168. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  169. package/lib/skills/runtime-skill-sync/push.js +1 -1
  170. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  171. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  172. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  173. package/lib/skills/runtime-skill-sync.js +1 -1
  174. package/lib/skills/skill-presence.js +1 -1
  175. package/lib/utils/access-key-redaction.js +1 -1
  176. package/lib/utils/apply-jq-filter.js +1 -1
  177. package/lib/utils/cli-version-check.js +1 -1
  178. package/lib/utils/cli-version-policy.js +1 -1
  179. package/lib/utils/logger.js +1 -1
  180. package/lib/utils/lossless-json.js +1 -1
  181. package/lib/utils/params.js +1 -1
  182. package/lib/utils/positive-safe-integer.js +1 -1
  183. package/lib/utils/redaction.js +1 -1
  184. package/lib/utils/update-notice.js +1 -1
  185. package/lib/utils/version.js +1 -1
  186. package/lib/utils/write-cli-side-channel.js +1 -1
  187. package/package.json +8 -3
  188. package/skills/lovrabet/SKILL.md +10 -5
  189. package/skills/lovrabet/guides/dataset-and-data-workflow.md +4 -2
  190. package/skills/lovrabet/guides/role-and-permission-workflow.md +14 -0
  191. package/skills/lovrabet/guides/sql-and-bff-workflow.md +1 -1
  192. package/skills/lovrabet/guides/troubleshooting.md +7 -1
  193. package/skills/lovrabet/references/instant-api-workflow.md +6 -2
  194. package/skills/lovrabet/references/lovrabet-approval-workflow.md +16 -2
  195. package/skills/lovrabet/references/lovrabet-bff-workflow.md +9 -0
  196. package/skills/lovrabet/references/lovrabet-db-table-excel-import.md +113 -0
  197. package/skills/lovrabet/references/lovrabet-excel-import.md +31 -0
  198. package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -1
  199. package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +2 -0
  200. package/skills/lovrabet.manifest.json +5 -3
@@ -1 +1 @@
1
- const a12_0x51dedc=a12_0x337d;(function(_0x299097,_0x2128a6){const _0x2ed651=a12_0x337d,_0x6d1d34=_0x299097();while(!![]){try{const _0x30fb5d=-parseInt(_0x2ed651(0xa7))/0x1+parseInt(_0x2ed651(0xa5))/0x2+parseInt(_0x2ed651(0xc3))/0x3+-parseInt(_0x2ed651(0xa6))/0x4*(-parseInt(_0x2ed651(0xd2))/0x5)+parseInt(_0x2ed651(0xba))/0x6+-parseInt(_0x2ed651(0xd4))/0x7+-parseInt(_0x2ed651(0xbb))/0x8*(parseInt(_0x2ed651(0xa4))/0x9);if(_0x30fb5d===_0x2128a6)break;else _0x6d1d34['push'](_0x6d1d34['shift']());}catch(_0x5d13da){_0x6d1d34['push'](_0x6d1d34['shift']());}}}(a12_0x2bf7,0xee83f));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';function a12_0x337d(_0x63f48e,_0x44311d){_0x63f48e=_0x63f48e-0xa1;const _0x2bf75f=a12_0x2bf7();let _0x337d34=_0x2bf75f[_0x63f48e];return _0x337d34;}import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x8fa2e0){const _0x501354=a12_0x337d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x8fa2e0['bool'](_0x501354(0xc1)),'explicitProject':_0x8fa2e0[_0x501354(0xc4)](_0x501354(0xb6)),'policy':_0x501354(0xca)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x2406d3=a12_0x337d;return crypto[_0x2406d3(0xee)]();}export function buildDeviceAuthUrl(_0x41d7b7,_0x38edb9,_0x59c44f=a12_0x51dedc(0xce)){const _0x1fd32c=a12_0x51dedc;return _0x41d7b7+'/device-auth?code='+encodeURIComponent(_0x38edb9)+_0x1fd32c(0xb0)+encodeURIComponent(_0x59c44f);}export function getDeviceCodePath(){const _0x591a5d=a12_0x51dedc;return homedir()+'/'+PRODUCT_CONFIG[_0x591a5d(0xe8)]+_0x591a5d(0xcd);}export function readStoredDeviceCode(){const _0x64eb3=a12_0x51dedc,_0x3dc3d1=getDeviceCodePath();if(!existsSync(_0x3dc3d1))return null;try{const _0x1aed79=readFileSync(_0x3dc3d1,{'encoding':_0x64eb3(0xb7)}),_0x49d167=JSON[_0x64eb3(0xe0)](_0x1aed79);if(_0x49d167&&typeof _0x49d167[_0x64eb3(0xae)]===_0x64eb3(0xe3)&&typeof _0x49d167['createdAt']===_0x64eb3(0xe3)&&(_0x49d167[_0x64eb3(0xa9)]===_0x64eb3(0xc1)||_0x49d167[_0x64eb3(0xa9)]===_0x64eb3(0xb6)))return _0x49d167;}catch{}return null;}export function writeStoredDeviceCode(_0x5693f5,_0x23799c){const _0x5f353c=a12_0x51dedc,_0x351551=getDeviceCodePath(),_0x3694e6=dirname(_0x351551);!existsSync(_0x3694e6)&&mkdirSync(_0x3694e6,{'recursive':!![]});const _0x4bf1d1={'code':_0x5693f5,'createdAt':new Date()[_0x5f353c(0xa8)](),'scope':_0x23799c};writeFileSync(_0x351551,JSON['stringify'](_0x4bf1d1),{'encoding':_0x5f353c(0xb7),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x4cb8a2=getDeviceCodePath();try{unlinkSync(_0x4cb8a2);}catch{}}export function isStoredDeviceCodeExpired(_0x533909){const _0x351e86=a12_0x51dedc;return Date['now']()-new Date(_0x533909[_0x351e86(0xbd)])[_0x351e86(0xaa)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x3cbc0d,_0x329bf8){const _0x3ba549=a12_0x51dedc,_0x239069=_0x3cbc0d+_0x3ba549(0xec),_0x122461=new AbortController(),_0x9523da=setTimeout(()=>_0x122461[_0x3ba549(0xb4)](),0x2710),_0x15696f=await fetch(_0x239069,{'method':'POST','headers':{'Content-Type':_0x3ba549(0xd1)},'body':JSON[_0x3ba549(0xb9)]({'code':_0x329bf8}),'signal':_0x122461[_0x3ba549(0xb5)]});clearTimeout(_0x9523da);if(!_0x15696f['ok'])throw CliErrors[_0x3ba549(0xdc)](_0x3ba549(0xde)+_0x15696f[_0x3ba549(0xd7)]);const _0x40a218=await _0x15696f[_0x3ba549(0xd8)](),_0x19f134=_0x40a218[_0x3ba549(0xda)]&&typeof _0x40a218[_0x3ba549(0xda)]==='object'?_0x40a218[_0x3ba549(0xda)]:_0x40a218;if(!_0x19f134||typeof _0x19f134[_0x3ba549(0xd7)]!==_0x3ba549(0xe3))throw CliErrors[_0x3ba549(0xd5)](_0x3ba549(0xe5));return{'status':_0x19f134[_0x3ba549(0xd7)],'access_key':typeof _0x19f134[_0x3ba549(0xc8)]==='string'?_0x19f134[_0x3ba549(0xc8)]:undefined};}export async function pollDeviceToken(_0x41c565,_0x56bd0a,_0x49e5ba){const _0x5852ef=a12_0x51dedc;let _0x49a41b=0x0;for(let _0x49ec97=0x0;_0x49ec97<MAX_POLLS;_0x49ec97++){if(_0x49e5ba[_0x5852ef(0xeb)])throw CliErrors['cancelled'](_0x5852ef(0xc7));let _0x2f0c7d;try{_0x2f0c7d=await fetchDeviceToken(_0x41c565,_0x56bd0a);}catch(_0xa485c2){if(_0xa485c2 instanceof Error&&_0xa485c2[_0x5852ef(0xc5)]==='AbortError')throw CliErrors[_0x5852ef(0xb1)](_0x5852ef(0xc7));_0x49a41b++;if(_0x49a41b>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x5852ef(0xdc)](_0x5852ef(0xd6));writeCliSideChannelLine(_0x5852ef(0xb3)+_0x49a41b+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x5852ef(0xe2)),await sleep(POLL_INTERVAL_MS);continue;}_0x49a41b=0x0;if(_0x2f0c7d[_0x5852ef(0xd7)]==='success'){if(!_0x2f0c7d[_0x5852ef(0xc8)])throw CliErrors[_0x5852ef(0xd5)](_0x5852ef(0xcc));return _0x2f0c7d[_0x5852ef(0xc8)];}if(_0x2f0c7d[_0x5852ef(0xd7)]===_0x5852ef(0xdf)){deleteStoredDeviceCode();throw CliErrors[_0x5852ef(0xa2)](_0x5852ef(0xe6));}const _0x1d4baa=(_0x49ec97+0x1)*POLL_INTERVAL_MS,_0x1c23ce=DEVICE_CODE_TTL_MS-_0x1d4baa,_0x39f72a=Math[_0x5852ef(0xed)](_0x1c23ce/0xea60),_0x23f477=Math[_0x5852ef(0xed)](_0x1c23ce%0xea60/0x3e8);process[_0x5852ef(0xd3)][_0x5852ef(0xea)](_0x5852ef(0xab)+_0x39f72a+':'+String(_0x23f477)['padStart'](0x2,'0')+_0x5852ef(0xa3)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x5852ef(0xa2)]('Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}function sleep(_0x4d7e44){return new Promise(_0x34ed1b=>setTimeout(_0x34ed1b,_0x4d7e44));}export const authDeviceDefinition={'service':'auth','command':'device','description':'Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','risk':a12_0x51dedc(0xea),'confirmationDescription':'Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x51dedc(0xc1),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x51dedc(0xb6),'type':a12_0x51dedc(0xd0),'description':a12_0x51dedc(0xb2),'default':![]},{'name':'source','type':a12_0x51dedc(0xe3),'description':a12_0x51dedc(0xac),'default':a12_0x51dedc(0xce)},{'name':a12_0x51dedc(0xaf),'type':a12_0x51dedc(0xd0),'description':a12_0x51dedc(0xe1),'default':![]}],async 'execute'(_0x41688c){const _0x3dad19=a12_0x51dedc,_0x427d59=resolveAuthScopeFlags(_0x41688c),_0x58ba81=_0x427d59[_0x3dad19(0xc1)]?_0x3dad19(0xc1):_0x3dad19(0xb6),_0x5297f9=readScopedConfig(_0x427d59);if(_0x5297f9[_0x3dad19(0xbf)])return{'ok':!![],'message':_0x3dad19(0xd9)};const _0x2083ab=(_0x41688c[_0x3dad19(0xbe)](_0x3dad19(0xcf))||_0x3dad19(0xce))[_0x3dad19(0xe7)](),_0x35c917=getUserDomain(),_0x36e0e1=readStoredDeviceCode(),_0x1d1cd3=_0x36e0e1&&!isStoredDeviceCodeExpired(_0x36e0e1)?_0x36e0e1['code']:((()=>{const _0xb85be6=generateDeviceCode();return writeStoredDeviceCode(_0xb85be6,_0x58ba81),_0xb85be6;})()),_0x45b590=buildDeviceAuthUrl(_0x35c917,_0x1d1cd3,_0x2083ab);if(_0x41688c['bool']('url-only'))return console[_0x3dad19(0xb8)](_0x45b590),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x45b590),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3dad19(0xbc));if(_0x41688c[_0x3dad19(0xe9)])return writeCliSideChannelLine(_0x3dad19(0xc0)+CLI_BIN_NAME+_0x3dad19(0xcb)),{'ok':!![],'message':_0x3dad19(0xc9)};writeCliSideChannelLine(_0x3dad19(0xad));const _0x4ca12b=new AbortController(),_0x57e2eb=()=>{const _0x568685=_0x3dad19;_0x4ca12b[_0x568685(0xb4)](),process[_0x568685(0xc6)](_0x568685(0xa1),_0x57e2eb);};process['once']('SIGINT',_0x57e2eb);let _0x10ccd9;try{_0x10ccd9=await pollDeviceToken(_0x35c917,_0x1d1cd3,_0x4ca12b[_0x3dad19(0xb5)]);}finally{process[_0x3dad19(0xc6)](_0x3dad19(0xa1),_0x57e2eb);}if(!ACCESS_KEY_PATTERN['test'](_0x10ccd9))throw CliErrors['apiError'](_0x3dad19(0xcc));const _0x58c24d=readScopedConfig(_0x427d59);return _0x58c24d[_0x3dad19(0xbf)]=_0x10ccd9,writeScopedConfig(_0x58c24d,_0x427d59),deleteStoredDeviceCode(),process[_0x3dad19(0xd3)][_0x3dad19(0xea)]('\x0a'),writeCliSideChannelLine(_0x3dad19(0xc2)+_0x58ba81+_0x3dad19(0xdd)),writeCliSideChannelLine(_0x3dad19(0xe4)+CLI_BIN_NAME+_0x3dad19(0xdb)),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};function a12_0x2bf7(){const _0x319d04=['write','aborted','/api/device-auth/token','floor','randomUUID','SIGINT','validation','\x20remaining','9udiUXz','3005274RMJnDz','92JrUOXu','411824YFHCMs','toISOString','scope','getTime','\x0dWaiting\x20for\x20authorization...\x20','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','code','url-only','&source=','cancelled','Write\x20to\x20project\x20config','Device\x20auth\x20API\x20error\x20(','abort','signal','project','utf8','log','stringify','5106702wggIxZ','17182096taWZOk','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','createdAt','str','accessKey','After\x20authorizing,\x20re-run:\x20','global','AccessKey\x20saved\x20to\x20','4233309PoiaWv','bool','name','removeListener','Device\x20authorization\x20cancelled.','access_key','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','global-default','\x20auth\x20device','Invalid\x20access_key\x20returned\x20by\x20server.','/.device-auth','lovrabet-cli','source','boolean','application/json','181955uirHKW','stderr','7457135dJUnry','apiError','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','status','json','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','data','\x20auth\x20status','networkError','\x20config.','Device\x20auth\x20API\x20returned\x20HTTP\x20','expired','parse','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','),\x20retrying...','string','Verify:\x20','Invalid\x20device\x20auth\x20response','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','trim','homeDirName','nonInteractive'];a12_0x2bf7=function(){return _0x319d04;};return a12_0x2bf7();}
1
+ const a12_0x111b9f=a12_0x2273;function a12_0x2273(_0x442760,_0x3b3f47){_0x442760=_0x442760-0xd2;const _0x1ae1d0=a12_0x1ae1();let _0x227338=_0x1ae1d0[_0x442760];return _0x227338;}(function(_0x1a4bed,_0x12529b){const _0x42bd2d=a12_0x2273,_0x1403fd=_0x1a4bed();while(!![]){try{const _0x9a1d1c=parseInt(_0x42bd2d(0x105))/0x1+parseInt(_0x42bd2d(0xdb))/0x2+parseInt(_0x42bd2d(0x100))/0x3+parseInt(_0x42bd2d(0x114))/0x4+-parseInt(_0x42bd2d(0xe3))/0x5*(parseInt(_0x42bd2d(0x11f))/0x6)+-parseInt(_0x42bd2d(0xe1))/0x7+-parseInt(_0x42bd2d(0x11d))/0x8*(-parseInt(_0x42bd2d(0x120))/0x9);if(_0x9a1d1c===_0x12529b)break;else _0x1403fd['push'](_0x1403fd['shift']());}catch(_0x1a0944){_0x1403fd['push'](_0x1403fd['shift']());}}}(a12_0x1ae1,0x82fe6));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a12_0x1ae1(){const _0x1b21e7=['),\x20retrying...','Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','Device\x20auth\x20API\x20error\x20(','Device\x20authorization\x20cancelled.','37304INoahD','once','166806UJAZzu','2511WfyYSE','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','scope','abort','Write\x20to\x20project\x20config','success','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','createdAt','AccessKey\x20saved\x20to\x20','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','stringify','166216ZlECEx','\x20auth\x20device','validation','now','/.device-auth','device','6951273yoZvhY','\x20auth\x20status','120vwZnEY','toISOString','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','code','floor','\x20config.','stderr','/device-auth?code=','write','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','&source=','source','accessKey','string','boolean','padStart','access_key','Invalid\x20access_key\x20returned\x20by\x20server.','data','After\x20authorizing,\x20re-run:\x20','utf8','cancelled','url-only','str','AbortError','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','application/json','Write\x20to\x20global\x20config\x20(default)','411774wRiTxL','global','name','project','removeListener','535718ivnTcz','trim','\x20remaining','bool','getTime','apiError','networkError','Invalid\x20device\x20auth\x20response','json','aborted','Device\x20authorization\x20successful.','signal','POST','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','status','559008bqTJGl','global-default','lovrabet-cli','SIGINT'];a12_0x1ae1=function(){return _0x1b21e7;};return a12_0x1ae1();}function resolveAuthScopeFlags(_0x817907){const _0x13af06=a12_0x2273;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x817907[_0x13af06(0x108)](_0x13af06(0x101)),'explicitProject':_0x817907[_0x13af06(0x108)](_0x13af06(0x103)),'policy':_0x13af06(0x115)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x39991d,_0x2a5c55,_0x12ce0d='lovrabet-cli'){const _0x5c3c34=a12_0x2273;return _0x39991d+_0x5c3c34(0xea)+encodeURIComponent(_0x2a5c55)+_0x5c3c34(0xee)+encodeURIComponent(_0x12ce0d);}export function getDeviceCodePath(){const _0x4d1df4=a12_0x2273;return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+_0x4d1df4(0xdf);}export function readStoredDeviceCode(){const _0xf3d316=a12_0x2273,_0x19e810=getDeviceCodePath();if(!existsSync(_0x19e810))return null;try{const _0x1334bb=readFileSync(_0x19e810,{'encoding':_0xf3d316(0xf8)}),_0x148070=JSON['parse'](_0x1334bb);if(_0x148070&&typeof _0x148070[_0xf3d316(0xe6)]===_0xf3d316(0xf1)&&typeof _0x148070[_0xf3d316(0xd7)]===_0xf3d316(0xf1)&&(_0x148070['scope']===_0xf3d316(0x101)||_0x148070[_0xf3d316(0xd2)]==='project'))return _0x148070;}catch{}return null;}export function writeStoredDeviceCode(_0x3f2628,_0x5d441a){const _0x15c9c1=a12_0x2273,_0x581e72=getDeviceCodePath(),_0x18124c=dirname(_0x581e72);!existsSync(_0x18124c)&&mkdirSync(_0x18124c,{'recursive':!![]});const _0x315e52={'code':_0x3f2628,'createdAt':new Date()[_0x15c9c1(0xe4)](),'scope':_0x5d441a};writeFileSync(_0x581e72,JSON[_0x15c9c1(0xda)](_0x315e52),{'encoding':_0x15c9c1(0xf8),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x1faf39=getDeviceCodePath();try{unlinkSync(_0x1faf39);}catch{}}export function isStoredDeviceCodeExpired(_0x5a8e44){const _0x4815ed=a12_0x2273;return Date[_0x4815ed(0xde)]()-new Date(_0x5a8e44['createdAt'])[_0x4815ed(0x109)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x49565e,_0x38c17f){const _0x1b0265=a12_0x2273,_0x52f60c=_0x49565e+'/api/device-auth/token',_0x20df07=new AbortController(),_0x95c812=setTimeout(()=>_0x20df07[_0x1b0265(0xd3)](),0x2710),_0x409d71=await fetch(_0x52f60c,{'method':_0x1b0265(0x111),'headers':{'Content-Type':_0x1b0265(0xfe)},'body':JSON[_0x1b0265(0xda)]({'code':_0x38c17f}),'signal':_0x20df07['signal']});clearTimeout(_0x95c812);if(!_0x409d71['ok'])throw CliErrors[_0x1b0265(0x10b)]('Device\x20auth\x20API\x20returned\x20HTTP\x20'+_0x409d71[_0x1b0265(0x113)]);const _0x59c130=await _0x409d71[_0x1b0265(0x10d)](),_0x30db22=_0x59c130[_0x1b0265(0xf6)]&&typeof _0x59c130[_0x1b0265(0xf6)]==='object'?_0x59c130['data']:_0x59c130;if(!_0x30db22||typeof _0x30db22[_0x1b0265(0x113)]!=='string')throw CliErrors[_0x1b0265(0x10a)](_0x1b0265(0x10c));return{'status':_0x30db22['status'],'access_key':typeof _0x30db22[_0x1b0265(0xf4)]===_0x1b0265(0xf1)?_0x30db22[_0x1b0265(0xf4)]:undefined};}export async function pollDeviceToken(_0x16c5ae,_0x57e89d,_0x5b56e0){const _0x29f84e=a12_0x2273;let _0x2e6dc4=0x0;for(let _0x5335a5=0x0;_0x5335a5<MAX_POLLS;_0x5335a5++){if(_0x5b56e0[_0x29f84e(0x10e)])throw CliErrors[_0x29f84e(0xf9)](_0x29f84e(0x11c));let _0x714f00;try{_0x714f00=await fetchDeviceToken(_0x16c5ae,_0x57e89d);}catch(_0x4df4b0){if(_0x4df4b0 instanceof Error&&_0x4df4b0[_0x29f84e(0x102)]===_0x29f84e(0xfc))throw CliErrors[_0x29f84e(0xf9)]('Device\x20authorization\x20cancelled.');_0x2e6dc4++;if(_0x2e6dc4>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x29f84e(0x10b)](_0x29f84e(0x121));writeCliSideChannelLine(_0x29f84e(0x11b)+_0x2e6dc4+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x29f84e(0x118)),await sleep(POLL_INTERVAL_MS);continue;}_0x2e6dc4=0x0;if(_0x714f00[_0x29f84e(0x113)]===_0x29f84e(0xd5)){if(!_0x714f00[_0x29f84e(0xf4)])throw CliErrors[_0x29f84e(0x10a)](_0x29f84e(0xf5));return _0x714f00[_0x29f84e(0xf4)];}if(_0x714f00[_0x29f84e(0x113)]==='expired'){deleteStoredDeviceCode();throw CliErrors[_0x29f84e(0xdd)](_0x29f84e(0xe5));}const _0x484a3b=(_0x5335a5+0x1)*POLL_INTERVAL_MS,_0x43aef9=DEVICE_CODE_TTL_MS-_0x484a3b,_0x51aa5c=Math[_0x29f84e(0xe7)](_0x43aef9/0xea60),_0x359e6a=Math[_0x29f84e(0xe7)](_0x43aef9%0xea60/0x3e8);process[_0x29f84e(0xe9)][_0x29f84e(0xeb)]('\x0dWaiting\x20for\x20authorization...\x20'+_0x51aa5c+':'+String(_0x359e6a)[_0x29f84e(0xf3)](0x2,'0')+_0x29f84e(0x107)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors['validation'](_0x29f84e(0xec));}function sleep(_0x410bb4){return new Promise(_0x479cd4=>setTimeout(_0x479cd4,_0x410bb4));}export const authDeviceDefinition={'service':'auth','command':a12_0x111b9f(0xe0),'description':a12_0x111b9f(0x11a),'risk':a12_0x111b9f(0xeb),'confirmationDescription':a12_0x111b9f(0x119),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x111b9f(0xf2),'description':a12_0x111b9f(0xff),'default':!![]},{'name':a12_0x111b9f(0x103),'type':a12_0x111b9f(0xf2),'description':a12_0x111b9f(0xd4),'default':![]},{'name':a12_0x111b9f(0xef),'type':a12_0x111b9f(0xf1),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a12_0x111b9f(0x116)},{'name':a12_0x111b9f(0xfa),'type':a12_0x111b9f(0xf2),'description':a12_0x111b9f(0xd6),'default':![]}],async 'execute'(_0x20d01b){const _0x6c2dad=a12_0x111b9f,_0x42a7ce=resolveAuthScopeFlags(_0x20d01b),_0xb7b89a=_0x42a7ce[_0x6c2dad(0x101)]?_0x6c2dad(0x101):_0x6c2dad(0x103),_0x1cc25b=readScopedConfig(_0x42a7ce);if(_0x1cc25b[_0x6c2dad(0xf0)])return{'ok':!![],'message':_0x6c2dad(0x112)};const _0xcd5f45=(_0x20d01b[_0x6c2dad(0xfb)]('source')||_0x6c2dad(0x116))[_0x6c2dad(0x106)](),_0xc8d62f=getUserDomain(),_0x1b4218=readStoredDeviceCode(),_0x537845=_0x1b4218&&!isStoredDeviceCodeExpired(_0x1b4218)?_0x1b4218['code']:((()=>{const _0x4c289e=generateDeviceCode();return writeStoredDeviceCode(_0x4c289e,_0xb7b89a),_0x4c289e;})()),_0x24860b=buildDeviceAuthUrl(_0xc8d62f,_0x537845,_0xcd5f45);if(_0x20d01b[_0x6c2dad(0x108)](_0x6c2dad(0xfa)))return console['log'](_0x24860b),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x24860b),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x6c2dad(0xfd));if(_0x20d01b['nonInteractive'])return writeCliSideChannelLine(_0x6c2dad(0xf7)+CLI_BIN_NAME+_0x6c2dad(0xdc)),{'ok':!![],'message':_0x6c2dad(0xd9)};writeCliSideChannelLine(_0x6c2dad(0xed));const _0x10e996=new AbortController(),_0x522f78=()=>{const _0x18f9d3=_0x6c2dad;_0x10e996[_0x18f9d3(0xd3)](),process[_0x18f9d3(0x104)]('SIGINT',_0x522f78);};process[_0x6c2dad(0x11e)](_0x6c2dad(0x117),_0x522f78);let _0x27134f;try{_0x27134f=await pollDeviceToken(_0xc8d62f,_0x537845,_0x10e996[_0x6c2dad(0x110)]);}finally{process[_0x6c2dad(0x104)]('SIGINT',_0x522f78);}if(!ACCESS_KEY_PATTERN['test'](_0x27134f))throw CliErrors['apiError']('Invalid\x20access_key\x20returned\x20by\x20server.');const _0x2a365c=readScopedConfig(_0x42a7ce);return _0x2a365c['accessKey']=_0x27134f,writeScopedConfig(_0x2a365c,_0x42a7ce),deleteStoredDeviceCode(),process[_0x6c2dad(0xe9)][_0x6c2dad(0xeb)]('\x0a'),writeCliSideChannelLine(_0x6c2dad(0xd8)+_0xb7b89a+_0x6c2dad(0xe8)),writeCliSideChannelLine('Verify:\x20'+CLI_BIN_NAME+_0x6c2dad(0xe2)),{'ok':!![],'message':_0x6c2dad(0x10f)};}};
@@ -1 +1 @@
1
- const a13_0x2df2d7=a13_0x3afb;(function(_0x34b71e,_0xa3d2a4){const _0x243778=a13_0x3afb,_0x213edb=_0x34b71e();while(!![]){try{const _0x1003f6=-parseInt(_0x243778(0xf6))/0x1+parseInt(_0x243778(0x102))/0x2*(parseInt(_0x243778(0x103))/0x3)+parseInt(_0x243778(0x116))/0x4*(-parseInt(_0x243778(0xdf))/0x5)+parseInt(_0x243778(0x121))/0x6*(-parseInt(_0x243778(0xdb))/0x7)+parseInt(_0x243778(0x123))/0x8+-parseInt(_0x243778(0x104))/0x9+parseInt(_0x243778(0xf1))/0xa*(parseInt(_0x243778(0xdd))/0xb);if(_0x1003f6===_0xa3d2a4)break;else _0x213edb['push'](_0x213edb['shift']());}catch(_0x498148){_0x213edb['push'](_0x213edb['shift']());}}}(a13_0x1cca,0x377db));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a13_0x3afb(_0x44d531,_0x2b641c){_0x44d531=_0x44d531-0xcb;const _0x1cca88=a13_0x1cca();let _0x3afb5a=_0x1cca88[_0x44d531];return _0x3afb5a;}import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a13_0x1cca(){const _0x55684c=['\x20config.','login','global','Auth\x20mode:\x20','production','join','trim','access-key','auth','234xXSaCI','newConfigFileName','553776msBbpE','string','env','\x20\x20export\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','stdout','AccessKey\x20(ak_xxx...)','scope','bool','authRequired','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','development','write','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','validation','No\x20AccessKey\x20found\x20in\x20','=ak_xxx','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Option\x20B:\x20apps\x20config\x20(','Option\x20C:\x20environment\x20variable','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','nonInteractive','\x20Current\x20env:\x20','48818oDfzXV','push','44xsgsYT','AccessKey\x20saved\x20to\x20','11005oAMIiO','\x20auth\x20login\x20--access-key\x20<ak_xxx>','access_key','accessKeyCreatePath','Write\x20to\x20global\x20config\x20(default)','Read\x20from\x20global\x20config\x20(default)','stdin','Status:\x20valid','read','Option\x20A:\x20','userCenterDisplayName','\x20config.\x20Nothing\x20to\x20clear.','Clear\x20the\x20AccessKey\x20from\x20config','Tip:\x20you\x20can\x20also\x20run:','str','test','Missing\x20accessKey.','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','1497370BkvEdO','success','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','check','boolean','304190ucdcfZ','info','Clear\x20from\x20global\x20config\x20(default)','\x20env\x20var','yes','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Then\x20verify\x20with:\x20','\x20(via\x20','envName','logout','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','6DATrwm','236967MevGkT','657513RrNocZ','\x20doctor','global\x20config','isTTY','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','status','global-default','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Show\x20current\x20authentication\x20status','accessKey','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','AccessKey:\x20','expired','project','project\x20config','ACCESS_KEY','`auth\x20login`\x20does\x20not\x20support\x20--yes.','52fakPQM','\x20auth\x20status'];a13_0x1cca=function(){return _0x55684c;};return a13_0x1cca();}import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x4cb8d8=USER_ACCESS_KEY_CREATE_URL){const _0x394882=a13_0x3afb;writeCliSideChannelLine(_0x394882(0xd8)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0x4cb8d8+'\x0a'),writeCliSideChannelLine(_0x394882(0xec)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x394882(0xe0));}function buildAccessKeySetupGuide(_0x31b31a=USER_ACCESS_KEY_CREATE_URL){const _0x2a5326=a13_0x3afb;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x2a5326(0xe9)]+':',_0x31b31a,_0x2a5326(0xd5)+CLI_BIN_NAME+_0x2a5326(0xcd)][_0x2a5326(0x11d)]('\x0a');}function canPromptForAccessKey(_0x3251ff){const _0x4b5afd=a13_0x3afb;return!_0x3251ff[_0x4b5afd(0xd9)]&&process[_0x4b5afd(0xe5)][_0x4b5afd(0x107)]!==![]&&process[_0x4b5afd(0x128)][_0x4b5afd(0x107)]!==![];}function resolveAuthScopeFlags(_0x5ec432){const _0x54aa3d=a13_0x3afb;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5ec432[_0x54aa3d(0xcb)]('global'),'explicitProject':_0x5ec432[_0x54aa3d(0xcb)](_0x54aa3d(0x112)),'policy':_0x54aa3d(0x10b)}));}async function resolveAuthWriteInput(_0x1afd94){const _0x22c4a8=a13_0x3afb;let _0x1be53c=(_0x1afd94[_0x22c4a8(0xed)](_0x22c4a8(0x11f))||_0x1afd94['str']('ak')||'')[_0x22c4a8(0x11e)]();const _0x96addf=(_0x1afd94[_0x22c4a8(0xed)](_0x22c4a8(0x125))||'')['trim'](),_0x30e71e=''+getUserDomain()+PRODUCT_CONFIG[_0x22c4a8(0xe2)];if(!_0x1be53c&&canPromptForAccessKey(_0x1afd94))try{showAccessKeyCreateHint(_0x30e71e),_0x1be53c=await promptAccessKey('');}catch(_0x474212){if(isAbortPrompt(_0x474212))throw CliErrors['cancelled']();throw _0x474212;}if(!_0x1be53c)throw CliErrors[_0x22c4a8(0xd1)](_0x22c4a8(0xef),buildAccessKeySetupGuide(_0x30e71e));if(!ACCESS_KEY_PATTERN[_0x22c4a8(0xee)](_0x1be53c))throw CliErrors[_0x22c4a8(0xd1)]('Invalid\x20accessKey\x20format.',_0x22c4a8(0xf3));if(!_0x96addf)return{'accessKey':_0x1be53c};const _0x2e9f1a=normalizeEnv(_0x96addf);return{'accessKey':_0x1be53c,'env':isDaily(_0x2e9f1a)?'daily':isDev(_0x2e9f1a)?_0x22c4a8(0xce):_0x22c4a8(0x11c)};}export const authDefinitions=[{'service':a13_0x2df2d7(0x120),'command':a13_0x2df2d7(0x119),'description':a13_0x2df2d7(0xd4),'risk':a13_0x2df2d7(0xcf),'confirmationDescription':a13_0x2df2d7(0xd0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a13_0x2df2d7(0x124),'description':a13_0x2df2d7(0x129)},{'name':'ak','type':a13_0x2df2d7(0x124),'description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':'boolean','description':a13_0x2df2d7(0xe3),'default':!![]},{'name':a13_0x2df2d7(0x112),'type':'boolean','description':a13_0x2df2d7(0x109),'default':![]}],async 'execute'(_0x110d65){const _0xae4246=a13_0x2df2d7;if(_0x110d65[_0xae4246(0xcb)](_0xae4246(0xfa)))throw CliErrors[_0xae4246(0xd1)](_0xae4246(0x115),'Use\x20`'+CLI_BIN_NAME+_0xae4246(0x10c)+CLI_BIN_NAME+_0xae4246(0x10f));const _0x37d08a=(_0x110d65[_0xae4246(0xed)](_0xae4246(0x11f))||_0x110d65[_0xae4246(0xed)]('ak')||'')['trim']();if(!_0x37d08a&&_0x110d65[_0xae4246(0xd9)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0xae4246(0xe2)])};const _0x3eb8e8=await resolveAuthWriteInput(_0x110d65),_0x3a8ccb=resolveAuthScopeFlags(_0x110d65),_0x1d964d=readScopedConfig(_0x3a8ccb);_0x1d964d[_0xae4246(0x10e)]=_0x3eb8e8['accessKey'];_0x3eb8e8[_0xae4246(0x125)]&&(_0x1d964d[_0xae4246(0x125)]=_0x3eb8e8[_0xae4246(0x125)]);writeScopedConfig(_0x1d964d,_0x3a8ccb);const _0x283715=_0x3a8ccb[_0xae4246(0x11a)]?_0xae4246(0x11a):'project',_0x3f7949=_0x1d964d[_0xae4246(0x125)]?_0xae4246(0xda)+_0x1d964d[_0xae4246(0x125)]+'.':'';return{'ok':!![],'message':_0xae4246(0xde)+_0x283715+'\x20config.'+_0x3f7949+'\x20Verify:\x20'+CLI_BIN_NAME+_0xae4246(0x117)};}},{'service':a13_0x2df2d7(0x120),'command':a13_0x2df2d7(0x100),'description':a13_0x2df2d7(0xeb),'risk':a13_0x2df2d7(0xcf),'confirmationDescription':a13_0x2df2d7(0xf0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x2df2d7(0xf5),'description':a13_0x2df2d7(0xf8),'default':!![]},{'name':a13_0x2df2d7(0x112),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4083b3){const _0x4e152d=a13_0x2df2d7,_0x4f6b0c=resolveAuthScopeFlags(_0x4083b3),_0x508ed5=readScopedConfig(_0x4f6b0c),_0x111607=!!_0x508ed5['accessKey'];delete _0x508ed5[_0x4e152d(0x10e)],writeScopedConfig(_0x508ed5,_0x4f6b0c);const _0x427597=_0x4f6b0c[_0x4e152d(0x11a)]?'global':_0x4e152d(0x112);if(_0x111607)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x427597+_0x4e152d(0x118)};return{'ok':!![],'message':_0x4e152d(0xd2)+_0x427597+_0x4e152d(0xea)};}},{'service':a13_0x2df2d7(0x120),'command':a13_0x2df2d7(0x10a),'description':a13_0x2df2d7(0x10d),'risk':a13_0x2df2d7(0xe7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a13_0x2df2d7(0xe4),'default':!![]},{'name':a13_0x2df2d7(0x112),'type':a13_0x2df2d7(0xf5),'description':a13_0x2df2d7(0xfc),'default':![]},{'name':a13_0x2df2d7(0xf4),'type':a13_0x2df2d7(0xf5),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x4a2dfa){const _0x32e8d4=a13_0x2df2d7,_0x1255f5=resolveAuthScopeFlags(_0x4a2dfa),_0x529d3d=readScopedConfig(_0x1255f5),_0x2145bf=productEnvName(_0x32e8d4(0x114)),_0x3dd521=productEnv(_0x32e8d4(0x114))||undefined,_0x135007=_0x529d3d[_0x32e8d4(0x10e)]||undefined,_0x4baede=_0x3dd521||_0x135007,_0x5afb1f=_0x3dd521?_0x2145bf+_0x32e8d4(0xf9):_0x135007?(_0x1255f5[_0x32e8d4(0x11a)]?'global':_0x32e8d4(0x112))+'\x20config':null,_0x4ef9a6=[_0x32e8d4(0x11b)+AUTH_MODE['ClientAk']];if(_0x4baede){const _0x515523=maskCliAccessKey(_0x4baede);_0x4ef9a6['push'](_0x32e8d4(0x110)+_0x515523+(_0x5afb1f?_0x32e8d4(0xfe)+_0x5afb1f+')':'')),_0x4ef9a6['push'](_0x32e8d4(0xe6));}if(!_0x4baede){_0x4ef9a6[_0x32e8d4(0xdc)](''),_0x4ef9a6[_0x32e8d4(0xdc)](_0x32e8d4(0x127)),_0x4ef9a6['push'](''),_0x4ef9a6[_0x32e8d4(0xdc)](_0x32e8d4(0xe8)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x4ef9a6['push'](''),_0x4ef9a6['push'](_0x32e8d4(0xd6)+PRODUCT_CONFIG[_0x32e8d4(0x122)]+')'),_0x4ef9a6[_0x32e8d4(0xdc)](_0x32e8d4(0xfb)),_0x4ef9a6[_0x32e8d4(0xdc)](''),_0x4ef9a6[_0x32e8d4(0xdc)](_0x32e8d4(0xd7)),_0x4ef9a6['push'](_0x32e8d4(0x126)+_0x2145bf+_0x32e8d4(0xd3)),_0x4ef9a6['push'](''),_0x4ef9a6['push'](_0x32e8d4(0xfd)+CLI_BIN_NAME+_0x32e8d4(0x117)),_0x4ef9a6['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x32e8d4(0x105));if(_0x4a2dfa[_0x32e8d4(0xcb)](_0x32e8d4(0xf4))){const _0x157876=readStoredDeviceCode();if(_0x157876&&!isStoredDeviceCodeExpired(_0x157876)){const _0x3cdcf9=getUserDomain(),_0x59dabe=await fetchDeviceToken(_0x3cdcf9,_0x157876['code']);if(_0x59dabe[_0x32e8d4(0x10a)]===_0x32e8d4(0xf2)&&_0x59dabe['access_key']){const _0x58daa4={'global':_0x157876[_0x32e8d4(0x12a)]===_0x32e8d4(0x11a)},_0x3b3146=readScopedConfig(_0x58daa4);_0x3b3146[_0x32e8d4(0x10e)]=_0x59dabe[_0x32e8d4(0xe1)],writeScopedConfig(_0x3b3146,_0x58daa4),deleteStoredDeviceCode();const _0x17233f=_0x59dabe[_0x32e8d4(0xe1)],_0x4ce6d6=maskCliAccessKey(_0x17233f),_0x3913d5=_0x157876[_0x32e8d4(0x12a)]==='global'?_0x32e8d4(0x106):_0x32e8d4(0x113);return{'ok':!![],'message':[_0x32e8d4(0x11b)+AUTH_MODE['ClientAk'],_0x32e8d4(0x110)+_0x4ce6d6+_0x32e8d4(0xfe)+_0x3913d5+')',_0x32e8d4(0xe6)][_0x32e8d4(0x11d)]('\x0a')};}_0x59dabe[_0x32e8d4(0x10a)]===_0x32e8d4(0x111)&&deleteStoredDeviceCode();throw CliErrors[_0x32e8d4(0xcc)](_0x32e8d4(0x108));}throw CliErrors[_0x32e8d4(0xcc)](_0x4ef9a6['join']('\x0a'));}}return{'ok':!![],'message':_0x4ef9a6[_0x32e8d4(0x11d)]('\x0a')};}},{'service':a13_0x2df2d7(0x120),'command':a13_0x2df2d7(0xf7),'description':a13_0x2df2d7(0x101),'risk':a13_0x2df2d7(0xe7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5151da){const _0x21d845=a13_0x2df2d7,_0x498b14=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x498b14,'meta':{'env':_0x5151da[_0x21d845(0xff)]??'production'}}};}},authDeviceDefinition];
1
+ const a13_0x3cade4=a13_0x2679;(function(_0x2869ac,_0xa7a205){const _0x55237a=a13_0x2679,_0x27b2e5=_0x2869ac();while(!![]){try{const _0x2a05a7=-parseInt(_0x55237a(0xd2))/0x1*(parseInt(_0x55237a(0x101))/0x2)+parseInt(_0x55237a(0xb6))/0x3*(-parseInt(_0x55237a(0xc2))/0x4)+-parseInt(_0x55237a(0xcb))/0x5+-parseInt(_0x55237a(0xcf))/0x6*(parseInt(_0x55237a(0xc5))/0x7)+-parseInt(_0x55237a(0xdc))/0x8+parseInt(_0x55237a(0xed))/0x9+parseInt(_0x55237a(0xcc))/0xa;if(_0x2a05a7===_0xa7a205)break;else _0x27b2e5['push'](_0x27b2e5['shift']());}catch(_0x282a84){_0x27b2e5['push'](_0x27b2e5['shift']());}}}(a13_0x481b,0x29525));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a13_0x2679(_0x28bd0f,_0x133f35){_0x28bd0f=_0x28bd0f-0xb5;const _0x481b37=a13_0x481b();let _0x2679d0=_0x481b37[_0x28bd0f];return _0x2679d0;}function a13_0x481b(){const _0x1ad19d=['1343184vQGFeH','login','write','Status:\x20valid','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Option\x20C:\x20environment\x20variable','Missing\x20accessKey.','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','accessKey','isTTY','read','AccessKey\x20(ak_xxx...)','join','Auth\x20mode:\x20','=ak_xxx','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','ClientAk','2005731ltWUTy','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20auth\x20login\x20--access-key\x20<ak_xxx>','accessKeyCreatePath','Then\x20verify\x20with:\x20','status','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','No\x20AccessKey\x20found\x20in\x20','\x20config.','string','trim','scope','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Shorthand\x20for\x20--access-key','success','Use\x20`','yes','validation','Option\x20A:\x20','production','42OcjLpk','test','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','daily','\x20Verify:\x20','str','stdin','cancelled','72DgTuVe','global-default','logout','userCenterDisplayName','\x20\x20export\x20','global\x20config','AccessKey\x20saved\x20to\x20','Clear\x20the\x20AccessKey\x20from\x20config','env','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','access-key','nonInteractive','36932wjFtqJ','boolean','authRequired','192521dTnahn','stdout','project\x20config','Tip:\x20you\x20can\x20also\x20run:','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','1545205HsTejH','10341250YjaQZA','AccessKey:\x20','auth','66jlqewl','Invalid\x20accessKey\x20format.','project','4127rvcLkt','\x20(via\x20','ACCESS_KEY','global','development','code','bool','push','\x20auth\x20status','access_key'];a13_0x481b=function(){return _0x1ad19d;};return a13_0x481b();}import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x56a750=USER_ACCESS_KEY_CREATE_URL){const _0x1bf3ec=a13_0x2679;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1bf3ec(0xb9)]+':'),writeCliSideChannelLine('\x0a'+_0x56a750+'\x0a'),writeCliSideChannelLine(_0x1bf3ec(0xc8)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1bf3ec(0xef));}function buildAccessKeySetupGuide(_0x42899f=USER_ACCESS_KEY_CREATE_URL){const _0x2744b1=a13_0x2679;return[_0x2744b1(0xbf)+PRODUCT_CONFIG[_0x2744b1(0xb9)]+':',_0x42899f,_0x2744b1(0xca)+CLI_BIN_NAME+_0x2744b1(0xf9)][_0x2744b1(0xe8)]('\x0a');}function canPromptForAccessKey(_0x3217e5){const _0x4a2761=a13_0x2679;return!_0x3217e5[_0x4a2761(0xc1)]&&process[_0x4a2761(0x108)][_0x4a2761(0xe5)]!==![]&&process[_0x4a2761(0xc6)][_0x4a2761(0xe5)]!==![];}function resolveAuthScopeFlags(_0x4900bf){const _0x1f42c5=a13_0x2679;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4900bf[_0x1f42c5(0xd8)]('global'),'explicitProject':_0x4900bf[_0x1f42c5(0xd8)](_0x1f42c5(0xd1)),'policy':_0x1f42c5(0xb7)}));}async function resolveAuthWriteInput(_0x424335){const _0xc74246=a13_0x2679;let _0x4df8e1=(_0x424335[_0xc74246(0x107)](_0xc74246(0xc0))||_0x424335[_0xc74246(0x107)]('ak')||'')['trim']();const _0x134dbe=(_0x424335[_0xc74246(0x107)](_0xc74246(0xbe))||'')[_0xc74246(0xf7)](),_0x17d4bf=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x4df8e1&&canPromptForAccessKey(_0x424335))try{showAccessKeyCreateHint(_0x17d4bf),_0x4df8e1=await promptAccessKey('');}catch(_0x1fc64d){if(isAbortPrompt(_0x1fc64d))throw CliErrors[_0xc74246(0xb5)]();throw _0x1fc64d;}if(!_0x4df8e1)throw CliErrors['validation'](_0xc74246(0xe2),buildAccessKeySetupGuide(_0x17d4bf));if(!ACCESS_KEY_PATTERN[_0xc74246(0x102)](_0x4df8e1))throw CliErrors[_0xc74246(0xfe)](_0xc74246(0xd0),'Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x134dbe)return{'accessKey':_0x4df8e1};const _0x48488c=normalizeEnv(_0x134dbe);return{'accessKey':_0x4df8e1,'env':isDaily(_0x48488c)?_0xc74246(0x105):isDev(_0x48488c)?_0xc74246(0xd6):_0xc74246(0x100)};}export const authDefinitions=[{'service':a13_0x3cade4(0xce),'command':a13_0x3cade4(0xdd),'description':'Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','risk':'write','confirmationDescription':a13_0x3cade4(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x3cade4(0xc0),'type':a13_0x3cade4(0xf6),'description':a13_0x3cade4(0xe7)},{'name':'ak','type':a13_0x3cade4(0xf6),'description':a13_0x3cade4(0xfa)},{'name':a13_0x3cade4(0xd5),'type':a13_0x3cade4(0xc3),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x3cade4(0xc3),'description':a13_0x3cade4(0xe0),'default':![]}],async 'execute'(_0x4fd95e){const _0x274490=a13_0x3cade4;if(_0x4fd95e[_0x274490(0xd8)](_0x274490(0xfd)))throw CliErrors[_0x274490(0xfe)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x274490(0xfc)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x274490(0xc9));const _0x46aa24=(_0x4fd95e[_0x274490(0x107)](_0x274490(0xc0))||_0x4fd95e[_0x274490(0x107)]('ak')||'')['trim']();if(!_0x46aa24&&_0x4fd95e[_0x274490(0xc1)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x274490(0xf0)])};const _0x2d1f4c=await resolveAuthWriteInput(_0x4fd95e),_0x300584=resolveAuthScopeFlags(_0x4fd95e),_0x2892c9=readScopedConfig(_0x300584);_0x2892c9[_0x274490(0xe4)]=_0x2d1f4c[_0x274490(0xe4)];_0x2d1f4c[_0x274490(0xbe)]&&(_0x2892c9['env']=_0x2d1f4c['env']);writeScopedConfig(_0x2892c9,_0x300584);const _0x494d63=_0x300584[_0x274490(0xd5)]?'global':'project',_0x3bd77f=_0x2892c9[_0x274490(0xbe)]?'\x20Current\x20env:\x20'+_0x2892c9[_0x274490(0xbe)]+'.':'';return{'ok':!![],'message':_0x274490(0xbc)+_0x494d63+_0x274490(0xf5)+_0x3bd77f+_0x274490(0x106)+CLI_BIN_NAME+_0x274490(0xda)};}},{'service':a13_0x3cade4(0xce),'command':a13_0x3cade4(0xb8),'description':a13_0x3cade4(0xbd),'risk':a13_0x3cade4(0xde),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x3cade4(0xd5),'type':a13_0x3cade4(0xc3),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a13_0x3cade4(0x104),'default':![]}],async 'execute'(_0x2708c5){const _0xff1db5=a13_0x3cade4,_0x586f16=resolveAuthScopeFlags(_0x2708c5),_0x3b7e07=readScopedConfig(_0x586f16),_0x305b81=!!_0x3b7e07[_0xff1db5(0xe4)];delete _0x3b7e07['accessKey'],writeScopedConfig(_0x3b7e07,_0x586f16);const _0xe2b14e=_0x586f16['global']?'global':_0xff1db5(0xd1);if(_0x305b81)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0xe2b14e+'\x20config.'};return{'ok':!![],'message':_0xff1db5(0xf4)+_0xe2b14e+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a13_0x3cade4(0xce),'command':a13_0x3cade4(0xf2),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x3cade4(0xd5),'type':a13_0x3cade4(0xc3),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x3cade4(0xc3),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':'check','type':'boolean','description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x16cdd8){const _0x28399a=a13_0x3cade4,_0x310a7e=resolveAuthScopeFlags(_0x16cdd8),_0x159cdd=readScopedConfig(_0x310a7e),_0x22b452=productEnvName(_0x28399a(0xd4)),_0x47cc3a=productEnv(_0x28399a(0xd4))||undefined,_0x3a941d=_0x159cdd[_0x28399a(0xe4)]||undefined,_0x114a2d=_0x47cc3a||_0x3a941d,_0x10e0d1=_0x47cc3a?_0x22b452+'\x20env\x20var':_0x3a941d?(_0x310a7e[_0x28399a(0xd5)]?_0x28399a(0xd5):_0x28399a(0xd1))+'\x20config':null,_0x38526b=[_0x28399a(0xe9)+AUTH_MODE[_0x28399a(0xec)]];if(_0x114a2d){const _0x2551d8=maskCliAccessKey(_0x114a2d);_0x38526b[_0x28399a(0xd9)](_0x28399a(0xcd)+_0x2551d8+(_0x10e0d1?'\x20(via\x20'+_0x10e0d1+')':'')),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xdf));}if(!_0x114a2d){_0x38526b[_0x28399a(0xd9)](''),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xe3)),_0x38526b[_0x28399a(0xd9)](''),_0x38526b['push'](_0x28399a(0xff)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x38526b['push'](''),_0x38526b['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x38526b[_0x28399a(0xd9)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x38526b[_0x28399a(0xd9)](''),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xe1)),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xba)+_0x22b452+_0x28399a(0xea)),_0x38526b[_0x28399a(0xd9)](''),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xf1)+CLI_BIN_NAME+'\x20auth\x20status'),_0x38526b[_0x28399a(0xd9)](_0x28399a(0xf3)+CLI_BIN_NAME+'\x20doctor');if(_0x16cdd8['bool']('check')){const _0xa47fa2=readStoredDeviceCode();if(_0xa47fa2&&!isStoredDeviceCodeExpired(_0xa47fa2)){const _0x12a807=getUserDomain(),_0x2137ef=await fetchDeviceToken(_0x12a807,_0xa47fa2[_0x28399a(0xd7)]);if(_0x2137ef[_0x28399a(0xf2)]===_0x28399a(0xfb)&&_0x2137ef[_0x28399a(0xdb)]){const _0x354e82={'global':_0xa47fa2[_0x28399a(0xf8)]==='global'},_0x2917c5=readScopedConfig(_0x354e82);_0x2917c5[_0x28399a(0xe4)]=_0x2137ef[_0x28399a(0xdb)],writeScopedConfig(_0x2917c5,_0x354e82),deleteStoredDeviceCode();const _0x1a1f86=_0x2137ef[_0x28399a(0xdb)],_0x1cc91a=maskCliAccessKey(_0x1a1f86),_0x28e59d=_0xa47fa2['scope']==='global'?_0x28399a(0xbb):_0x28399a(0xc7);return{'ok':!![],'message':[_0x28399a(0xe9)+AUTH_MODE[_0x28399a(0xec)],_0x28399a(0xcd)+_0x1cc91a+_0x28399a(0xd3)+_0x28e59d+')',_0x28399a(0xdf)][_0x28399a(0xe8)]('\x0a')};}_0x2137ef[_0x28399a(0xf2)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x28399a(0xc4)](_0x28399a(0xee));}throw CliErrors[_0x28399a(0xc4)](_0x38526b[_0x28399a(0xe8)]('\x0a'));}}return{'ok':!![],'message':_0x38526b['join']('\x0a')};}},{'service':a13_0x3cade4(0xce),'command':'info','description':a13_0x3cade4(0x103),'risk':a13_0x3cade4(0xe6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3a85d0){const _0x21fddf=a13_0x3cade4,_0x597f3e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x597f3e,'meta':{'env':_0x3a85d0['envName']??_0x21fddf(0x100)}}};}},authDeviceDefinition];
@@ -1 +1 @@
1
- (function(_0x565088,_0x23af18){const _0x1aa6b7=a14_0x3da0,_0xb3aa52=_0x565088();while(!![]){try{const _0x7b8d17=parseInt(_0x1aa6b7(0x1f7))/0x1*(parseInt(_0x1aa6b7(0x1f0))/0x2)+-parseInt(_0x1aa6b7(0x1eb))/0x3+-parseInt(_0x1aa6b7(0x1ee))/0x4+-parseInt(_0x1aa6b7(0x1ea))/0x5*(parseInt(_0x1aa6b7(0x1f4))/0x6)+-parseInt(_0x1aa6b7(0x1f5))/0x7*(parseInt(_0x1aa6b7(0x1e8))/0x8)+-parseInt(_0x1aa6b7(0x1e1))/0x9*(-parseInt(_0x1aa6b7(0x1f2))/0xa)+-parseInt(_0x1aa6b7(0x1e5))/0xb*(-parseInt(_0x1aa6b7(0x1ef))/0xc);if(_0x7b8d17===_0x23af18)break;else _0xb3aa52['push'](_0xb3aa52['shift']());}catch(_0x470324){_0xb3aa52['push'](_0xb3aa52['shift']());}}}(a14_0x10c6,0x700e1));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1d867b=a14_0x3da0;super(_0x1d867b(0x1ec)),this['name']=_0x1d867b(0x1e3);}}function createSafeRl(){const _0x225c3e=a14_0x3da0,_0x264e79=createInterface({'input':process[_0x225c3e(0x1e4)],'output':process[_0x225c3e(0x1f1)]});let _0x36078b;const _0x21729d=new Promise((_0x5a05c9,_0xbcb85e)=>{const _0x373a1b=_0x225c3e;_0x36078b=()=>{const _0x1bf53b=a14_0x3da0;_0x36078b&&(_0x264e79['removeListener'](_0x1bf53b(0x1e2),_0x36078b),_0x36078b=undefined);try{_0x264e79['close']();}catch{}_0xbcb85e(new AbortPrompt());},_0x264e79['once'](_0x373a1b(0x1e2),_0x36078b);}),_0xc28360=()=>{const _0x3bc89f=_0x225c3e;_0x36078b&&(_0x264e79['removeListener'](_0x3bc89f(0x1e2),_0x36078b),_0x36078b=undefined);try{_0x264e79[_0x3bc89f(0x1e6)]();}catch{}};return{'rl':_0x264e79,'abortPromise':_0x21729d,'disposeSuccess':_0xc28360};}export async function promptAccessKey(_0x50f9ca=''){const {rl:_0x1b02be,abortPromise:_0xe27524,disposeSuccess:_0x184e78}=createSafeRl(),_0x314c32=new Promise(_0x18e1a6=>{const _0x21804a=a14_0x3da0,_0x114e11=_0x50f9ca?_0x21804a(0x1e9)+_0x50f9ca+_0x21804a(0x1e7):_0x21804a(0x1ed);_0x1b02be[_0x21804a(0x1f3)](_0x114e11,_0x765e12=>{_0x184e78(),_0x18e1a6(_0x765e12['trim']()||_0x50f9ca);});});return Promise['race']([_0x314c32,_0xe27524]);}export function isAbortPrompt(_0x50a25a){const _0x6c77c4=a14_0x3da0;return _0x50a25a instanceof Error&&_0x50a25a[_0x6c77c4(0x1f6)]===_0x6c77c4(0x1e3);}function a14_0x3da0(_0x39ad40,_0x4dcdd9){_0x39ad40=_0x39ad40-0x1e1;const _0x10c6e4=a14_0x10c6();let _0x3da0dd=_0x10c6e4[_0x39ad40];return _0x3da0dd;}function a14_0x10c6(){const _0x3978ca=['10CwOYYR','question','1494414BudHVj','23142WkFZya','name','361360TNdzsV','3060198YgYSSP','SIGINT','AbortPrompt','stdin','9877054pRPbkD','close','):\x20','1216SEvIgm','AccessKey\x20(','5VXuBYW','44166uncwPC','User\x20aborted\x20prompt','AccessKey\x20(paste\x20ak_...):\x20','1496064cMCGVN','12gGPcNU','2nmfKQw','stdout'];a14_0x10c6=function(){return _0x3978ca;};return a14_0x10c6();}
1
+ (function(_0x1f0136,_0x319fd1){const _0x1a0624=a14_0x3c2e,_0x504723=_0x1f0136();while(!![]){try{const _0x2455f1=parseInt(_0x1a0624(0x1b6))/0x1+parseInt(_0x1a0624(0x1b0))/0x2*(-parseInt(_0x1a0624(0x1b8))/0x3)+parseInt(_0x1a0624(0x1b5))/0x4+-parseInt(_0x1a0624(0x1bb))/0x5*(-parseInt(_0x1a0624(0x1b1))/0x6)+parseInt(_0x1a0624(0x1bc))/0x7+-parseInt(_0x1a0624(0x1c1))/0x8+-parseInt(_0x1a0624(0x1c5))/0x9*(-parseInt(_0x1a0624(0x1b7))/0xa);if(_0x2455f1===_0x319fd1)break;else _0x504723['push'](_0x504723['shift']());}catch(_0xc90fa4){_0x504723['push'](_0x504723['shift']());}}}(a14_0x59ff,0x80583));import{createInterface}from'node:readline';function a14_0x59ff(){const _0x395f5c=['User\x20aborted\x20prompt','close','2655iJluIN','race','SIGINT','23946TLGAsU','6leFQSA','question','AccessKey\x20(paste\x20ak_...):\x20','name','1923476lvCxUl','116672kgEcJF','2270oEEFoX','195XBbqIe','):\x20','stdin','1672190YDhLnN','4603893dqxnyH','once','trim','removeListener','AccessKey\x20(','2821592DZCXjW','AbortPrompt'];a14_0x59ff=function(){return _0x395f5c;};return a14_0x59ff();}class AbortPrompt extends Error{constructor(){const _0x4adee5=a14_0x3c2e;super(_0x4adee5(0x1c3)),this[_0x4adee5(0x1b4)]=_0x4adee5(0x1c2);}}function createSafeRl(){const _0x12c06a=a14_0x3c2e,_0xf97645=createInterface({'input':process[_0x12c06a(0x1ba)],'output':process['stdout']});let _0x4aa475;const _0x689a04=new Promise((_0x165e3d,_0x8770da)=>{const _0x52f019=_0x12c06a;_0x4aa475=()=>{const _0x167a95=a14_0x3c2e;_0x4aa475&&(_0xf97645[_0x167a95(0x1bf)](_0x167a95(0x1af),_0x4aa475),_0x4aa475=undefined);try{_0xf97645[_0x167a95(0x1c4)]();}catch{}_0x8770da(new AbortPrompt());},_0xf97645[_0x52f019(0x1bd)](_0x52f019(0x1af),_0x4aa475);}),_0x1c3270=()=>{const _0xcaff7d=_0x12c06a;_0x4aa475&&(_0xf97645[_0xcaff7d(0x1bf)](_0xcaff7d(0x1af),_0x4aa475),_0x4aa475=undefined);try{_0xf97645[_0xcaff7d(0x1c4)]();}catch{}};return{'rl':_0xf97645,'abortPromise':_0x689a04,'disposeSuccess':_0x1c3270};}export async function promptAccessKey(_0x562af2=''){const _0x54a7c8=a14_0x3c2e,{rl:_0x4c0448,abortPromise:_0x3866bd,disposeSuccess:_0x34721f}=createSafeRl(),_0x4abd29=new Promise(_0xff46bd=>{const _0x5e2c6b=a14_0x3c2e,_0x372310=_0x562af2?_0x5e2c6b(0x1c0)+_0x562af2+_0x5e2c6b(0x1b9):_0x5e2c6b(0x1b3);_0x4c0448[_0x5e2c6b(0x1b2)](_0x372310,_0x29f508=>{const _0x1f85aa=_0x5e2c6b;_0x34721f(),_0xff46bd(_0x29f508[_0x1f85aa(0x1be)]()||_0x562af2);});});return Promise[_0x54a7c8(0x1c6)]([_0x4abd29,_0x3866bd]);}function a14_0x3c2e(_0x5185bc,_0x4dfa4b){_0x5185bc=_0x5185bc-0x1af;const _0x59ff17=a14_0x59ff();let _0x3c2ee2=_0x59ff17[_0x5185bc];return _0x3c2ee2;}export function isAbortPrompt(_0x5d0cc8){const _0x15fa0d=a14_0x3c2e;return _0x5d0cc8 instanceof Error&&_0x5d0cc8[_0x15fa0d(0x1b4)]===_0x15fa0d(0x1c2);}
@@ -1 +1 @@
1
- const a15_0x19bdf3=a15_0x166e;function a15_0x166e(_0x88ab32,_0x42a546){_0x88ab32=_0x88ab32-0xb0;const _0x497fd8=a15_0x497f();let _0x166ef4=_0x497fd8[_0x88ab32];return _0x166ef4;}(function(_0xfed351,_0x226fa3){const _0x5624c8=a15_0x166e,_0x4b7375=_0xfed351();while(!![]){try{const _0x4aec6c=parseInt(_0x5624c8(0xb5))/0x1+-parseInt(_0x5624c8(0xbb))/0x2+-parseInt(_0x5624c8(0xc5))/0x3*(parseInt(_0x5624c8(0xb4))/0x4)+-parseInt(_0x5624c8(0xb3))/0x5*(-parseInt(_0x5624c8(0xb7))/0x6)+parseInt(_0x5624c8(0xba))/0x7*(parseInt(_0x5624c8(0xbc))/0x8)+-parseInt(_0x5624c8(0xbf))/0x9+-parseInt(_0x5624c8(0xb0))/0xa;if(_0x4aec6c===_0x226fa3)break;else _0x4b7375['push'](_0x4b7375['shift']());}catch(_0x1ab1d9){_0x4b7375['push'](_0x4b7375['shift']());}}}(a15_0x497f,0xdedbf));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x19bdf3(0xc2),'command':a15_0x19bdf3(0xb6),'description':a15_0x19bdf3(0xc3),'risk':a15_0x19bdf3(0xc0),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x19bdf3(0xc1)}],async 'execute'(_0x1510be){const _0x4cbe7f=a15_0x19bdf3,_0x15b7c3=await getBffEndpointContract(_0x1510be[_0x4cbe7f(0xbe)],_0x1510be[_0x4cbe7f(0xc4)]('name'));return{'ok':!![],'data':{'appCode':_0x15b7c3[_0x4cbe7f(0xbe)],'functionName':_0x15b7c3[_0x4cbe7f(0xb2)],'description':_0x15b7c3[_0x4cbe7f(0xbd)]||_0x4cbe7f(0xb9),'version':_0x15b7c3[_0x4cbe7f(0xb8)],'gmtModified':_0x15b7c3[_0x4cbe7f(0xb1)]}};}};function a15_0x497f(){const _0x1cde9a=['bff','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','str','3PXJXar','8871080fTjIBN','gmtModified','functionName','1825735IBKOTM','1273268HizOgz','591192tBAKns','detail','24HlPzEs','version','(none)','336203ksrrfd','348692HJydiJ','296MxdddN','description','appCode','13826259VIUeZp','read','Backend\x20Function\x20name'];a15_0x497f=function(){return _0x1cde9a;};return a15_0x497f();}
1
+ const a15_0x4bf5b9=a15_0x43be;(function(_0x4cbc3a,_0x489f36){const _0x259f57=a15_0x43be,_0x35676a=_0x4cbc3a();while(!![]){try{const _0x423107=parseInt(_0x259f57(0x93))/0x1*(parseInt(_0x259f57(0x9c))/0x2)+-parseInt(_0x259f57(0x90))/0x3*(parseInt(_0x259f57(0xa1))/0x4)+-parseInt(_0x259f57(0x9f))/0x5*(parseInt(_0x259f57(0x9e))/0x6)+-parseInt(_0x259f57(0x9d))/0x7+-parseInt(_0x259f57(0x96))/0x8*(-parseInt(_0x259f57(0x91))/0x9)+-parseInt(_0x259f57(0x98))/0xa+-parseInt(_0x259f57(0x9a))/0xb*(-parseInt(_0x259f57(0x99))/0xc);if(_0x423107===_0x489f36)break;else _0x35676a['push'](_0x35676a['shift']());}catch(_0x1e7560){_0x35676a['push'](_0x35676a['shift']());}}}(a15_0x5d88,0x91bc6));function a15_0x43be(_0x2891ec,_0x63b728){_0x2891ec=_0x2891ec-0x8e;const _0x5d8803=a15_0x5d88();let _0x43bee0=_0x5d8803[_0x2891ec];return _0x43bee0;}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';function a15_0x5d88(){const _0x1a2a5a=['28eIvPeV','2592828bdwuzy','3273576NhWiKk','5IxNZqU','detail','24vFVsTi','bff','Backend\x20Function\x20name','appCode','186483mFlVcO','18TqhqTV','version','24425kRYNGg','str','read','3351896nletIj','description','9779120DgSHBK','3367776CNXTTl','66itgFGh','name'];a15_0x5d88=function(){return _0x1a2a5a;};return a15_0x5d88();}export const bffDetail={'service':a15_0x4bf5b9(0xa2),'command':a15_0x4bf5b9(0xa0),'description':'Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','risk':a15_0x4bf5b9(0x95),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x4bf5b9(0x8e)}],async 'execute'(_0x543fdd){const _0x176035=a15_0x4bf5b9,_0x49371d=await getBffEndpointContract(_0x543fdd[_0x176035(0x8f)],_0x543fdd[_0x176035(0x94)](_0x176035(0x9b)));return{'ok':!![],'data':{'appCode':_0x49371d[_0x176035(0x8f)],'functionName':_0x49371d['functionName'],'description':_0x49371d[_0x176035(0x97)]||'(none)','version':_0x49371d[_0x176035(0x92)],'gmtModified':_0x49371d['gmtModified']}};}};
@@ -1 +1 @@
1
- const a16_0x3c2d8f=a16_0x2814;(function(_0x3cbd0a,_0x54af40){const _0x47420b=a16_0x2814,_0x41196d=_0x3cbd0a();while(!![]){try{const _0x2a85e7=-parseInt(_0x47420b(0xc0))/0x1*(parseInt(_0x47420b(0xb1))/0x2)+-parseInt(_0x47420b(0xb6))/0x3+-parseInt(_0x47420b(0xb3))/0x4+parseInt(_0x47420b(0xb2))/0x5*(-parseInt(_0x47420b(0xb5))/0x6)+-parseInt(_0x47420b(0xb4))/0x7+parseInt(_0x47420b(0xba))/0x8*(-parseInt(_0x47420b(0xbc))/0x9)+parseInt(_0x47420b(0xb9))/0xa;if(_0x2a85e7===_0x54af40)break;else _0x41196d['push'](_0x41196d['shift']());}catch(_0x26f8e7){_0x41196d['push'](_0x41196d['shift']());}}}(a16_0x1ca8,0x4d57d));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0x1ca8(){const _0x95a360=['Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','params','bff','1oSPifA','name','579434MKmcTj','379705tUwYIu','367524kAxMlV','778176TwVuDP','30WlFkNv','243552fOCeEg','read','str','18137780tbZAQJ','3152pStglF','Backend\x20Function\x20name\x20to\x20execute','12411tsVodD'];a16_0x1ca8=function(){return _0x95a360;};return a16_0x1ca8();}import{parseJsonParams}from'../../utils/params.js';function a16_0x2814(_0x9beb4c,_0x36f16e){_0x9beb4c=_0x9beb4c-0xb1;const _0x1ca8bd=a16_0x1ca8();let _0x2814ab=_0x1ca8bd[_0x9beb4c];return _0x2814ab;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x3c2d8f(0xbf),'command':'exec','description':a16_0x3c2d8f(0xbd),'risk':a16_0x3c2d8f(0xb7),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x3c2d8f(0xbb)},PARAMS_FLAG],async 'execute'(_0xb2e670){const _0x581cb7=a16_0x3c2d8f,_0x23da97=parseJsonParams(_0xb2e670[_0x581cb7(0xb8)](_0x581cb7(0xbe))),_0x23bafc=Date['now'](),_0x5427cc=await executeSdkBff(_0xb2e670[_0x581cb7(0xb8)](_0x581cb7(0xc1)),_0x23da97),_0x4b4e25=Date['now']()-_0x23bafc;return{'ok':!![],'data':{'result':_0x5427cc,'elapsed':_0x4b4e25},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x4b4e25+'ms'};}};
1
+ const a16_0x43de7f=a16_0x5051;(function(_0x4cff6c,_0xee0c1d){const _0x2e7eeb=a16_0x5051,_0xd07270=_0x4cff6c();while(!![]){try{const _0x45d1ed=parseInt(_0x2e7eeb(0xc4))/0x1*(-parseInt(_0x2e7eeb(0xc1))/0x2)+parseInt(_0x2e7eeb(0xba))/0x3*(-parseInt(_0x2e7eeb(0xb3))/0x4)+parseInt(_0x2e7eeb(0xbd))/0x5+parseInt(_0x2e7eeb(0xbb))/0x6+parseInt(_0x2e7eeb(0xb4))/0x7*(-parseInt(_0x2e7eeb(0xb8))/0x8)+parseInt(_0x2e7eeb(0xc3))/0x9+-parseInt(_0x2e7eeb(0xc2))/0xa*(-parseInt(_0x2e7eeb(0xb9))/0xb);if(_0x45d1ed===_0xee0c1d)break;else _0xd07270['push'](_0xd07270['shift']());}catch(_0x37cd19){_0xd07270['push'](_0xd07270['shift']());}}}(a16_0x8cda,0xe100a));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0x5051(_0x214717,_0x1af449){_0x214717=_0x214717-0xb3;const _0x8cda45=a16_0x8cda();let _0x505152=_0x8cda45[_0x214717];return _0x505152;}import{parseJsonParams}from'../../utils/params.js';function a16_0x8cda(){const _0x194526=['11ayaRRj','3645177QBFLXJ','7687320lnLapS','params','3713090vaenpA','name','read','now','6OSnZPZ','13174930wVrqwE','2834793NHNwrj','41861bYUugA','4vXCdFS','28qMJBsJ','Backend\x20Function\x20name\x20to\x20execute','str','Backend\x20Function\x20executed\x20in\x20','2788112RCLrcn'];a16_0x8cda=function(){return _0x194526;};return a16_0x8cda();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':'exec','description':'Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','risk':a16_0x43de7f(0xbf),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x43de7f(0xb5)},PARAMS_FLAG],async 'execute'(_0x566f72){const _0x3ade33=a16_0x43de7f,_0x2f9a3c=parseJsonParams(_0x566f72['str'](_0x3ade33(0xbc))),_0xa01d2e=Date[_0x3ade33(0xc0)](),_0x558915=await executeSdkBff(_0x566f72[_0x3ade33(0xb6)](_0x3ade33(0xbe)),_0x2f9a3c),_0x2d403c=Date[_0x3ade33(0xc0)]()-_0xa01d2e;return{'ok':!![],'data':{'result':_0x558915,'elapsed':_0x2d403c},'message':_0x3ade33(0xb7)+_0x2d403c+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x5d6f46,_0x4377af){const _0xba5c75=a17_0xf6a6,_0x29bae2=_0x5d6f46();while(!![]){try{const _0x281589=-parseInt(_0xba5c75(0x1fd))/0x1*(-parseInt(_0xba5c75(0x1f9))/0x2)+parseInt(_0xba5c75(0x1f5))/0x3+parseInt(_0xba5c75(0x1f8))/0x4*(-parseInt(_0xba5c75(0x1fb))/0x5)+parseInt(_0xba5c75(0x1f6))/0x6+-parseInt(_0xba5c75(0x1f7))/0x7+-parseInt(_0xba5c75(0x1f4))/0x8+parseInt(_0xba5c75(0x1fc))/0x9*(parseInt(_0xba5c75(0x1fa))/0xa);if(_0x281589===_0x4377af)break;else _0x29bae2['push'](_0x29bae2['shift']());}catch(_0x398839){_0x29bae2['push'](_0x29bae2['shift']());}}}(a17_0xa7ad,0x41d4b));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0xa7ad(){const _0x222002=['5owXCKL','36837RjBQEX','193504ZttZEY','516824gDQVMt','847566lMCXQu','1486008ztYZLB','1398642jurczn','2154720LcYKaj','4oQOGOg','380ypPZJH'];a17_0xa7ad=function(){return _0x222002;};return a17_0xa7ad();}function a17_0xf6a6(_0x60a16a,_0x23cc8d){_0x60a16a=_0x60a16a-0x1f4;const _0xa7ad3b=a17_0xa7ad();let _0xf6a630=_0xa7ad3b[_0x60a16a];return _0xf6a630;}export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x4e827e,_0x3bdfe4){const _0x342522=a17_0x3d1a,_0x131340=_0x4e827e();while(!![]){try{const _0x490caa=parseInt(_0x342522(0x109))/0x1+-parseInt(_0x342522(0x108))/0x2+parseInt(_0x342522(0x106))/0x3+-parseInt(_0x342522(0x10a))/0x4+parseInt(_0x342522(0x10b))/0x5*(parseInt(_0x342522(0x105))/0x6)+-parseInt(_0x342522(0x107))/0x7*(-parseInt(_0x342522(0x104))/0x8)+-parseInt(_0x342522(0x103))/0x9;if(_0x490caa===_0x3bdfe4)break;else _0x131340['push'](_0x131340['shift']());}catch(_0x135fb8){_0x131340['push'](_0x131340['shift']());}}}(a17_0xb59e,0x66093));import{bffDetail}from'../../commands/bff/detail.js';function a17_0xb59e(){const _0x3d1776=['260609kPoFtR','2110076ncIvZk','60jqgfKL','4945896lFMqyR','8OvxHbY','126564dwRimM','1826661QXnwNM','2673461wzBnAE','19090TilNMK'];a17_0xb59e=function(){return _0x3d1776;};return a17_0xb59e();}function a17_0x3d1a(_0x2099ba,_0x3c4412){_0x2099ba=_0x2099ba-0x103;const _0xb59e24=a17_0xb59e();let _0x3d1a0f=_0xb59e24[_0x2099ba];return _0x3d1a0f;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a18_0x296896=a18_0x1bfa;function a18_0x1bfa(_0x20a8d2,_0x372d7d){_0x20a8d2=_0x20a8d2-0x95;const _0x5a4625=a18_0x5a46();let _0x1bfaa4=_0x5a4625[_0x20a8d2];return _0x1bfaa4;}function a18_0x5a46(){const _0x991e6f=['install','repairCommand','28138671YKdOhP','37112WYbYmw','inherit','code','1ADsCND','CLI\x20Built-in\x20Skill\x20','cwd','244BPAASY','INSTALL_FAILED','installedPath','apiError','1305hQenss','setLogPath','log','19380URwwgC','nonInteractive','info','\x20at\x20','1249816QIurEO','read','Built-in\x20Skill\x20install\x20failed\x20[','\x20installed','2347190zFYEDW','325RbzpGN','9609wmjKcM','4778690RxadoG'];a18_0x5a46=function(){return _0x991e6f;};return a18_0x5a46();}(function(_0x3f194b,_0x35cdea){const _0x57e233=a18_0x1bfa,_0x3410b4=_0x3f194b();while(!![]){try{const _0x24b02e=parseInt(_0x57e233(0xa0))/0x1*(-parseInt(_0x57e233(0xae))/0x2)+parseInt(_0x57e233(0x98))/0x3*(-parseInt(_0x57e233(0xa3))/0x4)+-parseInt(_0x57e233(0x97))/0x5*(-parseInt(_0x57e233(0xaa))/0x6)+-parseInt(_0x57e233(0x99))/0x7+parseInt(_0x57e233(0x9d))/0x8*(-parseInt(_0x57e233(0xa7))/0x9)+-parseInt(_0x57e233(0x96))/0xa+parseInt(_0x57e233(0x9c))/0xb;if(_0x24b02e===_0x35cdea)break;else _0x3410b4['push'](_0x3410b4['shift']());}catch(_0x26fd4f){_0x3410b4['push'](_0x3410b4['shift']());}}}(a18_0x5a46,0x5752c));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x296896(0x9a),'description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a18_0x296896(0xaf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x14180e){const _0x557f75=a18_0x296896;logger[_0x557f75(0xa8)](process[_0x557f75(0xa2)]()),logger[_0x557f75(0xac)]('cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.');const _0x21ece5=installBuiltinSkill({'stdio':_0x14180e[_0x557f75(0xab)]?'pipe':_0x557f75(0x9e)});if(!_0x21ece5['ok'])throw CliErrors[_0x557f75(0xa6)](_0x557f75(0xb0)+(_0x21ece5[_0x557f75(0x9f)]||_0x557f75(0xa4))+']:\x20'+(_0x21ece5['error']||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x21ece5[_0x557f75(0x9b)]);const _0x2a320a=_0x21ece5[_0x557f75(0xa5)]?_0x557f75(0xad)+_0x21ece5[_0x557f75(0xa5)]:'';return console[_0x557f75(0xa9)](_0x21ece5['changed']?_0x557f75(0xa1)+_0x21ece5['skillVersion']+_0x557f75(0x95)+_0x2a320a:_0x557f75(0xa1)+_0x21ece5['skillVersion']+'\x20is\x20already\x20current'+_0x2a320a),{'ok':!![]};}}];
1
+ const a18_0x8290ae=a18_0x3c38;(function(_0x201b4f,_0x1201b3){const _0x559e52=a18_0x3c38,_0x5d4c16=_0x201b4f();while(!![]){try{const _0x5eea2b=parseInt(_0x559e52(0x150))/0x1+parseInt(_0x559e52(0x14b))/0x2+parseInt(_0x559e52(0x15e))/0x3+-parseInt(_0x559e52(0x14f))/0x4*(-parseInt(_0x559e52(0x151))/0x5)+parseInt(_0x559e52(0x144))/0x6*(-parseInt(_0x559e52(0x146))/0x7)+-parseInt(_0x559e52(0x14d))/0x8+-parseInt(_0x559e52(0x14c))/0x9*(parseInt(_0x559e52(0x160))/0xa);if(_0x5eea2b===_0x1201b3)break;else _0x5d4c16['push'](_0x5d4c16['shift']());}catch(_0x3298c4){_0x5d4c16['push'](_0x5d4c16['shift']());}}}(a18_0x2c0e,0xf2fa2));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a18_0x3c38(_0x4dfbef,_0x52283b){_0x4dfbef=_0x4dfbef-0x144;const _0x2c0e3f=a18_0x2c0e();let _0x3c38d9=_0x2c0e3f[_0x4dfbef];return _0x3c38d9;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x8290ae(0x152),'description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a18_0x8290ae(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2ad44e){const _0x59c348=a18_0x8290ae;logger[_0x59c348(0x14a)](process[_0x59c348(0x147)]()),logger['info']('cli-skill-install',_0x59c348(0x159));const _0x381930=installBuiltinSkill({'stdio':_0x2ad44e[_0x59c348(0x145)]?_0x59c348(0x157):_0x59c348(0x15b)});if(!_0x381930['ok'])throw CliErrors[_0x59c348(0x149)](_0x59c348(0x161)+(_0x381930[_0x59c348(0x153)]||'INSTALL_FAILED')+_0x59c348(0x14e)+(_0x381930['error']||_0x59c348(0x154)),_0x59c348(0x15d)+_0x381930[_0x59c348(0x15a)]);const _0x243a0b=_0x381930['installedPath']?_0x59c348(0x15c)+_0x381930[_0x59c348(0x155)]:'';return console[_0x59c348(0x148)](_0x381930['changed']?_0x59c348(0x15f)+_0x381930['skillVersion']+'\x20installed'+_0x243a0b:_0x59c348(0x15f)+_0x381930[_0x59c348(0x158)]+'\x20is\x20already\x20current'+_0x243a0b),{'ok':!![]};}}];function a18_0x2c0e(){const _0x25b74a=['inherit','\x20at\x20','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','3658500QPavns','CLI\x20Built-in\x20Skill\x20','10eeJVAO','Built-in\x20Skill\x20install\x20failed\x20[','186ZylRTd','nonInteractive','43953NuigiA','cwd','log','apiError','setLogPath','3590640eHsnDb','16389081ShxIvU','10233664OJwgRM',']:\x20','8krbLKY','1235564RKdvmS','99290fnwATg','install','code','unknown','installedPath','read','pipe','skillVersion','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','repairCommand'];a18_0x2c0e=function(){return _0x25b74a;};return a18_0x2c0e();}
@@ -1 +1 @@
1
- (function(_0x5dc8bc,_0x1a6f69){const _0x253779=a19_0x7a0c,_0xb054fc=_0x5dc8bc();while(!![]){try{const _0x1ec29c=parseInt(_0x253779(0xc5))/0x1+-parseInt(_0x253779(0xc2))/0x2*(-parseInt(_0x253779(0xc7))/0x3)+-parseInt(_0x253779(0xbe))/0x4*(-parseInt(_0x253779(0xca))/0x5)+parseInt(_0x253779(0xcb))/0x6+parseInt(_0x253779(0xc8))/0x7+-parseInt(_0x253779(0xce))/0x8*(parseInt(_0x253779(0xc3))/0x9)+parseInt(_0x253779(0xbf))/0xa*(-parseInt(_0x253779(0xd0))/0xb);if(_0x1ec29c===_0x1a6f69)break;else _0xb054fc['push'](_0xb054fc['shift']());}catch(_0x238216){_0xb054fc['push'](_0xb054fc['shift']());}}}(a19_0x2fb1,0xace3a));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a19_0x2fb1(){const _0x599ca0=[',\x20or\x20create\x20a\x20project-local\x20','Add\x20--global\x20to\x20write\x20to\x20~/','746260GHVzcG','581270HTfPfm','validation','\x20(global)','68aKvdyO','3074121XbEslq','\x20found).','189868TnGvxW','Not\x20inside\x20a\x20project\x20(no\x20','11202PTVsTg','2338567oKKRCw','global','5ucSmjk','3366090SPFFUi','project','newConfigFileName','8DINDYi','global-default','66mWSlLP'];a19_0x2fb1=function(){return _0x599ca0;};return a19_0x2fb1();}function a19_0x7a0c(_0x5138b3,_0x3d0cf2){_0x5138b3=_0x5138b3-0xbc;const _0x2fb1ef=a19_0x2fb1();let _0x7a0ca4=_0x2fb1ef[_0x5138b3];return _0x7a0ca4;}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0x3652ed){const _0x34f91b=a19_0x7a0c,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x132bd6}=_0x3652ed;if(explicitGlobal&&explicitProject)throw CliErrors[_0x34f91b(0xc0)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x34f91b(0xc9);if(explicitProject)return _0x34f91b(0xcc);switch(_0x132bd6){case _0x34f91b(0xcf):return _0x34f91b(0xc9);case'project-or-global-explicit':if(!(_0x3652ed['inProject']??isInProject()))throw CliErrors[_0x34f91b(0xc0)](_0x34f91b(0xc6)+PRODUCT_CONFIG['newConfigFileName']+_0x34f91b(0xc4),_0x34f91b(0xbd)+PRODUCT_CONFIG[_0x34f91b(0xcd)]+_0x34f91b(0xbc)+PRODUCT_CONFIG[_0x34f91b(0xcd)]+'\x20first.');return'project';}}export function toScopeFlags(_0x30f281){return{'global':_0x30f281==='global'};}export function formatScopeLabel(_0xdd92e6){const _0x489ffc=a19_0x7a0c;return _0xdd92e6===_0x489ffc(0xc9)?_0x489ffc(0xc1):'';}
1
+ function a19_0x53b3(){const _0x13eb41=['1167533PBNbaQ','global','161anibVK','project','5672TlIMlI','1209120soekat','5033132PMRoeL','118858dciptO','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','inProject','\x20(global)','project-or-global-explicit','validation','40NThozn','144168pPXcDh','Add\x20--global\x20to\x20write\x20to\x20~/','66ZOuyVW','newConfigFileName','13354587fkflzZ','10SaloKW','407UMDtFi','\x20first.','Use\x20only\x20one\x20config\x20scope\x20flag.','\x20found).'];a19_0x53b3=function(){return _0x13eb41;};return a19_0x53b3();}(function(_0x239830,_0x3fe845){const _0x33d0d4=a19_0x5319,_0x366bd3=_0x239830();while(!![]){try{const _0x3f1f8e=-parseInt(_0x33d0d4(0x7c))/0x1+-parseInt(_0x33d0d4(0x83))/0x2*(parseInt(_0x33d0d4(0x8c))/0x3)+parseInt(_0x33d0d4(0x82))/0x4+-parseInt(_0x33d0d4(0x89))/0x5*(parseInt(_0x33d0d4(0x8a))/0x6)+parseInt(_0x33d0d4(0x7e))/0x7*(-parseInt(_0x33d0d4(0x80))/0x8)+parseInt(_0x33d0d4(0x76))/0x9*(-parseInt(_0x33d0d4(0x77))/0xa)+-parseInt(_0x33d0d4(0x78))/0xb*(-parseInt(_0x33d0d4(0x81))/0xc);if(_0x3f1f8e===_0x3fe845)break;else _0x366bd3['push'](_0x366bd3['shift']());}catch(_0x3f1a5f){_0x366bd3['push'](_0x366bd3['shift']());}}}(a19_0x53b3,0xc7f72));import{PRODUCT_CONFIG}from'../../constant/product.js';function a19_0x5319(_0x1c9e0b,_0x424703){_0x1c9e0b=_0x1c9e0b-0x75;const _0x53b377=a19_0x53b3();let _0x531912=_0x53b377[_0x1c9e0b];return _0x531912;}export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0x355e32){const _0x47f8cb=a19_0x5319,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x11f2c0}=_0x355e32;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x47f8cb(0x84),_0x47f8cb(0x7a));if(explicitGlobal)return _0x47f8cb(0x7d);if(explicitProject)return _0x47f8cb(0x7f);switch(_0x11f2c0){case'global-default':return'global';case _0x47f8cb(0x87):if(!(_0x355e32[_0x47f8cb(0x85)]??isInProject()))throw CliErrors[_0x47f8cb(0x88)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x47f8cb(0x75)]+_0x47f8cb(0x7b),_0x47f8cb(0x8b)+PRODUCT_CONFIG[_0x47f8cb(0x75)]+',\x20or\x20create\x20a\x20project-local\x20'+PRODUCT_CONFIG[_0x47f8cb(0x75)]+_0x47f8cb(0x79));return _0x47f8cb(0x7f);}}export function toScopeFlags(_0x2a08a2){const _0x39fdc6=a19_0x5319;return{'global':_0x2a08a2===_0x39fdc6(0x7d)};}export function formatScopeLabel(_0xef6d74){const _0x24643a=a19_0x5319;return _0xef6d74===_0x24643a(0x7d)?_0x24643a(0x86):'';}
@@ -1 +1 @@
1
- (function(_0x1b25cc,_0x45bb99){const _0xe2a5df=a20_0x285e,_0x5ac3fb=_0x1b25cc();while(!![]){try{const _0x114960=parseInt(_0xe2a5df(0x1a3))/0x1*(-parseInt(_0xe2a5df(0x1a2))/0x2)+-parseInt(_0xe2a5df(0x1b3))/0x3*(-parseInt(_0xe2a5df(0x1a1))/0x4)+-parseInt(_0xe2a5df(0x1bf))/0x5+parseInt(_0xe2a5df(0x1b1))/0x6*(-parseInt(_0xe2a5df(0x1ae))/0x7)+parseInt(_0xe2a5df(0x1a7))/0x8*(-parseInt(_0xe2a5df(0x1b2))/0x9)+-parseInt(_0xe2a5df(0x1ab))/0xa*(-parseInt(_0xe2a5df(0x1b6))/0xb)+parseInt(_0xe2a5df(0x1a9))/0xc;if(_0x114960===_0x45bb99)break;else _0x5ac3fb['push'](_0x5ac3fb['shift']());}catch(_0x609f92){_0x5ac3fb['push'](_0x5ac3fb['shift']());}}}(a20_0xcbcb,0x63dfc));import{CliErrors}from'../../errors.js';function isSet(_0x534373,_0x1b9e85){const _0x5cd2ba=a20_0x285e,_0x204841=_0x534373[_0x5cd2ba(0x1a6)](_0x1b9e85);return _0x204841!==undefined&&_0x204841!==''&&_0x204841!==![]&&_0x204841!==0x0;}function fmtNames(_0x4b8960){const _0x44cd98=a20_0x285e;return _0x4b8960['map'](_0x54978a=>'--'+_0x54978a)[_0x44cd98(0x1b9)](',\x20');}export function requireOneOf(_0xd542d8,_0x1bee57,_0x5ae378){const _0x5e49fe=a20_0x285e,_0x1b0ba6=_0x1bee57['filter'](_0x1d3d3c=>isSet(_0xd542d8,_0x1d3d3c));if(_0x1b0ba6[_0x5e49fe(0x1aa)]!==0x1)throw CliErrors['validation'](_0x1b0ba6[_0x5e49fe(0x1aa)]===0x0?_0x5e49fe(0x1a5)+fmtNames(_0x1bee57)+_0x5e49fe(0x1bb)+_0x5ae378+'`.':_0x5e49fe(0x1bc)+fmtNames(_0x1bee57)+_0x5e49fe(0x1be)+fmtNames(_0x1b0ba6)+'.',_0x1b0ba6[_0x5e49fe(0x1aa)]===0x0?_0x5e49fe(0x1b7)+fmtNames(_0x1bee57):_0x5e49fe(0x1b5));}export function requireAnyOf(_0x30eb6b,_0x2a0daa,_0x3c4dfd){const _0x107ae8=a20_0x285e;if(!_0x2a0daa[_0x107ae8(0x1ac)](_0x435c9b=>isSet(_0x30eb6b,_0x435c9b)))throw CliErrors[_0x107ae8(0x1ad)](_0x107ae8(0x1bd)+fmtNames(_0x2a0daa)+_0x107ae8(0x1bb)+_0x3c4dfd+'`.',_0x107ae8(0x1b7)+fmtNames(_0x2a0daa));}function a20_0xcbcb(){const _0xf98642=['Remove\x20all\x20but\x20one.','2420XjsVoX','Provide\x20one\x20of:\x20','test','join','\x20are\x20mutually\x20exclusive\x20for\x20`','\x20is\x20required\x20for\x20`','Only\x20one\x20of\x20','At\x20least\x20one\x20of\x20','\x20is\x20allowed,\x20found:\x20','2973480UdQSDR','12NjLbIl','18ejVAXq','47418hjhpMo','filter','Exactly\x20one\x20of\x20','flag','8wLYFMA',':\x20expected\x20','9785844lVSumk','length','36800YVIcgU','some','validation','7lxcqXq','Use\x20only\x20one\x20of:\x20',',\x20got\x20\x22','4813698kYlhwZ','1524357jzbIeZ','777111tDTUDl','Flags\x20'];a20_0xcbcb=function(){return _0xf98642;};return a20_0xcbcb();}export function mutuallyExclusive(_0x202b00,_0x47c7bc,_0x5665c5){const _0x56078a=a20_0x285e,_0x402027=_0x47c7bc[_0x56078a(0x1a4)](_0x3872f1=>isSet(_0x202b00,_0x3872f1));if(_0x402027['length']>0x1)throw CliErrors['validation'](_0x56078a(0x1b4)+fmtNames(_0x402027)+_0x56078a(0x1ba)+_0x5665c5+'`.',_0x56078a(0x1af)+fmtNames(_0x47c7bc));}function a20_0x285e(_0x1b59f6,_0x1ada63){_0x1b59f6=_0x1b59f6-0x1a1;const _0xcbcb84=a20_0xcbcb();let _0x285e74=_0xcbcb84[_0x1b59f6];return _0x285e74;}export function validatePattern(_0x12ab8a,_0x24719b,_0x356fc5,_0x1dd88b){const _0x51737c=a20_0x285e,_0x35a33d=_0x12ab8a['str'](_0x24719b);if(_0x35a33d&&!_0x356fc5[_0x51737c(0x1b8)](_0x35a33d))throw CliErrors[_0x51737c(0x1ad)]('Invalid\x20--'+_0x24719b+_0x51737c(0x1a8)+_0x1dd88b+_0x51737c(0x1b0)+_0x35a33d+'\x22.');}
1
+ (function(_0x4c20c2,_0x2359e1){const _0x29724a=a20_0x4529,_0x4014d2=_0x4c20c2();while(!![]){try{const _0x3dbda2=-parseInt(_0x29724a(0xbc))/0x1+-parseInt(_0x29724a(0xc4))/0x2*(-parseInt(_0x29724a(0xca))/0x3)+-parseInt(_0x29724a(0xbd))/0x4*(-parseInt(_0x29724a(0xc5))/0x5)+parseInt(_0x29724a(0xcb))/0x6+-parseInt(_0x29724a(0xc6))/0x7+parseInt(_0x29724a(0xc8))/0x8*(parseInt(_0x29724a(0xcc))/0x9)+-parseInt(_0x29724a(0xb8))/0xa;if(_0x3dbda2===_0x2359e1)break;else _0x4014d2['push'](_0x4014d2['shift']());}catch(_0x3a7c7c){_0x4014d2['push'](_0x4014d2['shift']());}}}(a20_0x4c99,0x763dd));import{CliErrors}from'../../errors.js';function isSet(_0x10cc64,_0x1f989c){const _0x7bcca1=_0x10cc64['flag'](_0x1f989c);return _0x7bcca1!==undefined&&_0x7bcca1!==''&&_0x7bcca1!==![]&&_0x7bcca1!==0x0;}function fmtNames(_0x4faac5){const _0x32d5a2=a20_0x4529;return _0x4faac5[_0x32d5a2(0xc1)](_0x1817df=>'--'+_0x1817df)['join'](',\x20');}export function requireOneOf(_0x199fae,_0x2b0657,_0x17f3ec){const _0x243718=a20_0x4529,_0x53136b=_0x2b0657[_0x243718(0xba)](_0x11991f=>isSet(_0x199fae,_0x11991f));if(_0x53136b[_0x243718(0xbf)]!==0x1)throw CliErrors[_0x243718(0xcf)](_0x53136b[_0x243718(0xbf)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x2b0657)+_0x243718(0xb9)+_0x17f3ec+'`.':_0x243718(0xbe)+fmtNames(_0x2b0657)+_0x243718(0xcd)+fmtNames(_0x53136b)+'.',_0x53136b[_0x243718(0xbf)]===0x0?_0x243718(0xc3)+fmtNames(_0x2b0657):_0x243718(0xc7));}export function requireAnyOf(_0x5d4b55,_0x154f17,_0x2ab427){const _0x528812=a20_0x4529;if(!_0x154f17[_0x528812(0xc0)](_0x24ffe6=>isSet(_0x5d4b55,_0x24ffe6)))throw CliErrors[_0x528812(0xcf)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x154f17)+'\x20is\x20required\x20for\x20`'+_0x2ab427+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x154f17));}export function mutuallyExclusive(_0x3741fa,_0x5a7b3e,_0x14e325){const _0x123316=a20_0x4529,_0x2755b9=_0x5a7b3e['filter'](_0x2ee061=>isSet(_0x3741fa,_0x2ee061));if(_0x2755b9[_0x123316(0xbf)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x2755b9)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x14e325+'`.',_0x123316(0xc9)+fmtNames(_0x5a7b3e));}export function validatePattern(_0x14f605,_0xd78341,_0x1713d2,_0x4164af){const _0xa9f412=a20_0x4529,_0x53a28f=_0x14f605[_0xa9f412(0xb7)](_0xd78341);if(_0x53a28f&&!_0x1713d2[_0xa9f412(0xce)](_0x53a28f))throw CliErrors[_0xa9f412(0xcf)](_0xa9f412(0xc2)+_0xd78341+_0xa9f412(0xbb)+_0x4164af+',\x20got\x20\x22'+_0x53a28f+'\x22.');}function a20_0x4529(_0x252145,_0x20dab4){_0x252145=_0x252145-0xb7;const _0x4c99d9=a20_0x4c99();let _0x4529e0=_0x4c99d9[_0x252145];return _0x4529e0;}function a20_0x4c99(){const _0x4837da=['\x20is\x20required\x20for\x20`','filter',':\x20expected\x20','857982MnuuaP','1008300aMXMWq','Only\x20one\x20of\x20','length','some','map','Invalid\x20--','Provide\x20one\x20of:\x20','190fJECxb','5qyknbd','432880meVKGn','Remove\x20all\x20but\x20one.','1240mEmVrs','Use\x20only\x20one\x20of:\x20','24459rFPMUH','2667528WcUHQc','14481UeOOxQ','\x20is\x20allowed,\x20found:\x20','test','validation','str','3164540GXpPTU'];a20_0x4c99=function(){return _0x4837da;};return a20_0x4c99();}
@@ -1 +1 @@
1
- const a21_0xb0a544=a21_0x5b27;(function(_0x47d320,_0x49f52d){const _0x37bfc=a21_0x5b27,_0xea4175=_0x47d320();while(!![]){try{const _0x56a2c3=-parseInt(_0x37bfc(0xa5))/0x1+-parseInt(_0x37bfc(0xa9))/0x2+-parseInt(_0x37bfc(0xa0))/0x3*(-parseInt(_0x37bfc(0x97))/0x4)+parseInt(_0x37bfc(0x98))/0x5+-parseInt(_0x37bfc(0x9b))/0x6+parseInt(_0x37bfc(0x9e))/0x7*(-parseInt(_0x37bfc(0x9f))/0x8)+parseInt(_0x37bfc(0xa4))/0x9*(parseInt(_0x37bfc(0xa3))/0xa);if(_0x56a2c3===_0x49f52d)break;else _0xea4175['push'](_0xea4175['shift']());}catch(_0x1b9f69){_0xea4175['push'](_0xea4175['shift']());}}}(a21_0x1a9b,0x38269));export const GLOBAL_SCOPE_FLAG={'name':a21_0xb0a544(0xaa),'type':'boolean','default':![],'description':a21_0xb0a544(0xa8)};export const CODE_FLAG={'name':'code','type':a21_0xb0a544(0xa6),'required':!![],'description':a21_0xb0a544(0xa7),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};function a21_0x5b27(_0x3cfe53,_0xb35a2c){_0x3cfe53=_0x3cfe53-0x95;const _0x1a9b7b=a21_0x1a9b();let _0x5b27e5=_0x1a9b7b[_0x3cfe53];return _0x5b27e5;}export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0xb0a544(0x95)}};export const VERBOSE_FLAG={'name':a21_0xb0a544(0x9c),'type':a21_0xb0a544(0x99),'description':a21_0xb0a544(0xa1)};export const PARAMS_FLAG={'name':a21_0xb0a544(0x9d),'type':a21_0xb0a544(0xa6),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a21_0xb0a544(0x96),'type':'string','description':a21_0xb0a544(0xa2)};function a21_0x1a9b(){const _0x22a8dc=['Write\x20to\x20the\x20global\x20configuration','194426KNMeol','global','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','name','148364aPdYia','1902695bxbwyn','boolean','number','212100MgVVbR','verbose','params','343AEJLNx','47856uPgobL','15ZYLmbi','Return\x20full\x20raw\x20response\x20object','Resource\x20name\x20for\x20lookup','16780LpWMdK','1044BmWRhH','104968bDNURe','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a21_0x1a9b=function(){return _0x22a8dc;};return a21_0x1a9b();}export const ID_FLAG={'name':'id','type':a21_0xb0a544(0x9a),'required':!![],'description':'Resource\x20ID'};
1
+ function a21_0x3c35(_0x534060,_0x1fc4f4){_0x534060=_0x534060-0xa7;const _0x2780ec=a21_0x2780();let _0x3c350c=_0x2780ec[_0x534060];return _0x3c350c;}const a21_0x38f9ac=a21_0x3c35;function a21_0x2780(){const _0x32a3af=['6389410WdSFId','12330369pGEuFG','293177ezfWXN','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6173064LonSnl','4SmnqpA','boolean','params','code','sqlcode','verbose','432294qRSdpv','4808AXACav','Resource\x20name\x20for\x20lookup','Dataset\x20code\x20(32-char\x20hex\x20UUID)','string','7xDfltD','number','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','1081851RLpeek','Return\x20full\x20raw\x20response\x20object','6200gFEzPz','Write\x20to\x20the\x20global\x20configuration','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'];a21_0x2780=function(){return _0x32a3af;};return a21_0x2780();}(function(_0x5006bf,_0x3bd50d){const _0x3116bd=a21_0x3c35,_0x1dde5d=_0x5006bf();while(!![]){try{const _0xdd54d5=-parseInt(_0x3116bd(0xb0))/0x1*(-parseInt(_0x3116bd(0xb3))/0x2)+parseInt(_0x3116bd(0xa9))/0x3+parseInt(_0x3116bd(0xba))/0x4*(-parseInt(_0x3116bd(0xab))/0x5)+-parseInt(_0x3116bd(0xb9))/0x6*(-parseInt(_0x3116bd(0xbe))/0x7)+-parseInt(_0x3116bd(0xb2))/0x8+parseInt(_0x3116bd(0xaf))/0x9+parseInt(_0x3116bd(0xae))/0xa;if(_0xdd54d5===_0x3bd50d)break;else _0x1dde5d['push'](_0x1dde5d['shift']());}catch(_0x16d295){_0x1dde5d['push'](_0x1dde5d['shift']());}}}(a21_0x2780,0xbafc1));export const GLOBAL_SCOPE_FLAG={'name':'global','type':'boolean','default':![],'description':a21_0x38f9ac(0xac)};export const CODE_FLAG={'name':a21_0x38f9ac(0xb6),'type':a21_0x38f9ac(0xbd),'required':!![],'description':a21_0x38f9ac(0xbc),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x38f9ac(0xad)}};export const SQLCODE_FLAG={'name':a21_0x38f9ac(0xb7),'type':a21_0x38f9ac(0xbd),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x38f9ac(0xb1)}};export const VERBOSE_FLAG={'name':a21_0x38f9ac(0xb8),'type':a21_0x38f9ac(0xb4),'description':a21_0x38f9ac(0xaa)};export const PARAMS_FLAG={'name':a21_0x38f9ac(0xb5),'type':a21_0x38f9ac(0xbd),'description':a21_0x38f9ac(0xa8)};export const NAME_FLAG={'name':'name','type':a21_0x38f9ac(0xbd),'description':a21_0x38f9ac(0xbb)};export const ID_FLAG={'name':'id','type':a21_0x38f9ac(0xa7),'required':!![],'description':'Resource\x20ID'};
@@ -1 +1 @@
1
- function a22_0x1bd1(){const _0x5b1f65=['296XHXJNh','4sODusv','2351907cpjobM','2388BGCSNK','22527dMzzdt','File\x20is\x20not\x20a\x20regular\x20file:\x20','899975GHkXbT','isFile','ceil','66xWweor','3258359MtAoga','size','trim','\x20path\x20is\x20required.','validation','12DBFNBO','867265qUyyke','17420avuBSR','3060vtNIhj','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','4wpkCzD'];a22_0x1bd1=function(){return _0x5b1f65;};return a22_0x1bd1();}(function(_0x4151ef,_0x7f5fc8){const _0x2f775c=a22_0x4131,_0x126e19=_0x4151ef();while(!![]){try{const _0x1beb7c=-parseInt(_0x2f775c(0x1f4))/0x1*(-parseInt(_0x2f775c(0x202))/0x2)+-parseInt(_0x2f775c(0x205))/0x3*(-parseInt(_0x2f775c(0x204))/0x4)+parseInt(_0x2f775c(0x1ff))/0x5*(-parseInt(_0x2f775c(0x206))/0x6)+parseInt(_0x2f775c(0x1fe))/0x7+parseInt(_0x2f775c(0x203))/0x8*(-parseInt(_0x2f775c(0x207))/0x9)+parseInt(_0x2f775c(0x200))/0xa*(parseInt(_0x2f775c(0x1f7))/0xb)+-parseInt(_0x2f775c(0x1fd))/0xc*(parseInt(_0x2f775c(0x1f8))/0xd);if(_0x1beb7c===_0x7f5fc8)break;else _0x126e19['push'](_0x126e19['shift']());}catch(_0x2d3cb9){_0x126e19['push'](_0x126e19['shift']());}}}(a22_0x1bd1,0xef334));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a22_0x4131(_0x4edc83,_0x11ff03){_0x4edc83=_0x4edc83-0x1f3;const _0x1bd169=a22_0x1bd1();let _0x4131db=_0x1bd169[_0x4edc83];return _0x4131db;}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x310796){const _0x2f6116=a22_0x4131;if(_0x310796>=BYTES_PER_MB){const _0x4456a7=Math[_0x2f6116(0x1f6)](_0x310796/BYTES_PER_MB*0x64)/0x64;return _0x4456a7['toFixed'](0x2)+'\x20MB';}return _0x310796+'\x20B';}export function requireRuntimeUploadFile(_0x328b10,_0x12c71a){const _0x5539e4=a22_0x4131,_0x2ff939=_0x328b10[_0x5539e4(0x1fa)]();if(!_0x2ff939)throw CliErrors['validation'](_0x12c71a+_0x5539e4(0x1fb));if(!existsSync(_0x2ff939))throw CliErrors[_0x5539e4(0x1fc)]('File\x20not\x20found:\x20'+_0x2ff939);const _0x33cf38=statSync(_0x2ff939);if(!_0x33cf38[_0x5539e4(0x1f5)]())throw CliErrors['validation'](_0x5539e4(0x1f3)+_0x2ff939);if(_0x33cf38[_0x5539e4(0x1f9)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x5539e4(0x1fc)](_0x5539e4(0x201)+_0x2ff939+'\x20('+formatBytes(_0x33cf38[_0x5539e4(0x1f9)])+')');return{'path':_0x2ff939,'size':_0x33cf38[_0x5539e4(0x1f9)]};}
1
+ (function(_0x1c7697,_0x37db4e){const _0xa24d91=a22_0x50d2,_0x38760d=_0x1c7697();while(!![]){try{const _0x1861d7=-parseInt(_0xa24d91(0x1cc))/0x1*(parseInt(_0xa24d91(0x1cd))/0x2)+-parseInt(_0xa24d91(0x1cf))/0x3*(parseInt(_0xa24d91(0x1c8))/0x4)+parseInt(_0xa24d91(0x1d0))/0x5*(parseInt(_0xa24d91(0x1c6))/0x6)+-parseInt(_0xa24d91(0x1c2))/0x7*(parseInt(_0xa24d91(0x1d4))/0x8)+-parseInt(_0xa24d91(0x1c4))/0x9+parseInt(_0xa24d91(0x1d1))/0xa+parseInt(_0xa24d91(0x1c9))/0xb;if(_0x1861d7===_0x37db4e)break;else _0x38760d['push'](_0x38760d['shift']());}catch(_0x2603a4){_0x38760d['push'](_0x38760d['shift']());}}}(a22_0x2d23,0xb7ccf));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a22_0x50d2(_0x19fb3d,_0x30dd81){_0x19fb3d=_0x19fb3d-0x1c2;const _0x2d235d=a22_0x2d23();let _0x50d265=_0x2d235d[_0x19fb3d];return _0x50d265;}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1bbb7a){const _0x1da0e6=a22_0x50d2;if(_0x1bbb7a>=BYTES_PER_MB){const _0x10a391=Math['ceil'](_0x1bbb7a/BYTES_PER_MB*0x64)/0x64;return _0x10a391[_0x1da0e6(0x1d3)](0x2)+_0x1da0e6(0x1c5);}return _0x1bbb7a+'\x20B';}function a22_0x2d23(){const _0x5ea0fb=['File\x20is\x20not\x20a\x20regular\x20file:\x20','304959jRoAmd','3205joIHTg','7374380QUIdCu','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','8tQaTrZ','5744095CvooVc','\x20path\x20is\x20required.','10846197BcnANd','\x20MB','12444QZxvXD','size','44SoAgsF','34259588Zvpian','File\x20not\x20found:\x20','validation','642316LjkKKY','4eAJVCd'];a22_0x2d23=function(){return _0x5ea0fb;};return a22_0x2d23();}export function requireRuntimeUploadFile(_0x554c55,_0x2cf199){const _0x39b9d7=a22_0x50d2,_0x2b19f3=_0x554c55['trim']();if(!_0x2b19f3)throw CliErrors['validation'](_0x2cf199+_0x39b9d7(0x1c3));if(!existsSync(_0x2b19f3))throw CliErrors[_0x39b9d7(0x1cb)](_0x39b9d7(0x1ca)+_0x2b19f3);const _0x402d2b=statSync(_0x2b19f3);if(!_0x402d2b['isFile']())throw CliErrors[_0x39b9d7(0x1cb)](_0x39b9d7(0x1ce)+_0x2b19f3);if(_0x402d2b[_0x39b9d7(0x1c7)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x39b9d7(0x1cb)](_0x39b9d7(0x1d2)+_0x2b19f3+'\x20('+formatBytes(_0x402d2b['size'])+')');return{'path':_0x2b19f3,'size':_0x402d2b['size']};}
@@ -1 +1 @@
1
- function a23_0x1863(){const _0x217b10=['55ccdlaH','project-or-global-explicit','object','log','\x20(global)','locale','alias','split','Invalid\x20value\x20for\x20\x22','field','appcode','global','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','length','write','7AwTMQQ','delete','\x20config\x20get\x20<key>','apps','pretty','\x20config\x20delete\x20<key>\x20[--global]','Config\x20files:\x0a','Set\x20`','Top-level\x20key\x20\x22','join','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20\x20project:\x20','1645032xkjMyQ','397655zyWOMC','\x22\x20is\x20not\x20settable.','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','List\x20current\x20config','stringify','set','list','(none)','read','trim','760104MzsbPo','Key\x20already\x20absent:\x20','key','`\x20=\x20\x22','accessKey','args','396dVTViM','\x22.\x20Allowed:\x20','3359043msFoci','Delete\x20a\x20configuration\x20value','validation','get','format','pageSize','Set\x20a\x20configuration\x20value','653632mVzdAg','Usage:\x20','Settable\x20keys:\x20','config','Key\x20not\x20found:\x20','isArray','Invalid\x20locale\x20value.','Deleted\x20`','Get\x20a\x20config\x20value','1106176LHVkiJ','raw','../../context.js','value','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Missing\x20key\x20argument.','includes'];a23_0x1863=function(){return _0x217b10;};return a23_0x1863();}const a23_0x68ed4a=a23_0x403b;(function(_0x5599af,_0xa90bcb){const _0x32f253=a23_0x403b,_0x57ceb0=_0x5599af();while(!![]){try{const _0x13bada=parseInt(_0x32f253(0x1ae))/0x1+parseInt(_0x32f253(0x1d0))/0x2+-parseInt(_0x32f253(0x1b8))/0x3+parseInt(_0x32f253(0x1c7))/0x4+parseInt(_0x32f253(0x1d7))/0x5*(parseInt(_0x32f253(0x1be))/0x6)+parseInt(_0x32f253(0x1e6))/0x7*(-parseInt(_0x32f253(0x1ad))/0x8)+-parseInt(_0x32f253(0x1c0))/0x9;if(_0x13bada===_0xa90bcb)break;else _0x57ceb0['push'](_0x57ceb0['shift']());}catch(_0x4f0f08){_0x57ceb0['push'](_0x57ceb0['shift']());}}}(a23_0x1863,0x4501d));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';function a23_0x403b(_0x42995c,_0x36d787){_0x42995c=_0x42995c-0x1aa;const _0x18630=a23_0x1863();let _0x403b50=_0x18630[_0x42995c];return _0x403b50;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0xa8cdfe){const _0x2668bc=a23_0x403b,_0x2dfd8a=_0xa8cdfe['split']('.');if(_0x2dfd8a[_0x2668bc(0x1e4)]!==0x3||_0x2dfd8a[0x0]!==_0x2668bc(0x1e9)||_0x2dfd8a[0x2]!==_0x2668bc(0x1e1))return undefined;const _0x3eaf97=_0x2dfd8a[0x1]?.[_0x2668bc(0x1b7)]();return _0x3eaf97?_0x3eaf97:undefined;}function parseAliasDeleteKey(_0x1a1bc5){const _0x5c944d=a23_0x403b,_0x4cc8e5=_0x1a1bc5[_0x5c944d(0x1de)]('.');if(_0x4cc8e5[_0x5c944d(0x1e4)]===0x2&&_0x4cc8e5[0x0]===_0x5c944d(0x1e9)){const _0x17a3a1=_0x4cc8e5[0x1]?.[_0x5c944d(0x1b7)]();return _0x17a3a1?{'alias':_0x17a3a1}:undefined;}if(_0x4cc8e5[_0x5c944d(0x1e4)]===0x3&&_0x4cc8e5[0x0]==='apps'&&_0x4cc8e5[0x2]==='appcode'){const _0x592ad9=_0x4cc8e5[0x1]?.[_0x5c944d(0x1b7)]();return _0x592ad9?{'alias':_0x592ad9,'field':_0x5c944d(0x1e1)}:undefined;}return undefined;}function setLocalAppAlias(_0x50ee6f,_0x56c34f,_0x4aabb6){const _0x518a1b=a23_0x403b,_0x4a8d10=_0x50ee6f[_0x518a1b(0x1e9)]&&typeof _0x50ee6f[_0x518a1b(0x1e9)]===_0x518a1b(0x1d9)&&!Array[_0x518a1b(0x1cc)](_0x50ee6f[_0x518a1b(0x1e9)])?_0x50ee6f['apps']:{},_0x202686=_0x4a8d10[_0x56c34f]&&typeof _0x4a8d10[_0x56c34f]===_0x518a1b(0x1d9)&&!Array['isArray'](_0x4a8d10[_0x56c34f])?_0x4a8d10[_0x56c34f]:{};_0x202686[_0x518a1b(0x1e1)]=_0x4aabb6,_0x4a8d10[_0x56c34f]=_0x202686,_0x50ee6f[_0x518a1b(0x1e9)]=_0x4a8d10;}function deleteLocalAppAlias(_0x2377d3,_0x37483b){const _0x517737=a23_0x403b;if(!_0x2377d3[_0x517737(0x1e9)]||typeof _0x2377d3['apps']!=='object'||Array['isArray'](_0x2377d3[_0x517737(0x1e9)]))return![];const _0x204792=_0x2377d3[_0x517737(0x1e9)],_0x14a963=_0x204792[_0x37483b['alias']];if(!_0x14a963||typeof _0x14a963!==_0x517737(0x1d9)||Array[_0x517737(0x1cc)](_0x14a963))return![];if(!_0x37483b['field'])return delete _0x204792[_0x37483b[_0x517737(0x1dd)]],!![];if(!(_0x37483b['field']in _0x14a963))return![];return delete _0x14a963[_0x37483b[_0x517737(0x1e0)]],Object['keys'](_0x14a963)['length']===0x0&&delete _0x204792[_0x37483b[_0x517737(0x1dd)]],!![];}const listDef={'service':'config','command':a23_0x68ed4a(0x1b4),'description':a23_0x68ed4a(0x1b1),'risk':a23_0x68ed4a(0x1b6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x9a8f76){const _0x8a92f2=a23_0x68ed4a,{buildConfigFromFlags:_0x341b80}=await import(_0x8a92f2(0x1d2)),_0x5a2d02=_0x341b80({}),_0x58e6e4=redactCliConfigCredentials(_0x5a2d02[_0x8a92f2(0x1d1)]),_0x29f9f8=getProjectConfigPath(),_0x3ad45b=resolveWriteConfigPath(_0x8a92f2(0x1e2));if(_0x9a8f76[_0x8a92f2(0x1c4)]===_0x8a92f2(0x1ea))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x8a92f2(0x1b2)](_0x58e6e4,null,0x2)+'\x0a\x0a')+_0x8a92f2(0x1ec)+(_0x8a92f2(0x1ac)+(_0x29f9f8??_0x8a92f2(0x1b5))+'\x0a')+('\x20\x20global:\x20\x20'+_0x3ad45b)};return{'ok':!![],'data':{'effective':_0x58e6e4,'configFiles':{'project':_0x29f9f8??null,'global':_0x3ad45b}}};}},getDef={'service':'config','command':a23_0x68ed4a(0x1c3),'description':a23_0x68ed4a(0x1cf),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x68ed4a(0x1ba),'description':a23_0x68ed4a(0x1b0),'required':!![]}],'flags':[],async 'execute'(_0x1b97c2){const _0x2b1bac=a23_0x68ed4a,_0x4d3b4f=_0x1b97c2[_0x2b1bac(0x1bd)][0x0];if(!_0x4d3b4f)throw CliErrors[_0x2b1bac(0x1c2)](_0x2b1bac(0x1d5),_0x2b1bac(0x1c8)+CLI_BIN_NAME+_0x2b1bac(0x1e8));const {buildConfigFromFlags:_0x418c28}=await import('../../context.js'),{raw:_0x36c236}=_0x418c28({});if(_0x4d3b4f[_0x2b1bac(0x1d6)]('.')){const _0x3c68fa=_0x4d3b4f[_0x2b1bac(0x1de)]('.');let _0x43f126=_0x36c236;for(const _0x5573e9 of _0x3c68fa){if(_0x43f126==null||typeof _0x43f126!==_0x2b1bac(0x1d9))throw CliErrors[_0x2b1bac(0x1c2)](_0x2b1bac(0x1cb)+_0x4d3b4f);_0x43f126=_0x43f126[_0x5573e9];}if(_0x43f126===undefined)throw CliErrors[_0x2b1bac(0x1c2)](_0x2b1bac(0x1cb)+_0x4d3b4f);const _0xcfbf86=redactCliConfigValue(_0x4d3b4f,_0x43f126);return console[_0x2b1bac(0x1da)](typeof _0xcfbf86===_0x2b1bac(0x1d9)?JSON['stringify'](_0xcfbf86,null,0x2):String(_0xcfbf86)),{'ok':!![]};}const _0x3743db=_0x36c236[_0x4d3b4f];if(_0x3743db===undefined)throw CliErrors[_0x2b1bac(0x1c2)](_0x2b1bac(0x1cb)+_0x4d3b4f);const _0x414ea1=redactCliConfigValue(_0x4d3b4f,_0x3743db);return console[_0x2b1bac(0x1da)](typeof _0x414ea1==='object'?JSON[_0x2b1bac(0x1b2)](_0x414ea1,null,0x2):String(_0x414ea1)),{'ok':!![]};}},setDef={'service':a23_0x68ed4a(0x1ca),'command':a23_0x68ed4a(0x1b3),'description':a23_0x68ed4a(0x1c6),'risk':a23_0x68ed4a(0x1e5),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x68ed4a(0x1ba),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x68ed4a(0x1d3),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x5cb1d7){const _0x467118=a23_0x68ed4a,_0x595e2a=_0x5cb1d7[_0x467118(0x1bd)][0x0],_0xd9db07=_0x5cb1d7[_0x467118(0x1bd)][0x1];if(!_0x595e2a||_0xd9db07===undefined)throw CliErrors[_0x467118(0x1c2)]('Missing\x20key\x20or\x20value.',_0x467118(0x1c8)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x595e2a]&&!ENUM_KEYS[_0x595e2a][_0x467118(0x1d6)](_0xd9db07))throw CliErrors[_0x467118(0x1c2)](_0x467118(0x1df)+_0x595e2a+_0x467118(0x1bf)+ENUM_KEYS[_0x595e2a][_0x467118(0x1aa)](',\x20'));if(isCliProtectedConfigKey(_0x595e2a))throw CliErrors[_0x467118(0x1c2)]('\x22'+_0x595e2a+_0x467118(0x1e3));if(_0x595e2a==='pageSize'){const _0x240eb6=Number(_0xd9db07);if(isNaN(_0x240eb6)||_0x240eb6<=0x0)throw CliErrors['validation'](_0x467118(0x1ab));}const _0x55f668=resolveWriteScope({'explicitGlobal':_0x5cb1d7['bool'](_0x467118(0x1e2)),'policy':'project-or-global-explicit'}),_0x147c88=toScopeFlags(_0x55f668),_0x4ab67a=readScopedConfig(_0x147c88),_0x2c485a=parseAliasAppcodeSetKey(_0x595e2a);if(!_0x2c485a&&!isTopLevelConfigKey(_0x595e2a))throw CliErrors[_0x467118(0x1c2)](_0x467118(0x1ee)+_0x595e2a+_0x467118(0x1af),_0x467118(0x1c9)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x2c485a)setLocalAppAlias(_0x4ab67a,_0x2c485a,_0xd9db07);else{if(_0x595e2a===_0x467118(0x1dc)){const _0x526fe1=normalizeLocale(_0xd9db07);if(!_0x526fe1)throw CliErrors[_0x467118(0x1c2)](_0x467118(0x1cd),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x4ab67a[_0x467118(0x1dc)]=_0x526fe1;}else _0x4ab67a[_0x595e2a]=_0x595e2a===_0x467118(0x1c5)?Number(_0xd9db07):DOMAIN_CONFIG_FIELDS['includes'](_0x595e2a)?normalizeDomainOrigin(_0x595e2a,_0xd9db07):_0xd9db07;}const _0x96d03f=_0x595e2a===_0x467118(0x1bc)?maskCliAccessKey(_0xd9db07):!_0x2c485a&&_0x595e2a===_0x467118(0x1dc)?String(_0x4ab67a[_0x467118(0x1dc)]):_0xd9db07;return console[_0x467118(0x1da)](_0x467118(0x1ed)+_0x595e2a+_0x467118(0x1bb)+_0x96d03f+'\x22'+(_0x55f668===_0x467118(0x1e2)?_0x467118(0x1db):'')),writeScopedConfig(_0x4ab67a,_0x147c88),{'ok':!![]};}},deleteDef={'service':a23_0x68ed4a(0x1ca),'command':a23_0x68ed4a(0x1e7),'description':a23_0x68ed4a(0x1c1),'risk':'write','confirmationDescription':a23_0x68ed4a(0x1d4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x26a7db){const _0xeeaae7=a23_0x68ed4a,_0x5ddb2a=_0x26a7db[_0xeeaae7(0x1bd)][0x0];if(!_0x5ddb2a)throw CliErrors[_0xeeaae7(0x1c2)](_0xeeaae7(0x1d5),'Usage:\x20'+CLI_BIN_NAME+_0xeeaae7(0x1eb));if(isCliProtectedConfigKey(_0x5ddb2a))throw CliErrors['validation']('\x22'+_0x5ddb2a+_0xeeaae7(0x1e3));const _0x592e37=resolveWriteScope({'explicitGlobal':_0x26a7db['bool'](_0xeeaae7(0x1e2)),'policy':_0xeeaae7(0x1d8)}),_0x237826=toScopeFlags(_0x592e37),_0x3b06fb=readScopedConfig(_0x237826),_0x2f0513=parseAliasDeleteKey(_0x5ddb2a);if(_0x2f0513){if(!deleteLocalAppAlias(_0x3b06fb,_0x2f0513))return console[_0xeeaae7(0x1da)](_0xeeaae7(0x1b9)+_0x5ddb2a+(_0x592e37===_0xeeaae7(0x1e2)?_0xeeaae7(0x1db):'')),{'ok':!![],'data':{'key':_0x5ddb2a,'scope':_0x592e37,'changed':![]}};return console[_0xeeaae7(0x1da)](_0xeeaae7(0x1ce)+_0x5ddb2a+'`'+(_0x592e37==='global'?_0xeeaae7(0x1db):'')),writeScopedConfig(_0x3b06fb,_0x237826),{'ok':!![],'data':{'key':_0x5ddb2a,'scope':_0x592e37,'changed':!![]}};}if(_0x3b06fb[_0x5ddb2a]===undefined)return console[_0xeeaae7(0x1da)](_0xeeaae7(0x1b9)+_0x5ddb2a+(_0x592e37===_0xeeaae7(0x1e2)?_0xeeaae7(0x1db):'')),{'ok':!![],'data':{'key':_0x5ddb2a,'scope':_0x592e37,'changed':![]}};return delete _0x3b06fb[_0x5ddb2a],console['log'](_0xeeaae7(0x1ce)+_0x5ddb2a+'`'+(_0x592e37===_0xeeaae7(0x1e2)?_0xeeaae7(0x1db):'')),writeScopedConfig(_0x3b06fb,_0x237826),{'ok':!![],'data':{'key':_0x5ddb2a,'scope':_0x592e37,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
1
+ const a23_0x180c44=a23_0x1064;(function(_0x3dc4c5,_0x1019e4){const _0x2be692=a23_0x1064,_0x345df1=_0x3dc4c5();while(!![]){try{const _0x4ad788=parseInt(_0x2be692(0x19c))/0x1*(-parseInt(_0x2be692(0x195))/0x2)+-parseInt(_0x2be692(0x184))/0x3+-parseInt(_0x2be692(0x18a))/0x4*(-parseInt(_0x2be692(0x191))/0x5)+parseInt(_0x2be692(0x199))/0x6+-parseInt(_0x2be692(0x197))/0x7*(-parseInt(_0x2be692(0x17c))/0x8)+parseInt(_0x2be692(0x175))/0x9*(-parseInt(_0x2be692(0x17f))/0xa)+-parseInt(_0x2be692(0x171))/0xb*(-parseInt(_0x2be692(0x180))/0xc);if(_0x4ad788===_0x1019e4)break;else _0x345df1['push'](_0x345df1['shift']());}catch(_0x4dea88){_0x345df1['push'](_0x345df1['shift']());}}}(a23_0x45d2,0x3f046));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x282573){const _0x505c9e=a23_0x1064,_0x2fcdd4=_0x282573['split']('.');if(_0x2fcdd4['length']!==0x3||_0x2fcdd4[0x0]!==_0x505c9e(0x16d)||_0x2fcdd4[0x2]!==_0x505c9e(0x16a))return undefined;const _0xa844d5=_0x2fcdd4[0x1]?.[_0x505c9e(0x19f)]();return _0xa844d5?_0xa844d5:undefined;}function parseAliasDeleteKey(_0x157f81){const _0x37fe91=a23_0x1064,_0x359bfb=_0x157f81[_0x37fe91(0x162)]('.');if(_0x359bfb[_0x37fe91(0x181)]===0x2&&_0x359bfb[0x0]===_0x37fe91(0x16d)){const _0x45aed4=_0x359bfb[0x1]?.[_0x37fe91(0x19f)]();return _0x45aed4?{'alias':_0x45aed4}:undefined;}if(_0x359bfb[_0x37fe91(0x181)]===0x3&&_0x359bfb[0x0]===_0x37fe91(0x16d)&&_0x359bfb[0x2]===_0x37fe91(0x16a)){const _0x2d9319=_0x359bfb[0x1]?.[_0x37fe91(0x19f)]();return _0x2d9319?{'alias':_0x2d9319,'field':'appcode'}:undefined;}return undefined;}function a23_0x45d2(){const _0x325727=['215793TRRUDv','field','Set\x20a\x20configuration\x20value','Key\x20not\x20found:\x20','../../context.js','Invalid\x20value\x20for\x20\x22','\x20(global)','8rkGRYR','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','\x22\x20is\x20not\x20settable.','190NDoLVD','372eZdswb','length','bool',';\x20apps.<alias>.appcode','1198959FPdgJa','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Top-level\x20key\x20\x22','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','accessKey','isArray','16uYBOLP','alias','stringify','Key\x20already\x20absent:\x20','global','\x20\x20project:\x20','pageSize','292310yxwpPv','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20config\x20get\x20<key>','Get\x20a\x20config\x20value','34726iInSHc','List\x20current\x20config','2361464ZNNQTK','read','1588098IwXQtD','validation','Usage:\x20','10KEZOKt','value','raw','trim','Config\x20files:\x0a','\x22.\x20Allowed:\x20','\x20\x20global:\x20\x20','project-or-global-explicit','set','Deleted\x20`','`\x20=\x20\x22','split','args','key','write','includes','list','\x20config\x20delete\x20<key>\x20[--global]','config','appcode','Missing\x20key\x20or\x20value.','get','apps','object','log','format','160061EBLzQZ','Value\x20to\x20assign','locale','join'];a23_0x45d2=function(){return _0x325727;};return a23_0x45d2();}function setLocalAppAlias(_0x1bc28b,_0x610cdb,_0x17d240){const _0x49aae3=a23_0x1064,_0x36ed2d=_0x1bc28b['apps']&&typeof _0x1bc28b[_0x49aae3(0x16d)]===_0x49aae3(0x16e)&&!Array['isArray'](_0x1bc28b[_0x49aae3(0x16d)])?_0x1bc28b[_0x49aae3(0x16d)]:{},_0x3165a5=_0x36ed2d[_0x610cdb]&&typeof _0x36ed2d[_0x610cdb]==='object'&&!Array['isArray'](_0x36ed2d[_0x610cdb])?_0x36ed2d[_0x610cdb]:{};_0x3165a5[_0x49aae3(0x16a)]=_0x17d240,_0x36ed2d[_0x610cdb]=_0x3165a5,_0x1bc28b[_0x49aae3(0x16d)]=_0x36ed2d;}function a23_0x1064(_0x3c8136,_0x424b46){_0x3c8136=_0x3c8136-0x162;const _0x45d239=a23_0x45d2();let _0x106417=_0x45d239[_0x3c8136];return _0x106417;}function deleteLocalAppAlias(_0x3656f5,_0x3d87c6){const _0x58bd2e=a23_0x1064;if(!_0x3656f5[_0x58bd2e(0x16d)]||typeof _0x3656f5[_0x58bd2e(0x16d)]!==_0x58bd2e(0x16e)||Array['isArray'](_0x3656f5[_0x58bd2e(0x16d)]))return![];const _0x553e8d=_0x3656f5[_0x58bd2e(0x16d)],_0x6774f4=_0x553e8d[_0x3d87c6[_0x58bd2e(0x18b)]];if(!_0x6774f4||typeof _0x6774f4!=='object'||Array[_0x58bd2e(0x189)](_0x6774f4))return![];if(!_0x3d87c6[_0x58bd2e(0x176)])return delete _0x553e8d[_0x3d87c6[_0x58bd2e(0x18b)]],!![];if(!(_0x3d87c6[_0x58bd2e(0x176)]in _0x6774f4))return![];return delete _0x6774f4[_0x3d87c6[_0x58bd2e(0x176)]],Object['keys'](_0x6774f4)[_0x58bd2e(0x181)]===0x0&&delete _0x553e8d[_0x3d87c6[_0x58bd2e(0x18b)]],!![];}const listDef={'service':a23_0x180c44(0x169),'command':a23_0x180c44(0x167),'description':a23_0x180c44(0x196),'risk':a23_0x180c44(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4bc28d){const _0x88f5f7=a23_0x180c44,{buildConfigFromFlags:_0x22c012}=await import(_0x88f5f7(0x179)),_0x3e3669=_0x22c012({}),_0xf8ab21=redactCliConfigCredentials(_0x3e3669[_0x88f5f7(0x19e)]),_0x423248=getProjectConfigPath(),_0x55c7d1=resolveWriteConfigPath(_0x88f5f7(0x18e));if(_0x4bc28d[_0x88f5f7(0x170)]==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x88f5f7(0x18c)](_0xf8ab21,null,0x2)+'\x0a\x0a')+_0x88f5f7(0x1a0)+(_0x88f5f7(0x18f)+(_0x423248??'(none)')+'\x0a')+(_0x88f5f7(0x1a2)+_0x55c7d1)};return{'ok':!![],'data':{'effective':_0xf8ab21,'configFiles':{'project':_0x423248??null,'global':_0x55c7d1}}};}},getDef={'service':'config','command':a23_0x180c44(0x16c),'description':a23_0x180c44(0x194),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x180c44(0x164),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x33f54a){const _0x32e392=a23_0x180c44,_0x166604=_0x33f54a[_0x32e392(0x163)][0x0];if(!_0x166604)throw CliErrors[_0x32e392(0x19a)]('Missing\x20key\x20argument.',_0x32e392(0x19b)+CLI_BIN_NAME+_0x32e392(0x193));const {buildConfigFromFlags:_0x2c3e23}=await import(_0x32e392(0x179)),{raw:_0x4af48b}=_0x2c3e23({});if(_0x166604[_0x32e392(0x166)]('.')){const _0x29ca42=_0x166604['split']('.');let _0x373905=_0x4af48b;for(const _0x46108d of _0x29ca42){if(_0x373905==null||typeof _0x373905!==_0x32e392(0x16e))throw CliErrors[_0x32e392(0x19a)](_0x32e392(0x178)+_0x166604);_0x373905=_0x373905[_0x46108d];}if(_0x373905===undefined)throw CliErrors[_0x32e392(0x19a)]('Key\x20not\x20found:\x20'+_0x166604);const _0x220bc8=redactCliConfigValue(_0x166604,_0x373905);return console[_0x32e392(0x16f)](typeof _0x220bc8===_0x32e392(0x16e)?JSON['stringify'](_0x220bc8,null,0x2):String(_0x220bc8)),{'ok':!![]};}const _0x433498=_0x4af48b[_0x166604];if(_0x433498===undefined)throw CliErrors['validation'](_0x32e392(0x178)+_0x166604);const _0x265ab0=redactCliConfigValue(_0x166604,_0x433498);return console[_0x32e392(0x16f)](typeof _0x265ab0===_0x32e392(0x16e)?JSON['stringify'](_0x265ab0,null,0x2):String(_0x265ab0)),{'ok':!![]};}},setDef={'service':a23_0x180c44(0x169),'command':a23_0x180c44(0x1a4),'description':a23_0x180c44(0x177),'risk':a23_0x180c44(0x165),'confirmationDescription':a23_0x180c44(0x187),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x180c44(0x19d),'description':a23_0x180c44(0x172),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x302c66){const _0x15da98=a23_0x180c44,_0x15a160=_0x302c66[_0x15da98(0x163)][0x0],_0x36d7ac=_0x302c66['args'][0x1];if(!_0x15a160||_0x36d7ac===undefined)throw CliErrors['validation'](_0x15da98(0x16b),_0x15da98(0x19b)+CLI_BIN_NAME+_0x15da98(0x192));if(ENUM_KEYS[_0x15a160]&&!ENUM_KEYS[_0x15a160][_0x15da98(0x166)](_0x36d7ac))throw CliErrors['validation'](_0x15da98(0x17a)+_0x15a160+_0x15da98(0x1a1)+ENUM_KEYS[_0x15a160][_0x15da98(0x174)](',\x20'));if(isCliProtectedConfigKey(_0x15a160))throw CliErrors['validation']('\x22'+_0x15a160+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x15a160===_0x15da98(0x190)){const _0x2019b4=Number(_0x36d7ac);if(isNaN(_0x2019b4)||_0x2019b4<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x310db2=resolveWriteScope({'explicitGlobal':_0x302c66[_0x15da98(0x182)](_0x15da98(0x18e)),'policy':_0x15da98(0x1a3)}),_0x3b9dd2=toScopeFlags(_0x310db2),_0x1102b2=readScopedConfig(_0x3b9dd2),_0x456741=parseAliasAppcodeSetKey(_0x15a160);if(!_0x456741&&!isTopLevelConfigKey(_0x15a160))throw CliErrors[_0x15da98(0x19a)](_0x15da98(0x186)+_0x15a160+_0x15da98(0x17e),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x15da98(0x183));if(_0x456741)setLocalAppAlias(_0x1102b2,_0x456741,_0x36d7ac);else{if(_0x15a160==='locale'){const _0x5ee30f=normalizeLocale(_0x36d7ac);if(!_0x5ee30f)throw CliErrors[_0x15da98(0x19a)]('Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x1102b2[_0x15da98(0x173)]=_0x5ee30f;}else _0x1102b2[_0x15a160]=_0x15a160===_0x15da98(0x190)?Number(_0x36d7ac):DOMAIN_CONFIG_FIELDS[_0x15da98(0x166)](_0x15a160)?normalizeDomainOrigin(_0x15a160,_0x36d7ac):_0x36d7ac;}const _0x1ff151=_0x15a160===_0x15da98(0x188)?maskCliAccessKey(_0x36d7ac):!_0x456741&&_0x15a160===_0x15da98(0x173)?String(_0x1102b2['locale']):_0x36d7ac;return console[_0x15da98(0x16f)]('Set\x20`'+_0x15a160+_0x15da98(0x1a6)+_0x1ff151+'\x22'+(_0x310db2===_0x15da98(0x18e)?_0x15da98(0x17b):'')),writeScopedConfig(_0x1102b2,_0x3b9dd2),{'ok':!![]};}},deleteDef={'service':a23_0x180c44(0x169),'command':'delete','description':'Delete\x20a\x20configuration\x20value','risk':'write','confirmationDescription':a23_0x180c44(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x6053a7){const _0x1e826e=a23_0x180c44,_0x231dda=_0x6053a7[_0x1e826e(0x163)][0x0];if(!_0x231dda)throw CliErrors[_0x1e826e(0x19a)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1e826e(0x168));if(isCliProtectedConfigKey(_0x231dda))throw CliErrors[_0x1e826e(0x19a)]('\x22'+_0x231dda+_0x1e826e(0x17d));const _0x357935=resolveWriteScope({'explicitGlobal':_0x6053a7[_0x1e826e(0x182)](_0x1e826e(0x18e)),'policy':'project-or-global-explicit'}),_0x47c283=toScopeFlags(_0x357935),_0x9d97c9=readScopedConfig(_0x47c283),_0x1d2227=parseAliasDeleteKey(_0x231dda);if(_0x1d2227){if(!deleteLocalAppAlias(_0x9d97c9,_0x1d2227))return console['log'](_0x1e826e(0x18d)+_0x231dda+(_0x357935===_0x1e826e(0x18e)?_0x1e826e(0x17b):'')),{'ok':!![],'data':{'key':_0x231dda,'scope':_0x357935,'changed':![]}};return console['log']('Deleted\x20`'+_0x231dda+'`'+(_0x357935==='global'?_0x1e826e(0x17b):'')),writeScopedConfig(_0x9d97c9,_0x47c283),{'ok':!![],'data':{'key':_0x231dda,'scope':_0x357935,'changed':!![]}};}if(_0x9d97c9[_0x231dda]===undefined)return console[_0x1e826e(0x16f)](_0x1e826e(0x18d)+_0x231dda+(_0x357935===_0x1e826e(0x18e)?_0x1e826e(0x17b):'')),{'ok':!![],'data':{'key':_0x231dda,'scope':_0x357935,'changed':![]}};return delete _0x9d97c9[_0x231dda],console[_0x1e826e(0x16f)](_0x1e826e(0x1a5)+_0x231dda+'`'+(_0x357935===_0x1e826e(0x18e)?'\x20(global)':'')),writeScopedConfig(_0x9d97c9,_0x47c283),{'ok':!![],'data':{'key':_0x231dda,'scope':_0x357935,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- const a24_0x57da43=a24_0x24a2;(function(_0x3f726b,_0x188a7f){const _0x5d80a7=a24_0x24a2,_0x8b8b42=_0x3f726b();while(!![]){try{const _0x345207=-parseInt(_0x5d80a7(0x84))/0x1+parseInt(_0x5d80a7(0x81))/0x2+-parseInt(_0x5d80a7(0x7a))/0x3*(parseInt(_0x5d80a7(0x72))/0x4)+-parseInt(_0x5d80a7(0x73))/0x5*(-parseInt(_0x5d80a7(0x83))/0x6)+parseInt(_0x5d80a7(0x6c))/0x7*(-parseInt(_0x5d80a7(0x78))/0x8)+parseInt(_0x5d80a7(0x8a))/0x9+parseInt(_0x5d80a7(0x74))/0xa*(-parseInt(_0x5d80a7(0x6d))/0xb);if(_0x345207===_0x188a7f)break;else _0x8b8b42['push'](_0x8b8b42['shift']());}catch(_0x3b2f0b){_0x8b8b42['push'](_0x8b8b42['shift']());}}}(a24_0x5f3d,0x8d51b));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':a24_0x57da43(0x86),'description':a24_0x57da43(0x88)},{'name':a24_0x57da43(0x7f),'type':a24_0x57da43(0x86),'description':a24_0x57da43(0x75)},{'name':a24_0x57da43(0x66),'type':a24_0x57da43(0x86),'description':a24_0x57da43(0x82)},{'name':a24_0x57da43(0x6b),'type':a24_0x57da43(0x86),'description':a24_0x57da43(0x7b)},{'name':a24_0x57da43(0x8b),'type':a24_0x57da43(0x86),'description':a24_0x57da43(0x89)},{'name':a24_0x57da43(0x65),'type':'string','description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'}];export const configInitFlags=[{'name':a24_0x57da43(0x90),'type':a24_0x57da43(0x86),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a24_0x57da43(0x7c)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0xceab2f){const _0x1f6952=a24_0x57da43,_0xe95e49=_0xceab2f['str'](_0x1f6952(0x90));if(_0xe95e49){if(!isEnabledLovrabetRegion(_0xe95e49))throw CliErrors[_0x1f6952(0x8e)](_0x1f6952(0x70)+_0xe95e49+_0x1f6952(0x7e),_0x1f6952(0x68)+ENABLED_LOVRABET_REGION_VALUES[_0x1f6952(0x7c)](',\x20'));return _0xe95e49;}if(_0xceab2f[_0x1f6952(0x91)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x1f6952(0x85)](_0x10230b=>({'name':OFFICIAL_ROUTING_PROFILES[_0x10230b]['label']+'\x20('+_0x10230b+')','value':_0x10230b}))});}catch(_0x8a42f1){if(_0x8a42f1?.['name']==='ExitPromptError')throw CliErrors[_0x1f6952(0x8c)]();throw _0x8a42f1;}}export async function executeConfigInit(_0x54fa6b){const _0x56eb57=a24_0x57da43,_0x22ad76=resolveDomainConfigInput(_0x54fa6b),_0x2110ed=_0x22ad76[_0x56eb57(0x76)],_0x7bf1d5=Object[_0x56eb57(0x6a)](_0x2110ed)[_0x56eb57(0x80)]>0x0;if(_0x7bf1d5&&_0x54fa6b['str'](_0x56eb57(0x90)))throw CliErrors[_0x56eb57(0x8e)](_0x56eb57(0x6e));const _0x3cf192={'global':!![]},_0x4eeaa7=readScopedConfig(_0x3cf192);for(const _0x4f23a3 of DOMAIN_CONFIG_FIELDS)delete _0x4eeaa7[_0x4f23a3];for(const _0x1fd23c of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4eeaa7[_0x1fd23c];delete _0x4eeaa7[_0x56eb57(0x67)];let _0x5bc3c1=null;if(_0x7bf1d5)delete _0x4eeaa7[_0x56eb57(0x90)],_0x22ad76['mode']==='enterprise-v1'?_0x4eeaa7[_0x56eb57(0x67)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x22ad76[_0x56eb57(0x6f)]}:Object['assign'](_0x4eeaa7,_0x2110ed);else{_0x5bc3c1=await resolveRegion(_0x54fa6b);if(_0x5bc3c1===DEFAULT_LOVRABET_REGION)delete _0x4eeaa7[_0x56eb57(0x90)];else _0x4eeaa7[_0x56eb57(0x90)]=_0x5bc3c1;}return writeScopedConfig(_0x4eeaa7,_0x3cf192),{'ok':!![],'message':_0x7bf1d5?_0x56eb57(0x7d)+Object[_0x56eb57(0x6a)](_0x22ad76[_0x56eb57(0x71)]===_0x56eb57(0x87)?_0x22ad76[_0x56eb57(0x6f)]:_0x2110ed)[_0x56eb57(0x7c)](',\x20')+'.':'Lovrabet\x20connection\x20configured\x20for\x20region:\x20'+_0x5bc3c1+'.','data':{'mode':_0x7bf1d5?_0x56eb57(0x77):_0x56eb57(0x8d),'protocol':_0x22ad76['mode']==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5bc3c1,'domains':_0x2110ed}};}function a24_0x24a2(_0x5a501c,_0x3e025e){_0x5a501c=_0x5a501c-0x65;const _0x5f3d5c=a24_0x5f3d();let _0x24a2ab=_0x5f3d5c[_0x5a501c];return _0x24a2ab;}function a24_0x5f3d(){const _0x448d9c=['enterprise-v1','Independent-deployment\x20Domain\x20JSON\x20file','Custom\x20SkillHub\x20HTTPS\x20origin','8478846jUwOey','skill-domain','cancelled','official','validation','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','region','nonInteractive','kb-service-domain','api-domain','routing','Available\x20regions:\x20','config','keys','runtime-domain','126TajcuW','24893CZExfu','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','manifestDomains','Region\x20\x22','mode','21384qYTPgZ','45XcOoJX','2170ESoaAp','Custom\x20User\x20HTTPS\x20origin','domains','independent','170784JZeksT','init','162BUuGXd','Custom\x20Runtime\x20HTTPS\x20origin','join','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','\x22\x20is\x20not\x20currently\x20available.','user-domain','length','1544596WMQQhP','Custom\x20platform\x20API\x20HTTPS\x20origin','344616qQLHls','488454sRpoPH','map','string'];a24_0x5f3d=function(){return _0x448d9c;};return a24_0x5f3d();}export const configInitDefinition={'service':a24_0x57da43(0x69),'command':a24_0x57da43(0x79),'description':a24_0x57da43(0x8f),'risk':'write','confirmationDescription':'Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
1
+ const a24_0x20d2f3=a24_0x36ee;function a24_0x36ee(_0x38af14,_0x10d1d4){_0x38af14=_0x38af14-0x6d;const _0x4b85be=a24_0x4b85();let _0x36ee15=_0x4b85be[_0x38af14];return _0x36ee15;}(function(_0x3f76ec,_0x4ea7a4){const _0x1ace10=a24_0x36ee,_0x5ddd63=_0x3f76ec();while(!![]){try{const _0x96969=parseInt(_0x1ace10(0x79))/0x1*(parseInt(_0x1ace10(0x90))/0x2)+-parseInt(_0x1ace10(0x74))/0x3+-parseInt(_0x1ace10(0x7f))/0x4+parseInt(_0x1ace10(0x76))/0x5+-parseInt(_0x1ace10(0x7d))/0x6+-parseInt(_0x1ace10(0x70))/0x7*(parseInt(_0x1ace10(0x88))/0x8)+parseInt(_0x1ace10(0x75))/0x9;if(_0x96969===_0x4ea7a4)break;else _0x5ddd63['push'](_0x5ddd63['shift']());}catch(_0x1759c0){_0x5ddd63['push'](_0x5ddd63['shift']());}}}(a24_0x4b85,0x23a05));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a24_0x4b85(){const _0x234623=['routing','Available\x20regions:\x20','name','region','Custom\x20User\x20HTTPS\x20origin','782FIOKMi','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','domain-config','Region\x20\x22','length','write','map','domains','mode','Independent-deployment\x20Domain\x20JSON\x20file','user-domain','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','skill-domain','config','301pIAaVX','ExitPromptError','string','Custom\x20platform\x20API\x20HTTPS\x20origin','15996HFXqxJ','3508830EoRKBj','834100JLGrZN','join','keys','331mdjYkE','api-domain','manifestDomains','runtime-domain','802302AcWgMv','Custom\x20SkillHub\x20HTTPS\x20origin','547264lcsVbv','str','Official\x20Lovrabet\x20region:\x20','nonInteractive','label','kb-service-domain','init','enterprise-v1','validation','49176ltYTbt','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','official'];a24_0x4b85=function(){return _0x234623;};return a24_0x4b85();}import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x20d2f3(0x92),'type':a24_0x20d2f3(0x72),'description':a24_0x20d2f3(0x99)},{'name':a24_0x20d2f3(0x9a),'type':a24_0x20d2f3(0x72),'description':a24_0x20d2f3(0x8f)},{'name':a24_0x20d2f3(0x7a),'type':a24_0x20d2f3(0x72),'description':a24_0x20d2f3(0x73)},{'name':a24_0x20d2f3(0x7c),'type':a24_0x20d2f3(0x72),'description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a24_0x20d2f3(0x6e),'type':'string','description':a24_0x20d2f3(0x7e)},{'name':a24_0x20d2f3(0x84),'type':a24_0x20d2f3(0x72),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'}];export const configInitFlags=[{'name':a24_0x20d2f3(0x8e),'type':a24_0x20d2f3(0x72),'description':a24_0x20d2f3(0x81)+ENABLED_LOVRABET_REGION_VALUES[a24_0x20d2f3(0x77)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x1ad59){const _0x6dfa82=a24_0x20d2f3,_0x1f2adf=_0x1ad59['str'](_0x6dfa82(0x8e));if(_0x1f2adf){if(!isEnabledLovrabetRegion(_0x1f2adf))throw CliErrors['validation'](_0x6dfa82(0x93)+_0x1f2adf+'\x22\x20is\x20not\x20currently\x20available.',_0x6dfa82(0x8c)+ENABLED_LOVRABET_REGION_VALUES[_0x6dfa82(0x77)](',\x20'));return _0x1f2adf;}if(_0x1ad59[_0x6dfa82(0x82)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x6dfa82(0x96)](_0x27bdba=>({'name':OFFICIAL_ROUTING_PROFILES[_0x27bdba][_0x6dfa82(0x83)]+'\x20('+_0x27bdba+')','value':_0x27bdba}))});}catch(_0x33927b){if(_0x33927b?.[_0x6dfa82(0x8d)]===_0x6dfa82(0x71))throw CliErrors['cancelled']();throw _0x33927b;}}export async function executeConfigInit(_0x4a1e3a){const _0xd0ea8f=a24_0x20d2f3,_0x12308a=resolveDomainConfigInput(_0x4a1e3a),_0x3abf12=_0x12308a[_0xd0ea8f(0x97)],_0x63c697=Object[_0xd0ea8f(0x78)](_0x3abf12)[_0xd0ea8f(0x94)]>0x0;if(_0x63c697&&_0x4a1e3a[_0xd0ea8f(0x80)]('region'))throw CliErrors[_0xd0ea8f(0x87)](_0xd0ea8f(0x89));const _0x4ae07c={'global':!![]},_0x2d9707=readScopedConfig(_0x4ae07c);for(const _0x4b5251 of DOMAIN_CONFIG_FIELDS)delete _0x2d9707[_0x4b5251];for(const _0x3c59ff of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x2d9707[_0x3c59ff];delete _0x2d9707[_0xd0ea8f(0x8b)];let _0x5afd8a=null;if(_0x63c697)delete _0x2d9707[_0xd0ea8f(0x8e)],_0x12308a[_0xd0ea8f(0x98)]==='enterprise-v1'?_0x2d9707['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x12308a[_0xd0ea8f(0x7b)]}:Object['assign'](_0x2d9707,_0x3abf12);else{_0x5afd8a=await resolveRegion(_0x4a1e3a);if(_0x5afd8a===DEFAULT_LOVRABET_REGION)delete _0x2d9707['region'];else _0x2d9707[_0xd0ea8f(0x8e)]=_0x5afd8a;}return writeScopedConfig(_0x2d9707,_0x4ae07c),{'ok':!![],'message':_0x63c697?_0xd0ea8f(0x91)+Object[_0xd0ea8f(0x78)](_0x12308a[_0xd0ea8f(0x98)]===_0xd0ea8f(0x86)?_0x12308a[_0xd0ea8f(0x7b)]:_0x3abf12)[_0xd0ea8f(0x77)](',\x20')+'.':'Lovrabet\x20connection\x20configured\x20for\x20region:\x20'+_0x5afd8a+'.','data':{'mode':_0x63c697?'independent':_0xd0ea8f(0x8a),'protocol':_0x12308a['mode']==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5afd8a,'domains':_0x3abf12}};}export const configInitDefinition={'service':a24_0x20d2f3(0x6f),'command':a24_0x20d2f3(0x85),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a24_0x20d2f3(0x95),'confirmationDescription':a24_0x20d2f3(0x6d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
@@ -1 +1 @@
1
- function a25_0x1f08(_0x54f881,_0x86ccdc){_0x54f881=_0x54f881-0x76;var _0x119b90=a25_0x119b();var _0x1f08d4=_0x119b90[_0x54f881];return _0x1f08d4;}(function(_0x40fb30,_0x55b0d6){var _0x4b4ce8=a25_0x1f08,_0xa96e73=_0x40fb30();while(!![]){try{var _0x1b9670=-parseInt(_0x4b4ce8(0x7d))/0x1+-parseInt(_0x4b4ce8(0x7a))/0x2+-parseInt(_0x4b4ce8(0x78))/0x3*(-parseInt(_0x4b4ce8(0x77))/0x4)+parseInt(_0x4b4ce8(0x79))/0x5+-parseInt(_0x4b4ce8(0x76))/0x6+parseInt(_0x4b4ce8(0x7e))/0x7+-parseInt(_0x4b4ce8(0x7b))/0x8*(-parseInt(_0x4b4ce8(0x7c))/0x9);if(_0x1b9670===_0x55b0d6)break;else _0xa96e73['push'](_0xa96e73['shift']());}catch(_0x1d2938){_0xa96e73['push'](_0xa96e73['shift']());}}}(a25_0x119b,0x5c194));function a25_0x119b(){var _0x5b1429=['204984ohlhrx','127772jgZAfK','12JTVORn','1903840JIhixW','1487810FkBVsF','24wJJxwd','1479375hXIxPd','239239UYOupx','2750153UGKVWl'];a25_0x119b=function(){return _0x5b1429;};return a25_0x119b();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
1
+ (function(_0x2ffb71,_0x40f206){var _0x58be29=a25_0x392b,_0x2b60d4=_0x2ffb71();while(!![]){try{var _0x59f16b=parseInt(_0x58be29(0x19b))/0x1*(-parseInt(_0x58be29(0x19d))/0x2)+parseInt(_0x58be29(0x1a1))/0x3+parseInt(_0x58be29(0x19e))/0x4*(parseInt(_0x58be29(0x1a0))/0x5)+-parseInt(_0x58be29(0x19f))/0x6+parseInt(_0x58be29(0x1a2))/0x7+-parseInt(_0x58be29(0x19a))/0x8+parseInt(_0x58be29(0x19c))/0x9;if(_0x59f16b===_0x40f206)break;else _0x2b60d4['push'](_0x2b60d4['shift']());}catch(_0x5f58af){_0x2b60d4['push'](_0x2b60d4['shift']());}}}(a25_0x2e09,0x85583));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';function a25_0x392b(_0x162de6,_0xa42538){_0x162de6=_0x162de6-0x19a;var _0x2e091b=a25_0x2e09();var _0x392b3a=_0x2e091b[_0x162de6];return _0x392b3a;}function a25_0x2e09(){var _0x18d06d=['4KypFJi','134268HFFkOb','1800125BQERlq','912195HfPSso','405874bMyuko','5822392LRJNdn','202VlcujG','10989792HLCooi','6404ttJDBG'];a25_0x2e09=function(){return _0x18d06d;};return a25_0x2e09();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const dataImportExcel: CommandDefinition;
@@ -0,0 +1 @@
1
+ function a26_0x1135(){const _0x372912=['maxBatchSize','number','313014LHLTAb','utf8','object','size','checkpoint','1-based\x20Excel\x20header\x20row','all','appCode','2991456InGYOc','str','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','mappingFile','string','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','.import-checkpoint.json','--file\x20and\x20--mapping\x20are\x20required.','/import-batch','succeeded','parse','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','isArray','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','invalid','errors','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','METADATA','/client/','emptyRows','isInteger','message','schemaFingerprint','validation','191278CYbljl','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','schemaVersion','See\x20','mapping','map','.\x20Validate\x20fields\x20and\x20confirmed\x20unique\x20business\x20keys,\x20convert\x20Excel\x20rows\x20to\x20JSON,\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20limits.\x20Preview\x20one\x20batch\x20with\x20lovrabet\x20data\x20batchCreate\x20--appcode\x20','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','some','2291240wFiURc','DB_TABLE','header-row','POST','803496vxUCVE','rows','sheet','write','batchSize','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','num','values','resume','30450EtFAyB','file','report','Maximum\x20records\x20per\x20request\x20(1..500)','105qIQXyI','rowNumber','\x20--code\x20','756159QQsDkz','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','\x20--params\x20\x27<JSON\x20array>\x27\x20--dry-run\x20using\x20the\x20target\x20app\x27s\x20User\x20AK\x20and\x20runtime\x20permissions.\x20Dry-run\x20only\x20previews\x20the\x20request;\x20verify\x20written\x20rows\x20before\x20advancing\x20and\x20reconcile\x20unknown\x20outcomes\x20before\x20retrying.\x20This\x20DB_TABLE\x20route\x20does\x20not\x20support\x20import\x20checkpoints\x20or\x20--resume.\x20See\x20references/lovrabet-db-table-excel-import.md\x20in\x20the\x20built-in\x20Skill.\x20No\x20import\x20request\x20was\x20sent.','toString','length','warnings','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','boolean','Imported\x20and\x20verified\x20','\x20records.','16poQTLQ'];a26_0x1135=function(){return _0x372912;};return a26_0x1135();}const a26_0x40d4b7=a26_0x8f54;(function(_0x41c999,_0x61e77f){const _0x4ef2ce=a26_0x8f54,_0x50f324=_0x41c999();while(!![]){try{const _0x1409a9=-parseInt(_0x4ef2ce(0x139))/0x1+-parseInt(_0x4ef2ce(0x15a))/0x2+parseInt(_0x4ef2ce(0x178))/0x3+parseInt(_0x4ef2ce(0x168))/0x4+parseInt(_0x4ef2ce(0x175))/0x5*(-parseInt(_0x4ef2ce(0x171))/0x6)+-parseInt(_0x4ef2ce(0x164))/0x7+parseInt(_0x4ef2ce(0x136))/0x8*(parseInt(_0x4ef2ce(0x141))/0x9);if(_0x1409a9===_0x61e77f)break;else _0x50f324['push'](_0x50f324['shift']());}catch(_0x2d6e4a){_0x50f324['push'](_0x50f324['shift']());}}}(a26_0x1135,0x432cb));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';function a26_0x8f54(_0x581d11,_0x5b6092){_0x581d11=_0x581d11-0x130;const _0x113510=a26_0x1135();let _0x8f543=_0x113510[_0x581d11];return _0x8f543;}import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x2a5fe3){const _0x482575=a26_0x8f54,_0x374257=_0x2a5fe3[_0x482575(0x142)](_0x482575(0x172)),_0x73cfbd=_0x2a5fe3[_0x482575(0x142)](_0x482575(0x15f));if(!_0x374257||!_0x73cfbd)throw CliErrors[_0x482575(0x159)](_0x482575(0x149));const _0x55e8fe=_0x2a5fe3[_0x482575(0x16e)](_0x482575(0x166),0x1),_0x5a3038=_0x2a5fe3['num']('batch-size',0x1f4);if(!Number[_0x482575(0x156)](_0x55e8fe)||_0x55e8fe<0x1||!Number[_0x482575(0x156)](_0x5a3038)||_0x5a3038<0x1||_0x5a3038>0x1f4)throw CliErrors[_0x482575(0x159)](_0x482575(0x14d));const _0x1483dc=resolve(_0x2a5fe3[_0x482575(0x142)]('checkpoint')||_0x374257+_0x482575(0x148)),_0x40ee78=resolve(_0x2a5fe3[_0x482575(0x142)](_0x482575(0x173))||_0x374257+'.import-report.json'),_0x4e39cd=[resolve(_0x374257),resolve(_0x73cfbd),_0x1483dc,_0x40ee78];if(new Set(_0x4e39cd)['size']!==_0x4e39cd['length'])throw CliErrors[_0x482575(0x159)](_0x482575(0x144));return{'file':resolve(_0x374257),'mappingFile':resolve(_0x73cfbd),'headerRow':_0x55e8fe,'batchSize':_0x5a3038,'checkpoint':_0x1483dc,'report':_0x40ee78,'sheet':_0x2a5fe3[_0x482575(0x142)](_0x482575(0x16a))||undefined,'resume':_0x2a5fe3['bool'](_0x482575(0x170))};}async function prepare(_0x590919){const _0x3f0a50=a26_0x8f54,_0x1c5a97=input(_0x590919),_0x23b6ee=_0x590919[_0x3f0a50(0x142)]('code');[_0x1c5a97['file'],_0x1c5a97[_0x3f0a50(0x145)],_0x1c5a97['checkpoint'],_0x1c5a97[_0x3f0a50(0x173)]]=await Promise[_0x3f0a50(0x13f)]([realpath(_0x1c5a97['file']),realpath(_0x1c5a97['mappingFile']),resolveImportOutputPath(_0x1c5a97[_0x3f0a50(0x13d)]),resolveImportOutputPath(_0x1c5a97[_0x3f0a50(0x173)])]),assertImportPaths(_0x1c5a97[_0x3f0a50(0x13d)],_0x1c5a97[_0x3f0a50(0x173)],[_0x1c5a97['file'],_0x1c5a97['mappingFile']]);let _0x443d0e;const _0xfa0c6b=await readFile(_0x1c5a97['mappingFile']);if(_0xfa0c6b[_0x3f0a50(0x17c)]>0x400*0x400)throw CliErrors['validation']('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x443d0e=JSON[_0x3f0a50(0x14c)](_0xfa0c6b[_0x3f0a50(0x17b)](_0x3f0a50(0x13a)));}catch{throw CliErrors[_0x3f0a50(0x159)](_0x3f0a50(0x14f));}if(!_0x443d0e||typeof _0x443d0e!==_0x3f0a50(0x13b)||Array[_0x3f0a50(0x14e)](_0x443d0e)||Object[_0x3f0a50(0x16f)](_0x443d0e)[_0x3f0a50(0x163)](_0x22f006=>typeof _0x22f006!==_0x3f0a50(0x146)))throw CliErrors['validation'](_0x3f0a50(0x130));const _0x29b122=await getDatasetDetail(_0x23b6ee),_0x45e14c=assertDatasetImportTarget(_0x29b122,_0x590919[_0x3f0a50(0x140)],_0x23b6ee);if(_0x45e14c===_0x3f0a50(0x165))throw CliErrors[_0x3f0a50(0x159)](_0x3f0a50(0x15c),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x23b6ee+_0x3f0a50(0x161)+_0x590919[_0x3f0a50(0x140)]+_0x3f0a50(0x177)+_0x23b6ee+_0x3f0a50(0x17a));if(_0x45e14c!==_0x3f0a50(0x153))throw CliErrors['validation']('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.',_0x3f0a50(0x179));const _0xf20f06=await buildExcelManifest({..._0x1c5a97,'mapping':_0x443d0e,'fields':normalizeImportFields(_0x29b122)}),_0x2c0e10=await getDatasetImportContract(_0x590919[_0x3f0a50(0x140)],_0x23b6ee);assertImportContract(_0x2c0e10,_0x590919[_0x3f0a50(0x140)],_0x23b6ee);if(_0x1c5a97['batchSize']>_0x2c0e10[_0x3f0a50(0x137)])throw CliErrors['validation'](_0x3f0a50(0x162));return{'args':_0x1c5a97,'manifest':_0xf20f06,'contract':_0x2c0e10,'code':_0x23b6ee};}async function checked(_0x547353){const _0x78f94f=a26_0x8f54;try{return await _0x547353();}catch(_0x324c1d){if(_0x324c1d instanceof CliError)throw _0x324c1d;throw CliErrors[_0x78f94f(0x159)](_0x324c1d[_0x78f94f(0x157)]||'Excel\x20import\x20failed.');}}export const dataImportExcel={'service':'data','command':'import-excel','risk':a26_0x40d4b7(0x16b),'description':'Import\x20one\x20XLSX\x20worksheet\x20into\x20METADATA\x20with\x20checkpoint\x20recovery.\x20DB_TABLE\x20uses\x20lovrabet\x20data\x20batchCreate\x20after\x20mapping\x20and\x20validation;\x20that\x20route\x20has\x20no\x20import\x20checkpoint\x20or\x20--resume.','confirmationDescription':'Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','flags':[CODE_FLAG,{'name':a26_0x40d4b7(0x172),'type':a26_0x40d4b7(0x146),'required':!![],'description':a26_0x40d4b7(0x16d)},{'name':a26_0x40d4b7(0x15f),'type':a26_0x40d4b7(0x146),'required':!![],'description':a26_0x40d4b7(0x147)},{'name':a26_0x40d4b7(0x16a),'type':a26_0x40d4b7(0x146),'description':a26_0x40d4b7(0x15b)},{'name':'header-row','type':a26_0x40d4b7(0x138),'default':0x1,'description':a26_0x40d4b7(0x13e)},{'name':'batch-size','type':a26_0x40d4b7(0x138),'default':0x1f4,'description':a26_0x40d4b7(0x174)},{'name':'checkpoint','type':a26_0x40d4b7(0x146),'description':a26_0x40d4b7(0x152)},{'name':a26_0x40d4b7(0x173),'type':a26_0x40d4b7(0x146),'description':a26_0x40d4b7(0x132)},{'name':a26_0x40d4b7(0x170),'type':a26_0x40d4b7(0x133),'description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x5bf201=>{input(_0x5bf201);},'dryRun':async _0x41be79=>checked(async()=>{const _0x4ab29e=a26_0x40d4b7,{args:_0x588d71,manifest:_0x2898fc,contract:_0x23d4c5,code:_0x3f3312}=await prepare(_0x41be79),_0x5931a0=new Set(_0x2898fc[_0x4ab29e(0x151)][_0x4ab29e(0x160)](_0x46d2fe=>_0x46d2fe[_0x4ab29e(0x176)]))[_0x4ab29e(0x13c)];return{'method':_0x4ab29e(0x167),'url':_0x4ab29e(0x154)+encodeURIComponent(_0x41be79['appCode'])+'/'+encodeURIComponent(_0x3f3312)+_0x4ab29e(0x14a),'description':_0x4ab29e(0x143),'body':{'schemaFingerprint':_0x23d4c5[_0x4ab29e(0x158)]},'validRows':Math['max'](0x0,_0x2898fc[_0x4ab29e(0x169)][_0x4ab29e(0x17c)]-_0x5931a0),'invalidRows':_0x5931a0,'invalidCells':_0x2898fc[_0x4ab29e(0x151)][_0x4ab29e(0x17c)],'emptyRows':_0x2898fc[_0x4ab29e(0x155)]['length'],'expectedBatches':previewImportBatchCount(_0x2898fc,_0x23d4c5,_0x588d71[_0x4ab29e(0x16c)]),'errors':_0x2898fc[_0x4ab29e(0x151)],'warnings':_0x2898fc[_0x4ab29e(0x17d)],'sheet':_0x2898fc[_0x4ab29e(0x16a)],'checkpoint':_0x588d71['checkpoint'],'report':_0x588d71[_0x4ab29e(0x173)]};}),'execute':async _0x14520d=>checked(async()=>{const _0x121d5b=a26_0x40d4b7,{args:_0x16f539,manifest:_0x4bc149,contract:_0x405afa,code:_0x374e05}=await prepare(_0x14520d);if(_0x4bc149['errors'][_0x121d5b(0x17c)]){await saveImportJson(_0x16f539['report'],{'status':_0x121d5b(0x150),'sourceRows':_0x4bc149['rows'][_0x121d5b(0x17c)],'errors':_0x4bc149[_0x121d5b(0x151)],'emptyRows':_0x4bc149['emptyRows'],'warnings':_0x4bc149[_0x121d5b(0x17d)]});throw CliErrors[_0x121d5b(0x159)]('Excel\x20contains\x20'+_0x4bc149[_0x121d5b(0x151)][_0x121d5b(0x17c)]+_0x121d5b(0x131),_0x121d5b(0x15e)+_0x16f539['report']+'.');}const _0x37f44c=_0x405afa[_0x121d5b(0x15d)]===0x2?runAutoIdExcelImport:runExcelImport,_0x157c9f=await _0x37f44c({..._0x16f539,'manifest':_0x4bc149,'contract':_0x405afa,'appCode':_0x14520d[_0x121d5b(0x140)],'datasetCode':_0x374e05,'runtimeDomain':getRuntimeDomain(),'api':{'write':(_0x2d3a3f,_0x5af55e)=>createDatasetImportBatch(_0x14520d[_0x121d5b(0x140)],_0x374e05,{'schemaFingerprint':_0x405afa[_0x121d5b(0x158)],'items':_0x2d3a3f,..._0x5af55e===undefined?{}:{'taskId':_0x5af55e}}),'readback':_0x5d7605=>readDatasetImportRows(_0x14520d['appCode'],_0x374e05,_0x5d7605),'readTask':_0x594844=>readDatasetImportTaskRows(_0x14520d[_0x121d5b(0x140)],_0x374e05,_0x594844)}});return{'ok':!![],'data':_0x157c9f,'message':_0x121d5b(0x134)+_0x157c9f[_0x121d5b(0x14b)]+_0x121d5b(0x135)};})};