@lovrabet/rabetbase-cli 2.0.6 → 2.0.7
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/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/project/create/enhanced-guided-create.js +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -0
- package/lib/commands/project/create/main.js +1 -0
- package/lib/commands/project/create/non-interactive.js +1 -0
- package/lib/commands/project/create/project-template-path.js +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -0
- package/lib/commands/project/upgrade.js +1 -0
- 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/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/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/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 +1 -1
- package/lib/commands/build.js +0 -1
- package/lib/commands/preview.js +0 -1
- package/lib/commands/project-upgrade.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/create-app/enhanced-guided-create.js +0 -1
- package/lib/create-app/format-elapsed.js +0 -1
- package/lib/create-app/main.js +0 -1
- package/lib/create-app/non-interactive.js +0 -1
- package/lib/create-app/use-copy-project-template.js +0 -1
- package/lib/create-app/use-format-code.js +0 -1
- package/lib/create-app/use-install-dependencies.js +0 -1
- package/lib/init/main.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x5e4377=a74_0x4a7f;function a74_0x4a7f(_0x1296ef,_0x16d692){_0x1296ef=_0x1296ef-0x109;const _0x1be69d=a74_0x1be6();let _0x4a7fca=_0x1be69d[_0x1296ef];return _0x4a7fca;}(function(_0xf84404,_0xb75d24){const _0x46c49c=a74_0x4a7f,_0x320fd5=_0xf84404();while(!![]){try{const _0x1940d7=parseInt(_0x46c49c(0x113))/0x1*(-parseInt(_0x46c49c(0x111))/0x2)+parseInt(_0x46c49c(0x10b))/0x3+parseInt(_0x46c49c(0x11c))/0x4*(parseInt(_0x46c49c(0x119))/0x5)+-parseInt(_0x46c49c(0x12c))/0x6*(parseInt(_0x46c49c(0x127))/0x7)+parseInt(_0x46c49c(0x11a))/0x8+parseInt(_0x46c49c(0x110))/0x9*(parseInt(_0x46c49c(0x121))/0xa)+-parseInt(_0x46c49c(0x10e))/0xb*(parseInt(_0x46c49c(0x12a))/0xc);if(_0x1940d7===_0xb75d24)break;else _0x320fd5['push'](_0x320fd5['shift']());}catch(_0x4b6e6b){_0x320fd5['push'](_0x320fd5['shift']());}}}(a74_0x1be6,0x43d13));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'./init.js';import{upgradeApp}from'./upgrade.js';const initFlags=[{'name':a74_0x5e4377(0x10c),'type':a74_0x5e4377(0x112),'description':a74_0x5e4377(0x10a)},{'name':a74_0x5e4377(0x132),'type':'string','description':a74_0x5e4377(0x114)},{'name':a74_0x5e4377(0x11b),'type':a74_0x5e4377(0x122),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':a74_0x5e4377(0x10f),'type':a74_0x5e4377(0x112),'description':a74_0x5e4377(0x12d)},{'name':'env','type':'string','description':a74_0x5e4377(0x114)},{'name':a74_0x5e4377(0x10c),'type':a74_0x5e4377(0x112),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a74_0x5e4377(0x11b),'type':a74_0x5e4377(0x122),'description':a74_0x5e4377(0x126),'default':![]}];function a74_0x1be6(){const _0x51347b=['Skip\x20confirmation\x20prompt','2695SyHQRc','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','12kgjRsk','Usage:\x20','5718bllgzu','Project\x20name','project','trim','bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','env','str','App\x20code\x20to\x20initialize','1549452JsHUMJ','appcode','Create\x20a\x20new\x20project','9920163JlncWT','name','4487292KrgVzG','467214bVdgoV','string','1MTCvNy','Target\x20environment','args','init','write','./create/non-interactive.js','1423285UINtKW','3843160hKuYCD','yes','4SdeurU','cookie','nonInteractive','./create/main.js','create','10SYSlCT','boolean','validation','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','upgrade'];a74_0x1be6=function(){return _0x51347b;};return a74_0x1be6();}export const projectDefinitions=[{'service':'project','command':a74_0x5e4377(0x116),'description':'Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','risk':a74_0x5e4377(0x117),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x542939){const _0x3f626b=a74_0x5e4377;return await initConfig({'appcode':_0x542939[_0x3f626b(0x109)](_0x3f626b(0x10c))||undefined,'env':_0x542939[_0x3f626b(0x109)](_0x3f626b(0x132))||undefined,'autoYes':_0x542939[_0x3f626b(0x130)](_0x3f626b(0x11b))}),{'ok':!![]};}},{'service':a74_0x5e4377(0x12e),'command':a74_0x5e4377(0x120),'description':a74_0x5e4377(0x10d),'risk':a74_0x5e4377(0x117),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a74_0x5e4377(0x128),'required':![]}],'flags':createFlags,async 'execute'(_0x5e46f9){const _0x272c92=a74_0x5e4377,{createApp:_0x413604}=await import(_0x272c92(0x11f)),{createProjectNonInteractive:_0x121f83}=await import(_0x272c92(0x118)),_0xeee283=_0x5e46f9[_0x272c92(0x109)](_0x272c92(0x10f))[_0x272c92(0x12f)]()||_0x5e46f9[_0x272c92(0x115)][0x0]?.[_0x272c92(0x12f)](),_0x14edbb=_0x5e46f9[_0x272c92(0x109)](_0x272c92(0x132))||undefined,_0x44d858=_0x5e46f9[_0x272c92(0x109)](_0x272c92(0x10c))||undefined;if(_0x5e46f9[_0x272c92(0x11e)]){if(!_0xeee283)throw CliErrors[_0x272c92(0x123)](_0x272c92(0x129),_0x272c92(0x12b)+CLI_BIN_NAME+_0x272c92(0x124));await _0x121f83(_0xeee283,_0x14edbb,_0x44d858,_0x5e46f9[_0x272c92(0x11d)]);}else await _0x413604({'projectCode':_0xeee283,'appCode':_0x44d858,'env':_0x14edbb,'cookie':_0x5e46f9[_0x272c92(0x11d)]});return{'ok':!![]};}},{'service':'project','command':a74_0x5e4377(0x125),'description':a74_0x5e4377(0x131),'risk':a74_0x5e4377(0x117),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1325e8){const _0x27180c=a74_0x5e4377;return await upgradeApp(_0x1325e8[_0x27180c(0x11e)],{'yes':_0x1325e8[_0x27180c(0x130)](_0x27180c(0x11b))}),{'ok':!![]};}}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x28e233,_0x58c054){const _0x50307c=a75_0x4822,_0x56bbf0=_0x28e233();while(!![]){try{const _0x487e37=-parseInt(_0x50307c(0xe1))/0x1+-parseInt(_0x50307c(0xe3))/0x2*(-parseInt(_0x50307c(0xe6))/0x3)+-parseInt(_0x50307c(0xda))/0x4+parseInt(_0x50307c(0xd1))/0x5*(-parseInt(_0x50307c(0xd2))/0x6)+parseInt(_0x50307c(0xe4))/0x7+-parseInt(_0x50307c(0xdf))/0x8*(-parseInt(_0x50307c(0xf8))/0x9)+parseInt(_0x50307c(0xeb))/0xa*(parseInt(_0x50307c(0xed))/0xb);if(_0x487e37===_0x58c054)break;else _0x56bbf0['push'](_0x56bbf0['shift']());}catch(_0x12c3bc){_0x56bbf0['push'](_0x56bbf0['shift']());}}}(a75_0x14da,0xde85a));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a75_0x306e0f from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../common/validate.js';export async function initConfig(_0x202de1){const _0x50e5c3=a75_0x4822,{appcode:_0x16d01b,env:_0x300100,autoYes:_0x512376}=_0x202de1,_0x16e4f1=process[_0x50e5c3(0xd7)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x5e2209;for(const _0x300982 of LEGACY_CONFIG_NAMES){const _0x5b250d=resolve(_0x16e4f1,_0x300982);if(existsSync(_0x5b250d)){_0x5e2209=_0x5b250d;break;}}if(_0x5e2209){let _0x43d9ae={};try{_0x43d9ae=JSON[_0x50e5c3(0xec)](readFileSync(_0x5e2209,'utf8'));}catch{}const _0x996f94=basename(_0x5e2209),_0x2c07b9=_0x43d9ae?.['appcode']||_0x43d9ae?.[_0x50e5c3(0xe7)];let _0x4144dc=_0x512376;!_0x512376&&(console[_0x50e5c3(0xe9)](a75_0x306e0f[_0x50e5c3(0xfe)](_0x50e5c3(0xd4)+a75_0x306e0f['bold'](_0x996f94))),_0x2c07b9&&console[_0x50e5c3(0xe9)](a75_0x306e0f[_0x50e5c3(0xe2)]('\x20\x20appcode:\x20'+_0x2c07b9)),_0x4144dc=await confirm({'message':_0x50e5c3(0xd8)+a75_0x306e0f['bold'](_0x50e5c3(0xfa))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x4144dc){console[_0x50e5c3(0xe9)](_0x50e5c3(0xf4)+CLI_BIN_NAME+'\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0xea48cc=resolve(_0x16e4f1,NEW_CONFIG_NAME),_0x308227=getCliVersionFromPkg(),_0x153652=readRawConfig(),_0x57ec39={..._0x153652,..._0x43d9ae,'version':_0x308227,'migratedAt':new Date()[_0x50e5c3(0xef)](),'migratedFrom':_0x5e2209};if(!_0x57ec39['appcode']&&!_0x57ec39['app']){if(!_0x16d01b){const _0x326c88=await askAppcode();_0x57ec39[_0x50e5c3(0xf3)]=_0x326c88;}else _0x57ec39[_0x50e5c3(0xf3)]=_0x16d01b;}if(_0x57ec39[_0x50e5c3(0xdb)]&&typeof _0x57ec39[_0x50e5c3(0xdb)]!==_0x50e5c3(0xf1))delete _0x57ec39[_0x50e5c3(0xdb)];else!_0x57ec39[_0x50e5c3(0xdb)]&&(_0x57ec39['env']=_0x153652['env']||_0x50e5c3(0xde));writeConfigFile(_0xea48cc,_0x57ec39);const _0x534ea6=_0x5e2209+_0x50e5c3(0xd6);renameSync(_0x5e2209,_0x534ea6),logger['setLogPath'](_0x16e4f1),logger[_0x50e5c3(0xd5)](_0x50e5c3(0xf2),_0x50e5c3(0xee),{'from':_0x5e2209,'to':_0xea48cc,'appcode':_0x57ec39[_0x50e5c3(0xf3)]||_0x57ec39[_0x50e5c3(0xe7)],'env':_0x57ec39['env']}),console['log'](a75_0x306e0f['green'](_0x50e5c3(0xd3)+_0x996f94+'\x20→\x20.rabetbase.json')),console[_0x50e5c3(0xe9)](a75_0x306e0f[_0x50e5c3(0xe2)](_0x50e5c3(0xdc)+(_0x57ec39[_0x50e5c3(0xf3)]||_0x57ec39[_0x50e5c3(0xe7)]))),console['log'](a75_0x306e0f[_0x50e5c3(0xe8)](_0x50e5c3(0xf0)+_0x996f94+'.bak'));return;}const _0x2b51a9=_0x16d01b||await askAppcode(),_0x1f5e9b=resolve(_0x16e4f1,NEW_CONFIG_NAME),_0x14e711=getCliVersionFromPkg(),_0x2c904e=readRawConfig(),_0x546592=typeof _0x2c904e[_0x50e5c3(0xdb)]===_0x50e5c3(0xf1)?_0x2c904e[_0x50e5c3(0xdb)]:undefined,_0x461a6c={'version':_0x14e711,'createdAt':new Date()[_0x50e5c3(0xef)](),'appcode':_0x2b51a9,'env':_0x300100||_0x546592||_0x50e5c3(0xde)};writeConfigFile(_0x1f5e9b,_0x461a6c),logger[_0x50e5c3(0xdd)](_0x16e4f1),logger[_0x50e5c3(0xd5)](_0x50e5c3(0xf2),_0x50e5c3(0xf6),{'appcode':_0x461a6c['appcode'],'env':_0x461a6c['env'],'version':_0x461a6c[_0x50e5c3(0xfc)],'configPath':_0x1f5e9b}),console[_0x50e5c3(0xe9)](a75_0x306e0f[_0x50e5c3(0xd9)](_0x50e5c3(0xf9))),console[_0x50e5c3(0xe9)](a75_0x306e0f['cyan']('\x20\x20AppCode:\x20'+_0x2b51a9)),console['log'](_0x50e5c3(0xf7)+CLI_BIN_NAME+'\x20api\x20doc\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x2428d6=>{const _0x332c40=a75_0x4822;if(!_0x2428d6[_0x332c40(0xe5)]())return _0x332c40(0xf5);const {valid:_0x2a409a,message:_0x47ab81}=validateAppcode(_0x2428d6[_0x332c40(0xe5)]());return _0x2a409a||_0x47ab81||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x47994d=a75_0x4822;try{const _0x4f4ca8=fileURLToPath(import.meta.url),_0x275488=resolve(dirname(_0x4f4ca8),_0x47994d(0xfb)),_0x2525f8=JSON['parse'](readFileSync(resolve(_0x275488,_0x47994d(0xe0)),_0x47994d(0xea)));return _0x2525f8['version']||_0x47994d(0xfd);}catch{return _0x47994d(0xfd);}}function a75_0x4822(_0x56ca1f,_0x1bbead){_0x56ca1f=_0x56ca1f-0xd1;const _0x14da04=a75_0x14da();let _0x482252=_0x14da04[_0x56ca1f];return _0x482252;}function a75_0x14da(){const _0xee0d91=['cyan','54rcYOBQ','995001drnvGz','trim','108726QfphPe','app','gray','log','utf8','65910fYvPRb','parse','759ZRYCTv','从旧配置文件升级成功','toLocaleString','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','string','init','appcode','Migration\x20cancelled.\x20Run\x20`','App\x20Code\x20cannot\x20be\x20empty','初始化项目配置文件成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','14128776tfnjne','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','.rabetbase.json','../..','version','1.0.0','yellow','10MWiQzj','812970bFUheO','✓\x20Upgraded\x20','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','info','.bak','cwd','Upgrade\x20it\x20to\x20','green','6202788hQKgDH','env','\x20\x20AppCode:\x20','setLogPath','production','8esJDjM','package.json','412183sNrFxk'];a75_0x14da=function(){return _0xee0d91;};return a75_0x14da();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a76_0x25ff99=a76_0x3a3c;(function(_0x35dce6,_0x239c0b){const _0x5a2615=a76_0x3a3c,_0x4bd96a=_0x35dce6();while(!![]){try{const _0x2e7e33=-parseInt(_0x5a2615(0x1ba))/0x1+-parseInt(_0x5a2615(0x1b8))/0x2*(parseInt(_0x5a2615(0x195))/0x3)+-parseInt(_0x5a2615(0x1f1))/0x4+parseInt(_0x5a2615(0x1d2))/0x5*(parseInt(_0x5a2615(0x1e0))/0x6)+parseInt(_0x5a2615(0x1df))/0x7+parseInt(_0x5a2615(0x198))/0x8+parseInt(_0x5a2615(0x199))/0x9*(parseInt(_0x5a2615(0x193))/0xa);if(_0x2e7e33===_0x239c0b)break;else _0x4bd96a['push'](_0x4bd96a['shift']());}catch(_0x2b19ec){_0x4bd96a['push'](_0x4bd96a['shift']());}}}(a76_0x5d1d,0x4f7ae));import a76_0x57561b from'chalk';import a76_0x37b006 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[a76_0x25ff99(0x1f3)](_0x4994dd=>_0x4994dd!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xb0865c){const _0x29c59f=a76_0x25ff99,_0x38f686=[];for(const _0x50200a of Object[_0x29c59f(0x1a0)](CORE_IDE_CONFIGS)){if(_0x50200a['files'])for(const _0xfe2e83 of _0x50200a['files']){_0x38f686['push'](resolve(_0xb0865c,_0xfe2e83[_0x29c59f(0x1e9)]));}}return _0x38f686;}function analyse(_0x2977e2){const _0x43c7f5=a76_0x25ff99;let _0x53f9c0=null;const _0x38c113=resolve(_0x2977e2,NEW_CONFIG_NAME),_0x58a2c0=existsSync(_0x38c113);for(const _0x13176f of LEGACY_CONFIG_NAMES){const _0x5d5092=resolve(_0x2977e2,_0x13176f);if(existsSync(_0x5d5092)){const _0x634614=readConfigFile(_0x5d5092),_0x38d7da=Object['keys'](_0x634614)[_0x43c7f5(0x1f3)](_0x5a092a=>typeof _0x634614[_0x5a092a]!==_0x43c7f5(0x17d));_0x53f9c0={'oldPath':_0x5d5092,'hasNewConfig':_0x58a2c0,'fields':_0x38d7da};break;}}const _0x278ba0=[],_0x34b50a=resolve(_0x2977e2,_0x43c7f5(0x1ab));if(existsSync(_0x34b50a))_0x278ba0[_0x43c7f5(0x1f2)](_0x34b50a);const _0x434654=resolve(_0x2977e2,_0x43c7f5(0x1dc));if(existsSync(_0x434654))_0x278ba0[_0x43c7f5(0x1f2)](_0x434654);const _0x11e74c=resolve(_0x2977e2,_0x43c7f5(0x1af));if(existsSync(_0x11e74c))_0x278ba0['push'](_0x11e74c);for(const _0x389e2b of collectIdeSkillFiles(_0x2977e2)){if(existsSync(_0x389e2b))_0x278ba0[_0x43c7f5(0x1f2)](_0x389e2b);}let _0x444a30=null;const _0x8d081e=resolve(_0x2977e2,'.cursor/mcp.json');if(existsSync(_0x8d081e))try{const _0x5dea26=JSON[_0x43c7f5(0x1a9)](readFileSync(_0x8d081e,_0x43c7f5(0x1f7)));if(_0x5dea26?.[_0x43c7f5(0x1c0)]&&typeof _0x5dea26[_0x43c7f5(0x1c0)]===_0x43c7f5(0x190)){const _0x212aca=[];for(const [_0x2573a2,_0x48c949]of Object['entries'](_0x5dea26[_0x43c7f5(0x1c0)])){const _0x4315d8=_0x48c949;_0x4315d8?.[_0x43c7f5(0x1ee)]&&Array['isArray'](_0x4315d8[_0x43c7f5(0x1ee)])&&_0x4315d8['args'][_0x43c7f5(0x1e4)](_0xba8422=>typeof _0xba8422==='string'&&_0xba8422[_0x43c7f5(0x1ec)](_0x43c7f5(0x17b)))&&_0x212aca[_0x43c7f5(0x1f2)](_0x2573a2);}_0x212aca['length']>0x0&&(_0x444a30={'path':_0x8d081e,'keys':_0x212aca});}}catch{}const _0x5afe0d=_0x278ba0[_0x43c7f5(0x197)]>0x0||_0x53f9c0!==null;let _0x120e1c=null;const _0x1c9f43=resolve(_0x2977e2,'package.json');if(existsSync(_0x1c9f43))try{const _0x20ed02=JSON[_0x43c7f5(0x1a9)](readFileSync(_0x1c9f43,_0x43c7f5(0x1f7)));for(const _0x371b6d of[_0x43c7f5(0x1a8),'devDependencies']){const _0x4b6c9d=_0x20ed02?.[_0x371b6d]?.[_0x43c7f5(0x1bf)];if(typeof _0x4b6c9d===_0x43c7f5(0x1d1)){_0x4b6c9d!==_0x43c7f5(0x1d0)&&(_0x120e1c={'pkgPath':_0x1c9f43,'currentVersion':_0x4b6c9d,'field':_0x371b6d});break;}}}catch{}return{'configMigration':_0x53f9c0,'oldArtifacts':_0x278ba0,'oldMcpConfig':_0x444a30,'needsSkillSwap':_0x5afe0d,'sdkUpgrade':_0x120e1c};}function printReport(_0xb97379){const _0x13976b=a76_0x25ff99,{configMigration:_0x529873,oldArtifacts:_0x5236e9,oldMcpConfig:_0x1f7779,needsSkillSwap:_0x29e801}=_0xb97379;console[_0x13976b(0x1aa)](''),console[_0x13976b(0x1aa)](a76_0x57561b['bold'](_0x13976b(0x17c))),console[_0x13976b(0x1aa)]('');_0x529873?(console[_0x13976b(0x1aa)](a76_0x57561b[_0x13976b(0x181)](_0x13976b(0x1d5))+('\x20\x20'+a76_0x57561b[_0x13976b(0x1d8)](_0x529873[_0x13976b(0x1f8)]))),console[_0x13976b(0x1aa)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x529873['hasNewConfig']?a76_0x57561b[_0x13976b(0x186)](_0x13976b(0x1db)):a76_0x57561b[_0x13976b(0x1bd)](_0x13976b(0x1ea)))),console['log'](_0x13976b(0x1a4)+_0x529873[_0x13976b(0x1be)][_0x13976b(0x1a5)](',\x20')),console[_0x13976b(0x1aa)](_0x13976b(0x182))):console[_0x13976b(0x1aa)](a76_0x57561b['cyan'](_0x13976b(0x1d5))+'\x20\x20'+a76_0x57561b[_0x13976b(0x1bd)](_0x13976b(0x192)));console['log']('');if(_0x5236e9[_0x13976b(0x197)]>0x0){console['log'](a76_0x57561b[_0x13976b(0x181)]('Legacy\x20artifacts:'));for(const _0x3c23b4 of _0x5236e9){console[_0x13976b(0x1aa)]('\x20\x20'+a76_0x57561b[_0x13976b(0x189)](_0x13976b(0x1b5))+'\x20\x20'+_0x3c23b4);}console[_0x13976b(0x1aa)](_0x13976b(0x1b0));}else console['log'](a76_0x57561b['cyan'](_0x13976b(0x179))+'\x20\x20'+a76_0x57561b['gray']('none\x20found'));console[_0x13976b(0x1aa)]('');_0x1f7779?(console[_0x13976b(0x1aa)](a76_0x57561b[_0x13976b(0x181)](_0x13976b(0x18a))+('\x20\x20'+a76_0x57561b['yellow'](_0x1f7779[_0x13976b(0x1e9)])+_0x13976b(0x1ad)+_0x1f7779[_0x13976b(0x183)][_0x13976b(0x1a5)](',\x20'))),console['log'](_0x13976b(0x1f0))):console[_0x13976b(0x1aa)](a76_0x57561b[_0x13976b(0x181)](_0x13976b(0x18a))+'\x20\x20'+a76_0x57561b[_0x13976b(0x1bd)](_0x13976b(0x1b9)));console[_0x13976b(0x1aa)](''),console[_0x13976b(0x1aa)](a76_0x57561b[_0x13976b(0x181)]('Skill\x20swap:')+('\x20\x20'+(_0x29e801?a76_0x57561b[_0x13976b(0x1d8)]('needed'):a76_0x57561b['green'](_0x13976b(0x1eb)))));_0x29e801&&console['log'](_0x13976b(0x1c6));console['log']('');if(_0xb97379['sdkUpgrade']){const {currentVersion:_0x1666cc,field:_0x2d706d,pkgPath:_0x25eb49}=_0xb97379[_0x13976b(0x1b7)];console[_0x13976b(0x1aa)](a76_0x57561b[_0x13976b(0x181)](_0x13976b(0x1f5))+('\x20\x20'+a76_0x57561b[_0x13976b(0x1d8)](_0x25eb49))),console[_0x13976b(0x1aa)](_0x13976b(0x19a)+_0x2d706d+':\x20'+a76_0x57561b[_0x13976b(0x1d8)](_0x1666cc)+_0x13976b(0x1de)+a76_0x57561b['green'](_0x13976b(0x1d0))),console['log']('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a76_0x57561b[_0x13976b(0x181)]('@lovrabet/sdk:')+'\x20\x20'+a76_0x57561b['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function execConfigMigration(_0x304923,_0xcf8c01){const _0x30b1d5=a76_0x25ff99,{configMigration:_0xd17d57}=_0x304923;if(!_0xd17d57?.[_0x30b1d5(0x1f8)])return{'step':0x1,'label':_0x30b1d5(0x1b1),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x33f0a3=readConfigFile(_0xd17d57[_0x30b1d5(0x1f8)]),_0x5a3f3e=resolve(_0xcf8c01,NEW_CONFIG_NAME),_0x58919e=_0xd17d57[_0x30b1d5(0x19d)]?readConfigFile(_0x5a3f3e):{};for(const [_0x221cf6,_0x304215]of Object[_0x30b1d5(0x1d4)](_0x33f0a3)){!(_0x221cf6 in _0x58919e)&&(_0x58919e[_0x221cf6]=_0x304215);}writeConfigFile(_0x5a3f3e,_0x58919e);const _0x404d8c=_0xd17d57[_0x30b1d5(0x1f8)]+_0x30b1d5(0x1e2);return renameSync(_0xd17d57[_0x30b1d5(0x1f8)],_0x404d8c),{'step':0x1,'label':_0x30b1d5(0x1b1),'ok':!![],'detail':_0xd17d57[_0x30b1d5(0x1f8)]+'\x20→\x20'+_0x5a3f3e+_0x30b1d5(0x1d7)+_0x404d8c+')'};}function a76_0x5d1d(){const _0x18a161=['sdkUpgrade','2IEZUiU','no\x20legacy\x20entry','367060TtoFRT','oldArtifacts','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','gray','fields','@lovrabet/sdk','mcpServers','stringify','fail','needsSkillSwap','isArray','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','cwd','start','inherit','\x20\x20bun\x20install','Step\x206/7:\x20Installing\x20new\x20skill...','yes','Step\x204/7:\x20MCP\x20config\x20—\x20','removed\x20','white','latest','string','15XULeUr','[\x22@lovrabet/sdk\x22]:\x20','entries','Config\x20file:','Remove\x20.lovrabet/','\x20(backup:\x20','yellow','detail','\x20removed\x20(','already\x20exists\x20(will\x20merge)','.cursor/rules/lovrabet_rules.mdc','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20→\x20','1538684rkmEJX','222216nCcKjO','exit\x20','.bak','\x20\x20npm\x20install','some','succeed','isDirectory','failed','configMigration','path','not\x20found\x20(will\x20create)','not\x20needed','includes','Upgrade\x20@lovrabet/sdk','args','Upgrade\x20completed\x20successfully!','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','1606852lJGjjb','push','filter','Upgrade\x20cancelled.','@lovrabet/sdk:','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','utf8','oldPath','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Legacy\x20artifacts:','message','@lovrabet/dataset-mcp-server','===\x20Upgrade\x20Analysis\x20===','undefined','lovrabet/rabetbase','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','step','cyan','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','keys','no\x20matching\x20entry\x20found','Remove\x20legacy\x20artifacts','green','Clean\x20MCP\x20config','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','red','MCP\x20config:','\x20→\x20latest','CANCEL','===\x20Upgrade\x20Summary\x20===','info','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','object','\x20\x20\x20\x20\x20\x20\x20','no\x20legacy\x20config\x20found','4536190XQJKNG','Install\x20new\x20skill','556923Ldvnbv','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','length','334448VUxDmi','18TvafUW','\x20\x20Current\x20version\x20in\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','bold','hasNewConfig','\x20from\x20','Step\x205/7:\x20Removing\x20old\x20skill...','values','Remove\x20old\x20skill','lovrabet/rabetbase\x20installed\x20globally','Proceed\x20with\x20upgrade?','\x20\x20Fields\x20to\x20migrate:\x20','join','skipped','\x20\x20#\x20or','dependencies','parse','log','.lovrabet','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20→\x20keys:\x20','Step\x201/7:\x20Migrating\x20config...','.claude/skills/lovrabet','\x20\x20Action:\x20delete','Config\x20migration','done','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','status','FOUND','oldMcpConfig'];a76_0x5d1d=function(){return _0x18a161;};return a76_0x5d1d();}function execRemoveOldArtifacts(_0x5217e2){const _0x50e0fa=a76_0x25ff99,_0x356b1e=[];for(const _0x5beba7 of _0x5217e2){try{if(!existsSync(_0x5beba7))continue;const _0x47fb00=tryStat(_0x5beba7);_0x47fb00?.[_0x50e0fa(0x1e6)]()?rmSync(_0x5beba7,{'recursive':!![],'force':!![]}):unlinkSync(_0x5beba7);}catch(_0x4e7cc1){_0x356b1e['push'](_0x5beba7+':\x20'+_0x4e7cc1[_0x50e0fa(0x17a)]);}}return{'step':0x3,'label':_0x50e0fa(0x185),'ok':_0x356b1e[_0x50e0fa(0x197)]===0x0,'detail':_0x356b1e[_0x50e0fa(0x197)]>0x0?_0x5217e2[_0x50e0fa(0x197)]-_0x356b1e['length']+'/'+_0x5217e2['length']+_0x50e0fa(0x1da)+_0x356b1e[_0x50e0fa(0x1a5)](';\x20')+')':_0x5217e2['length']+'\x20removed'};}function execCleanMcp(_0x348d44){const _0x145111=a76_0x25ff99;if(!_0x348d44['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x145111(0x1a6)};try{const _0x18270d=readFileSync(_0x348d44[_0x145111(0x1b6)][_0x145111(0x1e9)],_0x145111(0x1f7)),_0x8c5c7b=JSON[_0x145111(0x1a9)](_0x18270d);if(_0x8c5c7b?.['mcpServers']&&typeof _0x8c5c7b['mcpServers']===_0x145111(0x190)){const _0x4a88a9=[];for(const [_0x1f2f3e,_0x212343]of Object[_0x145111(0x1d4)](_0x8c5c7b[_0x145111(0x1c0)])){_0x212343?.[_0x145111(0x1ee)]&&Array[_0x145111(0x1c4)](_0x212343[_0x145111(0x1ee)])&&_0x212343[_0x145111(0x1ee)][_0x145111(0x1e4)](_0x13e220=>typeof _0x13e220===_0x145111(0x1d1)&&_0x13e220[_0x145111(0x1ec)](_0x145111(0x17b)))&&_0x4a88a9[_0x145111(0x1f2)](_0x1f2f3e);}for(const _0x381461 of _0x4a88a9){delete _0x8c5c7b['mcpServers'][_0x381461];}return _0x4a88a9[_0x145111(0x197)]>0x0&&writeFileSync(_0x348d44['oldMcpConfig'][_0x145111(0x1e9)],JSON[_0x145111(0x1c1)](_0x8c5c7b,null,0x2)+'\x0a',_0x145111(0x1f7)),{'step':0x4,'label':_0x145111(0x187),'ok':!![],'detail':_0x145111(0x1ce)+_0x4a88a9[_0x145111(0x1a5)](',\x20')+_0x145111(0x19e)+_0x348d44['oldMcpConfig'][_0x145111(0x1e9)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x145111(0x184)};}catch(_0x7c3782){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x7c3782[_0x145111(0x17a)]};}}function execSkillsRemove(_0x137556){const _0x498a80=a76_0x25ff99,_0x3f49fd=runNpxSkillsRemove(_0x137556,{'stdio':_0x498a80(0x1c9)});return{'step':0x5,'label':_0x498a80(0x1a1),'ok':_0x3f49fd['ok'],'detail':_0x3f49fd['ok']?'lovrabet/lovrabet-skill\x20removed':_0x3f49fd['error']??_0x498a80(0x1e1)+_0x3f49fd['status']};}function a76_0x3a3c(_0x533d2d,_0x185226){_0x533d2d=_0x533d2d-0x179;const _0x5d1d64=a76_0x5d1d();let _0x3a3c8a=_0x5d1d64[_0x533d2d];return _0x3a3c8a;}function execSkillsAdd(_0x28e9c8){const _0x4c33fa=a76_0x25ff99,_0x1123ae=runNpxSkillsAddGlobal(_0x28e9c8,_0x4c33fa(0x17e),{'stdio':'inherit'});return{'step':0x6,'label':_0x4c33fa(0x194),'ok':_0x1123ae['ok'],'detail':_0x1123ae['ok']?_0x4c33fa(0x1a2):_0x1123ae['error']??_0x4c33fa(0x1e1)+_0x1123ae[_0x4c33fa(0x1b4)]};}function execUpgradeSdk(_0x9769af){const _0x5549d1=a76_0x25ff99;if(!_0x9769af[_0x5549d1(0x1b7)])return{'step':0x7,'label':_0x5549d1(0x1ed),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x162b7a,currentVersion:_0x333ccc,field:_0x2084b3}=_0x9769af[_0x5549d1(0x1b7)];try{const _0x5ec2d5=readFileSync(_0x162b7a,_0x5549d1(0x1f7)),_0x2930b9=JSON[_0x5549d1(0x1a9)](_0x5ec2d5);return _0x2930b9[_0x2084b3][_0x5549d1(0x1bf)]=_0x5549d1(0x1d0),writeFileSync(_0x162b7a,JSON[_0x5549d1(0x1c1)](_0x2930b9,null,0x2)+'\x0a',_0x5549d1(0x1f7)),{'step':0x7,'label':_0x5549d1(0x1ed),'ok':!![],'detail':_0x2084b3+_0x5549d1(0x1d3)+_0x333ccc+_0x5549d1(0x18b)};}catch(_0x2a32cb){return{'step':0x7,'label':_0x5549d1(0x1ed),'ok':![],'detail':_0x2a32cb[_0x5549d1(0x17a)]};}}function tryStat(_0x1e0369){try{return statSync(_0x1e0369);}catch{return undefined;}}function printSummary(_0x10da68){const _0x357ebe=a76_0x25ff99;console['log'](''),console[_0x357ebe(0x1aa)](a76_0x57561b[_0x357ebe(0x19c)](_0x357ebe(0x18d))),console[_0x357ebe(0x1aa)]('');for(const _0x10b7a6 of _0x10da68){const _0x46e35b=_0x10b7a6['ok']?a76_0x57561b[_0x357ebe(0x186)]('OK'):a76_0x57561b[_0x357ebe(0x189)]('FAIL');console['log']('\x20\x20'+_0x46e35b+'\x20\x20Step\x20'+_0x10b7a6[_0x357ebe(0x180)]+':\x20'+_0x10b7a6['label']);if(_0x10b7a6[_0x357ebe(0x1d9)])console['log'](_0x357ebe(0x191)+a76_0x57561b['gray'](_0x10b7a6[_0x357ebe(0x1d9)]));}console['log']('');}export async function upgradeApp(_0x4daf1c,_0x51ab1d){const _0x3be8ed=a76_0x25ff99,_0x355ede=process[_0x3be8ed(0x1c7)](),_0x4449e9=analyse(_0x355ede),_0x4528f0=!_0x4449e9[_0x3be8ed(0x1e8)]&&_0x4449e9[_0x3be8ed(0x1bb)]['length']===0x0&&!_0x4449e9['oldMcpConfig']&&!_0x4449e9[_0x3be8ed(0x1c3)]&&!_0x4449e9[_0x3be8ed(0x1b7)];if(_0x4528f0){console[_0x3be8ed(0x1aa)](a76_0x57561b['green']('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x4449e9);const _0x37a9a3=_0x51ab1d[_0x3be8ed(0x1cc)]||_0x51ab1d['Y']||_0x4daf1c;if(!_0x37a9a3)try{const _0x552cdb=await askConfirm(_0x3be8ed(0x1a3));if(!_0x552cdb){console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x1bd)](_0x3be8ed(0x1f4)));return;}}catch(_0x24017f){if(_0x24017f?.[_0x3be8ed(0x17a)]===_0x3be8ed(0x18c)){console[_0x3be8ed(0x1aa)](a76_0x57561b['gray'](_0x3be8ed(0x1f4)));return;}throw _0x24017f;}const _0x5a51fa=[],_0x4b4eab=a76_0x37b006({'text':_0x3be8ed(0x1ae),'color':_0x3be8ed(0x181)})['start'](),_0x100a8c=execConfigMigration(_0x4449e9,_0x355ede);_0x5a51fa[_0x3be8ed(0x1f2)](_0x100a8c),_0x4b4eab[_0x100a8c['ok']?_0x3be8ed(0x1e5):_0x3be8ed(0x1c2)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x100a8c[_0x3be8ed(0x1d9)]??(_0x100a8c['ok']?_0x3be8ed(0x1b2):_0x3be8ed(0x1e7))));const _0x134510=resolve(_0x355ede,'.lovrabet'),_0x2c6bcd=a76_0x37b006({'text':_0x3be8ed(0x1c5),'color':_0x3be8ed(0x181)})[_0x3be8ed(0x1c8)]();if(existsSync(_0x134510))try{rmSync(_0x134510,{'recursive':!![],'force':!![]}),_0x2c6bcd[_0x3be8ed(0x1e5)](_0x3be8ed(0x1f9)),_0x5a51fa[_0x3be8ed(0x1f2)]({'step':0x2,'label':_0x3be8ed(0x1d6),'ok':!![]});}catch(_0x527cbb){_0x2c6bcd[_0x3be8ed(0x1c2)](_0x3be8ed(0x1b3)+_0x527cbb[_0x3be8ed(0x17a)]),_0x5a51fa[_0x3be8ed(0x1f2)]({'step':0x2,'label':_0x3be8ed(0x1d6),'ok':![],'detail':_0x527cbb[_0x3be8ed(0x17a)]});}else _0x2c6bcd[_0x3be8ed(0x18e)](_0x3be8ed(0x1ac)),_0x5a51fa[_0x3be8ed(0x1f2)]({'step':0x2,'label':_0x3be8ed(0x1d6),'ok':!![],'detail':_0x3be8ed(0x1a6)});const _0x446d74=a76_0x37b006({'text':_0x3be8ed(0x1f6),'color':'cyan'})['start'](),_0x57fce5=execRemoveOldArtifacts(_0x4449e9[_0x3be8ed(0x1bb)]);_0x5a51fa[_0x3be8ed(0x1f2)](_0x57fce5),_0x446d74[_0x57fce5['ok']?_0x3be8ed(0x1e5):_0x3be8ed(0x1c2)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x57fce5[_0x3be8ed(0x1d9)]??(_0x57fce5['ok']?_0x3be8ed(0x1b2):_0x3be8ed(0x1e7))));const _0x141ddc=a76_0x37b006({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':'cyan'})['start'](),_0x5c110a=execCleanMcp(_0x4449e9);_0x5a51fa[_0x3be8ed(0x1f2)](_0x5c110a),_0x141ddc[_0x5c110a['ok']?_0x3be8ed(0x1e5):_0x3be8ed(0x1c2)](_0x3be8ed(0x1cd)+(_0x5c110a['detail']??(_0x5c110a['ok']?_0x3be8ed(0x1b2):_0x3be8ed(0x1e7))));const _0x23974d=a76_0x37b006({'text':_0x3be8ed(0x19f),'color':_0x3be8ed(0x181)})[_0x3be8ed(0x1c8)](),_0x4b8efd=execSkillsRemove(_0x355ede);_0x5a51fa[_0x3be8ed(0x1f2)](_0x4b8efd),_0x23974d[_0x4b8efd['ok']?_0x3be8ed(0x1e5):_0x3be8ed(0x1c2)](_0x3be8ed(0x18f)+(_0x4b8efd[_0x3be8ed(0x1d9)]??(_0x4b8efd['ok']?_0x3be8ed(0x1b2):_0x3be8ed(0x1e7))));const _0x465284=a76_0x37b006({'text':_0x3be8ed(0x1cb),'color':_0x3be8ed(0x181)})[_0x3be8ed(0x1c8)](),_0x4ec6b2=execSkillsAdd(_0x355ede);_0x5a51fa['push'](_0x4ec6b2),_0x465284[_0x4ec6b2['ok']?'succeed':'fail'](_0x3be8ed(0x19b)+(_0x4ec6b2[_0x3be8ed(0x1d9)]??(_0x4ec6b2['ok']?'done':_0x3be8ed(0x1e7))));const _0xe0972a=a76_0x37b006({'text':_0x3be8ed(0x17f),'color':_0x3be8ed(0x181)})[_0x3be8ed(0x1c8)](),_0x4ca948=execUpgradeSdk(_0x4449e9);_0x5a51fa[_0x3be8ed(0x1f2)](_0x4ca948),_0xe0972a[_0x4ca948['ok']?_0x3be8ed(0x1e5):_0x3be8ed(0x1c2)](_0x3be8ed(0x196)+(_0x4ca948[_0x3be8ed(0x1d9)]??(_0x4ca948['ok']?_0x3be8ed(0x1b2):'failed'))),printSummary(_0x5a51fa);const _0x8c32d8=_0x5a51fa['some'](_0x23034b=>!_0x23034b['ok']);_0x8c32d8?console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x1d8)](_0x3be8ed(0x1dd))):console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x186)](_0x3be8ed(0x1ef))),_0x4ca948['ok']&&_0x4449e9[_0x3be8ed(0x1b7)]&&(console[_0x3be8ed(0x1aa)](''),console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x19c)][_0x3be8ed(0x181)](_0x3be8ed(0x1bc))),console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x181)](_0x3be8ed(0x188))),console[_0x3be8ed(0x1aa)](''),console['log'](a76_0x57561b[_0x3be8ed(0x1cf)](_0x3be8ed(0x1e3))),console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x1cf)](_0x3be8ed(0x1a7))),console[_0x3be8ed(0x1aa)](a76_0x57561b[_0x3be8ed(0x1cf)](_0x3be8ed(0x1ca))),console[_0x3be8ed(0x1aa)](''));}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x5936d1=a77_0x188f;(function(_0x5bab0e,_0x4886f8){const _0x30539f=a77_0x188f,_0x4d95ee=_0x5bab0e();while(!![]){try{const _0x3abbc9=parseInt(_0x30539f(0x150))/0x1*(-parseInt(_0x30539f(0x151))/0x2)+parseInt(_0x30539f(0x138))/0x3*(parseInt(_0x30539f(0x142))/0x4)+-parseInt(_0x30539f(0x141))/0x5*(parseInt(_0x30539f(0x144))/0x6)+parseInt(_0x30539f(0x147))/0x7+parseInt(_0x30539f(0x135))/0x8*(-parseInt(_0x30539f(0x153))/0x9)+parseInt(_0x30539f(0x157))/0xa*(parseInt(_0x30539f(0x160))/0xb)+parseInt(_0x30539f(0x12d))/0xc;if(_0x3abbc9===_0x4886f8)break;else _0x4d95ee['push'](_0x4d95ee['shift']());}catch(_0x108ba4){_0x4d95ee['push'](_0x4d95ee['shift']());}}}(a77_0x5b78,0x3dfd2));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';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(_0x4e1524){const _0x49f841=a77_0x188f;for(const _0x1c72b0 of _0x4e1524){definitions[_0x49f841(0x13c)](_0x1c72b0[_0x49f841(0x13f)]+':'+_0x1c72b0[_0x49f841(0x15c)],_0x1c72b0);let _0x29917f=serviceGroups[_0x49f841(0x133)](_0x1c72b0[_0x49f841(0x13f)]);!_0x29917f&&(_0x29917f=[],serviceGroups[_0x49f841(0x13c)](_0x1c72b0[_0x49f841(0x13f)],_0x29917f)),_0x29917f[_0x49f841(0x15b)](_0x1c72b0);}}function registerDeclarativeService(_0x15ae45,_0x5f1bbd,_0x250737){const _0x364a22=a77_0x188f;registerDefinitions(_0x5f1bbd);_0x250737?.[_0x364a22(0x137)]&®isterDefinitions([_0x250737[_0x364a22(0x137)]]);const _0x3b7d56=_0x5efe66=>_0x5efe66==='read'?'':_0x5efe66===_0x364a22(0x131)?_0x364a22(0x154):_0x364a22(0x136),_0x10e7c4={'service':_0x5f1bbd[0x0][_0x364a22(0x13f)],'label':_0x15ae45,'commands':_0x5f1bbd[_0x364a22(0x145)](_0x5015de=>({'command':_0x5015de['command'],'description':_0x5015de[_0x364a22(0x140)],'tag':_0x3b7d56(_0x5015de[_0x364a22(0x14c)])})),'declarative':!![],'defaultCommand':_0x250737?.[_0x364a22(0x130)]??(_0x250737?.[_0x364a22(0x13d)]?_0x5f1bbd[0x0][_0x364a22(0x15c)]:undefined),'wildcardDef':_0x250737?.[_0x364a22(0x137)],'isSingleCommand':_0x250737?.[_0x364a22(0x13d)]};serviceRegistry['push'](_0x10e7c4),serviceByName[_0x364a22(0x13c)](_0x10e7c4[_0x364a22(0x13f)],_0x10e7c4);}function a77_0x188f(_0x5a8929,_0x41c50d){_0x5a8929=_0x5a8929-0x12b;const _0x5b787e=a77_0x5b78();let _0x188f8d=_0x5b787e[_0x5a8929];return _0x188f8d;}registerDeclarativeService(a77_0x5936d1(0x155),initDefinitions,{'defaultCommand':a77_0x5936d1(0x14e),'isSingleCommand':!![]}),registerDeclarativeService(a77_0x5936d1(0x12c),projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a77_0x5936d1(0x149),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a77_0x5936d1(0x13a)]=[{'command':a77_0x5936d1(0x158),'description':a77_0x5936d1(0x13e),'tag':''}];}registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a77_0x5936d1(0x12b),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0x5936d1(0x14b),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0x5936d1(0x12f),configDefinitions),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a77_0x5936d1(0x156),menuDefinitions),registerDeclarativeService(a77_0x5936d1(0x13b),datasetDefinitions),registerDeclarativeService(a77_0x5936d1(0x132),bffDefinitions),registerDeclarativeService(a77_0x5936d1(0x159),sqlDefinitions),registerDeclarativeService(a77_0x5936d1(0x15d),codegenDefinitions),registerDeclarativeService(a77_0x5936d1(0x134),skillDefinitions),registerDeclarativeService(a77_0x5936d1(0x139),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':a77_0x5936d1(0x12e),'command':a77_0x5936d1(0x143)},'start':{'service':'run','command':a77_0x5936d1(0x14f)},'build':{'service':'run','command':a77_0x5936d1(0x14a)},'preview':{'service':a77_0x5936d1(0x14e),'command':a77_0x5936d1(0x15f)},'logout':{'service':a77_0x5936d1(0x15a),'command':'logout'},'skills':{'service':a77_0x5936d1(0x146),'command':a77_0x5936d1(0x148)}};export function findDefinition(_0x5d8ecc,_0x4c48d7){const _0x176f3c=a77_0x5936d1;return definitions[_0x176f3c(0x133)](_0x5d8ecc+':'+_0x4c48d7);}export function isKnownService(_0x881c9a){const _0x459c59=a77_0x5936d1;return serviceByName[_0x459c59(0x14d)](_0x881c9a);}function a77_0x5b78(){const _0x47789e=['Project','5893956SrpSUV','project','Configuration','defaultCommand','write','BFF\x20Scripts','get','Skills','19928wcQvAY','\x20\x20[high-risk-write]','wildcardDef','92538znWZRS','Logs','commands','Dataset\x20&\x20Operations','set','isSingleCommand','Run\x20any\x20package.json\x20script','service','description','135Trmvmu','4syEZYX','create','64662fZRnYo','map','skill','2455292LBSroR','install','Run\x20Scripts','build','Diagnostics','risk','has','run','start','7DrdSiv','128786ToinFv','values','531gnZvqa','\x20\x20[write]','Quick\x20Start','Menu','67460CAkrZO','<script>','SQL\x20Queries','auth','push','command','Code\x20Generation','from','preview','440hGgkgp','Self\x20Update'];a77_0x5b78=function(){return _0x47789e;};return a77_0x5b78();}export function isDeclarativeService(_0xbabdc2){const _0x3afd8c=a77_0x5936d1;return serviceGroups[_0x3afd8c(0x14d)](_0xbabdc2)||serviceByName[_0x3afd8c(0x133)](_0xbabdc2)?.[_0x3afd8c(0x137)]!==undefined;}export function getServiceEntry(_0x1dae0c){const _0x441942=a77_0x5936d1;return serviceByName[_0x441942(0x133)](_0x1dae0c);}export function getLegacyHandler(_0x1344dc,_0x5bb5eb){return undefined;}export function getAllDefinitions(){const _0x4f8c35=a77_0x5936d1;return Array[_0x4f8c35(0x15e)](definitions[_0x4f8c35(0x152)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0xb0d348=a78_0x47a7;(function(_0xb19c57,_0x319954){const _0x5dabab=a78_0x47a7,_0x5636f4=_0xb19c57();while(!![]){try{const _0x258914=parseInt(_0x5dabab(0x191))/0x1*(-parseInt(_0x5dabab(0x16d))/0x2)+-parseInt(_0x5dabab(0x178))/0x3*(-parseInt(_0x5dabab(0x193))/0x4)+parseInt(_0x5dabab(0x17a))/0x5+parseInt(_0x5dabab(0x19c))/0x6+-parseInt(_0x5dabab(0x198))/0x7+parseInt(_0x5dabab(0x169))/0x8*(-parseInt(_0x5dabab(0x170))/0x9)+parseInt(_0x5dabab(0x195))/0xa*(-parseInt(_0x5dabab(0x19e))/0xb);if(_0x258914===_0x319954)break;else _0x5636f4['push'](_0x5636f4['shift']());}catch(_0x46295f){_0x5636f4['push'](_0x5636f4['shift']());}}}(a78_0x2435,0x1cd49));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';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';function a78_0x2435(){const _0x2f70a0=['dev','90gNwdSY','script','has','Script\x20\x22','push','\x20run\x20start','parse','watch','3522LxKThE','all','882030LWNJBi','slice','keys','pnpm-lock.yaml','--watch','length','node_modules','Script\x20name\x20defined\x20in\x20package.json','run','vite','scripts','start','\x22\x20not\x20found\x20in\x20package.json.','bool','cwd','utf-8','\x20\x20\x20\x20','close','log','pnpm','\x20run\x20<script>\x0a','.bin','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','2IiIUuH','preview','656lZQOJm','\x20\x20EXAMPLES','2785910QwZipX','max','args','107947pOcATG','map','package.json','\x20run\x20','1177686plMiIj','validation','11IwEJsB','vite\x20preview\x20exited\x20with\x20code\x20','boolean','Available:\x20','\x0a\x20\x20Usage:\x20','yarn.lock','join','entries','No\x20scripts\x20defined\x20in\x20package.json.','bun.lockb','error','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','(none)','bun','padEnd','\x20exited\x20with\x20code\x20','Enable\x20watch\x20mode\x20for\x20preview','build','67016GNyxvq','npm','needsUpgrade','bun.lock','69352moxuZn','inherit'];a78_0x2435=function(){return _0x2f70a0;};return a78_0x2435();}const VERSION_CHECK_SCRIPTS=new Set([a78_0xb0d348(0x185),a78_0xb0d348(0x16f)]);function readPackageScripts(_0x4efb2c){const _0x2a5746=a78_0xb0d348,_0xf49051=resolve(_0x4efb2c,_0x2a5746(0x19a));if(!existsSync(_0xf49051))return null;try{const _0x2427de=JSON[_0x2a5746(0x176)](readFileSync(_0xf49051,_0x2a5746(0x189)));return _0x2427de[_0x2a5746(0x184)]??{};}catch{return null;}}function detectPackageManager(_0x4b4489){const _0x1df6f5=a78_0xb0d348;if(existsSync(resolve(_0x4b4489,_0x1df6f5(0x1a7)))||existsSync(resolve(_0x4b4489,_0x1df6f5(0x16c))))return _0x1df6f5(0x164);if(existsSync(resolve(_0x4b4489,_0x1df6f5(0x17d))))return _0x1df6f5(0x18d);if(existsSync(resolve(_0x4b4489,_0x1df6f5(0x1a3))))return'yarn';return _0x1df6f5(0x16a);}async function versionCheck(_0x3f1bf9){const _0x5b3823=a78_0xb0d348,_0x26e570=await checkCliVersion();if(_0x26e570['needsUpgrade'])printCliUpgradeWarning(_0x26e570);const _0x455f29=await checkSdkVersion(_0x3f1bf9);if(_0x455f29[_0x5b3823(0x16b)])printSdkUpgradeWarning(_0x455f29);}function spawnScript(_0x10dae6,_0x1228cc,_0x3b3feb,_0x5224b4){return new Promise((_0x4d4744,_0x3d3098)=>{const _0xa8237e=a78_0x47a7,_0x6a267c=[_0xa8237e(0x182),_0x1228cc,..._0x3b3feb],_0x37476f=spawn(_0x10dae6,_0x6a267c,{'cwd':_0x5224b4,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x5224b4,_0xa8237e(0x180),_0xa8237e(0x18f))+delimiter+process.env.PATH}});_0x37476f['on'](_0xa8237e(0x18b),_0x737fc=>{const _0x410170=_0xa8237e;if(_0x737fc===0x0||_0x737fc===null)_0x4d4744();else _0x3d3098(new Error(_0x10dae6+_0x410170(0x19b)+_0x1228cc+_0x410170(0x166)+_0x737fc));}),_0x37476f['on'](_0xa8237e(0x1a8),_0x3d3098);});}function spawnViteBuildWatch(_0x5bcf16){return new Promise((_0x40c2a2,_0x8a205a)=>{const _0x18a992=a78_0x47a7,_0x39ed01=spawn(_0x18a992(0x183),[_0x18a992(0x168),_0x18a992(0x17e)],{'cwd':_0x5bcf16,'stdio':_0x18a992(0x16e),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5bcf16,'node_modules',_0x18a992(0x18f))+delimiter+process.env.PATH}});_0x39ed01['on']('close',_0x10cbff=>{const _0x3a585b=_0x18a992;if(_0x10cbff===0x0||_0x10cbff===null)_0x40c2a2();else _0x8a205a(new Error(_0x3a585b(0x1a9)+_0x10cbff));}),_0x39ed01['on'](_0x18a992(0x1a8),_0x8a205a);});}function spawnVitePreview(_0x4e9508){return new Promise((_0x3025ae,_0x55a951)=>{const _0x42b490=a78_0x47a7,_0x29303e=spawn(_0x42b490(0x183),[_0x42b490(0x192)],{'cwd':_0x4e9508,'stdio':_0x42b490(0x16e),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4e9508,_0x42b490(0x180),_0x42b490(0x18f))+delimiter+process.env.PATH}});_0x29303e['on'](_0x42b490(0x18b),_0x245fd5=>{const _0x51ff8d=_0x42b490;if(_0x245fd5===0x0||_0x245fd5===null)_0x3025ae();else _0x55a951(new Error(_0x51ff8d(0x19f)+_0x245fd5));}),_0x29303e['on']('error',_0x55a951);});}const runFlags=[{'name':a78_0xb0d348(0x177),'type':a78_0xb0d348(0x1a0),'description':a78_0xb0d348(0x167),'default':![]}];function a78_0x47a7(_0x29a831,_0x4d06ad){_0x29a831=_0x29a831-0x164;const _0x2435ac=a78_0x2435();let _0x47a7ad=_0x2435ac[_0x29a831];return _0x47a7ad;}export const runDefinition={'service':a78_0xb0d348(0x182),'command':'run','description':'Run\x20a\x20package.json\x20script','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a78_0xb0d348(0x171),'description':a78_0xb0d348(0x181),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x1ccf95=a78_0xb0d348,_0x4d2fb7=readPackageScripts(process[_0x1ccf95(0x188)]()),_0x50b030=[];if(_0x4d2fb7&&Object[_0x1ccf95(0x17c)](_0x4d2fb7)[_0x1ccf95(0x17f)]>0x0){const _0xdde09f=Object['keys'](_0x4d2fb7),_0x1a5b82=Math[_0x1ccf95(0x196)](..._0xdde09f[_0x1ccf95(0x199)](_0x468193=>_0x468193['length']));_0x50b030[_0x1ccf95(0x174)]('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x15f3fb,_0x308fc7]of Object[_0x1ccf95(0x1a5)](_0x4d2fb7)){_0x50b030[_0x1ccf95(0x174)](_0x1ccf95(0x18a)+CLI_BIN_NAME+_0x1ccf95(0x19b)+_0x15f3fb[_0x1ccf95(0x165)](_0x1a5b82+0x2)+'#\x20'+_0x308fc7);}}else _0x50b030[_0x1ccf95(0x174)](_0x1ccf95(0x194)),_0x50b030['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x1ccf95(0x175)),_0x50b030['push'](_0x1ccf95(0x18a)+CLI_BIN_NAME+'\x20run\x20build'),_0x50b030['push'](_0x1ccf95(0x18a)+CLI_BIN_NAME+'\x20run\x20preview'),_0x50b030[_0x1ccf95(0x174)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x1ccf95(0x190));return _0x50b030[_0x1ccf95(0x1a4)]('\x0a');},async 'execute'(_0x47f746){const _0x3f0dd3=a78_0xb0d348,_0x5c09f6=process['cwd'](),_0x11727d=_0x47f746['args'][0x0],_0x4df071=_0x47f746[_0x3f0dd3(0x197)][_0x3f0dd3(0x17b)](0x1),_0x374042=readPackageScripts(_0x5c09f6);if(!_0x374042)throw CliErrors[_0x3f0dd3(0x19d)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x11727d){const _0x1e7ba0=Object['keys'](_0x374042);if(_0x1e7ba0[_0x3f0dd3(0x17f)]===0x0)console[_0x3f0dd3(0x18c)](_0x3f0dd3(0x1a6));else{console['log']('\x0a\x20\x20Available\x20scripts:\x0a');const _0x8effb5=Math[_0x3f0dd3(0x196)](..._0x1e7ba0['map'](_0x43487c=>_0x43487c[_0x3f0dd3(0x17f)]));for(const [_0x46568e,_0x2b0099]of Object[_0x3f0dd3(0x1a5)](_0x374042)){console['log'](_0x3f0dd3(0x18a)+_0x46568e[_0x3f0dd3(0x165)](_0x8effb5+0x2)+_0x2b0099);}console[_0x3f0dd3(0x18c)](_0x3f0dd3(0x1a2)+CLI_BIN_NAME+_0x3f0dd3(0x18e));}return{'ok':!![]};}if(!_0x374042[_0x11727d])throw CliErrors[_0x3f0dd3(0x19d)](_0x3f0dd3(0x173)+_0x11727d+_0x3f0dd3(0x186),_0x3f0dd3(0x1a1)+(Object[_0x3f0dd3(0x17c)](_0x374042)[_0x3f0dd3(0x1a4)](',\x20')||_0x3f0dd3(0x1aa)));const _0x5196b5=detectPackageManager(_0x5c09f6);VERSION_CHECK_SCRIPTS[_0x3f0dd3(0x172)](_0x11727d)&&await versionCheck(_0x5c09f6);if(_0x11727d==='preview'&&_0x47f746[_0x3f0dd3(0x187)](_0x3f0dd3(0x177)))return await Promise[_0x3f0dd3(0x179)]([spawnViteBuildWatch(_0x5c09f6),spawnVitePreview(_0x5c09f6)]),{'ok':!![]};return await spawnScript(_0x5196b5,_0x11727d,_0x4df071,_0x5c09f6),{'ok':!![]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a79_0x25fa(_0xe6b7b5,_0x160093){_0xe6b7b5=_0xe6b7b5-0x1d0;const _0x2727dd=a79_0x2727();let _0x25fa85=_0x2727dd[_0xe6b7b5];return _0x25fa85;}const a79_0x37220a=a79_0x25fa;function a79_0x2727(){const _0x11eaed=['Check\x20network\x20connectivity\x20and\x20try\x20again.','skill-install','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','Install\x20developer\x20skill\x20package','40266bySDNQ','17982QPCMcH','6ZwWLCj','apiError','869025qbpBJw','info','1180cwKBaG','pipe','error','27556390XpsPni','log','\x20skill\x20installed','nonInteractive','lovrabet/rabetbase','write','808Khiwam','unknown','5902000lzYjwA','skill','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','../../skills/npx-skills-add.js','425509pwiUKj','cwd','10101cNoJsR'];a79_0x2727=function(){return _0x11eaed;};return a79_0x2727();}(function(_0x12eac3,_0xb7798a){const _0xd6f901=a79_0x25fa,_0x47a8b8=_0x12eac3();while(!![]){try{const _0x3c437f=parseInt(_0xd6f901(0x1ea))/0x1+parseInt(_0xd6f901(0x1e7))/0x2+-parseInt(_0xd6f901(0x1e1))/0x3*(-parseInt(_0xd6f901(0x1d0))/0x4)+parseInt(_0xd6f901(0x1db))/0x5+-parseInt(_0xd6f901(0x1e8))/0x6*(parseInt(_0xd6f901(0x1df))/0x7)+-parseInt(_0xd6f901(0x1d9))/0x8*(-parseInt(_0xd6f901(0x1e6))/0x9)+-parseInt(_0xd6f901(0x1d3))/0xa;if(_0x3c437f===_0xb7798a)break;else _0x47a8b8['push'](_0x47a8b8['shift']());}catch(_0x5d9263){_0x47a8b8['push'](_0x47a8b8['shift']());}}}(a79_0x2727,0xa7c19));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a79_0x37220a(0x1dc),'command':'install','description':a79_0x37220a(0x1e5),'risk':a79_0x37220a(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x564a77){const _0x287a64=a79_0x37220a;logger['setLogPath'](process[_0x287a64(0x1e0)]()),logger[_0x287a64(0x1eb)](_0x287a64(0x1e3),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x46447c}=await import(_0x287a64(0x1de)),_0x16f911=_0x564a77[_0x287a64(0x1d6)]?_0x287a64(0x1d1):'inherit';console[_0x287a64(0x1d4)](_0x287a64(0x1e4));const _0x1f72dc=_0x46447c(process[_0x287a64(0x1e0)](),_0x287a64(0x1d7),{'stdio':_0x16f911});if(_0x1f72dc['skipped'])console[_0x287a64(0x1d4)](_0x287a64(0x1dd));else{if(_0x1f72dc['ok'])console[_0x287a64(0x1d4)](CLI_BIN_NAME+_0x287a64(0x1d5));else throw CliErrors[_0x287a64(0x1e9)]('npx\x20skills\x20add\x20failed:\x20'+(_0x1f72dc[_0x287a64(0x1d2)]||_0x287a64(0x1da)),_0x287a64(0x1e2));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a80_0xb2c0(_0x159586,_0x3d364f){_0x159586=_0x159586-0x15b;const _0x819fe3=a80_0x819f();let _0xb2c042=_0x819fe3[_0x159586];return _0xb2c042;}const a80_0xbd87f6=a80_0xb2c0;function a80_0x819f(){const _0x281744=['dbId','boolean','608226dDMjPI','description','21322qCHAvQ','verbose','1160rZaQKl','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlCode','681620jpZqkZ','read','str','6748406vNxxXA','930132jlZhnF','sql','sqlcode','219zpdkRS','appCode','27459FKXmHs','4930465SCoXhN','sqlName'];a80_0x819f=function(){return _0x281744;};return a80_0x819f();}(function(_0x18dde2,_0xa961f4){const _0x3d6510=a80_0xb2c0,_0x32f8a5=_0x18dde2();while(!![]){try{const _0x4ac2c6=-parseInt(_0x3d6510(0x164))/0x1+-parseInt(_0x3d6510(0x15b))/0x2*(parseInt(_0x3d6510(0x167))/0x3)+-parseInt(_0x3d6510(0x160))/0x4+parseInt(_0x3d6510(0x16a))/0x5+parseInt(_0x3d6510(0x16e))/0x6+parseInt(_0x3d6510(0x163))/0x7+parseInt(_0x3d6510(0x15d))/0x8*(parseInt(_0x3d6510(0x169))/0x9);if(_0x4ac2c6===_0xa961f4)break;else _0x32f8a5['push'](_0x32f8a5['shift']());}catch(_0x1218d9){_0x32f8a5['push'](_0x32f8a5['shift']());}}}(a80_0x819f,0x962d7));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';export const sqlDetail={'service':a80_0xbd87f6(0x165),'command':'detail','description':a80_0xbd87f6(0x15e),'risk':a80_0xbd87f6(0x161),'flags':[SQLCODE_FLAG,{'name':a80_0xbd87f6(0x15c),'type':a80_0xbd87f6(0x16d),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x2cad70){const _0xea07e5=a80_0xbd87f6,_0x455faf=await getSqlQueryInfo(_0x2cad70['appCode'],_0x2cad70[_0xea07e5(0x162)](_0xea07e5(0x166))),_0x28811f=_0x2cad70['bool'](_0xea07e5(0x15c));if(_0x28811f)return{'ok':!![],'data':_0x455faf};const _0x4da1fe=_0x455faf[_0xea07e5(0x16c)]?await getDbName(_0x2cad70[_0xea07e5(0x168)],_0x455faf[_0xea07e5(0x16c)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x455faf[_0xea07e5(0x15f)],'sqlName':_0x455faf[_0xea07e5(0x16b)],'db':_0x4da1fe?_0x4da1fe+'\x20('+_0x455faf[_0xea07e5(0x16c)]+')':_0x455faf[_0xea07e5(0x16c)]??'','description':_0x455faf[_0xea07e5(0x16f)]??'','sqlContent':_0x455faf['sqlContent']??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a81_0x50dae0=a81_0x459e;(function(_0xe56861,_0x21d390){const _0x478a9a=a81_0x459e,_0x2224b2=_0xe56861();while(!![]){try{const _0x10c309=parseInt(_0x478a9a(0xb8))/0x1+parseInt(_0x478a9a(0xc4))/0x2*(-parseInt(_0x478a9a(0xae))/0x3)+parseInt(_0x478a9a(0xbe))/0x4+-parseInt(_0x478a9a(0xaf))/0x5+parseInt(_0x478a9a(0xc0))/0x6+parseInt(_0x478a9a(0xb6))/0x7+parseInt(_0x478a9a(0xb4))/0x8*(parseInt(_0x478a9a(0xb5))/0x9);if(_0x10c309===_0x21d390)break;else _0x2224b2['push'](_0x2224b2['shift']());}catch(_0x5c2814){_0x2224b2['push'](_0x2224b2['shift']());}}}(a81_0x1bfc,0x7910e));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a81_0x1bfc(){const _0x28566a=['Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','parse','1032HGeXqm','44559YTrVVY','1857135XskyBy','sqlcode','500901pLmOOd','params','read','Returned\x20','\x20row(s)\x20in\x20','execSuccess','467656eChHqG','now','305124cdhdAW','execError','appCode','str','6uMyBIE','339267kagbGT','3687500EXZtCl','SQL\x20execution\x20failed','isArray'];a81_0x1bfc=function(){return _0x28566a;};return a81_0x1bfc();}function a81_0x459e(_0x26e0ce,_0x234924){_0x26e0ce=_0x26e0ce-0xae;const _0x1bfc7f=a81_0x1bfc();let _0x459ed5=_0x1bfc7f[_0x26e0ce];return _0x459ed5;}import{SQLCODE_FLAG}from'../common/flags.js';export const sqlExec={'service':'sql','command':'exec','description':a81_0x50dae0(0xb2),'risk':a81_0x50dae0(0xba),'flags':[SQLCODE_FLAG,{'name':a81_0x50dae0(0xb9),'type':'string','description':'SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'}],async 'execute'(_0x2db34e){const _0x3520cb=a81_0x50dae0;let _0x34f153;const _0x2c16b4=_0x2db34e[_0x3520cb(0xc3)](_0x3520cb(0xb9));if(_0x2c16b4)try{_0x34f153=JSON[_0x3520cb(0xb3)](_0x2c16b4);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--params:\x20'+_0x2c16b4);}const _0x23ea70=Date[_0x3520cb(0xbf)](),_0x58d4b7=await executeSql(_0x2db34e[_0x3520cb(0xc2)],_0x2db34e[_0x3520cb(0xc3)](_0x3520cb(0xb7)),_0x34f153),_0x128419=Date[_0x3520cb(0xbf)]()-_0x23ea70,_0x4519c2=_0x58d4b7?.['execResult']??_0x58d4b7,_0x5d46e6=_0x58d4b7?.[_0x3520cb(0xbd)]??!![];if(!_0x5d46e6)return{'ok':![],'data':{'error':_0x58d4b7?.[_0x3520cb(0xc1)]||_0x3520cb(0xb0),'elapsed':_0x128419},'message':_0x3520cb(0xb0)};const _0x1a2c07=Array[_0x3520cb(0xb1)](_0x4519c2)?_0x4519c2:[];return{'ok':!![],'data':{'rows':_0x1a2c07,'rowCount':_0x1a2c07['length'],'elapsed':_0x128419},'message':_0x3520cb(0xbb)+_0x1a2c07['length']+_0x3520cb(0xbc)+_0x128419+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1eed2c,_0x21b5d2){const _0x1282da=a82_0x21c7,_0x563d8e=_0x1eed2c();while(!![]){try{const _0x5a9b23=-parseInt(_0x1282da(0x79))/0x1+-parseInt(_0x1282da(0x78))/0x2+parseInt(_0x1282da(0x75))/0x3+-parseInt(_0x1282da(0x7d))/0x4+parseInt(_0x1282da(0x76))/0x5*(parseInt(_0x1282da(0x77))/0x6)+-parseInt(_0x1282da(0x7c))/0x7*(parseInt(_0x1282da(0x7b))/0x8)+-parseInt(_0x1282da(0x7a))/0x9*(-parseInt(_0x1282da(0x74))/0xa);if(_0x5a9b23===_0x21b5d2)break;else _0x563d8e['push'](_0x563d8e['shift']());}catch(_0x5164d8){_0x563d8e['push'](_0x563d8e['shift']());}}}(a82_0x4172,0xd8eb5));import{sqlList}from'./list.js';import{sqlDetail}from'./detail.js';import{sqlValidate}from'./validate.js';import{sqlSave}from'./save.js';function a82_0x21c7(_0x188312,_0x30113e){_0x188312=_0x188312-0x74;const _0x417257=a82_0x4172();let _0x21c7e1=_0x417257[_0x188312];return _0x21c7e1;}import{sqlExec}from'./exec.js';function a82_0x4172(){const _0x5490c9=['3198136pjipeh','768735GGLDIZ','8726121qXHoSv','1434504ztVacC','7DkokAV','6306764hIWUKq','30bPuEcS','4236009vPMDpG','3457990hyoYsw','6yRkIsh'];a82_0x4172=function(){return _0x5490c9;};return a82_0x4172();}export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
|
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a83_0x5aa1(_0x36944c,_0x2ded48){_0x36944c=_0x36944c-0x106;const _0x3e6877=a83_0x3e68();let _0x5aa1fb=_0x3e6877[_0x36944c];return _0x5aa1fb;}const a83_0x36861c=a83_0x5aa1;(function(_0xa261bb,_0x31c225){const _0x1b69f9=a83_0x5aa1,_0x3d6a11=_0xa261bb();while(!![]){try{const _0x394c37=-parseInt(_0x1b69f9(0x126))/0x1+-parseInt(_0x1b69f9(0x10d))/0x2+parseInt(_0x1b69f9(0x107))/0x3*(-parseInt(_0x1b69f9(0x11f))/0x4)+parseInt(_0x1b69f9(0x120))/0x5+parseInt(_0x1b69f9(0x10a))/0x6*(parseInt(_0x1b69f9(0x116))/0x7)+-parseInt(_0x1b69f9(0x125))/0x8*(-parseInt(_0x1b69f9(0x113))/0x9)+parseInt(_0x1b69f9(0x11b))/0xa;if(_0x394c37===_0x31c225)break;else _0x3d6a11['push'](_0x3d6a11['shift']());}catch(_0x234d2e){_0x3d6a11['push'](_0x3d6a11['shift']());}}}(a83_0x3e68,0x79cb0));function a83_0x3e68(){const _0x1919e4=['dbId','10059EykqQs','number','string','66138IFpnWt','\x20SQL\x20queries\x20(total:\x20','tableData','571758xJForl','List\x20custom\x20SQL\x20queries','sqlcode','page','Page\x20number','bool','8937tlIkRM','sql','map','224ygJufU','all','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','appCode','name','4472350bMRhqd','sqlCode','str','description','808aSEDQG','1821810NHMMsO','length','verbose','Found\x20','pagesize','5896ZorQAH','434125bHBUsf','num','No\x20custom\x20SQL\x20queries\x20found.'];a83_0x3e68=function(){return _0x1919e4;};return a83_0x3e68();}import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../common/flags.js';export const sqlList={'service':a83_0x36861c(0x114),'command':'list','description':a83_0x36861c(0x10e),'risk':'read','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a83_0x36861c(0x109),'description':'Filter\x20by\x20SQL\x20name'},{'name':a83_0x36861c(0x110),'type':a83_0x36861c(0x108),'description':a83_0x36861c(0x111),'default':0x1},{'name':a83_0x36861c(0x124),'type':'number','description':'Page\x20size'},{'name':a83_0x36861c(0x122),'type':'boolean','description':a83_0x36861c(0x118)}],async 'execute'(_0x5c84ad){const _0x3164b0=a83_0x36861c,_0x274527=await listSqlQueries(_0x5c84ad[_0x3164b0(0x119)],{'sqlCode':_0x5c84ad[_0x3164b0(0x11d)](_0x3164b0(0x10f))||undefined,'sqlName':_0x5c84ad[_0x3164b0(0x11d)](_0x3164b0(0x11a))||undefined,'currentPage':_0x5c84ad[_0x3164b0(0x127)](_0x3164b0(0x110)),'pageSize':_0x5c84ad['num']('pagesize',0x32)}),_0x37e25b=_0x5c84ad[_0x3164b0(0x112)](_0x3164b0(0x122)),_0x982e06=_0x274527[_0x3164b0(0x10c)]??[],_0x4ec6ba=_0x274527['paging']?.['totalCount']??_0x982e06['length'];let _0x51dbde;return _0x37e25b?_0x51dbde=_0x982e06:_0x51dbde=await Promise[_0x3164b0(0x117)](_0x982e06[_0x3164b0(0x115)](async _0x4b855e=>{const _0x39721f=_0x3164b0,_0x1b7716=_0x4b855e[_0x39721f(0x106)]?await getDbName(_0x5c84ad[_0x39721f(0x119)],_0x4b855e[_0x39721f(0x106)]):undefined;return{'sqlCode':_0x4b855e[_0x39721f(0x11c)],'sqlName':_0x4b855e['sqlName'],'description':_0x4b855e[_0x39721f(0x11e)]??'','db':_0x1b7716?_0x1b7716+'\x20('+_0x4b855e[_0x39721f(0x106)]+')':_0x4b855e[_0x39721f(0x106)]??''};})),{'ok':!![],'data':_0x51dbde,'message':_0x982e06[_0x3164b0(0x121)]===0x0?_0x3164b0(0x128):_0x3164b0(0x123)+_0x982e06['length']+_0x3164b0(0x10b)+_0x4ec6ba+').'};}};
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x3ac6cb=a84_0x50c3;(function(_0xeba5c5,_0x3d7485){const _0x58072a=a84_0x50c3,_0x46cfd9=_0xeba5c5();while(!![]){try{const _0x47a7a9=-parseInt(_0x58072a(0xf3))/0x1*(-parseInt(_0x58072a(0xfc))/0x2)+parseInt(_0x58072a(0xdb))/0x3*(parseInt(_0x58072a(0xd5))/0x4)+-parseInt(_0x58072a(0x103))/0x5*(-parseInt(_0x58072a(0xed))/0x6)+parseInt(_0x58072a(0xe5))/0x7*(parseInt(_0x58072a(0xd8))/0x8)+parseInt(_0x58072a(0xe9))/0x9*(-parseInt(_0x58072a(0xde))/0xa)+parseInt(_0x58072a(0xdd))/0xb+-parseInt(_0x58072a(0x100))/0xc*(parseInt(_0x58072a(0xe8))/0xd);if(_0x47a7a9===_0x3d7485)break;else _0x46cfd9['push'](_0x46cfd9['shift']());}catch(_0x475fb1){_0x46cfd9['push'](_0x46cfd9['shift']());}}}(a84_0x2bea,0x24f8b));function a84_0x50c3(_0x26f529,_0x431b4d){_0x26f529=_0x26f529-0xd3;const _0x2beaed=a84_0x2bea();let _0x50c372=_0x2beaed[_0x26f529];return _0x50c372;}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';import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';function a84_0x2bea(){const _0x4e16b5=['39762TlYRSu','sqlname','sqlCode','str','File\x20not\x20found:\x20','validation','961VuHUdp','\x20|\x20Params:\x20','blocked','Updated','sql','dbId','utf-8','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','write','368zTqTiM','string','valid','parameters','12XxNdKC','save','join','195VsoDgN','sqlName','file','SQL\x20query\x20description','message','description','3884KQzywK','N/A','action','8ekhLgH','SQL\x20validation\x20failed:\x20','Created','351LXRnVr','\x20|\x20Tables:\x20','2995355dHCQiM','188390TwKPTw','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','/api/node-toolbox/sql/save','Type:\x20','sqlcode','tables','Validation:\x20','951167AhlqPi','sqlType','length','7289464fplOiL','117WDOYdk','SQL\x20query\x20display\x20name','POST','cwd'];a84_0x2bea=function(){return _0x4e16b5;};return a84_0x2bea();}import{SQLCODE_FLAG_OPTIONAL}from'../common/flags.js';export const sqlSave={'service':a84_0x3ac6cb(0xf7),'command':a84_0x3ac6cb(0x101),'description':a84_0x3ac6cb(0xdf),'risk':a84_0x3ac6cb(0xfb),'flags':[{'name':a84_0x3ac6cb(0x105),'type':a84_0x3ac6cb(0xfd),'required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a84_0x3ac6cb(0xee),'type':a84_0x3ac6cb(0xfd),'description':a84_0x3ac6cb(0xea)},{'name':'db','type':a84_0x3ac6cb(0xfd),'description':a84_0x3ac6cb(0xfa)},{'name':a84_0x3ac6cb(0xd4),'type':a84_0x3ac6cb(0xfd),'description':a84_0x3ac6cb(0x106)}],async 'validate'(_0x39e73a){const _0x1ca996=a84_0x3ac6cb,_0x1eae05=resolve(process['cwd'](),_0x39e73a[_0x1ca996(0xf0)](_0x1ca996(0x105)));if(!existsSync(_0x1eae05))throw CliErrors[_0x1ca996(0xf2)](_0x1ca996(0xf1)+_0x1eae05);const _0x34aca8=readFileSync(_0x1eae05,_0x1ca996(0xf9)),_0x254118=validateSql(_0x34aca8);if(!_0x254118[_0x1ca996(0xfe)])throw CliErrors['validation'](_0x1ca996(0xd9)+_0x254118['message']);},async 'dryRun'(_0x2af7b7){const _0x182e9b=a84_0x3ac6cb,_0x24fbbf=resolve(process[_0x182e9b(0xec)](),_0x2af7b7['str']('file')),_0x34eb06=readFileSync(_0x24fbbf,_0x182e9b(0xf9)),_0xea05ca=validateSql(_0x34eb06),_0x45c363=_0x2af7b7[_0x182e9b(0xf0)]('db')||undefined,{db:_0x554e33,error:_0x4b3129}=await resolveOneDb(_0x2af7b7['appCode'],_0x45c363);return{'method':_0x182e9b(0xeb),'url':_0x182e9b(0xe0),'body':{'appCode':_0x2af7b7['appCode'],'sqlContent':'('+_0x34eb06[_0x182e9b(0xe7)]+'\x20chars)','sqlCode':_0x2af7b7['str'](_0x182e9b(0xe2))||undefined,'sqlName':_0x2af7b7['str'](_0x182e9b(0xee))||undefined,'db':_0x554e33?_0x554e33['dbName']+'\x20('+_0x554e33['dbId']+')':_0x4b3129},'description':['Save\x20SQL\x20query\x20from\x20'+_0x2af7b7['str'](_0x182e9b(0x105)),_0x182e9b(0xe4)+_0xea05ca[_0x182e9b(0xd3)],_0x182e9b(0xe1)+_0xea05ca[_0x182e9b(0xe6)]['type']+_0x182e9b(0xdc)+(_0xea05ca[_0x182e9b(0xe3)][_0x182e9b(0x102)](',\x20')||_0x182e9b(0xd6))+_0x182e9b(0xf4)+(_0xea05ca[_0x182e9b(0xff)][_0x182e9b(0x102)](',\x20')||'none')]['join']('\x0a')};},async 'execute'(_0x859a16){const _0x32dfb6=a84_0x3ac6cb,_0x3770ab=resolve(process[_0x32dfb6(0xec)](),_0x859a16[_0x32dfb6(0xf0)](_0x32dfb6(0x105))),_0xca432f=readFileSync(_0x3770ab,_0x32dfb6(0xf9)),_0x9e1b1c=_0x859a16[_0x32dfb6(0xf0)]('db')||undefined,{db:_0x38f934,error:_0x4f528e}=await resolveOneDb(_0x859a16['appCode'],_0x9e1b1c);if(_0x4f528e)throw CliErrors[_0x32dfb6(0xf2)](_0x4f528e);const _0x3b5878=await saveSqlQuery({'appCode':_0x859a16['appCode'],'sqlContent':_0xca432f,'sqlCode':_0x859a16[_0x32dfb6(0xf0)](_0x32dfb6(0xe2))||undefined,'sqlName':_0x859a16[_0x32dfb6(0xf0)]('sqlname')||undefined,'dbId':_0x38f934[_0x32dfb6(0xf8)],'description':_0x859a16['str'](_0x32dfb6(0xd4))||undefined});if(_0x3b5878[_0x32dfb6(0xf5)])return{'ok':![],'data':_0x3b5878,'message':_0x3b5878[_0x32dfb6(0xd3)]||'Conflict\x20detected'};return{'ok':!![],'data':{'sqlCode':_0x3b5878[_0x32dfb6(0xef)],'sqlName':_0x3b5878[_0x32dfb6(0x104)],'action':_0x3b5878[_0x32dfb6(0xd7)]},'message':(_0x3b5878[_0x32dfb6(0xd7)]==='created'?_0x32dfb6(0xda):_0x32dfb6(0xf6))+'\x20successfully'+(_0x3b5878[_0x32dfb6(0xef)]?'\x20('+_0x3b5878[_0x32dfb6(0xef)]+')':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a85_0x48c9(){const _0x51931d=['file','Table\x20\x22','valid','isArray','1869049mAJyfA','cwd','schemas','string','sql','957517QTOFkb','dbtableConfig','parameters','message','filter','\x22\x20not\x20found\x20in\x20any\x20dataset','str','File\x20not\x20found:\x20','utf-8','isDangerous','\x22\x20not\x20found\x20or\x20not\x20accessible','70YRaLTd','size','get','trim','6kDltcb','length','Dataset\x20\x22','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','validate','78370KohKoj','1352330xuoMeL','2396072oYITgJ','flagMissing','toLowerCase','tables','isSelectOnly','9YpyQBB','51mYytkK','schema:','push','map','name','Provide\x20--file\x20or\x20--sql','reason','appCode','split','sqlType','fields','413761xUSffE','14268rQeeZt'];a85_0x48c9=function(){return _0x51931d;};return a85_0x48c9();}function a85_0x5e76(_0x46192d,_0x4cccbe){_0x46192d=_0x46192d-0x11a;const _0x48c954=a85_0x48c9();let _0x5e769c=_0x48c954[_0x46192d];return _0x5e769c;}const a85_0x1f0445=a85_0x5e76;(function(_0x475240,_0xcf53c7){const _0x169f1f=a85_0x5e76,_0x19c40a=_0x475240();while(!![]){try{const _0x220cc9=-parseInt(_0x169f1f(0x14c))/0x1+-parseInt(_0x169f1f(0x139))/0x2+-parseInt(_0x169f1f(0x141))/0x3*(parseInt(_0x169f1f(0x11a))/0x4)+-parseInt(_0x169f1f(0x13a))/0x5+-parseInt(_0x169f1f(0x133))/0x6*(-parseInt(_0x169f1f(0x11f))/0x7)+-parseInt(_0x169f1f(0x13b))/0x8*(-parseInt(_0x169f1f(0x140))/0x9)+parseInt(_0x169f1f(0x12f))/0xa*(parseInt(_0x169f1f(0x124))/0xb);if(_0x220cc9===_0xcf53c7)break;else _0x19c40a['push'](_0x19c40a['shift']());}catch(_0x2e665c){_0x19c40a['push'](_0x19c40a['shift']());}}}(a85_0x48c9,0x5fa72));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a85_0x1f0445(0x123),'command':a85_0x1f0445(0x138),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':'read','flags':[{'name':a85_0x1f0445(0x11b),'type':'string','description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a85_0x1f0445(0x123),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':'schemas','type':a85_0x1f0445(0x122),'description':a85_0x1f0445(0x137)}],async 'execute'(_0x5688a7){const _0x3b75a0=a85_0x1f0445,_0x153118=_0x5688a7[_0x3b75a0(0x12a)](_0x3b75a0(0x11b)),_0x4d2bf1=_0x5688a7[_0x3b75a0(0x12a)](_0x3b75a0(0x123));if(!_0x153118&&!_0x4d2bf1)throw CliErrors[_0x3b75a0(0x13c)](_0x3b75a0(0x11b),_0x3b75a0(0x146));let _0x89fbc5;if(_0x153118){const _0x40ab1b=resolve(process[_0x3b75a0(0x120)](),_0x153118);if(!existsSync(_0x40ab1b))throw CliErrors['validation'](_0x3b75a0(0x12b)+_0x40ab1b);_0x89fbc5=readFileSync(_0x40ab1b,_0x3b75a0(0x12c));}else _0x89fbc5=_0x4d2bf1;const _0xd05d72=validateSql(_0x89fbc5),_0x3f9d69={'valid':_0xd05d72[_0x3b75a0(0x11d)],'sqlType':_0xd05d72[_0x3b75a0(0x14a)]['type'],'isSelectOnly':_0xd05d72[_0x3b75a0(0x14a)][_0x3b75a0(0x13f)],'isDangerous':_0xd05d72[_0x3b75a0(0x14a)][_0x3b75a0(0x12d)],'tables':_0xd05d72['tables'],'parameters':_0xd05d72[_0x3b75a0(0x126)],'message':_0xd05d72[_0x3b75a0(0x127)]};_0xd05d72[_0x3b75a0(0x14a)][_0x3b75a0(0x147)]&&(_0x3f9d69[_0x3b75a0(0x147)]=_0xd05d72[_0x3b75a0(0x14a)][_0x3b75a0(0x147)]);const _0x467744=_0x5688a7[_0x3b75a0(0x12a)](_0x3b75a0(0x121));if(_0x467744&&_0xd05d72[_0x3b75a0(0x11d)]){const _0x38215a=_0x467744[_0x3b75a0(0x149)](',')[_0x3b75a0(0x144)](_0x4078a7=>_0x4078a7[_0x3b75a0(0x132)]())[_0x3b75a0(0x128)](Boolean),_0x59478d=[],_0x23fa09=await listDatasets(_0x5688a7[_0x3b75a0(0x148)]),_0x36c665=new Map(_0x23fa09[_0x3b75a0(0x144)](_0x9aa510=>[_0x9aa510[_0x3b75a0(0x125)]?.[_0x3b75a0(0x136)]?.[_0x3b75a0(0x13d)](),_0x9aa510]));for(const _0x487be9 of _0xd05d72[_0x3b75a0(0x13e)]){const _0x1bb364=_0x36c665[_0x3b75a0(0x131)](_0x487be9[_0x3b75a0(0x13d)]());!_0x1bb364&&_0x59478d[_0x3b75a0(0x143)](_0x3b75a0(0x11c)+_0x487be9+_0x3b75a0(0x129));}for(const _0x129fa8 of _0x38215a){try{const _0x2bdd04=await getDatasetDetail(_0x129fa8),_0x60bf68=Array[_0x3b75a0(0x11e)](_0x2bdd04[_0x3b75a0(0x14b)])?_0x2bdd04[_0x3b75a0(0x14b)]:[],_0x493131=new Set(_0x60bf68[_0x3b75a0(0x144)](_0x5f1d5a=>_0x5f1d5a[_0x3b75a0(0x145)]?.[_0x3b75a0(0x13d)]())),_0x170ca7=_0x2bdd04[_0x3b75a0(0x125)]?.[_0x3b75a0(0x136)]||_0x2bdd04[_0x3b75a0(0x136)]||_0x129fa8;_0x3f9d69[_0x3b75a0(0x142)+_0x170ca7]={'code':_0x129fa8,'tableName':_0x170ca7,'fieldCount':_0x493131[_0x3b75a0(0x130)],'fields':Array['from'](_0x493131)};}catch{_0x59478d[_0x3b75a0(0x143)](_0x3b75a0(0x135)+_0x129fa8+_0x3b75a0(0x12e));}}_0x59478d[_0x3b75a0(0x134)]>0x0&&(_0x3f9d69['schemaWarnings']=_0x59478d);}return{'ok':_0xd05d72[_0x3b75a0(0x11d)],'data':_0x3f9d69,'message':_0xd05d72['message']};}};
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a86_0x58ed47=a86_0x29b6;function a86_0x29b6(_0x2a82e8,_0x5a9482){_0x2a82e8=_0x2a82e8-0x7a;const _0x2f4d47=a86_0x2f4d();let _0x29b6eb=_0x2f4d47[_0x2a82e8];return _0x29b6eb;}function a86_0x2f4d(){const _0x274f20=['target','map','Output\x20format','Target\x20path','operation-type','Skip\x20confirmation\x20for\x20high-risk\x20writes','datasetcode','File\x20path','Use\x20global\x20config\x20scope','4926VtoAmw','page','Code\x20filter','Output\x20path','904266pJstsO','Config\x20value','project','Keyword\x20filter','name','DB\x20ID','Show\x20help','json\x20|\x20pretty\x20|\x20table','Watch\x20mode','11012jFTcfK','output','1973490pciNRJ','dbid','Page\x20number','skip-imports','16HhoGfJ','SQL\x20code','Preview\x20operation\x20without\x20executing','functionNode','sqlname','string','env','value','operationType','enable-bff-save','global','sqlcode','file','272vaRHyH','help','Operation\x20type','Verbose\x20output','key','Apply\x20to\x20all','Clear','Use\x20remote','Enable\x20BFF\x20save','yes','Function\x20node','JSON\x20params','1335IKFuuv','force','watch','<code>','pagesize','dryRun','135WjTiQG','<name>','Use\x20project\x20config\x20scope','keyword','Override\x20appcode','nonInteractive','params','non-interactive','Schemas','appcode','sql','419608ZiWrAh','meowKey','253803QYufPi','Dataset\x20code','function-node','@lovrabet/rabetbase-cli','fromEntries','Rabetbase\x20CLI','verbose','Force\x20overwrite','all','Force\x20non-interactive\x20mode\x20(CI)','1740dHCicy','Select\x20app\x20profile\x20by\x20name','schemas','Description','boolean','Skip\x20import\x20generation','Config\x20key','Environment','clear','operation','description','code','format'];a86_0x2f4d=function(){return _0x274f20;};return a86_0x2f4d();}(function(_0x4f91ad,_0x5289eb){const _0x33d1b9=a86_0x29b6,_0x11fdd7=_0x4f91ad();while(!![]){try{const _0x363a67=parseInt(_0x33d1b9(0xbb))/0x1*(parseInt(_0x33d1b9(0x85))/0x2)+parseInt(_0x33d1b9(0xcd))/0x3*(parseInt(_0x33d1b9(0xa8))/0x4)+parseInt(_0x33d1b9(0xc7))/0x5*(parseInt(_0x33d1b9(0x9b))/0x6)+-parseInt(_0x33d1b9(0xd8))/0x7*(parseInt(_0x33d1b9(0xae))/0x8)+-parseInt(_0x33d1b9(0x9f))/0x9+-parseInt(_0x33d1b9(0xaa))/0xa+-parseInt(_0x33d1b9(0x7b))/0xb;if(_0x363a67===_0x5289eb)break;else _0x11fdd7['push'](_0x11fdd7['shift']());}catch(_0x12963c){_0x11fdd7['push'](_0x11fdd7['shift']());}}}(a86_0x2f4d,0x21ec4));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a86_0x58ed47(0x80);export const NPM_PACKAGE_NAME=a86_0x58ed47(0x7e);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a86_0x58ed47(0xd6),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xd1),'hint':a86_0x58ed47(0xca)},{'name':'app','meowKey':'app','type':'string','description':a86_0x58ed47(0x86),'hint':a86_0x58ed47(0xce)},{'name':a86_0x58ed47(0xb4),'meowKey':a86_0x58ed47(0xb4),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x8c),'hint':'production\x20|\x20daily'},{'name':a86_0x58ed47(0x91),'meowKey':a86_0x58ed47(0x91),'type':'string','description':a86_0x58ed47(0x94),'hint':a86_0x58ed47(0xa6)},{'name':'dry-run','meowKey':a86_0x58ed47(0xcc),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xb0)},{'name':'yes','meowKey':a86_0x58ed47(0xc4),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0x97)},{'name':a86_0x58ed47(0xd4),'meowKey':a86_0x58ed47(0xd2),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0x84)},{'name':a86_0x58ed47(0xb8),'meowKey':a86_0x58ed47(0xb8),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0x9a)},{'name':a86_0x58ed47(0xa1),'meowKey':a86_0x58ed47(0xa1),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xcf)},{'name':'ci','meowKey':'ci','type':a86_0x58ed47(0x89),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a86_0x58ed47(0xbc),'meowKey':a86_0x58ed47(0xbc),'type':'boolean','description':a86_0x58ed47(0xa5)},{'name':'name','meowKey':a86_0x58ed47(0xa3),'type':'string','description':'Name','hidden':!![]},{'name':a86_0x58ed47(0x8d),'meowKey':a86_0x58ed47(0x8d),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xc1),'hidden':!![]},{'name':'watch','meowKey':a86_0x58ed47(0xc9),'type':'boolean','description':a86_0x58ed47(0xa7),'hidden':!![]},{'name':a86_0x58ed47(0xa9),'meowKey':a86_0x58ed47(0xa9),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x9e),'hidden':!![]},{'name':a86_0x58ed47(0xd3),'meowKey':a86_0x58ed47(0xd3),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xc6),'hidden':!![]},{'name':'datasetcode','meowKey':a86_0x58ed47(0x98),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x7c),'hidden':!![]},{'name':a86_0x58ed47(0x83),'meowKey':a86_0x58ed47(0x83),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xc0),'hidden':!![]},{'name':a86_0x58ed47(0xb7),'meowKey':'enableBffSave','type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xc3),'hidden':!![]},{'name':'id','meowKey':'id','type':a86_0x58ed47(0xb3),'description':'Record\x20ID','hidden':!![]},{'name':'type','meowKey':'type','type':a86_0x58ed47(0xb3),'description':'Type\x20filter','hidden':!![]},{'name':a86_0x58ed47(0xba),'meowKey':'file','type':'string','description':a86_0x58ed47(0x99),'hidden':!![]},{'name':a86_0x58ed47(0xb9),'meowKey':a86_0x58ed47(0xb9),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xaf),'hidden':!![]},{'name':a86_0x58ed47(0xb2),'meowKey':a86_0x58ed47(0xb2),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':a86_0x58ed47(0xab),'meowKey':a86_0x58ed47(0xab),'type':'string','description':a86_0x58ed47(0xa4),'hidden':!![]},{'name':a86_0x58ed47(0x8f),'meowKey':'description','type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x88),'hidden':!![]},{'name':'page','meowKey':a86_0x58ed47(0x9c),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xac),'hidden':!![]},{'name':a86_0x58ed47(0xcb),'meowKey':a86_0x58ed47(0xcb),'type':a86_0x58ed47(0xb3),'description':'Page\x20size','hidden':!![]},{'name':a86_0x58ed47(0xd0),'meowKey':a86_0x58ed47(0xd0),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xa2),'hidden':!![]},{'name':'code','meowKey':a86_0x58ed47(0x90),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x9d),'hidden':!![]},{'name':'sql','meowKey':a86_0x58ed47(0xd7),'type':'string','description':'SQL\x20string','hidden':!![]},{'name':'schemas','meowKey':a86_0x58ed47(0x87),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xd5),'hidden':!![]},{'name':a86_0x58ed47(0x8e),'meowKey':a86_0x58ed47(0x8e),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xbd),'hidden':!![]},{'name':a86_0x58ed47(0x92),'meowKey':'target','type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x95),'hidden':!![]},{'name':a86_0x58ed47(0xad),'meowKey':'skipImports','type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0x8a),'hidden':!![]},{'name':a86_0x58ed47(0xbf),'meowKey':a86_0x58ed47(0xbf),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0x8b),'hidden':!![]},{'name':a86_0x58ed47(0xb5),'meowKey':'value','type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xa0),'hidden':!![]},{'name':a86_0x58ed47(0xc8),'meowKey':a86_0x58ed47(0xc8),'type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0x82),'hidden':!![]},{'name':'remote','meowKey':'remote','type':a86_0x58ed47(0x89),'description':a86_0x58ed47(0xc2),'hidden':!![]},{'name':'verbose','meowKey':a86_0x58ed47(0x81),'type':'boolean','description':a86_0x58ed47(0xbe),'hidden':!![]},{'name':a86_0x58ed47(0x96),'meowKey':a86_0x58ed47(0xb6),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xbd),'hidden':!![]},{'name':a86_0x58ed47(0x7d),'meowKey':a86_0x58ed47(0xb1),'type':a86_0x58ed47(0xb3),'description':a86_0x58ed47(0xc5),'hidden':!![]}];export function buildMeowFlags(){const _0x4373a5=a86_0x58ed47;return Object[_0x4373a5(0x7f)](GLOBAL_FLAGS[_0x4373a5(0x93)](_0x353c08=>[_0x353c08[_0x4373a5(0x7a)],{'type':_0x353c08['type']}]));}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x3c6798=a87_0x4086;(function(_0x5de83b,_0x4f254d){const _0x43b44c=a87_0x4086,_0x34e8e5=_0x5de83b();while(!![]){try{const _0x168802=parseInt(_0x43b44c(0x19d))/0x1+-parseInt(_0x43b44c(0x19c))/0x2+-parseInt(_0x43b44c(0x1a5))/0x3+parseInt(_0x43b44c(0x1aa))/0x4*(-parseInt(_0x43b44c(0x19e))/0x5)+-parseInt(_0x43b44c(0x1a8))/0x6+-parseInt(_0x43b44c(0x1a4))/0x7*(-parseInt(_0x43b44c(0x1a1))/0x8)+parseInt(_0x43b44c(0x1a3))/0x9;if(_0x168802===_0x4f254d)break;else _0x34e8e5['push'](_0x34e8e5['shift']());}catch(_0x23ef60){_0x34e8e5['push'](_0x34e8e5['shift']());}}}(a87_0x581c,0xa38e6));import{getEnv}from'./env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x38e83a){const _0x27368d=a87_0x4086;customApiDomain=_0x38e83a?.[_0x27368d(0x1a2)],customUserDomain=_0x38e83a?.['userDomain'],customRuntimeDomain=_0x38e83a?.[_0x27368d(0x1a0)];}export const getUserDomain=()=>customUserDomain||(getEnv()===a87_0x3c6798(0x1ab)?a87_0x3c6798(0x19f):a87_0x3c6798(0x1a7));export const getApiDomain=()=>customApiDomain||(getEnv()===a87_0x3c6798(0x1ab)?a87_0x3c6798(0x1a9):'https://daily-api.lovrabet.com');function a87_0x4086(_0x4411bc,_0x33f3f){_0x4411bc=_0x4411bc-0x19b;const _0x581c60=a87_0x581c();let _0x408621=_0x581c60[_0x4411bc];return _0x408621;}export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a87_0x3c6798(0x1ab)?a87_0x3c6798(0x19b):a87_0x3c6798(0x1a6));function a87_0x581c(){const _0x2e1236=['2525298pyKTFf','https://api.lovrabet.com','564CZoBSL','production','https://runtime.lovrabet.com','2108614bOUOhJ','237915oiLiTG','21815TwjNIw','https://user.lovrabet.com','runtimeDomain','808iOKAyy','apiDomain','20848986tuyLYD','32417MEcdhh','785703WqfogY','https://daily-runtime.lovrabet.com','https://user-daily.lovrabet.com'];a87_0x581c=function(){return _0x2e1236;};return a87_0x581c();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a88_0x4e40b0=a88_0x165c;(function(_0x1c07c9,_0x5820b3){const _0xb6f01f=a88_0x165c,_0x245421=_0x1c07c9();while(!![]){try{const _0x3f000a=-parseInt(_0xb6f01f(0x10b))/0x1*(-parseInt(_0xb6f01f(0x107))/0x2)+parseInt(_0xb6f01f(0x10c))/0x3*(-parseInt(_0xb6f01f(0x105))/0x4)+parseInt(_0xb6f01f(0x104))/0x5+-parseInt(_0xb6f01f(0x109))/0x6*(parseInt(_0xb6f01f(0x108))/0x7)+parseInt(_0xb6f01f(0x100))/0x8*(-parseInt(_0xb6f01f(0x106))/0x9)+-parseInt(_0xb6f01f(0x10a))/0xa*(parseInt(_0xb6f01f(0x101))/0xb)+parseInt(_0xb6f01f(0x103))/0xc;if(_0x3f000a===_0x5820b3)break;else _0x245421['push'](_0x245421['shift']());}catch(_0x238fd2){_0x245421['push'](_0x245421['shift']());}}}(a88_0x13ac,0xadcd1));export function normalizeEnv(_0x117534){const _0x4d1f06=a88_0x165c;return _0x117534===_0x4d1f06(0x102)?_0x4d1f06(0x10d):_0x117534;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a88_0x4e40b0(0x10d));export function getEnv(){return env;}export function initEnv(_0xc2e573){env=normalizeEnv(_0xc2e573);}function a88_0x165c(_0x3f5fca,_0x22863c){_0x3f5fca=_0x3f5fca-0x100;const _0x13acae=a88_0x13ac();let _0x165c1c=_0x13acae[_0x3f5fca];return _0x165c1c;}function a88_0x13ac(){const _0x62ecaf=['4809268cotHwo','1398429UAWAMk','2nkrCed','7sLChfU','6823254QRxrdR','10IFyiOi','1366447tfHujW','3IDCNvH','production','72REvXCV','2620057wvWbnO','online','35854596yLnMmG','1668505DnxGbo'];a88_0x13ac=function(){return _0x62ecaf;};return a88_0x13ac();}
|