@lovrabet/lovrabet-cli 2.1.8-beta.1 → 2.1.8-beta.2

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 (117) 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/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.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/response.js +1 -1
  87. package/lib/framework/runner-confirmation.js +1 -1
  88. package/lib/framework/runner-error.js +1 -1
  89. package/lib/framework/runner.js +1 -1
  90. package/lib/framework/schema-export.js +1 -1
  91. package/lib/framework/service-order.js +1 -1
  92. package/lib/framework/types.js +1 -1
  93. package/lib/generated/build-info.js +1 -1
  94. package/lib/help.js +1 -1
  95. package/lib/skills/npx-skills-add.js +1 -1
  96. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  97. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  98. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  99. package/lib/skills/runtime-skill-sync/links.js +1 -1
  100. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  101. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  102. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  103. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  104. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  105. package/lib/skills/runtime-skill-sync/push.js +1 -1
  106. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  107. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  109. package/lib/skills/runtime-skill-sync.js +1 -1
  110. package/lib/utils/apply-jq-filter.js +1 -1
  111. package/lib/utils/logger.js +1 -1
  112. package/lib/utils/params.js +1 -1
  113. package/lib/utils/platform.js +1 -1
  114. package/lib/utils/update-notice.js +1 -1
  115. package/lib/utils/version.js +1 -1
  116. package/lib/utils/write-cli-side-channel.js +1 -1
  117. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x422bed=a0_0x46e0;(function(_0x3f820f,_0x510ca0){const _0x235f43=a0_0x46e0,_0x59faef=_0x3f820f();while(!![]){try{const _0x4d9024=parseInt(_0x235f43(0x9b))/0x1+-parseInt(_0x235f43(0x85))/0x2*(-parseInt(_0x235f43(0xa0))/0x3)+parseInt(_0x235f43(0x91))/0x4+-parseInt(_0x235f43(0xab))/0x5+-parseInt(_0x235f43(0xaa))/0x6+-parseInt(_0x235f43(0xa1))/0x7+parseInt(_0x235f43(0x8c))/0x8;if(_0x4d9024===_0x510ca0)break;else _0x59faef['push'](_0x59faef['shift']());}catch(_0x1aa5fd){_0x59faef['push'](_0x59faef['shift']());}}}(a0_0x8370,0xaa03c));import{jsx as a0_0x17f1b3}from'react/jsx-runtime';import a0_0x34e66c from'meow';import{render}from'ink';function a0_0x46e0(_0x86b43d,_0x2c45ba){_0x86b43d=_0x86b43d-0x85;const _0x837030=a0_0x8370();let _0x46e0e8=_0x837030[_0x86b43d];return _0x46e0e8;}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';function a0_0x8370(){const _0x124acd=['stderr','exitCode','corrected','code','\x0aCancelled.\x0a','hint','write','definition','3823722GGWHRx','1160785sKLRnz','16SLWGNZ','ERR_USE_AFTER_CLOSE','slice','defaultCommand','original','[preparse]\x20','help','8550288zalRIi','assign','unknownCommand','args','log','439760djxGis','cancelled','length','\x20->\x20--','Hint:\x20','catch','error','input','flatMap','Error:\x20','470715gRBKHx','flags','handler','ExitPromptError','exit','46617PiNYQV','1455503ZtqFaQ'];a0_0x8370=function(){return _0x124acd;};return a0_0x8370();}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_0x34e66c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x422bed(0x96)](handleError);async function main(){try{await run();}catch(_0x149c50){handleError(_0x149c50);}}async function run(){const _0x3728c1=a0_0x422bed;let _0x83c975=cli['input'][0x0],_0x5a2fbe=cli[_0x3728c1(0x98)][0x1];const _0x2731ed=cli['flags'];try{const {correctFlags:_0x4d1461}=await import('./framework/preparse.js'),_0x56a5a6=getAllDefinitions()[_0x3728c1(0x99)](_0x489194=>_0x489194[_0x3728c1(0x9c)]??[]),{flags:_0x19b3a5,corrections:_0x38548e}=_0x4d1461(_0x2731ed,_0x56a5a6);if(_0x38548e[_0x3728c1(0x93)]>0x0){for(const _0x3aa8fb of _0x38548e){process[_0x3728c1(0xa2)][_0x3728c1(0xa8)](_0x3728c1(0x8a)+_0x3aa8fb[_0x3728c1(0x9d)]+':\x20--'+_0x3aa8fb[_0x3728c1(0x89)]+_0x3728c1(0x94)+_0x3aa8fb[_0x3728c1(0xa4)]+'\x0a');}Object[_0x3728c1(0x8d)](_0x2731ed,_0x19b3a5);}}catch{}if(!_0x83c975){const {waitUntilExit:_0x4e3010}=render(a0_0x17f1b3(Help,{}));await _0x4e3010();return;}if(!isKnownService(_0x83c975)){const _0x2f6081=resolveDynamicServiceCommand(cli['input'],_0x2731ed);if(_0x2f6081){if(_0x2731ed[_0x3728c1(0x8b)]){console[_0x3728c1(0x90)](generateCommandHelp(_0x2f6081[_0x3728c1(0xa9)]));return;}Object['assign'](_0x2731ed,_0x2f6081[_0x3728c1(0x9c)]);const _0x2cb6b0=buildConfigFromFlags(_0x2731ed);await initGlobalEnvironment(_0x2cb6b0);const _0x328157=createPipelineEnv(_0x2cb6b0,_0x2731ed);_0x328157[_0x3728c1(0x8f)]=_0x2f6081[_0x3728c1(0x8f)],await runCommand(_0x2f6081[_0x3728c1(0xa9)],_0x328157);return;}if(_0x2731ed[_0x3728c1(0x8b)]){const _0x248af2=generateDynamicServiceHelp(_0x83c975);if(_0x248af2){console[_0x3728c1(0x90)](_0x248af2);return;}}const {waitUntilExit:_0x28ead3}=render(a0_0x17f1b3(Help,{}));await _0x28ead3();return;}const _0x38adbb=getServiceEntry(_0x83c975);if(!_0x5a2fbe){if(_0x2731ed[_0x3728c1(0x8b)]){console[_0x3728c1(0x90)](generateServiceHelp(_0x83c975));return;}if(_0x38adbb['defaultCommand'])_0x5a2fbe=_0x38adbb[_0x3728c1(0x88)];else{console[_0x3728c1(0x90)](generateServiceHelp(_0x83c975));return;}}const _0x446d31=findDefinition(_0x83c975,_0x5a2fbe);!_0x446d31&&(console['log'](generateServiceHelp(_0x83c975)),handleError(CliErrors[_0x3728c1(0x8e)](_0x83c975+'\x20'+_0x5a2fbe)));if(_0x2731ed[_0x3728c1(0x8b)]){console[_0x3728c1(0x90)](generateCommandHelp(_0x446d31));return;}const _0x3d5bc0=buildConfigFromFlags(_0x2731ed);await initGlobalEnvironment(_0x3d5bc0);const _0x74b3ac=createPipelineEnv(_0x3d5bc0,_0x2731ed);_0x74b3ac[_0x3728c1(0x8f)]=cli[_0x3728c1(0x98)][_0x3728c1(0x87)](0x2),await runCommand(_0x446d31,_0x74b3ac);}function handleError(_0x7f8bd0){const _0x271bcf=a0_0x422bed;if(_0x7f8bd0 instanceof CliError){_0x7f8bd0[_0x271bcf(0xa5)]===_0x271bcf(0x92)&&(process[_0x271bcf(0xa2)]['write']('\x0aCancelled.\x0a'),process[_0x271bcf(0x9f)](0x0));console[_0x271bcf(0x97)](_0x271bcf(0x9a)+_0x7f8bd0['message']);if(_0x7f8bd0[_0x271bcf(0xa7)])console['error'](_0x271bcf(0x95)+_0x7f8bd0[_0x271bcf(0xa7)]);process['exit'](_0x7f8bd0[_0x271bcf(0xa3)]);}isUserCancellation(_0x7f8bd0)&&(process[_0x271bcf(0xa2)][_0x271bcf(0xa8)](_0x271bcf(0xa6)),process[_0x271bcf(0x9f)](0x0)),console['error']('Unexpected\x20error:',_0x7f8bd0),process[_0x271bcf(0x9f)](0x1);}function isUserCancellation(_0x4f84b5){const _0x277245=a0_0x422bed;if(!(_0x4f84b5 instanceof Error))return![];if(_0x4f84b5['name']===_0x277245(0x9e))return!![];if(_0x4f84b5[_0x277245(0xa5)]===_0x277245(0x86))return!![];if(_0x4f84b5[_0x277245(0xa5)]==='ERR_STREAM_DESTROYED')return!![];return![];}
2
+ function a0_0x2613(){const _0x5f4acc=['4691784nBQAys','ERR_STREAM_DESTROYED','exit','original','assign','Error:\x20','cancelled','code','8RJnFkO','\x0aCancelled.\x0a','flatMap','10nWnVRI','Unexpected\x20error:','12800193wnaQQb','slice','[preparse]\x20','7287430kTraOE','error','handler','length','exitCode','catch','definition','Hint:\x20','6784444jGpcPA','hint','./framework/preparse.js','26145477lPSCDP','name','args','log','help','corrected','defaultCommand','8588454IuTZMl','2uqCluo','1051255wESXFj','stderr','write','input','ERR_USE_AFTER_CLOSE','flags','unknownCommand'];a0_0x2613=function(){return _0x5f4acc;};return a0_0x2613();}const a0_0x537e66=a0_0x1c93;(function(_0x11035a,_0x5f2518){const _0x1a9feb=a0_0x1c93,_0x3acb4e=_0x11035a();while(!![]){try{const _0x30f50d=-parseInt(_0x1a9feb(0xf8))/0x1+parseInt(_0x1a9feb(0xf7))/0x2*(-parseInt(_0x1a9feb(0xff))/0x3)+parseInt(_0x1a9feb(0x117))/0x4+-parseInt(_0x1a9feb(0x10f))/0x5+-parseInt(_0x1a9feb(0xf6))/0x6+parseInt(_0x1a9feb(0x10c))/0x7*(parseInt(_0x1a9feb(0x107))/0x8)+parseInt(_0x1a9feb(0x11a))/0x9*(parseInt(_0x1a9feb(0x10a))/0xa);if(_0x30f50d===_0x5f2518)break;else _0x3acb4e['push'](_0x3acb4e['shift']());}catch(_0x5e19ee){_0x3acb4e['push'](_0x3acb4e['shift']());}}}(a0_0x2613,0xe1ff5));import{jsx as a0_0x104a8d}from'react/jsx-runtime';import a0_0x354444 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';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_0x354444(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x537e66(0x114)](handleError);function a0_0x1c93(_0x3f1cf9,_0x276f74){_0x3f1cf9=_0x3f1cf9-0xf1;const _0x261349=a0_0x2613();let _0x1c932f=_0x261349[_0x3f1cf9];return _0x1c932f;}async function main(){try{await run();}catch(_0x5d00e1){handleError(_0x5d00e1);}}async function run(){const _0x3ce596=a0_0x537e66;let _0x2fd287=cli[_0x3ce596(0xfb)][0x0],_0x2d8a28=cli[_0x3ce596(0xfb)][0x1];const _0x72d9ca=cli[_0x3ce596(0xfd)];try{const {correctFlags:_0x5f0160}=await import(_0x3ce596(0x119)),_0x3ad75b=getAllDefinitions()[_0x3ce596(0x109)](_0x2079f1=>_0x2079f1['flags']??[]),{flags:_0x58741,corrections:_0x108a88}=_0x5f0160(_0x72d9ca,_0x3ad75b);if(_0x108a88[_0x3ce596(0x112)]>0x0){for(const _0x57a1a5 of _0x108a88){process[_0x3ce596(0xf9)][_0x3ce596(0xfa)](_0x3ce596(0x10e)+_0x57a1a5[_0x3ce596(0x111)]+':\x20--'+_0x57a1a5[_0x3ce596(0x102)]+'\x20->\x20--'+_0x57a1a5[_0x3ce596(0xf4)]+'\x0a');}Object[_0x3ce596(0x103)](_0x72d9ca,_0x58741);}}catch{}if(!_0x2fd287){const {waitUntilExit:_0x5079bc}=render(a0_0x104a8d(Help,{}));await _0x5079bc();return;}if(!isKnownService(_0x2fd287)){const _0x4019d9=resolveDynamicServiceCommand(cli['input'],_0x72d9ca);if(_0x4019d9){if(_0x72d9ca['help']){console['log'](generateCommandHelp(_0x4019d9[_0x3ce596(0x115)]));return;}Object['assign'](_0x72d9ca,_0x4019d9[_0x3ce596(0xfd)]);const _0x840745=buildConfigFromFlags(_0x72d9ca);await initGlobalEnvironment(_0x840745);const _0x299cdd=createPipelineEnv(_0x840745,_0x72d9ca);_0x299cdd[_0x3ce596(0xf1)]=_0x4019d9['args'],await runCommand(_0x4019d9[_0x3ce596(0x115)],_0x299cdd);return;}if(_0x72d9ca[_0x3ce596(0xf3)]){const _0x13c2b8=generateDynamicServiceHelp(_0x2fd287);if(_0x13c2b8){console[_0x3ce596(0xf2)](_0x13c2b8);return;}}const {waitUntilExit:_0x579f48}=render(a0_0x104a8d(Help,{}));await _0x579f48();return;}const _0x3a9237=getServiceEntry(_0x2fd287);if(!_0x2d8a28){if(_0x72d9ca[_0x3ce596(0xf3)]){console[_0x3ce596(0xf2)](generateServiceHelp(_0x2fd287));return;}if(_0x3a9237[_0x3ce596(0xf5)])_0x2d8a28=_0x3a9237[_0x3ce596(0xf5)];else{console[_0x3ce596(0xf2)](generateServiceHelp(_0x2fd287));return;}}const _0xc5ef11=findDefinition(_0x2fd287,_0x2d8a28);!_0xc5ef11&&(console['log'](generateServiceHelp(_0x2fd287)),handleError(CliErrors[_0x3ce596(0xfe)](_0x2fd287+'\x20'+_0x2d8a28)));if(_0x72d9ca[_0x3ce596(0xf3)]){console[_0x3ce596(0xf2)](generateCommandHelp(_0xc5ef11));return;}const _0x4a4ca9=buildConfigFromFlags(_0x72d9ca);await initGlobalEnvironment(_0x4a4ca9);const _0x14cded=createPipelineEnv(_0x4a4ca9,_0x72d9ca);_0x14cded[_0x3ce596(0xf1)]=cli[_0x3ce596(0xfb)][_0x3ce596(0x10d)](0x2),await runCommand(_0xc5ef11,_0x14cded);}function handleError(_0xc4c6b5){const _0xdad2e1=a0_0x537e66;if(_0xc4c6b5 instanceof CliError){_0xc4c6b5['code']===_0xdad2e1(0x105)&&(process[_0xdad2e1(0xf9)][_0xdad2e1(0xfa)](_0xdad2e1(0x108)),process['exit'](0x0));console[_0xdad2e1(0x110)](_0xdad2e1(0x104)+_0xc4c6b5['message']);if(_0xc4c6b5['hint'])console[_0xdad2e1(0x110)](_0xdad2e1(0x116)+_0xc4c6b5[_0xdad2e1(0x118)]);process[_0xdad2e1(0x101)](_0xc4c6b5[_0xdad2e1(0x113)]);}isUserCancellation(_0xc4c6b5)&&(process['stderr'][_0xdad2e1(0xfa)]('\x0aCancelled.\x0a'),process[_0xdad2e1(0x101)](0x0)),console['error'](_0xdad2e1(0x10b),_0xc4c6b5),process[_0xdad2e1(0x101)](0x1);}function isUserCancellation(_0x26a455){const _0x29fbd5=a0_0x537e66;if(!(_0x26a455 instanceof Error))return![];if(_0x26a455[_0x29fbd5(0x11b)]==='ExitPromptError')return!![];if(_0x26a455[_0x29fbd5(0x106)]===_0x29fbd5(0xfc))return!![];if(_0x26a455['code']===_0x29fbd5(0x100))return!![];return![];}
@@ -1 +1 @@
1
- function a1_0x4347(_0x79be29,_0x4569b2){_0x79be29=_0x79be29-0x10c;const _0x5064b1=a1_0x5064();let _0x434720=_0x5064b1[_0x79be29];return _0x434720;}function a1_0x5064(){const _0x2aa0c8=['{\x22param\x22:\x22value\x22}','find','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','创建数据','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','API\x20doc\x20code\x20not\x20found:\x20','##\x20Aggregate\x20dataset\x20data','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','32-character\x20dataset\x20code','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','join','dataset_data_aggregate','/api/{appCode}/{datasetCode}/create','{\x22fieldName\x22:\x22value\x22}','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','paging\x20contains\x20pagination','{\x22id\x22:123}','method','API\x20doc\x20code,\x20for\x20example\x20dataset_list','category','scriptName','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','POST','title','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','length','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','/api/endpoint/{appCode}/{scriptName}','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','##\x20Filter\x20dataset\x20data','read','whenToUse','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','fields/properties\x20describe\x20data\x20shape','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','聚合查询数据集数据','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','72Yqkxba','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','##\x20List\x20datasets','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','summary','datasetCode','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','code','path','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','where\x20filters\x20before\x20aggregation','paging.totalCount\x20gives\x20total\x20rows','Returns\x20script\x20business\x20payload','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','appCode','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','244nAlQll','1333782NINyDi','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','detail','条件过滤查询数据','Current\x20app\x20code','dataset_data_get_one','filter','8Aoqsav','trim','4xcjJaZ','list','需要向指定数据集新增一条业务数据时使用','List\x20BF\x20endpoint\x20functions','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','result\x20rows\x20contain\x20aggregate\x20aliases','8620860hcIEaY','/api/dataset/get-dataset-list-by-app-code','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','dataset','toLowerCase','keyword','256615sTxhuw','bf_execute','validation','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','/api/dataset/getOneByCode?code={datasetCode}','Aggregate\x20dataset\x20data','List\x20datasets','Execute\x20custom\x20SQL','dataset_data_create','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','bf_function_list','/api/{appCode}/{datasetCode}/aggregate','获取数据集详情','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','4769429GLBvde','List\x20available\x20runtime\x20API\x20documentation\x20entries','6qdkgxl','/api/custom/executeSql','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','52308eFEadK','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','dataset_list','custom_sql','str','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','Dataset\x20detail','string','6282990Tfpoqg','##\x20Dataset\x20detail','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','3069GrBqXL'];a1_0x5064=function(){return _0x2aa0c8;};return a1_0x5064();}const a1_0x528d8b=a1_0x4347;(function(_0x16fe57,_0x27b141){const _0x4dfa5b=a1_0x4347,_0x2a8813=_0x16fe57();while(!![]){try{const _0x40283f=parseInt(_0x4dfa5b(0x125))/0x1*(parseInt(_0x4dfa5b(0x16d))/0x2)+-parseInt(_0x4dfa5b(0x16e))/0x3*(parseInt(_0x4dfa5b(0x178))/0x4)+-parseInt(_0x4dfa5b(0x114))/0x5*(-parseInt(_0x4dfa5b(0x15c))/0x6)+parseInt(_0x4dfa5b(0x123))/0x7*(parseInt(_0x4dfa5b(0x176))/0x8)+-parseInt(_0x4dfa5b(0x131))/0x9+-parseInt(_0x4dfa5b(0x10d))/0xa+parseInt(_0x4dfa5b(0x134))/0xb*(parseInt(_0x4dfa5b(0x128))/0xc);if(_0x40283f===_0x27b141)break;else _0x2a8813['push'](_0x2a8813['shift']());}catch(_0x3f055c){_0x2a8813['push'](_0x2a8813['shift']());}}}(a1_0x5064,0x7c58e));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':a1_0x528d8b(0x130),'description':a1_0x528d8b(0x15f)},KEYWORD_FLAG={'name':'keyword','type':a1_0x528d8b(0x130),'description':a1_0x528d8b(0x165)},DOC_CODE_FLAG={'name':a1_0x528d8b(0x163),'type':a1_0x528d8b(0x130),'required':!![],'description':a1_0x528d8b(0x149)},DOCS=[{'code':a1_0x528d8b(0x12b),'category':a1_0x528d8b(0x111),'title':a1_0x528d8b(0x11a),'method':a1_0x528d8b(0x14d),'path':a1_0x528d8b(0x10e),'summary':'分页获取数据集列表','whenToUse':a1_0x528d8b(0x137),'pathParams':[],'queryParams':[],'bodySchema':a1_0x528d8b(0x157),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0x528d8b(0x167)],'examples':[a1_0x528d8b(0x12e)],'notes':[a1_0x528d8b(0x117)],'markdown':[a1_0x528d8b(0x15e),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x528d8b(0x13f)]('\x0a')},{'code':'dataset_detail','category':a1_0x528d8b(0x111),'title':a1_0x528d8b(0x12f),'method':'GET','path':a1_0x528d8b(0x118),'summary':a1_0x528d8b(0x120),'whenToUse':a1_0x528d8b(0x122),'pathParams':[],'queryParams':[{'name':a1_0x528d8b(0x163),'description':a1_0x528d8b(0x13d)}],'bodySchema':'None','responseHighlights':[a1_0x528d8b(0x158),'relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','operations\x20describes\x20runtime\x20APIs'],'examples':[a1_0x528d8b(0x129)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':[a1_0x528d8b(0x132),'',a1_0x528d8b(0x13e)]['join']('\x0a')},{'code':'dataset_data_filter','category':a1_0x528d8b(0x111),'title':'Filter\x20dataset\x20data','method':a1_0x528d8b(0x14d),'path':'/api/{appCode}/{datasetCode}/filter','summary':a1_0x528d8b(0x172),'whenToUse':a1_0x528d8b(0x153),'pathParams':[{'name':a1_0x528d8b(0x16b),'description':'Current\x20app\x20code'},{'name':a1_0x528d8b(0x161),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x528d8b(0x144),'responseHighlights':['tableData\x20contains\x20records',a1_0x528d8b(0x146)],'examples':[a1_0x528d8b(0x151)],'notes':[a1_0x528d8b(0x110)],'markdown':[a1_0x528d8b(0x154),'',a1_0x528d8b(0x11d)][a1_0x528d8b(0x13f)]('\x0a')},{'code':a1_0x528d8b(0x140),'category':a1_0x528d8b(0x111),'title':a1_0x528d8b(0x119),'method':a1_0x528d8b(0x14d),'path':a1_0x528d8b(0x11f),'summary':a1_0x528d8b(0x15a),'whenToUse':a1_0x528d8b(0x12a),'pathParams':[{'name':a1_0x528d8b(0x16b),'description':a1_0x528d8b(0x173)},{'name':a1_0x528d8b(0x161),'description':a1_0x528d8b(0x13d)}],'queryParams':[],'bodySchema':a1_0x528d8b(0x16c),'responseHighlights':[a1_0x528d8b(0x10c),a1_0x528d8b(0x166)],'examples':[a1_0x528d8b(0x133)],'notes':[a1_0x528d8b(0x16f),a1_0x528d8b(0x121)],'markdown':[a1_0x528d8b(0x13b),'',a1_0x528d8b(0x145)]['join']('\x0a')},{'code':a1_0x528d8b(0x174),'category':a1_0x528d8b(0x111),'title':'Get\x20one\x20dataset\x20record','method':a1_0x528d8b(0x14d),'path':'/api/{appCode}/{datasetCode}/getOne','summary':'查询单条数据','whenToUse':a1_0x528d8b(0x162),'pathParams':[{'name':a1_0x528d8b(0x16b),'description':a1_0x528d8b(0x173)},{'name':a1_0x528d8b(0x161),'description':a1_0x528d8b(0x13d)}],'queryParams':[],'bodySchema':a1_0x528d8b(0x147),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':[a1_0x528d8b(0x15d)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x528d8b(0x16a)},{'code':a1_0x528d8b(0x11c),'category':a1_0x528d8b(0x111),'title':'Create\x20dataset\x20record','method':a1_0x528d8b(0x14d),'path':a1_0x528d8b(0x141),'summary':a1_0x528d8b(0x138),'whenToUse':a1_0x528d8b(0x17a),'pathParams':[{'name':a1_0x528d8b(0x16b),'description':'Current\x20app\x20code'},{'name':'datasetCode','description':a1_0x528d8b(0x13d)}],'queryParams':[],'bodySchema':a1_0x528d8b(0x142),'responseHighlights':[a1_0x528d8b(0x169)],'examples':[a1_0x528d8b(0x139)],'notes':[a1_0x528d8b(0x13c)],'markdown':a1_0x528d8b(0x17c)},{'code':a1_0x528d8b(0x11e),'category':'bf','title':a1_0x528d8b(0x17b),'method':'GET','path':'/api/endpoint/{appCode}/functions','summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':'需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','pathParams':[{'name':a1_0x528d8b(0x16b),'description':a1_0x528d8b(0x173)}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':a1_0x528d8b(0x15b)},{'code':a1_0x528d8b(0x115),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x528d8b(0x14d),'path':a1_0x528d8b(0x152),'summary':'执行指定\x20BF\x20函数','whenToUse':a1_0x528d8b(0x10f),'pathParams':[{'name':a1_0x528d8b(0x16b),'description':a1_0x528d8b(0x173)},{'name':a1_0x528d8b(0x14b),'description':'Endpoint\x20function\x20name'}],'queryParams':[],'bodySchema':a1_0x528d8b(0x135),'responseHighlights':[a1_0x528d8b(0x168)],'examples':[a1_0x528d8b(0x143)],'notes':[a1_0x528d8b(0x14f)],'markdown':a1_0x528d8b(0x14c)},{'code':'custom_sql_execute','category':a1_0x528d8b(0x12c),'title':a1_0x528d8b(0x11b),'method':a1_0x528d8b(0x14d),'path':a1_0x528d8b(0x126),'summary':'执行自定义\x20SQL','whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x528d8b(0x127),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x528d8b(0x159)],'notes':[a1_0x528d8b(0x170)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0x4cc37b){const _0x4ad0c8=a1_0x528d8b;return{'code':_0x4cc37b['code'],'category':_0x4cc37b[_0x4ad0c8(0x14a)],'method':_0x4cc37b[_0x4ad0c8(0x148)],'path':_0x4cc37b[_0x4ad0c8(0x164)],'summary':_0x4cc37b['summary'],'whenToUse':_0x4cc37b['whenToUse']};}export function listApiDocEntries(_0x5aaa4d={}){const _0x1ec05f=a1_0x528d8b,_0x5bfca2=String(_0x5aaa4d[_0x1ec05f(0x14a)]||'')[_0x1ec05f(0x177)](),_0x407005=String(_0x5aaa4d[_0x1ec05f(0x113)]||'')[_0x1ec05f(0x177)]()['toLowerCase']();return DOCS[_0x1ec05f(0x175)](_0x4d7acd=>{const _0x2b2bc8=_0x1ec05f;if(_0x5bfca2&&_0x4d7acd['category']!==_0x5bfca2)return![];if(!_0x407005)return!![];return[_0x4d7acd['code'],_0x4d7acd[_0x2b2bc8(0x14a)],_0x4d7acd[_0x2b2bc8(0x148)],_0x4d7acd[_0x2b2bc8(0x164)],_0x4d7acd[_0x2b2bc8(0x160)],_0x4d7acd[_0x2b2bc8(0x156)],_0x4d7acd[_0x2b2bc8(0x14e)]][_0x2b2bc8(0x13f)]('\x20')[_0x2b2bc8(0x112)]()['includes'](_0x407005);})['map'](entrySummary);}export function getApiDocDetail(_0x4a92d1){const _0x263423=a1_0x528d8b,_0x2c85f1=DOCS[_0x263423(0x136)](_0x597460=>_0x597460[_0x263423(0x163)]===_0x4a92d1);if(!_0x2c85f1)throw CliErrors[_0x263423(0x116)](_0x263423(0x13a)+_0x4a92d1);return{..._0x2c85f1};}const apiDocList={'service':'api-doc','command':a1_0x528d8b(0x179),'description':a1_0x528d8b(0x124),'risk':a1_0x528d8b(0x155),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x2d0550){const _0x2f8750=a1_0x528d8b,_0x408beb=listApiDocEntries({'category':_0x2d0550[_0x2f8750(0x12d)](_0x2f8750(0x14a)),'keyword':_0x2d0550[_0x2f8750(0x12d)](_0x2f8750(0x113))});return{'ok':!![],'data':{'total':_0x408beb[_0x2f8750(0x150)],'items':_0x408beb}};}},apiDocDetail={'service':'api-doc','command':a1_0x528d8b(0x171),'description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0x528d8b(0x155),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x5bfb80){const _0x53152b=a1_0x528d8b;return{'ok':!![],'data':getApiDocDetail(_0x5bfb80[_0x53152b(0x12d)](_0x53152b(0x163)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x576350=a1_0x5d3d;(function(_0x2d1367,_0x39342b){const _0xe05c04=a1_0x5d3d,_0x2b68c8=_0x2d1367();while(!![]){try{const _0x5e6804=parseInt(_0xe05c04(0x18e))/0x1+parseInt(_0xe05c04(0x1af))/0x2+parseInt(_0xe05c04(0x197))/0x3+parseInt(_0xe05c04(0x1a6))/0x4+parseInt(_0xe05c04(0x1df))/0x5+parseInt(_0xe05c04(0x1d1))/0x6+-parseInt(_0xe05c04(0x19d))/0x7;if(_0x5e6804===_0x39342b)break;else _0x2b68c8['push'](_0x2b68c8['shift']());}catch(_0x46f329){_0x2b68c8['push'](_0x2b68c8['shift']());}}}(a1_0x571d,0xd7071));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x576350(0x1bd),'type':'string','description':a1_0x576350(0x1ca)},KEYWORD_FLAG={'name':a1_0x576350(0x1b5),'type':a1_0x576350(0x1d3),'description':a1_0x576350(0x181)},DOC_CODE_FLAG={'name':a1_0x576350(0x17b),'type':a1_0x576350(0x1d3),'required':!![],'description':a1_0x576350(0x1a3)},DOCS=[{'code':a1_0x576350(0x1e5),'category':a1_0x576350(0x1cc),'title':a1_0x576350(0x194),'method':'POST','path':a1_0x576350(0x1e7),'summary':a1_0x576350(0x1a7),'whenToUse':'需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x576350(0x1ba),'responseHighlights':[a1_0x576350(0x1b2),a1_0x576350(0x1dd)],'examples':[a1_0x576350(0x1d7)],'notes':[a1_0x576350(0x177)],'markdown':[a1_0x576350(0x1c9),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x576350(0x18f)]('\x0a')},{'code':a1_0x576350(0x17e),'category':a1_0x576350(0x1cc),'title':a1_0x576350(0x1c5),'method':a1_0x576350(0x1e6),'path':a1_0x576350(0x19a),'summary':a1_0x576350(0x1d8),'whenToUse':a1_0x576350(0x1c6),'pathParams':[],'queryParams':[{'name':a1_0x576350(0x17b),'description':'32-character\x20dataset\x20code'}],'bodySchema':'None','responseHighlights':[a1_0x576350(0x1d6),'relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x576350(0x195)],'examples':[a1_0x576350(0x1c3)],'notes':[a1_0x576350(0x1e1)],'markdown':[a1_0x576350(0x196),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x576350(0x18f)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x576350(0x1cc),'title':a1_0x576350(0x179),'method':a1_0x576350(0x1b6),'path':a1_0x576350(0x19e),'summary':a1_0x576350(0x1ad),'whenToUse':a1_0x576350(0x187),'pathParams':[{'name':a1_0x576350(0x1b8),'description':a1_0x576350(0x186)},{'name':'datasetCode','description':a1_0x576350(0x1cf)}],'queryParams':[],'bodySchema':a1_0x576350(0x18b),'responseHighlights':['tableData\x20contains\x20records',a1_0x576350(0x180)],'examples':[a1_0x576350(0x1a9)],'notes':[a1_0x576350(0x1d4)],'markdown':[a1_0x576350(0x1b3),'',a1_0x576350(0x185)][a1_0x576350(0x18f)]('\x0a')},{'code':a1_0x576350(0x1b9),'category':a1_0x576350(0x1cc),'title':a1_0x576350(0x1bb),'method':'POST','path':a1_0x576350(0x1e2),'summary':'聚合查询数据集数据','whenToUse':a1_0x576350(0x17c),'pathParams':[{'name':a1_0x576350(0x1b8),'description':a1_0x576350(0x186)},{'name':a1_0x576350(0x18d),'description':a1_0x576350(0x1cf)}],'queryParams':[],'bodySchema':a1_0x576350(0x1b4),'responseHighlights':[a1_0x576350(0x190),a1_0x576350(0x1b7)],'examples':[a1_0x576350(0x1bf)],'notes':[a1_0x576350(0x1c0),a1_0x576350(0x1de)],'markdown':[a1_0x576350(0x1be),'',a1_0x576350(0x1c7)][a1_0x576350(0x18f)]('\x0a')},{'code':a1_0x576350(0x1ae),'category':a1_0x576350(0x1cc),'title':a1_0x576350(0x1dc),'method':a1_0x576350(0x1b6),'path':a1_0x576350(0x18a),'summary':'查询单条数据','whenToUse':a1_0x576350(0x1aa),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x576350(0x18d),'description':a1_0x576350(0x1cf)}],'queryParams':[],'bodySchema':a1_0x576350(0x19c),'responseHighlights':[a1_0x576350(0x1c1)],'examples':[a1_0x576350(0x188)],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x576350(0x1b1)},{'code':a1_0x576350(0x198),'category':'dataset','title':'Create\x20dataset\x20record','method':a1_0x576350(0x1b6),'path':a1_0x576350(0x19b),'summary':a1_0x576350(0x193),'whenToUse':a1_0x576350(0x1d5),'pathParams':[{'name':a1_0x576350(0x1b8),'description':a1_0x576350(0x186)},{'name':a1_0x576350(0x18d),'description':a1_0x576350(0x1cf)}],'queryParams':[],'bodySchema':a1_0x576350(0x1c2),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x576350(0x176)],'markdown':a1_0x576350(0x183)},{'code':a1_0x576350(0x1a5),'category':'bf','title':a1_0x576350(0x1e0),'method':a1_0x576350(0x1e6),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x576350(0x1e4),'whenToUse':a1_0x576350(0x1ac),'pathParams':[{'name':a1_0x576350(0x1b8),'description':a1_0x576350(0x186)}],'queryParams':[],'bodySchema':a1_0x576350(0x17a),'responseHighlights':[a1_0x576350(0x1b0)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x576350(0x189)],'markdown':a1_0x576350(0x19f)},{'code':a1_0x576350(0x1cd),'category':'bf','title':a1_0x576350(0x1e8),'method':'POST','path':'/api/endpoint/{appCode}/{scriptName}','summary':a1_0x576350(0x1bc),'whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x576350(0x1b8),'description':a1_0x576350(0x186)},{'name':'scriptName','description':'Endpoint\x20function\x20name'}],'queryParams':[],'bodySchema':a1_0x576350(0x1c4),'responseHighlights':[a1_0x576350(0x1e3)],'examples':[a1_0x576350(0x184)],'notes':[a1_0x576350(0x17f)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x576350(0x1d9),'title':a1_0x576350(0x1d2),'method':'POST','path':a1_0x576350(0x18c),'summary':'执行自定义\x20SQL','whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x576350(0x1cb),'responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':[a1_0x576350(0x17d)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0x26ebb2){const _0x20103e=a1_0x576350;return{'code':_0x26ebb2[_0x20103e(0x17b)],'category':_0x26ebb2['category'],'method':_0x26ebb2['method'],'path':_0x26ebb2['path'],'summary':_0x26ebb2[_0x20103e(0x175)],'whenToUse':_0x26ebb2[_0x20103e(0x199)]};}function a1_0x571d(){const _0x158a26=['datasetCode','1733323mCGnXS','join','result\x20rows\x20contain\x20aggregate\x20aliases','trim','title','创建数据','List\x20datasets','operations\x20describes\x20runtime\x20APIs','##\x20Dataset\x20detail','2336118kHKxBJ','dataset_data_create','whenToUse','/api/dataset/getOneByCode?code={datasetCode}','/api/{appCode}/{datasetCode}/create','{\x22id\x22:123}','41750184YZhdyz','/api/{appCode}/{datasetCode}/filter','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','filter','includes','Show\x20runtime\x20API\x20documentation\x20by\x20code','API\x20doc\x20code,\x20for\x20example\x20dataset_list','read','bf_function_list','6135020XVASfn','分页获取数据集列表','list','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','detail','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','条件过滤查询数据','dataset_data_get_one','2489618FxYeCa','Returns\x20endpoint\x20functionName/id/description','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','tableData\x20contains\x20dataset\x20id/code/name','##\x20Filter\x20dataset\x20data','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','keyword','POST','where\x20filters\x20before\x20aggregation','appCode','dataset_data_aggregate','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','Aggregate\x20dataset\x20data','执行指定\x20BF\x20函数','category','##\x20Aggregate\x20dataset\x20data','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','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Returns\x20one\x20matching\x20business\x20record','{\x22fieldName\x22:\x22value\x22}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','{\x22param\x22:\x22value\x22}','Dataset\x20detail','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','length','##\x20List\x20datasets','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','dataset','bf_execute','str','32-character\x20dataset\x20code','find','2293956BwjRRp','Execute\x20custom\x20SQL','string','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','需要向指定数据集新增一条业务数据时使用','fields/properties\x20describe\x20data\x20shape','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','获取数据集详情','custom_sql','List\x20available\x20runtime\x20API\x20documentation\x20entries','api-doc','Get\x20one\x20dataset\x20record','paging.totalCount\x20gives\x20total\x20rows','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','5860730oBYJCV','List\x20BF\x20endpoint\x20functions','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','/api/{appCode}/{datasetCode}/aggregate','Returns\x20script\x20business\x20payload','获取应用下可调用的\x20BF\x20函数列表','dataset_list','GET','/api/dataset/get-dataset-list-by-app-code','Execute\x20BF\x20endpoint\x20function','summary','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','toLowerCase','Filter\x20dataset\x20data','None','code','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','dataset_detail','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','paging\x20contains\x20pagination','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','method','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Current\x20app\x20code','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','/api/{appCode}/{datasetCode}/getOne','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','/api/custom/executeSql'];a1_0x571d=function(){return _0x158a26;};return a1_0x571d();}export function listApiDocEntries(_0x5434b8={}){const _0x5bce=a1_0x576350,_0x53c07c=String(_0x5434b8[_0x5bce(0x1bd)]||'')[_0x5bce(0x191)](),_0x23628e=String(_0x5434b8[_0x5bce(0x1b5)]||'')[_0x5bce(0x191)]()[_0x5bce(0x178)]();return DOCS[_0x5bce(0x1a0)](_0x13d1df=>{const _0x1ac76e=_0x5bce;if(_0x53c07c&&_0x13d1df[_0x1ac76e(0x1bd)]!==_0x53c07c)return![];if(!_0x23628e)return!![];return[_0x13d1df[_0x1ac76e(0x17b)],_0x13d1df[_0x1ac76e(0x1bd)],_0x13d1df[_0x1ac76e(0x182)],_0x13d1df['path'],_0x13d1df[_0x1ac76e(0x175)],_0x13d1df[_0x1ac76e(0x199)],_0x13d1df[_0x1ac76e(0x192)]]['join']('\x20')[_0x1ac76e(0x178)]()[_0x1ac76e(0x1a1)](_0x23628e);})['map'](entrySummary);}export function getApiDocDetail(_0x5227b8){const _0x58ec26=a1_0x576350,_0x2d02a9=DOCS[_0x58ec26(0x1d0)](_0x3de5f5=>_0x3de5f5[_0x58ec26(0x17b)]===_0x5227b8);if(!_0x2d02a9)throw CliErrors['validation']('API\x20doc\x20code\x20not\x20found:\x20'+_0x5227b8);return{..._0x2d02a9};}function a1_0x5d3d(_0xdc1720,_0x56820d){_0xdc1720=_0xdc1720-0x175;const _0x571dc2=a1_0x571d();let _0x5d3df4=_0x571dc2[_0xdc1720];return _0x5d3df4;}const apiDocList={'service':'api-doc','command':a1_0x576350(0x1a8),'description':a1_0x576350(0x1da),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0xafd73f){const _0x5f2e7f=a1_0x576350,_0x4ae9bb=listApiDocEntries({'category':_0xafd73f[_0x5f2e7f(0x1ce)]('category'),'keyword':_0xafd73f[_0x5f2e7f(0x1ce)]('keyword')});return{'ok':!![],'data':{'total':_0x4ae9bb[_0x5f2e7f(0x1c8)],'items':_0x4ae9bb}};}},apiDocDetail={'service':a1_0x576350(0x1db),'command':a1_0x576350(0x1ab),'description':a1_0x576350(0x1a2),'risk':a1_0x576350(0x1a4),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x5746d3){const _0x26dfd8=a1_0x576350;return{'ok':!![],'data':getApiDocDetail(_0x5746d3[_0x26dfd8(0x1ce)](_0x26dfd8(0x17b)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x34217f,_0x1b89b4){const _0xb464be=a2_0x44c6,_0x1441b4=_0x34217f();while(!![]){try{const _0x14d79e=-parseInt(_0xb464be(0x177))/0x1+-parseInt(_0xb464be(0x185))/0x2*(-parseInt(_0xb464be(0x17a))/0x3)+parseInt(_0xb464be(0x175))/0x4+-parseInt(_0xb464be(0x179))/0x5+parseInt(_0xb464be(0x176))/0x6*(parseInt(_0xb464be(0x173))/0x7)+parseInt(_0xb464be(0x184))/0x8+parseInt(_0xb464be(0x181))/0x9;if(_0x14d79e===_0x1b89b4)break;else _0x1441b4['push'](_0x1441b4['shift']());}catch(_0x5bf9b6){_0x1441b4['push'](_0x1441b4['shift']());}}}(a2_0x2d53,0xb7888));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x44c6(_0x4e550a,_0x2bf1a7){_0x4e550a=_0x4e550a-0x171;const _0x2d5314=a2_0x2d53();let _0x44c6d8=_0x2d5314[_0x4e550a];return _0x44c6d8;}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function a2_0x2d53(){const _0x58af55=['utf8','3238529PjEGjp','trim','3147580nGkTsX','6YNRcpV','1435830YSuqHH','sha256','4952130zvUsRx','96357kuVFyb','EXDEV','my-apps.json','cache','EPERM','appCode','slice','9045423GhDkjw','update','code','5588688JoPufx','14MyPgBY','appName','hex','find','stringify','digest','homeDirName'];a2_0x2d53=function(){return _0x58af55;};return a2_0x2d53();}import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0xa3b72){const _0x4f732e=a2_0x44c6,_0x40a913=_0xa3b72[_0x4f732e(0x174)](),_0x7b1baa=_0x40a913[_0x4f732e(0x180)](-0x6)||'unknown',_0x1ea462=createHash(_0x4f732e(0x178))[_0x4f732e(0x182)](_0x40a913)[_0x4f732e(0x18a)](_0x4f732e(0x187))['slice'](0x0,0xc);return'ak_'+_0x7b1baa+'_'+_0x1ea462;}export function getAppCacheFilePath(_0xd929a7,_0x2addfb){const _0x920de7=a2_0x44c6;return resolve(homedir(),PRODUCT_CONFIG[_0x920de7(0x171)],_0x920de7(0x17d),_0xd929a7,fingerprintAccessKey(_0x2addfb),_0x920de7(0x17c));}export function readCachedAppList(_0x339db4,_0x2f643e){const _0x3d4b16=a2_0x44c6;if(!_0x2f643e?.[_0x3d4b16(0x174)]())return null;const _0x4ec822=getAppCacheFilePath(_0x339db4,_0x2f643e);if(!existsSync(_0x4ec822))return null;try{const _0x3f30ea=readFileSync(_0x4ec822,_0x3d4b16(0x172));if(!_0x3f30ea[_0x3d4b16(0x174)]())return null;const _0xc245a7=JSON['parse'](_0x3f30ea);if(!Array['isArray'](_0xc245a7['items']))return null;return _0xc245a7;}catch{return null;}}export function writeCachedAppList(_0x14febf,_0x5a3f7b,_0x5bc8e7){const _0x56d27b=a2_0x44c6,_0x51e828=getAppCacheFilePath(_0x14febf,_0x5a3f7b),_0x444f80=dirname(_0x51e828);!existsSync(_0x444f80)&&mkdirSync(_0x444f80,{'recursive':!![]});const _0x2769ba=_0x51e828+'.tmp';try{writeFileSync(_0x2769ba,JSON[_0x56d27b(0x189)](_0x5bc8e7,null,0x2)+'\x0a',{'encoding':_0x56d27b(0x172),'mode':0x180});try{renameSync(_0x2769ba,_0x51e828);}catch(_0xc389d3){if(_0xc389d3[_0x56d27b(0x183)]===_0x56d27b(0x17e)||_0xc389d3[_0x56d27b(0x183)]===_0x56d27b(0x17b)||_0xc389d3[_0x56d27b(0x183)]==='EACCES'){writeFileSync(_0x51e828,JSON['stringify'](_0x5bc8e7,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x2769ba);}catch{}}else throw _0xc389d3;}}catch(_0x222922){try{unlinkSync(_0x2769ba);}catch{}throw _0x222922;}return _0x51e828;}export function resolveCachedAppCode(_0x393a61,_0x4da256,_0x4bae06){const _0x69b720=a2_0x44c6;if(!_0x393a61)return undefined;const _0x3ffe46=readCachedAppList(_0x4da256,_0x4bae06),_0x4ace3c=_0x3ffe46?.['items'][_0x69b720(0x188)](_0xeee265=>_0xeee265[_0x69b720(0x186)]===_0x393a61&&isRuntimeAccessibleApp(_0xeee265));return _0x4ace3c?.[_0x69b720(0x17f)]?.[_0x69b720(0x174)]()||undefined;}
1
+ (function(_0x2ddd45,_0x196939){const _0x4446be=a2_0x1c7f,_0x579549=_0x2ddd45();while(!![]){try{const _0x325f35=-parseInt(_0x4446be(0xe8))/0x1*(-parseInt(_0x4446be(0xe1))/0x2)+parseInt(_0x4446be(0xed))/0x3+-parseInt(_0x4446be(0xe3))/0x4+parseInt(_0x4446be(0xf8))/0x5+-parseInt(_0x4446be(0xfa))/0x6*(parseInt(_0x4446be(0xec))/0x7)+-parseInt(_0x4446be(0xf5))/0x8+parseInt(_0x4446be(0xfc))/0x9*(parseInt(_0x4446be(0xe9))/0xa);if(_0x325f35===_0x196939)break;else _0x579549['push'](_0x579549['shift']());}catch(_0x7f924e){_0x579549['push'](_0x579549['shift']());}}}(a2_0x3e7d,0xca048));import{createHash}from'node:crypto';function a2_0x1c7f(_0x2a5b92,_0x4ae7b6){_0x2a5b92=_0x2a5b92-0xe0;const _0x3e7dcc=a2_0x3e7d();let _0x1c7fdb=_0x3e7dcc[_0x2a5b92];return _0x1c7fdb;}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(_0x57fe9a){const _0x37adc3=a2_0x1c7f,_0x1f92cd=_0x57fe9a[_0x37adc3(0xfb)](),_0x8581d6=_0x1f92cd[_0x37adc3(0xeb)](-0x6)||_0x37adc3(0xf3),_0x46c64f=createHash(_0x37adc3(0xfe))[_0x37adc3(0xe5)](_0x1f92cd)[_0x37adc3(0xf2)](_0x37adc3(0xf6))[_0x37adc3(0xeb)](0x0,0xc);return _0x37adc3(0xe2)+_0x8581d6+'_'+_0x46c64f;}export function getAppCacheFilePath(_0x3c0d6b,_0x4f65b2){const _0x50731e=a2_0x1c7f;return resolve(homedir(),PRODUCT_CONFIG[_0x50731e(0xf7)],_0x50731e(0xf9),_0x3c0d6b,fingerprintAccessKey(_0x4f65b2),'my-apps.json');}export function readCachedAppList(_0x1fdafe,_0x422af8){const _0x4bacfa=a2_0x1c7f;if(!_0x422af8?.['trim']())return null;const _0x1b71e3=getAppCacheFilePath(_0x1fdafe,_0x422af8);if(!existsSync(_0x1b71e3))return null;try{const _0x46e08c=readFileSync(_0x1b71e3,_0x4bacfa(0xef));if(!_0x46e08c['trim']())return null;const _0x46b7d8=JSON[_0x4bacfa(0xea)](_0x46e08c);if(!Array['isArray'](_0x46b7d8[_0x4bacfa(0xe7)]))return null;return _0x46b7d8;}catch{return null;}}function a2_0x3e7d(){const _0x21897c=['unknown','find','10339312GVQonZ','hex','homeDirName','1848605CccTRG','cache','1325238nUvEff','trim','5913ifMwpE','EXDEV','sha256','code','3284350GhOBHl','ak_','1197260eBDkDa','EPERM','update','appCode','items','1GqNCCg','12280mYFNwX','parse','slice','49upxeeu','3439836rXvuWh','EACCES','utf8','stringify','.tmp','digest'];a2_0x3e7d=function(){return _0x21897c;};return a2_0x3e7d();}export function writeCachedAppList(_0x3502fa,_0x55c368,_0x4deb57){const _0x229e26=a2_0x1c7f,_0x3eb320=getAppCacheFilePath(_0x3502fa,_0x55c368),_0x16374d=dirname(_0x3eb320);!existsSync(_0x16374d)&&mkdirSync(_0x16374d,{'recursive':!![]});const _0xeffdcc=_0x3eb320+_0x229e26(0xf1);try{writeFileSync(_0xeffdcc,JSON[_0x229e26(0xf0)](_0x4deb57,null,0x2)+'\x0a',{'encoding':_0x229e26(0xef),'mode':0x180});try{renameSync(_0xeffdcc,_0x3eb320);}catch(_0x3f0896){if(_0x3f0896[_0x229e26(0xe0)]===_0x229e26(0xe4)||_0x3f0896['code']===_0x229e26(0xfd)||_0x3f0896['code']===_0x229e26(0xee)){writeFileSync(_0x3eb320,JSON[_0x229e26(0xf0)](_0x4deb57,null,0x2)+'\x0a',{'encoding':_0x229e26(0xef)});try{unlinkSync(_0xeffdcc);}catch{}}else throw _0x3f0896;}}catch(_0x5ddeb3){try{unlinkSync(_0xeffdcc);}catch{}throw _0x5ddeb3;}return _0x3eb320;}export function resolveCachedAppCode(_0x1e1e09,_0x5830c6,_0x11bdea){const _0x219d82=a2_0x1c7f;if(!_0x1e1e09)return undefined;const _0x3a45f1=readCachedAppList(_0x5830c6,_0x11bdea),_0x218226=_0x3a45f1?.[_0x219d82(0xe7)][_0x219d82(0xf4)](_0x5c0d42=>_0x5c0d42['appName']===_0x1e1e09&&isRuntimeAccessibleApp(_0x5c0d42));return _0x218226?.[_0x219d82(0xe6)]?.[_0x219d82(0xfb)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x415a15=a3_0x353c;(function(_0x39376d,_0x20ccf5){const _0xaa309d=a3_0x353c,_0x2cd64e=_0x39376d();while(!![]){try{const _0x20a398=-parseInt(_0xaa309d(0x100))/0x1*(parseInt(_0xaa309d(0x121))/0x2)+-parseInt(_0xaa309d(0x136))/0x3*(parseInt(_0xaa309d(0x120))/0x4)+-parseInt(_0xaa309d(0x11d))/0x5*(parseInt(_0xaa309d(0x10a))/0x6)+parseInt(_0xaa309d(0x14e))/0x7*(-parseInt(_0xaa309d(0xff))/0x8)+-parseInt(_0xaa309d(0x113))/0x9+parseInt(_0xaa309d(0x118))/0xa*(-parseInt(_0xaa309d(0x12e))/0xb)+parseInt(_0xaa309d(0xfa))/0xc*(parseInt(_0xaa309d(0x149))/0xd);if(_0x20a398===_0x20ccf5)break;else _0x2cd64e['push'](_0x2cd64e['shift']());}catch(_0x13deb3){_0x2cd64e['push'](_0x2cd64e['shift']());}}}(a3_0x4855,0xa7344));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';function a3_0x4855(){const _0x513ae9=['trim','langs','entries','cachePath','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','6131313RpgJGp','globalPath','items','projectPath','i18nInfo','397780uLrxQT','local','production','envName','Missing\x20app\x20name.','357965FqCPrS','appcode','init','314428Jgxuno','2704222oGMtMd','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','map','appName','appPublishStatus','read','validation','App\x20\x22','boolean','string','Available\x20remote\x20apps:\x20','filter','enableI18n','275zUeALS','defaultApp','\x20cached\x20app(s)\x20for\x20env=\x22','isArray','.appcode\x20to\x20.lovrabet.json.','Include\x20unpublished\x20apps\x20for\x20diagnostics','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','appCode','15ihKAjM','env','length','use','\x20app(s)\x20for\x20env=\x22','bool','no-cache','args','app','find','config','include-unpublished','Read\x20from\x20local\x20cache\x20only','isCurrent','join','warn','No\x20cached\x20apps\x20found.','Usage:\x20','type','466232ySVbPn','nonInteractive','\x20app\x20use\x20<name>\x20[--global]','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','../../commands/app/remote-source.js','49231pqLhuD','project-default','write','Remote\x20app\x20name\x20to\x20activate','name','fetchedAt','Loaded\x20','No\x20apps\x20found\x20on\x20the\x20platform.','2088ZrLdct','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','pull','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','import','1288LsJoXh','1RPvDhP','accessKey','str','global','source','\x20app\x20','mergedCli','`\x20instead.','../../commands/app/cache.js','../../context.js','84WKDULU','Filter\x20by\x20environment\x20(default:\x20current\x20env)','list','appOwnerName'];a3_0x4855=function(){return _0x513ae9;};return a3_0x4855();}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':'global','type':a3_0x415a15(0x129),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x4f5a69,_0x5e6e1c){const _0xd25d46=a3_0x415a15,_0x3d3ac3={};for(const _0x2b0edc of _0x5e6e1c){const _0x30a3d8=_0x2b0edc[_0xd25d46(0x148)]==='boolean'?_0x4f5a69[_0xd25d46(0x13b)](_0x2b0edc[_0xd25d46(0xf6)]):_0x4f5a69[_0xd25d46(0x102)](_0x2b0edc['name']);if(_0x30a3d8!==''&&_0x30a3d8!==![])_0x3d3ac3[_0x2b0edc[_0xd25d46(0xf6)]]=_0x30a3d8;}if(_0x4f5a69[_0xd25d46(0x14a)])_0x3d3ac3[_0xd25d46(0x14a)]=!![];return _0x3d3ac3;}function a3_0x353c(_0x27fc1d,_0x5df5a2){_0x27fc1d=_0x27fc1d-0xf4;const _0x485579=a3_0x4855();let _0x353cd7=_0x485579[_0x27fc1d];return _0x353cd7;}function normalizeLanguages(_0x57ea32){const _0x365519=a3_0x415a15;if(!Array[_0x365519(0x131)](_0x57ea32))return[];return _0x57ea32[_0x365519(0x12c)](_0x4a4f3c=>typeof _0x4a4f3c===_0x365519(0x12a))[_0x365519(0x123)](_0x166dc3=>_0x166dc3[_0x365519(0x10e)]())[_0x365519(0x12c)](Boolean);}function buildRemoteAppI18nFields(_0x3df984){const _0x578d8b=a3_0x415a15,_0x5777b2=normalizeLanguages(_0x3df984[_0x578d8b(0x117)]?.[_0x578d8b(0x10f)]);return{'enableI18n':typeof _0x3df984[_0x578d8b(0x12d)]===_0x578d8b(0x129)?_0x3df984[_0x578d8b(0x12d)]:null,'languages':_0x5777b2,'i18nInfo':_0x3df984[_0x578d8b(0x117)]?{..._0x3df984[_0x578d8b(0x117)],'langs':_0x5777b2['length']?_0x5777b2:null}:null};}const initDef={'service':a3_0x415a15(0x13e),'command':a3_0x415a15(0x11f),'description':a3_0x415a15(0x14c),'risk':a3_0x415a15(0xf4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x39cd44){const _0x3a8ae3=a3_0x415a15;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x3a8ae3(0xfb)),await runInit(collectFlags(_0x39cd44,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x415a15(0x13e),'command':a3_0x415a15(0x10c),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x415a15(0x126),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x415a15(0x137),'type':'string','description':a3_0x415a15(0x10b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x415a15(0x119),'type':a3_0x415a15(0x129),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x415a15(0x13c),'type':a3_0x415a15(0x129),'description':a3_0x415a15(0x134),'default':![]},{'name':a3_0x415a15(0x141),'type':a3_0x415a15(0x129),'description':a3_0x415a15(0x133),'default':![]}],async 'execute'(_0x24ddc5){const _0x5d1255=a3_0x415a15,_0x33cdd0=_0x24ddc5[_0x5d1255(0x102)](_0x5d1255(0x137))||_0x24ddc5[_0x5d1255(0x11b)]||getEnv()||'production',_0x1f6898=_0x24ddc5[_0x5d1255(0x13b)](_0x5d1255(0x119)),_0x154b8a=_0x24ddc5['bool'](_0x5d1255(0x13c)),_0x490a84=_0x24ddc5['bool'](_0x5d1255(0x141)),{readRawConfigWithLayers:_0x28a157,resolveDefaultAppSource:_0x5f717d,getLocalAppAliases:_0x1c8508}=await import('../../context.js'),{getRemoteAppList:_0x48b894}=await import(_0x5d1255(0x14d)),{config:_0x451342,layers:_0x2a5fdd}=_0x28a157(),_0x4e0929=_0x5f717d(_0x2a5fdd),{defaultApp:_0x2adb27}=_0x451342,_0x3dbfd7=await _0x48b894({'env':_0x33cdd0,'accessKey':_0x24ddc5[_0x5d1255(0x101)],'localOnly':_0x1f6898,'noCache':_0x154b8a}),_0x52a58a=_0x490a84?_0x3dbfd7['items']:filterRuntimeAccessibleApps(_0x3dbfd7[_0x5d1255(0x115)]),_0x46bece=_0x3dbfd7[_0x5d1255(0x115)][_0x5d1255(0x138)]-_0x52a58a['length'],_0x4aa41f=_0x52a58a[_0x5d1255(0x123)](_0x13c55e=>{const _0x2c1ff0=_0x5d1255;return{'name':_0x13c55e[_0x2c1ff0(0x124)],'appcode':_0x13c55e['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x13c55e['appName']===_0x2adb27,...buildAppProfileListFields(_0x33cdd0),...buildRemoteAppI18nFields(_0x13c55e),'source':_0x3dbfd7['source'],'owner':_0x13c55e[_0x2c1ff0(0x10d)]??null,'status':_0x13c55e[_0x2c1ff0(0x125)]??null,'cachedAt':_0x3dbfd7[_0x2c1ff0(0xf7)]};}),_0x96d97=_0x1c8508(_0x451342);let _0x19ce31=0x0;for(const [_0xb7cf92,_0x2d893e]of Object[_0x5d1255(0x110)](_0x96d97)){const _0x2f399a=typeof _0x2d893e[_0x5d1255(0x11e)]===_0x5d1255(0x12a)?_0x2d893e[_0x5d1255(0x11e)]['trim']():'';if(!_0x2f399a)continue;const _0x36aa10=findAppByCode(_0x3dbfd7[_0x5d1255(0x115)],_0x2f399a);if(!_0x490a84&&_0x36aa10&&!isRuntimeAccessibleApp(_0x36aa10))continue;_0x19ce31+=0x1,_0x4aa41f['push']({'name':_0xb7cf92,'appcode':_0x2f399a,'named':!![],'definedIn':_0x5d1255(0x119),'isDefault':_0xb7cf92===_0x2adb27,...buildAppProfileListFields(_0x33cdd0),'source':_0x5d1255(0x140),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4aa41f,_0x24ddc5[_0x5d1255(0x106)]);const _0x30867d=_0x4aa41f['find'](_0x40e47c=>_0x40e47c[_0x5d1255(0x143)]===!![]),_0x26aa21=_0x2adb27??_0x30867d?.[_0x5d1255(0xf6)]??null,_0x4a0d92={'env':_0x33cdd0,'source':_0x3dbfd7[_0x5d1255(0x104)],'fetchedAt':_0x3dbfd7[_0x5d1255(0xf7)],'cachePath':_0x3dbfd7[_0x5d1255(0x111)],'globalPath':_0x2a5fdd[_0x5d1255(0x114)]??null,'projectPath':_0x2a5fdd[_0x5d1255(0x116)]??null,'defaultApp':_0x26aa21,'defaultAppSource':_0x2adb27!=null?_0x4e0929:null,'localAliasCount':_0x19ce31,'remoteTotal':_0x3dbfd7['items']['length'],'hiddenUnpublishedCount':_0x46bece,'includeUnpublished':_0x490a84};if(_0x4aa41f['length']===0x0)return{'ok':!![],'data':{'items':_0x4aa41f,'meta':_0x4a0d92},'message':_0x3dbfd7[_0x5d1255(0x104)]==='cache'?_0x5d1255(0x146):_0x5d1255(0xf9)};return{'ok':!![],'data':{'items':_0x4aa41f,'meta':_0x4a0d92}};}},pullDef={'service':a3_0x415a15(0x13e),'command':a3_0x415a15(0xfc),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x415a15(0x12a),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x415a15(0x119),'type':a3_0x415a15(0x129),'description':a3_0x415a15(0x142),'default':![]},{'name':'no-cache','type':a3_0x415a15(0x129),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x589f2a){const _0x4944c6=a3_0x415a15,_0x16d3c5=_0x589f2a[_0x4944c6(0x102)](_0x4944c6(0x137))||_0x589f2a['envName']||getEnv()||_0x4944c6(0x11a),_0x4fdbcd=_0x589f2a[_0x4944c6(0x13b)]('local'),_0x5695f0=_0x589f2a[_0x4944c6(0x13b)](_0x4944c6(0x13c)),{getRemoteAppList:_0x4f950e}=await import(_0x4944c6(0x14d)),_0x1ee976=await _0x4f950e({'env':_0x16d3c5,'accessKey':_0x589f2a[_0x4944c6(0x101)],'localOnly':_0x4fdbcd,'noCache':_0x5695f0});return{'ok':!![],'data':{'total':_0x1ee976[_0x4944c6(0x115)][_0x4944c6(0x138)],'env':_0x16d3c5,'source':_0x1ee976[_0x4944c6(0x104)],'fetchedAt':_0x1ee976[_0x4944c6(0xf7)],'cachePath':_0x1ee976['cachePath']},'message':_0x1ee976[_0x4944c6(0x104)]==='cache'?_0x4944c6(0xf8)+_0x1ee976['items'][_0x4944c6(0x138)]+_0x4944c6(0x130)+_0x16d3c5+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x1ee976[_0x4944c6(0x115)]['length']+_0x4944c6(0x13a)+_0x16d3c5+'\x22.'};}},useDef={'service':'app','command':a3_0x415a15(0x139),'description':a3_0x415a15(0x122),'risk':a3_0x415a15(0xf4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x415a15(0xf5),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x118d39){const _0x339931=a3_0x415a15;if(!_0x118d39[_0x339931(0x13d)][0x0])throw CliErrors[_0x339931(0x127)](_0x339931(0x11c),'Usage:\x20'+CLI_BIN_NAME+_0x339931(0x14b));},async 'execute'(_0xe60ad0){const _0x1bd7a8=a3_0x415a15;warnDeprecatedAppCommand(_0x1bd7a8(0x139),CLI_BIN_NAME+_0x1bd7a8(0x112));const _0x658409=_0xe60ad0[_0x1bd7a8(0x13d)][0x0];if(!_0x658409)throw CliErrors[_0x1bd7a8(0x127)](_0x1bd7a8(0x11c),_0x1bd7a8(0x147)+CLI_BIN_NAME+_0x1bd7a8(0x14b));const {buildConfigFromFlags:_0xc802e1,resolveLocalAppAliasCode:_0x230b3d}=await import(_0x1bd7a8(0x109)),{readCachedAppList:_0x3ad468}=await import(_0x1bd7a8(0x108)),_0x47e783=_0xe60ad0[_0x1bd7a8(0x102)](_0x1bd7a8(0x137)),_0x3b1428=_0xc802e1(_0x47e783?{'env':_0x47e783}:{}),_0x1631c6=_0x3ad468(_0x3b1428[_0x1bd7a8(0x137)],_0x3b1428['accessKey']),_0x2f1d96=_0x1631c6?.[_0x1bd7a8(0x115)][_0x1bd7a8(0x13f)](_0x2a5474=>_0x2a5474[_0x1bd7a8(0x124)]===_0x658409),_0x2165ee=_0x230b3d(_0x3b1428['raw']??{},_0x658409);if(_0x2f1d96&&!isRuntimeAccessibleApp(_0x2f1d96))throw runtimeInaccessibleAppError(_0x2f1d96,'\x22'+_0x658409+'\x22');if(_0x2165ee){const _0x4c4f73=_0x1631c6?.['items'][_0x1bd7a8(0x13f)](_0x470f99=>_0x470f99[_0x1bd7a8(0x135)]?.[_0x1bd7a8(0x10e)]()===_0x2165ee);if(_0x4c4f73&&!isRuntimeAccessibleApp(_0x4c4f73))throw runtimeInaccessibleAppError(_0x4c4f73,'\x22'+_0x658409+'\x22');}if(!_0x2f1d96&&!_0x2165ee&&_0x3b1428[_0x1bd7a8(0x12f)]!==_0x658409){const _0x573c75=[..._0x1631c6?.['items'][_0x1bd7a8(0x123)](_0x3c55a1=>_0x3c55a1[_0x1bd7a8(0x124)])??[]],_0x214c56=_0x573c75['length']===0x0?'Use\x20`'+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x658409+_0x1bd7a8(0x132):_0x1bd7a8(0x12b)+Array['from'](new Set(_0x573c75))[_0x1bd7a8(0x144)](',\x20')+_0x1bd7a8(0xfd);throw CliErrors['validation'](_0x1bd7a8(0x128)+_0x658409+'\x22\x20not\x20found.',_0x214c56);}const _0x384f5e=_0xe60ad0[_0x1bd7a8(0x13b)](_0x1bd7a8(0x103));let _0x258151;if(_0x384f5e)_0x258151={'global':!![]};else{const {isInProject:_0xb6c9d2}=await import(_0x1bd7a8(0x109)),_0x413352=_0xb6c9d2();_0x258151=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x1bd7a8(0x14f),'inProject':_0x413352}));}const _0x559b9c=readConfig(_0x258151);return _0x559b9c[_0x1bd7a8(0x12f)]=_0x658409,writeConfig(_0x559b9c,_0x258151),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x658409+'\x22'+scopeLabel(_0x258151)+'.'};}};function warnDeprecatedAppCommand(_0x5c19b5,_0x3f8d51){const _0x37d2e4=a3_0x415a15;console[_0x37d2e4(0x145)](CLI_BIN_NAME+_0x37d2e4(0x105)+_0x5c19b5+'\x20is\x20deprecated.\x20Use\x20`'+_0x3f8d51+_0x37d2e4(0x107));}const importDef={'service':a3_0x415a15(0x13e),'command':a3_0x415a15(0xfe),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x415a15(0xf4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x45e9ba){return await runInitImport(collectFlags(_0x45e9ba,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x5ebc88=a3_0x3f5d;(function(_0x256e31,_0x534a22){const _0x32b4f7=a3_0x3f5d,_0x5c5290=_0x256e31();while(!![]){try{const _0x28ae4e=-parseInt(_0x32b4f7(0x1e0))/0x1*(parseInt(_0x32b4f7(0x1d8))/0x2)+-parseInt(_0x32b4f7(0x1e9))/0x3*(-parseInt(_0x32b4f7(0x1f7))/0x4)+parseInt(_0x32b4f7(0x210))/0x5+-parseInt(_0x32b4f7(0x1ee))/0x6*(-parseInt(_0x32b4f7(0x20c))/0x7)+-parseInt(_0x32b4f7(0x21c))/0x8+parseInt(_0x32b4f7(0x211))/0x9+parseInt(_0x32b4f7(0x218))/0xa;if(_0x28ae4e===_0x534a22)break;else _0x5c5290['push'](_0x5c5290['shift']());}catch(_0x403427){_0x5c5290['push'](_0x5c5290['shift']());}}}(a3_0x3e39,0xc2c29));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';function a3_0x3e39(){const _0x514775=['Filter\x20by\x20environment\x20(default:\x20current\x20env)','env','9704112TzOZsa','app','Usage:\x20','project-default','\x20app\x20use\x20<name>\x20[--global]','globalPath','defaultApp','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','accessKey','find','nonInteractive','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','list','include-unpublished','No\x20apps\x20found\x20on\x20the\x20platform.','\x22\x20not\x20found.','push','config','appOwnerName','production','45340sHEerq','import','source','mergedCli','envName','cache','langs','../../context.js','10nKvnMC','bool','fetchedAt','../../commands/app/remote-source.js','length','raw','entries','local','\x20app\x20','1974309bGiXpN','enableI18n','cachePath','isArray','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','132EhOfpG','no-cache','.appcode\x20to\x20.lovrabet.json.','init','projectPath','write','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','global','\x20cached\x20app(s)\x20for\x20env=\x22','8spvyxq','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','Loaded\x20','\x20is\x20deprecated.\x20Use\x20`','i18nInfo','join','boolean','../../commands/app/cache.js','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','type','No\x20cached\x20apps\x20found.','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','read','map','items','warn','validation','Missing\x20app\x20name.','name','appName','154861TIIYiI','\x20app(s)\x20for\x20env=\x22','trim','string','99275ZHdprl','3233700KxmGQs','from','Use\x20global\x20config\x20scope','filter','str','use','args','553840cLoMNW','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app'];a3_0x3e39=function(){return _0x514775;};return a3_0x3e39();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':a3_0x5ebc88(0x1f5),'type':a3_0x5ebc88(0x1fe),'description':a3_0x5ebc88(0x213),'default':![]};function collectFlags(_0x2f1b3f,_0x368461){const _0x480a6b=a3_0x5ebc88,_0x4fc537={};for(const _0x135e09 of _0x368461){const _0x5ce0d0=_0x135e09[_0x480a6b(0x201)]===_0x480a6b(0x1fe)?_0x2f1b3f[_0x480a6b(0x1e1)](_0x135e09['name']):_0x2f1b3f['str'](_0x135e09[_0x480a6b(0x20a)]);if(_0x5ce0d0!==''&&_0x5ce0d0!==![])_0x4fc537[_0x135e09[_0x480a6b(0x20a)]]=_0x5ce0d0;}if(_0x2f1b3f[_0x480a6b(0x226)])_0x4fc537[_0x480a6b(0x226)]=!![];return _0x4fc537;}function normalizeLanguages(_0x93b10b){const _0x16a1f9=a3_0x5ebc88;if(!Array[_0x16a1f9(0x1ec)](_0x93b10b))return[];return _0x93b10b[_0x16a1f9(0x214)](_0x4561b0=>typeof _0x4561b0===_0x16a1f9(0x20f))[_0x16a1f9(0x205)](_0x3788db=>_0x3788db[_0x16a1f9(0x20e)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x2d28f1){const _0x5898f7=a3_0x5ebc88,_0x39f55e=normalizeLanguages(_0x2d28f1[_0x5898f7(0x1fc)]?.[_0x5898f7(0x1de)]);return{'enableI18n':typeof _0x2d28f1['enableI18n']==='boolean'?_0x2d28f1[_0x5898f7(0x1ea)]:null,'languages':_0x39f55e,'i18nInfo':_0x2d28f1[_0x5898f7(0x1fc)]?{..._0x2d28f1[_0x5898f7(0x1fc)],'langs':_0x39f55e['length']?_0x39f55e:null}:null};}const initDef={'service':a3_0x5ebc88(0x21d),'command':a3_0x5ebc88(0x1f1),'description':a3_0x5ebc88(0x219),'risk':a3_0x5ebc88(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x5b239e){const _0x490789=a3_0x5ebc88;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x490789(0x1ed)),await runInit(collectFlags(_0x5b239e,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x5ebc88(0x21d),'command':a3_0x5ebc88(0x228),'description':a3_0x5ebc88(0x1f8),'risk':a3_0x5ebc88(0x204),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a3_0x5ebc88(0x20f),'description':a3_0x5ebc88(0x21a),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5ebc88(0x1e7),'type':'boolean','description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x5ebc88(0x1ef),'type':a3_0x5ebc88(0x1fe),'description':a3_0x5ebc88(0x1f4),'default':![]},{'name':a3_0x5ebc88(0x229),'type':a3_0x5ebc88(0x1fe),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x2fbf84){const _0x442ff1=a3_0x5ebc88,_0x23916f=_0x2fbf84[_0x442ff1(0x215)](_0x442ff1(0x21b))||_0x2fbf84[_0x442ff1(0x1dc)]||getEnv()||_0x442ff1(0x22f),_0x59b8d3=_0x2fbf84[_0x442ff1(0x1e1)](_0x442ff1(0x1e7)),_0x313c43=_0x2fbf84[_0x442ff1(0x1e1)](_0x442ff1(0x1ef)),_0xc344b7=_0x2fbf84[_0x442ff1(0x1e1)]('include-unpublished'),{readRawConfigWithLayers:_0x317f91,resolveDefaultAppSource:_0x1e869d,getLocalAppAliases:_0x462475}=await import(_0x442ff1(0x1df)),{getRemoteAppList:_0x2608fa}=await import('../../commands/app/remote-source.js'),{config:_0x4b5414,layers:_0x367ba0}=_0x317f91(),_0x4e3745=_0x1e869d(_0x367ba0),{defaultApp:_0x7141a0}=_0x4b5414,_0x5ea368=await _0x2608fa({'env':_0x23916f,'accessKey':_0x2fbf84['accessKey'],'localOnly':_0x59b8d3,'noCache':_0x313c43}),_0x10e042=_0xc344b7?_0x5ea368['items']:filterRuntimeAccessibleApps(_0x5ea368[_0x442ff1(0x206)]),_0x3c9e70=_0x5ea368['items'][_0x442ff1(0x1e4)]-_0x10e042[_0x442ff1(0x1e4)],_0x5c0378=_0x10e042[_0x442ff1(0x205)](_0x231a9b=>{const _0x5e2b7c=_0x442ff1;return{'name':_0x231a9b['appName'],'appcode':_0x231a9b['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x231a9b[_0x5e2b7c(0x20b)]===_0x7141a0,...buildAppProfileListFields(_0x23916f),...buildRemoteAppI18nFields(_0x231a9b),'source':_0x5ea368[_0x5e2b7c(0x1da)],'owner':_0x231a9b[_0x5e2b7c(0x22e)]??null,'status':_0x231a9b['appPublishStatus']??null,'cachedAt':_0x5ea368[_0x5e2b7c(0x1e2)]};}),_0x20bd6d=_0x462475(_0x4b5414);let _0x5dbb23=0x0;for(const [_0x344df9,_0xeea3e5]of Object[_0x442ff1(0x1e6)](_0x20bd6d)){const _0x31bd2c=typeof _0xeea3e5['appcode']===_0x442ff1(0x20f)?_0xeea3e5['appcode'][_0x442ff1(0x20e)]():'';if(!_0x31bd2c)continue;const _0xb3815=findAppByCode(_0x5ea368[_0x442ff1(0x206)],_0x31bd2c);if(!_0xc344b7&&_0xb3815&&!isRuntimeAccessibleApp(_0xb3815))continue;_0x5dbb23+=0x1,_0x5c0378[_0x442ff1(0x22c)]({'name':_0x344df9,'appcode':_0x31bd2c,'named':!![],'definedIn':_0x442ff1(0x1e7),'isDefault':_0x344df9===_0x7141a0,...buildAppProfileListFields(_0x23916f),'source':_0x442ff1(0x22d),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5c0378,_0x2fbf84[_0x442ff1(0x1db)]);const _0x43d972=_0x5c0378[_0x442ff1(0x225)](_0x3a5b37=>_0x3a5b37['isCurrent']===!![]),_0x2c8e71=_0x7141a0??_0x43d972?.[_0x442ff1(0x20a)]??null,_0x320fa0={'env':_0x23916f,'source':_0x5ea368[_0x442ff1(0x1da)],'fetchedAt':_0x5ea368[_0x442ff1(0x1e2)],'cachePath':_0x5ea368[_0x442ff1(0x1eb)],'globalPath':_0x367ba0[_0x442ff1(0x221)]??null,'projectPath':_0x367ba0[_0x442ff1(0x1f2)]??null,'defaultApp':_0x2c8e71,'defaultAppSource':_0x7141a0!=null?_0x4e3745:null,'localAliasCount':_0x5dbb23,'remoteTotal':_0x5ea368[_0x442ff1(0x206)]['length'],'hiddenUnpublishedCount':_0x3c9e70,'includeUnpublished':_0xc344b7};if(_0x5c0378['length']===0x0)return{'ok':!![],'data':{'items':_0x5c0378,'meta':_0x320fa0},'message':_0x5ea368[_0x442ff1(0x1da)]===_0x442ff1(0x1dd)?_0x442ff1(0x202):_0x442ff1(0x22a)};return{'ok':!![],'data':{'items':_0x5c0378,'meta':_0x320fa0}};}},pullDef={'service':a3_0x5ebc88(0x21d),'command':'pull','description':a3_0x5ebc88(0x1f9),'risk':a3_0x5ebc88(0x1f3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x5ebc88(0x21b),'type':'string','description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x5ebc88(0x1fe),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x5ebc88(0x1ef),'type':'boolean','description':a3_0x5ebc88(0x1f4),'default':![]}],async 'execute'(_0x3470b4){const _0x255207=a3_0x5ebc88,_0x5cc127=_0x3470b4[_0x255207(0x215)](_0x255207(0x21b))||_0x3470b4[_0x255207(0x1dc)]||getEnv()||_0x255207(0x22f),_0x31dd4a=_0x3470b4[_0x255207(0x1e1)](_0x255207(0x1e7)),_0x343073=_0x3470b4[_0x255207(0x1e1)](_0x255207(0x1ef)),{getRemoteAppList:_0x46cd91}=await import(_0x255207(0x1e3)),_0x4353c0=await _0x46cd91({'env':_0x5cc127,'accessKey':_0x3470b4['accessKey'],'localOnly':_0x31dd4a,'noCache':_0x343073});return{'ok':!![],'data':{'total':_0x4353c0[_0x255207(0x206)][_0x255207(0x1e4)],'env':_0x5cc127,'source':_0x4353c0[_0x255207(0x1da)],'fetchedAt':_0x4353c0[_0x255207(0x1e2)],'cachePath':_0x4353c0['cachePath']},'message':_0x4353c0['source']===_0x255207(0x1dd)?_0x255207(0x1fa)+_0x4353c0[_0x255207(0x206)][_0x255207(0x1e4)]+_0x255207(0x1f6)+_0x5cc127+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x4353c0[_0x255207(0x206)]['length']+_0x255207(0x20d)+_0x5cc127+'\x22.'};}},useDef={'service':a3_0x5ebc88(0x21d),'command':a3_0x5ebc88(0x216),'description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0x5ebc88(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x2e88eb){const _0x4eb1b3=a3_0x5ebc88;if(!_0x2e88eb['args'][0x0])throw CliErrors[_0x4eb1b3(0x208)]('Missing\x20app\x20name.',_0x4eb1b3(0x21e)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x46a045){const _0x24e4a5=a3_0x5ebc88;warnDeprecatedAppCommand(_0x24e4a5(0x216),CLI_BIN_NAME+_0x24e4a5(0x200));const _0x2b5c65=_0x46a045[_0x24e4a5(0x217)][0x0];if(!_0x2b5c65)throw CliErrors['validation'](_0x24e4a5(0x209),_0x24e4a5(0x21e)+CLI_BIN_NAME+_0x24e4a5(0x220));const {buildConfigFromFlags:_0xb58ec8,resolveLocalAppAliasCode:_0x3f3558}=await import(_0x24e4a5(0x1df)),{readCachedAppList:_0x19885d}=await import(_0x24e4a5(0x1ff)),_0x5f08b3=_0x46a045[_0x24e4a5(0x215)](_0x24e4a5(0x21b)),_0x288238=_0xb58ec8(_0x5f08b3?{'env':_0x5f08b3}:{}),_0x52dbce=_0x19885d(_0x288238[_0x24e4a5(0x21b)],_0x288238[_0x24e4a5(0x224)]),_0x1c25e5=_0x52dbce?.[_0x24e4a5(0x206)][_0x24e4a5(0x225)](_0xeaff7b=>_0xeaff7b[_0x24e4a5(0x20b)]===_0x2b5c65),_0x1773df=_0x3f3558(_0x288238[_0x24e4a5(0x1e5)]??{},_0x2b5c65);if(_0x1c25e5&&!isRuntimeAccessibleApp(_0x1c25e5))throw runtimeInaccessibleAppError(_0x1c25e5,'\x22'+_0x2b5c65+'\x22');if(_0x1773df){const _0x5b6259=_0x52dbce?.[_0x24e4a5(0x206)][_0x24e4a5(0x225)](_0x461139=>_0x461139['appCode']?.[_0x24e4a5(0x20e)]()===_0x1773df);if(_0x5b6259&&!isRuntimeAccessibleApp(_0x5b6259))throw runtimeInaccessibleAppError(_0x5b6259,'\x22'+_0x2b5c65+'\x22');}if(!_0x1c25e5&&!_0x1773df&&_0x288238[_0x24e4a5(0x222)]!==_0x2b5c65){const _0x46b959=[..._0x52dbce?.['items'][_0x24e4a5(0x205)](_0x3e1168=>_0x3e1168[_0x24e4a5(0x20b)])??[]],_0x3e7876=_0x46b959[_0x24e4a5(0x1e4)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x24e4a5(0x227)+_0x2b5c65+_0x24e4a5(0x1f0):'Available\x20remote\x20apps:\x20'+Array[_0x24e4a5(0x212)](new Set(_0x46b959))[_0x24e4a5(0x1fd)](',\x20')+_0x24e4a5(0x223);throw CliErrors[_0x24e4a5(0x208)]('App\x20\x22'+_0x2b5c65+_0x24e4a5(0x22b),_0x3e7876);}const _0x20680c=_0x46a045[_0x24e4a5(0x1e1)](_0x24e4a5(0x1f5));let _0x53285e;if(_0x20680c)_0x53285e={'global':!![]};else{const {isInProject:_0x439cc4}=await import(_0x24e4a5(0x1df)),_0x2e6126=_0x439cc4();_0x53285e=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x24e4a5(0x21f),'inProject':_0x2e6126}));}const _0x49d581=readConfig(_0x53285e);return _0x49d581[_0x24e4a5(0x222)]=_0x2b5c65,writeConfig(_0x49d581,_0x53285e),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x2b5c65+'\x22'+scopeLabel(_0x53285e)+'.'};}};function warnDeprecatedAppCommand(_0x26b127,_0x4448f4){const _0x325933=a3_0x5ebc88;console[_0x325933(0x207)](CLI_BIN_NAME+_0x325933(0x1e8)+_0x26b127+_0x325933(0x1fb)+_0x4448f4+'`\x20instead.');}const importDef={'service':'app','command':a3_0x5ebc88(0x1d9),'description':a3_0x5ebc88(0x203),'risk':a3_0x5ebc88(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0xad3cbe){return await runInitImport(collectFlags(_0xad3cbe,initImportFlagDefs)),{'ok':!![]};}};function a3_0x3f5d(_0x513342,_0x4e9cf3){_0x513342=_0x513342-0x1d8;const _0x3e3959=a3_0x3e39();let _0x3f5d74=_0x3e3959[_0x513342];return _0x3f5d74;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x2018c0,_0x26704c){const _0xb29d05=a4_0x191e,_0x41c5bf=_0x2018c0();while(!![]){try{const _0x1edfa9=-parseInt(_0xb29d05(0x1be))/0x1*(-parseInt(_0xb29d05(0x1b7))/0x2)+parseInt(_0xb29d05(0x1b4))/0x3+-parseInt(_0xb29d05(0x1bb))/0x4+parseInt(_0xb29d05(0x1b5))/0x5+parseInt(_0xb29d05(0x1c0))/0x6+parseInt(_0xb29d05(0x1b0))/0x7+parseInt(_0xb29d05(0x1b3))/0x8*(-parseInt(_0xb29d05(0x1c4))/0x9);if(_0x1edfa9===_0x26704c)break;else _0x41c5bf['push'](_0x41c5bf['shift']());}catch(_0x349de9){_0x41c5bf['push'](_0x41c5bf['shift']());}}}(a4_0x285d,0xcc3ca));import{CLI_BIN_NAME}from'../../constant/cli.js';function a4_0x285d(){const _0x50e32f=['172017zruhIx','6698405bniixk','appPublishStatus','trim','888mOJnbM','640659tSxweT','7510410YpRTbD','find','778plgcnJ','App\x20','toUpperCase','filter','4146684BkNURI','appName','appCode','1873NHPNDd','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','3561726zKbmqe','string','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','.\x20Publish\x20the\x20app\x20before\x20using\x20'];a4_0x285d=function(){return _0x50e32f;};return a4_0x285d();}import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x29dd58){const _0x5015b4=a4_0x191e;if(typeof _0x29dd58!==_0x5015b4(0x1c1))return null;const _0x44deac=_0x29dd58['trim']();return _0x44deac?_0x44deac[_0x5015b4(0x1b9)]():null;}export function isRuntimeAccessibleApp(_0x17bcf4){const _0x184379=a4_0x191e;return normalizeAppPublishStatus(_0x17bcf4[_0x184379(0x1b1)])===RUNTIME_ACCESSIBLE_APP_STATUS;}function a4_0x191e(_0x570a1a,_0x3828d1){_0x570a1a=_0x570a1a-0x1b0;const _0x285dc9=a4_0x285d();let _0x191e86=_0x285dc9[_0x570a1a];return _0x191e86;}export function filterRuntimeAccessibleApps(_0xdfd4d9){const _0x3a76ea=a4_0x191e;return _0xdfd4d9[_0x3a76ea(0x1ba)](isRuntimeAccessibleApp);}export function findAppByName(_0x5252c2,_0x5420c9){const _0x50a94a=a4_0x191e;return _0x5252c2[_0x50a94a(0x1b6)](_0x257865=>_0x257865[_0x50a94a(0x1bc)]===_0x5420c9);}export function findAppByCode(_0x374d47,_0x1e3e67){const _0x16362e=a4_0x191e,_0x9df4d0=_0x1e3e67[_0x16362e(0x1b2)]();if(!_0x9df4d0)return undefined;return _0x374d47[_0x16362e(0x1b6)](_0x363d5a=>_0x363d5a[_0x16362e(0x1bd)]?.[_0x16362e(0x1b2)]()===_0x9df4d0);}export function runtimeInaccessibleAppError(_0x2ee794,_0x2fcbfa){const _0x19b7a8=a4_0x191e,_0x5107fd=normalizeAppPublishStatus(_0x2ee794[_0x19b7a8(0x1b1)])??'UNKNOWN';return CliErrors['validation'](_0x19b7a8(0x1b8)+_0x2fcbfa+_0x19b7a8(0x1c2),'Current\x20status:\x20'+_0x5107fd+_0x19b7a8(0x1c3)+CLI_BIN_NAME+_0x19b7a8(0x1bf));}
1
+ (function(_0x29b6a6,_0x3bc847){const _0x222ad7=a4_0x1260,_0x4f1d6e=_0x29b6a6();while(!![]){try{const _0x44f7b2=parseInt(_0x222ad7(0x109))/0x1+parseInt(_0x222ad7(0xff))/0x2+-parseInt(_0x222ad7(0x111))/0x3*(-parseInt(_0x222ad7(0x105))/0x4)+parseInt(_0x222ad7(0x10f))/0x5*(-parseInt(_0x222ad7(0x112))/0x6)+parseInt(_0x222ad7(0x100))/0x7+parseInt(_0x222ad7(0x106))/0x8*(parseInt(_0x222ad7(0x103))/0x9)+-parseInt(_0x222ad7(0x10e))/0xa;if(_0x44f7b2===_0x3bc847)break;else _0x4f1d6e['push'](_0x4f1d6e['shift']());}catch(_0x21e5df){_0x4f1d6e['push'](_0x4f1d6e['shift']());}}}(a4_0x1c25,0xcb898));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(_0x3c729d){const _0x16fea4=a4_0x1260;if(typeof _0x3c729d!=='string')return null;const _0x41d8ba=_0x3c729d[_0x16fea4(0x10a)]();return _0x41d8ba?_0x41d8ba[_0x16fea4(0x102)]():null;}export function isRuntimeAccessibleApp(_0x2b6a32){const _0x43e386=a4_0x1260;return normalizeAppPublishStatus(_0x2b6a32[_0x43e386(0x101)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x362230){const _0x49eed7=a4_0x1260;return _0x362230[_0x49eed7(0x113)](isRuntimeAccessibleApp);}export function findAppByName(_0x48c1cf,_0x554440){const _0x115c8b=a4_0x1260;return _0x48c1cf[_0x115c8b(0x10d)](_0x54cda4=>_0x54cda4[_0x115c8b(0x107)]===_0x554440);}export function findAppByCode(_0x416073,_0x36fa6c){const _0x2c975f=a4_0x1260,_0x59c8c4=_0x36fa6c['trim']();if(!_0x59c8c4)return undefined;return _0x416073[_0x2c975f(0x10d)](_0x1f8d75=>_0x1f8d75['appCode']?.[_0x2c975f(0x10a)]()===_0x59c8c4);}function a4_0x1260(_0x192fcf,_0x305f69){_0x192fcf=_0x192fcf-0xff;const _0x1c256b=a4_0x1c25();let _0x126076=_0x1c256b[_0x192fcf];return _0x126076;}function a4_0x1c25(){const _0x23d592=['\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','find','36758400yUnpxS','5jAsaEw','App\x20','4003293NmurWo','354036SjrNwL','filter','validation','2576482ffzfwB','2981678cVCboZ','appPublishStatus','toUpperCase','9XDFloe','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','4FKMrby','10387928oIptPg','appName','Current\x20status:\x20','221417YgDSYy','trim','UNKNOWN'];a4_0x1c25=function(){return _0x23d592;};return a4_0x1c25();}export function runtimeInaccessibleAppError(_0x341d3a,_0x4994cd){const _0x1d4ba9=a4_0x1260,_0x3b6357=normalizeAppPublishStatus(_0x341d3a['appPublishStatus'])??_0x1d4ba9(0x10b);return CliErrors[_0x1d4ba9(0x114)](_0x1d4ba9(0x110)+_0x4994cd+_0x1d4ba9(0x104),_0x1d4ba9(0x108)+_0x3b6357+'.\x20Publish\x20the\x20app\x20before\x20using\x20'+CLI_BIN_NAME+_0x1d4ba9(0x10c));}
@@ -1 +1 @@
1
- (function(_0x386de4,_0x23652c){const _0x4198e9=a5_0x19cb,_0x488ae1=_0x386de4();while(!![]){try{const _0x10ebae=-parseInt(_0x4198e9(0x191))/0x1+parseInt(_0x4198e9(0x19a))/0x2*(-parseInt(_0x4198e9(0x19b))/0x3)+-parseInt(_0x4198e9(0x190))/0x4+parseInt(_0x4198e9(0x19f))/0x5*(-parseInt(_0x4198e9(0x19e))/0x6)+-parseInt(_0x4198e9(0x19d))/0x7+parseInt(_0x4198e9(0x1a0))/0x8*(-parseInt(_0x4198e9(0x197))/0x9)+parseInt(_0x4198e9(0x198))/0xa;if(_0x10ebae===_0x23652c)break;else _0x488ae1['push'](_0x488ae1['shift']());}catch(_0x387b63){_0x488ae1['push'](_0x488ae1['shift']());}}}(a5_0xe71a,0x600da));function a5_0x19cb(_0x1cd5d9,_0x42f697){_0x1cd5d9=_0x1cd5d9-0x18f;const _0xe71a07=a5_0xe71a();let _0x19cb90=_0xe71a07[_0x1cd5d9];return _0x19cb90;}import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0xe71a(){const _0xb62b28=['success','../../../mock/app-list.json','2159433WosJmk','21663880KInpfR','utf-8','2LIqgWh','85602sDslpe','errorMsg','1964879SJWzFu','828Bwewgs','9045CROwAH','8qQjsDB','parse','914064YdcbYv','745628OWttPd','tableData','Mock\x20API\x20error:\x20','data'];a5_0xe71a=function(){return _0xb62b28;};return a5_0xe71a();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x4cf7fc=a5_0x19cb,_0x7106e0=join(__dirname,_0x4cf7fc(0x196)),_0x21681c=readFileSync(_0x7106e0,_0x4cf7fc(0x199));return JSON[_0x4cf7fc(0x18f)](_0x21681c);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x6cbf01=a5_0x19cb,_0x8b9eaa=getMockAppList();if(!_0x8b9eaa[_0x6cbf01(0x195)])throw new Error(_0x6cbf01(0x193)+_0x8b9eaa[_0x6cbf01(0x19c)]+'\x20('+_0x8b9eaa['errorCode']+')');return _0x8b9eaa[_0x6cbf01(0x194)][_0x6cbf01(0x192)];}
1
+ (function(_0x52ce47,_0x1eecbd){const _0x599fe4=a5_0x1b2d,_0x45f00e=_0x52ce47();while(!![]){try{const _0x434bf6=parseInt(_0x599fe4(0xf0))/0x1*(parseInt(_0x599fe4(0xf8))/0x2)+-parseInt(_0x599fe4(0xee))/0x3+-parseInt(_0x599fe4(0xfb))/0x4*(parseInt(_0x599fe4(0xfa))/0x5)+-parseInt(_0x599fe4(0xf9))/0x6+parseInt(_0x599fe4(0xef))/0x7*(parseInt(_0x599fe4(0xfd))/0x8)+parseInt(_0x599fe4(0xfc))/0x9+-parseInt(_0x599fe4(0xf3))/0xa;if(_0x434bf6===_0x1eecbd)break;else _0x45f00e['push'](_0x45f00e['shift']());}catch(_0x1454bf){_0x45f00e['push'](_0x45f00e['shift']());}}}(a5_0x24ce,0xa1f60));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 _0x485f10=a5_0x1b2d,_0x36013b=join(__dirname,_0x485f10(0xf6)),_0x2fd609=readFileSync(_0x36013b,_0x485f10(0xf7));return JSON[_0x485f10(0xf1)](_0x2fd609);}let _cached=null;function a5_0x1b2d(_0x49f574,_0x1b61f0){_0x49f574=_0x49f574-0xee;const _0x24ce67=a5_0x24ce();let _0x1b2d7b=_0x24ce67[_0x49f574];return _0x1b2d7b;}export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a5_0x24ce(){const _0x53c5c0=['9192PHtjvd','875631suNMXR','5810lgJwkL','36nmiUJU','parse','success','7420130ZtijYn','Mock\x20API\x20error:\x20','data','../../../mock/app-list.json','utf-8','36602yOIpBt','617580pFiYID','5UNtgOt','920548HcTLUs','3760587xYsnhB'];a5_0x24ce=function(){return _0x53c5c0;};return a5_0x24ce();}export function getMockRemoteAppItems(){const _0x39103b=a5_0x1b2d,_0x197400=getMockAppList();if(!_0x197400[_0x39103b(0xf2)])throw new Error(_0x39103b(0xf4)+_0x197400['errorMsg']+'\x20('+_0x197400['errorCode']+')');return _0x197400[_0x39103b(0xf5)]['tableData'];}
@@ -1 +1 @@
1
- (function(_0x9be3a,_0x580b1d){const _0x127b7e=a6_0x21a4,_0x459c31=_0x9be3a();while(!![]){try{const _0xc31c8b=parseInt(_0x127b7e(0x6b))/0x1*(parseInt(_0x127b7e(0x7a))/0x2)+-parseInt(_0x127b7e(0x76))/0x3+-parseInt(_0x127b7e(0x7b))/0x4*(parseInt(_0x127b7e(0x6c))/0x5)+parseInt(_0x127b7e(0x73))/0x6*(-parseInt(_0x127b7e(0x75))/0x7)+-parseInt(_0x127b7e(0x70))/0x8+parseInt(_0x127b7e(0x6e))/0x9+-parseInt(_0x127b7e(0x71))/0xa*(-parseInt(_0x127b7e(0x7c))/0xb);if(_0xc31c8b===_0x580b1d)break;else _0x459c31['push'](_0x459c31['shift']());}catch(_0x891681){_0x459c31['push'](_0x459c31['shift']());}}}(a6_0x9d87,0x34fa4));function a6_0x21a4(_0x2dcc0e,_0x2d8b78){_0x2dcc0e=_0x2dcc0e-0x6b;const _0x9d8736=a6_0x9d87();let _0x21a47a=_0x9d8736[_0x2dcc0e];return _0x21a47a;}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 _0x4a86a9=a6_0x21a4,_0x81bfae=(productEnv(_0x4a86a9(0x77))||'')[_0x4a86a9(0x78)]()['toLowerCase']();return _0x81bfae===_0x4a86a9(0x72);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x9d87(){const _0x4eb28f=['1603344oaeEWA','17140CGcZDD','mock','3306asCXGF','toISOString','2611JoOriP','592080fyAbZO','APP_LIST_SOURCE','trim','cache','6914EGVoJO','1299896jsLtHa','5423jFxCAA','items','17WujeQk','5IvoHaD','fetchedAt','2173500KOBASP','remote'];a6_0x9d87=function(){return _0x4eb28f;};return a6_0x9d87();}export async function getRemoteAppList(_0xa760dc){const _0x37dae1=a6_0x21a4,{env:_0x289e77,accessKey:_0x5d376b,localOnly:localOnly=![],noCache:noCache=![]}=_0xa760dc,_0x2fdccd=readCachedAppList(_0x289e77,_0x5d376b),_0x2dab39=_0x5d376b?.[_0x37dae1(0x78)]()?getAppCacheFilePath(_0x289e77,_0x5d376b):null;if(localOnly)return{'items':_0x2fdccd?.[_0x37dae1(0x7d)]??[],'source':_0x37dae1(0x79),'fetchedAt':_0x2fdccd?.[_0x37dae1(0x6d)]??null,'cachePath':_0x2dab39};try{const _0x36ea3e=await getRemoteAppItems(),_0x955c62=shouldUseMockRemoteApps()?_0x37dae1(0x72):_0x37dae1(0x6f),_0x4be88b=new Date()[_0x37dae1(0x74)](),_0x3afe42=_0x5d376b?.[_0x37dae1(0x78)]()?writeCachedAppList(_0x289e77,_0x5d376b,{'env':_0x289e77,'fetchedAt':_0x4be88b,'source':_0x955c62,'items':_0x36ea3e}):null;return{'items':_0x36ea3e,'source':_0x955c62,'fetchedAt':_0x4be88b,'cachePath':_0x3afe42};}catch(_0x3ae1fd){if(!noCache&&_0x2fdccd)return{'items':_0x2fdccd[_0x37dae1(0x7d)],'source':'cache','fetchedAt':_0x2fdccd[_0x37dae1(0x6d)],'cachePath':_0x2dab39};throw _0x3ae1fd;}}
1
+ (function(_0x454bba,_0x2e261f){const _0xc1f18b=a6_0x2b53,_0x56c3b1=_0x454bba();while(!![]){try{const _0x2df031=parseInt(_0xc1f18b(0x78))/0x1*(parseInt(_0xc1f18b(0x77))/0x2)+-parseInt(_0xc1f18b(0x82))/0x3*(-parseInt(_0xc1f18b(0x7c))/0x4)+parseInt(_0xc1f18b(0x87))/0x5*(parseInt(_0xc1f18b(0x7e))/0x6)+parseInt(_0xc1f18b(0x83))/0x7*(-parseInt(_0xc1f18b(0x88))/0x8)+-parseInt(_0xc1f18b(0x7f))/0x9+parseInt(_0xc1f18b(0x80))/0xa+-parseInt(_0xc1f18b(0x86))/0xb;if(_0x2df031===_0x2e261f)break;else _0x56c3b1['push'](_0x56c3b1['shift']());}catch(_0x34c729){_0x56c3b1['push'](_0x56c3b1['shift']());}}}(a6_0x1e5f,0xa7de2));function a6_0x1e5f(){const _0x1afe88=['toISOString','toLowerCase','15467023OZXXNq','30165PQziHf','16jwHzTf','APP_LIST_SOURCE','remote','117406AXjwqr','16gBVpOC','fetchedAt','trim','mock','3973988EysHGO','cache','414qEVRYV','9931563bgbQGl','9232980isaNIZ','items','3sKmOTU','262969bcwvln'];a6_0x1e5f=function(){return _0x1afe88;};return a6_0x1e5f();}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';function a6_0x2b53(_0x51dfa4,_0x576ac8){_0x51dfa4=_0x51dfa4-0x75;const _0x1e5f7c=a6_0x1e5f();let _0x2b53cc=_0x1e5f7c[_0x51dfa4];return _0x2b53cc;}export function shouldUseMockRemoteApps(){const _0x3ef0a0=a6_0x2b53,_0x273333=(productEnv(_0x3ef0a0(0x75))||'')[_0x3ef0a0(0x7a)]()[_0x3ef0a0(0x85)]();return _0x273333===_0x3ef0a0(0x7b);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1ea9d8){const _0x5c1d32=a6_0x2b53,{env:_0x2d5555,accessKey:_0x352978,localOnly:localOnly=![],noCache:noCache=![]}=_0x1ea9d8,_0x5e1882=readCachedAppList(_0x2d5555,_0x352978),_0x51fc80=_0x352978?.[_0x5c1d32(0x7a)]()?getAppCacheFilePath(_0x2d5555,_0x352978):null;if(localOnly)return{'items':_0x5e1882?.['items']??[],'source':_0x5c1d32(0x7d),'fetchedAt':_0x5e1882?.[_0x5c1d32(0x79)]??null,'cachePath':_0x51fc80};try{const _0x4efab7=await getRemoteAppItems(),_0x18234e=shouldUseMockRemoteApps()?_0x5c1d32(0x7b):_0x5c1d32(0x76),_0x2c6b5f=new Date()[_0x5c1d32(0x84)](),_0x39d50b=_0x352978?.[_0x5c1d32(0x7a)]()?writeCachedAppList(_0x2d5555,_0x352978,{'env':_0x2d5555,'fetchedAt':_0x2c6b5f,'source':_0x18234e,'items':_0x4efab7}):null;return{'items':_0x4efab7,'source':_0x18234e,'fetchedAt':_0x2c6b5f,'cachePath':_0x39d50b};}catch(_0x2cc928){if(!noCache&&_0x5e1882)return{'items':_0x5e1882[_0x5c1d32(0x81)],'source':'cache','fetchedAt':_0x5e1882['fetchedAt'],'cachePath':_0x51fc80};throw _0x2cc928;}}
@@ -1 +1 @@
1
- (function(_0x1b3f20,_0x41c343){const _0x37818e=a7_0x1909,_0x21900d=_0x1b3f20();while(!![]){try{const _0x531a3b=parseInt(_0x37818e(0x13c))/0x1+-parseInt(_0x37818e(0x12e))/0x2+-parseInt(_0x37818e(0x137))/0x3+parseInt(_0x37818e(0x13d))/0x4+parseInt(_0x37818e(0x12f))/0x5*(parseInt(_0x37818e(0x139))/0x6)+parseInt(_0x37818e(0x133))/0x7+parseInt(_0x37818e(0x12a))/0x8*(-parseInt(_0x37818e(0x132))/0x9);if(_0x531a3b===_0x41c343)break;else _0x21900d['push'](_0x21900d['shift']());}catch(_0x277ac2){_0x21900d['push'](_0x21900d['shift']());}}}(a7_0x2fec,0x2c1af));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x2a10e6,_0x26b02d){const _0x4a66db=a7_0x1909;if(!_0x26b02d)return;const _0x3af0e0=!!(_0x26b02d[_0x4a66db(0x13b)]??_0x26b02d[_0x4a66db(0x128)]);for(const _0x250307 of _0x2a10e6){_0x250307[_0x4a66db(0x129)]=![];}const _0x57f7b6=_0x26b02d[_0x4a66db(0x130)]!=null?String(_0x26b02d[_0x4a66db(0x130)])[_0x4a66db(0x138)]():'';if(_0x3af0e0){const _0x387c1b=_0x26b02d[_0x4a66db(0x13b)]??_0x26b02d['defaultApp'];if(_0x387c1b){const _0x3ede31=_0x2a10e6['find'](_0x4572b9=>_0x4572b9[_0x4a66db(0x131)]===!![]&&_0x4572b9['name']===_0x387c1b&&_0x4572b9[_0x4a66db(0x134)]===_0x4a66db(0x12b)),_0x3f4d89=_0x3ede31??_0x2a10e6['find'](_0x45bb7a=>_0x45bb7a[_0x4a66db(0x131)]===!![]&&_0x45bb7a[_0x4a66db(0x12d)]===_0x387c1b);if(_0x3f4d89){const _0x389bb3=String(_0x3f4d89[_0x4a66db(0x136)]??'')['trim']();if(!_0x57f7b6||_0x389bb3===_0x57f7b6){_0x3f4d89['isCurrent']=!![];return;}}}if(_0x57f7b6){const _0x5ad182=_0x2a10e6[_0x4a66db(0x12c)](_0x2621bf=>String(_0x2621bf['appcode']??'')['trim']()===_0x57f7b6);_0x5ad182&&(_0x5ad182[_0x4a66db(0x129)]=!![]);}return;}if(!_0x57f7b6)return;for(const _0xf5f1f6 of _0x2a10e6){String(_0xf5f1f6[_0x4a66db(0x136)]??'')[_0x4a66db(0x138)]()===_0x57f7b6&&(_0xf5f1f6[_0x4a66db(0x129)]=!![]);}}function a7_0x2fec(){const _0x77e965=['definedIn','project','appcode','270333UbAnSG','trim','198966XtAYjb','global','currentApp','247011FaKnSY','828992LgslSl','defaultApp','isCurrent','24wkMjYX','local','find','name','32124SaRObn','5AiUWoz','appCode','named','1091943fOMtdS','1143723hDHlRK'];a7_0x2fec=function(){return _0x77e965;};return a7_0x2fec();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0x1909(_0x498bbc,_0x4279c7){_0x498bbc=_0x498bbc-0x128;const _0x2fec5d=a7_0x2fec();let _0x19095b=_0x2fec5d[_0x498bbc];return _0x19095b;}export function scopeLabel(_0x59fc54){const _0x48e10d=a7_0x1909;return formatScopeLabel(_0x59fc54[_0x48e10d(0x13a)]?'global':_0x48e10d(0x135));}
1
+ (function(_0x1acf29,_0x19c0c0){const _0x150f2d=a7_0x389c,_0x5b7f15=_0x1acf29();while(!![]){try{const _0x2cdf2d=parseInt(_0x150f2d(0x1da))/0x1+-parseInt(_0x150f2d(0x1e2))/0x2+-parseInt(_0x150f2d(0x1de))/0x3+parseInt(_0x150f2d(0x1e4))/0x4+-parseInt(_0x150f2d(0x1dc))/0x5+-parseInt(_0x150f2d(0x1d8))/0x6+parseInt(_0x150f2d(0x1d9))/0x7;if(_0x2cdf2d===_0x19c0c0)break;else _0x5b7f15['push'](_0x5b7f15['shift']());}catch(_0xbfc2bd){_0x5b7f15['push'](_0x5b7f15['shift']());}}}(a7_0x1ade,0x1cfb3));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a7_0x389c(_0x53688e,_0x6be846){_0x53688e=_0x53688e-0x1d2;const _0x1ade0e=a7_0x1ade();let _0x389c0e=_0x1ade0e[_0x53688e];return _0x389c0e;}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x42c34e,_0x22fa0a){const _0x1dddb5=a7_0x389c;if(!_0x22fa0a)return;const _0x13bc91=!!(_0x22fa0a[_0x1dddb5(0x1dd)]??_0x22fa0a[_0x1dddb5(0x1df)]);for(const _0x448d73 of _0x42c34e){_0x448d73[_0x1dddb5(0x1d5)]=![];}const _0xcac399=_0x22fa0a[_0x1dddb5(0x1d7)]!=null?String(_0x22fa0a[_0x1dddb5(0x1d7)])[_0x1dddb5(0x1d2)]():'';if(_0x13bc91){const _0x2f9f17=_0x22fa0a[_0x1dddb5(0x1dd)]??_0x22fa0a[_0x1dddb5(0x1df)];if(_0x2f9f17){const _0x6d1508=_0x42c34e[_0x1dddb5(0x1d3)](_0x1ea3b7=>_0x1ea3b7[_0x1dddb5(0x1d4)]===!![]&&_0x1ea3b7[_0x1dddb5(0x1e3)]===_0x2f9f17&&_0x1ea3b7[_0x1dddb5(0x1e0)]==='local'),_0x90f5fd=_0x6d1508??_0x42c34e[_0x1dddb5(0x1d3)](_0x16e8dd=>_0x16e8dd[_0x1dddb5(0x1d4)]===!![]&&_0x16e8dd[_0x1dddb5(0x1e3)]===_0x2f9f17);if(_0x90f5fd){const _0x389023=String(_0x90f5fd['appcode']??'')[_0x1dddb5(0x1d2)]();if(!_0xcac399||_0x389023===_0xcac399){_0x90f5fd[_0x1dddb5(0x1d5)]=!![];return;}}}if(_0xcac399){const _0xb7348c=_0x42c34e['find'](_0x1fe4bc=>String(_0x1fe4bc[_0x1dddb5(0x1e1)]??'')['trim']()===_0xcac399);_0xb7348c&&(_0xb7348c[_0x1dddb5(0x1d5)]=!![]);}return;}if(!_0xcac399)return;for(const _0x5e006d of _0x42c34e){String(_0x5e006d[_0x1dddb5(0x1e1)]??'')[_0x1dddb5(0x1d2)]()===_0xcac399&&(_0x5e006d[_0x1dddb5(0x1d5)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0x1ade(){const _0x3fe133=['isCurrent','global','appCode','1311492wKvelb','3355576eQqnYA','221676SvxeYO','project','994040gwEIbo','currentApp','429339aiGlcL','defaultApp','definedIn','appcode','448338OBMYuV','name','809340ImqiaL','trim','find','named'];a7_0x1ade=function(){return _0x3fe133;};return a7_0x1ade();}export function scopeLabel(_0x14a573){const _0x5e08da=a7_0x389c;return formatScopeLabel(_0x14a573[_0x5e08da(0x1d6)]?_0x5e08da(0x1d6):_0x5e08da(0x1db));}
@@ -1 +1 @@
1
- const a8_0x1026d0=a8_0x252f;(function(_0xad895f,_0x74225){const _0x5d6c01=a8_0x252f,_0x4f4645=_0xad895f();while(!![]){try{const _0xe68dbb=-parseInt(_0x5d6c01(0x1ca))/0x1*(parseInt(_0x5d6c01(0x1d5))/0x2)+parseInt(_0x5d6c01(0x1d3))/0x3+-parseInt(_0x5d6c01(0x1cd))/0x4+parseInt(_0x5d6c01(0x1dc))/0x5+-parseInt(_0x5d6c01(0x1d1))/0x6*(parseInt(_0x5d6c01(0x1d2))/0x7)+-parseInt(_0x5d6c01(0x1cb))/0x8*(parseInt(_0x5d6c01(0x1d8))/0x9)+parseInt(_0x5d6c01(0x1da))/0xa*(parseInt(_0x5d6c01(0x1db))/0xb);if(_0xe68dbb===_0x74225)break;else _0x4f4645['push'](_0x4f4645['shift']());}catch(_0x4e401e){_0x4f4645['push'](_0x4f4645['shift']());}}}(a8_0x2ca5,0x4b6c2));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x252f(_0x17277d,_0x24ba90){_0x17277d=_0x17277d-0x1c8;const _0x2ca593=a8_0x2ca5();let _0x252f56=_0x2ca593[_0x17277d];return _0x252f56;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{projectAppConfigVisibilityCheck}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a8_0x1026d0(0x1d9),'description':a8_0x1026d0(0x1c9),'risk':a8_0x1026d0(0x1d4),'args':[{'name':a8_0x1026d0(0x1cf),'description':'App\x20config\x20key','required':!![]}],'flags':[],async 'execute'(_0x18a82f){const _0x5757b=a8_0x1026d0,_0x2d334e=_0x18a82f[_0x5757b(0x1d6)][0x0]?.[_0x5757b(0x1ce)]();if(!_0x2d334e)throw CliErrors['validation']('Missing\x20app-config\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x5757b(0x1dd));try{const _0x296ce1=await getRuntimeAppConfigByKey(_0x18a82f[_0x5757b(0x1d7)],_0x2d334e);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x296ce1,{'appCode':_0x18a82f[_0x5757b(0x1d7)],'key':_0x2d334e})};}catch{throw CliErrors['apiError'](_0x5757b(0x1d0)+_0x2d334e+_0x5757b(0x1c8)+_0x18a82f[_0x5757b(0x1d7)],_0x5757b(0x1cc));}}};function a8_0x2ca5(){const _0x2b0bb9=['appCode','9YnITqC','get','50OQeXWj','2010140rGDlbc','2176765jdyxdR','\x20app-config\x20get\x20<key>',',\x20appCode=','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','1iyfkRO','659144NPFZoW','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.','2078608jRetnU','trim','key','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key=','138zocTKQ','91dytsgC','132090nkTQii','read','963618jMvbSn','args'];a8_0x2ca5=function(){return _0x2b0bb9;};return a8_0x2ca5();}
1
+ const a8_0x4ba3a5=a8_0x4f67;(function(_0x451c78,_0x38bdc0){const _0x1a6db9=a8_0x4f67,_0x15f2d8=_0x451c78();while(!![]){try{const _0x552f2e=parseInt(_0x1a6db9(0x8d))/0x1+-parseInt(_0x1a6db9(0x89))/0x2*(-parseInt(_0x1a6db9(0x82))/0x3)+parseInt(_0x1a6db9(0x8e))/0x4+parseInt(_0x1a6db9(0x8a))/0x5+parseInt(_0x1a6db9(0x8b))/0x6+-parseInt(_0x1a6db9(0x86))/0x7*(-parseInt(_0x1a6db9(0x81))/0x8)+parseInt(_0x1a6db9(0x84))/0x9*(-parseInt(_0x1a6db9(0x7f))/0xa);if(_0x552f2e===_0x38bdc0)break;else _0x15f2d8['push'](_0x15f2d8['shift']());}catch(_0x11c5d6){_0x15f2d8['push'](_0x15f2d8['shift']());}}}(a8_0x2d53,0xaa694));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{projectAppConfigVisibilityCheck}from'../../commands/app-config/shared.js';function a8_0x4f67(_0x12daca,_0x1f3868){_0x12daca=_0x12daca-0x7f;const _0x2d5394=a8_0x2d53();let _0x4f67c1=_0x2d5394[_0x12daca];return _0x4f67c1;}function a8_0x2d53(){const _0x9284c1=[',\x20appCode=','50iIyuvt','args','5506736xVmDCM','6YdUWpy','apiError','5570874JWFdTl','App\x20config\x20key','7EfymMx','read','get','769346sMfsEQ','4723450ZPFfPJ','1499412jvoeqb','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','124876XJkeYN','4063112fKwBdW','app-config','Missing\x20app-config\x20key.','appCode','trim','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key='];a8_0x2d53=function(){return _0x9284c1;};return a8_0x2d53();}export const appConfigGet={'service':a8_0x4ba3a5(0x8f),'command':a8_0x4ba3a5(0x88),'description':a8_0x4ba3a5(0x8c),'risk':a8_0x4ba3a5(0x87),'args':[{'name':'key','description':a8_0x4ba3a5(0x85),'required':!![]}],'flags':[],async 'execute'(_0x3ba94e){const _0x42df77=a8_0x4ba3a5,_0x2df1af=_0x3ba94e[_0x42df77(0x80)][0x0]?.[_0x42df77(0x92)]();if(!_0x2df1af)throw CliErrors['validation'](_0x42df77(0x90),'Usage:\x20'+CLI_BIN_NAME+'\x20app-config\x20get\x20<key>');try{const _0x1b0e93=await getRuntimeAppConfigByKey(_0x3ba94e['appCode'],_0x2df1af);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x1b0e93,{'appCode':_0x3ba94e[_0x42df77(0x91)],'key':_0x2df1af})};}catch{throw CliErrors[_0x42df77(0x83)](_0x42df77(0x93)+_0x2df1af+_0x42df77(0x94)+_0x3ba94e['appCode'],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.');}}};
@@ -1 +1 @@
1
- function a9_0x29fc(_0x96c6cc,_0x21d10a){_0x96c6cc=_0x96c6cc-0x14e;const _0x135c70=a9_0x135c();let _0x29fc0b=_0x135c70[_0x96c6cc];return _0x29fc0b;}(function(_0x397670,_0x1044c7){const _0x11c6cd=a9_0x29fc,_0x1a25f4=_0x397670();while(!![]){try{const _0x3c3475=parseInt(_0x11c6cd(0x155))/0x1*(parseInt(_0x11c6cd(0x150))/0x2)+parseInt(_0x11c6cd(0x158))/0x3+parseInt(_0x11c6cd(0x14f))/0x4+parseInt(_0x11c6cd(0x152))/0x5*(parseInt(_0x11c6cd(0x153))/0x6)+-parseInt(_0x11c6cd(0x156))/0x7*(parseInt(_0x11c6cd(0x151))/0x8)+parseInt(_0x11c6cd(0x154))/0x9*(-parseInt(_0x11c6cd(0x157))/0xa)+parseInt(_0x11c6cd(0x14e))/0xb;if(_0x3c3475===_0x1044c7)break;else _0x1a25f4['push'](_0x1a25f4['shift']());}catch(_0x2ba7d1){_0x1a25f4['push'](_0x1a25f4['shift']());}}}(a9_0x135c,0x8cf91));import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x135c(){const _0x596850=['585915fxpLRK','448912qoPAZD','70geGqkj','8pjJdVu','1417825IcaEPf','18pIpqED','396HYxutB','12437PZErRF','6357988MjmLPu','120630mwDxUs','1694994ExDUSx'];a9_0x135c=function(){return _0x596850;};return a9_0x135c();}export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x1ee7(_0x2a9f17,_0x1c7c7a){_0x2a9f17=_0x2a9f17-0x10b;const _0x37c444=a9_0x37c4();let _0x1ee746=_0x37c444[_0x2a9f17];return _0x1ee746;}(function(_0x21b0fb,_0x6e34ee){const _0x4bb0c=a9_0x1ee7,_0x1136f1=_0x21b0fb();while(!![]){try{const _0x2e0e63=-parseInt(_0x4bb0c(0x10b))/0x1*(-parseInt(_0x4bb0c(0x110))/0x2)+-parseInt(_0x4bb0c(0x116))/0x3*(-parseInt(_0x4bb0c(0x111))/0x4)+-parseInt(_0x4bb0c(0x10c))/0x5*(parseInt(_0x4bb0c(0x114))/0x6)+parseInt(_0x4bb0c(0x10d))/0x7*(parseInt(_0x4bb0c(0x112))/0x8)+-parseInt(_0x4bb0c(0x10f))/0x9+-parseInt(_0x4bb0c(0x115))/0xa*(parseInt(_0x4bb0c(0x10e))/0xb)+-parseInt(_0x4bb0c(0x117))/0xc*(-parseInt(_0x4bb0c(0x113))/0xd);if(_0x2e0e63===_0x6e34ee)break;else _0x1136f1['push'](_0x1136f1['shift']());}catch(_0x59e9e7){_0x1136f1['push'](_0x1136f1['shift']());}}}(a9_0x37c4,0x73796));import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];function a9_0x37c4(){const _0x444c04=['93636gbxhKi','24YdUMUu','1tqgipF','15005RTbQwe','490xbCxZn','3245petajd','5567346wfJhXR','545822KVIRHZ','92xzNcVj','91920TIHEPD','3097783Tvapof','948lfsgbj','23930VXWiZp'];a9_0x37c4=function(){return _0x444c04;};return a9_0x37c4();}
@@ -1 +1 @@
1
- (function(_0x59f395,_0x1b6b8e){const _0x521088=a10_0x25c8,_0x5d68d9=_0x59f395();while(!![]){try{const _0x5cfeaf=parseInt(_0x521088(0x149))/0x1+parseInt(_0x521088(0x14e))/0x2*(-parseInt(_0x521088(0x155))/0x3)+parseInt(_0x521088(0x14c))/0x4+-parseInt(_0x521088(0x160))/0x5+parseInt(_0x521088(0x14f))/0x6*(-parseInt(_0x521088(0x15f))/0x7)+parseInt(_0x521088(0x150))/0x8+parseInt(_0x521088(0x162))/0x9;if(_0x5cfeaf===_0x1b6b8e)break;else _0x5d68d9['push'](_0x5d68d9['shift']());}catch(_0x4f3d95){_0x5d68d9['push'](_0x5d68d9['shift']());}}}(a10_0x4cc4,0x373fb));function a10_0x25c8(_0x4792a6,_0x312fe2){_0x4792a6=_0x4792a6-0x149;const _0x4cc495=a10_0x4cc4();let _0x25c8cd=_0x4cc495[_0x4792a6];return _0x25c8cd;}function normalizeTags(_0x3e5eb4){const _0xb9b928=a10_0x25c8;if(Array[_0xb9b928(0x15c)](_0x3e5eb4))return _0x3e5eb4['map'](_0x21dfe0=>String(_0x21dfe0))[_0xb9b928(0x154)](Boolean);if(typeof _0x3e5eb4!=='string')return[];const _0x56472d=_0x3e5eb4[_0xb9b928(0x15a)]();if(!_0x56472d)return[];try{const _0x3c59fe=JSON[_0xb9b928(0x158)](_0x56472d);if(Array[_0xb9b928(0x15c)](_0x3c59fe))return _0x3c59fe[_0xb9b928(0x157)](_0x423dd6=>String(_0x423dd6))['filter'](Boolean);}catch{}return _0x56472d[_0xb9b928(0x15d)](',')[_0xb9b928(0x157)](_0x404b72=>_0x404b72['trim']())['filter'](Boolean);}function a10_0x4cc4(){const _0x5589d2=['value','273916suhoNg','length','434326QzMYRa','82410XDFylK','1326432rnHyuu','updateTime','traceId','appCode','filter','6SdUUyn','key','map','parse','string','trim','tags','isArray','split','gmtModified','35gHisEw','2070135nDvYGj','createTime','7116705vEpJch','118299yspvpj','gmtCreate'];a10_0x4cc4=function(){return _0x5589d2;};return a10_0x4cc4();}export function projectAppConfigVisibilityCheck(_0xb116ae,_0x55f567){const _0x528c54=a10_0x25c8,_0xcc20cd=_0xb116ae[_0x528c54(0x14b)],_0x38c7e6={'appCode':typeof _0xb116ae['appCode']===_0x528c54(0x159)&&_0xb116ae[_0x528c54(0x153)][_0x528c54(0x15a)]()?_0xb116ae['appCode']:_0x55f567['appCode'],'key':typeof _0xb116ae['key']===_0x528c54(0x159)&&_0xb116ae[_0x528c54(0x156)][_0x528c54(0x15a)]()?_0xb116ae['key']:_0x55f567[_0x528c54(0x156)],'tags':normalizeTags(_0xb116ae[_0x528c54(0x15b)]),'hasValue':typeof _0xcc20cd===_0x528c54(0x159)?_0xcc20cd[_0x528c54(0x14d)]>0x0:_0xcc20cd!=null,'valueRedacted':!![],'gmtModified':_0xb116ae[_0x528c54(0x15e)]??_0xb116ae[_0x528c54(0x151)]??'','gmtCreate':_0xb116ae[_0x528c54(0x14a)]??_0xb116ae[_0x528c54(0x161)]??''};return typeof _0xb116ae[_0x528c54(0x152)]===_0x528c54(0x159)&&_0xb116ae['traceId'][_0x528c54(0x15a)]()&&(_0x38c7e6[_0x528c54(0x152)]=_0xb116ae[_0x528c54(0x152)]),_0x38c7e6;}
1
+ function a10_0x5d58(_0x377164,_0x3d066e){_0x377164=_0x377164-0x14c;const _0x5a0748=a10_0x5a07();let _0x5d588a=_0x5a0748[_0x377164];return _0x5d588a;}(function(_0x21ff67,_0xf65e11){const _0x2e76ac=a10_0x5d58,_0x24f40d=_0x21ff67();while(!![]){try{const _0x16ee26=-parseInt(_0x2e76ac(0x15e))/0x1*(parseInt(_0x2e76ac(0x156))/0x2)+-parseInt(_0x2e76ac(0x15b))/0x3+-parseInt(_0x2e76ac(0x158))/0x4*(parseInt(_0x2e76ac(0x164))/0x5)+-parseInt(_0x2e76ac(0x14c))/0x6+-parseInt(_0x2e76ac(0x15c))/0x7*(-parseInt(_0x2e76ac(0x160))/0x8)+-parseInt(_0x2e76ac(0x14f))/0x9*(parseInt(_0x2e76ac(0x150))/0xa)+parseInt(_0x2e76ac(0x154))/0xb;if(_0x16ee26===_0xf65e11)break;else _0x24f40d['push'](_0x24f40d['shift']());}catch(_0x165d17){_0x24f40d['push'](_0x24f40d['shift']());}}}(a10_0x5a07,0x6c8ad));function normalizeTags(_0x1cf50c){const _0x93a9ba=a10_0x5d58;if(Array[_0x93a9ba(0x153)](_0x1cf50c))return _0x1cf50c[_0x93a9ba(0x14e)](_0x262ed2=>String(_0x262ed2))['filter'](Boolean);if(typeof _0x1cf50c!==_0x93a9ba(0x15a))return[];const _0x2c40a1=_0x1cf50c['trim']();if(!_0x2c40a1)return[];try{const _0x623d28=JSON[_0x93a9ba(0x15f)](_0x2c40a1);if(Array['isArray'](_0x623d28))return _0x623d28[_0x93a9ba(0x14e)](_0x5e8914=>String(_0x5e8914))[_0x93a9ba(0x157)](Boolean);}catch{}return _0x2c40a1[_0x93a9ba(0x155)](',')[_0x93a9ba(0x14e)](_0x4818d8=>_0x4818d8[_0x93a9ba(0x14d)]())[_0x93a9ba(0x157)](Boolean);}function a10_0x5a07(){const _0x411e7e=['gmtCreate','updateTime','isArray','16412891rrFcCP','split','2LDhECY','filter','36dPezoO','createTime','string','680421CjePJY','2373469xeqQqz','key','8093LIeRNc','parse','16CaYoPr','tags','traceId','appCode','332285XmlSUi','length','2241498djnHoY','trim','map','778545fxDtpu','60DnNoHU'];a10_0x5a07=function(){return _0x411e7e;};return a10_0x5a07();}export function projectAppConfigVisibilityCheck(_0x314eda,_0x44cf61){const _0x4676b3=a10_0x5d58,_0x1f0e8d=_0x314eda['value'],_0x4ea2b1={'appCode':typeof _0x314eda[_0x4676b3(0x163)]===_0x4676b3(0x15a)&&_0x314eda[_0x4676b3(0x163)][_0x4676b3(0x14d)]()?_0x314eda['appCode']:_0x44cf61[_0x4676b3(0x163)],'key':typeof _0x314eda[_0x4676b3(0x15d)]===_0x4676b3(0x15a)&&_0x314eda['key'][_0x4676b3(0x14d)]()?_0x314eda['key']:_0x44cf61['key'],'tags':normalizeTags(_0x314eda[_0x4676b3(0x161)]),'hasValue':typeof _0x1f0e8d===_0x4676b3(0x15a)?_0x1f0e8d[_0x4676b3(0x165)]>0x0:_0x1f0e8d!=null,'valueRedacted':!![],'gmtModified':_0x314eda['gmtModified']??_0x314eda[_0x4676b3(0x152)]??'','gmtCreate':_0x314eda[_0x4676b3(0x151)]??_0x314eda[_0x4676b3(0x159)]??''};return typeof _0x314eda[_0x4676b3(0x162)]===_0x4676b3(0x15a)&&_0x314eda[_0x4676b3(0x162)]['trim']()&&(_0x4ea2b1[_0x4676b3(0x162)]=_0x314eda[_0x4676b3(0x162)]),_0x4ea2b1;}
@@ -1 +1 @@
1
- const a11_0x31e5eb=a11_0x2492;(function(_0x590a3c,_0xe2b2ab){const _0x313cc6=a11_0x2492,_0x148c43=_0x590a3c();while(!![]){try{const _0x135214=parseInt(_0x313cc6(0x1bb))/0x1*(parseInt(_0x313cc6(0x1d4))/0x2)+parseInt(_0x313cc6(0x1b6))/0x3+-parseInt(_0x313cc6(0x1a2))/0x4+-parseInt(_0x313cc6(0x1ce))/0x5*(parseInt(_0x313cc6(0x1cb))/0x6)+-parseInt(_0x313cc6(0x1a0))/0x7*(parseInt(_0x313cc6(0x19e))/0x8)+parseInt(_0x313cc6(0x1e2))/0x9+parseInt(_0x313cc6(0x1bd))/0xa;if(_0x135214===_0xe2b2ab)break;else _0x148c43['push'](_0x148c43['shift']());}catch(_0x5c9516){_0x148c43['push'](_0x148c43['shift']());}}}(a11_0x5b4a,0xa792d));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=a11_0x31e5eb(0x1d5),ARTIFACT_SOURCE_AGENT=a11_0x31e5eb(0x1a8),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x31e5eb(0x1c2),'react-dom',a11_0x31e5eb(0x19d),a11_0x31e5eb(0x1a5),a11_0x31e5eb(0x1a1),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\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':a11_0x31e5eb(0x1b7),'type':a11_0x31e5eb(0x1d1),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file'},ARTIFACT_NAME_FLAG={'name':a11_0x31e5eb(0x1cc),'type':'string','description':a11_0x31e5eb(0x1a9)},METADATA_FLAG={'name':'metadata','type':a11_0x31e5eb(0x1d1),'description':a11_0x31e5eb(0x1e3)};function isPlainObject(_0x4627d6){const _0x5d35d3=a11_0x31e5eb;return typeof _0x4627d6===_0x5d35d3(0x1c3)&&_0x4627d6!==null&&!Array['isArray'](_0x4627d6);}function readSourceFile(_0x510fe7){const _0x2d17b1=a11_0x31e5eb;if(!_0x510fe7)throw CliErrors[_0x2d17b1(0x1ca)](_0x2d17b1(0x1d3));if(!existsSync(_0x510fe7))throw CliErrors[_0x2d17b1(0x1ca)]('File\x20not\x20found:\x20'+_0x510fe7);if(!statSync(_0x510fe7)[_0x2d17b1(0x1a3)]())throw CliErrors[_0x2d17b1(0x1ca)](_0x2d17b1(0x1cd)+_0x510fe7);const _0x1079bc=readFileSync(_0x510fe7,_0x2d17b1(0x1b3));return validateReactModuleSource(_0x1079bc),_0x1079bc;}function parseMetadata(_0x13b332){const _0x3cde00=a11_0x31e5eb;if(!_0x13b332)return undefined;let _0x57eab2;try{_0x57eab2=JSON[_0x3cde00(0x1a7)](_0x13b332);}catch{throw CliErrors[_0x3cde00(0x1ca)](_0x3cde00(0x1bf)+_0x13b332);}if(!isPlainObject(_0x57eab2))throw CliErrors[_0x3cde00(0x1ca)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x37c056={..._0x57eab2};return delete _0x37c056[_0x3cde00(0x1c0)],_0x37c056;}function getPackageName(_0x37eaee){const _0x2b1828=a11_0x31e5eb;if(_0x37eaee[_0x2b1828(0x1e7)]('@')){const [_0xf36c6e,_0x813fde]=_0x37eaee[_0x2b1828(0x1d8)]('/');return _0xf36c6e&&_0x813fde?_0xf36c6e+'/'+_0x813fde:_0x37eaee;}return _0x37eaee[_0x2b1828(0x1d8)]('/')[0x0]||_0x37eaee;}function validateAllowedImports(_0x37ddf2){const _0x562b2f=a11_0x31e5eb,_0x4c1392=new Set();for(const _0x15fc73 of IMPORT_SOURCE_PATTERNS){_0x15fc73['lastIndex']=0x0;let _0x1dc3b4;while((_0x1dc3b4=_0x15fc73[_0x562b2f(0x19c)](_0x37ddf2))!==null){const _0x2bce7e=_0x1dc3b4[0x1]?.[_0x562b2f(0x1e6)]();_0x2bce7e&&_0x4c1392[_0x562b2f(0x1c4)](_0x2bce7e);}}const _0x113be5=[..._0x4c1392][_0x562b2f(0x1e1)](getPackageName)[_0x562b2f(0x1d7)](_0x4c4505=>!ALLOWED_REACT_MODULE_IMPORTS[_0x562b2f(0x1dd)](_0x4c4505));if(_0x113be5[_0x562b2f(0x1dc)]>0x0)throw CliErrors[_0x562b2f(0x1ca)](_0x562b2f(0x1c7)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x113be5)][_0x562b2f(0x1ab)](',\x20'));}export function validateReactModuleSource(_0x267738){const _0x414c37=a11_0x31e5eb;if(!_0x267738['trim']())throw CliErrors[_0x414c37(0x1ca)](_0x414c37(0x1ac));if(PAGE_LEVEL_PATTERNS[_0x414c37(0x1d0)](_0x3c52c9=>_0x3c52c9[_0x414c37(0x1da)](_0x267738)))throw CliErrors[_0x414c37(0x1ca)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x267738);}function a11_0x2492(_0x223b8f,_0x2db68e){_0x223b8f=_0x223b8f-0x19c;const _0x5b4a34=a11_0x5b4a();let _0x2492e4=_0x5b4a34[_0x223b8f];return _0x2492e4;}function buildArtifactInput(_0x247da6){const _0x3d88a4=a11_0x31e5eb,_0x587810=readSourceFile(_0x247da6[_0x3d88a4(0x1d6)](_0x3d88a4(0x1b7))),_0x34852f=_0x247da6[_0x3d88a4(0x1d6)](_0x3d88a4(0x1cc))[_0x3d88a4(0x1e6)](),_0x12c101=parseMetadata(_0x247da6[_0x3d88a4(0x1d6)](_0x3d88a4(0x1b8)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x34852f?{'name':_0x34852f}:{},'content':_0x587810,..._0x12c101?{'metadata':_0x12c101}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x301917){const _0x16f572=a11_0x31e5eb;return{'id':_0x301917['id'],'name':_0x301917[_0x16f572(0x1cc)],'artifactType':_0x301917['artifactType'],'source':_0x301917[_0x16f572(0x1ba)],'favorite':_0x301917[_0x16f572(0x1a6)],'deleted':_0x301917[_0x16f572(0x1ad)],'createTime':_0x301917[_0x16f572(0x1b5)],'updateTime':_0x301917[_0x16f572(0x1c5)]};}function detailArtifact(_0x56d73d){const _0x48314a=a11_0x31e5eb;return{'id':_0x56d73d['id'],'appCode':_0x56d73d[_0x48314a(0x1d2)],'name':_0x56d73d['name'],'artifactType':_0x56d73d[_0x48314a(0x1c6)],'source':_0x56d73d[_0x48314a(0x1ba)],'favorite':_0x56d73d[_0x48314a(0x1a6)],'deleted':_0x56d73d['deleted'],'content':_0x56d73d[_0x48314a(0x1b9)]??'','compiledContent':_0x56d73d['compiledContent'],'metadata':_0x56d73d['metadata']??{},'createTime':_0x56d73d['createTime'],'updateTime':_0x56d73d['updateTime']};}function a11_0x5b4a(){const _0xcf79c9=['118391pXewKN','antd','3612264AilPDH','isFile','write','dayjs','favorite','parse','AGENT','Artifact\x20display\x20name','Updated\x20Artifact\x20','join','Artifact\x20source\x20file\x20is\x20blank.','deleted','artifact','/update','detail','description','/client/artifact/','utf8','flag','createTime','1057728GSdJXt','file','metadata','content','source','4595pcnaZF','Artifact\x20ID','5944100vikjwF','boolean','Invalid\x20JSON\x20for\x20--metadata:\x20','compiledContent','List\x20current-app\x20react_module\x20Artifacts','react','object','add','updateTime','artifactType','react_module\x20imports\x20are\x20limited\x20to:\x20','Optional\x20favorite-state\x20filter','POST','validation','1190346trsDOP','name','File\x20is\x20not\x20a\x20regular\x20file:\x20','5pLypQz','build','some','string','appCode','File\x20path\x20is\x20required.','346KHPfDv','react_module','str','filter','split','Created\x20Artifact\x20','test','bool','length','includes','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','create','map','10611792DNNxHa','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','read','body','trim','startsWith','num','exec','lodash','536dKCYIz','list'];a11_0x5b4a=function(){return _0xcf79c9;};return a11_0x5b4a();}function readFavoriteFlag(_0x568dcc){const _0x1fa4d4=a11_0x31e5eb,_0x3a2ecb=_0x568dcc[_0x1fa4d4(0x1b4)](_0x1fa4d4(0x1a6));return _0x3a2ecb===undefined||_0x3a2ecb===null||_0x3a2ecb===''?undefined:_0x568dcc['bool'](_0x1fa4d4(0x1a6));}const artifactList={'service':'artifact','command':a11_0x31e5eb(0x19f),'description':a11_0x31e5eb(0x1c1),'risk':a11_0x31e5eb(0x1e4),'flags':[{'name':'source','type':a11_0x31e5eb(0x1d1),'description':a11_0x31e5eb(0x1df)},{'name':a11_0x31e5eb(0x1a6),'type':a11_0x31e5eb(0x1be),'description':a11_0x31e5eb(0x1c8)},VERBOSE_FLAG],async 'execute'(_0x12d253){const _0x134e6=a11_0x31e5eb,_0x35a3b6=await listRuntimeArtifacts(_0x12d253[_0x134e6(0x1d2)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x12d253[_0x134e6(0x1d6)](_0x134e6(0x1ba))?{'source':_0x12d253[_0x134e6(0x1d6)](_0x134e6(0x1ba))}:{},...readFavoriteFlag(_0x12d253)!==undefined?{'favorite':readFavoriteFlag(_0x12d253)}:{}});return{'ok':!![],'data':{'total':_0x35a3b6[_0x134e6(0x1dc)],'items':_0x12d253[_0x134e6(0x1db)]('verbose')?_0x35a3b6:_0x35a3b6[_0x134e6(0x1e1)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x31e5eb(0x1ae),'command':a11_0x31e5eb(0x1b0),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a11_0x31e5eb(0x1bc)}],async 'execute'(_0x28733c){const _0x6bab87=a11_0x31e5eb,_0x4c3850=await getRuntimeArtifact(_0x28733c[_0x6bab87(0x1e8)]('id'),_0x28733c['appCode']);return{'ok':!![],'data':detailArtifact(_0x4c3850)};}},artifactCreate={'service':'artifact','command':a11_0x31e5eb(0x1e0),'description':a11_0x31e5eb(0x1de),'risk':a11_0x31e5eb(0x1a4),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x10a288){const _0xc0fbab=a11_0x31e5eb,_0x3f7401=buildArtifactInput(_0x10a288),_0x46fc90=await createRuntimeArtifact(_0x10a288[_0xc0fbab(0x1d2)],_0x3f7401);return{'ok':!![],'data':detailArtifact(_0x46fc90),'message':_0xc0fbab(0x1d9)+_0x46fc90['id']+(_0x46fc90[_0xc0fbab(0x1cc)]?'\x20('+_0x46fc90['name']+')':'')};},async 'dryRun'(_0x546587){const _0x8b3d71=a11_0x31e5eb,_0x15a9cb=buildArtifactInput(_0x546587);return dryRun(_0x8b3d71(0x1c9),'/client/artifact/create')[_0x8b3d71(0x1e5)]({'appCode':_0x546587['appCode'],..._0x15a9cb})[_0x8b3d71(0x1b1)]('Preview:\x20create\x20react_module\x20Artifact')[_0x8b3d71(0x1cf)]();}},artifactUpdate={'service':a11_0x31e5eb(0x1ae),'command':'update','description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a11_0x31e5eb(0x1a4),'flags':[{...ID_FLAG,'description':a11_0x31e5eb(0x1bc)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x28f50e){const _0x1f5a92=a11_0x31e5eb,_0x383d47=_0x28f50e[_0x1f5a92(0x1e8)]('id'),_0x45b4cf=buildArtifactInput(_0x28f50e),_0x2a64b3=await updateRuntimeArtifact(_0x383d47,_0x28f50e[_0x1f5a92(0x1d2)],_0x45b4cf);return{'ok':!![],'data':detailArtifact(_0x2a64b3),'message':_0x1f5a92(0x1aa)+_0x2a64b3['id']+(_0x2a64b3[_0x1f5a92(0x1cc)]?'\x20('+_0x2a64b3[_0x1f5a92(0x1cc)]+')':'')};},async 'dryRun'(_0x361886){const _0x345449=a11_0x31e5eb,_0x399f4d=_0x361886['num']('id'),_0xf9e310=buildArtifactInput(_0x361886);return dryRun(_0x345449(0x1c9),_0x345449(0x1b2)+_0x399f4d+_0x345449(0x1af))[_0x345449(0x1e5)]({'appCode':_0x361886['appCode'],..._0xf9e310})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x399f4d)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a11_0x5a4399=a11_0x33af;(function(_0x269ac2,_0x2ab330){const _0x4966d0=a11_0x33af,_0x5a2a23=_0x269ac2();while(!![]){try{const _0x5c363f=parseInt(_0x4966d0(0x145))/0x1+parseInt(_0x4966d0(0x155))/0x2*(-parseInt(_0x4966d0(0x15a))/0x3)+-parseInt(_0x4966d0(0x143))/0x4+parseInt(_0x4966d0(0x135))/0x5+-parseInt(_0x4966d0(0x151))/0x6+parseInt(_0x4966d0(0x139))/0x7+parseInt(_0x4966d0(0x14a))/0x8;if(_0x5c363f===_0x2ab330)break;else _0x5a2a23['push'](_0x5a2a23['shift']());}catch(_0x1c050a){_0x5a2a23['push'](_0x5a2a23['shift']());}}}(a11_0x4abb,0x85a00));import{existsSync,readFileSync,statSync}from'node:fs';function a11_0x33af(_0x4145bd,_0x5793fa){_0x4145bd=_0x4145bd-0x117;const _0x4abb4b=a11_0x4abb();let _0x33af46=_0x4abb4b[_0x4145bd];return _0x33af46;}function a11_0x4abb(){const _0x3cd3c7=['2LJioQs','update','Updated\x20Artifact\x20','--metadata\x20must\x20be\x20a\x20JSON\x20object.','appCode','1142673Ajzscy','artifact','write','create','favorite','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','length','body','read','validation','startsWith','file','lastIndex','bool','POST','trim','includes','metadata','name','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','react_module','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','/client/artifact/create','detail','@ant-design/icons','Preview:\x20update\x20react_module\x20Artifact\x20','Preview:\x20create\x20react_module\x20Artifact','string','isArray','object','build','Artifact\x20ID','content','compiledContent','/update','react-dom','Show\x20one\x20Artifact\x20by\x20id','boolean','/client/artifact/','updateTime','artifactType','exec','3904830GiHTbq','Optional\x20favorite-state\x20filter','lodash','File\x20is\x20not\x20a\x20regular\x20file:\x20','631428psecku','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','deleted','num','react','isFile','Created\x20Artifact\x20','List\x20current-app\x20react_module\x20Artifacts','source','antd','90812AljdWa','.\x20Unsupported:\x20','233343vbBmIc','createTime','AGENT','utf8','Artifact\x20source\x20file\x20is\x20blank.','4486280joHoES','description','File\x20not\x20found:\x20','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','split','filter','dayjs','4286256SBpfWD','Artifact\x20display\x20name','map','str'];a11_0x4abb=function(){return _0x3cd3c7;};return a11_0x4abb();}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=a11_0x5a4399(0x11f),ARTIFACT_SOURCE_AGENT=a11_0x5a4399(0x147),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x5a4399(0x13d),a11_0x5a4399(0x12e),a11_0x5a4399(0x137),a11_0x5a4399(0x150),a11_0x5a4399(0x142),a11_0x5a4399(0x123)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\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':a11_0x5a4399(0x165),'type':'string','required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file'},ARTIFACT_NAME_FLAG={'name':a11_0x5a4399(0x11d),'type':'string','description':a11_0x5a4399(0x152)},METADATA_FLAG={'name':a11_0x5a4399(0x11c),'type':a11_0x5a4399(0x126),'description':a11_0x5a4399(0x15f)};function isPlainObject(_0x2e507a){const _0x5ae454=a11_0x5a4399;return typeof _0x2e507a===_0x5ae454(0x128)&&_0x2e507a!==null&&!Array[_0x5ae454(0x127)](_0x2e507a);}function readSourceFile(_0x58fb15){const _0x28aa67=a11_0x5a4399;if(!_0x58fb15)throw CliErrors[_0x28aa67(0x163)]('File\x20path\x20is\x20required.');if(!existsSync(_0x58fb15))throw CliErrors[_0x28aa67(0x163)](_0x28aa67(0x14c)+_0x58fb15);if(!statSync(_0x58fb15)[_0x28aa67(0x13e)]())throw CliErrors['validation'](_0x28aa67(0x138)+_0x58fb15);const _0x1f9cf5=readFileSync(_0x58fb15,_0x28aa67(0x148));return validateReactModuleSource(_0x1f9cf5),_0x1f9cf5;}function parseMetadata(_0x5db738){const _0x2c16b2=a11_0x5a4399;if(!_0x5db738)return undefined;let _0x2acd7f;try{_0x2acd7f=JSON['parse'](_0x5db738);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x5db738);}if(!isPlainObject(_0x2acd7f))throw CliErrors[_0x2c16b2(0x163)](_0x2c16b2(0x158));const _0x4821d8={..._0x2acd7f};return delete _0x4821d8[_0x2c16b2(0x12c)],_0x4821d8;}function getPackageName(_0x322998){const _0x2eb77c=a11_0x5a4399;if(_0x322998[_0x2eb77c(0x164)]('@')){const [_0x282323,_0x1676b9]=_0x322998[_0x2eb77c(0x14e)]('/');return _0x282323&&_0x1676b9?_0x282323+'/'+_0x1676b9:_0x322998;}return _0x322998[_0x2eb77c(0x14e)]('/')[0x0]||_0x322998;}function validateAllowedImports(_0x2189b6){const _0x551f8f=a11_0x5a4399,_0x21affc=new Set();for(const _0x4321b6 of IMPORT_SOURCE_PATTERNS){_0x4321b6[_0x551f8f(0x117)]=0x0;let _0x1a6bae;while((_0x1a6bae=_0x4321b6[_0x551f8f(0x134)](_0x2189b6))!==null){const _0x213046=_0x1a6bae[0x1]?.[_0x551f8f(0x11a)]();_0x213046&&_0x21affc['add'](_0x213046);}}const _0x438b54=[..._0x21affc]['map'](getPackageName)[_0x551f8f(0x14f)](_0x15ca1a=>!ALLOWED_REACT_MODULE_IMPORTS[_0x551f8f(0x11b)](_0x15ca1a));if(_0x438b54['length']>0x0)throw CliErrors[_0x551f8f(0x163)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x551f8f(0x144)+[...new Set(_0x438b54)]['join'](',\x20'));}export function validateReactModuleSource(_0x5a9240){const _0x24de42=a11_0x5a4399;if(!_0x5a9240['trim']())throw CliErrors[_0x24de42(0x163)](_0x24de42(0x149));if(PAGE_LEVEL_PATTERNS['some'](_0x180705=>_0x180705['test'](_0x5a9240)))throw CliErrors[_0x24de42(0x163)](_0x24de42(0x11e));validateAllowedImports(_0x5a9240);}function buildArtifactInput(_0x55403e){const _0x522774=a11_0x5a4399,_0x28c7c0=readSourceFile(_0x55403e[_0x522774(0x154)](_0x522774(0x165))),_0x4a7ffb=_0x55403e[_0x522774(0x154)]('name')[_0x522774(0x11a)](),_0x2e5182=parseMetadata(_0x55403e[_0x522774(0x154)](_0x522774(0x11c)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4a7ffb?{'name':_0x4a7ffb}:{},'content':_0x28c7c0,..._0x2e5182?{'metadata':_0x2e5182}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x4c8555){const _0x2f865a=a11_0x5a4399;return{'id':_0x4c8555['id'],'name':_0x4c8555[_0x2f865a(0x11d)],'artifactType':_0x4c8555['artifactType'],'source':_0x4c8555['source'],'favorite':_0x4c8555[_0x2f865a(0x15e)],'deleted':_0x4c8555[_0x2f865a(0x13b)],'createTime':_0x4c8555['createTime'],'updateTime':_0x4c8555[_0x2f865a(0x132)]};}function detailArtifact(_0x4bdf80){const _0x50ac17=a11_0x5a4399;return{'id':_0x4bdf80['id'],'appCode':_0x4bdf80[_0x50ac17(0x159)],'name':_0x4bdf80[_0x50ac17(0x11d)],'artifactType':_0x4bdf80[_0x50ac17(0x133)],'source':_0x4bdf80['source'],'favorite':_0x4bdf80[_0x50ac17(0x15e)],'deleted':_0x4bdf80[_0x50ac17(0x13b)],'content':_0x4bdf80[_0x50ac17(0x12b)]??'','compiledContent':_0x4bdf80[_0x50ac17(0x12c)],'metadata':_0x4bdf80['metadata']??{},'createTime':_0x4bdf80[_0x50ac17(0x146)],'updateTime':_0x4bdf80[_0x50ac17(0x132)]};}function readFavoriteFlag(_0x3b1682){const _0x4d585b=a11_0x5a4399,_0x5b55b2=_0x3b1682['flag'](_0x4d585b(0x15e));return _0x5b55b2===undefined||_0x5b55b2===null||_0x5b55b2===''?undefined:_0x3b1682[_0x4d585b(0x118)](_0x4d585b(0x15e));}const artifactList={'service':'artifact','command':'list','description':a11_0x5a4399(0x140),'risk':a11_0x5a4399(0x162),'flags':[{'name':a11_0x5a4399(0x141),'type':'string','description':a11_0x5a4399(0x14d)},{'name':a11_0x5a4399(0x15e),'type':a11_0x5a4399(0x130),'description':a11_0x5a4399(0x136)},VERBOSE_FLAG],async 'execute'(_0x52e8b9){const _0x31ed27=a11_0x5a4399,_0x4682fd=await listRuntimeArtifacts(_0x52e8b9[_0x31ed27(0x159)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x52e8b9['str']('source')?{'source':_0x52e8b9['str'](_0x31ed27(0x141))}:{},...readFavoriteFlag(_0x52e8b9)!==undefined?{'favorite':readFavoriteFlag(_0x52e8b9)}:{}});return{'ok':!![],'data':{'total':_0x4682fd[_0x31ed27(0x160)],'items':_0x52e8b9[_0x31ed27(0x118)]('verbose')?_0x4682fd:_0x4682fd[_0x31ed27(0x153)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x5a4399(0x15b),'command':a11_0x5a4399(0x122),'description':a11_0x5a4399(0x12f),'risk':a11_0x5a4399(0x162),'flags':[{...ID_FLAG,'description':a11_0x5a4399(0x12a)}],async 'execute'(_0x349c18){const _0x364ed1=a11_0x5a4399,_0x29efac=await getRuntimeArtifact(_0x349c18[_0x364ed1(0x13c)]('id'),_0x349c18[_0x364ed1(0x159)]);return{'ok':!![],'data':detailArtifact(_0x29efac)};}},artifactCreate={'service':a11_0x5a4399(0x15b),'command':a11_0x5a4399(0x15d),'description':a11_0x5a4399(0x13a),'risk':a11_0x5a4399(0x15c),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x33fce9){const _0x176cc1=a11_0x5a4399,_0x3d57ee=buildArtifactInput(_0x33fce9),_0x336204=await createRuntimeArtifact(_0x33fce9[_0x176cc1(0x159)],_0x3d57ee);return{'ok':!![],'data':detailArtifact(_0x336204),'message':_0x176cc1(0x13f)+_0x336204['id']+(_0x336204[_0x176cc1(0x11d)]?'\x20('+_0x336204[_0x176cc1(0x11d)]+')':'')};},async 'dryRun'(_0x424328){const _0xe5fb09=a11_0x5a4399,_0x561d2c=buildArtifactInput(_0x424328);return dryRun(_0xe5fb09(0x119),_0xe5fb09(0x121))['body']({'appCode':_0x424328[_0xe5fb09(0x159)],..._0x561d2c})['description'](_0xe5fb09(0x125))['build']();}},artifactUpdate={'service':a11_0x5a4399(0x15b),'command':a11_0x5a4399(0x156),'description':a11_0x5a4399(0x120),'risk':a11_0x5a4399(0x15c),'flags':[{...ID_FLAG,'description':a11_0x5a4399(0x12a)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3246e3){const _0x2334d5=a11_0x5a4399,_0x227d5e=_0x3246e3[_0x2334d5(0x13c)]('id'),_0x3398fe=buildArtifactInput(_0x3246e3),_0x4f60ed=await updateRuntimeArtifact(_0x227d5e,_0x3246e3['appCode'],_0x3398fe);return{'ok':!![],'data':detailArtifact(_0x4f60ed),'message':_0x2334d5(0x157)+_0x4f60ed['id']+(_0x4f60ed['name']?'\x20('+_0x4f60ed[_0x2334d5(0x11d)]+')':'')};},async 'dryRun'(_0x263f79){const _0x20d58d=a11_0x5a4399,_0x409297=_0x263f79['num']('id'),_0x4177c5=buildArtifactInput(_0x263f79);return dryRun('POST',_0x20d58d(0x131)+_0x409297+_0x20d58d(0x12d))[_0x20d58d(0x161)]({'appCode':_0x263f79[_0x20d58d(0x159)],..._0x4177c5})[_0x20d58d(0x14b)](_0x20d58d(0x124)+_0x409297)[_0x20d58d(0x129)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a12_0x57cdfb=a12_0x5176;(function(_0x2edb0d,_0x47ea0c){const _0x52269e=a12_0x5176,_0x4c6c93=_0x2edb0d();while(!![]){try{const _0x2d7bf4=-parseInt(_0x52269e(0x7e))/0x1+parseInt(_0x52269e(0x96))/0x2*(parseInt(_0x52269e(0x92))/0x3)+parseInt(_0x52269e(0xb5))/0x4+-parseInt(_0x52269e(0xc8))/0x5*(parseInt(_0x52269e(0xc2))/0x6)+parseInt(_0x52269e(0xc9))/0x7+-parseInt(_0x52269e(0xcd))/0x8*(-parseInt(_0x52269e(0x76))/0x9)+-parseInt(_0x52269e(0x8a))/0xa;if(_0x2d7bf4===_0x47ea0c)break;else _0x4c6c93['push'](_0x4c6c93['shift']());}catch(_0x564525){_0x4c6c93['push'](_0x4c6c93['shift']());}}}(a12_0x8079,0x33c8e));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 a12_0x5176(_0x4b9452,_0x49eaa1){_0x4b9452=_0x4b9452-0x74;const _0x80797f=a12_0x8079();let _0x5176ec=_0x80797f[_0x4b9452];return _0x5176ec;}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 _0x3e35c5=a12_0x5176;writeCliSideChannelLine(_0x3e35c5(0x93)+PRODUCT_CONFIG[_0x3e35c5(0x80)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3e35c5(0xb6)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3e35c5(0x7d));}function buildAccessKeySetupGuide(){const _0x575461=a12_0x5176;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x575461(0x80)]+':',USER_ACCESS_KEY_CREATE_URL,_0x575461(0xa5)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x575461(0x91)]('\x0a');}function canPromptForAccessKey(_0x54f442){const _0xb147a9=a12_0x5176;return!_0x54f442[_0xb147a9(0xa7)]&&process['stdin'][_0xb147a9(0x9d)]!==![]&&process[_0xb147a9(0xbe)][_0xb147a9(0x9d)]!==![];}function resolveAuthScopeFlags(_0x1658e4){const _0xe648d0=a12_0x5176;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1658e4[_0xe648d0(0xab)](_0xe648d0(0xbf)),'explicitProject':_0x1658e4[_0xe648d0(0xab)](_0xe648d0(0x82)),'policy':_0xe648d0(0x9f)}));}function a12_0x8079(){const _0x512b67=['global','daily','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','270qyyQjs','\x20auth\x20status','\x20scope.','AccessKey\x20(ak_xxx...)','read','Read\x20from\x20global\x20config\x20(default)','6585gNSLhu','1333563UXDwpt','\x20(via\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20mode:\x20','848tTHWdH','test','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','11124ttaXOE','Shorthand\x20for\x20--access-key','Option\x20C:\x20environment\x20variable','AccessKey\x20saved\x20to\x20','Clear\x20accessKey\x20from\x20config','yes','development','\x20auth\x20login\x20--access-key\x20<ak_xxx>','335076MfhrIi','init','userCenterDisplayName','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','project','\x20Verify:\x20','env','ACCESS_KEY','str','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Clear\x20from\x20global\x20config\x20(default)','Then\x20verify\x20with:\x20','3306560fdZcqM','\x20env\x20var','validation','ClientAk','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','length','production','join','39huwEbF','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20config.','AccessKey:\x20','34978iOdjQN','Auth\x20config\x20reinitialized\x20in\x20','envName','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','auth','\x20config','Option\x20B:\x20apps\x20config\x20(','isTTY','\x20\x20export\x20','global-default','repeat','newConfigFileName','Invalid\x20accessKey\x20format:\x20\x22','status','push','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','nonInteractive','\x20config.\x20Nothing\x20to\x20clear.','AccessKey\x20cleared\x20from\x20','slice','bool','trim','login','Write\x20to\x20global\x20config\x20(default)','cancelled','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','string','write','access-key','boolean','1552900oBogfh','Tip:\x20you\x20can\x20also\x20run:','accessKey','Missing\x20accessKey.','Show\x20current\x20authentication\x20status','\x20Current\x20env:\x20','info','=ak_xxx','Use\x20`','stdout'];a12_0x8079=function(){return _0x512b67;};return a12_0x8079();}async function resolveAuthWriteInput(_0x4777f9){const _0x513a28=a12_0x5176;let _0x4d3af7=(_0x4777f9['str']('access-key')||_0x4777f9[_0x513a28(0x86)]('ak')||'')[_0x513a28(0xac)]();const _0x32ef00=(_0x4777f9[_0x513a28(0x86)](_0x513a28(0x84))||'')['trim']();if(!_0x4d3af7&&canPromptForAccessKey(_0x4777f9))try{showAccessKeyCreateHint(),_0x4d3af7=await promptAccessKey('');}catch(_0x3449d9){if(isAbortPrompt(_0x3449d9))throw CliErrors[_0x513a28(0xaf)]();throw _0x3449d9;}if(!_0x4d3af7)throw CliErrors[_0x513a28(0x8c)](_0x513a28(0xb8),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x513a28(0x74)](_0x4d3af7))throw CliErrors[_0x513a28(0x8c)](_0x513a28(0xa2)+_0x4d3af7+'\x22',_0x513a28(0x87));if(!_0x32ef00)return{'accessKey':_0x4d3af7};const _0x5a13f0=normalizeEnv(_0x32ef00);return{'accessKey':_0x4d3af7,'env':isDaily(_0x5a13f0)?_0x513a28(0xc0):isDev(_0x5a13f0)?_0x513a28(0x7c):_0x513a28(0x90)};}export const authDefinitions=[{'service':a12_0x57cdfb(0x9a),'command':a12_0x57cdfb(0xad),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a12_0x57cdfb(0xb2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x57cdfb(0xb1),'description':a12_0x57cdfb(0xc5)},{'name':'ak','type':'string','description':a12_0x57cdfb(0x77)},{'name':a12_0x57cdfb(0xbf),'type':'boolean','description':a12_0x57cdfb(0xae),'default':!![]},{'name':a12_0x57cdfb(0x82),'type':a12_0x57cdfb(0xb4),'description':a12_0x57cdfb(0x8e),'default':![]}],async 'execute'(_0x2787fe){const _0x4faee7=a12_0x57cdfb;if(_0x2787fe[_0x4faee7(0xab)](_0x4faee7(0x7b)))throw CliErrors[_0x4faee7(0x8c)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x4faee7(0xbd)+CLI_BIN_NAME+_0x4faee7(0x81)+CLI_BIN_NAME+_0x4faee7(0xa6));const _0x210812=(_0x2787fe['str'](_0x4faee7(0xb3))||_0x2787fe[_0x4faee7(0x86)]('ak')||'')['trim']();if(!_0x210812&&_0x2787fe[_0x4faee7(0xa7)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0xb71a82=await resolveAuthWriteInput(_0x2787fe),_0x5c1047=resolveAuthScopeFlags(_0x2787fe),_0x13e59c=readScopedConfig(_0x5c1047);_0x13e59c[_0x4faee7(0xb7)]=_0xb71a82['accessKey'];_0xb71a82[_0x4faee7(0x84)]&&(_0x13e59c['env']=_0xb71a82[_0x4faee7(0x84)]);writeScopedConfig(_0x13e59c,_0x5c1047);const _0x588b72=_0x5c1047[_0x4faee7(0xbf)]?_0x4faee7(0xbf):_0x4faee7(0x82),_0x32631b=_0x13e59c[_0x4faee7(0x84)]?_0x4faee7(0xba)+_0x13e59c[_0x4faee7(0x84)]+'.':'';return{'ok':!![],'message':_0x4faee7(0x79)+_0x588b72+'\x20config.'+_0x32631b+_0x4faee7(0x83)+CLI_BIN_NAME+_0x4faee7(0xc3)};}},{'service':a12_0x57cdfb(0x9a),'command':a12_0x57cdfb(0x7f),'description':a12_0x57cdfb(0x99),'risk':a12_0x57cdfb(0xb2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x57cdfb(0xb3),'type':a12_0x57cdfb(0xb1),'description':a12_0x57cdfb(0xc5)},{'name':'ak','type':a12_0x57cdfb(0xb1),'description':a12_0x57cdfb(0x77)},{'name':a12_0x57cdfb(0x84),'type':a12_0x57cdfb(0xb1),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a12_0x57cdfb(0xbf),'type':'boolean','description':a12_0x57cdfb(0xae),'default':!![]},{'name':a12_0x57cdfb(0x82),'type':a12_0x57cdfb(0xb4),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x11578d){const _0x156695=a12_0x57cdfb,_0x2a5142=await resolveAuthWriteInput(_0x11578d),_0xa46bb=resolveAuthScopeFlags(_0x11578d),_0x397ad8={'accessKey':_0x2a5142[_0x156695(0xb7)]};_0x2a5142['env']&&(_0x397ad8[_0x156695(0x84)]=_0x2a5142[_0x156695(0x84)]);writeScopedConfig(_0x397ad8,_0xa46bb);const _0x3d252b=_0xa46bb[_0x156695(0xbf)]?_0x156695(0xbf):_0x156695(0x82),_0x2e4763=_0x397ad8[_0x156695(0x84)]?_0x156695(0xba)+_0x397ad8['env']+'.':'';return{'ok':!![],'message':_0x156695(0x97)+_0x3d252b+_0x156695(0xc4)+_0x2e4763+_0x156695(0x83)+CLI_BIN_NAME+_0x156695(0xc3)};}},{'service':a12_0x57cdfb(0x9a),'command':'logout','description':a12_0x57cdfb(0x7a),'risk':a12_0x57cdfb(0xb2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x57cdfb(0xbf),'type':a12_0x57cdfb(0xb4),'description':a12_0x57cdfb(0x88),'default':!![]},{'name':'project','type':'boolean','description':a12_0x57cdfb(0xcb),'default':![]}],async 'execute'(_0xd07f33){const _0x34af62=a12_0x57cdfb,_0x48132f=resolveAuthScopeFlags(_0xd07f33),_0x45d363=readScopedConfig(_0x48132f),_0x386695=!!_0x45d363['accessKey'];delete _0x45d363['accessKey'],writeScopedConfig(_0x45d363,_0x48132f);const _0x3eb9a4=_0x48132f['global']?'global':_0x34af62(0x82);if(_0x386695)return{'ok':!![],'message':_0x34af62(0xa9)+_0x3eb9a4+_0x34af62(0x94)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x3eb9a4+_0x34af62(0xa8)};}},{'service':a12_0x57cdfb(0x9a),'command':a12_0x57cdfb(0xa3),'description':a12_0x57cdfb(0xb9),'risk':a12_0x57cdfb(0xc6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x57cdfb(0xbf),'type':a12_0x57cdfb(0xb4),'description':a12_0x57cdfb(0xc7),'default':!![]},{'name':a12_0x57cdfb(0x82),'type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x289fe3){const _0x272ef3=a12_0x57cdfb,_0x2d3458=resolveAuthScopeFlags(_0x289fe3),_0x2e7317=readScopedConfig(_0x2d3458),_0x23c8a6=productEnvName(_0x272ef3(0x85)),_0x455e13=productEnv(_0x272ef3(0x85))||undefined,_0x44f7b0=_0x2e7317[_0x272ef3(0xb7)]||undefined,_0x163ed8=_0x455e13||_0x44f7b0,_0xa25e8c=_0x455e13?_0x23c8a6+_0x272ef3(0x8b):_0x44f7b0?(_0x2d3458[_0x272ef3(0xbf)]?_0x272ef3(0xbf):'project')+_0x272ef3(0x9b):null,_0x221613=[_0x272ef3(0xcc)+AUTH_MODE[_0x272ef3(0x8d)]];if(_0x163ed8){const _0x2b2c98=_0x163ed8[_0x272ef3(0x8f)]>0x8?''+_0x163ed8[_0x272ef3(0xaa)](0x0,0x8)+'*'[_0x272ef3(0xa0)](_0x163ed8[_0x272ef3(0x8f)]-0x8):_0x163ed8;_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x95)+_0x2b2c98+(_0xa25e8c?_0x272ef3(0xca)+_0xa25e8c+')':''));}return!_0x163ed8&&(_0x221613['push'](''),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x75)),_0x221613['push'](''),_0x221613[_0x272ef3(0xa4)]('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x221613[_0x272ef3(0xa4)](''),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x9c)+PRODUCT_CONFIG[_0x272ef3(0xa1)]+')'),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0xc1)),_0x221613[_0x272ef3(0xa4)](''),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x78)),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x9e)+_0x23c8a6+_0x272ef3(0xbc)),_0x221613[_0x272ef3(0xa4)](''),_0x221613[_0x272ef3(0xa4)](_0x272ef3(0x89)+CLI_BIN_NAME+_0x272ef3(0xc3)),_0x221613['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x221613[_0x272ef3(0x91)]('\x0a')};}},{'service':a12_0x57cdfb(0x9a),'command':a12_0x57cdfb(0xbb),'description':a12_0x57cdfb(0xb0),'risk':a12_0x57cdfb(0xc6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x405453){const _0x5ab548=a12_0x57cdfb,_0x4ea156=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4ea156,'meta':{'env':_0x405453[_0x5ab548(0x98)]??_0x5ab548(0x90)}}};}}];
1
+ function a12_0x3b4a(_0x591d8d,_0x142385){_0x591d8d=_0x591d8d-0xcb;const _0x474753=a12_0x4747();let _0x3b4a6d=_0x474753[_0x591d8d];return _0x3b4a6d;}const a12_0x2c90b2=a12_0x3b4a;(function(_0x41a956,_0x98ea1c){const _0x1fb095=a12_0x3b4a,_0x47c9e0=_0x41a956();while(!![]){try{const _0x4373b5=parseInt(_0x1fb095(0x119))/0x1+-parseInt(_0x1fb095(0x112))/0x2*(parseInt(_0x1fb095(0xd1))/0x3)+-parseInt(_0x1fb095(0x105))/0x4*(-parseInt(_0x1fb095(0xfd))/0x5)+parseInt(_0x1fb095(0xed))/0x6+parseInt(_0x1fb095(0xf7))/0x7+parseInt(_0x1fb095(0xf6))/0x8+-parseInt(_0x1fb095(0x101))/0x9*(parseInt(_0x1fb095(0xe2))/0xa);if(_0x4373b5===_0x98ea1c)break;else _0x47c9e0['push'](_0x47c9e0['shift']());}catch(_0x3dc7e1){_0x47c9e0['push'](_0x47c9e0['shift']());}}}(a12_0x4747,0xd8ee8));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 _0x3b073a=a12_0x3b4a;writeCliSideChannelLine(_0x3b073a(0xe6)+PRODUCT_CONFIG[_0x3b073a(0xde)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3b073a(0xea)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3b073a(0x118));}function buildAccessKeySetupGuide(){const _0x1e983d=a12_0x3b4a;return[_0x1e983d(0xe6)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x1e983d(0xe8)]['join']('\x0a');}function canPromptForAccessKey(_0x56c32a){const _0x114ed9=a12_0x3b4a;return!_0x56c32a[_0x114ed9(0x11d)]&&process[_0x114ed9(0xd3)][_0x114ed9(0xe5)]!==![]&&process[_0x114ed9(0xcc)][_0x114ed9(0xe5)]!==![];}function resolveAuthScopeFlags(_0x36d6d0){const _0x26c325=a12_0x3b4a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x36d6d0[_0x26c325(0x104)](_0x26c325(0xf2)),'explicitProject':_0x36d6d0['bool'](_0x26c325(0x103)),'policy':_0x26c325(0xd7)}));}async function resolveAuthWriteInput(_0x2934ff){const _0x47d00f=a12_0x3b4a;let _0x515f5a=(_0x2934ff[_0x47d00f(0x115)]('access-key')||_0x2934ff[_0x47d00f(0x115)]('ak')||'')[_0x47d00f(0x10a)]();const _0x81c1a8=(_0x2934ff[_0x47d00f(0x115)]('env')||'')['trim']();if(!_0x515f5a&&canPromptForAccessKey(_0x2934ff))try{showAccessKeyCreateHint(),_0x515f5a=await promptAccessKey('');}catch(_0x3d24da){if(isAbortPrompt(_0x3d24da))throw CliErrors[_0x47d00f(0x109)]();throw _0x3d24da;}if(!_0x515f5a)throw CliErrors['validation'](_0x47d00f(0xfb),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x515f5a))throw CliErrors[_0x47d00f(0xdb)](_0x47d00f(0x11e)+_0x515f5a+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x81c1a8)return{'accessKey':_0x515f5a};const _0x2c4587=normalizeEnv(_0x81c1a8);return{'accessKey':_0x515f5a,'env':isDaily(_0x2c4587)?_0x47d00f(0xe7):isDev(_0x2c4587)?_0x47d00f(0x110):'production'};}export const authDefinitions=[{'service':a12_0x2c90b2(0x113),'command':a12_0x2c90b2(0x10e),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2c90b2(0x111),'type':a12_0x2c90b2(0x106),'description':a12_0x2c90b2(0xd0)},{'name':'ak','type':a12_0x2c90b2(0x106),'description':a12_0x2c90b2(0x10c)},{'name':a12_0x2c90b2(0xf2),'type':a12_0x2c90b2(0x102),'description':a12_0x2c90b2(0x107),'default':!![]},{'name':'project','type':a12_0x2c90b2(0x102),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xc64a3e){const _0x49d14f=a12_0x2c90b2;if(_0xc64a3e['bool'](_0x49d14f(0xd4)))throw CliErrors[_0x49d14f(0xdb)](_0x49d14f(0xf4),_0x49d14f(0xdf)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x49d14f(0xe1));const _0x5c461a=(_0xc64a3e[_0x49d14f(0x115)](_0x49d14f(0x111))||_0xc64a3e[_0x49d14f(0x115)]('ak')||'')['trim']();if(!_0x5c461a&&_0xc64a3e[_0x49d14f(0x11d)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0xfb27b2=await resolveAuthWriteInput(_0xc64a3e),_0x2fecf8=resolveAuthScopeFlags(_0xc64a3e),_0x3fde39=readScopedConfig(_0x2fecf8);_0x3fde39['accessKey']=_0xfb27b2[_0x49d14f(0xd5)];_0xfb27b2['env']&&(_0x3fde39[_0x49d14f(0xf8)]=_0xfb27b2['env']);writeScopedConfig(_0x3fde39,_0x2fecf8);const _0xafdb37=_0x2fecf8[_0x49d14f(0xf2)]?_0x49d14f(0xf2):'project',_0x5c0f02=_0x3fde39[_0x49d14f(0xf8)]?_0x49d14f(0x117)+_0x3fde39[_0x49d14f(0xf8)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0xafdb37+'\x20config.'+_0x5c0f02+_0x49d14f(0x11f)+CLI_BIN_NAME+_0x49d14f(0xcf)};}},{'service':a12_0x2c90b2(0x113),'command':a12_0x2c90b2(0xe3),'description':a12_0x2c90b2(0xd9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2c90b2(0x111),'type':a12_0x2c90b2(0x106),'description':a12_0x2c90b2(0xd0)},{'name':'ak','type':a12_0x2c90b2(0x106),'description':a12_0x2c90b2(0x10c)},{'name':'env','type':a12_0x2c90b2(0x106),'description':a12_0x2c90b2(0xee)},{'name':a12_0x2c90b2(0xf2),'type':a12_0x2c90b2(0x102),'description':a12_0x2c90b2(0x107),'default':!![]},{'name':a12_0x2c90b2(0x103),'type':a12_0x2c90b2(0x102),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5a7805){const _0x5e8c7d=a12_0x2c90b2,_0x1a5a98=await resolveAuthWriteInput(_0x5a7805),_0xf085dc=resolveAuthScopeFlags(_0x5a7805),_0x3bfa64={'accessKey':_0x1a5a98['accessKey']};_0x1a5a98[_0x5e8c7d(0xf8)]&&(_0x3bfa64[_0x5e8c7d(0xf8)]=_0x1a5a98[_0x5e8c7d(0xf8)]);writeScopedConfig(_0x3bfa64,_0xf085dc);const _0x239ced=_0xf085dc[_0x5e8c7d(0xf2)]?_0x5e8c7d(0xf2):_0x5e8c7d(0x103),_0xe2ada3=_0x3bfa64[_0x5e8c7d(0xf8)]?_0x5e8c7d(0x117)+_0x3bfa64[_0x5e8c7d(0xf8)]+'.':'';return{'ok':!![],'message':_0x5e8c7d(0xf9)+_0x239ced+_0x5e8c7d(0x11c)+_0xe2ada3+_0x5e8c7d(0x11f)+CLI_BIN_NAME+_0x5e8c7d(0xcf)};}},{'service':a12_0x2c90b2(0x113),'command':a12_0x2c90b2(0x116),'description':a12_0x2c90b2(0x11b),'risk':a12_0x2c90b2(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2c90b2(0xf2),'type':'boolean','description':a12_0x2c90b2(0xd2),'default':!![]},{'name':a12_0x2c90b2(0x103),'type':'boolean','description':a12_0x2c90b2(0xcb),'default':![]}],async 'execute'(_0x496a8a){const _0x3494fe=a12_0x2c90b2,_0x31a29b=resolveAuthScopeFlags(_0x496a8a),_0x4df68c=readScopedConfig(_0x31a29b),_0xf129fe=!!_0x4df68c[_0x3494fe(0xd5)];delete _0x4df68c[_0x3494fe(0xd5)],writeScopedConfig(_0x4df68c,_0x31a29b);const _0x4666b5=_0x31a29b[_0x3494fe(0xf2)]?'global':'project';if(_0xf129fe)return{'ok':!![],'message':_0x3494fe(0xff)+_0x4666b5+_0x3494fe(0xe9)};return{'ok':!![],'message':_0x3494fe(0xf1)+_0x4666b5+_0x3494fe(0xda)};}},{'service':'auth','command':'status','description':'Show\x20current\x20authentication\x20status','risk':a12_0x2c90b2(0xf0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2c90b2(0xf2),'type':a12_0x2c90b2(0x102),'description':a12_0x2c90b2(0xdc),'default':!![]},{'name':a12_0x2c90b2(0x103),'type':a12_0x2c90b2(0x102),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2d9e31){const _0x265ba4=a12_0x2c90b2,_0x391cf3=resolveAuthScopeFlags(_0x2d9e31),_0x3e1046=readScopedConfig(_0x391cf3),_0x2df26a=productEnvName(_0x265ba4(0xfa)),_0x376fcc=productEnv('ACCESS_KEY')||undefined,_0x4d85d7=_0x3e1046[_0x265ba4(0xd5)]||undefined,_0x464c6f=_0x376fcc||_0x4d85d7,_0x3229ad=_0x376fcc?_0x2df26a+_0x265ba4(0x10b):_0x4d85d7?(_0x391cf3[_0x265ba4(0xf2)]?'global':_0x265ba4(0x103))+'\x20config':null,_0x16dc73=[_0x265ba4(0xcd)+AUTH_MODE['ClientAk']];if(_0x464c6f){const _0x4328ca=_0x464c6f[_0x265ba4(0xe4)]>0x8?''+_0x464c6f[_0x265ba4(0x10f)](0x0,0x8)+'*'[_0x265ba4(0xec)](_0x464c6f[_0x265ba4(0xe4)]-0x8):_0x464c6f;_0x16dc73[_0x265ba4(0xfc)]('AccessKey:\x20'+_0x4328ca+(_0x3229ad?_0x265ba4(0xdd)+_0x3229ad+')':''));}return!_0x464c6f&&(_0x16dc73['push'](''),_0x16dc73['push'](_0x265ba4(0xd8)),_0x16dc73['push'](''),_0x16dc73[_0x265ba4(0xfc)](_0x265ba4(0x100)+CLI_BIN_NAME+_0x265ba4(0xef)),_0x16dc73[_0x265ba4(0xfc)](''),_0x16dc73[_0x265ba4(0xfc)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x16dc73['push'](_0x265ba4(0xeb)),_0x16dc73[_0x265ba4(0xfc)](''),_0x16dc73[_0x265ba4(0xfc)](_0x265ba4(0x114)),_0x16dc73['push']('\x20\x20export\x20'+_0x2df26a+_0x265ba4(0xe0)),_0x16dc73[_0x265ba4(0xfc)](''),_0x16dc73['push'](_0x265ba4(0xf3)+CLI_BIN_NAME+_0x265ba4(0xcf)),_0x16dc73[_0x265ba4(0xfc)](_0x265ba4(0xfe)+CLI_BIN_NAME+_0x265ba4(0xd6))),{'ok':!![],'message':_0x16dc73['join']('\x0a')};}},{'service':a12_0x2c90b2(0x113),'command':a12_0x2c90b2(0xce),'description':a12_0x2c90b2(0x108),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3387e3){const _0x587546=a12_0x2c90b2,_0x229433=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x229433,'meta':{'env':_0x3387e3[_0x587546(0x11a)]??_0x587546(0x10d)}}};}}];function a12_0x4747(){const _0xb7215b=['14247eNXvER','boolean','project','bool','1284512upBCUw','string','Write\x20to\x20global\x20config\x20(default)','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','cancelled','trim','\x20env\x20var','Shorthand\x20for\x20--access-key','production','login','slice','development','access-key','8616WTysKR','auth','Option\x20C:\x20environment\x20variable','str','logout','\x20Current\x20env:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','331987XCGGDq','envName','Clear\x20accessKey\x20from\x20config','\x20scope.','nonInteractive','Invalid\x20accessKey\x20format:\x20\x22','\x20Verify:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','stdout','Auth\x20mode:\x20','info','\x20auth\x20status','AccessKey\x20(ak_xxx...)','1077CxeFOa','Clear\x20from\x20global\x20config\x20(default)','stdin','yes','accessKey','\x20doctor','global-default','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20config.\x20Nothing\x20to\x20clear.','validation','Read\x20from\x20global\x20config\x20(default)','\x20(via\x20','userCenterDisplayName','Use\x20`','=ak_xxx','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','310WSECuy','init','length','isTTY','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','daily','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20config.','Tip:\x20you\x20can\x20also\x20run:','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','repeat','1706844kTTCir','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','read','No\x20AccessKey\x20found\x20in\x20','global','Then\x20verify\x20with:\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','write','6590112sfkDsJ','5059908zZgmrY','env','Auth\x20config\x20reinitialized\x20in\x20','ACCESS_KEY','Missing\x20accessKey.','push','5BNNZQO','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','AccessKey\x20cleared\x20from\x20','Option\x20A:\x20'];a12_0x4747=function(){return _0xb7215b;};return a12_0x4747();}
@@ -1 +1 @@
1
- function a13_0x2c4c(){const _0x2a9d01=['SIGINT','close','3661sKtVan','once','name','question','232656csFASk','315778dqbloH','765840uSiShm','User\x20aborted\x20prompt','removeListener','stdout','AccessKey\x20(paste\x20ak_...):\x20','11238WIbFaO','9lRYafJ','trim','):\x20','3320073VpeqWu','5323150detQNI','AccessKey\x20(','972273jJBxxg','20vuICrG'];a13_0x2c4c=function(){return _0x2a9d01;};return a13_0x2c4c();}(function(_0x4ef038,_0x3b1a47){const _0x2e4427=a13_0x260c,_0x4db2ab=_0x4ef038();while(!![]){try{const _0x58dad4=-parseInt(_0x2e4427(0xa2))/0x1+parseInt(_0x2e4427(0x95))/0x2*(-parseInt(_0x2e4427(0x9c))/0x3)+parseInt(_0x2e4427(0xa3))/0x4*(parseInt(_0x2e4427(0x96))/0x5)+parseInt(_0x2e4427(0x9b))/0x6*(parseInt(_0x2e4427(0xa6))/0x7)+parseInt(_0x2e4427(0x94))/0x8+-parseInt(_0x2e4427(0x9f))/0x9+parseInt(_0x2e4427(0xa0))/0xa;if(_0x58dad4===_0x3b1a47)break;else _0x4db2ab['push'](_0x4db2ab['shift']());}catch(_0xbf51b4){_0x4db2ab['push'](_0x4db2ab['shift']());}}}(a13_0x2c4c,0x781cb));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1ad457=a13_0x260c;super(_0x1ad457(0x97)),this['name']='AbortPrompt';}}function a13_0x260c(_0xdeceb3,_0x2a9351){_0xdeceb3=_0xdeceb3-0x93;const _0x2c4c81=a13_0x2c4c();let _0x260c18=_0x2c4c81[_0xdeceb3];return _0x260c18;}function createSafeRl(){const _0x2ee967=a13_0x260c,_0x23541d=createInterface({'input':process['stdin'],'output':process[_0x2ee967(0x99)]});let _0x294153;const _0x47f78a=new Promise((_0x2612a4,_0x51380d)=>{const _0x53ee38=_0x2ee967;_0x294153=()=>{const _0x28949d=a13_0x260c;_0x294153&&(_0x23541d['removeListener'](_0x28949d(0xa4),_0x294153),_0x294153=undefined);try{_0x23541d[_0x28949d(0xa5)]();}catch{}_0x51380d(new AbortPrompt());},_0x23541d[_0x53ee38(0xa7)](_0x53ee38(0xa4),_0x294153);}),_0x177482=()=>{const _0x170b89=_0x2ee967;_0x294153&&(_0x23541d[_0x170b89(0x98)](_0x170b89(0xa4),_0x294153),_0x294153=undefined);try{_0x23541d[_0x170b89(0xa5)]();}catch{}};return{'rl':_0x23541d,'abortPromise':_0x47f78a,'disposeSuccess':_0x177482};}export async function promptAccessKey(_0x12b4c6=''){const {rl:_0x34153f,abortPromise:_0x2e61ad,disposeSuccess:_0x493f71}=createSafeRl(),_0x42d7bd=new Promise(_0x4526fc=>{const _0x18def5=a13_0x260c,_0x3d792e=_0x12b4c6?_0x18def5(0xa1)+_0x12b4c6+_0x18def5(0x9e):_0x18def5(0x9a);_0x34153f[_0x18def5(0x93)](_0x3d792e,_0x136f33=>{const _0x355888=_0x18def5;_0x493f71(),_0x4526fc(_0x136f33[_0x355888(0x9d)]()||_0x12b4c6);});});return Promise['race']([_0x42d7bd,_0x2e61ad]);}export function isAbortPrompt(_0x3dd2c9){const _0x10b079=a13_0x260c;return _0x3dd2c9 instanceof Error&&_0x3dd2c9[_0x10b079(0xa8)]==='AbortPrompt';}
1
+ (function(_0xf39fcc,_0x3c5f78){const _0xb7215b=a13_0x5a8c,_0x1a7b8a=_0xf39fcc();while(!![]){try{const _0x372bbc=-parseInt(_0xb7215b(0x1f4))/0x1*(-parseInt(_0xb7215b(0x1fe))/0x2)+-parseInt(_0xb7215b(0x1fc))/0x3*(parseInt(_0xb7215b(0x206))/0x4)+parseInt(_0xb7215b(0x204))/0x5+-parseInt(_0xb7215b(0x203))/0x6*(-parseInt(_0xb7215b(0x1f9))/0x7)+-parseInt(_0xb7215b(0x201))/0x8+-parseInt(_0xb7215b(0x202))/0x9+-parseInt(_0xb7215b(0x1f6))/0xa*(-parseInt(_0xb7215b(0x1fa))/0xb);if(_0x372bbc===_0x3c5f78)break;else _0x1a7b8a['push'](_0x1a7b8a['shift']());}catch(_0x11fd17){_0x1a7b8a['push'](_0x1a7b8a['shift']());}}}(a13_0xa20b,0xcf14a));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x2457af=a13_0x5a8c;super(_0x2457af(0x1ff)),this['name']=_0x2457af(0x1fd);}}function createSafeRl(){const _0x526175=a13_0x5a8c,_0x22cd82=createInterface({'input':process[_0x526175(0x1f5)],'output':process['stdout']});let _0x55025c;const _0x108826=new Promise((_0x29ad4d,_0x47bbc5)=>{const _0x32fd4e=_0x526175;_0x55025c=()=>{const _0x13f7c4=a13_0x5a8c;_0x55025c&&(_0x22cd82[_0x13f7c4(0x1f2)](_0x13f7c4(0x1f3),_0x55025c),_0x55025c=undefined);try{_0x22cd82[_0x13f7c4(0x1f7)]();}catch{}_0x47bbc5(new AbortPrompt());},_0x22cd82[_0x32fd4e(0x1fb)](_0x32fd4e(0x1f3),_0x55025c);}),_0x152d9c=()=>{const _0x1a2a6b=_0x526175;_0x55025c&&(_0x22cd82[_0x1a2a6b(0x1f2)](_0x1a2a6b(0x1f3),_0x55025c),_0x55025c=undefined);try{_0x22cd82[_0x1a2a6b(0x1f7)]();}catch{}};return{'rl':_0x22cd82,'abortPromise':_0x108826,'disposeSuccess':_0x152d9c};}function a13_0xa20b(){const _0x5b858e=['User\x20aborted\x20prompt','question','12778456hKcbuq','8752113BmErqs','2687088bmEEHu','4946920cxFHEZ','race','142196pVgPqv','AccessKey\x20(','AccessKey\x20(paste\x20ak_...):\x20','removeListener','SIGINT','20420tIDFUj','stdin','7495030XmbsiG','close','name','7OWrDnh','33ILjgst','once','45oBLZqA','AbortPrompt','26dsAcVt'];a13_0xa20b=function(){return _0x5b858e;};return a13_0xa20b();}function a13_0x5a8c(_0x33c810,_0x5d8468){_0x33c810=_0x33c810-0x1f2;const _0xa20ba0=a13_0xa20b();let _0x5a8c0e=_0xa20ba0[_0x33c810];return _0x5a8c0e;}export async function promptAccessKey(_0x20a0bf=''){const _0x93bf9e=a13_0x5a8c,{rl:_0x27353f,abortPromise:_0x255ecb,disposeSuccess:_0x311e58}=createSafeRl(),_0x3b0b0c=new Promise(_0x5023ef=>{const _0x591106=a13_0x5a8c,_0x1a16de=_0x20a0bf?_0x591106(0x207)+_0x20a0bf+'):\x20':_0x591106(0x208);_0x27353f[_0x591106(0x200)](_0x1a16de,_0x1b6d0d=>{_0x311e58(),_0x5023ef(_0x1b6d0d['trim']()||_0x20a0bf);});});return Promise[_0x93bf9e(0x205)]([_0x3b0b0c,_0x255ecb]);}export function isAbortPrompt(_0x5c9d76){const _0x107f2b=a13_0x5a8c;return _0x5c9d76 instanceof Error&&_0x5c9d76[_0x107f2b(0x1f8)]==='AbortPrompt';}
@@ -1 +1 @@
1
- const a14_0x458eb9=a14_0x74d8;(function(_0x2ac636,_0x2687a1){const _0x52e505=a14_0x74d8,_0x579410=_0x2ac636();while(!![]){try{const _0xb77ec4=-parseInt(_0x52e505(0x1ef))/0x1*(-parseInt(_0x52e505(0x1e2))/0x2)+-parseInt(_0x52e505(0x1e3))/0x3+parseInt(_0x52e505(0x1e6))/0x4*(parseInt(_0x52e505(0x1e5))/0x5)+-parseInt(_0x52e505(0x1e0))/0x6*(parseInt(_0x52e505(0x1e4))/0x7)+-parseInt(_0x52e505(0x1f4))/0x8*(-parseInt(_0x52e505(0x1de))/0x9)+-parseInt(_0x52e505(0x1ea))/0xa*(-parseInt(_0x52e505(0x1f1))/0xb)+parseInt(_0x52e505(0x1df))/0xc*(parseInt(_0x52e505(0x1f0))/0xd);if(_0xb77ec4===_0x2687a1)break;else _0x579410['push'](_0x579410['shift']());}catch(_0x2da135){_0x579410['push'](_0x579410['shift']());}}}(a14_0x45cc,0xb5500));import{getBffScriptInfo}from'../../core/api-client.js';function a14_0x74d8(_0x5691d3,_0x2a2398){_0x5691d3=_0x5691d3-0x1dc;const _0x45ccf4=a14_0x45cc();let _0x74d813=_0x45ccf4[_0x5691d3];return _0x74d813;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a14_0x458eb9(0x1e8),'description':a14_0x458eb9(0x1eb),'risk':a14_0x458eb9(0x1f5),'flags':[{...ID_FLAG,'description':a14_0x458eb9(0x1e1)},VERBOSE_FLAG],async 'execute'(_0xc42e8e){const _0x4cddc4=a14_0x458eb9,_0x2bd005=await getBffScriptInfo(_0xc42e8e[_0x4cddc4(0x1f2)]('id')),_0x3d4d8e=_0xc42e8e[_0x4cddc4(0x1dc)](_0x4cddc4(0x1ed));if(_0x3d4d8e)return{'ok':!![],'data':_0x2bd005};return{'ok':!![],'data':{'id':_0x2bd005['id'],'appCode':_0x2bd005['appCode'],'functionName':_0x2bd005[_0x4cddc4(0x1f3)]??'','scriptType':_0x2bd005[_0x4cddc4(0x1ee)],'description':_0x2bd005[_0x4cddc4(0x1e9)]||_0x4cddc4(0x1e7),'createdTime':_0x2bd005[_0x4cddc4(0x1ec)]??'','updatedTime':_0x2bd005[_0x4cddc4(0x1dd)]??''}};}};function a14_0x45cc(){const _0x378f3b=['261078yywwop','Script\x20ID','259786jKavEL','3794349kEKQxq','224Edccys','5UBmwGX','3233096FFQger','(none)','detail','description','290dcELcO','Get\x20BFF\x20script\x20details\x20by\x20ID','createdTime','verbose','scriptType','1NMHWgy','394771FOLviR','325281chKKpf','num','functionName','235840pYMIJw','read','bool','updatedTime','54lsnloM','564MgIoXU'];a14_0x45cc=function(){return _0x378f3b;};return a14_0x45cc();}
1
+ const a14_0x4aea20=a14_0x30ed;function a14_0x30ed(_0x2cf285,_0x528710){_0x2cf285=_0x2cf285-0x9b;const _0x2c06bd=a14_0x2c06();let _0x30ed20=_0x2c06bd[_0x2cf285];return _0x30ed20;}function a14_0x2c06(){const _0x3a95e7=['185839KazznR','num','646128lxUqMh','scriptType','1185696pafFQu','read','496092fgsHbM','appCode','description','482722SLeRKd','468912dbZYHA','functionName','30bWCCuN','41814faQQmf'];a14_0x2c06=function(){return _0x3a95e7;};return a14_0x2c06();}(function(_0x3eec8c,_0x3491fb){const _0x3e42d6=a14_0x30ed,_0x1d2960=_0x3eec8c();while(!![]){try{const _0x3b9a28=-parseInt(_0x3e42d6(0xa5))/0x1+parseInt(_0x3e42d6(0xa0))/0x2+-parseInt(_0x3e42d6(0xa1))/0x3+parseInt(_0x3e42d6(0x9d))/0x4+-parseInt(_0x3e42d6(0xa3))/0x5*(-parseInt(_0x3e42d6(0xa4))/0x6)+-parseInt(_0x3e42d6(0xa7))/0x7+parseInt(_0x3e42d6(0x9b))/0x8;if(_0x3b9a28===_0x3491fb)break;else _0x1d2960['push'](_0x1d2960['shift']());}catch(_0x144857){_0x1d2960['push'](_0x1d2960['shift']());}}}(a14_0x2c06,0x1d883));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':'detail','description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a14_0x4aea20(0x9c),'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0xffc5cd){const _0x293149=a14_0x4aea20,_0x1a87b4=await getBffScriptInfo(_0xffc5cd[_0x293149(0xa6)]('id')),_0xa4e611=_0xffc5cd['bool']('verbose');if(_0xa4e611)return{'ok':!![],'data':_0x1a87b4};return{'ok':!![],'data':{'id':_0x1a87b4['id'],'appCode':_0x1a87b4[_0x293149(0x9e)],'functionName':_0x1a87b4[_0x293149(0xa2)]??'','scriptType':_0x1a87b4[_0x293149(0xa8)],'description':_0x1a87b4[_0x293149(0x9f)]||'(none)','createdTime':_0x1a87b4['createdTime']??'','updatedTime':_0x1a87b4['updatedTime']??''}};}};