@lovrabet/rabetbase-cli 2.0.4-beta.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/build.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/preview.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/skill/index.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/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.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/response.js +1 -1
- package/lib/framework/runner.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/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a69_0x11513d=a69_0x208c;(function(_0x577852,_0x4142fb){const _0x36f913=a69_0x208c,_0x38e31e=_0x577852();while(!![]){try{const _0x2d3fb7=-parseInt(_0x36f913(0x10b))/0x1*(-parseInt(_0x36f913(0xfa))/0x2)+-parseInt(_0x36f913(0xad))/0x3*(parseInt(_0x36f913(0xa6))/0x4)+parseInt(_0x36f913(0x114))/0x5+parseInt(_0x36f913(0xce))/0x6*(-parseInt(_0x36f913(0xe2))/0x7)+-parseInt(_0x36f913(0xa7))/0x8+-parseInt(_0x36f913(0xb2))/0x9*(parseInt(_0x36f913(0xef))/0xa)+parseInt(_0x36f913(0xaa))/0xb;if(_0x2d3fb7===_0x4142fb)break;else _0x38e31e['push'](_0x38e31e['shift']());}catch(_0x44c26e){_0x38e31e['push'](_0x38e31e['shift']());}}}(a69_0x12fe,0xdecf9));import a69_0x4ef568 from'chalk';import a69_0x511a4c from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a69_0x11513d(0xf8)](_0x4ab18f=>_0x4ab18f!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x28d479){const _0x45ff3a=a69_0x11513d,_0x54b1fe=[];for(const _0x490267 of Object['values'](CORE_IDE_CONFIGS)){if(_0x490267[_0x45ff3a(0xfb)])for(const _0x160b75 of _0x490267[_0x45ff3a(0xfb)]){_0x54b1fe[_0x45ff3a(0xff)](resolve(_0x28d479,_0x160b75[_0x45ff3a(0xea)]));}}return _0x54b1fe;}function analyse(_0x39ad4f){const _0x15066f=a69_0x11513d;let _0x106620=null;const _0x4ce9e8=resolve(_0x39ad4f,NEW_CONFIG_NAME),_0x47fa80=existsSync(_0x4ce9e8);for(const _0x505f75 of LEGACY_CONFIG_NAMES){const _0x26ffec=resolve(_0x39ad4f,_0x505f75);if(existsSync(_0x26ffec)){const _0x5f39e1=readConfigFile(_0x26ffec),_0x18d07f=Object[_0x15066f(0xb4)](_0x5f39e1)[_0x15066f(0xf8)](_0xaea9db=>typeof _0x5f39e1[_0xaea9db]!=='undefined');_0x106620={'oldPath':_0x26ffec,'hasNewConfig':_0x47fa80,'fields':_0x18d07f};break;}}const _0x48dca2=[],_0x231461=resolve(_0x39ad4f,_0x15066f(0xcf));if(existsSync(_0x231461))_0x48dca2[_0x15066f(0xff)](_0x231461);const _0x190e40=resolve(_0x39ad4f,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x190e40))_0x48dca2[_0x15066f(0xff)](_0x190e40);const _0x21bfab=resolve(_0x39ad4f,'.claude/skills/lovrabet');if(existsSync(_0x21bfab))_0x48dca2[_0x15066f(0xff)](_0x21bfab);for(const _0x2d8f55 of collectIdeSkillFiles(_0x39ad4f)){if(existsSync(_0x2d8f55))_0x48dca2[_0x15066f(0xff)](_0x2d8f55);}let _0x13a82b=null;const _0x225753=resolve(_0x39ad4f,_0x15066f(0xf3));if(existsSync(_0x225753))try{const _0x12555e=JSON[_0x15066f(0xe3)](readFileSync(_0x225753,_0x15066f(0xfd)));if(_0x12555e?.[_0x15066f(0xb0)]&&typeof _0x12555e[_0x15066f(0xb0)]==='object'){const _0x2e9221=[];for(const [_0x54ebd3,_0x11cd19]of Object[_0x15066f(0xa5)](_0x12555e['mcpServers'])){const _0x29312f=_0x11cd19;_0x29312f?.['args']&&Array[_0x15066f(0xf5)](_0x29312f[_0x15066f(0xc0)])&&_0x29312f[_0x15066f(0xc0)][_0x15066f(0xc4)](_0x4186c3=>typeof _0x4186c3===_0x15066f(0xb5)&&_0x4186c3[_0x15066f(0xc1)](_0x15066f(0x112)))&&_0x2e9221['push'](_0x54ebd3);}_0x2e9221[_0x15066f(0xbd)]>0x0&&(_0x13a82b={'path':_0x225753,'keys':_0x2e9221});}}catch{}const _0x866b1d=_0x48dca2['length']>0x0||_0x106620!==null;return{'configMigration':_0x106620,'oldArtifacts':_0x48dca2,'oldMcpConfig':_0x13a82b,'needsSkillSwap':_0x866b1d};}function printReport(_0x64a80){const _0x3b0d37=a69_0x11513d,{configMigration:_0x39e383,oldArtifacts:_0x1ae1d6,oldMcpConfig:_0x3796ac,needsSkillSwap:_0x512aba}=_0x64a80;console[_0x3b0d37(0xc8)](''),console['log'](a69_0x4ef568[_0x3b0d37(0xbb)](_0x3b0d37(0xd6))),console[_0x3b0d37(0xc8)]('');_0x39e383?(console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)](_0x3b0d37(0x104))+('\x20\x20'+a69_0x4ef568['yellow'](_0x39e383[_0x3b0d37(0xf0)]))),console[_0x3b0d37(0xc8)](_0x3b0d37(0xf7)+(_0x39e383['hasNewConfig']?a69_0x4ef568[_0x3b0d37(0xe6)]('already\x20exists\x20(will\x20merge)'):a69_0x4ef568[_0x3b0d37(0xcd)](_0x3b0d37(0x10a)))),console[_0x3b0d37(0xc8)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x39e383[_0x3b0d37(0xfe)][_0x3b0d37(0xee)](',\x20')),console[_0x3b0d37(0xc8)](_0x3b0d37(0xd2))):console['log'](a69_0x4ef568[_0x3b0d37(0xe7)]('Config\x20file:')+'\x20\x20'+a69_0x4ef568[_0x3b0d37(0xcd)](_0x3b0d37(0xf9)));console[_0x3b0d37(0xc8)]('');if(_0x1ae1d6[_0x3b0d37(0xbd)]>0x0){console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)](_0x3b0d37(0xde)));for(const _0x8abc71 of _0x1ae1d6){console[_0x3b0d37(0xc8)]('\x20\x20'+a69_0x4ef568['red']('FOUND')+'\x20\x20'+_0x8abc71);}console['log'](_0x3b0d37(0xd3));}else console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)](_0x3b0d37(0xde))+'\x20\x20'+a69_0x4ef568[_0x3b0d37(0xcd)](_0x3b0d37(0xd8)));console['log'](''),_0x3796ac?(console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)]('MCP\x20config:')+('\x20\x20'+a69_0x4ef568['yellow'](_0x3796ac[_0x3b0d37(0xea)])+'\x20→\x20keys:\x20'+_0x3796ac[_0x3b0d37(0xb4)]['join'](',\x20'))),console[_0x3b0d37(0xc8)](_0x3b0d37(0xc6))):console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)](_0x3b0d37(0xf6))+'\x20\x20'+a69_0x4ef568[_0x3b0d37(0xcd)](_0x3b0d37(0xfc))),console[_0x3b0d37(0xc8)](''),console[_0x3b0d37(0xc8)](a69_0x4ef568[_0x3b0d37(0xe7)](_0x3b0d37(0xc5))+('\x20\x20'+(_0x512aba?a69_0x4ef568[_0x3b0d37(0x103)](_0x3b0d37(0xd4)):a69_0x4ef568[_0x3b0d37(0xe6)](_0x3b0d37(0xe4))))),_0x512aba&&console[_0x3b0d37(0xc8)](_0x3b0d37(0xf2)),console['log']('');}function a69_0x208c(_0x3e3693,_0x5c6932){_0x3e3693=_0x3e3693-0xa5;const _0x12fe81=a69_0x12fe();let _0x208c48=_0x12fe81[_0x3e3693];return _0x208c48;}function execConfigMigration(_0x53ef61,_0x183bc6){const _0x57359b=a69_0x11513d,{configMigration:_0x2522a1}=_0x53ef61;if(!_0x2522a1?.['oldPath'])return{'step':0x1,'label':_0x57359b(0x111),'ok':!![],'detail':_0x57359b(0x110)};const _0x4e718b=readConfigFile(_0x2522a1['oldPath']),_0xbcd88=resolve(_0x183bc6,NEW_CONFIG_NAME),_0x1e24ce=_0x2522a1['hasNewConfig']?readConfigFile(_0xbcd88):{};for(const [_0x12c3e4,_0x2896df]of Object[_0x57359b(0xa5)](_0x4e718b)){!(_0x12c3e4 in _0x1e24ce)&&(_0x1e24ce[_0x12c3e4]=_0x2896df);}writeConfigFile(_0xbcd88,_0x1e24ce);const _0x40a6f2=_0x2522a1['oldPath']+'.bak';return renameSync(_0x2522a1['oldPath'],_0x40a6f2),{'step':0x1,'label':_0x57359b(0x111),'ok':!![],'detail':_0x2522a1[_0x57359b(0xf0)]+'\x20→\x20'+_0xbcd88+_0x57359b(0xae)+_0x40a6f2+')'};}function execRemoveOldArtifacts(_0x29e9f1){const _0x54ae00=a69_0x11513d,_0x3b5d78=[];for(const _0x15d0bb of _0x29e9f1){try{if(!existsSync(_0x15d0bb))continue;const _0x2b3bfd=tryStat(_0x15d0bb);_0x2b3bfd?.['isDirectory']()?rmSync(_0x15d0bb,{'recursive':!![],'force':!![]}):unlinkSync(_0x15d0bb);}catch(_0x35f4d7){_0x3b5d78[_0x54ae00(0xff)](_0x15d0bb+':\x20'+_0x35f4d7[_0x54ae00(0xe1)]);}}return{'step':0x3,'label':_0x54ae00(0xb9),'ok':_0x3b5d78[_0x54ae00(0xbd)]===0x0,'detail':_0x3b5d78[_0x54ae00(0xbd)]>0x0?_0x29e9f1[_0x54ae00(0xbd)]-_0x3b5d78[_0x54ae00(0xbd)]+'/'+_0x29e9f1[_0x54ae00(0xbd)]+_0x54ae00(0x109)+_0x3b5d78['join'](';\x20')+')':_0x29e9f1[_0x54ae00(0xbd)]+_0x54ae00(0xc2)};}function execCleanMcp(_0x37ab32){const _0x50ef18=a69_0x11513d;if(!_0x37ab32['oldMcpConfig'])return{'step':0x4,'label':_0x50ef18(0xca),'ok':!![],'detail':_0x50ef18(0xe9)};try{const _0xdcdc83=readFileSync(_0x37ab32['oldMcpConfig'][_0x50ef18(0xea)],_0x50ef18(0xfd)),_0x5a47ef=JSON[_0x50ef18(0xe3)](_0xdcdc83);if(_0x5a47ef?.[_0x50ef18(0xb0)]&&typeof _0x5a47ef[_0x50ef18(0xb0)]===_0x50ef18(0xeb)){const _0x516cd4=[];for(const [_0x58c848,_0x4db30f]of Object['entries'](_0x5a47ef['mcpServers'])){_0x4db30f?.[_0x50ef18(0xc0)]&&Array['isArray'](_0x4db30f[_0x50ef18(0xc0)])&&_0x4db30f['args'][_0x50ef18(0xc4)](_0x5f5625=>typeof _0x5f5625===_0x50ef18(0xb5)&&_0x5f5625[_0x50ef18(0xc1)](_0x50ef18(0x112)))&&_0x516cd4[_0x50ef18(0xff)](_0x58c848);}for(const _0xbcb943 of _0x516cd4){delete _0x5a47ef[_0x50ef18(0xb0)][_0xbcb943];}return _0x516cd4['length']>0x0&&writeFileSync(_0x37ab32[_0x50ef18(0xcc)][_0x50ef18(0xea)],JSON['stringify'](_0x5a47ef,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x50ef18(0xca),'ok':!![],'detail':_0x50ef18(0xa8)+_0x516cd4['join'](',\x20')+_0x50ef18(0xb8)+_0x37ab32[_0x50ef18(0xcc)][_0x50ef18(0xea)]};}return{'step':0x4,'label':_0x50ef18(0xca),'ok':!![],'detail':_0x50ef18(0xbc)};}catch(_0x3aceaa){return{'step':0x4,'label':_0x50ef18(0xca),'ok':![],'detail':_0x3aceaa[_0x50ef18(0xe1)]};}}function execSkillsRemove(_0x42edb0){const _0x5852ef=a69_0x11513d,_0x1cf88b=runNpxSkillsRemove(_0x42edb0,{'stdio':'inherit'});return{'step':0x5,'label':_0x5852ef(0xd5),'ok':_0x1cf88b['ok'],'detail':_0x1cf88b['ok']?'lovrabet/lovrabet-skill\x20removed':_0x1cf88b[_0x5852ef(0xa9)]??_0x5852ef(0xc7)+_0x1cf88b[_0x5852ef(0xb7)]};}function execSkillsAdd(_0x4702e9){const _0x394ae2=a69_0x11513d,_0x551da3=runNpxSkillsAddGlobal(_0x4702e9,_0x394ae2(0xf1),{'stdio':_0x394ae2(0xbf)});return{'step':0x6,'label':_0x394ae2(0xc3),'ok':_0x551da3['ok'],'detail':_0x551da3['ok']?_0x394ae2(0xcb):_0x551da3['error']??_0x394ae2(0xc7)+_0x551da3[_0x394ae2(0xb7)]};}function tryStat(_0xe3444c){try{return statSync(_0xe3444c);}catch{return undefined;}}function printSummary(_0x386f9c){const _0x4cd799=a69_0x11513d;console[_0x4cd799(0xc8)](''),console[_0x4cd799(0xc8)](a69_0x4ef568[_0x4cd799(0xbb)](_0x4cd799(0x10d))),console[_0x4cd799(0xc8)]('');for(const _0x26498e of _0x386f9c){const _0x54288c=_0x26498e['ok']?a69_0x4ef568[_0x4cd799(0xe6)]('OK'):a69_0x4ef568[_0x4cd799(0xd7)](_0x4cd799(0x10e));console[_0x4cd799(0xc8)]('\x20\x20'+_0x54288c+_0x4cd799(0x106)+_0x26498e['step']+':\x20'+_0x26498e[_0x4cd799(0xdb)]);if(_0x26498e['detail'])console[_0x4cd799(0xc8)](_0x4cd799(0x108)+a69_0x4ef568['gray'](_0x26498e[_0x4cd799(0x102)]));}console[_0x4cd799(0xc8)]('');}function a69_0x12fe(){const _0x35ddaa=['mcpServers','failed','405144IisLYn','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','keys','string','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','status','\x20from\x20','Remove\x20legacy\x20artifacts','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','bold','no\x20matching\x20entry\x20found','length','done','inherit','args','includes','\x20removed','Install\x20new\x20skill','some','Skill\x20swap:','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','exit\x20','log','Upgrade\x20cancelled.','Clean\x20MCP\x20config','lovrabet/rabetbase\x20installed\x20globally','oldMcpConfig','gray','78618CSoEuI','.lovrabet','info','Step\x206/6:\x20Installing\x20new\x20skill...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20Action:\x20delete','needed','Remove\x20old\x20skill','===\x20Upgrade\x20Analysis\x20===','red','none\x20found','fail','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','label','Step\x205/6:\x20Removing\x20old\x20skill...','Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Legacy\x20artifacts:','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','needsSkillSwap','message','301PhigBp','parse','not\x20needed','Step\x204/6:\x20Cleaning\x20MCP\x20config...','green','cyan','CANCEL','skipped','path','object','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','start','join','350tdpydR','oldPath','lovrabet/rabetbase','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','.cursor/mcp.json','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','isArray','MCP\x20config:','\x20\x20New\x20config\x20(.rabetbase.json):\x20','filter','no\x20legacy\x20config\x20found','26836BBGbrz','files','no\x20legacy\x20entry','utf8','fields','push','oldArtifacts','configMigration','detail','yellow','Config\x20file:','Step\x201/6:\x20Config\x20migration\x20—\x20','\x20\x20Step\x20','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','\x20\x20\x20\x20\x20\x20\x20','\x20removed\x20(','not\x20found\x20(will\x20create)','110mqfOvL','yes','===\x20Upgrade\x20Summary\x20===','FAIL','Remove\x20.lovrabet/','skipped\x20(no\x20legacy\x20config)','Config\x20migration','@lovrabet/dataset-mcp-server','Proceed\x20with\x20upgrade?','1065290CRIxul','entries','32VhMgSk','828680XCviHB','removed\x20','error','33461131vUkuUJ','Step\x201/6:\x20Migrating\x20config...','succeed','590907bmFdIQ','\x20(backup:\x20','Step\x204/6:\x20MCP\x20config\x20—\x20'];a69_0x12fe=function(){return _0x35ddaa;};return a69_0x12fe();}export async function upgradeApp(_0x28a514,_0x5d2f8c){const _0x116651=a69_0x11513d,_0x35ddc8=process['cwd'](),_0x1f5513=analyse(_0x35ddc8),_0x382926=!_0x1f5513[_0x116651(0x101)]&&_0x1f5513[_0x116651(0x100)][_0x116651(0xbd)]===0x0&&!_0x1f5513[_0x116651(0xcc)]&&!_0x1f5513[_0x116651(0xe0)];if(_0x382926){console['log'](a69_0x4ef568[_0x116651(0xe6)](_0x116651(0xb3)));return;}printReport(_0x1f5513);const _0xf76981=_0x5d2f8c[_0x116651(0x10c)]||_0x5d2f8c['Y']||_0x28a514;if(!_0xf76981)try{const _0x2e91ca=await askConfirm(_0x116651(0x113));if(!_0x2e91ca){console['log'](a69_0x4ef568[_0x116651(0xcd)](_0x116651(0xc9)));return;}}catch(_0x5ebb8a){if(_0x5ebb8a?.['message']===_0x116651(0xe8)){console[_0x116651(0xc8)](a69_0x4ef568[_0x116651(0xcd)](_0x116651(0xc9)));return;}throw _0x5ebb8a;}const _0x503a2b=[],_0x2c7427=a69_0x511a4c({'text':_0x116651(0xab),'color':'cyan'})[_0x116651(0xed)](),_0x553860=execConfigMigration(_0x1f5513,_0x35ddc8);_0x503a2b[_0x116651(0xff)](_0x553860),_0x2c7427[_0x553860['ok']?_0x116651(0xac):'fail'](_0x116651(0x105)+(_0x553860['detail']??(_0x553860['ok']?_0x116651(0xbe):_0x116651(0xb1))));const _0x1ee242=resolve(_0x35ddc8,_0x116651(0xcf)),_0x504743=a69_0x511a4c({'text':_0x116651(0xf4),'color':_0x116651(0xe7)})[_0x116651(0xed)]();if(existsSync(_0x1ee242))try{rmSync(_0x1ee242,{'recursive':!![],'force':!![]}),_0x504743[_0x116651(0xac)](_0x116651(0xec)),_0x503a2b['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x1c5d66){_0x504743[_0x116651(0xd9)](_0x116651(0xba)+_0x1c5d66['message']),_0x503a2b[_0x116651(0xff)]({'step':0x2,'label':_0x116651(0x10f),'ok':![],'detail':_0x1c5d66[_0x116651(0xe1)]});}else _0x504743[_0x116651(0xd0)](_0x116651(0xb6)),_0x503a2b['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x116651(0xe9)});const _0x3653fe=a69_0x511a4c({'text':_0x116651(0xdd),'color':_0x116651(0xe7)})['start'](),_0x100fec=execRemoveOldArtifacts(_0x1f5513['oldArtifacts']);_0x503a2b[_0x116651(0xff)](_0x100fec),_0x3653fe[_0x100fec['ok']?_0x116651(0xac):_0x116651(0xd9)](_0x116651(0xda)+(_0x100fec[_0x116651(0x102)]??(_0x100fec['ok']?_0x116651(0xbe):_0x116651(0xb1))));const _0x40e40f=a69_0x511a4c({'text':_0x116651(0xe5),'color':_0x116651(0xe7)})[_0x116651(0xed)](),_0x55a9e8=execCleanMcp(_0x1f5513);_0x503a2b[_0x116651(0xff)](_0x55a9e8),_0x40e40f[_0x55a9e8['ok']?_0x116651(0xac):'fail'](_0x116651(0xaf)+(_0x55a9e8[_0x116651(0x102)]??(_0x55a9e8['ok']?_0x116651(0xbe):_0x116651(0xb1))));const _0x2e8a48=a69_0x511a4c({'text':_0x116651(0xdc),'color':_0x116651(0xe7)})[_0x116651(0xed)](),_0x1f2a4c=execSkillsRemove(_0x35ddc8);_0x503a2b[_0x116651(0xff)](_0x1f2a4c),_0x2e8a48[_0x1f2a4c['ok']?_0x116651(0xac):'fail']('Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20'+(_0x1f2a4c[_0x116651(0x102)]??(_0x1f2a4c['ok']?_0x116651(0xbe):_0x116651(0xb1))));const _0x300b7d=a69_0x511a4c({'text':_0x116651(0xd1),'color':_0x116651(0xe7)})[_0x116651(0xed)](),_0x3c5f78=execSkillsAdd(_0x35ddc8);_0x503a2b[_0x116651(0xff)](_0x3c5f78),_0x300b7d[_0x3c5f78['ok']?_0x116651(0xac):'fail'](_0x116651(0x107)+(_0x3c5f78['detail']??(_0x3c5f78['ok']?_0x116651(0xbe):_0x116651(0xb1)))),printSummary(_0x503a2b);const _0x517986=_0x503a2b[_0x116651(0xc4)](_0x219cca=>!_0x219cca['ok']);_0x517986?console['log'](a69_0x4ef568[_0x116651(0x103)](_0x116651(0xdf))):console[_0x116651(0xc8)](a69_0x4ef568[_0x116651(0xe6)]('Upgrade\x20completed\x20successfully!'));}
|
|
1
|
+
(function(_0x220217,_0x156954){const _0x38c2fa=a69_0x25aa,_0x5665de=_0x220217();while(!![]){try{const _0x37a706=-parseInt(_0x38c2fa(0x13f))/0x1+parseInt(_0x38c2fa(0x134))/0x2*(-parseInt(_0x38c2fa(0x16e))/0x3)+-parseInt(_0x38c2fa(0x12e))/0x4+-parseInt(_0x38c2fa(0x145))/0x5+-parseInt(_0x38c2fa(0x160))/0x6+parseInt(_0x38c2fa(0x111))/0x7*(parseInt(_0x38c2fa(0x13b))/0x8)+parseInt(_0x38c2fa(0x11c))/0x9*(parseInt(_0x38c2fa(0x153))/0xa);if(_0x37a706===_0x156954)break;else _0x5665de['push'](_0x5665de['shift']());}catch(_0x264456){_0x5665de['push'](_0x5665de['shift']());}}}(a69_0x347c,0xcb3c4));import a69_0x5c2f83 from'chalk';function a69_0x25aa(_0x1d8d7c,_0xa5c4b){_0x1d8d7c=_0x1d8d7c-0x10a;const _0x347c49=a69_0x347c();let _0x25aacb=_0x347c49[_0x1d8d7c];return _0x25aacb;}import a69_0x398037 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';function a69_0x347c(){const _0x399f77=['899360JYuHFn','inherit','lovrabet/rabetbase\x20installed\x20globally','\x20removed\x20(','@lovrabet/dataset-mcp-server','no\x20legacy\x20config\x20found','error','info','push','cwd','isArray','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','keys','Step\x201/6:\x20Config\x20migration\x20—\x20','280wzsdzQ','detail','label','yellow','no\x20legacy\x20entry','Remove\x20.lovrabet/','FOUND','needed','failed','Upgrade\x20completed\x20successfully!','CANCEL','status','oldPath','1626522oOfxJE','.cursor/mcp.json','.claude/skills/lovrabet','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','utf8','skipped\x20(no\x20legacy\x20config)','cyan','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','.lovrabet','Install\x20new\x20skill','includes','filter','green','log','3VgMmdY','.cursor/rules/lovrabet_rules.mdc','bold','skipped','oldArtifacts','Step\x204/6:\x20MCP\x20config\x20—\x20','Config\x20migration','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','fields','join','\x20\x20Fields\x20to\x20migrate:\x20','yes','Clean\x20MCP\x20config','configMigration','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','Legacy\x20artifacts:','Step\x206/6:\x20Installing\x20new\x20skill...','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','35KygIAl','mcpServers','Step\x204/6:\x20Cleaning\x20MCP\x20config...','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','\x20from\x20','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','object','files','Step\x205/6:\x20Removing\x20old\x20skill...','start','Upgrade\x20cancelled.','911871BzNVSy','not\x20needed','Proceed\x20with\x20upgrade?','some','undefined','hasNewConfig','oldMcpConfig','\x20\x20Step\x20','exit\x20','Config\x20file:','entries','args','lovrabet/rabetbase','step','done','gray','\x20\x20New\x20config\x20(.rabetbase.json):\x20','message','148912ECiOsE','succeed','path','length','===\x20Upgrade\x20Summary\x20===','\x20→\x20keys:\x20','2736596zkKYhz','MCP\x20config:','string','removed\x20','no\x20matching\x20entry\x20found','\x20removed','red','618456LAEAXS','isDirectory','===\x20Upgrade\x20Analysis\x20===','stringify','534530qdWWKb','Step\x201/6:\x20Migrating\x20config...','Remove\x20old\x20skill','fail','\x20(backup:\x20','values'];a69_0x347c=function(){return _0x399f77;};return a69_0x347c();}import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x115396=>_0x115396!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x2b85bd){const _0xa291b7=a69_0x25aa,_0x321b35=[];for(const _0x496fb1 of Object[_0xa291b7(0x144)](CORE_IDE_CONFIGS)){if(_0x496fb1[_0xa291b7(0x118)])for(const _0xa20ff5 of _0x496fb1[_0xa291b7(0x118)]){_0x321b35[_0xa291b7(0x14d)](resolve(_0x2b85bd,_0xa20ff5[_0xa291b7(0x130)]));}}return _0x321b35;}function analyse(_0x3aca8a){const _0x297df2=a69_0x25aa;let _0x271091=null;const _0x450a3b=resolve(_0x3aca8a,NEW_CONFIG_NAME),_0x265e88=existsSync(_0x450a3b);for(const _0x12ccb5 of LEGACY_CONFIG_NAMES){const _0x5c2646=resolve(_0x3aca8a,_0x12ccb5);if(existsSync(_0x5c2646)){const _0x18fb1d=readConfigFile(_0x5c2646),_0x56dfc2=Object[_0x297df2(0x151)](_0x18fb1d)[_0x297df2(0x16b)](_0x253599=>typeof _0x18fb1d[_0x253599]!==_0x297df2(0x120));_0x271091={'oldPath':_0x5c2646,'hasNewConfig':_0x265e88,'fields':_0x56dfc2};break;}}const _0xcca5da=[],_0x17f0ba=resolve(_0x3aca8a,_0x297df2(0x168));if(existsSync(_0x17f0ba))_0xcca5da[_0x297df2(0x14d)](_0x17f0ba);const _0x1282c4=resolve(_0x3aca8a,_0x297df2(0x16f));if(existsSync(_0x1282c4))_0xcca5da[_0x297df2(0x14d)](_0x1282c4);const _0x1acb00=resolve(_0x3aca8a,_0x297df2(0x162));if(existsSync(_0x1acb00))_0xcca5da['push'](_0x1acb00);for(const _0x11cc2c of collectIdeSkillFiles(_0x3aca8a)){if(existsSync(_0x11cc2c))_0xcca5da[_0x297df2(0x14d)](_0x11cc2c);}let _0x2fa2e1=null;const _0x285e78=resolve(_0x3aca8a,_0x297df2(0x161));if(existsSync(_0x285e78))try{const _0x5ac336=JSON['parse'](readFileSync(_0x285e78,_0x297df2(0x164)));if(_0x5ac336?.['mcpServers']&&typeof _0x5ac336['mcpServers']===_0x297df2(0x117)){const _0x142d92=[];for(const [_0xe37773,_0x3fcbc2]of Object[_0x297df2(0x126)](_0x5ac336[_0x297df2(0x112)])){const _0x2cb5f1=_0x3fcbc2;_0x2cb5f1?.[_0x297df2(0x127)]&&Array[_0x297df2(0x14f)](_0x2cb5f1['args'])&&_0x2cb5f1[_0x297df2(0x127)][_0x297df2(0x11f)](_0x1b99d8=>typeof _0x1b99d8===_0x297df2(0x136)&&_0x1b99d8['includes'](_0x297df2(0x149)))&&_0x142d92[_0x297df2(0x14d)](_0xe37773);}_0x142d92[_0x297df2(0x131)]>0x0&&(_0x2fa2e1={'path':_0x285e78,'keys':_0x142d92});}}catch{}const _0x3da1c4=_0xcca5da[_0x297df2(0x131)]>0x0||_0x271091!==null;return{'configMigration':_0x271091,'oldArtifacts':_0xcca5da,'oldMcpConfig':_0x2fa2e1,'needsSkillSwap':_0x3da1c4};}function printReport(_0x55bfce){const _0x525d15=a69_0x25aa,{configMigration:_0x51dd8f,oldArtifacts:_0x54502e,oldMcpConfig:_0x1705fb,needsSkillSwap:_0x1b7308}=_0x55bfce;console[_0x525d15(0x16d)](''),console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x170)](_0x525d15(0x13d))),console[_0x525d15(0x16d)]('');_0x51dd8f?(console['log'](a69_0x5c2f83[_0x525d15(0x166)]('Config\x20file:')+('\x20\x20'+a69_0x5c2f83[_0x525d15(0x156)](_0x51dd8f[_0x525d15(0x15f)]))),console[_0x525d15(0x16d)](_0x525d15(0x12c)+(_0x51dd8f['hasNewConfig']?a69_0x5c2f83[_0x525d15(0x16c)]('already\x20exists\x20(will\x20merge)'):a69_0x5c2f83['gray']('not\x20found\x20(will\x20create)'))),console[_0x525d15(0x16d)](_0x525d15(0x178)+_0x51dd8f[_0x525d15(0x176)]['join'](',\x20')),console[_0x525d15(0x16d)](_0x525d15(0x175))):console['log'](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x125))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)](_0x525d15(0x14a)));console['log']('');if(_0x54502e['length']>0x0){console[_0x525d15(0x16d)](a69_0x5c2f83['cyan'](_0x525d15(0x10e)));for(const _0x1b0e81 of _0x54502e){console[_0x525d15(0x16d)]('\x20\x20'+a69_0x5c2f83['red'](_0x525d15(0x159))+'\x20\x20'+_0x1b0e81);}console['log']('\x20\x20Action:\x20delete');}else console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x10e))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)]('none\x20found'));console[_0x525d15(0x16d)](''),_0x1705fb?(console['log'](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x135))+('\x20\x20'+a69_0x5c2f83['yellow'](_0x1705fb[_0x525d15(0x130)])+_0x525d15(0x133)+_0x1705fb[_0x525d15(0x151)][_0x525d15(0x177)](',\x20'))),console[_0x525d15(0x16d)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x525d15(0x16d)](a69_0x5c2f83[_0x525d15(0x166)](_0x525d15(0x135))+'\x20\x20'+a69_0x5c2f83[_0x525d15(0x12b)](_0x525d15(0x157))),console[_0x525d15(0x16d)](''),console['log'](a69_0x5c2f83['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x1b7308?a69_0x5c2f83[_0x525d15(0x156)](_0x525d15(0x15a)):a69_0x5c2f83[_0x525d15(0x16c)](_0x525d15(0x11d))))),_0x1b7308&&console[_0x525d15(0x16d)](_0x525d15(0x167)),console[_0x525d15(0x16d)]('');}function execConfigMigration(_0x848988,_0x53d6f8){const _0x2502f9=a69_0x25aa,{configMigration:_0x1d1618}=_0x848988;if(!_0x1d1618?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x2502f9(0x165)};const _0x598269=readConfigFile(_0x1d1618[_0x2502f9(0x15f)]),_0x11c907=resolve(_0x53d6f8,NEW_CONFIG_NAME),_0x3be9d8=_0x1d1618[_0x2502f9(0x121)]?readConfigFile(_0x11c907):{};for(const [_0x42ef80,_0x254905]of Object['entries'](_0x598269)){!(_0x42ef80 in _0x3be9d8)&&(_0x3be9d8[_0x42ef80]=_0x254905);}writeConfigFile(_0x11c907,_0x3be9d8);const _0x138486=_0x1d1618['oldPath']+'.bak';return renameSync(_0x1d1618['oldPath'],_0x138486),{'step':0x1,'label':_0x2502f9(0x174),'ok':!![],'detail':_0x1d1618[_0x2502f9(0x15f)]+'\x20→\x20'+_0x11c907+_0x2502f9(0x143)+_0x138486+')'};}function execRemoveOldArtifacts(_0x27dc57){const _0x5cf947=a69_0x25aa,_0x536e81=[];for(const _0xa105bc of _0x27dc57){try{if(!existsSync(_0xa105bc))continue;const _0x517ee3=tryStat(_0xa105bc);_0x517ee3?.[_0x5cf947(0x13c)]()?rmSync(_0xa105bc,{'recursive':!![],'force':!![]}):unlinkSync(_0xa105bc);}catch(_0x32f274){_0x536e81[_0x5cf947(0x14d)](_0xa105bc+':\x20'+_0x32f274[_0x5cf947(0x12d)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x536e81['length']===0x0,'detail':_0x536e81[_0x5cf947(0x131)]>0x0?_0x27dc57[_0x5cf947(0x131)]-_0x536e81['length']+'/'+_0x27dc57[_0x5cf947(0x131)]+_0x5cf947(0x148)+_0x536e81[_0x5cf947(0x177)](';\x20')+')':_0x27dc57[_0x5cf947(0x131)]+_0x5cf947(0x139)};}function execCleanMcp(_0x586836){const _0x57278f=a69_0x25aa;if(!_0x586836['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'skipped'};try{const _0x54c6eb=readFileSync(_0x586836['oldMcpConfig'][_0x57278f(0x130)],_0x57278f(0x164)),_0x30918a=JSON['parse'](_0x54c6eb);if(_0x30918a?.[_0x57278f(0x112)]&&typeof _0x30918a[_0x57278f(0x112)]===_0x57278f(0x117)){const _0xe1a246=[];for(const [_0x4b8e0d,_0x570c5f]of Object[_0x57278f(0x126)](_0x30918a[_0x57278f(0x112)])){_0x570c5f?.[_0x57278f(0x127)]&&Array[_0x57278f(0x14f)](_0x570c5f['args'])&&_0x570c5f[_0x57278f(0x127)][_0x57278f(0x11f)](_0xdd7c93=>typeof _0xdd7c93===_0x57278f(0x136)&&_0xdd7c93[_0x57278f(0x16a)](_0x57278f(0x149)))&&_0xe1a246['push'](_0x4b8e0d);}for(const _0x33abcc of _0xe1a246){delete _0x30918a[_0x57278f(0x112)][_0x33abcc];}return _0xe1a246[_0x57278f(0x131)]>0x0&&writeFileSync(_0x586836[_0x57278f(0x122)]['path'],JSON[_0x57278f(0x13e)](_0x30918a,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x57278f(0x137)+_0xe1a246[_0x57278f(0x177)](',\x20')+_0x57278f(0x115)+_0x586836['oldMcpConfig'][_0x57278f(0x130)]};}return{'step':0x4,'label':_0x57278f(0x10b),'ok':!![],'detail':_0x57278f(0x138)};}catch(_0x3ea7db){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x3ea7db['message']};}}function execSkillsRemove(_0xe5a441){const _0x4220af=a69_0x25aa,_0x532cd2=runNpxSkillsRemove(_0xe5a441,{'stdio':_0x4220af(0x146)});return{'step':0x5,'label':_0x4220af(0x141),'ok':_0x532cd2['ok'],'detail':_0x532cd2['ok']?'lovrabet/lovrabet-skill\x20removed':_0x532cd2['error']??_0x4220af(0x124)+_0x532cd2[_0x4220af(0x15e)]};}function execSkillsAdd(_0x5e5a4b){const _0x67e23b=a69_0x25aa,_0x1cffd4=runNpxSkillsAddGlobal(_0x5e5a4b,_0x67e23b(0x128),{'stdio':_0x67e23b(0x146)});return{'step':0x6,'label':_0x67e23b(0x169),'ok':_0x1cffd4['ok'],'detail':_0x1cffd4['ok']?_0x67e23b(0x147):_0x1cffd4[_0x67e23b(0x14b)]??'exit\x20'+_0x1cffd4[_0x67e23b(0x15e)]};}function tryStat(_0xafa015){try{return statSync(_0xafa015);}catch{return undefined;}}function printSummary(_0x320183){const _0x196c89=a69_0x25aa;console['log'](''),console[_0x196c89(0x16d)](a69_0x5c2f83[_0x196c89(0x170)](_0x196c89(0x132))),console[_0x196c89(0x16d)]('');for(const _0x1fe6b6 of _0x320183){const _0x2d55b1=_0x1fe6b6['ok']?a69_0x5c2f83[_0x196c89(0x16c)]('OK'):a69_0x5c2f83[_0x196c89(0x13a)]('FAIL');console[_0x196c89(0x16d)]('\x20\x20'+_0x2d55b1+_0x196c89(0x123)+_0x1fe6b6[_0x196c89(0x129)]+':\x20'+_0x1fe6b6[_0x196c89(0x155)]);if(_0x1fe6b6[_0x196c89(0x154)])console[_0x196c89(0x16d)]('\x20\x20\x20\x20\x20\x20\x20'+a69_0x5c2f83[_0x196c89(0x12b)](_0x1fe6b6[_0x196c89(0x154)]));}console[_0x196c89(0x16d)]('');}export async function upgradeApp(_0x4fba8c,_0x35beca){const _0x5ea400=a69_0x25aa,_0x8a2664=process[_0x5ea400(0x14e)](),_0x474f77=analyse(_0x8a2664),_0x917e67=!_0x474f77[_0x5ea400(0x10c)]&&_0x474f77[_0x5ea400(0x172)][_0x5ea400(0x131)]===0x0&&!_0x474f77[_0x5ea400(0x122)]&&!_0x474f77['needsSkillSwap'];if(_0x917e67){console[_0x5ea400(0x16d)](a69_0x5c2f83[_0x5ea400(0x16c)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x474f77);const _0x3cbba8=_0x35beca[_0x5ea400(0x10a)]||_0x35beca['Y']||_0x4fba8c;if(!_0x3cbba8)try{const _0x242d0a=await askConfirm(_0x5ea400(0x11e));if(!_0x242d0a){console[_0x5ea400(0x16d)](a69_0x5c2f83[_0x5ea400(0x12b)](_0x5ea400(0x11b)));return;}}catch(_0x5cbb38){if(_0x5cbb38?.[_0x5ea400(0x12d)]===_0x5ea400(0x15d)){console['log'](a69_0x5c2f83[_0x5ea400(0x12b)](_0x5ea400(0x11b)));return;}throw _0x5cbb38;}const _0xbaa6f8=[],_0x1d1b60=a69_0x398037({'text':_0x5ea400(0x140),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0xd2615b=execConfigMigration(_0x474f77,_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0xd2615b),_0x1d1b60[_0xd2615b['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)](_0x5ea400(0x152)+(_0xd2615b[_0x5ea400(0x154)]??(_0xd2615b['ok']?_0x5ea400(0x12a):'failed')));const _0x29e6dc=resolve(_0x8a2664,'.lovrabet'),_0x7d3530=a69_0x398037({'text':_0x5ea400(0x116),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)]();if(existsSync(_0x29e6dc))try{rmSync(_0x29e6dc,{'recursive':!![],'force':!![]}),_0x7d3530[_0x5ea400(0x12f)](_0x5ea400(0x110)),_0xbaa6f8[_0x5ea400(0x14d)]({'step':0x2,'label':_0x5ea400(0x158),'ok':!![]});}catch(_0x5a4277){_0x7d3530[_0x5ea400(0x142)](_0x5ea400(0x150)+_0x5a4277[_0x5ea400(0x12d)]),_0xbaa6f8['push']({'step':0x2,'label':_0x5ea400(0x158),'ok':![],'detail':_0x5a4277['message']});}else _0x7d3530[_0x5ea400(0x14c)](_0x5ea400(0x10d)),_0xbaa6f8[_0x5ea400(0x14d)]({'step':0x2,'label':_0x5ea400(0x158),'ok':!![],'detail':_0x5ea400(0x171)});const _0x4dcb71=a69_0x398037({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x2b5b0d=execRemoveOldArtifacts(_0x474f77['oldArtifacts']);_0xbaa6f8[_0x5ea400(0x14d)](_0x2b5b0d),_0x4dcb71[_0x2b5b0d['ok']?'succeed':_0x5ea400(0x142)](_0x5ea400(0x114)+(_0x2b5b0d[_0x5ea400(0x154)]??(_0x2b5b0d['ok']?_0x5ea400(0x12a):_0x5ea400(0x15b))));const _0x2a5cd8=a69_0x398037({'text':_0x5ea400(0x113),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x55ad84=execCleanMcp(_0x474f77);_0xbaa6f8[_0x5ea400(0x14d)](_0x55ad84),_0x2a5cd8[_0x55ad84['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)](_0x5ea400(0x173)+(_0x55ad84[_0x5ea400(0x154)]??(_0x55ad84['ok']?'done':_0x5ea400(0x15b))));const _0x311712=a69_0x398037({'text':_0x5ea400(0x119),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0x5e9a64=execSkillsRemove(_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0x5e9a64),_0x311712[_0x5e9a64['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)]('Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20'+(_0x5e9a64[_0x5ea400(0x154)]??(_0x5e9a64['ok']?'done':_0x5ea400(0x15b))));const _0x1bfe30=a69_0x398037({'text':_0x5ea400(0x10f),'color':_0x5ea400(0x166)})[_0x5ea400(0x11a)](),_0xf39563=execSkillsAdd(_0x8a2664);_0xbaa6f8[_0x5ea400(0x14d)](_0xf39563),_0x1bfe30[_0xf39563['ok']?_0x5ea400(0x12f):_0x5ea400(0x142)]('Step\x206/6:\x20Install\x20new\x20skill\x20—\x20'+(_0xf39563['detail']??(_0xf39563['ok']?_0x5ea400(0x12a):_0x5ea400(0x15b)))),printSummary(_0xbaa6f8);const _0x21b410=_0xbaa6f8[_0x5ea400(0x11f)](_0x2ff72c=>!_0x2ff72c['ok']);_0x21b410?console['log'](a69_0x5c2f83[_0x5ea400(0x156)](_0x5ea400(0x163))):console[_0x5ea400(0x16d)](a69_0x5c2f83['green'](_0x5ea400(0x15c)));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a70_0x1d0c11=a70_0x1a89;function a70_0x1a89(_0x5b5304,_0x2b1ae5){_0x5b5304=_0x5b5304-0x1ca;const _0x43a2d1=a70_0x43a2();let _0x1a89f2=_0x43a2d1[_0x5b5304];return _0x1a89f2;}(function(_0x328f93,_0x3a64e3){const _0x1b92a4=a70_0x1a89,_0x1e69b8=_0x328f93();while(!![]){try{const _0x51296f=parseInt(_0x1b92a4(0x1d3))/0x1+-parseInt(_0x1b92a4(0x1df))/0x2*(parseInt(_0x1b92a4(0x1d5))/0x3)+parseInt(_0x1b92a4(0x1f6))/0x4*(parseInt(_0x1b92a4(0x1ce))/0x5)+parseInt(_0x1b92a4(0x1d0))/0x6*(-parseInt(_0x1b92a4(0x1e7))/0x7)+-parseInt(_0x1b92a4(0x1e8))/0x8*(parseInt(_0x1b92a4(0x1cc))/0x9)+parseInt(_0x1b92a4(0x1cb))/0xa+parseInt(_0x1b92a4(0x1d7))/0xb;if(_0x51296f===_0x3a64e3)break;else _0x1e69b8['push'](_0x1e69b8['shift']());}catch(_0x5761b2){_0x1e69b8['push'](_0x1e69b8['shift']());}}}(a70_0x43a2,0x1cfe9));import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';import{menuDefinitions}from'./menu/index.js';import{appDefinitions}from'./app/index.js';import{configDefinitions}from'./config/index.js';import{doctorDefinition}from'./doctor.js';import{updateDefinition}from'./cli-update.js';import{authDefinitions}from'./auth/index.js';import{logsDefinitions}from'./logs/index.js';function a70_0x43a2(){const _0x291f11=['create','SQL\x20Queries','Quick\x20Start','risk','2rOERuH','wildcardDef','command','App\x20Management','\x20\x20[write]','Run\x20any\x20package.json\x20script','Logs','logout','496286tiVoFN','851024hEGJMo','auth','install','project','from','API','commands','build','start','description','run','has','Dataset\x20&\x20Operations','Run\x20Scripts','92zopMxU','set','get','2033870NyBvFd','9yAbMYC','Project','9810EUiYZW','<script>','18ZZFwYK','isSingleCommand','push','60422YRYQgc','map','372459OXvnjt','preview','2783561PKachT','defaultCommand','service','Skills'];a70_0x43a2=function(){return _0x291f11;};return a70_0x43a2();}import{skillDefinitions}from'./skill/index.js';import{projectDefinitions}from'./project/index.js';import{initDefinitions}from'./init/index.js';import{runDefinition}from'./run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x556511){const _0x4058e6=a70_0x1a89;for(const _0x2acb7a of _0x556511){definitions['set'](_0x2acb7a['service']+':'+_0x2acb7a[_0x4058e6(0x1e1)],_0x2acb7a);let _0x4cd7b3=serviceGroups[_0x4058e6(0x1ca)](_0x2acb7a['service']);!_0x4cd7b3&&(_0x4cd7b3=[],serviceGroups[_0x4058e6(0x1f7)](_0x2acb7a[_0x4058e6(0x1d9)],_0x4cd7b3)),_0x4cd7b3[_0x4058e6(0x1d2)](_0x2acb7a);}}function registerDeclarativeService(_0x4e5a5d,_0x13c2f6,_0x2a995b){const _0x5d8226=a70_0x1a89;registerDefinitions(_0x13c2f6);_0x2a995b?.[_0x5d8226(0x1e0)]&®isterDefinitions([_0x2a995b[_0x5d8226(0x1e0)]]);const _0x132d78=_0xba020a=>_0xba020a==='read'?'':_0xba020a==='write'?_0x5d8226(0x1e3):'\x20\x20[high-risk-write]',_0x411d46={'service':_0x13c2f6[0x0][_0x5d8226(0x1d9)],'label':_0x4e5a5d,'commands':_0x13c2f6[_0x5d8226(0x1d4)](_0xe81b87=>({'command':_0xe81b87[_0x5d8226(0x1e1)],'description':_0xe81b87[_0x5d8226(0x1f1)],'tag':_0x132d78(_0xe81b87[_0x5d8226(0x1de)])})),'declarative':!![],'defaultCommand':_0x2a995b?.[_0x5d8226(0x1d8)]??(_0x2a995b?.[_0x5d8226(0x1d1)]?_0x13c2f6[0x0][_0x5d8226(0x1e1)]:undefined),'wildcardDef':_0x2a995b?.[_0x5d8226(0x1e0)],'isSingleCommand':_0x2a995b?.[_0x5d8226(0x1d1)]};serviceRegistry[_0x5d8226(0x1d2)](_0x411d46),serviceByName['set'](_0x411d46[_0x5d8226(0x1d9)],_0x411d46);}registerDeclarativeService(a70_0x1d0c11(0x1dd),initDefinitions,{'defaultCommand':a70_0x1d0c11(0x1f2),'isSingleCommand':!![]}),registerDeclarativeService(a70_0x1d0c11(0x1cd),projectDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1e2),appDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1f5),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a70_0x1d0c11(0x1ee)]=[{'command':a70_0x1d0c11(0x1cf),'description':a70_0x1d0c11(0x1e4),'tag':''}];}registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1ed),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1f4),datasetDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1dc),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1da),skillDefinitions),registerDeclarativeService(a70_0x1d0c11(0x1e5),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':a70_0x1d0c11(0x1eb),'command':a70_0x1d0c11(0x1db)},'start':{'service':'run','command':a70_0x1d0c11(0x1f0)},'build':{'service':a70_0x1d0c11(0x1f2),'command':a70_0x1d0c11(0x1ef)},'preview':{'service':a70_0x1d0c11(0x1f2),'command':a70_0x1d0c11(0x1d6)},'logout':{'service':a70_0x1d0c11(0x1e9),'command':a70_0x1d0c11(0x1e6)},'skills':{'service':'skill','command':a70_0x1d0c11(0x1ea)}};export function findDefinition(_0x3daf4a,_0x29e303){const _0x562fb4=a70_0x1d0c11;return definitions[_0x562fb4(0x1ca)](_0x3daf4a+':'+_0x29e303);}export function isKnownService(_0x5db068){const _0x233a7b=a70_0x1d0c11;return serviceByName[_0x233a7b(0x1f3)](_0x5db068);}export function isDeclarativeService(_0x233208){const _0x1131bf=a70_0x1d0c11;return serviceGroups[_0x1131bf(0x1f3)](_0x233208)||serviceByName[_0x1131bf(0x1ca)](_0x233208)?.[_0x1131bf(0x1e0)]!==undefined;}export function getServiceEntry(_0x532403){const _0x170851=a70_0x1d0c11;return serviceByName[_0x170851(0x1ca)](_0x532403);}export function getLegacyHandler(_0x152824,_0x2bc963){return undefined;}export function getAllDefinitions(){const _0x168969=a70_0x1d0c11;return Array[_0x168969(0x1ec)](definitions['values']());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x5d6a08=a71_0x272b;(function(_0x45b958,_0x54fd32){const _0x237b84=a71_0x272b,_0x519528=_0x45b958();while(!![]){try{const _0x3af620=-parseInt(_0x237b84(0x227))/0x1*(-parseInt(_0x237b84(0x232))/0x2)+-parseInt(_0x237b84(0x20d))/0x3+-parseInt(_0x237b84(0x21e))/0x4+-parseInt(_0x237b84(0x210))/0x5*(-parseInt(_0x237b84(0x1fe))/0x6)+-parseInt(_0x237b84(0x208))/0x7+parseInt(_0x237b84(0x226))/0x8*(parseInt(_0x237b84(0x203))/0x9)+parseInt(_0x237b84(0x21a))/0xa*(parseInt(_0x237b84(0x231))/0xb);if(_0x3af620===_0x54fd32)break;else _0x519528['push'](_0x519528['shift']());}catch(_0x2d6b83){_0x519528['push'](_0x519528['shift']());}}}(a71_0x2941,0xa13aa));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';function a71_0x272b(_0x5d7758,_0x33d43c){_0x5d7758=_0x5d7758-0x1f4;const _0x2941a6=a71_0x2941();let _0x272b70=_0x2941a6[_0x5d7758];return _0x272b70;}import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a71_0x5d6a08(0x224),a71_0x5d6a08(0x211)]);function a71_0x2941(){const _0x35790d=['vite\x20build\x20--watch\x20exited\x20with\x20code\x20','(none)','read','script','bun','length','\x0a\x20\x20Available\x20scripts:\x0a','preview','Enable\x20watch\x20mode\x20for\x20preview','Script\x20name\x20defined\x20in\x20package.json','1424592vccMbS','keys','pnpm','max','needsUpgrade','963yQFQBU','vite','yarn.lock','log','args','6472361DPVLYU','yarn','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','Script\x20\x22','vite\x20preview\x20exited\x20with\x20code\x20','1793079bTpMJR','error','node_modules','15eyyHQJ','dev','boolean','\x20run\x20','inherit','has','map','.bin','join','run','552730ljxzLH','\x20\x20\x20\x20','utf-8','push','1487296gaNsLk','bun.lock','\x20\x20EXAMPLES','cwd','\x20run\x20preview','watch','start','build','62272IwUxJt','45662WJHssk','close','No\x20scripts\x20defined\x20in\x20package.json.','padEnd','npm','\x20run\x20start','\x22\x20not\x20found\x20in\x20package.json.','No\x20package.json\x20found\x20in\x20current\x20directory.','entries','validation','110SaPdEt','20MCDulH'];a71_0x2941=function(){return _0x35790d;};return a71_0x2941();}function readPackageScripts(_0x4f92f8){const _0x27518e=a71_0x5d6a08,_0x4e8baa=resolve(_0x4f92f8,'package.json');if(!existsSync(_0x4e8baa))return null;try{const _0xc608bc=JSON['parse'](readFileSync(_0x4e8baa,_0x27518e(0x21c)));return _0xc608bc['scripts']??{};}catch{return null;}}function detectPackageManager(_0x467860){const _0x31e6c0=a71_0x5d6a08;if(existsSync(resolve(_0x467860,'bun.lockb'))||existsSync(resolve(_0x467860,_0x31e6c0(0x21f))))return _0x31e6c0(0x1f8);if(existsSync(resolve(_0x467860,'pnpm-lock.yaml')))return _0x31e6c0(0x200);if(existsSync(resolve(_0x467860,_0x31e6c0(0x205))))return _0x31e6c0(0x209);return _0x31e6c0(0x22b);}async function versionCheck(_0x15679f){const _0x79c53d=a71_0x5d6a08,_0x160e6b=await checkCliVersion();if(_0x160e6b[_0x79c53d(0x202)])printCliUpgradeWarning(_0x160e6b);const _0x32f091=await checkSdkVersion(_0x15679f);if(_0x32f091[_0x79c53d(0x202)])printSdkUpgradeWarning(_0x32f091);}function spawnScript(_0x834c5e,_0x415c5f,_0x42db65,_0x104fe9){return new Promise((_0x288d1b,_0x50b1d1)=>{const _0x568e1b=a71_0x272b,_0x15d44a=[_0x568e1b(0x219),_0x415c5f,..._0x42db65],_0x3f2795=spawn(_0x834c5e,_0x15d44a,{'cwd':_0x104fe9,'stdio':_0x568e1b(0x214),'shell':!![],'env':{...process.env,'PATH':''+join(_0x104fe9,_0x568e1b(0x20f),'.bin')+delimiter+process.env.PATH}});_0x3f2795['on'](_0x568e1b(0x228),_0x372d08=>{if(_0x372d08===0x0||_0x372d08===null)_0x288d1b();else _0x50b1d1(new Error(_0x834c5e+'\x20run\x20'+_0x415c5f+'\x20exited\x20with\x20code\x20'+_0x372d08));}),_0x3f2795['on']('error',_0x50b1d1);});}function spawnViteBuildWatch(_0x3be21a){return new Promise((_0x28fca7,_0x2f07e7)=>{const _0x9d4ef=a71_0x272b,_0x4b9bd2=spawn(_0x9d4ef(0x204),[_0x9d4ef(0x225),'--watch'],{'cwd':_0x3be21a,'stdio':_0x9d4ef(0x214),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3be21a,_0x9d4ef(0x20f),_0x9d4ef(0x217))+delimiter+process.env.PATH}});_0x4b9bd2['on'](_0x9d4ef(0x228),_0x981b4f=>{const _0x43b6e2=_0x9d4ef;if(_0x981b4f===0x0||_0x981b4f===null)_0x28fca7();else _0x2f07e7(new Error(_0x43b6e2(0x1f4)+_0x981b4f));}),_0x4b9bd2['on'](_0x9d4ef(0x20e),_0x2f07e7);});}function spawnVitePreview(_0x2287a2){return new Promise((_0x3e56b6,_0x963fbf)=>{const _0x2bb012=a71_0x272b,_0xd95e81=spawn(_0x2bb012(0x204),[_0x2bb012(0x1fb)],{'cwd':_0x2287a2,'stdio':_0x2bb012(0x214),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2287a2,_0x2bb012(0x20f),_0x2bb012(0x217))+delimiter+process.env.PATH}});_0xd95e81['on'](_0x2bb012(0x228),_0x35e0d1=>{const _0x4e6073=_0x2bb012;if(_0x35e0d1===0x0||_0x35e0d1===null)_0x3e56b6();else _0x963fbf(new Error(_0x4e6073(0x20c)+_0x35e0d1));}),_0xd95e81['on'](_0x2bb012(0x20e),_0x963fbf);});}const runFlags=[{'name':a71_0x5d6a08(0x223),'type':a71_0x5d6a08(0x212),'description':a71_0x5d6a08(0x1fc),'default':![]}];export const runDefinition={'service':a71_0x5d6a08(0x219),'command':a71_0x5d6a08(0x219),'description':'Run\x20a\x20package.json\x20script','risk':a71_0x5d6a08(0x1f6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a71_0x5d6a08(0x1f7),'description':a71_0x5d6a08(0x1fd),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x302cd9=a71_0x5d6a08,_0x27fdfe=readPackageScripts(process[_0x302cd9(0x221)]()),_0x2cf79c=[];if(_0x27fdfe&&Object['keys'](_0x27fdfe)['length']>0x0){const _0x43e3ed=Object['keys'](_0x27fdfe),_0x204992=Math[_0x302cd9(0x201)](..._0x43e3ed[_0x302cd9(0x216)](_0x58ab03=>_0x58ab03['length']));_0x2cf79c[_0x302cd9(0x21d)](_0x302cd9(0x20a));for(const [_0x5c22de,_0x52cd05]of Object[_0x302cd9(0x22f)](_0x27fdfe)){_0x2cf79c['push'](_0x302cd9(0x21b)+CLI_BIN_NAME+_0x302cd9(0x213)+_0x5c22de[_0x302cd9(0x22a)](_0x204992+0x2)+'#\x20'+_0x52cd05);}}else _0x2cf79c[_0x302cd9(0x21d)](_0x302cd9(0x220)),_0x2cf79c[_0x302cd9(0x21d)](_0x302cd9(0x21b)+CLI_BIN_NAME+_0x302cd9(0x22c)),_0x2cf79c[_0x302cd9(0x21d)](_0x302cd9(0x21b)+CLI_BIN_NAME+'\x20run\x20build'),_0x2cf79c[_0x302cd9(0x21d)](_0x302cd9(0x21b)+CLI_BIN_NAME+_0x302cd9(0x222)),_0x2cf79c['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x2cf79c[_0x302cd9(0x218)]('\x0a');},async 'execute'(_0x429360){const _0x400cd8=a71_0x5d6a08,_0x1cf816=process[_0x400cd8(0x221)](),_0x2dddea=_0x429360[_0x400cd8(0x207)][0x0],_0x2e2356=_0x429360['args']['slice'](0x1),_0x15c237=readPackageScripts(_0x1cf816);if(!_0x15c237)throw CliErrors[_0x400cd8(0x230)](_0x400cd8(0x22e));if(!_0x2dddea){const _0x4f2eb3=Object[_0x400cd8(0x1ff)](_0x15c237);if(_0x4f2eb3[_0x400cd8(0x1f9)]===0x0)console[_0x400cd8(0x206)](_0x400cd8(0x229));else{console[_0x400cd8(0x206)](_0x400cd8(0x1fa));const _0x316035=Math[_0x400cd8(0x201)](..._0x4f2eb3['map'](_0xd5805e=>_0xd5805e[_0x400cd8(0x1f9)]));for(const [_0x415474,_0x493a69]of Object[_0x400cd8(0x22f)](_0x15c237)){console[_0x400cd8(0x206)](_0x400cd8(0x21b)+_0x415474[_0x400cd8(0x22a)](_0x316035+0x2)+_0x493a69);}console['log']('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x15c237[_0x2dddea])throw CliErrors['validation'](_0x400cd8(0x20b)+_0x2dddea+_0x400cd8(0x22d),'Available:\x20'+(Object[_0x400cd8(0x1ff)](_0x15c237)['join'](',\x20')||_0x400cd8(0x1f5)));const _0x8fb695=detectPackageManager(_0x1cf816);VERSION_CHECK_SCRIPTS[_0x400cd8(0x215)](_0x2dddea)&&await versionCheck(_0x1cf816);if(_0x2dddea===_0x400cd8(0x1fb)&&_0x429360['bool']('watch'))return await Promise['all']([spawnViteBuildWatch(_0x1cf816),spawnVitePreview(_0x1cf816)]),{'ok':!![]};return await spawnScript(_0x8fb695,_0x2dddea,_0x2e2356,_0x1cf816),{'ok':!![]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a72_0x131873=a72_0x5803;(function(_0x3307e3,_0x4eb5bc){const _0x38c8a1=a72_0x5803,_0x1a9c20=_0x3307e3();while(!![]){try{const _0x5cbb19=-parseInt(_0x38c8a1(0xf9))/0x1+-parseInt(_0x38c8a1(0xef))/0x2+-parseInt(_0x38c8a1(0x103))/0x3*(-parseInt(_0x38c8a1(0xf2))/0x4)+-parseInt(_0x38c8a1(0xf5))/0x5+-parseInt(_0x38c8a1(0xfc))/0x6+parseInt(_0x38c8a1(0xe6))/0x7*(parseInt(_0x38c8a1(0xe8))/0x8)+-parseInt(_0x38c8a1(0xed))/0x9*(-parseInt(_0x38c8a1(0x102))/0xa);if(_0x5cbb19===_0x4eb5bc)break;else _0x1a9c20['push'](_0x1a9c20['shift']());}catch(_0x13c7b8){_0x1a9c20['push'](_0x1a9c20['shift']());}}}(a72_0x5c84,0xe8b8f));import{CliErrors}from'../../errors.js';function a72_0x5803(_0x3b5d15,_0x2c008e){_0x3b5d15=_0x3b5d15-0xe5;const _0x5c84ec=a72_0x5c84();let _0x5803ef=_0x5c84ec[_0x3b5d15];return _0x5803ef;}function a72_0x5c84(){const _0x312d06=['skipped','7548940oVEOGE','cwd','info','inherit','1863408KxgRtH','skill','log','431412JZBnen','Install\x20developer\x20skill\x20package','npx\x20skills\x20add\x20failed:\x20','Check\x20network\x20connectivity\x20and\x20try\x20again.','pipe','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','30gGDPoE','24ppifEp','../../skills/npx-skills-add.js','lovrabet/rabetbase','unknown','7AjoHjS','error','7214000DIQdTS','write','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','nonInteractive','install','13852107vPkcZY','\x20skill\x20installed','2836844veDDDy','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','apiError','148816YbNdts','skill-install'];a72_0x5c84=function(){return _0x312d06;};return a72_0x5c84();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a72_0x131873(0xfa),'command':a72_0x131873(0xec),'description':a72_0x131873(0xfd),'risk':a72_0x131873(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5e643b){const _0x179c39=a72_0x131873;logger['setLogPath'](process[_0x179c39(0xf6)]()),logger[_0x179c39(0xf7)](_0x179c39(0xf3),_0x179c39(0x101));const {runNpxSkillsAddGlobal:_0x3fba3b}=await import(_0x179c39(0x104)),_0xce61bf=_0x5e643b[_0x179c39(0xeb)]?_0x179c39(0x100):_0x179c39(0xf8);console[_0x179c39(0xfb)](_0x179c39(0xea));const _0x37a14e=_0x3fba3b(process[_0x179c39(0xf6)](),_0x179c39(0x105),{'stdio':_0xce61bf});if(_0x37a14e[_0x179c39(0xf4)])console['log'](_0x179c39(0xf0));else{if(_0x37a14e['ok'])console['log'](CLI_BIN_NAME+_0x179c39(0xee));else throw CliErrors[_0x179c39(0xf1)](_0x179c39(0xfe)+(_0x37a14e[_0x179c39(0xe7)]||_0x179c39(0xe5)),_0x179c39(0xff));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x54796c=a73_0x16b2;function a73_0x16b2(_0x200a62,_0x3b24d7){_0x200a62=_0x200a62-0x10c;const _0x2f703e=a73_0x2f70();let _0x16b2df=_0x2f703e[_0x200a62];return _0x16b2df;}(function(_0x5ed2e8,_0x3f56a5){const _0x50816b=a73_0x16b2,_0x4e6f82=_0x5ed2e8();while(!![]){try{const _0x2170d0=-parseInt(_0x50816b(0x118))/0x1*(parseInt(_0x50816b(0x116))/0x2)+-parseInt(_0x50816b(0x110))/0x3+parseInt(_0x50816b(0x115))/0x4*(parseInt(_0x50816b(0x10c))/0x5)+-parseInt(_0x50816b(0x121))/0x6+parseInt(_0x50816b(0x120))/0x7+parseInt(_0x50816b(0x10d))/0x8+parseInt(_0x50816b(0x11a))/0x9*(-parseInt(_0x50816b(0x117))/0xa);if(_0x2170d0===_0x3f56a5)break;else _0x4e6f82['push'](_0x4e6f82['shift']());}catch(_0x54025b){_0x4e6f82['push'](_0x4e6f82['shift']());}}}(a73_0x2f70,0x96d3d));import{getSqlQueryInfo}from'../../core/api-client.js';function a73_0x2f70(){const _0x5eb508=['detail','1380392ciWXDv','18ySyEnx','502130EaNFrq','45326xuLbdf','read','72BLdFCj','boolean','Return\x20full\x20raw\x20SQL\x20query\x20object','sqlCode','description','dbId','8209257EePtTW','6099930rnUApf','sqlContent','appCode','str','bool','15uVeRED','8352872JGNCap','sql','sqlcode','2424216odfNtI','sqlName','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','verbose'];a73_0x2f70=function(){return _0x5eb508;};return a73_0x2f70();}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';export const sqlDetail={'service':a73_0x54796c(0x10e),'command':a73_0x54796c(0x114),'description':a73_0x54796c(0x112),'risk':a73_0x54796c(0x119),'flags':[SQLCODE_FLAG,{'name':a73_0x54796c(0x113),'type':a73_0x54796c(0x11b),'description':a73_0x54796c(0x11c)}],async 'execute'(_0x49dfa6){const _0x2906b3=a73_0x54796c,_0x59e7e6=await getSqlQueryInfo(_0x49dfa6[_0x2906b3(0x123)],_0x49dfa6[_0x2906b3(0x124)](_0x2906b3(0x10f))),_0x418856=_0x49dfa6[_0x2906b3(0x125)]('verbose');if(_0x418856)return{'ok':!![],'data':_0x59e7e6};const _0x1ab8bf=_0x59e7e6[_0x2906b3(0x11f)]?await getDbName(_0x49dfa6[_0x2906b3(0x123)],_0x59e7e6[_0x2906b3(0x11f)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x59e7e6[_0x2906b3(0x11d)],'sqlName':_0x59e7e6[_0x2906b3(0x111)],'db':_0x1ab8bf?_0x1ab8bf+'\x20('+_0x59e7e6[_0x2906b3(0x11f)]+')':_0x59e7e6[_0x2906b3(0x11f)]??'','description':_0x59e7e6[_0x2906b3(0x11e)]??'','sqlContent':_0x59e7e6[_0x2906b3(0x122)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a74_0x434d(){const _0x46891a=['601730QjSwHA','2490YMHjan','str','isArray','3540340oknxhJ','60jcEfux','appCode','execResult','9XygcMd','sql','2783711YQbtlf','read','3068219WkwoPG','execError','params','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','execSuccess','\x20row(s)\x20in\x20','Invalid\x20JSON\x20for\x20--params:\x20','parse','61850KOjuVr','8CSXHgu','length','40eGzwxN','now','sqlcode','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','SQL\x20execution\x20failed','5804694cLxHCO','1959klqhJW'];a74_0x434d=function(){return _0x46891a;};return a74_0x434d();}const a74_0xccf23f=a74_0x13d7;(function(_0x18fdbb,_0x72ab12){const _0xe9b753=a74_0x13d7,_0x1ecf8f=_0x18fdbb();while(!![]){try{const _0x1132e7=-parseInt(_0xe9b753(0xa0))/0x1+-parseInt(_0xe9b753(0xa1))/0x2*(parseInt(_0xe9b753(0x9f))/0x3)+parseInt(_0xe9b753(0xb7))/0x4*(-parseInt(_0xe9b753(0xb4))/0x5)+parseInt(_0xe9b753(0x9e))/0x6+parseInt(_0xe9b753(0xaa))/0x7*(-parseInt(_0xe9b753(0xb5))/0x8)+-parseInt(_0xe9b753(0xa8))/0x9*(-parseInt(_0xe9b753(0xa4))/0xa)+parseInt(_0xe9b753(0xac))/0xb*(parseInt(_0xe9b753(0xa5))/0xc);if(_0x1132e7===_0x72ab12)break;else _0x1ecf8f['push'](_0x1ecf8f['shift']());}catch(_0xc5918d){_0x1ecf8f['push'](_0x1ecf8f['shift']());}}}(a74_0x434d,0xbe708));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../common/flags.js';function a74_0x13d7(_0x136e6b,_0x88f84b){_0x136e6b=_0x136e6b-0x9b;const _0x434d2a=a74_0x434d();let _0x13d70b=_0x434d2a[_0x136e6b];return _0x13d70b;}export const sqlExec={'service':a74_0xccf23f(0xa9),'command':'exec','description':a74_0xccf23f(0x9c),'risk':a74_0xccf23f(0xab),'flags':[SQLCODE_FLAG,{'name':a74_0xccf23f(0xae),'type':'string','description':a74_0xccf23f(0xaf)}],async 'execute'(_0x286a1d){const _0x2cdb52=a74_0xccf23f;let _0x4a0fb9;const _0x26d6c3=_0x286a1d['str'](_0x2cdb52(0xae));if(_0x26d6c3)try{_0x4a0fb9=JSON[_0x2cdb52(0xb3)](_0x26d6c3);}catch{throw CliErrors['validation'](_0x2cdb52(0xb2)+_0x26d6c3);}const _0x4d4c83=Date[_0x2cdb52(0xb8)](),_0x121b60=await executeSql(_0x286a1d[_0x2cdb52(0xa6)],_0x286a1d[_0x2cdb52(0xa2)](_0x2cdb52(0x9b)),_0x4a0fb9),_0x3f6f27=Date[_0x2cdb52(0xb8)]()-_0x4d4c83,_0x1c9973=_0x121b60?.[_0x2cdb52(0xa7)]??_0x121b60,_0xa7e4a2=_0x121b60?.[_0x2cdb52(0xb0)]??!![];if(!_0xa7e4a2)return{'ok':![],'data':{'error':_0x121b60?.[_0x2cdb52(0xad)]||_0x2cdb52(0x9d),'elapsed':_0x3f6f27},'message':_0x2cdb52(0x9d)};const _0xb9cdd8=Array[_0x2cdb52(0xa3)](_0x1c9973)?_0x1c9973:[];return{'ok':!![],'data':{'rows':_0xb9cdd8,'rowCount':_0xb9cdd8['length'],'elapsed':_0x3f6f27},'message':'Returned\x20'+_0xb9cdd8[_0x2cdb52(0xb6)]+_0x2cdb52(0xb1)+_0x3f6f27+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a75_0x48a6(){const _0x30916a=['294nQeKSN','1998260isliXn','27SpyPDK','622674kPzciL','634GshjzN','32134lBsBqC','1498266lqHQJH','1585644NEuMvx','3178424rTxxEr'];a75_0x48a6=function(){return _0x30916a;};return a75_0x48a6();}(function(_0x552eb2,_0x22a27f){const _0x198ac5=a75_0x206e,_0x2f1789=_0x552eb2();while(!![]){try{const _0x214130=parseInt(_0x198ac5(0x11f))/0x1+parseInt(_0x198ac5(0x11e))/0x2*(-parseInt(_0x198ac5(0x11a))/0x3)+-parseInt(_0x198ac5(0x121))/0x4+-parseInt(_0x198ac5(0x11b))/0x5+parseInt(_0x198ac5(0x11d))/0x6+-parseInt(_0x198ac5(0x120))/0x7+-parseInt(_0x198ac5(0x119))/0x8*(-parseInt(_0x198ac5(0x11c))/0x9);if(_0x214130===_0x22a27f)break;else _0x2f1789['push'](_0x2f1789['shift']());}catch(_0x9ae5ba){_0x2f1789['push'](_0x2f1789['shift']());}}}(a75_0x48a6,0x45fbf));import{sqlList}from'./list.js';import{sqlDetail}from'./detail.js';import{sqlValidate}from'./validate.js';function a75_0x206e(_0x2e55f7,_0x592e3d){_0x2e55f7=_0x2e55f7-0x119;const _0x48a6e0=a75_0x48a6();let _0x206eab=_0x48a6e0[_0x2e55f7];return _0x206eab;}import{sqlSave}from'./save.js';import{sqlExec}from'./exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
|
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x5b763b=a76_0x2ce4;(function(_0xcbd811,_0x39b3c6){const _0x322fa6=a76_0x2ce4,_0x5b2ec0=_0xcbd811();while(!![]){try{const _0x200d33=parseInt(_0x322fa6(0x1d7))/0x1+parseInt(_0x322fa6(0x1d8))/0x2+parseInt(_0x322fa6(0x1d1))/0x3*(-parseInt(_0x322fa6(0x1ce))/0x4)+parseInt(_0x322fa6(0x1e2))/0x5+parseInt(_0x322fa6(0x1e0))/0x6*(-parseInt(_0x322fa6(0x1e3))/0x7)+-parseInt(_0x322fa6(0x1eb))/0x8+parseInt(_0x322fa6(0x1e6))/0x9;if(_0x200d33===_0x39b3c6)break;else _0x5b2ec0['push'](_0x5b2ec0['shift']());}catch(_0x346435){_0x5b2ec0['push'](_0x5b2ec0['shift']());}}}(a76_0x1dbe,0xe5995));function a76_0x1dbe(){const _0x413f41=['10806EEFSGG','description','1016380qChBGP','4207bpOwXw','num','appCode','13937751pzEArW','string','Filter\x20by\x20SQL\x20name','paging','list','3401440rANUlQ','all','totalCount','dbId','sql','str','name','sqlcode','125276FXkybx','number','pagesize','96FBfFTY','No\x20custom\x20SQL\x20queries\x20found.','List\x20custom\x20SQL\x20queries','Page\x20number','verbose','length','1055374zKFwZr','1285874mzcJIm','read','Found\x20','Page\x20size','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','page','\x20SQL\x20queries\x20(total:\x20','map'];a76_0x1dbe=function(){return _0x413f41;};return a76_0x1dbe();}import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a76_0x2ce4(_0x3f0aa6,_0x52c8ec){_0x3f0aa6=_0x3f0aa6-0x1c7;const _0x1dbe41=a76_0x1dbe();let _0x2ce4d0=_0x1dbe41[_0x3f0aa6];return _0x2ce4d0;}import{SQLCODE_FLAG_OPTIONAL}from'../common/flags.js';export const sqlList={'service':a76_0x5b763b(0x1ca),'command':a76_0x5b763b(0x1ea),'description':a76_0x5b763b(0x1d3),'risk':a76_0x5b763b(0x1d9),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a76_0x5b763b(0x1e7),'description':a76_0x5b763b(0x1e8)},{'name':'page','type':'number','description':a76_0x5b763b(0x1d4),'default':0x1},{'name':a76_0x5b763b(0x1d0),'type':a76_0x5b763b(0x1cf),'description':a76_0x5b763b(0x1db)},{'name':a76_0x5b763b(0x1d5),'type':'boolean','description':a76_0x5b763b(0x1dc)}],async 'execute'(_0x389ffd){const _0x1ee1e9=a76_0x5b763b,_0x582f82=await listSqlQueries(_0x389ffd['appCode'],{'sqlCode':_0x389ffd[_0x1ee1e9(0x1cb)](_0x1ee1e9(0x1cd))||undefined,'sqlName':_0x389ffd[_0x1ee1e9(0x1cb)](_0x1ee1e9(0x1cc))||undefined,'currentPage':_0x389ffd[_0x1ee1e9(0x1e4)](_0x1ee1e9(0x1dd)),'pageSize':_0x389ffd[_0x1ee1e9(0x1e4)](_0x1ee1e9(0x1d0),0x32)}),_0x5d717a=_0x389ffd['bool'](_0x1ee1e9(0x1d5)),_0xecdf0a=_0x582f82['tableData']??[],_0x1377b7=_0x582f82[_0x1ee1e9(0x1e9)]?.[_0x1ee1e9(0x1c8)]??_0xecdf0a[_0x1ee1e9(0x1d6)];let _0x1e68f5;return _0x5d717a?_0x1e68f5=_0xecdf0a:_0x1e68f5=await Promise[_0x1ee1e9(0x1c7)](_0xecdf0a[_0x1ee1e9(0x1df)](async _0x1dd890=>{const _0x278578=_0x1ee1e9,_0x1ece24=_0x1dd890[_0x278578(0x1c9)]?await getDbName(_0x389ffd[_0x278578(0x1e5)],_0x1dd890[_0x278578(0x1c9)]):undefined;return{'sqlCode':_0x1dd890['sqlCode'],'sqlName':_0x1dd890['sqlName'],'description':_0x1dd890[_0x278578(0x1e1)]??'','db':_0x1ece24?_0x1ece24+'\x20('+_0x1dd890[_0x278578(0x1c9)]+')':_0x1dd890[_0x278578(0x1c9)]??''};})),{'ok':!![],'data':_0x1e68f5,'message':_0xecdf0a[_0x1ee1e9(0x1d6)]===0x0?_0x1ee1e9(0x1d2):_0x1ee1e9(0x1da)+_0xecdf0a[_0x1ee1e9(0x1d6)]+_0x1ee1e9(0x1de)+_0x1377b7+').'};}};
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x8e6134=a77_0xb997;(function(_0xbe361e,_0x10a9a9){const _0x44bf18=a77_0xb997,_0x2f4f88=_0xbe361e();while(!![]){try{const _0x4c3409=parseInt(_0x44bf18(0xe5))/0x1+parseInt(_0x44bf18(0xf1))/0x2*(parseInt(_0x44bf18(0x107))/0x3)+parseInt(_0x44bf18(0xe4))/0x4*(-parseInt(_0x44bf18(0xef))/0x5)+-parseInt(_0x44bf18(0x109))/0x6*(-parseInt(_0x44bf18(0xde))/0x7)+-parseInt(_0x44bf18(0xfc))/0x8+parseInt(_0x44bf18(0xfb))/0x9+-parseInt(_0x44bf18(0xdb))/0xa;if(_0x4c3409===_0x10a9a9)break;else _0x2f4f88['push'](_0x2f4f88['shift']());}catch(_0x5eff24){_0x2f4f88['push'](_0x2f4f88['shift']());}}}(a77_0x3a20,0x502cb));function a77_0xb997(_0x592fba,_0x1beb26){_0x592fba=_0x592fba-0xd9;const _0x3a208b=a77_0x3a20();let _0xb99761=_0x3a208b[_0x592fba];return _0xb99761;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';function a77_0x3a20(){const _0x1e2496=['Created','\x20successfully','\x20|\x20Params:\x20','5484EdRlvN','created','654FgUXYC','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','join','file','type','utf-8','Save\x20SQL\x20query\x20from\x20','7015800ibDaNT','N/A','parameters','17619VMXjvt','message','/api/node-toolbox/sql/save','SQL\x20query\x20display\x20name','cwd','action','4eWlUnH','289218AsXWVv','Path\x20to\x20the\x20SQL\x20file','length','sqlType','validation','File\x20not\x20found:\x20','sqlcode','SQL\x20query\x20description','string','sqlname','2908005RPLeOD','\x20|\x20Tables:\x20','694dQohJv','str','sqlCode','none','blocked','write','description','dbId','tables','sqlName','4800807kzLigU','957872YAFwdK','dbName','appCode','SQL\x20validation\x20failed:\x20','\x20chars)','POST','sql','save'];a77_0x3a20=function(){return _0x1e2496;};return a77_0x3a20();}import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../common/flags.js';export const sqlSave={'service':a77_0x8e6134(0x102),'command':a77_0x8e6134(0x103),'description':a77_0x8e6134(0x10a),'risk':a77_0x8e6134(0xf6),'flags':[{'name':a77_0x8e6134(0x10c),'type':a77_0x8e6134(0xed),'required':!![],'description':a77_0x8e6134(0xe6)},SQLCODE_FLAG_OPTIONAL,{'name':a77_0x8e6134(0xee),'type':a77_0x8e6134(0xed),'description':a77_0x8e6134(0xe1)},{'name':'db','type':a77_0x8e6134(0xed),'description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':a77_0x8e6134(0xf7),'type':a77_0x8e6134(0xed),'description':a77_0x8e6134(0xec)}],async 'validate'(_0x33f09d){const _0x462b5e=a77_0x8e6134,_0x14661a=resolve(process[_0x462b5e(0xe2)](),_0x33f09d[_0x462b5e(0xf2)](_0x462b5e(0x10c)));if(!existsSync(_0x14661a))throw CliErrors[_0x462b5e(0xe9)](_0x462b5e(0xea)+_0x14661a);const _0x49ac94=readFileSync(_0x14661a,_0x462b5e(0xd9)),_0x290bbd=validateSql(_0x49ac94);if(!_0x290bbd['valid'])throw CliErrors[_0x462b5e(0xe9)](_0x462b5e(0xff)+_0x290bbd['message']);},async 'dryRun'(_0x4da4b7){const _0x41142f=a77_0x8e6134,_0x1c9927=resolve(process[_0x41142f(0xe2)](),_0x4da4b7[_0x41142f(0xf2)](_0x41142f(0x10c))),_0x3eee13=readFileSync(_0x1c9927,_0x41142f(0xd9)),_0x377d9d=validateSql(_0x3eee13),_0x50209e=_0x4da4b7[_0x41142f(0xf2)]('db')||undefined,{db:_0x1bef8a,error:_0x40ef27}=await resolveOneDb(_0x4da4b7[_0x41142f(0xfe)],_0x50209e);return{'method':_0x41142f(0x101),'url':_0x41142f(0xe0),'body':{'appCode':_0x4da4b7[_0x41142f(0xfe)],'sqlContent':'('+_0x3eee13[_0x41142f(0xe7)]+_0x41142f(0x100),'sqlCode':_0x4da4b7[_0x41142f(0xf2)](_0x41142f(0xeb))||undefined,'sqlName':_0x4da4b7[_0x41142f(0xf2)](_0x41142f(0xee))||undefined,'db':_0x1bef8a?_0x1bef8a[_0x41142f(0xfd)]+'\x20('+_0x1bef8a[_0x41142f(0xf8)]+')':_0x40ef27},'description':[_0x41142f(0xda)+_0x4da4b7[_0x41142f(0xf2)](_0x41142f(0x10c)),'Validation:\x20'+_0x377d9d['message'],'Type:\x20'+_0x377d9d[_0x41142f(0xe8)][_0x41142f(0x10d)]+_0x41142f(0xf0)+(_0x377d9d[_0x41142f(0xf9)][_0x41142f(0x10b)](',\x20')||_0x41142f(0xdc))+_0x41142f(0x106)+(_0x377d9d[_0x41142f(0xdd)]['join'](',\x20')||_0x41142f(0xf4))]['join']('\x0a')};},async 'execute'(_0x2e2c7e){const _0x4da960=a77_0x8e6134,_0x4d1534=resolve(process[_0x4da960(0xe2)](),_0x2e2c7e[_0x4da960(0xf2)](_0x4da960(0x10c))),_0xed27cf=readFileSync(_0x4d1534,'utf-8'),_0x322d83=_0x2e2c7e['str']('db')||undefined,{db:_0x34fb80,error:_0x3ab19f}=await resolveOneDb(_0x2e2c7e[_0x4da960(0xfe)],_0x322d83);if(_0x3ab19f)throw CliErrors[_0x4da960(0xe9)](_0x3ab19f);const _0x5c8a70=await saveSqlQuery({'appCode':_0x2e2c7e['appCode'],'sqlContent':_0xed27cf,'sqlCode':_0x2e2c7e['str'](_0x4da960(0xeb))||undefined,'sqlName':_0x2e2c7e[_0x4da960(0xf2)](_0x4da960(0xee))||undefined,'dbId':_0x34fb80[_0x4da960(0xf8)],'description':_0x2e2c7e[_0x4da960(0xf2)](_0x4da960(0xf7))||undefined});if(_0x5c8a70[_0x4da960(0xf5)])return{'ok':![],'data':_0x5c8a70,'message':_0x5c8a70[_0x4da960(0xdf)]||'Conflict\x20detected'};return{'ok':!![],'data':{'sqlCode':_0x5c8a70[_0x4da960(0xf3)],'sqlName':_0x5c8a70[_0x4da960(0xfa)],'action':_0x5c8a70[_0x4da960(0xe3)]},'message':(_0x5c8a70['action']===_0x4da960(0x108)?_0x4da960(0x104):'Updated')+_0x4da960(0x105)+(_0x5c8a70[_0x4da960(0xf3)]?'\x20('+_0x5c8a70[_0x4da960(0xf3)]+')':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x51e29d=a78_0x49af;(function(_0xb080cb,_0x3d422){const _0x5bdd6e=a78_0x49af,_0x32b94f=_0xb080cb();while(!![]){try{const _0x32ccb6=-parseInt(_0x5bdd6e(0x1aa))/0x1+parseInt(_0x5bdd6e(0x1a4))/0x2+-parseInt(_0x5bdd6e(0x1b7))/0x3+parseInt(_0x5bdd6e(0x19e))/0x4+parseInt(_0x5bdd6e(0x1b0))/0x5*(-parseInt(_0x5bdd6e(0x19d))/0x6)+-parseInt(_0x5bdd6e(0x1a7))/0x7+-parseInt(_0x5bdd6e(0x1a2))/0x8*(-parseInt(_0x5bdd6e(0x190))/0x9);if(_0x32ccb6===_0x3d422)break;else _0x32b94f['push'](_0x32b94f['shift']());}catch(_0xc94d2e){_0x32b94f['push'](_0x32b94f['shift']());}}}(a78_0x38f3,0x4692e));function a78_0x49af(_0xc0e95a,_0x71bf91){_0xc0e95a=_0xc0e95a-0x190;const _0x38f30c=a78_0x38f3();let _0x49afac=_0x38f30c[_0xc0e95a];return _0x49afac;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a78_0x38f3(){const _0x242f56=['Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','isSelectOnly','228aQjNxd','1036FBPIJI','validate','parameters','name','829744GTMQPS','fields','690358tUZkJx','validation','reason','2845227kEAlJD','read','push','291063skDWwC','sqlType','flagMissing','split','Dataset\x20\x22','dbtableConfig','33945RkkTia','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','file','from','map','\x22\x20not\x20found\x20or\x20not\x20accessible','appCode','1347588MvvyRD','message','sql','schemaWarnings','utf-8','tableName','trim','isDangerous','\x22\x20not\x20found\x20in\x20any\x20dataset','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','length','File\x20not\x20found:\x20','valid','117rIhkJh','string','Table\x20\x22','filter','tables','toLowerCase','schema:','type','get','str','schemas'];a78_0x38f3=function(){return _0x242f56;};return a78_0x38f3();}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a78_0x51e29d(0x1b9),'command':a78_0x51e29d(0x19f),'description':a78_0x51e29d(0x19b),'risk':a78_0x51e29d(0x1a8),'flags':[{'name':a78_0x51e29d(0x1b2),'type':a78_0x51e29d(0x191),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a78_0x51e29d(0x1b9),'type':a78_0x51e29d(0x191),'description':a78_0x51e29d(0x1b1)},{'name':'schemas','type':a78_0x51e29d(0x191),'description':a78_0x51e29d(0x1c0)}],async 'execute'(_0x4a5850){const _0xfa4383=a78_0x51e29d,_0x2b21a3=_0x4a5850[_0xfa4383(0x199)](_0xfa4383(0x1b2)),_0x1b9a2d=_0x4a5850[_0xfa4383(0x199)](_0xfa4383(0x1b9));if(!_0x2b21a3&&!_0x1b9a2d)throw CliErrors[_0xfa4383(0x1ac)](_0xfa4383(0x1b2),'Provide\x20--file\x20or\x20--sql');let _0x49062c;if(_0x2b21a3){const _0x38ce1e=resolve(process['cwd'](),_0x2b21a3);if(!existsSync(_0x38ce1e))throw CliErrors[_0xfa4383(0x1a5)](_0xfa4383(0x1c2)+_0x38ce1e);_0x49062c=readFileSync(_0x38ce1e,_0xfa4383(0x1bb));}else _0x49062c=_0x1b9a2d;const _0x11d12d=validateSql(_0x49062c),_0x50852d={'valid':_0x11d12d[_0xfa4383(0x1c3)],'sqlType':_0x11d12d['sqlType'][_0xfa4383(0x197)],'isSelectOnly':_0x11d12d[_0xfa4383(0x1ab)][_0xfa4383(0x19c)],'isDangerous':_0x11d12d[_0xfa4383(0x1ab)][_0xfa4383(0x1be)],'tables':_0x11d12d['tables'],'parameters':_0x11d12d[_0xfa4383(0x1a0)],'message':_0x11d12d[_0xfa4383(0x1b8)]};_0x11d12d[_0xfa4383(0x1ab)][_0xfa4383(0x1a6)]&&(_0x50852d[_0xfa4383(0x1a6)]=_0x11d12d[_0xfa4383(0x1ab)][_0xfa4383(0x1a6)]);const _0x44c46d=_0x4a5850['str'](_0xfa4383(0x19a));if(_0x44c46d&&_0x11d12d[_0xfa4383(0x1c3)]){const _0x58c531=_0x44c46d[_0xfa4383(0x1ad)](',')['map'](_0x1baf57=>_0x1baf57[_0xfa4383(0x1bd)]())[_0xfa4383(0x193)](Boolean),_0xcf11b3=[],_0x24e4eb=await listDatasets(_0x4a5850[_0xfa4383(0x1b6)]),_0x5f117c=new Map(_0x24e4eb[_0xfa4383(0x1b4)](_0x5acb29=>[_0x5acb29[_0xfa4383(0x1af)]?.[_0xfa4383(0x1bc)]?.[_0xfa4383(0x195)](),_0x5acb29]));for(const _0xb1b606 of _0x11d12d[_0xfa4383(0x194)]){const _0x31922b=_0x5f117c[_0xfa4383(0x198)](_0xb1b606['toLowerCase']());!_0x31922b&&_0xcf11b3[_0xfa4383(0x1a9)](_0xfa4383(0x192)+_0xb1b606+_0xfa4383(0x1bf));}for(const _0x3d4f92 of _0x58c531){try{const _0x130d3f=await getDatasetDetail(_0x3d4f92),_0xc07ad4=Array['isArray'](_0x130d3f[_0xfa4383(0x1a3)])?_0x130d3f[_0xfa4383(0x1a3)]:[],_0x2af4d5=new Set(_0xc07ad4['map'](_0x41b7ab=>_0x41b7ab[_0xfa4383(0x1a1)]?.[_0xfa4383(0x195)]())),_0x267749=_0x130d3f[_0xfa4383(0x1af)]?.[_0xfa4383(0x1bc)]||_0x130d3f[_0xfa4383(0x1bc)]||_0x3d4f92;_0x50852d[_0xfa4383(0x196)+_0x267749]={'code':_0x3d4f92,'tableName':_0x267749,'fieldCount':_0x2af4d5['size'],'fields':Array[_0xfa4383(0x1b3)](_0x2af4d5)};}catch{_0xcf11b3[_0xfa4383(0x1a9)](_0xfa4383(0x1ae)+_0x3d4f92+_0xfa4383(0x1b5));}}_0xcf11b3[_0xfa4383(0x1c1)]>0x0&&(_0x50852d[_0xfa4383(0x1ba)]=_0xcf11b3);}return{'ok':_0x11d12d['valid'],'data':_0x50852d,'message':_0x11d12d[_0xfa4383(0x1b8)]};}};
|
package/lib/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a79_0x4b9c68=a79_0x1666;(function(_0x1402e2,_0xf8c9ea){const _0x4ca7b0=a79_0x1666,_0x25e94e=_0x1402e2();while(!![]){try{const _0x4d8f13=-parseInt(_0x4ca7b0(0x112))/0x1*(-parseInt(_0x4ca7b0(0x115))/0x2)+parseInt(_0x4ca7b0(0x122))/0x3*(-parseInt(_0x4ca7b0(0x123))/0x4)+parseInt(_0x4ca7b0(0x120))/0x5+parseInt(_0x4ca7b0(0x11a))/0x6*(parseInt(_0x4ca7b0(0x11c))/0x7)+-parseInt(_0x4ca7b0(0x11b))/0x8*(parseInt(_0x4ca7b0(0x11e))/0x9)+parseInt(_0x4ca7b0(0x114))/0xa*(-parseInt(_0x4ca7b0(0x117))/0xb)+parseInt(_0x4ca7b0(0x119))/0xc;if(_0x4d8f13===_0xf8c9ea)break;else _0x25e94e['push'](_0x25e94e['shift']());}catch(_0x47ffd8){_0x25e94e['push'](_0x25e94e['shift']());}}}(a79_0x34fb,0xc22c0));import{execa}from'execa';function a79_0x1666(_0x37ca9c,_0x136fc2){_0x37ca9c=_0x37ca9c-0x112;const _0x34fbc1=a79_0x34fb();let _0x166644=_0x34fbc1[_0x37ca9c];return _0x166644;}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a79_0x34fb(){const _0x4aedac=['3kqnddY','532484spSyLW','19797HkWHxS','vite','5465040IeeuSy','126hcYKwE','cwd','11SKwhsX','Start\x20development\x20server','12014592CQGJFJ','331050GGNjbU','19016emmzZO','56eVyTtN','启动开发服务器','4887eMzkch','needsUpgrade','379185ZUcQkS','now'];a79_0x34fb=function(){return _0x4aedac;};return a79_0x34fb();}import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x12f3f1){const _0x1db11b=a79_0x1666,_0x41f86e=Date[_0x1db11b(0x121)](),_0x1baeeb=_0x12f3f1||process[_0x1db11b(0x116)](),_0x48d954=await checkCliVersion();_0x48d954[_0x1db11b(0x11f)]&&printCliUpgradeWarning(_0x48d954);const _0x29ebee=await checkSdkVersion(_0x1baeeb);_0x29ebee[_0x1db11b(0x11f)]&&printSdkUpgradeWarning(_0x29ebee);try{await execa(_0x1db11b(0x113),[],{'cwd':_0x1baeeb,'stdio':'inherit','preferLocal':!![],'localDir':_0x1baeeb,'env':{...process.env}});const _0x1cc796=Date['now']()-_0x41f86e;void _0x1cc796;}catch(_0x271b11){throw _0x271b11;}}export const startCommand={'name':'start','description':a79_0x4b9c68(0x118),async 'run'(_0x538aa8,_0x1c5cbe,_0x2f422a){const _0x5a2ff6=a79_0x4b9c68;_0x538aa8['logger']['info']('start',_0x5a2ff6(0x11d)),await runStart();}};
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a80_0x590e(){const _0x3ec65f=['Use\x20remote','Function\x20node','@lovrabet/rabetbase-cli','production\x20|\x20daily','Preview\x20operation\x20without\x20executing','Dataset\x20code','operation-type','pagesize','dryRun','operationType','483884LYqpxz','function-node','Schemas','DB\x20ID','Skip\x20import\x20generation','1363160jXhDJG','boolean','sqlname','SQL\x20string','format','Operation\x20type','50033zbvgSm','verbose','Force\x20non-interactive\x20mode\x20(CI)','watch','<name>','operation','enable-bff-save','54viHrwW','18fMYpWk','datasetcode','JSON\x20params','remote','keyword','File\x20path','15ITySPa','Environment','value','params','all','description','key','sqlcode','project','dbid','map','Name','Watch\x20mode','Skip\x20confirmation\x20for\x20high-risk\x20writes','Code\x20filter','Config\x20key','40XOFbit','Target\x20path','global','name','Select\x20app\x20profile\x20by\x20name','sql','fromEntries','SQL\x20code','2715320KjeuRb','Config\x20value','dry-run','appcode','type','force','schemas','Verbose\x20output','Output\x20path','Override\x20appcode','yes','meowKey','skip-imports','723121nzTFsM','Clear','Use\x20global\x20config\x20scope','app','help','Apply\x20to\x20all','string','output','4109325SwUUfQ','Record\x20ID','enableBffSave','228789gJmYOP','clear','target'];a80_0x590e=function(){return _0x3ec65f;};return a80_0x590e();}const a80_0x18d076=a80_0x17c4;(function(_0x367590,_0x1938a1){const _0x396fec=a80_0x17c4,_0x1f6bd9=_0x367590();while(!![]){try{const _0x24ff23=-parseInt(_0x396fec(0x14a))/0x1*(parseInt(_0x396fec(0x112))/0x2)+-parseInt(_0x396fec(0x132))/0x3+parseInt(_0x396fec(0x13f))/0x4*(parseInt(_0x396fec(0x158))/0x5)+-parseInt(_0x396fec(0x151))/0x6*(-parseInt(_0x396fec(0x127))/0x7)+-parseInt(_0x396fec(0x11a))/0x8+-parseInt(_0x396fec(0x152))/0x9*(-parseInt(_0x396fec(0x144))/0xa)+parseInt(_0x396fec(0x12f))/0xb;if(_0x24ff23===_0x1938a1)break;else _0x1f6bd9['push'](_0x1f6bd9['shift']());}catch(_0x337fd7){_0x1f6bd9['push'](_0x1f6bd9['shift']());}}}(a80_0x590e,0x7f90d));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a80_0x18d076(0x137);export const GLOBAL_FLAGS=[{'name':a80_0x18d076(0x11d),'meowKey':a80_0x18d076(0x11d),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x123),'hint':'<code>'},{'name':a80_0x18d076(0x12a),'meowKey':'app','type':'string','description':a80_0x18d076(0x116),'hint':a80_0x18d076(0x14e)},{'name':'env','meowKey':'env','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x159),'hint':a80_0x18d076(0x138)},{'name':a80_0x18d076(0x148),'meowKey':a80_0x18d076(0x148),'type':'string','description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20table'},{'name':a80_0x18d076(0x11c),'meowKey':a80_0x18d076(0x13d),'type':a80_0x18d076(0x145),'description':a80_0x18d076(0x139)},{'name':a80_0x18d076(0x124),'meowKey':a80_0x18d076(0x124),'type':a80_0x18d076(0x145),'description':a80_0x18d076(0x10f)},{'name':'non-interactive','meowKey':'nonInteractive','type':a80_0x18d076(0x145),'description':a80_0x18d076(0x14c)},{'name':'global','meowKey':a80_0x18d076(0x114),'type':a80_0x18d076(0x145),'description':a80_0x18d076(0x129)},{'name':'project','meowKey':a80_0x18d076(0x10a),'type':a80_0x18d076(0x145),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a80_0x18d076(0x12b),'meowKey':a80_0x18d076(0x12b),'type':a80_0x18d076(0x145),'description':'Show\x20help'},{'name':a80_0x18d076(0x115),'meowKey':a80_0x18d076(0x115),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x10d),'hidden':!![]},{'name':'clear','meowKey':a80_0x18d076(0x133),'type':a80_0x18d076(0x145),'description':a80_0x18d076(0x128),'hidden':!![]},{'name':a80_0x18d076(0x14d),'meowKey':'watch','type':a80_0x18d076(0x145),'description':a80_0x18d076(0x10e),'hidden':!![]},{'name':a80_0x18d076(0x12e),'meowKey':a80_0x18d076(0x12e),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x122),'hidden':!![]},{'name':a80_0x18d076(0x105),'meowKey':a80_0x18d076(0x105),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x154),'hidden':!![]},{'name':a80_0x18d076(0x153),'meowKey':'datasetcode','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x13a),'hidden':!![]},{'name':a80_0x18d076(0x106),'meowKey':'all','type':a80_0x18d076(0x145),'description':a80_0x18d076(0x12c),'hidden':!![]},{'name':a80_0x18d076(0x150),'meowKey':a80_0x18d076(0x131),'type':a80_0x18d076(0x145),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x130),'hidden':!![]},{'name':'type','meowKey':a80_0x18d076(0x11e),'type':a80_0x18d076(0x12d),'description':'Type\x20filter','hidden':!![]},{'name':'file','meowKey':'file','type':'string','description':a80_0x18d076(0x157),'hidden':!![]},{'name':a80_0x18d076(0x109),'meowKey':a80_0x18d076(0x109),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x119),'hidden':!![]},{'name':a80_0x18d076(0x146),'meowKey':a80_0x18d076(0x146),'type':a80_0x18d076(0x12d),'description':'SQL\x20name','hidden':!![]},{'name':a80_0x18d076(0x10b),'meowKey':a80_0x18d076(0x10b),'type':'string','description':a80_0x18d076(0x142),'hidden':!![]},{'name':a80_0x18d076(0x107),'meowKey':a80_0x18d076(0x107),'type':a80_0x18d076(0x12d),'description':'Description','hidden':!![]},{'name':'page','meowKey':'page','type':'string','description':'Page\x20number','hidden':!![]},{'name':a80_0x18d076(0x13c),'meowKey':a80_0x18d076(0x13c),'type':'string','description':'Page\x20size','hidden':!![]},{'name':'keyword','meowKey':a80_0x18d076(0x156),'type':a80_0x18d076(0x12d),'description':'Keyword\x20filter','hidden':!![]},{'name':'code','meowKey':'code','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x110),'hidden':!![]},{'name':'sql','meowKey':a80_0x18d076(0x117),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x147),'hidden':!![]},{'name':a80_0x18d076(0x120),'meowKey':a80_0x18d076(0x120),'type':'string','description':a80_0x18d076(0x141),'hidden':!![]},{'name':a80_0x18d076(0x14f),'meowKey':'operation','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x149),'hidden':!![]},{'name':a80_0x18d076(0x134),'meowKey':a80_0x18d076(0x134),'type':'string','description':a80_0x18d076(0x113),'hidden':!![]},{'name':a80_0x18d076(0x126),'meowKey':'skipImports','type':a80_0x18d076(0x145),'description':a80_0x18d076(0x143),'hidden':!![]},{'name':'key','meowKey':a80_0x18d076(0x108),'type':'string','description':a80_0x18d076(0x111),'hidden':!![]},{'name':a80_0x18d076(0x15a),'meowKey':'value','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x11b),'hidden':!![]},{'name':a80_0x18d076(0x11f),'meowKey':a80_0x18d076(0x11f),'type':a80_0x18d076(0x145),'description':'Force\x20overwrite','hidden':!![]},{'name':a80_0x18d076(0x155),'meowKey':'remote','type':'boolean','description':a80_0x18d076(0x135),'hidden':!![]},{'name':a80_0x18d076(0x14b),'meowKey':a80_0x18d076(0x14b),'type':'boolean','description':a80_0x18d076(0x121),'hidden':!![]},{'name':a80_0x18d076(0x13b),'meowKey':a80_0x18d076(0x13e),'type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x149),'hidden':!![]},{'name':a80_0x18d076(0x140),'meowKey':'functionNode','type':a80_0x18d076(0x12d),'description':a80_0x18d076(0x136),'hidden':!![]}];function a80_0x17c4(_0x408765,_0x5af3a4){_0x408765=_0x408765-0x105;const _0x590ee2=a80_0x590e();let _0x17c45a=_0x590ee2[_0x408765];return _0x17c45a;}export function buildMeowFlags(){const _0x1d3088=a80_0x18d076;return Object[_0x1d3088(0x118)](GLOBAL_FLAGS[_0x1d3088(0x10c)](_0x57dc3c=>[_0x57dc3c[_0x1d3088(0x125)],{'type':_0x57dc3c[_0x1d3088(0x11e)]}]));}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a81_0x6e9ba=a81_0x2c9b;(function(_0xbf677f,_0x4443d6){const _0x57128a=a81_0x2c9b,_0x37b661=_0xbf677f();while(!![]){try{const _0x1e0b34=-parseInt(_0x57128a(0x121))/0x1*(parseInt(_0x57128a(0x123))/0x2)+parseInt(_0x57128a(0x12e))/0x3+-parseInt(_0x57128a(0x12c))/0x4*(parseInt(_0x57128a(0x12b))/0x5)+parseInt(_0x57128a(0x124))/0x6+-parseInt(_0x57128a(0x125))/0x7+parseInt(_0x57128a(0x128))/0x8*(parseInt(_0x57128a(0x127))/0x9)+parseInt(_0x57128a(0x12a))/0xa*(-parseInt(_0x57128a(0x126))/0xb);if(_0x1e0b34===_0x4443d6)break;else _0x37b661['push'](_0x37b661['shift']());}catch(_0x392e83){_0x37b661['push'](_0x37b661['shift']());}}}(a81_0x48e7,0xc651f));import{getEnv}from'./env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x483a02){const _0x4b703c=a81_0x2c9b;customApiDomain=_0x483a02?.['apiDomain'],customUserDomain=_0x483a02?.[_0x4b703c(0x11e)],customRuntimeDomain=_0x483a02?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(getEnv()===a81_0x6e9ba(0x11f)?a81_0x6e9ba(0x122):a81_0x6e9ba(0x12d));function a81_0x48e7(){const _0x16b841=['1896CjHNkQ','https://api.lovrabet.com','535830UBUDdj','785gKlVcO','40784JZbSYa','https://user-daily.lovrabet.com','4769556gxBUlF','https://daily-api.lovrabet.com','userDomain','production','https://daily-runtime.lovrabet.com','161gJbDCy','https://user.lovrabet.com','6854CMEmfM','6254436JPJVSj','317016xoOIoY','77zrRQav','28593GemEQD'];a81_0x48e7=function(){return _0x16b841;};return a81_0x48e7();}function a81_0x2c9b(_0x48710c,_0x508de3){_0x48710c=_0x48710c-0x11e;const _0x48e70c=a81_0x48e7();let _0x2c9bc5=_0x48e70c[_0x48710c];return _0x2c9bc5;}export const getApiDomain=()=>customApiDomain||(getEnv()===a81_0x6e9ba(0x11f)?a81_0x6e9ba(0x129):a81_0x6e9ba(0x12f));export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a81_0x6e9ba(0x11f)?'https://runtime.lovrabet.com':a81_0x6e9ba(0x120));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a82_0x2ad2(){const _0x24cd9f=['75723kJDEkS','8809581mgqslZ','2924296HhjtYH','27243xpZgUj','online','37600nduplz','123640FbkhOz','111cfjDXE','1696nXjQAJ','production','1821372JOYwpI','66sSzXWy','10PywSfG'];a82_0x2ad2=function(){return _0x24cd9f;};return a82_0x2ad2();}const a82_0xf43c31=a82_0x23ef;(function(_0x9e1cd8,_0x23a65d){const _0x391098=a82_0x23ef,_0x2a0e44=_0x9e1cd8();while(!![]){try{const _0x4afcc2=-parseInt(_0x391098(0x18d))/0x1+-parseInt(_0x391098(0x192))/0x2*(-parseInt(_0x391098(0x194))/0x3)+parseInt(_0x391098(0x18f))/0x4+parseInt(_0x391098(0x193))/0x5*(parseInt(_0x391098(0x198))/0x6)+parseInt(_0x391098(0x197))/0x7+-parseInt(_0x391098(0x195))/0x8*(parseInt(_0x391098(0x190))/0x9)+parseInt(_0x391098(0x199))/0xa*(-parseInt(_0x391098(0x18e))/0xb);if(_0x4afcc2===_0x23a65d)break;else _0x2a0e44['push'](_0x2a0e44['shift']());}catch(_0x55b375){_0x2a0e44['push'](_0x2a0e44['shift']());}}}(a82_0x2ad2,0x6b8f0));export function normalizeEnv(_0x2e8c49){const _0x39aab0=a82_0x23ef;return _0x2e8c49===_0x39aab0(0x191)?_0x39aab0(0x196):_0x2e8c49;}function a82_0x23ef(_0x3945c4,_0x258d69){_0x3945c4=_0x3945c4-0x18d;const _0x2ad2c8=a82_0x2ad2();let _0x23efdd=_0x2ad2c8[_0x3945c4];return _0x23efdd;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a82_0xf43c31(0x196));export function getEnv(){return env;}export function initEnv(_0x4075b7){env=normalizeEnv(_0x4075b7);}
|