@lovrabet/lovrabet-cli 2.3.8-beta.4 → 2.3.8-beta.5

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 (190) hide show
  1. package/README.md +12 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.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.d.ts +3 -0
  38. package/lib/commands/issue/context.js +1 -0
  39. package/lib/commands/issue/index.d.ts +2 -0
  40. package/lib/commands/issue/index.js +1 -0
  41. package/lib/commands/issue/report.d.ts +2 -0
  42. package/lib/commands/issue/report.js +1 -0
  43. package/lib/commands/kb/index.js +1 -1
  44. package/lib/commands/logs/index.js +1 -1
  45. package/lib/commands/notification/config-list.js +1 -1
  46. package/lib/commands/notification/index.js +1 -1
  47. package/lib/commands/notification/shared.js +1 -1
  48. package/lib/commands/ocr/index.js +1 -1
  49. package/lib/commands/permit/dataset-get.js +1 -1
  50. package/lib/commands/permit/dataset-set.js +1 -1
  51. package/lib/commands/permit/index.js +1 -1
  52. package/lib/commands/permit/page-get.js +1 -1
  53. package/lib/commands/permit/page-set.js +1 -1
  54. package/lib/commands/permit/role-menus-set.js +1 -1
  55. package/lib/commands/permit/role-menus.js +1 -1
  56. package/lib/commands/permit/shared.js +1 -1
  57. package/lib/commands/personal-bff/index.js +1 -1
  58. package/lib/commands/registry.js +1 -1
  59. package/lib/commands/role/create.js +1 -1
  60. package/lib/commands/role/delete.js +1 -1
  61. package/lib/commands/role/detail.js +1 -1
  62. package/lib/commands/role/index.js +1 -1
  63. package/lib/commands/role/list.js +1 -1
  64. package/lib/commands/role/shared.js +1 -1
  65. package/lib/commands/role/update.js +1 -1
  66. package/lib/commands/role/user-add.js +1 -1
  67. package/lib/commands/role/user-remove.js +1 -1
  68. package/lib/commands/schedule/index.js +1 -1
  69. package/lib/commands/schema.js +1 -1
  70. package/lib/commands/service/dynamic.js +1 -1
  71. package/lib/commands/service/function-name-adapter.js +1 -1
  72. package/lib/commands/service/index.js +1 -1
  73. package/lib/commands/service/registry.js +1 -1
  74. package/lib/commands/skill/commands/create.js +1 -1
  75. package/lib/commands/skill/commands/diagram.js +1 -1
  76. package/lib/commands/skill/commands/install.js +1 -1
  77. package/lib/commands/skill/commands/list.js +1 -1
  78. package/lib/commands/skill/commands/push.js +1 -1
  79. package/lib/commands/skill/commands/validate.js +1 -1
  80. package/lib/commands/skill/diagram.js +1 -1
  81. package/lib/commands/skill/flags.js +1 -1
  82. package/lib/commands/skill/index.js +1 -1
  83. package/lib/commands/skill/manifest-helpers.js +1 -1
  84. package/lib/commands/skill/push-execute.js +1 -1
  85. package/lib/commands/skill/push-flow-helpers.js +1 -1
  86. package/lib/commands/skill/push-retarget.js +1 -1
  87. package/lib/commands/skill/scopes.js +1 -1
  88. package/lib/commands/skill/summary.js +1 -1
  89. package/lib/commands/skill/templates.js +1 -1
  90. package/lib/commands/skill/validate.js +1 -1
  91. package/lib/commands/sql/detail.js +1 -1
  92. package/lib/commands/sql/exec.js +1 -1
  93. package/lib/commands/sql/index.js +1 -1
  94. package/lib/commands/update.js +1 -1
  95. package/lib/commands/user-account/bind.js +1 -1
  96. package/lib/commands/user-account/index.js +1 -1
  97. package/lib/commands/workspace/index.js +1 -1
  98. package/lib/config/domain-config.js +1 -1
  99. package/lib/config/schema.js +1 -1
  100. package/lib/constant/app.js +1 -1
  101. package/lib/constant/auth-mode.js +1 -1
  102. package/lib/constant/cli.js +1 -1
  103. package/lib/constant/defaults.js +1 -1
  104. package/lib/constant/distribution.js +1 -1
  105. package/lib/constant/domain.js +1 -1
  106. package/lib/constant/env.js +1 -1
  107. package/lib/constant/output.js +1 -1
  108. package/lib/constant/product.js +1 -1
  109. package/lib/constant/region.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  111. package/lib/constant/url.js +1 -1
  112. package/lib/context.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/db-resolver.js +1 -1
  115. package/lib/core/kb-management-client.js +1 -1
  116. package/lib/core/kb-sdk-errors.js +1 -1
  117. package/lib/core/kb-search-client.js +1 -1
  118. package/lib/core/sdk-client.js +1 -1
  119. package/lib/errors.js +1 -1
  120. package/lib/framework/access-error.js +1 -1
  121. package/lib/framework/build-all-flags.js +1 -1
  122. package/lib/framework/dryrun.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/preparse.js +1 -1
  128. package/lib/framework/rate-limit.js +1 -1
  129. package/lib/framework/raw-flags.js +1 -1
  130. package/lib/framework/response.js +1 -1
  131. package/lib/framework/runner-confirmation.js +1 -1
  132. package/lib/framework/runner-error.js +1 -1
  133. package/lib/framework/runner.js +1 -1
  134. package/lib/framework/schema-export.js +1 -1
  135. package/lib/framework/service-order.js +1 -1
  136. package/lib/framework/types.js +1 -1
  137. package/lib/generated/build-info.d.ts +4 -4
  138. package/lib/generated/build-info.js +1 -1
  139. package/lib/generated/official-routing.js +1 -1
  140. package/lib/generated/routing-contract.js +1 -1
  141. package/lib/help.js +1 -1
  142. package/lib/postinstall.js +1 -1
  143. package/lib/runtime/confirmation.js +1 -1
  144. package/lib/runtime/event.js +1 -1
  145. package/lib/runtime/index.js +1 -1
  146. package/lib/runtime/queue.js +1 -1
  147. package/lib/runtime/resolve.js +1 -1
  148. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  149. package/lib/services/dataset-import/excel-reader.js +1 -1
  150. package/lib/services/dataset-import/image-bytes.js +1 -1
  151. package/lib/services/dataset-import/image-ooxml.js +1 -1
  152. package/lib/services/dataset-import/image-runner.js +1 -1
  153. package/lib/services/dataset-import/metadata.js +1 -1
  154. package/lib/services/dataset-import/preview.js +1 -1
  155. package/lib/services/dataset-import/runner.js +1 -1
  156. package/lib/skills/builtin-skill.js +1 -1
  157. package/lib/skills/npx-skills-add.js +1 -1
  158. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  159. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  160. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  161. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  162. package/lib/skills/runtime-skill-sync/links.js +1 -1
  163. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  164. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  165. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  166. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  167. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  168. package/lib/skills/runtime-skill-sync/push.js +1 -1
  169. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  170. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  171. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  172. package/lib/skills/runtime-skill-sync.js +1 -1
  173. package/lib/skills/skill-presence.js +1 -1
  174. package/lib/utils/access-key-redaction.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cli-version-check.js +1 -1
  177. package/lib/utils/cli-version-policy.js +1 -1
  178. package/lib/utils/logger.js +1 -1
  179. package/lib/utils/lossless-json.js +1 -1
  180. package/lib/utils/params.js +1 -1
  181. package/lib/utils/positive-safe-integer.js +1 -1
  182. package/lib/utils/redaction.js +1 -1
  183. package/lib/utils/runtime-user-id.js +1 -1
  184. package/lib/utils/update-notice.js +1 -1
  185. package/lib/utils/version.js +1 -1
  186. package/lib/utils/write-cli-side-channel.js +1 -1
  187. package/package.json +2 -2
  188. package/skills/lovrabet/SKILL.md +3 -1
  189. package/skills/lovrabet/references/lovrabet-issue-report.md +24 -0
  190. package/skills/lovrabet.manifest.json +4 -3
@@ -1 +1 @@
1
- const a12_0x41834d=a12_0x3c4f;(function(_0x2301c3,_0x4e7559){const _0x224d9f=a12_0x3c4f,_0x5d3fba=_0x2301c3();while(!![]){try{const _0x43bd39=-parseInt(_0x224d9f(0x10a))/0x1*(parseInt(_0x224d9f(0xf3))/0x2)+parseInt(_0x224d9f(0x107))/0x3*(-parseInt(_0x224d9f(0x12e))/0x4)+-parseInt(_0x224d9f(0x111))/0x5*(parseInt(_0x224d9f(0x131))/0x6)+parseInt(_0x224d9f(0xde))/0x7*(parseInt(_0x224d9f(0xe6))/0x8)+-parseInt(_0x224d9f(0x11c))/0x9*(-parseInt(_0x224d9f(0x11d))/0xa)+parseInt(_0x224d9f(0x113))/0xb*(-parseInt(_0x224d9f(0xe3))/0xc)+-parseInt(_0x224d9f(0xfa))/0xd*(-parseInt(_0x224d9f(0x120))/0xe);if(_0x43bd39===_0x4e7559)break;else _0x5d3fba['push'](_0x5d3fba['shift']());}catch(_0x21ebca){_0x5d3fba['push'](_0x5d3fba['shift']());}}}(a12_0x329a,0xb0ef2));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a12_0x3c4f(_0x510149,_0x138fc8){_0x510149=_0x510149-0xdb;const _0x329a43=a12_0x329a();let _0x3c4f47=_0x329a43[_0x510149];return _0x3c4f47;}function resolveAuthScopeFlags(_0x480f3e){const _0x37b186=a12_0x3c4f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x480f3e[_0x37b186(0xee)](_0x37b186(0x100)),'explicitProject':_0x480f3e['bool'](_0x37b186(0x133)),'policy':'global-default'}));}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 _0x59f550=a12_0x3c4f;return crypto[_0x59f550(0xfe)]();}export function buildDeviceAuthUrl(_0x463e97,_0x2b6882,_0x2a2fe8='lovrabet-cli'){const _0x362dd6=a12_0x3c4f;return _0x463e97+_0x362dd6(0x114)+encodeURIComponent(_0x2b6882)+'&source='+encodeURIComponent(_0x2a2fe8);}export function getDeviceCodePath(){const _0x56bbb8=a12_0x3c4f;return homedir()+'/'+PRODUCT_CONFIG[_0x56bbb8(0x130)]+_0x56bbb8(0x10e);}function a12_0x329a(){const _0xac0a6e=['/.device-auth','test','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','35HoQyaB','Device\x20authorization\x20cancelled.','93599lsHNfx','/device-auth?code=','now','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','AccessKey\x20saved\x20to\x20','\x20config.','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','access_key','cancelled','1791873bSHgVU','30HyOLwk','After\x20authorizing,\x20re-run:\x20','boolean','126VYIIZo','signal','\x20auth\x20device','stderr','json','\x0dWaiting\x20for\x20authorization...\x20','utf8','floor','source','data','stringify','Verify:\x20','getTime','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','385340nGWCOr','Write\x20to\x20global\x20config\x20(default)','homeDirName','672834MZZLjo','write','project','string','padStart','POST','Write\x20to\x20project\x20config','259dSZuoD','SIGINT','str','Device\x20auth\x20API\x20error\x20(','/api/device-auth/token','1380ExaiRZ','Invalid\x20device\x20auth\x20response','apiError','307976UbhBiv','nonInteractive','abort','networkError','status','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','\x20auth\x20status','AbortError','bool','removeListener','createdAt','device','Invalid\x20access_key\x20returned\x20by\x20server.','4TjdBHk','auth','object','),\x20retrying...','success','Device\x20authorization\x20successful.','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','2962947CUDWZR','lovrabet-cli','scope','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','randomUUID','code','global','accessKey','validation','log','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.','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','45QeBBbe','application/json','aborted','69848aaIbQz','parse','\x20remaining','trim'];a12_0x329a=function(){return _0xac0a6e;};return a12_0x329a();}export function readStoredDeviceCode(){const _0x4cc3c1=a12_0x3c4f,_0x503c66=getDeviceCodePath();if(!existsSync(_0x503c66))return null;try{const _0x9022c6=readFileSync(_0x503c66,{'encoding':_0x4cc3c1(0x126)}),_0x538c1c=JSON[_0x4cc3c1(0x10b)](_0x9022c6);if(_0x538c1c&&typeof _0x538c1c['code']===_0x4cc3c1(0x134)&&typeof _0x538c1c[_0x4cc3c1(0xf0)]==='string'&&(_0x538c1c[_0x4cc3c1(0xfc)]===_0x4cc3c1(0x100)||_0x538c1c[_0x4cc3c1(0xfc)]==='project'))return _0x538c1c;}catch{}return null;}export function writeStoredDeviceCode(_0x40e15c,_0x243cc7){const _0x4718f2=a12_0x3c4f,_0xcf1a4c=getDeviceCodePath(),_0x4e1051=dirname(_0xcf1a4c);!existsSync(_0x4e1051)&&mkdirSync(_0x4e1051,{'recursive':!![]});const _0x3acba2={'code':_0x40e15c,'createdAt':new Date()['toISOString'](),'scope':_0x243cc7};writeFileSync(_0xcf1a4c,JSON[_0x4718f2(0x12a)](_0x3acba2),{'encoding':_0x4718f2(0x126),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x3822e5=getDeviceCodePath();try{unlinkSync(_0x3822e5);}catch{}}export function isStoredDeviceCodeExpired(_0x21a832){const _0x31b98f=a12_0x3c4f;return Date[_0x31b98f(0x115)]()-new Date(_0x21a832[_0x31b98f(0xf0)])[_0x31b98f(0x12c)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0xe9a0e9,_0x489c2c){const _0x17f07a=a12_0x3c4f,_0x5a0339=_0xe9a0e9+_0x17f07a(0xe2),_0x107043=new AbortController(),_0x2b868d=setTimeout(()=>_0x107043[_0x17f07a(0xe8)](),0x2710),_0x187031=await fetch(_0x5a0339,{'method':_0x17f07a(0xdc),'headers':{'Content-Type':_0x17f07a(0x108)},'body':JSON[_0x17f07a(0x12a)]({'code':_0x489c2c}),'signal':_0x107043[_0x17f07a(0x121)]});clearTimeout(_0x2b868d);if(!_0x187031['ok'])throw CliErrors[_0x17f07a(0xe9)]('Device\x20auth\x20API\x20returned\x20HTTP\x20'+_0x187031['status']);const _0x8e1bef=await _0x187031[_0x17f07a(0x124)](),_0x52723b=_0x8e1bef[_0x17f07a(0x129)]&&typeof _0x8e1bef[_0x17f07a(0x129)]===_0x17f07a(0xf5)?_0x8e1bef['data']:_0x8e1bef;if(!_0x52723b||typeof _0x52723b[_0x17f07a(0xea)]!=='string')throw CliErrors[_0x17f07a(0xe5)](_0x17f07a(0xe4));return{'status':_0x52723b[_0x17f07a(0xea)],'access_key':typeof _0x52723b[_0x17f07a(0x11a)]===_0x17f07a(0x134)?_0x52723b[_0x17f07a(0x11a)]:undefined};}export async function pollDeviceToken(_0x8f31ba,_0x1fa2d0,_0x2f9e00){const _0x9335b9=a12_0x3c4f;let _0x4675a2=0x0;for(let _0x3ce9a0=0x0;_0x3ce9a0<MAX_POLLS;_0x3ce9a0++){if(_0x2f9e00[_0x9335b9(0x109)])throw CliErrors['cancelled']('Device\x20authorization\x20cancelled.');let _0x25aaaa;try{_0x25aaaa=await fetchDeviceToken(_0x8f31ba,_0x1fa2d0);}catch(_0x4a8d67){if(_0x4a8d67 instanceof Error&&_0x4a8d67['name']===_0x9335b9(0xed))throw CliErrors[_0x9335b9(0x11b)](_0x9335b9(0x112));_0x4675a2++;if(_0x4675a2>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x9335b9(0xe9)](_0x9335b9(0xeb));writeCliSideChannelLine(_0x9335b9(0xe1)+_0x4675a2+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x9335b9(0xf6)),await sleep(POLL_INTERVAL_MS);continue;}_0x4675a2=0x0;if(_0x25aaaa['status']===_0x9335b9(0xf7)){if(!_0x25aaaa['access_key'])throw CliErrors[_0x9335b9(0xe5)](_0x9335b9(0xf2));return _0x25aaaa[_0x9335b9(0x11a)];}if(_0x25aaaa['status']==='expired'){deleteStoredDeviceCode();throw CliErrors[_0x9335b9(0x102)]('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0x404a4a=(_0x3ce9a0+0x1)*POLL_INTERVAL_MS,_0x32de60=DEVICE_CODE_TTL_MS-_0x404a4a,_0xb82947=Math[_0x9335b9(0x127)](_0x32de60/0xea60),_0x5bb4c9=Math[_0x9335b9(0x127)](_0x32de60%0xea60/0x3e8);process['stderr']['write'](_0x9335b9(0x125)+_0xb82947+':'+String(_0x5bb4c9)[_0x9335b9(0xdb)](0x2,'0')+_0x9335b9(0x10c)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x9335b9(0x102)](_0x9335b9(0x105));}function sleep(_0x191589){return new Promise(_0x1f33ff=>setTimeout(_0x1f33ff,_0x191589));}export const authDeviceDefinition={'service':a12_0x41834d(0xf4),'command':a12_0x41834d(0xf1),'description':a12_0x41834d(0xfd),'risk':'write','confirmationDescription':a12_0x41834d(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x41834d(0x100),'type':a12_0x41834d(0x11f),'description':a12_0x41834d(0x12f),'default':!![]},{'name':a12_0x41834d(0x133),'type':a12_0x41834d(0x11f),'description':a12_0x41834d(0xdd),'default':![]},{'name':a12_0x41834d(0x128),'type':a12_0x41834d(0x134),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a12_0x41834d(0xfb)},{'name':'url-only','type':'boolean','description':a12_0x41834d(0xf9),'default':![]}],async 'execute'(_0x3a1eec){const _0x287cf4=a12_0x41834d,_0x1fc630=resolveAuthScopeFlags(_0x3a1eec),_0x57fd60=_0x1fc630['global']?_0x287cf4(0x100):_0x287cf4(0x133),_0xd0ee63=readScopedConfig(_0x1fc630);if(_0xd0ee63['accessKey'])return{'ok':!![],'message':_0x287cf4(0x116)};const _0x482b96=(_0x3a1eec[_0x287cf4(0xe0)](_0x287cf4(0x128))||_0x287cf4(0xfb))[_0x287cf4(0x10d)](),_0x24101a=getUserDomain(),_0x15fbd4=readStoredDeviceCode(),_0x60a2f3=_0x15fbd4&&!isStoredDeviceCodeExpired(_0x15fbd4)?_0x15fbd4[_0x287cf4(0xff)]:((()=>{const _0x32d8f2=generateDeviceCode();return writeStoredDeviceCode(_0x32d8f2,_0x57fd60),_0x32d8f2;})()),_0x5bc860=buildDeviceAuthUrl(_0x24101a,_0x60a2f3,_0x482b96);if(_0x3a1eec[_0x287cf4(0xee)]('url-only'))return console[_0x287cf4(0x103)](_0x5bc860),{'ok':!![]};writeCliSideChannelLine(_0x287cf4(0x110)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x5bc860),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x287cf4(0x12d));if(_0x3a1eec[_0x287cf4(0xe7)])return writeCliSideChannelLine(_0x287cf4(0x11e)+CLI_BIN_NAME+_0x287cf4(0x122)),{'ok':!![],'message':_0x287cf4(0x119)};writeCliSideChannelLine(_0x287cf4(0x106));const _0x3ad051=new AbortController(),_0x24b883=()=>{const _0x246cf4=_0x287cf4;_0x3ad051['abort'](),process[_0x246cf4(0xef)]('SIGINT',_0x24b883);};process['once']('SIGINT',_0x24b883);let _0x35f552;try{_0x35f552=await pollDeviceToken(_0x24101a,_0x60a2f3,_0x3ad051[_0x287cf4(0x121)]);}finally{process['removeListener'](_0x287cf4(0xdf),_0x24b883);}if(!ACCESS_KEY_PATTERN[_0x287cf4(0x10f)](_0x35f552))throw CliErrors[_0x287cf4(0xe5)](_0x287cf4(0xf2));const _0x163f3d=readScopedConfig(_0x1fc630);return _0x163f3d[_0x287cf4(0x101)]=_0x35f552,writeScopedConfig(_0x163f3d,_0x1fc630),deleteStoredDeviceCode(),process[_0x287cf4(0x123)][_0x287cf4(0x132)]('\x0a'),writeCliSideChannelLine(_0x287cf4(0x117)+_0x57fd60+_0x287cf4(0x118)),writeCliSideChannelLine(_0x287cf4(0x12b)+CLI_BIN_NAME+_0x287cf4(0xec)),{'ok':!![],'message':_0x287cf4(0xf8)};}};
1
+ const a12_0x3c9fb7=a12_0xb3a0;(function(_0x402ab8,_0x4c0319){const _0x341271=a12_0xb3a0,_0x26b1de=_0x402ab8();while(!![]){try{const _0x107f44=-parseInt(_0x341271(0x207))/0x1*(-parseInt(_0x341271(0x22f))/0x2)+parseInt(_0x341271(0x210))/0x3*(-parseInt(_0x341271(0x20a))/0x4)+-parseInt(_0x341271(0x1e6))/0x5*(parseInt(_0x341271(0x1f9))/0x6)+parseInt(_0x341271(0x1fb))/0x7+-parseInt(_0x341271(0x231))/0x8*(-parseInt(_0x341271(0x21e))/0x9)+parseInt(_0x341271(0x22d))/0xa+-parseInt(_0x341271(0x222))/0xb;if(_0x107f44===_0x4c0319)break;else _0x26b1de['push'](_0x26b1de['shift']());}catch(_0x899e32){_0x26b1de['push'](_0x26b1de['shift']());}}}(a12_0x1fe6,0xef955));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';function a12_0xb3a0(_0x414c59,_0x3c26c0){_0x414c59=_0x414c59-0x1e3;const _0x1fe60e=a12_0x1fe6();let _0xb3a0ab=_0x1fe60e[_0x414c59];return _0xb3a0ab;}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x51a538){const _0x1867b4=a12_0xb3a0;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x51a538['bool'](_0x1867b4(0x226)),'explicitProject':_0x51a538[_0x1867b4(0x1e3)](_0x1867b4(0x1eb)),'policy':'global-default'}));}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;function a12_0x1fe6(){const _0x3e3f5c=['Device\x20auth\x20API\x20returned\x20HTTP\x20','1829987dfApYU','/api/device-auth/token','getTime','36rKQzBs','Verify:\x20','string','\x20auth\x20status','data','device','248553AGAHBP','test','str','lovrabet-cli','),\x20retrying...','cancelled','log','application/json','&source=','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','AbortError','source','nonInteractive','aborted','9pBaNAm','Write\x20to\x20project\x20config','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.','\x20auth\x20device','31881630Hipigk','write','boolean','accessKey','global','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','POST','After\x20authorizing,\x20re-run:\x20','networkError','once','abort','105030dtDHmk','scope','2NrNelX','access_key','12151544QcZTHz','SIGINT','url-only','bool','/device-auth?code=','object','149655qkQEGK','code','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','trim','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','project','signal','apiError','homeDirName','stderr','name','Invalid\x20device\x20auth\x20response','\x20remaining','stringify','toISOString','createdAt','Write\x20to\x20global\x20config\x20(default)','Invalid\x20access_key\x20returned\x20by\x20server.','parse','138ewvahM','utf8','13680114xxEYcI','removeListener','expired','validation','\x0dWaiting\x20for\x20authorization...\x20','\x20config.','padStart','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','status','Device\x20authorization\x20cancelled.','floor'];a12_0x1fe6=function(){return _0x3e3f5c;};return a12_0x1fe6();}export function generateDeviceCode(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x223548,_0x27cc9b,_0x62d6dc=a12_0x3c9fb7(0x213)){const _0x136c2d=a12_0x3c9fb7;return _0x223548+_0x136c2d(0x1e4)+encodeURIComponent(_0x27cc9b)+_0x136c2d(0x218)+encodeURIComponent(_0x62d6dc);}export function getDeviceCodePath(){const _0x5b0d7e=a12_0x3c9fb7;return homedir()+'/'+PRODUCT_CONFIG[_0x5b0d7e(0x1ee)]+'/.device-auth';}export function readStoredDeviceCode(){const _0xae4761=a12_0x3c9fb7,_0x51b269=getDeviceCodePath();if(!existsSync(_0x51b269))return null;try{const _0x123ca2=readFileSync(_0x51b269,{'encoding':_0xae4761(0x1fa)}),_0x3c8555=JSON[_0xae4761(0x1f8)](_0x123ca2);if(_0x3c8555&&typeof _0x3c8555[_0xae4761(0x1e7)]===_0xae4761(0x20c)&&typeof _0x3c8555['createdAt']===_0xae4761(0x20c)&&(_0x3c8555[_0xae4761(0x22e)]==='global'||_0x3c8555[_0xae4761(0x22e)]===_0xae4761(0x1eb)))return _0x3c8555;}catch{}return null;}export function writeStoredDeviceCode(_0xebbbaa,_0x2b82ac){const _0x428073=a12_0x3c9fb7,_0x36a862=getDeviceCodePath(),_0x4ecf8b=dirname(_0x36a862);!existsSync(_0x4ecf8b)&&mkdirSync(_0x4ecf8b,{'recursive':!![]});const _0x10df75={'code':_0xebbbaa,'createdAt':new Date()[_0x428073(0x1f4)](),'scope':_0x2b82ac};writeFileSync(_0x36a862,JSON[_0x428073(0x1f3)](_0x10df75),{'encoding':_0x428073(0x1fa),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x4f826c=getDeviceCodePath();try{unlinkSync(_0x4f826c);}catch{}}export function isStoredDeviceCodeExpired(_0x4e842c){const _0x421991=a12_0x3c9fb7;return Date['now']()-new Date(_0x4e842c[_0x421991(0x1f5)])[_0x421991(0x209)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x45517a,_0x4f1ec4){const _0x5bcf40=a12_0x3c9fb7,_0x3baaab=_0x45517a+_0x5bcf40(0x208),_0x19153c=new AbortController(),_0x466db5=setTimeout(()=>_0x19153c[_0x5bcf40(0x22c)](),0x2710),_0x1f5fce=await fetch(_0x3baaab,{'method':_0x5bcf40(0x228),'headers':{'Content-Type':_0x5bcf40(0x217)},'body':JSON[_0x5bcf40(0x1f3)]({'code':_0x4f1ec4}),'signal':_0x19153c[_0x5bcf40(0x1ec)]});clearTimeout(_0x466db5);if(!_0x1f5fce['ok'])throw CliErrors[_0x5bcf40(0x22a)](_0x5bcf40(0x206)+_0x1f5fce[_0x5bcf40(0x203)]);const _0x4d00f8=await _0x1f5fce['json'](),_0x2c39b4=_0x4d00f8['data']&&typeof _0x4d00f8[_0x5bcf40(0x20e)]===_0x5bcf40(0x1e5)?_0x4d00f8[_0x5bcf40(0x20e)]:_0x4d00f8;if(!_0x2c39b4||typeof _0x2c39b4['status']!==_0x5bcf40(0x20c))throw CliErrors[_0x5bcf40(0x1ed)](_0x5bcf40(0x1f1));return{'status':_0x2c39b4[_0x5bcf40(0x203)],'access_key':typeof _0x2c39b4[_0x5bcf40(0x230)]===_0x5bcf40(0x20c)?_0x2c39b4[_0x5bcf40(0x230)]:undefined};}export async function pollDeviceToken(_0x3f292b,_0x3113cf,_0x2cafd7){const _0x1277a9=a12_0x3c9fb7;let _0x4b250f=0x0;for(let _0x152b28=0x0;_0x152b28<MAX_POLLS;_0x152b28++){if(_0x2cafd7[_0x1277a9(0x21d)])throw CliErrors['cancelled'](_0x1277a9(0x204));let _0x3264bb;try{_0x3264bb=await fetchDeviceToken(_0x3f292b,_0x3113cf);}catch(_0x4c4232){if(_0x4c4232 instanceof Error&&_0x4c4232[_0x1277a9(0x1f0)]===_0x1277a9(0x21a))throw CliErrors[_0x1277a9(0x215)](_0x1277a9(0x204));_0x4b250f++;if(_0x4b250f>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x1277a9(0x22a)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine('Device\x20auth\x20API\x20error\x20('+_0x4b250f+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x1277a9(0x214)),await sleep(POLL_INTERVAL_MS);continue;}_0x4b250f=0x0;if(_0x3264bb[_0x1277a9(0x203)]==='success'){if(!_0x3264bb[_0x1277a9(0x230)])throw CliErrors['apiError'](_0x1277a9(0x1f7));return _0x3264bb['access_key'];}if(_0x3264bb['status']===_0x1277a9(0x1fd)){deleteStoredDeviceCode();throw CliErrors[_0x1277a9(0x1fe)]('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0xdf3d87=(_0x152b28+0x1)*POLL_INTERVAL_MS,_0x3dfca1=DEVICE_CODE_TTL_MS-_0xdf3d87,_0x1bc4f8=Math[_0x1277a9(0x205)](_0x3dfca1/0xea60),_0x404e22=Math[_0x1277a9(0x205)](_0x3dfca1%0xea60/0x3e8);process[_0x1277a9(0x1ef)][_0x1277a9(0x223)](_0x1277a9(0x1ff)+_0x1bc4f8+':'+String(_0x404e22)[_0x1277a9(0x201)](0x2,'0')+_0x1277a9(0x1f2)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x1277a9(0x1fe)](_0x1277a9(0x202));}function sleep(_0x3b5fcc){return new Promise(_0x282234=>setTimeout(_0x282234,_0x3b5fcc));}export const authDeviceDefinition={'service':'auth','command':a12_0x3c9fb7(0x20f),'description':'Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','risk':'write','confirmationDescription':a12_0x3c9fb7(0x220),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3c9fb7(0x226),'type':a12_0x3c9fb7(0x224),'description':a12_0x3c9fb7(0x1f6),'default':!![]},{'name':a12_0x3c9fb7(0x1eb),'type':a12_0x3c9fb7(0x224),'description':a12_0x3c9fb7(0x21f),'default':![]},{'name':a12_0x3c9fb7(0x21b),'type':a12_0x3c9fb7(0x20c),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':a12_0x3c9fb7(0x213)},{'name':a12_0x3c9fb7(0x233),'type':'boolean','description':'Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','default':![]}],async 'execute'(_0x574d53){const _0x431a3f=a12_0x3c9fb7,_0x4b0558=resolveAuthScopeFlags(_0x574d53),_0x303a1d=_0x4b0558[_0x431a3f(0x226)]?_0x431a3f(0x226):_0x431a3f(0x1eb),_0x37a739=readScopedConfig(_0x4b0558);if(_0x37a739[_0x431a3f(0x225)])return{'ok':!![],'message':_0x431a3f(0x1ea)};const _0x166caf=(_0x574d53[_0x431a3f(0x212)]('source')||'lovrabet-cli')[_0x431a3f(0x1e9)](),_0x2d47b2=getUserDomain(),_0x57ed0c=readStoredDeviceCode(),_0x44daf6=_0x57ed0c&&!isStoredDeviceCodeExpired(_0x57ed0c)?_0x57ed0c[_0x431a3f(0x1e7)]:((()=>{const _0x32b148=generateDeviceCode();return writeStoredDeviceCode(_0x32b148,_0x303a1d),_0x32b148;})()),_0x467247=buildDeviceAuthUrl(_0x2d47b2,_0x44daf6,_0x166caf);if(_0x574d53[_0x431a3f(0x1e3)](_0x431a3f(0x233)))return console[_0x431a3f(0x216)](_0x467247),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x467247),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x431a3f(0x227));if(_0x574d53[_0x431a3f(0x21c)])return writeCliSideChannelLine(_0x431a3f(0x229)+CLI_BIN_NAME+_0x431a3f(0x221)),{'ok':!![],'message':_0x431a3f(0x1e8)};writeCliSideChannelLine(_0x431a3f(0x219));const _0x427776=new AbortController(),_0x31cdb1=()=>{const _0x4bd943=_0x431a3f;_0x427776[_0x4bd943(0x22c)](),process[_0x4bd943(0x1fc)]('SIGINT',_0x31cdb1);};process[_0x431a3f(0x22b)](_0x431a3f(0x232),_0x31cdb1);let _0x146261;try{_0x146261=await pollDeviceToken(_0x2d47b2,_0x44daf6,_0x427776[_0x431a3f(0x1ec)]);}finally{process['removeListener'](_0x431a3f(0x232),_0x31cdb1);}if(!ACCESS_KEY_PATTERN[_0x431a3f(0x211)](_0x146261))throw CliErrors[_0x431a3f(0x1ed)](_0x431a3f(0x1f7));const _0x1d230b=readScopedConfig(_0x4b0558);return _0x1d230b[_0x431a3f(0x225)]=_0x146261,writeScopedConfig(_0x1d230b,_0x4b0558),deleteStoredDeviceCode(),process['stderr']['write']('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x303a1d+_0x431a3f(0x200)),writeCliSideChannelLine(_0x431a3f(0x20b)+CLI_BIN_NAME+_0x431a3f(0x20d)),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};
@@ -1 +1 @@
1
- const a13_0x166a21=a13_0x3cb5;function a13_0x2e99(){const _0x2572de=['1581981EWNzeu','Write\x20to\x20global\x20config\x20(default)','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','join','AccessKey\x20(ak_xxx...)','project\x20config','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','\x20auth\x20status','string','AccessKey\x20saved\x20to\x20','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','global','logout','\x20auth\x20login\x20--access-key\x20<ak_xxx>','2575VAarYN','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Invalid\x20accessKey\x20format.','success','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Show\x20current\x20authentication\x20status','write','boolean','trim','userCenterDisplayName','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','bool','project','\x20config','Option\x20A:\x20','test','8595153jjPaXm','stdout','Clear\x20the\x20AccessKey\x20from\x20config','daily','Read\x20from\x20global\x20config\x20(default)','Use\x20`','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20Verify:\x20','10888fzbsdi','\x20config.','1746546fIUeBq','global-default','ACCESS_KEY','\x20config.\x20Nothing\x20to\x20clear.','env','3196350WXbzJO','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','scope','cancelled','info','ClientAk','Status:\x20valid','str','41283208pNpgkK','\x20env\x20var','`auth\x20login`\x20does\x20not\x20support\x20--yes.','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Option\x20C:\x20environment\x20variable','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','code','accessKeyCreatePath','177200qKZuNE','\x20doctor','=ak_xxx','stdin','Tip:\x20you\x20can\x20also\x20run:','expired','status','access-key','isTTY','validation','accessKey','Then\x20verify\x20with:\x20','read','check','authRequired','\x20(via\x20','access_key','auth','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20AccessKey\x20found\x20in\x20','production','nonInteractive','newConfigFileName','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','push','Auth\x20mode:\x20','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','AccessKey:\x20'];a13_0x2e99=function(){return _0x2572de;};return a13_0x2e99();}(function(_0x4d4251,_0x3fd46d){const _0x1ed0f8=a13_0x3cb5,_0x20374e=_0x4d4251();while(!![]){try{const _0x353ffd=-parseInt(_0x1ed0f8(0xb0))/0x1+parseInt(_0x1ed0f8(0xc6))/0x2+-parseInt(_0x1ed0f8(0xe2))/0x3+parseInt(_0x1ed0f8(0x109))/0x4*(-parseInt(_0x1ed0f8(0xf0))/0x5)+parseInt(_0x1ed0f8(0xb5))/0x6+-parseInt(_0x1ed0f8(0x101))/0x7+parseInt(_0x1ed0f8(0xbd))/0x8;if(_0x353ffd===_0x3fd46d)break;else _0x20374e['push'](_0x20374e['shift']());}catch(_0x35f210){_0x20374e['push'](_0x20374e['shift']());}}}(a13_0x2e99,0xd6640));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';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(_0x467991=USER_ACCESS_KEY_CREATE_URL){const _0x80aad5=a13_0x3cb5;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x80aad5(0xfa)]+':'),writeCliSideChannelLine('\x0a'+_0x467991+'\x0a'),writeCliSideChannelLine(_0x80aad5(0xca)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x80aad5(0xef));}function buildAccessKeySetupGuide(_0x5cdb41=USER_ACCESS_KEY_CREATE_URL){const _0x49d4e2=a13_0x3cb5;return[_0x49d4e2(0xc3)+PRODUCT_CONFIG[_0x49d4e2(0xfa)]+':',_0x5cdb41,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x49d4e2(0xb6)][_0x49d4e2(0xe5)]('\x0a');}function canPromptForAccessKey(_0x43e5e1){const _0xf62842=a13_0x3cb5;return!_0x43e5e1[_0xf62842(0xdb)]&&process[_0xf62842(0xc9)][_0xf62842(0xce)]!==![]&&process[_0xf62842(0x102)][_0xf62842(0xce)]!==![];}function resolveAuthScopeFlags(_0x1e3073){const _0x3dfae9=a13_0x3cb5;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1e3073['bool'](_0x3dfae9(0xed)),'explicitProject':_0x1e3073[_0x3dfae9(0xfc)](_0x3dfae9(0xfd)),'policy':_0x3dfae9(0xb1)}));}function a13_0x3cb5(_0x264894,_0x255d88){_0x264894=_0x264894-0xaf;const _0x2e9970=a13_0x2e99();let _0x3cb537=_0x2e9970[_0x264894];return _0x3cb537;}async function resolveAuthWriteInput(_0x565473){const _0x780698=a13_0x3cb5;let _0x3ff186=(_0x565473['str']('access-key')||_0x565473[_0x780698(0xbc)]('ak')||'')[_0x780698(0xf9)]();const _0x26dd1f=(_0x565473[_0x780698(0xbc)](_0x780698(0xb4))||'')[_0x780698(0xf9)](),_0x3b95e9=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x3ff186&&canPromptForAccessKey(_0x565473))try{showAccessKeyCreateHint(_0x3b95e9),_0x3ff186=await promptAccessKey('');}catch(_0x4045be){if(isAbortPrompt(_0x4045be))throw CliErrors[_0x780698(0xb8)]();throw _0x4045be;}if(!_0x3ff186)throw CliErrors[_0x780698(0xcf)]('Missing\x20accessKey.',buildAccessKeySetupGuide(_0x3b95e9));if(!ACCESS_KEY_PATTERN[_0x780698(0x100)](_0x3ff186))throw CliErrors[_0x780698(0xcf)](_0x780698(0xf3),_0x780698(0xe8));if(!_0x26dd1f)return{'accessKey':_0x3ff186};const _0x5872af=normalizeEnv(_0x26dd1f);return{'accessKey':_0x3ff186,'env':isDaily(_0x5872af)?_0x780698(0x104):isDev(_0x5872af)?'development':_0x780698(0xda)};}export const authDefinitions=[{'service':a13_0x166a21(0xd7),'command':'login','description':a13_0x166a21(0xe4),'risk':a13_0x166a21(0xf7),'confirmationDescription':a13_0x166a21(0xe0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x166a21(0xcd),'type':a13_0x166a21(0xea),'description':a13_0x166a21(0xe6)},{'name':'ak','type':a13_0x166a21(0xea),'description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':a13_0x166a21(0xf8),'description':a13_0x166a21(0xe3),'default':!![]},{'name':'project','type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3d89dd){const _0x132b2b=a13_0x166a21;if(_0x3d89dd[_0x132b2b(0xfc)]('yes'))throw CliErrors['validation'](_0x132b2b(0xbf),_0x132b2b(0x106)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x132b2b(0xdd));const _0x3d4a17=(_0x3d89dd[_0x132b2b(0xbc)](_0x132b2b(0xcd))||_0x3d89dd[_0x132b2b(0xbc)]('ak')||'')[_0x132b2b(0xf9)]();if(!_0x3d4a17&&_0x3d89dd[_0x132b2b(0xdb)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x132b2b(0xc5)])};const _0x3d7bda=await resolveAuthWriteInput(_0x3d89dd),_0x4f73a6=resolveAuthScopeFlags(_0x3d89dd),_0x35d847=readScopedConfig(_0x4f73a6);_0x35d847['accessKey']=_0x3d7bda['accessKey'];_0x3d7bda[_0x132b2b(0xb4)]&&(_0x35d847[_0x132b2b(0xb4)]=_0x3d7bda[_0x132b2b(0xb4)]);writeScopedConfig(_0x35d847,_0x4f73a6);const _0x353617=_0x4f73a6[_0x132b2b(0xed)]?'global':_0x132b2b(0xfd),_0x2fdf68=_0x35d847[_0x132b2b(0xb4)]?'\x20Current\x20env:\x20'+_0x35d847['env']+'.':'';return{'ok':!![],'message':_0x132b2b(0xeb)+_0x353617+'\x20config.'+_0x2fdf68+_0x132b2b(0x108)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a13_0x166a21(0xd7),'command':a13_0x166a21(0xee),'description':a13_0x166a21(0x103),'risk':a13_0x166a21(0xf7),'confirmationDescription':a13_0x166a21(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x166a21(0xed),'type':a13_0x166a21(0xf8),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x166a21(0xfd),'type':a13_0x166a21(0xf8),'description':a13_0x166a21(0xd8),'default':![]}],async 'execute'(_0x26829b){const _0x52a03b=a13_0x166a21,_0x1c3674=resolveAuthScopeFlags(_0x26829b),_0x73f4cf=readScopedConfig(_0x1c3674),_0x203aff=!!_0x73f4cf[_0x52a03b(0xd0)];delete _0x73f4cf['accessKey'],writeScopedConfig(_0x73f4cf,_0x1c3674);const _0x3dad14=_0x1c3674[_0x52a03b(0xed)]?'global':_0x52a03b(0xfd);if(_0x203aff)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x3dad14+_0x52a03b(0xaf)};return{'ok':!![],'message':_0x52a03b(0xd9)+_0x3dad14+_0x52a03b(0xb3)};}},{'service':a13_0x166a21(0xd7),'command':a13_0x166a21(0xcc),'description':a13_0x166a21(0xf6),'risk':a13_0x166a21(0xd2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x166a21(0xed),'type':'boolean','description':a13_0x166a21(0x105),'default':!![]},{'name':a13_0x166a21(0xfd),'type':'boolean','description':a13_0x166a21(0xfb),'default':![]},{'name':a13_0x166a21(0xd3),'type':a13_0x166a21(0xf8),'description':a13_0x166a21(0xf2),'default':![]}],async 'execute'(_0x4dc122){const _0x2c8009=a13_0x166a21,_0x12cb7c=resolveAuthScopeFlags(_0x4dc122),_0x518a32=readScopedConfig(_0x12cb7c),_0x794501=productEnvName(_0x2c8009(0xb2)),_0x4f4f3c=productEnv(_0x2c8009(0xb2))||undefined,_0x33e46d=_0x518a32[_0x2c8009(0xd0)]||undefined,_0x3d6361=_0x4f4f3c||_0x33e46d,_0x59d3be=_0x4f4f3c?_0x794501+_0x2c8009(0xbe):_0x33e46d?(_0x12cb7c[_0x2c8009(0xed)]?'global':_0x2c8009(0xfd))+_0x2c8009(0xfe):null,_0x5edd0e=[_0x2c8009(0xdf)+AUTH_MODE[_0x2c8009(0xba)]];if(_0x3d6361){const _0x22dca4=maskCliAccessKey(_0x3d6361);_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xe1)+_0x22dca4+(_0x59d3be?_0x2c8009(0xd5)+_0x59d3be+')':'')),_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xbb));}if(!_0x3d6361){_0x5edd0e[_0x2c8009(0xde)](''),_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xc1)),_0x5edd0e[_0x2c8009(0xde)](''),_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xff)+CLI_BIN_NAME+_0x2c8009(0x107)),_0x5edd0e[_0x2c8009(0xde)](''),_0x5edd0e[_0x2c8009(0xde)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x2c8009(0xdc)]+')'),_0x5edd0e[_0x2c8009(0xde)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x5edd0e['push'](''),_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xc2)),_0x5edd0e[_0x2c8009(0xde)]('\x20\x20export\x20'+_0x794501+_0x2c8009(0xc8)),_0x5edd0e[_0x2c8009(0xde)](''),_0x5edd0e['push'](_0x2c8009(0xd1)+CLI_BIN_NAME+_0x2c8009(0xe9)),_0x5edd0e[_0x2c8009(0xde)](_0x2c8009(0xc0)+CLI_BIN_NAME+_0x2c8009(0xc7));if(_0x4dc122[_0x2c8009(0xfc)]('check')){const _0x1f3821=readStoredDeviceCode();if(_0x1f3821&&!isStoredDeviceCodeExpired(_0x1f3821)){const _0x4e4c4b=getUserDomain(),_0x309736=await fetchDeviceToken(_0x4e4c4b,_0x1f3821[_0x2c8009(0xc4)]);if(_0x309736['status']===_0x2c8009(0xf4)&&_0x309736[_0x2c8009(0xd6)]){const _0x38eee1={'global':_0x1f3821[_0x2c8009(0xb7)]===_0x2c8009(0xed)},_0x1d1b50=readScopedConfig(_0x38eee1);_0x1d1b50[_0x2c8009(0xd0)]=_0x309736[_0x2c8009(0xd6)],writeScopedConfig(_0x1d1b50,_0x38eee1),deleteStoredDeviceCode();const _0x23bbab=_0x309736[_0x2c8009(0xd6)],_0x421952=maskCliAccessKey(_0x23bbab),_0x42dc3f=_0x1f3821[_0x2c8009(0xb7)]===_0x2c8009(0xed)?'global\x20config':_0x2c8009(0xe7);return{'ok':!![],'message':[_0x2c8009(0xdf)+AUTH_MODE[_0x2c8009(0xba)],'AccessKey:\x20'+_0x421952+_0x2c8009(0xd5)+_0x42dc3f+')',_0x2c8009(0xbb)][_0x2c8009(0xe5)]('\x0a')};}_0x309736[_0x2c8009(0xcc)]===_0x2c8009(0xcb)&&deleteStoredDeviceCode();throw CliErrors[_0x2c8009(0xd4)](_0x2c8009(0xf1));}throw CliErrors['authRequired'](_0x5edd0e['join']('\x0a'));}}return{'ok':!![],'message':_0x5edd0e[_0x2c8009(0xe5)]('\x0a')};}},{'service':a13_0x166a21(0xd7),'command':a13_0x166a21(0xb9),'description':a13_0x166a21(0xf5),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xde4fdd){const _0x26ead7=a13_0x166a21,_0x113d67=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x113d67,'meta':{'env':_0xde4fdd['envName']??_0x26ead7(0xda)}}};}},authDeviceDefinition];
1
+ const a13_0x279a3c=a13_0x31d5;(function(_0x5b9fc8,_0x1791cc){const _0x4d5cd6=a13_0x31d5,_0x16cff5=_0x5b9fc8();while(!![]){try{const _0x177741=-parseInt(_0x4d5cd6(0x125))/0x1+-parseInt(_0x4d5cd6(0x123))/0x2+-parseInt(_0x4d5cd6(0xf3))/0x3+-parseInt(_0x4d5cd6(0x115))/0x4+parseInt(_0x4d5cd6(0x11f))/0x5*(-parseInt(_0x4d5cd6(0x121))/0x6)+parseInt(_0x4d5cd6(0x101))/0x7*(parseInt(_0x4d5cd6(0x108))/0x8)+parseInt(_0x4d5cd6(0x114))/0x9;if(_0x177741===_0x1791cc)break;else _0x16cff5['push'](_0x16cff5['shift']());}catch(_0x337924){_0x16cff5['push'](_0x16cff5['shift']());}}}(a13_0x104b,0x365d4));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';function a13_0x31d5(_0x5ac244,_0xe26703){_0x5ac244=_0x5ac244-0xd0;const _0x104baa=a13_0x104b();let _0x31d583=_0x104baa[_0x5ac244];return _0x31d583;}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';function a13_0x104b(){const _0x48de52=['Write\x20to\x20global\x20config\x20(default)','accessKeyCreatePath','accessKey','\x20config','push','str','stdin','daily','No\x20AccessKey\x20found\x20in\x20','1439123wTRhqf','expired','development','AccessKey:\x20','Option\x20C:\x20environment\x20variable','AccessKey\x20cleared\x20from\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','8ozHHOS','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','global','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','code','\x20(via\x20','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','Clear\x20the\x20AccessKey\x20from\x20config','join','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','bool','userCenterDisplayName','8285940vNHXMu','331452TETdYP','string','newConfigFileName','stdout','login','scope','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','status','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','global-default','985DbzZLE','project\x20config','5364XFHTrO','\x20Current\x20env:\x20','888068yjfDgA','Status:\x20valid','76223VVSpAu','\x20env\x20var','AccessKey\x20saved\x20to\x20','read','project','nonInteractive','\x20auth\x20login\x20--access-key\x20<ak_xxx>','envName','auth','Tip:\x20you\x20can\x20also\x20run:','production','Use\x20`','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20config.\x20Nothing\x20to\x20clear.','\x20auth\x20status','ClientAk','Show\x20current\x20authentication\x20status','logout','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','isTTY','Then\x20verify\x20with:\x20','access_key','Missing\x20accessKey.','Shorthand\x20for\x20--access-key','global\x20config','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','env','\x20config.','cancelled','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','AccessKey\x20(ak_xxx...)','access-key','validation','success','boolean','Option\x20A:\x20','write','authRequired','Auth\x20mode:\x20','\x20doctor','373005nxkkae','trim','ACCESS_KEY','Option\x20B:\x20apps\x20config\x20(','\x20\x20export\x20'];a13_0x104b=function(){return _0x48de52;};return a13_0x104b();}import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x3d228b=USER_ACCESS_KEY_CREATE_URL){const _0x5e148a=a13_0x31d5;writeCliSideChannelLine(_0x5e148a(0xd7)+PRODUCT_CONFIG[_0x5e148a(0x113)]+':'),writeCliSideChannelLine('\x0a'+_0x3d228b+'\x0a'),writeCliSideChannelLine(_0x5e148a(0xd4)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5e148a(0xd1));}function buildAccessKeySetupGuide(_0x379da6=USER_ACCESS_KEY_CREATE_URL){const _0x44cbe3=a13_0x31d5;return[_0x44cbe3(0xd7)+PRODUCT_CONFIG[_0x44cbe3(0x113)]+':',_0x379da6,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x44cbe3(0x111)]['join']('\x0a');}function canPromptForAccessKey(_0xf06aa4){const _0x593ef6=a13_0x31d5;return!_0xf06aa4[_0x593ef6(0xd0)]&&process[_0x593ef6(0xfe)][_0x593ef6(0xde)]!==![]&&process[_0x593ef6(0x118)][_0x593ef6(0xde)]!==![];}function resolveAuthScopeFlags(_0x2c5685){const _0x3fd14a=a13_0x31d5;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2c5685[_0x3fd14a(0x112)](_0x3fd14a(0x10a)),'explicitProject':_0x2c5685[_0x3fd14a(0x112)](_0x3fd14a(0x129)),'policy':_0x3fd14a(0x11e)}));}async function resolveAuthWriteInput(_0x5f2892){const _0x218335=a13_0x31d5;let _0x737573=(_0x5f2892[_0x218335(0xfd)](_0x218335(0xea))||_0x5f2892[_0x218335(0xfd)]('ak')||'')[_0x218335(0xf4)]();const _0x232d66=(_0x5f2892[_0x218335(0xfd)](_0x218335(0xe5))||'')[_0x218335(0xf4)](),_0xdf1b2b=''+getUserDomain()+PRODUCT_CONFIG[_0x218335(0xf9)];if(!_0x737573&&canPromptForAccessKey(_0x5f2892))try{showAccessKeyCreateHint(_0xdf1b2b),_0x737573=await promptAccessKey('');}catch(_0x2e1762){if(isAbortPrompt(_0x2e1762))throw CliErrors[_0x218335(0xe7)]();throw _0x2e1762;}if(!_0x737573)throw CliErrors[_0x218335(0xeb)](_0x218335(0xe1),buildAccessKeySetupGuide(_0xdf1b2b));if(!ACCESS_KEY_PATTERN['test'](_0x737573))throw CliErrors[_0x218335(0xeb)]('Invalid\x20accessKey\x20format.',_0x218335(0x10b));if(!_0x232d66)return{'accessKey':_0x737573};const _0x3dc500=normalizeEnv(_0x232d66);return{'accessKey':_0x737573,'env':isDaily(_0x3dc500)?_0x218335(0xff):isDev(_0x3dc500)?_0x218335(0x103):_0x218335(0xd5)};}export const authDefinitions=[{'service':a13_0x279a3c(0xd3),'command':a13_0x279a3c(0x119),'description':a13_0x279a3c(0x10e),'risk':a13_0x279a3c(0xef),'confirmationDescription':a13_0x279a3c(0xe4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x279a3c(0xea),'type':a13_0x279a3c(0x116),'description':a13_0x279a3c(0xe9)},{'name':'ak','type':a13_0x279a3c(0x116),'description':a13_0x279a3c(0xe2)},{'name':a13_0x279a3c(0x10a),'type':a13_0x279a3c(0xed),'description':a13_0x279a3c(0xf8),'default':!![]},{'name':a13_0x279a3c(0x129),'type':a13_0x279a3c(0xed),'description':a13_0x279a3c(0x11d),'default':![]}],async 'execute'(_0x1666ca){const _0x1224c0=a13_0x279a3c;if(_0x1666ca[_0x1224c0(0x112)]('yes'))throw CliErrors[_0x1224c0(0xeb)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x1224c0(0xd6)+CLI_BIN_NAME+_0x1224c0(0x107)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x410235=(_0x1666ca[_0x1224c0(0xfd)](_0x1224c0(0xea))||_0x1666ca[_0x1224c0(0xfd)]('ak')||'')[_0x1224c0(0xf4)]();if(!_0x410235&&_0x1666ca[_0x1224c0(0xd0)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x1224c0(0xf9)])};const _0x48002f=await resolveAuthWriteInput(_0x1666ca),_0x20b093=resolveAuthScopeFlags(_0x1666ca),_0x2fc8f0=readScopedConfig(_0x20b093);_0x2fc8f0['accessKey']=_0x48002f['accessKey'];_0x48002f[_0x1224c0(0xe5)]&&(_0x2fc8f0[_0x1224c0(0xe5)]=_0x48002f['env']);writeScopedConfig(_0x2fc8f0,_0x20b093);const _0x2c194b=_0x20b093[_0x1224c0(0x10a)]?_0x1224c0(0x10a):_0x1224c0(0x129),_0x26beee=_0x2fc8f0['env']?_0x1224c0(0x122)+_0x2fc8f0[_0x1224c0(0xe5)]+'.':'';return{'ok':!![],'message':_0x1224c0(0x127)+_0x2c194b+_0x1224c0(0xe6)+_0x26beee+'\x20Verify:\x20'+CLI_BIN_NAME+_0x1224c0(0xd9)};}},{'service':a13_0x279a3c(0xd3),'command':a13_0x279a3c(0xdc),'description':a13_0x279a3c(0x10f),'risk':a13_0x279a3c(0xef),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x279a3c(0x10a),'type':a13_0x279a3c(0xed),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x279a3c(0x129),'type':a13_0x279a3c(0xed),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3292f0){const _0x751dd=a13_0x279a3c,_0x51fef1=resolveAuthScopeFlags(_0x3292f0),_0x32e7da=readScopedConfig(_0x51fef1),_0x179a6c=!!_0x32e7da[_0x751dd(0xfa)];delete _0x32e7da[_0x751dd(0xfa)],writeScopedConfig(_0x32e7da,_0x51fef1);const _0x4b83f3=_0x51fef1[_0x751dd(0x10a)]?_0x751dd(0x10a):_0x751dd(0x129);if(_0x179a6c)return{'ok':!![],'message':_0x751dd(0x106)+_0x4b83f3+_0x751dd(0xe6)};return{'ok':!![],'message':_0x751dd(0x100)+_0x4b83f3+_0x751dd(0xd8)};}},{'service':a13_0x279a3c(0xd3),'command':a13_0x279a3c(0x11c),'description':a13_0x279a3c(0xdb),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x279a3c(0x10a),'type':a13_0x279a3c(0xed),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x279a3c(0x129),'type':'boolean','description':a13_0x279a3c(0xdd),'default':![]},{'name':'check','type':a13_0x279a3c(0xed),'description':a13_0x279a3c(0x109),'default':![]}],async 'execute'(_0x4c9917){const _0x3e0d19=a13_0x279a3c,_0x5aad54=resolveAuthScopeFlags(_0x4c9917),_0x1ece0e=readScopedConfig(_0x5aad54),_0x28930c=productEnvName('ACCESS_KEY'),_0x3b1083=productEnv(_0x3e0d19(0xf5))||undefined,_0x55fdc9=_0x1ece0e[_0x3e0d19(0xfa)]||undefined,_0x4e7291=_0x3b1083||_0x55fdc9,_0x5c7b3a=_0x3b1083?_0x28930c+_0x3e0d19(0x126):_0x55fdc9?(_0x5aad54[_0x3e0d19(0x10a)]?_0x3e0d19(0x10a):_0x3e0d19(0x129))+_0x3e0d19(0xfb):null,_0x413574=[_0x3e0d19(0xf1)+AUTH_MODE[_0x3e0d19(0xda)]];if(_0x4e7291){const _0x5f48eb=maskCliAccessKey(_0x4e7291);_0x413574['push'](_0x3e0d19(0x104)+_0x5f48eb+(_0x5c7b3a?_0x3e0d19(0x10d)+_0x5c7b3a+')':'')),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0x124));}if(!_0x4e7291){_0x413574[_0x3e0d19(0xfc)](''),_0x413574[_0x3e0d19(0xfc)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x413574[_0x3e0d19(0xfc)](''),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0xee)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x413574[_0x3e0d19(0xfc)](''),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0xf6)+PRODUCT_CONFIG[_0x3e0d19(0x117)]+')'),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0x11b)),_0x413574[_0x3e0d19(0xfc)](''),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0x105)),_0x413574['push'](_0x3e0d19(0xf7)+_0x28930c+'=ak_xxx'),_0x413574[_0x3e0d19(0xfc)](''),_0x413574[_0x3e0d19(0xfc)](_0x3e0d19(0xdf)+CLI_BIN_NAME+_0x3e0d19(0xd9)),_0x413574['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x3e0d19(0xf2));if(_0x4c9917['bool']('check')){const _0x35ff1d=readStoredDeviceCode();if(_0x35ff1d&&!isStoredDeviceCodeExpired(_0x35ff1d)){const _0x24d5e0=getUserDomain(),_0x24af3d=await fetchDeviceToken(_0x24d5e0,_0x35ff1d[_0x3e0d19(0x10c)]);if(_0x24af3d[_0x3e0d19(0x11c)]===_0x3e0d19(0xec)&&_0x24af3d['access_key']){const _0x664893={'global':_0x35ff1d[_0x3e0d19(0x11a)]===_0x3e0d19(0x10a)},_0x1e95ff=readScopedConfig(_0x664893);_0x1e95ff[_0x3e0d19(0xfa)]=_0x24af3d['access_key'],writeScopedConfig(_0x1e95ff,_0x664893),deleteStoredDeviceCode();const _0x489692=_0x24af3d[_0x3e0d19(0xe0)],_0x31997e=maskCliAccessKey(_0x489692),_0x394608=_0x35ff1d[_0x3e0d19(0x11a)]===_0x3e0d19(0x10a)?_0x3e0d19(0xe3):_0x3e0d19(0x120);return{'ok':!![],'message':[_0x3e0d19(0xf1)+AUTH_MODE['ClientAk'],_0x3e0d19(0x104)+_0x31997e+'\x20(via\x20'+_0x394608+')',_0x3e0d19(0x124)][_0x3e0d19(0x110)]('\x0a')};}_0x24af3d['status']===_0x3e0d19(0x102)&&deleteStoredDeviceCode();throw CliErrors[_0x3e0d19(0xf0)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors['authRequired'](_0x413574[_0x3e0d19(0x110)]('\x0a'));}}return{'ok':!![],'message':_0x413574[_0x3e0d19(0x110)]('\x0a')};}},{'service':'auth','command':'info','description':a13_0x279a3c(0xe8),'risk':a13_0x279a3c(0x128),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x426f72){const _0x4edc17=a13_0x279a3c,_0x1766a1=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1766a1,'meta':{'env':_0x426f72[_0x4edc17(0xd2)]??'production'}}};}},authDeviceDefinition];
@@ -1 +1 @@
1
- (function(_0x594ad8,_0x801d3a){const _0xf55f1b=a14_0x1673,_0x5a25f8=_0x594ad8();while(!![]){try{const _0x54bcd7=parseInt(_0xf55f1b(0x6c))/0x1*(parseInt(_0xf55f1b(0x73))/0x2)+parseInt(_0xf55f1b(0x74))/0x3+parseInt(_0xf55f1b(0x68))/0x4*(-parseInt(_0xf55f1b(0x7a))/0x5)+-parseInt(_0xf55f1b(0x6b))/0x6+parseInt(_0xf55f1b(0x79))/0x7*(-parseInt(_0xf55f1b(0x67))/0x8)+-parseInt(_0xf55f1b(0x69))/0x9+parseInt(_0xf55f1b(0x6a))/0xa*(parseInt(_0xf55f1b(0x77))/0xb);if(_0x54bcd7===_0x801d3a)break;else _0x5a25f8['push'](_0x5a25f8['shift']());}catch(_0x7986be){_0x5a25f8['push'](_0x5a25f8['shift']());}}}(a14_0x2aec,0xb6b2c));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1b9c3f=a14_0x1673;super(_0x1b9c3f(0x75)),this[_0x1b9c3f(0x6e)]=_0x1b9c3f(0x72);}}function a14_0x2aec(){const _0xf6ac58=['688dGoxBr','795964MzcOOj','2342835JJHAcG','10CPVLSQ','2219436GkXtBA','125cWOWce','close','name','question','stdin','):\x20','AbortPrompt','10382hVHvmr','3472107JZnsKX','User\x20aborted\x20prompt','SIGINT','16064257zxhIEx','removeListener','88893WgmLtV','20JIquoT'];a14_0x2aec=function(){return _0xf6ac58;};return a14_0x2aec();}function createSafeRl(){const _0x4c72b8=a14_0x1673,_0x25db3f=createInterface({'input':process[_0x4c72b8(0x70)],'output':process['stdout']});let _0x3e10d4;const _0x20845f=new Promise((_0x3b20d1,_0x57398b)=>{const _0x322949=_0x4c72b8;_0x3e10d4=()=>{const _0x3d3cbe=a14_0x1673;_0x3e10d4&&(_0x25db3f[_0x3d3cbe(0x78)](_0x3d3cbe(0x76),_0x3e10d4),_0x3e10d4=undefined);try{_0x25db3f['close']();}catch{}_0x57398b(new AbortPrompt());},_0x25db3f['once'](_0x322949(0x76),_0x3e10d4);}),_0x1b55bc=()=>{const _0x995adb=_0x4c72b8;_0x3e10d4&&(_0x25db3f[_0x995adb(0x78)](_0x995adb(0x76),_0x3e10d4),_0x3e10d4=undefined);try{_0x25db3f[_0x995adb(0x6d)]();}catch{}};return{'rl':_0x25db3f,'abortPromise':_0x20845f,'disposeSuccess':_0x1b55bc};}function a14_0x1673(_0x52788b,_0x4ab32f){_0x52788b=_0x52788b-0x67;const _0x2aecad=a14_0x2aec();let _0x1673d6=_0x2aecad[_0x52788b];return _0x1673d6;}export async function promptAccessKey(_0x2e0f66=''){const {rl:_0x3da673,abortPromise:_0x418f22,disposeSuccess:_0x33fae2}=createSafeRl(),_0x3a0775=new Promise(_0x33f59a=>{const _0x5c71ef=a14_0x1673,_0x2fa141=_0x2e0f66?'AccessKey\x20('+_0x2e0f66+_0x5c71ef(0x71):'AccessKey\x20(paste\x20ak_...):\x20';_0x3da673[_0x5c71ef(0x6f)](_0x2fa141,_0x3b4546=>{_0x33fae2(),_0x33f59a(_0x3b4546['trim']()||_0x2e0f66);});});return Promise['race']([_0x3a0775,_0x418f22]);}export function isAbortPrompt(_0x128c25){const _0x2c32f3=a14_0x1673;return _0x128c25 instanceof Error&&_0x128c25[_0x2c32f3(0x6e)]==='AbortPrompt';}
1
+ (function(_0x52d654,_0x55b297){const _0x42155d=a14_0x1c1e,_0x82b4e1=_0x52d654();while(!![]){try{const _0x73f88d=parseInt(_0x42155d(0xf3))/0x1*(-parseInt(_0x42155d(0xf5))/0x2)+parseInt(_0x42155d(0xff))/0x3+parseInt(_0x42155d(0x103))/0x4+parseInt(_0x42155d(0xf1))/0x5+-parseInt(_0x42155d(0x102))/0x6+parseInt(_0x42155d(0xf9))/0x7*(-parseInt(_0x42155d(0xfb))/0x8)+parseInt(_0x42155d(0xfa))/0x9;if(_0x73f88d===_0x55b297)break;else _0x82b4e1['push'](_0x82b4e1['shift']());}catch(_0x3367cd){_0x82b4e1['push'](_0x82b4e1['shift']());}}}(a14_0x4634,0x78dd2));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){super('User\x20aborted\x20prompt'),this['name']='AbortPrompt';}}function createSafeRl(){const _0x18573f=a14_0x1c1e,_0xdc94ed=createInterface({'input':process[_0x18573f(0xfd)],'output':process['stdout']});let _0x4bf14a;const _0x46fde5=new Promise((_0x27be39,_0x4f8e6a)=>{const _0x4539c6=_0x18573f;_0x4bf14a=()=>{const _0x11e5f5=a14_0x1c1e;_0x4bf14a&&(_0xdc94ed['removeListener'](_0x11e5f5(0xf6),_0x4bf14a),_0x4bf14a=undefined);try{_0xdc94ed['close']();}catch{}_0x4f8e6a(new AbortPrompt());},_0xdc94ed[_0x4539c6(0xf2)](_0x4539c6(0xf6),_0x4bf14a);}),_0x19d2cb=()=>{const _0x50f290=_0x18573f;_0x4bf14a&&(_0xdc94ed[_0x50f290(0x104)](_0x50f290(0xf6),_0x4bf14a),_0x4bf14a=undefined);try{_0xdc94ed[_0x50f290(0x100)]();}catch{}};return{'rl':_0xdc94ed,'abortPromise':_0x46fde5,'disposeSuccess':_0x19d2cb};}function a14_0x1c1e(_0xb4d808,_0x438040){_0xb4d808=_0xb4d808-0xf0;const _0x4634ae=a14_0x4634();let _0x1c1e29=_0x4634ae[_0xb4d808];return _0x1c1e29;}export async function promptAccessKey(_0x48b6bf=''){const {rl:_0x2e4422,abortPromise:_0x44f714,disposeSuccess:_0x335d86}=createSafeRl(),_0x2cab75=new Promise(_0x446474=>{const _0x97bd6b=a14_0x1c1e,_0x48f84f=_0x48b6bf?_0x97bd6b(0xf8)+_0x48b6bf+_0x97bd6b(0xf7):_0x97bd6b(0xf4);_0x2e4422[_0x97bd6b(0x101)](_0x48f84f,_0x3caa1e=>{const _0x13bff1=_0x97bd6b;_0x335d86(),_0x446474(_0x3caa1e[_0x13bff1(0xfe)]()||_0x48b6bf);});});return Promise['race']([_0x2cab75,_0x44f714]);}function a14_0x4634(){const _0x3cf121=['266GEOEdp','262296lBUyzh','95728nBRBbn','AbortPrompt','stdin','trim','2634612dkiZus','close','question','2214330cYYSqd','520416PsfGMQ','removeListener','name','4776215GhnIKy','once','336937wEEsdt','AccessKey\x20(paste\x20ak_...):\x20','4KspUDQ','SIGINT','):\x20','AccessKey\x20('];a14_0x4634=function(){return _0x3cf121;};return a14_0x4634();}export function isAbortPrompt(_0x2f0ad8){const _0x5c7b43=a14_0x1c1e;return _0x2f0ad8 instanceof Error&&_0x2f0ad8[_0x5c7b43(0xf0)]===_0x5c7b43(0xfc);}
@@ -1 +1 @@
1
- const a15_0x33f313=a15_0xd9ca;(function(_0x1fc92f,_0x4a8921){const _0x19a225=a15_0xd9ca,_0x5d9fd7=_0x1fc92f();while(!![]){try{const _0x26b6ed=-parseInt(_0x19a225(0x1d0))/0x1+-parseInt(_0x19a225(0x1c5))/0x2+-parseInt(_0x19a225(0x1c6))/0x3+-parseInt(_0x19a225(0x1c8))/0x4+parseInt(_0x19a225(0x1cb))/0x5+parseInt(_0x19a225(0x1d1))/0x6*(-parseInt(_0x19a225(0x1c9))/0x7)+parseInt(_0x19a225(0x1cd))/0x8*(parseInt(_0x19a225(0x1ce))/0x9);if(_0x26b6ed===_0x4a8921)break;else _0x5d9fd7['push'](_0x5d9fd7['shift']());}catch(_0xb30c9b){_0x5d9fd7['push'](_0x5d9fd7['shift']());}}}(a15_0xb8d4,0x4a9f9));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';function a15_0xd9ca(_0x215525,_0x417c4c){_0x215525=_0x215525-0x1be;const _0xb8d412=a15_0xb8d4();let _0xd9ca2f=_0xb8d412[_0x215525];return _0xd9ca2f;}export const bffDetail={'service':'bff','command':a15_0x33f313(0x1c7),'description':a15_0x33f313(0x1cc),'risk':a15_0x33f313(0x1bf),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x33f313(0x1cf)}],async 'execute'(_0x118165){const _0x16afc0=a15_0x33f313,_0x1854b5=await getBffEndpointContract(_0x118165[_0x16afc0(0x1c1)],_0x118165[_0x16afc0(0x1ca)](_0x16afc0(0x1c0)));return{'ok':!![],'data':{'appCode':_0x1854b5[_0x16afc0(0x1c1)],'functionName':_0x1854b5[_0x16afc0(0x1c3)],'description':_0x1854b5[_0x16afc0(0x1c4)]||_0x16afc0(0x1c2),'version':_0x1854b5[_0x16afc0(0x1d2)],'gmtModified':_0x1854b5[_0x16afc0(0x1be)]}};}};function a15_0xb8d4(){const _0x56f2a6=['description','856862LkFBqA','370935EdkYOO','detail','940880RiUsTN','2681875wPtoDR','str','1976985QrQWTC','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','11938856ulwxgD','9JLTAHT','Backend\x20Function\x20name','411676ZXXSQM','6EXhZtn','version','gmtModified','read','name','appCode','(none)','functionName'];a15_0xb8d4=function(){return _0x56f2a6;};return a15_0xb8d4();}
1
+ function a15_0x2154(){const _0xf51562=['bff','name','5452gRbvxX','14688639UqWGZL','(none)','str','5574510FRQcqn','3876FcevuM','397985vQEPnl','1266312Ubrmqs','appCode','201412HhIloI','functionName','10QspvOu','34177260rMbnrE','version','49ELMvIT','11sYWBpT','Backend\x20Function\x20name'];a15_0x2154=function(){return _0xf51562;};return a15_0x2154();}const a15_0x2f095f=a15_0x2498;(function(_0x38249d,_0xbe8ca){const _0x18427a=a15_0x2498,_0x4e5688=_0x38249d();while(!![]){try{const _0x1fa1c7=-parseInt(_0x18427a(0x15f))/0x1*(-parseInt(_0x18427a(0x170))/0x2)+-parseInt(_0x18427a(0x16c))/0x3*(parseInt(_0x18427a(0x167))/0x4)+parseInt(_0x18427a(0x16d))/0x5+parseInt(_0x18427a(0x16b))/0x6+-parseInt(_0x18427a(0x162))/0x7*(parseInt(_0x18427a(0x16e))/0x8)+-parseInt(_0x18427a(0x168))/0x9+-parseInt(_0x18427a(0x160))/0xa*(-parseInt(_0x18427a(0x163))/0xb);if(_0x1fa1c7===_0xbe8ca)break;else _0x4e5688['push'](_0x4e5688['shift']());}catch(_0x56e403){_0x4e5688['push'](_0x4e5688['shift']());}}}(a15_0x2154,0xe3a1a));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';function a15_0x2498(_0x34ec5b,_0x31cc3c){_0x34ec5b=_0x34ec5b-0x15f;const _0x21542c=a15_0x2154();let _0x249821=_0x21542c[_0x34ec5b];return _0x249821;}export const bffDetail={'service':a15_0x2f095f(0x165),'command':'detail','description':'Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x2f095f(0x164)}],async 'execute'(_0x56922e){const _0x44048f=a15_0x2f095f,_0x2d0877=await getBffEndpointContract(_0x56922e[_0x44048f(0x16f)],_0x56922e[_0x44048f(0x16a)](_0x44048f(0x166)));return{'ok':!![],'data':{'appCode':_0x2d0877[_0x44048f(0x16f)],'functionName':_0x2d0877[_0x44048f(0x171)],'description':_0x2d0877['description']||_0x44048f(0x169),'version':_0x2d0877[_0x44048f(0x161)],'gmtModified':_0x2d0877['gmtModified']}};}};
@@ -1 +1 @@
1
- function a16_0x1b19(){const _0x342ca9=['627786hFNGyw','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','Backend\x20Function\x20name\x20to\x20execute','name','params','8upssEn','Backend\x20Function\x20executed\x20in\x20','182355ZGmWfa','18htGfZb','182091DGuInh','160998lYDGOr','bff','3auykMw','720734SCVKyi','665424Qryqzs','read','now','str','120940gZVDbl'];a16_0x1b19=function(){return _0x342ca9;};return a16_0x1b19();}const a16_0x227981=a16_0x26e7;(function(_0x2e48c9,_0x5e328b){const _0x175a73=a16_0x26e7,_0x42297d=_0x2e48c9();while(!![]){try{const _0xd52c91=-parseInt(_0x175a73(0xdd))/0x1+-parseInt(_0x175a73(0xde))/0x2*(parseInt(_0x175a73(0xe0))/0x3)+parseInt(_0x175a73(0xcf))/0x4+parseInt(_0x175a73(0xdb))/0x5+parseInt(_0x175a73(0xd4))/0x6+parseInt(_0x175a73(0xe1))/0x7*(parseInt(_0x175a73(0xd9))/0x8)+parseInt(_0x175a73(0xdc))/0x9*(-parseInt(_0x175a73(0xd3))/0xa);if(_0xd52c91===_0x5e328b)break;else _0x42297d['push'](_0x42297d['shift']());}catch(_0x1d9a85){_0x42297d['push'](_0x42297d['shift']());}}}(a16_0x1b19,0x1e2fa));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0x26e7(_0x47c968,_0x4090ea){_0x47c968=_0x47c968-0xcf;const _0x1b1902=a16_0x1b19();let _0x26e760=_0x1b1902[_0x47c968];return _0x26e760;}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x227981(0xdf),'command':'exec','description':a16_0x227981(0xd5),'risk':a16_0x227981(0xd0),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x227981(0xd6)},PARAMS_FLAG],async 'execute'(_0x5d43d2){const _0x32db70=a16_0x227981,_0x230990=parseJsonParams(_0x5d43d2[_0x32db70(0xd2)](_0x32db70(0xd8))),_0x47e0be=Date[_0x32db70(0xd1)](),_0x5d3776=await executeSdkBff(_0x5d43d2[_0x32db70(0xd2)](_0x32db70(0xd7)),_0x230990),_0x2ab731=Date['now']()-_0x47e0be;return{'ok':!![],'data':{'result':_0x5d3776,'elapsed':_0x2ab731},'message':_0x32db70(0xda)+_0x2ab731+'ms'};}};
1
+ const a16_0x2d9ff3=a16_0x102c;(function(_0x45ad70,_0x241bf7){const _0x207db8=a16_0x102c,_0x3095a4=_0x45ad70();while(!![]){try{const _0x5e6c56=-parseInt(_0x207db8(0xb7))/0x1*(parseInt(_0x207db8(0xb9))/0x2)+parseInt(_0x207db8(0xbb))/0x3+-parseInt(_0x207db8(0xb6))/0x4+parseInt(_0x207db8(0xad))/0x5*(-parseInt(_0x207db8(0xb5))/0x6)+parseInt(_0x207db8(0xb4))/0x7*(parseInt(_0x207db8(0xb2))/0x8)+parseInt(_0x207db8(0xb1))/0x9*(-parseInt(_0x207db8(0xb0))/0xa)+parseInt(_0x207db8(0xba))/0xb;if(_0x5e6c56===_0x241bf7)break;else _0x3095a4['push'](_0x3095a4['shift']());}catch(_0x30f03d){_0x3095a4['push'](_0x3095a4['shift']());}}}(a16_0x8b26,0x931d1));function a16_0x102c(_0x46a650,_0x4fa8d0){_0x46a650=_0x46a650-0xad;const _0x8b2687=a16_0x8b26();let _0x102c01=_0x8b2687[_0x46a650];return _0x102c01;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x8b26(){const _0x533b9e=['Backend\x20Function\x20executed\x20in\x20','698033tKVbMa','342786QOXxma','635164FifaWs','4jMRIHb','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','325876unSYAs','11196108Tmfhdp','681267lAOeVu','bff','params','5dLDGJT','str','exec','1180JYYyXX','43659rNBjvx','64WUWBAa'];a16_0x8b26=function(){return _0x533b9e;};return a16_0x8b26();}export const bffExec={'service':a16_0x2d9ff3(0xbc),'command':a16_0x2d9ff3(0xaf),'description':a16_0x2d9ff3(0xb8),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x4a9ec5){const _0x48c25f=a16_0x2d9ff3,_0x277a22=parseJsonParams(_0x4a9ec5[_0x48c25f(0xae)](_0x48c25f(0xbd))),_0x2695c3=Date['now'](),_0x1ac87d=await executeSdkBff(_0x4a9ec5[_0x48c25f(0xae)]('name'),_0x277a22),_0x51dd59=Date['now']()-_0x2695c3;return{'ok':!![],'data':{'result':_0x1ac87d,'elapsed':_0x51dd59},'message':_0x48c25f(0xb3)+_0x51dd59+'ms'};}};
@@ -1 +1 @@
1
- function a17_0x4bb8(){const _0x3bf0be=['440791cqBPYD','3487680MXvnik','494248eCmaeB','3519404qeWuqo','679530URgrGN','3177846QqiCQm','8437768cHEktg','2RabzNK'];a17_0x4bb8=function(){return _0x3bf0be;};return a17_0x4bb8();}(function(_0x5b4745,_0x59f53d){const _0x292768=a17_0x8c61,_0xbaba18=_0x5b4745();while(!![]){try{const _0xe65383=parseInt(_0x292768(0x1ed))/0x1*(parseInt(_0x292768(0x1ec))/0x2)+-parseInt(_0x292768(0x1f2))/0x3+parseInt(_0x292768(0x1ef))/0x4+parseInt(_0x292768(0x1ee))/0x5+parseInt(_0x292768(0x1f1))/0x6+-parseInt(_0x292768(0x1f0))/0x7+parseInt(_0x292768(0x1eb))/0x8;if(_0xe65383===_0x59f53d)break;else _0xbaba18['push'](_0xbaba18['shift']());}catch(_0x1fb032){_0xbaba18['push'](_0xbaba18['shift']());}}}(a17_0x4bb8,0xd3de3));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0x8c61(_0x5546af,_0x4ddf34){_0x5546af=_0x5546af-0x1eb;const _0x4bb8eb=a17_0x4bb8();let _0x8c6166=_0x4bb8eb[_0x5546af];return _0x8c6166;}export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x247287,_0x427019){const _0x3bfb38=a17_0x340f,_0xa37995=_0x247287();while(!![]){try{const _0x4d13e0=-parseInt(_0x3bfb38(0xb0))/0x1*(parseInt(_0x3bfb38(0xb1))/0x2)+parseInt(_0x3bfb38(0xaa))/0x3+parseInt(_0x3bfb38(0xb2))/0x4+-parseInt(_0x3bfb38(0xab))/0x5*(parseInt(_0x3bfb38(0xac))/0x6)+parseInt(_0x3bfb38(0xa9))/0x7*(parseInt(_0x3bfb38(0xaf))/0x8)+-parseInt(_0x3bfb38(0xa8))/0x9+-parseInt(_0x3bfb38(0xae))/0xa*(-parseInt(_0x3bfb38(0xad))/0xb);if(_0x4d13e0===_0x427019)break;else _0xa37995['push'](_0xa37995['shift']());}catch(_0x297e55){_0xa37995['push'](_0xa37995['shift']());}}}(a17_0x489a,0x495f0));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x489a(){const _0x30e169=['94715mvudaC','18xUTNpa','143ObJCUt','491390lHuSnq','31592nTzmMq','1JLPovu','1033622qJKrlB','1016364WXXnZN','3058182rdrOpF','434OVFgGu','228690OalPUJ'];a17_0x489a=function(){return _0x30e169;};return a17_0x489a();}function a17_0x340f(_0x437b3c,_0x3c69ec){_0x437b3c=_0x437b3c-0xa8;const _0x489a5e=a17_0x489a();let _0x340f1f=_0x489a5e[_0x437b3c];return _0x340f1f;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a18_0x49e2d2=a18_0x2f33;(function(_0x1a55bf,_0x2e7af1){const _0x28cb33=a18_0x2f33,_0x581ca7=_0x1a55bf();while(!![]){try{const _0x1964a7=parseInt(_0x28cb33(0x11c))/0x1+parseInt(_0x28cb33(0x120))/0x2*(-parseInt(_0x28cb33(0x129))/0x3)+parseInt(_0x28cb33(0x116))/0x4*(parseInt(_0x28cb33(0x10f))/0x5)+parseInt(_0x28cb33(0x10e))/0x6+parseInt(_0x28cb33(0x123))/0x7*(-parseInt(_0x28cb33(0x10c))/0x8)+-parseInt(_0x28cb33(0x114))/0x9*(parseInt(_0x28cb33(0x11a))/0xa)+-parseInt(_0x28cb33(0x121))/0xb*(parseInt(_0x28cb33(0x111))/0xc);if(_0x1964a7===_0x2e7af1)break;else _0x581ca7['push'](_0x581ca7['shift']());}catch(_0x203219){_0x581ca7['push'](_0x581ca7['shift']());}}}(a18_0x106b,0x9e8da));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a18_0x2f33(_0x5515d2,_0xa6ead5){_0x5515d2=_0x5515d2-0x10c;const _0x106be0=a18_0x106b();let _0x2f33eb=_0x106be0[_0x5515d2];return _0x2f33eb;}function a18_0x106b(){const _0x320092=['installedPath','error','784mXhSNg','read','6409218QPvQit','110015gVQseX','\x20at\x20','72lwoYQT','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','\x20is\x20already\x20current','4388058pAqWtR','code','176UBVzLc','install','pipe','changed','10KGzBwS','\x20installed','1191415GPpICS','Built-in\x20Skill\x20install\x20failed\x20[','INSTALL_FAILED','unknown','4FQWume','1531387IfcfDS','info','4571xDPqYb','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','CLI\x20Built-in\x20Skill\x20',']:\x20','skillVersion','1787187GScprP'];a18_0x106b=function(){return _0x320092;};return a18_0x106b();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x49e2d2(0x117),'description':a18_0x49e2d2(0x112),'risk':a18_0x49e2d2(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5e9c41){const _0x55f811=a18_0x49e2d2;logger['setLogPath'](process['cwd']()),logger[_0x55f811(0x122)]('cli-skill-install',_0x55f811(0x125));const _0x4ed1d4=installBuiltinSkill({'stdio':_0x5e9c41['nonInteractive']?_0x55f811(0x118):'inherit'});if(!_0x4ed1d4['ok'])throw CliErrors['apiError'](_0x55f811(0x11d)+(_0x4ed1d4[_0x55f811(0x115)]||_0x55f811(0x11e))+_0x55f811(0x127)+(_0x4ed1d4[_0x55f811(0x12b)]||_0x55f811(0x11f)),_0x55f811(0x124)+_0x4ed1d4['repairCommand']);const _0x239dcb=_0x4ed1d4[_0x55f811(0x12a)]?_0x55f811(0x110)+_0x4ed1d4[_0x55f811(0x12a)]:'';return console['log'](_0x4ed1d4[_0x55f811(0x119)]?'CLI\x20Built-in\x20Skill\x20'+_0x4ed1d4[_0x55f811(0x128)]+_0x55f811(0x11b)+_0x239dcb:_0x55f811(0x126)+_0x4ed1d4[_0x55f811(0x128)]+_0x55f811(0x113)+_0x239dcb),{'ok':!![]};}}];
1
+ const a18_0x589d32=a18_0x3519;(function(_0xc6263f,_0x3cd556){const _0xae817b=a18_0x3519,_0x1f2a35=_0xc6263f();while(!![]){try{const _0x123952=-parseInt(_0xae817b(0x143))/0x1*(parseInt(_0xae817b(0x14c))/0x2)+-parseInt(_0xae817b(0x136))/0x3+parseInt(_0xae817b(0x13c))/0x4*(parseInt(_0xae817b(0x14e))/0x5)+-parseInt(_0xae817b(0x13e))/0x6*(parseInt(_0xae817b(0x141))/0x7)+-parseInt(_0xae817b(0x157))/0x8*(-parseInt(_0xae817b(0x145))/0x9)+-parseInt(_0xae817b(0x152))/0xa+-parseInt(_0xae817b(0x14f))/0xb*(-parseInt(_0xae817b(0x147))/0xc);if(_0x123952===_0x3cd556)break;else _0x1f2a35['push'](_0x1f2a35['shift']());}catch(_0x1ccfba){_0x1f2a35['push'](_0x1f2a35['shift']());}}}(a18_0x2cfd,0x7850a));import{CliErrors}from'../../errors.js';function a18_0x3519(_0x27579d,_0x3be41d){_0x27579d=_0x27579d-0x135;const _0x2cfd2a=a18_0x2cfd();let _0x351981=_0x2cfd2a[_0x27579d];return _0x351981;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x589d32(0x156),'command':a18_0x589d32(0x13a),'description':a18_0x589d32(0x150),'risk':a18_0x589d32(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x329546){const _0x59d681=a18_0x589d32;logger[_0x59d681(0x137)](process[_0x59d681(0x13d)]()),logger[_0x59d681(0x151)](_0x59d681(0x154),_0x59d681(0x155));const _0x2af8f3=installBuiltinSkill({'stdio':_0x329546[_0x59d681(0x148)]?'pipe':_0x59d681(0x14b)});if(!_0x2af8f3['ok'])throw CliErrors['apiError'](_0x59d681(0x139)+(_0x2af8f3[_0x59d681(0x14a)]||_0x59d681(0x13f))+_0x59d681(0x14d)+(_0x2af8f3[_0x59d681(0x140)]||_0x59d681(0x153)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x2af8f3['repairCommand']);const _0x24857d=_0x2af8f3[_0x59d681(0x138)]?_0x59d681(0x13b)+_0x2af8f3['installedPath']:'';return console[_0x59d681(0x135)](_0x2af8f3[_0x59d681(0x146)]?_0x59d681(0x144)+_0x2af8f3[_0x59d681(0x149)]+_0x59d681(0x142)+_0x24857d:_0x59d681(0x144)+_0x2af8f3[_0x59d681(0x149)]+'\x20is\x20already\x20current'+_0x24857d),{'ok':!![]};}}];function a18_0x2cfd(){const _0x177a34=['701BZakej','CLI\x20Built-in\x20Skill\x20','27AjBzjO','changed','12ydXklt','nonInteractive','skillVersion','code','inherit','262kegzVD',']:\x20','817370ejQLaO','13624105wIWTNH','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','info','965950anlkQI','unknown','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','cli-skill','892168oEwxQW','read','log','1793436uqkJnp','setLogPath','installedPath','Built-in\x20Skill\x20install\x20failed\x20[','install','\x20at\x20','4IKKkBu','cwd','12rhdBuO','INSTALL_FAILED','error','1601404zpZthk','\x20installed'];a18_0x2cfd=function(){return _0x177a34;};return a18_0x2cfd();}
@@ -1 +1 @@
1
- (function(_0x47fa17,_0xb58fde){const _0x5ac2f6=a19_0x479c,_0x498f71=_0x47fa17();while(!![]){try{const _0x4c04b4=parseInt(_0x5ac2f6(0x83))/0x1*(parseInt(_0x5ac2f6(0x90))/0x2)+parseInt(_0x5ac2f6(0x85))/0x3*(-parseInt(_0x5ac2f6(0x87))/0x4)+parseInt(_0x5ac2f6(0x8d))/0x5*(-parseInt(_0x5ac2f6(0x8c))/0x6)+parseInt(_0x5ac2f6(0x94))/0x7*(-parseInt(_0x5ac2f6(0x95))/0x8)+parseInt(_0x5ac2f6(0x7e))/0x9*(parseInt(_0x5ac2f6(0x91))/0xa)+-parseInt(_0x5ac2f6(0x89))/0xb+-parseInt(_0x5ac2f6(0x93))/0xc*(-parseInt(_0x5ac2f6(0x80))/0xd);if(_0x4c04b4===_0xb58fde)break;else _0x498f71['push'](_0x498f71['shift']());}catch(_0x4bf12a){_0x498f71['push'](_0x498f71['shift']());}}}(a19_0x9d47,0x1e2bc));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';export function resolveConfigScope(_0x184c37){const _0x6c32cb=a19_0x479c,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x464a69}=_0x184c37;if(explicitGlobal&&explicitProject)throw CliErrors[_0x6c32cb(0x86)](_0x6c32cb(0x8a),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x6c32cb(0x7f);if(explicitProject)return'project';switch(_0x464a69){case _0x6c32cb(0x92):return _0x6c32cb(0x7f);case _0x6c32cb(0x81):if(!(_0x184c37[_0x6c32cb(0x82)]??isInProject()))throw CliErrors[_0x6c32cb(0x86)](_0x6c32cb(0x7d)+PRODUCT_CONFIG[_0x6c32cb(0x8e)]+_0x6c32cb(0x96),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x6c32cb(0x8e)]+_0x6c32cb(0x8f)+PRODUCT_CONFIG[_0x6c32cb(0x8e)]+_0x6c32cb(0x8b));return _0x6c32cb(0x84);}}function a19_0x479c(_0x2aa438,_0x241bed){_0x2aa438=_0x2aa438-0x7d;const _0x9d4746=a19_0x9d47();let _0x479ced=_0x9d4746[_0x2aa438];return _0x479ced;}export function toScopeFlags(_0x3e6ae4){const _0x4c9d82=a19_0x479c;return{'global':_0x3e6ae4===_0x4c9d82(0x7f)};}export function formatScopeLabel(_0x4f7496){const _0x1fb9d2=a19_0x479c;return _0x4f7496==='global'?_0x1fb9d2(0x88):'';}function a19_0x9d47(){const _0x2bcd23=['global-default','5632296moMITF','203RUHkwZ','56632nvMyuX','\x20found).','Not\x20inside\x20a\x20project\x20(no\x20','9Ksesly','global','13oMKpcm','project-or-global-explicit','inProject','165439bJMZDO','project','58740iiDoqL','validation','48OocobT','\x20(global)','1716693HffzPV','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','\x20first.','144144GsMYXA','5hBPwPr','newConfigFileName',',\x20or\x20create\x20a\x20project-local\x20','2GCKDno','1091210gBfxqv'];a19_0x9d47=function(){return _0x2bcd23;};return a19_0x9d47();}
1
+ function a19_0x8308(){const _0x207d9c=['\x20found).','\x20(global)','project','2382669ArOQQn','523865seWqtX','Use\x20only\x20one\x20config\x20scope\x20flag.','\x20first.','global','project-or-global-explicit','72ZhHcHx','global-default','56528gZbzby','632653KWwltr','5254823QKCUCB','newConfigFileName','3508560MnCROS',',\x20or\x20create\x20a\x20project-local\x20','4KhITqn','2466930qCIbrw','inProject','validation'];a19_0x8308=function(){return _0x207d9c;};return a19_0x8308();}(function(_0x4129ac,_0x5efdf2){const _0x1c2536=a19_0x36da,_0xf2ca3e=_0x4129ac();while(!![]){try{const _0x1c7733=parseInt(_0x1c2536(0x1be))/0x1+parseInt(_0x1c2536(0x1bd))/0x2*(parseInt(_0x1c2536(0x1d0))/0x3)+parseInt(_0x1c2536(0x1c3))/0x4*(parseInt(_0x1c2536(0x1cb))/0x5)+-parseInt(_0x1c2536(0x1c4))/0x6+-parseInt(_0x1c2536(0x1bf))/0x7+parseInt(_0x1c2536(0x1c1))/0x8+-parseInt(_0x1c2536(0x1ca))/0x9;if(_0x1c7733===_0x5efdf2)break;else _0xf2ca3e['push'](_0xf2ca3e['shift']());}catch(_0x3b7f34){_0xf2ca3e['push'](_0xf2ca3e['shift']());}}}(a19_0x8308,0x686e3));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_0x36da(_0x35144e,_0xd4acf9){_0x35144e=_0x35144e-0x1bc;const _0x8308e6=a19_0x8308();let _0x36da6a=_0x8308e6[_0x35144e];return _0x36da6a;}export function resolveConfigScope(_0x5fe646){const _0xea11ec=a19_0x36da,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x2ba2b5}=_0x5fe646;if(explicitGlobal&&explicitProject)throw CliErrors['validation']('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0xea11ec(0x1cc));if(explicitGlobal)return _0xea11ec(0x1ce);if(explicitProject)return _0xea11ec(0x1c9);switch(_0x2ba2b5){case _0xea11ec(0x1bc):return _0xea11ec(0x1ce);case _0xea11ec(0x1cf):if(!(_0x5fe646[_0xea11ec(0x1c5)]??isInProject()))throw CliErrors[_0xea11ec(0x1c6)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0xea11ec(0x1c0)]+_0xea11ec(0x1c7),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0xea11ec(0x1c0)]+_0xea11ec(0x1c2)+PRODUCT_CONFIG[_0xea11ec(0x1c0)]+_0xea11ec(0x1cd));return _0xea11ec(0x1c9);}}export function toScopeFlags(_0x4502cd){const _0x2ce46d=a19_0x36da;return{'global':_0x4502cd===_0x2ce46d(0x1ce)};}export function formatScopeLabel(_0x174834){const _0x4bd828=a19_0x36da;return _0x174834==='global'?_0x4bd828(0x1c8):'';}
@@ -1 +1 @@
1
- function a20_0x15c3(_0x883053,_0x58096e){_0x883053=_0x883053-0x191;const _0x58a029=a20_0x58a0();let _0x15c39e=_0x58a029[_0x883053];return _0x15c39e;}(function(_0x10b20a,_0x3b7344){const _0x1fb30c=a20_0x15c3,_0x3a628a=_0x10b20a();while(!![]){try{const _0xd96505=-parseInt(_0x1fb30c(0x1ac))/0x1*(parseInt(_0x1fb30c(0x1aa))/0x2)+-parseInt(_0x1fb30c(0x19c))/0x3*(parseInt(_0x1fb30c(0x1a6))/0x4)+-parseInt(_0x1fb30c(0x1a4))/0x5*(parseInt(_0x1fb30c(0x19e))/0x6)+parseInt(_0x1fb30c(0x191))/0x7+-parseInt(_0x1fb30c(0x192))/0x8+-parseInt(_0x1fb30c(0x199))/0x9+-parseInt(_0x1fb30c(0x1a9))/0xa*(-parseInt(_0x1fb30c(0x1a0))/0xb);if(_0xd96505===_0x3b7344)break;else _0x3a628a['push'](_0x3a628a['shift']());}catch(_0x5e7142){_0x3a628a['push'](_0x3a628a['shift']());}}}(a20_0x58a0,0x82a47));import{CliErrors}from'../../errors.js';function a20_0x58a0(){const _0x14aebf=['Provide\x20one\x20of:\x20','11Fulrsc','\x20is\x20required\x20for\x20`','length','Only\x20one\x20of\x20','5LLKnpV',':\x20expected\x20','34684rnJgfD','filter','Use\x20only\x20one\x20of:\x20','32711510zaxlDJ','2PevfDF','\x20are\x20mutually\x20exclusive\x20for\x20`','945071Xmyajp','join','7219191aazxVh','6280400DYOVSA','str','some','map','Exactly\x20one\x20of\x20','validation',',\x20got\x20\x22','5593347JTBpfa','Invalid\x20--','test','339dMLuXK','Flags\x20','2615556IWrdIx'];a20_0x58a0=function(){return _0x14aebf;};return a20_0x58a0();}function isSet(_0x387060,_0x3af259){const _0x2f873a=_0x387060['flag'](_0x3af259);return _0x2f873a!==undefined&&_0x2f873a!==''&&_0x2f873a!==![]&&_0x2f873a!==0x0;}function fmtNames(_0x1674cf){const _0x1dcb82=a20_0x15c3;return _0x1674cf[_0x1dcb82(0x195)](_0x5123d3=>'--'+_0x5123d3)[_0x1dcb82(0x1ad)](',\x20');}export function requireOneOf(_0x3d57a8,_0x6168e0,_0x225dbd){const _0x3db185=a20_0x15c3,_0x4098f6=_0x6168e0[_0x3db185(0x1a7)](_0x1f60ac=>isSet(_0x3d57a8,_0x1f60ac));if(_0x4098f6[_0x3db185(0x1a2)]!==0x1)throw CliErrors[_0x3db185(0x197)](_0x4098f6[_0x3db185(0x1a2)]===0x0?_0x3db185(0x196)+fmtNames(_0x6168e0)+_0x3db185(0x1a1)+_0x225dbd+'`.':_0x3db185(0x1a3)+fmtNames(_0x6168e0)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x4098f6)+'.',_0x4098f6[_0x3db185(0x1a2)]===0x0?_0x3db185(0x19f)+fmtNames(_0x6168e0):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x5a4ff1,_0x19514e,_0x15c0b5){const _0x15e8c7=a20_0x15c3;if(!_0x19514e[_0x15e8c7(0x194)](_0xf7be65=>isSet(_0x5a4ff1,_0xf7be65)))throw CliErrors[_0x15e8c7(0x197)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x19514e)+_0x15e8c7(0x1a1)+_0x15c0b5+'`.',_0x15e8c7(0x19f)+fmtNames(_0x19514e));}export function mutuallyExclusive(_0x298349,_0xfe035a,_0x5118c5){const _0x505c08=a20_0x15c3,_0x12f1e8=_0xfe035a[_0x505c08(0x1a7)](_0x54376d=>isSet(_0x298349,_0x54376d));if(_0x12f1e8[_0x505c08(0x1a2)]>0x1)throw CliErrors[_0x505c08(0x197)](_0x505c08(0x19d)+fmtNames(_0x12f1e8)+_0x505c08(0x1ab)+_0x5118c5+'`.',_0x505c08(0x1a8)+fmtNames(_0xfe035a));}export function validatePattern(_0x26b827,_0x2de6e3,_0x28bc54,_0x3c9edc){const _0x29840d=a20_0x15c3,_0x47ff13=_0x26b827[_0x29840d(0x193)](_0x2de6e3);if(_0x47ff13&&!_0x28bc54[_0x29840d(0x19b)](_0x47ff13))throw CliErrors[_0x29840d(0x197)](_0x29840d(0x19a)+_0x2de6e3+_0x29840d(0x1a5)+_0x3c9edc+_0x29840d(0x198)+_0x47ff13+'\x22.');}
1
+ (function(_0x39235e,_0x5c60ee){const _0x572fda=a20_0xe565,_0x480b72=_0x39235e();while(!![]){try{const _0x189072=-parseInt(_0x572fda(0x149))/0x1+parseInt(_0x572fda(0x14a))/0x2*(parseInt(_0x572fda(0x13a))/0x3)+-parseInt(_0x572fda(0x147))/0x4+parseInt(_0x572fda(0x141))/0x5+parseInt(_0x572fda(0x13b))/0x6*(-parseInt(_0x572fda(0x145))/0x7)+-parseInt(_0x572fda(0x13e))/0x8*(-parseInt(_0x572fda(0x140))/0x9)+parseInt(_0x572fda(0x148))/0xa;if(_0x189072===_0x5c60ee)break;else _0x480b72['push'](_0x480b72['shift']());}catch(_0x2ac36e){_0x480b72['push'](_0x480b72['shift']());}}}(a20_0x2a09,0x25c46));import{CliErrors}from'../../errors.js';function a20_0x2a09(){const _0x217030=['\x20are\x20mutually\x20exclusive\x20for\x20`','Invalid\x20--','\x20is\x20required\x20for\x20`','6FqeIMM','120126KqlPQu','Flags\x20','filter','88uMLsrl','some','173322mKzgxb','1041700zxpOuP','flag','Remove\x20all\x20but\x20one.','Provide\x20one\x20of:\x20','42tMXqkg','Use\x20only\x20one\x20of:\x20','598868kFYXmW','736710OaknTQ','231858ECkcCk','162546XdKapW','join','At\x20least\x20one\x20of\x20','length','str','validation'];a20_0x2a09=function(){return _0x217030;};return a20_0x2a09();}function isSet(_0x41e7a5,_0x557353){const _0x5a5ddc=a20_0xe565,_0x3aa47d=_0x41e7a5[_0x5a5ddc(0x142)](_0x557353);return _0x3aa47d!==undefined&&_0x3aa47d!==''&&_0x3aa47d!==![]&&_0x3aa47d!==0x0;}function a20_0xe565(_0x16c70e,_0x2f3b2d){_0x16c70e=_0x16c70e-0x132;const _0x2a0921=a20_0x2a09();let _0xe56567=_0x2a0921[_0x16c70e];return _0xe56567;}function fmtNames(_0x5b6e9d){const _0x413f4d=a20_0xe565;return _0x5b6e9d['map'](_0x5a1bbc=>'--'+_0x5a1bbc)[_0x413f4d(0x132)](',\x20');}export function requireOneOf(_0x590e1a,_0x3c5139,_0x473928){const _0x18d7b1=a20_0xe565,_0x393d1b=_0x3c5139[_0x18d7b1(0x13d)](_0x41b3f5=>isSet(_0x590e1a,_0x41b3f5));if(_0x393d1b[_0x18d7b1(0x134)]!==0x1)throw CliErrors[_0x18d7b1(0x136)](_0x393d1b[_0x18d7b1(0x134)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x3c5139)+_0x18d7b1(0x139)+_0x473928+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x3c5139)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x393d1b)+'.',_0x393d1b[_0x18d7b1(0x134)]===0x0?_0x18d7b1(0x144)+fmtNames(_0x3c5139):_0x18d7b1(0x143));}export function requireAnyOf(_0x128c97,_0x23d348,_0x55cc20){const _0x254bf6=a20_0xe565;if(!_0x23d348[_0x254bf6(0x13f)](_0xc60a43=>isSet(_0x128c97,_0xc60a43)))throw CliErrors[_0x254bf6(0x136)](_0x254bf6(0x133)+fmtNames(_0x23d348)+_0x254bf6(0x139)+_0x55cc20+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x23d348));}export function mutuallyExclusive(_0x254d0d,_0x5cb5e0,_0x44d337){const _0x30e289=a20_0xe565,_0x1fd958=_0x5cb5e0[_0x30e289(0x13d)](_0x3c22b0=>isSet(_0x254d0d,_0x3c22b0));if(_0x1fd958[_0x30e289(0x134)]>0x1)throw CliErrors[_0x30e289(0x136)](_0x30e289(0x13c)+fmtNames(_0x1fd958)+_0x30e289(0x137)+_0x44d337+'`.',_0x30e289(0x146)+fmtNames(_0x5cb5e0));}export function validatePattern(_0x3c30e3,_0x1eb458,_0x3e7957,_0x49088c){const _0x1b2c9e=a20_0xe565,_0x3571a9=_0x3c30e3[_0x1b2c9e(0x135)](_0x1eb458);if(_0x3571a9&&!_0x3e7957['test'](_0x3571a9))throw CliErrors[_0x1b2c9e(0x136)](_0x1b2c9e(0x138)+_0x1eb458+':\x20expected\x20'+_0x49088c+',\x20got\x20\x22'+_0x3571a9+'\x22.');}
@@ -1 +1 @@
1
- const a21_0x3ce1d0=a21_0x3f6d;(function(_0x493af7,_0x9ecb6b){const _0x53163e=a21_0x3f6d,_0x35b262=_0x493af7();while(!![]){try{const _0x16303c=parseInt(_0x53163e(0x1ce))/0x1+parseInt(_0x53163e(0x1de))/0x2*(-parseInt(_0x53163e(0x1d6))/0x3)+parseInt(_0x53163e(0x1db))/0x4+-parseInt(_0x53163e(0x1cc))/0x5*(-parseInt(_0x53163e(0x1c8))/0x6)+-parseInt(_0x53163e(0x1d7))/0x7*(parseInt(_0x53163e(0x1ca))/0x8)+parseInt(_0x53163e(0x1d0))/0x9*(parseInt(_0x53163e(0x1d4))/0xa)+-parseInt(_0x53163e(0x1df))/0xb*(parseInt(_0x53163e(0x1c5))/0xc);if(_0x16303c===_0x9ecb6b)break;else _0x35b262['push'](_0x35b262['shift']());}catch(_0x5d60cb){_0x35b262['push'](_0x35b262['shift']());}}}(a21_0x5ba9,0xd3d0e));export const GLOBAL_SCOPE_FLAG={'name':'global','type':a21_0x3ce1d0(0x1dc),'default':![],'description':a21_0x3ce1d0(0x1d9)};export const CODE_FLAG={'name':a21_0x3ce1d0(0x1cd),'type':a21_0x3ce1d0(0x1da),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x3ce1d0(0x1c9)}};export const SQLCODE_FLAG={'name':a21_0x3ce1d0(0x1cb),'type':'string','required':!![],'description':a21_0x3ce1d0(0x1cf),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x3ce1d0(0x1d8)}};function a21_0x3f6d(_0xf4194a,_0x159e2f){_0xf4194a=_0xf4194a-0x1c5;const _0x5ba9f5=a21_0x5ba9();let _0x3f6d27=_0x5ba9f5[_0xf4194a];return _0x3f6d27;}export const VERBOSE_FLAG={'name':a21_0x3ce1d0(0x1dd),'type':a21_0x3ce1d0(0x1dc),'description':a21_0x3ce1d0(0x1d5)};export const PARAMS_FLAG={'name':a21_0x3ce1d0(0x1c6),'type':a21_0x3ce1d0(0x1da),'description':a21_0x3ce1d0(0x1d2)};function a21_0x5ba9(){const _0x380502=['Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','name','12310NcqkxO','Return\x20full\x20raw\x20response\x20object','1695459osUnfo','301NzLgdO','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Write\x20to\x20the\x20global\x20configuration','string','6451480SSRscV','boolean','verbose','4iMrqcJ','275tScMkM','7884nBTpxV','params','Resource\x20name\x20for\x20lookup','4082430ApgSie','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','298096sBGApS','sqlcode','5McskZc','code','881391tCcOJx','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','3231VkeNds','Resource\x20ID'];a21_0x5ba9=function(){return _0x380502;};return a21_0x5ba9();}export const NAME_FLAG={'name':a21_0x3ce1d0(0x1d3),'type':'string','description':a21_0x3ce1d0(0x1c7)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a21_0x3ce1d0(0x1d1)};
1
+ const a21_0x221e26=a21_0x337a;function a21_0x337a(_0x1676ff,_0x3ee2a0){_0x1676ff=_0x1676ff-0xb8;const _0xfce5cb=a21_0xfce5();let _0x337abd=_0xfce5cb[_0x1676ff];return _0x337abd;}(function(_0x3e3508,_0x7a20b5){const _0xa05c15=a21_0x337a,_0x1d8cae=_0x3e3508();while(!![]){try{const _0x31eac5=-parseInt(_0xa05c15(0xc1))/0x1+parseInt(_0xa05c15(0xc8))/0x2*(parseInt(_0xa05c15(0xb9))/0x3)+parseInt(_0xa05c15(0xc0))/0x4+-parseInt(_0xa05c15(0xc7))/0x5+-parseInt(_0xa05c15(0xc6))/0x6*(parseInt(_0xa05c15(0xbe))/0x7)+-parseInt(_0xa05c15(0xc4))/0x8+parseInt(_0xa05c15(0xc9))/0x9;if(_0x31eac5===_0x7a20b5)break;else _0x1d8cae['push'](_0x1d8cae['shift']());}catch(_0x4af297){_0x1d8cae['push'](_0x1d8cae['shift']());}}}(a21_0xfce5,0xe57d3));export const GLOBAL_SCOPE_FLAG={'name':a21_0x221e26(0xcc),'type':a21_0x221e26(0xcb),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const CODE_FLAG={'name':a21_0x221e26(0xbd),'type':a21_0x221e26(0xc2),'required':!![],'description':a21_0x221e26(0xbf),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a21_0x221e26(0xba),'type':a21_0x221e26(0xc2),'required':!![],'description':a21_0x221e26(0xc5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x221e26(0xbb)}};export const VERBOSE_FLAG={'name':a21_0x221e26(0xb8),'type':a21_0x221e26(0xcb),'description':a21_0x221e26(0xce)};export const PARAMS_FLAG={'name':a21_0x221e26(0xcf),'type':a21_0x221e26(0xc2),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};function a21_0xfce5(){const _0x30fb42=['10125800lMjQaG','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','179886ZYwZAM','6853325feoUIP','50buGOfu','27335412ziauNO','number','boolean','global','Resource\x20name\x20for\x20lookup','Return\x20full\x20raw\x20response\x20object','params','verbose','128109cUcKGQ','sqlcode','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Resource\x20ID','code','84xKvJnJ','Dataset\x20code\x20(32-char\x20hex\x20UUID)','946496IYGjME','405318UKcXDU','string','name'];a21_0xfce5=function(){return _0x30fb42;};return a21_0xfce5();}export const NAME_FLAG={'name':a21_0x221e26(0xc3),'type':a21_0x221e26(0xc2),'description':a21_0x221e26(0xcd)};export const ID_FLAG={'name':'id','type':a21_0x221e26(0xca),'required':!![],'description':a21_0x221e26(0xbc)};
@@ -1 +1 @@
1
- (function(_0x589adb,_0x13ada6){const _0x1bab1d=a22_0x3f98,_0x170c19=_0x589adb();while(!![]){try{const _0x3f5879=parseInt(_0x1bab1d(0x124))/0x1*(parseInt(_0x1bab1d(0x122))/0x2)+-parseInt(_0x1bab1d(0x11d))/0x3+-parseInt(_0x1bab1d(0x121))/0x4+-parseInt(_0x1bab1d(0x127))/0x5*(parseInt(_0x1bab1d(0x126))/0x6)+-parseInt(_0x1bab1d(0x125))/0x7+-parseInt(_0x1bab1d(0x11e))/0x8+-parseInt(_0x1bab1d(0x117))/0x9*(-parseInt(_0x1bab1d(0x11c))/0xa);if(_0x3f5879===_0x13ada6)break;else _0x170c19['push'](_0x170c19['shift']());}catch(_0xae9c71){_0x170c19['push'](_0x170c19['shift']());}}}(a22_0x2534,0x9deda));function a22_0x2534(){const _0x18af81=['File\x20not\x20found:\x20','331148VSlZGQ','244598EyJNcM','trim','9UQaKTz','6836641spRCDd','376392btoios','20qIGgaM','File\x20is\x20not\x20a\x20regular\x20file:\x20','validation','117VTmcpU','isFile','size','\x20MB','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','1987550wXeKMB','1570374kioIsw','9630368OBynRd','ceil'];a22_0x2534=function(){return _0x18af81;};return a22_0x2534();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1267e1){const _0x5eb5bb=a22_0x3f98;if(_0x1267e1>=BYTES_PER_MB){const _0x4ab10a=Math[_0x5eb5bb(0x11f)](_0x1267e1/BYTES_PER_MB*0x64)/0x64;return _0x4ab10a['toFixed'](0x2)+_0x5eb5bb(0x11a);}return _0x1267e1+'\x20B';}function a22_0x3f98(_0x1db2b5,_0x298f6e){_0x1db2b5=_0x1db2b5-0x117;const _0x253481=a22_0x2534();let _0x3f98dd=_0x253481[_0x1db2b5];return _0x3f98dd;}export function requireRuntimeUploadFile(_0x511806,_0x38d0f1){const _0x2edd1d=a22_0x3f98,_0x346335=_0x511806[_0x2edd1d(0x123)]();if(!_0x346335)throw CliErrors['validation'](_0x38d0f1+'\x20path\x20is\x20required.');if(!existsSync(_0x346335))throw CliErrors[_0x2edd1d(0x129)](_0x2edd1d(0x120)+_0x346335);const _0x3e0593=statSync(_0x346335);if(!_0x3e0593[_0x2edd1d(0x118)]())throw CliErrors[_0x2edd1d(0x129)](_0x2edd1d(0x128)+_0x346335);if(_0x3e0593['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x2edd1d(0x11b)+_0x346335+'\x20('+formatBytes(_0x3e0593[_0x2edd1d(0x119)])+')');return{'path':_0x346335,'size':_0x3e0593[_0x2edd1d(0x119)]};}
1
+ (function(_0x49f57c,_0x16c682){const _0x14b5ef=a22_0x47a6,_0x1641da=_0x49f57c();while(!![]){try{const _0x64f2d2=parseInt(_0x14b5ef(0x152))/0x1*(-parseInt(_0x14b5ef(0x147))/0x2)+parseInt(_0x14b5ef(0x153))/0x3*(-parseInt(_0x14b5ef(0x149))/0x4)+parseInt(_0x14b5ef(0x148))/0x5*(-parseInt(_0x14b5ef(0x14d))/0x6)+parseInt(_0x14b5ef(0x158))/0x7*(parseInt(_0x14b5ef(0x151))/0x8)+-parseInt(_0x14b5ef(0x159))/0x9+-parseInt(_0x14b5ef(0x156))/0xa+parseInt(_0x14b5ef(0x14e))/0xb;if(_0x64f2d2===_0x16c682)break;else _0x1641da['push'](_0x1641da['shift']());}catch(_0x159bfc){_0x1641da['push'](_0x1641da['shift']());}}}(a22_0x2266,0x53b2d));import{existsSync,statSync}from'node:fs';function a22_0x2266(){const _0x21cfe4=['136936nIKCcX','3hOiBqr','12918RZWuDO','toFixed','File\x20not\x20found:\x20','6379380dzJget','size','42avnFyj','2673513KyLYDG','validation','243884diLXSJ','11315bSJcqM','424fhUzQc','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20path\x20is\x20required.','\x20MB','30cstEyv','22095689PrXHok','ceil','trim'];a22_0x2266=function(){return _0x21cfe4;};return a22_0x2266();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x8bfacb){const _0x1590da=a22_0x47a6;if(_0x8bfacb>=BYTES_PER_MB){const _0x52b344=Math[_0x1590da(0x14f)](_0x8bfacb/BYTES_PER_MB*0x64)/0x64;return _0x52b344[_0x1590da(0x154)](0x2)+_0x1590da(0x14c);}return _0x8bfacb+'\x20B';}function a22_0x47a6(_0x54499a,_0x4e9e70){_0x54499a=_0x54499a-0x147;const _0x2266f3=a22_0x2266();let _0x47a6d1=_0x2266f3[_0x54499a];return _0x47a6d1;}export function requireRuntimeUploadFile(_0x2a1bb4,_0x4e872b){const _0x2b9c36=a22_0x47a6,_0x2e10bb=_0x2a1bb4[_0x2b9c36(0x150)]();if(!_0x2e10bb)throw CliErrors[_0x2b9c36(0x15a)](_0x4e872b+_0x2b9c36(0x14b));if(!existsSync(_0x2e10bb))throw CliErrors[_0x2b9c36(0x15a)](_0x2b9c36(0x155)+_0x2e10bb);const _0x144281=statSync(_0x2e10bb);if(!_0x144281['isFile']())throw CliErrors[_0x2b9c36(0x15a)](_0x2b9c36(0x14a)+_0x2e10bb);if(_0x144281[_0x2b9c36(0x157)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x2b9c36(0x15a)]('File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2e10bb+'\x20('+formatBytes(_0x144281[_0x2b9c36(0x157)])+')');return{'path':_0x2e10bb,'size':_0x144281[_0x2b9c36(0x157)]};}
@@ -1 +1 @@
1
- const a23_0xf80ca5=a23_0x11ac;(function(_0x413b1e,_0x3d0fa1){const _0x5d2ec7=a23_0x11ac,_0x1493d9=_0x413b1e();while(!![]){try{const _0xa46fef=parseInt(_0x5d2ec7(0x185))/0x1+parseInt(_0x5d2ec7(0x19a))/0x2+parseInt(_0x5d2ec7(0x199))/0x3+-parseInt(_0x5d2ec7(0x181))/0x4*(-parseInt(_0x5d2ec7(0x1ba))/0x5)+-parseInt(_0x5d2ec7(0x191))/0x6*(-parseInt(_0x5d2ec7(0x17c))/0x7)+-parseInt(_0x5d2ec7(0x1a4))/0x8*(-parseInt(_0x5d2ec7(0x1b3))/0x9)+parseInt(_0x5d2ec7(0x1ab))/0xa*(-parseInt(_0x5d2ec7(0x17e))/0xb);if(_0xa46fef===_0x3d0fa1)break;else _0x1493d9['push'](_0x1493d9['shift']());}catch(_0x5114f9){_0x1493d9['push'](_0x1493d9['shift']());}}}(a23_0x2354,0x4acbd));import{CliErrors}from'../../errors.js';function a23_0x11ac(_0x1e5bc6,_0x47a3e5){_0x1e5bc6=_0x1e5bc6-0x17b;const _0x2354f8=a23_0x2354();let _0x11ac41=_0x2354f8[_0x1e5bc6];return _0x11ac41;}function a23_0x2354(){const _0xd2461=['\x20\x20project:\x20','16314qaLdUe','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20\x20global:\x20\x20','Invalid\x20locale\x20value.','alias','includes','log','(none)','1663692qdtREm','665830HEPtdR','raw','field','\x20(global)','join','length','Key\x20already\x20absent:\x20','trim','Get\x20a\x20config\x20value','locale','48TSVqZf','\x22\x20is\x20not\x20settable.','\x20config\x20set\x20<key>\x20<value>\x20[--global]','set','object','../../context.js','delete','3449190snaSsG','args','\x22.\x20Allowed:\x20','Delete\x20a\x20configuration\x20value','global','project-or-global-explicit','\x20config\x20delete\x20<key>\x20[--global]','Deleted\x20`','544392vdbtXT',';\x20apps.<alias>.appcode','config','Usage:\x20','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','stringify','validation','5rnNKPJ','appcode','994gFGxVX','key','77bhRsDM','isArray','read','2297752KofzyA','split','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','pageSize','509855ZMeICq','format','pageSize\x20must\x20be\x20a\x20positive\x20number','apps','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','get','Value\x20to\x20assign','Missing\x20key\x20argument.','write','Top-level\x20key\x20\x22','Key\x20not\x20found:\x20'];a23_0x2354=function(){return _0xd2461;};return a23_0x2354();}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(_0x5b79da){const _0x2fd739=a23_0x11ac,_0x58538c=_0x5b79da[_0x2fd739(0x182)]('.');if(_0x58538c['length']!==0x3||_0x58538c[0x0]!==_0x2fd739(0x188)||_0x58538c[0x2]!==_0x2fd739(0x17b))return undefined;const _0x41e03e=_0x58538c[0x1]?.[_0x2fd739(0x1a1)]();return _0x41e03e?_0x41e03e:undefined;}function parseAliasDeleteKey(_0x2172ff){const _0x145cdf=a23_0x11ac,_0x40f172=_0x2172ff[_0x145cdf(0x182)]('.');if(_0x40f172['length']===0x2&&_0x40f172[0x0]===_0x145cdf(0x188)){const _0xf62120=_0x40f172[0x1]?.[_0x145cdf(0x1a1)]();return _0xf62120?{'alias':_0xf62120}:undefined;}if(_0x40f172[_0x145cdf(0x19f)]===0x3&&_0x40f172[0x0]===_0x145cdf(0x188)&&_0x40f172[0x2]==='appcode'){const _0x1cab5b=_0x40f172[0x1]?.['trim']();return _0x1cab5b?{'alias':_0x1cab5b,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x2300ac,_0x407fdd,_0x5de593){const _0x146b4b=a23_0x11ac,_0x3e8b01=_0x2300ac[_0x146b4b(0x188)]&&typeof _0x2300ac[_0x146b4b(0x188)]===_0x146b4b(0x1a8)&&!Array[_0x146b4b(0x17f)](_0x2300ac[_0x146b4b(0x188)])?_0x2300ac[_0x146b4b(0x188)]:{},_0x16bdd1=_0x3e8b01[_0x407fdd]&&typeof _0x3e8b01[_0x407fdd]===_0x146b4b(0x1a8)&&!Array[_0x146b4b(0x17f)](_0x3e8b01[_0x407fdd])?_0x3e8b01[_0x407fdd]:{};_0x16bdd1[_0x146b4b(0x17b)]=_0x5de593,_0x3e8b01[_0x407fdd]=_0x16bdd1,_0x2300ac[_0x146b4b(0x188)]=_0x3e8b01;}function deleteLocalAppAlias(_0x309c02,_0x20b85e){const _0x2f1331=a23_0x11ac;if(!_0x309c02[_0x2f1331(0x188)]||typeof _0x309c02[_0x2f1331(0x188)]!==_0x2f1331(0x1a8)||Array[_0x2f1331(0x17f)](_0x309c02[_0x2f1331(0x188)]))return![];const _0x319385=_0x309c02[_0x2f1331(0x188)],_0x3a0b3c=_0x319385[_0x20b85e[_0x2f1331(0x195)]];if(!_0x3a0b3c||typeof _0x3a0b3c!==_0x2f1331(0x1a8)||Array[_0x2f1331(0x17f)](_0x3a0b3c))return![];if(!_0x20b85e[_0x2f1331(0x19c)])return delete _0x319385[_0x20b85e[_0x2f1331(0x195)]],!![];if(!(_0x20b85e[_0x2f1331(0x19c)]in _0x3a0b3c))return![];return delete _0x3a0b3c[_0x20b85e[_0x2f1331(0x19c)]],Object['keys'](_0x3a0b3c)[_0x2f1331(0x19f)]===0x0&&delete _0x319385[_0x20b85e[_0x2f1331(0x195)]],!![];}const listDef={'service':'config','command':'list','description':'List\x20current\x20config','risk':a23_0xf80ca5(0x180),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4062e3){const _0x2b2662=a23_0xf80ca5,{buildConfigFromFlags:_0x13672c}=await import(_0x2b2662(0x1a9)),_0x222cd2=_0x13672c({}),_0x36fa65=redactCliConfigCredentials(_0x222cd2[_0x2b2662(0x19b)]),_0x452126=getProjectConfigPath(),_0x1f1f2b=resolveWriteConfigPath('global');if(_0x4062e3[_0x2b2662(0x186)]==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x2b2662(0x1b8)](_0x36fa65,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x2b2662(0x190)+(_0x452126??_0x2b2662(0x198))+'\x0a')+(_0x2b2662(0x193)+_0x1f1f2b)};return{'ok':!![],'data':{'effective':_0x36fa65,'configFiles':{'project':_0x452126??null,'global':_0x1f1f2b}}};}},getDef={'service':a23_0xf80ca5(0x1b5),'command':a23_0xf80ca5(0x18a),'description':a23_0xf80ca5(0x1a2),'risk':a23_0xf80ca5(0x180),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0xf80ca5(0x17d),'description':a23_0xf80ca5(0x192),'required':!![]}],'flags':[],async 'execute'(_0x4c0ea7){const _0x4fbdfd=a23_0xf80ca5,_0x45543d=_0x4c0ea7[_0x4fbdfd(0x1ac)][0x0];if(!_0x45543d)throw CliErrors[_0x4fbdfd(0x1b9)]('Missing\x20key\x20argument.',_0x4fbdfd(0x1b6)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x5ba98b}=await import(_0x4fbdfd(0x1a9)),{raw:_0x3671d7}=_0x5ba98b({});if(_0x45543d['includes']('.')){const _0x37830f=_0x45543d[_0x4fbdfd(0x182)]('.');let _0x49975e=_0x3671d7;for(const _0x5bdd66 of _0x37830f){if(_0x49975e==null||typeof _0x49975e!==_0x4fbdfd(0x1a8))throw CliErrors[_0x4fbdfd(0x1b9)](_0x4fbdfd(0x18f)+_0x45543d);_0x49975e=_0x49975e[_0x5bdd66];}if(_0x49975e===undefined)throw CliErrors[_0x4fbdfd(0x1b9)](_0x4fbdfd(0x18f)+_0x45543d);const _0x3723db=redactCliConfigValue(_0x45543d,_0x49975e);return console[_0x4fbdfd(0x197)](typeof _0x3723db===_0x4fbdfd(0x1a8)?JSON[_0x4fbdfd(0x1b8)](_0x3723db,null,0x2):String(_0x3723db)),{'ok':!![]};}const _0x25d701=_0x3671d7[_0x45543d];if(_0x25d701===undefined)throw CliErrors[_0x4fbdfd(0x1b9)](_0x4fbdfd(0x18f)+_0x45543d);const _0x13973d=redactCliConfigValue(_0x45543d,_0x25d701);return console['log'](typeof _0x13973d===_0x4fbdfd(0x1a8)?JSON['stringify'](_0x13973d,null,0x2):String(_0x13973d)),{'ok':!![]};}},setDef={'service':a23_0xf80ca5(0x1b5),'command':a23_0xf80ca5(0x1a7),'description':'Set\x20a\x20configuration\x20value','risk':a23_0xf80ca5(0x18d),'confirmationDescription':a23_0xf80ca5(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0xf80ca5(0x17d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a23_0xf80ca5(0x18b),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x2271b3){const _0x495958=a23_0xf80ca5,_0x5328fe=_0x2271b3[_0x495958(0x1ac)][0x0],_0x2dd075=_0x2271b3[_0x495958(0x1ac)][0x1];if(!_0x5328fe||_0x2dd075===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x495958(0x1b6)+CLI_BIN_NAME+_0x495958(0x1a6));if(ENUM_KEYS[_0x5328fe]&&!ENUM_KEYS[_0x5328fe]['includes'](_0x2dd075))throw CliErrors[_0x495958(0x1b9)]('Invalid\x20value\x20for\x20\x22'+_0x5328fe+_0x495958(0x1ad)+ENUM_KEYS[_0x5328fe][_0x495958(0x19e)](',\x20'));if(isCliProtectedConfigKey(_0x5328fe))throw CliErrors['validation']('\x22'+_0x5328fe+_0x495958(0x183));if(_0x5328fe===_0x495958(0x184)){const _0x50b2a8=Number(_0x2dd075);if(isNaN(_0x50b2a8)||_0x50b2a8<=0x0)throw CliErrors[_0x495958(0x1b9)](_0x495958(0x187));}const _0x3af2fd=resolveWriteScope({'explicitGlobal':_0x2271b3['bool']('global'),'policy':_0x495958(0x1b0)}),_0x491bf4=toScopeFlags(_0x3af2fd),_0x590141=readScopedConfig(_0x491bf4),_0x1c2444=parseAliasAppcodeSetKey(_0x5328fe);if(!_0x1c2444&&!isTopLevelConfigKey(_0x5328fe))throw CliErrors[_0x495958(0x1b9)](_0x495958(0x18e)+_0x5328fe+_0x495958(0x1a5),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x495958(0x1b4));if(_0x1c2444)setLocalAppAlias(_0x590141,_0x1c2444,_0x2dd075);else{if(_0x5328fe===_0x495958(0x1a3)){const _0x4cf22a=normalizeLocale(_0x2dd075);if(!_0x4cf22a)throw CliErrors[_0x495958(0x1b9)](_0x495958(0x194),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x590141[_0x495958(0x1a3)]=_0x4cf22a;}else _0x590141[_0x5328fe]=_0x5328fe==='pageSize'?Number(_0x2dd075):DOMAIN_CONFIG_FIELDS[_0x495958(0x196)](_0x5328fe)?normalizeDomainOrigin(_0x5328fe,_0x2dd075):_0x2dd075;}const _0x2b7628=_0x5328fe==='accessKey'?maskCliAccessKey(_0x2dd075):!_0x1c2444&&_0x5328fe===_0x495958(0x1a3)?String(_0x590141['locale']):_0x2dd075;return console['log']('Set\x20`'+_0x5328fe+'`\x20=\x20\x22'+_0x2b7628+'\x22'+(_0x3af2fd===_0x495958(0x1af)?_0x495958(0x19d):'')),writeScopedConfig(_0x590141,_0x491bf4),{'ok':!![]};}},deleteDef={'service':a23_0xf80ca5(0x1b5),'command':a23_0xf80ca5(0x1aa),'description':a23_0xf80ca5(0x1ae),'risk':a23_0xf80ca5(0x18d),'confirmationDescription':a23_0xf80ca5(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0xf80ca5(0x17d),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x2061d3){const _0x102192=a23_0xf80ca5,_0x2f2dfe=_0x2061d3['args'][0x0];if(!_0x2f2dfe)throw CliErrors[_0x102192(0x1b9)](_0x102192(0x18c),_0x102192(0x1b6)+CLI_BIN_NAME+_0x102192(0x1b1));if(isCliProtectedConfigKey(_0x2f2dfe))throw CliErrors['validation']('\x22'+_0x2f2dfe+_0x102192(0x183));const _0x448560=resolveWriteScope({'explicitGlobal':_0x2061d3['bool'](_0x102192(0x1af)),'policy':_0x102192(0x1b0)}),_0x1070ec=toScopeFlags(_0x448560),_0x404891=readScopedConfig(_0x1070ec),_0x3d34b5=parseAliasDeleteKey(_0x2f2dfe);if(_0x3d34b5){if(!deleteLocalAppAlias(_0x404891,_0x3d34b5))return console[_0x102192(0x197)](_0x102192(0x1a0)+_0x2f2dfe+(_0x448560===_0x102192(0x1af)?_0x102192(0x19d):'')),{'ok':!![],'data':{'key':_0x2f2dfe,'scope':_0x448560,'changed':![]}};return console['log'](_0x102192(0x1b2)+_0x2f2dfe+'`'+(_0x448560===_0x102192(0x1af)?'\x20(global)':'')),writeScopedConfig(_0x404891,_0x1070ec),{'ok':!![],'data':{'key':_0x2f2dfe,'scope':_0x448560,'changed':!![]}};}if(_0x404891[_0x2f2dfe]===undefined)return console['log'](_0x102192(0x1a0)+_0x2f2dfe+(_0x448560===_0x102192(0x1af)?_0x102192(0x19d):'')),{'ok':!![],'data':{'key':_0x2f2dfe,'scope':_0x448560,'changed':![]}};return delete _0x404891[_0x2f2dfe],console[_0x102192(0x197)](_0x102192(0x1b2)+_0x2f2dfe+'`'+(_0x448560===_0x102192(0x1af)?_0x102192(0x19d):'')),writeScopedConfig(_0x404891,_0x1070ec),{'ok':!![],'data':{'key':_0x2f2dfe,'scope':_0x448560,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
1
+ const a23_0x2f48f4=a23_0x3437;(function(_0x12286b,_0x42ff7c){const _0x5f2255=a23_0x3437,_0x4c0c49=_0x12286b();while(!![]){try{const _0x2dbb81=-parseInt(_0x5f2255(0x21f))/0x1*(parseInt(_0x5f2255(0x22b))/0x2)+parseInt(_0x5f2255(0x201))/0x3*(parseInt(_0x5f2255(0x220))/0x4)+parseInt(_0x5f2255(0x202))/0x5*(-parseInt(_0x5f2255(0x1e4))/0x6)+parseInt(_0x5f2255(0x212))/0x7+parseInt(_0x5f2255(0x211))/0x8*(-parseInt(_0x5f2255(0x1eb))/0x9)+parseInt(_0x5f2255(0x217))/0xa+parseInt(_0x5f2255(0x1e3))/0xb*(parseInt(_0x5f2255(0x228))/0xc);if(_0x2dbb81===_0x42ff7c)break;else _0x4c0c49['push'](_0x4c0c49['shift']());}catch(_0x122973){_0x4c0c49['push'](_0x4c0c49['shift']());}}}(a23_0x1b5b,0xe1eb3));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';function a23_0x3437(_0x836c2,_0x4a108e){_0x836c2=_0x836c2-0x1e1;const _0x1b5be2=a23_0x1b5b();let _0x34377=_0x1b5be2[_0x836c2];return _0x34377;}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a23_0x1b5b(){const _0xdb80fb=['39IKrRXu','9085280mRzMOP','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','\x20config\x20get\x20<key>','Set\x20`','delete','Get\x20a\x20config\x20value','pageSize','bool','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','project-or-global-explicit','Key\x20already\x20absent:\x20','Top-level\x20key\x20\x22','join','config','get','16zHjNCo','4572596flVgGH','pageSize\x20must\x20be\x20a\x20positive\x20number','(none)','raw','pretty','17505220gdHqXl','Settable\x20keys:\x20','Deleted\x20`','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Invalid\x20value\x20for\x20\x22','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','isArray',';\x20apps.<alias>.appcode','3232SFehIk','217312YrWiGe','appcode','Usage:\x20','split','Missing\x20key\x20or\x20value.','set','includes','accessKey','1332SdGCvg','key','Config\x20files:\x0a','526TykXug','global','List\x20current\x20config','188947WxIMVH','6vxTbNA','Key\x20not\x20found:\x20','validation','trim','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','length','args','6409017mZjpQo','Value\x20to\x20assign','Set\x20a\x20configuration\x20value','Missing\x20key\x20argument.','locale','field','\x22\x20is\x20not\x20settable.','Invalid\x20locale\x20value.','\x20(global)','object','apps','Delete\x20a\x20configuration\x20value','write','list','value','stringify','alias','\x22.\x20Allowed:\x20','\x20config\x20set\x20<key>\x20<value>\x20[--global]','read','log','`\x20=\x20\x22'];a23_0x1b5b=function(){return _0xdb80fb;};return a23_0x1b5b();}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(_0x32bf3b){const _0x476af1=a23_0x3437,_0x2b2715=_0x32bf3b[_0x476af1(0x223)]('.');if(_0x2b2715['length']!==0x3||_0x2b2715[0x0]!==_0x476af1(0x1f5)||_0x2b2715[0x2]!=='appcode')return undefined;const _0x3888af=_0x2b2715[0x1]?.['trim']();return _0x3888af?_0x3888af:undefined;}function parseAliasDeleteKey(_0x195249){const _0x338450=a23_0x3437,_0x2d00e7=_0x195249[_0x338450(0x223)]('.');if(_0x2d00e7[_0x338450(0x1e9)]===0x2&&_0x2d00e7[0x0]==='apps'){const _0x17ece9=_0x2d00e7[0x1]?.[_0x338450(0x1e7)]();return _0x17ece9?{'alias':_0x17ece9}:undefined;}if(_0x2d00e7[_0x338450(0x1e9)]===0x3&&_0x2d00e7[0x0]===_0x338450(0x1f5)&&_0x2d00e7[0x2]==='appcode'){const _0xb729b0=_0x2d00e7[0x1]?.[_0x338450(0x1e7)]();return _0xb729b0?{'alias':_0xb729b0,'field':_0x338450(0x221)}:undefined;}return undefined;}function setLocalAppAlias(_0x3feecf,_0x5da01e,_0x237769){const _0xfd12fb=a23_0x3437,_0x291be7=_0x3feecf[_0xfd12fb(0x1f5)]&&typeof _0x3feecf['apps']==='object'&&!Array[_0xfd12fb(0x21d)](_0x3feecf[_0xfd12fb(0x1f5)])?_0x3feecf['apps']:{},_0x4c7448=_0x291be7[_0x5da01e]&&typeof _0x291be7[_0x5da01e]===_0xfd12fb(0x1f4)&&!Array[_0xfd12fb(0x21d)](_0x291be7[_0x5da01e])?_0x291be7[_0x5da01e]:{};_0x4c7448[_0xfd12fb(0x221)]=_0x237769,_0x291be7[_0x5da01e]=_0x4c7448,_0x3feecf[_0xfd12fb(0x1f5)]=_0x291be7;}function deleteLocalAppAlias(_0xb1fa73,_0x19c325){const _0x35c3c5=a23_0x3437;if(!_0xb1fa73['apps']||typeof _0xb1fa73[_0x35c3c5(0x1f5)]!==_0x35c3c5(0x1f4)||Array[_0x35c3c5(0x21d)](_0xb1fa73[_0x35c3c5(0x1f5)]))return![];const _0x3965dd=_0xb1fa73[_0x35c3c5(0x1f5)],_0x2f1720=_0x3965dd[_0x19c325['alias']];if(!_0x2f1720||typeof _0x2f1720!==_0x35c3c5(0x1f4)||Array[_0x35c3c5(0x21d)](_0x2f1720))return![];if(!_0x19c325['field'])return delete _0x3965dd[_0x19c325[_0x35c3c5(0x1fb)]],!![];if(!(_0x19c325[_0x35c3c5(0x1f0)]in _0x2f1720))return![];return delete _0x2f1720[_0x19c325[_0x35c3c5(0x1f0)]],Object['keys'](_0x2f1720)[_0x35c3c5(0x1e9)]===0x0&&delete _0x3965dd[_0x19c325[_0x35c3c5(0x1fb)]],!![];}const listDef={'service':a23_0x2f48f4(0x20f),'command':a23_0x2f48f4(0x1f8),'description':a23_0x2f48f4(0x1e2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5f2700){const _0x36a209=a23_0x2f48f4,{buildConfigFromFlags:_0x32107b}=await import('../../context.js'),_0x51d651=_0x32107b({}),_0x413907=redactCliConfigCredentials(_0x51d651[_0x36a209(0x215)]),_0x45b975=getProjectConfigPath(),_0x48a50d=resolveWriteConfigPath('global');if(_0x5f2700['format']===_0x36a209(0x216))return{'ok':!![],'message':_0x36a209(0x20a)+(JSON[_0x36a209(0x1fa)](_0x413907,null,0x2)+'\x0a\x0a')+_0x36a209(0x22a)+('\x20\x20project:\x20'+(_0x45b975??_0x36a209(0x214))+'\x0a')+('\x20\x20global:\x20\x20'+_0x48a50d)};return{'ok':!![],'data':{'effective':_0x413907,'configFiles':{'project':_0x45b975??null,'global':_0x48a50d}}};}},getDef={'service':a23_0x2f48f4(0x20f),'command':a23_0x2f48f4(0x210),'description':a23_0x2f48f4(0x207),'risk':a23_0x2f48f4(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2f48f4(0x229),'description':a23_0x2f48f4(0x21c),'required':!![]}],'flags':[],async 'execute'(_0x5a3b68){const _0x540e1c=a23_0x2f48f4,_0x29d1c2=_0x5a3b68[_0x540e1c(0x1ea)][0x0];if(!_0x29d1c2)throw CliErrors[_0x540e1c(0x1e6)](_0x540e1c(0x1ee),_0x540e1c(0x222)+CLI_BIN_NAME+_0x540e1c(0x204));const {buildConfigFromFlags:_0x47db43}=await import('../../context.js'),{raw:_0x4f27fb}=_0x47db43({});if(_0x29d1c2[_0x540e1c(0x226)]('.')){const _0x2903dd=_0x29d1c2[_0x540e1c(0x223)]('.');let _0x274142=_0x4f27fb;for(const _0x2d05b2 of _0x2903dd){if(_0x274142==null||typeof _0x274142!==_0x540e1c(0x1f4))throw CliErrors['validation'](_0x540e1c(0x1e5)+_0x29d1c2);_0x274142=_0x274142[_0x2d05b2];}if(_0x274142===undefined)throw CliErrors['validation'](_0x540e1c(0x1e5)+_0x29d1c2);const _0x2c0ab3=redactCliConfigValue(_0x29d1c2,_0x274142);return console[_0x540e1c(0x1ff)](typeof _0x2c0ab3==='object'?JSON['stringify'](_0x2c0ab3,null,0x2):String(_0x2c0ab3)),{'ok':!![]};}const _0x419a75=_0x4f27fb[_0x29d1c2];if(_0x419a75===undefined)throw CliErrors[_0x540e1c(0x1e6)]('Key\x20not\x20found:\x20'+_0x29d1c2);const _0x149e58=redactCliConfigValue(_0x29d1c2,_0x419a75);return console[_0x540e1c(0x1ff)](typeof _0x149e58===_0x540e1c(0x1f4)?JSON[_0x540e1c(0x1fa)](_0x149e58,null,0x2):String(_0x149e58)),{'ok':!![]};}},setDef={'service':a23_0x2f48f4(0x20f),'command':a23_0x2f48f4(0x225),'description':a23_0x2f48f4(0x1ed),'risk':a23_0x2f48f4(0x1f7),'confirmationDescription':a23_0x2f48f4(0x1e8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x2f48f4(0x1f9),'description':a23_0x2f48f4(0x1ec),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x392ef4){const _0x1acf54=a23_0x2f48f4,_0x2576cd=_0x392ef4['args'][0x0],_0x1f1210=_0x392ef4[_0x1acf54(0x1ea)][0x1];if(!_0x2576cd||_0x1f1210===undefined)throw CliErrors[_0x1acf54(0x1e6)](_0x1acf54(0x224),_0x1acf54(0x222)+CLI_BIN_NAME+_0x1acf54(0x1fd));if(ENUM_KEYS[_0x2576cd]&&!ENUM_KEYS[_0x2576cd]['includes'](_0x1f1210))throw CliErrors[_0x1acf54(0x1e6)](_0x1acf54(0x21b)+_0x2576cd+_0x1acf54(0x1fc)+ENUM_KEYS[_0x2576cd][_0x1acf54(0x20e)](',\x20'));if(isCliProtectedConfigKey(_0x2576cd))throw CliErrors[_0x1acf54(0x1e6)]('\x22'+_0x2576cd+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x2576cd===_0x1acf54(0x208)){const _0x35b655=Number(_0x1f1210);if(isNaN(_0x35b655)||_0x35b655<=0x0)throw CliErrors[_0x1acf54(0x1e6)](_0x1acf54(0x213));}const _0x206130=resolveWriteScope({'explicitGlobal':_0x392ef4[_0x1acf54(0x209)](_0x1acf54(0x1e1)),'policy':_0x1acf54(0x20b)}),_0x32aaf2=toScopeFlags(_0x206130),_0x536e11=readScopedConfig(_0x32aaf2),_0x295259=parseAliasAppcodeSetKey(_0x2576cd);if(!_0x295259&&!isTopLevelConfigKey(_0x2576cd))throw CliErrors[_0x1acf54(0x1e6)](_0x1acf54(0x20d)+_0x2576cd+_0x1acf54(0x1f1),_0x1acf54(0x218)+getTopLevelConfigKeySummary()+_0x1acf54(0x21e));if(_0x295259)setLocalAppAlias(_0x536e11,_0x295259,_0x1f1210);else{if(_0x2576cd===_0x1acf54(0x1ef)){const _0x386593=normalizeLocale(_0x1f1210);if(!_0x386593)throw CliErrors[_0x1acf54(0x1e6)](_0x1acf54(0x1f2),_0x1acf54(0x21a));_0x536e11['locale']=_0x386593;}else _0x536e11[_0x2576cd]=_0x2576cd==='pageSize'?Number(_0x1f1210):DOMAIN_CONFIG_FIELDS[_0x1acf54(0x226)](_0x2576cd)?normalizeDomainOrigin(_0x2576cd,_0x1f1210):_0x1f1210;}const _0x4974a2=_0x2576cd===_0x1acf54(0x227)?maskCliAccessKey(_0x1f1210):!_0x295259&&_0x2576cd===_0x1acf54(0x1ef)?String(_0x536e11['locale']):_0x1f1210;return console[_0x1acf54(0x1ff)](_0x1acf54(0x205)+_0x2576cd+_0x1acf54(0x200)+_0x4974a2+'\x22'+(_0x206130==='global'?_0x1acf54(0x1f3):'')),writeScopedConfig(_0x536e11,_0x32aaf2),{'ok':!![]};}},deleteDef={'service':a23_0x2f48f4(0x20f),'command':a23_0x2f48f4(0x206),'description':a23_0x2f48f4(0x1f6),'risk':a23_0x2f48f4(0x1f7),'confirmationDescription':a23_0x2f48f4(0x203),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2f48f4(0x229),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x3067cd){const _0x43e31b=a23_0x2f48f4,_0x201c2c=_0x3067cd[_0x43e31b(0x1ea)][0x0];if(!_0x201c2c)throw CliErrors['validation'](_0x43e31b(0x1ee),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x201c2c))throw CliErrors[_0x43e31b(0x1e6)]('\x22'+_0x201c2c+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0xbdaa2e=resolveWriteScope({'explicitGlobal':_0x3067cd[_0x43e31b(0x209)](_0x43e31b(0x1e1)),'policy':_0x43e31b(0x20b)}),_0x4f1710=toScopeFlags(_0xbdaa2e),_0x321218=readScopedConfig(_0x4f1710),_0x4decff=parseAliasDeleteKey(_0x201c2c);if(_0x4decff){if(!deleteLocalAppAlias(_0x321218,_0x4decff))return console[_0x43e31b(0x1ff)](_0x43e31b(0x20c)+_0x201c2c+(_0xbdaa2e==='global'?_0x43e31b(0x1f3):'')),{'ok':!![],'data':{'key':_0x201c2c,'scope':_0xbdaa2e,'changed':![]}};return console[_0x43e31b(0x1ff)](_0x43e31b(0x219)+_0x201c2c+'`'+(_0xbdaa2e===_0x43e31b(0x1e1)?'\x20(global)':'')),writeScopedConfig(_0x321218,_0x4f1710),{'ok':!![],'data':{'key':_0x201c2c,'scope':_0xbdaa2e,'changed':!![]}};}if(_0x321218[_0x201c2c]===undefined)return console['log'](_0x43e31b(0x20c)+_0x201c2c+(_0xbdaa2e===_0x43e31b(0x1e1)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x201c2c,'scope':_0xbdaa2e,'changed':![]}};return delete _0x321218[_0x201c2c],console[_0x43e31b(0x1ff)](_0x43e31b(0x219)+_0x201c2c+'`'+(_0xbdaa2e===_0x43e31b(0x1e1)?_0x43e31b(0x1f3):'')),writeScopedConfig(_0x321218,_0x4f1710),{'ok':!![],'data':{'key':_0x201c2c,'scope':_0xbdaa2e,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- const a24_0x32734d=a24_0x10b5;(function(_0x35addd,_0x4438fb){const _0x528624=a24_0x10b5,_0x5c8b93=_0x35addd();while(!![]){try{const _0x5899f2=-parseInt(_0x528624(0xdd))/0x1*(parseInt(_0x528624(0xf5))/0x2)+parseInt(_0x528624(0xe4))/0x3*(parseInt(_0x528624(0xde))/0x4)+parseInt(_0x528624(0xe3))/0x5+parseInt(_0x528624(0xf4))/0x6+-parseInt(_0x528624(0xe6))/0x7*(-parseInt(_0x528624(0x100))/0x8)+parseInt(_0x528624(0xe2))/0x9+-parseInt(_0x528624(0xf0))/0xa*(parseInt(_0x528624(0xf3))/0xb);if(_0x5899f2===_0x4438fb)break;else _0x5c8b93['push'](_0x5c8b93['shift']());}catch(_0x4e23ec){_0x5c8b93['push'](_0x5c8b93['shift']());}}}(a24_0x4fc5,0x810de));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';function a24_0x10b5(_0x4c2ee1,_0x149261){_0x4c2ee1=_0x4c2ee1-0xd6;const _0x4fc5aa=a24_0x4fc5();let _0x10b521=_0x4fc5aa[_0x4c2ee1];return _0x10b521;}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_0x32734d(0xed),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xe1)},{'name':a24_0x32734d(0xf2),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xdf)},{'name':a24_0x32734d(0xd9),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xec)},{'name':'runtime-domain','type':a24_0x32734d(0x101),'description':a24_0x32734d(0xe7)},{'name':a24_0x32734d(0xe9),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xdc)},{'name':a24_0x32734d(0xf9),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xf1)}];export const configInitFlags=[{'name':a24_0x32734d(0xe8),'type':a24_0x32734d(0x101),'description':a24_0x32734d(0xfb)+ENABLED_LOVRABET_REGION_VALUES[a24_0x32734d(0xef)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x18c7ad){const _0x5b2664=a24_0x32734d,_0x383a6d=_0x18c7ad[_0x5b2664(0xfe)](_0x5b2664(0xe8));if(_0x383a6d){if(!isEnabledLovrabetRegion(_0x383a6d))throw CliErrors[_0x5b2664(0xe5)]('Region\x20\x22'+_0x383a6d+'\x22\x20is\x20not\x20currently\x20available.',_0x5b2664(0xf7)+ENABLED_LOVRABET_REGION_VALUES[_0x5b2664(0xef)](',\x20'));return _0x383a6d;}if(_0x18c7ad['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x5b2664(0xd6),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x5b2664(0xda)](_0x2e0300=>({'name':OFFICIAL_ROUTING_PROFILES[_0x2e0300][_0x5b2664(0xf6)]+'\x20('+_0x2e0300+')','value':_0x2e0300}))});}catch(_0x23f0a9){if(_0x23f0a9?.['name']==='ExitPromptError')throw CliErrors[_0x5b2664(0xd7)]();throw _0x23f0a9;}}export async function executeConfigInit(_0x312732){const _0x5a4572=a24_0x32734d,_0x4b23a2=resolveDomainConfigInput(_0x312732),_0xe59940=_0x4b23a2[_0x5a4572(0xdb)],_0x374db1=Object[_0x5a4572(0xea)](_0xe59940)[_0x5a4572(0xff)]>0x0;if(_0x374db1&&_0x312732['str']('region'))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');const _0x8101e3={'global':!![]},_0x1c4c25=readScopedConfig(_0x8101e3);for(const _0xbeaa of DOMAIN_CONFIG_FIELDS)delete _0x1c4c25[_0xbeaa];for(const _0x1803b2 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1c4c25[_0x1803b2];delete _0x1c4c25[_0x5a4572(0xfc)];let _0x3248db=null;if(_0x374db1)delete _0x1c4c25['region'],_0x4b23a2[_0x5a4572(0xeb)]==='enterprise-v1'?_0x1c4c25[_0x5a4572(0xfc)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x4b23a2[_0x5a4572(0xe0)]}:Object['assign'](_0x1c4c25,_0xe59940);else{_0x3248db=await resolveRegion(_0x312732);if(_0x3248db===DEFAULT_LOVRABET_REGION)delete _0x1c4c25[_0x5a4572(0xe8)];else _0x1c4c25['region']=_0x3248db;}return writeScopedConfig(_0x1c4c25,_0x8101e3),{'ok':!![],'message':_0x374db1?_0x5a4572(0xf8)+Object[_0x5a4572(0xea)](_0x4b23a2[_0x5a4572(0xeb)]===_0x5a4572(0xfa)?_0x4b23a2[_0x5a4572(0xe0)]:_0xe59940)[_0x5a4572(0xef)](',\x20')+'.':'Lovrabet\x20connection\x20configured\x20for\x20region:\x20'+_0x3248db+'.','data':{'mode':_0x374db1?_0x5a4572(0xd8):'official','protocol':_0x4b23a2[_0x5a4572(0xeb)]===_0x5a4572(0xfa)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x3248db,'domains':_0xe59940}};}function a24_0x4fc5(){const _0x149e5b=['1345816XIBtjp','string','Select\x20Lovrabet\x20region','cancelled','independent','api-domain','map','domains','Custom\x20SkillHub\x20HTTPS\x20origin','883357tHgCDd','1043860gGIGDo','Custom\x20User\x20HTTPS\x20origin','manifestDomains','Independent-deployment\x20Domain\x20JSON\x20file','7929801HphGyY','781075PJLKVC','3zYPJtQ','validation','28Tlhrzz','Custom\x20Runtime\x20HTTPS\x20origin','region','skill-domain','keys','mode','Custom\x20platform\x20API\x20HTTPS\x20origin','domain-config','config','join','20eRwpZY','Custom\x20KB\x20Service\x20HTTPS\x20origin','user-domain','4929408ELhpDp','2022252emJjQk','2SKUSOb','label','Available\x20regions:\x20','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','kb-service-domain','enterprise-v1','Official\x20Lovrabet\x20region:\x20','routing','write','str','length'];a24_0x4fc5=function(){return _0x149e5b;};return a24_0x4fc5();}export const configInitDefinition={'service':a24_0x32734d(0xee),'command':'init','description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a24_0x32734d(0xfd),'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
+ function a24_0x38ca(_0x5dc21d,_0x5bba27){_0x5dc21d=_0x5dc21d-0x119;const _0x4933a1=a24_0x4933();let _0x38ca26=_0x4933a1[_0x5dc21d];return _0x38ca26;}const a24_0xf7444e=a24_0x38ca;(function(_0x1e9bba,_0x21efc2){const _0x1a455b=a24_0x38ca,_0x5499fd=_0x1e9bba();while(!![]){try{const _0x55c715=parseInt(_0x1a455b(0x121))/0x1*(parseInt(_0x1a455b(0x133))/0x2)+-parseInt(_0x1a455b(0x120))/0x3*(-parseInt(_0x1a455b(0x130))/0x4)+-parseInt(_0x1a455b(0x126))/0x5*(-parseInt(_0x1a455b(0x13e))/0x6)+-parseInt(_0x1a455b(0x12a))/0x7*(-parseInt(_0x1a455b(0x11c))/0x8)+parseInt(_0x1a455b(0x12f))/0x9+-parseInt(_0x1a455b(0x13b))/0xa+-parseInt(_0x1a455b(0x11d))/0xb;if(_0x55c715===_0x21efc2)break;else _0x5499fd['push'](_0x5499fd['shift']());}catch(_0x5ae98a){_0x5499fd['push'](_0x5499fd['shift']());}}}(a24_0x4933,0x762cf));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';function a24_0x4933(){const _0x2eb98c=['Custom\x20platform\x20API\x20HTTPS\x20origin','1320030OruSwe','validation','Custom\x20Runtime\x20HTTPS\x20origin','672iuWEca','Select\x20Lovrabet\x20region','map','label','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','keys','Official\x20Lovrabet\x20region:\x20','routing','string','Custom\x20KB\x20Service\x20HTTPS\x20origin','api-domain','4768soyhTW','9222598KEjuLf','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','assign','399purIYA','929rYqred','region','Available\x20regions:\x20','kb-service-domain','domains','8560igmeQi','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','mode','Independent-deployment\x20Domain\x20JSON\x20file','3983oaLNOu','config','write','name','enterprise-v1','121194OxwdVE','14576onZwBc','str','manifestDomains','916BlGHWQ','ExitPromptError','join','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','cancelled','\x22\x20is\x20not\x20currently\x20available.','official'];a24_0x4933=function(){return _0x2eb98c;};return a24_0x4933();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':'string','description':a24_0xf7444e(0x129)},{'name':'user-domain','type':a24_0xf7444e(0x119),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a24_0xf7444e(0x11b),'type':a24_0xf7444e(0x119),'description':a24_0xf7444e(0x13a)},{'name':'runtime-domain','type':a24_0xf7444e(0x119),'description':a24_0xf7444e(0x13d)},{'name':'skill-domain','type':'string','description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a24_0xf7444e(0x124),'type':a24_0xf7444e(0x119),'description':a24_0xf7444e(0x11a)}];export const configInitFlags=[{'name':'region','type':a24_0xf7444e(0x119),'description':a24_0xf7444e(0x144)+ENABLED_LOVRABET_REGION_VALUES[a24_0xf7444e(0x135)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x16e2be){const _0x35cf82=a24_0xf7444e,_0xde8168=_0x16e2be[_0x35cf82(0x131)](_0x35cf82(0x122));if(_0xde8168){if(!isEnabledLovrabetRegion(_0xde8168))throw CliErrors[_0x35cf82(0x13c)]('Region\x20\x22'+_0xde8168+_0x35cf82(0x138),_0x35cf82(0x123)+ENABLED_LOVRABET_REGION_VALUES[_0x35cf82(0x135)](',\x20'));return _0xde8168;}if(_0x16e2be['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x35cf82(0x13f),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x35cf82(0x140)](_0x165613=>({'name':OFFICIAL_ROUTING_PROFILES[_0x165613][_0x35cf82(0x141)]+'\x20('+_0x165613+')','value':_0x165613}))});}catch(_0x5824b4){if(_0x5824b4?.[_0x35cf82(0x12d)]===_0x35cf82(0x134))throw CliErrors[_0x35cf82(0x137)]();throw _0x5824b4;}}export async function executeConfigInit(_0x54d808){const _0x16c182=a24_0xf7444e,_0x5b8196=resolveDomainConfigInput(_0x54d808),_0x4bcae8=_0x5b8196[_0x16c182(0x125)],_0x4dcab1=Object['keys'](_0x4bcae8)['length']>0x0;if(_0x4dcab1&&_0x54d808['str'](_0x16c182(0x122)))throw CliErrors[_0x16c182(0x13c)](_0x16c182(0x136));const _0x2b2a86={'global':!![]},_0x1e2368=readScopedConfig(_0x2b2a86);for(const _0x5dd336 of DOMAIN_CONFIG_FIELDS)delete _0x1e2368[_0x5dd336];for(const _0x126395 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1e2368[_0x126395];delete _0x1e2368[_0x16c182(0x145)];let _0x5d981b=null;if(_0x4dcab1)delete _0x1e2368[_0x16c182(0x122)],_0x5b8196[_0x16c182(0x128)]===_0x16c182(0x12e)?_0x1e2368['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x5b8196[_0x16c182(0x132)]}:Object[_0x16c182(0x11f)](_0x1e2368,_0x4bcae8);else{_0x5d981b=await resolveRegion(_0x54d808);if(_0x5d981b===DEFAULT_LOVRABET_REGION)delete _0x1e2368[_0x16c182(0x122)];else _0x1e2368['region']=_0x5d981b;}return writeScopedConfig(_0x1e2368,_0x2b2a86),{'ok':!![],'message':_0x4dcab1?'Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x16c182(0x143)](_0x5b8196[_0x16c182(0x128)]===_0x16c182(0x12e)?_0x5b8196[_0x16c182(0x132)]:_0x4bcae8)[_0x16c182(0x135)](',\x20')+'.':_0x16c182(0x11e)+_0x5d981b+'.','data':{'mode':_0x4dcab1?'independent':_0x16c182(0x139),'protocol':_0x5b8196[_0x16c182(0x128)]===_0x16c182(0x12e)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5d981b,'domains':_0x4bcae8}};}export const configInitDefinition={'service':a24_0xf7444e(0x12b),'command':'init','description':a24_0xf7444e(0x127),'risk':a24_0xf7444e(0x12c),'confirmationDescription':a24_0xf7444e(0x142),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
@@ -1 +1 @@
1
- function a25_0x1b5b(){var _0x26c2a7=['1598044dvQXbC','15227550wHTZPL','149298Rmachm','8cGeZdx','472941pbPOUL','160rdNwEf','12052390FtZCKz','2Ntbjge','9530486aRHlAr','3420240wBnwgq','33yfOGzI'];a25_0x1b5b=function(){return _0x26c2a7;};return a25_0x1b5b();}(function(_0x2a11cc,_0x43cbe8){var _0x4bef61=a25_0x29c9,_0x486c32=_0x2a11cc();while(!![]){try{var _0x4ac35a=parseInt(_0x4bef61(0x1f1))/0x1*(parseInt(_0x4bef61(0x1ea))/0x2)+-parseInt(_0x4bef61(0x1ee))/0x3+parseInt(_0x4bef61(0x1e8))/0x4+parseInt(_0x4bef61(0x1ef))/0x5*(-parseInt(_0x4bef61(0x1ec))/0x6)+parseInt(_0x4bef61(0x1f2))/0x7*(parseInt(_0x4bef61(0x1ed))/0x8)+parseInt(_0x4bef61(0x1eb))/0x9+parseInt(_0x4bef61(0x1f0))/0xa*(-parseInt(_0x4bef61(0x1e9))/0xb);if(_0x4ac35a===_0x43cbe8)break;else _0x486c32['push'](_0x486c32['shift']());}catch(_0x38589e){_0x486c32['push'](_0x486c32['shift']());}}}(a25_0x1b5b,0xe4be4));function a25_0x29c9(_0x183519,_0x1af769){_0x183519=_0x183519-0x1e8;var _0x1b5bdf=a25_0x1b5b();var _0x29c964=_0x1b5bdf[_0x183519];return _0x29c964;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
1
+ (function(_0x36dabf,_0x309494){var _0x5041fa=a25_0x48ea,_0x2b1d5b=_0x36dabf();while(!![]){try{var _0x113d8b=-parseInt(_0x5041fa(0x77))/0x1*(parseInt(_0x5041fa(0x71))/0x2)+-parseInt(_0x5041fa(0x72))/0x3*(parseInt(_0x5041fa(0x6d))/0x4)+parseInt(_0x5041fa(0x70))/0x5+parseInt(_0x5041fa(0x6e))/0x6+parseInt(_0x5041fa(0x6f))/0x7+parseInt(_0x5041fa(0x73))/0x8*(parseInt(_0x5041fa(0x74))/0x9)+-parseInt(_0x5041fa(0x76))/0xa*(parseInt(_0x5041fa(0x75))/0xb);if(_0x113d8b===_0x309494)break;else _0x2b1d5b['push'](_0x2b1d5b['shift']());}catch(_0x2f68f1){_0x2b1d5b['push'](_0x2b1d5b['shift']());}}}(a25_0x39d9,0xd6e21));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a25_0x39d9(){var _0x5a740b=['36epXUmF','1666998eIGVRb','9468725MtOeci','1487530rRsCbM','34222SuBrFw','359364iUicCn','10620488lSDPxm','9yRSGNz','1221zvhPFQ','50590SBTAWX','43KzxVkv'];a25_0x39d9=function(){return _0x5a740b;};return a25_0x39d9();}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a25_0x48ea(_0x56aca0,_0xfdd93f){_0x56aca0=_0x56aca0-0x6d;var _0x39d973=a25_0x39d9();var _0x48ea79=_0x39d973[_0x56aca0];return _0x48ea79;}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 +1 @@
1
- const a26_0x43e41a=a26_0x2e85;(function(_0x59ef2e,_0x503371){const _0x7c337b=a26_0x2e85,_0x1932b1=_0x59ef2e();while(!![]){try{const _0x965b70=-parseInt(_0x7c337b(0x95))/0x1+parseInt(_0x7c337b(0x9e))/0x2+parseInt(_0x7c337b(0xb0))/0x3*(parseInt(_0x7c337b(0x72))/0x4)+-parseInt(_0x7c337b(0xa3))/0x5*(-parseInt(_0x7c337b(0xae))/0x6)+-parseInt(_0x7c337b(0x9d))/0x7+-parseInt(_0x7c337b(0x8d))/0x8+parseInt(_0x7c337b(0x90))/0x9;if(_0x965b70===_0x503371)break;else _0x1932b1['push'](_0x1932b1['shift']());}catch(_0x39a1e6){_0x1932b1['push'](_0x1932b1['shift']());}}}(a26_0x5747,0xd64c4));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';function a26_0x2e85(_0x4a2139,_0x5ae63b){_0x4a2139=_0x4a2139-0x64;const _0x57472c=a26_0x5747();let _0x2e85ff=_0x57472c[_0x4a2139];return _0x2e85ff;}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_0x5747(){const _0x313980=['values','isInteger','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','\x20records.','string','report','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','\x20--code\x20','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','str','60ZsbspT','errors','291qhrVOL','.import-checkpoint.json','succeeded','batch-size','batchSize','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','/import-batch','Maximum\x20records\x20per\x20request\x20(1..500)','file','toString','resume','length','Mapping\x20file\x20exceeds\x201\x20MB.','appCode','sheet','.lock','number','max','invalid','mapping','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','Excel\x20import\x20failed.','68528bxHmNR','Excel\x20contains\x20','schemaFingerprint','maxBatchSize','rows','validation','code','size','Imported\x20and\x20verified\x20','message','write','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','imageFields','warnings','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','See\x20','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','\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.','reduce','media','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','all','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','emptyRows','checkpoint','rowNumber','mappingFile','3345256xsUlBH','schemaVersion','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','11321208rBtTOw','--file\x20and\x20--mapping\x20are\x20required.','utf8','1-based\x20Excel\x20header\x20row','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','1115482wpzCNg','data','some','num','/client/','isArray','METADATA','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','9435825TOXGFu','532884dVjgUG','.import-report.json','map','header-row','.lock.recovery','286610yfJZYX'];a26_0x5747=function(){return _0x313980;};return a26_0x5747();}function input(_0x44c57f){const _0x42a42c=a26_0x2e85,_0xe18c38=_0x44c57f['str']('file'),_0x15d982=_0x44c57f['str'](_0x42a42c(0x6e));if(!_0xe18c38||!_0x15d982)throw CliErrors[_0x42a42c(0x77)](_0x42a42c(0x91));const _0x5243ac=_0x44c57f['num']('header-row',0x1),_0x1c393d=_0x44c57f[_0x42a42c(0x98)](_0x42a42c(0xb3),0x1f4);if(!Number[_0x42a42c(0xa5)](_0x5243ac)||_0x5243ac<0x1||!Number[_0x42a42c(0xa5)](_0x1c393d)||_0x1c393d<0x1||_0x1c393d>0x1f4)throw CliErrors[_0x42a42c(0x77)](_0x42a42c(0x80));const _0x38935f=resolve(_0x44c57f['str']('checkpoint')||_0xe18c38+_0x42a42c(0xb1)),_0x48cb5f=resolve(_0x44c57f['str'](_0x42a42c(0xa9))||_0xe18c38+_0x42a42c(0x9f)),_0x4cd13b=[resolve(_0xe18c38),resolve(_0x15d982),_0x38935f,_0x48cb5f];if(new Set(_0x4cd13b)[_0x42a42c(0x79)]!==_0x4cd13b[_0x42a42c(0x66)])throw CliErrors[_0x42a42c(0x77)](_0x42a42c(0xaa));return{'file':resolve(_0xe18c38),'mappingFile':resolve(_0x15d982),'headerRow':_0x5243ac,'batchSize':_0x1c393d,'checkpoint':_0x38935f,'report':_0x48cb5f,'sheet':_0x44c57f[_0x42a42c(0xad)](_0x42a42c(0x69))||undefined,'resume':_0x44c57f['bool'](_0x42a42c(0x65))};}async function prepare(_0x1147e0){const _0x5940be=a26_0x2e85,_0x3b14e0=input(_0x1147e0),_0x570d49=_0x1147e0[_0x5940be(0xad)](_0x5940be(0x78));[_0x3b14e0[_0x5940be(0xb8)],_0x3b14e0[_0x5940be(0x8c)],_0x3b14e0['checkpoint'],_0x3b14e0[_0x5940be(0xa9)]]=await Promise[_0x5940be(0x87)]([realpath(_0x3b14e0['file']),realpath(_0x3b14e0[_0x5940be(0x8c)]),resolveImportOutputPath(_0x3b14e0[_0x5940be(0x8a)]),resolveImportOutputPath(_0x3b14e0['report'])]),assertImportPaths(_0x3b14e0[_0x5940be(0x8a)],_0x3b14e0[_0x5940be(0xa9)],[_0x3b14e0[_0x5940be(0xb8)],_0x3b14e0[_0x5940be(0x8c)]]);let _0x572697;const _0x46ca3e=await readFile(_0x3b14e0[_0x5940be(0x8c)]);if(_0x46ca3e['length']>0x400*0x400)throw CliErrors[_0x5940be(0x77)](_0x5940be(0x67));try{_0x572697=JSON['parse'](_0x46ca3e[_0x5940be(0x64)](_0x5940be(0x92)));}catch{throw CliErrors[_0x5940be(0x77)](_0x5940be(0xb5));}if(!_0x572697||typeof _0x572697!=='object'||Array[_0x5940be(0x9a)](_0x572697)||Object[_0x5940be(0xa4)](_0x572697)[_0x5940be(0x97)](_0x58f199=>typeof _0x58f199!==_0x5940be(0xa8)))throw CliErrors[_0x5940be(0x77)](_0x5940be(0x9c));const _0x3958d9=await getDatasetDetail(_0x570d49),_0x1a4e26=assertDatasetImportTarget(_0x3958d9,_0x1147e0[_0x5940be(0x68)],_0x570d49);if(_0x1a4e26==='DB_TABLE')throw CliErrors[_0x5940be(0x77)](_0x5940be(0x94),_0x5940be(0x86)+_0x570d49+'.\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'+_0x1147e0[_0x5940be(0x68)]+_0x5940be(0xab)+_0x570d49+_0x5940be(0x83));if(_0x1a4e26!==_0x5940be(0x9b))throw CliErrors[_0x5940be(0x77)](_0x5940be(0x7d),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x2ed75b=await buildExcelManifest({..._0x3b14e0,'mapping':_0x572697,'fields':normalizeImportFields(_0x3958d9)}),_0xbad30d=await getDatasetImportContract(_0x1147e0['appCode'],_0x570d49);assertImportContract(_0xbad30d,_0x1147e0[_0x5940be(0x68)],_0x570d49),assertImageImportCapability(_0xbad30d,_0x2ed75b);if(_0x2ed75b[_0x5940be(0x7e)]?.[_0x5940be(0x66)]){const _0x43cc34=await resolveImportOutputPath(_0x3b14e0[_0x5940be(0x8a)]+'.rows.json'),_0x5b54a0=await Promise[_0x5940be(0x87)]([_0x43cc34,_0x43cc34+_0x5940be(0x6a),_0x43cc34+_0x5940be(0xa2),_0x3b14e0[_0x5940be(0x8a)]+_0x5940be(0x6a),_0x3b14e0[_0x5940be(0x8a)]+_0x5940be(0xa2)][_0x5940be(0xa0)](resolveImportOutputPath));assertImportPaths(_0x3b14e0[_0x5940be(0x8a)],_0x3b14e0['report'],[_0x3b14e0['file'],_0x3b14e0[_0x5940be(0x8c)],..._0x5b54a0['slice'](0x0,0x3)]);}if(_0x3b14e0[_0x5940be(0xb4)]>_0xbad30d[_0x5940be(0x75)])throw CliErrors[_0x5940be(0x77)]('Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.');return{'args':_0x3b14e0,'manifest':_0x2ed75b,'contract':_0xbad30d,'code':_0x570d49};}async function checked(_0x1680a6){const _0x306839=a26_0x2e85;try{return await _0x1680a6();}catch(_0x335bcf){if(_0x335bcf instanceof CliError)throw _0x335bcf;throw CliErrors[_0x306839(0x77)](_0x335bcf[_0x306839(0x7b)]||_0x306839(0x71));}}export const dataImportExcel={'service':a26_0x43e41a(0x96),'command':'import-excel','risk':a26_0x43e41a(0x7c),'description':'Import\x20one\x20XLSX\x20worksheet\x20into\x20METADATA\x20with\x20checkpoint\x20recovery.\x20DB_TABLE\x20uses\x20lovrabet\x20data\x20batchCreate\x20after\x20mapping\x20and\x20validation;\x20that\x20route\x20has\x20no\x20import\x20checkpoint\x20or\x20--resume.','confirmationDescription':a26_0x43e41a(0x82),'flags':[CODE_FLAG,{'name':a26_0x43e41a(0xb8),'type':a26_0x43e41a(0xa8),'required':!![],'description':a26_0x43e41a(0x6f)},{'name':a26_0x43e41a(0x6e),'type':'string','required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':'sheet','type':a26_0x43e41a(0xa8),'description':'Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)'},{'name':a26_0x43e41a(0xa1),'type':a26_0x43e41a(0x6b),'default':0x1,'description':a26_0x43e41a(0x93)},{'name':a26_0x43e41a(0xb3),'type':a26_0x43e41a(0x6b),'default':0x1f4,'description':a26_0x43e41a(0xb7)},{'name':a26_0x43e41a(0x8a),'type':'string','description':a26_0x43e41a(0x8f)},{'name':a26_0x43e41a(0xa9),'type':a26_0x43e41a(0xa8),'description':a26_0x43e41a(0xa6)},{'name':a26_0x43e41a(0x65),'type':'boolean','description':a26_0x43e41a(0x70)}],'validate':async _0x4ffffd=>{input(_0x4ffffd);},'dryRun':async _0x43f6aa=>checked(async()=>{const _0x1f5920=a26_0x43e41a,{args:_0x3432dd,manifest:_0x521c1c,contract:_0x3f9318,code:_0x3965c2}=await prepare(_0x43f6aa),_0x59cee5=new Set(_0x521c1c[_0x1f5920(0xaf)][_0x1f5920(0xa0)](_0x26c921=>_0x26c921[_0x1f5920(0x8b)]))['size'];return{'method':'POST','url':_0x1f5920(0x99)+encodeURIComponent(_0x43f6aa[_0x1f5920(0x68)])+'/'+encodeURIComponent(_0x3965c2)+_0x1f5920(0xb6),'description':_0x1f5920(0x88),'body':{'schemaFingerprint':_0x3f9318['schemaFingerprint']},'validRows':Math[_0x1f5920(0x6c)](0x0,_0x521c1c[_0x1f5920(0x76)][_0x1f5920(0x66)]-_0x59cee5),'invalidRows':_0x59cee5,'invalidCells':_0x521c1c[_0x1f5920(0xaf)][_0x1f5920(0x66)],'emptyRows':_0x521c1c[_0x1f5920(0x89)]['length'],'expectedBatches':previewImportBatchCount(_0x521c1c,_0x3f9318,_0x3432dd[_0x1f5920(0xb4)]),'imageCount':_0x521c1c['imageCells']?.[_0x1f5920(0x84)]((_0x420d00,_0x25ac95)=>_0x420d00+_0x25ac95['hashes'][_0x1f5920(0x66)],0x0)??0x0,'uniqueImages':_0x521c1c[_0x1f5920(0x85)]?.[_0x1f5920(0x66)]??0x0,'uniqueImageBytes':_0x521c1c[_0x1f5920(0x85)]?.[_0x1f5920(0x84)]((_0x2722cd,_0x27c205)=>_0x2722cd+_0x27c205[_0x1f5920(0x79)],0x0)??0x0,'errors':_0x521c1c[_0x1f5920(0xaf)],'warnings':_0x521c1c[_0x1f5920(0x7f)],'sheet':_0x521c1c[_0x1f5920(0x69)],'checkpoint':_0x3432dd[_0x1f5920(0x8a)],'report':_0x3432dd[_0x1f5920(0xa9)]};}),'execute':async _0x112d75=>checked(async()=>{const _0x47a8be=a26_0x43e41a,{args:_0x45cecf,manifest:_0x292a12,contract:_0x41353e,code:_0x85ebbd}=await prepare(_0x112d75);if(_0x292a12[_0x47a8be(0xaf)]['length']){await saveImportJson(_0x45cecf[_0x47a8be(0xa9)],{'status':_0x47a8be(0x6d),'sourceRows':_0x292a12['rows'][_0x47a8be(0x66)],'errors':_0x292a12[_0x47a8be(0xaf)],'emptyRows':_0x292a12[_0x47a8be(0x89)],'warnings':_0x292a12[_0x47a8be(0x7f)]});throw CliErrors['validation'](_0x47a8be(0x73)+_0x292a12[_0x47a8be(0xaf)][_0x47a8be(0x66)]+_0x47a8be(0xac),_0x47a8be(0x81)+_0x45cecf[_0x47a8be(0xa9)]+'.');}const _0x35a301=_0x292a12[_0x47a8be(0x7e)]?.['length']?runImageExcelImport:_0x41353e[_0x47a8be(0x8e)]===0x2?runAutoIdExcelImport:runExcelImport,_0x1905b5=await _0x35a301({..._0x45cecf,'manifest':_0x292a12,'contract':_0x41353e,'appCode':_0x112d75[_0x47a8be(0x68)],'datasetCode':_0x85ebbd,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x45cecf[_0x47a8be(0xb8)],_0x45cecf[_0x47a8be(0x8c)]],'imageApi':{'upload':(_0x1a7c1b,_0x19cbc4)=>uploadDatasetImportImage(_0x112d75['appCode'],_0x85ebbd,_0x1a7c1b,_0x19cbc4),'readback':(_0x2cb405,_0x15f1c7)=>readDatasetImportImage(_0x112d75[_0x47a8be(0x68)],_0x85ebbd,_0x2cb405,_0x15f1c7)},'api':{'write':(_0x478d42,_0x5a425a)=>createDatasetImportBatch(_0x112d75[_0x47a8be(0x68)],_0x85ebbd,{'schemaFingerprint':_0x41353e[_0x47a8be(0x74)],'items':_0x478d42,..._0x5a425a===undefined?{}:{'taskId':_0x5a425a}}),'readback':_0x1a0def=>readDatasetImportRows(_0x112d75[_0x47a8be(0x68)],_0x85ebbd,_0x1a0def),'readTask':_0x7eb45b=>readDatasetImportTaskRows(_0x112d75[_0x47a8be(0x68)],_0x85ebbd,_0x7eb45b)}});return{'ok':!![],'data':_0x1905b5,'message':_0x47a8be(0x7a)+_0x1905b5[_0x47a8be(0xb2)]+_0x47a8be(0xa7)};})};
1
+ const a26_0x4939d1=a26_0x3ede;(function(_0x1e86f6,_0x123d33){const _0x210d49=a26_0x3ede,_0x33e4f1=_0x1e86f6();while(!![]){try{const _0x55dc50=parseInt(_0x210d49(0x219))/0x1+-parseInt(_0x210d49(0x1f8))/0x2*(-parseInt(_0x210d49(0x20f))/0x3)+parseInt(_0x210d49(0x1d1))/0x4*(-parseInt(_0x210d49(0x1d0))/0x5)+-parseInt(_0x210d49(0x1e4))/0x6+parseInt(_0x210d49(0x1ed))/0x7*(parseInt(_0x210d49(0x1c7))/0x8)+parseInt(_0x210d49(0x1f2))/0x9*(parseInt(_0x210d49(0x1e6))/0xa)+-parseInt(_0x210d49(0x1db))/0xb;if(_0x55dc50===_0x123d33)break;else _0x33e4f1['push'](_0x33e4f1['shift']());}catch(_0x1da6d6){_0x33e4f1['push'](_0x33e4f1['shift']());}}}(a26_0x1cbe,0x39b7c));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';function a26_0x3ede(_0x5b6244,_0x56922a){_0x5b6244=_0x5b6244-0x1c6;const _0x1cbe49=a26_0x1cbe();let _0x3edee1=_0x1cbe49[_0x5b6244];return _0x3edee1;}import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';function a26_0x1cbe(){const _0x32027e=['27fxGogE','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','data','code','report','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','88vcdYwf','--file\x20and\x20--mapping\x20are\x20required.','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','length','.\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','mapping','boolean','resume','utf8','str','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','write','checkpoint','\x20records.','Excel\x20import\x20failed.','hashes','\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.','isInteger','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','values','schemaFingerprint','import-excel','message','16530ereIeI','sheet','header-row','imageFields','appCode','invalid','See\x20','\x20--code\x20','succeeded','object','354318cJaOok','Mapping\x20file\x20exceeds\x201\x20MB.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','num','rows','667648KPTfoN','batch-size','batchSize','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','emptyRows','size','some','schemaVersion','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','114890xnTdXq','36drPJuF','.rows.json','number','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','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.','rowNumber','Imported\x20and\x20verified\x20','validation','file','maxBatchSize','3993891JSwUEN','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','.lock.recovery','string','reduce','max','warnings','isArray','slice','1474596bnBOVk','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','1239490vyEfFp','mappingFile','map','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','/client/','media','bool','7ThRQOt','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','Maximum\x20records\x20per\x20request\x20(1..500)','.lock','errors'];a26_0x1cbe=function(){return _0x32027e;};return a26_0x1cbe();}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 input(_0x3886cf){const _0x1f9228=a26_0x3ede,_0x438384=_0x3886cf[_0x1f9228(0x201)](_0x1f9228(0x1d9)),_0x2a4f83=_0x3886cf[_0x1f9228(0x201)](_0x1f9228(0x1fd));if(!_0x438384||!_0x2a4f83)throw CliErrors['validation'](_0x1f9228(0x1f9));const _0x37a644=_0x3886cf[_0x1f9228(0x21e)](_0x1f9228(0x211),0x1),_0x54aece=_0x3886cf['num'](_0x1f9228(0x1c8),0x1f4);if(!Number[_0x1f9228(0x209)](_0x37a644)||_0x37a644<0x1||!Number[_0x1f9228(0x209)](_0x54aece)||_0x54aece<0x1||_0x54aece>0x1f4)throw CliErrors['validation'](_0x1f9228(0x202));const _0x428023=resolve(_0x3886cf[_0x1f9228(0x201)](_0x1f9228(0x204))||_0x438384+'.import-checkpoint.json'),_0x3e0070=resolve(_0x3886cf['str'](_0x1f9228(0x1f6))||_0x438384+'.import-report.json'),_0x59c9f8=[resolve(_0x438384),resolve(_0x2a4f83),_0x428023,_0x3e0070];if(new Set(_0x59c9f8)[_0x1f9228(0x1cc)]!==_0x59c9f8['length'])throw CliErrors['validation'](_0x1f9228(0x1e5));return{'file':resolve(_0x438384),'mappingFile':resolve(_0x2a4f83),'headerRow':_0x37a644,'batchSize':_0x54aece,'checkpoint':_0x428023,'report':_0x3e0070,'sheet':_0x3886cf[_0x1f9228(0x201)](_0x1f9228(0x210))||undefined,'resume':_0x3886cf[_0x1f9228(0x1ec)](_0x1f9228(0x1ff))};}async function prepare(_0x3fc49c){const _0xe46be2=a26_0x3ede,_0x54981a=input(_0x3fc49c),_0x37e58c=_0x3fc49c[_0xe46be2(0x201)](_0xe46be2(0x1f5));[_0x54981a[_0xe46be2(0x1d9)],_0x54981a['mappingFile'],_0x54981a[_0xe46be2(0x204)],_0x54981a[_0xe46be2(0x1f6)]]=await Promise['all']([realpath(_0x54981a[_0xe46be2(0x1d9)]),realpath(_0x54981a[_0xe46be2(0x1e7)]),resolveImportOutputPath(_0x54981a['checkpoint']),resolveImportOutputPath(_0x54981a[_0xe46be2(0x1f6)])]),assertImportPaths(_0x54981a[_0xe46be2(0x204)],_0x54981a[_0xe46be2(0x1f6)],[_0x54981a[_0xe46be2(0x1d9)],_0x54981a[_0xe46be2(0x1e7)]]);let _0x50d9fe;const _0x49a444=await readFile(_0x54981a[_0xe46be2(0x1e7)]);if(_0x49a444[_0xe46be2(0x1fb)]>0x400*0x400)throw CliErrors[_0xe46be2(0x1d8)](_0xe46be2(0x21a));try{_0x50d9fe=JSON['parse'](_0x49a444['toString'](_0xe46be2(0x200)));}catch{throw CliErrors[_0xe46be2(0x1d8)](_0xe46be2(0x21d));}if(!_0x50d9fe||typeof _0x50d9fe!==_0xe46be2(0x218)||Array[_0xe46be2(0x1e2)](_0x50d9fe)||Object[_0xe46be2(0x20b)](_0x50d9fe)[_0xe46be2(0x1cd)](_0x5850f0=>typeof _0x5850f0!==_0xe46be2(0x1de)))throw CliErrors[_0xe46be2(0x1d8)](_0xe46be2(0x1ca));const _0x12f791=await getDatasetDetail(_0x37e58c),_0x521d72=assertDatasetImportTarget(_0x12f791,_0x3fc49c[_0xe46be2(0x213)],_0x37e58c);if(_0x521d72==='DB_TABLE')throw CliErrors['validation'](_0xe46be2(0x21c),_0xe46be2(0x1dc)+_0x37e58c+_0xe46be2(0x1fc)+_0x3fc49c[_0xe46be2(0x213)]+_0xe46be2(0x216)+_0x37e58c+_0xe46be2(0x208));if(_0x521d72!=='METADATA')throw CliErrors[_0xe46be2(0x1d8)]('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x987dd8=await buildExcelManifest({..._0x54981a,'mapping':_0x50d9fe,'fields':normalizeImportFields(_0x12f791)}),_0x57d053=await getDatasetImportContract(_0x3fc49c[_0xe46be2(0x213)],_0x37e58c);assertImportContract(_0x57d053,_0x3fc49c[_0xe46be2(0x213)],_0x37e58c),assertImageImportCapability(_0x57d053,_0x987dd8);if(_0x987dd8[_0xe46be2(0x212)]?.[_0xe46be2(0x1fb)]){const _0x2a9b4e=await resolveImportOutputPath(_0x54981a[_0xe46be2(0x204)]+_0xe46be2(0x1d2)),_0x2a01c7=await Promise['all']([_0x2a9b4e,_0x2a9b4e+_0xe46be2(0x1f0),_0x2a9b4e+_0xe46be2(0x1dd),_0x54981a[_0xe46be2(0x204)]+'.lock',_0x54981a['checkpoint']+_0xe46be2(0x1dd)][_0xe46be2(0x1e8)](resolveImportOutputPath));assertImportPaths(_0x54981a['checkpoint'],_0x54981a[_0xe46be2(0x1f6)],[_0x54981a[_0xe46be2(0x1d9)],_0x54981a[_0xe46be2(0x1e7)],..._0x2a01c7[_0xe46be2(0x1e3)](0x0,0x3)]);}if(_0x54981a[_0xe46be2(0x1c9)]>_0x57d053[_0xe46be2(0x1da)])throw CliErrors[_0xe46be2(0x1d8)](_0xe46be2(0x1fa));return{'args':_0x54981a,'manifest':_0x987dd8,'contract':_0x57d053,'code':_0x37e58c};}async function checked(_0xd52565){const _0xac09c1=a26_0x3ede;try{return await _0xd52565();}catch(_0x51875a){if(_0x51875a instanceof CliError)throw _0x51875a;throw CliErrors[_0xac09c1(0x1d8)](_0x51875a[_0xac09c1(0x20e)]||_0xac09c1(0x206));}}export const dataImportExcel={'service':a26_0x4939d1(0x1f4),'command':a26_0x4939d1(0x20d),'risk':a26_0x4939d1(0x203),'description':a26_0x4939d1(0x1d5),'confirmationDescription':a26_0x4939d1(0x1cf),'flags':[CODE_FLAG,{'name':a26_0x4939d1(0x1d9),'type':a26_0x4939d1(0x1de),'required':!![],'description':a26_0x4939d1(0x1f7)},{'name':a26_0x4939d1(0x1fd),'type':'string','required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x4939d1(0x210),'type':a26_0x4939d1(0x1de),'description':a26_0x4939d1(0x21b)},{'name':a26_0x4939d1(0x211),'type':a26_0x4939d1(0x1d3),'default':0x1,'description':'1-based\x20Excel\x20header\x20row'},{'name':a26_0x4939d1(0x1c8),'type':'number','default':0x1f4,'description':a26_0x4939d1(0x1ef)},{'name':a26_0x4939d1(0x204),'type':'string','description':a26_0x4939d1(0x1f3)},{'name':a26_0x4939d1(0x1f6),'type':a26_0x4939d1(0x1de),'description':a26_0x4939d1(0x20a)},{'name':a26_0x4939d1(0x1ff),'type':a26_0x4939d1(0x1fe),'description':a26_0x4939d1(0x1ee)}],'validate':async _0x96133a=>{input(_0x96133a);},'dryRun':async _0x297e98=>checked(async()=>{const _0x4a6ff5=a26_0x4939d1,{args:_0x3b35b6,manifest:_0x38719d,contract:_0x595ef7,code:_0x3e7285}=await prepare(_0x297e98),_0x382f47=new Set(_0x38719d[_0x4a6ff5(0x1f1)][_0x4a6ff5(0x1e8)](_0x5a649f=>_0x5a649f[_0x4a6ff5(0x1d6)]))[_0x4a6ff5(0x1cc)];return{'method':'POST','url':_0x4a6ff5(0x1ea)+encodeURIComponent(_0x297e98[_0x4a6ff5(0x213)])+'/'+encodeURIComponent(_0x3e7285)+'/import-batch','description':_0x4a6ff5(0x1d4),'body':{'schemaFingerprint':_0x595ef7[_0x4a6ff5(0x20c)]},'validRows':Math[_0x4a6ff5(0x1e0)](0x0,_0x38719d[_0x4a6ff5(0x1c6)][_0x4a6ff5(0x1fb)]-_0x382f47),'invalidRows':_0x382f47,'invalidCells':_0x38719d[_0x4a6ff5(0x1f1)][_0x4a6ff5(0x1fb)],'emptyRows':_0x38719d[_0x4a6ff5(0x1cb)][_0x4a6ff5(0x1fb)],'expectedBatches':previewImportBatchCount(_0x38719d,_0x595ef7,_0x3b35b6[_0x4a6ff5(0x1c9)]),'imageCount':_0x38719d['imageCells']?.[_0x4a6ff5(0x1df)]((_0x5b9603,_0x4e2688)=>_0x5b9603+_0x4e2688[_0x4a6ff5(0x207)][_0x4a6ff5(0x1fb)],0x0)??0x0,'uniqueImages':_0x38719d[_0x4a6ff5(0x1eb)]?.[_0x4a6ff5(0x1fb)]??0x0,'uniqueImageBytes':_0x38719d[_0x4a6ff5(0x1eb)]?.['reduce']((_0x515652,_0x4083c1)=>_0x515652+_0x4083c1[_0x4a6ff5(0x1cc)],0x0)??0x0,'errors':_0x38719d[_0x4a6ff5(0x1f1)],'warnings':_0x38719d['warnings'],'sheet':_0x38719d['sheet'],'checkpoint':_0x3b35b6['checkpoint'],'report':_0x3b35b6[_0x4a6ff5(0x1f6)]};}),'execute':async _0x72f7e3=>checked(async()=>{const _0x462787=a26_0x4939d1,{args:_0xdd4ebe,manifest:_0xedfb52,contract:_0x547f82,code:_0x4f7017}=await prepare(_0x72f7e3);if(_0xedfb52[_0x462787(0x1f1)][_0x462787(0x1fb)]){await saveImportJson(_0xdd4ebe[_0x462787(0x1f6)],{'status':_0x462787(0x214),'sourceRows':_0xedfb52[_0x462787(0x1c6)][_0x462787(0x1fb)],'errors':_0xedfb52[_0x462787(0x1f1)],'emptyRows':_0xedfb52[_0x462787(0x1cb)],'warnings':_0xedfb52[_0x462787(0x1e1)]});throw CliErrors['validation']('Excel\x20contains\x20'+_0xedfb52[_0x462787(0x1f1)][_0x462787(0x1fb)]+_0x462787(0x1e9),_0x462787(0x215)+_0xdd4ebe['report']+'.');}const _0x325756=_0xedfb52['imageFields']?.[_0x462787(0x1fb)]?runImageExcelImport:_0x547f82[_0x462787(0x1ce)]===0x2?runAutoIdExcelImport:runExcelImport,_0x29a4e8=await _0x325756({..._0xdd4ebe,'manifest':_0xedfb52,'contract':_0x547f82,'appCode':_0x72f7e3['appCode'],'datasetCode':_0x4f7017,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0xdd4ebe[_0x462787(0x1d9)],_0xdd4ebe[_0x462787(0x1e7)]],'imageApi':{'upload':(_0xfd5c5,_0x1ddd91)=>uploadDatasetImportImage(_0x72f7e3['appCode'],_0x4f7017,_0xfd5c5,_0x1ddd91),'readback':(_0x1afe93,_0x25caf2)=>readDatasetImportImage(_0x72f7e3[_0x462787(0x213)],_0x4f7017,_0x1afe93,_0x25caf2)},'api':{'write':(_0x5b1ba9,_0x4d7858)=>createDatasetImportBatch(_0x72f7e3[_0x462787(0x213)],_0x4f7017,{'schemaFingerprint':_0x547f82['schemaFingerprint'],'items':_0x5b1ba9,..._0x4d7858===undefined?{}:{'taskId':_0x4d7858}}),'readback':_0x2ed4c1=>readDatasetImportRows(_0x72f7e3[_0x462787(0x213)],_0x4f7017,_0x2ed4c1),'readTask':_0xe7911a=>readDatasetImportTaskRows(_0x72f7e3[_0x462787(0x213)],_0x4f7017,_0xe7911a)}});return{'ok':!![],'data':_0x29a4e8,'message':_0x462787(0x1d7)+_0x29a4e8[_0x462787(0x217)]+_0x462787(0x205)};})};