@lovrabet/lovrabet-cli 2.0.14-beta.2 → 2.0.14-beta.4

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 (78) 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/skill/templates.js +1 -1
  33. package/lib/commands/skill/validate.js +1 -1
  34. package/lib/commands/sql/detail.js +1 -1
  35. package/lib/commands/sql/exec.js +1 -1
  36. package/lib/commands/sql/index.js +1 -1
  37. package/lib/commands/update.js +1 -1
  38. package/lib/config/schema.js +1 -1
  39. package/lib/constant/auth-mode.js +1 -1
  40. package/lib/constant/cli.js +1 -1
  41. package/lib/constant/defaults.js +1 -1
  42. package/lib/constant/distribution.js +1 -1
  43. package/lib/constant/domain.js +1 -1
  44. package/lib/constant/env.js +1 -1
  45. package/lib/constant/output.js +1 -1
  46. package/lib/constant/product.js +1 -1
  47. package/lib/constant/risk.js +1 -1
  48. package/lib/constant/url.js +1 -1
  49. package/lib/context.js +1 -1
  50. package/lib/core/api-client.js +1 -1
  51. package/lib/core/db-resolver.js +1 -1
  52. package/lib/core/sdk-client.js +1 -1
  53. package/lib/errors.js +1 -1
  54. package/lib/framework/build-all-flags.js +1 -1
  55. package/lib/framework/dryrun.js +1 -1
  56. package/lib/framework/flags.js +1 -1
  57. package/lib/framework/help.js +1 -1
  58. package/lib/framework/index.js +1 -1
  59. package/lib/framework/output.js +1 -1
  60. package/lib/framework/preparse.js +1 -1
  61. package/lib/framework/response.js +1 -1
  62. package/lib/framework/runner-confirmation.js +1 -1
  63. package/lib/framework/runner-error.js +1 -1
  64. package/lib/framework/runner.js +1 -1
  65. package/lib/framework/schema-export.js +1 -1
  66. package/lib/framework/types.js +1 -1
  67. package/lib/generated/build-info.js +1 -1
  68. package/lib/help.js +1 -1
  69. package/lib/skills/npx-skills-add.js +1 -1
  70. package/lib/skills/runtime-skill-sync.js +1 -1
  71. package/lib/utils/apply-jq-filter.js +1 -1
  72. package/lib/utils/logger.js +1 -1
  73. package/lib/utils/params.js +1 -1
  74. package/lib/utils/platform.js +1 -1
  75. package/lib/utils/update-notice.js +1 -1
  76. package/lib/utils/version.js +1 -1
  77. package/lib/utils/write-cli-side-channel.js +1 -1
  78. package/package.json +1 -1
@@ -1 +1 @@
1
- function a15_0xb685(_0x5c69c2,_0x841f40){_0x5c69c2=_0x5c69c2-0x1e1;const _0x17b191=a15_0x17b1();let _0xb68510=_0x17b191[_0x5c69c2];return _0xb68510;}const a15_0x467b8a=a15_0xb685;(function(_0x1c10b7,_0x24bba7){const _0x3ad640=a15_0xb685,_0x35590=_0x1c10b7();while(!![]){try{const _0x379669=-parseInt(_0x3ad640(0x1ea))/0x1+-parseInt(_0x3ad640(0x1f1))/0x2+-parseInt(_0x3ad640(0x1f8))/0x3*(-parseInt(_0x3ad640(0x1f9))/0x4)+parseInt(_0x3ad640(0x1f4))/0x5*(parseInt(_0x3ad640(0x1ed))/0x6)+-parseInt(_0x3ad640(0x1f3))/0x7*(-parseInt(_0x3ad640(0x1f6))/0x8)+-parseInt(_0x3ad640(0x1e5))/0x9+parseInt(_0x3ad640(0x1e6))/0xa*(parseInt(_0x3ad640(0x1ec))/0xb);if(_0x379669===_0x24bba7)break;else _0x35590['push'](_0x35590['shift']());}catch(_0x1c44b5){_0x35590['push'](_0x35590['shift']());}}}(a15_0x17b1,0x8284a));export const CODE_FLAG={'name':a15_0x467b8a(0x1f0),'type':a15_0x467b8a(0x1e4),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a15_0x467b8a(0x1e1),'type':a15_0x467b8a(0x1e4),'required':!![],'description':a15_0x467b8a(0x1e9),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a15_0x467b8a(0x1f7)}};export const VERBOSE_FLAG={'name':a15_0x467b8a(0x1f2),'type':a15_0x467b8a(0x1e8),'description':a15_0x467b8a(0x1f5)};function a15_0x17b1(){const _0x3efbc7=['4723956mkhBzb','127760NoYWpa','number','boolean','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','244129KKDfIv','name','33ITmqfU','128382mDciQE','Resource\x20name\x20for\x20lookup','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','code','415956cNXJBT','verbose','28qwZlYI','160aUtnYl','Return\x20full\x20raw\x20response\x20object','930272Zaukyd','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','2283korwrs','1700WpbAFy','sqlcode','params','Resource\x20ID','string'];a15_0x17b1=function(){return _0x3efbc7;};return a15_0x17b1();}export const PARAMS_FLAG={'name':a15_0x467b8a(0x1e2),'type':a15_0x467b8a(0x1e4),'description':a15_0x467b8a(0x1ef)};export const NAME_FLAG={'name':a15_0x467b8a(0x1eb),'type':a15_0x467b8a(0x1e4),'description':a15_0x467b8a(0x1ee)};export const ID_FLAG={'name':'id','type':a15_0x467b8a(0x1e7),'required':!![],'description':a15_0x467b8a(0x1e3)};
1
+ const a15_0x630f5b=a15_0x24df;(function(_0x47266e,_0x18c102){const _0x59dff9=a15_0x24df,_0x4104a5=_0x47266e();while(!![]){try{const _0x3442c9=-parseInt(_0x59dff9(0x1a7))/0x1*(-parseInt(_0x59dff9(0x1ac))/0x2)+parseInt(_0x59dff9(0x19c))/0x3*(parseInt(_0x59dff9(0x1a2))/0x4)+parseInt(_0x59dff9(0x1a6))/0x5+parseInt(_0x59dff9(0x1ad))/0x6*(-parseInt(_0x59dff9(0x19e))/0x7)+-parseInt(_0x59dff9(0x1a5))/0x8*(-parseInt(_0x59dff9(0x1b3))/0x9)+-parseInt(_0x59dff9(0x1a3))/0xa*(-parseInt(_0x59dff9(0x1ab))/0xb)+-parseInt(_0x59dff9(0x1a8))/0xc*(parseInt(_0x59dff9(0x1a0))/0xd);if(_0x3442c9===_0x18c102)break;else _0x4104a5['push'](_0x4104a5['shift']());}catch(_0x490750){_0x4104a5['push'](_0x4104a5['shift']());}}}(a15_0x13d1,0xeea55));export const CODE_FLAG={'name':a15_0x630f5b(0x1aa),'type':a15_0x630f5b(0x1b0),'required':!![],'description':a15_0x630f5b(0x19d),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a15_0x630f5b(0x1ae)}};export const SQLCODE_FLAG={'name':a15_0x630f5b(0x1b4),'type':a15_0x630f5b(0x1b0),'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':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a15_0x630f5b(0x1af),'type':a15_0x630f5b(0x1a1),'description':a15_0x630f5b(0x1a9)};export const PARAMS_FLAG={'name':'params','type':'string','description':a15_0x630f5b(0x1b2)};function a15_0x24df(_0xab0615,_0x524c84){_0xab0615=_0xab0615-0x19c;const _0x13d1e4=a15_0x13d1();let _0x24dfd2=_0x13d1e4[_0xab0615];return _0x24dfd2;}export const NAME_FLAG={'name':a15_0x630f5b(0x1a4),'type':'string','description':'Resource\x20name\x20for\x20lookup'};function a15_0x13d1(){const _0x9b0b3d=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','14yxsAJx','number','30875Guaexc','boolean','4BzPJcX','6370tjgQHf','name','56CDwKQW','5135030ZQHhOB','1725965ErgSQz','13548XvXfgD','Return\x20full\x20raw\x20response\x20object','code','5401kqtNpP','2mgWeZs','4520028VBhNzW','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','verbose','string','Resource\x20ID','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','2511693rntwUR','sqlcode','438801nyfxgA'];a15_0x13d1=function(){return _0x9b0b3d;};return a15_0x13d1();}export const ID_FLAG={'name':'id','type':a15_0x630f5b(0x19f),'required':!![],'description':a15_0x630f5b(0x1b1)};
@@ -1 +1 @@
1
- const a16_0x1b6f7d=a16_0x4b9c;(function(_0x3340b8,_0x2644ce){const _0x2eb6cf=a16_0x4b9c,_0x25f81d=_0x3340b8();while(!![]){try{const _0x247157=parseInt(_0x2eb6cf(0x1d1))/0x1*(parseInt(_0x2eb6cf(0x1d4))/0x2)+-parseInt(_0x2eb6cf(0x1f0))/0x3*(-parseInt(_0x2eb6cf(0x1db))/0x4)+-parseInt(_0x2eb6cf(0x1f9))/0x5+parseInt(_0x2eb6cf(0x1c1))/0x6+parseInt(_0x2eb6cf(0x1fe))/0x7*(parseInt(_0x2eb6cf(0x1f7))/0x8)+-parseInt(_0x2eb6cf(0x1c8))/0x9+-parseInt(_0x2eb6cf(0x1c4))/0xa;if(_0x247157===_0x2644ce)break;else _0x25f81d['push'](_0x25f81d['shift']());}catch(_0x593ac0){_0x25f81d['push'](_0x25f81d['shift']());}}}(a16_0xdd46,0xb117f));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_0xdd46(){const _0x2b27d6=['Get\x20a\x20config\x20value','log','read','15787Dpikcg','Delete\x20a\x20config\x20value','Value\x20to\x20assign','148oBrAXa','appcode','set','apps','`\x20=\x20\x22','Missing\x20key\x20argument.','Top-level\x20key\x20\x22','48MJfQyK','../../context.js','Key\x20not\x20found:\x20','bool','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Deleted\x20`','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20config\x20set\x20<key>\x20<value>\x20[--global]','key','Set\x20`','length','config','alias','object','field','isArray','Settable\x20keys:\x20','Usage:\x20','list','project-or-global-explicit','stringify','101859bpemiu','write','keys','join','Missing\x20key\x20or\x20value.','Invalid\x20value\x20for\x20\x22','pretty','13248IBIOQx','raw','5484730LoRuqH','pageSize','List\x20current\x20config',';\x20apps.<alias>.appcode','get','4816ZOETQR','(none)','\x22.\x20Allowed:\x20','\x20config\x20get\x20<key>','split','format','validation','5276868CmBkmM','\x22\x20is\x20not\x20settable.','Write\x20to\x20global\x20config','10519880IHummA','Set\x20a\x20config\x20value','\x20\x20global:\x20\x20','args','6481539SumhQR','\x20(global)','trim','value','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','global'];a16_0xdd46=function(){return _0x2b27d6;};return a16_0xdd46();}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':'global','type':'boolean','description':a16_0x1b6f7d(0x1c3),'default':![]};function parseAliasAppcodeSetKey(_0x294be1){const _0x3828fb=a16_0x1b6f7d,_0x14abde=_0x294be1[_0x3828fb(0x1be)]('.');if(_0x14abde['length']!==0x3||_0x14abde[0x0]!==_0x3828fb(0x1d7)||_0x14abde[0x2]!==_0x3828fb(0x1d5))return undefined;const _0x438571=_0x14abde[0x1]?.['trim']();return _0x438571?_0x438571:undefined;}function parseAliasDeleteKey(_0x1e4083){const _0xcf3e35=a16_0x1b6f7d,_0x3cf6a4=_0x1e4083[_0xcf3e35(0x1be)]('.');if(_0x3cf6a4['length']===0x2&&_0x3cf6a4[0x0]===_0xcf3e35(0x1d7)){const _0x20dbda=_0x3cf6a4[0x1]?.[_0xcf3e35(0x1ca)]();return _0x20dbda?{'alias':_0x20dbda}:undefined;}if(_0x3cf6a4[_0xcf3e35(0x1e5)]===0x3&&_0x3cf6a4[0x0]===_0xcf3e35(0x1d7)&&_0x3cf6a4[0x2]===_0xcf3e35(0x1d5)){const _0x3d478d=_0x3cf6a4[0x1]?.[_0xcf3e35(0x1ca)]();return _0x3d478d?{'alias':_0x3d478d,'field':_0xcf3e35(0x1d5)}:undefined;}return undefined;}function setLocalAppAlias(_0x543ac5,_0x3a3b56,_0x15a8c5){const _0xe23aa4=a16_0x1b6f7d,_0x15ef29=_0x543ac5['apps']&&typeof _0x543ac5[_0xe23aa4(0x1d7)]===_0xe23aa4(0x1e8)&&!Array['isArray'](_0x543ac5['apps'])?_0x543ac5[_0xe23aa4(0x1d7)]:{},_0x5a207d=_0x15ef29[_0x3a3b56]&&typeof _0x15ef29[_0x3a3b56]===_0xe23aa4(0x1e8)&&!Array[_0xe23aa4(0x1ea)](_0x15ef29[_0x3a3b56])?_0x15ef29[_0x3a3b56]:{};_0x5a207d[_0xe23aa4(0x1d5)]=_0x15a8c5,_0x15ef29[_0x3a3b56]=_0x5a207d,_0x543ac5[_0xe23aa4(0x1d7)]=_0x15ef29;}function deleteLocalAppAlias(_0x29f906,_0x4e9a63){const _0x144c29=a16_0x1b6f7d;if(!_0x29f906['apps']||typeof _0x29f906[_0x144c29(0x1d7)]!==_0x144c29(0x1e8)||Array[_0x144c29(0x1ea)](_0x29f906['apps']))return![];const _0x191c41=_0x29f906[_0x144c29(0x1d7)],_0x57db10=_0x191c41[_0x4e9a63[_0x144c29(0x1e7)]];if(!_0x57db10||typeof _0x57db10!=='object'||Array[_0x144c29(0x1ea)](_0x57db10))return![];if(!_0x4e9a63[_0x144c29(0x1e9)])return delete _0x191c41[_0x4e9a63[_0x144c29(0x1e7)]],!![];if(!(_0x4e9a63[_0x144c29(0x1e9)]in _0x57db10))return![];return delete _0x57db10[_0x4e9a63[_0x144c29(0x1e9)]],Object[_0x144c29(0x1f2)](_0x57db10)[_0x144c29(0x1e5)]===0x0&&delete _0x191c41[_0x4e9a63['alias']],!![];}const listDef={'service':'config','command':a16_0x1b6f7d(0x1ed),'description':a16_0x1b6f7d(0x1fb),'risk':a16_0x1b6f7d(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5357f0){const _0x126775=a16_0x1b6f7d,{buildConfigFromFlags:_0x50fda3}=await import(_0x126775(0x1dc)),_0x40f4d7=_0x50fda3({}),_0x659fbd=getProjectConfigPath(),_0x2b9e25=resolveWriteConfigPath(_0x126775(0x1cd));if(_0x5357f0[_0x126775(0x1bf)]===_0x126775(0x1f6))return{'ok':!![],'message':_0x126775(0x1cc)+(JSON[_0x126775(0x1ef)](_0x40f4d7[_0x126775(0x1f8)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+('\x20\x20project:\x20'+(_0x659fbd??_0x126775(0x1ff))+'\x0a')+(_0x126775(0x1c6)+_0x2b9e25)};return{'ok':!![],'data':{'effective':_0x40f4d7[_0x126775(0x1f8)],'configFiles':{'project':_0x659fbd??null,'global':_0x2b9e25}}};}},getDef={'service':a16_0x1b6f7d(0x1e6),'command':a16_0x1b6f7d(0x1fd),'description':a16_0x1b6f7d(0x1ce),'risk':a16_0x1b6f7d(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x1b6f7d(0x1e3),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x4d6d4d){const _0x2916ed=a16_0x1b6f7d,_0x374f9b=_0x4d6d4d[_0x2916ed(0x1c7)][0x0];if(!_0x374f9b)throw CliErrors[_0x2916ed(0x1c0)](_0x2916ed(0x1d9),_0x2916ed(0x1ec)+CLI_BIN_NAME+_0x2916ed(0x1bd));const {buildConfigFromFlags:_0x3efb72}=await import(_0x2916ed(0x1dc)),{raw:_0x14a5fd}=_0x3efb72({});if(_0x374f9b['includes']('.')){const _0x38405e=_0x374f9b[_0x2916ed(0x1be)]('.');let _0x52f139=_0x14a5fd;for(const _0x5248bb of _0x38405e){if(_0x52f139==null||typeof _0x52f139!=='object')throw CliErrors[_0x2916ed(0x1c0)](_0x2916ed(0x1dd)+_0x374f9b);_0x52f139=_0x52f139[_0x5248bb];}if(_0x52f139===undefined)throw CliErrors[_0x2916ed(0x1c0)]('Key\x20not\x20found:\x20'+_0x374f9b);return console[_0x2916ed(0x1cf)](typeof _0x52f139===_0x2916ed(0x1e8)?JSON[_0x2916ed(0x1ef)](_0x52f139,null,0x2):String(_0x52f139)),{'ok':!![]};}const _0x22cac2=_0x14a5fd[_0x374f9b];if(_0x22cac2===undefined)throw CliErrors[_0x2916ed(0x1c0)](_0x2916ed(0x1dd)+_0x374f9b);return console[_0x2916ed(0x1cf)](typeof _0x22cac2===_0x2916ed(0x1e8)?JSON[_0x2916ed(0x1ef)](_0x22cac2,null,0x2):String(_0x22cac2)),{'ok':!![]};}},setDef={'service':a16_0x1b6f7d(0x1e6),'command':a16_0x1b6f7d(0x1d6),'description':a16_0x1b6f7d(0x1c5),'risk':a16_0x1b6f7d(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x1b6f7d(0x1e3),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a16_0x1b6f7d(0x1cb),'description':a16_0x1b6f7d(0x1d3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4983a8){const _0x59b8af=a16_0x1b6f7d,_0x26d447=_0x4983a8[_0x59b8af(0x1c7)][0x0],_0x60facd=_0x4983a8[_0x59b8af(0x1c7)][0x1];if(!_0x26d447||_0x60facd===undefined)throw CliErrors[_0x59b8af(0x1c0)](_0x59b8af(0x1f4),_0x59b8af(0x1ec)+CLI_BIN_NAME+_0x59b8af(0x1e2));if(ENUM_KEYS[_0x26d447]&&!ENUM_KEYS[_0x26d447]['includes'](_0x60facd))throw CliErrors[_0x59b8af(0x1c0)](_0x59b8af(0x1f5)+_0x26d447+_0x59b8af(0x1bc)+ENUM_KEYS[_0x26d447][_0x59b8af(0x1f3)](',\x20'));if(_0x26d447==='riskLevel')throw CliErrors['validation'](_0x59b8af(0x1df));if(_0x26d447===_0x59b8af(0x1fa)){const _0x5c6278=Number(_0x60facd);if(isNaN(_0x5c6278)||_0x5c6278<=0x0)throw CliErrors[_0x59b8af(0x1c0)](_0x59b8af(0x1e1));}const _0x5c6bc4=resolveWriteScope({'explicitGlobal':_0x4983a8[_0x59b8af(0x1de)](_0x59b8af(0x1cd)),'policy':_0x59b8af(0x1ee)}),_0xb764b2=toScopeFlags(_0x5c6bc4),_0x315d64=readScopedConfig(_0xb764b2),_0x4d7b67=parseAliasAppcodeSetKey(_0x26d447);if(!_0x4d7b67&&!isTopLevelConfigKey(_0x26d447))throw CliErrors['validation'](_0x59b8af(0x1da)+_0x26d447+_0x59b8af(0x1c2),_0x59b8af(0x1eb)+getTopLevelConfigKeySummary()+_0x59b8af(0x1fc));return _0x4d7b67?setLocalAppAlias(_0x315d64,_0x4d7b67,_0x60facd):_0x315d64[_0x26d447]=_0x26d447==='pageSize'?Number(_0x60facd):_0x60facd,console['log'](_0x59b8af(0x1e4)+_0x26d447+_0x59b8af(0x1d8)+_0x60facd+'\x22'+(_0x5c6bc4===_0x59b8af(0x1cd)?_0x59b8af(0x1c9):'')),writeScopedConfig(_0x315d64,_0xb764b2),{'ok':!![]};}},deleteDef={'service':a16_0x1b6f7d(0x1e6),'command':'delete','description':a16_0x1b6f7d(0x1d2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x1b6f7d(0x1e3),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x56ff96){const _0x1e9719=a16_0x1b6f7d,_0x29c6b1=_0x56ff96[_0x1e9719(0x1c7)][0x0];if(!_0x29c6b1)throw CliErrors[_0x1e9719(0x1c0)](_0x1e9719(0x1d9),_0x1e9719(0x1ec)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x4b5275=resolveWriteScope({'explicitGlobal':_0x56ff96[_0x1e9719(0x1de)](_0x1e9719(0x1cd)),'policy':'project-or-global-explicit'}),_0x50e564=toScopeFlags(_0x4b5275),_0x2136fd=readScopedConfig(_0x50e564),_0x2ab259=parseAliasDeleteKey(_0x29c6b1);if(_0x2ab259){if(!deleteLocalAppAlias(_0x2136fd,_0x2ab259))throw CliErrors[_0x1e9719(0x1c0)](_0x1e9719(0x1dd)+_0x29c6b1);return console[_0x1e9719(0x1cf)](_0x1e9719(0x1e0)+_0x29c6b1+'`'+(_0x4b5275===_0x1e9719(0x1cd)?_0x1e9719(0x1c9):'')),writeScopedConfig(_0x2136fd,_0x50e564),{'ok':!![]};}if(_0x2136fd[_0x29c6b1]===undefined)throw CliErrors[_0x1e9719(0x1c0)]('Key\x20\x22'+_0x29c6b1+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x2136fd[_0x29c6b1],console[_0x1e9719(0x1cf)](_0x1e9719(0x1e0)+_0x29c6b1+'`'+(_0x4b5275===_0x1e9719(0x1cd)?_0x1e9719(0x1c9):'')),writeScopedConfig(_0x2136fd,_0x50e564),{'ok':!![]};}};function a16_0x4b9c(_0x3307dc,_0x5c2ddf){_0x3307dc=_0x3307dc-0x1bc;const _0xdd46ab=a16_0xdd46();let _0x4b9c4d=_0xdd46ab[_0x3307dc];return _0x4b9c4d;}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
1
+ const a16_0x4eebbe=a16_0x4577;(function(_0x176d08,_0x7042d1){const _0x23c544=a16_0x4577,_0x381d0d=_0x176d08();while(!![]){try{const _0x3a571e=-parseInt(_0x23c544(0x18f))/0x1+parseInt(_0x23c544(0x19f))/0x2+parseInt(_0x23c544(0x190))/0x3+parseInt(_0x23c544(0x1a0))/0x4+-parseInt(_0x23c544(0x19c))/0x5*(-parseInt(_0x23c544(0x197))/0x6)+parseInt(_0x23c544(0x1ae))/0x7*(-parseInt(_0x23c544(0x18a))/0x8)+parseInt(_0x23c544(0x1a4))/0x9*(-parseInt(_0x23c544(0x1b6))/0xa);if(_0x3a571e===_0x7042d1)break;else _0x381d0d['push'](_0x381d0d['shift']());}catch(_0xee8c89){_0x381d0d['push'](_0x381d0d['shift']());}}}(a16_0x29a6,0x807cd));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_0x4eebbe(0x186),'type':a16_0x4eebbe(0x18d),'description':'Write\x20to\x20global\x20config','default':![]};function a16_0x29a6(){const _0x5dbc49=['Top-level\x20key\x20\x22','set','get','\x20config\x20delete\x20<key>\x20[--global]','../../context.js','apps','Value\x20to\x20assign','Usage:\x20','alias','args','bool','format','stringify','global','list','\x22\x20is\x20not\x20settable.','write','2504SoSgOu','delete','object','boolean','log','195226IvUXBt','2745141ZGndVk','Missing\x20key\x20or\x20value.','\x20\x20global:\x20\x20','split','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Invalid\x20value\x20for\x20\x22','Deleted\x20`','1641444OKjuSA','keys','\x22\x20not\x20found\x20at\x20top\x20level.','List\x20current\x20config','Missing\x20key\x20argument.','5KBIvxb','Settable\x20keys:\x20','\x22.\x20Allowed:\x20','1498526PErmaP','1665364hSUFRA','appcode','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','field','13964823rbNtLb','Config\x20files:\x0a','isArray','pageSize','includes','value','Set\x20a\x20config\x20value','pretty',';\x20apps.<alias>.appcode','length','1813wCgPyR','pageSize\x20must\x20be\x20a\x20positive\x20number','raw','Delete\x20a\x20config\x20value','read','config','trim','project-or-global-explicit','10JDXVWy','validation','\x20(global)','Key\x20not\x20found:\x20','Get\x20a\x20config\x20value','key','join'];a16_0x29a6=function(){return _0x5dbc49;};return a16_0x29a6();}function parseAliasAppcodeSetKey(_0x34421c){const _0x3b206d=a16_0x4eebbe,_0x123865=_0x34421c[_0x3b206d(0x193)]('.');if(_0x123865[_0x3b206d(0x1ad)]!==0x3||_0x123865[0x0]!=='apps'||_0x123865[0x2]!==_0x3b206d(0x1a1))return undefined;const _0xa4a4c7=_0x123865[0x1]?.['trim']();return _0xa4a4c7?_0xa4a4c7:undefined;}function parseAliasDeleteKey(_0x50f875){const _0x152369=a16_0x4eebbe,_0x3b9654=_0x50f875[_0x152369(0x193)]('.');if(_0x3b9654[_0x152369(0x1ad)]===0x2&&_0x3b9654[0x0]===_0x152369(0x17e)){const _0xc33135=_0x3b9654[0x1]?.[_0x152369(0x1b4)]();return _0xc33135?{'alias':_0xc33135}:undefined;}if(_0x3b9654[_0x152369(0x1ad)]===0x3&&_0x3b9654[0x0]===_0x152369(0x17e)&&_0x3b9654[0x2]===_0x152369(0x1a1)){const _0x1d92d5=_0x3b9654[0x1]?.[_0x152369(0x1b4)]();return _0x1d92d5?{'alias':_0x1d92d5,'field':_0x152369(0x1a1)}:undefined;}return undefined;}function setLocalAppAlias(_0x47e65e,_0x26b357,_0x509948){const _0x2388e3=a16_0x4eebbe,_0x2f855a=_0x47e65e[_0x2388e3(0x17e)]&&typeof _0x47e65e[_0x2388e3(0x17e)]==='object'&&!Array[_0x2388e3(0x1a6)](_0x47e65e[_0x2388e3(0x17e)])?_0x47e65e['apps']:{},_0x595204=_0x2f855a[_0x26b357]&&typeof _0x2f855a[_0x26b357]==='object'&&!Array[_0x2388e3(0x1a6)](_0x2f855a[_0x26b357])?_0x2f855a[_0x26b357]:{};_0x595204[_0x2388e3(0x1a1)]=_0x509948,_0x2f855a[_0x26b357]=_0x595204,_0x47e65e[_0x2388e3(0x17e)]=_0x2f855a;}function a16_0x4577(_0x49ed45,_0x27f273){_0x49ed45=_0x49ed45-0x17b;const _0x29a64f=a16_0x29a6();let _0x457781=_0x29a64f[_0x49ed45];return _0x457781;}function deleteLocalAppAlias(_0x4c7460,_0x178716){const _0x7309c5=a16_0x4eebbe;if(!_0x4c7460[_0x7309c5(0x17e)]||typeof _0x4c7460['apps']!==_0x7309c5(0x18c)||Array['isArray'](_0x4c7460[_0x7309c5(0x17e)]))return![];const _0x2cf0df=_0x4c7460['apps'],_0xad62e7=_0x2cf0df[_0x178716[_0x7309c5(0x181)]];if(!_0xad62e7||typeof _0xad62e7!==_0x7309c5(0x18c)||Array[_0x7309c5(0x1a6)](_0xad62e7))return![];if(!_0x178716[_0x7309c5(0x1a3)])return delete _0x2cf0df[_0x178716['alias']],!![];if(!(_0x178716[_0x7309c5(0x1a3)]in _0xad62e7))return![];return delete _0xad62e7[_0x178716[_0x7309c5(0x1a3)]],Object[_0x7309c5(0x198)](_0xad62e7)['length']===0x0&&delete _0x2cf0df[_0x178716[_0x7309c5(0x181)]],!![];}const listDef={'service':a16_0x4eebbe(0x1b3),'command':a16_0x4eebbe(0x187),'description':a16_0x4eebbe(0x19a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x60a0db){const _0x30cd4a=a16_0x4eebbe,{buildConfigFromFlags:_0x30b0f9}=await import('../../context.js'),_0x2fa288=_0x30b0f9({}),_0x25142c=getProjectConfigPath(),_0x3a4bb8=resolveWriteConfigPath(_0x30cd4a(0x186));if(_0x60a0db[_0x30cd4a(0x184)]===_0x30cd4a(0x1ab))return{'ok':!![],'message':_0x30cd4a(0x1a2)+(JSON[_0x30cd4a(0x185)](_0x2fa288[_0x30cd4a(0x1b0)],null,0x2)+'\x0a\x0a')+_0x30cd4a(0x1a5)+('\x20\x20project:\x20'+(_0x25142c??'(none)')+'\x0a')+(_0x30cd4a(0x192)+_0x3a4bb8)};return{'ok':!![],'data':{'effective':_0x2fa288[_0x30cd4a(0x1b0)],'configFiles':{'project':_0x25142c??null,'global':_0x3a4bb8}}};}},getDef={'service':a16_0x4eebbe(0x1b3),'command':a16_0x4eebbe(0x17b),'description':a16_0x4eebbe(0x1ba),'risk':a16_0x4eebbe(0x1b2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x1316bb){const _0x5872d7=a16_0x4eebbe,_0x3677ca=_0x1316bb[_0x5872d7(0x182)][0x0];if(!_0x3677ca)throw CliErrors[_0x5872d7(0x1b7)]('Missing\x20key\x20argument.',_0x5872d7(0x180)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x1a65c9}=await import(_0x5872d7(0x17d)),{raw:_0x13ff61}=_0x1a65c9({});if(_0x3677ca[_0x5872d7(0x1a8)]('.')){const _0x3ba461=_0x3677ca[_0x5872d7(0x193)]('.');let _0x173ad2=_0x13ff61;for(const _0x7805a5 of _0x3ba461){if(_0x173ad2==null||typeof _0x173ad2!==_0x5872d7(0x18c))throw CliErrors[_0x5872d7(0x1b7)](_0x5872d7(0x1b9)+_0x3677ca);_0x173ad2=_0x173ad2[_0x7805a5];}if(_0x173ad2===undefined)throw CliErrors[_0x5872d7(0x1b7)]('Key\x20not\x20found:\x20'+_0x3677ca);return console[_0x5872d7(0x18e)](typeof _0x173ad2==='object'?JSON[_0x5872d7(0x185)](_0x173ad2,null,0x2):String(_0x173ad2)),{'ok':!![]};}const _0x58bc37=_0x13ff61[_0x3677ca];if(_0x58bc37===undefined)throw CliErrors[_0x5872d7(0x1b7)](_0x5872d7(0x1b9)+_0x3677ca);return console[_0x5872d7(0x18e)](typeof _0x58bc37===_0x5872d7(0x18c)?JSON['stringify'](_0x58bc37,null,0x2):String(_0x58bc37)),{'ok':!![]};}},setDef={'service':'config','command':a16_0x4eebbe(0x1be),'description':a16_0x4eebbe(0x1aa),'risk':a16_0x4eebbe(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a16_0x4eebbe(0x1a9),'description':a16_0x4eebbe(0x17f),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1b6a34){const _0x5e7be8=a16_0x4eebbe,_0x44e978=_0x1b6a34[_0x5e7be8(0x182)][0x0],_0x27ecb7=_0x1b6a34[_0x5e7be8(0x182)][0x1];if(!_0x44e978||_0x27ecb7===undefined)throw CliErrors[_0x5e7be8(0x1b7)](_0x5e7be8(0x191),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x44e978]&&!ENUM_KEYS[_0x44e978][_0x5e7be8(0x1a8)](_0x27ecb7))throw CliErrors[_0x5e7be8(0x1b7)](_0x5e7be8(0x195)+_0x44e978+_0x5e7be8(0x19e)+ENUM_KEYS[_0x44e978][_0x5e7be8(0x1bc)](',\x20'));if(_0x44e978==='riskLevel')throw CliErrors['validation'](_0x5e7be8(0x194));if(_0x44e978===_0x5e7be8(0x1a7)){const _0x422180=Number(_0x27ecb7);if(isNaN(_0x422180)||_0x422180<=0x0)throw CliErrors[_0x5e7be8(0x1b7)](_0x5e7be8(0x1af));}const _0x32dad7=resolveWriteScope({'explicitGlobal':_0x1b6a34[_0x5e7be8(0x183)](_0x5e7be8(0x186)),'policy':_0x5e7be8(0x1b5)}),_0xba3fa=toScopeFlags(_0x32dad7),_0x22305d=readScopedConfig(_0xba3fa),_0x58a13d=parseAliasAppcodeSetKey(_0x44e978);if(!_0x58a13d&&!isTopLevelConfigKey(_0x44e978))throw CliErrors[_0x5e7be8(0x1b7)](_0x5e7be8(0x1bd)+_0x44e978+_0x5e7be8(0x188),_0x5e7be8(0x19d)+getTopLevelConfigKeySummary()+_0x5e7be8(0x1ac));return _0x58a13d?setLocalAppAlias(_0x22305d,_0x58a13d,_0x27ecb7):_0x22305d[_0x44e978]=_0x44e978==='pageSize'?Number(_0x27ecb7):_0x27ecb7,console[_0x5e7be8(0x18e)]('Set\x20`'+_0x44e978+'`\x20=\x20\x22'+_0x27ecb7+'\x22'+(_0x32dad7===_0x5e7be8(0x186)?'\x20(global)':'')),writeScopedConfig(_0x22305d,_0xba3fa),{'ok':!![]};}},deleteDef={'service':a16_0x4eebbe(0x1b3),'command':a16_0x4eebbe(0x18b),'description':a16_0x4eebbe(0x1b1),'risk':a16_0x4eebbe(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x4eebbe(0x1bb),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4d51e6){const _0x17f8a4=a16_0x4eebbe,_0x45f978=_0x4d51e6[_0x17f8a4(0x182)][0x0];if(!_0x45f978)throw CliErrors[_0x17f8a4(0x1b7)](_0x17f8a4(0x19b),_0x17f8a4(0x180)+CLI_BIN_NAME+_0x17f8a4(0x17c));const _0xf2535f=resolveWriteScope({'explicitGlobal':_0x4d51e6[_0x17f8a4(0x183)](_0x17f8a4(0x186)),'policy':_0x17f8a4(0x1b5)}),_0x3429e6=toScopeFlags(_0xf2535f),_0x46246b=readScopedConfig(_0x3429e6),_0x24f9a7=parseAliasDeleteKey(_0x45f978);if(_0x24f9a7){if(!deleteLocalAppAlias(_0x46246b,_0x24f9a7))throw CliErrors[_0x17f8a4(0x1b7)](_0x17f8a4(0x1b9)+_0x45f978);return console['log'](_0x17f8a4(0x196)+_0x45f978+'`'+(_0xf2535f===_0x17f8a4(0x186)?_0x17f8a4(0x1b8):'')),writeScopedConfig(_0x46246b,_0x3429e6),{'ok':!![]};}if(_0x46246b[_0x45f978]===undefined)throw CliErrors[_0x17f8a4(0x1b7)]('Key\x20\x22'+_0x45f978+_0x17f8a4(0x199));return delete _0x46246b[_0x45f978],console[_0x17f8a4(0x18e)](_0x17f8a4(0x196)+_0x45f978+'`'+(_0xf2535f===_0x17f8a4(0x186)?_0x17f8a4(0x1b8):'')),writeScopedConfig(_0x46246b,_0x3429e6),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- (function(_0xcf186b,_0x282ed8){var _0xdce02f=a17_0x2847,_0xa7c5f9=_0xcf186b();while(!![]){try{var _0x5a0e54=parseInt(_0xdce02f(0x10c))/0x1*(parseInt(_0xdce02f(0x105))/0x2)+parseInt(_0xdce02f(0x109))/0x3+parseInt(_0xdce02f(0x107))/0x4+parseInt(_0xdce02f(0x10d))/0x5+-parseInt(_0xdce02f(0x10b))/0x6*(-parseInt(_0xdce02f(0x10a))/0x7)+parseInt(_0xdce02f(0x10e))/0x8*(-parseInt(_0xdce02f(0x106))/0x9)+-parseInt(_0xdce02f(0x108))/0xa;if(_0x5a0e54===_0x282ed8)break;else _0xa7c5f9['push'](_0xa7c5f9['shift']());}catch(_0x1759b1){_0xa7c5f9['push'](_0xa7c5f9['shift']());}}}(a17_0x1234,0x79d89));import{CLI_BIN_NAME}from'../../constant/cli.js';function a17_0x2847(_0x4e9e96,_0x1c0254){_0x4e9e96=_0x4e9e96-0x105;var _0x1234f8=a17_0x1234();var _0x284722=_0x1234f8[_0x4e9e96];return _0x284722;}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_0x1234(){var _0x590b6a=['4532KdjORQ','531351vqxifH','2227428oGgKaq','24602720LSItTB','2951715RXifJf','707lBxHcG','38118iDPTFR','409BADkUs','3088255kDKmxz','104VnJmvh'];a17_0x1234=function(){return _0x590b6a;};return a17_0x1234();}
1
+ (function(_0x176a50,_0x41af56){var _0x56ed94=a17_0x5c8e,_0x437eba=_0x176a50();while(!![]){try{var _0x2af7ce=parseInt(_0x56ed94(0x128))/0x1*(-parseInt(_0x56ed94(0x122))/0x2)+-parseInt(_0x56ed94(0x129))/0x3+parseInt(_0x56ed94(0x126))/0x4+-parseInt(_0x56ed94(0x121))/0x5+parseInt(_0x56ed94(0x127))/0x6+-parseInt(_0x56ed94(0x125))/0x7*(parseInt(_0x56ed94(0x124))/0x8)+parseInt(_0x56ed94(0x123))/0x9;if(_0x2af7ce===_0x41af56)break;else _0x437eba['push'](_0x437eba['shift']());}catch(_0x84c3da){_0x437eba['push'](_0x437eba['shift']());}}}(a17_0x332b,0xe10bd));import{CLI_BIN_NAME}from'../../constant/cli.js';function a17_0x5c8e(_0x573abf,_0x2eacc6){_0x573abf=_0x573abf-0x121;var _0x332b49=a17_0x332b();var _0x5c8edb=_0x332b49[_0x573abf];return _0x5c8edb;}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_0x332b(){var _0x2cf3fb=['16mNWDCS','1350139mhdvkU','3731628LLZlRq','4516338InwdRl','1memknt','2315421DIIWtl','983135HtjKgu','2041576cDynKs','14500215tvJuWG'];a17_0x332b=function(){return _0x2cf3fb;};return a17_0x332b();}
@@ -1 +1 @@
1
- const a18_0x2436e9=a18_0x56fb;(function(_0x4b0e92,_0x432a71){const _0x179cce=a18_0x56fb,_0x568442=_0x4b0e92();while(!![]){try{const _0xf054de=parseInt(_0x179cce(0x16c))/0x1*(-parseInt(_0x179cce(0x18a))/0x2)+-parseInt(_0x179cce(0x147))/0x3+-parseInt(_0x179cce(0x139))/0x4*(-parseInt(_0x179cce(0x137))/0x5)+-parseInt(_0x179cce(0x164))/0x6+parseInt(_0x179cce(0x166))/0x7*(-parseInt(_0x179cce(0x185))/0x8)+parseInt(_0x179cce(0x16e))/0x9+parseInt(_0x179cce(0x146))/0xa;if(_0xf054de===_0x432a71)break;else _0x568442['push'](_0x568442['shift']());}catch(_0x190c3f){_0x568442['push'](_0x568442['shift']());}}}(a18_0x1c3a,0xe0b4b));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';function a18_0x1c3a(){const _0x44ed8e=['params','\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$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','5aWpXCL','write','5884364trnqGA','\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\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\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\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}','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','command','description','13538990TdLFYX','4129761XELZLN','str','\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}}','now','getOne','Update\x20an\x20existing\x20record','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--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','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','body','aggregate','code','build','\x20on\x20dataset\x20','paramsRequired','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','delete','data','\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\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}}','\x20\x20PAGINATION','paramsHint','\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}}','risk','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','read','\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$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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','4719126WCKzfJ','create','139090rJssaV','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','POST','\x20\x20AGGREGATE\x20TYPES','\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','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','6879CnTDHy','\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}','16269966hgdlqA','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','operation','high-risk-write','\x20\x20EXAMPLES','\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}','join','\x20\x20LOGICAL\x20COMBINATORS','\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}}','update','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','filter','\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\x20PARAMS\x20STRUCTURE','data\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20completed\x20in\x20','\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}}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','dryRun','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','128MoAyjh','batchCreate','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\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}','358BaeyTI','\x20\x20WHERE\x20OPERATORS','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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}}'];a18_0x1c3a=function(){return _0x44ed8e;};return a18_0x1c3a();}const specs=[{'command':a18_0x2436e9(0x17a),'operation':a18_0x2436e9(0x17a),'risk':a18_0x2436e9(0x160),'paramsRequired':![],'description':a18_0x2436e9(0x187),'paramsHint':a18_0x2436e9(0x140)+a18_0x2436e9(0x184),'helpExtra':[a18_0x2436e9(0x18b),a18_0x2436e9(0x15d),a18_0x2436e9(0x161),a18_0x2436e9(0x16f),a18_0x2436e9(0x177),a18_0x2436e9(0x13a),a18_0x2436e9(0x180),a18_0x2436e9(0x159),a18_0x2436e9(0x135),a18_0x2436e9(0x18d),a18_0x2436e9(0x15a),'',a18_0x2436e9(0x176),'\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}}]}',a18_0x2436e9(0x162),'',a18_0x2436e9(0x163),a18_0x2436e9(0x134),a18_0x2436e9(0x170),a18_0x2436e9(0x17b),a18_0x2436e9(0x167),a18_0x2436e9(0x188),'',a18_0x2436e9(0x15b),a18_0x2436e9(0x15f),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a18_0x2436e9(0x13f)][a18_0x2436e9(0x175)]('\x0a')},{'command':a18_0x2436e9(0x14b),'operation':a18_0x2436e9(0x14b),'risk':'read','paramsRequired':!![],'description':a18_0x2436e9(0x142),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a18_0x2436e9(0x165),'operation':a18_0x2436e9(0x165),'risk':a18_0x2436e9(0x138),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a18_0x2436e9(0x13c)},{'command':'batchCreate','operation':a18_0x2436e9(0x186),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a18_0x2436e9(0x14d)},{'command':a18_0x2436e9(0x178),'operation':a18_0x2436e9(0x178),'risk':'write','paramsRequired':!![],'description':a18_0x2436e9(0x14c),'paramsHint':a18_0x2436e9(0x136)},{'command':a18_0x2436e9(0x157),'operation':a18_0x2436e9(0x157),'risk':a18_0x2436e9(0x172),'paramsRequired':!![],'description':a18_0x2436e9(0x179),'paramsHint':a18_0x2436e9(0x143)},{'command':a18_0x2436e9(0x151),'operation':a18_0x2436e9(0x151),'risk':a18_0x2436e9(0x160),'paramsRequired':![],'description':a18_0x2436e9(0x181),'paramsHint':a18_0x2436e9(0x18c)+a18_0x2436e9(0x16b),'helpExtra':[a18_0x2436e9(0x169),a18_0x2436e9(0x141),a18_0x2436e9(0x13b),a18_0x2436e9(0x13e),a18_0x2436e9(0x189),'\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_0x2436e9(0x16d),a18_0x2436e9(0x174),'',a18_0x2436e9(0x17c),'\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]',a18_0x2436e9(0x17e),a18_0x2436e9(0x14f),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a18_0x2436e9(0x149),a18_0x2436e9(0x182),'',a18_0x2436e9(0x173),a18_0x2436e9(0x13d),a18_0x2436e9(0x16a),'',a18_0x2436e9(0x156),a18_0x2436e9(0x14e)][a18_0x2436e9(0x175)]('\x0a')}];function a18_0x56fb(_0x470258,_0x4e80b4){_0x470258=_0x470258-0x133;const _0x1c3ae4=a18_0x1c3a();let _0x56fb22=_0x1c3ae4[_0x470258];return _0x56fb22;}function makeDataCommand(_0x3c6402){const _0x515d72=a18_0x2436e9,_0x270150=_0x515d72(0x17d)+_0x3c6402[_0x515d72(0x144)],_0x584e19={'service':_0x515d72(0x158),'command':_0x3c6402[_0x515d72(0x144)],'description':_0x3c6402[_0x515d72(0x145)],'risk':_0x3c6402[_0x515d72(0x15e)],'helpExtra':_0x3c6402['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x3c6402[_0x515d72(0x15c)]}],'validate':async _0x456450=>{const _0x42a163=_0x515d72;_0x3c6402[_0x42a163(0x155)]&&requireAnyOf(_0x456450,['params'],_0x270150),_0x3c6402[_0x42a163(0x171)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x456450[_0x42a163(0x148)](_0x42a163(0x133))));},async 'execute'(_0x40353b){const _0x4048d7=_0x515d72,_0x435989=_0x40353b[_0x4048d7(0x148)](_0x4048d7(0x152)),_0x4a7281=_0x3c6402[_0x4048d7(0x171)]===_0x4048d7(0x186)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x40353b[_0x4048d7(0x148)](_0x4048d7(0x133)))):parseJsonParams(_0x40353b['str']('params'))??{},_0x3db28e=Date[_0x4048d7(0x14a)](),_0x2e4fda=await executeData(_0x435989,_0x3c6402[_0x4048d7(0x171)],_0x4a7281),_0x3d0712=Date[_0x4048d7(0x14a)]()-_0x3db28e;return{'ok':!![],'data':{'result':_0x2e4fda,'elapsed':_0x3d0712},'message':_0x4048d7(0x17d)+_0x3c6402[_0x4048d7(0x144)]+_0x4048d7(0x17f)+_0x3d0712+'ms'};}};return _0x3c6402['risk']!=='read'&&(_0x584e19[_0x515d72(0x183)]=async _0x1e9a1c=>{const _0x1e5c0f=_0x515d72,_0x5de11c=_0x1e9a1c[_0x1e5c0f(0x148)]('code'),_0x4aa955=_0x3c6402[_0x1e5c0f(0x171)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e9a1c['str'](_0x1e5c0f(0x133)))):parseJsonParams(_0x1e9a1c[_0x1e5c0f(0x148)](_0x1e5c0f(0x133)))??{};return dryRun(_0x1e5c0f(0x168),'/api/{appCode}/'+_0x5de11c+'/'+_0x3c6402['operation'])[_0x1e5c0f(0x150)](_0x4aa955)[_0x1e5c0f(0x145)]('Preview:\x20data\x20'+_0x3c6402[_0x1e5c0f(0x144)]+_0x1e5c0f(0x154)+_0x5de11c)[_0x1e5c0f(0x153)]();}),_0x584e19;}export const dataDefinitions=specs['map'](makeDataCommand);
1
+ const a18_0xbaf1e8=a18_0x5409;function a18_0x5409(_0x50366b,_0x31603a){_0x50366b=_0x50366b-0xfc;const _0x2ab4c7=a18_0x2ab4();let _0x540955=_0x2ab4c7[_0x50366b];return _0x540955;}(function(_0x5a95f7,_0x1987b0){const _0x500ce5=a18_0x5409,_0xf10819=_0x5a95f7();while(!![]){try{const _0x746cc0=parseInt(_0x500ce5(0x103))/0x1*(-parseInt(_0x500ce5(0x124))/0x2)+parseInt(_0x500ce5(0x120))/0x3+parseInt(_0x500ce5(0x112))/0x4+parseInt(_0x500ce5(0x10a))/0x5*(-parseInt(_0x500ce5(0x13c))/0x6)+-parseInt(_0x500ce5(0x12f))/0x7*(-parseInt(_0x500ce5(0x12e))/0x8)+-parseInt(_0x500ce5(0x12a))/0x9+parseInt(_0x500ce5(0x11a))/0xa*(parseInt(_0x500ce5(0x10f))/0xb);if(_0x746cc0===_0x1987b0)break;else _0xf10819['push'](_0xf10819['shift']());}catch(_0x3d816e){_0xf10819['push'](_0xf10819['shift']());}}}(a18_0x2ab4,0x98e7a));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';function a18_0x2ab4(){const _0x2a3788=['description','high-risk-write','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','POST','\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','\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\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','dryRun','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','5819484vahJnO','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\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}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','now','\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\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','Get\x20a\x20single\x20record\x20by\x20ID','\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}}]}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','getOne','params','\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}}','delete','Update\x20an\x20existing\x20record','code','\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}}','update','operation','\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','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','risk','\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}}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','227543YvyFeX','str','\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\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\x20WHERE\x20OPERATORS','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','batchCreate','5RZDJOV','create','body','\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$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]}}','2025133qYYjsv','\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}}','command','4530384pudKse','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','write','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','join','\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}','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','10RiuHFz','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20AGGREGATE\x20TYPES','\x20on\x20dataset\x20','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\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}','2774988AtkQLh','read','data\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}]','2GLLDOz','\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\x20EXAMPLES','filter','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\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}}','5218695XAMqpy','\x20completed\x20in\x20','map','paramsHint','4888LseWdt','1855BEmRmG','\x20\x20PAGINATION','data'];a18_0x2ab4=function(){return _0x2a3788;};return a18_0x2ab4();}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a18_0xbaf1e8(0x127),'risk':a18_0xbaf1e8(0x121),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a18_0xbaf1e8(0x13f)+a18_0xbaf1e8(0x102),'helpExtra':[a18_0xbaf1e8(0x107),a18_0xbaf1e8(0x14c),a18_0xbaf1e8(0x106),'\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_0xbaf1e8(0x13e),a18_0xbaf1e8(0x141),a18_0xbaf1e8(0x148),a18_0xbaf1e8(0x10e),a18_0xbaf1e8(0x129),a18_0xbaf1e8(0x101),'\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}}','','\x20\x20LOGICAL\x20COMBINATORS',a18_0xbaf1e8(0x105),a18_0xbaf1e8(0x144),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a18_0xbaf1e8(0x138),a18_0xbaf1e8(0x123),a18_0xbaf1e8(0x115),a18_0xbaf1e8(0x134),'',a18_0xbaf1e8(0x130),'\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a18_0xbaf1e8(0x142)][a18_0xbaf1e8(0x117)]('\x0a')},{'command':a18_0xbaf1e8(0x146),'operation':a18_0xbaf1e8(0x146),'risk':a18_0xbaf1e8(0x121),'paramsRequired':!![],'description':a18_0xbaf1e8(0x143),'paramsHint':a18_0xbaf1e8(0x145)},{'command':a18_0xbaf1e8(0x10b),'operation':a18_0xbaf1e8(0x10b),'risk':'write','paramsRequired':!![],'description':a18_0xbaf1e8(0x11e),'paramsHint':a18_0xbaf1e8(0xff)},{'command':'batchCreate','operation':'batchCreate','risk':a18_0xbaf1e8(0x114),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a18_0xbaf1e8(0xfc),'operation':'update','risk':'write','paramsRequired':!![],'description':a18_0xbaf1e8(0x14a),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a18_0xbaf1e8(0x149),'operation':a18_0xbaf1e8(0x149),'risk':a18_0xbaf1e8(0x133),'paramsRequired':!![],'description':a18_0xbaf1e8(0x113),'paramsHint':a18_0xbaf1e8(0x145)},{'command':'aggregate','operation':'aggregate','risk':a18_0xbaf1e8(0x121),'paramsRequired':![],'description':a18_0xbaf1e8(0x135),'paramsHint':a18_0xbaf1e8(0x116)+a18_0xbaf1e8(0x119),'helpExtra':[a18_0xbaf1e8(0x11c),'\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}',a18_0xbaf1e8(0x118),a18_0xbaf1e8(0x10d),a18_0xbaf1e8(0x11f),'\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_0xbaf1e8(0x125),'\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\x20PARAMS\x20STRUCTURE','\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]',a18_0xbaf1e8(0x139),a18_0xbaf1e8(0x108),a18_0xbaf1e8(0x128),a18_0xbaf1e8(0x110),a18_0xbaf1e8(0x13d),'',a18_0xbaf1e8(0x126),a18_0xbaf1e8(0x11b),a18_0xbaf1e8(0x137),'',a18_0xbaf1e8(0x13b),a18_0xbaf1e8(0xfe)][a18_0xbaf1e8(0x117)]('\x0a')}];function makeDataCommand(_0x7f5ee8){const _0x51e580=a18_0xbaf1e8,_0x3944e0=_0x51e580(0x122)+_0x7f5ee8[_0x51e580(0x111)],_0x57c182={'service':_0x51e580(0x131),'command':_0x7f5ee8[_0x51e580(0x111)],'description':_0x7f5ee8[_0x51e580(0x132)],'risk':_0x7f5ee8[_0x51e580(0x100)],'helpExtra':_0x7f5ee8['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x7f5ee8[_0x51e580(0x12d)]}],'validate':async _0x54dff8=>{const _0x578766=_0x51e580;_0x7f5ee8['paramsRequired']&&requireAnyOf(_0x54dff8,[_0x578766(0x147)],_0x3944e0),_0x7f5ee8[_0x578766(0xfd)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x54dff8['str'](_0x578766(0x147))));},async 'execute'(_0xc22f67){const _0x3aed28=_0x51e580,_0x568bf9=_0xc22f67[_0x3aed28(0x104)](_0x3aed28(0x14b)),_0x2e2205=_0x7f5ee8[_0x3aed28(0xfd)]===_0x3aed28(0x109)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xc22f67[_0x3aed28(0x104)](_0x3aed28(0x147)))):parseJsonParams(_0xc22f67['str'](_0x3aed28(0x147)))??{},_0x2b3a26=Date[_0x3aed28(0x140)](),_0x2bda1c=await executeData(_0x568bf9,_0x7f5ee8[_0x3aed28(0xfd)],_0x2e2205),_0x3e09f7=Date[_0x3aed28(0x140)]()-_0x2b3a26;return{'ok':!![],'data':{'result':_0x2bda1c,'elapsed':_0x3e09f7},'message':_0x3aed28(0x122)+_0x7f5ee8[_0x3aed28(0x111)]+_0x3aed28(0x12b)+_0x3e09f7+'ms'};}};return _0x7f5ee8['risk']!==_0x51e580(0x121)&&(_0x57c182[_0x51e580(0x13a)]=async _0x49f1bd=>{const _0x5e6ff0=_0x51e580,_0x361b23=_0x49f1bd[_0x5e6ff0(0x104)](_0x5e6ff0(0x14b)),_0x116042=_0x7f5ee8['operation']===_0x5e6ff0(0x109)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x49f1bd[_0x5e6ff0(0x104)](_0x5e6ff0(0x147)))):parseJsonParams(_0x49f1bd[_0x5e6ff0(0x104)](_0x5e6ff0(0x147)))??{};return dryRun(_0x5e6ff0(0x136),'/api/{appCode}/'+_0x361b23+'/'+_0x7f5ee8[_0x5e6ff0(0xfd)])[_0x5e6ff0(0x10c)](_0x116042)[_0x5e6ff0(0x132)]('Preview:\x20data\x20'+_0x7f5ee8[_0x5e6ff0(0x111)]+_0x5e6ff0(0x11d)+_0x361b23)['build']();}),_0x57c182;}export const dataDefinitions=specs[a18_0xbaf1e8(0x12c)](makeDataCommand);
@@ -1 +1 @@
1
- const a19_0x2f92f0=a19_0x1927;(function(_0x2d9fd6,_0xac24f7){const _0x35e412=a19_0x1927,_0x5c37a3=_0x2d9fd6();while(!![]){try{const _0x196a71=parseInt(_0x35e412(0x184))/0x1+parseInt(_0x35e412(0x189))/0x2+parseInt(_0x35e412(0x162))/0x3*(-parseInt(_0x35e412(0x178))/0x4)+-parseInt(_0x35e412(0x172))/0x5*(parseInt(_0x35e412(0x177))/0x6)+parseInt(_0x35e412(0x14c))/0x7+parseInt(_0x35e412(0x146))/0x8+-parseInt(_0x35e412(0x17c))/0x9;if(_0x196a71===_0xac24f7)break;else _0x5c37a3['push'](_0x5c37a3['shift']());}catch(_0x1f23bc){_0x5c37a3['push'](_0x5c37a3['shift']());}}}(a19_0x2bbe,0x83ba8));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x34372d){const _0x2d66a0=a19_0x1927;if(_0x34372d[_0x2d66a0(0x14d)])return null;const _0x2ee7f1=Boolean(_0x34372d[_0x2d66a0(0x163)]!==undefined||_0x34372d['doType']!==undefined);let _0x14eef3={};if(!_0x2ee7f1&&typeof _0x34372d[_0x2d66a0(0x188)]===_0x2d66a0(0x174))try{_0x14eef3=JSON[_0x2d66a0(0x187)](_0x34372d[_0x2d66a0(0x188)]);}catch{}const _0x12cdc8=_0x2ee7f1?_0x34372d[_0x2d66a0(0x157)]:_0x34372d[_0x2d66a0(0x167)],_0x2a2fa3=_0x2ee7f1?_0x34372d[_0x2d66a0(0x163)]:_0x34372d[_0x2d66a0(0x157)],_0x491d52=_0x2ee7f1?_0x34372d[_0x2d66a0(0x15a)]:_0x34372d['type']||_0x34372d['dataType'],_0x2870dc=_0x2ee7f1?_0x34372d[_0x2d66a0(0x183)]===!![]:_0x14eef3[_0x2d66a0(0x183)]===!![],_0x4c9873=_0x2ee7f1?_0x34372d[_0x2d66a0(0x16d)]===!![]:_0x14eef3[_0x2d66a0(0x16d)]===!![],_0x4bdbd6=_0x2ee7f1?_0x34372d[_0x2d66a0(0x165)]??null:_0x14eef3[_0x2d66a0(0x165)]??null,_0x365b15={'name':_0x12cdc8,'displayName':_0x2a2fa3||_0x12cdc8,'type':_0x491d52,'dbType':_0x34372d[_0x2d66a0(0x161)],'pk':_0x2870dc,'required':_0x4c9873,'description':_0x34372d['description']||undefined};return Array[_0x2d66a0(0x175)](_0x4bdbd6)&&_0x4bdbd6[_0x2d66a0(0x164)]>0x0&&(_0x365b15['options']=_0x4bdbd6),_0x365b15;}function parseJsonMaybe(_0x5cf4ac){const _0x18a195=a19_0x1927;if(typeof _0x5cf4ac!==_0x18a195(0x174))return _0x5cf4ac;try{return JSON[_0x18a195(0x187)](_0x5cf4ac);}catch{return _0x5cf4ac;}}function normalizeOperationEntry(_0x4b3f63,_0x129760){const _0x2bcff1=a19_0x1927;if(!_0x129760||typeof _0x129760!==_0x2bcff1(0x180))return null;if(!_0x129760[_0x2bcff1(0x147)]||!_0x129760[_0x2bcff1(0x16b)])return null;const _0x5d784e={'name':_0x4b3f63,'method':_0x129760[_0x2bcff1(0x147)],'path':_0x129760[_0x2bcff1(0x16b)]};if(_0x129760[_0x2bcff1(0x16e)])_0x5d784e['host']=_0x129760[_0x2bcff1(0x16e)];if(_0x129760[_0x2bcff1(0x17e)]!=null)_0x5d784e['requestBody']=parseJsonMaybe(_0x129760[_0x2bcff1(0x17e)]);if(_0x129760['responseBody']!=null)_0x5d784e[_0x2bcff1(0x149)]=parseJsonMaybe(_0x129760['responseBody']);if(_0x129760[_0x2bcff1(0x155)]!=null)_0x5d784e[_0x2bcff1(0x155)]=_0x129760[_0x2bcff1(0x155)];if(_0x129760[_0x2bcff1(0x144)]!=null)_0x5d784e['afterScriptId']=_0x129760[_0x2bcff1(0x144)];if(Array[_0x2bcff1(0x175)](_0x129760[_0x2bcff1(0x182)]))_0x5d784e['requestFields']=_0x129760[_0x2bcff1(0x182)];if(Array[_0x2bcff1(0x175)](_0x129760[_0x2bcff1(0x141)]))_0x5d784e[_0x2bcff1(0x141)]=_0x129760[_0x2bcff1(0x141)];return _0x5d784e;}function a19_0x1927(_0x1ef5d3,_0x49d78d){_0x1ef5d3=_0x1ef5d3-0x13d;const _0x2bbe0a=a19_0x2bbe();let _0x1927ad=_0x2bbe0a[_0x1ef5d3];return _0x1927ad;}function summarizeDbtable(_0x52baf7){const _0x452d8c=a19_0x1927,_0x39dd1e={},_0x2ec81a=[_0x452d8c(0x169),'dbName','tableName',_0x452d8c(0x186),_0x452d8c(0x183),_0x452d8c(0x17f),'logicField',_0x452d8c(0x185),_0x452d8c(0x143),'creatorIdField',_0x452d8c(0x170),'modifierIdField',_0x452d8c(0x14a),'labelField','dblinkInfoDTO'];for(const _0x1fdb20 of _0x2ec81a){if(_0x52baf7[_0x1fdb20]!==undefined)_0x39dd1e[_0x1fdb20]=_0x52baf7[_0x1fdb20];}return typeof _0x39dd1e['allFields']==='string'&&_0x39dd1e[_0x452d8c(0x17f)][_0x452d8c(0x164)]>0x0&&(_0x39dd1e['allFieldNames']=_0x39dd1e[_0x452d8c(0x17f)][_0x452d8c(0x171)](',')['map'](_0x33d67b=>_0x33d67b['trim']())['filter'](Boolean)),_0x39dd1e;}function normalizeRelatedPages(_0x48d6b4){const _0x394234=a19_0x1927;if(!Array[_0x394234(0x175)](_0x48d6b4))return[];return _0x48d6b4[_0x394234(0x181)](_0x33d415=>_0x33d415&&typeof _0x33d415===_0x394234(0x180))[_0x394234(0x15f)](_0x1ccea1=>({'id':_0x1ccea1['id'],'type':_0x1ccea1[_0x394234(0x17d)],'code':_0x1ccea1[_0x394234(0x167)],'title':_0x1ccea1[_0x394234(0x13d)],'deleted':_0x1ccea1[_0x394234(0x14d)]===!![]}));}function a19_0x2bbe(){const _0x4f88cc=['587813OiLZWk','createTimeField','datasetKey','parse','extend','1377502fullHK','title','entries','str','toTableName','responseFields','dataset','updateTimeField','afterScriptId','sourceType','1967624euQOmn','method','relations','responseBody','modifierNameField','validateRules','4621071OclVfO','deleted','modelCode','operations','toDatasetName','doVersion','formatRules','detail','fromField','beforeScriptId','fields','name','columnCodeListWithDeleted','toField','doType','modelId','dbName','source','tableName','map','appCode','dbType','3MINzol','displayName','length','options','tableComment','code','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dbId','find','path','read','required','host','properties','creatorNameField','split','1359235duRUnP','dbtableConfig','string','isArray','push','12FEmQMT','1563348nUFcEo','relatedPageInfoList','indexes','toDatasetCode','6377211uLlGkV','type','requestBody','allFields','object','filter','requestFields','pkField'];a19_0x2bbe=function(){return _0x4f88cc;};return a19_0x2bbe();}function normalizeFallbackFieldName(_0x2c7694,_0xb49a9e){const _0x5dc812=_0x2c7694['trim']();if(!_0x5dc812)return null;return{'name':_0x5dc812,'displayName':_0x5dc812,'type':undefined,'dbType':undefined,'pk':_0x5dc812===_0xb49a9e,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4b30d4,_0x1af513){const _0x32bfb7=a19_0x1927;if(!_0x4b30d4||!_0x1af513)return[];try{const _0x1109a5=await listDatasets(_0x4b30d4,{'code':_0x1af513}),_0x299245=_0x1109a5[_0x32bfb7(0x16a)](_0x42ed0a=>_0x42ed0a['code']===_0x1af513)??_0x1109a5[0x0],_0x366ac8=_0x299245?.[_0x32bfb7(0x173)]??{},_0x468e87=typeof _0x366ac8['allFields']==='string'?_0x366ac8[_0x32bfb7(0x17f)][_0x32bfb7(0x171)](','):[];return _0x468e87['map'](_0x256ffd=>normalizeFallbackFieldName(_0x256ffd,_0x366ac8['pkField']))['filter'](_0x36ee85=>_0x36ee85!==null);}catch{return[];}}export const datasetDetail={'service':a19_0x2f92f0(0x142),'command':a19_0x2f92f0(0x153),'description':a19_0x2f92f0(0x168),'risk':a19_0x2f92f0(0x16c),'flags':[CODE_FLAG],async 'execute'(_0x2c5e5b){const _0xc1062a=a19_0x2f92f0,_0x1c83e1=await getDatasetDetail(_0x2c5e5b[_0xc1062a(0x13f)](_0xc1062a(0x167))),_0x2ee4a3=Array['isArray'](_0x1c83e1[_0xc1062a(0x156)])?_0x1c83e1['fields']:Array[_0xc1062a(0x175)](_0x1c83e1[_0xc1062a(0x16f)])?_0x1c83e1[_0xc1062a(0x16f)]:[];let _0x5cb3dc=_0x2ee4a3[_0xc1062a(0x15f)](_0x329a2b=>normalizeField(_0x329a2b))[_0xc1062a(0x181)](_0x31e80b=>_0x31e80b!==null);_0x5cb3dc['length']===0x0&&(_0x5cb3dc=await loadListFieldFallback(_0x2c5e5b[_0xc1062a(0x160)],_0x2c5e5b[_0xc1062a(0x13f)]('code')));const _0x4a9dea=_0x1c83e1[_0xc1062a(0x14f)]??{},_0x899efd=[];for(const [_0x27ac95,_0x5bba60]of Object[_0xc1062a(0x13e)](_0x4a9dea)){const _0x1dfb40=normalizeOperationEntry(_0x27ac95,_0x5bba60);if(_0x1dfb40)_0x899efd[_0xc1062a(0x176)](_0x1dfb40);}const _0x34b6dd=_0x1c83e1[_0xc1062a(0x173)]??{},_0x8dbe8b=_0x1c83e1[_0xc1062a(0x142)]??{},_0x34823f=_0x34b6dd[_0xc1062a(0x169)]!=null?{'id':_0x34b6dd['dbId'],'name':_0x34b6dd[_0xc1062a(0x15c)]??null}:undefined;let _0x4ea887;return typeof _0x1c83e1[_0xc1062a(0x188)]===_0xc1062a(0x174)&&(_0x4ea887=parseJsonMaybe(_0x1c83e1['extend'])),{'ok':!![],'data':{'id':_0x1c83e1[_0xc1062a(0x15b)]??_0x1c83e1['id'],'name':_0x1c83e1[_0xc1062a(0x157)],'code':_0x1c83e1[_0xc1062a(0x14e)]||_0x1c83e1['code'],'doVersion':_0x1c83e1[_0xc1062a(0x151)],'description':_0x1c83e1['description']||_0x8dbe8b[_0xc1062a(0x166)]||undefined,'source':_0x1c83e1[_0xc1062a(0x15d)]||_0x8dbe8b[_0xc1062a(0x145)],'table':_0x34b6dd[_0xc1062a(0x15e)]||_0x8dbe8b[_0xc1062a(0x15e)],'datasetKey':_0x34b6dd[_0xc1062a(0x186)],'pk':_0x34b6dd[_0xc1062a(0x183)],'db':_0x34823f,'dbtable':summarizeDbtable(_0x34b6dd),'fields':_0x5cb3dc,'operations':_0x899efd,'indexes':Array[_0xc1062a(0x175)](_0x8dbe8b[_0xc1062a(0x17a)])?_0x8dbe8b['indexes']:[],'relations':Array[_0xc1062a(0x175)](_0x1c83e1[_0xc1062a(0x148)])?_0x1c83e1[_0xc1062a(0x148)][_0xc1062a(0x15f)](_0x8e59ff=>({'fromField':_0x8e59ff[_0xc1062a(0x154)],'toDataset':_0x8e59ff[_0xc1062a(0x150)],'toCode':_0x8e59ff[_0xc1062a(0x17b)],'toTable':_0x8e59ff[_0xc1062a(0x140)],'toField':_0x8e59ff[_0xc1062a(0x159)],'labelField':_0x8e59ff['toFieldLabel']||undefined})):[],'relatedPages':normalizeRelatedPages(_0x1c83e1[_0xc1062a(0x179)]),...Array[_0xc1062a(0x175)](_0x1c83e1['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x1c83e1[_0xc1062a(0x158)]}:{},'formatRules':Array['isArray'](_0x1c83e1[_0xc1062a(0x152)])?_0x1c83e1[_0xc1062a(0x152)]:[],'validateRules':Array['isArray'](_0x1c83e1[_0xc1062a(0x14b)])?_0x1c83e1[_0xc1062a(0x14b)]:[],..._0x4ea887!==undefined?{'extend':_0x4ea887}:{},'stats':{'fieldCount':_0x5cb3dc['length'],'operationCount':_0x899efd['length']}}};}};
1
+ const a19_0x486643=a19_0x19e6;(function(_0x4a92f9,_0x253837){const _0x28eec1=a19_0x19e6,_0x37ee77=_0x4a92f9();while(!![]){try{const _0x2e67b9=parseInt(_0x28eec1(0x118))/0x1*(parseInt(_0x28eec1(0xfa))/0x2)+-parseInt(_0x28eec1(0xf7))/0x3*(parseInt(_0x28eec1(0x107))/0x4)+parseInt(_0x28eec1(0xe7))/0x5*(parseInt(_0x28eec1(0xfb))/0x6)+parseInt(_0x28eec1(0xd8))/0x7+parseInt(_0x28eec1(0x10e))/0x8*(parseInt(_0x28eec1(0x10f))/0x9)+parseInt(_0x28eec1(0x10c))/0xa+-parseInt(_0x28eec1(0x10a))/0xb;if(_0x2e67b9===_0x253837)break;else _0x37ee77['push'](_0x37ee77['shift']());}catch(_0x1e713d){_0x37ee77['push'](_0x37ee77['shift']());}}}(a19_0x1eb4,0x3edb6));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x3b4fdd){const _0x2d6376=a19_0x19e6;if(_0x3b4fdd[_0x2d6376(0x108)])return null;const _0x25fe39=Boolean(_0x3b4fdd[_0x2d6376(0xf8)]!==undefined||_0x3b4fdd[_0x2d6376(0x100)]!==undefined);let _0x40e3db={};if(!_0x25fe39&&typeof _0x3b4fdd[_0x2d6376(0x101)]===_0x2d6376(0x115))try{_0x40e3db=JSON[_0x2d6376(0x112)](_0x3b4fdd[_0x2d6376(0x101)]);}catch{}const _0x5a385d=_0x25fe39?_0x3b4fdd[_0x2d6376(0xe8)]:_0x3b4fdd[_0x2d6376(0xd7)],_0x5ae1a5=_0x25fe39?_0x3b4fdd[_0x2d6376(0xf8)]:_0x3b4fdd[_0x2d6376(0xe8)],_0x5135e4=_0x25fe39?_0x3b4fdd[_0x2d6376(0x100)]:_0x3b4fdd[_0x2d6376(0x117)]||_0x3b4fdd['dataType'],_0xe3496d=_0x25fe39?_0x3b4fdd[_0x2d6376(0xcb)]===!![]:_0x40e3db[_0x2d6376(0xcb)]===!![],_0x4366cb=_0x25fe39?_0x3b4fdd[_0x2d6376(0x104)]===!![]:_0x40e3db[_0x2d6376(0x104)]===!![],_0x4b9587=_0x25fe39?_0x3b4fdd[_0x2d6376(0xec)]??null:_0x40e3db['options']??null,_0x295a36={'name':_0x5a385d,'displayName':_0x5ae1a5||_0x5a385d,'type':_0x5135e4,'dbType':_0x3b4fdd[_0x2d6376(0xcf)],'pk':_0xe3496d,'required':_0x4366cb,'description':_0x3b4fdd[_0x2d6376(0xeb)]||undefined};return Array[_0x2d6376(0xf4)](_0x4b9587)&&_0x4b9587[_0x2d6376(0xd4)]>0x0&&(_0x295a36[_0x2d6376(0xec)]=_0x4b9587),_0x295a36;}function parseJsonMaybe(_0x9bc0b8){if(typeof _0x9bc0b8!=='string')return _0x9bc0b8;try{return JSON['parse'](_0x9bc0b8);}catch{return _0x9bc0b8;}}function normalizeOperationEntry(_0x335d36,_0x3b5836){const _0x3584d8=a19_0x19e6;if(!_0x3b5836||typeof _0x3b5836!==_0x3584d8(0x10d))return null;if(!_0x3b5836[_0x3584d8(0xdd)]||!_0x3b5836['path'])return null;const _0x3cfccc={'name':_0x335d36,'method':_0x3b5836[_0x3584d8(0xdd)],'path':_0x3b5836[_0x3584d8(0xdc)]};if(_0x3b5836[_0x3584d8(0xda)])_0x3cfccc[_0x3584d8(0xda)]=_0x3b5836[_0x3584d8(0xda)];if(_0x3b5836['requestBody']!=null)_0x3cfccc[_0x3584d8(0xef)]=parseJsonMaybe(_0x3b5836['requestBody']);if(_0x3b5836[_0x3584d8(0xd3)]!=null)_0x3cfccc[_0x3584d8(0xd3)]=parseJsonMaybe(_0x3b5836['responseBody']);if(_0x3b5836[_0x3584d8(0xf9)]!=null)_0x3cfccc['beforeScriptId']=_0x3b5836[_0x3584d8(0xf9)];if(_0x3b5836[_0x3584d8(0x110)]!=null)_0x3cfccc['afterScriptId']=_0x3b5836[_0x3584d8(0x110)];if(Array['isArray'](_0x3b5836[_0x3584d8(0x102)]))_0x3cfccc[_0x3584d8(0x102)]=_0x3b5836[_0x3584d8(0x102)];if(Array[_0x3584d8(0xf4)](_0x3b5836[_0x3584d8(0x113)]))_0x3cfccc[_0x3584d8(0x113)]=_0x3b5836[_0x3584d8(0x113)];return _0x3cfccc;}function summarizeDbtable(_0x4f9ef9){const _0x1a8b2d=a19_0x19e6,_0x256c11={},_0x51ae37=[_0x1a8b2d(0xfe),'dbName',_0x1a8b2d(0xd6),_0x1a8b2d(0xdb),_0x1a8b2d(0xcb),'allFields',_0x1a8b2d(0xd9),'createTimeField',_0x1a8b2d(0x116),_0x1a8b2d(0xce),_0x1a8b2d(0xf3),_0x1a8b2d(0xd0),'modifierNameField','labelField',_0x1a8b2d(0xee)];for(const _0x1b972f of _0x51ae37){if(_0x4f9ef9[_0x1b972f]!==undefined)_0x256c11[_0x1b972f]=_0x4f9ef9[_0x1b972f];}return typeof _0x256c11[_0x1a8b2d(0xe2)]===_0x1a8b2d(0x115)&&_0x256c11[_0x1a8b2d(0xe2)][_0x1a8b2d(0xd4)]>0x0&&(_0x256c11[_0x1a8b2d(0xf2)]=_0x256c11[_0x1a8b2d(0xe2)][_0x1a8b2d(0xe3)](',')['map'](_0x4c93b7=>_0x4c93b7[_0x1a8b2d(0xd2)]())[_0x1a8b2d(0xd1)](Boolean)),_0x256c11;}function normalizeRelatedPages(_0xfb2e69){const _0x3536e6=a19_0x19e6;if(!Array[_0x3536e6(0xf4)](_0xfb2e69))return[];return _0xfb2e69['filter'](_0x457c2a=>_0x457c2a&&typeof _0x457c2a==='object')[_0x3536e6(0xdf)](_0x4b0328=>({'id':_0x4b0328['id'],'type':_0x4b0328[_0x3536e6(0x117)],'code':_0x4b0328[_0x3536e6(0xd7)],'title':_0x4b0328['title'],'deleted':_0x4b0328['deleted']===!![]}));}function normalizeFallbackFieldName(_0x51d3de,_0x53addb){const _0xfa70e3=_0x51d3de['trim']();if(!_0xfa70e3)return null;return{'name':_0xfa70e3,'displayName':_0xfa70e3,'type':undefined,'dbType':undefined,'pk':_0xfa70e3===_0x53addb,'required':![],'description':undefined};}function a19_0x19e6(_0x59fd94,_0x4ee2b8){_0x59fd94=_0x59fd94-0xcb;const _0x1eb4ef=a19_0x1eb4();let _0x19e6c6=_0x1eb4ef[_0x59fd94];return _0x19e6c6;}function a19_0x1eb4(){const _0x2c9c7a=['updateTimeField','type','13383yqWmAY','pkField','toTableName','source','creatorIdField','dbType','modifierIdField','filter','trim','responseBody','length','dbtableConfig','tableName','code','3319176xGYWNe','logicField','host','datasetKey','path','method','formatRules','map','entries','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','allFields','split','str','modelId','find','2276245HzojfA','name','properties','toFieldLabel','description','options','relatedPageInfoList','dblinkInfoDTO','requestBody','doVersion','indexes','allFieldNames','creatorNameField','isArray','toField','modelCode','891JgbrZp','displayName','beforeScriptId','24ZTrPAD','6pgbrxZ','read','toDatasetCode','dbId','relations','doType','extend','requestFields','validateRules','required','fields','columnCodeListWithDeleted','2216BrAdgp','deleted','toDatasetName','14014033zThTZM','dataset','4146720tDGUCQ','object','272ELcCVl','50643lDAxdh','afterScriptId','operations','parse','responseFields','tableComment','string'];a19_0x1eb4=function(){return _0x2c9c7a;};return a19_0x1eb4();}async function loadListFieldFallback(_0x531f56,_0x5a37d1){const _0x381a40=a19_0x19e6;if(!_0x531f56||!_0x5a37d1)return[];try{const _0x4dcdbb=await listDatasets(_0x531f56,{'code':_0x5a37d1}),_0x4902d1=_0x4dcdbb[_0x381a40(0xe6)](_0xec7db1=>_0xec7db1['code']===_0x5a37d1)??_0x4dcdbb[0x0],_0x297cf0=_0x4902d1?.[_0x381a40(0xd5)]??{},_0x3ec577=typeof _0x297cf0[_0x381a40(0xe2)]===_0x381a40(0x115)?_0x297cf0[_0x381a40(0xe2)][_0x381a40(0xe3)](','):[];return _0x3ec577[_0x381a40(0xdf)](_0x3d6292=>normalizeFallbackFieldName(_0x3d6292,_0x297cf0['pkField']))[_0x381a40(0xd1)](_0x4da5de=>_0x4da5de!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':'detail','description':a19_0x486643(0xe1),'risk':a19_0x486643(0xfc),'flags':[CODE_FLAG],async 'execute'(_0x1c77d8){const _0x388eb3=a19_0x486643,_0x13350f=await getDatasetDetail(_0x1c77d8['str'](_0x388eb3(0xd7))),_0x22f5bd=Array[_0x388eb3(0xf4)](_0x13350f['fields'])?_0x13350f[_0x388eb3(0x105)]:Array[_0x388eb3(0xf4)](_0x13350f['properties'])?_0x13350f[_0x388eb3(0xe9)]:[];let _0x2ed86f=_0x22f5bd[_0x388eb3(0xdf)](_0x55c1cf=>normalizeField(_0x55c1cf))[_0x388eb3(0xd1)](_0x2e7a5c=>_0x2e7a5c!==null);_0x2ed86f[_0x388eb3(0xd4)]===0x0&&(_0x2ed86f=await loadListFieldFallback(_0x1c77d8['appCode'],_0x1c77d8[_0x388eb3(0xe4)](_0x388eb3(0xd7))));const _0x371a3b=_0x13350f[_0x388eb3(0x111)]??{},_0xc53c01=[];for(const [_0x1f2637,_0xb0c9d9]of Object[_0x388eb3(0xe0)](_0x371a3b)){const _0x2d79b8=normalizeOperationEntry(_0x1f2637,_0xb0c9d9);if(_0x2d79b8)_0xc53c01['push'](_0x2d79b8);}const _0x53c871=_0x13350f[_0x388eb3(0xd5)]??{},_0x212def=_0x13350f[_0x388eb3(0x10b)]??{},_0x20bebe=_0x53c871[_0x388eb3(0xfe)]!=null?{'id':_0x53c871[_0x388eb3(0xfe)],'name':_0x53c871['dbName']??null}:undefined;let _0x4dac47;return typeof _0x13350f[_0x388eb3(0x101)]===_0x388eb3(0x115)&&(_0x4dac47=parseJsonMaybe(_0x13350f[_0x388eb3(0x101)])),{'ok':!![],'data':{'id':_0x13350f[_0x388eb3(0xe5)]??_0x13350f['id'],'name':_0x13350f[_0x388eb3(0xe8)],'code':_0x13350f[_0x388eb3(0xf6)]||_0x13350f[_0x388eb3(0xd7)],'doVersion':_0x13350f[_0x388eb3(0xf0)],'description':_0x13350f['description']||_0x212def[_0x388eb3(0x114)]||undefined,'source':_0x13350f[_0x388eb3(0xcd)]||_0x212def['sourceType'],'table':_0x53c871['tableName']||_0x212def[_0x388eb3(0xd6)],'datasetKey':_0x53c871[_0x388eb3(0xdb)],'pk':_0x53c871[_0x388eb3(0xcb)],'db':_0x20bebe,'dbtable':summarizeDbtable(_0x53c871),'fields':_0x2ed86f,'operations':_0xc53c01,'indexes':Array['isArray'](_0x212def[_0x388eb3(0xf1)])?_0x212def[_0x388eb3(0xf1)]:[],'relations':Array[_0x388eb3(0xf4)](_0x13350f[_0x388eb3(0xff)])?_0x13350f[_0x388eb3(0xff)][_0x388eb3(0xdf)](_0x23ea49=>({'fromField':_0x23ea49['fromField'],'toDataset':_0x23ea49[_0x388eb3(0x109)],'toCode':_0x23ea49[_0x388eb3(0xfd)],'toTable':_0x23ea49[_0x388eb3(0xcc)],'toField':_0x23ea49[_0x388eb3(0xf5)],'labelField':_0x23ea49[_0x388eb3(0xea)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x13350f[_0x388eb3(0xed)]),...Array[_0x388eb3(0xf4)](_0x13350f[_0x388eb3(0x106)])?{'columnCodeListWithDeleted':_0x13350f[_0x388eb3(0x106)]}:{},'formatRules':Array['isArray'](_0x13350f['formatRules'])?_0x13350f[_0x388eb3(0xde)]:[],'validateRules':Array[_0x388eb3(0xf4)](_0x13350f[_0x388eb3(0x103)])?_0x13350f['validateRules']:[],..._0x4dac47!==undefined?{'extend':_0x4dac47}:{},'stats':{'fieldCount':_0x2ed86f[_0x388eb3(0xd4)],'operationCount':_0xc53c01[_0x388eb3(0xd4)]}}};}};
@@ -1 +1 @@
1
- function a20_0x3099(_0x551b1c,_0x15886a){_0x551b1c=_0x551b1c-0xaa;const _0x11a57f=a20_0x11a5();let _0x3099a0=_0x11a57f[_0x551b1c];return _0x3099a0;}(function(_0x58a749,_0x4b8422){const _0xf7f293=a20_0x3099,_0x4a6735=_0x58a749();while(!![]){try{const _0xe67ce3=-parseInt(_0xf7f293(0xb1))/0x1*(-parseInt(_0xf7f293(0xb4))/0x2)+-parseInt(_0xf7f293(0xaf))/0x3+-parseInt(_0xf7f293(0xb0))/0x4+parseInt(_0xf7f293(0xae))/0x5+-parseInt(_0xf7f293(0xb3))/0x6*(parseInt(_0xf7f293(0xaa))/0x7)+parseInt(_0xf7f293(0xab))/0x8*(-parseInt(_0xf7f293(0xac))/0x9)+-parseInt(_0xf7f293(0xad))/0xa*(-parseInt(_0xf7f293(0xb2))/0xb);if(_0xe67ce3===_0x4b8422)break;else _0x4a6735['push'](_0x4a6735['shift']());}catch(_0x2d78ee){_0x4a6735['push'](_0x4a6735['shift']());}}}(a20_0x11a5,0xec953));import{datasetList}from'../../commands/dataset/list.js';function a20_0x11a5(){const _0x1f9132=['504009xaFKBz','50hhtFFq','2588295uNjtcy','1979061mWiTLJ','4917056uQVJxt','2274OTusOQ','9118065akKUWE','12fIvtZi','1170ahretC','4306736EFxcTZ','272PtCtoi'];a20_0x11a5=function(){return _0x1f9132;};return a20_0x11a5();}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ function a20_0x499e(){const _0x28e962=['6mMOXSx','1755831AWoDlO','2679952MfyVTz','1077474xgGoNc','40GdgbON','6366sfQJpv','264EDueRQ','3232080rUnKGZ','1282lLMtaY','4761836NFLjzu','253467rTAwqF'];a20_0x499e=function(){return _0x28e962;};return a20_0x499e();}(function(_0x42b723,_0x4a3469){const _0x430053=a20_0x598c,_0x5b3412=_0x42b723();while(!![]){try{const _0xac7a2d=parseInt(_0x430053(0x1e7))/0x1+-parseInt(_0x430053(0x1e1))/0x2*(-parseInt(_0x430053(0x1e9))/0x3)+parseInt(_0x430053(0x1e2))/0x4+-parseInt(_0x430053(0x1e0))/0x5*(parseInt(_0x430053(0x1e4))/0x6)+-parseInt(_0x430053(0x1e5))/0x7+-parseInt(_0x430053(0x1df))/0x8*(parseInt(_0x430053(0x1e3))/0x9)+parseInt(_0x430053(0x1e8))/0xa*(-parseInt(_0x430053(0x1e6))/0xb);if(_0xac7a2d===_0x4a3469)break;else _0x5b3412['push'](_0x5b3412['shift']());}catch(_0x3d8ac8){_0x5b3412['push'](_0x5b3412['shift']());}}}(a20_0x499e,0xc9e63));import{datasetList}from'../../commands/dataset/list.js';function a20_0x598c(_0x128239,_0x5d3d72){_0x128239=_0x128239-0x1df;const _0x499e57=a20_0x499e();let _0x598cd9=_0x499e57[_0x128239];return _0x598cd9;}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
@@ -1 +1 @@
1
- const a21_0x227587=a21_0x13a8;(function(_0x84f47d,_0x58eb20){const _0x2df35d=a21_0x13a8,_0x4ebd59=_0x84f47d();while(!![]){try{const _0x5c0d8a=parseInt(_0x2df35d(0x1f6))/0x1*(-parseInt(_0x2df35d(0x1fc))/0x2)+-parseInt(_0x2df35d(0x202))/0x3+-parseInt(_0x2df35d(0x1f0))/0x4+parseInt(_0x2df35d(0x1fb))/0x5*(parseInt(_0x2df35d(0x1f1))/0x6)+-parseInt(_0x2df35d(0x1f5))/0x7+parseInt(_0x2df35d(0x1ff))/0x8+-parseInt(_0x2df35d(0x200))/0x9*(-parseInt(_0x2df35d(0x1eb))/0xa);if(_0x5c0d8a===_0x58eb20)break;else _0x4ebd59['push'](_0x4ebd59['shift']());}catch(_0x547f37){_0x4ebd59['push'](_0x4ebd59['shift']());}}}(a21_0x2c0d,0x5721e));import{listDatasets}from'../../core/api-client.js';function a21_0x2c0d(){const _0x4e3315=['5468040VcGoOz','657yfjQpx','split','1677336pnlsfL','dataset','tableName','trim','50570XOjbDA','list','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','string','code','820336yHkTDu','2968458IaXrng','name','datasetKey','str','645008vTdGpY','13367ePNftd','source','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','appCode','allFields','5aABiTt','50fGnZzB','pkField','map'];a21_0x2c0d=function(){return _0x4e3315;};return a21_0x2c0d();}import{CODE_FLAG}from'../../commands/common/flags.js';function a21_0x13a8(_0x4a0624,_0x5e254e){_0x4a0624=_0x4a0624-0x1ea;const _0x2c0d17=a21_0x2c0d();let _0x13a8f4=_0x2c0d17[_0x4a0624];return _0x13a8f4;}export const datasetList={'service':a21_0x227587(0x203),'command':a21_0x227587(0x1ec),'description':a21_0x227587(0x1ed),'risk':'read','flags':[{'name':a21_0x227587(0x1f2),'type':a21_0x227587(0x1ee),'description':a21_0x227587(0x1f8)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x4a9ea4){const _0x568e36=a21_0x227587,_0x573bd0=_0x4a9ea4[_0x568e36(0x1f4)]('name'),_0x449c42=_0x4a9ea4[_0x568e36(0x1f4)](_0x568e36(0x1ef)),_0x222407=await listDatasets(_0x4a9ea4[_0x568e36(0x1f9)],{..._0x573bd0&&{'name':_0x573bd0},..._0x449c42&&{'code':_0x449c42}});return{'ok':!![],'data':{'total':_0x222407['length'],'datasets':_0x222407['map'](_0x160c34=>{const _0x3b4892=_0x568e36,_0x451962=_0x160c34['dbtableConfig']??{};return{'id':_0x160c34['id'],'code':_0x160c34[_0x3b4892(0x1ef)],'name':_0x160c34[_0x3b4892(0x1f2)],'source':_0x160c34[_0x3b4892(0x1f7)],'description':_0x160c34['description'],'table':_0x451962[_0x3b4892(0x204)],'datasetKey':_0x451962[_0x3b4892(0x1f3)],'pk':_0x451962[_0x3b4892(0x1fd)],'fields':_0x451962[_0x3b4892(0x1fa)]?_0x451962[_0x3b4892(0x1fa)][_0x3b4892(0x201)](',')[_0x3b4892(0x1fe)](_0x23c0a2=>_0x23c0a2[_0x3b4892(0x1ea)]()):[]};})}};}};
1
+ const a21_0x1a3c55=a21_0x5bb6;(function(_0x12e4e2,_0x7c5b9f){const _0x48b64a=a21_0x5bb6,_0x172280=_0x12e4e2();while(!![]){try{const _0x21a87a=-parseInt(_0x48b64a(0x18d))/0x1+parseInt(_0x48b64a(0x187))/0x2*(parseInt(_0x48b64a(0x17e))/0x3)+-parseInt(_0x48b64a(0x199))/0x4+parseInt(_0x48b64a(0x189))/0x5*(-parseInt(_0x48b64a(0x188))/0x6)+-parseInt(_0x48b64a(0x18f))/0x7+parseInt(_0x48b64a(0x186))/0x8*(parseInt(_0x48b64a(0x18b))/0x9)+-parseInt(_0x48b64a(0x193))/0xa*(-parseInt(_0x48b64a(0x17f))/0xb);if(_0x21a87a===_0x7c5b9f)break;else _0x172280['push'](_0x172280['shift']());}catch(_0x51bde6){_0x172280['push'](_0x172280['shift']());}}}(a21_0x403b,0xefc55));import{listDatasets}from'../../core/api-client.js';function a21_0x403b(){const _0x545e0f=['name','description','datasetKey','20ooVfQY','dbtableConfig','list','allFields','trim','pkField','4468448PDCjEc','str','978BehJkB','26147869edOfMF','read','dataset','map','code','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','54216ZKrXbf','1528sipyNd','6iVVhYE','5351695rfrBUT','appCode','117KvfNke','source','1869282aTfEVo','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','367423twvdMm'];a21_0x403b=function(){return _0x545e0f;};return a21_0x403b();}import{CODE_FLAG}from'../../commands/common/flags.js';function a21_0x5bb6(_0x58e611,_0x26d193){_0x58e611=_0x58e611-0x17e;const _0x403b10=a21_0x403b();let _0x5bb69b=_0x403b10[_0x58e611];return _0x5bb69b;}export const datasetList={'service':a21_0x1a3c55(0x181),'command':a21_0x1a3c55(0x195),'description':a21_0x1a3c55(0x185),'risk':a21_0x1a3c55(0x180),'flags':[{'name':'name','type':'string','description':a21_0x1a3c55(0x18e)},{...CODE_FLAG,'required':![],'description':a21_0x1a3c55(0x184)}],async 'execute'(_0x54c981){const _0x177928=a21_0x1a3c55,_0x487782=_0x54c981[_0x177928(0x19a)]('name'),_0x2219e6=_0x54c981[_0x177928(0x19a)](_0x177928(0x183)),_0x1e7fe8=await listDatasets(_0x54c981[_0x177928(0x18a)],{..._0x487782&&{'name':_0x487782},..._0x2219e6&&{'code':_0x2219e6}});return{'ok':!![],'data':{'total':_0x1e7fe8['length'],'datasets':_0x1e7fe8[_0x177928(0x182)](_0x42332e=>{const _0x558ddf=_0x177928,_0x4627c3=_0x42332e[_0x558ddf(0x194)]??{};return{'id':_0x42332e['id'],'code':_0x42332e[_0x558ddf(0x183)],'name':_0x42332e[_0x558ddf(0x190)],'source':_0x42332e[_0x558ddf(0x18c)],'description':_0x42332e[_0x558ddf(0x191)],'table':_0x4627c3['tableName'],'datasetKey':_0x4627c3[_0x558ddf(0x192)],'pk':_0x4627c3[_0x558ddf(0x198)],'fields':_0x4627c3[_0x558ddf(0x196)]?_0x4627c3[_0x558ddf(0x196)]['split'](',')['map'](_0x3c2560=>_0x3c2560[_0x558ddf(0x197)]()):[]};})}};}};
@@ -1 +1 @@
1
- const a22_0x685572=a22_0x1c4c;(function(_0xeed71e,_0x17dc11){const _0x4b97c8=a22_0x1c4c,_0x36467d=_0xeed71e();while(!![]){try{const _0x2b84cf=-parseInt(_0x4b97c8(0x1c9))/0x1*(-parseInt(_0x4b97c8(0x1ca))/0x2)+parseInt(_0x4b97c8(0x1d7))/0x3+-parseInt(_0x4b97c8(0x1d5))/0x4+parseInt(_0x4b97c8(0x1cc))/0x5*(parseInt(_0x4b97c8(0x1cb))/0x6)+parseInt(_0x4b97c8(0x1c8))/0x7+-parseInt(_0x4b97c8(0x1d6))/0x8+parseInt(_0x4b97c8(0x1cd))/0x9*(-parseInt(_0x4b97c8(0x1d2))/0xa);if(_0x2b84cf===_0x17dc11)break;else _0x36467d['push'](_0x36467d['shift']());}catch(_0x193949){_0x36467d['push'](_0x36467d['shift']());}}}(a22_0x5b5d,0xc7b34));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x33836c){const _0x2372b8=a22_0x1c4c,_0x1b0da6=typeof _0x33836c===_0x2372b8(0x1c7)?_0x33836c[_0x2372b8(0x1d0)]():'';return _0x1b0da6||DEFAULT_MARKDOWN;}function a22_0x1c4c(_0x1db73e,_0x5b1c7b){_0x1db73e=_0x1db73e-0x1c6;const _0x5b5d3a=a22_0x5b5d();let _0x1c4c16=_0x5b5d3a[_0x1db73e];return _0x1c4c16;}export const datasetSdkDoc={'service':a22_0x685572(0x1d3),'command':a22_0x685572(0x1ce),'description':a22_0x685572(0x1c6),'risk':'read','flags':[{...CODE_FLAG,'description':a22_0x685572(0x1d1)}],async 'execute'(_0x15abb1){const _0x4a2539=a22_0x685572,_0x5008de=_0x15abb1['str'](_0x4a2539(0x1d4)),_0x396d70=await getDatasetSdkUsageDoc(_0x5008de,_0x15abb1[_0x4a2539(0x1cf)]);return{'ok':!![],'data':{'code':_0x5008de,'appCode':_0x15abb1[_0x4a2539(0x1cf)],'markdown':formatDatasetSdkMarkdown(_0x396d70)}};}};function a22_0x5b5d(){const _0x524624=['120286RbNiZI','6zmcyUC','3533215CEGOdw','18nGhkMv','sdk-doc','appCode','trim','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','8686670DrIVKo','dataset','code','2891368JGksRd','42888MUBKBi','4020624Fcsxvr','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','string','7814604xxBuKA','2HYdwRB'];a22_0x5b5d=function(){return _0x524624;};return a22_0x5b5d();}
1
+ function a22_0x3d98(){const _0x103e1e=['sdk-doc','read','5700101fIyyzn','268849ylOLew','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','188HgAaGn','appCode','string','dataset','342xjlATY','7947CPllxt','5880PHcBTi','1467657PGixjP','40QDNRNg','str','473810JrqjwM','564uqhzVr','code','313FaVLSu','trim'];a22_0x3d98=function(){return _0x103e1e;};return a22_0x3d98();}const a22_0x44167f=a22_0x4e81;(function(_0x57e29f,_0x4ba804){const _0x54523e=a22_0x4e81,_0x5505a1=_0x57e29f();while(!![]){try{const _0x115f8f=parseInt(_0x54523e(0x12a))/0x1*(-parseInt(_0x54523e(0x128))/0x2)+parseInt(_0x54523e(0x122))/0x3*(-parseInt(_0x54523e(0x11d))/0x4)+-parseInt(_0x54523e(0x123))/0x5*(parseInt(_0x54523e(0x121))/0x6)+-parseInt(_0x54523e(0x11b))/0x7*(parseInt(_0x54523e(0x125))/0x8)+parseInt(_0x54523e(0x124))/0x9+-parseInt(_0x54523e(0x127))/0xa+parseInt(_0x54523e(0x11a))/0xb;if(_0x115f8f===_0x4ba804)break;else _0x5505a1['push'](_0x5505a1['shift']());}catch(_0x18ad0a){_0x5505a1['push'](_0x5505a1['shift']());}}}(a22_0x3d98,0x278ff));function a22_0x4e81(_0x44455a,_0x3602e5){_0x44455a=_0x44455a-0x11a;const _0x3d980b=a22_0x3d98();let _0x4e81a2=_0x3d980b[_0x44455a];return _0x4e81a2;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x132734){const _0x202772=a22_0x4e81,_0x190826=typeof _0x132734===_0x202772(0x11f)?_0x132734[_0x202772(0x12b)]():'';return _0x190826||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a22_0x44167f(0x120),'command':a22_0x44167f(0x12c),'description':a22_0x44167f(0x11c),'risk':a22_0x44167f(0x12d),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x29bdf2){const _0x5b2f79=a22_0x44167f,_0x301bf4=_0x29bdf2[_0x5b2f79(0x126)](_0x5b2f79(0x129)),_0x19030c=await getDatasetSdkUsageDoc(_0x301bf4,_0x29bdf2[_0x5b2f79(0x11e)]);return{'ok':!![],'data':{'code':_0x301bf4,'appCode':_0x29bdf2[_0x5b2f79(0x11e)],'markdown':formatDatasetSdkMarkdown(_0x19030c)}};}};
@@ -1 +1 @@
1
- const a23_0xa801a=a23_0x4953;(function(_0x1f0de1,_0x205075){const _0x11a051=a23_0x4953,_0x347201=_0x1f0de1();while(!![]){try{const _0x2f44e6=-parseInt(_0x11a051(0x1db))/0x1+parseInt(_0x11a051(0x1ce))/0x2+-parseInt(_0x11a051(0x1b1))/0x3*(-parseInt(_0x11a051(0x1d5))/0x4)+-parseInt(_0x11a051(0x1d9))/0x5+parseInt(_0x11a051(0x1e3))/0x6*(-parseInt(_0x11a051(0x1e5))/0x7)+-parseInt(_0x11a051(0x1c7))/0x8+parseInt(_0x11a051(0x1d0))/0x9;if(_0x2f44e6===_0x205075)break;else _0x347201['push'](_0x347201['shift']());}catch(_0x19e417){_0x347201['push'](_0x347201['shift']());}}}(a23_0x466b,0x8a0d9));import a23_0xed24ba 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';function a23_0x4953(_0x271547,_0x58b046){_0x271547=_0x271547-0x1a0;const _0x466b5a=a23_0x466b();let _0x49535c=_0x466b5a[_0x271547];return _0x49535c;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x38370c){const _0x962f52=a23_0x4953,_0x2cf3c9=getCliVersion(),_0x2d476f=buildConfigFromFlags({});await initGlobalEnvironment(_0x2d476f),console[_0x962f52(0x1d4)](),console[_0x962f52(0x1d4)](a23_0xed24ba['bold'](CLI_BIN_NAME+_0x962f52(0x1a3))),console['log'](a23_0xed24ba['gray']('─'[_0x962f52(0x1dd)](0x32))),console[_0x962f52(0x1d4)](_0x962f52(0x1c6)+_0x2cf3c9),console['log'](_0x962f52(0x1cd)+process[_0x962f52(0x1de)]),console[_0x962f52(0x1d4)](_0x962f52(0x1a6)+process['platform']+'\x20'+process[_0x962f52(0x1ad)]),console['log'](),console['log'](a23_0xed24ba[_0x962f52(0x1da)](_0x962f52(0x1a9))),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c2)[_0x962f52(0x1dd)](0x1e)));const _0x4db634=getGlobalConfigPath(),_0x3d7d5a=getProjectConfigPath();console[_0x962f52(0x1d4)](_0x962f52(0x1c1)+(_0x4db634||a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1af)))),console[_0x962f52(0x1d4)](_0x962f52(0x1a4)+(_0x3d7d5a||a23_0xed24ba['gray'](_0x962f52(0x1af)))),console['log'](),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1da)]('\x20\x20Config\x20JSON')),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c2)['repeat'](0x1e)));const _0xefa29a=(_0x47a04f,_0x2dd97b)=>{const _0x4ed434=_0x962f52;if(!_0x2dd97b){console[_0x4ed434(0x1d4)]('\x20\x20'+_0x47a04f[_0x4ed434(0x1cc)](0x11)+'\x20'+a23_0xed24ba['gray'](_0x4ed434(0x1a0)));return;}const _0x4449c3=inspectCliConfigJsonFile(_0x2dd97b);if(_0x4449c3[_0x4ed434(0x1b6)]==='ok')console[_0x4ed434(0x1d4)]('\x20\x20'+_0x47a04f[_0x4ed434(0x1cc)](0x11)+'\x20'+a23_0xed24ba[_0x4ed434(0x1dc)](_0x4ed434(0x1a5)));else{if(_0x4449c3[_0x4ed434(0x1b6)]===_0x4ed434(0x1a2))console['log']('\x20\x20'+_0x47a04f[_0x4ed434(0x1cc)](0x11)+'\x20'+a23_0xed24ba['yellow'](_0x4ed434(0x1ab)));else _0x4449c3['status']===_0x4ed434(0x1e1)?console[_0x4ed434(0x1d4)]('\x20\x20'+_0x47a04f['padEnd'](0x11)+'\x20'+a23_0xed24ba['gray'](_0x4ed434(0x1a1))):(console[_0x4ed434(0x1d4)]('\x20\x20'+_0x47a04f[_0x4ed434(0x1cc)](0x11)+'\x20'+a23_0xed24ba[_0x4ed434(0x1d3)]('✗\x20Invalid\x20JSON')),console[_0x4ed434(0x1d4)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a23_0xed24ba[_0x4ed434(0x1d3)](_0x4449c3['message'])));}};_0xefa29a(_0x962f52(0x1aa),_0x4db634),_0xefa29a('Project',_0x3d7d5a),console[_0x962f52(0x1d4)](),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1da)](_0x962f52(0x1b2))),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c2)[_0x962f52(0x1dd)](0x1e))),console[_0x962f52(0x1d4)](_0x962f52(0x1d8)+(_0x2d476f[_0x962f52(0x1d1)]||a23_0xed24ba[_0x962f52(0x1d3)](_0x962f52(0x1c3)))),console[_0x962f52(0x1d4)](_0x962f52(0x1b7)+_0x2d476f[_0x962f52(0x1ac)]);const _0x948362=isLegacyCompatConfigKey(_0x962f52(0x1d2))?a23_0xed24ba[_0x962f52(0x1e0)](_0x2d476f[_0x962f52(0x1d2)]+_0x962f52(0x1cb)):_0x2d476f[_0x962f52(0x1d2)];return console[_0x962f52(0x1d4)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x948362),console[_0x962f52(0x1d4)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2d476f[_0x962f52(0x1b4)]||a23_0xed24ba[_0x962f52(0x1e0)]('(none)'))),console[_0x962f52(0x1d4)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x2d476f[_0x962f52(0x1e4)]||a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1d7)))),console[_0x962f52(0x1d4)](_0x962f52(0x1d6)+(_0x2d476f[_0x962f52(0x1b8)]||a23_0xed24ba['gray'](_0x962f52(0x1c0)+DEFAULT_CONFIG_VALUES[_0x962f52(0x1b8)]+')'))),console['log'](_0x962f52(0x1bc)+(_0x2d476f['pageSize']??a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c4)))),console[_0x962f52(0x1d4)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x2d476f[_0x962f52(0x1b9)]),console['log'](_0x962f52(0x1bd)+_0x2d476f[_0x962f52(0x1c5)]),console[_0x962f52(0x1d4)](_0x962f52(0x1ba)+AUTH_MODE['ClientAk']),console[_0x962f52(0x1d4)](_0x962f52(0x1a7)+(_0x2d476f[_0x962f52(0x1be)]?a23_0xed24ba[_0x962f52(0x1dc)](_0x962f52(0x1df)+_0x2d476f['accessKey'][_0x962f52(0x1ca)]+')'):a23_0xed24ba['gray']('(none)'))),console['log'](),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1da)](_0x962f52(0x1a8))),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c2)[_0x962f52(0x1dd)](0x1e))),console[_0x962f52(0x1d4)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x962f52(0x1d4)](_0x962f52(0x1b5)+getUserDomain()),console['log'](_0x962f52(0x1cf)+getRuntimeDomain()),console[_0x962f52(0x1d4)](),console['log'](a23_0xed24ba['bold'](_0x962f52(0x1bf))),console[_0x962f52(0x1d4)](a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c2)[_0x962f52(0x1dd)](0x1e))),console[_0x962f52(0x1d4)](_0x962f52(0x1ae)+a23_0xed24ba[_0x962f52(0x1dc)](AUTH_MODE['ClientAk']+_0x962f52(0x1b0))),console[_0x962f52(0x1d4)](_0x962f52(0x1bb)+a23_0xed24ba[_0x962f52(0x1e0)](_0x962f52(0x1c8))),console[_0x962f52(0x1d4)](),{'ok':!![]};}function a23_0x466b(){const _0x47cb6e=['padEnd','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1374352pQjvir','\x20\x20runtimeDomain:\x20\x20\x20','13400298zjcQzw','appCode','locale','red','log','20VqWXBy','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4066430Igaixy','bold','655819mPFbiR','green','repeat','version','(set,\x20length=','gray','missing','Diagnose\x20CLI\x20configuration\x20and\x20environment','6wjBJIf','currentApp','1735013fytNdH','(no\x20file)','(missing)','empty','\x20doctor','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20Config\x20Files','Global','⚠\x20Empty\x20(treated\x20as\x20{})','env','arch','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20(accessKey)','624441DUBHhz','\x20\x20Merged\x20Config','check','defaultApp','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','status','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','riskLevel','\x20\x20auth\x20(effective):\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','\x20\x20Auth','(default:\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','(not\x20set)','(default)','verbose','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','7475232nZdNYg','(removed\x20—\x20cookie\x20auth\x20disabled)','read','length','\x20(legacy/compat\x20only)'];a23_0x466b=function(){return _0x47cb6e;};return a23_0x466b();}export const doctorDefinition={'service':'doctor','command':a23_0xa801a(0x1b3),'description':a23_0xa801a(0x1e2),'risk':a23_0xa801a(0x1c9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a23_0x336474=a23_0x1b45;(function(_0x20afd,_0x43e737){const _0x318d08=a23_0x1b45,_0x2ca03e=_0x20afd();while(!![]){try{const _0x29d222=parseInt(_0x318d08(0xe9))/0x1+-parseInt(_0x318d08(0xe7))/0x2*(-parseInt(_0x318d08(0xff))/0x3)+-parseInt(_0x318d08(0xec))/0x4+parseInt(_0x318d08(0xd8))/0x5*(parseInt(_0x318d08(0xf4))/0x6)+parseInt(_0x318d08(0x106))/0x7+-parseInt(_0x318d08(0xf7))/0x8*(-parseInt(_0x318d08(0xf9))/0x9)+parseInt(_0x318d08(0xfa))/0xa*(-parseInt(_0x318d08(0xd5))/0xb);if(_0x29d222===_0x43e737)break;else _0x2ca03e['push'](_0x2ca03e['shift']());}catch(_0x24ba38){_0x2ca03e['push'](_0x2ca03e['shift']());}}}(a23_0x16aa,0xac2f8));import a23_0x4e409e 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';function a23_0x16aa(){const _0x35986d=['(default)','\x20\x20─','✓\x20Valid\x20JSON','ClientAk','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','22aZTBlN','message','bold','3760sqOLPz','\x20\x20auth\x20(effective):\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','read','format','\x20\x20Session\x20check:\x20\x20\x20','accessKey','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','gray','(set,\x20length=','red','2376518YyTZVm','log','596022vxheZZ','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','check','1892488wxuKUe','✗\x20Invalid\x20JSON','defaultApp','empty','env','padEnd','(none)','Global','4794zkFbfA','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','8947912sMQAeX','green','9ivLgIV','18667570VkZEUy','riskLevel','\x20doctor','status','missing','3EUfAtX','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)','currentApp','repeat','\x20(accessKey)','(not\x20found)','9858030aSeFIf','version','\x20\x20Auth','(missing)','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','verbose','\x20\x20API\x20Endpoints','locale','arch','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a23_0x16aa=function(){return _0x35986d;};return a23_0x16aa();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a23_0x1b45(_0x261a67,_0x243a51){_0x261a67=_0x261a67-0xd3;const _0x16aae4=a23_0x16aa();let _0x1b450d=_0x16aae4[_0x261a67];return _0x1b450d;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x5bde65){const _0x5a7a7b=a23_0x1b45,_0x174c5d=getCliVersion(),_0x3bd35a=buildConfigFromFlags({});await initGlobalEnvironment(_0x3bd35a),console[_0x5a7a7b(0xe8)](),console[_0x5a7a7b(0xe8)](a23_0x4e409e['bold'](CLI_BIN_NAME+_0x5a7a7b(0xfc))),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xe4)]('─'[_0x5a7a7b(0x103)](0x32))),console['log'](_0x5a7a7b(0xe3)+_0x174c5d),console[_0x5a7a7b(0xe8)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5a7a7b(0x107)]),console[_0x5a7a7b(0xe8)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x5a7a7b(0x110)]),console['log'](),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xd7)]('\x20\x20Config\x20Files')),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0x113)[_0x5a7a7b(0x103)](0x1e)));const _0x3fed3c=getGlobalConfigPath(),_0x436363=getProjectConfigPath();console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xdd)+(_0x3fed3c||a23_0x4e409e['gray'](_0x5a7a7b(0x105)))),console[_0x5a7a7b(0xe8)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x436363||a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0x105)))),console['log'](),console[_0x5a7a7b(0xe8)](a23_0x4e409e['bold']('\x20\x20Config\x20JSON')),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xe4)]('\x20\x20─'['repeat'](0x1e)));const _0x4a1bae=(_0x16986c,_0x339015)=>{const _0x4a20ac=_0x5a7a7b;if(!_0x339015){console['log']('\x20\x20'+_0x16986c['padEnd'](0x11)+'\x20'+a23_0x4e409e[_0x4a20ac(0xe4)]('(no\x20file)'));return;}const _0x2468b8=inspectCliConfigJsonFile(_0x339015);if(_0x2468b8[_0x4a20ac(0xfd)]==='ok')console[_0x4a20ac(0xe8)]('\x20\x20'+_0x16986c[_0x4a20ac(0xf1)](0x11)+'\x20'+a23_0x4e409e[_0x4a20ac(0xf8)](_0x4a20ac(0x114)));else{if(_0x2468b8['status']===_0x4a20ac(0xef))console[_0x4a20ac(0xe8)]('\x20\x20'+_0x16986c[_0x4a20ac(0xf1)](0x11)+'\x20'+a23_0x4e409e['yellow'](_0x4a20ac(0x10a)));else _0x2468b8[_0x4a20ac(0xfd)]===_0x4a20ac(0xfe)?console[_0x4a20ac(0xe8)]('\x20\x20'+_0x16986c[_0x4a20ac(0xf1)](0x11)+'\x20'+a23_0x4e409e[_0x4a20ac(0xe4)](_0x4a20ac(0x109))):(console['log']('\x20\x20'+_0x16986c[_0x4a20ac(0xf1)](0x11)+'\x20'+a23_0x4e409e[_0x4a20ac(0xe6)](_0x4a20ac(0xed))),console[_0x4a20ac(0xe8)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a23_0x4e409e['red'](_0x2468b8[_0x4a20ac(0xd6)])));}};_0x4a1bae(_0x5a7a7b(0xf3),_0x3fed3c),_0x4a1bae('Project',_0x436363),console['log'](),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xd7)](_0x5a7a7b(0xf6))),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0x113)[_0x5a7a7b(0x103)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3bd35a['appCode']||a23_0x4e409e['red']('(not\x20set)'))),console[_0x5a7a7b(0xe8)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3bd35a[_0x5a7a7b(0xf0)]);const _0x5766fb=isLegacyCompatConfigKey(_0x5a7a7b(0x10f))?a23_0x4e409e[_0x5a7a7b(0xe4)](_0x3bd35a[_0x5a7a7b(0x10f)]+_0x5a7a7b(0x101)):_0x3bd35a[_0x5a7a7b(0x10f)];return console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xdb)+_0x5766fb),console[_0x5a7a7b(0xe8)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x3bd35a[_0x5a7a7b(0xee)]||a23_0x4e409e['gray'](_0x5a7a7b(0xf2)))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xf5)+(_0x3bd35a[_0x5a7a7b(0x102)]||a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0xf2)))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0x10b)+(_0x3bd35a[_0x5a7a7b(0xe0)]||a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0xdc)+DEFAULT_CONFIG_VALUES[_0x5a7a7b(0xe0)]+')'))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xde)+(_0x3bd35a['pageSize']??a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0x112)))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0x100)+_0x3bd35a[_0x5a7a7b(0xfb)]),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0x111)+_0x3bd35a[_0x5a7a7b(0x10d)]),console['log'](_0x5a7a7b(0xd9)+AUTH_MODE[_0x5a7a7b(0x115)]),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xd3)+(_0x3bd35a[_0x5a7a7b(0xe2)]?a23_0x4e409e[_0x5a7a7b(0xf8)](_0x5a7a7b(0xe5)+_0x3bd35a[_0x5a7a7b(0xe2)][_0x5a7a7b(0x10c)]+')'):a23_0x4e409e['gray'](_0x5a7a7b(0xf2)))),console[_0x5a7a7b(0xe8)](),console['log'](a23_0x4e409e[_0x5a7a7b(0xd7)](_0x5a7a7b(0x10e))),console['log'](a23_0x4e409e[_0x5a7a7b(0xe4)](_0x5a7a7b(0x113)[_0x5a7a7b(0x103)](0x1e))),console[_0x5a7a7b(0xe8)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xea)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5a7a7b(0xe8)](),console[_0x5a7a7b(0xe8)](a23_0x4e409e[_0x5a7a7b(0xd7)](_0x5a7a7b(0x108))),console[_0x5a7a7b(0xe8)](a23_0x4e409e['gray']('\x20\x20─'['repeat'](0x1e))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xda)+a23_0x4e409e[_0x5a7a7b(0xf8)](AUTH_MODE[_0x5a7a7b(0x115)]+_0x5a7a7b(0x104))),console[_0x5a7a7b(0xe8)](_0x5a7a7b(0xe1)+a23_0x4e409e['gray'](_0x5a7a7b(0xd4))),console['log'](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a23_0x336474(0xeb),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a23_0x336474(0xdf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a24_0x2f7cb7=a24_0x1058;(function(_0x4fc799,_0x2003d5){const _0x25eb0b=a24_0x1058,_0x2db83a=_0x4fc799();while(!![]){try{const _0x265686=-parseInt(_0x25eb0b(0x11c))/0x1*(parseInt(_0x25eb0b(0x138))/0x2)+-parseInt(_0x25eb0b(0x117))/0x3+parseInt(_0x25eb0b(0x134))/0x4*(parseInt(_0x25eb0b(0x13b))/0x5)+parseInt(_0x25eb0b(0x133))/0x6+-parseInt(_0x25eb0b(0x11a))/0x7+parseInt(_0x25eb0b(0x119))/0x8+-parseInt(_0x25eb0b(0x135))/0x9*(-parseInt(_0x25eb0b(0x120))/0xa);if(_0x265686===_0x2003d5)break;else _0x2db83a['push'](_0x2db83a['shift']());}catch(_0x1626fb){_0x2db83a['push'](_0x2db83a['shift']());}}}(a24_0x2511,0xb0603));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';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a24_0x2f7cb7(0x144),'type':a24_0x2f7cb7(0x116),'description':'App\x20code\x20for\x20the\x20project'},{'name':a24_0x2f7cb7(0x147),'type':a24_0x2f7cb7(0x116),'description':a24_0x2f7cb7(0x143)+DEFAULT_CONFIG_VALUES[a24_0x2f7cb7(0x147)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a24_0x2f7cb7(0x139)+PRODUCT_CONFIG[a24_0x2f7cb7(0x111)]+')\x20instead\x20of\x20project','default':![]},{'name':a24_0x2f7cb7(0x13a),'type':a24_0x2f7cb7(0x128),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':'file','type':a24_0x2f7cb7(0x116),'description':a24_0x2f7cb7(0x114),'required':!![]},{'name':'appcode','type':a24_0x2f7cb7(0x116),'description':a24_0x2f7cb7(0x148)},{'name':a24_0x2f7cb7(0x147),'type':a24_0x2f7cb7(0x116),'description':a24_0x2f7cb7(0x121),'enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x2f7cb7(0x123),'type':a24_0x2f7cb7(0x128),'description':a24_0x2f7cb7(0x139)+PRODUCT_CONFIG[a24_0x2f7cb7(0x111)]+a24_0x2f7cb7(0x151),'default':![]},{'name':'yes','type':'boolean','description':a24_0x2f7cb7(0x13e),'default':![]}];export async function runInit(_0x38ff1d){const _0x2b4a3f=a24_0x2f7cb7,_0x324258=isNonInteractiveMode(_0x38ff1d),_0x26cd01=_0x38ff1d[_0x2b4a3f(0x123)]?_0x2b4a3f(0x123):'project',_0x2caa4c=resolveWriteConfigPath(_0x26cd01);try{_0x324258?await runNonInteractive(_0x38ff1d,_0x2caa4c):await runInteractive(_0x38ff1d,_0x2caa4c);}catch(_0x2e0fc0){if(_0x2e0fc0 instanceof AbortPrompt)throw CliErrors[_0x2b4a3f(0x131)]();throw _0x2e0fc0;}}export async function runInitImport(_0x2f3d42){const _0x4fc44c=a24_0x2f7cb7,_0x36b11d=_0x2f3d42[_0x4fc44c(0x123)]?_0x4fc44c(0x123):'project',_0x574a=resolveWriteConfigPath(_0x36b11d);await runFromImport(_0x2f3d42,_0x574a);}const RUNTIME_IRRELEVANT_KEYS=new Set([a24_0x2f7cb7(0x112)]);function a24_0x1058(_0x47cc4f,_0x5a87ab){_0x47cc4f=_0x47cc4f-0x10d;const _0x251132=a24_0x2511();let _0x10581d=_0x251132[_0x47cc4f];return _0x10581d;}async function runFromImport(_0x19e67c,_0x4de5fb){const _0x4c1f86=a24_0x2f7cb7,_0x3e53ce=resolveFilePath(_0x19e67c[_0x4c1f86(0x13f)]);if(!existsSync(_0x3e53ce))throw CliErrors[_0x4c1f86(0x145)](_0x4c1f86(0x132)+_0x3e53ce);const _0x1de0a4=readSourceFile(_0x3e53ce),_0x5c3567=convertToRuntimeConfig(_0x1de0a4);_0x19e67c[_0x4c1f86(0x144)]&&(_0x5c3567[_0x4c1f86(0x144)]=String(_0x19e67c[_0x4c1f86(0x144)]));_0x19e67c[_0x4c1f86(0x147)]&&(_0x5c3567['env']=resolveInitEnv(_0x19e67c));if(!_0x5c3567[_0x4c1f86(0x144)])throw CliErrors[_0x4c1f86(0x145)](_0x4c1f86(0x146),_0x4c1f86(0x12d));await writeInitConfig(_0x4de5fb,_0x5c3567,_0x19e67c),console['log'](_0x4c1f86(0x12b)+_0x3e53ce),console[_0x4c1f86(0x140)](_0x4c1f86(0x153)+_0x4de5fb),console[_0x4c1f86(0x140)](_0x4c1f86(0x10f)+_0x5c3567['appcode']);if(_0x5c3567['defaultApp'])console[_0x4c1f86(0x140)]('\x20\x20default:\x20'+_0x5c3567[_0x4c1f86(0x141)]);}function convertToRuntimeConfig(_0x3c06d2){const _0x368aa1=a24_0x2f7cb7;if(_0x3c06d2['apps']&&typeof _0x3c06d2[_0x368aa1(0x14d)]===_0x368aa1(0x11d))throw CliErrors['validation']('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x368aa1(0x137));const _0x596dcb={};for(const _0x236cf4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x3c06d2[_0x236cf4]!==undefined&&(_0x596dcb[_0x236cf4]=_0x3c06d2[_0x236cf4]);}return!_0x596dcb['riskLevel']&&(_0x596dcb[_0x368aa1(0x14a)]=DEFAULT_CONFIG_VALUES[_0x368aa1(0x14a)]),_0x596dcb;}async function runNonInteractive(_0x5d4fc3,_0x551c11){const _0x3e249a=a24_0x2f7cb7,_0x26fde0=_0x5d4fc3[_0x3e249a(0x144)];if(!_0x26fde0)throw CliErrors[_0x3e249a(0x10d)](_0x3e249a(0x144),'Usage:\x20'+CLI_BIN_NAME+_0x3e249a(0x152));const _0x1f24c9=resolveInitEnv(_0x5d4fc3);await writeInitConfig(_0x551c11,{'appcode':_0x26fde0,'env':_0x1f24c9},_0x5d4fc3),console[_0x3e249a(0x140)](_0x3e249a(0x12e)+_0x551c11),console[_0x3e249a(0x140)](_0x3e249a(0x10f)+_0x26fde0),console[_0x3e249a(0x140)](_0x3e249a(0x13c)+_0x1f24c9);}async function runInteractive(_0x209791,_0x447a62){const _0x29ee4e=a24_0x2f7cb7,_0x29bbd8=loadExisting(_0x447a62),_0x4b7ed0=typeof _0x29bbd8?.[_0x29ee4e(0x144)]===_0x29ee4e(0x116)?_0x29bbd8['appcode']:'',_0x50d885=resolveInitEnv(_0x209791);console[_0x29ee4e(0x140)](CLI_BIN_NAME+_0x29ee4e(0x136)+PRODUCT_CONFIG[_0x29ee4e(0x111)]+'\x0a');if(existsSync(_0x447a62)&&!_0x209791[_0x29ee4e(0x13a)]){const _0x3c2e46=await promptYesNo(_0x29ee4e(0x11b)+_0x447a62+_0x29ee4e(0x11f),![]);if(!_0x3c2e46){console[_0x29ee4e(0x140)](_0x29ee4e(0x12a));return;}}const _0xaefa5f=typeof _0x209791[_0x29ee4e(0x144)]===_0x29ee4e(0x116)?_0x209791[_0x29ee4e(0x144)][_0x29ee4e(0x14b)]():'';let _0x57293f=_0xaefa5f;!_0x57293f&&(_0x57293f=await promptInput(_0x29ee4e(0x14c),_0x4b7ed0));if(!_0x57293f['trim']())throw CliErrors[_0x29ee4e(0x145)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x447a62,{'appcode':_0x57293f[_0x29ee4e(0x14b)](),'env':_0x50d885},_0x209791),console[_0x29ee4e(0x140)]('\x0aInitialized\x20'+_0x447a62),console[_0x29ee4e(0x140)]('\x20\x20appcode:\x20'+_0x57293f[_0x29ee4e(0x14b)]()),console[_0x29ee4e(0x140)](_0x29ee4e(0x13c)+_0x50d885);}function a24_0x2511(){const _0x3e7cdb=['trim','App\x20code','apps','Failed\x20to\x20parse\x20source\x20file:\x20','stdout','once',')\x20instead\x20of\x20project','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x20\x20config:\x20\x20','name','flagMissing','removeListener','\x20\x20appcode:\x20','cwd','newConfigFileName','apiDir','entries','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','question','string','2732985YUSnem','SIGINT','4074496XvhnZa','9959117xOHzKB','File\x20','1pBkrQl','object','parse','\x20already\x20exists.\x20Overwrite?','10fsDmKw','Override\x20imported\x20default\x20env','race','global','utf8','\x22.\x20Allowed:\x20','[y/N]','toLowerCase','boolean','close','Aborted.','Imported\x20from\x20','app','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`.','Initialized\x20','Invalid\x20env\x20\x22','message','cancelled','Source\x20file\x20not\x20found:\x20','4071948yIkGtM','5514648OOHVKV','6453558pjhbMN','\x20init\x20—\x20Create\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','455066eJHUDH','Write\x20to\x20global\x20(~/','yes','5LqJGkS','\x20\x20env:\x20\x20\x20\x20\x20','):\x20','Skip\x20confirmation\x20when\x20overwriting','file','log','defaultApp','[Y/n]','Target\x20environment\x20(default\x20','appcode','validation','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','env','Override\x20imported\x20default\x20appcode','User\x20aborted\x20prompt','riskLevel'];a24_0x2511=function(){return _0x3e7cdb;};return a24_0x2511();}async function writeInitConfig(_0x422429,_0x1ef698,_0x5b74bd){const _0x4f8064=a24_0x2f7cb7;let _0x5acb83={};existsSync(_0x422429)&&!_0x5b74bd[_0x4f8064(0x13a)]&&(_0x5acb83=readConfigFile(_0x422429));for(const [_0x2befc7,_0x7430e3]of Object[_0x4f8064(0x113)](_0x1ef698)){_0x7430e3!==undefined&&(_0x5acb83[_0x2befc7]=_0x7430e3);}if(_0x5acb83['app'])delete _0x5acb83[_0x4f8064(0x12c)];writeConfigFile(_0x422429,_0x5acb83);}class AbortPrompt extends Error{constructor(){const _0x4bff83=a24_0x2f7cb7;super(_0x4bff83(0x149)),this[_0x4bff83(0x154)]='AbortPrompt';}}function createSafeRl(){const _0x62ac7=a24_0x2f7cb7,_0x400500=createInterface({'input':process['stdin'],'output':process[_0x62ac7(0x14f)]});let _0x2cf7e7;const _0x138fa4=new Promise((_0x52b7f5,_0x2b70c8)=>{const _0x3eaea2=_0x62ac7;_0x2cf7e7=()=>{const _0x20e924=a24_0x1058;_0x2cf7e7&&(_0x400500[_0x20e924(0x10e)](_0x20e924(0x118),_0x2cf7e7),_0x2cf7e7=undefined);try{_0x400500[_0x20e924(0x129)]();}catch{}_0x2b70c8(new AbortPrompt());},_0x400500[_0x3eaea2(0x150)](_0x3eaea2(0x118),_0x2cf7e7);}),_0x4df548=()=>{const _0x490055=_0x62ac7;_0x2cf7e7&&(_0x400500['removeListener'](_0x490055(0x118),_0x2cf7e7),_0x2cf7e7=undefined);try{_0x400500[_0x490055(0x129)]();}catch{}};return{'rl':_0x400500,'abortPromise':_0x138fa4,'disposeSuccess':_0x4df548};}async function promptInput(_0xa3457,_0x2344e8){const {rl:_0x51821a,abortPromise:_0x1b80d6,disposeSuccess:_0x5cc44b}=createSafeRl(),_0x1c501a=new Promise(_0x2ac1f4=>{const _0x465625=a24_0x1058,_0x3ff37e=_0x2344e8?'\x20\x20'+_0xa3457+'\x20('+_0x2344e8+_0x465625(0x13d):'\x20\x20'+_0xa3457+':\x20';_0x51821a['question'](_0x3ff37e,_0x5280dc=>{const _0x4bd976=_0x465625;_0x5cc44b(),_0x2ac1f4(_0x5280dc[_0x4bd976(0x14b)]()||_0x2344e8);});});return Promise['race']([_0x1c501a,_0x1b80d6]);}async function promptYesNo(_0x1df4d8,_0x245fd1){const _0x545ffa=a24_0x2f7cb7,{rl:_0xf427c3,abortPromise:_0x222239,disposeSuccess:_0x47ada5}=createSafeRl(),_0x4a23e2=new Promise(_0x1b9fc5=>{const _0x57c1b6=a24_0x1058,_0x4fd181=_0x245fd1?_0x57c1b6(0x142):_0x57c1b6(0x126);_0xf427c3[_0x57c1b6(0x115)]('\x20\x20'+_0x1df4d8+'\x20'+_0x4fd181+':\x20',_0x48a9fd=>{const _0x49559b=_0x57c1b6;_0x47ada5();const _0x3bc90f=_0x48a9fd[_0x49559b(0x14b)]()[_0x49559b(0x127)]();if(_0x3bc90f==='y'||_0x3bc90f===_0x49559b(0x13a))_0x1b9fc5(!![]);else{if(_0x3bc90f==='n'||_0x3bc90f==='no')_0x1b9fc5(![]);else _0x1b9fc5(_0x245fd1);}});});return Promise[_0x545ffa(0x122)]([_0x4a23e2,_0x222239]);}function loadExisting(_0x4e0e9a){if(!existsSync(_0x4e0e9a))return null;return readConfigFile(_0x4e0e9a);}function resolveFilePath(_0x595ea1){const _0x921f21=a24_0x2f7cb7;return isAbsolute(_0x595ea1)?_0x595ea1:resolve(process[_0x921f21(0x110)](),_0x595ea1);}function readSourceFile(_0x14eee6){const _0x13fe7a=a24_0x2f7cb7;try{const _0x39d587=readFileSync(_0x14eee6,{'encoding':_0x13fe7a(0x124)});return JSON[_0x13fe7a(0x11e)](_0x39d587);}catch(_0xbab0d6){throw CliErrors['validation'](_0x13fe7a(0x14e)+_0xbab0d6[_0x13fe7a(0x130)]);}}function resolveInitEnv(_0xf5f684){const _0x207220=a24_0x2f7cb7,_0x2b0260=_0xf5f684[_0x207220(0x147)];if(_0x2b0260===undefined||_0x2b0260==='')return DEFAULT_CONFIG_VALUES[_0x207220(0x147)];if(!RUNTIME_ENV_VALUES['includes'](_0x2b0260))throw CliErrors['validation'](_0x207220(0x12f)+_0x2b0260+_0x207220(0x125)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x2b0260;}
1
+ const a24_0x1a7b98=a24_0x18e3;(function(_0x4ffe92,_0x7e279b){const _0x2e06c0=a24_0x18e3,_0x4f9692=_0x4ffe92();while(!![]){try{const _0x332fcb=parseInt(_0x2e06c0(0xe6))/0x1*(-parseInt(_0x2e06c0(0xe3))/0x2)+-parseInt(_0x2e06c0(0xd6))/0x3*(-parseInt(_0x2e06c0(0xb1))/0x4)+parseInt(_0x2e06c0(0xd4))/0x5*(parseInt(_0x2e06c0(0xf2))/0x6)+-parseInt(_0x2e06c0(0xd5))/0x7*(parseInt(_0x2e06c0(0xcb))/0x8)+parseInt(_0x2e06c0(0xc5))/0x9+parseInt(_0x2e06c0(0xc3))/0xa+-parseInt(_0x2e06c0(0xb2))/0xb*(parseInt(_0x2e06c0(0xf5))/0xc);if(_0x332fcb===_0x7e279b)break;else _0x4f9692['push'](_0x4f9692['shift']());}catch(_0x15102d){_0x4f9692['push'](_0x4f9692['shift']());}}}(a24_0x8b0a,0xd5bdc));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';function a24_0x18e3(_0xc6aaae,_0xa4d31e){_0xc6aaae=_0xc6aaae-0xb1;const _0x8b0a7b=a24_0x8b0a();let _0x18e3b9=_0x8b0a7b[_0xc6aaae];return _0x18e3b9;}function a24_0x8b0a(){const _0x499882=['8851000jfDEKQ','App\x20code','3435579IAqHVI','utf8','env','\x20already\x20exists.\x20Overwrite?','parse','Aborted.','1688GTFJVd','Override\x20imported\x20default\x20appcode','\x20init\x20—\x20Create\x20','log','File\x20','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','validation',')\x20instead\x20of\x20project','app','50YjxtlG','36169cIvUVy','19566UGGmrW','Imported\x20from\x20','Usage:\x20','includes','entries','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`.','appcode','apiDir','global','flagMissing','AbortPrompt','close','question','1234RuSSnn','stdin','Skip\x20confirmation\x20when\x20overwriting','2703ROESQz','Write\x20to\x20global\x20(~/','\x0aInitialized\x20','string','User\x20aborted\x20prompt','[y/N]','newConfigFileName','riskLevel','Source\x20file\x20not\x20found:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','cancelled','\x20\x20appcode:\x20','920022puizaV','yes','Initialized\x20','127596ZnvatW','cwd','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','App\x20code\x20for\x20the\x20project','\x20\x20config:\x20\x20','648dHCLHl','231ngzWbK','apps','\x20\x20env:\x20\x20\x20\x20\x20','race','message','App\x20code\x20cannot\x20be\x20empty.','Invalid\x20env\x20\x22','removeListener','\x22.\x20Allowed:\x20','file','stdout','SIGINT','project','boolean','\x20\x20default:\x20','trim','Failed\x20to\x20parse\x20source\x20file:\x20'];a24_0x8b0a=function(){return _0x499882;};return a24_0x8b0a();}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';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a24_0x1a7b98(0xe9),'description':a24_0x1a7b98(0xf8)},{'name':a24_0x1a7b98(0xc7),'type':a24_0x1a7b98(0xe9),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a24_0x1a7b98(0xc7)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a24_0x1a7b98(0xbf),'description':a24_0x1a7b98(0xe7)+PRODUCT_CONFIG[a24_0x1a7b98(0xec)]+a24_0x1a7b98(0xd2),'default':![]},{'name':a24_0x1a7b98(0xf3),'type':a24_0x1a7b98(0xbf),'description':a24_0x1a7b98(0xe5),'default':![]}];export const initImportFlagDefs=[{'name':a24_0x1a7b98(0xbb),'type':a24_0x1a7b98(0xe9),'description':a24_0x1a7b98(0xd0),'required':!![]},{'name':a24_0x1a7b98(0xdc),'type':'string','description':a24_0x1a7b98(0xcc)},{'name':a24_0x1a7b98(0xc7),'type':a24_0x1a7b98(0xe9),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x1a7b98(0xde),'type':a24_0x1a7b98(0xbf),'description':a24_0x1a7b98(0xe7)+PRODUCT_CONFIG[a24_0x1a7b98(0xec)]+a24_0x1a7b98(0xd2),'default':![]},{'name':a24_0x1a7b98(0xf3),'type':'boolean','description':a24_0x1a7b98(0xe5),'default':![]}];export async function runInit(_0x1553a6){const _0x5a4c42=a24_0x1a7b98,_0x5650d9=isNonInteractiveMode(_0x1553a6),_0x3cc521=_0x1553a6[_0x5a4c42(0xde)]?_0x5a4c42(0xde):'project',_0x57626e=resolveWriteConfigPath(_0x3cc521);try{_0x5650d9?await runNonInteractive(_0x1553a6,_0x57626e):await runInteractive(_0x1553a6,_0x57626e);}catch(_0x4ac171){if(_0x4ac171 instanceof AbortPrompt)throw CliErrors[_0x5a4c42(0xf0)]();throw _0x4ac171;}}export async function runInitImport(_0x2255ff){const _0x47d540=a24_0x1a7b98,_0x443d20=_0x2255ff[_0x47d540(0xde)]?_0x47d540(0xde):_0x47d540(0xbe),_0x198d4f=resolveWriteConfigPath(_0x443d20);await runFromImport(_0x2255ff,_0x198d4f);}const RUNTIME_IRRELEVANT_KEYS=new Set([a24_0x1a7b98(0xdd)]);async function runFromImport(_0x18db56,_0x8d6e7d){const _0x78d0e4=a24_0x1a7b98,_0x44e229=resolveFilePath(_0x18db56['file']);if(!existsSync(_0x44e229))throw CliErrors[_0x78d0e4(0xd1)](_0x78d0e4(0xee)+_0x44e229);const _0x1016b6=readSourceFile(_0x44e229),_0x2c4af9=convertToRuntimeConfig(_0x1016b6);_0x18db56['appcode']&&(_0x2c4af9['appcode']=String(_0x18db56[_0x78d0e4(0xdc)]));_0x18db56[_0x78d0e4(0xc7)]&&(_0x2c4af9[_0x78d0e4(0xc7)]=resolveInitEnv(_0x18db56));if(!_0x2c4af9['appcode'])throw CliErrors['validation']('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x78d0e4(0xdb));await writeInitConfig(_0x8d6e7d,_0x2c4af9,_0x18db56),console[_0x78d0e4(0xce)](_0x78d0e4(0xd7)+_0x44e229),console[_0x78d0e4(0xce)](_0x78d0e4(0xf9)+_0x8d6e7d),console[_0x78d0e4(0xce)](_0x78d0e4(0xf1)+_0x2c4af9[_0x78d0e4(0xdc)]);if(_0x2c4af9['defaultApp'])console[_0x78d0e4(0xce)](_0x78d0e4(0xc0)+_0x2c4af9['defaultApp']);}function convertToRuntimeConfig(_0xb9339e){const _0x43014f=a24_0x1a7b98;if(_0xb9339e['apps']&&typeof _0xb9339e[_0x43014f(0xb3)]==='object')throw CliErrors[_0x43014f(0xd1)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x43014f(0xef));const _0x1b0f25={};for(const _0x217129 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xb9339e[_0x217129]!==undefined&&(_0x1b0f25[_0x217129]=_0xb9339e[_0x217129]);}return!_0x1b0f25[_0x43014f(0xed)]&&(_0x1b0f25['riskLevel']=DEFAULT_CONFIG_VALUES[_0x43014f(0xed)]),_0x1b0f25;}async function runNonInteractive(_0x53e05d,_0x3516ca){const _0x4cb013=a24_0x1a7b98,_0x9ff943=_0x53e05d[_0x4cb013(0xdc)];if(!_0x9ff943)throw CliErrors[_0x4cb013(0xdf)]('appcode',_0x4cb013(0xd8)+CLI_BIN_NAME+_0x4cb013(0xf7));const _0x3284a4=resolveInitEnv(_0x53e05d);await writeInitConfig(_0x3516ca,{'appcode':_0x9ff943,'env':_0x3284a4},_0x53e05d),console[_0x4cb013(0xce)](_0x4cb013(0xf4)+_0x3516ca),console[_0x4cb013(0xce)]('\x20\x20appcode:\x20'+_0x9ff943),console[_0x4cb013(0xce)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x3284a4);}async function runInteractive(_0x4708ff,_0x393d4d){const _0xbb7e46=a24_0x1a7b98,_0x47341e=loadExisting(_0x393d4d),_0x24f553=typeof _0x47341e?.[_0xbb7e46(0xdc)]==='string'?_0x47341e[_0xbb7e46(0xdc)]:'',_0x1ed720=resolveInitEnv(_0x4708ff);console[_0xbb7e46(0xce)](CLI_BIN_NAME+_0xbb7e46(0xcd)+PRODUCT_CONFIG[_0xbb7e46(0xec)]+'\x0a');if(existsSync(_0x393d4d)&&!_0x4708ff['yes']){const _0x45b4ff=await promptYesNo(_0xbb7e46(0xcf)+_0x393d4d+_0xbb7e46(0xc8),![]);if(!_0x45b4ff){console[_0xbb7e46(0xce)](_0xbb7e46(0xca));return;}}const _0x3f4dc6=typeof _0x4708ff['appcode']===_0xbb7e46(0xe9)?_0x4708ff[_0xbb7e46(0xdc)]['trim']():'';let _0x23740e=_0x3f4dc6;!_0x23740e&&(_0x23740e=await promptInput(_0xbb7e46(0xc4),_0x24f553));if(!_0x23740e[_0xbb7e46(0xc1)]())throw CliErrors[_0xbb7e46(0xd1)](_0xbb7e46(0xb7));await writeInitConfig(_0x393d4d,{'appcode':_0x23740e[_0xbb7e46(0xc1)](),'env':_0x1ed720},_0x4708ff),console[_0xbb7e46(0xce)](_0xbb7e46(0xe8)+_0x393d4d),console[_0xbb7e46(0xce)]('\x20\x20appcode:\x20'+_0x23740e[_0xbb7e46(0xc1)]()),console[_0xbb7e46(0xce)](_0xbb7e46(0xb4)+_0x1ed720);}async function writeInitConfig(_0x45dded,_0x1eb7ac,_0x3b9cd0){const _0x549616=a24_0x1a7b98;let _0x35fbfe={};existsSync(_0x45dded)&&!_0x3b9cd0[_0x549616(0xf3)]&&(_0x35fbfe=readConfigFile(_0x45dded));for(const [_0x5df703,_0x29687a]of Object[_0x549616(0xda)](_0x1eb7ac)){_0x29687a!==undefined&&(_0x35fbfe[_0x5df703]=_0x29687a);}if(_0x35fbfe['app'])delete _0x35fbfe[_0x549616(0xd3)];writeConfigFile(_0x45dded,_0x35fbfe);}class AbortPrompt extends Error{constructor(){const _0x42a45d=a24_0x1a7b98;super(_0x42a45d(0xea)),this['name']=_0x42a45d(0xe0);}}function createSafeRl(){const _0x57f9dd=a24_0x1a7b98,_0x1734f9=createInterface({'input':process[_0x57f9dd(0xe4)],'output':process[_0x57f9dd(0xbc)]});let _0x5e0903;const _0x33880a=new Promise((_0x758112,_0x499512)=>{const _0x534dde=_0x57f9dd;_0x5e0903=()=>{const _0x3a3b5f=a24_0x18e3;_0x5e0903&&(_0x1734f9['removeListener']('SIGINT',_0x5e0903),_0x5e0903=undefined);try{_0x1734f9[_0x3a3b5f(0xe1)]();}catch{}_0x499512(new AbortPrompt());},_0x1734f9['once'](_0x534dde(0xbd),_0x5e0903);}),_0x1c413b=()=>{const _0x54d331=_0x57f9dd;_0x5e0903&&(_0x1734f9[_0x54d331(0xb9)](_0x54d331(0xbd),_0x5e0903),_0x5e0903=undefined);try{_0x1734f9[_0x54d331(0xe1)]();}catch{}};return{'rl':_0x1734f9,'abortPromise':_0x33880a,'disposeSuccess':_0x1c413b};}async function promptInput(_0x5bb998,_0x3c98d5){const _0x5446bb=a24_0x1a7b98,{rl:_0x3587e9,abortPromise:_0x31488f,disposeSuccess:_0x5d13b2}=createSafeRl(),_0x18774e=new Promise(_0x3036b4=>{const _0x58163a=a24_0x18e3,_0x4d17ec=_0x3c98d5?'\x20\x20'+_0x5bb998+'\x20('+_0x3c98d5+'):\x20':'\x20\x20'+_0x5bb998+':\x20';_0x3587e9[_0x58163a(0xe2)](_0x4d17ec,_0x4c91d0=>{const _0x374448=_0x58163a;_0x5d13b2(),_0x3036b4(_0x4c91d0[_0x374448(0xc1)]()||_0x3c98d5);});});return Promise[_0x5446bb(0xb5)]([_0x18774e,_0x31488f]);}async function promptYesNo(_0x2325b9,_0x4c189e){const _0x5eea98=a24_0x1a7b98,{rl:_0x532435,abortPromise:_0x42f3bf,disposeSuccess:_0x4a982d}=createSafeRl(),_0x151bb7=new Promise(_0x1cd493=>{const _0x374acd=a24_0x18e3,_0x52b465=_0x4c189e?'[Y/n]':_0x374acd(0xeb);_0x532435['question']('\x20\x20'+_0x2325b9+'\x20'+_0x52b465+':\x20',_0x512ecf=>{const _0xa426ce=_0x374acd;_0x4a982d();const _0x311b38=_0x512ecf[_0xa426ce(0xc1)]()['toLowerCase']();if(_0x311b38==='y'||_0x311b38==='yes')_0x1cd493(!![]);else{if(_0x311b38==='n'||_0x311b38==='no')_0x1cd493(![]);else _0x1cd493(_0x4c189e);}});});return Promise[_0x5eea98(0xb5)]([_0x151bb7,_0x42f3bf]);}function loadExisting(_0x4a4b14){if(!existsSync(_0x4a4b14))return null;return readConfigFile(_0x4a4b14);}function resolveFilePath(_0x2c92ac){const _0x542b08=a24_0x1a7b98;return isAbsolute(_0x2c92ac)?_0x2c92ac:resolve(process[_0x542b08(0xf6)](),_0x2c92ac);}function readSourceFile(_0x39e249){const _0xc4462e=a24_0x1a7b98;try{const _0xee87d5=readFileSync(_0x39e249,{'encoding':_0xc4462e(0xc6)});return JSON[_0xc4462e(0xc9)](_0xee87d5);}catch(_0x4611b3){throw CliErrors[_0xc4462e(0xd1)](_0xc4462e(0xc2)+_0x4611b3[_0xc4462e(0xb6)]);}}function resolveInitEnv(_0x536753){const _0x1c68e5=a24_0x1a7b98,_0x44afa9=_0x536753[_0x1c68e5(0xc7)];if(_0x44afa9===undefined||_0x44afa9==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x1c68e5(0xd9)](_0x44afa9))throw CliErrors[_0x1c68e5(0xd1)](_0x1c68e5(0xb8)+_0x44afa9+_0x1c68e5(0xba)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x44afa9;}
@@ -1 +1 @@
1
- function a25_0x5e45(){const _0x41796a=['2puTqyN','POST','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','search','scope','4245630gggHbp','build','description','13925592GUEizs','Personal\x20knowledge-base\x20entry\x20ID','read','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','topk','ragStatus','str','validation','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','/update','1156240aEPkHz','Personal\x20knowledge-base\x20entry\x20title','120753laMVoq','body','4tthSDq','Search\x20query\x20is\x20required.','write','updateTime','file','7SGlbCb','isFinite','metadata','11WUmncp','1305978qOvUBr','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','utf8','trim','length','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','File\x20path\x20is\x20required.','query','Updated\x20KB\x20entry\x20','map','3206872ycwFDv','update','1398846UoZkGY','string','appCode','num','--topk\x20must\x20be\x20a\x20positive\x20number.','create','File\x20not\x20found:\x20','title','score','content','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','9vwWUFu','number','version'];a25_0x5e45=function(){return _0x41796a;};return a25_0x5e45();}const a25_0x44c1ca=a25_0x1c71;(function(_0x2c84cb,_0x3fba1f){const _0x44775a=a25_0x1c71,_0xbc3217=_0x2c84cb();while(!![]){try{const _0x198921=parseInt(_0x44775a(0x15b))/0x1*(parseInt(_0x44775a(0x147))/0x2)+parseInt(_0x44775a(0x166))/0x3+-parseInt(_0x44775a(0x15d))/0x4*(-parseInt(_0x44775a(0x159))/0x5)+-parseInt(_0x44775a(0x138))/0x6*(parseInt(_0x44775a(0x162))/0x7)+-parseInt(_0x44775a(0x171))/0x8*(-parseInt(_0x44775a(0x144))/0x9)+parseInt(_0x44775a(0x14c))/0xa*(parseInt(_0x44775a(0x165))/0xb)+-parseInt(_0x44775a(0x14f))/0xc;if(_0x198921===_0x3fba1f)break;else _0xbc3217['push'](_0xbc3217['shift']());}catch(_0x41e2f4){_0xbc3217['push'](_0xbc3217['shift']());}}}(a25_0x5e45,0x35806));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':'title','type':a25_0x44c1ca(0x139),'required':!![],'description':a25_0x44c1ca(0x15a)},FILE_FLAG={'name':'file','type':a25_0x44c1ca(0x139),'required':!![],'description':a25_0x44c1ca(0x143)},QUERY_FLAG={'name':'query','type':a25_0x44c1ca(0x139),'required':!![],'description':a25_0x44c1ca(0x152)},TOPK_FLAG={'name':'topk','type':a25_0x44c1ca(0x145),'description':a25_0x44c1ca(0x149)};function readKnowledgeFile(_0xc4d6b0){const _0x35c1a9=a25_0x44c1ca;if(!_0xc4d6b0)throw CliErrors[_0x35c1a9(0x156)](_0x35c1a9(0x16d));if(!existsSync(_0xc4d6b0))throw CliErrors[_0x35c1a9(0x156)](_0x35c1a9(0x13e)+_0xc4d6b0);if(!statSync(_0xc4d6b0)['isFile']())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0xc4d6b0);return readFileSync(_0xc4d6b0,_0x35c1a9(0x168));}function summarizePersonalItem(_0x198246){const _0x420ca0=a25_0x44c1ca;return{'id':_0x198246['id'],'title':_0x198246[_0x420ca0(0x13f)],'version':_0x198246[_0x420ca0(0x146)],'ragStatus':_0x198246[_0x420ca0(0x154)],'ragErrorMessage':_0x198246['ragErrorMessage'],'updateTime':_0x198246['updateTime']};}function detailPersonalItem(_0x56e355){const _0x37a794=a25_0x44c1ca;return{'id':_0x56e355['id'],'appCode':_0x56e355[_0x37a794(0x13a)],'scope':_0x56e355[_0x37a794(0x14b)],'userId':_0x56e355['userId'],'title':_0x56e355[_0x37a794(0x13f)],'content':_0x56e355[_0x37a794(0x141)]??'','version':_0x56e355[_0x37a794(0x146)],'ragStatus':_0x56e355['ragStatus'],'ragErrorMessage':_0x56e355['ragErrorMessage'],'createTime':_0x56e355['createTime'],'updateTime':_0x56e355[_0x37a794(0x160)]};}function summarizeSearchHit(_0x59bdcb){const _0x289674=a25_0x44c1ca;return{'scope':_0x59bdcb[_0x289674(0x14b)],'docId':_0x59bdcb['docId'],'score':_0x59bdcb[_0x289674(0x140)],'weightedScore':_0x59bdcb['weightedScore'],'content':_0x59bdcb[_0x289674(0x141)],'metadata':_0x59bdcb[_0x289674(0x164)]};}function a25_0x1c71(_0x22b75d,_0x35f919){_0x22b75d=_0x22b75d-0x138;const _0x5e4572=a25_0x5e45();let _0x1c71b6=_0x5e4572[_0x22b75d];return _0x1c71b6;}function readTopK(_0x26777a){const _0x4b8ced=a25_0x44c1ca,_0x69230a=_0x26777a['flag'](_0x4b8ced(0x153));if(_0x69230a===undefined||_0x69230a===null||_0x69230a==='')return undefined;const _0x47d902=_0x26777a[_0x4b8ced(0x13b)](_0x4b8ced(0x153));if(!Number[_0x4b8ced(0x163)](_0x47d902)||_0x47d902<0x1)throw CliErrors[_0x4b8ced(0x156)](_0x4b8ced(0x13c));return _0x47d902;}const kbList={'service':'kb','command':'list','description':a25_0x44c1ca(0x16b),'risk':a25_0x44c1ca(0x151),'flags':[VERBOSE_FLAG],async 'execute'(_0x1d8c9e){const _0x1e3c36=a25_0x44c1ca,_0x32523c=await listPersonalKnowledgeBaseItems(_0x1d8c9e['appCode']);if(_0x1d8c9e['bool']('verbose'))return{'ok':!![],'data':{'total':_0x32523c[_0x1e3c36(0x16a)],'items':_0x32523c}};return{'ok':!![],'data':{'total':_0x32523c['length'],'items':_0x32523c[_0x1e3c36(0x170)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a25_0x44c1ca(0x157),'risk':a25_0x44c1ca(0x151),'flags':[{...ID_FLAG,'description':a25_0x44c1ca(0x150)}],async 'execute'(_0x5aa87e){const _0x25ff32=a25_0x44c1ca,_0x462ae2=await getPersonalKnowledgeBaseItem(_0x5aa87e[_0x25ff32(0x13b)]('id'),_0x5aa87e[_0x25ff32(0x13a)]);return{'ok':!![],'data':detailPersonalItem(_0x462ae2)};}},kbCreate={'service':'kb','command':a25_0x44c1ca(0x13d),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a25_0x44c1ca(0x15f),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5e63e2){const _0xfcf0d7=a25_0x44c1ca,_0x384798=_0x5e63e2['str']('title'),_0x4f9b12=readKnowledgeFile(_0x5e63e2[_0xfcf0d7(0x155)](_0xfcf0d7(0x161))),_0x311281=await createPersonalKnowledgeBaseItem(_0x5e63e2[_0xfcf0d7(0x13a)],{'title':_0x384798,'content':_0x4f9b12});return{'ok':!![],'data':summarizePersonalItem(_0x311281),'message':'Created\x20KB\x20entry\x20'+_0x311281['id']+'\x20('+_0x311281[_0xfcf0d7(0x13f)]+')'};},async 'dryRun'(_0x4c6897){const _0x4d4e85=a25_0x44c1ca,_0x5499eb=_0x4c6897[_0x4d4e85(0x155)]('title'),_0x35f32b=readKnowledgeFile(_0x4c6897[_0x4d4e85(0x155)](_0x4d4e85(0x161)));return dryRun('POST','/client/knowledge-base/personal/create')[_0x4d4e85(0x15c)]({'appCode':_0x4c6897[_0x4d4e85(0x13a)],'title':_0x5499eb,'content':_0x35f32b})[_0x4d4e85(0x14e)](_0x4d4e85(0x167)+_0x5499eb+'\x22')[_0x4d4e85(0x14d)]();}},kbUpdate={'service':'kb','command':a25_0x44c1ca(0x172),'description':a25_0x44c1ca(0x16c),'risk':'write','flags':[{...ID_FLAG,'description':a25_0x44c1ca(0x150)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x36df3f){const _0xd56243=a25_0x44c1ca,_0x5af7b6=_0x36df3f[_0xd56243(0x13b)]('id'),_0x34c0b8=readKnowledgeFile(_0x36df3f[_0xd56243(0x155)](_0xd56243(0x161))),_0x21f503=_0x36df3f[_0xd56243(0x155)](_0xd56243(0x13f))||(await getPersonalKnowledgeBaseItem(_0x5af7b6,_0x36df3f[_0xd56243(0x13a)]))['title'],_0x1abe3a=await updatePersonalKnowledgeBaseItem(_0x5af7b6,_0x36df3f[_0xd56243(0x13a)],{'title':_0x21f503,'content':_0x34c0b8});return{'ok':!![],'data':summarizePersonalItem(_0x1abe3a),'message':_0xd56243(0x16f)+_0x1abe3a['id']+'\x20('+_0x1abe3a['title']+')'};},async 'dryRun'(_0xb2a515){const _0x5fd3bc=a25_0x44c1ca,_0x3b36ec=_0xb2a515['num']('id'),_0x5cc6bc=readKnowledgeFile(_0xb2a515[_0x5fd3bc(0x155)](_0x5fd3bc(0x161))),_0x973ae9=_0xb2a515[_0x5fd3bc(0x155)](_0x5fd3bc(0x13f))||(await getPersonalKnowledgeBaseItem(_0x3b36ec,_0xb2a515[_0x5fd3bc(0x13a)]))[_0x5fd3bc(0x13f)];return dryRun(_0x5fd3bc(0x148),'/client/knowledge-base/personal/'+_0x3b36ec+_0x5fd3bc(0x158))[_0x5fd3bc(0x15c)]({'appCode':_0xb2a515[_0x5fd3bc(0x13a)],'title':_0x973ae9,'content':_0x5cc6bc})['description'](_0x5fd3bc(0x142)+_0x3b36ec)[_0x5fd3bc(0x14d)]();}},kbSearch={'service':'kb','command':a25_0x44c1ca(0x14a),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a25_0x44c1ca(0x151),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4cf31e){const _0xe95fbc=a25_0x44c1ca;if(!_0x4cf31e[_0xe95fbc(0x155)](_0xe95fbc(0x16e))[_0xe95fbc(0x169)]())throw CliErrors[_0xe95fbc(0x156)](_0xe95fbc(0x15e));readTopK(_0x4cf31e);},async 'execute'(_0x4e8b28){const _0x4a4135=a25_0x44c1ca,_0x56b0f0=_0x4e8b28['str'](_0x4a4135(0x16e))[_0x4a4135(0x169)](),_0x54e85d=readTopK(_0x4e8b28),_0x49ee83=await searchKnowledgeBase(_0x4e8b28[_0x4a4135(0x13a)],{'query':_0x56b0f0,'topK':_0x54e85d});return{'ok':!![],'data':{'total':_0x49ee83[_0x4a4135(0x16a)],'hits':_0x49ee83['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a25_0x57bc96=a25_0x92ab;(function(_0x18a233,_0x2167b4){const _0x2bb2b5=a25_0x92ab,_0x59129f=_0x18a233();while(!![]){try{const _0x5b9a9f=parseInt(_0x2bb2b5(0x11b))/0x1+parseInt(_0x2bb2b5(0x108))/0x2+parseInt(_0x2bb2b5(0x114))/0x3*(parseInt(_0x2bb2b5(0xe9))/0x4)+parseInt(_0x2bb2b5(0x119))/0x5*(parseInt(_0x2bb2b5(0xee))/0x6)+parseInt(_0x2bb2b5(0x113))/0x7+parseInt(_0x2bb2b5(0xe7))/0x8*(-parseInt(_0x2bb2b5(0xfb))/0x9)+parseInt(_0x2bb2b5(0x106))/0xa*(-parseInt(_0x2bb2b5(0xe6))/0xb);if(_0x5b9a9f===_0x2167b4)break;else _0x59129f['push'](_0x59129f['shift']());}catch(_0x4f39f2){_0x59129f['push'](_0x59129f['shift']());}}}(a25_0x386d,0xb328d));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a25_0x92ab(_0x2f6eef,_0x5a6802){_0x2f6eef=_0x2f6eef-0xdc;const _0x386db4=a25_0x386d();let _0x92abe0=_0x386db4[_0x2f6eef];return _0x92abe0;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a25_0x386d(){const _0x4953c2=['file','scope','--topk\x20must\x20be\x20a\x20positive\x20number.','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','ragStatus','length','flag','build','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','/client/knowledge-base/personal/create','333ikDNvB','ragErrorMessage','title','appCode','validation','content','createTime','search','map','trim','write','139330WYYdlQ','utf8','2887284tjypiN','docId','description','query','bool','version','create','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','isFile','Personal\x20knowledge-base\x20entry\x20title','read','5014905lZLANJ','354CHeWxH','topk','Personal\x20knowledge-base\x20entry\x20ID','detail','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','20IjTFff','string','701580fwyUoo','/update','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','metadata','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','update','Updated\x20KB\x20entry\x20','File\x20path\x20is\x20required.','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','str','POST','userId','1749kFIjLU','113480CaUJJY','num','13432dsMFYL','updateTime','weightedScore','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','body','324222pszyqp','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app'];a25_0x386d=function(){return _0x4953c2;};return a25_0x386d();}const TITLE_FLAG={'name':a25_0x57bc96(0xfd),'type':a25_0x57bc96(0x11a),'required':!![],'description':a25_0x57bc96(0x111)},FILE_FLAG={'name':'file','type':a25_0x57bc96(0x11a),'required':!![],'description':a25_0x57bc96(0xdc)},QUERY_FLAG={'name':a25_0x57bc96(0x10b),'type':a25_0x57bc96(0x11a),'required':!![],'description':a25_0x57bc96(0xec)},TOPK_FLAG={'name':a25_0x57bc96(0x115),'type':'number','description':a25_0x57bc96(0xf9)};function readKnowledgeFile(_0x226ca8){const _0x332812=a25_0x57bc96;if(!_0x226ca8)throw CliErrors['validation'](_0x332812(0xe1));if(!existsSync(_0x226ca8))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x226ca8);if(!statSync(_0x226ca8)[_0x332812(0x110)]())throw CliErrors[_0x332812(0xff)](_0x332812(0xf4)+_0x226ca8);return readFileSync(_0x226ca8,_0x332812(0x107));}function summarizePersonalItem(_0x3a8c4b){const _0x4b36c3=a25_0x57bc96;return{'id':_0x3a8c4b['id'],'title':_0x3a8c4b[_0x4b36c3(0xfd)],'version':_0x3a8c4b[_0x4b36c3(0x10d)],'ragStatus':_0x3a8c4b['ragStatus'],'ragErrorMessage':_0x3a8c4b[_0x4b36c3(0xfc)],'updateTime':_0x3a8c4b[_0x4b36c3(0xea)]};}function detailPersonalItem(_0x500998){const _0x4abb10=a25_0x57bc96;return{'id':_0x500998['id'],'appCode':_0x500998[_0x4abb10(0xfe)],'scope':_0x500998[_0x4abb10(0xf1)],'userId':_0x500998[_0x4abb10(0xe5)],'title':_0x500998['title'],'content':_0x500998[_0x4abb10(0x100)]??'','version':_0x500998[_0x4abb10(0x10d)],'ragStatus':_0x500998[_0x4abb10(0xf5)],'ragErrorMessage':_0x500998['ragErrorMessage'],'createTime':_0x500998[_0x4abb10(0x101)],'updateTime':_0x500998['updateTime']};}function summarizeSearchHit(_0x2b4c95){const _0x1b208c=a25_0x57bc96;return{'scope':_0x2b4c95[_0x1b208c(0xf1)],'docId':_0x2b4c95[_0x1b208c(0x109)],'score':_0x2b4c95['score'],'weightedScore':_0x2b4c95[_0x1b208c(0xeb)],'content':_0x2b4c95[_0x1b208c(0x100)],'metadata':_0x2b4c95[_0x1b208c(0xdd)]};}function readTopK(_0x43c0ca){const _0x2923c4=a25_0x57bc96,_0x3a2424=_0x43c0ca[_0x2923c4(0xf7)](_0x2923c4(0x115));if(_0x3a2424===undefined||_0x3a2424===null||_0x3a2424==='')return undefined;const _0xa0b1c=_0x43c0ca['num'](_0x2923c4(0x115));if(!Number['isFinite'](_0xa0b1c)||_0xa0b1c<0x1)throw CliErrors[_0x2923c4(0xff)](_0x2923c4(0xf2));return _0xa0b1c;}const kbList={'service':'kb','command':'list','description':a25_0x57bc96(0xef),'risk':a25_0x57bc96(0x112),'flags':[VERBOSE_FLAG],async 'execute'(_0x31fa49){const _0x166b2b=a25_0x57bc96,_0xb191a9=await listPersonalKnowledgeBaseItems(_0x31fa49['appCode']);if(_0x31fa49[_0x166b2b(0x10c)]('verbose'))return{'ok':!![],'data':{'total':_0xb191a9[_0x166b2b(0xf6)],'items':_0xb191a9}};return{'ok':!![],'data':{'total':_0xb191a9[_0x166b2b(0xf6)],'items':_0xb191a9[_0x166b2b(0x103)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a25_0x57bc96(0x117),'description':a25_0x57bc96(0xe2),'risk':a25_0x57bc96(0x112),'flags':[{...ID_FLAG,'description':a25_0x57bc96(0x116)}],async 'execute'(_0x5795c8){const _0x1c8a92=a25_0x57bc96,_0x408076=await getPersonalKnowledgeBaseItem(_0x5795c8['num']('id'),_0x5795c8[_0x1c8a92(0xfe)]);return{'ok':!![],'data':detailPersonalItem(_0x408076)};}},kbCreate={'service':'kb','command':a25_0x57bc96(0x10e),'description':a25_0x57bc96(0xde),'risk':a25_0x57bc96(0x105),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x456f18){const _0xf03ef6=a25_0x57bc96,_0x4c87e2=_0x456f18['str']('title'),_0x5f3868=readKnowledgeFile(_0x456f18[_0xf03ef6(0xe3)](_0xf03ef6(0xf0))),_0x229bb5=await createPersonalKnowledgeBaseItem(_0x456f18[_0xf03ef6(0xfe)],{'title':_0x4c87e2,'content':_0x5f3868});return{'ok':!![],'data':summarizePersonalItem(_0x229bb5),'message':'Created\x20KB\x20entry\x20'+_0x229bb5['id']+'\x20('+_0x229bb5[_0xf03ef6(0xfd)]+')'};},async 'dryRun'(_0x525aa0){const _0x3aa55f=a25_0x57bc96,_0x314e2a=_0x525aa0[_0x3aa55f(0xe3)]('title'),_0x2a7c92=readKnowledgeFile(_0x525aa0[_0x3aa55f(0xe3)]('file'));return dryRun(_0x3aa55f(0xe4),_0x3aa55f(0xfa))[_0x3aa55f(0xed)]({'appCode':_0x525aa0[_0x3aa55f(0xfe)],'title':_0x314e2a,'content':_0x2a7c92})[_0x3aa55f(0x10a)](_0x3aa55f(0x10f)+_0x314e2a+'\x22')[_0x3aa55f(0xf8)]();}},kbUpdate={'service':'kb','command':a25_0x57bc96(0xdf),'description':a25_0x57bc96(0x118),'risk':a25_0x57bc96(0x105),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x477af8){const _0xe1a185=a25_0x57bc96,_0x2fcccd=_0x477af8[_0xe1a185(0xe8)]('id'),_0x59f821=readKnowledgeFile(_0x477af8[_0xe1a185(0xe3)](_0xe1a185(0xf0))),_0x51116d=_0x477af8['str']('title')||(await getPersonalKnowledgeBaseItem(_0x2fcccd,_0x477af8[_0xe1a185(0xfe)]))[_0xe1a185(0xfd)],_0x210dc0=await updatePersonalKnowledgeBaseItem(_0x2fcccd,_0x477af8['appCode'],{'title':_0x51116d,'content':_0x59f821});return{'ok':!![],'data':summarizePersonalItem(_0x210dc0),'message':_0xe1a185(0xe0)+_0x210dc0['id']+'\x20('+_0x210dc0['title']+')'};},async 'dryRun'(_0x56c90b){const _0x503c9e=a25_0x57bc96,_0x390932=_0x56c90b[_0x503c9e(0xe8)]('id'),_0x3a3c65=readKnowledgeFile(_0x56c90b[_0x503c9e(0xe3)](_0x503c9e(0xf0))),_0x4b2fce=_0x56c90b[_0x503c9e(0xe3)]('title')||(await getPersonalKnowledgeBaseItem(_0x390932,_0x56c90b[_0x503c9e(0xfe)]))[_0x503c9e(0xfd)];return dryRun('POST','/client/knowledge-base/personal/'+_0x390932+_0x503c9e(0x11c))[_0x503c9e(0xed)]({'appCode':_0x56c90b['appCode'],'title':_0x4b2fce,'content':_0x3a3c65})[_0x503c9e(0x10a)](_0x503c9e(0xf3)+_0x390932)['build']();}},kbSearch={'service':'kb','command':a25_0x57bc96(0x102),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4dcd55){const _0x3a9ba3=a25_0x57bc96;if(!_0x4dcd55[_0x3a9ba3(0xe3)](_0x3a9ba3(0x10b))[_0x3a9ba3(0x104)]())throw CliErrors[_0x3a9ba3(0xff)]('Search\x20query\x20is\x20required.');readTopK(_0x4dcd55);},async 'execute'(_0x5383ba){const _0x521c86=a25_0x57bc96,_0x46ee9c=_0x5383ba[_0x521c86(0xe3)](_0x521c86(0x10b))['trim'](),_0x34da07=readTopK(_0x5383ba),_0xbb76fb=await searchKnowledgeBase(_0x5383ba[_0x521c86(0xfe)],{'query':_0x46ee9c,'topK':_0x34da07});return{'ok':!![],'data':{'total':_0xbb76fb[_0x521c86(0xf6)],'hits':_0xbb76fb['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a26_0x3bdff0=a26_0x51d3;function a26_0x51d3(_0x466fef,_0x396535){_0x466fef=_0x466fef-0xa3;const _0x27e143=a26_0x27e1();let _0x51d352=_0x27e143[_0x466fef];return _0x51d352;}(function(_0x521a13,_0x4bc1b1){const _0x37eafe=a26_0x51d3,_0x47c995=_0x521a13();while(!![]){try{const _0x1945c2=-parseInt(_0x37eafe(0xbd))/0x1*(-parseInt(_0x37eafe(0xa7))/0x2)+parseInt(_0x37eafe(0xad))/0x3+parseInt(_0x37eafe(0xaf))/0x4+-parseInt(_0x37eafe(0xb0))/0x5+parseInt(_0x37eafe(0xb8))/0x6*(parseInt(_0x37eafe(0xa3))/0x7)+parseInt(_0x37eafe(0xab))/0x8*(-parseInt(_0x37eafe(0xc5))/0x9)+parseInt(_0x37eafe(0xac))/0xa*(parseInt(_0x37eafe(0xba))/0xb);if(_0x1945c2===_0x4bc1b1)break;else _0x47c995['push'](_0x47c995['shift']());}catch(_0x2d3a8d){_0x47c995['push'](_0x47c995['shift']());}}}(a26_0x27e1,0x7ac89));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x27e1(){const _0x4125a4=['details','*\x20Logs\x20cleared','clear','8013496QasOGH','70lKMeLu','682113hwODdH','level','2302932QuTlGD','4109295gEnTNm','clearLogs','Clear\x20command\x20history\x20logs','show','command','keys','timestamp','\x20\x20\x20Details:\x20','48eHqIMq','success','455037DsqLAO','length','toLocaleString','27EbBZEP','\x20logs:\x0a','\x20\x20\x20Duration:\x20','stringify','forEach','log','duration','en-US','9vQsScV','787801sgsrZI','View\x20command\x20history\x20logs','read','error','24700OuyQWY'];a26_0x27e1=function(){return _0x4125a4;};return a26_0x27e1();}function printLogs(_0x537aa5){const _0x9bb25d=a26_0x51d3;if(_0x537aa5[_0x9bb25d(0xbb)]===0x0){console[_0x9bb25d(0xc2)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x9bb25d(0xbe)),_0x537aa5[_0x9bb25d(0xc1)]((_0x3bd968,_0xb29f84)=>{const _0x1955b0=_0x9bb25d,_0x3ae236=new Date(_0x3bd968[_0x1955b0(0xb6)])[_0x1955b0(0xbc)](_0x1955b0(0xc4)),_0xeef659=_0x3bd968['level']===_0x1955b0(0xb9)?'√':_0x3bd968[_0x1955b0(0xae)]===_0x1955b0(0xa6)?'×':_0x3bd968[_0x1955b0(0xae)]==='warn'?'!':'i';console[_0x1955b0(0xc2)](_0xb29f84+0x1+'.\x20'+_0xeef659+'\x20['+_0x3bd968[_0x1955b0(0xb4)]+']\x20'+_0x3bd968['message']),console['log']('\x20\x20\x20Time:\x20'+_0x3ae236),_0x3bd968[_0x1955b0(0xc3)]&&console['log'](_0x1955b0(0xbf)+_0x3bd968[_0x1955b0(0xc3)]+'ms'),_0x3bd968[_0x1955b0(0xa8)]&&Object[_0x1955b0(0xb5)](_0x3bd968['details'])['length']>0x0&&console[_0x1955b0(0xc2)](_0x1955b0(0xb7)+JSON[_0x1955b0(0xc0)](_0x3bd968[_0x1955b0(0xa8)],null,0x2)),console[_0x1955b0(0xc2)]('');});}export const logsDefinitions=[{'service':'logs','command':a26_0x3bdff0(0xb3),'description':a26_0x3bdff0(0xa4),'risk':a26_0x3bdff0(0xa5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5b87db){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a26_0x3bdff0(0xaa),'description':a26_0x3bdff0(0xb2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2c9941){const _0x4b7b68=a26_0x3bdff0;return logger[_0x4b7b68(0xb1)](),console[_0x4b7b68(0xc2)](_0x4b7b68(0xa9)),{'ok':!![]};}}];
1
+ const a26_0x2f3d09=a26_0xd23c;(function(_0x2888fa,_0x5aa577){const _0x19873d=a26_0xd23c,_0x58f14a=_0x2888fa();while(!![]){try{const _0x340b87=-parseInt(_0x19873d(0x171))/0x1+parseInt(_0x19873d(0x179))/0x2+parseInt(_0x19873d(0x187))/0x3+-parseInt(_0x19873d(0x17c))/0x4+parseInt(_0x19873d(0x17f))/0x5*(parseInt(_0x19873d(0x188))/0x6)+parseInt(_0x19873d(0x194))/0x7*(parseInt(_0x19873d(0x175))/0x8)+-parseInt(_0x19873d(0x189))/0x9;if(_0x340b87===_0x5aa577)break;else _0x58f14a['push'](_0x58f14a['shift']());}catch(_0x1a5083){_0x58f14a['push'](_0x58f14a['shift']());}}}(a26_0x1e5f,0xcc9ec));function a26_0x1e5f(){const _0x48d321=['Clear\x20command\x20history\x20logs','11576hGHtvb','\x20logs:\x0a','\x20\x20\x20Duration:\x20','error','1168932wOIkCo','show','*\x20No\x20logs\x20found','3637944PHqOUd','clearLogs','logs','15AMzKMz','keys','*\x20Logs\x20cleared','read','readLogs','\x20\x20\x20Details:\x20','duration','level','3603768DOqgAu','1736364vZFcAG','3651831qXeOVe','message','\x20\x20\x20Time:\x20','timestamp','View\x20command\x20history\x20logs','toLocaleString','clear','stringify','en-US','write','length','70zCZhiz','log','515005LjMBPf','success','details'];a26_0x1e5f=function(){return _0x48d321;};return a26_0x1e5f();}function a26_0xd23c(_0xc8cbba,_0x1cb5fc){_0xc8cbba=_0xc8cbba-0x170;const _0x1e5fff=a26_0x1e5f();let _0xd23cab=_0x1e5fff[_0xc8cbba];return _0xd23cab;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x275117){const _0x47683a=a26_0xd23c;if(_0x275117[_0x47683a(0x193)]===0x0){console['log'](_0x47683a(0x17b));return;}console[_0x47683a(0x170)]('*\x20'+CLI_DISPLAY_NAME+_0x47683a(0x176)),_0x275117['forEach']((_0x59ae03,_0x4f5371)=>{const _0x10fa10=_0x47683a,_0x51eabf=new Date(_0x59ae03[_0x10fa10(0x18c)])[_0x10fa10(0x18e)](_0x10fa10(0x191)),_0x46e063=_0x59ae03[_0x10fa10(0x186)]===_0x10fa10(0x172)?'√':_0x59ae03[_0x10fa10(0x186)]===_0x10fa10(0x178)?'×':_0x59ae03[_0x10fa10(0x186)]==='warn'?'!':'i';console['log'](_0x4f5371+0x1+'.\x20'+_0x46e063+'\x20['+_0x59ae03['command']+']\x20'+_0x59ae03[_0x10fa10(0x18a)]),console[_0x10fa10(0x170)](_0x10fa10(0x18b)+_0x51eabf),_0x59ae03[_0x10fa10(0x185)]&&console[_0x10fa10(0x170)](_0x10fa10(0x177)+_0x59ae03[_0x10fa10(0x185)]+'ms'),_0x59ae03[_0x10fa10(0x173)]&&Object[_0x10fa10(0x180)](_0x59ae03[_0x10fa10(0x173)])[_0x10fa10(0x193)]>0x0&&console[_0x10fa10(0x170)](_0x10fa10(0x184)+JSON[_0x10fa10(0x190)](_0x59ae03[_0x10fa10(0x173)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a26_0x2f3d09(0x17e),'command':a26_0x2f3d09(0x17a),'description':a26_0x2f3d09(0x18d),'risk':a26_0x2f3d09(0x182),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4f8a5b){const _0x5e5557=a26_0x2f3d09;return printLogs(logger[_0x5e5557(0x183)]()),{'ok':!![]};}},{'service':'logs','command':a26_0x2f3d09(0x18f),'description':a26_0x2f3d09(0x174),'risk':a26_0x2f3d09(0x192),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a7244){const _0x7645da=a26_0x2f3d09;return logger[_0x7645da(0x17d)](),console[_0x7645da(0x170)](_0x7645da(0x181)),{'ok':!![]};}}];