@lovrabet/rabetbase-cli 2.0.13 → 2.1.1
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/README.md +2 -2
- 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/db/analyze-cancel.js +1 -0
- package/lib/commands/db/analyze-start.js +1 -0
- package/lib/commands/db/analyze-status.js +1 -0
- package/lib/commands/db/create.js +1 -0
- package/lib/commands/db/delete.js +1 -0
- package/lib/commands/db/detail.js +1 -0
- package/lib/commands/db/diff.js +1 -0
- package/lib/commands/db/index.js +1 -0
- package/lib/commands/db/list.js +1 -0
- package/lib/commands/db/shared.js +1 -0
- package/lib/commands/db/tables.js +1 -0
- package/lib/commands/db/test.js +1 -0
- package/lib/commands/db/update.js +1 -0
- 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 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.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/schema.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/pull.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.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/constant/paths.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/build-all-flags.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/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/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/apply-jq-filter.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/lib/utils/write-cli-side-channel.js +1 -0
- package/package.json +1 -1
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x8d63fe=a90_0x5e96;(function(_0x130cc5,_0x1a01b9){const _0x4232ad=a90_0x5e96,_0x40ba80=_0x130cc5();while(!![]){try{const _0x1ae2f8=-parseInt(_0x4232ad(0x1da))/0x1+-parseInt(_0x4232ad(0x1db))/0x2*(parseInt(_0x4232ad(0x1eb))/0x3)+parseInt(_0x4232ad(0x1d2))/0x4+-parseInt(_0x4232ad(0x1e9))/0x5+parseInt(_0x4232ad(0x1e4))/0x6+-parseInt(_0x4232ad(0x1c2))/0x7*(-parseInt(_0x4232ad(0x1d7))/0x8)+parseInt(_0x4232ad(0x1e2))/0x9;if(_0x1ae2f8===_0x1a01b9)break;else _0x40ba80['push'](_0x40ba80['shift']());}catch(_0x1de360){_0x40ba80['push'](_0x40ba80['shift']());}}}(a90_0xdee6,0x9e737));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';function a90_0xdee6(){const _0xa6c000=['<script>','write','description','Menu','build','Dataset\x20&\x20Operations','Skills','defaultCommand','Authentication','Code\x20Generation','Schema','Configuration','3698356OSowhf','Run\x20Scripts','\x20\x20[high-risk-write]','BFF\x20Scripts','Database\x20Connections','888oRsLmr','\x20\x20[write]','API','370861tFtxgM','970czUwLD','create','SQL\x20Queries','from','Diagnostics','length','risk','3205953MUTHrJ','install','6358416AWGLOd','get','wildcardDef','service','Project','4163290BJIkRA','command','4479GEJypH','login','values','project','logout','has','preview','show','run','14889TRxKtk','set','App\x20Management','push'];a90_0xdee6=function(){return _0xa6c000;};return a90_0xdee6();}import{schemaDefinition}from'../commands/schema.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x4645ee){const _0x10e5b2=a90_0x5e96;for(const _0x2c3710 of _0x4645ee){definitions['set'](_0x2c3710[_0x10e5b2(0x1e7)]+':'+_0x2c3710[_0x10e5b2(0x1ea)],_0x2c3710);let _0x290bab=serviceGroups[_0x10e5b2(0x1e5)](_0x2c3710[_0x10e5b2(0x1e7)]);!_0x290bab&&(_0x290bab=[],serviceGroups['set'](_0x2c3710[_0x10e5b2(0x1e7)],_0x290bab)),_0x290bab[_0x10e5b2(0x1c5)](_0x2c3710);}}function registerDeclarativeService(_0xdfe335,_0x556e12,_0x3840e6){const _0x9e0f95=a90_0x5e96;registerDefinitions(_0x556e12);_0x3840e6?.[_0x9e0f95(0x1e6)]&®isterDefinitions([_0x3840e6[_0x9e0f95(0x1e6)]]);const _0x4f4e9d=_0x427ce0=>_0x427ce0==='read'?'':_0x427ce0===_0x9e0f95(0x1c7)?_0x9e0f95(0x1d8):_0x9e0f95(0x1d4),_0x6e128c={'service':_0x556e12[0x0][_0x9e0f95(0x1e7)],'label':_0xdfe335,'commands':_0x556e12['map'](_0x392078=>({'command':_0x392078[_0x9e0f95(0x1ea)],'description':_0x392078[_0x9e0f95(0x1c8)],'tag':_0x4f4e9d(_0x392078[_0x9e0f95(0x1e1)])})),'declarative':!![],'defaultCommand':_0x3840e6?.[_0x9e0f95(0x1cd)]??(_0x3840e6?.['isSingleCommand']?_0x556e12[0x0][_0x9e0f95(0x1ea)]:undefined),'wildcardDef':_0x3840e6?.[_0x9e0f95(0x1e6)],'isSingleCommand':_0x3840e6?.['isSingleCommand']};serviceRegistry[_0x9e0f95(0x1c5)](_0x6e128c),serviceByName[_0x9e0f95(0x1c3)](_0x6e128c['service'],_0x6e128c);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a90_0x8d63fe(0x1c1),'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1e8),projectDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1c4),appDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d3),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a90_0x8d63fe(0x1e0)]-0x1];last['commands']=[{'command':a90_0x8d63fe(0x1c6),'description':'Run\x20any\x20package.json\x20script','tag':''}];}registerDeclarativeService(a90_0x8d63fe(0x1ce),authDefinitions,{'defaultCommand':a90_0x8d63fe(0x1ec)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1df),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1d0),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x8d63fe(0x1d1),configDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d9),apiDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1c9),menuDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d6),dbDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cb),datasetDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1d5),bffDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1dd),sqlDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cf),codegenDefinitions),registerDeclarativeService(a90_0x8d63fe(0x1cc),skillDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a90_0x8d63fe(0x1c0)});export const deprecatedAliases={'create':{'service':a90_0x8d63fe(0x1bc),'command':a90_0x8d63fe(0x1dc)},'start':{'service':'run','command':'start'},'build':{'service':a90_0x8d63fe(0x1c1),'command':a90_0x8d63fe(0x1ca)},'preview':{'service':a90_0x8d63fe(0x1c1),'command':a90_0x8d63fe(0x1bf)},'logout':{'service':'auth','command':a90_0x8d63fe(0x1bd)},'skills':{'service':'skill','command':a90_0x8d63fe(0x1e3)}};function a90_0x5e96(_0x496f68,_0x5ee3d7){_0x496f68=_0x496f68-0x1bb;const _0xdee6c6=a90_0xdee6();let _0x5e9673=_0xdee6c6[_0x496f68];return _0x5e9673;}export function findDefinition(_0x3518e5,_0x26ca35){const _0x33cd94=a90_0x8d63fe;return definitions[_0x33cd94(0x1e5)](_0x3518e5+':'+_0x26ca35);}export function isKnownService(_0x59464e){const _0x1b023d=a90_0x8d63fe;return serviceByName[_0x1b023d(0x1be)](_0x59464e);}export function isDeclarativeService(_0x544634){const _0x51083c=a90_0x8d63fe;return serviceGroups[_0x51083c(0x1be)](_0x544634)||serviceByName['get'](_0x544634)?.[_0x51083c(0x1e6)]!==undefined;}export function getServiceEntry(_0x534d0e){return serviceByName['get'](_0x534d0e);}export function getLegacyHandler(_0x9c008c,_0x2a6133){return undefined;}export function getAllDefinitions(){const _0x483929=a90_0x8d63fe;return Array[_0x483929(0x1de)](definitions[_0x483929(0x1bb)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x3d1933=a91_0x8f53;function a91_0x8f53(_0x379e6a,_0x1fc777){_0x379e6a=_0x379e6a-0x159;const _0x5575b9=a91_0x5575();let _0x8f5358=_0x5575b9[_0x379e6a];return _0x8f5358;}(function(_0x34860b,_0x502fa8){const _0x495caa=a91_0x8f53,_0x4f1d31=_0x34860b();while(!![]){try{const _0xcf7d18=parseInt(_0x495caa(0x172))/0x1*(-parseInt(_0x495caa(0x16b))/0x2)+parseInt(_0x495caa(0x15f))/0x3+parseInt(_0x495caa(0x175))/0x4+-parseInt(_0x495caa(0x162))/0x5*(-parseInt(_0x495caa(0x177))/0x6)+-parseInt(_0x495caa(0x17c))/0x7+-parseInt(_0x495caa(0x196))/0x8+parseInt(_0x495caa(0x178))/0x9;if(_0xcf7d18===_0x502fa8)break;else _0x4f1d31['push'](_0x4f1d31['shift']());}catch(_0x5b6b57){_0x4f1d31['push'](_0x4f1d31['shift']());}}}(a91_0x5575,0xdc8b8));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';const VERSION_CHECK_SCRIPTS=new Set(['start','dev']);function readPackageScripts(_0x117067){const _0x1e840d=a91_0x8f53,_0x3f9ffe=resolve(_0x117067,'package.json');if(!existsSync(_0x3f9ffe))return null;try{const _0x27d425=JSON[_0x1e840d(0x182)](readFileSync(_0x3f9ffe,_0x1e840d(0x181)));return _0x27d425[_0x1e840d(0x191)]??{};}catch{return null;}}function detectPackageManager(_0x4c5658){const _0x340f6d=a91_0x8f53;if(existsSync(resolve(_0x4c5658,_0x340f6d(0x176)))||existsSync(resolve(_0x4c5658,'bun.lock')))return _0x340f6d(0x190);if(existsSync(resolve(_0x4c5658,_0x340f6d(0x184))))return _0x340f6d(0x17f);if(existsSync(resolve(_0x4c5658,_0x340f6d(0x17d))))return _0x340f6d(0x18d);return _0x340f6d(0x194);}async function versionCheck(_0x3673f2){const _0x5b344a=a91_0x8f53,_0x43844d=await checkCliVersion();if(_0x43844d[_0x5b344a(0x186)])printCliUpgradeWarning(_0x43844d);const _0x5082fa=await checkSdkVersion(_0x3673f2);if(_0x5082fa[_0x5b344a(0x186)])printSdkUpgradeWarning(_0x5082fa);}function spawnScript(_0x101033,_0xe8621f,_0x30c78f,_0x3854f1){return new Promise((_0x36ff30,_0x78b810)=>{const _0x43de3a=a91_0x8f53,_0x4e4e8c=[_0x43de3a(0x174),_0xe8621f,..._0x30c78f],_0x550118=spawn(_0x101033,_0x4e4e8c,{'cwd':_0x3854f1,'stdio':_0x43de3a(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3854f1,_0x43de3a(0x165),_0x43de3a(0x167))+delimiter+process.env.PATH}});_0x550118['on'](_0x43de3a(0x163),_0xde6937=>{const _0x3c65b7=_0x43de3a;if(_0xde6937===0x0||_0xde6937===null)_0x36ff30();else _0x78b810(new Error(_0x101033+_0x3c65b7(0x183)+_0xe8621f+_0x3c65b7(0x15c)+_0xde6937));}),_0x550118['on'](_0x43de3a(0x171),_0x78b810);});}function a91_0x5575(){const _0x148383=['watch','4117551nEQVxr','entries','push','20WAyKmR','close','validation','node_modules','length','.bin','No\x20package.json\x20found\x20in\x20current\x20directory.','args','inherit','1644494ZLZhIP','slice','keys','log','Run\x20a\x20package.json\x20script','preview','error','1QrujSV','Enable\x20watch\x20mode\x20for\x20preview','run','1313844UyakHF','bun.lockb','2123622oayJNf','10306611XnDVlg','script','max','map','5198263scjCkw','yarn.lock','Script\x20name\x20defined\x20in\x20package.json','pnpm','boolean','utf-8','parse','\x20run\x20','pnpm-lock.yaml','\x0a\x20\x20Available\x20scripts:\x0a','needsUpgrade','(none)','\x20\x20\x20\x20','padEnd','bool','Available:\x20','\x20run\x20preview','yarn','\x0a\x20\x20Usage:\x20','join','bun','scripts','vite','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','npm','Script\x20\x22','14349576IxUJqN','No\x20scripts\x20defined\x20in\x20package.json.','all','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','--watch','\x20exited\x20with\x20code\x20','\x20\x20EXAMPLES'];a91_0x5575=function(){return _0x148383;};return a91_0x5575();}function spawnViteBuildWatch(_0x24476a){return new Promise((_0x27b903,_0x2c5d0a)=>{const _0x474705=a91_0x8f53,_0x20ecb5=spawn(_0x474705(0x192),['build',_0x474705(0x15b)],{'cwd':_0x24476a,'stdio':_0x474705(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x24476a,_0x474705(0x165),_0x474705(0x167))+delimiter+process.env.PATH}});_0x20ecb5['on'](_0x474705(0x163),_0x423c26=>{const _0x6f6387=_0x474705;if(_0x423c26===0x0||_0x423c26===null)_0x27b903();else _0x2c5d0a(new Error(_0x6f6387(0x15a)+_0x423c26));}),_0x20ecb5['on'](_0x474705(0x171),_0x2c5d0a);});}function spawnVitePreview(_0x17e9ac){return new Promise((_0x28565c,_0x24c8fc)=>{const _0x204e05=a91_0x8f53,_0x18bb4b=spawn('vite',[_0x204e05(0x170)],{'cwd':_0x17e9ac,'stdio':_0x204e05(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x17e9ac,'node_modules','.bin')+delimiter+process.env.PATH}});_0x18bb4b['on'](_0x204e05(0x163),_0x4f0a7c=>{if(_0x4f0a7c===0x0||_0x4f0a7c===null)_0x28565c();else _0x24c8fc(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x4f0a7c));}),_0x18bb4b['on'](_0x204e05(0x171),_0x24c8fc);});}const runFlags=[{'name':a91_0x3d1933(0x15e),'type':a91_0x3d1933(0x180),'description':a91_0x3d1933(0x173),'default':![]}];export const runDefinition={'service':a91_0x3d1933(0x174),'command':'run','description':a91_0x3d1933(0x16f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a91_0x3d1933(0x179),'description':a91_0x3d1933(0x17e),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x1461b2=a91_0x3d1933,_0x4e1479=readPackageScripts(process['cwd']()),_0x1d2fa2=[];if(_0x4e1479&&Object[_0x1461b2(0x16d)](_0x4e1479)[_0x1461b2(0x166)]>0x0){const _0x3fa3ba=Object['keys'](_0x4e1479),_0x5f20be=Math['max'](..._0x3fa3ba[_0x1461b2(0x17b)](_0x59ecac=>_0x59ecac[_0x1461b2(0x166)]));_0x1d2fa2['push'](_0x1461b2(0x193));for(const [_0x1c91d9,_0x5c085e]of Object[_0x1461b2(0x160)](_0x4e1479)){_0x1d2fa2['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20'+_0x1c91d9[_0x1461b2(0x189)](_0x5f20be+0x2)+'#\x20'+_0x5c085e);}}else _0x1d2fa2['push'](_0x1461b2(0x15d)),_0x1d2fa2['push'](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20start'),_0x1d2fa2[_0x1461b2(0x161)](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20build'),_0x1d2fa2['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x1461b2(0x18c)),_0x1d2fa2['push'](_0x1461b2(0x188)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x1d2fa2['join']('\x0a');},async 'execute'(_0x8d0143){const _0x1b735e=a91_0x3d1933,_0x50b587=process['cwd'](),_0x1a47e4=_0x8d0143[_0x1b735e(0x169)][0x0],_0x206383=_0x8d0143[_0x1b735e(0x169)][_0x1b735e(0x16c)](0x1),_0x31a86b=readPackageScripts(_0x50b587);if(!_0x31a86b)throw CliErrors[_0x1b735e(0x164)](_0x1b735e(0x168));if(!_0x1a47e4){const _0x411f4a=Object[_0x1b735e(0x16d)](_0x31a86b);if(_0x411f4a[_0x1b735e(0x166)]===0x0)console[_0x1b735e(0x16e)](_0x1b735e(0x197));else{console[_0x1b735e(0x16e)](_0x1b735e(0x185));const _0x428931=Math[_0x1b735e(0x17a)](..._0x411f4a[_0x1b735e(0x17b)](_0x58ef38=>_0x58ef38[_0x1b735e(0x166)]));for(const [_0x2da530,_0x5ebb23]of Object[_0x1b735e(0x160)](_0x31a86b)){console[_0x1b735e(0x16e)](_0x1b735e(0x188)+_0x2da530['padEnd'](_0x428931+0x2)+_0x5ebb23);}console[_0x1b735e(0x16e)](_0x1b735e(0x18e)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x31a86b[_0x1a47e4])throw CliErrors[_0x1b735e(0x164)](_0x1b735e(0x195)+_0x1a47e4+'\x22\x20not\x20found\x20in\x20package.json.',_0x1b735e(0x18b)+(Object['keys'](_0x31a86b)[_0x1b735e(0x18f)](',\x20')||_0x1b735e(0x187)));const _0xe7c224=detectPackageManager(_0x50b587);VERSION_CHECK_SCRIPTS['has'](_0x1a47e4)&&await versionCheck(_0x50b587);if(_0x1a47e4==='preview'&&_0x8d0143[_0x1b735e(0x18a)](_0x1b735e(0x15e)))return await Promise[_0x1b735e(0x159)]([spawnViteBuildWatch(_0x50b587),spawnVitePreview(_0x50b587)]),{'ok':!![]};return await spawnScript(_0xe7c224,_0x1a47e4,_0x206383,_0x50b587),{'ok':!![]};}};
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0x3aa3(){const _0x56bfd0=['12945slVADz','2625912hAZDGr','588JtVyMA','62MAhzXq','read','6577109MXRBLF','27bdaqkV','export','857115jYQRQe','2017224hZoAkW','24020100XNotZq','2280DYPAdW','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a92_0x3aa3=function(){return _0x56bfd0;};return a92_0x3aa3();}function a92_0x516e(_0x4f302b,_0x4e851b){_0x4f302b=_0x4f302b-0xd1;const _0x3aa36f=a92_0x3aa3();let _0x516e84=_0x3aa36f[_0x4f302b];return _0x516e84;}const a92_0xacebdf=a92_0x516e;(function(_0x58317a,_0x49154b){const _0x4ed44e=a92_0x516e,_0x2f72e2=_0x58317a();while(!![]){try{const _0x467804=-parseInt(_0x4ed44e(0xd6))/0x1*(-parseInt(_0x4ed44e(0xd9))/0x2)+parseInt(_0x4ed44e(0xd1))/0x3+-parseInt(_0x4ed44e(0xd2))/0x4+parseInt(_0x4ed44e(0xd4))/0x5*(-parseInt(_0x4ed44e(0xd8))/0x6)+-parseInt(_0x4ed44e(0xdb))/0x7+-parseInt(_0x4ed44e(0xd7))/0x8*(parseInt(_0x4ed44e(0xdc))/0x9)+parseInt(_0x4ed44e(0xd3))/0xa;if(_0x467804===_0x49154b)break;else _0x2f72e2['push'](_0x2f72e2['shift']());}catch(_0x59c525){_0x2f72e2['push'](_0x2f72e2['shift']());}}}(a92_0x3aa3,0x96520));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x32b646){const _0x113cb3=await buildSchemaPayload();return{'ok':!![],'data':_0x113cb3};}export const schemaDefinition={'service':'schema','command':a92_0xacebdf(0xdd),'description':a92_0xacebdf(0xd5),'risk':a92_0xacebdf(0xda),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a93_0x2d13(_0x4d3372,_0x5856e){_0x4d3372=_0x4d3372-0x1ab;const _0x34d974=a93_0x34d9();let _0x2d13f5=_0x34d974[_0x4d3372];return _0x2d13f5;}const a93_0x5129e3=a93_0x2d13;(function(_0x1ae2c1,_0x3086ee){const _0x2e0584=a93_0x2d13,_0x2498a4=_0x1ae2c1();while(!![]){try{const _0x2e560f=-parseInt(_0x2e0584(0x1b0))/0x1+parseInt(_0x2e0584(0x1bc))/0x2*(-parseInt(_0x2e0584(0x1b5))/0x3)+-parseInt(_0x2e0584(0x1c4))/0x4*(-parseInt(_0x2e0584(0x1be))/0x5)+-parseInt(_0x2e0584(0x1b8))/0x6+parseInt(_0x2e0584(0x1c1))/0x7*(-parseInt(_0x2e0584(0x1b4))/0x8)+parseInt(_0x2e0584(0x1b9))/0x9*(-parseInt(_0x2e0584(0x1ba))/0xa)+-parseInt(_0x2e0584(0x1bb))/0xb*(-parseInt(_0x2e0584(0x1c0))/0xc);if(_0x2e560f===_0x3086ee)break;else _0x2498a4['push'](_0x2498a4['shift']());}catch(_0xbe82b6){_0x2498a4['push'](_0x2498a4['shift']());}}}(a93_0x34d9,0xbcc8a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':'skill','command':a93_0x5129e3(0x1b3),'description':'Install\x20developer\x20skill\x20package','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2728a6){const _0x1aa973=a93_0x5129e3;logger[_0x1aa973(0x1b6)](process[_0x1aa973(0x1c5)]()),logger[_0x1aa973(0x1ab)](_0x1aa973(0x1b2),_0x1aa973(0x1ae));const {runNpxSkillsAddGlobal:_0x51d811}=await import(_0x1aa973(0x1c2)),_0x39469e=_0x2728a6[_0x1aa973(0x1ac)]?'pipe':'inherit';console[_0x1aa973(0x1c3)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x578e8a=_0x51d811(process[_0x1aa973(0x1c5)](),'lovrabet/rabetbase',{'stdio':_0x39469e});if(_0x578e8a[_0x1aa973(0x1bd)])console[_0x1aa973(0x1c3)](_0x1aa973(0x1bf));else{if(_0x578e8a['ok'])console[_0x1aa973(0x1c3)](CLI_BIN_NAME+_0x1aa973(0x1b7));else throw CliErrors[_0x1aa973(0x1b1)]('npx\x20skills\x20add\x20failed:\x20'+(_0x578e8a['error']||_0x1aa973(0x1ad)),_0x1aa973(0x1af));}return{'ok':!![]};}}];function a93_0x34d9(){const _0x464265=['install','1522336znhLEA','1470FlSPBJ','setLogPath','\x20skill\x20installed','6218250wFhqrT','13746141ryszce','10iHjggd','11IYGUer','5382KKgWME','skipped','411695MIKidy','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','75053868RaSIWp','28YElYqi','../../skills/npx-skills-add.js','log','4zNKiIA','cwd','info','nonInteractive','unknown','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','Check\x20network\x20connectivity\x20and\x20try\x20again.','920088vpqYAh','apiError','skill-install'];a93_0x34d9=function(){return _0x464265;};return a93_0x34d9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x256bfb=a94_0x2e1b;(function(_0x3a6ce7,_0x3bb31d){const _0xa59d7f=a94_0x2e1b,_0x3184bf=_0x3a6ce7();while(!![]){try{const _0x3f3170=-parseInt(_0xa59d7f(0x68))/0x1*(-parseInt(_0xa59d7f(0x67))/0x2)+parseInt(_0xa59d7f(0x75))/0x3*(parseInt(_0xa59d7f(0x77))/0x4)+-parseInt(_0xa59d7f(0x7b))/0x5*(-parseInt(_0xa59d7f(0x74))/0x6)+parseInt(_0xa59d7f(0x78))/0x7+parseInt(_0xa59d7f(0x7a))/0x8+-parseInt(_0xa59d7f(0x6d))/0x9*(-parseInt(_0xa59d7f(0x79))/0xa)+-parseInt(_0xa59d7f(0x71))/0xb;if(_0x3f3170===_0x3bb31d)break;else _0x3184bf['push'](_0x3184bf['shift']());}catch(_0x4b5d64){_0x3184bf['push'](_0x3184bf['shift']());}}}(a94_0x455a,0x70a3c));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a94_0x2e1b(_0x49e072,_0x50669d){_0x49e072=_0x49e072-0x67;const _0x455ad5=a94_0x455a();let _0x2e1b28=_0x455ad5[_0x49e072];return _0x2e1b28;}function a94_0x455a(){const _0x31f314=['4AdqAoW','5201028XGrpGb','573470LiidmD','1302568PLvdEg','35FLMJbv','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','detail','10cUJUAr','120473mvMxxE','verbose','sqlContent','dbId','description','9NhvVOi','sqlcode','appCode','Return\x20full\x20raw\x20SQL\x20query\x20object','23062490NybRnn','sql','str','109062vhZaza','2595558eXUJgf','sqlCode'];a94_0x455a=function(){return _0x31f314;};return a94_0x455a();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a94_0x256bfb(0x72),'command':a94_0x256bfb(0x7d),'description':a94_0x256bfb(0x7c),'risk':'read','flags':[SQLCODE_FLAG,{'name':'verbose','type':'boolean','description':a94_0x256bfb(0x70)}],async 'execute'(_0x6a97bc){const _0x54245c=a94_0x256bfb,_0x521cf4=await getSqlQueryInfo(_0x6a97bc[_0x54245c(0x6f)],_0x6a97bc[_0x54245c(0x73)](_0x54245c(0x6e))),_0xf75e50=_0x6a97bc['bool'](_0x54245c(0x69));if(_0xf75e50)return{'ok':!![],'data':_0x521cf4};const _0x30e4f4=_0x521cf4[_0x54245c(0x6b)]?await getDbName(_0x6a97bc[_0x54245c(0x6f)],_0x521cf4[_0x54245c(0x6b)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x521cf4[_0x54245c(0x76)],'sqlName':_0x521cf4['sqlName'],'db':_0x30e4f4?_0x30e4f4+'\x20('+_0x521cf4[_0x54245c(0x6b)]+')':_0x521cf4[_0x54245c(0x6b)]??'','description':_0x521cf4[_0x54245c(0x6c)]??'','sqlContent':_0x521cf4[_0x54245c(0x6a)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x2d74(_0x21d865,_0x4372a2){_0x21d865=_0x21d865-0x76;const _0x23bdaa=a95_0x23bd();let _0x2d747b=_0x23bdaa[_0x21d865];return _0x2d747b;}const a95_0x2f19e5=a95_0x2d74;(function(_0x5acac0,_0x4d6dc9){const _0xd8e9df=a95_0x2d74,_0x301275=_0x5acac0();while(!![]){try{const _0x916bb3=-parseInt(_0xd8e9df(0x92))/0x1*(parseInt(_0xd8e9df(0x76))/0x2)+parseInt(_0xd8e9df(0x7a))/0x3+-parseInt(_0xd8e9df(0x84))/0x4*(parseInt(_0xd8e9df(0x82))/0x5)+-parseInt(_0xd8e9df(0x85))/0x6*(-parseInt(_0xd8e9df(0x94))/0x7)+-parseInt(_0xd8e9df(0x8c))/0x8+parseInt(_0xd8e9df(0x7b))/0x9*(parseInt(_0xd8e9df(0x81))/0xa)+parseInt(_0xd8e9df(0x8e))/0xb*(parseInt(_0xd8e9df(0x87))/0xc);if(_0x916bb3===_0x4d6dc9)break;else _0x301275['push'](_0x301275['shift']());}catch(_0x2168bb){_0x301275['push'](_0x301275['shift']());}}}(a95_0x23bd,0x5274b));function a95_0x23bd(){const _0x580d3c=['178077cAnjnO','1425555vHDhhH','SQL\x20execution\x20failed','isArray','string','sqlcode','now','30nSvdxG','6985RhFgPE','params','1036bzjrzE','24Bpdcyj','sql','12tdKGJP','execResult','execSuccess','parse','\x20row(s)\x20in\x20','3202552FaoMxR','validation','2575639UxCMlF','Returned\x20','execError','str','56976pVYMGf','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','878703pnVJof','6wwbCeJ','exec','Invalid\x20JSON\x20for\x20--params:\x20','length'];a95_0x23bd=function(){return _0x580d3c;};return a95_0x23bd();}import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlExec={'service':a95_0x2f19e5(0x86),'command':a95_0x2f19e5(0x77),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,{'name':a95_0x2f19e5(0x83),'type':a95_0x2f19e5(0x7e),'description':a95_0x2f19e5(0x93)}],async 'execute'(_0x117105){const _0x7fc9fd=a95_0x2f19e5;let _0x356a6d;const _0x177b93=_0x117105['str'](_0x7fc9fd(0x83));if(_0x177b93)try{_0x356a6d=JSON[_0x7fc9fd(0x8a)](_0x177b93);}catch{throw CliErrors[_0x7fc9fd(0x8d)](_0x7fc9fd(0x78)+_0x177b93);}const _0x57c32f=Date[_0x7fc9fd(0x80)](),_0x4645a6=await executeSql(_0x117105['appCode'],_0x117105[_0x7fc9fd(0x91)](_0x7fc9fd(0x7f)),_0x356a6d),_0x16c5e1=Date[_0x7fc9fd(0x80)]()-_0x57c32f,_0x1c2097=_0x4645a6?.[_0x7fc9fd(0x88)]??_0x4645a6,_0x1b7e28=_0x4645a6?.[_0x7fc9fd(0x89)]??!![];if(!_0x1b7e28)return{'ok':![],'data':{'error':_0x4645a6?.[_0x7fc9fd(0x90)]||_0x7fc9fd(0x7c),'elapsed':_0x16c5e1},'message':'SQL\x20execution\x20failed'};const _0x160e81=Array[_0x7fc9fd(0x7d)](_0x1c2097)?_0x1c2097:[];return{'ok':!![],'data':{'rows':_0x160e81,'rowCount':_0x160e81[_0x7fc9fd(0x79)],'elapsed':_0x16c5e1},'message':_0x7fc9fd(0x8f)+_0x160e81['length']+_0x7fc9fd(0x8b)+_0x16c5e1+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46a909,_0x423be1){const _0x5c6459=a96_0x1dde,_0x3ba518=_0x46a909();while(!![]){try{const _0x277831=-parseInt(_0x5c6459(0x1ee))/0x1*(parseInt(_0x5c6459(0x1ed))/0x2)+parseInt(_0x5c6459(0x1f5))/0x3*(parseInt(_0x5c6459(0x1f8))/0x4)+-parseInt(_0x5c6459(0x1f4))/0x5*(parseInt(_0x5c6459(0x1ec))/0x6)+-parseInt(_0x5c6459(0x1f3))/0x7*(parseInt(_0x5c6459(0x1f1))/0x8)+parseInt(_0x5c6459(0x1ef))/0x9*(parseInt(_0x5c6459(0x1f2))/0xa)+-parseInt(_0x5c6459(0x1f9))/0xb*(parseInt(_0x5c6459(0x1f0))/0xc)+parseInt(_0x5c6459(0x1f6))/0xd*(parseInt(_0x5c6459(0x1f7))/0xe);if(_0x277831===_0x423be1)break;else _0x3ba518['push'](_0x3ba518['shift']());}catch(_0xdac9d0){_0x3ba518['push'](_0x3ba518['shift']());}}}(a96_0x18cd,0xa0676));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];function a96_0x1dde(_0x51a0e8,_0x456209){_0x51a0e8=_0x51a0e8-0x1ec;const _0x18cdb5=a96_0x18cd();let _0x1dde3a=_0x18cdb5[_0x51a0e8];return _0x1dde3a;}function a96_0x18cd(){const _0x345b1b=['18WdLPMu','2HHZlqP','474711hqWWdD','9GfwfCU','108mmeMlQ','2922968nsOBgR','11918820dlrMCw','7irDksx','1827615tLtRFi','81NbNkJE','3991JEdDOH','62958fQwbQK','153932NvXjXL','1244023KvGQWA'];a96_0x18cd=function(){return _0x345b1b;};return a96_0x18cd();}
|
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a97_0x2944(){const _0x478511=['sqlCode','all','5832610NwaMYa','5229190jQOjfs','Found\x20','list','str','154AcPFah','7fHxOKm','read','11vYbcap','map','tableData','6nMsvTl','appCode','num','sqlName','description','boolean','\x20SQL\x20queries\x20(total:\x20','Page\x20size','15wDTSrJ','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','Page\x20number','verbose','paging','10374128XfWBva','5003sCMgtJ','totalCount','1810464NMhnCw','page','bool','6758739vbGeWd','number','length','642364UHRHrl','No\x20custom\x20SQL\x20queries\x20found.','sql','name','dbId','pagesize'];a97_0x2944=function(){return _0x478511;};return a97_0x2944();}const a97_0x2a2d89=a97_0xad83;function a97_0xad83(_0x4099fd,_0x3e16bf){_0x4099fd=_0x4099fd-0xe1;const _0x294473=a97_0x2944();let _0xad830=_0x294473[_0x4099fd];return _0xad830;}(function(_0x344a4e,_0x2eb499){const _0x25c269=a97_0xad83,_0x1b2f57=_0x344a4e();while(!![]){try{const _0x4e9c20=parseInt(_0x25c269(0xf6))/0x1*(-parseInt(_0x25c269(0xe2))/0x2)+-parseInt(_0x25c269(0xf0))/0x3*(-parseInt(_0x25c269(0xfe))/0x4)+parseInt(_0x25c269(0x107))/0x5*(-parseInt(_0x25c269(0xe8))/0x6)+parseInt(_0x25c269(0xe3))/0x7*(parseInt(_0x25c269(0xf5))/0x8)+-parseInt(_0x25c269(0xfb))/0x9+parseInt(_0x25c269(0x106))/0xa+-parseInt(_0x25c269(0xe5))/0xb*(-parseInt(_0x25c269(0xf8))/0xc);if(_0x4e9c20===_0x2eb499)break;else _0x1b2f57['push'](_0x1b2f57['shift']());}catch(_0x17381d){_0x1b2f57['push'](_0x1b2f57['shift']());}}}(a97_0x2944,0x9f226));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a97_0x2a2d89(0x100),'command':a97_0x2a2d89(0x109),'description':'List\x20custom\x20SQL\x20queries','risk':a97_0x2a2d89(0xe4),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a97_0x2a2d89(0x101),'type':'string','description':'Filter\x20by\x20SQL\x20name'},{'name':a97_0x2a2d89(0xf9),'type':a97_0x2a2d89(0xfc),'description':a97_0x2a2d89(0xf2),'default':0x1},{'name':a97_0x2a2d89(0x103),'type':'number','description':a97_0x2a2d89(0xef)},{'name':a97_0x2a2d89(0xf3),'type':a97_0x2a2d89(0xed),'description':a97_0x2a2d89(0xf1)}],async 'execute'(_0x36ea58){const _0x76c60d=a97_0x2a2d89,_0x52e752=await listSqlQueries(_0x36ea58[_0x76c60d(0xe9)],{'sqlCode':_0x36ea58[_0x76c60d(0xe1)]('sqlcode')||undefined,'sqlName':_0x36ea58[_0x76c60d(0xe1)](_0x76c60d(0x101))||undefined,'currentPage':_0x36ea58['num'](_0x76c60d(0xf9)),'pageSize':_0x36ea58[_0x76c60d(0xea)](_0x76c60d(0x103),0x32)}),_0x43f700=_0x36ea58[_0x76c60d(0xfa)](_0x76c60d(0xf3)),_0x275db3=_0x52e752[_0x76c60d(0xe7)]??[],_0x3e0687=_0x52e752[_0x76c60d(0xf4)]?.[_0x76c60d(0xf7)]??_0x275db3[_0x76c60d(0xfd)];let _0x175e9e;return _0x43f700?_0x175e9e=_0x275db3:_0x175e9e=await Promise[_0x76c60d(0x105)](_0x275db3[_0x76c60d(0xe6)](async _0xec32e3=>{const _0x4b3225=_0x76c60d;let _0x48ebac;try{_0x48ebac=_0xec32e3[_0x4b3225(0x102)]?await getDbName(_0x36ea58['appCode'],_0xec32e3[_0x4b3225(0x102)]):undefined;}catch{}return{'sqlCode':_0xec32e3[_0x4b3225(0x104)],'sqlName':_0xec32e3[_0x4b3225(0xeb)],'description':_0xec32e3[_0x4b3225(0xec)]??'','db':_0x48ebac?_0x48ebac+'\x20('+_0xec32e3['dbId']+')':_0xec32e3[_0x4b3225(0x102)]??''};})),{'ok':!![],'data':_0x175e9e,'message':_0x275db3[_0x76c60d(0xfd)]===0x0?_0x76c60d(0xff):_0x76c60d(0x108)+_0x275db3[_0x76c60d(0xfd)]+_0x76c60d(0xee)+_0x3e0687+').'};}};
|
package/lib/commands/sql/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x4fe761=a98_0xeb5c;(function(_0x497aca,_0xa78ca2){const _0x5849f4=a98_0xeb5c,_0x19e347=_0x497aca();while(!![]){try{const _0x3fc2b8=-parseInt(_0x5849f4(0x149))/0x1*(-parseInt(_0x5849f4(0x13d))/0x2)+parseInt(_0x5849f4(0x12e))/0x3+parseInt(_0x5849f4(0x125))/0x4*(parseInt(_0x5849f4(0x147))/0x5)+-parseInt(_0x5849f4(0x146))/0x6*(-parseInt(_0x5849f4(0x141))/0x7)+-parseInt(_0x5849f4(0x150))/0x8*(parseInt(_0x5849f4(0x142))/0x9)+parseInt(_0x5849f4(0x13a))/0xa+-parseInt(_0x5849f4(0x128))/0xb;if(_0x3fc2b8===_0xa78ca2)break;else _0x19e347['push'](_0x19e347['shift']());}catch(_0x3a1896){_0x19e347['push'](_0x19e347['shift']());}}}(a98_0x18e8,0xcda1c));import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';function a98_0x18e8(){const _0x58325a=['includes','Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','boolean','No\x20remote\x20SQL\x20queries\x20matched.','18960XacKXE','length','yes','sqlName','conflict','would_pull','bool','close','sqlContent','2536760TQbvvb','force','\x20skipped,\x20','42463190ETPaEV','utf8','totalCount','name','unchanged','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','2372169zQKhkq','nonInteractive','sql','paging','sqlCode','appCode','str','\x20failed','string','sqlcode','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','16527950MuLAdd','write','/smartapi/custom/queryUserCustomSqlList','2740988LvhDlt','stdin','toLowerCase','cancelled','1056503HarviX','3735sialyr','stderr','\x20error(s)).','push','24HKqnmS','10XDghFN','message','1YAfIwc','trim','skipped'];a98_0x18e8=function(){return _0x58325a;};return a98_0x18e8();}import{join}from'node:path';import{getSqlQueryInfo,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{findProjectRootDirectory}from'../../context.js';import{assignSqlFileNames,buildPulledSqlFileContent,resolveSqlLocalDir}from'../../commands/sql/shared.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x583b60,_0x571bfa){const _0x1c881c=a98_0xeb5c,_0x290d76=[];let _0xed75ad=0x1;while(!![]){const _0x588d87=await listSqlQueries(_0x583b60,{'currentPage':_0xed75ad,'pageSize':PAGE_SIZE,'sqlCode':_0x571bfa['sqlCode'],'sqlName':_0x571bfa[_0x1c881c(0x153)]}),_0x1b82e1=_0x588d87['tableData']??[];_0x290d76[_0x1c881c(0x145)](..._0x1b82e1);if(_0x1b82e1[_0x1c881c(0x151)]===0x0)break;const _0x537af5=_0x588d87[_0x1c881c(0x131)]?.[_0x1c881c(0x12a)];if(_0x537af5!=null?_0x290d76[_0x1c881c(0x151)]>=_0x537af5:_0x1b82e1[_0x1c881c(0x151)]<PAGE_SIZE)break;_0xed75ad++;}return _0x290d76;}async function ensureSqlContent(_0x44c935,_0x5981ac){const _0x230945=a98_0xeb5c;if(_0x5981ac[_0x230945(0x124)]!=null&&String(_0x5981ac[_0x230945(0x124)])[_0x230945(0x151)]>0x0)return _0x5981ac;return getSqlQueryInfo(_0x44c935,_0x5981ac[_0x230945(0x132)]);}function a98_0xeb5c(_0x48504a,_0x4a7396){_0x48504a=_0x48504a-0x123;const _0x18e8e2=a98_0x18e8();let _0xeb5ced=_0x18e8e2[_0x48504a];return _0xeb5ced;}export const sqlPull={'service':a98_0x4fe761(0x130),'command':'pull','description':a98_0x4fe761(0x14d),'risk':a98_0x4fe761(0x13b),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a98_0x4fe761(0x12b),'type':a98_0x4fe761(0x136),'description':a98_0x4fe761(0x12d)},{'name':a98_0x4fe761(0x126),'type':a98_0x4fe761(0x14e),'description':'Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote'}],async 'dryRun'(_0x546f2b){const _0xdb96f5=a98_0x4fe761,_0xa58ed9=findProjectRootDirectory(),_0x23eaa5=resolveSqlLocalDir(_0xa58ed9),_0x7824e4=_0x546f2b[_0xdb96f5(0x134)](_0xdb96f5(0x137))||undefined,_0x1a5f9f=_0x546f2b[_0xdb96f5(0x134)]('name')||undefined,_0x5abc31=await fetchAllSqlQueries(_0x546f2b[_0xdb96f5(0x133)],{'sqlCode':_0x7824e4,'sqlName':_0x1a5f9f}),_0x1743eb=[],_0x4df210=[];for(const _0xd419f7 of _0x5abc31){try{_0x1743eb[_0xdb96f5(0x145)](await ensureSqlContent(_0x546f2b[_0xdb96f5(0x133)],_0xd419f7));}catch(_0x3ba109){_0x4df210['push']({'sqlCode':_0xd419f7[_0xdb96f5(0x132)],'error':_0x3ba109 instanceof Error?_0x3ba109[_0xdb96f5(0x148)]:String(_0x3ba109)});}}const _0x252db0=assignSqlFileNames(_0x1743eb),_0x1c3d55=[];for(const [_0x1a46d2,_0x532676]of _0x252db0){const _0xadf02f=join(_0x23eaa5,_0x1a46d2),_0x3457af=buildPulledSqlFileContent(_0x532676);let _0x1f4699=_0xdb96f5(0x155),_0x58223b;if(await fileExists(_0xadf02f)){const _0x1a70ff=await readFile(_0xadf02f,_0xdb96f5(0x129));_0x1a70ff===_0x3457af?(_0x1f4699=_0xdb96f5(0x14b),_0x58223b=_0xdb96f5(0x12c)):(_0x1f4699=_0xdb96f5(0x154),_0x58223b='local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)');}_0x1c3d55[_0xdb96f5(0x145)]({'sqlCode':_0x532676[_0xdb96f5(0x132)],'sqlName':_0x532676['sqlName'],'filePath':_0xadf02f,'status':_0x1f4699,'reason':_0x58223b});}return{'method':'POST','url':_0xdb96f5(0x13c),'body':{'appCode':_0x546f2b['appCode'],'sqlCode':_0x7824e4??null,'sqlName':_0x1a5f9f??null,'loadErrors':_0x4df210,'files':_0x1c3d55},'description':'Would\x20pull\x20'+_0x1c3d55[_0xdb96f5(0x151)]+'\x20SQL\x20file(s)\x20under\x20'+_0x23eaa5};},async 'execute'(_0x3aebaa){const _0x474ee8=a98_0x4fe761,_0xb1d85a=findProjectRootDirectory(),_0x5fc1f7=resolveSqlLocalDir(_0xb1d85a),_0x2a86f4=_0x3aebaa[_0x474ee8(0x134)]('sqlcode')||undefined,_0x1221cb=_0x3aebaa[_0x474ee8(0x134)](_0x474ee8(0x12b))||undefined,_0x19ebef=_0x3aebaa[_0x474ee8(0x156)](_0x474ee8(0x126)),_0x4919=await fetchAllSqlQueries(_0x3aebaa['appCode'],{'sqlCode':_0x2a86f4,'sqlName':_0x1221cb});if(_0x4919['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x474ee8(0x14f)};const _0xb81af7=[],_0x145b02=[];for(const _0x5a408c of _0x4919){try{_0xb81af7[_0x474ee8(0x145)](await ensureSqlContent(_0x3aebaa[_0x474ee8(0x133)],_0x5a408c));}catch(_0x327ac7){_0x145b02[_0x474ee8(0x145)]({'sqlCode':_0x5a408c[_0x474ee8(0x132)],'error':_0x327ac7 instanceof Error?_0x327ac7['message']:String(_0x327ac7)});}}if(_0xb81af7[_0x474ee8(0x151)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x145b02},'message':_0x474ee8(0x138)+_0x145b02[_0x474ee8(0x151)]+_0x474ee8(0x144)};const _0x531719=assignSqlFileNames(_0xb81af7);if(_0x19ebef&&!_0x3aebaa[_0x474ee8(0x12f)]){let _0x40e7be=![];for(const [_0x520029,_0x3e5c24]of _0x531719){const _0xc641e=join(_0x5fc1f7,_0x520029),_0x3ac909=buildPulledSqlFileContent(_0x3e5c24);if(await fileExists(_0xc641e)){const _0xe1c70=await readFile(_0xc641e,_0x474ee8(0x129));if(_0xe1c70!==_0x3ac909){_0x40e7be=!![];break;}}}if(_0x40e7be){const _0x277cfc=await confirmForce();if(!_0x277cfc)throw CliErrors[_0x474ee8(0x140)]('Force\x20pull\x20cancelled.');}}const _0x3c54ad=[],_0x1bbd88=[];for(const [_0x7d54f6,_0x64b60e]of _0x531719){const _0x3d38fe=join(_0x5fc1f7,_0x7d54f6),_0x556e54=buildPulledSqlFileContent(_0x64b60e);try{if(await fileExists(_0x3d38fe)){const _0xc30c75=await readFile(_0x3d38fe,_0x474ee8(0x129));if(_0xc30c75===_0x556e54){_0x1bbd88[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'reason':_0x474ee8(0x12c)});continue;}if(!_0x19ebef){_0x1bbd88['push']({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'reason':'local\x20differs\x20from\x20remote'});continue;}}await ensureParentDirectory(_0x3d38fe),await writeFile(_0x3d38fe,_0x556e54,_0x474ee8(0x129)),_0x3c54ad[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'filePath':_0x3d38fe});}catch(_0x5a6aef){_0x145b02[_0x474ee8(0x145)]({'sqlCode':_0x64b60e[_0x474ee8(0x132)],'error':_0x5a6aef instanceof Error?_0x5a6aef[_0x474ee8(0x148)]:String(_0x5a6aef)});}}const _0x2529fb=_0x145b02[_0x474ee8(0x151)]===0x0;return{'ok':_0x2529fb,'data':{'pulled':_0x3c54ad,'skipped':_0x1bbd88,'failed':_0x145b02},'message':'Pull\x20complete:\x20'+_0x3c54ad[_0x474ee8(0x151)]+'\x20written,\x20'+_0x1bbd88[_0x474ee8(0x151)]+_0x474ee8(0x127)+_0x145b02[_0x474ee8(0x151)]+_0x474ee8(0x135)};}};async function confirmForce(){const _0x1789b9=a98_0x4fe761,_0x1764f8=createInterface({'input':process[_0x1789b9(0x13e)],'output':process[_0x1789b9(0x143)]}),_0x13bdc4=await new Promise(_0x816e5b=>{const _0x38eaed=_0x1789b9;_0x1764f8['question'](_0x38eaed(0x139),_0x816e5b);});return _0x1764f8[_0x1789b9(0x123)](),['y',_0x1789b9(0x152)][_0x1789b9(0x14c)](_0x13bdc4[_0x1789b9(0x14a)]()[_0x1789b9(0x13f)]());}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x593524=a99_0x3b25;(function(_0x370e1d,_0x998393){const _0x13271e=a99_0x3b25,_0x346ec2=_0x370e1d();while(!![]){try{const _0x4d8a26=-parseInt(_0x13271e(0x129))/0x1*(-parseInt(_0x13271e(0x144))/0x2)+-parseInt(_0x13271e(0x14e))/0x3+-parseInt(_0x13271e(0x138))/0x4*(parseInt(_0x13271e(0x14f))/0x5)+-parseInt(_0x13271e(0x141))/0x6*(-parseInt(_0x13271e(0x12a))/0x7)+-parseInt(_0x13271e(0x151))/0x8+parseInt(_0x13271e(0x12c))/0x9+-parseInt(_0x13271e(0x13d))/0xa;if(_0x4d8a26===_0x998393)break;else _0x346ec2['push'](_0x346ec2['shift']());}catch(_0xdfde71){_0x346ec2['push'](_0x346ec2['shift']());}}}(a99_0x444d,0xf2503));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';function a99_0x444d(){const _0x17cc14=['18MTySXz','sqlname','write','sqlName','Created','POST','sql','\x20|\x20Tables:\x20','sqlCode','Conflict\x20detected','1047951BWKEjM','5mGQqQY','join','8825688SCfWIn','dbId','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','cwd','\x20chars)','\x20successfully','blocked','N/A','tables','/api/node-toolbox/sql/save','description','Save\x20SQL\x20query\x20from\x20','action','16405ckNUUd','1379liaTGP','save','11287035eZDJbo','Validation:\x20','valid','appCode','sqlcode','file','message','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','File\x20not\x20found:\x20','SQL\x20query\x20description','str','utf-8','1135308ziSbSe','\x20|\x20Params:\x20','length','type','Updated','4886390zSSFjs','string','Type:\x20','validation','55302PUZECL','created','SQL\x20query\x20display\x20name'];a99_0x444d=function(){return _0x17cc14;};return a99_0x444d();}import{CliErrors}from'../../errors.js';function a99_0x3b25(_0x1199f0,_0x28583f){_0x1199f0=_0x1199f0-0x124;const _0x444d5e=a99_0x444d();let _0x3b2560=_0x444d5e[_0x1199f0];return _0x3b2560;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a99_0x593524(0x14a),'command':a99_0x593524(0x12b),'description':a99_0x593524(0x133),'risk':a99_0x593524(0x146),'flags':[{'name':a99_0x593524(0x131),'type':'string','required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a99_0x593524(0x145),'type':a99_0x593524(0x13e),'description':a99_0x593524(0x143)},{'name':'db','type':a99_0x593524(0x13e),'description':a99_0x593524(0x153)},{'name':a99_0x593524(0x126),'type':a99_0x593524(0x13e),'description':a99_0x593524(0x135)}],async 'validate'(_0xbf919e){const _0x10960e=a99_0x593524,_0xee0cea=resolve(process[_0x10960e(0x154)](),_0xbf919e[_0x10960e(0x136)](_0x10960e(0x131)));if(!existsSync(_0xee0cea))throw CliErrors['validation'](_0x10960e(0x134)+_0xee0cea);const _0x331741=readFileSync(_0xee0cea,'utf-8'),_0x503ea3=validateSql(_0x331741);if(!_0x503ea3[_0x10960e(0x12e)])throw CliErrors[_0x10960e(0x140)]('SQL\x20validation\x20failed:\x20'+_0x503ea3['message']);},async 'dryRun'(_0x35f94d){const _0x12719e=a99_0x593524,_0x24f585=resolve(process['cwd'](),_0x35f94d[_0x12719e(0x136)](_0x12719e(0x131))),_0x65849a=readFileSync(_0x24f585,'utf-8'),_0x1cd8c2=validateSql(_0x65849a),_0x4ba517=_0x35f94d['str']('db')||undefined,{db:_0x4c89d0,error:_0x5e78a2}=await resolveOneDb(_0x35f94d[_0x12719e(0x12f)],_0x4ba517);return{'method':_0x12719e(0x149),'url':_0x12719e(0x125),'body':{'appCode':_0x35f94d['appCode'],'sqlContent':'('+_0x65849a[_0x12719e(0x13a)]+_0x12719e(0x155),'sqlCode':_0x35f94d[_0x12719e(0x136)](_0x12719e(0x130))||undefined,'sqlName':_0x35f94d[_0x12719e(0x136)]('sqlname')||undefined,'db':_0x4c89d0?_0x4c89d0['dbName']+'\x20('+_0x4c89d0['dbId']+')':_0x5e78a2},'description':[_0x12719e(0x127)+_0x35f94d[_0x12719e(0x136)]('file'),_0x12719e(0x12d)+_0x1cd8c2[_0x12719e(0x132)],_0x12719e(0x13f)+_0x1cd8c2['sqlType'][_0x12719e(0x13b)]+_0x12719e(0x14b)+(_0x1cd8c2[_0x12719e(0x124)][_0x12719e(0x150)](',\x20')||_0x12719e(0x158))+_0x12719e(0x139)+(_0x1cd8c2['parameters'][_0x12719e(0x150)](',\x20')||'none')][_0x12719e(0x150)]('\x0a')};},async 'execute'(_0x353286){const _0x387d71=a99_0x593524,_0x35c877=resolve(process[_0x387d71(0x154)](),_0x353286[_0x387d71(0x136)]('file')),_0x4fd2ef=readFileSync(_0x35c877,_0x387d71(0x137)),_0x51aee5=_0x353286[_0x387d71(0x136)]('db')||undefined,{db:_0x4470b2,error:_0x65ca84}=await resolveOneDb(_0x353286[_0x387d71(0x12f)],_0x51aee5);if(_0x65ca84)throw CliErrors[_0x387d71(0x140)](_0x65ca84);const _0x280c4c=await saveSqlQuery({'appCode':_0x353286['appCode'],'sqlContent':_0x4fd2ef,'sqlCode':_0x353286[_0x387d71(0x136)](_0x387d71(0x130))||undefined,'sqlName':_0x353286[_0x387d71(0x136)](_0x387d71(0x145))||undefined,'dbId':_0x4470b2[_0x387d71(0x152)],'description':_0x353286[_0x387d71(0x136)](_0x387d71(0x126))||undefined});if(_0x280c4c[_0x387d71(0x157)])return{'ok':![],'data':_0x280c4c,'message':_0x280c4c[_0x387d71(0x132)]||_0x387d71(0x14d)};return{'ok':!![],'data':{'sqlCode':_0x280c4c[_0x387d71(0x14c)],'sqlName':_0x280c4c[_0x387d71(0x147)],'action':_0x280c4c[_0x387d71(0x128)]},'message':(_0x280c4c['action']===_0x387d71(0x142)?_0x387d71(0x148):_0x387d71(0x13c))+_0x387d71(0x156)+(_0x280c4c[_0x387d71(0x14c)]?'\x20('+_0x280c4c['sqlCode']+')':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a100_0x5629(){const _0x400c65=['sqlName','556870ytVTBN','3WZNCoo','12891033gHZuAS','trimEnd','.rabetbase/sql','109824jpyGiW','endsWith','unknown','trim','6fyGINK','922434KEPGyA','102712FWFpcv','join','unnamed','2692108lnZKMq','set','sqlCode','replace','has','sqlContent','5125183UemlZK','.sql','--\x20@lovrabet.description:'];a100_0x5629=function(){return _0x400c65;};return a100_0x5629();}function a100_0x1b16(_0x3cf782,_0x397215){_0x3cf782=_0x3cf782-0x1cc;const _0x562921=a100_0x5629();let _0x1b166=_0x562921[_0x3cf782];return _0x1b166;}const a100_0x329916=a100_0x1b16;(function(_0x1d419a,_0x59dd49){const _0x5db92b=a100_0x1b16,_0x5d08ed=_0x1d419a();while(!![]){try{const _0x407f19=parseInt(_0x5db92b(0x1e0))/0x1+parseInt(_0x5db92b(0x1cd))/0x2+-parseInt(_0x5db92b(0x1dc))/0x3*(-parseInt(_0x5db92b(0x1d1))/0x4)+parseInt(_0x5db92b(0x1db))/0x5+parseInt(_0x5db92b(0x1cc))/0x6*(parseInt(_0x5db92b(0x1d7))/0x7)+-parseInt(_0x5db92b(0x1ce))/0x8+-parseInt(_0x5db92b(0x1dd))/0x9;if(_0x407f19===_0x59dd49)break;else _0x5d08ed['push'](_0x5d08ed['shift']());}catch(_0x589c0e){_0x5d08ed['push'](_0x5d08ed['shift']());}}}(a100_0x5629,0x9cd83));import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a100_0x329916(0x1df);export function resolveSqlLocalDir(_0x3aa194){return join(_0x3aa194,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x9673fc){const _0x3cc2a2=a100_0x329916,_0xf75e4c=_0x9673fc['trim']()||'unnamed',_0x46c12a=_0xf75e4c[_0x3cc2a2(0x1d4)](/[/\\?%*:|"<>]/g,'_')[_0x3cc2a2(0x1d4)](/\s+/g,'_')['replace'](/_+/g,'_');return _0x46c12a||_0x3cc2a2(0x1d0);}export function assignSqlFileNames(_0x35ab39){const _0x4ee352=a100_0x329916,_0x5061f4=new Map();for(const _0x184197 of _0x35ab39){const _0xb78ec7=safeSqlFileBaseName(_0x184197['sqlName']??_0x4ee352(0x1d0));let _0x376704=_0xb78ec7+_0x4ee352(0x1d8);if(_0x5061f4['has'](_0x376704)){const _0x1831f2=(_0x184197[_0x4ee352(0x1d3)]??_0x4ee352(0x1e2))[_0x4ee352(0x1d4)](/-/g,'');_0x376704=_0xb78ec7+'__'+_0x1831f2+_0x4ee352(0x1d8);}let _0x1395a0=0x0,_0x2e7375=_0x376704;while(_0x5061f4[_0x4ee352(0x1d5)](_0x2e7375)){_0x1395a0++,_0x2e7375=_0xb78ec7+'__'+_0x1395a0+_0x4ee352(0x1d8);}_0x5061f4[_0x4ee352(0x1d2)](_0x2e7375,_0x184197);}return _0x5061f4;}export function buildPulledSqlFileContent(_0x3cc9fb){const _0x2508ed=a100_0x329916,_0x1f7895=_0x3cc9fb[_0x2508ed(0x1da)]??'unnamed',_0x2397fb=_0x3cc9fb[_0x2508ed(0x1d3)]??'',_0x52c323=(_0x3cc9fb['description']??'')[_0x2508ed(0x1d4)](/\r?\n/g,'\x20')[_0x2508ed(0x1e3)](),_0x848133=_0x3cc9fb[_0x2508ed(0x1d6)]??'',_0xd073ab=['--\x20@lovrabet.sqlName:\x20'+_0x1f7895,'--\x20@lovrabet.sqlCode:\x20'+_0x2397fb,_0x2508ed(0x1d9)+(_0x52c323?'\x20'+_0x52c323:''),'',_0x848133[_0x2508ed(0x1de)]()],_0x2f6e7f=_0xd073ab[_0x2508ed(0x1cf)]('\x0a');return _0x2f6e7f[_0x2508ed(0x1e1)]('\x0a')?_0x2f6e7f:_0x2f6e7f+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a101_0x4540(_0x28b5d6,_0x37ad5b){_0x28b5d6=_0x28b5d6-0x8e;const _0x44cc8a=a101_0x44cc();let _0x45408f=_0x44cc8a[_0x28b5d6];return _0x45408f;}const a101_0x2d0895=a101_0x4540;(function(_0x56f503,_0x2105e1){const _0x332920=a101_0x4540,_0xdd03a6=_0x56f503();while(!![]){try{const _0x247a49=parseInt(_0x332920(0xaa))/0x1*(-parseInt(_0x332920(0xa6))/0x2)+parseInt(_0x332920(0xae))/0x3*(parseInt(_0x332920(0xb6))/0x4)+-parseInt(_0x332920(0x90))/0x5*(parseInt(_0x332920(0xb7))/0x6)+parseInt(_0x332920(0xad))/0x7+-parseInt(_0x332920(0xbb))/0x8+-parseInt(_0x332920(0x9a))/0x9+parseInt(_0x332920(0xb1))/0xa*(parseInt(_0x332920(0xac))/0xb);if(_0x247a49===_0x2105e1)break;else _0xdd03a6['push'](_0xdd03a6['shift']());}catch(_0x4f405d){_0xdd03a6['push'](_0xdd03a6['shift']());}}}(a101_0x44cc,0x8f41a));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a101_0x44cc(){const _0x1c57c1=['sqlType','flagMissing','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','reason','tableName','type','1210cVYFiU','isSelectOnly','\x22\x20not\x20found\x20in\x20any\x20dataset','validate','name','fields','push','utf-8','get','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','9169596EKqdEm','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','isArray','Table\x20\x22','File\x20not\x20found:\x20','appCode','dbtableConfig','message','schemaWarnings','validation','toLowerCase','trim','2BhVxiA','cwd','read','file','287932BLHIbS','map','15465098ghQDzH','5082798KAMuRY','297jFPTUn','string','\x22\x20not\x20found\x20or\x20not\x20accessible','10NqrhUC','Dataset\x20\x22','schemas','valid','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','33188leDqUH','9042SvgQhA','split','schema:','str','5561496msVUpK','sql'];a101_0x44cc=function(){return _0x1c57c1;};return a101_0x44cc();}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a101_0x2d0895(0xbc),'command':a101_0x2d0895(0x93),'description':a101_0x2d0895(0xb5),'risk':a101_0x2d0895(0xa8),'flags':[{'name':'file','type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0xbf)},{'name':a101_0x2d0895(0xbc),'type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0x99)},{'name':a101_0x2d0895(0xb3),'type':a101_0x2d0895(0xaf),'description':a101_0x2d0895(0x9b)}],async 'execute'(_0x1f198c){const _0x141b4c=a101_0x2d0895,_0x50aea1=_0x1f198c[_0x141b4c(0xba)](_0x141b4c(0xa9)),_0x15e611=_0x1f198c[_0x141b4c(0xba)]('sql');if(!_0x50aea1&&!_0x15e611)throw CliErrors[_0x141b4c(0xbe)](_0x141b4c(0xa9),'Provide\x20--file\x20or\x20--sql');let _0x261488;if(_0x50aea1){const _0x73d966=resolve(process[_0x141b4c(0xa7)](),_0x50aea1);if(!existsSync(_0x73d966))throw CliErrors[_0x141b4c(0xa3)](_0x141b4c(0x9e)+_0x73d966);_0x261488=readFileSync(_0x73d966,_0x141b4c(0x97));}else _0x261488=_0x15e611;const _0x4a4b8d=validateSql(_0x261488),_0x4a1e56={'valid':_0x4a4b8d[_0x141b4c(0xb4)],'sqlType':_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0x8f)],'isSelectOnly':_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0x91)],'isDangerous':_0x4a4b8d[_0x141b4c(0xbd)]['isDangerous'],'tables':_0x4a4b8d['tables'],'parameters':_0x4a4b8d['parameters'],'message':_0x4a4b8d[_0x141b4c(0xa1)]};_0x4a4b8d[_0x141b4c(0xbd)]['reason']&&(_0x4a1e56[_0x141b4c(0xc0)]=_0x4a4b8d[_0x141b4c(0xbd)][_0x141b4c(0xc0)]);const _0x40ee74=_0x1f198c['str'](_0x141b4c(0xb3));if(_0x40ee74&&_0x4a4b8d[_0x141b4c(0xb4)]){const _0x47af50=_0x40ee74[_0x141b4c(0xb8)](',')['map'](_0x3b856b=>_0x3b856b[_0x141b4c(0xa5)]())['filter'](Boolean),_0x3f19bd=[],_0x587148=await listDatasets(_0x1f198c[_0x141b4c(0x9f)]),_0x1d6074=new Map(_0x587148[_0x141b4c(0xab)](_0x2da96e=>[_0x2da96e[_0x141b4c(0xa0)]?.[_0x141b4c(0x8e)]?.[_0x141b4c(0xa4)](),_0x2da96e]));for(const _0x29cbdb of _0x4a4b8d['tables']){const _0x568ea6=_0x1d6074[_0x141b4c(0x98)](_0x29cbdb[_0x141b4c(0xa4)]());!_0x568ea6&&_0x3f19bd['push'](_0x141b4c(0x9d)+_0x29cbdb+_0x141b4c(0x92));}for(const _0x5154e4 of _0x47af50){try{const _0x4864e2=await getDatasetDetail(_0x5154e4),_0x574420=Array[_0x141b4c(0x9c)](_0x4864e2[_0x141b4c(0x95)])?_0x4864e2[_0x141b4c(0x95)]:[],_0xfdc81f=new Set(_0x574420[_0x141b4c(0xab)](_0x304989=>_0x304989[_0x141b4c(0x94)]?.[_0x141b4c(0xa4)]())),_0x42ad97=_0x4864e2[_0x141b4c(0xa0)]?.[_0x141b4c(0x8e)]||_0x4864e2[_0x141b4c(0x8e)]||_0x5154e4;_0x4a1e56[_0x141b4c(0xb9)+_0x42ad97]={'code':_0x5154e4,'tableName':_0x42ad97,'fieldCount':_0xfdc81f['size'],'fields':Array['from'](_0xfdc81f)};}catch{_0x3f19bd[_0x141b4c(0x96)](_0x141b4c(0xb2)+_0x5154e4+_0x141b4c(0xb0));}}_0x3f19bd['length']>0x0&&(_0x4a1e56[_0x141b4c(0xa2)]=_0x3f19bd);}return{'ok':_0x4a4b8d[_0x141b4c(0xb4)],'data':_0x4a1e56,'message':_0x4a4b8d[_0x141b4c(0xa1)]};}};
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x2adf76=a102_0x3081;function a102_0x3d1c(){const _0x503c2b=['rabetbase','value','Use\x20project\x20config\x20scope','dryRun','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','259861xFfvAn','sqlcode','Watch\x20mode','Force\x20non-interactive\x20mode\x20(CI)','description','Skip\x20confirmation\x20for\x20high-risk\x20writes','3EtikNq','watch','SQL\x20code','Dataset\x20code','string','format','45457LpDlTc','schemas','<name>','skipImports','clear','env','operation-type','meowKey','code','Use\x20global\x20config\x20scope','2206980tKaByQ','DB\x20ID','operation','type','datasetcode','yes','JSON\x20params','Function\x20node','pagesize','keyword','Environment','help','operationType','5vctXlk','nonInteractive','@lovrabet/rabetbase-cli','page','enableBffSave','Force\x20overwrite','Verbose\x20output','function-node','1104234ffLQbH','SQL\x20name','non-interactive','map','params','name','Name','Override\x20appcode','Description','Skip\x20import\x20generation','3058590jYASCz','Config\x20value','Show\x20help','2185296yTAnCW','appcode','File\x20path','Enable\x20BFF\x20save','project','verbose','Keyword\x20filter','Record\x20ID','key','Use\x20remote','Code\x20filter','production\x20|\x20daily','Preview\x20operation\x20without\x20executing','3033208HDslHy','11yvATUI','sqlname','Operation\x20type','dbid','skip-imports','Rabetbase\x20CLI','9MLgrUv','force','Output\x20format','functionNode','<expr>','sql','boolean','Type\x20filter','output','remote','file','enable-bff-save','SQL\x20string','Clear','app','global','all','Page\x20number','json\x20|\x20pretty\x20|\x20compress','Alias\x20for\x20--non-interactive'];a102_0x3d1c=function(){return _0x503c2b;};return a102_0x3d1c();}(function(_0x358998,_0x5931a9){const _0x4c6d0f=a102_0x3081,_0x3e60bb=_0x358998();while(!![]){try{const _0x275e01=parseInt(_0x4c6d0f(0x1d2))/0x1+parseInt(_0x4c6d0f(0x1f1))/0x2*(parseInt(_0x4c6d0f(0x1cc))/0x3)+-parseInt(_0x4c6d0f(0x1dc))/0x4*(parseInt(_0x4c6d0f(0x1e9))/0x5)+parseInt(_0x4c6d0f(0x1fe))/0x6+-parseInt(_0x4c6d0f(0x1c6))/0x7+parseInt(_0x4c6d0f(0x1a6))/0x8*(-parseInt(_0x4c6d0f(0x1ad))/0x9)+parseInt(_0x4c6d0f(0x1fb))/0xa*(parseInt(_0x4c6d0f(0x1a7))/0xb);if(_0x275e01===_0x5931a9)break;else _0x3e60bb['push'](_0x3e60bb['shift']());}catch(_0x245ff5){_0x3e60bb['push'](_0x3e60bb['shift']());}}}(a102_0x3d1c,0x4926e));function a102_0x3081(_0x370324,_0x2418ae){_0x370324=_0x370324-0x1a1;const _0x3d1c9a=a102_0x3d1c();let _0x308165=_0x3d1c9a[_0x370324];return _0x308165;}export const CLI_BIN_NAME=a102_0x2adf76(0x1c1);export const CLI_DISPLAY_NAME=a102_0x2adf76(0x1ac);export const NPM_PACKAGE_NAME=a102_0x2adf76(0x1eb);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a102_0x2adf76(0x1ff),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f8),'hint':'<code>'},{'name':a102_0x2adf76(0x1bb),'meowKey':a102_0x2adf76(0x1bb),'type':a102_0x2adf76(0x1d0),'description':'Select\x20app\x20profile\x20by\x20name','hint':a102_0x2adf76(0x1d4)},{'name':'env','meowKey':a102_0x2adf76(0x1d7),'type':'string','description':a102_0x2adf76(0x1e6),'hint':a102_0x2adf76(0x1a4)},{'name':'format','meowKey':a102_0x2adf76(0x1d1),'type':'string','description':a102_0x2adf76(0x1af),'hint':a102_0x2adf76(0x1bf)},{'name':'jq','meowKey':'jq','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1c5),'hint':a102_0x2adf76(0x1b1)},{'name':'dry-run','meowKey':a102_0x2adf76(0x1c4),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1a5)},{'name':a102_0x2adf76(0x1e1),'meowKey':a102_0x2adf76(0x1e1),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1cb)},{'name':a102_0x2adf76(0x1f3),'meowKey':a102_0x2adf76(0x1ea),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c9)},{'name':a102_0x2adf76(0x1bc),'meowKey':a102_0x2adf76(0x1bc),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1db)},{'name':a102_0x2adf76(0x202),'meowKey':'project','type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c3)},{'name':'ci','meowKey':'ci','type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1c0),'hidden':!![]},{'name':'help','meowKey':a102_0x2adf76(0x1e7),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1fd)},{'name':a102_0x2adf76(0x1f6),'meowKey':a102_0x2adf76(0x1f6),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f7),'hidden':!![]},{'name':'clear','meowKey':a102_0x2adf76(0x1d6),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1ba),'hidden':!![]},{'name':a102_0x2adf76(0x1cd),'meowKey':a102_0x2adf76(0x1cd),'type':'boolean','description':a102_0x2adf76(0x1c8),'hidden':!![]},{'name':a102_0x2adf76(0x1b5),'meowKey':a102_0x2adf76(0x1b5),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a102_0x2adf76(0x1f5),'meowKey':'params','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1e2),'hidden':!![]},{'name':a102_0x2adf76(0x1e0),'meowKey':'datasetcode','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1cf),'hidden':!![]},{'name':a102_0x2adf76(0x1bd),'meowKey':'all','type':a102_0x2adf76(0x1b3),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a102_0x2adf76(0x1b8),'meowKey':a102_0x2adf76(0x1ed),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x201),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a102_0x2adf76(0x205),'hidden':!![]},{'name':'type','meowKey':a102_0x2adf76(0x1df),'type':'string','description':a102_0x2adf76(0x1b4),'hidden':!![]},{'name':a102_0x2adf76(0x1b7),'meowKey':a102_0x2adf76(0x1b7),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x200),'hidden':!![]},{'name':'sqlcode','meowKey':a102_0x2adf76(0x1c7),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1ce),'hidden':!![]},{'name':a102_0x2adf76(0x1a8),'meowKey':'sqlname','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f2),'hidden':!![]},{'name':'dbid','meowKey':a102_0x2adf76(0x1aa),'type':'string','description':a102_0x2adf76(0x1dd),'hidden':!![]},{'name':a102_0x2adf76(0x1ca),'meowKey':a102_0x2adf76(0x1ca),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1f9),'hidden':!![]},{'name':'page','meowKey':a102_0x2adf76(0x1ec),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1be),'hidden':!![]},{'name':a102_0x2adf76(0x1e4),'meowKey':'pagesize','type':a102_0x2adf76(0x1d0),'description':'Page\x20size','hidden':!![]},{'name':'keyword','meowKey':a102_0x2adf76(0x1e5),'type':'string','description':a102_0x2adf76(0x204),'hidden':!![]},{'name':a102_0x2adf76(0x1da),'meowKey':'code','type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1a3),'hidden':!![]},{'name':a102_0x2adf76(0x1b2),'meowKey':a102_0x2adf76(0x1b2),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1b9),'hidden':!![]},{'name':a102_0x2adf76(0x1d3),'meowKey':a102_0x2adf76(0x1d3),'type':a102_0x2adf76(0x1d0),'description':'Schemas','hidden':!![]},{'name':a102_0x2adf76(0x1de),'meowKey':a102_0x2adf76(0x1de),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':'target','meowKey':'target','type':a102_0x2adf76(0x1d0),'description':'Target\x20path','hidden':!![]},{'name':a102_0x2adf76(0x1ab),'meowKey':a102_0x2adf76(0x1d5),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1fa),'hidden':!![]},{'name':a102_0x2adf76(0x1a1),'meowKey':a102_0x2adf76(0x1a1),'type':a102_0x2adf76(0x1d0),'description':'Config\x20key','hidden':!![]},{'name':'value','meowKey':a102_0x2adf76(0x1c2),'type':'string','description':a102_0x2adf76(0x1fc),'hidden':!![]},{'name':'force','meowKey':a102_0x2adf76(0x1ae),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1ee),'hidden':!![]},{'name':'remote','meowKey':a102_0x2adf76(0x1b6),'type':a102_0x2adf76(0x1b3),'description':a102_0x2adf76(0x1a2),'hidden':!![]},{'name':a102_0x2adf76(0x203),'meowKey':'verbose','type':'boolean','description':a102_0x2adf76(0x1ef),'hidden':!![]},{'name':a102_0x2adf76(0x1d8),'meowKey':a102_0x2adf76(0x1e8),'type':a102_0x2adf76(0x1d0),'description':a102_0x2adf76(0x1a9),'hidden':!![]},{'name':a102_0x2adf76(0x1f0),'meowKey':a102_0x2adf76(0x1b0),'type':'string','description':a102_0x2adf76(0x1e3),'hidden':!![]}];export function buildMeowFlags(){const _0x40cbff=a102_0x2adf76;return Object['fromEntries'](GLOBAL_FLAGS[_0x40cbff(0x1f4)](_0xaaf651=>[_0xaaf651[_0x40cbff(0x1d9)],{'type':_0xaaf651[_0x40cbff(0x1df)]}]));}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a103_0x43a754=a103_0x95ae;function a103_0x2672(){const _0x90fe08=['17BXmYcl','9202275xTeLGV','74456ccrKnm','https://daily-runtime.lovrabet.com','userDomain','315RdWYkk','https://user-daily.lovrabet.com','24486110JoGfSz','https://user.lovrabet.com','2358ZYaNMY','34270NbYnCX','apiDomain','2611257vkwOEt','runtimeDomain','324768jFzkDv','https://daily-api.lovrabet.com','4xkBjHg','776256fwdJvR'];a103_0x2672=function(){return _0x90fe08;};return a103_0x2672();}(function(_0x36b27e,_0x5e0400){const _0x596042=a103_0x95ae,_0x208690=_0x36b27e();while(!![]){try{const _0x25d621=-parseInt(_0x596042(0xb3))/0x1*(-parseInt(_0x596042(0xb5))/0x2)+parseInt(_0x596042(0xad))/0x3*(-parseInt(_0x596042(0xb1))/0x4)+parseInt(_0x596042(0xb4))/0x5+-parseInt(_0x596042(0xb2))/0x6+-parseInt(_0x596042(0xb8))/0x7*(parseInt(_0x596042(0xaf))/0x8)+parseInt(_0x596042(0xaa))/0x9*(-parseInt(_0x596042(0xab))/0xa)+parseInt(_0x596042(0xba))/0xb;if(_0x25d621===_0x5e0400)break;else _0x208690['push'](_0x208690['shift']());}catch(_0xa44e90){_0x208690['push'](_0x208690['shift']());}}}(a103_0x2672,0xee004));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x8c9af4){const _0x15d55f=a103_0x95ae;customApiDomain=_0x8c9af4?.[_0x15d55f(0xac)],customUserDomain=_0x8c9af4?.[_0x15d55f(0xb7)],customRuntimeDomain=_0x8c9af4?.[_0x15d55f(0xae)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a103_0x43a754(0xa9):a103_0x43a754(0xb9));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a103_0x43a754(0xb0));function a103_0x95ae(_0x571640,_0x177d56){_0x571640=_0x571640-0xa9;const _0x267255=a103_0x2672();let _0x95aee6=_0x267255[_0x571640];return _0x95aee6;}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a103_0x43a754(0xb6));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a104_0x3b49(){const _0x56f3f1=['3uHjeqr','660EIyIzK','495uponRc','14735dWlSSr','online','production','development','2UpUXzO','218728TMWrpY','2519844sTHWMX','99HDpMCW','3638124EeCXSy','6966140tvmOCJ','38768BxJiPf','924767FCJSfI','daily'];a104_0x3b49=function(){return _0x56f3f1;};return a104_0x3b49();}(function(_0x257a7f,_0x5a662b){const _0x218977=a104_0x4355,_0x444d91=_0x257a7f();while(!![]){try{const _0x1e1a0=-parseInt(_0x218977(0x1f5))/0x1*(parseInt(_0x218977(0x1ee))/0x2)+parseInt(_0x218977(0x1f7))/0x3*(parseInt(_0x218977(0x1ef))/0x4)+parseInt(_0x218977(0x1fa))/0x5*(-parseInt(_0x218977(0x1f8))/0x6)+-parseInt(_0x218977(0x1f2))/0x7+-parseInt(_0x218977(0x1f4))/0x8*(parseInt(_0x218977(0x1f9))/0x9)+parseInt(_0x218977(0x1f3))/0xa+parseInt(_0x218977(0x1f1))/0xb*(parseInt(_0x218977(0x1f0))/0xc);if(_0x1e1a0===_0x5a662b)break;else _0x444d91['push'](_0x444d91['shift']());}catch(_0x34275d){_0x444d91['push'](_0x444d91['shift']());}}}(a104_0x3b49,0x93f1c));export function normalizeEnv(_0x56b5b5){const _0x3b8167=a104_0x4355;return _0x56b5b5===_0x3b8167(0x1fb)?_0x3b8167(0x1fc):_0x56b5b5;}export function isProduction(_0x2b43c3){const _0x21be0a=a104_0x4355;return normalizeEnv(_0x2b43c3)===_0x21be0a(0x1fc);}export function isDaily(_0x160c4b){const _0x1f94ac=a104_0x4355;return normalizeEnv(_0x160c4b)===_0x1f94ac(0x1f6);}export function isDev(_0x4afd63){const _0x14e6e2=a104_0x4355,_0x47ebf1=normalizeEnv(_0x4afd63);return _0x47ebf1===_0x14e6e2(0x1fd)||_0x47ebf1==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');function a104_0x4355(_0x55fdc8,_0x5ed945){_0x55fdc8=_0x55fdc8-0x1ee;const _0x3b49cb=a104_0x3b49();let _0x4355a9=_0x3b49cb[_0x55fdc8];return _0x4355a9;}export function getEnv(){return env;}export function initEnv(_0x8aacf0){env=normalizeEnv(_0x8aacf0);}
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x37cb47=a105_0x28dc;function a105_0x28dc(_0x1732ec,_0x589d2d){_0x1732ec=_0x1732ec-0x1c7;const _0x43262d=a105_0x4326();let _0x28dc86=_0x43262d[_0x1732ec];return _0x28dc86;}function a105_0x4326(){const _0x2cb16b=['7jhiiJT','9SenBtw','136OCBBNS','./src/api','9117546UoidTL','12gRYeuf','4857625bWYeTe','648909rNOIfu','8182394EzHigQ','2vICJEW','238982LSWPLe','16582190KTDhQl','685484OAGOIR'];a105_0x4326=function(){return _0x2cb16b;};return a105_0x4326();}(function(_0x336493,_0x406743){const _0x35fdf4=a105_0x28dc,_0x7b8f66=_0x336493();while(!![]){try{const _0xc65a64=-parseInt(_0x35fdf4(0x1c8))/0x1*(-parseInt(_0x35fdf4(0x1c9))/0x2)+-parseInt(_0x35fdf4(0x1cd))/0x3*(parseInt(_0x35fdf4(0x1cb))/0x4)+-parseInt(_0x35fdf4(0x1d2))/0x5+parseInt(_0x35fdf4(0x1d0))/0x6*(-parseInt(_0x35fdf4(0x1cc))/0x7)+parseInt(_0x35fdf4(0x1ce))/0x8*(parseInt(_0x35fdf4(0x1d3))/0x9)+parseInt(_0x35fdf4(0x1ca))/0xa+parseInt(_0x35fdf4(0x1c7))/0xb*(parseInt(_0x35fdf4(0x1d1))/0xc);if(_0xc65a64===_0x406743)break;else _0x7b8f66['push'](_0x7b8f66['shift']());}catch(_0x261d2a){_0x7b8f66['push'](_0x7b8f66['shift']());}}}(a105_0x4326,0xd2567));export const DEFAULT_API_DIR=a105_0x37cb47(0x1cf);
|