@lovrabet/lovrabet-cli 2.0.13-beta.4 → 2.0.13-beta.6

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 (75) 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/mock-loader.js +1 -1
  6. package/lib/commands/app/remote-source.js +1 -1
  7. package/lib/commands/app/shared.js +1 -1
  8. package/lib/commands/artifact/index.js +1 -1
  9. package/lib/commands/auth/index.js +1 -1
  10. package/lib/commands/auth/prompt.js +1 -1
  11. package/lib/commands/bff/detail.js +1 -1
  12. package/lib/commands/bff/exec.js +1 -1
  13. package/lib/commands/bff/index.js +1 -1
  14. package/lib/commands/common/config-policy.js +1 -1
  15. package/lib/commands/common/constraints.js +1 -1
  16. package/lib/commands/common/flags.js +1 -1
  17. package/lib/commands/config/definitions.js +1 -1
  18. package/lib/commands/config/shared.js +1 -1
  19. package/lib/commands/data/index.js +1 -1
  20. package/lib/commands/dataset/detail.js +1 -1
  21. package/lib/commands/dataset/index.js +1 -1
  22. package/lib/commands/dataset/list.js +1 -1
  23. package/lib/commands/dataset/sdk-doc.js +1 -1
  24. package/lib/commands/doctor.js +1 -1
  25. package/lib/commands/init.js +1 -1
  26. package/lib/commands/kb/index.js +1 -1
  27. package/lib/commands/logs/index.js +1 -1
  28. package/lib/commands/personal-bff/index.js +1 -1
  29. package/lib/commands/registry.js +1 -1
  30. package/lib/commands/schema.js +1 -1
  31. package/lib/commands/skill/index.js +1 -1
  32. package/lib/commands/sql/detail.js +1 -1
  33. package/lib/commands/sql/exec.js +1 -1
  34. package/lib/commands/sql/index.js +1 -1
  35. package/lib/commands/update.js +1 -1
  36. package/lib/config/schema.js +1 -1
  37. package/lib/constant/auth-mode.js +1 -1
  38. package/lib/constant/cli.js +1 -1
  39. package/lib/constant/defaults.js +1 -1
  40. package/lib/constant/distribution.js +1 -1
  41. package/lib/constant/domain.js +1 -1
  42. package/lib/constant/env.js +1 -1
  43. package/lib/constant/output.js +1 -1
  44. package/lib/constant/product.js +1 -1
  45. package/lib/constant/risk.js +1 -1
  46. package/lib/constant/url.js +1 -1
  47. package/lib/context.js +1 -1
  48. package/lib/core/api-client.js +1 -1
  49. package/lib/core/db-resolver.js +1 -1
  50. package/lib/core/sdk-client.js +1 -1
  51. package/lib/errors.js +1 -1
  52. package/lib/framework/build-all-flags.js +1 -1
  53. package/lib/framework/dryrun.js +1 -1
  54. package/lib/framework/flags.js +1 -1
  55. package/lib/framework/help.js +1 -1
  56. package/lib/framework/index.js +1 -1
  57. package/lib/framework/output.js +1 -1
  58. package/lib/framework/preparse.js +1 -1
  59. package/lib/framework/response.js +1 -1
  60. package/lib/framework/runner-confirmation.js +1 -1
  61. package/lib/framework/runner-error.js +1 -1
  62. package/lib/framework/runner.js +1 -1
  63. package/lib/framework/schema-export.js +1 -1
  64. package/lib/framework/types.js +1 -1
  65. package/lib/help.js +1 -1
  66. package/lib/skills/npx-skills-add.js +1 -1
  67. package/lib/skills/runtime-skill-sync.js +1 -1
  68. package/lib/utils/apply-jq-filter.js +1 -1
  69. package/lib/utils/logger.js +1 -1
  70. package/lib/utils/params.js +1 -1
  71. package/lib/utils/platform.js +1 -1
  72. package/lib/utils/update-notice.js +1 -0
  73. package/lib/utils/version.js +1 -1
  74. package/lib/utils/write-cli-side-channel.js +1 -1
  75. package/package.json +1 -1
@@ -1 +1 @@
1
- const a15_0x15c59f=a15_0x1687;function a15_0x3194(){const _0x4398ce=['Resource\x20ID','boolean','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','12ROoiOO','7cQYnEr','130448EQQsDm','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','312108VQLAzW','code','name','1735560PYlKLQ','params','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','2176910DXffSg','string','verbose','Return\x20full\x20raw\x20response\x20object','5158024udQneX','8717472SpVbQN','Dataset\x20code\x20(32-char\x20hex\x20UUID)','number','2048916KRJZgf','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'];a15_0x3194=function(){return _0x4398ce;};return a15_0x3194();}(function(_0x2a6903,_0x43587b){const _0x438144=a15_0x1687,_0x503fa8=_0x2a6903();while(!![]){try{const _0x15b407=-parseInt(_0x438144(0x17b))/0x1+parseInt(_0x438144(0x17d))/0x2*(-parseInt(_0x438144(0x179))/0x3)+-parseInt(_0x438144(0x180))/0x4+-parseInt(_0x438144(0x183))/0x5+parseInt(_0x438144(0x18b))/0x6+parseInt(_0x438144(0x17a))/0x7*(parseInt(_0x438144(0x187))/0x8)+parseInt(_0x438144(0x188))/0x9;if(_0x15b407===_0x43587b)break;else _0x503fa8['push'](_0x503fa8['shift']());}catch(_0x547159){_0x503fa8['push'](_0x503fa8['shift']());}}}(a15_0x3194,0x50c9f));export const CODE_FLAG={'name':a15_0x15c59f(0x17e),'type':'string','required':!![],'description':a15_0x15c59f(0x189),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a15_0x15c59f(0x18c)}};export const SQLCODE_FLAG={'name':a15_0x15c59f(0x178),'type':'string','required':!![],'description':a15_0x15c59f(0x177),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a15_0x15c59f(0x182)}};function a15_0x1687(_0x288a65,_0x56b58f){_0x288a65=_0x288a65-0x176;const _0x319488=a15_0x3194();let _0x168781=_0x319488[_0x288a65];return _0x168781;}export const VERBOSE_FLAG={'name':a15_0x15c59f(0x185),'type':a15_0x15c59f(0x176),'description':a15_0x15c59f(0x186)};export const PARAMS_FLAG={'name':a15_0x15c59f(0x181),'type':a15_0x15c59f(0x184),'description':a15_0x15c59f(0x17c)};export const NAME_FLAG={'name':a15_0x15c59f(0x17f),'type':a15_0x15c59f(0x184),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a15_0x15c59f(0x18a),'required':!![],'description':a15_0x15c59f(0x18d)};
1
+ const a15_0x34a0d4=a15_0x3be4;(function(_0xed963f,_0x4af3a2){const _0x71ee7f=a15_0x3be4,_0x4ddde3=_0xed963f();while(!![]){try{const _0x5edb4b=-parseInt(_0x71ee7f(0xab))/0x1*(-parseInt(_0x71ee7f(0x9c))/0x2)+-parseInt(_0x71ee7f(0x9a))/0x3+parseInt(_0x71ee7f(0xa9))/0x4*(-parseInt(_0x71ee7f(0xa0))/0x5)+parseInt(_0x71ee7f(0xa8))/0x6+-parseInt(_0x71ee7f(0x9f))/0x7*(-parseInt(_0x71ee7f(0xa4))/0x8)+parseInt(_0x71ee7f(0xa7))/0x9+-parseInt(_0x71ee7f(0xad))/0xa;if(_0x5edb4b===_0x4af3a2)break;else _0x4ddde3['push'](_0x4ddde3['shift']());}catch(_0xd57e96){_0x4ddde3['push'](_0x4ddde3['shift']());}}}(a15_0x56d1,0x8c84c));export const CODE_FLAG={'name':'code','type':a15_0x34a0d4(0xa1),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a15_0x34a0d4(0xae)}};export const SQLCODE_FLAG={'name':a15_0x34a0d4(0x9e),'type':a15_0x34a0d4(0xa1),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a15_0x34a0d4(0x9b)}};function a15_0x56d1(){const _0x4f1f4a=['1902870fvfNeL','verbose','sqlcode','49TiKUeb','90HpLmNs','string','Resource\x20name\x20for\x20lookup','params','258136oLzDOn','Return\x20full\x20raw\x20response\x20object','number','9798975bUTGoo','1627398nkXzpx','42404UgDEOK','Resource\x20ID','1AWKBrr','name','11164250lEtLMf','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','1963515lPEZbH','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'];a15_0x56d1=function(){return _0x4f1f4a;};return a15_0x56d1();}export const VERBOSE_FLAG={'name':a15_0x34a0d4(0x9d),'type':'boolean','description':a15_0x34a0d4(0xa5)};export const PARAMS_FLAG={'name':a15_0x34a0d4(0xa3),'type':a15_0x34a0d4(0xa1),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};function a15_0x3be4(_0x5a92ff,_0x2d8b60){_0x5a92ff=_0x5a92ff-0x9a;const _0x56d1b0=a15_0x56d1();let _0x3be458=_0x56d1b0[_0x5a92ff];return _0x3be458;}export const NAME_FLAG={'name':a15_0x34a0d4(0xac),'type':a15_0x34a0d4(0xa1),'description':a15_0x34a0d4(0xa2)};export const ID_FLAG={'name':'id','type':a15_0x34a0d4(0xa6),'required':!![],'description':a15_0x34a0d4(0xaa)};
@@ -1 +1 @@
1
- const a16_0x16bb3e=a16_0x426b;(function(_0x58faa5,_0x2cd141){const _0x29e283=a16_0x426b,_0x5a76ab=_0x58faa5();while(!![]){try{const _0x107a4c=parseInt(_0x29e283(0x1ee))/0x1*(parseInt(_0x29e283(0x1e6))/0x2)+-parseInt(_0x29e283(0x1cb))/0x3*(-parseInt(_0x29e283(0x205))/0x4)+parseInt(_0x29e283(0x1c9))/0x5*(-parseInt(_0x29e283(0x201))/0x6)+parseInt(_0x29e283(0x1d2))/0x7+-parseInt(_0x29e283(0x1f9))/0x8*(parseInt(_0x29e283(0x1da))/0x9)+parseInt(_0x29e283(0x1ed))/0xa+-parseInt(_0x29e283(0x1fb))/0xb;if(_0x107a4c===_0x2cd141)break;else _0x5a76ab['push'](_0x5a76ab['shift']());}catch(_0x5905b2){_0x5a76ab['push'](_0x5a76ab['shift']());}}}(a16_0x584e,0x3a5ab));function a16_0x426b(_0x1c9f9e,_0x14e9b7){_0x1c9f9e=_0x1c9f9e-0x1c7;const _0x584e37=a16_0x584e();let _0x426bdd=_0x584e37[_0x1c9f9e];return _0x426bdd;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a16_0x16bb3e(0x1db),'type':a16_0x16bb3e(0x1e1),'description':a16_0x16bb3e(0x204),'default':![]};function parseAliasAppcodeSetKey(_0x41f330){const _0x4bc732=a16_0x16bb3e,_0x25e43e=_0x41f330[_0x4bc732(0x1d7)]('.');if(_0x25e43e[_0x4bc732(0x1e3)]!==0x3||_0x25e43e[0x0]!=='apps'||_0x25e43e[0x2]!==_0x4bc732(0x1ef))return undefined;const _0x1cc749=_0x25e43e[0x1]?.[_0x4bc732(0x200)]();return _0x1cc749?_0x1cc749:undefined;}function parseAliasDeleteKey(_0x5155b8){const _0x5d2b45=a16_0x16bb3e,_0x3c8f4c=_0x5155b8[_0x5d2b45(0x1d7)]('.');if(_0x3c8f4c[_0x5d2b45(0x1e3)]===0x2&&_0x3c8f4c[0x0]===_0x5d2b45(0x1cc)){const _0x66efcc=_0x3c8f4c[0x1]?.['trim']();return _0x66efcc?{'alias':_0x66efcc}:undefined;}if(_0x3c8f4c[_0x5d2b45(0x1e3)]===0x3&&_0x3c8f4c[0x0]===_0x5d2b45(0x1cc)&&_0x3c8f4c[0x2]===_0x5d2b45(0x1ef)){const _0x5eba14=_0x3c8f4c[0x1]?.[_0x5d2b45(0x200)]();return _0x5eba14?{'alias':_0x5eba14,'field':_0x5d2b45(0x1ef)}:undefined;}return undefined;}function setLocalAppAlias(_0x472a1c,_0x5261c6,_0x5ef560){const _0x596fa3=a16_0x16bb3e,_0x6541d3=_0x472a1c[_0x596fa3(0x1cc)]&&typeof _0x472a1c[_0x596fa3(0x1cc)]===_0x596fa3(0x1d8)&&!Array['isArray'](_0x472a1c[_0x596fa3(0x1cc)])?_0x472a1c[_0x596fa3(0x1cc)]:{},_0x2589aa=_0x6541d3[_0x5261c6]&&typeof _0x6541d3[_0x5261c6]===_0x596fa3(0x1d8)&&!Array['isArray'](_0x6541d3[_0x5261c6])?_0x6541d3[_0x5261c6]:{};_0x2589aa['appcode']=_0x5ef560,_0x6541d3[_0x5261c6]=_0x2589aa,_0x472a1c[_0x596fa3(0x1cc)]=_0x6541d3;}function deleteLocalAppAlias(_0x37986e,_0x595677){const _0x562530=a16_0x16bb3e;if(!_0x37986e[_0x562530(0x1cc)]||typeof _0x37986e[_0x562530(0x1cc)]!==_0x562530(0x1d8)||Array[_0x562530(0x206)](_0x37986e[_0x562530(0x1cc)]))return![];const _0x103590=_0x37986e[_0x562530(0x1cc)],_0x1863f9=_0x103590[_0x595677[_0x562530(0x1e7)]];if(!_0x1863f9||typeof _0x1863f9!==_0x562530(0x1d8)||Array[_0x562530(0x206)](_0x1863f9))return![];if(!_0x595677[_0x562530(0x1f5)])return delete _0x103590[_0x595677[_0x562530(0x1e7)]],!![];if(!(_0x595677[_0x562530(0x1f5)]in _0x1863f9))return![];return delete _0x1863f9[_0x595677[_0x562530(0x1f5)]],Object[_0x562530(0x1fd)](_0x1863f9)['length']===0x0&&delete _0x103590[_0x595677[_0x562530(0x1e7)]],!![];}function a16_0x584e(){const _0x49693b=['\x20\x20project:\x20','log','get','Invalid\x20value\x20for\x20\x22','split','object','\x22\x20is\x20not\x20settable.','18CjEpLN','global',';\x20apps.<alias>.appcode','args','pageSize','raw','Missing\x20key\x20argument.','boolean','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','length','config','stringify','42838JyoTOM','alias','delete','join','includes','set','Key\x20not\x20found:\x20','1927310QEYgpt','18vkxZKm','appcode','pretty','Key\x20\x22','write','\x22\x20not\x20found\x20at\x20top\x20level.','validation','field','Config\x20files:\x0a','project-or-global-explicit','Deleted\x20`','1579224hpRDRo','Top-level\x20key\x20\x22','1877194FZqJyQ','Usage:\x20','keys','../../context.js','value','trim','2280774nutrhj','List\x20current\x20config','list','Write\x20to\x20global\x20config','55004VzLwmD','isArray','\x20(global)','Set\x20`','Settable\x20keys:\x20','\x22.\x20Allowed:\x20','5egSNmo','(none)','69pZwDbn','apps','read','bool','\x20config\x20get\x20<key>','\x20\x20global:\x20\x20','key','2030434nGBesg'];a16_0x584e=function(){return _0x49693b;};return a16_0x584e();}const listDef={'service':a16_0x16bb3e(0x1e4),'command':a16_0x16bb3e(0x203),'description':a16_0x16bb3e(0x202),'risk':a16_0x16bb3e(0x1cd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5bb95b){const _0x2d1d17=a16_0x16bb3e,{buildConfigFromFlags:_0x5dc4ea}=await import(_0x2d1d17(0x1fe)),_0x52a40e=_0x5dc4ea({}),_0x43e60f=getProjectConfigPath(),_0x2027dc=resolveWriteConfigPath(_0x2d1d17(0x1db));if(_0x5bb95b['format']===_0x2d1d17(0x1f0))return{'ok':!![],'message':_0x2d1d17(0x1e2)+(JSON['stringify'](_0x52a40e[_0x2d1d17(0x1df)],null,0x2)+'\x0a\x0a')+_0x2d1d17(0x1f6)+(_0x2d1d17(0x1d3)+(_0x43e60f??_0x2d1d17(0x1ca))+'\x0a')+(_0x2d1d17(0x1d0)+_0x2027dc)};return{'ok':!![],'data':{'effective':_0x52a40e[_0x2d1d17(0x1df)],'configFiles':{'project':_0x43e60f??null,'global':_0x2027dc}}};}},getDef={'service':a16_0x16bb3e(0x1e4),'command':a16_0x16bb3e(0x1d5),'description':'Get\x20a\x20config\x20value','risk':a16_0x16bb3e(0x1cd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x16bb3e(0x1d1),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x16b34a){const _0x412d6c=a16_0x16bb3e,_0x35ebcb=_0x16b34a['args'][0x0];if(!_0x35ebcb)throw CliErrors[_0x412d6c(0x1f4)]('Missing\x20key\x20argument.',_0x412d6c(0x1fc)+CLI_BIN_NAME+_0x412d6c(0x1cf));const {buildConfigFromFlags:_0x12bf9e}=await import(_0x412d6c(0x1fe)),{raw:_0x5132e2}=_0x12bf9e({});if(_0x35ebcb[_0x412d6c(0x1ea)]('.')){const _0x3a472c=_0x35ebcb[_0x412d6c(0x1d7)]('.');let _0x142b1b=_0x5132e2;for(const _0x56cee4 of _0x3a472c){if(_0x142b1b==null||typeof _0x142b1b!==_0x412d6c(0x1d8))throw CliErrors[_0x412d6c(0x1f4)](_0x412d6c(0x1ec)+_0x35ebcb);_0x142b1b=_0x142b1b[_0x56cee4];}if(_0x142b1b===undefined)throw CliErrors['validation'](_0x412d6c(0x1ec)+_0x35ebcb);return console[_0x412d6c(0x1d4)](typeof _0x142b1b===_0x412d6c(0x1d8)?JSON[_0x412d6c(0x1e5)](_0x142b1b,null,0x2):String(_0x142b1b)),{'ok':!![]};}const _0x6ce949=_0x5132e2[_0x35ebcb];if(_0x6ce949===undefined)throw CliErrors[_0x412d6c(0x1f4)]('Key\x20not\x20found:\x20'+_0x35ebcb);return console['log'](typeof _0x6ce949===_0x412d6c(0x1d8)?JSON[_0x412d6c(0x1e5)](_0x6ce949,null,0x2):String(_0x6ce949)),{'ok':!![]};}},setDef={'service':'config','command':a16_0x16bb3e(0x1eb),'description':'Set\x20a\x20config\x20value','risk':a16_0x16bb3e(0x1f2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x16bb3e(0x1d1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a16_0x16bb3e(0x1ff),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x145e63){const _0x2216f7=a16_0x16bb3e,_0x2a7104=_0x145e63[_0x2216f7(0x1dd)][0x0],_0x25d5ef=_0x145e63[_0x2216f7(0x1dd)][0x1];if(!_0x2a7104||_0x25d5ef===undefined)throw CliErrors[_0x2216f7(0x1f4)]('Missing\x20key\x20or\x20value.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x2a7104]&&!ENUM_KEYS[_0x2a7104][_0x2216f7(0x1ea)](_0x25d5ef))throw CliErrors[_0x2216f7(0x1f4)](_0x2216f7(0x1d6)+_0x2a7104+_0x2216f7(0x1c8)+ENUM_KEYS[_0x2a7104][_0x2216f7(0x1e9)](',\x20'));if(_0x2a7104==='riskLevel')throw CliErrors[_0x2216f7(0x1f4)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x2a7104===_0x2216f7(0x1de)){const _0x310754=Number(_0x25d5ef);if(isNaN(_0x310754)||_0x310754<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x11cc7f=resolveWriteScope({'explicitGlobal':_0x145e63[_0x2216f7(0x1ce)](_0x2216f7(0x1db)),'policy':'project-or-global-explicit'}),_0x34fb68=toScopeFlags(_0x11cc7f),_0x43f9dc=readScopedConfig(_0x34fb68),_0x1c122f=parseAliasAppcodeSetKey(_0x2a7104);if(!_0x1c122f&&!isTopLevelConfigKey(_0x2a7104))throw CliErrors[_0x2216f7(0x1f4)](_0x2216f7(0x1fa)+_0x2a7104+_0x2216f7(0x1d9),_0x2216f7(0x1c7)+getTopLevelConfigKeySummary()+_0x2216f7(0x1dc));return _0x1c122f?setLocalAppAlias(_0x43f9dc,_0x1c122f,_0x25d5ef):_0x43f9dc[_0x2a7104]=_0x2a7104===_0x2216f7(0x1de)?Number(_0x25d5ef):_0x25d5ef,console[_0x2216f7(0x1d4)](_0x2216f7(0x208)+_0x2a7104+'`\x20=\x20\x22'+_0x25d5ef+'\x22'+(_0x11cc7f===_0x2216f7(0x1db)?_0x2216f7(0x207):'')),writeScopedConfig(_0x43f9dc,_0x34fb68),{'ok':!![]};}},deleteDef={'service':a16_0x16bb3e(0x1e4),'command':a16_0x16bb3e(0x1e8),'description':'Delete\x20a\x20config\x20value','risk':a16_0x16bb3e(0x1f2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x16bb3e(0x1d1),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x55a52d){const _0x22e70c=a16_0x16bb3e,_0x182a90=_0x55a52d[_0x22e70c(0x1dd)][0x0];if(!_0x182a90)throw CliErrors['validation'](_0x22e70c(0x1e0),_0x22e70c(0x1fc)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x2229fa=resolveWriteScope({'explicitGlobal':_0x55a52d[_0x22e70c(0x1ce)]('global'),'policy':_0x22e70c(0x1f7)}),_0xde53ac=toScopeFlags(_0x2229fa),_0x592f0d=readScopedConfig(_0xde53ac),_0x43de32=parseAliasDeleteKey(_0x182a90);if(_0x43de32){if(!deleteLocalAppAlias(_0x592f0d,_0x43de32))throw CliErrors['validation'](_0x22e70c(0x1ec)+_0x182a90);return console[_0x22e70c(0x1d4)](_0x22e70c(0x1f8)+_0x182a90+'`'+(_0x2229fa===_0x22e70c(0x1db)?_0x22e70c(0x207):'')),writeScopedConfig(_0x592f0d,_0xde53ac),{'ok':!![]};}if(_0x592f0d[_0x182a90]===undefined)throw CliErrors[_0x22e70c(0x1f4)](_0x22e70c(0x1f1)+_0x182a90+_0x22e70c(0x1f3));return delete _0x592f0d[_0x182a90],console[_0x22e70c(0x1d4)](_0x22e70c(0x1f8)+_0x182a90+'`'+(_0x2229fa===_0x22e70c(0x1db)?_0x22e70c(0x207):'')),writeScopedConfig(_0x592f0d,_0xde53ac),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
1
+ const a16_0x1017ff=a16_0x1bf3;(function(_0x11d4ab,_0xf991c2){const _0x11913c=a16_0x1bf3,_0x58914e=_0x11d4ab();while(!![]){try{const _0xd16a5e=-parseInt(_0x11913c(0x124))/0x1+parseInt(_0x11913c(0x140))/0x2*(-parseInt(_0x11913c(0x126))/0x3)+-parseInt(_0x11913c(0x14d))/0x4*(-parseInt(_0x11913c(0x11d))/0x5)+parseInt(_0x11913c(0x11e))/0x6*(-parseInt(_0x11913c(0x158))/0x7)+parseInt(_0x11913c(0x11b))/0x8+-parseInt(_0x11913c(0x122))/0x9*(parseInt(_0x11913c(0x153))/0xa)+parseInt(_0x11913c(0x146))/0xb*(parseInt(_0x11913c(0x13b))/0xc);if(_0xd16a5e===_0xf991c2)break;else _0x58914e['push'](_0x58914e['shift']());}catch(_0x43628b){_0x58914e['push'](_0x58914e['shift']());}}}(a16_0x3bdb,0xbd6aa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';function a16_0x3bdb(){const _0x56de62=['field','38504TSQckt','`\x20=\x20\x22','\x20config\x20set\x20<key>\x20<value>\x20[--global]','object','key','delete','15180860DKLWaK','Get\x20a\x20config\x20value','join','Key\x20not\x20found:\x20','split','7bxnmKm','alias','appcode','riskLevel','pageSize\x20must\x20be\x20a\x20positive\x20number','log','Value\x20to\x20assign','bool','pretty','isArray','1462504bfgGGx','list','175WHoutI','3216354iNYSSA','Settable\x20keys:\x20','Top-level\x20key\x20\x22','pageSize','9OLIkMl','List\x20current\x20config','1085854FOtXFV','\x20\x20global:\x20\x20','3ZqKFYC','Deleted\x20`','\x20\x20project:\x20','project-or-global-explicit','set','trim','stringify','boolean','includes','global','read','\x20(global)','Usage:\x20','keys','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','config','Missing\x20key\x20argument.','Key\x20\x22','value','Missing\x20key\x20or\x20value.','\x22.\x20Allowed:\x20','28788cKXOQo','length','Delete\x20a\x20config\x20value','../../context.js','apps','601466wWpboN','write','args','(none)','Config\x20files:\x0a','\x20config\x20get\x20<key>','16951uEGheI','get','Set\x20a\x20config\x20value','\x20config\x20delete\x20<key>\x20[--global]','raw','validation'];a16_0x3bdb=function(){return _0x56de62;};return a16_0x3bdb();}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a16_0x1bf3(_0x5c5815,_0x49c69b){_0x5c5815=_0x5c5815-0x11a;const _0x3bdb97=a16_0x3bdb();let _0x1bf319=_0x3bdb97[_0x5c5815];return _0x1bf319;}const GLOBAL_FLAG={'name':'global','type':a16_0x1017ff(0x12d),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x4a774b){const _0x52f2c5=a16_0x1017ff,_0x1d6cfb=_0x4a774b[_0x52f2c5(0x157)]('.');if(_0x1d6cfb['length']!==0x3||_0x1d6cfb[0x0]!==_0x52f2c5(0x13f)||_0x1d6cfb[0x2]!==_0x52f2c5(0x15a))return undefined;const _0x1765f0=_0x1d6cfb[0x1]?.[_0x52f2c5(0x12b)]();return _0x1765f0?_0x1765f0:undefined;}function parseAliasDeleteKey(_0x25e0ec){const _0x47d3cf=a16_0x1017ff,_0x45da56=_0x25e0ec[_0x47d3cf(0x157)]('.');if(_0x45da56[_0x47d3cf(0x13c)]===0x2&&_0x45da56[0x0]===_0x47d3cf(0x13f)){const _0x36676f=_0x45da56[0x1]?.['trim']();return _0x36676f?{'alias':_0x36676f}:undefined;}if(_0x45da56[_0x47d3cf(0x13c)]===0x3&&_0x45da56[0x0]===_0x47d3cf(0x13f)&&_0x45da56[0x2]===_0x47d3cf(0x15a)){const _0xa7a023=_0x45da56[0x1]?.[_0x47d3cf(0x12b)]();return _0xa7a023?{'alias':_0xa7a023,'field':_0x47d3cf(0x15a)}:undefined;}return undefined;}function setLocalAppAlias(_0x3e390f,_0xcefe9a,_0x4d40a0){const _0x11174b=a16_0x1017ff,_0xa5536b=_0x3e390f['apps']&&typeof _0x3e390f[_0x11174b(0x13f)]==='object'&&!Array[_0x11174b(0x11a)](_0x3e390f['apps'])?_0x3e390f[_0x11174b(0x13f)]:{},_0x29ba47=_0xa5536b[_0xcefe9a]&&typeof _0xa5536b[_0xcefe9a]==='object'&&!Array['isArray'](_0xa5536b[_0xcefe9a])?_0xa5536b[_0xcefe9a]:{};_0x29ba47[_0x11174b(0x15a)]=_0x4d40a0,_0xa5536b[_0xcefe9a]=_0x29ba47,_0x3e390f[_0x11174b(0x13f)]=_0xa5536b;}function deleteLocalAppAlias(_0x512279,_0x4e70ec){const _0x177702=a16_0x1017ff;if(!_0x512279['apps']||typeof _0x512279['apps']!==_0x177702(0x150)||Array[_0x177702(0x11a)](_0x512279[_0x177702(0x13f)]))return![];const _0x2bbeb3=_0x512279[_0x177702(0x13f)],_0x5af76e=_0x2bbeb3[_0x4e70ec['alias']];if(!_0x5af76e||typeof _0x5af76e!==_0x177702(0x150)||Array[_0x177702(0x11a)](_0x5af76e))return![];if(!_0x4e70ec[_0x177702(0x14c)])return delete _0x2bbeb3[_0x4e70ec[_0x177702(0x159)]],!![];if(!(_0x4e70ec[_0x177702(0x14c)]in _0x5af76e))return![];return delete _0x5af76e[_0x4e70ec['field']],Object[_0x177702(0x133)](_0x5af76e)[_0x177702(0x13c)]===0x0&&delete _0x2bbeb3[_0x4e70ec[_0x177702(0x159)]],!![];}const listDef={'service':a16_0x1017ff(0x135),'command':a16_0x1017ff(0x11c),'description':a16_0x1017ff(0x123),'risk':a16_0x1017ff(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4cfd20){const _0x2a2734=a16_0x1017ff,{buildConfigFromFlags:_0x56f6b9}=await import(_0x2a2734(0x13e)),_0x2c34f5=_0x56f6b9({}),_0x38aee1=getProjectConfigPath(),_0x4d2e3a=resolveWriteConfigPath(_0x2a2734(0x12f));if(_0x4cfd20['format']===_0x2a2734(0x160))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x2a2734(0x12c)](_0x2c34f5[_0x2a2734(0x14a)],null,0x2)+'\x0a\x0a')+_0x2a2734(0x144)+(_0x2a2734(0x128)+(_0x38aee1??_0x2a2734(0x143))+'\x0a')+(_0x2a2734(0x125)+_0x4d2e3a)};return{'ok':!![],'data':{'effective':_0x2c34f5[_0x2a2734(0x14a)],'configFiles':{'project':_0x38aee1??null,'global':_0x4d2e3a}}};}},getDef={'service':a16_0x1017ff(0x135),'command':a16_0x1017ff(0x147),'description':a16_0x1017ff(0x154),'risk':a16_0x1017ff(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x1017ff(0x151),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x6aef4b){const _0x30eb6a=a16_0x1017ff,_0x5045b4=_0x6aef4b[_0x30eb6a(0x142)][0x0];if(!_0x5045b4)throw CliErrors[_0x30eb6a(0x14b)]('Missing\x20key\x20argument.',_0x30eb6a(0x132)+CLI_BIN_NAME+_0x30eb6a(0x145));const {buildConfigFromFlags:_0x3f35ed}=await import(_0x30eb6a(0x13e)),{raw:_0x16f336}=_0x3f35ed({});if(_0x5045b4[_0x30eb6a(0x12e)]('.')){const _0x5c2acf=_0x5045b4[_0x30eb6a(0x157)]('.');let _0x59d5cc=_0x16f336;for(const _0x39d347 of _0x5c2acf){if(_0x59d5cc==null||typeof _0x59d5cc!==_0x30eb6a(0x150))throw CliErrors[_0x30eb6a(0x14b)]('Key\x20not\x20found:\x20'+_0x5045b4);_0x59d5cc=_0x59d5cc[_0x39d347];}if(_0x59d5cc===undefined)throw CliErrors['validation'](_0x30eb6a(0x156)+_0x5045b4);return console[_0x30eb6a(0x15d)](typeof _0x59d5cc===_0x30eb6a(0x150)?JSON[_0x30eb6a(0x12c)](_0x59d5cc,null,0x2):String(_0x59d5cc)),{'ok':!![]};}const _0x2a9861=_0x16f336[_0x5045b4];if(_0x2a9861===undefined)throw CliErrors[_0x30eb6a(0x14b)](_0x30eb6a(0x156)+_0x5045b4);return console[_0x30eb6a(0x15d)](typeof _0x2a9861===_0x30eb6a(0x150)?JSON['stringify'](_0x2a9861,null,0x2):String(_0x2a9861)),{'ok':!![]};}},setDef={'service':a16_0x1017ff(0x135),'command':a16_0x1017ff(0x12a),'description':a16_0x1017ff(0x148),'risk':a16_0x1017ff(0x141),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a16_0x1017ff(0x138),'description':a16_0x1017ff(0x15e),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x16c21e){const _0xf86919=a16_0x1017ff,_0x423b3f=_0x16c21e[_0xf86919(0x142)][0x0],_0x372bec=_0x16c21e[_0xf86919(0x142)][0x1];if(!_0x423b3f||_0x372bec===undefined)throw CliErrors[_0xf86919(0x14b)](_0xf86919(0x139),_0xf86919(0x132)+CLI_BIN_NAME+_0xf86919(0x14f));if(ENUM_KEYS[_0x423b3f]&&!ENUM_KEYS[_0x423b3f]['includes'](_0x372bec))throw CliErrors[_0xf86919(0x14b)]('Invalid\x20value\x20for\x20\x22'+_0x423b3f+_0xf86919(0x13a)+ENUM_KEYS[_0x423b3f][_0xf86919(0x155)](',\x20'));if(_0x423b3f===_0xf86919(0x15b))throw CliErrors[_0xf86919(0x14b)](_0xf86919(0x134));if(_0x423b3f===_0xf86919(0x121)){const _0x2e8b34=Number(_0x372bec);if(isNaN(_0x2e8b34)||_0x2e8b34<=0x0)throw CliErrors[_0xf86919(0x14b)](_0xf86919(0x15c));}const _0x2e2b83=resolveWriteScope({'explicitGlobal':_0x16c21e[_0xf86919(0x15f)](_0xf86919(0x12f)),'policy':_0xf86919(0x129)}),_0x3c0939=toScopeFlags(_0x2e2b83),_0x5b1142=readScopedConfig(_0x3c0939),_0x38f83a=parseAliasAppcodeSetKey(_0x423b3f);if(!_0x38f83a&&!isTopLevelConfigKey(_0x423b3f))throw CliErrors['validation'](_0xf86919(0x120)+_0x423b3f+'\x22\x20is\x20not\x20settable.',_0xf86919(0x11f)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x38f83a?setLocalAppAlias(_0x5b1142,_0x38f83a,_0x372bec):_0x5b1142[_0x423b3f]=_0x423b3f===_0xf86919(0x121)?Number(_0x372bec):_0x372bec,console[_0xf86919(0x15d)]('Set\x20`'+_0x423b3f+_0xf86919(0x14e)+_0x372bec+'\x22'+(_0x2e2b83===_0xf86919(0x12f)?_0xf86919(0x131):'')),writeScopedConfig(_0x5b1142,_0x3c0939),{'ok':!![]};}},deleteDef={'service':a16_0x1017ff(0x135),'command':a16_0x1017ff(0x152),'description':a16_0x1017ff(0x13d),'risk':a16_0x1017ff(0x141),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xfdfe2a){const _0x2318ea=a16_0x1017ff,_0x15161f=_0xfdfe2a['args'][0x0];if(!_0x15161f)throw CliErrors[_0x2318ea(0x14b)](_0x2318ea(0x136),_0x2318ea(0x132)+CLI_BIN_NAME+_0x2318ea(0x149));const _0x239109=resolveWriteScope({'explicitGlobal':_0xfdfe2a['bool'](_0x2318ea(0x12f)),'policy':_0x2318ea(0x129)}),_0x508796=toScopeFlags(_0x239109),_0x2089cb=readScopedConfig(_0x508796),_0x376013=parseAliasDeleteKey(_0x15161f);if(_0x376013){if(!deleteLocalAppAlias(_0x2089cb,_0x376013))throw CliErrors[_0x2318ea(0x14b)](_0x2318ea(0x156)+_0x15161f);return console['log'](_0x2318ea(0x127)+_0x15161f+'`'+(_0x239109===_0x2318ea(0x12f)?_0x2318ea(0x131):'')),writeScopedConfig(_0x2089cb,_0x508796),{'ok':!![]};}if(_0x2089cb[_0x15161f]===undefined)throw CliErrors[_0x2318ea(0x14b)](_0x2318ea(0x137)+_0x15161f+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x2089cb[_0x15161f],console[_0x2318ea(0x15d)](_0x2318ea(0x127)+_0x15161f+'`'+(_0x239109===_0x2318ea(0x12f)?_0x2318ea(0x131):'')),writeScopedConfig(_0x2089cb,_0x508796),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- function a17_0x724b(_0x385260,_0x16f1b8){_0x385260=_0x385260-0x13a;var _0x2bf421=a17_0x2bf4();var _0x724b7a=_0x2bf421[_0x385260];return _0x724b7a;}(function(_0x4b700a,_0x306476){var _0x287273=a17_0x724b,_0x464aae=_0x4b700a();while(!![]){try{var _0x4e44d3=-parseInt(_0x287273(0x13d))/0x1*(parseInt(_0x287273(0x13e))/0x2)+-parseInt(_0x287273(0x144))/0x3*(-parseInt(_0x287273(0x143))/0x4)+parseInt(_0x287273(0x145))/0x5*(parseInt(_0x287273(0x140))/0x6)+parseInt(_0x287273(0x13a))/0x7+-parseInt(_0x287273(0x13b))/0x8+parseInt(_0x287273(0x13f))/0x9*(-parseInt(_0x287273(0x142))/0xa)+-parseInt(_0x287273(0x13c))/0xb*(parseInt(_0x287273(0x141))/0xc);if(_0x4e44d3===_0x306476)break;else _0x464aae['push'](_0x464aae['shift']());}catch(_0xf39955){_0x464aae['push'](_0x464aae['shift']());}}}(a17_0x2bf4,0x2ac96));function a17_0x2bf4(){var _0x42d3ea=['11CfIsVf','201rGaGXW','1226znqlTx','8523LxTySt','6QiwSGo','1099992lhOHDi','2890rUwoZG','11620tVbZNM','174isyeOd','1296285XjZkzx','2171729fwvvUL','593424gYiMsO'];a17_0x2bf4=function(){return _0x42d3ea;};return a17_0x2bf4();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
1
+ (function(_0x5de4be,_0x14703d){var _0x2a2075=a17_0x4cd4,_0x662e73=_0x5de4be();while(!![]){try{var _0x10114a=-parseInt(_0x2a2075(0x12d))/0x1*(parseInt(_0x2a2075(0x125))/0x2)+-parseInt(_0x2a2075(0x127))/0x3*(parseInt(_0x2a2075(0x123))/0x4)+-parseInt(_0x2a2075(0x12c))/0x5*(-parseInt(_0x2a2075(0x124))/0x6)+parseInt(_0x2a2075(0x126))/0x7*(-parseInt(_0x2a2075(0x128))/0x8)+-parseInt(_0x2a2075(0x12b))/0x9*(-parseInt(_0x2a2075(0x129))/0xa)+-parseInt(_0x2a2075(0x12a))/0xb+parseInt(_0x2a2075(0x12e))/0xc;if(_0x10114a===_0x14703d)break;else _0x662e73['push'](_0x662e73['shift']());}catch(_0xa83f9d){_0x662e73['push'](_0x662e73['shift']());}}}(a17_0x1ea2,0xbcb25));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';function a17_0x4cd4(_0x5bd83d,_0x5517f2){_0x5bd83d=_0x5bd83d-0x123;var _0x1ea2bd=a17_0x1ea2();var _0x4cd468=_0x1ea2bd[_0x5bd83d];return _0x4cd468;}function a17_0x1ea2(){var _0x3151c9=['36120528sPnios','3390148AOgtOx','6LvxjUi','22PEDlxI','896035kxKMpb','3ncMhzV','8GZVRJl','29090jOppxG','10512084JBrpSs','108HBSIZq','4115445QYQZCO','105814rOummW'];a17_0x1ea2=function(){return _0x3151c9;};return a17_0x1ea2();}
@@ -1 +1 @@
1
- function a18_0x4373(){const _0x5afabc=['1654856jAEFBo','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20completed\x20in\x20','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','body','now','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','7250988nAUQrd','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','high-risk-write','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20AGGREGATE\x20TYPES','risk','/api/{appCode}/','\x20\x20WHERE\x20OPERATORS','\x20\x20LOGICAL\x20COMBINATORS','aggregate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','paramsRequired','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20EXAMPLES','join','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','description','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','str','getOne','data\x20','operation','\x20on\x20dataset\x20','1417964JTuqgc','493656IdSrzY','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','command','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','write','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','11546808iABtfo','dryRun','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','4781804UkdNWn','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','read','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','filter','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','POST','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','params','Get\x20a\x20single\x20record\x20by\x20ID','data','update','create','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','helpExtra','map','Update\x20an\x20existing\x20record','delete','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20PAGINATION','paramsHint','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','4400940oHAXTL','batchCreate','build','code','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]'];a18_0x4373=function(){return _0x5afabc;};return a18_0x4373();}const a18_0x56b9c1=a18_0x582a;(function(_0x48bbd9,_0xad7a1a){const _0x778d1f=a18_0x582a,_0x41fda9=_0x48bbd9();while(!![]){try{const _0x29bc8c=-parseInt(_0x778d1f(0x131))/0x1+-parseInt(_0x778d1f(0x10d))/0x2+-parseInt(_0x778d1f(0x132))/0x3+parseInt(_0x778d1f(0x140))/0x4+-parseInt(_0x778d1f(0x15f))/0x5+parseInt(_0x778d1f(0x115))/0x6+parseInt(_0x778d1f(0x13c))/0x7;if(_0x29bc8c===_0xad7a1a)break;else _0x41fda9['push'](_0x41fda9['shift']());}catch(_0x248b33){_0x41fda9['push'](_0x41fda9['shift']());}}}(a18_0x4373,0xba5e1));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a18_0x582a(_0x22af3c,_0x2c320a){_0x22af3c=_0x22af3c-0x10a;const _0x43731a=a18_0x4373();let _0x582a4b=_0x43731a[_0x22af3c];return _0x582a4b;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a18_0x56b9c1(0x147),'operation':a18_0x56b9c1(0x147),'risk':a18_0x56b9c1(0x145),'paramsRequired':![],'description':a18_0x56b9c1(0x12b),'paramsHint':a18_0x56b9c1(0x119)+a18_0x56b9c1(0x117),'helpExtra':[a18_0x56b9c1(0x11e),a18_0x56b9c1(0x10f),a18_0x56b9c1(0x137),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}',a18_0x56b9c1(0x142),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a18_0x56b9c1(0x13a),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','',a18_0x56b9c1(0x11f),a18_0x56b9c1(0x14d),a18_0x56b9c1(0x143),'',a18_0x56b9c1(0x116),a18_0x56b9c1(0x14c),a18_0x56b9c1(0x155),a18_0x56b9c1(0x111),a18_0x56b9c1(0x127),a18_0x56b9c1(0x15b),'',a18_0x56b9c1(0x15c),a18_0x56b9c1(0x134),a18_0x56b9c1(0x15e),a18_0x56b9c1(0x149)]['join']('\x0a')},{'command':'getOne','operation':a18_0x56b9c1(0x12d),'risk':a18_0x56b9c1(0x145),'paramsRequired':!![],'description':a18_0x56b9c1(0x150),'paramsHint':a18_0x56b9c1(0x13f)},{'command':a18_0x56b9c1(0x153),'operation':'create','risk':a18_0x56b9c1(0x139),'paramsRequired':!![],'description':a18_0x56b9c1(0x114),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':'batchCreate','operation':'batchCreate','risk':'write','paramsRequired':!![],'description':a18_0x56b9c1(0x11a),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a18_0x56b9c1(0x152),'operation':a18_0x56b9c1(0x152),'risk':'write','paramsRequired':!![],'description':a18_0x56b9c1(0x159),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a18_0x56b9c1(0x15a),'risk':a18_0x56b9c1(0x118),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a18_0x56b9c1(0x13f)},{'command':a18_0x56b9c1(0x120),'operation':a18_0x56b9c1(0x120),'risk':a18_0x56b9c1(0x145),'paramsRequired':![],'description':a18_0x56b9c1(0x123),'paramsHint':a18_0x56b9c1(0x154)+a18_0x56b9c1(0x133),'helpExtra':[a18_0x56b9c1(0x11b),a18_0x56b9c1(0x144),a18_0x56b9c1(0x13e),a18_0x56b9c1(0x10e),a18_0x56b9c1(0x148),a18_0x56b9c1(0x156),a18_0x56b9c1(0x136),a18_0x56b9c1(0x14e),'','\x20\x20PARAMS\x20STRUCTURE',a18_0x56b9c1(0x12a),a18_0x56b9c1(0x141),a18_0x56b9c1(0x121),a18_0x56b9c1(0x128),a18_0x56b9c1(0x13b),a18_0x56b9c1(0x10c),'',a18_0x56b9c1(0x124),a18_0x56b9c1(0x146),a18_0x56b9c1(0x14a),'',a18_0x56b9c1(0x126),a18_0x56b9c1(0x138)][a18_0x56b9c1(0x125)]('\x0a')}];function makeDataCommand(_0x503245){const _0x314172=a18_0x56b9c1,_0x35d55b=_0x314172(0x12e)+_0x503245['command'],_0x4f3eb3={'service':_0x314172(0x151),'command':_0x503245[_0x314172(0x135)],'description':_0x503245['description'],'risk':_0x503245['risk'],'helpExtra':_0x503245[_0x314172(0x157)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x503245[_0x314172(0x15d)]}],'validate':async _0x170d25=>{const _0x3c75ac=_0x314172;_0x503245[_0x3c75ac(0x122)]&&requireAnyOf(_0x170d25,[_0x3c75ac(0x14f)],_0x35d55b),_0x503245[_0x3c75ac(0x12f)]===_0x3c75ac(0x160)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x170d25['str'](_0x3c75ac(0x14f))));},async 'execute'(_0x338972){const _0x2cc59f=_0x314172,_0x16ae83=_0x338972['str'](_0x2cc59f(0x10b)),_0x18cae5=_0x503245[_0x2cc59f(0x12f)]===_0x2cc59f(0x160)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x338972[_0x2cc59f(0x12c)](_0x2cc59f(0x14f)))):parseJsonParams(_0x338972[_0x2cc59f(0x12c)](_0x2cc59f(0x14f)))??{},_0x650186=Date['now'](),_0x3fdfd6=await executeData(_0x16ae83,_0x503245[_0x2cc59f(0x12f)],_0x18cae5),_0x181240=Date[_0x2cc59f(0x113)]()-_0x650186;return{'ok':!![],'data':{'result':_0x3fdfd6,'elapsed':_0x181240},'message':_0x2cc59f(0x12e)+_0x503245[_0x2cc59f(0x135)]+_0x2cc59f(0x110)+_0x181240+'ms'};}};return _0x503245[_0x314172(0x11c)]!==_0x314172(0x145)&&(_0x4f3eb3[_0x314172(0x13d)]=async _0x22a372=>{const _0x40a541=_0x314172,_0x43b484=_0x22a372[_0x40a541(0x12c)](_0x40a541(0x10b)),_0x1ee55b=_0x503245['operation']===_0x40a541(0x160)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x22a372['str'](_0x40a541(0x14f)))):parseJsonParams(_0x22a372[_0x40a541(0x12c)](_0x40a541(0x14f)))??{};return dryRun(_0x40a541(0x14b),_0x40a541(0x11d)+_0x43b484+'/'+_0x503245[_0x40a541(0x12f)])[_0x40a541(0x112)](_0x1ee55b)[_0x40a541(0x129)]('Preview:\x20data\x20'+_0x503245[_0x40a541(0x135)]+_0x40a541(0x130)+_0x43b484)[_0x40a541(0x10a)]();}),_0x4f3eb3;}export const dataDefinitions=specs[a18_0x56b9c1(0x158)](makeDataCommand);
1
+ const a18_0x4a8133=a18_0x329d;function a18_0x329d(_0x29c432,_0x20496a){_0x29c432=_0x29c432-0x84;const _0x26a741=a18_0x26a7();let _0x329d41=_0x26a741[_0x29c432];return _0x329d41;}(function(_0x4644d5,_0xa7f92d){const _0x1a92ae=a18_0x329d,_0x5a06ad=_0x4644d5();while(!![]){try{const _0xf5073b=-parseInt(_0x1a92ae(0xab))/0x1*(-parseInt(_0x1a92ae(0x9e))/0x2)+-parseInt(_0x1a92ae(0xc5))/0x3+-parseInt(_0x1a92ae(0x9b))/0x4*(-parseInt(_0x1a92ae(0x97))/0x5)+parseInt(_0x1a92ae(0x8d))/0x6*(parseInt(_0x1a92ae(0x99))/0x7)+parseInt(_0x1a92ae(0xa3))/0x8*(parseInt(_0x1a92ae(0xb9))/0x9)+parseInt(_0x1a92ae(0xc7))/0xa*(-parseInt(_0x1a92ae(0x8e))/0xb)+-parseInt(_0x1a92ae(0xcf))/0xc;if(_0xf5073b===_0xa7f92d)break;else _0x5a06ad['push'](_0x5a06ad['shift']());}catch(_0x4a6241){_0x5a06ad['push'](_0x5a06ad['shift']());}}}(a18_0x26a7,0xe9ce0));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a18_0x4a8133(0x90),'risk':'read','paramsRequired':![],'description':a18_0x4a8133(0x85),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a18_0x4a8133(0xa7),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a18_0x4a8133(0x8b),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a18_0x4a8133(0x8c),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}',a18_0x4a8133(0x8f),a18_0x4a8133(0xaf),a18_0x4a8133(0xc0),'',a18_0x4a8133(0xb5),a18_0x4a8133(0xb1),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','',a18_0x4a8133(0xbe),a18_0x4a8133(0x98),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a18_0x4a8133(0xb4),a18_0x4a8133(0x95),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a18_0x4a8133(0x9a),'\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.',a18_0x4a8133(0x88),a18_0x4a8133(0xba)][a18_0x4a8133(0xbd)]('\x0a')},{'command':a18_0x4a8133(0xb8),'operation':a18_0x4a8133(0xb8),'risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a18_0x4a8133(0x86)},{'command':a18_0x4a8133(0xa8),'operation':a18_0x4a8133(0xa8),'risk':a18_0x4a8133(0x93),'paramsRequired':!![],'description':a18_0x4a8133(0x8a),'paramsHint':a18_0x4a8133(0x9c)},{'command':a18_0x4a8133(0xa0),'operation':a18_0x4a8133(0xa0),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a18_0x4a8133(0xc1)},{'command':a18_0x4a8133(0xad),'operation':'update','risk':'write','paramsRequired':!![],'description':a18_0x4a8133(0xd1),'paramsHint':a18_0x4a8133(0xa4)},{'command':'delete','operation':'delete','risk':a18_0x4a8133(0xcb),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a18_0x4a8133(0x86)},{'command':a18_0x4a8133(0xce),'operation':a18_0x4a8133(0xce),'risk':a18_0x4a8133(0x91),'paramsRequired':![],'description':a18_0x4a8133(0xc4),'paramsHint':a18_0x4a8133(0x94)+a18_0x4a8133(0xc6),'helpExtra':[a18_0x4a8133(0xac),a18_0x4a8133(0xbf),a18_0x4a8133(0xca),a18_0x4a8133(0xbc),a18_0x4a8133(0x96),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}',a18_0x4a8133(0xaa),a18_0x4a8133(0xbb),'','\x20\x20PARAMS\x20STRUCTURE',a18_0x4a8133(0xa5),a18_0x4a8133(0xd3),a18_0x4a8133(0xb2),a18_0x4a8133(0xc3),a18_0x4a8133(0x87),a18_0x4a8133(0xa1),'',a18_0x4a8133(0x9f),a18_0x4a8133(0xc2),a18_0x4a8133(0x89),'',a18_0x4a8133(0xd2),a18_0x4a8133(0xb7)][a18_0x4a8133(0xbd)]('\x0a')}];function a18_0x26a7(){const _0x418fa4=['join','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','153615HTBGDy','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','943530IXrpMP','risk','POST','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','high-risk-write','params','body','aggregate','29436384YQDNjL','data\x20','Update\x20an\x20existing\x20record','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','dryRun','Filter\x20dataset\x20records\x20with\x20query\x20conditions','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','1252734uVytJi','99sdWUzr','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','filter','read','description','write','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','375hpktSU','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','7HIlFFf','\x20\x20PAGINATION','16316OyswDh','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','str','322HMohRo','\x20\x20EXAMPLES','batchCreate','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','operation','888wWhNlx','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','command','\x20\x20WHERE\x20OPERATORS','create','helpExtra','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','11827KkvMug','\x20\x20AGGREGATE\x20TYPES','update','data','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','now','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','build','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20LOGICAL\x20COMBINATORS','\x20on\x20dataset\x20','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','getOne','153423WHBpFg','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}'];a18_0x26a7=function(){return _0x418fa4;};return a18_0x26a7();}function makeDataCommand(_0x1d3071){const _0x16ad01=a18_0x4a8133,_0x23f6d7='data\x20'+_0x1d3071[_0x16ad01(0xa6)],_0x47250e={'service':_0x16ad01(0xae),'command':_0x1d3071[_0x16ad01(0xa6)],'description':_0x1d3071[_0x16ad01(0x92)],'risk':_0x1d3071[_0x16ad01(0xc8)],'helpExtra':_0x1d3071[_0x16ad01(0xa9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x1d3071['paramsHint']}],'validate':async _0x4dc07b=>{const _0x2ea826=_0x16ad01;_0x1d3071['paramsRequired']&&requireAnyOf(_0x4dc07b,['params'],_0x23f6d7),_0x1d3071[_0x2ea826(0xa2)]===_0x2ea826(0xa0)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4dc07b[_0x2ea826(0x9d)](_0x2ea826(0xcc))));},async 'execute'(_0x3d998d){const _0x1a0cf9=_0x16ad01,_0x138bc3=_0x3d998d[_0x1a0cf9(0x9d)]('code'),_0x1f279c=_0x1d3071[_0x1a0cf9(0xa2)]===_0x1a0cf9(0xa0)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3d998d[_0x1a0cf9(0x9d)]('params'))):parseJsonParams(_0x3d998d[_0x1a0cf9(0x9d)](_0x1a0cf9(0xcc)))??{},_0x12e40f=Date[_0x1a0cf9(0xb0)](),_0x17f39c=await executeData(_0x138bc3,_0x1d3071[_0x1a0cf9(0xa2)],_0x1f279c),_0x32b8b1=Date[_0x1a0cf9(0xb0)]()-_0x12e40f;return{'ok':!![],'data':{'result':_0x17f39c,'elapsed':_0x32b8b1},'message':_0x1a0cf9(0xd0)+_0x1d3071[_0x1a0cf9(0xa6)]+'\x20completed\x20in\x20'+_0x32b8b1+'ms'};}};return _0x1d3071[_0x16ad01(0xc8)]!=='read'&&(_0x47250e[_0x16ad01(0x84)]=async _0x2ce8e1=>{const _0x5785f6=_0x16ad01,_0x307af5=_0x2ce8e1[_0x5785f6(0x9d)]('code'),_0x2677f6=_0x1d3071['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2ce8e1[_0x5785f6(0x9d)](_0x5785f6(0xcc)))):parseJsonParams(_0x2ce8e1[_0x5785f6(0x9d)](_0x5785f6(0xcc)))??{};return dryRun(_0x5785f6(0xc9),'/api/{appCode}/'+_0x307af5+'/'+_0x1d3071['operation'])[_0x5785f6(0xcd)](_0x2677f6)[_0x5785f6(0x92)]('Preview:\x20data\x20'+_0x1d3071[_0x5785f6(0xa6)]+_0x5785f6(0xb6)+_0x307af5)[_0x5785f6(0xb3)]();}),_0x47250e;}export const dataDefinitions=specs['map'](makeDataCommand);
@@ -1 +1 @@
1
- const a19_0x408fdd=a19_0x27ad;(function(_0x24cfcb,_0x526a7f){const _0x34fd28=a19_0x27ad,_0x54e036=_0x24cfcb();while(!![]){try{const _0x485974=parseInt(_0x34fd28(0x131))/0x1+parseInt(_0x34fd28(0xfa))/0x2*(-parseInt(_0x34fd28(0x145))/0x3)+parseInt(_0x34fd28(0x103))/0x4*(-parseInt(_0x34fd28(0x11d))/0x5)+parseInt(_0x34fd28(0xfe))/0x6+parseInt(_0x34fd28(0x146))/0x7+parseInt(_0x34fd28(0x10e))/0x8*(-parseInt(_0x34fd28(0x134))/0x9)+-parseInt(_0x34fd28(0x126))/0xa*(-parseInt(_0x34fd28(0x11b))/0xb);if(_0x485974===_0x526a7f)break;else _0x54e036['push'](_0x54e036['shift']());}catch(_0x44c7f1){_0x54e036['push'](_0x54e036['shift']());}}}(a19_0x3ba1,0x71f7d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a19_0x3ba1(){const _0x14d018=['dataType','modifierIdField','indexes','string','doType','modelId','trim','columnCodeListWithDeleted','split','sourceType','toFieldLabel','code','description','method','host','dbtableConfig','2358921TciuhK','4432064uJRyvM','isArray','2CxWCAq','path','parse','entries','92610TfPsCa','pkField','datasetKey','dblinkInfoDTO','dbName','1732LOkyNg','properties','str','validateRules','logicField','formatRules','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','tableComment','beforeScriptId','afterScriptId','relatedPageInfoList','11768VAnTwh','creatorIdField','modifierNameField','fromField','operations','requestFields','required','requestBody','responseBody','deleted','relations','responseFields','allFields','11AajItq','createTimeField','2315jqYLCx','length','toDatasetCode','title','map','displayName','type','toDatasetName','tableName','14769230VKheEe','filter','extend','appCode','allFieldNames','options','dbId','name','dbType','toTableName','find','209218WXmOHU','labelField','toField','5391gviiZN'];a19_0x3ba1=function(){return _0x14d018;};return a19_0x3ba1();}function normalizeField(_0x2231d1){const _0x13eec5=a19_0x27ad;if(_0x2231d1[_0x13eec5(0x117)])return null;const _0x36c33f=Boolean(_0x2231d1[_0x13eec5(0x122)]!==undefined||_0x2231d1[_0x13eec5(0x139)]!==undefined);let _0x40098c={};if(!_0x36c33f&&typeof _0x2231d1[_0x13eec5(0x128)]===_0x13eec5(0x138))try{_0x40098c=JSON[_0x13eec5(0xfc)](_0x2231d1[_0x13eec5(0x128)]);}catch{}const _0x5cd3f0=_0x36c33f?_0x2231d1[_0x13eec5(0x12d)]:_0x2231d1[_0x13eec5(0x140)],_0x2c9241=_0x36c33f?_0x2231d1[_0x13eec5(0x122)]:_0x2231d1[_0x13eec5(0x12d)],_0x25a3b4=_0x36c33f?_0x2231d1[_0x13eec5(0x139)]:_0x2231d1[_0x13eec5(0x123)]||_0x2231d1[_0x13eec5(0x135)],_0x39cfaf=_0x36c33f?_0x2231d1[_0x13eec5(0xff)]===!![]:_0x40098c[_0x13eec5(0xff)]===!![],_0x54415e=_0x36c33f?_0x2231d1[_0x13eec5(0x114)]===!![]:_0x40098c[_0x13eec5(0x114)]===!![],_0x5c9762=_0x36c33f?_0x2231d1[_0x13eec5(0x12b)]??null:_0x40098c[_0x13eec5(0x12b)]??null,_0x2c929c={'name':_0x5cd3f0,'displayName':_0x2c9241||_0x5cd3f0,'type':_0x25a3b4,'dbType':_0x2231d1[_0x13eec5(0x12e)],'pk':_0x39cfaf,'required':_0x54415e,'description':_0x2231d1[_0x13eec5(0x141)]||undefined};return Array[_0x13eec5(0x147)](_0x5c9762)&&_0x5c9762[_0x13eec5(0x11e)]>0x0&&(_0x2c929c[_0x13eec5(0x12b)]=_0x5c9762),_0x2c929c;}function parseJsonMaybe(_0x56130e){const _0x18e92c=a19_0x27ad;if(typeof _0x56130e!=='string')return _0x56130e;try{return JSON[_0x18e92c(0xfc)](_0x56130e);}catch{return _0x56130e;}}function normalizeOperationEntry(_0x7d214f,_0x41b70d){const _0x476a20=a19_0x27ad;if(!_0x41b70d||typeof _0x41b70d!=='object')return null;if(!_0x41b70d[_0x476a20(0x142)]||!_0x41b70d[_0x476a20(0xfb)])return null;const _0x47f80a={'name':_0x7d214f,'method':_0x41b70d['method'],'path':_0x41b70d[_0x476a20(0xfb)]};if(_0x41b70d[_0x476a20(0x143)])_0x47f80a[_0x476a20(0x143)]=_0x41b70d[_0x476a20(0x143)];if(_0x41b70d[_0x476a20(0x115)]!=null)_0x47f80a[_0x476a20(0x115)]=parseJsonMaybe(_0x41b70d[_0x476a20(0x115)]);if(_0x41b70d[_0x476a20(0x116)]!=null)_0x47f80a[_0x476a20(0x116)]=parseJsonMaybe(_0x41b70d[_0x476a20(0x116)]);if(_0x41b70d['beforeScriptId']!=null)_0x47f80a[_0x476a20(0x10b)]=_0x41b70d[_0x476a20(0x10b)];if(_0x41b70d[_0x476a20(0x10c)]!=null)_0x47f80a[_0x476a20(0x10c)]=_0x41b70d[_0x476a20(0x10c)];if(Array['isArray'](_0x41b70d[_0x476a20(0x113)]))_0x47f80a[_0x476a20(0x113)]=_0x41b70d['requestFields'];if(Array[_0x476a20(0x147)](_0x41b70d[_0x476a20(0x119)]))_0x47f80a[_0x476a20(0x119)]=_0x41b70d[_0x476a20(0x119)];return _0x47f80a;}function summarizeDbtable(_0x503239){const _0x147297=a19_0x27ad,_0x2f9cb9={},_0xf7b80d=[_0x147297(0x12c),_0x147297(0x102),'tableName',_0x147297(0x100),_0x147297(0xff),_0x147297(0x11a),_0x147297(0x107),_0x147297(0x11c),'updateTimeField',_0x147297(0x10f),'creatorNameField',_0x147297(0x136),_0x147297(0x110),_0x147297(0x132),_0x147297(0x101)];for(const _0x2dc028 of _0xf7b80d){if(_0x503239[_0x2dc028]!==undefined)_0x2f9cb9[_0x2dc028]=_0x503239[_0x2dc028];}return typeof _0x2f9cb9[_0x147297(0x11a)]==='string'&&_0x2f9cb9['allFields'][_0x147297(0x11e)]>0x0&&(_0x2f9cb9[_0x147297(0x12a)]=_0x2f9cb9[_0x147297(0x11a)][_0x147297(0x13d)](',')[_0x147297(0x121)](_0x5ea287=>_0x5ea287[_0x147297(0x13b)]())[_0x147297(0x127)](Boolean)),_0x2f9cb9;}function a19_0x27ad(_0x501ff0,_0x5e5c6c){_0x501ff0=_0x501ff0-0xfa;const _0x3ba109=a19_0x3ba1();let _0x27adf4=_0x3ba109[_0x501ff0];return _0x27adf4;}function normalizeRelatedPages(_0x430514){const _0x8b4534=a19_0x27ad;if(!Array[_0x8b4534(0x147)](_0x430514))return[];return _0x430514['filter'](_0x158b83=>_0x158b83&&typeof _0x158b83==='object')[_0x8b4534(0x121)](_0x48b6b3=>({'id':_0x48b6b3['id'],'type':_0x48b6b3[_0x8b4534(0x123)],'code':_0x48b6b3[_0x8b4534(0x140)],'title':_0x48b6b3[_0x8b4534(0x120)],'deleted':_0x48b6b3[_0x8b4534(0x117)]===!![]}));}function normalizeFallbackFieldName(_0x92a78,_0x448e40){const _0x104b3d=a19_0x27ad,_0x2f5c43=_0x92a78[_0x104b3d(0x13b)]();if(!_0x2f5c43)return null;return{'name':_0x2f5c43,'displayName':_0x2f5c43,'type':undefined,'dbType':undefined,'pk':_0x2f5c43===_0x448e40,'required':![],'description':undefined};}async function loadListFieldFallback(_0x22e0de,_0x56393c){const _0x59c180=a19_0x27ad;if(!_0x22e0de||!_0x56393c)return[];try{const _0x5c77aa=await listDatasets(_0x22e0de,{'code':_0x56393c}),_0x4e304e=_0x5c77aa[_0x59c180(0x130)](_0x135400=>_0x135400[_0x59c180(0x140)]===_0x56393c)??_0x5c77aa[0x0],_0x573bcc=_0x4e304e?.[_0x59c180(0x144)]??{},_0x4771a6=typeof _0x573bcc[_0x59c180(0x11a)]===_0x59c180(0x138)?_0x573bcc[_0x59c180(0x11a)][_0x59c180(0x13d)](','):[];return _0x4771a6[_0x59c180(0x121)](_0x25ba1e=>normalizeFallbackFieldName(_0x25ba1e,_0x573bcc[_0x59c180(0xff)]))['filter'](_0x7b3a90=>_0x7b3a90!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':'detail','description':a19_0x408fdd(0x109),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x5ad33d){const _0x2917d0=a19_0x408fdd,_0x4dd4ca=await getDatasetDetail(_0x5ad33d[_0x2917d0(0x105)](_0x2917d0(0x140))),_0x172fc6=Array['isArray'](_0x4dd4ca['fields'])?_0x4dd4ca['fields']:Array['isArray'](_0x4dd4ca[_0x2917d0(0x104)])?_0x4dd4ca[_0x2917d0(0x104)]:[];let _0x432e33=_0x172fc6[_0x2917d0(0x121)](_0x2fbd43=>normalizeField(_0x2fbd43))['filter'](_0xa55d8b=>_0xa55d8b!==null);_0x432e33[_0x2917d0(0x11e)]===0x0&&(_0x432e33=await loadListFieldFallback(_0x5ad33d[_0x2917d0(0x129)],_0x5ad33d[_0x2917d0(0x105)](_0x2917d0(0x140))));const _0x91162a=_0x4dd4ca[_0x2917d0(0x112)]??{},_0x594cd7=[];for(const [_0x383eb3,_0x17e881]of Object[_0x2917d0(0xfd)](_0x91162a)){const _0x506411=normalizeOperationEntry(_0x383eb3,_0x17e881);if(_0x506411)_0x594cd7['push'](_0x506411);}const _0x29db29=_0x4dd4ca[_0x2917d0(0x144)]??{},_0x34fb3e=_0x4dd4ca['dataset']??{},_0x8b2940=_0x29db29[_0x2917d0(0x12c)]!=null?{'id':_0x29db29['dbId'],'name':_0x29db29['dbName']??null}:undefined;let _0x2d183b;return typeof _0x4dd4ca['extend']===_0x2917d0(0x138)&&(_0x2d183b=parseJsonMaybe(_0x4dd4ca[_0x2917d0(0x128)])),{'ok':!![],'data':{'id':_0x4dd4ca[_0x2917d0(0x13a)]??_0x4dd4ca['id'],'name':_0x4dd4ca[_0x2917d0(0x12d)],'code':_0x4dd4ca['modelCode']||_0x4dd4ca['code'],'doVersion':_0x4dd4ca['doVersion'],'description':_0x4dd4ca[_0x2917d0(0x141)]||_0x34fb3e[_0x2917d0(0x10a)]||undefined,'source':_0x4dd4ca['source']||_0x34fb3e[_0x2917d0(0x13e)],'table':_0x29db29[_0x2917d0(0x125)]||_0x34fb3e[_0x2917d0(0x125)],'datasetKey':_0x29db29[_0x2917d0(0x100)],'pk':_0x29db29[_0x2917d0(0xff)],'db':_0x8b2940,'dbtable':summarizeDbtable(_0x29db29),'fields':_0x432e33,'operations':_0x594cd7,'indexes':Array['isArray'](_0x34fb3e['indexes'])?_0x34fb3e[_0x2917d0(0x137)]:[],'relations':Array['isArray'](_0x4dd4ca['relations'])?_0x4dd4ca[_0x2917d0(0x118)][_0x2917d0(0x121)](_0x672a8a=>({'fromField':_0x672a8a[_0x2917d0(0x111)],'toDataset':_0x672a8a[_0x2917d0(0x124)],'toCode':_0x672a8a[_0x2917d0(0x11f)],'toTable':_0x672a8a[_0x2917d0(0x12f)],'toField':_0x672a8a[_0x2917d0(0x133)],'labelField':_0x672a8a[_0x2917d0(0x13f)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x4dd4ca[_0x2917d0(0x10d)]),...Array['isArray'](_0x4dd4ca[_0x2917d0(0x13c)])?{'columnCodeListWithDeleted':_0x4dd4ca[_0x2917d0(0x13c)]}:{},'formatRules':Array[_0x2917d0(0x147)](_0x4dd4ca['formatRules'])?_0x4dd4ca[_0x2917d0(0x108)]:[],'validateRules':Array[_0x2917d0(0x147)](_0x4dd4ca[_0x2917d0(0x106)])?_0x4dd4ca[_0x2917d0(0x106)]:[],..._0x2d183b!==undefined?{'extend':_0x2d183b}:{},'stats':{'fieldCount':_0x432e33[_0x2917d0(0x11e)],'operationCount':_0x594cd7[_0x2917d0(0x11e)]}}};}};
1
+ const a19_0x25c16d=a19_0x1eb7;(function(_0x1fc0d2,_0x2c2f80){const _0xfcb077=a19_0x1eb7,_0x495be4=_0x1fc0d2();while(!![]){try{const _0x312f4c=-parseInt(_0xfcb077(0xac))/0x1+parseInt(_0xfcb077(0x9b))/0x2*(-parseInt(_0xfcb077(0x8c))/0x3)+parseInt(_0xfcb077(0xc7))/0x4+-parseInt(_0xfcb077(0xd4))/0x5+-parseInt(_0xfcb077(0xc0))/0x6+-parseInt(_0xfcb077(0xa7))/0x7*(parseInt(_0xfcb077(0xd2))/0x8)+-parseInt(_0xfcb077(0xa9))/0x9*(-parseInt(_0xfcb077(0xd0))/0xa);if(_0x312f4c===_0x2c2f80)break;else _0x495be4['push'](_0x495be4['shift']());}catch(_0x3a68e3){_0x495be4['push'](_0x495be4['shift']());}}}(a19_0x5554,0xb2462));function a19_0x1eb7(_0x19687c,_0x34a371){_0x19687c=_0x19687c-0x87;const _0x55549e=a19_0x5554();let _0x1eb70a=_0x55549e[_0x19687c];return _0x1eb70a;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x14dbb4){const _0x4e1c67=a19_0x1eb7;if(_0x14dbb4[_0x4e1c67(0x8f)])return null;const _0x302e0b=Boolean(_0x14dbb4[_0x4e1c67(0xa3)]!==undefined||_0x14dbb4[_0x4e1c67(0xb0)]!==undefined);let _0x179296={};if(!_0x302e0b&&typeof _0x14dbb4[_0x4e1c67(0xbf)]===_0x4e1c67(0xae))try{_0x179296=JSON[_0x4e1c67(0xa4)](_0x14dbb4[_0x4e1c67(0xbf)]);}catch{}const _0x442c17=_0x302e0b?_0x14dbb4['name']:_0x14dbb4[_0x4e1c67(0xab)],_0x40ad91=_0x302e0b?_0x14dbb4[_0x4e1c67(0xa3)]:_0x14dbb4['name'],_0x219311=_0x302e0b?_0x14dbb4['doType']:_0x14dbb4[_0x4e1c67(0xa1)]||_0x14dbb4['dataType'],_0x65df2d=_0x302e0b?_0x14dbb4['pkField']===!![]:_0x179296[_0x4e1c67(0xb1)]===!![],_0x3aea87=_0x302e0b?_0x14dbb4[_0x4e1c67(0x95)]===!![]:_0x179296[_0x4e1c67(0x95)]===!![],_0xf6b9af=_0x302e0b?_0x14dbb4['options']??null:_0x179296[_0x4e1c67(0xc3)]??null,_0x25a4d1={'name':_0x442c17,'displayName':_0x40ad91||_0x442c17,'type':_0x219311,'dbType':_0x14dbb4[_0x4e1c67(0xb6)],'pk':_0x65df2d,'required':_0x3aea87,'description':_0x14dbb4[_0x4e1c67(0xa0)]||undefined};return Array[_0x4e1c67(0x96)](_0xf6b9af)&&_0xf6b9af[_0x4e1c67(0xc1)]>0x0&&(_0x25a4d1[_0x4e1c67(0xc3)]=_0xf6b9af),_0x25a4d1;}function parseJsonMaybe(_0x1924da){const _0x2e9301=a19_0x1eb7;if(typeof _0x1924da!==_0x2e9301(0xae))return _0x1924da;try{return JSON[_0x2e9301(0xa4)](_0x1924da);}catch{return _0x1924da;}}function a19_0x5554(){const _0x291c96=['beforeScriptId','allFields','tableComment','creatorNameField','dataset','appCode','title','18249090lijkeQ','toFieldLabel','16XQEKxx','detail','3745850kbuzem','object','dbName','relations','modelId','createTimeField','9MTGSqc','source','afterScriptId','deleted','sourceType','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','toDatasetName','tableName','method','required','isArray','dbId','modifierIdField','fromField','str','392594HQqfij','updateTimeField','validateRules','filter','formatRules','description','type','toField','displayName','parse','push','labelField','3307052TAHvFG','entries','18FFRRAH','responseFields','code','849161FHsmUU','host','string','creatorIdField','doType','pkField','relatedPageInfoList','properties','path','toTableName','dbType','find','dbtableConfig','fields','map','columnCodeListWithDeleted','logicField','toDatasetCode','split','extend','6534180JOGnoA','length','responseBody','options','modifierNameField','requestFields','datasetKey','5206064hODbXH','requestBody'];a19_0x5554=function(){return _0x291c96;};return a19_0x5554();}function normalizeOperationEntry(_0x37f51a,_0xf0f9bd){const _0x4349ec=a19_0x1eb7;if(!_0xf0f9bd||typeof _0xf0f9bd!==_0x4349ec(0x87))return null;if(!_0xf0f9bd[_0x4349ec(0x94)]||!_0xf0f9bd[_0x4349ec(0xb4)])return null;const _0x18b771={'name':_0x37f51a,'method':_0xf0f9bd[_0x4349ec(0x94)],'path':_0xf0f9bd[_0x4349ec(0xb4)]};if(_0xf0f9bd[_0x4349ec(0xad)])_0x18b771[_0x4349ec(0xad)]=_0xf0f9bd[_0x4349ec(0xad)];if(_0xf0f9bd[_0x4349ec(0xc8)]!=null)_0x18b771['requestBody']=parseJsonMaybe(_0xf0f9bd[_0x4349ec(0xc8)]);if(_0xf0f9bd[_0x4349ec(0xc2)]!=null)_0x18b771['responseBody']=parseJsonMaybe(_0xf0f9bd[_0x4349ec(0xc2)]);if(_0xf0f9bd[_0x4349ec(0xc9)]!=null)_0x18b771[_0x4349ec(0xc9)]=_0xf0f9bd[_0x4349ec(0xc9)];if(_0xf0f9bd[_0x4349ec(0x8e)]!=null)_0x18b771['afterScriptId']=_0xf0f9bd[_0x4349ec(0x8e)];if(Array[_0x4349ec(0x96)](_0xf0f9bd[_0x4349ec(0xc5)]))_0x18b771[_0x4349ec(0xc5)]=_0xf0f9bd[_0x4349ec(0xc5)];if(Array[_0x4349ec(0x96)](_0xf0f9bd[_0x4349ec(0xaa)]))_0x18b771[_0x4349ec(0xaa)]=_0xf0f9bd['responseFields'];return _0x18b771;}function summarizeDbtable(_0x59b239){const _0x49c3c9=a19_0x1eb7,_0x32ddfa={},_0x79a394=[_0x49c3c9(0x97),_0x49c3c9(0x88),_0x49c3c9(0x93),_0x49c3c9(0xc6),_0x49c3c9(0xb1),_0x49c3c9(0xca),_0x49c3c9(0xbc),_0x49c3c9(0x8b),_0x49c3c9(0x9c),_0x49c3c9(0xaf),_0x49c3c9(0xcc),_0x49c3c9(0x98),_0x49c3c9(0xc4),_0x49c3c9(0xa6),'dblinkInfoDTO'];for(const _0x2e7c02 of _0x79a394){if(_0x59b239[_0x2e7c02]!==undefined)_0x32ddfa[_0x2e7c02]=_0x59b239[_0x2e7c02];}return typeof _0x32ddfa[_0x49c3c9(0xca)]===_0x49c3c9(0xae)&&_0x32ddfa[_0x49c3c9(0xca)][_0x49c3c9(0xc1)]>0x0&&(_0x32ddfa['allFieldNames']=_0x32ddfa[_0x49c3c9(0xca)][_0x49c3c9(0xbe)](',')[_0x49c3c9(0xba)](_0x1d84da=>_0x1d84da['trim']())[_0x49c3c9(0x9e)](Boolean)),_0x32ddfa;}function normalizeRelatedPages(_0xcf55f6){const _0x23b482=a19_0x1eb7;if(!Array['isArray'](_0xcf55f6))return[];return _0xcf55f6[_0x23b482(0x9e)](_0x459a77=>_0x459a77&&typeof _0x459a77==='object')[_0x23b482(0xba)](_0x23efd4=>({'id':_0x23efd4['id'],'type':_0x23efd4['type'],'code':_0x23efd4[_0x23b482(0xab)],'title':_0x23efd4[_0x23b482(0xcf)],'deleted':_0x23efd4[_0x23b482(0x8f)]===!![]}));}function normalizeFallbackFieldName(_0x4a3211,_0x1fcdce){const _0x225c64=_0x4a3211['trim']();if(!_0x225c64)return null;return{'name':_0x225c64,'displayName':_0x225c64,'type':undefined,'dbType':undefined,'pk':_0x225c64===_0x1fcdce,'required':![],'description':undefined};}async function loadListFieldFallback(_0x126eef,_0x2cf1ce){const _0x30c62f=a19_0x1eb7;if(!_0x126eef||!_0x2cf1ce)return[];try{const _0x2725c5=await listDatasets(_0x126eef,{'code':_0x2cf1ce}),_0x10c4fe=_0x2725c5[_0x30c62f(0xb7)](_0x175755=>_0x175755['code']===_0x2cf1ce)??_0x2725c5[0x0],_0x2d2b94=_0x10c4fe?.[_0x30c62f(0xb8)]??{},_0x30fa3d=typeof _0x2d2b94[_0x30c62f(0xca)]===_0x30c62f(0xae)?_0x2d2b94[_0x30c62f(0xca)]['split'](','):[];return _0x30fa3d[_0x30c62f(0xba)](_0x5aec1e=>normalizeFallbackFieldName(_0x5aec1e,_0x2d2b94[_0x30c62f(0xb1)]))[_0x30c62f(0x9e)](_0x8c01d8=>_0x8c01d8!==null);}catch{return[];}}export const datasetDetail={'service':a19_0x25c16d(0xcd),'command':a19_0x25c16d(0xd3),'description':a19_0x25c16d(0x91),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x3ec623){const _0x45e18a=a19_0x25c16d,_0x43d4f2=await getDatasetDetail(_0x3ec623[_0x45e18a(0x9a)](_0x45e18a(0xab))),_0x39eb6c=Array[_0x45e18a(0x96)](_0x43d4f2[_0x45e18a(0xb9)])?_0x43d4f2[_0x45e18a(0xb9)]:Array['isArray'](_0x43d4f2[_0x45e18a(0xb3)])?_0x43d4f2[_0x45e18a(0xb3)]:[];let _0x74b52d=_0x39eb6c[_0x45e18a(0xba)](_0x17971c=>normalizeField(_0x17971c))[_0x45e18a(0x9e)](_0xaa04f7=>_0xaa04f7!==null);_0x74b52d[_0x45e18a(0xc1)]===0x0&&(_0x74b52d=await loadListFieldFallback(_0x3ec623[_0x45e18a(0xce)],_0x3ec623[_0x45e18a(0x9a)](_0x45e18a(0xab))));const _0x28314d=_0x43d4f2['operations']??{},_0x2efbc0=[];for(const [_0x482cfe,_0x524823]of Object[_0x45e18a(0xa8)](_0x28314d)){const _0x4e7c40=normalizeOperationEntry(_0x482cfe,_0x524823);if(_0x4e7c40)_0x2efbc0[_0x45e18a(0xa5)](_0x4e7c40);}const _0x292444=_0x43d4f2[_0x45e18a(0xb8)]??{},_0x44aa9a=_0x43d4f2[_0x45e18a(0xcd)]??{},_0x54334d=_0x292444[_0x45e18a(0x97)]!=null?{'id':_0x292444[_0x45e18a(0x97)],'name':_0x292444['dbName']??null}:undefined;let _0x4eb2b9;return typeof _0x43d4f2[_0x45e18a(0xbf)]==='string'&&(_0x4eb2b9=parseJsonMaybe(_0x43d4f2['extend'])),{'ok':!![],'data':{'id':_0x43d4f2[_0x45e18a(0x8a)]??_0x43d4f2['id'],'name':_0x43d4f2['name'],'code':_0x43d4f2['modelCode']||_0x43d4f2[_0x45e18a(0xab)],'doVersion':_0x43d4f2['doVersion'],'description':_0x43d4f2[_0x45e18a(0xa0)]||_0x44aa9a[_0x45e18a(0xcb)]||undefined,'source':_0x43d4f2[_0x45e18a(0x8d)]||_0x44aa9a[_0x45e18a(0x90)],'table':_0x292444[_0x45e18a(0x93)]||_0x44aa9a['tableName'],'datasetKey':_0x292444[_0x45e18a(0xc6)],'pk':_0x292444[_0x45e18a(0xb1)],'db':_0x54334d,'dbtable':summarizeDbtable(_0x292444),'fields':_0x74b52d,'operations':_0x2efbc0,'indexes':Array['isArray'](_0x44aa9a['indexes'])?_0x44aa9a['indexes']:[],'relations':Array['isArray'](_0x43d4f2[_0x45e18a(0x89)])?_0x43d4f2[_0x45e18a(0x89)][_0x45e18a(0xba)](_0x55347c=>({'fromField':_0x55347c[_0x45e18a(0x99)],'toDataset':_0x55347c[_0x45e18a(0x92)],'toCode':_0x55347c[_0x45e18a(0xbd)],'toTable':_0x55347c[_0x45e18a(0xb5)],'toField':_0x55347c[_0x45e18a(0xa2)],'labelField':_0x55347c[_0x45e18a(0xd1)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x43d4f2[_0x45e18a(0xb2)]),...Array[_0x45e18a(0x96)](_0x43d4f2[_0x45e18a(0xbb)])?{'columnCodeListWithDeleted':_0x43d4f2[_0x45e18a(0xbb)]}:{},'formatRules':Array[_0x45e18a(0x96)](_0x43d4f2[_0x45e18a(0x9f)])?_0x43d4f2[_0x45e18a(0x9f)]:[],'validateRules':Array[_0x45e18a(0x96)](_0x43d4f2[_0x45e18a(0x9d)])?_0x43d4f2[_0x45e18a(0x9d)]:[],..._0x4eb2b9!==undefined?{'extend':_0x4eb2b9}:{},'stats':{'fieldCount':_0x74b52d[_0x45e18a(0xc1)],'operationCount':_0x2efbc0['length']}}};}};
@@ -1 +1 @@
1
- function a20_0x4843(){const _0x59e2d3=['8bPJyRM','26504080HGFYrK','640220bGGdPg','436475dCilbU','12532941IkBDgk','6850140zZZSuo','3526019YfpMaE','5dhuant','2239004EUsQAG','6QElRxx'];a20_0x4843=function(){return _0x59e2d3;};return a20_0x4843();}(function(_0x52db96,_0x58256b){const _0x4d8602=a20_0x1df5,_0x3b05c5=_0x52db96();while(!![]){try{const _0x31fa59=-parseInt(_0x4d8602(0xc8))/0x1+-parseInt(_0x4d8602(0xc7))/0x2+parseInt(_0x4d8602(0xce))/0x3*(parseInt(_0x4d8602(0xcd))/0x4)+parseInt(_0x4d8602(0xcc))/0x5*(parseInt(_0x4d8602(0xca))/0x6)+-parseInt(_0x4d8602(0xcb))/0x7*(-parseInt(_0x4d8602(0xc5))/0x8)+parseInt(_0x4d8602(0xc9))/0x9+-parseInt(_0x4d8602(0xc6))/0xa;if(_0x31fa59===_0x58256b)break;else _0x3b05c5['push'](_0x3b05c5['shift']());}catch(_0x411e3d){_0x3b05c5['push'](_0x3b05c5['shift']());}}}(a20_0x4843,0xb7381));function a20_0x1df5(_0x1273c3,_0x2aa0ed){_0x1273c3=_0x1273c3-0xc5;const _0x484311=a20_0x4843();let _0x1df52d=_0x484311[_0x1273c3];return _0x1df52d;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ function a20_0x28f6(_0x25799a,_0x5bcc5b){_0x25799a=_0x25799a-0x1f4;const _0x1305de=a20_0x1305();let _0x28f626=_0x1305de[_0x25799a];return _0x28f626;}(function(_0x5120de,_0x219bb2){const _0x36a15e=a20_0x28f6,_0x434245=_0x5120de();while(!![]){try{const _0x19eaf4=-parseInt(_0x36a15e(0x1f4))/0x1+-parseInt(_0x36a15e(0x1f9))/0x2*(-parseInt(_0x36a15e(0x1f6))/0x3)+-parseInt(_0x36a15e(0x1fa))/0x4*(parseInt(_0x36a15e(0x1f7))/0x5)+-parseInt(_0x36a15e(0x1f8))/0x6*(parseInt(_0x36a15e(0x1fe))/0x7)+-parseInt(_0x36a15e(0x1fb))/0x8*(parseInt(_0x36a15e(0x1fd))/0x9)+parseInt(_0x36a15e(0x1fc))/0xa+parseInt(_0x36a15e(0x1f5))/0xb;if(_0x19eaf4===_0x219bb2)break;else _0x434245['push'](_0x434245['shift']());}catch(_0x5505f7){_0x434245['push'](_0x434245['shift']());}}}(a20_0x1305,0x3e5e6));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];function a20_0x1305(){const _0x4fd1c4=['6075QmwBOz','381626fmXann','320147vuSkOP','2447357dNqIwP','3VxGDiA','14710jHYGBA','6EmraEj','585122laXVgS','192CTXwpU','1816WTiLfB','4095200ToRGZs'];a20_0x1305=function(){return _0x4fd1c4;};return a20_0x1305();}
@@ -1 +1 @@
1
- const a21_0x5a034b=a21_0x46d2;function a21_0x46d2(_0x47f8bf,_0x14a391){_0x47f8bf=_0x47f8bf-0x109;const _0x4ba46f=a21_0x4ba4();let _0x46d284=_0x4ba46f[_0x47f8bf];return _0x46d284;}(function(_0x3d72eb,_0x3903c2){const _0x262ee0=a21_0x46d2,_0x22587e=_0x3d72eb();while(!![]){try{const _0x28cb0f=parseInt(_0x262ee0(0x10d))/0x1*(parseInt(_0x262ee0(0x124))/0x2)+-parseInt(_0x262ee0(0x120))/0x3+parseInt(_0x262ee0(0x11f))/0x4+parseInt(_0x262ee0(0x10f))/0x5*(parseInt(_0x262ee0(0x10b))/0x6)+-parseInt(_0x262ee0(0x110))/0x7*(parseInt(_0x262ee0(0x114))/0x8)+parseInt(_0x262ee0(0x122))/0x9+parseInt(_0x262ee0(0x123))/0xa*(parseInt(_0x262ee0(0x11d))/0xb);if(_0x28cb0f===_0x3903c2)break;else _0x22587e['push'](_0x22587e['shift']());}catch(_0xfc9dd0){_0x22587e['push'](_0x22587e['shift']());}}}(a21_0x4ba4,0x706be));function a21_0x4ba4(){const _0x4cfbcd=['pkField','name','40JwcxhJ','list','code','str','string','appCode','dataset','description','trim','5995BjffaU','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','1569568XzgpBR','1142082nJmJny','split','2506941VKukbQ','13250NCCPMN','2VuLbdC','allFields','source','6StWmdR','tableName','141562WFJXwp','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','1003745nMPVpb','1251887WXkFxy','map'];a21_0x4ba4=function(){return _0x4cfbcd;};return a21_0x4ba4();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a21_0x5a034b(0x11a),'command':a21_0x5a034b(0x115),'description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':'read','flags':[{'name':a21_0x5a034b(0x113),'type':a21_0x5a034b(0x118),'description':a21_0x5a034b(0x10e)},{...CODE_FLAG,'required':![],'description':a21_0x5a034b(0x11e)}],async 'execute'(_0x1de4df){const _0x110303=a21_0x5a034b,_0x53391d=_0x1de4df[_0x110303(0x117)]('name'),_0x36b4b2=_0x1de4df[_0x110303(0x117)](_0x110303(0x116)),_0x3173b4=await listDatasets(_0x1de4df[_0x110303(0x119)],{..._0x53391d&&{'name':_0x53391d},..._0x36b4b2&&{'code':_0x36b4b2}});return{'ok':!![],'data':{'total':_0x3173b4['length'],'datasets':_0x3173b4[_0x110303(0x111)](_0x4f96be=>{const _0x4df006=_0x110303,_0xaafd73=_0x4f96be['dbtableConfig']??{};return{'id':_0x4f96be['id'],'code':_0x4f96be[_0x4df006(0x116)],'name':_0x4f96be[_0x4df006(0x113)],'source':_0x4f96be[_0x4df006(0x10a)],'description':_0x4f96be[_0x4df006(0x11b)],'table':_0xaafd73[_0x4df006(0x10c)],'datasetKey':_0xaafd73['datasetKey'],'pk':_0xaafd73[_0x4df006(0x112)],'fields':_0xaafd73['allFields']?_0xaafd73[_0x4df006(0x109)][_0x4df006(0x121)](',')[_0x4df006(0x111)](_0x5d57f2=>_0x5d57f2[_0x4df006(0x11c)]()):[]};})}};}};
1
+ const a21_0x16e617=a21_0x3224;(function(_0xde7205,_0x2dae76){const _0x1e2403=a21_0x3224,_0x582a5b=_0xde7205();while(!![]){try{const _0xb06fb6=-parseInt(_0x1e2403(0x97))/0x1*(parseInt(_0x1e2403(0xa4))/0x2)+-parseInt(_0x1e2403(0x9c))/0x3*(parseInt(_0x1e2403(0x9a))/0x4)+-parseInt(_0x1e2403(0xa0))/0x5*(-parseInt(_0x1e2403(0xa7))/0x6)+-parseInt(_0x1e2403(0x94))/0x7*(parseInt(_0x1e2403(0x90))/0x8)+-parseInt(_0x1e2403(0x9d))/0x9+-parseInt(_0x1e2403(0xa6))/0xa*(-parseInt(_0x1e2403(0x8e))/0xb)+-parseInt(_0x1e2403(0xa8))/0xc*(-parseInt(_0x1e2403(0x93))/0xd);if(_0xb06fb6===_0x2dae76)break;else _0x582a5b['push'](_0x582a5b['shift']());}catch(_0x30dd93){_0x582a5b['push'](_0x582a5b['shift']());}}}(a21_0x53fa,0x9cdd8));function a21_0x3224(_0x58be3a,_0x1de81c){_0x58be3a=_0x58be3a-0x8c;const _0x53fa56=a21_0x53fa();let _0x322487=_0x53fa56[_0x58be3a];return _0x322487;}import{listDatasets}from'../../core/api-client.js';function a21_0x53fa(){const _0x220593=['1449818gXPVOI','pkField','798810UKHCjo','240GYelJe','12KUsbZz','datasetKey','appCode','code','allFields','110ZNxrFg','read','8WfeEpi','length','tableName','3656731JBGjlD','1472961hNJrkX','name','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','1GDjzHw','dataset','list','425576NUXzJZ','description','21lLQWBC','186183oSMMnn','split','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','157900nHshrG','str','source','string'];a21_0x53fa=function(){return _0x220593;};return a21_0x53fa();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a21_0x16e617(0x98),'command':a21_0x16e617(0x99),'description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':a21_0x16e617(0x8f),'flags':[{'name':a21_0x16e617(0x95),'type':a21_0x16e617(0xa3),'description':a21_0x16e617(0x9f)},{...CODE_FLAG,'required':![],'description':a21_0x16e617(0x96)}],async 'execute'(_0x1e19e6){const _0x48a544=a21_0x16e617,_0x27f780=_0x1e19e6[_0x48a544(0xa1)]('name'),_0x27139e=_0x1e19e6['str'](_0x48a544(0x8c)),_0x184c75=await listDatasets(_0x1e19e6[_0x48a544(0xaa)],{..._0x27f780&&{'name':_0x27f780},..._0x27139e&&{'code':_0x27139e}});return{'ok':!![],'data':{'total':_0x184c75[_0x48a544(0x91)],'datasets':_0x184c75['map'](_0x1e65a2=>{const _0x5daaff=_0x48a544,_0x6454cc=_0x1e65a2['dbtableConfig']??{};return{'id':_0x1e65a2['id'],'code':_0x1e65a2[_0x5daaff(0x8c)],'name':_0x1e65a2[_0x5daaff(0x95)],'source':_0x1e65a2[_0x5daaff(0xa2)],'description':_0x1e65a2[_0x5daaff(0x9b)],'table':_0x6454cc[_0x5daaff(0x92)],'datasetKey':_0x6454cc[_0x5daaff(0xa9)],'pk':_0x6454cc[_0x5daaff(0xa5)],'fields':_0x6454cc[_0x5daaff(0x8d)]?_0x6454cc[_0x5daaff(0x8d)][_0x5daaff(0x9e)](',')['map'](_0x2e5995=>_0x2e5995['trim']()):[]};})}};}};
@@ -1 +1 @@
1
- const a22_0x31f1de=a22_0x3387;(function(_0x38366c,_0x31b34b){const _0x245384=a22_0x3387,_0x226c16=_0x38366c();while(!![]){try{const _0x36f78c=parseInt(_0x245384(0x1b5))/0x1*(parseInt(_0x245384(0x1b0))/0x2)+-parseInt(_0x245384(0x1be))/0x3*(-parseInt(_0x245384(0x1b2))/0x4)+-parseInt(_0x245384(0x1b7))/0x5+parseInt(_0x245384(0x1bf))/0x6*(parseInt(_0x245384(0x1ba))/0x7)+parseInt(_0x245384(0x1c1))/0x8+parseInt(_0x245384(0x1b6))/0x9+-parseInt(_0x245384(0x1bd))/0xa;if(_0x36f78c===_0x31b34b)break;else _0x226c16['push'](_0x226c16['shift']());}catch(_0x35ccc9){_0x226c16['push'](_0x226c16['shift']());}}}(a22_0xf907,0xdf926));function a22_0x3387(_0x150535,_0x44c254){_0x150535=_0x150535-0x1b0;const _0xf907f9=a22_0xf907();let _0x338748=_0xf907f9[_0x150535];return _0x338748;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a22_0xf907(){const _0xfcd8a8=['5368420egAgLO','string','dataset','9807DUefOH','read','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','18894680ImFqAR','729rIZEpC','498pekSaV','str','13500088RGXOYT','1230402VBaICL','code','11688GmpfpO','sdk-doc','appCode','1kZDepM','6748749pXrllN'];a22_0xf907=function(){return _0xfcd8a8;};return a22_0xf907();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x6b1aaf){const _0x51bb89=a22_0x3387,_0x544312=typeof _0x6b1aaf===_0x51bb89(0x1b8)?_0x6b1aaf['trim']():'';return _0x544312||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a22_0x31f1de(0x1b9),'command':a22_0x31f1de(0x1b3),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a22_0x31f1de(0x1bb),'flags':[{...CODE_FLAG,'description':a22_0x31f1de(0x1bc)}],async 'execute'(_0x35c13c){const _0x34b6b1=a22_0x31f1de,_0x56bc91=_0x35c13c[_0x34b6b1(0x1c0)](_0x34b6b1(0x1b1)),_0x4bd8c1=await getDatasetSdkUsageDoc(_0x56bc91,_0x35c13c[_0x34b6b1(0x1b4)]);return{'ok':!![],'data':{'code':_0x56bc91,'appCode':_0x35c13c[_0x34b6b1(0x1b4)],'markdown':formatDatasetSdkMarkdown(_0x4bd8c1)}};}};
1
+ function a22_0x864f(){const _0x5ff59e=['1167125elSJAG','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','77ZREVcq','2532860wuezdk','sdk-doc','369564lCiJUO','740076vlDmFh','2768orWlHl','dataset','trim','109064oRoTkT','string','appCode','287FShGvN','15812256TzaYXM','11ATlAGy','12lUeVAO','read','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','423WTGGLq','str'];a22_0x864f=function(){return _0x5ff59e;};return a22_0x864f();}const a22_0x565d31=a22_0x3ae7;(function(_0x4255ef,_0x431446){const _0x3341e1=a22_0x3ae7,_0x172865=_0x4255ef();while(!![]){try{const _0x47558c=-parseInt(_0x3341e1(0x18f))/0x1*(-parseInt(_0x3341e1(0x189))/0x2)+parseInt(_0x3341e1(0x187))/0x3+-parseInt(_0x3341e1(0x192))/0x4*(-parseInt(_0x3341e1(0x182))/0x5)+parseInt(_0x3341e1(0x188))/0x6*(parseInt(_0x3341e1(0x184))/0x7)+-parseInt(_0x3341e1(0x18c))/0x8*(parseInt(_0x3341e1(0x196))/0x9)+parseInt(_0x3341e1(0x185))/0xa*(parseInt(_0x3341e1(0x191))/0xb)+-parseInt(_0x3341e1(0x190))/0xc;if(_0x47558c===_0x431446)break;else _0x172865['push'](_0x172865['shift']());}catch(_0x25fa9a){_0x172865['push'](_0x172865['shift']());}}}(a22_0x864f,0xd4f84));function a22_0x3ae7(_0x5efe85,_0x265fc1){_0x5efe85=_0x5efe85-0x181;const _0x864f13=a22_0x864f();let _0x3ae7c6=_0x864f13[_0x5efe85];return _0x3ae7c6;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a22_0x565d31(0x195);export function formatDatasetSdkMarkdown(_0xf9d81c){const _0x289279=a22_0x565d31,_0x2b2f84=typeof _0xf9d81c===_0x289279(0x18d)?_0xf9d81c[_0x289279(0x18b)]():'';return _0x2b2f84||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a22_0x565d31(0x18a),'command':a22_0x565d31(0x186),'description':a22_0x565d31(0x194),'risk':a22_0x565d31(0x193),'flags':[{...CODE_FLAG,'description':a22_0x565d31(0x183)}],async 'execute'(_0x2f9c11){const _0x295e02=a22_0x565d31,_0x44de04=_0x2f9c11[_0x295e02(0x181)]('code'),_0x2653f5=await getDatasetSdkUsageDoc(_0x44de04,_0x2f9c11[_0x295e02(0x18e)]);return{'ok':!![],'data':{'code':_0x44de04,'appCode':_0x2f9c11[_0x295e02(0x18e)],'markdown':formatDatasetSdkMarkdown(_0x2653f5)}};}};
@@ -1 +1 @@
1
- function a23_0x1d3e(){const _0xbe0a9b=['\x20\x20Auth','✓\x20Valid\x20JSON','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20(accessKey)','riskLevel','version','1313156WlNGap','format','check','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20','Global','11856190KSNsPb','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','10RbblsP','(no\x20file)','read','pageSize','defaultApp','\x20\x20Config\x20Files','1621020fDmJbO','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','appCode','(none)','accessKey','\x20\x20auth\x20(effective):\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Project','verbose','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','246462ZpNref','gray','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20API\x20Endpoints','log','\x20(legacy/compat\x20only)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','message','2536844Uzfvxd','yellow','locale','currentApp','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','green','ClientAk','(missing)','\x20\x20Config\x20JSON','platform','padEnd','(set,\x20length=','length','8BVswEW','6359437vOoWaR','repeat','env','9IDzZKl','status','20lWEmkc','(removed\x20—\x20cookie\x20auth\x20disabled)','bold','\x20doctor','red','(not\x20set)','24ZkWgqJ','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','9191017NzHQhh','✗\x20Invalid\x20JSON','(not\x20found)','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a23_0x1d3e=function(){return _0xbe0a9b;};return a23_0x1d3e();}function a23_0x1e92(_0x265afd,_0x1495d0){_0x265afd=_0x265afd-0x11f;const _0x1d3e60=a23_0x1d3e();let _0x1e929e=_0x1d3e60[_0x265afd];return _0x1e929e;}const a23_0xdb10da=a23_0x1e92;(function(_0x1fb747,_0x178891){const _0x13ccd0=a23_0x1e92,_0x4f60fa=_0x1fb747();while(!![]){try{const _0x449f3d=parseInt(_0x13ccd0(0x126))/0x1+parseInt(_0x13ccd0(0x15e))/0x2*(-parseInt(_0x13ccd0(0x13f))/0x3)+parseInt(_0x13ccd0(0x14a))/0x4*(-parseInt(_0x13ccd0(0x12e))/0x5)+parseInt(_0x13ccd0(0x134))/0x6+parseInt(_0x13ccd0(0x159))/0x7*(parseInt(_0x13ccd0(0x158))/0x8)+parseInt(_0x13ccd0(0x15c))/0x9*(-parseInt(_0x13ccd0(0x12c))/0xa)+-parseInt(_0x13ccd0(0x166))/0xb*(-parseInt(_0x13ccd0(0x164))/0xc);if(_0x449f3d===_0x178891)break;else _0x4f60fa['push'](_0x4f60fa['shift']());}catch(_0x12a23a){_0x4f60fa['push'](_0x4f60fa['shift']());}}}(a23_0x1d3e,0xd8a22));import a23_0x360b96 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x2626df){const _0x3afe0d=a23_0x1e92,_0x47b13e=getCliVersion(),_0x1634bd=buildConfigFromFlags({});await initGlobalEnvironment(_0x1634bd),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](CLI_BIN_NAME+_0x3afe0d(0x161))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)]('─'[_0x3afe0d(0x15a)](0x32))),console[_0x3afe0d(0x143)](_0x3afe0d(0x122)+_0x47b13e),console['log'](_0x3afe0d(0x145)+process[_0x3afe0d(0x125)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x14f)+process[_0x3afe0d(0x154)]+'\x20'+process['arch']),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x133))),console['log'](a23_0x360b96[_0x3afe0d(0x140)]('\x20\x20─'['repeat'](0x1e)));const _0xf9a186=getGlobalConfigPath(),_0x2d371b=getProjectConfigPath();console[_0x3afe0d(0x143)](_0x3afe0d(0x135)+(_0xf9a186||a23_0x360b96['gray'](_0x3afe0d(0x168)))),console[_0x3afe0d(0x143)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2d371b||a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x168)))),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x153))),console['log'](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e)));const _0x480755=(_0x11d0f4,_0x236d47)=>{const _0x2691d4=_0x3afe0d;if(!_0x236d47){console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x140)](_0x2691d4(0x12f)));return;}const _0x192cbe=inspectCliConfigJsonFile(_0x236d47);if(_0x192cbe['status']==='ok')console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96['green'](_0x2691d4(0x121)));else{if(_0x192cbe[_0x2691d4(0x15d)]==='empty')console['log']('\x20\x20'+_0x11d0f4[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x14b)](_0x2691d4(0x141)));else _0x192cbe[_0x2691d4(0x15d)]===_0x2691d4(0x136)?console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x140)](_0x2691d4(0x152))):(console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x162)](_0x2691d4(0x167))),console['log']('\x20\x20'+''[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96['red'](_0x192cbe[_0x2691d4(0x149)])));}};_0x480755(_0x3afe0d(0x12b),_0xf9a186),_0x480755(_0x3afe0d(0x13c),_0x2d371b),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)]('\x20\x20Merged\x20Config')),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e))),console[_0x3afe0d(0x143)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1634bd[_0x3afe0d(0x137)]||a23_0x360b96[_0x3afe0d(0x162)](_0x3afe0d(0x163)))),console[_0x3afe0d(0x143)](_0x3afe0d(0x11f)+_0x1634bd[_0x3afe0d(0x15b)]);const _0x2e45eb=isLegacyCompatConfigKey(_0x3afe0d(0x14c))?a23_0x360b96[_0x3afe0d(0x140)](_0x1634bd[_0x3afe0d(0x14c)]+_0x3afe0d(0x144)):_0x1634bd[_0x3afe0d(0x14c)];return console[_0x3afe0d(0x143)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2e45eb),console['log'](_0x3afe0d(0x14e)+(_0x1634bd[_0x3afe0d(0x132)]||a23_0x360b96[_0x3afe0d(0x140)]('(none)'))),console[_0x3afe0d(0x143)](_0x3afe0d(0x148)+(_0x1634bd[_0x3afe0d(0x14d)]||a23_0x360b96[_0x3afe0d(0x140)]('(none)'))),console[_0x3afe0d(0x143)](_0x3afe0d(0x165)+(_0x1634bd[_0x3afe0d(0x127)]||a23_0x360b96[_0x3afe0d(0x140)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x3afe0d(0x127)]+')'))),console['log'](_0x3afe0d(0x146)+(_0x1634bd[_0x3afe0d(0x131)]??a23_0x360b96['gray'](_0x3afe0d(0x169)))),console['log'](_0x3afe0d(0x13b)+_0x1634bd[_0x3afe0d(0x124)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x13e)+_0x1634bd[_0x3afe0d(0x13d)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x13a)+AUTH_MODE['ClientAk']),console[_0x3afe0d(0x143)](_0x3afe0d(0x12d)+(_0x1634bd[_0x3afe0d(0x139)]?a23_0x360b96[_0x3afe0d(0x150)](_0x3afe0d(0x156)+_0x1634bd[_0x3afe0d(0x139)][_0x3afe0d(0x157)]+')'):a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x138)))),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x142))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)]('\x20\x20─'[_0x3afe0d(0x15a)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x3afe0d(0x143)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x120))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e))),console[_0x3afe0d(0x143)](_0x3afe0d(0x129)+a23_0x360b96[_0x3afe0d(0x150)](AUTH_MODE[_0x3afe0d(0x151)]+_0x3afe0d(0x123))),console[_0x3afe0d(0x143)](_0x3afe0d(0x147)+a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x15f))),console[_0x3afe0d(0x143)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a23_0xdb10da(0x128),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a23_0xdb10da(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a23_0x345556=a23_0x5cc3;(function(_0x105c1d,_0x2850bc){const _0x3801de=a23_0x5cc3,_0x47b2d9=_0x105c1d();while(!![]){try{const _0x434b9e=-parseInt(_0x3801de(0x1fa))/0x1+parseInt(_0x3801de(0x21a))/0x2+-parseInt(_0x3801de(0x1e5))/0x3*(parseInt(_0x3801de(0x219))/0x4)+-parseInt(_0x3801de(0x214))/0x5*(-parseInt(_0x3801de(0x1e2))/0x6)+-parseInt(_0x3801de(0x1e8))/0x7+-parseInt(_0x3801de(0x21e))/0x8*(parseInt(_0x3801de(0x1dc))/0x9)+parseInt(_0x3801de(0x213))/0xa*(parseInt(_0x3801de(0x1e1))/0xb);if(_0x434b9e===_0x2850bc)break;else _0x47b2d9['push'](_0x47b2d9['shift']());}catch(_0x1180f7){_0x47b2d9['push'](_0x47b2d9['shift']());}}}(a23_0x4293,0x7d8f9));import a23_0x59b657 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a23_0x5cc3(_0x2eca1d,_0xe505a6){_0x2eca1d=_0x2eca1d-0x1d9;const _0x4293ca=a23_0x4293();let _0x5cc338=_0x4293ca[_0x2eca1d];return _0x5cc338;}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a23_0x4293(){const _0x4e2644=['\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Project','length','bold','env','status','(removed\x20—\x20cookie\x20auth\x20disabled)','(missing)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20runtimeDomain:\x20\x20\x20','empty','log','(default)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20\x20Config\x20JSON','\x20(accessKey)','\x20\x20Session\x20check:\x20\x20\x20','defaultApp','padEnd','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','Global','15671090ivhrAm','65lTyZCr','locale','message','✓\x20Valid\x20JSON','(not\x20found)','1608148udfERu','1083346eHAQWW','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','404984dBGSvH','arch','✗\x20Invalid\x20JSON','green','accessKey','format','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','45lWtsNk','(default:\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','pageSize','\x20\x20Config\x20Files','11JeeKga','137022ndqYGH','appCode','doctor','6RNCYmA','red','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4196745Yqaawc','\x20(legacy/compat\x20only)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','verbose','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','repeat','check','gray','ClientAk','(not\x20set)','currentApp','(none)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','\x20doctor','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','234642unUsdn','\x20\x20Merged\x20Config'];a23_0x4293=function(){return _0x4e2644;};return a23_0x4293();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x475108){const _0x36c1d0=a23_0x5cc3,_0x4d6ff5=getCliVersion(),_0x55b496=buildConfigFromFlags({});await initGlobalEnvironment(_0x55b496),console['log'](),console[_0x36c1d0(0x208)](a23_0x59b657[_0x36c1d0(0x1ff)](CLI_BIN_NAME+_0x36c1d0(0x1f8))),console['log'](a23_0x59b657[_0x36c1d0(0x1f1)]('─'[_0x36c1d0(0x1ef)](0x32))),console[_0x36c1d0(0x208)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x4d6ff5),console[_0x36c1d0(0x208)](_0x36c1d0(0x1eb)+process[_0x36c1d0(0x1ec)]),console['log'](_0x36c1d0(0x1f6)+process['platform']+'\x20'+process[_0x36c1d0(0x21f)]),console[_0x36c1d0(0x208)](),console[_0x36c1d0(0x208)](a23_0x59b657[_0x36c1d0(0x1ff)](_0x36c1d0(0x1e0))),console[_0x36c1d0(0x208)](a23_0x59b657['gray']('\x20\x20─'[_0x36c1d0(0x1ef)](0x1e)));const _0x114c77=getGlobalConfigPath(),_0x262169=getProjectConfigPath();console[_0x36c1d0(0x208)](_0x36c1d0(0x204)+(_0x114c77||a23_0x59b657['gray']('(not\x20found)'))),console[_0x36c1d0(0x208)](_0x36c1d0(0x1e7)+(_0x262169||a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x218)))),console[_0x36c1d0(0x208)](),console[_0x36c1d0(0x208)](a23_0x59b657[_0x36c1d0(0x1ff)](_0x36c1d0(0x20c))),console[_0x36c1d0(0x208)](a23_0x59b657[_0x36c1d0(0x1f1)]('\x20\x20─'[_0x36c1d0(0x1ef)](0x1e)));const _0x4e9f4d=(_0x355910,_0xd16b85)=>{const _0x3e8797=_0x36c1d0;if(!_0xd16b85){console['log']('\x20\x20'+_0x355910[_0x3e8797(0x210)](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x1f1)](_0x3e8797(0x205)));return;}const _0x350110=inspectCliConfigJsonFile(_0xd16b85);if(_0x350110[_0x3e8797(0x201)]==='ok')console[_0x3e8797(0x208)]('\x20\x20'+_0x355910[_0x3e8797(0x210)](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x221)](_0x3e8797(0x217)));else{if(_0x350110[_0x3e8797(0x201)]===_0x3e8797(0x207))console[_0x3e8797(0x208)]('\x20\x20'+_0x355910['padEnd'](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x20b)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x350110['status']==='missing'?console[_0x3e8797(0x208)]('\x20\x20'+_0x355910[_0x3e8797(0x210)](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x1f1)](_0x3e8797(0x203))):(console['log']('\x20\x20'+_0x355910[_0x3e8797(0x210)](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x1e6)](_0x3e8797(0x220))),console[_0x3e8797(0x208)]('\x20\x20'+''[_0x3e8797(0x210)](0x11)+'\x20'+a23_0x59b657[_0x3e8797(0x1e6)](_0x350110[_0x3e8797(0x216)])));}};_0x4e9f4d(_0x36c1d0(0x212),_0x114c77),_0x4e9f4d(_0x36c1d0(0x1fd),_0x262169),console['log'](),console['log'](a23_0x59b657[_0x36c1d0(0x1ff)](_0x36c1d0(0x1fb))),console[_0x36c1d0(0x208)](a23_0x59b657['gray'](_0x36c1d0(0x21c)[_0x36c1d0(0x1ef)](0x1e))),console['log'](_0x36c1d0(0x20a)+(_0x55b496[_0x36c1d0(0x1e3)]||a23_0x59b657[_0x36c1d0(0x1e6)](_0x36c1d0(0x1f3)))),console[_0x36c1d0(0x208)](_0x36c1d0(0x1ea)+_0x55b496[_0x36c1d0(0x200)]);const _0x34acd2=isLegacyCompatConfigKey(_0x36c1d0(0x215))?a23_0x59b657[_0x36c1d0(0x1f1)](_0x55b496[_0x36c1d0(0x215)]+_0x36c1d0(0x1e9)):_0x55b496[_0x36c1d0(0x215)];return console[_0x36c1d0(0x208)](_0x36c1d0(0x21b)+_0x34acd2),console[_0x36c1d0(0x208)](_0x36c1d0(0x1ee)+(_0x55b496[_0x36c1d0(0x20f)]||a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x1f5)))),console[_0x36c1d0(0x208)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x55b496[_0x36c1d0(0x1f4)]||a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x1f5)))),console['log'](_0x36c1d0(0x21d)+(_0x55b496[_0x36c1d0(0x1d9)]||a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x1dd)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x36c1d0(0x208)](_0x36c1d0(0x1f9)+(_0x55b496[_0x36c1d0(0x1df)]??a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x209)))),console['log'](_0x36c1d0(0x1fc)+_0x55b496[_0x36c1d0(0x1f7)]),console[_0x36c1d0(0x208)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x55b496[_0x36c1d0(0x1ed)]),console['log']('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console[_0x36c1d0(0x208)](_0x36c1d0(0x1de)+(_0x55b496[_0x36c1d0(0x222)]?a23_0x59b657[_0x36c1d0(0x221)]('(set,\x20length='+_0x55b496[_0x36c1d0(0x222)][_0x36c1d0(0x1fe)]+')'):a23_0x59b657[_0x36c1d0(0x1f1)]('(none)'))),console[_0x36c1d0(0x208)](),console[_0x36c1d0(0x208)](a23_0x59b657[_0x36c1d0(0x1ff)]('\x20\x20API\x20Endpoints')),console['log'](a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x21c)[_0x36c1d0(0x1ef)](0x1e))),console[_0x36c1d0(0x208)](_0x36c1d0(0x211)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x36c1d0(0x208)](_0x36c1d0(0x206)+getRuntimeDomain()),console[_0x36c1d0(0x208)](),console[_0x36c1d0(0x208)](a23_0x59b657['bold']('\x20\x20Auth')),console['log'](a23_0x59b657[_0x36c1d0(0x1f1)](_0x36c1d0(0x21c)[_0x36c1d0(0x1ef)](0x1e))),console['log'](_0x36c1d0(0x1da)+a23_0x59b657[_0x36c1d0(0x221)](AUTH_MODE[_0x36c1d0(0x1f2)]+_0x36c1d0(0x20d))),console[_0x36c1d0(0x208)](_0x36c1d0(0x20e)+a23_0x59b657['gray'](_0x36c1d0(0x202))),console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a23_0x345556(0x1e4),'command':a23_0x345556(0x1f0),'description':a23_0x345556(0x1db),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a24_0x5676(_0xcc02a6,_0x1f8856){_0xcc02a6=_0xcc02a6-0x187;const _0x185b82=a24_0x185b();let _0x567603=_0x185b82[_0xcc02a6];return _0x567603;}const a24_0x2bf37c=a24_0x5676;(function(_0x30544f,_0x1e46f2){const _0x512e7d=a24_0x5676,_0x48f5fa=_0x30544f();while(!![]){try{const _0x4a0449=parseInt(_0x512e7d(0x19b))/0x1*(-parseInt(_0x512e7d(0x1af))/0x2)+parseInt(_0x512e7d(0x1c7))/0x3+parseInt(_0x512e7d(0x1cc))/0x4+-parseInt(_0x512e7d(0x1ba))/0x5+parseInt(_0x512e7d(0x189))/0x6+parseInt(_0x512e7d(0x1c6))/0x7*(-parseInt(_0x512e7d(0x18e))/0x8)+-parseInt(_0x512e7d(0x1c4))/0x9*(-parseInt(_0x512e7d(0x190))/0xa);if(_0x4a0449===_0x1e46f2)break;else _0x48f5fa['push'](_0x48f5fa['shift']());}catch(_0x1b3e9b){_0x48f5fa['push'](_0x48f5fa['shift']());}}}(a24_0x185b,0x8da88));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';function a24_0x185b(){const _0x1daea5=['riskLevel','\x0aInitialized\x20','stdin','Failed\x20to\x20parse\x20source\x20file:\x20','project','appcode','defaultApp','2688222SKNMbU','App\x20code\x20for\x20the\x20project','[y/N]','stdout','\x20\x20default:\x20','72hmyssC','newConfigFileName','10NIZqBv','parse','App\x20code','log','removeListener','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','AbortPrompt','Override\x20imported\x20default\x20env','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','Source\x20file\x20not\x20found:\x20','trim','25TcOdAk','Invalid\x20env\x20\x22','Skip\x20confirmation\x20when\x20overwriting','\x20\x20env:\x20\x20\x20\x20\x20','question','[Y/n]','\x20init\x20—\x20Create\x20','join','race','string','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','message','once','object','Target\x20environment\x20(default\x20','Override\x20imported\x20default\x20appcode','utf8','App\x20code\x20cannot\x20be\x20empty.','apps','close','79436ADAUnB','app',')\x20instead\x20of\x20project','includes','validation','\x20already\x20exists.\x20Overwrite?','toLowerCase','global','SIGINT','Usage:\x20','\x20\x20config:\x20\x20','5031040nUTBwB','file','boolean','cwd','Write\x20to\x20global\x20(~/','name','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','cancelled','\x20\x20appcode:\x20','9502938ZDrGUx','User\x20aborted\x20prompt','269591UAkkQI','981714eDocmG','yes','flagMissing','Aborted.','\x22.\x20Allowed:\x20','4379400NhNMpP','apiDir','Imported\x20from\x20','entries'];a24_0x185b=function(){return _0x1daea5;};return a24_0x185b();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a24_0x2bf37c(0x187),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x18a)},{'name':a24_0x2bf37c(0x1c1),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x1a9)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x2bf37c(0x1b6),'type':a24_0x2bf37c(0x1bc),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a24_0x2bf37c(0x18f)]+a24_0x2bf37c(0x1b1),'default':![]},{'name':'yes','type':a24_0x2bf37c(0x1bc),'description':a24_0x2bf37c(0x19d),'default':![]}];export const initImportFlagDefs=[{'name':a24_0x2bf37c(0x1bb),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a24_0x2bf37c(0x187),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x1aa)},{'name':a24_0x2bf37c(0x1c1),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x197),'enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x2bf37c(0x1b6),'type':a24_0x2bf37c(0x1bc),'description':a24_0x2bf37c(0x1be)+PRODUCT_CONFIG[a24_0x2bf37c(0x18f)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':'boolean','description':a24_0x2bf37c(0x19d),'default':![]}];export async function runInit(_0x165130){const _0x4b4562=a24_0x2bf37c,_0x4814b4=isNonInteractiveMode(_0x165130),_0x23ce00=_0x165130[_0x4b4562(0x1b6)]?_0x4b4562(0x1b6):'project',_0x15e39e=resolveWriteConfigPath(_0x23ce00);try{_0x4814b4?await runNonInteractive(_0x165130,_0x15e39e):await runInteractive(_0x165130,_0x15e39e);}catch(_0x1b099e){if(_0x1b099e instanceof AbortPrompt)throw CliErrors[_0x4b4562(0x1c2)]();throw _0x1b099e;}}export async function runInitImport(_0x3700f7){const _0x51e0ac=a24_0x2bf37c,_0xdcdba8=_0x3700f7['global']?_0x51e0ac(0x1b6):_0x51e0ac(0x1d4),_0x3364c7=resolveWriteConfigPath(_0xdcdba8);await runFromImport(_0x3700f7,_0x3364c7);}const RUNTIME_IRRELEVANT_KEYS=new Set([a24_0x2bf37c(0x1cd)]);async function runFromImport(_0x5d6bf6,_0x4ea285){const _0x24c42d=a24_0x2bf37c,_0x1214e4=resolveFilePath(_0x5d6bf6[_0x24c42d(0x1bb)]);if(!existsSync(_0x1214e4))throw CliErrors[_0x24c42d(0x1b3)](_0x24c42d(0x199)+_0x1214e4);const _0x5371e7=readSourceFile(_0x1214e4),_0x32a05e=convertToRuntimeConfig(_0x5371e7);_0x5d6bf6[_0x24c42d(0x187)]&&(_0x32a05e['appcode']=String(_0x5d6bf6[_0x24c42d(0x187)]));_0x5d6bf6['env']&&(_0x32a05e[_0x24c42d(0x1c1)]=resolveInitEnv(_0x5d6bf6));if(!_0x32a05e[_0x24c42d(0x187)])throw CliErrors['validation'](_0x24c42d(0x195),_0x24c42d(0x198));await writeInitConfig(_0x4ea285,_0x32a05e,_0x5d6bf6),console[_0x24c42d(0x193)](_0x24c42d(0x1ce)+_0x1214e4),console[_0x24c42d(0x193)](_0x24c42d(0x1b9)+_0x4ea285),console[_0x24c42d(0x193)](_0x24c42d(0x1c3)+_0x32a05e['appcode']);if(_0x32a05e['defaultApp'])console[_0x24c42d(0x193)](_0x24c42d(0x18d)+_0x32a05e[_0x24c42d(0x188)]);}function convertToRuntimeConfig(_0x3a0c99){const _0xec7f01=a24_0x2bf37c;if(_0x3a0c99[_0xec7f01(0x1ad)]&&typeof _0x3a0c99[_0xec7f01(0x1ad)]===_0xec7f01(0x1a8))throw CliErrors['validation'](_0xec7f01(0x1c0),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x524325={};for(const _0x2b4da0 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x3a0c99[_0x2b4da0]!==undefined&&(_0x524325[_0x2b4da0]=_0x3a0c99[_0x2b4da0]);}return!_0x524325[_0xec7f01(0x1d0)]&&(_0x524325[_0xec7f01(0x1d0)]=DEFAULT_CONFIG_VALUES[_0xec7f01(0x1d0)]),_0x524325;}async function runNonInteractive(_0x56ec8a,_0x2e99c5){const _0x58e7e7=a24_0x2bf37c,_0x11764a=_0x56ec8a['appcode'];if(!_0x11764a)throw CliErrors[_0x58e7e7(0x1c9)](_0x58e7e7(0x187),_0x58e7e7(0x1b8)+CLI_BIN_NAME+_0x58e7e7(0x1a5));const _0x70091f=resolveInitEnv(_0x56ec8a);await writeInitConfig(_0x2e99c5,{'appcode':_0x11764a,'env':_0x70091f},_0x56ec8a),console[_0x58e7e7(0x193)]('Initialized\x20'+_0x2e99c5),console['log'](_0x58e7e7(0x1c3)+_0x11764a),console[_0x58e7e7(0x193)](_0x58e7e7(0x19e)+_0x70091f);}async function runInteractive(_0x4704d2,_0x1dfdf6){const _0x406b87=a24_0x2bf37c,_0x35cf1d=loadExisting(_0x1dfdf6),_0x2695d4=typeof _0x35cf1d?.['appcode']===_0x406b87(0x1a4)?_0x35cf1d[_0x406b87(0x187)]:'',_0x2341df=resolveInitEnv(_0x4704d2);console['log'](CLI_BIN_NAME+_0x406b87(0x1a1)+PRODUCT_CONFIG[_0x406b87(0x18f)]+'\x0a');if(existsSync(_0x1dfdf6)&&!_0x4704d2['yes']){const _0x3b315b=await promptYesNo('File\x20'+_0x1dfdf6+_0x406b87(0x1b4),![]);if(!_0x3b315b){console[_0x406b87(0x193)](_0x406b87(0x1ca));return;}}const _0x285d46=typeof _0x4704d2[_0x406b87(0x187)]==='string'?_0x4704d2['appcode'][_0x406b87(0x19a)]():'';let _0x1f000d=_0x285d46;!_0x1f000d&&(_0x1f000d=await promptInput(_0x406b87(0x192),_0x2695d4));if(!_0x1f000d['trim']())throw CliErrors[_0x406b87(0x1b3)](_0x406b87(0x1ac));await writeInitConfig(_0x1dfdf6,{'appcode':_0x1f000d[_0x406b87(0x19a)](),'env':_0x2341df},_0x4704d2),console['log'](_0x406b87(0x1d1)+_0x1dfdf6),console['log'](_0x406b87(0x1c3)+_0x1f000d[_0x406b87(0x19a)]()),console['log'](_0x406b87(0x19e)+_0x2341df);}async function writeInitConfig(_0x6375c6,_0xd191b4,_0x3fead0){const _0x62ac20=a24_0x2bf37c;let _0x13ff84={};existsSync(_0x6375c6)&&!_0x3fead0[_0x62ac20(0x1c8)]&&(_0x13ff84=readConfigFile(_0x6375c6));for(const [_0x4c0993,_0x39ff5a]of Object[_0x62ac20(0x1cf)](_0xd191b4)){_0x39ff5a!==undefined&&(_0x13ff84[_0x4c0993]=_0x39ff5a);}if(_0x13ff84['app'])delete _0x13ff84[_0x62ac20(0x1b0)];writeConfigFile(_0x6375c6,_0x13ff84);}class AbortPrompt extends Error{constructor(){const _0x40863d=a24_0x2bf37c;super(_0x40863d(0x1c5)),this[_0x40863d(0x1bf)]=_0x40863d(0x196);}}function createSafeRl(){const _0x3a3f79=a24_0x2bf37c,_0xe401ef=createInterface({'input':process[_0x3a3f79(0x1d2)],'output':process[_0x3a3f79(0x18c)]});let _0x450d56;const _0x551b91=new Promise((_0x3a84d1,_0x3d6302)=>{const _0x139b8c=_0x3a3f79;_0x450d56=()=>{const _0x1bb621=a24_0x5676;_0x450d56&&(_0xe401ef[_0x1bb621(0x194)](_0x1bb621(0x1b7),_0x450d56),_0x450d56=undefined);try{_0xe401ef[_0x1bb621(0x1ae)]();}catch{}_0x3d6302(new AbortPrompt());},_0xe401ef[_0x139b8c(0x1a7)](_0x139b8c(0x1b7),_0x450d56);}),_0x109f28=()=>{const _0x1ae8d3=_0x3a3f79;_0x450d56&&(_0xe401ef[_0x1ae8d3(0x194)](_0x1ae8d3(0x1b7),_0x450d56),_0x450d56=undefined);try{_0xe401ef['close']();}catch{}};return{'rl':_0xe401ef,'abortPromise':_0x551b91,'disposeSuccess':_0x109f28};}async function promptInput(_0x340030,_0x5d1e59){const _0x513ebc=a24_0x2bf37c,{rl:_0x38ef0a,abortPromise:_0x4dad60,disposeSuccess:_0x5d9fdf}=createSafeRl(),_0x2fb62d=new Promise(_0x277db0=>{const _0xd218f9=a24_0x5676,_0x599846=_0x5d1e59?'\x20\x20'+_0x340030+'\x20('+_0x5d1e59+'):\x20':'\x20\x20'+_0x340030+':\x20';_0x38ef0a[_0xd218f9(0x19f)](_0x599846,_0x43e369=>{const _0x4fab08=_0xd218f9;_0x5d9fdf(),_0x277db0(_0x43e369[_0x4fab08(0x19a)]()||_0x5d1e59);});});return Promise[_0x513ebc(0x1a3)]([_0x2fb62d,_0x4dad60]);}async function promptYesNo(_0x2ce401,_0x4a3403){const _0x5966df=a24_0x2bf37c,{rl:_0x298011,abortPromise:_0xe7decb,disposeSuccess:_0x51c2f0}=createSafeRl(),_0x5e1e90=new Promise(_0x3f979e=>{const _0x445a3f=a24_0x5676,_0x1c7d4b=_0x4a3403?_0x445a3f(0x1a0):_0x445a3f(0x18b);_0x298011[_0x445a3f(0x19f)]('\x20\x20'+_0x2ce401+'\x20'+_0x1c7d4b+':\x20',_0x565e35=>{const _0x278db4=_0x445a3f;_0x51c2f0();const _0x851052=_0x565e35[_0x278db4(0x19a)]()[_0x278db4(0x1b5)]();if(_0x851052==='y'||_0x851052===_0x278db4(0x1c8))_0x3f979e(!![]);else{if(_0x851052==='n'||_0x851052==='no')_0x3f979e(![]);else _0x3f979e(_0x4a3403);}});});return Promise[_0x5966df(0x1a3)]([_0x5e1e90,_0xe7decb]);}function loadExisting(_0x1ba000){if(!existsSync(_0x1ba000))return null;return readConfigFile(_0x1ba000);}function resolveFilePath(_0x343382){const _0x8731d6=a24_0x2bf37c;return isAbsolute(_0x343382)?_0x343382:resolve(process[_0x8731d6(0x1bd)](),_0x343382);}function readSourceFile(_0x26c8f7){const _0x4e5582=a24_0x2bf37c;try{const _0xc0a743=readFileSync(_0x26c8f7,{'encoding':_0x4e5582(0x1ab)});return JSON[_0x4e5582(0x191)](_0xc0a743);}catch(_0x96a3de){throw CliErrors[_0x4e5582(0x1b3)](_0x4e5582(0x1d3)+_0x96a3de[_0x4e5582(0x1a6)]);}}function resolveInitEnv(_0xc7b0b0){const _0x5f5c7b=a24_0x2bf37c,_0xbcc10c=_0xc7b0b0[_0x5f5c7b(0x1c1)];if(_0xbcc10c===undefined||_0xbcc10c==='')return DEFAULT_CONFIG_VALUES[_0x5f5c7b(0x1c1)];if(!RUNTIME_ENV_VALUES[_0x5f5c7b(0x1b2)](_0xbcc10c))throw CliErrors[_0x5f5c7b(0x1b3)](_0x5f5c7b(0x19c)+_0xbcc10c+_0x5f5c7b(0x1cb)+RUNTIME_ENV_VALUES[_0x5f5c7b(0x1a2)](',\x20'));return _0xbcc10c;}
1
+ const a24_0x576c6e=a24_0x141b;(function(_0x4cf7ef,_0x218f07){const _0xfd6d10=a24_0x141b,_0x8d727b=_0x4cf7ef();while(!![]){try{const _0x3041b2=-parseInt(_0xfd6d10(0x121))/0x1+parseInt(_0xfd6d10(0x12d))/0x2+parseInt(_0xfd6d10(0x106))/0x3+-parseInt(_0xfd6d10(0x10d))/0x4+parseInt(_0xfd6d10(0xfd))/0x5*(parseInt(_0xfd6d10(0x11a))/0x6)+-parseInt(_0xfd6d10(0x124))/0x7+-parseInt(_0xfd6d10(0x100))/0x8*(-parseInt(_0xfd6d10(0x11c))/0x9);if(_0x3041b2===_0x218f07)break;else _0x8d727b['push'](_0x8d727b['shift']());}catch(_0x2f6119){_0x8d727b['push'](_0x8d727b['shift']());}}}(a24_0x1870,0xb6b89));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';function a24_0x141b(_0x3273d9,_0x2437f1){_0x3273d9=_0x3273d9-0xf6;const _0x187012=a24_0x1870();let _0x141b40=_0x187012[_0x3273d9];return _0x141b40;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a24_0x576c6e(0x128),'description':'App\x20code\x20for\x20the\x20project'},{'name':a24_0x576c6e(0x119),'type':a24_0x576c6e(0x128),'description':a24_0x576c6e(0x135)+DEFAULT_CONFIG_VALUES[a24_0x576c6e(0x119)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x576c6e(0xf9),'type':a24_0x576c6e(0x126),'description':a24_0x576c6e(0x12e)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a24_0x576c6e(0x126),'description':a24_0x576c6e(0x113),'default':![]}];export const initImportFlagDefs=[{'name':a24_0x576c6e(0x132),'type':'string','description':a24_0x576c6e(0x101),'required':!![]},{'name':a24_0x576c6e(0x111),'type':a24_0x576c6e(0x128),'description':'Override\x20imported\x20default\x20appcode'},{'name':a24_0x576c6e(0x119),'type':a24_0x576c6e(0x128),'description':a24_0x576c6e(0x107),'enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x576c6e(0xf9),'type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG['newConfigFileName']+a24_0x576c6e(0x138),'default':![]},{'name':a24_0x576c6e(0x117),'type':a24_0x576c6e(0x126),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x75e721){const _0x2a4dbb=a24_0x576c6e,_0x1d656b=isNonInteractiveMode(_0x75e721),_0x4d6c69=_0x75e721[_0x2a4dbb(0xf9)]?_0x2a4dbb(0xf9):_0x2a4dbb(0x104),_0x4d672d=resolveWriteConfigPath(_0x4d6c69);try{_0x1d656b?await runNonInteractive(_0x75e721,_0x4d672d):await runInteractive(_0x75e721,_0x4d672d);}catch(_0x44ec57){if(_0x44ec57 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x44ec57;}}export async function runInitImport(_0x240bbf){const _0x5c15f3=a24_0x576c6e,_0x2194e5=_0x240bbf[_0x5c15f3(0xf9)]?'global':_0x5c15f3(0x104),_0x2610a3=resolveWriteConfigPath(_0x2194e5);await runFromImport(_0x240bbf,_0x2610a3);}const RUNTIME_IRRELEVANT_KEYS=new Set([a24_0x576c6e(0x112)]);async function runFromImport(_0x2aa09b,_0x160da1){const _0x42186f=a24_0x576c6e,_0x4c6dc6=resolveFilePath(_0x2aa09b[_0x42186f(0x132)]);if(!existsSync(_0x4c6dc6))throw CliErrors[_0x42186f(0x11f)](_0x42186f(0x10f)+_0x4c6dc6);const _0x3e3f30=readSourceFile(_0x4c6dc6),_0x424b6b=convertToRuntimeConfig(_0x3e3f30);_0x2aa09b[_0x42186f(0x111)]&&(_0x424b6b['appcode']=String(_0x2aa09b['appcode']));_0x2aa09b[_0x42186f(0x119)]&&(_0x424b6b['env']=resolveInitEnv(_0x2aa09b));if(!_0x424b6b[_0x42186f(0x111)])throw CliErrors[_0x42186f(0x11f)](_0x42186f(0x12a),_0x42186f(0xfa));await writeInitConfig(_0x160da1,_0x424b6b,_0x2aa09b),console[_0x42186f(0x123)](_0x42186f(0x109)+_0x4c6dc6),console[_0x42186f(0x123)](_0x42186f(0xf7)+_0x160da1),console[_0x42186f(0x123)]('\x20\x20appcode:\x20'+_0x424b6b[_0x42186f(0x111)]);if(_0x424b6b[_0x42186f(0x10b)])console[_0x42186f(0x123)](_0x42186f(0x116)+_0x424b6b[_0x42186f(0x10b)]);}function convertToRuntimeConfig(_0xf19b41){const _0xf5881f=a24_0x576c6e;if(_0xf19b41[_0xf5881f(0x134)]&&typeof _0xf19b41[_0xf5881f(0x134)]===_0xf5881f(0x11b))throw CliErrors[_0xf5881f(0x11f)](_0xf5881f(0x102),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x5f0b2a={};for(const _0x2120a9 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xf19b41[_0x2120a9]!==undefined&&(_0x5f0b2a[_0x2120a9]=_0xf19b41[_0x2120a9]);}return!_0x5f0b2a['riskLevel']&&(_0x5f0b2a[_0xf5881f(0x120)]=DEFAULT_CONFIG_VALUES[_0xf5881f(0x120)]),_0x5f0b2a;}async function runNonInteractive(_0xdcccd5,_0x32bb8d){const _0x22ebc2=a24_0x576c6e,_0x42a819=_0xdcccd5[_0x22ebc2(0x111)];if(!_0x42a819)throw CliErrors[_0x22ebc2(0xfb)](_0x22ebc2(0x111),_0x22ebc2(0x12f)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x527403=resolveInitEnv(_0xdcccd5);await writeInitConfig(_0x32bb8d,{'appcode':_0x42a819,'env':_0x527403},_0xdcccd5),console[_0x22ebc2(0x123)]('Initialized\x20'+_0x32bb8d),console[_0x22ebc2(0x123)](_0x22ebc2(0x139)+_0x42a819),console[_0x22ebc2(0x123)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x527403);}async function runInteractive(_0xb85e6,_0x4a8ca9){const _0x146ffe=a24_0x576c6e,_0x320c31=loadExisting(_0x4a8ca9),_0x353a9a=typeof _0x320c31?.[_0x146ffe(0x111)]===_0x146ffe(0x128)?_0x320c31[_0x146ffe(0x111)]:'',_0x8adc29=resolveInitEnv(_0xb85e6);console[_0x146ffe(0x123)](CLI_BIN_NAME+_0x146ffe(0x12b)+PRODUCT_CONFIG[_0x146ffe(0x115)]+'\x0a');if(existsSync(_0x4a8ca9)&&!_0xb85e6['yes']){const _0x440446=await promptYesNo('File\x20'+_0x4a8ca9+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x440446){console[_0x146ffe(0x123)](_0x146ffe(0x11e));return;}}const _0x55d7bb=typeof _0xb85e6[_0x146ffe(0x111)]===_0x146ffe(0x128)?_0xb85e6[_0x146ffe(0x111)]['trim']():'';let _0x3c6ba3=_0x55d7bb;!_0x3c6ba3&&(_0x3c6ba3=await promptInput(_0x146ffe(0x133),_0x353a9a));if(!_0x3c6ba3['trim']())throw CliErrors[_0x146ffe(0x11f)](_0x146ffe(0x114));await writeInitConfig(_0x4a8ca9,{'appcode':_0x3c6ba3['trim'](),'env':_0x8adc29},_0xb85e6),console[_0x146ffe(0x123)]('\x0aInitialized\x20'+_0x4a8ca9),console['log'](_0x146ffe(0x139)+_0x3c6ba3['trim']()),console[_0x146ffe(0x123)](_0x146ffe(0x11d)+_0x8adc29);}async function writeInitConfig(_0x24177e,_0xd4a635,_0x228ac6){const _0x1a2d11=a24_0x576c6e;let _0xa8e156={};existsSync(_0x24177e)&&!_0x228ac6[_0x1a2d11(0x117)]&&(_0xa8e156=readConfigFile(_0x24177e));for(const [_0x497c3f,_0x4a3fe4]of Object[_0x1a2d11(0x103)](_0xd4a635)){_0x4a3fe4!==undefined&&(_0xa8e156[_0x497c3f]=_0x4a3fe4);}if(_0xa8e156[_0x1a2d11(0x137)])delete _0xa8e156[_0x1a2d11(0x137)];writeConfigFile(_0x24177e,_0xa8e156);}class AbortPrompt extends Error{constructor(){const _0x2b5aa8=a24_0x576c6e;super(_0x2b5aa8(0x108)),this[_0x2b5aa8(0x125)]=_0x2b5aa8(0x118);}}function createSafeRl(){const _0x20c70a=a24_0x576c6e,_0x43e55e=createInterface({'input':process[_0x20c70a(0xff)],'output':process[_0x20c70a(0xf8)]});let _0xf5b102;const _0x3875c4=new Promise((_0x4e86b9,_0x145b5f)=>{const _0x259607=_0x20c70a;_0xf5b102=()=>{const _0x1020f9=a24_0x141b;_0xf5b102&&(_0x43e55e[_0x1020f9(0x105)]('SIGINT',_0xf5b102),_0xf5b102=undefined);try{_0x43e55e['close']();}catch{}_0x145b5f(new AbortPrompt());},_0x43e55e[_0x259607(0x129)]('SIGINT',_0xf5b102);}),_0x540a42=()=>{const _0x3e6a8b=_0x20c70a;_0xf5b102&&(_0x43e55e[_0x3e6a8b(0x105)](_0x3e6a8b(0x127),_0xf5b102),_0xf5b102=undefined);try{_0x43e55e['close']();}catch{}};return{'rl':_0x43e55e,'abortPromise':_0x3875c4,'disposeSuccess':_0x540a42};}async function promptInput(_0x8b5b2d,_0x3987f6){const _0xb7ef90=a24_0x576c6e,{rl:_0x6b70d1,abortPromise:_0x350770,disposeSuccess:_0x29cfe0}=createSafeRl(),_0x3b68ba=new Promise(_0x326859=>{const _0x1cf82b=a24_0x141b,_0x3e9919=_0x3987f6?'\x20\x20'+_0x8b5b2d+'\x20('+_0x3987f6+_0x1cf82b(0x122):'\x20\x20'+_0x8b5b2d+':\x20';_0x6b70d1[_0x1cf82b(0x12c)](_0x3e9919,_0x2b64fd=>{const _0x29ea64=_0x1cf82b;_0x29cfe0(),_0x326859(_0x2b64fd[_0x29ea64(0xfe)]()||_0x3987f6);});});return Promise[_0xb7ef90(0x131)]([_0x3b68ba,_0x350770]);}async function promptYesNo(_0x597852,_0x3651ad){const {rl:_0x5b59b8,abortPromise:_0x5b10fb,disposeSuccess:_0x1d2125}=createSafeRl(),_0x53dabf=new Promise(_0x140ac0=>{const _0x2626c1=a24_0x141b,_0x193688=_0x3651ad?_0x2626c1(0xf6):_0x2626c1(0x10c);_0x5b59b8[_0x2626c1(0x12c)]('\x20\x20'+_0x597852+'\x20'+_0x193688+':\x20',_0x355e11=>{const _0x38db0e=_0x2626c1;_0x1d2125();const _0x9b4bb0=_0x355e11[_0x38db0e(0xfe)]()[_0x38db0e(0x110)]();if(_0x9b4bb0==='y'||_0x9b4bb0===_0x38db0e(0x117))_0x140ac0(!![]);else{if(_0x9b4bb0==='n'||_0x9b4bb0==='no')_0x140ac0(![]);else _0x140ac0(_0x3651ad);}});});return Promise['race']([_0x53dabf,_0x5b10fb]);}function loadExisting(_0x59361){if(!existsSync(_0x59361))return null;return readConfigFile(_0x59361);}function resolveFilePath(_0x312004){const _0x26725c=a24_0x576c6e;return isAbsolute(_0x312004)?_0x312004:resolve(process[_0x26725c(0x10e)](),_0x312004);}function readSourceFile(_0x448328){const _0x5b53cb=a24_0x576c6e;try{const _0x155d2c=readFileSync(_0x448328,{'encoding':_0x5b53cb(0x136)});return JSON['parse'](_0x155d2c);}catch(_0x203272){throw CliErrors[_0x5b53cb(0x11f)](_0x5b53cb(0xfc)+_0x203272['message']);}}function resolveInitEnv(_0x38dbee){const _0x3c4c51=a24_0x576c6e,_0x1b103c=_0x38dbee['env'];if(_0x1b103c===undefined||_0x1b103c==='')return DEFAULT_CONFIG_VALUES[_0x3c4c51(0x119)];if(!RUNTIME_ENV_VALUES['includes'](_0x1b103c))throw CliErrors[_0x3c4c51(0x11f)]('Invalid\x20env\x20\x22'+_0x1b103c+_0x3c4c51(0x130)+RUNTIME_ENV_VALUES[_0x3c4c51(0x10a)](',\x20'));return _0x1b103c;}function a24_0x1870(){const _0x3df82a=['\x20init\x20—\x20Create\x20','question','2750072vTfvcQ','Write\x20to\x20global\x20(~/','Usage:\x20','\x22.\x20Allowed:\x20','race','file','App\x20code','apps','Target\x20environment\x20(default\x20','utf8','app',')\x20instead\x20of\x20project','\x20\x20appcode:\x20','[Y/n]','\x20\x20config:\x20\x20','stdout','global','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','flagMissing','Failed\x20to\x20parse\x20source\x20file:\x20','3763855CNKkdZ','trim','stdin','13064rtfNVx','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','entries','project','removeListener','1515036vuBYFv','Override\x20imported\x20default\x20env','User\x20aborted\x20prompt','Imported\x20from\x20','join','defaultApp','[y/N]','5909024qDFDxM','cwd','Source\x20file\x20not\x20found:\x20','toLowerCase','appcode','apiDir','Skip\x20confirmation\x20when\x20overwriting','App\x20code\x20cannot\x20be\x20empty.','newConfigFileName','\x20\x20default:\x20','yes','AbortPrompt','env','6LFlMTJ','object','3735MmpKbS','\x20\x20env:\x20\x20\x20\x20\x20','Aborted.','validation','riskLevel','885925Gmjzws','):\x20','log','1392356gOOlTQ','name','boolean','SIGINT','string','once','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.'];a24_0x1870=function(){return _0x3df82a;};return a24_0x1870();}
@@ -1 +1 @@
1
- const a25_0x344dfc=a25_0x4c56;(function(_0x4f12f7,_0x22203d){const _0x508817=a25_0x4c56,_0x4b7c67=_0x4f12f7();while(!![]){try{const _0x421780=-parseInt(_0x508817(0x15d))/0x1+-parseInt(_0x508817(0x159))/0x2*(-parseInt(_0x508817(0x176))/0x3)+-parseInt(_0x508817(0x153))/0x4+parseInt(_0x508817(0x16a))/0x5*(parseInt(_0x508817(0x143))/0x6)+-parseInt(_0x508817(0x165))/0x7+parseInt(_0x508817(0x161))/0x8*(-parseInt(_0x508817(0x142))/0x9)+-parseInt(_0x508817(0x144))/0xa*(-parseInt(_0x508817(0x15b))/0xb);if(_0x421780===_0x22203d)break;else _0x4b7c67['push'](_0x4b7c67['shift']());}catch(_0x295061){_0x4b7c67['push'](_0x4b7c67['shift']());}}}(a25_0x355c,0x1bff1));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a25_0x344dfc(0x152),'type':a25_0x344dfc(0x145),'required':!![],'description':a25_0x344dfc(0x168)},FILE_FLAG={'name':a25_0x344dfc(0x166),'type':a25_0x344dfc(0x145),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a25_0x344dfc(0x147),'type':a25_0x344dfc(0x145),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a25_0x344dfc(0x175),'type':a25_0x344dfc(0x151),'description':a25_0x344dfc(0x155)};function readKnowledgeFile(_0x32019c){const _0x3a756c=a25_0x344dfc;if(!_0x32019c)throw CliErrors[_0x3a756c(0x14e)](_0x3a756c(0x177));if(!existsSync(_0x32019c))throw CliErrors[_0x3a756c(0x14e)](_0x3a756c(0x15c)+_0x32019c);if(!statSync(_0x32019c)[_0x3a756c(0x154)]())throw CliErrors['validation'](_0x3a756c(0x17e)+_0x32019c);return readFileSync(_0x32019c,_0x3a756c(0x17a));}function summarizePersonalItem(_0x39eb25){const _0x2f727c=a25_0x344dfc;return{'id':_0x39eb25['id'],'title':_0x39eb25[_0x2f727c(0x152)],'version':_0x39eb25['version'],'ragStatus':_0x39eb25[_0x2f727c(0x162)],'ragErrorMessage':_0x39eb25['ragErrorMessage'],'updateTime':_0x39eb25['updateTime']};}function a25_0x355c(){const _0x2c5e2a=['865086SIzTld','6870OQHVux','string','create','query','--topk\x20must\x20be\x20a\x20positive\x20number.','metadata','search','num','detail','content','validation','Search\x20query\x20is\x20required.','/client/knowledge-base/personal/','number','title','865984rXbfff','isFile','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','updateTime','build','read','2vnlETr','Created\x20KB\x20entry\x20','6809kfKHOC','File\x20not\x20found:\x20','35251afHEYO','map','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','length','8UFOPtP','ragStatus','write','verbose','1124389bmLXpu','file','Personal\x20knowledge-base\x20entry\x20ID','Personal\x20knowledge-base\x20entry\x20title','update','5AWkoiW','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','version','appCode','scope','body','str','bool','description','POST','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','topk','150078sDGGUh','File\x20path\x20is\x20required.','/client/knowledge-base/personal/create','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','utf8','trim','createTime','docId','File\x20is\x20not\x20a\x20regular\x20file:\x20','list','831717wwjLNQ'];a25_0x355c=function(){return _0x2c5e2a;};return a25_0x355c();}function detailPersonalItem(_0x504657){const _0x32fc90=a25_0x344dfc;return{'id':_0x504657['id'],'appCode':_0x504657[_0x32fc90(0x16d)],'scope':_0x504657[_0x32fc90(0x16e)],'userId':_0x504657['userId'],'title':_0x504657['title'],'content':_0x504657[_0x32fc90(0x14d)]??'','version':_0x504657[_0x32fc90(0x16c)],'ragStatus':_0x504657[_0x32fc90(0x162)],'ragErrorMessage':_0x504657['ragErrorMessage'],'createTime':_0x504657[_0x32fc90(0x17c)],'updateTime':_0x504657[_0x32fc90(0x156)]};}function summarizeSearchHit(_0x27378f){const _0x28a480=a25_0x344dfc;return{'scope':_0x27378f[_0x28a480(0x16e)],'docId':_0x27378f[_0x28a480(0x17d)],'score':_0x27378f['score'],'weightedScore':_0x27378f['weightedScore'],'content':_0x27378f[_0x28a480(0x14d)],'metadata':_0x27378f[_0x28a480(0x149)]};}function readTopK(_0x7b3b7a){const _0xa86f12=a25_0x344dfc,_0x282454=_0x7b3b7a['flag']('topk');if(_0x282454===undefined||_0x282454===null||_0x282454==='')return undefined;const _0x465b1e=_0x7b3b7a['num'](_0xa86f12(0x175));if(!Number['isFinite'](_0x465b1e)||_0x465b1e<0x1)throw CliErrors[_0xa86f12(0x14e)](_0xa86f12(0x148));return _0x465b1e;}const kbList={'service':'kb','command':a25_0x344dfc(0x141),'description':a25_0x344dfc(0x174),'risk':a25_0x344dfc(0x158),'flags':[VERBOSE_FLAG],async 'execute'(_0x1a52a1){const _0x52376e=a25_0x344dfc,_0x34c2a7=await listPersonalKnowledgeBaseItems(_0x1a52a1['appCode']);if(_0x1a52a1[_0x52376e(0x171)](_0x52376e(0x164)))return{'ok':!![],'data':{'total':_0x34c2a7['length'],'items':_0x34c2a7}};return{'ok':!![],'data':{'total':_0x34c2a7['length'],'items':_0x34c2a7[_0x52376e(0x15e)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a25_0x344dfc(0x14c),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a25_0x344dfc(0x158),'flags':[{...ID_FLAG,'description':a25_0x344dfc(0x167)}],async 'execute'(_0x221cba){const _0x4a7603=a25_0x344dfc,_0x565a22=await getPersonalKnowledgeBaseItem(_0x221cba[_0x4a7603(0x14b)]('id'),_0x221cba[_0x4a7603(0x16d)]);return{'ok':!![],'data':detailPersonalItem(_0x565a22)};}},kbCreate={'service':'kb','command':a25_0x344dfc(0x146),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a25_0x344dfc(0x163),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0xb45c1e){const _0x3cde14=a25_0x344dfc,_0x1dd150=_0xb45c1e[_0x3cde14(0x170)]('title'),_0x38b4c7=readKnowledgeFile(_0xb45c1e[_0x3cde14(0x170)](_0x3cde14(0x166))),_0x4f4d18=await createPersonalKnowledgeBaseItem(_0xb45c1e[_0x3cde14(0x16d)],{'title':_0x1dd150,'content':_0x38b4c7});return{'ok':!![],'data':summarizePersonalItem(_0x4f4d18),'message':_0x3cde14(0x15a)+_0x4f4d18['id']+'\x20('+_0x4f4d18[_0x3cde14(0x152)]+')'};},async 'dryRun'(_0x267485){const _0x3a5c95=a25_0x344dfc,_0x2cb63a=_0x267485[_0x3a5c95(0x170)](_0x3a5c95(0x152)),_0x4863b2=readKnowledgeFile(_0x267485['str'](_0x3a5c95(0x166)));return dryRun(_0x3a5c95(0x173),_0x3a5c95(0x178))['body']({'appCode':_0x267485[_0x3a5c95(0x16d)],'title':_0x2cb63a,'content':_0x4863b2})[_0x3a5c95(0x172)](_0x3a5c95(0x179)+_0x2cb63a+'\x22')[_0x3a5c95(0x157)]();}},kbUpdate={'service':'kb','command':a25_0x344dfc(0x169),'description':a25_0x344dfc(0x16b),'risk':a25_0x344dfc(0x163),'flags':[{...ID_FLAG,'description':a25_0x344dfc(0x167)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x345f58){const _0x113cbb=a25_0x344dfc,_0x79927b=_0x345f58[_0x113cbb(0x14b)]('id'),_0x505797=readKnowledgeFile(_0x345f58[_0x113cbb(0x170)](_0x113cbb(0x166))),_0x4c1acc=_0x345f58['str'](_0x113cbb(0x152))||(await getPersonalKnowledgeBaseItem(_0x79927b,_0x345f58['appCode']))['title'],_0x13e365=await updatePersonalKnowledgeBaseItem(_0x79927b,_0x345f58['appCode'],{'title':_0x4c1acc,'content':_0x505797});return{'ok':!![],'data':summarizePersonalItem(_0x13e365),'message':'Updated\x20KB\x20entry\x20'+_0x13e365['id']+'\x20('+_0x13e365[_0x113cbb(0x152)]+')'};},async 'dryRun'(_0x278bfe){const _0x243ec5=a25_0x344dfc,_0x24bce9=_0x278bfe[_0x243ec5(0x14b)]('id'),_0x8392f3=readKnowledgeFile(_0x278bfe[_0x243ec5(0x170)](_0x243ec5(0x166))),_0x1874e5=_0x278bfe[_0x243ec5(0x170)](_0x243ec5(0x152))||(await getPersonalKnowledgeBaseItem(_0x24bce9,_0x278bfe['appCode']))['title'];return dryRun(_0x243ec5(0x173),_0x243ec5(0x150)+_0x24bce9+'/update')[_0x243ec5(0x16f)]({'appCode':_0x278bfe[_0x243ec5(0x16d)],'title':_0x1874e5,'content':_0x8392f3})[_0x243ec5(0x172)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x24bce9)[_0x243ec5(0x157)]();}},kbSearch={'service':'kb','command':a25_0x344dfc(0x14a),'description':a25_0x344dfc(0x15f),'risk':a25_0x344dfc(0x158),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x58cb56){const _0x2f0912=a25_0x344dfc;if(!_0x58cb56[_0x2f0912(0x170)](_0x2f0912(0x147))[_0x2f0912(0x17b)]())throw CliErrors['validation'](_0x2f0912(0x14f));readTopK(_0x58cb56);},async 'execute'(_0x1c32f8){const _0xe12d7f=a25_0x344dfc,_0x351356=_0x1c32f8[_0xe12d7f(0x170)](_0xe12d7f(0x147))[_0xe12d7f(0x17b)](),_0x1ba5a7=readTopK(_0x1c32f8),_0x38ffc2=await searchKnowledgeBase(_0x1c32f8['appCode'],{'query':_0x351356,'topK':_0x1ba5a7});return{'ok':!![],'data':{'total':_0x38ffc2[_0xe12d7f(0x160)],'hits':_0x38ffc2[_0xe12d7f(0x15e)](summarizeSearchHit)}};}};function a25_0x4c56(_0x2c9d5f,_0x154904){_0x2c9d5f=_0x2c9d5f-0x141;const _0x355ca4=a25_0x355c();let _0x4c5650=_0x355ca4[_0x2c9d5f];return _0x4c5650;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ function a25_0x32da(){const _0x39fc2c=['list','/client/knowledge-base/personal/','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Override\x20the\x20existing\x20entry\x20title','score','file','File\x20not\x20found:\x20','1759128VLikjr','topk','docId','weightedScore','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','updateTime','ragErrorMessage','isFile','title','scope','14177925yfkiah','5715855eYglqj','937155MzDdpw','update','query','Personal\x20knowledge-base\x20entry\x20title','Search\x20query\x20is\x20required.','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','POST','Updated\x20KB\x20entry\x20','Personal\x20knowledge-base\x20entry\x20ID','metadata','6243102JMflcv','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','139820uMNEfX','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','appCode','validation','write','version','Created\x20KB\x20entry\x20','map','trim','createTime','ragStatus','flag','string','1937470RPUxHA','7rjVHYS','create','content','userId','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','read','/client/knowledge-base/personal/create','str','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','isFinite','8JcNQjP','num','bool','body','build'];a25_0x32da=function(){return _0x39fc2c;};return a25_0x32da();}const a25_0x1ab2ce=a25_0x397c;(function(_0x409e0f,_0x398d1a){const _0x3ed799=a25_0x397c,_0x48419c=_0x409e0f();while(!![]){try{const _0x4f7132=-parseInt(_0x3ed799(0x180))/0x1+-parseInt(_0x3ed799(0x173))/0x2+-parseInt(_0x3ed799(0x165))/0x3+-parseInt(_0x3ed799(0x159))/0x4+parseInt(_0x3ed799(0x164))/0x5+-parseInt(_0x3ed799(0x170))/0x6*(-parseInt(_0x3ed799(0x181))/0x7)+-parseInt(_0x3ed799(0x14d))/0x8*(-parseInt(_0x3ed799(0x163))/0x9);if(_0x4f7132===_0x398d1a)break;else _0x48419c['push'](_0x48419c['shift']());}catch(_0x1d3cfd){_0x48419c['push'](_0x48419c['shift']());}}}(a25_0x32da,0xf402a));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a25_0x1ab2ce(0x161),'type':a25_0x1ab2ce(0x17f),'required':!![],'description':a25_0x1ab2ce(0x168)},FILE_FLAG={'name':a25_0x1ab2ce(0x157),'type':a25_0x1ab2ce(0x17f),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a25_0x1ab2ce(0x167),'type':'string','required':!![],'description':a25_0x1ab2ce(0x174)},TOPK_FLAG={'name':a25_0x1ab2ce(0x15a),'type':'number','description':a25_0x1ab2ce(0x15d)};function readKnowledgeFile(_0x3b016c){const _0xbc8870=a25_0x1ab2ce;if(!_0x3b016c)throw CliErrors[_0xbc8870(0x176)]('File\x20path\x20is\x20required.');if(!existsSync(_0x3b016c))throw CliErrors[_0xbc8870(0x176)](_0xbc8870(0x158)+_0x3b016c);if(!statSync(_0x3b016c)[_0xbc8870(0x160)]())throw CliErrors[_0xbc8870(0x176)](_0xbc8870(0x171)+_0x3b016c);return readFileSync(_0x3b016c,'utf8');}function summarizePersonalItem(_0x4c0423){const _0x3ff996=a25_0x1ab2ce;return{'id':_0x4c0423['id'],'title':_0x4c0423[_0x3ff996(0x161)],'version':_0x4c0423[_0x3ff996(0x178)],'ragStatus':_0x4c0423[_0x3ff996(0x17d)],'ragErrorMessage':_0x4c0423[_0x3ff996(0x15f)],'updateTime':_0x4c0423[_0x3ff996(0x15e)]};}function a25_0x397c(_0xf602c7,_0x5b7796){_0xf602c7=_0xf602c7-0x148;const _0x32daa4=a25_0x32da();let _0x397c43=_0x32daa4[_0xf602c7];return _0x397c43;}function detailPersonalItem(_0x1e712d){const _0x59f8b3=a25_0x1ab2ce;return{'id':_0x1e712d['id'],'appCode':_0x1e712d[_0x59f8b3(0x175)],'scope':_0x1e712d[_0x59f8b3(0x162)],'userId':_0x1e712d[_0x59f8b3(0x184)],'title':_0x1e712d[_0x59f8b3(0x161)],'content':_0x1e712d[_0x59f8b3(0x183)]??'','version':_0x1e712d['version'],'ragStatus':_0x1e712d[_0x59f8b3(0x17d)],'ragErrorMessage':_0x1e712d[_0x59f8b3(0x15f)],'createTime':_0x1e712d[_0x59f8b3(0x17c)],'updateTime':_0x1e712d[_0x59f8b3(0x15e)]};}function summarizeSearchHit(_0x296230){const _0x62095=a25_0x1ab2ce;return{'scope':_0x296230[_0x62095(0x162)],'docId':_0x296230[_0x62095(0x15b)],'score':_0x296230[_0x62095(0x156)],'weightedScore':_0x296230[_0x62095(0x15c)],'content':_0x296230[_0x62095(0x183)],'metadata':_0x296230[_0x62095(0x16f)]};}function readTopK(_0x26bd94){const _0x16e577=a25_0x1ab2ce,_0xbfc470=_0x26bd94[_0x16e577(0x17e)](_0x16e577(0x15a));if(_0xbfc470===undefined||_0xbfc470===null||_0xbfc470==='')return undefined;const _0x527179=_0x26bd94['num'](_0x16e577(0x15a));if(!Number[_0x16e577(0x14c)](_0x527179)||_0x527179<0x1)throw CliErrors[_0x16e577(0x176)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x527179;}const kbList={'service':'kb','command':a25_0x1ab2ce(0x152),'description':a25_0x1ab2ce(0x14b),'risk':a25_0x1ab2ce(0x148),'flags':[VERBOSE_FLAG],async 'execute'(_0x5da333){const _0xc4e6a7=a25_0x1ab2ce,_0x50f2ea=await listPersonalKnowledgeBaseItems(_0x5da333[_0xc4e6a7(0x175)]);if(_0x5da333[_0xc4e6a7(0x14f)]('verbose'))return{'ok':!![],'data':{'total':_0x50f2ea['length'],'items':_0x50f2ea}};return{'ok':!![],'data':{'total':_0x50f2ea[_0xc4e6a7(0x172)],'items':_0x50f2ea[_0xc4e6a7(0x17a)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a25_0x1ab2ce(0x16b),'risk':a25_0x1ab2ce(0x148),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x1ba7c8){const _0x21e12d=a25_0x1ab2ce,_0x38c3cf=await getPersonalKnowledgeBaseItem(_0x1ba7c8[_0x21e12d(0x14e)]('id'),_0x1ba7c8[_0x21e12d(0x175)]);return{'ok':!![],'data':detailPersonalItem(_0x38c3cf)};}},kbCreate={'service':'kb','command':a25_0x1ab2ce(0x182),'description':a25_0x1ab2ce(0x154),'risk':a25_0x1ab2ce(0x177),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4eb1e7){const _0x540952=a25_0x1ab2ce,_0x163bc9=_0x4eb1e7[_0x540952(0x14a)](_0x540952(0x161)),_0x3f2eb0=readKnowledgeFile(_0x4eb1e7[_0x540952(0x14a)](_0x540952(0x157))),_0x6c97d0=await createPersonalKnowledgeBaseItem(_0x4eb1e7['appCode'],{'title':_0x163bc9,'content':_0x3f2eb0});return{'ok':!![],'data':summarizePersonalItem(_0x6c97d0),'message':_0x540952(0x179)+_0x6c97d0['id']+'\x20('+_0x6c97d0['title']+')'};},async 'dryRun'(_0x964b8b){const _0xe9a479=a25_0x1ab2ce,_0x559bc9=_0x964b8b[_0xe9a479(0x14a)]('title'),_0x18d97d=readKnowledgeFile(_0x964b8b[_0xe9a479(0x14a)](_0xe9a479(0x157)));return dryRun(_0xe9a479(0x16c),_0xe9a479(0x149))[_0xe9a479(0x150)]({'appCode':_0x964b8b['appCode'],'title':_0x559bc9,'content':_0x18d97d})['description'](_0xe9a479(0x185)+_0x559bc9+'\x22')[_0xe9a479(0x151)]();}},kbUpdate={'service':'kb','command':a25_0x1ab2ce(0x166),'description':a25_0x1ab2ce(0x16a),'risk':a25_0x1ab2ce(0x177),'flags':[{...ID_FLAG,'description':a25_0x1ab2ce(0x16e)},{...TITLE_FLAG,'required':![],'description':a25_0x1ab2ce(0x155)},FILE_FLAG],async 'execute'(_0x88e912){const _0x371e6f=a25_0x1ab2ce,_0x46439e=_0x88e912[_0x371e6f(0x14e)]('id'),_0x1e1215=readKnowledgeFile(_0x88e912[_0x371e6f(0x14a)](_0x371e6f(0x157))),_0x3d3ad9=_0x88e912[_0x371e6f(0x14a)](_0x371e6f(0x161))||(await getPersonalKnowledgeBaseItem(_0x46439e,_0x88e912[_0x371e6f(0x175)]))['title'],_0x56dcc1=await updatePersonalKnowledgeBaseItem(_0x46439e,_0x88e912[_0x371e6f(0x175)],{'title':_0x3d3ad9,'content':_0x1e1215});return{'ok':!![],'data':summarizePersonalItem(_0x56dcc1),'message':_0x371e6f(0x16d)+_0x56dcc1['id']+'\x20('+_0x56dcc1[_0x371e6f(0x161)]+')'};},async 'dryRun'(_0x236638){const _0x3937e2=a25_0x1ab2ce,_0x5186e8=_0x236638['num']('id'),_0x101a59=readKnowledgeFile(_0x236638[_0x3937e2(0x14a)](_0x3937e2(0x157))),_0x1cf081=_0x236638[_0x3937e2(0x14a)]('title')||(await getPersonalKnowledgeBaseItem(_0x5186e8,_0x236638['appCode']))[_0x3937e2(0x161)];return dryRun(_0x3937e2(0x16c),_0x3937e2(0x153)+_0x5186e8+'/update')[_0x3937e2(0x150)]({'appCode':_0x236638[_0x3937e2(0x175)],'title':_0x1cf081,'content':_0x101a59})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x5186e8)[_0x3937e2(0x151)]();}},kbSearch={'service':'kb','command':'search','description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a25_0x1ab2ce(0x148),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x140f66){const _0x23a853=a25_0x1ab2ce;if(!_0x140f66[_0x23a853(0x14a)]('query')[_0x23a853(0x17b)]())throw CliErrors[_0x23a853(0x176)](_0x23a853(0x169));readTopK(_0x140f66);},async 'execute'(_0xde31b3){const _0x575378=a25_0x1ab2ce,_0x54f3c5=_0xde31b3[_0x575378(0x14a)]('query')[_0x575378(0x17b)](),_0x3d3883=readTopK(_0xde31b3),_0x168b79=await searchKnowledgeBase(_0xde31b3[_0x575378(0x175)],{'query':_0x54f3c5,'topK':_0x3d3883});return{'ok':!![],'data':{'total':_0x168b79[_0x575378(0x172)],'hits':_0x168b79[_0x575378(0x17a)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a26_0x2a6430=a26_0x21d0;(function(_0x21124e,_0x10b6ec){const _0x587b2b=a26_0x21d0,_0xf380a8=_0x21124e();while(!![]){try{const _0x30f95d=-parseInt(_0x587b2b(0x115))/0x1+-parseInt(_0x587b2b(0x110))/0x2+parseInt(_0x587b2b(0x118))/0x3+-parseInt(_0x587b2b(0x10c))/0x4+-parseInt(_0x587b2b(0xfa))/0x5*(parseInt(_0x587b2b(0xf8))/0x6)+-parseInt(_0x587b2b(0x111))/0x7+parseInt(_0x587b2b(0x10a))/0x8;if(_0x30f95d===_0x10b6ec)break;else _0xf380a8['push'](_0xf380a8['shift']());}catch(_0x22b26d){_0xf380a8['push'](_0xf380a8['shift']());}}}(a26_0x9e5f,0x5d2f4));function a26_0x9e5f(){const _0x323e23=['keys','873392HUUKnT','3994060kfiTsn','level','show','toLocaleString','293243lzlyst','en-US','message','471714FbjJfY','error','clear','42NqKJaH','length','184795GMCugq','details','clearLogs','\x20logs:\x0a','View\x20command\x20history\x20logs','read','*\x20Logs\x20cleared','Clear\x20command\x20history\x20logs','log','timestamp','logs','readLogs','\x20\x20\x20Details:\x20','success','write','\x20\x20\x20Time:\x20','14516856khIAWN','warn','123716tAPOCY','command','forEach'];a26_0x9e5f=function(){return _0x323e23;};return a26_0x9e5f();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x21d0(_0xd2a363,_0x4ca686){_0xd2a363=_0xd2a363-0xf6;const _0x9e5f99=a26_0x9e5f();let _0x21d0cf=_0x9e5f99[_0xd2a363];return _0x21d0cf;}function printLogs(_0x3db2df){const _0x2b901d=a26_0x21d0;if(_0x3db2df[_0x2b901d(0xf9)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x2b901d(0x102)]('*\x20'+CLI_DISPLAY_NAME+_0x2b901d(0xfd)),_0x3db2df[_0x2b901d(0x10e)]((_0x4d9d25,_0x3c6a14)=>{const _0x181220=_0x2b901d,_0x268b77=new Date(_0x4d9d25[_0x181220(0x103)])[_0x181220(0x114)](_0x181220(0x116)),_0x2188d7=_0x4d9d25[_0x181220(0x112)]===_0x181220(0x107)?'√':_0x4d9d25[_0x181220(0x112)]===_0x181220(0xf6)?'×':_0x4d9d25['level']===_0x181220(0x10b)?'!':'i';console['log'](_0x3c6a14+0x1+'.\x20'+_0x2188d7+'\x20['+_0x4d9d25[_0x181220(0x10d)]+']\x20'+_0x4d9d25[_0x181220(0x117)]),console[_0x181220(0x102)](_0x181220(0x109)+_0x268b77),_0x4d9d25['duration']&&console[_0x181220(0x102)]('\x20\x20\x20Duration:\x20'+_0x4d9d25['duration']+'ms'),_0x4d9d25['details']&&Object[_0x181220(0x10f)](_0x4d9d25[_0x181220(0xfb)])[_0x181220(0xf9)]>0x0&&console[_0x181220(0x102)](_0x181220(0x106)+JSON['stringify'](_0x4d9d25[_0x181220(0xfb)],null,0x2)),console[_0x181220(0x102)]('');});}export const logsDefinitions=[{'service':'logs','command':a26_0x2a6430(0x113),'description':a26_0x2a6430(0xfe),'risk':a26_0x2a6430(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x414efb){const _0x1bb7ce=a26_0x2a6430;return printLogs(logger[_0x1bb7ce(0x105)]()),{'ok':!![]};}},{'service':a26_0x2a6430(0x104),'command':a26_0x2a6430(0xf7),'description':a26_0x2a6430(0x101),'risk':a26_0x2a6430(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x27bfd6){const _0x37fcae=a26_0x2a6430;return logger[_0x37fcae(0xfc)](),console['log'](_0x37fcae(0x100)),{'ok':!![]};}}];
1
+ function a26_0xc598(){const _0x7d1616=['17580eFFvTD','\x20logs:\x0a','log','en-US','level','timestamp','5310708viDjdN','1165XvEkHB','361376OaIZOk','Clear\x20command\x20history\x20logs','stringify','View\x20command\x20history\x20logs','length','error','6579585ddvXsK','7218820reAHfj','*\x20No\x20logs\x20found','\x20\x20\x20Duration:\x20','success','15366uoDcby','details','7666992mRKbfR','toLocaleString','duration','keys','command','clear','forEach','warn','*\x20Logs\x20cleared','159xoByKk','\x20\x20\x20Time:\x20'];a26_0xc598=function(){return _0x7d1616;};return a26_0xc598();}const a26_0xc40322=a26_0x50ca;(function(_0x36d6a5,_0x1512bd){const _0x54ac42=a26_0x50ca,_0x1b61c1=_0x36d6a5();while(!![]){try{const _0x101b31=parseInt(_0x54ac42(0x11b))/0x1+-parseInt(_0x54ac42(0x133))/0x2*(parseInt(_0x54ac42(0x131))/0x3)+-parseInt(_0x54ac42(0x119))/0x4+-parseInt(_0x54ac42(0x11a))/0x5*(parseInt(_0x54ac42(0x126))/0x6)+parseInt(_0x54ac42(0x122))/0x7+parseInt(_0x54ac42(0x128))/0x8+parseInt(_0x54ac42(0x121))/0x9;if(_0x101b31===_0x1512bd)break;else _0x1b61c1['push'](_0x1b61c1['shift']());}catch(_0x22384d){_0x1b61c1['push'](_0x1b61c1['shift']());}}}(a26_0xc598,0xa8e67));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x50ca(_0x56aca7,_0xbd88e2){_0x56aca7=_0x56aca7-0x118;const _0xc59804=a26_0xc598();let _0x50ca7e=_0xc59804[_0x56aca7];return _0x50ca7e;}function printLogs(_0x3245e1){const _0x4deaf9=a26_0x50ca;if(_0x3245e1['length']===0x0){console['log'](_0x4deaf9(0x123));return;}console[_0x4deaf9(0x135)]('*\x20'+CLI_DISPLAY_NAME+_0x4deaf9(0x134)),_0x3245e1[_0x4deaf9(0x12e)]((_0x41003d,_0x225e50)=>{const _0x20822c=_0x4deaf9,_0x14a945=new Date(_0x41003d[_0x20822c(0x118)])[_0x20822c(0x129)](_0x20822c(0x136)),_0x3f89ce=_0x41003d['level']===_0x20822c(0x125)?'√':_0x41003d[_0x20822c(0x137)]===_0x20822c(0x120)?'×':_0x41003d['level']===_0x20822c(0x12f)?'!':'i';console['log'](_0x225e50+0x1+'.\x20'+_0x3f89ce+'\x20['+_0x41003d[_0x20822c(0x12c)]+']\x20'+_0x41003d['message']),console[_0x20822c(0x135)](_0x20822c(0x132)+_0x14a945),_0x41003d[_0x20822c(0x12a)]&&console[_0x20822c(0x135)](_0x20822c(0x124)+_0x41003d[_0x20822c(0x12a)]+'ms'),_0x41003d['details']&&Object[_0x20822c(0x12b)](_0x41003d[_0x20822c(0x127)])[_0x20822c(0x11f)]>0x0&&console[_0x20822c(0x135)]('\x20\x20\x20Details:\x20'+JSON[_0x20822c(0x11d)](_0x41003d[_0x20822c(0x127)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':'logs','command':'show','description':a26_0xc40322(0x11e),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x193959){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a26_0xc40322(0x12d),'description':a26_0xc40322(0x11c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x43cd7b){const _0x25e861=a26_0xc40322;return logger['clearLogs'](),console[_0x25e861(0x135)](_0x25e861(0x130)),{'ok':!![]};}}];