@lovrabet/lovrabet-cli 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +184 -0
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -0
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/lib/commands/init/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a13_0x5d753c=a13_0x1f88;(function(_0x35e9ab,_0x48db2f){const _0x3aaa73=a13_0x1f88,_0x40ff16=_0x35e9ab();while(!![]){try{const _0x345a5f=-parseInt(_0x3aaa73(0xbf))/0x1+parseInt(_0x3aaa73(0xb4))/0x2+-parseInt(_0x3aaa73(0xc0))/0x3*(parseInt(_0x3aaa73(0xb9))/0x4)+-parseInt(_0x3aaa73(0xbb))/0x5+-parseInt(_0x3aaa73(0xc2))/0x6*(-parseInt(_0x3aaa73(0xb2))/0x7)+parseInt(_0x3aaa73(0xc6))/0x8+parseInt(_0x3aaa73(0xc4))/0x9*(parseInt(_0x3aaa73(0xb5))/0xa);if(_0x345a5f===_0x48db2f)break;else _0x40ff16['push'](_0x40ff16['shift']());}catch(_0x5039f8){_0x40ff16['push'](_0x40ff16['shift']());}}}(a13_0x3537,0xc8ba6));export const CODE_FLAG={'name':a13_0x5d753c(0xb0),'type':a13_0x5d753c(0xbc),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x5d753c(0xba)}};export const SQLCODE_FLAG={'name':a13_0x5d753c(0xb8),'type':a13_0x5d753c(0xbc),'required':!![],'description':a13_0x5d753c(0xc5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x5d753c(0xb1)}};export const VERBOSE_FLAG={'name':a13_0x5d753c(0xaf),'type':a13_0x5d753c(0xbd),'description':'Return\x20full\x20raw\x20response\x20object'};function a13_0x3537(){const _0x5be3eb=['number','1036614yHKFWH','10zDMgFU','name','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','sqlcode','4mqSUaC','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','2930040MXqgnq','string','boolean','Resource\x20name\x20for\x20lookup','1568083wAHByw','4034451fNOGbl','Resource\x20ID','42SNzvHJ','params','18856143TKzypD','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','11120416ViKvBj','verbose','code','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','317604WBPOYi'];a13_0x3537=function(){return _0x5be3eb;};return a13_0x3537();}function a13_0x1f88(_0xbdffbf,_0x423a01){_0xbdffbf=_0xbdffbf-0xaf;const _0x353764=a13_0x3537();let _0x1f88f6=_0x353764[_0xbdffbf];return _0x1f88f6;}export const PARAMS_FLAG={'name':a13_0x5d753c(0xc3),'type':a13_0x5d753c(0xbc),'description':a13_0x5d753c(0xb7)};export const NAME_FLAG={'name':a13_0x5d753c(0xb6),'type':a13_0x5d753c(0xbc),'description':a13_0x5d753c(0xbe)};export const ID_FLAG={'name':'id','type':a13_0x5d753c(0xb3),'required':!![],'description':a13_0x5d753c(0xc1)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x9fc3(){const _0x21664b=['#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','../../context.js','25152HYjOvH','write','Value\x20to\x20assign','delete','\x20config\x20set\x20<key>\x20<value>\x20[--global]','args','includes','Usage:\x20','raw','global','406HdbJKz','bool','key','set','Top-level\x20key\x20\x22','read','Settable\x20top-level\x20keys:\x20','object','\x20\x20global:\x20\x20','\x22\x20is\x20not\x20settable.','337814kYltaI','pageSize','pretty','pageSize\x20must\x20be\x20a\x20positive\x20number','log','boolean','stringify','Key\x20not\x20found:\x20','Missing\x20key\x20argument.','Delete\x20a\x20config\x20value','Write\x20to\x20global\x20config','2878011KCskBe','\x20\x20project:\x20','Config\x20files:\x0a','Get\x20a\x20config\x20value','6wtUrER','4075936xQaEPz','format','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','join','validation','List\x20current\x20config','\x20config\x20delete\x20<key>\x20[--global]','`\x20=\x20\x22','3491665vMMupz','1053639soYSYb','config','project-or-global-explicit','riskLevel','2148471uiaxLK','\x20(global)','Invalid\x20value\x20for\x20\x22','Set\x20`'];a14_0x9fc3=function(){return _0x21664b;};return a14_0x9fc3();}const a14_0x2d66b8=a14_0x3f33;(function(_0x29407e,_0x42a260){const _0x5f1c88=a14_0x3f33,_0x53a3b1=_0x29407e();while(!![]){try{const _0x5a486f=parseInt(_0x5f1c88(0x151))/0x1+parseInt(_0x5f1c88(0x138))/0x2+-parseInt(_0x5f1c88(0x143))/0x3+parseInt(_0x5f1c88(0x148))/0x4+-parseInt(_0x5f1c88(0x150))/0x5*(parseInt(_0x5f1c88(0x147))/0x6)+-parseInt(_0x5f1c88(0x165))/0x7*(parseInt(_0x5f1c88(0x15b))/0x8)+parseInt(_0x5f1c88(0x155))/0x9;if(_0x5a486f===_0x42a260)break;else _0x53a3b1['push'](_0x53a3b1['shift']());}catch(_0x1015fa){_0x53a3b1['push'](_0x53a3b1['shift']());}}}(a14_0x9fc3,0x9c4e3));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';function a14_0x3f33(_0x19540a,_0x2418c9){_0x19540a=_0x19540a-0x136;const _0x9fc34f=a14_0x9fc3();let _0x3f338c=_0x9fc34f[_0x19540a];return _0x3f338c;}const GLOBAL_FLAG={'name':a14_0x2d66b8(0x164),'type':a14_0x2d66b8(0x13d),'description':a14_0x2d66b8(0x142),'default':![]},listDef={'service':a14_0x2d66b8(0x152),'command':'list','description':a14_0x2d66b8(0x14d),'risk':a14_0x2d66b8(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3fe21a){const _0x5e2bdb=a14_0x2d66b8,{buildConfigFromFlags:_0x2ce836}=await import(_0x5e2bdb(0x15a)),_0x10043f=_0x2ce836({}),_0xbce7fb=getProjectConfigPath(),_0x5a28fa=resolveWriteConfigPath(_0x5e2bdb(0x164));if(_0x3fe21a[_0x5e2bdb(0x149)]===_0x5e2bdb(0x13a))return{'ok':!![],'message':_0x5e2bdb(0x159)+(JSON['stringify'](_0x10043f[_0x5e2bdb(0x163)],null,0x2)+'\x0a\x0a')+_0x5e2bdb(0x145)+(_0x5e2bdb(0x144)+(_0xbce7fb??'(none)')+'\x0a')+(_0x5e2bdb(0x136)+_0x5a28fa)};return{'ok':!![],'data':{'effective':_0x10043f['raw'],'configFiles':{'project':_0xbce7fb??null,'global':_0x5a28fa}}};}},getDef={'service':a14_0x2d66b8(0x152),'command':'get','description':a14_0x2d66b8(0x146),'risk':a14_0x2d66b8(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x2d66b8(0x167),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x50a348){const _0x533c8e=a14_0x2d66b8,_0x4cb306=_0x50a348[_0x533c8e(0x160)][0x0];if(!_0x4cb306)throw CliErrors[_0x533c8e(0x14c)](_0x533c8e(0x140),_0x533c8e(0x162)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x28b284}=await import(_0x533c8e(0x15a)),{raw:_0x4a88dc}=_0x28b284({});if(_0x4cb306[_0x533c8e(0x161)]('.')){const _0x48c55a=_0x4cb306['split']('.');let _0x40cdaf=_0x4a88dc;for(const _0x2481ea of _0x48c55a){if(_0x40cdaf==null||typeof _0x40cdaf!=='object')throw CliErrors['validation'](_0x533c8e(0x13f)+_0x4cb306);_0x40cdaf=_0x40cdaf[_0x2481ea];}if(_0x40cdaf===undefined)throw CliErrors[_0x533c8e(0x14c)](_0x533c8e(0x13f)+_0x4cb306);return console['log'](typeof _0x40cdaf===_0x533c8e(0x16c)?JSON[_0x533c8e(0x13e)](_0x40cdaf,null,0x2):String(_0x40cdaf)),{'ok':!![]};}const _0x2feb88=_0x4a88dc[_0x4cb306];if(_0x2feb88===undefined)throw CliErrors[_0x533c8e(0x14c)](_0x533c8e(0x13f)+_0x4cb306);return console['log'](typeof _0x2feb88==='object'?JSON[_0x533c8e(0x13e)](_0x2feb88,null,0x2):String(_0x2feb88)),{'ok':!![]};}},setDef={'service':a14_0x2d66b8(0x152),'command':a14_0x2d66b8(0x168),'description':'Set\x20a\x20config\x20value','risk':a14_0x2d66b8(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x2d66b8(0x167),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a14_0x2d66b8(0x15d),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4e2fb1){const _0xca2f70=a14_0x2d66b8,_0x1b8bdf=_0x4e2fb1[_0xca2f70(0x160)][0x0],_0x3fcc1d=_0x4e2fb1['args'][0x1];if(!_0x1b8bdf||_0x3fcc1d===undefined)throw CliErrors[_0xca2f70(0x14c)]('Missing\x20key\x20or\x20value.',_0xca2f70(0x162)+CLI_BIN_NAME+_0xca2f70(0x15f));if(ENUM_KEYS[_0x1b8bdf]&&!ENUM_KEYS[_0x1b8bdf][_0xca2f70(0x161)](_0x3fcc1d))throw CliErrors['validation'](_0xca2f70(0x157)+_0x1b8bdf+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1b8bdf][_0xca2f70(0x14b)](',\x20'));if(_0x1b8bdf===_0xca2f70(0x154))throw CliErrors['validation'](_0xca2f70(0x14a));if(_0x1b8bdf===_0xca2f70(0x139)){const _0x360fd0=Number(_0x3fcc1d);if(isNaN(_0x360fd0)||_0x360fd0<=0x0)throw CliErrors[_0xca2f70(0x14c)](_0xca2f70(0x13b));}const _0x389d5a=resolveWriteScope({'explicitGlobal':_0x4e2fb1['bool'](_0xca2f70(0x164)),'policy':_0xca2f70(0x153)}),_0x1cd2ef=toScopeFlags(_0x389d5a),_0x32ec16=readScopedConfig(_0x1cd2ef);if(!isTopLevelConfigKey(_0x1b8bdf))throw CliErrors['validation'](_0xca2f70(0x169)+_0x1b8bdf+_0xca2f70(0x137),_0xca2f70(0x16b)+getTopLevelConfigKeySummary());return _0x32ec16[_0x1b8bdf]=_0x1b8bdf==='pageSize'?Number(_0x3fcc1d):_0x3fcc1d,console[_0xca2f70(0x13c)](_0xca2f70(0x158)+_0x1b8bdf+_0xca2f70(0x14f)+_0x3fcc1d+'\x22'+(_0x389d5a===_0xca2f70(0x164)?_0xca2f70(0x156):'')),writeScopedConfig(_0x32ec16,_0x1cd2ef),{'ok':!![]};}},deleteDef={'service':a14_0x2d66b8(0x152),'command':a14_0x2d66b8(0x15e),'description':a14_0x2d66b8(0x141),'risk':a14_0x2d66b8(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1a7a2d){const _0x4c7523=a14_0x2d66b8,_0x448f11=_0x1a7a2d[_0x4c7523(0x160)][0x0];if(!_0x448f11)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x4c7523(0x162)+CLI_BIN_NAME+_0x4c7523(0x14e));const _0x39b4ef=resolveWriteScope({'explicitGlobal':_0x1a7a2d[_0x4c7523(0x166)](_0x4c7523(0x164)),'policy':_0x4c7523(0x153)}),_0x4a7118=toScopeFlags(_0x39b4ef),_0x26d893=readScopedConfig(_0x4a7118);if(_0x26d893[_0x448f11]===undefined)throw CliErrors[_0x4c7523(0x14c)]('Key\x20\x22'+_0x448f11+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x26d893[_0x448f11],console[_0x4c7523(0x13c)]('Deleted\x20`'+_0x448f11+'`'+(_0x39b4ef===_0x4c7523(0x164)?'\x20(global)':'')),writeScopedConfig(_0x26d893,_0x4a7118),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a15_0x1f12(){var _0x1d3828=['102422sFdpWA','2987528tGMzlR','1335259OyqqKW','345821BAEycg','2557710kRsLhg','6105177OuyiHi','10YIjFbk','190750ZejEuF','39txKeHr','136JXkPaz'];a15_0x1f12=function(){return _0x1d3828;};return a15_0x1f12();}(function(_0x665003,_0x2a80b6){var _0x3ca7fb=a15_0x2f0b,_0x330cff=_0x665003();while(!![]){try{var _0x57bfb5=parseInt(_0x3ca7fb(0x85))/0x1+-parseInt(_0x3ca7fb(0x83))/0x2*(-parseInt(_0x3ca7fb(0x8b))/0x3)+-parseInt(_0x3ca7fb(0x84))/0x4+parseInt(_0x3ca7fb(0x8a))/0x5+-parseInt(_0x3ca7fb(0x87))/0x6+-parseInt(_0x3ca7fb(0x86))/0x7*(parseInt(_0x3ca7fb(0x82))/0x8)+parseInt(_0x3ca7fb(0x88))/0x9*(parseInt(_0x3ca7fb(0x89))/0xa);if(_0x57bfb5===_0x2a80b6)break;else _0x330cff['push'](_0x330cff['shift']());}catch(_0x5e9005){_0x330cff['push'](_0x330cff['shift']());}}}(a15_0x1f12,0xabfe7));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x2f0b(_0x2d55c2,_0x6c2fd8){_0x2d55c2=_0x2d55c2-0x82;var _0x1f127e=a15_0x1f12();var _0x2f0b65=_0x1f127e[_0x2d55c2];return _0x2f0b65;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a16_0x6c0a(_0x204982,_0x401459){_0x204982=_0x204982-0x1ab;const _0x3c04f1=a16_0x3c04();let _0x6c0a41=_0x3c04f1[_0x204982];return _0x6c0a41;}const a16_0x968d7b=a16_0x6c0a;(function(_0x495806,_0x36c309){const _0x300e21=a16_0x6c0a,_0x25a7fa=_0x495806();while(!![]){try{const _0x8fa301=parseInt(_0x300e21(0x1dd))/0x1*(parseInt(_0x300e21(0x1b0))/0x2)+parseInt(_0x300e21(0x1b8))/0x3*(-parseInt(_0x300e21(0x1cc))/0x4)+-parseInt(_0x300e21(0x1e5))/0x5+-parseInt(_0x300e21(0x1f2))/0x6+-parseInt(_0x300e21(0x1da))/0x7*(-parseInt(_0x300e21(0x1f9))/0x8)+-parseInt(_0x300e21(0x1b3))/0x9+parseInt(_0x300e21(0x1cf))/0xa;if(_0x8fa301===_0x36c309)break;else _0x25a7fa['push'](_0x25a7fa['shift']());}catch(_0xa1f6df){_0x25a7fa['push'](_0x25a7fa['shift']());}}}(a16_0x3c04,0x7a684));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 a16_0x3c04(){const _0x5ad0bb=['713178BepCkQ','\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}}','paramsRequired','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','getOne','61554wFsPgi','update','\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}','risk','\x20\x20WHERE\x20OPERATORS','now','\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\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','str','map','data','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','operation','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\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\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','aggregate','64oukPNQ','\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\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}}','11001030LSkkor','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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}','join','description','command','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','/api/{appCode}/','308Avwyxv','\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\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','211CuWyrD','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','build','data\x20','read','batchCreate','write','\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}}','421615tPaUcI','\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\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}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','delete','POST','code','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','4015158AAmzBy','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','dryRun','params','filter','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\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}}','65680qJzDxO','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20on\x20dataset\x20','helpExtra','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$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}}','body','\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}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','1906kFblVD','create','\x20\x20PARAMS\x20STRUCTURE'];a16_0x3c04=function(){return _0x5ad0bb;};return a16_0x3c04();}const specs=[{'command':a16_0x968d7b(0x1f6),'operation':a16_0x968d7b(0x1f6),'risk':a16_0x968d7b(0x1e1),'paramsRequired':![],'description':a16_0x968d7b(0x1d7),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a16_0x968d7b(0x1e9),'helpExtra':[a16_0x968d7b(0x1bc),a16_0x968d7b(0x1b4),a16_0x968d7b(0x1f8),'\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}}',a16_0x968d7b(0x1e4),a16_0x968d7b(0x1ab),a16_0x968d7b(0x1ce),a16_0x968d7b(0x1be),'\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}}',a16_0x968d7b(0x1d5),a16_0x968d7b(0x1ac),'',a16_0x968d7b(0x1bf),'\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}}]}',a16_0x968d7b(0x1c8),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a16_0x968d7b(0x1d0),a16_0x968d7b(0x1c9),a16_0x968d7b(0x1db),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x968d7b(0x1f1),'','\x20\x20PAGINATION',a16_0x968d7b(0x1ca),a16_0x968d7b(0x1c0),a16_0x968d7b(0x1f3)][a16_0x968d7b(0x1d2)]('\x0a')},{'command':'getOne','operation':a16_0x968d7b(0x1b7),'risk':a16_0x968d7b(0x1e1),'paramsRequired':!![],'description':a16_0x968d7b(0x1ea),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a16_0x968d7b(0x1b1),'risk':'write','paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a16_0x968d7b(0x1af)},{'command':'batchCreate','operation':'batchCreate','risk':a16_0x968d7b(0x1e3),'paramsRequired':!![],'description':a16_0x968d7b(0x1c5),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':'update','operation':a16_0x968d7b(0x1b9),'risk':a16_0x968d7b(0x1e3),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a16_0x968d7b(0x1de)},{'command':'delete','operation':a16_0x968d7b(0x1ee),'risk':'high-risk-write','paramsRequired':!![],'description':a16_0x968d7b(0x1d8),'paramsHint':a16_0x968d7b(0x1ec)},{'command':'aggregate','operation':a16_0x968d7b(0x1cb),'risk':a16_0x968d7b(0x1e1),'paramsRequired':![],'description':a16_0x968d7b(0x1b6),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x968d7b(0x1c7),a16_0x968d7b(0x1ae),a16_0x968d7b(0x1eb),a16_0x968d7b(0x1d1),a16_0x968d7b(0x1f7),a16_0x968d7b(0x1e8),a16_0x968d7b(0x1ba),a16_0x968d7b(0x1fa),'',a16_0x968d7b(0x1b2),'\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]',a16_0x968d7b(0x1e6),a16_0x968d7b(0x1d6),a16_0x968d7b(0x1c4),'\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}}',a16_0x968d7b(0x1ed),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x968d7b(0x1fb),'',a16_0x968d7b(0x1dc),a16_0x968d7b(0x1cd)]['join']('\x0a')}];function makeDataCommand(_0x51af36){const _0x148d50=a16_0x968d7b,_0x4b29d3=_0x148d50(0x1e0)+_0x51af36[_0x148d50(0x1d4)],_0x56f172={'service':_0x148d50(0x1c3),'command':_0x51af36['command'],'description':_0x51af36[_0x148d50(0x1d3)],'risk':_0x51af36['risk'],'helpExtra':_0x51af36[_0x148d50(0x1fd)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x51af36['paramsHint']}],'validate':async _0x2f6ea8=>{const _0x3cb081=_0x148d50;_0x51af36[_0x3cb081(0x1b5)]&&requireAnyOf(_0x2f6ea8,['params'],_0x4b29d3),_0x51af36['operation']===_0x3cb081(0x1e2)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2f6ea8['str']('params')));},async 'execute'(_0x322560){const _0x401c7b=_0x148d50,_0x4c7478=_0x322560['str'](_0x401c7b(0x1f0)),_0x36f662=_0x51af36['operation']===_0x401c7b(0x1e2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x322560[_0x401c7b(0x1c1)](_0x401c7b(0x1f5)))):parseJsonParams(_0x322560[_0x401c7b(0x1c1)](_0x401c7b(0x1f5)))??{},_0x26d7e2=Date[_0x401c7b(0x1bd)](),_0xb88326=await executeData(_0x4c7478,_0x51af36['operation'],_0x36f662),_0x259e42=Date[_0x401c7b(0x1bd)]()-_0x26d7e2;return{'ok':!![],'data':{'result':_0xb88326,'elapsed':_0x259e42},'message':_0x401c7b(0x1e0)+_0x51af36[_0x401c7b(0x1d4)]+_0x401c7b(0x1e7)+_0x259e42+'ms'};}};return _0x51af36[_0x148d50(0x1bb)]!==_0x148d50(0x1e1)&&(_0x56f172[_0x148d50(0x1f4)]=async _0x4a2628=>{const _0x1452f0=_0x148d50,_0x3cc953=_0x4a2628['str']('code'),_0x59eb8f=_0x51af36[_0x1452f0(0x1c6)]===_0x1452f0(0x1e2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4a2628[_0x1452f0(0x1c1)]('params'))):parseJsonParams(_0x4a2628['str'](_0x1452f0(0x1f5)))??{};return dryRun(_0x1452f0(0x1ef),_0x1452f0(0x1d9)+_0x3cc953+'/'+_0x51af36[_0x1452f0(0x1c6)])[_0x1452f0(0x1ad)](_0x59eb8f)[_0x1452f0(0x1d3)]('Preview:\x20data\x20'+_0x51af36['command']+_0x1452f0(0x1fc)+_0x3cc953)[_0x1452f0(0x1df)]();}),_0x56f172;}export const dataDefinitions=specs[a16_0x968d7b(0x1c2)](makeDataCommand);
|
|
1
|
+
const a16_0x195495=a16_0x5a39;(function(_0x4f14fa,_0xdcb5b4){const _0x2f9ca1=a16_0x5a39,_0x47dbab=_0x4f14fa();while(!![]){try{const _0x876b13=-parseInt(_0x2f9ca1(0x18c))/0x1*(-parseInt(_0x2f9ca1(0x17b))/0x2)+parseInt(_0x2f9ca1(0x192))/0x3+-parseInt(_0x2f9ca1(0x178))/0x4+parseInt(_0x2f9ca1(0x156))/0x5*(parseInt(_0x2f9ca1(0x16a))/0x6)+parseInt(_0x2f9ca1(0x14b))/0x7+-parseInt(_0x2f9ca1(0x169))/0x8+parseInt(_0x2f9ca1(0x17a))/0x9*(-parseInt(_0x2f9ca1(0x184))/0xa);if(_0x876b13===_0xdcb5b4)break;else _0x47dbab['push'](_0x47dbab['shift']());}catch(_0x49de76){_0x47dbab['push'](_0x47dbab['shift']());}}}(a16_0x5125,0x514c3));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 a16_0x5125(){const _0x56a526=['\x20on\x20dataset\x20','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','paramsHint','\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}}','filter','str','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','risk','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','high-risk-write','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','\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}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','1148656gVxJlk','36knKdPE','update','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','delete','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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','/api/{appCode}/','data\x20','aggregate','\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}}]}','join','code','860188bmumjk','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','27WomNPA','2OoiGzN','create','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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}}','description','read','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20WHERE\x20OPERATORS','\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}}','2298090ACEBpH','\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\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}','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','POST','params','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\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]','43444asprfb','\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]}}','write','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','dryRun','1970292GRwFQZ','map','\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\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}','data','command','\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','3123239SFVVVH','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\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}}','batchCreate','getOne','\x20\x20EXAMPLES','operation','now','Preview:\x20data\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}]','195555dxkqLa'];a16_0x5125=function(){return _0x56a526;};return a16_0x5125();}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x195495(0x15b),'operation':a16_0x195495(0x15b),'risk':a16_0x195495(0x180),'paramsRequired':![],'description':a16_0x195495(0x168),'paramsHint':a16_0x195495(0x179)+a16_0x195495(0x18f),'helpExtra':[a16_0x195495(0x182),'\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}}',a16_0x195495(0x185),'\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}}',a16_0x195495(0x15a),a16_0x195495(0x183),'\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}}',a16_0x195495(0x18d),a16_0x195495(0x17e),'\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}}',a16_0x195495(0x165),'','\x20\x20LOGICAL\x20COMBINATORS',a16_0x195495(0x175),'\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)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a16_0x195495(0x194),a16_0x195495(0x155),a16_0x195495(0x187),a16_0x195495(0x190),'','\x20\x20PAGINATION',a16_0x195495(0x158),a16_0x195495(0x161),a16_0x195495(0x14d)]['join']('\x0a')},{'command':a16_0x195495(0x150),'operation':a16_0x195495(0x150),'risk':a16_0x195495(0x180),'paramsRequired':!![],'description':a16_0x195495(0x166),'paramsHint':a16_0x195495(0x17d)},{'command':a16_0x195495(0x17c),'operation':'create','risk':a16_0x195495(0x18e),'paramsRequired':!![],'description':a16_0x195495(0x16e),'paramsHint':a16_0x195495(0x181)},{'command':a16_0x195495(0x14f),'operation':a16_0x195495(0x14f),'risk':a16_0x195495(0x18e),'paramsRequired':!![],'description':a16_0x195495(0x18a),'paramsHint':a16_0x195495(0x16d)},{'command':a16_0x195495(0x16b),'operation':a16_0x195495(0x16b),'risk':a16_0x195495(0x18e),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a16_0x195495(0x15e)},{'command':a16_0x195495(0x16f),'operation':a16_0x195495(0x16f),'risk':a16_0x195495(0x164),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a16_0x195495(0x17d)},{'command':a16_0x195495(0x174),'operation':a16_0x195495(0x174),'risk':'read','paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a16_0x195495(0x16c)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':['\x20\x20AGGREGATE\x20TYPES',a16_0x195495(0x14c),a16_0x195495(0x195),a16_0x195495(0x167),'\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}',a16_0x195495(0x186),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\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}','',a16_0x195495(0x15d),a16_0x195495(0x18b),a16_0x195495(0x170),a16_0x195495(0x163),a16_0x195495(0x160),a16_0x195495(0x14e),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a16_0x195495(0x151),a16_0x195495(0x15f),a16_0x195495(0x14a),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a16_0x195495(0x171)][a16_0x195495(0x176)]('\x0a')}];function makeDataCommand(_0x5e0666){const _0x5fe164=a16_0x195495,_0x2eb17b='data\x20'+_0x5e0666[_0x5fe164(0x149)],_0x3fb488={'service':_0x5fe164(0x196),'command':_0x5e0666[_0x5fe164(0x149)],'description':_0x5e0666['description'],'risk':_0x5e0666[_0x5fe164(0x162)],'helpExtra':_0x5e0666['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5e0666[_0x5fe164(0x159)]}],'validate':async _0xa3f4cb=>{const _0x421804=_0x5fe164;_0x5e0666['paramsRequired']&&requireAnyOf(_0xa3f4cb,[_0x421804(0x189)],_0x2eb17b),_0x5e0666[_0x421804(0x152)]===_0x421804(0x14f)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xa3f4cb['str'](_0x421804(0x189))));},async 'execute'(_0x32b371){const _0x43ae06=_0x5fe164,_0x25ae8a=_0x32b371[_0x43ae06(0x15c)](_0x43ae06(0x177)),_0x3fa8a4=_0x5e0666[_0x43ae06(0x152)]===_0x43ae06(0x14f)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x32b371[_0x43ae06(0x15c)](_0x43ae06(0x189)))):parseJsonParams(_0x32b371['str']('params'))??{},_0x56e5aa=Date[_0x43ae06(0x153)](),_0x40e17f=await executeData(_0x25ae8a,_0x5e0666[_0x43ae06(0x152)],_0x3fa8a4),_0x481220=Date[_0x43ae06(0x153)]()-_0x56e5aa;return{'ok':!![],'data':{'result':_0x40e17f,'elapsed':_0x481220},'message':_0x43ae06(0x173)+_0x5e0666[_0x43ae06(0x149)]+'\x20completed\x20in\x20'+_0x481220+'ms'};}};return _0x5e0666['risk']!=='read'&&(_0x3fb488[_0x5fe164(0x191)]=async _0x178ae5=>{const _0x28d1a4=_0x5fe164,_0x5ae8f2=_0x178ae5[_0x28d1a4(0x15c)]('code'),_0x16f384=_0x5e0666['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x178ae5['str']('params'))):parseJsonParams(_0x178ae5[_0x28d1a4(0x15c)](_0x28d1a4(0x189)))??{};return dryRun(_0x28d1a4(0x188),_0x28d1a4(0x172)+_0x5ae8f2+'/'+_0x5e0666['operation'])['body'](_0x16f384)[_0x28d1a4(0x17f)](_0x28d1a4(0x154)+_0x5e0666[_0x28d1a4(0x149)]+_0x28d1a4(0x157)+_0x5ae8f2)['build']();}),_0x3fb488;}function a16_0x5a39(_0x381a24,_0x4b26c3){_0x381a24=_0x381a24-0x149;const _0x51257a=a16_0x5125();let _0x5a394b=_0x51257a[_0x381a24];return _0x5a394b;}export const dataDefinitions=specs[a16_0x195495(0x193)](makeDataCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a17_0x146fac=a17_0x231b;(function(_0x4c8ff6,_0x28dbbe){const _0x1b3403=a17_0x231b,_0x1d1280=_0x4c8ff6();while(!![]){try{const _0x5d1d5d=parseInt(_0x1b3403(0x123))/0x1+parseInt(_0x1b3403(0x13c))/0x2*(parseInt(_0x1b3403(0x121))/0x3)+parseInt(_0x1b3403(0x140))/0x4+parseInt(_0x1b3403(0x15e))/0x5+parseInt(_0x1b3403(0x144))/0x6*(-parseInt(_0x1b3403(0x162))/0x7)+-parseInt(_0x1b3403(0x164))/0x8+-parseInt(_0x1b3403(0x142))/0x9;if(_0x5d1d5d===_0x28dbbe)break;else _0x1d1280['push'](_0x1d1280['shift']());}catch(_0x3dfb31){_0x1d1280['push'](_0x1d1280['shift']());}}}(a17_0x4327,0x6e03f));function a17_0x4327(){const _0xb7e54d=['dbName','dbId','requestFields','str','allFieldNames','parse','options','30BQWtza','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','filter','requestBody','3176124VovRJV','formatRules','11069154mbuMcU','doType','2780322IHqblY','toField','title','dbtableConfig','creatorIdField','dataType','extend','datasetKey','tableName','name','length','push','afterScriptId','logicField','displayName','validateRules','string','relations','entries','dbType','dataset','modelCode','pkField','fromField','required','beforeScriptId','3380860UrSHlB','allFields','read','source','7pdBUUL','operations','1749320hAtnFB','toDatasetCode','description','host','path','76497KbJgDq','sourceType','509893FQKZfl','indexes','isArray','responseBody','deleted','toFieldLabel','fields','trim','properties','modifierNameField','code','doVersion','creatorNameField','responseFields','dblinkInfoDTO','object','map','type'];a17_0x4327=function(){return _0xb7e54d;};return a17_0x4327();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x557f61){const _0x1a18f6=a17_0x231b;if(_0x557f61['deleted'])return null;const _0x1ff867=Boolean(_0x557f61[_0x1a18f6(0x152)]!==undefined||_0x557f61[_0x1a18f6(0x143)]!==undefined);let _0xe1e434={};if(!_0x1ff867&&typeof _0x557f61[_0x1a18f6(0x14a)]===_0x1a18f6(0x154))try{_0xe1e434=JSON['parse'](_0x557f61['extend']);}catch{}const _0x5ba7b4=_0x1ff867?_0x557f61['name']:_0x557f61[_0x1a18f6(0x12d)],_0x8982b4=_0x1ff867?_0x557f61[_0x1a18f6(0x152)]:_0x557f61['name'],_0x12af10=_0x1ff867?_0x557f61[_0x1a18f6(0x143)]:_0x557f61['type']||_0x557f61[_0x1a18f6(0x149)],_0x44e98c=_0x1ff867?_0x557f61[_0x1a18f6(0x15a)]===!![]:_0xe1e434[_0x1a18f6(0x15a)]===!![],_0x52cdb5=_0x1ff867?_0x557f61[_0x1a18f6(0x15c)]===!![]:_0xe1e434[_0x1a18f6(0x15c)]===!![],_0x9f1c86=_0x1ff867?_0x557f61[_0x1a18f6(0x13b)]??null:_0xe1e434[_0x1a18f6(0x13b)]??null,_0x269a14={'name':_0x5ba7b4,'displayName':_0x8982b4||_0x5ba7b4,'type':_0x12af10,'dbType':_0x557f61[_0x1a18f6(0x157)],'pk':_0x44e98c,'required':_0x52cdb5,'description':_0x557f61[_0x1a18f6(0x166)]||undefined};return Array['isArray'](_0x9f1c86)&&_0x9f1c86['length']>0x0&&(_0x269a14[_0x1a18f6(0x13b)]=_0x9f1c86),_0x269a14;}function parseJsonMaybe(_0x255048){const _0x5bc5e4=a17_0x231b;if(typeof _0x255048!==_0x5bc5e4(0x154))return _0x255048;try{return JSON[_0x5bc5e4(0x13a)](_0x255048);}catch{return _0x255048;}}function normalizeOperationEntry(_0x4a4da5,_0x27e900){const _0x550b4c=a17_0x231b;if(!_0x27e900||typeof _0x27e900!==_0x550b4c(0x132))return null;if(!_0x27e900['method']||!_0x27e900[_0x550b4c(0x120)])return null;const _0xe0481d={'name':_0x4a4da5,'method':_0x27e900['method'],'path':_0x27e900['path']};if(_0x27e900['host'])_0xe0481d[_0x550b4c(0x11f)]=_0x27e900[_0x550b4c(0x11f)];if(_0x27e900['requestBody']!=null)_0xe0481d['requestBody']=parseJsonMaybe(_0x27e900[_0x550b4c(0x13f)]);if(_0x27e900[_0x550b4c(0x126)]!=null)_0xe0481d['responseBody']=parseJsonMaybe(_0x27e900['responseBody']);if(_0x27e900[_0x550b4c(0x15d)]!=null)_0xe0481d[_0x550b4c(0x15d)]=_0x27e900['beforeScriptId'];if(_0x27e900[_0x550b4c(0x150)]!=null)_0xe0481d[_0x550b4c(0x150)]=_0x27e900['afterScriptId'];if(Array[_0x550b4c(0x125)](_0x27e900[_0x550b4c(0x137)]))_0xe0481d[_0x550b4c(0x137)]=_0x27e900[_0x550b4c(0x137)];if(Array[_0x550b4c(0x125)](_0x27e900[_0x550b4c(0x130)]))_0xe0481d[_0x550b4c(0x130)]=_0x27e900[_0x550b4c(0x130)];return _0xe0481d;}function summarizeDbtable(_0x5b0497){const _0x1b5576=a17_0x231b,_0x2384e3={},_0x27d3f6=[_0x1b5576(0x136),_0x1b5576(0x135),'tableName',_0x1b5576(0x14b),'pkField','allFields',_0x1b5576(0x151),'createTimeField','updateTimeField',_0x1b5576(0x148),_0x1b5576(0x12f),'modifierIdField',_0x1b5576(0x12c),'labelField',_0x1b5576(0x131)];for(const _0x180b92 of _0x27d3f6){if(_0x5b0497[_0x180b92]!==undefined)_0x2384e3[_0x180b92]=_0x5b0497[_0x180b92];}return typeof _0x2384e3['allFields']===_0x1b5576(0x154)&&_0x2384e3[_0x1b5576(0x15f)][_0x1b5576(0x14e)]>0x0&&(_0x2384e3[_0x1b5576(0x139)]=_0x2384e3['allFields']['split'](',')[_0x1b5576(0x133)](_0x349fd3=>_0x349fd3[_0x1b5576(0x12a)]())[_0x1b5576(0x13e)](Boolean)),_0x2384e3;}function normalizeRelatedPages(_0x5cf201){const _0x12b0e2=a17_0x231b;if(!Array[_0x12b0e2(0x125)](_0x5cf201))return[];return _0x5cf201[_0x12b0e2(0x13e)](_0x13eab7=>_0x13eab7&&typeof _0x13eab7==='object')[_0x12b0e2(0x133)](_0x22e407=>({'id':_0x22e407['id'],'type':_0x22e407[_0x12b0e2(0x134)],'code':_0x22e407[_0x12b0e2(0x12d)],'title':_0x22e407[_0x12b0e2(0x146)],'deleted':_0x22e407[_0x12b0e2(0x127)]===!![]}));}function a17_0x231b(_0xb25dae,_0x1539c7){_0xb25dae=_0xb25dae-0x11f;const _0x432769=a17_0x4327();let _0x231b02=_0x432769[_0xb25dae];return _0x231b02;}export const datasetDetail={'service':a17_0x146fac(0x158),'command':'detail','description':a17_0x146fac(0x13d),'risk':a17_0x146fac(0x160),'flags':[CODE_FLAG],async 'execute'(_0x4b6a66){const _0x3f1e0e=a17_0x146fac,_0x2fef4c=await getDatasetDetail(_0x4b6a66[_0x3f1e0e(0x138)](_0x3f1e0e(0x12d))),_0x2f8689=Array['isArray'](_0x2fef4c[_0x3f1e0e(0x129)])?_0x2fef4c['fields']:Array['isArray'](_0x2fef4c[_0x3f1e0e(0x12b)])?_0x2fef4c[_0x3f1e0e(0x12b)]:[],_0x1d4a85=_0x2f8689[_0x3f1e0e(0x133)](_0x4b12ae=>normalizeField(_0x4b12ae))['filter'](_0x1ebd57=>_0x1ebd57!==null),_0x18f16b=_0x2fef4c[_0x3f1e0e(0x163)]??{},_0x57c42f=[];for(const [_0x264344,_0x2e0e9b]of Object[_0x3f1e0e(0x156)](_0x18f16b)){const _0x42b0cf=normalizeOperationEntry(_0x264344,_0x2e0e9b);if(_0x42b0cf)_0x57c42f[_0x3f1e0e(0x14f)](_0x42b0cf);}const _0x880dc5=_0x2fef4c[_0x3f1e0e(0x147)]??{},_0x163ffb=_0x2fef4c['dataset']??{},_0x209f7e=_0x880dc5['dbId']!=null?{'id':_0x880dc5[_0x3f1e0e(0x136)],'name':_0x880dc5['dbName']??null}:undefined;let _0x95c4d9;return typeof _0x2fef4c[_0x3f1e0e(0x14a)]===_0x3f1e0e(0x154)&&(_0x95c4d9=parseJsonMaybe(_0x2fef4c['extend'])),{'ok':!![],'data':{'id':_0x2fef4c['modelId']??_0x2fef4c['id'],'name':_0x2fef4c[_0x3f1e0e(0x14d)],'code':_0x2fef4c[_0x3f1e0e(0x159)]||_0x2fef4c[_0x3f1e0e(0x12d)],'doVersion':_0x2fef4c[_0x3f1e0e(0x12e)],'description':_0x2fef4c['description']||_0x163ffb['tableComment']||undefined,'source':_0x2fef4c[_0x3f1e0e(0x161)]||_0x163ffb[_0x3f1e0e(0x122)],'table':_0x880dc5[_0x3f1e0e(0x14c)]||_0x163ffb[_0x3f1e0e(0x14c)],'datasetKey':_0x880dc5[_0x3f1e0e(0x14b)],'pk':_0x880dc5['pkField'],'db':_0x209f7e,'dbtable':summarizeDbtable(_0x880dc5),'fields':_0x1d4a85,'operations':_0x57c42f,'indexes':Array[_0x3f1e0e(0x125)](_0x163ffb['indexes'])?_0x163ffb[_0x3f1e0e(0x124)]:[],'relations':Array[_0x3f1e0e(0x125)](_0x2fef4c[_0x3f1e0e(0x155)])?_0x2fef4c[_0x3f1e0e(0x155)]['map'](_0x427a72=>({'fromField':_0x427a72[_0x3f1e0e(0x15b)],'toDataset':_0x427a72['toDatasetName'],'toCode':_0x427a72[_0x3f1e0e(0x165)],'toTable':_0x427a72['toTableName'],'toField':_0x427a72[_0x3f1e0e(0x145)],'labelField':_0x427a72[_0x3f1e0e(0x128)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x2fef4c['relatedPageInfoList']),...Array['isArray'](_0x2fef4c['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x2fef4c['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x3f1e0e(0x125)](_0x2fef4c['formatRules'])?_0x2fef4c[_0x3f1e0e(0x141)]:[],'validateRules':Array[_0x3f1e0e(0x125)](_0x2fef4c['validateRules'])?_0x2fef4c[_0x3f1e0e(0x153)]:[],..._0x95c4d9!==undefined?{'extend':_0x95c4d9}:{},'stats':{'fieldCount':_0x1d4a85['length'],'operationCount':_0x57c42f[_0x3f1e0e(0x14e)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d7c37,_0xc857b1){const _0x13e442=a18_0x29ff,_0x3f3456=_0x4d7c37();while(!![]){try{const _0x1fe35a=parseInt(_0x13e442(0xe9))/0x1+parseInt(_0x13e442(0xeb))/0x2*(parseInt(_0x13e442(0xe7))/0x3)+parseInt(_0x13e442(0xe6))/0x4*(-parseInt(_0x13e442(0xe3))/0x5)+parseInt(_0x13e442(0xe8))/0x6+parseInt(_0x13e442(0xe2))/0x7*(-parseInt(_0x13e442(0xea))/0x8)+parseInt(_0x13e442(0xe5))/0x9+parseInt(_0x13e442(0xec))/0xa*(-parseInt(_0x13e442(0xe4))/0xb);if(_0x1fe35a===_0xc857b1)break;else _0x3f3456['push'](_0x3f3456['shift']());}catch(_0xac23ee){_0x3f3456['push'](_0x3f3456['shift']());}}}(a18_0x7989,0x1f1d6));import{datasetList}from'../../commands/dataset/list.js';function a18_0x29ff(_0x479a0c,_0x263317){_0x479a0c=_0x479a0c-0xe2;const _0x798949=a18_0x7989();let _0x29ff1c=_0x798949[_0x479a0c];return _0x29ff1c;}function a18_0x7989(){const _0x1e9099=['2YCbtzI','10WLTYbd','398433TwVTMi','8285btPhkv','3857348PcJJiP','1357920ebCfcm','348wIwNZM','651366UJEaLI','1135386uwcjxB','121959IrbvTV','8yqkLoR'];a18_0x7989=function(){return _0x1e9099;};return a18_0x7989();}import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x3ec3fa=a19_0x4544;(function(_0x3ae59b,_0x34c700){const _0x336298=a19_0x4544,_0x48e149=_0x3ae59b();while(!![]){try{const _0x5e3c48=parseInt(_0x336298(0x14d))/0x1*(parseInt(_0x336298(0x15d))/0x2)+parseInt(_0x336298(0x158))/0x3+parseInt(_0x336298(0x159))/0x4*(parseInt(_0x336298(0x15c))/0x5)+-parseInt(_0x336298(0x15a))/0x6+parseInt(_0x336298(0x15f))/0x7*(-parseInt(_0x336298(0x151))/0x8)+parseInt(_0x336298(0x14c))/0x9*(-parseInt(_0x336298(0x14a))/0xa)+parseInt(_0x336298(0x146))/0xb*(parseInt(_0x336298(0x14b))/0xc);if(_0x5e3c48===_0x34c700)break;else _0x48e149['push'](_0x48e149['shift']());}catch(_0x527c45){_0x48e149['push'](_0x48e149['shift']());}}}(a19_0x5629,0x1aba7));import{listDatasets}from'../../core/api-client.js';function a19_0x4544(_0x357f0d,_0x506b1f){_0x357f0d=_0x357f0d-0x144;const _0x562992=a19_0x5629();let _0x4544e8=_0x562992[_0x357f0d];return _0x4544e8;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a19_0x3ec3fa(0x155),'command':'list','description':a19_0x3ec3fa(0x148),'risk':a19_0x3ec3fa(0x15b),'flags':[{'name':a19_0x3ec3fa(0x157),'type':a19_0x3ec3fa(0x14e),'description':a19_0x3ec3fa(0x147)},{...CODE_FLAG,'required':![],'description':a19_0x3ec3fa(0x149)}],async 'execute'(_0x37beeb){const _0x59d7de=a19_0x3ec3fa,_0xa267f3=_0x37beeb['str'](_0x59d7de(0x157)),_0xa99591=_0x37beeb[_0x59d7de(0x150)](_0x59d7de(0x154)),_0x5824fd=await listDatasets(_0x37beeb[_0x59d7de(0x15e)],{..._0xa267f3&&{'name':_0xa267f3},..._0xa99591&&{'code':_0xa99591}});return{'ok':!![],'data':{'total':_0x5824fd['length'],'datasets':_0x5824fd[_0x59d7de(0x152)](_0x2c8287=>{const _0x206991=_0x59d7de,_0x375fab=_0x2c8287[_0x206991(0x14f)]??{};return{'id':_0x2c8287['id'],'code':_0x2c8287['code'],'name':_0x2c8287[_0x206991(0x157)],'source':_0x2c8287[_0x206991(0x156)],'description':_0x2c8287['description'],'table':_0x375fab['tableName'],'datasetKey':_0x375fab[_0x206991(0x153)],'pk':_0x375fab[_0x206991(0x160)],'fields':_0x375fab[_0x206991(0x144)]?_0x375fab[_0x206991(0x144)]['split'](',')[_0x206991(0x152)](_0x454662=>_0x454662[_0x206991(0x145)]()):[]};})}};}};function a19_0x5629(){const _0x25ae2f=['157428mDoyya','284BpBGMg','1225572EFwSsV','read','12260dxxqqI','172990wyMUCO','appCode','1165374QlLcUd','pkField','allFields','trim','144353bJHemE','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','10KXlwla','276AjSlJx','1212021mnvVvq','1XiaPWY','string','dbtableConfig','str','8jbiAbB','map','datasetKey','code','dataset','source','name'];a19_0x5629=function(){return _0x25ae2f;};return a19_0x5629();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x2d0fa5=a20_0x4dbe;(function(_0x2350c0,_0x42d972){const _0x4c420b=a20_0x4dbe,_0x5145ce=_0x2350c0();while(!![]){try{const _0x1a7b5f=-parseInt(_0x4c420b(0xc1))/0x1+-parseInt(_0x4c420b(0xda))/0x2*(parseInt(_0x4c420b(0xce))/0x3)+parseInt(_0x4c420b(0xd9))/0x4*(-parseInt(_0x4c420b(0xfb))/0x5)+-parseInt(_0x4c420b(0xc9))/0x6+-parseInt(_0x4c420b(0xd3))/0x7*(parseInt(_0x4c420b(0xc7))/0x8)+-parseInt(_0x4c420b(0xe7))/0x9+parseInt(_0x4c420b(0xe8))/0xa*(parseInt(_0x4c420b(0xe5))/0xb);if(_0x1a7b5f===_0x42d972)break;else _0x5145ce['push'](_0x5145ce['shift']());}catch(_0x45cffd){_0x5145ce['push'](_0x5145ce['shift']());}}}(a20_0x26b5,0xe761d));import a20_0x186f70 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 a20_0x4dbe(_0x22bedb,_0x4c66af){_0x22bedb=_0x22bedb-0xc1;const _0x26b5a5=a20_0x26b5();let _0x4dbe6f=_0x26b5a5[_0x22bedb];return _0x4dbe6f;}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x3c18e5){const _0x31f04e=a20_0x4dbe,_0x1429f8=getCliVersion(),_0x51307c=buildConfigFromFlags({});await initGlobalEnvironment(_0x51307c),console[_0x31f04e(0xfc)](),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd5)](CLI_BIN_NAME+_0x31f04e(0xf3))),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd0)]('─'[_0x31f04e(0xe0)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x1429f8),console[_0x31f04e(0xfc)](_0x31f04e(0xcf)+process[_0x31f04e(0xed)]),console[_0x31f04e(0xfc)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x31f04e(0xd2)]+'\x20'+process[_0x31f04e(0xcd)]),console[_0x31f04e(0xfc)](),console['log'](a20_0x186f70['bold']('\x20\x20Config\x20Files')),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xf6)[_0x31f04e(0xe0)](0x1e)));const _0x936116=getGlobalConfigPath(),_0x1ccd82=getProjectConfigPath();console[_0x31f04e(0xfc)](_0x31f04e(0xf5)+(_0x936116||a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xca)))),console[_0x31f04e(0xfc)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1ccd82||a20_0x186f70['gray'](_0x31f04e(0xca)))),console[_0x31f04e(0xfc)](),console['log'](a20_0x186f70[_0x31f04e(0xd5)](_0x31f04e(0x105))),console[_0x31f04e(0xfc)](a20_0x186f70['gray'](_0x31f04e(0xf6)[_0x31f04e(0xe0)](0x1e)));const _0x2eb159=(_0x5791ee,_0xf1461f)=>{const _0x11bc7e=_0x31f04e;if(!_0xf1461f){console[_0x11bc7e(0xfc)]('\x20\x20'+_0x5791ee[_0x11bc7e(0xd7)](0x11)+'\x20'+a20_0x186f70[_0x11bc7e(0xd0)]('(no\x20file)'));return;}const _0x1c9df4=inspectCliConfigJsonFile(_0xf1461f);if(_0x1c9df4['status']==='ok')console[_0x11bc7e(0xfc)]('\x20\x20'+_0x5791ee['padEnd'](0x11)+'\x20'+a20_0x186f70[_0x11bc7e(0xdf)](_0x11bc7e(0xfe)));else{if(_0x1c9df4[_0x11bc7e(0x100)]===_0x11bc7e(0xcc))console[_0x11bc7e(0xfc)]('\x20\x20'+_0x5791ee[_0x11bc7e(0xd7)](0x11)+'\x20'+a20_0x186f70[_0x11bc7e(0xf1)](_0x11bc7e(0xee)));else _0x1c9df4[_0x11bc7e(0x100)]==='missing'?console['log']('\x20\x20'+_0x5791ee[_0x11bc7e(0xd7)](0x11)+'\x20'+a20_0x186f70['gray'](_0x11bc7e(0xfa))):(console[_0x11bc7e(0xfc)]('\x20\x20'+_0x5791ee[_0x11bc7e(0xd7)](0x11)+'\x20'+a20_0x186f70[_0x11bc7e(0xdb)](_0x11bc7e(0xe2))),console['log']('\x20\x20'+''[_0x11bc7e(0xd7)](0x11)+'\x20'+a20_0x186f70[_0x11bc7e(0xdb)](_0x1c9df4[_0x11bc7e(0xfd)])));}};_0x2eb159(_0x31f04e(0xc2),_0x936116),_0x2eb159('Project',_0x1ccd82),console[_0x31f04e(0xfc)](),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd5)](_0x31f04e(0xf0))),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xf6)[_0x31f04e(0xe0)](0x1e))),console[_0x31f04e(0xfc)](_0x31f04e(0xc6)+(_0x51307c[_0x31f04e(0xec)]||a20_0x186f70[_0x31f04e(0xdb)](_0x31f04e(0xe1)))),console[_0x31f04e(0xfc)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x51307c[_0x31f04e(0xf9)]);const _0xc8ab84=isLegacyCompatConfigKey(_0x31f04e(0xc3))?a20_0x186f70[_0x31f04e(0xd0)](_0x51307c[_0x31f04e(0xc3)]+_0x31f04e(0xd6)):_0x51307c[_0x31f04e(0xc3)];return console['log'](_0x31f04e(0xde)+_0xc8ab84),console[_0x31f04e(0xfc)](_0x31f04e(0xd8)+(_0x51307c[_0x31f04e(0xdc)]||a20_0x186f70[_0x31f04e(0xd0)]('(none)'))),console[_0x31f04e(0xfc)](_0x31f04e(0x107)+(_0x51307c[_0x31f04e(0xff)]||a20_0x186f70[_0x31f04e(0xd0)]('(none)'))),console[_0x31f04e(0xfc)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x51307c[_0x31f04e(0x101)]||a20_0x186f70['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x31f04e(0xf7)+(_0x51307c[_0x31f04e(0xd1)]??a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xcb)))),console['log'](_0x31f04e(0x102)+_0x51307c[_0x31f04e(0xeb)]),console[_0x31f04e(0xfc)](_0x31f04e(0xdd)+_0x51307c[_0x31f04e(0xe6)]),console[_0x31f04e(0xfc)](_0x31f04e(0x106)+AUTH_MODE[_0x31f04e(0xe9)]),console[_0x31f04e(0xfc)](_0x31f04e(0xf2)+(_0x51307c['accessKey']?a20_0x186f70[_0x31f04e(0xdf)](_0x31f04e(0xc5)+_0x51307c[_0x31f04e(0xea)]['length']+')'):a20_0x186f70[_0x31f04e(0xd0)]('(none)'))),console[_0x31f04e(0xfc)](),console[_0x31f04e(0xfc)](a20_0x186f70['bold'](_0x31f04e(0xef))),console['log'](a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xf6)[_0x31f04e(0xe0)](0x1e))),console[_0x31f04e(0xfc)](_0x31f04e(0xe4)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x31f04e(0xfc)](_0x31f04e(0xf4)+getRuntimeDomain()),console[_0x31f04e(0xfc)](),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd5)](_0x31f04e(0xf8))),console[_0x31f04e(0xfc)](a20_0x186f70[_0x31f04e(0xd0)](_0x31f04e(0xf6)['repeat'](0x1e))),console[_0x31f04e(0xfc)](_0x31f04e(0x103)+a20_0x186f70['green'](AUTH_MODE['ClientAk']+_0x31f04e(0xc4))),console[_0x31f04e(0xfc)](_0x31f04e(0xd4)+a20_0x186f70['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console['log'](),{'ok':!![]};}function a20_0x26b5(){const _0x5c9726=['\x20\x20auth\x20(effective):\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','1877577scVdKX','Global','locale','\x20(accessKey)','(set,\x20length=','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','24ypEtnx','read','8946384NLtDPl','(not\x20found)','(default)','empty','arch','3zxKelo','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','pageSize','platform','2772602wUvDrj','\x20\x20Session\x20check:\x20\x20\x20','bold','\x20(legacy/compat\x20only)','padEnd','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','28IpELBp','1927482NEtmeu','red','defaultApp','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','repeat','(not\x20set)','✗\x20Invalid\x20JSON','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','4924447jPGJeb','verbose','14550723RjTXOl','190HOwMpR','ClientAk','accessKey','riskLevel','appCode','version','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20API\x20Endpoints','\x20\x20Merged\x20Config','yellow','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','env','(missing)','300525kPrqPf','log','message','✓\x20Valid\x20JSON','currentApp','status','format','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','\x20\x20Config\x20JSON'];a20_0x26b5=function(){return _0x5c9726;};return a20_0x26b5();}export const doctorDefinition={'service':a20_0x2d0fa5(0x104),'command':'check','description':a20_0x2d0fa5(0xe3),'risk':a20_0x2d0fa5(0xc8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x143e3e=a22_0x4078;(function(_0xd8defe,_0x140c94){const _0x5649f4=a22_0x4078,_0x397f79=_0xd8defe();while(!![]){try{const _0x417f65=-parseInt(_0x5649f4(0xc5))/0x1+-parseInt(_0x5649f4(0xb5))/0x2*(parseInt(_0x5649f4(0x8a))/0x3)+-parseInt(_0x5649f4(0x94))/0x4+-parseInt(_0x5649f4(0x90))/0x5+parseInt(_0x5649f4(0xc1))/0x6+-parseInt(_0x5649f4(0xaa))/0x7*(-parseInt(_0x5649f4(0xbf))/0x8)+parseInt(_0x5649f4(0xb7))/0x9*(parseInt(_0x5649f4(0x89))/0xa);if(_0x417f65===_0x140c94)break;else _0x397f79['push'](_0x397f79['shift']());}catch(_0x3077eb){_0x397f79['push'](_0x397f79['shift']());}}}(a22_0x25a6,0x8ff25));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';export const initCreateFlagDefs=[{'name':a22_0x143e3e(0xcb),'type':'string','description':a22_0x143e3e(0xc8)},{'name':a22_0x143e3e(0xa2),'type':'string','description':a22_0x143e3e(0x8c)+DEFAULT_CONFIG_VALUES[a22_0x143e3e(0xa2)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x143e3e(0xbc),'type':a22_0x143e3e(0xa4),'description':a22_0x143e3e(0xac),'default':![]},{'name':'yes','type':a22_0x143e3e(0xa4),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a22_0x143e3e(0xbe),'type':a22_0x143e3e(0x92),'description':a22_0x143e3e(0x9c),'required':!![]},{'name':'appcode','type':'string','description':'Override\x20imported\x20default\x20appcode'},{'name':a22_0x143e3e(0xa2),'type':a22_0x143e3e(0x92),'description':a22_0x143e3e(0xbd),'enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x143e3e(0xbc),'type':'boolean','description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a22_0x143e3e(0xca),'type':a22_0x143e3e(0xa4),'description':a22_0x143e3e(0x9e),'default':![]}];export async function runInit(_0x5cd5e0){const _0x3e6a29=a22_0x143e3e,_0x5aff32=isNonInteractiveMode(_0x5cd5e0),_0x2f5ddb=_0x5cd5e0[_0x3e6a29(0xbc)]?_0x3e6a29(0xbc):'project',_0x12c93d=resolveWriteConfigPath(_0x2f5ddb);try{_0x5aff32?await runNonInteractive(_0x5cd5e0,_0x12c93d):await runInteractive(_0x5cd5e0,_0x12c93d);}catch(_0x599296){if(_0x599296 instanceof AbortPrompt)throw CliErrors[_0x3e6a29(0xab)]();throw _0x599296;}}function a22_0x25a6(){const _0x5bea4b=['file','24eeKnUN','User\x20aborted\x20prompt','6040158PSMvoR','includes','\x20already\x20exists.\x20Overwrite?','Aborted.','467948EOCXob','\x0aInitialized\x20','\x20\x20default:\x20','App\x20code\x20for\x20the\x20project','validation','yes','appcode','100gMEXyf','3VTqNed','log','Target\x20environment\x20(default\x20','toLowerCase','utf8','flagMissing','4725765zmxVCN','trim','string','join','1438536zixuXT','apiDir','entries','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','\x20\x20config:\x20\x20','apps','Failed\x20to\x20parse\x20source\x20file:\x20','Usage:\x20','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','[Y/n]','Skip\x20confirmation\x20when\x20overwriting','race','Imported\x20from\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','env','name','boolean','message','Source\x20file\x20not\x20found:\x20','close','File\x20','):\x20','613606AMlZiB','cancelled','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','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`.','Invalid\x20env\x20\x22','\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','SIGINT','\x20\x20env:\x20\x20\x20\x20\x20','project','removeListener','question','580874OvhYwS','parse','1244799rFAljH','\x20\x20appcode:\x20','stdin','App\x20code\x20cannot\x20be\x20empty.','defaultApp','global','Override\x20imported\x20default\x20env'];a22_0x25a6=function(){return _0x5bea4b;};return a22_0x25a6();}export async function runInitImport(_0xa80160){const _0x4baf3c=a22_0x143e3e,_0x5d2a81=_0xa80160[_0x4baf3c(0xbc)]?_0x4baf3c(0xbc):_0x4baf3c(0xb2),_0xd630a5=resolveWriteConfigPath(_0x5d2a81);await runFromImport(_0xa80160,_0xd630a5);}const RUNTIME_IRRELEVANT_KEYS=new Set([a22_0x143e3e(0x95)]);async function runFromImport(_0xb3438f,_0x30443b){const _0x5a2056=a22_0x143e3e,_0x20010f=resolveFilePath(_0xb3438f[_0x5a2056(0xbe)]);if(!existsSync(_0x20010f))throw CliErrors[_0x5a2056(0xc9)](_0x5a2056(0xa6)+_0x20010f);const _0x25f7fe=readSourceFile(_0x20010f),_0xa3a110=convertToRuntimeConfig(_0x25f7fe);_0xb3438f[_0x5a2056(0xcb)]&&(_0xa3a110[_0x5a2056(0xcb)]=String(_0xb3438f['appcode']));_0xb3438f[_0x5a2056(0xa2)]&&(_0xa3a110[_0x5a2056(0xa2)]=resolveInitEnv(_0xb3438f));if(!_0xa3a110[_0x5a2056(0xcb)])throw CliErrors[_0x5a2056(0xc9)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x5a2056(0xad));await writeInitConfig(_0x30443b,_0xa3a110,_0xb3438f),console[_0x5a2056(0x8b)](_0x5a2056(0xa0)+_0x20010f),console['log'](_0x5a2056(0x98)+_0x30443b),console[_0x5a2056(0x8b)]('\x20\x20appcode:\x20'+_0xa3a110[_0x5a2056(0xcb)]);if(_0xa3a110[_0x5a2056(0xbb)])console[_0x5a2056(0x8b)](_0x5a2056(0xc7)+_0xa3a110[_0x5a2056(0xbb)]);}function convertToRuntimeConfig(_0x1d2b74){const _0x168979=a22_0x143e3e;if(_0x1d2b74[_0x168979(0x99)]&&typeof _0x1d2b74[_0x168979(0x99)]==='object')throw CliErrors[_0x168979(0xc9)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x168979(0xa1));const _0x590ada={};for(const _0x5af518 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1d2b74[_0x5af518]!==undefined&&(_0x590ada[_0x5af518]=_0x1d2b74[_0x5af518]);}return!_0x590ada['riskLevel']&&(_0x590ada['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x590ada;}async function runNonInteractive(_0x3b98fa,_0x42bb66){const _0x464799=a22_0x143e3e,_0x1c679c=_0x3b98fa[_0x464799(0xcb)];if(!_0x1c679c)throw CliErrors[_0x464799(0x8f)](_0x464799(0xcb),_0x464799(0x9b)+CLI_BIN_NAME+_0x464799(0xaf));const _0x4bd1f3=resolveInitEnv(_0x3b98fa);await writeInitConfig(_0x42bb66,{'appcode':_0x1c679c,'env':_0x4bd1f3},_0x3b98fa),console[_0x464799(0x8b)]('Initialized\x20'+_0x42bb66),console['log'](_0x464799(0xb8)+_0x1c679c),console[_0x464799(0x8b)](_0x464799(0xb1)+_0x4bd1f3);}async function runInteractive(_0x25a016,_0x5ccbc5){const _0x14ea23=a22_0x143e3e,_0xe99c55=loadExisting(_0x5ccbc5),_0x27701f=typeof _0xe99c55?.[_0x14ea23(0xcb)]==='string'?_0xe99c55['appcode']:'',_0x53ffcc=resolveInitEnv(_0x25a016);console[_0x14ea23(0x8b)](CLI_BIN_NAME+_0x14ea23(0x97));if(existsSync(_0x5ccbc5)&&!_0x25a016[_0x14ea23(0xca)]){const _0xa28859=await promptYesNo(_0x14ea23(0xa8)+_0x5ccbc5+_0x14ea23(0xc3),![]);if(!_0xa28859){console[_0x14ea23(0x8b)](_0x14ea23(0xc4));return;}}const _0x636c00=typeof _0x25a016[_0x14ea23(0xcb)]===_0x14ea23(0x92)?_0x25a016[_0x14ea23(0xcb)][_0x14ea23(0x91)]():'';let _0x1bd67a=_0x636c00;!_0x1bd67a&&(_0x1bd67a=await promptInput('App\x20code',_0x27701f));if(!_0x1bd67a['trim']())throw CliErrors[_0x14ea23(0xc9)](_0x14ea23(0xba));await writeInitConfig(_0x5ccbc5,{'appcode':_0x1bd67a[_0x14ea23(0x91)](),'env':_0x53ffcc},_0x25a016),console['log'](_0x14ea23(0xc6)+_0x5ccbc5),console['log']('\x20\x20appcode:\x20'+_0x1bd67a['trim']()),console[_0x14ea23(0x8b)](_0x14ea23(0xb1)+_0x53ffcc);}async function writeInitConfig(_0xb83909,_0x8a5f41,_0x34437c){const _0x2ba79f=a22_0x143e3e;let _0x2ddb17={};existsSync(_0xb83909)&&!_0x34437c[_0x2ba79f(0xca)]&&(_0x2ddb17=readConfigFile(_0xb83909));for(const [_0x2e2e7e,_0x8fc682]of Object[_0x2ba79f(0x96)](_0x8a5f41)){_0x8fc682!==undefined&&(_0x2ddb17[_0x2e2e7e]=_0x8fc682);}if(_0x2ddb17['app'])delete _0x2ddb17['app'];writeConfigFile(_0xb83909,_0x2ddb17);}class AbortPrompt extends Error{constructor(){const _0x57b663=a22_0x143e3e;super(_0x57b663(0xc0)),this[_0x57b663(0xa3)]='AbortPrompt';}}function createSafeRl(){const _0x3c7dc1=a22_0x143e3e,_0x2f95de=createInterface({'input':process[_0x3c7dc1(0xb9)],'output':process['stdout']});let _0x957ccd;const _0x12fd7a=new Promise((_0x42c9d6,_0x43c59c)=>{const _0x1c2c63=_0x3c7dc1;_0x957ccd=()=>{const _0x1830a1=a22_0x4078;_0x957ccd&&(_0x2f95de[_0x1830a1(0xb3)](_0x1830a1(0xb0),_0x957ccd),_0x957ccd=undefined);try{_0x2f95de[_0x1830a1(0xa7)]();}catch{}_0x43c59c(new AbortPrompt());},_0x2f95de['once'](_0x1c2c63(0xb0),_0x957ccd);}),_0xada519=()=>{const _0x50d619=_0x3c7dc1;_0x957ccd&&(_0x2f95de[_0x50d619(0xb3)](_0x50d619(0xb0),_0x957ccd),_0x957ccd=undefined);try{_0x2f95de[_0x50d619(0xa7)]();}catch{}};return{'rl':_0x2f95de,'abortPromise':_0x12fd7a,'disposeSuccess':_0xada519};}async function promptInput(_0x2861ad,_0x249095){const _0x3d3318=a22_0x143e3e,{rl:_0x40026d,abortPromise:_0xc0fb5e,disposeSuccess:_0x44cd87}=createSafeRl(),_0x4261d8=new Promise(_0x580e1a=>{const _0xebb15e=a22_0x4078,_0x51a551=_0x249095?'\x20\x20'+_0x2861ad+'\x20('+_0x249095+_0xebb15e(0xa9):'\x20\x20'+_0x2861ad+':\x20';_0x40026d[_0xebb15e(0xb4)](_0x51a551,_0x1e401e=>{const _0x71cbf8=_0xebb15e;_0x44cd87(),_0x580e1a(_0x1e401e[_0x71cbf8(0x91)]()||_0x249095);});});return Promise[_0x3d3318(0x9f)]([_0x4261d8,_0xc0fb5e]);}async function promptYesNo(_0x22b335,_0x520e24){const _0x1f0250=a22_0x143e3e,{rl:_0x18409f,abortPromise:_0x1d41a1,disposeSuccess:_0x4cb545}=createSafeRl(),_0x5dd19b=new Promise(_0x234239=>{const _0xc05697=a22_0x4078,_0x476b7d=_0x520e24?_0xc05697(0x9d):'[y/N]';_0x18409f[_0xc05697(0xb4)]('\x20\x20'+_0x22b335+'\x20'+_0x476b7d+':\x20',_0x5cf632=>{const _0x5a73bd=_0xc05697;_0x4cb545();const _0x32bc52=_0x5cf632['trim']()[_0x5a73bd(0x8d)]();if(_0x32bc52==='y'||_0x32bc52===_0x5a73bd(0xca))_0x234239(!![]);else{if(_0x32bc52==='n'||_0x32bc52==='no')_0x234239(![]);else _0x234239(_0x520e24);}});});return Promise[_0x1f0250(0x9f)]([_0x5dd19b,_0x1d41a1]);}function loadExisting(_0x4a8203){if(!existsSync(_0x4a8203))return null;return readConfigFile(_0x4a8203);}function resolveFilePath(_0x54afc6){return isAbsolute(_0x54afc6)?_0x54afc6:resolve(process['cwd'](),_0x54afc6);}function a22_0x4078(_0x596be6,_0x551d28){_0x596be6=_0x596be6-0x89;const _0x25a6d2=a22_0x25a6();let _0x4078bb=_0x25a6d2[_0x596be6];return _0x4078bb;}function readSourceFile(_0x150583){const _0x4b7b17=a22_0x143e3e;try{const _0x29ffe3=readFileSync(_0x150583,{'encoding':_0x4b7b17(0x8e)});return JSON[_0x4b7b17(0xb6)](_0x29ffe3);}catch(_0x5de5e8){throw CliErrors[_0x4b7b17(0xc9)](_0x4b7b17(0x9a)+_0x5de5e8[_0x4b7b17(0xa5)]);}}function resolveInitEnv(_0x166b02){const _0x70fbbe=a22_0x143e3e,_0x2bd18f=_0x166b02[_0x70fbbe(0xa2)];if(_0x2bd18f===undefined||_0x2bd18f==='')return DEFAULT_CONFIG_VALUES[_0x70fbbe(0xa2)];if(!RUNTIME_ENV_VALUES[_0x70fbbe(0xc2)](_0x2bd18f))throw CliErrors[_0x70fbbe(0xc9)](_0x70fbbe(0xae)+_0x2bd18f+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x70fbbe(0x93)](',\x20'));return _0x2bd18f;}
|
|
1
|
+
const a21_0x74e9e5=a21_0x84ec;(function(_0x553635,_0x1b84c9){const _0x5b0892=a21_0x84ec,_0x1a0341=_0x553635();while(!![]){try{const _0x57328c=parseInt(_0x5b0892(0x1be))/0x1*(-parseInt(_0x5b0892(0x1b5))/0x2)+-parseInt(_0x5b0892(0x1b6))/0x3+parseInt(_0x5b0892(0x1ac))/0x4+-parseInt(_0x5b0892(0x197))/0x5*(-parseInt(_0x5b0892(0x1a9))/0x6)+parseInt(_0x5b0892(0x1bf))/0x7*(parseInt(_0x5b0892(0x1c2))/0x8)+-parseInt(_0x5b0892(0x193))/0x9+parseInt(_0x5b0892(0x1b8))/0xa;if(_0x57328c===_0x1b84c9)break;else _0x1a0341['push'](_0x1a0341['shift']());}catch(_0x1e95d9){_0x1a0341['push'](_0x1a0341['shift']());}}}(a21_0x4b4c,0xe5a97));import{existsSync,readFileSync}from'node:fs';function a21_0x84ec(_0x59ed4a,_0x27efff){_0x59ed4a=_0x59ed4a-0x193;const _0x4b4ce9=a21_0x4b4c();let _0x84ecb9=_0x4b4ce9[_0x59ed4a];return _0x84ecb9;}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';export const initCreateFlagDefs=[{'name':a21_0x74e9e5(0x1a8),'type':a21_0x74e9e5(0x1c8),'description':a21_0x74e9e5(0x1a2)},{'name':'env','type':a21_0x74e9e5(0x1c8),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a21_0x74e9e5(0x19b)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x74e9e5(0x1d0),'type':'boolean','description':a21_0x74e9e5(0x194),'default':![]},{'name':'yes','type':a21_0x74e9e5(0x1a5),'description':a21_0x74e9e5(0x1b2),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x74e9e5(0x1d1),'type':'string','description':a21_0x74e9e5(0x1c9),'required':!![]},{'name':a21_0x74e9e5(0x1a8),'type':a21_0x74e9e5(0x1c8),'description':a21_0x74e9e5(0x1a3)},{'name':a21_0x74e9e5(0x19b),'type':a21_0x74e9e5(0x1c8),'description':a21_0x74e9e5(0x1d3),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x74e9e5(0x1d0),'type':a21_0x74e9e5(0x1a5),'description':a21_0x74e9e5(0x194),'default':![]},{'name':a21_0x74e9e5(0x1b1),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x4bbc3d){const _0xee3503=a21_0x74e9e5,_0x146268=isNonInteractiveMode(_0x4bbc3d),_0x139258=_0x4bbc3d[_0xee3503(0x1d0)]?_0xee3503(0x1d0):_0xee3503(0x199),_0x3671c5=resolveWriteConfigPath(_0x139258);try{_0x146268?await runNonInteractive(_0x4bbc3d,_0x3671c5):await runInteractive(_0x4bbc3d,_0x3671c5);}catch(_0x550f1d){if(_0x550f1d instanceof AbortPrompt)throw CliErrors[_0xee3503(0x1cb)]();throw _0x550f1d;}}export async function runInitImport(_0x22b3c2){const _0x41d463=a21_0x74e9e5,_0xd7fbc1=_0x22b3c2[_0x41d463(0x1d0)]?'global':_0x41d463(0x199),_0x2ef39e=resolveWriteConfigPath(_0xd7fbc1);await runFromImport(_0x22b3c2,_0x2ef39e);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x45249a,_0x58a73c){const _0x10ab05=a21_0x74e9e5,_0x40216b=resolveFilePath(_0x45249a[_0x10ab05(0x1d1)]);if(!existsSync(_0x40216b))throw CliErrors[_0x10ab05(0x1d4)](_0x10ab05(0x1aa)+_0x40216b);const _0x4bc92f=readSourceFile(_0x40216b),_0x8169b4=convertToRuntimeConfig(_0x4bc92f);_0x45249a[_0x10ab05(0x1a8)]&&(_0x8169b4[_0x10ab05(0x1a8)]=String(_0x45249a[_0x10ab05(0x1a8)]));_0x45249a['env']&&(_0x8169b4[_0x10ab05(0x19b)]=resolveInitEnv(_0x45249a));if(!_0x8169b4[_0x10ab05(0x1a8)])throw CliErrors[_0x10ab05(0x1d4)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x10ab05(0x1cf));await writeInitConfig(_0x58a73c,_0x8169b4,_0x45249a),console[_0x10ab05(0x1c5)](_0x10ab05(0x1d6)+_0x40216b),console[_0x10ab05(0x1c5)]('\x20\x20config:\x20\x20'+_0x58a73c),console[_0x10ab05(0x1c5)](_0x10ab05(0x1c0)+_0x8169b4['appcode']);if(_0x8169b4[_0x10ab05(0x19f)])console[_0x10ab05(0x1c5)]('\x20\x20default:\x20'+_0x8169b4[_0x10ab05(0x19f)]);}function convertToRuntimeConfig(_0x1d2e08){const _0x44fd52=a21_0x74e9e5;if(_0x1d2e08[_0x44fd52(0x1a6)]&&typeof _0x1d2e08['apps']===_0x44fd52(0x1bd))throw CliErrors['validation'](_0x44fd52(0x1a7),_0x44fd52(0x1b4));const _0x4e40ba={};for(const _0x4ea40e of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1d2e08[_0x4ea40e]!==undefined&&(_0x4e40ba[_0x4ea40e]=_0x1d2e08[_0x4ea40e]);}return!_0x4e40ba[_0x44fd52(0x19e)]&&(_0x4e40ba[_0x44fd52(0x19e)]=DEFAULT_CONFIG_VALUES[_0x44fd52(0x19e)]),_0x4e40ba;}async function runNonInteractive(_0x287517,_0x3fdaf4){const _0x28d608=a21_0x74e9e5,_0xed0300=_0x287517['appcode'];if(!_0xed0300)throw CliErrors[_0x28d608(0x1c1)](_0x28d608(0x1a8),_0x28d608(0x19d)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x589cd9=resolveInitEnv(_0x287517);await writeInitConfig(_0x3fdaf4,{'appcode':_0xed0300,'env':_0x589cd9},_0x287517),console[_0x28d608(0x1c5)](_0x28d608(0x198)+_0x3fdaf4),console[_0x28d608(0x1c5)](_0x28d608(0x1c0)+_0xed0300),console['log'](_0x28d608(0x1c4)+_0x589cd9);}async function runInteractive(_0x415e34,_0x417256){const _0x5476cd=a21_0x74e9e5,_0x20444a=loadExisting(_0x417256),_0x59375c=typeof _0x20444a?.['appcode']===_0x5476cd(0x1c8)?_0x20444a[_0x5476cd(0x1a8)]:'',_0x38df3b=resolveInitEnv(_0x415e34);console[_0x5476cd(0x1c5)](CLI_BIN_NAME+_0x5476cd(0x1ad));if(existsSync(_0x417256)&&!_0x415e34[_0x5476cd(0x1b1)]){const _0x10e487=await promptYesNo(_0x5476cd(0x1ce)+_0x417256+_0x5476cd(0x19a),![]);if(!_0x10e487){console[_0x5476cd(0x1c5)](_0x5476cd(0x19c));return;}}const _0x23ae7c=typeof _0x415e34[_0x5476cd(0x1a8)]===_0x5476cd(0x1c8)?_0x415e34[_0x5476cd(0x1a8)]['trim']():'';let _0x1b3691=_0x23ae7c;!_0x1b3691&&(_0x1b3691=await promptInput(_0x5476cd(0x1b3),_0x59375c));if(!_0x1b3691[_0x5476cd(0x1a4)]())throw CliErrors['validation']('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x417256,{'appcode':_0x1b3691[_0x5476cd(0x1a4)](),'env':_0x38df3b},_0x415e34),console['log'](_0x5476cd(0x1c3)+_0x417256),console[_0x5476cd(0x1c5)](_0x5476cd(0x1c0)+_0x1b3691['trim']()),console[_0x5476cd(0x1c5)](_0x5476cd(0x1c4)+_0x38df3b);}async function writeInitConfig(_0x155110,_0x26f979,_0x53d6d8){const _0x7b98ee=a21_0x74e9e5;let _0x306eab={};existsSync(_0x155110)&&!_0x53d6d8[_0x7b98ee(0x1b1)]&&(_0x306eab=readConfigFile(_0x155110));for(const [_0x41a01a,_0x1df938]of Object[_0x7b98ee(0x1ba)](_0x26f979)){_0x1df938!==undefined&&(_0x306eab[_0x41a01a]=_0x1df938);}if(_0x306eab['app'])delete _0x306eab[_0x7b98ee(0x1ab)];writeConfigFile(_0x155110,_0x306eab);}class AbortPrompt extends Error{constructor(){const _0x2684d9=a21_0x74e9e5;super(_0x2684d9(0x196)),this[_0x2684d9(0x1bb)]=_0x2684d9(0x1c6);}}function createSafeRl(){const _0x35bac7=a21_0x74e9e5,_0x3c6f14=createInterface({'input':process[_0x35bac7(0x1ae)],'output':process['stdout']});let _0x18200e;const _0x5a7783=new Promise((_0x4a52bb,_0x4a7fe8)=>{const _0x22b1a0=_0x35bac7;_0x18200e=()=>{const _0x58d020=a21_0x84ec;_0x18200e&&(_0x3c6f14[_0x58d020(0x1bc)](_0x58d020(0x1cc),_0x18200e),_0x18200e=undefined);try{_0x3c6f14['close']();}catch{}_0x4a7fe8(new AbortPrompt());},_0x3c6f14[_0x22b1a0(0x1b9)]('SIGINT',_0x18200e);}),_0x2279a2=()=>{const _0x1a2b85=_0x35bac7;_0x18200e&&(_0x3c6f14[_0x1a2b85(0x1bc)](_0x1a2b85(0x1cc),_0x18200e),_0x18200e=undefined);try{_0x3c6f14[_0x1a2b85(0x1af)]();}catch{}};return{'rl':_0x3c6f14,'abortPromise':_0x5a7783,'disposeSuccess':_0x2279a2};}async function promptInput(_0x5b2f8b,_0x833438){const {rl:_0x594db4,abortPromise:_0x2e57e2,disposeSuccess:_0x43a3bf}=createSafeRl(),_0x73f358=new Promise(_0x338fb9=>{const _0x1f79d5=a21_0x84ec,_0x4af458=_0x833438?'\x20\x20'+_0x5b2f8b+'\x20('+_0x833438+_0x1f79d5(0x1ca):'\x20\x20'+_0x5b2f8b+':\x20';_0x594db4[_0x1f79d5(0x1d5)](_0x4af458,_0x244702=>{_0x43a3bf(),_0x338fb9(_0x244702['trim']()||_0x833438);});});return Promise['race']([_0x73f358,_0x2e57e2]);}async function promptYesNo(_0x23271d,_0x9cd30a){const _0x401d32=a21_0x74e9e5,{rl:_0x713eca,abortPromise:_0x1dbdb9,disposeSuccess:_0x247693}=createSafeRl(),_0x4f43c5=new Promise(_0x438e43=>{const _0x4f501b=a21_0x84ec,_0x3371f4=_0x9cd30a?_0x4f501b(0x1b0):_0x4f501b(0x1c7);_0x713eca[_0x4f501b(0x1d5)]('\x20\x20'+_0x23271d+'\x20'+_0x3371f4+':\x20',_0x28a20e=>{const _0x49d238=_0x4f501b;_0x247693();const _0x369def=_0x28a20e[_0x49d238(0x1a4)]()[_0x49d238(0x1b7)]();if(_0x369def==='y'||_0x369def===_0x49d238(0x1b1))_0x438e43(!![]);else{if(_0x369def==='n'||_0x369def==='no')_0x438e43(![]);else _0x438e43(_0x9cd30a);}});});return Promise[_0x401d32(0x1a0)]([_0x4f43c5,_0x1dbdb9]);}function loadExisting(_0x41ec84){if(!existsSync(_0x41ec84))return null;return readConfigFile(_0x41ec84);}function a21_0x4b4c(){const _0x3011df=['AbortPrompt','[y/N]','string','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','):\x20','cancelled','SIGINT','join','File\x20','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`.','global','file','Failed\x20to\x20parse\x20source\x20file:\x20','Override\x20imported\x20default\x20env','validation','question','Imported\x20from\x20','14805972zOpFgm','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','cwd','User\x20aborted\x20prompt','380005aCcFuD','Initialized\x20','project','\x20already\x20exists.\x20Overwrite?','env','Aborted.','Usage:\x20','riskLevel','defaultApp','race','\x22.\x20Allowed:\x20','App\x20code\x20for\x20the\x20project','Override\x20imported\x20default\x20appcode','trim','boolean','apps','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','appcode','6pOUjDa','Source\x20file\x20not\x20found:\x20','app','1163044INChlk','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','stdin','close','[Y/n]','yes','Skip\x20confirmation\x20when\x20overwriting','App\x20code','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','2654eiUMDv','4683513qwxJJk','toLowerCase','36176450NILUYz','once','entries','name','removeListener','object','951xohpHF','262416UhIzAO','\x20\x20appcode:\x20','flagMissing','304srGgUA','\x0aInitialized\x20','\x20\x20env:\x20\x20\x20\x20\x20','log'];a21_0x4b4c=function(){return _0x3011df;};return a21_0x4b4c();}function resolveFilePath(_0x2b5201){const _0xc29cf2=a21_0x74e9e5;return isAbsolute(_0x2b5201)?_0x2b5201:resolve(process[_0xc29cf2(0x195)](),_0x2b5201);}function readSourceFile(_0x4d2c98){const _0x216ecc=a21_0x74e9e5;try{const _0x1688e5=readFileSync(_0x4d2c98,{'encoding':'utf8'});return JSON['parse'](_0x1688e5);}catch(_0x43b466){throw CliErrors[_0x216ecc(0x1d4)](_0x216ecc(0x1d2)+_0x43b466['message']);}}function resolveInitEnv(_0x41f3be){const _0x39e6a6=a21_0x74e9e5,_0x45f675=_0x41f3be[_0x39e6a6(0x19b)];if(_0x45f675===undefined||_0x45f675==='')return DEFAULT_CONFIG_VALUES[_0x39e6a6(0x19b)];if(!RUNTIME_ENV_VALUES['includes'](_0x45f675))throw CliErrors[_0x39e6a6(0x1d4)]('Invalid\x20env\x20\x22'+_0x45f675+_0x39e6a6(0x1a1)+RUNTIME_ENV_VALUES[_0x39e6a6(0x1cd)](',\x20'));return _0x45f675;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a22_0x2ad906=a22_0x1961;(function(_0x372958,_0x266abf){const _0x2fa4b1=a22_0x1961,_0x2a5b13=_0x372958();while(!![]){try{const _0x11a62f=parseInt(_0x2fa4b1(0xd0))/0x1*(parseInt(_0x2fa4b1(0xe5))/0x2)+parseInt(_0x2fa4b1(0xce))/0x3+-parseInt(_0x2fa4b1(0xd5))/0x4*(-parseInt(_0x2fa4b1(0xe4))/0x5)+-parseInt(_0x2fa4b1(0xd1))/0x6*(parseInt(_0x2fa4b1(0xda))/0x7)+parseInt(_0x2fa4b1(0xe1))/0x8*(-parseInt(_0x2fa4b1(0xdb))/0x9)+-parseInt(_0x2fa4b1(0xe7))/0xa*(-parseInt(_0x2fa4b1(0xcf))/0xb)+-parseInt(_0x2fa4b1(0xcc))/0xc;if(_0x11a62f===_0x266abf)break;else _0x2a5b13['push'](_0x2a5b13['shift']());}catch(_0x22bd90){_0x2a5b13['push'](_0x2a5b13['shift']());}}}(a22_0x10e1,0x7c508));import{logger}from'../../utils/logger.js';function printLogs(_0x47d99d){const _0x4521e2=a22_0x1961;if(_0x47d99d[_0x4521e2(0xec)]===0x0){console['log'](_0x4521e2(0xdc));return;}console[_0x4521e2(0xd7)](_0x4521e2(0xe9)),_0x47d99d[_0x4521e2(0xe0)]((_0x5a5858,_0x158014)=>{const _0x3cf0ed=_0x4521e2,_0x252914=new Date(_0x5a5858['timestamp'])[_0x3cf0ed(0xcd)]('en-US'),_0x234b3b=_0x5a5858[_0x3cf0ed(0xe8)]===_0x3cf0ed(0xe2)?'√':_0x5a5858['level']===_0x3cf0ed(0xd4)?'×':_0x5a5858[_0x3cf0ed(0xe8)]==='warn'?'!':'i';console[_0x3cf0ed(0xd7)](_0x158014+0x1+'.\x20'+_0x234b3b+'\x20['+_0x5a5858['command']+']\x20'+_0x5a5858['message']),console['log'](_0x3cf0ed(0xdf)+_0x252914),_0x5a5858[_0x3cf0ed(0xd3)]&&console[_0x3cf0ed(0xd7)](_0x3cf0ed(0xe6)+_0x5a5858[_0x3cf0ed(0xd3)]+'ms'),_0x5a5858['details']&&Object[_0x3cf0ed(0xd6)](_0x5a5858[_0x3cf0ed(0xe3)])['length']>0x0&&console[_0x3cf0ed(0xd7)]('\x20\x20\x20Details:\x20'+JSON[_0x3cf0ed(0xdd)](_0x5a5858['details'],null,0x2)),console['log']('');});}function a22_0x1961(_0x588811,_0x48802e){_0x588811=_0x588811-0xcc;const _0x10e1d2=a22_0x10e1();let _0x1961d5=_0x10e1d2[_0x588811];return _0x1961d5;}function a22_0x10e1(){const _0x491a5d=['write','View\x20command\x20history\x20logs','7hecPwq','411966Gkaqcm','*\x20No\x20logs\x20found','stringify','read','\x20\x20\x20Time:\x20','forEach','48Gehhbb','success','details','5SZvHmS','568XrYQCc','\x20\x20\x20Duration:\x20','558050kjiYKE','level','*\x20Lovrabet\x20Runtime\x20CLI\x20logs:\x0a','*\x20Logs\x20cleared','Clear\x20command\x20history\x20logs','length','show','2068272NYQiqZ','toLocaleString','768450FNzHnr','22tQfTjk','362LSCrAo','1708542mJNUTy','logs','duration','error','3081524DVtmoR','keys','log'];a22_0x10e1=function(){return _0x491a5d;};return a22_0x10e1();}export const logsDefinitions=[{'service':a22_0x2ad906(0xd2),'command':a22_0x2ad906(0xed),'description':a22_0x2ad906(0xd9),'risk':a22_0x2ad906(0xde),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xd6b876){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':'clear','description':a22_0x2ad906(0xeb),'risk':a22_0x2ad906(0xd8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3b3cc0){const _0x2567bf=a22_0x2ad906;return logger['clearLogs'](),console[_0x2567bf(0xd7)](_0x2567bf(0xea)),{'ok':!![]};}}];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a23_0x2826(_0x23fdc3,_0x1b7817){_0x23fdc3=_0x23fdc3-0x118;const _0x51c6ac=a23_0x51c6();let _0x282612=_0x51c6ac[_0x23fdc3];return _0x282612;}const a23_0x4e11c7=a23_0x2826;(function(_0x1df65e,_0x2f4382){const _0x2f0212=a23_0x2826,_0x47d07f=_0x1df65e();while(!![]){try{const _0x562b28=-parseInt(_0x2f0212(0x11b))/0x1+parseInt(_0x2f0212(0x129))/0x2+-parseInt(_0x2f0212(0x121))/0x3+parseInt(_0x2f0212(0x128))/0x4+-parseInt(_0x2f0212(0x137))/0x5+parseInt(_0x2f0212(0x12a))/0x6+parseInt(_0x2f0212(0x126))/0x7*(parseInt(_0x2f0212(0x134))/0x8);if(_0x562b28===_0x2f4382)break;else _0x47d07f['push'](_0x47d07f['shift']());}catch(_0xeeacae){_0x47d07f['push'](_0x47d07f['shift']());}}}(a23_0x51c6,0x8f9bd));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x1a36b5){const _0x5c7205=a23_0x2826;for(const _0x2d8b1b of _0x1a36b5){definitions[_0x5c7205(0x135)](_0x2d8b1b['service']+':'+_0x2d8b1b[_0x5c7205(0x136)],_0x2d8b1b);let _0x298b48=serviceGroups['get'](_0x2d8b1b['service']);!_0x298b48&&(_0x298b48=[],serviceGroups[_0x5c7205(0x135)](_0x2d8b1b[_0x5c7205(0x120)],_0x298b48)),_0x298b48[_0x5c7205(0x12c)](_0x2d8b1b);}}function registerService(_0x514e3a,_0x392476,_0x5f124f){const _0x3f62f2=a23_0x2826;registerDefinitions(_0x392476);const _0x1afddd=_0x346f55=>_0x346f55===_0x3f62f2(0x123)?'':_0x346f55===_0x3f62f2(0x12d)?'\x20\x20[write]':_0x3f62f2(0x11c),_0xb927c1={'service':_0x392476[0x0][_0x3f62f2(0x120)],'label':_0x514e3a,'commands':_0x392476['map'](_0x2d5440=>({'command':_0x2d5440[_0x3f62f2(0x136)],'description':_0x2d5440[_0x3f62f2(0x12e)],'tag':_0x1afddd(_0x2d5440[_0x3f62f2(0x130)])})),'defaultCommand':_0x5f124f?.['defaultCommand']??(_0x5f124f?.['isSingleCommand']?_0x392476[0x0][_0x3f62f2(0x136)]:undefined),'isSingleCommand':_0x5f124f?.[_0x3f62f2(0x118)]};serviceRegistry[_0x3f62f2(0x12c)](_0xb927c1),serviceByName['set'](_0xb927c1[_0x3f62f2(0x120)],_0xb927c1);}registerService(a23_0x4e11c7(0x133),authDefinitions,{'defaultCommand':'login'}),registerService(a23_0x4e11c7(0x11e),datasetDefinitions),registerService('Data\x20CRUD',dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService(a23_0x4e11c7(0x124),bffDefinitions),registerService(a23_0x4e11c7(0x11a),appDefinitions,{'defaultCommand':a23_0x4e11c7(0x119)}),registerService(a23_0x4e11c7(0x132),configDefinitions,{'defaultCommand':a23_0x4e11c7(0x119)}),registerService(a23_0x4e11c7(0x125),skillDefinitions,{'defaultCommand':a23_0x4e11c7(0x122)}),registerService(a23_0x4e11c7(0x12b),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a23_0x4e11c7(0x12f),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x353611,_0x255e81){const _0x5b5b3d=a23_0x4e11c7;return definitions[_0x5b5b3d(0x11d)](_0x353611+':'+_0x255e81);}export function isKnownService(_0x137215){const _0x49415f=a23_0x4e11c7;return serviceByName[_0x49415f(0x131)](_0x137215);}export function getServiceEntry(_0x38fd20){const _0x42cea7=a23_0x4e11c7;return serviceByName[_0x42cea7(0x11d)](_0x38fd20);}function a23_0x51c6(){const _0x5130a9=['25736MrZnot','set','command','3965920IYXETn','isSingleCommand','list','App\x20Management','859487TGtySk','\x20\x20[high-risk-write]','get','Datasets','from','service','2986182gwxSnN','install','read','BFF\x20Scripts','Skills','3941YuntMw','values','2109628rWjOwQ','582806kwgVdA','3637830BOhgPJ','Diagnostics','push','write','description','Logs','risk','has','Configuration','Authentication'];a23_0x51c6=function(){return _0x5130a9;};return a23_0x51c6();}export function getAllDefinitions(){const _0x552832=a23_0x4e11c7;return Array[_0x552832(0x11f)](definitions[_0x552832(0x127)]());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x22289a=a24_0x3b0b;function a24_0x3b0b(_0xd9b5e1,_0x2e5a93){_0xd9b5e1=_0xd9b5e1-0x180;const _0xde0944=a24_0xde09();let _0x3b0b82=_0xde0944[_0xd9b5e1];return _0x3b0b82;}(function(_0x324280,_0x276657){const _0x2ae353=a24_0x3b0b,_0x3e120c=_0x324280();while(!![]){try{const _0x26b0db=parseInt(_0x2ae353(0x187))/0x1*(parseInt(_0x2ae353(0x18b))/0x2)+-parseInt(_0x2ae353(0x189))/0x3+parseInt(_0x2ae353(0x184))/0x4*(-parseInt(_0x2ae353(0x18a))/0x5)+parseInt(_0x2ae353(0x186))/0x6+parseInt(_0x2ae353(0x182))/0x7+parseInt(_0x2ae353(0x180))/0x8+-parseInt(_0x2ae353(0x183))/0x9;if(_0x26b0db===_0x276657)break;else _0x3e120c['push'](_0x3e120c['shift']());}catch(_0x1b4d93){_0x3e120c['push'](_0x3e120c['shift']());}}}(a24_0xde09,0xda49e));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x4c4e33){const _0xb074c5=await buildSchemaPayload();return{'ok':!![],'data':_0xb074c5};}export const schemaDefinition={'service':a24_0x22289a(0x181),'command':a24_0x22289a(0x185),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a24_0x22289a(0x188),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a24_0xde09(){const _0x5666fc=['98lGNLAy','2284000UbHNrq','schema','11713856ObPLZf','18375642PaJFss','4jhtjBn','export','5254236NRhZJk','19120dCjmiz','read','972549hJFtol','2557315LhdKFv'];a24_0xde09=function(){return _0x5666fc;};return a24_0xde09();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a25_0x415d7e=a25_0x5d50;(function(_0x2af078,_0x19fc7){const _0x466224=a25_0x5d50,_0x1cb264=_0x2af078();while(!![]){try{const _0x25c1d4=-parseInt(_0x466224(0x1cb))/0x1*(-parseInt(_0x466224(0x1c4))/0x2)+-parseInt(_0x466224(0x1bd))/0x3*(parseInt(_0x466224(0x1c8))/0x4)+parseInt(_0x466224(0x1b6))/0x5+parseInt(_0x466224(0x1b1))/0x6+parseInt(_0x466224(0x1be))/0x7*(-parseInt(_0x466224(0x1b5))/0x8)+-parseInt(_0x466224(0x1ae))/0x9*(parseInt(_0x466224(0x1af))/0xa)+-parseInt(_0x466224(0x1bc))/0xb*(parseInt(_0x466224(0x1b0))/0xc);if(_0x25c1d4===_0x19fc7)break;else _0x1cb264['push'](_0x1cb264['shift']());}catch(_0x52fe10){_0x1cb264['push'](_0x1cb264['shift']());}}}(a25_0x2f38,0x5a439));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a25_0x2f38(){const _0x293da1=['14WpDRIK','error','pipe','npx\x20skills\x20add\x20failed:\x20','skill','log','10oOmxts','unknown','cwd','skill-install','156BPKbqO','inherit','setLogPath','115207oRPatx','16101egsFJm','3830XSigiX','12jyxJxq','3990840toltQB','Install\x20the\x20published\x20Lovrabet\x20developer\x20skill','write','../../skills/npx-skills-add.js','55576CsekrS','2655850vQgqlN','Check\x20network\x20connectivity\x20and\x20try\x20again.','info','apiError','nonInteractive','install','2546786webclp','36309wkCrtj'];a25_0x2f38=function(){return _0x293da1;};return a25_0x2f38();}function a25_0x5d50(_0x34f688,_0x5191e0){_0x34f688=_0x34f688-0x1ae;const _0x2f38f3=a25_0x2f38();let _0x5d503c=_0x2f38f3[_0x34f688];return _0x5d503c;}export const skillDefinitions=[{'service':a25_0x415d7e(0x1c2),'command':a25_0x415d7e(0x1bb),'description':a25_0x415d7e(0x1b2),'risk':a25_0x415d7e(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5daa48){const _0x253b75=a25_0x415d7e;logger[_0x253b75(0x1ca)](process[_0x253b75(0x1c6)]()),logger[_0x253b75(0x1b8)](_0x253b75(0x1c7),'Installing\x20published\x20Lovrabet\x20skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0x43b5d6,runNpxSkillsAddGlobal:_0x25b090}=await import(_0x253b75(0x1b4)),_0x540609=_0x5daa48[_0x253b75(0x1ba)]?_0x253b75(0x1c0):_0x253b75(0x1c9);console[_0x253b75(0x1c3)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x43b5d6+'\x20-g\x20-y)...');const _0x36f73e=_0x25b090(process['cwd'](),_0x43b5d6,{'stdio':_0x540609});if(_0x36f73e['skipped'])console[_0x253b75(0x1c3)]('Skipped\x20npx\x20(LOVRABET_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x36f73e['ok'])console['log'](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x253b75(0x1b9)](_0x253b75(0x1c1)+(_0x36f73e[_0x253b75(0x1bf)]||_0x253b75(0x1c5)),_0x253b75(0x1b7));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a26_0x5dd021=a26_0x9a53;(function(_0x318cdf,_0x1a99aa){const _0x37fd8a=a26_0x9a53,_0x1804fb=_0x318cdf();while(!![]){try{const _0x281433=parseInt(_0x37fd8a(0x1d7))/0x1*(parseInt(_0x37fd8a(0x1e1))/0x2)+-parseInt(_0x37fd8a(0x1cf))/0x3*(-parseInt(_0x37fd8a(0x1ce))/0x4)+parseInt(_0x37fd8a(0x1d5))/0x5*(parseInt(_0x37fd8a(0x1db))/0x6)+-parseInt(_0x37fd8a(0x1dd))/0x7*(parseInt(_0x37fd8a(0x1d0))/0x8)+-parseInt(_0x37fd8a(0x1d1))/0x9+-parseInt(_0x37fd8a(0x1d6))/0xa*(-parseInt(_0x37fd8a(0x1da))/0xb)+-parseInt(_0x37fd8a(0x1d9))/0xc;if(_0x281433===_0x1a99aa)break;else _0x1804fb['push'](_0x1804fb['shift']());}catch(_0x1b2813){_0x1804fb['push'](_0x1804fb['shift']());}}}(a26_0x3e8f,0xf0b27));function a26_0x9a53(_0x24008d,_0x488c30){_0x24008d=_0x24008d-0x1cc;const _0x3e8fde=a26_0x3e8f();let _0x9a53df=_0x3e8fde[_0x24008d];return _0x9a53df;}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a26_0x5dd021(0x1de),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a26_0x5dd021(0x1d8),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x446cb7){const _0x3d1f05=a26_0x5dd021,_0x467377=await getSqlQueryInfo(_0x446cb7['appCode'],_0x446cb7['str'](_0x3d1f05(0x1cd))),_0x598936=_0x446cb7[_0x3d1f05(0x1d3)](_0x3d1f05(0x1d4));if(_0x598936)return{'ok':!![],'data':_0x467377};const _0xd358d8=_0x467377[_0x3d1f05(0x1e0)]?await getDbName(_0x446cb7[_0x3d1f05(0x1cc)],_0x467377[_0x3d1f05(0x1e0)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x467377[_0x3d1f05(0x1d2)],'sqlName':_0x467377[_0x3d1f05(0x1dc)],'db':_0xd358d8?_0xd358d8+'\x20('+_0x467377[_0x3d1f05(0x1e0)]+')':_0x467377[_0x3d1f05(0x1e0)]??'','description':_0x467377[_0x3d1f05(0x1df)]??'','sqlContent':_0x467377[_0x3d1f05(0x1e2)]??''}};}};function a26_0x3e8f(){const _0x353dfa=['11573630YKqgkV','345KMPBWQ','read','27331104vOShFv','11dkSMts','227382SwIwGf','sqlName','3633YwFDtv','detail','description','dbId','9394ZJIKBm','sqlContent','appCode','sqlcode','28dnghCK','361455VvHkKx','2152pbQmRv','7420293QwjbWl','sqlCode','bool','verbose','80kQXPyt'];a26_0x3e8f=function(){return _0x353dfa;};return a26_0x3e8f();}
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x55f3af=a27_0x1f10;(function(_0x8cbd7d,_0x142ff9){const _0x1b700f=a27_0x1f10,_0x184561=_0x8cbd7d();while(!![]){try{const _0x448824=-parseInt(_0x1b700f(0x1de))/0x1+-parseInt(_0x1b700f(0x1e7))/0x2*(parseInt(_0x1b700f(0x1ed))/0x3)+-parseInt(_0x1b700f(0x1ec))/0x4+parseInt(_0x1b700f(0x1dc))/0x5+parseInt(_0x1b700f(0x1dd))/0x6*(-parseInt(_0x1b700f(0x1db))/0x7)+-parseInt(_0x1b700f(0x1e4))/0x8*(parseInt(_0x1b700f(0x1d8))/0x9)+parseInt(_0x1b700f(0x1e6))/0xa;if(_0x448824===_0x142ff9)break;else _0x184561['push'](_0x184561['shift']());}catch(_0x65c50b){_0x184561['push'](_0x184561['shift']());}}}(a27_0x3d80,0x76696));function a27_0x3d80(){const _0x27baba=['14jbaNnX','798105lNYcHh','1756662KCBnbT','322068OtjQNF','sqlcode','length','str','Returned\x20','execSuccess','2120304yRlnSF','execError','26269430QxJnBH','1663346lEiRob','execResult','\x20row(s)\x20in\x20','isArray','SQL\x20execution\x20failed','128716XzTVRO','3IPBlgq','sql','18YsJQHS','read','now'];a27_0x3d80=function(){return _0x27baba;};return a27_0x3d80();}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a27_0x1f10(_0x1d4033,_0x1724e3){_0x1d4033=_0x1d4033-0x1d7;const _0x3d80c7=a27_0x3d80();let _0x1f109a=_0x3d80c7[_0x1d4033];return _0x1f109a;}export const sqlExec={'service':a27_0x55f3af(0x1d7),'command':'exec','description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a27_0x55f3af(0x1d9),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x5c4abd){const _0x48439e=a27_0x55f3af,_0x3737e3=parseJsonParams(_0x5c4abd[_0x48439e(0x1e1)]('params')),_0x26f5aa=Date[_0x48439e(0x1da)](),_0x342adb=await executeSdkSql(_0x5c4abd[_0x48439e(0x1e1)](_0x48439e(0x1df)),_0x3737e3),_0x31cb89=Date[_0x48439e(0x1da)]()-_0x26f5aa,_0x21ca3f=_0x342adb?.[_0x48439e(0x1e8)]??_0x342adb,_0x54b433=_0x342adb?.[_0x48439e(0x1e3)]??!![];if(!_0x54b433)return{'ok':![],'data':{'error':_0x342adb?.[_0x48439e(0x1e5)]||_0x48439e(0x1eb),'elapsed':_0x31cb89},'message':'SQL\x20execution\x20failed'};const _0x336dc6=Array[_0x48439e(0x1ea)](_0x21ca3f)?_0x21ca3f:[];return{'ok':!![],'data':{'rows':_0x336dc6,'rowCount':_0x336dc6[_0x48439e(0x1e0)],'elapsed':_0x31cb89},'message':_0x48439e(0x1e2)+_0x336dc6[_0x48439e(0x1e0)]+_0x48439e(0x1e9)+_0x31cb89+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ce228,_0x293ca8){const _0x17ca4c=a28_0x2663,_0x597a7a=_0x1ce228();while(!![]){try{const _0x56cf7f=parseInt(_0x17ca4c(0x16d))/0x1+parseInt(_0x17ca4c(0x172))/0x2+parseInt(_0x17ca4c(0x16b))/0x3+parseInt(_0x17ca4c(0x16c))/0x4+-parseInt(_0x17ca4c(0x16a))/0x5*(-parseInt(_0x17ca4c(0x16f))/0x6)+-parseInt(_0x17ca4c(0x171))/0x7*(-parseInt(_0x17ca4c(0x16e))/0x8)+-parseInt(_0x17ca4c(0x170))/0x9;if(_0x56cf7f===_0x293ca8)break;else _0x597a7a['push'](_0x597a7a['shift']());}catch(_0x468bdc){_0x597a7a['push'](_0x597a7a['shift']());}}}(a28_0x5488,0xa4269));function a28_0x2663(_0x23482e,_0x3a10f6){_0x23482e=_0x23482e-0x16a;const _0x54881e=a28_0x5488();let _0x26633a=_0x54881e[_0x23482e];return _0x26633a;}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a28_0x5488(){const _0x363d31=['49PyeCuW','1765812ZmUQks','7660QJlNVO','596952WbUVVy','543528JMtJfH','972990pAJkzo','151760hqcjbz','1002yFhQVb','17163315pMxGsh'];a28_0x5488=function(){return _0x363d31;};return a28_0x5488();}
|