@lovrabet/lovrabet-cli 2.1.7-beta.2 → 2.1.7-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.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/app-config/get.js +1 -0
- package/lib/commands/app-config/index.js +1 -0
- package/lib/commands/app-config/shared.js +1 -0
- package/lib/commands/artifact/index.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/cli-skill/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/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -0
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- 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/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.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/distribution.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/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- 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/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- 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 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a66aa,_0x24acd8){const _0x3e3e80=a16_0x4c30,_0x2d715d=_0x3a66aa();while(!![]){try{const _0x55027f=parseInt(_0x3e3e80(0x169))/0x1*(parseInt(_0x3e3e80(0x16c))/0x2)+parseInt(_0x3e3e80(0x168))/0x3*(parseInt(_0x3e3e80(0x171))/0x4)+parseInt(_0x3e3e80(0x167))/0x5*(-parseInt(_0x3e3e80(0x16b))/0x6)+-parseInt(_0x3e3e80(0x16e))/0x7+-parseInt(_0x3e3e80(0x16d))/0x8*(parseInt(_0x3e3e80(0x16a))/0x9)+-parseInt(_0x3e3e80(0x16f))/0xa+parseInt(_0x3e3e80(0x170))/0xb;if(_0x55027f===_0x24acd8)break;else _0x2d715d['push'](_0x2d715d['shift']());}catch(_0x19a5d4){_0x2d715d['push'](_0x2d715d['shift']());}}}(a16_0x2c91,0x508b7));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a16_0x4c30(_0x373f0e,_0xbb7ccc){_0x373f0e=_0x373f0e-0x167;const _0x2c9178=a16_0x2c91();let _0x4c30f4=_0x2c9178[_0x373f0e];return _0x4c30f4;}function a16_0x2c91(){const _0x4e40a3=['156DtxCze','208504pWbnip','656176CMkWUY','3345237nNlCce','2322790oYUrNM','6735850kEzGZZ','2255884KaiQtl','43300Lnxaka','3TCQNuu','4bjaUhw','36ZMaWcN'];a16_0x2c91=function(){return _0x4e40a3;};return a16_0x2c91();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a17_0x1b0019=a17_0x54a6;function a17_0x3170(){const _0x10867=['51331AXVkZv','745tbOzXl','log','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','unknown','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','4121667PUZKLD','../../skills/npx-skills-add.js','CLI\x20Built-in\x20Skill\x20installed','150ropAXV','nonInteractive','error','cli-skill','447095iybIMY','144GpLjIg','setLogPath','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','cli-skill-install','13218pCiSnq','\x20-g\x20-y)...','install','31030lVilXX','\x20-g\x20-y','apiError','info','write','cwd','306252biErkY','3476HWKKwI','Skipped\x20npx\x20(','1958TqojbX','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','pipe','skipped','inherit'];a17_0x3170=function(){return _0x10867;};return a17_0x3170();}function a17_0x54a6(_0x4c38a8,_0x5c07fc){_0x4c38a8=_0x4c38a8-0x147;const _0x31706d=a17_0x3170();let _0x54a635=_0x31706d[_0x4c38a8];return _0x54a635;}(function(_0x506750,_0x3c5107){const _0x297109=a17_0x54a6,_0xdd061=_0x506750();while(!![]){try{const _0x2f4499=parseInt(_0x297109(0x15b))/0x1+-parseInt(_0x297109(0x149))/0x2*(-parseInt(_0x297109(0x157))/0x3)+parseInt(_0x297109(0x169))/0x4+-parseInt(_0x297109(0x14f))/0x5*(-parseInt(_0x297109(0x160))/0x6)+-parseInt(_0x297109(0x14e))/0x7*(parseInt(_0x297109(0x15c))/0x8)+parseInt(_0x297109(0x154))/0x9+parseInt(_0x297109(0x163))/0xa*(-parseInt(_0x297109(0x147))/0xb);if(_0x2f4499===_0x3c5107)break;else _0xdd061['push'](_0xdd061['shift']());}catch(_0xbab6bf){_0xdd061['push'](_0xdd061['shift']());}}}(a17_0x3170,0x3c204));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x1b0019(0x15a),'command':a17_0x1b0019(0x162),'description':a17_0x1b0019(0x151),'risk':a17_0x1b0019(0x167),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x20c9e8){const _0x1b6481=a17_0x1b0019;logger[_0x1b6481(0x15d)](process[_0x1b6481(0x168)]()),logger[_0x1b6481(0x166)](_0x1b6481(0x15f),_0x1b6481(0x153));const {LOVRABET_SKILL_SOURCE:_0x15d3b6,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x5def0a,runNpxSkillsAddGlobal:_0x27fb09}=await import(_0x1b6481(0x155)),_0x5e86b1=_0x20c9e8[_0x1b6481(0x158)]?_0x1b6481(0x14b):_0x1b6481(0x14d);console['log'](_0x1b6481(0x14a)+_0x15d3b6+_0x1b6481(0x161));const _0x52d4c8=_0x27fb09(process['cwd'](),_0x15d3b6,{'stdio':_0x5e86b1});if(_0x52d4c8[_0x1b6481(0x14c)])console['log'](_0x1b6481(0x148)+_0x5def0a+'=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x52d4c8['ok'])console[_0x1b6481(0x150)](_0x1b6481(0x156));else throw CliErrors[_0x1b6481(0x165)]('npx\x20skills\x20add\x20failed:\x20'+(_0x52d4c8[_0x1b6481(0x159)]||_0x1b6481(0x152)),_0x1b6481(0x15e)+_0x15d3b6+_0x1b6481(0x164));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1379ad,_0x44fd13){const _0x2af224=a18_0x58bb,_0x1608f0=_0x1379ad();while(!![]){try{const _0x248ed7=parseInt(_0x2af224(0xb0))/0x1+parseInt(_0x2af224(0xa4))/0x2*(parseInt(_0x2af224(0xae))/0x3)+parseInt(_0x2af224(0xaf))/0x4*(parseInt(_0x2af224(0xa3))/0x5)+-parseInt(_0x2af224(0xa1))/0x6+parseInt(_0x2af224(0xa5))/0x7*(-parseInt(_0x2af224(0x9c))/0x8)+-parseInt(_0x2af224(0xa2))/0x9*(-parseInt(_0x2af224(0xa9))/0xa)+parseInt(_0x2af224(0xab))/0xb*(-parseInt(_0x2af224(0xad))/0xc);if(_0x248ed7===_0x44fd13)break;else _0x1608f0['push'](_0x1608f0['shift']());}catch(_0xf6847f){_0x1608f0['push'](_0x1608f0['shift']());}}}(a18_0x3607,0xd91cf));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a18_0x3607(){const _0x153068=['project-default','newConfigFileName','inProject','5466972iwoAYO','9LBlTdI','8534480zLirZk','4766bzdeha','10304644quldbX','\x20(global)','project','Not\x20inside\x20a\x20project\x20(no\x20','5844940CLWlUl','project-or-global-explicit','754039nQDqFB','global','48qXquKQ','1221Dqidat','4kYrRkG','285474WdDvIi','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','8JMHdWO','validation'];a18_0x3607=function(){return _0x153068;};return a18_0x3607();}function a18_0x58bb(_0x19b552,_0xe1b8ba){_0x19b552=_0x19b552-0x9c;const _0x36071f=a18_0x3607();let _0x58bbc7=_0x36071f[_0x19b552];return _0x58bbc7;}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x54b733){const _0x425b49=a18_0x58bb,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3d4f29}=_0x54b733;if(explicitGlobal&&explicitProject)throw CliErrors[_0x425b49(0x9d)](_0x425b49(0xb1),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x425b49(0xac);if(explicitProject)return _0x425b49(0xa7);switch(_0x3d4f29){case'global-default':return _0x425b49(0xac);case _0x425b49(0x9e):return _0x54b733[_0x425b49(0xa0)]??isInProject()?'project':_0x425b49(0xac);case _0x425b49(0xaa):if(!(_0x54b733[_0x425b49(0xa0)]??isInProject()))throw CliErrors[_0x425b49(0x9d)](_0x425b49(0xa8)+PRODUCT_CONFIG[_0x425b49(0x9f)]+'\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG['newConfigFileName']+',\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x425b49(0xa7);}}export function toScopeFlags(_0x6e4ea3){return{'global':_0x6e4ea3==='global'};}export function formatScopeLabel(_0x5795dd){const _0x206eba=a18_0x58bb;return _0x5795dd===_0x206eba(0xac)?_0x206eba(0xa6):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a19_0x10fd(){const _0x54915a=['Use\x20only\x20one\x20of:\x20','join','11119144MecGPL','30fHNQgv','149468wPZaYK','4089744NwrjTy','2904295CgFdMP','str','4892356BFomDL','map','\x20is\x20required\x20for\x20`','Provide\x20one\x20of:\x20','validation','At\x20least\x20one\x20of\x20','3349908VFZoBn','Invalid\x20--','6dDkLoK','27tbPtvM','87956PbZPeW','test','length','some','\x20are\x20mutually\x20exclusive\x20for\x20`',':\x20expected\x20'];a19_0x10fd=function(){return _0x54915a;};return a19_0x10fd();}(function(_0xda58e7,_0x517488){const _0x912a0b=a19_0x1714,_0x4d220d=_0xda58e7();while(!![]){try{const _0xb7e989=parseInt(_0x912a0b(0xd0))/0x1+-parseInt(_0x912a0b(0xc6))/0x2*(parseInt(_0x912a0b(0xc5))/0x3)+parseInt(_0x912a0b(0xc2))/0x4+parseInt(_0x912a0b(0xba))/0x5*(-parseInt(_0x912a0b(0xc4))/0x6)+parseInt(_0x912a0b(0xbc))/0x7+parseInt(_0x912a0b(0xce))/0x8+parseInt(_0x912a0b(0xb9))/0x9*(-parseInt(_0x912a0b(0xcf))/0xa);if(_0xb7e989===_0x517488)break;else _0x4d220d['push'](_0x4d220d['shift']());}catch(_0x1983a8){_0x4d220d['push'](_0x4d220d['shift']());}}}(a19_0x10fd,0xb3a5d));import{CliErrors}from'../../errors.js';function isSet(_0x546834,_0x8808ce){const _0x45c404=_0x546834['flag'](_0x8808ce);return _0x45c404!==undefined&&_0x45c404!==''&&_0x45c404!==![]&&_0x45c404!==0x0;}function fmtNames(_0xa56d47){const _0x8aba5e=a19_0x1714;return _0xa56d47[_0x8aba5e(0xbd)](_0x26b9f7=>'--'+_0x26b9f7)[_0x8aba5e(0xcd)](',\x20');}export function requireOneOf(_0x331ebb,_0x48046b,_0x371ba3){const _0x2caa71=a19_0x1714,_0x112cb9=_0x48046b['filter'](_0x3d91b1=>isSet(_0x331ebb,_0x3d91b1));if(_0x112cb9[_0x2caa71(0xc8)]!==0x1)throw CliErrors[_0x2caa71(0xc0)](_0x112cb9['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x48046b)+_0x2caa71(0xbe)+_0x371ba3+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x48046b)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x112cb9)+'.',_0x112cb9[_0x2caa71(0xc8)]===0x0?_0x2caa71(0xbf)+fmtNames(_0x48046b):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x22f4d4,_0x332c22,_0x242df3){const _0x824d0b=a19_0x1714;if(!_0x332c22[_0x824d0b(0xc9)](_0x1c6494=>isSet(_0x22f4d4,_0x1c6494)))throw CliErrors[_0x824d0b(0xc0)](_0x824d0b(0xc1)+fmtNames(_0x332c22)+_0x824d0b(0xbe)+_0x242df3+'`.',_0x824d0b(0xbf)+fmtNames(_0x332c22));}export function mutuallyExclusive(_0x552ffc,_0x2b6974,_0x11e06d){const _0x997cf5=a19_0x1714,_0x337756=_0x2b6974['filter'](_0x3cb2e4=>isSet(_0x552ffc,_0x3cb2e4));if(_0x337756['length']>0x1)throw CliErrors[_0x997cf5(0xc0)]('Flags\x20'+fmtNames(_0x337756)+_0x997cf5(0xca)+_0x11e06d+'`.',_0x997cf5(0xcc)+fmtNames(_0x2b6974));}function a19_0x1714(_0x495c22,_0x5e181b){_0x495c22=_0x495c22-0xb9;const _0x10fd5d=a19_0x10fd();let _0x171457=_0x10fd5d[_0x495c22];return _0x171457;}export function validatePattern(_0x3c8c57,_0x481ca6,_0x538315,_0x2b6e32){const _0x42faaf=a19_0x1714,_0x442529=_0x3c8c57[_0x42faaf(0xbb)](_0x481ca6);if(_0x442529&&!_0x538315[_0x42faaf(0xc7)](_0x442529))throw CliErrors[_0x42faaf(0xc0)](_0x42faaf(0xc3)+_0x481ca6+_0x42faaf(0xcb)+_0x2b6e32+',\x20got\x20\x22'+_0x442529+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a20_0x31c3(_0x382e1e,_0x4adf78){_0x382e1e=_0x382e1e-0x8f;const _0x95507=a20_0x9550();let _0x31c373=_0x95507[_0x382e1e];return _0x31c373;}const a20_0x2a7190=a20_0x31c3;(function(_0x3a961f,_0x3ffa2a){const _0x2289f0=a20_0x31c3,_0x39d27c=_0x3a961f();while(!![]){try{const _0x5d1977=-parseInt(_0x2289f0(0xa3))/0x1*(parseInt(_0x2289f0(0x93))/0x2)+parseInt(_0x2289f0(0x90))/0x3+-parseInt(_0x2289f0(0x95))/0x4*(parseInt(_0x2289f0(0xa0))/0x5)+parseInt(_0x2289f0(0x92))/0x6*(parseInt(_0x2289f0(0x9c))/0x7)+-parseInt(_0x2289f0(0x9e))/0x8+parseInt(_0x2289f0(0x96))/0x9+parseInt(_0x2289f0(0x9f))/0xa;if(_0x5d1977===_0x3ffa2a)break;else _0x39d27c['push'](_0x39d27c['shift']());}catch(_0x5ee4be){_0x39d27c['push'](_0x39d27c['shift']());}}}(a20_0x9550,0x2e8f4));export const CODE_FLAG={'name':a20_0x2a7190(0x8f),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':'sqlcode','type':a20_0x2a7190(0x9b),'required':!![],'description':a20_0x2a7190(0x98),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x2a7190(0x91)}};export const VERBOSE_FLAG={'name':a20_0x2a7190(0x99),'type':a20_0x2a7190(0x97),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a20_0x2a7190(0x94),'type':a20_0x2a7190(0x9b),'description':a20_0x2a7190(0xa2)};export const NAME_FLAG={'name':a20_0x2a7190(0x9a),'type':a20_0x2a7190(0x9b),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a20_0x2a7190(0x9d),'required':!![],'description':a20_0x2a7190(0xa1)};function a20_0x9550(){const _0x16f5c6=['boolean','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','verbose','name','string','1518293iimOjV','number','1892200yvbgRX','2473000gaQJLv','985ooXyHg','Resource\x20ID','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','1znWNZk','code','129540UEZamQ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6CDFBzI','327926RgveOZ','params','3884guUTjB','2475936ZwkBCD'];a20_0x9550=function(){return _0x16f5c6;};return a20_0x9550();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x400502=a21_0x2da6;(function(_0x291fe1,_0x16be28){const _0x586b7f=a21_0x2da6,_0x39af90=_0x291fe1();while(!![]){try{const _0x497873=parseInt(_0x586b7f(0xe3))/0x1*(parseInt(_0x586b7f(0xe9))/0x2)+parseInt(_0x586b7f(0xd6))/0x3+-parseInt(_0x586b7f(0xcc))/0x4+-parseInt(_0x586b7f(0xe4))/0x5+parseInt(_0x586b7f(0xfa))/0x6*(-parseInt(_0x586b7f(0xd7))/0x7)+parseInt(_0x586b7f(0xde))/0x8*(-parseInt(_0x586b7f(0xe0))/0x9)+parseInt(_0x586b7f(0xf5))/0xa;if(_0x497873===_0x16be28)break;else _0x39af90['push'](_0x39af90['shift']());}catch(_0x3844f5){_0x39af90['push'](_0x39af90['shift']());}}}(a21_0x33fd,0x4c200));function a21_0x2da6(_0x4a2afd,_0x530071){_0x4a2afd=_0x4a2afd-0xc1;const _0x33fdd4=a21_0x33fd();let _0x2da691=_0x33fdd4[_0x4a2afd];return _0x2da691;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':'global','type':a21_0x400502(0xc6),'description':a21_0x400502(0xe8),'default':![]};function a21_0x33fd(){const _0x1ef517=['Deleted\x20`','boolean','\x22\x20is\x20not\x20settable.','set','\x22\x20not\x20found\x20at\x20top\x20level.','field','\x20\x20project:\x20','1939424PVdTux','project-or-global-explicit','Invalid\x20value\x20for\x20\x22','Config\x20files:\x0a','object','\x22.\x20Allowed:\x20','args','log','trim','\x20\x20global:\x20\x20','218025lYeYcA','329zqMGcZ','Missing\x20key\x20argument.','Key\x20not\x20found:\x20','`\x20=\x20\x22','Settable\x20keys:\x20','validation','global','8672WylDKO','format','4464RCrLMu','pageSize','apps','5349PGsbGi','2004375mBHZei','(none)','delete','Delete\x20a\x20config\x20value','Write\x20to\x20global\x20config','138wrmmHf','\x20config\x20get\x20<key>','value',';\x20apps.<alias>.appcode','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','bool','riskLevel','key','isArray','keys','stringify','Set\x20a\x20config\x20value','16279460TYqTwu','Usage:\x20','split','appcode','config','42702iNHwNp','\x20config\x20delete\x20<key>\x20[--global]','pageSize\x20must\x20be\x20a\x20positive\x20number','../../context.js','length','Set\x20`','join','Get\x20a\x20config\x20value','\x20(global)','includes','write','list','alias'];a21_0x33fd=function(){return _0x1ef517;};return a21_0x33fd();}function parseAliasAppcodeSetKey(_0x446371){const _0x2013e0=a21_0x400502,_0x4077b7=_0x446371[_0x2013e0(0xf7)]('.');if(_0x4077b7[_0x2013e0(0xfe)]!==0x3||_0x4077b7[0x0]!=='apps'||_0x4077b7[0x2]!==_0x2013e0(0xf8))return undefined;const _0x40a455=_0x4077b7[0x1]?.['trim']();return _0x40a455?_0x40a455:undefined;}function parseAliasDeleteKey(_0x31cbde){const _0x44d29a=a21_0x400502,_0x4aed47=_0x31cbde[_0x44d29a(0xf7)]('.');if(_0x4aed47['length']===0x2&&_0x4aed47[0x0]===_0x44d29a(0xe2)){const _0x259159=_0x4aed47[0x1]?.[_0x44d29a(0xd4)]();return _0x259159?{'alias':_0x259159}:undefined;}if(_0x4aed47[_0x44d29a(0xfe)]===0x3&&_0x4aed47[0x0]===_0x44d29a(0xe2)&&_0x4aed47[0x2]==='appcode'){const _0x26162e=_0x4aed47[0x1]?.[_0x44d29a(0xd4)]();return _0x26162e?{'alias':_0x26162e,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x30e0ef,_0x44488d,_0x1531ce){const _0x49da40=a21_0x400502,_0x14ea89=_0x30e0ef[_0x49da40(0xe2)]&&typeof _0x30e0ef[_0x49da40(0xe2)]===_0x49da40(0xd0)&&!Array['isArray'](_0x30e0ef[_0x49da40(0xe2)])?_0x30e0ef[_0x49da40(0xe2)]:{},_0x206f8c=_0x14ea89[_0x44488d]&&typeof _0x14ea89[_0x44488d]===_0x49da40(0xd0)&&!Array['isArray'](_0x14ea89[_0x44488d])?_0x14ea89[_0x44488d]:{};_0x206f8c[_0x49da40(0xf8)]=_0x1531ce,_0x14ea89[_0x44488d]=_0x206f8c,_0x30e0ef[_0x49da40(0xe2)]=_0x14ea89;}function deleteLocalAppAlias(_0x3d5825,_0x344911){const _0x272de1=a21_0x400502;if(!_0x3d5825['apps']||typeof _0x3d5825['apps']!==_0x272de1(0xd0)||Array[_0x272de1(0xf1)](_0x3d5825[_0x272de1(0xe2)]))return![];const _0x54554e=_0x3d5825[_0x272de1(0xe2)],_0x4c6b23=_0x54554e[_0x344911['alias']];if(!_0x4c6b23||typeof _0x4c6b23!==_0x272de1(0xd0)||Array['isArray'](_0x4c6b23))return![];if(!_0x344911[_0x272de1(0xca)])return delete _0x54554e[_0x344911['alias']],!![];if(!(_0x344911[_0x272de1(0xca)]in _0x4c6b23))return![];return delete _0x4c6b23[_0x344911[_0x272de1(0xca)]],Object[_0x272de1(0xf2)](_0x4c6b23)['length']===0x0&&delete _0x54554e[_0x344911[_0x272de1(0xc4)]],!![];}const listDef={'service':a21_0x400502(0xf9),'command':a21_0x400502(0xc3),'description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5a2950){const _0x15a02e=a21_0x400502,{buildConfigFromFlags:_0x59adfe}=await import(_0x15a02e(0xfd)),_0x5d3ad0=_0x59adfe({}),_0x281bad=getProjectConfigPath(),_0x4c7425=resolveWriteConfigPath(_0x15a02e(0xdd));if(_0x5a2950[_0x15a02e(0xdf)]==='pretty')return{'ok':!![],'message':_0x15a02e(0xed)+(JSON[_0x15a02e(0xf3)](_0x5d3ad0['raw'],null,0x2)+'\x0a\x0a')+_0x15a02e(0xcf)+(_0x15a02e(0xcb)+(_0x281bad??_0x15a02e(0xe5))+'\x0a')+(_0x15a02e(0xd5)+_0x4c7425)};return{'ok':!![],'data':{'effective':_0x5d3ad0['raw'],'configFiles':{'project':_0x281bad??null,'global':_0x4c7425}}};}},getDef={'service':'config','command':'get','description':a21_0x400502(0x101),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x4eec2f){const _0x4ce6ed=a21_0x400502,_0x3685e6=_0x4eec2f['args'][0x0];if(!_0x3685e6)throw CliErrors[_0x4ce6ed(0xdc)](_0x4ce6ed(0xd8),_0x4ce6ed(0xf6)+CLI_BIN_NAME+_0x4ce6ed(0xea));const {buildConfigFromFlags:_0x1c1c65}=await import('../../context.js'),{raw:_0x4b20fb}=_0x1c1c65({});if(_0x3685e6[_0x4ce6ed(0xc1)]('.')){const _0x455626=_0x3685e6[_0x4ce6ed(0xf7)]('.');let _0x1e49d0=_0x4b20fb;for(const _0x5a9d23 of _0x455626){if(_0x1e49d0==null||typeof _0x1e49d0!==_0x4ce6ed(0xd0))throw CliErrors[_0x4ce6ed(0xdc)]('Key\x20not\x20found:\x20'+_0x3685e6);_0x1e49d0=_0x1e49d0[_0x5a9d23];}if(_0x1e49d0===undefined)throw CliErrors['validation'](_0x4ce6ed(0xd9)+_0x3685e6);return console['log'](typeof _0x1e49d0==='object'?JSON[_0x4ce6ed(0xf3)](_0x1e49d0,null,0x2):String(_0x1e49d0)),{'ok':!![]};}const _0x2ac6ba=_0x4b20fb[_0x3685e6];if(_0x2ac6ba===undefined)throw CliErrors[_0x4ce6ed(0xdc)]('Key\x20not\x20found:\x20'+_0x3685e6);return console['log'](typeof _0x2ac6ba===_0x4ce6ed(0xd0)?JSON[_0x4ce6ed(0xf3)](_0x2ac6ba,null,0x2):String(_0x2ac6ba)),{'ok':!![]};}},setDef={'service':'config','command':a21_0x400502(0xc8),'description':a21_0x400502(0xf4),'risk':a21_0x400502(0xc2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a21_0x400502(0xf0),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a21_0x400502(0xeb),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1cdea2){const _0x22cac5=a21_0x400502,_0x52c9c4=_0x1cdea2['args'][0x0],_0x4b4d85=_0x1cdea2[_0x22cac5(0xd2)][0x1];if(!_0x52c9c4||_0x4b4d85===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x22cac5(0xf6)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x52c9c4]&&!ENUM_KEYS[_0x52c9c4][_0x22cac5(0xc1)](_0x4b4d85))throw CliErrors['validation'](_0x22cac5(0xce)+_0x52c9c4+_0x22cac5(0xd1)+ENUM_KEYS[_0x52c9c4][_0x22cac5(0x100)](',\x20'));if(_0x52c9c4===_0x22cac5(0xef))throw CliErrors[_0x22cac5(0xdc)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x52c9c4===_0x22cac5(0xe1)){const _0x14fc11=Number(_0x4b4d85);if(isNaN(_0x14fc11)||_0x14fc11<=0x0)throw CliErrors['validation'](_0x22cac5(0xfc));}const _0x37530e=resolveWriteScope({'explicitGlobal':_0x1cdea2[_0x22cac5(0xee)](_0x22cac5(0xdd)),'policy':_0x22cac5(0xcd)}),_0x5a674c=toScopeFlags(_0x37530e),_0x41eaf7=readScopedConfig(_0x5a674c),_0x3798ce=parseAliasAppcodeSetKey(_0x52c9c4);if(!_0x3798ce&&!isTopLevelConfigKey(_0x52c9c4))throw CliErrors[_0x22cac5(0xdc)]('Top-level\x20key\x20\x22'+_0x52c9c4+_0x22cac5(0xc7),_0x22cac5(0xdb)+getTopLevelConfigKeySummary()+_0x22cac5(0xec));return _0x3798ce?setLocalAppAlias(_0x41eaf7,_0x3798ce,_0x4b4d85):_0x41eaf7[_0x52c9c4]=_0x52c9c4==='pageSize'?Number(_0x4b4d85):_0x4b4d85,console[_0x22cac5(0xd3)](_0x22cac5(0xff)+_0x52c9c4+_0x22cac5(0xda)+_0x4b4d85+'\x22'+(_0x37530e===_0x22cac5(0xdd)?_0x22cac5(0x102):'')),writeScopedConfig(_0x41eaf7,_0x5a674c),{'ok':!![]};}},deleteDef={'service':'config','command':a21_0x400502(0xe6),'description':a21_0x400502(0xe7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a21_0x400502(0xf0),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4dc0ea){const _0x59567f=a21_0x400502,_0x3c261a=_0x4dc0ea[_0x59567f(0xd2)][0x0];if(!_0x3c261a)throw CliErrors[_0x59567f(0xdc)](_0x59567f(0xd8),_0x59567f(0xf6)+CLI_BIN_NAME+_0x59567f(0xfb));const _0x50ceb9=resolveWriteScope({'explicitGlobal':_0x4dc0ea[_0x59567f(0xee)]('global'),'policy':_0x59567f(0xcd)}),_0x227cfa=toScopeFlags(_0x50ceb9),_0x4954b5=readScopedConfig(_0x227cfa),_0xc7949e=parseAliasDeleteKey(_0x3c261a);if(_0xc7949e){if(!deleteLocalAppAlias(_0x4954b5,_0xc7949e))throw CliErrors['validation'](_0x59567f(0xd9)+_0x3c261a);return console['log'](_0x59567f(0xc5)+_0x3c261a+'`'+(_0x50ceb9==='global'?_0x59567f(0x102):'')),writeScopedConfig(_0x4954b5,_0x227cfa),{'ok':!![]};}if(_0x4954b5[_0x3c261a]===undefined)throw CliErrors[_0x59567f(0xdc)]('Key\x20\x22'+_0x3c261a+_0x59567f(0xc9));return delete _0x4954b5[_0x3c261a],console[_0x59567f(0xd3)](_0x59567f(0xc5)+_0x3c261a+'`'+(_0x50ceb9===_0x59567f(0xdd)?_0x59567f(0x102):'')),writeScopedConfig(_0x4954b5,_0x227cfa),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd141d3,_0xfb03f2){var _0x397b3f=a22_0x5704,_0x3a7be6=_0xd141d3();while(!![]){try{var _0x56de02=parseInt(_0x397b3f(0x71))/0x1*(parseInt(_0x397b3f(0x70))/0x2)+-parseInt(_0x397b3f(0x6f))/0x3+parseInt(_0x397b3f(0x72))/0x4*(parseInt(_0x397b3f(0x74))/0x5)+parseInt(_0x397b3f(0x6e))/0x6*(parseInt(_0x397b3f(0x76))/0x7)+parseInt(_0x397b3f(0x75))/0x8+-parseInt(_0x397b3f(0x73))/0x9*(-parseInt(_0x397b3f(0x6c))/0xa)+-parseInt(_0x397b3f(0x6d))/0xb;if(_0x56de02===_0xfb03f2)break;else _0x3a7be6['push'](_0x3a7be6['shift']());}catch(_0x1e798c){_0x3a7be6['push'](_0x3a7be6['shift']());}}}(a22_0x558a,0x9e7e0));function a22_0x5704(_0x44626b,_0x3cc420){_0x44626b=_0x44626b-0x6c;var _0x558a89=a22_0x558a();var _0x5704fd=_0x558a89[_0x44626b];return _0x5704fd;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x558a(){var _0x203a59=['7thwJCj','500xgjcig','25886696wWKuBD','5273178RvbXuw','3403764JevvXL','147068AuOKYT','2zadQnj','3416096bOuRun','195345EifBDc','5UZDZnh','9375224joAdGT'];a22_0x558a=function(){return _0x203a59;};return a22_0x558a();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a20_0x4dd2b9=a20_0x208c;(function(_0x49ef40,_0x35f97b){const _0x2c8996=a20_0x208c,_0xa8974d=_0x49ef40();while(!![]){try{const _0x54a835=-parseInt(_0x2c8996(0x85))/0x1+parseInt(_0x2c8996(0x8d))/0x2+parseInt(_0x2c8996(0xc0))/0x3+-parseInt(_0x2c8996(0xb7))/0x4+-parseInt(_0x2c8996(0xcc))/0x5+-parseInt(_0x2c8996(0x8e))/0x6*(-parseInt(_0x2c8996(0xb0))/0x7)+parseInt(_0x2c8996(0xbd))/0x8*(parseInt(_0x2c8996(0xba))/0x9);if(_0x54a835===_0x35f97b)break;else _0xa8974d['push'](_0xa8974d['shift']());}catch(_0x4b1d45){_0xa8974d['push'](_0xa8974d['shift']());}}}(a20_0x23df,0x7921f));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';function a20_0x23df(){const _0xa6ee11=['write','Preview:\x20data\x20','\x20completed\x20in\x20','Update\x20an\x20existing\x20record','helpExtra','build','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\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\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','body','delete','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','operation','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','code','\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}}','now','description','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','filter','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20AGGREGATE\x20TYPES','28bcUwiL','getOne','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\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}}','3677796PzQhQU','update','\x20on\x20dataset\x20','1989693QZMuRE','params','high-risk-write','56uXPkJu','join','\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}}','1280775AkwLML','paramsRequired','dryRun','create','risk','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','str','\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\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','data','\x20\x20PAGINATION','3588785KHYBTn','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','/api/{appCode}/','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\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}}]}','read','\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}}','POST','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','927100sbhbbd','aggregate','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint','\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{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','batchCreate','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','201178ohYGKA','1478118rwjzJK','command','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','map','data\x20','\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}}'];a20_0x23df=function(){return _0xa6ee11;};return a20_0x23df();}const specs=[{'command':a20_0x4dd2b9(0xad),'operation':a20_0x4dd2b9(0xad),'risk':a20_0x4dd2b9(0x81),'paramsRequired':![],'description':a20_0x4dd2b9(0x9a),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a20_0x4dd2b9(0x87),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a20_0x4dd2b9(0xb6),a20_0x4dd2b9(0xbf),'\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}}',a20_0x4dd2b9(0xc8),a20_0x4dd2b9(0x93),a20_0x4dd2b9(0xa8),'\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]}}',a20_0x4dd2b9(0x82),'\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}}',a20_0x4dd2b9(0xcf),'',a20_0x4dd2b9(0xae),a20_0x4dd2b9(0x80),a20_0x4dd2b9(0x7e),'',a20_0x4dd2b9(0x9b),a20_0x4dd2b9(0xac),'\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\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a20_0x4dd2b9(0xa1),'',a20_0x4dd2b9(0xcb),a20_0x4dd2b9(0xc5),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a20_0x4dd2b9(0x8c)]['join']('\x0a')},{'command':a20_0x4dd2b9(0xb1),'operation':'getOne','risk':a20_0x4dd2b9(0x81),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a20_0x4dd2b9(0xb4)},{'command':a20_0x4dd2b9(0xc3),'operation':a20_0x4dd2b9(0xc3),'risk':a20_0x4dd2b9(0x94),'paramsRequired':!![],'description':a20_0x4dd2b9(0xc6),'paramsHint':a20_0x4dd2b9(0x9e)},{'command':a20_0x4dd2b9(0x8b),'operation':a20_0x4dd2b9(0x8b),'risk':a20_0x4dd2b9(0x94),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a20_0x4dd2b9(0xb2)},{'command':a20_0x4dd2b9(0xb8),'operation':'update','risk':a20_0x4dd2b9(0x94),'paramsRequired':!![],'description':a20_0x4dd2b9(0x97),'paramsHint':a20_0x4dd2b9(0x84)},{'command':a20_0x4dd2b9(0xa3),'operation':'delete','risk':a20_0x4dd2b9(0xbc),'paramsRequired':!![],'description':a20_0x4dd2b9(0x88),'paramsHint':a20_0x4dd2b9(0xb4)},{'command':a20_0x4dd2b9(0x86),'operation':'aggregate','risk':a20_0x4dd2b9(0x81),'paramsRequired':![],'description':a20_0x4dd2b9(0xb5),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a20_0x4dd2b9(0x90),'helpExtra':[a20_0x4dd2b9(0xaf),a20_0x4dd2b9(0xa6),a20_0x4dd2b9(0x9d),a20_0x4dd2b9(0xab),a20_0x4dd2b9(0xc9),a20_0x4dd2b9(0x8a),'\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{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a20_0x4dd2b9(0xb3),a20_0x4dd2b9(0x7f),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a20_0x4dd2b9(0xa0),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','','\x20\x20EXAMPLES',a20_0x4dd2b9(0xcd),a20_0x4dd2b9(0xa4),'',a20_0x4dd2b9(0x9c),a20_0x4dd2b9(0x9f),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a20_0x4dd2b9(0xbe)]('\x0a')}];function a20_0x208c(_0x489398,_0x96807a){_0x489398=_0x489398-0x7e;const _0x23df18=a20_0x23df();let _0x208c1b=_0x23df18[_0x489398];return _0x208c1b;}function makeDataCommand(_0x3a36c7){const _0x1dc6bc=a20_0x4dd2b9,_0x3be681=_0x1dc6bc(0x92)+_0x3a36c7['command'],_0xd3b919={'service':_0x1dc6bc(0xca),'command':_0x3a36c7[_0x1dc6bc(0x8f)],'description':_0x3a36c7[_0x1dc6bc(0xaa)],'risk':_0x3a36c7[_0x1dc6bc(0xc4)],'helpExtra':_0x3a36c7[_0x1dc6bc(0x98)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x3a36c7[_0x1dc6bc(0x89)]}],'validate':async _0x2a6fc1=>{const _0xcedfc4=_0x1dc6bc;_0x3a36c7[_0xcedfc4(0xc1)]&&requireAnyOf(_0x2a6fc1,[_0xcedfc4(0xbb)],_0x3be681),_0x3a36c7['operation']===_0xcedfc4(0x8b)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2a6fc1[_0xcedfc4(0xc7)](_0xcedfc4(0xbb))));},async 'execute'(_0x5be779){const _0x515050=_0x1dc6bc,_0x29eda1=_0x5be779['str'](_0x515050(0xa7)),_0x1ccd73=_0x3a36c7[_0x515050(0xa5)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5be779[_0x515050(0xc7)](_0x515050(0xbb)))):parseJsonParams(_0x5be779[_0x515050(0xc7)](_0x515050(0xbb)))??{},_0x3b7e3e=Date[_0x515050(0xa9)](),_0x41873e=await executeData(_0x29eda1,_0x3a36c7[_0x515050(0xa5)],_0x1ccd73),_0x57b62a=Date[_0x515050(0xa9)]()-_0x3b7e3e;return{'ok':!![],'data':{'result':_0x41873e,'elapsed':_0x57b62a},'message':_0x515050(0x92)+_0x3a36c7[_0x515050(0x8f)]+_0x515050(0x96)+_0x57b62a+'ms'};}};return _0x3a36c7['risk']!==_0x1dc6bc(0x81)&&(_0xd3b919[_0x1dc6bc(0xc2)]=async _0x3af025=>{const _0x3b85bc=_0x1dc6bc,_0x1c58b9=_0x3af025[_0x3b85bc(0xc7)](_0x3b85bc(0xa7)),_0x48626a=_0x3a36c7[_0x3b85bc(0xa5)]===_0x3b85bc(0x8b)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3af025[_0x3b85bc(0xc7)]('params'))):parseJsonParams(_0x3af025['str'](_0x3b85bc(0xbb)))??{};return dryRun(_0x3b85bc(0x83),_0x3b85bc(0xce)+_0x1c58b9+'/'+_0x3a36c7[_0x3b85bc(0xa5)])[_0x3b85bc(0xa2)](_0x48626a)[_0x3b85bc(0xaa)](_0x3b85bc(0x95)+_0x3a36c7['command']+_0x3b85bc(0xb9)+_0x1c58b9)[_0x3b85bc(0x99)]();}),_0xd3b919;}export const dataDefinitions=specs[a20_0x4dd2b9(0x91)](makeDataCommand);
|
|
1
|
+
function a23_0x2825(){const _0x4952d5=['JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\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{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','helpExtra','join','body','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','7GbIqkW','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','filter','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20PARAMS\x20STRUCTURE','POST','\x20\x20EXAMPLES','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','create','\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{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','write','getOne','description','76716pKilKM','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','update','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','paramsHint','354693wYqFnu','risk','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','data','766300CTyRdO','123158QHNHkV','\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}]','command','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','2728935StbEdo','\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\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','8CFlwQj','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\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}}','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\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}}','data\x20','Get\x20a\x20single\x20record\x20by\x20ID','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','627840ImRGzr','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20PAGINATION','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\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$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]}}','params','batchCreate','193988OkWBJB','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Update\x20an\x20existing\x20record','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','map','\x20on\x20dataset\x20','\x20completed\x20in\x20','str','now','\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\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','read','\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{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','high-risk-write','\x20\x20AGGREGATE\x20TYPES','delete','\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\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','aggregate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','code','operation','\x20\x20WHERE\x20OPERATORS','\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}}','build','\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\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','/api/{appCode}/'];a23_0x2825=function(){return _0x4952d5;};return a23_0x2825();}const a23_0x3b7df1=a23_0x1720;(function(_0x465826,_0x358121){const _0x3eca35=a23_0x1720,_0x2fc987=_0x465826();while(!![]){try{const _0x2d0336=-parseInt(_0x3eca35(0x1b4))/0x1+parseInt(_0x3eca35(0x1cc))/0x2+parseInt(_0x3eca35(0x1ae))/0x3+parseInt(_0x3eca35(0x1b3))/0x4+parseInt(_0x3eca35(0x1c4))/0x5+parseInt(_0x3eca35(0x1a6))/0x6*(parseInt(_0x3eca35(0x1f0))/0x7)+-parseInt(_0x3eca35(0x1bb))/0x8*(parseInt(_0x3eca35(0x1b8))/0x9);if(_0x2d0336===_0x358121)break;else _0x2fc987['push'](_0x2fc987['shift']());}catch(_0x3c1ffc){_0x2fc987['push'](_0x2fc987['shift']());}}}(a23_0x2825,0x1cffd));import{executeData}from'../../core/sdk-client.js';function a23_0x1720(_0x46bb9c,_0x4ff748){_0x46bb9c=_0x46bb9c-0x1a3;const _0x2825c7=a23_0x2825();let _0x17207c=_0x2825c7[_0x46bb9c];return _0x17207c;}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':a23_0x3b7df1(0x1f2),'operation':a23_0x3b7df1(0x1f2),'risk':a23_0x3b7df1(0x1d7),'paramsRequired':![],'description':a23_0x3b7df1(0x1ea),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a23_0x3b7df1(0x1fa),'helpExtra':[a23_0x3b7df1(0x1e2),a23_0x3b7df1(0x1bd),'\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}}',a23_0x3b7df1(0x1e3),a23_0x3b7df1(0x1dc),a23_0x3b7df1(0x1b9),'\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}}',a23_0x3b7df1(0x1c9),a23_0x3b7df1(0x1e5),a23_0x3b7df1(0x1f4),a23_0x3b7df1(0x1c0),'',a23_0x3b7df1(0x1c5),a23_0x3b7df1(0x1b0),a23_0x3b7df1(0x1bf),'',a23_0x3b7df1(0x1a7),a23_0x3b7df1(0x1b1),a23_0x3b7df1(0x1d5),a23_0x3b7df1(0x1b5),a23_0x3b7df1(0x1ee),a23_0x3b7df1(0x1dd),'',a23_0x3b7df1(0x1c6),a23_0x3b7df1(0x1ab),a23_0x3b7df1(0x1ac),a23_0x3b7df1(0x1bc)]['join']('\x0a')},{'command':a23_0x3b7df1(0x1a4),'operation':a23_0x3b7df1(0x1a4),'risk':a23_0x3b7df1(0x1d7),'paramsRequired':!![],'description':a23_0x3b7df1(0x1c2),'paramsHint':a23_0x3b7df1(0x1ef)},{'command':a23_0x3b7df1(0x1fb),'operation':a23_0x3b7df1(0x1fb),'risk':a23_0x3b7df1(0x1a3),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a23_0x3b7df1(0x1e8)},{'command':a23_0x3b7df1(0x1cb),'operation':a23_0x3b7df1(0x1cb),'risk':a23_0x3b7df1(0x1a3),'paramsRequired':!![],'description':a23_0x3b7df1(0x1a8),'paramsHint':a23_0x3b7df1(0x1f6)},{'command':a23_0x3b7df1(0x1a9),'operation':'update','risk':a23_0x3b7df1(0x1a3),'paramsRequired':!![],'description':a23_0x3b7df1(0x1ce),'paramsHint':a23_0x3b7df1(0x1cf)},{'command':a23_0x3b7df1(0x1db),'operation':a23_0x3b7df1(0x1db),'risk':a23_0x3b7df1(0x1d9),'paramsRequired':!![],'description':a23_0x3b7df1(0x1be),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a23_0x3b7df1(0x1de),'operation':a23_0x3b7df1(0x1de),'risk':a23_0x3b7df1(0x1d7),'paramsRequired':![],'description':a23_0x3b7df1(0x1c3),'paramsHint':a23_0x3b7df1(0x1aa)+a23_0x3b7df1(0x1cd),'helpExtra':[a23_0x3b7df1(0x1da),a23_0x3b7df1(0x1e6),a23_0x3b7df1(0x1f3),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a23_0x3b7df1(0x1fc),'\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{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}',a23_0x3b7df1(0x1d8),a23_0x3b7df1(0x1e9),'',a23_0x3b7df1(0x1f7),a23_0x3b7df1(0x1ba),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a23_0x3b7df1(0x1df),a23_0x3b7df1(0x1b7),a23_0x3b7df1(0x1c7),a23_0x3b7df1(0x1f1),'',a23_0x3b7df1(0x1f9),a23_0x3b7df1(0x1f5),a23_0x3b7df1(0x1d6),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a23_0x3b7df1(0x1c8),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a23_0x3b7df1(0x1ec)]('\x0a')}];function makeDataCommand(_0x130d5f){const _0x41dbb9=a23_0x3b7df1,_0x5b6137='data\x20'+_0x130d5f[_0x41dbb9(0x1b6)],_0x1a6fc6={'service':_0x41dbb9(0x1b2),'command':_0x130d5f['command'],'description':_0x130d5f['description'],'risk':_0x130d5f['risk'],'helpExtra':_0x130d5f[_0x41dbb9(0x1eb)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x130d5f[_0x41dbb9(0x1ad)]}],'validate':async _0x5da903=>{const _0x4f322d=_0x41dbb9;_0x130d5f['paramsRequired']&&requireAnyOf(_0x5da903,['params'],_0x5b6137),_0x130d5f[_0x4f322d(0x1e1)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5da903[_0x4f322d(0x1d3)]('params')));},async 'execute'(_0x1dcd60){const _0x4235ef=_0x41dbb9,_0x40bc31=_0x1dcd60['str'](_0x4235ef(0x1e0)),_0x441e50=_0x130d5f['operation']===_0x4235ef(0x1cb)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1dcd60[_0x4235ef(0x1d3)](_0x4235ef(0x1ca)))):parseJsonParams(_0x1dcd60['str'](_0x4235ef(0x1ca)))??{},_0x2c64f9=Date['now'](),_0x1ab935=await executeData(_0x40bc31,_0x130d5f[_0x4235ef(0x1e1)],_0x441e50),_0x511690=Date[_0x4235ef(0x1d4)]()-_0x2c64f9;return{'ok':!![],'data':{'result':_0x1ab935,'elapsed':_0x511690},'message':_0x4235ef(0x1c1)+_0x130d5f[_0x4235ef(0x1b6)]+_0x4235ef(0x1d2)+_0x511690+'ms'};}};return _0x130d5f[_0x41dbb9(0x1af)]!==_0x41dbb9(0x1d7)&&(_0x1a6fc6['dryRun']=async _0x89d396=>{const _0x1d1c8b=_0x41dbb9,_0x5e2bb2=_0x89d396[_0x1d1c8b(0x1d3)](_0x1d1c8b(0x1e0)),_0xa53130=_0x130d5f[_0x1d1c8b(0x1e1)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x89d396[_0x1d1c8b(0x1d3)](_0x1d1c8b(0x1ca)))):parseJsonParams(_0x89d396[_0x1d1c8b(0x1d3)](_0x1d1c8b(0x1ca)))??{};return dryRun(_0x1d1c8b(0x1f8),_0x1d1c8b(0x1e7)+_0x5e2bb2+'/'+_0x130d5f['operation'])[_0x1d1c8b(0x1ed)](_0xa53130)[_0x1d1c8b(0x1a5)]('Preview:\x20data\x20'+_0x130d5f[_0x1d1c8b(0x1b6)]+_0x1d1c8b(0x1d1)+_0x5e2bb2)[_0x1d1c8b(0x1e4)]();}),_0x1a6fc6;}export const dataDefinitions=specs[a23_0x3b7df1(0x1d0)](makeDataCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x407ca2=a24_0x2c23;(function(_0x2d7c2b,_0x4e9ad1){const _0x22b73f=a24_0x2c23,_0x395d69=_0x2d7c2b();while(!![]){try{const _0x4a4ded=parseInt(_0x22b73f(0xb5))/0x1*(parseInt(_0x22b73f(0xea))/0x2)+parseInt(_0x22b73f(0xd1))/0x3*(-parseInt(_0x22b73f(0xe3))/0x4)+-parseInt(_0x22b73f(0xda))/0x5+parseInt(_0x22b73f(0xdd))/0x6*(-parseInt(_0x22b73f(0xcb))/0x7)+-parseInt(_0x22b73f(0xec))/0x8+parseInt(_0x22b73f(0xce))/0x9*(-parseInt(_0x22b73f(0xe7))/0xa)+parseInt(_0x22b73f(0xae))/0xb;if(_0x4a4ded===_0x4e9ad1)break;else _0x395d69['push'](_0x395d69['shift']());}catch(_0x1bfda5){_0x395d69['push'](_0x395d69['shift']());}}}(a24_0x191f,0xa77f7));function a24_0x2c23(_0x593ecd,_0x5332bb){_0x593ecd=_0x593ecd-0xa3;const _0x191f29=a24_0x191f();let _0x2c2378=_0x191f29[_0x593ecd];return _0x2c2378;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x2857f2){const _0x2c9c20=a24_0x2c23;if(_0x2857f2[_0x2c9c20(0xb8)])return null;const _0x518aca=Boolean(_0x2857f2['displayName']!==undefined||_0x2857f2[_0x2c9c20(0xe9)]!==undefined);let _0xf35c29={};if(!_0x518aca&&typeof _0x2857f2[_0x2c9c20(0xa6)]===_0x2c9c20(0xe1))try{_0xf35c29=JSON['parse'](_0x2857f2[_0x2c9c20(0xa6)]);}catch{}const _0x6f4d09=_0x518aca?_0x2857f2[_0x2c9c20(0xa3)]:_0x2857f2[_0x2c9c20(0xe8)],_0x41658e=_0x518aca?_0x2857f2[_0x2c9c20(0xd2)]:_0x2857f2[_0x2c9c20(0xa3)],_0x1e68cb=_0x518aca?_0x2857f2['doType']:_0x2857f2[_0x2c9c20(0xc9)]||_0x2857f2[_0x2c9c20(0xad)],_0x4c2370=_0x518aca?_0x2857f2[_0x2c9c20(0xbc)]===!![]:_0xf35c29[_0x2c9c20(0xbc)]===!![],_0x517c41=_0x518aca?_0x2857f2[_0x2c9c20(0xb1)]===!![]:_0xf35c29['required']===!![],_0x451470=_0x518aca?_0x2857f2['options']??null:_0xf35c29[_0x2c9c20(0xdc)]??null,_0x3403eb={'name':_0x6f4d09,'displayName':_0x41658e||_0x6f4d09,'type':_0x1e68cb,'dbType':_0x2857f2[_0x2c9c20(0xdb)],'pk':_0x4c2370,'required':_0x517c41,'description':_0x2857f2[_0x2c9c20(0xe0)]||undefined};return Array[_0x2c9c20(0xc6)](_0x451470)&&_0x451470[_0x2c9c20(0xba)]>0x0&&(_0x3403eb[_0x2c9c20(0xdc)]=_0x451470),_0x3403eb;}function parseJsonMaybe(_0x5a895e){const _0x41fe0b=a24_0x2c23;if(typeof _0x5a895e!==_0x41fe0b(0xe1))return _0x5a895e;try{return JSON[_0x41fe0b(0xcc)](_0x5a895e);}catch{return _0x5a895e;}}function normalizeOperationEntry(_0x2b20ce,_0x231f69){const _0x5878ac=a24_0x2c23;if(!_0x231f69||typeof _0x231f69!=='object')return null;if(!_0x231f69[_0x5878ac(0xeb)]||!_0x231f69[_0x5878ac(0xef)])return null;const _0x3ced06={'name':_0x2b20ce,'method':_0x231f69[_0x5878ac(0xeb)],'path':_0x231f69[_0x5878ac(0xef)]};if(_0x231f69[_0x5878ac(0xac)])_0x3ced06[_0x5878ac(0xac)]=_0x231f69[_0x5878ac(0xac)];if(_0x231f69[_0x5878ac(0xc7)]!=null)_0x3ced06[_0x5878ac(0xc7)]=parseJsonMaybe(_0x231f69['requestBody']);if(_0x231f69['responseBody']!=null)_0x3ced06[_0x5878ac(0xc5)]=parseJsonMaybe(_0x231f69[_0x5878ac(0xc5)]);if(_0x231f69[_0x5878ac(0xbe)]!=null)_0x3ced06['beforeScriptId']=_0x231f69[_0x5878ac(0xbe)];if(_0x231f69[_0x5878ac(0xe5)]!=null)_0x3ced06[_0x5878ac(0xe5)]=_0x231f69[_0x5878ac(0xe5)];if(Array[_0x5878ac(0xc6)](_0x231f69[_0x5878ac(0xc2)]))_0x3ced06[_0x5878ac(0xc2)]=_0x231f69['requestFields'];if(Array[_0x5878ac(0xc6)](_0x231f69[_0x5878ac(0xb3)]))_0x3ced06[_0x5878ac(0xb3)]=_0x231f69['responseFields'];return _0x3ced06;}function summarizeDbtable(_0x32fa18){const _0x1c777d=a24_0x2c23,_0x305b0d={},_0x54ca4b=[_0x1c777d(0xd9),_0x1c777d(0xc4),_0x1c777d(0xbd),'datasetKey',_0x1c777d(0xbc),_0x1c777d(0xde),'logicField',_0x1c777d(0xca),_0x1c777d(0xc1),_0x1c777d(0xb7),_0x1c777d(0xa8),_0x1c777d(0xaa),'modifierNameField','labelField',_0x1c777d(0xc8)];for(const _0x218f34 of _0x54ca4b){if(_0x32fa18[_0x218f34]!==undefined)_0x305b0d[_0x218f34]=_0x32fa18[_0x218f34];}return typeof _0x305b0d[_0x1c777d(0xde)]===_0x1c777d(0xe1)&&_0x305b0d[_0x1c777d(0xde)][_0x1c777d(0xba)]>0x0&&(_0x305b0d[_0x1c777d(0xa9)]=_0x305b0d[_0x1c777d(0xde)]['split'](',')[_0x1c777d(0xa7)](_0x5d24cd=>_0x5d24cd[_0x1c777d(0xcf)]())['filter'](Boolean)),_0x305b0d;}function normalizeRelatedPages(_0xb32f78){const _0x33ccba=a24_0x2c23;if(!Array[_0x33ccba(0xc6)](_0xb32f78))return[];return _0xb32f78[_0x33ccba(0xd7)](_0x4c35bc=>_0x4c35bc&&typeof _0x4c35bc===_0x33ccba(0xb6))[_0x33ccba(0xa7)](_0xb87fd5=>({'id':_0xb87fd5['id'],'type':_0xb87fd5['type'],'code':_0xb87fd5[_0x33ccba(0xe8)],'title':_0xb87fd5[_0x33ccba(0xbb)],'deleted':_0xb87fd5['deleted']===!![]}));}function normalizeFallbackFieldName(_0x695bd4,_0xfa658e){const _0x5f4e15=_0x695bd4['trim']();if(!_0x5f4e15)return null;return{'name':_0x5f4e15,'displayName':_0x5f4e15,'type':undefined,'dbType':undefined,'pk':_0x5f4e15===_0xfa658e,'required':![],'description':undefined};}async function loadListFieldFallback(_0x6b4b45,_0x1fd244){const _0xf82af6=a24_0x2c23;if(!_0x6b4b45||!_0x1fd244)return[];try{const _0x4ee7e0=await listDatasets(_0x6b4b45,{'code':_0x1fd244}),_0x3d192e=_0x4ee7e0[_0xf82af6(0xc0)](_0x152a71=>_0x152a71[_0xf82af6(0xe8)]===_0x1fd244)??_0x4ee7e0[0x0],_0x3e434d=_0x3d192e?.[_0xf82af6(0xe6)]??{},_0x350399=typeof _0x3e434d['allFields']===_0xf82af6(0xe1)?_0x3e434d[_0xf82af6(0xde)]['split'](','):[];return _0x350399[_0xf82af6(0xa7)](_0x26000b=>normalizeFallbackFieldName(_0x26000b,_0x3e434d[_0xf82af6(0xbc)]))[_0xf82af6(0xd7)](_0x40cd3f=>_0x40cd3f!==null);}catch{return[];}}function a24_0x191f(){const _0x8895c0=['2305648FzXRQB','appCode','afterScriptId','dbtableConfig','26890nubLvp','code','doType','58JKYbiH','method','5803608khhxQe','relatedPageInfoList','operations','path','name','modelId','str','extend','map','creatorNameField','allFieldNames','modifierIdField','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','host','dataType','43683849AVnXWt','validateRules','push','required','read','responseFields','doVersion','3267TOGsRW','object','creatorIdField','deleted','source','length','title','pkField','tableName','beforeScriptId','modelCode','find','updateTimeField','requestFields','formatRules','dbName','responseBody','isArray','requestBody','dblinkInfoDTO','type','createTimeField','396753xAtUst','parse','columnCodeListWithDeleted','549LgJhPP','trim','properties','3RnuDcv','displayName','dataset','sourceType','indexes','relations','filter','tableComment','dbId','4185690jKIZjL','dbType','options','114MuWifR','allFields','detail','description','string','entries'];a24_0x191f=function(){return _0x8895c0;};return a24_0x191f();}export const datasetDetail={'service':a24_0x407ca2(0xd3),'command':a24_0x407ca2(0xdf),'description':a24_0x407ca2(0xab),'risk':a24_0x407ca2(0xb2),'flags':[CODE_FLAG],async 'execute'(_0x3783c5){const _0x2c7d8e=a24_0x407ca2,_0x3a4484=await getDatasetDetail(_0x3783c5[_0x2c7d8e(0xa5)](_0x2c7d8e(0xe8))),_0x20307c=Array[_0x2c7d8e(0xc6)](_0x3a4484['fields'])?_0x3a4484['fields']:Array[_0x2c7d8e(0xc6)](_0x3a4484[_0x2c7d8e(0xd0)])?_0x3a4484[_0x2c7d8e(0xd0)]:[];let _0x2b2641=_0x20307c[_0x2c7d8e(0xa7)](_0x5d1a98=>normalizeField(_0x5d1a98))[_0x2c7d8e(0xd7)](_0x47b78f=>_0x47b78f!==null);_0x2b2641[_0x2c7d8e(0xba)]===0x0&&(_0x2b2641=await loadListFieldFallback(_0x3783c5[_0x2c7d8e(0xe4)],_0x3783c5['str']('code')));const _0x4ebbaa=_0x3a4484[_0x2c7d8e(0xee)]??{},_0xea342d=[];for(const [_0x1c0eef,_0x45a43c]of Object[_0x2c7d8e(0xe2)](_0x4ebbaa)){const _0x53c073=normalizeOperationEntry(_0x1c0eef,_0x45a43c);if(_0x53c073)_0xea342d[_0x2c7d8e(0xb0)](_0x53c073);}const _0x505fc3=_0x3a4484[_0x2c7d8e(0xe6)]??{},_0x3c882d=_0x3a4484[_0x2c7d8e(0xd3)]??{},_0xd9f139=_0x505fc3[_0x2c7d8e(0xd9)]!=null?{'id':_0x505fc3[_0x2c7d8e(0xd9)],'name':_0x505fc3['dbName']??null}:undefined;let _0x7aa89a;return typeof _0x3a4484[_0x2c7d8e(0xa6)]===_0x2c7d8e(0xe1)&&(_0x7aa89a=parseJsonMaybe(_0x3a4484[_0x2c7d8e(0xa6)])),{'ok':!![],'data':{'id':_0x3a4484[_0x2c7d8e(0xa4)]??_0x3a4484['id'],'name':_0x3a4484[_0x2c7d8e(0xa3)],'code':_0x3a4484[_0x2c7d8e(0xbf)]||_0x3a4484[_0x2c7d8e(0xe8)],'doVersion':_0x3a4484[_0x2c7d8e(0xb4)],'description':_0x3a4484[_0x2c7d8e(0xe0)]||_0x3c882d[_0x2c7d8e(0xd8)]||undefined,'source':_0x3a4484[_0x2c7d8e(0xb9)]||_0x3c882d[_0x2c7d8e(0xd4)],'table':_0x505fc3[_0x2c7d8e(0xbd)]||_0x3c882d[_0x2c7d8e(0xbd)],'datasetKey':_0x505fc3['datasetKey'],'pk':_0x505fc3['pkField'],'db':_0xd9f139,'dbtable':summarizeDbtable(_0x505fc3),'fields':_0x2b2641,'operations':_0xea342d,'indexes':Array[_0x2c7d8e(0xc6)](_0x3c882d[_0x2c7d8e(0xd5)])?_0x3c882d[_0x2c7d8e(0xd5)]:[],'relations':_0x3a4484[_0x2c7d8e(0xd6)]??null,'relatedPages':normalizeRelatedPages(_0x3a4484[_0x2c7d8e(0xed)]),...Array[_0x2c7d8e(0xc6)](_0x3a4484['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x3a4484[_0x2c7d8e(0xcd)]}:{},'formatRules':Array[_0x2c7d8e(0xc6)](_0x3a4484[_0x2c7d8e(0xc3)])?_0x3a4484[_0x2c7d8e(0xc3)]:[],'validateRules':Array[_0x2c7d8e(0xc6)](_0x3a4484[_0x2c7d8e(0xaf)])?_0x3a4484['validateRules']:[],..._0x7aa89a!==undefined?{'extend':_0x7aa89a}:{},'stats':{'fieldCount':_0x2b2641['length'],'operationCount':_0xea342d['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1471f7,_0xd2d8f0){const _0x260833=a25_0x25d6,_0x292c32=_0x1471f7();while(!![]){try{const _0x589a13=parseInt(_0x260833(0x1c0))/0x1*(parseInt(_0x260833(0x1b7))/0x2)+-parseInt(_0x260833(0x1b9))/0x3+parseInt(_0x260833(0x1bb))/0x4+parseInt(_0x260833(0x1c1))/0x5*(parseInt(_0x260833(0x1bc))/0x6)+parseInt(_0x260833(0x1ba))/0x7*(-parseInt(_0x260833(0x1b8))/0x8)+-parseInt(_0x260833(0x1bf))/0x9*(parseInt(_0x260833(0x1c2))/0xa)+parseInt(_0x260833(0x1bd))/0xb*(-parseInt(_0x260833(0x1be))/0xc);if(_0x589a13===_0xd2d8f0)break;else _0x292c32['push'](_0x292c32['shift']());}catch(_0x42d0cc){_0x292c32['push'](_0x292c32['shift']());}}}(a25_0x450e,0x7af52));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];function a25_0x25d6(_0x3d2be5,_0x5cbffd){_0x3d2be5=_0x3d2be5-0x1b7;const _0x450e76=a25_0x450e();let _0x25d6be=_0x450e76[_0x3d2be5];return _0x25d6be;}function a25_0x450e(){const _0x1877ef=['18UjjISW','1067CxrVtZ','744xckfNp','113796iPFoIU','357095hvgkCI','740085IqmIiZ','70iXvwqF','2WciQPU','432808LEbNnd','2421090xqajgl','21ntfjVC','3065372tnwiSi'];a25_0x450e=function(){return _0x1877ef;};return a25_0x450e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a26_0x4e30(){const _0x81e62c=['16038909lMKGZe','3uVJoTk','84lYQYaS','allFields','name','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','8ptrwvv','5691628KjFdvH','length','datasetKey','map','split','string','pkField','tableName','194838EtjhRm','trim','dbtableConfig','1937770qEieDj','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','941093yGkLQk','appCode','dataset','read','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','7314350OALUVI','source','38170638TSewVM','2JMlMrF','str'];a26_0x4e30=function(){return _0x81e62c;};return a26_0x4e30();}const a26_0x5a2a07=a26_0x5454;(function(_0x50846b,_0x2a7b43){const _0xe537c2=a26_0x5454,_0x103652=_0x50846b();while(!![]){try{const _0x4fef47=parseInt(_0xe537c2(0x9d))/0x1*(-parseInt(_0xe537c2(0xa5))/0x2)+-parseInt(_0xe537c2(0xa8))/0x3*(parseInt(_0xe537c2(0x90))/0x4)+parseInt(_0xe537c2(0xa2))/0x5+-parseInt(_0xe537c2(0x98))/0x6*(-parseInt(_0xe537c2(0xa9))/0x7)+parseInt(_0xe537c2(0x8f))/0x8*(-parseInt(_0xe537c2(0xa7))/0x9)+-parseInt(_0xe537c2(0x9b))/0xa+parseInt(_0xe537c2(0xa4))/0xb;if(_0x4fef47===_0x2a7b43)break;else _0x103652['push'](_0x103652['shift']());}catch(_0x23192a){_0x103652['push'](_0x103652['shift']());}}}(a26_0x4e30,0xefec6));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a26_0x5454(_0x2d4591,_0x93c940){_0x2d4591=_0x2d4591-0x8e;const _0x4e303e=a26_0x4e30();let _0x545476=_0x4e303e[_0x2d4591];return _0x545476;}export const datasetList={'service':a26_0x5a2a07(0x9f),'command':'list','description':a26_0x5a2a07(0x9c),'risk':a26_0x5a2a07(0xa0),'flags':[{'name':a26_0x5a2a07(0xab),'type':a26_0x5a2a07(0x95),'description':a26_0x5a2a07(0x8e)},{...CODE_FLAG,'required':![],'description':a26_0x5a2a07(0xa1)}],async 'execute'(_0x19ff29){const _0x4e030f=a26_0x5a2a07,_0x56d723=_0x19ff29[_0x4e030f(0xa6)](_0x4e030f(0xab)),_0x297f0e=_0x19ff29[_0x4e030f(0xa6)]('code'),_0xb9d6bd=await listDatasets(_0x19ff29[_0x4e030f(0x9e)],{..._0x56d723&&{'name':_0x56d723},..._0x297f0e&&{'code':_0x297f0e}});return{'ok':!![],'data':{'total':_0xb9d6bd[_0x4e030f(0x91)],'datasets':_0xb9d6bd['map'](_0x4f6830=>{const _0x470261=_0x4e030f,_0xbb2781=_0x4f6830[_0x470261(0x9a)]??{};return{'id':_0x4f6830['id'],'code':_0x4f6830['code'],'name':_0x4f6830['name'],'source':_0x4f6830[_0x470261(0xa3)],'description':_0x4f6830['description'],'table':_0xbb2781[_0x470261(0x97)],'datasetKey':_0xbb2781[_0x470261(0x92)],'pk':_0xbb2781[_0x470261(0x96)],'fields':_0xbb2781[_0x470261(0xaa)]?_0xbb2781['allFields'][_0x470261(0x94)](',')[_0x470261(0x93)](_0x4c2681=>_0x4c2681[_0x470261(0x99)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a27_0x3b51da=a27_0x4027;function a27_0x4027(_0x427244,_0x4827de){_0x427244=_0x427244-0xa7;const _0x588a8c=a27_0x588a();let _0x40278c=_0x588a8c[_0x427244];return _0x40278c;}(function(_0xf1b3a7,_0x3dce3c){const _0x102d26=a27_0x4027,_0x2d74c3=_0xf1b3a7();while(!![]){try{const _0x5d710a=parseInt(_0x102d26(0xa9))/0x1+parseInt(_0x102d26(0xab))/0x2*(-parseInt(_0x102d26(0xbc))/0x3)+parseInt(_0x102d26(0xb7))/0x4*(parseInt(_0x102d26(0xad))/0x5)+parseInt(_0x102d26(0xaa))/0x6*(parseInt(_0x102d26(0xb5))/0x7)+-parseInt(_0x102d26(0xb4))/0x8*(-parseInt(_0x102d26(0xac))/0x9)+-parseInt(_0x102d26(0xb1))/0xa*(parseInt(_0x102d26(0xb0))/0xb)+-parseInt(_0x102d26(0xb6))/0xc*(parseInt(_0x102d26(0xb3))/0xd);if(_0x5d710a===_0x3dce3c)break;else _0x2d74c3['push'](_0x2d74c3['shift']());}catch(_0x20b683){_0x2d74c3['push'](_0x2d74c3['shift']());}}}(a27_0x588a,0xd9956));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a27_0x3b51da(0xb9);function a27_0x588a(){const _0x2f1132=['Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','read','523302SfzOmA','sdk-doc','str','1123552zPliyE','6343842dyJneY','6GASKIq','783cmtxpG','1009990HFYSCT','string','appCode','737fjQWzv','203300bNdCgV','dataset','13366054JaerKM','37880cIAYzA','7YVppkR','12ksrAve','24QsbDSK','trim','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档'];a27_0x588a=function(){return _0x2f1132;};return a27_0x588a();}export function formatDatasetSdkMarkdown(_0x1090c7){const _0x24e75f=a27_0x3b51da,_0x27f482=typeof _0x1090c7===_0x24e75f(0xae)?_0x1090c7[_0x24e75f(0xb8)]():'';return _0x27f482||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a27_0x3b51da(0xb2),'command':a27_0x3b51da(0xa7),'description':a27_0x3b51da(0xba),'risk':a27_0x3b51da(0xbb),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x16c4eb){const _0x16882b=a27_0x3b51da,_0x22a32f=_0x16c4eb[_0x16882b(0xa8)]('code'),_0x499df4=await getDatasetSdkUsageDoc(_0x22a32f,_0x16c4eb[_0x16882b(0xaf)]);return{'ok':!![],'data':{'code':_0x22a32f,'appCode':_0x16c4eb[_0x16882b(0xaf)],'markdown':formatDatasetSdkMarkdown(_0x499df4)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a28_0x6b9900=a28_0x410f;(function(_0x58a52a,_0x56d90e){const _0x4e19d9=a28_0x410f,_0x1f0afd=_0x58a52a();while(!![]){try{const _0x74edf0=-parseInt(_0x4e19d9(0xc1))/0x1*(-parseInt(_0x4e19d9(0xd2))/0x2)+parseInt(_0x4e19d9(0x89))/0x3*(parseInt(_0x4e19d9(0xa4))/0x4)+-parseInt(_0x4e19d9(0xaa))/0x5+-parseInt(_0x4e19d9(0x8f))/0x6*(parseInt(_0x4e19d9(0x92))/0x7)+-parseInt(_0x4e19d9(0xc9))/0x8*(-parseInt(_0x4e19d9(0xa3))/0x9)+-parseInt(_0x4e19d9(0xb1))/0xa*(parseInt(_0x4e19d9(0xb7))/0xb)+parseInt(_0x4e19d9(0xb8))/0xc;if(_0x74edf0===_0x56d90e)break;else _0x1f0afd['push'](_0x1f0afd['shift']());}catch(_0x1316da){_0x1f0afd['push'](_0x1f0afd['shift']());}}}(a28_0x40b8,0x5290c));import a28_0x2cea55 from'chalk';function a28_0x410f(_0x2d578e,_0x562daa){_0x2d578e=_0x2d578e-0x85;const _0x40b88d=a28_0x40b8();let _0x410fe7=_0x40b88d[_0x2d578e];return _0x410fe7;}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';function a28_0x40b8(){const _0x4b450b=['\x20(accessKey)','✓\x20Valid\x20JSON','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','registryPath','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','1779760yYFEvw','format','empty','(none)','pageSize','appCode','11LpJUHX','5744952WnEiBk','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','env','defaultApp','✗\x20Invalid\x20JSON','read','\x20\x20runtimeDomain:\x20\x20\x20','commandCount','platform','1RKhhfo','red','bold','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','version','\x20\x20API\x20Endpoints','green','32NhMkbo','⚠\x20Empty\x20(treated\x20as\x20{})','gray','status','(not\x20set)','\x20\x20Service\x20Tree','\x20\x20Config\x20Files','serviceCode','(set,\x20length=','99074dZkBJS','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','length','(unnamed)','repeat','verbose','\x20\x20─','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','33lixzPo','yellow','padEnd','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','log','6mfRrRw','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','4183438UycvgG','currentApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20Imported\x20from:\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','check','Project','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','message','(removed\x20—\x20cookie\x20auth\x20disabled)','(not\x20found)','\x20(legacy/compat\x20only)','path','1318887wzvbMD','65408JTkcup','(default:\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','serviceCount','\x20doctor','902645eCIVmc'];a28_0x40b8=function(){return _0x4b450b;};return a28_0x40b8();}import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x5077ed){const _0x457f13=a28_0x410f,_0x545227=getCliVersion(),_0x5e5658=buildConfigFromFlags({});await initGlobalEnvironment(_0x5e5658),console[_0x457f13(0x8e)](),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xc3)](CLI_BIN_NAME+_0x457f13(0xa9))),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xcb)]('─'['repeat'](0x32))),console[_0x457f13(0x8e)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x545227),console['log'](_0x457f13(0x97)+process[_0x457f13(0xc6)]),console[_0x457f13(0x8e)](_0x457f13(0x99)+process[_0x457f13(0xc0)]+'\x20'+process[_0x457f13(0x9d)]),console['log'](),console[_0x457f13(0x8e)](a28_0x2cea55['bold'](_0x457f13(0xcf))),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0x85)[_0x457f13(0xd6)](0x1e)));const _0x181764=getGlobalConfigPath(),_0x5c2c9e=getProjectConfigPath();console[_0x457f13(0x8e)](_0x457f13(0x90)+(_0x181764||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xa0)))),console['log'](_0x457f13(0xad)+(_0x5c2c9e||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xa0)))),console[_0x457f13(0x8e)](),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xc3)]('\x20\x20Config\x20JSON')),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0x85)[_0x457f13(0xd6)](0x1e)));const _0x147b0c=(_0x438314,_0x5a0f81)=>{const _0x19a261=_0x457f13;if(!_0x5a0f81){console[_0x19a261(0x8e)]('\x20\x20'+_0x438314[_0x19a261(0x8b)](0x11)+'\x20'+a28_0x2cea55['gray']('(no\x20file)'));return;}const _0x91cb22=inspectCliConfigJsonFile(_0x5a0f81);if(_0x91cb22[_0x19a261(0xcc)]==='ok')console['log']('\x20\x20'+_0x438314['padEnd'](0x11)+'\x20'+a28_0x2cea55['green'](_0x19a261(0xac)));else{if(_0x91cb22['status']==='empty')console[_0x19a261(0x8e)]('\x20\x20'+_0x438314[_0x19a261(0x8b)](0x11)+'\x20'+a28_0x2cea55[_0x19a261(0x8a)](_0x19a261(0xca)));else _0x91cb22['status']==='missing'?console[_0x19a261(0x8e)]('\x20\x20'+_0x438314[_0x19a261(0x8b)](0x11)+'\x20'+a28_0x2cea55[_0x19a261(0xcb)]('(missing)')):(console[_0x19a261(0x8e)]('\x20\x20'+_0x438314[_0x19a261(0x8b)](0x11)+'\x20'+a28_0x2cea55[_0x19a261(0xc2)](_0x19a261(0xbc))),console[_0x19a261(0x8e)]('\x20\x20'+''[_0x19a261(0x8b)](0x11)+'\x20'+a28_0x2cea55[_0x19a261(0xc2)](_0x91cb22[_0x19a261(0x9e)])));}};_0x147b0c('Global',_0x181764),_0x147b0c(_0x457f13(0x9b),_0x5c2c9e),console['log'](),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xc3)]('\x20\x20Merged\x20Config')),console['log'](a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0x85)[_0x457f13(0xd6)](0x1e))),console[_0x457f13(0x8e)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5e5658[_0x457f13(0xb6)]||a28_0x2cea55[_0x457f13(0xc2)](_0x457f13(0xcd)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5e5658[_0x457f13(0xba)]);const _0x4657f4=isLegacyCompatConfigKey('locale')?a28_0x2cea55[_0x457f13(0xcb)](_0x5e5658['locale']+_0x457f13(0xa1)):_0x5e5658[_0x457f13(0xc5)];console[_0x457f13(0x8e)](_0x457f13(0x87)+_0x4657f4),console[_0x457f13(0x8e)](_0x457f13(0xb0)+(_0x5e5658[_0x457f13(0xbb)]||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xb4)))),console[_0x457f13(0x8e)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5e5658[_0x457f13(0x93)]||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xb4)))),console[_0x457f13(0x8e)](_0x457f13(0xc4)+(_0x5e5658[_0x457f13(0xb2)]||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xa5)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5e5658[_0x457f13(0xb5)]??a28_0x2cea55[_0x457f13(0xcb)]('(default)'))),console[_0x457f13(0x8e)](_0x457f13(0x91)+_0x5e5658[_0x457f13(0x88)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5e5658[_0x457f13(0xd7)]),console[_0x457f13(0x8e)](_0x457f13(0xae)+AUTH_MODE[_0x457f13(0x98)]),console[_0x457f13(0x8e)](_0x457f13(0xd3)+(_0x5e5658[_0x457f13(0x8d)]?a28_0x2cea55[_0x457f13(0xc8)](_0x457f13(0xd1)+_0x5e5658[_0x457f13(0x8d)][_0x457f13(0xd4)]+')'):a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xb4)))),console[_0x457f13(0x8e)](),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xc3)](_0x457f13(0xc7))),console['log'](a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0x85)[_0x457f13(0xd6)](0x1e))),console[_0x457f13(0x8e)](_0x457f13(0xb9)+getApiDomain()),console[_0x457f13(0x8e)](_0x457f13(0x96)+getUserDomain()),console[_0x457f13(0x8e)](_0x457f13(0xbe)+getRuntimeDomain()),console['log'](),console[_0x457f13(0x8e)](a28_0x2cea55[_0x457f13(0xc3)](_0x457f13(0xce))),console[_0x457f13(0x8e)](a28_0x2cea55['gray'](_0x457f13(0x85)[_0x457f13(0xd6)](0x1e)));const _0x5e2da1=inspectServiceRegistry();console[_0x457f13(0x8e)](_0x457f13(0x8c)+_0x5e2da1[_0x457f13(0xaf)]),console['log'](_0x457f13(0x9c)+formatServiceRegistryStatus(_0x5e2da1)),console['log']('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5e2da1[_0x457f13(0xa8)]),console['log'](_0x457f13(0x86)+_0x5e2da1['commandCount']);for(const _0x1bce5f of _0x5e2da1['services']){console[_0x457f13(0x8e)]('\x20\x20'+(_0x1bce5f[_0x457f13(0xd0)]+':')[_0x457f13(0x8b)](0x11)+'\x20'+(_0x1bce5f['name']||a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0xd5)))+'\x20('+_0x1bce5f[_0x457f13(0xbf)]+'\x20commands)'),console[_0x457f13(0x8e)]('\x20\x20'+''[_0x457f13(0x8b)](0x11)+_0x457f13(0x95)+_0x1bce5f['source'][_0x457f13(0xa2)]);}return console[_0x457f13(0x8e)](),console[_0x457f13(0x8e)](a28_0x2cea55['bold']('\x20\x20Auth')),console['log'](a28_0x2cea55[_0x457f13(0xcb)]('\x20\x20─'[_0x457f13(0xd6)](0x1e))),console[_0x457f13(0x8e)](_0x457f13(0xa6)+a28_0x2cea55['green'](AUTH_MODE[_0x457f13(0x98)]+_0x457f13(0xab))),console['log']('\x20\x20Session\x20check:\x20\x20\x20'+a28_0x2cea55[_0x457f13(0xcb)](_0x457f13(0x9f))),console[_0x457f13(0x8e)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x4bc3ef){const _0xb350c=a28_0x410f;if(_0x4bc3ef[_0xb350c(0xcc)]==='ok')return a28_0x2cea55[_0xb350c(0xc8)]('✓\x20Loaded');if(_0x4bc3ef[_0xb350c(0xcc)]===_0xb350c(0xa7))return a28_0x2cea55['gray'](_0xb350c(0xa0));if(_0x4bc3ef['status']===_0xb350c(0xb3))return a28_0x2cea55[_0xb350c(0x8a)]('⚠\x20Empty');return a28_0x2cea55[_0xb350c(0xc2)]('✗\x20Invalid'+(_0x4bc3ef[_0xb350c(0x9e)]?':\x20'+_0x4bc3ef[_0xb350c(0x9e)]:''));}export const doctorDefinition={'service':'doctor','command':a28_0x6b9900(0x9a),'description':a28_0x6b9900(0x94),'risk':a28_0x6b9900(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x55fb77=a26_0x5ad1;(function(_0x309c56,_0x3ee1f2){const _0x48c319=a26_0x5ad1,_0x196562=_0x309c56();while(!![]){try{const _0x4f77b1=-parseInt(_0x48c319(0xdd))/0x1+-parseInt(_0x48c319(0xc9))/0x2*(-parseInt(_0x48c319(0xc3))/0x3)+-parseInt(_0x48c319(0xc6))/0x4+-parseInt(_0x48c319(0xd1))/0x5*(parseInt(_0x48c319(0xee))/0x6)+-parseInt(_0x48c319(0xca))/0x7+parseInt(_0x48c319(0xd8))/0x8*(parseInt(_0x48c319(0xbe))/0x9)+parseInt(_0x48c319(0xf1))/0xa;if(_0x4f77b1===_0x3ee1f2)break;else _0x196562['push'](_0x196562['shift']());}catch(_0xde06){_0x196562['push'](_0x196562['shift']());}}}(a26_0x143f,0xa6b8c));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';function a26_0x5ad1(_0x5d70dc,_0x148e97){_0x5d70dc=_0x5d70dc-0xb3;const _0x143fc4=a26_0x143f();let _0x5ad1eb=_0x143fc4[_0x5d70dc];return _0x5ad1eb;}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';function a26_0x143f(){const _0x261f48=['7525260fqYYfz','app','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',')\x20instead\x20of\x20project','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','\x20already\x20exists.\x20Overwrite?','Target\x20environment\x20(default\x20','apps','boolean','toLowerCase','race','includes','Source\x20file\x20not\x20found:\x20','cwd','join','validation','AbortPrompt','utf8','1278znwmBQ','):\x20','Skip\x20confirmation\x20when\x20overwriting','Invalid\x20env\x20\x22','[y/N]','12777XunNra','\x20\x20appcode:\x20','Usage:\x20','1895192pDNRSu','\x22.\x20Allowed:\x20','riskLevel','578xFXEMF','3058349dDfIwy','parse','Imported\x20from\x20','defaultApp','project','close','string','103675gDThRq','Override\x20imported\x20default\x20appcode','trim','log','yes','env','Aborted.','63352bkGtKA','appcode','SIGINT','message','removeListener','1244723aBWUSm','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`.','\x20\x20default:\x20','\x20\x20config:\x20\x20','question','App\x20code\x20for\x20the\x20project','App\x20code\x20cannot\x20be\x20empty.','entries','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','stdout','User\x20aborted\x20prompt','newConfigFileName','Override\x20imported\x20default\x20env','Write\x20to\x20global\x20(~/','Failed\x20to\x20parse\x20source\x20file:\x20','\x20\x20env:\x20\x20\x20\x20\x20','[Y/n]','78IWZAiw','App\x20code','global'];a26_0x143f=function(){return _0x261f48;};return a26_0x143f();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a26_0x55fb77(0xd0),'description':a26_0x55fb77(0xe2)},{'name':a26_0x55fb77(0xd6),'type':a26_0x55fb77(0xd0),'description':a26_0x55fb77(0xf7)+DEFAULT_CONFIG_VALUES[a26_0x55fb77(0xd6)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a26_0x55fb77(0xea)+PRODUCT_CONFIG[a26_0x55fb77(0xe8)]+a26_0x55fb77(0xf4),'default':![]},{'name':a26_0x55fb77(0xd5),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':'file','type':a26_0x55fb77(0xd0),'description':a26_0x55fb77(0xf5),'required':!![]},{'name':a26_0x55fb77(0xd9),'type':a26_0x55fb77(0xd0),'description':a26_0x55fb77(0xd2)},{'name':a26_0x55fb77(0xd6),'type':'string','description':a26_0x55fb77(0xe9),'enum':[...RUNTIME_ENV_VALUES]},{'name':a26_0x55fb77(0xf0),'type':a26_0x55fb77(0xb4),'description':a26_0x55fb77(0xea)+PRODUCT_CONFIG[a26_0x55fb77(0xe8)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a26_0x55fb77(0xb4),'description':a26_0x55fb77(0xc0),'default':![]}];export async function runInit(_0x38113a){const _0xc6dc02=a26_0x55fb77,_0x2baeeb=isNonInteractiveMode(_0x38113a),_0x2fa80d=_0x38113a[_0xc6dc02(0xf0)]?_0xc6dc02(0xf0):'project',_0x49ad41=resolveWriteConfigPath(_0x2fa80d);try{_0x2baeeb?await runNonInteractive(_0x38113a,_0x49ad41):await runInteractive(_0x38113a,_0x49ad41);}catch(_0x11fe97){if(_0x11fe97 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x11fe97;}}export async function runInitImport(_0x3e352a){const _0xb4a732=a26_0x55fb77,_0x464c89=_0x3e352a[_0xb4a732(0xf0)]?_0xb4a732(0xf0):_0xb4a732(0xce),_0x3b852b=resolveWriteConfigPath(_0x464c89);await runFromImport(_0x3e352a,_0x3b852b);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x3e5a0a,_0x4ef05d){const _0x3badd9=a26_0x55fb77,_0xf85415=resolveFilePath(_0x3e5a0a['file']);if(!existsSync(_0xf85415))throw CliErrors['validation'](_0x3badd9(0xb8)+_0xf85415);const _0x3fd139=readSourceFile(_0xf85415),_0x84f467=convertToRuntimeConfig(_0x3fd139);_0x3e5a0a[_0x3badd9(0xd9)]&&(_0x84f467[_0x3badd9(0xd9)]=String(_0x3e5a0a['appcode']));_0x3e5a0a[_0x3badd9(0xd6)]&&(_0x84f467[_0x3badd9(0xd6)]=resolveInitEnv(_0x3e5a0a));if(!_0x84f467[_0x3badd9(0xd9)])throw CliErrors[_0x3badd9(0xbb)](_0x3badd9(0xf3),_0x3badd9(0xde));await writeInitConfig(_0x4ef05d,_0x84f467,_0x3e5a0a),console[_0x3badd9(0xd4)](_0x3badd9(0xcc)+_0xf85415),console[_0x3badd9(0xd4)](_0x3badd9(0xe0)+_0x4ef05d),console[_0x3badd9(0xd4)]('\x20\x20appcode:\x20'+_0x84f467[_0x3badd9(0xd9)]);if(_0x84f467[_0x3badd9(0xcd)])console[_0x3badd9(0xd4)](_0x3badd9(0xdf)+_0x84f467['defaultApp']);}function convertToRuntimeConfig(_0x395aa6){const _0x1dc7c6=a26_0x55fb77;if(_0x395aa6[_0x1dc7c6(0xb3)]&&typeof _0x395aa6['apps']==='object')throw CliErrors[_0x1dc7c6(0xbb)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x1dc7c6(0xe5));const _0x66bb7c={};for(const _0x7462d7 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x395aa6[_0x7462d7]!==undefined&&(_0x66bb7c[_0x7462d7]=_0x395aa6[_0x7462d7]);}return!_0x66bb7c['riskLevel']&&(_0x66bb7c[_0x1dc7c6(0xc8)]=DEFAULT_CONFIG_VALUES[_0x1dc7c6(0xc8)]),_0x66bb7c;}async function runNonInteractive(_0x52397a,_0x323c74){const _0x488c2b=a26_0x55fb77,_0x56c0e7=_0x52397a['appcode'];if(!_0x56c0e7)throw CliErrors['flagMissing'](_0x488c2b(0xd9),_0x488c2b(0xc5)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x5be52e=resolveInitEnv(_0x52397a);await writeInitConfig(_0x323c74,{'appcode':_0x56c0e7,'env':_0x5be52e},_0x52397a),console[_0x488c2b(0xd4)]('Initialized\x20'+_0x323c74),console['log'](_0x488c2b(0xc4)+_0x56c0e7),console['log'](_0x488c2b(0xec)+_0x5be52e);}async function runInteractive(_0x6563d2,_0x38ab57){const _0x9f119d=a26_0x55fb77,_0x549325=loadExisting(_0x38ab57),_0xc23c5=typeof _0x549325?.[_0x9f119d(0xd9)]===_0x9f119d(0xd0)?_0x549325[_0x9f119d(0xd9)]:'',_0x5bf1b5=resolveInitEnv(_0x6563d2);console['log'](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0x38ab57)&&!_0x6563d2[_0x9f119d(0xd5)]){const _0x13f661=await promptYesNo('File\x20'+_0x38ab57+_0x9f119d(0xf6),![]);if(!_0x13f661){console[_0x9f119d(0xd4)](_0x9f119d(0xd7));return;}}const _0xb5ebc3=typeof _0x6563d2[_0x9f119d(0xd9)]===_0x9f119d(0xd0)?_0x6563d2[_0x9f119d(0xd9)][_0x9f119d(0xd3)]():'';let _0x116634=_0xb5ebc3;!_0x116634&&(_0x116634=await promptInput(_0x9f119d(0xef),_0xc23c5));if(!_0x116634[_0x9f119d(0xd3)]())throw CliErrors[_0x9f119d(0xbb)](_0x9f119d(0xe3));await writeInitConfig(_0x38ab57,{'appcode':_0x116634[_0x9f119d(0xd3)](),'env':_0x5bf1b5},_0x6563d2),console[_0x9f119d(0xd4)]('\x0aInitialized\x20'+_0x38ab57),console[_0x9f119d(0xd4)](_0x9f119d(0xc4)+_0x116634[_0x9f119d(0xd3)]()),console['log'](_0x9f119d(0xec)+_0x5bf1b5);}async function writeInitConfig(_0x3aa10e,_0x431aec,_0x225f83){const _0x3121dc=a26_0x55fb77;let _0x24a0f9={};existsSync(_0x3aa10e)&&!_0x225f83[_0x3121dc(0xd5)]&&(_0x24a0f9=readConfigFile(_0x3aa10e));for(const [_0x780a6a,_0x4964d3]of Object[_0x3121dc(0xe4)](_0x431aec)){_0x4964d3!==undefined&&(_0x24a0f9[_0x780a6a]=_0x4964d3);}if(_0x24a0f9[_0x3121dc(0xf2)])delete _0x24a0f9[_0x3121dc(0xf2)];writeConfigFile(_0x3aa10e,_0x24a0f9);}class AbortPrompt extends Error{constructor(){const _0x49e9ad=a26_0x55fb77;super(_0x49e9ad(0xe7)),this['name']=_0x49e9ad(0xbc);}}function createSafeRl(){const _0x139988=a26_0x55fb77,_0x20cabb=createInterface({'input':process['stdin'],'output':process[_0x139988(0xe6)]});let _0x5607db;const _0x4b5b26=new Promise((_0x346446,_0x4ab9e2)=>{const _0x5f0b5c=_0x139988;_0x5607db=()=>{const _0x2dc874=a26_0x5ad1;_0x5607db&&(_0x20cabb[_0x2dc874(0xdc)](_0x2dc874(0xda),_0x5607db),_0x5607db=undefined);try{_0x20cabb[_0x2dc874(0xcf)]();}catch{}_0x4ab9e2(new AbortPrompt());},_0x20cabb['once'](_0x5f0b5c(0xda),_0x5607db);}),_0x45e6ec=()=>{const _0x516411=_0x139988;_0x5607db&&(_0x20cabb[_0x516411(0xdc)](_0x516411(0xda),_0x5607db),_0x5607db=undefined);try{_0x20cabb[_0x516411(0xcf)]();}catch{}};return{'rl':_0x20cabb,'abortPromise':_0x4b5b26,'disposeSuccess':_0x45e6ec};}async function promptInput(_0x16f3d5,_0x44c42e){const _0x2f81da=a26_0x55fb77,{rl:_0x24b440,abortPromise:_0x277de1,disposeSuccess:_0x10f910}=createSafeRl(),_0x245304=new Promise(_0x91946d=>{const _0x32a3f1=a26_0x5ad1,_0x3905b6=_0x44c42e?'\x20\x20'+_0x16f3d5+'\x20('+_0x44c42e+_0x32a3f1(0xbf):'\x20\x20'+_0x16f3d5+':\x20';_0x24b440[_0x32a3f1(0xe1)](_0x3905b6,_0x28148c=>{const _0x215fcd=_0x32a3f1;_0x10f910(),_0x91946d(_0x28148c[_0x215fcd(0xd3)]()||_0x44c42e);});});return Promise[_0x2f81da(0xb6)]([_0x245304,_0x277de1]);}async function promptYesNo(_0x2cd094,_0x55fbcd){const _0x5efdae=a26_0x55fb77,{rl:_0x452bb5,abortPromise:_0x69ec68,disposeSuccess:_0x2e9bc1}=createSafeRl(),_0x2d7313=new Promise(_0x516bbb=>{const _0x4774d2=a26_0x5ad1,_0x3d4468=_0x55fbcd?_0x4774d2(0xed):_0x4774d2(0xc2);_0x452bb5['question']('\x20\x20'+_0x2cd094+'\x20'+_0x3d4468+':\x20',_0x54eccd=>{const _0x3b07e0=_0x4774d2;_0x2e9bc1();const _0x31afeb=_0x54eccd['trim']()[_0x3b07e0(0xb5)]();if(_0x31afeb==='y'||_0x31afeb==='yes')_0x516bbb(!![]);else{if(_0x31afeb==='n'||_0x31afeb==='no')_0x516bbb(![]);else _0x516bbb(_0x55fbcd);}});});return Promise[_0x5efdae(0xb6)]([_0x2d7313,_0x69ec68]);}function loadExisting(_0xa4502b){if(!existsSync(_0xa4502b))return null;return readConfigFile(_0xa4502b);}function resolveFilePath(_0x4d0475){const _0x3ac06e=a26_0x55fb77;return isAbsolute(_0x4d0475)?_0x4d0475:resolve(process[_0x3ac06e(0xb9)](),_0x4d0475);}function readSourceFile(_0x4951c1){const _0x4572ab=a26_0x55fb77;try{const _0x1e12db=readFileSync(_0x4951c1,{'encoding':_0x4572ab(0xbd)});return JSON[_0x4572ab(0xcb)](_0x1e12db);}catch(_0x54236a){throw CliErrors[_0x4572ab(0xbb)](_0x4572ab(0xeb)+_0x54236a[_0x4572ab(0xdb)]);}}function resolveInitEnv(_0x1e50e2){const _0x249a73=a26_0x55fb77,_0x5f383a=_0x1e50e2[_0x249a73(0xd6)];if(_0x5f383a===undefined||_0x5f383a==='')return DEFAULT_CONFIG_VALUES[_0x249a73(0xd6)];if(!RUNTIME_ENV_VALUES[_0x249a73(0xb7)](_0x5f383a))throw CliErrors[_0x249a73(0xbb)](_0x249a73(0xc1)+_0x5f383a+_0x249a73(0xc7)+RUNTIME_ENV_VALUES[_0x249a73(0xba)](',\x20'));return _0x5f383a;}
|
|
1
|
+
const a29_0x518a48=a29_0x2817;(function(_0x2a5173,_0x109033){const _0x103f6f=a29_0x2817,_0x651917=_0x2a5173();while(!![]){try{const _0xf0d85e=-parseInt(_0x103f6f(0x17d))/0x1*(parseInt(_0x103f6f(0x167))/0x2)+-parseInt(_0x103f6f(0x170))/0x3+parseInt(_0x103f6f(0x178))/0x4*(parseInt(_0x103f6f(0x19a))/0x5)+parseInt(_0x103f6f(0x19b))/0x6+-parseInt(_0x103f6f(0x194))/0x7*(-parseInt(_0x103f6f(0x179))/0x8)+parseInt(_0x103f6f(0x169))/0x9*(parseInt(_0x103f6f(0x16a))/0xa)+-parseInt(_0x103f6f(0x15d))/0xb;if(_0xf0d85e===_0x109033)break;else _0x651917['push'](_0x651917['shift']());}catch(_0x310a92){_0x651917['push'](_0x651917['shift']());}}}(a29_0x3d9f,0x40fdb));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a29_0x518a48(0x172),'type':'string','description':a29_0x518a48(0x173)},{'name':a29_0x518a48(0x15a),'type':a29_0x518a48(0x161),'description':a29_0x518a48(0x18e)+DEFAULT_CONFIG_VALUES[a29_0x518a48(0x15a)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a29_0x518a48(0x195),'type':a29_0x518a48(0x16d),'description':a29_0x518a48(0x18b)+PRODUCT_CONFIG['newConfigFileName']+a29_0x518a48(0x160),'default':![]},{'name':a29_0x518a48(0x171),'type':a29_0x518a48(0x16d),'description':a29_0x518a48(0x174),'default':![]}];export const initImportFlagDefs=[{'name':a29_0x518a48(0x165),'type':a29_0x518a48(0x161),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a29_0x518a48(0x172),'type':a29_0x518a48(0x161),'description':'Override\x20imported\x20default\x20appcode'},{'name':a29_0x518a48(0x15a),'type':a29_0x518a48(0x161),'description':a29_0x518a48(0x184),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a29_0x518a48(0x16d),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a29_0x518a48(0x18a)]+a29_0x518a48(0x160),'default':![]},{'name':'yes','type':a29_0x518a48(0x16d),'description':a29_0x518a48(0x174),'default':![]}];export async function runInit(_0x4b6e85){const _0x487708=a29_0x518a48,_0x1ec30f=isNonInteractiveMode(_0x4b6e85),_0xb6a58b=_0x4b6e85[_0x487708(0x195)]?_0x487708(0x195):'project',_0x141c55=resolveWriteConfigPath(_0xb6a58b);try{_0x1ec30f?await runNonInteractive(_0x4b6e85,_0x141c55):await runInteractive(_0x4b6e85,_0x141c55);}catch(_0x1ef2ce){if(_0x1ef2ce instanceof AbortPrompt)throw CliErrors[_0x487708(0x18f)]();throw _0x1ef2ce;}}export async function runInitImport(_0x5abeb3){const _0x1799f0=a29_0x518a48,_0x1ff6cf=_0x5abeb3[_0x1799f0(0x195)]?_0x1799f0(0x195):_0x1799f0(0x166),_0x192f52=resolveWriteConfigPath(_0x1ff6cf);await runFromImport(_0x5abeb3,_0x192f52);}const RUNTIME_IRRELEVANT_KEYS=new Set([a29_0x518a48(0x15e)]);async function runFromImport(_0x2275a6,_0x495d2d){const _0x2ef652=a29_0x518a48,_0x504a86=resolveFilePath(_0x2275a6[_0x2ef652(0x165)]);if(!existsSync(_0x504a86))throw CliErrors[_0x2ef652(0x168)](_0x2ef652(0x190)+_0x504a86);const _0x2f3c93=readSourceFile(_0x504a86),_0xc07ac0=convertToRuntimeConfig(_0x2f3c93);_0x2275a6[_0x2ef652(0x172)]&&(_0xc07ac0[_0x2ef652(0x172)]=String(_0x2275a6[_0x2ef652(0x172)]));_0x2275a6['env']&&(_0xc07ac0['env']=resolveInitEnv(_0x2275a6));if(!_0xc07ac0[_0x2ef652(0x172)])throw CliErrors['validation'](_0x2ef652(0x198),_0x2ef652(0x16e));await writeInitConfig(_0x495d2d,_0xc07ac0,_0x2275a6),console[_0x2ef652(0x18c)](_0x2ef652(0x183)+_0x504a86),console[_0x2ef652(0x18c)](_0x2ef652(0x19e)+_0x495d2d),console['log']('\x20\x20appcode:\x20'+_0xc07ac0[_0x2ef652(0x172)]);if(_0xc07ac0['defaultApp'])console[_0x2ef652(0x18c)](_0x2ef652(0x187)+_0xc07ac0[_0x2ef652(0x175)]);}function convertToRuntimeConfig(_0x5d69ce){const _0x1694ee=a29_0x518a48;if(_0x5d69ce[_0x1694ee(0x177)]&&typeof _0x5d69ce[_0x1694ee(0x177)]===_0x1694ee(0x19c))throw CliErrors['validation'](_0x1694ee(0x197),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x18d8df={};for(const _0x4ec5fe of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5d69ce[_0x4ec5fe]!==undefined&&(_0x18d8df[_0x4ec5fe]=_0x5d69ce[_0x4ec5fe]);}return!_0x18d8df[_0x1694ee(0x17b)]&&(_0x18d8df[_0x1694ee(0x17b)]=DEFAULT_CONFIG_VALUES[_0x1694ee(0x17b)]),_0x18d8df;}async function runNonInteractive(_0x480bcb,_0x11b5f0){const _0x338946=a29_0x518a48,_0x7679bd=_0x480bcb[_0x338946(0x172)];if(!_0x7679bd)throw CliErrors['flagMissing'](_0x338946(0x172),_0x338946(0x15f)+CLI_BIN_NAME+_0x338946(0x196));const _0x594162=resolveInitEnv(_0x480bcb);await writeInitConfig(_0x11b5f0,{'appcode':_0x7679bd,'env':_0x594162},_0x480bcb),console[_0x338946(0x18c)](_0x338946(0x18d)+_0x11b5f0),console[_0x338946(0x18c)]('\x20\x20appcode:\x20'+_0x7679bd),console[_0x338946(0x18c)](_0x338946(0x19d)+_0x594162);}async function runInteractive(_0xa0cafe,_0x245ba9){const _0xd6db5b=a29_0x518a48,_0x567248=loadExisting(_0x245ba9),_0x355e9c=typeof _0x567248?.[_0xd6db5b(0x172)]==='string'?_0x567248[_0xd6db5b(0x172)]:'',_0x5aacef=resolveInitEnv(_0xa0cafe);console[_0xd6db5b(0x18c)](CLI_BIN_NAME+_0xd6db5b(0x199)+PRODUCT_CONFIG[_0xd6db5b(0x18a)]+'\x0a');if(existsSync(_0x245ba9)&&!_0xa0cafe[_0xd6db5b(0x171)]){const _0x505f39=await promptYesNo(_0xd6db5b(0x181)+_0x245ba9+_0xd6db5b(0x191),![]);if(!_0x505f39){console['log'](_0xd6db5b(0x186));return;}}const _0x8629e0=typeof _0xa0cafe[_0xd6db5b(0x172)]===_0xd6db5b(0x161)?_0xa0cafe[_0xd6db5b(0x172)][_0xd6db5b(0x176)]():'';let _0x4ac720=_0x8629e0;!_0x4ac720&&(_0x4ac720=await promptInput('App\x20code',_0x355e9c));if(!_0x4ac720[_0xd6db5b(0x176)]())throw CliErrors[_0xd6db5b(0x168)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x245ba9,{'appcode':_0x4ac720[_0xd6db5b(0x176)](),'env':_0x5aacef},_0xa0cafe),console[_0xd6db5b(0x18c)](_0xd6db5b(0x17a)+_0x245ba9),console[_0xd6db5b(0x18c)](_0xd6db5b(0x16c)+_0x4ac720[_0xd6db5b(0x176)]()),console[_0xd6db5b(0x18c)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x5aacef);}async function writeInitConfig(_0x18d871,_0x7a8747,_0x21fa61){const _0x249209=a29_0x518a48;let _0x413a1d={};existsSync(_0x18d871)&&!_0x21fa61['yes']&&(_0x413a1d=readConfigFile(_0x18d871));for(const [_0x1bed81,_0x574987]of Object['entries'](_0x7a8747)){_0x574987!==undefined&&(_0x413a1d[_0x1bed81]=_0x574987);}if(_0x413a1d[_0x249209(0x189)])delete _0x413a1d[_0x249209(0x189)];writeConfigFile(_0x18d871,_0x413a1d);}function a29_0x2817(_0x508da7,_0x4ad132){_0x508da7=_0x508da7-0x159;const _0x3d9f41=a29_0x3d9f();let _0x28171d=_0x3d9f41[_0x508da7];return _0x28171d;}class AbortPrompt extends Error{constructor(){const _0x25273f=a29_0x518a48;super(_0x25273f(0x16b)),this['name']=_0x25273f(0x185);}}function createSafeRl(){const _0x10c1f4=a29_0x518a48,_0x59f34b=createInterface({'input':process['stdin'],'output':process[_0x10c1f4(0x17e)]});let _0x349d97;const _0x6c48ce=new Promise((_0x1b1c9b,_0x3d9a7e)=>{const _0x1feb35=_0x10c1f4;_0x349d97=()=>{const _0x15171d=a29_0x2817;_0x349d97&&(_0x59f34b[_0x15171d(0x188)](_0x15171d(0x19f),_0x349d97),_0x349d97=undefined);try{_0x59f34b['close']();}catch{}_0x3d9a7e(new AbortPrompt());},_0x59f34b[_0x1feb35(0x15c)]('SIGINT',_0x349d97);}),_0x3ca59a=()=>{const _0x1ed2b9=_0x10c1f4;_0x349d97&&(_0x59f34b[_0x1ed2b9(0x188)](_0x1ed2b9(0x19f),_0x349d97),_0x349d97=undefined);try{_0x59f34b[_0x1ed2b9(0x193)]();}catch{}};return{'rl':_0x59f34b,'abortPromise':_0x6c48ce,'disposeSuccess':_0x3ca59a};}async function promptInput(_0x712cb3,_0x516557){const _0x494289=a29_0x518a48,{rl:_0x1df087,abortPromise:_0x15f935,disposeSuccess:_0x30aa7c}=createSafeRl(),_0x3ffaa0=new Promise(_0x2188c2=>{const _0x39a373=a29_0x2817,_0x1647ed=_0x516557?'\x20\x20'+_0x712cb3+'\x20('+_0x516557+_0x39a373(0x15b):'\x20\x20'+_0x712cb3+':\x20';_0x1df087[_0x39a373(0x16f)](_0x1647ed,_0x33fc3c=>{const _0x1b8101=_0x39a373;_0x30aa7c(),_0x2188c2(_0x33fc3c[_0x1b8101(0x176)]()||_0x516557);});});return Promise[_0x494289(0x17f)]([_0x3ffaa0,_0x15f935]);}function a29_0x3d9f(){const _0x44d436=['\x20\x20default:\x20','removeListener','app','newConfigFileName','Write\x20to\x20global\x20(~/','log','Initialized\x20','Target\x20environment\x20(default\x20','cancelled','Source\x20file\x20not\x20found:\x20','\x20already\x20exists.\x20Overwrite?','Invalid\x20env\x20\x22','close','7FwuEPx','global','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20init\x20—\x20Create\x20','5dkZxtX','1756638MIiMPA','object','\x20\x20env:\x20\x20\x20\x20\x20','\x20\x20config:\x20\x20','SIGINT','join','env','):\x20','once','3764871SizXza','apiDir','Usage:\x20',')\x20instead\x20of\x20project','string','[Y/n]','parse','includes','file','project','166qdWMgG','validation','9qIGKVk','1751820sURKsj','User\x20aborted\x20prompt','\x20\x20appcode:\x20','boolean','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`.','question','954927xuwiDB','yes','appcode','App\x20code\x20for\x20the\x20project','Skip\x20confirmation\x20when\x20overwriting','defaultApp','trim','apps','1047852HiaEuS','2102056oJZkeo','\x0aInitialized\x20','riskLevel','\x22.\x20Allowed:\x20','794xumqza','stdout','race','message','File\x20','cwd','Imported\x20from\x20','Override\x20imported\x20default\x20env','AbortPrompt','Aborted.'];a29_0x3d9f=function(){return _0x44d436;};return a29_0x3d9f();}async function promptYesNo(_0x133501,_0x2d988a){const _0x56bfc5=a29_0x518a48,{rl:_0x45fa1f,abortPromise:_0xcced6f,disposeSuccess:_0x3f717e}=createSafeRl(),_0x1c568b=new Promise(_0x5b5d12=>{const _0x411151=a29_0x2817,_0x3fb99e=_0x2d988a?_0x411151(0x162):'[y/N]';_0x45fa1f[_0x411151(0x16f)]('\x20\x20'+_0x133501+'\x20'+_0x3fb99e+':\x20',_0x1ef5e7=>{_0x3f717e();const _0x314b8c=_0x1ef5e7['trim']()['toLowerCase']();if(_0x314b8c==='y'||_0x314b8c==='yes')_0x5b5d12(!![]);else{if(_0x314b8c==='n'||_0x314b8c==='no')_0x5b5d12(![]);else _0x5b5d12(_0x2d988a);}});});return Promise[_0x56bfc5(0x17f)]([_0x1c568b,_0xcced6f]);}function loadExisting(_0x4f1776){if(!existsSync(_0x4f1776))return null;return readConfigFile(_0x4f1776);}function resolveFilePath(_0x4dbcac){const _0x3c4331=a29_0x518a48;return isAbsolute(_0x4dbcac)?_0x4dbcac:resolve(process[_0x3c4331(0x182)](),_0x4dbcac);}function readSourceFile(_0x2f27f2){const _0x496b26=a29_0x518a48;try{const _0x7e0f07=readFileSync(_0x2f27f2,{'encoding':'utf8'});return JSON[_0x496b26(0x163)](_0x7e0f07);}catch(_0x2944b2){throw CliErrors[_0x496b26(0x168)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x2944b2[_0x496b26(0x180)]);}}function resolveInitEnv(_0x7bfa1e){const _0x114d69=a29_0x518a48,_0x473326=_0x7bfa1e['env'];if(_0x473326===undefined||_0x473326==='')return DEFAULT_CONFIG_VALUES[_0x114d69(0x15a)];if(!RUNTIME_ENV_VALUES[_0x114d69(0x164)](_0x473326))throw CliErrors['validation'](_0x114d69(0x192)+_0x473326+_0x114d69(0x17c)+RUNTIME_ENV_VALUES[_0x114d69(0x159)](',\x20'));return _0x473326;}
|