@lovrabet/rabetbase-cli 2.3.2-beta.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.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/generate.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/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.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/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.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/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.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/sql/create.js +1 -1
- package/lib/commands/sql/delete.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/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.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-alias.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/telemetry/send-platform-issue-collect-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/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.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/params.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/update-notice.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 -1
- package/package.json +1 -1
package/lib/commands/sql/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a138_0x992a5d=a138_0x56dc;(function(_0xabb1ca,_0x1d0ade){const _0x219c6f=a138_0x56dc,_0x55f2e9=_0xabb1ca();while(!![]){try{const _0x474287=parseInt(_0x219c6f(0xca))/0x1+-parseInt(_0x219c6f(0xa1))/0x2*(parseInt(_0x219c6f(0xa0))/0x3)+-parseInt(_0x219c6f(0x9f))/0x4+-parseInt(_0x219c6f(0xa4))/0x5*(-parseInt(_0x219c6f(0xa8))/0x6)+parseInt(_0x219c6f(0xb1))/0x7+parseInt(_0x219c6f(0xb2))/0x8*(parseInt(_0x219c6f(0xb6))/0x9)+-parseInt(_0x219c6f(0xcf))/0xa*(parseInt(_0x219c6f(0xa3))/0xb);if(_0x474287===_0x1d0ade)break;else _0x55f2e9['push'](_0x55f2e9['shift']());}catch(_0xca767d){_0x55f2e9['push'](_0x55f2e9['shift']());}}}(a138_0x4a37,0xb7f8c));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';function a138_0x4a37(){const _0x5a30c6=['toISOString','str','\x20failed','Local\x20SQL\x20not\x20found:\x20','\x20pushed,\x20','exec','relativePath','get','projectRoot','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','3307756BgLeui','1204899ZEFpnR','4iHOjgm','trashDir','22EmAkJx','100SJyLVd','sqlName','\x22\x20for\x20sqlCode\x20','dbName','53466GtPeUM','entries','utf8','sqlcode','mode','sqls','unchanged','/smartapi/custom/updateUserCustomSql','Would\x20push\x20','9598162yfBpLW','8Hwmrdi','Local\x20directory\x20\x22','length','bool','3342537xUcjNw','hash','No\x20database\x20matches\x20local\x20directory\x20\x22','validation','\x20SQL\x20file(s)','lastSync','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','catch','dbId','force','lockFilePath','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sqlRoot','boolean','push','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','Push\x20local\x20SQL\x20files\x20to\x20remote','filePath','sqlCode','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','731140rUrRqj','remoteId','isFinite','appCode','join','1340830rCkQZF','filter','set','sqlConfig','sqlRootDir','\x20skipped,\x20','dbDirectory','Push\x20complete:\x20','version','POST','path','No\x20local\x20SQL\x20files\x20found.'];a138_0x4a37=function(){return _0x5a30c6;};return a138_0x4a37();}import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x20266b,_0x1b4236,_0x58804e){const _0x36a872=a138_0x56dc,_0x1d606d=await scanLocalSqlQueries(_0x20266b),_0x4b91c4=new Map();for(const _0x3c267c of _0x1d606d){if(_0x58804e&&_0x3c267c[_0x36a872(0xc8)]!==_0x58804e)continue;const _0x500867=_0x4b91c4[_0x36a872(0x9c)](_0x3c267c[_0x36a872(0xc8)])??[];_0x500867[_0x36a872(0xc4)](_0x3c267c),_0x4b91c4[_0x36a872(0xd1)](_0x3c267c[_0x36a872(0xc8)],_0x500867);}if(_0x58804e&&!_0x4b91c4['has'](_0x58804e))throw CliErrors[_0x36a872(0xb9)](_0x36a872(0x98)+_0x58804e);const _0x34272d=[];for(const [_0x239c34,_0x21b93c]of _0x4b91c4[_0x36a872(0xa9)]()){if(_0x21b93c['length']===0x1){_0x34272d['push'](_0x21b93c[0x0]);continue;}const _0x136407=_0x1b4236[_0x36a872(0xad)][_0x239c34],_0x7ea3dd=_0x136407?.['path'],_0x513c00=_0x7ea3dd?_0x21b93c['filter'](_0x2b5c6c=>_0x2b5c6c[_0x36a872(0x9b)]!==_0x7ea3dd):_0x21b93c;if(_0x136407&&_0x513c00[_0x36a872(0xb4)]===0x1){_0x34272d[_0x36a872(0xc4)](_0x513c00[0x0]);continue;}throw CliErrors[_0x36a872(0xb9)](_0x36a872(0xc5)+_0x239c34+_0x36a872(0xc9));}return _0x34272d;}export const sqlPush={'service':'sql','command':a138_0x992a5d(0xc4),'description':a138_0x992a5d(0xc6),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a138_0x992a5d(0xbf),'type':a138_0x992a5d(0xc3),'description':a138_0x992a5d(0x9e)}],async 'dryRun'(_0x29ad44){const _0x23f9ca=a138_0x992a5d,_0x24c8ec=loadSqlProjectConfig(_0x29ad44[_0x23f9ca(0xcd)]),_0xf192eb=await readSqlLockFile(_0x24c8ec[_0x23f9ca(0xc0)]),{appLock:_0x50cef3}=ensureSqlLockScope(_0xf192eb??createEmptySqlLock(),_0x29ad44[_0x23f9ca(0xcd)],_0x24c8ec['sqlRoot'],'push'),_0x67b2cb=await getTargetSqlQueries(_0x24c8ec,_0x50cef3,_0x29ad44['str'](_0x23f9ca(0xab))||undefined),_0x238f23=[];for(const _0x36d14d of _0x67b2cb){const _0x4f99b2=await computeSqlFileHash(_0x36d14d[_0x23f9ca(0xc7)]),_0x55a01a=_0x50cef3[_0x23f9ca(0xad)][_0x36d14d[_0x23f9ca(0xc8)]],_0x1d440c=!!_0x55a01a&&(_0x55a01a['path']!==_0x36d14d[_0x23f9ca(0x9b)]||!!_0x36d14d['sqlName']&&_0x55a01a['sqlName']!==_0x36d14d[_0x23f9ca(0xa5)]);if(!_0x29ad44[_0x23f9ca(0xb5)](_0x23f9ca(0xbf))&&_0x55a01a&&_0x55a01a['hash']===_0x4f99b2&&!_0x1d440c)continue;_0x238f23[_0x23f9ca(0xc4)](_0x36d14d[_0x23f9ca(0xc8)]);}return{'method':_0x23f9ca(0x92),'url':_0x23f9ca(0xaf),'body':{'sqlCodes':_0x238f23,'appCode':_0x29ad44[_0x23f9ca(0xcd)]},'description':_0x23f9ca(0xb0)+_0x238f23['length']+_0x23f9ca(0xba)};},async 'execute'(_0x341eac){const _0x28c3e2=a138_0x992a5d,_0x441c13=loadSqlProjectConfig(_0x341eac[_0x28c3e2(0xcd)]),_0x2d7075=await readSqlLockFile(_0x441c13[_0x28c3e2(0xc0)]),{lockData:_0x26c9d8,appLock:_0x20e346}=ensureSqlLockScope(_0x2d7075??createEmptySqlLock(),_0x341eac[_0x28c3e2(0xcd)],_0x441c13[_0x28c3e2(0xc2)],_0x28c3e2(0xc4)),_0x834495=await getTargetSqlQueries(_0x441c13,_0x20e346,_0x341eac[_0x28c3e2(0x96)](_0x28c3e2(0xab))||undefined);if(_0x834495[_0x28c3e2(0xb4)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x28c3e2(0x94)};const _0x477a13=[],_0x1037dd=[],_0x10bf05=[];for(const _0x32a85e of _0x834495){const _0x59df45=_0x20e346[_0x28c3e2(0xad)][_0x32a85e[_0x28c3e2(0xc8)]];if(!_0x59df45){_0x10bf05[_0x28c3e2(0xc4)]({'sqlCode':_0x32a85e['sqlCode'],'error':_0x28c3e2(0xc1)});continue;}try{const _0x1d9e6b=await computeSqlFileHash(_0x32a85e[_0x28c3e2(0xc7)]),_0x498ddc=_0x59df45[_0x28c3e2(0x93)]!==_0x32a85e[_0x28c3e2(0x9b)]||!!_0x32a85e[_0x28c3e2(0xa5)]&&_0x59df45[_0x28c3e2(0xa5)]!==_0x32a85e[_0x28c3e2(0xa5)];if(!_0x341eac['bool'](_0x28c3e2(0xbf))&&_0x59df45[_0x28c3e2(0xb7)]===_0x1d9e6b&&!_0x498ddc){_0x1037dd[_0x28c3e2(0xc4)]({'sqlCode':_0x32a85e[_0x28c3e2(0xc8)],'reason':_0x28c3e2(0xae)});continue;}if(_0x59df45[_0x28c3e2(0x91)]==null){_0x10bf05[_0x28c3e2(0xc4)]({'sqlCode':_0x32a85e[_0x28c3e2(0xc8)],'error':_0x28c3e2(0xbc)});continue;}const _0x15d4a4=await readFile(_0x32a85e[_0x28c3e2(0xc7)],_0x28c3e2(0xaa)),_0x1d7014=stripLocalSqlMetadata(_0x15d4a4,_0x32a85e[_0x28c3e2(0xac)]),_0x4576fb=_0x32a85e[_0x28c3e2(0xa5)]||_0x59df45[_0x28c3e2(0xa5)],_0x47b840=await resolveTargetDbBinding(_0x341eac[_0x28c3e2(0xcd)],_0x32a85e,_0x59df45),_0x584ddb=await updateSqlQuery({'id':_0x59df45[_0x28c3e2(0xcb)],'appCode':_0x341eac['appCode'],'sqlCode':_0x32a85e[_0x28c3e2(0xc8)],'sqlName':_0x4576fb,'dbId':_0x47b840[_0x28c3e2(0xbe)],'version':_0x59df45[_0x28c3e2(0x91)],'sqlContent':_0x1d7014,'sqlConfig':_0x59df45[_0x28c3e2(0xd2)]??undefined}),_0x3da6bd=_0x584ddb[_0x28c3e2(0xbe)]?await getDbName(_0x341eac[_0x28c3e2(0xcd)],Number(_0x584ddb[_0x28c3e2(0xbe)]))['catch'](()=>_0x47b840[_0x28c3e2(0xa7)]):_0x47b840[_0x28c3e2(0xa7)];_0x20e346[_0x28c3e2(0xad)][_0x32a85e['sqlCode']]={...buildSqlLockEntry(_0x584ddb,_0x1d7014,_0x1d9e6b,{'dbName':_0x3da6bd}),'path':_0x32a85e[_0x28c3e2(0x9b)],'mode':_0x59df45['mode']},await archivePreviousSqlFileIfNeeded(_0x441c13,_0x59df45[_0x28c3e2(0x93)],_0x32a85e[_0x28c3e2(0x9b)]),_0x477a13[_0x28c3e2(0xc4)]({'sqlCode':_0x32a85e['sqlCode'],'remoteId':_0x59df45[_0x28c3e2(0xcb)]});}catch(_0x244364){_0x10bf05['push']({'sqlCode':_0x32a85e[_0x28c3e2(0xc8)],'error':_0x244364 instanceof Error?_0x244364['message']:String(_0x244364)});}}return _0x20e346[_0x28c3e2(0xbb)]=new Date()['toISOString'](),await writeSqlLockFile(_0x441c13[_0x28c3e2(0xc0)],_0x26c9d8),{'ok':_0x10bf05[_0x28c3e2(0xb4)]===0x0,'data':{'pushed':_0x477a13,'skipped':_0x1037dd,'failed':_0x10bf05},'message':_0x28c3e2(0x90)+_0x477a13[_0x28c3e2(0xb4)]+_0x28c3e2(0x99)+_0x1037dd[_0x28c3e2(0xb4)]+_0x28c3e2(0x8e)+_0x10bf05[_0x28c3e2(0xb4)]+_0x28c3e2(0x97)};}};async function archivePreviousSqlFileIfNeeded(_0x2e6250,_0x454483,_0x470f4b){const _0xfcc9c0=a138_0x992a5d;if(!_0x454483||_0x454483===_0x470f4b)return;const _0xfd885c=join(_0x2e6250[_0xfcc9c0(0x8d)],_0x454483);if(!await fileExists(_0xfd885c))return;const _0x37ff9d=await moveToTrash(_0x2e6250[_0xfcc9c0(0x9d)],_0x2e6250[_0xfcc9c0(0xa2)],_0xfd885c);await cleanupEmptyDirectories(dirname(_0xfd885c),_0x2e6250[_0xfcc9c0(0x8d)]),void _0x37ff9d;}async function moveToTrash(_0x272b29,_0x3498c3,_0x36d56c){const _0x39a0d3=a138_0x992a5d,_0x112461=new Date()[_0x39a0d3(0x95)]()['replace'](/[:.]/g,'-'),_0x180c5f=relative(_0x272b29,_0x36d56c),_0xc187db=join(_0x3498c3,_0x112461,_0x180c5f);return await mkdir(dirname(_0xc187db),{'recursive':!![]}),await rename(_0x36d56c,_0xc187db),_0xc187db;}async function cleanupEmptyDirectories(_0x3c15c8,_0x5c8531){const _0x1cd547=a138_0x992a5d;let _0x476e4b=resolve(_0x3c15c8);const _0x4428b6=resolve(_0x5c8531);while(_0x476e4b['startsWith'](''+_0x4428b6+sep)||_0x476e4b===_0x4428b6){if(_0x476e4b===_0x4428b6)return;try{const _0x420e70=await readdir(_0x476e4b);if(_0x420e70[_0x1cd547(0xb4)]>0x0)return;await rmdir(_0x476e4b);}catch{return;}_0x476e4b=dirname(_0x476e4b);}}function a138_0x56dc(_0x370e61,_0x4dc4b9){_0x370e61=_0x370e61-0x8d;const _0x4a3793=a138_0x4a37();let _0x56dc6c=_0x4a3793[_0x370e61];return _0x56dc6c;}async function resolveTargetDbBinding(_0x2758b1,_0x57fcde,_0x174f8b){const _0x25164a=a138_0x992a5d,_0x3fca5e=_0x57fcde[_0x25164a(0x8f)];if(!_0x3fca5e)return{'dbId':_0x174f8b[_0x25164a(0xbe)],'dbName':_0x174f8b[_0x25164a(0xa7)]};const _0x40c529=buildDbDirectoryName(_0x174f8b[_0x25164a(0xa7)],_0x174f8b[_0x25164a(0xbe)]);if(_0x3fca5e===_0x40c529)return{'dbId':_0x174f8b[_0x25164a(0xbe)],'dbName':_0x174f8b[_0x25164a(0xa7)]};const _0x4b4d05=parseExplicitDbDirectory(_0x3fca5e);if(_0x4b4d05!=null)return{'dbId':_0x4b4d05,'dbName':await getDbName(_0x2758b1,_0x4b4d05)[_0x25164a(0xbd)](()=>undefined)};const _0x1bf87e=await listDatabases(_0x2758b1),_0x641522=_0x1bf87e[_0x25164a(0xd0)](_0x428e2f=>buildDbDirectoryName(_0x428e2f[_0x25164a(0xa7)],_0x428e2f[_0x25164a(0xbe)])===_0x3fca5e);if(_0x641522[_0x25164a(0xb4)]===0x1)return{'dbId':_0x641522[0x0][_0x25164a(0xbe)],'dbName':_0x641522[0x0]['dbName']};if(_0x641522[_0x25164a(0xb4)]===0x0)throw CliErrors[_0x25164a(0xb9)](_0x25164a(0xb8)+_0x3fca5e+_0x25164a(0xa6)+_0x57fcde[_0x25164a(0xc8)]+'.');const _0xad0161=_0x641522['map'](_0x5f04d6=>_0x5f04d6[_0x25164a(0xa7)]+'\x20('+_0x5f04d6[_0x25164a(0xbe)]+')')[_0x25164a(0xce)](',\x20');throw CliErrors['validation'](_0x25164a(0xb3)+_0x3fca5e+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x57fcde[_0x25164a(0xc8)]+':\x20'+_0xad0161);}function parseExplicitDbDirectory(_0x104279){const _0x4fbe21=a138_0x992a5d,_0x54fef9=/^db-(\d+)$/[_0x4fbe21(0x9a)](_0x104279);if(!_0x54fef9)return null;const _0x3c49a6=Number(_0x54fef9[0x1]);return Number[_0x4fbe21(0xcc)](_0x3c49a6)&&_0x3c49a6>0x0?_0x3c49a6:null;}
|
|
1
|
+
const a138_0x3cc0f7=a138_0x5303;(function(_0x377892,_0x428aed){const _0x9239df=a138_0x5303,_0x4a66fa=_0x377892();while(!![]){try{const _0x4d1f76=-parseInt(_0x9239df(0x9c))/0x1*(parseInt(_0x9239df(0x8a))/0x2)+-parseInt(_0x9239df(0x99))/0x3*(parseInt(_0x9239df(0x80))/0x4)+parseInt(_0x9239df(0xa2))/0x5*(-parseInt(_0x9239df(0x82))/0x6)+-parseInt(_0x9239df(0x7f))/0x7+-parseInt(_0x9239df(0x98))/0x8+-parseInt(_0x9239df(0xb0))/0x9+-parseInt(_0x9239df(0x77))/0xa*(-parseInt(_0x9239df(0xb4))/0xb);if(_0x4d1f76===_0x428aed)break;else _0x4a66fa['push'](_0x4a66fa['shift']());}catch(_0x17e325){_0x4a66fa['push'](_0x4a66fa['shift']());}}}(a138_0x565a,0x8a006));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a138_0x565a(){const _0x5c4db8=['Push\x20local\x20SQL\x20files\x20to\x20remote','/smartapi/custom/updateUserCustomSql','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','\x20SQL\x20file(s)','31386LxzCoy','unchanged','get','filePath','toISOString','sqlName','bool','\x20failed','sqlRootDir','version','Would\x20push\x20','sqlCode','exec','Local\x20SQL\x20not\x20found:\x20','8997880ABIBsZ','3RPYZJp','\x20skipped,\x20','sqlConfig','41PmMddi','utf8','sqlcode','lockFilePath','No\x20database\x20matches\x20local\x20directory\x20\x22','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','292310zbJgPD','dbId','str','push','No\x20local\x20SQL\x20files\x20found.','sqls','length','mode','Push\x20complete:\x20','catch','appCode','boolean','isFinite','sqlRoot','1129113cyJXHE','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','path','45265CbsPLJ','sql','POST','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','projectRoot','dbName','startsWith','8440FjQMTK','remoteId','validation','replace','hash','dbDirectory','relativePath','lastSync','845551PqcPGk','299760pvVZKO','force','84jnQoyn','entries','filter','has'];a138_0x565a=function(){return _0x5c4db8;};return a138_0x565a();}import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a138_0x5303(_0x3bcb0f,_0x30b8b3){_0x3bcb0f=_0x3bcb0f-0x73;const _0x565a0b=a138_0x565a();let _0x530384=_0x565a0b[_0x3bcb0f];return _0x530384;}import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x265084,_0x6dde74,_0x3191f6){const _0x296583=a138_0x5303,_0x2febb8=await scanLocalSqlQueries(_0x265084),_0x53bf92=new Map();for(const _0xaf7f54 of _0x2febb8){if(_0x3191f6&&_0xaf7f54[_0x296583(0x95)]!==_0x3191f6)continue;const _0x150199=_0x53bf92[_0x296583(0x8c)](_0xaf7f54[_0x296583(0x95)])??[];_0x150199[_0x296583(0xa5)](_0xaf7f54),_0x53bf92['set'](_0xaf7f54[_0x296583(0x95)],_0x150199);}if(_0x3191f6&&!_0x53bf92[_0x296583(0x85)](_0x3191f6))throw CliErrors['validation'](_0x296583(0x97)+_0x3191f6);const _0x35b560=[];for(const [_0x33270d,_0x50a18f]of _0x53bf92[_0x296583(0x83)]()){if(_0x50a18f[_0x296583(0xa8)]===0x1){_0x35b560[_0x296583(0xa5)](_0x50a18f[0x0]);continue;}const _0x320ff9=_0x6dde74[_0x296583(0xa7)][_0x33270d],_0x2e2549=_0x320ff9?.[_0x296583(0xb3)],_0x5f1892=_0x2e2549?_0x50a18f[_0x296583(0x84)](_0x47d8a1=>_0x47d8a1[_0x296583(0x7d)]!==_0x2e2549):_0x50a18f;if(_0x320ff9&&_0x5f1892[_0x296583(0xa8)]===0x1){_0x35b560['push'](_0x5f1892[0x0]);continue;}throw CliErrors[_0x296583(0x79)](_0x296583(0xb1)+_0x33270d+_0x296583(0x73));}return _0x35b560;}export const sqlPush={'service':a138_0x3cc0f7(0xb5),'command':a138_0x3cc0f7(0xa5),'description':a138_0x3cc0f7(0x86),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a138_0x3cc0f7(0x81),'type':a138_0x3cc0f7(0xad),'description':a138_0x3cc0f7(0x88)}],async 'dryRun'(_0x2fcc79){const _0x3348ba=a138_0x3cc0f7,_0x426b21=loadSqlProjectConfig(_0x2fcc79['appCode']),_0x5cc070=await readSqlLockFile(_0x426b21['lockFilePath']),{appLock:_0x49c3a2}=ensureSqlLockScope(_0x5cc070??createEmptySqlLock(),_0x2fcc79[_0x3348ba(0xac)],_0x426b21[_0x3348ba(0xaf)],_0x3348ba(0xa5)),_0x162300=await getTargetSqlQueries(_0x426b21,_0x49c3a2,_0x2fcc79[_0x3348ba(0xa4)](_0x3348ba(0x9e))||undefined),_0x47cca2=[];for(const _0x285639 of _0x162300){const _0x17b5ff=await computeSqlFileHash(_0x285639['filePath']),_0x3c6125=_0x49c3a2[_0x3348ba(0xa7)][_0x285639[_0x3348ba(0x95)]],_0x2e8e97=!!_0x3c6125&&(_0x3c6125[_0x3348ba(0xb3)]!==_0x285639['relativePath']||!!_0x285639['sqlName']&&_0x3c6125[_0x3348ba(0x8f)]!==_0x285639[_0x3348ba(0x8f)]);if(!_0x2fcc79[_0x3348ba(0x90)](_0x3348ba(0x81))&&_0x3c6125&&_0x3c6125[_0x3348ba(0x7b)]===_0x17b5ff&&!_0x2e8e97)continue;_0x47cca2['push'](_0x285639[_0x3348ba(0x95)]);}return{'method':_0x3348ba(0xb6),'url':_0x3348ba(0x87),'body':{'sqlCodes':_0x47cca2,'appCode':_0x2fcc79[_0x3348ba(0xac)]},'description':_0x3348ba(0x94)+_0x47cca2[_0x3348ba(0xa8)]+_0x3348ba(0x89)};},async 'execute'(_0x145e61){const _0x57b382=a138_0x3cc0f7,_0x582143=loadSqlProjectConfig(_0x145e61[_0x57b382(0xac)]),_0x21ce8f=await readSqlLockFile(_0x582143[_0x57b382(0x9f)]),{lockData:_0x41e6d7,appLock:_0x256263}=ensureSqlLockScope(_0x21ce8f??createEmptySqlLock(),_0x145e61['appCode'],_0x582143[_0x57b382(0xaf)],_0x57b382(0xa5)),_0xc32360=await getTargetSqlQueries(_0x582143,_0x256263,_0x145e61[_0x57b382(0xa4)](_0x57b382(0x9e))||undefined);if(_0xc32360[_0x57b382(0xa8)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x57b382(0xa6)};const _0x396906=[],_0x3242a5=[],_0x468d4a=[];for(const _0x5df7bc of _0xc32360){const _0x2d6579=_0x256263[_0x57b382(0xa7)][_0x5df7bc[_0x57b382(0x95)]];if(!_0x2d6579){_0x468d4a[_0x57b382(0xa5)]({'sqlCode':_0x5df7bc[_0x57b382(0x95)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x2f6c8b=await computeSqlFileHash(_0x5df7bc[_0x57b382(0x8d)]),_0x5bfe1b=_0x2d6579['path']!==_0x5df7bc[_0x57b382(0x7d)]||!!_0x5df7bc[_0x57b382(0x8f)]&&_0x2d6579[_0x57b382(0x8f)]!==_0x5df7bc[_0x57b382(0x8f)];if(!_0x145e61[_0x57b382(0x90)](_0x57b382(0x81))&&_0x2d6579['hash']===_0x2f6c8b&&!_0x5bfe1b){_0x3242a5[_0x57b382(0xa5)]({'sqlCode':_0x5df7bc[_0x57b382(0x95)],'reason':_0x57b382(0x8b)});continue;}if(_0x2d6579[_0x57b382(0x93)]==null){_0x468d4a['push']({'sqlCode':_0x5df7bc[_0x57b382(0x95)],'error':_0x57b382(0xa1)});continue;}const _0x478dfd=await readFile(_0x5df7bc[_0x57b382(0x8d)],_0x57b382(0x9d)),_0x5e6f59=stripLocalSqlMetadata(_0x478dfd,_0x5df7bc[_0x57b382(0xa9)]),_0x4cb2fe=_0x5df7bc[_0x57b382(0x8f)]||_0x2d6579[_0x57b382(0x8f)],_0x29d9a7=await resolveTargetDbBinding(_0x145e61[_0x57b382(0xac)],_0x5df7bc,_0x2d6579),_0x298335=await updateSqlQuery({'id':_0x2d6579['remoteId'],'appCode':_0x145e61[_0x57b382(0xac)],'sqlCode':_0x5df7bc[_0x57b382(0x95)],'sqlName':_0x4cb2fe,'dbId':_0x29d9a7[_0x57b382(0xa3)],'version':_0x2d6579[_0x57b382(0x93)],'sqlContent':_0x5e6f59,'sqlConfig':_0x2d6579[_0x57b382(0x9b)]??undefined}),_0x57c8d2=_0x298335[_0x57b382(0xa3)]?await getDbName(_0x145e61[_0x57b382(0xac)],Number(_0x298335[_0x57b382(0xa3)]))['catch'](()=>_0x29d9a7[_0x57b382(0x75)]):_0x29d9a7[_0x57b382(0x75)];_0x256263[_0x57b382(0xa7)][_0x5df7bc[_0x57b382(0x95)]]={...buildSqlLockEntry(_0x298335,_0x5e6f59,_0x2f6c8b,{'dbName':_0x57c8d2}),'path':_0x5df7bc[_0x57b382(0x7d)],'mode':_0x2d6579[_0x57b382(0xa9)]},await archivePreviousSqlFileIfNeeded(_0x582143,_0x2d6579['path'],_0x5df7bc[_0x57b382(0x7d)]),_0x396906[_0x57b382(0xa5)]({'sqlCode':_0x5df7bc[_0x57b382(0x95)],'remoteId':_0x2d6579[_0x57b382(0x78)]});}catch(_0x2ba4ca){_0x468d4a['push']({'sqlCode':_0x5df7bc[_0x57b382(0x95)],'error':_0x2ba4ca instanceof Error?_0x2ba4ca['message']:String(_0x2ba4ca)});}}return _0x256263[_0x57b382(0x7e)]=new Date()['toISOString'](),await writeSqlLockFile(_0x582143[_0x57b382(0x9f)],_0x41e6d7),{'ok':_0x468d4a[_0x57b382(0xa8)]===0x0,'data':{'pushed':_0x396906,'skipped':_0x3242a5,'failed':_0x468d4a},'message':_0x57b382(0xaa)+_0x396906['length']+'\x20pushed,\x20'+_0x3242a5[_0x57b382(0xa8)]+_0x57b382(0x9a)+_0x468d4a[_0x57b382(0xa8)]+_0x57b382(0x91)};}};async function archivePreviousSqlFileIfNeeded(_0x20f3ec,_0x20ac2a,_0x4f4e08){const _0x272dd1=a138_0x3cc0f7;if(!_0x20ac2a||_0x20ac2a===_0x4f4e08)return;const _0x3b3220=join(_0x20f3ec['sqlRootDir'],_0x20ac2a);if(!await fileExists(_0x3b3220))return;const _0x1d0bf0=await moveToTrash(_0x20f3ec[_0x272dd1(0x74)],_0x20f3ec['trashDir'],_0x3b3220);await cleanupEmptyDirectories(dirname(_0x3b3220),_0x20f3ec[_0x272dd1(0x92)]),void _0x1d0bf0;}async function moveToTrash(_0x12f905,_0x35476c,_0x110ee8){const _0x13bc59=a138_0x3cc0f7,_0x284370=new Date()[_0x13bc59(0x8e)]()[_0x13bc59(0x7a)](/[:.]/g,'-'),_0x553e94=relative(_0x12f905,_0x110ee8),_0x1c5d18=join(_0x35476c,_0x284370,_0x553e94);return await mkdir(dirname(_0x1c5d18),{'recursive':!![]}),await rename(_0x110ee8,_0x1c5d18),_0x1c5d18;}async function cleanupEmptyDirectories(_0x50d4e5,_0x5df95f){const _0x38f588=a138_0x3cc0f7;let _0x1026a1=resolve(_0x50d4e5);const _0x1ab269=resolve(_0x5df95f);while(_0x1026a1[_0x38f588(0x76)](''+_0x1ab269+sep)||_0x1026a1===_0x1ab269){if(_0x1026a1===_0x1ab269)return;try{const _0x24cf0f=await readdir(_0x1026a1);if(_0x24cf0f[_0x38f588(0xa8)]>0x0)return;await rmdir(_0x1026a1);}catch{return;}_0x1026a1=dirname(_0x1026a1);}}async function resolveTargetDbBinding(_0x504932,_0x54c946,_0x14ed1e){const _0x15266c=a138_0x3cc0f7,_0x12e566=_0x54c946[_0x15266c(0x7c)];if(!_0x12e566)return{'dbId':_0x14ed1e[_0x15266c(0xa3)],'dbName':_0x14ed1e['dbName']};const _0x47109e=buildDbDirectoryName(_0x14ed1e['dbName'],_0x14ed1e['dbId']);if(_0x12e566===_0x47109e)return{'dbId':_0x14ed1e['dbId'],'dbName':_0x14ed1e[_0x15266c(0x75)]};const _0x837010=parseExplicitDbDirectory(_0x12e566);if(_0x837010!=null)return{'dbId':_0x837010,'dbName':await getDbName(_0x504932,_0x837010)[_0x15266c(0xab)](()=>undefined)};const _0x45d70b=await listDatabases(_0x504932),_0x14ab2a=_0x45d70b[_0x15266c(0x84)](_0x14932a=>buildDbDirectoryName(_0x14932a['dbName'],_0x14932a[_0x15266c(0xa3)])===_0x12e566);if(_0x14ab2a[_0x15266c(0xa8)]===0x1)return{'dbId':_0x14ab2a[0x0]['dbId'],'dbName':_0x14ab2a[0x0][_0x15266c(0x75)]};if(_0x14ab2a[_0x15266c(0xa8)]===0x0)throw CliErrors[_0x15266c(0x79)](_0x15266c(0xa0)+_0x12e566+'\x22\x20for\x20sqlCode\x20'+_0x54c946[_0x15266c(0x95)]+'.');const _0x5ea6c7=_0x14ab2a['map'](_0x19e63f=>_0x19e63f[_0x15266c(0x75)]+'\x20('+_0x19e63f[_0x15266c(0xa3)]+')')['join'](',\x20');throw CliErrors[_0x15266c(0x79)]('Local\x20directory\x20\x22'+_0x12e566+_0x15266c(0xb2)+_0x54c946[_0x15266c(0x95)]+':\x20'+_0x5ea6c7);}function parseExplicitDbDirectory(_0x5ac461){const _0x35681e=a138_0x3cc0f7,_0x58071d=/^db-(\d+)$/[_0x35681e(0x96)](_0x5ac461);if(!_0x58071d)return null;const _0x55ab4e=Number(_0x58071d[0x1]);return Number[_0x35681e(0xae)](_0x55ab4e)&&_0x55ab4e>0x0?_0x55ab4e:null;}
|
package/lib/commands/sql/save.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a139_0x405dda=a139_0x5b1c;(function(_0x1f3ef5,_0x463f5a){const _0x2b2415=a139_0x5b1c,_0x342034=_0x1f3ef5();while(!![]){try{const _0x4c3c3b=parseInt(_0x2b2415(0x1e1))/0x1*(parseInt(_0x2b2415(0x1ec))/0x2)+parseInt(_0x2b2415(0x1db))/0x3+parseInt(_0x2b2415(0x1e4))/0x4*(parseInt(_0x2b2415(0x1df))/0x5)+-parseInt(_0x2b2415(0x1e9))/0x6+-parseInt(_0x2b2415(0x1e7))/0x7+-parseInt(_0x2b2415(0x1d9))/0x8+parseInt(_0x2b2415(0x1e2))/0x9*(-parseInt(_0x2b2415(0x1e6))/0xa);if(_0x4c3c3b===_0x463f5a)break;else _0x342034['push'](_0x342034['shift']());}catch(_0x4f5857){_0x342034['push'](_0x342034['shift']());}}}(a139_0x37d6,0x93480));function a139_0x37d6(){const _0x37d2c4=['5693SbbMGv','2226006GtAMbx','string','172zQOpCN','SQL\x20query\x20display\x20name','10XHIIsz','1722371tgORKh','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','2922630VqltAs','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','validation','84HOcjMv','join','3906752zqzSet','save','3083070mOYSoo','Query\x20description','sql','write','93640oZwnbr','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.'];a139_0x37d6=function(){return _0x37d2c4;};return a139_0x37d6();}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a139_0x405dda(0x1e0),a139_0x405dda(0x1e8)][a139_0x405dda(0x1ed)]('\x0a');function a139_0x5b1c(_0x29ca27,_0x1141b3){_0x29ca27=_0x29ca27-0x1d9;const _0x37d6cd=a139_0x37d6();let _0x5b1cd2=_0x37d6cd[_0x29ca27];return _0x5b1cd2;}export const sqlSave={'service':a139_0x405dda(0x1dd),'command':a139_0x405dda(0x1da),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a139_0x405dda(0x1de),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'file','type':'string','required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':'sqlname','type':a139_0x405dda(0x1e3),'description':a139_0x405dda(0x1e5)},{'name':'db','type':a139_0x405dda(0x1e3),'description':a139_0x405dda(0x1ea)},{'name':'description','type':a139_0x405dda(0x1e3),'description':a139_0x405dda(0x1dc)}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x2c5f72=a139_0x405dda;throw CliErrors[_0x2c5f72(0x1eb)](SQL_SAVE_DEPRECATED_HINT);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x12778d=a140_0x2b8f;(function(_0x31f0c8,_0x5d2cf7){const _0x22b1a9=a140_0x2b8f,_0x509a32=_0x31f0c8();while(!![]){try{const _0x2531af=parseInt(_0x22b1a9(0x1a7))/0x1*(parseInt(_0x22b1a9(0x1bf))/0x2)+parseInt(_0x22b1a9(0x1ce))/0x3*(-parseInt(_0x22b1a9(0x1c7))/0x4)+parseInt(_0x22b1a9(0x1c0))/0x5*(-parseInt(_0x22b1a9(0x1c9))/0x6)+-parseInt(_0x22b1a9(0x1b4))/0x7*(-parseInt(_0x22b1a9(0x1ca))/0x8)+parseInt(_0x22b1a9(0x1cc))/0x9*(parseInt(_0x22b1a9(0x1ac))/0xa)+parseInt(_0x22b1a9(0x1b1))/0xb*(parseInt(_0x22b1a9(0x1b7))/0xc)+-parseInt(_0x22b1a9(0x1c3))/0xd;if(_0x2531af===_0x5d2cf7)break;else _0x509a32['push'](_0x509a32['shift']());}catch(_0x4cdadd){_0x509a32['push'](_0x509a32['shift']());}}}(a140_0x1044,0x3732c));function a140_0x2b8f(_0x1facbb,_0xa9e437){_0x1facbb=_0x1facbb-0x1a2;const _0x1044aa=a140_0x1044();let _0x2b8f7e=_0x1044aa[_0x1facbb];return _0x2b8f7e;}import{createInterface}from'node:readline';import{join}from'node:path';function a140_0x1044(){const _0x3ffa27=['sqls','dbName','<!--\x20@lovrabet.','toLowerCase','endsWith','description','11TPsSat','includes','syncedAt','sqlContent','mybatisXml','603210FzLuBf','filter','lastSync','yes','sqlCode','13783MIHxaS','version','apps','7eXioRy','length','path','3864FMdyhi','sqlConfig','trim','close','trimStart','map','.rabetbase/sql','sqlRoot','38358GvLdfa','25fqghAA','mode','stderr','7881107vZGAJU','join','dbId','split','8KAmpqn','test','19554PZOcUc','2741944becEpz','sqlName','36gTAJch','fromEntries','524754hJjnsl','push'];a140_0x1044=function(){return _0x3ffa27;};return a140_0x1044();}import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a140_0x12778d(0x1bd);export function buildSqlLockEntry(_0x23ff09,_0x32ada0,_0x4c8728,_0x301642){const _0x45c3e0=a140_0x12778d,_0x10289b=detectSqlMode(_0x32ada0);return{'path':buildSqlRelativePath(_0x23ff09[_0x45c3e0(0x1b0)],_0x23ff09[_0x45c3e0(0x1cb)],_0x301642?.[_0x45c3e0(0x1a2)],_0x10289b,_0x23ff09[_0x45c3e0(0x1c5)]),'hash':_0x4c8728,'remoteId':_0x23ff09['id'],'version':_0x23ff09[_0x45c3e0(0x1b2)],'dbId':Number(_0x23ff09[_0x45c3e0(0x1c5)]),'dbName':_0x301642?.[_0x45c3e0(0x1a2)],'sqlName':_0x23ff09[_0x45c3e0(0x1cb)],'sqlConfig':_0x23ff09[_0x45c3e0(0x1b8)]??undefined,'mode':_0x10289b};}export function cloneSqlLockData(_0x4a728b){const _0x114463=a140_0x12778d;return{'apps':Object[_0x114463(0x1cd)](Object['entries'](_0x4a728b[_0x114463(0x1b3)])[_0x114463(0x1bc)](([_0x3c7061,_0x342955])=>[_0x3c7061,{'sqlRoot':_0x342955[_0x114463(0x1be)],'lastSync':_0x342955[_0x114463(0x1ae)],'sqls':{..._0x342955[_0x114463(0x1d0)]}}]))};}export function ensureRemoteSqlContent(_0x103f28){const _0x491a40=a140_0x12778d;return _0x103f28[_0x491a40(0x1aa)]??'';}export function buildLocalSqlFileContent(_0x18cea0,_0xcfaee1,_0x257cfe){const _0x3c7152=a140_0x12778d,_0x4592c2=_0x257cfe?.['mode']??detectSqlMode(_0xcfaee1),_0x301986=stripLocalSqlMetadata(_0xcfaee1,_0x4592c2)[_0x3c7152(0x1b9)](),_0x5e20c1=[...buildMetadataHeaderLines({'sqlCode':_0x18cea0[_0x3c7152(0x1b0)],'sqlName':_0x18cea0[_0x3c7152(0x1cb)],'dbId':_0x18cea0['dbId'],'dbName':_0x257cfe?.[_0x3c7152(0x1a2)],'mode':_0x4592c2,'syncedAt':_0x257cfe?.[_0x3c7152(0x1a9)],'description':_0x257cfe?.[_0x3c7152(0x1a6)]},_0x4592c2),'',_0x301986],_0xe930e7=_0x5e20c1[_0x3c7152(0x1c4)]('\x0a');return _0xe930e7[_0x3c7152(0x1a5)]('\x0a')?_0xe930e7:_0xe930e7+'\x0a';}export function stripLocalSqlMetadata(_0x580173,_0x34d8e0){const _0x5a4f99=a140_0x12778d,_0x32bd05=_0x580173['replace'](/\r\n/g,'\x0a')[_0x5a4f99(0x1c6)]('\x0a'),_0x525526=[];let _0x4adf8e=0x0;if(_0x34d8e0===_0x5a4f99(0x1ab))while(_0x4adf8e<_0x32bd05[_0x5a4f99(0x1b5)]){const _0x199414=_0x32bd05[_0x4adf8e]??'';if(/^\s*<!--\s*@lovrabet\./[_0x5a4f99(0x1c8)](_0x199414)){_0x4adf8e++;continue;}if(_0x199414[_0x5a4f99(0x1b9)]()===''&&_0x4adf8e>0x0){_0x4adf8e++;continue;}break;}else while(_0x4adf8e<_0x32bd05['length']){const _0x7d8ef8=_0x32bd05[_0x4adf8e]??'';if(/^\s*--\s*@lovrabet\./[_0x5a4f99(0x1c8)](_0x7d8ef8)){_0x4adf8e++;continue;}if(_0x7d8ef8[_0x5a4f99(0x1b9)]()===''&&_0x4adf8e>0x0){_0x4adf8e++;continue;}break;}for(;_0x4adf8e<_0x32bd05[_0x5a4f99(0x1b5)];_0x4adf8e++){_0x525526[_0x5a4f99(0x1cf)](_0x32bd05[_0x4adf8e]);}return _0x525526[_0x5a4f99(0x1c4)]('\x0a')[_0x5a4f99(0x1bb)]();}export function resolveSqlMode(_0x29bdfc,_0x11c291){const _0x2e2881=a140_0x12778d;if(_0x11c291?.[_0x2e2881(0x1c1)])return _0x11c291[_0x2e2881(0x1c1)];return detectSqlMode(_0x29bdfc);}export function resolveSqlFileName(_0x2edd6b,_0x51b611,_0x34638b){const _0x1ba784=a140_0x12778d;if(_0x34638b?.[_0x1ba784(0x1b6)])return _0x34638b[_0x1ba784(0x1b6)];if(_0x34638b?.[_0x1ba784(0x1cb)]||_0x34638b?.['dbName'])return buildSqlRelativePath(_0x2edd6b,_0x34638b?.[_0x1ba784(0x1cb)],_0x34638b?.[_0x1ba784(0x1a2)],resolveSqlMode(_0x51b611,_0x34638b),_0x34638b?.['dbId']);return buildDefaultSqlFileName(_0x2edd6b,resolveSqlMode(_0x51b611,_0x34638b));}export function resolveSqlLocalDir(_0x3d2963,_0x68c36){return join(_0x3d2963,SQL_LOCAL_REL_DIR,_0x68c36);}export async function confirmForceOverwrite(_0x621952){const _0x3fbf76=a140_0x12778d,_0x48476c=createInterface({'input':process['stdin'],'output':process[_0x3fbf76(0x1c2)]}),_0x1c3706=await new Promise(_0x77300f=>{_0x48476c['question'](_0x621952+'\x20[y/N]\x20',_0x77300f);});return _0x48476c[_0x3fbf76(0x1ba)](),['y',_0x3fbf76(0x1af)][_0x3fbf76(0x1a8)](_0x1c3706['trim']()[_0x3fbf76(0x1a4)]());}export function findSqlLockScope(_0x2bdf95,_0x58e272){return _0x2bdf95['apps'][_0x58e272];}function buildMetadataHeaderLines(_0x5e1e7e,_0x6b410a){const _0x4496cf=a140_0x12778d,_0x33bea8=[['sqlCode',_0x5e1e7e[_0x4496cf(0x1b0)]],['sqlName',_0x5e1e7e['sqlName']],[_0x4496cf(0x1c5),_0x5e1e7e['dbId']],['dbName',_0x5e1e7e[_0x4496cf(0x1a2)]],[_0x4496cf(0x1c1),_0x5e1e7e[_0x4496cf(0x1c1)]],[_0x4496cf(0x1a9),_0x5e1e7e[_0x4496cf(0x1a9)]],['description',_0x5e1e7e[_0x4496cf(0x1a6)]]];if(_0x6b410a===_0x4496cf(0x1ab))return _0x33bea8[_0x4496cf(0x1ad)](([,_0x5ca1d0])=>_0x5ca1d0!==undefined&&_0x5ca1d0!==null&&String(_0x5ca1d0)[_0x4496cf(0x1b9)]()!=='')['map'](([_0x5a42e9,_0x2e9dd3])=>_0x4496cf(0x1a3)+_0x5a42e9+':\x20'+String(_0x2e9dd3)+'\x20-->');return _0x33bea8[_0x4496cf(0x1ad)](([,_0x57d9f2])=>_0x57d9f2!==undefined&&_0x57d9f2!==null&&String(_0x57d9f2)['trim']()!=='')['map'](([_0x228cd6,_0x18a93c])=>'--\x20@lovrabet.'+_0x228cd6+':\x20'+String(_0x18a93c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x5b3f57=a141_0x3479;(function(_0x4e15d7,_0x2e500f){const _0x2b76d3=a141_0x3479,_0xc2b5dd=_0x4e15d7();while(!![]){try{const _0xad4c91=-parseInt(_0x2b76d3(0x172))/0x1+-parseInt(_0x2b76d3(0x173))/0x2*(-parseInt(_0x2b76d3(0x188))/0x3)+-parseInt(_0x2b76d3(0x174))/0x4*(parseInt(_0x2b76d3(0x168))/0x5)+-parseInt(_0x2b76d3(0x187))/0x6+-parseInt(_0x2b76d3(0x17a))/0x7+-parseInt(_0x2b76d3(0x183))/0x8*(-parseInt(_0x2b76d3(0x165))/0x9)+parseInt(_0x2b76d3(0x184))/0xa*(parseInt(_0x2b76d3(0x167))/0xb);if(_0xad4c91===_0x2e500f)break;else _0xc2b5dd['push'](_0xc2b5dd['shift']());}catch(_0xf3341c){_0xc2b5dd['push'](_0xc2b5dd['shift']());}}}(a141_0x314c,0xbd258));import{listSqlQueries}from'../../core/api-client.js';function a141_0x314c(){const _0x141925=['relativePath','filePath','\x20missing,\x20','\x20remote-only','sqlRoot','6984201osVjGS','sqls','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','status','appCode','hash','sqlName','sqlCode','path','273688NYDEWN','834940KHXgEd','lockFilePath','map','8844570DxHcYn','2598uJwbvv','push','length','totalCount','9QbDbrd','lockKey','605eOAxIa','17075ErwUah','paging','bool','keys','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','remote','has','\x20unchanged','All\x20SQL\x20queries\x20are\x20in\x20sync.','read','1446017VAlWoy','2866ICBMuH','1376HWZEbb'];a141_0x314c=function(){return _0x141925;};return a141_0x314c();}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a141_0x3479(_0xaa9b87,_0x5c976c){_0xaa9b87=_0xaa9b87-0x162;const _0x314c99=a141_0x314c();let _0x3479d7=_0x314c99[_0xaa9b87];return _0x3479d7;}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x737434){const _0x50d11c=a141_0x3479,_0x14fe09=[];let _0x57ced2=0x1;while(!![]){const _0x32d72e=await listSqlQueries(_0x737434,{'currentPage':_0x57ced2,'pageSize':PAGE_SIZE}),_0x2b1568=_0x32d72e['tableData']??[];_0x14fe09[_0x50d11c(0x162)](..._0x2b1568[_0x50d11c(0x186)](_0xe8fd71=>_0xe8fd71[_0x50d11c(0x181)]));if(_0x2b1568[_0x50d11c(0x163)]===0x0)break;const _0x3a3bfb=_0x32d72e[_0x50d11c(0x169)]?.[_0x50d11c(0x164)];if(_0x3a3bfb!=null?_0x14fe09[_0x50d11c(0x163)]>=_0x3a3bfb:_0x2b1568['length']<PAGE_SIZE)break;_0x57ced2++;}return _0x14fe09;}export const sqlStatus={'service':'sql','command':'status','description':a141_0x5b3f57(0x17c),'risk':a141_0x5b3f57(0x171),'flags':[{'name':a141_0x5b3f57(0x16d),'type':'boolean','description':a141_0x5b3f57(0x16c)}],async 'execute'(_0x350af9){const _0x54e407=a141_0x5b3f57,_0x315059=loadSqlProjectConfig(_0x350af9[_0x54e407(0x17e)]),_0x163cfa=await readSqlLockFile(_0x315059[_0x54e407(0x185)]),{appLock:_0x3035e9}=ensureSqlLockScope(_0x163cfa??createEmptySqlLock(),_0x315059[_0x54e407(0x17e)],_0x315059[_0x54e407(0x179)],_0x54e407(0x17d)),_0xcb80b8=await scanLocalSqlQueries(_0x315059),_0x32fa40=[],_0x2d3277=[],_0x11e0eb=[],_0x28e450=[],_0x11c5fa=new Set(_0xcb80b8['map'](_0x365748=>_0x365748[_0x54e407(0x166)]));for(const _0x30ce60 of _0xcb80b8){const _0x1cd32d=await computeSqlFileHash(_0x30ce60[_0x54e407(0x176)]),_0x545170=_0x3035e9[_0x54e407(0x17b)][_0x30ce60[_0x54e407(0x166)]],_0x334154=!!_0x545170&&_0x545170[_0x54e407(0x182)]!==_0x30ce60[_0x54e407(0x175)],_0x3f8c5a=!!_0x545170&&!!_0x30ce60[_0x54e407(0x180)]&&_0x545170[_0x54e407(0x180)]!==_0x30ce60[_0x54e407(0x180)];if(!_0x545170)_0x32fa40[_0x54e407(0x162)](_0x30ce60[_0x54e407(0x166)]);else _0x545170[_0x54e407(0x17f)]!==_0x1cd32d||_0x334154||_0x3f8c5a?_0x2d3277[_0x54e407(0x162)](_0x30ce60[_0x54e407(0x166)]):_0x11e0eb['push'](_0x30ce60[_0x54e407(0x166)]);}for(const _0x12761a of Object[_0x54e407(0x16b)](_0x3035e9[_0x54e407(0x17b)])){!_0x11c5fa[_0x54e407(0x16e)](_0x12761a)&&_0x28e450[_0x54e407(0x162)](_0x12761a);}const _0x5738a0=[];if(_0x350af9[_0x54e407(0x16a)](_0x54e407(0x16d))){const _0x1f80ab=await fetchAllSqlCodes(_0x350af9[_0x54e407(0x17e)]);for(const _0x3cfdf7 of _0x1f80ab){!_0x11c5fa[_0x54e407(0x16e)](_0x3cfdf7)&&!_0x3035e9[_0x54e407(0x17b)][_0x3cfdf7]&&_0x5738a0[_0x54e407(0x162)](_0x3cfdf7);}}const _0x4632a6=_0x32fa40[_0x54e407(0x163)]===0x0&&_0x2d3277[_0x54e407(0x163)]===0x0&&_0x28e450[_0x54e407(0x163)]===0x0&&_0x5738a0[_0x54e407(0x163)]===0x0;return{'ok':!![],'data':{'added':_0x32fa40,'modified':_0x2d3277,'missing':_0x28e450,'unchanged':_0x11e0eb,'remoteOnly':_0x5738a0},'message':_0x4632a6?_0x54e407(0x170):_0x32fa40[_0x54e407(0x163)]+'\x20added,\x20'+_0x2d3277[_0x54e407(0x163)]+'\x20modified,\x20'+_0x28e450[_0x54e407(0x163)]+_0x54e407(0x177)+_0x11e0eb[_0x54e407(0x163)]+_0x54e407(0x16f)+(_0x5738a0['length']>0x0?',\x20'+_0x5738a0['length']+_0x54e407(0x178):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x433114=a142_0x25bb;(function(_0x34b464,_0x52ed00){const _0x19a45a=a142_0x25bb,_0x4c2307=_0x34b464();while(!![]){try{const _0x3534dd=parseInt(_0x19a45a(0x99))/0x1*(parseInt(_0x19a45a(0x7c))/0x2)+parseInt(_0x19a45a(0x86))/0x3+-parseInt(_0x19a45a(0x92))/0x4*(parseInt(_0x19a45a(0x7a))/0x5)+-parseInt(_0x19a45a(0x70))/0x6*(-parseInt(_0x19a45a(0x9e))/0x7)+-parseInt(_0x19a45a(0xa1))/0x8*(parseInt(_0x19a45a(0x94))/0x9)+parseInt(_0x19a45a(0x69))/0xa*(parseInt(_0x19a45a(0x71))/0xb)+parseInt(_0x19a45a(0x72))/0xc*(-parseInt(_0x19a45a(0x83))/0xd);if(_0x3534dd===_0x52ed00)break;else _0x4c2307['push'](_0x4c2307['shift']());}catch(_0x318e19){_0x4c2307['push'](_0x4c2307['shift']());}}}(a142_0x48b6,0xa5780));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a142_0x25bb(_0x432ad9,_0x41b8be){_0x432ad9=_0x432ad9-0x69;const _0x48b6bc=a142_0x48b6();let _0x25bbc0=_0x48b6bc[_0x432ad9];return _0x25bbc0;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a142_0x48b6(){const _0xf20401=['fields','flagMissing','tableName','toLowerCase','sqlType','utf-8','18EoJGjg','11ocfbxP','3606684cdXyrr','validate','from','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','filter','split','push','isArray','110ZuijbS','sql','55442PQdYFX','parameters','read','schema:','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','type','valid','91xjgTpk','File\x20not\x20found:\x20','SQL\x20schema\x20validation','3905667iriDrL','\x22\x20not\x20found\x20in\x20any\x20dataset','trim','Table\x20\x22','cwd','schemaWarnings','isSelectOnly','size','dbtableConfig','isDangerous','file','message','184ssriKi','\x22\x20not\x20found\x20or\x20not\x20accessible','1764459SSNBsc','reason','get','Dataset\x20\x22','tables','47pVcHZR','map','name','schemas','Provide\x20--file\x20or\x20--sql','1885191kIeSOP','str','string','48FGsgMx','5462620VdZkTr'];a142_0x48b6=function(){return _0xf20401;};return a142_0x48b6();}export const sqlValidate={'service':a142_0x433114(0x7b),'command':a142_0x433114(0x73),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a142_0x433114(0x7e),'flags':[{'name':a142_0x433114(0x90),'type':a142_0x433114(0xa0),'description':a142_0x433114(0x75)},{'name':'sql','type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a142_0x433114(0x9c),'type':a142_0x433114(0xa0),'description':a142_0x433114(0x80)}],async 'execute'(_0x209445){const _0x169406=a142_0x433114,_0x3ca594=_0x209445[_0x169406(0x9f)](_0x169406(0x90)),_0x188662=_0x209445[_0x169406(0x9f)]('sql');if(!_0x3ca594&&!_0x188662)throw CliErrors[_0x169406(0x6b)](_0x169406(0x90),_0x169406(0x9d));let _0x23b6ca;if(_0x3ca594){const _0x1fe34d=resolve(process[_0x169406(0x8a)](),_0x3ca594);if(!existsSync(_0x1fe34d))throw CliErrors['validation'](_0x169406(0x84)+_0x1fe34d);_0x23b6ca=readFileSync(_0x1fe34d,_0x169406(0x6f));}else _0x23b6ca=_0x188662;const _0x1a3978=validateSql(_0x23b6ca),_0x3acf3e={'valid':_0x1a3978['valid'],'sqlType':_0x1a3978[_0x169406(0x6e)][_0x169406(0x81)],'isSelectOnly':_0x1a3978[_0x169406(0x6e)][_0x169406(0x8c)],'isDangerous':_0x1a3978[_0x169406(0x6e)][_0x169406(0x8f)],'tables':_0x1a3978[_0x169406(0x98)],'parameters':_0x1a3978[_0x169406(0x7d)],'message':_0x1a3978[_0x169406(0x91)]};_0x1a3978[_0x169406(0x6e)][_0x169406(0x95)]&&(_0x3acf3e[_0x169406(0x95)]=_0x1a3978[_0x169406(0x6e)][_0x169406(0x95)]);const _0x43379a=_0x209445[_0x169406(0x9f)](_0x169406(0x9c));if(_0x43379a&&_0x1a3978[_0x169406(0x82)]){const _0x269477=_0x43379a[_0x169406(0x77)](',')['map'](_0x2827d8=>_0x2827d8[_0x169406(0x88)]())[_0x169406(0x76)](Boolean),_0x2c06df=[],_0x4e2fad=filterDbTableBackedDatasets(await listDatasets(_0x209445['appCode'])),_0x22ddc6=new Map(_0x4e2fad[_0x169406(0x9a)](_0x233182=>[_0x233182[_0x169406(0x8e)]?.[_0x169406(0x6c)]?.['toLowerCase'](),_0x233182]));for(const _0xc30149 of _0x1a3978[_0x169406(0x98)]){const _0x3090b4=_0x22ddc6[_0x169406(0x96)](_0xc30149[_0x169406(0x6d)]());!_0x3090b4&&_0x2c06df[_0x169406(0x78)](_0x169406(0x89)+_0xc30149+_0x169406(0x87));}for(const _0x42e0d8 of _0x269477){let _0x5f282d;try{_0x5f282d=await getDatasetDetail(_0x42e0d8);}catch{_0x2c06df[_0x169406(0x78)](_0x169406(0x97)+_0x42e0d8+_0x169406(0x93));continue;}assertDatasetIsDbTableBacked(_0x5f282d,_0x169406(0x85));const _0x3fd988=Array[_0x169406(0x79)](_0x5f282d[_0x169406(0x6a)])?_0x5f282d[_0x169406(0x6a)]:[],_0x1174c8=new Set(_0x3fd988[_0x169406(0x9a)](_0xac9213=>_0xac9213[_0x169406(0x9b)]?.[_0x169406(0x6d)]())),_0x3aecdc=_0x5f282d['dbtableConfig']?.[_0x169406(0x6c)]||_0x5f282d['tableName']||_0x42e0d8;_0x3acf3e[_0x169406(0x7f)+_0x3aecdc]={'code':_0x42e0d8,'tableName':_0x3aecdc,'fieldCount':_0x1174c8[_0x169406(0x8d)],'fields':Array[_0x169406(0x74)](_0x1174c8)};}_0x2c06df['length']>0x0&&(_0x3acf3e[_0x169406(0x8b)]=_0x2c06df);}return{'ok':_0x1a3978['valid'],'data':_0x3acf3e,'message':_0x1a3978[_0x169406(0x91)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x95afa2=a143_0x535f;(function(_0x8e5d1f,_0x5f0e66){const _0x1cb425=a143_0x535f,_0x59b2ce=_0x8e5d1f();while(!![]){try{const _0x4b126b=-parseInt(_0x1cb425(0xc8))/0x1*(parseInt(_0x1cb425(0xc0))/0x2)+parseInt(_0x1cb425(0xaf))/0x3+-parseInt(_0x1cb425(0xe3))/0x4+-parseInt(_0x1cb425(0xda))/0x5*(-parseInt(_0x1cb425(0xdb))/0x6)+-parseInt(_0x1cb425(0xd2))/0x7+-parseInt(_0x1cb425(0xca))/0x8+parseInt(_0x1cb425(0xd4))/0x9;if(_0x4b126b===_0x5f0e66)break;else _0x59b2ce['push'](_0x59b2ce['shift']());}catch(_0x23988e){_0x59b2ce['push'](_0x59b2ce['shift']());}}}(a143_0x2cf9,0x80399));import{CliErrors}from'../../errors.js';function a143_0x2cf9(){const _0x523f53=['workspace.','join','trim','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','Locale\x20for\x20this\x20workspace\x20app\x20profile','apps','Target\x20environment','674182gdXAAL','Switch\x20the\x20current\x20workspace\x20app\x20binding','2944456dGmlZd','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','number','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','updated','globalConfig','\x20workspace\x20use\x20--app\x20<name>`.','workspace','3064516tCpSsx','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','18597735ZEYsyE','flag','env','\x22\x20not\x20found.','Invalid\x20appcode:\x20','keys','5KvgjVp','92166eifCmT','riskLevel','init','appcode','locale','apiDir','str','\x20--appcode\x20<code>`.','1174776xgNVjj','Missing\x20workspace\x20app\x20selector.','validation','defaultFormat','651462VlgSGC',').\x20Config:\x20','Use\x20`','\x20(appcode:\x20','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20','initialized','format','use','app','project','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Workspace\x20','object','string','length','pageSize','2yzqaFY'];a143_0x2cf9=function(){return _0x523f53;};return a143_0x2cf9();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';function a143_0x535f(_0x11b2de,_0x18c9ea){_0x11b2de=_0x11b2de-0xad;const _0x2cf9b3=a143_0x2cf9();let _0x535f8f=_0x2cf9b3[_0x11b2de];return _0x535f8f;}import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a143_0x95afa2(0xd3),SAFE_PROFILE_KEYS=[a143_0x95afa2(0xde),'env',a143_0x95afa2(0xe0),a143_0x95afa2(0xb6),a143_0x95afa2(0xbf),a143_0x95afa2(0xdc),a143_0x95afa2(0xdf)],workspaceFlags=[{'name':a143_0x95afa2(0xb8),'type':a143_0x95afa2(0xbd),'description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':'appcode','type':a143_0x95afa2(0xbd),'description':a143_0x95afa2(0xba)},{'name':a143_0x95afa2(0xd6),'type':'string','description':a143_0x95afa2(0xc7),'enum':[...RABETBASE_ENV_VALUES]},{'name':a143_0x95afa2(0xe0),'type':a143_0x95afa2(0xbd),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a143_0x95afa2(0xae),'type':a143_0x95afa2(0xbd),'description':a143_0x95afa2(0xc4),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':a143_0x95afa2(0xcc),'description':a143_0x95afa2(0xb3)},{'name':'riskLevel','type':'string','description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a143_0x95afa2(0xdf),'type':a143_0x95afa2(0xbd),'description':a143_0x95afa2(0xc5)}];function isRecord(_0x5ae0dc){const _0x3812b7=a143_0x95afa2;return!!_0x5ae0dc&&typeof _0x5ae0dc===_0x3812b7(0xbc)&&!Array['isArray'](_0x5ae0dc);}function assertValidAppcode(_0x952738){const _0x194dbd=a143_0x95afa2,{valid:_0x399336,message:_0x562f3b}=validateAppcode(_0x952738);if(!_0x399336)throw CliErrors[_0x194dbd(0xad)](_0x194dbd(0xd8)+_0x952738,_0x562f3b);}function sanitizeProfile(_0x44f0b2){if(!isRecord(_0x44f0b2))return{};const _0x370eb8={};for(const _0x15f464 of SAFE_PROFILE_KEYS){if(_0x44f0b2[_0x15f464]!==undefined)_0x370eb8[_0x15f464]=_0x44f0b2[_0x15f464];}return _0x370eb8;}function cloneProfile(_0x4ea67f){return isRecord(_0x4ea67f)?{..._0x4ea67f}:{};}function collectWorkspaceProfileOverrides(_0x1fd3e2){const _0x3b7e1f=a143_0x95afa2,_0x53ff62={},_0x171226=_0x1fd3e2['str'](_0x3b7e1f(0xd6)),_0x243599=_0x1fd3e2['str'](_0x3b7e1f(0xe0)),_0x34eab8=_0x1fd3e2['str'](_0x3b7e1f(0xae)),_0x485bbc=_0x1fd3e2[_0x3b7e1f(0xd5)]('pageSize'),_0xb96764=_0x1fd3e2[_0x3b7e1f(0xe1)](_0x3b7e1f(0xdc)),_0x4712de=_0x1fd3e2['str'](_0x3b7e1f(0xdf));if(_0x171226)_0x53ff62[_0x3b7e1f(0xd6)]=_0x171226;if(_0x243599)_0x53ff62[_0x3b7e1f(0xe0)]=_0x243599;if(_0x34eab8)_0x53ff62[_0x3b7e1f(0xb6)]=_0x34eab8;if(_0x485bbc!==undefined&&_0x485bbc!=='')_0x53ff62['pageSize']=Number(_0x485bbc);if(_0xb96764)_0x53ff62[_0x3b7e1f(0xdc)]=_0xb96764;if(_0x4712de)_0x53ff62[_0x3b7e1f(0xdf)]=_0x4712de;return _0x53ff62;}async function validateWorkspaceArgs(_0x7be422){const _0x5de4d2=a143_0x95afa2,_0x177ff3=_0x7be422[_0x5de4d2(0xe1)](_0x5de4d2(0xb8))[_0x5de4d2(0xc3)](),_0x4ed304=_0x7be422[_0x5de4d2(0xe1)](_0x5de4d2(0xde))['trim']();if(!_0x177ff3&&!_0x4ed304)throw CliErrors['validation'](_0x5de4d2(0xe4),_0x5de4d2(0xb1)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x5de4d2(0xd0));if(_0x4ed304)assertValidAppcode(_0x4ed304);}function resolveKnownApps(){const _0x5a403f=a143_0x95afa2,{config:_0x247d8a,layers:_0x9328be}=readRawConfigWithLayers(),_0x5b5b9d=isRecord(_0x247d8a[_0x5a403f(0xc6)])?_0x247d8a[_0x5a403f(0xc6)]:{},_0x209cea=isRecord(_0x9328be[_0x5a403f(0xcf)]['apps'])?_0x9328be['globalConfig']['apps']:{};return{..._0x209cea,..._0x5b5b9d};}async function configureWorkspace(_0x31e4a0,_0x1cd101){const _0x254776=a143_0x95afa2,_0x57afe1=_0x31e4a0['str'](_0x254776(0xb8))['trim'](),_0x21229b=_0x31e4a0[_0x254776(0xe1)](_0x254776(0xde))[_0x254776(0xc3)](),_0x2093ce=_0x57afe1||_0x21229b;if(!_0x2093ce)throw CliErrors[_0x254776(0xad)]('Missing\x20workspace\x20app\x20selector.',_0x254776(0xb1)+CLI_BIN_NAME+_0x254776(0xcb)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x21229b)assertValidAppcode(_0x21229b);const _0x3e5e64=resolveWriteConfigPath(_0x254776(0xb9)),_0x259630=readConfigFile(_0x3e5e64),_0x3ae60c=resolveKnownApps(),_0x2fb7ed=isRecord(_0x259630[_0x254776(0xc6)])?{..._0x259630[_0x254776(0xc6)]}:{},_0x534861=cloneProfile(_0x2fb7ed[_0x2093ce]),_0x22d422=sanitizeProfile(_0x3ae60c[_0x2093ce]),_0x145898=_0x21229b?{}:_0x22d422,_0x29647d=_0x21229b||_0x145898[_0x254776(0xde)];if(!_0x29647d){const _0x5b8515=Object[_0x254776(0xd9)](_0x3ae60c),_0x2ac83b=_0x5b8515[_0x254776(0xbe)]===0x0?_0x254776(0xb1)+CLI_BIN_NAME+_0x254776(0xb4)+_0x1cd101+'\x20--app\x20'+_0x2093ce+_0x254776(0xe2):_0x254776(0xcd)+_0x5b8515[_0x254776(0xc2)](',\x20');throw CliErrors[_0x254776(0xad)]('App\x20\x22'+_0x2093ce+_0x254776(0xd7),_0x2ac83b);}assertValidAppcode(String(_0x29647d));const _0x1a2d90={..._0x145898,..._0x534861,'appcode':String(_0x29647d),...collectWorkspaceProfileOverrides(_0x31e4a0)};return _0x2fb7ed[_0x2093ce]=_0x1a2d90,_0x259630['apps']=_0x2fb7ed,_0x259630['defaultApp']=_0x2093ce,delete _0x259630[_0x254776(0xde)],delete _0x259630[_0x254776(0xb8)],_0x1a2d90[_0x254776(0xd6)]&&(_0x259630['env']=_0x1a2d90[_0x254776(0xd6)]),writeConfigFile(_0x3e5e64,_0x259630),{'ok':!![],'message':_0x254776(0xbb)+(_0x1cd101==='init'?_0x254776(0xb5):_0x254776(0xce))+':\x20'+_0x2093ce+_0x254776(0xb2)+_0x1a2d90[_0x254776(0xde)]+_0x254776(0xb0)+_0x3e5e64+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x254776(0xc1)+_0x1cd101,'configPath':_0x3e5e64,'app':_0x2093ce,'appcode':_0x1a2d90[_0x254776(0xde)],'env':_0x1a2d90[_0x254776(0xd6)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a143_0x95afa2(0xd1),'command':a143_0x95afa2(0xdd),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x25d18b=>configureWorkspace(_0x25d18b,a143_0x95afa2(0xdd))},workspaceUseDefinition={'service':a143_0x95afa2(0xd1),'command':a143_0x95afa2(0xb7),'description':a143_0x95afa2(0xc9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x4c6b0d=>configureWorkspace(_0x4c6b0d,a143_0x95afa2(0xb7))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x57bb03=a144_0x3b71;(function(_0xb6b58f,_0x56e2f3){const _0x748a07=a144_0x3b71,_0x5da237=_0xb6b58f();while(!![]){try{const _0x11b6a4=parseInt(_0x748a07(0x1d6))/0x1*(parseInt(_0x748a07(0x1e0))/0x2)+parseInt(_0x748a07(0x1d2))/0x3*(-parseInt(_0x748a07(0x1cd))/0x4)+-parseInt(_0x748a07(0x1d3))/0x5*(parseInt(_0x748a07(0x1df))/0x6)+-parseInt(_0x748a07(0x1d7))/0x7*(parseInt(_0x748a07(0x1f1))/0x8)+-parseInt(_0x748a07(0x1cb))/0x9*(parseInt(_0x748a07(0x1f0))/0xa)+-parseInt(_0x748a07(0x1e8))/0xb+-parseInt(_0x748a07(0x1de))/0xc*(-parseInt(_0x748a07(0x1e9))/0xd);if(_0x11b6a4===_0x56e2f3)break;else _0x5da237['push'](_0x5da237['shift']());}catch(_0xc6c26){_0x5da237['push'](_0x5da237['shift']());}}}(a144_0x42ff,0x2181c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a144_0x57bb03(0x1e2),a144_0x57bb03(0x1da),'locale',a144_0x57bb03(0x1ee),'riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a144_0x57bb03(0x1d5),'env',a144_0x57bb03(0x1d8),'format',a144_0x57bb03(0x1e2),'accessKey',a144_0x57bb03(0x1e7)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x5cf89c){const _0x1fb633=a144_0x57bb03;return[..._0x5cf89c][_0x1fb633(0x1ea)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x37fff1){const _0x539a98=a144_0x57bb03;return TOP_LEVEL_CONFIG_KEYS[_0x539a98(0x1ef)](_0x37fff1);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x3bf798=a144_0x57bb03;return _0x3bf798(0x1dd)+getTopLevelConfigKeySummary()+')';}function a144_0x3b71(_0x56dd23,_0x34b49d){_0x56dd23=_0x56dd23-0x1ca;const _0x42ff75=a144_0x42ff();let _0x3b71d3=_0x42ff75[_0x56dd23];return _0x3b71d3;}export const APP_PROFILE_FLAG_KEY_MAP={'env':a144_0x57bb03(0x1dc),'apiDir':a144_0x57bb03(0x1e7),'cookie':a144_0x57bb03(0x1e2),'accessKey':'accessKey','defaultFormat':a144_0x57bb03(0x1ee),'pageSize':a144_0x57bb03(0x1e5),'riskLevel':'riskLevel','locale':a144_0x57bb03(0x1d8)};export function getAppProfileFlagDefs(){const _0x20c974=a144_0x57bb03;return[{'name':_0x20c974(0x1dc),'type':'string','description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x20c974(0x1f2),'description':_0x20c974(0x1f3)},{'name':'cookie','type':'string','description':_0x20c974(0x1e4),'hidden':!![]},{'name':_0x20c974(0x1da),'type':_0x20c974(0x1f2),'description':_0x20c974(0x1d1),'hidden':!![]},{'name':'defaultFormat','type':_0x20c974(0x1f2),'description':_0x20c974(0x1d0),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x20c974(0x1cf),'description':_0x20c974(0x1db)},{'name':_0x20c974(0x1d4),'type':_0x20c974(0x1f2),'description':_0x20c974(0x1ca),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x20c974(0x1d8),'type':_0x20c974(0x1f2),'description':'Locale'}];}export function collectAppProfileOverrides(_0x4d4700){const _0x302891={};for(const [_0x36aef9,_0x5d234a]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x18edc8=_0x4d4700(_0x36aef9);if(!_0x18edc8)continue;_0x302891[_0x5d234a]=_0x5d234a==='pageSize'?Number(_0x18edc8):_0x18edc8;}return _0x302891;}export function buildAppProfileListFields(_0x21bf05){const _0x112335=a144_0x57bb03;return{'env':_0x21bf05[_0x112335(0x1dc)]??null,'apiDir':_0x21bf05[_0x112335(0x1e7)]??null,'hasCookie':!!_0x21bf05['cookie'],'hasAccessKey':!!_0x21bf05[_0x112335(0x1da)],'format':_0x21bf05['format']??null,'pageSize':_0x21bf05[_0x112335(0x1e5)]??null,'riskLevel':_0x21bf05['riskLevel']??null,'locale':_0x21bf05[_0x112335(0x1d8)]??null};}function a144_0x42ff(){const _0x28797b=['API\x20directory\x20path','Risk\x20level','9sRLPJF','zh-CN','176912opAthU','apps','number','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Access\x20key','6mDgvxr','266480dBtAmF','riskLevel','appcode','618IRjBOV','377580wJkaPh','locale','defaultApp','accessKey','Default\x20page\x20size','env','Config\x20key\x20(','2345268ElfONR','24XNkwNQ','2fKTrSV','en-US','cookie','filter','Auth\x20cookie','pageSize','map','apiDir','1870913rttiSw','65SvtVdZ','join','inherit','app','keys','format','has','2609660EbvGEL','16IyqSOV','string'];a144_0x42ff=function(){return _0x28797b;};return a144_0x42ff();}export function buildAppDoctorFields(_0x5c1f8e,_0x186d5f){const _0x2ecb7d=a144_0x57bb03;return{'env':{'value':_0x5c1f8e[_0x2ecb7d(0x1dc)]||_0x186d5f['env'],'source':_0x5c1f8e[_0x2ecb7d(0x1dc)]?_0x2ecb7d(0x1ec):'inherit'},'apiDir':{'value':_0x5c1f8e[_0x2ecb7d(0x1e7)]||_0x186d5f['apiDir'],'source':_0x5c1f8e[_0x2ecb7d(0x1e7)]?_0x2ecb7d(0x1ec):_0x2ecb7d(0x1eb)},'cookie':{'value':_0x5c1f8e['cookie']||_0x186d5f[_0x2ecb7d(0x1e2)],'source':_0x5c1f8e['cookie']?_0x2ecb7d(0x1ec):_0x2ecb7d(0x1eb)},'accessKey':{'value':_0x5c1f8e['accessKey']||_0x186d5f[_0x2ecb7d(0x1da)],'source':_0x5c1f8e[_0x2ecb7d(0x1da)]?_0x2ecb7d(0x1ec):_0x2ecb7d(0x1eb)}};}export function buildCanonicalAppConfig(_0x426b4d,_0x22596f){const _0x5efacd=a144_0x57bb03,_0x30a5a1=_0x426b4d[_0x5efacd(0x1e6)](_0x12e65e=>String(_0x12e65e||'')['trim']())[_0x5efacd(0x1e3)](Boolean);if(_0x30a5a1['length']===0x0)return{};const _0x3568c1={};for(const _0x24a61f of _0x30a5a1){_0x3568c1[_0x24a61f]=_0x22596f?{'appcode':_0x24a61f,'env':_0x22596f}:{'appcode':_0x24a61f};}return{'apps':_0x3568c1,'defaultApp':_0x30a5a1[0x0]};}export function buildCanonicalProjectConfig(_0x26b417,_0x22b039){const _0x36028a=a144_0x57bb03,{appCodes:appCodes=[],env:_0x5a1dc6,metadata:_0x102f60}=_0x22b039,_0x342c58={..._0x26b417,..._0x102f60||{}};delete _0x342c58[_0x36028a(0x1d5)],delete _0x342c58[_0x36028a(0x1ec)];if(_0x5a1dc6)_0x342c58[_0x36028a(0x1dc)]=_0x5a1dc6;else!_0x342c58[_0x36028a(0x1dc)]&&(_0x342c58[_0x36028a(0x1dc)]=DEFAULT_CONFIG_VALUES[_0x36028a(0x1dc)]);const _0x50a6d3=buildCanonicalAppConfig(appCodes,_0x342c58[_0x36028a(0x1dc)]);return Object[_0x36028a(0x1ed)](_0x50a6d3)['length']>0x0&&(_0x342c58[_0x36028a(0x1ce)]=_0x50a6d3[_0x36028a(0x1ce)],_0x342c58[_0x36028a(0x1d9)]=_0x50a6d3[_0x36028a(0x1d9)]),_0x342c58;}const LOCALE_MAP={'zh':a144_0x57bb03(0x1cc),'zh-cn':a144_0x57bb03(0x1cc),'zh_cn':'zh-CN','en':'en-US','en-us':a144_0x57bb03(0x1e1),'en_us':a144_0x57bb03(0x1e1)};export function normalizeLocale(_0x23cf85){if(!_0x23cf85)return null;return LOCALE_MAP[_0x23cf85['toLowerCase']()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a145_0x32ac73=a145_0x3eba;function a145_0x19a2(){const _0x346280=['1135824WnzCnF','5OJWhZA','464078BAXyVl','273948jKqyqC','5225072btDlnI','6310hKxPnQ','6732PHqbif','161KshbmF','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','2lMRoqx','3809076xvWcMZ','4014802MPcVou'];a145_0x19a2=function(){return _0x346280;};return a145_0x19a2();}function a145_0x3eba(_0x128e2d,_0x318da6){_0x128e2d=_0x128e2d-0x103;const _0x19a2ac=a145_0x19a2();let _0x3eba0d=_0x19a2ac[_0x128e2d];return _0x3eba0d;}(function(_0x21ddd0,_0x3bff76){const _0x186b18=a145_0x3eba,_0x81089d=_0x21ddd0();while(!![]){try{const _0x4a5dbc=parseInt(_0x186b18(0x108))/0x1*(-parseInt(_0x186b18(0x103))/0x2)+-parseInt(_0x186b18(0x106))/0x3+parseInt(_0x186b18(0x104))/0x4*(parseInt(_0x186b18(0x107))/0x5)+parseInt(_0x186b18(0x109))/0x6*(-parseInt(_0x186b18(0x10d))/0x7)+parseInt(_0x186b18(0x10a))/0x8+-parseInt(_0x186b18(0x10c))/0x9*(-parseInt(_0x186b18(0x10b))/0xa)+parseInt(_0x186b18(0x105))/0xb;if(_0x4a5dbc===_0x3bff76)break;else _0x81089d['push'](_0x81089d['shift']());}catch(_0x4e1f77){_0x81089d['push'](_0x81089d['shift']());}}}(a145_0x19a2,0x862b1));export const CLI_VERSION_POLICY_URL=a145_0x32ac73(0x10e);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x448bef=a146_0x2c09;(function(_0x3dd5d1,_0x104066){const _0x3f0289=a146_0x2c09,_0x37be99=_0x3dd5d1();while(!![]){try{const _0x3278a5=parseInt(_0x3f0289(0x1e3))/0x1+parseInt(_0x3f0289(0x200))/0x2*(-parseInt(_0x3f0289(0x1fd))/0x3)+-parseInt(_0x3f0289(0x1fa))/0x4*(parseInt(_0x3f0289(0x1c1))/0x5)+-parseInt(_0x3f0289(0x201))/0x6+parseInt(_0x3f0289(0x1e4))/0x7*(parseInt(_0x3f0289(0x20b))/0x8)+-parseInt(_0x3f0289(0x1c6))/0x9*(parseInt(_0x3f0289(0x220))/0xa)+parseInt(_0x3f0289(0x1fe))/0xb*(parseInt(_0x3f0289(0x1cc))/0xc);if(_0x3278a5===_0x104066)break;else _0x37be99['push'](_0x37be99['shift']());}catch(_0x46162c){_0x37be99['push'](_0x37be99['shift']());}}}(a146_0x1e34,0x25f2f));function a146_0x1e34(){const _0x259be8=['watch','Use\x20remote','Function\x20node','target','clear','expected-count','global','tags','params','output','SQL\x20string','Code\x20filter','description','Environment','operation-type','118433DILUrn','1498xpaZEW','Show\x20help','enable-bff-save','Skip\x20confirmation\x20for\x20high-risk\x20writes','Force\x20non-interactive\x20mode\x20(CI)','SQL\x20name','pagesize','yes','code','Name','map','sqlname','sql-name','skip-imports','verbose','fromEnv','Enable\x20BFF\x20save','Verbose\x20output','db-id','help','File\x20path','boolean','16URMtlG','description-file','confirm','25269TeQKaU','4180HKSxvU','string','52nXSTqF','490014EVvCrG','SQL\x20code','JSON\x20params','force','stdin','dbid','Use\x20global\x20config\x20scope','Tags','env','from-env','8888SiSTtO','Record\x20ID','enableBffSave','Watch\x20mode','Read\x20value\x20from\x20stdin','Keyword\x20filter','reveal','rabetbase','remote','app','DB\x20ID','Description','Read\x20value\x20from\x20environment\x20variable','project','Config\x20value','key','dryRun','Reveal\x20sensitive\x20value','json\x20|\x20pretty\x20|\x20compress','format','<code>','4390OmXnZK','non-interactive','Preview\x20operation\x20without\x20executing','Operation\x20type','value','keyword','type','meowKey','fromEntries','9670ZGYcnb','Override\x20appcode','Type\x20filter','all','title','2475OUmDDd','nonInteractive','datasetcode','dry-run','Dataset\x20code','skipImports','7212KQrffY','Confirm\x20destructive\x20action','<expr>','sqlName','page','Rabetbase\x20CLI','appcode','name'];a146_0x1e34=function(){return _0x259be8;};return a146_0x1e34();}export const CLI_BIN_NAME=a146_0x448bef(0x212);export const CLI_DISPLAY_NAME=a146_0x448bef(0x1d1);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';function a146_0x2c09(_0x24b132,_0x519e2c){_0x24b132=_0x24b132-0x1c0;const _0x1e349f=a146_0x1e34();let _0x2c0904=_0x1e349f[_0x24b132];return _0x2c0904;}export const GLOBAL_FLAGS=[{'name':a146_0x448bef(0x1d2),'meowKey':a146_0x448bef(0x1d2),'type':'string','description':a146_0x448bef(0x1c2),'hint':a146_0x448bef(0x21f)},{'name':a146_0x448bef(0x214),'meowKey':a146_0x448bef(0x214),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':'<name>'},{'name':a146_0x448bef(0x209),'meowKey':a146_0x448bef(0x209),'type':'string','description':a146_0x448bef(0x1e1),'hint':'production\x20|\x20daily'},{'name':a146_0x448bef(0x21e),'meowKey':a146_0x448bef(0x21e),'type':'string','description':'Output\x20format','hint':a146_0x448bef(0x21d)},{'name':'jq','meowKey':'jq','type':a146_0x448bef(0x1ff),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a146_0x448bef(0x1ce)},{'name':a146_0x448bef(0x1c9),'meowKey':a146_0x448bef(0x21b),'type':'boolean','description':a146_0x448bef(0x222)},{'name':a146_0x448bef(0x1eb),'meowKey':a146_0x448bef(0x1eb),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1e7)},{'name':a146_0x448bef(0x221),'meowKey':a146_0x448bef(0x1c7),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1e8)},{'name':a146_0x448bef(0x1da),'meowKey':a146_0x448bef(0x1da),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x207)},{'name':a146_0x448bef(0x218),'meowKey':'project','type':a146_0x448bef(0x1f9),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a146_0x448bef(0x1f9),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a146_0x448bef(0x1f7),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1e5)},{'name':'name','meowKey':a146_0x448bef(0x1d3),'type':'string','description':a146_0x448bef(0x1ed),'hidden':!![]},{'name':a146_0x448bef(0x1c5),'meowKey':a146_0x448bef(0x1c5),'type':'string','description':'Title','hidden':!![]},{'name':a146_0x448bef(0x1d8),'meowKey':a146_0x448bef(0x1d8),'type':a146_0x448bef(0x1f9),'description':'Clear','hidden':!![]},{'name':'watch','meowKey':a146_0x448bef(0x1d4),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x20e),'hidden':!![]},{'name':a146_0x448bef(0x1dd),'meowKey':a146_0x448bef(0x1dd),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a146_0x448bef(0x1dc),'meowKey':a146_0x448bef(0x1dc),'type':'string','description':a146_0x448bef(0x203),'hidden':!![]},{'name':a146_0x448bef(0x1c8),'meowKey':a146_0x448bef(0x1c8),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x1ca),'hidden':!![]},{'name':'all','meowKey':a146_0x448bef(0x1c4),'type':a146_0x448bef(0x1f9),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a146_0x448bef(0x1e6),'meowKey':a146_0x448bef(0x20d),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1f4),'hidden':!![]},{'name':'id','meowKey':'id','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x20c),'hidden':!![]},{'name':a146_0x448bef(0x226),'meowKey':a146_0x448bef(0x226),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x1c3),'hidden':!![]},{'name':'file','meowKey':'file','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x1f8),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x202),'hidden':!![]},{'name':a146_0x448bef(0x1f0),'meowKey':a146_0x448bef(0x1cf),'type':a146_0x448bef(0x1ff),'description':'SQL\x20name','hidden':!![]},{'name':a146_0x448bef(0x1ef),'meowKey':'sqlname','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x1e9),'hidden':!![]},{'name':a146_0x448bef(0x1f6),'meowKey':'dbId','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x215),'hidden':!![]},{'name':a146_0x448bef(0x206),'meowKey':a146_0x448bef(0x206),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x215),'hidden':!![]},{'name':a146_0x448bef(0x1e0),'meowKey':a146_0x448bef(0x1e0),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x216),'hidden':!![]},{'name':a146_0x448bef(0x1fb),'meowKey':'descriptionFile','type':a146_0x448bef(0x1ff),'description':'Description\x20file','hidden':!![]},{'name':'page','meowKey':a146_0x448bef(0x1d0),'type':a146_0x448bef(0x1ff),'description':'Page\x20number','hidden':!![]},{'name':'pagesize','meowKey':a146_0x448bef(0x1ea),'type':a146_0x448bef(0x1ff),'description':'Page\x20size','hidden':!![]},{'name':a146_0x448bef(0x225),'meowKey':'keyword','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x210),'hidden':!![]},{'name':a146_0x448bef(0x1ec),'meowKey':a146_0x448bef(0x1ec),'type':'string','description':a146_0x448bef(0x1df),'hidden':!![]},{'name':'sql','meowKey':'sql','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x1de),'hidden':!![]},{'name':'schemas','meowKey':'schemas','type':a146_0x448bef(0x1ff),'description':'Schemas','hidden':!![]},{'name':'operation','meowKey':'operation','type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x223),'hidden':!![]},{'name':'target','meowKey':a146_0x448bef(0x1d7),'type':'string','description':'Target\x20path','hidden':!![]},{'name':a146_0x448bef(0x1f1),'meowKey':a146_0x448bef(0x1cb),'type':a146_0x448bef(0x1f9),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a146_0x448bef(0x21a),'meowKey':'key','type':'string','description':'Config\x20key','hidden':!![]},{'name':a146_0x448bef(0x224),'meowKey':a146_0x448bef(0x224),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x219),'hidden':!![]},{'name':a146_0x448bef(0x1db),'meowKey':a146_0x448bef(0x1db),'type':'string','description':a146_0x448bef(0x208),'hidden':!![]},{'name':a146_0x448bef(0x205),'meowKey':'stdin','type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x20f),'hidden':!![]},{'name':a146_0x448bef(0x20a),'meowKey':a146_0x448bef(0x1f3),'type':a146_0x448bef(0x1ff),'description':a146_0x448bef(0x217),'hidden':!![]},{'name':a146_0x448bef(0x211),'meowKey':a146_0x448bef(0x211),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x21c),'hidden':!![]},{'name':a146_0x448bef(0x204),'meowKey':a146_0x448bef(0x204),'type':a146_0x448bef(0x1f9),'description':'Force\x20overwrite','hidden':!![]},{'name':'confirm','meowKey':a146_0x448bef(0x1fc),'type':'boolean','description':a146_0x448bef(0x1cd),'hidden':!![]},{'name':a146_0x448bef(0x213),'meowKey':a146_0x448bef(0x213),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1d5),'hidden':!![]},{'name':'verbose','meowKey':a146_0x448bef(0x1f2),'type':a146_0x448bef(0x1f9),'description':a146_0x448bef(0x1f5),'hidden':!![]},{'name':a146_0x448bef(0x1d9),'meowKey':'expectedCount','type':a146_0x448bef(0x1ff),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a146_0x448bef(0x1e2),'meowKey':'operationType','type':'string','description':a146_0x448bef(0x223),'hidden':!![]},{'name':'function-node','meowKey':'functionNode','type':'string','description':a146_0x448bef(0x1d6),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a146_0x448bef(0x1d2),a146_0x448bef(0x214),a146_0x448bef(0x209),'format','jq',a146_0x448bef(0x1c9),'yes',a146_0x448bef(0x221),'ci']);export function buildMeowFlags(){const _0x236007=a146_0x448bef;return Object[_0x236007(0x1c0)](GLOBAL_FLAGS[_0x236007(0x1ee)](_0xf6cbbe=>[_0xf6cbbe[_0x236007(0x227)],{'type':_0xf6cbbe['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x568f1c=a147_0x58cf;function a147_0x58cf(_0x293b0a,_0x417008){_0x293b0a=_0x293b0a-0x6b;const _0x565007=a147_0x5650();let _0x58cf01=_0x565007[_0x293b0a];return _0x58cf01;}(function(_0x27fb16,_0x5b6a67){const _0x2eaac0=a147_0x58cf,_0x494f9b=_0x27fb16();while(!![]){try{const _0x469a40=parseInt(_0x2eaac0(0x77))/0x1*(-parseInt(_0x2eaac0(0x71))/0x2)+-parseInt(_0x2eaac0(0x6c))/0x3+parseInt(_0x2eaac0(0x75))/0x4*(-parseInt(_0x2eaac0(0x6e))/0x5)+parseInt(_0x2eaac0(0x6f))/0x6+-parseInt(_0x2eaac0(0x72))/0x7+parseInt(_0x2eaac0(0x74))/0x8+parseInt(_0x2eaac0(0x6d))/0x9;if(_0x469a40===_0x5b6a67)break;else _0x494f9b['push'](_0x494f9b['shift']());}catch(_0x3ddcea){_0x494f9b['push'](_0x494f9b['shift']());}}}(a147_0x5650,0x2a0d7));import{DEFAULT_API_DIR}from'../constant/paths.js';function a147_0x5650(){const _0x1028c1=['424BQgWRh','compress','5QeiyLo','production','180882IxkYMi','2476863jCclIj','5995tpyIJK','754644XAdRsW','en-US','88058rfLjqm','687708MfHjat','high-risk-write','2216344hYNxNZ'];a147_0x5650=function(){return _0x1028c1;};return a147_0x5650();}export const DEFAULT_CONFIG_VALUES={'env':a147_0x568f1c(0x6b),'format':'compress','locale':a147_0x568f1c(0x70),'riskLevel':a147_0x568f1c(0x73),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a147_0x568f1c(0x76);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a148_0x328b79=a148_0x1c82;(function(_0x27095d,_0x59f506){const _0x15d9ed=a148_0x1c82,_0x5555e7=_0x27095d();while(!![]){try{const _0x54d39d=-parseInt(_0x15d9ed(0x115))/0x1*(-parseInt(_0x15d9ed(0x119))/0x2)+parseInt(_0x15d9ed(0x10e))/0x3+parseInt(_0x15d9ed(0x10f))/0x4*(-parseInt(_0x15d9ed(0x11d))/0x5)+-parseInt(_0x15d9ed(0x116))/0x6*(-parseInt(_0x15d9ed(0x10d))/0x7)+-parseInt(_0x15d9ed(0x111))/0x8*(parseInt(_0x15d9ed(0x113))/0x9)+-parseInt(_0x15d9ed(0x120))/0xa+-parseInt(_0x15d9ed(0x11c))/0xb*(-parseInt(_0x15d9ed(0x114))/0xc);if(_0x54d39d===_0x59f506)break;else _0x5555e7['push'](_0x5555e7['shift']());}catch(_0x2432a3){_0x5555e7['push'](_0x5555e7['shift']());}}}(a148_0x252b,0x6e5d0));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x1ae553){const _0x5c71c4=a148_0x1c82;customApiDomain=_0x1ae553?.[_0x5c71c4(0x110)],customUserDomain=_0x1ae553?.[_0x5c71c4(0x117)],customRuntimeDomain=_0x1ae553?.[_0x5c71c4(0x11e)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a148_0x328b79(0x11f));function a148_0x1c82(_0x593f72,_0x474f40){_0x593f72=_0x593f72-0x10d;const _0x252b56=a148_0x252b();let _0x1c825a=_0x252b56[_0x593f72];return _0x1c825a;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a148_0x328b79(0x11a));function a148_0x252b(){const _0x43548c=['https://daily-runtime.lovrabet.com','https://app.lovrabet.com','11uhJgRH','335dreSML','runtimeDomain','https://user-daily.lovrabet.com','4360180lyWqVN','1037757zZylOL','100737ZfNoZc','7928xTyfNL','apiDomain','4774216RCSLmb','/app/','9vvOETa','9102972CmyhHP','9358zAuOvE','30zbwpKT','userDomain','/web-app/app/','18dgXook'];a148_0x252b=function(){return _0x43548c;};return a148_0x252b();}export const getAppDomain=()=>isProduction(getEnv())?a148_0x328b79(0x11b):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x1de949=>{const _0x1cfc1c=a148_0x328b79,_0x3039df=encodeURIComponent(_0x1de949['trim']());return isProduction(getEnv())?getAppDomain()+_0x1cfc1c(0x112)+_0x3039df:getAppDomain()+_0x1cfc1c(0x118)+_0x3039df;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x8d0c8b=a149_0x1bf3;(function(_0x1d1feb,_0x2e8b35){const _0x58c23f=a149_0x1bf3,_0x59e0f9=_0x1d1feb();while(!![]){try{const _0x366098=-parseInt(_0x58c23f(0x183))/0x1*(-parseInt(_0x58c23f(0x188))/0x2)+parseInt(_0x58c23f(0x17a))/0x3+parseInt(_0x58c23f(0x187))/0x4*(parseInt(_0x58c23f(0x17f))/0x5)+-parseInt(_0x58c23f(0x184))/0x6+-parseInt(_0x58c23f(0x186))/0x7*(parseInt(_0x58c23f(0x17b))/0x8)+parseInt(_0x58c23f(0x182))/0x9*(parseInt(_0x58c23f(0x185))/0xa)+-parseInt(_0x58c23f(0x17e))/0xb*(parseInt(_0x58c23f(0x181))/0xc);if(_0x366098===_0x2e8b35)break;else _0x59e0f9['push'](_0x59e0f9['shift']());}catch(_0xb77fbb){_0x59e0f9['push'](_0x59e0f9['shift']());}}}(a149_0x4b1c,0x5cd79));function a149_0x1bf3(_0xde9b7,_0x32a49a){_0xde9b7=_0xde9b7-0x17a;const _0x4b1c52=a149_0x4b1c();let _0x1bf3a8=_0x4b1c52[_0xde9b7];return _0x1bf3a8;}export const RABETBASE_ENV_VALUES=[a149_0x8d0c8b(0x17d),a149_0x8d0c8b(0x17c)];function a149_0x4b1c(){const _0x179e6d=['production','48103hQRGAT','15rVMvOk','online','1572tITdQD','126kqAhsU','2315xiDFWL','2443170uSYlej','162510kLiDRj','14rNkDYr','448924nUTXjD','212rgtihk','development','1916886jRPPrx','352880QNgRBU','daily'];a149_0x4b1c=function(){return _0x179e6d;};return a149_0x4b1c();}export function normalizeEnv(_0x448f5b){const _0x2a8c2a=a149_0x8d0c8b;return _0x448f5b===_0x2a8c2a(0x180)?'production':_0x448f5b;}export function isProduction(_0x4356c0){return normalizeEnv(_0x4356c0)==='production';}export function isDaily(_0x4efa3a){const _0x32320a=a149_0x8d0c8b;return normalizeEnv(_0x4efa3a)===_0x32320a(0x17c);}export function isDev(_0x293ced){const _0x78016=a149_0x8d0c8b,_0x29e642=normalizeEnv(_0x293ced);return _0x29e642===_0x78016(0x189)||_0x29e642==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a149_0x8d0c8b(0x17d));export function getEnv(){return env;}export function initEnv(_0x42c46e){env=normalizeEnv(_0x42c46e);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a150_0x54e3f5=a150_0xb2a7;function a150_0xb2a7(_0x17426a,_0x74044f){_0x17426a=_0x17426a-0x138;const _0x2ea631=a150_0x2ea6();let _0xb2a7fe=_0x2ea631[_0x17426a];return _0xb2a7fe;}(function(_0x216528,_0x3aab6d){const _0x4b9cd1=a150_0xb2a7,_0x3c0da0=_0x216528();while(!![]){try{const _0x3d00e7=parseInt(_0x4b9cd1(0x138))/0x1+-parseInt(_0x4b9cd1(0x13f))/0x2*(-parseInt(_0x4b9cd1(0x13d))/0x3)+-parseInt(_0x4b9cd1(0x13c))/0x4+parseInt(_0x4b9cd1(0x144))/0x5*(-parseInt(_0x4b9cd1(0x143))/0x6)+parseInt(_0x4b9cd1(0x142))/0x7+parseInt(_0x4b9cd1(0x13b))/0x8*(parseInt(_0x4b9cd1(0x139))/0x9)+-parseInt(_0x4b9cd1(0x13a))/0xa*(parseInt(_0x4b9cd1(0x140))/0xb);if(_0x3d00e7===_0x3aab6d)break;else _0x3c0da0['push'](_0x3c0da0['shift']());}catch(_0x2dbf0f){_0x3c0da0['push'](_0x3c0da0['shift']());}}}(a150_0x2ea6,0x5e04c));function a150_0x2ea6(){const _0x2df0e7=['json','1726tFgBxB','22EDcYna','pretty','2797095RDkNlM','6OKvYnz','3377595rHmyFL','123700Hypszq','18OKVkmE','168930KYztXv','3041608ZfIRtY','1205888gxoryX','390QdVavF'];a150_0x2ea6=function(){return _0x2df0e7;};return a150_0x2ea6();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a150_0x54e3f5(0x13e),a150_0x54e3f5(0x141),'compress'];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a151_0xd490(_0x5aeb6c,_0x384ed1){_0x5aeb6c=_0x5aeb6c-0x17f;const _0x5df149=a151_0x5df1();let _0xd4900b=_0x5df149[_0x5aeb6c];return _0xd4900b;}const a151_0x35e154=a151_0xd490;function a151_0x5df1(){const _0x4f5a45=['9653445BAOWee','2MGuylP','2737644IiMIlP','245RueaHw','207039jOhBwU','936483zLjuJJ','2593086pcFOdm','540vjjdXz','2353000dViwrP','./src/api'];a151_0x5df1=function(){return _0x4f5a45;};return a151_0x5df1();}(function(_0x333b6c,_0x40d843){const _0xdd91e4=a151_0xd490,_0x47187b=_0x333b6c();while(!![]){try{const _0x281122=-parseInt(_0xdd91e4(0x180))/0x1+parseInt(_0xdd91e4(0x187))/0x2*(-parseInt(_0xdd91e4(0x181))/0x3)+parseInt(_0xdd91e4(0x183))/0x4*(parseInt(_0xdd91e4(0x17f))/0x5)+-parseInt(_0xdd91e4(0x182))/0x6+parseInt(_0xdd91e4(0x188))/0x7+-parseInt(_0xdd91e4(0x184))/0x8+parseInt(_0xdd91e4(0x186))/0x9;if(_0x281122===_0x40d843)break;else _0x47187b['push'](_0x47187b['shift']());}catch(_0x24c1a8){_0x47187b['push'](_0x47187b['shift']());}}}(a151_0x5df1,0x36e26));export const DEFAULT_API_DIR=a151_0x35e154(0x185);
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x39c350=a152_0x3b73;function a152_0x467e(){const _0x23348c=['34242AdWyRp','105075EDVkZh','324208XosnmE','read','20ItRubS','694225QDYjTp','write','34YYdSFJ','154885QGigAi','177669uXQvVs','770qigxsT','792972jJsFzW','high-risk-write'];a152_0x467e=function(){return _0x23348c;};return a152_0x467e();}function a152_0x3b73(_0x4e8bc8,_0x5d16a){_0x4e8bc8=_0x4e8bc8-0x175;const _0x467e57=a152_0x467e();let _0x3b73f8=_0x467e57[_0x4e8bc8];return _0x3b73f8;}(function(_0x42d020,_0x43952d){const _0x1584c8=a152_0x3b73,_0x3ca7f6=_0x42d020();while(!![]){try{const _0x59c597=-parseInt(_0x1584c8(0x17b))/0x1+-parseInt(_0x1584c8(0x179))/0x2*(parseInt(_0x1584c8(0x17f))/0x3)+-parseInt(_0x1584c8(0x176))/0x4*(parseInt(_0x1584c8(0x17a))/0x5)+-parseInt(_0x1584c8(0x17d))/0x6+-parseInt(_0x1584c8(0x177))/0x7+-parseInt(_0x1584c8(0x181))/0x8+-parseInt(_0x1584c8(0x180))/0x9*(-parseInt(_0x1584c8(0x17c))/0xa);if(_0x59c597===_0x43952d)break;else _0x3ca7f6['push'](_0x3ca7f6['shift']());}catch(_0x576f67){_0x3ca7f6['push'](_0x3ca7f6['shift']());}}}(a152_0x467e,0x188a8));export const RISK_LEVEL_VALUES=[a152_0x39c350(0x175),a152_0x39c350(0x178),a152_0x39c350(0x17e)];
|