@lovrabet/rabetbase-cli 2.0.13 → 2.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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_0x4b1ab2=a90_0x35b4;(function(_0x4d9a82,_0x264ee2){const _0x5d20af=a90_0x35b4,_0x1cc8a4=_0x4d9a82();while(!![]){try{const _0xc6f197=parseInt(_0x5d20af(0x1d3))/0x1+-parseInt(_0x5d20af(0x1d1))/0x2*(-parseInt(_0x5d20af(0x1de))/0x3)+parseInt(_0x5d20af(0x1cf))/0x4*(parseInt(_0x5d20af(0x1d4))/0x5)+-parseInt(_0x5d20af(0x1c7))/0x6*(parseInt(_0x5d20af(0x1ca))/0x7)+-parseInt(_0x5d20af(0x1e5))/0x8+-parseInt(_0x5d20af(0x1ec))/0x9+parseInt(_0x5d20af(0x1d9))/0xa;if(_0xc6f197===_0x264ee2)break;else _0x1cc8a4['push'](_0x1cc8a4['shift']());}catch(_0x573fc1){_0x1cc8a4['push'](_0x1cc8a4['shift']());}}}(a90_0x3734,0x8bd71));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';function a90_0x3734(){const _0x527799=['logout','Configuration','\x20\x20[high-risk-write]','5238162dYojhG','command','Skills','defaultCommand','Menu','length','login','Run\x20any\x20package.json\x20script','project','show','map','preview','Project','isSingleCommand','commands','4271742LHuQrk','start','run','7ykpOPx','API','skill','values','Authentication','1913636GSRQhB','push','7114oItwLC','wildcardDef','31673UpyrXD','10HVNWzZ','Diagnostics','Logs','install','BFF\x20Scripts','7800780RLoLmT','has','description','build','Database\x20Connections','381NIcPwc','get','create','Self\x20Update','Schema','SQL\x20Queries','service','2828384HknlqL','write','set','Quick\x20Start'];a90_0x3734=function(){return _0x527799;};return a90_0x3734();}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';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';function a90_0x35b4(_0x3b81bb,_0x10e6ee){_0x3b81bb=_0x3b81bb-0x1c7;const _0x373454=a90_0x3734();let _0x35b478=_0x373454[_0x3b81bb];return _0x35b478;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x59964f){const _0x1d1858=a90_0x35b4;for(const _0x155129 of _0x59964f){definitions[_0x1d1858(0x1e7)](_0x155129[_0x1d1858(0x1e4)]+':'+_0x155129[_0x1d1858(0x1ed)],_0x155129);let _0xdf4eca=serviceGroups[_0x1d1858(0x1df)](_0x155129[_0x1d1858(0x1e4)]);!_0xdf4eca&&(_0xdf4eca=[],serviceGroups[_0x1d1858(0x1e7)](_0x155129[_0x1d1858(0x1e4)],_0xdf4eca)),_0xdf4eca[_0x1d1858(0x1d0)](_0x155129);}}function registerDeclarativeService(_0x406915,_0x21fc46,_0x3535e3){const _0x8f190f=a90_0x35b4;registerDefinitions(_0x21fc46);_0x3535e3?.[_0x8f190f(0x1d2)]&®isterDefinitions([_0x3535e3[_0x8f190f(0x1d2)]]);const _0x25015c=_0x14580a=>_0x14580a==='read'?'':_0x14580a===_0x8f190f(0x1e6)?'\x20\x20[write]':_0x8f190f(0x1eb),_0xf9e56={'service':_0x21fc46[0x0][_0x8f190f(0x1e4)],'label':_0x406915,'commands':_0x21fc46[_0x8f190f(0x1f6)](_0x5b86bc=>({'command':_0x5b86bc['command'],'description':_0x5b86bc[_0x8f190f(0x1db)],'tag':_0x25015c(_0x5b86bc['risk'])})),'declarative':!![],'defaultCommand':_0x3535e3?.[_0x8f190f(0x1ef)]??(_0x3535e3?.[_0x8f190f(0x1f9)]?_0x21fc46[0x0]['command']:undefined),'wildcardDef':_0x3535e3?.['wildcardDef'],'isSingleCommand':_0x3535e3?.[_0x8f190f(0x1f9)]};serviceRegistry[_0x8f190f(0x1d0)](_0xf9e56),serviceByName[_0x8f190f(0x1e7)](_0xf9e56[_0x8f190f(0x1e4)],_0xf9e56);}registerDeclarativeService(a90_0x4b1ab2(0x1e8),initDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1c9),'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1f8),projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a90_0x4b1ab2(0x1f1)]-0x1];last[a90_0x4b1ab2(0x1fa)]=[{'command':'<script>','description':a90_0x4b1ab2(0x1f3),'tag':''}];}registerDeclarativeService(a90_0x4b1ab2(0x1ce),authDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1f2)}),registerDeclarativeService(a90_0x4b1ab2(0x1e1),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1d5),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1e2),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a90_0x4b1ab2(0x1ea),configDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1cb),apiDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1f0),menuDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1dd),dbDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1d8),bffDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1e3),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1ee),skillDefinitions),registerDeclarativeService(a90_0x4b1ab2(0x1d6),logsDefinitions,{'defaultCommand':a90_0x4b1ab2(0x1f5)});export const deprecatedAliases={'create':{'service':a90_0x4b1ab2(0x1f4),'command':a90_0x4b1ab2(0x1e0)},'start':{'service':a90_0x4b1ab2(0x1c9),'command':a90_0x4b1ab2(0x1c8)},'build':{'service':a90_0x4b1ab2(0x1c9),'command':a90_0x4b1ab2(0x1dc)},'preview':{'service':'run','command':a90_0x4b1ab2(0x1f7)},'logout':{'service':'auth','command':a90_0x4b1ab2(0x1e9)},'skills':{'service':a90_0x4b1ab2(0x1cc),'command':a90_0x4b1ab2(0x1d7)}};export function findDefinition(_0x56594c,_0x41947d){const _0x31b47b=a90_0x4b1ab2;return definitions[_0x31b47b(0x1df)](_0x56594c+':'+_0x41947d);}export function isKnownService(_0x32ce03){const _0x156a0c=a90_0x4b1ab2;return serviceByName[_0x156a0c(0x1da)](_0x32ce03);}export function isDeclarativeService(_0x436bae){const _0x59b70b=a90_0x4b1ab2;return serviceGroups[_0x59b70b(0x1da)](_0x436bae)||serviceByName[_0x59b70b(0x1df)](_0x436bae)?.[_0x59b70b(0x1d2)]!==undefined;}export function getServiceEntry(_0x268eef){const _0x467e9b=a90_0x4b1ab2;return serviceByName[_0x467e9b(0x1df)](_0x268eef);}export function getLegacyHandler(_0x45ef7b,_0x50ec9b){return undefined;}export function getAllDefinitions(){const _0x141e89=a90_0x4b1ab2;return Array['from'](definitions[_0x141e89(0x1cd)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0xa1cd89=a91_0x2fe5;(function(_0x3ba1d7,_0x33ebc1){const _0x22e7ba=a91_0x2fe5,_0x850661=_0x3ba1d7();while(!![]){try{const _0x24df20=parseInt(_0x22e7ba(0x1a6))/0x1+-parseInt(_0x22e7ba(0x1b2))/0x2+parseInt(_0x22e7ba(0x1b1))/0x3+-parseInt(_0x22e7ba(0x193))/0x4+parseInt(_0x22e7ba(0x19b))/0x5*(-parseInt(_0x22e7ba(0x1a4))/0x6)+parseInt(_0x22e7ba(0x1b0))/0x7*(parseInt(_0x22e7ba(0x1c2))/0x8)+parseInt(_0x22e7ba(0x1a9))/0x9;if(_0x24df20===_0x33ebc1)break;else _0x850661['push'](_0x850661['shift']());}catch(_0x5a0a99){_0x850661['push'](_0x850661['shift']());}}}(a91_0x5168,0x70d0b));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';function a91_0x5168(){const _0x5a3b4b=['\x22\x20not\x20found\x20in\x20package.json.','Script\x20\x22','inherit','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','padEnd','error','push','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','cwd','40OpBODe','utf-8','Script\x20name\x20defined\x20in\x20package.json','run','\x20\x20\x20\x20','\x20run\x20start','needsUpgrade','Available:\x20','\x20run\x20<script>\x0a','yarn','\x20\x20EXAMPLES','No\x20scripts\x20defined\x20in\x20package.json.','scripts','yarn.lock','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','script','bun.lock','1167500KIjXkd','npm','\x20run\x20build','start','vite','read','.bin','args','19455SKfbab','node_modules','\x0a\x20\x20Available\x20scripts:\x0a','\x20run\x20','has','keys','boolean','entries','(none)','1266REdzNI','pnpm-lock.yaml','722698NfnDIu','close','validation','4390272RVIfuS','vite\x20preview\x20exited\x20with\x20code\x20','bun','build','bool','join','log','938581zTSmXO','324441RjCGwM','828202kfKkDm','\x20exited\x20with\x20code\x20','watch','length','all','parse','map'];a91_0x5168=function(){return _0x5a3b4b;};return a91_0x5168();}import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a91_0xa1cd89(0x196),'dev']);function readPackageScripts(_0x3359fa){const _0x15b6b4=a91_0xa1cd89,_0x1925d6=resolve(_0x3359fa,'package.json');if(!existsSync(_0x1925d6))return null;try{const _0x58cd33=JSON[_0x15b6b4(0x1b7)](readFileSync(_0x1925d6,_0x15b6b4(0x1c3)));return _0x58cd33[_0x15b6b4(0x1ce)]??{};}catch{return null;}}function detectPackageManager(_0x482a77){const _0x17b352=a91_0xa1cd89;if(existsSync(resolve(_0x482a77,'bun.lockb'))||existsSync(resolve(_0x482a77,_0x17b352(0x192))))return _0x17b352(0x1ab);if(existsSync(resolve(_0x482a77,_0x17b352(0x1a5))))return'pnpm';if(existsSync(resolve(_0x482a77,_0x17b352(0x1cf))))return _0x17b352(0x1cb);return _0x17b352(0x194);}async function versionCheck(_0x397b97){const _0x578700=a91_0xa1cd89,_0x1a6024=await checkCliVersion();if(_0x1a6024['needsUpgrade'])printCliUpgradeWarning(_0x1a6024);const _0x9f4067=await checkSdkVersion(_0x397b97);if(_0x9f4067[_0x578700(0x1c8)])printSdkUpgradeWarning(_0x9f4067);}function spawnScript(_0xb44cca,_0x4bc794,_0x578524,_0xe60223){return new Promise((_0x292a28,_0xc83dc)=>{const _0x481f58=a91_0x2fe5,_0x596d6f=[_0x481f58(0x1c5),_0x4bc794,..._0x578524],_0x2ae2da=spawn(_0xb44cca,_0x596d6f,{'cwd':_0xe60223,'stdio':_0x481f58(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0xe60223,_0x481f58(0x19c),'.bin')+delimiter+process.env.PATH}});_0x2ae2da['on'](_0x481f58(0x1a7),_0x142521=>{const _0x43ecf4=_0x481f58;if(_0x142521===0x0||_0x142521===null)_0x292a28();else _0xc83dc(new Error(_0xb44cca+_0x43ecf4(0x19e)+_0x4bc794+_0x43ecf4(0x1b3)+_0x142521));}),_0x2ae2da['on'](_0x481f58(0x1be),_0xc83dc);});}function a91_0x2fe5(_0x1b876f,_0x469c74){_0x1b876f=_0x1b876f-0x191;const _0x516858=a91_0x5168();let _0x2fe59c=_0x516858[_0x1b876f];return _0x2fe59c;}function spawnViteBuildWatch(_0x411b2e){return new Promise((_0x3e556b,_0x15b5ed)=>{const _0x3b3575=a91_0x2fe5,_0x1c753f=spawn(_0x3b3575(0x197),[_0x3b3575(0x1ac),'--watch'],{'cwd':_0x411b2e,'stdio':_0x3b3575(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x411b2e,_0x3b3575(0x19c),_0x3b3575(0x199))+delimiter+process.env.PATH}});_0x1c753f['on']('close',_0xd459dd=>{const _0x44263d=_0x3b3575;if(_0xd459dd===0x0||_0xd459dd===null)_0x3e556b();else _0x15b5ed(new Error(_0x44263d(0x1c0)+_0xd459dd));}),_0x1c753f['on'](_0x3b3575(0x1be),_0x15b5ed);});}function spawnVitePreview(_0x1e1c05){return new Promise((_0x37f737,_0x5b7d2d)=>{const _0xd4877f=a91_0x2fe5,_0x20dd6c=spawn(_0xd4877f(0x197),['preview'],{'cwd':_0x1e1c05,'stdio':_0xd4877f(0x1bb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1e1c05,_0xd4877f(0x19c),_0xd4877f(0x199))+delimiter+process.env.PATH}});_0x20dd6c['on']('close',_0x5ddc07=>{const _0x5d2346=_0xd4877f;if(_0x5ddc07===0x0||_0x5ddc07===null)_0x37f737();else _0x5b7d2d(new Error(_0x5d2346(0x1aa)+_0x5ddc07));}),_0x20dd6c['on'](_0xd4877f(0x1be),_0x5b7d2d);});}const runFlags=[{'name':a91_0xa1cd89(0x1b4),'type':a91_0xa1cd89(0x1a1),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':'run','command':a91_0xa1cd89(0x1c5),'description':'Run\x20a\x20package.json\x20script','risk':a91_0xa1cd89(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a91_0xa1cd89(0x191),'description':a91_0xa1cd89(0x1c4),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3f0723=a91_0xa1cd89,_0x52c50d=readPackageScripts(process[_0x3f0723(0x1c1)]()),_0x57295e=[];if(_0x52c50d&&Object[_0x3f0723(0x1a0)](_0x52c50d)[_0x3f0723(0x1b5)]>0x0){const _0x2eefae=Object[_0x3f0723(0x1a0)](_0x52c50d),_0x3d93b6=Math['max'](..._0x2eefae[_0x3f0723(0x1b8)](_0x122c2a=>_0x122c2a[_0x3f0723(0x1b5)]));_0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1bc));for(const [_0x15885d,_0x1e9ec2]of Object[_0x3f0723(0x1a2)](_0x52c50d)){_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x19e)+_0x15885d[_0x3f0723(0x1bd)](_0x3d93b6+0x2)+'#\x20'+_0x1e9ec2);}}else _0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1cc)),_0x57295e[_0x3f0723(0x1bf)](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x1c7)),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x195)),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+'\x20run\x20preview'),_0x57295e['push'](_0x3f0723(0x1c6)+CLI_BIN_NAME+_0x3f0723(0x1d0));return _0x57295e[_0x3f0723(0x1ae)]('\x0a');},async 'execute'(_0x590f49){const _0xa62464=a91_0xa1cd89,_0x35dff6=process[_0xa62464(0x1c1)](),_0xcc7dc8=_0x590f49['args'][0x0],_0x1584cf=_0x590f49[_0xa62464(0x19a)]['slice'](0x1),_0x3fef4a=readPackageScripts(_0x35dff6);if(!_0x3fef4a)throw CliErrors[_0xa62464(0x1a8)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0xcc7dc8){const _0xd3811d=Object[_0xa62464(0x1a0)](_0x3fef4a);if(_0xd3811d[_0xa62464(0x1b5)]===0x0)console[_0xa62464(0x1af)](_0xa62464(0x1cd));else{console[_0xa62464(0x1af)](_0xa62464(0x19d));const _0x1c2fc6=Math['max'](..._0xd3811d[_0xa62464(0x1b8)](_0x5847c8=>_0x5847c8[_0xa62464(0x1b5)]));for(const [_0x249604,_0x2ba7fa]of Object[_0xa62464(0x1a2)](_0x3fef4a)){console['log']('\x20\x20\x20\x20'+_0x249604[_0xa62464(0x1bd)](_0x1c2fc6+0x2)+_0x2ba7fa);}console[_0xa62464(0x1af)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0xa62464(0x1ca));}return{'ok':!![]};}if(!_0x3fef4a[_0xcc7dc8])throw CliErrors[_0xa62464(0x1a8)](_0xa62464(0x1ba)+_0xcc7dc8+_0xa62464(0x1b9),_0xa62464(0x1c9)+(Object[_0xa62464(0x1a0)](_0x3fef4a)[_0xa62464(0x1ae)](',\x20')||_0xa62464(0x1a3)));const _0x20c07=detectPackageManager(_0x35dff6);VERSION_CHECK_SCRIPTS[_0xa62464(0x19f)](_0xcc7dc8)&&await versionCheck(_0x35dff6);if(_0xcc7dc8==='preview'&&_0x590f49[_0xa62464(0x1ad)](_0xa62464(0x1b4)))return await Promise[_0xa62464(0x1b6)]([spawnViteBuildWatch(_0x35dff6),spawnVitePreview(_0x35dff6)]),{'ok':!![]};return await spawnScript(_0x20c07,_0xcc7dc8,_0x1584cf,_0x35dff6),{'ok':!![]};}};
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x39f6(_0x38cc16,_0x5dd1cc){_0x38cc16=_0x38cc16-0xfc;const _0x2dbee6=a92_0x2dbe();let _0x39f6c5=_0x2dbee6[_0x38cc16];return _0x39f6c5;}function a92_0x2dbe(){const _0x340c33=['14018TvjuQL','39942amAvjk','read','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','4033854QUAjtI','24515vpKuVJ','654789lfDWCI','309594nXmCQq','378eqEEKy','896008ZZrjzM','180TWsNxd'];a92_0x2dbe=function(){return _0x340c33;};return a92_0x2dbe();}const a92_0x515f5e=a92_0x39f6;(function(_0x14af31,_0x100cff){const _0x3a186b=a92_0x39f6,_0x248b8a=_0x14af31();while(!![]){try{const _0x31e0b6=-parseInt(_0x3a186b(0x103))/0x1+parseInt(_0x3a186b(0xfc))/0x2+parseInt(_0x3a186b(0x104))/0x3+-parseInt(_0x3a186b(0x107))/0x4*(-parseInt(_0x3a186b(0x102))/0x5)+parseInt(_0x3a186b(0xfd))/0x6*(parseInt(_0x3a186b(0x105))/0x7)+parseInt(_0x3a186b(0x106))/0x8+parseInt(_0x3a186b(0x101))/0x9;if(_0x31e0b6===_0x100cff)break;else _0x248b8a['push'](_0x248b8a['shift']());}catch(_0x762b47){_0x248b8a['push'](_0x248b8a['shift']());}}}(a92_0x2dbe,0x9171a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x3096a9){const _0x10b882=await buildSchemaPayload();return{'ok':!![],'data':_0x10b882};}export const schemaDefinition={'service':a92_0x515f5e(0x100),'command':'export','description':a92_0x515f5e(0xff),'risk':a92_0x515f5e(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a93_0x4c75(_0x572d6d,_0xb54fd8){_0x572d6d=_0x572d6d-0x10d;const _0x35d8b2=a93_0x35d8();let _0x4c75ef=_0x35d8b2[_0x572d6d];return _0x4c75ef;}const a93_0x301098=a93_0x4c75;(function(_0x4714ed,_0x2a969b){const _0x3e8c66=a93_0x4c75,_0x35a87b=_0x4714ed();while(!![]){try{const _0x50ecd8=parseInt(_0x3e8c66(0x11c))/0x1*(-parseInt(_0x3e8c66(0x119))/0x2)+parseInt(_0x3e8c66(0x115))/0x3*(-parseInt(_0x3e8c66(0x126))/0x4)+-parseInt(_0x3e8c66(0x117))/0x5*(parseInt(_0x3e8c66(0x10e))/0x6)+parseInt(_0x3e8c66(0x123))/0x7*(-parseInt(_0x3e8c66(0x111))/0x8)+parseInt(_0x3e8c66(0x122))/0x9*(parseInt(_0x3e8c66(0x10f))/0xa)+parseInt(_0x3e8c66(0x11a))/0xb+parseInt(_0x3e8c66(0x11e))/0xc;if(_0x50ecd8===_0x2a969b)break;else _0x35a87b['push'](_0x35a87b['shift']());}catch(_0x56ca32){_0x35a87b['push'](_0x35a87b['shift']());}}}(a93_0x35d8,0xb49ed));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a93_0x35d8(){const _0x177c0c=['unknown','19724184tYQYUU','lovrabet/rabetbase','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','Install\x20developer\x20skill\x20package','737946YnsyZp','2996lupjvd','skill','Check\x20network\x20connectivity\x20and\x20try\x20again.','3412kXNFth','\x20skill\x20installed','log','5579448LgHuWB','30LvPevA','install','17904FqkLEB','cwd','error','pipe','9WHMGee','skill-install','5uqdtQn','skipped','6bfSecX','13260731nsfnCn','../../skills/npx-skills-add.js','155011zBirUx'];a93_0x35d8=function(){return _0x177c0c;};return a93_0x35d8();}import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a93_0x301098(0x124),'command':a93_0x301098(0x110),'description':a93_0x301098(0x121),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x49c5c9){const _0x2d2a97=a93_0x301098;logger['setLogPath'](process[_0x2d2a97(0x112)]()),logger['info'](_0x2d2a97(0x116),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x5cd1a3}=await import(_0x2d2a97(0x11b)),_0x255eb5=_0x49c5c9['nonInteractive']?_0x2d2a97(0x114):'inherit';console[_0x2d2a97(0x10d)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x553810=_0x5cd1a3(process['cwd'](),_0x2d2a97(0x11f),{'stdio':_0x255eb5});if(_0x553810[_0x2d2a97(0x118)])console[_0x2d2a97(0x10d)](_0x2d2a97(0x120));else{if(_0x553810['ok'])console[_0x2d2a97(0x10d)](CLI_BIN_NAME+_0x2d2a97(0x127));else throw CliErrors['apiError']('npx\x20skills\x20add\x20failed:\x20'+(_0x553810[_0x2d2a97(0x113)]||_0x2d2a97(0x11d)),_0x2d2a97(0x125));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0x26bd(_0x936f7f,_0x3d9de8){_0x936f7f=_0x936f7f-0x1e1;const _0x227846=a94_0x2278();let _0x26bd48=_0x227846[_0x936f7f];return _0x26bd48;}const a94_0x1da972=a94_0x26bd;(function(_0x176ca8,_0x1f3f4b){const _0x1b43f1=a94_0x26bd,_0xab966=_0x176ca8();while(!![]){try{const _0x49676d=-parseInt(_0x1b43f1(0x1ec))/0x1*(parseInt(_0x1b43f1(0x1e9))/0x2)+parseInt(_0x1b43f1(0x1f1))/0x3+parseInt(_0x1b43f1(0x1f2))/0x4*(parseInt(_0x1b43f1(0x1f4))/0x5)+-parseInt(_0x1b43f1(0x1e7))/0x6*(parseInt(_0x1b43f1(0x1f5))/0x7)+parseInt(_0x1b43f1(0x1e3))/0x8+-parseInt(_0x1b43f1(0x1e5))/0x9*(-parseInt(_0x1b43f1(0x1e6))/0xa)+parseInt(_0x1b43f1(0x1f7))/0xb;if(_0x49676d===_0x1f3f4b)break;else _0xab966['push'](_0xab966['shift']());}catch(_0x4e36ee){_0xab966['push'](_0xab966['shift']());}}}(a94_0x2278,0xd135b));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a94_0x2278(){const _0x1d7dac=['read','bool','659BOYGOA','sqlName','boolean','verbose','str','2514162XPJSaS','1916hugNvs','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','1115KfUYAq','202916LptLeW','dbId','135432TbRfda','sqlContent','appCode','sql','5881304uyoBFe','description','5783634LBiQHJ','10YJUxvs','66JwHqII','sqlCode','3518KHyWMo'];a94_0x2278=function(){return _0x1d7dac;};return a94_0x2278();}export const sqlDetail={'service':a94_0x1da972(0x1e2),'command':'detail','description':a94_0x1da972(0x1f3),'risk':a94_0x1da972(0x1ea),'flags':[SQLCODE_FLAG,{'name':a94_0x1da972(0x1ef),'type':a94_0x1da972(0x1ee),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x1f441b){const _0x4bcd95=a94_0x1da972,_0x43eb54=await getSqlQueryInfo(_0x1f441b[_0x4bcd95(0x1e1)],_0x1f441b[_0x4bcd95(0x1f0)]('sqlcode')),_0x22328d=_0x1f441b[_0x4bcd95(0x1eb)]('verbose');if(_0x22328d)return{'ok':!![],'data':_0x43eb54};const _0x396ba1=_0x43eb54['dbId']?await getDbName(_0x1f441b[_0x4bcd95(0x1e1)],_0x43eb54[_0x4bcd95(0x1f6)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x43eb54[_0x4bcd95(0x1e8)],'sqlName':_0x43eb54[_0x4bcd95(0x1ed)],'db':_0x396ba1?_0x396ba1+'\x20('+_0x43eb54[_0x4bcd95(0x1f6)]+')':_0x43eb54['dbId']??'','description':_0x43eb54[_0x4bcd95(0x1e4)]??'','sqlContent':_0x43eb54[_0x4bcd95(0x1f8)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x1104(){const _0x30e98a=['\x20row(s)\x20in\x20','12323707fMfXat','4111390gLiiqu','validation','str','params','sqlcode','execResult','9cRkILZ','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','1853675RJryoJ','66XiJpxE','read','Returned\x20','3725634sfPcAk','14184WJxrIO','now','execSuccess','1472360YCUocG','1TNkJLb','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','length','SQL\x20execution\x20failed','1897rqBkpq','exec','Invalid\x20JSON\x20for\x20--params:\x20','string','118004LUWwiW','isArray'];a95_0x1104=function(){return _0x30e98a;};return a95_0x1104();}const a95_0x3fc7f5=a95_0x258d;(function(_0x478fd4,_0x32c3ed){const _0xcfb78b=a95_0x258d,_0x3e37b=_0x478fd4();while(!![]){try{const _0xd863c8=-parseInt(_0xcfb78b(0xa0))/0x1*(-parseInt(_0xcfb78b(0x9f))/0x2)+parseInt(_0xcfb78b(0xb5))/0x3*(parseInt(_0xcfb78b(0xa8))/0x4)+-parseInt(_0xcfb78b(0xb4))/0x5+parseInt(_0xcfb78b(0x9b))/0x6+-parseInt(_0xcfb78b(0xa4))/0x7*(parseInt(_0xcfb78b(0x9c))/0x8)+parseInt(_0xcfb78b(0xb2))/0x9*(parseInt(_0xcfb78b(0xac))/0xa)+-parseInt(_0xcfb78b(0xab))/0xb;if(_0xd863c8===_0x32c3ed)break;else _0x3e37b['push'](_0x3e37b['shift']());}catch(_0x5d6aad){_0x3e37b['push'](_0x3e37b['shift']());}}}(a95_0x1104,0x6cd1d));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a95_0x258d(_0x121351,_0x215f20){_0x121351=_0x121351-0x99;const _0x110418=a95_0x1104();let _0x258d0a=_0x110418[_0x121351];return _0x258d0a;}export const sqlExec={'service':'sql','command':a95_0x3fc7f5(0xa5),'description':a95_0x3fc7f5(0xa1),'risk':a95_0x3fc7f5(0x99),'flags':[SQLCODE_FLAG,{'name':'params','type':a95_0x3fc7f5(0xa7),'description':a95_0x3fc7f5(0xb3)}],async 'execute'(_0x2bab28){const _0x5701b2=a95_0x3fc7f5;let _0x4417c2;const _0xed554d=_0x2bab28[_0x5701b2(0xae)](_0x5701b2(0xaf));if(_0xed554d)try{_0x4417c2=JSON['parse'](_0xed554d);}catch{throw CliErrors[_0x5701b2(0xad)](_0x5701b2(0xa6)+_0xed554d);}const _0x245f38=Date[_0x5701b2(0x9d)](),_0xaa5d8=await executeSql(_0x2bab28['appCode'],_0x2bab28['str'](_0x5701b2(0xb0)),_0x4417c2),_0x2574d3=Date['now']()-_0x245f38,_0x21af17=_0xaa5d8?.[_0x5701b2(0xb1)]??_0xaa5d8,_0x3f6a81=_0xaa5d8?.[_0x5701b2(0x9e)]??!![];if(!_0x3f6a81)return{'ok':![],'data':{'error':_0xaa5d8?.['execError']||_0x5701b2(0xa3),'elapsed':_0x2574d3},'message':_0x5701b2(0xa3)};const _0x2ec914=Array[_0x5701b2(0xa9)](_0x21af17)?_0x21af17:[];return{'ok':!![],'data':{'rows':_0x2ec914,'rowCount':_0x2ec914[_0x5701b2(0xa2)],'elapsed':_0x2574d3},'message':_0x5701b2(0x9a)+_0x2ec914[_0x5701b2(0xa2)]+_0x5701b2(0xaa)+_0x2574d3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1966ed,_0x27fa14){const _0x15cbdb=a96_0xb6b5,_0x433caf=_0x1966ed();while(!![]){try{const _0x26a9ee=-parseInt(_0x15cbdb(0xc0))/0x1+parseInt(_0x15cbdb(0xbf))/0x2+-parseInt(_0x15cbdb(0xc5))/0x3+parseInt(_0x15cbdb(0xc4))/0x4*(parseInt(_0x15cbdb(0xc1))/0x5)+parseInt(_0x15cbdb(0xc6))/0x6+-parseInt(_0x15cbdb(0xc2))/0x7+parseInt(_0x15cbdb(0xc3))/0x8;if(_0x26a9ee===_0x27fa14)break;else _0x433caf['push'](_0x433caf['shift']());}catch(_0x5b2474){_0x433caf['push'](_0x433caf['shift']());}}}(a96_0x45c8,0x9d313));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';function a96_0xb6b5(_0x41d2b3,_0x2f89ff){_0x41d2b3=_0x41d2b3-0xbf;const _0x45c88a=a96_0x45c8();let _0xb6b508=_0x45c88a[_0x41d2b3];return _0xb6b508;}import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];function a96_0x45c8(){const _0x17900e=['1792406ULgQzV','573674NAhCeW','195ZdWJti','7997234zLdnhz','2285952niTwer','115084tQNbvu','938220sYwgrl','2212314KXkUog'];a96_0x45c8=function(){return _0x17900e;};return a96_0x45c8();}
|
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a97_0x1c03(_0x5d72ac,_0x4b1f5c){_0x5d72ac=_0x5d72ac-0x100;const _0x48a05d=a97_0x48a0();let _0x1c0387=_0x48a05d[_0x5d72ac];return _0x1c0387;}const a97_0x809ae6=a97_0x1c03;function a97_0x48a0(){const _0xfc7666=['read','list','all','3342402uVAzBK','108yCpflx','365018IXynoC','Found\x20','appCode','sqlcode','pagesize','map','length','\x20SQL\x20queries\x20(total:\x20','bool','Page\x20number','page','235470cNqHhu','List\x20custom\x20SQL\x20queries','Page\x20size','name','str','num','260748geTWsK','boolean','dbId','216uJeTMX','number','totalCount','sqlCode','string','310891eCOfAq','7erjGbO','4951296HgbfEJ','4012045BlyBkV','No\x20custom\x20SQL\x20queries\x20found.'];a97_0x48a0=function(){return _0xfc7666;};return a97_0x48a0();}(function(_0x282b4c,_0x1e70e4){const _0x42efa3=a97_0x1c03,_0x1dd8dc=_0x282b4c();while(!![]){try{const _0xb88571=parseInt(_0x42efa3(0x102))/0x1*(-parseInt(_0x42efa3(0x10b))/0x2)+parseInt(_0x42efa3(0x103))/0x3+parseInt(_0x42efa3(0x11c))/0x4+parseInt(_0x42efa3(0x104))/0x5+parseInt(_0x42efa3(0x109))/0x6+parseInt(_0x42efa3(0x101))/0x7*(-parseInt(_0x42efa3(0x11f))/0x8)+parseInt(_0x42efa3(0x10a))/0x9*(parseInt(_0x42efa3(0x116))/0xa);if(_0xb88571===_0x1e70e4)break;else _0x1dd8dc['push'](_0x1dd8dc['shift']());}catch(_0x1b710f){_0x1dd8dc['push'](_0x1dd8dc['shift']());}}}(a97_0x48a0,0xd7131));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':'sql','command':a97_0x809ae6(0x107),'description':a97_0x809ae6(0x117),'risk':a97_0x809ae6(0x106),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a97_0x809ae6(0x119),'type':a97_0x809ae6(0x100),'description':'Filter\x20by\x20SQL\x20name'},{'name':a97_0x809ae6(0x115),'type':a97_0x809ae6(0x120),'description':a97_0x809ae6(0x114),'default':0x1},{'name':a97_0x809ae6(0x10f),'type':a97_0x809ae6(0x120),'description':a97_0x809ae6(0x118)},{'name':'verbose','type':a97_0x809ae6(0x11d),'description':'Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content'}],async 'execute'(_0x358662){const _0x1b4e12=a97_0x809ae6,_0x2c0505=await listSqlQueries(_0x358662[_0x1b4e12(0x10d)],{'sqlCode':_0x358662['str'](_0x1b4e12(0x10e))||undefined,'sqlName':_0x358662[_0x1b4e12(0x11a)]('name')||undefined,'currentPage':_0x358662[_0x1b4e12(0x11b)](_0x1b4e12(0x115)),'pageSize':_0x358662[_0x1b4e12(0x11b)](_0x1b4e12(0x10f),0x32)}),_0x325da7=_0x358662[_0x1b4e12(0x113)]('verbose'),_0x2aaa12=_0x2c0505['tableData']??[],_0x17b433=_0x2c0505['paging']?.[_0x1b4e12(0x121)]??_0x2aaa12['length'];let _0x27ab18;return _0x325da7?_0x27ab18=_0x2aaa12:_0x27ab18=await Promise[_0x1b4e12(0x108)](_0x2aaa12[_0x1b4e12(0x110)](async _0x46bfe9=>{const _0x173248=_0x1b4e12;let _0x621853;try{_0x621853=_0x46bfe9[_0x173248(0x11e)]?await getDbName(_0x358662['appCode'],_0x46bfe9[_0x173248(0x11e)]):undefined;}catch{}return{'sqlCode':_0x46bfe9[_0x173248(0x122)],'sqlName':_0x46bfe9['sqlName'],'description':_0x46bfe9['description']??'','db':_0x621853?_0x621853+'\x20('+_0x46bfe9['dbId']+')':_0x46bfe9['dbId']??''};})),{'ok':!![],'data':_0x27ab18,'message':_0x2aaa12[_0x1b4e12(0x111)]===0x0?_0x1b4e12(0x105):_0x1b4e12(0x10c)+_0x2aaa12[_0x1b4e12(0x111)]+_0x1b4e12(0x112)+_0x17b433+').'};}};
|
package/lib/commands/sql/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x1e53eb=a98_0x2fe6;(function(_0x2767bf,_0x5a1003){const _0x455bb8=a98_0x2fe6,_0x5125df=_0x2767bf();while(!![]){try{const _0x2f5bbf=parseInt(_0x455bb8(0x94))/0x1*(parseInt(_0x455bb8(0x77))/0x2)+parseInt(_0x455bb8(0xa4))/0x3*(-parseInt(_0x455bb8(0x75))/0x4)+parseInt(_0x455bb8(0x81))/0x5+parseInt(_0x455bb8(0x98))/0x6+-parseInt(_0x455bb8(0x74))/0x7*(-parseInt(_0x455bb8(0x80))/0x8)+parseInt(_0x455bb8(0x79))/0x9+-parseInt(_0x455bb8(0xa3))/0xa;if(_0x2f5bbf===_0x5a1003)break;else _0x5125df['push'](_0x5125df['shift']());}catch(_0x12c344){_0x5125df['push'](_0x5125df['shift']());}}}(a98_0x103c,0x567af));import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';function a98_0x103c(){const _0x205480=['stdin','totalCount','3126582WzPSkM','stderr','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','push','yes','No\x20remote\x20SQL\x20queries\x20matched.','sqlcode','str','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','sqlContent','tableData','6973380hndsid','3OffxfT','length','unchanged','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','bool','\x20SQL\x20file(s)\x20under\x20','530726srqFNY','2388972MbAUQE','\x20written,\x20','81850TQAajM','name','2637306pQhVoY','pull','\x20error(s)).','message','boolean','utf8','sqlCode','48JviVPA','57200dhYEMy','includes','skipped','string','toLowerCase','cancelled','conflict','Would\x20pull\x20','close','local\x20differs\x20from\x20remote','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','force','nonInteractive','Pull\x20complete:\x20','would_pull','POST','question','sqlName','appCode','9mptLka','/smartapi/custom/queryUserCustomSqlList'];a98_0x103c=function(){return _0x205480;};return a98_0x103c();}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';function a98_0x2fe6(_0x19e590,_0x57c9d1){_0x19e590=_0x19e590-0x73;const _0x103c0e=a98_0x103c();let _0x2fe6da=_0x103c0e[_0x19e590];return _0x2fe6da;}const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x3fcce9,_0x46b035){const _0x1cdd27=a98_0x2fe6,_0x43930c=[];let _0x130cd3=0x1;while(!![]){const _0x501cec=await listSqlQueries(_0x3fcce9,{'currentPage':_0x130cd3,'pageSize':PAGE_SIZE,'sqlCode':_0x46b035[_0x1cdd27(0x7f)],'sqlName':_0x46b035[_0x1cdd27(0x92)]}),_0x474a9c=_0x501cec[_0x1cdd27(0xa2)]??[];_0x43930c['push'](..._0x474a9c);if(_0x474a9c[_0x1cdd27(0xa5)]===0x0)break;const _0x10619c=_0x501cec['paging']?.[_0x1cdd27(0x97)];if(_0x10619c!=null?_0x43930c['length']>=_0x10619c:_0x474a9c['length']<PAGE_SIZE)break;_0x130cd3++;}return _0x43930c;}async function ensureSqlContent(_0x12f517,_0x96f4c7){const _0x4e076e=a98_0x2fe6;if(_0x96f4c7[_0x4e076e(0xa1)]!=null&&String(_0x96f4c7[_0x4e076e(0xa1)])['length']>0x0)return _0x96f4c7;return getSqlQueryInfo(_0x12f517,_0x96f4c7['sqlCode']);}export const sqlPull={'service':'sql','command':a98_0x1e53eb(0x7a),'description':'Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','risk':'write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a98_0x1e53eb(0x84),'description':a98_0x1e53eb(0xa0)},{'name':a98_0x1e53eb(0x8c),'type':a98_0x1e53eb(0x7d),'description':'Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote'}],async 'dryRun'(_0x384bc4){const _0x3b3abb=a98_0x1e53eb,_0x25a3bd=findProjectRootDirectory(),_0x30f01d=resolveSqlLocalDir(_0x25a3bd),_0x2fd59f=_0x384bc4[_0x3b3abb(0x9f)](_0x3b3abb(0x9e))||undefined,_0x476bbf=_0x384bc4[_0x3b3abb(0x9f)](_0x3b3abb(0x78))||undefined,_0x160f29=await fetchAllSqlQueries(_0x384bc4[_0x3b3abb(0x93)],{'sqlCode':_0x2fd59f,'sqlName':_0x476bbf}),_0x1b2d74=[],_0x57d1ea=[];for(const _0x869770 of _0x160f29){try{_0x1b2d74[_0x3b3abb(0x9b)](await ensureSqlContent(_0x384bc4[_0x3b3abb(0x93)],_0x869770));}catch(_0x1f0072){_0x57d1ea[_0x3b3abb(0x9b)]({'sqlCode':_0x869770[_0x3b3abb(0x7f)],'error':_0x1f0072 instanceof Error?_0x1f0072['message']:String(_0x1f0072)});}}const _0x17ecd8=assignSqlFileNames(_0x1b2d74),_0x88113c=[];for(const [_0x48700d,_0x2f07e7]of _0x17ecd8){const _0x50daf2=join(_0x30f01d,_0x48700d),_0x197be4=buildPulledSqlFileContent(_0x2f07e7);let _0x26e0d2=_0x3b3abb(0x8f),_0x37217d;if(await fileExists(_0x50daf2)){const _0x2a0b1a=await readFile(_0x50daf2,_0x3b3abb(0x7e));_0x2a0b1a===_0x197be4?(_0x26e0d2=_0x3b3abb(0x83),_0x37217d=_0x3b3abb(0xa6)):(_0x26e0d2=_0x3b3abb(0x87),_0x37217d=_0x3b3abb(0xa7));}_0x88113c['push']({'sqlCode':_0x2f07e7[_0x3b3abb(0x7f)],'sqlName':_0x2f07e7['sqlName'],'filePath':_0x50daf2,'status':_0x26e0d2,'reason':_0x37217d});}return{'method':_0x3b3abb(0x90),'url':_0x3b3abb(0x95),'body':{'appCode':_0x384bc4[_0x3b3abb(0x93)],'sqlCode':_0x2fd59f??null,'sqlName':_0x476bbf??null,'loadErrors':_0x57d1ea,'files':_0x88113c},'description':_0x3b3abb(0x88)+_0x88113c[_0x3b3abb(0xa5)]+_0x3b3abb(0x73)+_0x30f01d};},async 'execute'(_0x170821){const _0x1a9520=a98_0x1e53eb,_0x256b51=findProjectRootDirectory(),_0x2f26c5=resolveSqlLocalDir(_0x256b51),_0x1a71cd=_0x170821[_0x1a9520(0x9f)]('sqlcode')||undefined,_0x33dc87=_0x170821[_0x1a9520(0x9f)]('name')||undefined,_0x52a7d3=_0x170821[_0x1a9520(0xa8)](_0x1a9520(0x8c)),_0x590b83=await fetchAllSqlQueries(_0x170821['appCode'],{'sqlCode':_0x1a71cd,'sqlName':_0x33dc87});if(_0x590b83[_0x1a9520(0xa5)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1a9520(0x9d)};const _0x4e07e4=[],_0x4ef0c2=[];for(const _0x1e2f9f of _0x590b83){try{_0x4e07e4[_0x1a9520(0x9b)](await ensureSqlContent(_0x170821[_0x1a9520(0x93)],_0x1e2f9f));}catch(_0x1a6690){_0x4ef0c2['push']({'sqlCode':_0x1e2f9f[_0x1a9520(0x7f)],'error':_0x1a6690 instanceof Error?_0x1a6690[_0x1a9520(0x7c)]:String(_0x1a6690)});}}if(_0x4e07e4[_0x1a9520(0xa5)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x4ef0c2},'message':_0x1a9520(0x8b)+_0x4ef0c2[_0x1a9520(0xa5)]+_0x1a9520(0x7b)};const _0x6ae284=assignSqlFileNames(_0x4e07e4);if(_0x52a7d3&&!_0x170821[_0x1a9520(0x8d)]){let _0x4c14e4=![];for(const [_0x595b8b,_0x5a43ca]of _0x6ae284){const _0x3e4055=join(_0x2f26c5,_0x595b8b),_0x35d6c8=buildPulledSqlFileContent(_0x5a43ca);if(await fileExists(_0x3e4055)){const _0x4266f2=await readFile(_0x3e4055,_0x1a9520(0x7e));if(_0x4266f2!==_0x35d6c8){_0x4c14e4=!![];break;}}}if(_0x4c14e4){const _0x489d21=await confirmForce();if(!_0x489d21)throw CliErrors[_0x1a9520(0x86)]('Force\x20pull\x20cancelled.');}}const _0x1ced77=[],_0x26eb8b=[];for(const [_0x50e9d3,_0x283837]of _0x6ae284){const _0x2b6b3e=join(_0x2f26c5,_0x50e9d3),_0x4228a6=buildPulledSqlFileContent(_0x283837);try{if(await fileExists(_0x2b6b3e)){const _0x53fcac=await readFile(_0x2b6b3e,_0x1a9520(0x7e));if(_0x53fcac===_0x4228a6){_0x26eb8b[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'reason':_0x1a9520(0xa6)});continue;}if(!_0x52a7d3){_0x26eb8b[_0x1a9520(0x9b)]({'sqlCode':_0x283837['sqlCode'],'reason':_0x1a9520(0x8a)});continue;}}await ensureParentDirectory(_0x2b6b3e),await writeFile(_0x2b6b3e,_0x4228a6,_0x1a9520(0x7e)),_0x1ced77[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'filePath':_0x2b6b3e});}catch(_0x492f3d){_0x4ef0c2[_0x1a9520(0x9b)]({'sqlCode':_0x283837[_0x1a9520(0x7f)],'error':_0x492f3d instanceof Error?_0x492f3d[_0x1a9520(0x7c)]:String(_0x492f3d)});}}const _0x5c894c=_0x4ef0c2[_0x1a9520(0xa5)]===0x0;return{'ok':_0x5c894c,'data':{'pulled':_0x1ced77,'skipped':_0x26eb8b,'failed':_0x4ef0c2},'message':_0x1a9520(0x8e)+_0x1ced77[_0x1a9520(0xa5)]+_0x1a9520(0x76)+_0x26eb8b[_0x1a9520(0xa5)]+'\x20skipped,\x20'+_0x4ef0c2[_0x1a9520(0xa5)]+'\x20failed'};}};async function confirmForce(){const _0x13c003=a98_0x1e53eb,_0x58a906=createInterface({'input':process[_0x13c003(0x96)],'output':process[_0x13c003(0x99)]}),_0x1da952=await new Promise(_0x263b94=>{const _0x352d36=_0x13c003;_0x58a906[_0x352d36(0x91)](_0x352d36(0x9a),_0x263b94);});return _0x58a906[_0x13c003(0x89)](),['y',_0x13c003(0x9c)][_0x13c003(0x82)](_0x1da952['trim']()[_0x13c003(0x85)]());}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x217d19=a99_0x190a;(function(_0x58ed87,_0x31348a){const _0x388edb=a99_0x190a,_0x5ac41f=_0x58ed87();while(!![]){try{const _0x4fd4ec=-parseInt(_0x388edb(0x1a3))/0x1+parseInt(_0x388edb(0x1aa))/0x2+parseInt(_0x388edb(0x1c0))/0x3*(parseInt(_0x388edb(0x1c1))/0x4)+parseInt(_0x388edb(0x1af))/0x5+parseInt(_0x388edb(0x1b4))/0x6*(-parseInt(_0x388edb(0x1bf))/0x7)+-parseInt(_0x388edb(0x1c2))/0x8+parseInt(_0x388edb(0x19f))/0x9*(parseInt(_0x388edb(0x1b5))/0xa);if(_0x4fd4ec===_0x31348a)break;else _0x5ac41f['push'](_0x5ac41f['shift']());}catch(_0xdb9674){_0x5ac41f['push'](_0x5ac41f['shift']());}}}(a99_0x1765,0x27dc1));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';function a99_0x190a(_0x7b9082,_0x280347){_0x7b9082=_0x7b9082-0x19b;const _0x176544=a99_0x1765();let _0x190a28=_0x176544[_0x7b9082];return _0x190a28;}import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a99_0x217d19(0x1bd),'command':a99_0x217d19(0x1b0),'description':a99_0x217d19(0x1a9),'risk':a99_0x217d19(0x1c5),'flags':[{'name':a99_0x217d19(0x1a6),'type':'string','required':!![],'description':a99_0x217d19(0x1b7)},SQLCODE_FLAG_OPTIONAL,{'name':'sqlname','type':a99_0x217d19(0x19c),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a99_0x217d19(0x19c),'description':a99_0x217d19(0x1bb)},{'name':a99_0x217d19(0x1a4),'type':a99_0x217d19(0x19c),'description':a99_0x217d19(0x1a8)}],async 'validate'(_0x58607a){const _0x355a78=a99_0x217d19,_0x5749da=resolve(process['cwd'](),_0x58607a[_0x355a78(0x1ce)](_0x355a78(0x1a6)));if(!existsSync(_0x5749da))throw CliErrors[_0x355a78(0x1ab)]('File\x20not\x20found:\x20'+_0x5749da);const _0x46b723=readFileSync(_0x5749da,'utf-8'),_0x7be365=validateSql(_0x46b723);if(!_0x7be365[_0x355a78(0x1ca)])throw CliErrors[_0x355a78(0x1ab)](_0x355a78(0x1a2)+_0x7be365['message']);},async 'dryRun'(_0x2c8829){const _0x211500=a99_0x217d19,_0x42a0bc=resolve(process[_0x211500(0x1b9)](),_0x2c8829['str'](_0x211500(0x1a6))),_0x4963d7=readFileSync(_0x42a0bc,_0x211500(0x1c3)),_0xa4f37e=validateSql(_0x4963d7),_0x29167c=_0x2c8829[_0x211500(0x1ce)]('db')||undefined,{db:_0xc17656,error:_0x3d8c30}=await resolveOneDb(_0x2c8829[_0x211500(0x1a7)],_0x29167c);return{'method':'POST','url':_0x211500(0x1b8),'body':{'appCode':_0x2c8829[_0x211500(0x1a7)],'sqlContent':'('+_0x4963d7[_0x211500(0x1be)]+_0x211500(0x1c7),'sqlCode':_0x2c8829[_0x211500(0x1ce)](_0x211500(0x19e))||undefined,'sqlName':_0x2c8829['str']('sqlname')||undefined,'db':_0xc17656?_0xc17656[_0x211500(0x1bc)]+'\x20('+_0xc17656[_0x211500(0x1a5)]+')':_0x3d8c30},'description':[_0x211500(0x1a1)+_0x2c8829[_0x211500(0x1ce)](_0x211500(0x1a6)),_0x211500(0x1cd)+_0xa4f37e['message'],'Type:\x20'+_0xa4f37e[_0x211500(0x1b6)][_0x211500(0x1b3)]+_0x211500(0x1c6)+(_0xa4f37e['tables']['join'](',\x20')||_0x211500(0x1cb))+_0x211500(0x1ba)+(_0xa4f37e['parameters'][_0x211500(0x1c9)](',\x20')||_0x211500(0x1c8))][_0x211500(0x1c9)]('\x0a')};},async 'execute'(_0x5e479c){const _0x384d9c=a99_0x217d19,_0x2d0a36=resolve(process[_0x384d9c(0x1b9)](),_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1a6))),_0xdf147c=readFileSync(_0x2d0a36,'utf-8'),_0x44e375=_0x5e479c[_0x384d9c(0x1ce)]('db')||undefined,{db:_0x480928,error:_0x165a7f}=await resolveOneDb(_0x5e479c[_0x384d9c(0x1a7)],_0x44e375);if(_0x165a7f)throw CliErrors['validation'](_0x165a7f);const _0x1e45a6=await saveSqlQuery({'appCode':_0x5e479c['appCode'],'sqlContent':_0xdf147c,'sqlCode':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x19e))||undefined,'sqlName':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1ad))||undefined,'dbId':_0x480928[_0x384d9c(0x1a5)],'description':_0x5e479c[_0x384d9c(0x1ce)](_0x384d9c(0x1a4))||undefined});if(_0x1e45a6[_0x384d9c(0x1a0)])return{'ok':![],'data':_0x1e45a6,'message':_0x1e45a6[_0x384d9c(0x1ae)]||_0x384d9c(0x19d)};return{'ok':!![],'data':{'sqlCode':_0x1e45a6[_0x384d9c(0x1b1)],'sqlName':_0x1e45a6[_0x384d9c(0x19b)],'action':_0x1e45a6[_0x384d9c(0x1cc)]},'message':(_0x1e45a6[_0x384d9c(0x1cc)]===_0x384d9c(0x1ac)?_0x384d9c(0x1b2):'Updated')+_0x384d9c(0x1c4)+(_0x1e45a6[_0x384d9c(0x1b1)]?'\x20('+_0x1e45a6['sqlCode']+')':'')};}};function a99_0x1765(){const _0x2f8817=['Path\x20to\x20the\x20SQL\x20file','/api/node-toolbox/sql/save','cwd','\x20|\x20Params:\x20','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','dbName','sql','length','1631aNWyCq','96grYWXD','13036STgTgn','1442496itfdWD','utf-8','\x20successfully','write','\x20|\x20Tables:\x20','\x20chars)','none','join','valid','N/A','action','Validation:\x20','str','sqlName','string','Conflict\x20detected','sqlcode','118620ZxTPld','blocked','Save\x20SQL\x20query\x20from\x20','SQL\x20validation\x20failed:\x20','292472bnFnSc','description','dbId','file','appCode','SQL\x20query\x20description','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','341216wbTbWv','validation','created','sqlname','message','4255gdnQwy','save','sqlCode','Created','type','5316kZiQaM','430vnzWub','sqlType'];a99_0x1765=function(){return _0x2f8817;};return a99_0x1765();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x3f5e5b=a100_0x305a;(function(_0x3770eb,_0x255452){const _0x11d0ca=a100_0x305a,_0x56591e=_0x3770eb();while(!![]){try{const _0x45834a=-parseInt(_0x11d0ca(0x210))/0x1*(parseInt(_0x11d0ca(0x1fa))/0x2)+parseInt(_0x11d0ca(0x20d))/0x3*(-parseInt(_0x11d0ca(0x204))/0x4)+parseInt(_0x11d0ca(0x201))/0x5*(-parseInt(_0x11d0ca(0x20b))/0x6)+parseInt(_0x11d0ca(0x1f9))/0x7+parseInt(_0x11d0ca(0x211))/0x8*(parseInt(_0x11d0ca(0x1f8))/0x9)+parseInt(_0x11d0ca(0x1fe))/0xa+-parseInt(_0x11d0ca(0x209))/0xb*(-parseInt(_0x11d0ca(0x1f7))/0xc);if(_0x45834a===_0x255452)break;else _0x56591e['push'](_0x56591e['shift']());}catch(_0x3b0bdc){_0x56591e['push'](_0x56591e['shift']());}}}(a100_0x5473,0xd296e));import{join}from'node:path';function a100_0x5473(){const _0x931290=['set','.sql','sqlCode','--\x20@lovrabet.description:','11SueFsR','.rabetbase/sql','6UZNVSZ','unnamed','6375CihNUV','unknown','has','509437QXCRmg','8PriKQR','--\x20@lovrabet.sqlCode:\x20','replace','endsWith','20761104qqRdUd','893259zcfUEE','9291961RMqJzU','2CprFJB','trimEnd','--\x20@lovrabet.sqlName:\x20','sqlName','1677710mfBJJu','description','join','8115755nXKrTx','trim','sqlContent','620PgtwZD'];a100_0x5473=function(){return _0x931290;};return a100_0x5473();}function a100_0x305a(_0xa4d4cc,_0x6bef6b){_0xa4d4cc=_0xa4d4cc-0x1f4;const _0x547326=a100_0x5473();let _0x305a37=_0x547326[_0xa4d4cc];return _0x305a37;}export const SQL_LOCAL_REL_DIR=a100_0x3f5e5b(0x20a);export function resolveSqlLocalDir(_0x3631d8){return join(_0x3631d8,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x53e2ac){const _0x36c20e=a100_0x3f5e5b,_0x64a28b=_0x53e2ac[_0x36c20e(0x202)]()||'unnamed',_0x37675c=_0x64a28b[_0x36c20e(0x1f5)](/[/\\?%*:|"<>]/g,'_')[_0x36c20e(0x1f5)](/\s+/g,'_')[_0x36c20e(0x1f5)](/_+/g,'_');return _0x37675c||_0x36c20e(0x20c);}export function assignSqlFileNames(_0x453688){const _0x152bd7=a100_0x3f5e5b,_0x4e3f27=new Map();for(const _0x352e70 of _0x453688){const _0x4251f=safeSqlFileBaseName(_0x352e70[_0x152bd7(0x1fd)]??'unnamed');let _0x2e3d12=_0x4251f+_0x152bd7(0x206);if(_0x4e3f27['has'](_0x2e3d12)){const _0x15f749=(_0x352e70[_0x152bd7(0x207)]??_0x152bd7(0x20e))[_0x152bd7(0x1f5)](/-/g,'');_0x2e3d12=_0x4251f+'__'+_0x15f749+'.sql';}let _0x15065e=0x0,_0x2b741e=_0x2e3d12;while(_0x4e3f27[_0x152bd7(0x20f)](_0x2b741e)){_0x15065e++,_0x2b741e=_0x4251f+'__'+_0x15065e+_0x152bd7(0x206);}_0x4e3f27[_0x152bd7(0x205)](_0x2b741e,_0x352e70);}return _0x4e3f27;}export function buildPulledSqlFileContent(_0xcaca2c){const _0x468da0=a100_0x3f5e5b,_0x5602bb=_0xcaca2c[_0x468da0(0x1fd)]??_0x468da0(0x20c),_0x26a021=_0xcaca2c[_0x468da0(0x207)]??'',_0x402282=(_0xcaca2c[_0x468da0(0x1ff)]??'')[_0x468da0(0x1f5)](/\r?\n/g,'\x20')[_0x468da0(0x202)](),_0xf38979=_0xcaca2c[_0x468da0(0x203)]??'',_0x1d4bf9=[_0x468da0(0x1fc)+_0x5602bb,_0x468da0(0x1f4)+_0x26a021,_0x468da0(0x208)+(_0x402282?'\x20'+_0x402282:''),'',_0xf38979[_0x468da0(0x1fb)]()],_0x300bf0=_0x1d4bf9[_0x468da0(0x200)]('\x0a');return _0x300bf0[_0x468da0(0x1f6)]('\x0a')?_0x300bf0:_0x300bf0+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a101_0x49b3(){const _0x54a205=['sqlType','schema:','map','length','2288892JoMlml','file','valid','filter','string','message','from','834297fgdTot','str','push','\x22\x20not\x20found\x20or\x20not\x20accessible','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','cwd','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','toLowerCase','fields','1663834asNNcZ','isArray','size','trim','reason','Dataset\x20\x22','2589921zifWrH','tableName','dbtableConfig','schemas','validation','sql','tables','Provide\x20--file\x20or\x20--sql','1229380CaYhLE','type','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','238DAYdnr','32952uVgrnl','2677216FTcUiG','appCode','schemaWarnings','utf-8','read'];a101_0x49b3=function(){return _0x54a205;};return a101_0x49b3();}const a101_0x217620=a101_0x12c1;function a101_0x12c1(_0x2b7cb3,_0x3173fa){_0x2b7cb3=_0x2b7cb3-0x10b;const _0x49b3ed=a101_0x49b3();let _0x12c17e=_0x49b3ed[_0x2b7cb3];return _0x12c17e;}(function(_0x106a0e,_0x3c8ddf){const _0x5c269e=a101_0x12c1,_0x3e79c5=_0x106a0e();while(!![]){try{const _0x42a3ae=-parseInt(_0x5c269e(0x12a))/0x1+-parseInt(_0x5c269e(0x133))/0x2+parseInt(_0x5c269e(0x10d))/0x3+parseInt(_0x5c269e(0x123))/0x4+parseInt(_0x5c269e(0x115))/0x5+-parseInt(_0x5c269e(0x119))/0x6*(-parseInt(_0x5c269e(0x118))/0x7)+parseInt(_0x5c269e(0x11a))/0x8;if(_0x42a3ae===_0x3c8ddf)break;else _0x3e79c5['push'](_0x3e79c5['shift']());}catch(_0x450dc4){_0x3e79c5['push'](_0x3e79c5['shift']());}}}(a101_0x49b3,0x82ffc));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':a101_0x217620(0x112),'command':'validate','description':a101_0x217620(0x117),'risk':a101_0x217620(0x11e),'flags':[{'name':'file','type':a101_0x217620(0x127),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':'sql','type':'string','description':a101_0x217620(0x130)},{'name':a101_0x217620(0x110),'type':a101_0x217620(0x127),'description':a101_0x217620(0x12e)}],async 'execute'(_0x3b8ec8){const _0x354c7c=a101_0x217620,_0x6bc274=_0x3b8ec8[_0x354c7c(0x12b)](_0x354c7c(0x124)),_0x2c898a=_0x3b8ec8[_0x354c7c(0x12b)]('sql');if(!_0x6bc274&&!_0x2c898a)throw CliErrors['flagMissing']('file',_0x354c7c(0x114));let _0x114f2c;if(_0x6bc274){const _0x8a7db7=resolve(process[_0x354c7c(0x12f)](),_0x6bc274);if(!existsSync(_0x8a7db7))throw CliErrors[_0x354c7c(0x111)]('File\x20not\x20found:\x20'+_0x8a7db7);_0x114f2c=readFileSync(_0x8a7db7,_0x354c7c(0x11d));}else _0x114f2c=_0x2c898a;const _0x2ab644=validateSql(_0x114f2c),_0x354574={'valid':_0x2ab644[_0x354c7c(0x125)],'sqlType':_0x2ab644[_0x354c7c(0x11f)][_0x354c7c(0x116)],'isSelectOnly':_0x2ab644['sqlType']['isSelectOnly'],'isDangerous':_0x2ab644[_0x354c7c(0x11f)]['isDangerous'],'tables':_0x2ab644[_0x354c7c(0x113)],'parameters':_0x2ab644['parameters'],'message':_0x2ab644[_0x354c7c(0x128)]};_0x2ab644['sqlType'][_0x354c7c(0x10b)]&&(_0x354574[_0x354c7c(0x10b)]=_0x2ab644[_0x354c7c(0x11f)][_0x354c7c(0x10b)]);const _0x346e52=_0x3b8ec8[_0x354c7c(0x12b)](_0x354c7c(0x110));if(_0x346e52&&_0x2ab644[_0x354c7c(0x125)]){const _0x113723=_0x346e52['split'](',')['map'](_0x2db8d8=>_0x2db8d8[_0x354c7c(0x136)]())[_0x354c7c(0x126)](Boolean),_0x3f3308=[],_0x31e394=await listDatasets(_0x3b8ec8[_0x354c7c(0x11b)]),_0x129d76=new Map(_0x31e394[_0x354c7c(0x121)](_0x4f9460=>[_0x4f9460['dbtableConfig']?.['tableName']?.[_0x354c7c(0x131)](),_0x4f9460]));for(const _0x13be61 of _0x2ab644[_0x354c7c(0x113)]){const _0x300850=_0x129d76['get'](_0x13be61['toLowerCase']());!_0x300850&&_0x3f3308[_0x354c7c(0x12c)]('Table\x20\x22'+_0x13be61+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x5dafa6 of _0x113723){try{const _0x4885b4=await getDatasetDetail(_0x5dafa6),_0x16f8c9=Array[_0x354c7c(0x134)](_0x4885b4[_0x354c7c(0x132)])?_0x4885b4['fields']:[],_0x25f116=new Set(_0x16f8c9[_0x354c7c(0x121)](_0x493964=>_0x493964['name']?.['toLowerCase']())),_0x5ecead=_0x4885b4[_0x354c7c(0x10f)]?.[_0x354c7c(0x10e)]||_0x4885b4['tableName']||_0x5dafa6;_0x354574[_0x354c7c(0x120)+_0x5ecead]={'code':_0x5dafa6,'tableName':_0x5ecead,'fieldCount':_0x25f116[_0x354c7c(0x135)],'fields':Array[_0x354c7c(0x129)](_0x25f116)};}catch{_0x3f3308[_0x354c7c(0x12c)](_0x354c7c(0x10c)+_0x5dafa6+_0x354c7c(0x12d));}}_0x3f3308[_0x354c7c(0x122)]>0x0&&(_0x354574[_0x354c7c(0x11c)]=_0x3f3308);}return{'ok':_0x2ab644[_0x354c7c(0x125)],'data':_0x354574,'message':_0x2ab644['message']};}};
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x47eeb6=a102_0x3099;(function(_0x40b235,_0x58dd7a){const _0x367fd8=a102_0x3099,_0x5eb90f=_0x40b235();while(!![]){try{const _0x229ebd=-parseInt(_0x367fd8(0xe4))/0x1+-parseInt(_0x367fd8(0xd0))/0x2*(parseInt(_0x367fd8(0xd2))/0x3)+-parseInt(_0x367fd8(0xc8))/0x4+-parseInt(_0x367fd8(0x99))/0x5+parseInt(_0x367fd8(0x9a))/0x6*(parseInt(_0x367fd8(0xbd))/0x7)+parseInt(_0x367fd8(0x9f))/0x8*(parseInt(_0x367fd8(0x8f))/0x9)+parseInt(_0x367fd8(0xd5))/0xa;if(_0x229ebd===_0x58dd7a)break;else _0x5eb90f['push'](_0x5eb90f['shift']());}catch(_0x5e2eb0){_0x5eb90f['push'](_0x5eb90f['shift']());}}}(a102_0x2a1e,0x397ee));export const CLI_BIN_NAME=a102_0x47eeb6(0xa8);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';function a102_0x3099(_0x254406,_0x984eeb){_0x254406=_0x254406-0x86;const _0x2a1e61=a102_0x2a1e();let _0x3099c2=_0x2a1e61[_0x254406];return _0x3099c2;}export const NPM_PACKAGE_NAME=a102_0x47eeb6(0xb3);export const GLOBAL_FLAGS=[{'name':a102_0x47eeb6(0xba),'meowKey':'appcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcb),'hint':a102_0x47eeb6(0xbc)},{'name':a102_0x47eeb6(0xa3),'meowKey':'app','type':'string','description':a102_0x47eeb6(0x96),'hint':a102_0x47eeb6(0xd7)},{'name':a102_0x47eeb6(0xb0),'meowKey':'env','type':a102_0x47eeb6(0x8d),'description':'Environment','hint':'production\x20|\x20daily'},{'name':a102_0x47eeb6(0xda),'meowKey':a102_0x47eeb6(0xda),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x87),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xd3),'hint':a102_0x47eeb6(0xd8)},{'name':a102_0x47eeb6(0xb2),'meowKey':a102_0x47eeb6(0xca),'type':'boolean','description':a102_0x47eeb6(0xc4)},{'name':'yes','meowKey':'yes','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xbf)},{'name':a102_0x47eeb6(0x92),'meowKey':'nonInteractive','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0x94)},{'name':'global','meowKey':a102_0x47eeb6(0xe3),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0x91)},{'name':a102_0x47eeb6(0xc2),'meowKey':a102_0x47eeb6(0xc2),'type':'boolean','description':a102_0x47eeb6(0xdd)},{'name':'ci','meowKey':'ci','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xbe),'hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':a102_0x47eeb6(0xc7)},{'name':'name','meowKey':a102_0x47eeb6(0x8b),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xab),'hidden':!![]},{'name':a102_0x47eeb6(0xb9),'meowKey':a102_0x47eeb6(0xb9),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xd6),'hidden':!![]},{'name':a102_0x47eeb6(0x86),'meowKey':'watch','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xde),'hidden':!![]},{'name':a102_0x47eeb6(0xaa),'meowKey':'output','type':a102_0x47eeb6(0x8d),'description':'Output\x20path','hidden':!![]},{'name':a102_0x47eeb6(0xb8),'meowKey':a102_0x47eeb6(0xb8),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc9),'hidden':!![]},{'name':a102_0x47eeb6(0xc3),'meowKey':'datasetcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x9d),'hidden':!![]},{'name':'all','meowKey':a102_0x47eeb6(0x89),'type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xdc),'hidden':!![]},{'name':a102_0x47eeb6(0xe2),'meowKey':'enableBffSave','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xae),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a102_0x47eeb6(0xc6),'hidden':!![]},{'name':a102_0x47eeb6(0xcc),'meowKey':a102_0x47eeb6(0xcc),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc1),'hidden':!![]},{'name':a102_0x47eeb6(0xd4),'meowKey':'file','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc0),'hidden':!![]},{'name':a102_0x47eeb6(0xdf),'meowKey':'sqlcode','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xce),'hidden':!![]},{'name':a102_0x47eeb6(0x97),'meowKey':a102_0x47eeb6(0x97),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xc5),'hidden':!![]},{'name':a102_0x47eeb6(0x98),'meowKey':a102_0x47eeb6(0x98),'type':a102_0x47eeb6(0x8d),'description':'DB\x20ID','hidden':!![]},{'name':a102_0x47eeb6(0xa4),'meowKey':'description','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xad),'hidden':!![]},{'name':'page','meowKey':a102_0x47eeb6(0xb4),'type':a102_0x47eeb6(0x8d),'description':'Page\x20number','hidden':!![]},{'name':a102_0x47eeb6(0x8e),'meowKey':a102_0x47eeb6(0x8e),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xb1),'hidden':!![]},{'name':a102_0x47eeb6(0x8a),'meowKey':a102_0x47eeb6(0x8a),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcf),'hidden':!![]},{'name':'code','meowKey':a102_0x47eeb6(0x93),'type':'string','description':a102_0x47eeb6(0xd1),'hidden':!![]},{'name':a102_0x47eeb6(0xac),'meowKey':a102_0x47eeb6(0xac),'type':'string','description':a102_0x47eeb6(0x8c),'hidden':!![]},{'name':a102_0x47eeb6(0xa6),'meowKey':a102_0x47eeb6(0xa6),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xa1),'hidden':!![]},{'name':a102_0x47eeb6(0xa2),'meowKey':'operation','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcd),'hidden':!![]},{'name':a102_0x47eeb6(0xb7),'meowKey':a102_0x47eeb6(0xb7),'type':'string','description':a102_0x47eeb6(0xa9),'hidden':!![]},{'name':a102_0x47eeb6(0xbb),'meowKey':a102_0x47eeb6(0xe0),'type':a102_0x47eeb6(0x9b),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a102_0x47eeb6(0xd9),'meowKey':'key','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0x9e),'hidden':!![]},{'name':a102_0x47eeb6(0xdb),'meowKey':a102_0x47eeb6(0xdb),'type':a102_0x47eeb6(0x8d),'description':'Config\x20value','hidden':!![]},{'name':a102_0x47eeb6(0x90),'meowKey':a102_0x47eeb6(0x90),'type':'boolean','description':a102_0x47eeb6(0x95),'hidden':!![]},{'name':a102_0x47eeb6(0xb5),'meowKey':'remote','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xe1),'hidden':!![]},{'name':a102_0x47eeb6(0xa5),'meowKey':'verbose','type':a102_0x47eeb6(0x9b),'description':a102_0x47eeb6(0xaf),'hidden':!![]},{'name':a102_0x47eeb6(0xa7),'meowKey':'operationType','type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xcd),'hidden':!![]},{'name':a102_0x47eeb6(0x9c),'meowKey':a102_0x47eeb6(0xb6),'type':a102_0x47eeb6(0x8d),'description':a102_0x47eeb6(0xa0),'hidden':!![]}];function a102_0x2a1e(){const _0x53ef01=['output','Name','sql','Description','Enable\x20BFF\x20save','Verbose\x20output','env','Page\x20size','dry-run','@lovrabet/rabetbase-cli','page','remote','functionNode','target','params','clear','appcode','skip-imports','<code>','214151cixfXe','Alias\x20for\x20--non-interactive','Skip\x20confirmation\x20for\x20high-risk\x20writes','File\x20path','Type\x20filter','project','datasetcode','Preview\x20operation\x20without\x20executing','SQL\x20name','Record\x20ID','Show\x20help','1504136brAZJI','JSON\x20params','dryRun','Override\x20appcode','type','Operation\x20type','SQL\x20code','Keyword\x20filter','40382IcIOHU','Code\x20filter','3yDVOsu','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','file','8586540qjbzNn','Clear','<name>','<expr>','key','format','value','Apply\x20to\x20all','Use\x20project\x20config\x20scope','Watch\x20mode','sqlcode','skipImports','Use\x20remote','enable-bff-save','global','178070JeTyiA','watch','Output\x20format','meowKey','all','keyword','name','SQL\x20string','string','pagesize','497997EOTwUg','force','Use\x20global\x20config\x20scope','non-interactive','code','Force\x20non-interactive\x20mode\x20(CI)','Force\x20overwrite','Select\x20app\x20profile\x20by\x20name','sqlname','dbid','673915sPwwee','6JvspkN','boolean','function-node','Dataset\x20code','Config\x20key','8hJcRVQ','Function\x20node','Schemas','operation','app','description','verbose','schemas','operation-type','rabetbase','Target\x20path'];a102_0x2a1e=function(){return _0x53ef01;};return a102_0x2a1e();}export function buildMeowFlags(){const _0x13dd17=a102_0x47eeb6;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x3f19da=>[_0x3f19da[_0x13dd17(0x88)],{'type':_0x3f19da['type']}]));}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x4f5d(){const _0x7a833a=['2427805kLpnwq','8bZiPnY','https://daily-runtime.lovrabet.com','7659281VNIHTI','2rsSISz','2893GHQEeD','6684576hXJLkb','https://daily-api.lovrabet.com','userDomain','https://user.lovrabet.com','6NCJQIp','https://user-daily.lovrabet.com','63620LhsHTP','1051200jhUbDw','https://api.lovrabet.com','10431000rKyEyn','948254MTPJUb'];a103_0x4f5d=function(){return _0x7a833a;};return a103_0x4f5d();}const a103_0x14ae0c=a103_0x42b0;(function(_0x562264,_0x537fcb){const _0x332125=a103_0x42b0,_0x21e44e=_0x562264();while(!![]){try{const _0x1b44ec=parseInt(_0x332125(0xee))/0x1*(parseInt(_0x332125(0xf3))/0x2)+parseInt(_0x332125(0xeb))/0x3*(-parseInt(_0x332125(0xf0))/0x4)+-parseInt(_0x332125(0xef))/0x5+-parseInt(_0x332125(0xe8))/0x6*(parseInt(_0x332125(0xf2))/0x7)+-parseInt(_0x332125(0xf5))/0x8+parseInt(_0x332125(0xed))/0x9+-parseInt(_0x332125(0xea))/0xa*(-parseInt(_0x332125(0xf4))/0xb);if(_0x1b44ec===_0x537fcb)break;else _0x21e44e['push'](_0x21e44e['shift']());}catch(_0x5df476){_0x21e44e['push'](_0x21e44e['shift']());}}}(a103_0x4f5d,0xa2318));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2d2385){const _0x17f858=a103_0x42b0;customApiDomain=_0x2d2385?.['apiDomain'],customUserDomain=_0x2d2385?.[_0x17f858(0xf7)],customRuntimeDomain=_0x2d2385?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a103_0x14ae0c(0xe7):a103_0x14ae0c(0xe9));function a103_0x42b0(_0x45d8e5,_0x5752a6){_0x45d8e5=_0x45d8e5-0xe7;const _0x4f5d6a=a103_0x4f5d();let _0x42b079=_0x4f5d6a[_0x45d8e5];return _0x42b079;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a103_0x14ae0c(0xec):a103_0x14ae0c(0xf6));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a103_0x14ae0c(0xf1));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a104_0x548b(_0x37bcab,_0x286b55){_0x37bcab=_0x37bcab-0x14e;const _0x2b80b7=a104_0x2b80();let _0x548bc3=_0x2b80b7[_0x37bcab];return _0x548bc3;}const a104_0x17d00a=a104_0x548b;(function(_0x22f742,_0x295441){const _0x760b73=a104_0x548b,_0xccf654=_0x22f742();while(!![]){try{const _0x4b8dd2=-parseInt(_0x760b73(0x155))/0x1*(-parseInt(_0x760b73(0x14f))/0x2)+-parseInt(_0x760b73(0x158))/0x3*(parseInt(_0x760b73(0x154))/0x4)+-parseInt(_0x760b73(0x15c))/0x5+-parseInt(_0x760b73(0x157))/0x6*(-parseInt(_0x760b73(0x156))/0x7)+parseInt(_0x760b73(0x152))/0x8+-parseInt(_0x760b73(0x159))/0x9+parseInt(_0x760b73(0x14e))/0xa;if(_0x4b8dd2===_0x295441)break;else _0xccf654['push'](_0xccf654['shift']());}catch(_0x18b4c9){_0xccf654['push'](_0xccf654['shift']());}}}(a104_0x2b80,0xc623d));export function normalizeEnv(_0x5cd3e1){const _0x3c7577=a104_0x548b;return _0x5cd3e1===_0x3c7577(0x153)?_0x3c7577(0x15a):_0x5cd3e1;}export function isProduction(_0x5a371a){const _0x2bf22d=a104_0x548b;return normalizeEnv(_0x5a371a)===_0x2bf22d(0x15a);}export function isDaily(_0x192f14){const _0x1da93d=a104_0x548b;return normalizeEnv(_0x192f14)===_0x1da93d(0x150);}export function isDev(_0x42079b){const _0x58f3df=a104_0x548b,_0x1f10df=normalizeEnv(_0x42079b);return _0x1f10df===_0x58f3df(0x151)||_0x1f10df===_0x58f3df(0x15b);}function a104_0x2b80(){const _0x393004=['2811472FzguJf','online','4jKOpuv','31643DPQFII','28GFIjnt','661116HUeqJU','3328734QuiGTG','11920347AaxOOo','production','dev','946095GJPztF','12820340FYeppm','86hRZOdw','daily','development'];a104_0x2b80=function(){return _0x393004;};return a104_0x2b80();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a104_0x17d00a(0x15a));export function getEnv(){return env;}export function initEnv(_0x255b15){env=normalizeEnv(_0x255b15);}
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x31794b=a105_0x22af;(function(_0x1d1aa7,_0x2b1d4e){const _0x463eb3=a105_0x22af,_0x338891=_0x1d1aa7();while(!![]){try{const _0x25644a=-parseInt(_0x463eb3(0xa4))/0x1*(parseInt(_0x463eb3(0xab))/0x2)+-parseInt(_0x463eb3(0xa9))/0x3*(parseInt(_0x463eb3(0xa8))/0x4)+parseInt(_0x463eb3(0xa7))/0x5+parseInt(_0x463eb3(0xac))/0x6*(-parseInt(_0x463eb3(0xae))/0x7)+parseInt(_0x463eb3(0xaa))/0x8+parseInt(_0x463eb3(0xb0))/0x9*(parseInt(_0x463eb3(0xaf))/0xa)+-parseInt(_0x463eb3(0xa5))/0xb*(-parseInt(_0x463eb3(0xad))/0xc);if(_0x25644a===_0x2b1d4e)break;else _0x338891['push'](_0x338891['shift']());}catch(_0x579814){_0x338891['push'](_0x338891['shift']());}}}(a105_0x3ccb,0xe2a5c));function a105_0x22af(_0x45d11d,_0x35c7fc){_0x45d11d=_0x45d11d-0xa4;const _0x3ccb26=a105_0x3ccb();let _0x22afc5=_0x3ccb26[_0x45d11d];return _0x22afc5;}export const DEFAULT_API_DIR=a105_0x31794b(0xa6);function a105_0x3ccb(){const _0x4238e1=['1936DGHQHt','./src/api','6521785ugpLpl','4kuMrtV','1169667LFKtrG','2943032EGAnct','31718PrHvaa','100692GQcKED','167244syGFtt','763MAkshl','30WHVnON','2205297oqeGxl','108xfclmh'];a105_0x3ccb=function(){return _0x4238e1;};return a105_0x3ccb();}
|