@lovrabet/lovrabet-cli 2.3.11 → 2.3.12-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/approval/index.js +1 -1
  12. package/lib/commands/artifact/index.d.ts +13 -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.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/issue/context.js +1 -1
  38. package/lib/commands/issue/index.js +1 -1
  39. package/lib/commands/issue/report.js +1 -1
  40. package/lib/commands/kb/index.js +1 -1
  41. package/lib/commands/logs/index.js +1 -1
  42. package/lib/commands/notification/config-list.js +1 -1
  43. package/lib/commands/notification/index.js +1 -1
  44. package/lib/commands/notification/shared.js +1 -1
  45. package/lib/commands/ocr/index.js +1 -1
  46. package/lib/commands/permit/dataset-get.js +1 -1
  47. package/lib/commands/permit/dataset-set.js +1 -1
  48. package/lib/commands/permit/index.js +1 -1
  49. package/lib/commands/permit/page-get.js +1 -1
  50. package/lib/commands/permit/page-set.js +1 -1
  51. package/lib/commands/permit/role-menus-set.js +1 -1
  52. package/lib/commands/permit/role-menus.js +1 -1
  53. package/lib/commands/permit/shared.js +1 -1
  54. package/lib/commands/personal-bff/index.js +1 -1
  55. package/lib/commands/registry.js +1 -1
  56. package/lib/commands/role/create.js +1 -1
  57. package/lib/commands/role/delete.js +1 -1
  58. package/lib/commands/role/detail.js +1 -1
  59. package/lib/commands/role/index.js +1 -1
  60. package/lib/commands/role/list.js +1 -1
  61. package/lib/commands/role/shared.js +1 -1
  62. package/lib/commands/role/update.js +1 -1
  63. package/lib/commands/role/user-add.js +1 -1
  64. package/lib/commands/role/user-remove.js +1 -1
  65. package/lib/commands/schedule/index.js +1 -1
  66. package/lib/commands/schema.js +1 -1
  67. package/lib/commands/service/dynamic.js +1 -1
  68. package/lib/commands/service/function-name-adapter.js +1 -1
  69. package/lib/commands/service/index.js +1 -1
  70. package/lib/commands/service/registry.js +1 -1
  71. package/lib/commands/skill/commands/create.js +1 -1
  72. package/lib/commands/skill/commands/diagram.js +1 -1
  73. package/lib/commands/skill/commands/install.js +1 -1
  74. package/lib/commands/skill/commands/list.js +1 -1
  75. package/lib/commands/skill/commands/push.js +1 -1
  76. package/lib/commands/skill/commands/validate.js +1 -1
  77. package/lib/commands/skill/diagram.js +1 -1
  78. package/lib/commands/skill/flags.js +1 -1
  79. package/lib/commands/skill/index.js +1 -1
  80. package/lib/commands/skill/manifest-helpers.js +1 -1
  81. package/lib/commands/skill/push-execute.js +1 -1
  82. package/lib/commands/skill/push-flow-helpers.js +1 -1
  83. package/lib/commands/skill/push-retarget.js +1 -1
  84. package/lib/commands/skill/scopes.js +1 -1
  85. package/lib/commands/skill/summary.js +1 -1
  86. package/lib/commands/skill/templates.js +1 -1
  87. package/lib/commands/skill/validate.js +1 -1
  88. package/lib/commands/sql/detail.js +1 -1
  89. package/lib/commands/sql/exec.js +1 -1
  90. package/lib/commands/sql/index.js +1 -1
  91. package/lib/commands/update.js +1 -1
  92. package/lib/commands/user-account/bind.js +1 -1
  93. package/lib/commands/user-account/index.js +1 -1
  94. package/lib/commands/workspace/index.js +1 -1
  95. package/lib/config/domain-config.js +1 -1
  96. package/lib/config/schema.js +1 -1
  97. package/lib/constant/app.js +1 -1
  98. package/lib/constant/auth-mode.js +1 -1
  99. package/lib/constant/cli.js +1 -1
  100. package/lib/constant/defaults.js +1 -1
  101. package/lib/constant/distribution.js +1 -1
  102. package/lib/constant/domain.js +1 -1
  103. package/lib/constant/env.js +1 -1
  104. package/lib/constant/output.js +1 -1
  105. package/lib/constant/product.js +1 -1
  106. package/lib/constant/region.js +1 -1
  107. package/lib/constant/risk.js +1 -1
  108. package/lib/constant/url.js +1 -1
  109. package/lib/context.js +1 -1
  110. package/lib/core/api-client.d.ts +3 -2
  111. package/lib/core/api-client.js +1 -1
  112. package/lib/core/db-resolver.js +1 -1
  113. package/lib/core/kb-management-client.js +1 -1
  114. package/lib/core/kb-sdk-errors.js +1 -1
  115. package/lib/core/kb-search-client.js +1 -1
  116. package/lib/core/sdk-client.js +1 -1
  117. package/lib/errors.js +1 -1
  118. package/lib/framework/access-error.js +1 -1
  119. package/lib/framework/build-all-flags.js +1 -1
  120. package/lib/framework/dryrun.js +1 -1
  121. package/lib/framework/flags.js +1 -1
  122. package/lib/framework/help.js +1 -1
  123. package/lib/framework/index.js +1 -1
  124. package/lib/framework/output.js +1 -1
  125. package/lib/framework/preparse.js +1 -1
  126. package/lib/framework/rate-limit.js +1 -1
  127. package/lib/framework/raw-flags.js +1 -1
  128. package/lib/framework/response.js +1 -1
  129. package/lib/framework/runner-confirmation.js +1 -1
  130. package/lib/framework/runner-error.js +1 -1
  131. package/lib/framework/runner.js +1 -1
  132. package/lib/framework/schema-export.js +1 -1
  133. package/lib/framework/service-order.js +1 -1
  134. package/lib/framework/types.js +1 -1
  135. package/lib/generated/build-info.d.ts +4 -4
  136. package/lib/generated/build-info.js +1 -1
  137. package/lib/generated/official-routing.js +1 -1
  138. package/lib/generated/routing-contract.js +1 -1
  139. package/lib/help.js +1 -1
  140. package/lib/postinstall.js +1 -1
  141. package/lib/runtime/confirmation.js +1 -1
  142. package/lib/runtime/event.js +1 -1
  143. package/lib/runtime/index.js +1 -1
  144. package/lib/runtime/queue.js +1 -1
  145. package/lib/runtime/resolve.js +1 -1
  146. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  147. package/lib/services/dataset-import/excel-reader.js +1 -1
  148. package/lib/services/dataset-import/image-bytes.js +1 -1
  149. package/lib/services/dataset-import/image-ooxml.js +1 -1
  150. package/lib/services/dataset-import/image-runner.js +1 -1
  151. package/lib/services/dataset-import/metadata.js +1 -1
  152. package/lib/services/dataset-import/preview.js +1 -1
  153. package/lib/services/dataset-import/runner.js +1 -1
  154. package/lib/skills/builtin-skill.js +1 -1
  155. package/lib/skills/npx-skills-add.js +1 -1
  156. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  157. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  158. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  159. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  160. package/lib/skills/runtime-skill-sync/links.js +1 -1
  161. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  162. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  163. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  164. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  165. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  166. package/lib/skills/runtime-skill-sync/push.js +1 -1
  167. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  168. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  169. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  170. package/lib/skills/runtime-skill-sync.js +1 -1
  171. package/lib/skills/skill-presence.js +1 -1
  172. package/lib/utils/access-key-redaction.js +1 -1
  173. package/lib/utils/apply-jq-filter.js +1 -1
  174. package/lib/utils/cli-version-check.js +1 -1
  175. package/lib/utils/cli-version-policy.js +1 -1
  176. package/lib/utils/logger.js +1 -1
  177. package/lib/utils/lossless-json.js +1 -1
  178. package/lib/utils/params.js +1 -1
  179. package/lib/utils/positive-safe-integer.js +1 -1
  180. package/lib/utils/redaction.js +1 -1
  181. package/lib/utils/runtime-user-id.js +1 -1
  182. package/lib/utils/update-notice.js +1 -1
  183. package/lib/utils/version.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +1 -1
  186. package/skills/lovrabet/SKILL.md +1 -1
  187. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a12_0x252b9d=a12_0x2212;(function(_0x22e4dc,_0x479638){const _0x3580cf=a12_0x2212,_0x407c4f=_0x22e4dc();while(!![]){try{const _0x46b8f1=-parseInt(_0x3580cf(0x20b))/0x1*(-parseInt(_0x3580cf(0x1c5))/0x2)+-parseInt(_0x3580cf(0x1cc))/0x3*(parseInt(_0x3580cf(0x1d7))/0x4)+-parseInt(_0x3580cf(0x1f8))/0x5+-parseInt(_0x3580cf(0x1f2))/0x6*(-parseInt(_0x3580cf(0x1de))/0x7)+parseInt(_0x3580cf(0x1e6))/0x8*(-parseInt(_0x3580cf(0x1cd))/0x9)+parseInt(_0x3580cf(0x1f0))/0xa*(parseInt(_0x3580cf(0x1ea))/0xb)+parseInt(_0x3580cf(0x207))/0xc;if(_0x46b8f1===_0x479638)break;else _0x407c4f['push'](_0x407c4f['shift']());}catch(_0x363a89){_0x407c4f['push'](_0x407c4f['shift']());}}}(a12_0x2f08,0x5cb9e));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';function a12_0x2212(_0x43d6b0,_0x2a5f29){_0x43d6b0=_0x43d6b0-0x1ba;const _0x2f081b=a12_0x2f08();let _0x221239=_0x2f081b[_0x43d6b0];return _0x221239;}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';function a12_0x2f08(){const _0x2b36cc=['device','2227776rHqhsA','/device-auth?code=','utf8','boolean','1yrAzQC','AccessKey\x20saved\x20to\x20','scope','validation','aborted','global-default','/.device-auth','Device\x20auth\x20API\x20error\x20(','global','bool','homeDirName','networkError','\x20auth\x20device','\x20auth\x20status','Device\x20authorization\x20cancelled.','896914fasyKK','parse','randomUUID','\x20config.','once','/api/device-auth/token','log','204fflIOu','28521iINzfq','Write\x20to\x20project\x20config','apiError','Verify:\x20','getTime','Device\x20auth\x20API\x20returned\x20HTTP\x20','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','status','string','data','18388GgGTJS','toISOString','POST','source','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','write','21nriVAx','name','cancelled','SIGINT','After\x20authorizing,\x20re-run:\x20','access_key','padStart','abort','328QuQDRZ','project','removeListener','auth','132ixiuqs','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','trim','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','expired','34110FjQoBx','test','1214646pEUpjY','Invalid\x20device\x20auth\x20response','stderr','signal','stringify','code','2300145mXynsl','nonInteractive','createdAt','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','application/json','\x0dWaiting\x20for\x20authorization...\x20','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','url-only','floor','json','now','&source=','lovrabet-cli','accessKey'];a12_0x2f08=function(){return _0x2b36cc;};return a12_0x2f08();}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(_0x357cfc){const _0x1fab79=a12_0x2212;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x357cfc[_0x1fab79(0x1bf)](_0x1fab79(0x1be)),'explicitProject':_0x357cfc[_0x1fab79(0x1bf)](_0x1fab79(0x1e7)),'policy':_0x1fab79(0x1bb)}));}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 _0x3f2cc9=a12_0x2212;return crypto[_0x3f2cc9(0x1c7)]();}export function buildDeviceAuthUrl(_0x5110b4,_0x556db8,_0x1eb024='lovrabet-cli'){const _0x1c1f61=a12_0x2212;return _0x5110b4+_0x1c1f61(0x208)+encodeURIComponent(_0x556db8)+_0x1c1f61(0x203)+encodeURIComponent(_0x1eb024);}export function getDeviceCodePath(){const _0xa0041d=a12_0x2212;return homedir()+'/'+PRODUCT_CONFIG[_0xa0041d(0x1c0)]+_0xa0041d(0x1bc);}export function readStoredDeviceCode(){const _0x2dd6c1=a12_0x2212,_0x31ef0f=getDeviceCodePath();if(!existsSync(_0x31ef0f))return null;try{const _0x2950a0=readFileSync(_0x31ef0f,{'encoding':_0x2dd6c1(0x209)}),_0x2e2c33=JSON[_0x2dd6c1(0x1c6)](_0x2950a0);if(_0x2e2c33&&typeof _0x2e2c33[_0x2dd6c1(0x1f7)]===_0x2dd6c1(0x1d5)&&typeof _0x2e2c33[_0x2dd6c1(0x1fa)]==='string'&&(_0x2e2c33[_0x2dd6c1(0x20d)]===_0x2dd6c1(0x1be)||_0x2e2c33[_0x2dd6c1(0x20d)]===_0x2dd6c1(0x1e7)))return _0x2e2c33;}catch{}return null;}export function writeStoredDeviceCode(_0x4c995f,_0x34122f){const _0x490b3a=a12_0x2212,_0x32271c=getDeviceCodePath(),_0x425329=dirname(_0x32271c);!existsSync(_0x425329)&&mkdirSync(_0x425329,{'recursive':!![]});const _0x5f064d={'code':_0x4c995f,'createdAt':new Date()[_0x490b3a(0x1d8)](),'scope':_0x34122f};writeFileSync(_0x32271c,JSON[_0x490b3a(0x1f6)](_0x5f064d),{'encoding':'utf8','mode':0x180});}export function deleteStoredDeviceCode(){const _0x22ac5b=getDeviceCodePath();try{unlinkSync(_0x22ac5b);}catch{}}export function isStoredDeviceCodeExpired(_0x431d26){const _0x1dee8b=a12_0x2212;return Date[_0x1dee8b(0x202)]()-new Date(_0x431d26[_0x1dee8b(0x1fa)])[_0x1dee8b(0x1d1)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x25aa5b,_0x5827cb){const _0x308939=a12_0x2212,_0x280ef5=_0x25aa5b+_0x308939(0x1ca),_0x51f716=new AbortController(),_0x49c9df=setTimeout(()=>_0x51f716[_0x308939(0x1e5)](),0x2710),_0x2e2348=await fetch(_0x280ef5,{'method':_0x308939(0x1d9),'headers':{'Content-Type':_0x308939(0x1fc)},'body':JSON[_0x308939(0x1f6)]({'code':_0x5827cb}),'signal':_0x51f716[_0x308939(0x1f5)]});clearTimeout(_0x49c9df);if(!_0x2e2348['ok'])throw CliErrors['networkError'](_0x308939(0x1d2)+_0x2e2348[_0x308939(0x1d4)]);const _0x3c6349=await _0x2e2348[_0x308939(0x201)](),_0x5c6160=_0x3c6349[_0x308939(0x1d6)]&&typeof _0x3c6349[_0x308939(0x1d6)]==='object'?_0x3c6349[_0x308939(0x1d6)]:_0x3c6349;if(!_0x5c6160||typeof _0x5c6160[_0x308939(0x1d4)]!=='string')throw CliErrors['apiError'](_0x308939(0x1f3));return{'status':_0x5c6160['status'],'access_key':typeof _0x5c6160[_0x308939(0x1e3)]===_0x308939(0x1d5)?_0x5c6160[_0x308939(0x1e3)]:undefined};}export async function pollDeviceToken(_0x456531,_0x1ac314,_0x273350){const _0x13925=a12_0x2212;let _0x1ae9c2=0x0;for(let _0x4d76ce=0x0;_0x4d76ce<MAX_POLLS;_0x4d76ce++){if(_0x273350[_0x13925(0x1ba)])throw CliErrors['cancelled'](_0x13925(0x1c4));let _0x2bba4a;try{_0x2bba4a=await fetchDeviceToken(_0x456531,_0x1ac314);}catch(_0x3eb1e7){if(_0x3eb1e7 instanceof Error&&_0x3eb1e7[_0x13925(0x1df)]==='AbortError')throw CliErrors[_0x13925(0x1e0)](_0x13925(0x1c4));_0x1ae9c2++;if(_0x1ae9c2>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x13925(0x1c1)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine(_0x13925(0x1bd)+_0x1ae9c2+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+'),\x20retrying...'),await sleep(POLL_INTERVAL_MS);continue;}_0x1ae9c2=0x0;if(_0x2bba4a[_0x13925(0x1d4)]==='success'){if(!_0x2bba4a[_0x13925(0x1e3)])throw CliErrors['apiError']('Invalid\x20access_key\x20returned\x20by\x20server.');return _0x2bba4a[_0x13925(0x1e3)];}if(_0x2bba4a['status']===_0x13925(0x1ef)){deleteStoredDeviceCode();throw CliErrors[_0x13925(0x20e)](_0x13925(0x1ee));}const _0x3b2e92=(_0x4d76ce+0x1)*POLL_INTERVAL_MS,_0x5d6ac4=DEVICE_CODE_TTL_MS-_0x3b2e92,_0x5bfe9e=Math[_0x13925(0x200)](_0x5d6ac4/0xea60),_0x45a45e=Math[_0x13925(0x200)](_0x5d6ac4%0xea60/0x3e8);process[_0x13925(0x1f4)][_0x13925(0x1dd)](_0x13925(0x1fd)+_0x5bfe9e+':'+String(_0x45a45e)[_0x13925(0x1e4)](0x2,'0')+'\x20remaining'),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x13925(0x20e)](_0x13925(0x1fb));}function sleep(_0x257ed5){return new Promise(_0x4b6201=>setTimeout(_0x4b6201,_0x257ed5));}export const authDeviceDefinition={'service':a12_0x252b9d(0x1e9),'command':a12_0x252b9d(0x206),'description':a12_0x252b9d(0x1dc),'risk':a12_0x252b9d(0x1dd),'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_0x252b9d(0x1be),'type':a12_0x252b9d(0x20a),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x252b9d(0x1e7),'type':a12_0x252b9d(0x20a),'description':a12_0x252b9d(0x1ce),'default':![]},{'name':a12_0x252b9d(0x1da),'type':'string','description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a12_0x252b9d(0x204)},{'name':a12_0x252b9d(0x1ff),'type':a12_0x252b9d(0x20a),'description':a12_0x252b9d(0x1eb),'default':![]}],async 'execute'(_0x3a57ae){const _0xd46cf0=a12_0x252b9d,_0x2afeea=resolveAuthScopeFlags(_0x3a57ae),_0x45f97f=_0x2afeea['global']?'global':_0xd46cf0(0x1e7),_0x534d41=readScopedConfig(_0x2afeea);if(_0x534d41[_0xd46cf0(0x205)])return{'ok':!![],'message':_0xd46cf0(0x1ec)};const _0xf3d9dd=(_0x3a57ae['str'](_0xd46cf0(0x1da))||_0xd46cf0(0x204))[_0xd46cf0(0x1ed)](),_0x402a1f=getUserDomain(),_0x20bb41=readStoredDeviceCode(),_0x14b854=_0x20bb41&&!isStoredDeviceCodeExpired(_0x20bb41)?_0x20bb41[_0xd46cf0(0x1f7)]:((()=>{const _0x26e0d5=generateDeviceCode();return writeStoredDeviceCode(_0x26e0d5,_0x45f97f),_0x26e0d5;})()),_0x3831c2=buildDeviceAuthUrl(_0x402a1f,_0x14b854,_0xf3d9dd);if(_0x3a57ae[_0xd46cf0(0x1bf)]('url-only'))return console[_0xd46cf0(0x1cb)](_0x3831c2),{'ok':!![]};writeCliSideChannelLine(_0xd46cf0(0x1d3)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3831c2),writeCliSideChannelLine(''),writeCliSideChannelLine(_0xd46cf0(0x1db));if(_0x3a57ae[_0xd46cf0(0x1f9)])return writeCliSideChannelLine(_0xd46cf0(0x1e2)+CLI_BIN_NAME+_0xd46cf0(0x1c2)),{'ok':!![],'message':_0xd46cf0(0x1fe)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0xdd3e6a=new AbortController(),_0x1d6654=()=>{const _0x43f1ba=_0xd46cf0;_0xdd3e6a['abort'](),process[_0x43f1ba(0x1e8)](_0x43f1ba(0x1e1),_0x1d6654);};process[_0xd46cf0(0x1c9)](_0xd46cf0(0x1e1),_0x1d6654);let _0x2d1394;try{_0x2d1394=await pollDeviceToken(_0x402a1f,_0x14b854,_0xdd3e6a[_0xd46cf0(0x1f5)]);}finally{process[_0xd46cf0(0x1e8)](_0xd46cf0(0x1e1),_0x1d6654);}if(!ACCESS_KEY_PATTERN[_0xd46cf0(0x1f1)](_0x2d1394))throw CliErrors[_0xd46cf0(0x1cf)]('Invalid\x20access_key\x20returned\x20by\x20server.');const _0x381e3d=readScopedConfig(_0x2afeea);return _0x381e3d[_0xd46cf0(0x205)]=_0x2d1394,writeScopedConfig(_0x381e3d,_0x2afeea),deleteStoredDeviceCode(),process[_0xd46cf0(0x1f4)][_0xd46cf0(0x1dd)]('\x0a'),writeCliSideChannelLine(_0xd46cf0(0x20c)+_0x45f97f+_0xd46cf0(0x1c8)),writeCliSideChannelLine(_0xd46cf0(0x1d0)+CLI_BIN_NAME+_0xd46cf0(0x1c3)),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};
1
+ const a12_0x52f044=a12_0x7407;(function(_0x2cd4ba,_0x3bd5ce){const _0x3b3496=a12_0x7407,_0x2e5642=_0x2cd4ba();while(!![]){try{const _0x22ed8b=parseInt(_0x3b3496(0x1e1))/0x1*(-parseInt(_0x3b3496(0x1cd))/0x2)+-parseInt(_0x3b3496(0x204))/0x3+parseInt(_0x3b3496(0x1d4))/0x4*(-parseInt(_0x3b3496(0x1f5))/0x5)+-parseInt(_0x3b3496(0x214))/0x6+parseInt(_0x3b3496(0x1e2))/0x7+-parseInt(_0x3b3496(0x1ee))/0x8*(parseInt(_0x3b3496(0x1e4))/0x9)+parseInt(_0x3b3496(0x213))/0xa;if(_0x22ed8b===_0x3bd5ce)break;else _0x2e5642['push'](_0x2e5642['shift']());}catch(_0x3c2183){_0x2e5642['push'](_0x2e5642['shift']());}}}(a12_0x54da,0x81c2d));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 resolveAuthScopeFlags(_0x49b6dc){const _0xc74e67=a12_0x7407;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x49b6dc[_0xc74e67(0x20c)]('global'),'explicitProject':_0x49b6dc[_0xc74e67(0x20c)](_0xc74e67(0x1d7)),'policy':_0xc74e67(0x210)}));}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 _0x28a1d2=a12_0x7407;return crypto[_0x28a1d2(0x1c9)]();}export function buildDeviceAuthUrl(_0x20984d,_0x2672f5,_0x26d0cc=a12_0x52f044(0x1de)){const _0x59874c=a12_0x52f044;return _0x20984d+_0x59874c(0x1f9)+encodeURIComponent(_0x2672f5)+_0x59874c(0x1f8)+encodeURIComponent(_0x26d0cc);}export function getDeviceCodePath(){const _0x435a88=a12_0x52f044;return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+_0x435a88(0x205);}export function readStoredDeviceCode(){const _0xf155a9=a12_0x52f044,_0x230996=getDeviceCodePath();if(!existsSync(_0x230996))return null;try{const _0x4a16dd=readFileSync(_0x230996,{'encoding':_0xf155a9(0x1db)}),_0x53daa2=JSON[_0xf155a9(0x1e0)](_0x4a16dd);if(_0x53daa2&&typeof _0x53daa2['code']==='string'&&typeof _0x53daa2[_0xf155a9(0x1e6)]==='string'&&(_0x53daa2[_0xf155a9(0x1cb)]===_0xf155a9(0x1d5)||_0x53daa2[_0xf155a9(0x1cb)]===_0xf155a9(0x1d7)))return _0x53daa2;}catch{}return null;}export function writeStoredDeviceCode(_0x3b7d37,_0x865476){const _0x351abb=a12_0x52f044,_0x415c72=getDeviceCodePath(),_0x454a7a=dirname(_0x415c72);!existsSync(_0x454a7a)&&mkdirSync(_0x454a7a,{'recursive':!![]});const _0x289e0a={'code':_0x3b7d37,'createdAt':new Date()['toISOString'](),'scope':_0x865476};writeFileSync(_0x415c72,JSON[_0x351abb(0x1ec)](_0x289e0a),{'encoding':'utf8','mode':0x180});}function a12_0x7407(_0x2f6dfa,_0x5bd725){_0x2f6dfa=_0x2f6dfa-0x1c9;const _0x54dadd=a12_0x54da();let _0x74075=_0x54dadd[_0x2f6dfa];return _0x74075;}export function deleteStoredDeviceCode(){const _0x2c5ab3=getDeviceCodePath();try{unlinkSync(_0x2c5ab3);}catch{}}export function isStoredDeviceCodeExpired(_0x98e7bf){const _0x4fdaa8=a12_0x52f044;return Date[_0x4fdaa8(0x207)]()-new Date(_0x98e7bf['createdAt'])['getTime']()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x875581,_0x44df15){const _0x2489e3=a12_0x52f044,_0x5729b2=_0x875581+'/api/device-auth/token',_0x367448=new AbortController(),_0x586497=setTimeout(()=>_0x367448[_0x2489e3(0x212)](),0x2710),_0x26a365=await fetch(_0x5729b2,{'method':_0x2489e3(0x1f3),'headers':{'Content-Type':_0x2489e3(0x1f1)},'body':JSON['stringify']({'code':_0x44df15}),'signal':_0x367448[_0x2489e3(0x211)]});clearTimeout(_0x586497);if(!_0x26a365['ok'])throw CliErrors[_0x2489e3(0x1fe)](_0x2489e3(0x1d2)+_0x26a365[_0x2489e3(0x20a)]);const _0x5b8e00=await _0x26a365[_0x2489e3(0x206)](),_0x24e379=_0x5b8e00[_0x2489e3(0x1dc)]&&typeof _0x5b8e00['data']===_0x2489e3(0x1ea)?_0x5b8e00[_0x2489e3(0x1dc)]:_0x5b8e00;if(!_0x24e379||typeof _0x24e379[_0x2489e3(0x20a)]!==_0x2489e3(0x1f4))throw CliErrors[_0x2489e3(0x1f6)](_0x2489e3(0x1fb));return{'status':_0x24e379['status'],'access_key':typeof _0x24e379[_0x2489e3(0x203)]===_0x2489e3(0x1f4)?_0x24e379[_0x2489e3(0x203)]:undefined};}export async function pollDeviceToken(_0x4014e3,_0x2c6de0,_0x4c0742){const _0x2c3753=a12_0x52f044;let _0x278935=0x0;for(let _0x3d8201=0x0;_0x3d8201<MAX_POLLS;_0x3d8201++){if(_0x4c0742[_0x2c3753(0x1ed)])throw CliErrors['cancelled'](_0x2c3753(0x208));let _0x31b709;try{_0x31b709=await fetchDeviceToken(_0x4014e3,_0x2c6de0);}catch(_0x4186f1){if(_0x4186f1 instanceof Error&&_0x4186f1[_0x2c3753(0x1d6)]==='AbortError')throw CliErrors[_0x2c3753(0x1d9)](_0x2c3753(0x208));_0x278935++;if(_0x278935>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x2c3753(0x1fe)](_0x2c3753(0x1e7));writeCliSideChannelLine(_0x2c3753(0x20d)+_0x278935+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x2c3753(0x1cf)),await sleep(POLL_INTERVAL_MS);continue;}_0x278935=0x0;if(_0x31b709[_0x2c3753(0x20a)]==='success'){if(!_0x31b709['access_key'])throw CliErrors[_0x2c3753(0x1f6)](_0x2c3753(0x1f2));return _0x31b709[_0x2c3753(0x203)];}if(_0x31b709[_0x2c3753(0x20a)]===_0x2c3753(0x1e9)){deleteStoredDeviceCode();throw CliErrors['validation'](_0x2c3753(0x219));}const _0x238b28=(_0x3d8201+0x1)*POLL_INTERVAL_MS,_0x4c5fac=DEVICE_CODE_TTL_MS-_0x238b28,_0xc7715c=Math[_0x2c3753(0x218)](_0x4c5fac/0xea60),_0x270167=Math['floor'](_0x4c5fac%0xea60/0x3e8);process[_0x2c3753(0x1e8)]['write'](_0x2c3753(0x1f7)+_0xc7715c+':'+String(_0x270167)['padStart'](0x2,'0')+'\x20remaining'),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x2c3753(0x1fc)](_0x2c3753(0x201));}function sleep(_0x2c6f10){return new Promise(_0x306dbc=>setTimeout(_0x306dbc,_0x2c6f10));}export const authDeviceDefinition={'service':a12_0x52f044(0x1e3),'command':a12_0x52f044(0x217),'description':'Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','risk':a12_0x52f044(0x20f),'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':'global','type':a12_0x52f044(0x1da),'description':a12_0x52f044(0x1eb),'default':!![]},{'name':'project','type':'boolean','description':a12_0x52f044(0x1d3),'default':![]},{'name':a12_0x52f044(0x1dd),'type':'string','description':a12_0x52f044(0x1df),'default':a12_0x52f044(0x1de)},{'name':a12_0x52f044(0x215),'type':a12_0x52f044(0x1da),'description':a12_0x52f044(0x1fd),'default':![]}],async 'execute'(_0x1e5c6c){const _0x170cf1=a12_0x52f044,_0x10db8e=resolveAuthScopeFlags(_0x1e5c6c),_0x1fdd73=_0x10db8e['global']?'global':_0x170cf1(0x1d7),_0x5492f3=readScopedConfig(_0x10db8e);if(_0x5492f3[_0x170cf1(0x20b)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x33015b=(_0x1e5c6c[_0x170cf1(0x216)](_0x170cf1(0x1dd))||'lovrabet-cli')[_0x170cf1(0x1ef)](),_0x131c82=getUserDomain(),_0xd9ba0c=readStoredDeviceCode(),_0x53c068=_0xd9ba0c&&!isStoredDeviceCodeExpired(_0xd9ba0c)?_0xd9ba0c[_0x170cf1(0x202)]:((()=>{const _0x174428=generateDeviceCode();return writeStoredDeviceCode(_0x174428,_0x1fdd73),_0x174428;})()),_0x52512d=buildDeviceAuthUrl(_0x131c82,_0x53c068,_0x33015b);if(_0x1e5c6c[_0x170cf1(0x20c)](_0x170cf1(0x215)))return console[_0x170cf1(0x21a)](_0x52512d),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x52512d),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x170cf1(0x1d8));if(_0x1e5c6c[_0x170cf1(0x1ce)])return writeCliSideChannelLine(_0x170cf1(0x1ca)+CLI_BIN_NAME+_0x170cf1(0x209)),{'ok':!![],'message':_0x170cf1(0x1d1)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x1c1491=new AbortController(),_0x4b3f56=()=>{const _0x21fc43=_0x170cf1;_0x1c1491[_0x21fc43(0x212)](),process[_0x21fc43(0x1f0)](_0x21fc43(0x1d0),_0x4b3f56);};process[_0x170cf1(0x1cc)](_0x170cf1(0x1d0),_0x4b3f56);let _0x32cc7d;try{_0x32cc7d=await pollDeviceToken(_0x131c82,_0x53c068,_0x1c1491['signal']);}finally{process[_0x170cf1(0x1f0)]('SIGINT',_0x4b3f56);}if(!ACCESS_KEY_PATTERN[_0x170cf1(0x1ff)](_0x32cc7d))throw CliErrors[_0x170cf1(0x1f6)](_0x170cf1(0x1f2));const _0x5eae35=readScopedConfig(_0x10db8e);return _0x5eae35[_0x170cf1(0x20b)]=_0x32cc7d,writeScopedConfig(_0x5eae35,_0x10db8e),deleteStoredDeviceCode(),process['stderr']['write']('\x0a'),writeCliSideChannelLine(_0x170cf1(0x20e)+_0x1fdd73+_0x170cf1(0x1fa)),writeCliSideChannelLine('Verify:\x20'+CLI_BIN_NAME+_0x170cf1(0x1e5)),{'ok':!![],'message':_0x170cf1(0x200)};}};function a12_0x54da(){const _0xd3fc6a=['Device\x20authorization\x20successful.','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','code','access_key','3155565oCnOaz','/.device-auth','json','now','Device\x20authorization\x20cancelled.','\x20auth\x20device','status','accessKey','bool','Device\x20auth\x20API\x20error\x20(','AccessKey\x20saved\x20to\x20','write','global-default','signal','abort','24067430qxllCQ','1188486ZSadZj','url-only','str','device','floor','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','log','randomUUID','After\x20authorizing,\x20re-run:\x20','scope','once','278732khVDKh','nonInteractive','),\x20retrying...','SIGINT','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','Device\x20auth\x20API\x20returned\x20HTTP\x20','Write\x20to\x20project\x20config','300BZdovG','global','name','project','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','cancelled','boolean','utf8','data','source','lovrabet-cli','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','parse','2uLtbTH','4141137zlRjqu','auth','855GIjpXp','\x20auth\x20status','createdAt','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','stderr','expired','object','Write\x20to\x20global\x20config\x20(default)','stringify','aborted','6416IHnysA','trim','removeListener','application/json','Invalid\x20access_key\x20returned\x20by\x20server.','POST','string','57465PxdkkU','apiError','\x0dWaiting\x20for\x20authorization...\x20','&source=','/device-auth?code=','\x20config.','Invalid\x20device\x20auth\x20response','validation','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','networkError','test'];a12_0x54da=function(){return _0xd3fc6a;};return a12_0x54da();}
@@ -1 +1 @@
1
- const a13_0x52ae40=a13_0x9322;function a13_0x9322(_0xcbde64,_0x108b16){_0xcbde64=_0xcbde64-0x10f;const _0x5228fa=a13_0x5228();let _0x932286=_0x5228fa[_0xcbde64];return _0x932286;}(function(_0x6923f3,_0x51d230){const _0x55501d=a13_0x9322,_0x1b1520=_0x6923f3();while(!![]){try{const _0x385f35=parseInt(_0x55501d(0x15a))/0x1+-parseInt(_0x55501d(0x119))/0x2*(-parseInt(_0x55501d(0x132))/0x3)+-parseInt(_0x55501d(0x149))/0x4*(parseInt(_0x55501d(0x154))/0x5)+-parseInt(_0x55501d(0x118))/0x6+parseInt(_0x55501d(0x122))/0x7*(parseInt(_0x55501d(0x13f))/0x8)+-parseInt(_0x55501d(0x16a))/0x9*(parseInt(_0x55501d(0x144))/0xa)+-parseInt(_0x55501d(0x128))/0xb*(-parseInt(_0x55501d(0x162))/0xc);if(_0x385f35===_0x51d230)break;else _0x1b1520['push'](_0x1b1520['shift']());}catch(_0x3612f5){_0x1b1520['push'](_0x1b1520['shift']());}}}(a13_0x5228,0x48413));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev,isProduction}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';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(_0x17c827=USER_ACCESS_KEY_CREATE_URL){const _0xf8a7aa=a13_0x9322;writeCliSideChannelLine(_0xf8a7aa(0x156)+PRODUCT_CONFIG[_0xf8a7aa(0x13b)]+':'),writeCliSideChannelLine('\x0a'+_0x17c827+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0xf8a7aa(0x11c));}function buildAccessKeySetupGuide(_0x7d769a=USER_ACCESS_KEY_CREATE_URL){const _0x344465=a13_0x9322;return[_0x344465(0x156)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x7d769a,_0x344465(0x126)+CLI_BIN_NAME+_0x344465(0x142)][_0x344465(0x14c)]('\x0a');}function canPromptForAccessKey(_0x2e7ea0){const _0x55aa37=a13_0x9322;return!_0x2e7ea0['nonInteractive']&&process['stdin'][_0x55aa37(0x12c)]!==![]&&process['stdout']['isTTY']!==![];}function a13_0x5228(){const _0x2a1013=['info','production','Stored\x20AccessKey\x20(','AccessKey\x20saved\x20to\x20','daily','1572FpJzfY','str','boolean','nonInteractive','env','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','code','Option\x20B:\x20apps\x20config\x20(','18ijbUEh','ClientAk','Missing\x20accessKey.','accessKey','write','project\x20config','AccessKey\x20(ak_xxx...)','global','access_key','Shorthand\x20for\x20--access-key','2611824gtKpjp','14316JKoRZE','\x20doctor','accessKeySource','\x20auth\x20login\x20--access-key\x20<ak_xxx>','=ak_xxx','Show\x20current\x20authentication\x20status','project','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','read','733117PsLdCH','Status:\x20configured\x20(not\x20remotely\x20verified)','success','Option\x20A:\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Environment:\x20','8503oUATUU','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20global\x20config\x20(default)','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','isTTY','\x20auth\x20status','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20config.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','authRequired','243ZqEMoL','scope','\x20Verify:\x20','global\x20config','envName','\x20(via\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','access-key','development','userCenterDisplayName','auth','push','\x20Current\x20env:\x20','40nDzVia','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','No\x20AccessKey\x20found\x20in\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','login','2094810vgvfMv','accessKeyCreatePath','Option\x20C:\x20environment\x20variable','cancelled','\x20config.\x20Nothing\x20to\x20clear.','1604692xeOdkn','AccessKey:\x20','bool','join','check','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','trim','validation','Saves\x20a\x20user\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','(not\x20set)','Use\x20`','5KUslaS','`auth\x20login`\x20does\x20not\x20support\x20--yes.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Auth\x20mode:\x20','global-default','status','346678XDWNoc','string','yes'];a13_0x5228=function(){return _0x2a1013;};return a13_0x5228();}function resolveAuthScopeFlags(_0x7b372c){const _0x412d90=a13_0x9322;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x7b372c[_0x412d90(0x14b)]('global'),'explicitProject':_0x7b372c['bool'](_0x412d90(0x11f)),'policy':_0x412d90(0x158)}));}async function resolveAuthWriteInput(_0x3b867f){const _0x53b796=a13_0x9322;let _0x3cb680=(_0x3b867f['str'](_0x53b796(0x139))||_0x3b867f[_0x53b796(0x163)]('ak')||'')[_0x53b796(0x14f)]();const _0x354a10=(_0x3b867f[_0x53b796(0x163)]('env')||'')['trim'](),_0x44ebc5=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x3cb680&&canPromptForAccessKey(_0x3b867f))try{showAccessKeyCreateHint(_0x44ebc5),_0x3cb680=await promptAccessKey('');}catch(_0x49f6fc){if(isAbortPrompt(_0x49f6fc))throw CliErrors[_0x53b796(0x147)]();throw _0x49f6fc;}if(!_0x3cb680)throw CliErrors[_0x53b796(0x150)](_0x53b796(0x110),buildAccessKeySetupGuide(_0x44ebc5));if(!ACCESS_KEY_PATTERN['test'](_0x3cb680))throw CliErrors['validation']('Invalid\x20accessKey\x20format.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x354a10)return{'accessKey':_0x3cb680};const _0x88d6e5=normalizeEnv(_0x354a10);return{'accessKey':_0x3cb680,'env':isDaily(_0x88d6e5)?_0x53b796(0x161):isDev(_0x88d6e5)?_0x53b796(0x13a):_0x53b796(0x15e)};}export const authDefinitions=[{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x143),'description':'Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','risk':a13_0x52ae40(0x112),'confirmationDescription':a13_0x52ae40(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x52ae40(0x139),'type':a13_0x52ae40(0x15b),'description':a13_0x52ae40(0x114)},{'name':'ak','type':a13_0x52ae40(0x15b),'description':a13_0x52ae40(0x117)},{'name':'global','type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x12a),'default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x14e),'default':![]}],async 'execute'(_0x1f010f){const _0x4ac620=a13_0x52ae40;if(_0x1f010f[_0x4ac620(0x14b)](_0x4ac620(0x15c)))throw CliErrors[_0x4ac620(0x150)](_0x4ac620(0x155),_0x4ac620(0x153)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x4ac620(0x130));const _0x518dd6=(_0x1f010f[_0x4ac620(0x163)](_0x4ac620(0x139))||_0x1f010f[_0x4ac620(0x163)]('ak')||'')[_0x4ac620(0x14f)]();if(!_0x518dd6&&_0x1f010f[_0x4ac620(0x165)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x4ac620(0x145)])};const _0x4fba37=await resolveAuthWriteInput(_0x1f010f),_0x225a4c=resolveAuthScopeFlags(_0x1f010f),_0x19786f=readScopedConfig(_0x225a4c);_0x19786f[_0x4ac620(0x111)]=_0x4fba37[_0x4ac620(0x111)];_0x4fba37[_0x4ac620(0x166)]&&(_0x19786f[_0x4ac620(0x166)]=_0x4fba37['env']);writeScopedConfig(_0x19786f,_0x225a4c);const _0x1018ac=_0x225a4c[_0x4ac620(0x115)]?_0x4ac620(0x115):_0x4ac620(0x11f),_0x51ce85=_0x19786f[_0x4ac620(0x166)]?_0x4ac620(0x13e)+_0x19786f[_0x4ac620(0x166)]+'.':'';return{'ok':!![],'message':_0x4ac620(0x160)+_0x1018ac+_0x4ac620(0x12f)+_0x51ce85+_0x4ac620(0x134)+CLI_BIN_NAME+_0x4ac620(0x12d)};}},{'service':a13_0x52ae40(0x13c),'command':'logout','description':'Clear\x20the\x20user\x20AccessKey\x20from\x20config','risk':a13_0x52ae40(0x112),'confirmationDescription':'Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x52ae40(0x115),'type':a13_0x52ae40(0x164),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3fbd82){const _0x213152=a13_0x52ae40,_0x4698ea=resolveAuthScopeFlags(_0x3fbd82),_0x30f580=readScopedConfig(_0x4698ea),_0x41bad7=!!_0x30f580['accessKey'];delete _0x30f580[_0x213152(0x111)],writeScopedConfig(_0x30f580,_0x4698ea);const _0x1a04fd=_0x4698ea['global']?'global':_0x213152(0x11f);if(_0x41bad7)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x1a04fd+'\x20config.'};return{'ok':!![],'message':_0x213152(0x141)+_0x1a04fd+_0x213152(0x148)};}},{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x159),'description':a13_0x52ae40(0x11e),'risk':a13_0x52ae40(0x121),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x52ae40(0x115),'type':a13_0x52ae40(0x164),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x129),'default':![]},{'name':a13_0x52ae40(0x14d),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x120),'default':![]}],async 'execute'(_0x71ec09){const _0x4e5244=a13_0x52ae40,_0x3cf6df=resolveAuthScopeFlags(_0x71ec09),_0x442fff=readScopedConfig(_0x3cf6df),_0x24b5b1=productEnvName('ACCESS_KEY'),_0x213f17=_0x71ec09[_0x4e5244(0x111)],_0x3a2df2=_0x71ec09[_0x4e5244(0x11b)],_0x1b0087=[_0x4e5244(0x157)+AUTH_MODE[_0x4e5244(0x10f)]];if(_0x71ec09[_0x4e5244(0x136)]&&!isProduction(_0x71ec09[_0x4e5244(0x136)]))_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x127)+_0x71ec09['envName']);_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x15f)+(_0x3cf6df['global']?_0x4e5244(0x115):_0x4e5244(0x11f))+'\x20config):\x20'+(_0x442fff[_0x4e5244(0x111)]?maskCliAccessKey(_0x442fff[_0x4e5244(0x111)]):_0x4e5244(0x152)));if(_0x213f17){const _0x58b114=maskCliAccessKey(_0x213f17);_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x14a)+_0x58b114+(_0x3a2df2?'\x20(via\x20'+_0x3a2df2+')':'')),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x123));}if(!_0x213f17){_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x12e)),_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x125)+CLI_BIN_NAME+_0x4e5244(0x12b)),_0x1b0087['push'](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x169)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x1b0087[_0x4e5244(0x13d)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x1b0087['push'](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x146)),_0x1b0087[_0x4e5244(0x13d)]('\x20\x20export\x20'+_0x24b5b1+_0x4e5244(0x11d)),_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x167)+CLI_BIN_NAME+_0x4e5244(0x11a));if(_0x71ec09['bool'](_0x4e5244(0x14d))){const _0x3a6207=readStoredDeviceCode();if(_0x3a6207&&!isStoredDeviceCodeExpired(_0x3a6207)){const _0x4a6eda=getUserDomain(),_0x354450=await fetchDeviceToken(_0x4a6eda,_0x3a6207[_0x4e5244(0x168)]);if(_0x354450[_0x4e5244(0x159)]===_0x4e5244(0x124)&&_0x354450[_0x4e5244(0x116)]){const _0x4eabde={'global':_0x3a6207['scope']==='global'},_0x477a6a=readScopedConfig(_0x4eabde);_0x477a6a[_0x4e5244(0x111)]=_0x354450[_0x4e5244(0x116)],writeScopedConfig(_0x477a6a,_0x4eabde),deleteStoredDeviceCode();const _0x276020=_0x354450[_0x4e5244(0x116)],_0x39944e=maskCliAccessKey(_0x276020),_0x304a66=_0x3a6207[_0x4e5244(0x133)]===_0x4e5244(0x115)?_0x4e5244(0x135):_0x4e5244(0x113);return{'ok':!![],'message':[_0x4e5244(0x157)+AUTH_MODE[_0x4e5244(0x10f)],..._0x71ec09[_0x4e5244(0x136)]&&!isProduction(_0x71ec09[_0x4e5244(0x136)])?[_0x4e5244(0x127)+_0x71ec09[_0x4e5244(0x136)]]:[],_0x4e5244(0x14a)+_0x39944e+_0x4e5244(0x137)+_0x304a66+')',_0x4e5244(0x123),'Device\x20authorization\x20completed.'][_0x4e5244(0x14c)]('\x0a')};}_0x354450[_0x4e5244(0x159)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x4e5244(0x131)](_0x4e5244(0x140));}throw CliErrors[_0x4e5244(0x131)](_0x1b0087[_0x4e5244(0x14c)]('\x0a'));}}return{'ok':!![],'message':_0x1b0087[_0x4e5244(0x14c)]('\x0a')};}},{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x15d),'description':a13_0x52ae40(0x138),'risk':a13_0x52ae40(0x121),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x173f28){const _0x302582=a13_0x52ae40,_0x21cc5a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x21cc5a,'meta':{'env':_0x173f28[_0x302582(0x136)]??_0x302582(0x15e)}}};}},authDeviceDefinition];
1
+ const a13_0x25b940=a13_0x37e8;(function(_0x1ccd36,_0x5c085d){const _0x12aeba=a13_0x37e8,_0x5a603f=_0x1ccd36();while(!![]){try{const _0x3cdc3a=-parseInt(_0x12aeba(0xb8))/0x1+-parseInt(_0x12aeba(0xe7))/0x2+parseInt(_0x12aeba(0xd1))/0x3+-parseInt(_0x12aeba(0xfc))/0x4+parseInt(_0x12aeba(0xe2))/0x5*(-parseInt(_0x12aeba(0xcf))/0x6)+parseInt(_0x12aeba(0x105))/0x7+parseInt(_0x12aeba(0xfb))/0x8;if(_0x3cdc3a===_0x5c085d)break;else _0x5a603f['push'](_0x5a603f['shift']());}catch(_0x5e0daa){_0x5a603f['push'](_0x5a603f['shift']());}}}(a13_0x55a2,0xca767));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';function a13_0x37e8(_0x53ed1f,_0x2132cc){_0x53ed1f=_0x53ed1f-0xb4;const _0x55a261=a13_0x55a2();let _0x37e8d3=_0x55a261[_0x53ed1f];return _0x37e8d3;}import{normalizeEnv,isDaily,isDev,isProduction}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';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(_0x4dbcf2=USER_ACCESS_KEY_CREATE_URL){const _0x133147=a13_0x37e8;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x133147(0xbd)]+':'),writeCliSideChannelLine('\x0a'+_0x4dbcf2+'\x0a'),writeCliSideChannelLine(_0x133147(0xb7)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x133147(0x10a));}function buildAccessKeySetupGuide(_0x4d70bb=USER_ACCESS_KEY_CREATE_URL){const _0x633180=a13_0x37e8;return[_0x633180(0xe3)+PRODUCT_CONFIG[_0x633180(0xbd)]+':',_0x4d70bb,_0x633180(0xc5)+CLI_BIN_NAME+_0x633180(0x100)][_0x633180(0xff)]('\x0a');}function canPromptForAccessKey(_0x1574bb){const _0x3ecdc9=a13_0x37e8;return!_0x1574bb[_0x3ecdc9(0x107)]&&process[_0x3ecdc9(0xc7)][_0x3ecdc9(0xca)]!==![]&&process[_0x3ecdc9(0xc2)][_0x3ecdc9(0xca)]!==![];}function resolveAuthScopeFlags(_0x2c40a0){const _0x513441=a13_0x37e8;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2c40a0['bool'](_0x513441(0xeb)),'explicitProject':_0x2c40a0[_0x513441(0xe6)](_0x513441(0xb9)),'policy':_0x513441(0xd9)}));}async function resolveAuthWriteInput(_0x51db3c){const _0x437a04=a13_0x37e8;let _0xcbf9ac=(_0x51db3c['str'](_0x437a04(0xb4))||_0x51db3c[_0x437a04(0x101)]('ak')||'')[_0x437a04(0xde)]();const _0xa1c313=(_0x51db3c[_0x437a04(0x101)](_0x437a04(0xf0))||'')[_0x437a04(0xde)](),_0x2aae6c=''+getUserDomain()+PRODUCT_CONFIG[_0x437a04(0xf8)];if(!_0xcbf9ac&&canPromptForAccessKey(_0x51db3c))try{showAccessKeyCreateHint(_0x2aae6c),_0xcbf9ac=await promptAccessKey('');}catch(_0x4541be){if(isAbortPrompt(_0x4541be))throw CliErrors['cancelled']();throw _0x4541be;}if(!_0xcbf9ac)throw CliErrors[_0x437a04(0xdb)](_0x437a04(0xc8),buildAccessKeySetupGuide(_0x2aae6c));if(!ACCESS_KEY_PATTERN[_0x437a04(0xdd)](_0xcbf9ac))throw CliErrors[_0x437a04(0xdb)](_0x437a04(0xf9),_0x437a04(0xd2));if(!_0xa1c313)return{'accessKey':_0xcbf9ac};const _0xb10f81=normalizeEnv(_0xa1c313);return{'accessKey':_0xcbf9ac,'env':isDaily(_0xb10f81)?_0x437a04(0xcb):isDev(_0xb10f81)?'development':'production'};}function a13_0x55a2(){const _0x64b441=['\x20auth\x20login\x20--access-key\x20<ak_xxx>','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Saves\x20a\x20user\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','read','access-key','Shorthand\x20for\x20--access-key','expired','Tip:\x20you\x20can\x20also\x20run:','1159874XZunhc','project','\x20config):\x20','info','global\x20config','userCenterDisplayName','\x20Current\x20env:\x20','No\x20AccessKey\x20found\x20in\x20','Read\x20from\x20global\x20config\x20(default)','code','stdout','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Clear\x20the\x20user\x20AccessKey\x20from\x20config','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','string','stdin','Missing\x20accessKey.','ClientAk','isTTY','daily','envName','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','348WyUczm','AccessKey\x20(ak_xxx...)','2481750vAvMqv','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Show\x20current\x20authentication\x20status','write','login','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','boolean','global-default','accessKeySource','validation','Auth\x20mode:\x20','test','trim','newConfigFileName','check','Option\x20C:\x20environment\x20variable','92185CEcIGW','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20auth\x20status','bool','1033524SRYXLG','production','status','logout','global','AccessKey:\x20','push','\x20config.\x20Nothing\x20to\x20clear.','yes','env','auth','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','success','=ak_xxx','Status:\x20configured\x20(not\x20remotely\x20verified)','Environment:\x20','AccessKey\x20cleared\x20from\x20','accessKeyCreatePath','Invalid\x20accessKey\x20format.','\x20(via\x20','26910088HYekdj','2775892sadfkp','ACCESS_KEY','accessKey','join','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','str','\x20config.','project\x20config','Option\x20A:\x20','547617OPhoqK','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','nonInteractive','authRequired','access_key'];a13_0x55a2=function(){return _0x64b441;};return a13_0x55a2();}export const authDefinitions=[{'service':'auth','command':a13_0x25b940(0xd5),'description':a13_0x25b940(0x106),'risk':'write','confirmationDescription':a13_0x25b940(0x10c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x25b940(0xb4),'type':'string','description':a13_0x25b940(0xd0)},{'name':'ak','type':a13_0x25b940(0xc6),'description':a13_0x25b940(0xb5)},{'name':a13_0x25b940(0xeb),'type':a13_0x25b940(0xd8),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x25b940(0xb9),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xc2ebee){const _0x20218d=a13_0x25b940;if(_0xc2ebee[_0x20218d(0xe6)](_0x20218d(0xef)))throw CliErrors[_0x20218d(0xdb)](_0x20218d(0xd6),'Use\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x21ba35=(_0xc2ebee['str'](_0x20218d(0xb4))||_0xc2ebee[_0x20218d(0x101)]('ak')||'')[_0x20218d(0xde)]();if(!_0x21ba35&&_0xc2ebee['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x20218d(0xf8)])};const _0x4c7b5f=await resolveAuthWriteInput(_0xc2ebee),_0xeea0a1=resolveAuthScopeFlags(_0xc2ebee),_0x46e04d=readScopedConfig(_0xeea0a1);_0x46e04d[_0x20218d(0xfe)]=_0x4c7b5f[_0x20218d(0xfe)];_0x4c7b5f[_0x20218d(0xf0)]&&(_0x46e04d['env']=_0x4c7b5f[_0x20218d(0xf0)]);writeScopedConfig(_0x46e04d,_0xeea0a1);const _0x529cd5=_0xeea0a1[_0x20218d(0xeb)]?_0x20218d(0xeb):_0x20218d(0xb9),_0x4caf89=_0x46e04d[_0x20218d(0xf0)]?_0x20218d(0xbe)+_0x46e04d['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x529cd5+_0x20218d(0x102)+_0x4caf89+'\x20Verify:\x20'+CLI_BIN_NAME+_0x20218d(0xe5)};}},{'service':a13_0x25b940(0xf1),'command':a13_0x25b940(0xea),'description':a13_0x25b940(0xc4),'risk':a13_0x25b940(0xd4),'confirmationDescription':'Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x25b940(0xeb),'type':a13_0x25b940(0xd8),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x25b940(0xd8),'description':a13_0x25b940(0xd7),'default':![]}],async 'execute'(_0x4fda73){const _0x206f63=a13_0x25b940,_0x5b314e=resolveAuthScopeFlags(_0x4fda73),_0x28ab48=readScopedConfig(_0x5b314e),_0x42f917=!!_0x28ab48[_0x206f63(0xfe)];delete _0x28ab48['accessKey'],writeScopedConfig(_0x28ab48,_0x5b314e);const _0x5bc88c=_0x5b314e[_0x206f63(0xeb)]?_0x206f63(0xeb):_0x206f63(0xb9);if(_0x42f917)return{'ok':!![],'message':_0x206f63(0xf7)+_0x5bc88c+_0x206f63(0x102)};return{'ok':!![],'message':_0x206f63(0xbf)+_0x5bc88c+_0x206f63(0xee)};}},{'service':a13_0x25b940(0xf1),'command':'status','description':a13_0x25b940(0xd3),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x25b940(0xeb),'type':a13_0x25b940(0xd8),'description':a13_0x25b940(0xc0),'default':!![]},{'name':a13_0x25b940(0xb9),'type':'boolean','description':a13_0x25b940(0xf2),'default':![]},{'name':a13_0x25b940(0xe0),'type':a13_0x25b940(0xd8),'description':a13_0x25b940(0x10b),'default':![]}],async 'execute'(_0x4f53be){const _0x4be585=a13_0x25b940,_0x43a419=resolveAuthScopeFlags(_0x4f53be),_0x13f161=readScopedConfig(_0x43a419),_0x4e043a=productEnvName(_0x4be585(0xfd)),_0x213454=_0x4f53be[_0x4be585(0xfe)],_0x1e9cc6=_0x4f53be[_0x4be585(0xda)],_0x4b7fde=[_0x4be585(0xdc)+AUTH_MODE['ClientAk']];if(_0x4f53be[_0x4be585(0xcc)]&&!isProduction(_0x4f53be[_0x4be585(0xcc)]))_0x4b7fde[_0x4be585(0xed)](_0x4be585(0xf6)+_0x4f53be[_0x4be585(0xcc)]);_0x4b7fde[_0x4be585(0xed)]('Stored\x20AccessKey\x20('+(_0x43a419[_0x4be585(0xeb)]?_0x4be585(0xeb):'project')+_0x4be585(0xba)+(_0x13f161['accessKey']?maskCliAccessKey(_0x13f161['accessKey']):'(not\x20set)'));if(_0x213454){const _0x32d846=maskCliAccessKey(_0x213454);_0x4b7fde[_0x4be585(0xed)](_0x4be585(0xec)+_0x32d846+(_0x1e9cc6?_0x4be585(0xfa)+_0x1e9cc6+')':'')),_0x4b7fde['push'](_0x4be585(0xf5));}if(!_0x213454){_0x4b7fde['push'](''),_0x4b7fde[_0x4be585(0xed)](_0x4be585(0xcd)),_0x4b7fde['push'](''),_0x4b7fde['push'](_0x4be585(0x104)+CLI_BIN_NAME+_0x4be585(0xe4)),_0x4b7fde[_0x4be585(0xed)](''),_0x4b7fde[_0x4be585(0xed)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x4be585(0xdf)]+')'),_0x4b7fde[_0x4be585(0xed)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x4b7fde['push'](''),_0x4b7fde[_0x4be585(0xed)](_0x4be585(0xe1)),_0x4b7fde[_0x4be585(0xed)]('\x20\x20export\x20'+_0x4e043a+_0x4be585(0xf4)),_0x4b7fde[_0x4be585(0xed)](''),_0x4b7fde[_0x4be585(0xed)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x4b7fde['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+'\x20doctor');if(_0x4f53be[_0x4be585(0xe6)](_0x4be585(0xe0))){const _0x2cbd51=readStoredDeviceCode();if(_0x2cbd51&&!isStoredDeviceCodeExpired(_0x2cbd51)){const _0x48e74d=getUserDomain(),_0x330446=await fetchDeviceToken(_0x48e74d,_0x2cbd51[_0x4be585(0xc1)]);if(_0x330446[_0x4be585(0xe9)]===_0x4be585(0xf3)&&_0x330446[_0x4be585(0x109)]){const _0x44c28e={'global':_0x2cbd51['scope']===_0x4be585(0xeb)},_0xaf6f7=readScopedConfig(_0x44c28e);_0xaf6f7[_0x4be585(0xfe)]=_0x330446['access_key'],writeScopedConfig(_0xaf6f7,_0x44c28e),deleteStoredDeviceCode();const _0x576d49=_0x330446[_0x4be585(0x109)],_0x1d58b1=maskCliAccessKey(_0x576d49),_0x5ae762=_0x2cbd51['scope']===_0x4be585(0xeb)?_0x4be585(0xbc):_0x4be585(0x103);return{'ok':!![],'message':[_0x4be585(0xdc)+AUTH_MODE[_0x4be585(0xc9)],..._0x4f53be['envName']&&!isProduction(_0x4f53be[_0x4be585(0xcc)])?['Environment:\x20'+_0x4f53be[_0x4be585(0xcc)]]:[],'AccessKey:\x20'+_0x1d58b1+_0x4be585(0xfa)+_0x5ae762+')',_0x4be585(0xf5),'Device\x20authorization\x20completed.'][_0x4be585(0xff)]('\x0a')};}_0x330446[_0x4be585(0xe9)]===_0x4be585(0xb6)&&deleteStoredDeviceCode();throw CliErrors[_0x4be585(0x108)](_0x4be585(0xce));}throw CliErrors['authRequired'](_0x4b7fde[_0x4be585(0xff)]('\x0a'));}}return{'ok':!![],'message':_0x4b7fde['join']('\x0a')};}},{'service':a13_0x25b940(0xf1),'command':a13_0x25b940(0xbb),'description':a13_0x25b940(0xc3),'risk':a13_0x25b940(0x10d),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4e3af0){const _0x1d9abf=a13_0x25b940,_0x466bcb=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x466bcb,'meta':{'env':_0x4e3af0['envName']??_0x1d9abf(0xe8)}}};}},authDeviceDefinition];
@@ -1 +1 @@
1
- (function(_0x496732,_0x15d325){const _0x498791=a14_0x5815,_0x371642=_0x496732();while(!![]){try{const _0x5d8699=parseInt(_0x498791(0xe6))/0x1+-parseInt(_0x498791(0xe8))/0x2+parseInt(_0x498791(0xf8))/0x3*(-parseInt(_0x498791(0xf1))/0x4)+parseInt(_0x498791(0xec))/0x5+parseInt(_0x498791(0xed))/0x6+-parseInt(_0x498791(0xf2))/0x7*(-parseInt(_0x498791(0xea))/0x8)+parseInt(_0x498791(0xfa))/0x9;if(_0x5d8699===_0x15d325)break;else _0x371642['push'](_0x371642['shift']());}catch(_0x2f19b7){_0x371642['push'](_0x371642['shift']());}}}(a14_0x18ca,0xe42d2));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x10b394=a14_0x5815;super(_0x10b394(0xeb)),this[_0x10b394(0xfb)]=_0x10b394(0xf5);}}function createSafeRl(){const _0x36593a=a14_0x5815,_0x26d160=createInterface({'input':process[_0x36593a(0xef)],'output':process[_0x36593a(0xf7)]});let _0x82271f;const _0x144974=new Promise((_0x1aecb1,_0x5e1ebd)=>{const _0x2451aa=_0x36593a;_0x82271f=()=>{const _0x228b33=a14_0x5815;_0x82271f&&(_0x26d160[_0x228b33(0xf6)](_0x228b33(0xf3),_0x82271f),_0x82271f=undefined);try{_0x26d160[_0x228b33(0xf4)]();}catch{}_0x5e1ebd(new AbortPrompt());},_0x26d160[_0x2451aa(0xf0)]('SIGINT',_0x82271f);}),_0x41937e=()=>{const _0x18ae4c=_0x36593a;_0x82271f&&(_0x26d160[_0x18ae4c(0xf6)](_0x18ae4c(0xf3),_0x82271f),_0x82271f=undefined);try{_0x26d160['close']();}catch{}};return{'rl':_0x26d160,'abortPromise':_0x144974,'disposeSuccess':_0x41937e};}export async function promptAccessKey(_0x30cf2f=''){const {rl:_0x260213,abortPromise:_0x2ac5b1,disposeSuccess:_0x402892}=createSafeRl(),_0x3dfe97=new Promise(_0x48d305=>{const _0x828253=a14_0x5815,_0x5b6073=_0x30cf2f?_0x828253(0xee)+_0x30cf2f+_0x828253(0xe9):_0x828253(0xe5);_0x260213[_0x828253(0xf9)](_0x5b6073,_0x234255=>{const _0x309da1=_0x828253;_0x402892(),_0x48d305(_0x234255[_0x309da1(0xe7)]()||_0x30cf2f);});});return Promise['race']([_0x3dfe97,_0x2ac5b1]);}function a14_0x5815(_0x5c9fb7,_0x15a3a3){_0x5c9fb7=_0x5c9fb7-0xe5;const _0x18cad1=a14_0x18ca();let _0x581511=_0x18cad1[_0x5c9fb7];return _0x581511;}export function isAbortPrompt(_0x32336d){const _0x3a940d=a14_0x5815;return _0x32336d instanceof Error&&_0x32336d['name']===_0x3a940d(0xf5);}function a14_0x18ca(){const _0x1f337c=['AccessKey\x20(paste\x20ak_...):\x20','1740687FnEICw','trim','2830286EHCGTg','):\x20','23584tEWAUa','User\x20aborted\x20prompt','6191570GRSdgx','4880376EWIvnJ','AccessKey\x20(','stdin','once','6061076BCrMJD','98RDgbCr','SIGINT','close','AbortPrompt','removeListener','stdout','3UKewxb','question','282177NKaJQH','name'];a14_0x18ca=function(){return _0x1f337c;};return a14_0x18ca();}
1
+ function a14_0x3926(){const _0x1ba9b2=['trim','):\x20','1230428TCDEAb','1692QMNYCg','close','removeListener','5JdRQpF','race','102354NzuiSb','name','once','496KCDmtw','User\x20aborted\x20prompt','2PdjOEC','10uwyTOP','61369HrFMco','SIGINT','26624JtKBXX','4684728BqEque','stdin','117150xMdJsz','AccessKey\x20(','AbortPrompt','1526193MWJLVK'];a14_0x3926=function(){return _0x1ba9b2;};return a14_0x3926();}(function(_0x180c31,_0x220ce8){const _0x2076ba=a14_0x3a62,_0x387c4d=_0x180c31();while(!![]){try{const _0x45fa6b=-parseInt(_0x2076ba(0x1c3))/0x1*(-parseInt(_0x2076ba(0x1d7))/0x2)+parseInt(_0x2076ba(0x1c6))/0x3+parseInt(_0x2076ba(0x1cc))/0x4*(-parseInt(_0x2076ba(0x1d0))/0x5)+-parseInt(_0x2076ba(0x1c4))/0x6+parseInt(_0x2076ba(0x1d2))/0x7*(parseInt(_0x2076ba(0x1d5))/0x8)+parseInt(_0x2076ba(0x1c9))/0x9*(-parseInt(_0x2076ba(0x1d8))/0xa)+-parseInt(_0x2076ba(0x1d9))/0xb*(-parseInt(_0x2076ba(0x1cd))/0xc);if(_0x45fa6b===_0x220ce8)break;else _0x387c4d['push'](_0x387c4d['shift']());}catch(_0x37612d){_0x387c4d['push'](_0x387c4d['shift']());}}}(a14_0x3926,0x7a4a9));import{createInterface}from'node:readline';function a14_0x3a62(_0x5f138a,_0x3c819d){_0x5f138a=_0x5f138a-0x1c3;const _0x3926f3=a14_0x3926();let _0x3a626d=_0x3926f3[_0x5f138a];return _0x3a626d;}class AbortPrompt extends Error{constructor(){const _0x3e74bf=a14_0x3a62;super(_0x3e74bf(0x1d6)),this[_0x3e74bf(0x1d3)]=_0x3e74bf(0x1c8);}}function createSafeRl(){const _0x8eca12=a14_0x3a62,_0x4e36e0=createInterface({'input':process[_0x8eca12(0x1c5)],'output':process['stdout']});let _0x1023f4;const _0x10dd91=new Promise((_0x1f2c3e,_0x41045f)=>{const _0x321812=_0x8eca12;_0x1023f4=()=>{const _0x458527=a14_0x3a62;_0x1023f4&&(_0x4e36e0['removeListener']('SIGINT',_0x1023f4),_0x1023f4=undefined);try{_0x4e36e0[_0x458527(0x1ce)]();}catch{}_0x41045f(new AbortPrompt());},_0x4e36e0[_0x321812(0x1d4)]('SIGINT',_0x1023f4);}),_0x26d82d=()=>{const _0x51db44=_0x8eca12;_0x1023f4&&(_0x4e36e0[_0x51db44(0x1cf)](_0x51db44(0x1da),_0x1023f4),_0x1023f4=undefined);try{_0x4e36e0[_0x51db44(0x1ce)]();}catch{}};return{'rl':_0x4e36e0,'abortPromise':_0x10dd91,'disposeSuccess':_0x26d82d};}export async function promptAccessKey(_0x3ce1f5=''){const _0x2060e4=a14_0x3a62,{rl:_0x4e6b0f,abortPromise:_0x5a4876,disposeSuccess:_0xff9bbd}=createSafeRl(),_0x380a3f=new Promise(_0x5d0808=>{const _0x402b77=a14_0x3a62,_0xb16ef1=_0x3ce1f5?_0x402b77(0x1c7)+_0x3ce1f5+_0x402b77(0x1cb):'AccessKey\x20(paste\x20ak_...):\x20';_0x4e6b0f['question'](_0xb16ef1,_0x3bd852=>{const _0x10d0ee=_0x402b77;_0xff9bbd(),_0x5d0808(_0x3bd852[_0x10d0ee(0x1ca)]()||_0x3ce1f5);});});return Promise[_0x2060e4(0x1d1)]([_0x380a3f,_0x5a4876]);}export function isAbortPrompt(_0x13d83b){const _0x2311d5=a14_0x3a62;return _0x13d83b instanceof Error&&_0x13d83b[_0x2311d5(0x1d3)]===_0x2311d5(0x1c8);}
@@ -1 +1 @@
1
- function a15_0x8240(_0x277153,_0x3aab31){_0x277153=_0x277153-0x170;const _0x557f9d=a15_0x557f();let _0x824080=_0x557f9d[_0x277153];return _0x824080;}const a15_0x8d9a1b=a15_0x8240;(function(_0x24be5f,_0x520571){const _0x54133d=a15_0x8240,_0x3ee6fc=_0x24be5f();while(!![]){try{const _0x4c8c18=parseInt(_0x54133d(0x183))/0x1+parseInt(_0x54133d(0x17f))/0x2+-parseInt(_0x54133d(0x17c))/0x3*(-parseInt(_0x54133d(0x177))/0x4)+parseInt(_0x54133d(0x174))/0x5*(parseInt(_0x54133d(0x181))/0x6)+-parseInt(_0x54133d(0x17e))/0x7*(-parseInt(_0x54133d(0x186))/0x8)+-parseInt(_0x54133d(0x173))/0x9*(parseInt(_0x54133d(0x184))/0xa)+parseInt(_0x54133d(0x172))/0xb*(-parseInt(_0x54133d(0x179))/0xc);if(_0x4c8c18===_0x520571)break;else _0x3ee6fc['push'](_0x3ee6fc['shift']());}catch(_0x5ba862){_0x3ee6fc['push'](_0x3ee6fc['shift']());}}}(a15_0x557f,0x6bc60));import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x557f(){const _0x250d33=['11zCsuLK','4716fSZXsY','17035RHYzql','version','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','111576ivrUWd','(none)','15512712EZpxVV','detail','gmtModified','3ojaeHI','description','7jNcMCe','704360YYbDVU','name','1182RHGOWi','str','848437RcEItz','16840zIXUHy','functionName','5735136vQiAvw','bff','appCode','read'];a15_0x557f=function(){return _0x250d33;};return a15_0x557f();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x8d9a1b(0x187),'command':a15_0x8d9a1b(0x17a),'description':a15_0x8d9a1b(0x176),'risk':a15_0x8d9a1b(0x171),'flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name'}],async 'execute'(_0x3f245d){const _0x1c973d=a15_0x8d9a1b,_0x310453=await getBffEndpointContract(_0x3f245d[_0x1c973d(0x170)],_0x3f245d[_0x1c973d(0x182)](_0x1c973d(0x180)));return{'ok':!![],'data':{'appCode':_0x310453[_0x1c973d(0x170)],'functionName':_0x310453[_0x1c973d(0x185)],'description':_0x310453[_0x1c973d(0x17d)]||_0x1c973d(0x178),'version':_0x310453[_0x1c973d(0x175)],'gmtModified':_0x310453[_0x1c973d(0x17b)]}};}};
1
+ function a15_0x2ac4(_0x4a23cc,_0x4549bb){_0x4a23cc=_0x4a23cc-0x72;const _0x214276=a15_0x2142();let _0x2ac4d7=_0x214276[_0x4a23cc];return _0x2ac4d7;}const a15_0x45fa74=a15_0x2ac4;(function(_0x22b358,_0x563b91){const _0x3a0f4b=a15_0x2ac4,_0x591ef4=_0x22b358();while(!![]){try{const _0x3bd3cf=parseInt(_0x3a0f4b(0x7c))/0x1+parseInt(_0x3a0f4b(0x7f))/0x2+parseInt(_0x3a0f4b(0x76))/0x3+-parseInt(_0x3a0f4b(0x7e))/0x4+-parseInt(_0x3a0f4b(0x84))/0x5+-parseInt(_0x3a0f4b(0x78))/0x6+-parseInt(_0x3a0f4b(0x77))/0x7*(-parseInt(_0x3a0f4b(0x7b))/0x8);if(_0x3bd3cf===_0x563b91)break;else _0x591ef4['push'](_0x591ef4['shift']());}catch(_0x1b68fd){_0x591ef4['push'](_0x591ef4['shift']());}}}(a15_0x2142,0x2a761));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x45fa74(0x83),'command':a15_0x45fa74(0x7d),'description':a15_0x45fa74(0x82),'risk':a15_0x45fa74(0x75),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x45fa74(0x79)}],async 'execute'(_0x1e5fcf){const _0x169b77=a15_0x45fa74,_0x5effee=await getBffEndpointContract(_0x1e5fcf[_0x169b77(0x73)],_0x1e5fcf[_0x169b77(0x74)]('name'));return{'ok':!![],'data':{'appCode':_0x5effee[_0x169b77(0x73)],'functionName':_0x5effee[_0x169b77(0x81)],'description':_0x5effee[_0x169b77(0x85)]||_0x169b77(0x72),'version':_0x5effee[_0x169b77(0x80)],'gmtModified':_0x5effee[_0x169b77(0x7a)]}};}};function a15_0x2142(){const _0x19da00=['(none)','appCode','str','read','228195IlfyQY','7VzFWvB','1274910PsPjqu','Backend\x20Function\x20name','gmtModified','1673336IVIvUi','156485KBuAPr','detail','56564KBRUVj','172514WHdwVL','version','functionName','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','bff','637135CwpwXV','description'];a15_0x2142=function(){return _0x19da00;};return a15_0x2142();}
@@ -1 +1 @@
1
- const a16_0x18cf8a=a16_0x5ae6;(function(_0x26a208,_0x19cbf7){const _0xb7bf66=a16_0x5ae6,_0x2ca329=_0x26a208();while(!![]){try{const _0x1cce57=parseInt(_0xb7bf66(0xbe))/0x1+-parseInt(_0xb7bf66(0xbd))/0x2+parseInt(_0xb7bf66(0xb7))/0x3*(parseInt(_0xb7bf66(0xae))/0x4)+-parseInt(_0xb7bf66(0xac))/0x5*(parseInt(_0xb7bf66(0xbb))/0x6)+parseInt(_0xb7bf66(0xb6))/0x7+parseInt(_0xb7bf66(0xba))/0x8*(-parseInt(_0xb7bf66(0xad))/0x9)+parseInt(_0xb7bf66(0xb9))/0xa*(parseInt(_0xb7bf66(0xb4))/0xb);if(_0x1cce57===_0x19cbf7)break;else _0x2ca329['push'](_0x2ca329['shift']());}catch(_0x2da1e2){_0x2ca329['push'](_0x2ca329['shift']());}}}(a16_0x3747,0x9e6da));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x3747(){const _0x1868d9=['now','bff','read','str','exec','99xOIVoo','params','1107092eZoIRR','42594lzLVWb','Backend\x20Function\x20name\x20to\x20execute','22970rSERPN','2256jsSdjA','3222186znfBzM','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','557860ManFMA','583715pqRMQG','name','10HXpfcF','774KgJErr','356HdPkOj'];a16_0x3747=function(){return _0x1868d9;};return a16_0x3747();}function a16_0x5ae6(_0x4c4d03,_0x90a5b4){_0x4c4d03=_0x4c4d03-0xac;const _0x3747bd=a16_0x3747();let _0x5ae66e=_0x3747bd[_0x4c4d03];return _0x5ae66e;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x18cf8a(0xb0),'command':a16_0x18cf8a(0xb3),'description':a16_0x18cf8a(0xbc),'risk':a16_0x18cf8a(0xb1),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x18cf8a(0xb8)},PARAMS_FLAG],async 'execute'(_0x2fc531){const _0x704290=a16_0x18cf8a,_0x487376=parseJsonParams(_0x2fc531[_0x704290(0xb2)](_0x704290(0xb5))),_0x3be82f=Date[_0x704290(0xaf)](),_0x34cbb7=await executeSdkBff(_0x2fc531[_0x704290(0xb2)](_0x704290(0xbf)),_0x487376),_0x1803c3=Date[_0x704290(0xaf)]()-_0x3be82f;return{'ok':!![],'data':{'result':_0x34cbb7,'elapsed':_0x1803c3},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x1803c3+'ms'};}};
1
+ const a16_0x1ec9a9=a16_0x23b7;(function(_0xeb0ccc,_0x113b2e){const _0x5c255c=a16_0x23b7,_0x30686d=_0xeb0ccc();while(!![]){try{const _0x2ee3f1=parseInt(_0x5c255c(0x70))/0x1*(parseInt(_0x5c255c(0x76))/0x2)+-parseInt(_0x5c255c(0x6f))/0x3*(-parseInt(_0x5c255c(0x7f))/0x4)+-parseInt(_0x5c255c(0x7a))/0x5+-parseInt(_0x5c255c(0x81))/0x6*(parseInt(_0x5c255c(0x77))/0x7)+-parseInt(_0x5c255c(0x71))/0x8+-parseInt(_0x5c255c(0x72))/0x9*(-parseInt(_0x5c255c(0x78))/0xa)+parseInt(_0x5c255c(0x79))/0xb;if(_0x2ee3f1===_0x113b2e)break;else _0x30686d['push'](_0x30686d['shift']());}catch(_0x293dbc){_0x30686d['push'](_0x30686d['shift']());}}}(a16_0xff63,0xd6f68));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x23b7(_0x4518e1,_0x249462){_0x4518e1=_0x4518e1-0x6f;const _0xff63b9=a16_0xff63();let _0x23b7d4=_0xff63b9[_0x4518e1];return _0x23b7d4;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x1ec9a9(0x75),'command':a16_0x1ec9a9(0x80),'description':a16_0x1ec9a9(0x74),'risk':a16_0x1ec9a9(0x73),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x1ec9a9(0x7d)},PARAMS_FLAG],async 'execute'(_0x704dc3){const _0x1643f6=a16_0x1ec9a9,_0x161c9b=parseJsonParams(_0x704dc3[_0x1643f6(0x7e)]('params')),_0x5cbc15=Date['now'](),_0x3b2a43=await executeSdkBff(_0x704dc3[_0x1643f6(0x7e)](_0x1643f6(0x7b)),_0x161c9b),_0x430831=Date['now']()-_0x5cbc15;return{'ok':!![],'data':{'result':_0x3b2a43,'elapsed':_0x430831},'message':_0x1643f6(0x7c)+_0x430831+'ms'};}};function a16_0xff63(){const _0x23b87d=['Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','bff','766fSlztL','83496oDfFUY','10qsxhOr','25388528GgopOO','4935000albdhC','name','Backend\x20Function\x20executed\x20in\x20','Backend\x20Function\x20name\x20to\x20execute','str','415336SzXNPd','exec','672FAhTik','6jkSXgm','2181HAxZzG','7655968JvAGEd','7284429xUqyox','read'];a16_0xff63=function(){return _0x23b87d;};return a16_0xff63();}
@@ -1 +1 @@
1
- (function(_0x17b77c,_0x54b820){const _0x174648=a17_0x33a7,_0x51caca=_0x17b77c();while(!![]){try{const _0x3008a7=-parseInt(_0x174648(0xd4))/0x1+parseInt(_0x174648(0xd9))/0x2+-parseInt(_0x174648(0xd7))/0x3+parseInt(_0x174648(0xda))/0x4*(parseInt(_0x174648(0xd8))/0x5)+parseInt(_0x174648(0xd6))/0x6+-parseInt(_0x174648(0xdb))/0x7+parseInt(_0x174648(0xd5))/0x8;if(_0x3008a7===_0x54b820)break;else _0x51caca['push'](_0x51caca['shift']());}catch(_0x2e404a){_0x51caca['push'](_0x51caca['shift']());}}}(a17_0x6b7b,0x9404f));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0x6b7b(){const _0x1f5ed3=['68936uVBbip','2810213atrunb','716387fyjfiF','146032Wdkuxv','5906592ZltrCR','101361YMJOMf','40gCbOsi','1234724cRebUy'];a17_0x6b7b=function(){return _0x1f5ed3;};return a17_0x6b7b();}function a17_0x33a7(_0x38b0ee,_0x530749){_0x38b0ee=_0x38b0ee-0xd4;const _0x6b7b32=a17_0x6b7b();let _0x33a7fe=_0x6b7b32[_0x38b0ee];return _0x33a7fe;}export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x1983fe,_0x5decdf){const _0xb4e504=a17_0x2754,_0x3931e5=_0x1983fe();while(!![]){try{const _0x46e444=parseInt(_0xb4e504(0x1c7))/0x1+-parseInt(_0xb4e504(0x1cd))/0x2+parseInt(_0xb4e504(0x1ce))/0x3*(-parseInt(_0xb4e504(0x1c9))/0x4)+-parseInt(_0xb4e504(0x1cb))/0x5+parseInt(_0xb4e504(0x1ca))/0x6+parseInt(_0xb4e504(0x1c6))/0x7*(parseInt(_0xb4e504(0x1cc))/0x8)+parseInt(_0xb4e504(0x1c8))/0x9;if(_0x46e444===_0x5decdf)break;else _0x3931e5['push'](_0x3931e5['shift']());}catch(_0x51f761){_0x3931e5['push'](_0x3931e5['shift']());}}}(a17_0x1331,0xc1d7d));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0x1331(){const _0x35b866=['1065896pQZzvu','3053098jJzdru','1864455NOwTae','35tqCuRl','681110OmqbOa','22325121fYYjYX','8icCwJW','338970UfjICg','1604295jqVyKW'];a17_0x1331=function(){return _0x35b866;};return a17_0x1331();}function a17_0x2754(_0x4303e0,_0x585c93){_0x4303e0=_0x4303e0-0x1c6;const _0x133158=a17_0x1331();let _0x275411=_0x133158[_0x4303e0];return _0x275411;}export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a18_0x9cad73=a18_0x20a3;(function(_0x4261e0,_0x362a2e){const _0x273558=a18_0x20a3,_0x356e09=_0x4261e0();while(!![]){try{const _0x183f1a=parseInt(_0x273558(0x12d))/0x1*(parseInt(_0x273558(0x110))/0x2)+-parseInt(_0x273558(0x121))/0x3*(parseInt(_0x273558(0x11d))/0x4)+-parseInt(_0x273558(0x10e))/0x5*(-parseInt(_0x273558(0x116))/0x6)+parseInt(_0x273558(0x11a))/0x7*(parseInt(_0x273558(0x12a))/0x8)+-parseInt(_0x273558(0x12e))/0x9+parseInt(_0x273558(0x12f))/0xa*(parseInt(_0x273558(0x11f))/0xb)+-parseInt(_0x273558(0x114))/0xc*(parseInt(_0x273558(0x125))/0xd);if(_0x183f1a===_0x362a2e)break;else _0x356e09['push'](_0x356e09['shift']());}catch(_0x31cd11){_0x356e09['push'](_0x356e09['shift']());}}}(a18_0x29b6,0xacae2));import{CliErrors}from'../../errors.js';function a18_0x29b6(){const _0x4fc646=['568qaDoyM','cli-skill-install','\x20installed','25sRHLQM','1233513elNNZJ','173230pWyZkQ','repairCommand','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','CLI\x20Built-in\x20Skill\x20','10cEpwop','error','99118uaoGvH','code','Built-in\x20Skill\x20install\x20failed\x20[','unknown','12385104pwXOQM','log','1673124UBiNJC','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','nonInteractive','apiError','41461AyqzDU','setLogPath',']:\x20','1201228roIwgk','changed','165pgBAsy','installedPath','6TafvhR','skillVersion','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','info','13ytuiwL','inherit','\x20at\x20','cli-skill','\x20is\x20already\x20current'];a18_0x29b6=function(){return _0x4fc646;};return a18_0x29b6();}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a18_0x20a3(_0x214fcc,_0x3bb802){_0x214fcc=_0x214fcc-0x10e;const _0x29b660=a18_0x29b6();let _0x20a3ed=_0x29b660[_0x214fcc];return _0x20a3ed;}export const cliSkillDefinitions=[{'service':a18_0x9cad73(0x128),'command':'install','description':a18_0x9cad73(0x131),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2ae7bb){const _0xdd0914=a18_0x9cad73;logger[_0xdd0914(0x11b)](process['cwd']()),logger[_0xdd0914(0x124)](_0xdd0914(0x12b),_0xdd0914(0x123));const _0x2d0a37=installBuiltinSkill({'stdio':_0x2ae7bb[_0xdd0914(0x118)]?'pipe':_0xdd0914(0x126)});if(!_0x2d0a37['ok'])throw CliErrors[_0xdd0914(0x119)](_0xdd0914(0x112)+(_0x2d0a37[_0xdd0914(0x111)]||'INSTALL_FAILED')+_0xdd0914(0x11c)+(_0x2d0a37[_0xdd0914(0x10f)]||_0xdd0914(0x113)),_0xdd0914(0x117)+_0x2d0a37[_0xdd0914(0x130)]);const _0x53b7c3=_0x2d0a37[_0xdd0914(0x120)]?_0xdd0914(0x127)+_0x2d0a37[_0xdd0914(0x120)]:'';return console[_0xdd0914(0x115)](_0x2d0a37[_0xdd0914(0x11e)]?'CLI\x20Built-in\x20Skill\x20'+_0x2d0a37[_0xdd0914(0x122)]+_0xdd0914(0x12c)+_0x53b7c3:_0xdd0914(0x132)+_0x2d0a37[_0xdd0914(0x122)]+_0xdd0914(0x129)+_0x53b7c3),{'ok':!![]};}}];
1
+ const a18_0x48f305=a18_0x2a4a;function a18_0x2eea(){const _0x6aa050=['read','apiError','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','255941dLXebZ','1366504ENbElR','66TUSIuL','651895cQezkd','log','info','unknown','5861290JpohPQ','install','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','cwd','installedPath','changed','error','\x20installed','nonInteractive','3592520bQqDrv','skillVersion','8JUvEdR','code','22yGWFFC','2328804VaMhLI','885111GgwgZf','18wrBXmR','inherit','cli-skill-install','CLI\x20Built-in\x20Skill\x20','\x20is\x20already\x20current','repairCommand','setLogPath','cli-skill'];a18_0x2eea=function(){return _0x6aa050;};return a18_0x2eea();}(function(_0x37dc53,_0x9aa9c6){const _0x30a7d5=a18_0x2a4a,_0x305551=_0x37dc53();while(!![]){try{const _0x11247f=-parseInt(_0x30a7d5(0x169))/0x1+parseInt(_0x30a7d5(0x159))/0x2+-parseInt(_0x30a7d5(0x15a))/0x3*(-parseInt(_0x30a7d5(0x156))/0x4)+parseInt(_0x30a7d5(0x154))/0x5+parseInt(_0x30a7d5(0x168))/0x6*(-parseInt(_0x30a7d5(0x166))/0x7)+parseInt(_0x30a7d5(0x167))/0x8*(parseInt(_0x30a7d5(0x15b))/0x9)+-parseInt(_0x30a7d5(0x16d))/0xa*(parseInt(_0x30a7d5(0x158))/0xb);if(_0x11247f===_0x9aa9c6)break;else _0x305551['push'](_0x305551['shift']());}catch(_0x518704){_0x305551['push'](_0x305551['shift']());}}}(a18_0x2eea,0x8f9e4));function a18_0x2a4a(_0x2eb0be,_0xa8d837){_0x2eb0be=_0x2eb0be-0x14c;const _0x2eea2c=a18_0x2eea();let _0x2a4a1e=_0x2eea2c[_0x2eb0be];return _0x2a4a1e;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x48f305(0x162),'command':a18_0x48f305(0x14c),'description':a18_0x48f305(0x14d),'risk':a18_0x48f305(0x163),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2749a4){const _0x1f9780=a18_0x48f305;logger[_0x1f9780(0x161)](process[_0x1f9780(0x14e)]()),logger[_0x1f9780(0x16b)](_0x1f9780(0x15d),_0x1f9780(0x165));const _0x3189b0=installBuiltinSkill({'stdio':_0x2749a4[_0x1f9780(0x153)]?'pipe':_0x1f9780(0x15c)});if(!_0x3189b0['ok'])throw CliErrors[_0x1f9780(0x164)]('Built-in\x20Skill\x20install\x20failed\x20['+(_0x3189b0[_0x1f9780(0x157)]||'INSTALL_FAILED')+']:\x20'+(_0x3189b0[_0x1f9780(0x151)]||_0x1f9780(0x16c)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x3189b0[_0x1f9780(0x160)]);const _0x28dc0d=_0x3189b0[_0x1f9780(0x14f)]?'\x20at\x20'+_0x3189b0[_0x1f9780(0x14f)]:'';return console[_0x1f9780(0x16a)](_0x3189b0[_0x1f9780(0x150)]?_0x1f9780(0x15e)+_0x3189b0['skillVersion']+_0x1f9780(0x152)+_0x28dc0d:_0x1f9780(0x15e)+_0x3189b0[_0x1f9780(0x155)]+_0x1f9780(0x15f)+_0x28dc0d),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x5325a5,_0x1f9bfd){const _0x241df7=a19_0x1129,_0x474ea4=_0x5325a5();while(!![]){try{const _0x370b9f=parseInt(_0x241df7(0x187))/0x1+-parseInt(_0x241df7(0x194))/0x2+parseInt(_0x241df7(0x18b))/0x3*(parseInt(_0x241df7(0x192))/0x4)+-parseInt(_0x241df7(0x193))/0x5+parseInt(_0x241df7(0x184))/0x6*(-parseInt(_0x241df7(0x186))/0x7)+-parseInt(_0x241df7(0x17e))/0x8+parseInt(_0x241df7(0x180))/0x9*(parseInt(_0x241df7(0x189))/0xa);if(_0x370b9f===_0x1f9bfd)break;else _0x474ea4['push'](_0x474ea4['shift']());}catch(_0x33ed10){_0x474ea4['push'](_0x474ea4['shift']());}}}(a19_0x1508,0xc9727));function a19_0x1508(){const _0x4388b8=['33410vOhkol','global','183AQsHJN','\x20first.','inProject','newConfigFileName','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','project','Not\x20inside\x20a\x20project\x20(no\x20','5648LjZyot','1812570cVbiNP','1968220SnmGVg','\x20(global)','10923800alYsHc','project-or-global-explicit','6921BiEbIB','validation','Add\x20--global\x20to\x20write\x20to\x20~/',',\x20or\x20create\x20a\x20project-local\x20','187926onDMGN','global-default','77yrGGxn','1226396RxROCr','Use\x20only\x20one\x20config\x20scope\x20flag.'];a19_0x1508=function(){return _0x4388b8;};return a19_0x1508();}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';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';function a19_0x1129(_0x28b7dc,_0x276763){_0x28b7dc=_0x28b7dc-0x17d;const _0x1508ae=a19_0x1508();let _0x11291=_0x1508ae[_0x28b7dc];return _0x11291;}export function resolveConfigScope(_0x31aa03){const _0x1a7655=a19_0x1129,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x5ede24}=_0x31aa03;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x1a7655(0x18f),_0x1a7655(0x188));if(explicitGlobal)return'global';if(explicitProject)return _0x1a7655(0x190);switch(_0x5ede24){case _0x1a7655(0x185):return _0x1a7655(0x18a);case _0x1a7655(0x17f):if(!(_0x31aa03[_0x1a7655(0x18d)]??isInProject()))throw CliErrors[_0x1a7655(0x181)](_0x1a7655(0x191)+PRODUCT_CONFIG[_0x1a7655(0x18e)]+'\x20found).',_0x1a7655(0x182)+PRODUCT_CONFIG['newConfigFileName']+_0x1a7655(0x183)+PRODUCT_CONFIG[_0x1a7655(0x18e)]+_0x1a7655(0x18c));return _0x1a7655(0x190);}}export function toScopeFlags(_0x3d4efa){const _0x1f59b1=a19_0x1129;return{'global':_0x3d4efa===_0x1f59b1(0x18a)};}export function formatScopeLabel(_0x1ee8f0){const _0x3ef6bd=a19_0x1129;return _0x1ee8f0==='global'?_0x3ef6bd(0x17d):'';}
1
+ (function(_0x2bf257,_0x1e6883){const _0x184027=a19_0x549b,_0x38d5db=_0x2bf257();while(!![]){try{const _0x185983=-parseInt(_0x184027(0x9c))/0x1*(parseInt(_0x184027(0x91))/0x2)+-parseInt(_0x184027(0x9a))/0x3*(-parseInt(_0x184027(0x93))/0x4)+parseInt(_0x184027(0xa3))/0x5+-parseInt(_0x184027(0xa5))/0x6*(parseInt(_0x184027(0x92))/0x7)+-parseInt(_0x184027(0x94))/0x8+parseInt(_0x184027(0x96))/0x9*(parseInt(_0x184027(0xa7))/0xa)+-parseInt(_0x184027(0x95))/0xb*(-parseInt(_0x184027(0x98))/0xc);if(_0x185983===_0x1e6883)break;else _0x38d5db['push'](_0x38d5db['shift']());}catch(_0x3d1277){_0x38d5db['push'](_0x38d5db['shift']());}}}(a19_0x3b39,0x44105));function a19_0x549b(_0x2f967a,_0x24a29b){_0x2f967a=_0x2f967a-0x91;const _0x3b39d5=a19_0x3b39();let _0x549b5a=_0x3b39d5[_0x2f967a];return _0x549b5a;}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';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';function a19_0x3b39(){const _0x580c8a=['66OjnjjY','inProject','1922540WXtJJy','global-default','80RczyfS','342251IPrKEO','20JWWFVe','1611352YaXvTr','4257YjtCJL','18oBYQMQ','\x20first.','16548KsKlqX','project','6504KvdlpD','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','11208mJxaKl','Add\x20--global\x20to\x20write\x20to\x20~/','project-or-global-explicit','newConfigFileName','global','\x20found).','validation','2686650DmBEVE','Use\x20only\x20one\x20config\x20scope\x20flag.'];a19_0x3b39=function(){return _0x580c8a;};return a19_0x3b39();}export function resolveConfigScope(_0x20d58a){const _0x48af42=a19_0x549b,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x28f7fb}=_0x20d58a;if(explicitGlobal&&explicitProject)throw CliErrors[_0x48af42(0xa2)](_0x48af42(0x9b),_0x48af42(0xa4));if(explicitGlobal)return _0x48af42(0xa0);if(explicitProject)return _0x48af42(0x99);switch(_0x28f7fb){case _0x48af42(0xa8):return _0x48af42(0xa0);case _0x48af42(0x9e):if(!(_0x20d58a[_0x48af42(0xa6)]??isInProject()))throw CliErrors[_0x48af42(0xa2)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x48af42(0x9f)]+_0x48af42(0xa1),_0x48af42(0x9d)+PRODUCT_CONFIG[_0x48af42(0x9f)]+',\x20or\x20create\x20a\x20project-local\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x48af42(0x97));return _0x48af42(0x99);}}export function toScopeFlags(_0x1094d3){const _0x4b6b7b=a19_0x549b;return{'global':_0x1094d3===_0x4b6b7b(0xa0)};}export function formatScopeLabel(_0x5584f3){const _0x5cb918=a19_0x549b;return _0x5584f3===_0x5cb918(0xa0)?'\x20(global)':'';}
@@ -1 +1 @@
1
- function a20_0x4682(_0x2017d9,_0x120940){_0x2017d9=_0x2017d9-0x151;const _0x2d5e09=a20_0x2d5e();let _0x46821f=_0x2d5e09[_0x2017d9];return _0x46821f;}(function(_0x33a26f,_0x5aed39){const _0x333f39=a20_0x4682,_0x57abb3=_0x33a26f();while(!![]){try{const _0x4c612c=parseInt(_0x333f39(0x156))/0x1+-parseInt(_0x333f39(0x169))/0x2+parseInt(_0x333f39(0x158))/0x3*(-parseInt(_0x333f39(0x15c))/0x4)+-parseInt(_0x333f39(0x153))/0x5*(parseInt(_0x333f39(0x165))/0x6)+-parseInt(_0x333f39(0x161))/0x7*(-parseInt(_0x333f39(0x15b))/0x8)+parseInt(_0x333f39(0x15a))/0x9+parseInt(_0x333f39(0x15d))/0xa*(-parseInt(_0x333f39(0x15f))/0xb);if(_0x4c612c===_0x5aed39)break;else _0x57abb3['push'](_0x57abb3['shift']());}catch(_0x33da6e){_0x57abb3['push'](_0x57abb3['shift']());}}}(a20_0x2d5e,0xdc4e6));import{CliErrors}from'../../errors.js';function isSet(_0x3f8ec8,_0x10d1e9){const _0x44ee45=a20_0x4682,_0x589343=_0x3f8ec8[_0x44ee45(0x16a)](_0x10d1e9);return _0x589343!==undefined&&_0x589343!==''&&_0x589343!==![]&&_0x589343!==0x0;}function a20_0x2d5e(){const _0x23f543=['some','43519DIdMQm','map','test','validation','2082cqZuUJ','length',',\x20got\x20\x22','filter','222154lwDogT','flag','Exactly\x20one\x20of\x20','Invalid\x20--','23865ZtAKGx','\x20is\x20required\x20for\x20`','Provide\x20one\x20of:\x20','1312789ROgeRK','join','9186KJOFAf','str','7139799vMSSAL','1600IcmtIn','168TatHtn','5512140XtTCcP','Use\x20only\x20one\x20of:\x20','11WBCHpL'];a20_0x2d5e=function(){return _0x23f543;};return a20_0x2d5e();}function fmtNames(_0x57e279){const _0xebeec4=a20_0x4682;return _0x57e279[_0xebeec4(0x162)](_0x41e04f=>'--'+_0x41e04f)[_0xebeec4(0x157)](',\x20');}export function requireOneOf(_0x127255,_0x2d46d4,_0x23294c){const _0x5dac02=a20_0x4682,_0x5938c4=_0x2d46d4[_0x5dac02(0x168)](_0x413329=>isSet(_0x127255,_0x413329));if(_0x5938c4[_0x5dac02(0x166)]!==0x1)throw CliErrors[_0x5dac02(0x164)](_0x5938c4[_0x5dac02(0x166)]===0x0?_0x5dac02(0x151)+fmtNames(_0x2d46d4)+_0x5dac02(0x154)+_0x23294c+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x2d46d4)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x5938c4)+'.',_0x5938c4[_0x5dac02(0x166)]===0x0?_0x5dac02(0x155)+fmtNames(_0x2d46d4):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x3a8e1d,_0x11346b,_0x52e738){const _0x1b387e=a20_0x4682;if(!_0x11346b[_0x1b387e(0x160)](_0x40b96a=>isSet(_0x3a8e1d,_0x40b96a)))throw CliErrors['validation']('At\x20least\x20one\x20of\x20'+fmtNames(_0x11346b)+_0x1b387e(0x154)+_0x52e738+'`.',_0x1b387e(0x155)+fmtNames(_0x11346b));}export function mutuallyExclusive(_0x447412,_0x17140c,_0x3661fb){const _0x43ba65=a20_0x4682,_0x59e3d7=_0x17140c[_0x43ba65(0x168)](_0x1811db=>isSet(_0x447412,_0x1811db));if(_0x59e3d7[_0x43ba65(0x166)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x59e3d7)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x3661fb+'`.',_0x43ba65(0x15e)+fmtNames(_0x17140c));}export function validatePattern(_0x4a5960,_0x24e4c8,_0x1036b2,_0x2d94bf){const _0x41bd28=a20_0x4682,_0x459028=_0x4a5960[_0x41bd28(0x159)](_0x24e4c8);if(_0x459028&&!_0x1036b2[_0x41bd28(0x163)](_0x459028))throw CliErrors[_0x41bd28(0x164)](_0x41bd28(0x152)+_0x24e4c8+':\x20expected\x20'+_0x2d94bf+_0x41bd28(0x167)+_0x459028+'\x22.');}
1
+ (function(_0x53db6f,_0x507b24){const _0x2e6327=a20_0x5bf8,_0x3dd72a=_0x53db6f();while(!![]){try{const _0x5d7d3d=parseInt(_0x2e6327(0x15e))/0x1*(parseInt(_0x2e6327(0x155))/0x2)+parseInt(_0x2e6327(0x166))/0x3+parseInt(_0x2e6327(0x15a))/0x4+parseInt(_0x2e6327(0x158))/0x5+-parseInt(_0x2e6327(0x15f))/0x6*(parseInt(_0x2e6327(0x153))/0x7)+-parseInt(_0x2e6327(0x151))/0x8+parseInt(_0x2e6327(0x164))/0x9*(-parseInt(_0x2e6327(0x15d))/0xa);if(_0x5d7d3d===_0x507b24)break;else _0x3dd72a['push'](_0x3dd72a['shift']());}catch(_0x2039fc){_0x3dd72a['push'](_0x3dd72a['shift']());}}}(a20_0x4914,0x1e8dc));import{CliErrors}from'../../errors.js';function isSet(_0x16d006,_0x15742e){const _0x4da739=_0x16d006['flag'](_0x15742e);return _0x4da739!==undefined&&_0x4da739!==''&&_0x4da739!==![]&&_0x4da739!==0x0;}function a20_0x4914(){const _0x4ef35b=['validation','At\x20least\x20one\x20of\x20','541440XhjsLW','Invalid\x20--','895260hQTXSH','some','filter','20NEHXYV','1zSlLLq','6jSqNXP','test','Provide\x20one\x20of:\x20',',\x20got\x20\x22',':\x20expected\x20','242397dnkUdL','\x20is\x20allowed,\x20found:\x20','245703RZLMey','Only\x20one\x20of\x20','length','map','str','1810744cyVbjX','\x20is\x20required\x20for\x20`','1116738gweaTz','\x20are\x20mutually\x20exclusive\x20for\x20`','301774bHqOVG'];a20_0x4914=function(){return _0x4ef35b;};return a20_0x4914();}function fmtNames(_0x26f3bb){const _0x26541a=a20_0x5bf8;return _0x26f3bb[_0x26541a(0x169)](_0x28c0b0=>'--'+_0x28c0b0)['join'](',\x20');}export function requireOneOf(_0x3d7566,_0x4e6e9f,_0x44d576){const _0xde5619=a20_0x5bf8,_0x2f1ff5=_0x4e6e9f[_0xde5619(0x15c)](_0x1f6f73=>isSet(_0x3d7566,_0x1f6f73));if(_0x2f1ff5['length']!==0x1)throw CliErrors[_0xde5619(0x156)](_0x2f1ff5[_0xde5619(0x168)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x4e6e9f)+_0xde5619(0x152)+_0x44d576+'`.':_0xde5619(0x167)+fmtNames(_0x4e6e9f)+_0xde5619(0x165)+fmtNames(_0x2f1ff5)+'.',_0x2f1ff5[_0xde5619(0x168)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x4e6e9f):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x13fab0,_0x38c28f,_0x492dde){const _0x54676e=a20_0x5bf8;if(!_0x38c28f[_0x54676e(0x15b)](_0x2237ea=>isSet(_0x13fab0,_0x2237ea)))throw CliErrors[_0x54676e(0x156)](_0x54676e(0x157)+fmtNames(_0x38c28f)+_0x54676e(0x152)+_0x492dde+'`.',_0x54676e(0x161)+fmtNames(_0x38c28f));}function a20_0x5bf8(_0x88c980,_0x297461){_0x88c980=_0x88c980-0x150;const _0x491401=a20_0x4914();let _0x5bf895=_0x491401[_0x88c980];return _0x5bf895;}export function mutuallyExclusive(_0x170c44,_0x888e80,_0x570350){const _0x406d6b=a20_0x5bf8,_0x4e5725=_0x888e80[_0x406d6b(0x15c)](_0x96c11a=>isSet(_0x170c44,_0x96c11a));if(_0x4e5725[_0x406d6b(0x168)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x4e5725)+_0x406d6b(0x154)+_0x570350+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x888e80));}export function validatePattern(_0x1dd4f5,_0x4b5dcc,_0xfa777,_0x485fcc){const _0x2350d5=a20_0x5bf8,_0x32977b=_0x1dd4f5[_0x2350d5(0x150)](_0x4b5dcc);if(_0x32977b&&!_0xfa777[_0x2350d5(0x160)](_0x32977b))throw CliErrors[_0x2350d5(0x156)](_0x2350d5(0x159)+_0x4b5dcc+_0x2350d5(0x163)+_0x485fcc+_0x2350d5(0x162)+_0x32977b+'\x22.');}
@@ -1 +1 @@
1
- function a21_0x549e(_0x3d96c0,_0x1dc71e){_0x3d96c0=_0x3d96c0-0x13e;const _0x27df5e=a21_0x27df();let _0x549e6d=_0x27df5e[_0x3d96c0];return _0x549e6d;}const a21_0x23aafe=a21_0x549e;(function(_0x32d3d7,_0x137526){const _0x7e4d77=a21_0x549e,_0x5ac038=_0x32d3d7();while(!![]){try{const _0x4e6bde=parseInt(_0x7e4d77(0x142))/0x1+parseInt(_0x7e4d77(0x143))/0x2+-parseInt(_0x7e4d77(0x14c))/0x3+-parseInt(_0x7e4d77(0x145))/0x4+parseInt(_0x7e4d77(0x14d))/0x5*(-parseInt(_0x7e4d77(0x14f))/0x6)+-parseInt(_0x7e4d77(0x147))/0x7+parseInt(_0x7e4d77(0x13e))/0x8;if(_0x4e6bde===_0x137526)break;else _0x5ac038['push'](_0x5ac038['shift']());}catch(_0xe50655){_0x5ac038['push'](_0x5ac038['shift']());}}}(a21_0x27df,0x30f61));export const GLOBAL_SCOPE_FLAG={'name':a21_0x23aafe(0x140),'type':'boolean','default':![],'description':a21_0x23aafe(0x141)};function a21_0x27df(){const _0xb0e5c7=['266988KTDTpv','3506vAXvLX','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','1466608kfgBlw','Resource\x20name\x20for\x20lookup','2369815nOBlRe','params','Return\x20full\x20raw\x20response\x20object','sqlcode','code','6384eqiAqi','612995YeMSXg','string','18Mhnuaz','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','8055408KtCEPq','Resource\x20ID','global','Write\x20to\x20the\x20global\x20configuration'];a21_0x27df=function(){return _0xb0e5c7;};return a21_0x27df();}export const CODE_FLAG={'name':a21_0x23aafe(0x14b),'type':a21_0x23aafe(0x14e),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x23aafe(0x144)}};export const SQLCODE_FLAG={'name':a21_0x23aafe(0x14a),'type':'string','required':!![],'description':a21_0x23aafe(0x151),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':'verbose','type':'boolean','description':a21_0x23aafe(0x149)};export const PARAMS_FLAG={'name':a21_0x23aafe(0x148),'type':a21_0x23aafe(0x14e),'description':a21_0x23aafe(0x150)};export const NAME_FLAG={'name':'name','type':a21_0x23aafe(0x14e),'description':a21_0x23aafe(0x146)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a21_0x23aafe(0x13f)};
1
+ function a21_0x58e2(){const _0x308aed=['109720RDJYgV','Return\x20full\x20raw\x20response\x20object','1370973lJCjsY','4bKMFbv','global','sqlcode','boolean','Resource\x20ID','1804572nFCoPR','string','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','Write\x20to\x20the\x20global\x20configuration','Resource\x20name\x20for\x20lookup','3071763ozZFlN','verbose','1332455uCwtFa','name','number','319JGHGad','98320qjUtbB','Dataset\x20code\x20(32-char\x20hex\x20UUID)','10YTlzYE','code','2272000yakFfe','12yxCrJc','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'];a21_0x58e2=function(){return _0x308aed;};return a21_0x58e2();}const a21_0x299583=a21_0x4531;(function(_0x3cbed6,_0x4ef1a6){const _0x251497=a21_0x4531,_0x5f44ff=_0x3cbed6();while(!![]){try{const _0x1a3c35=parseInt(_0x251497(0x1dc))/0x1*(parseInt(_0x251497(0x1de))/0x2)+-parseInt(_0x251497(0x1cb))/0x3*(-parseInt(_0x251497(0x1cc))/0x4)+-parseInt(_0x251497(0x1d8))/0x5*(parseInt(_0x251497(0x1e1))/0x6)+-parseInt(_0x251497(0x1d1))/0x7+parseInt(_0x251497(0x1e0))/0x8+parseInt(_0x251497(0x1d6))/0x9+-parseInt(_0x251497(0x1e3))/0xa*(parseInt(_0x251497(0x1db))/0xb);if(_0x1a3c35===_0x4ef1a6)break;else _0x5f44ff['push'](_0x5f44ff['shift']());}catch(_0x1b315a){_0x5f44ff['push'](_0x5f44ff['shift']());}}}(a21_0x58e2,0x71824));export const GLOBAL_SCOPE_FLAG={'name':a21_0x299583(0x1cd),'type':a21_0x299583(0x1cf),'default':![],'description':a21_0x299583(0x1d4)};function a21_0x4531(_0x3f215c,_0x2846a1){_0x3f215c=_0x3f215c-0x1cb;const _0x58e24e=a21_0x58e2();let _0x453158=_0x58e24e[_0x3f215c];return _0x453158;}export const CODE_FLAG={'name':a21_0x299583(0x1df),'type':a21_0x299583(0x1d2),'required':!![],'description':a21_0x299583(0x1dd),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x299583(0x1d3)}};export const SQLCODE_FLAG={'name':a21_0x299583(0x1ce),'type':a21_0x299583(0x1d2),'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_0x299583(0x1e2)}};export const VERBOSE_FLAG={'name':a21_0x299583(0x1d7),'type':a21_0x299583(0x1cf),'description':a21_0x299583(0x1e4)};export const PARAMS_FLAG={'name':'params','type':a21_0x299583(0x1d2),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a21_0x299583(0x1d9),'type':'string','description':a21_0x299583(0x1d5)};export const ID_FLAG={'name':'id','type':a21_0x299583(0x1da),'required':!![],'description':a21_0x299583(0x1d0)};
@@ -1 +1 @@
1
- (function(_0x188368,_0x1118ec){const _0xe2df77=a22_0xb534,_0x138063=_0x188368();while(!![]){try{const _0x321d12=parseInt(_0xe2df77(0x18d))/0x1*(-parseInt(_0xe2df77(0x1a0))/0x2)+-parseInt(_0xe2df77(0x19d))/0x3*(parseInt(_0xe2df77(0x190))/0x4)+-parseInt(_0xe2df77(0x18c))/0x5*(parseInt(_0xe2df77(0x19f))/0x6)+parseInt(_0xe2df77(0x199))/0x7*(-parseInt(_0xe2df77(0x18f))/0x8)+-parseInt(_0xe2df77(0x19b))/0x9+parseInt(_0xe2df77(0x19c))/0xa+parseInt(_0xe2df77(0x192))/0xb;if(_0x321d12===_0x1118ec)break;else _0x138063['push'](_0x138063['shift']());}catch(_0x9bd632){_0x138063['push'](_0x138063['shift']());}}}(a22_0x57f1,0x862fb));import{existsSync,statSync}from'node:fs';function a22_0x57f1(){const _0xd70279=['29dWLEeJ','size','7466504OvuKrF','15220bmOuoy','toFixed','24895101kQnnAx','\x20MB','trim','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','validation','ceil','File\x20not\x20found:\x20','7UYGeBM','\x20path\x20is\x20required.','899091VCbUss','3212520lXspTe','123mrDgSO','isFile','186ZtcHWo','16046mSEeLF','File\x20is\x20not\x20a\x20regular\x20file:\x20','98860MwrzpG'];a22_0x57f1=function(){return _0xd70279;};return a22_0x57f1();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a22_0xb534(_0x2b2474,_0x1a19da){_0x2b2474=_0x2b2474-0x18b;const _0x57f193=a22_0x57f1();let _0xb534c5=_0x57f193[_0x2b2474];return _0xb534c5;}function formatBytes(_0x404750){const _0x251f96=a22_0xb534;if(_0x404750>=BYTES_PER_MB){const _0x22aba0=Math[_0x251f96(0x197)](_0x404750/BYTES_PER_MB*0x64)/0x64;return _0x22aba0[_0x251f96(0x191)](0x2)+_0x251f96(0x193);}return _0x404750+'\x20B';}export function requireRuntimeUploadFile(_0x3afba1,_0x522ccd){const _0x1c6b89=a22_0xb534,_0x5efb94=_0x3afba1[_0x1c6b89(0x194)]();if(!_0x5efb94)throw CliErrors[_0x1c6b89(0x196)](_0x522ccd+_0x1c6b89(0x19a));if(!existsSync(_0x5efb94))throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x198)+_0x5efb94);const _0x2310b7=statSync(_0x5efb94);if(!_0x2310b7[_0x1c6b89(0x19e)]())throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x18b)+_0x5efb94);if(_0x2310b7['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x195)+_0x5efb94+'\x20('+formatBytes(_0x2310b7[_0x1c6b89(0x18e)])+')');return{'path':_0x5efb94,'size':_0x2310b7[_0x1c6b89(0x18e)]};}
1
+ function a22_0x2d72(_0x2b97ba,_0x3a59da){_0x2b97ba=_0x2b97ba-0x17b;const _0x33bf85=a22_0x33bf();let _0x2d7227=_0x33bf85[_0x2b97ba];return _0x2d7227;}(function(_0x5bc1e9,_0x1763fa){const _0x529899=a22_0x2d72,_0x5be375=_0x5bc1e9();while(!![]){try{const _0x2f5f63=-parseInt(_0x529899(0x17f))/0x1*(-parseInt(_0x529899(0x17d))/0x2)+parseInt(_0x529899(0x17e))/0x3+-parseInt(_0x529899(0x184))/0x4*(parseInt(_0x529899(0x18d))/0x5)+parseInt(_0x529899(0x186))/0x6*(-parseInt(_0x529899(0x182))/0x7)+-parseInt(_0x529899(0x17b))/0x8*(-parseInt(_0x529899(0x187))/0x9)+-parseInt(_0x529899(0x188))/0xa+parseInt(_0x529899(0x18f))/0xb*(parseInt(_0x529899(0x183))/0xc);if(_0x2f5f63===_0x1763fa)break;else _0x5be375['push'](_0x5be375['shift']());}catch(_0xbaf78a){_0x5be375['push'](_0x5be375['shift']());}}}(a22_0x33bf,0xb3aa6));import{existsSync,statSync}from'node:fs';function a22_0x33bf(){const _0x45a181=['size','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','589315cCyBoA','ceil','451tTtsxn','isFile','8CgyaCb','validation','2pNdEoz','3725751vsInfv','371128wtBAKd','toFixed','\x20path\x20is\x20required.','2947lzvMqy','201084mzkVAr','20bmbRKv','\x20MB','3966OBMZvv','2807829mGCHxi','10085570ePFlkh','trim'];a22_0x33bf=function(){return _0x45a181;};return a22_0x33bf();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x8ba32e){const _0xab3ffd=a22_0x2d72;if(_0x8ba32e>=BYTES_PER_MB){const _0x48a250=Math[_0xab3ffd(0x18e)](_0x8ba32e/BYTES_PER_MB*0x64)/0x64;return _0x48a250[_0xab3ffd(0x180)](0x2)+_0xab3ffd(0x185);}return _0x8ba32e+'\x20B';}export function requireRuntimeUploadFile(_0x113d91,_0x4343fd){const _0x163cad=a22_0x2d72,_0x44c9b3=_0x113d91[_0x163cad(0x189)]();if(!_0x44c9b3)throw CliErrors[_0x163cad(0x17c)](_0x4343fd+_0x163cad(0x181));if(!existsSync(_0x44c9b3))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x44c9b3);const _0x2d7341=statSync(_0x44c9b3);if(!_0x2d7341[_0x163cad(0x190)]())throw CliErrors['validation'](_0x163cad(0x18b)+_0x44c9b3);if(_0x2d7341[_0x163cad(0x18a)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x163cad(0x17c)](_0x163cad(0x18c)+_0x44c9b3+'\x20('+formatBytes(_0x2d7341[_0x163cad(0x18a)])+')');return{'path':_0x44c9b3,'size':_0x2d7341[_0x163cad(0x18a)]};}
@@ -1 +1 @@
1
- const a23_0x1053e1=a23_0x534c;(function(_0x23361a,_0x126995){const _0x3b60a9=a23_0x534c,_0x1cea42=_0x23361a();while(!![]){try{const _0x10589a=parseInt(_0x3b60a9(0x114))/0x1*(-parseInt(_0x3b60a9(0x106))/0x2)+parseInt(_0x3b60a9(0xff))/0x3*(-parseInt(_0x3b60a9(0x119))/0x4)+parseInt(_0x3b60a9(0x101))/0x5+parseInt(_0x3b60a9(0x10b))/0x6+parseInt(_0x3b60a9(0x11c))/0x7*(-parseInt(_0x3b60a9(0xfa))/0x8)+-parseInt(_0x3b60a9(0x116))/0x9*(parseInt(_0x3b60a9(0x11e))/0xa)+parseInt(_0x3b60a9(0x10f))/0xb;if(_0x10589a===_0x126995)break;else _0x1cea42['push'](_0x1cea42['shift']());}catch(_0x24c3d5){_0x1cea42['push'](_0x1cea42['shift']());}}}(a23_0xce4f,0x4d718));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';function a23_0x534c(_0x20269c,_0x82941b){_0x20269c=_0x20269c-0xef;const _0xce4f80=a23_0xce4f();let _0x534c1c=_0xce4f80[_0x20269c];return _0x534c1c;}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(_0x522c1f){const _0x1824ba=a23_0x534c,_0x497f3e=_0x522c1f[_0x1824ba(0x12f)]('.');if(_0x497f3e[_0x1824ba(0xfd)]!==0x3||_0x497f3e[0x0]!==_0x1824ba(0x104)||_0x497f3e[0x2]!==_0x1824ba(0x10c))return undefined;const _0x227495=_0x497f3e[0x1]?.[_0x1824ba(0x12b)]();return _0x227495?_0x227495:undefined;}function a23_0xce4f(){const _0x57b8ee=['get','\x20config\x20get\x20<key>','trim','(none)','read','includes','split','Value\x20to\x20assign','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','isArray','delete','object','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','format','field','Missing\x20key\x20or\x20value.','project-or-global-explicit','Delete\x20a\x20configuration\x20value','Settable\x20keys:\x20','\x20\x20global:\x20\x20','\x20(global)','pretty','8FBFRkh','config','join','length','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','15SXpaTU','set','2426900OGnfgC','key','accessKey','apps','Usage:\x20','2ylppYU','Missing\x20key\x20argument.','validation','keys','write','2034978ZxWAuU','appcode','Get\x20a\x20config\x20value','locale','11094424aANrYf','Key\x20not\x20found:\x20','Deleted\x20`','Config\x20files:\x0a','Set\x20a\x20configuration\x20value','265417QpRWOu','Key\x20already\x20absent:\x20','511587fDJuQk','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20\x22','373144qJvJTi','../../context.js','log','4294801VPWeHB','pageSize','30UAOGPG','\x22\x20is\x20not\x20settable.','value','pageSize\x20must\x20be\x20a\x20positive\x20number','alias','stringify','args','global','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US',';\x20apps.<alias>.appcode'];a23_0xce4f=function(){return _0x57b8ee;};return a23_0xce4f();}function parseAliasDeleteKey(_0x4be56e){const _0x1d5469=a23_0x534c,_0x238d14=_0x4be56e['split']('.');if(_0x238d14[_0x1d5469(0xfd)]===0x2&&_0x238d14[0x0]===_0x1d5469(0x104)){const _0xd6e990=_0x238d14[0x1]?.[_0x1d5469(0x12b)]();return _0xd6e990?{'alias':_0xd6e990}:undefined;}if(_0x238d14[_0x1d5469(0xfd)]===0x3&&_0x238d14[0x0]===_0x1d5469(0x104)&&_0x238d14[0x2]===_0x1d5469(0x10c)){const _0x328809=_0x238d14[0x1]?.[_0x1d5469(0x12b)]();return _0x328809?{'alias':_0x328809,'field':_0x1d5469(0x10c)}:undefined;}return undefined;}function setLocalAppAlias(_0x93782c,_0x504984,_0x1c8caa){const _0x52defe=a23_0x534c,_0x3c3f0a=_0x93782c[_0x52defe(0x104)]&&typeof _0x93782c[_0x52defe(0x104)]===_0x52defe(0xef)&&!Array['isArray'](_0x93782c[_0x52defe(0x104)])?_0x93782c['apps']:{},_0x392718=_0x3c3f0a[_0x504984]&&typeof _0x3c3f0a[_0x504984]==='object'&&!Array[_0x52defe(0x132)](_0x3c3f0a[_0x504984])?_0x3c3f0a[_0x504984]:{};_0x392718[_0x52defe(0x10c)]=_0x1c8caa,_0x3c3f0a[_0x504984]=_0x392718,_0x93782c['apps']=_0x3c3f0a;}function deleteLocalAppAlias(_0x3915cd,_0x18f7e3){const _0x21bb1c=a23_0x534c;if(!_0x3915cd['apps']||typeof _0x3915cd['apps']!==_0x21bb1c(0xef)||Array[_0x21bb1c(0x132)](_0x3915cd['apps']))return![];const _0x4619bf=_0x3915cd['apps'],_0x1f775c=_0x4619bf[_0x18f7e3[_0x21bb1c(0x122)]];if(!_0x1f775c||typeof _0x1f775c!=='object'||Array[_0x21bb1c(0x132)](_0x1f775c))return![];if(!_0x18f7e3[_0x21bb1c(0xf2)])return delete _0x4619bf[_0x18f7e3['alias']],!![];if(!(_0x18f7e3['field']in _0x1f775c))return![];return delete _0x1f775c[_0x18f7e3[_0x21bb1c(0xf2)]],Object[_0x21bb1c(0x109)](_0x1f775c)['length']===0x0&&delete _0x4619bf[_0x18f7e3['alias']],!![];}const listDef={'service':a23_0x1053e1(0xfb),'command':'list','description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xf40a9){const _0x39ecf3=a23_0x1053e1,{buildConfigFromFlags:_0x586a54}=await import(_0x39ecf3(0x11a)),_0x5f155b=_0x586a54({}),_0x5611c6=redactCliConfigCredentials(_0x5f155b['raw']),_0x226a79=getProjectConfigPath(),_0x19531d=resolveWriteConfigPath(_0x39ecf3(0x125));if(_0xf40a9[_0x39ecf3(0xf1)]===_0x39ecf3(0xf9))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x5611c6,null,0x2)+'\x0a\x0a')+_0x39ecf3(0x112)+('\x20\x20project:\x20'+(_0x226a79??_0x39ecf3(0x12c))+'\x0a')+(_0x39ecf3(0xf7)+_0x19531d)};return{'ok':!![],'data':{'effective':_0x5611c6,'configFiles':{'project':_0x226a79??null,'global':_0x19531d}}};}},getDef={'service':a23_0x1053e1(0xfb),'command':a23_0x1053e1(0x129),'description':a23_0x1053e1(0x10d),'risk':a23_0x1053e1(0x12d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':a23_0x1053e1(0x131),'required':!![]}],'flags':[],async 'execute'(_0x53c6c0){const _0x43f5e2=a23_0x1053e1,_0x13deda=_0x53c6c0['args'][0x0];if(!_0x13deda)throw CliErrors['validation'](_0x43f5e2(0x107),_0x43f5e2(0x105)+CLI_BIN_NAME+_0x43f5e2(0x12a));const {buildConfigFromFlags:_0x273933}=await import(_0x43f5e2(0x11a)),{raw:_0x4677ec}=_0x273933({});if(_0x13deda[_0x43f5e2(0x12e)]('.')){const _0x1ed4a7=_0x13deda[_0x43f5e2(0x12f)]('.');let _0x399bfc=_0x4677ec;for(const _0x4aa337 of _0x1ed4a7){if(_0x399bfc==null||typeof _0x399bfc!=='object')throw CliErrors[_0x43f5e2(0x108)](_0x43f5e2(0x110)+_0x13deda);_0x399bfc=_0x399bfc[_0x4aa337];}if(_0x399bfc===undefined)throw CliErrors[_0x43f5e2(0x108)](_0x43f5e2(0x110)+_0x13deda);const _0x27ed0e=redactCliConfigValue(_0x13deda,_0x399bfc);return console[_0x43f5e2(0x11b)](typeof _0x27ed0e===_0x43f5e2(0xef)?JSON[_0x43f5e2(0x123)](_0x27ed0e,null,0x2):String(_0x27ed0e)),{'ok':!![]};}const _0x116c06=_0x4677ec[_0x13deda];if(_0x116c06===undefined)throw CliErrors[_0x43f5e2(0x108)]('Key\x20not\x20found:\x20'+_0x13deda);const _0x594d33=redactCliConfigValue(_0x13deda,_0x116c06);return console[_0x43f5e2(0x11b)](typeof _0x594d33===_0x43f5e2(0xef)?JSON[_0x43f5e2(0x123)](_0x594d33,null,0x2):String(_0x594d33)),{'ok':!![]};}},setDef={'service':a23_0x1053e1(0xfb),'command':a23_0x1053e1(0x100),'description':a23_0x1053e1(0x113),'risk':'write','confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x1053e1(0x120),'description':a23_0x1053e1(0x130),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x38c4bb){const _0x59e404=a23_0x1053e1,_0x548906=_0x38c4bb[_0x59e404(0x124)][0x0],_0x253a24=_0x38c4bb[_0x59e404(0x124)][0x1];if(!_0x548906||_0x253a24===undefined)throw CliErrors[_0x59e404(0x108)](_0x59e404(0xf3),_0x59e404(0x105)+CLI_BIN_NAME+_0x59e404(0x126));if(ENUM_KEYS[_0x548906]&&!ENUM_KEYS[_0x548906][_0x59e404(0x12e)](_0x253a24))throw CliErrors[_0x59e404(0x108)](_0x59e404(0x118)+_0x548906+_0x59e404(0x117)+ENUM_KEYS[_0x548906][_0x59e404(0xfc)](',\x20'));if(isCliProtectedConfigKey(_0x548906))throw CliErrors[_0x59e404(0x108)]('\x22'+_0x548906+_0x59e404(0xf0));if(_0x548906===_0x59e404(0x11d)){const _0x3fe140=Number(_0x253a24);if(isNaN(_0x3fe140)||_0x3fe140<=0x0)throw CliErrors[_0x59e404(0x108)](_0x59e404(0x121));}const _0x4db576=resolveWriteScope({'explicitGlobal':_0x38c4bb['bool'](_0x59e404(0x125)),'policy':'project-or-global-explicit'}),_0x37fffc=toScopeFlags(_0x4db576),_0x288058=readScopedConfig(_0x37fffc),_0x34f197=parseAliasAppcodeSetKey(_0x548906);if(!_0x34f197&&!isTopLevelConfigKey(_0x548906))throw CliErrors[_0x59e404(0x108)]('Top-level\x20key\x20\x22'+_0x548906+_0x59e404(0x11f),_0x59e404(0xf6)+getTopLevelConfigKeySummary()+_0x59e404(0x128));if(_0x34f197)setLocalAppAlias(_0x288058,_0x34f197,_0x253a24);else{if(_0x548906===_0x59e404(0x10e)){const _0x1f1a32=normalizeLocale(_0x253a24);if(!_0x1f1a32)throw CliErrors[_0x59e404(0x108)]('Invalid\x20locale\x20value.',_0x59e404(0x127));_0x288058[_0x59e404(0x10e)]=_0x1f1a32;}else _0x288058[_0x548906]=_0x548906===_0x59e404(0x11d)?Number(_0x253a24):DOMAIN_CONFIG_FIELDS[_0x59e404(0x12e)](_0x548906)?normalizeDomainOrigin(_0x548906,_0x253a24):_0x253a24;}const _0x9ec08=_0x548906===_0x59e404(0x103)?maskCliAccessKey(_0x253a24):!_0x34f197&&_0x548906===_0x59e404(0x10e)?String(_0x288058[_0x59e404(0x10e)]):_0x253a24;return console[_0x59e404(0x11b)]('Set\x20`'+_0x548906+'`\x20=\x20\x22'+_0x9ec08+'\x22'+(_0x4db576===_0x59e404(0x125)?_0x59e404(0xf8):'')),writeScopedConfig(_0x288058,_0x37fffc),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x1053e1(0x133),'description':a23_0x1053e1(0xf5),'risk':a23_0x1053e1(0x10a),'confirmationDescription':a23_0x1053e1(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x51f80c){const _0x9fc2d0=a23_0x1053e1,_0x44ca96=_0x51f80c[_0x9fc2d0(0x124)][0x0];if(!_0x44ca96)throw CliErrors[_0x9fc2d0(0x108)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x44ca96))throw CliErrors[_0x9fc2d0(0x108)]('\x22'+_0x44ca96+_0x9fc2d0(0xf0));const _0x460354=resolveWriteScope({'explicitGlobal':_0x51f80c['bool'](_0x9fc2d0(0x125)),'policy':_0x9fc2d0(0xf4)}),_0xabba9=toScopeFlags(_0x460354),_0x9009fc=readScopedConfig(_0xabba9),_0x4c55b5=parseAliasDeleteKey(_0x44ca96);if(_0x4c55b5){if(!deleteLocalAppAlias(_0x9009fc,_0x4c55b5))return console[_0x9fc2d0(0x11b)]('Key\x20already\x20absent:\x20'+_0x44ca96+(_0x460354===_0x9fc2d0(0x125)?_0x9fc2d0(0xf8):'')),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':![]}};return console[_0x9fc2d0(0x11b)]('Deleted\x20`'+_0x44ca96+'`'+(_0x460354===_0x9fc2d0(0x125)?'\x20(global)':'')),writeScopedConfig(_0x9009fc,_0xabba9),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':!![]}};}if(_0x9009fc[_0x44ca96]===undefined)return console[_0x9fc2d0(0x11b)](_0x9fc2d0(0x115)+_0x44ca96+(_0x460354===_0x9fc2d0(0x125)?_0x9fc2d0(0xf8):'')),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':![]}};return delete _0x9009fc[_0x44ca96],console[_0x9fc2d0(0x11b)](_0x9fc2d0(0x111)+_0x44ca96+'`'+(_0x460354==='global'?_0x9fc2d0(0xf8):'')),writeScopedConfig(_0x9009fc,_0xabba9),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
1
+ const a23_0x5eb9d7=a23_0x12c6;(function(_0xaee3aa,_0x514fdf){const _0x586605=a23_0x12c6,_0x35ccc0=_0xaee3aa();while(!![]){try{const _0x574583=parseInt(_0x586605(0x1f8))/0x1+parseInt(_0x586605(0x1cf))/0x2+parseInt(_0x586605(0x1fd))/0x3+parseInt(_0x586605(0x1e1))/0x4*(-parseInt(_0x586605(0x1f3))/0x5)+-parseInt(_0x586605(0x201))/0x6*(-parseInt(_0x586605(0x1eb))/0x7)+parseInt(_0x586605(0x1e0))/0x8+-parseInt(_0x586605(0x1fb))/0x9*(parseInt(_0x586605(0x1ff))/0xa);if(_0x574583===_0x514fdf)break;else _0x35ccc0['push'](_0x35ccc0['shift']());}catch(_0x1f0e34){_0x35ccc0['push'](_0x35ccc0['shift']());}}}(a23_0x3c9e,0xab07a));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(_0x20a3a4){const _0x24747e=a23_0x12c6,_0x24b8ef=_0x20a3a4['split']('.');if(_0x24b8ef[_0x24747e(0x203)]!==0x3||_0x24b8ef[0x0]!=='apps'||_0x24b8ef[0x2]!==_0x24747e(0x20c))return undefined;const _0x14341b=_0x24b8ef[0x1]?.[_0x24747e(0x1d1)]();return _0x14341b?_0x14341b:undefined;}function parseAliasDeleteKey(_0x4bccdf){const _0x5261df=a23_0x12c6,_0x3de442=_0x4bccdf[_0x5261df(0x208)]('.');if(_0x3de442[_0x5261df(0x203)]===0x2&&_0x3de442[0x0]===_0x5261df(0x1ed)){const _0xb84bc5=_0x3de442[0x1]?.[_0x5261df(0x1d1)]();return _0xb84bc5?{'alias':_0xb84bc5}:undefined;}if(_0x3de442['length']===0x3&&_0x3de442[0x0]==='apps'&&_0x3de442[0x2]===_0x5261df(0x20c)){const _0x36e294=_0x3de442[0x1]?.[_0x5261df(0x1d1)]();return _0x36e294?{'alias':_0x36e294,'field':_0x5261df(0x20c)}:undefined;}return undefined;}function setLocalAppAlias(_0x169c27,_0x466441,_0x2d14a3){const _0x4f600e=a23_0x12c6,_0x16376f=_0x169c27[_0x4f600e(0x1ed)]&&typeof _0x169c27[_0x4f600e(0x1ed)]===_0x4f600e(0x1ec)&&!Array[_0x4f600e(0x204)](_0x169c27['apps'])?_0x169c27[_0x4f600e(0x1ed)]:{},_0x37fb53=_0x16376f[_0x466441]&&typeof _0x16376f[_0x466441]===_0x4f600e(0x1ec)&&!Array['isArray'](_0x16376f[_0x466441])?_0x16376f[_0x466441]:{};_0x37fb53['appcode']=_0x2d14a3,_0x16376f[_0x466441]=_0x37fb53,_0x169c27[_0x4f600e(0x1ed)]=_0x16376f;}function deleteLocalAppAlias(_0xa41618,_0x59caa7){const _0x3afe62=a23_0x12c6;if(!_0xa41618[_0x3afe62(0x1ed)]||typeof _0xa41618[_0x3afe62(0x1ed)]!==_0x3afe62(0x1ec)||Array['isArray'](_0xa41618[_0x3afe62(0x1ed)]))return![];const _0x285fc7=_0xa41618[_0x3afe62(0x1ed)],_0x1bbb2e=_0x285fc7[_0x59caa7[_0x3afe62(0x1e3)]];if(!_0x1bbb2e||typeof _0x1bbb2e!==_0x3afe62(0x1ec)||Array['isArray'](_0x1bbb2e))return![];if(!_0x59caa7[_0x3afe62(0x1f5)])return delete _0x285fc7[_0x59caa7[_0x3afe62(0x1e3)]],!![];if(!(_0x59caa7[_0x3afe62(0x1f5)]in _0x1bbb2e))return![];return delete _0x1bbb2e[_0x59caa7['field']],Object[_0x3afe62(0x205)](_0x1bbb2e)[_0x3afe62(0x203)]===0x0&&delete _0x285fc7[_0x59caa7['alias']],!![];}function a23_0x3c9e(){const _0xa16a8d=[';\x20apps.<alias>.appcode','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Delete\x20a\x20configuration\x20value','8331208jSzpJV','963116QxkDif','(none)','alias','locale','Missing\x20key\x20argument.','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','log','Missing\x20key\x20or\x20value.','value','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','7kVrHbW','object','apps','bool','Get\x20a\x20config\x20value','\x20\x20global:\x20\x20','validation','config','5XiFMgB','Invalid\x20locale\x20value.','field','Key\x20already\x20absent:\x20','includes','1016296NylYAX','format','\x20(global)','29792403PzZxHq','list','2214531cEwomy','global','10MkTwFZ','Settable\x20keys:\x20','3911664BdmeSL','pageSize\x20must\x20be\x20a\x20positive\x20number','length','isArray','keys','raw','Usage:\x20','split','project-or-global-explicit','set','Top-level\x20key\x20\x22','appcode','\x20config\x20get\x20<key>','delete','pageSize','args','Deleted\x20`','1607532kmdfgD','Key\x20not\x20found:\x20','trim','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20\x20project:\x20','../../context.js','accessKey','read','write','stringify','\x20config\x20delete\x20<key>\x20[--global]','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','key','get'];a23_0x3c9e=function(){return _0xa16a8d;};return a23_0x3c9e();}const listDef={'service':a23_0x5eb9d7(0x1f2),'command':a23_0x5eb9d7(0x1fc),'description':'List\x20current\x20config','risk':a23_0x5eb9d7(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5ba744){const _0x27c75e=a23_0x5eb9d7,{buildConfigFromFlags:_0xdbb089}=await import(_0x27c75e(0x1d4)),_0x339c84=_0xdbb089({}),_0x20fddf=redactCliConfigCredentials(_0x339c84[_0x27c75e(0x206)]),_0x324ef8=getProjectConfigPath(),_0x8dbc19=resolveWriteConfigPath(_0x27c75e(0x1fe));if(_0x5ba744[_0x27c75e(0x1f9)]==='pretty')return{'ok':!![],'message':_0x27c75e(0x1d2)+(JSON[_0x27c75e(0x1d8)](_0x20fddf,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x27c75e(0x1d3)+(_0x324ef8??_0x27c75e(0x1e2))+'\x0a')+(_0x27c75e(0x1f0)+_0x8dbc19)};return{'ok':!![],'data':{'effective':_0x20fddf,'configFiles':{'project':_0x324ef8??null,'global':_0x8dbc19}}};}},getDef={'service':a23_0x5eb9d7(0x1f2),'command':a23_0x5eb9d7(0x1dc),'description':a23_0x5eb9d7(0x1ef),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x1caacb){const _0x2ebf32=a23_0x5eb9d7,_0x367a48=_0x1caacb[_0x2ebf32(0x1cd)][0x0];if(!_0x367a48)throw CliErrors['validation'](_0x2ebf32(0x1e5),'Usage:\x20'+CLI_BIN_NAME+_0x2ebf32(0x20d));const {buildConfigFromFlags:_0x544736}=await import(_0x2ebf32(0x1d4)),{raw:_0x2d7f78}=_0x544736({});if(_0x367a48['includes']('.')){const _0x51867f=_0x367a48[_0x2ebf32(0x208)]('.');let _0x1fda53=_0x2d7f78;for(const _0x30409e of _0x51867f){if(_0x1fda53==null||typeof _0x1fda53!=='object')throw CliErrors[_0x2ebf32(0x1f1)](_0x2ebf32(0x1d0)+_0x367a48);_0x1fda53=_0x1fda53[_0x30409e];}if(_0x1fda53===undefined)throw CliErrors[_0x2ebf32(0x1f1)](_0x2ebf32(0x1d0)+_0x367a48);const _0x4ffd6a=redactCliConfigValue(_0x367a48,_0x1fda53);return console[_0x2ebf32(0x1e7)](typeof _0x4ffd6a===_0x2ebf32(0x1ec)?JSON[_0x2ebf32(0x1d8)](_0x4ffd6a,null,0x2):String(_0x4ffd6a)),{'ok':!![]};}const _0x3e8c7f=_0x2d7f78[_0x367a48];if(_0x3e8c7f===undefined)throw CliErrors['validation'](_0x2ebf32(0x1d0)+_0x367a48);const _0x5057e3=redactCliConfigValue(_0x367a48,_0x3e8c7f);return console[_0x2ebf32(0x1e7)](typeof _0x5057e3==='object'?JSON[_0x2ebf32(0x1d8)](_0x5057e3,null,0x2):String(_0x5057e3)),{'ok':!![]};}},setDef={'service':a23_0x5eb9d7(0x1f2),'command':a23_0x5eb9d7(0x20a),'description':'Set\x20a\x20configuration\x20value','risk':a23_0x5eb9d7(0x1d7),'confirmationDescription':a23_0x5eb9d7(0x1e6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x5eb9d7(0x1e9),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x29da13){const _0x219d9f=a23_0x5eb9d7,_0x2ed654=_0x29da13[_0x219d9f(0x1cd)][0x0],_0xcdf669=_0x29da13['args'][0x1];if(!_0x2ed654||_0xcdf669===undefined)throw CliErrors[_0x219d9f(0x1f1)](_0x219d9f(0x1e8),_0x219d9f(0x207)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x2ed654]&&!ENUM_KEYS[_0x2ed654][_0x219d9f(0x1f7)](_0xcdf669))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x2ed654+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x2ed654]['join'](',\x20'));if(isCliProtectedConfigKey(_0x2ed654))throw CliErrors[_0x219d9f(0x1f1)]('\x22'+_0x2ed654+_0x219d9f(0x1ea));if(_0x2ed654===_0x219d9f(0x1cc)){const _0x47d2eb=Number(_0xcdf669);if(isNaN(_0x47d2eb)||_0x47d2eb<=0x0)throw CliErrors[_0x219d9f(0x1f1)](_0x219d9f(0x202));}const _0x42b85f=resolveWriteScope({'explicitGlobal':_0x29da13[_0x219d9f(0x1ee)](_0x219d9f(0x1fe)),'policy':_0x219d9f(0x209)}),_0x3d4714=toScopeFlags(_0x42b85f),_0x53bd5d=readScopedConfig(_0x3d4714),_0x3d3c3f=parseAliasAppcodeSetKey(_0x2ed654);if(!_0x3d3c3f&&!isTopLevelConfigKey(_0x2ed654))throw CliErrors['validation'](_0x219d9f(0x20b)+_0x2ed654+'\x22\x20is\x20not\x20settable.',_0x219d9f(0x200)+getTopLevelConfigKeySummary()+_0x219d9f(0x1dd));if(_0x3d3c3f)setLocalAppAlias(_0x53bd5d,_0x3d3c3f,_0xcdf669);else{if(_0x2ed654===_0x219d9f(0x1e4)){const _0x2a6c90=normalizeLocale(_0xcdf669);if(!_0x2a6c90)throw CliErrors[_0x219d9f(0x1f1)](_0x219d9f(0x1f4),_0x219d9f(0x1de));_0x53bd5d[_0x219d9f(0x1e4)]=_0x2a6c90;}else _0x53bd5d[_0x2ed654]=_0x2ed654===_0x219d9f(0x1cc)?Number(_0xcdf669):DOMAIN_CONFIG_FIELDS[_0x219d9f(0x1f7)](_0x2ed654)?normalizeDomainOrigin(_0x2ed654,_0xcdf669):_0xcdf669;}const _0xccff77=_0x2ed654===_0x219d9f(0x1d5)?maskCliAccessKey(_0xcdf669):!_0x3d3c3f&&_0x2ed654==='locale'?String(_0x53bd5d[_0x219d9f(0x1e4)]):_0xcdf669;return console['log']('Set\x20`'+_0x2ed654+'`\x20=\x20\x22'+_0xccff77+'\x22'+(_0x42b85f==='global'?_0x219d9f(0x1fa):'')),writeScopedConfig(_0x53bd5d,_0x3d4714),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x5eb9d7(0x1cb),'description':a23_0x5eb9d7(0x1df),'risk':'write','confirmationDescription':a23_0x5eb9d7(0x1da),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x5eb9d7(0x1db),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x64239e){const _0x325158=a23_0x5eb9d7,_0x1f4acd=_0x64239e[_0x325158(0x1cd)][0x0];if(!_0x1f4acd)throw CliErrors[_0x325158(0x1f1)](_0x325158(0x1e5),_0x325158(0x207)+CLI_BIN_NAME+_0x325158(0x1d9));if(isCliProtectedConfigKey(_0x1f4acd))throw CliErrors['validation']('\x22'+_0x1f4acd+_0x325158(0x1ea));const _0x156d6f=resolveWriteScope({'explicitGlobal':_0x64239e[_0x325158(0x1ee)]('global'),'policy':'project-or-global-explicit'}),_0x3a0642=toScopeFlags(_0x156d6f),_0x638078=readScopedConfig(_0x3a0642),_0x4be352=parseAliasDeleteKey(_0x1f4acd);if(_0x4be352){if(!deleteLocalAppAlias(_0x638078,_0x4be352))return console[_0x325158(0x1e7)](_0x325158(0x1f6)+_0x1f4acd+(_0x156d6f===_0x325158(0x1fe)?_0x325158(0x1fa):'')),{'ok':!![],'data':{'key':_0x1f4acd,'scope':_0x156d6f,'changed':![]}};return console['log'](_0x325158(0x1ce)+_0x1f4acd+'`'+(_0x156d6f===_0x325158(0x1fe)?'\x20(global)':'')),writeScopedConfig(_0x638078,_0x3a0642),{'ok':!![],'data':{'key':_0x1f4acd,'scope':_0x156d6f,'changed':!![]}};}if(_0x638078[_0x1f4acd]===undefined)return console[_0x325158(0x1e7)]('Key\x20already\x20absent:\x20'+_0x1f4acd+(_0x156d6f===_0x325158(0x1fe)?_0x325158(0x1fa):'')),{'ok':!![],'data':{'key':_0x1f4acd,'scope':_0x156d6f,'changed':![]}};return delete _0x638078[_0x1f4acd],console['log']('Deleted\x20`'+_0x1f4acd+'`'+(_0x156d6f===_0x325158(0x1fe)?_0x325158(0x1fa):'')),writeScopedConfig(_0x638078,_0x3a0642),{'ok':!![],'data':{'key':_0x1f4acd,'scope':_0x156d6f,'changed':!![]}};}};function a23_0x12c6(_0xa67fd2,_0x2e30be){_0xa67fd2=_0xa67fd2-0x1cb;const _0x3c9e54=a23_0x3c9e();let _0x12c6ab=_0x3c9e54[_0xa67fd2];return _0x12c6ab;}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- const a24_0x448fac=a24_0x124d;(function(_0x1a596f,_0x472e7e){const _0x2a4e50=a24_0x124d,_0x45de54=_0x1a596f();while(!![]){try{const _0xbda186=parseInt(_0x2a4e50(0x9e))/0x1*(-parseInt(_0x2a4e50(0x99))/0x2)+parseInt(_0x2a4e50(0xa9))/0x3*(parseInt(_0x2a4e50(0xa6))/0x4)+-parseInt(_0x2a4e50(0xb8))/0x5+-parseInt(_0x2a4e50(0x89))/0x6*(-parseInt(_0x2a4e50(0xab))/0x7)+parseInt(_0x2a4e50(0x97))/0x8*(parseInt(_0x2a4e50(0x91))/0x9)+parseInt(_0x2a4e50(0x90))/0xa+-parseInt(_0x2a4e50(0x8b))/0xb*(parseInt(_0x2a4e50(0x8d))/0xc);if(_0xbda186===_0x472e7e)break;else _0x45de54['push'](_0x45de54['shift']());}catch(_0x8a0d4){_0x45de54['push'](_0x45de54['shift']());}}}(a24_0x186e,0x7fd24));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a24_0x186e(){const _0x58b232=['official','config','label','Available\x20regions:\x20','Select\x20Lovrabet\x20region','kb-service-domain','harness-domain','name','skill-domain','join','4193240EXfJyw','routing','keys','Custom\x20Runtime\x20HTTPS\x20origin','independent','length','18VzUumC','Custom\x20Harness\x20HTTPS\x20origin','11TjCmcE','api-domain','16291356FnhwQX','region','manifestDomains','8152360fBDXZo','4982301AtzkGK','Custom\x20platform\x20API\x20HTTPS\x20origin','nonInteractive','Official\x20Lovrabet\x20region:\x20','domain-config','assign','8afGxYw','string','16PKyUMK','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','init','mode','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','22153YBwCPT','cancelled','Region\x20\x22','\x22\x20is\x20not\x20currently\x20available.','user-domain','ExitPromptError','Independent-deployment\x20Domain\x20JSON\x20file','domains','4dBDpUx','str','enterprise-v1','1492437lgGedB','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','2405053LLedbz','Custom\x20SkillHub\x20HTTPS\x20origin','validation'];a24_0x186e=function(){return _0x58b232;};return a24_0x186e();}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';function a24_0x124d(_0x401abf,_0x24fa3d){_0x401abf=_0x401abf-0x88;const _0x186ea0=a24_0x186e();let _0x124dbf=_0x186ea0[_0x401abf];return _0x124dbf;}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_0x448fac(0x95),'type':a24_0x448fac(0x98),'description':a24_0x448fac(0xa4)},{'name':a24_0x448fac(0xa2),'type':a24_0x448fac(0x98),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a24_0x448fac(0x8c),'type':'string','description':a24_0x448fac(0x92)},{'name':'runtime-domain','type':a24_0x448fac(0x98),'description':a24_0x448fac(0xbb)},{'name':a24_0x448fac(0xb6),'type':'string','description':a24_0x448fac(0xac)},{'name':a24_0x448fac(0xb3),'type':a24_0x448fac(0x98),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a24_0x448fac(0xb4),'type':'string','description':a24_0x448fac(0x8a)}];export const configInitFlags=[{'name':'region','type':a24_0x448fac(0x98),'description':a24_0x448fac(0x94)+ENABLED_LOVRABET_REGION_VALUES[a24_0x448fac(0xb7)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x552026){const _0x12c43a=a24_0x448fac,_0x288177=_0x552026[_0x12c43a(0xa7)](_0x12c43a(0x8e));if(_0x288177){if(!isEnabledLovrabetRegion(_0x288177))throw CliErrors[_0x12c43a(0xad)](_0x12c43a(0xa0)+_0x288177+_0x12c43a(0xa1),_0x12c43a(0xb1)+ENABLED_LOVRABET_REGION_VALUES[_0x12c43a(0xb7)](',\x20'));return _0x288177;}if(_0x552026[_0x12c43a(0x93)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x12c43a(0xb2),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x49101b=>({'name':OFFICIAL_ROUTING_PROFILES[_0x49101b][_0x12c43a(0xb0)]+'\x20('+_0x49101b+')','value':_0x49101b}))});}catch(_0x39d27c){if(_0x39d27c?.[_0x12c43a(0xb5)]===_0x12c43a(0xa3))throw CliErrors[_0x12c43a(0x9f)]();throw _0x39d27c;}}export async function executeConfigInit(_0x472af7){const _0x11d8fc=a24_0x448fac,_0x5d805a=resolveDomainConfigInput(_0x472af7),_0x152271=_0x5d805a[_0x11d8fc(0xa5)],_0xad962f=Object['keys'](_0x152271)[_0x11d8fc(0x88)]>0x0||_0x5d805a['mode']===_0x11d8fc(0xa8);if(_0xad962f&&_0x472af7[_0x11d8fc(0xa7)](_0x11d8fc(0x8e)))throw CliErrors[_0x11d8fc(0xad)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');const _0x237027={'global':!![]},_0x379c35=readScopedConfig(_0x237027);for(const _0x2b0e77 of DOMAIN_CONFIG_FIELDS)delete _0x379c35[_0x2b0e77];for(const _0x35ea71 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x379c35[_0x35ea71];delete _0x379c35[_0x11d8fc(0xb9)];let _0x2bdc71=null;if(_0xad962f)delete _0x379c35[_0x11d8fc(0x8e)],_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?_0x379c35[_0x11d8fc(0xb9)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x5d805a[_0x11d8fc(0x8f)]}:Object[_0x11d8fc(0x96)](_0x379c35,_0x152271);else{_0x2bdc71=await resolveRegion(_0x472af7);if(_0x2bdc71===DEFAULT_LOVRABET_REGION)delete _0x379c35[_0x11d8fc(0x8e)];else _0x379c35[_0x11d8fc(0x8e)]=_0x2bdc71;}return writeScopedConfig(_0x379c35,_0x237027),{'ok':!![],'message':_0xad962f?_0x11d8fc(0x9a)+Object[_0x11d8fc(0xba)](_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?_0x5d805a[_0x11d8fc(0x8f)]:_0x152271)[_0x11d8fc(0xb7)](',\x20')+'.':_0x11d8fc(0xaa)+_0x2bdc71+'.','data':{'mode':_0xad962f?_0x11d8fc(0xbc):_0x11d8fc(0xae),'protocol':_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2bdc71,'domains':_0x152271}};}export const configInitDefinition={'service':a24_0x448fac(0xaf),'command':a24_0x448fac(0x9b),'description':a24_0x448fac(0x9d),'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_0x3b8a8d=a24_0x1697;(function(_0x1638f1,_0x4146b9){const _0x50eb5b=a24_0x1697,_0xa73cfe=_0x1638f1();while(!![]){try{const _0x284316=parseInt(_0x50eb5b(0xee))/0x1*(-parseInt(_0x50eb5b(0xea))/0x2)+parseInt(_0x50eb5b(0xfa))/0x3*(parseInt(_0x50eb5b(0xed))/0x4)+parseInt(_0x50eb5b(0xf3))/0x5*(parseInt(_0x50eb5b(0xe3))/0x6)+-parseInt(_0x50eb5b(0xf7))/0x7+-parseInt(_0x50eb5b(0xec))/0x8+-parseInt(_0x50eb5b(0xeb))/0x9+parseInt(_0x50eb5b(0xe4))/0xa*(parseInt(_0x50eb5b(0xda))/0xb);if(_0x284316===_0x4146b9)break;else _0xa73cfe['push'](_0xa73cfe['shift']());}catch(_0x32c392){_0xa73cfe['push'](_0xa73cfe['shift']());}}}(a24_0x3d1d,0xe1248));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';function a24_0x3d1d(){const _0x2ee47e=['map','Custom\x20Harness\x20HTTPS\x20origin','join','\x22\x20is\x20not\x20currently\x20available.','init','30RBaJOp','59690tFiAMu','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','enterprise-v1','cancelled','ExitPromptError','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','129442eoibbf','5338224NuYKKs','11203776Cytltz','48flMzhd','3EVqcvu','Official\x20Lovrabet\x20region:\x20','config','name','Region\x20\x22','1406255iRFVXB','domains','keys','Custom\x20User\x20HTTPS\x20origin','7409031sdtRjI','kb-service-domain','validation','318963AAYsJm','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','domain-config','mode','runtime-domain','skill-domain','string','Independent-deployment\x20Domain\x20JSON\x20file','Custom\x20Runtime\x20HTTPS\x20origin','routing','user-domain','Custom\x20platform\x20API\x20HTTPS\x20origin','api-domain','official','assign','label','harness-domain','2739BhixIH','str','independent','region'];a24_0x3d1d=function(){return _0x2ee47e;};return a24_0x3d1d();}function a24_0x1697(_0x303ab4,_0x14c158){_0x303ab4=_0x303ab4-0xd0;const _0x3d1d81=a24_0x3d1d();let _0x169743=_0x3d1d81[_0x303ab4];return _0x169743;}import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x3b8a8d(0xfc),'type':a24_0x3b8a8d(0x100),'description':a24_0x3b8a8d(0xd0)},{'name':a24_0x3b8a8d(0xd3),'type':'string','description':a24_0x3b8a8d(0xf6)},{'name':a24_0x3b8a8d(0xd5),'type':a24_0x3b8a8d(0x100),'description':a24_0x3b8a8d(0xd4)},{'name':a24_0x3b8a8d(0xfe),'type':a24_0x3b8a8d(0x100),'description':a24_0x3b8a8d(0xd1)},{'name':a24_0x3b8a8d(0xff),'type':'string','description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a24_0x3b8a8d(0xf8),'type':'string','description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a24_0x3b8a8d(0xd9),'type':'string','description':a24_0x3b8a8d(0xdf)}];export const configInitFlags=[{'name':a24_0x3b8a8d(0xdd),'type':a24_0x3b8a8d(0x100),'description':a24_0x3b8a8d(0xef)+ENABLED_LOVRABET_REGION_VALUES[a24_0x3b8a8d(0xe0)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x504d1b){const _0x4ddb1e=a24_0x3b8a8d,_0x39b271=_0x504d1b[_0x4ddb1e(0xdb)](_0x4ddb1e(0xdd));if(_0x39b271){if(!isEnabledLovrabetRegion(_0x39b271))throw CliErrors[_0x4ddb1e(0xf9)](_0x4ddb1e(0xf2)+_0x39b271+_0x4ddb1e(0xe1),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x4ddb1e(0xe0)](',\x20'));return _0x39b271;}if(_0x504d1b['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x4ddb1e(0xde)](_0x493cf8=>({'name':OFFICIAL_ROUTING_PROFILES[_0x493cf8][_0x4ddb1e(0xd8)]+'\x20('+_0x493cf8+')','value':_0x493cf8}))});}catch(_0x45d7de){if(_0x45d7de?.[_0x4ddb1e(0xf1)]===_0x4ddb1e(0xe8))throw CliErrors[_0x4ddb1e(0xe7)]();throw _0x45d7de;}}export async function executeConfigInit(_0x31201c){const _0x13b31c=a24_0x3b8a8d,_0x1def8e=resolveDomainConfigInput(_0x31201c),_0x358293=_0x1def8e[_0x13b31c(0xf4)],_0x3995fe=Object[_0x13b31c(0xf5)](_0x358293)['length']>0x0||_0x1def8e[_0x13b31c(0xfd)]===_0x13b31c(0xe6);if(_0x3995fe&&_0x31201c[_0x13b31c(0xdb)](_0x13b31c(0xdd)))throw CliErrors['validation'](_0x13b31c(0xfb));const _0x59e9a7={'global':!![]},_0x5c57cd=readScopedConfig(_0x59e9a7);for(const _0x2082d5 of DOMAIN_CONFIG_FIELDS)delete _0x5c57cd[_0x2082d5];for(const _0x36aed3 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x5c57cd[_0x36aed3];delete _0x5c57cd[_0x13b31c(0xd2)];let _0x44c828=null;if(_0x3995fe)delete _0x5c57cd[_0x13b31c(0xdd)],_0x1def8e['mode']==='enterprise-v1'?_0x5c57cd[_0x13b31c(0xd2)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x1def8e['manifestDomains']}:Object[_0x13b31c(0xd7)](_0x5c57cd,_0x358293);else{_0x44c828=await resolveRegion(_0x31201c);if(_0x44c828===DEFAULT_LOVRABET_REGION)delete _0x5c57cd[_0x13b31c(0xdd)];else _0x5c57cd['region']=_0x44c828;}return writeScopedConfig(_0x5c57cd,_0x59e9a7),{'ok':!![],'message':_0x3995fe?_0x13b31c(0xe5)+Object['keys'](_0x1def8e['mode']===_0x13b31c(0xe6)?_0x1def8e['manifestDomains']:_0x358293)[_0x13b31c(0xe0)](',\x20')+'.':_0x13b31c(0xe9)+_0x44c828+'.','data':{'mode':_0x3995fe?_0x13b31c(0xdc):_0x13b31c(0xd6),'protocol':_0x1def8e[_0x13b31c(0xfd)]===_0x13b31c(0xe6)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x44c828,'domains':_0x358293}};}export const configInitDefinition={'service':a24_0x3b8a8d(0xf0),'command':a24_0x3b8a8d(0xe2),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','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 +1 @@
1
- function a25_0x14c5(){var _0x5dbe81=['27wGoIFq','1692677Lrxbfy','224399HnszlS','1411950WmKQVI','379810QTlnti','24QNlPNy','6496758oOJAOX','1187444EgyuYg','156988hXRfut','45bCRvSS'];a25_0x14c5=function(){return _0x5dbe81;};return a25_0x14c5();}(function(_0xa26ff5,_0x3ef306){var _0x8fe658=a25_0x4380,_0x115d18=_0xa26ff5();while(!![]){try{var _0x4d048c=parseInt(_0x8fe658(0x176))/0x1+parseInt(_0x8fe658(0x171))/0x2+-parseInt(_0x8fe658(0x174))/0x3*(parseInt(_0x8fe658(0x172))/0x4)+parseInt(_0x8fe658(0x177))/0x5+-parseInt(_0x8fe658(0x170))/0x6+parseInt(_0x8fe658(0x175))/0x7*(parseInt(_0x8fe658(0x179))/0x8)+parseInt(_0x8fe658(0x173))/0x9*(parseInt(_0x8fe658(0x178))/0xa);if(_0x4d048c===_0x3ef306)break;else _0x115d18['push'](_0x115d18['shift']());}catch(_0x49f7bf){_0x115d18['push'](_0x115d18['shift']());}}}(a25_0x14c5,0x8d8f9));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a25_0x4380(_0x3c9f31,_0x2f9dba){_0x3c9f31=_0x3c9f31-0x170;var _0x14c53f=a25_0x14c5();var _0x43808f=_0x14c53f[_0x3c9f31];return _0x43808f;}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 a25_0x47a1(_0x29461a,_0x1064e7){_0x29461a=_0x29461a-0xeb;var _0x411574=a25_0x4115();var _0x47a154=_0x411574[_0x29461a];return _0x47a154;}(function(_0x47b10d,_0x16bef2){var _0x512317=a25_0x47a1,_0x25987c=_0x47b10d();while(!![]){try{var _0x5bd447=parseInt(_0x512317(0xec))/0x1*(parseInt(_0x512317(0xf0))/0x2)+-parseInt(_0x512317(0xed))/0x3*(-parseInt(_0x512317(0xf6))/0x4)+-parseInt(_0x512317(0xf7))/0x5*(-parseInt(_0x512317(0xeb))/0x6)+parseInt(_0x512317(0xf4))/0x7*(-parseInt(_0x512317(0xf3))/0x8)+-parseInt(_0x512317(0xf5))/0x9*(-parseInt(_0x512317(0xf2))/0xa)+parseInt(_0x512317(0xee))/0xb+-parseInt(_0x512317(0xf1))/0xc*(parseInt(_0x512317(0xef))/0xd);if(_0x5bd447===_0x16bef2)break;else _0x25987c['push'](_0x25987c['shift']());}catch(_0x3ab157){_0x25987c['push'](_0x25987c['shift']());}}}(a25_0x4115,0x9c905));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_0x4115(){var _0x2ac2e8=['72eiFXCA','16qIEwuX','521710KBDxLS','18IkFEWN','44706zIONPx','485223sMbvHh','652564mcALTp','4082TGlwKB','46SUpnAe','39972JdCZAz','291220IXADut','4746472qzDhKb','7aTnITg'];a25_0x4115=function(){return _0x2ac2e8;};return a25_0x4115();}
@@ -1 +1 @@
1
- const a26_0x4b38a8=a26_0xf8c0;(function(_0xfdab73,_0x5650e5){const _0x1181a4=a26_0xf8c0,_0x117045=_0xfdab73();while(!![]){try{const _0x98b46=-parseInt(_0x1181a4(0x19f))/0x1+-parseInt(_0x1181a4(0x1b1))/0x2*(parseInt(_0x1181a4(0x1a8))/0x3)+-parseInt(_0x1181a4(0x196))/0x4+-parseInt(_0x1181a4(0x1a5))/0x5*(-parseInt(_0x1181a4(0x17e))/0x6)+parseInt(_0x1181a4(0x19b))/0x7*(parseInt(_0x1181a4(0x188))/0x8)+-parseInt(_0x1181a4(0x18b))/0x9*(parseInt(_0x1181a4(0x187))/0xa)+parseInt(_0x1181a4(0x1b3))/0xb*(parseInt(_0x1181a4(0x16d))/0xc);if(_0x98b46===_0x5650e5)break;else _0x117045['push'](_0x117045['shift']());}catch(_0x1d9afd){_0x117045['push'](_0x117045['shift']());}}}(a26_0x5f42,0xea159));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,uploadDatasetImportImage,readDatasetImportImage}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';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function a26_0x5f42(){const _0x13ed0b=['Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','isArray','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','\x20records.','warnings','header-row','rowNumber','isInteger','code','size','import-excel','length','parse','rows','toString','92028xnHWGM','validation','maxBatchSize','emptyRows','mappingFile','Excel\x20import\x20failed.','.\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','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','reduce','1940dxNERV','224xVLVHs','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.','Excel\x20contains\x20','34533zewlhP','map','errors','.lock.recovery','str','file','appCode','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','DB_TABLE','resume','object','1006412mSZOLu','.lock','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','max','num','238595pieKUD','/client/','message','boolean','226249DswYWu','schemaFingerprint','1-based\x20Excel\x20header\x20row','write','Maximum\x20records\x20per\x20request\x20(1..500)','string','155vlkqva','batch-size','report','3mDWuxH','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','Mapping\x20file\x20exceeds\x201\x20MB.','sheet','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','media','/import-batch','--file\x20and\x20--mapping\x20are\x20required.','number','371138DEhtuh','mapping','27478iYVAUz','hashes','invalid','checkpoint','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','.rows.json','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','imageFields','Imported\x20and\x20verified\x20','batchSize','4500TrTmUz'];a26_0x5f42=function(){return _0x13ed0b;};return a26_0x5f42();}function input(_0x5ea43e){const _0x5506f1=a26_0xf8c0,_0x16116c=_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x190)),_0x531dba=_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1b2));if(!_0x16116c||!_0x531dba)throw CliErrors[_0x5506f1(0x17f)](_0x5506f1(0x1af));const _0x31b732=_0x5ea43e[_0x5506f1(0x19a)](_0x5506f1(0x174),0x1),_0x5f113f=_0x5ea43e[_0x5506f1(0x19a)](_0x5506f1(0x1a6),0x1f4);if(!Number[_0x5506f1(0x176)](_0x31b732)||_0x31b732<0x1||!Number['isInteger'](_0x5f113f)||_0x5f113f<0x1||_0x5f113f>0x1f4)throw CliErrors['validation'](_0x5506f1(0x16f));const _0x562a19=resolve(_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1b6))||_0x16116c+'.import-checkpoint.json'),_0x322dd9=resolve(_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1a7))||_0x16116c+'.import-report.json'),_0x39e0bf=[resolve(_0x16116c),resolve(_0x531dba),_0x562a19,_0x322dd9];if(new Set(_0x39e0bf)[_0x5506f1(0x178)]!==_0x39e0bf[_0x5506f1(0x17a)])throw CliErrors[_0x5506f1(0x17f)](_0x5506f1(0x169));return{'file':resolve(_0x16116c),'mappingFile':resolve(_0x531dba),'headerRow':_0x31b732,'batchSize':_0x5f113f,'checkpoint':_0x562a19,'report':_0x322dd9,'sheet':_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1ab))||undefined,'resume':_0x5ea43e['bool'](_0x5506f1(0x194))};}async function prepare(_0x4cb48d){const _0xe0feb6=a26_0xf8c0,_0x430ada=input(_0x4cb48d),_0x3fd5c2=_0x4cb48d[_0xe0feb6(0x18f)](_0xe0feb6(0x177));[_0x430ada[_0xe0feb6(0x190)],_0x430ada[_0xe0feb6(0x182)],_0x430ada[_0xe0feb6(0x1b6)],_0x430ada[_0xe0feb6(0x1a7)]]=await Promise['all']([realpath(_0x430ada[_0xe0feb6(0x190)]),realpath(_0x430ada[_0xe0feb6(0x182)]),resolveImportOutputPath(_0x430ada['checkpoint']),resolveImportOutputPath(_0x430ada['report'])]),assertImportPaths(_0x430ada['checkpoint'],_0x430ada[_0xe0feb6(0x1a7)],[_0x430ada[_0xe0feb6(0x190)],_0x430ada['mappingFile']]);let _0xe0b99;const _0x4beae8=await readFile(_0x430ada[_0xe0feb6(0x182)]);if(_0x4beae8[_0xe0feb6(0x17a)]>0x400*0x400)throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x1aa));try{_0xe0b99=JSON[_0xe0feb6(0x17b)](_0x4beae8[_0xe0feb6(0x17d)]('utf8'));}catch{throw CliErrors['validation'](_0xe0feb6(0x192));}if(!_0xe0b99||typeof _0xe0b99!==_0xe0feb6(0x195)||Array[_0xe0feb6(0x170)](_0xe0b99)||Object['values'](_0xe0b99)['some'](_0x14dd7b=>typeof _0x14dd7b!==_0xe0feb6(0x1a4)))throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x1b7));const _0x3b454f=await getDatasetDetail(_0x3fd5c2),_0x2cda19=assertDatasetImportTarget(_0x3b454f,_0x4cb48d[_0xe0feb6(0x191)],_0x3fd5c2);if(_0x2cda19===_0xe0feb6(0x193))throw CliErrors[_0xe0feb6(0x17f)]('DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x3fd5c2+_0xe0feb6(0x184)+_0x4cb48d[_0xe0feb6(0x191)]+'\x20--code\x20'+_0x3fd5c2+'\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.');if(_0x2cda19!=='METADATA')throw CliErrors['validation']('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.',_0xe0feb6(0x16e));const _0x53229f=await buildExcelManifest({..._0x430ada,'mapping':_0xe0b99,'fields':normalizeImportFields(_0x3b454f)}),_0x9fd7c8=await getDatasetImportContract(_0x4cb48d['appCode'],_0x3fd5c2);assertImportContract(_0x9fd7c8,_0x4cb48d['appCode'],_0x3fd5c2),assertImageImportCapability(_0x9fd7c8,_0x53229f);if(_0x53229f[_0xe0feb6(0x16a)]?.[_0xe0feb6(0x17a)]){const _0x82f4d5=await resolveImportOutputPath(_0x430ada[_0xe0feb6(0x1b6)]+_0xe0feb6(0x1b8)),_0x2c3561=await Promise['all']([_0x82f4d5,_0x82f4d5+_0xe0feb6(0x197),_0x82f4d5+'.lock.recovery',_0x430ada[_0xe0feb6(0x1b6)]+_0xe0feb6(0x197),_0x430ada['checkpoint']+_0xe0feb6(0x18e)][_0xe0feb6(0x18c)](resolveImportOutputPath));assertImportPaths(_0x430ada[_0xe0feb6(0x1b6)],_0x430ada['report'],[_0x430ada[_0xe0feb6(0x190)],_0x430ada['mappingFile'],..._0x2c3561['slice'](0x0,0x3)]);}if(_0x430ada[_0xe0feb6(0x16c)]>_0x9fd7c8[_0xe0feb6(0x180)])throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x198));return{'args':_0x430ada,'manifest':_0x53229f,'contract':_0x9fd7c8,'code':_0x3fd5c2};}function a26_0xf8c0(_0x32589f,_0x395a5d){_0x32589f=_0x32589f-0x169;const _0x5f4289=a26_0x5f42();let _0xf8c07a=_0x5f4289[_0x32589f];return _0xf8c07a;}async function checked(_0x1a1f85){const _0x3d9df3=a26_0xf8c0;try{return await _0x1a1f85();}catch(_0x2fa3be){if(_0x2fa3be instanceof CliError)throw _0x2fa3be;throw CliErrors[_0x3d9df3(0x17f)](_0x2fa3be[_0x3d9df3(0x19d)]||_0x3d9df3(0x183));}}export const dataImportExcel={'service':'data','command':a26_0x4b38a8(0x179),'risk':a26_0x4b38a8(0x1a2),'description':a26_0x4b38a8(0x189),'confirmationDescription':a26_0x4b38a8(0x171),'flags':[CODE_FLAG,{'name':a26_0x4b38a8(0x190),'type':a26_0x4b38a8(0x1a4),'required':!![],'description':'Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)'},{'name':a26_0x4b38a8(0x1b2),'type':a26_0x4b38a8(0x1a4),'required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x4b38a8(0x1ab),'type':a26_0x4b38a8(0x1a4),'description':a26_0x4b38a8(0x1a9)},{'name':a26_0x4b38a8(0x174),'type':a26_0x4b38a8(0x1b0),'default':0x1,'description':a26_0x4b38a8(0x1a1)},{'name':a26_0x4b38a8(0x1a6),'type':a26_0x4b38a8(0x1b0),'default':0x1f4,'description':a26_0x4b38a8(0x1a3)},{'name':a26_0x4b38a8(0x1b6),'type':a26_0x4b38a8(0x1a4),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':'report','type':'string','description':a26_0x4b38a8(0x1ac)},{'name':a26_0x4b38a8(0x194),'type':a26_0x4b38a8(0x19e),'description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x34bb4e=>{input(_0x34bb4e);},'dryRun':async _0xe99e61=>checked(async()=>{const _0x3f9c8f=a26_0x4b38a8,{args:_0x17cc45,manifest:_0x271450,contract:_0x125286,code:_0x5b5e6d}=await prepare(_0xe99e61),_0x241938=new Set(_0x271450[_0x3f9c8f(0x18d)][_0x3f9c8f(0x18c)](_0x2e343e=>_0x2e343e[_0x3f9c8f(0x175)]))[_0x3f9c8f(0x178)];return{'method':'POST','url':_0x3f9c8f(0x19c)+encodeURIComponent(_0xe99e61[_0x3f9c8f(0x191)])+'/'+encodeURIComponent(_0x5b5e6d)+_0x3f9c8f(0x1ae),'description':_0x3f9c8f(0x185),'body':{'schemaFingerprint':_0x125286[_0x3f9c8f(0x1a0)]},'validRows':Math[_0x3f9c8f(0x199)](0x0,_0x271450['rows']['length']-_0x241938),'invalidRows':_0x241938,'invalidCells':_0x271450['errors'][_0x3f9c8f(0x17a)],'emptyRows':_0x271450[_0x3f9c8f(0x181)][_0x3f9c8f(0x17a)],'expectedBatches':previewImportBatchCount(_0x271450,_0x125286,_0x17cc45[_0x3f9c8f(0x16c)]),'imageCount':_0x271450['imageCells']?.[_0x3f9c8f(0x186)]((_0x4499fd,_0x5df133)=>_0x4499fd+_0x5df133[_0x3f9c8f(0x1b4)][_0x3f9c8f(0x17a)],0x0)??0x0,'uniqueImages':_0x271450[_0x3f9c8f(0x1ad)]?.[_0x3f9c8f(0x17a)]??0x0,'uniqueImageBytes':_0x271450[_0x3f9c8f(0x1ad)]?.[_0x3f9c8f(0x186)]((_0x3e73aa,_0x32640f)=>_0x3e73aa+_0x32640f['size'],0x0)??0x0,'errors':_0x271450[_0x3f9c8f(0x18d)],'warnings':_0x271450[_0x3f9c8f(0x173)],'sheet':_0x271450[_0x3f9c8f(0x1ab)],'checkpoint':_0x17cc45[_0x3f9c8f(0x1b6)],'report':_0x17cc45[_0x3f9c8f(0x1a7)]};}),'execute':async _0x1939e6=>checked(async()=>{const _0x47553e=a26_0x4b38a8,{args:_0x2c98ca,manifest:_0x54c25d,contract:_0x5e1b5f,code:_0x402ef1}=await prepare(_0x1939e6);if(_0x54c25d[_0x47553e(0x18d)][_0x47553e(0x17a)]){await saveImportJson(_0x2c98ca['report'],{'status':_0x47553e(0x1b5),'sourceRows':_0x54c25d[_0x47553e(0x17c)][_0x47553e(0x17a)],'errors':_0x54c25d[_0x47553e(0x18d)],'emptyRows':_0x54c25d[_0x47553e(0x181)],'warnings':_0x54c25d[_0x47553e(0x173)]});throw CliErrors[_0x47553e(0x17f)](_0x47553e(0x18a)+_0x54c25d[_0x47553e(0x18d)][_0x47553e(0x17a)]+'\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','See\x20'+_0x2c98ca['report']+'.');}const _0x1d6070=_0x54c25d['imageFields']?.[_0x47553e(0x17a)]?runImageExcelImport:_0x5e1b5f['schemaVersion']===0x2?runAutoIdExcelImport:runExcelImport,_0x1eff6d=await _0x1d6070({..._0x2c98ca,'manifest':_0x54c25d,'contract':_0x5e1b5f,'appCode':_0x1939e6['appCode'],'datasetCode':_0x402ef1,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x2c98ca['file'],_0x2c98ca[_0x47553e(0x182)]],'imageApi':{'upload':(_0x4b9e67,_0x5d0fc7)=>uploadDatasetImportImage(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x4b9e67,_0x5d0fc7),'readback':(_0x1417d6,_0x1576e8)=>readDatasetImportImage(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x1417d6,_0x1576e8)},'api':{'write':(_0x13929b,_0xe7ce93)=>createDatasetImportBatch(_0x1939e6['appCode'],_0x402ef1,{'schemaFingerprint':_0x5e1b5f[_0x47553e(0x1a0)],'items':_0x13929b,..._0xe7ce93===undefined?{}:{'taskId':_0xe7ce93}}),'readback':_0x512b50=>readDatasetImportRows(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x512b50),'readTask':_0xef849a=>readDatasetImportTaskRows(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0xef849a)}});return{'ok':!![],'data':_0x1eff6d,'message':_0x47553e(0x16b)+_0x1eff6d['succeeded']+_0x47553e(0x172)};})};
1
+ function a26_0xb2ea(){const _0x2e3fb2=['file','invalid','maxBatchSize','utf8','isArray','reduce','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','1-based\x20Excel\x20header\x20row','emptyRows','Mapping\x20file\x20exceeds\x201\x20MB.','batchSize','.lock','61860WBsvsF','appCode','65261ewzsur','2060470UTiCFE','POST','message','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','/client/','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.','rows','max','imageFields','828156lUtHWT','--file\x20and\x20--mapping\x20are\x20required.','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','\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.','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','5041152ilcIrZ','some','checkpoint','map','succeeded','bool','all','toString','Excel\x20import\x20failed.','Imported\x20and\x20verified\x20','DB_TABLE','METADATA','Excel\x20contains\x20','.\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','values','schemaFingerprint','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','See\x20','isInteger','.import-checkpoint.json','media','mappingFile','string','538990UIiIiG','length','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','.import-report.json','report','warnings','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','.lock.recovery','import-excel','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','3403377wQWodz','size','str','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','108kJhlRc','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','\x20--code\x20','validation','object','errors','8jcBkmy','resume','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','num','boolean','parse','/import-batch','batch-size','code','sheet','imageCells','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)'];a26_0xb2ea=function(){return _0x2e3fb2;};return a26_0xb2ea();}const a26_0x2731e3=a26_0xb963;(function(_0x52422f,_0x18fb99){const _0x30b5b3=a26_0xb963,_0x3fd33d=_0x52422f();while(!![]){try{const _0x325393=-parseInt(_0x30b5b3(0x87))/0x1+-parseInt(_0x30b5b3(0x9d))/0x2*(parseInt(_0x30b5b3(0xb5))/0x3)+parseInt(_0x30b5b3(0xc1))/0x4+-parseInt(_0x30b5b3(0xb8))/0x5+parseInt(_0x30b5b3(0x97))/0x6*(parseInt(_0x30b5b3(0xb7))/0x7)+parseInt(_0x30b5b3(0x70))/0x8+parseInt(_0x30b5b3(0x93))/0x9;if(_0x325393===_0x18fb99)break;else _0x3fd33d['push'](_0x3fd33d['shift']());}catch(_0x118e05){_0x3fd33d['push'](_0x3fd33d['shift']());}}}(a26_0xb2ea,0x55592));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,uploadDatasetImportImage,readDatasetImportImage}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_0xb963(_0x2f3fe8,_0x2b13e8){_0x2f3fe8=_0x2f3fe8-0x6e;const _0xb2eac3=a26_0xb2ea();let _0xb963e4=_0xb2eac3[_0x2f3fe8];return _0xb963e4;}import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x286237){const _0x3a4b29=a26_0xb963,_0x1b0238=_0x286237[_0x3a4b29(0x95)](_0x3a4b29(0xa9)),_0x19dc98=_0x286237[_0x3a4b29(0x95)]('mapping');if(!_0x1b0238||!_0x19dc98)throw CliErrors[_0x3a4b29(0x9a)](_0x3a4b29(0xc2));const _0x37002d=_0x286237[_0x3a4b29(0xa0)]('header-row',0x1),_0x7ec4a7=_0x286237['num'](_0x3a4b29(0xa4),0x1f4);if(!Number[_0x3a4b29(0x82)](_0x37002d)||_0x37002d<0x1||!Number[_0x3a4b29(0x82)](_0x7ec4a7)||_0x7ec4a7<0x1||_0x7ec4a7>0x1f4)throw CliErrors[_0x3a4b29(0x9a)]('Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.');const _0x274e6f=resolve(_0x286237['str'](_0x3a4b29(0x72))||_0x1b0238+_0x3a4b29(0x83)),_0x2695cf=resolve(_0x286237['str'](_0x3a4b29(0x8c))||_0x1b0238+_0x3a4b29(0x8b)),_0x184aa1=[resolve(_0x1b0238),resolve(_0x19dc98),_0x274e6f,_0x2695cf];if(new Set(_0x184aa1)[_0x3a4b29(0x94)]!==_0x184aa1[_0x3a4b29(0x88)])throw CliErrors['validation'](_0x3a4b29(0x92));return{'file':resolve(_0x1b0238),'mappingFile':resolve(_0x19dc98),'headerRow':_0x37002d,'batchSize':_0x7ec4a7,'checkpoint':_0x274e6f,'report':_0x2695cf,'sheet':_0x286237[_0x3a4b29(0x95)](_0x3a4b29(0xa6))||undefined,'resume':_0x286237[_0x3a4b29(0x75)]('resume')};}async function prepare(_0x3fbc9e){const _0x57bd2c=a26_0xb963,_0x4f8383=input(_0x3fbc9e),_0x1d110a=_0x3fbc9e[_0x57bd2c(0x95)](_0x57bd2c(0xa5));[_0x4f8383[_0x57bd2c(0xa9)],_0x4f8383[_0x57bd2c(0x85)],_0x4f8383[_0x57bd2c(0x72)],_0x4f8383[_0x57bd2c(0x8c)]]=await Promise[_0x57bd2c(0x76)]([realpath(_0x4f8383['file']),realpath(_0x4f8383['mappingFile']),resolveImportOutputPath(_0x4f8383[_0x57bd2c(0x72)]),resolveImportOutputPath(_0x4f8383[_0x57bd2c(0x8c)])]),assertImportPaths(_0x4f8383[_0x57bd2c(0x72)],_0x4f8383[_0x57bd2c(0x8c)],[_0x4f8383[_0x57bd2c(0xa9)],_0x4f8383[_0x57bd2c(0x85)]]);let _0xd341db;const _0x2dbac2=await readFile(_0x4f8383[_0x57bd2c(0x85)]);if(_0x2dbac2[_0x57bd2c(0x88)]>0x400*0x400)throw CliErrors[_0x57bd2c(0x9a)](_0x57bd2c(0xb2));try{_0xd341db=JSON[_0x57bd2c(0xa2)](_0x2dbac2[_0x57bd2c(0x77)](_0x57bd2c(0xac)));}catch{throw CliErrors[_0x57bd2c(0x9a)](_0x57bd2c(0x98));}if(!_0xd341db||typeof _0xd341db!==_0x57bd2c(0x9b)||Array[_0x57bd2c(0xad)](_0xd341db)||Object[_0x57bd2c(0x7e)](_0xd341db)[_0x57bd2c(0x71)](_0x10f9e7=>typeof _0x10f9e7!==_0x57bd2c(0x86)))throw CliErrors[_0x57bd2c(0x9a)](_0x57bd2c(0xbb));const _0x53d36c=await getDatasetDetail(_0x1d110a),_0x33207e=assertDatasetImportTarget(_0x53d36c,_0x3fbc9e['appCode'],_0x1d110a);if(_0x33207e===_0x57bd2c(0x7a))throw CliErrors[_0x57bd2c(0x9a)](_0x57bd2c(0x91),_0x57bd2c(0xc3)+_0x1d110a+_0x57bd2c(0x7d)+_0x3fbc9e[_0x57bd2c(0xb6)]+_0x57bd2c(0x99)+_0x1d110a+_0x57bd2c(0x6e));if(_0x33207e!==_0x57bd2c(0x7b))throw CliErrors[_0x57bd2c(0x9a)](_0x57bd2c(0x8e),_0x57bd2c(0x8a));const _0x5eddc7=await buildExcelManifest({..._0x4f8383,'mapping':_0xd341db,'fields':normalizeImportFields(_0x53d36c)}),_0xd48cc=await getDatasetImportContract(_0x3fbc9e[_0x57bd2c(0xb6)],_0x1d110a);assertImportContract(_0xd48cc,_0x3fbc9e['appCode'],_0x1d110a),assertImageImportCapability(_0xd48cc,_0x5eddc7);if(_0x5eddc7[_0x57bd2c(0xc0)]?.[_0x57bd2c(0x88)]){const _0x29d781=await resolveImportOutputPath(_0x4f8383['checkpoint']+'.rows.json'),_0xf8e4b1=await Promise[_0x57bd2c(0x76)]([_0x29d781,_0x29d781+_0x57bd2c(0xb4),_0x29d781+'.lock.recovery',_0x4f8383[_0x57bd2c(0x72)]+_0x57bd2c(0xb4),_0x4f8383[_0x57bd2c(0x72)]+_0x57bd2c(0x8f)][_0x57bd2c(0x73)](resolveImportOutputPath));assertImportPaths(_0x4f8383['checkpoint'],_0x4f8383[_0x57bd2c(0x8c)],[_0x4f8383[_0x57bd2c(0xa9)],_0x4f8383[_0x57bd2c(0x85)],..._0xf8e4b1['slice'](0x0,0x3)]);}if(_0x4f8383[_0x57bd2c(0xb3)]>_0xd48cc[_0x57bd2c(0xab)])throw CliErrors[_0x57bd2c(0x9a)]('Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.');return{'args':_0x4f8383,'manifest':_0x5eddc7,'contract':_0xd48cc,'code':_0x1d110a};}async function checked(_0x414ad7){const _0x4a13f5=a26_0xb963;try{return await _0x414ad7();}catch(_0x4fe3cb){if(_0x4fe3cb instanceof CliError)throw _0x4fe3cb;throw CliErrors[_0x4a13f5(0x9a)](_0x4fe3cb[_0x4a13f5(0xba)]||_0x4a13f5(0x78));}}export const dataImportExcel={'service':'data','command':a26_0x2731e3(0x90),'risk':'write','description':a26_0x2731e3(0xbd),'confirmationDescription':a26_0x2731e3(0x9f),'flags':[CODE_FLAG,{'name':a26_0x2731e3(0xa9),'type':a26_0x2731e3(0x86),'required':!![],'description':a26_0x2731e3(0x89)},{'name':'mapping','type':a26_0x2731e3(0x86),'required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x2731e3(0xa6),'type':a26_0x2731e3(0x86),'description':a26_0x2731e3(0x96)},{'name':'header-row','type':'number','default':0x1,'description':a26_0x2731e3(0xb0)},{'name':a26_0x2731e3(0xa4),'type':'number','default':0x1f4,'description':'Maximum\x20records\x20per\x20request\x20(1..500)'},{'name':a26_0x2731e3(0x72),'type':a26_0x2731e3(0x86),'description':a26_0x2731e3(0xc4)},{'name':a26_0x2731e3(0x8c),'type':a26_0x2731e3(0x86),'description':a26_0x2731e3(0xa8)},{'name':a26_0x2731e3(0x9e),'type':a26_0x2731e3(0xa1),'description':a26_0x2731e3(0x80)}],'validate':async _0x263ce8=>{input(_0x263ce8);},'dryRun':async _0x176383=>checked(async()=>{const _0x36c353=a26_0x2731e3,{args:_0x53479a,manifest:_0x5e2b5f,contract:_0x35ffaa,code:_0x4baa3c}=await prepare(_0x176383),_0xc89890=new Set(_0x5e2b5f[_0x36c353(0x9c)][_0x36c353(0x73)](_0x105b46=>_0x105b46['rowNumber']))['size'];return{'method':_0x36c353(0xb9),'url':_0x36c353(0xbc)+encodeURIComponent(_0x176383[_0x36c353(0xb6)])+'/'+encodeURIComponent(_0x4baa3c)+_0x36c353(0xa3),'description':_0x36c353(0xaf),'body':{'schemaFingerprint':_0x35ffaa[_0x36c353(0x7f)]},'validRows':Math[_0x36c353(0xbf)](0x0,_0x5e2b5f[_0x36c353(0xbe)][_0x36c353(0x88)]-_0xc89890),'invalidRows':_0xc89890,'invalidCells':_0x5e2b5f[_0x36c353(0x9c)][_0x36c353(0x88)],'emptyRows':_0x5e2b5f['emptyRows'][_0x36c353(0x88)],'expectedBatches':previewImportBatchCount(_0x5e2b5f,_0x35ffaa,_0x53479a[_0x36c353(0xb3)]),'imageCount':_0x5e2b5f[_0x36c353(0xa7)]?.[_0x36c353(0xae)]((_0x3f6965,_0x21dc20)=>_0x3f6965+_0x21dc20['hashes'][_0x36c353(0x88)],0x0)??0x0,'uniqueImages':_0x5e2b5f[_0x36c353(0x84)]?.[_0x36c353(0x88)]??0x0,'uniqueImageBytes':_0x5e2b5f[_0x36c353(0x84)]?.[_0x36c353(0xae)]((_0xeab7b2,_0x789db9)=>_0xeab7b2+_0x789db9[_0x36c353(0x94)],0x0)??0x0,'errors':_0x5e2b5f[_0x36c353(0x9c)],'warnings':_0x5e2b5f[_0x36c353(0x8d)],'sheet':_0x5e2b5f[_0x36c353(0xa6)],'checkpoint':_0x53479a[_0x36c353(0x72)],'report':_0x53479a[_0x36c353(0x8c)]};}),'execute':async _0x22aeb4=>checked(async()=>{const _0x546a77=a26_0x2731e3,{args:_0x18bbdf,manifest:_0x47ab8f,contract:_0x3d05a2,code:_0x24c525}=await prepare(_0x22aeb4);if(_0x47ab8f['errors']['length']){await saveImportJson(_0x18bbdf[_0x546a77(0x8c)],{'status':_0x546a77(0xaa),'sourceRows':_0x47ab8f['rows'][_0x546a77(0x88)],'errors':_0x47ab8f[_0x546a77(0x9c)],'emptyRows':_0x47ab8f[_0x546a77(0xb1)],'warnings':_0x47ab8f[_0x546a77(0x8d)]});throw CliErrors[_0x546a77(0x9a)](_0x546a77(0x7c)+_0x47ab8f[_0x546a77(0x9c)][_0x546a77(0x88)]+_0x546a77(0x6f),_0x546a77(0x81)+_0x18bbdf[_0x546a77(0x8c)]+'.');}const _0x3e484e=_0x47ab8f[_0x546a77(0xc0)]?.[_0x546a77(0x88)]?runImageExcelImport:_0x3d05a2['schemaVersion']===0x2?runAutoIdExcelImport:runExcelImport,_0x11b38a=await _0x3e484e({..._0x18bbdf,'manifest':_0x47ab8f,'contract':_0x3d05a2,'appCode':_0x22aeb4[_0x546a77(0xb6)],'datasetCode':_0x24c525,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x18bbdf['file'],_0x18bbdf[_0x546a77(0x85)]],'imageApi':{'upload':(_0x21f8c6,_0x43590c)=>uploadDatasetImportImage(_0x22aeb4[_0x546a77(0xb6)],_0x24c525,_0x21f8c6,_0x43590c),'readback':(_0x291bb6,_0x3e6aa6)=>readDatasetImportImage(_0x22aeb4[_0x546a77(0xb6)],_0x24c525,_0x291bb6,_0x3e6aa6)},'api':{'write':(_0x1089aa,_0x2adc8c)=>createDatasetImportBatch(_0x22aeb4[_0x546a77(0xb6)],_0x24c525,{'schemaFingerprint':_0x3d05a2[_0x546a77(0x7f)],'items':_0x1089aa,..._0x2adc8c===undefined?{}:{'taskId':_0x2adc8c}}),'readback':_0x20ee45=>readDatasetImportRows(_0x22aeb4[_0x546a77(0xb6)],_0x24c525,_0x20ee45),'readTask':_0x326e91=>readDatasetImportTaskRows(_0x22aeb4['appCode'],_0x24c525,_0x326e91)}});return{'ok':!![],'data':_0x11b38a,'message':_0x546a77(0x79)+_0x11b38a[_0x546a77(0x74)]+'\x20records.'};})};