@lovrabet/lovrabet-cli 2.1.11-beta.2 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/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/rate-limit.js +1 -1
  87. package/lib/framework/response.js +1 -1
  88. package/lib/framework/runner-confirmation.js +1 -1
  89. package/lib/framework/runner-error.js +1 -1
  90. package/lib/framework/runner.js +1 -1
  91. package/lib/framework/schema-export.js +1 -1
  92. package/lib/framework/service-order.js +1 -1
  93. package/lib/framework/types.js +1 -1
  94. package/lib/generated/build-info.js +1 -1
  95. package/lib/help.js +1 -1
  96. package/lib/skills/npx-skills-add.js +1 -1
  97. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  98. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  99. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  100. package/lib/skills/runtime-skill-sync/links.js +1 -1
  101. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  102. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  103. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  104. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  105. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  106. package/lib/skills/runtime-skill-sync/push.js +1 -1
  107. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  110. package/lib/skills/runtime-skill-sync.js +1 -1
  111. package/lib/utils/apply-jq-filter.js +1 -1
  112. package/lib/utils/logger.js +1 -1
  113. package/lib/utils/lossless-json.js +1 -0
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x172a30=a0_0x45d8;(function(_0x387434,_0x176c72){const _0x152033=a0_0x45d8,_0x2689be=_0x387434();while(!![]){try{const _0x4731aa=-parseInt(_0x152033(0xbb))/0x1*(parseInt(_0x152033(0x9f))/0x2)+parseInt(_0x152033(0x9e))/0x3+-parseInt(_0x152033(0xb6))/0x4+parseInt(_0x152033(0x99))/0x5*(parseInt(_0x152033(0xac))/0x6)+parseInt(_0x152033(0xb7))/0x7*(-parseInt(_0x152033(0x97))/0x8)+-parseInt(_0x152033(0xb2))/0x9*(parseInt(_0x152033(0xaf))/0xa)+parseInt(_0x152033(0xa5))/0xb;if(_0x4731aa===_0x176c72)break;else _0x2689be['push'](_0x2689be['shift']());}catch(_0x4c58f7){_0x2689be['push'](_0x2689be['shift']());}}}(a0_0x53eb,0xf0ac4));import{jsx as a0_0x55a11b}from'react/jsx-runtime';import a0_0x46deea from'meow';import{render}from'ink';function a0_0x45d8(_0x28c9a1,_0x481fb7){_0x28c9a1=_0x28c9a1-0x95;const _0x53eb16=a0_0x53eb();let _0x45d8c6=_0x53eb16[_0x28c9a1];return _0x45d8c6;}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x53eb(){const _0x105bf3=['unknownCommand','error','slice','stderr','27389538KWlHRj','input','hint','[preparse]\x20','flatMap',':\x20--','help','24eeFEsn','defaultCommand','\x0aCancelled.\x0a','340Vnxhgl','definition','flags','179343DIWWAs','length','ERR_USE_AFTER_CLOSE','log','308428DHjfbx','14jKMZlP','exitCode','args','Error:\x20','717341VKqHMX','name','catch','message','assign','write','handler','corrected','2118296VkmGMl','cancelled','440585CEpZGx','\x20->\x20--','./framework/preparse.js','Unexpected\x20error:','ERR_STREAM_DESTROYED','434730XMncTr','2mLGBQx','code'];a0_0x53eb=function(){return _0x105bf3;};return a0_0x53eb();}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_0x46deea(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x172a30(0xbd)](handleError);async function main(){try{await run();}catch(_0x338e0d){handleError(_0x338e0d);}}async function run(){const _0xd70bb7=a0_0x172a30;let _0x29b442=cli['input'][0x0],_0x4ee879=cli[_0xd70bb7(0xa6)][0x1];const _0xe960c0=cli['flags'];try{const {correctFlags:_0x18f4d5}=await import(_0xd70bb7(0x9b)),_0x1bc453=getAllDefinitions()[_0xd70bb7(0xa9)](_0x8e6216=>_0x8e6216[_0xd70bb7(0xb1)]??[]),{flags:_0x85080a,corrections:_0xf417e1}=_0x18f4d5(_0xe960c0,_0x1bc453);if(_0xf417e1[_0xd70bb7(0xb3)]>0x0){for(const _0x3a7feb of _0xf417e1){process['stderr'][_0xd70bb7(0xc0)](_0xd70bb7(0xa8)+_0x3a7feb[_0xd70bb7(0x95)]+_0xd70bb7(0xaa)+_0x3a7feb['original']+_0xd70bb7(0x9a)+_0x3a7feb[_0xd70bb7(0x96)]+'\x0a');}Object[_0xd70bb7(0xbf)](_0xe960c0,_0x85080a);}}catch{}if(!_0x29b442){const {waitUntilExit:_0x4ff3b5}=render(a0_0x55a11b(Help,{}));await _0x4ff3b5();return;}if(!isKnownService(_0x29b442)){const _0x56d3cb=resolveDynamicServiceCommand(cli[_0xd70bb7(0xa6)],_0xe960c0);if(_0x56d3cb){if(_0xe960c0[_0xd70bb7(0xab)]){console[_0xd70bb7(0xb5)](generateCommandHelp(_0x56d3cb[_0xd70bb7(0xb0)]));return;}Object[_0xd70bb7(0xbf)](_0xe960c0,_0x56d3cb[_0xd70bb7(0xb1)]);const _0x507c3b=buildConfigFromFlags(_0xe960c0);await initGlobalEnvironment(_0x507c3b);const _0x22c20a=createPipelineEnv(_0x507c3b,_0xe960c0);_0x22c20a[_0xd70bb7(0xb9)]=_0x56d3cb[_0xd70bb7(0xb9)],await runCommand(_0x56d3cb[_0xd70bb7(0xb0)],_0x22c20a);return;}if(_0xe960c0[_0xd70bb7(0xab)]){const _0x2ba63f=generateDynamicServiceHelp(_0x29b442);if(_0x2ba63f){console['log'](_0x2ba63f);return;}}const {waitUntilExit:_0x15f773}=render(a0_0x55a11b(Help,{}));await _0x15f773();return;}const _0x5311f1=getServiceEntry(_0x29b442);if(!_0x4ee879){if(_0xe960c0[_0xd70bb7(0xab)]){console[_0xd70bb7(0xb5)](generateServiceHelp(_0x29b442));return;}if(_0x5311f1[_0xd70bb7(0xad)])_0x4ee879=_0x5311f1[_0xd70bb7(0xad)];else{console[_0xd70bb7(0xb5)](generateServiceHelp(_0x29b442));return;}}const _0x39fa39=findDefinition(_0x29b442,_0x4ee879);!_0x39fa39&&(console['log'](generateServiceHelp(_0x29b442)),handleError(CliErrors[_0xd70bb7(0xa1)](_0x29b442+'\x20'+_0x4ee879)));if(_0xe960c0[_0xd70bb7(0xab)]){console[_0xd70bb7(0xb5)](generateCommandHelp(_0x39fa39));return;}const _0xbd055d=buildConfigFromFlags(_0xe960c0);await initGlobalEnvironment(_0xbd055d);const _0x408343=createPipelineEnv(_0xbd055d,_0xe960c0);_0x408343[_0xd70bb7(0xb9)]=cli[_0xd70bb7(0xa6)][_0xd70bb7(0xa3)](0x2),await runCommand(_0x39fa39,_0x408343);}function handleError(_0xd66d41){const _0x2f5234=a0_0x172a30;if(_0xd66d41 instanceof CliError){_0xd66d41[_0x2f5234(0xa0)]===_0x2f5234(0x98)&&(process[_0x2f5234(0xa4)][_0x2f5234(0xc0)](_0x2f5234(0xae)),process['exit'](0x0));console[_0x2f5234(0xa2)](_0x2f5234(0xba)+_0xd66d41[_0x2f5234(0xbe)]);if(_0xd66d41[_0x2f5234(0xa7)])console[_0x2f5234(0xa2)]('Hint:\x20'+_0xd66d41[_0x2f5234(0xa7)]);process['exit'](_0xd66d41[_0x2f5234(0xb8)]);}isUserCancellation(_0xd66d41)&&(process[_0x2f5234(0xa4)]['write'](_0x2f5234(0xae)),process['exit'](0x0)),console[_0x2f5234(0xa2)](_0x2f5234(0x9c),_0xd66d41),process['exit'](0x1);}function isUserCancellation(_0x1b264a){const _0x414904=a0_0x172a30;if(!(_0x1b264a instanceof Error))return![];if(_0x1b264a[_0x414904(0xbc)]==='ExitPromptError')return!![];if(_0x1b264a[_0x414904(0xa0)]===_0x414904(0xb4))return!![];if(_0x1b264a[_0x414904(0xa0)]===_0x414904(0x9d))return!![];return![];}
2
+ const a0_0x4fe808=a0_0x26d8;(function(_0x446c22,_0xf866cf){const _0xb19e4d=a0_0x26d8,_0x111f28=_0x446c22();while(!![]){try{const _0x18ec70=parseInt(_0xb19e4d(0x19d))/0x1*(parseInt(_0xb19e4d(0x188))/0x2)+parseInt(_0xb19e4d(0x1aa))/0x3+-parseInt(_0xb19e4d(0x187))/0x4+-parseInt(_0xb19e4d(0x18c))/0x5*(parseInt(_0xb19e4d(0x1a0))/0x6)+-parseInt(_0xb19e4d(0x18a))/0x7*(-parseInt(_0xb19e4d(0x18d))/0x8)+-parseInt(_0xb19e4d(0x19b))/0x9+parseInt(_0xb19e4d(0x18e))/0xa*(parseInt(_0xb19e4d(0x1ab))/0xb);if(_0x18ec70===_0xf866cf)break;else _0x111f28['push'](_0x111f28['shift']());}catch(_0x2a703f){_0x111f28['push'](_0x111f28['shift']());}}}(a0_0x9276,0xe30d6));import{jsx as a0_0x36d93b}from'react/jsx-runtime';import a0_0x60b952 from'meow';import{render}from'ink';function a0_0x26d8(_0x1d90b7,_0x930397){_0x1d90b7=_0x1d90b7-0x17f;const _0x927641=a0_0x9276();let _0x26d8d2=_0x927641[_0x1d90b7];return _0x26d8d2;}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x9276(){const _0xcaadf3=['exit','input','defaultCommand','catch','3607952NWnnBF','2000366amkftN','hint','7SgHcHS','write','170cNSZxA','5303632VadLhz','20aEheXb','./framework/preparse.js','original','code','flatMap','name','definition','cancelled','help','[preparse]\x20','ERR_STREAM_DESTROYED','handler','error','14169978fcaSdp',':\x20--','1TPAaUu','exitCode','\x0aCancelled.\x0a','76548xUkuCo','\x20->\x20--','ERR_USE_AFTER_CLOSE','flags','length','unknownCommand','stderr','Hint:\x20','args','log','1447929ktKaUB','9319354yzTTQl','Unexpected\x20error:','ExitPromptError','message','Error:\x20','corrected'];a0_0x9276=function(){return _0xcaadf3;};return a0_0x9276();}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_0x60b952(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x4fe808(0x186)](handleError);async function main(){try{await run();}catch(_0x58ae49){handleError(_0x58ae49);}}async function run(){const _0x4d50f7=a0_0x4fe808;let _0x4e8378=cli['input'][0x0],_0x68e745=cli[_0x4d50f7(0x184)][0x1];const _0x25fc5d=cli[_0x4d50f7(0x1a3)];try{const {correctFlags:_0x18f7d6}=await import(_0x4d50f7(0x18f)),_0x323bcb=getAllDefinitions()[_0x4d50f7(0x192)](_0x6aa7c5=>_0x6aa7c5[_0x4d50f7(0x1a3)]??[]),{flags:_0x25365d,corrections:_0x10c527}=_0x18f7d6(_0x25fc5d,_0x323bcb);if(_0x10c527[_0x4d50f7(0x1a4)]>0x0){for(const _0x370f7e of _0x10c527){process[_0x4d50f7(0x1a6)][_0x4d50f7(0x18b)](_0x4d50f7(0x197)+_0x370f7e[_0x4d50f7(0x199)]+_0x4d50f7(0x19c)+_0x370f7e[_0x4d50f7(0x190)]+_0x4d50f7(0x1a1)+_0x370f7e[_0x4d50f7(0x182)]+'\x0a');}Object['assign'](_0x25fc5d,_0x25365d);}}catch{}if(!_0x4e8378){const {waitUntilExit:_0x496acd}=render(a0_0x36d93b(Help,{}));await _0x496acd();return;}if(!isKnownService(_0x4e8378)){const _0x41d3c2=resolveDynamicServiceCommand(cli[_0x4d50f7(0x184)],_0x25fc5d);if(_0x41d3c2){if(_0x25fc5d[_0x4d50f7(0x196)]){console[_0x4d50f7(0x1a9)](generateCommandHelp(_0x41d3c2[_0x4d50f7(0x194)]));return;}Object['assign'](_0x25fc5d,_0x41d3c2[_0x4d50f7(0x1a3)]);const _0x1f1574=buildConfigFromFlags(_0x25fc5d);await initGlobalEnvironment(_0x1f1574);const _0xf716e9=createPipelineEnv(_0x1f1574,_0x25fc5d);_0xf716e9[_0x4d50f7(0x1a8)]=_0x41d3c2[_0x4d50f7(0x1a8)],await runCommand(_0x41d3c2[_0x4d50f7(0x194)],_0xf716e9);return;}if(_0x25fc5d[_0x4d50f7(0x196)]){const _0x44b020=generateDynamicServiceHelp(_0x4e8378);if(_0x44b020){console[_0x4d50f7(0x1a9)](_0x44b020);return;}}const {waitUntilExit:_0x4fef90}=render(a0_0x36d93b(Help,{}));await _0x4fef90();return;}const _0x5965ec=getServiceEntry(_0x4e8378);if(!_0x68e745){if(_0x25fc5d[_0x4d50f7(0x196)]){console[_0x4d50f7(0x1a9)](generateServiceHelp(_0x4e8378));return;}if(_0x5965ec['defaultCommand'])_0x68e745=_0x5965ec[_0x4d50f7(0x185)];else{console[_0x4d50f7(0x1a9)](generateServiceHelp(_0x4e8378));return;}}const _0x3daadc=findDefinition(_0x4e8378,_0x68e745);!_0x3daadc&&(console[_0x4d50f7(0x1a9)](generateServiceHelp(_0x4e8378)),handleError(CliErrors[_0x4d50f7(0x1a5)](_0x4e8378+'\x20'+_0x68e745)));if(_0x25fc5d[_0x4d50f7(0x196)]){console['log'](generateCommandHelp(_0x3daadc));return;}const _0x1e5f3d=buildConfigFromFlags(_0x25fc5d);await initGlobalEnvironment(_0x1e5f3d);const _0x27d986=createPipelineEnv(_0x1e5f3d,_0x25fc5d);_0x27d986[_0x4d50f7(0x1a8)]=cli[_0x4d50f7(0x184)]['slice'](0x2),await runCommand(_0x3daadc,_0x27d986);}function handleError(_0x2779b7){const _0x521f97=a0_0x4fe808;if(_0x2779b7 instanceof CliError){_0x2779b7[_0x521f97(0x191)]===_0x521f97(0x195)&&(process[_0x521f97(0x1a6)][_0x521f97(0x18b)](_0x521f97(0x19f)),process['exit'](0x0));console[_0x521f97(0x19a)](_0x521f97(0x181)+_0x2779b7[_0x521f97(0x180)]);if(_0x2779b7[_0x521f97(0x189)])console['error'](_0x521f97(0x1a7)+_0x2779b7[_0x521f97(0x189)]);process[_0x521f97(0x183)](_0x2779b7[_0x521f97(0x19e)]);}isUserCancellation(_0x2779b7)&&(process[_0x521f97(0x1a6)][_0x521f97(0x18b)](_0x521f97(0x19f)),process[_0x521f97(0x183)](0x0)),console[_0x521f97(0x19a)](_0x521f97(0x1ac),_0x2779b7),process[_0x521f97(0x183)](0x1);}function isUserCancellation(_0x3e3dee){const _0x31d9ee=a0_0x4fe808;if(!(_0x3e3dee instanceof Error))return![];if(_0x3e3dee[_0x31d9ee(0x193)]===_0x31d9ee(0x17f))return!![];if(_0x3e3dee[_0x31d9ee(0x191)]===_0x31d9ee(0x1a2))return!![];if(_0x3e3dee[_0x31d9ee(0x191)]===_0x31d9ee(0x198))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x4fea6d=a1_0x549f;function a1_0x54a0(){const _0xa26c44=['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','/api/custom/executeSql','fields/properties\x20describe\x20data\x20shape','##\x20List\x20datasets','datasetCode','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','code','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Returns\x20one\x20matching\x20business\x20record','2wZhhSk','{\x22id\x22:123}','includes','scriptName','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','2025485jqPAHS','join','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Endpoint\x20function\x20name','1368vaGuoG','52602ywQZTq','聚合查询数据集数据','dataset_data_get_one','category','API\x20doc\x20code\x20not\x20found:\x20','GET','whenToUse','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','summary','条件过滤查询数据','title','/api/{appCode}/{datasetCode}/filter','32-character\x20dataset\x20code','API\x20doc\x20code,\x20for\x20example\x20dataset_list','str','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','/api/endpoint/{appCode}/{scriptName}','tableData\x20contains\x20dataset\x20id/code/name','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','bf_function_list','需要向指定数据集新增一条业务数据时使用','string','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','read','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','dataset_data_create','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','List\x20datasets','/api/{appCode}/{datasetCode}/getOne','24yZHSkt','Current\x20app\x20code','filter','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','25NvQfQY','4863okXYHD','执行自定义\x20SQL','##\x20Dataset\x20detail','351354qYWUQb','306QnwmHN','paging\x20contains\x20pagination','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','keyword','bf_execute','Show\x20runtime\x20API\x20documentation\x20by\x20code','paging.totalCount\x20gives\x20total\x20rows','2984590GPmwbT','result\x20rows\x20contain\x20aggregate\x20aliases','##\x20Aggregate\x20dataset\x20data','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','None','117904zBlehD','获取应用下可调用的\x20BF\x20函数列表','api-doc','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','validation','POST','Filter\x20dataset\x20data','method','{\x22fieldName\x22:\x22value\x22}','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','/api/dataset/get-dataset-list-by-app-code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','path','map','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','toLowerCase','/api/dataset/getOneByCode?code={datasetCode}','where\x20filters\x20before\x20aggregation','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','trim','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','执行指定\x20BF\x20函数','Returns\x20SQL\x20execution\x20payload','Create\x20dataset\x20record','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','分页获取数据集列表','Aggregate\x20dataset\x20data','custom_sql','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','list','##\x20Filter\x20dataset\x20data','Returns\x20endpoint\x20functionName/id/description','650273OcQSEw','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','dataset','查询单条数据','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','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','appCode','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用'];a1_0x54a0=function(){return _0xa26c44;};return a1_0x54a0();}(function(_0x38431e,_0x1078a8){const _0x5df51c=a1_0x549f,_0x2b05d8=_0x38431e();while(!![]){try{const _0xb7d502=-parseInt(_0x5df51c(0x20a))/0x1*(-parseInt(_0x5df51c(0x21c))/0x2)+-parseInt(_0x5df51c(0x249))/0x3*(parseInt(_0x5df51c(0x244))/0x4)+-parseInt(_0x5df51c(0x248))/0x5*(-parseInt(_0x5df51c(0x24c))/0x6)+-parseInt(_0x5df51c(0x221))/0x7+-parseInt(_0x5df51c(0x1e7))/0x8*(parseInt(_0x5df51c(0x24d))/0x9)+-parseInt(_0x5df51c(0x1e2))/0xa+-parseInt(_0x5df51c(0x226))/0xb*(-parseInt(_0x5df51c(0x225))/0xc);if(_0xb7d502===_0x1078a8)break;else _0x2b05d8['push'](_0x2b05d8['shift']());}catch(_0x42744d){_0x2b05d8['push'](_0x2b05d8['shift']());}}}(a1_0x54a0,0x5f1d0));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x4fea6d(0x229),'type':a1_0x4fea6d(0x23b),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':'keyword','type':a1_0x4fea6d(0x23b),'description':a1_0x4fea6d(0x22d)},DOC_CODE_FLAG={'name':a1_0x4fea6d(0x219),'type':a1_0x4fea6d(0x23b),'required':!![],'description':a1_0x4fea6d(0x233)},DOCS=[{'code':'dataset_list','category':a1_0x4fea6d(0x20d),'title':a1_0x4fea6d(0x242),'method':a1_0x4fea6d(0x1ed),'path':a1_0x4fea6d(0x1f2),'summary':a1_0x4fea6d(0x203),'whenToUse':a1_0x4fea6d(0x1f7),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':[a1_0x4fea6d(0x237),a1_0x4fea6d(0x1e1)],'examples':[a1_0x4fea6d(0x213)],'notes':[a1_0x4fea6d(0x21a)],'markdown':[a1_0x4fea6d(0x216),'',a1_0x4fea6d(0x220)]['join']('\x0a')},{'code':'dataset_detail','category':a1_0x4fea6d(0x20d),'title':'Dataset\x20detail','method':a1_0x4fea6d(0x22b),'path':a1_0x4fea6d(0x1fa),'summary':'获取数据集详情','whenToUse':'需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','pathParams':[],'queryParams':[{'name':a1_0x4fea6d(0x219),'description':a1_0x4fea6d(0x232)}],'bodySchema':'None','responseHighlights':[a1_0x4fea6d(0x215),a1_0x4fea6d(0x235),'operations\x20describes\x20runtime\x20APIs'],'examples':[a1_0x4fea6d(0x238)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':[a1_0x4fea6d(0x24b),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x4fea6d(0x222)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x4fea6d(0x20d),'title':a1_0x4fea6d(0x1ee),'method':'POST','path':a1_0x4fea6d(0x231),'summary':a1_0x4fea6d(0x22f),'whenToUse':a1_0x4fea6d(0x1f1),'pathParams':[{'name':'appCode','description':a1_0x4fea6d(0x245)},{'name':a1_0x4fea6d(0x217),'description':a1_0x4fea6d(0x232)}],'queryParams':[],'bodySchema':a1_0x4fea6d(0x23f),'responseHighlights':['tableData\x20contains\x20records',a1_0x4fea6d(0x24e)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x4fea6d(0x241)],'markdown':[a1_0x4fea6d(0x208),'',a1_0x4fea6d(0x20f)]['join']('\x0a')},{'code':'dataset_data_aggregate','category':'dataset','title':a1_0x4fea6d(0x204),'method':a1_0x4fea6d(0x1ed),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x4fea6d(0x227),'whenToUse':a1_0x4fea6d(0x1eb),'pathParams':[{'name':a1_0x4fea6d(0x211),'description':a1_0x4fea6d(0x245)},{'name':a1_0x4fea6d(0x217),'description':a1_0x4fea6d(0x232)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x4fea6d(0x1e3),a1_0x4fea6d(0x1fb)],'examples':[a1_0x4fea6d(0x210)],'notes':[a1_0x4fea6d(0x20c),a1_0x4fea6d(0x23c)],'markdown':[a1_0x4fea6d(0x1e4),'',a1_0x4fea6d(0x1f8)][a1_0x4fea6d(0x222)]('\x0a')},{'code':a1_0x4fea6d(0x228),'category':a1_0x4fea6d(0x20d),'title':'Get\x20one\x20dataset\x20record','method':a1_0x4fea6d(0x1ed),'path':a1_0x4fea6d(0x243),'summary':a1_0x4fea6d(0x20e),'whenToUse':a1_0x4fea6d(0x218),'pathParams':[{'name':'appCode','description':a1_0x4fea6d(0x245)},{'name':a1_0x4fea6d(0x217),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x4fea6d(0x21d),'responseHighlights':[a1_0x4fea6d(0x21b)],'examples':[a1_0x4fea6d(0x1f3)],'notes':[a1_0x4fea6d(0x20b)],'markdown':a1_0x4fea6d(0x1fe)},{'code':a1_0x4fea6d(0x240),'category':a1_0x4fea6d(0x20d),'title':a1_0x4fea6d(0x201),'method':a1_0x4fea6d(0x1ed),'path':'/api/{appCode}/{datasetCode}/create','summary':'创建数据','whenToUse':a1_0x4fea6d(0x23a),'pathParams':[{'name':a1_0x4fea6d(0x211),'description':a1_0x4fea6d(0x245)},{'name':a1_0x4fea6d(0x217),'description':a1_0x4fea6d(0x232)}],'queryParams':[],'bodySchema':a1_0x4fea6d(0x1f0),'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_0x4fea6d(0x247)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':a1_0x4fea6d(0x239),'category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x4fea6d(0x22b),'path':'/api/endpoint/{appCode}/functions','summary':a1_0x4fea6d(0x1e8),'whenToUse':a1_0x4fea6d(0x206),'pathParams':[{'name':a1_0x4fea6d(0x211),'description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':a1_0x4fea6d(0x1e6),'responseHighlights':[a1_0x4fea6d(0x209)],'examples':[a1_0x4fea6d(0x202)],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':a1_0x4fea6d(0x1fc)},{'code':a1_0x4fea6d(0x251),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':'POST','path':a1_0x4fea6d(0x236),'summary':a1_0x4fea6d(0x1ff),'whenToUse':a1_0x4fea6d(0x1e5),'pathParams':[{'name':a1_0x4fea6d(0x211),'description':a1_0x4fea6d(0x245)},{'name':a1_0x4fea6d(0x21f),'description':a1_0x4fea6d(0x224)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x4fea6d(0x223)],'notes':[a1_0x4fea6d(0x1f6)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x4fea6d(0x205),'title':'Execute\x20custom\x20SQL','method':a1_0x4fea6d(0x1ed),'path':a1_0x4fea6d(0x214),'summary':a1_0x4fea6d(0x24a),'whenToUse':a1_0x4fea6d(0x212),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x4fea6d(0x200)],'examples':[a1_0x4fea6d(0x24f)],'notes':[a1_0x4fea6d(0x1ea)],'markdown':a1_0x4fea6d(0x23e)}];function entrySummary(_0x350396){const _0x59fcd4=a1_0x4fea6d;return{'code':_0x350396[_0x59fcd4(0x219)],'category':_0x350396[_0x59fcd4(0x229)],'method':_0x350396['method'],'path':_0x350396['path'],'summary':_0x350396['summary'],'whenToUse':_0x350396['whenToUse']};}export function listApiDocEntries(_0x5eeb58={}){const _0x1923d9=a1_0x4fea6d,_0x5b15f9=String(_0x5eeb58['category']||'')[_0x1923d9(0x1fd)](),_0x230bef=String(_0x5eeb58[_0x1923d9(0x250)]||'')[_0x1923d9(0x1fd)]()[_0x1923d9(0x1f9)]();return DOCS[_0x1923d9(0x246)](_0x133d6d=>{const _0xccfb16=_0x1923d9;if(_0x5b15f9&&_0x133d6d[_0xccfb16(0x229)]!==_0x5b15f9)return![];if(!_0x230bef)return!![];return[_0x133d6d[_0xccfb16(0x219)],_0x133d6d[_0xccfb16(0x229)],_0x133d6d[_0xccfb16(0x1ef)],_0x133d6d[_0xccfb16(0x1f4)],_0x133d6d[_0xccfb16(0x22e)],_0x133d6d[_0xccfb16(0x22c)],_0x133d6d[_0xccfb16(0x230)]][_0xccfb16(0x222)]('\x20')[_0xccfb16(0x1f9)]()[_0xccfb16(0x21e)](_0x230bef);})[_0x1923d9(0x1f5)](entrySummary);}function a1_0x549f(_0x837d9,_0x4e74a8){_0x837d9=_0x837d9-0x1e0;const _0x54a01f=a1_0x54a0();let _0x549fe9=_0x54a01f[_0x837d9];return _0x549fe9;}export function getApiDocDetail(_0x1f7058){const _0x2f23c1=a1_0x4fea6d,_0x5a6886=DOCS['find'](_0x4c0856=>_0x4c0856[_0x2f23c1(0x219)]===_0x1f7058);if(!_0x5a6886)throw CliErrors[_0x2f23c1(0x1ec)](_0x2f23c1(0x22a)+_0x1f7058);return{..._0x5a6886};}const apiDocList={'service':a1_0x4fea6d(0x1e9),'command':a1_0x4fea6d(0x207),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x4fea6d(0x23d),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x3c9db4){const _0x170da0=a1_0x4fea6d,_0x43d99c=listApiDocEntries({'category':_0x3c9db4[_0x170da0(0x234)](_0x170da0(0x229)),'keyword':_0x3c9db4[_0x170da0(0x234)](_0x170da0(0x250))});return{'ok':!![],'data':{'total':_0x43d99c['length'],'items':_0x43d99c}};}},apiDocDetail={'service':a1_0x4fea6d(0x1e9),'command':'detail','description':a1_0x4fea6d(0x1e0),'risk':a1_0x4fea6d(0x23d),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0xe0b9b9){const _0x480ddb=a1_0x4fea6d;return{'ok':!![],'data':getApiDocDetail(_0xe0b9b9['str'](_0x480ddb(0x219)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x5ef29a=a1_0x5985;(function(_0x41340d,_0x43bdba){const _0x28055f=a1_0x5985,_0x581480=_0x41340d();while(!![]){try{const _0x503715=-parseInt(_0x28055f(0xc8))/0x1*(parseInt(_0x28055f(0xcc))/0x2)+parseInt(_0x28055f(0xe9))/0x3+-parseInt(_0x28055f(0x136))/0x4+parseInt(_0x28055f(0x131))/0x5*(parseInt(_0x28055f(0x13e))/0x6)+parseInt(_0x28055f(0xdd))/0x7*(-parseInt(_0x28055f(0x134))/0x8)+-parseInt(_0x28055f(0x12c))/0x9*(parseInt(_0x28055f(0xee))/0xa)+parseInt(_0x28055f(0xce))/0xb;if(_0x503715===_0x43bdba)break;else _0x581480['push'](_0x581480['shift']());}catch(_0x57cb67){_0x581480['push'](_0x581480['shift']());}}}(a1_0x1a1e,0x548fa));function a1_0x5985(_0xdee5f9,_0x56ad5f){_0xdee5f9=_0xdee5f9-0xc8;const _0x1a1e44=a1_0x1a1e();let _0x5985bd=_0x1a1e44[_0xdee5f9];return _0x5985bd;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x5ef29a(0x126),'type':a1_0x5ef29a(0x11c),'description':a1_0x5ef29a(0x142)},KEYWORD_FLAG={'name':'keyword','type':a1_0x5ef29a(0x11c),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x5ef29a(0xcf),'type':'string','required':!![],'description':a1_0x5ef29a(0x132)},DOCS=[{'code':a1_0x5ef29a(0xf7),'category':a1_0x5ef29a(0x11e),'title':'List\x20datasets','method':'POST','path':a1_0x5ef29a(0x120),'summary':'分页获取数据集列表','whenToUse':a1_0x5ef29a(0x135),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5ef29a(0xd6),'responseHighlights':[a1_0x5ef29a(0xef),a1_0x5ef29a(0xcd)],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x5ef29a(0xf8)],'markdown':[a1_0x5ef29a(0x140),'',a1_0x5ef29a(0xe7)][a1_0x5ef29a(0xfb)]('\x0a')},{'code':a1_0x5ef29a(0x114),'category':a1_0x5ef29a(0x11e),'title':a1_0x5ef29a(0xf6),'method':a1_0x5ef29a(0xca),'path':a1_0x5ef29a(0xe3),'summary':a1_0x5ef29a(0x128),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','pathParams':[],'queryParams':[{'name':a1_0x5ef29a(0xcf),'description':a1_0x5ef29a(0x12a)}],'bodySchema':a1_0x5ef29a(0xfe),'responseHighlights':[a1_0x5ef29a(0xe5),a1_0x5ef29a(0xd1),'operations\x20describes\x20runtime\x20APIs'],'examples':[a1_0x5ef29a(0x111)],'notes':[a1_0x5ef29a(0xd3)],'markdown':['##\x20Dataset\x20detail','',a1_0x5ef29a(0x13a)]['join']('\x0a')},{'code':a1_0x5ef29a(0xe6),'category':a1_0x5ef29a(0x11e),'title':a1_0x5ef29a(0x130),'method':a1_0x5ef29a(0x113),'path':a1_0x5ef29a(0x121),'summary':a1_0x5ef29a(0xe8),'whenToUse':a1_0x5ef29a(0xff),'pathParams':[{'name':a1_0x5ef29a(0xd9),'description':a1_0x5ef29a(0x10e)},{'name':a1_0x5ef29a(0xfa),'description':a1_0x5ef29a(0x12a)}],'queryParams':[],'bodySchema':a1_0x5ef29a(0x125),'responseHighlights':[a1_0x5ef29a(0x12e),'paging\x20contains\x20pagination'],'examples':[a1_0x5ef29a(0x138)],'notes':[a1_0x5ef29a(0x133)],'markdown':[a1_0x5ef29a(0xf4),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.']['join']('\x0a')},{'code':'dataset_data_aggregate','category':'dataset','title':a1_0x5ef29a(0x10b),'method':a1_0x5ef29a(0x113),'path':a1_0x5ef29a(0xd0),'summary':'聚合查询数据集数据','whenToUse':a1_0x5ef29a(0x11d),'pathParams':[{'name':a1_0x5ef29a(0xd9),'description':a1_0x5ef29a(0x10e)},{'name':a1_0x5ef29a(0xfa),'description':a1_0x5ef29a(0x12a)}],'queryParams':[],'bodySchema':a1_0x5ef29a(0xed),'responseHighlights':[a1_0x5ef29a(0xf0),'where\x20filters\x20before\x20aggregation'],'examples':[a1_0x5ef29a(0x11f)],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.',a1_0x5ef29a(0x105)],'markdown':[a1_0x5ef29a(0xd5),'',a1_0x5ef29a(0xd4)][a1_0x5ef29a(0xfb)]('\x0a')},{'code':a1_0x5ef29a(0xd8),'category':a1_0x5ef29a(0x11e),'title':a1_0x5ef29a(0x10d),'method':a1_0x5ef29a(0x113),'path':a1_0x5ef29a(0x101),'summary':a1_0x5ef29a(0x139),'whenToUse':a1_0x5ef29a(0x11a),'pathParams':[{'name':a1_0x5ef29a(0xd9),'description':a1_0x5ef29a(0x10e)},{'name':a1_0x5ef29a(0xfa),'description':a1_0x5ef29a(0x12a)}],'queryParams':[],'bodySchema':a1_0x5ef29a(0xf5),'responseHighlights':[a1_0x5ef29a(0x103)],'examples':[a1_0x5ef29a(0xdc)],'notes':[a1_0x5ef29a(0x112)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':a1_0x5ef29a(0xf1),'category':a1_0x5ef29a(0x11e),'title':a1_0x5ef29a(0x102),'method':'POST','path':a1_0x5ef29a(0x119),'summary':a1_0x5ef29a(0x10f),'whenToUse':a1_0x5ef29a(0x100),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x5ef29a(0xfa),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x5ef29a(0x117),'responseHighlights':[a1_0x5ef29a(0x118)],'examples':[a1_0x5ef29a(0xec)],'notes':['This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.'],'markdown':a1_0x5ef29a(0x127)},{'code':a1_0x5ef29a(0x10c),'category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x5ef29a(0xca),'path':a1_0x5ef29a(0xd7),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x5ef29a(0x115),'pathParams':[{'name':'appCode','description':a1_0x5ef29a(0x10e)}],'queryParams':[],'bodySchema':'None','responseHighlights':[a1_0x5ef29a(0x12b)],'examples':[a1_0x5ef29a(0x104)],'notes':[a1_0x5ef29a(0x12d)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x5ef29a(0x129),'category':'bf','title':a1_0x5ef29a(0x109),'method':'POST','path':a1_0x5ef29a(0x13b),'summary':a1_0x5ef29a(0x116),'whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x5ef29a(0xd9),'description':'Current\x20app\x20code'},{'name':a1_0x5ef29a(0x137),'description':a1_0x5ef29a(0xe0)}],'queryParams':[],'bodySchema':a1_0x5ef29a(0xf3),'responseHighlights':[a1_0x5ef29a(0x143)],'examples':[a1_0x5ef29a(0x13f)],'notes':[a1_0x5ef29a(0xe1)],'markdown':a1_0x5ef29a(0xd2)},{'code':a1_0x5ef29a(0xcb),'category':a1_0x5ef29a(0x13c),'title':a1_0x5ef29a(0xf2),'method':'POST','path':a1_0x5ef29a(0xdf),'summary':a1_0x5ef29a(0xea),'whenToUse':a1_0x5ef29a(0x12f),'pathParams':[],'queryParams':[],'bodySchema':a1_0x5ef29a(0x108),'responseHighlights':[a1_0x5ef29a(0x106)],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':[a1_0x5ef29a(0x123)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function entrySummary(_0x3536b3){const _0x3c73bf=a1_0x5ef29a;return{'code':_0x3536b3[_0x3c73bf(0xcf)],'category':_0x3536b3[_0x3c73bf(0x126)],'method':_0x3536b3['method'],'path':_0x3536b3[_0x3c73bf(0xde)],'summary':_0x3536b3[_0x3c73bf(0x10a)],'whenToUse':_0x3536b3['whenToUse']};}function a1_0x1a1e(){const _0x1c4262=['dataset_detail','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','执行指定\x20BF\x20函数','{\x22fieldName\x22:\x22value\x22}','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','/api/{appCode}/{datasetCode}/create','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','toLowerCase','string','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','dataset','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','/api/dataset/get-dataset-list-by-app-code','/api/{appCode}/{datasetCode}/filter','title','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','List\x20available\x20runtime\x20API\x20documentation\x20entries','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','category','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','获取数据集详情','bf_execute','32-character\x20dataset\x20code','Returns\x20endpoint\x20functionName/id/description','3106539tJNpUP','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','tableData\x20contains\x20records','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','Filter\x20dataset\x20data','47835xBEdjf','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','8dTHEcI','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','2046668NmsQue','scriptName','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','查询单条数据','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','/api/endpoint/{appCode}/{scriptName}','custom_sql','API\x20doc\x20code\x20not\x20found:\x20','66vUUIiC','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','##\x20List\x20datasets','length','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','Returns\x20script\x20business\x20payload','507533DWLJDw','whenToUse','GET','custom_sql_execute','2ZJhwQF','paging.totalCount\x20gives\x20total\x20rows','19056147lHvdcv','code','/api/{appCode}/{datasetCode}/aggregate','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','##\x20Aggregate\x20dataset\x20data','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','/api/endpoint/{appCode}/functions','dataset_data_get_one','appCode','validation','filter','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','4424371MUttsb','path','/api/custom/executeSql','Endpoint\x20function\x20name','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','read','/api/dataset/getOneByCode?code={datasetCode}','list','fields/properties\x20describe\x20data\x20shape','dataset_data_filter','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','条件过滤查询数据','1515516vFxBEX','执行自定义\x20SQL','str','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','10rAhCDh','tableData\x20contains\x20dataset\x20id/code/name','result\x20rows\x20contain\x20aggregate\x20aliases','dataset_data_create','Execute\x20custom\x20SQL','{\x22param\x22:\x22value\x22}','##\x20Filter\x20dataset\x20data','{\x22id\x22:123}','Dataset\x20detail','dataset_list','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','keyword','datasetCode','join','trim','map','None','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','需要向指定数据集新增一条业务数据时使用','/api/{appCode}/{datasetCode}/getOne','Create\x20dataset\x20record','Returns\x20one\x20matching\x20business\x20record','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Returns\x20SQL\x20execution\x20payload','detail','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Execute\x20BF\x20endpoint\x20function','summary','Aggregate\x20dataset\x20data','bf_function_list','Get\x20one\x20dataset\x20record','Current\x20app\x20code','创建数据','includes','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','POST'];a1_0x1a1e=function(){return _0x1c4262;};return a1_0x1a1e();}export function listApiDocEntries(_0x4e75c9={}){const _0x35dfa9=a1_0x5ef29a,_0x574039=String(_0x4e75c9[_0x35dfa9(0x126)]||'')[_0x35dfa9(0xfc)](),_0x5c1d2b=String(_0x4e75c9[_0x35dfa9(0xf9)]||'')[_0x35dfa9(0xfc)]()[_0x35dfa9(0x11b)]();return DOCS[_0x35dfa9(0xdb)](_0x5a38ad=>{const _0x5c7eec=_0x35dfa9;if(_0x574039&&_0x5a38ad[_0x5c7eec(0x126)]!==_0x574039)return![];if(!_0x5c1d2b)return!![];return[_0x5a38ad['code'],_0x5a38ad[_0x5c7eec(0x126)],_0x5a38ad['method'],_0x5a38ad[_0x5c7eec(0xde)],_0x5a38ad[_0x5c7eec(0x10a)],_0x5a38ad[_0x5c7eec(0xc9)],_0x5a38ad[_0x5c7eec(0x122)]][_0x5c7eec(0xfb)]('\x20')[_0x5c7eec(0x11b)]()[_0x5c7eec(0x110)](_0x5c1d2b);})[_0x35dfa9(0xfd)](entrySummary);}export function getApiDocDetail(_0x5d6a1d){const _0x512390=a1_0x5ef29a,_0x193562=DOCS['find'](_0x593046=>_0x593046[_0x512390(0xcf)]===_0x5d6a1d);if(!_0x193562)throw CliErrors[_0x512390(0xda)](_0x512390(0x13d)+_0x5d6a1d);return{..._0x193562};}const apiDocList={'service':'api-doc','command':a1_0x5ef29a(0xe4),'description':a1_0x5ef29a(0x124),'risk':a1_0x5ef29a(0xe2),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x10b5af){const _0x27654d=a1_0x5ef29a,_0x4a259b=listApiDocEntries({'category':_0x10b5af[_0x27654d(0xeb)]('category'),'keyword':_0x10b5af[_0x27654d(0xeb)](_0x27654d(0xf9))});return{'ok':!![],'data':{'total':_0x4a259b[_0x27654d(0x141)],'items':_0x4a259b}};}},apiDocDetail={'service':'api-doc','command':a1_0x5ef29a(0x107),'description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0x5ef29a(0xe2),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x1d1fa2){const _0xddada1=a1_0x5ef29a;return{'ok':!![],'data':getApiDocDetail(_0x1d1fa2[_0xddada1(0xeb)]('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x1a018a,_0x28cce4){const _0x49bf3c=a2_0x46c4,_0x1ddee7=_0x1a018a();while(!![]){try{const _0x50044d=parseInt(_0x49bf3c(0x118))/0x1+parseInt(_0x49bf3c(0x114))/0x2+parseInt(_0x49bf3c(0x106))/0x3+-parseInt(_0x49bf3c(0x110))/0x4+parseInt(_0x49bf3c(0x109))/0x5+parseInt(_0x49bf3c(0x10e))/0x6*(-parseInt(_0x49bf3c(0x102))/0x7)+parseInt(_0x49bf3c(0x104))/0x8*(-parseInt(_0x49bf3c(0x11d))/0x9);if(_0x50044d===_0x28cce4)break;else _0x1ddee7['push'](_0x1ddee7['shift']());}catch(_0x1b3364){_0x1ddee7['push'](_0x1ddee7['shift']());}}}(a2_0x4a73,0x396f5));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a2_0x46c4(_0x156986,_0x3fa7df){_0x156986=_0x156986-0x102;const _0x4a7349=a2_0x4a73();let _0x46c456=_0x4a7349[_0x156986];return _0x46c456;}function a2_0x4a73(){const _0x258861=['.tmp','1202260VukZbX','parse','items','update','trim','1129308LUsIPg','unknown','401340HkiIZJ','cache','my-apps.json','sha256','743476jxDNRe','code','utf8','slice','364995nzboFu','appCode','homeDirName','EXDEV','stringify','9kOrMId','isArray','appName','7addcul','digest','6452752klcHWB','hex','1059645gHbfbt','ak_'];a2_0x4a73=function(){return _0x258861;};return a2_0x4a73();}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x2e5d97){const _0x2cd933=a2_0x46c4,_0x485940=_0x2e5d97[_0x2cd933(0x10d)](),_0x2accee=_0x485940[_0x2cd933(0x117)](-0x6)||_0x2cd933(0x10f),_0x585dc6=createHash(_0x2cd933(0x113))[_0x2cd933(0x10c)](_0x485940)[_0x2cd933(0x103)](_0x2cd933(0x105))[_0x2cd933(0x117)](0x0,0xc);return _0x2cd933(0x107)+_0x2accee+'_'+_0x585dc6;}export function getAppCacheFilePath(_0x4d3736,_0x406e08){const _0x455add=a2_0x46c4;return resolve(homedir(),PRODUCT_CONFIG[_0x455add(0x11a)],_0x455add(0x111),_0x4d3736,fingerprintAccessKey(_0x406e08),_0x455add(0x112));}export function readCachedAppList(_0xb4d4c3,_0x1da281){const _0x414fa5=a2_0x46c4;if(!_0x1da281?.[_0x414fa5(0x10d)]())return null;const _0x16dadc=getAppCacheFilePath(_0xb4d4c3,_0x1da281);if(!existsSync(_0x16dadc))return null;try{const _0x6c8f84=readFileSync(_0x16dadc,_0x414fa5(0x116));if(!_0x6c8f84[_0x414fa5(0x10d)]())return null;const _0x2d2940=JSON[_0x414fa5(0x10a)](_0x6c8f84);if(!Array[_0x414fa5(0x11e)](_0x2d2940[_0x414fa5(0x10b)]))return null;return _0x2d2940;}catch{return null;}}export function writeCachedAppList(_0xe7ad6f,_0x3ef83a,_0x2bccb9){const _0x3a4058=a2_0x46c4,_0x49dfbd=getAppCacheFilePath(_0xe7ad6f,_0x3ef83a),_0x3d0416=dirname(_0x49dfbd);!existsSync(_0x3d0416)&&mkdirSync(_0x3d0416,{'recursive':!![]});const _0x2ec8b8=_0x49dfbd+_0x3a4058(0x108);try{writeFileSync(_0x2ec8b8,JSON[_0x3a4058(0x11c)](_0x2bccb9,null,0x2)+'\x0a',{'encoding':_0x3a4058(0x116),'mode':0x180});try{renameSync(_0x2ec8b8,_0x49dfbd);}catch(_0x26ebf5){if(_0x26ebf5[_0x3a4058(0x115)]==='EPERM'||_0x26ebf5[_0x3a4058(0x115)]===_0x3a4058(0x11b)||_0x26ebf5[_0x3a4058(0x115)]==='EACCES'){writeFileSync(_0x49dfbd,JSON['stringify'](_0x2bccb9,null,0x2)+'\x0a',{'encoding':_0x3a4058(0x116)});try{unlinkSync(_0x2ec8b8);}catch{}}else throw _0x26ebf5;}}catch(_0x3280f6){try{unlinkSync(_0x2ec8b8);}catch{}throw _0x3280f6;}return _0x49dfbd;}export function resolveCachedAppCode(_0x33f111,_0x22c454,_0x20e84d){const _0x46d717=a2_0x46c4;if(!_0x33f111)return undefined;const _0x38272e=readCachedAppList(_0x22c454,_0x20e84d),_0x314ed1=_0x38272e?.[_0x46d717(0x10b)]['find'](_0x2e349e=>_0x2e349e[_0x46d717(0x11f)]===_0x33f111&&isRuntimeAccessibleApp(_0x2e349e));return _0x314ed1?.[_0x46d717(0x119)]?.['trim']()||undefined;}
1
+ (function(_0x10e1d9,_0x10a483){const _0x25ef7b=a2_0x348a,_0x416528=_0x10e1d9();while(!![]){try{const _0x3c0e85=parseInt(_0x25ef7b(0x98))/0x1*(-parseInt(_0x25ef7b(0xa2))/0x2)+parseInt(_0x25ef7b(0xa6))/0x3+parseInt(_0x25ef7b(0x95))/0x4+-parseInt(_0x25ef7b(0xa4))/0x5*(parseInt(_0x25ef7b(0x90))/0x6)+-parseInt(_0x25ef7b(0xa1))/0x7*(parseInt(_0x25ef7b(0x97))/0x8)+-parseInt(_0x25ef7b(0x9c))/0x9*(parseInt(_0x25ef7b(0x93))/0xa)+parseInt(_0x25ef7b(0x8d))/0xb*(parseInt(_0x25ef7b(0x8f))/0xc);if(_0x3c0e85===_0x10a483)break;else _0x416528['push'](_0x416528['shift']());}catch(_0x29776a){_0x416528['push'](_0x416528['shift']());}}}(a2_0x2415,0x857e8));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';function a2_0x2415(){const _0x24c97d=['items','686872xFXFQH','67108PUreXp','code','.tmp','slice','9AMkJzH','ak_','trim','appName','my-apps.json','21GDMeZb','22lLPKOD','parse','11835DxkuOZ','EPERM','1648509eLjeiN','utf8','EACCES','find','unknown','2807871giJtpx','appCode','48jyWLaa','330QTSVaM','stringify','isArray','2426470aRnQJi','digest','1379368cObftk'];a2_0x2415=function(){return _0x24c97d;};return a2_0x2415();}import{PRODUCT_CONFIG}from'../../constant/product.js';function a2_0x348a(_0x2010f5,_0x2a5b4f){_0x2010f5=_0x2010f5-0x8d;const _0x241533=a2_0x2415();let _0x348a30=_0x241533[_0x2010f5];return _0x348a30;}import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x345379){const _0x55c14a=a2_0x348a,_0x2c0a82=_0x345379['trim'](),_0x4d57d0=_0x2c0a82[_0x55c14a(0x9b)](-0x6)||_0x55c14a(0xaa),_0x19c84d=createHash('sha256')['update'](_0x2c0a82)[_0x55c14a(0x94)]('hex')[_0x55c14a(0x9b)](0x0,0xc);return _0x55c14a(0x9d)+_0x4d57d0+'_'+_0x19c84d;}export function getAppCacheFilePath(_0x2565d3,_0x401c2f){const _0x4fb7a2=a2_0x348a;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],'cache',_0x2565d3,fingerprintAccessKey(_0x401c2f),_0x4fb7a2(0xa0));}export function readCachedAppList(_0x4f9197,_0x405f5f){const _0x3eedd2=a2_0x348a;if(!_0x405f5f?.[_0x3eedd2(0x9e)]())return null;const _0x145d6a=getAppCacheFilePath(_0x4f9197,_0x405f5f);if(!existsSync(_0x145d6a))return null;try{const _0x20754b=readFileSync(_0x145d6a,_0x3eedd2(0xa7));if(!_0x20754b[_0x3eedd2(0x9e)]())return null;const _0x4cdfa4=JSON[_0x3eedd2(0xa3)](_0x20754b);if(!Array[_0x3eedd2(0x92)](_0x4cdfa4[_0x3eedd2(0x96)]))return null;return _0x4cdfa4;}catch{return null;}}export function writeCachedAppList(_0x18b500,_0x499e3f,_0x43c7c){const _0x4fe0ce=a2_0x348a,_0x965e2b=getAppCacheFilePath(_0x18b500,_0x499e3f),_0x284c1b=dirname(_0x965e2b);!existsSync(_0x284c1b)&&mkdirSync(_0x284c1b,{'recursive':!![]});const _0x14dbb7=_0x965e2b+_0x4fe0ce(0x9a);try{writeFileSync(_0x14dbb7,JSON[_0x4fe0ce(0x91)](_0x43c7c,null,0x2)+'\x0a',{'encoding':_0x4fe0ce(0xa7),'mode':0x180});try{renameSync(_0x14dbb7,_0x965e2b);}catch(_0x4556d0){if(_0x4556d0[_0x4fe0ce(0x99)]===_0x4fe0ce(0xa5)||_0x4556d0[_0x4fe0ce(0x99)]==='EXDEV'||_0x4556d0['code']===_0x4fe0ce(0xa8)){writeFileSync(_0x965e2b,JSON[_0x4fe0ce(0x91)](_0x43c7c,null,0x2)+'\x0a',{'encoding':_0x4fe0ce(0xa7)});try{unlinkSync(_0x14dbb7);}catch{}}else throw _0x4556d0;}}catch(_0x2b130c){try{unlinkSync(_0x14dbb7);}catch{}throw _0x2b130c;}return _0x965e2b;}export function resolveCachedAppCode(_0x91de46,_0x1fa5e5,_0x513c2f){const _0xda7504=a2_0x348a;if(!_0x91de46)return undefined;const _0x3c275d=readCachedAppList(_0x1fa5e5,_0x513c2f),_0x2fe51a=_0x3c275d?.['items'][_0xda7504(0xa9)](_0x1b254f=>_0x1b254f[_0xda7504(0x9f)]===_0x91de46&&isRuntimeAccessibleApp(_0x1b254f));return _0x2fe51a?.[_0xda7504(0x8e)]?.[_0xda7504(0x9e)]()||undefined;}
@@ -1 +1 @@
1
- const a3_0x5ca01b=a3_0x106f;(function(_0x4425b5,_0x11d270){const _0x2ffa93=a3_0x106f,_0x1e538f=_0x4425b5();while(!![]){try{const _0x1307bb=parseInt(_0x2ffa93(0x1e5))/0x1*(-parseInt(_0x2ffa93(0x1bd))/0x2)+parseInt(_0x2ffa93(0x1e4))/0x3*(parseInt(_0x2ffa93(0x1db))/0x4)+parseInt(_0x2ffa93(0x1b0))/0x5*(-parseInt(_0x2ffa93(0x1d1))/0x6)+parseInt(_0x2ffa93(0x1e1))/0x7+-parseInt(_0x2ffa93(0x1b2))/0x8*(parseInt(_0x2ffa93(0x1d7))/0x9)+parseInt(_0x2ffa93(0x1d6))/0xa+-parseInt(_0x2ffa93(0x1b7))/0xb*(-parseInt(_0x2ffa93(0x1b5))/0xc);if(_0x1307bb===_0x11d270)break;else _0x1e538f['push'](_0x1e538f['shift']());}catch(_0x361f16){_0x1e538f['push'](_0x1e538f['shift']());}}}(a3_0x1dfd,0xf04cb));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':'global','type':'boolean','description':a3_0x5ca01b(0x1d9),'default':![]};function collectFlags(_0x38bf44,_0x1369c7){const _0x53b420=a3_0x5ca01b,_0x209ef2={};for(const _0x25daa6 of _0x1369c7){const _0x18cac2=_0x25daa6[_0x53b420(0x1c9)]===_0x53b420(0x1df)?_0x38bf44[_0x53b420(0x1be)](_0x25daa6[_0x53b420(0x1ad)]):_0x38bf44[_0x53b420(0x1dd)](_0x25daa6[_0x53b420(0x1ad)]);if(_0x18cac2!==''&&_0x18cac2!==![])_0x209ef2[_0x25daa6['name']]=_0x18cac2;}if(_0x38bf44[_0x53b420(0x198)])_0x209ef2[_0x53b420(0x198)]=!![];return _0x209ef2;}function normalizeLanguages(_0x43c90b){const _0x205f82=a3_0x5ca01b;if(!Array['isArray'](_0x43c90b))return[];return _0x43c90b[_0x205f82(0x1bc)](_0x268e65=>typeof _0x268e65===_0x205f82(0x18f))['map'](_0x4e3045=>_0x4e3045[_0x205f82(0x197)]())[_0x205f82(0x1bc)](Boolean);}function buildRemoteAppI18nFields(_0x35560c){const _0x1d66fc=a3_0x5ca01b,_0x347e0d=normalizeLanguages(_0x35560c[_0x1d66fc(0x1e7)]?.['langs']);return{'enableI18n':typeof _0x35560c[_0x1d66fc(0x1b8)]===_0x1d66fc(0x1df)?_0x35560c[_0x1d66fc(0x1b8)]:null,'languages':_0x347e0d,'i18nInfo':_0x35560c[_0x1d66fc(0x1e7)]?{..._0x35560c[_0x1d66fc(0x1e7)],'langs':_0x347e0d[_0x1d66fc(0x1a8)]?_0x347e0d:null}:null};}function a3_0x106f(_0x480f58,_0x4ad5f4){_0x480f58=_0x480f58-0x18e;const _0x1dfd58=a3_0x1dfd();let _0x106f41=_0x1dfd58[_0x480f58];return _0x106f41;}const initDef={'service':a3_0x5ca01b(0x199),'command':a3_0x5ca01b(0x19a),'description':a3_0x5ca01b(0x1b6),'risk':a3_0x5ca01b(0x1a1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x8afcf3){const _0x19fcd2=a3_0x5ca01b;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x19fcd2(0x19e)),await runInit(collectFlags(_0x8afcf3,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x5ca01b(0x199),'command':a3_0x5ca01b(0x1c4),'description':a3_0x5ca01b(0x191),'risk':a3_0x5ca01b(0x196),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x5ca01b(0x1a0),'type':a3_0x5ca01b(0x18f),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5ca01b(0x1ba),'type':a3_0x5ca01b(0x1df),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x5ca01b(0x1e0),'type':a3_0x5ca01b(0x1df),'description':a3_0x5ca01b(0x1e8),'default':![]},{'name':a3_0x5ca01b(0x1c6),'type':'boolean','description':a3_0x5ca01b(0x1cb),'default':![]}],async 'execute'(_0x547cd1){const _0x7fc476=a3_0x5ca01b,_0x4e6835=_0x547cd1[_0x7fc476(0x1dd)](_0x7fc476(0x1a0))||_0x547cd1[_0x7fc476(0x1a9)]||getEnv()||'production',_0x27457d=_0x547cd1['bool'](_0x7fc476(0x1ba)),_0x89ae93=_0x547cd1[_0x7fc476(0x1be)](_0x7fc476(0x1e0)),_0x1bf5d0=_0x547cd1[_0x7fc476(0x1be)](_0x7fc476(0x1c6)),{readRawConfigWithLayers:_0x2db7e9,resolveDefaultAppSource:_0x2f43c7,getLocalAppAliases:_0x38fe91}=await import(_0x7fc476(0x1b3)),{getRemoteAppList:_0x1039db}=await import(_0x7fc476(0x1da)),{config:_0x44a5c8,layers:_0x4f2d62}=_0x2db7e9(),_0x11196a=_0x2f43c7(_0x4f2d62),{defaultApp:_0x579f0c}=_0x44a5c8,_0x3fa5b5=await _0x1039db({'env':_0x4e6835,'accessKey':_0x547cd1[_0x7fc476(0x1c3)],'localOnly':_0x27457d,'noCache':_0x89ae93}),_0x306786=_0x1bf5d0?_0x3fa5b5[_0x7fc476(0x1c8)]:filterRuntimeAccessibleApps(_0x3fa5b5[_0x7fc476(0x1c8)]),_0x6af1bb=_0x3fa5b5['items'][_0x7fc476(0x1a8)]-_0x306786[_0x7fc476(0x1a8)],_0x160409=_0x306786[_0x7fc476(0x1e9)](_0x4bb20f=>{const _0x5c9952=_0x7fc476;return{'name':_0x4bb20f[_0x5c9952(0x190)],'appcode':_0x4bb20f[_0x5c9952(0x1a6)],'named':!![],'definedIn':_0x5c9952(0x1d2),'isDefault':_0x4bb20f[_0x5c9952(0x190)]===_0x579f0c,...buildAppProfileListFields(_0x4e6835),...buildRemoteAppI18nFields(_0x4bb20f),'source':_0x3fa5b5[_0x5c9952(0x1cc)],'owner':_0x4bb20f[_0x5c9952(0x1ea)]??null,'status':_0x4bb20f['appPublishStatus']??null,'cachedAt':_0x3fa5b5['fetchedAt']};}),_0x59ddf9=_0x38fe91(_0x44a5c8);let _0x188e85=0x0;for(const [_0x291e15,_0x3a0b0b]of Object['entries'](_0x59ddf9)){const _0x3eea4d=typeof _0x3a0b0b[_0x7fc476(0x1c0)]==='string'?_0x3a0b0b[_0x7fc476(0x1c0)][_0x7fc476(0x197)]():'';if(!_0x3eea4d)continue;const _0x3713f3=findAppByCode(_0x3fa5b5[_0x7fc476(0x1c8)],_0x3eea4d);if(!_0x1bf5d0&&_0x3713f3&&!isRuntimeAccessibleApp(_0x3713f3))continue;_0x188e85+=0x1,_0x160409['push']({'name':_0x291e15,'appcode':_0x3eea4d,'named':!![],'definedIn':_0x7fc476(0x1ba),'isDefault':_0x291e15===_0x579f0c,...buildAppProfileListFields(_0x4e6835),'source':_0x7fc476(0x1b1),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x160409,_0x547cd1[_0x7fc476(0x19f)]);const _0x14bd6a=_0x160409['find'](_0x335005=>_0x335005[_0x7fc476(0x195)]===!![]),_0x3c56df=_0x579f0c??_0x14bd6a?.[_0x7fc476(0x1ad)]??null,_0x459930={'env':_0x4e6835,'source':_0x3fa5b5[_0x7fc476(0x1cc)],'fetchedAt':_0x3fa5b5[_0x7fc476(0x1e6)],'cachePath':_0x3fa5b5['cachePath'],'globalPath':_0x4f2d62['globalPath']??null,'projectPath':_0x4f2d62[_0x7fc476(0x1c5)]??null,'defaultApp':_0x3c56df,'defaultAppSource':_0x579f0c!=null?_0x11196a:null,'localAliasCount':_0x188e85,'remoteTotal':_0x3fa5b5[_0x7fc476(0x1c8)][_0x7fc476(0x1a8)],'hiddenUnpublishedCount':_0x6af1bb,'includeUnpublished':_0x1bf5d0};if(_0x160409[_0x7fc476(0x1a8)]===0x0)return{'ok':!![],'data':{'items':_0x160409,'meta':_0x459930},'message':_0x3fa5b5['source']===_0x7fc476(0x1ab)?'No\x20cached\x20apps\x20found.':_0x7fc476(0x1dc)};return{'ok':!![],'data':{'items':_0x160409,'meta':_0x459930}};}},pullDef={'service':'app','command':a3_0x5ca01b(0x1c1),'description':a3_0x5ca01b(0x1c2),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x5ca01b(0x1a0),'type':a3_0x5ca01b(0x18f),'description':a3_0x5ca01b(0x1cd),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5ca01b(0x1ba),'type':'boolean','description':a3_0x5ca01b(0x1de),'default':![]},{'name':'no-cache','type':a3_0x5ca01b(0x1df),'description':a3_0x5ca01b(0x1e8),'default':![]}],async 'execute'(_0x22cdfe){const _0x5dab42=a3_0x5ca01b,_0x2c3747=_0x22cdfe[_0x5dab42(0x1dd)](_0x5dab42(0x1a0))||_0x22cdfe['envName']||getEnv()||_0x5dab42(0x19b),_0x6ae20a=_0x22cdfe[_0x5dab42(0x1be)](_0x5dab42(0x1ba)),_0x136ace=_0x22cdfe[_0x5dab42(0x1be)](_0x5dab42(0x1e0)),{getRemoteAppList:_0x22001d}=await import(_0x5dab42(0x1da)),_0x2f55be=await _0x22001d({'env':_0x2c3747,'accessKey':_0x22cdfe[_0x5dab42(0x1c3)],'localOnly':_0x6ae20a,'noCache':_0x136ace});return{'ok':!![],'data':{'total':_0x2f55be[_0x5dab42(0x1c8)][_0x5dab42(0x1a8)],'env':_0x2c3747,'source':_0x2f55be['source'],'fetchedAt':_0x2f55be[_0x5dab42(0x1e6)],'cachePath':_0x2f55be[_0x5dab42(0x1d0)]},'message':_0x2f55be[_0x5dab42(0x1cc)]==='cache'?_0x5dab42(0x18e)+_0x2f55be[_0x5dab42(0x1c8)]['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x2c3747+'\x22.':_0x5dab42(0x1af)+_0x2f55be[_0x5dab42(0x1c8)][_0x5dab42(0x1a8)]+_0x5dab42(0x1a7)+_0x2c3747+'\x22.'};}},useDef={'service':a3_0x5ca01b(0x199),'command':'use','description':a3_0x5ca01b(0x1a4),'risk':a3_0x5ca01b(0x1a1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x5ca01b(0x1ad),'description':a3_0x5ca01b(0x1aa),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x463a04){const _0x1f0712=a3_0x5ca01b;if(!_0x463a04[_0x1f0712(0x1ae)][0x0])throw CliErrors[_0x1f0712(0x19d)](_0x1f0712(0x19c),_0x1f0712(0x1ac)+CLI_BIN_NAME+_0x1f0712(0x1e3));},async 'execute'(_0x452cf1){const _0x1836b6=a3_0x5ca01b;warnDeprecatedAppCommand(_0x1836b6(0x1bb),CLI_BIN_NAME+_0x1836b6(0x1ca));const _0x4d2cc6=_0x452cf1[_0x1836b6(0x1ae)][0x0];if(!_0x4d2cc6)throw CliErrors[_0x1836b6(0x19d)]('Missing\x20app\x20name.',_0x1836b6(0x1ac)+CLI_BIN_NAME+_0x1836b6(0x1e3));const {buildConfigFromFlags:_0x355724,resolveLocalAppAliasCode:_0x12e033}=await import('../../context.js'),{readCachedAppList:_0x2330a2}=await import(_0x1836b6(0x1d5)),_0x5bdff9=_0x452cf1[_0x1836b6(0x1dd)]('env'),_0x596f32=_0x355724(_0x5bdff9?{'env':_0x5bdff9}:{}),_0x53c2c3=_0x2330a2(_0x596f32[_0x1836b6(0x1a0)],_0x596f32[_0x1836b6(0x1c3)]),_0x468d23=_0x53c2c3?.['items'][_0x1836b6(0x194)](_0xae5de8=>_0xae5de8[_0x1836b6(0x190)]===_0x4d2cc6),_0x1fe97d=_0x12e033(_0x596f32[_0x1836b6(0x1cf)]??{},_0x4d2cc6);if(_0x468d23&&!isRuntimeAccessibleApp(_0x468d23))throw runtimeInaccessibleAppError(_0x468d23,'\x22'+_0x4d2cc6+'\x22');if(_0x1fe97d){const _0x1f24d0=_0x53c2c3?.[_0x1836b6(0x1c8)][_0x1836b6(0x194)](_0x5ec108=>_0x5ec108[_0x1836b6(0x1a6)]?.['trim']()===_0x1fe97d);if(_0x1f24d0&&!isRuntimeAccessibleApp(_0x1f24d0))throw runtimeInaccessibleAppError(_0x1f24d0,'\x22'+_0x4d2cc6+'\x22');}if(!_0x468d23&&!_0x1fe97d&&_0x596f32['defaultApp']!==_0x4d2cc6){const _0xc19cf9=[..._0x53c2c3?.[_0x1836b6(0x1c8)][_0x1836b6(0x1e9)](_0x243aae=>_0x243aae[_0x1836b6(0x190)])??[]],_0x1c3785=_0xc19cf9[_0x1836b6(0x1a8)]===0x0?_0x1836b6(0x193)+CLI_BIN_NAME+_0x1836b6(0x1bf)+_0x4d2cc6+'.appcode\x20to\x20.lovrabet.json.':_0x1836b6(0x1d3)+Array[_0x1836b6(0x1d4)](new Set(_0xc19cf9))['join'](',\x20')+_0x1836b6(0x1ce);throw CliErrors[_0x1836b6(0x19d)](_0x1836b6(0x192)+_0x4d2cc6+_0x1836b6(0x1a2),_0x1c3785);}const _0x354277=_0x452cf1[_0x1836b6(0x1be)](_0x1836b6(0x1c7));let _0x53198d;if(_0x354277)_0x53198d={'global':!![]};else{const {isInProject:_0x25c678}=await import('../../context.js'),_0x42f88a=_0x25c678();_0x53198d=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x42f88a}));}const _0x52ff91=readConfig(_0x53198d);return _0x52ff91[_0x1836b6(0x1d8)]=_0x4d2cc6,writeConfig(_0x52ff91,_0x53198d),{'ok':!![],'message':_0x1836b6(0x1a3)+_0x4d2cc6+'\x22'+scopeLabel(_0x53198d)+'.'};}};function warnDeprecatedAppCommand(_0x3e20e2,_0x1c7c23){const _0x453c1e=a3_0x5ca01b;console[_0x453c1e(0x1b9)](CLI_BIN_NAME+'\x20app\x20'+_0x3e20e2+_0x453c1e(0x1e2)+_0x1c7c23+'`\x20instead.');}const importDef={'service':a3_0x5ca01b(0x199),'command':a3_0x5ca01b(0x1b4),'description':a3_0x5ca01b(0x1a5),'risk':a3_0x5ca01b(0x1a1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x19355d){return await runInitImport(collectFlags(_0x19355d,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];function a3_0x1dfd(){const _0x3ecd5c=['Use\x20global\x20config\x20scope','../../commands/app/remote-source.js','40448YWXEtw','No\x20apps\x20found\x20on\x20the\x20platform.','str','Read\x20from\x20local\x20cache\x20only','boolean','no-cache','2999521wPYbto','\x20is\x20deprecated.\x20Use\x20`','\x20app\x20use\x20<name>\x20[--global]','561CsaMzQ','9164nhaQWI','fetchedAt','i18nInfo','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','map','appOwnerName','Loaded\x20','string','appName','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','App\x20\x22','Use\x20`','find','isCurrent','read','trim','nonInteractive','app','init','production','Missing\x20app\x20name.','validation','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','mergedCli','env','write','\x22\x20not\x20found.','Default\x20app\x20candidate\x20set\x20to\x20\x22','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appCode','\x20app(s)\x20for\x20env=\x22','length','envName','Remote\x20app\x20name\x20to\x20activate','cache','Usage:\x20','name','args','Refreshed\x20app\x20cache\x20with\x20','1985AHGraQ','config','456cLrhAt','../../context.js','import','25909752hQuAjC','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','11hzzVbv','enableI18n','warn','local','use','filter','398FKMrUz','bool','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','appcode','pull','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','accessKey','list','projectPath','include-unpublished','global','items','type','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Include\x20unpublished\x20apps\x20for\x20diagnostics','source','Target\x20environment\x20(default:\x20current\x20env)','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','raw','cachePath','23370XETqxj','remote','Available\x20remote\x20apps:\x20','from','../../commands/app/cache.js','4576520ACqYEx','91899WLDTZI','defaultApp'];a3_0x1dfd=function(){return _0x3ecd5c;};return a3_0x1dfd();}
1
+ const a3_0xba739a=a3_0x195c;(function(_0x1825e0,_0x5613f5){const _0xbdf79=a3_0x195c,_0x2b8f98=_0x1825e0();while(!![]){try{const _0x54fd17=parseInt(_0xbdf79(0x115))/0x1+parseInt(_0xbdf79(0x127))/0x2+parseInt(_0xbdf79(0x106))/0x3+parseInt(_0xbdf79(0x150))/0x4+-parseInt(_0xbdf79(0x110))/0x5*(parseInt(_0xbdf79(0x138))/0x6)+parseInt(_0xbdf79(0x148))/0x7+-parseInt(_0xbdf79(0x11a))/0x8*(parseInt(_0xbdf79(0x116))/0x9);if(_0x54fd17===_0x5613f5)break;else _0x2b8f98['push'](_0x2b8f98['shift']());}catch(_0x1595d9){_0x2b8f98['push'](_0x2b8f98['shift']());}}}(a3_0x4342,0xa5a6d));function a3_0x4342(){const _0x2e03e9=['appName','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Remote\x20app\x20name\x20to\x20activate','Missing\x20app\x20name.','defaultApp','app','init','remote','warn','no-cache','env','fetchedAt','project-default','3076647MpwMXV','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Usage:\x20','name','accessKey','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','cachePath','langs','Read\x20from\x20local\x20cache\x20only','\x22\x20not\x20found.','9055NOfRPP','length','items','join','filter','422749OxAXie','165105OGnjLo','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','boolean','appcode','328OQYxWa','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','appPublishStatus','isCurrent','entries','../../commands/app/cache.js','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','trim','global','No\x20apps\x20found\x20on\x20the\x20platform.','local','source','816708xbTyVi','globalPath','str','use','list','raw','appCode','../../context.js','Default\x20app\x20candidate\x20set\x20to\x20\x22','bool','push','../../commands/app/remote-source.js','envName','No\x20cached\x20apps\x20found.','string','Target\x20environment\x20(default:\x20current\x20env)','\x20app(s)\x20for\x20env=\x22','3690mVYVpf','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Use\x20`','map','enableI18n','Include\x20unpublished\x20apps\x20for\x20diagnostics','i18nInfo','args','production','appOwnerName','`\x20instead.','mergedCli','cache','read','validation','nonInteractive','3761590eOfhCa','config','write','isArray','\x20app\x20use\x20<name>\x20[--global]','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','find','include-unpublished','601588bHKbVR','Refreshed\x20app\x20cache\x20with\x20','import','Loaded\x20','pull','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app'];a3_0x4342=function(){return _0x2e03e9;};return a3_0x4342();}import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';function a3_0x195c(_0x2ebd99,_0x777e74){_0x2ebd99=_0x2ebd99-0xfb;const _0x4342d9=a3_0x4342();let _0x195ce0=_0x4342d9[_0x2ebd99];return _0x195ce0;}const GLOBAL_FLAG={'name':'global','type':a3_0xba739a(0x118),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x672934,_0x236ea7){const _0x3f196d=a3_0xba739a,_0x53a800={};for(const _0x2ae536 of _0x236ea7){const _0x3fea91=_0x2ae536['type']==='boolean'?_0x672934['bool'](_0x2ae536[_0x3f196d(0x109)]):_0x672934[_0x3f196d(0x129)](_0x2ae536['name']);if(_0x3fea91!==''&&_0x3fea91!==![])_0x53a800[_0x2ae536['name']]=_0x3fea91;}if(_0x672934[_0x3f196d(0x147)])_0x53a800['nonInteractive']=!![];return _0x53a800;}function normalizeLanguages(_0x374488){const _0x238a1a=a3_0xba739a;if(!Array[_0x238a1a(0x14b)](_0x374488))return[];return _0x374488[_0x238a1a(0x114)](_0x319a56=>typeof _0x319a56===_0x238a1a(0x135))['map'](_0x42b945=>_0x42b945['trim']())['filter'](Boolean);}function buildRemoteAppI18nFields(_0xd94973){const _0x16fd13=a3_0xba739a,_0x496bfa=normalizeLanguages(_0xd94973[_0x16fd13(0x13e)]?.[_0x16fd13(0x10d)]);return{'enableI18n':typeof _0xd94973[_0x16fd13(0x13c)]===_0x16fd13(0x118)?_0xd94973[_0x16fd13(0x13c)]:null,'languages':_0x496bfa,'i18nInfo':_0xd94973['i18nInfo']?{..._0xd94973[_0x16fd13(0x13e)],'langs':_0x496bfa['length']?_0x496bfa:null}:null};}const initDef={'service':a3_0xba739a(0xfe),'command':a3_0xba739a(0xff),'description':a3_0xba739a(0x155),'risk':a3_0xba739a(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x45ba83){const _0x5a51ac=a3_0xba739a;return warnDeprecatedAppCommand(_0x5a51ac(0xff),CLI_BIN_NAME+_0x5a51ac(0x10b)),await runInit(collectFlags(_0x45ba83,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0xba739a(0xfe),'command':a3_0xba739a(0x12b),'description':a3_0xba739a(0x11c),'risk':a3_0xba739a(0x145),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0xba739a(0x103),'type':a3_0xba739a(0x135),'description':a3_0xba739a(0x107),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xba739a(0x125),'type':a3_0xba739a(0x118),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0xba739a(0x102),'type':'boolean','description':a3_0xba739a(0x139),'default':![]},{'name':a3_0xba739a(0x14f),'type':'boolean','description':a3_0xba739a(0x13d),'default':![]}],async 'execute'(_0x425b60){const _0x472bb9=a3_0xba739a,_0x7ea666=_0x425b60[_0x472bb9(0x129)](_0x472bb9(0x103))||_0x425b60['envName']||getEnv()||_0x472bb9(0x140),_0x3c876c=_0x425b60[_0x472bb9(0x130)]('local'),_0x1db749=_0x425b60[_0x472bb9(0x130)](_0x472bb9(0x102)),_0x1e5b50=_0x425b60[_0x472bb9(0x130)](_0x472bb9(0x14f)),{readRawConfigWithLayers:_0x54284c,resolveDefaultAppSource:_0x536021,getLocalAppAliases:_0x2d1970}=await import(_0x472bb9(0x12e)),{getRemoteAppList:_0x5c20af}=await import('../../commands/app/remote-source.js'),{config:_0x6de280,layers:_0x36e6a1}=_0x54284c(),_0x13dd38=_0x536021(_0x36e6a1),{defaultApp:_0x14f628}=_0x6de280,_0x11b43e=await _0x5c20af({'env':_0x7ea666,'accessKey':_0x425b60[_0x472bb9(0x10a)],'localOnly':_0x3c876c,'noCache':_0x1db749}),_0x311e67=_0x1e5b50?_0x11b43e[_0x472bb9(0x112)]:filterRuntimeAccessibleApps(_0x11b43e['items']),_0xfe4ad7=_0x11b43e[_0x472bb9(0x112)][_0x472bb9(0x111)]-_0x311e67[_0x472bb9(0x111)],_0x58b695=_0x311e67[_0x472bb9(0x13b)](_0x1fb68b=>{const _0x4a597e=_0x472bb9;return{'name':_0x1fb68b[_0x4a597e(0x156)],'appcode':_0x1fb68b[_0x4a597e(0x12d)],'named':!![],'definedIn':_0x4a597e(0x100),'isDefault':_0x1fb68b[_0x4a597e(0x156)]===_0x14f628,...buildAppProfileListFields(_0x7ea666),...buildRemoteAppI18nFields(_0x1fb68b),'source':_0x11b43e[_0x4a597e(0x126)],'owner':_0x1fb68b[_0x4a597e(0x141)]??null,'status':_0x1fb68b[_0x4a597e(0x11d)]??null,'cachedAt':_0x11b43e[_0x4a597e(0x104)]};}),_0x5bb46b=_0x2d1970(_0x6de280);let _0xd4a291=0x0;for(const [_0x5be2cd,_0x21490d]of Object[_0x472bb9(0x11f)](_0x5bb46b)){const _0xbf4d80=typeof _0x21490d[_0x472bb9(0x119)]===_0x472bb9(0x135)?_0x21490d[_0x472bb9(0x119)][_0x472bb9(0x122)]():'';if(!_0xbf4d80)continue;const _0x80f4d4=findAppByCode(_0x11b43e[_0x472bb9(0x112)],_0xbf4d80);if(!_0x1e5b50&&_0x80f4d4&&!isRuntimeAccessibleApp(_0x80f4d4))continue;_0xd4a291+=0x1,_0x58b695[_0x472bb9(0x131)]({'name':_0x5be2cd,'appcode':_0xbf4d80,'named':!![],'definedIn':'local','isDefault':_0x5be2cd===_0x14f628,...buildAppProfileListFields(_0x7ea666),'source':_0x472bb9(0x149),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x58b695,_0x425b60[_0x472bb9(0x143)]);const _0x189c87=_0x58b695[_0x472bb9(0x14e)](_0x235f05=>_0x235f05[_0x472bb9(0x11e)]===!![]),_0x580b6f=_0x14f628??_0x189c87?.['name']??null,_0x4aa91d={'env':_0x7ea666,'source':_0x11b43e[_0x472bb9(0x126)],'fetchedAt':_0x11b43e[_0x472bb9(0x104)],'cachePath':_0x11b43e[_0x472bb9(0x10c)],'globalPath':_0x36e6a1[_0x472bb9(0x128)]??null,'projectPath':_0x36e6a1['projectPath']??null,'defaultApp':_0x580b6f,'defaultAppSource':_0x14f628!=null?_0x13dd38:null,'localAliasCount':_0xd4a291,'remoteTotal':_0x11b43e['items'][_0x472bb9(0x111)],'hiddenUnpublishedCount':_0xfe4ad7,'includeUnpublished':_0x1e5b50};if(_0x58b695[_0x472bb9(0x111)]===0x0)return{'ok':!![],'data':{'items':_0x58b695,'meta':_0x4aa91d},'message':_0x11b43e[_0x472bb9(0x126)]===_0x472bb9(0x144)?_0x472bb9(0x134):_0x472bb9(0x124)};return{'ok':!![],'data':{'items':_0x58b695,'meta':_0x4aa91d}};}},pullDef={'service':a3_0xba739a(0xfe),'command':a3_0xba739a(0x154),'description':a3_0xba739a(0x11b),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0xba739a(0x103),'type':'string','description':a3_0xba739a(0x136),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0xba739a(0x125),'type':a3_0xba739a(0x118),'description':a3_0xba739a(0x10e),'default':![]},{'name':a3_0xba739a(0x102),'type':a3_0xba739a(0x118),'description':a3_0xba739a(0x139),'default':![]}],async 'execute'(_0x3134f6){const _0x3c8589=a3_0xba739a,_0x42cee7=_0x3134f6[_0x3c8589(0x129)](_0x3c8589(0x103))||_0x3134f6[_0x3c8589(0x133)]||getEnv()||'production',_0x222af1=_0x3134f6[_0x3c8589(0x130)](_0x3c8589(0x125)),_0xe3482a=_0x3134f6[_0x3c8589(0x130)](_0x3c8589(0x102)),{getRemoteAppList:_0x187c27}=await import(_0x3c8589(0x132)),_0x3b0e04=await _0x187c27({'env':_0x42cee7,'accessKey':_0x3134f6[_0x3c8589(0x10a)],'localOnly':_0x222af1,'noCache':_0xe3482a});return{'ok':!![],'data':{'total':_0x3b0e04[_0x3c8589(0x112)]['length'],'env':_0x42cee7,'source':_0x3b0e04['source'],'fetchedAt':_0x3b0e04[_0x3c8589(0x104)],'cachePath':_0x3b0e04[_0x3c8589(0x10c)]},'message':_0x3b0e04[_0x3c8589(0x126)]==='cache'?_0x3c8589(0x153)+_0x3b0e04['items'][_0x3c8589(0x111)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x42cee7+'\x22.':_0x3c8589(0x151)+_0x3b0e04[_0x3c8589(0x112)][_0x3c8589(0x111)]+_0x3c8589(0x137)+_0x42cee7+'\x22.'};}},useDef={'service':a3_0xba739a(0xfe),'command':'use','description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0xba739a(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0xba739a(0x109),'description':a3_0xba739a(0xfb),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x567e9c){const _0xf5f4ef=a3_0xba739a;if(!_0x567e9c[_0xf5f4ef(0x13f)][0x0])throw CliErrors[_0xf5f4ef(0x146)](_0xf5f4ef(0xfc),_0xf5f4ef(0x108)+CLI_BIN_NAME+_0xf5f4ef(0x14c));},async 'execute'(_0x31c300){const _0x3c91ae=a3_0xba739a;warnDeprecatedAppCommand(_0x3c91ae(0x12a),CLI_BIN_NAME+_0x3c91ae(0x157));const _0x26715a=_0x31c300['args'][0x0];if(!_0x26715a)throw CliErrors[_0x3c91ae(0x146)]('Missing\x20app\x20name.',_0x3c91ae(0x108)+CLI_BIN_NAME+_0x3c91ae(0x14c));const {buildConfigFromFlags:_0x297108,resolveLocalAppAliasCode:_0x2df652}=await import(_0x3c91ae(0x12e)),{readCachedAppList:_0x1fc2ea}=await import(_0x3c91ae(0x120)),_0x3b5c4b=_0x31c300[_0x3c91ae(0x129)](_0x3c91ae(0x103)),_0x5e1b4c=_0x297108(_0x3b5c4b?{'env':_0x3b5c4b}:{}),_0x2b155f=_0x1fc2ea(_0x5e1b4c[_0x3c91ae(0x103)],_0x5e1b4c[_0x3c91ae(0x10a)]),_0x2e57d6=_0x2b155f?.['items'][_0x3c91ae(0x14e)](_0x4653a7=>_0x4653a7[_0x3c91ae(0x156)]===_0x26715a),_0x144fa0=_0x2df652(_0x5e1b4c[_0x3c91ae(0x12c)]??{},_0x26715a);if(_0x2e57d6&&!isRuntimeAccessibleApp(_0x2e57d6))throw runtimeInaccessibleAppError(_0x2e57d6,'\x22'+_0x26715a+'\x22');if(_0x144fa0){const _0x5efb32=_0x2b155f?.['items'][_0x3c91ae(0x14e)](_0x50fb04=>_0x50fb04['appCode']?.['trim']()===_0x144fa0);if(_0x5efb32&&!isRuntimeAccessibleApp(_0x5efb32))throw runtimeInaccessibleAppError(_0x5efb32,'\x22'+_0x26715a+'\x22');}if(!_0x2e57d6&&!_0x144fa0&&_0x5e1b4c[_0x3c91ae(0xfd)]!==_0x26715a){const _0x4ef86e=[..._0x2b155f?.[_0x3c91ae(0x112)][_0x3c91ae(0x13b)](_0x50b229=>_0x50b229[_0x3c91ae(0x156)])??[]],_0x3153ac=_0x4ef86e[_0x3c91ae(0x111)]===0x0?_0x3c91ae(0x13a)+CLI_BIN_NAME+_0x3c91ae(0x121)+_0x26715a+'.appcode\x20to\x20.lovrabet.json.':'Available\x20remote\x20apps:\x20'+Array['from'](new Set(_0x4ef86e))[_0x3c91ae(0x113)](',\x20')+_0x3c91ae(0x117);throw CliErrors[_0x3c91ae(0x146)]('App\x20\x22'+_0x26715a+_0x3c91ae(0x10f),_0x3153ac);}const _0x3b3ff1=_0x31c300[_0x3c91ae(0x130)](_0x3c91ae(0x123));let _0x4ddc63;if(_0x3b3ff1)_0x4ddc63={'global':!![]};else{const {isInProject:_0x522f36}=await import('../../context.js'),_0x349217=_0x522f36();_0x4ddc63=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x3c91ae(0x105),'inProject':_0x349217}));}const _0x262714=readConfig(_0x4ddc63);return _0x262714[_0x3c91ae(0xfd)]=_0x26715a,writeConfig(_0x262714,_0x4ddc63),{'ok':!![],'message':_0x3c91ae(0x12f)+_0x26715a+'\x22'+scopeLabel(_0x4ddc63)+'.'};}};function warnDeprecatedAppCommand(_0x1cc5d2,_0x2d6caa){const _0x334c9b=a3_0xba739a;console[_0x334c9b(0x101)](CLI_BIN_NAME+'\x20app\x20'+_0x1cc5d2+'\x20is\x20deprecated.\x20Use\x20`'+_0x2d6caa+_0x334c9b(0x142));}const importDef={'service':a3_0xba739a(0xfe),'command':a3_0xba739a(0x152),'description':a3_0xba739a(0x14d),'risk':a3_0xba739a(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x13291f){return await runInitImport(collectFlags(_0x13291f,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- function a4_0x5495(_0x8b85d2,_0x2f962b){_0x8b85d2=_0x8b85d2-0x1e1;const _0x3ed569=a4_0x3ed5();let _0x54958a=_0x3ed569[_0x8b85d2];return _0x54958a;}(function(_0x2f131d,_0x4aa6fd){const _0x4ee841=a4_0x5495,_0xe0176c=_0x2f131d();while(!![]){try{const _0x31210c=-parseInt(_0x4ee841(0x1ec))/0x1+-parseInt(_0x4ee841(0x1f0))/0x2*(-parseInt(_0x4ee841(0x1ef))/0x3)+parseInt(_0x4ee841(0x1e2))/0x4+parseInt(_0x4ee841(0x1e4))/0x5*(-parseInt(_0x4ee841(0x1ed))/0x6)+-parseInt(_0x4ee841(0x1e6))/0x7+parseInt(_0x4ee841(0x1e1))/0x8+parseInt(_0x4ee841(0x1f2))/0x9*(parseInt(_0x4ee841(0x1f1))/0xa);if(_0x31210c===_0x4aa6fd)break;else _0xe0176c['push'](_0xe0176c['shift']());}catch(_0x26d4ac){_0xe0176c['push'](_0xe0176c['shift']());}}}(a4_0x3ed5,0xbd39d));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(_0x30a34b){const _0x11c126=a4_0x5495;if(typeof _0x30a34b!=='string')return null;const _0x5c0bdd=_0x30a34b['trim']();return _0x5c0bdd?_0x5c0bdd[_0x11c126(0x1ea)]():null;}function a4_0x3ed5(){const _0x1cfcdd=['appPublishStatus','555435vRMHYu','2tNBhPF','920PkgitV','282195JgodIN','filter','appCode','2414488BgieHu','4239912FpRSQR','appName','65TSgbRF','find','8233148FCEXJS','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','trim','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','toUpperCase','UNKNOWN','1111760ykvhOr','631662bbcpWE'];a4_0x3ed5=function(){return _0x1cfcdd;};return a4_0x3ed5();}export function isRuntimeAccessibleApp(_0x2a292e){const _0x501016=a4_0x5495;return normalizeAppPublishStatus(_0x2a292e[_0x501016(0x1ee)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x2e6c46){const _0x27d976=a4_0x5495;return _0x2e6c46[_0x27d976(0x1f3)](isRuntimeAccessibleApp);}export function findAppByName(_0xc1ecb9,_0xb3bdfd){const _0x4487f7=a4_0x5495;return _0xc1ecb9[_0x4487f7(0x1e5)](_0x4829f1=>_0x4829f1[_0x4487f7(0x1e3)]===_0xb3bdfd);}export function findAppByCode(_0x5aeac5,_0x3a8b29){const _0x3b76fc=a4_0x5495,_0xfda198=_0x3a8b29[_0x3b76fc(0x1e8)]();if(!_0xfda198)return undefined;return _0x5aeac5[_0x3b76fc(0x1e5)](_0x247529=>_0x247529[_0x3b76fc(0x1f4)]?.[_0x3b76fc(0x1e8)]()===_0xfda198);}export function runtimeInaccessibleAppError(_0xdbb07c,_0x3ae642){const _0x12e310=a4_0x5495,_0x207a87=normalizeAppPublishStatus(_0xdbb07c[_0x12e310(0x1ee)])??_0x12e310(0x1eb);return CliErrors['validation']('App\x20'+_0x3ae642+_0x12e310(0x1e9),'Current\x20status:\x20'+_0x207a87+'.\x20Publish\x20the\x20app\x20before\x20using\x20'+CLI_BIN_NAME+_0x12e310(0x1e7));}
1
+ function a4_0x48b7(){const _0x100b8e=['100851yGFXLs','13853gNgxoN','6vIICUl','20bBNEes','274167YGufXf','find','5202802SSeaFO','22Dmsgbp','1533416ntwrmo','Current\x20status:\x20','toUpperCase','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','155281jvYKii','.\x20Publish\x20the\x20app\x20before\x20using\x20','appCode','UNKNOWN','24Nshpbm','780095QoBjLK','filter','appPublishStatus','trim','validation','appName'];a4_0x48b7=function(){return _0x100b8e;};return a4_0x48b7();}(function(_0x1335d4,_0x30d26c){const _0x43e155=a4_0x4dfb,_0x3ec7c6=_0x1335d4();while(!![]){try{const _0x92d5f0=-parseInt(_0x43e155(0x1b8))/0x1+parseInt(_0x43e155(0x1b3))/0x2*(parseInt(_0x43e155(0x1ac))/0x3)+-parseInt(_0x43e155(0x1b4))/0x4+parseInt(_0x43e155(0x1bd))/0x5*(-parseInt(_0x43e155(0x1ae))/0x6)+parseInt(_0x43e155(0x1ad))/0x7*(-parseInt(_0x43e155(0x1bc))/0x8)+-parseInt(_0x43e155(0x1b0))/0x9*(-parseInt(_0x43e155(0x1af))/0xa)+parseInt(_0x43e155(0x1b2))/0xb;if(_0x92d5f0===_0x30d26c)break;else _0x3ec7c6['push'](_0x3ec7c6['shift']());}catch(_0x5d17b5){_0x3ec7c6['push'](_0x3ec7c6['shift']());}}}(a4_0x48b7,0x31960));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(_0x311b7e){const _0x3fe161=a4_0x4dfb;if(typeof _0x311b7e!=='string')return null;const _0x196aee=_0x311b7e[_0x3fe161(0x1c0)]();return _0x196aee?_0x196aee[_0x3fe161(0x1b6)]():null;}export function isRuntimeAccessibleApp(_0x1dcf6){const _0x74e3=a4_0x4dfb;return normalizeAppPublishStatus(_0x1dcf6[_0x74e3(0x1bf)])===RUNTIME_ACCESSIBLE_APP_STATUS;}function a4_0x4dfb(_0x3f49e4,_0x53a5fd){_0x3f49e4=_0x3f49e4-0x1aa;const _0x48b7f3=a4_0x48b7();let _0x4dfb51=_0x48b7f3[_0x3f49e4];return _0x4dfb51;}export function filterRuntimeAccessibleApps(_0x2172e1){const _0x297c1d=a4_0x4dfb;return _0x2172e1[_0x297c1d(0x1be)](isRuntimeAccessibleApp);}export function findAppByName(_0x69172e,_0x92bc05){const _0x5717ef=a4_0x4dfb;return _0x69172e[_0x5717ef(0x1b1)](_0xa6f9ba=>_0xa6f9ba[_0x5717ef(0x1ab)]===_0x92bc05);}export function findAppByCode(_0x49c4b8,_0x330370){const _0x57c50b=a4_0x4dfb,_0x1a2ef6=_0x330370['trim']();if(!_0x1a2ef6)return undefined;return _0x49c4b8[_0x57c50b(0x1b1)](_0x15787e=>_0x15787e[_0x57c50b(0x1ba)]?.[_0x57c50b(0x1c0)]()===_0x1a2ef6);}export function runtimeInaccessibleAppError(_0x2558cc,_0x47418e){const _0x4f7576=a4_0x4dfb,_0x257fcc=normalizeAppPublishStatus(_0x2558cc[_0x4f7576(0x1bf)])??_0x4f7576(0x1bb);return CliErrors[_0x4f7576(0x1aa)]('App\x20'+_0x47418e+_0x4f7576(0x1b7),_0x4f7576(0x1b5)+_0x257fcc+_0x4f7576(0x1b9)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
@@ -1 +1 @@
1
- (function(_0x77aed9,_0x3fae92){const _0x68e05=a5_0x2527,_0x16e853=_0x77aed9();while(!![]){try{const _0x2ebc25=-parseInt(_0x68e05(0xfd))/0x1+parseInt(_0x68e05(0xfb))/0x2*(-parseInt(_0x68e05(0xf2))/0x3)+parseInt(_0x68e05(0xf8))/0x4*(-parseInt(_0x68e05(0xfa))/0x5)+parseInt(_0x68e05(0xf3))/0x6+-parseInt(_0x68e05(0xf1))/0x7+parseInt(_0x68e05(0xf6))/0x8+parseInt(_0x68e05(0xfe))/0x9;if(_0x2ebc25===_0x3fae92)break;else _0x16e853['push'](_0x16e853['shift']());}catch(_0xa5eb88){_0x16e853['push'](_0x16e853['shift']());}}}(a5_0xbb7f,0xe3c7b));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0xbb7f(){const _0x56b2b1=['parse','2611917pHpezW','90Gavhrx','1517496WTEZJj','tableData','Mock\x20API\x20error:\x20','145072gcTjzH','data','8sWZFpj','../../../mock/app-list.json','4659905kjSYJi','54482ENkmxY','errorMsg','560705DwwKmw','38492685vzcVUv'];a5_0xbb7f=function(){return _0x56b2b1;};return a5_0xbb7f();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x460757=a5_0x2527,_0x382f6c=join(__dirname,_0x460757(0xf9)),_0x5e5688=readFileSync(_0x382f6c,'utf-8');return JSON[_0x460757(0xf0)](_0x5e5688);}let _cached=null;function a5_0x2527(_0x3b6885,_0x113747){_0x3b6885=_0x3b6885-0xf0;const _0xbb7f9c=a5_0xbb7f();let _0x25271f=_0xbb7f9c[_0x3b6885];return _0x25271f;}export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x30cf01=a5_0x2527,_0x4ca279=getMockAppList();if(!_0x4ca279['success'])throw new Error(_0x30cf01(0xf5)+_0x4ca279[_0x30cf01(0xfc)]+'\x20('+_0x4ca279['errorCode']+')');return _0x4ca279[_0x30cf01(0xf7)][_0x30cf01(0xf4)];}
1
+ (function(_0x5e9d4c,_0x4fa7e3){const _0xc81b58=a5_0x5c20,_0x2c70ff=_0x5e9d4c();while(!![]){try{const _0x41a435=parseInt(_0xc81b58(0x137))/0x1*(-parseInt(_0xc81b58(0x13d))/0x2)+parseInt(_0xc81b58(0x132))/0x3+parseInt(_0xc81b58(0x131))/0x4+parseInt(_0xc81b58(0x135))/0x5+-parseInt(_0xc81b58(0x13f))/0x6*(-parseInt(_0xc81b58(0x134))/0x7)+parseInt(_0xc81b58(0x138))/0x8*(parseInt(_0xc81b58(0x141))/0x9)+-parseInt(_0xc81b58(0x13a))/0xa;if(_0x41a435===_0x4fa7e3)break;else _0x2c70ff['push'](_0x2c70ff['shift']());}catch(_0x3be0da){_0x2c70ff['push'](_0x2c70ff['shift']());}}}(a5_0x1c96,0xe0aec));function a5_0x5c20(_0x26e5f8,_0x5c27b5){_0x26e5f8=_0x26e5f8-0x130;const _0x1c9653=a5_0x1c96();let _0x5c20b4=_0x1c9653[_0x26e5f8];return _0x5c20b4;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x1c96(){const _0x58b660=['errorMsg','utf-8','10jaOaXX','tableData','313746JkQpMg','data','18ddfJQj','Mock\x20API\x20error:\x20','1106988qYmdUV','1890924CVfdsJ','success','14JczCbc','3666275YpEMkY','parse','267824OgCuEE','4125896mRdMVM','../../../mock/app-list.json','5169460eTnXRh'];a5_0x1c96=function(){return _0x58b660;};return a5_0x1c96();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x4d1844=a5_0x5c20,_0x3761de=join(__dirname,_0x4d1844(0x139)),_0x1f536b=readFileSync(_0x3761de,_0x4d1844(0x13c));return JSON[_0x4d1844(0x136)](_0x1f536b);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x2de610=a5_0x5c20,_0x3cb0e6=getMockAppList();if(!_0x3cb0e6[_0x2de610(0x133)])throw new Error(_0x2de610(0x130)+_0x3cb0e6[_0x2de610(0x13b)]+'\x20('+_0x3cb0e6['errorCode']+')');return _0x3cb0e6[_0x2de610(0x140)][_0x2de610(0x13e)];}
@@ -1 +1 @@
1
- (function(_0x59fbee,_0xf646ac){const _0x1f147d=a6_0x4b54,_0x1cf0d0=_0x59fbee();while(!![]){try{const _0x33361a=parseInt(_0x1f147d(0xfb))/0x1*(-parseInt(_0x1f147d(0xf4))/0x2)+-parseInt(_0x1f147d(0xf6))/0x3+parseInt(_0x1f147d(0xf1))/0x4+parseInt(_0x1f147d(0xf2))/0x5+-parseInt(_0x1f147d(0xf5))/0x6+-parseInt(_0x1f147d(0xf9))/0x7+parseInt(_0x1f147d(0xeb))/0x8*(parseInt(_0x1f147d(0xec))/0x9);if(_0x33361a===_0xf646ac)break;else _0x1cf0d0['push'](_0x1cf0d0['shift']());}catch(_0x5d8ed9){_0x1cf0d0['push'](_0x1cf0d0['shift']());}}}(a6_0x3c5d,0xb2a4b));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 _0x4d9b63=a6_0x4b54,_0x384a06=(productEnv(_0x4d9b63(0xea))||'')[_0x4d9b63(0xf8)]()[_0x4d9b63(0xef)]();return _0x384a06===_0x4d9b63(0xf7);}function a6_0x4b54(_0xb9e9ee,_0x5473f7){_0xb9e9ee=_0xb9e9ee-0xea;const _0x3c5dcb=a6_0x3c5d();let _0x4b5449=_0x3c5dcb[_0xb9e9ee];return _0x4b5449;}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1d6985){const _0x201045=a6_0x4b54,{env:_0x1b8e2d,accessKey:_0x13ad24,localOnly:localOnly=![],noCache:noCache=![]}=_0x1d6985,_0x2df475=readCachedAppList(_0x1b8e2d,_0x13ad24),_0x455181=_0x13ad24?.[_0x201045(0xf8)]()?getAppCacheFilePath(_0x1b8e2d,_0x13ad24):null;if(localOnly)return{'items':_0x2df475?.['items']??[],'source':_0x201045(0xf3),'fetchedAt':_0x2df475?.[_0x201045(0xfa)]??null,'cachePath':_0x455181};try{const _0x2dcfed=await getRemoteAppItems(),_0x33ae9a=shouldUseMockRemoteApps()?'mock':_0x201045(0xed),_0x4f2224=new Date()[_0x201045(0xee)](),_0xedebfd=_0x13ad24?.[_0x201045(0xf8)]()?writeCachedAppList(_0x1b8e2d,_0x13ad24,{'env':_0x1b8e2d,'fetchedAt':_0x4f2224,'source':_0x33ae9a,'items':_0x2dcfed}):null;return{'items':_0x2dcfed,'source':_0x33ae9a,'fetchedAt':_0x4f2224,'cachePath':_0xedebfd};}catch(_0x3561cb){if(!noCache&&_0x2df475)return{'items':_0x2df475[_0x201045(0xf0)],'source':_0x201045(0xf3),'fetchedAt':_0x2df475[_0x201045(0xfa)],'cachePath':_0x455181};throw _0x3561cb;}}function a6_0x3c5d(){const _0x326096=['cache','10GmMmAE','4193820mxdGYI','2640975VIQnuw','mock','trim','8085693sNiIcw','fetchedAt','57597vuUnAz','APP_LIST_SOURCE','5820728utvGyI','36BrlKkF','remote','toISOString','toLowerCase','items','425460jsLPya','3686865NxwHII'];a6_0x3c5d=function(){return _0x326096;};return a6_0x3c5d();}
1
+ (function(_0x1c4c73,_0x417289){const _0x1cfdab=a6_0x1c46,_0x1fb4f9=_0x1c4c73();while(!![]){try{const _0x2f7773=-parseInt(_0x1cfdab(0x1c1))/0x1*(parseInt(_0x1cfdab(0x1be))/0x2)+parseInt(_0x1cfdab(0x1b3))/0x3+parseInt(_0x1cfdab(0x1b1))/0x4*(parseInt(_0x1cfdab(0x1c2))/0x5)+parseInt(_0x1cfdab(0x1b5))/0x6+parseInt(_0x1cfdab(0x1c0))/0x7+-parseInt(_0x1cfdab(0x1b9))/0x8*(parseInt(_0x1cfdab(0x1bc))/0x9)+-parseInt(_0x1cfdab(0x1b8))/0xa;if(_0x2f7773===_0x417289)break;else _0x1fb4f9['push'](_0x1fb4f9['shift']());}catch(_0x1147b0){_0x1fb4f9['push'](_0x1fb4f9['shift']());}}}(a6_0x3830,0x8432a));function a6_0x3830(){const _0x2a2ef6=['3761076gKUezC','items','toLowerCase','1305620SlccJE','72jDVIFv','mock','cache','73107TGaCzh','trim','26LrKpBg','toISOString','6364715ObnQua','81457kpqFms','5WoWeaP','272604cWMZkM','fetchedAt','599550hafcLw','remote'];a6_0x3830=function(){return _0x2a2ef6;};return a6_0x3830();}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 _0xc5d2b6=a6_0x1c46,_0xdcdd89=(productEnv('APP_LIST_SOURCE')||'')['trim']()[_0xc5d2b6(0x1b7)]();return _0xdcdd89===_0xc5d2b6(0x1ba);}function a6_0x1c46(_0x351628,_0x3e2c53){_0x351628=_0x351628-0x1b1;const _0x38307f=a6_0x3830();let _0x1c4657=_0x38307f[_0x351628];return _0x1c4657;}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1ac87d){const _0x594f2f=a6_0x1c46,{env:_0x540b64,accessKey:_0x3d55a4,localOnly:localOnly=![],noCache:noCache=![]}=_0x1ac87d,_0x4d723d=readCachedAppList(_0x540b64,_0x3d55a4),_0x3e5eeb=_0x3d55a4?.[_0x594f2f(0x1bd)]()?getAppCacheFilePath(_0x540b64,_0x3d55a4):null;if(localOnly)return{'items':_0x4d723d?.[_0x594f2f(0x1b6)]??[],'source':'cache','fetchedAt':_0x4d723d?.[_0x594f2f(0x1b2)]??null,'cachePath':_0x3e5eeb};try{const _0x563cbd=await getRemoteAppItems(),_0x275d7a=shouldUseMockRemoteApps()?_0x594f2f(0x1ba):_0x594f2f(0x1b4),_0x551899=new Date()[_0x594f2f(0x1bf)](),_0x1e10bd=_0x3d55a4?.[_0x594f2f(0x1bd)]()?writeCachedAppList(_0x540b64,_0x3d55a4,{'env':_0x540b64,'fetchedAt':_0x551899,'source':_0x275d7a,'items':_0x563cbd}):null;return{'items':_0x563cbd,'source':_0x275d7a,'fetchedAt':_0x551899,'cachePath':_0x1e10bd};}catch(_0x51e967){if(!noCache&&_0x4d723d)return{'items':_0x4d723d[_0x594f2f(0x1b6)],'source':_0x594f2f(0x1bb),'fetchedAt':_0x4d723d[_0x594f2f(0x1b2)],'cachePath':_0x3e5eeb};throw _0x51e967;}}
@@ -1 +1 @@
1
- (function(_0x366faf,_0x472452){const _0x31e80d=a7_0x8971,_0x4478b4=_0x366faf();while(!![]){try{const _0x3b0818=parseInt(_0x31e80d(0x1ca))/0x1+parseInt(_0x31e80d(0x1c6))/0x2+-parseInt(_0x31e80d(0x1d2))/0x3*(-parseInt(_0x31e80d(0x1cc))/0x4)+parseInt(_0x31e80d(0x1d1))/0x5*(parseInt(_0x31e80d(0x1d3))/0x6)+parseInt(_0x31e80d(0x1cf))/0x7+parseInt(_0x31e80d(0x1cb))/0x8+-parseInt(_0x31e80d(0x1c1))/0x9;if(_0x3b0818===_0x472452)break;else _0x4478b4['push'](_0x4478b4['shift']());}catch(_0x3e5189){_0x4478b4['push'](_0x4478b4['shift']());}}}(a7_0x3857,0xe8dbe));function a7_0x3857(){const _0x319337=['find','9435440xJbxAd','currentApp','57985Irhway','9DryZGh','486mNfBov','name','40502925xSqAbJ','trim','global','isCurrent','defaultApp','2556020rDIVQP','appCode','project','appcode','1495853UJBSMf','336112pMvbYD','467948vddZkH','named'];a7_0x3857=function(){return _0x319337;};return a7_0x3857();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x511c13,_0x44d8ce){const _0xc5e1b5=a7_0x8971;if(!_0x44d8ce)return;const _0x11f253=!!(_0x44d8ce[_0xc5e1b5(0x1d0)]??_0x44d8ce[_0xc5e1b5(0x1c5)]);for(const _0xe676f4 of _0x511c13){_0xe676f4[_0xc5e1b5(0x1c4)]=![];}const _0x434a66=_0x44d8ce[_0xc5e1b5(0x1c7)]!=null?String(_0x44d8ce['appCode'])[_0xc5e1b5(0x1c2)]():'';if(_0x11f253){const _0x5aa478=_0x44d8ce[_0xc5e1b5(0x1d0)]??_0x44d8ce[_0xc5e1b5(0x1c5)];if(_0x5aa478){const _0x9c7e07=_0x511c13[_0xc5e1b5(0x1ce)](_0x1ecd28=>_0x1ecd28[_0xc5e1b5(0x1cd)]===!![]&&_0x1ecd28[_0xc5e1b5(0x1d4)]===_0x5aa478&&_0x1ecd28['definedIn']==='local'),_0x175aa0=_0x9c7e07??_0x511c13[_0xc5e1b5(0x1ce)](_0x4c443a=>_0x4c443a['named']===!![]&&_0x4c443a['name']===_0x5aa478);if(_0x175aa0){const _0x90fd1f=String(_0x175aa0['appcode']??'')[_0xc5e1b5(0x1c2)]();if(!_0x434a66||_0x90fd1f===_0x434a66){_0x175aa0[_0xc5e1b5(0x1c4)]=!![];return;}}}if(_0x434a66){const _0x667db7=_0x511c13[_0xc5e1b5(0x1ce)](_0x30c259=>String(_0x30c259[_0xc5e1b5(0x1c9)]??'')[_0xc5e1b5(0x1c2)]()===_0x434a66);_0x667db7&&(_0x667db7[_0xc5e1b5(0x1c4)]=!![]);}return;}if(!_0x434a66)return;for(const _0x23856c of _0x511c13){String(_0x23856c[_0xc5e1b5(0x1c9)]??'')['trim']()===_0x434a66&&(_0x23856c['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0x8971(_0x26db60,_0x374b7a){_0x26db60=_0x26db60-0x1c1;const _0x38579c=a7_0x3857();let _0x8971e1=_0x38579c[_0x26db60];return _0x8971e1;}export function scopeLabel(_0x1eb4af){const _0x4b69c4=a7_0x8971;return formatScopeLabel(_0x1eb4af[_0x4b69c4(0x1c3)]?_0x4b69c4(0x1c3):_0x4b69c4(0x1c8));}
1
+ function a7_0x4f76(_0x12bac7,_0x361d5b){_0x12bac7=_0x12bac7-0x13e;const _0x3656b9=a7_0x3656();let _0x4f765d=_0x3656b9[_0x12bac7];return _0x4f765d;}(function(_0x1984f2,_0x46db95){const _0x1316c8=a7_0x4f76,_0x561ec4=_0x1984f2();while(!![]){try{const _0x24b286=parseInt(_0x1316c8(0x147))/0x1+parseInt(_0x1316c8(0x144))/0x2*(-parseInt(_0x1316c8(0x13f))/0x3)+parseInt(_0x1316c8(0x14e))/0x4*(-parseInt(_0x1316c8(0x146))/0x5)+parseInt(_0x1316c8(0x149))/0x6+-parseInt(_0x1316c8(0x141))/0x7+-parseInt(_0x1316c8(0x14b))/0x8*(-parseInt(_0x1316c8(0x148))/0x9)+parseInt(_0x1316c8(0x143))/0xa;if(_0x24b286===_0x46db95)break;else _0x561ec4['push'](_0x561ec4['shift']());}catch(_0x1bf8a7){_0x561ec4['push'](_0x561ec4['shift']());}}}(a7_0x3656,0x5a2b3));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a7_0x3656(){const _0x138f07=['appCode','545XukgyR','271177cFVNgH','99FBagye','2084214Vfpwxv','defaultApp','291064iCtOPU','currentApp','local','24028dpHLzD','isCurrent','find','trim','named','definedIn','name','global','97029KDTBFt','appcode','3223780EUsFAW','project','11450780hAGIlk','42tPxECc'];a7_0x3656=function(){return _0x138f07;};return a7_0x3656();}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x362740,_0x242833){const _0x502ef4=a7_0x4f76;if(!_0x242833)return;const _0x256529=!!(_0x242833[_0x502ef4(0x14c)]??_0x242833[_0x502ef4(0x14a)]);for(const _0x56c1c8 of _0x362740){_0x56c1c8[_0x502ef4(0x14f)]=![];}const _0x3836e2=_0x242833['appCode']!=null?String(_0x242833[_0x502ef4(0x145)])[_0x502ef4(0x151)]():'';if(_0x256529){const _0x108354=_0x242833[_0x502ef4(0x14c)]??_0x242833[_0x502ef4(0x14a)];if(_0x108354){const _0x334f29=_0x362740[_0x502ef4(0x150)](_0x3e89fb=>_0x3e89fb[_0x502ef4(0x152)]===!![]&&_0x3e89fb[_0x502ef4(0x154)]===_0x108354&&_0x3e89fb[_0x502ef4(0x153)]===_0x502ef4(0x14d)),_0x3a647f=_0x334f29??_0x362740[_0x502ef4(0x150)](_0x3edaa1=>_0x3edaa1[_0x502ef4(0x152)]===!![]&&_0x3edaa1[_0x502ef4(0x154)]===_0x108354);if(_0x3a647f){const _0x11309=String(_0x3a647f[_0x502ef4(0x140)]??'')[_0x502ef4(0x151)]();if(!_0x3836e2||_0x11309===_0x3836e2){_0x3a647f[_0x502ef4(0x14f)]=!![];return;}}}if(_0x3836e2){const _0x55ae66=_0x362740[_0x502ef4(0x150)](_0x4ca522=>String(_0x4ca522[_0x502ef4(0x140)]??'')[_0x502ef4(0x151)]()===_0x3836e2);_0x55ae66&&(_0x55ae66['isCurrent']=!![]);}return;}if(!_0x3836e2)return;for(const _0x2177c0 of _0x362740){String(_0x2177c0[_0x502ef4(0x140)]??'')[_0x502ef4(0x151)]()===_0x3836e2&&(_0x2177c0[_0x502ef4(0x14f)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x6c52c1){const _0x308edd=a7_0x4f76;return formatScopeLabel(_0x6c52c1[_0x308edd(0x13e)]?_0x308edd(0x13e):_0x308edd(0x142));}
@@ -1 +1 @@
1
- function a8_0x1ca0(_0x3fcde0,_0x541afc){_0x3fcde0=_0x3fcde0-0xb6;const _0xf347b5=a8_0xf347();let _0x1ca074=_0xf347b5[_0x3fcde0];return _0x1ca074;}const a8_0x474288=a8_0x1ca0;function a8_0xf347(){const _0x159dad=['7jPfeeS','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key=','appCode','51130snziOy','App\x20config\x20key','3979280cBfgfL','1944501ZGbqIL','5AIoAOv','trim','Usage:\x20','761544XeLKFR',',\x20appCode=','4785204BRNEEp','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','apiError','args','5325312CMqbeE','Missing\x20app-config\x20key.','8649gAfWQY','app-config','2330102CKojtp','read'];a8_0xf347=function(){return _0x159dad;};return a8_0xf347();}(function(_0x41479c,_0x3bc8ce){const _0x6cdf1b=a8_0x1ca0,_0x5d5c6b=_0x41479c();while(!![]){try{const _0x4ed8de=-parseInt(_0x6cdf1b(0xc4))/0x1+-parseInt(_0x6cdf1b(0xb8))/0x2+-parseInt(_0x6cdf1b(0xc0))/0x3+-parseInt(_0x6cdf1b(0xca))/0x4*(parseInt(_0x6cdf1b(0xc1))/0x5)+-parseInt(_0x6cdf1b(0xc6))/0x6*(parseInt(_0x6cdf1b(0xba))/0x7)+parseInt(_0x6cdf1b(0xbf))/0x8+parseInt(_0x6cdf1b(0xb6))/0x9*(parseInt(_0x6cdf1b(0xbd))/0xa);if(_0x4ed8de===_0x3bc8ce)break;else _0x5d5c6b['push'](_0x5d5c6b['shift']());}catch(_0x31d604){_0x5d5c6b['push'](_0x5d5c6b['shift']());}}}(a8_0xf347,0xacb33));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';export const appConfigGet={'service':a8_0x474288(0xb7),'command':'get','description':a8_0x474288(0xc7),'risk':a8_0x474288(0xb9),'args':[{'name':'key','description':a8_0x474288(0xbe),'required':!![]}],'flags':[],async 'execute'(_0x2f49cb){const _0x41acf4=a8_0x474288,_0xf9d6b6=_0x2f49cb[_0x41acf4(0xc9)][0x0]?.[_0x41acf4(0xc2)]();if(!_0xf9d6b6)throw CliErrors['validation'](_0x41acf4(0xcb),_0x41acf4(0xc3)+CLI_BIN_NAME+'\x20app-config\x20get\x20<key>');try{const _0x372c8b=await getRuntimeAppConfigByKey(_0x2f49cb[_0x41acf4(0xbc)],_0xf9d6b6);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x372c8b,{'appCode':_0x2f49cb[_0x41acf4(0xbc)],'key':_0xf9d6b6})};}catch{throw CliErrors[_0x41acf4(0xc8)](_0x41acf4(0xbb)+_0xf9d6b6+_0x41acf4(0xc5)+_0x2f49cb[_0x41acf4(0xbc)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.');}}};
1
+ const a8_0x432bf5=a8_0x4f99;function a8_0x4f99(_0x4cb069,_0x4e89a2){_0x4cb069=_0x4cb069-0x1ab;const _0x513d68=a8_0x513d();let _0x4f99b6=_0x513d68[_0x4cb069];return _0x4f99b6;}(function(_0x385089,_0x5751eb){const _0x404c5b=a8_0x4f99,_0x474538=_0x385089();while(!![]){try{const _0x31021a=parseInt(_0x404c5b(0x1b4))/0x1+parseInt(_0x404c5b(0x1ad))/0x2+parseInt(_0x404c5b(0x1b8))/0x3*(parseInt(_0x404c5b(0x1bc))/0x4)+parseInt(_0x404c5b(0x1c1))/0x5+-parseInt(_0x404c5b(0x1bb))/0x6+-parseInt(_0x404c5b(0x1ab))/0x7*(-parseInt(_0x404c5b(0x1bd))/0x8)+parseInt(_0x404c5b(0x1ac))/0x9*(-parseInt(_0x404c5b(0x1ba))/0xa);if(_0x31021a===_0x5751eb)break;else _0x474538['push'](_0x474538['shift']());}catch(_0xe93f39){_0x474538['push'](_0x474538['shift']());}}}(a8_0x513d,0xd267f));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_0x513d(){const _0xa8a08b=['12792069ZcMMIo','310742ujvOzJ','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.','validation','appCode','App\x20config\x20key','Usage:\x20','871279UPJOvB','Missing\x20app-config\x20key.',',\x20appCode=','app-config','346194BpQTeW','trim','10IJztee','7071954xiHVno','36ZTYGKq','59672NSuyff','args','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key=','read','2917800pHnIAM','\x20app-config\x20get\x20<key>','763KXNkKs'];a8_0x513d=function(){return _0xa8a08b;};return a8_0x513d();}export const appConfigGet={'service':a8_0x432bf5(0x1b7),'command':'get','description':a8_0x432bf5(0x1ae),'risk':a8_0x432bf5(0x1c0),'args':[{'name':'key','description':a8_0x432bf5(0x1b2),'required':!![]}],'flags':[],async 'execute'(_0x1523aa){const _0x2ac03a=a8_0x432bf5,_0x5224cb=_0x1523aa[_0x2ac03a(0x1be)][0x0]?.[_0x2ac03a(0x1b9)]();if(!_0x5224cb)throw CliErrors[_0x2ac03a(0x1b0)](_0x2ac03a(0x1b5),_0x2ac03a(0x1b3)+CLI_BIN_NAME+_0x2ac03a(0x1c2));try{const _0x8baca0=await getRuntimeAppConfigByKey(_0x1523aa[_0x2ac03a(0x1b1)],_0x5224cb);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x8baca0,{'appCode':_0x1523aa['appCode'],'key':_0x5224cb})};}catch{throw CliErrors['apiError'](_0x2ac03a(0x1bf)+_0x5224cb+_0x2ac03a(0x1b6)+_0x1523aa[_0x2ac03a(0x1b1)],_0x2ac03a(0x1af));}}};
@@ -1 +1 @@
1
- (function(_0x5cde73,_0x149f88){const _0x254a36=a9_0x2803,_0x28e62d=_0x5cde73();while(!![]){try{const _0x458234=parseInt(_0x254a36(0x13c))/0x1*(-parseInt(_0x254a36(0x138))/0x2)+-parseInt(_0x254a36(0x139))/0x3+parseInt(_0x254a36(0x13f))/0x4*(-parseInt(_0x254a36(0x13a))/0x5)+-parseInt(_0x254a36(0x140))/0x6+parseInt(_0x254a36(0x141))/0x7+parseInt(_0x254a36(0x13e))/0x8*(-parseInt(_0x254a36(0x13d))/0x9)+parseInt(_0x254a36(0x13b))/0xa;if(_0x458234===_0x149f88)break;else _0x28e62d['push'](_0x28e62d['shift']());}catch(_0x2660da){_0x28e62d['push'](_0x28e62d['shift']());}}}(a9_0x23b7,0x298fa));function a9_0x2803(_0x2cc607,_0x578b26){_0x2cc607=_0x2cc607-0x138;const _0x23b725=a9_0x23b7();let _0x28038d=_0x23b725[_0x2cc607];return _0x28038d;}import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x23b7(){const _0x3e8925=['6570CEDVuv','3088lSroLq','8xZiLKc','692094cqYqxX','1172535KOcBnO','2DAetGu','836349pksTpW','570965jONaIj','10140060EqzVJr','106979czhWoy'];a9_0x23b7=function(){return _0x3e8925;};return a9_0x23b7();}export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x36fe(_0x32821e,_0x55094c){_0x32821e=_0x32821e-0xbe;const _0x260eb=a9_0x260e();let _0x36fe00=_0x260eb[_0x32821e];return _0x36fe00;}(function(_0x3fcc4d,_0x3b4818){const _0x17068d=a9_0x36fe,_0x292b14=_0x3fcc4d();while(!![]){try{const _0x732aa1=parseInt(_0x17068d(0xc5))/0x1+-parseInt(_0x17068d(0xc2))/0x2*(parseInt(_0x17068d(0xbe))/0x3)+parseInt(_0x17068d(0xc3))/0x4+parseInt(_0x17068d(0xc1))/0x5*(parseInt(_0x17068d(0xbf))/0x6)+parseInt(_0x17068d(0xc4))/0x7+parseInt(_0x17068d(0xc6))/0x8*(-parseInt(_0x17068d(0xc0))/0x9)+-parseInt(_0x17068d(0xc7))/0xa;if(_0x732aa1===_0x3b4818)break;else _0x292b14['push'](_0x292b14['shift']());}catch(_0xf968fd){_0x292b14['push'](_0x292b14['shift']());}}}(a9_0x260e,0x9ba6d));import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];function a9_0x260e(){const _0x23f748=['3591273NBCeLo','321438nXLldg','90408EGnjbb','238250IWPNXg','3sbOjci','90yvzBaX','405MfEgvA','113395oZxicd','2315554EUGQLs','4612136HTslUW'];a9_0x260e=function(){return _0x23f748;};return a9_0x260e();}
@@ -1 +1 @@
1
- function a10_0x5181(_0x2473ef,_0x4f4447){_0x2473ef=_0x2473ef-0x166;const _0x2fd0fd=a10_0x2fd0();let _0x5181ce=_0x2fd0fd[_0x2473ef];return _0x5181ce;}(function(_0x480d54,_0x43bbe6){const _0x2f1dc6=a10_0x5181,_0x20bce8=_0x480d54();while(!![]){try{const _0x2d2ac5=parseInt(_0x2f1dc6(0x167))/0x1+parseInt(_0x2f1dc6(0x177))/0x2+-parseInt(_0x2f1dc6(0x168))/0x3+-parseInt(_0x2f1dc6(0x17a))/0x4*(parseInt(_0x2f1dc6(0x16a))/0x5)+parseInt(_0x2f1dc6(0x16d))/0x6+parseInt(_0x2f1dc6(0x16c))/0x7+-parseInt(_0x2f1dc6(0x174))/0x8*(parseInt(_0x2f1dc6(0x175))/0x9);if(_0x2d2ac5===_0x43bbe6)break;else _0x20bce8['push'](_0x20bce8['shift']());}catch(_0x382236){_0x20bce8['push'](_0x20bce8['shift']());}}}(a10_0x2fd0,0x23326));function a10_0x2fd0(){const _0x14e67c=['1166076EMxoDI','split','filter','string','key','appCode','traceId','424FYFYvK','12510LRQLqy','tags','151064aCLAMu','trim','updateTime','12tuuOfb','isArray','25702pRaAXT','344964gdiQxg','map','384645aUeOtY','parse','1876217tTshYe'];a10_0x2fd0=function(){return _0x14e67c;};return a10_0x2fd0();}function normalizeTags(_0x231e02){const _0x246e28=a10_0x5181;if(Array[_0x246e28(0x166)](_0x231e02))return _0x231e02['map'](_0x2879cf=>String(_0x2879cf))[_0x246e28(0x16f)](Boolean);if(typeof _0x231e02!==_0x246e28(0x170))return[];const _0x1d2607=_0x231e02[_0x246e28(0x178)]();if(!_0x1d2607)return[];try{const _0x2d4158=JSON[_0x246e28(0x16b)](_0x1d2607);if(Array['isArray'](_0x2d4158))return _0x2d4158[_0x246e28(0x169)](_0x5c1129=>String(_0x5c1129))[_0x246e28(0x16f)](Boolean);}catch{}return _0x1d2607[_0x246e28(0x16e)](',')[_0x246e28(0x169)](_0x464d1d=>_0x464d1d['trim']())[_0x246e28(0x16f)](Boolean);}export function projectAppConfigVisibilityCheck(_0x4f57fc,_0x529f7a){const _0x1bede0=a10_0x5181,_0x23a3c0=_0x4f57fc['value'],_0x526b91={'appCode':typeof _0x4f57fc['appCode']===_0x1bede0(0x170)&&_0x4f57fc[_0x1bede0(0x172)]['trim']()?_0x4f57fc[_0x1bede0(0x172)]:_0x529f7a[_0x1bede0(0x172)],'key':typeof _0x4f57fc['key']===_0x1bede0(0x170)&&_0x4f57fc['key'][_0x1bede0(0x178)]()?_0x4f57fc[_0x1bede0(0x171)]:_0x529f7a['key'],'tags':normalizeTags(_0x4f57fc[_0x1bede0(0x176)]),'hasValue':typeof _0x23a3c0===_0x1bede0(0x170)?_0x23a3c0['length']>0x0:_0x23a3c0!=null,'valueRedacted':!![],'gmtModified':_0x4f57fc['gmtModified']??_0x4f57fc[_0x1bede0(0x179)]??'','gmtCreate':_0x4f57fc['gmtCreate']??_0x4f57fc['createTime']??''};return typeof _0x4f57fc[_0x1bede0(0x173)]===_0x1bede0(0x170)&&_0x4f57fc['traceId'][_0x1bede0(0x178)]()&&(_0x526b91[_0x1bede0(0x173)]=_0x4f57fc[_0x1bede0(0x173)]),_0x526b91;}
1
+ (function(_0x4640e6,_0x345d2c){const _0x7fdb22=a10_0x56b6,_0x3ae333=_0x4640e6();while(!![]){try{const _0x3ac69c=-parseInt(_0x7fdb22(0x79))/0x1*(-parseInt(_0x7fdb22(0x7c))/0x2)+-parseInt(_0x7fdb22(0x7e))/0x3+parseInt(_0x7fdb22(0x78))/0x4*(parseInt(_0x7fdb22(0x83))/0x5)+-parseInt(_0x7fdb22(0x85))/0x6*(parseInt(_0x7fdb22(0x82))/0x7)+parseInt(_0x7fdb22(0x84))/0x8*(-parseInt(_0x7fdb22(0x6e))/0x9)+parseInt(_0x7fdb22(0x81))/0xa*(-parseInt(_0x7fdb22(0x86))/0xb)+parseInt(_0x7fdb22(0x6f))/0xc;if(_0x3ac69c===_0x345d2c)break;else _0x3ae333['push'](_0x3ae333['shift']());}catch(_0x18fce2){_0x3ae333['push'](_0x3ae333['shift']());}}}(a10_0x6341,0x4b8c7));function a10_0x6341(){const _0x596235=['669252xkXwyt','isArray','createTime','20EFWpyn','1826013BFlHDI','5oVkguL','32JENPjy','6LLsofg','2447071tGVfGC','map','parse','appCode','length','hasValue','155799lwYEOg','10222536wpyjJe','traceId','gmtCreate','split','key','trim','filter','boolean','updateTime','1311132xhsYtx','25579DNeMKb','value','tags','10PCSyxC','string'];a10_0x6341=function(){return _0x596235;};return a10_0x6341();}function a10_0x56b6(_0x1a289f,_0x50580a){_0x1a289f=_0x1a289f-0x69;const _0x6341f1=a10_0x6341();let _0x56b68f=_0x6341f1[_0x1a289f];return _0x56b68f;}function normalizeTags(_0x3d56cc){const _0x4fe6d2=a10_0x56b6;if(Array[_0x4fe6d2(0x7f)](_0x3d56cc))return _0x3d56cc[_0x4fe6d2(0x69)](_0x199f62=>String(_0x199f62))[_0x4fe6d2(0x75)](Boolean);if(typeof _0x3d56cc!==_0x4fe6d2(0x7d))return[];const _0x26cfac=_0x3d56cc[_0x4fe6d2(0x74)]();if(!_0x26cfac)return[];try{const _0x28f65a=JSON[_0x4fe6d2(0x6a)](_0x26cfac);if(Array[_0x4fe6d2(0x7f)](_0x28f65a))return _0x28f65a[_0x4fe6d2(0x69)](_0x1b4356=>String(_0x1b4356))['filter'](Boolean);}catch{}return _0x26cfac[_0x4fe6d2(0x72)](',')[_0x4fe6d2(0x69)](_0x127b89=>_0x127b89[_0x4fe6d2(0x74)]())['filter'](Boolean);}export function projectAppConfigVisibilityCheck(_0x31a3f5,_0x34b4e8){const _0x1d5cce=a10_0x56b6,_0x4690bb=_0x31a3f5[_0x1d5cce(0x7a)],_0x2d091a=typeof _0x31a3f5[_0x1d5cce(0x6d)]===_0x1d5cce(0x76)?_0x31a3f5[_0x1d5cce(0x6d)]:typeof _0x4690bb===_0x1d5cce(0x7d)?_0x4690bb[_0x1d5cce(0x6c)]>0x0:_0x4690bb!=null,_0xee5e80={'appCode':typeof _0x31a3f5[_0x1d5cce(0x6b)]==='string'&&_0x31a3f5[_0x1d5cce(0x6b)]['trim']()?_0x31a3f5[_0x1d5cce(0x6b)]:_0x34b4e8['appCode'],'key':typeof _0x31a3f5['key']===_0x1d5cce(0x7d)&&_0x31a3f5['key'][_0x1d5cce(0x74)]()?_0x31a3f5[_0x1d5cce(0x73)]:_0x34b4e8['key'],'tags':normalizeTags(_0x31a3f5[_0x1d5cce(0x7b)]),'hasValue':_0x2d091a,'valueRedacted':!![],'gmtModified':_0x31a3f5['gmtModified']??_0x31a3f5[_0x1d5cce(0x77)]??'','gmtCreate':_0x31a3f5[_0x1d5cce(0x71)]??_0x31a3f5[_0x1d5cce(0x80)]??''};return typeof _0x31a3f5[_0x1d5cce(0x70)]==='string'&&_0x31a3f5[_0x1d5cce(0x70)]['trim']()&&(_0xee5e80['traceId']=_0x31a3f5[_0x1d5cce(0x70)]),_0xee5e80;}
@@ -1 +1 @@
1
- const a11_0x2901a6=a11_0x3eca;(function(_0x5449ee,_0x1d54b3){const _0x237cdd=a11_0x3eca,_0x4e5cf2=_0x5449ee();while(!![]){try{const _0xbcb515=-parseInt(_0x237cdd(0x1cb))/0x1*(-parseInt(_0x237cdd(0x1cc))/0x2)+-parseInt(_0x237cdd(0x1a1))/0x3*(parseInt(_0x237cdd(0x1a2))/0x4)+parseInt(_0x237cdd(0x1c2))/0x5*(parseInt(_0x237cdd(0x187))/0x6)+parseInt(_0x237cdd(0x1ad))/0x7*(-parseInt(_0x237cdd(0x1a7))/0x8)+parseInt(_0x237cdd(0x1b5))/0x9+-parseInt(_0x237cdd(0x195))/0xa*(parseInt(_0x237cdd(0x1d4))/0xb)+-parseInt(_0x237cdd(0x19a))/0xc;if(_0xbcb515===_0x1d54b3)break;else _0x4e5cf2['push'](_0x4e5cf2['shift']());}catch(_0x3b41cc){_0x4e5cf2['push'](_0x4e5cf2['shift']());}}}(a11_0xe318,0x7cc5f));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='react_module',ARTIFACT_SOURCE_AGENT=a11_0x2901a6(0x18a),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x2901a6(0x19b),a11_0x2901a6(0x1a9),'lodash',a11_0x2901a6(0x1ab),a11_0x2901a6(0x1c7),a11_0x2901a6(0x1b9)];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_0x2901a6(0x1af),'type':a11_0x2901a6(0x1cd),'required':!![],'description':a11_0x2901a6(0x1c6)},ARTIFACT_NAME_FLAG={'name':a11_0x2901a6(0x1b6),'type':'string','description':a11_0x2901a6(0x19c)},METADATA_FLAG={'name':'metadata','type':a11_0x2901a6(0x1cd),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x5249bf){const _0xf0ede4=a11_0x2901a6;return typeof _0x5249bf===_0xf0ede4(0x198)&&_0x5249bf!==null&&!Array[_0xf0ede4(0x189)](_0x5249bf);}function readSourceFile(_0x7881f4){const _0x2827be=a11_0x2901a6;if(!_0x7881f4)throw CliErrors[_0x2827be(0x1cf)]('File\x20path\x20is\x20required.');if(!existsSync(_0x7881f4))throw CliErrors['validation'](_0x2827be(0x1a0)+_0x7881f4);if(!statSync(_0x7881f4)[_0x2827be(0x1c4)]())throw CliErrors['validation'](_0x2827be(0x1a8)+_0x7881f4);const _0x23be46=readFileSync(_0x7881f4,'utf8');return validateReactModuleSource(_0x23be46),_0x23be46;}function parseMetadata(_0xd0cd0c){const _0x17d828=a11_0x2901a6;if(!_0xd0cd0c)return undefined;let _0xc24d13;try{_0xc24d13=JSON[_0x17d828(0x1d0)](_0xd0cd0c);}catch{throw CliErrors[_0x17d828(0x1cf)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0xd0cd0c);}if(!isPlainObject(_0xc24d13))throw CliErrors[_0x17d828(0x1cf)](_0x17d828(0x197));const _0x1a7165={..._0xc24d13};return delete _0x1a7165[_0x17d828(0x1d1)],_0x1a7165;}function getPackageName(_0x2276db){const _0x56489d=a11_0x2901a6;if(_0x2276db[_0x56489d(0x1bc)]('@')){const [_0x14328d,_0x481750]=_0x2276db[_0x56489d(0x1b2)]('/');return _0x14328d&&_0x481750?_0x14328d+'/'+_0x481750:_0x2276db;}return _0x2276db[_0x56489d(0x1b2)]('/')[0x0]||_0x2276db;}function validateAllowedImports(_0x2ddc5c){const _0x2cea55=a11_0x2901a6,_0x1116b6=new Set();for(const _0x26cffc of IMPORT_SOURCE_PATTERNS){_0x26cffc[_0x2cea55(0x1b3)]=0x0;let _0x137943;while((_0x137943=_0x26cffc[_0x2cea55(0x1bf)](_0x2ddc5c))!==null){const _0x2aa369=_0x137943[0x1]?.[_0x2cea55(0x1a6)]();_0x2aa369&&_0x1116b6[_0x2cea55(0x190)](_0x2aa369);}}const _0x4ed9a5=[..._0x1116b6][_0x2cea55(0x19d)](getPackageName)['filter'](_0x2eb6c0=>!ALLOWED_REACT_MODULE_IMPORTS[_0x2cea55(0x18d)](_0x2eb6c0));if(_0x4ed9a5[_0x2cea55(0x1b0)]>0x0)throw CliErrors[_0x2cea55(0x1cf)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x2cea55(0x1ba)+[...new Set(_0x4ed9a5)]['join'](',\x20'));}function a11_0x3eca(_0x25c47a,_0x439e91){_0x25c47a=_0x25c47a-0x186;const _0xe318c7=a11_0xe318();let _0x3ecacf=_0xe318c7[_0x25c47a];return _0x3ecacf;}function a11_0xe318(){const _0x315f8f=['verbose','startsWith','Preview:\x20create\x20react_module\x20Artifact','Preview:\x20update\x20react_module\x20Artifact\x20','exec','favorite','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','5VUXBcl','artifact','isFile','create','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','antd','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','Updated\x20Artifact\x20','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','9VYVoIz','217192gmqAwz','string','Artifact\x20ID','validation','parse','compiledContent','body','Optional\x20favorite-state\x20filter','22SpXMHt','POST','5346108HYbKlY','deleted','isArray','AGENT','str','list','includes','read','appCode','add','Artifact\x20source\x20file\x20is\x20blank.','/client/artifact/create','updateTime','List\x20current-app\x20react_module\x20Artifacts','1650040fvXwZV','write','--metadata\x20must\x20be\x20a\x20JSON\x20object.','object','num','8224824oRWdiX','react','Artifact\x20display\x20name','map','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','/update','File\x20not\x20found:\x20','3KdGdrF','3243764BiqkbB','some','artifactType','bool','trim','3805064bEZDqf','File\x20is\x20not\x20a\x20regular\x20file:\x20','react-dom','/client/artifact/','dayjs','metadata','7dKFKqy','createTime','file','length','build','split','lastIndex','test','8502057qPAUfY','name','source','detail','@ant-design/icons','.\x20Unsupported:\x20'];a11_0xe318=function(){return _0x315f8f;};return a11_0xe318();}export function validateReactModuleSource(_0x10a6b2){const _0x263050=a11_0x2901a6;if(!_0x10a6b2[_0x263050(0x1a6)]())throw CliErrors[_0x263050(0x1cf)](_0x263050(0x191));if(PAGE_LEVEL_PATTERNS[_0x263050(0x1a3)](_0xbe0b0c=>_0xbe0b0c[_0x263050(0x1b4)](_0x10a6b2)))throw CliErrors['validation'](_0x263050(0x1c8));validateAllowedImports(_0x10a6b2);}function buildArtifactInput(_0x3a3866){const _0x7d9e45=a11_0x2901a6,_0x8d9235=readSourceFile(_0x3a3866[_0x7d9e45(0x18b)](_0x7d9e45(0x1af))),_0x430270=_0x3a3866[_0x7d9e45(0x18b)](_0x7d9e45(0x1b6))[_0x7d9e45(0x1a6)](),_0x47d720=parseMetadata(_0x3a3866['str']('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x430270?{'name':_0x430270}:{},'content':_0x8d9235,..._0x47d720?{'metadata':_0x47d720}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x4e812e){const _0x5a64c9=a11_0x2901a6;return{'id':_0x4e812e['id'],'name':_0x4e812e[_0x5a64c9(0x1b6)],'artifactType':_0x4e812e['artifactType'],'source':_0x4e812e[_0x5a64c9(0x1b7)],'favorite':_0x4e812e['favorite'],'deleted':_0x4e812e['deleted'],'createTime':_0x4e812e[_0x5a64c9(0x1ae)],'updateTime':_0x4e812e['updateTime']};}function detailArtifact(_0x17d4c3){const _0x45ba47=a11_0x2901a6;return{'id':_0x17d4c3['id'],'appCode':_0x17d4c3['appCode'],'name':_0x17d4c3[_0x45ba47(0x1b6)],'artifactType':_0x17d4c3[_0x45ba47(0x1a4)],'source':_0x17d4c3['source'],'favorite':_0x17d4c3[_0x45ba47(0x1c0)],'deleted':_0x17d4c3[_0x45ba47(0x188)],'content':_0x17d4c3['content']??'','compiledContent':_0x17d4c3[_0x45ba47(0x1d1)],'metadata':_0x17d4c3[_0x45ba47(0x1ac)]??{},'createTime':_0x17d4c3['createTime'],'updateTime':_0x17d4c3[_0x45ba47(0x193)]};}function readFavoriteFlag(_0x2df0c4){const _0x1e244d=a11_0x2901a6,_0x397718=_0x2df0c4['flag']('favorite');return _0x397718===undefined||_0x397718===null||_0x397718===''?undefined:_0x2df0c4[_0x1e244d(0x1a5)]('favorite');}const artifactList={'service':a11_0x2901a6(0x1c3),'command':a11_0x2901a6(0x18c),'description':a11_0x2901a6(0x194),'risk':a11_0x2901a6(0x18e),'flags':[{'name':a11_0x2901a6(0x1b7),'type':a11_0x2901a6(0x1cd),'description':a11_0x2901a6(0x1ca)},{'name':'favorite','type':'boolean','description':a11_0x2901a6(0x1d3)},VERBOSE_FLAG],async 'execute'(_0x529a00){const _0x21a60c=a11_0x2901a6,_0x4eb543=await listRuntimeArtifacts(_0x529a00[_0x21a60c(0x18f)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x529a00[_0x21a60c(0x18b)](_0x21a60c(0x1b7))?{'source':_0x529a00[_0x21a60c(0x18b)](_0x21a60c(0x1b7))}:{},...readFavoriteFlag(_0x529a00)!==undefined?{'favorite':readFavoriteFlag(_0x529a00)}:{}});return{'ok':!![],'data':{'total':_0x4eb543['length'],'items':_0x529a00[_0x21a60c(0x1a5)](_0x21a60c(0x1bb))?_0x4eb543:_0x4eb543['map'](summarizeArtifact)}};}},artifactDetail={'service':a11_0x2901a6(0x1c3),'command':a11_0x2901a6(0x1b8),'description':'Show\x20one\x20Artifact\x20by\x20id','risk':a11_0x2901a6(0x18e),'flags':[{...ID_FLAG,'description':a11_0x2901a6(0x1ce)}],async 'execute'(_0x20bdbb){const _0x34e8db=a11_0x2901a6,_0x53584a=await getRuntimeArtifact(_0x20bdbb[_0x34e8db(0x199)]('id'),_0x20bdbb[_0x34e8db(0x18f)]);return{'ok':!![],'data':detailArtifact(_0x53584a)};}},artifactCreate={'service':a11_0x2901a6(0x1c3),'command':a11_0x2901a6(0x1c5),'description':a11_0x2901a6(0x1c1),'risk':a11_0x2901a6(0x196),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x336de7){const _0x14d3a0=a11_0x2901a6,_0x1e9281=buildArtifactInput(_0x336de7),_0x81e871=await createRuntimeArtifact(_0x336de7['appCode'],_0x1e9281);return{'ok':!![],'data':detailArtifact(_0x81e871),'message':'Created\x20Artifact\x20'+_0x81e871['id']+(_0x81e871[_0x14d3a0(0x1b6)]?'\x20('+_0x81e871['name']+')':'')};},async 'dryRun'(_0x21099f){const _0x10f364=a11_0x2901a6,_0x15c8d9=buildArtifactInput(_0x21099f);return dryRun(_0x10f364(0x186),_0x10f364(0x192))[_0x10f364(0x1d2)]({'appCode':_0x21099f[_0x10f364(0x18f)],..._0x15c8d9})['description'](_0x10f364(0x1bd))[_0x10f364(0x1b1)]();}},artifactUpdate={'service':a11_0x2901a6(0x1c3),'command':'update','description':a11_0x2901a6(0x19e),'risk':a11_0x2901a6(0x196),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x389c29){const _0x46cf13=a11_0x2901a6,_0x4087c6=_0x389c29[_0x46cf13(0x199)]('id'),_0x3a1105=buildArtifactInput(_0x389c29),_0x20805d=await updateRuntimeArtifact(_0x4087c6,_0x389c29[_0x46cf13(0x18f)],_0x3a1105);return{'ok':!![],'data':detailArtifact(_0x20805d),'message':_0x46cf13(0x1c9)+_0x20805d['id']+(_0x20805d[_0x46cf13(0x1b6)]?'\x20('+_0x20805d[_0x46cf13(0x1b6)]+')':'')};},async 'dryRun'(_0x440c1e){const _0x32df28=a11_0x2901a6,_0x1a0507=_0x440c1e[_0x32df28(0x199)]('id'),_0x3468de=buildArtifactInput(_0x440c1e);return dryRun(_0x32df28(0x186),_0x32df28(0x1aa)+_0x1a0507+_0x32df28(0x19f))[_0x32df28(0x1d2)]({'appCode':_0x440c1e[_0x32df28(0x18f)],..._0x3468de})['description'](_0x32df28(0x1be)+_0x1a0507)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a11_0x1f4ff9=a11_0x2d99;(function(_0x58e271,_0x21c643){const _0x593ac3=a11_0x2d99,_0x551fef=_0x58e271();while(!![]){try{const _0xcf6a02=parseInt(_0x593ac3(0x14d))/0x1+parseInt(_0x593ac3(0x15b))/0x2+parseInt(_0x593ac3(0x13f))/0x3+parseInt(_0x593ac3(0x143))/0x4+-parseInt(_0x593ac3(0x11c))/0x5+-parseInt(_0x593ac3(0x127))/0x6+-parseInt(_0x593ac3(0x13c))/0x7;if(_0xcf6a02===_0x21c643)break;else _0x551fef['push'](_0x551fef['shift']());}catch(_0x2ec101){_0x551fef['push'](_0x551fef['shift']());}}}(a11_0x4536,0x545a0));function a11_0x4536(){const _0x2c04ce=['num','map','verbose','exec','Invalid\x20JSON\x20for\x20--metadata:\x20','Show\x20one\x20Artifact\x20by\x20id','Optional\x20favorite-state\x20filter','Created\x20Artifact\x20','file','join','657750jJKkNy','createTime','name','Artifact\x20source\x20file\x20is\x20blank.','artifact','favorite','write','object','split','string','detail','3464652ZuRQrk','body','filter','Preview:\x20update\x20react_module\x20Artifact\x20','isArray','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','react','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','compiledContent','startsWith','metadata','trim','--metadata\x20must\x20be\x20a\x20JSON\x20object.','bool','validation','lastIndex','build','read','artifactType','File\x20path\x20is\x20required.','/update','7735952HcNuDC','react_module','source','1876776ePkqQP','Preview:\x20create\x20react_module\x20Artifact','POST','react_module\x20imports\x20are\x20limited\x20to:\x20','2450264pzMhKr','content','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','antd','str','appCode','react-dom','File\x20not\x20found:\x20','length','utf8','686424fMfclA','test','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Artifact\x20display\x20name','includes','parse','list','boolean','flag','Artifact\x20ID','deleted','create','description','/client/artifact/create','470100eNgwnx','isFile'];a11_0x4536=function(){return _0x2c04ce;};return a11_0x4536();}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_0x1f4ff9(0x13d),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a11_0x1f4ff9(0x12d),a11_0x1f4ff9(0x149),'lodash','dayjs',a11_0x1f4ff9(0x146),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a11_0x1f4ff9(0x11b)](',\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_0x1f4ff9(0x11a),'type':a11_0x1f4ff9(0x125),'required':!![],'description':a11_0x1f4ff9(0x12c)},ARTIFACT_NAME_FLAG={'name':a11_0x1f4ff9(0x11e),'type':a11_0x1f4ff9(0x125),'description':a11_0x1f4ff9(0x150)},METADATA_FLAG={'name':a11_0x1f4ff9(0x131),'type':a11_0x1f4ff9(0x125),'description':a11_0x1f4ff9(0x12e)};function isPlainObject(_0x8a6c7f){const _0x1ad73a=a11_0x1f4ff9;return typeof _0x8a6c7f===_0x1ad73a(0x123)&&_0x8a6c7f!==null&&!Array[_0x1ad73a(0x12b)](_0x8a6c7f);}function readSourceFile(_0x342a08){const _0x58ef73=a11_0x1f4ff9;if(!_0x342a08)throw CliErrors[_0x58ef73(0x135)](_0x58ef73(0x13a));if(!existsSync(_0x342a08))throw CliErrors[_0x58ef73(0x135)](_0x58ef73(0x14a)+_0x342a08);if(!statSync(_0x342a08)[_0x58ef73(0x15c)]())throw CliErrors[_0x58ef73(0x135)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x342a08);const _0x3793ad=readFileSync(_0x342a08,_0x58ef73(0x14c));return validateReactModuleSource(_0x3793ad),_0x3793ad;}function parseMetadata(_0x16143d){const _0xe081a5=a11_0x1f4ff9;if(!_0x16143d)return undefined;let _0x301951;try{_0x301951=JSON[_0xe081a5(0x152)](_0x16143d);}catch{throw CliErrors['validation'](_0xe081a5(0x116)+_0x16143d);}if(!isPlainObject(_0x301951))throw CliErrors[_0xe081a5(0x135)](_0xe081a5(0x133));const _0xf62ae6={..._0x301951};return delete _0xf62ae6[_0xe081a5(0x12f)],_0xf62ae6;}function getPackageName(_0x30d129){const _0x206890=a11_0x1f4ff9;if(_0x30d129[_0x206890(0x130)]('@')){const [_0x14c431,_0x543a14]=_0x30d129[_0x206890(0x124)]('/');return _0x14c431&&_0x543a14?_0x14c431+'/'+_0x543a14:_0x30d129;}return _0x30d129[_0x206890(0x124)]('/')[0x0]||_0x30d129;}function validateAllowedImports(_0x5a672b){const _0x266692=a11_0x1f4ff9,_0xeb6ed7=new Set();for(const _0x432a47 of IMPORT_SOURCE_PATTERNS){_0x432a47[_0x266692(0x136)]=0x0;let _0x2b5d5d;while((_0x2b5d5d=_0x432a47[_0x266692(0x115)](_0x5a672b))!==null){const _0x2ea88b=_0x2b5d5d[0x1]?.[_0x266692(0x132)]();_0x2ea88b&&_0xeb6ed7['add'](_0x2ea88b);}}const _0x3581fc=[..._0xeb6ed7][_0x266692(0x113)](getPackageName)[_0x266692(0x129)](_0x4a46c3=>!ALLOWED_REACT_MODULE_IMPORTS[_0x266692(0x151)](_0x4a46c3));if(_0x3581fc[_0x266692(0x14b)]>0x0)throw CliErrors['validation'](_0x266692(0x142)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x3581fc)][_0x266692(0x11b)](',\x20'));}function a11_0x2d99(_0x1973af,_0x331ef5){_0x1973af=_0x1973af-0x113;const _0x4536d0=a11_0x4536();let _0x2d99bd=_0x4536d0[_0x1973af];return _0x2d99bd;}export function validateReactModuleSource(_0x5165bd){const _0xfc0b29=a11_0x1f4ff9;if(!_0x5165bd['trim']())throw CliErrors[_0xfc0b29(0x135)](_0xfc0b29(0x11f));if(PAGE_LEVEL_PATTERNS['some'](_0xdb7f8a=>_0xdb7f8a[_0xfc0b29(0x14e)](_0x5165bd)))throw CliErrors[_0xfc0b29(0x135)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x5165bd);}function buildArtifactInput(_0x54b8bf){const _0x921e65=a11_0x1f4ff9,_0x3fb4fe=readSourceFile(_0x54b8bf[_0x921e65(0x147)](_0x921e65(0x11a))),_0x4fc3bc=_0x54b8bf[_0x921e65(0x147)](_0x921e65(0x11e))['trim'](),_0x19cff1=parseMetadata(_0x54b8bf[_0x921e65(0x147)](_0x921e65(0x131)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4fc3bc?{'name':_0x4fc3bc}:{},'content':_0x3fb4fe,..._0x19cff1?{'metadata':_0x19cff1}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x83de6a){const _0x43baaf=a11_0x1f4ff9;return{'id':_0x83de6a['id'],'name':_0x83de6a[_0x43baaf(0x11e)],'artifactType':_0x83de6a[_0x43baaf(0x139)],'source':_0x83de6a[_0x43baaf(0x13e)],'favorite':_0x83de6a[_0x43baaf(0x121)],'deleted':_0x83de6a['deleted'],'createTime':_0x83de6a[_0x43baaf(0x11d)],'updateTime':_0x83de6a['updateTime']};}function detailArtifact(_0x1f283d){const _0x37f8ac=a11_0x1f4ff9;return{'id':_0x1f283d['id'],'appCode':_0x1f283d[_0x37f8ac(0x148)],'name':_0x1f283d['name'],'artifactType':_0x1f283d[_0x37f8ac(0x139)],'source':_0x1f283d['source'],'favorite':_0x1f283d['favorite'],'deleted':_0x1f283d[_0x37f8ac(0x157)],'content':_0x1f283d[_0x37f8ac(0x144)]??'','compiledContent':_0x1f283d['compiledContent'],'metadata':_0x1f283d[_0x37f8ac(0x131)]??{},'createTime':_0x1f283d[_0x37f8ac(0x11d)],'updateTime':_0x1f283d['updateTime']};}function readFavoriteFlag(_0x10081f){const _0x2e388f=a11_0x1f4ff9,_0x4cef42=_0x10081f[_0x2e388f(0x155)](_0x2e388f(0x121));return _0x4cef42===undefined||_0x4cef42===null||_0x4cef42===''?undefined:_0x10081f['bool'](_0x2e388f(0x121));}const artifactList={'service':a11_0x1f4ff9(0x120),'command':a11_0x1f4ff9(0x153),'description':'List\x20current-app\x20react_module\x20Artifacts','risk':'read','flags':[{'name':a11_0x1f4ff9(0x13e),'type':a11_0x1f4ff9(0x125),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a11_0x1f4ff9(0x121),'type':a11_0x1f4ff9(0x154),'description':a11_0x1f4ff9(0x118)},VERBOSE_FLAG],async 'execute'(_0x2169f8){const _0x4072e4=a11_0x1f4ff9,_0x25aea5=await listRuntimeArtifacts(_0x2169f8['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2169f8[_0x4072e4(0x147)](_0x4072e4(0x13e))?{'source':_0x2169f8[_0x4072e4(0x147)](_0x4072e4(0x13e))}:{},...readFavoriteFlag(_0x2169f8)!==undefined?{'favorite':readFavoriteFlag(_0x2169f8)}:{}});return{'ok':!![],'data':{'total':_0x25aea5[_0x4072e4(0x14b)],'items':_0x2169f8[_0x4072e4(0x134)](_0x4072e4(0x114))?_0x25aea5:_0x25aea5['map'](summarizeArtifact)}};}},artifactDetail={'service':a11_0x1f4ff9(0x120),'command':a11_0x1f4ff9(0x126),'description':a11_0x1f4ff9(0x117),'risk':a11_0x1f4ff9(0x138),'flags':[{...ID_FLAG,'description':a11_0x1f4ff9(0x156)}],async 'execute'(_0x1e327d){const _0x447792=a11_0x1f4ff9,_0x188930=await getRuntimeArtifact(_0x1e327d[_0x447792(0x15d)]('id'),_0x1e327d['appCode']);return{'ok':!![],'data':detailArtifact(_0x188930)};}},artifactCreate={'service':a11_0x1f4ff9(0x120),'command':a11_0x1f4ff9(0x158),'description':a11_0x1f4ff9(0x145),'risk':a11_0x1f4ff9(0x122),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3fc832){const _0x5010be=a11_0x1f4ff9,_0x1ebe4d=buildArtifactInput(_0x3fc832),_0x16bc23=await createRuntimeArtifact(_0x3fc832[_0x5010be(0x148)],_0x1ebe4d);return{'ok':!![],'data':detailArtifact(_0x16bc23),'message':_0x5010be(0x119)+_0x16bc23['id']+(_0x16bc23[_0x5010be(0x11e)]?'\x20('+_0x16bc23[_0x5010be(0x11e)]+')':'')};},async 'dryRun'(_0x5f2b2b){const _0x1cb185=a11_0x1f4ff9,_0x4d4c59=buildArtifactInput(_0x5f2b2b);return dryRun(_0x1cb185(0x141),_0x1cb185(0x15a))[_0x1cb185(0x128)]({'appCode':_0x5f2b2b[_0x1cb185(0x148)],..._0x4d4c59})[_0x1cb185(0x159)](_0x1cb185(0x140))[_0x1cb185(0x137)]();}},artifactUpdate={'service':a11_0x1f4ff9(0x120),'command':'update','description':a11_0x1f4ff9(0x14f),'risk':a11_0x1f4ff9(0x122),'flags':[{...ID_FLAG,'description':a11_0x1f4ff9(0x156)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x2afd51){const _0x489644=a11_0x1f4ff9,_0x1de23f=_0x2afd51['num']('id'),_0x561fea=buildArtifactInput(_0x2afd51),_0x2f9a7f=await updateRuntimeArtifact(_0x1de23f,_0x2afd51[_0x489644(0x148)],_0x561fea);return{'ok':!![],'data':detailArtifact(_0x2f9a7f),'message':'Updated\x20Artifact\x20'+_0x2f9a7f['id']+(_0x2f9a7f[_0x489644(0x11e)]?'\x20('+_0x2f9a7f[_0x489644(0x11e)]+')':'')};},async 'dryRun'(_0x419ab0){const _0xb7417=a11_0x1f4ff9,_0x1d94f0=_0x419ab0['num']('id'),_0x522872=buildArtifactInput(_0x419ab0);return dryRun(_0xb7417(0x141),'/client/artifact/'+_0x1d94f0+_0xb7417(0x13b))[_0xb7417(0x128)]({'appCode':_0x419ab0[_0xb7417(0x148)],..._0x522872})[_0xb7417(0x159)](_0xb7417(0x12a)+_0x1d94f0)[_0xb7417(0x137)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a12_0x5a0e15=a12_0x68f8;(function(_0x2c3be5,_0x4bfc8c){const _0x554715=a12_0x68f8,_0x28cec3=_0x2c3be5();while(!![]){try{const _0x419b76=parseInt(_0x554715(0x181))/0x1+-parseInt(_0x554715(0x16a))/0x2*(-parseInt(_0x554715(0x15a))/0x3)+parseInt(_0x554715(0x18f))/0x4*(parseInt(_0x554715(0x151))/0x5)+-parseInt(_0x554715(0x15e))/0x6+-parseInt(_0x554715(0x178))/0x7*(-parseInt(_0x554715(0x166))/0x8)+parseInt(_0x554715(0x175))/0x9+-parseInt(_0x554715(0x169))/0xa;if(_0x419b76===_0x4bfc8c)break;else _0x28cec3['push'](_0x28cec3['shift']());}catch(_0x40e060){_0x28cec3['push'](_0x28cec3['shift']());}}}(a12_0x1d57,0xf05d6));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';function a12_0x1d57(){const _0x4074e4=['Missing\x20accessKey.','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','AccessKey\x20cleared\x20from\x20','logout','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','write','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Then\x20verify\x20with:\x20','isTTY','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','4iOiCtD','Option\x20C:\x20environment\x20variable','ClientAk','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','read','\x20(via\x20','\x20config','project','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','production','string','AccessKey\x20(ak_xxx...)','\x20scope.','Write\x20to\x20global\x20config\x20(default)','global-default','accessKey','Auth\x20config\x20reinitialized\x20in\x20','AccessKey\x20saved\x20to\x20','authRequired','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Invalid\x20accessKey\x20format:\x20\x22','\x20auth\x20status','auth','str','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','boolean','repeat','Option\x20A:\x20','\x20Current\x20env:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','access-key','env','Clear\x20accessKey\x20from\x20config','Use\x20`','680345gswKGf','daily','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Shorthand\x20for\x20--access-key','No\x20AccessKey\x20found\x20in\x20','newConfigFileName','test','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20env\x20var','768495bfxmCy','envName','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Tip:\x20you\x20can\x20also\x20run:','4327818KWnBFz','Read\x20from\x20global\x20config\x20(default)','ACCESS_KEY','nonInteractive','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','slice','Option\x20B:\x20apps\x20config\x20(','push','602128BaptmN','cancelled','status','18861910FhsWQV','10FUExSe','global','info','\x20Verify:\x20','=ak_xxx','check','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','length','validation','trim','Show\x20current\x20authentication\x20status','9616293SopPPM','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','AccessKey:\x20','21ENdEGQ','\x20auth\x20login\x20--access-key\x20<ak_xxx>','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','bool','userCenterDisplayName','Auth\x20mode:\x20','stdout','init','\x20config.','880859sBBiHU','\x20doctor','join','login'];a12_0x1d57=function(){return _0x4074e4;};return a12_0x1d57();}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 _0x1ed781=a12_0x68f8;writeCliSideChannelLine(_0x1ed781(0x146)+PRODUCT_CONFIG[_0x1ed781(0x17c)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x1ed781(0x15d)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1ed781(0x179));}function a12_0x68f8(_0x1b743a,_0x72577a){_0x1b743a=_0x1b743a-0x135;const _0x1d57f0=a12_0x1d57();let _0x68f8cb=_0x1d57f0[_0x1b743a];return _0x68f8cb;}function buildAccessKeySetupGuide(){const _0x1dc089=a12_0x68f8;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x1dc089(0x141)+CLI_BIN_NAME+_0x1dc089(0x189)][_0x1dc089(0x183)]('\x0a');}function canPromptForAccessKey(_0x59301f){const _0x410d15=a12_0x68f8;return!_0x59301f[_0x410d15(0x161)]&&process['stdin']['isTTY']!==![]&&process[_0x410d15(0x17e)][_0x410d15(0x18d)]!==![];}function resolveAuthScopeFlags(_0xd00822){const _0x165541=a12_0x68f8;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xd00822[_0x165541(0x17b)](_0x165541(0x16b)),'explicitProject':_0xd00822['bool'](_0x165541(0x135)),'policy':_0x165541(0x13c)}));}async function resolveAuthWriteInput(_0x26608a){const _0x17ad02=a12_0x68f8;let _0x9d3e46=(_0x26608a[_0x17ad02(0x145)](_0x17ad02(0x14d))||_0x26608a['str']('ak')||'')[_0x17ad02(0x173)]();const _0x3d40bd=(_0x26608a['str'](_0x17ad02(0x14e))||'')['trim']();if(!_0x9d3e46&&canPromptForAccessKey(_0x26608a))try{showAccessKeyCreateHint(),_0x9d3e46=await promptAccessKey('');}catch(_0x4aa964){if(isAbortPrompt(_0x4aa964))throw CliErrors[_0x17ad02(0x167)]();throw _0x4aa964;}if(!_0x9d3e46)throw CliErrors[_0x17ad02(0x172)](_0x17ad02(0x185),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x17ad02(0x157)](_0x9d3e46))throw CliErrors[_0x17ad02(0x172)](_0x17ad02(0x142)+_0x9d3e46+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x3d40bd)return{'accessKey':_0x9d3e46};const _0x1f6315=normalizeEnv(_0x3d40bd);return{'accessKey':_0x9d3e46,'env':isDaily(_0x1f6315)?_0x17ad02(0x152):isDev(_0x1f6315)?'development':'production'};}export const authDefinitions=[{'service':'auth','command':a12_0x5a0e15(0x184),'description':a12_0x5a0e15(0x176),'risk':a12_0x5a0e15(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x5a0e15(0x14d),'type':a12_0x5a0e15(0x138),'description':a12_0x5a0e15(0x139)},{'name':'ak','type':a12_0x5a0e15(0x138),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x5a0e15(0x16b),'type':'boolean','description':a12_0x5a0e15(0x13b),'default':!![]},{'name':'project','type':a12_0x5a0e15(0x148),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1c89c4){const _0xd61734=a12_0x5a0e15;if(_0x1c89c4[_0xd61734(0x17b)]('yes'))throw CliErrors['validation'](_0xd61734(0x15c),_0xd61734(0x150)+CLI_BIN_NAME+_0xd61734(0x186)+CLI_BIN_NAME+_0xd61734(0x162));const _0x3c651e=(_0x1c89c4['str'](_0xd61734(0x14d))||_0x1c89c4[_0xd61734(0x145)]('ak')||'')[_0xd61734(0x173)]();if(!_0x3c651e&&_0x1c89c4[_0xd61734(0x161)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x38929e=await resolveAuthWriteInput(_0x1c89c4),_0x5c64f9=resolveAuthScopeFlags(_0x1c89c4),_0x236eee=readScopedConfig(_0x5c64f9);_0x236eee[_0xd61734(0x13d)]=_0x38929e[_0xd61734(0x13d)];_0x38929e[_0xd61734(0x14e)]&&(_0x236eee[_0xd61734(0x14e)]=_0x38929e[_0xd61734(0x14e)]);writeScopedConfig(_0x236eee,_0x5c64f9);const _0x57b1a2=_0x5c64f9[_0xd61734(0x16b)]?'global':'project',_0x5ed2c2=_0x236eee[_0xd61734(0x14e)]?_0xd61734(0x14b)+_0x236eee['env']+'.':'';return{'ok':!![],'message':_0xd61734(0x13f)+_0x57b1a2+_0xd61734(0x180)+_0x5ed2c2+_0xd61734(0x16d)+CLI_BIN_NAME+_0xd61734(0x143)};}},{'service':a12_0x5a0e15(0x144),'command':a12_0x5a0e15(0x17f),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a12_0x5a0e15(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x5a0e15(0x14d),'type':a12_0x5a0e15(0x138),'description':a12_0x5a0e15(0x139)},{'name':'ak','type':a12_0x5a0e15(0x138),'description':a12_0x5a0e15(0x154)},{'name':'env','type':a12_0x5a0e15(0x138),'description':a12_0x5a0e15(0x136)},{'name':'global','type':a12_0x5a0e15(0x148),'description':a12_0x5a0e15(0x13b),'default':!![]},{'name':a12_0x5a0e15(0x135),'type':a12_0x5a0e15(0x148),'description':a12_0x5a0e15(0x14c),'default':![]}],async 'execute'(_0x2433dd){const _0x3add77=a12_0x5a0e15,_0x228232=await resolveAuthWriteInput(_0x2433dd),_0x460853=resolveAuthScopeFlags(_0x2433dd),_0x294f0a={'accessKey':_0x228232[_0x3add77(0x13d)]};_0x228232[_0x3add77(0x14e)]&&(_0x294f0a[_0x3add77(0x14e)]=_0x228232[_0x3add77(0x14e)]);writeScopedConfig(_0x294f0a,_0x460853);const _0x12268d=_0x460853[_0x3add77(0x16b)]?_0x3add77(0x16b):_0x3add77(0x135),_0x56a40a=_0x294f0a[_0x3add77(0x14e)]?'\x20Current\x20env:\x20'+_0x294f0a[_0x3add77(0x14e)]+'.':'';return{'ok':!![],'message':_0x3add77(0x13e)+_0x12268d+_0x3add77(0x13a)+_0x56a40a+_0x3add77(0x16d)+CLI_BIN_NAME+_0x3add77(0x143)};}},{'service':a12_0x5a0e15(0x144),'command':a12_0x5a0e15(0x188),'description':a12_0x5a0e15(0x14f),'risk':a12_0x5a0e15(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x5a0e15(0x148),'description':a12_0x5a0e15(0x158),'default':![]}],async 'execute'(_0x1391a3){const _0x281ceb=a12_0x5a0e15,_0x1cf5cd=resolveAuthScopeFlags(_0x1391a3),_0x4ee75e=readScopedConfig(_0x1cf5cd),_0x2e9c47=!!_0x4ee75e[_0x281ceb(0x13d)];delete _0x4ee75e[_0x281ceb(0x13d)],writeScopedConfig(_0x4ee75e,_0x1cf5cd);const _0x179689=_0x1cf5cd[_0x281ceb(0x16b)]?_0x281ceb(0x16b):_0x281ceb(0x135);if(_0x2e9c47)return{'ok':!![],'message':_0x281ceb(0x187)+_0x179689+_0x281ceb(0x180)};return{'ok':!![],'message':_0x281ceb(0x155)+_0x179689+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x5a0e15(0x144),'command':a12_0x5a0e15(0x168),'description':a12_0x5a0e15(0x174),'risk':a12_0x5a0e15(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x5a0e15(0x16b),'type':'boolean','description':a12_0x5a0e15(0x15f),'default':!![]},{'name':a12_0x5a0e15(0x135),'type':'boolean','description':a12_0x5a0e15(0x18b),'default':![]},{'name':a12_0x5a0e15(0x16f),'type':a12_0x5a0e15(0x148),'description':a12_0x5a0e15(0x153),'default':![]}],async 'execute'(_0x1fea07){const _0x29c45f=a12_0x5a0e15,_0x4a752d=resolveAuthScopeFlags(_0x1fea07),_0xd8a84=readScopedConfig(_0x4a752d),_0x5cabf5=productEnvName(_0x29c45f(0x160)),_0x39383a=productEnv(_0x29c45f(0x160))||undefined,_0x4442b5=_0xd8a84['accessKey']||undefined,_0x39b5fc=_0x39383a||_0x4442b5,_0x26e0c8=_0x39383a?_0x5cabf5+_0x29c45f(0x159):_0x4442b5?(_0x4a752d[_0x29c45f(0x16b)]?'global':_0x29c45f(0x135))+_0x29c45f(0x195):null,_0x5c9241=[_0x29c45f(0x17d)+AUTH_MODE[_0x29c45f(0x191)]];if(_0x39b5fc){const _0x4a7d26=_0x39b5fc[_0x29c45f(0x171)]>0x8?''+_0x39b5fc[_0x29c45f(0x163)](0x0,0x8)+'*'[_0x29c45f(0x149)](_0x39b5fc[_0x29c45f(0x171)]-0x8):_0x39b5fc;_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x177)+_0x4a7d26+(_0x26e0c8?_0x29c45f(0x194)+_0x26e0c8+')':''));}if(!_0x39b5fc){_0x5c9241[_0x29c45f(0x165)](''),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x147)),_0x5c9241[_0x29c45f(0x165)](''),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x14a)+CLI_BIN_NAME+_0x29c45f(0x18e)),_0x5c9241['push'](''),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x164)+PRODUCT_CONFIG[_0x29c45f(0x156)]+')'),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x17a)),_0x5c9241[_0x29c45f(0x165)](''),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x190)),_0x5c9241[_0x29c45f(0x165)]('\x20\x20export\x20'+_0x5cabf5+_0x29c45f(0x16e)),_0x5c9241['push'](''),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x18c)+CLI_BIN_NAME+_0x29c45f(0x143)),_0x5c9241[_0x29c45f(0x165)](_0x29c45f(0x170)+CLI_BIN_NAME+_0x29c45f(0x182));if(_0x1fea07[_0x29c45f(0x17b)](_0x29c45f(0x16f)))throw CliErrors[_0x29c45f(0x140)](_0x5c9241[_0x29c45f(0x183)]('\x0a'));}return{'ok':!![],'message':_0x5c9241['join']('\x0a')};}},{'service':'auth','command':a12_0x5a0e15(0x16c),'description':a12_0x5a0e15(0x192),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x400bbc){const _0xc8fc49=a12_0x5a0e15,_0x197208=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x197208,'meta':{'env':_0x400bbc[_0xc8fc49(0x15b)]??_0xc8fc49(0x137)}}};}}];
1
+ const a12_0x127566=a12_0x13e4;(function(_0x5b78f9,_0x538bd0){const _0xcaf665=a12_0x13e4,_0x5eaf0c=_0x5b78f9();while(!![]){try{const _0x1235e1=-parseInt(_0xcaf665(0x1b1))/0x1*(parseInt(_0xcaf665(0x1f0))/0x2)+parseInt(_0xcaf665(0x1ed))/0x3*(-parseInt(_0xcaf665(0x1fa))/0x4)+-parseInt(_0xcaf665(0x1fb))/0x5+-parseInt(_0xcaf665(0x1cf))/0x6+-parseInt(_0xcaf665(0x1b3))/0x7+parseInt(_0xcaf665(0x1e5))/0x8*(-parseInt(_0xcaf665(0x1e8))/0x9)+parseInt(_0xcaf665(0x1c4))/0xa;if(_0x1235e1===_0x538bd0)break;else _0x5eaf0c['push'](_0x5eaf0c['shift']());}catch(_0x360fb2){_0x5eaf0c['push'](_0x5eaf0c['shift']());}}}(a12_0xe072,0xb410c));function a12_0xe072(){const _0x49945e=['Auth\x20mode:\x20','Missing\x20accessKey.','7524222dLVQFS','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Show\x20current\x20authentication\x20status','\x20(via\x20','Option\x20A:\x20','AccessKey\x20saved\x20to\x20','userCenterDisplayName','global-default','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Then\x20verify\x20with:\x20','project','daily','Tip:\x20you\x20can\x20also\x20run:','nonInteractive','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20Current\x20env:\x20','Shorthand\x20for\x20--access-key','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','str','check','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20auth\x20status','64KoKpaw','push','string','1647027CgUtsx','Use\x20`','info','logout','Write\x20to\x20global\x20config\x20(default)','26181JGkZne','global','access-key','250LfDNYs','auth','Clear\x20from\x20global\x20config\x20(default)','read','Auth\x20config\x20reinitialized\x20in\x20','isTTY','AccessKey:\x20','\x20doctor','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','length','8rvTRxK','6197385eQbAUD','AccessKey\x20cleared\x20from\x20','Clear\x20accessKey\x20from\x20config','test','\x20config.','env','cancelled','`auth\x20login`\x20does\x20not\x20support\x20--yes.','slice','3371EuaYRw','join','1460788juUTaL','\x20config.\x20Nothing\x20to\x20clear.','\x20Verify:\x20','accessKey','envName','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','status','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','validation','production','Invalid\x20accessKey\x20format:\x20\x22','AccessKey\x20(ak_xxx...)','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','login','\x20env\x20var','stdout','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','53425990TFjTTy','trim','\x20config','write','boolean','bool','=ak_xxx','yes','ACCESS_KEY'];a12_0xe072=function(){return _0x49945e;};return a12_0xe072();}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';function a12_0x13e4(_0x58a35b,_0x58fa62){_0x58a35b=_0x58a35b-0x1b0;const _0xe072ab=a12_0xe072();let _0x13e41e=_0xe072ab[_0x58a35b];return _0x13e41e;}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 _0x381d35=a12_0x13e4;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x381d35(0x1d5)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x381d35(0x1db)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x4967ce=a12_0x13e4;return[_0x4967ce(0x1e3)+PRODUCT_CONFIG[_0x4967ce(0x1d5)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x4967ce(0x1c3)][_0x4967ce(0x1b2)]('\x0a');}function canPromptForAccessKey(_0x2307cc){const _0x3fe4cd=a12_0x13e4;return!_0x2307cc[_0x3fe4cd(0x1dc)]&&process['stdin'][_0x3fe4cd(0x1f5)]!==![]&&process[_0x3fe4cd(0x1c2)][_0x3fe4cd(0x1f5)]!==![];}function resolveAuthScopeFlags(_0x317510){const _0x2f3c2a=a12_0x13e4;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x317510[_0x2f3c2a(0x1c9)]('global'),'explicitProject':_0x317510[_0x2f3c2a(0x1c9)](_0x2f3c2a(0x1d9)),'policy':_0x2f3c2a(0x1d6)}));}async function resolveAuthWriteInput(_0x393e46){const _0x3833e8=a12_0x13e4;let _0x5e9661=(_0x393e46[_0x3833e8(0x1e1)](_0x3833e8(0x1ef))||_0x393e46[_0x3833e8(0x1e1)]('ak')||'')[_0x3833e8(0x1c5)]();const _0x9e1358=(_0x393e46['str']('env')||'')[_0x3833e8(0x1c5)]();if(!_0x5e9661&&canPromptForAccessKey(_0x393e46))try{showAccessKeyCreateHint(),_0x5e9661=await promptAccessKey('');}catch(_0x48d9d8){if(isAbortPrompt(_0x48d9d8))throw CliErrors[_0x3833e8(0x201)]();throw _0x48d9d8;}if(!_0x5e9661)throw CliErrors['validation'](_0x3833e8(0x1ce),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3833e8(0x1fe)](_0x5e9661))throw CliErrors[_0x3833e8(0x1bb)](_0x3833e8(0x1bd)+_0x5e9661+'\x22',_0x3833e8(0x1d7));if(!_0x9e1358)return{'accessKey':_0x5e9661};const _0x436256=normalizeEnv(_0x9e1358);return{'accessKey':_0x5e9661,'env':isDaily(_0x436256)?_0x3833e8(0x1da):isDev(_0x436256)?'development':_0x3833e8(0x1bc)};}export const authDefinitions=[{'service':a12_0x127566(0x1f1),'command':a12_0x127566(0x1c0),'description':a12_0x127566(0x1d0),'risk':a12_0x127566(0x1c7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x127566(0x1ef),'type':'string','description':a12_0x127566(0x1be)},{'name':'ak','type':a12_0x127566(0x1e7),'description':a12_0x127566(0x1df)},{'name':'global','type':a12_0x127566(0x1c8),'description':a12_0x127566(0x1ec),'default':!![]},{'name':a12_0x127566(0x1d9),'type':a12_0x127566(0x1c8),'description':a12_0x127566(0x1e0),'default':![]}],async 'execute'(_0x51dd82){const _0x187997=a12_0x127566;if(_0x51dd82[_0x187997(0x1c9)](_0x187997(0x1cb)))throw CliErrors[_0x187997(0x1bb)](_0x187997(0x202),_0x187997(0x1e9)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x187997(0x1b8));const _0x4174e0=(_0x51dd82[_0x187997(0x1e1)]('access-key')||_0x51dd82[_0x187997(0x1e1)]('ak')||'')[_0x187997(0x1c5)]();if(!_0x4174e0&&_0x51dd82[_0x187997(0x1dc)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x1b8286=await resolveAuthWriteInput(_0x51dd82),_0x334a47=resolveAuthScopeFlags(_0x51dd82),_0x3fb992=readScopedConfig(_0x334a47);_0x3fb992[_0x187997(0x1b6)]=_0x1b8286[_0x187997(0x1b6)];_0x1b8286[_0x187997(0x200)]&&(_0x3fb992[_0x187997(0x200)]=_0x1b8286[_0x187997(0x200)]);writeScopedConfig(_0x3fb992,_0x334a47);const _0x526e41=_0x334a47[_0x187997(0x1ee)]?_0x187997(0x1ee):_0x187997(0x1d9),_0x19ba30=_0x3fb992[_0x187997(0x200)]?_0x187997(0x1de)+_0x3fb992[_0x187997(0x200)]+'.':'';return{'ok':!![],'message':_0x187997(0x1d4)+_0x526e41+_0x187997(0x1ff)+_0x19ba30+_0x187997(0x1b5)+CLI_BIN_NAME+_0x187997(0x1e4)};}},{'service':a12_0x127566(0x1f1),'command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x127566(0x1e7),'description':a12_0x127566(0x1be)},{'name':'ak','type':a12_0x127566(0x1e7),'description':a12_0x127566(0x1df)},{'name':a12_0x127566(0x200),'type':a12_0x127566(0x1e7),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a12_0x127566(0x1ee),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x127566(0x1c8),'description':a12_0x127566(0x1e0),'default':![]}],async 'execute'(_0x124473){const _0x2a0de1=a12_0x127566,_0x5832a2=await resolveAuthWriteInput(_0x124473),_0x3279e3=resolveAuthScopeFlags(_0x124473),_0x4774c1={'accessKey':_0x5832a2['accessKey']};_0x5832a2[_0x2a0de1(0x200)]&&(_0x4774c1[_0x2a0de1(0x200)]=_0x5832a2[_0x2a0de1(0x200)]);writeScopedConfig(_0x4774c1,_0x3279e3);const _0x5b3c7e=_0x3279e3[_0x2a0de1(0x1ee)]?_0x2a0de1(0x1ee):'project',_0x5b01d3=_0x4774c1[_0x2a0de1(0x200)]?_0x2a0de1(0x1de)+_0x4774c1[_0x2a0de1(0x200)]+'.':'';return{'ok':!![],'message':_0x2a0de1(0x1f4)+_0x5b3c7e+'\x20scope.'+_0x5b01d3+'\x20Verify:\x20'+CLI_BIN_NAME+_0x2a0de1(0x1e4)};}},{'service':a12_0x127566(0x1f1),'command':a12_0x127566(0x1eb),'description':a12_0x127566(0x1fd),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x127566(0x1ee),'type':'boolean','description':a12_0x127566(0x1f2),'default':!![]},{'name':a12_0x127566(0x1d9),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5f3c29){const _0x3060cf=a12_0x127566,_0x14ecb2=resolveAuthScopeFlags(_0x5f3c29),_0x988035=readScopedConfig(_0x14ecb2),_0x5efb5a=!!_0x988035['accessKey'];delete _0x988035[_0x3060cf(0x1b6)],writeScopedConfig(_0x988035,_0x14ecb2);const _0x50238a=_0x14ecb2[_0x3060cf(0x1ee)]?'global':_0x3060cf(0x1d9);if(_0x5efb5a)return{'ok':!![],'message':_0x3060cf(0x1fc)+_0x50238a+_0x3060cf(0x1ff)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x50238a+_0x3060cf(0x1b4)};}},{'service':a12_0x127566(0x1f1),'command':a12_0x127566(0x1b9),'description':a12_0x127566(0x1d1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x127566(0x1ee),'type':a12_0x127566(0x1c8),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x127566(0x1d9),'type':a12_0x127566(0x1c8),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x127566(0x1e2),'type':a12_0x127566(0x1c8),'description':a12_0x127566(0x1bf),'default':![]}],async 'execute'(_0x3e4287){const _0x42bcad=a12_0x127566,_0x35671d=resolveAuthScopeFlags(_0x3e4287),_0x46a245=readScopedConfig(_0x35671d),_0x1f9406=productEnvName(_0x42bcad(0x1cc)),_0x24c4de=productEnv('ACCESS_KEY')||undefined,_0x35fad6=_0x46a245[_0x42bcad(0x1b6)]||undefined,_0x11298f=_0x24c4de||_0x35fad6,_0x54d40c=_0x24c4de?_0x1f9406+_0x42bcad(0x1c1):_0x35fad6?(_0x35671d['global']?_0x42bcad(0x1ee):_0x42bcad(0x1d9))+_0x42bcad(0x1c6):null,_0x5b1c37=[_0x42bcad(0x1cd)+AUTH_MODE['ClientAk']];if(_0x11298f){const _0x474456=_0x11298f[_0x42bcad(0x1f9)]>0x8?''+_0x11298f[_0x42bcad(0x1b0)](0x0,0x8)+'*'['repeat'](_0x11298f[_0x42bcad(0x1f9)]-0x8):_0x11298f;_0x5b1c37[_0x42bcad(0x1e6)](_0x42bcad(0x1f6)+_0x474456+(_0x54d40c?_0x42bcad(0x1d2)+_0x54d40c+')':''));}if(!_0x11298f){_0x5b1c37[_0x42bcad(0x1e6)](''),_0x5b1c37[_0x42bcad(0x1e6)](_0x42bcad(0x1f8)),_0x5b1c37[_0x42bcad(0x1e6)](''),_0x5b1c37[_0x42bcad(0x1e6)](_0x42bcad(0x1d3)+CLI_BIN_NAME+_0x42bcad(0x1dd)),_0x5b1c37[_0x42bcad(0x1e6)](''),_0x5b1c37[_0x42bcad(0x1e6)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x5b1c37[_0x42bcad(0x1e6)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x5b1c37[_0x42bcad(0x1e6)](''),_0x5b1c37[_0x42bcad(0x1e6)]('Option\x20C:\x20environment\x20variable'),_0x5b1c37[_0x42bcad(0x1e6)]('\x20\x20export\x20'+_0x1f9406+_0x42bcad(0x1ca)),_0x5b1c37['push'](''),_0x5b1c37['push'](_0x42bcad(0x1d8)+CLI_BIN_NAME+_0x42bcad(0x1e4)),_0x5b1c37[_0x42bcad(0x1e6)](_0x42bcad(0x1ba)+CLI_BIN_NAME+_0x42bcad(0x1f7));if(_0x3e4287[_0x42bcad(0x1c9)](_0x42bcad(0x1e2)))throw CliErrors['authRequired'](_0x5b1c37['join']('\x0a'));}return{'ok':!![],'message':_0x5b1c37['join']('\x0a')};}},{'service':a12_0x127566(0x1f1),'command':a12_0x127566(0x1ea),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a12_0x127566(0x1f3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x7c786){const _0x284627=a12_0x127566,_0x518b2e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x518b2e,'meta':{'env':_0x7c786[_0x284627(0x1b7)]??_0x284627(0x1bc)}}};}}];
@@ -1 +1 @@
1
- function a13_0x25d8(_0x400163,_0x52a479){_0x400163=_0x400163-0x70;const _0x2c239b=a13_0x2c23();let _0x25d831=_0x2c239b[_0x400163];return _0x25d831;}function a13_0x2c23(){const _0x42d1b3=['SIGINT','AccessKey\x20(','24315AdpRYs','stdout','1443gkkrMj','31820ypywDH','name','6fMkpiM','5770wiziQN','4hudAml','once','stdin','race','AbortPrompt','55iVihBH','removeListener','close','22668qBiwhR','9YsTNOv','523390gSWqzp','552104KYiGHC','196HNLwre','trim','267BssOjU'];a13_0x2c23=function(){return _0x42d1b3;};return a13_0x2c23();}(function(_0x3e6229,_0x46219a){const _0x6c341f=a13_0x25d8,_0x5a8464=_0x3e6229();while(!![]){try{const _0x574548=-parseInt(_0x6c341f(0x74))/0x1+-parseInt(_0x6c341f(0x75))/0x2*(-parseInt(_0x6c341f(0x83))/0x3)+-parseInt(_0x6c341f(0x81))/0x4*(-parseInt(_0x6c341f(0x86))/0x5)+parseInt(_0x6c341f(0x73))/0x6*(parseInt(_0x6c341f(0x7f))/0x7)+parseInt(_0x6c341f(0x80))/0x8*(parseInt(_0x6c341f(0x7e))/0x9)+parseInt(_0x6c341f(0x71))/0xa*(-parseInt(_0x6c341f(0x7a))/0xb)+parseInt(_0x6c341f(0x7d))/0xc*(-parseInt(_0x6c341f(0x70))/0xd);if(_0x574548===_0x46219a)break;else _0x5a8464['push'](_0x5a8464['shift']());}catch(_0x49aa8d){_0x5a8464['push'](_0x5a8464['shift']());}}}(a13_0x2c23,0x24d69));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1561ad=a13_0x25d8;super('User\x20aborted\x20prompt'),this[_0x1561ad(0x72)]=_0x1561ad(0x79);}}function createSafeRl(){const _0x3bc51c=a13_0x25d8,_0x79fe69=createInterface({'input':process[_0x3bc51c(0x77)],'output':process[_0x3bc51c(0x87)]});let _0x546005;const _0xd549fc=new Promise((_0x34b6c8,_0x251a9a)=>{const _0x205f86=_0x3bc51c;_0x546005=()=>{const _0x15de6d=a13_0x25d8;_0x546005&&(_0x79fe69[_0x15de6d(0x7b)]('SIGINT',_0x546005),_0x546005=undefined);try{_0x79fe69['close']();}catch{}_0x251a9a(new AbortPrompt());},_0x79fe69[_0x205f86(0x76)](_0x205f86(0x84),_0x546005);}),_0x1e3df3=()=>{const _0xed6b09=_0x3bc51c;_0x546005&&(_0x79fe69[_0xed6b09(0x7b)](_0xed6b09(0x84),_0x546005),_0x546005=undefined);try{_0x79fe69[_0xed6b09(0x7c)]();}catch{}};return{'rl':_0x79fe69,'abortPromise':_0xd549fc,'disposeSuccess':_0x1e3df3};}export async function promptAccessKey(_0x4c3b08=''){const _0x334314=a13_0x25d8,{rl:_0x222d09,abortPromise:_0x4a31e5,disposeSuccess:_0x1e50fc}=createSafeRl(),_0x499e12=new Promise(_0x212b2f=>{const _0x14bdbb=a13_0x25d8,_0x4a67c1=_0x4c3b08?_0x14bdbb(0x85)+_0x4c3b08+'):\x20':'AccessKey\x20(paste\x20ak_...):\x20';_0x222d09['question'](_0x4a67c1,_0x2da148=>{const _0x50bd39=_0x14bdbb;_0x1e50fc(),_0x212b2f(_0x2da148[_0x50bd39(0x82)]()||_0x4c3b08);});});return Promise[_0x334314(0x78)]([_0x499e12,_0x4a31e5]);}export function isAbortPrompt(_0x4e31a0){const _0x3bee39=a13_0x25d8;return _0x4e31a0 instanceof Error&&_0x4e31a0[_0x3bee39(0x72)]===_0x3bee39(0x79);}
1
+ (function(_0x30b473,_0x4e0088){const _0x4e78bf=a13_0x1367,_0x15c665=_0x30b473();while(!![]){try{const _0x2a1cd0=parseInt(_0x4e78bf(0x1ad))/0x1+parseInt(_0x4e78bf(0x1a6))/0x2+parseInt(_0x4e78bf(0x1b7))/0x3+-parseInt(_0x4e78bf(0x1af))/0x4*(parseInt(_0x4e78bf(0x1a7))/0x5)+-parseInt(_0x4e78bf(0x1b3))/0x6+parseInt(_0x4e78bf(0x1aa))/0x7*(-parseInt(_0x4e78bf(0x1ba))/0x8)+-parseInt(_0x4e78bf(0x1b4))/0x9*(-parseInt(_0x4e78bf(0x1b0))/0xa);if(_0x2a1cd0===_0x4e0088)break;else _0x15c665['push'](_0x15c665['shift']());}catch(_0x55a9e9){_0x15c665['push'](_0x15c665['shift']());}}}(a13_0x4c09,0x74604));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xd76d5c=a13_0x1367;super(_0xd76d5c(0x1a9)),this['name']='AbortPrompt';}}function a13_0x4c09(){const _0x2a66c5=['trim','142076GEuScx','462690xaZfnh','AccessKey\x20(','removeListener','3644124GPfCnp','135vvdHJB','race','stdin','1430088qfGsIm','stdout','once','16cnZloh','close','1876126VPMvfk','125gQgaDp','):\x20','User\x20aborted\x20prompt','2305499VRwxBq','AccessKey\x20(paste\x20ak_...):\x20','SIGINT','521925woQuIo'];a13_0x4c09=function(){return _0x2a66c5;};return a13_0x4c09();}function createSafeRl(){const _0x20f2b7=a13_0x1367,_0x29e910=createInterface({'input':process[_0x20f2b7(0x1b6)],'output':process[_0x20f2b7(0x1b8)]});let _0xd1bf4b;const _0x550f87=new Promise((_0x54b527,_0x5239c1)=>{const _0x3b4f12=_0x20f2b7;_0xd1bf4b=()=>{const _0x410079=a13_0x1367;_0xd1bf4b&&(_0x29e910[_0x410079(0x1b2)](_0x410079(0x1ac),_0xd1bf4b),_0xd1bf4b=undefined);try{_0x29e910[_0x410079(0x1bb)]();}catch{}_0x5239c1(new AbortPrompt());},_0x29e910[_0x3b4f12(0x1b9)](_0x3b4f12(0x1ac),_0xd1bf4b);}),_0x1c611a=()=>{const _0xb090df=_0x20f2b7;_0xd1bf4b&&(_0x29e910[_0xb090df(0x1b2)](_0xb090df(0x1ac),_0xd1bf4b),_0xd1bf4b=undefined);try{_0x29e910[_0xb090df(0x1bb)]();}catch{}};return{'rl':_0x29e910,'abortPromise':_0x550f87,'disposeSuccess':_0x1c611a};}export async function promptAccessKey(_0x45931b=''){const _0x2297f9=a13_0x1367,{rl:_0x2d7f26,abortPromise:_0x51ab8a,disposeSuccess:_0x49729b}=createSafeRl(),_0x17054f=new Promise(_0x13025b=>{const _0x16e073=a13_0x1367,_0x4a1276=_0x45931b?_0x16e073(0x1b1)+_0x45931b+_0x16e073(0x1a8):_0x16e073(0x1ab);_0x2d7f26['question'](_0x4a1276,_0x387942=>{const _0x40b3d0=_0x16e073;_0x49729b(),_0x13025b(_0x387942[_0x40b3d0(0x1ae)]()||_0x45931b);});});return Promise[_0x2297f9(0x1b5)]([_0x17054f,_0x51ab8a]);}function a13_0x1367(_0x539811,_0x51639c){_0x539811=_0x539811-0x1a6;const _0x4c09cd=a13_0x4c09();let _0x136707=_0x4c09cd[_0x539811];return _0x136707;}export function isAbortPrompt(_0x5ccb15){return _0x5ccb15 instanceof Error&&_0x5ccb15['name']==='AbortPrompt';}