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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) 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/artifact/index.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/auth/prompt.js +1 -1
  12. package/lib/commands/bff/detail.js +1 -1
  13. package/lib/commands/bff/exec.js +1 -1
  14. package/lib/commands/bff/index.js +1 -1
  15. package/lib/commands/cli-skill/index.js +1 -1
  16. package/lib/commands/common/config-policy.js +1 -1
  17. package/lib/commands/common/constraints.js +1 -1
  18. package/lib/commands/common/flags.js +1 -1
  19. package/lib/commands/config/definitions.js +1 -1
  20. package/lib/commands/config/shared.js +1 -1
  21. package/lib/commands/data/index.js +1 -1
  22. package/lib/commands/dataset/detail.js +1 -1
  23. package/lib/commands/dataset/index.js +1 -1
  24. package/lib/commands/dataset/list.js +1 -1
  25. package/lib/commands/dataset/sdk-doc.js +1 -1
  26. package/lib/commands/doctor.js +1 -1
  27. package/lib/commands/init.js +1 -1
  28. package/lib/commands/kb/index.js +1 -1
  29. package/lib/commands/logs/index.js +1 -1
  30. package/lib/commands/personal-bff/index.js +1 -1
  31. package/lib/commands/registry.js +1 -1
  32. package/lib/commands/schema.js +1 -1
  33. package/lib/commands/service/dynamic.js +1 -1
  34. package/lib/commands/service/index.js +1 -1
  35. package/lib/commands/service/registry.js +1 -1
  36. package/lib/commands/skill/commands/create.js +1 -1
  37. package/lib/commands/skill/commands/install.js +1 -1
  38. package/lib/commands/skill/commands/list.js +1 -1
  39. package/lib/commands/skill/commands/push.js +1 -1
  40. package/lib/commands/skill/commands/validate.js +1 -1
  41. package/lib/commands/skill/flags.js +1 -1
  42. package/lib/commands/skill/index.js +1 -1
  43. package/lib/commands/skill/manifest-helpers.js +1 -1
  44. package/lib/commands/skill/scopes.js +1 -1
  45. package/lib/commands/skill/summary.js +1 -1
  46. package/lib/commands/skill/templates.js +1 -1
  47. package/lib/commands/skill/validate.js +1 -1
  48. package/lib/commands/sql/detail.js +1 -1
  49. package/lib/commands/sql/exec.js +1 -1
  50. package/lib/commands/sql/index.js +1 -1
  51. package/lib/commands/update.js +1 -1
  52. package/lib/commands/workspace/index.js +1 -1
  53. package/lib/config/schema.js +1 -1
  54. package/lib/constant/app.js +1 -1
  55. package/lib/constant/auth-mode.js +1 -1
  56. package/lib/constant/cli.js +1 -1
  57. package/lib/constant/defaults.js +1 -1
  58. package/lib/constant/distribution.js +1 -1
  59. package/lib/constant/domain.js +1 -1
  60. package/lib/constant/env.js +1 -1
  61. package/lib/constant/output.js +1 -1
  62. package/lib/constant/product.js +1 -1
  63. package/lib/constant/risk.js +1 -1
  64. package/lib/constant/url.js +1 -1
  65. package/lib/context.js +1 -1
  66. package/lib/core/api-client.js +1 -1
  67. package/lib/core/db-resolver.js +1 -1
  68. package/lib/core/sdk-client.js +1 -1
  69. package/lib/errors.js +1 -1
  70. package/lib/framework/build-all-flags.js +1 -1
  71. package/lib/framework/dryrun.js +1 -1
  72. package/lib/framework/flags.js +1 -1
  73. package/lib/framework/help.js +1 -1
  74. package/lib/framework/index.js +1 -1
  75. package/lib/framework/output.js +1 -1
  76. package/lib/framework/preparse.js +1 -1
  77. package/lib/framework/response.js +1 -1
  78. package/lib/framework/runner-confirmation.js +1 -1
  79. package/lib/framework/runner-error.js +1 -1
  80. package/lib/framework/runner.js +1 -1
  81. package/lib/framework/schema-export.js +1 -1
  82. package/lib/framework/types.js +1 -1
  83. package/lib/generated/build-info.js +1 -1
  84. package/lib/help.js +1 -1
  85. package/lib/skills/npx-skills-add.js +1 -1
  86. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  87. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  88. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  89. package/lib/skills/runtime-skill-sync/links.js +1 -1
  90. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  91. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  92. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  93. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  94. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  95. package/lib/skills/runtime-skill-sync/push.js +1 -1
  96. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  97. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  98. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  99. package/lib/skills/runtime-skill-sync.js +1 -1
  100. package/lib/utils/apply-jq-filter.js +1 -1
  101. package/lib/utils/logger.js +1 -1
  102. package/lib/utils/params.js +1 -1
  103. package/lib/utils/platform.js +1 -1
  104. package/lib/utils/update-notice.js +1 -1
  105. package/lib/utils/version.js +1 -1
  106. package/lib/utils/write-cli-side-channel.js +1 -1
  107. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x30f8f4=a0_0x220b;(function(_0x16d999,_0x709180){const _0x1443a4=a0_0x220b,_0x35b2f2=_0x16d999();while(!![]){try{const _0x39a7a1=-parseInt(_0x1443a4(0x168))/0x1*(parseInt(_0x1443a4(0x185))/0x2)+-parseInt(_0x1443a4(0x181))/0x3+-parseInt(_0x1443a4(0x173))/0x4*(-parseInt(_0x1443a4(0x188))/0x5)+-parseInt(_0x1443a4(0x18a))/0x6*(-parseInt(_0x1443a4(0x17d))/0x7)+parseInt(_0x1443a4(0x177))/0x8+-parseInt(_0x1443a4(0x180))/0x9*(-parseInt(_0x1443a4(0x176))/0xa)+parseInt(_0x1443a4(0x17f))/0xb;if(_0x39a7a1===_0x709180)break;else _0x35b2f2['push'](_0x35b2f2['shift']());}catch(_0x7f2cdf){_0x35b2f2['push'](_0x35b2f2['shift']());}}}(a0_0x468a,0x5631e));import{jsx as a0_0x258010}from'react/jsx-runtime';import a0_0x249af1 from'meow';function a0_0x468a(){const _0x3b052e=['cancelled','write','args','7rtbVDX','Hint:\x20','355454tFrNCk','195012toglLp','660327IQLOqv','length','\x20->\x20--','assign','32842uwslMA','flatMap','defaultCommand','3415stoeFR','message','1183170HyATLy','log','catch','original','Error:\x20','definition','ERR_STREAM_DESTROYED','handler','stderr','19lNdkOc',':\x20--','ExitPromptError','unknownCommand','ERR_USE_AFTER_CLOSE','exit','input','error','hint','name','code','2808eGwZBJ','./framework/preparse.js','help','80SuNDtU','22744aQpBVp','flags','corrected'];a0_0x468a=function(){return _0x3b052e;};return a0_0x468a();}import{render}from'ink';function a0_0x220b(_0x434252,_0x411b7d){_0x434252=_0x434252-0x168;const _0x468af8=a0_0x468a();let _0x220ba4=_0x468af8[_0x434252];return _0x220ba4;}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x249af1(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x30f8f4(0x18c)](handleError);async function main(){try{await run();}catch(_0xf4c7f5){handleError(_0xf4c7f5);}}async function run(){const _0x25c425=a0_0x30f8f4;let _0x31d014=cli[_0x25c425(0x16e)][0x0],_0x235eae=cli['input'][0x1];const _0x6ec15a=cli['flags'];try{const {correctFlags:_0x3183cb}=await import(_0x25c425(0x174)),_0x21fe81=getAllDefinitions()[_0x25c425(0x186)](_0x22e9dd=>_0x22e9dd['flags']??[]),{flags:_0x4ec31a,corrections:_0x572225}=_0x3183cb(_0x6ec15a,_0x21fe81);if(_0x572225[_0x25c425(0x182)]>0x0){for(const _0x18761a of _0x572225){process[_0x25c425(0x192)][_0x25c425(0x17b)]('[preparse]\x20'+_0x18761a[_0x25c425(0x191)]+_0x25c425(0x169)+_0x18761a[_0x25c425(0x18d)]+_0x25c425(0x183)+_0x18761a[_0x25c425(0x179)]+'\x0a');}Object[_0x25c425(0x184)](_0x6ec15a,_0x4ec31a);}}catch{}if(!_0x31d014){const {waitUntilExit:_0x59a606}=render(a0_0x258010(Help,{}));await _0x59a606();return;}if(!isKnownService(_0x31d014)){const _0x38ae55=resolveDynamicServiceCommand(cli[_0x25c425(0x16e)],_0x6ec15a);if(_0x38ae55){if(_0x6ec15a[_0x25c425(0x175)]){console[_0x25c425(0x18b)](generateCommandHelp(_0x38ae55[_0x25c425(0x18f)]));return;}Object[_0x25c425(0x184)](_0x6ec15a,_0x38ae55[_0x25c425(0x178)]);const _0x378ab5=buildConfigFromFlags(_0x6ec15a);await initGlobalEnvironment(_0x378ab5);const _0xf4c20c=createPipelineEnv(_0x378ab5,_0x6ec15a);_0xf4c20c[_0x25c425(0x17c)]=_0x38ae55[_0x25c425(0x17c)],await runCommand(_0x38ae55[_0x25c425(0x18f)],_0xf4c20c);return;}if(_0x6ec15a[_0x25c425(0x175)]){const _0x5324a8=generateDynamicServiceHelp(_0x31d014);if(_0x5324a8){console['log'](_0x5324a8);return;}}const {waitUntilExit:_0x4a66de}=render(a0_0x258010(Help,{}));await _0x4a66de();return;}const _0x4d636a=getServiceEntry(_0x31d014);if(!_0x235eae){if(_0x6ec15a[_0x25c425(0x175)]){console['log'](generateServiceHelp(_0x31d014));return;}if(_0x4d636a[_0x25c425(0x187)])_0x235eae=_0x4d636a['defaultCommand'];else{console[_0x25c425(0x18b)](generateServiceHelp(_0x31d014));return;}}const _0x27e503=findDefinition(_0x31d014,_0x235eae);!_0x27e503&&(console[_0x25c425(0x18b)](generateServiceHelp(_0x31d014)),handleError(CliErrors[_0x25c425(0x16b)](_0x31d014+'\x20'+_0x235eae)));if(_0x6ec15a[_0x25c425(0x175)]){console['log'](generateCommandHelp(_0x27e503));return;}const _0x22752b=buildConfigFromFlags(_0x6ec15a);await initGlobalEnvironment(_0x22752b);const _0x598a09=createPipelineEnv(_0x22752b,_0x6ec15a);_0x598a09['args']=cli['input']['slice'](0x2),await runCommand(_0x27e503,_0x598a09);}function handleError(_0x21925e){const _0x26821e=a0_0x30f8f4;if(_0x21925e instanceof CliError){_0x21925e[_0x26821e(0x172)]===_0x26821e(0x17a)&&(process[_0x26821e(0x192)][_0x26821e(0x17b)]('\x0aCancelled.\x0a'),process[_0x26821e(0x16d)](0x0));console[_0x26821e(0x16f)](_0x26821e(0x18e)+_0x21925e[_0x26821e(0x189)]);if(_0x21925e[_0x26821e(0x170)])console[_0x26821e(0x16f)](_0x26821e(0x17e)+_0x21925e[_0x26821e(0x170)]);process[_0x26821e(0x16d)](_0x21925e['exitCode']);}isUserCancellation(_0x21925e)&&(process[_0x26821e(0x192)]['write']('\x0aCancelled.\x0a'),process[_0x26821e(0x16d)](0x0)),console['error']('Unexpected\x20error:',_0x21925e),process[_0x26821e(0x16d)](0x1);}function isUserCancellation(_0x28ce26){const _0x40c4eb=a0_0x30f8f4;if(!(_0x28ce26 instanceof Error))return![];if(_0x28ce26[_0x40c4eb(0x171)]===_0x40c4eb(0x16a))return!![];if(_0x28ce26['code']===_0x40c4eb(0x16c))return!![];if(_0x28ce26[_0x40c4eb(0x172)]===_0x40c4eb(0x190))return!![];return![];}
2
+ const a0_0xab42e1=a0_0x6d87;(function(_0x40a921,_0x2a3125){const _0x2ae57f=a0_0x6d87,_0x470a39=_0x40a921();while(!![]){try{const _0x599aaf=-parseInt(_0x2ae57f(0x113))/0x1*(-parseInt(_0x2ae57f(0x138))/0x2)+-parseInt(_0x2ae57f(0x12d))/0x3*(parseInt(_0x2ae57f(0x121))/0x4)+parseInt(_0x2ae57f(0x13b))/0x5*(-parseInt(_0x2ae57f(0x123))/0x6)+parseInt(_0x2ae57f(0x11a))/0x7*(parseInt(_0x2ae57f(0x129))/0x8)+-parseInt(_0x2ae57f(0x11d))/0x9+parseInt(_0x2ae57f(0x131))/0xa*(-parseInt(_0x2ae57f(0x117))/0xb)+parseInt(_0x2ae57f(0x111))/0xc*(parseInt(_0x2ae57f(0x127))/0xd);if(_0x599aaf===_0x2a3125)break;else _0x470a39['push'](_0x470a39['shift']());}catch(_0xd8f841){_0x470a39['push'](_0x470a39['shift']());}}}(a0_0x43ca,0x8aeb7));import{jsx as a0_0x2a4735}from'react/jsx-runtime';import a0_0x49b41b from'meow';import{render}from'ink';function a0_0x43ca(){const _0x1e77bf=['handler','92733zZJccc','Unexpected\x20error:','write','args','139770XEaIBO','error','ERR_STREAM_DESTROYED','flatMap','help','length','ExitPromptError','812930IURCoT','hint','Hint:\x20','165CYzynp','defaultCommand','definition','12uILuhk','Error:\x20','1ANBsgg','assign','code','unknownCommand','825xoBNaO','corrected','name','808227ktfzUE','stderr','\x0aCancelled.\x0a','962622EQxCoQ','catch',':\x20--','flags','124DXXNXB','original','164364zNdUtE','\x20->\x20--','log','exitCode','30833387rRTYPU','./framework/preparse.js','56MCnIaG','input','exit'];a0_0x43ca=function(){return _0x1e77bf;};return a0_0x43ca();}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_0x6d87(_0x4c1d70,_0x4c6446){_0x4c1d70=_0x4c1d70-0x10f;const _0x43cafa=a0_0x43ca();let _0x6d87a0=_0x43cafa[_0x4c1d70];return _0x6d87a0;}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_0x49b41b(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0xab42e1(0x11e)](handleError);async function main(){try{await run();}catch(_0x54fff3){handleError(_0x54fff3);}}async function run(){const _0x60d953=a0_0xab42e1;let _0x3fe846=cli[_0x60d953(0x12a)][0x0],_0x1a6260=cli[_0x60d953(0x12a)][0x1];const _0x10f15b=cli[_0x60d953(0x120)];try{const {correctFlags:_0x291c54}=await import(_0x60d953(0x128)),_0x313525=getAllDefinitions()[_0x60d953(0x134)](_0x1efdb8=>_0x1efdb8['flags']??[]),{flags:_0x3aa6a8,corrections:_0x18341f}=_0x291c54(_0x10f15b,_0x313525);if(_0x18341f[_0x60d953(0x136)]>0x0){for(const _0xcfc6c0 of _0x18341f){process[_0x60d953(0x11b)][_0x60d953(0x12f)]('[preparse]\x20'+_0xcfc6c0[_0x60d953(0x12c)]+_0x60d953(0x11f)+_0xcfc6c0[_0x60d953(0x122)]+_0x60d953(0x124)+_0xcfc6c0[_0x60d953(0x118)]+'\x0a');}Object[_0x60d953(0x114)](_0x10f15b,_0x3aa6a8);}}catch{}if(!_0x3fe846){const {waitUntilExit:_0x5212b2}=render(a0_0x2a4735(Help,{}));await _0x5212b2();return;}if(!isKnownService(_0x3fe846)){const _0x305b0e=resolveDynamicServiceCommand(cli['input'],_0x10f15b);if(_0x305b0e){if(_0x10f15b[_0x60d953(0x135)]){console['log'](generateCommandHelp(_0x305b0e[_0x60d953(0x110)]));return;}Object['assign'](_0x10f15b,_0x305b0e['flags']);const _0x29b9ea=buildConfigFromFlags(_0x10f15b);await initGlobalEnvironment(_0x29b9ea);const _0x8ada72=createPipelineEnv(_0x29b9ea,_0x10f15b);_0x8ada72[_0x60d953(0x130)]=_0x305b0e['args'],await runCommand(_0x305b0e[_0x60d953(0x110)],_0x8ada72);return;}if(_0x10f15b[_0x60d953(0x135)]){const _0x2281d1=generateDynamicServiceHelp(_0x3fe846);if(_0x2281d1){console[_0x60d953(0x125)](_0x2281d1);return;}}const {waitUntilExit:_0x4309fc}=render(a0_0x2a4735(Help,{}));await _0x4309fc();return;}const _0x5dfe72=getServiceEntry(_0x3fe846);if(!_0x1a6260){if(_0x10f15b[_0x60d953(0x135)]){console[_0x60d953(0x125)](generateServiceHelp(_0x3fe846));return;}if(_0x5dfe72[_0x60d953(0x10f)])_0x1a6260=_0x5dfe72[_0x60d953(0x10f)];else{console['log'](generateServiceHelp(_0x3fe846));return;}}const _0x16a183=findDefinition(_0x3fe846,_0x1a6260);!_0x16a183&&(console['log'](generateServiceHelp(_0x3fe846)),handleError(CliErrors[_0x60d953(0x116)](_0x3fe846+'\x20'+_0x1a6260)));if(_0x10f15b[_0x60d953(0x135)]){console[_0x60d953(0x125)](generateCommandHelp(_0x16a183));return;}const _0x916769=buildConfigFromFlags(_0x10f15b);await initGlobalEnvironment(_0x916769);const _0x2b8579=createPipelineEnv(_0x916769,_0x10f15b);_0x2b8579[_0x60d953(0x130)]=cli[_0x60d953(0x12a)]['slice'](0x2),await runCommand(_0x16a183,_0x2b8579);}function handleError(_0x1a8fd6){const _0x125516=a0_0xab42e1;if(_0x1a8fd6 instanceof CliError){_0x1a8fd6['code']==='cancelled'&&(process['stderr'][_0x125516(0x12f)](_0x125516(0x11c)),process[_0x125516(0x12b)](0x0));console[_0x125516(0x132)](_0x125516(0x112)+_0x1a8fd6['message']);if(_0x1a8fd6[_0x125516(0x139)])console[_0x125516(0x132)](_0x125516(0x13a)+_0x1a8fd6[_0x125516(0x139)]);process[_0x125516(0x12b)](_0x1a8fd6[_0x125516(0x126)]);}isUserCancellation(_0x1a8fd6)&&(process[_0x125516(0x11b)][_0x125516(0x12f)](_0x125516(0x11c)),process[_0x125516(0x12b)](0x0)),console[_0x125516(0x132)](_0x125516(0x12e),_0x1a8fd6),process[_0x125516(0x12b)](0x1);}function isUserCancellation(_0x10ad04){const _0x2b2975=a0_0xab42e1;if(!(_0x10ad04 instanceof Error))return![];if(_0x10ad04[_0x2b2975(0x119)]===_0x2b2975(0x137))return!![];if(_0x10ad04[_0x2b2975(0x115)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x10ad04[_0x2b2975(0x115)]===_0x2b2975(0x133))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x52d42f=a1_0x7d18;function a1_0x56cc(){const _0x287afc=['includes','read','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','where\x20filters\x20before\x20aggregation','/api/endpoint/{appCode}/functions','条件过滤查询数据','appCode','GET','result\x20rows\x20contain\x20aggregate\x20aliases','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','datasetCode','29627970aPDtnH','join','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','/api/{appCode}/{datasetCode}/aggregate','summary','tableData\x20contains\x20records','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','Returns\x20SQL\x20execution\x20payload','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','653378CJwCBk','detail','Show\x20runtime\x20API\x20documentation\x20by\x20code','scriptName','validation','35HeZqsz','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','{\x22fieldName\x22:\x22value\x22}','/api/dataset/getOneByCode?code={datasetCode}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','find','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','API\x20doc\x20code\x20not\x20found:\x20','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','bf_execute','Returns\x20endpoint\x20functionName/id/description','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Returns\x20one\x20matching\x20business\x20record','dataset','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','##\x20Aggregate\x20dataset\x20data','paging\x20contains\x20pagination','List\x20available\x20runtime\x20API\x20documentation\x20entries','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','3ZnjcXb','Execute\x20custom\x20SQL','toLowerCase','tableData\x20contains\x20dataset\x20id/code/name','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','查询单条数据','custom_sql_execute','/api/{appCode}/{datasetCode}/getOne','32-character\x20dataset\x20code','执行指定\x20BF\x20函数','770798QAlpGS','dataset_detail','##\x20Dataset\x20detail','{\x22param\x22:\x22value\x22}','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','str','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','filter','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Aggregate\x20dataset\x20data','POST','Dataset\x20detail','{\x22id\x22:123}','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Current\x20app\x20code','method','list','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','category','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','whenToUse','custom_sql','969390MXKVpv','api-doc','dataset_data_get_one','需要向指定数据集新增一条业务数据时使用','None','dataset_list','trim','创建数据','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','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','title','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','聚合查询数据集数据','fields/properties\x20describe\x20data\x20shape','code','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','9yItWBR','Endpoint\x20function\x20name','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','paging.totalCount\x20gives\x20total\x20rows','Filter\x20dataset\x20data','366803nWHfZG','1514440oNtcRG','List\x20datasets','keyword','operations\x20describes\x20runtime\x20APIs','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','string','/api/custom/executeSql','bf_function_list','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','6014728PjAutW','/api/{appCode}/{datasetCode}/filter'];a1_0x56cc=function(){return _0x287afc;};return a1_0x56cc();}function a1_0x7d18(_0x2bd972,_0xf73846){_0x2bd972=_0x2bd972-0x160;const _0x56cc99=a1_0x56cc();let _0x7d18a1=_0x56cc99[_0x2bd972];return _0x7d18a1;}(function(_0x3965f4,_0x158705){const _0xe26c81=a1_0x7d18,_0x35d512=_0x3965f4();while(!![]){try{const _0x2dec4c=-parseInt(_0xe26c81(0x16f))/0x1+-parseInt(_0xe26c81(0x191))/0x2+parseInt(_0xe26c81(0x1ad))/0x3*(parseInt(_0xe26c81(0x170))/0x4)+parseInt(_0xe26c81(0x196))/0x5*(-parseInt(_0xe26c81(0x1cf))/0x6)+-parseInt(_0xe26c81(0x1b7))/0x7+-parseInt(_0xe26c81(0x17a))/0x8+-parseInt(_0xe26c81(0x16a))/0x9*(-parseInt(_0xe26c81(0x187))/0xa);if(_0x2dec4c===_0x158705)break;else _0x35d512['push'](_0x35d512['shift']());}catch(_0x629cc9){_0x35d512['push'](_0x35d512['shift']());}}}(a1_0x56cc,0x9fe9d));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':a1_0x52d42f(0x175),'description':a1_0x52d42f(0x189)},KEYWORD_FLAG={'name':a1_0x52d42f(0x172),'type':a1_0x52d42f(0x175),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x52d42f(0x168),'type':a1_0x52d42f(0x175),'required':!![],'description':a1_0x52d42f(0x1c5)},DOCS=[{'code':a1_0x52d42f(0x1d4),'category':'dataset','title':a1_0x52d42f(0x171),'method':a1_0x52d42f(0x1c2),'path':'/api/dataset/get-dataset-list-by-app-code','summary':'分页获取数据集列表','whenToUse':a1_0x52d42f(0x197),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':[a1_0x52d42f(0x1b0),a1_0x52d42f(0x16d)],'examples':[a1_0x52d42f(0x1a7)],'notes':[a1_0x52d42f(0x1cb)],'markdown':['##\x20List\x20datasets','','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x52d42f(0x188)]('\x0a')},{'code':a1_0x52d42f(0x1b8),'category':'dataset','title':a1_0x52d42f(0x1c3),'method':a1_0x52d42f(0x183),'path':a1_0x52d42f(0x199),'summary':'获取数据集详情','whenToUse':'需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','pathParams':[],'queryParams':[{'name':'code','description':a1_0x52d42f(0x1b5)}],'bodySchema':a1_0x52d42f(0x1d3),'responseHighlights':[a1_0x52d42f(0x167),a1_0x52d42f(0x173)],'examples':[a1_0x52d42f(0x19a)],'notes':[a1_0x52d42f(0x190)],'markdown':[a1_0x52d42f(0x1b9),'',a1_0x52d42f(0x1c0)][a1_0x52d42f(0x188)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x52d42f(0x1a5),'title':a1_0x52d42f(0x16e),'method':a1_0x52d42f(0x1c2),'path':a1_0x52d42f(0x17b),'summary':a1_0x52d42f(0x181),'whenToUse':'需要携带\x20where、orderBy、分页等条件读取业务数据时使用','pathParams':[{'name':a1_0x52d42f(0x182),'description':a1_0x52d42f(0x1c6)},{'name':a1_0x52d42f(0x186),'description':a1_0x52d42f(0x1b5)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x1a2),'responseHighlights':[a1_0x52d42f(0x18c),a1_0x52d42f(0x1a9)],'examples':[a1_0x52d42f(0x19f)],'notes':[a1_0x52d42f(0x165)],'markdown':['##\x20Filter\x20dataset\x20data','','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x52d42f(0x188)]('\x0a')},{'code':'dataset_data_aggregate','category':'dataset','title':a1_0x52d42f(0x1c1),'method':a1_0x52d42f(0x1c2),'path':a1_0x52d42f(0x18a),'summary':a1_0x52d42f(0x166),'whenToUse':a1_0x52d42f(0x1ab),'pathParams':[{'name':a1_0x52d42f(0x182),'description':a1_0x52d42f(0x1c6)},{'name':'datasetCode','description':a1_0x52d42f(0x1b5)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x19e),'responseHighlights':[a1_0x52d42f(0x184),a1_0x52d42f(0x17f)],'examples':[a1_0x52d42f(0x162)],'notes':[a1_0x52d42f(0x174),a1_0x52d42f(0x163)],'markdown':[a1_0x52d42f(0x1a8),'',a1_0x52d42f(0x185)][a1_0x52d42f(0x188)]('\x0a')},{'code':a1_0x52d42f(0x1d1),'category':a1_0x52d42f(0x1a5),'title':'Get\x20one\x20dataset\x20record','method':a1_0x52d42f(0x1c2),'path':a1_0x52d42f(0x1b4),'summary':a1_0x52d42f(0x1b2),'whenToUse':a1_0x52d42f(0x18e),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x52d42f(0x186),'description':a1_0x52d42f(0x1b5)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x1c4),'responseHighlights':[a1_0x52d42f(0x1a4)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':'dataset_data_create','category':a1_0x52d42f(0x1a5),'title':'Create\x20dataset\x20record','method':'POST','path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x52d42f(0x161),'whenToUse':a1_0x52d42f(0x1d2),'pathParams':[{'name':'appCode','description':a1_0x52d42f(0x1c6)},{'name':a1_0x52d42f(0x186),'description':a1_0x52d42f(0x1b5)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x198),'responseHighlights':[a1_0x52d42f(0x1c9)],'examples':[a1_0x52d42f(0x1cc)],'notes':[a1_0x52d42f(0x17e)],'markdown':a1_0x52d42f(0x169)},{'code':a1_0x52d42f(0x177),'category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':a1_0x52d42f(0x183),'path':a1_0x52d42f(0x180),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x52d42f(0x1bc),'pathParams':[{'name':a1_0x52d42f(0x182),'description':a1_0x52d42f(0x1c6)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x1d3),'responseHighlights':[a1_0x52d42f(0x1a1)],'examples':[a1_0x52d42f(0x179)],'notes':[a1_0x52d42f(0x16c)],'markdown':a1_0x52d42f(0x18d)},{'code':a1_0x52d42f(0x1a0),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x52d42f(0x1c2),'path':'/api/endpoint/{appCode}/{scriptName}','summary':a1_0x52d42f(0x1b6),'whenToUse':a1_0x52d42f(0x1ac),'pathParams':[{'name':'appCode','description':a1_0x52d42f(0x1c6)},{'name':a1_0x52d42f(0x194),'description':a1_0x52d42f(0x16b)}],'queryParams':[],'bodySchema':a1_0x52d42f(0x1ba),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x52d42f(0x1a3)],'markdown':a1_0x52d42f(0x1b1)},{'code':a1_0x52d42f(0x1b3),'category':a1_0x52d42f(0x1ce),'title':a1_0x52d42f(0x1ae),'method':a1_0x52d42f(0x1c2),'path':a1_0x52d42f(0x176),'summary':'执行自定义\x20SQL','whenToUse':a1_0x52d42f(0x178),'pathParams':[],'queryParams':[],'bodySchema':a1_0x52d42f(0x1bb),'responseHighlights':[a1_0x52d42f(0x18f)],'examples':[a1_0x52d42f(0x1be)],'notes':[a1_0x52d42f(0x19c)],'markdown':a1_0x52d42f(0x1a6)}];function entrySummary(_0x2e7413){const _0x473a7c=a1_0x52d42f;return{'code':_0x2e7413['code'],'category':_0x2e7413[_0x473a7c(0x1ca)],'method':_0x2e7413[_0x473a7c(0x1c7)],'path':_0x2e7413['path'],'summary':_0x2e7413[_0x473a7c(0x18b)],'whenToUse':_0x2e7413[_0x473a7c(0x1cd)]};}export function listApiDocEntries(_0x193ea0={}){const _0x3dbfa0=a1_0x52d42f,_0x34c9a3=String(_0x193ea0[_0x3dbfa0(0x1ca)]||'')[_0x3dbfa0(0x160)](),_0x1c3b12=String(_0x193ea0[_0x3dbfa0(0x172)]||'')['trim']()['toLowerCase']();return DOCS[_0x3dbfa0(0x1bf)](_0x3d7c5f=>{const _0x2c4711=_0x3dbfa0;if(_0x34c9a3&&_0x3d7c5f[_0x2c4711(0x1ca)]!==_0x34c9a3)return![];if(!_0x1c3b12)return!![];return[_0x3d7c5f[_0x2c4711(0x168)],_0x3d7c5f[_0x2c4711(0x1ca)],_0x3d7c5f['method'],_0x3d7c5f['path'],_0x3d7c5f[_0x2c4711(0x18b)],_0x3d7c5f[_0x2c4711(0x1cd)],_0x3d7c5f[_0x2c4711(0x164)]][_0x2c4711(0x188)]('\x20')[_0x2c4711(0x1af)]()[_0x2c4711(0x17c)](_0x1c3b12);})['map'](entrySummary);}export function getApiDocDetail(_0x51f3a3){const _0x99640f=a1_0x52d42f,_0x3b5c91=DOCS[_0x99640f(0x19b)](_0x5253b0=>_0x5253b0['code']===_0x51f3a3);if(!_0x3b5c91)throw CliErrors[_0x99640f(0x195)](_0x99640f(0x19d)+_0x51f3a3);return{..._0x3b5c91};}const apiDocList={'service':a1_0x52d42f(0x1d0),'command':a1_0x52d42f(0x1c8),'description':a1_0x52d42f(0x1aa),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x6b6323){const _0x3c850e=a1_0x52d42f,_0x5bb4c1=listApiDocEntries({'category':_0x6b6323[_0x3c850e(0x1bd)](_0x3c850e(0x1ca)),'keyword':_0x6b6323[_0x3c850e(0x1bd)]('keyword')});return{'ok':!![],'data':{'total':_0x5bb4c1['length'],'items':_0x5bb4c1}};}},apiDocDetail={'service':a1_0x52d42f(0x1d0),'command':a1_0x52d42f(0x192),'description':a1_0x52d42f(0x193),'risk':a1_0x52d42f(0x17d),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x4b8ac7){const _0x21f077=a1_0x52d42f;return{'ok':!![],'data':getApiDocDetail(_0x4b8ac7['str'](_0x21f077(0x168)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ function a1_0x4191(){const _0x2fc06b=['需要向指定数据集新增一条业务数据时使用','validation','/api/endpoint/{appCode}/{scriptName}','str','dataset','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','查询单条数据','list','1555128TSUmpF','/api/dataset/getOneByCode?code={datasetCode}','Execute\x20BF\x20endpoint\x20function','code','{\x22id\x22:123}','toLowerCase','/api/{appCode}/{datasetCode}/getOne','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','read','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','length','32-character\x20dataset\x20code','获取数据集详情','api-doc','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','{\x22param\x22:\x22value\x22}','GET','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','POST','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','string','dataset_data_get_one','List\x20BF\x20endpoint\x20functions','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','Dataset\x20detail','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','聚合查询数据集数据','472040kmARly','执行指定\x20BF\x20函数','result\x20rows\x20contain\x20aggregate\x20aliases','1749576HiWmMO','title','dataset_data_aggregate','Returns\x20SQL\x20execution\x20payload','trim','15NfunJd','datasetCode','bf_execute','1333904fkXGCd','dataset_data_filter','dataset_detail','whenToUse','filter','API\x20doc\x20code\x20not\x20found:\x20','join','创建数据','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','1396192itUiBC','1Jlgorm','appCode','/api/{appCode}/{datasetCode}/aggregate','{\x22fieldName\x22:\x22value\x22}','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','fields/properties\x20describe\x20data\x20shape','##\x20List\x20datasets','custom_sql','获取应用下可调用的\x20BF\x20函数列表','category','List\x20available\x20runtime\x20API\x20documentation\x20entries','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','method','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','/api/endpoint/{appCode}/functions','List\x20datasets','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','Aggregate\x20dataset\x20data','tableData\x20contains\x20records','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','8118531MiKfeX','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','paging.totalCount\x20gives\x20total\x20rows','716118sGrxvx','dataset_list','find','/api/{appCode}/{datasetCode}/filter','scriptName','35hxqtFN','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','Endpoint\x20function\x20name','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','map','path','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','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','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Current\x20app\x20code','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','条件过滤查询数据','tableData\x20contains\x20dataset\x20id/code/name','Returns\x20one\x20matching\x20business\x20record','Create\x20dataset\x20record','paging\x20contains\x20pagination','##\x20Dataset\x20detail','summary','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','keyword','/api/custom/executeSql'];a1_0x4191=function(){return _0x2fc06b;};return a1_0x4191();}const a1_0x1f3e0f=a1_0x21de;(function(_0x26ccc1,_0x68a4b){const _0xeb741a=a1_0x21de,_0x2ea71d=_0x26ccc1();while(!![]){try{const _0x43e7dc=parseInt(_0xeb741a(0x9f))/0x1*(parseInt(_0xeb741a(0xb6))/0x2)+-parseInt(_0xeb741a(0x8d))/0x3+-parseInt(_0xeb741a(0x95))/0x4+parseInt(_0xeb741a(0x92))/0x5*(-parseInt(_0xeb741a(0xdd))/0x6)+-parseInt(_0xeb741a(0xbb))/0x7*(-parseInt(_0xeb741a(0x9e))/0x8)+parseInt(_0xeb741a(0xb3))/0x9+parseInt(_0xeb741a(0x8a))/0xa;if(_0x43e7dc===_0x68a4b)break;else _0x2ea71d['push'](_0x2ea71d['shift']());}catch(_0x1123c4){_0x2ea71d['push'](_0x2ea71d['shift']());}}}(a1_0x4191,0x7694e));import{CliErrors}from'../../errors.js';function a1_0x21de(_0x3758ab,_0x2191cf){_0x3758ab=_0x3758ab-0x6e;const _0x419139=a1_0x4191();let _0x21dea2=_0x419139[_0x3758ab];return _0x21dea2;}const CATEGORY_FLAG={'name':a1_0x1f3e0f(0xa8),'type':a1_0x1f3e0f(0x82),'description':a1_0x1f3e0f(0xda)},KEYWORD_FLAG={'name':a1_0x1f3e0f(0xd3),'type':a1_0x1f3e0f(0x82),'description':a1_0x1f3e0f(0x7a)},DOC_CODE_FLAG={'name':a1_0x1f3e0f(0x6f),'type':a1_0x1f3e0f(0x82),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':a1_0x1f3e0f(0xb7),'category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0xae),'method':a1_0x1f3e0f(0x7f),'path':'/api/dataset/get-dataset-list-by-app-code','summary':'分页获取数据集列表','whenToUse':a1_0x1f3e0f(0x7e),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xbf),'responseHighlights':[a1_0x1f3e0f(0xca),a1_0x1f3e0f(0xb5)],'examples':[a1_0x1f3e0f(0x88)],'notes':[a1_0x1f3e0f(0xb2)],'markdown':[a1_0x1f3e0f(0xa5),'',a1_0x1f3e0f(0xc8)][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x97),'category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0x86),'method':a1_0x1f3e0f(0x7d),'path':a1_0x1f3e0f(0xde),'summary':a1_0x1f3e0f(0x78),'whenToUse':a1_0x1f3e0f(0x73),'pathParams':[],'queryParams':[{'name':a1_0x1f3e0f(0x6f),'description':a1_0x1f3e0f(0x77)}],'bodySchema':'None','responseHighlights':[a1_0x1f3e0f(0xa4),'operations\x20describes\x20runtime\x20APIs'],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x1f3e0f(0x81)],'markdown':[a1_0x1f3e0f(0xce),'','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x96),'category':'dataset','title':'Filter\x20dataset\x20data','method':'POST','path':a1_0x1f3e0f(0xb9),'summary':a1_0x1f3e0f(0xc9),'whenToUse':'需要携带\x20where、orderBy、分页等条件读取业务数据时使用','pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)},{'name':'datasetCode','description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xc6),'responseHighlights':[a1_0x1f3e0f(0xb1),a1_0x1f3e0f(0xcd)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27'],'notes':[a1_0x1f3e0f(0xd1)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x1f3e0f(0xaf)]['join']('\x0a')},{'code':a1_0x1f3e0f(0x8f),'category':'dataset','title':a1_0x1f3e0f(0xb0),'method':a1_0x1f3e0f(0x7f),'path':a1_0x1f3e0f(0xa1),'summary':a1_0x1f3e0f(0x89),'whenToUse':a1_0x1f3e0f(0x9d),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0x93),'description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x1f3e0f(0x8c),'where\x20filters\x20before\x20aggregation'],'examples':[a1_0x1f3e0f(0xc3)],'notes':[a1_0x1f3e0f(0xac),a1_0x1f3e0f(0x7b)],'markdown':['##\x20Aggregate\x20dataset\x20data','','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x1f3e0f(0x9b)]('\x0a')},{'code':a1_0x1f3e0f(0x83),'category':'dataset','title':'Get\x20one\x20dataset\x20record','method':'POST','path':a1_0x1f3e0f(0x72),'summary':a1_0x1f3e0f(0xdb),'whenToUse':a1_0x1f3e0f(0x87),'pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)},{'name':'datasetCode','description':a1_0x1f3e0f(0x77)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x70),'responseHighlights':[a1_0x1f3e0f(0xcb)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x1f3e0f(0xaa)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':'dataset_data_create','category':a1_0x1f3e0f(0xd9),'title':a1_0x1f3e0f(0xcc),'method':'POST','path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x1f3e0f(0x9c),'whenToUse':a1_0x1f3e0f(0xd5),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0x93),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0xa2),'responseHighlights':[a1_0x1f3e0f(0x75)],'examples':[a1_0x1f3e0f(0xbe)],'notes':[a1_0x1f3e0f(0xd0)],'markdown':a1_0x1f3e0f(0xc4)},{'code':'bf_function_list','category':'bf','title':a1_0x1f3e0f(0x84),'method':a1_0x1f3e0f(0x7d),'path':a1_0x1f3e0f(0xad),'summary':a1_0x1f3e0f(0xa7),'whenToUse':'需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','pathParams':[{'name':a1_0x1f3e0f(0xa0),'description':a1_0x1f3e0f(0xc5)}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x1f3e0f(0xbc)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x1f3e0f(0x94),'category':'bf','title':a1_0x1f3e0f(0x6e),'method':a1_0x1f3e0f(0x7f),'path':a1_0x1f3e0f(0xd7),'summary':a1_0x1f3e0f(0x8b),'whenToUse':a1_0x1f3e0f(0xa3),'pathParams':[{'name':'appCode','description':a1_0x1f3e0f(0xc5)},{'name':a1_0x1f3e0f(0xba),'description':a1_0x1f3e0f(0xbd)}],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x7c),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x1f3e0f(0x85)],'notes':[a1_0x1f3e0f(0xd2)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x1f3e0f(0xa6),'title':'Execute\x20custom\x20SQL','method':'POST','path':a1_0x1f3e0f(0xd4),'summary':'执行自定义\x20SQL','whenToUse':a1_0x1f3e0f(0xc2),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1f3e0f(0x80),'responseHighlights':[a1_0x1f3e0f(0x90)],'examples':[a1_0x1f3e0f(0xb4)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x1f3e0f(0xc7)}];function entrySummary(_0x2f0d42){const _0x237d3e=a1_0x1f3e0f;return{'code':_0x2f0d42[_0x237d3e(0x6f)],'category':_0x2f0d42[_0x237d3e(0xa8)],'method':_0x2f0d42['method'],'path':_0x2f0d42['path'],'summary':_0x2f0d42['summary'],'whenToUse':_0x2f0d42[_0x237d3e(0x98)]};}export function listApiDocEntries(_0x9ea4b3={}){const _0x8e1641=a1_0x1f3e0f,_0x122d3e=String(_0x9ea4b3[_0x8e1641(0xa8)]||'')[_0x8e1641(0x91)](),_0x2106c5=String(_0x9ea4b3['keyword']||'')['trim']()[_0x8e1641(0x71)]();return DOCS[_0x8e1641(0x99)](_0x11bcad=>{const _0x587229=_0x8e1641;if(_0x122d3e&&_0x11bcad['category']!==_0x122d3e)return![];if(!_0x2106c5)return!![];return[_0x11bcad[_0x587229(0x6f)],_0x11bcad[_0x587229(0xa8)],_0x11bcad[_0x587229(0xab)],_0x11bcad[_0x587229(0xc1)],_0x11bcad[_0x587229(0xcf)],_0x11bcad['whenToUse'],_0x11bcad[_0x587229(0x8e)]][_0x587229(0x9b)]('\x20')[_0x587229(0x71)]()['includes'](_0x2106c5);})[_0x8e1641(0xc0)](entrySummary);}export function getApiDocDetail(_0x1ddc24){const _0x546235=a1_0x1f3e0f,_0x1fac25=DOCS[_0x546235(0xb8)](_0x34a263=>_0x34a263['code']===_0x1ddc24);if(!_0x1fac25)throw CliErrors[_0x546235(0xd6)](_0x546235(0x9a)+_0x1ddc24);return{..._0x1fac25};}const apiDocList={'service':'api-doc','command':a1_0x1f3e0f(0xdc),'description':a1_0x1f3e0f(0xa9),'risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x46fdda){const _0x4e976c=a1_0x1f3e0f,_0x283903=listApiDocEntries({'category':_0x46fdda[_0x4e976c(0xd8)](_0x4e976c(0xa8)),'keyword':_0x46fdda['str'](_0x4e976c(0xd3))});return{'ok':!![],'data':{'total':_0x283903[_0x4e976c(0x76)],'items':_0x283903}};}},apiDocDetail={'service':a1_0x1f3e0f(0x79),'command':'detail','description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0x1f3e0f(0x74),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x8a3e22){const _0x2a34f1=a1_0x1f3e0f;return{'ok':!![],'data':getApiDocDetail(_0x8a3e22[_0x2a34f1(0xd8)](_0x2a34f1(0x6f)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x5dc696,_0x48f0c5){const _0xc3641c=a2_0x207c,_0x98eb4c=_0x5dc696();while(!![]){try{const _0x3d8317=-parseInt(_0xc3641c(0x1fa))/0x1+parseInt(_0xc3641c(0x1ee))/0x2+parseInt(_0xc3641c(0x1f5))/0x3*(-parseInt(_0xc3641c(0x203))/0x4)+parseInt(_0xc3641c(0x204))/0x5+parseInt(_0xc3641c(0x1fc))/0x6*(-parseInt(_0xc3641c(0x1f4))/0x7)+parseInt(_0xc3641c(0x209))/0x8+-parseInt(_0xc3641c(0x1f2))/0x9*(parseInt(_0xc3641c(0x1f8))/0xa);if(_0x3d8317===_0x48f0c5)break;else _0x98eb4c['push'](_0x98eb4c['shift']());}catch(_0x21688b){_0x98eb4c['push'](_0x98eb4c['shift']());}}}(a2_0x3167,0xc8c54));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_0x3167(){const _0x1adf16=['11474424MPviyy','.tmp','ak_','isArray','2038900WjRYaX','appCode','parse','sha256','6687XzcFSK','trim','7IcOqSB','68427veQhWv','homeDirName','items','12230zBAIBn','digest','721811AiUusx','utf8','6982314SRkbke','EXDEV','update','code','EACCES','slice','unknown','4ObuORW','5928155CkIrra','my-apps.json','EPERM','stringify','find'];a2_0x3167=function(){return _0x1adf16;};return a2_0x3167();}import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x57d6c6){const _0x45ac01=a2_0x207c,_0x4c7e4a=_0x57d6c6['trim'](),_0x5ec1b9=_0x4c7e4a['slice'](-0x6)||_0x45ac01(0x202),_0x51c446=createHash(_0x45ac01(0x1f1))[_0x45ac01(0x1fe)](_0x4c7e4a)[_0x45ac01(0x1f9)]('hex')[_0x45ac01(0x201)](0x0,0xc);return _0x45ac01(0x1ec)+_0x5ec1b9+'_'+_0x51c446;}export function getAppCacheFilePath(_0x5e5bed,_0x299833){const _0x1feeaf=a2_0x207c;return resolve(homedir(),PRODUCT_CONFIG[_0x1feeaf(0x1f6)],'cache',_0x5e5bed,fingerprintAccessKey(_0x299833),_0x1feeaf(0x205));}export function readCachedAppList(_0x2a4e64,_0xcc55ef){const _0x5af930=a2_0x207c;if(!_0xcc55ef?.[_0x5af930(0x1f3)]())return null;const _0x48ce8c=getAppCacheFilePath(_0x2a4e64,_0xcc55ef);if(!existsSync(_0x48ce8c))return null;try{const _0x5e1598=readFileSync(_0x48ce8c,_0x5af930(0x1fb));if(!_0x5e1598['trim']())return null;const _0x5a3ebb=JSON[_0x5af930(0x1f0)](_0x5e1598);if(!Array[_0x5af930(0x1ed)](_0x5a3ebb[_0x5af930(0x1f7)]))return null;return _0x5a3ebb;}catch{return null;}}function a2_0x207c(_0x2d97bb,_0x543592){_0x2d97bb=_0x2d97bb-0x1ec;const _0x31675d=a2_0x3167();let _0x207c1e=_0x31675d[_0x2d97bb];return _0x207c1e;}export function writeCachedAppList(_0x39d3b0,_0xe35e6a,_0x10d702){const _0x938163=a2_0x207c,_0x5be2e3=getAppCacheFilePath(_0x39d3b0,_0xe35e6a),_0x593f4f=dirname(_0x5be2e3);!existsSync(_0x593f4f)&&mkdirSync(_0x593f4f,{'recursive':!![]});const _0x43033f=_0x5be2e3+_0x938163(0x20a);try{writeFileSync(_0x43033f,JSON[_0x938163(0x207)](_0x10d702,null,0x2)+'\x0a',{'encoding':_0x938163(0x1fb),'mode':0x180});try{renameSync(_0x43033f,_0x5be2e3);}catch(_0x3f72ea){if(_0x3f72ea[_0x938163(0x1ff)]===_0x938163(0x206)||_0x3f72ea[_0x938163(0x1ff)]===_0x938163(0x1fd)||_0x3f72ea['code']===_0x938163(0x200)){writeFileSync(_0x5be2e3,JSON[_0x938163(0x207)](_0x10d702,null,0x2)+'\x0a',{'encoding':_0x938163(0x1fb)});try{unlinkSync(_0x43033f);}catch{}}else throw _0x3f72ea;}}catch(_0x457b3d){try{unlinkSync(_0x43033f);}catch{}throw _0x457b3d;}return _0x5be2e3;}export function resolveCachedAppCode(_0x1eaad5,_0x577560,_0x5201ab){const _0x43065c=a2_0x207c;if(!_0x1eaad5)return undefined;const _0x550d21=readCachedAppList(_0x577560,_0x5201ab),_0x1db933=_0x550d21?.[_0x43065c(0x1f7)][_0x43065c(0x208)](_0x451065=>_0x451065['appName']===_0x1eaad5&&isRuntimeAccessibleApp(_0x451065));return _0x1db933?.[_0x43065c(0x1ef)]?.[_0x43065c(0x1f3)]()||undefined;}
1
+ (function(_0x40025f,_0x1c08a7){const _0x59ea02=a2_0x120a,_0x38d06f=_0x40025f();while(!![]){try{const _0x38b141=parseInt(_0x59ea02(0x73))/0x1*(parseInt(_0x59ea02(0x71))/0x2)+-parseInt(_0x59ea02(0x77))/0x3*(-parseInt(_0x59ea02(0x82))/0x4)+parseInt(_0x59ea02(0x69))/0x5+parseInt(_0x59ea02(0x7a))/0x6+-parseInt(_0x59ea02(0x72))/0x7*(parseInt(_0x59ea02(0x7e))/0x8)+parseInt(_0x59ea02(0x6a))/0x9+-parseInt(_0x59ea02(0x75))/0xa;if(_0x38b141===_0x1c08a7)break;else _0x38d06f['push'](_0x38d06f['shift']());}catch(_0x5a94f7){_0x38d06f['push'](_0x38d06f['shift']());}}}(a2_0x3484,0x5358e));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_0x120a(_0x44b471,_0x1b9af1){_0x44b471=_0x44b471-0x68;const _0x348475=a2_0x3484();let _0x120a3b=_0x348475[_0x44b471];return _0x120a3b;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x17c659){const _0x57eaf7=a2_0x120a,_0x4d38ad=_0x17c659[_0x57eaf7(0x80)](),_0x2e565b=_0x4d38ad['slice'](-0x6)||'unknown',_0x1bb2ec=createHash(_0x57eaf7(0x6d))[_0x57eaf7(0x6b)](_0x4d38ad)[_0x57eaf7(0x76)](_0x57eaf7(0x7c))[_0x57eaf7(0x74)](0x0,0xc);return _0x57eaf7(0x6c)+_0x2e565b+'_'+_0x1bb2ec;}export function getAppCacheFilePath(_0x2ebe28,_0x4d4edb){const _0x43767a=a2_0x120a;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x43767a(0x78),_0x2ebe28,fingerprintAccessKey(_0x4d4edb),'my-apps.json');}export function readCachedAppList(_0x300533,_0x309b78){const _0x31fe12=a2_0x120a;if(!_0x309b78?.[_0x31fe12(0x80)]())return null;const _0x577f75=getAppCacheFilePath(_0x300533,_0x309b78);if(!existsSync(_0x577f75))return null;try{const _0x2167d5=readFileSync(_0x577f75,_0x31fe12(0x6f));if(!_0x2167d5[_0x31fe12(0x80)]())return null;const _0x28d5b1=JSON['parse'](_0x2167d5);if(!Array[_0x31fe12(0x7b)](_0x28d5b1[_0x31fe12(0x68)]))return null;return _0x28d5b1;}catch{return null;}}function a2_0x3484(){const _0xaa8e2e=['digest','32358rLrPHt','cache','find','2015874uqMwmP','isArray','hex','stringify','2232jNeCnd','EPERM','trim','.tmp','232REsMxy','appName','code','items','433450woaGCY','2837655wjojnT','update','ak_','sha256','appCode','utf8','EACCES','2502DdclNj','12817iQoJsh','110onChup','slice','6489230ZxSWwv'];a2_0x3484=function(){return _0xaa8e2e;};return a2_0x3484();}export function writeCachedAppList(_0x1988a6,_0x2ab2ae,_0x282aa0){const _0x3b65cd=a2_0x120a,_0x5a5da1=getAppCacheFilePath(_0x1988a6,_0x2ab2ae),_0x27a815=dirname(_0x5a5da1);!existsSync(_0x27a815)&&mkdirSync(_0x27a815,{'recursive':!![]});const _0x3b1a90=_0x5a5da1+_0x3b65cd(0x81);try{writeFileSync(_0x3b1a90,JSON['stringify'](_0x282aa0,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3b1a90,_0x5a5da1);}catch(_0x1b3c56){if(_0x1b3c56['code']===_0x3b65cd(0x7f)||_0x1b3c56[_0x3b65cd(0x84)]==='EXDEV'||_0x1b3c56['code']===_0x3b65cd(0x70)){writeFileSync(_0x5a5da1,JSON[_0x3b65cd(0x7d)](_0x282aa0,null,0x2)+'\x0a',{'encoding':_0x3b65cd(0x6f)});try{unlinkSync(_0x3b1a90);}catch{}}else throw _0x1b3c56;}}catch(_0xa57669){try{unlinkSync(_0x3b1a90);}catch{}throw _0xa57669;}return _0x5a5da1;}export function resolveCachedAppCode(_0x357185,_0x6eaa48,_0x27d85d){const _0x108af4=a2_0x120a;if(!_0x357185)return undefined;const _0x49664f=readCachedAppList(_0x6eaa48,_0x27d85d),_0x5b06ff=_0x49664f?.[_0x108af4(0x68)][_0x108af4(0x79)](_0x17f08e=>_0x17f08e[_0x108af4(0x83)]===_0x357185&&isRuntimeAccessibleApp(_0x17f08e));return _0x5b06ff?.[_0x108af4(0x6e)]?.['trim']()||undefined;}
@@ -1 +1 @@
1
- const a3_0x20eea3=a3_0x54ae;function a3_0x54ae(_0x10a744,_0x4a6443){_0x10a744=_0x10a744-0xc7;const _0x1ffb64=a3_0x1ffb();let _0x54ae70=_0x1ffb64[_0x10a744];return _0x54ae70;}(function(_0x5a752e,_0x5b6ce1){const _0x5b7cec=a3_0x54ae,_0x2c96fc=_0x5a752e();while(!![]){try{const _0x2c7bfd=parseInt(_0x5b7cec(0xda))/0x1*(-parseInt(_0x5b7cec(0xe2))/0x2)+-parseInt(_0x5b7cec(0xf2))/0x3+parseInt(_0x5b7cec(0xf3))/0x4*(parseInt(_0x5b7cec(0x10a))/0x5)+-parseInt(_0x5b7cec(0xf1))/0x6+-parseInt(_0x5b7cec(0xef))/0x7+parseInt(_0x5b7cec(0xcb))/0x8*(-parseInt(_0x5b7cec(0xd1))/0x9)+parseInt(_0x5b7cec(0xec))/0xa*(parseInt(_0x5b7cec(0x115))/0xb);if(_0x2c7bfd===_0x5b6ce1)break;else _0x2c96fc['push'](_0x2c96fc['shift']());}catch(_0x323125){_0x2c96fc['push'](_0x2c96fc['shift']());}}}(a3_0x1ffb,0x9d8a7));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_0x1ffb(){const _0x571400=['remote','str','\x20app(s)\x20for\x20env=\x22','appcode','\x20is\x20deprecated.\x20Use\x20`','nonInteractive','fetchedAt','No\x20apps\x20found\x20on\x20the\x20platform.','pull','Remote\x20app\x20name\x20to\x20activate','cachePath','production','\x20cached\x20app(s)\x20for\x20env=\x22','validation','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','warn','.appcode\x20to\x20.lovrabet.json.','filter','projectPath','local','Missing\x20app\x20name.','10HfuNsT','accessKey','isArray','cache','find','read','langs','import','app','appName','enableI18n','26767609aJDugq','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','write','map','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','bool','Read\x20from\x20local\x20cache\x20only','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Usage:\x20','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','init','No\x20cached\x20apps\x20found.','source','string','64lkGvWs','isCurrent','type','Default\x20app\x20candidate\x20set\x20to\x20\x22','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','1128213xMcTTB','items','\x20app\x20use\x20<name>\x20[--global]','push','entries','Use\x20global\x20config\x20scope','trim','include-unpublished','defaultApp','777zBLBqN','\x22\x20not\x20found.','../../context.js','env','from','App\x20\x22','no-cache','name','780MiWCzb','global','Loaded\x20','envName','project-default','boolean','config','appCode','mergedCli','length','10gXjSWI','globalPath','../../commands/app/remote-source.js','6226381JZmZmf','Available\x20remote\x20apps:\x20','3118758LmAfHi','677778QxlCAZ','2305912kKgOLo'];a3_0x1ffb=function(){return _0x571400;};return a3_0x1ffb();}const GLOBAL_FLAG={'name':a3_0x20eea3(0xe3),'type':a3_0x20eea3(0xe7),'description':a3_0x20eea3(0xd6),'default':![]};function collectFlags(_0x310a63,_0x127075){const _0x243947=a3_0x20eea3,_0x44ca25={};for(const _0x50180b of _0x127075){const _0x465fbd=_0x50180b[_0x243947(0xcd)]===_0x243947(0xe7)?_0x310a63[_0x243947(0x11b)](_0x50180b[_0x243947(0xe1)]):_0x310a63['str'](_0x50180b['name']);if(_0x465fbd!==''&&_0x465fbd!==![])_0x44ca25[_0x50180b['name']]=_0x465fbd;}if(_0x310a63[_0x243947(0xf9)])_0x44ca25[_0x243947(0xf9)]=!![];return _0x44ca25;}function normalizeLanguages(_0x2fe396){const _0x2edb4d=a3_0x20eea3;if(!Array[_0x2edb4d(0x10c)](_0x2fe396))return[];return _0x2fe396['filter'](_0x37c646=>typeof _0x37c646===_0x2edb4d(0xca))[_0x2edb4d(0x119)](_0xa772d8=>_0xa772d8[_0x2edb4d(0xd7)]())[_0x2edb4d(0x106)](Boolean);}function buildRemoteAppI18nFields(_0x5bfe27){const _0x2adeee=a3_0x20eea3,_0x1e2593=normalizeLanguages(_0x5bfe27['i18nInfo']?.[_0x2adeee(0x110)]);return{'enableI18n':typeof _0x5bfe27[_0x2adeee(0x114)]===_0x2adeee(0xe7)?_0x5bfe27[_0x2adeee(0x114)]:null,'languages':_0x1e2593,'i18nInfo':_0x5bfe27['i18nInfo']?{..._0x5bfe27['i18nInfo'],'langs':_0x1e2593[_0x2adeee(0xeb)]?_0x1e2593:null}:null};}const initDef={'service':a3_0x20eea3(0x112),'command':a3_0x20eea3(0xc7),'description':a3_0x20eea3(0x103),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0xf5af71){const _0x28debb=a3_0x20eea3;return warnDeprecatedAppCommand(_0x28debb(0xc7),CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]'),await runInit(collectFlags(_0xf5af71,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':'list','description':a3_0x20eea3(0x116),'risk':a3_0x20eea3(0x10f),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x20eea3(0xdd),'type':'string','description':a3_0x20eea3(0x11d),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x20eea3(0xe7),'description':a3_0x20eea3(0xd0),'default':![]},{'name':a3_0x20eea3(0xe0),'type':a3_0x20eea3(0xe7),'description':a3_0x20eea3(0x117),'default':![]},{'name':'include-unpublished','type':a3_0x20eea3(0xe7),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x439b14){const _0x5704f8=a3_0x20eea3,_0xc669fc=_0x439b14[_0x5704f8(0xf5)](_0x5704f8(0xdd))||_0x439b14[_0x5704f8(0xe5)]||getEnv()||_0x5704f8(0xff),_0x2894db=_0x439b14['bool']('local'),_0x4ecc0c=_0x439b14[_0x5704f8(0x11b)](_0x5704f8(0xe0)),_0x1a859f=_0x439b14[_0x5704f8(0x11b)](_0x5704f8(0xd8)),{readRawConfigWithLayers:_0x498438,resolveDefaultAppSource:_0x2f5de8,getLocalAppAliases:_0x4cf038}=await import('../../context.js'),{getRemoteAppList:_0x34d0be}=await import(_0x5704f8(0xee)),{config:_0x154f49,layers:_0x30795e}=_0x498438(),_0x10ea62=_0x2f5de8(_0x30795e),{defaultApp:_0x34c56d}=_0x154f49,_0x1cc1ef=await _0x34d0be({'env':_0xc669fc,'accessKey':_0x439b14[_0x5704f8(0x10b)],'localOnly':_0x2894db,'noCache':_0x4ecc0c}),_0x3e136e=_0x1a859f?_0x1cc1ef[_0x5704f8(0xd2)]:filterRuntimeAccessibleApps(_0x1cc1ef[_0x5704f8(0xd2)]),_0x4458fd=_0x1cc1ef[_0x5704f8(0xd2)][_0x5704f8(0xeb)]-_0x3e136e[_0x5704f8(0xeb)],_0x5362e5=_0x3e136e['map'](_0x3ad58d=>{const _0x48473d=_0x5704f8;return{'name':_0x3ad58d[_0x48473d(0x113)],'appcode':_0x3ad58d[_0x48473d(0xe9)],'named':!![],'definedIn':_0x48473d(0xf4),'isDefault':_0x3ad58d[_0x48473d(0x113)]===_0x34c56d,...buildAppProfileListFields(_0xc669fc),...buildRemoteAppI18nFields(_0x3ad58d),'source':_0x1cc1ef[_0x48473d(0xc9)],'owner':_0x3ad58d['appOwnerName']??null,'status':_0x3ad58d['appPublishStatus']??null,'cachedAt':_0x1cc1ef[_0x48473d(0xfa)]};}),_0x137791=_0x4cf038(_0x154f49);let _0x2aeb58=0x0;for(const [_0x507139,_0x3ce2ae]of Object[_0x5704f8(0xd5)](_0x137791)){const _0x21171f=typeof _0x3ce2ae[_0x5704f8(0xf7)]==='string'?_0x3ce2ae[_0x5704f8(0xf7)]['trim']():'';if(!_0x21171f)continue;const _0x991b15=findAppByCode(_0x1cc1ef[_0x5704f8(0xd2)],_0x21171f);if(!_0x1a859f&&_0x991b15&&!isRuntimeAccessibleApp(_0x991b15))continue;_0x2aeb58+=0x1,_0x5362e5[_0x5704f8(0xd4)]({'name':_0x507139,'appcode':_0x21171f,'named':!![],'definedIn':_0x5704f8(0x108),'isDefault':_0x507139===_0x34c56d,...buildAppProfileListFields(_0xc669fc),'source':_0x5704f8(0xe8),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5362e5,_0x439b14[_0x5704f8(0xea)]);const _0x16cb47=_0x5362e5[_0x5704f8(0x10e)](_0x39ea03=>_0x39ea03[_0x5704f8(0xcc)]===!![]),_0x3d929d=_0x34c56d??_0x16cb47?.[_0x5704f8(0xe1)]??null,_0x2f4fd5={'env':_0xc669fc,'source':_0x1cc1ef[_0x5704f8(0xc9)],'fetchedAt':_0x1cc1ef[_0x5704f8(0xfa)],'cachePath':_0x1cc1ef[_0x5704f8(0xfe)],'globalPath':_0x30795e[_0x5704f8(0xed)]??null,'projectPath':_0x30795e[_0x5704f8(0x107)]??null,'defaultApp':_0x3d929d,'defaultAppSource':_0x34c56d!=null?_0x10ea62:null,'localAliasCount':_0x2aeb58,'remoteTotal':_0x1cc1ef[_0x5704f8(0xd2)][_0x5704f8(0xeb)],'hiddenUnpublishedCount':_0x4458fd,'includeUnpublished':_0x1a859f};if(_0x5362e5[_0x5704f8(0xeb)]===0x0)return{'ok':!![],'data':{'items':_0x5362e5,'meta':_0x2f4fd5},'message':_0x1cc1ef[_0x5704f8(0xc9)]===_0x5704f8(0x10d)?_0x5704f8(0xc8):_0x5704f8(0xfb)};return{'ok':!![],'data':{'items':_0x5362e5,'meta':_0x2f4fd5}};}},pullDef={'service':a3_0x20eea3(0x112),'command':a3_0x20eea3(0xfc),'description':a3_0x20eea3(0x11a),'risk':a3_0x20eea3(0x118),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x20eea3(0xdd),'type':a3_0x20eea3(0xca),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x20eea3(0x108),'type':a3_0x20eea3(0xe7),'description':a3_0x20eea3(0x11c),'default':![]},{'name':a3_0x20eea3(0xe0),'type':a3_0x20eea3(0xe7),'description':a3_0x20eea3(0x117),'default':![]}],async 'execute'(_0x3317ff){const _0x494230=a3_0x20eea3,_0x5649d9=_0x3317ff['str'](_0x494230(0xdd))||_0x3317ff[_0x494230(0xe5)]||getEnv()||_0x494230(0xff),_0x40792e=_0x3317ff['bool'](_0x494230(0x108)),_0x590642=_0x3317ff[_0x494230(0x11b)](_0x494230(0xe0)),{getRemoteAppList:_0x4b18b2}=await import(_0x494230(0xee)),_0x326cd4=await _0x4b18b2({'env':_0x5649d9,'accessKey':_0x3317ff[_0x494230(0x10b)],'localOnly':_0x40792e,'noCache':_0x590642});return{'ok':!![],'data':{'total':_0x326cd4[_0x494230(0xd2)][_0x494230(0xeb)],'env':_0x5649d9,'source':_0x326cd4['source'],'fetchedAt':_0x326cd4[_0x494230(0xfa)],'cachePath':_0x326cd4[_0x494230(0xfe)]},'message':_0x326cd4['source']===_0x494230(0x10d)?_0x494230(0xe4)+_0x326cd4[_0x494230(0xd2)][_0x494230(0xeb)]+_0x494230(0x100)+_0x5649d9+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x326cd4[_0x494230(0xd2)]['length']+_0x494230(0xf6)+_0x5649d9+'\x22.'};}},useDef={'service':a3_0x20eea3(0x112),'command':'use','description':a3_0x20eea3(0x11f),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x20eea3(0xe1),'description':a3_0x20eea3(0xfd),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x44d6e1){const _0x236b62=a3_0x20eea3;if(!_0x44d6e1['args'][0x0])throw CliErrors[_0x236b62(0x101)](_0x236b62(0x109),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x2e78d8){const _0x392fb7=a3_0x20eea3;warnDeprecatedAppCommand('use',CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]');const _0x9da030=_0x2e78d8['args'][0x0];if(!_0x9da030)throw CliErrors[_0x392fb7(0x101)]('Missing\x20app\x20name.',_0x392fb7(0x11e)+CLI_BIN_NAME+_0x392fb7(0xd3));const {buildConfigFromFlags:_0xe85a16,resolveLocalAppAliasCode:_0x4e7493}=await import(_0x392fb7(0xdc)),{readCachedAppList:_0x49861f}=await import('../../commands/app/cache.js'),_0x513d88=_0x2e78d8['str']('env'),_0x2b72f0=_0xe85a16(_0x513d88?{'env':_0x513d88}:{}),_0x48ed39=_0x49861f(_0x2b72f0[_0x392fb7(0xdd)],_0x2b72f0[_0x392fb7(0x10b)]),_0xe21b8e=_0x48ed39?.[_0x392fb7(0xd2)][_0x392fb7(0x10e)](_0x1dbb6d=>_0x1dbb6d['appName']===_0x9da030),_0x2d57eb=_0x4e7493(_0x2b72f0['raw']??{},_0x9da030);if(_0xe21b8e&&!isRuntimeAccessibleApp(_0xe21b8e))throw runtimeInaccessibleAppError(_0xe21b8e,'\x22'+_0x9da030+'\x22');if(_0x2d57eb){const _0x5cba20=_0x48ed39?.[_0x392fb7(0xd2)]['find'](_0x2635b0=>_0x2635b0[_0x392fb7(0xe9)]?.[_0x392fb7(0xd7)]()===_0x2d57eb);if(_0x5cba20&&!isRuntimeAccessibleApp(_0x5cba20))throw runtimeInaccessibleAppError(_0x5cba20,'\x22'+_0x9da030+'\x22');}if(!_0xe21b8e&&!_0x2d57eb&&_0x2b72f0[_0x392fb7(0xd9)]!==_0x9da030){const _0x5191b2=[..._0x48ed39?.[_0x392fb7(0xd2)]['map'](_0x47e3ed=>_0x47e3ed[_0x392fb7(0x113)])??[]],_0xc30dea=_0x5191b2[_0x392fb7(0xeb)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x392fb7(0x120)+_0x9da030+_0x392fb7(0x105):_0x392fb7(0xf0)+Array[_0x392fb7(0xde)](new Set(_0x5191b2))['join'](',\x20')+_0x392fb7(0xcf);throw CliErrors[_0x392fb7(0x101)](_0x392fb7(0xdf)+_0x9da030+_0x392fb7(0xdb),_0xc30dea);}const _0x3a820=_0x2e78d8[_0x392fb7(0x11b)](_0x392fb7(0xe3));let _0x3297b2;if(_0x3a820)_0x3297b2={'global':!![]};else{const {isInProject:_0x4e6a16}=await import(_0x392fb7(0xdc)),_0x3d89ba=_0x4e6a16();_0x3297b2=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x392fb7(0xe6),'inProject':_0x3d89ba}));}const _0x501b72=readConfig(_0x3297b2);return _0x501b72[_0x392fb7(0xd9)]=_0x9da030,writeConfig(_0x501b72,_0x3297b2),{'ok':!![],'message':_0x392fb7(0xce)+_0x9da030+'\x22'+scopeLabel(_0x3297b2)+'.'};}};function warnDeprecatedAppCommand(_0x502f46,_0x398603){const _0x3086d3=a3_0x20eea3;console[_0x3086d3(0x104)](CLI_BIN_NAME+'\x20app\x20'+_0x502f46+_0x3086d3(0xf8)+_0x398603+'`\x20instead.');}const importDef={'service':a3_0x20eea3(0x112),'command':a3_0x20eea3(0x111),'description':a3_0x20eea3(0x102),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0xa5ebd5){return await runInitImport(collectFlags(_0xa5ebd5,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x421e23=a3_0x4d3a;(function(_0x390462,_0x1b198f){const _0x6833d4=a3_0x4d3a,_0x341ee3=_0x390462();while(!![]){try{const _0x927a6f=-parseInt(_0x6833d4(0x1d7))/0x1*(parseInt(_0x6833d4(0x211))/0x2)+parseInt(_0x6833d4(0x205))/0x3+-parseInt(_0x6833d4(0x1dc))/0x4*(-parseInt(_0x6833d4(0x1df))/0x5)+-parseInt(_0x6833d4(0x1d0))/0x6+-parseInt(_0x6833d4(0x1ef))/0x7+parseInt(_0x6833d4(0x21a))/0x8*(-parseInt(_0x6833d4(0x1c7))/0x9)+-parseInt(_0x6833d4(0x1cb))/0xa*(-parseInt(_0x6833d4(0x1f0))/0xb);if(_0x927a6f===_0x1b198f)break;else _0x341ee3['push'](_0x341ee3['shift']());}catch(_0x235d18){_0x341ee3['push'](_0x341ee3['shift']());}}}(a3_0x4f61,0x4998b));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':a3_0x421e23(0x1ee),'type':a3_0x421e23(0x20d),'description':a3_0x421e23(0x1ec),'default':![]};function collectFlags(_0x569130,_0x1625d2){const _0xc9d03=a3_0x421e23,_0x45ff29={};for(const _0x14a847 of _0x1625d2){const _0x1a197f=_0x14a847[_0xc9d03(0x1e6)]===_0xc9d03(0x20d)?_0x569130[_0xc9d03(0x1fd)](_0x14a847['name']):_0x569130[_0xc9d03(0x1fe)](_0x14a847[_0xc9d03(0x204)]);if(_0x1a197f!==''&&_0x1a197f!==![])_0x45ff29[_0x14a847['name']]=_0x1a197f;}if(_0x569130['nonInteractive'])_0x45ff29[_0xc9d03(0x213)]=!![];return _0x45ff29;}function normalizeLanguages(_0x4d9b3b){const _0x13b02a=a3_0x421e23;if(!Array[_0x13b02a(0x1d5)](_0x4d9b3b))return[];return _0x4d9b3b[_0x13b02a(0x1f5)](_0xd540c8=>typeof _0xd540c8===_0x13b02a(0x1d3))[_0x13b02a(0x1e7)](_0x206cd7=>_0x206cd7[_0x13b02a(0x20f)]())[_0x13b02a(0x1f5)](Boolean);}function buildRemoteAppI18nFields(_0x2ddc6c){const _0x3cccc7=a3_0x421e23,_0x2cc61d=normalizeLanguages(_0x2ddc6c['i18nInfo']?.[_0x3cccc7(0x1c4)]);return{'enableI18n':typeof _0x2ddc6c[_0x3cccc7(0x215)]===_0x3cccc7(0x20d)?_0x2ddc6c[_0x3cccc7(0x215)]:null,'languages':_0x2cc61d,'i18nInfo':_0x2ddc6c[_0x3cccc7(0x1ce)]?{..._0x2ddc6c[_0x3cccc7(0x1ce)],'langs':_0x2cc61d[_0x3cccc7(0x1f9)]?_0x2cc61d:null}:null};}function a3_0x4f61(){const _0x3cf326=['find','appCode','type','map','list','validation','raw','args','Use\x20global\x20config\x20scope','entries','global','419713DkdXOP','187TqqGtY','Loaded\x20','local','cachePath','production','filter','No\x20apps\x20found\x20on\x20the\x20platform.','Remote\x20app\x20name\x20to\x20activate','No\x20cached\x20apps\x20found.','length','Refreshed\x20app\x20cache\x20with\x20','cache','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','bool','str','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appName','Target\x20environment\x20(default:\x20current\x20env)','push','../../commands/app/cache.js','name','1604148zkiAGE','\x20is\x20deprecated.\x20Use\x20`','Filter\x20by\x20environment\x20(default:\x20current\x20env)','fetchedAt','appcode','items','\x20cached\x20app(s)\x20for\x20env=\x22','from','boolean','.appcode\x20to\x20.lovrabet.json.','trim','globalPath','1198oYJKKd','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','nonInteractive','read','enableI18n','no-cache','import','defaultApp','`\x20instead.','4435448iAfErQ','\x20app\x20use\x20<name>\x20[--global]','Usage:\x20','isCurrent','langs','init','Available\x20remote\x20apps:\x20','9NJvOty','env','Default\x20app\x20candidate\x20set\x20to\x20\x22','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','563480NApRbp','\x20app(s)\x20for\x20env=\x22','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','i18nInfo','appOwnerName','2739906vEDtvj','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','app','string','Missing\x20app\x20name.','isArray','use','713drkfNG','write','accessKey','Include\x20unpublished\x20apps\x20for\x20diagnostics','project-default','4sxnrFL','source','config','1534735SxNjpk','../../context.js','projectPath','\x22\x20not\x20found.','../../commands/app/remote-source.js'];a3_0x4f61=function(){return _0x3cf326;};return a3_0x4f61();}const initDef={'service':a3_0x421e23(0x1d2),'command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x594fda){const _0x1941d5=a3_0x421e23;return warnDeprecatedAppCommand(_0x1941d5(0x1c5),CLI_BIN_NAME+_0x1941d5(0x1fc)),await runInit(collectFlags(_0x594fda,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x421e23(0x1d2),'command':a3_0x421e23(0x1e8),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x421e23(0x214),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a3_0x421e23(0x207),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x421e23(0x1f2),'type':a3_0x421e23(0x20d),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x421e23(0x20d),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]},{'name':'include-unpublished','type':'boolean','description':a3_0x421e23(0x1da),'default':![]}],async 'execute'(_0x4e0341){const _0x330333=a3_0x421e23,_0x5232c8=_0x4e0341[_0x330333(0x1fe)]('env')||_0x4e0341['envName']||getEnv()||_0x330333(0x1f4),_0x13f5be=_0x4e0341['bool'](_0x330333(0x1f2)),_0x496c34=_0x4e0341[_0x330333(0x1fd)](_0x330333(0x216)),_0x40faaf=_0x4e0341['bool']('include-unpublished'),{readRawConfigWithLayers:_0x29f7da,resolveDefaultAppSource:_0x5e416d,getLocalAppAliases:_0x200873}=await import(_0x330333(0x1e0)),{getRemoteAppList:_0xeb79da}=await import(_0x330333(0x1e3)),{config:_0x1cc404,layers:_0x514367}=_0x29f7da(),_0x703c54=_0x5e416d(_0x514367),{defaultApp:_0x72a673}=_0x1cc404,_0x360151=await _0xeb79da({'env':_0x5232c8,'accessKey':_0x4e0341[_0x330333(0x1d9)],'localOnly':_0x13f5be,'noCache':_0x496c34}),_0x29c06d=_0x40faaf?_0x360151[_0x330333(0x20a)]:filterRuntimeAccessibleApps(_0x360151[_0x330333(0x20a)]),_0x10aa86=_0x360151[_0x330333(0x20a)][_0x330333(0x1f9)]-_0x29c06d[_0x330333(0x1f9)],_0x3662a5=_0x29c06d[_0x330333(0x1e7)](_0x5ee692=>{const _0x5f5187=_0x330333;return{'name':_0x5ee692[_0x5f5187(0x200)],'appcode':_0x5ee692['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x5ee692[_0x5f5187(0x200)]===_0x72a673,...buildAppProfileListFields(_0x5232c8),...buildRemoteAppI18nFields(_0x5ee692),'source':_0x360151[_0x5f5187(0x1dd)],'owner':_0x5ee692[_0x5f5187(0x1cf)]??null,'status':_0x5ee692['appPublishStatus']??null,'cachedAt':_0x360151[_0x5f5187(0x208)]};}),_0x1c650b=_0x200873(_0x1cc404);let _0x457aa0=0x0;for(const [_0x1e9a3a,_0x41f21f]of Object[_0x330333(0x1ed)](_0x1c650b)){const _0x28f650=typeof _0x41f21f[_0x330333(0x209)]==='string'?_0x41f21f['appcode'][_0x330333(0x20f)]():'';if(!_0x28f650)continue;const _0x7828d2=findAppByCode(_0x360151[_0x330333(0x20a)],_0x28f650);if(!_0x40faaf&&_0x7828d2&&!isRuntimeAccessibleApp(_0x7828d2))continue;_0x457aa0+=0x1,_0x3662a5[_0x330333(0x202)]({'name':_0x1e9a3a,'appcode':_0x28f650,'named':!![],'definedIn':_0x330333(0x1f2),'isDefault':_0x1e9a3a===_0x72a673,...buildAppProfileListFields(_0x5232c8),'source':_0x330333(0x1de),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x3662a5,_0x4e0341['mergedCli']);const _0x4abe8b=_0x3662a5['find'](_0x452042=>_0x452042[_0x330333(0x1c3)]===!![]),_0x338f50=_0x72a673??_0x4abe8b?.[_0x330333(0x204)]??null,_0x4a746e={'env':_0x5232c8,'source':_0x360151[_0x330333(0x1dd)],'fetchedAt':_0x360151[_0x330333(0x208)],'cachePath':_0x360151[_0x330333(0x1f3)],'globalPath':_0x514367[_0x330333(0x210)]??null,'projectPath':_0x514367[_0x330333(0x1e1)]??null,'defaultApp':_0x338f50,'defaultAppSource':_0x72a673!=null?_0x703c54:null,'localAliasCount':_0x457aa0,'remoteTotal':_0x360151[_0x330333(0x20a)][_0x330333(0x1f9)],'hiddenUnpublishedCount':_0x10aa86,'includeUnpublished':_0x40faaf};if(_0x3662a5['length']===0x0)return{'ok':!![],'data':{'items':_0x3662a5,'meta':_0x4a746e},'message':_0x360151[_0x330333(0x1dd)]==='cache'?_0x330333(0x1f8):_0x330333(0x1f6)};return{'ok':!![],'data':{'items':_0x3662a5,'meta':_0x4a746e}};}},pullDef={'service':'app','command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x421e23(0x1d8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x421e23(0x1c8),'type':a3_0x421e23(0x1d3),'description':a3_0x421e23(0x201),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x421e23(0x1f2),'type':a3_0x421e23(0x20d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x421e23(0x20d),'description':a3_0x421e23(0x1cd),'default':![]}],async 'execute'(_0x2ffba4){const _0xb237a8=a3_0x421e23,_0x1409e2=_0x2ffba4[_0xb237a8(0x1fe)]('env')||_0x2ffba4['envName']||getEnv()||_0xb237a8(0x1f4),_0x5f2740=_0x2ffba4['bool'](_0xb237a8(0x1f2)),_0x49a990=_0x2ffba4[_0xb237a8(0x1fd)]('no-cache'),{getRemoteAppList:_0x3497e2}=await import(_0xb237a8(0x1e3)),_0x1f2420=await _0x3497e2({'env':_0x1409e2,'accessKey':_0x2ffba4[_0xb237a8(0x1d9)],'localOnly':_0x5f2740,'noCache':_0x49a990});return{'ok':!![],'data':{'total':_0x1f2420[_0xb237a8(0x20a)][_0xb237a8(0x1f9)],'env':_0x1409e2,'source':_0x1f2420['source'],'fetchedAt':_0x1f2420[_0xb237a8(0x208)],'cachePath':_0x1f2420['cachePath']},'message':_0x1f2420[_0xb237a8(0x1dd)]===_0xb237a8(0x1fb)?_0xb237a8(0x1f1)+_0x1f2420['items']['length']+_0xb237a8(0x20b)+_0x1409e2+'\x22.':_0xb237a8(0x1fa)+_0x1f2420[_0xb237a8(0x20a)][_0xb237a8(0x1f9)]+_0xb237a8(0x1cc)+_0x1409e2+'\x22.'};}},useDef={'service':a3_0x421e23(0x1d2),'command':a3_0x421e23(0x1d6),'description':a3_0x421e23(0x1d1),'risk':a3_0x421e23(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x421e23(0x204),'description':a3_0x421e23(0x1f7),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0xf9ae6e){const _0x3ce7ed=a3_0x421e23;if(!_0xf9ae6e[_0x3ce7ed(0x1eb)][0x0])throw CliErrors[_0x3ce7ed(0x1e9)](_0x3ce7ed(0x1d4),_0x3ce7ed(0x1c2)+CLI_BIN_NAME+_0x3ce7ed(0x21b));},async 'execute'(_0x2dc3c1){const _0x36a14e=a3_0x421e23;warnDeprecatedAppCommand(_0x36a14e(0x1d6),CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]');const _0x551556=_0x2dc3c1[_0x36a14e(0x1eb)][0x0];if(!_0x551556)throw CliErrors['validation'](_0x36a14e(0x1d4),'Usage:\x20'+CLI_BIN_NAME+_0x36a14e(0x21b));const {buildConfigFromFlags:_0x38806d,resolveLocalAppAliasCode:_0x24680b}=await import(_0x36a14e(0x1e0)),{readCachedAppList:_0x5af830}=await import(_0x36a14e(0x203)),_0x54b5f2=_0x2dc3c1['str'](_0x36a14e(0x1c8)),_0x2decc2=_0x38806d(_0x54b5f2?{'env':_0x54b5f2}:{}),_0x3a037b=_0x5af830(_0x2decc2['env'],_0x2decc2[_0x36a14e(0x1d9)]),_0x5928b2=_0x3a037b?.[_0x36a14e(0x20a)]['find'](_0x34ec35=>_0x34ec35['appName']===_0x551556),_0x202426=_0x24680b(_0x2decc2[_0x36a14e(0x1ea)]??{},_0x551556);if(_0x5928b2&&!isRuntimeAccessibleApp(_0x5928b2))throw runtimeInaccessibleAppError(_0x5928b2,'\x22'+_0x551556+'\x22');if(_0x202426){const _0xa1a5fd=_0x3a037b?.[_0x36a14e(0x20a)][_0x36a14e(0x1e4)](_0x5e7b7d=>_0x5e7b7d[_0x36a14e(0x1e5)]?.[_0x36a14e(0x20f)]()===_0x202426);if(_0xa1a5fd&&!isRuntimeAccessibleApp(_0xa1a5fd))throw runtimeInaccessibleAppError(_0xa1a5fd,'\x22'+_0x551556+'\x22');}if(!_0x5928b2&&!_0x202426&&_0x2decc2[_0x36a14e(0x218)]!==_0x551556){const _0x548560=[..._0x3a037b?.['items']['map'](_0x2007f1=>_0x2007f1[_0x36a14e(0x200)])??[]],_0x31c33d=_0x548560[_0x36a14e(0x1f9)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x36a14e(0x1ca)+_0x551556+_0x36a14e(0x20e):_0x36a14e(0x1c6)+Array[_0x36a14e(0x20c)](new Set(_0x548560))['join'](',\x20')+_0x36a14e(0x1ff);throw CliErrors[_0x36a14e(0x1e9)]('App\x20\x22'+_0x551556+_0x36a14e(0x1e2),_0x31c33d);}const _0x1eef67=_0x2dc3c1['bool']('global');let _0x5ee2b0;if(_0x1eef67)_0x5ee2b0={'global':!![]};else{const {isInProject:_0x11411b}=await import(_0x36a14e(0x1e0)),_0x595f10=_0x11411b();_0x5ee2b0=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x36a14e(0x1db),'inProject':_0x595f10}));}const _0x110fe8=readConfig(_0x5ee2b0);return _0x110fe8['defaultApp']=_0x551556,writeConfig(_0x110fe8,_0x5ee2b0),{'ok':!![],'message':_0x36a14e(0x1c9)+_0x551556+'\x22'+scopeLabel(_0x5ee2b0)+'.'};}};function warnDeprecatedAppCommand(_0x35bfe8,_0x5ee860){const _0x4dd4f3=a3_0x421e23;console['warn'](CLI_BIN_NAME+'\x20app\x20'+_0x35bfe8+_0x4dd4f3(0x206)+_0x5ee860+_0x4dd4f3(0x219));}const importDef={'service':'app','command':a3_0x421e23(0x217),'description':a3_0x421e23(0x212),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x309e54){return await runInitImport(collectFlags(_0x309e54,initImportFlagDefs)),{'ok':!![]};}};function a3_0x4d3a(_0xc3ee9e,_0x2bbd2d){_0xc3ee9e=_0xc3ee9e-0x1c2;const _0x4f613a=a3_0x4f61();let _0x4d3a5b=_0x4f613a[_0xc3ee9e];return _0x4d3a5b;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0x4b1518,_0x3fd6aa){const _0x3f72c4=a4_0x3a05,_0x251686=_0x4b1518();while(!![]){try{const _0x42ad05=-parseInt(_0x3f72c4(0x1c1))/0x1+-parseInt(_0x3f72c4(0x1c4))/0x2+-parseInt(_0x3f72c4(0x1cd))/0x3+parseInt(_0x3f72c4(0x1bb))/0x4+parseInt(_0x3f72c4(0x1c6))/0x5*(parseInt(_0x3f72c4(0x1cb))/0x6)+parseInt(_0x3f72c4(0x1c2))/0x7+parseInt(_0x3f72c4(0x1c9))/0x8;if(_0x42ad05===_0x3fd6aa)break;else _0x251686['push'](_0x251686['shift']());}catch(_0x1122cb){_0x251686['push'](_0x251686['shift']());}}}(a4_0x106c,0xdd409));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(_0x5d50c0){const _0x1fb497=a4_0x3a05;if(typeof _0x5d50c0!==_0x1fb497(0x1c8))return null;const _0x61d510=_0x5d50c0[_0x1fb497(0x1ba)]();return _0x61d510?_0x61d510[_0x1fb497(0x1c0)]():null;}function a4_0x3a05(_0x1a5360,_0x5ac4d9){_0x1a5360=_0x1a5360-0x1ba;const _0x106cdc=a4_0x106c();let _0x3a052c=_0x106cdc[_0x1a5360];return _0x3a052c;}export function isRuntimeAccessibleApp(_0x4ca04a){return normalizeAppPublishStatus(_0x4ca04a['appPublishStatus'])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x4e50fc){const _0x3b95cd=a4_0x3a05;return _0x4e50fc[_0x3b95cd(0x1be)](isRuntimeAccessibleApp);}export function findAppByName(_0x273730,_0x3e2cd5){const _0x5a47b9=a4_0x3a05;return _0x273730[_0x5a47b9(0x1bc)](_0x4d7f38=>_0x4d7f38['appName']===_0x3e2cd5);}export function findAppByCode(_0x3ed27b,_0x23911e){const _0xf38ceb=a4_0x3a05,_0x13fef6=_0x23911e[_0xf38ceb(0x1ba)]();if(!_0x13fef6)return undefined;return _0x3ed27b['find'](_0x258f89=>_0x258f89[_0xf38ceb(0x1ca)]?.[_0xf38ceb(0x1ba)]()===_0x13fef6);}function a4_0x106c(){const _0x235edd=['validation','3190624HdAYpS','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','15Jzdcxn','.\x20Publish\x20the\x20app\x20before\x20using\x20','string','362056HqjWoi','appCode','3448212LliXQK','Current\x20status:\x20','2891904OIFQkZ','trim','6252532LOFuGj','find','App\x20','filter','UNKNOWN','toUpperCase','126851UFxbvS','1819188fwwpPk'];a4_0x106c=function(){return _0x235edd;};return a4_0x106c();}export function runtimeInaccessibleAppError(_0x4411ca,_0x51206c){const _0x28c722=a4_0x3a05,_0x3ce4d0=normalizeAppPublishStatus(_0x4411ca['appPublishStatus'])??_0x28c722(0x1bf);return CliErrors[_0x28c722(0x1c3)](_0x28c722(0x1bd)+_0x51206c+_0x28c722(0x1c5),_0x28c722(0x1cc)+_0x3ce4d0+_0x28c722(0x1c7)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
1
+ function a4_0x3559(){const _0x2dbcf9=['8385419epUAXL','find','.\x20Publish\x20the\x20app\x20before\x20using\x20','toUpperCase','trim','10372528wUhgnN','603674XHPTAT','6033318xuhtMP','11373290hnJkzN','appCode','14946732GRRRmi','string','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','1ImSdNb','appPublishStatus','appName','UNKNOWN','2251677TtUfdR','5NiXSSJ','validation','4PYMPjs'];a4_0x3559=function(){return _0x2dbcf9;};return a4_0x3559();}(function(_0x36498f,_0x3fd017){const _0x41ecc0=a4_0x3ec3,_0x5721a5=_0x36498f();while(!![]){try{const _0x3ed803=-parseInt(_0x41ecc0(0x196))/0x1*(parseInt(_0x41ecc0(0x18f))/0x2)+parseInt(_0x41ecc0(0x185))/0x3*(-parseInt(_0x41ecc0(0x188))/0x4)+parseInt(_0x41ecc0(0x186))/0x5*(-parseInt(_0x41ecc0(0x190))/0x6)+-parseInt(_0x41ecc0(0x189))/0x7+parseInt(_0x41ecc0(0x18e))/0x8+parseInt(_0x41ecc0(0x193))/0x9+parseInt(_0x41ecc0(0x191))/0xa;if(_0x3ed803===_0x3fd017)break;else _0x5721a5['push'](_0x5721a5['shift']());}catch(_0xe79ac1){_0x5721a5['push'](_0x5721a5['shift']());}}}(a4_0x3559,0xccc79));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(_0x5870c4){const _0x1d6f9a=a4_0x3ec3;if(typeof _0x5870c4!==_0x1d6f9a(0x194))return null;const _0x297759=_0x5870c4[_0x1d6f9a(0x18d)]();return _0x297759?_0x297759[_0x1d6f9a(0x18c)]():null;}function a4_0x3ec3(_0x1bc1b6,_0x4965eb){_0x1bc1b6=_0x1bc1b6-0x182;const _0x3559bd=a4_0x3559();let _0x3ec34e=_0x3559bd[_0x1bc1b6];return _0x3ec34e;}export function isRuntimeAccessibleApp(_0x4d626d){const _0x4452df=a4_0x3ec3;return normalizeAppPublishStatus(_0x4d626d[_0x4452df(0x182)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x20ef41){return _0x20ef41['filter'](isRuntimeAccessibleApp);}export function findAppByName(_0x7dd7fa,_0x130c92){const _0x132a3a=a4_0x3ec3;return _0x7dd7fa[_0x132a3a(0x18a)](_0x4e6df0=>_0x4e6df0[_0x132a3a(0x183)]===_0x130c92);}export function findAppByCode(_0x500323,_0x3c69cf){const _0x275275=a4_0x3ec3,_0x27d0d2=_0x3c69cf[_0x275275(0x18d)]();if(!_0x27d0d2)return undefined;return _0x500323[_0x275275(0x18a)](_0x38f8b3=>_0x38f8b3[_0x275275(0x192)]?.[_0x275275(0x18d)]()===_0x27d0d2);}export function runtimeInaccessibleAppError(_0x3b9f98,_0x2efa06){const _0x21540d=a4_0x3ec3,_0x2d03e4=normalizeAppPublishStatus(_0x3b9f98[_0x21540d(0x182)])??_0x21540d(0x184);return CliErrors[_0x21540d(0x187)]('App\x20'+_0x2efa06+_0x21540d(0x195),'Current\x20status:\x20'+_0x2d03e4+_0x21540d(0x18b)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
@@ -1 +1 @@
1
- (function(_0x8dd2b9,_0xec0e63){const _0x4b61ba=a5_0x1e6c,_0x1e27be=_0x8dd2b9();while(!![]){try{const _0x378aaa=-parseInt(_0x4b61ba(0x14c))/0x1*(-parseInt(_0x4b61ba(0x142))/0x2)+-parseInt(_0x4b61ba(0x148))/0x3*(-parseInt(_0x4b61ba(0x144))/0x4)+parseInt(_0x4b61ba(0x154))/0x5*(-parseInt(_0x4b61ba(0x147))/0x6)+parseInt(_0x4b61ba(0x151))/0x7*(-parseInt(_0x4b61ba(0x155))/0x8)+parseInt(_0x4b61ba(0x146))/0x9*(parseInt(_0x4b61ba(0x150))/0xa)+parseInt(_0x4b61ba(0x14e))/0xb*(-parseInt(_0x4b61ba(0x14a))/0xc)+parseInt(_0x4b61ba(0x153))/0xd;if(_0x378aaa===_0xec0e63)break;else _0x1e27be['push'](_0x1e27be['shift']());}catch(_0x1e7d2b){_0x1e27be['push'](_0x1e27be['shift']());}}}(a5_0x414a,0x4cf8a));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x63505e=a5_0x1e6c,_0xd13ab9=join(__dirname,_0x63505e(0x14d)),_0xe8a8ba=readFileSync(_0xd13ab9,_0x63505e(0x143));return JSON['parse'](_0xe8a8ba);}function a5_0x414a(){const _0xd4f6c2=['2021484FDcldC','Mock\x20API\x20error:\x20','71uNOXNB','../../../mock/app-list.json','33mvserO','data','220EtINYe','20601DtBhgG','tableData','5121246iFHCpQ','20alsgvQ','1416DUkIEf','4938UUnxZZ','utf-8','12ZyXfVn','success','127593kEFglE','175992uZQQCb','577749QAAjDv','errorMsg'];a5_0x414a=function(){return _0xd4f6c2;};return a5_0x414a();}function a5_0x1e6c(_0x520b9d,_0x9b0127){_0x520b9d=_0x520b9d-0x142;const _0x414a42=a5_0x414a();let _0x1e6c5a=_0x414a42[_0x520b9d];return _0x1e6c5a;}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x4b13db=a5_0x1e6c,_0x4f0fb0=getMockAppList();if(!_0x4f0fb0[_0x4b13db(0x145)])throw new Error(_0x4b13db(0x14b)+_0x4f0fb0[_0x4b13db(0x149)]+'\x20('+_0x4f0fb0['errorCode']+')');return _0x4f0fb0[_0x4b13db(0x14f)][_0x4b13db(0x152)];}
1
+ (function(_0x3cf8c8,_0x152363){const _0x1c9dfd=a5_0x2b8a,_0x3407a5=_0x3cf8c8();while(!![]){try{const _0x479cb2=-parseInt(_0x1c9dfd(0x1b6))/0x1+parseInt(_0x1c9dfd(0x1be))/0x2*(parseInt(_0x1c9dfd(0x1bc))/0x3)+parseInt(_0x1c9dfd(0x1c1))/0x4+parseInt(_0x1c9dfd(0x1b5))/0x5*(-parseInt(_0x1c9dfd(0x1b4))/0x6)+parseInt(_0x1c9dfd(0x1bb))/0x7+-parseInt(_0x1c9dfd(0x1ba))/0x8+-parseInt(_0x1c9dfd(0x1b7))/0x9*(-parseInt(_0x1c9dfd(0x1bd))/0xa);if(_0x479cb2===_0x152363)break;else _0x3407a5['push'](_0x3407a5['shift']());}catch(_0xb78e59){_0x3407a5['push'](_0x3407a5['shift']());}}}(a5_0x3639,0xbc60b));function a5_0x2b8a(_0x449697,_0x3c5538){_0x449697=_0x449697-0x1b4;const _0x36397c=a5_0x3639();let _0x2b8af8=_0x36397c[_0x449697];return _0x2b8af8;}import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x3639(){const _0x20818e=['6vFWGxG','2372905gXTGtC','783490pRWThV','9rTIncC','../../../mock/app-list.json','tableData','3967096MXeraQ','1049454NnFfIW','6QxWZeO','11504690qSKSXj','378052uGvVbw','utf-8','data','3388440dNeuem','parse','errorMsg'];a5_0x3639=function(){return _0x20818e;};return a5_0x3639();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x368bbd=a5_0x2b8a,_0x2f0df8=join(__dirname,_0x368bbd(0x1b8)),_0x15fe86=readFileSync(_0x2f0df8,_0x368bbd(0x1bf));return JSON[_0x368bbd(0x1c2)](_0x15fe86);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x46cb3f=a5_0x2b8a,_0x4d8835=getMockAppList();if(!_0x4d8835['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x4d8835[_0x46cb3f(0x1c3)]+'\x20('+_0x4d8835['errorCode']+')');return _0x4d8835[_0x46cb3f(0x1c0)][_0x46cb3f(0x1b9)];}
@@ -1 +1 @@
1
- function a6_0x2774(_0x5e1dd6,_0x372673){_0x5e1dd6=_0x5e1dd6-0x110;const _0x530a72=a6_0x530a();let _0x27747e=_0x530a72[_0x5e1dd6];return _0x27747e;}(function(_0x56471b,_0x493416){const _0x778399=a6_0x2774,_0x6348d8=_0x56471b();while(!![]){try{const _0x7123fd=parseInt(_0x778399(0x11d))/0x1*(-parseInt(_0x778399(0x116))/0x2)+parseInt(_0x778399(0x11e))/0x3+parseInt(_0x778399(0x113))/0x4*(parseInt(_0x778399(0x111))/0x5)+parseInt(_0x778399(0x112))/0x6+parseInt(_0x778399(0x119))/0x7+-parseInt(_0x778399(0x117))/0x8+parseInt(_0x778399(0x11c))/0x9*(-parseInt(_0x778399(0x120))/0xa);if(_0x7123fd===_0x493416)break;else _0x6348d8['push'](_0x6348d8['shift']());}catch(_0x58b247){_0x6348d8['push'](_0x6348d8['shift']());}}}(a6_0x530a,0x6a5b7));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';function a6_0x530a(){const _0x1a11c1=['4264416TonAbA','mock','4283538lcxmFI','fetchedAt','items','9asWxJG','131uVEnbn','2448318NUpHCU','trim','8474770yWmFDk','APP_LIST_SOURCE','toLowerCase','449560dTjYlO','1885974gEKsnL','4ZjlMzc','cache','toISOString','246OvCnhK'];a6_0x530a=function(){return _0x1a11c1;};return a6_0x530a();}export function shouldUseMockRemoteApps(){const _0x1a6556=a6_0x2774,_0x115614=(productEnv(_0x1a6556(0x121))||'')['trim']()[_0x1a6556(0x110)]();return _0x115614===_0x1a6556(0x118);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1a15ae){const _0x39a5ca=a6_0x2774,{env:_0x22ea9e,accessKey:_0x38d596,localOnly:localOnly=![],noCache:noCache=![]}=_0x1a15ae,_0x2ca436=readCachedAppList(_0x22ea9e,_0x38d596),_0x2b8cea=_0x38d596?.['trim']()?getAppCacheFilePath(_0x22ea9e,_0x38d596):null;if(localOnly)return{'items':_0x2ca436?.[_0x39a5ca(0x11b)]??[],'source':_0x39a5ca(0x114),'fetchedAt':_0x2ca436?.[_0x39a5ca(0x11a)]??null,'cachePath':_0x2b8cea};try{const _0x5ca2a2=await getRemoteAppItems(),_0x1c4f4c=shouldUseMockRemoteApps()?_0x39a5ca(0x118):'remote',_0x39965c=new Date()[_0x39a5ca(0x115)](),_0x4a1fbc=_0x38d596?.[_0x39a5ca(0x11f)]()?writeCachedAppList(_0x22ea9e,_0x38d596,{'env':_0x22ea9e,'fetchedAt':_0x39965c,'source':_0x1c4f4c,'items':_0x5ca2a2}):null;return{'items':_0x5ca2a2,'source':_0x1c4f4c,'fetchedAt':_0x39965c,'cachePath':_0x4a1fbc};}catch(_0x3aba9e){if(!noCache&&_0x2ca436)return{'items':_0x2ca436[_0x39a5ca(0x11b)],'source':_0x39a5ca(0x114),'fetchedAt':_0x2ca436[_0x39a5ca(0x11a)],'cachePath':_0x2b8cea};throw _0x3aba9e;}}
1
+ function a6_0x407b(_0x14134b,_0x55a77a){_0x14134b=_0x14134b-0x157;const _0x350526=a6_0x3505();let _0x407b2e=_0x350526[_0x14134b];return _0x407b2e;}(function(_0x3273b4,_0x179c7a){const _0x28cd10=a6_0x407b,_0x5ced7c=_0x3273b4();while(!![]){try{const _0x5586ad=-parseInt(_0x28cd10(0x15e))/0x1*(-parseInt(_0x28cd10(0x15d))/0x2)+-parseInt(_0x28cd10(0x162))/0x3*(parseInt(_0x28cd10(0x158))/0x4)+-parseInt(_0x28cd10(0x163))/0x5+-parseInt(_0x28cd10(0x168))/0x6*(parseInt(_0x28cd10(0x159))/0x7)+-parseInt(_0x28cd10(0x15c))/0x8*(parseInt(_0x28cd10(0x157))/0x9)+parseInt(_0x28cd10(0x166))/0xa+parseInt(_0x28cd10(0x164))/0xb;if(_0x5586ad===_0x179c7a)break;else _0x5ced7c['push'](_0x5ced7c['shift']());}catch(_0x384912){_0x5ced7c['push'](_0x5ced7c['shift']());}}}(a6_0x3505,0x2a2a4));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x3505(){const _0x5de835=['toISOString','2504870pfuOYd','remote','357354aEiZxt','36gTqyom','163256DHXNit','14zatKBp','mock','items','567064kfkXNu','268hgphTb','871WFRgYu','cache','trim','APP_LIST_SOURCE','21yxlNSz','1657245bQkpKT','9078344vFWCxi'];a6_0x3505=function(){return _0x5de835;};return a6_0x3505();}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x20ab4c=a6_0x407b,_0x127b38=(productEnv(_0x20ab4c(0x161))||'')[_0x20ab4c(0x160)]()['toLowerCase']();return _0x127b38==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x5cf414){const _0x58d698=a6_0x407b,{env:_0x3c562c,accessKey:_0xeeb0d5,localOnly:localOnly=![],noCache:noCache=![]}=_0x5cf414,_0x4daa02=readCachedAppList(_0x3c562c,_0xeeb0d5),_0x417966=_0xeeb0d5?.[_0x58d698(0x160)]()?getAppCacheFilePath(_0x3c562c,_0xeeb0d5):null;if(localOnly)return{'items':_0x4daa02?.[_0x58d698(0x15b)]??[],'source':_0x58d698(0x15f),'fetchedAt':_0x4daa02?.['fetchedAt']??null,'cachePath':_0x417966};try{const _0x53d51b=await getRemoteAppItems(),_0x4b2bf4=shouldUseMockRemoteApps()?_0x58d698(0x15a):_0x58d698(0x167),_0x559f1f=new Date()[_0x58d698(0x165)](),_0x8816f4=_0xeeb0d5?.[_0x58d698(0x160)]()?writeCachedAppList(_0x3c562c,_0xeeb0d5,{'env':_0x3c562c,'fetchedAt':_0x559f1f,'source':_0x4b2bf4,'items':_0x53d51b}):null;return{'items':_0x53d51b,'source':_0x4b2bf4,'fetchedAt':_0x559f1f,'cachePath':_0x8816f4};}catch(_0x52d1ab){if(!noCache&&_0x4daa02)return{'items':_0x4daa02[_0x58d698(0x15b)],'source':_0x58d698(0x15f),'fetchedAt':_0x4daa02['fetchedAt'],'cachePath':_0x417966};throw _0x52d1ab;}}
@@ -1 +1 @@
1
- (function(_0x3d8c95,_0xaa7262){const _0x5d162=a7_0x2276,_0x34cb44=_0x3d8c95();while(!![]){try{const _0x424ca8=parseInt(_0x5d162(0x1c0))/0x1+-parseInt(_0x5d162(0x1bd))/0x2*(-parseInt(_0x5d162(0x1c4))/0x3)+-parseInt(_0x5d162(0x1b3))/0x4*(parseInt(_0x5d162(0x1c5))/0x5)+parseInt(_0x5d162(0x1c2))/0x6*(parseInt(_0x5d162(0x1be))/0x7)+parseInt(_0x5d162(0x1c1))/0x8+parseInt(_0x5d162(0x1bf))/0x9+-parseInt(_0x5d162(0x1b1))/0xa;if(_0x424ca8===_0xaa7262)break;else _0x34cb44['push'](_0x34cb44['shift']());}catch(_0x18e844){_0x34cb44['push'](_0x34cb44['shift']());}}}(a7_0x2e87,0x934af));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0xe5c854,_0x2bdc6d){const _0x118594=a7_0x2276;if(!_0x2bdc6d)return;const _0xaccd1f=!!(_0x2bdc6d[_0x118594(0x1bb)]??_0x2bdc6d[_0x118594(0x1b8)]);for(const _0x3e9a8c of _0xe5c854){_0x3e9a8c['isCurrent']=![];}const _0x8c1332=_0x2bdc6d[_0x118594(0x1bc)]!=null?String(_0x2bdc6d[_0x118594(0x1bc)])[_0x118594(0x1b2)]():'';if(_0xaccd1f){const _0x295907=_0x2bdc6d['currentApp']??_0x2bdc6d[_0x118594(0x1b8)];if(_0x295907){const _0xc4b164=_0xe5c854['find'](_0x4d6fe1=>_0x4d6fe1[_0x118594(0x1b7)]===!![]&&_0x4d6fe1[_0x118594(0x1c3)]===_0x295907&&_0x4d6fe1[_0x118594(0x1ba)]===_0x118594(0x1b9)),_0x4f3c18=_0xc4b164??_0xe5c854['find'](_0x5b5453=>_0x5b5453[_0x118594(0x1b7)]===!![]&&_0x5b5453['name']===_0x295907);_0x4f3c18&&(_0x4f3c18[_0x118594(0x1b0)]=!![]);}return;}if(!_0x8c1332)return;for(const _0xcc7735 of _0xe5c854){String(_0xcc7735[_0x118594(0x1b5)]??'')[_0x118594(0x1b2)]()===_0x8c1332&&(_0xcc7735[_0x118594(0x1b0)]=!![]);}}function a7_0x2e87(){const _0x270520=['name','610593ZylhEd','5EcUtrL','isCurrent','25342360gJmFNU','trim','432868uIuVaJ','project','appcode','global','named','defaultApp','local','definedIn','currentApp','appCode','6yWcgcR','999593vnkXdj','10304334eKIEcS','220110Oeqzkh','9018688AusBMn','6sSSjyN'];a7_0x2e87=function(){return _0x270520;};return a7_0x2e87();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0x2276(_0x2356a5,_0x4bd700){_0x2356a5=_0x2356a5-0x1b0;const _0x2e8792=a7_0x2e87();let _0x2276ac=_0x2e8792[_0x2356a5];return _0x2276ac;}export function scopeLabel(_0x6c9989){const _0x58b085=a7_0x2276;return formatScopeLabel(_0x6c9989[_0x58b085(0x1b6)]?_0x58b085(0x1b6):_0x58b085(0x1b4));}
1
+ (function(_0x465492,_0x808dd){const _0x4286cb=a7_0x1230,_0x2dedc5=_0x465492();while(!![]){try{const _0x61bbfc=parseInt(_0x4286cb(0x78))/0x1+parseInt(_0x4286cb(0x76))/0x2*(parseInt(_0x4286cb(0x87))/0x3)+parseInt(_0x4286cb(0x84))/0x4+-parseInt(_0x4286cb(0x70))/0x5*(-parseInt(_0x4286cb(0x71))/0x6)+parseInt(_0x4286cb(0x73))/0x7+parseInt(_0x4286cb(0x7f))/0x8*(parseInt(_0x4286cb(0x7c))/0x9)+parseInt(_0x4286cb(0x77))/0xa*(-parseInt(_0x4286cb(0x80))/0xb);if(_0x61bbfc===_0x808dd)break;else _0x2dedc5['push'](_0x2dedc5['shift']());}catch(_0x4d7eba){_0x2dedc5['push'](_0x2dedc5['shift']());}}}(a7_0x25b6,0xcd84e));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4d37a9,_0x35128a){const _0x336c6c=a7_0x1230;if(!_0x35128a)return;const _0x4222bb=!!(_0x35128a[_0x336c6c(0x7b)]??_0x35128a['defaultApp']);for(const _0x1abffa of _0x4d37a9){_0x1abffa[_0x336c6c(0x79)]=![];}const _0x2386f3=_0x35128a[_0x336c6c(0x81)]!=null?String(_0x35128a[_0x336c6c(0x81)])[_0x336c6c(0x7a)]():'';if(_0x4222bb){const _0x5a25d2=_0x35128a[_0x336c6c(0x7b)]??_0x35128a[_0x336c6c(0x74)];if(_0x5a25d2){const _0x3f1f86=_0x4d37a9['find'](_0x447e80=>_0x447e80[_0x336c6c(0x83)]===!![]&&_0x447e80['name']===_0x5a25d2&&_0x447e80[_0x336c6c(0x75)]===_0x336c6c(0x85)),_0x4a1125=_0x3f1f86??_0x4d37a9[_0x336c6c(0x72)](_0x1389b3=>_0x1389b3[_0x336c6c(0x83)]===!![]&&_0x1389b3[_0x336c6c(0x86)]===_0x5a25d2);_0x4a1125&&(_0x4a1125[_0x336c6c(0x79)]=!![]);}return;}if(!_0x2386f3)return;for(const _0x8ff3e of _0x4d37a9){String(_0x8ff3e[_0x336c6c(0x7e)]??'')[_0x336c6c(0x7a)]()===_0x2386f3&&(_0x8ff3e[_0x336c6c(0x79)]=!![]);}}function a7_0x1230(_0x3f49a3,_0x3d371a){_0x3f49a3=_0x3f49a3-0x70;const _0x25b68e=a7_0x25b6();let _0x1230e3=_0x25b68e[_0x3f49a3];return _0x1230e3;}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x1a16a3){const _0x3d95e2=a7_0x1230;return formatScopeLabel(_0x1a16a3['global']?_0x3d95e2(0x82):_0x3d95e2(0x7d));}function a7_0x25b6(){const _0x178814=['find','8229249GLZLjA','defaultApp','definedIn','217858mdfnof','50NIwUlD','1195453kbVhIQ','isCurrent','trim','currentApp','2394NudLvL','project','appcode','15040ZHYMQg','11886171tvYVuV','appCode','global','named','4503312jOyZDA','local','name','27LPSghG','186365QtpxLS','204MRZGPS'];a7_0x25b6=function(){return _0x178814;};return a7_0x25b6();}
@@ -1 +1 @@
1
- const a8_0x66354b=a8_0x5807;(function(_0x350e6c,_0x2518c0){const _0x1d5c20=a8_0x5807,_0x36da98=_0x350e6c();while(!![]){try{const _0x3d882e=parseInt(_0x1d5c20(0x1c6))/0x1+parseInt(_0x1d5c20(0x1d1))/0x2*(-parseInt(_0x1d5c20(0x1d9))/0x3)+parseInt(_0x1d5c20(0x1e9))/0x4*(-parseInt(_0x1d5c20(0x1bd))/0x5)+parseInt(_0x1d5c20(0x1ee))/0x6+-parseInt(_0x1d5c20(0x1d5))/0x7*(-parseInt(_0x1d5c20(0x1c4))/0x8)+-parseInt(_0x1d5c20(0x1f0))/0x9+parseInt(_0x1d5c20(0x1d0))/0xa;if(_0x3d882e===_0x2518c0)break;else _0x36da98['push'](_0x36da98['shift']());}catch(_0x2866d6){_0x36da98['push'](_0x36da98['shift']());}}}(a8_0x5047,0x7cf01));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';function a8_0x5807(_0x2c67ad,_0x5ca5eb){_0x2c67ad=_0x2c67ad-0x1b9;const _0x5047a6=a8_0x5047();let _0x5807b2=_0x5047a6[_0x2c67ad];return _0x5807b2;}function a8_0x5047(){const _0x58090c=['update','lodash','POST','deleted','Artifact\x20ID','detail','startsWith','build','some','num','source','boolean','Updated\x20Artifact\x20','parse','compiledContent','write','trim','/update','@ant-design/icons','/client/artifact/create','join','split','15JDNooA','File\x20is\x20not\x20a\x20regular\x20file:\x20','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','validation','body','Optional\x20favorite-state\x20filter','list','6118040blVeTk','exec','20162IiwPWX','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','File\x20path\x20is\x20required.','/client/artifact/','appCode','lastIndex','updateTime','metadata','favorite','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','3303550gzPgOS','718vIFjgb','bool','object','string','7yWbwtE','Artifact\x20source\x20file\x20is\x20blank.','File\x20not\x20found:\x20','flag','6081UhoDBe','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','react_module','AGENT','isArray','react-dom','map','react_module\x20imports\x20are\x20limited\x20to:\x20','Show\x20one\x20Artifact\x20by\x20id','description','createTime','artifactType','includes','Invalid\x20JSON\x20for\x20--metadata:\x20','antd','Preview:\x20create\x20react_module\x20Artifact','402092yJOLOM','Artifact\x20display\x20name','artifact','name','length','2701536xYfTob','file','220689bCmsQA','read','str'];a8_0x5047=function(){return _0x58090c;};return a8_0x5047();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a8_0x66354b(0x1db),ARTIFACT_SOURCE_AGENT=a8_0x66354b(0x1dc),ALLOWED_REACT_MODULE_IMPORTS=['react',a8_0x66354b(0x1de),a8_0x66354b(0x1f4),'dayjs',a8_0x66354b(0x1e7),a8_0x66354b(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':a8_0x66354b(0x1ef),'type':a8_0x66354b(0x1d4),'required':!![],'description':a8_0x66354b(0x1cf)},ARTIFACT_NAME_FLAG={'name':'name','type':a8_0x66354b(0x1d4),'description':a8_0x66354b(0x1ea)},METADATA_FLAG={'name':a8_0x66354b(0x1cd),'type':a8_0x66354b(0x1d4),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x3dd53a){const _0x53fd8c=a8_0x66354b;return typeof _0x3dd53a===_0x53fd8c(0x1d3)&&_0x3dd53a!==null&&!Array[_0x53fd8c(0x1dd)](_0x3dd53a);}function readSourceFile(_0x32a6ba){const _0x251d0d=a8_0x66354b;if(!_0x32a6ba)throw CliErrors['validation'](_0x251d0d(0x1c8));if(!existsSync(_0x32a6ba))throw CliErrors['validation'](_0x251d0d(0x1d7)+_0x32a6ba);if(!statSync(_0x32a6ba)['isFile']())throw CliErrors[_0x251d0d(0x1c0)](_0x251d0d(0x1be)+_0x32a6ba);const _0x105612=readFileSync(_0x32a6ba,'utf8');return validateReactModuleSource(_0x105612),_0x105612;}function parseMetadata(_0x534ad0){const _0x36ec2f=a8_0x66354b;if(!_0x534ad0)return undefined;let _0x97ba2;try{_0x97ba2=JSON[_0x36ec2f(0x200)](_0x534ad0);}catch{throw CliErrors[_0x36ec2f(0x1c0)](_0x36ec2f(0x1e6)+_0x534ad0);}if(!isPlainObject(_0x97ba2))throw CliErrors[_0x36ec2f(0x1c0)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x3178ba={..._0x97ba2};return delete _0x3178ba[_0x36ec2f(0x201)],_0x3178ba;}function getPackageName(_0x36b2c2){const _0x5dc702=a8_0x66354b;if(_0x36b2c2[_0x5dc702(0x1f9)]('@')){const [_0x24b00c,_0x3d2707]=_0x36b2c2[_0x5dc702(0x1bc)]('/');return _0x24b00c&&_0x3d2707?_0x24b00c+'/'+_0x3d2707:_0x36b2c2;}return _0x36b2c2[_0x5dc702(0x1bc)]('/')[0x0]||_0x36b2c2;}function validateAllowedImports(_0x5f3830){const _0x259c80=a8_0x66354b,_0x4c1a4f=new Set();for(const _0x34bc69 of IMPORT_SOURCE_PATTERNS){_0x34bc69[_0x259c80(0x1cb)]=0x0;let _0x16ace3;while((_0x16ace3=_0x34bc69[_0x259c80(0x1c5)](_0x5f3830))!==null){const _0x3a45a0=_0x16ace3[0x1]?.[_0x259c80(0x203)]();_0x3a45a0&&_0x4c1a4f['add'](_0x3a45a0);}}const _0x3dc84f=[..._0x4c1a4f][_0x259c80(0x1df)](getPackageName)['filter'](_0x1d2af0=>!ALLOWED_REACT_MODULE_IMPORTS[_0x259c80(0x1e5)](_0x1d2af0));if(_0x3dc84f[_0x259c80(0x1ed)]>0x0)throw CliErrors[_0x259c80(0x1c0)](_0x259c80(0x1e0)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x3dc84f)][_0x259c80(0x1bb)](',\x20'));}export function validateReactModuleSource(_0x431062){const _0x3b17a1=a8_0x66354b;if(!_0x431062[_0x3b17a1(0x203)]())throw CliErrors[_0x3b17a1(0x1c0)](_0x3b17a1(0x1d6));if(PAGE_LEVEL_PATTERNS[_0x3b17a1(0x1fb)](_0x40c415=>_0x40c415['test'](_0x431062)))throw CliErrors['validation'](_0x3b17a1(0x1bf));validateAllowedImports(_0x431062);}function buildArtifactInput(_0x8ec845){const _0x3c5feb=a8_0x66354b,_0x6c1cdb=readSourceFile(_0x8ec845[_0x3c5feb(0x1f2)](_0x3c5feb(0x1ef))),_0x5e2167=_0x8ec845[_0x3c5feb(0x1f2)](_0x3c5feb(0x1ec))[_0x3c5feb(0x203)](),_0x405a73=parseMetadata(_0x8ec845['str'](_0x3c5feb(0x1cd)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x5e2167?{'name':_0x5e2167}:{},'content':_0x6c1cdb,..._0x405a73?{'metadata':_0x405a73}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x1a867f){const _0xe2a8e6=a8_0x66354b;return{'id':_0x1a867f['id'],'name':_0x1a867f[_0xe2a8e6(0x1ec)],'artifactType':_0x1a867f[_0xe2a8e6(0x1e4)],'source':_0x1a867f['source'],'favorite':_0x1a867f[_0xe2a8e6(0x1ce)],'deleted':_0x1a867f[_0xe2a8e6(0x1f6)],'createTime':_0x1a867f[_0xe2a8e6(0x1e3)],'updateTime':_0x1a867f[_0xe2a8e6(0x1cc)]};}function detailArtifact(_0x1d37eb){const _0x3a4418=a8_0x66354b;return{'id':_0x1d37eb['id'],'appCode':_0x1d37eb[_0x3a4418(0x1ca)],'name':_0x1d37eb['name'],'artifactType':_0x1d37eb[_0x3a4418(0x1e4)],'source':_0x1d37eb[_0x3a4418(0x1fd)],'favorite':_0x1d37eb[_0x3a4418(0x1ce)],'deleted':_0x1d37eb[_0x3a4418(0x1f6)],'content':_0x1d37eb['content']??'','compiledContent':_0x1d37eb[_0x3a4418(0x201)],'metadata':_0x1d37eb['metadata']??{},'createTime':_0x1d37eb[_0x3a4418(0x1e3)],'updateTime':_0x1d37eb['updateTime']};}function readFavoriteFlag(_0x1876a3){const _0x1656a0=a8_0x66354b,_0x1ac2b1=_0x1876a3[_0x1656a0(0x1d8)](_0x1656a0(0x1ce));return _0x1ac2b1===undefined||_0x1ac2b1===null||_0x1ac2b1===''?undefined:_0x1876a3['bool'](_0x1656a0(0x1ce));}const artifactList={'service':a8_0x66354b(0x1eb),'command':a8_0x66354b(0x1c3),'description':'List\x20current-app\x20react_module\x20Artifacts','risk':a8_0x66354b(0x1f1),'flags':[{'name':a8_0x66354b(0x1fd),'type':a8_0x66354b(0x1d4),'description':'Optional\x20source\x20filter,\x20for\x20example\x20AGENT'},{'name':a8_0x66354b(0x1ce),'type':a8_0x66354b(0x1fe),'description':a8_0x66354b(0x1c2)},VERBOSE_FLAG],async 'execute'(_0x13d175){const _0xb4ad8c=a8_0x66354b,_0x50b45a=await listRuntimeArtifacts(_0x13d175[_0xb4ad8c(0x1ca)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x13d175[_0xb4ad8c(0x1f2)](_0xb4ad8c(0x1fd))?{'source':_0x13d175[_0xb4ad8c(0x1f2)](_0xb4ad8c(0x1fd))}:{},...readFavoriteFlag(_0x13d175)!==undefined?{'favorite':readFavoriteFlag(_0x13d175)}:{}});return{'ok':!![],'data':{'total':_0x50b45a['length'],'items':_0x13d175[_0xb4ad8c(0x1d2)]('verbose')?_0x50b45a:_0x50b45a['map'](summarizeArtifact)}};}},artifactDetail={'service':a8_0x66354b(0x1eb),'command':a8_0x66354b(0x1f8),'description':a8_0x66354b(0x1e1),'risk':a8_0x66354b(0x1f1),'flags':[{...ID_FLAG,'description':a8_0x66354b(0x1f7)}],async 'execute'(_0x54c7e2){const _0x8349bd=a8_0x66354b,_0x3062e2=await getRuntimeArtifact(_0x54c7e2['num']('id'),_0x54c7e2[_0x8349bd(0x1ca)]);return{'ok':!![],'data':detailArtifact(_0x3062e2)};}},artifactCreate={'service':a8_0x66354b(0x1eb),'command':'create','description':a8_0x66354b(0x1c7),'risk':a8_0x66354b(0x202),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x233cd6){const _0x2549f1=a8_0x66354b,_0xaf95f9=buildArtifactInput(_0x233cd6),_0x243a31=await createRuntimeArtifact(_0x233cd6[_0x2549f1(0x1ca)],_0xaf95f9);return{'ok':!![],'data':detailArtifact(_0x243a31),'message':'Created\x20Artifact\x20'+_0x243a31['id']+(_0x243a31[_0x2549f1(0x1ec)]?'\x20('+_0x243a31[_0x2549f1(0x1ec)]+')':'')};},async 'dryRun'(_0x4635e2){const _0x109db4=a8_0x66354b,_0x844bf9=buildArtifactInput(_0x4635e2);return dryRun(_0x109db4(0x1f5),_0x109db4(0x1ba))[_0x109db4(0x1c1)]({'appCode':_0x4635e2['appCode'],..._0x844bf9})[_0x109db4(0x1e2)](_0x109db4(0x1e8))[_0x109db4(0x1fa)]();}},artifactUpdate={'service':a8_0x66354b(0x1eb),'command':a8_0x66354b(0x1f3),'description':a8_0x66354b(0x1da),'risk':a8_0x66354b(0x202),'flags':[{...ID_FLAG,'description':a8_0x66354b(0x1f7)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x42a743){const _0x535d69=a8_0x66354b,_0x2c6499=_0x42a743['num']('id'),_0x47b9d0=buildArtifactInput(_0x42a743),_0x17e47e=await updateRuntimeArtifact(_0x2c6499,_0x42a743[_0x535d69(0x1ca)],_0x47b9d0);return{'ok':!![],'data':detailArtifact(_0x17e47e),'message':_0x535d69(0x1ff)+_0x17e47e['id']+(_0x17e47e[_0x535d69(0x1ec)]?'\x20('+_0x17e47e['name']+')':'')};},async 'dryRun'(_0x51b048){const _0x42ab73=a8_0x66354b,_0x2543f3=_0x51b048[_0x42ab73(0x1fc)]('id'),_0x186bee=buildArtifactInput(_0x51b048);return dryRun('POST',_0x42ab73(0x1c9)+_0x2543f3+_0x42ab73(0x204))[_0x42ab73(0x1c1)]({'appCode':_0x51b048[_0x42ab73(0x1ca)],..._0x186bee})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x2543f3)[_0x42ab73(0x1fa)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a8_0x1f6234=a8_0x32a6;(function(_0x3be5b4,_0x4745b1){const _0x2bd276=a8_0x32a6,_0x27311e=_0x3be5b4();while(!![]){try{const _0x3981d0=parseInt(_0x2bd276(0xe5))/0x1+-parseInt(_0x2bd276(0xea))/0x2+parseInt(_0x2bd276(0x102))/0x3+-parseInt(_0x2bd276(0xf3))/0x4+-parseInt(_0x2bd276(0x112))/0x5*(parseInt(_0x2bd276(0x106))/0x6)+parseInt(_0x2bd276(0x12c))/0x7*(-parseInt(_0x2bd276(0xeb))/0x8)+-parseInt(_0x2bd276(0x117))/0x9*(-parseInt(_0x2bd276(0x111))/0xa);if(_0x3981d0===_0x4745b1)break;else _0x27311e['push'](_0x27311e['shift']());}catch(_0x4866d1){_0x27311e['push'](_0x27311e['shift']());}}}(a8_0x5c6d,0xaf337));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';function a8_0x5c6d(){const _0x5421c8=['55694lwAJAb','1064144YdBdMX','write','Invalid\x20JSON\x20for\x20--metadata:\x20','trim','lodash','utf8','file','File\x20path\x20is\x20required.','3949808ALMnON','content','POST','Created\x20Artifact\x20','Artifact\x20source\x20file\x20is\x20blank.','react','map','boolean','bool','dayjs','deleted','/client/artifact/create','join','filter','str','2333193HJrFhU','name','verbose','Optional\x20favorite-state\x20filter','14118zGPWXn','/client/artifact/','react-dom','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','string','source','AGENT','includes','validation','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','antd','6712980eHQiMc','1905zdsdqd','Show\x20one\x20Artifact\x20by\x20id','list','Preview:\x20create\x20react_module\x20Artifact','Artifact\x20display\x20name','18xiHgIo','detail','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','File\x20is\x20not\x20a\x20regular\x20file:\x20','split','create','length','@ant-design/icons','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','/update','File\x20not\x20found:\x20','favorite','Artifact\x20ID','metadata','react_module','artifact','Preview:\x20update\x20react_module\x20Artifact\x20','updateTime','react_module\x20imports\x20are\x20limited\x20to:\x20','build','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','28wBERaI','compiledContent','appCode','artifactType','parse','read','flag','List\x20current-app\x20react_module\x20Artifacts','1041160DWSNwC','isFile','body','object','num'];a8_0x5c6d=function(){return _0x5421c8;};return a8_0x5c6d();}import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a8_0x1f6234(0x125),ARTIFACT_SOURCE_AGENT=a8_0x1f6234(0x10c),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x1f6234(0xf8),a8_0x1f6234(0x108),a8_0x1f6234(0xef),a8_0x1f6234(0xfc),a8_0x1f6234(0x110),a8_0x1f6234(0x11e)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x1f6234(0xff)](',\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':a8_0x1f6234(0xf1),'type':a8_0x1f6234(0x10a),'required':!![],'description':a8_0x1f6234(0x119)},ARTIFACT_NAME_FLAG={'name':a8_0x1f6234(0x103),'type':a8_0x1f6234(0x10a),'description':a8_0x1f6234(0x116)},METADATA_FLAG={'name':a8_0x1f6234(0x124),'type':'string','description':a8_0x1f6234(0x10f)};function isPlainObject(_0x2fde95){const _0x40be0b=a8_0x1f6234;return typeof _0x2fde95===_0x40be0b(0xe8)&&_0x2fde95!==null&&!Array['isArray'](_0x2fde95);}function readSourceFile(_0x16d1bf){const _0x183d04=a8_0x1f6234;if(!_0x16d1bf)throw CliErrors[_0x183d04(0x10e)](_0x183d04(0xf2));if(!existsSync(_0x16d1bf))throw CliErrors['validation'](_0x183d04(0x121)+_0x16d1bf);if(!statSync(_0x16d1bf)[_0x183d04(0xe6)]())throw CliErrors[_0x183d04(0x10e)](_0x183d04(0x11a)+_0x16d1bf);const _0x3d8082=readFileSync(_0x16d1bf,_0x183d04(0xf0));return validateReactModuleSource(_0x3d8082),_0x3d8082;}function parseMetadata(_0x3d8705){const _0x3bdf51=a8_0x1f6234;if(!_0x3d8705)return undefined;let _0x456407;try{_0x456407=JSON[_0x3bdf51(0xe1)](_0x3d8705);}catch{throw CliErrors[_0x3bdf51(0x10e)](_0x3bdf51(0xed)+_0x3d8705);}if(!isPlainObject(_0x456407))throw CliErrors[_0x3bdf51(0x10e)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x4181fc={..._0x456407};return delete _0x4181fc['compiledContent'],_0x4181fc;}function getPackageName(_0x16a6ce){const _0x47aef2=a8_0x1f6234;if(_0x16a6ce['startsWith']('@')){const [_0x59c75a,_0x2a8d33]=_0x16a6ce['split']('/');return _0x59c75a&&_0x2a8d33?_0x59c75a+'/'+_0x2a8d33:_0x16a6ce;}return _0x16a6ce[_0x47aef2(0x11b)]('/')[0x0]||_0x16a6ce;}function validateAllowedImports(_0x433e78){const _0xbd3e43=a8_0x1f6234,_0x2d0d88=new Set();for(const _0x16041a of IMPORT_SOURCE_PATTERNS){_0x16041a['lastIndex']=0x0;let _0x10d02a;while((_0x10d02a=_0x16041a['exec'](_0x433e78))!==null){const _0x69eaf4=_0x10d02a[0x1]?.[_0xbd3e43(0xee)]();_0x69eaf4&&_0x2d0d88['add'](_0x69eaf4);}}const _0x49cfc7=[..._0x2d0d88][_0xbd3e43(0xf9)](getPackageName)[_0xbd3e43(0x100)](_0x2f9daf=>!ALLOWED_REACT_MODULE_IMPORTS[_0xbd3e43(0x10d)](_0x2f9daf));if(_0x49cfc7[_0xbd3e43(0x11d)]>0x0)throw CliErrors[_0xbd3e43(0x10e)](_0xbd3e43(0x129)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x49cfc7)][_0xbd3e43(0xff)](',\x20'));}export function validateReactModuleSource(_0x188c0d){const _0x5c5013=a8_0x1f6234;if(!_0x188c0d[_0x5c5013(0xee)]())throw CliErrors['validation'](_0x5c5013(0xf7));if(PAGE_LEVEL_PATTERNS['some'](_0x51dea1=>_0x51dea1['test'](_0x188c0d)))throw CliErrors[_0x5c5013(0x10e)](_0x5c5013(0x12b));validateAllowedImports(_0x188c0d);}function buildArtifactInput(_0x1b3c23){const _0x348b5e=a8_0x1f6234,_0x4af1b8=readSourceFile(_0x1b3c23[_0x348b5e(0x101)]('file')),_0x313f1c=_0x1b3c23['str'](_0x348b5e(0x103))['trim'](),_0x1214ab=parseMetadata(_0x1b3c23['str']('metadata'));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x313f1c?{'name':_0x313f1c}:{},'content':_0x4af1b8,..._0x1214ab?{'metadata':_0x1214ab}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x26f566){const _0x199167=a8_0x1f6234;return{'id':_0x26f566['id'],'name':_0x26f566[_0x199167(0x103)],'artifactType':_0x26f566[_0x199167(0x12f)],'source':_0x26f566[_0x199167(0x10b)],'favorite':_0x26f566[_0x199167(0x122)],'deleted':_0x26f566[_0x199167(0xfd)],'createTime':_0x26f566['createTime'],'updateTime':_0x26f566[_0x199167(0x128)]};}function detailArtifact(_0x33a180){const _0x1eb7a0=a8_0x1f6234;return{'id':_0x33a180['id'],'appCode':_0x33a180[_0x1eb7a0(0x12e)],'name':_0x33a180[_0x1eb7a0(0x103)],'artifactType':_0x33a180[_0x1eb7a0(0x12f)],'source':_0x33a180[_0x1eb7a0(0x10b)],'favorite':_0x33a180['favorite'],'deleted':_0x33a180[_0x1eb7a0(0xfd)],'content':_0x33a180[_0x1eb7a0(0xf4)]??'','compiledContent':_0x33a180[_0x1eb7a0(0x12d)],'metadata':_0x33a180[_0x1eb7a0(0x124)]??{},'createTime':_0x33a180['createTime'],'updateTime':_0x33a180[_0x1eb7a0(0x128)]};}function readFavoriteFlag(_0x5a1ac6){const _0x1ea41e=a8_0x1f6234,_0x2714be=_0x5a1ac6[_0x1ea41e(0xe3)](_0x1ea41e(0x122));return _0x2714be===undefined||_0x2714be===null||_0x2714be===''?undefined:_0x5a1ac6['bool'](_0x1ea41e(0x122));}function a8_0x32a6(_0x1c35e1,_0x19e4cf){_0x1c35e1=_0x1c35e1-0xe1;const _0x5c6ded=a8_0x5c6d();let _0x32a6e1=_0x5c6ded[_0x1c35e1];return _0x32a6e1;}const artifactList={'service':a8_0x1f6234(0x126),'command':a8_0x1f6234(0x114),'description':a8_0x1f6234(0xe4),'risk':a8_0x1f6234(0xe2),'flags':[{'name':a8_0x1f6234(0x10b),'type':'string','description':a8_0x1f6234(0x109)},{'name':a8_0x1f6234(0x122),'type':a8_0x1f6234(0xfa),'description':a8_0x1f6234(0x105)},VERBOSE_FLAG],async 'execute'(_0x4b75de){const _0x5c7a60=a8_0x1f6234,_0x37997e=await listRuntimeArtifacts(_0x4b75de[_0x5c7a60(0x12e)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4b75de[_0x5c7a60(0x101)]('source')?{'source':_0x4b75de['str']('source')}:{},...readFavoriteFlag(_0x4b75de)!==undefined?{'favorite':readFavoriteFlag(_0x4b75de)}:{}});return{'ok':!![],'data':{'total':_0x37997e[_0x5c7a60(0x11d)],'items':_0x4b75de[_0x5c7a60(0xfb)](_0x5c7a60(0x104))?_0x37997e:_0x37997e[_0x5c7a60(0xf9)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x1f6234(0x126),'command':a8_0x1f6234(0x118),'description':a8_0x1f6234(0x113),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x1f6234(0x123)}],async 'execute'(_0x3cfa99){const _0x3d8d28=a8_0x1f6234,_0x143067=await getRuntimeArtifact(_0x3cfa99[_0x3d8d28(0xe9)]('id'),_0x3cfa99[_0x3d8d28(0x12e)]);return{'ok':!![],'data':detailArtifact(_0x143067)};}},artifactCreate={'service':'artifact','command':a8_0x1f6234(0x11c),'description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':'write','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x3f71e8){const _0x3bfaf6=a8_0x1f6234,_0x56bca3=buildArtifactInput(_0x3f71e8),_0x153fa4=await createRuntimeArtifact(_0x3f71e8[_0x3bfaf6(0x12e)],_0x56bca3);return{'ok':!![],'data':detailArtifact(_0x153fa4),'message':_0x3bfaf6(0xf6)+_0x153fa4['id']+(_0x153fa4[_0x3bfaf6(0x103)]?'\x20('+_0x153fa4[_0x3bfaf6(0x103)]+')':'')};},async 'dryRun'(_0x5ea585){const _0x176852=a8_0x1f6234,_0x1effdb=buildArtifactInput(_0x5ea585);return dryRun('POST',_0x176852(0xfe))['body']({'appCode':_0x5ea585[_0x176852(0x12e)],..._0x1effdb})['description'](_0x176852(0x115))[_0x176852(0x12a)]();}},artifactUpdate={'service':a8_0x1f6234(0x126),'command':'update','description':a8_0x1f6234(0x11f),'risk':a8_0x1f6234(0xec),'flags':[{...ID_FLAG,'description':a8_0x1f6234(0x123)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x2947bd){const _0x1ae503=a8_0x1f6234,_0x119ae6=_0x2947bd[_0x1ae503(0xe9)]('id'),_0x283050=buildArtifactInput(_0x2947bd),_0x660656=await updateRuntimeArtifact(_0x119ae6,_0x2947bd['appCode'],_0x283050);return{'ok':!![],'data':detailArtifact(_0x660656),'message':'Updated\x20Artifact\x20'+_0x660656['id']+(_0x660656[_0x1ae503(0x103)]?'\x20('+_0x660656[_0x1ae503(0x103)]+')':'')};},async 'dryRun'(_0x31fb74){const _0x2d6e69=a8_0x1f6234,_0x3efe93=_0x31fb74[_0x2d6e69(0xe9)]('id'),_0x591461=buildArtifactInput(_0x31fb74);return dryRun(_0x2d6e69(0xf5),_0x2d6e69(0x107)+_0x3efe93+_0x2d6e69(0x120))[_0x2d6e69(0xe7)]({'appCode':_0x31fb74[_0x2d6e69(0x12e)],..._0x591461})['description'](_0x2d6e69(0x127)+_0x3efe93)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a9_0x23fbd5=a9_0x305b;(function(_0x456c38,_0x301e4b){const _0x4abe22=a9_0x305b,_0x1bdc05=_0x456c38();while(!![]){try{const _0x2fea43=-parseInt(_0x4abe22(0x1bf))/0x1+parseInt(_0x4abe22(0x1c7))/0x2+parseInt(_0x4abe22(0x197))/0x3*(-parseInt(_0x4abe22(0x1cc))/0x4)+-parseInt(_0x4abe22(0x1b9))/0x5*(-parseInt(_0x4abe22(0x19f))/0x6)+-parseInt(_0x4abe22(0x19b))/0x7+-parseInt(_0x4abe22(0x18b))/0x8*(-parseInt(_0x4abe22(0x1af))/0x9)+-parseInt(_0x4abe22(0x1cd))/0xa*(-parseInt(_0x4abe22(0x1de))/0xb);if(_0x2fea43===_0x301e4b)break;else _0x1bdc05['push'](_0x1bdc05['shift']());}catch(_0x1ff518){_0x1bdc05['push'](_0x1bdc05['shift']());}}}(a9_0x50e6,0xb8f99));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';function a9_0x50e6(){const _0x14b983=['global','Read\x20from\x20global\x20config\x20(default)','stdin','yes','Auth\x20mode:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','trim','test','Then\x20verify\x20with:\x20','read','global-default','Option\x20A:\x20','126LARSzc','\x20env\x20var','access-key','init','isTTY','AccessKey\x20saved\x20to\x20','Shorthand\x20for\x20--access-key','str','Clear\x20accessKey\x20from\x20config','repeat','653305RuymTB','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20(via\x20','ClientAk','Option\x20B:\x20apps\x20config\x20(','662647PupPRF','info','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','ACCESS_KEY','\x20Current\x20env:\x20','envName','length','push','2931570DbbaQe','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','project','slice','production','138624LfoPsm','230hnBpen','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Show\x20current\x20authentication\x20status','string','Invalid\x20accessKey\x20format:\x20\x22','validation','boolean','\x20scope.','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Option\x20C:\x20environment\x20variable','join','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','userCenterDisplayName','development','Auth\x20config\x20reinitialized\x20in\x20','929258YqowmW','AccessKey\x20cleared\x20from\x20','No\x20AccessKey\x20found\x20in\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20Verify:\x20','login','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','70624tWygcw','bool','\x20\x20export\x20','Write\x20to\x20global\x20config\x20(default)','daily','\x20auth\x20status','auth','accessKey','env','Missing\x20accessKey.','\x20config','stdout','84skrCOo','write','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','AccessKey:\x20','8906520aXeUCX','\x20doctor','\x20config.','Clear\x20from\x20global\x20config\x20(default)','6wTinuA','=ak_xxx','\x20config.\x20Nothing\x20to\x20clear.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'];a9_0x50e6=function(){return _0x14b983;};return a9_0x50e6();}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 _0x5ad2f2=a9_0x305b;writeCliSideChannelLine(_0x5ad2f2(0x1e1)+PRODUCT_CONFIG[_0x5ad2f2(0x1db)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5ad2f2(0x1a8));}function a9_0x305b(_0x4276a1,_0xf50679){_0x4276a1=_0x4276a1-0x18b;const _0x50e60e=a9_0x50e6();let _0x305b84=_0x50e60e[_0x4276a1];return _0x305b84;}function buildAccessKeySetupGuide(){const _0x3351f5=a9_0x305b;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x3351f5(0x1db)]+':',USER_ACCESS_KEY_CREATE_URL,_0x3351f5(0x1c8)+CLI_BIN_NAME+_0x3351f5(0x1ba)][_0x3351f5(0x1d9)]('\x0a');}function canPromptForAccessKey(_0x31116a){const _0x78419f=a9_0x305b;return!_0x31116a['nonInteractive']&&process[_0x78419f(0x1a5)][_0x78419f(0x1b3)]!==![]&&process[_0x78419f(0x196)][_0x78419f(0x1b3)]!==![];}function resolveAuthScopeFlags(_0x149d64){const _0x3f0a70=a9_0x305b;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x149d64['bool'](_0x3f0a70(0x1a3)),'explicitProject':_0x149d64[_0x3f0a70(0x18c)]('project'),'policy':_0x3f0a70(0x1ad)}));}async function resolveAuthWriteInput(_0x59db4d){const _0x2e250c=a9_0x305b;let _0x5595e9=(_0x59db4d[_0x2e250c(0x1b6)]('access-key')||_0x59db4d[_0x2e250c(0x1b6)]('ak')||'')['trim']();const _0x4c7c44=(_0x59db4d[_0x2e250c(0x1b6)](_0x2e250c(0x193))||'')['trim']();if(!_0x5595e9&&canPromptForAccessKey(_0x59db4d))try{showAccessKeyCreateHint(),_0x5595e9=await promptAccessKey('');}catch(_0x599e50){if(isAbortPrompt(_0x599e50))throw CliErrors['cancelled']();throw _0x599e50;}if(!_0x5595e9)throw CliErrors['validation'](_0x2e250c(0x194),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x2e250c(0x1aa)](_0x5595e9))throw CliErrors[_0x2e250c(0x1d3)](_0x2e250c(0x1d2)+_0x5595e9+'\x22',_0x2e250c(0x1e4));if(!_0x4c7c44)return{'accessKey':_0x5595e9};const _0x50021a=normalizeEnv(_0x4c7c44);return{'accessKey':_0x5595e9,'env':isDaily(_0x50021a)?_0x2e250c(0x18f):isDev(_0x50021a)?_0x2e250c(0x1dc):_0x2e250c(0x1cb)};}export const authDefinitions=[{'service':a9_0x23fbd5(0x191),'command':a9_0x23fbd5(0x1e3),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x23fbd5(0x1b1),'type':a9_0x23fbd5(0x1d1),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':a9_0x23fbd5(0x1b5)},{'name':a9_0x23fbd5(0x1a3),'type':a9_0x23fbd5(0x1d4),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x23fbd5(0x1c9),'type':a9_0x23fbd5(0x1d4),'description':a9_0x23fbd5(0x1c1),'default':![]}],async 'execute'(_0x154107){const _0x6af906=a9_0x23fbd5;if(_0x154107[_0x6af906(0x18c)](_0x6af906(0x1a6)))throw CliErrors[_0x6af906(0x1d3)](_0x6af906(0x1d7),'Use\x20`'+CLI_BIN_NAME+_0x6af906(0x1cf)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x3b647c=(_0x154107['str'](_0x6af906(0x1b1))||_0x154107['str']('ak')||'')[_0x6af906(0x1a9)]();if(!_0x3b647c&&_0x154107['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x45f86f=await resolveAuthWriteInput(_0x154107),_0x39f3bf=resolveAuthScopeFlags(_0x154107),_0x4aa29b=readScopedConfig(_0x39f3bf);_0x4aa29b[_0x6af906(0x192)]=_0x45f86f[_0x6af906(0x192)];_0x45f86f[_0x6af906(0x193)]&&(_0x4aa29b[_0x6af906(0x193)]=_0x45f86f[_0x6af906(0x193)]);writeScopedConfig(_0x4aa29b,_0x39f3bf);const _0x5ac01e=_0x39f3bf[_0x6af906(0x1a3)]?'global':_0x6af906(0x1c9),_0x16b1a0=_0x4aa29b[_0x6af906(0x193)]?_0x6af906(0x1c3)+_0x4aa29b[_0x6af906(0x193)]+'.':'';return{'ok':!![],'message':_0x6af906(0x1b4)+_0x5ac01e+'\x20config.'+_0x16b1a0+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':a9_0x23fbd5(0x1b2),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a9_0x23fbd5(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x23fbd5(0x1b1),'type':a9_0x23fbd5(0x1d1),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x23fbd5(0x1d1),'description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x23fbd5(0x193),'type':a9_0x23fbd5(0x1d1),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a9_0x23fbd5(0x1a3),'type':'boolean','description':a9_0x23fbd5(0x18e),'default':!![]},{'name':a9_0x23fbd5(0x1c9),'type':'boolean','description':a9_0x23fbd5(0x1c1),'default':![]}],async 'execute'(_0x430d01){const _0x4a75f2=a9_0x23fbd5,_0x35a915=await resolveAuthWriteInput(_0x430d01),_0x5f3ddb=resolveAuthScopeFlags(_0x430d01),_0x5742cd={'accessKey':_0x35a915['accessKey']};_0x35a915[_0x4a75f2(0x193)]&&(_0x5742cd[_0x4a75f2(0x193)]=_0x35a915[_0x4a75f2(0x193)]);writeScopedConfig(_0x5742cd,_0x5f3ddb);const _0x364218=_0x5f3ddb[_0x4a75f2(0x1a3)]?'global':'project',_0xa558b8=_0x5742cd[_0x4a75f2(0x193)]?'\x20Current\x20env:\x20'+_0x5742cd[_0x4a75f2(0x193)]+'.':'';return{'ok':!![],'message':_0x4a75f2(0x1dd)+_0x364218+_0x4a75f2(0x1d5)+_0xa558b8+_0x4a75f2(0x1e2)+CLI_BIN_NAME+_0x4a75f2(0x190)};}},{'service':a9_0x23fbd5(0x191),'command':'logout','description':a9_0x23fbd5(0x1b7),'risk':a9_0x23fbd5(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a9_0x23fbd5(0x19e),'default':!![]},{'name':a9_0x23fbd5(0x1c9),'type':'boolean','description':a9_0x23fbd5(0x1d6),'default':![]}],async 'execute'(_0x27ffe9){const _0x25e75c=a9_0x23fbd5,_0x283b8f=resolveAuthScopeFlags(_0x27ffe9),_0x560b74=readScopedConfig(_0x283b8f),_0x3df3f3=!!_0x560b74[_0x25e75c(0x192)];delete _0x560b74[_0x25e75c(0x192)],writeScopedConfig(_0x560b74,_0x283b8f);const _0x490dee=_0x283b8f[_0x25e75c(0x1a3)]?_0x25e75c(0x1a3):_0x25e75c(0x1c9);if(_0x3df3f3)return{'ok':!![],'message':_0x25e75c(0x1df)+_0x490dee+_0x25e75c(0x19d)};return{'ok':!![],'message':_0x25e75c(0x1e0)+_0x490dee+_0x25e75c(0x1a1)};}},{'service':a9_0x23fbd5(0x191),'command':'status','description':a9_0x23fbd5(0x1d0),'risk':a9_0x23fbd5(0x1ac),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x23fbd5(0x1a3),'type':'boolean','description':a9_0x23fbd5(0x1a4),'default':!![]},{'name':a9_0x23fbd5(0x1c9),'type':a9_0x23fbd5(0x1d4),'description':a9_0x23fbd5(0x1da),'default':![]}],async 'execute'(_0x466356){const _0xaea113=a9_0x23fbd5,_0x5cf7a4=resolveAuthScopeFlags(_0x466356),_0x483a23=readScopedConfig(_0x5cf7a4),_0x138649=productEnvName(_0xaea113(0x1c2)),_0x5a932d=productEnv(_0xaea113(0x1c2))||undefined,_0x2d1c31=_0x483a23[_0xaea113(0x192)]||undefined,_0x24121f=_0x5a932d||_0x2d1c31,_0x4592f3=_0x5a932d?_0x138649+_0xaea113(0x1b0):_0x2d1c31?(_0x5cf7a4[_0xaea113(0x1a3)]?_0xaea113(0x1a3):'project')+_0xaea113(0x195):null,_0x2f7b3d=[_0xaea113(0x1a7)+AUTH_MODE[_0xaea113(0x1bd)]];if(_0x24121f){const _0x28f619=_0x24121f['length']>0x8?''+_0x24121f[_0xaea113(0x1ca)](0x0,0x8)+'*'[_0xaea113(0x1b8)](_0x24121f[_0xaea113(0x1c5)]-0x8):_0x24121f;_0x2f7b3d[_0xaea113(0x1c6)](_0xaea113(0x19a)+_0x28f619+(_0x4592f3?_0xaea113(0x1bc)+_0x4592f3+')':''));}return!_0x24121f&&(_0x2f7b3d[_0xaea113(0x1c6)](''),_0x2f7b3d['push'](_0xaea113(0x1bb)),_0x2f7b3d[_0xaea113(0x1c6)](''),_0x2f7b3d[_0xaea113(0x1c6)](_0xaea113(0x1ae)+CLI_BIN_NAME+_0xaea113(0x1ce)),_0x2f7b3d[_0xaea113(0x1c6)](''),_0x2f7b3d['push'](_0xaea113(0x1be)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x2f7b3d[_0xaea113(0x1c6)](_0xaea113(0x1a2)),_0x2f7b3d['push'](''),_0x2f7b3d['push'](_0xaea113(0x1d8)),_0x2f7b3d[_0xaea113(0x1c6)](_0xaea113(0x18d)+_0x138649+_0xaea113(0x1a0)),_0x2f7b3d['push'](''),_0x2f7b3d[_0xaea113(0x1c6)](_0xaea113(0x1ab)+CLI_BIN_NAME+_0xaea113(0x190)),_0x2f7b3d[_0xaea113(0x1c6)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0xaea113(0x19c))),{'ok':!![],'message':_0x2f7b3d[_0xaea113(0x1d9)]('\x0a')};}},{'service':a9_0x23fbd5(0x191),'command':a9_0x23fbd5(0x1c0),'description':a9_0x23fbd5(0x199),'risk':a9_0x23fbd5(0x1ac),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2602c7){const _0x4ab269=a9_0x23fbd5,_0xd47dc7=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0xd47dc7,'meta':{'env':_0x2602c7[_0x4ab269(0x1c4)]??_0x4ab269(0x1cb)}}};}}];
1
+ const a9_0x15a80a=a9_0x3fc1;function a9_0x323d(){const _0x1e9a5b=['11457HzeYiX','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','1264dxZdJu','AccessKey:\x20','status','project','Missing\x20accessKey.','\x20env\x20var','Use\x20`','access-key','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','\x20(via\x20','stdout','string','`auth\x20login`\x20does\x20not\x20support\x20--yes.','str','Write\x20to\x20global\x20config\x20(default)','trim','Invalid\x20accessKey\x20format:\x20\x22','global-default','production','nonInteractive','slice','\x20\x20export\x20','global','accessKey','4iahgrU','login','Clear\x20accessKey\x20from\x20config','70UfpGip','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','push','boolean','ACCESS_KEY','userCenterDisplayName','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Shorthand\x20for\x20--access-key','\x20config','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20Current\x20env:\x20','yes','595347AEpCAZ','=ak_xxx','\x20config.','logout','env','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','276iRPOSD','1267Bmpkip','No\x20AccessKey\x20found\x20in\x20','21703SQzVOi','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','write','length','Auth\x20config\x20reinitialized\x20in\x20','\x20Verify:\x20','development','ClientAk','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','newConfigFileName','Option\x20B:\x20apps\x20config\x20(','init','isTTY','auth','\x20scope.','test','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','validation','bool','Option\x20A:\x20','132202IdAuKE','stdin','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Auth\x20mode:\x20','join','AccessKey\x20cleared\x20from\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','185188tjkpOF','cancelled','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Option\x20C:\x20environment\x20variable','Show\x20current\x20authentication\x20status','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Read\x20from\x20global\x20config\x20(default)','read','182760kydXKV'];a9_0x323d=function(){return _0x1e9a5b;};return a9_0x323d();}(function(_0x1cba2b,_0x4ad4dc){const _0x281ab5=a9_0x3fc1,_0x3198be=_0x1cba2b();while(!![]){try{const _0x3724cd=parseInt(_0x281ab5(0x11f))/0x1+-parseInt(_0x281ab5(0x116))/0x2+-parseInt(_0x281ab5(0xf9))/0x3*(parseInt(_0x281ab5(0x142))/0x4)+-parseInt(_0x281ab5(0x127))/0x5+-parseInt(_0x281ab5(0xff))/0x6*(-parseInt(_0x281ab5(0x100))/0x7)+-parseInt(_0x281ab5(0x12a))/0x8*(-parseInt(_0x281ab5(0x128))/0x9)+parseInt(_0x281ab5(0xed))/0xa*(parseInt(_0x281ab5(0x102))/0xb);if(_0x3724cd===_0x4ad4dc)break;else _0x3198be['push'](_0x3198be['shift']());}catch(_0x10d5d7){_0x3198be['push'](_0x3198be['shift']());}}}(a9_0x323d,0x1a35d));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a9_0x3fc1(_0x366dbd,_0x4dfea1){_0x366dbd=_0x366dbd-0xeb;const _0x323dfc=a9_0x323d();let _0x3fc1c7=_0x323dfc[_0x366dbd];return _0x3fc1c7;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x43a149=a9_0x3fc1;writeCliSideChannelLine(_0x43a149(0xfe)+PRODUCT_CONFIG[_0x43a149(0xf2)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x43a149(0x121));}function buildAccessKeySetupGuide(){const _0x264340=a9_0x3fc1;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x264340(0x129)][_0x264340(0x11c)]('\x0a');}function canPromptForAccessKey(_0x5b836f){const _0x4afba4=a9_0x3fc1;return!_0x5b836f['nonInteractive']&&process[_0x4afba4(0x117)]['isTTY']!==![]&&process[_0x4afba4(0x134)][_0x4afba4(0x10e)]!==![];}function resolveAuthScopeFlags(_0x4b80e7){const _0x56faee=a9_0x3fc1;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4b80e7[_0x56faee(0x114)](_0x56faee(0x140)),'explicitProject':_0x4b80e7[_0x56faee(0x114)](_0x56faee(0x12d)),'policy':_0x56faee(0x13b)}));}async function resolveAuthWriteInput(_0x386ee9){const _0x3dc688=a9_0x3fc1;let _0x1ce189=(_0x386ee9[_0x3dc688(0x137)](_0x3dc688(0x131))||_0x386ee9[_0x3dc688(0x137)]('ak')||'')['trim']();const _0x783f40=(_0x386ee9[_0x3dc688(0x137)]('env')||'')['trim']();if(!_0x1ce189&&canPromptForAccessKey(_0x386ee9))try{showAccessKeyCreateHint(),_0x1ce189=await promptAccessKey('');}catch(_0x1f8d23){if(isAbortPrompt(_0x1f8d23))throw CliErrors[_0x3dc688(0x120)]();throw _0x1f8d23;}if(!_0x1ce189)throw CliErrors[_0x3dc688(0x113)](_0x3dc688(0x12e),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3dc688(0x111)](_0x1ce189))throw CliErrors[_0x3dc688(0x113)](_0x3dc688(0x13a)+_0x1ce189+'\x22',_0x3dc688(0x132));if(!_0x783f40)return{'accessKey':_0x1ce189};const _0x5cb2dc=normalizeEnv(_0x783f40);return{'accessKey':_0x1ce189,'env':isDaily(_0x5cb2dc)?'daily':isDev(_0x5cb2dc)?_0x3dc688(0x108):_0x3dc688(0x13c)};}export const authDefinitions=[{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0xeb),'description':a9_0x15a80a(0x124),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x15a80a(0x135),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x15a80a(0x135),'description':a9_0x15a80a(0xf4)},{'name':a9_0x15a80a(0x140),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x138),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x112),'default':![]}],async 'execute'(_0x15ff29){const _0x2ce4b5=a9_0x15a80a;if(_0x15ff29[_0x2ce4b5(0x114)](_0x2ce4b5(0xf8)))throw CliErrors[_0x2ce4b5(0x113)](_0x2ce4b5(0x136),_0x2ce4b5(0x130)+CLI_BIN_NAME+_0x2ce4b5(0xee)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x4dd601=(_0x15ff29[_0x2ce4b5(0x137)](_0x2ce4b5(0x131))||_0x15ff29[_0x2ce4b5(0x137)]('ak')||'')[_0x2ce4b5(0x139)]();if(!_0x4dd601&&_0x15ff29[_0x2ce4b5(0x13d)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x50f889=await resolveAuthWriteInput(_0x15ff29),_0x5ad57d=resolveAuthScopeFlags(_0x15ff29),_0x48fc74=readScopedConfig(_0x5ad57d);_0x48fc74['accessKey']=_0x50f889[_0x2ce4b5(0x141)];_0x50f889[_0x2ce4b5(0xfd)]&&(_0x48fc74['env']=_0x50f889[_0x2ce4b5(0xfd)]);writeScopedConfig(_0x48fc74,_0x5ad57d);const _0xc5b088=_0x5ad57d[_0x2ce4b5(0x140)]?_0x2ce4b5(0x140):'project',_0x48340f=_0x48fc74[_0x2ce4b5(0xfd)]?_0x2ce4b5(0xf7)+_0x48fc74[_0x2ce4b5(0xfd)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0xc5b088+_0x2ce4b5(0xfb)+_0x48340f+_0x2ce4b5(0x107)+CLI_BIN_NAME+_0x2ce4b5(0x119)};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0x10d),'description':a9_0x15a80a(0x11a),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x15a80a(0x135),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':a9_0x15a80a(0xf4)},{'name':a9_0x15a80a(0xfd),'type':a9_0x15a80a(0x135),'description':a9_0x15a80a(0x11e)},{'name':'global','type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x138),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x112),'default':![]}],async 'execute'(_0x39a1b3){const _0x3d031c=a9_0x15a80a,_0x458694=await resolveAuthWriteInput(_0x39a1b3),_0x5f329d=resolveAuthScopeFlags(_0x39a1b3),_0x5d0cc3={'accessKey':_0x458694['accessKey']};_0x458694[_0x3d031c(0xfd)]&&(_0x5d0cc3[_0x3d031c(0xfd)]=_0x458694[_0x3d031c(0xfd)]);writeScopedConfig(_0x5d0cc3,_0x5f329d);const _0x3dd150=_0x5f329d[_0x3d031c(0x140)]?_0x3d031c(0x140):_0x3d031c(0x12d),_0x5e9b98=_0x5d0cc3['env']?_0x3d031c(0xf7)+_0x5d0cc3[_0x3d031c(0xfd)]+'.':'';return{'ok':!![],'message':_0x3d031c(0x106)+_0x3dd150+_0x3d031c(0x110)+_0x5e9b98+'\x20Verify:\x20'+CLI_BIN_NAME+_0x3d031c(0x119)};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0xfc),'description':a9_0x15a80a(0xec),'risk':a9_0x15a80a(0x104),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x15a80a(0x140),'type':a9_0x15a80a(0xf0),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x56ec6a){const _0x470c2f=a9_0x15a80a,_0x4014c7=resolveAuthScopeFlags(_0x56ec6a),_0x16576d=readScopedConfig(_0x4014c7),_0x1e043d=!!_0x16576d['accessKey'];delete _0x16576d[_0x470c2f(0x141)],writeScopedConfig(_0x16576d,_0x4014c7);const _0x2396b0=_0x4014c7[_0x470c2f(0x140)]?_0x470c2f(0x140):_0x470c2f(0x12d);if(_0x1e043d)return{'ok':!![],'message':_0x470c2f(0x11d)+_0x2396b0+_0x470c2f(0xfb)};return{'ok':!![],'message':_0x470c2f(0x101)+_0x2396b0+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a9_0x15a80a(0x10f),'command':a9_0x15a80a(0x12c),'description':a9_0x15a80a(0x123),'risk':a9_0x15a80a(0x126),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x125),'default':!![]},{'name':a9_0x15a80a(0x12d),'type':a9_0x15a80a(0xf0),'description':a9_0x15a80a(0x10a),'default':![]}],async 'execute'(_0x34ed53){const _0x4fe425=a9_0x15a80a,_0x20e901=resolveAuthScopeFlags(_0x34ed53),_0x3f1445=readScopedConfig(_0x20e901),_0x2b4e2f=productEnvName(_0x4fe425(0xf1)),_0x1e82cb=productEnv('ACCESS_KEY')||undefined,_0x2d819b=_0x3f1445[_0x4fe425(0x141)]||undefined,_0x571ffd=_0x1e82cb||_0x2d819b,_0x4abc30=_0x1e82cb?_0x2b4e2f+_0x4fe425(0x12f):_0x2d819b?(_0x20e901[_0x4fe425(0x140)]?_0x4fe425(0x140):_0x4fe425(0x12d))+_0x4fe425(0xf5):null,_0x138f25=[_0x4fe425(0x11b)+AUTH_MODE[_0x4fe425(0x109)]];if(_0x571ffd){const _0x4acfe5=_0x571ffd[_0x4fe425(0x105)]>0x8?''+_0x571ffd[_0x4fe425(0x13e)](0x0,0x8)+'*'['repeat'](_0x571ffd[_0x4fe425(0x105)]-0x8):_0x571ffd;_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x12b)+_0x4acfe5+(_0x4abc30?_0x4fe425(0x133)+_0x4abc30+')':''));}return!_0x571ffd&&(_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0xf6)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x115)+CLI_BIN_NAME+_0x4fe425(0xf3)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x10c)+PRODUCT_CONFIG[_0x4fe425(0x10b)]+')'),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x103)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x122)),_0x138f25[_0x4fe425(0xef)](_0x4fe425(0x13f)+_0x2b4e2f+_0x4fe425(0xfa)),_0x138f25[_0x4fe425(0xef)](''),_0x138f25['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4fe425(0x119)),_0x138f25[_0x4fe425(0xef)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x138f25[_0x4fe425(0x11c)]('\x0a')};}},{'service':'auth','command':'info','description':a9_0x15a80a(0x118),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3b43d7){const _0x2f55e7=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2f55e7,'meta':{'env':_0x3b43d7['envName']??'production'}}};}}];
@@ -1 +1 @@
1
- (function(_0x4f9eba,_0x59765d){const _0x5d970c=a10_0x674f,_0x4a0194=_0x4f9eba();while(!![]){try{const _0x308e54=parseInt(_0x5d970c(0x7f))/0x1*(parseInt(_0x5d970c(0x79))/0x2)+parseInt(_0x5d970c(0x6e))/0x3*(-parseInt(_0x5d970c(0x66))/0x4)+parseInt(_0x5d970c(0x7a))/0x5*(-parseInt(_0x5d970c(0x6a))/0x6)+parseInt(_0x5d970c(0x7c))/0x7+parseInt(_0x5d970c(0x75))/0x8+parseInt(_0x5d970c(0x6d))/0x9*(-parseInt(_0x5d970c(0x67))/0xa)+-parseInt(_0x5d970c(0x69))/0xb*(-parseInt(_0x5d970c(0x7e))/0xc);if(_0x308e54===_0x59765d)break;else _0x4a0194['push'](_0x4a0194['shift']());}catch(_0x2929fa){_0x4a0194['push'](_0x4a0194['shift']());}}}(a10_0x23c4,0x37fb2));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x2d6b81=a10_0x674f;super(_0x2d6b81(0x73)),this[_0x2d6b81(0x72)]=_0x2d6b81(0x68);}}function createSafeRl(){const _0x55f8bf=a10_0x674f,_0x48306e=createInterface({'input':process[_0x55f8bf(0x78)],'output':process[_0x55f8bf(0x70)]});let _0x5bfbe1;const _0x1c61b=new Promise((_0x422967,_0x1f8071)=>{const _0x59cec8=_0x55f8bf;_0x5bfbe1=()=>{const _0x3f51ce=a10_0x674f;_0x5bfbe1&&(_0x48306e[_0x3f51ce(0x6f)](_0x3f51ce(0x7d),_0x5bfbe1),_0x5bfbe1=undefined);try{_0x48306e['close']();}catch{}_0x1f8071(new AbortPrompt());},_0x48306e[_0x59cec8(0x74)]('SIGINT',_0x5bfbe1);}),_0x5c6c5c=()=>{const _0x24f91e=_0x55f8bf;_0x5bfbe1&&(_0x48306e[_0x24f91e(0x6f)](_0x24f91e(0x7d),_0x5bfbe1),_0x5bfbe1=undefined);try{_0x48306e[_0x24f91e(0x7b)]();}catch{}};return{'rl':_0x48306e,'abortPromise':_0x1c61b,'disposeSuccess':_0x5c6c5c};}export async function promptAccessKey(_0x3b5ba2=''){const _0x1f8c23=a10_0x674f,{rl:_0x204461,abortPromise:_0x5c786e,disposeSuccess:_0x15e9d2}=createSafeRl(),_0x60c5ee=new Promise(_0x54fc8f=>{const _0x209f59=a10_0x674f,_0x1a525b=_0x3b5ba2?_0x209f59(0x6b)+_0x3b5ba2+_0x209f59(0x76):_0x209f59(0x71);_0x204461[_0x209f59(0x65)](_0x1a525b,_0xd4d9af=>{const _0x4b13a6=_0x209f59;_0x15e9d2(),_0x54fc8f(_0xd4d9af[_0x4b13a6(0x6c)]()||_0x3b5ba2);});});return Promise[_0x1f8c23(0x77)]([_0x60c5ee,_0x5c786e]);}function a10_0x674f(_0x11681a,_0x4b8231){_0x11681a=_0x11681a-0x65;const _0x23c445=a10_0x23c4();let _0x674f75=_0x23c445[_0x11681a];return _0x674f75;}export function isAbortPrompt(_0x13637e){const _0x2f17ea=a10_0x674f;return _0x13637e instanceof Error&&_0x13637e[_0x2f17ea(0x72)]===_0x2f17ea(0x68);}function a10_0x23c4(){const _0x434c6e=['276KaqiZv','164158wqOFvV','question','1484668tlDceH','740340tVsUZK','AbortPrompt','124619csXLYs','102IFmzpZ','AccessKey\x20(','trim','18PHIQFz','3oLeCUO','removeListener','stdout','AccessKey\x20(paste\x20ak_...):\x20','name','User\x20aborted\x20prompt','once','2164064kjiafz','):\x20','race','stdin','4QnAjYC','107635wSiYqS','close','1785707UltTPb','SIGINT'];a10_0x23c4=function(){return _0x434c6e;};return a10_0x23c4();}
1
+ function a10_0x1e79(){const _0x30f60a=['name','question','36LsBaxG','stdout','18fssXxv','once','stdin','1328129Pnqvym','1153592qVntQC','SIGINT','334386AjItKy','481875QlSrcz','removeListener','7nMswnf','User\x20aborted\x20prompt','AbortPrompt','10VpCIHl','45978cOKEoZ','close','1633782rRGiGa','race','23872zZdHgc'];a10_0x1e79=function(){return _0x30f60a;};return a10_0x1e79();}(function(_0x5ce7bc,_0x3471de){const _0x2aca18=a10_0x4f45,_0x1cef48=_0x5ce7bc();while(!![]){try{const _0x5ce4bc=-parseInt(_0x2aca18(0x13d))/0x1*(-parseInt(_0x2aca18(0x138))/0x2)+-parseInt(_0x2aca18(0x14a))/0x3*(parseInt(_0x2aca18(0x13b))/0x4)+parseInt(_0x2aca18(0x144))/0x5+parseInt(_0x2aca18(0x136))/0x6*(parseInt(_0x2aca18(0x146))/0x7)+-parseInt(_0x2aca18(0x141))/0x8+-parseInt(_0x2aca18(0x143))/0x9*(-parseInt(_0x2aca18(0x149))/0xa)+-parseInt(_0x2aca18(0x140))/0xb;if(_0x5ce4bc===_0x3471de)break;else _0x1cef48['push'](_0x1cef48['shift']());}catch(_0x1afdd8){_0x1cef48['push'](_0x1cef48['shift']());}}}(a10_0x1e79,0x352ca));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x8ebea3=a10_0x4f45;super(_0x8ebea3(0x147)),this[_0x8ebea3(0x139)]=_0x8ebea3(0x148);}}function createSafeRl(){const _0x19e52f=a10_0x4f45,_0x1a5245=createInterface({'input':process[_0x19e52f(0x13f)],'output':process[_0x19e52f(0x13c)]});let _0x2c0ebd;const _0x210d88=new Promise((_0x38674e,_0x4c910b)=>{const _0x8dcdde=_0x19e52f;_0x2c0ebd=()=>{const _0x422bab=a10_0x4f45;_0x2c0ebd&&(_0x1a5245[_0x422bab(0x145)](_0x422bab(0x142),_0x2c0ebd),_0x2c0ebd=undefined);try{_0x1a5245[_0x422bab(0x14b)]();}catch{}_0x4c910b(new AbortPrompt());},_0x1a5245[_0x8dcdde(0x13e)](_0x8dcdde(0x142),_0x2c0ebd);}),_0x84c886=()=>{const _0x10b59a=_0x19e52f;_0x2c0ebd&&(_0x1a5245['removeListener']('SIGINT',_0x2c0ebd),_0x2c0ebd=undefined);try{_0x1a5245[_0x10b59a(0x14b)]();}catch{}};return{'rl':_0x1a5245,'abortPromise':_0x210d88,'disposeSuccess':_0x84c886};}export async function promptAccessKey(_0xc9095=''){const _0x548cc4=a10_0x4f45,{rl:_0x3f2786,abortPromise:_0x464ea5,disposeSuccess:_0x3ac2b4}=createSafeRl(),_0x5edebb=new Promise(_0x249018=>{const _0x530b82=a10_0x4f45,_0x2af1ba=_0xc9095?'AccessKey\x20('+_0xc9095+'):\x20':'AccessKey\x20(paste\x20ak_...):\x20';_0x3f2786[_0x530b82(0x13a)](_0x2af1ba,_0x11bcee=>{_0x3ac2b4(),_0x249018(_0x11bcee['trim']()||_0xc9095);});});return Promise[_0x548cc4(0x137)]([_0x5edebb,_0x464ea5]);}function a10_0x4f45(_0x1d5d15,_0x573720){_0x1d5d15=_0x1d5d15-0x136;const _0x1e791b=a10_0x1e79();let _0x4f45a4=_0x1e791b[_0x1d5d15];return _0x4f45a4;}export function isAbortPrompt(_0x168d7c){const _0x1c620d=a10_0x4f45;return _0x168d7c instanceof Error&&_0x168d7c[_0x1c620d(0x139)]===_0x1c620d(0x148);}
@@ -1 +1 @@
1
- function a11_0x1848(){const _0x2dbb34=['207536HDwowW','num','(none)','scriptType','description','5747038ujPMEz','createdTime','read','bool','bff','134912FJJeCN','119PJFDOx','2MhNmCx','10vpjyMh','Get\x20BFF\x20script\x20details\x20by\x20ID','1123374zyYeSG','979308xfuiYQ','updatedTime','functionName','1263921UlKniX','59177EeazDu','5HfZYXI'];a11_0x1848=function(){return _0x2dbb34;};return a11_0x1848();}const a11_0x1a2248=a11_0x4452;(function(_0x2772d,_0x38201a){const _0x12c228=a11_0x4452,_0x3b4589=_0x2772d();while(!![]){try{const _0x34dee2=-parseInt(_0x12c228(0x13e))/0x1+-parseInt(_0x12c228(0x136))/0x2*(parseInt(_0x12c228(0x13d))/0x3)+-parseInt(_0x12c228(0x134))/0x4+-parseInt(_0x12c228(0x13f))/0x5*(parseInt(_0x12c228(0x139))/0x6)+parseInt(_0x12c228(0x135))/0x7*(parseInt(_0x12c228(0x140))/0x8)+parseInt(_0x12c228(0x13a))/0x9*(parseInt(_0x12c228(0x137))/0xa)+parseInt(_0x12c228(0x145))/0xb;if(_0x34dee2===_0x38201a)break;else _0x3b4589['push'](_0x3b4589['shift']());}catch(_0x1d12ba){_0x3b4589['push'](_0x3b4589['shift']());}}}(a11_0x1848,0x5a89b));function a11_0x4452(_0x30fdc2,_0x5d1e6b){_0x30fdc2=_0x30fdc2-0x132;const _0x18483f=a11_0x1848();let _0x4452cd=_0x18483f[_0x30fdc2];return _0x4452cd;}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0x1a2248(0x133),'command':'detail','description':a11_0x1a2248(0x138),'risk':a11_0x1a2248(0x147),'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x23782e){const _0x537474=a11_0x1a2248,_0x598bb8=await getBffScriptInfo(_0x23782e[_0x537474(0x141)]('id')),_0x3e159a=_0x23782e[_0x537474(0x132)]('verbose');if(_0x3e159a)return{'ok':!![],'data':_0x598bb8};return{'ok':!![],'data':{'id':_0x598bb8['id'],'appCode':_0x598bb8['appCode'],'functionName':_0x598bb8[_0x537474(0x13c)]??'','scriptType':_0x598bb8[_0x537474(0x143)],'description':_0x598bb8[_0x537474(0x144)]||_0x537474(0x142),'createdTime':_0x598bb8[_0x537474(0x146)]??'','updatedTime':_0x598bb8[_0x537474(0x13b)]??''}};}};
1
+ const a11_0x41ebb8=a11_0x46a2;(function(_0x42f8b0,_0x474378){const _0x46404=a11_0x46a2,_0x57c70b=_0x42f8b0();while(!![]){try{const _0x27bfdb=-parseInt(_0x46404(0x18f))/0x1*(parseInt(_0x46404(0x184))/0x2)+-parseInt(_0x46404(0x187))/0x3+-parseInt(_0x46404(0x193))/0x4+-parseInt(_0x46404(0x18d))/0x5+-parseInt(_0x46404(0x188))/0x6*(parseInt(_0x46404(0x194))/0x7)+-parseInt(_0x46404(0x192))/0x8*(-parseInt(_0x46404(0x180))/0x9)+parseInt(_0x46404(0x18b))/0xa*(parseInt(_0x46404(0x17e))/0xb);if(_0x27bfdb===_0x474378)break;else _0x57c70b['push'](_0x57c70b['shift']());}catch(_0x45852c){_0x57c70b['push'](_0x57c70b['shift']());}}}(a11_0x5057,0x66474));function a11_0x46a2(_0x160ee6,_0x3e912c){_0x160ee6=_0x160ee6-0x17e;const _0x50572d=a11_0x5057();let _0x46a273=_0x50572d[_0x160ee6];return _0x46a273;}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0x41ebb8(0x185),'command':a11_0x41ebb8(0x189),'description':a11_0x41ebb8(0x18c),'risk':'read','flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x533896){const _0x2e7bf3=a11_0x41ebb8,_0xfb0fab=await getBffScriptInfo(_0x533896[_0x2e7bf3(0x190)]('id')),_0x45405b=_0x533896[_0x2e7bf3(0x186)](_0x2e7bf3(0x182));if(_0x45405b)return{'ok':!![],'data':_0xfb0fab};return{'ok':!![],'data':{'id':_0xfb0fab['id'],'appCode':_0xfb0fab[_0x2e7bf3(0x181)],'functionName':_0xfb0fab['functionName']??'','scriptType':_0xfb0fab[_0x2e7bf3(0x17f)],'description':_0xfb0fab[_0x2e7bf3(0x18e)]||_0x2e7bf3(0x191),'createdTime':_0xfb0fab[_0x2e7bf3(0x18a)]??'','updatedTime':_0xfb0fab[_0x2e7bf3(0x183)]??''}};}};function a11_0x5057(){const _0x5e3f2a=['bool','1992348einXyL','2160JtftXT','detail','createdTime','1672610iUXjBL','Get\x20BFF\x20script\x20details\x20by\x20ID','2861765QoHhCB','description','247aeiXKB','num','(none)','17560XUrDrW','1002764KTmvml','126QqjGxC','176acRqqL','scriptType','279uICnnv','appCode','verbose','updatedTime','6734GzfhAO','bff'];a11_0x5057=function(){return _0x5e3f2a;};return a11_0x5057();}
@@ -1 +1 @@
1
- const a12_0x2dbb1a=a12_0x2214;function a12_0x2214(_0x4e66c3,_0xa9c13){_0x4e66c3=_0x4e66c3-0x169;const _0xb33e66=a12_0xb33e();let _0x221446=_0xb33e66[_0x4e66c3];return _0x221446;}(function(_0x47125f,_0x1f3c46){const _0x22e1da=a12_0x2214,_0xc5fb69=_0x47125f();while(!![]){try{const _0x2b9a58=-parseInt(_0x22e1da(0x16b))/0x1+-parseInt(_0x22e1da(0x172))/0x2+parseInt(_0x22e1da(0x175))/0x3+parseInt(_0x22e1da(0x16a))/0x4*(-parseInt(_0x22e1da(0x170))/0x5)+-parseInt(_0x22e1da(0x17a))/0x6+parseInt(_0x22e1da(0x177))/0x7+parseInt(_0x22e1da(0x16d))/0x8*(parseInt(_0x22e1da(0x16e))/0x9);if(_0x2b9a58===_0x1f3c46)break;else _0xc5fb69['push'](_0xc5fb69['shift']());}catch(_0x5a12b2){_0xc5fb69['push'](_0xc5fb69['shift']());}}}(a12_0xb33e,0xaadca));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a12_0x2dbb1a(0x171),'command':a12_0x2dbb1a(0x178),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a12_0x2dbb1a(0x176),'flags':[{...NAME_FLAG,'required':!![],'description':a12_0x2dbb1a(0x173)},PARAMS_FLAG],async 'execute'(_0x3b45af){const _0xb4e2b5=a12_0x2dbb1a,_0x10ecca=parseJsonParams(_0x3b45af[_0xb4e2b5(0x174)](_0xb4e2b5(0x16c))),_0x6ad336=Date[_0xb4e2b5(0x179)](),_0xc4c958=await executeSdkBff(_0x3b45af[_0xb4e2b5(0x174)](_0xb4e2b5(0x16f)),_0x10ecca),_0x15585a=Date['now']()-_0x6ad336;return{'ok':!![],'data':{'result':_0xc4c958,'elapsed':_0x15585a},'message':_0xb4e2b5(0x169)+_0x15585a+'ms'};}};function a12_0xb33e(){const _0x342df7=['params','14577776COMKpk','9QNeDre','name','265dmhumc','bff','1332190pNnFKg','BFF\x20function\x20name\x20to\x20execute','str','2127945AoEgUJ','read','167909baDOsq','exec','now','1322736vFyhXZ','BFF\x20executed\x20in\x20','39188cqtJAp','449882SiCGAQ'];a12_0xb33e=function(){return _0x342df7;};return a12_0xb33e();}
1
+ function a12_0x47bd(){const _0x2d2039=['528130NJpnhh','101511EaejvS','2425360zIortH','now','name','303635vVHoMb','params','str','BFF\x20executed\x20in\x20','46OlTgOu','30iTtjUz','bff','6186141NNdGJB','3919818BEWbtG','read','3504824MxEkkH'];a12_0x47bd=function(){return _0x2d2039;};return a12_0x47bd();}const a12_0x2aaf28=a12_0x5bbd;(function(_0x2a5dd6,_0x923973){const _0x51dd3d=a12_0x5bbd,_0x1e7cc9=_0x2a5dd6();while(!![]){try{const _0x3436bf=-parseInt(_0x51dd3d(0x1b8))/0x1+-parseInt(_0x51dd3d(0x1bc))/0x2*(parseInt(_0x51dd3d(0x1b4))/0x3)+parseInt(_0x51dd3d(0x1c2))/0x4+parseInt(_0x51dd3d(0x1b3))/0x5*(parseInt(_0x51dd3d(0x1bd))/0x6)+parseInt(_0x51dd3d(0x1c0))/0x7+parseInt(_0x51dd3d(0x1b5))/0x8+-parseInt(_0x51dd3d(0x1bf))/0x9;if(_0x3436bf===_0x923973)break;else _0x1e7cc9['push'](_0x1e7cc9['shift']());}catch(_0x4c41de){_0x1e7cc9['push'](_0x1e7cc9['shift']());}}}(a12_0x47bd,0x79a45));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a12_0x5bbd(_0x49448f,_0x566460){_0x49448f=_0x49448f-0x1b3;const _0x47bd09=a12_0x47bd();let _0x5bbd76=_0x47bd09[_0x49448f];return _0x5bbd76;}export const bffExec={'service':a12_0x2aaf28(0x1be),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a12_0x2aaf28(0x1c1),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x37bf3a){const _0xedf7ff=a12_0x2aaf28,_0x40c449=parseJsonParams(_0x37bf3a['str'](_0xedf7ff(0x1b9))),_0x5f0aad=Date[_0xedf7ff(0x1b6)](),_0xac218d=await executeSdkBff(_0x37bf3a[_0xedf7ff(0x1ba)](_0xedf7ff(0x1b7)),_0x40c449),_0x2c32ce=Date[_0xedf7ff(0x1b6)]()-_0x5f0aad;return{'ok':!![],'data':{'result':_0xac218d,'elapsed':_0x2c32ce},'message':_0xedf7ff(0x1bb)+_0x2c32ce+'ms'};}};
@@ -1 +1 @@
1
- function a13_0x462c(){const _0x391ba0=['65iexxPx','261010IgvKTc','832257oKdVtx','39174KsUtqU','426664hLGcIJ','258482uAJyne','18AqBPlP','2402PkhZrS','684frjeOe','92856YrWLVB'];a13_0x462c=function(){return _0x391ba0;};return a13_0x462c();}function a13_0x5681(_0x2d84ba,_0x343286){_0x2d84ba=_0x2d84ba-0x9a;const _0x462c99=a13_0x462c();let _0x56817b=_0x462c99[_0x2d84ba];return _0x56817b;}(function(_0xb05dec,_0x48c519){const _0x5a3dd2=a13_0x5681,_0x3fb6fb=_0xb05dec();while(!![]){try{const _0x49c1e9=parseInt(_0x5a3dd2(0x9a))/0x1+parseInt(_0x5a3dd2(0x9e))/0x2*(-parseInt(_0x5a3dd2(0x9f))/0x3)+-parseInt(_0x5a3dd2(0xa0))/0x4*(-parseInt(_0x5a3dd2(0xa1))/0x5)+-parseInt(_0x5a3dd2(0x9d))/0x6*(-parseInt(_0x5a3dd2(0x9c))/0x7)+parseInt(_0x5a3dd2(0x9b))/0x8+-parseInt(_0x5a3dd2(0xa3))/0x9+parseInt(_0x5a3dd2(0xa2))/0xa;if(_0x49c1e9===_0x48c519)break;else _0x3fb6fb['push'](_0x3fb6fb['shift']());}catch(_0x34d2af){_0x3fb6fb['push'](_0x3fb6fb['shift']());}}}(a13_0x462c,0x28403));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
1
+ (function(_0x51cf1b,_0x4ee372){const _0x1074b8=a13_0x3d28,_0x178bdb=_0x51cf1b();while(!![]){try{const _0x145495=parseInt(_0x1074b8(0x8e))/0x1*(-parseInt(_0x1074b8(0x94))/0x2)+-parseInt(_0x1074b8(0x8f))/0x3*(parseInt(_0x1074b8(0x96))/0x4)+-parseInt(_0x1074b8(0x8d))/0x5*(parseInt(_0x1074b8(0x97))/0x6)+parseInt(_0x1074b8(0x91))/0x7*(-parseInt(_0x1074b8(0x90))/0x8)+parseInt(_0x1074b8(0x95))/0x9*(-parseInt(_0x1074b8(0x8c))/0xa)+-parseInt(_0x1074b8(0x93))/0xb+parseInt(_0x1074b8(0x92))/0xc;if(_0x145495===_0x4ee372)break;else _0x178bdb['push'](_0x178bdb['shift']());}catch(_0x25895f){_0x178bdb['push'](_0x178bdb['shift']());}}}(a13_0x2af9,0x6697c));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a13_0x3d28(_0x4b8768,_0x3b6495){_0x4b8768=_0x4b8768-0x8c;const _0x2af985=a13_0x2af9();let _0x3d28d6=_0x2af985[_0x4b8768];return _0x3d28d6;}function a13_0x2af9(){const _0xe18a35=['2XcMUEw','9zAgXGK','4Dbcxzp','2882562vsagkS','2819360LMCEsA','5OXSDXY','302015PsrKWe','1164969DBSFsD','3677816LIKRFb','7RSiJww','30084984mnWlwx','1918774gwBXjc'];a13_0x2af9=function(){return _0xe18a35;};return a13_0x2af9();}export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- const a14_0x4ccd96=a14_0x246f;(function(_0x184510,_0x343cb5){const _0x46556a=a14_0x246f,_0x3f7dd9=_0x184510();while(!![]){try{const _0x17e376=-parseInt(_0x46556a(0x120))/0x1+parseInt(_0x46556a(0x12d))/0x2*(-parseInt(_0x46556a(0x11f))/0x3)+-parseInt(_0x46556a(0x11c))/0x4*(parseInt(_0x46556a(0x118))/0x5)+parseInt(_0x46556a(0x127))/0x6*(parseInt(_0x46556a(0x12e))/0x7)+parseInt(_0x46556a(0x117))/0x8+-parseInt(_0x46556a(0x11d))/0x9+-parseInt(_0x46556a(0x12c))/0xa*(-parseInt(_0x46556a(0x11b))/0xb);if(_0x17e376===_0x343cb5)break;else _0x3f7dd9['push'](_0x3f7dd9['shift']());}catch(_0x1340d3){_0x3f7dd9['push'](_0x3f7dd9['shift']());}}}(a14_0x2525,0x2ba44));import{CliErrors}from'../../errors.js';function a14_0x246f(_0x5595d4,_0x4491f9){_0x5595d4=_0x5595d4-0x117;const _0x252526=a14_0x2525();let _0x246fd7=_0x252526[_0x5595d4];return _0x246fd7;}import{logger}from'../../utils/logger.js';function a14_0x2525(){const _0x500fcc=['npx\x20skills\x20add\x20failed:\x20','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','unknown','cli-skill-install','608576nsCFEq','298685TEAoQM','skipped','setLogPath','418WulkBq','20KajXUA','2762784lCCQCS','nonInteractive','422283IBAoby','266494aSnBgu','../../skills/npx-skills-add.js','\x20-g\x20-y','install','inherit','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','write','5418AtAIxW','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(','cwd','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','287610BCVxFm','4dYSeHf','1267IkIuJc','log'];a14_0x2525=function(){return _0x500fcc;};return a14_0x2525();}export const cliSkillDefinitions=[{'service':'cli-skill','command':a14_0x4ccd96(0x123),'description':a14_0x4ccd96(0x131),'risk':a14_0x4ccd96(0x126),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x48d33b){const _0x3f8e40=a14_0x4ccd96;logger[_0x3f8e40(0x11a)](process[_0x3f8e40(0x12a)]()),logger['info'](_0x3f8e40(0x134),_0x3f8e40(0x125));const {LOVRABET_SKILL_SOURCE:_0x5b7d57,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x3ca4a5,runNpxSkillsAddGlobal:_0x48135e}=await import(_0x3f8e40(0x121)),_0x26b680=_0x48d33b[_0x3f8e40(0x11e)]?'pipe':_0x3f8e40(0x124);console[_0x3f8e40(0x12f)](_0x3f8e40(0x12b)+_0x5b7d57+'\x20-g\x20-y)...');const _0x416bc3=_0x48135e(process[_0x3f8e40(0x12a)](),_0x5b7d57,{'stdio':_0x26b680});if(_0x416bc3[_0x3f8e40(0x119)])console[_0x3f8e40(0x12f)](_0x3f8e40(0x129)+_0x3ca4a5+_0x3f8e40(0x132));else{if(_0x416bc3['ok'])console[_0x3f8e40(0x12f)](_0x3f8e40(0x128));else throw CliErrors['apiError'](_0x3f8e40(0x130)+(_0x416bc3['error']||_0x3f8e40(0x133)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x5b7d57+_0x3f8e40(0x122));}return{'ok':!![]};}}];
1
+ const a14_0x12d173=a14_0x2e00;function a14_0x2e00(_0x51586c,_0x45e232){_0x51586c=_0x51586c-0x192;const _0xaef444=a14_0xaef4();let _0x2e0083=_0xaef444[_0x51586c];return _0x2e0083;}(function(_0x144dda,_0x1ab48f){const _0x5ec035=a14_0x2e00,_0x298bac=_0x144dda();while(!![]){try{const _0x48c4e9=-parseInt(_0x5ec035(0x1aa))/0x1+-parseInt(_0x5ec035(0x19e))/0x2+parseInt(_0x5ec035(0x1a5))/0x3*(parseInt(_0x5ec035(0x19d))/0x4)+parseInt(_0x5ec035(0x196))/0x5+-parseInt(_0x5ec035(0x193))/0x6*(parseInt(_0x5ec035(0x1b0))/0x7)+parseInt(_0x5ec035(0x1a9))/0x8*(parseInt(_0x5ec035(0x1a8))/0x9)+-parseInt(_0x5ec035(0x1a3))/0xa*(-parseInt(_0x5ec035(0x1ae))/0xb);if(_0x48c4e9===_0x1ab48f)break;else _0x298bac['push'](_0x298bac['shift']());}catch(_0x4bddc2){_0x298bac['push'](_0x298bac['shift']());}}}(a14_0xaef4,0xe70d8));function a14_0xaef4(){const _0x40cc59=['skipped','cli-skill','5108lQCWXf','2076048sfJfJM','cli-skill-install','CLI\x20Built-in\x20Skill\x20installed','error','nonInteractive','270XavarF','unknown','3693VJXRZb','../../skills/npx-skills-add.js','log','350505dVGRBO','136lnddIp','1000452zmqFIB','inherit','\x20-g\x20-y)...','Skipped\x20npx\x20(','525767DbcPRH','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','7mnLVeK','apiError','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','9581646yXsKDL','cwd','pipe','5286190AqBJAr','install','info','npx\x20skills\x20add\x20failed:\x20','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime'];a14_0xaef4=function(){return _0x40cc59;};return a14_0xaef4();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x12d173(0x19c),'command':a14_0x12d173(0x197),'description':a14_0x12d173(0x19a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x588113){const _0x3baaaf=a14_0x12d173;logger['setLogPath'](process[_0x3baaaf(0x194)]()),logger[_0x3baaaf(0x198)](_0x3baaaf(0x19f),_0x3baaaf(0x1af));const {LOVRABET_SKILL_SOURCE:_0x5ee644,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x1bddf3,runNpxSkillsAddGlobal:_0x235548}=await import(_0x3baaaf(0x1a6)),_0x101684=_0x588113[_0x3baaaf(0x1a2)]?_0x3baaaf(0x195):_0x3baaaf(0x1ab);console[_0x3baaaf(0x1a7)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x5ee644+_0x3baaaf(0x1ac));const _0x394944=_0x235548(process['cwd'](),_0x5ee644,{'stdio':_0x101684});if(_0x394944[_0x3baaaf(0x19b)])console[_0x3baaaf(0x1a7)](_0x3baaaf(0x1ad)+_0x1bddf3+_0x3baaaf(0x192));else{if(_0x394944['ok'])console[_0x3baaaf(0x1a7)](_0x3baaaf(0x1a0));else throw CliErrors[_0x3baaaf(0x1b1)](_0x3baaaf(0x199)+(_0x394944[_0x3baaaf(0x1a1)]||_0x3baaaf(0x1a4)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x5ee644+'\x20-g\x20-y');}return{'ok':!![]};}}];