@lovrabet/lovrabet-cli 2.0.2 → 2.0.4-beta.0
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 +8 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a13_0x4f8af2=a13_0x109b;(function(_0x16209f,_0x41c5f9){const _0x6796ee=a13_0x109b,_0xcc1e7d=_0x16209f();while(!![]){try{const _0x45c650=-parseInt(_0x6796ee(0x10c))/0x1*(-parseInt(_0x6796ee(0x102))/0x2)+-parseInt(_0x6796ee(0xf8))/0x3+-parseInt(_0x6796ee(0x106))/0x4*(-parseInt(_0x6796ee(0x104))/0x5)+-parseInt(_0x6796ee(0x10a))/0x6*(-parseInt(_0x6796ee(0xfe))/0x7)+parseInt(_0x6796ee(0xfd))/0x8*(parseInt(_0x6796ee(0xff))/0x9)+parseInt(_0x6796ee(0x101))/0xa*(parseInt(_0x6796ee(0x10b))/0xb)+parseInt(_0x6796ee(0x109))/0xc*(-parseInt(_0x6796ee(0xf9))/0xd);if(_0x45c650===_0x41c5f9)break;else _0xcc1e7d['push'](_0xcc1e7d['shift']());}catch(_0x57461c){_0xcc1e7d['push'](_0xcc1e7d['shift']());}}}(a13_0x68a5,0x59446));export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':a13_0x4f8af2(0xfc),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a13_0x4f8af2(0x103),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':'verbose','type':a13_0x4f8af2(0x105),'description':a13_0x4f8af2(0x10d)};function a13_0x68a5(){const _0x230f16=['sqlcode','823785OkKqQc','boolean','12zumVKD','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','string','420dSGofV','4362858dtDyxl','2688807VJELjr','131hibNMO','Return\x20full\x20raw\x20response\x20object','452094FszjFT','705796bMlOZi','Resource\x20ID','number','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8JWzxSv','7VCPpWq','5897781qgsjpe','name','20RjZDQL','778eYflGt'];a13_0x68a5=function(){return _0x230f16;};return a13_0x68a5();}export const PARAMS_FLAG={'name':'params','type':a13_0x4f8af2(0x108),'description':a13_0x4f8af2(0x107)};function a13_0x109b(_0x413894,_0xa28b40){_0x413894=_0x413894-0xf8;const _0x68a5f8=a13_0x68a5();let _0x109b31=_0x68a5f8[_0x413894];return _0x109b31;}export const NAME_FLAG={'name':a13_0x4f8af2(0x100),'type':a13_0x4f8af2(0x108),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x4f8af2(0xfb),'required':!![],'description':a13_0x4f8af2(0xfa)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a14_0x16015f=a14_0x44be;(function(_0x20e491,_0x3fe6db){const _0x524b4e=a14_0x44be,_0x2c87b2=_0x20e491();while(!![]){try{const _0x237bcd=parseInt(_0x524b4e(0x174))/0x1+-parseInt(_0x524b4e(0x170))/0x2*(parseInt(_0x524b4e(0x166))/0x3)+-parseInt(_0x524b4e(0x190))/0x4*(parseInt(_0x524b4e(0x182))/0x5)+-parseInt(_0x524b4e(0x188))/0x6*(-parseInt(_0x524b4e(0x173))/0x7)+parseInt(_0x524b4e(0x163))/0x8*(-parseInt(_0x524b4e(0x16d))/0x9)+parseInt(_0x524b4e(0x19d))/0xa*(parseInt(_0x524b4e(0x186))/0xb)+parseInt(_0x524b4e(0x193))/0xc;if(_0x237bcd===_0x3fe6db)break;else _0x2c87b2['push'](_0x2c87b2['shift']());}catch(_0x28a5d4){_0x2c87b2['push'](_0x2c87b2['shift']());}}}(a14_0x385b,0x36636));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_0x385b(){const _0x179d43=['../../context.js','get','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','36216QloSKO','\x20config\x20get\x20<key>','stringify','218PDbJTt','bool','Missing\x20key\x20or\x20value.','24479ajTxjG','49081OFNgpH','Set\x20a\x20config\x20value','object','split','Missing\x20key\x20argument.','list','riskLevel','includes','raw','value','write','config','\x22\x20not\x20found\x20at\x20top\x20level.','global','845720smDZms','validation','Key\x20not\x20found:\x20','\x20config\x20delete\x20<key>\x20[--global]','297hnrCpx','key','30rqnNeO','Get\x20a\x20config\x20value','args','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Write\x20to\x20global\x20config','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20\x20global:\x20\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','4ebCZlh','log','Usage:\x20','3528480SKNtBS','project-or-global-explicit','\x20(global)','\x20\x20project:\x20','`\x20=\x20\x22','boolean','Settable\x20top-level\x20keys:\x20','set','List\x20current\x20config','delete','111290EkulTb','Value\x20to\x20assign','440khZRHJ','pageSize','join','1317mjFXJG','Key\x20\x22','Config\x20files:\x0a','(none)'];a14_0x385b=function(){return _0x179d43;};return a14_0x385b();}function a14_0x44be(_0x4923c7,_0x399733){_0x4923c7=_0x4923c7-0x163;const _0x385bc7=a14_0x385b();let _0x44be4d=_0x385bc7[_0x4923c7];return _0x44be4d;}const GLOBAL_FLAG={'name':'global','type':a14_0x16015f(0x198),'description':a14_0x16015f(0x18c),'default':![]},listDef={'service':a14_0x16015f(0x17f),'command':a14_0x16015f(0x179),'description':a14_0x16015f(0x19b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x57467b){const _0x331cde=a14_0x16015f,{buildConfigFromFlags:_0x4302f4}=await import(_0x331cde(0x16a)),_0x3fe178=_0x4302f4({}),_0x4c0498=getProjectConfigPath(),_0x24a33d=resolveWriteConfigPath(_0x331cde(0x181));if(_0x57467b['format']==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x331cde(0x16f)](_0x3fe178[_0x331cde(0x17c)],null,0x2)+'\x0a\x0a')+_0x331cde(0x168)+(_0x331cde(0x196)+(_0x4c0498??_0x331cde(0x169))+'\x0a')+(_0x331cde(0x18e)+_0x24a33d)};return{'ok':!![],'data':{'effective':_0x3fe178[_0x331cde(0x17c)],'configFiles':{'project':_0x4c0498??null,'global':_0x24a33d}}};}},getDef={'service':a14_0x16015f(0x17f),'command':a14_0x16015f(0x16b),'description':a14_0x16015f(0x189),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x16015f(0x187),'description':a14_0x16015f(0x18d),'required':!![]}],'flags':[],async 'execute'(_0x5b512b){const _0x559501=a14_0x16015f,_0x16598f=_0x5b512b[_0x559501(0x18a)][0x0];if(!_0x16598f)throw CliErrors[_0x559501(0x183)](_0x559501(0x178),'Usage:\x20'+CLI_BIN_NAME+_0x559501(0x16e));const {buildConfigFromFlags:_0x30a319}=await import(_0x559501(0x16a)),{raw:_0x5ef323}=_0x30a319({});if(_0x16598f[_0x559501(0x17b)]('.')){const _0x1727bb=_0x16598f[_0x559501(0x177)]('.');let _0x19ff69=_0x5ef323;for(const _0xef69bb of _0x1727bb){if(_0x19ff69==null||typeof _0x19ff69!==_0x559501(0x176))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x16598f);_0x19ff69=_0x19ff69[_0xef69bb];}if(_0x19ff69===undefined)throw CliErrors[_0x559501(0x183)](_0x559501(0x184)+_0x16598f);return console[_0x559501(0x191)](typeof _0x19ff69===_0x559501(0x176)?JSON[_0x559501(0x16f)](_0x19ff69,null,0x2):String(_0x19ff69)),{'ok':!![]};}const _0x45c170=_0x5ef323[_0x16598f];if(_0x45c170===undefined)throw CliErrors[_0x559501(0x183)](_0x559501(0x184)+_0x16598f);return console['log'](typeof _0x45c170===_0x559501(0x176)?JSON[_0x559501(0x16f)](_0x45c170,null,0x2):String(_0x45c170)),{'ok':!![]};}},setDef={'service':'config','command':a14_0x16015f(0x19a),'description':a14_0x16015f(0x175),'risk':a14_0x16015f(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x16015f(0x187),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x16015f(0x17d),'description':a14_0x16015f(0x19e),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3e6e35){const _0x5a4ec7=a14_0x16015f,_0x7fc687=_0x3e6e35[_0x5a4ec7(0x18a)][0x0],_0x30c5da=_0x3e6e35[_0x5a4ec7(0x18a)][0x1];if(!_0x7fc687||_0x30c5da===undefined)throw CliErrors[_0x5a4ec7(0x183)](_0x5a4ec7(0x172),_0x5a4ec7(0x192)+CLI_BIN_NAME+_0x5a4ec7(0x18b));if(ENUM_KEYS[_0x7fc687]&&!ENUM_KEYS[_0x7fc687][_0x5a4ec7(0x17b)](_0x30c5da))throw CliErrors[_0x5a4ec7(0x183)]('Invalid\x20value\x20for\x20\x22'+_0x7fc687+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x7fc687][_0x5a4ec7(0x165)](',\x20'));if(_0x7fc687===_0x5a4ec7(0x17a))throw CliErrors[_0x5a4ec7(0x183)](_0x5a4ec7(0x16c));if(_0x7fc687===_0x5a4ec7(0x164)){const _0x30ea31=Number(_0x30c5da);if(isNaN(_0x30ea31)||_0x30ea31<=0x0)throw CliErrors['validation'](_0x5a4ec7(0x18f));}const _0x2cc678=resolveWriteScope({'explicitGlobal':_0x3e6e35[_0x5a4ec7(0x171)](_0x5a4ec7(0x181)),'policy':_0x5a4ec7(0x194)}),_0x37b90f=toScopeFlags(_0x2cc678),_0x210b07=readScopedConfig(_0x37b90f);if(!isTopLevelConfigKey(_0x7fc687))throw CliErrors[_0x5a4ec7(0x183)]('Top-level\x20key\x20\x22'+_0x7fc687+'\x22\x20is\x20not\x20settable.',_0x5a4ec7(0x199)+getTopLevelConfigKeySummary());return _0x210b07[_0x7fc687]=_0x7fc687==='pageSize'?Number(_0x30c5da):_0x30c5da,console['log']('Set\x20`'+_0x7fc687+_0x5a4ec7(0x197)+_0x30c5da+'\x22'+(_0x2cc678==='global'?_0x5a4ec7(0x195):'')),writeScopedConfig(_0x210b07,_0x37b90f),{'ok':!![]};}},deleteDef={'service':a14_0x16015f(0x17f),'command':a14_0x16015f(0x19c),'description':'Delete\x20a\x20config\x20value','risk':a14_0x16015f(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x26a87e){const _0x3e076a=a14_0x16015f,_0x30de9e=_0x26a87e[_0x3e076a(0x18a)][0x0];if(!_0x30de9e)throw CliErrors[_0x3e076a(0x183)]('Missing\x20key\x20argument.',_0x3e076a(0x192)+CLI_BIN_NAME+_0x3e076a(0x185));const _0x2bdd76=resolveWriteScope({'explicitGlobal':_0x26a87e['bool']('global'),'policy':_0x3e076a(0x194)}),_0x3d5997=toScopeFlags(_0x2bdd76),_0x535e10=readScopedConfig(_0x3d5997);if(_0x535e10[_0x30de9e]===undefined)throw CliErrors[_0x3e076a(0x183)](_0x3e076a(0x167)+_0x30de9e+_0x3e076a(0x180));return delete _0x535e10[_0x30de9e],console[_0x3e076a(0x191)]('Deleted\x20`'+_0x30de9e+'`'+(_0x2bdd76===_0x3e076a(0x181)?'\x20(global)':'')),writeScopedConfig(_0x535e10,_0x3d5997),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fad50,_0x477054){var _0x704aa5=a15_0x4a1e,_0x34ab1b=_0x2fad50();while(!![]){try{var _0x1498c7=parseInt(_0x704aa5(0xbb))/0x1*(-parseInt(_0x704aa5(0xc0))/0x2)+parseInt(_0x704aa5(0xbf))/0x3*(-parseInt(_0x704aa5(0xc1))/0x4)+parseInt(_0x704aa5(0xbd))/0x5+parseInt(_0x704aa5(0xc3))/0x6+-parseInt(_0x704aa5(0xbc))/0x7*(parseInt(_0x704aa5(0xb9))/0x8)+-parseInt(_0x704aa5(0xbe))/0x9*(parseInt(_0x704aa5(0xc4))/0xa)+parseInt(_0x704aa5(0xba))/0xb*(parseInt(_0x704aa5(0xc2))/0xc);if(_0x1498c7===_0x477054)break;else _0x34ab1b['push'](_0x34ab1b['shift']());}catch(_0x9147ef){_0x34ab1b['push'](_0x34ab1b['shift']());}}}(a15_0x4e3c,0xb7a61));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';function a15_0x4a1e(_0x191252,_0x37718a){_0x191252=_0x191252-0xb9;var _0x4e3c76=a15_0x4e3c();var _0x4a1eb6=_0x4e3c76[_0x191252];return _0x4a1eb6;}function a15_0x4e3c(){var _0x439899=['1438RHjnsY','4CYGAuB','36636LBadsz','3009378oWTUdt','27030BcBFgF','24iLIKRt','8052PXWIwe','1483cJEtwJ','249865yjiIyE','798860cwHjDV','135pARZWD','2789997tNzIuv'];a15_0x4e3c=function(){return _0x439899;};return a15_0x4e3c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a16_0x374e(_0x396d65,_0x599d4d){_0x396d65=_0x396d65-0x1c0;const _0xd9e867=a16_0xd9e8();let _0x374e0d=_0xd9e867[_0x396d65];return _0x374e0d;}const a16_0x4a5ab4=a16_0x374e;(function(_0xdf4302,_0x53fc76){const _0x3279c4=a16_0x374e,_0x763c4f=_0xdf4302();while(!![]){try{const _0x3d2a0a=parseInt(_0x3279c4(0x1c7))/0x1*(-parseInt(_0x3279c4(0x1ee))/0x2)+-parseInt(_0x3279c4(0x1cc))/0x3*(-parseInt(_0x3279c4(0x1fc))/0x4)+parseInt(_0x3279c4(0x202))/0x5+-parseInt(_0x3279c4(0x1c6))/0x6*(parseInt(_0x3279c4(0x1f7))/0x7)+-parseInt(_0x3279c4(0x205))/0x8*(-parseInt(_0x3279c4(0x208))/0x9)+parseInt(_0x3279c4(0x206))/0xa*(parseInt(_0x3279c4(0x1e1))/0xb)+-parseInt(_0x3279c4(0x1e3))/0xc*(parseInt(_0x3279c4(0x1f6))/0xd);if(_0x3d2a0a===_0x53fc76)break;else _0x763c4f['push'](_0x763c4f['shift']());}catch(_0x5ce802){_0x763c4f['push'](_0x763c4f['shift']());}}}(a16_0xd9e8,0x4a93c));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a16_0x4a5ab4(0x1e2),'risk':'read','paramsRequired':![],'description':a16_0x4a5ab4(0x1fe),'paramsHint':a16_0x4a5ab4(0x215)+a16_0x4a5ab4(0x1ff),'helpExtra':[a16_0x4a5ab4(0x1eb),a16_0x4a5ab4(0x1c4),a16_0x4a5ab4(0x1f5),a16_0x4a5ab4(0x1d3),a16_0x4a5ab4(0x1fd),a16_0x4a5ab4(0x1df),'\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_0x4a5ab4(0x20e),a16_0x4a5ab4(0x1d5),a16_0x4a5ab4(0x204),a16_0x4a5ab4(0x1f9),'','\x20\x20LOGICAL\x20COMBINATORS',a16_0x4a5ab4(0x1f8),a16_0x4a5ab4(0x1ec),'',a16_0x4a5ab4(0x1de),a16_0x4a5ab4(0x209),a16_0x4a5ab4(0x1d0),a16_0x4a5ab4(0x1e8),a16_0x4a5ab4(0x1da),a16_0x4a5ab4(0x1d6),'','\x20\x20PAGINATION',a16_0x4a5ab4(0x1e4),a16_0x4a5ab4(0x1d9),'\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)'][a16_0x4a5ab4(0x1fb)]('\x0a')},{'command':a16_0x4a5ab4(0x1db),'operation':a16_0x4a5ab4(0x1db),'risk':a16_0x4a5ab4(0x1ed),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1f3),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a16_0x4a5ab4(0x1c3),'risk':'write','paramsRequired':!![],'description':a16_0x4a5ab4(0x1cb),'paramsHint':a16_0x4a5ab4(0x1dd)},{'command':a16_0x4a5ab4(0x1d7),'operation':a16_0x4a5ab4(0x1d7),'risk':'write','paramsRequired':!![],'description':a16_0x4a5ab4(0x1fa),'paramsHint':a16_0x4a5ab4(0x1c1)},{'command':a16_0x4a5ab4(0x1e7),'operation':'update','risk':a16_0x4a5ab4(0x1c5),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1d2),'paramsHint':a16_0x4a5ab4(0x201)},{'command':a16_0x4a5ab4(0x1ce),'operation':'delete','risk':a16_0x4a5ab4(0x200),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1d8),'paramsHint':a16_0x4a5ab4(0x20c)},{'command':a16_0x4a5ab4(0x212),'operation':a16_0x4a5ab4(0x212),'risk':'read','paramsRequired':![],'description':a16_0x4a5ab4(0x1f0),'paramsHint':a16_0x4a5ab4(0x1f4)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x4a5ab4(0x1c8),'\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}',a16_0x4a5ab4(0x1d1),a16_0x4a5ab4(0x1e0),a16_0x4a5ab4(0x1dc),a16_0x4a5ab4(0x20f),a16_0x4a5ab4(0x20a),'\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_0x4a5ab4(0x1f2),a16_0x4a5ab4(0x214),a16_0x4a5ab4(0x1f1),a16_0x4a5ab4(0x1ea),'\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\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}',a16_0x4a5ab4(0x1ef),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x4a5ab4(0x207),'',a16_0x4a5ab4(0x203),'\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'][a16_0x4a5ab4(0x1fb)]('\x0a')}];function makeDataCommand(_0x263e23){const _0x4900b9=a16_0x4a5ab4,_0x446f38=_0x4900b9(0x213)+_0x263e23['command'],_0x15df94={'service':_0x4900b9(0x1d4),'command':_0x263e23[_0x4900b9(0x1c2)],'description':_0x263e23[_0x4900b9(0x1c0)],'risk':_0x263e23[_0x4900b9(0x1e6)],'helpExtra':_0x263e23[_0x4900b9(0x20b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x263e23['paramsHint']}],'validate':async _0x263f2d=>{const _0xc8b690=_0x4900b9;_0x263e23[_0xc8b690(0x1c9)]&&requireAnyOf(_0x263f2d,[_0xc8b690(0x20d)],_0x446f38),_0x263e23[_0xc8b690(0x1e5)]===_0xc8b690(0x1d7)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x263f2d['str']('params')));},async 'execute'(_0x1f7792){const _0x1eb3ce=_0x4900b9,_0x458463=_0x1f7792[_0x1eb3ce(0x1e9)]('code'),_0x8d9fd4=_0x263e23[_0x1eb3ce(0x1e5)]===_0x1eb3ce(0x1d7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1f7792[_0x1eb3ce(0x1e9)](_0x1eb3ce(0x20d)))):parseJsonParams(_0x1f7792['str'](_0x1eb3ce(0x20d)))??{},_0x35b892=Date[_0x1eb3ce(0x211)](),_0x591504=await executeData(_0x458463,_0x263e23[_0x1eb3ce(0x1e5)],_0x8d9fd4),_0x434a7b=Date[_0x1eb3ce(0x211)]()-_0x35b892;return{'ok':!![],'data':{'result':_0x591504,'elapsed':_0x434a7b},'message':_0x1eb3ce(0x213)+_0x263e23['command']+'\x20completed\x20in\x20'+_0x434a7b+'ms'};}};return _0x263e23[_0x4900b9(0x1e6)]!==_0x4900b9(0x1ed)&&(_0x15df94[_0x4900b9(0x210)]=async _0x3e891b=>{const _0x4314ec=_0x4900b9,_0x12a7d0=_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x1ca)),_0x5ae71f=_0x263e23[_0x4314ec(0x1e5)]===_0x4314ec(0x1d7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x20d)))):parseJsonParams(_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x20d)))??{};return dryRun('POST','/api/{appCode}/'+_0x12a7d0+'/'+_0x263e23[_0x4314ec(0x1e5)])['body'](_0x5ae71f)[_0x4314ec(0x1c0)](_0x4314ec(0x1cf)+_0x263e23[_0x4314ec(0x1c2)]+_0x4314ec(0x1cd)+_0x12a7d0)['build']();}),_0x15df94;}function a16_0xd9e8(){const _0x1dc9c1=['15774RaiXFy','filter','6255708fArrKS','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','operation','risk','update','\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}]','str','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20WHERE\x20OPERATORS','\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}}]}','read','182qLVyUx','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20PARAMS\x20STRUCTURE','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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}}','13nRcEQS','14ioxTPD','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20$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}}','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','join','1149740qPmEvP','\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\x20dataset\x20records\x20with\x20query\x20conditions','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','high-risk-write','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','1608675FBTJEn','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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}}','3768kLMSPI','2990foenTz','\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','27aRAWKN','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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}','helpExtra','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','params','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\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}','dryRun','now','aggregate','data\x20','\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]','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','description','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','command','create','\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}}','write','76326elqpSj','5215zWGtTy','\x20\x20AGGREGATE\x20TYPES','paramsRequired','code','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','6ZVJoai','\x20on\x20dataset\x20','delete','Preview:\x20data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\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}','Update\x20an\x20existing\x20record','\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}}','data','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','batchCreate','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','getOne','\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}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\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}'];a16_0xd9e8=function(){return _0x1dc9c1;};return a16_0xd9e8();}export const dataDefinitions=specs['map'](makeDataCommand);
|
|
1
|
+
const a16_0x2bf6fe=a16_0x26a9;function a16_0x335d(){const _0x42a3b5=['batchCreate','params','update','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\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}}','188888zkecNG','risk','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\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$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}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','data','3785176faspkW','862794DSymDq','11812SXsZRC','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','operation','command','\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}]','/api/{appCode}/','\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}}','\x20on\x20dataset\x20','711tgRoIK','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20AGGREGATE\x20TYPES','\x20\x20EXAMPLES','write','code','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\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}','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','build','\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','join','\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\x20WHERE\x20OPERATORS','\x20\x20LOGICAL\x20COMBINATORS','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','str','102qshTYx','8358900uqnIXf','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\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\x20PARAMS\x20STRUCTURE','Filter\x20dataset\x20records\x20with\x20query\x20conditions','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','now','getOne','\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}}','read','\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}}','paramsRequired','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','72SVWBfz','high-risk-write','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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$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}}','29908JwrDLn','\x20completed\x20in\x20','\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}}]}','delete','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','map','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','2499985rUnQox','data\x20','dryRun','aggregate','Update\x20an\x20existing\x20record','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\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]','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','create','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'];a16_0x335d=function(){return _0x42a3b5;};return a16_0x335d();}(function(_0x4a2ab1,_0x3ee0ec){const _0xf2ff8f=a16_0x26a9,_0x8df5b3=_0x4a2ab1();while(!![]){try{const _0x4c3a51=-parseInt(_0xf2ff8f(0x1ef))/0x1*(-parseInt(_0xf2ff8f(0x1f4))/0x2)+parseInt(_0xf2ff8f(0x21f))/0x3*(-parseInt(_0xf2ff8f(0x216))/0x4)+-parseInt(_0xf2ff8f(0x1fb))/0x5+-parseInt(_0xf2ff8f(0x1e1))/0x6*(-parseInt(_0xf2ff8f(0x20b))/0x7)+-parseInt(_0xf2ff8f(0x214))/0x8+-parseInt(_0xf2ff8f(0x215))/0x9+parseInt(_0xf2ff8f(0x1e2))/0xa;if(_0x4c3a51===_0x3ee0ec)break;else _0x8df5b3['push'](_0x8df5b3['shift']());}catch(_0xa5760a){_0x8df5b3['push'](_0x8df5b3['shift']());}}}(a16_0x335d,0x93143));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x26a9(_0x4b7867,_0x5a2d78){_0x4b7867=_0x4b7867-0x1da;const _0x335d1b=a16_0x335d();let _0x26a915=_0x335d1b[_0x4b7867];return _0x26a915;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':'filter','risk':a16_0x2bf6fe(0x1eb),'paramsRequired':![],'description':a16_0x2bf6fe(0x1e6),'paramsHint':a16_0x2bf6fe(0x211)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a16_0x2bf6fe(0x1dc),a16_0x2bf6fe(0x1f3),a16_0x2bf6fe(0x210),a16_0x2bf6fe(0x1e3),a16_0x2bf6fe(0x20e),a16_0x2bf6fe(0x228),a16_0x2bf6fe(0x1ea),'\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]}}',a16_0x2bf6fe(0x202),a16_0x2bf6fe(0x20a),a16_0x2bf6fe(0x1ec),'',a16_0x2bf6fe(0x1dd),'\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_0x2bf6fe(0x1f6),'',a16_0x2bf6fe(0x212),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a16_0x2bf6fe(0x229),a16_0x2bf6fe(0x21b),a16_0x2bf6fe(0x218),a16_0x2bf6fe(0x203),'','\x20\x20PAGINATION',a16_0x2bf6fe(0x1ee),a16_0x2bf6fe(0x20d),a16_0x2bf6fe(0x200)][a16_0x2bf6fe(0x1da)]('\x0a')},{'command':a16_0x2bf6fe(0x1e9),'operation':a16_0x2bf6fe(0x1e9),'risk':a16_0x2bf6fe(0x1eb),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a16_0x2bf6fe(0x220)},{'command':a16_0x2bf6fe(0x204),'operation':a16_0x2bf6fe(0x204),'risk':a16_0x2bf6fe(0x223),'paramsRequired':!![],'description':a16_0x2bf6fe(0x1fa),'paramsHint':a16_0x2bf6fe(0x1e7)},{'command':'batchCreate','operation':a16_0x2bf6fe(0x206),'risk':'write','paramsRequired':!![],'description':a16_0x2bf6fe(0x209),'paramsHint':a16_0x2bf6fe(0x205)},{'command':'update','operation':a16_0x2bf6fe(0x208),'risk':a16_0x2bf6fe(0x223),'paramsRequired':!![],'description':a16_0x2bf6fe(0x1ff),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a16_0x2bf6fe(0x1f7),'operation':'delete','risk':a16_0x2bf6fe(0x1f0),'paramsRequired':!![],'description':a16_0x2bf6fe(0x225),'paramsHint':a16_0x2bf6fe(0x220)},{'command':a16_0x2bf6fe(0x1fe),'operation':a16_0x2bf6fe(0x1fe),'risk':a16_0x2bf6fe(0x1eb),'paramsRequired':![],'description':a16_0x2bf6fe(0x226),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a16_0x2bf6fe(0x1de),'helpExtra':[a16_0x2bf6fe(0x221),'\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}',a16_0x2bf6fe(0x227),'\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}',a16_0x2bf6fe(0x1e4),'\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}',a16_0x2bf6fe(0x1db),a16_0x2bf6fe(0x20f),'',a16_0x2bf6fe(0x1e5),a16_0x2bf6fe(0x201),a16_0x2bf6fe(0x1df),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a16_0x2bf6fe(0x1f8),a16_0x2bf6fe(0x21d),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a16_0x2bf6fe(0x222),a16_0x2bf6fe(0x1f1),a16_0x2bf6fe(0x22b),'',a16_0x2bf6fe(0x217),a16_0x2bf6fe(0x1f2)][a16_0x2bf6fe(0x1da)]('\x0a')}];function makeDataCommand(_0x233dcc){const _0x4c25f2=a16_0x2bf6fe,_0x54e8cb=_0x4c25f2(0x1fc)+_0x233dcc['command'],_0x1121c2={'service':_0x4c25f2(0x213),'command':_0x233dcc[_0x4c25f2(0x21a)],'description':_0x233dcc['description'],'risk':_0x233dcc[_0x4c25f2(0x20c)],'helpExtra':_0x233dcc['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x233dcc['paramsHint']}],'validate':async _0x579979=>{const _0x3fdfc9=_0x4c25f2;_0x233dcc[_0x3fdfc9(0x1ed)]&&requireAnyOf(_0x579979,['params'],_0x54e8cb),_0x233dcc[_0x3fdfc9(0x219)]===_0x3fdfc9(0x206)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x579979[_0x3fdfc9(0x1e0)](_0x3fdfc9(0x207))));},async 'execute'(_0x4a887b){const _0x1b9e4c=_0x4c25f2,_0x9b080a=_0x4a887b[_0x1b9e4c(0x1e0)](_0x1b9e4c(0x224)),_0x3829aa=_0x233dcc[_0x1b9e4c(0x219)]===_0x1b9e4c(0x206)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4a887b['str'](_0x1b9e4c(0x207)))):parseJsonParams(_0x4a887b[_0x1b9e4c(0x1e0)](_0x1b9e4c(0x207)))??{},_0xbc1081=Date[_0x1b9e4c(0x1e8)](),_0x18be7d=await executeData(_0x9b080a,_0x233dcc[_0x1b9e4c(0x219)],_0x3829aa),_0x169760=Date[_0x1b9e4c(0x1e8)]()-_0xbc1081;return{'ok':!![],'data':{'result':_0x18be7d,'elapsed':_0x169760},'message':_0x1b9e4c(0x1fc)+_0x233dcc[_0x1b9e4c(0x21a)]+_0x1b9e4c(0x1f5)+_0x169760+'ms'};}};return _0x233dcc[_0x4c25f2(0x20c)]!==_0x4c25f2(0x1eb)&&(_0x1121c2[_0x4c25f2(0x1fd)]=async _0x61f1b7=>{const _0x50a40f=_0x4c25f2,_0x21e886=_0x61f1b7[_0x50a40f(0x1e0)]('code'),_0x169793=_0x233dcc[_0x50a40f(0x219)]===_0x50a40f(0x206)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x61f1b7[_0x50a40f(0x1e0)]('params'))):parseJsonParams(_0x61f1b7[_0x50a40f(0x1e0)]('params'))??{};return dryRun('POST',_0x50a40f(0x21c)+_0x21e886+'/'+_0x233dcc[_0x50a40f(0x219)])['body'](_0x169793)['description']('Preview:\x20data\x20'+_0x233dcc[_0x50a40f(0x21a)]+_0x50a40f(0x21e)+_0x21e886)[_0x50a40f(0x22a)]();}),_0x1121c2;}export const dataDefinitions=specs[a16_0x2bf6fe(0x1f9)](makeDataCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x445fe8=a17_0x488d;(function(_0x17900c,_0x5e63d5){const _0x1ee144=a17_0x488d,_0xbc6744=_0x17900c();while(!![]){try{const _0x3b34cf=parseInt(_0x1ee144(0x216))/0x1+-parseInt(_0x1ee144(0x20f))/0x2*(-parseInt(_0x1ee144(0x205))/0x3)+parseInt(_0x1ee144(0x1ff))/0x4+parseInt(_0x1ee144(0x20e))/0x5*(-parseInt(_0x1ee144(0x1e8))/0x6)+-parseInt(_0x1ee144(0x20a))/0x7+parseInt(_0x1ee144(0x215))/0x8+-parseInt(_0x1ee144(0x1ec))/0x9;if(_0x3b34cf===_0x5e63d5)break;else _0xbc6744['push'](_0xbc6744['shift']());}catch(_0x1c6ef0){_0xbc6744['push'](_0xbc6744['shift']());}}}(a17_0xfdb6,0x570b5));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a17_0x488d(_0x338ede,_0x1a0bfd){_0x338ede=_0x338ede-0x1df;const _0xfdb650=a17_0xfdb6();let _0x488d16=_0xfdb650[_0x338ede];return _0x488d16;}function normalizeField(_0x2019bc){const _0x32be79=a17_0x488d;if(_0x2019bc[_0x32be79(0x1e1)])return null;const _0x1bfa37=Boolean(_0x2019bc[_0x32be79(0x21b)]!==undefined||_0x2019bc[_0x32be79(0x224)]!==undefined);let _0x523efe={};if(!_0x1bfa37&&typeof _0x2019bc[_0x32be79(0x1f0)]===_0x32be79(0x20c))try{_0x523efe=JSON[_0x32be79(0x209)](_0x2019bc[_0x32be79(0x1f0)]);}catch{}const _0x231881=_0x1bfa37?_0x2019bc[_0x32be79(0x1e9)]:_0x2019bc[_0x32be79(0x223)],_0x1a96fa=_0x1bfa37?_0x2019bc[_0x32be79(0x21b)]:_0x2019bc['name'],_0x51c53f=_0x1bfa37?_0x2019bc[_0x32be79(0x224)]:_0x2019bc[_0x32be79(0x219)]||_0x2019bc[_0x32be79(0x222)],_0x55d8dc=_0x1bfa37?_0x2019bc[_0x32be79(0x21d)]===!![]:_0x523efe[_0x32be79(0x21d)]===!![],_0x24f998=_0x1bfa37?_0x2019bc[_0x32be79(0x1f6)]===!![]:_0x523efe[_0x32be79(0x1f6)]===!![],_0x3e4369=_0x1bfa37?_0x2019bc['options']??null:_0x523efe[_0x32be79(0x1e7)]??null,_0x219b63={'name':_0x231881,'displayName':_0x1a96fa||_0x231881,'type':_0x51c53f,'dbType':_0x2019bc[_0x32be79(0x211)],'pk':_0x55d8dc,'required':_0x24f998,'description':_0x2019bc[_0x32be79(0x1f9)]||undefined};return Array[_0x32be79(0x1f3)](_0x3e4369)&&_0x3e4369[_0x32be79(0x1e6)]>0x0&&(_0x219b63[_0x32be79(0x1e7)]=_0x3e4369),_0x219b63;}function a17_0xfdb6(){const _0x1bfe09=['extend','dbName','host','isArray','trim','columnCodeListWithDeleted','required','fields','properties','description','path','dataset','push','formatRules','beforeScriptId','612784VasBsY','toTableName','toDatasetName','allFields','modifierIdField','tableComment','321KcEmWY','detail','operations','toFieldLabel','parse','1925763rjcplT','split','string','toField','884665ByfSPk','5556pYRxCu','dblinkInfoDTO','dbType','requestFields','relations','allFieldNames','5399064pTAUyY','147167EebRII','method','indexes','type','createTimeField','displayName','read','pkField','filter','validateRules','responseFields','tableName','dataType','code','doType','requestBody','relatedPageInfoList','dbtableConfig','deleted','afterScriptId','responseBody','modelId','datasetKey','length','options','12ZKxTnx','name','entries','object','2582856gjnjpS','title','map','dbId'];a17_0xfdb6=function(){return _0x1bfe09;};return a17_0xfdb6();}function parseJsonMaybe(_0x23c865){const _0x28f43e=a17_0x488d;if(typeof _0x23c865!==_0x28f43e(0x20c))return _0x23c865;try{return JSON[_0x28f43e(0x209)](_0x23c865);}catch{return _0x23c865;}}function normalizeOperationEntry(_0x3750c7,_0x5ae38e){const _0xad4122=a17_0x488d;if(!_0x5ae38e||typeof _0x5ae38e!==_0xad4122(0x1eb))return null;if(!_0x5ae38e[_0xad4122(0x217)]||!_0x5ae38e[_0xad4122(0x1fa)])return null;const _0x284614={'name':_0x3750c7,'method':_0x5ae38e[_0xad4122(0x217)],'path':_0x5ae38e[_0xad4122(0x1fa)]};if(_0x5ae38e['host'])_0x284614[_0xad4122(0x1f2)]=_0x5ae38e[_0xad4122(0x1f2)];if(_0x5ae38e[_0xad4122(0x225)]!=null)_0x284614['requestBody']=parseJsonMaybe(_0x5ae38e['requestBody']);if(_0x5ae38e[_0xad4122(0x1e3)]!=null)_0x284614[_0xad4122(0x1e3)]=parseJsonMaybe(_0x5ae38e[_0xad4122(0x1e3)]);if(_0x5ae38e['beforeScriptId']!=null)_0x284614[_0xad4122(0x1fe)]=_0x5ae38e['beforeScriptId'];if(_0x5ae38e[_0xad4122(0x1e2)]!=null)_0x284614[_0xad4122(0x1e2)]=_0x5ae38e[_0xad4122(0x1e2)];if(Array[_0xad4122(0x1f3)](_0x5ae38e['requestFields']))_0x284614[_0xad4122(0x212)]=_0x5ae38e[_0xad4122(0x212)];if(Array[_0xad4122(0x1f3)](_0x5ae38e[_0xad4122(0x220)]))_0x284614['responseFields']=_0x5ae38e[_0xad4122(0x220)];return _0x284614;}function summarizeDbtable(_0x2d4596){const _0x3527d0=a17_0x488d,_0x1eabcf={},_0x525df9=[_0x3527d0(0x1ef),_0x3527d0(0x1f1),_0x3527d0(0x221),_0x3527d0(0x1e5),'pkField',_0x3527d0(0x202),'logicField',_0x3527d0(0x21a),'updateTimeField','creatorIdField','creatorNameField',_0x3527d0(0x203),'modifierNameField','labelField',_0x3527d0(0x210)];for(const _0x4eb08c of _0x525df9){if(_0x2d4596[_0x4eb08c]!==undefined)_0x1eabcf[_0x4eb08c]=_0x2d4596[_0x4eb08c];}return typeof _0x1eabcf[_0x3527d0(0x202)]===_0x3527d0(0x20c)&&_0x1eabcf[_0x3527d0(0x202)][_0x3527d0(0x1e6)]>0x0&&(_0x1eabcf[_0x3527d0(0x214)]=_0x1eabcf[_0x3527d0(0x202)][_0x3527d0(0x20b)](',')['map'](_0x5f19fd=>_0x5f19fd[_0x3527d0(0x1f4)]())[_0x3527d0(0x21e)](Boolean)),_0x1eabcf;}function normalizeRelatedPages(_0x3a5c64){const _0x3b3b3c=a17_0x488d;if(!Array['isArray'](_0x3a5c64))return[];return _0x3a5c64[_0x3b3b3c(0x21e)](_0x38e1de=>_0x38e1de&&typeof _0x38e1de===_0x3b3b3c(0x1eb))['map'](_0x1b6403=>({'id':_0x1b6403['id'],'type':_0x1b6403['type'],'code':_0x1b6403[_0x3b3b3c(0x223)],'title':_0x1b6403[_0x3b3b3c(0x1ed)],'deleted':_0x1b6403[_0x3b3b3c(0x1e1)]===!![]}));}export const datasetDetail={'service':a17_0x445fe8(0x1fb),'command':a17_0x445fe8(0x206),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a17_0x445fe8(0x21c),'flags':[CODE_FLAG],async 'execute'(_0x3cab1c){const _0xb1740a=a17_0x445fe8,_0x5ded4f=await getDatasetDetail(_0x3cab1c['str'](_0xb1740a(0x223))),_0x588943=Array[_0xb1740a(0x1f3)](_0x5ded4f[_0xb1740a(0x1f7)])?_0x5ded4f[_0xb1740a(0x1f7)]:Array[_0xb1740a(0x1f3)](_0x5ded4f['properties'])?_0x5ded4f[_0xb1740a(0x1f8)]:[],_0x21cd9a=_0x588943['map'](_0x1285bf=>normalizeField(_0x1285bf))[_0xb1740a(0x21e)](_0x328318=>_0x328318!==null),_0x59196c=_0x5ded4f[_0xb1740a(0x207)]??{},_0x5912ee=[];for(const [_0x4884ba,_0x1feb2b]of Object[_0xb1740a(0x1ea)](_0x59196c)){const _0x552877=normalizeOperationEntry(_0x4884ba,_0x1feb2b);if(_0x552877)_0x5912ee[_0xb1740a(0x1fc)](_0x552877);}const _0x270a71=_0x5ded4f[_0xb1740a(0x1e0)]??{},_0x2dac27=_0x5ded4f[_0xb1740a(0x1fb)]??{},_0x4ba197=_0x270a71[_0xb1740a(0x1ef)]!=null?{'id':_0x270a71[_0xb1740a(0x1ef)],'name':_0x270a71[_0xb1740a(0x1f1)]??null}:undefined;let _0x552cc2;return typeof _0x5ded4f[_0xb1740a(0x1f0)]===_0xb1740a(0x20c)&&(_0x552cc2=parseJsonMaybe(_0x5ded4f['extend'])),{'ok':!![],'data':{'id':_0x5ded4f[_0xb1740a(0x1e4)]??_0x5ded4f['id'],'name':_0x5ded4f[_0xb1740a(0x1e9)],'code':_0x5ded4f['modelCode']||_0x5ded4f[_0xb1740a(0x223)],'doVersion':_0x5ded4f['doVersion'],'description':_0x5ded4f[_0xb1740a(0x1f9)]||_0x2dac27[_0xb1740a(0x204)]||undefined,'source':_0x5ded4f['source']||_0x2dac27['sourceType'],'table':_0x270a71[_0xb1740a(0x221)]||_0x2dac27['tableName'],'datasetKey':_0x270a71[_0xb1740a(0x1e5)],'pk':_0x270a71['pkField'],'db':_0x4ba197,'dbtable':summarizeDbtable(_0x270a71),'fields':_0x21cd9a,'operations':_0x5912ee,'indexes':Array[_0xb1740a(0x1f3)](_0x2dac27[_0xb1740a(0x218)])?_0x2dac27[_0xb1740a(0x218)]:[],'relations':Array[_0xb1740a(0x1f3)](_0x5ded4f[_0xb1740a(0x213)])?_0x5ded4f[_0xb1740a(0x213)][_0xb1740a(0x1ee)](_0x37431d=>({'fromField':_0x37431d['fromField'],'toDataset':_0x37431d[_0xb1740a(0x201)],'toCode':_0x37431d['toDatasetCode'],'toTable':_0x37431d[_0xb1740a(0x200)],'toField':_0x37431d[_0xb1740a(0x20d)],'labelField':_0x37431d[_0xb1740a(0x208)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x5ded4f[_0xb1740a(0x1df)]),...Array[_0xb1740a(0x1f3)](_0x5ded4f[_0xb1740a(0x1f5)])?{'columnCodeListWithDeleted':_0x5ded4f['columnCodeListWithDeleted']}:{},'formatRules':Array['isArray'](_0x5ded4f['formatRules'])?_0x5ded4f[_0xb1740a(0x1fd)]:[],'validateRules':Array[_0xb1740a(0x1f3)](_0x5ded4f[_0xb1740a(0x21f)])?_0x5ded4f['validateRules']:[],..._0x552cc2!==undefined?{'extend':_0x552cc2}:{},'stats':{'fieldCount':_0x21cd9a[_0xb1740a(0x1e6)],'operationCount':_0x5912ee[_0xb1740a(0x1e6)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cfc42,_0x25cf5e){const _0x5087cb=a18_0x3edb,_0x3090df=_0x5cfc42();while(!![]){try{const _0x203315=-parseInt(_0x5087cb(0x189))/0x1+-parseInt(_0x5087cb(0x186))/0x2+-parseInt(_0x5087cb(0x185))/0x3*(-parseInt(_0x5087cb(0x18b))/0x4)+-parseInt(_0x5087cb(0x187))/0x5*(parseInt(_0x5087cb(0x184))/0x6)+-parseInt(_0x5087cb(0x18a))/0x7+parseInt(_0x5087cb(0x182))/0x8+-parseInt(_0x5087cb(0x188))/0x9*(-parseInt(_0x5087cb(0x183))/0xa);if(_0x203315===_0x25cf5e)break;else _0x3090df['push'](_0x3090df['shift']());}catch(_0x3e1364){_0x3090df['push'](_0x3090df['shift']());}}}(a18_0x9e36,0x85ae8));function a18_0x3edb(_0x279e00,_0x3fa3c5){_0x279e00=_0x279e00-0x182;const _0x9e36a8=a18_0x9e36();let _0x3edb53=_0x9e36a8[_0x279e00];return _0x3edb53;}function a18_0x9e36(){const _0x4da425=['102hypjSD','2088806xLQCWq','80lDHATK','6307596rkyazT','92137SYzanB','2656129aXSEMv','5464UnhOLJ','6971864mLQhof','30XVINVe','358842GOHORj'];a18_0x9e36=function(){return _0x4da425;};return a18_0x9e36();}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a19_0x5e45(_0x1ee33c,_0x82f2e0){_0x1ee33c=_0x1ee33c-0xa1;const _0x5efd85=a19_0x5efd();let _0x5e45c9=_0x5efd85[_0x1ee33c];return _0x5e45c9;}const a19_0x101edb=a19_0x5e45;function a19_0x5efd(){const _0x408349=['11743128ULmzyH','code','7042KCqPsb','length','map','list','datasetKey','dbtableConfig','2BxQToy','tableName','appCode','4VOKzPX','4375512gidJjn','1314CwOWef','trim','9050olvYtQ','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','1504ZDDgRx','split','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','1744725sKBXgD','name','allFields','string','source','204310jDuitC','dataset','str','read','11bJbscl','1252995HPaGVG','pkField'];a19_0x5efd=function(){return _0x408349;};return a19_0x5efd();}(function(_0x933246,_0x510ce5){const _0x33967f=a19_0x5e45,_0x45d506=_0x933246();while(!![]){try{const _0x3a9b76=-parseInt(_0x33967f(0xa6))/0x1*(-parseInt(_0x33967f(0xb5))/0x2)+parseInt(_0x33967f(0xa1))/0x3+-parseInt(_0x33967f(0xb8))/0x4*(parseInt(_0x33967f(0xab))/0x5)+-parseInt(_0x33967f(0xb9))/0x6+-parseInt(_0x33967f(0xaf))/0x7*(parseInt(_0x33967f(0xbe))/0x8)+parseInt(_0x33967f(0xba))/0x9*(-parseInt(_0x33967f(0xbc))/0xa)+-parseInt(_0x33967f(0xaa))/0xb*(-parseInt(_0x33967f(0xad))/0xc);if(_0x3a9b76===_0x510ce5)break;else _0x45d506['push'](_0x45d506['shift']());}catch(_0x41934e){_0x45d506['push'](_0x45d506['shift']());}}}(a19_0x5efd,0x7120a));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a19_0x101edb(0xa7),'command':a19_0x101edb(0xb2),'description':a19_0x101edb(0xc0),'risk':a19_0x101edb(0xa9),'flags':[{'name':a19_0x101edb(0xa2),'type':a19_0x101edb(0xa4),'description':a19_0x101edb(0xbd)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x44aaf4){const _0x3a7aa6=a19_0x101edb,_0x4bef2d=_0x44aaf4[_0x3a7aa6(0xa8)](_0x3a7aa6(0xa2)),_0x2c7681=_0x44aaf4[_0x3a7aa6(0xa8)](_0x3a7aa6(0xae)),_0x30ae05=await listDatasets(_0x44aaf4[_0x3a7aa6(0xb7)],{..._0x4bef2d&&{'name':_0x4bef2d},..._0x2c7681&&{'code':_0x2c7681}});return{'ok':!![],'data':{'total':_0x30ae05[_0x3a7aa6(0xb0)],'datasets':_0x30ae05['map'](_0x5f3fc4=>{const _0x155db6=_0x3a7aa6,_0x5a080b=_0x5f3fc4[_0x155db6(0xb4)]??{};return{'id':_0x5f3fc4['id'],'code':_0x5f3fc4[_0x155db6(0xae)],'name':_0x5f3fc4['name'],'source':_0x5f3fc4[_0x155db6(0xa5)],'description':_0x5f3fc4['description'],'table':_0x5a080b[_0x155db6(0xb6)],'datasetKey':_0x5a080b[_0x155db6(0xb3)],'pk':_0x5a080b[_0x155db6(0xac)],'fields':_0x5a080b['allFields']?_0x5a080b[_0x155db6(0xa3)][_0x155db6(0xbf)](',')[_0x155db6(0xb1)](_0x360116=>_0x360116[_0x155db6(0xbb)]()):[]};})}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x38c047=a20_0x5631;(function(_0x4189d3,_0x159609){const _0x50cc42=a20_0x5631,_0x7e840d=_0x4189d3();while(!![]){try{const _0x21cd7b=parseInt(_0x50cc42(0x1a6))/0x1+-parseInt(_0x50cc42(0x1a2))/0x2+-parseInt(_0x50cc42(0x169))/0x3+-parseInt(_0x50cc42(0x189))/0x4+-parseInt(_0x50cc42(0x168))/0x5+-parseInt(_0x50cc42(0x16f))/0x6+parseInt(_0x50cc42(0x16e))/0x7;if(_0x21cd7b===_0x159609)break;else _0x7e840d['push'](_0x7e840d['shift']());}catch(_0x232906){_0x7e840d['push'](_0x7e840d['shift']());}}}(a20_0x1624,0xc4d57));import a20_0x515b60 from'chalk';function a20_0x5631(_0x1e3844,_0xa8be3a){_0x1e3844=_0x1e3844-0x165;const _0x1624fd=a20_0x1624();let _0x56315b=_0x1624fd[_0x1e3844];return _0x56315b;}function a20_0x1624(){const _0x153df3=['riskLevel','\x20\x20Merged\x20Config','empty','2612740mIGSnS','green','env','read','gray','missing','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','log','(missing)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20runtimeDomain:\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','(not\x20set)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','306716rShADM','accessKey','\x20\x20Auth','\x20\x20Session\x20check:\x20\x20\x20','1125745fErBCM','arch','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','red','locale','5240195ZtMEbb','3678366vKrAnq','yellow','format','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','version','23527595IuinYb','3599370jQnSKk','status','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','\x20doctor','✓\x20Valid\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Config\x20JSON','Global','(none)','appCode','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','\x20\x20─','(default)','check','bold','ClientAk','(not\x20found)','\x20(accessKey)','length','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment'];a20_0x1624=function(){return _0x153df3;};return a20_0x1624();}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x5e884a){const _0x5b5610=a20_0x5631,_0x281721=getCliVersion(),_0x43e495=buildConfigFromFlags({});await initGlobalEnvironment(_0x43e495),console['log'](),console['log'](a20_0x515b60[_0x5b5610(0x17f)](CLI_BIN_NAME+_0x5b5610(0x173))),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x18d)]('─'[_0x5b5610(0x172)](0x32))),console[_0x5b5610(0x191)](_0x5b5610(0x18f)+_0x281721),console[_0x5b5610(0x191)](_0x5b5610(0x171)+process[_0x5b5610(0x16d)]),console[_0x5b5610(0x191)](_0x5b5610(0x190)+process[_0x5b5610(0x1a1)]+'\x20'+process[_0x5b5610(0x1a7)]),console[_0x5b5610(0x191)](),console[_0x5b5610(0x191)](a20_0x515b60['bold']('\x20\x20Config\x20Files')),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x18d)]('\x20\x20─'[_0x5b5610(0x172)](0x1e)));const _0x3ae14e=getGlobalConfigPath(),_0x315718=getProjectConfigPath();console[_0x5b5610(0x191)](_0x5b5610(0x196)+(_0x3ae14e||a20_0x515b60['gray'](_0x5b5610(0x181)))),console['log'](_0x5b5610(0x195)+(_0x315718||a20_0x515b60[_0x5b5610(0x18d)]('(not\x20found)'))),console[_0x5b5610(0x191)](),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x17f)](_0x5b5610(0x176))),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x18d)](_0x5b5610(0x17c)['repeat'](0x1e)));const _0x5474bb=(_0x466aef,_0x3b4f98)=>{const _0x1d81bf=_0x5b5610;if(!_0x3b4f98){console[_0x1d81bf(0x191)]('\x20\x20'+_0x466aef[_0x1d81bf(0x19e)](0x11)+'\x20'+a20_0x515b60['gray']('(no\x20file)'));return;}const _0x1309b8=inspectCliConfigJsonFile(_0x3b4f98);if(_0x1309b8['status']==='ok')console[_0x1d81bf(0x191)]('\x20\x20'+_0x466aef[_0x1d81bf(0x19e)](0x11)+'\x20'+a20_0x515b60[_0x1d81bf(0x18a)](_0x1d81bf(0x174)));else{if(_0x1309b8[_0x1d81bf(0x170)]===_0x1d81bf(0x188))console[_0x1d81bf(0x191)]('\x20\x20'+_0x466aef[_0x1d81bf(0x19e)](0x11)+'\x20'+a20_0x515b60[_0x1d81bf(0x16a)](_0x1d81bf(0x175)));else _0x1309b8[_0x1d81bf(0x170)]===_0x1d81bf(0x18e)?console[_0x1d81bf(0x191)]('\x20\x20'+_0x466aef['padEnd'](0x11)+'\x20'+a20_0x515b60['gray'](_0x1d81bf(0x192))):(console[_0x1d81bf(0x191)]('\x20\x20'+_0x466aef[_0x1d81bf(0x19e)](0x11)+'\x20'+a20_0x515b60[_0x1d81bf(0x166)](_0x1d81bf(0x19c))),console[_0x1d81bf(0x191)]('\x20\x20'+''[_0x1d81bf(0x19e)](0x11)+'\x20'+a20_0x515b60[_0x1d81bf(0x166)](_0x1309b8['message'])));}};_0x5474bb(_0x5b5610(0x177),_0x3ae14e),_0x5474bb('Project',_0x315718),console[_0x5b5610(0x191)](),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x17f)](_0x5b5610(0x187))),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x18d)](_0x5b5610(0x17c)[_0x5b5610(0x172)](0x1e))),console[_0x5b5610(0x191)](_0x5b5610(0x193)+(_0x43e495[_0x5b5610(0x179)]||a20_0x515b60[_0x5b5610(0x166)](_0x5b5610(0x19f)))),console[_0x5b5610(0x191)](_0x5b5610(0x197)+_0x43e495[_0x5b5610(0x18b)]);const _0x2c469e=isLegacyCompatConfigKey(_0x5b5610(0x167))?a20_0x515b60[_0x5b5610(0x18d)](_0x43e495[_0x5b5610(0x167)]+'\x20(legacy/compat\x20only)'):_0x43e495[_0x5b5610(0x167)];return console[_0x5b5610(0x191)](_0x5b5610(0x17a)+_0x2c469e),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x43e495[_0x5b5610(0x17b)]||a20_0x515b60[_0x5b5610(0x18d)]('(none)'))),console['log'](_0x5b5610(0x184)+(_0x43e495['currentApp']||a20_0x515b60[_0x5b5610(0x18d)](_0x5b5610(0x178)))),console[_0x5b5610(0x191)](_0x5b5610(0x19d)+(_0x43e495[_0x5b5610(0x16b)]||a20_0x515b60['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x5b5610(0x16b)]+')'))),console[_0x5b5610(0x191)](_0x5b5610(0x16c)+(_0x43e495['pageSize']??a20_0x515b60[_0x5b5610(0x18d)](_0x5b5610(0x17d)))),console[_0x5b5610(0x191)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x43e495[_0x5b5610(0x186)]),console[_0x5b5610(0x191)](_0x5b5610(0x1a0)+_0x43e495['verbose']),console[_0x5b5610(0x191)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x5b5610(0x180)]),console['log'](_0x5b5610(0x165)+(_0x43e495[_0x5b5610(0x1a3)]?a20_0x515b60[_0x5b5610(0x18a)]('(set,\x20length='+_0x43e495[_0x5b5610(0x1a3)][_0x5b5610(0x183)]+')'):a20_0x515b60['gray'](_0x5b5610(0x178)))),console[_0x5b5610(0x191)](),console['log'](a20_0x515b60[_0x5b5610(0x17f)](_0x5b5610(0x19a))),console[_0x5b5610(0x191)](a20_0x515b60['gray'](_0x5b5610(0x17c)[_0x5b5610(0x172)](0x1e))),console[_0x5b5610(0x191)](_0x5b5610(0x199)+getApiDomain()),console[_0x5b5610(0x191)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x5b5610(0x191)](_0x5b5610(0x19b)+getRuntimeDomain()),console[_0x5b5610(0x191)](),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x17f)](_0x5b5610(0x1a4))),console[_0x5b5610(0x191)](a20_0x515b60[_0x5b5610(0x18d)](_0x5b5610(0x17c)[_0x5b5610(0x172)](0x1e))),console['log'](_0x5b5610(0x198)+a20_0x515b60[_0x5b5610(0x18a)](AUTH_MODE[_0x5b5610(0x180)]+_0x5b5610(0x182))),console[_0x5b5610(0x191)](_0x5b5610(0x1a5)+a20_0x515b60['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a20_0x38c047(0x194),'command':a20_0x38c047(0x17e),'description':a20_0x38c047(0x185),'risk':a20_0x38c047(0x18c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a21_0x2aead4=a21_0xa671;function a21_0xa671(_0x48d474,_0x2e354d){_0x48d474=_0x48d474-0xc6;const _0x2b7c63=a21_0x2b7c();let _0xa671c6=_0x2b7c63[_0x48d474];return _0xa671c6;}(function(_0x22621b,_0x51c5b6){const _0x12d058=a21_0xa671,_0x6de081=_0x22621b();while(!![]){try{const _0x267df6=-parseInt(_0x12d058(0xd6))/0x1+parseInt(_0x12d058(0xef))/0x2+-parseInt(_0x12d058(0xf8))/0x3+parseInt(_0x12d058(0xd7))/0x4*(-parseInt(_0x12d058(0xf4))/0x5)+parseInt(_0x12d058(0xca))/0x6+parseInt(_0x12d058(0xcf))/0x7+-parseInt(_0x12d058(0xd0))/0x8;if(_0x267df6===_0x51c5b6)break;else _0x6de081['push'](_0x6de081['shift']());}catch(_0x503055){_0x6de081['push'](_0x6de081['shift']());}}}(a21_0x2b7c,0xd8ba6));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':a21_0x2aead4(0xd3),'type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0xda)},{'name':'env','type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0xc7)+DEFAULT_CONFIG_VALUES[a21_0x2aead4(0xf1)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0x107),'default':![]},{'name':'yes','type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0xff),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':'string','description':a21_0x2aead4(0xd2),'required':!![]},{'name':'appcode','type':'string','description':a21_0x2aead4(0xde)},{'name':a21_0x2aead4(0xf1),'type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0x101),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a21_0x2aead4(0x107),'default':![]},{'name':a21_0x2aead4(0xcc),'type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0xff),'default':![]}];function a21_0x2b7c(){const _0x2187f1=['\x20\x20env:\x20\x20\x20\x20\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','parse','trim','\x0aInitialized\x20','boolean','defaultApp','object','App\x20code','removeListener','string','\x20\x20default:\x20','):\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','480022SVIgES','Aborted.','env','App\x20code\x20cannot\x20be\x20empty.','\x20\x20appcode:\x20','260twEmNu','Source\x20file\x20not\x20found:\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','validation','391275YSxZcN','file','includes','\x22.\x20Allowed:\x20','Imported\x20from\x20','SIGINT','stdout','Skip\x20confirmation\x20when\x20overwriting','\x20\x20config:\x20\x20','Override\x20imported\x20default\x20env','File\x20','riskLevel','[Y/n]','name','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','app','cwd','join','message','Target\x20environment\x20(default\x20','race','apps','4048284DqUraH','global','yes','close','utf8','11687718FunHsH','967328riVWsI','AbortPrompt','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','appcode','Initialized\x20','log','180128gMsHhI','97324bpPlEJ','flagMissing','stdin','App\x20code\x20for\x20the\x20project','\x20already\x20exists.\x20Overwrite?','Invalid\x20env\x20\x22','project','Override\x20imported\x20default\x20appcode','question','apiDir'];a21_0x2b7c=function(){return _0x2187f1;};return a21_0x2b7c();}export async function runInit(_0xdcc915){const _0x59cbb5=a21_0x2aead4,_0x3fef37=isNonInteractiveMode(_0xdcc915),_0x426f38=_0xdcc915[_0x59cbb5(0xcb)]?'global':_0x59cbb5(0xdd),_0x4186f2=resolveWriteConfigPath(_0x426f38);try{_0x3fef37?await runNonInteractive(_0xdcc915,_0x4186f2):await runInteractive(_0xdcc915,_0x4186f2);}catch(_0x15bb23){if(_0x15bb23 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x15bb23;}}export async function runInitImport(_0x3994ca){const _0x32211b=a21_0x2aead4,_0x5b2a7a=_0x3994ca[_0x32211b(0xcb)]?_0x32211b(0xcb):_0x32211b(0xdd),_0x42476b=resolveWriteConfigPath(_0x5b2a7a);await runFromImport(_0x3994ca,_0x42476b);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x2aead4(0xe0)]);async function runFromImport(_0x404847,_0x4ec8e3){const _0x28f273=a21_0x2aead4,_0x422e00=resolveFilePath(_0x404847[_0x28f273(0xf9)]);if(!existsSync(_0x422e00))throw CliErrors[_0x28f273(0xf7)](_0x28f273(0xf5)+_0x422e00);const _0x4d3a4e=readSourceFile(_0x422e00),_0x4abfdc=convertToRuntimeConfig(_0x4d3a4e);_0x404847[_0x28f273(0xd3)]&&(_0x4abfdc[_0x28f273(0xd3)]=String(_0x404847[_0x28f273(0xd3)]));_0x404847[_0x28f273(0xf1)]&&(_0x4abfdc[_0x28f273(0xf1)]=resolveInitEnv(_0x404847));if(!_0x4abfdc[_0x28f273(0xd3)])throw CliErrors[_0x28f273(0xf7)](_0x28f273(0xee),'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`.');await writeInitConfig(_0x4ec8e3,_0x4abfdc,_0x404847),console['log'](_0x28f273(0xfc)+_0x422e00),console['log'](_0x28f273(0x100)+_0x4ec8e3),console[_0x28f273(0xd5)](_0x28f273(0xf3)+_0x4abfdc['appcode']);if(_0x4abfdc[_0x28f273(0xe7)])console['log'](_0x28f273(0xec)+_0x4abfdc[_0x28f273(0xe7)]);}function convertToRuntimeConfig(_0xe1830c){const _0x4a611e=a21_0x2aead4;if(_0xe1830c[_0x4a611e(0xc9)]&&typeof _0xe1830c[_0x4a611e(0xc9)]===_0x4a611e(0xe8))throw CliErrors[_0x4a611e(0xf7)](_0x4a611e(0xf6),_0x4a611e(0xe2));const _0x5040b6={};for(const _0x19cdd2 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xe1830c[_0x19cdd2]!==undefined&&(_0x5040b6[_0x19cdd2]=_0xe1830c[_0x19cdd2]);}return!_0x5040b6[_0x4a611e(0x103)]&&(_0x5040b6[_0x4a611e(0x103)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x5040b6;}async function runNonInteractive(_0x453991,_0x57a687){const _0x141b15=a21_0x2aead4,_0x4abf7e=_0x453991[_0x141b15(0xd3)];if(!_0x4abf7e)throw CliErrors[_0x141b15(0xd8)](_0x141b15(0xd3),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x5747fc=resolveInitEnv(_0x453991);await writeInitConfig(_0x57a687,{'appcode':_0x4abf7e,'env':_0x5747fc},_0x453991),console[_0x141b15(0xd5)](_0x141b15(0xd4)+_0x57a687),console[_0x141b15(0xd5)](_0x141b15(0xf3)+_0x4abf7e),console[_0x141b15(0xd5)](_0x141b15(0xe1)+_0x5747fc);}async function runInteractive(_0x3622e7,_0x1f7ad5){const _0xc587ec=a21_0x2aead4,_0x4fb60d=loadExisting(_0x1f7ad5),_0x3d4948=typeof _0x4fb60d?.[_0xc587ec(0xd3)]===_0xc587ec(0xeb)?_0x4fb60d['appcode']:'',_0x30bbec=resolveInitEnv(_0x3622e7);console[_0xc587ec(0xd5)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20.lovrabet.json\x0a');if(existsSync(_0x1f7ad5)&&!_0x3622e7[_0xc587ec(0xcc)]){const _0x14c080=await promptYesNo(_0xc587ec(0x102)+_0x1f7ad5+_0xc587ec(0xdb),![]);if(!_0x14c080){console[_0xc587ec(0xd5)](_0xc587ec(0xf0));return;}}const _0x5621e5=typeof _0x3622e7[_0xc587ec(0xd3)]===_0xc587ec(0xeb)?_0x3622e7[_0xc587ec(0xd3)][_0xc587ec(0xe4)]():'';let _0x2c4de6=_0x5621e5;!_0x2c4de6&&(_0x2c4de6=await promptInput(_0xc587ec(0xe9),_0x3d4948));if(!_0x2c4de6[_0xc587ec(0xe4)]())throw CliErrors[_0xc587ec(0xf7)](_0xc587ec(0xf2));await writeInitConfig(_0x1f7ad5,{'appcode':_0x2c4de6[_0xc587ec(0xe4)](),'env':_0x30bbec},_0x3622e7),console[_0xc587ec(0xd5)](_0xc587ec(0xe5)+_0x1f7ad5),console['log'](_0xc587ec(0xf3)+_0x2c4de6[_0xc587ec(0xe4)]()),console[_0xc587ec(0xd5)](_0xc587ec(0xe1)+_0x30bbec);}async function writeInitConfig(_0x45a657,_0x55cf73,_0x5cc900){const _0x3e737a=a21_0x2aead4;let _0xda9684={};existsSync(_0x45a657)&&!_0x5cc900['yes']&&(_0xda9684=readConfigFile(_0x45a657));for(const [_0x1b7223,_0x3dd42f]of Object['entries'](_0x55cf73)){_0x3dd42f!==undefined&&(_0xda9684[_0x1b7223]=_0x3dd42f);}if(_0xda9684[_0x3e737a(0x108)])delete _0xda9684[_0x3e737a(0x108)];writeConfigFile(_0x45a657,_0xda9684);}class AbortPrompt extends Error{constructor(){const _0x3afb69=a21_0x2aead4;super('User\x20aborted\x20prompt'),this[_0x3afb69(0x105)]=_0x3afb69(0xd1);}}function createSafeRl(){const _0x473896=a21_0x2aead4,_0x1083aa=createInterface({'input':process[_0x473896(0xd9)],'output':process[_0x473896(0xfe)]});let _0x47cdaa;const _0x2062f7=new Promise((_0xb4292d,_0xd01355)=>{const _0x4d11e5=_0x473896;_0x47cdaa=()=>{const _0x48e611=a21_0xa671;_0x47cdaa&&(_0x1083aa[_0x48e611(0xea)](_0x48e611(0xfd),_0x47cdaa),_0x47cdaa=undefined);try{_0x1083aa[_0x48e611(0xcd)]();}catch{}_0xd01355(new AbortPrompt());},_0x1083aa['once'](_0x4d11e5(0xfd),_0x47cdaa);}),_0x2ecd7f=()=>{const _0x4eb967=_0x473896;_0x47cdaa&&(_0x1083aa[_0x4eb967(0xea)](_0x4eb967(0xfd),_0x47cdaa),_0x47cdaa=undefined);try{_0x1083aa[_0x4eb967(0xcd)]();}catch{}};return{'rl':_0x1083aa,'abortPromise':_0x2062f7,'disposeSuccess':_0x2ecd7f};}async function promptInput(_0x55158f,_0x350045){const {rl:_0xd7397e,abortPromise:_0xa7c07e,disposeSuccess:_0x1aa4b9}=createSafeRl(),_0x3a9848=new Promise(_0x479851=>{const _0x1a47e2=a21_0xa671,_0x204497=_0x350045?'\x20\x20'+_0x55158f+'\x20('+_0x350045+_0x1a47e2(0xed):'\x20\x20'+_0x55158f+':\x20';_0xd7397e['question'](_0x204497,_0x38f0e5=>{_0x1aa4b9(),_0x479851(_0x38f0e5['trim']()||_0x350045);});});return Promise['race']([_0x3a9848,_0xa7c07e]);}async function promptYesNo(_0x2c0fc2,_0x2173a6){const _0x414993=a21_0x2aead4,{rl:_0x4b19a1,abortPromise:_0x4ccc02,disposeSuccess:_0x394d8a}=createSafeRl(),_0x6f4f9=new Promise(_0x29996b=>{const _0x1884f8=a21_0xa671,_0x541e0d=_0x2173a6?_0x1884f8(0x104):'[y/N]';_0x4b19a1[_0x1884f8(0xdf)]('\x20\x20'+_0x2c0fc2+'\x20'+_0x541e0d+':\x20',_0x54474e=>{const _0x3d14d0=_0x1884f8;_0x394d8a();const _0x391e9d=_0x54474e[_0x3d14d0(0xe4)]()['toLowerCase']();if(_0x391e9d==='y'||_0x391e9d===_0x3d14d0(0xcc))_0x29996b(!![]);else{if(_0x391e9d==='n'||_0x391e9d==='no')_0x29996b(![]);else _0x29996b(_0x2173a6);}});});return Promise[_0x414993(0xc8)]([_0x6f4f9,_0x4ccc02]);}function loadExisting(_0x3dd82e){if(!existsSync(_0x3dd82e))return null;return readConfigFile(_0x3dd82e);}function resolveFilePath(_0x201876){const _0x5d9126=a21_0x2aead4;return isAbsolute(_0x201876)?_0x201876:resolve(process[_0x5d9126(0x109)](),_0x201876);}function readSourceFile(_0x4bf0d0){const _0xa0908=a21_0x2aead4;try{const _0x2142b3=readFileSync(_0x4bf0d0,{'encoding':_0xa0908(0xce)});return JSON[_0xa0908(0xe3)](_0x2142b3);}catch(_0x563128){throw CliErrors[_0xa0908(0xf7)](_0xa0908(0x106)+_0x563128[_0xa0908(0xc6)]);}}function resolveInitEnv(_0x491e51){const _0x38bcbd=a21_0x2aead4,_0x545faf=_0x491e51[_0x38bcbd(0xf1)];if(_0x545faf===undefined||_0x545faf==='')return DEFAULT_CONFIG_VALUES[_0x38bcbd(0xf1)];if(!RUNTIME_ENV_VALUES[_0x38bcbd(0xfa)](_0x545faf))throw CliErrors[_0x38bcbd(0xf7)](_0x38bcbd(0xdc)+_0x545faf+_0x38bcbd(0xfb)+RUNTIME_ENV_VALUES[_0x38bcbd(0x10a)](',\x20'));return _0x545faf;}
|
|
1
|
+
const a21_0x3ab4f3=a21_0x261d;(function(_0x3027c1,_0x286faa){const _0x18c2f4=a21_0x261d,_0x570bcf=_0x3027c1();while(!![]){try{const _0x130b93=-parseInt(_0x18c2f4(0x8c))/0x1*(parseInt(_0x18c2f4(0x70))/0x2)+parseInt(_0x18c2f4(0x87))/0x3+-parseInt(_0x18c2f4(0xa6))/0x4*(-parseInt(_0x18c2f4(0x9a))/0x5)+parseInt(_0x18c2f4(0x6a))/0x6*(parseInt(_0x18c2f4(0x6f))/0x7)+-parseInt(_0x18c2f4(0x7d))/0x8+-parseInt(_0x18c2f4(0x67))/0x9+parseInt(_0x18c2f4(0xa8))/0xa;if(_0x130b93===_0x286faa)break;else _0x570bcf['push'](_0x570bcf['shift']());}catch(_0x5a0b1d){_0x570bcf['push'](_0x570bcf['shift']());}}}(a21_0x59e7,0x59ff0));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':'appcode','type':'string','description':a21_0x3ab4f3(0x77)},{'name':a21_0x3ab4f3(0x8d),'type':'string','description':a21_0x3ab4f3(0x68)+DEFAULT_CONFIG_VALUES[a21_0x3ab4f3(0x8d)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x3ab4f3(0x74),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a21_0x3ab4f3(0x74),'description':a21_0x3ab4f3(0x7b),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x3ab4f3(0x76),'type':a21_0x3ab4f3(0x97),'description':a21_0x3ab4f3(0xad),'required':!![]},{'name':'appcode','type':a21_0x3ab4f3(0x97),'description':a21_0x3ab4f3(0xac)},{'name':'env','type':a21_0x3ab4f3(0x97),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x3ab4f3(0x74),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a21_0x3ab4f3(0xa0),'type':a21_0x3ab4f3(0x74),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x2b8a73){const _0x497d91=a21_0x3ab4f3,_0x45f7db=isNonInteractiveMode(_0x2b8a73),_0x6df36=_0x2b8a73[_0x497d91(0x9b)]?_0x497d91(0x9b):_0x497d91(0x6d),_0x5b7035=resolveWriteConfigPath(_0x6df36);try{_0x45f7db?await runNonInteractive(_0x2b8a73,_0x5b7035):await runInteractive(_0x2b8a73,_0x5b7035);}catch(_0x22d4a7){if(_0x22d4a7 instanceof AbortPrompt)throw CliErrors[_0x497d91(0x73)]();throw _0x22d4a7;}}export async function runInitImport(_0x1548e){const _0x1ef3a5=a21_0x3ab4f3,_0x125f04=_0x1548e[_0x1ef3a5(0x9b)]?_0x1ef3a5(0x9b):'project',_0x54f0d1=resolveWriteConfigPath(_0x125f04);await runFromImport(_0x1548e,_0x54f0d1);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x3ab4f3(0x71)]);async function runFromImport(_0x55c9b7,_0x2dae0f){const _0x23139b=a21_0x3ab4f3,_0xdd1eca=resolveFilePath(_0x55c9b7[_0x23139b(0x76)]);if(!existsSync(_0xdd1eca))throw CliErrors[_0x23139b(0x6c)](_0x23139b(0x66)+_0xdd1eca);const _0x538e2d=readSourceFile(_0xdd1eca),_0x37370d=convertToRuntimeConfig(_0x538e2d);_0x55c9b7[_0x23139b(0xaa)]&&(_0x37370d[_0x23139b(0xaa)]=String(_0x55c9b7[_0x23139b(0xaa)]));_0x55c9b7[_0x23139b(0x8d)]&&(_0x37370d[_0x23139b(0x8d)]=resolveInitEnv(_0x55c9b7));if(!_0x37370d['appcode'])throw CliErrors[_0x23139b(0x6c)](_0x23139b(0x90),'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`.');await writeInitConfig(_0x2dae0f,_0x37370d,_0x55c9b7),console['log'](_0x23139b(0x98)+_0xdd1eca),console[_0x23139b(0xab)](_0x23139b(0xa7)+_0x2dae0f),console[_0x23139b(0xab)](_0x23139b(0x79)+_0x37370d[_0x23139b(0xaa)]);if(_0x37370d[_0x23139b(0x83)])console[_0x23139b(0xab)](_0x23139b(0x9d)+_0x37370d[_0x23139b(0x83)]);}function convertToRuntimeConfig(_0x4a965a){const _0x2fdc61=a21_0x3ab4f3;if(_0x4a965a[_0x2fdc61(0x93)]&&typeof _0x4a965a['apps']==='object')throw CliErrors[_0x2fdc61(0x6c)](_0x2fdc61(0x95),_0x2fdc61(0x7c));const _0x2f6b7c={};for(const _0x5a23de of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4a965a[_0x5a23de]!==undefined&&(_0x2f6b7c[_0x5a23de]=_0x4a965a[_0x5a23de]);}return!_0x2f6b7c[_0x2fdc61(0x82)]&&(_0x2f6b7c[_0x2fdc61(0x82)]=DEFAULT_CONFIG_VALUES[_0x2fdc61(0x82)]),_0x2f6b7c;}async function runNonInteractive(_0x26ad7f,_0x3f52c5){const _0x353c9b=a21_0x3ab4f3,_0x3efba2=_0x26ad7f[_0x353c9b(0xaa)];if(!_0x3efba2)throw CliErrors[_0x353c9b(0x89)](_0x353c9b(0xaa),_0x353c9b(0x86)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x17099e=resolveInitEnv(_0x26ad7f);await writeInitConfig(_0x3f52c5,{'appcode':_0x3efba2,'env':_0x17099e},_0x26ad7f),console[_0x353c9b(0xab)](_0x353c9b(0x72)+_0x3f52c5),console[_0x353c9b(0xab)](_0x353c9b(0x79)+_0x3efba2),console[_0x353c9b(0xab)](_0x353c9b(0x69)+_0x17099e);}async function runInteractive(_0x12d5c3,_0xc077d3){const _0x347f40=a21_0x3ab4f3,_0x47bdb7=loadExisting(_0xc077d3),_0x5b77be=typeof _0x47bdb7?.['appcode']===_0x347f40(0x97)?_0x47bdb7[_0x347f40(0xaa)]:'',_0x157f8c=resolveInitEnv(_0x12d5c3);console['log'](CLI_BIN_NAME+_0x347f40(0xa4));if(existsSync(_0xc077d3)&&!_0x12d5c3[_0x347f40(0xa0)]){const _0x2d19d5=await promptYesNo(_0x347f40(0x91)+_0xc077d3+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x2d19d5){console[_0x347f40(0xab)](_0x347f40(0x6b));return;}}const _0x4bf493=typeof _0x12d5c3['appcode']==='string'?_0x12d5c3[_0x347f40(0xaa)][_0x347f40(0xa2)]():'';let _0x249554=_0x4bf493;!_0x249554&&(_0x249554=await promptInput(_0x347f40(0x8b),_0x5b77be));if(!_0x249554[_0x347f40(0xa2)]())throw CliErrors[_0x347f40(0x6c)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0xc077d3,{'appcode':_0x249554[_0x347f40(0xa2)](),'env':_0x157f8c},_0x12d5c3),console[_0x347f40(0xab)]('\x0aInitialized\x20'+_0xc077d3),console['log'](_0x347f40(0x79)+_0x249554['trim']()),console[_0x347f40(0xab)](_0x347f40(0x69)+_0x157f8c);}async function writeInitConfig(_0x4000f6,_0x27841d,_0x8409cb){const _0x3fb4ac=a21_0x3ab4f3;let _0x4b7d19={};existsSync(_0x4000f6)&&!_0x8409cb['yes']&&(_0x4b7d19=readConfigFile(_0x4000f6));for(const [_0x47208f,_0x449a73]of Object[_0x3fb4ac(0x6e)](_0x27841d)){_0x449a73!==undefined&&(_0x4b7d19[_0x47208f]=_0x449a73);}if(_0x4b7d19[_0x3fb4ac(0x78)])delete _0x4b7d19[_0x3fb4ac(0x78)];writeConfigFile(_0x4000f6,_0x4b7d19);}class AbortPrompt extends Error{constructor(){const _0xb2bc44=a21_0x3ab4f3;super(_0xb2bc44(0x9c)),this[_0xb2bc44(0x7e)]=_0xb2bc44(0x80);}}function createSafeRl(){const _0x4b04c6=a21_0x3ab4f3,_0x25f31b=createInterface({'input':process[_0x4b04c6(0x92)],'output':process[_0x4b04c6(0x7a)]});let _0x2e6f4e;const _0x291201=new Promise((_0x17b960,_0x266c4a)=>{const _0x36db77=_0x4b04c6;_0x2e6f4e=()=>{const _0x22b4d8=a21_0x261d;_0x2e6f4e&&(_0x25f31b[_0x22b4d8(0xa5)](_0x22b4d8(0x9e),_0x2e6f4e),_0x2e6f4e=undefined);try{_0x25f31b['close']();}catch{}_0x266c4a(new AbortPrompt());},_0x25f31b[_0x36db77(0xa9)](_0x36db77(0x9e),_0x2e6f4e);}),_0x1c1e52=()=>{const _0x192980=_0x4b04c6;_0x2e6f4e&&(_0x25f31b[_0x192980(0xa5)]('SIGINT',_0x2e6f4e),_0x2e6f4e=undefined);try{_0x25f31b[_0x192980(0x81)]();}catch{}};return{'rl':_0x25f31b,'abortPromise':_0x291201,'disposeSuccess':_0x1c1e52};}function a21_0x261d(_0x28da53,_0x2536d1){_0x28da53=_0x28da53-0x65;const _0x59e7f9=a21_0x59e7();let _0x261d7d=_0x59e7f9[_0x28da53];return _0x261d7d;}async function promptInput(_0x1425ec,_0x492a3b){const _0x259f98=a21_0x3ab4f3,{rl:_0x26373c,abortPromise:_0x8cc663,disposeSuccess:_0x153172}=createSafeRl(),_0x4163b1=new Promise(_0x35c60b=>{const _0x53a890=a21_0x261d,_0x40441b=_0x492a3b?'\x20\x20'+_0x1425ec+'\x20('+_0x492a3b+_0x53a890(0x84):'\x20\x20'+_0x1425ec+':\x20';_0x26373c[_0x53a890(0x8a)](_0x40441b,_0x473b0f=>{const _0x53031a=_0x53a890;_0x153172(),_0x35c60b(_0x473b0f[_0x53031a(0xa2)]()||_0x492a3b);});});return Promise[_0x259f98(0xa1)]([_0x4163b1,_0x8cc663]);}async function promptYesNo(_0x16c347,_0x523be2){const _0x4b98ff=a21_0x3ab4f3,{rl:_0x100fb1,abortPromise:_0x22e9e1,disposeSuccess:_0x1f3d4e}=createSafeRl(),_0x305391=new Promise(_0x2c6a74=>{const _0x122238=a21_0x261d,_0x12dd56=_0x523be2?_0x122238(0x99):_0x122238(0x8f);_0x100fb1[_0x122238(0x8a)]('\x20\x20'+_0x16c347+'\x20'+_0x12dd56+':\x20',_0x3f7f30=>{const _0x258baf=_0x122238;_0x1f3d4e();const _0x2f4024=_0x3f7f30[_0x258baf(0xa2)]()[_0x258baf(0x94)]();if(_0x2f4024==='y'||_0x2f4024==='yes')_0x2c6a74(!![]);else{if(_0x2f4024==='n'||_0x2f4024==='no')_0x2c6a74(![]);else _0x2c6a74(_0x523be2);}});});return Promise[_0x4b98ff(0xa1)]([_0x305391,_0x22e9e1]);}function loadExisting(_0x223cdd){if(!existsSync(_0x223cdd))return null;return readConfigFile(_0x223cdd);}function a21_0x59e7(){const _0x147b3c=['defaultApp','):\x20','cwd','Usage:\x20','1503876mXDQnq','Failed\x20to\x20parse\x20source\x20file:\x20','flagMissing','question','App\x20code','134003FVBMyh','env','\x22.\x20Allowed:\x20','[y/N]','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','File\x20','stdin','apps','toLowerCase','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','utf8','string','Imported\x20from\x20','[Y/n]','15zIOCzx','global','User\x20aborted\x20prompt','\x20\x20default:\x20','SIGINT','includes','yes','race','trim','parse','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','removeListener','20348qYSCRb','\x20\x20config:\x20\x20','10537980JXlKkg','once','appcode','log','Override\x20imported\x20default\x20appcode','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','join','Source\x20file\x20not\x20found:\x20','1647504czyZcc','Target\x20environment\x20(default\x20','\x20\x20env:\x20\x20\x20\x20\x20','6VKFaXj','Aborted.','validation','project','entries','772919MIAUBa','10LRiTeu','apiDir','Initialized\x20','cancelled','boolean','Invalid\x20env\x20\x22','file','App\x20code\x20for\x20the\x20project','app','\x20\x20appcode:\x20','stdout','Skip\x20confirmation\x20when\x20overwriting','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','3672584XUiEHL','name','message','AbortPrompt','close','riskLevel'];a21_0x59e7=function(){return _0x147b3c;};return a21_0x59e7();}function resolveFilePath(_0x4de0fb){const _0x3ea981=a21_0x3ab4f3;return isAbsolute(_0x4de0fb)?_0x4de0fb:resolve(process[_0x3ea981(0x85)](),_0x4de0fb);}function readSourceFile(_0x5d8b9d){const _0x4ca519=a21_0x3ab4f3;try{const _0x386754=readFileSync(_0x5d8b9d,{'encoding':_0x4ca519(0x96)});return JSON[_0x4ca519(0xa3)](_0x386754);}catch(_0x1d2aa8){throw CliErrors[_0x4ca519(0x6c)](_0x4ca519(0x88)+_0x1d2aa8[_0x4ca519(0x7f)]);}}function resolveInitEnv(_0x3cef5b){const _0x55a250=a21_0x3ab4f3,_0x2c8492=_0x3cef5b[_0x55a250(0x8d)];if(_0x2c8492===undefined||_0x2c8492==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x55a250(0x9f)](_0x2c8492))throw CliErrors['validation'](_0x55a250(0x75)+_0x2c8492+_0x55a250(0x8e)+RUNTIME_ENV_VALUES[_0x55a250(0x65)](',\x20'));return _0x2c8492;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a22_0x5d7059=a22_0x4b75;(function(_0x27a2cd,_0x32e2c0){const _0x1475fa=a22_0x4b75,_0x70299a=_0x27a2cd();while(!![]){try{const _0x1fad76=parseInt(_0x1475fa(0x1b7))/0x1+-parseInt(_0x1475fa(0x1b8))/0x2*(parseInt(_0x1475fa(0x1ae))/0x3)+-parseInt(_0x1475fa(0x1be))/0x4+parseInt(_0x1475fa(0x1a4))/0x5+-parseInt(_0x1475fa(0x1ab))/0x6*(parseInt(_0x1475fa(0x1b3))/0x7)+-parseInt(_0x1475fa(0x1b9))/0x8*(-parseInt(_0x1475fa(0x1ba))/0x9)+parseInt(_0x1475fa(0x1a9))/0xa*(parseInt(_0x1475fa(0x1a3))/0xb);if(_0x1fad76===_0x32e2c0)break;else _0x70299a['push'](_0x70299a['shift']());}catch(_0x431dc4){_0x70299a['push'](_0x70299a['shift']());}}}(a22_0x3105,0x61f24));import{logger}from'../../utils/logger.js';function printLogs(_0x3ca73e){const _0x613e6e=a22_0x4b75;if(_0x3ca73e[_0x613e6e(0x1a1)]===0x0){console['log'](_0x613e6e(0x1bc));return;}console[_0x613e6e(0x1b1)]('*\x20Lovrabet\x20Runtime\x20CLI\x20logs:\x0a'),_0x3ca73e['forEach']((_0x449451,_0x505ff6)=>{const _0x1dfc84=_0x613e6e,_0x4cf37f=new Date(_0x449451[_0x1dfc84(0x1a5)])[_0x1dfc84(0x1a6)](_0x1dfc84(0x1b4)),_0x32a8e9=_0x449451[_0x1dfc84(0x1b2)]===_0x1dfc84(0x1bd)?'√':_0x449451[_0x1dfc84(0x1b2)]===_0x1dfc84(0x1a8)?'×':_0x449451['level']===_0x1dfc84(0x1b5)?'!':'i';console[_0x1dfc84(0x1b1)](_0x505ff6+0x1+'.\x20'+_0x32a8e9+'\x20['+_0x449451[_0x1dfc84(0x1a2)]+']\x20'+_0x449451[_0x1dfc84(0x1b6)]),console['log']('\x20\x20\x20Time:\x20'+_0x4cf37f),_0x449451[_0x1dfc84(0x1af)]&&console[_0x1dfc84(0x1b1)](_0x1dfc84(0x1b0)+_0x449451[_0x1dfc84(0x1af)]+'ms'),_0x449451['details']&&Object[_0x1dfc84(0x1ac)](_0x449451['details'])[_0x1dfc84(0x1a1)]>0x0&&console[_0x1dfc84(0x1b1)](_0x1dfc84(0x1a0)+JSON['stringify'](_0x449451['details'],null,0x2)),console[_0x1dfc84(0x1b1)]('');});}function a22_0x4b75(_0xb9409d,_0x55c405){_0xb9409d=_0xb9409d-0x19f;const _0x310594=a22_0x3105();let _0x4b7587=_0x310594[_0xb9409d];return _0x4b7587;}export const logsDefinitions=[{'service':'logs','command':'show','description':a22_0x5d7059(0x1aa),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x51631f){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':'clear','description':a22_0x5d7059(0x1ad),'risk':a22_0x5d7059(0x1bb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x50619f){const _0x587b81=a22_0x5d7059;return logger[_0x587b81(0x1a7)](),console[_0x587b81(0x1b1)](_0x587b81(0x19f)),{'ok':!![]};}}];function a22_0x3105(){const _0x555758=['View\x20command\x20history\x20logs','251466MYIehz','keys','Clear\x20command\x20history\x20logs','39zTNPeE','duration','\x20\x20\x20Duration:\x20','log','level','21MEXJoj','en-US','warn','message','361016wTuzDE','96078rylfmO','8mzlBzM','1013247WGesiL','write','*\x20No\x20logs\x20found','success','2508984Xazstq','*\x20Logs\x20cleared','\x20\x20\x20Details:\x20','length','command','22UscBil','2434385yFGVSe','timestamp','toLocaleString','clearLogs','error','4090990coDbMs'];a22_0x3105=function(){return _0x555758;};return a22_0x3105();}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x38b3b3=a23_0x21eb;(function(_0x715d83,_0x150905){const _0x50dacf=a23_0x21eb,_0x1ed7ca=_0x715d83();while(!![]){try{const _0x43a0fb=parseInt(_0x50dacf(0x15b))/0x1+-parseInt(_0x50dacf(0x14c))/0x2*(parseInt(_0x50dacf(0x147))/0x3)+parseInt(_0x50dacf(0x148))/0x4*(parseInt(_0x50dacf(0x149))/0x5)+-parseInt(_0x50dacf(0x146))/0x6*(parseInt(_0x50dacf(0x140))/0x7)+parseInt(_0x50dacf(0x14f))/0x8+parseInt(_0x50dacf(0x14d))/0x9*(-parseInt(_0x50dacf(0x152))/0xa)+parseInt(_0x50dacf(0x158))/0xb;if(_0x43a0fb===_0x150905)break;else _0x1ed7ca['push'](_0x1ed7ca['shift']());}catch(_0x3d93b1){_0x1ed7ca['push'](_0x1ed7ca['shift']());}}}(a23_0x16de,0xc4d16));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(_0x1a102b){const _0x551ee9=a23_0x21eb;for(const _0x505da1 of _0x1a102b){definitions[_0x551ee9(0x157)](_0x505da1[_0x551ee9(0x13d)]+':'+_0x505da1[_0x551ee9(0x14b)],_0x505da1);let _0x250019=serviceGroups[_0x551ee9(0x153)](_0x505da1[_0x551ee9(0x13d)]);!_0x250019&&(_0x250019=[],serviceGroups[_0x551ee9(0x157)](_0x505da1[_0x551ee9(0x13d)],_0x250019)),_0x250019[_0x551ee9(0x14e)](_0x505da1);}}function registerService(_0x2c5a08,_0x7e155c,_0x183e0b){const _0x50e339=a23_0x21eb;registerDefinitions(_0x7e155c);const _0x2a53f4=_0x4d45f3=>_0x4d45f3===_0x50e339(0x15d)?'':_0x4d45f3===_0x50e339(0x159)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x398ec7={'service':_0x7e155c[0x0][_0x50e339(0x13d)],'label':_0x2c5a08,'commands':_0x7e155c['map'](_0x2c3b05=>({'command':_0x2c3b05[_0x50e339(0x14b)],'description':_0x2c3b05['description'],'tag':_0x2a53f4(_0x2c3b05[_0x50e339(0x150)])})),'defaultCommand':_0x183e0b?.[_0x50e339(0x143)]??(_0x183e0b?.[_0x50e339(0x13e)]?_0x7e155c[0x0][_0x50e339(0x14b)]:undefined),'isSingleCommand':_0x183e0b?.[_0x50e339(0x13e)]};serviceRegistry[_0x50e339(0x14e)](_0x398ec7),serviceByName[_0x50e339(0x157)](_0x398ec7['service'],_0x398ec7);}registerService(a23_0x38b3b3(0x144),authDefinitions,{'defaultCommand':a23_0x38b3b3(0x15e)}),registerService('Datasets',datasetDefinitions),registerService(a23_0x38b3b3(0x13f),dataDefinitions),registerService(a23_0x38b3b3(0x15c),sqlDefinitions),registerService(a23_0x38b3b3(0x14a),bffDefinitions),registerService(a23_0x38b3b3(0x155),appDefinitions,{'defaultCommand':'list'}),registerService(a23_0x38b3b3(0x145),configDefinitions,{'defaultCommand':'list'}),registerService(a23_0x38b3b3(0x151),skillDefinitions,{'defaultCommand':'install'}),registerService(a23_0x38b3b3(0x154),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a23_0x38b3b3(0x142),logsDefinitions,{'defaultCommand':a23_0x38b3b3(0x156)});export function findDefinition(_0x115377,_0x453502){const _0x116ed9=a23_0x38b3b3;return definitions[_0x116ed9(0x153)](_0x115377+':'+_0x453502);}export function isKnownService(_0x31583c){const _0x4470f8=a23_0x38b3b3;return serviceByName[_0x4470f8(0x141)](_0x31583c);}function a23_0x16de(){const _0x347ba8=['2979008EHYsTp','risk','Skills','50UXpWRZ','get','Diagnostics','App\x20Management','show','set','18665504CSzTpQ','write','from','505355sYYUnK','SQL\x20Queries','read','login','service','isSingleCommand','Data\x20CRUD','14ObZzxG','has','Logs','defaultCommand','Authentication','Configuration','479496QWJMbd','4475022KpZCgt','2003828erAgCQ','5VFUDce','BFF\x20Scripts','command','2VQcGNx','1112184XHQonN','push'];a23_0x16de=function(){return _0x347ba8;};return a23_0x16de();}export function getServiceEntry(_0x17cf1c){const _0x1f60e5=a23_0x38b3b3;return serviceByName[_0x1f60e5(0x153)](_0x17cf1c);}function a23_0x21eb(_0x31a522,_0x39e097){_0x31a522=_0x31a522-0x13d;const _0x16de20=a23_0x16de();let _0x21ebb2=_0x16de20[_0x31a522];return _0x21ebb2;}export function getAllDefinitions(){const _0x1c849a=a23_0x38b3b3;return Array[_0x1c849a(0x15a)](definitions['values']());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x3d385=a24_0x167c;function a24_0x167c(_0x1d86cd,_0x29664e){_0x1d86cd=_0x1d86cd-0xf8;const _0x449349=a24_0x4493();let _0x167cd7=_0x449349[_0x1d86cd];return _0x167cd7;}(function(_0x4fc659,_0x50122c){const _0x3fa8fb=a24_0x167c,_0x461c22=_0x4fc659();while(!![]){try{const _0x41fae7=parseInt(_0x3fa8fb(0xff))/0x1+-parseInt(_0x3fa8fb(0x101))/0x2+parseInt(_0x3fa8fb(0x100))/0x3+parseInt(_0x3fa8fb(0xfa))/0x4+parseInt(_0x3fa8fb(0xfb))/0x5+-parseInt(_0x3fa8fb(0xf8))/0x6*(parseInt(_0x3fa8fb(0xfe))/0x7)+-parseInt(_0x3fa8fb(0xfd))/0x8;if(_0x41fae7===_0x50122c)break;else _0x461c22['push'](_0x461c22['shift']());}catch(_0x18bde2){_0x461c22['push'](_0x461c22['shift']());}}}(a24_0x4493,0x90b7e));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2a1daf){const _0x276df3=await buildSchemaPayload();return{'ok':!![],'data':_0x276df3};}function a24_0x4493(){const _0xf85f42=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','412220ASObhf','2805180qKlNSp','export','2056056Tbqtwy','2062921oSGTXE','245396UmCbLa','2519874xgFRAK','1209938tCXFXS','read','schema','6YOHYXb'];a24_0x4493=function(){return _0xf85f42;};return a24_0x4493();}export const schemaDefinition={'service':a24_0x3d385(0x103),'command':a24_0x3d385(0xfc),'description':a24_0x3d385(0xf9),'risk':a24_0x3d385(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a25_0x5a18(){const _0x5ccac9=['install','unknown','\x20-g\x20-y)...','Check\x20network\x20connectivity\x20and\x20try\x20again.','nonInteractive','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','skill-install','inherit','pipe','cwd','7DMsLkW','1810PzeOVx','2764sDltKt','5397576BjdegS','9pqrESO','npx\x20skills\x20add\x20failed:\x20','7039960ZIbqEc','info','3ZFXcxo','6172441aSHEAx','Installing\x20published\x20Lovrabet\x20skill\x20via\x20npx.','log','Install\x20the\x20published\x20Lovrabet\x20developer\x20skill','1163073vIMTCe','apiError','3418974uhTkZC','218604hXrTHf','setLogPath','skipped','error'];a25_0x5a18=function(){return _0x5ccac9;};return a25_0x5a18();}const a25_0x2c0b2f=a25_0x4d29;(function(_0x3d6902,_0x7b0fec){const _0x365898=a25_0x4d29,_0x39aa28=_0x3d6902();while(!![]){try{const _0x2bf35e=-parseInt(_0x365898(0x1ac))/0x1*(parseInt(_0x365898(0x196))/0x2)+-parseInt(_0x365898(0x193))/0x3+parseInt(_0x365898(0x1a6))/0x4*(-parseInt(_0x365898(0x1a5))/0x5)+-parseInt(_0x365898(0x195))/0x6+parseInt(_0x365898(0x1a4))/0x7*(parseInt(_0x365898(0x1a7))/0x8)+parseInt(_0x365898(0x1a8))/0x9*(parseInt(_0x365898(0x1aa))/0xa)+parseInt(_0x365898(0x18f))/0xb;if(_0x2bf35e===_0x7b0fec)break;else _0x39aa28['push'](_0x39aa28['shift']());}catch(_0xfe1f94){_0x39aa28['push'](_0x39aa28['shift']());}}}(a25_0x5a18,0x62b20));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a25_0x4d29(_0x45206a,_0x4741dc){_0x45206a=_0x45206a-0x18f;const _0x5a1814=a25_0x5a18();let _0x4d298e=_0x5a1814[_0x45206a];return _0x4d298e;}export const skillDefinitions=[{'service':'skill','command':a25_0x2c0b2f(0x19a),'description':a25_0x2c0b2f(0x192),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2beb4c){const _0x27f437=a25_0x2c0b2f;logger[_0x27f437(0x197)](process['cwd']()),logger[_0x27f437(0x1ab)](_0x27f437(0x1a0),_0x27f437(0x190));const {LOVRABET_SKILL_SOURCE:_0x4addb2,runNpxSkillsAddGlobal:_0x2c84bf}=await import('../../skills/npx-skills-add.js'),_0x12d79c=_0x2beb4c[_0x27f437(0x19e)]?_0x27f437(0x1a2):_0x27f437(0x1a1);console[_0x27f437(0x191)](_0x27f437(0x19f)+_0x4addb2+_0x27f437(0x19c));const _0x567a98=_0x2c84bf(process[_0x27f437(0x1a3)](),_0x4addb2,{'stdio':_0x12d79c});if(_0x567a98[_0x27f437(0x198)])console['log']('Skipped\x20npx\x20(LOVRABET_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x567a98['ok'])console[_0x27f437(0x191)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x27f437(0x194)](_0x27f437(0x1a9)+(_0x567a98[_0x27f437(0x199)]||_0x27f437(0x19b)),_0x27f437(0x19d));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a26_0x5a218e=a26_0x1410;(function(_0x3783fd,_0x5d5656){const _0x524b43=a26_0x1410,_0x54d804=_0x3783fd();while(!![]){try{const _0x5354ec=-parseInt(_0x524b43(0x202))/0x1+-parseInt(_0x524b43(0x1f4))/0x2+parseInt(_0x524b43(0x1f9))/0x3+-parseInt(_0x524b43(0x1fb))/0x4+parseInt(_0x524b43(0x204))/0x5+parseInt(_0x524b43(0x1f7))/0x6*(-parseInt(_0x524b43(0x1fc))/0x7)+parseInt(_0x524b43(0x201))/0x8*(parseInt(_0x524b43(0x1f5))/0x9);if(_0x5354ec===_0x5d5656)break;else _0x54d804['push'](_0x54d804['shift']());}catch(_0xb2156e){_0x54d804['push'](_0x54d804['shift']());}}}(a26_0x1cef,0x5c92a));import{getSqlQueryInfo}from'../../core/api-client.js';function a26_0x1410(_0x21f83a,_0x217191){_0x21f83a=_0x21f83a-0x1f3;const _0x1cefcb=a26_0x1cef();let _0x141039=_0x1cefcb[_0x21f83a];return _0x141039;}import{getDbName}from'../../core/db-resolver.js';function a26_0x1cef(){const _0x347040=['2968752bfdOpg','14UfBdvo','read','appCode','dbId','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','448136qpwBuP','563268lkiGES','sql','2431990uQrvRT','sqlContent','950336pjYddw','243MwVzgy','str','1436208rdxzsn','sqlName','1919043MnlLRY','sqlcode'];a26_0x1cef=function(){return _0x347040;};return a26_0x1cef();}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a26_0x5a218e(0x203),'command':'detail','description':a26_0x5a218e(0x200),'risk':a26_0x5a218e(0x1fd),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x4c9216){const _0x3f1547=a26_0x5a218e,_0x8389bf=await getSqlQueryInfo(_0x4c9216[_0x3f1547(0x1fe)],_0x4c9216[_0x3f1547(0x1f6)](_0x3f1547(0x1fa))),_0x2dd0bb=_0x4c9216['bool']('verbose');if(_0x2dd0bb)return{'ok':!![],'data':_0x8389bf};const _0x3678de=_0x8389bf['dbId']?await getDbName(_0x4c9216['appCode'],_0x8389bf['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x8389bf['sqlCode'],'sqlName':_0x8389bf[_0x3f1547(0x1f8)],'db':_0x3678de?_0x3678de+'\x20('+_0x8389bf[_0x3f1547(0x1ff)]+')':_0x8389bf[_0x3f1547(0x1ff)]??'','description':_0x8389bf['description']??'','sqlContent':_0x8389bf[_0x3f1547(0x1f3)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a27_0x24c3(){const _0x554891=['now','sql','SQL\x20execution\x20failed','3524985CjyZeW','execSuccess','7329690AIwakF','1124811DkXzhm','8ufHnMp','8502088zDmsPH','5drtbRB','length','str','params','sqlcode','Returned\x20','1717556miZyiq','execResult','\x20row(s)\x20in\x20','581358bzqdyA','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','33683031qjVYYJ'];a27_0x24c3=function(){return _0x554891;};return a27_0x24c3();}const a27_0x52e04b=a27_0x2d27;(function(_0xf05a17,_0x46c0fc){const _0x3e678b=a27_0x2d27,_0x132ea2=_0xf05a17();while(!![]){try{const _0x2fface=-parseInt(_0x3e678b(0xf1))/0x1+-parseInt(_0x3e678b(0xe8))/0x2+parseInt(_0x3e678b(0xee))/0x3+parseInt(_0x3e678b(0xe5))/0x4*(-parseInt(_0x3e678b(0xf4))/0x5)+-parseInt(_0x3e678b(0xf0))/0x6+-parseInt(_0x3e678b(0xf3))/0x7+-parseInt(_0x3e678b(0xf2))/0x8*(-parseInt(_0x3e678b(0xea))/0x9);if(_0x2fface===_0x46c0fc)break;else _0x132ea2['push'](_0x132ea2['shift']());}catch(_0x29e0c0){_0x132ea2['push'](_0x132ea2['shift']());}}}(a27_0x24c3,0x9b63c));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a27_0x2d27(_0x3359ab,_0x1a80d4){_0x3359ab=_0x3359ab-0xe5;const _0x24c3a8=a27_0x24c3();let _0x2d27b8=_0x24c3a8[_0x3359ab];return _0x2d27b8;}import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a27_0x52e04b(0xec),'command':'exec','description':a27_0x52e04b(0xe9),'risk':'read','flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x593f3b){const _0x2e28b5=a27_0x52e04b,_0x5e38e4=parseJsonParams(_0x593f3b[_0x2e28b5(0xf6)](_0x2e28b5(0xf7))),_0x460ea9=Date[_0x2e28b5(0xeb)](),_0x43873a=await executeSdkSql(_0x593f3b[_0x2e28b5(0xf6)](_0x2e28b5(0xf8)),_0x5e38e4),_0x1afd09=Date[_0x2e28b5(0xeb)]()-_0x460ea9,_0x20a2a4=_0x43873a?.[_0x2e28b5(0xe6)]??_0x43873a,_0x2ef80=_0x43873a?.[_0x2e28b5(0xef)]??!![];if(!_0x2ef80)return{'ok':![],'data':{'error':_0x43873a?.['execError']||_0x2e28b5(0xed),'elapsed':_0x1afd09},'message':_0x2e28b5(0xed)};const _0xb573ff=Array['isArray'](_0x20a2a4)?_0x20a2a4:[];return{'ok':!![],'data':{'rows':_0xb573ff,'rowCount':_0xb573ff[_0x2e28b5(0xf5)],'elapsed':_0x1afd09},'message':_0x2e28b5(0xf9)+_0xb573ff[_0x2e28b5(0xf5)]+_0x2e28b5(0xe7)+_0x1afd09+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x3837(_0x356cd4,_0x2d99ba){_0x356cd4=_0x356cd4-0xa7;const _0x4907bc=a28_0x4907();let _0x38376f=_0x4907bc[_0x356cd4];return _0x38376f;}(function(_0x10b8a9,_0xf666ed){const _0x4665c4=a28_0x3837,_0x21d062=_0x10b8a9();while(!![]){try{const _0x31919a=parseInt(_0x4665c4(0xb2))/0x1*(parseInt(_0x4665c4(0xa8))/0x2)+parseInt(_0x4665c4(0xad))/0x3*(parseInt(_0x4665c4(0xac))/0x4)+-parseInt(_0x4665c4(0xa9))/0x5+parseInt(_0x4665c4(0xb1))/0x6*(parseInt(_0x4665c4(0xb0))/0x7)+-parseInt(_0x4665c4(0xaa))/0x8*(-parseInt(_0x4665c4(0xb3))/0x9)+-parseInt(_0x4665c4(0xae))/0xa*(-parseInt(_0x4665c4(0xaf))/0xb)+-parseInt(_0x4665c4(0xa7))/0xc*(parseInt(_0x4665c4(0xab))/0xd);if(_0x31919a===_0xf666ed)break;else _0x21d062['push'](_0x21d062['shift']());}catch(_0x17f497){_0x21d062['push'](_0x21d062['shift']());}}}(a28_0x4907,0xa9aee));import{sqlDetail}from'../../commands/sql/detail.js';function a28_0x4907(){const _0x3a5806=['30vAKsWM','4306753xKtGzH','658QFFSDQ','2778dkuMJk','1059956YcUJMz','3134907wfMRhH','176664BGGHlR','2AsxNTN','5830490mGVfwv','8AgStBE','1833GhWDYp','32OWmVYv','491457tdCjDk'];a28_0x4907=function(){return _0x3a5806;};return a28_0x4907();}import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|