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

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 +33 -2
  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.d.ts +3 -3
  33. package/lib/commands/dataset/list.js +1 -1
  34. package/lib/commands/dataset/sdk-doc.js +1 -1
  35. package/lib/commands/doctor.js +1 -1
  36. package/lib/commands/file/index.js +1 -1
  37. package/lib/commands/init.js +1 -1
  38. package/lib/commands/kb/index.js +1 -1
  39. package/lib/commands/logs/index.js +1 -1
  40. package/lib/commands/notification/config-list.js +1 -1
  41. package/lib/commands/notification/index.js +1 -1
  42. package/lib/commands/notification/shared.js +1 -1
  43. package/lib/commands/ocr/index.js +1 -1
  44. package/lib/commands/permit/dataset-get.js +1 -1
  45. package/lib/commands/permit/dataset-set.js +1 -1
  46. package/lib/commands/permit/index.js +1 -1
  47. package/lib/commands/permit/page-get.js +1 -1
  48. package/lib/commands/permit/page-set.js +1 -1
  49. package/lib/commands/permit/role-menus-set.js +1 -1
  50. package/lib/commands/permit/role-menus.js +1 -1
  51. package/lib/commands/permit/shared.js +1 -1
  52. package/lib/commands/personal-bff/index.js +1 -1
  53. package/lib/commands/registry.js +1 -1
  54. package/lib/commands/role/create.js +1 -1
  55. package/lib/commands/role/delete.js +1 -1
  56. package/lib/commands/role/detail.js +1 -1
  57. package/lib/commands/role/index.js +1 -1
  58. package/lib/commands/role/list.js +1 -1
  59. package/lib/commands/role/shared.js +1 -1
  60. package/lib/commands/role/update.js +1 -1
  61. package/lib/commands/role/user-add.js +1 -1
  62. package/lib/commands/role/user-remove.js +1 -1
  63. package/lib/commands/schedule/index.js +1 -1
  64. package/lib/commands/schema.js +1 -1
  65. package/lib/commands/service/dynamic.js +1 -1
  66. package/lib/commands/service/function-name-adapter.js +1 -1
  67. package/lib/commands/service/index.js +1 -1
  68. package/lib/commands/service/registry.js +1 -1
  69. package/lib/commands/skill/commands/create.js +1 -1
  70. package/lib/commands/skill/commands/diagram.js +1 -1
  71. package/lib/commands/skill/commands/install.js +1 -1
  72. package/lib/commands/skill/commands/list.js +1 -1
  73. package/lib/commands/skill/commands/push.js +1 -1
  74. package/lib/commands/skill/commands/validate.js +1 -1
  75. package/lib/commands/skill/diagram.js +1 -1
  76. package/lib/commands/skill/flags.js +1 -1
  77. package/lib/commands/skill/index.js +1 -1
  78. package/lib/commands/skill/manifest-helpers.js +1 -1
  79. package/lib/commands/skill/push-execute.js +1 -1
  80. package/lib/commands/skill/push-flow-helpers.js +1 -1
  81. package/lib/commands/skill/push-retarget.js +1 -1
  82. package/lib/commands/skill/scopes.js +1 -1
  83. package/lib/commands/skill/summary.js +1 -1
  84. package/lib/commands/skill/templates.js +1 -1
  85. package/lib/commands/skill/validate.js +1 -1
  86. package/lib/commands/sql/detail.js +1 -1
  87. package/lib/commands/sql/exec.js +1 -1
  88. package/lib/commands/sql/index.js +1 -1
  89. package/lib/commands/update.js +1 -1
  90. package/lib/commands/user-account/bind.js +1 -1
  91. package/lib/commands/user-account/index.js +1 -1
  92. package/lib/commands/workspace/index.js +1 -1
  93. package/lib/config/domain-config.js +1 -1
  94. package/lib/config/schema.js +1 -1
  95. package/lib/constant/app.js +1 -1
  96. package/lib/constant/auth-mode.js +1 -1
  97. package/lib/constant/cli.js +1 -1
  98. package/lib/constant/defaults.js +1 -1
  99. package/lib/constant/distribution.js +1 -1
  100. package/lib/constant/domain.js +1 -1
  101. package/lib/constant/env.js +1 -1
  102. package/lib/constant/output.js +1 -1
  103. package/lib/constant/product.js +1 -1
  104. package/lib/constant/region.js +1 -1
  105. package/lib/constant/risk.js +1 -1
  106. package/lib/constant/url.js +1 -1
  107. package/lib/context.js +1 -1
  108. package/lib/core/api-client.d.ts +7 -6
  109. package/lib/core/api-client.js +1 -1
  110. package/lib/core/db-resolver.js +1 -1
  111. package/lib/core/kb-management-client.d.ts +17 -0
  112. package/lib/core/kb-management-client.js +1 -0
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.js +1 -1
  115. package/lib/errors.js +1 -1
  116. package/lib/framework/access-error.js +1 -1
  117. package/lib/framework/build-all-flags.js +1 -1
  118. package/lib/framework/dryrun.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/preparse.js +1 -1
  124. package/lib/framework/rate-limit.js +1 -1
  125. package/lib/framework/raw-flags.js +1 -1
  126. package/lib/framework/response.js +1 -1
  127. package/lib/framework/runner-confirmation.js +1 -1
  128. package/lib/framework/runner-error.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/service-order.js +1 -1
  132. package/lib/framework/types.js +1 -1
  133. package/lib/generated/build-info.d.ts +4 -4
  134. package/lib/generated/build-info.js +1 -1
  135. package/lib/generated/official-routing.js +1 -1
  136. package/lib/generated/routing-contract.js +1 -1
  137. package/lib/help.js +1 -1
  138. package/lib/postinstall.js +1 -1
  139. package/lib/runtime/confirmation.js +1 -1
  140. package/lib/runtime/event.js +1 -1
  141. package/lib/runtime/index.js +1 -1
  142. package/lib/runtime/queue.js +1 -1
  143. package/lib/runtime/resolve.js +1 -1
  144. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  145. package/lib/services/dataset-import/excel-reader.js +1 -1
  146. package/lib/services/dataset-import/image-bytes.js +1 -1
  147. package/lib/services/dataset-import/image-ooxml.js +1 -1
  148. package/lib/services/dataset-import/image-runner.js +1 -1
  149. package/lib/services/dataset-import/metadata.js +1 -1
  150. package/lib/services/dataset-import/preview.js +1 -1
  151. package/lib/services/dataset-import/runner.js +1 -1
  152. package/lib/skills/builtin-skill.js +1 -1
  153. package/lib/skills/npx-skills-add.js +1 -1
  154. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  155. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  156. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  157. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  158. package/lib/skills/runtime-skill-sync/links.js +1 -1
  159. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  160. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  161. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  162. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  163. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  164. package/lib/skills/runtime-skill-sync/push.js +1 -1
  165. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  167. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  168. package/lib/skills/runtime-skill-sync.js +1 -1
  169. package/lib/skills/skill-presence.js +1 -1
  170. package/lib/utils/access-key-redaction.js +1 -1
  171. package/lib/utils/apply-jq-filter.js +1 -1
  172. package/lib/utils/cli-version-check.js +1 -1
  173. package/lib/utils/cli-version-policy.js +1 -1
  174. package/lib/utils/logger.js +1 -1
  175. package/lib/utils/lossless-json.js +1 -1
  176. package/lib/utils/params.js +1 -1
  177. package/lib/utils/positive-safe-integer.js +1 -1
  178. package/lib/utils/redaction.js +1 -1
  179. package/lib/utils/update-notice.js +1 -1
  180. package/lib/utils/version.js +1 -1
  181. package/lib/utils/write-cli-side-channel.js +1 -1
  182. package/package.json +1 -1
  183. package/skills/lovrabet/SKILL.md +5 -3
  184. package/skills/lovrabet/guides/app-resolution.md +2 -0
  185. package/skills/lovrabet/guides/dataset-and-data-workflow.md +10 -1
  186. package/skills/lovrabet/references/dataset-discovery-workflow.md +14 -1
  187. package/skills/lovrabet/references/instant-api-workflow.md +2 -0
  188. package/skills/lovrabet/references/lovrabet-app.md +2 -0
  189. package/skills/lovrabet/references/lovrabet-kb-workflow.md +7 -3
  190. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a12_0x5534f8=a12_0x2e3d;(function(_0x282a6c,_0x5c0101){const _0x536a77=a12_0x2e3d,_0xce09ed=_0x282a6c();while(!![]){try{const _0x2c380f=-parseInt(_0x536a77(0x104))/0x1*(parseInt(_0x536a77(0x119))/0x2)+-parseInt(_0x536a77(0x133))/0x3*(-parseInt(_0x536a77(0x13b))/0x4)+parseInt(_0x536a77(0x117))/0x5*(-parseInt(_0x536a77(0x113))/0x6)+-parseInt(_0x536a77(0x10f))/0x7*(parseInt(_0x536a77(0x11c))/0x8)+-parseInt(_0x536a77(0x13d))/0x9+-parseInt(_0x536a77(0x137))/0xa+parseInt(_0x536a77(0x108))/0xb*(parseInt(_0x536a77(0x147))/0xc);if(_0x2c380f===_0x5c0101)break;else _0xce09ed['push'](_0xce09ed['shift']());}catch(_0x5f2107){_0xce09ed['push'](_0xce09ed['shift']());}}}(a12_0x12b9,0x93da5));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';function a12_0x12b9(){const _0x24cf05=['49JhTeYu','Device\x20auth\x20API\x20returned\x20HTTP\x20','name','floor','583788VaeAFR','utf8','access_key','project','5zuayQi','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','2325788VBylVZ','lovrabet-cli','/device-auth?code=','460528sQhMUW','aborted','getTime','source','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','str','Invalid\x20access_key\x20returned\x20by\x20server.','nonInteractive','once','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','stringify','randomUUID','device','string','Invalid\x20device\x20auth\x20response','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','\x20config.','signal','Device\x20auth\x20API\x20error\x20(','global','),\x20retrying...','object','toISOString','182607DFqDFj','removeListener','cancelled','stderr','10854450wkkLwa','/api/device-auth/token','code','AccessKey\x20saved\x20to\x20','4CiTjZf','data','4658940JESABI','POST','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','json','apiError','write','padStart','Verify:\x20','networkError','\x20auth\x20device','973020EDbJin','test','createdAt','\x20remaining','log','scope','Device\x20authorization\x20cancelled.','parse','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','SIGINT','Write\x20to\x20project\x20config','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','1ZFpGfX','\x0dWaiting\x20for\x20authorization...\x20','trim','validation','517Arluqo','accessKey','boolean','success','bool','abort','status'];a12_0x12b9=function(){return _0x24cf05;};return a12_0x12b9();}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';function a12_0x2e3d(_0x588c8a,_0x3c7b06){_0x588c8a=_0x588c8a-0xfe;const _0x12b945=a12_0x12b9();let _0x2e3d0b=_0x12b945[_0x588c8a];return _0x2e3d0b;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x230f8e){const _0x2ebdb9=a12_0x2e3d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x230f8e[_0x2ebdb9(0x10c)]('global'),'explicitProject':_0x230f8e['bool'](_0x2ebdb9(0x116)),'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 _0x4af76a=a12_0x2e3d;return crypto[_0x4af76a(0x127)]();}export function buildDeviceAuthUrl(_0x5f5b67,_0x6f9a40,_0x4e5098='lovrabet-cli'){const _0x1da56b=a12_0x2e3d;return _0x5f5b67+_0x1da56b(0x11b)+encodeURIComponent(_0x6f9a40)+'&source='+encodeURIComponent(_0x4e5098);}export function getDeviceCodePath(){return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+'/.device-auth';}export function readStoredDeviceCode(){const _0x21a879=a12_0x2e3d,_0x24a714=getDeviceCodePath();if(!existsSync(_0x24a714))return null;try{const _0x57d63c=readFileSync(_0x24a714,{'encoding':_0x21a879(0x114)}),_0x5e68e1=JSON[_0x21a879(0xff)](_0x57d63c);if(_0x5e68e1&&typeof _0x5e68e1[_0x21a879(0x139)]===_0x21a879(0x129)&&typeof _0x5e68e1[_0x21a879(0x149)]===_0x21a879(0x129)&&(_0x5e68e1['scope']==='global'||_0x5e68e1[_0x21a879(0x14c)]==='project'))return _0x5e68e1;}catch{}return null;}export function writeStoredDeviceCode(_0x510006,_0x371331){const _0x27d631=a12_0x2e3d,_0x1270c3=getDeviceCodePath(),_0x4b853a=dirname(_0x1270c3);!existsSync(_0x4b853a)&&mkdirSync(_0x4b853a,{'recursive':!![]});const _0x2c138f={'code':_0x510006,'createdAt':new Date()[_0x27d631(0x132)](),'scope':_0x371331};writeFileSync(_0x1270c3,JSON[_0x27d631(0x126)](_0x2c138f),{'encoding':_0x27d631(0x114),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x5c62b4=getDeviceCodePath();try{unlinkSync(_0x5c62b4);}catch{}}export function isStoredDeviceCodeExpired(_0x58e231){const _0x383ec3=a12_0x2e3d;return Date['now']()-new Date(_0x58e231[_0x383ec3(0x149)])[_0x383ec3(0x11e)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x3924a0,_0x432a94){const _0x17d170=a12_0x2e3d,_0x431d4a=_0x3924a0+_0x17d170(0x138),_0x511ff7=new AbortController(),_0x1e7606=setTimeout(()=>_0x511ff7[_0x17d170(0x10d)](),0x2710),_0x182b9c=await fetch(_0x431d4a,{'method':_0x17d170(0x13e),'headers':{'Content-Type':'application/json'},'body':JSON[_0x17d170(0x126)]({'code':_0x432a94}),'signal':_0x511ff7['signal']});clearTimeout(_0x1e7606);if(!_0x182b9c['ok'])throw CliErrors[_0x17d170(0x145)](_0x17d170(0x110)+_0x182b9c[_0x17d170(0x10e)]);const _0x124609=await _0x182b9c[_0x17d170(0x140)](),_0x9f2cea=_0x124609[_0x17d170(0x13c)]&&typeof _0x124609[_0x17d170(0x13c)]===_0x17d170(0x131)?_0x124609[_0x17d170(0x13c)]:_0x124609;if(!_0x9f2cea||typeof _0x9f2cea['status']!==_0x17d170(0x129))throw CliErrors[_0x17d170(0x141)](_0x17d170(0x12a));return{'status':_0x9f2cea[_0x17d170(0x10e)],'access_key':typeof _0x9f2cea[_0x17d170(0x115)]===_0x17d170(0x129)?_0x9f2cea['access_key']:undefined};}export async function pollDeviceToken(_0x118ac5,_0x2c5c10,_0x223247){const _0x129fc2=a12_0x2e3d;let _0x53ff8f=0x0;for(let _0x1db6a8=0x0;_0x1db6a8<MAX_POLLS;_0x1db6a8++){if(_0x223247[_0x129fc2(0x11d)])throw CliErrors[_0x129fc2(0x135)](_0x129fc2(0xfe));let _0x439a9d;try{_0x439a9d=await fetchDeviceToken(_0x118ac5,_0x2c5c10);}catch(_0xc28d2a){if(_0xc28d2a instanceof Error&&_0xc28d2a[_0x129fc2(0x111)]==='AbortError')throw CliErrors[_0x129fc2(0x135)](_0x129fc2(0xfe));_0x53ff8f++;if(_0x53ff8f>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x129fc2(0x145)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine(_0x129fc2(0x12e)+_0x53ff8f+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x129fc2(0x130)),await sleep(POLL_INTERVAL_MS);continue;}_0x53ff8f=0x0;if(_0x439a9d['status']===_0x129fc2(0x10b)){if(!_0x439a9d['access_key'])throw CliErrors[_0x129fc2(0x141)](_0x129fc2(0x122));return _0x439a9d[_0x129fc2(0x115)];}if(_0x439a9d['status']==='expired'){deleteStoredDeviceCode();throw CliErrors['validation']('Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}const _0x2c87b1=(_0x1db6a8+0x1)*POLL_INTERVAL_MS,_0x48e6a4=DEVICE_CODE_TTL_MS-_0x2c87b1,_0x309cc6=Math[_0x129fc2(0x112)](_0x48e6a4/0xea60),_0x17ae39=Math[_0x129fc2(0x112)](_0x48e6a4%0xea60/0x3e8);process[_0x129fc2(0x136)][_0x129fc2(0x142)](_0x129fc2(0x105)+_0x309cc6+':'+String(_0x17ae39)[_0x129fc2(0x143)](0x2,'0')+_0x129fc2(0x14a)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x129fc2(0x107)]('Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}function sleep(_0x3761cf){return new Promise(_0x52e2a3=>setTimeout(_0x52e2a3,_0x3761cf));}export const authDeviceDefinition={'service':'auth','command':a12_0x5534f8(0x128),'description':a12_0x5534f8(0x120),'risk':a12_0x5534f8(0x142),'confirmationDescription':'Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x5534f8(0x12f),'type':a12_0x5534f8(0x10a),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x5534f8(0x116),'type':a12_0x5534f8(0x10a),'description':a12_0x5534f8(0x102),'default':![]},{'name':a12_0x5534f8(0x11f),'type':a12_0x5534f8(0x129),'description':a12_0x5534f8(0x103),'default':a12_0x5534f8(0x11a)},{'name':'url-only','type':a12_0x5534f8(0x10a),'description':a12_0x5534f8(0x125),'default':![]}],async 'execute'(_0x2accb4){const _0x52ef3a=a12_0x5534f8,_0x9f0377=resolveAuthScopeFlags(_0x2accb4),_0x37f598=_0x9f0377[_0x52ef3a(0x12f)]?_0x52ef3a(0x12f):'project',_0x2bd234=readScopedConfig(_0x9f0377);if(_0x2bd234[_0x52ef3a(0x109)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x3dfec2=(_0x2accb4[_0x52ef3a(0x121)](_0x52ef3a(0x11f))||_0x52ef3a(0x11a))[_0x52ef3a(0x106)](),_0x57da64=getUserDomain(),_0x12c4ce=readStoredDeviceCode(),_0x37342c=_0x12c4ce&&!isStoredDeviceCodeExpired(_0x12c4ce)?_0x12c4ce[_0x52ef3a(0x139)]:((()=>{const _0x408b83=generateDeviceCode();return writeStoredDeviceCode(_0x408b83,_0x37f598),_0x408b83;})()),_0x468769=buildDeviceAuthUrl(_0x57da64,_0x37342c,_0x3dfec2);if(_0x2accb4[_0x52ef3a(0x10c)]('url-only'))return console[_0x52ef3a(0x14b)](_0x468769),{'ok':!![]};writeCliSideChannelLine(_0x52ef3a(0x13f)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x468769),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x52ef3a(0x12b));if(_0x2accb4[_0x52ef3a(0x123)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x52ef3a(0x146)),{'ok':!![],'message':_0x52ef3a(0x100)};writeCliSideChannelLine(_0x52ef3a(0x118));const _0x18b4a1=new AbortController(),_0x9de4a8=()=>{const _0x571735=_0x52ef3a;_0x18b4a1[_0x571735(0x10d)](),process[_0x571735(0x134)](_0x571735(0x101),_0x9de4a8);};process[_0x52ef3a(0x124)]('SIGINT',_0x9de4a8);let _0x564a0b;try{_0x564a0b=await pollDeviceToken(_0x57da64,_0x37342c,_0x18b4a1[_0x52ef3a(0x12d)]);}finally{process[_0x52ef3a(0x134)](_0x52ef3a(0x101),_0x9de4a8);}if(!ACCESS_KEY_PATTERN[_0x52ef3a(0x148)](_0x564a0b))throw CliErrors['apiError']('Invalid\x20access_key\x20returned\x20by\x20server.');const _0x5decc2=readScopedConfig(_0x9f0377);return _0x5decc2[_0x52ef3a(0x109)]=_0x564a0b,writeScopedConfig(_0x5decc2,_0x9f0377),deleteStoredDeviceCode(),process[_0x52ef3a(0x136)][_0x52ef3a(0x142)]('\x0a'),writeCliSideChannelLine(_0x52ef3a(0x13a)+_0x37f598+_0x52ef3a(0x12c)),writeCliSideChannelLine(_0x52ef3a(0x144)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};
1
+ const a12_0xd4f588=a12_0xea49;(function(_0x499168,_0x24c151){const _0x2dc1d7=a12_0xea49,_0x15b98c=_0x499168();while(!![]){try{const _0x4a998d=parseInt(_0x2dc1d7(0x1e5))/0x1+-parseInt(_0x2dc1d7(0x1ef))/0x2*(parseInt(_0x2dc1d7(0x1b0))/0x3)+-parseInt(_0x2dc1d7(0x1d5))/0x4*(-parseInt(_0x2dc1d7(0x1ce))/0x5)+parseInt(_0x2dc1d7(0x1f9))/0x6*(-parseInt(_0x2dc1d7(0x1de))/0x7)+-parseInt(_0x2dc1d7(0x1b3))/0x8*(-parseInt(_0x2dc1d7(0x1e9))/0x9)+-parseInt(_0x2dc1d7(0x1b7))/0xa+parseInt(_0x2dc1d7(0x1db))/0xb;if(_0x4a998d===_0x24c151)break;else _0x15b98c['push'](_0x15b98c['shift']());}catch(_0x1ae092){_0x15b98c['push'](_0x15b98c['shift']());}}}(a12_0x41b4,0x5adeb));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';function a12_0xea49(_0x49dd85,_0x44851b){_0x49dd85=_0x49dd85-0x1af;const _0x41b4c6=a12_0x41b4();let _0xea4971=_0x41b4c6[_0x49dd85];return _0xea4971;}import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x514429){const _0x1eb6d6=a12_0xea49;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x514429[_0x1eb6d6(0x1dd)](_0x1eb6d6(0x1da)),'explicitProject':_0x514429[_0x1eb6d6(0x1dd)](_0x1eb6d6(0x1b5)),'policy':_0x1eb6d6(0x1c2)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x25a35d,_0x3c4fb9,_0x13d707='lovrabet-cli'){const _0x452333=a12_0xea49;return _0x25a35d+_0x452333(0x1d3)+encodeURIComponent(_0x3c4fb9)+_0x452333(0x1b2)+encodeURIComponent(_0x13d707);}export function getDeviceCodePath(){const _0x15e1e1=a12_0xea49;return homedir()+'/'+PRODUCT_CONFIG[_0x15e1e1(0x1f6)]+'/.device-auth';}export function readStoredDeviceCode(){const _0x3fe0f3=a12_0xea49,_0xd0bbf9=getDeviceCodePath();if(!existsSync(_0xd0bbf9))return null;try{const _0x39cdf2=readFileSync(_0xd0bbf9,{'encoding':'utf8'}),_0x418edd=JSON[_0x3fe0f3(0x1b8)](_0x39cdf2);if(_0x418edd&&typeof _0x418edd[_0x3fe0f3(0x1e0)]==='string'&&typeof _0x418edd[_0x3fe0f3(0x1d1)]===_0x3fe0f3(0x1f7)&&(_0x418edd['scope']===_0x3fe0f3(0x1da)||_0x418edd[_0x3fe0f3(0x1d8)]===_0x3fe0f3(0x1b5)))return _0x418edd;}catch{}return null;}function a12_0x41b4(){const _0x230fd4=['homeDirName','string','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','6oAtHKv','floor','POST','device','once','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.','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','utf8','417zjUYBW','lovrabet-cli','&source=','116024yDQRiq','log','project','removeListener','4272440fvxhNZ','parse','status','cancelled','write','validation','source','AbortError','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','stderr','nonInteractive','global-default','success','\x0dWaiting\x20for\x20authorization...\x20','Device\x20authorization\x20successful.','name','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','aborted','signal','abort','application/json','url-only','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','25gnhjeC','\x20auth\x20device','now','createdAt','Verify:\x20','/device-auth?code=','Invalid\x20access_key\x20returned\x20by\x20server.','383752kVLKRs','\x20remaining','getTime','scope','boolean','global','5860591cOmSah','access_key','bool','3479364OzmhuN','padStart','code','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','SIGINT','str','accessKey','263798ewHYXt','apiError','Invalid\x20device\x20auth\x20response','/api/device-auth/token','387vkertT','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','data','expired','Write\x20to\x20project\x20config','stringify','8682JClOHf','Write\x20to\x20global\x20config\x20(default)','trim','Device\x20authorization\x20cancelled.','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','),\x20retrying...','networkError'];a12_0x41b4=function(){return _0x230fd4;};return a12_0x41b4();}export function writeStoredDeviceCode(_0x2afad9,_0xc37506){const _0x1d4bd9=a12_0xea49,_0x1ef2b4=getDeviceCodePath(),_0x50c743=dirname(_0x1ef2b4);!existsSync(_0x50c743)&&mkdirSync(_0x50c743,{'recursive':!![]});const _0x5db3ed={'code':_0x2afad9,'createdAt':new Date()['toISOString'](),'scope':_0xc37506};writeFileSync(_0x1ef2b4,JSON[_0x1d4bd9(0x1ee)](_0x5db3ed),{'encoding':_0x1d4bd9(0x1af),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x5628e6=getDeviceCodePath();try{unlinkSync(_0x5628e6);}catch{}}export function isStoredDeviceCodeExpired(_0x4c97da){const _0x2ac820=a12_0xea49;return Date[_0x2ac820(0x1d0)]()-new Date(_0x4c97da[_0x2ac820(0x1d1)])[_0x2ac820(0x1d7)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x1e1da4,_0x445167){const _0x20db7a=a12_0xea49,_0x34d9cd=_0x1e1da4+_0x20db7a(0x1e8),_0x5429a9=new AbortController(),_0x957c73=setTimeout(()=>_0x5429a9[_0x20db7a(0x1ca)](),0x2710),_0x3a65ee=await fetch(_0x34d9cd,{'method':_0x20db7a(0x1fb),'headers':{'Content-Type':_0x20db7a(0x1cb)},'body':JSON[_0x20db7a(0x1ee)]({'code':_0x445167}),'signal':_0x5429a9[_0x20db7a(0x1c9)]});clearTimeout(_0x957c73);if(!_0x3a65ee['ok'])throw CliErrors[_0x20db7a(0x1f5)]('Device\x20auth\x20API\x20returned\x20HTTP\x20'+_0x3a65ee['status']);const _0x36cc7a=await _0x3a65ee['json'](),_0x555768=_0x36cc7a['data']&&typeof _0x36cc7a[_0x20db7a(0x1eb)]==='object'?_0x36cc7a[_0x20db7a(0x1eb)]:_0x36cc7a;if(!_0x555768||typeof _0x555768[_0x20db7a(0x1b9)]!==_0x20db7a(0x1f7))throw CliErrors[_0x20db7a(0x1e6)](_0x20db7a(0x1e7));return{'status':_0x555768[_0x20db7a(0x1b9)],'access_key':typeof _0x555768[_0x20db7a(0x1dc)]===_0x20db7a(0x1f7)?_0x555768[_0x20db7a(0x1dc)]:undefined};}export async function pollDeviceToken(_0x281929,_0x33c258,_0x545be2){const _0x510065=a12_0xea49;let _0x35e428=0x0;for(let _0x6c17c8=0x0;_0x6c17c8<MAX_POLLS;_0x6c17c8++){if(_0x545be2[_0x510065(0x1c8)])throw CliErrors['cancelled'](_0x510065(0x1f2));let _0xfebf11;try{_0xfebf11=await fetchDeviceToken(_0x281929,_0x33c258);}catch(_0x48f6ff){if(_0x48f6ff instanceof Error&&_0x48f6ff[_0x510065(0x1c6)]===_0x510065(0x1be))throw CliErrors[_0x510065(0x1ba)](_0x510065(0x1f2));_0x35e428++;if(_0x35e428>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x510065(0x1f5)](_0x510065(0x1c7));writeCliSideChannelLine('Device\x20auth\x20API\x20error\x20('+_0x35e428+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x510065(0x1f4)),await sleep(POLL_INTERVAL_MS);continue;}_0x35e428=0x0;if(_0xfebf11[_0x510065(0x1b9)]===_0x510065(0x1c3)){if(!_0xfebf11[_0x510065(0x1dc)])throw CliErrors[_0x510065(0x1e6)](_0x510065(0x1d4));return _0xfebf11[_0x510065(0x1dc)];}if(_0xfebf11['status']===_0x510065(0x1ec)){deleteStoredDeviceCode();throw CliErrors[_0x510065(0x1bc)](_0x510065(0x1ea));}const _0x3a8474=(_0x6c17c8+0x1)*POLL_INTERVAL_MS,_0x38cabe=DEVICE_CODE_TTL_MS-_0x3a8474,_0xb7508=Math['floor'](_0x38cabe/0xea60),_0x4aa602=Math[_0x510065(0x1fa)](_0x38cabe%0xea60/0x3e8);process[_0x510065(0x1c0)][_0x510065(0x1bb)](_0x510065(0x1c4)+_0xb7508+':'+String(_0x4aa602)[_0x510065(0x1df)](0x2,'0')+_0x510065(0x1d6)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x510065(0x1bc)]('Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.');}function sleep(_0x24a985){return new Promise(_0xbcc0bb=>setTimeout(_0xbcc0bb,_0x24a985));}export const authDeviceDefinition={'service':'auth','command':a12_0xd4f588(0x1fc),'description':a12_0xd4f588(0x1f3),'risk':a12_0xd4f588(0x1bb),'confirmationDescription':a12_0xd4f588(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0xd4f588(0x1da),'type':a12_0xd4f588(0x1d9),'description':a12_0xd4f588(0x1f0),'default':!![]},{'name':a12_0xd4f588(0x1b5),'type':a12_0xd4f588(0x1d9),'description':a12_0xd4f588(0x1ed),'default':![]},{'name':a12_0xd4f588(0x1bd),'type':a12_0xd4f588(0x1f7),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':'lovrabet-cli'},{'name':a12_0xd4f588(0x1cc),'type':'boolean','description':a12_0xd4f588(0x1bf),'default':![]}],async 'execute'(_0x1785d2){const _0x4a9ee6=a12_0xd4f588,_0x1d6adb=resolveAuthScopeFlags(_0x1785d2),_0x3283f5=_0x1d6adb['global']?_0x4a9ee6(0x1da):_0x4a9ee6(0x1b5),_0xa4a238=readScopedConfig(_0x1d6adb);if(_0xa4a238[_0x4a9ee6(0x1e4)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x5cd34a=(_0x1785d2[_0x4a9ee6(0x1e3)](_0x4a9ee6(0x1bd))||_0x4a9ee6(0x1b1))[_0x4a9ee6(0x1f1)](),_0xcc1cb5=getUserDomain(),_0x14bf87=readStoredDeviceCode(),_0x1866fb=_0x14bf87&&!isStoredDeviceCodeExpired(_0x14bf87)?_0x14bf87[_0x4a9ee6(0x1e0)]:((()=>{const _0x5017e5=generateDeviceCode();return writeStoredDeviceCode(_0x5017e5,_0x3283f5),_0x5017e5;})()),_0x5f2d2f=buildDeviceAuthUrl(_0xcc1cb5,_0x1866fb,_0x5cd34a);if(_0x1785d2[_0x4a9ee6(0x1dd)](_0x4a9ee6(0x1cc)))return console[_0x4a9ee6(0x1b4)](_0x5f2d2f),{'ok':!![]};writeCliSideChannelLine(_0x4a9ee6(0x1cd)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x5f2d2f),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x4a9ee6(0x1f8));if(_0x1785d2[_0x4a9ee6(0x1c1)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x4a9ee6(0x1cf)),{'ok':!![],'message':_0x4a9ee6(0x1e1)};writeCliSideChannelLine(_0x4a9ee6(0x1ff));const _0x5c53cd=new AbortController(),_0x56c0a9=()=>{const _0x1bfe6c=_0x4a9ee6;_0x5c53cd[_0x1bfe6c(0x1ca)](),process['removeListener'](_0x1bfe6c(0x1e2),_0x56c0a9);};process[_0x4a9ee6(0x1fd)](_0x4a9ee6(0x1e2),_0x56c0a9);let _0x2f3dac;try{_0x2f3dac=await pollDeviceToken(_0xcc1cb5,_0x1866fb,_0x5c53cd[_0x4a9ee6(0x1c9)]);}finally{process[_0x4a9ee6(0x1b6)](_0x4a9ee6(0x1e2),_0x56c0a9);}if(!ACCESS_KEY_PATTERN['test'](_0x2f3dac))throw CliErrors['apiError'](_0x4a9ee6(0x1d4));const _0x37fd35=readScopedConfig(_0x1d6adb);return _0x37fd35[_0x4a9ee6(0x1e4)]=_0x2f3dac,writeScopedConfig(_0x37fd35,_0x1d6adb),deleteStoredDeviceCode(),process[_0x4a9ee6(0x1c0)][_0x4a9ee6(0x1bb)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x3283f5+'\x20config.'),writeCliSideChannelLine(_0x4a9ee6(0x1d2)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x4a9ee6(0x1c5)};}};
@@ -1 +1 @@
1
- const a13_0x232ef1=a13_0x2f6a;(function(_0x2eeb00,_0x23b478){const _0x564a56=a13_0x2f6a,_0x4de222=_0x2eeb00();while(!![]){try{const _0x599163=parseInt(_0x564a56(0x84))/0x1*(-parseInt(_0x564a56(0xae))/0x2)+-parseInt(_0x564a56(0x95))/0x3+parseInt(_0x564a56(0x80))/0x4+parseInt(_0x564a56(0x8d))/0x5*(-parseInt(_0x564a56(0xab))/0x6)+parseInt(_0x564a56(0xc7))/0x7+parseInt(_0x564a56(0xbc))/0x8*(parseInt(_0x564a56(0xd2))/0x9)+-parseInt(_0x564a56(0xc4))/0xa*(parseInt(_0x564a56(0xc9))/0xb);if(_0x599163===_0x23b478)break;else _0x4de222['push'](_0x4de222['shift']());}catch(_0x1096fb){_0x4de222['push'](_0x4de222['shift']());}}}(a13_0x34d1,0x1bbfb));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';function a13_0x2f6a(_0x1cffb1,_0x3f4d9c){_0x1cffb1=_0x1cffb1-0x7d;const _0x34d1a4=a13_0x34d1();let _0x2f6a0d=_0x34d1a4[_0x1cffb1];return _0x2f6a0d;}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(_0x48add4=USER_ACCESS_KEY_CREATE_URL){const _0x19c8e0=a13_0x2f6a;writeCliSideChannelLine(_0x19c8e0(0x9c)+PRODUCT_CONFIG[_0x19c8e0(0x82)]+':'),writeCliSideChannelLine('\x0a'+_0x48add4+'\x0a'),writeCliSideChannelLine(_0x19c8e0(0xc2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(_0x10df5b=USER_ACCESS_KEY_CREATE_URL){const _0x5ef1cd=a13_0x2f6a;return[_0x5ef1cd(0x9c)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x10df5b,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x5ef1cd(0x8f)][_0x5ef1cd(0xcc)]('\x0a');}function canPromptForAccessKey(_0x32a623){const _0x535fb6=a13_0x2f6a;return!_0x32a623[_0x535fb6(0x83)]&&process['stdin'][_0x535fb6(0xc5)]!==![]&&process[_0x535fb6(0xb3)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x1bd0a0){const _0x50cd78=a13_0x2f6a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1bd0a0['bool'](_0x50cd78(0x92)),'explicitProject':_0x1bd0a0[_0x50cd78(0xdb)]('project'),'policy':'global-default'}));}function a13_0x34d1(){const _0x428fe=['No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','read','daily','logout','string','bool','success','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','validation','542940GpGPvL','Clear\x20from\x20global\x20config\x20(default)','userCenterDisplayName','nonInteractive','1DHqIgn','Invalid\x20accessKey\x20format.','AccessKey\x20(ak_xxx...)','Shorthand\x20for\x20--access-key','push','AccessKey\x20cleared\x20from\x20','newConfigFileName','cancelled','env','5CGfhAq','test','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','AccessKey\x20saved\x20to\x20','global','info','yes','394464NqNCXm','ACCESS_KEY','Option\x20B:\x20apps\x20config\x20(','=ak_xxx','Show\x20current\x20authentication\x20status','trim','project\x20config','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','str','Option\x20A:\x20','project','Option\x20C:\x20environment\x20variable','Write\x20to\x20global\x20config\x20(default)','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.','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','access-key','boolean','access_key','\x20\x20export\x20','Auth\x20mode:\x20','code','272418OKzFMG','Missing\x20accessKey.','Clear\x20the\x20AccessKey\x20from\x20config','15546nePgDK','Then\x20verify\x20with:\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','stdout','auth','\x20config.','write','\x20config.\x20Nothing\x20to\x20clear.','accessKey','check','\x20(via\x20','accessKeyCreatePath','259832pUhRAR','production','authRequired','envName','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20Verify:\x20','Tip:\x20you\x20can\x20also\x20run:','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','10ibxrvE','isTTY','\x20env\x20var','1068564eSoxwL','ClientAk','962511XCCoIF','status','Status:\x20valid','join','Use\x20`','scope','\x20auth\x20status','AccessKey:\x20','No\x20AccessKey\x20found\x20in\x20','27HYdIqW','login','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'];a13_0x34d1=function(){return _0x428fe;};return a13_0x34d1();}async function resolveAuthWriteInput(_0x240e50){const _0x58a999=a13_0x2f6a;let _0x35ff9=(_0x240e50[_0x58a999(0x9e)]('access-key')||_0x240e50['str']('ak')||'')['trim']();const _0x3c5b5e=(_0x240e50['str'](_0x58a999(0x8c))||'')[_0x58a999(0x9a)](),_0x36fd65=''+getUserDomain()+PRODUCT_CONFIG[_0x58a999(0xbb)];if(!_0x35ff9&&canPromptForAccessKey(_0x240e50))try{showAccessKeyCreateHint(_0x36fd65),_0x35ff9=await promptAccessKey('');}catch(_0x6c532d){if(isAbortPrompt(_0x6c532d))throw CliErrors[_0x58a999(0x8b)]();throw _0x6c532d;}if(!_0x35ff9)throw CliErrors[_0x58a999(0x7f)](_0x58a999(0xac),buildAccessKeySetupGuide(_0x36fd65));if(!ACCESS_KEY_PATTERN[_0x58a999(0x8e)](_0x35ff9))throw CliErrors['validation'](_0x58a999(0x85),_0x58a999(0x7e));if(!_0x3c5b5e)return{'accessKey':_0x35ff9};const _0x215a94=normalizeEnv(_0x3c5b5e);return{'accessKey':_0x35ff9,'env':isDaily(_0x215a94)?_0x58a999(0xd8):isDev(_0x215a94)?'development':_0x58a999(0xbd)};}export const authDefinitions=[{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0xd3),'description':a13_0x232ef1(0x9d),'risk':a13_0x232ef1(0xb6),'confirmationDescription':a13_0x232ef1(0xa3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0xa5),'type':a13_0x232ef1(0xda),'description':a13_0x232ef1(0x86)},{'name':'ak','type':'string','description':a13_0x232ef1(0x87)},{'name':a13_0x232ef1(0x92),'type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xa2),'default':!![]},{'name':'project','type':a13_0x232ef1(0xa6),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xcf22d4){const _0x3f986b=a13_0x232ef1;if(_0xcf22d4[_0x3f986b(0xdb)](_0x3f986b(0x94)))throw CliErrors[_0x3f986b(0x7f)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x3f986b(0xcd)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x30fb3a=(_0xcf22d4['str'](_0x3f986b(0xa5))||_0xcf22d4[_0x3f986b(0x9e)]('ak')||'')[_0x3f986b(0x9a)]();if(!_0x30fb3a&&_0xcf22d4[_0x3f986b(0x83)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x34584a=await resolveAuthWriteInput(_0xcf22d4),_0x2f905f=resolveAuthScopeFlags(_0xcf22d4),_0x2ae541=readScopedConfig(_0x2f905f);_0x2ae541[_0x3f986b(0xb8)]=_0x34584a[_0x3f986b(0xb8)];_0x34584a['env']&&(_0x2ae541[_0x3f986b(0x8c)]=_0x34584a[_0x3f986b(0x8c)]);writeScopedConfig(_0x2ae541,_0x2f905f);const _0xc0e153=_0x2f905f[_0x3f986b(0x92)]?_0x3f986b(0x92):_0x3f986b(0xa0),_0x61563c=_0x2ae541[_0x3f986b(0x8c)]?'\x20Current\x20env:\x20'+_0x2ae541[_0x3f986b(0x8c)]+'.':'';return{'ok':!![],'message':_0x3f986b(0x91)+_0xc0e153+_0x3f986b(0xb5)+_0x61563c+_0x3f986b(0xc1)+CLI_BIN_NAME+_0x3f986b(0xcf)};}},{'service':'auth','command':a13_0x232ef1(0xd9),'description':a13_0x232ef1(0xad),'risk':a13_0x232ef1(0xb6),'confirmationDescription':a13_0x232ef1(0x90),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0x92),'type':'boolean','description':a13_0x232ef1(0x81),'default':!![]},{'name':a13_0x232ef1(0xa0),'type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xb2),'default':![]}],async 'execute'(_0x46f120){const _0xaf0721=a13_0x232ef1,_0x327f1d=resolveAuthScopeFlags(_0x46f120),_0x5c495f=readScopedConfig(_0x327f1d),_0x1a4ad1=!!_0x5c495f[_0xaf0721(0xb8)];delete _0x5c495f['accessKey'],writeScopedConfig(_0x5c495f,_0x327f1d);const _0x37a14a=_0x327f1d['global']?_0xaf0721(0x92):_0xaf0721(0xa0);if(_0x1a4ad1)return{'ok':!![],'message':_0xaf0721(0x89)+_0x37a14a+_0xaf0721(0xb5)};return{'ok':!![],'message':_0xaf0721(0xd1)+_0x37a14a+_0xaf0721(0xb7)};}},{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0xca),'description':a13_0x232ef1(0x99),'risk':a13_0x232ef1(0xd7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0x92),'type':a13_0x232ef1(0xa6),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a13_0x232ef1(0xb1),'default':![]},{'name':'check','type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xd4),'default':![]}],async 'execute'(_0x19dfd1){const _0x341e33=a13_0x232ef1,_0x2def55=resolveAuthScopeFlags(_0x19dfd1),_0x3b6f34=readScopedConfig(_0x2def55),_0x5915f6=productEnvName(_0x341e33(0x96)),_0x516e9d=productEnv(_0x341e33(0x96))||undefined,_0x245ac4=_0x3b6f34[_0x341e33(0xb8)]||undefined,_0x3186a2=_0x516e9d||_0x245ac4,_0x322844=_0x516e9d?_0x5915f6+_0x341e33(0xc6):_0x245ac4?(_0x2def55[_0x341e33(0x92)]?'global':_0x341e33(0xa0))+'\x20config':null,_0x3fd4d7=[_0x341e33(0xa9)+AUTH_MODE[_0x341e33(0xc8)]];if(_0x3186a2){const _0x58a5cf=maskCliAccessKey(_0x3186a2);_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xd0)+_0x58a5cf+(_0x322844?_0x341e33(0xba)+_0x322844+')':'')),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xcb));}if(!_0x3186a2){_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7['push'](_0x341e33(0xd6)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0x9f)+CLI_BIN_NAME+_0x341e33(0xd5)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7['push'](_0x341e33(0x97)+PRODUCT_CONFIG[_0x341e33(0x8a)]+')'),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xc3)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xa1)),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xa8)+_0x5915f6+_0x341e33(0x98)),_0x3fd4d7['push'](''),_0x3fd4d7['push'](_0x341e33(0xaf)+CLI_BIN_NAME+_0x341e33(0xcf)),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xb0)+CLI_BIN_NAME+'\x20doctor');if(_0x19dfd1['bool'](_0x341e33(0xb9))){const _0x9cf01c=readStoredDeviceCode();if(_0x9cf01c&&!isStoredDeviceCodeExpired(_0x9cf01c)){const _0x22ecf9=getUserDomain(),_0x366235=await fetchDeviceToken(_0x22ecf9,_0x9cf01c[_0x341e33(0xaa)]);if(_0x366235[_0x341e33(0xca)]===_0x341e33(0x7d)&&_0x366235[_0x341e33(0xa7)]){const _0x3c5e0e={'global':_0x9cf01c['scope']===_0x341e33(0x92)},_0x4b241b=readScopedConfig(_0x3c5e0e);_0x4b241b[_0x341e33(0xb8)]=_0x366235[_0x341e33(0xa7)],writeScopedConfig(_0x4b241b,_0x3c5e0e),deleteStoredDeviceCode();const _0x4c69f2=_0x366235[_0x341e33(0xa7)],_0x3e28c4=maskCliAccessKey(_0x4c69f2),_0xf7c860=_0x9cf01c[_0x341e33(0xce)]===_0x341e33(0x92)?'global\x20config':_0x341e33(0x9b);return{'ok':!![],'message':[_0x341e33(0xa9)+AUTH_MODE[_0x341e33(0xc8)],_0x341e33(0xd0)+_0x3e28c4+_0x341e33(0xba)+_0xf7c860+')',_0x341e33(0xcb)][_0x341e33(0xcc)]('\x0a')};}_0x366235[_0x341e33(0xca)]==='expired'&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x341e33(0xc0));}throw CliErrors[_0x341e33(0xbe)](_0x3fd4d7['join']('\x0a'));}}return{'ok':!![],'message':_0x3fd4d7[_0x341e33(0xcc)]('\x0a')};}},{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0x93),'description':a13_0x232ef1(0xa4),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x160fdc){const _0xcde13e=a13_0x232ef1,_0x2da283=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2da283,'meta':{'env':_0x160fdc[_0xcde13e(0xbf)]??'production'}}};}},authDeviceDefinition];
1
+ const a13_0x4faabf=a13_0x1ec4;(function(_0x13289d,_0x5720a6){const _0x178721=a13_0x1ec4,_0xf6c4d3=_0x13289d();while(!![]){try{const _0x44924b=parseInt(_0x178721(0x156))/0x1+parseInt(_0x178721(0x185))/0x2+-parseInt(_0x178721(0x16f))/0x3*(-parseInt(_0x178721(0x16c))/0x4)+-parseInt(_0x178721(0x183))/0x5*(parseInt(_0x178721(0x166))/0x6)+parseInt(_0x178721(0x13f))/0x7+-parseInt(_0x178721(0x17b))/0x8+-parseInt(_0x178721(0x149))/0x9;if(_0x44924b===_0x5720a6)break;else _0xf6c4d3['push'](_0xf6c4d3['shift']());}catch(_0x45d7ae){_0xf6c4d3['push'](_0xf6c4d3['shift']());}}}(a13_0x3ecc,0xd153f));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';function a13_0x1ec4(_0x5164a8,_0x1dbf25){_0x5164a8=_0x5164a8-0x13d;const _0x3eccf7=a13_0x3ecc();let _0x1ec48c=_0x3eccf7[_0x5164a8];return _0x1ec48c;}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';function a13_0x3ecc(){const _0xd56b65=['23285835dmRlcB','Clear\x20the\x20AccessKey\x20from\x20config','accessKey','Option\x20C:\x20environment\x20variable','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Show\x20current\x20authentication\x20status','env','cancelled','AccessKey\x20cleared\x20from\x20','ACCESS_KEY','=ak_xxx','login','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','1504276EPGxeB','access_key','Read\x20from\x20global\x20config\x20(default)','Auth\x20mode:\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','stdout','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','scope','Missing\x20accessKey.','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Invalid\x20accessKey\x20format.','Shorthand\x20for\x20--access-key','project','\x20config','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','logout','6IzJfXE','userCenterDisplayName','\x20env\x20var','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','AccessKey:\x20','752428EepNfO','\x20Current\x20env:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','3TsKCrJ','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','authRequired','envName','nonInteractive','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','development','expired','isTTY','read','access-key','Then\x20verify\x20with:\x20','529472nmwSHr','`auth\x20login`\x20does\x20not\x20support\x20--yes.','string','Status:\x20valid','No\x20AccessKey\x20found\x20in\x20','\x20doctor','check','newConfigFileName','193285rVkwWo','AccessKey\x20(ak_xxx...)','3342012GZZPyE','trim','info','\x20auth\x20status','Option\x20A:\x20','auth','boolean','production','ClientAk','\x20config.\x20Nothing\x20to\x20clear.','str','status','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20config.','push','Write\x20to\x20global\x20config\x20(default)','validation','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Tip:\x20you\x20can\x20also\x20run:','AccessKey\x20saved\x20to\x20','stdin','global','Option\x20B:\x20apps\x20config\x20(','bool','1303218wVCryj','Use\x20`','accessKeyCreatePath','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.','global-default','write','join','daily','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Verify:\x20'];a13_0x3ecc=function(){return _0xd56b65;};return a13_0x3ecc();}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(_0x5822f8=USER_ACCESS_KEY_CREATE_URL){const _0x16219a=a13_0x1ec4;writeCliSideChannelLine(_0x16219a(0x174)+PRODUCT_CONFIG[_0x16219a(0x167)]+':'),writeCliSideChannelLine('\x0a'+_0x5822f8+'\x0a'),writeCliSideChannelLine(_0x16219a(0x197)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x16219a(0x16e));}function buildAccessKeySetupGuide(_0x21cb5d=USER_ACCESS_KEY_CREATE_URL){const _0x530d4e=a13_0x1ec4;return[_0x530d4e(0x174)+PRODUCT_CONFIG[_0x530d4e(0x167)]+':',_0x21cb5d,_0x530d4e(0x147)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x530d4e(0x145)]('\x0a');}function canPromptForAccessKey(_0x3dbb20){const _0x28ee81=a13_0x1ec4;return!_0x3dbb20[_0x28ee81(0x173)]&&process[_0x28ee81(0x199)][_0x28ee81(0x177)]!==![]&&process[_0x28ee81(0x15b)][_0x28ee81(0x177)]!==![];}function resolveAuthScopeFlags(_0x28cecd){const _0x4bb83b=a13_0x1ec4;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x28cecd[_0x4bb83b(0x13e)]('global'),'explicitProject':_0x28cecd[_0x4bb83b(0x13e)](_0x4bb83b(0x162)),'policy':_0x4bb83b(0x143)}));}async function resolveAuthWriteInput(_0x40c881){const _0x3ab396=a13_0x1ec4;let _0x1fd594=(_0x40c881[_0x3ab396(0x18f)](_0x3ab396(0x179))||_0x40c881[_0x3ab396(0x18f)]('ak')||'')[_0x3ab396(0x186)]();const _0x22e39b=(_0x40c881['str']('env')||'')['trim'](),_0x1fad5c=''+getUserDomain()+PRODUCT_CONFIG[_0x3ab396(0x141)];if(!_0x1fd594&&canPromptForAccessKey(_0x40c881))try{showAccessKeyCreateHint(_0x1fad5c),_0x1fd594=await promptAccessKey('');}catch(_0x56d72d){if(isAbortPrompt(_0x56d72d))throw CliErrors[_0x3ab396(0x150)]();throw _0x56d72d;}if(!_0x1fd594)throw CliErrors[_0x3ab396(0x195)](_0x3ab396(0x15e),buildAccessKeySetupGuide(_0x1fad5c));if(!ACCESS_KEY_PATTERN['test'](_0x1fd594))throw CliErrors['validation'](_0x3ab396(0x160),_0x3ab396(0x14d));if(!_0x22e39b)return{'accessKey':_0x1fd594};const _0xa348c1=normalizeEnv(_0x22e39b);return{'accessKey':_0x1fd594,'env':isDaily(_0xa348c1)?_0x3ab396(0x146):isDev(_0xa348c1)?_0x3ab396(0x175):_0x3ab396(0x18c)};}export const authDefinitions=[{'service':a13_0x4faabf(0x18a),'command':a13_0x4faabf(0x154),'description':a13_0x4faabf(0x16a),'risk':'write','confirmationDescription':a13_0x4faabf(0x142),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x4faabf(0x179),'type':a13_0x4faabf(0x17d),'description':a13_0x4faabf(0x184)},{'name':'ak','type':a13_0x4faabf(0x17d),'description':a13_0x4faabf(0x161)},{'name':a13_0x4faabf(0x19a),'type':a13_0x4faabf(0x18b),'description':a13_0x4faabf(0x194),'default':!![]},{'name':a13_0x4faabf(0x162),'type':a13_0x4faabf(0x18b),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x44de46){const _0x48795d=a13_0x4faabf;if(_0x44de46['bool']('yes'))throw CliErrors[_0x48795d(0x195)](_0x48795d(0x17c),_0x48795d(0x140)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x48795d(0x155));const _0xda962d=(_0x44de46[_0x48795d(0x18f)](_0x48795d(0x179))||_0x44de46[_0x48795d(0x18f)]('ak')||'')[_0x48795d(0x186)]();if(!_0xda962d&&_0x44de46[_0x48795d(0x173)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x48795d(0x141)])};const _0x4edda7=await resolveAuthWriteInput(_0x44de46),_0x1f67d4=resolveAuthScopeFlags(_0x44de46),_0x38a90b=readScopedConfig(_0x1f67d4);_0x38a90b[_0x48795d(0x14b)]=_0x4edda7['accessKey'];_0x4edda7[_0x48795d(0x14f)]&&(_0x38a90b[_0x48795d(0x14f)]=_0x4edda7[_0x48795d(0x14f)]);writeScopedConfig(_0x38a90b,_0x1f67d4);const _0x4b3b43=_0x1f67d4[_0x48795d(0x19a)]?'global':_0x48795d(0x162),_0x5b28ee=_0x38a90b[_0x48795d(0x14f)]?_0x48795d(0x16d)+_0x38a90b['env']+'.':'';return{'ok':!![],'message':_0x48795d(0x198)+_0x4b3b43+'\x20config.'+_0x5b28ee+_0x48795d(0x148)+CLI_BIN_NAME+_0x48795d(0x188)};}},{'service':a13_0x4faabf(0x18a),'command':a13_0x4faabf(0x165),'description':a13_0x4faabf(0x14a),'risk':a13_0x4faabf(0x144),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x4faabf(0x162),'type':'boolean','description':a13_0x4faabf(0x169),'default':![]}],async 'execute'(_0x1b2790){const _0x11a62f=a13_0x4faabf,_0x5a77d2=resolveAuthScopeFlags(_0x1b2790),_0x24ea0c=readScopedConfig(_0x5a77d2),_0x53b91e=!!_0x24ea0c[_0x11a62f(0x14b)];delete _0x24ea0c[_0x11a62f(0x14b)],writeScopedConfig(_0x24ea0c,_0x5a77d2);const _0x218288=_0x5a77d2[_0x11a62f(0x19a)]?'global':_0x11a62f(0x162);if(_0x53b91e)return{'ok':!![],'message':_0x11a62f(0x151)+_0x218288+_0x11a62f(0x192)};return{'ok':!![],'message':_0x11a62f(0x17f)+_0x218288+_0x11a62f(0x18e)};}},{'service':a13_0x4faabf(0x18a),'command':a13_0x4faabf(0x190),'description':a13_0x4faabf(0x14e),'risk':a13_0x4faabf(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x4faabf(0x18b),'description':a13_0x4faabf(0x158),'default':!![]},{'name':a13_0x4faabf(0x162),'type':a13_0x4faabf(0x18b),'description':a13_0x4faabf(0x196),'default':![]},{'name':a13_0x4faabf(0x181),'type':'boolean','description':a13_0x4faabf(0x170),'default':![]}],async 'execute'(_0x17cd79){const _0xa0399d=a13_0x4faabf,_0x24cc42=resolveAuthScopeFlags(_0x17cd79),_0x12763b=readScopedConfig(_0x24cc42),_0x15a790=productEnvName(_0xa0399d(0x152)),_0x87afdf=productEnv(_0xa0399d(0x152))||undefined,_0x5e6e61=_0x12763b[_0xa0399d(0x14b)]||undefined,_0x184b66=_0x87afdf||_0x5e6e61,_0x45e921=_0x87afdf?_0x15a790+_0xa0399d(0x168):_0x5e6e61?(_0x24cc42[_0xa0399d(0x19a)]?_0xa0399d(0x19a):'project')+_0xa0399d(0x163):null,_0x29cc47=[_0xa0399d(0x159)+AUTH_MODE[_0xa0399d(0x18d)]];if(_0x184b66){const _0x30d844=maskCliAccessKey(_0x184b66);_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x16b)+_0x30d844+(_0x45e921?'\x20(via\x20'+_0x45e921+')':'')),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x17e));}if(!_0x184b66){_0x29cc47[_0xa0399d(0x193)](''),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x15c)),_0x29cc47[_0xa0399d(0x193)](''),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x189)+CLI_BIN_NAME+_0xa0399d(0x191)),_0x29cc47[_0xa0399d(0x193)](''),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x13d)+PRODUCT_CONFIG[_0xa0399d(0x182)]+')'),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x164)),_0x29cc47['push'](''),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x14c)),_0x29cc47['push']('\x20\x20export\x20'+_0x15a790+_0xa0399d(0x153)),_0x29cc47[_0xa0399d(0x193)](''),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x17a)+CLI_BIN_NAME+_0xa0399d(0x188)),_0x29cc47[_0xa0399d(0x193)](_0xa0399d(0x15a)+CLI_BIN_NAME+_0xa0399d(0x180));if(_0x17cd79[_0xa0399d(0x13e)](_0xa0399d(0x181))){const _0x43a21b=readStoredDeviceCode();if(_0x43a21b&&!isStoredDeviceCodeExpired(_0x43a21b)){const _0x26ad73=getUserDomain(),_0x3cc3ce=await fetchDeviceToken(_0x26ad73,_0x43a21b['code']);if(_0x3cc3ce[_0xa0399d(0x190)]==='success'&&_0x3cc3ce[_0xa0399d(0x157)]){const _0x313662={'global':_0x43a21b[_0xa0399d(0x15d)]===_0xa0399d(0x19a)},_0x387d05=readScopedConfig(_0x313662);_0x387d05[_0xa0399d(0x14b)]=_0x3cc3ce['access_key'],writeScopedConfig(_0x387d05,_0x313662),deleteStoredDeviceCode();const _0x362dcf=_0x3cc3ce[_0xa0399d(0x157)],_0x2259c3=maskCliAccessKey(_0x362dcf),_0x3815dd=_0x43a21b[_0xa0399d(0x15d)]==='global'?'global\x20config':'project\x20config';return{'ok':!![],'message':[_0xa0399d(0x159)+AUTH_MODE[_0xa0399d(0x18d)],'AccessKey:\x20'+_0x2259c3+'\x20(via\x20'+_0x3815dd+')',_0xa0399d(0x17e)]['join']('\x0a')};}_0x3cc3ce[_0xa0399d(0x190)]===_0xa0399d(0x176)&&deleteStoredDeviceCode();throw CliErrors[_0xa0399d(0x171)](_0xa0399d(0x15f));}throw CliErrors[_0xa0399d(0x171)](_0x29cc47['join']('\x0a'));}}return{'ok':!![],'message':_0x29cc47[_0xa0399d(0x145)]('\x0a')};}},{'service':a13_0x4faabf(0x18a),'command':a13_0x4faabf(0x187),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0x4faabf(0x178),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c36d9){const _0xd99ab=a13_0x4faabf,_0x3b57f4=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3b57f4,'meta':{'env':_0x1c36d9[_0xd99ab(0x172)]??_0xd99ab(0x18c)}}};}},authDeviceDefinition];
@@ -1 +1 @@
1
- (function(_0x217ea9,_0x2e450d){const _0x1fa998=a14_0xde63,_0x26e04d=_0x217ea9();while(!![]){try{const _0x144a90=parseInt(_0x1fa998(0x1a5))/0x1*(parseInt(_0x1fa998(0x1b0))/0x2)+-parseInt(_0x1fa998(0x1a7))/0x3*(parseInt(_0x1fa998(0x1a9))/0x4)+parseInt(_0x1fa998(0x1b4))/0x5+-parseInt(_0x1fa998(0x1af))/0x6+parseInt(_0x1fa998(0x1a8))/0x7+parseInt(_0x1fa998(0x1aa))/0x8*(parseInt(_0x1fa998(0x1a4))/0x9)+-parseInt(_0x1fa998(0x1b1))/0xa*(parseInt(_0x1fa998(0x1b3))/0xb);if(_0x144a90===_0x2e450d)break;else _0x26e04d['push'](_0x26e04d['shift']());}catch(_0x21d6bf){_0x26e04d['push'](_0x26e04d['shift']());}}}(a14_0xca43,0xd2401));function a14_0xde63(_0x5bba58,_0x3e2ae2){_0x5bba58=_0x5bba58-0x1a2;const _0xca4300=a14_0xca43();let _0xde636=_0xca4300[_0x5bba58];return _0xde636;}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x5d67aa=a14_0xde63;super('User\x20aborted\x20prompt'),this[_0x5d67aa(0x1ad)]=_0x5d67aa(0x1b5);}}function createSafeRl(){const _0x20801e=a14_0xde63,_0x42cf45=createInterface({'input':process[_0x20801e(0x1a2)],'output':process[_0x20801e(0x1ab)]});let _0x1c7f1b;const _0x591eed=new Promise((_0x3acd5b,_0x48de1c)=>{const _0x7efdd5=_0x20801e;_0x1c7f1b=()=>{const _0x3cf580=a14_0xde63;_0x1c7f1b&&(_0x42cf45[_0x3cf580(0x1a6)](_0x3cf580(0x1a3),_0x1c7f1b),_0x1c7f1b=undefined);try{_0x42cf45[_0x3cf580(0x1b2)]();}catch{}_0x48de1c(new AbortPrompt());},_0x42cf45[_0x7efdd5(0x1ac)](_0x7efdd5(0x1a3),_0x1c7f1b);}),_0x31c2e1=()=>{const _0x464ef8=_0x20801e;_0x1c7f1b&&(_0x42cf45[_0x464ef8(0x1a6)](_0x464ef8(0x1a3),_0x1c7f1b),_0x1c7f1b=undefined);try{_0x42cf45[_0x464ef8(0x1b2)]();}catch{}};return{'rl':_0x42cf45,'abortPromise':_0x591eed,'disposeSuccess':_0x31c2e1};}export async function promptAccessKey(_0xeeebfc=''){const _0x127b51=a14_0xde63,{rl:_0x5826ce,abortPromise:_0x59a2f8,disposeSuccess:_0x464f28}=createSafeRl(),_0xa0d5f1=new Promise(_0x558edb=>{const _0x15a3e1=a14_0xde63,_0x227d4c=_0xeeebfc?'AccessKey\x20('+_0xeeebfc+_0x15a3e1(0x1ae):'AccessKey\x20(paste\x20ak_...):\x20';_0x5826ce['question'](_0x227d4c,_0xa9cbc7=>{_0x464f28(),_0x558edb(_0xa9cbc7['trim']()||_0xeeebfc);});});return Promise[_0x127b51(0x1b6)]([_0xa0d5f1,_0x59a2f8]);}function a14_0xca43(){const _0x20bbb8=['close','2036100YEePpI','8166155KByUjn','AbortPrompt','race','stdin','SIGINT','12488139UfybVS','51DItxMo','removeListener','14709thlipn','5333510VaFfiZ','764gnuVOz','8WNfPBP','stdout','once','name','):\x20','9477366ddkkaE','5874cPPUGa','30HfJuXM'];a14_0xca43=function(){return _0x20bbb8;};return a14_0xca43();}export function isAbortPrompt(_0x323aa7){const _0x3ffc4d=a14_0xde63;return _0x323aa7 instanceof Error&&_0x323aa7[_0x3ffc4d(0x1ad)]==='AbortPrompt';}
1
+ function a14_0x2c55(_0x1f3da4,_0x5dbb6d){_0x1f3da4=_0x1f3da4-0x121;const _0x108139=a14_0x1081();let _0x2c5517=_0x108139[_0x1f3da4];return _0x2c5517;}(function(_0x434755,_0x44edf7){const _0x28ea1e=a14_0x2c55,_0x5786fb=_0x434755();while(!![]){try{const _0x467063=-parseInt(_0x28ea1e(0x131))/0x1*(parseInt(_0x28ea1e(0x132))/0x2)+-parseInt(_0x28ea1e(0x129))/0x3+parseInt(_0x28ea1e(0x122))/0x4+parseInt(_0x28ea1e(0x133))/0x5*(-parseInt(_0x28ea1e(0x12a))/0x6)+parseInt(_0x28ea1e(0x134))/0x7+parseInt(_0x28ea1e(0x126))/0x8+parseInt(_0x28ea1e(0x12b))/0x9;if(_0x467063===_0x44edf7)break;else _0x5786fb['push'](_0x5786fb['shift']());}catch(_0x4c6d8f){_0x5786fb['push'](_0x5786fb['shift']());}}}(a14_0x1081,0x7a55a));import{createInterface}from'node:readline';function a14_0x1081(){const _0x473241=['6820312bYJihd','close','race','573075kvUhQJ','4053330tamamx','3438135urgAtY','AbortPrompt','stdin','removeListener','once','SIGINT','1zBMgoB','1299310UlbKsl','5laTuLc','61201DenHwF','trim','3096080zhAvKC','AccessKey\x20(paste\x20ak_...):\x20','):\x20','name'];a14_0x1081=function(){return _0x473241;};return a14_0x1081();}class AbortPrompt extends Error{constructor(){const _0x4677c7=a14_0x2c55;super('User\x20aborted\x20prompt'),this[_0x4677c7(0x125)]=_0x4677c7(0x12c);}}function createSafeRl(){const _0xa65973=a14_0x2c55,_0x472879=createInterface({'input':process[_0xa65973(0x12d)],'output':process['stdout']});let _0x2e98b2;const _0x3be2a9=new Promise((_0x41c7c0,_0xae910e)=>{const _0x4c75ab=_0xa65973;_0x2e98b2=()=>{const _0x3e75df=a14_0x2c55;_0x2e98b2&&(_0x472879['removeListener']('SIGINT',_0x2e98b2),_0x2e98b2=undefined);try{_0x472879[_0x3e75df(0x127)]();}catch{}_0xae910e(new AbortPrompt());},_0x472879[_0x4c75ab(0x12f)](_0x4c75ab(0x130),_0x2e98b2);}),_0x18ab32=()=>{const _0x38a827=_0xa65973;_0x2e98b2&&(_0x472879[_0x38a827(0x12e)](_0x38a827(0x130),_0x2e98b2),_0x2e98b2=undefined);try{_0x472879[_0x38a827(0x127)]();}catch{}};return{'rl':_0x472879,'abortPromise':_0x3be2a9,'disposeSuccess':_0x18ab32};}export async function promptAccessKey(_0xddcacb=''){const _0x32c8c0=a14_0x2c55,{rl:_0x586d98,abortPromise:_0x29d30a,disposeSuccess:_0x3948f8}=createSafeRl(),_0x4338c3=new Promise(_0x5e990a=>{const _0x2879e4=a14_0x2c55,_0x34b8c7=_0xddcacb?'AccessKey\x20('+_0xddcacb+_0x2879e4(0x124):_0x2879e4(0x123);_0x586d98['question'](_0x34b8c7,_0x8a3082=>{const _0xe315d9=_0x2879e4;_0x3948f8(),_0x5e990a(_0x8a3082[_0xe315d9(0x121)]()||_0xddcacb);});});return Promise[_0x32c8c0(0x128)]([_0x4338c3,_0x29d30a]);}export function isAbortPrompt(_0x21247c){const _0x2840ea=a14_0x2c55;return _0x21247c instanceof Error&&_0x21247c[_0x2840ea(0x125)]===_0x2840ea(0x12c);}
@@ -1 +1 @@
1
- const a15_0x277678=a15_0x4b9f;(function(_0x59b4c7,_0x514747){const _0x752e28=a15_0x4b9f,_0x4423ca=_0x59b4c7();while(!![]){try{const _0x3d9114=parseInt(_0x752e28(0xa6))/0x1*(parseInt(_0x752e28(0x9a))/0x2)+parseInt(_0x752e28(0x9b))/0x3*(-parseInt(_0x752e28(0xa5))/0x4)+parseInt(_0x752e28(0xa8))/0x5*(parseInt(_0x752e28(0x9e))/0x6)+parseInt(_0x752e28(0xa0))/0x7*(parseInt(_0x752e28(0x95))/0x8)+-parseInt(_0x752e28(0xa2))/0x9*(-parseInt(_0x752e28(0x99))/0xa)+-parseInt(_0x752e28(0x94))/0xb+parseInt(_0x752e28(0xa9))/0xc;if(_0x3d9114===_0x514747)break;else _0x4423ca['push'](_0x4423ca['shift']());}catch(_0xa4c40c){_0x4423ca['push'](_0x4423ca['shift']());}}}(a15_0x3cdb,0x6d077));function a15_0x4b9f(_0x5cfc2d,_0x3be84f){_0x5cfc2d=_0x5cfc2d-0x94;const _0x3cdb34=a15_0x3cdb();let _0x4b9fbb=_0x3cdb34[_0x5cfc2d];return _0x4b9fbb;}import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x3cdb(){const _0x4d71ba=['77FdiEwR','functionName','15RwNCLE','643476cwXpfC','str','5793843WRMije','9480FzpTMW','version','name','bff','5558290JUMEJR','3428YnDPEX','1752330FujOuQ','detail','description','1093962GGZmsV','Backend\x20Function\x20name','1589AIUiPV','appCode','9ONtRjq','(none)','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','4XkZjEG'];a15_0x3cdb=function(){return _0x4d71ba;};return a15_0x3cdb();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x277678(0x98),'command':a15_0x277678(0x9c),'description':a15_0x277678(0xa4),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x277678(0x9f)}],async 'execute'(_0x4a17b9){const _0x4ef283=a15_0x277678,_0x326f29=await getBffEndpointContract(_0x4a17b9[_0x4ef283(0xa1)],_0x4a17b9[_0x4ef283(0xaa)](_0x4ef283(0x97)));return{'ok':!![],'data':{'appCode':_0x326f29[_0x4ef283(0xa1)],'functionName':_0x326f29[_0x4ef283(0xa7)],'description':_0x326f29[_0x4ef283(0x9d)]||_0x4ef283(0xa3),'version':_0x326f29[_0x4ef283(0x96)],'gmtModified':_0x326f29['gmtModified']}};}};
1
+ const a15_0x4f79b4=a15_0xb971;(function(_0x3de7d9,_0x4d67eb){const _0x263f45=a15_0xb971,_0x1c98de=_0x3de7d9();while(!![]){try{const _0x5b2ec4=-parseInt(_0x263f45(0x13e))/0x1+-parseInt(_0x263f45(0x143))/0x2+-parseInt(_0x263f45(0x145))/0x3+-parseInt(_0x263f45(0x13b))/0x4*(-parseInt(_0x263f45(0x146))/0x5)+parseInt(_0x263f45(0x137))/0x6*(-parseInt(_0x263f45(0x148))/0x7)+parseInt(_0x263f45(0x13f))/0x8*(parseInt(_0x263f45(0x139))/0x9)+parseInt(_0x263f45(0x147))/0xa;if(_0x5b2ec4===_0x4d67eb)break;else _0x1c98de['push'](_0x1c98de['shift']());}catch(_0x36c0ed){_0x1c98de['push'](_0x1c98de['shift']());}}}(a15_0x3df5,0x5313a));import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x3df5(){const _0x3d4a58=['detail','read','description','Backend\x20Function\x20name','1697070yVFyBI','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','153apTCPk','functionName','68812CZncZk','bff','appCode','669749RIIWaz','111832lpNhUg','gmtModified','version','(none)','122444SzsvZj','name','1874895FcKPOS','195DgdUuw','10705030cuugYB','7aNyjaT'];a15_0x3df5=function(){return _0x3d4a58;};return a15_0x3df5();}function a15_0xb971(_0xf13c0b,_0x205b62){_0xf13c0b=_0xf13c0b-0x135;const _0x3df590=a15_0x3df5();let _0xb9710f=_0x3df590[_0xf13c0b];return _0xb9710f;}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x4f79b4(0x13c),'command':a15_0x4f79b4(0x149),'description':a15_0x4f79b4(0x138),'risk':a15_0x4f79b4(0x14a),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x4f79b4(0x136)}],async 'execute'(_0x4d566c){const _0x5e2b5b=a15_0x4f79b4,_0x5b426f=await getBffEndpointContract(_0x4d566c[_0x5e2b5b(0x13d)],_0x4d566c['str'](_0x5e2b5b(0x144)));return{'ok':!![],'data':{'appCode':_0x5b426f[_0x5e2b5b(0x13d)],'functionName':_0x5b426f[_0x5e2b5b(0x13a)],'description':_0x5b426f[_0x5e2b5b(0x135)]||_0x5e2b5b(0x142),'version':_0x5b426f[_0x5e2b5b(0x141)],'gmtModified':_0x5b426f[_0x5e2b5b(0x140)]}};}};
@@ -1 +1 @@
1
- const a16_0x135973=a16_0x4631;(function(_0x5698d9,_0x18b292){const _0x21fb9b=a16_0x4631,_0x5b06b7=_0x5698d9();while(!![]){try{const _0x179a79=parseInt(_0x21fb9b(0xd5))/0x1*(-parseInt(_0x21fb9b(0xcc))/0x2)+-parseInt(_0x21fb9b(0xd2))/0x3+-parseInt(_0x21fb9b(0xce))/0x4+-parseInt(_0x21fb9b(0xd7))/0x5+-parseInt(_0x21fb9b(0xcf))/0x6+parseInt(_0x21fb9b(0xca))/0x7+-parseInt(_0x21fb9b(0xd1))/0x8*(-parseInt(_0x21fb9b(0xd0))/0x9);if(_0x179a79===_0x18b292)break;else _0x5b06b7['push'](_0x5b06b7['shift']());}catch(_0x5f54c3){_0x5b06b7['push'](_0x5b06b7['shift']());}}}(a16_0x142c,0xab3e1));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0x142c(){const _0x4a2b63=['3357KpaKND','48568cODMyN','725106JQwozH','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','str','359uaalII','name','5140185RFgohj','8182104dgIkFG','Backend\x20Function\x20executed\x20in\x20','478xSbkBg','now','3342340sUelSm','3244926gxggFJ'];a16_0x142c=function(){return _0x4a2b63;};return a16_0x142c();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x4631(_0x5cd06f,_0x38023d){_0x5cd06f=_0x5cd06f-0xca;const _0x142c18=a16_0x142c();let _0x4631fc=_0x142c18[_0x5cd06f];return _0x4631fc;}export const bffExec={'service':'bff','command':'exec','description':a16_0x135973(0xd3),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x546d35){const _0x1b4c9e=a16_0x135973,_0x2bbb31=parseJsonParams(_0x546d35[_0x1b4c9e(0xd4)]('params')),_0x34f5b4=Date[_0x1b4c9e(0xcd)](),_0x4cb1ac=await executeSdkBff(_0x546d35[_0x1b4c9e(0xd4)](_0x1b4c9e(0xd6)),_0x2bbb31),_0x4faedd=Date[_0x1b4c9e(0xcd)]()-_0x34f5b4;return{'ok':!![],'data':{'result':_0x4cb1ac,'elapsed':_0x4faedd},'message':_0x1b4c9e(0xcb)+_0x4faedd+'ms'};}};
1
+ const a16_0x192d82=a16_0x5a12;(function(_0x58f5f0,_0x47a45e){const _0x56564e=a16_0x5a12,_0x42d871=_0x58f5f0();while(!![]){try{const _0x15c876=parseInt(_0x56564e(0xb0))/0x1*(parseInt(_0x56564e(0xa9))/0x2)+parseInt(_0x56564e(0xac))/0x3*(-parseInt(_0x56564e(0x9c))/0x4)+parseInt(_0x56564e(0xaa))/0x5*(parseInt(_0x56564e(0xad))/0x6)+parseInt(_0x56564e(0xab))/0x7*(parseInt(_0x56564e(0xa2))/0x8)+-parseInt(_0x56564e(0xae))/0x9+parseInt(_0x56564e(0xa1))/0xa*(-parseInt(_0x56564e(0xa8))/0xb)+-parseInt(_0x56564e(0x9d))/0xc*(-parseInt(_0x56564e(0xa3))/0xd);if(_0x15c876===_0x47a45e)break;else _0x42d871['push'](_0x42d871['shift']());}catch(_0x597d00){_0x42d871['push'](_0x42d871['shift']());}}}(a16_0x18cd,0xa3d45));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_0x5a12(_0x2f9504,_0x304ea1){_0x2f9504=_0x2f9504-0x9b;const _0x18cdd4=a16_0x18cd();let _0x5a12b1=_0x18cdd4[_0x2f9504];return _0x5a12b1;}export const bffExec={'service':a16_0x192d82(0xa6),'command':a16_0x192d82(0x9f),'description':a16_0x192d82(0xa0),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a16_0x192d82(0xa7)},PARAMS_FLAG],async 'execute'(_0xb4e4cf){const _0x2f4bd1=a16_0x192d82,_0x489062=parseJsonParams(_0xb4e4cf[_0x2f4bd1(0xaf)](_0x2f4bd1(0x9e))),_0xa9fe2f=Date[_0x2f4bd1(0x9b)](),_0x63d4eb=await executeSdkBff(_0xb4e4cf[_0x2f4bd1(0xaf)](_0x2f4bd1(0xa5)),_0x489062),_0xe6439d=Date[_0x2f4bd1(0x9b)]()-_0xa9fe2f;return{'ok':!![],'data':{'result':_0x63d4eb,'elapsed':_0xe6439d},'message':_0x2f4bd1(0xa4)+_0xe6439d+'ms'};}};function a16_0x18cd(){const _0x1af3f1=['exec','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','18710PjeigE','158128nUzaDN','39svyNRa','Backend\x20Function\x20executed\x20in\x20','name','bff','Backend\x20Function\x20name\x20to\x20execute','7117wdqABa','37616YfJTiF','20FsnAva','329pUGtkk','5043QUaSXW','7278vBizHL','4228038FFYkaD','str','5RAdWVP','now','556yXMhAw','6228516YEyEdx','params'];a16_0x18cd=function(){return _0x1af3f1;};return a16_0x18cd();}
@@ -1 +1 @@
1
- (function(_0x540d99,_0x348bbd){const _0x1d2b82=a17_0x5aec,_0xcfe835=_0x540d99();while(!![]){try{const _0x12c1c0=-parseInt(_0x1d2b82(0x1be))/0x1+-parseInt(_0x1d2b82(0x1bc))/0x2+parseInt(_0x1d2b82(0x1bd))/0x3*(-parseInt(_0x1d2b82(0x1b9))/0x4)+parseInt(_0x1d2b82(0x1c0))/0x5*(parseInt(_0x1d2b82(0x1ba))/0x6)+-parseInt(_0x1d2b82(0x1b7))/0x7*(-parseInt(_0x1d2b82(0x1bf))/0x8)+parseInt(_0x1d2b82(0x1bb))/0x9+-parseInt(_0x1d2b82(0x1b8))/0xa;if(_0x12c1c0===_0x348bbd)break;else _0xcfe835['push'](_0xcfe835['shift']());}catch(_0xdab4fb){_0xcfe835['push'](_0xcfe835['shift']());}}}(a17_0x1019,0xf0763));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x1019(){const _0x456490=['2262504MUovZD','28209WBeNAw','773952pFsEcj','8MGazXj','28745ieYIAI','9623852kHFkHu','587730IhAjhB','548YvHRgK','1446GBImjb','13290966aZAhzE'];a17_0x1019=function(){return _0x456490;};return a17_0x1019();}function a17_0x5aec(_0x107a55,_0x493aef){_0x107a55=_0x107a55-0x1b7;const _0x101963=a17_0x1019();let _0x5aec53=_0x101963[_0x107a55];return _0x5aec53;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x5f2471,_0x5e3fca){const _0x2ff556=a17_0x8183,_0x52cd91=_0x5f2471();while(!![]){try{const _0x449658=-parseInt(_0x2ff556(0x118))/0x1*(-parseInt(_0x2ff556(0x11d))/0x2)+-parseInt(_0x2ff556(0x116))/0x3*(-parseInt(_0x2ff556(0x117))/0x4)+parseInt(_0x2ff556(0x11f))/0x5*(parseInt(_0x2ff556(0x11e))/0x6)+parseInt(_0x2ff556(0x11b))/0x7*(parseInt(_0x2ff556(0x121))/0x8)+parseInt(_0x2ff556(0x119))/0x9+parseInt(_0x2ff556(0x11c))/0xa*(parseInt(_0x2ff556(0x120))/0xb)+-parseInt(_0x2ff556(0x115))/0xc*(parseInt(_0x2ff556(0x11a))/0xd);if(_0x449658===_0x5e3fca)break;else _0x52cd91['push'](_0x52cd91['shift']());}catch(_0x286993){_0x52cd91['push'](_0x52cd91['shift']());}}}(a17_0x44ac,0x1ad43));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x8183(_0x51aa97,_0x573111){_0x51aa97=_0x51aa97-0x115;const _0x44ac5b=a17_0x44ac();let _0x8183a4=_0x44ac5b[_0x51aa97];return _0x8183a4;}import{bffExec}from'../../commands/bff/exec.js';function a17_0x44ac(){const _0x5cbd9c=['3VwCVYW','349464mdWVUs','1yhmcEx','1628721VnAWUK','1508ipXidw','7ZjpXVr','77750XCXmoD','233726sEUdup','829074BXRVcn','5NhVPLV','77xaLIEz','519016YrDBDY','55116ZbuPwO'];a17_0x44ac=function(){return _0x5cbd9c;};return a17_0x44ac();}export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a18_0x3db678=a18_0x31ec;function a18_0x31ec(_0x2f3b89,_0x50ed34){_0x2f3b89=_0x2f3b89-0x1b9;const _0x53c789=a18_0x53c7();let _0x31ec58=_0x53c789[_0x2f3b89];return _0x31ec58;}(function(_0x48077d,_0x3a6d46){const _0x377312=a18_0x31ec,_0x2d42a9=_0x48077d();while(!![]){try{const _0x1acff8=parseInt(_0x377312(0x1cc))/0x1+parseInt(_0x377312(0x1bb))/0x2+parseInt(_0x377312(0x1be))/0x3*(parseInt(_0x377312(0x1ba))/0x4)+-parseInt(_0x377312(0x1d0))/0x5+-parseInt(_0x377312(0x1bd))/0x6+-parseInt(_0x377312(0x1bf))/0x7*(-parseInt(_0x377312(0x1c2))/0x8)+-parseInt(_0x377312(0x1bc))/0x9*(parseInt(_0x377312(0x1c1))/0xa);if(_0x1acff8===_0x3a6d46)break;else _0x2d42a9['push'](_0x2d42a9['shift']());}catch(_0x17109c){_0x2d42a9['push'](_0x2d42a9['shift']());}}}(a18_0x53c7,0x9a35b));function a18_0x53c7(){const _0x4de49b=['setLogPath','nonInteractive','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','\x20is\x20already\x20current','\x20at\x20','changed','skillVersion','installedPath','311920mXcnrG','unknown','CLI\x20Built-in\x20Skill\x20','code','2437235paudvR','read','install','apiError','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','inherit','Built-in\x20Skill\x20install\x20failed\x20[','error','4588DhfgMV','1888152YqtEKw','9QEiRWr','2916948HuuvUZ','1362vyUsBR','21nMfcAX','pipe','4643820CgHtYL','781056NfCIJm','cwd'];a18_0x53c7=function(){return _0x4de49b;};return a18_0x53c7();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x3db678(0x1d2),'description':a18_0x3db678(0x1c6),'risk':a18_0x3db678(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x48c3ea){const _0x58db0b=a18_0x3db678;logger[_0x58db0b(0x1c4)](process[_0x58db0b(0x1c3)]()),logger['info']('cli-skill-install',_0x58db0b(0x1d4));const _0x4aed9c=installBuiltinSkill({'stdio':_0x48c3ea[_0x58db0b(0x1c5)]?_0x58db0b(0x1c0):_0x58db0b(0x1d5)});if(!_0x4aed9c['ok'])throw CliErrors[_0x58db0b(0x1d3)](_0x58db0b(0x1d6)+(_0x4aed9c[_0x58db0b(0x1cf)]||'INSTALL_FAILED')+']:\x20'+(_0x4aed9c[_0x58db0b(0x1b9)]||_0x58db0b(0x1cd)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x4aed9c['repairCommand']);const _0x3cf21e=_0x4aed9c[_0x58db0b(0x1cb)]?_0x58db0b(0x1c8)+_0x4aed9c[_0x58db0b(0x1cb)]:'';return console['log'](_0x4aed9c[_0x58db0b(0x1c9)]?_0x58db0b(0x1ce)+_0x4aed9c[_0x58db0b(0x1ca)]+'\x20installed'+_0x3cf21e:'CLI\x20Built-in\x20Skill\x20'+_0x4aed9c[_0x58db0b(0x1ca)]+_0x58db0b(0x1c7)+_0x3cf21e),{'ok':!![]};}}];
1
+ const a18_0x1c5a11=a18_0x1621;(function(_0x302cb0,_0x103b79){const _0x4bfb54=a18_0x1621,_0x462437=_0x302cb0();while(!![]){try{const _0x163090=-parseInt(_0x4bfb54(0xb8))/0x1+parseInt(_0x4bfb54(0xbb))/0x2+-parseInt(_0x4bfb54(0xc3))/0x3*(-parseInt(_0x4bfb54(0xae))/0x4)+parseInt(_0x4bfb54(0xbd))/0x5+parseInt(_0x4bfb54(0xb6))/0x6+parseInt(_0x4bfb54(0xc6))/0x7*(parseInt(_0x4bfb54(0xba))/0x8)+-parseInt(_0x4bfb54(0xb3))/0x9;if(_0x163090===_0x103b79)break;else _0x462437['push'](_0x462437['shift']());}catch(_0x36635b){_0x462437['push'](_0x462437['shift']());}}}(a18_0x1e2b,0x6f31b));function a18_0x1621(_0x12fc48,_0x2ea570){_0x12fc48=_0x12fc48-0xad;const _0x1e2b72=a18_0x1e2b();let _0x1621c6=_0x1e2b72[_0x12fc48];return _0x1621c6;}import{CliErrors}from'../../errors.js';function a18_0x1e2b(){const _0x115f7f=['4388100qMLgBI','cli-skill','497045fmcJsP','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','8bpuuVo','175566FgJAky','installedPath','2659460EoHKAk','\x20installed','error','skillVersion','\x20at\x20','Built-in\x20Skill\x20install\x20failed\x20[','6SggOCy','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','3758741FhZBCI','log','install','unknown','314536zSjwDQ',']:\x20','repairCommand','cwd','apiError','9834840bDfpZj','nonInteractive','code'];a18_0x1e2b=function(){return _0x115f7f;};return a18_0x1e2b();}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x1c5a11(0xb7),'command':a18_0x1c5a11(0xc8),'description':a18_0x1c5a11(0xc5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x47f15f){const _0x4661e3=a18_0x1c5a11;logger['setLogPath'](process[_0x4661e3(0xb1)]()),logger['info']('cli-skill-install',_0x4661e3(0xb9));const _0xcc93c6=installBuiltinSkill({'stdio':_0x47f15f[_0x4661e3(0xb4)]?'pipe':'inherit'});if(!_0xcc93c6['ok'])throw CliErrors[_0x4661e3(0xb2)](_0x4661e3(0xc2)+(_0xcc93c6[_0x4661e3(0xb5)]||'INSTALL_FAILED')+_0x4661e3(0xaf)+(_0xcc93c6[_0x4661e3(0xbf)]||_0x4661e3(0xad)),_0x4661e3(0xc4)+_0xcc93c6[_0x4661e3(0xb0)]);const _0x149982=_0xcc93c6[_0x4661e3(0xbc)]?_0x4661e3(0xc1)+_0xcc93c6[_0x4661e3(0xbc)]:'';return console[_0x4661e3(0xc7)](_0xcc93c6['changed']?'CLI\x20Built-in\x20Skill\x20'+_0xcc93c6[_0x4661e3(0xc0)]+_0x4661e3(0xbe)+_0x149982:'CLI\x20Built-in\x20Skill\x20'+_0xcc93c6[_0x4661e3(0xc0)]+'\x20is\x20already\x20current'+_0x149982),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a19_0xcec7(){const _0xc71068=['40uEsIHc','validation','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','\x20found).','inProject','Use\x20only\x20one\x20config\x20scope\x20flag.','1UkXPXY',',\x20or\x20create\x20a\x20project-local\x20','2597514hqRmDR','9753865HsEhYt','\x20first.','452583vhebtD','\x20(global)','50HPqVzK','newConfigFileName','project-or-global-explicit','3wyVXcY','2573565RpdfAm','43141DqdHCw','1348540FSyYAI','project','global','1120102hUaYoX','Not\x20inside\x20a\x20project\x20(no\x20'];a19_0xcec7=function(){return _0xc71068;};return a19_0xcec7();}(function(_0x3b116b,_0x4d9c6f){const _0xaecfd0=a19_0x5d45,_0x4a868d=_0x3b116b();while(!![]){try{const _0x1c53eb=-parseInt(_0xaecfd0(0xf0))/0x1*(parseInt(_0xaecfd0(0xe8))/0x2)+-parseInt(_0xaecfd0(0xe2))/0x3*(-parseInt(_0xaecfd0(0xe5))/0x4)+parseInt(_0xaecfd0(0xe3))/0x5+-parseInt(_0xaecfd0(0xf2))/0x6+parseInt(_0xaecfd0(0xe4))/0x7*(-parseInt(_0xaecfd0(0xea))/0x8)+parseInt(_0xaecfd0(0xdd))/0x9*(-parseInt(_0xaecfd0(0xdf))/0xa)+parseInt(_0xaecfd0(0xdb))/0xb;if(_0x1c53eb===_0x4d9c6f)break;else _0x4a868d['push'](_0x4a868d['shift']());}catch(_0x17cee4){_0x4a868d['push'](_0x4a868d['shift']());}}}(a19_0xcec7,0x711ef));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a19_0x5d45(_0x4ccb4b,_0xf89f3d){_0x4ccb4b=_0x4ccb4b-0xdb;const _0xcec712=a19_0xcec7();let _0x5d457a=_0xcec712[_0x4ccb4b];return _0x5d457a;}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(_0x56b010){const _0x5ab0f5=a19_0x5d45,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x311a85}=_0x56b010;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x5ab0f5(0xec),_0x5ab0f5(0xef));if(explicitGlobal)return _0x5ab0f5(0xe7);if(explicitProject)return _0x5ab0f5(0xe6);switch(_0x311a85){case'global-default':return _0x5ab0f5(0xe7);case _0x5ab0f5(0xe1):if(!(_0x56b010[_0x5ab0f5(0xee)]??isInProject()))throw CliErrors[_0x5ab0f5(0xeb)](_0x5ab0f5(0xe9)+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xed),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xf1)+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xdc));return'project';}}export function toScopeFlags(_0x2eeaed){const _0x40ecbf=a19_0x5d45;return{'global':_0x2eeaed===_0x40ecbf(0xe7)};}export function formatScopeLabel(_0x280af4){const _0x26030d=a19_0x5d45;return _0x280af4===_0x26030d(0xe7)?_0x26030d(0xde):'';}
1
+ (function(_0x32ddb5,_0x554191){const _0x3a0496=a19_0x46d7,_0x100d29=_0x32ddb5();while(!![]){try{const _0x3f2102=parseInt(_0x3a0496(0x7a))/0x1+-parseInt(_0x3a0496(0x6d))/0x2*(parseInt(_0x3a0496(0x70))/0x3)+parseInt(_0x3a0496(0x71))/0x4*(-parseInt(_0x3a0496(0x67))/0x5)+parseInt(_0x3a0496(0x6e))/0x6*(-parseInt(_0x3a0496(0x77))/0x7)+-parseInt(_0x3a0496(0x69))/0x8+parseInt(_0x3a0496(0x7b))/0x9*(-parseInt(_0x3a0496(0x76))/0xa)+parseInt(_0x3a0496(0x68))/0xb*(parseInt(_0x3a0496(0x7d))/0xc);if(_0x3f2102===_0x554191)break;else _0x100d29['push'](_0x100d29['shift']());}catch(_0x395a86){_0x100d29['push'](_0x100d29['shift']());}}}(a19_0x3cfb,0xbab97));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a19_0x3cfb(){const _0x25e2f0=['4832075umwQej','11eSsbna','9483016rAwmmZ','inProject','newConfigFileName','project','26xEgSSj','5628szDovP','global-default','61275lPTupf','4tQZbaD','\x20first.','validation','global','\x20found).','14023610VPYaoF','3332QRwGxY','Add\x20--global\x20to\x20write\x20to\x20~/',',\x20or\x20create\x20a\x20project-local\x20','304635jLqdPI','9FJnXHr','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','56716248ANyREu','Use\x20only\x20one\x20config\x20scope\x20flag.'];a19_0x3cfb=function(){return _0x25e2f0;};return a19_0x3cfb();}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(_0x4cbbc9){const _0x4bee2e=a19_0x46d7,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3ec761}=_0x4cbbc9;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x4bee2e(0x7c),_0x4bee2e(0x66));if(explicitGlobal)return _0x4bee2e(0x74);if(explicitProject)return _0x4bee2e(0x6c);switch(_0x3ec761){case _0x4bee2e(0x6f):return _0x4bee2e(0x74);case'project-or-global-explicit':if(!(_0x4cbbc9[_0x4bee2e(0x6a)]??isInProject()))throw CliErrors[_0x4bee2e(0x73)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x4bee2e(0x75),_0x4bee2e(0x78)+PRODUCT_CONFIG[_0x4bee2e(0x6b)]+_0x4bee2e(0x79)+PRODUCT_CONFIG[_0x4bee2e(0x6b)]+_0x4bee2e(0x72));return _0x4bee2e(0x6c);}}export function toScopeFlags(_0x437966){const _0x2642c0=a19_0x46d7;return{'global':_0x437966===_0x2642c0(0x74)};}function a19_0x46d7(_0x410693,_0x326ccd){_0x410693=_0x410693-0x66;const _0x3cfb5a=a19_0x3cfb();let _0x46d7d9=_0x3cfb5a[_0x410693];return _0x46d7d9;}export function formatScopeLabel(_0x5b36bf){const _0xba348a=a19_0x46d7;return _0x5b36bf===_0xba348a(0x74)?'\x20(global)':'';}
@@ -1 +1 @@
1
- (function(_0x5dc381,_0x19b097){const _0x41e77c=a20_0x2e20,_0x2d076e=_0x5dc381();while(!![]){try{const _0x6436a5=parseInt(_0x41e77c(0x1b3))/0x1+-parseInt(_0x41e77c(0x1ac))/0x2*(parseInt(_0x41e77c(0x1b4))/0x3)+parseInt(_0x41e77c(0x1c2))/0x4*(parseInt(_0x41e77c(0x1be))/0x5)+-parseInt(_0x41e77c(0x1c4))/0x6*(parseInt(_0x41e77c(0x1b2))/0x7)+-parseInt(_0x41e77c(0x1bc))/0x8*(-parseInt(_0x41e77c(0x1ae))/0x9)+-parseInt(_0x41e77c(0x1b1))/0xa*(-parseInt(_0x41e77c(0x1bd))/0xb)+-parseInt(_0x41e77c(0x1a8))/0xc*(parseInt(_0x41e77c(0x1b7))/0xd);if(_0x6436a5===_0x19b097)break;else _0x2d076e['push'](_0x2d076e['shift']());}catch(_0x514307){_0x2d076e['push'](_0x2d076e['shift']());}}}(a20_0x5f47,0x5d3bc));import{CliErrors}from'../../errors.js';function isSet(_0x524b25,_0x1ab431){const _0x2feaf1=a20_0x2e20,_0x13b846=_0x524b25[_0x2feaf1(0x1ba)](_0x1ab431);return _0x13b846!==undefined&&_0x13b846!==''&&_0x13b846!==![]&&_0x13b846!==0x0;}function a20_0x2e20(_0xe9cd61,_0x258711){_0xe9cd61=_0xe9cd61-0x1a8;const _0x5f478b=a20_0x5f47();let _0x2e2092=_0x5f478b[_0xe9cd61];return _0x2e2092;}function fmtNames(_0x3c5210){const _0x3166c2=a20_0x2e20;return _0x3c5210[_0x3166c2(0x1c3)](_0x36545d=>'--'+_0x36545d)[_0x3166c2(0x1b6)](',\x20');}export function requireOneOf(_0x4ab9f2,_0x30fb13,_0x315292){const _0x1dd992=a20_0x2e20,_0x32be05=_0x30fb13['filter'](_0x31e643=>isSet(_0x4ab9f2,_0x31e643));if(_0x32be05[_0x1dd992(0x1c8)]!==0x1)throw CliErrors[_0x1dd992(0x1aa)](_0x32be05['length']===0x0?_0x1dd992(0x1bb)+fmtNames(_0x30fb13)+_0x1dd992(0x1b8)+_0x315292+'`.':_0x1dd992(0x1ad)+fmtNames(_0x30fb13)+_0x1dd992(0x1c6)+fmtNames(_0x32be05)+'.',_0x32be05[_0x1dd992(0x1c8)]===0x0?_0x1dd992(0x1c7)+fmtNames(_0x30fb13):_0x1dd992(0x1b9));}function a20_0x5f47(){const _0x1da5bf=['At\x20least\x20one\x20of\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','356416HJgBnR','map','174774GwOxpC','test','\x20is\x20allowed,\x20found:\x20','Provide\x20one\x20of:\x20','length',',\x20got\x20\x22','24900Sptipj','Flags\x20','validation','some','645026cShUPH','Only\x20one\x20of\x20','465462fLvqtf','Use\x20only\x20one\x20of:\x20','str','50dGoSET','126kKsnTY','399072CsGjoX','3xGqjyM','Invalid\x20--','join','26kypUca','\x20is\x20required\x20for\x20`','Remove\x20all\x20but\x20one.','flag','Exactly\x20one\x20of\x20','88bswdXX','386749wyhuuN','5vVOJSB',':\x20expected\x20'];a20_0x5f47=function(){return _0x1da5bf;};return a20_0x5f47();}export function requireAnyOf(_0x54908b,_0x178f0b,_0x310525){const _0x350362=a20_0x2e20;if(!_0x178f0b[_0x350362(0x1ab)](_0x1ad41e=>isSet(_0x54908b,_0x1ad41e)))throw CliErrors[_0x350362(0x1aa)](_0x350362(0x1c0)+fmtNames(_0x178f0b)+_0x350362(0x1b8)+_0x310525+'`.',_0x350362(0x1c7)+fmtNames(_0x178f0b));}export function mutuallyExclusive(_0x2cf51d,_0x4aa028,_0x4696da){const _0x3c7c6c=a20_0x2e20,_0x391bb5=_0x4aa028['filter'](_0x5cce16=>isSet(_0x2cf51d,_0x5cce16));if(_0x391bb5[_0x3c7c6c(0x1c8)]>0x1)throw CliErrors[_0x3c7c6c(0x1aa)](_0x3c7c6c(0x1a9)+fmtNames(_0x391bb5)+_0x3c7c6c(0x1c1)+_0x4696da+'`.',_0x3c7c6c(0x1af)+fmtNames(_0x4aa028));}export function validatePattern(_0x3c8bf1,_0x5ef5aa,_0x42d674,_0x12f90d){const _0x321803=a20_0x2e20,_0x32fb06=_0x3c8bf1[_0x321803(0x1b0)](_0x5ef5aa);if(_0x32fb06&&!_0x42d674[_0x321803(0x1c5)](_0x32fb06))throw CliErrors[_0x321803(0x1aa)](_0x321803(0x1b5)+_0x5ef5aa+_0x321803(0x1bf)+_0x12f90d+_0x321803(0x1c9)+_0x32fb06+'\x22.');}
1
+ (function(_0x574921,_0x15bb5e){const _0x46105c=a20_0xf7ea,_0x12191a=_0x574921();while(!![]){try{const _0x2c7c52=parseInt(_0x46105c(0x1af))/0x1+-parseInt(_0x46105c(0x1b8))/0x2*(parseInt(_0x46105c(0x1b7))/0x3)+-parseInt(_0x46105c(0x1c2))/0x4+parseInt(_0x46105c(0x1bd))/0x5+-parseInt(_0x46105c(0x1ad))/0x6*(parseInt(_0x46105c(0x1ba))/0x7)+parseInt(_0x46105c(0x1b9))/0x8+parseInt(_0x46105c(0x1c4))/0x9;if(_0x2c7c52===_0x15bb5e)break;else _0x12191a['push'](_0x12191a['shift']());}catch(_0x3fa442){_0x12191a['push'](_0x12191a['shift']());}}}(a20_0x5845,0x7fe6a));import{CliErrors}from'../../errors.js';function isSet(_0x5400f8,_0x113464){const _0x5dee93=_0x5400f8['flag'](_0x113464);return _0x5dee93!==undefined&&_0x5dee93!==''&&_0x5dee93!==![]&&_0x5dee93!==0x0;}function fmtNames(_0x6db958){const _0x4623d6=a20_0xf7ea;return _0x6db958['map'](_0x441fe8=>'--'+_0x441fe8)[_0x4623d6(0x1c6)](',\x20');}export function requireOneOf(_0x506678,_0xee7b36,_0x46de42){const _0x53aced=a20_0xf7ea,_0x353925=_0xee7b36[_0x53aced(0x1b2)](_0x571d81=>isSet(_0x506678,_0x571d81));if(_0x353925['length']!==0x1)throw CliErrors['validation'](_0x353925[_0x53aced(0x1b0)]===0x0?_0x53aced(0x1b1)+fmtNames(_0xee7b36)+_0x53aced(0x1b5)+_0x46de42+'`.':_0x53aced(0x1b4)+fmtNames(_0xee7b36)+_0x53aced(0x1bb)+fmtNames(_0x353925)+'.',_0x353925[_0x53aced(0x1b0)]===0x0?_0x53aced(0x1c0)+fmtNames(_0xee7b36):_0x53aced(0x1c3));}function a20_0x5845(){const _0x342e01=['filter','\x20are\x20mutually\x20exclusive\x20for\x20`','Only\x20one\x20of\x20','\x20is\x20required\x20for\x20`','Use\x20only\x20one\x20of:\x20','71901JbswZg','54lSPmpL','3497464HEBSMl','14077MpRShD','\x20is\x20allowed,\x20found:\x20','Invalid\x20--','641890TODngU','some','test','Provide\x20one\x20of:\x20','validation','1997112MHMtXE','Remove\x20all\x20but\x20one.','7276104uoQriT','At\x20least\x20one\x20of\x20','join','str',':\x20expected\x20',',\x20got\x20\x22','270GGtYzx','Flags\x20','386747SCWUfJ','length','Exactly\x20one\x20of\x20'];a20_0x5845=function(){return _0x342e01;};return a20_0x5845();}function a20_0xf7ea(_0x29bff7,_0x43226f){_0x29bff7=_0x29bff7-0x1aa;const _0x5845ff=a20_0x5845();let _0xf7eafa=_0x5845ff[_0x29bff7];return _0xf7eafa;}export function requireAnyOf(_0x120020,_0x351e92,_0x296a5e){const _0x1deaf5=a20_0xf7ea;if(!_0x351e92[_0x1deaf5(0x1be)](_0x3df0ea=>isSet(_0x120020,_0x3df0ea)))throw CliErrors[_0x1deaf5(0x1c1)](_0x1deaf5(0x1c5)+fmtNames(_0x351e92)+'\x20is\x20required\x20for\x20`'+_0x296a5e+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x351e92));}export function mutuallyExclusive(_0x1f35a2,_0x460a93,_0x234797){const _0xb7f37=a20_0xf7ea,_0x19f4ea=_0x460a93['filter'](_0x1b3b48=>isSet(_0x1f35a2,_0x1b3b48));if(_0x19f4ea[_0xb7f37(0x1b0)]>0x1)throw CliErrors[_0xb7f37(0x1c1)](_0xb7f37(0x1ae)+fmtNames(_0x19f4ea)+_0xb7f37(0x1b3)+_0x234797+'`.',_0xb7f37(0x1b6)+fmtNames(_0x460a93));}export function validatePattern(_0x4822cc,_0x47f545,_0x5558d9,_0x2c1fc9){const _0x4dd032=a20_0xf7ea,_0x44dc08=_0x4822cc[_0x4dd032(0x1aa)](_0x47f545);if(_0x44dc08&&!_0x5558d9[_0x4dd032(0x1bf)](_0x44dc08))throw CliErrors[_0x4dd032(0x1c1)](_0x4dd032(0x1bc)+_0x47f545+_0x4dd032(0x1ab)+_0x2c1fc9+_0x4dd032(0x1ac)+_0x44dc08+'\x22.');}
@@ -1 +1 @@
1
- const a21_0x1a56d5=a21_0x305d;(function(_0x10f85f,_0x431f30){const _0x3eacfe=a21_0x305d,_0x440f4a=_0x10f85f();while(!![]){try{const _0x441f2d=parseInt(_0x3eacfe(0x175))/0x1+parseInt(_0x3eacfe(0x16f))/0x2+-parseInt(_0x3eacfe(0x16e))/0x3*(-parseInt(_0x3eacfe(0x171))/0x4)+parseInt(_0x3eacfe(0x177))/0x5+parseInt(_0x3eacfe(0x174))/0x6*(-parseInt(_0x3eacfe(0x172))/0x7)+parseInt(_0x3eacfe(0x176))/0x8+parseInt(_0x3eacfe(0x16a))/0x9*(-parseInt(_0x3eacfe(0x179))/0xa);if(_0x441f2d===_0x431f30)break;else _0x440f4a['push'](_0x440f4a['shift']());}catch(_0x5c9d76){_0x440f4a['push'](_0x440f4a['shift']());}}}(a21_0xa00e,0x474be));function a21_0xa00e(){const _0x49e201=['1615915IrzcKY','Dataset\x20code\x20(32-char\x20hex\x20UUID)','6610UIOeQE','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','number','code','params','boolean','Resource\x20ID','sqlcode','19566bQELoA','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20name\x20for\x20lookup','verbose','522987YvYObq','405644rWfoWm','string','4JfJnlH','731843yVeGdb','name','6YMyJft','583956wEOQEP','4394424tMFNjW'];a21_0xa00e=function(){return _0x49e201;};return a21_0xa00e();}function a21_0x305d(_0x22214c,_0x404b5){_0x22214c=_0x22214c-0x167;const _0xa00e17=a21_0xa00e();let _0x305dc9=_0xa00e17[_0x22214c];return _0x305dc9;}export const GLOBAL_SCOPE_FLAG={'name':'global','type':'boolean','default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const CODE_FLAG={'name':a21_0x1a56d5(0x17c),'type':'string','required':!![],'description':a21_0x1a56d5(0x178),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a21_0x1a56d5(0x169),'type':'string','required':!![],'description':a21_0x1a56d5(0x17a),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a21_0x1a56d5(0x16d),'type':a21_0x1a56d5(0x167),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a21_0x1a56d5(0x17d),'type':a21_0x1a56d5(0x170),'description':a21_0x1a56d5(0x16b)};export const NAME_FLAG={'name':a21_0x1a56d5(0x173),'type':a21_0x1a56d5(0x170),'description':a21_0x1a56d5(0x16c)};export const ID_FLAG={'name':'id','type':a21_0x1a56d5(0x17b),'required':!![],'description':a21_0x1a56d5(0x168)};
1
+ function a21_0x4c0f(_0x4a096a,_0x791da3){_0x4a096a=_0x4a096a-0x98;const _0x3fe308=a21_0x3fe3();let _0x4c0f43=_0x3fe308[_0x4a096a];return _0x4c0f43;}const a21_0xb45f7b=a21_0x4c0f;(function(_0x2434b8,_0x3c400a){const _0x598f83=a21_0x4c0f,_0x44da1a=_0x2434b8();while(!![]){try{const _0x2ece34=parseInt(_0x598f83(0xa3))/0x1+parseInt(_0x598f83(0xaa))/0x2*(parseInt(_0x598f83(0x9a))/0x3)+parseInt(_0x598f83(0xa7))/0x4+parseInt(_0x598f83(0xa2))/0x5*(-parseInt(_0x598f83(0xa1))/0x6)+parseInt(_0x598f83(0x9e))/0x7*(-parseInt(_0x598f83(0xac))/0x8)+-parseInt(_0x598f83(0xab))/0x9*(-parseInt(_0x598f83(0xa5))/0xa)+parseInt(_0x598f83(0xa9))/0xb;if(_0x2ece34===_0x3c400a)break;else _0x44da1a['push'](_0x44da1a['shift']());}catch(_0x50ab53){_0x44da1a['push'](_0x44da1a['shift']());}}}(a21_0x3fe3,0x1c6bb));export const GLOBAL_SCOPE_FLAG={'name':a21_0xb45f7b(0xa0),'type':a21_0xb45f7b(0x98),'default':![],'description':a21_0xb45f7b(0xad)};export const CODE_FLAG={'name':a21_0xb45f7b(0x99),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0xb45f7b(0xa8)}};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a21_0xb45f7b(0x9f),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0xb45f7b(0x9d)}};export const VERBOSE_FLAG={'name':a21_0xb45f7b(0x9c),'type':'boolean','description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a21_0xb45f7b(0xa6),'type':a21_0xb45f7b(0xaf),'description':a21_0xb45f7b(0xb0)};export const NAME_FLAG={'name':a21_0xb45f7b(0xae),'type':'string','description':a21_0xb45f7b(0xa4)};function a21_0x3fe3(){const _0x254cc0=['53990ucNspf','params','838216iJYbVB','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','920282RhWBky','98310mdCNGf','9SRZBhF','19384mTNOmN','Write\x20to\x20the\x20global\x20configuration','name','string','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','boolean','code','6TiDZOq','Resource\x20ID','verbose','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','308XsxgKU','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','global','650520lLuIUY','10IprAVW','42938EXzdAK','Resource\x20name\x20for\x20lookup'];a21_0x3fe3=function(){return _0x254cc0;};return a21_0x3fe3();}export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a21_0xb45f7b(0x9b)};
@@ -1 +1 @@
1
- (function(_0x44f215,_0x30f826){const _0x38459a=a22_0x1dff,_0x5b0650=_0x44f215();while(!![]){try{const _0x226e8b=parseInt(_0x38459a(0x19f))/0x1*(-parseInt(_0x38459a(0x1a7))/0x2)+parseInt(_0x38459a(0x1b1))/0x3*(parseInt(_0x38459a(0x1b3))/0x4)+-parseInt(_0x38459a(0x1a8))/0x5*(parseInt(_0x38459a(0x1a3))/0x6)+-parseInt(_0x38459a(0x1b0))/0x7*(-parseInt(_0x38459a(0x1a5))/0x8)+-parseInt(_0x38459a(0x1a9))/0x9+parseInt(_0x38459a(0x1a0))/0xa*(parseInt(_0x38459a(0x1b2))/0xb)+-parseInt(_0x38459a(0x1a6))/0xc*(-parseInt(_0x38459a(0x1ad))/0xd);if(_0x226e8b===_0x30f826)break;else _0x5b0650['push'](_0x5b0650['shift']());}catch(_0x556662){_0x5b0650['push'](_0x5b0650['shift']());}}}(a22_0x3df3,0x9341c));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a22_0x1dff(_0x350718,_0x48d964){_0x350718=_0x350718-0x19f;const _0x3df39b=a22_0x3df3();let _0x1dff69=_0x3df39b[_0x350718];return _0x1dff69;}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x5a84be){const _0x3699bf=a22_0x1dff;if(_0x5a84be>=BYTES_PER_MB){const _0x4e90d7=Math[_0x3699bf(0x1ae)](_0x5a84be/BYTES_PER_MB*0x64)/0x64;return _0x4e90d7[_0x3699bf(0x1ac)](0x2)+_0x3699bf(0x1a1);}return _0x5a84be+'\x20B';}export function requireRuntimeUploadFile(_0x2ac149,_0x25686e){const _0x450f5e=a22_0x1dff,_0x37f643=_0x2ac149['trim']();if(!_0x37f643)throw CliErrors[_0x450f5e(0x1a4)](_0x25686e+'\x20path\x20is\x20required.');if(!existsSync(_0x37f643))throw CliErrors[_0x450f5e(0x1a4)](_0x450f5e(0x1af)+_0x37f643);const _0x53d611=statSync(_0x37f643);if(!_0x53d611[_0x450f5e(0x1a2)]())throw CliErrors['validation'](_0x450f5e(0x1aa)+_0x37f643);if(_0x53d611[_0x450f5e(0x1b4)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x450f5e(0x1a4)](_0x450f5e(0x1ab)+_0x37f643+'\x20('+formatBytes(_0x53d611['size'])+')');return{'path':_0x37f643,'size':_0x53d611[_0x450f5e(0x1b4)]};}function a22_0x3df3(){const _0x37ffe2=['\x20MB','isFile','6362622wPRhMG','validation','24dbsphU','4581948GvmGmX','10oMMkvO','5MqHqxj','9545400tTexHK','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','52AfXqPu','ceil','File\x20not\x20found:\x20','161077ucrhjb','51ZfKZeN','12537349BkfWuI','204136mSrkub','size','175897UQVjSl','10BiBjEO'];a22_0x3df3=function(){return _0x37ffe2;};return a22_0x3df3();}
1
+ function a22_0x1241(_0x417e64,_0x3e0973){_0x417e64=_0x417e64-0x1cc;const _0xab3993=a22_0xab39();let _0x124182=_0xab3993[_0x417e64];return _0x124182;}(function(_0x307819,_0x4a402b){const _0x3baf=a22_0x1241,_0x6c56ed=_0x307819();while(!![]){try{const _0x314c77=parseInt(_0x3baf(0x1d4))/0x1+-parseInt(_0x3baf(0x1d2))/0x2*(-parseInt(_0x3baf(0x1dd))/0x3)+-parseInt(_0x3baf(0x1d0))/0x4*(parseInt(_0x3baf(0x1d9))/0x5)+parseInt(_0x3baf(0x1cd))/0x6+-parseInt(_0x3baf(0x1d8))/0x7+-parseInt(_0x3baf(0x1cf))/0x8+-parseInt(_0x3baf(0x1d5))/0x9;if(_0x314c77===_0x4a402b)break;else _0x6c56ed['push'](_0x6c56ed['shift']());}catch(_0x3e6581){_0x6c56ed['push'](_0x6c56ed['shift']());}}}(a22_0xab39,0x64ad4));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a22_0xab39(){const _0x4d9303=['634885QpiKgT','745308nrAOcS','\x20MB','isFile','5318271tnMeYU','336120AMwGSM','size','validation','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','24aMXXRe','ceil','2436174SUTZkE','trim','3917448KfDCKV','4ZAsUBS','File\x20is\x20not\x20a\x20regular\x20file:\x20','192732XdyfBd','toFixed'];a22_0xab39=function(){return _0x4d9303;};return a22_0xab39();}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4c86f5){const _0x3b7066=a22_0x1241;if(_0x4c86f5>=BYTES_PER_MB){const _0x24ed92=Math[_0x3b7066(0x1cc)](_0x4c86f5/BYTES_PER_MB*0x64)/0x64;return _0x24ed92[_0x3b7066(0x1d3)](0x2)+_0x3b7066(0x1d6);}return _0x4c86f5+'\x20B';}export function requireRuntimeUploadFile(_0x510e9c,_0x52fad9){const _0x28e421=a22_0x1241,_0x5d1d40=_0x510e9c[_0x28e421(0x1ce)]();if(!_0x5d1d40)throw CliErrors[_0x28e421(0x1db)](_0x52fad9+'\x20path\x20is\x20required.');if(!existsSync(_0x5d1d40))throw CliErrors[_0x28e421(0x1db)]('File\x20not\x20found:\x20'+_0x5d1d40);const _0x3f2e51=statSync(_0x5d1d40);if(!_0x3f2e51[_0x28e421(0x1d7)]())throw CliErrors[_0x28e421(0x1db)](_0x28e421(0x1d1)+_0x5d1d40);if(_0x3f2e51['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x28e421(0x1db)](_0x28e421(0x1dc)+_0x5d1d40+'\x20('+formatBytes(_0x3f2e51[_0x28e421(0x1da)])+')');return{'path':_0x5d1d40,'size':_0x3f2e51['size']};}
@@ -1 +1 @@
1
- const a23_0x538553=a23_0x5746;(function(_0x11169e,_0x1c9b42){const _0x30c147=a23_0x5746,_0x420a4d=_0x11169e();while(!![]){try{const _0x35bf0c=-parseInt(_0x30c147(0x1a2))/0x1*(parseInt(_0x30c147(0x1b5))/0x2)+-parseInt(_0x30c147(0x1c3))/0x3*(parseInt(_0x30c147(0x1c7))/0x4)+parseInt(_0x30c147(0x1d0))/0x5+-parseInt(_0x30c147(0x1bd))/0x6*(-parseInt(_0x30c147(0x1b2))/0x7)+-parseInt(_0x30c147(0x1b8))/0x8+parseInt(_0x30c147(0x1bc))/0x9+parseInt(_0x30c147(0x19f))/0xa;if(_0x35bf0c===_0x1c9b42)break;else _0x420a4d['push'](_0x420a4d['shift']());}catch(_0x5d9d52){_0x420a4d['push'](_0x420a4d['shift']());}}}(a23_0x591f,0x4fcfd));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x2a298f){const _0x36807b=a23_0x5746,_0x3798a4=_0x2a298f['split']('.');if(_0x3798a4[_0x36807b(0x196)]!==0x3||_0x3798a4[0x0]!=='apps'||_0x3798a4[0x2]!==_0x36807b(0x1c0))return undefined;const _0x330fd1=_0x3798a4[0x1]?.['trim']();return _0x330fd1?_0x330fd1:undefined;}function parseAliasDeleteKey(_0xc5eefb){const _0x182fa1=a23_0x5746,_0x42830e=_0xc5eefb[_0x182fa1(0x194)]('.');if(_0x42830e['length']===0x2&&_0x42830e[0x0]===_0x182fa1(0x198)){const _0x3472eb=_0x42830e[0x1]?.[_0x182fa1(0x1bb)]();return _0x3472eb?{'alias':_0x3472eb}:undefined;}if(_0x42830e[_0x182fa1(0x196)]===0x3&&_0x42830e[0x0]===_0x182fa1(0x198)&&_0x42830e[0x2]===_0x182fa1(0x1c0)){const _0x4dffc4=_0x42830e[0x1]?.['trim']();return _0x4dffc4?{'alias':_0x4dffc4,'field':_0x182fa1(0x1c0)}:undefined;}return undefined;}function a23_0x5746(_0x5229e4,_0x15fb1e){_0x5229e4=_0x5229e4-0x193;const _0x591fa6=a23_0x591f();let _0x57462f=_0x591fa6[_0x5229e4];return _0x57462f;}function setLocalAppAlias(_0x11ca35,_0x161b41,_0x41fbe3){const _0x3b7438=a23_0x5746,_0x21c151=_0x11ca35[_0x3b7438(0x198)]&&typeof _0x11ca35[_0x3b7438(0x198)]===_0x3b7438(0x1b7)&&!Array[_0x3b7438(0x1b3)](_0x11ca35[_0x3b7438(0x198)])?_0x11ca35[_0x3b7438(0x198)]:{},_0x1fec0d=_0x21c151[_0x161b41]&&typeof _0x21c151[_0x161b41]===_0x3b7438(0x1b7)&&!Array[_0x3b7438(0x1b3)](_0x21c151[_0x161b41])?_0x21c151[_0x161b41]:{};_0x1fec0d[_0x3b7438(0x1c0)]=_0x41fbe3,_0x21c151[_0x161b41]=_0x1fec0d,_0x11ca35[_0x3b7438(0x198)]=_0x21c151;}function deleteLocalAppAlias(_0x5b74fd,_0x2f111e){const _0x149962=a23_0x5746;if(!_0x5b74fd[_0x149962(0x198)]||typeof _0x5b74fd[_0x149962(0x198)]!==_0x149962(0x1b7)||Array[_0x149962(0x1b3)](_0x5b74fd[_0x149962(0x198)]))return![];const _0x5f867b=_0x5b74fd[_0x149962(0x198)],_0x2be595=_0x5f867b[_0x2f111e[_0x149962(0x1d9)]];if(!_0x2be595||typeof _0x2be595!==_0x149962(0x1b7)||Array[_0x149962(0x1b3)](_0x2be595))return![];if(!_0x2f111e[_0x149962(0x1a5)])return delete _0x5f867b[_0x2f111e[_0x149962(0x1d9)]],!![];if(!(_0x2f111e[_0x149962(0x1a5)]in _0x2be595))return![];return delete _0x2be595[_0x2f111e[_0x149962(0x1a5)]],Object[_0x149962(0x1b6)](_0x2be595)['length']===0x0&&delete _0x5f867b[_0x2f111e['alias']],!![];}const listDef={'service':'config','command':a23_0x538553(0x1ca),'description':a23_0x538553(0x1c4),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c8c7d){const _0x48436e=a23_0x538553,{buildConfigFromFlags:_0x2677e0}=await import(_0x48436e(0x1af)),_0x23654a=_0x2677e0({}),_0x5741ce=redactCliConfigCredentials(_0x23654a[_0x48436e(0x19d)]),_0x5df66c=getProjectConfigPath(),_0x31d033=resolveWriteConfigPath('global');if(_0x1c8c7d[_0x48436e(0x1ae)]===_0x48436e(0x1d7))return{'ok':!![],'message':_0x48436e(0x1a0)+(JSON[_0x48436e(0x1c1)](_0x5741ce,null,0x2)+'\x0a\x0a')+_0x48436e(0x19b)+(_0x48436e(0x199)+(_0x5df66c??_0x48436e(0x19a))+'\x0a')+(_0x48436e(0x1c2)+_0x31d033)};return{'ok':!![],'data':{'effective':_0x5741ce,'configFiles':{'project':_0x5df66c??null,'global':_0x31d033}}};}},getDef={'service':a23_0x538553(0x193),'command':'get','description':a23_0x538553(0x1d4),'risk':a23_0x538553(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x37064b){const _0x1b74a0=a23_0x538553,_0xe1a075=_0x37064b['args'][0x0];if(!_0xe1a075)throw CliErrors[_0x1b74a0(0x1ce)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1b74a0(0x195));const {buildConfigFromFlags:_0x225d90}=await import(_0x1b74a0(0x1af)),{raw:_0x27ae95}=_0x225d90({});if(_0xe1a075[_0x1b74a0(0x1da)]('.')){const _0x6dec8f=_0xe1a075[_0x1b74a0(0x194)]('.');let _0x2a24af=_0x27ae95;for(const _0x4aa6a7 of _0x6dec8f){if(_0x2a24af==null||typeof _0x2a24af!=='object')throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);_0x2a24af=_0x2a24af[_0x4aa6a7];}if(_0x2a24af===undefined)throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);const _0x43044c=redactCliConfigValue(_0xe1a075,_0x2a24af);return console[_0x1b74a0(0x1bf)](typeof _0x43044c===_0x1b74a0(0x1b7)?JSON[_0x1b74a0(0x1c1)](_0x43044c,null,0x2):String(_0x43044c)),{'ok':!![]};}const _0x9355df=_0x27ae95[_0xe1a075];if(_0x9355df===undefined)throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);const _0x13b325=redactCliConfigValue(_0xe1a075,_0x9355df);return console[_0x1b74a0(0x1bf)](typeof _0x13b325===_0x1b74a0(0x1b7)?JSON[_0x1b74a0(0x1c1)](_0x13b325,null,0x2):String(_0x13b325)),{'ok':!![]};}},setDef={'service':a23_0x538553(0x193),'command':a23_0x538553(0x1cc),'description':a23_0x538553(0x1d5),'risk':a23_0x538553(0x1a7),'confirmationDescription':a23_0x538553(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x538553(0x1a9),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x538553(0x1d3),'description':a23_0x538553(0x1d6),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0xad164f){const _0xb39cd8=a23_0x538553,_0x3f4389=_0xad164f[_0xb39cd8(0x1ba)][0x0],_0x364417=_0xad164f[_0xb39cd8(0x1ba)][0x1];if(!_0x3f4389||_0x364417===undefined)throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x1d1),_0xb39cd8(0x1c5)+CLI_BIN_NAME+_0xb39cd8(0x1be));if(ENUM_KEYS[_0x3f4389]&&!ENUM_KEYS[_0x3f4389][_0xb39cd8(0x1da)](_0x364417))throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x1cf)+_0x3f4389+_0xb39cd8(0x1b0)+ENUM_KEYS[_0x3f4389][_0xb39cd8(0x1b1)](',\x20'));if(isCliProtectedConfigKey(_0x3f4389))throw CliErrors['validation']('\x22'+_0x3f4389+_0xb39cd8(0x1a1));if(_0x3f4389===_0xb39cd8(0x1ab)){const _0x5e8452=Number(_0x364417);if(isNaN(_0x5e8452)||_0x5e8452<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x12553c=resolveWriteScope({'explicitGlobal':_0xad164f[_0xb39cd8(0x1a4)](_0xb39cd8(0x1d2)),'policy':'project-or-global-explicit'}),_0x1649e5=toScopeFlags(_0x12553c),_0x59246b=readScopedConfig(_0x1649e5),_0x248e5e=parseAliasAppcodeSetKey(_0x3f4389);if(!_0x248e5e&&!isTopLevelConfigKey(_0x3f4389))throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x19c)+_0x3f4389+'\x22\x20is\x20not\x20settable.',_0xb39cd8(0x1aa)+getTopLevelConfigKeySummary()+_0xb39cd8(0x1c6));if(_0x248e5e)setLocalAppAlias(_0x59246b,_0x248e5e,_0x364417);else{if(_0x3f4389===_0xb39cd8(0x1c8)){const _0x20886a=normalizeLocale(_0x364417);if(!_0x20886a)throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x19e),_0xb39cd8(0x1a3));_0x59246b['locale']=_0x20886a;}else _0x59246b[_0x3f4389]=_0x3f4389===_0xb39cd8(0x1ab)?Number(_0x364417):DOMAIN_CONFIG_FIELDS[_0xb39cd8(0x1da)](_0x3f4389)?normalizeDomainOrigin(_0x3f4389,_0x364417):_0x364417;}const _0x1f8ba3=_0x3f4389===_0xb39cd8(0x1d8)?maskCliAccessKey(_0x364417):!_0x248e5e&&_0x3f4389===_0xb39cd8(0x1c8)?String(_0x59246b[_0xb39cd8(0x1c8)]):_0x364417;return console[_0xb39cd8(0x1bf)](_0xb39cd8(0x1cb)+_0x3f4389+_0xb39cd8(0x197)+_0x1f8ba3+'\x22'+(_0x12553c===_0xb39cd8(0x1d2)?_0xb39cd8(0x1ad):'')),writeScopedConfig(_0x59246b,_0x1649e5),{'ok':!![]};}},deleteDef={'service':'config','command':'delete','description':a23_0x538553(0x1a6),'risk':a23_0x538553(0x1a7),'confirmationDescription':'Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x5c95d5){const _0xb0c7c9=a23_0x538553,_0x7ea2ca=_0x5c95d5['args'][0x0];if(!_0x7ea2ca)throw CliErrors[_0xb0c7c9(0x1ce)](_0xb0c7c9(0x1c9),_0xb0c7c9(0x1c5)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x7ea2ca))throw CliErrors[_0xb0c7c9(0x1ce)]('\x22'+_0x7ea2ca+_0xb0c7c9(0x1a1));const _0x3cdd21=resolveWriteScope({'explicitGlobal':_0x5c95d5[_0xb0c7c9(0x1a4)](_0xb0c7c9(0x1d2)),'policy':'project-or-global-explicit'}),_0x36c1d9=toScopeFlags(_0x3cdd21),_0x261e16=readScopedConfig(_0x36c1d9),_0x43c278=parseAliasDeleteKey(_0x7ea2ca);if(_0x43c278){if(!deleteLocalAppAlias(_0x261e16,_0x43c278))return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1b9)+_0x7ea2ca+(_0x3cdd21===_0xb0c7c9(0x1d2)?_0xb0c7c9(0x1ad):'')),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':![]}};return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1ac)+_0x7ea2ca+'`'+(_0x3cdd21==='global'?_0xb0c7c9(0x1ad):'')),writeScopedConfig(_0x261e16,_0x36c1d9),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':!![]}};}if(_0x261e16[_0x7ea2ca]===undefined)return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1b9)+_0x7ea2ca+(_0x3cdd21===_0xb0c7c9(0x1d2)?_0xb0c7c9(0x1ad):'')),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':![]}};return delete _0x261e16[_0x7ea2ca],console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1ac)+_0x7ea2ca+'`'+(_0x3cdd21==='global'?_0xb0c7c9(0x1ad):'')),writeScopedConfig(_0x261e16,_0x36c1d9),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':!![]}};}};function a23_0x591f(){const _0x532312=['318624WLTfMj','\x20config\x20set\x20<key>\x20<value>\x20[--global]','log','appcode','stringify','\x20\x20global:\x20\x20','3NunAbr','List\x20current\x20config','Usage:\x20',';\x20apps.<alias>.appcode','1242768MxEoPb','locale','Missing\x20key\x20argument.','list','Set\x20`','set','Key\x20not\x20found:\x20','validation','Invalid\x20value\x20for\x20\x22','1932940DyrmKI','Missing\x20key\x20or\x20value.','global','value','Get\x20a\x20config\x20value','Set\x20a\x20configuration\x20value','Value\x20to\x20assign','pretty','accessKey','alias','includes','config','split','\x20config\x20get\x20<key>','length','`\x20=\x20\x22','apps','\x20\x20project:\x20','(none)','Config\x20files:\x0a','Top-level\x20key\x20\x22','raw','Invalid\x20locale\x20value.','3315420rlQbJN','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','3lTZlMM','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','bool','field','Delete\x20a\x20configuration\x20value','write','read','key','Settable\x20keys:\x20','pageSize','Deleted\x20`','\x20(global)','format','../../context.js','\x22.\x20Allowed:\x20','join','7UJwqEa','isArray','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','103840MGUakl','keys','object','3907544osklDb','Key\x20already\x20absent:\x20','args','trim','4595130tGcopv'];a23_0x591f=function(){return _0x532312;};return a23_0x591f();}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
1
+ const a23_0x4224ee=a23_0x164e;(function(_0x3e1dc0,_0x40ec6d){const _0x4e5061=a23_0x164e,_0x121ee9=_0x3e1dc0();while(!![]){try{const _0x6dc4=parseInt(_0x4e5061(0x149))/0x1*(parseInt(_0x4e5061(0x154))/0x2)+parseInt(_0x4e5061(0x136))/0x3+parseInt(_0x4e5061(0x179))/0x4*(-parseInt(_0x4e5061(0x14b))/0x5)+parseInt(_0x4e5061(0x15e))/0x6+parseInt(_0x4e5061(0x178))/0x7+parseInt(_0x4e5061(0x145))/0x8*(-parseInt(_0x4e5061(0x174))/0x9)+-parseInt(_0x4e5061(0x15c))/0xa;if(_0x6dc4===_0x40ec6d)break;else _0x121ee9['push'](_0x121ee9['shift']());}catch(_0x550e08){_0x121ee9['push'](_0x121ee9['shift']());}}}(a23_0x36ee,0x78765));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';function a23_0x164e(_0x2235bd,_0x1e6802){_0x2235bd=_0x2235bd-0x133;const _0x36ee8f=a23_0x36ee();let _0x164e04=_0x36ee8f[_0x2235bd];return _0x164e04;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x4ddee4){const _0x125ce9=a23_0x164e,_0x38bcd8=_0x4ddee4['split']('.');if(_0x38bcd8['length']!==0x3||_0x38bcd8[0x0]!==_0x125ce9(0x158)||_0x38bcd8[0x2]!==_0x125ce9(0x16d))return undefined;const _0x2aa188=_0x38bcd8[0x1]?.[_0x125ce9(0x14e)]();return _0x2aa188?_0x2aa188:undefined;}function parseAliasDeleteKey(_0x36296c){const _0x2d1361=a23_0x164e,_0x342f10=_0x36296c[_0x2d1361(0x157)]('.');if(_0x342f10[_0x2d1361(0x153)]===0x2&&_0x342f10[0x0]===_0x2d1361(0x158)){const _0x2cb4b0=_0x342f10[0x1]?.[_0x2d1361(0x14e)]();return _0x2cb4b0?{'alias':_0x2cb4b0}:undefined;}if(_0x342f10[_0x2d1361(0x153)]===0x3&&_0x342f10[0x0]===_0x2d1361(0x158)&&_0x342f10[0x2]===_0x2d1361(0x16d)){const _0x50b85d=_0x342f10[0x1]?.['trim']();return _0x50b85d?{'alias':_0x50b85d,'field':_0x2d1361(0x16d)}:undefined;}return undefined;}function setLocalAppAlias(_0x47153a,_0x1970ad,_0x581b4a){const _0xd0715d=a23_0x164e,_0x31f8be=_0x47153a['apps']&&typeof _0x47153a[_0xd0715d(0x158)]===_0xd0715d(0x156)&&!Array[_0xd0715d(0x13f)](_0x47153a[_0xd0715d(0x158)])?_0x47153a[_0xd0715d(0x158)]:{},_0x17ec9d=_0x31f8be[_0x1970ad]&&typeof _0x31f8be[_0x1970ad]==='object'&&!Array[_0xd0715d(0x13f)](_0x31f8be[_0x1970ad])?_0x31f8be[_0x1970ad]:{};_0x17ec9d[_0xd0715d(0x16d)]=_0x581b4a,_0x31f8be[_0x1970ad]=_0x17ec9d,_0x47153a['apps']=_0x31f8be;}function deleteLocalAppAlias(_0x50c82d,_0x5baefd){const _0x218579=a23_0x164e;if(!_0x50c82d[_0x218579(0x158)]||typeof _0x50c82d[_0x218579(0x158)]!==_0x218579(0x156)||Array[_0x218579(0x13f)](_0x50c82d[_0x218579(0x158)]))return![];const _0x4c19f0=_0x50c82d[_0x218579(0x158)],_0x4abb52=_0x4c19f0[_0x5baefd['alias']];if(!_0x4abb52||typeof _0x4abb52!==_0x218579(0x156)||Array['isArray'](_0x4abb52))return![];if(!_0x5baefd[_0x218579(0x143)])return delete _0x4c19f0[_0x5baefd['alias']],!![];if(!(_0x5baefd[_0x218579(0x143)]in _0x4abb52))return![];return delete _0x4abb52[_0x5baefd[_0x218579(0x143)]],Object[_0x218579(0x13c)](_0x4abb52)[_0x218579(0x153)]===0x0&&delete _0x4c19f0[_0x5baefd[_0x218579(0x177)]],!![];}function a23_0x36ee(){const _0x15a736=['key','Deleted\x20`','Top-level\x20key\x20\x22','Missing\x20key\x20or\x20value.','\x20config\x20get\x20<key>','9qOePZZ','\x20(global)','Invalid\x20locale\x20value.','alias','2205350hpVhrA','1624312eFSFkm','project-or-global-explicit','Key\x20not\x20found:\x20','\x20config\x20delete\x20<key>\x20[--global]','338361vmDbUT','read','accessKey','stringify','validation',';\x20apps.<alias>.appcode','keys','global','../../context.js','isArray','pageSize\x20must\x20be\x20a\x20positive\x20number','Settable\x20keys:\x20','\x20\x20global:\x20\x20','field','value','3600688RfQxTp','write','args','Config\x20files:\x0a','1tecTqu','\x20config\x20set\x20<key>\x20<value>\x20[--global]','5QZJXGa','config','bool','trim','Get\x20a\x20config\x20value','Missing\x20key\x20argument.','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','Key\x20already\x20absent:\x20','length','1889690iPCDSo','pretty','object','split','apps','\x22.\x20Allowed:\x20','Usage:\x20','log','5437290LjptrL','Value\x20to\x20assign','3123744hlpsOj','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','get','list','raw','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','locale','format','List\x20current\x20config','set','includes','Invalid\x20value\x20for\x20\x22','\x20\x20project:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x22\x20is\x20not\x20settable.','appcode','pageSize'];a23_0x36ee=function(){return _0x15a736;};return a23_0x36ee();}const listDef={'service':'config','command':a23_0x4224ee(0x161),'description':a23_0x4224ee(0x166),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3c15ba){const _0x425e85=a23_0x4224ee,{buildConfigFromFlags:_0x33b96f}=await import(_0x425e85(0x13e)),_0x5043f9=_0x33b96f({}),_0x28691d=redactCliConfigCredentials(_0x5043f9[_0x425e85(0x162)]),_0x25cfcb=getProjectConfigPath(),_0x1abc15=resolveWriteConfigPath(_0x425e85(0x13d));if(_0x3c15ba[_0x425e85(0x165)]===_0x425e85(0x155))return{'ok':!![],'message':_0x425e85(0x163)+(JSON['stringify'](_0x28691d,null,0x2)+'\x0a\x0a')+_0x425e85(0x148)+(_0x425e85(0x16a)+(_0x25cfcb??'(none)')+'\x0a')+(_0x425e85(0x142)+_0x1abc15)};return{'ok':!![],'data':{'effective':_0x28691d,'configFiles':{'project':_0x25cfcb??null,'global':_0x1abc15}}};}},getDef={'service':a23_0x4224ee(0x14c),'command':a23_0x4224ee(0x160),'description':a23_0x4224ee(0x14f),'risk':a23_0x4224ee(0x137),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x4224ee(0x16f),'description':a23_0x4224ee(0x16b),'required':!![]}],'flags':[],async 'execute'(_0x1107f0){const _0x1a6fe3=a23_0x4224ee,_0x169b40=_0x1107f0[_0x1a6fe3(0x147)][0x0];if(!_0x169b40)throw CliErrors[_0x1a6fe3(0x13a)](_0x1a6fe3(0x150),_0x1a6fe3(0x15a)+CLI_BIN_NAME+_0x1a6fe3(0x173));const {buildConfigFromFlags:_0x40e543}=await import('../../context.js'),{raw:_0xc3a1bd}=_0x40e543({});if(_0x169b40[_0x1a6fe3(0x168)]('.')){const _0x3a58c2=_0x169b40['split']('.');let _0x44561e=_0xc3a1bd;for(const _0x1587ca of _0x3a58c2){if(_0x44561e==null||typeof _0x44561e!=='object')throw CliErrors[_0x1a6fe3(0x13a)]('Key\x20not\x20found:\x20'+_0x169b40);_0x44561e=_0x44561e[_0x1587ca];}if(_0x44561e===undefined)throw CliErrors[_0x1a6fe3(0x13a)](_0x1a6fe3(0x134)+_0x169b40);const _0x47c6ff=redactCliConfigValue(_0x169b40,_0x44561e);return console[_0x1a6fe3(0x15b)](typeof _0x47c6ff===_0x1a6fe3(0x156)?JSON['stringify'](_0x47c6ff,null,0x2):String(_0x47c6ff)),{'ok':!![]};}const _0x297daa=_0xc3a1bd[_0x169b40];if(_0x297daa===undefined)throw CliErrors[_0x1a6fe3(0x13a)](_0x1a6fe3(0x134)+_0x169b40);const _0x2609c4=redactCliConfigValue(_0x169b40,_0x297daa);return console[_0x1a6fe3(0x15b)](typeof _0x2609c4==='object'?JSON[_0x1a6fe3(0x139)](_0x2609c4,null,0x2):String(_0x2609c4)),{'ok':!![]};}},setDef={'service':'config','command':a23_0x4224ee(0x167),'description':'Set\x20a\x20configuration\x20value','risk':'write','confirmationDescription':a23_0x4224ee(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x4224ee(0x16f),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x4224ee(0x144),'description':a23_0x4224ee(0x15d),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x2af41d){const _0x5bcd4d=a23_0x4224ee,_0x50d357=_0x2af41d['args'][0x0],_0x49281f=_0x2af41d['args'][0x1];if(!_0x50d357||_0x49281f===undefined)throw CliErrors[_0x5bcd4d(0x13a)](_0x5bcd4d(0x172),_0x5bcd4d(0x15a)+CLI_BIN_NAME+_0x5bcd4d(0x14a));if(ENUM_KEYS[_0x50d357]&&!ENUM_KEYS[_0x50d357][_0x5bcd4d(0x168)](_0x49281f))throw CliErrors['validation'](_0x5bcd4d(0x169)+_0x50d357+_0x5bcd4d(0x159)+ENUM_KEYS[_0x50d357]['join'](',\x20'));if(isCliProtectedConfigKey(_0x50d357))throw CliErrors[_0x5bcd4d(0x13a)]('\x22'+_0x50d357+_0x5bcd4d(0x15f));if(_0x50d357===_0x5bcd4d(0x16e)){const _0x194c26=Number(_0x49281f);if(isNaN(_0x194c26)||_0x194c26<=0x0)throw CliErrors[_0x5bcd4d(0x13a)](_0x5bcd4d(0x140));}const _0x5a3ee3=resolveWriteScope({'explicitGlobal':_0x2af41d[_0x5bcd4d(0x14d)](_0x5bcd4d(0x13d)),'policy':'project-or-global-explicit'}),_0x4d4b61=toScopeFlags(_0x5a3ee3),_0x92aa8b=readScopedConfig(_0x4d4b61),_0x3b73af=parseAliasAppcodeSetKey(_0x50d357);if(!_0x3b73af&&!isTopLevelConfigKey(_0x50d357))throw CliErrors['validation'](_0x5bcd4d(0x171)+_0x50d357+_0x5bcd4d(0x16c),_0x5bcd4d(0x141)+getTopLevelConfigKeySummary()+_0x5bcd4d(0x13b));if(_0x3b73af)setLocalAppAlias(_0x92aa8b,_0x3b73af,_0x49281f);else{if(_0x50d357===_0x5bcd4d(0x164)){const _0x16d1fc=normalizeLocale(_0x49281f);if(!_0x16d1fc)throw CliErrors[_0x5bcd4d(0x13a)](_0x5bcd4d(0x176),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x92aa8b[_0x5bcd4d(0x164)]=_0x16d1fc;}else _0x92aa8b[_0x50d357]=_0x50d357===_0x5bcd4d(0x16e)?Number(_0x49281f):DOMAIN_CONFIG_FIELDS[_0x5bcd4d(0x168)](_0x50d357)?normalizeDomainOrigin(_0x50d357,_0x49281f):_0x49281f;}const _0x503f89=_0x50d357===_0x5bcd4d(0x138)?maskCliAccessKey(_0x49281f):!_0x3b73af&&_0x50d357===_0x5bcd4d(0x164)?String(_0x92aa8b[_0x5bcd4d(0x164)]):_0x49281f;return console['log']('Set\x20`'+_0x50d357+'`\x20=\x20\x22'+_0x503f89+'\x22'+(_0x5a3ee3===_0x5bcd4d(0x13d)?_0x5bcd4d(0x175):'')),writeScopedConfig(_0x92aa8b,_0x4d4b61),{'ok':!![]};}},deleteDef={'service':a23_0x4224ee(0x14c),'command':'delete','description':'Delete\x20a\x20configuration\x20value','risk':a23_0x4224ee(0x146),'confirmationDescription':'Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x4224ee(0x16f),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x4e04be){const _0x557810=a23_0x4224ee,_0x8f2924=_0x4e04be['args'][0x0];if(!_0x8f2924)throw CliErrors[_0x557810(0x13a)](_0x557810(0x150),_0x557810(0x15a)+CLI_BIN_NAME+_0x557810(0x135));if(isCliProtectedConfigKey(_0x8f2924))throw CliErrors[_0x557810(0x13a)]('\x22'+_0x8f2924+_0x557810(0x15f));const _0x285de4=resolveWriteScope({'explicitGlobal':_0x4e04be[_0x557810(0x14d)](_0x557810(0x13d)),'policy':_0x557810(0x133)}),_0x50d2a6=toScopeFlags(_0x285de4),_0x1e97aa=readScopedConfig(_0x50d2a6),_0x3c706e=parseAliasDeleteKey(_0x8f2924);if(_0x3c706e){if(!deleteLocalAppAlias(_0x1e97aa,_0x3c706e))return console[_0x557810(0x15b)](_0x557810(0x152)+_0x8f2924+(_0x285de4===_0x557810(0x13d)?_0x557810(0x175):'')),{'ok':!![],'data':{'key':_0x8f2924,'scope':_0x285de4,'changed':![]}};return console[_0x557810(0x15b)]('Deleted\x20`'+_0x8f2924+'`'+(_0x285de4===_0x557810(0x13d)?_0x557810(0x175):'')),writeScopedConfig(_0x1e97aa,_0x50d2a6),{'ok':!![],'data':{'key':_0x8f2924,'scope':_0x285de4,'changed':!![]}};}if(_0x1e97aa[_0x8f2924]===undefined)return console[_0x557810(0x15b)](_0x557810(0x152)+_0x8f2924+(_0x285de4===_0x557810(0x13d)?_0x557810(0x175):'')),{'ok':!![],'data':{'key':_0x8f2924,'scope':_0x285de4,'changed':![]}};return delete _0x1e97aa[_0x8f2924],console[_0x557810(0x15b)](_0x557810(0x170)+_0x8f2924+'`'+(_0x285de4===_0x557810(0x13d)?_0x557810(0x175):'')),writeScopedConfig(_0x1e97aa,_0x50d2a6),{'ok':!![],'data':{'key':_0x8f2924,'scope':_0x285de4,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- const a24_0x30bc5e=a24_0x3cbf;(function(_0x5505df,_0x14181f){const _0x3c7364=a24_0x3cbf,_0x4ef14d=_0x5505df();while(!![]){try{const _0x74997b=-parseInt(_0x3c7364(0x1ec))/0x1+parseInt(_0x3c7364(0x1e9))/0x2*(-parseInt(_0x3c7364(0x1e8))/0x3)+-parseInt(_0x3c7364(0x1e2))/0x4+-parseInt(_0x3c7364(0x1f6))/0x5*(-parseInt(_0x3c7364(0x1e0))/0x6)+parseInt(_0x3c7364(0x200))/0x7+-parseInt(_0x3c7364(0x1f1))/0x8*(parseInt(_0x3c7364(0x1fc))/0x9)+parseInt(_0x3c7364(0x1eb))/0xa;if(_0x74997b===_0x14181f)break;else _0x4ef14d['push'](_0x4ef14d['shift']());}catch(_0x15c712){_0x4ef14d['push'](_0x4ef14d['shift']());}}}(a24_0x38c4,0x1c270));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';function a24_0x3cbf(_0x5eba65,_0x524efc){_0x5eba65=_0x5eba65-0x1da;const _0x38c42f=a24_0x38c4();let _0x3cbf73=_0x38c42f[_0x5eba65];return _0x3cbf73;}import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a24_0x30bc5e(0x1e5),'type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1f0)},{'name':a24_0x30bc5e(0x1f9),'type':'string','description':a24_0x30bc5e(0x1fb)},{'name':'runtime-domain','type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1f5)},{'name':'skill-domain','type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1ed)},{'name':a24_0x30bc5e(0x1dc),'type':a24_0x30bc5e(0x1f4),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'}];export const configInitFlags=[{'name':a24_0x30bc5e(0x1de),'type':'string','description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x26192b){const _0x22612a=a24_0x30bc5e,_0x5a0eba=_0x26192b['str']('region');if(_0x5a0eba){if(!isEnabledLovrabetRegion(_0x5a0eba))throw CliErrors['validation'](_0x22612a(0x1fe)+_0x5a0eba+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x22612a(0x1e7)](',\x20'));return _0x5a0eba;}if(_0x26192b['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x22612a(0x1e6)](_0x4efcaa=>({'name':OFFICIAL_ROUTING_PROFILES[_0x4efcaa]['label']+'\x20('+_0x4efcaa+')','value':_0x4efcaa}))});}catch(_0x5d8d07){if(_0x5d8d07?.[_0x22612a(0x1ea)]===_0x22612a(0x1e1))throw CliErrors[_0x22612a(0x1fa)]();throw _0x5d8d07;}}export async function executeConfigInit(_0x1bb20a){const _0x178d3c=a24_0x30bc5e,_0x54bdd7=resolveDomainConfigInput(_0x1bb20a),_0x57a431=_0x54bdd7[_0x178d3c(0x1ef)],_0x54c1d0=Object[_0x178d3c(0x1ff)](_0x57a431)[_0x178d3c(0x1fd)]>0x0;if(_0x54c1d0&&_0x1bb20a[_0x178d3c(0x1ee)](_0x178d3c(0x1de)))throw CliErrors['validation'](_0x178d3c(0x1e3));const _0x2b696c={'global':!![]},_0x3e5280=readScopedConfig(_0x2b696c);for(const _0xc17262 of DOMAIN_CONFIG_FIELDS)delete _0x3e5280[_0xc17262];for(const _0x56509e of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x3e5280[_0x56509e];delete _0x3e5280[_0x178d3c(0x1e4)];let _0x5bae88=null;if(_0x54c1d0)delete _0x3e5280['region'],_0x54bdd7[_0x178d3c(0x1dd)]===_0x178d3c(0x1df)?_0x3e5280[_0x178d3c(0x1e4)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x54bdd7['manifestDomains']}:Object[_0x178d3c(0x1f2)](_0x3e5280,_0x57a431);else{_0x5bae88=await resolveRegion(_0x1bb20a);if(_0x5bae88===DEFAULT_LOVRABET_REGION)delete _0x3e5280['region'];else _0x3e5280[_0x178d3c(0x1de)]=_0x5bae88;}return writeScopedConfig(_0x3e5280,_0x2b696c),{'ok':!![],'message':_0x54c1d0?'Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object['keys'](_0x54bdd7['mode']==='enterprise-v1'?_0x54bdd7[_0x178d3c(0x1f3)]:_0x57a431)['join'](',\x20')+'.':_0x178d3c(0x1db)+_0x5bae88+'.','data':{'mode':_0x54c1d0?'independent':'official','protocol':_0x54bdd7[_0x178d3c(0x1dd)]===_0x178d3c(0x1df)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5bae88,'domains':_0x57a431}};}function a24_0x38c4(){const _0x1dc89f=['keys','1141161tdFVLC','init','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','kb-service-domain','mode','region','enterprise-v1','260898EUATgn','ExitPromptError','172516ayoFbF','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','routing','user-domain','map','join','3jARyda','293386haMskD','name','1689720NBvZIL','66651PfGTuO','Custom\x20SkillHub\x20HTTPS\x20origin','str','domains','Custom\x20User\x20HTTPS\x20origin','16QAFDKJ','assign','manifestDomains','string','Custom\x20Runtime\x20HTTPS\x20origin','10modZYZ','config','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','api-domain','cancelled','Custom\x20platform\x20API\x20HTTPS\x20origin','212292gVyNlo','length','Region\x20\x22'];a24_0x38c4=function(){return _0x1dc89f;};return a24_0x38c4();}export const configInitDefinition={'service':a24_0x30bc5e(0x1f7),'command':a24_0x30bc5e(0x1da),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a24_0x30bc5e(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
1
+ function a24_0x29f7(){const _0x500f5b=['Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','433606uqtxAk','mode','validation','Official\x20Lovrabet\x20region:\x20','label','config','domains','Custom\x20KB\x20Service\x20HTTPS\x20origin','keys','Region\x20\x22','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','init','Select\x20Lovrabet\x20region','independent','official','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','1021575mOIbsA','Custom\x20User\x20HTTPS\x20origin','1YKdVdP','region','string','1670470zfXXpY','runtime-domain','name','9VWHJTi','cancelled','Independent-deployment\x20Domain\x20JSON\x20file','join','manifestDomains','kb-service-domain','138736aHolQe','Custom\x20SkillHub\x20HTTPS\x20origin','329376MtOpBg','map','30IzLamq','ExitPromptError','2433368SkCfIB','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','\x22\x20is\x20not\x20currently\x20available.','enterprise-v1','write','Custom\x20Runtime\x20HTTPS\x20origin','1558998VwjLCx'];a24_0x29f7=function(){return _0x500f5b;};return a24_0x29f7();}const a24_0x4edf39=a24_0x3564;(function(_0x529c81,_0x1193da){const _0x3c6907=a24_0x3564,_0x33c83a=_0x529c81();while(!![]){try{const _0x433e6a=parseInt(_0x3c6907(0x19b))/0x1*(parseInt(_0x3c6907(0x189))/0x2)+parseInt(_0x3c6907(0x199))/0x3+parseInt(_0x3c6907(0x1a7))/0x4*(-parseInt(_0x3c6907(0x17f))/0x5)+-parseInt(_0x3c6907(0x1a9))/0x6+-parseInt(_0x3c6907(0x187))/0x7+parseInt(_0x3c6907(0x181))/0x8+parseInt(_0x3c6907(0x1a1))/0x9*(-parseInt(_0x3c6907(0x19e))/0xa);if(_0x433e6a===_0x1193da)break;else _0x33c83a['push'](_0x33c83a['shift']());}catch(_0x6210d){_0x33c83a['push'](_0x33c83a['shift']());}}}(a24_0x29f7,0x32f62));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':a24_0x4edf39(0x19d),'description':a24_0x4edf39(0x1a3)},{'name':'user-domain','type':'string','description':a24_0x4edf39(0x19a)},{'name':'api-domain','type':a24_0x4edf39(0x19d),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a24_0x4edf39(0x19f),'type':a24_0x4edf39(0x19d),'description':a24_0x4edf39(0x186)},{'name':'skill-domain','type':a24_0x4edf39(0x19d),'description':a24_0x4edf39(0x1a8)},{'name':a24_0x4edf39(0x1a6),'type':'string','description':a24_0x4edf39(0x190)}];export const configInitFlags=[{'name':a24_0x4edf39(0x19c),'type':a24_0x4edf39(0x19d),'description':a24_0x4edf39(0x18c)+ENABLED_LOVRABET_REGION_VALUES[a24_0x4edf39(0x1a4)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x4a39e0){const _0x4e93b9=a24_0x4edf39,_0x3a72db=_0x4a39e0['str'](_0x4e93b9(0x19c));if(_0x3a72db){if(!isEnabledLovrabetRegion(_0x3a72db))throw CliErrors[_0x4e93b9(0x18b)](_0x4e93b9(0x192)+_0x3a72db+_0x4e93b9(0x183),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x4e93b9(0x1a4)](',\x20'));return _0x3a72db;}if(_0x4a39e0['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x4e93b9(0x195),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x4e93b9(0x1aa)](_0x538005=>({'name':OFFICIAL_ROUTING_PROFILES[_0x538005][_0x4e93b9(0x18d)]+'\x20('+_0x538005+')','value':_0x538005}))});}catch(_0x74f5d){if(_0x74f5d?.[_0x4e93b9(0x1a0)]===_0x4e93b9(0x180))throw CliErrors[_0x4e93b9(0x1a2)]();throw _0x74f5d;}}export async function executeConfigInit(_0x4c4956){const _0x873d9=a24_0x4edf39,_0x3e88f5=resolveDomainConfigInput(_0x4c4956),_0x4fdaaf=_0x3e88f5[_0x873d9(0x18f)],_0x33ef72=Object['keys'](_0x4fdaaf)['length']>0x0;if(_0x33ef72&&_0x4c4956['str']('region'))throw CliErrors[_0x873d9(0x18b)](_0x873d9(0x193));const _0x49e3b2={'global':!![]},_0x4a7d65=readScopedConfig(_0x49e3b2);for(const _0x3320e9 of DOMAIN_CONFIG_FIELDS)delete _0x4a7d65[_0x3320e9];for(const _0x172845 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4a7d65[_0x172845];delete _0x4a7d65['routing'];let _0x5063f1=null;if(_0x33ef72)delete _0x4a7d65[_0x873d9(0x19c)],_0x3e88f5[_0x873d9(0x18a)]===_0x873d9(0x184)?_0x4a7d65['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3e88f5[_0x873d9(0x1a5)]}:Object['assign'](_0x4a7d65,_0x4fdaaf);else{_0x5063f1=await resolveRegion(_0x4c4956);if(_0x5063f1===DEFAULT_LOVRABET_REGION)delete _0x4a7d65[_0x873d9(0x19c)];else _0x4a7d65[_0x873d9(0x19c)]=_0x5063f1;}return writeScopedConfig(_0x4a7d65,_0x49e3b2),{'ok':!![],'message':_0x33ef72?_0x873d9(0x188)+Object[_0x873d9(0x191)](_0x3e88f5['mode']===_0x873d9(0x184)?_0x3e88f5[_0x873d9(0x1a5)]:_0x4fdaaf)[_0x873d9(0x1a4)](',\x20')+'.':_0x873d9(0x182)+_0x5063f1+'.','data':{'mode':_0x33ef72?_0x873d9(0x196):_0x873d9(0x197),'protocol':_0x3e88f5[_0x873d9(0x18a)]===_0x873d9(0x184)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5063f1,'domains':_0x4fdaaf}};}function a24_0x3564(_0x318136,_0x2cbb80){_0x318136=_0x318136-0x17f;const _0x29f7bf=a24_0x29f7();let _0x3564a4=_0x29f7bf[_0x318136];return _0x3564a4;}export const configInitDefinition={'service':a24_0x4edf39(0x18e),'command':a24_0x4edf39(0x194),'description':a24_0x4edf39(0x198),'risk':a24_0x4edf39(0x185),'confirmationDescription':'Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
@@ -1 +1 @@
1
- function a25_0x5265(_0x5398dd,_0x4b9245){_0x5398dd=_0x5398dd-0xaf;var _0x4a45d7=a25_0x4a45();var _0x5265a7=_0x4a45d7[_0x5398dd];return _0x5265a7;}(function(_0x2c3dad,_0x2991a4){var _0x4b4ffa=a25_0x5265,_0x29f981=_0x2c3dad();while(!![]){try{var _0x43660e=-parseInt(_0x4b4ffa(0xb3))/0x1*(-parseInt(_0x4b4ffa(0xb0))/0x2)+parseInt(_0x4b4ffa(0xb5))/0x3+parseInt(_0x4b4ffa(0xb4))/0x4+-parseInt(_0x4b4ffa(0xb6))/0x5+-parseInt(_0x4b4ffa(0xb2))/0x6+parseInt(_0x4b4ffa(0xb7))/0x7*(parseInt(_0x4b4ffa(0xaf))/0x8)+-parseInt(_0x4b4ffa(0xb1))/0x9;if(_0x43660e===_0x2991a4)break;else _0x29f981['push'](_0x29f981['shift']());}catch(_0x4d7074){_0x29f981['push'](_0x29f981['shift']());}}}(a25_0x4a45,0xc10e6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a25_0x4a45(){var _0x545e01=['5697774NbcNFb','5919126KjBwwS','104610NQeKmT','3258544ZPbdxx','2768502qHWuFf','6578820QUImDA','7oubGrO','6703592dJCgXQ','22ldrLmT'];a25_0x4a45=function(){return _0x545e01;};return a25_0x4a45();}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(_0x5db277,_0x5ec4c0){var _0x2d2190=a25_0x5322,_0x46a7ab=_0x5db277();while(!![]){try{var _0x598efa=parseInt(_0x2d2190(0x1cf))/0x1+parseInt(_0x2d2190(0x1cb))/0x2+-parseInt(_0x2d2190(0x1d0))/0x3+parseInt(_0x2d2190(0x1d1))/0x4*(parseInt(_0x2d2190(0x1cd))/0x5)+parseInt(_0x2d2190(0x1cc))/0x6+parseInt(_0x2d2190(0x1ce))/0x7*(parseInt(_0x2d2190(0x1d3))/0x8)+-parseInt(_0x2d2190(0x1d2))/0x9;if(_0x598efa===_0x5ec4c0)break;else _0x46a7ab['push'](_0x46a7ab['shift']());}catch(_0x5289fc){_0x46a7ab['push'](_0x46a7ab['shift']());}}}(a25_0x16f0,0xab802));function a25_0x16f0(){var _0xfae4e0=['16ImhWLS','807894oHaCfw','8268672Rgkshc','55SItWAo','61747fCDYfI','996297glBctP','3888804YxAOyF','38908voaEUn','8138349HFTDLK'];a25_0x16f0=function(){return _0xfae4e0;};return a25_0x16f0();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a25_0x5322(_0x393df2,_0x319b5a){_0x393df2=_0x393df2-0x1cb;var _0x16f0c9=a25_0x16f0();var _0x532257=_0x16f0c9[_0x393df2];return _0x532257;}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 +1 @@
1
- const a26_0x37f433=a26_0x4ae0;(function(_0x4b2383,_0x1f5894){const _0x2d9378=a26_0x4ae0,_0x2d2312=_0x4b2383();while(!![]){try{const _0x1b43ea=parseInt(_0x2d9378(0x1ee))/0x1+-parseInt(_0x2d9378(0x1f6))/0x2+parseInt(_0x2d9378(0x1ec))/0x3*(parseInt(_0x2d9378(0x1f2))/0x4)+parseInt(_0x2d9378(0x1e4))/0x5+parseInt(_0x2d9378(0x1f8))/0x6*(parseInt(_0x2d9378(0x1e7))/0x7)+parseInt(_0x2d9378(0x1e3))/0x8*(parseInt(_0x2d9378(0x1c7))/0x9)+-parseInt(_0x2d9378(0x1e6))/0xa;if(_0x1b43ea===_0x1f5894)break;else _0x2d2312['push'](_0x2d2312['shift']());}catch(_0x18c6d1){_0x2d2312['push'](_0x2d2312['shift']());}}}(a26_0x5a0a,0x63aa2));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';function a26_0x5a0a(){const _0x31b400=['number','report','Excel\x20import\x20failed.','.lock','all','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','batch-size','warnings','header-row','media','appCode','\x20--code\x20','\x20records.','file','errors','/client/','1-based\x20Excel\x20header\x20row','str','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','/import-batch','values','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','sheet','9OwCzRe','reduce','schemaVersion','isInteger','.lock.recovery','invalid','size','max','string','Mapping\x20file\x20exceeds\x201\x20MB.','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','emptyRows','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','POST','.import-report.json','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.','toString','schemaFingerprint','resume','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','METADATA','parse','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','maxBatchSize','mapping','See\x20','imageCells','3275312aXCcZx','2897220PpYRoL','map','18372970RTNgns','28dUFXaO','batchSize','Imported\x20and\x20verified\x20','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','imageFields','3WOGTGO','bool','606721XUontr','checkpoint','data','num','2807916aBvKBe','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','utf8','.rows.json','882894YWgtjj','rows','584118ssougL','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','length','mappingFile','DB_TABLE','validation','isArray','slice'];a26_0x5a0a=function(){return _0x31b400;};return a26_0x5a0a();}import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function a26_0x4ae0(_0x2e9d18,_0x36c120){_0x2e9d18=_0x2e9d18-0x1c2;const _0x5a0a97=a26_0x5a0a();let _0x4ae0de=_0x5a0a97[_0x2e9d18];return _0x4ae0de;}function input(_0x57a592){const _0x429734=a26_0x4ae0,_0x4c9195=_0x57a592[_0x429734(0x211)](_0x429734(0x20d)),_0x2a23a8=_0x57a592['str'](_0x429734(0x1e0));if(!_0x4c9195||!_0x2a23a8)throw CliErrors['validation']('--file\x20and\x20--mapping\x20are\x20required.');const _0x46e051=_0x57a592['num'](_0x429734(0x208),0x1),_0x13f0b7=_0x57a592[_0x429734(0x1f1)](_0x429734(0x206),0x1f4);if(!Number['isInteger'](_0x46e051)||_0x46e051<0x1||!Number[_0x429734(0x1ca)](_0x13f0b7)||_0x13f0b7<0x1||_0x13f0b7>0x1f4)throw CliErrors['validation']('Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.');const _0x37dec1=resolve(_0x57a592['str']('checkpoint')||_0x4c9195+'.import-checkpoint.json'),_0x392403=resolve(_0x57a592['str'](_0x429734(0x201))||_0x4c9195+_0x429734(0x1d5)),_0x123962=[resolve(_0x4c9195),resolve(_0x2a23a8),_0x37dec1,_0x392403];if(new Set(_0x123962)[_0x429734(0x1cd)]!==_0x123962[_0x429734(0x1fa)])throw CliErrors['validation']('Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.');return{'file':resolve(_0x4c9195),'mappingFile':resolve(_0x2a23a8),'headerRow':_0x46e051,'batchSize':_0x13f0b7,'checkpoint':_0x37dec1,'report':_0x392403,'sheet':_0x57a592[_0x429734(0x211)](_0x429734(0x1c6))||undefined,'resume':_0x57a592[_0x429734(0x1ed)](_0x429734(0x1d9))};}async function prepare(_0x4cfc9e){const _0x5205dd=a26_0x4ae0,_0x558cbb=input(_0x4cfc9e),_0x2e493a=_0x4cfc9e[_0x5205dd(0x211)]('code');[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile'],_0x558cbb[_0x5205dd(0x1ef)],_0x558cbb['report']]=await Promise[_0x5205dd(0x204)]([realpath(_0x558cbb[_0x5205dd(0x20d)]),realpath(_0x558cbb[_0x5205dd(0x1fb)]),resolveImportOutputPath(_0x558cbb['checkpoint']),resolveImportOutputPath(_0x558cbb[_0x5205dd(0x201)])]),assertImportPaths(_0x558cbb[_0x5205dd(0x1ef)],_0x558cbb[_0x5205dd(0x201)],[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile']]);let _0x30ea0b;const _0x55c63c=await readFile(_0x558cbb[_0x5205dd(0x1fb)]);if(_0x55c63c[_0x5205dd(0x1fa)]>0x400*0x400)throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1d0));try{_0x30ea0b=JSON[_0x5205dd(0x1dc)](_0x55c63c[_0x5205dd(0x1d7)](_0x5205dd(0x1f4)));}catch{throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1da));}if(!_0x30ea0b||typeof _0x30ea0b!=='object'||Array[_0x5205dd(0x1fe)](_0x30ea0b)||Object[_0x5205dd(0x1c4)](_0x30ea0b)['some'](_0x25dfa3=>typeof _0x25dfa3!==_0x5205dd(0x1cf)))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1f3));const _0x35a5ae=await getDatasetDetail(_0x2e493a),_0x4468e0=assertDatasetImportTarget(_0x35a5ae,_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a);if(_0x4468e0===_0x5205dd(0x1fc))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x205),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x2e493a+'.\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'+_0x4cfc9e[_0x5205dd(0x20a)]+_0x5205dd(0x20b)+_0x2e493a+'\x20--params\x20\x27<JSON\x20array>\x27\x20--dry-run\x20using\x20the\x20target\x20app\x27s\x20User\x20AK\x20and\x20runtime\x20permissions.\x20Dry-run\x20only\x20previews\x20the\x20request;\x20verify\x20written\x20rows\x20before\x20advancing\x20and\x20reconcile\x20unknown\x20outcomes\x20before\x20retrying.\x20This\x20DB_TABLE\x20route\x20does\x20not\x20support\x20import\x20checkpoints\x20or\x20--resume.\x20See\x20references/lovrabet-db-table-excel-import.md\x20in\x20the\x20built-in\x20Skill.\x20No\x20import\x20request\x20was\x20sent.');if(_0x4468e0!==_0x5205dd(0x1db))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1d1),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x5b89ba=await buildExcelManifest({..._0x558cbb,'mapping':_0x30ea0b,'fields':normalizeImportFields(_0x35a5ae)}),_0x5cffde=await getDatasetImportContract(_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a);assertImportContract(_0x5cffde,_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a),assertImageImportCapability(_0x5cffde,_0x5b89ba);if(_0x5b89ba[_0x5205dd(0x1eb)]?.[_0x5205dd(0x1fa)]){const _0x4c6d88=await resolveImportOutputPath(_0x558cbb['checkpoint']+_0x5205dd(0x1f5)),_0x1c6ef8=await Promise[_0x5205dd(0x204)]([_0x4c6d88,_0x4c6d88+_0x5205dd(0x203),_0x4c6d88+_0x5205dd(0x1cb),_0x558cbb['checkpoint']+_0x5205dd(0x203),_0x558cbb[_0x5205dd(0x1ef)]+_0x5205dd(0x1cb)][_0x5205dd(0x1e5)](resolveImportOutputPath));assertImportPaths(_0x558cbb['checkpoint'],_0x558cbb['report'],[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile'],..._0x1c6ef8[_0x5205dd(0x1ff)](0x0,0x3)]);}if(_0x558cbb[_0x5205dd(0x1e8)]>_0x5cffde[_0x5205dd(0x1df)])throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1dd));return{'args':_0x558cbb,'manifest':_0x5b89ba,'contract':_0x5cffde,'code':_0x2e493a};}async function checked(_0x5cd6b8){const _0xd011b5=a26_0x4ae0;try{return await _0x5cd6b8();}catch(_0x4f1036){if(_0x4f1036 instanceof CliError)throw _0x4f1036;throw CliErrors[_0xd011b5(0x1fd)](_0x4f1036['message']||_0xd011b5(0x202));}}export const dataImportExcel={'service':a26_0x37f433(0x1f0),'command':'import-excel','risk':'write','description':a26_0x37f433(0x1d6),'confirmationDescription':a26_0x37f433(0x1ea),'flags':[CODE_FLAG,{'name':a26_0x37f433(0x20d),'type':a26_0x37f433(0x1cf),'required':!![],'description':a26_0x37f433(0x1c5)},{'name':a26_0x37f433(0x1e0),'type':'string','required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x37f433(0x1c6),'type':a26_0x37f433(0x1cf),'description':a26_0x37f433(0x1de)},{'name':a26_0x37f433(0x208),'type':a26_0x37f433(0x200),'default':0x1,'description':a26_0x37f433(0x210)},{'name':a26_0x37f433(0x206),'type':a26_0x37f433(0x200),'default':0x1f4,'description':'Maximum\x20records\x20per\x20request\x20(1..500)'},{'name':'checkpoint','type':a26_0x37f433(0x1cf),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':a26_0x37f433(0x201),'type':a26_0x37f433(0x1cf),'description':a26_0x37f433(0x1d3)},{'name':a26_0x37f433(0x1d9),'type':'boolean','description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x3d6ab4=>{input(_0x3d6ab4);},'dryRun':async _0x14f55d=>checked(async()=>{const _0x2e51d7=a26_0x37f433,{args:_0x146fc8,manifest:_0x33a9e5,contract:_0x9f65f4,code:_0x376480}=await prepare(_0x14f55d),_0x8f9edc=new Set(_0x33a9e5[_0x2e51d7(0x20e)][_0x2e51d7(0x1e5)](_0x3251be=>_0x3251be['rowNumber']))[_0x2e51d7(0x1cd)];return{'method':_0x2e51d7(0x1d4),'url':_0x2e51d7(0x20f)+encodeURIComponent(_0x14f55d[_0x2e51d7(0x20a)])+'/'+encodeURIComponent(_0x376480)+_0x2e51d7(0x1c3),'description':_0x2e51d7(0x1c2),'body':{'schemaFingerprint':_0x9f65f4[_0x2e51d7(0x1d8)]},'validRows':Math[_0x2e51d7(0x1ce)](0x0,_0x33a9e5['rows'][_0x2e51d7(0x1fa)]-_0x8f9edc),'invalidRows':_0x8f9edc,'invalidCells':_0x33a9e5[_0x2e51d7(0x20e)][_0x2e51d7(0x1fa)],'emptyRows':_0x33a9e5[_0x2e51d7(0x1d2)]['length'],'expectedBatches':previewImportBatchCount(_0x33a9e5,_0x9f65f4,_0x146fc8['batchSize']),'imageCount':_0x33a9e5[_0x2e51d7(0x1e2)]?.[_0x2e51d7(0x1c8)]((_0x2e97ec,_0x382ad3)=>_0x2e97ec+_0x382ad3['hashes'][_0x2e51d7(0x1fa)],0x0)??0x0,'uniqueImages':_0x33a9e5[_0x2e51d7(0x209)]?.[_0x2e51d7(0x1fa)]??0x0,'uniqueImageBytes':_0x33a9e5[_0x2e51d7(0x209)]?.[_0x2e51d7(0x1c8)]((_0x217cb9,_0xb1d775)=>_0x217cb9+_0xb1d775['size'],0x0)??0x0,'errors':_0x33a9e5[_0x2e51d7(0x20e)],'warnings':_0x33a9e5[_0x2e51d7(0x207)],'sheet':_0x33a9e5[_0x2e51d7(0x1c6)],'checkpoint':_0x146fc8['checkpoint'],'report':_0x146fc8[_0x2e51d7(0x201)]};}),'execute':async _0x1f285e=>checked(async()=>{const _0x6d940c=a26_0x37f433,{args:_0x3e93b4,manifest:_0x3417aa,contract:_0x171f2a,code:_0x2ce1de}=await prepare(_0x1f285e);if(_0x3417aa['errors'][_0x6d940c(0x1fa)]){await saveImportJson(_0x3e93b4[_0x6d940c(0x201)],{'status':_0x6d940c(0x1cc),'sourceRows':_0x3417aa[_0x6d940c(0x1f7)][_0x6d940c(0x1fa)],'errors':_0x3417aa[_0x6d940c(0x20e)],'emptyRows':_0x3417aa['emptyRows'],'warnings':_0x3417aa[_0x6d940c(0x207)]});throw CliErrors[_0x6d940c(0x1fd)]('Excel\x20contains\x20'+_0x3417aa['errors'][_0x6d940c(0x1fa)]+_0x6d940c(0x1f9),_0x6d940c(0x1e1)+_0x3e93b4[_0x6d940c(0x201)]+'.');}const _0x1f7fae=_0x3417aa['imageFields']?.[_0x6d940c(0x1fa)]?runImageExcelImport:_0x171f2a[_0x6d940c(0x1c9)]===0x2?runAutoIdExcelImport:runExcelImport,_0xeefe5d=await _0x1f7fae({..._0x3e93b4,'manifest':_0x3417aa,'contract':_0x171f2a,'appCode':_0x1f285e[_0x6d940c(0x20a)],'datasetCode':_0x2ce1de,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x3e93b4[_0x6d940c(0x20d)],_0x3e93b4[_0x6d940c(0x1fb)]],'imageApi':{'upload':(_0x40836c,_0x30d358)=>uploadDatasetImportImage(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x40836c,_0x30d358),'readback':(_0x2a2c55,_0x1b5882)=>readDatasetImportImage(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x2a2c55,_0x1b5882)},'api':{'write':(_0x395cf3,_0x598a94)=>createDatasetImportBatch(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,{'schemaFingerprint':_0x171f2a[_0x6d940c(0x1d8)],'items':_0x395cf3,..._0x598a94===undefined?{}:{'taskId':_0x598a94}}),'readback':_0x45be1f=>readDatasetImportRows(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x45be1f),'readTask':_0x85e027=>readDatasetImportTaskRows(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x85e027)}});return{'ok':!![],'data':_0xeefe5d,'message':_0x6d940c(0x1e9)+_0xeefe5d['succeeded']+_0x6d940c(0x20c)};})};
1
+ const a26_0x87ba11=a26_0x1564;(function(_0x2e8d6a,_0xc39f7){const _0x3dad1a=a26_0x1564,_0x17ec82=_0x2e8d6a();while(!![]){try{const _0x212bf0=parseInt(_0x3dad1a(0x1ef))/0x1*(-parseInt(_0x3dad1a(0x20b))/0x2)+-parseInt(_0x3dad1a(0x1cb))/0x3*(parseInt(_0x3dad1a(0x1d1))/0x4)+parseInt(_0x3dad1a(0x210))/0x5*(parseInt(_0x3dad1a(0x1ea))/0x6)+parseInt(_0x3dad1a(0x200))/0x7+parseInt(_0x3dad1a(0x1e7))/0x8+parseInt(_0x3dad1a(0x1e0))/0x9*(parseInt(_0x3dad1a(0x1f0))/0xa)+-parseInt(_0x3dad1a(0x1dc))/0xb;if(_0x212bf0===_0xc39f7)break;else _0x17ec82['push'](_0x17ec82['shift']());}catch(_0x4650f9){_0x17ec82['push'](_0x17ec82['shift']());}}}(a26_0x2350,0xd4bb9));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';function a26_0x1564(_0xa506f9,_0x312efb){_0xa506f9=_0xa506f9-0x1c0;const _0x23509e=a26_0x2350();let _0x1564aa=_0x23509e[_0xa506f9];return _0x1564aa;}import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';function a26_0x2350(){const _0x1124d3=['METADATA','invalid','num','emptyRows','6693456VlgSBL','maxBatchSize','rows','4434FyuvPi','string','checkpoint','errors','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','30jYGzLC','8510GVyDzn','.rows.json','mapping','hashes','some','Imported\x20and\x20verified\x20','See\x20','validation','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','imageCells','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','boolean','schemaVersion','imageFields','1-based\x20Excel\x20header\x20row','rowNumber','9308859CwNvAM','appCode','batch-size','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','import-excel','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.','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','number','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','44438YlPZzv','size','map','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','isInteger','230ewtXkx','.\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','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','reduce','sheet','.lock.recovery','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.','schemaFingerprint','isArray','utf8','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','length','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','media','15tpcqSR','.import-checkpoint.json','header-row','POST','Maximum\x20records\x20per\x20request\x20(1..500)','values','564892usiqUB','succeeded','mappingFile','parse','.lock','write','file','bool','/import-batch','Mapping\x20file\x20exceeds\x201\x20MB.','/client/','7365743uLOgiU','code','report','str','7542Utxamv','all','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)'];a26_0x2350=function(){return _0x1124d3;};return a26_0x2350();}import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x16476f){const _0x1efd47=a26_0x1564,_0x394596=_0x16476f[_0x1efd47(0x1df)](_0x1efd47(0x1d7)),_0x2da6e9=_0x16476f[_0x1efd47(0x1df)]('mapping');if(!_0x394596||!_0x2da6e9)throw CliErrors[_0x1efd47(0x1f7)]('--file\x20and\x20--mapping\x20are\x20required.');const _0x4d38cc=_0x16476f[_0x1efd47(0x1e5)](_0x1efd47(0x1cd),0x1),_0x4f1072=_0x16476f[_0x1efd47(0x1e5)](_0x1efd47(0x202),0x1f4);if(!Number[_0x1efd47(0x20f)](_0x4d38cc)||_0x4d38cc<0x1||!Number[_0x1efd47(0x20f)](_0x4f1072)||_0x4f1072<0x1||_0x4f1072>0x1f4)throw CliErrors[_0x1efd47(0x1f7)](_0x1efd47(0x20e));const _0x1a43c2=resolve(_0x16476f[_0x1efd47(0x1df)](_0x1efd47(0x1ec))||_0x394596+_0x1efd47(0x1cc)),_0x8175cf=resolve(_0x16476f[_0x1efd47(0x1df)](_0x1efd47(0x1de))||_0x394596+'.import-report.json'),_0x3af60d=[resolve(_0x394596),resolve(_0x2da6e9),_0x1a43c2,_0x8175cf];if(new Set(_0x3af60d)[_0x1efd47(0x20c)]!==_0x3af60d[_0x1efd47(0x1c8)])throw CliErrors[_0x1efd47(0x1f7)](_0x1efd47(0x203));return{'file':resolve(_0x394596),'mappingFile':resolve(_0x2da6e9),'headerRow':_0x4d38cc,'batchSize':_0x4f1072,'checkpoint':_0x1a43c2,'report':_0x8175cf,'sheet':_0x16476f[_0x1efd47(0x1df)](_0x1efd47(0x1c0))||undefined,'resume':_0x16476f[_0x1efd47(0x1d8)]('resume')};}async function prepare(_0x96b0cf){const _0x2d35c4=a26_0x1564,_0x48ca26=input(_0x96b0cf),_0xa667d2=_0x96b0cf[_0x2d35c4(0x1df)](_0x2d35c4(0x1dd));[_0x48ca26[_0x2d35c4(0x1d7)],_0x48ca26['mappingFile'],_0x48ca26[_0x2d35c4(0x1ec)],_0x48ca26[_0x2d35c4(0x1de)]]=await Promise[_0x2d35c4(0x1e1)]([realpath(_0x48ca26['file']),realpath(_0x48ca26[_0x2d35c4(0x1d3)]),resolveImportOutputPath(_0x48ca26[_0x2d35c4(0x1ec)]),resolveImportOutputPath(_0x48ca26[_0x2d35c4(0x1de)])]),assertImportPaths(_0x48ca26[_0x2d35c4(0x1ec)],_0x48ca26[_0x2d35c4(0x1de)],[_0x48ca26['file'],_0x48ca26[_0x2d35c4(0x1d3)]]);let _0x28577c;const _0x53b0d0=await readFile(_0x48ca26[_0x2d35c4(0x1d3)]);if(_0x53b0d0[_0x2d35c4(0x1c8)]>0x400*0x400)throw CliErrors['validation'](_0x2d35c4(0x1da));try{_0x28577c=JSON[_0x2d35c4(0x1d4)](_0x53b0d0['toString'](_0x2d35c4(0x1c6)));}catch{throw CliErrors[_0x2d35c4(0x1f7)]('Mapping\x20file\x20must\x20contain\x20valid\x20JSON.');}if(!_0x28577c||typeof _0x28577c!=='object'||Array[_0x2d35c4(0x1c5)](_0x28577c)||Object[_0x2d35c4(0x1d0)](_0x28577c)[_0x2d35c4(0x1f4)](_0x20741e=>typeof _0x20741e!==_0x2d35c4(0x1eb)))throw CliErrors[_0x2d35c4(0x1f7)]('Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.');const _0x6144e2=await getDatasetDetail(_0xa667d2),_0x2b9a7a=assertDatasetImportTarget(_0x6144e2,_0x96b0cf[_0x2d35c4(0x201)],_0xa667d2);if(_0x2b9a7a==='DB_TABLE')throw CliErrors[_0x2d35c4(0x1f7)](_0x2d35c4(0x208),_0x2d35c4(0x212)+_0xa667d2+_0x2d35c4(0x211)+_0x96b0cf[_0x2d35c4(0x201)]+'\x20--code\x20'+_0xa667d2+_0x2d35c4(0x1c3));if(_0x2b9a7a!==_0x2d35c4(0x1e3))throw CliErrors[_0x2d35c4(0x1f7)](_0x2d35c4(0x206),_0x2d35c4(0x1fa));const _0x1db602=await buildExcelManifest({..._0x48ca26,'mapping':_0x28577c,'fields':normalizeImportFields(_0x6144e2)}),_0xbf9674=await getDatasetImportContract(_0x96b0cf[_0x2d35c4(0x201)],_0xa667d2);assertImportContract(_0xbf9674,_0x96b0cf[_0x2d35c4(0x201)],_0xa667d2),assertImageImportCapability(_0xbf9674,_0x1db602);if(_0x1db602[_0x2d35c4(0x1fd)]?.[_0x2d35c4(0x1c8)]){const _0x59a517=await resolveImportOutputPath(_0x48ca26[_0x2d35c4(0x1ec)]+_0x2d35c4(0x1f1)),_0x2b2044=await Promise[_0x2d35c4(0x1e1)]([_0x59a517,_0x59a517+'.lock',_0x59a517+_0x2d35c4(0x1c1),_0x48ca26[_0x2d35c4(0x1ec)]+_0x2d35c4(0x1d5),_0x48ca26['checkpoint']+_0x2d35c4(0x1c1)]['map'](resolveImportOutputPath));assertImportPaths(_0x48ca26['checkpoint'],_0x48ca26[_0x2d35c4(0x1de)],[_0x48ca26[_0x2d35c4(0x1d7)],_0x48ca26[_0x2d35c4(0x1d3)],..._0x2b2044['slice'](0x0,0x3)]);}if(_0x48ca26['batchSize']>_0xbf9674[_0x2d35c4(0x1e8)])throw CliErrors[_0x2d35c4(0x1f7)](_0x2d35c4(0x1c7));return{'args':_0x48ca26,'manifest':_0x1db602,'contract':_0xbf9674,'code':_0xa667d2};}async function checked(_0x135da3){try{return await _0x135da3();}catch(_0x2a4366){if(_0x2a4366 instanceof CliError)throw _0x2a4366;throw CliErrors['validation'](_0x2a4366['message']||'Excel\x20import\x20failed.');}}export const dataImportExcel={'service':'data','command':a26_0x87ba11(0x204),'risk':a26_0x87ba11(0x1d6),'description':a26_0x87ba11(0x205),'confirmationDescription':a26_0x87ba11(0x1c2),'flags':[CODE_FLAG,{'name':a26_0x87ba11(0x1d7),'type':a26_0x87ba11(0x1eb),'required':!![],'description':a26_0x87ba11(0x1ee)},{'name':a26_0x87ba11(0x1f2),'type':a26_0x87ba11(0x1eb),'required':!![],'description':a26_0x87ba11(0x209)},{'name':a26_0x87ba11(0x1c0),'type':'string','description':a26_0x87ba11(0x1e2)},{'name':'header-row','type':a26_0x87ba11(0x207),'default':0x1,'description':a26_0x87ba11(0x1fe)},{'name':a26_0x87ba11(0x202),'type':a26_0x87ba11(0x207),'default':0x1f4,'description':a26_0x87ba11(0x1cf)},{'name':'checkpoint','type':a26_0x87ba11(0x1eb),'description':a26_0x87ba11(0x20a)},{'name':a26_0x87ba11(0x1de),'type':a26_0x87ba11(0x1eb),'description':a26_0x87ba11(0x1c9)},{'name':'resume','type':a26_0x87ba11(0x1fb),'description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x2e3df8=>{input(_0x2e3df8);},'dryRun':async _0x14cd0a=>checked(async()=>{const _0x8f6e00=a26_0x87ba11,{args:_0x3ff0af,manifest:_0x4c6897,contract:_0x529a8d,code:_0x27c9cb}=await prepare(_0x14cd0a),_0x775e72=new Set(_0x4c6897[_0x8f6e00(0x1ed)][_0x8f6e00(0x20d)](_0x43793b=>_0x43793b[_0x8f6e00(0x1ff)]))[_0x8f6e00(0x20c)];return{'method':_0x8f6e00(0x1ce),'url':_0x8f6e00(0x1db)+encodeURIComponent(_0x14cd0a[_0x8f6e00(0x201)])+'/'+encodeURIComponent(_0x27c9cb)+_0x8f6e00(0x1d9),'description':'Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','body':{'schemaFingerprint':_0x529a8d[_0x8f6e00(0x1c4)]},'validRows':Math['max'](0x0,_0x4c6897[_0x8f6e00(0x1e9)][_0x8f6e00(0x1c8)]-_0x775e72),'invalidRows':_0x775e72,'invalidCells':_0x4c6897[_0x8f6e00(0x1ed)][_0x8f6e00(0x1c8)],'emptyRows':_0x4c6897[_0x8f6e00(0x1e6)]['length'],'expectedBatches':previewImportBatchCount(_0x4c6897,_0x529a8d,_0x3ff0af['batchSize']),'imageCount':_0x4c6897[_0x8f6e00(0x1f9)]?.[_0x8f6e00(0x213)]((_0x44d8d4,_0x459537)=>_0x44d8d4+_0x459537[_0x8f6e00(0x1f3)]['length'],0x0)??0x0,'uniqueImages':_0x4c6897[_0x8f6e00(0x1ca)]?.[_0x8f6e00(0x1c8)]??0x0,'uniqueImageBytes':_0x4c6897[_0x8f6e00(0x1ca)]?.['reduce']((_0xea4cc7,_0xbdfe67)=>_0xea4cc7+_0xbdfe67['size'],0x0)??0x0,'errors':_0x4c6897[_0x8f6e00(0x1ed)],'warnings':_0x4c6897['warnings'],'sheet':_0x4c6897[_0x8f6e00(0x1c0)],'checkpoint':_0x3ff0af[_0x8f6e00(0x1ec)],'report':_0x3ff0af[_0x8f6e00(0x1de)]};}),'execute':async _0x210826=>checked(async()=>{const _0x2d05f2=a26_0x87ba11,{args:_0x4c1d09,manifest:_0x1a5655,contract:_0x55cf13,code:_0x1fe13d}=await prepare(_0x210826);if(_0x1a5655[_0x2d05f2(0x1ed)][_0x2d05f2(0x1c8)]){await saveImportJson(_0x4c1d09[_0x2d05f2(0x1de)],{'status':_0x2d05f2(0x1e4),'sourceRows':_0x1a5655[_0x2d05f2(0x1e9)][_0x2d05f2(0x1c8)],'errors':_0x1a5655[_0x2d05f2(0x1ed)],'emptyRows':_0x1a5655[_0x2d05f2(0x1e6)],'warnings':_0x1a5655['warnings']});throw CliErrors['validation']('Excel\x20contains\x20'+_0x1a5655[_0x2d05f2(0x1ed)][_0x2d05f2(0x1c8)]+_0x2d05f2(0x1f8),_0x2d05f2(0x1f6)+_0x4c1d09[_0x2d05f2(0x1de)]+'.');}const _0x57acad=_0x1a5655[_0x2d05f2(0x1fd)]?.[_0x2d05f2(0x1c8)]?runImageExcelImport:_0x55cf13[_0x2d05f2(0x1fc)]===0x2?runAutoIdExcelImport:runExcelImport,_0x23da5c=await _0x57acad({..._0x4c1d09,'manifest':_0x1a5655,'contract':_0x55cf13,'appCode':_0x210826[_0x2d05f2(0x201)],'datasetCode':_0x1fe13d,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x4c1d09[_0x2d05f2(0x1d7)],_0x4c1d09['mappingFile']],'imageApi':{'upload':(_0x41ad40,_0x54493f)=>uploadDatasetImportImage(_0x210826[_0x2d05f2(0x201)],_0x1fe13d,_0x41ad40,_0x54493f),'readback':(_0x48b430,_0x21da27)=>readDatasetImportImage(_0x210826['appCode'],_0x1fe13d,_0x48b430,_0x21da27)},'api':{'write':(_0x140350,_0x3f43d8)=>createDatasetImportBatch(_0x210826['appCode'],_0x1fe13d,{'schemaFingerprint':_0x55cf13['schemaFingerprint'],'items':_0x140350,..._0x3f43d8===undefined?{}:{'taskId':_0x3f43d8}}),'readback':_0x1b625b=>readDatasetImportRows(_0x210826[_0x2d05f2(0x201)],_0x1fe13d,_0x1b625b),'readTask':_0x4e53a2=>readDatasetImportTaskRows(_0x210826[_0x2d05f2(0x201)],_0x1fe13d,_0x4e53a2)}});return{'ok':!![],'data':_0x23da5c,'message':_0x2d05f2(0x1f5)+_0x23da5c[_0x2d05f2(0x1d2)]+'\x20records.'};})};