@lovrabet/lovrabet-cli 2.1.15-beta.1 → 2.1.15

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 (119) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/index.js +1 -1
  13. package/lib/commands/auth/prompt.js +1 -1
  14. package/lib/commands/bff/detail.js +1 -1
  15. package/lib/commands/bff/exec.js +1 -1
  16. package/lib/commands/bff/index.js +1 -1
  17. package/lib/commands/cli-skill/index.js +1 -1
  18. package/lib/commands/common/config-policy.js +1 -1
  19. package/lib/commands/common/constraints.js +1 -1
  20. package/lib/commands/common/flags.js +1 -1
  21. package/lib/commands/common/local-file.js +1 -1
  22. package/lib/commands/config/definitions.js +1 -1
  23. package/lib/commands/config/shared.js +1 -1
  24. package/lib/commands/data/index.js +1 -1
  25. package/lib/commands/dataset/detail.js +1 -1
  26. package/lib/commands/dataset/index.js +1 -1
  27. package/lib/commands/dataset/list.js +1 -1
  28. package/lib/commands/dataset/sdk-doc.js +1 -1
  29. package/lib/commands/doctor.js +1 -1
  30. package/lib/commands/file/index.js +1 -1
  31. package/lib/commands/init.js +1 -1
  32. package/lib/commands/kb/index.js +1 -1
  33. package/lib/commands/logs/index.js +1 -1
  34. package/lib/commands/ocr/index.js +1 -1
  35. package/lib/commands/personal-bff/index.js +1 -1
  36. package/lib/commands/registry.js +1 -1
  37. package/lib/commands/schema.js +1 -1
  38. package/lib/commands/service/dynamic.js +1 -1
  39. package/lib/commands/service/function-name-adapter.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/rate-limit.js +1 -1
  87. package/lib/framework/response.js +1 -1
  88. package/lib/framework/runner-confirmation.js +1 -1
  89. package/lib/framework/runner-error.js +1 -1
  90. package/lib/framework/runner.js +1 -1
  91. package/lib/framework/schema-export.js +1 -1
  92. package/lib/framework/service-order.js +1 -1
  93. package/lib/framework/types.js +1 -1
  94. package/lib/generated/build-info.js +1 -1
  95. package/lib/help.js +1 -1
  96. package/lib/skills/npx-skills-add.js +1 -1
  97. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  98. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  99. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  100. package/lib/skills/runtime-skill-sync/links.js +1 -1
  101. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  102. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  103. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  104. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  105. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  106. package/lib/skills/runtime-skill-sync/push.js +1 -1
  107. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  110. package/lib/skills/runtime-skill-sync.js +1 -1
  111. package/lib/utils/apply-jq-filter.js +1 -1
  112. package/lib/utils/logger.js +1 -1
  113. package/lib/utils/lossless-json.js +1 -1
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x234af0=a0_0x20f4;(function(_0x6c7a0,_0x3bc8fa){const _0x453c16=a0_0x20f4,_0x2abf82=_0x6c7a0();while(!![]){try{const _0x298a01=parseInt(_0x453c16(0xd1))/0x1*(-parseInt(_0x453c16(0xca))/0x2)+-parseInt(_0x453c16(0xc7))/0x3*(-parseInt(_0x453c16(0xc1))/0x4)+-parseInt(_0x453c16(0xc4))/0x5*(-parseInt(_0x453c16(0xac))/0x6)+-parseInt(_0x453c16(0xd0))/0x7+-parseInt(_0x453c16(0xb1))/0x8+parseInt(_0x453c16(0xaa))/0x9*(-parseInt(_0x453c16(0xcb))/0xa)+parseInt(_0x453c16(0xbf))/0xb;if(_0x298a01===_0x3bc8fa)break;else _0x2abf82['push'](_0x2abf82['shift']());}catch(_0x1c56c4){_0x2abf82['push'](_0x2abf82['shift']());}}}(a0_0x150c,0xba313));import{jsx as a0_0x2e9767}from'react/jsx-runtime';import a0_0xa4c04a from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';function a0_0x150c(){const _0x10bb1d=['./framework/preparse.js','cancelled','write','\x0aCancelled.\x0a','ERR_STREAM_DESTROYED','input','error','assign','exit','13503688OpiQYT','Hint:\x20','1541044VqKnAg','help','ExitPromptError','3065TGYyhk','\x20->\x20--','unknownCommand','6Dpndql','slice','ERR_USE_AFTER_CLOSE','10akJaCp','20RgJdrm','Error:\x20','log','stderr','code','3924186buovGb','195957wfqQZW','exitCode',':\x20--','definition','978066PABqke','flags','8862rNGBOc','[preparse]\x20','catch','args','defaultCommand','3065256oOUufB','length','corrected','original','message'];a0_0x150c=function(){return _0x10bb1d;};return a0_0x150c();}import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0xa4c04a(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x234af0(0xae)](handleError);async function main(){try{await run();}catch(_0x17e751){handleError(_0x17e751);}}function a0_0x20f4(_0x34199c,_0x112a8b){_0x34199c=_0x34199c-0xa7;const _0x150c1b=a0_0x150c();let _0x20f4f3=_0x150c1b[_0x34199c];return _0x20f4f3;}async function run(){const _0xee2264=a0_0x234af0;let _0x1e874c=cli['input'][0x0],_0x5000d5=cli[_0xee2264(0xbb)][0x1];const _0x1c9f64=cli['flags'];try{const {correctFlags:_0x29bd9b}=await import(_0xee2264(0xb6)),_0x5239d4=getAllDefinitions()['flatMap'](_0x69a487=>_0x69a487[_0xee2264(0xab)]??[]),{flags:_0xbd167,corrections:_0xef993b}=_0x29bd9b(_0x1c9f64,_0x5239d4);if(_0xef993b[_0xee2264(0xb2)]>0x0){for(const _0x4eef51 of _0xef993b){process[_0xee2264(0xce)][_0xee2264(0xb8)](_0xee2264(0xad)+_0x4eef51['handler']+_0xee2264(0xa8)+_0x4eef51[_0xee2264(0xb4)]+_0xee2264(0xc5)+_0x4eef51[_0xee2264(0xb3)]+'\x0a');}Object[_0xee2264(0xbd)](_0x1c9f64,_0xbd167);}}catch{}if(!_0x1e874c){const {waitUntilExit:_0x52ee57}=render(a0_0x2e9767(Help,{}));await _0x52ee57();return;}if(!isKnownService(_0x1e874c)){const _0x4d6b74=resolveDynamicServiceCommand(cli[_0xee2264(0xbb)],_0x1c9f64);if(_0x4d6b74){if(_0x1c9f64[_0xee2264(0xc2)]){console[_0xee2264(0xcd)](generateCommandHelp(_0x4d6b74[_0xee2264(0xa9)]));return;}Object[_0xee2264(0xbd)](_0x1c9f64,_0x4d6b74[_0xee2264(0xab)]);const _0x1e7895=buildConfigFromFlags(_0x1c9f64);await initGlobalEnvironment(_0x1e7895);const _0x54a690=createPipelineEnv(_0x1e7895,_0x1c9f64);_0x54a690['args']=_0x4d6b74[_0xee2264(0xaf)],await runCommand(_0x4d6b74[_0xee2264(0xa9)],_0x54a690);return;}if(_0x1c9f64[_0xee2264(0xc2)]){const _0x21535c=generateDynamicServiceHelp(_0x1e874c);if(_0x21535c){console[_0xee2264(0xcd)](_0x21535c);return;}}const {waitUntilExit:_0x19161b}=render(a0_0x2e9767(Help,{}));await _0x19161b();return;}const _0x5686c0=getServiceEntry(_0x1e874c);if(!_0x5000d5){if(_0x1c9f64[_0xee2264(0xc2)]){console[_0xee2264(0xcd)](generateServiceHelp(_0x1e874c));return;}if(_0x5686c0[_0xee2264(0xb0)])_0x5000d5=_0x5686c0[_0xee2264(0xb0)];else{console['log'](generateServiceHelp(_0x1e874c));return;}}const _0x519f87=findDefinition(_0x1e874c,_0x5000d5);!_0x519f87&&(console[_0xee2264(0xcd)](generateServiceHelp(_0x1e874c)),handleError(CliErrors[_0xee2264(0xc6)](_0x1e874c+'\x20'+_0x5000d5)));if(_0x1c9f64[_0xee2264(0xc2)]){console['log'](generateCommandHelp(_0x519f87));return;}const _0x419f3b=buildConfigFromFlags(_0x1c9f64);await initGlobalEnvironment(_0x419f3b);const _0x3b9d1e=createPipelineEnv(_0x419f3b,_0x1c9f64);_0x3b9d1e[_0xee2264(0xaf)]=cli[_0xee2264(0xbb)][_0xee2264(0xc8)](0x2),await runCommand(_0x519f87,_0x3b9d1e);}function handleError(_0x104ace){const _0x1a6664=a0_0x234af0;if(_0x104ace instanceof CliError){_0x104ace[_0x1a6664(0xcf)]===_0x1a6664(0xb7)&&(process[_0x1a6664(0xce)][_0x1a6664(0xb8)](_0x1a6664(0xb9)),process['exit'](0x0));console['error'](_0x1a6664(0xcc)+_0x104ace[_0x1a6664(0xb5)]);if(_0x104ace['hint'])console[_0x1a6664(0xbc)](_0x1a6664(0xc0)+_0x104ace['hint']);process[_0x1a6664(0xbe)](_0x104ace[_0x1a6664(0xa7)]);}isUserCancellation(_0x104ace)&&(process['stderr'][_0x1a6664(0xb8)](_0x1a6664(0xb9)),process[_0x1a6664(0xbe)](0x0)),console[_0x1a6664(0xbc)]('Unexpected\x20error:',_0x104ace),process['exit'](0x1);}function isUserCancellation(_0x5896a4){const _0x232b37=a0_0x234af0;if(!(_0x5896a4 instanceof Error))return![];if(_0x5896a4['name']===_0x232b37(0xc3))return!![];if(_0x5896a4[_0x232b37(0xcf)]===_0x232b37(0xc9))return!![];if(_0x5896a4[_0x232b37(0xcf)]===_0x232b37(0xba))return!![];return![];}
2
+ const a0_0x26143f=a0_0x34b7;(function(_0x511394,_0x44b761){const _0xdfc7e5=a0_0x34b7,_0x1d5ed3=_0x511394();while(!![]){try{const _0x24894e=-parseInt(_0xdfc7e5(0x10d))/0x1+parseInt(_0xdfc7e5(0x102))/0x2+parseInt(_0xdfc7e5(0xf8))/0x3+parseInt(_0xdfc7e5(0xff))/0x4*(-parseInt(_0xdfc7e5(0x115))/0x5)+-parseInt(_0xdfc7e5(0x112))/0x6*(-parseInt(_0xdfc7e5(0x10e))/0x7)+parseInt(_0xdfc7e5(0x10b))/0x8+-parseInt(_0xdfc7e5(0x108))/0x9;if(_0x24894e===_0x44b761)break;else _0x1d5ed3['push'](_0x1d5ed3['shift']());}catch(_0x1b267c){_0x1d5ed3['push'](_0x1d5ed3['shift']());}}}(a0_0x7fcd,0x57035));import{jsx as a0_0x443f60}from'react/jsx-runtime';import a0_0x3e3755 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x34b7(_0x2fc566,_0x3603e5){_0x2fc566=_0x2fc566-0xee;const _0x7fcdeb=a0_0x7fcd();let _0x34b79d=_0x7fcdeb[_0x2fc566];return _0x34b79d;}import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x3e3755(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x26143f(0xf1)](handleError);async function main(){try{await run();}catch(_0x1d2af4){handleError(_0x1d2af4);}}function a0_0x7fcd(){const _0x4fa07e=['exitCode','definition','catch','unknownCommand','defaultCommand','[preparse]\x20','ERR_USE_AFTER_CLOSE','hint','input','1356504CjUfNm','write','error','ERR_STREAM_DESTROYED','handler','slice','code','57020LeiQlq','assign','help','16348MscHpx','./framework/preparse.js','flatMap','cancelled',':\x20--','exit','6484590XCSKHS','args','Error:\x20','2191584MTKrHu','Hint:\x20','72518gMrPrk','1000909DJtiuu','log','stderr','Unexpected\x20error:','24phXROr','flags','length','55eFJubU','\x0aCancelled.\x0a'];a0_0x7fcd=function(){return _0x4fa07e;};return a0_0x7fcd();}async function run(){const _0x104c75=a0_0x26143f;let _0x7df040=cli[_0x104c75(0xf7)][0x0],_0x261b4f=cli['input'][0x1];const _0xbe1b22=cli[_0x104c75(0x113)];try{const {correctFlags:_0x737cee}=await import(_0x104c75(0x103)),_0x4032f0=getAllDefinitions()[_0x104c75(0x104)](_0x158fa3=>_0x158fa3[_0x104c75(0x113)]??[]),{flags:_0x41cf04,corrections:_0x1365a9}=_0x737cee(_0xbe1b22,_0x4032f0);if(_0x1365a9[_0x104c75(0x114)]>0x0){for(const _0x5dc56e of _0x1365a9){process['stderr']['write'](_0x104c75(0xf4)+_0x5dc56e[_0x104c75(0xfc)]+_0x104c75(0x106)+_0x5dc56e['original']+'\x20->\x20--'+_0x5dc56e['corrected']+'\x0a');}Object[_0x104c75(0x100)](_0xbe1b22,_0x41cf04);}}catch{}if(!_0x7df040){const {waitUntilExit:_0x10a144}=render(a0_0x443f60(Help,{}));await _0x10a144();return;}if(!isKnownService(_0x7df040)){const _0x5d6294=resolveDynamicServiceCommand(cli[_0x104c75(0xf7)],_0xbe1b22);if(_0x5d6294){if(_0xbe1b22[_0x104c75(0x101)]){console[_0x104c75(0x10f)](generateCommandHelp(_0x5d6294[_0x104c75(0xf0)]));return;}Object[_0x104c75(0x100)](_0xbe1b22,_0x5d6294[_0x104c75(0x113)]);const _0x430b25=buildConfigFromFlags(_0xbe1b22);await initGlobalEnvironment(_0x430b25);const _0x7c710b=createPipelineEnv(_0x430b25,_0xbe1b22);_0x7c710b[_0x104c75(0x109)]=_0x5d6294[_0x104c75(0x109)],await runCommand(_0x5d6294['definition'],_0x7c710b);return;}if(_0xbe1b22[_0x104c75(0x101)]){const _0x585d6d=generateDynamicServiceHelp(_0x7df040);if(_0x585d6d){console[_0x104c75(0x10f)](_0x585d6d);return;}}const {waitUntilExit:_0x5d24c2}=render(a0_0x443f60(Help,{}));await _0x5d24c2();return;}const _0x5e4a92=getServiceEntry(_0x7df040);if(!_0x261b4f){if(_0xbe1b22[_0x104c75(0x101)]){console[_0x104c75(0x10f)](generateServiceHelp(_0x7df040));return;}if(_0x5e4a92[_0x104c75(0xf3)])_0x261b4f=_0x5e4a92['defaultCommand'];else{console[_0x104c75(0x10f)](generateServiceHelp(_0x7df040));return;}}const _0x3e2cf0=findDefinition(_0x7df040,_0x261b4f);!_0x3e2cf0&&(console['log'](generateServiceHelp(_0x7df040)),handleError(CliErrors[_0x104c75(0xf2)](_0x7df040+'\x20'+_0x261b4f)));if(_0xbe1b22[_0x104c75(0x101)]){console[_0x104c75(0x10f)](generateCommandHelp(_0x3e2cf0));return;}const _0x3a9d7b=buildConfigFromFlags(_0xbe1b22);await initGlobalEnvironment(_0x3a9d7b);const _0x483c93=createPipelineEnv(_0x3a9d7b,_0xbe1b22);_0x483c93[_0x104c75(0x109)]=cli[_0x104c75(0xf7)][_0x104c75(0xfd)](0x2),await runCommand(_0x3e2cf0,_0x483c93);}function handleError(_0x13982e){const _0xf5f67d=a0_0x26143f;if(_0x13982e instanceof CliError){_0x13982e['code']===_0xf5f67d(0x105)&&(process[_0xf5f67d(0x110)]['write'](_0xf5f67d(0xee)),process['exit'](0x0));console[_0xf5f67d(0xfa)](_0xf5f67d(0x10a)+_0x13982e['message']);if(_0x13982e[_0xf5f67d(0xf6)])console[_0xf5f67d(0xfa)](_0xf5f67d(0x10c)+_0x13982e[_0xf5f67d(0xf6)]);process[_0xf5f67d(0x107)](_0x13982e[_0xf5f67d(0xef)]);}isUserCancellation(_0x13982e)&&(process[_0xf5f67d(0x110)][_0xf5f67d(0xf9)]('\x0aCancelled.\x0a'),process[_0xf5f67d(0x107)](0x0)),console[_0xf5f67d(0xfa)](_0xf5f67d(0x111),_0x13982e),process[_0xf5f67d(0x107)](0x1);}function isUserCancellation(_0x17cd53){const _0x17988d=a0_0x26143f;if(!(_0x17cd53 instanceof Error))return![];if(_0x17cd53['name']==='ExitPromptError')return!![];if(_0x17cd53[_0x17988d(0xfe)]===_0x17988d(0xf5))return!![];if(_0x17cd53['code']===_0x17988d(0xfb))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x31ba93=a1_0x34e4;function a1_0x4d65(){const _0x32bf0c=['需要向指定数据集新增一条业务数据时使用','dataset','获取数据集详情','appCode','bf_detail','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','##\x20List\x20datasets','join','validation','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','paging.totalCount\x20gives\x20total\x20rows','3XhcLVZ','3290160seyrtT','Endpoint\x20function\x20name','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','Current\x20app\x20code','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','title','Aggregate\x20dataset\x20data','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','Filter\x20dataset\x20data','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','list','map','result\x20rows\x20contain\x20aggregate\x20aliases','List\x20datasets','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Exact\x20endpoint\x20function\x20name','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','32-character\x20dataset\x20code','dataset_data_create','{\x22id\x22:123}','Returns\x20SQL\x20execution\x20payload','API\x20doc\x20code\x20not\x20found:\x20','tableData\x20contains\x20records','77903lgtNzq','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','Execute\x20BF\x20endpoint\x20function','string','10548873WbqLos','12WhcRvZ','method','/api/{appCode}/{datasetCode}/filter','bf_execute','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','455308reTndc','POST','filter','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','Get\x20one\x20dataset\x20record','custom_sql','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','None','/api/endpoint/{appCode}/{functionName}','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','Dataset\x20detail','path','code','9777930VqSQsp','read','已经确认目标\x20BF\x20的\x20functionName,且需要实际调用该\x20ENDPOINT\x20函数完成业务操作时使用','Create\x20dataset\x20record','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','条件过滤查询数据','GET','/api/{appCode}/{datasetCode}/create','datasetCode','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','执行指定\x20BF\x20函数','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','/api/dataset/getOneByCode?code={datasetCode}','api-doc','whenToUse','/api/custom/executeSql','查询单条数据','Returns\x20script\x20business\x20payload','fields/properties\x20describe\x20data\x20shape','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','/client/bff/endpoint/{appCode}/{functionName}','执行自定义\x20SQL','/api/{appCode}/{datasetCode}/aggregate','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','dataset_detail','detail','length','dataset_data_aggregate','str','trim','keyword','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','where\x20filters\x20before\x20aggregation','已经从用户、平台\x20UI\x20或前序上下文确认函数名,需要查看该\x20ENDPOINT\x20的运行态元信息时使用','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','819275lddLDG','3153705HfsDCt','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','872KBixjK','##\x20Dataset\x20detail','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','List\x20available\x20runtime\x20API\x20documentation\x20entries','custom_sql_execute','/api/{appCode}/{datasetCode}/getOne','分页获取数据集列表','toLowerCase','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','summary','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','API\x20doc\x20code,\x20for\x20example\x20dataset_list','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Show\x20runtime\x20API\x20documentation\x20by\x20code','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','includes','operations\x20describes\x20runtime\x20APIs','{\x22fieldName\x22:\x22value\x22}','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','category','Returns\x20one\x20matching\x20business\x20record'];a1_0x4d65=function(){return _0x32bf0c;};return a1_0x4d65();}(function(_0x2c9958,_0x44e45f){const _0x5ab20c=a1_0x34e4,_0x2e98da=_0x2c9958();while(!![]){try{const _0x5a2911=-parseInt(_0x5ab20c(0xc2))/0x1*(parseInt(_0x5ab20c(0xe5))/0x2)+parseInt(_0x5ab20c(0x118))/0x3+-parseInt(_0x5ab20c(0xc3))/0x4+-parseInt(_0x5ab20c(0x117))/0x5*(-parseInt(_0x5ab20c(0xe0))/0x6)+-parseInt(_0x5ab20c(0xdb))/0x7*(parseInt(_0x5ab20c(0x11a))/0x8)+parseInt(_0x5ab20c(0xdf))/0x9+parseInt(_0x5ab20c(0xf2))/0xa;if(_0x5a2911===_0x44e45f)break;else _0x2e98da['push'](_0x2e98da['shift']());}catch(_0x3bd21d){_0x2e98da['push'](_0x2e98da['shift']());}}}(a1_0x4d65,0xc5d20));function a1_0x34e4(_0x40c007,_0x4fc37a){_0x40c007=_0x40c007-0xb6;const _0x4d65c9=a1_0x4d65();let _0x34e40b=_0x4d65c9[_0x40c007];return _0x34e40b;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x31ba93(0x12f),'type':'string','description':a1_0x31ba93(0x12d)},KEYWORD_FLAG={'name':'keyword','type':a1_0x31ba93(0xde),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x31ba93(0xf1),'type':a1_0x31ba93(0xde),'required':!![],'description':a1_0x31ba93(0x125)},DOCS=[{'code':'dataset_list','category':a1_0x31ba93(0xb6),'title':a1_0x31ba93(0xd0),'method':'POST','path':'/api/dataset/get-dataset-list-by-app-code','summary':a1_0x31ba93(0x120),'whenToUse':a1_0x31ba93(0x126),'pathParams':[],'queryParams':[],'bodySchema':a1_0x31ba93(0x124),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0x31ba93(0xc1)],'examples':[a1_0x31ba93(0xfd)],'notes':[a1_0x31ba93(0x12e)],'markdown':[a1_0x31ba93(0xbd),'',a1_0x31ba93(0xcc)]['join']('\x0a')},{'code':a1_0x31ba93(0x10b),'category':a1_0x31ba93(0xb6),'title':a1_0x31ba93(0xef),'method':a1_0x31ba93(0xf8),'path':a1_0x31ba93(0xfe),'summary':a1_0x31ba93(0xb7),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':'None','responseHighlights':[a1_0x31ba93(0x104),a1_0x31ba93(0x105),a1_0x31ba93(0x12b)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x31ba93(0x122)],'markdown':[a1_0x31ba93(0x11b),'',a1_0x31ba93(0xd2)]['join']('\x0a')},{'code':'dataset_data_filter','category':a1_0x31ba93(0xb6),'title':a1_0x31ba93(0xcb),'method':a1_0x31ba93(0xe6),'path':a1_0x31ba93(0xe2),'summary':a1_0x31ba93(0xf7),'whenToUse':a1_0x31ba93(0xeb),'pathParams':[{'name':a1_0x31ba93(0xb8),'description':a1_0x31ba93(0xc6)},{'name':a1_0x31ba93(0xfa),'description':a1_0x31ba93(0xd5)}],'queryParams':[],'bodySchema':a1_0x31ba93(0xdc),'responseHighlights':[a1_0x31ba93(0xda),'paging\x20contains\x20pagination'],'examples':[a1_0x31ba93(0x113)],'notes':[a1_0x31ba93(0xf6)],'markdown':['##\x20Filter\x20dataset\x20data','','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x31ba93(0xbe)]('\x0a')},{'code':a1_0x31ba93(0x10e),'category':a1_0x31ba93(0xb6),'title':a1_0x31ba93(0xc9),'method':a1_0x31ba93(0xe6),'path':a1_0x31ba93(0x109),'summary':'聚合查询数据集数据','whenToUse':a1_0x31ba93(0x106),'pathParams':[{'name':a1_0x31ba93(0xb8),'description':a1_0x31ba93(0xc6)},{'name':a1_0x31ba93(0xfa),'description':a1_0x31ba93(0xd5)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x31ba93(0xcf),a1_0x31ba93(0x114)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x31ba93(0xbb),a1_0x31ba93(0x129)],'markdown':['##\x20Aggregate\x20dataset\x20data','',a1_0x31ba93(0x116)][a1_0x31ba93(0xbe)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x31ba93(0xb6),'title':a1_0x31ba93(0xe9),'method':a1_0x31ba93(0xe6),'path':a1_0x31ba93(0x11f),'summary':a1_0x31ba93(0x102),'whenToUse':a1_0x31ba93(0xd1),'pathParams':[{'name':'appCode','description':a1_0x31ba93(0xc6)},{'name':'datasetCode','description':a1_0x31ba93(0xd5)}],'queryParams':[],'bodySchema':a1_0x31ba93(0xd7),'responseHighlights':[a1_0x31ba93(0x130)],'examples':[a1_0x31ba93(0xee)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x31ba93(0xd4)},{'code':a1_0x31ba93(0xd6),'category':'dataset','title':a1_0x31ba93(0xf5),'method':a1_0x31ba93(0xe6),'path':a1_0x31ba93(0xf9),'summary':'创建数据','whenToUse':a1_0x31ba93(0x131),'pathParams':[{'name':a1_0x31ba93(0xb8),'description':'Current\x20app\x20code'},{'name':a1_0x31ba93(0xfa),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x31ba93(0x12c),'responseHighlights':[a1_0x31ba93(0xc7)],'examples':[a1_0x31ba93(0xe8)],'notes':[a1_0x31ba93(0xc0)],'markdown':a1_0x31ba93(0x128)},{'code':a1_0x31ba93(0xb9),'category':'bf','title':'Get\x20BF\x20endpoint\x20function\x20contract','method':a1_0x31ba93(0xf8),'path':a1_0x31ba93(0x107),'summary':'按应用和函数名精确获取\x20BF\x20运行契约','whenToUse':a1_0x31ba93(0x115),'pathParams':[{'name':a1_0x31ba93(0xb8),'description':a1_0x31ba93(0xc6)},{'name':'functionName','description':a1_0x31ba93(0xd3)}],'queryParams':[],'bodySchema':a1_0x31ba93(0xec),'responseHighlights':[a1_0x31ba93(0x11c)],'examples':[a1_0x31ba93(0x112)],'notes':['This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20BFF\x20functions\x20or\x20expose\x20platform-only\x20fields.'],'markdown':'##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.'},{'code':a1_0x31ba93(0xe3),'category':'bf','title':a1_0x31ba93(0xdd),'method':a1_0x31ba93(0xe6),'path':a1_0x31ba93(0xed),'summary':a1_0x31ba93(0xfc),'whenToUse':a1_0x31ba93(0xf4),'pathParams':[{'name':a1_0x31ba93(0xb8),'description':'Current\x20app\x20code'},{'name':'functionName','description':a1_0x31ba93(0xc4)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x31ba93(0x103)],'examples':[a1_0x31ba93(0x119)],'notes':[a1_0x31ba93(0xba)],'markdown':a1_0x31ba93(0xfb)},{'code':a1_0x31ba93(0x11e),'category':a1_0x31ba93(0xea),'title':'Execute\x20custom\x20SQL','method':'POST','path':a1_0x31ba93(0x101),'summary':a1_0x31ba93(0x108),'whenToUse':a1_0x31ba93(0xca),'pathParams':[],'queryParams':[],'bodySchema':a1_0x31ba93(0xe4),'responseHighlights':[a1_0x31ba93(0xd8)],'examples':[a1_0x31ba93(0xc5)],'notes':[a1_0x31ba93(0x10a)],'markdown':a1_0x31ba93(0xbc)}];function entrySummary(_0x32ce67){const _0x25827a=a1_0x31ba93;return{'code':_0x32ce67[_0x25827a(0xf1)],'category':_0x32ce67[_0x25827a(0x12f)],'method':_0x32ce67[_0x25827a(0xe1)],'path':_0x32ce67[_0x25827a(0xf0)],'summary':_0x32ce67[_0x25827a(0x123)],'whenToUse':_0x32ce67[_0x25827a(0x100)]};}export function listApiDocEntries(_0x378df5={}){const _0x259656=a1_0x31ba93,_0x414e24=String(_0x378df5[_0x259656(0x12f)]||'')[_0x259656(0x110)](),_0x4149cd=String(_0x378df5[_0x259656(0x111)]||'')[_0x259656(0x110)]()[_0x259656(0x121)]();return DOCS[_0x259656(0xe7)](_0x1f8edb=>{const _0x40a7a6=_0x259656;if(_0x414e24&&_0x1f8edb[_0x40a7a6(0x12f)]!==_0x414e24)return![];if(!_0x4149cd)return!![];return[_0x1f8edb[_0x40a7a6(0xf1)],_0x1f8edb['category'],_0x1f8edb[_0x40a7a6(0xe1)],_0x1f8edb[_0x40a7a6(0xf0)],_0x1f8edb[_0x40a7a6(0x123)],_0x1f8edb[_0x40a7a6(0x100)],_0x1f8edb[_0x40a7a6(0xc8)]]['join']('\x20')[_0x40a7a6(0x121)]()[_0x40a7a6(0x12a)](_0x4149cd);})[_0x259656(0xce)](entrySummary);}export function getApiDocDetail(_0xdf87c7){const _0x44b20a=a1_0x31ba93,_0x1db74c=DOCS['find'](_0x55b5ba=>_0x55b5ba[_0x44b20a(0xf1)]===_0xdf87c7);if(!_0x1db74c)throw CliErrors[_0x44b20a(0xbf)](_0x44b20a(0xd9)+_0xdf87c7);return{..._0x1db74c};}const apiDocList={'service':a1_0x31ba93(0xff),'command':a1_0x31ba93(0xcd),'description':a1_0x31ba93(0x11d),'risk':a1_0x31ba93(0xf3),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x306c5b){const _0x47cf58=a1_0x31ba93,_0x500587=listApiDocEntries({'category':_0x306c5b[_0x47cf58(0x10f)](_0x47cf58(0x12f)),'keyword':_0x306c5b[_0x47cf58(0x10f)]('keyword')});return{'ok':!![],'data':{'total':_0x500587[_0x47cf58(0x10d)],'items':_0x500587}};}},apiDocDetail={'service':a1_0x31ba93(0xff),'command':a1_0x31ba93(0x10c),'description':a1_0x31ba93(0x127),'risk':a1_0x31ba93(0xf3),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x22518d){return{'ok':!![],'data':getApiDocDetail(_0x22518d['str']('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x55b83d=a1_0x56cc;(function(_0x503736,_0x395fd1){const _0x4757b6=a1_0x56cc,_0x261d0f=_0x503736();while(!![]){try{const _0x2b0fd4=parseInt(_0x4757b6(0x232))/0x1*(-parseInt(_0x4757b6(0x23a))/0x2)+-parseInt(_0x4757b6(0x22f))/0x3+parseInt(_0x4757b6(0x203))/0x4+-parseInt(_0x4757b6(0x202))/0x5+parseInt(_0x4757b6(0x22c))/0x6+parseInt(_0x4757b6(0x238))/0x7+parseInt(_0x4757b6(0x1f7))/0x8*(parseInt(_0x4757b6(0x1f4))/0x9);if(_0x2b0fd4===_0x395fd1)break;else _0x261d0f['push'](_0x261d0f['shift']());}catch(_0xdf2073){_0x261d0f['push'](_0x261d0f['shift']());}}}(a1_0x1f8f,0xa164a));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x55b83d(0x215),'type':a1_0x55b83d(0x219),'description':a1_0x55b83d(0x264)},KEYWORD_FLAG={'name':a1_0x55b83d(0x1f1),'type':a1_0x55b83d(0x219),'description':a1_0x55b83d(0x218)},DOC_CODE_FLAG={'name':'code','type':a1_0x55b83d(0x219),'required':!![],'description':a1_0x55b83d(0x248)},DOCS=[{'code':a1_0x55b83d(0x214),'category':a1_0x55b83d(0x233),'title':a1_0x55b83d(0x237),'method':a1_0x55b83d(0x23e),'path':a1_0x55b83d(0x1f2),'summary':a1_0x55b83d(0x21d),'whenToUse':a1_0x55b83d(0x221),'pathParams':[],'queryParams':[],'bodySchema':a1_0x55b83d(0x23f),'responseHighlights':[a1_0x55b83d(0x23d),a1_0x55b83d(0x207)],'examples':[a1_0x55b83d(0x1f8)],'notes':['CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.'],'markdown':['##\x20List\x20datasets','',a1_0x55b83d(0x23b)][a1_0x55b83d(0x240)]('\x0a')},{'code':'dataset_detail','category':'dataset','title':a1_0x55b83d(0x1f6),'method':a1_0x55b83d(0x244),'path':a1_0x55b83d(0x247),'summary':a1_0x55b83d(0x25c),'whenToUse':a1_0x55b83d(0x228),'pathParams':[],'queryParams':[{'name':a1_0x55b83d(0x24b),'description':a1_0x55b83d(0x231)}],'bodySchema':a1_0x55b83d(0x224),'responseHighlights':['fields/properties\x20describe\x20data\x20shape','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x55b83d(0x251)],'examples':[a1_0x55b83d(0x22b)],'notes':[a1_0x55b83d(0x21f)],'markdown':[a1_0x55b83d(0x223),'',a1_0x55b83d(0x220)][a1_0x55b83d(0x240)]('\x0a')},{'code':a1_0x55b83d(0x211),'category':'dataset','title':a1_0x55b83d(0x23c),'method':a1_0x55b83d(0x23e),'path':a1_0x55b83d(0x1fd),'summary':a1_0x55b83d(0x24a),'whenToUse':a1_0x55b83d(0x208),'pathParams':[{'name':'appCode','description':a1_0x55b83d(0x250)},{'name':a1_0x55b83d(0x1fa),'description':a1_0x55b83d(0x231)}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x55b83d(0x24f),a1_0x55b83d(0x245)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':['Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':[a1_0x55b83d(0x262),'',a1_0x55b83d(0x200)]['join']('\x0a')},{'code':'dataset_data_aggregate','category':'dataset','title':a1_0x55b83d(0x1ef),'method':a1_0x55b83d(0x23e),'path':a1_0x55b83d(0x24c),'summary':a1_0x55b83d(0x235),'whenToUse':'需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','pathParams':[{'name':'appCode','description':a1_0x55b83d(0x250)},{'name':a1_0x55b83d(0x1fa),'description':a1_0x55b83d(0x231)}],'queryParams':[],'bodySchema':a1_0x55b83d(0x241),'responseHighlights':[a1_0x55b83d(0x258),a1_0x55b83d(0x25e)],'examples':[a1_0x55b83d(0x20a)],'notes':[a1_0x55b83d(0x204),a1_0x55b83d(0x263)],'markdown':[a1_0x55b83d(0x24e),'',a1_0x55b83d(0x1fb)][a1_0x55b83d(0x240)]('\x0a')},{'code':a1_0x55b83d(0x236),'category':a1_0x55b83d(0x233),'title':'Get\x20one\x20dataset\x20record','method':a1_0x55b83d(0x23e),'path':a1_0x55b83d(0x1f0),'summary':'查询单条数据','whenToUse':a1_0x55b83d(0x21c),'pathParams':[{'name':a1_0x55b83d(0x25b),'description':a1_0x55b83d(0x250)},{'name':a1_0x55b83d(0x1fa),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x55b83d(0x25d),'responseHighlights':[a1_0x55b83d(0x20f)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x55b83d(0x20e)],'markdown':a1_0x55b83d(0x22d)},{'code':'dataset_data_create','category':a1_0x55b83d(0x233),'title':a1_0x55b83d(0x20d),'method':a1_0x55b83d(0x23e),'path':a1_0x55b83d(0x257),'summary':a1_0x55b83d(0x225),'whenToUse':'需要向指定数据集新增一条业务数据时使用','pathParams':[{'name':a1_0x55b83d(0x25b),'description':a1_0x55b83d(0x250)},{'name':a1_0x55b83d(0x1fa),'description':a1_0x55b83d(0x231)}],'queryParams':[],'bodySchema':a1_0x55b83d(0x201),'responseHighlights':[a1_0x55b83d(0x21a)],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x55b83d(0x246)],'markdown':a1_0x55b83d(0x1ed)},{'code':a1_0x55b83d(0x242),'category':'bf','title':a1_0x55b83d(0x260),'method':'GET','path':a1_0x55b83d(0x216),'summary':'按应用和函数名精确获取\x20BF\x20运行契约','whenToUse':a1_0x55b83d(0x212),'pathParams':[{'name':'appCode','description':a1_0x55b83d(0x250)},{'name':a1_0x55b83d(0x20b),'description':a1_0x55b83d(0x210)}],'queryParams':[],'bodySchema':a1_0x55b83d(0x224),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':[a1_0x55b83d(0x1ee)],'notes':[a1_0x55b83d(0x205)],'markdown':a1_0x55b83d(0x234)},{'code':'bf_execute','category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':'POST','path':a1_0x55b83d(0x229),'summary':a1_0x55b83d(0x213),'whenToUse':a1_0x55b83d(0x217),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x55b83d(0x20b),'description':a1_0x55b83d(0x255)}],'queryParams':[],'bodySchema':a1_0x55b83d(0x227),'responseHighlights':[a1_0x55b83d(0x24d)],'examples':[a1_0x55b83d(0x226)],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x55b83d(0x1fe)},{'code':a1_0x55b83d(0x206),'category':a1_0x55b83d(0x22a),'title':a1_0x55b83d(0x222),'method':'POST','path':a1_0x55b83d(0x1f3),'summary':a1_0x55b83d(0x261),'whenToUse':a1_0x55b83d(0x253),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x55b83d(0x249)],'notes':[a1_0x55b83d(0x256)],'markdown':a1_0x55b83d(0x254)}];function entrySummary(_0x4398a0){const _0x149960=a1_0x55b83d;return{'code':_0x4398a0[_0x149960(0x24b)],'category':_0x4398a0[_0x149960(0x215)],'method':_0x4398a0[_0x149960(0x1ff)],'path':_0x4398a0[_0x149960(0x21e)],'summary':_0x4398a0['summary'],'whenToUse':_0x4398a0[_0x149960(0x259)]};}export function listApiDocEntries(_0x260120={}){const _0x20ee54=a1_0x55b83d,_0x264f01=String(_0x260120[_0x20ee54(0x215)]||'')[_0x20ee54(0x243)](),_0x422f62=String(_0x260120[_0x20ee54(0x1f1)]||'')[_0x20ee54(0x243)]()[_0x20ee54(0x1f5)]();return DOCS['filter'](_0x3a718b=>{const _0x2e80f5=_0x20ee54;if(_0x264f01&&_0x3a718b[_0x2e80f5(0x215)]!==_0x264f01)return![];if(!_0x422f62)return!![];return[_0x3a718b[_0x2e80f5(0x24b)],_0x3a718b[_0x2e80f5(0x215)],_0x3a718b['method'],_0x3a718b['path'],_0x3a718b[_0x2e80f5(0x1f9)],_0x3a718b['whenToUse'],_0x3a718b[_0x2e80f5(0x230)]][_0x2e80f5(0x240)]('\x20')['toLowerCase']()['includes'](_0x422f62);})['map'](entrySummary);}function a1_0x56cc(_0xc5235,_0x539d56){_0xc5235=_0xc5235-0x1ed;const _0x1f8ff7=a1_0x1f8f();let _0x56ccc5=_0x1f8ff7[_0xc5235];return _0x56ccc5;}export function getApiDocDetail(_0x53ef2d){const _0x17181b=a1_0x55b83d,_0x120677=DOCS[_0x17181b(0x239)](_0x58e83b=>_0x58e83b[_0x17181b(0x24b)]===_0x53ef2d);if(!_0x120677)throw CliErrors[_0x17181b(0x209)](_0x17181b(0x20c)+_0x53ef2d);return{..._0x120677};}const apiDocList={'service':a1_0x55b83d(0x25a),'command':a1_0x55b83d(0x22e),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x55b83d(0x25f),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0xb328d2){const _0x1b7c9d=a1_0x55b83d,_0x3a9d3d=listApiDocEntries({'category':_0xb328d2['str'](_0x1b7c9d(0x215)),'keyword':_0xb328d2[_0x1b7c9d(0x1fc)](_0x1b7c9d(0x1f1))});return{'ok':!![],'data':{'total':_0x3a9d3d[_0x1b7c9d(0x265)],'items':_0x3a9d3d}};}},apiDocDetail={'service':a1_0x55b83d(0x25a),'command':a1_0x55b83d(0x252),'description':a1_0x55b83d(0x21b),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x2b8d00){return{'ok':!![],'data':getApiDocDetail(_0x2b8d00['str']('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];function a1_0x1f8f(){const _0x385d25=['paging.totalCount\x20gives\x20total\x20rows','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','validation','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','functionName','API\x20doc\x20code\x20not\x20found:\x20','Create\x20dataset\x20record','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Returns\x20one\x20matching\x20business\x20record','Exact\x20endpoint\x20function\x20name','dataset_data_filter','已经从用户、平台\x20UI\x20或前序上下文确认函数名,需要查看该\x20ENDPOINT\x20的运行态元信息时使用','执行指定\x20BF\x20函数','dataset_list','category','/client/bff/endpoint/{appCode}/{functionName}','已经确认目标\x20BF\x20的\x20functionName,且需要实际调用该\x20ENDPOINT\x20函数完成业务操作时使用','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','string','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Show\x20runtime\x20API\x20documentation\x20by\x20code','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','分页获取数据集列表','path','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Execute\x20custom\x20SQL','##\x20Dataset\x20detail','None','创建数据','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','{\x22param\x22:\x22value\x22}','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','/api/endpoint/{appCode}/{functionName}','custom_sql','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','2774010pQjdhb','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','list','3096498xTiTQt','title','32-character\x20dataset\x20code','1DnXBcq','dataset','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','聚合查询数据集数据','dataset_data_get_one','List\x20datasets','442974SytvGP','find','616784hJVHiG','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Filter\x20dataset\x20data','tableData\x20contains\x20dataset\x20id/code/name','POST','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','join','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','bf_detail','trim','GET','paging\x20contains\x20pagination','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','/api/dataset/getOneByCode?code={datasetCode}','API\x20doc\x20code,\x20for\x20example\x20dataset_list','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','条件过滤查询数据','code','/api/{appCode}/{datasetCode}/aggregate','Returns\x20script\x20business\x20payload','##\x20Aggregate\x20dataset\x20data','tableData\x20contains\x20records','Current\x20app\x20code','operations\x20describes\x20runtime\x20APIs','detail','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Endpoint\x20function\x20name','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','/api/{appCode}/{datasetCode}/create','result\x20rows\x20contain\x20aggregate\x20aliases','whenToUse','api-doc','appCode','获取数据集详情','{\x22id\x22:123}','where\x20filters\x20before\x20aggregation','read','Get\x20BF\x20endpoint\x20function\x20contract','执行自定义\x20SQL','##\x20Filter\x20dataset\x20data','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','length','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','Aggregate\x20dataset\x20data','/api/{appCode}/{datasetCode}/getOne','keyword','/api/dataset/get-dataset-list-by-app-code','/api/custom/executeSql','65601BbSyiw','toLowerCase','Dataset\x20detail','2392CJzLiI','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','summary','datasetCode','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','str','/api/{appCode}/{datasetCode}/filter','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','method','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','{\x22fieldName\x22:\x22value\x22}','5791235qPDjQm','1819372GgXrgx','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20BFF\x20functions\x20or\x20expose\x20platform-only\x20fields.','custom_sql_execute'];a1_0x1f8f=function(){return _0x385d25;};return a1_0x1f8f();}
@@ -1 +1 @@
1
- (function(_0x121b0d,_0xdf8ecd){const _0x59d39e=a2_0x22c4,_0x51cf60=_0x121b0d();while(!![]){try{const _0x4e2bb3=parseInt(_0x59d39e(0x1ec))/0x1+-parseInt(_0x59d39e(0x1ed))/0x2*(parseInt(_0x59d39e(0x1e6))/0x3)+parseInt(_0x59d39e(0x1f8))/0x4+parseInt(_0x59d39e(0x1dc))/0x5+parseInt(_0x59d39e(0x1e7))/0x6*(-parseInt(_0x59d39e(0x1e8))/0x7)+-parseInt(_0x59d39e(0x1f0))/0x8*(-parseInt(_0x59d39e(0x1f6))/0x9)+-parseInt(_0x59d39e(0x1e9))/0xa*(parseInt(_0x59d39e(0x1eb))/0xb);if(_0x4e2bb3===_0xdf8ecd)break;else _0x51cf60['push'](_0x51cf60['shift']());}catch(_0x1b0ab7){_0x51cf60['push'](_0x51cf60['shift']());}}}(a2_0x41fd,0x6441d));function a2_0x41fd(){const _0x6e1a2a=['1463998cLxXFY','homeDirName','update','8fCRTKl','hex','items','code','EXDEV','sha256','1490301CJIAvj','EPERM','3106860Lmiqpm','ak_','392270DzZGRm','.tmp','appName','unknown','trim','utf8','cache','stringify','isArray','appCode','3CtVNPS','30rcoDmZ','185017cFzRtO','20EbFWCm','digest','1870275CYDJfV','594099tKKuem'];a2_0x41fd=function(){return _0x6e1a2a;};return a2_0x41fd();}function a2_0x22c4(_0xee78f5,_0x27a764){_0xee78f5=_0xee78f5-0x1dc;const _0x41fdb4=a2_0x41fd();let _0x22c438=_0x41fdb4[_0xee78f5];return _0x22c438;}import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x25392b){const _0xd24c4d=a2_0x22c4,_0x23ad94=_0x25392b[_0xd24c4d(0x1e0)](),_0x1fdaa0=_0x23ad94['slice'](-0x6)||_0xd24c4d(0x1df),_0x18f2f7=createHash(_0xd24c4d(0x1f5))[_0xd24c4d(0x1ef)](_0x23ad94)[_0xd24c4d(0x1ea)](_0xd24c4d(0x1f1))['slice'](0x0,0xc);return _0xd24c4d(0x1f9)+_0x1fdaa0+'_'+_0x18f2f7;}export function getAppCacheFilePath(_0x4835bd,_0x1740e2){const _0x541afb=a2_0x22c4;return resolve(homedir(),PRODUCT_CONFIG[_0x541afb(0x1ee)],_0x541afb(0x1e2),_0x4835bd,fingerprintAccessKey(_0x1740e2),'my-apps.json');}export function readCachedAppList(_0xfdfe13,_0x21ebb3){const _0xec0a45=a2_0x22c4;if(!_0x21ebb3?.['trim']())return null;const _0x34c24d=getAppCacheFilePath(_0xfdfe13,_0x21ebb3);if(!existsSync(_0x34c24d))return null;try{const _0x58c1f9=readFileSync(_0x34c24d,_0xec0a45(0x1e1));if(!_0x58c1f9[_0xec0a45(0x1e0)]())return null;const _0x1ea83f=JSON['parse'](_0x58c1f9);if(!Array[_0xec0a45(0x1e4)](_0x1ea83f[_0xec0a45(0x1f2)]))return null;return _0x1ea83f;}catch{return null;}}export function writeCachedAppList(_0x4a249a,_0x3d9481,_0x348041){const _0x4527b3=a2_0x22c4,_0x3922dd=getAppCacheFilePath(_0x4a249a,_0x3d9481),_0x307e29=dirname(_0x3922dd);!existsSync(_0x307e29)&&mkdirSync(_0x307e29,{'recursive':!![]});const _0x46dd36=_0x3922dd+_0x4527b3(0x1dd);try{writeFileSync(_0x46dd36,JSON[_0x4527b3(0x1e3)](_0x348041,null,0x2)+'\x0a',{'encoding':_0x4527b3(0x1e1),'mode':0x180});try{renameSync(_0x46dd36,_0x3922dd);}catch(_0x535c93){if(_0x535c93[_0x4527b3(0x1f3)]===_0x4527b3(0x1f7)||_0x535c93[_0x4527b3(0x1f3)]===_0x4527b3(0x1f4)||_0x535c93[_0x4527b3(0x1f3)]==='EACCES'){writeFileSync(_0x3922dd,JSON['stringify'](_0x348041,null,0x2)+'\x0a',{'encoding':_0x4527b3(0x1e1)});try{unlinkSync(_0x46dd36);}catch{}}else throw _0x535c93;}}catch(_0x2f6e6d){try{unlinkSync(_0x46dd36);}catch{}throw _0x2f6e6d;}return _0x3922dd;}export function resolveCachedAppCode(_0x12a85c,_0x22f10c,_0x2a87b2){const _0xf91db4=a2_0x22c4;if(!_0x12a85c)return undefined;const _0x45dcaa=readCachedAppList(_0x22f10c,_0x2a87b2),_0x4b50d1=_0x45dcaa?.[_0xf91db4(0x1f2)]['find'](_0x14c185=>_0x14c185[_0xf91db4(0x1de)]===_0x12a85c&&isRuntimeAccessibleApp(_0x14c185));return _0x4b50d1?.[_0xf91db4(0x1e5)]?.['trim']()||undefined;}
1
+ (function(_0x27a35e,_0x27b0e8){const _0x1dce8f=a2_0x478b,_0x2efc19=_0x27a35e();while(!![]){try{const _0xb6c4f0=parseInt(_0x1dce8f(0x166))/0x1+-parseInt(_0x1dce8f(0x16b))/0x2*(-parseInt(_0x1dce8f(0x173))/0x3)+parseInt(_0x1dce8f(0x168))/0x4*(parseInt(_0x1dce8f(0x16c))/0x5)+-parseInt(_0x1dce8f(0x177))/0x6+-parseInt(_0x1dce8f(0x162))/0x7*(-parseInt(_0x1dce8f(0x163))/0x8)+-parseInt(_0x1dce8f(0x167))/0x9+parseInt(_0x1dce8f(0x171))/0xa*(-parseInt(_0x1dce8f(0x170))/0xb);if(_0xb6c4f0===_0x27b0e8)break;else _0x2efc19['push'](_0x2efc19['shift']());}catch(_0xe1cf64){_0x2efc19['push'](_0x2efc19['shift']());}}}(a2_0xde33,0xde235));import{createHash}from'node:crypto';function a2_0xde33(){const _0x1143aa=['48095sXSNnF','appName','slice','update','1122yXIGaX','3370uLZEcF','find','5541ncQuim','.tmp','cache','trim','10596156kNIjoA','unknown','code','EPERM','my-apps.json','parse','digest','8029742AHvWMV','8GQuRFF','utf8','EXDEV','533068JFZxlK','2776779PPHmpT','284pEmzWh','stringify','items','710TVPEhi'];a2_0xde33=function(){return _0x1143aa;};return a2_0xde33();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x4b09b7){const _0x372013=a2_0x478b,_0x2aff4e=_0x4b09b7[_0x372013(0x176)](),_0x1a8f70=_0x2aff4e[_0x372013(0x16e)](-0x6)||_0x372013(0x178),_0x2e2f30=createHash('sha256')[_0x372013(0x16f)](_0x2aff4e)[_0x372013(0x161)]('hex')[_0x372013(0x16e)](0x0,0xc);return'ak_'+_0x1a8f70+'_'+_0x2e2f30;}export function getAppCacheFilePath(_0x3de90a,_0x48b1ed){const _0x215ef8=a2_0x478b;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x215ef8(0x175),_0x3de90a,fingerprintAccessKey(_0x48b1ed),_0x215ef8(0x17b));}export function readCachedAppList(_0x107380,_0x21fb1b){const _0x3749d2=a2_0x478b;if(!_0x21fb1b?.[_0x3749d2(0x176)]())return null;const _0x2d8967=getAppCacheFilePath(_0x107380,_0x21fb1b);if(!existsSync(_0x2d8967))return null;try{const _0xe6e8c4=readFileSync(_0x2d8967,_0x3749d2(0x164));if(!_0xe6e8c4['trim']())return null;const _0x25f346=JSON[_0x3749d2(0x17c)](_0xe6e8c4);if(!Array['isArray'](_0x25f346['items']))return null;return _0x25f346;}catch{return null;}}export function writeCachedAppList(_0x19a59e,_0x1fa4f0,_0x2ae389){const _0x26ff34=a2_0x478b,_0x2ab651=getAppCacheFilePath(_0x19a59e,_0x1fa4f0),_0x507f15=dirname(_0x2ab651);!existsSync(_0x507f15)&&mkdirSync(_0x507f15,{'recursive':!![]});const _0x145fdd=_0x2ab651+_0x26ff34(0x174);try{writeFileSync(_0x145fdd,JSON[_0x26ff34(0x169)](_0x2ae389,null,0x2)+'\x0a',{'encoding':_0x26ff34(0x164),'mode':0x180});try{renameSync(_0x145fdd,_0x2ab651);}catch(_0x5574e5){if(_0x5574e5['code']===_0x26ff34(0x17a)||_0x5574e5[_0x26ff34(0x179)]===_0x26ff34(0x165)||_0x5574e5['code']==='EACCES'){writeFileSync(_0x2ab651,JSON[_0x26ff34(0x169)](_0x2ae389,null,0x2)+'\x0a',{'encoding':_0x26ff34(0x164)});try{unlinkSync(_0x145fdd);}catch{}}else throw _0x5574e5;}}catch(_0x276be7){try{unlinkSync(_0x145fdd);}catch{}throw _0x276be7;}return _0x2ab651;}function a2_0x478b(_0x1aa657,_0x4d33d5){_0x1aa657=_0x1aa657-0x161;const _0xde33da=a2_0xde33();let _0x478b2e=_0xde33da[_0x1aa657];return _0x478b2e;}export function resolveCachedAppCode(_0x4ed608,_0x28e2a3,_0x147b76){const _0x505f12=a2_0x478b;if(!_0x4ed608)return undefined;const _0x1ffb5b=readCachedAppList(_0x28e2a3,_0x147b76),_0x48978b=_0x1ffb5b?.[_0x505f12(0x16a)][_0x505f12(0x172)](_0x13b93d=>_0x13b93d[_0x505f12(0x16d)]===_0x4ed608&&isRuntimeAccessibleApp(_0x13b93d));return _0x48978b?.['appCode']?.['trim']()||undefined;}
@@ -1 +1 @@
1
- const a3_0x50d5bc=a3_0x5d52;(function(_0x536ea2,_0xc4f6f1){const _0x9362f7=a3_0x5d52,_0x52c949=_0x536ea2();while(!![]){try{const _0x45d4ea=-parseInt(_0x9362f7(0x14a))/0x1+-parseInt(_0x9362f7(0x12d))/0x2*(parseInt(_0x9362f7(0x126))/0x3)+parseInt(_0x9362f7(0xf7))/0x4*(-parseInt(_0x9362f7(0x103))/0x5)+-parseInt(_0x9362f7(0x118))/0x6*(parseInt(_0x9362f7(0x144))/0x7)+parseInt(_0x9362f7(0x110))/0x8+parseInt(_0x9362f7(0x11a))/0x9+parseInt(_0x9362f7(0x136))/0xa*(parseInt(_0x9362f7(0x12b))/0xb);if(_0x45d4ea===_0xc4f6f1)break;else _0x52c949['push'](_0x52c949['shift']());}catch(_0x9f932){_0x52c949['push'](_0x52c949['shift']());}}}(a3_0x1265,0x2e590));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';function a3_0x1265(){const _0x11eee5=['envName','join','validation','source','appCode','no-cache','include-unpublished','project-default','No\x20cached\x20apps\x20found.','fetchedAt','str','isCurrent','type','4172EkYCIz','boolean','defaultApp','projectPath','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','i18nInfo','349939Dwymkt','\x20is\x20deprecated.\x20Use\x20`','enableI18n','../../context.js','use','Target\x20environment\x20(default:\x20current\x20env)','name','4WDtpCx','.appcode\x20to\x20.lovrabet.json.','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','local','App\x20\x22','list','app','Remote\x20app\x20name\x20to\x20activate','pull','bool','import','\x20app(s)\x20for\x20env=\x22','675355cmvjbW','Refreshed\x20app\x20cache\x20with\x20','isArray','`\x20instead.','length','filter','appcode','accessKey','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','config','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','mergedCli','from','2659816KlDynj','Usage:\x20','Filter\x20by\x20environment\x20(default:\x20current\x20env)','globalPath','items','Default\x20app\x20candidate\x20set\x20to\x20\x22','remote','write','1806cCZQFb','cachePath','1178973xWauKA','\x22\x20not\x20found.','string','args','../../commands/app/remote-source.js','find','appOwnerName','read','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','production','Use\x20`','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','291987RhJCTH','cache','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','nonInteractive','env','11209pQzfMW','warn','2ysZRCL','appName','\x20cached\x20app(s)\x20for\x20env=\x22','push','\x20app\x20use\x20<name>\x20[--global]','map','Missing\x20app\x20name.','Available\x20remote\x20apps:\x20','trim','4790yaUGlJ'];a3_0x1265=function(){return _0x11eee5;};return a3_0x1265();}function a3_0x5d52(_0x143dab,_0xf5fb18){_0x143dab=_0x143dab-0xf3;const _0x1265b4=a3_0x1265();let _0x5d521a=_0x1265b4[_0x143dab];return _0x5d521a;}const GLOBAL_FLAG={'name':'global','type':a3_0x50d5bc(0x145),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x41cd0f,_0x2814b3){const _0x3e0b6a=a3_0x50d5bc,_0x3dd142={};for(const _0x30ba61 of _0x2814b3){const _0x4c6eb2=_0x30ba61[_0x3e0b6a(0x143)]===_0x3e0b6a(0x145)?_0x41cd0f[_0x3e0b6a(0x100)](_0x30ba61['name']):_0x41cd0f[_0x3e0b6a(0x141)](_0x30ba61[_0x3e0b6a(0xf6)]);if(_0x4c6eb2!==''&&_0x4c6eb2!==![])_0x3dd142[_0x30ba61[_0x3e0b6a(0xf6)]]=_0x4c6eb2;}if(_0x41cd0f[_0x3e0b6a(0x129)])_0x3dd142[_0x3e0b6a(0x129)]=!![];return _0x3dd142;}function normalizeLanguages(_0x23c7f5){const _0xf87d09=a3_0x50d5bc;if(!Array[_0xf87d09(0x105)](_0x23c7f5))return[];return _0x23c7f5['filter'](_0x431986=>typeof _0x431986===_0xf87d09(0x11c))['map'](_0x1ac62e=>_0x1ac62e['trim']())[_0xf87d09(0x108)](Boolean);}function buildRemoteAppI18nFields(_0x22d959){const _0x33ed59=a3_0x50d5bc,_0x7bd76f=normalizeLanguages(_0x22d959['i18nInfo']?.['langs']);return{'enableI18n':typeof _0x22d959[_0x33ed59(0x14c)]==='boolean'?_0x22d959[_0x33ed59(0x14c)]:null,'languages':_0x7bd76f,'i18nInfo':_0x22d959[_0x33ed59(0x149)]?{..._0x22d959['i18nInfo'],'langs':_0x7bd76f[_0x33ed59(0x107)]?_0x7bd76f:null}:null};}const initDef={'service':'app','command':'init','description':a3_0x50d5bc(0x148),'risk':a3_0x50d5bc(0x117),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x266a0d){return warnDeprecatedAppCommand('init',CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]'),await runInit(collectFlags(_0x266a0d,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x50d5bc(0xfd),'command':a3_0x50d5bc(0xfc),'description':a3_0x50d5bc(0x122),'risk':a3_0x50d5bc(0x121),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x50d5bc(0x12a),'type':a3_0x50d5bc(0x11c),'description':a3_0x50d5bc(0x112),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x50d5bc(0xfa),'type':a3_0x50d5bc(0x145),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x50d5bc(0x13c),'type':a3_0x50d5bc(0x145),'description':a3_0x50d5bc(0x125),'default':![]},{'name':'include-unpublished','type':'boolean','description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x559217){const _0x43b1fc=a3_0x50d5bc,_0x2d1b5a=_0x559217[_0x43b1fc(0x141)](_0x43b1fc(0x12a))||_0x559217[_0x43b1fc(0x137)]||getEnv()||_0x43b1fc(0x123),_0x3eefe7=_0x559217[_0x43b1fc(0x100)](_0x43b1fc(0xfa)),_0x3e189a=_0x559217['bool'](_0x43b1fc(0x13c)),_0x4eddc1=_0x559217[_0x43b1fc(0x100)](_0x43b1fc(0x13d)),{readRawConfigWithLayers:_0x14b59c,resolveDefaultAppSource:_0x2476f2,getLocalAppAliases:_0x2c6a62}=await import('../../context.js'),{getRemoteAppList:_0x25af1f}=await import(_0x43b1fc(0x11e)),{config:_0x5cac7a,layers:_0xb73d77}=_0x14b59c(),_0x542395=_0x2476f2(_0xb73d77),{defaultApp:_0x54d0e6}=_0x5cac7a,_0x49ba7b=await _0x25af1f({'env':_0x2d1b5a,'accessKey':_0x559217[_0x43b1fc(0x10a)],'localOnly':_0x3eefe7,'noCache':_0x3e189a}),_0x2da7cc=_0x4eddc1?_0x49ba7b[_0x43b1fc(0x114)]:filterRuntimeAccessibleApps(_0x49ba7b[_0x43b1fc(0x114)]),_0x5f273e=_0x49ba7b['items']['length']-_0x2da7cc[_0x43b1fc(0x107)],_0x2e2a7c=_0x2da7cc['map'](_0x347e94=>{const _0x74632f=_0x43b1fc;return{'name':_0x347e94[_0x74632f(0x12e)],'appcode':_0x347e94[_0x74632f(0x13b)],'named':!![],'definedIn':_0x74632f(0x116),'isDefault':_0x347e94[_0x74632f(0x12e)]===_0x54d0e6,...buildAppProfileListFields(_0x2d1b5a),...buildRemoteAppI18nFields(_0x347e94),'source':_0x49ba7b[_0x74632f(0x13a)],'owner':_0x347e94[_0x74632f(0x120)]??null,'status':_0x347e94['appPublishStatus']??null,'cachedAt':_0x49ba7b[_0x74632f(0x140)]};}),_0x36aa8a=_0x2c6a62(_0x5cac7a);let _0x445cf8=0x0;for(const [_0x4cca39,_0x5c52ff]of Object['entries'](_0x36aa8a)){const _0x4f3e23=typeof _0x5c52ff[_0x43b1fc(0x109)]===_0x43b1fc(0x11c)?_0x5c52ff[_0x43b1fc(0x109)][_0x43b1fc(0x135)]():'';if(!_0x4f3e23)continue;const _0x6ffd2d=findAppByCode(_0x49ba7b[_0x43b1fc(0x114)],_0x4f3e23);if(!_0x4eddc1&&_0x6ffd2d&&!isRuntimeAccessibleApp(_0x6ffd2d))continue;_0x445cf8+=0x1,_0x2e2a7c[_0x43b1fc(0x130)]({'name':_0x4cca39,'appcode':_0x4f3e23,'named':!![],'definedIn':_0x43b1fc(0xfa),'isDefault':_0x4cca39===_0x54d0e6,...buildAppProfileListFields(_0x2d1b5a),'source':_0x43b1fc(0x10c),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x2e2a7c,_0x559217[_0x43b1fc(0x10e)]);const _0x267339=_0x2e2a7c[_0x43b1fc(0x11f)](_0x20890f=>_0x20890f[_0x43b1fc(0x142)]===!![]),_0x41ddd4=_0x54d0e6??_0x267339?.['name']??null,_0x1236da={'env':_0x2d1b5a,'source':_0x49ba7b[_0x43b1fc(0x13a)],'fetchedAt':_0x49ba7b[_0x43b1fc(0x140)],'cachePath':_0x49ba7b[_0x43b1fc(0x119)],'globalPath':_0xb73d77[_0x43b1fc(0x113)]??null,'projectPath':_0xb73d77[_0x43b1fc(0x147)]??null,'defaultApp':_0x41ddd4,'defaultAppSource':_0x54d0e6!=null?_0x542395:null,'localAliasCount':_0x445cf8,'remoteTotal':_0x49ba7b[_0x43b1fc(0x114)][_0x43b1fc(0x107)],'hiddenUnpublishedCount':_0x5f273e,'includeUnpublished':_0x4eddc1};if(_0x2e2a7c[_0x43b1fc(0x107)]===0x0)return{'ok':!![],'data':{'items':_0x2e2a7c,'meta':_0x1236da},'message':_0x49ba7b[_0x43b1fc(0x13a)]===_0x43b1fc(0x127)?_0x43b1fc(0x13f):'No\x20apps\x20found\x20on\x20the\x20platform.'};return{'ok':!![],'data':{'items':_0x2e2a7c,'meta':_0x1236da}};}},pullDef={'service':a3_0x50d5bc(0xfd),'command':a3_0x50d5bc(0xff),'description':a3_0x50d5bc(0x10b),'risk':a3_0x50d5bc(0x117),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x50d5bc(0x12a),'type':'string','description':a3_0x50d5bc(0xf5),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x50d5bc(0xfa),'type':a3_0x50d5bc(0x145),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x50d5bc(0x13c),'type':a3_0x50d5bc(0x145),'description':a3_0x50d5bc(0x125),'default':![]}],async 'execute'(_0x322f0f){const _0x43eb99=a3_0x50d5bc,_0x1968d2=_0x322f0f['str']('env')||_0x322f0f[_0x43eb99(0x137)]||getEnv()||_0x43eb99(0x123),_0x403a43=_0x322f0f[_0x43eb99(0x100)]('local'),_0x2edc86=_0x322f0f['bool']('no-cache'),{getRemoteAppList:_0x23638d}=await import(_0x43eb99(0x11e)),_0x3d276d=await _0x23638d({'env':_0x1968d2,'accessKey':_0x322f0f[_0x43eb99(0x10a)],'localOnly':_0x403a43,'noCache':_0x2edc86});return{'ok':!![],'data':{'total':_0x3d276d[_0x43eb99(0x114)]['length'],'env':_0x1968d2,'source':_0x3d276d[_0x43eb99(0x13a)],'fetchedAt':_0x3d276d[_0x43eb99(0x140)],'cachePath':_0x3d276d[_0x43eb99(0x119)]},'message':_0x3d276d[_0x43eb99(0x13a)]===_0x43eb99(0x127)?'Loaded\x20'+_0x3d276d['items'][_0x43eb99(0x107)]+_0x43eb99(0x12f)+_0x1968d2+'\x22.':_0x43eb99(0x104)+_0x3d276d[_0x43eb99(0x114)][_0x43eb99(0x107)]+_0x43eb99(0x102)+_0x1968d2+'\x22.'};}},useDef={'service':a3_0x50d5bc(0xfd),'command':a3_0x50d5bc(0xf4),'description':a3_0x50d5bc(0xf9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x50d5bc(0xf6),'description':a3_0x50d5bc(0xfe),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3f002f){const _0x2792c0=a3_0x50d5bc;if(!_0x3f002f[_0x2792c0(0x11d)][0x0])throw CliErrors['validation']('Missing\x20app\x20name.',_0x2792c0(0x111)+CLI_BIN_NAME+_0x2792c0(0x131));},async 'execute'(_0x3ddead){const _0x23dabb=a3_0x50d5bc;warnDeprecatedAppCommand(_0x23dabb(0xf4),CLI_BIN_NAME+_0x23dabb(0x128));const _0x3c8c72=_0x3ddead[_0x23dabb(0x11d)][0x0];if(!_0x3c8c72)throw CliErrors[_0x23dabb(0x139)](_0x23dabb(0x133),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x915aa,resolveLocalAppAliasCode:_0x32d92b}=await import(_0x23dabb(0xf3)),{readCachedAppList:_0x1413a9}=await import('../../commands/app/cache.js'),_0x45a358=_0x3ddead[_0x23dabb(0x141)](_0x23dabb(0x12a)),_0x15db69=_0x915aa(_0x45a358?{'env':_0x45a358}:{}),_0x388a13=_0x1413a9(_0x15db69['env'],_0x15db69[_0x23dabb(0x10a)]),_0x4a536d=_0x388a13?.[_0x23dabb(0x114)][_0x23dabb(0x11f)](_0x51deda=>_0x51deda[_0x23dabb(0x12e)]===_0x3c8c72),_0x532905=_0x32d92b(_0x15db69['raw']??{},_0x3c8c72);if(_0x4a536d&&!isRuntimeAccessibleApp(_0x4a536d))throw runtimeInaccessibleAppError(_0x4a536d,'\x22'+_0x3c8c72+'\x22');if(_0x532905){const _0x4d70b0=_0x388a13?.['items'][_0x23dabb(0x11f)](_0x195504=>_0x195504[_0x23dabb(0x13b)]?.[_0x23dabb(0x135)]()===_0x532905);if(_0x4d70b0&&!isRuntimeAccessibleApp(_0x4d70b0))throw runtimeInaccessibleAppError(_0x4d70b0,'\x22'+_0x3c8c72+'\x22');}if(!_0x4a536d&&!_0x532905&&_0x15db69[_0x23dabb(0x146)]!==_0x3c8c72){const _0x5f5731=[..._0x388a13?.['items'][_0x23dabb(0x132)](_0x48be55=>_0x48be55[_0x23dabb(0x12e)])??[]],_0x57e415=_0x5f5731['length']===0x0?_0x23dabb(0x124)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x3c8c72+_0x23dabb(0xf8):_0x23dabb(0x134)+Array[_0x23dabb(0x10f)](new Set(_0x5f5731))[_0x23dabb(0x138)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x23dabb(0x139)](_0x23dabb(0xfb)+_0x3c8c72+_0x23dabb(0x11b),_0x57e415);}const _0x40d01c=_0x3ddead[_0x23dabb(0x100)]('global');let _0x4e74ee;if(_0x40d01c)_0x4e74ee={'global':!![]};else{const {isInProject:_0x3cb862}=await import('../../context.js'),_0x4aa41e=_0x3cb862();_0x4e74ee=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x23dabb(0x13e),'inProject':_0x4aa41e}));}const _0x3645a5=readConfig(_0x4e74ee);return _0x3645a5[_0x23dabb(0x146)]=_0x3c8c72,writeConfig(_0x3645a5,_0x4e74ee),{'ok':!![],'message':_0x23dabb(0x115)+_0x3c8c72+'\x22'+scopeLabel(_0x4e74ee)+'.'};}};function warnDeprecatedAppCommand(_0x5b9465,_0x138c3c){const _0x2f7777=a3_0x50d5bc;console[_0x2f7777(0x12c)](CLI_BIN_NAME+'\x20app\x20'+_0x5b9465+_0x2f7777(0x14b)+_0x138c3c+_0x2f7777(0x106));}const importDef={'service':'app','command':a3_0x50d5bc(0x101),'description':a3_0x50d5bc(0x10d),'risk':a3_0x50d5bc(0x117),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x2c07db){return await runInitImport(collectFlags(_0x2c07db,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x16b609=a3_0x54cb;(function(_0x1f5396,_0x1bfb7e){const _0x50036a=a3_0x54cb,_0x2164f6=_0x1f5396();while(!![]){try{const _0x497c39=-parseInt(_0x50036a(0x140))/0x1+-parseInt(_0x50036a(0x141))/0x2+-parseInt(_0x50036a(0x186))/0x3+parseInt(_0x50036a(0x133))/0x4*(parseInt(_0x50036a(0x17d))/0x5)+-parseInt(_0x50036a(0x17b))/0x6+parseInt(_0x50036a(0x14c))/0x7+parseInt(_0x50036a(0x181))/0x8;if(_0x497c39===_0x1bfb7e)break;else _0x2164f6['push'](_0x2164f6['shift']());}catch(_0x3999f9){_0x2164f6['push'](_0x2164f6['shift']());}}}(a3_0x3fb5,0x210b7));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';function a3_0x3fb5(){const _0x2addfc=['835lgRZVS','appcode','project-default','filter','3233376uyZXeQ','find','warn','fetchedAt','args','394209ClIpVi','No\x20apps\x20found\x20on\x20the\x20platform.','\x22\x20not\x20found.','No\x20cached\x20apps\x20found.','Usage:\x20','cache','str','from','nonInteractive','1420dRUUwK','Read\x20from\x20local\x20cache\x20only','langs','envName','remote','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','../../commands/app/cache.js','\x20app\x20use\x20<name>\x20[--global]','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20app(s)\x20for\x20env=\x22','Loaded\x20','list','mergedCli','265935rMWXnZ','363450EXvwBq','source','map','entries','appName','Missing\x20app\x20name.','app','Use\x20`','production','accessKey','\x20app\x20','1829982FMegIz','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','enableI18n','App\x20\x22','read','Remote\x20app\x20name\x20to\x20activate','env','init','write','.appcode\x20to\x20.lovrabet.json.','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','\x20cached\x20app(s)\x20for\x20env=\x22','boolean','defaultApp','appCode','bool','Use\x20global\x20config\x20scope','projectPath','items','use','Include\x20unpublished\x20apps\x20for\x20diagnostics','../../commands/app/remote-source.js','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Filter\x20by\x20environment\x20(default:\x20current\x20env)','../../context.js','join','Refreshed\x20app\x20cache\x20with\x20','Target\x20environment\x20(default:\x20current\x20env)','config','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','local','length','raw','global','no-cache','name','string','trim','Available\x20remote\x20apps:\x20','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','pull','import','cachePath','validation','push','62814EBYTad','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.'];a3_0x3fb5=function(){return _0x2addfc;};return a3_0x3fb5();}import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':a3_0x16b609(0x16e),'type':a3_0x16b609(0x159),'description':a3_0x16b609(0x15d),'default':![]};function collectFlags(_0x229009,_0x3749b6){const _0x520301=a3_0x16b609,_0x11eeda={};for(const _0x51ddd2 of _0x3749b6){const _0xb7611b=_0x51ddd2['type']===_0x520301(0x159)?_0x229009['bool'](_0x51ddd2[_0x520301(0x170)]):_0x229009['str'](_0x51ddd2[_0x520301(0x170)]);if(_0xb7611b!==''&&_0xb7611b!==![])_0x11eeda[_0x51ddd2[_0x520301(0x170)]]=_0xb7611b;}if(_0x229009[_0x520301(0x132)])_0x11eeda[_0x520301(0x132)]=!![];return _0x11eeda;}function normalizeLanguages(_0x33f6f7){const _0x3be6fe=a3_0x16b609;if(!Array['isArray'](_0x33f6f7))return[];return _0x33f6f7[_0x3be6fe(0x180)](_0x39ffb8=>typeof _0x39ffb8===_0x3be6fe(0x171))[_0x3be6fe(0x143)](_0x484068=>_0x484068[_0x3be6fe(0x172)]())[_0x3be6fe(0x180)](Boolean);}function buildRemoteAppI18nFields(_0xe5e603){const _0x175158=a3_0x16b609,_0x2ab11b=normalizeLanguages(_0xe5e603['i18nInfo']?.[_0x175158(0x135)]);return{'enableI18n':typeof _0xe5e603[_0x175158(0x14e)]===_0x175158(0x159)?_0xe5e603[_0x175158(0x14e)]:null,'languages':_0x2ab11b,'i18nInfo':_0xe5e603['i18nInfo']?{..._0xe5e603['i18nInfo'],'langs':_0x2ab11b[_0x175158(0x16c)]?_0x2ab11b:null}:null};}const initDef={'service':a3_0x16b609(0x147),'command':a3_0x16b609(0x153),'description':a3_0x16b609(0x16a),'risk':a3_0x16b609(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x1f1556){const _0x8fb7b1=a3_0x16b609;return warnDeprecatedAppCommand(_0x8fb7b1(0x153),CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]'),await runInit(collectFlags(_0x1f1556,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x16b609(0x147),'command':a3_0x16b609(0x13e),'description':a3_0x16b609(0x156),'risk':a3_0x16b609(0x150),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x16b609(0x152),'type':a3_0x16b609(0x171),'description':a3_0x16b609(0x164),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x16b609(0x159),'description':a3_0x16b609(0x163),'default':![]},{'name':a3_0x16b609(0x16f),'type':a3_0x16b609(0x159),'description':a3_0x16b609(0x138),'default':![]},{'name':'include-unpublished','type':a3_0x16b609(0x159),'description':a3_0x16b609(0x161),'default':![]}],async 'execute'(_0x171c44){const _0x59771b=a3_0x16b609,_0x449eee=_0x171c44[_0x59771b(0x130)](_0x59771b(0x152))||_0x171c44[_0x59771b(0x136)]||getEnv()||_0x59771b(0x149),_0x26df18=_0x171c44[_0x59771b(0x15c)](_0x59771b(0x16b)),_0x1ac9c6=_0x171c44['bool'](_0x59771b(0x16f)),_0x2b3a7c=_0x171c44[_0x59771b(0x15c)]('include-unpublished'),{readRawConfigWithLayers:_0x20c9ed,resolveDefaultAppSource:_0x29c370,getLocalAppAliases:_0x34e8f5}=await import(_0x59771b(0x165)),{getRemoteAppList:_0x3bea75}=await import(_0x59771b(0x162)),{config:_0x50ce47,layers:_0x35de76}=_0x20c9ed(),_0xfe1d00=_0x29c370(_0x35de76),{defaultApp:_0x361480}=_0x50ce47,_0x1156d9=await _0x3bea75({'env':_0x449eee,'accessKey':_0x171c44[_0x59771b(0x14a)],'localOnly':_0x26df18,'noCache':_0x1ac9c6}),_0x350293=_0x2b3a7c?_0x1156d9[_0x59771b(0x15f)]:filterRuntimeAccessibleApps(_0x1156d9['items']),_0x388485=_0x1156d9[_0x59771b(0x15f)][_0x59771b(0x16c)]-_0x350293[_0x59771b(0x16c)],_0x4fbb19=_0x350293[_0x59771b(0x143)](_0x51d7b1=>{const _0x431b07=_0x59771b;return{'name':_0x51d7b1[_0x431b07(0x145)],'appcode':_0x51d7b1[_0x431b07(0x15b)],'named':!![],'definedIn':_0x431b07(0x137),'isDefault':_0x51d7b1[_0x431b07(0x145)]===_0x361480,...buildAppProfileListFields(_0x449eee),...buildRemoteAppI18nFields(_0x51d7b1),'source':_0x1156d9[_0x431b07(0x142)],'owner':_0x51d7b1['appOwnerName']??null,'status':_0x51d7b1['appPublishStatus']??null,'cachedAt':_0x1156d9[_0x431b07(0x184)]};}),_0x5a36f3=_0x34e8f5(_0x50ce47);let _0x17dbb8=0x0;for(const [_0x42765e,_0x2838c9]of Object[_0x59771b(0x144)](_0x5a36f3)){const _0x326fe3=typeof _0x2838c9[_0x59771b(0x17e)]===_0x59771b(0x171)?_0x2838c9[_0x59771b(0x17e)]['trim']():'';if(!_0x326fe3)continue;const _0x1f9ebf=findAppByCode(_0x1156d9[_0x59771b(0x15f)],_0x326fe3);if(!_0x2b3a7c&&_0x1f9ebf&&!isRuntimeAccessibleApp(_0x1f9ebf))continue;_0x17dbb8+=0x1,_0x4fbb19[_0x59771b(0x17a)]({'name':_0x42765e,'appcode':_0x326fe3,'named':!![],'definedIn':_0x59771b(0x16b),'isDefault':_0x42765e===_0x361480,...buildAppProfileListFields(_0x449eee),'source':_0x59771b(0x169),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4fbb19,_0x171c44[_0x59771b(0x13f)]);const _0x17c691=_0x4fbb19['find'](_0x5c43b9=>_0x5c43b9['isCurrent']===!![]),_0x46b635=_0x361480??_0x17c691?.['name']??null,_0x4bd229={'env':_0x449eee,'source':_0x1156d9['source'],'fetchedAt':_0x1156d9['fetchedAt'],'cachePath':_0x1156d9[_0x59771b(0x178)],'globalPath':_0x35de76['globalPath']??null,'projectPath':_0x35de76[_0x59771b(0x15e)]??null,'defaultApp':_0x46b635,'defaultAppSource':_0x361480!=null?_0xfe1d00:null,'localAliasCount':_0x17dbb8,'remoteTotal':_0x1156d9['items'][_0x59771b(0x16c)],'hiddenUnpublishedCount':_0x388485,'includeUnpublished':_0x2b3a7c};if(_0x4fbb19['length']===0x0)return{'ok':!![],'data':{'items':_0x4fbb19,'meta':_0x4bd229},'message':_0x1156d9[_0x59771b(0x142)]===_0x59771b(0x18b)?_0x59771b(0x189):_0x59771b(0x187)};return{'ok':!![],'data':{'items':_0x4fbb19,'meta':_0x4bd229}};}},pullDef={'service':a3_0x16b609(0x147),'command':a3_0x16b609(0x176),'description':a3_0x16b609(0x174),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x16b609(0x152),'type':a3_0x16b609(0x171),'description':a3_0x16b609(0x168),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x16b609(0x16b),'type':a3_0x16b609(0x159),'description':a3_0x16b609(0x134),'default':![]},{'name':a3_0x16b609(0x16f),'type':'boolean','description':a3_0x16b609(0x138),'default':![]}],async 'execute'(_0x423524){const _0x1e19d9=a3_0x16b609,_0x4b88e2=_0x423524[_0x1e19d9(0x130)]('env')||_0x423524[_0x1e19d9(0x136)]||getEnv()||'production',_0x45761a=_0x423524[_0x1e19d9(0x15c)](_0x1e19d9(0x16b)),_0x3767a5=_0x423524[_0x1e19d9(0x15c)](_0x1e19d9(0x16f)),{getRemoteAppList:_0x3aa716}=await import(_0x1e19d9(0x162)),_0x5884ce=await _0x3aa716({'env':_0x4b88e2,'accessKey':_0x423524[_0x1e19d9(0x14a)],'localOnly':_0x45761a,'noCache':_0x3767a5});return{'ok':!![],'data':{'total':_0x5884ce[_0x1e19d9(0x15f)]['length'],'env':_0x4b88e2,'source':_0x5884ce[_0x1e19d9(0x142)],'fetchedAt':_0x5884ce[_0x1e19d9(0x184)],'cachePath':_0x5884ce[_0x1e19d9(0x178)]},'message':_0x5884ce[_0x1e19d9(0x142)]===_0x1e19d9(0x18b)?_0x1e19d9(0x13d)+_0x5884ce['items'][_0x1e19d9(0x16c)]+_0x1e19d9(0x158)+_0x4b88e2+'\x22.':_0x1e19d9(0x167)+_0x5884ce['items']['length']+_0x1e19d9(0x13c)+_0x4b88e2+'\x22.'};}},useDef={'service':a3_0x16b609(0x147),'command':a3_0x16b609(0x160),'description':a3_0x16b609(0x13b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x16b609(0x151),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x531a87){const _0x52f476=a3_0x16b609;if(!_0x531a87[_0x52f476(0x185)][0x0])throw CliErrors['validation'](_0x52f476(0x146),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x4d6f38){const _0x41025f=a3_0x16b609;warnDeprecatedAppCommand(_0x41025f(0x160),CLI_BIN_NAME+_0x41025f(0x157));const _0x43db82=_0x4d6f38[_0x41025f(0x185)][0x0];if(!_0x43db82)throw CliErrors[_0x41025f(0x179)](_0x41025f(0x146),_0x41025f(0x18a)+CLI_BIN_NAME+_0x41025f(0x13a));const {buildConfigFromFlags:_0x82bb1c,resolveLocalAppAliasCode:_0x193ee2}=await import(_0x41025f(0x165)),{readCachedAppList:_0x3312c2}=await import(_0x41025f(0x139)),_0x74b779=_0x4d6f38['str'](_0x41025f(0x152)),_0x28413c=_0x82bb1c(_0x74b779?{'env':_0x74b779}:{}),_0x173d9d=_0x3312c2(_0x28413c['env'],_0x28413c[_0x41025f(0x14a)]),_0x327bad=_0x173d9d?.['items'][_0x41025f(0x182)](_0x26fe7e=>_0x26fe7e['appName']===_0x43db82),_0x13f0b8=_0x193ee2(_0x28413c[_0x41025f(0x16d)]??{},_0x43db82);if(_0x327bad&&!isRuntimeAccessibleApp(_0x327bad))throw runtimeInaccessibleAppError(_0x327bad,'\x22'+_0x43db82+'\x22');if(_0x13f0b8){const _0x32f88f=_0x173d9d?.[_0x41025f(0x15f)][_0x41025f(0x182)](_0x1d5068=>_0x1d5068[_0x41025f(0x15b)]?.['trim']()===_0x13f0b8);if(_0x32f88f&&!isRuntimeAccessibleApp(_0x32f88f))throw runtimeInaccessibleAppError(_0x32f88f,'\x22'+_0x43db82+'\x22');}if(!_0x327bad&&!_0x13f0b8&&_0x28413c[_0x41025f(0x15a)]!==_0x43db82){const _0x436657=[..._0x173d9d?.['items'][_0x41025f(0x143)](_0x386392=>_0x386392[_0x41025f(0x145)])??[]],_0x5d83a2=_0x436657[_0x41025f(0x16c)]===0x0?_0x41025f(0x148)+CLI_BIN_NAME+_0x41025f(0x14d)+_0x43db82+_0x41025f(0x155):_0x41025f(0x173)+Array[_0x41025f(0x131)](new Set(_0x436657))[_0x41025f(0x166)](',\x20')+_0x41025f(0x17c);throw CliErrors['validation'](_0x41025f(0x14f)+_0x43db82+_0x41025f(0x188),_0x5d83a2);}const _0x4c8dd5=_0x4d6f38['bool']('global');let _0x4bb590;if(_0x4c8dd5)_0x4bb590={'global':!![]};else{const {isInProject:_0x3d799b}=await import(_0x41025f(0x165)),_0x189f02=_0x3d799b();_0x4bb590=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x41025f(0x17f),'inProject':_0x189f02}));}const _0x17f228=readConfig(_0x4bb590);return _0x17f228['defaultApp']=_0x43db82,writeConfig(_0x17f228,_0x4bb590),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x43db82+'\x22'+scopeLabel(_0x4bb590)+'.'};}};function warnDeprecatedAppCommand(_0x290c3d,_0x5ede19){const _0x4426af=a3_0x16b609;console[_0x4426af(0x183)](CLI_BIN_NAME+_0x4426af(0x14b)+_0x290c3d+'\x20is\x20deprecated.\x20Use\x20`'+_0x5ede19+'`\x20instead.');}function a3_0x54cb(_0x1fac5a,_0x16d99e){_0x1fac5a=_0x1fac5a-0x130;const _0x3fb5b7=a3_0x3fb5();let _0x54cb97=_0x3fb5b7[_0x1fac5a];return _0x54cb97;}const importDef={'service':a3_0x16b609(0x147),'command':a3_0x16b609(0x177),'description':a3_0x16b609(0x175),'risk':a3_0x16b609(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x563398){return await runInitImport(collectFlags(_0x563398,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- function a4_0x4278(_0x32e3c2,_0x5f062e){_0x32e3c2=_0x32e3c2-0x1c2;const _0x5bfac9=a4_0x5bfa();let _0x427894=_0x5bfac9[_0x32e3c2];return _0x427894;}(function(_0x1bbc7c,_0x407ead){const _0x1017e6=a4_0x4278,_0x1e4bf3=_0x1bbc7c();while(!![]){try{const _0x39bdc8=-parseInt(_0x1017e6(0x1cc))/0x1*(parseInt(_0x1017e6(0x1d5))/0x2)+-parseInt(_0x1017e6(0x1d9))/0x3+parseInt(_0x1017e6(0x1d2))/0x4*(parseInt(_0x1017e6(0x1cf))/0x5)+parseInt(_0x1017e6(0x1ce))/0x6+parseInt(_0x1017e6(0x1d6))/0x7*(-parseInt(_0x1017e6(0x1c5))/0x8)+-parseInt(_0x1017e6(0x1c3))/0x9*(parseInt(_0x1017e6(0x1c7))/0xa)+-parseInt(_0x1017e6(0x1c2))/0xb*(-parseInt(_0x1017e6(0x1d7))/0xc);if(_0x39bdc8===_0x407ead)break;else _0x1e4bf3['push'](_0x1e4bf3['shift']());}catch(_0x1d6a6d){_0x1e4bf3['push'](_0x1e4bf3['shift']());}}}(a4_0x5bfa,0x97899));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x177bf8){if(typeof _0x177bf8!=='string')return null;const _0x4edf9d=_0x177bf8['trim']();return _0x4edf9d?_0x4edf9d['toUpperCase']():null;}export function isRuntimeAccessibleApp(_0x2c5bdf){const _0x288a7e=a4_0x4278;return normalizeAppPublishStatus(_0x2c5bdf[_0x288a7e(0x1d3)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x34575c){const _0x2be990=a4_0x4278;return _0x34575c[_0x2be990(0x1ca)](isRuntimeAccessibleApp);}function a4_0x5bfa(){const _0x573ca1=['1270Vhszlu','trim','.\x20Publish\x20the\x20app\x20before\x20using\x20','19072PyUvFD','appPublishStatus','find','701126KlujaH','1667407pedpeG','804EHKRWu','appName','2818245IwDZHJ','363583VXVnjP','2316870OOUqEp','validation','40dFREWl','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','30AinSEu','App\x20','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','filter','appCode','3aiRRIg','UNKNOWN','6896838yWsFrW'];a4_0x5bfa=function(){return _0x573ca1;};return a4_0x5bfa();}export function findAppByName(_0x52ba1c,_0x426603){const _0x49d73c=a4_0x4278;return _0x52ba1c[_0x49d73c(0x1d4)](_0x8bcc18=>_0x8bcc18[_0x49d73c(0x1d8)]===_0x426603);}export function findAppByCode(_0x1dfbc5,_0x37a030){const _0x4ebe53=a4_0x4278,_0x5f0c11=_0x37a030['trim']();if(!_0x5f0c11)return undefined;return _0x1dfbc5[_0x4ebe53(0x1d4)](_0x37363b=>_0x37363b[_0x4ebe53(0x1cb)]?.[_0x4ebe53(0x1d0)]()===_0x5f0c11);}export function runtimeInaccessibleAppError(_0x328ef3,_0xe9a060){const _0x14f82b=a4_0x4278,_0x5db071=normalizeAppPublishStatus(_0x328ef3['appPublishStatus'])??_0x14f82b(0x1cd);return CliErrors[_0x14f82b(0x1c4)](_0x14f82b(0x1c8)+_0xe9a060+_0x14f82b(0x1c6),'Current\x20status:\x20'+_0x5db071+_0x14f82b(0x1d1)+CLI_BIN_NAME+_0x14f82b(0x1c9));}
1
+ (function(_0x5ec92f,_0x3e685a){const _0x290b66=a4_0x572d,_0xeaafdc=_0x5ec92f();while(!![]){try{const _0x2fa893=parseInt(_0x290b66(0x198))/0x1*(-parseInt(_0x290b66(0x189))/0x2)+-parseInt(_0x290b66(0x18c))/0x3+-parseInt(_0x290b66(0x18e))/0x4*(-parseInt(_0x290b66(0x18b))/0x5)+-parseInt(_0x290b66(0x197))/0x6*(-parseInt(_0x290b66(0x192))/0x7)+-parseInt(_0x290b66(0x19b))/0x8*(-parseInt(_0x290b66(0x186))/0x9)+-parseInt(_0x290b66(0x191))/0xa+parseInt(_0x290b66(0x19a))/0xb*(parseInt(_0x290b66(0x18d))/0xc);if(_0x2fa893===_0x3e685a)break;else _0xeaafdc['push'](_0xeaafdc['shift']());}catch(_0x416a10){_0xeaafdc['push'](_0xeaafdc['shift']());}}}(a4_0x247e,0x26ed7));function a4_0x247e(){const _0x36be45=['1GuWXAY','App\x20','26191GugqLr','8PpKrlz','UNKNOWN','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','appName','2163978lTLAZw','filter','Current\x20status:\x20','328044fdVVAr','find','26090FUAETR','935802JpeGFM','768hskkZF','244JQnPRP','appPublishStatus','trim','2340900ycMxOH','1108583ZvXVLv','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','validation','.\x20Publish\x20the\x20app\x20before\x20using\x20','string','6EwGkRA'];a4_0x247e=function(){return _0x36be45;};return a4_0x247e();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';function a4_0x572d(_0x5ef491,_0x1e11e1){_0x5ef491=_0x5ef491-0x183;const _0x247ece=a4_0x247e();let _0x572d4e=_0x247ece[_0x5ef491];return _0x572d4e;}export function normalizeAppPublishStatus(_0x582849){const _0x4bf7ff=a4_0x572d;if(typeof _0x582849!==_0x4bf7ff(0x196))return null;const _0x1847a3=_0x582849[_0x4bf7ff(0x190)]();return _0x1847a3?_0x1847a3['toUpperCase']():null;}export function isRuntimeAccessibleApp(_0x5b0871){return normalizeAppPublishStatus(_0x5b0871['appPublishStatus'])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x31708c){const _0x4b9383=a4_0x572d;return _0x31708c[_0x4b9383(0x187)](isRuntimeAccessibleApp);}export function findAppByName(_0x350bd8,_0x44961e){const _0xf9efea=a4_0x572d;return _0x350bd8[_0xf9efea(0x18a)](_0x448ab6=>_0x448ab6[_0xf9efea(0x185)]===_0x44961e);}export function findAppByCode(_0xded9fb,_0x3bb845){const _0x42e675=a4_0x572d,_0x574d2c=_0x3bb845[_0x42e675(0x190)]();if(!_0x574d2c)return undefined;return _0xded9fb['find'](_0x9a2b93=>_0x9a2b93['appCode']?.[_0x42e675(0x190)]()===_0x574d2c);}export function runtimeInaccessibleAppError(_0x28bb67,_0x51008a){const _0x5e69b3=a4_0x572d,_0x4b57a8=normalizeAppPublishStatus(_0x28bb67[_0x5e69b3(0x18f)])??_0x5e69b3(0x183);return CliErrors[_0x5e69b3(0x194)](_0x5e69b3(0x199)+_0x51008a+_0x5e69b3(0x193),_0x5e69b3(0x188)+_0x4b57a8+_0x5e69b3(0x195)+CLI_BIN_NAME+_0x5e69b3(0x184));}
@@ -1 +1 @@
1
- (function(_0x441653,_0xedc44f){const _0x559a50=a5_0x3ffb,_0x41d855=_0x441653();while(!![]){try{const _0x54f9d6=-parseInt(_0x559a50(0x108))/0x1*(parseInt(_0x559a50(0x102))/0x2)+parseInt(_0x559a50(0x109))/0x3*(parseInt(_0x559a50(0x104))/0x4)+-parseInt(_0x559a50(0x10b))/0x5*(-parseInt(_0x559a50(0x100))/0x6)+parseInt(_0x559a50(0x112))/0x7*(-parseInt(_0x559a50(0x113))/0x8)+parseInt(_0x559a50(0x10e))/0x9*(parseInt(_0x559a50(0x111))/0xa)+-parseInt(_0x559a50(0x10a))/0xb*(-parseInt(_0x559a50(0x10f))/0xc)+-parseInt(_0x559a50(0x10d))/0xd;if(_0x54f9d6===_0xedc44f)break;else _0x41d855['push'](_0x41d855['shift']());}catch(_0x2b6e1b){_0x41d855['push'](_0x41d855['shift']());}}}(a5_0x1c94,0x328fc));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x16285e=a5_0x3ffb,_0x32bb22=join(__dirname,_0x16285e(0x106)),_0x2e0d71=readFileSync(_0x32bb22,'utf-8');return JSON[_0x16285e(0x103)](_0x2e0d71);}function a5_0x3ffb(_0x1b59cf,_0x2eeab0){_0x1b59cf=_0x1b59cf-0x100;const _0x1c94a5=a5_0x1c94();let _0x3ffb78=_0x1c94a5[_0x1b59cf];return _0x3ffb78;}function a5_0x1c94(){const _0x2227f8=['159444VtOrGB','14844wLHYXo','data','190kwILGG','27076skdxdY','80IiBsKr','373566FHXtaY','success','2cLhTFP','parse','252pNCVRz','errorCode','../../../mock/app-list.json','errorMsg','318271oMAxmz','16143YqRSbp','2706kCHRBV','20ukQetO','Mock\x20API\x20error:\x20','8643726jwZwOF'];a5_0x1c94=function(){return _0x2227f8;};return a5_0x1c94();}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x1b292b=a5_0x3ffb,_0x22100a=getMockAppList();if(!_0x22100a[_0x1b292b(0x101)])throw new Error(_0x1b292b(0x10c)+_0x22100a[_0x1b292b(0x107)]+'\x20('+_0x22100a[_0x1b292b(0x105)]+')');return _0x22100a[_0x1b292b(0x110)]['tableData'];}
1
+ function a5_0xba7a(){const _0x3a0cb6=['30ZZNZfn','8JQTXeY','errorMsg','2819763xDcUrm','424494NngBeC','data','20XXoksE','451dQvhhC','6NyAtLN','errorCode','413412QxhvPe','tableData','1763196zwmjAJ','success','2205604DyXXuy','8655185nRCoyg','464021AfWIZf'];a5_0xba7a=function(){return _0x3a0cb6;};return a5_0xba7a();}(function(_0x2e152d,_0x2fc6db){const _0x1b6e21=a5_0x36c2,_0x564c2b=_0x2e152d();while(!![]){try{const _0x25322e=parseInt(_0x1b6e21(0x9f))/0x1+parseInt(_0x1b6e21(0xae))/0x2+parseInt(_0x1b6e21(0xa8))/0x3*(-parseInt(_0x1b6e21(0xac))/0x4)+parseInt(_0x1b6e21(0xa0))/0x5*(parseInt(_0x1b6e21(0xa4))/0x6)+parseInt(_0x1b6e21(0x9e))/0x7*(-parseInt(_0x1b6e21(0xa1))/0x8)+parseInt(_0x1b6e21(0xa3))/0x9*(-parseInt(_0x1b6e21(0xa6))/0xa)+parseInt(_0x1b6e21(0xa7))/0xb*(parseInt(_0x1b6e21(0xaa))/0xc);if(_0x25322e===_0x2fc6db)break;else _0x564c2b['push'](_0x564c2b['shift']());}catch(_0x4dc60f){_0x564c2b['push'](_0x564c2b['shift']());}}}(a5_0xba7a,0xa0ec5));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a5_0x36c2(_0x161c07,_0x2fc54a){_0x161c07=_0x161c07-0x9e;const _0xba7ac8=a5_0xba7a();let _0x36c21e=_0xba7ac8[_0x161c07];return _0x36c21e;}function loadMockAppList(){const _0x4f4cd6=join(__dirname,'../../../mock/app-list.json'),_0xac2cde=readFileSync(_0x4f4cd6,'utf-8');return JSON['parse'](_0xac2cde);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x589a42=a5_0x36c2,_0x11e219=getMockAppList();if(!_0x11e219[_0x589a42(0xad)])throw new Error('Mock\x20API\x20error:\x20'+_0x11e219[_0x589a42(0xa2)]+'\x20('+_0x11e219[_0x589a42(0xa9)]+')');return _0x11e219[_0x589a42(0xa5)][_0x589a42(0xab)];}
@@ -1 +1 @@
1
- (function(_0x38ad79,_0x13d23a){const _0x47fa32=a6_0x1b8a,_0x443acc=_0x38ad79();while(!![]){try{const _0xd2471b=-parseInt(_0x47fa32(0x11b))/0x1+parseInt(_0x47fa32(0x11f))/0x2*(-parseInt(_0x47fa32(0x112))/0x3)+-parseInt(_0x47fa32(0x110))/0x4*(parseInt(_0x47fa32(0x11a))/0x5)+parseInt(_0x47fa32(0x111))/0x6*(parseInt(_0x47fa32(0x122))/0x7)+-parseInt(_0x47fa32(0x115))/0x8*(-parseInt(_0x47fa32(0x116))/0x9)+-parseInt(_0x47fa32(0x118))/0xa*(parseInt(_0x47fa32(0x10f))/0xb)+-parseInt(_0x47fa32(0x121))/0xc*(-parseInt(_0x47fa32(0x119))/0xd);if(_0xd2471b===_0x13d23a)break;else _0x443acc['push'](_0x443acc['shift']());}catch(_0x4ef661){_0x443acc['push'](_0x443acc['shift']());}}}(a6_0x3fea,0x327b3));function a6_0x3fea(){const _0x473fc4=['APP_LIST_SOURCE','cache','56ZSbsvd','243126gvqcUV','toLowerCase','10FRhenm','533AMiDYM','51225CtRbRG','266781ylrGDX','mock','remote','fetchedAt','70jfYKtS','items','299496MCAKqe','49pyySuc','trim','2909049OMqDNx','108DcoUlS','150810NXrScm','32031TyGaOw'];a6_0x3fea=function(){return _0x473fc4;};return a6_0x3fea();}import{getMyApps}from'../../core/api-client.js';function a6_0x1b8a(_0xeeec15,_0x2c6a05){_0xeeec15=_0xeeec15-0x10e;const _0x3fea1a=a6_0x3fea();let _0x1b8a6c=_0x3fea1a[_0xeeec15];return _0x1b8a6c;}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x52bfcb=a6_0x1b8a,_0x438d90=(productEnv(_0x52bfcb(0x113))||'')[_0x52bfcb(0x10e)]()[_0x52bfcb(0x117)]();return _0x438d90===_0x52bfcb(0x11c);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xf984ca){const _0x1ff4cb=a6_0x1b8a,{env:_0x2eb580,accessKey:_0x1dba76,localOnly:localOnly=![],noCache:noCache=![]}=_0xf984ca,_0x12f8ad=readCachedAppList(_0x2eb580,_0x1dba76),_0x55af52=_0x1dba76?.[_0x1ff4cb(0x10e)]()?getAppCacheFilePath(_0x2eb580,_0x1dba76):null;if(localOnly)return{'items':_0x12f8ad?.[_0x1ff4cb(0x120)]??[],'source':_0x1ff4cb(0x114),'fetchedAt':_0x12f8ad?.[_0x1ff4cb(0x11e)]??null,'cachePath':_0x55af52};try{const _0x31c44f=await getRemoteAppItems(),_0x5d882a=shouldUseMockRemoteApps()?_0x1ff4cb(0x11c):_0x1ff4cb(0x11d),_0x296195=new Date()['toISOString'](),_0x52ac44=_0x1dba76?.[_0x1ff4cb(0x10e)]()?writeCachedAppList(_0x2eb580,_0x1dba76,{'env':_0x2eb580,'fetchedAt':_0x296195,'source':_0x5d882a,'items':_0x31c44f}):null;return{'items':_0x31c44f,'source':_0x5d882a,'fetchedAt':_0x296195,'cachePath':_0x52ac44};}catch(_0x59ad8b){if(!noCache&&_0x12f8ad)return{'items':_0x12f8ad[_0x1ff4cb(0x120)],'source':_0x1ff4cb(0x114),'fetchedAt':_0x12f8ad['fetchedAt'],'cachePath':_0x55af52};throw _0x59ad8b;}}
1
+ (function(_0x4cba0f,_0x2ddd4b){const _0x76d428=a6_0xea03,_0x2720e0=_0x4cba0f();while(!![]){try{const _0x49b24e=parseInt(_0x76d428(0x1d5))/0x1+parseInt(_0x76d428(0x1d4))/0x2+-parseInt(_0x76d428(0x1d6))/0x3*(parseInt(_0x76d428(0x1ce))/0x4)+-parseInt(_0x76d428(0x1db))/0x5+-parseInt(_0x76d428(0x1dd))/0x6+parseInt(_0x76d428(0x1d2))/0x7+-parseInt(_0x76d428(0x1da))/0x8;if(_0x49b24e===_0x2ddd4b)break;else _0x2720e0['push'](_0x2720e0['shift']());}catch(_0x52b4f2){_0x2720e0['push'](_0x2720e0['shift']());}}}(a6_0x474a,0x2cf5b));function a6_0xea03(_0x15462c,_0x5be5c7){_0x15462c=_0x15462c-0x1ce;const _0x474ad6=a6_0x474a();let _0xea0366=_0x474ad6[_0x15462c];return _0xea0366;}function a6_0x474a(){const _0x1c6838=['63197jfLSvC','15idXafF','toLowerCase','cache','mock','601296rnjfqK','478205GnjdaC','toISOString','441672pXvduU','remote','204044UtTPKB','trim','fetchedAt','items','2377102WeHTWe','APP_LIST_SOURCE','561684zNktUO'];a6_0x474a=function(){return _0x1c6838;};return a6_0x474a();}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x161b3e=a6_0xea03,_0x3ccb10=(productEnv(_0x161b3e(0x1d3))||'')[_0x161b3e(0x1cf)]()[_0x161b3e(0x1d7)]();return _0x3ccb10===_0x161b3e(0x1d9);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x2f23b6){const _0x2c9bcb=a6_0xea03,{env:_0x265360,accessKey:_0x296792,localOnly:localOnly=![],noCache:noCache=![]}=_0x2f23b6,_0x1f0fb7=readCachedAppList(_0x265360,_0x296792),_0x5624a1=_0x296792?.[_0x2c9bcb(0x1cf)]()?getAppCacheFilePath(_0x265360,_0x296792):null;if(localOnly)return{'items':_0x1f0fb7?.[_0x2c9bcb(0x1d1)]??[],'source':_0x2c9bcb(0x1d8),'fetchedAt':_0x1f0fb7?.['fetchedAt']??null,'cachePath':_0x5624a1};try{const _0x39c807=await getRemoteAppItems(),_0x452ee1=shouldUseMockRemoteApps()?_0x2c9bcb(0x1d9):_0x2c9bcb(0x1de),_0x56d4ca=new Date()[_0x2c9bcb(0x1dc)](),_0x9dec63=_0x296792?.[_0x2c9bcb(0x1cf)]()?writeCachedAppList(_0x265360,_0x296792,{'env':_0x265360,'fetchedAt':_0x56d4ca,'source':_0x452ee1,'items':_0x39c807}):null;return{'items':_0x39c807,'source':_0x452ee1,'fetchedAt':_0x56d4ca,'cachePath':_0x9dec63};}catch(_0x56db35){if(!noCache&&_0x1f0fb7)return{'items':_0x1f0fb7[_0x2c9bcb(0x1d1)],'source':_0x2c9bcb(0x1d8),'fetchedAt':_0x1f0fb7[_0x2c9bcb(0x1d0)],'cachePath':_0x5624a1};throw _0x56db35;}}
@@ -1 +1 @@
1
- function a7_0x3d00(_0x50c89d,_0x4c0f6c){_0x50c89d=_0x50c89d-0x16a;const _0xfd01c=a7_0xfd01();let _0x3d0054=_0xfd01c[_0x50c89d];return _0x3d0054;}(function(_0x36782a,_0x452a8e){const _0x4102f0=a7_0x3d00,_0x328e3b=_0x36782a();while(!![]){try{const _0x203e07=parseInt(_0x4102f0(0x17e))/0x1+parseInt(_0x4102f0(0x176))/0x2+-parseInt(_0x4102f0(0x16e))/0x3+parseInt(_0x4102f0(0x16a))/0x4+parseInt(_0x4102f0(0x179))/0x5*(-parseInt(_0x4102f0(0x178))/0x6)+-parseInt(_0x4102f0(0x177))/0x7+-parseInt(_0x4102f0(0x16f))/0x8*(-parseInt(_0x4102f0(0x17b))/0x9);if(_0x203e07===_0x452a8e)break;else _0x328e3b['push'](_0x328e3b['shift']());}catch(_0x1f9a81){_0x328e3b['push'](_0x328e3b['shift']());}}}(a7_0xfd01,0xcf3de));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a7_0xfd01(){const _0x177028=['project','5588613nWKhHl','global','name','1489133KuySIF','3369368SjEeFM','definedIn','appcode','defaultApp','3258051KhwQyI','8cqXWIm','appCode','named','trim','local','isCurrent','find','285892DGTsKf','7019656sJbkrc','13326DkgjGu','355JRIdvN'];a7_0xfd01=function(){return _0x177028;};return a7_0xfd01();}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4b96ba,_0x1a86ee){const _0x42d223=a7_0x3d00;if(!_0x1a86ee)return;const _0x2ed2bc=!!(_0x1a86ee['currentApp']??_0x1a86ee[_0x42d223(0x16d)]);for(const _0x39fb35 of _0x4b96ba){_0x39fb35[_0x42d223(0x174)]=![];}const _0x6a0192=_0x1a86ee['appCode']!=null?String(_0x1a86ee[_0x42d223(0x170)])['trim']():'';if(_0x2ed2bc){const _0x1c73ec=_0x1a86ee['currentApp']??_0x1a86ee[_0x42d223(0x16d)];if(_0x1c73ec){const _0x5b1296=_0x4b96ba[_0x42d223(0x175)](_0x4adca2=>_0x4adca2['named']===!![]&&_0x4adca2[_0x42d223(0x17d)]===_0x1c73ec&&_0x4adca2[_0x42d223(0x16b)]===_0x42d223(0x173)),_0x1a561f=_0x5b1296??_0x4b96ba[_0x42d223(0x175)](_0x2e49ce=>_0x2e49ce[_0x42d223(0x171)]===!![]&&_0x2e49ce[_0x42d223(0x17d)]===_0x1c73ec);if(_0x1a561f){const _0x4c6f93=String(_0x1a561f['appcode']??'')['trim']();if(!_0x6a0192||_0x4c6f93===_0x6a0192){_0x1a561f['isCurrent']=!![];return;}}}if(_0x6a0192){const _0x450855=_0x4b96ba[_0x42d223(0x175)](_0x20f9d1=>String(_0x20f9d1[_0x42d223(0x16c)]??'')[_0x42d223(0x172)]()===_0x6a0192);_0x450855&&(_0x450855[_0x42d223(0x174)]=!![]);}return;}if(!_0x6a0192)return;for(const _0x50dd55 of _0x4b96ba){String(_0x50dd55[_0x42d223(0x16c)]??'')['trim']()===_0x6a0192&&(_0x50dd55['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x555c4f){const _0x3c3349=a7_0x3d00;return formatScopeLabel(_0x555c4f['global']?_0x3c3349(0x17c):_0x3c3349(0x17a));}
1
+ (function(_0x22bd08,_0x5a0811){const _0xeebb51=a7_0x1bd1,_0x4a6b4f=_0x22bd08();while(!![]){try{const _0x1c6bef=-parseInt(_0xeebb51(0x1ca))/0x1*(parseInt(_0xeebb51(0x1bf))/0x2)+-parseInt(_0xeebb51(0x1bc))/0x3+-parseInt(_0xeebb51(0x1c1))/0x4+-parseInt(_0xeebb51(0x1b7))/0x5+parseInt(_0xeebb51(0x1bd))/0x6*(parseInt(_0xeebb51(0x1c5))/0x7)+-parseInt(_0xeebb51(0x1c8))/0x8*(parseInt(_0xeebb51(0x1be))/0x9)+-parseInt(_0xeebb51(0x1cb))/0xa*(-parseInt(_0xeebb51(0x1c6))/0xb);if(_0x1c6bef===_0x5a0811)break;else _0x4a6b4f['push'](_0x4a6b4f['shift']());}catch(_0x37277a){_0x4a6b4f['push'](_0x4a6b4f['shift']());}}}(a7_0x477c,0x8e8c8));function a7_0x477c(){const _0x1f981c=['33FLhvZN','appcode','44872hyOCwI','global','65991lSAVLC','12509810OLtoVs','trim','902630fgduxE','currentApp','find','appCode','defaultApp','2944620EaATTB','6gDGMZB','1251dYRfpo','30LvqVFy','name','2992688ghWeuS','project','named','isCurrent','3574837FfioIT'];a7_0x477c=function(){return _0x1f981c;};return a7_0x477c();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a7_0x1bd1(_0x3e43b0,_0x58c153){_0x3e43b0=_0x3e43b0-0x1b6;const _0x477c48=a7_0x477c();let _0x1bd1a3=_0x477c48[_0x3e43b0];return _0x1bd1a3;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x2fd602,_0x4f0bfd){const _0x4c4c61=a7_0x1bd1;if(!_0x4f0bfd)return;const _0xf80e99=!!(_0x4f0bfd[_0x4c4c61(0x1b8)]??_0x4f0bfd[_0x4c4c61(0x1bb)]);for(const _0x2fdd93 of _0x2fd602){_0x2fdd93[_0x4c4c61(0x1c4)]=![];}const _0x5c2646=_0x4f0bfd[_0x4c4c61(0x1ba)]!=null?String(_0x4f0bfd['appCode'])[_0x4c4c61(0x1b6)]():'';if(_0xf80e99){const _0x3d6f05=_0x4f0bfd[_0x4c4c61(0x1b8)]??_0x4f0bfd[_0x4c4c61(0x1bb)];if(_0x3d6f05){const _0x2c937f=_0x2fd602[_0x4c4c61(0x1b9)](_0x5e3eb5=>_0x5e3eb5[_0x4c4c61(0x1c3)]===!![]&&_0x5e3eb5[_0x4c4c61(0x1c0)]===_0x3d6f05&&_0x5e3eb5['definedIn']==='local'),_0x39faf7=_0x2c937f??_0x2fd602[_0x4c4c61(0x1b9)](_0x48098c=>_0x48098c[_0x4c4c61(0x1c3)]===!![]&&_0x48098c[_0x4c4c61(0x1c0)]===_0x3d6f05);if(_0x39faf7){const _0x3ba0cf=String(_0x39faf7[_0x4c4c61(0x1c7)]??'')[_0x4c4c61(0x1b6)]();if(!_0x5c2646||_0x3ba0cf===_0x5c2646){_0x39faf7[_0x4c4c61(0x1c4)]=!![];return;}}}if(_0x5c2646){const _0x4e5c96=_0x2fd602['find'](_0x345a89=>String(_0x345a89[_0x4c4c61(0x1c7)]??'')[_0x4c4c61(0x1b6)]()===_0x5c2646);_0x4e5c96&&(_0x4e5c96[_0x4c4c61(0x1c4)]=!![]);}return;}if(!_0x5c2646)return;for(const _0x20b529 of _0x2fd602){String(_0x20b529[_0x4c4c61(0x1c7)]??'')['trim']()===_0x5c2646&&(_0x20b529[_0x4c4c61(0x1c4)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x3f0a1c){const _0xc605ea=a7_0x1bd1;return formatScopeLabel(_0x3f0a1c[_0xc605ea(0x1c9)]?_0xc605ea(0x1c9):_0xc605ea(0x1c2));}
@@ -1 +1 @@
1
- function a8_0x35cc(_0x9eac8e,_0x2b255a){_0x9eac8e=_0x9eac8e-0xc8;const _0x265d43=a8_0x265d();let _0x35cc26=_0x265d43[_0x9eac8e];return _0x35cc26;}const a8_0x24226e=a8_0x35cc;(function(_0x4c46e1,_0x3e22da){const _0x3a64f0=a8_0x35cc,_0x123591=_0x4c46e1();while(!![]){try{const _0x4e6cf2=-parseInt(_0x3a64f0(0xd5))/0x1*(parseInt(_0x3a64f0(0xdd))/0x2)+-parseInt(_0x3a64f0(0xe0))/0x3+parseInt(_0x3a64f0(0xca))/0x4*(parseInt(_0x3a64f0(0xcc))/0x5)+parseInt(_0x3a64f0(0xdb))/0x6*(-parseInt(_0x3a64f0(0xc9))/0x7)+parseInt(_0x3a64f0(0xde))/0x8+-parseInt(_0x3a64f0(0xd3))/0x9*(parseInt(_0x3a64f0(0xcb))/0xa)+-parseInt(_0x3a64f0(0xe2))/0xb*(-parseInt(_0x3a64f0(0xd4))/0xc);if(_0x4e6cf2===_0x3e22da)break;else _0x123591['push'](_0x123591['shift']());}catch(_0x536ab6){_0x123591['push'](_0x123591['shift']());}}}(a8_0x265d,0xda459));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x265d(){const _0x31c98a=['165596BdROCr','10YoxCCq','55hbNcvW','App\x20config\x20key','\x20app-config\x20get\x20<key>','apiError','Missing\x20app-config\x20key.','key','trim','14227506yInnXF','10236cwxfCe','1403946CYIdEL','appCode','Usage:\x20','app-config','read','get','475164aCbMOi','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','2TAcwZq','11869920nEFtvi','validation','1612941XeRpYB','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','40117oFKNIs',',\x20appCode=','args','56rxjusv'];a8_0x265d=function(){return _0x31c98a;};return a8_0x265d();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x24226e(0xd8),'command':a8_0x24226e(0xda),'description':a8_0x24226e(0xdc),'risk':a8_0x24226e(0xd9),'args':[{'name':a8_0x24226e(0xd1),'description':a8_0x24226e(0xcd),'required':!![]}],'flags':[],async 'execute'(_0x1c0710){const _0x1cc5d5=a8_0x24226e,_0x9be8f5=_0x1c0710[_0x1cc5d5(0xc8)][0x0]?.[_0x1cc5d5(0xd2)]();if(!_0x9be8f5)throw CliErrors[_0x1cc5d5(0xdf)](_0x1cc5d5(0xd0),_0x1cc5d5(0xd7)+CLI_BIN_NAME+_0x1cc5d5(0xce));try{const _0x32d8a7=await getRuntimeAppConfigByKey(_0x1c0710[_0x1cc5d5(0xd6)],_0x9be8f5);return{'ok':!![],'data':_0x32d8a7};}catch{throw CliErrors[_0x1cc5d5(0xcf)]('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x9be8f5+_0x1cc5d5(0xe3)+_0x1c0710[_0x1cc5d5(0xd6)],_0x1cc5d5(0xe1));}}};
1
+ const a8_0x27006b=a8_0x59d4;(function(_0x299f37,_0x2c784f){const _0x3d268d=a8_0x59d4,_0x1864c0=_0x299f37();while(!![]){try{const _0x58878b=parseInt(_0x3d268d(0x1a1))/0x1*(-parseInt(_0x3d268d(0x193))/0x2)+-parseInt(_0x3d268d(0x1a7))/0x3+parseInt(_0x3d268d(0x192))/0x4*(parseInt(_0x3d268d(0x1a2))/0x5)+-parseInt(_0x3d268d(0x1a5))/0x6*(-parseInt(_0x3d268d(0x1a9))/0x7)+parseInt(_0x3d268d(0x199))/0x8*(parseInt(_0x3d268d(0x1a4))/0x9)+parseInt(_0x3d268d(0x191))/0xa+parseInt(_0x3d268d(0x1a8))/0xb*(-parseInt(_0x3d268d(0x19d))/0xc);if(_0x58878b===_0x2c784f)break;else _0x1864c0['push'](_0x1864c0['shift']());}catch(_0x5a9edc){_0x1864c0['push'](_0x1864c0['shift']());}}}(a8_0x3776,0x88e8f));function a8_0x3776(){const _0x1cda70=[',\x20appCode=','key','24tEsFml','appCode','\x20app-config\x20get\x20<key>','Usage:\x20','984vSMJuX','args','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','Missing\x20app-config\x20key.','1ncHkmT','165sIuRUa','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','1130751YzNAmO','24eGtObX','app-config','2267286xgAhoW','124487FDLFxZ','1608866TmBiep','validation','8852900vNSITU','12156DsubWl','74614GwsLMO','Unable\x20to\x20get\x20app-config\x20value:\x20key=','apiError','read'];a8_0x3776=function(){return _0x1cda70;};return a8_0x3776();}import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x59d4(_0x2a47d7,_0x4b7506){_0x2a47d7=_0x2a47d7-0x190;const _0x377611=a8_0x3776();let _0x59d45b=_0x377611[_0x2a47d7];return _0x59d45b;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x27006b(0x1a6),'command':'get','description':a8_0x27006b(0x19f),'risk':a8_0x27006b(0x196),'args':[{'name':a8_0x27006b(0x198),'description':'App\x20config\x20key','required':!![]}],'flags':[],async 'execute'(_0x15059d){const _0x48d77f=a8_0x27006b,_0x5caa21=_0x15059d[_0x48d77f(0x19e)][0x0]?.['trim']();if(!_0x5caa21)throw CliErrors[_0x48d77f(0x190)](_0x48d77f(0x1a0),_0x48d77f(0x19c)+CLI_BIN_NAME+_0x48d77f(0x19b));try{const _0x13c6c2=await getRuntimeAppConfigByKey(_0x15059d[_0x48d77f(0x19a)],_0x5caa21);return{'ok':!![],'data':_0x13c6c2};}catch{throw CliErrors[_0x48d77f(0x195)](_0x48d77f(0x194)+_0x5caa21+_0x48d77f(0x197)+_0x15059d[_0x48d77f(0x19a)],_0x48d77f(0x1a3));}}};
@@ -1 +1 @@
1
- function a9_0x4fa3(_0x5e2065,_0x45d339){_0x5e2065=_0x5e2065-0x1d4;const _0x520590=a9_0x5205();let _0x4fa3f4=_0x520590[_0x5e2065];return _0x4fa3f4;}(function(_0x2b71a,_0x4a7e9e){const _0x2b183a=a9_0x4fa3,_0x448a07=_0x2b71a();while(!![]){try{const _0x3d6622=parseInt(_0x2b183a(0x1d4))/0x1+-parseInt(_0x2b183a(0x1dd))/0x2*(parseInt(_0x2b183a(0x1d8))/0x3)+parseInt(_0x2b183a(0x1da))/0x4+parseInt(_0x2b183a(0x1dc))/0x5+-parseInt(_0x2b183a(0x1d7))/0x6*(-parseInt(_0x2b183a(0x1d9))/0x7)+parseInt(_0x2b183a(0x1d5))/0x8+parseInt(_0x2b183a(0x1db))/0x9*(-parseInt(_0x2b183a(0x1d6))/0xa);if(_0x3d6622===_0x4a7e9e)break;else _0x448a07['push'](_0x448a07['shift']());}catch(_0x4bc3f7){_0x448a07['push'](_0x448a07['shift']());}}}(a9_0x5205,0xeefdc));function a9_0x5205(){const _0xfc7dcf=['3479830ADUsfG','12444ouiTmO','12fogFjy','2359LECBiY','6624912StTSRW','117sdluSj','7549280gBfuXQ','233078DMwzss','998626xSnkwj','8841560fesdsX'];a9_0x5205=function(){return _0xfc7dcf;};return a9_0x5205();}import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x5728(_0x2aaa2d,_0x2f07ee){_0x2aaa2d=_0x2aaa2d-0x9f;const _0x39b5c9=a9_0x39b5();let _0x57280c=_0x39b5c9[_0x2aaa2d];return _0x57280c;}function a9_0x39b5(){const _0x256af4=['122697GdYVNH','22306724tTPghx','1297720TPSZjO','932881xCEGNT','468IBYWpy','64080HZlBnQ','7zPMDlt','1345490RUnTcO','52URAmEi','6coJtCM','3347420gwrOOP'];a9_0x39b5=function(){return _0x256af4;};return a9_0x39b5();}(function(_0x32dadb,_0x16030b){const _0x329fb8=a9_0x5728,_0xf2b822=_0x32dadb();while(!![]){try{const _0x329881=-parseInt(_0x329fb8(0xa9))/0x1+-parseInt(_0x329fb8(0xa3))/0x2*(-parseInt(_0x329fb8(0xa6))/0x3)+-parseInt(_0x329fb8(0xa5))/0x4+-parseInt(_0x329fb8(0xa2))/0x5*(parseInt(_0x329fb8(0xa4))/0x6)+parseInt(_0x329fb8(0xa1))/0x7*(-parseInt(_0x329fb8(0xa8))/0x8)+-parseInt(_0x329fb8(0x9f))/0x9*(parseInt(_0x329fb8(0xa0))/0xa)+parseInt(_0x329fb8(0xa7))/0xb;if(_0x329881===_0x16030b)break;else _0xf2b822['push'](_0xf2b822['shift']());}catch(_0x960847){_0xf2b822['push'](_0xf2b822['shift']());}}}(a9_0x39b5,0x87fc1));import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];
@@ -1 +1 @@
1
- const a10_0x3cae50=a10_0x1717;function a10_0x3186(){const _0x293fcb=['/client/artifact/','deleted','join','.\x20Unsupported:\x20','verbose','antd','startsWith','react_module\x20imports\x20are\x20limited\x20to:\x20','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','add','string','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','artifact','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','write','str','updateTime','create','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','createTime','Artifact\x20display\x20name','metadata','build','boolean','includes','List\x20current-app\x20react_module\x20Artifacts','read','utf8','source','Created\x20Artifact\x20','update','9486693OWOFtz','File\x20path\x20is\x20required.','Artifact\x20source\x20file\x20is\x20blank.','3191328ihppWm','88529FTNRgs','53300yYbJoT','trim','artifactType','flag','split','some','length','dayjs','num','bool','File\x20is\x20not\x20a\x20regular\x20file:\x20','Preview:\x20create\x20react_module\x20Artifact','list','exec','detail','1610780BVGLxv','Optional\x20favorite-state\x20filter','750589RyNWMV','compiledContent','validation','--metadata\x20must\x20be\x20a\x20JSON\x20object.','file','description','map','react_module','Updated\x20Artifact\x20','64144QCtcBw','body','filter','Artifact\x20ID','Invalid\x20JSON\x20for\x20--metadata:\x20','/client/artifact/create','78FQEoxZ','favorite','appCode','content','name','POST','isFile','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','114FiISVp'];a10_0x3186=function(){return _0x293fcb;};return a10_0x3186();}(function(_0x346c86,_0x5e33bb){const _0x10fdcf=a10_0x1717,_0x23a5f4=_0x346c86();while(!![]){try{const _0x4a64eb=parseInt(_0x10fdcf(0x1c9))/0x1+parseInt(_0x10fdcf(0x1d2))/0x2+parseInt(_0x10fdcf(0x18a))/0x3*(parseInt(_0x10fdcf(0x1b8))/0x4)+-parseInt(_0x10fdcf(0x1c7))/0x5+parseInt(_0x10fdcf(0x192))/0x6*(parseInt(_0x10fdcf(0x1b7))/0x7)+parseInt(_0x10fdcf(0x1b6))/0x8+-parseInt(_0x10fdcf(0x1b3))/0x9;if(_0x4a64eb===_0x5e33bb)break;else _0x23a5f4['push'](_0x23a5f4['shift']());}catch(_0x377ad7){_0x23a5f4['push'](_0x23a5f4['shift']());}}}(a10_0x3186,0x5fb97));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a10_0x3cae50(0x1d0),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=['react','react-dom','lodash',a10_0x3cae50(0x1bf),a10_0x3cae50(0x198),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a10_0x3cae50(0x195)](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a10_0x3cae50(0x1cd),'type':'string','required':!![],'description':a10_0x3cae50(0x191)},ARTIFACT_NAME_FLAG={'name':'name','type':'string','description':a10_0x3cae50(0x1a8)},METADATA_FLAG={'name':a10_0x3cae50(0x1a9),'type':'string','description':a10_0x3cae50(0x19b)};function isPlainObject(_0x3ce5c1){return typeof _0x3ce5c1==='object'&&_0x3ce5c1!==null&&!Array['isArray'](_0x3ce5c1);}function readSourceFile(_0x3da70c){const _0x11b125=a10_0x3cae50;if(!_0x3da70c)throw CliErrors[_0x11b125(0x1cb)](_0x11b125(0x1b4));if(!existsSync(_0x3da70c))throw CliErrors[_0x11b125(0x1cb)]('File\x20not\x20found:\x20'+_0x3da70c);if(!statSync(_0x3da70c)[_0x11b125(0x190)]())throw CliErrors[_0x11b125(0x1cb)](_0x11b125(0x1c2)+_0x3da70c);const _0x4beb35=readFileSync(_0x3da70c,_0x11b125(0x1af));return validateReactModuleSource(_0x4beb35),_0x4beb35;}function parseMetadata(_0x302624){const _0x242006=a10_0x3cae50;if(!_0x302624)return undefined;let _0x44286d;try{_0x44286d=JSON['parse'](_0x302624);}catch{throw CliErrors[_0x242006(0x1cb)](_0x242006(0x188)+_0x302624);}if(!isPlainObject(_0x44286d))throw CliErrors[_0x242006(0x1cb)](_0x242006(0x1cc));const _0x154009={..._0x44286d};return delete _0x154009[_0x242006(0x1ca)],_0x154009;}function getPackageName(_0x37c637){const _0xa0927f=a10_0x3cae50;if(_0x37c637[_0xa0927f(0x199)]('@')){const [_0x46642a,_0x5b19f1]=_0x37c637[_0xa0927f(0x1bc)]('/');return _0x46642a&&_0x5b19f1?_0x46642a+'/'+_0x5b19f1:_0x37c637;}return _0x37c637[_0xa0927f(0x1bc)]('/')[0x0]||_0x37c637;}function validateAllowedImports(_0x2530b9){const _0x41f0bf=a10_0x3cae50,_0xccae6a=new Set();for(const _0x11174a of IMPORT_SOURCE_PATTERNS){_0x11174a['lastIndex']=0x0;let _0x56fe8f;while((_0x56fe8f=_0x11174a[_0x41f0bf(0x1c5)](_0x2530b9))!==null){const _0x588adf=_0x56fe8f[0x1]?.[_0x41f0bf(0x1b9)]();_0x588adf&&_0xccae6a[_0x41f0bf(0x19c)](_0x588adf);}}const _0x2c1af5=[..._0xccae6a][_0x41f0bf(0x1cf)](getPackageName)[_0x41f0bf(0x1d4)](_0x1c764d=>!ALLOWED_REACT_MODULE_IMPORTS[_0x41f0bf(0x1ac)](_0x1c764d));if(_0x2c1af5[_0x41f0bf(0x1be)]>0x0)throw CliErrors[_0x41f0bf(0x1cb)](_0x41f0bf(0x19a)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x41f0bf(0x196)+[...new Set(_0x2c1af5)][_0x41f0bf(0x195)](',\x20'));}function a10_0x1717(_0x298da7,_0x4ed770){_0x298da7=_0x298da7-0x187;const _0x3186eb=a10_0x3186();let _0x17171e=_0x3186eb[_0x298da7];return _0x17171e;}export function validateReactModuleSource(_0x282456){const _0x19122f=a10_0x3cae50;if(!_0x282456[_0x19122f(0x1b9)]())throw CliErrors['validation'](_0x19122f(0x1b5));if(PAGE_LEVEL_PATTERNS[_0x19122f(0x1bd)](_0x3d8a76=>_0x3d8a76['test'](_0x282456)))throw CliErrors[_0x19122f(0x1cb)](_0x19122f(0x1a6));validateAllowedImports(_0x282456);}function buildArtifactInput(_0x2e7418){const _0x22bee5=a10_0x3cae50,_0x59bb2e=readSourceFile(_0x2e7418['str'](_0x22bee5(0x1cd))),_0x9c4216=_0x2e7418[_0x22bee5(0x1a3)](_0x22bee5(0x18e))['trim'](),_0x3bfc0a=parseMetadata(_0x2e7418[_0x22bee5(0x1a3)](_0x22bee5(0x1a9)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x9c4216?{'name':_0x9c4216}:{},'content':_0x59bb2e,..._0x3bfc0a?{'metadata':_0x3bfc0a}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x4d42d1){const _0x4fa4f4=a10_0x3cae50;return{'id':_0x4d42d1['id'],'name':_0x4d42d1['name'],'artifactType':_0x4d42d1['artifactType'],'source':_0x4d42d1[_0x4fa4f4(0x1b0)],'favorite':_0x4d42d1['favorite'],'deleted':_0x4d42d1[_0x4fa4f4(0x194)],'createTime':_0x4d42d1[_0x4fa4f4(0x1a7)],'updateTime':_0x4d42d1['updateTime']};}function detailArtifact(_0xd4f3ed){const _0xcc666f=a10_0x3cae50;return{'id':_0xd4f3ed['id'],'appCode':_0xd4f3ed['appCode'],'name':_0xd4f3ed['name'],'artifactType':_0xd4f3ed[_0xcc666f(0x1ba)],'source':_0xd4f3ed[_0xcc666f(0x1b0)],'favorite':_0xd4f3ed[_0xcc666f(0x18b)],'deleted':_0xd4f3ed[_0xcc666f(0x194)],'content':_0xd4f3ed[_0xcc666f(0x18d)]??'','compiledContent':_0xd4f3ed[_0xcc666f(0x1ca)],'metadata':_0xd4f3ed[_0xcc666f(0x1a9)]??{},'createTime':_0xd4f3ed[_0xcc666f(0x1a7)],'updateTime':_0xd4f3ed[_0xcc666f(0x1a4)]};}function readFavoriteFlag(_0x20d1a1){const _0x569484=a10_0x3cae50,_0x269006=_0x20d1a1[_0x569484(0x1bb)](_0x569484(0x18b));return _0x269006===undefined||_0x269006===null||_0x269006===''?undefined:_0x20d1a1[_0x569484(0x1c1)]('favorite');}const artifactList={'service':a10_0x3cae50(0x19f),'command':a10_0x3cae50(0x1c4),'description':a10_0x3cae50(0x1ad),'risk':a10_0x3cae50(0x1ae),'flags':[{'name':'source','type':a10_0x3cae50(0x19d),'description':a10_0x3cae50(0x19e)},{'name':a10_0x3cae50(0x18b),'type':a10_0x3cae50(0x1ab),'description':a10_0x3cae50(0x1c8)},VERBOSE_FLAG],async 'execute'(_0xde9d89){const _0x5b2e1e=a10_0x3cae50,_0x33e729=await listRuntimeArtifacts(_0xde9d89[_0x5b2e1e(0x18c)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0xde9d89[_0x5b2e1e(0x1a3)](_0x5b2e1e(0x1b0))?{'source':_0xde9d89[_0x5b2e1e(0x1a3)](_0x5b2e1e(0x1b0))}:{},...readFavoriteFlag(_0xde9d89)!==undefined?{'favorite':readFavoriteFlag(_0xde9d89)}:{}});return{'ok':!![],'data':{'total':_0x33e729[_0x5b2e1e(0x1be)],'items':_0xde9d89['bool'](_0x5b2e1e(0x197))?_0x33e729:_0x33e729[_0x5b2e1e(0x1cf)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x3cae50(0x19f),'command':a10_0x3cae50(0x1c6),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a10_0x3cae50(0x187)}],async 'execute'(_0x2f6419){const _0x32ce64=a10_0x3cae50,_0x3c79a7=await getRuntimeArtifact(_0x2f6419[_0x32ce64(0x1c0)]('id'),_0x2f6419['appCode']);return{'ok':!![],'data':detailArtifact(_0x3c79a7)};}},artifactCreate={'service':a10_0x3cae50(0x19f),'command':a10_0x3cae50(0x1a5),'description':a10_0x3cae50(0x1a0),'risk':a10_0x3cae50(0x1a2),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3aafa1){const _0x1a20c6=a10_0x3cae50,_0x5a087f=buildArtifactInput(_0x3aafa1),_0x31e955=await createRuntimeArtifact(_0x3aafa1[_0x1a20c6(0x18c)],_0x5a087f);return{'ok':!![],'data':detailArtifact(_0x31e955),'message':_0x1a20c6(0x1b1)+_0x31e955['id']+(_0x31e955['name']?'\x20('+_0x31e955[_0x1a20c6(0x18e)]+')':'')};},async 'dryRun'(_0x16dc95){const _0x48b0b7=a10_0x3cae50,_0x171271=buildArtifactInput(_0x16dc95);return dryRun('POST',_0x48b0b7(0x189))['body']({'appCode':_0x16dc95['appCode'],..._0x171271})[_0x48b0b7(0x1ce)](_0x48b0b7(0x1c3))['build']();}},artifactUpdate={'service':a10_0x3cae50(0x19f),'command':a10_0x3cae50(0x1b2),'description':a10_0x3cae50(0x1a1),'risk':a10_0x3cae50(0x1a2),'flags':[{...ID_FLAG,'description':a10_0x3cae50(0x187)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x1435f3){const _0x2c8ba7=a10_0x3cae50,_0x5f0cc2=_0x1435f3[_0x2c8ba7(0x1c0)]('id'),_0x41ba53=buildArtifactInput(_0x1435f3),_0xd6670b=await updateRuntimeArtifact(_0x5f0cc2,_0x1435f3['appCode'],_0x41ba53);return{'ok':!![],'data':detailArtifact(_0xd6670b),'message':_0x2c8ba7(0x1d1)+_0xd6670b['id']+(_0xd6670b['name']?'\x20('+_0xd6670b['name']+')':'')};},async 'dryRun'(_0x174429){const _0xa40446=a10_0x3cae50,_0x961f8d=_0x174429['num']('id'),_0x4fd250=buildArtifactInput(_0x174429);return dryRun(_0xa40446(0x18f),_0xa40446(0x193)+_0x961f8d+'/update')[_0xa40446(0x1d3)]({'appCode':_0x174429[_0xa40446(0x18c)],..._0x4fd250})[_0xa40446(0x1ce)]('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x961f8d)[_0xa40446(0x1aa)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a10_0x55c130=a10_0x6e07;(function(_0x1e95cb,_0x374dae){const _0x334c28=a10_0x6e07,_0x47461e=_0x1e95cb();while(!![]){try{const _0x28e9fe=parseInt(_0x334c28(0x185))/0x1*(parseInt(_0x334c28(0x1b3))/0x2)+-parseInt(_0x334c28(0x1be))/0x3+-parseInt(_0x334c28(0x197))/0x4+-parseInt(_0x334c28(0x1bf))/0x5+-parseInt(_0x334c28(0x17e))/0x6*(-parseInt(_0x334c28(0x17d))/0x7)+parseInt(_0x334c28(0x183))/0x8*(-parseInt(_0x334c28(0x181))/0x9)+parseInt(_0x334c28(0x182))/0xa*(parseInt(_0x334c28(0x180))/0xb);if(_0x28e9fe===_0x374dae)break;else _0x47461e['push'](_0x47461e['shift']());}catch(_0x5958af){_0x47461e['push'](_0x47461e['shift']());}}}(a10_0x4113,0x56d33));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a10_0x55c130(0x175),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a10_0x55c130(0x189),a10_0x55c130(0x190),a10_0x55c130(0x17c),a10_0x55c130(0x1b2),'antd',a10_0x55c130(0x18b)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a10_0x55c130(0x188)](',\x20');function a10_0x4113(){const _0x222ef1=['write','react_module\x20imports\x20are\x20limited\x20to:\x20','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','object','length','build','trim','includes','detail','lastIndex','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Artifact\x20source\x20file\x20is\x20blank.','split','/client/artifact/create','num','test','name','File\x20not\x20found:\x20','read','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','favorite','dayjs','20gcehlx','source','startsWith','string','description','appCode','createTime','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','map','updateTime','str','2039436jMFrJo','2949530qUobET','Updated\x20Artifact\x20','artifact','POST','react_module','--metadata\x20must\x20be\x20a\x20JSON\x20object.','update','create','isArray','Preview:\x20update\x20react_module\x20Artifact\x20','Created\x20Artifact\x20','lodash','20321myUiei','42GUdPwz','bool','11GqIQQk','10827WvvWeD','23182490XevvDF','2104DiRewS','artifactType','29713JyswNl','content','some','join','react','body','@ant-design/icons','File\x20is\x20not\x20a\x20regular\x20file:\x20','metadata','file','exec','react-dom','utf8','compiledContent','/client/artifact/','Invalid\x20JSON\x20for\x20--metadata:\x20','filter','deleted','2775832DEhlPY','verbose','Artifact\x20display\x20name','validation','.\x20Unsupported:\x20','Artifact\x20ID'];a10_0x4113=function(){return _0x222ef1;};return a10_0x4113();}const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a10_0x55c130(0x18e),'type':a10_0x55c130(0x1b6),'required':!![],'description':a10_0x55c130(0x1b0)},ARTIFACT_NAME_FLAG={'name':a10_0x55c130(0x1ad),'type':a10_0x55c130(0x1b6),'description':a10_0x55c130(0x199)},METADATA_FLAG={'name':a10_0x55c130(0x18d),'type':a10_0x55c130(0x1b6),'description':a10_0x55c130(0x19f)};function isPlainObject(_0x3f454b){const _0x1d9dde=a10_0x55c130;return typeof _0x3f454b===_0x1d9dde(0x1a0)&&_0x3f454b!==null&&!Array[_0x1d9dde(0x179)](_0x3f454b);}function readSourceFile(_0x29003a){const _0x4e824a=a10_0x55c130;if(!_0x29003a)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x29003a))throw CliErrors['validation'](_0x4e824a(0x1ae)+_0x29003a);if(!statSync(_0x29003a)['isFile']())throw CliErrors['validation'](_0x4e824a(0x18c)+_0x29003a);const _0x485bad=readFileSync(_0x29003a,_0x4e824a(0x191));return validateReactModuleSource(_0x485bad),_0x485bad;}function parseMetadata(_0x1111c6){const _0x465607=a10_0x55c130;if(!_0x1111c6)return undefined;let _0x269464;try{_0x269464=JSON['parse'](_0x1111c6);}catch{throw CliErrors[_0x465607(0x19a)](_0x465607(0x194)+_0x1111c6);}if(!isPlainObject(_0x269464))throw CliErrors[_0x465607(0x19a)](_0x465607(0x176));const _0x5d446={..._0x269464};return delete _0x5d446[_0x465607(0x192)],_0x5d446;}function getPackageName(_0x11cb1b){const _0x28dbd8=a10_0x55c130;if(_0x11cb1b[_0x28dbd8(0x1b5)]('@')){const [_0x5513e3,_0x449f26]=_0x11cb1b[_0x28dbd8(0x1a9)]('/');return _0x5513e3&&_0x449f26?_0x5513e3+'/'+_0x449f26:_0x11cb1b;}return _0x11cb1b[_0x28dbd8(0x1a9)]('/')[0x0]||_0x11cb1b;}function validateAllowedImports(_0x181442){const _0x11368b=a10_0x55c130,_0x47a282=new Set();for(const _0x25a5cd of IMPORT_SOURCE_PATTERNS){_0x25a5cd[_0x11368b(0x1a6)]=0x0;let _0x3331db;while((_0x3331db=_0x25a5cd[_0x11368b(0x18f)](_0x181442))!==null){const _0x4f1908=_0x3331db[0x1]?.[_0x11368b(0x1a3)]();_0x4f1908&&_0x47a282['add'](_0x4f1908);}}const _0x24e539=[..._0x47a282][_0x11368b(0x1bb)](getPackageName)[_0x11368b(0x195)](_0x4fb46d=>!ALLOWED_REACT_MODULE_IMPORTS[_0x11368b(0x1a4)](_0x4fb46d));if(_0x24e539[_0x11368b(0x1a1)]>0x0)throw CliErrors[_0x11368b(0x19a)](_0x11368b(0x19e)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x11368b(0x19b)+[...new Set(_0x24e539)][_0x11368b(0x188)](',\x20'));}export function validateReactModuleSource(_0x2bfaab){const _0x1a7f26=a10_0x55c130;if(!_0x2bfaab[_0x1a7f26(0x1a3)]())throw CliErrors[_0x1a7f26(0x19a)](_0x1a7f26(0x1a8));if(PAGE_LEVEL_PATTERNS[_0x1a7f26(0x187)](_0x35fa8c=>_0x35fa8c[_0x1a7f26(0x1ac)](_0x2bfaab)))throw CliErrors[_0x1a7f26(0x19a)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x2bfaab);}function buildArtifactInput(_0xca132b){const _0x1e8348=a10_0x55c130,_0x2a8642=readSourceFile(_0xca132b[_0x1e8348(0x1bd)](_0x1e8348(0x18e))),_0x1be895=_0xca132b[_0x1e8348(0x1bd)](_0x1e8348(0x1ad))[_0x1e8348(0x1a3)](),_0x3c9e95=parseMetadata(_0xca132b[_0x1e8348(0x1bd)](_0x1e8348(0x18d)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1be895?{'name':_0x1be895}:{},'content':_0x2a8642,..._0x3c9e95?{'metadata':_0x3c9e95}:{},'source':ARTIFACT_SOURCE_AGENT};}function a10_0x6e07(_0x47e45e,_0xbb963e){_0x47e45e=_0x47e45e-0x173;const _0x4113f8=a10_0x4113();let _0x6e077c=_0x4113f8[_0x47e45e];return _0x6e077c;}function summarizeArtifact(_0x1a2590){const _0xa858fe=a10_0x55c130;return{'id':_0x1a2590['id'],'name':_0x1a2590['name'],'artifactType':_0x1a2590[_0xa858fe(0x184)],'source':_0x1a2590['source'],'favorite':_0x1a2590[_0xa858fe(0x1b1)],'deleted':_0x1a2590['deleted'],'createTime':_0x1a2590[_0xa858fe(0x1b9)],'updateTime':_0x1a2590['updateTime']};}function detailArtifact(_0x530b85){const _0x210035=a10_0x55c130;return{'id':_0x530b85['id'],'appCode':_0x530b85[_0x210035(0x1b8)],'name':_0x530b85[_0x210035(0x1ad)],'artifactType':_0x530b85[_0x210035(0x184)],'source':_0x530b85[_0x210035(0x1b4)],'favorite':_0x530b85[_0x210035(0x1b1)],'deleted':_0x530b85[_0x210035(0x196)],'content':_0x530b85[_0x210035(0x186)]??'','compiledContent':_0x530b85[_0x210035(0x192)],'metadata':_0x530b85[_0x210035(0x18d)]??{},'createTime':_0x530b85[_0x210035(0x1b9)],'updateTime':_0x530b85[_0x210035(0x1bc)]};}function readFavoriteFlag(_0x494bf3){const _0x5ab54a=a10_0x55c130,_0x556916=_0x494bf3['flag']('favorite');return _0x556916===undefined||_0x556916===null||_0x556916===''?undefined:_0x494bf3[_0x5ab54a(0x17f)](_0x5ab54a(0x1b1));}const artifactList={'service':a10_0x55c130(0x173),'command':'list','description':'List\x20current-app\x20react_module\x20Artifacts','risk':a10_0x55c130(0x1af),'flags':[{'name':a10_0x55c130(0x1b4),'type':'string','description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a10_0x55c130(0x1b1),'type':'boolean','description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x2ef98b){const _0x2e7664=a10_0x55c130,_0x5a15cd=await listRuntimeArtifacts(_0x2ef98b[_0x2e7664(0x1b8)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2ef98b[_0x2e7664(0x1bd)]('source')?{'source':_0x2ef98b['str'](_0x2e7664(0x1b4))}:{},...readFavoriteFlag(_0x2ef98b)!==undefined?{'favorite':readFavoriteFlag(_0x2ef98b)}:{}});return{'ok':!![],'data':{'total':_0x5a15cd[_0x2e7664(0x1a1)],'items':_0x2ef98b[_0x2e7664(0x17f)](_0x2e7664(0x198))?_0x5a15cd:_0x5a15cd[_0x2e7664(0x1bb)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x55c130(0x173),'command':a10_0x55c130(0x1a5),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a10_0x55c130(0x1af),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x4c4792){const _0x4c6e6c=a10_0x55c130,_0x4ba774=await getRuntimeArtifact(_0x4c4792['num']('id'),_0x4c4792[_0x4c6e6c(0x1b8)]);return{'ok':!![],'data':detailArtifact(_0x4ba774)};}},artifactCreate={'service':'artifact','command':a10_0x55c130(0x178),'description':a10_0x55c130(0x1a7),'risk':a10_0x55c130(0x19d),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x2f8154){const _0x37318e=a10_0x55c130,_0x1bc622=buildArtifactInput(_0x2f8154),_0x115e3a=await createRuntimeArtifact(_0x2f8154[_0x37318e(0x1b8)],_0x1bc622);return{'ok':!![],'data':detailArtifact(_0x115e3a),'message':_0x37318e(0x17b)+_0x115e3a['id']+(_0x115e3a[_0x37318e(0x1ad)]?'\x20('+_0x115e3a[_0x37318e(0x1ad)]+')':'')};},async 'dryRun'(_0x584594){const _0x26ee70=a10_0x55c130,_0xa845b9=buildArtifactInput(_0x584594);return dryRun(_0x26ee70(0x174),_0x26ee70(0x1aa))[_0x26ee70(0x18a)]({'appCode':_0x584594[_0x26ee70(0x1b8)],..._0xa845b9})[_0x26ee70(0x1b7)]('Preview:\x20create\x20react_module\x20Artifact')['build']();}},artifactUpdate={'service':a10_0x55c130(0x173),'command':a10_0x55c130(0x177),'description':a10_0x55c130(0x1ba),'risk':a10_0x55c130(0x19d),'flags':[{...ID_FLAG,'description':a10_0x55c130(0x19c)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x42ddb8){const _0x21641a=a10_0x55c130,_0x58ab96=_0x42ddb8[_0x21641a(0x1ab)]('id'),_0x323000=buildArtifactInput(_0x42ddb8),_0xb88a05=await updateRuntimeArtifact(_0x58ab96,_0x42ddb8[_0x21641a(0x1b8)],_0x323000);return{'ok':!![],'data':detailArtifact(_0xb88a05),'message':_0x21641a(0x1c0)+_0xb88a05['id']+(_0xb88a05[_0x21641a(0x1ad)]?'\x20('+_0xb88a05[_0x21641a(0x1ad)]+')':'')};},async 'dryRun'(_0x3755d6){const _0x151cfd=a10_0x55c130,_0x579393=_0x3755d6[_0x151cfd(0x1ab)]('id'),_0xd66323=buildArtifactInput(_0x3755d6);return dryRun(_0x151cfd(0x174),_0x151cfd(0x193)+_0x579393+'/update')[_0x151cfd(0x18a)]({'appCode':_0x3755d6[_0x151cfd(0x1b8)],..._0xd66323})[_0x151cfd(0x1b7)](_0x151cfd(0x17a)+_0x579393)[_0x151cfd(0x1a2)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a11_0x29b214=a11_0x2989;(function(_0x34ee2c,_0x26e4e5){const _0x13a6af=a11_0x2989,_0x240ac7=_0x34ee2c();while(!![]){try{const _0x1f9f00=parseInt(_0x13a6af(0x1f3))/0x1+parseInt(_0x13a6af(0x1e6))/0x2+parseInt(_0x13a6af(0x1e4))/0x3+parseInt(_0x13a6af(0x21b))/0x4+parseInt(_0x13a6af(0x201))/0x5+parseInt(_0x13a6af(0x1e1))/0x6+parseInt(_0x13a6af(0x1fd))/0x7*(-parseInt(_0x13a6af(0x1f9))/0x8);if(_0x1f9f00===_0x26e4e5)break;else _0x240ac7['push'](_0x240ac7['shift']());}catch(_0x577cbf){_0x240ac7['push'](_0x240ac7['shift']());}}}(a11_0x44c5,0x76ed6));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';function a11_0x44c5(){const _0x163560=['Option\x20C:\x20environment\x20variable','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','nonInteractive','\x20Current\x20env:\x20','push','accessKey','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Then\x20verify\x20with:\x20','slice','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','global-default','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','str','Auth\x20mode:\x20','env','\x20auth\x20status','No\x20AccessKey\x20found\x20in\x20','\x20scope.','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','read','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','length','Auth\x20config\x20reinitialized\x20in\x20','Show\x20current\x20authentication\x20status','access-key','3018544zAuPIr','write','userCenterDisplayName','envName','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Clear\x20accessKey\x20from\x20config','repeat','Write\x20to\x20global\x20config\x20(default)','logout','bool','Invalid\x20accessKey\x20format:\x20\x22','production','login','init','=ak_xxx','Shorthand\x20for\x20--access-key','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','AccessKey\x20saved\x20to\x20','Use\x20`','info','Tip:\x20you\x20can\x20also\x20run:','Clear\x20from\x20global\x20config\x20(default)','\x20(via\x20','\x20\x20export\x20','global','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','ACCESS_KEY','\x20Verify:\x20','3226086tLIrVj','stdin','ClientAk','2742726fRvwXk','boolean','24626obCYFI','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','trim','project','join','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','stdout','string','Option\x20B:\x20apps\x20config\x20(','\x20doctor','Missing\x20accessKey.','auth','703830tDutDW','\x20auth\x20login\x20--access-key\x20<ak_xxx>','check','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20config','cancelled','6040qBIwMR','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','authRequired','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','22680dncvHS','validation','status','\x20config.','53120QaWVej'];a11_0x44c5=function(){return _0x163560;};return a11_0x44c5();}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';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1467a2=a11_0x2989;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1467a2(0x21d)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x1467a2(0x1d9)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1467a2(0x1f4));}function buildAccessKeySetupGuide(){const _0x159471=a11_0x2989;return[_0x159471(0x20b)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x159471(0x21f)+CLI_BIN_NAME+_0x159471(0x203)][_0x159471(0x1ea)]('\x0a');}function a11_0x2989(_0x59cbb8,_0x45c0d8){_0x59cbb8=_0x59cbb8-0x1ce;const _0x44c583=a11_0x44c5();let _0x298966=_0x44c583[_0x59cbb8];return _0x298966;}function canPromptForAccessKey(_0x305d29){const _0xf57d95=a11_0x2989;return!_0x305d29['nonInteractive']&&process[_0xf57d95(0x1e2)]['isTTY']!==![]&&process[_0xf57d95(0x1ed)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x3a55ad){const _0x1821dc=a11_0x2989;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3a55ad[_0x1821dc(0x1ce)]('global'),'explicitProject':_0x3a55ad[_0x1821dc(0x1ce)](_0x1821dc(0x1e9)),'policy':_0x1821dc(0x20c)}));}async function resolveAuthWriteInput(_0x531068){const _0x5a1a4f=a11_0x2989;let _0x723cda=(_0x531068['str'](_0x5a1a4f(0x21a))||_0x531068[_0x5a1a4f(0x20e)]('ak')||'')[_0x5a1a4f(0x1e8)]();const _0x37ae91=(_0x531068[_0x5a1a4f(0x20e)](_0x5a1a4f(0x210))||'')[_0x5a1a4f(0x1e8)]();if(!_0x723cda&&canPromptForAccessKey(_0x531068))try{showAccessKeyCreateHint(),_0x723cda=await promptAccessKey('');}catch(_0x2f2f55){if(isAbortPrompt(_0x2f2f55))throw CliErrors[_0x5a1a4f(0x1f8)]();throw _0x2f2f55;}if(!_0x723cda)throw CliErrors[_0x5a1a4f(0x1fe)](_0x5a1a4f(0x1f1),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x723cda))throw CliErrors[_0x5a1a4f(0x1fe)](_0x5a1a4f(0x1cf)+_0x723cda+'\x22',_0x5a1a4f(0x1eb));if(!_0x37ae91)return{'accessKey':_0x723cda};const _0x47496e=normalizeEnv(_0x37ae91);return{'accessKey':_0x723cda,'env':isDaily(_0x47496e)?'daily':isDev(_0x47496e)?'development':_0x5a1a4f(0x1d0)};}export const authDefinitions=[{'service':a11_0x29b214(0x1f2),'command':a11_0x29b214(0x1d1),'description':a11_0x29b214(0x1fa),'risk':a11_0x29b214(0x21c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x29b214(0x21a),'type':a11_0x29b214(0x1ee),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':a11_0x29b214(0x1d4)},{'name':a11_0x29b214(0x1dd),'type':'boolean','description':a11_0x29b214(0x222),'default':!![]},{'name':a11_0x29b214(0x1e9),'type':'boolean','description':a11_0x29b214(0x1f6),'default':![]}],async 'execute'(_0x282905){const _0x314990=a11_0x29b214;if(_0x282905[_0x314990(0x1ce)]('yes'))throw CliErrors[_0x314990(0x1fe)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x314990(0x1d7)+CLI_BIN_NAME+_0x314990(0x1e7)+CLI_BIN_NAME+_0x314990(0x216));const _0x36b940=(_0x282905[_0x314990(0x20e)]('access-key')||_0x282905['str']('ak')||'')[_0x314990(0x1e8)]();if(!_0x36b940&&_0x282905[_0x314990(0x204)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3d8504=await resolveAuthWriteInput(_0x282905),_0x160577=resolveAuthScopeFlags(_0x282905),_0x5d5fb0=readScopedConfig(_0x160577);_0x5d5fb0['accessKey']=_0x3d8504[_0x314990(0x207)];_0x3d8504[_0x314990(0x210)]&&(_0x5d5fb0[_0x314990(0x210)]=_0x3d8504[_0x314990(0x210)]);writeScopedConfig(_0x5d5fb0,_0x160577);const _0xf465d9=_0x160577[_0x314990(0x1dd)]?'global':_0x314990(0x1e9),_0x3ab3c5=_0x5d5fb0[_0x314990(0x210)]?_0x314990(0x205)+_0x5d5fb0[_0x314990(0x210)]+'.':'';return{'ok':!![],'message':_0x314990(0x1d6)+_0xf465d9+_0x314990(0x200)+_0x3ab3c5+_0x314990(0x1e0)+CLI_BIN_NAME+_0x314990(0x211)};}},{'service':a11_0x29b214(0x1f2),'command':a11_0x29b214(0x1d2),'description':a11_0x29b214(0x20d),'risk':a11_0x29b214(0x21c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x29b214(0x21a),'type':a11_0x29b214(0x1ee),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':a11_0x29b214(0x1d4)},{'name':a11_0x29b214(0x210),'type':a11_0x29b214(0x1ee),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a11_0x29b214(0x1dd),'type':'boolean','description':a11_0x29b214(0x222),'default':!![]},{'name':a11_0x29b214(0x1e9),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x39bca0){const _0x389b86=a11_0x29b214,_0x68a7a=await resolveAuthWriteInput(_0x39bca0),_0x1e4ff3=resolveAuthScopeFlags(_0x39bca0),_0x538764={'accessKey':_0x68a7a[_0x389b86(0x207)]};_0x68a7a['env']&&(_0x538764['env']=_0x68a7a['env']);writeScopedConfig(_0x538764,_0x1e4ff3);const _0x24c613=_0x1e4ff3['global']?_0x389b86(0x1dd):_0x389b86(0x1e9),_0x396678=_0x538764[_0x389b86(0x210)]?_0x389b86(0x205)+_0x538764['env']+'.':'';return{'ok':!![],'message':_0x389b86(0x218)+_0x24c613+_0x389b86(0x213)+_0x396678+_0x389b86(0x1e0)+CLI_BIN_NAME+_0x389b86(0x211)};}},{'service':'auth','command':a11_0x29b214(0x223),'description':a11_0x29b214(0x220),'risk':a11_0x29b214(0x21c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x29b214(0x1dd),'type':a11_0x29b214(0x1e5),'description':a11_0x29b214(0x1da),'default':!![]},{'name':a11_0x29b214(0x1e9),'type':'boolean','description':a11_0x29b214(0x214),'default':![]}],async 'execute'(_0x12ab95){const _0x480db5=a11_0x29b214,_0x23f2c7=resolveAuthScopeFlags(_0x12ab95),_0x3b6c3e=readScopedConfig(_0x23f2c7),_0x58ce23=!!_0x3b6c3e[_0x480db5(0x207)];delete _0x3b6c3e[_0x480db5(0x207)],writeScopedConfig(_0x3b6c3e,_0x23f2c7);const _0x5a36d8=_0x23f2c7['global']?_0x480db5(0x1dd):_0x480db5(0x1e9);if(_0x58ce23)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x5a36d8+_0x480db5(0x200)};return{'ok':!![],'message':_0x480db5(0x212)+_0x5a36d8+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':'auth','command':a11_0x29b214(0x1ff),'description':a11_0x29b214(0x219),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x29b214(0x1dd),'type':a11_0x29b214(0x1e5),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a11_0x29b214(0x1e9),'type':a11_0x29b214(0x1e5),'description':a11_0x29b214(0x1de),'default':![]},{'name':a11_0x29b214(0x1f5),'type':'boolean','description':a11_0x29b214(0x1fc),'default':![]}],async 'execute'(_0x1ebbfa){const _0x4ff147=a11_0x29b214,_0x945171=resolveAuthScopeFlags(_0x1ebbfa),_0x5bea59=readScopedConfig(_0x945171),_0x1616bd=productEnvName(_0x4ff147(0x1df)),_0xa3b410=productEnv('ACCESS_KEY')||undefined,_0x1d45d4=_0x5bea59[_0x4ff147(0x207)]||undefined,_0x17b101=_0xa3b410||_0x1d45d4,_0x1db7ec=_0xa3b410?_0x1616bd+'\x20env\x20var':_0x1d45d4?(_0x945171[_0x4ff147(0x1dd)]?'global':_0x4ff147(0x1e9))+_0x4ff147(0x1f7):null,_0x35fbd4=[_0x4ff147(0x20f)+AUTH_MODE[_0x4ff147(0x1e3)]];if(_0x17b101){const _0x10af1d=_0x17b101['length']>0x8?''+_0x17b101[_0x4ff147(0x20a)](0x0,0x8)+'*'[_0x4ff147(0x221)](_0x17b101[_0x4ff147(0x217)]-0x8):_0x17b101;_0x35fbd4[_0x4ff147(0x206)]('AccessKey:\x20'+_0x10af1d+(_0x1db7ec?_0x4ff147(0x1db)+_0x1db7ec+')':''));}if(!_0x17b101){_0x35fbd4['push'](''),_0x35fbd4['push'](_0x4ff147(0x1ec)),_0x35fbd4['push'](''),_0x35fbd4['push']('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x35fbd4[_0x4ff147(0x206)](''),_0x35fbd4[_0x4ff147(0x206)](_0x4ff147(0x1ef)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x35fbd4[_0x4ff147(0x206)](_0x4ff147(0x208)),_0x35fbd4['push'](''),_0x35fbd4[_0x4ff147(0x206)](_0x4ff147(0x202)),_0x35fbd4[_0x4ff147(0x206)](_0x4ff147(0x1dc)+_0x1616bd+_0x4ff147(0x1d3)),_0x35fbd4[_0x4ff147(0x206)](''),_0x35fbd4[_0x4ff147(0x206)](_0x4ff147(0x209)+CLI_BIN_NAME+_0x4ff147(0x211)),_0x35fbd4[_0x4ff147(0x206)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x4ff147(0x1f0));if(_0x1ebbfa[_0x4ff147(0x1ce)](_0x4ff147(0x1f5)))throw CliErrors[_0x4ff147(0x1fb)](_0x35fbd4[_0x4ff147(0x1ea)]('\x0a'));}return{'ok':!![],'message':_0x35fbd4[_0x4ff147(0x1ea)]('\x0a')};}},{'service':a11_0x29b214(0x1f2),'command':a11_0x29b214(0x1d8),'description':a11_0x29b214(0x1d5),'risk':a11_0x29b214(0x215),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5a0363){const _0x26f636=a11_0x29b214,_0x2a8d64=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2a8d64,'meta':{'env':_0x5a0363[_0x26f636(0x21e)]??_0x26f636(0x1d0)}}};}}];
1
+ const a11_0x390771=a11_0x44ee;(function(_0x39b31d,_0x5f1531){const _0x3a2ecc=a11_0x44ee,_0x1605a3=_0x39b31d();while(!![]){try{const _0x30cbd0=parseInt(_0x3a2ecc(0xab))/0x1+-parseInt(_0x3a2ecc(0xa6))/0x2*(parseInt(_0x3a2ecc(0xb9))/0x3)+-parseInt(_0x3a2ecc(0xbd))/0x4+parseInt(_0x3a2ecc(0xb1))/0x5+-parseInt(_0x3a2ecc(0xc7))/0x6*(-parseInt(_0x3a2ecc(0x74))/0x7)+-parseInt(_0x3a2ecc(0x8f))/0x8+parseInt(_0x3a2ecc(0x9c))/0x9;if(_0x30cbd0===_0x5f1531)break;else _0x1605a3['push'](_0x1605a3['shift']());}catch(_0x48e92d){_0x1605a3['push'](_0x1605a3['shift']());}}}(a11_0x19e2,0x78751));function a11_0x19e2(){const _0x24da0b=['AccessKey:\x20','trim','ACCESS_KEY','6455288ePhwEz','join','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20Verify:\x20','Clear\x20from\x20global\x20config\x20(default)','Auth\x20config\x20reinitialized\x20in\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','push','newConfigFileName','\x20config.','auth','5879421sPnGnq','\x20config','project','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','check','bool','\x20Current\x20env:\x20','Option\x20C:\x20environment\x20variable','Invalid\x20accessKey\x20format:\x20\x22','init','201114TmQVVv','=ak_xxx','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','status','\x20auth\x20status','644499hpQTOr','repeat','\x20\x20export\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Then\x20verify\x20with:\x20','3473660ilUgkx','\x20scope.','cancelled','global-default','envName','userCenterDisplayName','string','accessKey','18cdGmeA','Option\x20A:\x20','global','AccessKey\x20cleared\x20from\x20','1895804iMBhSo','development','login','\x20config.\x20Nothing\x20to\x20clear.','nonInteractive','boolean','daily','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Option\x20B:\x20apps\x20config\x20(','length','21198qcgpyH','info','read','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','763fCQtSG','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','isTTY','Shorthand\x20for\x20--access-key','AccessKey\x20saved\x20to\x20','validation','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Use\x20`','test','access-key','Write\x20to\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','stdin','str','\x20doctor','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20(via\x20','AccessKey\x20(ak_xxx...)','Auth\x20mode:\x20','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','write','env','Show\x20current\x20authentication\x20status'];a11_0x19e2=function(){return _0x24da0b;};return a11_0x19e2();}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';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x48a28f=a11_0x44ee;writeCliSideChannelLine(_0x48a28f(0x93)+PRODUCT_CONFIG[_0x48a28f(0xb6)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x48a28f(0xaf));}function buildAccessKeySetupGuide(){const _0x4eccc3=a11_0x44ee;return[_0x4eccc3(0x93)+PRODUCT_CONFIG[_0x4eccc3(0xb6)]+':',USER_ACCESS_KEY_CREATE_URL,_0x4eccc3(0x92)+CLI_BIN_NAME+_0x4eccc3(0x7f)][_0x4eccc3(0x90)]('\x0a');}function canPromptForAccessKey(_0x5d81fd){const _0x464313=a11_0x44ee;return!_0x5d81fd['nonInteractive']&&process[_0x464313(0x80)]['isTTY']!==![]&&process['stdout'][_0x464313(0x76)]!==![];}function a11_0x44ee(_0xf50f67,_0x3b50dd){_0xf50f67=_0xf50f67-0x71;const _0x19e2fd=a11_0x19e2();let _0x44ee90=_0x19e2fd[_0xf50f67];return _0x44ee90;}function resolveAuthScopeFlags(_0x32acf3){const _0x65bde4=a11_0x44ee;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x32acf3[_0x65bde4(0xa1)](_0x65bde4(0xbb)),'explicitProject':_0x32acf3[_0x65bde4(0xa1)](_0x65bde4(0x9e)),'policy':_0x65bde4(0xb4)}));}async function resolveAuthWriteInput(_0x53d41b){const _0x3ff794=a11_0x44ee;let _0x8f4f04=(_0x53d41b[_0x3ff794(0x81)]('access-key')||_0x53d41b[_0x3ff794(0x81)]('ak')||'')[_0x3ff794(0x8d)]();const _0x51d399=(_0x53d41b[_0x3ff794(0x81)](_0x3ff794(0x8a))||'')[_0x3ff794(0x8d)]();if(!_0x8f4f04&&canPromptForAccessKey(_0x53d41b))try{showAccessKeyCreateHint(),_0x8f4f04=await promptAccessKey('');}catch(_0x300325){if(isAbortPrompt(_0x300325))throw CliErrors[_0x3ff794(0xb3)]();throw _0x300325;}if(!_0x8f4f04)throw CliErrors[_0x3ff794(0x79)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3ff794(0x7c)](_0x8f4f04))throw CliErrors[_0x3ff794(0x79)](_0x3ff794(0xa4)+_0x8f4f04+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x51d399)return{'accessKey':_0x8f4f04};const _0x456a91=normalizeEnv(_0x51d399);return{'accessKey':_0x8f4f04,'env':isDaily(_0x456a91)?_0x3ff794(0xc3):isDev(_0x456a91)?_0x3ff794(0xbe):'production'};}export const authDefinitions=[{'service':a11_0x390771(0x9b),'command':a11_0x390771(0xbf),'description':a11_0x390771(0x88),'risk':a11_0x390771(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x390771(0x7d),'type':a11_0x390771(0xb7),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a11_0x390771(0xb7),'description':a11_0x390771(0x77)},{'name':a11_0x390771(0xbb),'type':a11_0x390771(0xc2),'description':a11_0x390771(0x7e),'default':!![]},{'name':a11_0x390771(0x9e),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4d9c45){const _0x484672=a11_0x390771;if(_0x4d9c45['bool']('yes'))throw CliErrors[_0x484672(0x79)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x484672(0x7b)+CLI_BIN_NAME+_0x484672(0x9f)+CLI_BIN_NAME+_0x484672(0x83));const _0x35ae72=(_0x4d9c45['str'](_0x484672(0x7d))||_0x4d9c45['str']('ak')||'')['trim']();if(!_0x35ae72&&_0x4d9c45[_0x484672(0xc1)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x411714=await resolveAuthWriteInput(_0x4d9c45),_0x544f00=resolveAuthScopeFlags(_0x4d9c45),_0x4b5851=readScopedConfig(_0x544f00);_0x4b5851[_0x484672(0xb8)]=_0x411714[_0x484672(0xb8)];_0x411714[_0x484672(0x8a)]&&(_0x4b5851[_0x484672(0x8a)]=_0x411714[_0x484672(0x8a)]);writeScopedConfig(_0x4b5851,_0x544f00);const _0x2efa95=_0x544f00[_0x484672(0xbb)]?_0x484672(0xbb):'project',_0x4d83b1=_0x4b5851[_0x484672(0x8a)]?_0x484672(0xa2)+_0x4b5851[_0x484672(0x8a)]+'.':'';return{'ok':!![],'message':_0x484672(0x78)+_0x2efa95+'\x20config.'+_0x4d83b1+_0x484672(0x94)+CLI_BIN_NAME+_0x484672(0xaa)};}},{'service':'auth','command':a11_0x390771(0xa5),'description':a11_0x390771(0x87),'risk':a11_0x390771(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x390771(0x7d),'type':'string','description':a11_0x390771(0x85)},{'name':'ak','type':'string','description':a11_0x390771(0x77)},{'name':a11_0x390771(0x8a),'type':'string','description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a11_0x390771(0xbb),'type':a11_0x390771(0xc2),'description':a11_0x390771(0x7e),'default':!![]},{'name':a11_0x390771(0x9e),'type':a11_0x390771(0xc2),'description':a11_0x390771(0xae),'default':![]}],async 'execute'(_0x1876f5){const _0x398c22=a11_0x390771,_0x137f91=await resolveAuthWriteInput(_0x1876f5),_0x47b6df=resolveAuthScopeFlags(_0x1876f5),_0x5a0398={'accessKey':_0x137f91[_0x398c22(0xb8)]};_0x137f91['env']&&(_0x5a0398[_0x398c22(0x8a)]=_0x137f91[_0x398c22(0x8a)]);writeScopedConfig(_0x5a0398,_0x47b6df);const _0x6cdace=_0x47b6df[_0x398c22(0xbb)]?_0x398c22(0xbb):_0x398c22(0x9e),_0x3ae517=_0x5a0398['env']?'\x20Current\x20env:\x20'+_0x5a0398[_0x398c22(0x8a)]+'.':'';return{'ok':!![],'message':_0x398c22(0x96)+_0x6cdace+_0x398c22(0xb2)+_0x3ae517+_0x398c22(0x94)+CLI_BIN_NAME+_0x398c22(0xaa)};}},{'service':a11_0x390771(0x9b),'command':'logout','description':'Clear\x20accessKey\x20from\x20config','risk':a11_0x390771(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x390771(0xbb),'type':'boolean','description':a11_0x390771(0x95),'default':!![]},{'name':a11_0x390771(0x9e),'type':a11_0x390771(0xc2),'description':a11_0x390771(0x97),'default':![]}],async 'execute'(_0x5b712e){const _0x5ec7c8=a11_0x390771,_0x99687d=resolveAuthScopeFlags(_0x5b712e),_0x5e6df2=readScopedConfig(_0x99687d),_0xf51405=!!_0x5e6df2[_0x5ec7c8(0xb8)];delete _0x5e6df2[_0x5ec7c8(0xb8)],writeScopedConfig(_0x5e6df2,_0x99687d);const _0x33f961=_0x99687d[_0x5ec7c8(0xbb)]?_0x5ec7c8(0xbb):'project';if(_0xf51405)return{'ok':!![],'message':_0x5ec7c8(0xbc)+_0x33f961+_0x5ec7c8(0x9a)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x33f961+_0x5ec7c8(0xc0)};}},{'service':'auth','command':a11_0x390771(0xa9),'description':a11_0x390771(0x8b),'risk':a11_0x390771(0x72),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x390771(0xbb),'type':a11_0x390771(0xc2),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a11_0x390771(0x9e),'type':a11_0x390771(0xc2),'description':a11_0x390771(0x7a),'default':![]},{'name':a11_0x390771(0xa0),'type':a11_0x390771(0xc2),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x4f5a21){const _0x8d5627=a11_0x390771,_0x432d6c=resolveAuthScopeFlags(_0x4f5a21),_0x2c3d75=readScopedConfig(_0x432d6c),_0x5cf77c=productEnvName(_0x8d5627(0x8e)),_0x4ed443=productEnv(_0x8d5627(0x8e))||undefined,_0x1d7a67=_0x2c3d75[_0x8d5627(0xb8)]||undefined,_0x36e9da=_0x4ed443||_0x1d7a67,_0x34049a=_0x4ed443?_0x5cf77c+'\x20env\x20var':_0x1d7a67?(_0x432d6c[_0x8d5627(0xbb)]?_0x8d5627(0xbb):_0x8d5627(0x9e))+_0x8d5627(0x9d):null,_0x53fbf3=[_0x8d5627(0x86)+AUTH_MODE['ClientAk']];if(_0x36e9da){const _0x53191e=_0x36e9da[_0x8d5627(0xc6)]>0x8?''+_0x36e9da['slice'](0x0,0x8)+'*'[_0x8d5627(0xac)](_0x36e9da['length']-0x8):_0x36e9da;_0x53fbf3['push'](_0x8d5627(0x8c)+_0x53191e+(_0x34049a?_0x8d5627(0x84)+_0x34049a+')':''));}if(!_0x36e9da){_0x53fbf3[_0x8d5627(0x98)](''),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0x91)),_0x53fbf3[_0x8d5627(0x98)](''),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0xba)+CLI_BIN_NAME+_0x8d5627(0x75)),_0x53fbf3[_0x8d5627(0x98)](''),_0x53fbf3['push'](_0x8d5627(0xc5)+PRODUCT_CONFIG[_0x8d5627(0x99)]+')'),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0x73)),_0x53fbf3[_0x8d5627(0x98)](''),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0xa3)),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0xad)+_0x5cf77c+_0x8d5627(0xa7)),_0x53fbf3[_0x8d5627(0x98)](''),_0x53fbf3['push'](_0x8d5627(0xb0)+CLI_BIN_NAME+'\x20auth\x20status'),_0x53fbf3[_0x8d5627(0x98)](_0x8d5627(0xa8)+CLI_BIN_NAME+_0x8d5627(0x82));if(_0x4f5a21[_0x8d5627(0xa1)](_0x8d5627(0xa0)))throw CliErrors['authRequired'](_0x53fbf3[_0x8d5627(0x90)]('\x0a'));}return{'ok':!![],'message':_0x53fbf3[_0x8d5627(0x90)]('\x0a')};}},{'service':a11_0x390771(0x9b),'command':a11_0x390771(0x71),'description':a11_0x390771(0xc4),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3a76b9){const _0x857e74=a11_0x390771,_0x445aa6=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x445aa6,'meta':{'env':_0x3a76b9[_0x857e74(0xb5)]??'production'}}};}}];
@@ -1 +1 @@
1
- (function(_0x57fd84,_0x2d81ce){const _0x2251e4=a12_0x2c60,_0x14c438=_0x57fd84();while(!![]){try{const _0x18f327=-parseInt(_0x2251e4(0x162))/0x1+-parseInt(_0x2251e4(0x155))/0x2+parseInt(_0x2251e4(0x157))/0x3+-parseInt(_0x2251e4(0x169))/0x4+parseInt(_0x2251e4(0x167))/0x5*(parseInt(_0x2251e4(0x16a))/0x6)+-parseInt(_0x2251e4(0x168))/0x7*(parseInt(_0x2251e4(0x164))/0x8)+parseInt(_0x2251e4(0x15f))/0x9*(parseInt(_0x2251e4(0x15e))/0xa);if(_0x18f327===_0x2d81ce)break;else _0x14c438['push'](_0x14c438['shift']());}catch(_0xca3241){_0x14c438['push'](_0x14c438['shift']());}}}(a12_0x1690,0xc6678));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x513f86=a12_0x2c60;super('User\x20aborted\x20prompt'),this[_0x513f86(0x163)]=_0x513f86(0x15a);}}function createSafeRl(){const _0x3606c8=a12_0x2c60,_0x3abd82=createInterface({'input':process['stdin'],'output':process[_0x3606c8(0x156)]});let _0x642061;const _0x476d3a=new Promise((_0x465b9e,_0x2976bb)=>{_0x642061=()=>{const _0x1d5097=a12_0x2c60;_0x642061&&(_0x3abd82[_0x1d5097(0x158)](_0x1d5097(0x15c),_0x642061),_0x642061=undefined);try{_0x3abd82[_0x1d5097(0x165)]();}catch{}_0x2976bb(new AbortPrompt());},_0x3abd82['once']('SIGINT',_0x642061);}),_0xca0069=()=>{const _0x159cae=_0x3606c8;_0x642061&&(_0x3abd82['removeListener'](_0x159cae(0x15c),_0x642061),_0x642061=undefined);try{_0x3abd82[_0x159cae(0x165)]();}catch{}};return{'rl':_0x3abd82,'abortPromise':_0x476d3a,'disposeSuccess':_0xca0069};}export async function promptAccessKey(_0x526eb7=''){const _0x36da0d=a12_0x2c60,{rl:_0x16bbdc,abortPromise:_0x489fa5,disposeSuccess:_0x33b4d3}=createSafeRl(),_0x68db53=new Promise(_0x347780=>{const _0x3d73b2=a12_0x2c60,_0x2cdcf9=_0x526eb7?_0x3d73b2(0x161)+_0x526eb7+_0x3d73b2(0x15d):_0x3d73b2(0x166);_0x16bbdc[_0x3d73b2(0x159)](_0x2cdcf9,_0x327d2b=>{const _0x463d94=_0x3d73b2;_0x33b4d3(),_0x347780(_0x327d2b[_0x463d94(0x160)]()||_0x526eb7);});});return Promise[_0x36da0d(0x15b)]([_0x68db53,_0x489fa5]);}function a12_0x2c60(_0x4e17db,_0x3080ce){_0x4e17db=_0x4e17db-0x155;const _0x169029=a12_0x1690();let _0x2c60e6=_0x169029[_0x4e17db];return _0x2c60e6;}export function isAbortPrompt(_0x1b597b){const _0x1a44e3=a12_0x2c60;return _0x1b597b instanceof Error&&_0x1b597b[_0x1a44e3(0x163)]===_0x1a44e3(0x15a);}function a12_0x1690(){const _0x52f6e6=['2143350gkEHDe','removeListener','question','AbortPrompt','race','SIGINT','):\x20','20XUYhhC','5318883phCPtL','trim','AccessKey\x20(','416703AUMukk','name','106376hEWXvC','close','AccessKey\x20(paste\x20ak_...):\x20','5xvBidz','91VqSNfB','495776pHrHQy','2006820liHkWc','1409444qHXPbR','stdout'];a12_0x1690=function(){return _0x52f6e6;};return a12_0x1690();}
1
+ (function(_0x3936d6,_0x39e621){const _0x2d0978=a12_0x5b75,_0x7060c9=_0x3936d6();while(!![]){try{const _0x24cf0d=parseInt(_0x2d0978(0x10f))/0x1+-parseInt(_0x2d0978(0x120))/0x2+-parseInt(_0x2d0978(0x11d))/0x3+parseInt(_0x2d0978(0x117))/0x4*(-parseInt(_0x2d0978(0x11b))/0x5)+parseInt(_0x2d0978(0x121))/0x6*(-parseInt(_0x2d0978(0x113))/0x7)+-parseInt(_0x2d0978(0x125))/0x8+parseInt(_0x2d0978(0x11e))/0x9*(parseInt(_0x2d0978(0x123))/0xa);if(_0x24cf0d===_0x39e621)break;else _0x7060c9['push'](_0x7060c9['shift']());}catch(_0xb8c4db){_0x7060c9['push'](_0x7060c9['shift']());}}}(a12_0x56a4,0x9bedb));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x3c6540=a12_0x5b75;super(_0x3c6540(0x11a)),this[_0x3c6540(0x114)]='AbortPrompt';}}function createSafeRl(){const _0x1315cb=a12_0x5b75,_0x357635=createInterface({'input':process[_0x1315cb(0x11c)],'output':process[_0x1315cb(0x122)]});let _0x3d5a2f;const _0x2e2ae1=new Promise((_0x2fe4e3,_0x833205)=>{_0x3d5a2f=()=>{const _0x26a0de=a12_0x5b75;_0x3d5a2f&&(_0x357635[_0x26a0de(0x115)](_0x26a0de(0x124),_0x3d5a2f),_0x3d5a2f=undefined);try{_0x357635['close']();}catch{}_0x833205(new AbortPrompt());},_0x357635['once']('SIGINT',_0x3d5a2f);}),_0x31c720=()=>{const _0x3e6f04=_0x1315cb;_0x3d5a2f&&(_0x357635[_0x3e6f04(0x115)]('SIGINT',_0x3d5a2f),_0x3d5a2f=undefined);try{_0x357635[_0x3e6f04(0x111)]();}catch{}};return{'rl':_0x357635,'abortPromise':_0x2e2ae1,'disposeSuccess':_0x31c720};}export async function promptAccessKey(_0x1590b5=''){const _0x2872e6=a12_0x5b75,{rl:_0x128fce,abortPromise:_0x3f0b6b,disposeSuccess:_0xa157f}=createSafeRl(),_0x21a753=new Promise(_0x340bdd=>{const _0x1f35a3=a12_0x5b75,_0x45e66b=_0x1590b5?_0x1f35a3(0x118)+_0x1590b5+_0x1f35a3(0x11f):_0x1f35a3(0x110);_0x128fce[_0x1f35a3(0x116)](_0x45e66b,_0x3c334c=>{_0xa157f(),_0x340bdd(_0x3c334c['trim']()||_0x1590b5);});});return Promise[_0x2872e6(0x119)]([_0x21a753,_0x3f0b6b]);}function a12_0x5b75(_0x3f8170,_0xb6f435){_0x3f8170=_0x3f8170-0x10f;const _0x56a4b3=a12_0x56a4();let _0x5b7542=_0x56a4b3[_0x3f8170];return _0x5b7542;}function a12_0x56a4(){const _0x3994d7=['157230BklJAF','24290514Hwjxwf','):\x20','1123140XxvehD','534fRSmEn','stdout','10nuadUv','SIGINT','9677360liCVQV','912398fWDQco','AccessKey\x20(paste\x20ak_...):\x20','close','AbortPrompt','85589ySfIHU','name','removeListener','question','8BzpyVz','AccessKey\x20(','race','User\x20aborted\x20prompt','152020wxWBZa','stdin'];a12_0x56a4=function(){return _0x3994d7;};return a12_0x56a4();}export function isAbortPrompt(_0x25eba4){const _0x316a8c=a12_0x5b75;return _0x25eba4 instanceof Error&&_0x25eba4[_0x316a8c(0x114)]===_0x316a8c(0x112);}
@@ -1 +1 @@
1
- const a13_0x26e8d6=a13_0x5d1a;function a13_0x5e52(){const _0x424307=['read','detail','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','appCode','481236aiuvha','178887ClCgyg','(none)','619080HwZfKy','279002gqIiZg','version','54168TwljGo','BFF\x20function\x20name','name','7782ghGMWD','1WKMypY','9yzKQHT','description','4684210IATIXl','865EYGbcp'];a13_0x5e52=function(){return _0x424307;};return a13_0x5e52();}function a13_0x5d1a(_0x1e4584,_0x4bddf1){_0x1e4584=_0x1e4584-0x11e;const _0x5e52be=a13_0x5e52();let _0x5d1aef=_0x5e52be[_0x1e4584];return _0x5d1aef;}(function(_0x46736f,_0x56510f){const _0x245bc4=a13_0x5d1a,_0x99b63e=_0x46736f();while(!![]){try{const _0x5dd7df=parseInt(_0x245bc4(0x124))/0x1*(parseInt(_0x245bc4(0x11e))/0x2)+-parseInt(_0x245bc4(0x12e))/0x3+-parseInt(_0x245bc4(0x12d))/0x4+-parseInt(_0x245bc4(0x128))/0x5*(parseInt(_0x245bc4(0x123))/0x6)+-parseInt(_0x245bc4(0x130))/0x7+parseInt(_0x245bc4(0x120))/0x8+parseInt(_0x245bc4(0x125))/0x9*(parseInt(_0x245bc4(0x127))/0xa);if(_0x5dd7df===_0x56510f)break;else _0x99b63e['push'](_0x99b63e['shift']());}catch(_0x573818){_0x99b63e['push'](_0x99b63e['shift']());}}}(a13_0x5e52,0x1dc4e));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a13_0x26e8d6(0x12a),'description':a13_0x26e8d6(0x12b),'risk':a13_0x26e8d6(0x129),'flags':[{...NAME_FLAG,'required':!![],'description':a13_0x26e8d6(0x121)}],async 'execute'(_0x495e8c){const _0x160f3d=a13_0x26e8d6,_0x250a52=await getBffEndpointContract(_0x495e8c[_0x160f3d(0x12c)],_0x495e8c['str'](_0x160f3d(0x122)));return{'ok':!![],'data':{'appCode':_0x250a52[_0x160f3d(0x12c)],'functionName':_0x250a52['functionName'],'description':_0x250a52[_0x160f3d(0x126)]||_0x160f3d(0x12f),'version':_0x250a52[_0x160f3d(0x11f)],'gmtModified':_0x250a52['gmtModified']}};}};
1
+ const a13_0xd8cb33=a13_0x2454;(function(_0x4c1b18,_0x4eb980){const _0x7b42eb=a13_0x2454,_0x167062=_0x4c1b18();while(!![]){try{const _0xf7376d=-parseInt(_0x7b42eb(0xaa))/0x1*(-parseInt(_0x7b42eb(0x9a))/0x2)+-parseInt(_0x7b42eb(0xa6))/0x3+-parseInt(_0x7b42eb(0x9d))/0x4*(parseInt(_0x7b42eb(0xa1))/0x5)+parseInt(_0x7b42eb(0x9b))/0x6*(parseInt(_0x7b42eb(0xa7))/0x7)+-parseInt(_0x7b42eb(0xae))/0x8*(parseInt(_0x7b42eb(0x9e))/0x9)+parseInt(_0x7b42eb(0xac))/0xa*(-parseInt(_0x7b42eb(0x99))/0xb)+-parseInt(_0x7b42eb(0xa5))/0xc*(-parseInt(_0x7b42eb(0x9c))/0xd);if(_0xf7376d===_0x4eb980)break;else _0x167062['push'](_0x167062['shift']());}catch(_0xa48887){_0x167062['push'](_0x167062['shift']());}}}(a13_0x3ad9,0xaae05));import{getBffEndpointContract}from'../../core/api-client.js';function a13_0x2454(_0x2120a2,_0x4926d2){_0x2120a2=_0x2120a2-0x99;const _0x3ad90d=a13_0x3ad9();let _0x2454e5=_0x3ad90d[_0x2120a2];return _0x2454e5;}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a13_0xd8cb33(0xa3),'command':a13_0xd8cb33(0xad),'description':a13_0xd8cb33(0xa4),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a13_0xd8cb33(0xa9)}],async 'execute'(_0x3fcef0){const _0xb27387=a13_0xd8cb33,_0x264228=await getBffEndpointContract(_0x3fcef0[_0xb27387(0xa2)],_0x3fcef0[_0xb27387(0xa0)](_0xb27387(0xab)));return{'ok':!![],'data':{'appCode':_0x264228['appCode'],'functionName':_0x264228[_0xb27387(0x9f)],'description':_0x264228['description']||_0xb27387(0xaf),'version':_0x264228['version'],'gmtModified':_0x264228[_0xb27387(0xa8)]}};}};function a13_0x3ad9(){const _0x580767=['683BFjMuA','name','8172370sYbGIu','detail','2454104UjTaCu','(none)','11liPQSO','3448AZniWP','314538UUNhUJ','13FBknEM','542236AMipmL','27myxtjc','functionName','str','45jDDpFA','appCode','bff','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','33834396lOzDdB','2434098sfosHV','63aNLUxK','gmtModified','BFF\x20function\x20name'];a13_0x3ad9=function(){return _0x580767;};return a13_0x3ad9();}
@@ -1 +1 @@
1
- const a14_0x1e747d=a14_0x13ef;(function(_0x3f4e60,_0x554404){const _0x3a6a6c=a14_0x13ef,_0x392637=_0x3f4e60();while(!![]){try{const _0x38531e=-parseInt(_0x3a6a6c(0x12d))/0x1*(-parseInt(_0x3a6a6c(0x130))/0x2)+-parseInt(_0x3a6a6c(0x12b))/0x3*(parseInt(_0x3a6a6c(0x127))/0x4)+parseInt(_0x3a6a6c(0x136))/0x5*(-parseInt(_0x3a6a6c(0x135))/0x6)+parseInt(_0x3a6a6c(0x12c))/0x7+parseInt(_0x3a6a6c(0x12a))/0x8*(parseInt(_0x3a6a6c(0x128))/0x9)+-parseInt(_0x3a6a6c(0x134))/0xa+parseInt(_0x3a6a6c(0x138))/0xb;if(_0x38531e===_0x554404)break;else _0x392637['push'](_0x392637['shift']());}catch(_0x3bc30d){_0x392637['push'](_0x392637['shift']());}}}(a14_0x4c51,0x2ba3b));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a14_0x4c51(){const _0x2c4c76=['2tHsWUk','exec','now','name','1919780rPzRRm','462KSztIr','3355uAbrEB','read','574761umWyUA','588704NyJhSM','2680227qKEPkl','params','8SQaINk','3NdzhmX','1330217wgqfMN','29483CXQMek','BFF\x20function\x20name\x20to\x20execute','str'];a14_0x4c51=function(){return _0x2c4c76;};return a14_0x4c51();}function a14_0x13ef(_0x159341,_0x33640c){_0x159341=_0x159341-0x127;const _0x4c513e=a14_0x4c51();let _0x13ef9e=_0x4c513e[_0x159341];return _0x13ef9e;}export const bffExec={'service':'bff','command':a14_0x1e747d(0x131),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a14_0x1e747d(0x137),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x1e747d(0x12e)},PARAMS_FLAG],async 'execute'(_0x20a419){const _0x34c932=a14_0x1e747d,_0x35ffb9=parseJsonParams(_0x20a419[_0x34c932(0x12f)](_0x34c932(0x129))),_0x32a473=Date['now'](),_0x5c4e0e=await executeSdkBff(_0x20a419[_0x34c932(0x12f)](_0x34c932(0x133)),_0x35ffb9),_0x5bc471=Date[_0x34c932(0x132)]()-_0x32a473;return{'ok':!![],'data':{'result':_0x5c4e0e,'elapsed':_0x5bc471},'message':'BFF\x20executed\x20in\x20'+_0x5bc471+'ms'};}};
1
+ function a14_0x5017(_0x2bbdde,_0x2fa291){_0x2bbdde=_0x2bbdde-0x1b0;const _0x19718a=a14_0x1971();let _0x501748=_0x19718a[_0x2bbdde];return _0x501748;}const a14_0x2b9ab4=a14_0x5017;function a14_0x1971(){const _0x298427=['3970377VmZyRT','exec','72740saSpvF','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','bff','1080004RezShu','2426802ZvqpKX','name','2093iqPsWa','BFF\x20executed\x20in\x20','now','2431psnpqQ','str','749484xggnOR','params','BFF\x20function\x20name\x20to\x20execute','3AaSVfY','45EPSatx','22224OZmjMB','517875xAEqzL'];a14_0x1971=function(){return _0x298427;};return a14_0x1971();}(function(_0x53e679,_0x184324){const _0x4fd55a=a14_0x5017,_0x50c442=_0x53e679();while(!![]){try{const _0x57f776=parseInt(_0x4fd55a(0x1ba))/0x1+parseInt(_0x4fd55a(0x1c1))/0x2+-parseInt(_0x4fd55a(0x1b7))/0x3*(parseInt(_0x4fd55a(0x1c0))/0x4)+-parseInt(_0x4fd55a(0x1b8))/0x5*(parseInt(_0x4fd55a(0x1b4))/0x6)+-parseInt(_0x4fd55a(0x1c3))/0x7*(parseInt(_0x4fd55a(0x1b9))/0x8)+-parseInt(_0x4fd55a(0x1bb))/0x9+-parseInt(_0x4fd55a(0x1bd))/0xa*(-parseInt(_0x4fd55a(0x1b2))/0xb);if(_0x57f776===_0x184324)break;else _0x50c442['push'](_0x50c442['shift']());}catch(_0x20175a){_0x50c442['push'](_0x50c442['shift']());}}}(a14_0x1971,0xa443c));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a14_0x2b9ab4(0x1bf),'command':a14_0x2b9ab4(0x1bc),'description':a14_0x2b9ab4(0x1be),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x2b9ab4(0x1b6)},PARAMS_FLAG],async 'execute'(_0x3f9219){const _0x2a61e4=a14_0x2b9ab4,_0x1a2b9c=parseJsonParams(_0x3f9219[_0x2a61e4(0x1b3)](_0x2a61e4(0x1b5))),_0x2d9d1d=Date[_0x2a61e4(0x1b1)](),_0x1d168c=await executeSdkBff(_0x3f9219['str'](_0x2a61e4(0x1c2)),_0x1a2b9c),_0x1d55e5=Date['now']()-_0x2d9d1d;return{'ok':!![],'data':{'result':_0x1d168c,'elapsed':_0x1d55e5},'message':_0x2a61e4(0x1b0)+_0x1d55e5+'ms'};}};