@lovrabet/rabetbase-cli 2.1.7-beta.2 → 2.1.7-beta.3
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/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-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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.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 -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/report.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/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/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/skill/index.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/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.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a123_0x2cdd85=a123_0x4660;(function(_0x2d47c3,_0x136960){const _0x5e94e0=a123_0x4660,_0x47f91e=_0x2d47c3();while(!![]){try{const _0x5cf1f9=parseInt(_0x5e94e0(0x1ac))/0x1+-parseInt(_0x5e94e0(0x1a6))/0x2+parseInt(_0x5e94e0(0x1c1))/0x3+parseInt(_0x5e94e0(0x1a3))/0x4+parseInt(_0x5e94e0(0x1bb))/0x5*(parseInt(_0x5e94e0(0x1a9))/0x6)+-parseInt(_0x5e94e0(0x1c8))/0x7+-parseInt(_0x5e94e0(0x1b2))/0x8*(parseInt(_0x5e94e0(0x1a5))/0x9);if(_0x5cf1f9===_0x136960)break;else _0x47f91e['push'](_0x47f91e['shift']());}catch(_0x5eecf4){_0x47f91e['push'](_0x47f91e['shift']());}}}(a123_0x3c11,0xb53a2));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a123_0x3c11(){const _0x180091=['close','sqlCode','filter','sqls','endsWith','2929854tmqelW','stdin','length','test','.rabetbase/sql','version','join','7633731avzHvX','replace','trim','mybatisXml','4693596bTugsI','mode','201105oTnYdq','2619604WMNfzM','path','apps','1026yDTgkl','stderr','push','635786FZuMYi','sqlName','--\x20@lovrabet.','\x20[y/N]\x20','question','dbId','312vIVjmq','dbName','lastSync','yes','sqlRoot','description','map','fromEntries','syncedAt','35915gzBJwR'];a123_0x3c11=function(){return _0x180091;};return a123_0x3c11();}function a123_0x4660(_0x3a85a3,_0x574d65){_0x3a85a3=_0x3a85a3-0x1a1;const _0x3c11bb=a123_0x3c11();let _0x4660ec=_0x3c11bb[_0x3a85a3];return _0x4660ec;}export const SQL_LOCAL_REL_DIR=a123_0x2cdd85(0x1c5);export function buildSqlLockEntry(_0xd6c9b1,_0x1b3a51,_0x3c1dbe,_0x504e10){const _0x1749bf=a123_0x2cdd85,_0x3e50e7=detectSqlMode(_0x1b3a51);return{'path':buildSqlRelativePath(_0xd6c9b1['sqlCode'],_0xd6c9b1['sqlName'],_0x504e10?.['dbName'],_0x3e50e7,_0xd6c9b1[_0x1749bf(0x1b1)]),'hash':_0x3c1dbe,'remoteId':_0xd6c9b1['id'],'version':_0xd6c9b1[_0x1749bf(0x1c6)],'dbId':Number(_0xd6c9b1[_0x1749bf(0x1b1)]),'dbName':_0x504e10?.[_0x1749bf(0x1b3)],'sqlName':_0xd6c9b1['sqlName'],'sqlConfig':_0xd6c9b1['sqlConfig']??undefined,'mode':_0x3e50e7};}export function cloneSqlLockData(_0x3aece5){const _0x58af63=a123_0x2cdd85;return{'apps':Object[_0x58af63(0x1b9)](Object['entries'](_0x3aece5['apps'])[_0x58af63(0x1b8)](([_0x510893,_0x349449])=>[_0x510893,{'sqlRoot':_0x349449[_0x58af63(0x1b6)],'lastSync':_0x349449[_0x58af63(0x1b4)],'sqls':{..._0x349449[_0x58af63(0x1bf)]}}]))};}export function ensureRemoteSqlContent(_0x4eeeb6){return _0x4eeeb6['sqlContent']??'';}export function buildLocalSqlFileContent(_0x413529,_0x544205,_0x1e5df3){const _0x1baf9e=a123_0x2cdd85,_0x2cbb79=_0x1e5df3?.[_0x1baf9e(0x1a4)]??detectSqlMode(_0x544205),_0x57096c=stripLocalSqlMetadata(_0x544205,_0x2cbb79)[_0x1baf9e(0x1a1)](),_0x20ac64=[...buildMetadataHeaderLines({'sqlCode':_0x413529[_0x1baf9e(0x1bd)],'sqlName':_0x413529[_0x1baf9e(0x1ad)],'dbId':_0x413529[_0x1baf9e(0x1b1)],'dbName':_0x1e5df3?.['dbName'],'mode':_0x2cbb79,'syncedAt':_0x1e5df3?.[_0x1baf9e(0x1ba)],'description':_0x1e5df3?.['description']},_0x2cbb79),'',_0x57096c],_0x4feea0=_0x20ac64[_0x1baf9e(0x1c7)]('\x0a');return _0x4feea0[_0x1baf9e(0x1c0)]('\x0a')?_0x4feea0:_0x4feea0+'\x0a';}export function stripLocalSqlMetadata(_0x3695fd,_0x4331bb){const _0x4a7b37=a123_0x2cdd85,_0x2ce222=_0x3695fd[_0x4a7b37(0x1c9)](/\r\n/g,'\x0a')['split']('\x0a'),_0x35a2e3=[];let _0x4595ec=0x0;if(_0x4331bb===_0x4a7b37(0x1a2))while(_0x4595ec<_0x2ce222[_0x4a7b37(0x1c3)]){const _0xb1fd2c=_0x2ce222[_0x4595ec]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0xb1fd2c)){_0x4595ec++;continue;}if(_0xb1fd2c['trim']()===''&&_0x4595ec>0x0){_0x4595ec++;continue;}break;}else while(_0x4595ec<_0x2ce222[_0x4a7b37(0x1c3)]){const _0x5bbadf=_0x2ce222[_0x4595ec]??'';if(/^\s*--\s*@lovrabet\./[_0x4a7b37(0x1c4)](_0x5bbadf)){_0x4595ec++;continue;}if(_0x5bbadf[_0x4a7b37(0x1a1)]()===''&&_0x4595ec>0x0){_0x4595ec++;continue;}break;}for(;_0x4595ec<_0x2ce222[_0x4a7b37(0x1c3)];_0x4595ec++){_0x35a2e3[_0x4a7b37(0x1ab)](_0x2ce222[_0x4595ec]);}return _0x35a2e3[_0x4a7b37(0x1c7)]('\x0a')['trimStart']();}export function resolveSqlMode(_0x5db442,_0x4e24a7){const _0x218523=a123_0x2cdd85;if(_0x4e24a7?.[_0x218523(0x1a4)])return _0x4e24a7[_0x218523(0x1a4)];return detectSqlMode(_0x5db442);}export function resolveSqlFileName(_0x458f0d,_0xbd1c70,_0xc333c1){const _0xa7e8f1=a123_0x2cdd85;if(_0xc333c1?.[_0xa7e8f1(0x1a7)])return _0xc333c1[_0xa7e8f1(0x1a7)];if(_0xc333c1?.[_0xa7e8f1(0x1ad)]||_0xc333c1?.[_0xa7e8f1(0x1b3)])return buildSqlRelativePath(_0x458f0d,_0xc333c1?.['sqlName'],_0xc333c1?.[_0xa7e8f1(0x1b3)],resolveSqlMode(_0xbd1c70,_0xc333c1),_0xc333c1?.[_0xa7e8f1(0x1b1)]);return buildDefaultSqlFileName(_0x458f0d,resolveSqlMode(_0xbd1c70,_0xc333c1));}export function resolveSqlLocalDir(_0x2a209f,_0x51fc7f){return join(_0x2a209f,SQL_LOCAL_REL_DIR,_0x51fc7f);}export async function confirmForceOverwrite(_0x67e561){const _0x38baa4=a123_0x2cdd85,_0x2e15ca=createInterface({'input':process[_0x38baa4(0x1c2)],'output':process[_0x38baa4(0x1aa)]}),_0x567099=await new Promise(_0x323845=>{const _0x204ea3=_0x38baa4;_0x2e15ca[_0x204ea3(0x1b0)](_0x67e561+_0x204ea3(0x1af),_0x323845);});return _0x2e15ca[_0x38baa4(0x1bc)](),['y',_0x38baa4(0x1b5)]['includes'](_0x567099[_0x38baa4(0x1a1)]()['toLowerCase']());}export function findSqlLockScope(_0x213d7f,_0x4ea24a){const _0xa2c4f8=a123_0x2cdd85;return _0x213d7f[_0xa2c4f8(0x1a8)][_0x4ea24a];}function buildMetadataHeaderLines(_0x52bba6,_0x552a1c){const _0x76f0b0=a123_0x2cdd85,_0x258716=[[_0x76f0b0(0x1bd),_0x52bba6[_0x76f0b0(0x1bd)]],['sqlName',_0x52bba6['sqlName']],['dbId',_0x52bba6[_0x76f0b0(0x1b1)]],[_0x76f0b0(0x1b3),_0x52bba6[_0x76f0b0(0x1b3)]],[_0x76f0b0(0x1a4),_0x52bba6['mode']],[_0x76f0b0(0x1ba),_0x52bba6[_0x76f0b0(0x1ba)]],[_0x76f0b0(0x1b7),_0x52bba6[_0x76f0b0(0x1b7)]]];if(_0x552a1c==='mybatisXml')return _0x258716['filter'](([,_0x4c0278])=>_0x4c0278!==undefined&&_0x4c0278!==null&&String(_0x4c0278)['trim']()!=='')[_0x76f0b0(0x1b8)](([_0x363fc1,_0x1dc64f])=>'<!--\x20@lovrabet.'+_0x363fc1+':\x20'+String(_0x1dc64f)+'\x20-->');return _0x258716[_0x76f0b0(0x1be)](([,_0x70d15a])=>_0x70d15a!==undefined&&_0x70d15a!==null&&String(_0x70d15a)[_0x76f0b0(0x1a1)]()!=='')[_0x76f0b0(0x1b8)](([_0x840183,_0x290a75])=>_0x76f0b0(0x1ae)+_0x840183+':\x20'+String(_0x290a75));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a124_0x32c515=a124_0x58da;function a124_0x45db(){const _0x3e6862=['read','hash','99084yDhpjh','4180QCcvXp','\x20modified,\x20','length','1661eylOKg','appCode','bool','5OWvrJZ','boolean','has','lockKey','\x20missing,\x20','map','sqls','872235TRwNPY','totalCount','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','51316EfoVgk','9fNXTMO','remote','6XwSuBZ','518945dVeAGr','sqlName','filePath','1611744gvyttX','\x20added,\x20','lockFilePath','push','status','sqlCode','sqlRoot','83234MjIIlw','\x20remote-only','sql','\x20unchanged'];a124_0x45db=function(){return _0x3e6862;};return a124_0x45db();}(function(_0x45512c,_0x45da5f){const _0x489023=a124_0x58da,_0x2f0072=_0x45512c();while(!![]){try{const _0x37ffa0=parseInt(_0x489023(0xaa))/0x1+parseInt(_0x489023(0xa4))/0x2*(-parseInt(_0x489023(0x97))/0x3)+parseInt(_0x489023(0x96))/0x4*(-parseInt(_0x489023(0xb1))/0x5)+-parseInt(_0x489023(0x99))/0x6*(parseInt(_0x489023(0x9a))/0x7)+parseInt(_0x489023(0x9d))/0x8+parseInt(_0x489023(0x93))/0x9+-parseInt(_0x489023(0xab))/0xa*(parseInt(_0x489023(0xae))/0xb);if(_0x37ffa0===_0x45da5f)break;else _0x2f0072['push'](_0x2f0072['shift']());}catch(_0x58d0ae){_0x2f0072['push'](_0x2f0072['shift']());}}}(a124_0x45db,0x1dea6));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;function a124_0x58da(_0xc6d9aa,_0x59b397){_0xc6d9aa=_0xc6d9aa-0x92;const _0x45db15=a124_0x45db();let _0x58da70=_0x45db15[_0xc6d9aa];return _0x58da70;}async function fetchAllSqlCodes(_0x112a7f){const _0x46523f=a124_0x58da,_0xcd3a99=[];let _0x253e56=0x1;while(!![]){const _0x3d153d=await listSqlQueries(_0x112a7f,{'currentPage':_0x253e56,'pageSize':PAGE_SIZE}),_0x25163d=_0x3d153d['tableData']??[];_0xcd3a99['push'](..._0x25163d['map'](_0x222253=>_0x222253[_0x46523f(0xa2)]));if(_0x25163d[_0x46523f(0xad)]===0x0)break;const _0x2bd7df=_0x3d153d['paging']?.[_0x46523f(0x94)];if(_0x2bd7df!=null?_0xcd3a99[_0x46523f(0xad)]>=_0x2bd7df:_0x25163d[_0x46523f(0xad)]<PAGE_SIZE)break;_0x253e56++;}return _0xcd3a99;}export const sqlStatus={'service':a124_0x32c515(0xa6),'command':a124_0x32c515(0xa1),'description':a124_0x32c515(0x95),'risk':a124_0x32c515(0xa8),'flags':[{'name':a124_0x32c515(0x98),'type':a124_0x32c515(0xb2),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x4f81b3){const _0x4ce7d6=a124_0x32c515,_0x17ad63=loadSqlProjectConfig(_0x4f81b3[_0x4ce7d6(0xaf)]),_0x14b553=await readSqlLockFile(_0x17ad63[_0x4ce7d6(0x9f)]),{appLock:_0x2a341a}=ensureSqlLockScope(_0x14b553??createEmptySqlLock(),_0x17ad63[_0x4ce7d6(0xaf)],_0x17ad63[_0x4ce7d6(0xa3)],'status'),_0x102ed4=await scanLocalSqlQueries(_0x17ad63),_0x897faa=[],_0x490ebe=[],_0xf2b8=[],_0x197a74=[],_0x8d55ee=new Set(_0x102ed4[_0x4ce7d6(0xb6)](_0x519279=>_0x519279[_0x4ce7d6(0xb4)]));for(const _0x55f1ef of _0x102ed4){const _0x472104=await computeSqlFileHash(_0x55f1ef[_0x4ce7d6(0x9c)]),_0x4cd772=_0x2a341a[_0x4ce7d6(0x92)][_0x55f1ef['lockKey']],_0x49d45f=!!_0x4cd772&&_0x4cd772['path']!==_0x55f1ef['relativePath'],_0x1060d3=!!_0x4cd772&&!!_0x55f1ef[_0x4ce7d6(0x9b)]&&_0x4cd772[_0x4ce7d6(0x9b)]!==_0x55f1ef[_0x4ce7d6(0x9b)];if(!_0x4cd772)_0x897faa[_0x4ce7d6(0xa0)](_0x55f1ef[_0x4ce7d6(0xb4)]);else _0x4cd772[_0x4ce7d6(0xa9)]!==_0x472104||_0x49d45f||_0x1060d3?_0x490ebe[_0x4ce7d6(0xa0)](_0x55f1ef[_0x4ce7d6(0xb4)]):_0xf2b8[_0x4ce7d6(0xa0)](_0x55f1ef[_0x4ce7d6(0xb4)]);}for(const _0x3cda5c of Object['keys'](_0x2a341a[_0x4ce7d6(0x92)])){!_0x8d55ee[_0x4ce7d6(0xb3)](_0x3cda5c)&&_0x197a74[_0x4ce7d6(0xa0)](_0x3cda5c);}const _0x2fa323=[];if(_0x4f81b3[_0x4ce7d6(0xb0)](_0x4ce7d6(0x98))){const _0x38e55e=await fetchAllSqlCodes(_0x4f81b3[_0x4ce7d6(0xaf)]);for(const _0x1b26e9 of _0x38e55e){!_0x8d55ee[_0x4ce7d6(0xb3)](_0x1b26e9)&&!_0x2a341a['sqls'][_0x1b26e9]&&_0x2fa323[_0x4ce7d6(0xa0)](_0x1b26e9);}}const _0x2754d6=_0x897faa[_0x4ce7d6(0xad)]===0x0&&_0x490ebe[_0x4ce7d6(0xad)]===0x0&&_0x197a74['length']===0x0&&_0x2fa323[_0x4ce7d6(0xad)]===0x0;return{'ok':!![],'data':{'added':_0x897faa,'modified':_0x490ebe,'missing':_0x197a74,'unchanged':_0xf2b8,'remoteOnly':_0x2fa323},'message':_0x2754d6?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x897faa[_0x4ce7d6(0xad)]+_0x4ce7d6(0x9e)+_0x490ebe[_0x4ce7d6(0xad)]+_0x4ce7d6(0xac)+_0x197a74['length']+_0x4ce7d6(0xb5)+_0xf2b8['length']+_0x4ce7d6(0xa7)+(_0x2fa323[_0x4ce7d6(0xad)]>0x0?',\x20'+_0x2fa323['length']+_0x4ce7d6(0xa5):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0x298cf9=a125_0x1978;(function(_0x2fb6b9,_0x371526){const _0xcb05ca=a125_0x1978,_0x5fb92a=_0x2fb6b9();while(!![]){try{const _0x442e99=parseInt(_0xcb05ca(0x18b))/0x1+parseInt(_0xcb05ca(0x183))/0x2+parseInt(_0xcb05ca(0x197))/0x3*(-parseInt(_0xcb05ca(0x18f))/0x4)+-parseInt(_0xcb05ca(0x189))/0x5+parseInt(_0xcb05ca(0x194))/0x6*(-parseInt(_0xcb05ca(0x177))/0x7)+parseInt(_0xcb05ca(0x178))/0x8*(-parseInt(_0xcb05ca(0x16e))/0x9)+parseInt(_0xcb05ca(0x174))/0xa;if(_0x442e99===_0x371526)break;else _0x5fb92a['push'](_0x5fb92a['shift']());}catch(_0x484fb1){_0x5fb92a['push'](_0x5fb92a['shift']());}}}(a125_0x3007,0xc705a));function a125_0x1978(_0x2d242c,_0x4fafb3){_0x2d242c=_0x2d242c-0x16e;const _0x3007a7=a125_0x3007();let _0x1978df=_0x3007a7[_0x2d242c];return _0x1978df;}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':'sql','command':a125_0x298cf9(0x193),'description':a125_0x298cf9(0x19b),'risk':a125_0x298cf9(0x16f),'flags':[{'name':a125_0x298cf9(0x199),'type':a125_0x298cf9(0x17d),'description':a125_0x298cf9(0x179)},{'name':a125_0x298cf9(0x176),'type':'string','description':a125_0x298cf9(0x192)},{'name':a125_0x298cf9(0x18a),'type':a125_0x298cf9(0x17d),'description':a125_0x298cf9(0x182)}],async 'execute'(_0x436e5c){const _0x2178af=a125_0x298cf9,_0x1a778a=_0x436e5c[_0x2178af(0x198)](_0x2178af(0x199)),_0x2091fd=_0x436e5c[_0x2178af(0x198)]('sql');if(!_0x1a778a&&!_0x2091fd)throw CliErrors[_0x2178af(0x195)](_0x2178af(0x199),_0x2178af(0x17a));let _0x304e02;if(_0x1a778a){const _0xc2ed81=resolve(process[_0x2178af(0x18c)](),_0x1a778a);if(!existsSync(_0xc2ed81))throw CliErrors[_0x2178af(0x17e)](_0x2178af(0x185)+_0xc2ed81);_0x304e02=readFileSync(_0xc2ed81,'utf-8');}else _0x304e02=_0x2091fd;const _0x46aac1=validateSql(_0x304e02),_0x1a5ff3={'valid':_0x46aac1[_0x2178af(0x184)],'sqlType':_0x46aac1[_0x2178af(0x17f)][_0x2178af(0x180)],'isSelectOnly':_0x46aac1['sqlType']['isSelectOnly'],'isDangerous':_0x46aac1[_0x2178af(0x17f)][_0x2178af(0x18e)],'tables':_0x46aac1[_0x2178af(0x171)],'parameters':_0x46aac1[_0x2178af(0x191)],'message':_0x46aac1[_0x2178af(0x188)]};_0x46aac1['sqlType'][_0x2178af(0x186)]&&(_0x1a5ff3[_0x2178af(0x186)]=_0x46aac1[_0x2178af(0x17f)]['reason']);const _0x46bdaa=_0x436e5c[_0x2178af(0x198)](_0x2178af(0x18a));if(_0x46bdaa&&_0x46aac1[_0x2178af(0x184)]){const _0x504d61=_0x46bdaa['split'](',')[_0x2178af(0x19c)](_0x341c1e=>_0x341c1e['trim']())[_0x2178af(0x170)](Boolean),_0x35e0a1=[],_0x171d37=await listDatasets(_0x436e5c['appCode']),_0x3bd4d3=new Map(_0x171d37['map'](_0x4a4479=>[_0x4a4479[_0x2178af(0x187)]?.['tableName']?.['toLowerCase'](),_0x4a4479]));for(const _0x38ba2c of _0x46aac1['tables']){const _0x3bc893=_0x3bd4d3['get'](_0x38ba2c[_0x2178af(0x172)]());!_0x3bc893&&_0x35e0a1['push']('Table\x20\x22'+_0x38ba2c+_0x2178af(0x173));}for(const _0x118eb8 of _0x504d61){try{const _0x2f6620=await getDatasetDetail(_0x118eb8),_0x3166f3=Array[_0x2178af(0x190)](_0x2f6620[_0x2178af(0x175)])?_0x2f6620['fields']:[],_0x321d74=new Set(_0x3166f3[_0x2178af(0x19c)](_0xd19d3e=>_0xd19d3e[_0x2178af(0x196)]?.[_0x2178af(0x172)]())),_0x34157d=_0x2f6620[_0x2178af(0x187)]?.[_0x2178af(0x181)]||_0x2f6620['tableName']||_0x118eb8;_0x1a5ff3['schema:'+_0x34157d]={'code':_0x118eb8,'tableName':_0x34157d,'fieldCount':_0x321d74[_0x2178af(0x17b)],'fields':Array[_0x2178af(0x18d)](_0x321d74)};}catch{_0x35e0a1[_0x2178af(0x17c)]('Dataset\x20\x22'+_0x118eb8+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x35e0a1['length']>0x0&&(_0x1a5ff3[_0x2178af(0x19a)]=_0x35e0a1);}return{'ok':_0x46aac1[_0x2178af(0x184)],'data':_0x1a5ff3,'message':_0x46aac1[_0x2178af(0x188)]};}};function a125_0x3007(){const _0x4e5ebd=['type','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','1371602EjXIyp','valid','File\x20not\x20found:\x20','reason','dbtableConfig','message','2362235LozmQx','schemas','1152496oFfDtv','cwd','from','isDangerous','36CQfIYf','isArray','parameters','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','validate','2092638DjTkaH','flagMissing','name','539262jiyIhe','str','file','schemaWarnings','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','map','12627UMPuzc','read','filter','tables','toLowerCase','\x22\x20not\x20found\x20in\x20any\x20dataset','24846700GoPInd','fields','sql','28lZrIOk','128uwWMcW','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Provide\x20--file\x20or\x20--sql','size','push','string','validation','sqlType'];a125_0x3007=function(){return _0x4e5ebd;};return a125_0x3007();}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x7cc05c=a126_0x13ed;(function(_0xae32b8,_0x271233){const _0x5ecda3=a126_0x13ed,_0x552b95=_0xae32b8();while(!![]){try{const _0x2bde46=parseInt(_0x5ecda3(0x19a))/0x1+-parseInt(_0x5ecda3(0x190))/0x2+parseInt(_0x5ecda3(0x1a3))/0x3*(-parseInt(_0x5ecda3(0x17d))/0x4)+-parseInt(_0x5ecda3(0x180))/0x5+parseInt(_0x5ecda3(0x1a1))/0x6+-parseInt(_0x5ecda3(0x18f))/0x7+parseInt(_0x5ecda3(0x199))/0x8;if(_0x2bde46===_0x271233)break;else _0x552b95['push'](_0x552b95['shift']());}catch(_0x2ae22f){_0x552b95['push'](_0x552b95['shift']());}}}(a126_0x2cd4,0x7c5c5));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=[a126_0x7cc05c(0x185),a126_0x7cc05c(0x187),a126_0x7cc05c(0x195),'format','riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x7cc05c(0x182),a126_0x7cc05c(0x18e),a126_0x7cc05c(0x195),a126_0x7cc05c(0x1a0),a126_0x7cc05c(0x185),'accessKey',a126_0x7cc05c(0x193)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x2729d4){const _0x1ac4b5=a126_0x7cc05c;return[..._0x2729d4][_0x1ac4b5(0x196)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x1fbab0){const _0x3d327b=a126_0x7cc05c;return TOP_LEVEL_CONFIG_KEYS[_0x3d327b(0x19b)](_0x1fbab0);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a126_0x13ed(_0xa7d507,_0x2d4c96){_0xa7d507=_0xa7d507-0x17a;const _0x2cd4fe=a126_0x2cd4();let _0x13ed6b=_0x2cd4fe[_0xa7d507];return _0x13ed6b;}export function getConfigCommandKeyDescription(){const _0x1a63c8=a126_0x7cc05c;return _0x1a63c8(0x17c)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x7cc05c(0x18e),'apiDir':a126_0x7cc05c(0x193),'cookie':'cookie','accessKey':'accessKey','defaultFormat':a126_0x7cc05c(0x1a0),'pageSize':a126_0x7cc05c(0x18a),'riskLevel':a126_0x7cc05c(0x194),'locale':a126_0x7cc05c(0x195)};export function getAppProfileFlagDefs(){const _0xb7f021=a126_0x7cc05c;return[{'name':_0xb7f021(0x18e),'type':_0xb7f021(0x197),'description':_0xb7f021(0x19d),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0xb7f021(0x193),'type':_0xb7f021(0x197),'description':_0xb7f021(0x198)},{'name':_0xb7f021(0x185),'type':_0xb7f021(0x197),'description':_0xb7f021(0x17a),'hidden':!![]},{'name':_0xb7f021(0x187),'type':_0xb7f021(0x197),'description':_0xb7f021(0x186),'hidden':!![]},{'name':_0xb7f021(0x17e),'type':_0xb7f021(0x197),'description':_0xb7f021(0x192),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0xb7f021(0x18a),'type':'number','description':_0xb7f021(0x183)},{'name':'riskLevel','type':_0xb7f021(0x197),'description':_0xb7f021(0x184),'enum':[...RISK_LEVEL_VALUES]},{'name':_0xb7f021(0x195),'type':'string','description':_0xb7f021(0x18d)}];}export function collectAppProfileOverrides(_0x856cd3){const _0x942dcd=a126_0x7cc05c,_0x6121e3={};for(const [_0x300e57,_0x5287e3]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x1f23f7=_0x856cd3(_0x300e57);if(!_0x1f23f7)continue;_0x6121e3[_0x5287e3]=_0x5287e3===_0x942dcd(0x18a)?Number(_0x1f23f7):_0x1f23f7;}return _0x6121e3;}function a126_0x2cd4(){const _0x117383=['Config\x20key\x20(','84lgffPM','defaultFormat','zh-CN','1912520GOrDoI','toLowerCase','appcode','Default\x20page\x20size','Risk\x20level','cookie','Access\x20key','accessKey','app','apps','pageSize','trim','en-US','Locale','env','5071787ovsneU','147144kVKHsv','inherit','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','apiDir','riskLevel','locale','join','string','API\x20directory\x20path','10876152TPsdhV','436052eRLIbE','has','length','Target\x20environment','map','filter','format','2864196MWZsrH','keys','83277WbfeTl','Auth\x20cookie','defaultApp'];a126_0x2cd4=function(){return _0x117383;};return a126_0x2cd4();}export function buildAppProfileListFields(_0x19e9dd){const _0x48b21c=a126_0x7cc05c;return{'env':_0x19e9dd['env']??null,'apiDir':_0x19e9dd[_0x48b21c(0x193)]??null,'hasCookie':!!_0x19e9dd[_0x48b21c(0x185)],'hasAccessKey':!!_0x19e9dd['accessKey'],'format':_0x19e9dd[_0x48b21c(0x1a0)]??null,'pageSize':_0x19e9dd[_0x48b21c(0x18a)]??null,'riskLevel':_0x19e9dd[_0x48b21c(0x194)]??null,'locale':_0x19e9dd[_0x48b21c(0x195)]??null};}export function buildAppDoctorFields(_0x2d3bbd,_0x139855){const _0x29d35e=a126_0x7cc05c;return{'env':{'value':_0x2d3bbd[_0x29d35e(0x18e)]||_0x139855[_0x29d35e(0x18e)],'source':_0x2d3bbd['env']?'app':_0x29d35e(0x191)},'apiDir':{'value':_0x2d3bbd[_0x29d35e(0x193)]||_0x139855[_0x29d35e(0x193)],'source':_0x2d3bbd['apiDir']?'app':_0x29d35e(0x191)},'cookie':{'value':_0x2d3bbd[_0x29d35e(0x185)]||_0x139855[_0x29d35e(0x185)],'source':_0x2d3bbd['cookie']?_0x29d35e(0x188):_0x29d35e(0x191)},'accessKey':{'value':_0x2d3bbd['accessKey']||_0x139855[_0x29d35e(0x187)],'source':_0x2d3bbd[_0x29d35e(0x187)]?'app':_0x29d35e(0x191)}};}export function buildCanonicalAppConfig(_0x424f4a,_0x56206a){const _0x215660=a126_0x7cc05c,_0xe7149d=_0x424f4a[_0x215660(0x19e)](_0x20f4db=>String(_0x20f4db||'')[_0x215660(0x18b)]())[_0x215660(0x19f)](Boolean);if(_0xe7149d['length']===0x0)return{};const _0x543547={};for(const _0x2135ed of _0xe7149d){_0x543547[_0x2135ed]=_0x56206a?{'appcode':_0x2135ed,'env':_0x56206a}:{'appcode':_0x2135ed};}return{'apps':_0x543547,'defaultApp':_0xe7149d[0x0]};}export function buildCanonicalProjectConfig(_0x21248b,_0x509377){const _0x45d20f=a126_0x7cc05c,{appCodes:appCodes=[],env:_0x430179,metadata:_0x38049a}=_0x509377,_0x50c494={..._0x21248b,..._0x38049a||{}};delete _0x50c494[_0x45d20f(0x182)],delete _0x50c494[_0x45d20f(0x188)];if(_0x430179)_0x50c494[_0x45d20f(0x18e)]=_0x430179;else!_0x50c494[_0x45d20f(0x18e)]&&(_0x50c494[_0x45d20f(0x18e)]=DEFAULT_CONFIG_VALUES[_0x45d20f(0x18e)]);const _0x348598=buildCanonicalAppConfig(appCodes,_0x50c494[_0x45d20f(0x18e)]);return Object[_0x45d20f(0x1a2)](_0x348598)[_0x45d20f(0x19c)]>0x0&&(_0x50c494[_0x45d20f(0x189)]=_0x348598['apps'],_0x50c494[_0x45d20f(0x17b)]=_0x348598[_0x45d20f(0x17b)]),_0x50c494;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a126_0x7cc05c(0x17f),'zh_cn':'zh-CN','en':'en-US','en-us':'en-US','en_us':a126_0x7cc05c(0x18c)};export function normalizeLocale(_0x495fdb){const _0x53c52d=a126_0x7cc05c;if(!_0x495fdb)return null;return LOCALE_MAP[_0x495fdb[_0x53c52d(0x181)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a127_0x3ecd(_0x4f4e4a,_0xd42ef2){_0x4f4e4a=_0x4f4e4a-0x121;const _0x5901b6=a127_0x5901();let _0x3ecd76=_0x5901b6[_0x4f4e4a];return _0x3ecd76;}function a127_0x5901(){const _0x47a65a=['41313GXRtWL','43990EzvadS','376bBKPYm','724110JBIgnR','865426cRgYru','9282620YeGdrv','2160984VFWtac','92dwclNQ','4328152BJeQoG','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','9RKPjlx'];a127_0x5901=function(){return _0x47a65a;};return a127_0x5901();}const a127_0x407be0=a127_0x3ecd;(function(_0x223d33,_0x821c67){const _0x4fb7ef=a127_0x3ecd,_0x5dfd27=_0x223d33();while(!![]){try{const _0x5de394=parseInt(_0x4fb7ef(0x126))/0x1+parseInt(_0x4fb7ef(0x129))/0x2*(parseInt(_0x4fb7ef(0x122))/0x3)+-parseInt(_0x4fb7ef(0x124))/0x4*(parseInt(_0x4fb7ef(0x123))/0x5)+-parseInt(_0x4fb7ef(0x125))/0x6+-parseInt(_0x4fb7ef(0x128))/0x7+-parseInt(_0x4fb7ef(0x12a))/0x8+parseInt(_0x4fb7ef(0x121))/0x9*(parseInt(_0x4fb7ef(0x127))/0xa);if(_0x5de394===_0x821c67)break;else _0x5dfd27['push'](_0x5dfd27['shift']());}catch(_0x518ce7){_0x5dfd27['push'](_0x5dfd27['shift']());}}}(a127_0x5901,0x99bde));export const CLI_VERSION_POLICY_URL=a127_0x407be0(0x12b);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x5cd5b7=a128_0x6216;function a128_0x5cdc(){const _0x5716f1=['force','global','24KLqqbL','Target\x20path','Confirm\x20destructive\x20action','Use\x20remote','params','Dataset\x20code','name','enableBffSave','functionNode','clear','File\x20path','all','watch','Config\x20key','<name>','confirm','Select\x20app\x20profile\x20by\x20name','env','13176724clbRzL','1307727FDBddA','Alias\x20for\x20--non-interactive','Force\x20non-interactive\x20mode\x20(CI)','sqlName','string','3431310Irzgea','datasetcode','@lovrabet/rabetbase-cli','Page\x20number','keyword','2231268ZVynFV','SQL\x20name','Apply\x20to\x20all','SQL\x20string','output','248899zLuWEX','Watch\x20mode','Enable\x20BFF\x20save','boolean','appcode','format','DB\x20ID','file','remote','sqlcode','map','code','descriptionFile','Schemas','operationType','Rabetbase\x20CLI','Use\x20project\x20config\x20scope','Config\x20value','dbid','function-node','description','Preview\x20operation\x20without\x20executing','Clear','key','pagesize','Title','yes','150hXJXqc','1706768TuHdVF','Description','app','operation','Operation\x20type','Expected\x20affected\x20count','non-interactive','57947gPFYuG','Output\x20format','dbId','Record\x20ID','Output\x20path','Environment','28HyrqCx','expectedCount','target','page','Skip\x20confirmation\x20for\x20high-risk\x20writes','nonInteractive','dry-run','json\x20|\x20pretty\x20|\x20compress','Description\x20file','project','title','Force\x20overwrite','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','verbose','Code\x20filter','skip-imports','10cJorWh','Keyword\x20filter','schemas','type','sql','SQL\x20code','Show\x20help','value','operation-type','Type\x20filter','Page\x20size','Skip\x20import\x20generation','rabetbase','help'];a128_0x5cdc=function(){return _0x5716f1;};return a128_0x5cdc();}function a128_0x6216(_0x504ea5,_0x399e90){_0x504ea5=_0x504ea5-0xb4;const _0x5cdcf6=a128_0x5cdc();let _0x6216f2=_0x5cdcf6[_0x504ea5];return _0x6216f2;}(function(_0x3c7111,_0x43287a){const _0x439dde=a128_0x6216,_0x53c296=_0x3c7111();while(!![]){try{const _0x111c68=-parseInt(_0x439dde(0x115))/0x1*(parseInt(_0x439dde(0x11b))/0x2)+parseInt(_0x439dde(0xed))/0x3+-parseInt(_0x439dde(0x10e))/0x4+parseInt(_0x439dde(0xe8))/0x5+parseInt(_0x439dde(0x10d))/0x6*(-parseInt(_0x439dde(0xf2))/0x7)+-parseInt(_0x439dde(0xd0))/0x8*(-parseInt(_0x439dde(0xe3))/0x9)+-parseInt(_0x439dde(0xc0))/0xa*(-parseInt(_0x439dde(0xe2))/0xb);if(_0x111c68===_0x43287a)break;else _0x53c296['push'](_0x53c296['shift']());}catch(_0x4f359f){_0x53c296['push'](_0x53c296['shift']());}}}(a128_0x5cdc,0xe4be8));export const CLI_BIN_NAME=a128_0x5cd5b7(0xcc);export const CLI_DISPLAY_NAME=a128_0x5cd5b7(0x101);export const NPM_PACKAGE_NAME=a128_0x5cd5b7(0xea);export const GLOBAL_FLAGS=[{'name':a128_0x5cd5b7(0xf6),'meowKey':'appcode','type':a128_0x5cd5b7(0xe7),'description':'Override\x20appcode','hint':'<code>'},{'name':a128_0x5cd5b7(0x110),'meowKey':a128_0x5cd5b7(0x110),'type':'string','description':a128_0x5cd5b7(0xe0),'hint':a128_0x5cd5b7(0xde)},{'name':'env','meowKey':a128_0x5cd5b7(0xe1),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x11a),'hint':'production\x20|\x20daily'},{'name':a128_0x5cd5b7(0xf7),'meowKey':'format','type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x116),'hint':a128_0x5cd5b7(0xb7)},{'name':'jq','meowKey':'jq','type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xbc),'hint':'<expr>'},{'name':a128_0x5cd5b7(0xb6),'meowKey':'dryRun','type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0x107)},{'name':a128_0x5cd5b7(0x10c),'meowKey':a128_0x5cd5b7(0x10c),'type':'boolean','description':a128_0x5cd5b7(0xb4)},{'name':'non-interactive','meowKey':a128_0x5cd5b7(0xb5),'type':'boolean','description':a128_0x5cd5b7(0xe5)},{'name':'global','meowKey':a128_0x5cd5b7(0xcf),'type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':'project','meowKey':a128_0x5cd5b7(0xb9),'type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0x102)},{'name':'ci','meowKey':'ci','type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xe4),'hidden':!![]},{'name':a128_0x5cd5b7(0xcd),'meowKey':a128_0x5cd5b7(0xcd),'type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xc6)},{'name':a128_0x5cd5b7(0xd6),'meowKey':'name','type':'string','description':'Name','hidden':!![]},{'name':a128_0x5cd5b7(0xba),'meowKey':'title','type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x10b),'hidden':!![]},{'name':a128_0x5cd5b7(0xd9),'meowKey':'clear','type':'boolean','description':a128_0x5cd5b7(0x108),'hidden':!![]},{'name':a128_0x5cd5b7(0xdc),'meowKey':a128_0x5cd5b7(0xdc),'type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xf3),'hidden':!![]},{'name':a128_0x5cd5b7(0xf1),'meowKey':a128_0x5cd5b7(0xf1),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x119),'hidden':!![]},{'name':a128_0x5cd5b7(0xd4),'meowKey':a128_0x5cd5b7(0xd4),'type':a128_0x5cd5b7(0xe7),'description':'JSON\x20params','hidden':!![]},{'name':a128_0x5cd5b7(0xe9),'meowKey':'datasetcode','type':'string','description':a128_0x5cd5b7(0xd5),'hidden':!![]},{'name':a128_0x5cd5b7(0xdb),'meowKey':'all','type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xef),'hidden':!![]},{'name':'enable-bff-save','meowKey':a128_0x5cd5b7(0xd7),'type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xf4),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a128_0x5cd5b7(0x118),'hidden':!![]},{'name':a128_0x5cd5b7(0xc3),'meowKey':a128_0x5cd5b7(0xc3),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xc9),'hidden':!![]},{'name':'file','meowKey':a128_0x5cd5b7(0xf9),'type':'string','description':a128_0x5cd5b7(0xda),'hidden':!![]},{'name':a128_0x5cd5b7(0xfb),'meowKey':a128_0x5cd5b7(0xfb),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xc5),'hidden':!![]},{'name':'sql-name','meowKey':a128_0x5cd5b7(0xe6),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xee),'hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a128_0x5cd5b7(0xe7),'description':'SQL\x20name','hidden':!![]},{'name':'db-id','meowKey':a128_0x5cd5b7(0x117),'type':'string','description':a128_0x5cd5b7(0xf8),'hidden':!![]},{'name':a128_0x5cd5b7(0x104),'meowKey':'dbid','type':a128_0x5cd5b7(0xe7),'description':'DB\x20ID','hidden':!![]},{'name':a128_0x5cd5b7(0x106),'meowKey':a128_0x5cd5b7(0x106),'type':'string','description':a128_0x5cd5b7(0x10f),'hidden':!![]},{'name':'description-file','meowKey':a128_0x5cd5b7(0xfe),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xb8),'hidden':!![]},{'name':a128_0x5cd5b7(0x11e),'meowKey':'page','type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xeb),'hidden':!![]},{'name':a128_0x5cd5b7(0x10a),'meowKey':a128_0x5cd5b7(0x10a),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xca),'hidden':!![]},{'name':'keyword','meowKey':a128_0x5cd5b7(0xec),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xc1),'hidden':!![]},{'name':a128_0x5cd5b7(0xfd),'meowKey':a128_0x5cd5b7(0xfd),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xbe),'hidden':!![]},{'name':a128_0x5cd5b7(0xc4),'meowKey':a128_0x5cd5b7(0xc4),'type':'string','description':a128_0x5cd5b7(0xf0),'hidden':!![]},{'name':a128_0x5cd5b7(0xc2),'meowKey':a128_0x5cd5b7(0xc2),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xff),'hidden':!![]},{'name':a128_0x5cd5b7(0x111),'meowKey':a128_0x5cd5b7(0x111),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x112),'hidden':!![]},{'name':a128_0x5cd5b7(0x11d),'meowKey':a128_0x5cd5b7(0x11d),'type':'string','description':a128_0x5cd5b7(0xd1),'hidden':!![]},{'name':a128_0x5cd5b7(0xbf),'meowKey':'skipImports','type':'boolean','description':a128_0x5cd5b7(0xcb),'hidden':!![]},{'name':a128_0x5cd5b7(0x109),'meowKey':'key','type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0xdd),'hidden':!![]},{'name':a128_0x5cd5b7(0xc7),'meowKey':a128_0x5cd5b7(0xc7),'type':a128_0x5cd5b7(0xe7),'description':a128_0x5cd5b7(0x103),'hidden':!![]},{'name':a128_0x5cd5b7(0xce),'meowKey':'force','type':'boolean','description':a128_0x5cd5b7(0xbb),'hidden':!![]},{'name':'confirm','meowKey':a128_0x5cd5b7(0xdf),'type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xd2),'hidden':!![]},{'name':a128_0x5cd5b7(0xfa),'meowKey':'remote','type':a128_0x5cd5b7(0xf5),'description':a128_0x5cd5b7(0xd3),'hidden':!![]},{'name':a128_0x5cd5b7(0xbd),'meowKey':'verbose','type':a128_0x5cd5b7(0xf5),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':a128_0x5cd5b7(0x11c),'type':'string','description':a128_0x5cd5b7(0x113),'hidden':!![]},{'name':a128_0x5cd5b7(0xc8),'meowKey':a128_0x5cd5b7(0x100),'type':'string','description':a128_0x5cd5b7(0x112),'hidden':!![]},{'name':a128_0x5cd5b7(0x105),'meowKey':a128_0x5cd5b7(0xd8),'type':'string','description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a128_0x5cd5b7(0xf6),a128_0x5cd5b7(0x110),'env','format','jq',a128_0x5cd5b7(0xb6),'yes',a128_0x5cd5b7(0x114),'ci']);export function buildMeowFlags(){const _0x38a6b4=a128_0x5cd5b7;return Object['fromEntries'](GLOBAL_FLAGS[_0x38a6b4(0xfc)](_0x4f40dd=>[_0x4f40dd['meowKey'],{'type':_0x4f40dd[_0x38a6b4(0xc3)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a129_0x4113(_0xda9a5e,_0x32b94f){_0xda9a5e=_0xda9a5e-0x1d4;const _0x4baee6=a129_0x4bae();let _0x4113f6=_0x4baee6[_0xda9a5e];return _0x4113f6;}const a129_0x34a5eb=a129_0x4113;(function(_0x78e11,_0xf0253){const _0x222da8=a129_0x4113,_0x5a65cf=_0x78e11();while(!![]){try{const _0x361c62=parseInt(_0x222da8(0x1dc))/0x1+-parseInt(_0x222da8(0x1db))/0x2+-parseInt(_0x222da8(0x1d4))/0x3*(-parseInt(_0x222da8(0x1d8))/0x4)+-parseInt(_0x222da8(0x1d7))/0x5+-parseInt(_0x222da8(0x1df))/0x6*(-parseInt(_0x222da8(0x1d6))/0x7)+-parseInt(_0x222da8(0x1d9))/0x8+parseInt(_0x222da8(0x1da))/0x9*(-parseInt(_0x222da8(0x1dd))/0xa);if(_0x361c62===_0xf0253)break;else _0x5a65cf['push'](_0x5a65cf['shift']());}catch(_0x215102){_0x5a65cf['push'](_0x5a65cf['shift']());}}}(a129_0x4bae,0x666b2));import{DEFAULT_API_DIR}from'../constant/paths.js';function a129_0x4bae(){const _0x5c7340=['10PxgiIn','compress','24kLJRSZ','en-US','48ZNFJuq','high-risk-write','983262NZotWJ','430035DXeBmK','36796pSKLji','2617800yeDfCo','697617mkBkAk','779998AJwIxE','591202RDcqXw'];a129_0x4bae=function(){return _0x5c7340;};return a129_0x4bae();}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a129_0x34a5eb(0x1de),'locale':a129_0x34a5eb(0x1e0),'riskLevel':a129_0x34a5eb(0x1d5),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a130_0x20c161=a130_0x2203;function a130_0x2203(_0x4472b0,_0x3b03f7){_0x4472b0=_0x4472b0-0x77;const _0x3a3687=a130_0x3a36();let _0x220304=_0x3a3687[_0x4472b0];return _0x220304;}(function(_0x1824ed,_0xca165e){const _0x26d580=a130_0x2203,_0x54263d=_0x1824ed();while(!![]){try{const _0x398d56=-parseInt(_0x26d580(0x89))/0x1*(-parseInt(_0x26d580(0x7f))/0x2)+-parseInt(_0x26d580(0x81))/0x3*(-parseInt(_0x26d580(0x7e))/0x4)+parseInt(_0x26d580(0x80))/0x5+parseInt(_0x26d580(0x83))/0x6+parseInt(_0x26d580(0x87))/0x7+parseInt(_0x26d580(0x79))/0x8*(parseInt(_0x26d580(0x77))/0x9)+-parseInt(_0x26d580(0x86))/0xa*(parseInt(_0x26d580(0x7a))/0xb);if(_0x398d56===_0xca165e)break;else _0x54263d['push'](_0x54263d['shift']());}catch(_0x1fcba5){_0x54263d['push'](_0x54263d['shift']());}}}(a130_0x3a36,0x771b2));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x5cec10){const _0x1fd85b=a130_0x2203;customApiDomain=_0x5cec10?.[_0x1fd85b(0x7b)],customUserDomain=_0x5cec10?.[_0x1fd85b(0x88)],customRuntimeDomain=_0x5cec10?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a130_0x20c161(0x78):a130_0x20c161(0x85));function a130_0x3a36(){const _0x1249f6=['https://runtime.lovrabet.com','https://api.lovrabet.com','1356eeUXXO','8GtHAyS','2815700nfkSoe','6999afsJQW','https://daily-runtime.lovrabet.com','1985010cxMrAw','https://daily-api.lovrabet.com','https://user-daily.lovrabet.com','1780750aXUzuf','6657476xflRKW','userDomain','202661WbaCbO','9HNeUzp','https://user.lovrabet.com','7671472qXlWit','242uOcqly','apiDomain'];a130_0x3a36=function(){return _0x1249f6;};return a130_0x3a36();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a130_0x20c161(0x7d):a130_0x20c161(0x84));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a130_0x20c161(0x7c):a130_0x20c161(0x82));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x4ab9cd=a131_0x204a;(function(_0x4b06c1,_0x17d209){const _0x542302=a131_0x204a,_0x5b85ca=_0x4b06c1();while(!![]){try{const _0x19c817=parseInt(_0x542302(0x139))/0x1+-parseInt(_0x542302(0x131))/0x2*(-parseInt(_0x542302(0x130))/0x3)+-parseInt(_0x542302(0x133))/0x4+parseInt(_0x542302(0x13b))/0x5+parseInt(_0x542302(0x137))/0x6*(-parseInt(_0x542302(0x135))/0x7)+parseInt(_0x542302(0x136))/0x8+-parseInt(_0x542302(0x134))/0x9;if(_0x19c817===_0x17d209)break;else _0x5b85ca['push'](_0x5b85ca['shift']());}catch(_0x3d6d92){_0x5b85ca['push'](_0x5b85ca['shift']());}}}(a131_0x267b,0xeedaf));function a131_0x204a(_0x4e0607,_0x2db340){_0x4e0607=_0x4e0607-0x130;const _0x267b2f=a131_0x267b();let _0x204afd=_0x267b2f[_0x4e0607];return _0x204afd;}export const RABETBASE_ENV_VALUES=[a131_0x4ab9cd(0x13c),a131_0x4ab9cd(0x138)];export function normalizeEnv(_0xd02568){const _0x1676c6=a131_0x4ab9cd;return _0xd02568===_0x1676c6(0x13a)?_0x1676c6(0x13c):_0xd02568;}export function isProduction(_0x565ca9){return normalizeEnv(_0x565ca9)==='production';}export function isDaily(_0x2d1036){return normalizeEnv(_0x2d1036)==='daily';}function a131_0x267b(){const _0xeafe3b=['production','1036557YWjDRL','2TiaetP','development','1047648GXqcuM','12711681lvsHPg','77973JTzQKO','8704400lSPBFu','924oHNlvu','daily','1445566hFJfLF','online','7444715sMzPcf'];a131_0x267b=function(){return _0xeafe3b;};return a131_0x267b();}export function isDev(_0x5a7dbf){const _0x193da7=a131_0x4ab9cd,_0x47a1b4=normalizeEnv(_0x5a7dbf);return _0x47a1b4===_0x193da7(0x132)||_0x47a1b4==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0xd999fb){env=normalizeEnv(_0xd999fb);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a132_0x33a6(_0x4ab46c,_0x3fe0f6){_0x4ab46c=_0x4ab46c-0xa1;const _0x488c51=a132_0x488c();let _0x33a6a5=_0x488c51[_0x4ab46c];return _0x33a6a5;}const a132_0x15ffed=a132_0x33a6;(function(_0x12c360,_0x1ae0c9){const _0x121490=a132_0x33a6,_0x564f6c=_0x12c360();while(!![]){try{const _0x1381db=parseInt(_0x121490(0xa9))/0x1*(parseInt(_0x121490(0xaf))/0x2)+parseInt(_0x121490(0xab))/0x3+-parseInt(_0x121490(0xaa))/0x4*(parseInt(_0x121490(0xa2))/0x5)+parseInt(_0x121490(0xa6))/0x6*(parseInt(_0x121490(0xac))/0x7)+-parseInt(_0x121490(0xa1))/0x8+-parseInt(_0x121490(0xa4))/0x9*(-parseInt(_0x121490(0xa8))/0xa)+parseInt(_0x121490(0xad))/0xb*(parseInt(_0x121490(0xa5))/0xc);if(_0x1381db===_0x1ae0c9)break;else _0x564f6c['push'](_0x564f6c['shift']());}catch(_0x5edd85){_0x564f6c['push'](_0x564f6c['shift']());}}}(a132_0x488c,0xcb03b));function a132_0x488c(){const _0x41b758=['984714sAElcv','compress','788620zbkfWc','201233xIWRDF','4426316joWfAy','203316MpaaAI','35uHsHQN','55eQzvua','json','6SEQCQQ','10581864giPYeO','5AkeZJy','pretty','81WIiSfJ','2541684mKBjas'];a132_0x488c=function(){return _0x41b758;};return a132_0x488c();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a132_0x15ffed(0xae),a132_0x15ffed(0xa3),a132_0x15ffed(0xa7)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x47c984=a133_0x4807;(function(_0x49c1c8,_0x508b0f){const _0x23d153=a133_0x4807,_0x2ce118=_0x49c1c8();while(!![]){try{const _0x29dfa3=parseInt(_0x23d153(0xaf))/0x1*(-parseInt(_0x23d153(0xb2))/0x2)+parseInt(_0x23d153(0xb1))/0x3+parseInt(_0x23d153(0xb5))/0x4+-parseInt(_0x23d153(0xb7))/0x5*(parseInt(_0x23d153(0xb3))/0x6)+parseInt(_0x23d153(0xb6))/0x7+parseInt(_0x23d153(0xae))/0x8+-parseInt(_0x23d153(0xad))/0x9*(parseInt(_0x23d153(0xb4))/0xa);if(_0x29dfa3===_0x508b0f)break;else _0x2ce118['push'](_0x2ce118['shift']());}catch(_0x40e643){_0x2ce118['push'](_0x2ce118['shift']());}}}(a133_0x4ba9,0x70a55));export const DEFAULT_API_DIR=a133_0x47c984(0xb0);function a133_0x4807(_0x345f84,_0xe26eca){_0x345f84=_0x345f84-0xad;const _0x4ba98e=a133_0x4ba9();let _0x480732=_0x4ba98e[_0x345f84];return _0x480732;}function a133_0x4ba9(){const _0x50ea25=['504OqqtWr','7351304dDLoRU','22nGgftI','./src/api','538290UgSWhX','55346sbaDcZ','87672KReWzi','117170BWAUjs','1042484reCvph','2674021LBHkmS','5TdCERF'];a133_0x4ba9=function(){return _0x50ea25;};return a133_0x4ba9();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0x2214(){const _0x5582a5=['13WAOkHf','1803OVafCZ','3807468CWdsSR','10vvVudf','610160RJzvmX','16459tDMENk','1142869pdsnoP','796uABGny','6bOWygd','18070RMCZVb','read','136sSxwxX','1441SigHzx','24984JiVdTl'];a134_0x2214=function(){return _0x5582a5;};return a134_0x2214();}const a134_0x32ca0d=a134_0x4501;(function(_0x3f8a68,_0x5e5a78){const _0x15b15f=a134_0x4501,_0x5b42c3=_0x3f8a68();while(!![]){try{const _0x2e1475=-parseInt(_0x15b15f(0xfd))/0x1*(-parseInt(_0x15b15f(0xfb))/0x2)+parseInt(_0x15b15f(0xf9))/0x3*(parseInt(_0x15b15f(0xff))/0x4)+parseInt(_0x15b15f(0xfc))/0x5+parseInt(_0x15b15f(0x100))/0x6*(-parseInt(_0x15b15f(0xfe))/0x7)+parseInt(_0x15b15f(0x103))/0x8*(parseInt(_0x15b15f(0xf7))/0x9)+-parseInt(_0x15b15f(0x101))/0xa*(-parseInt(_0x15b15f(0xf6))/0xb)+-parseInt(_0x15b15f(0xfa))/0xc*(parseInt(_0x15b15f(0xf8))/0xd);if(_0x2e1475===_0x5e5a78)break;else _0x5b42c3['push'](_0x5b42c3['shift']());}catch(_0x4b1f8c){_0x5b42c3['push'](_0x5b42c3['shift']());}}}(a134_0x2214,0x1f12f));function a134_0x4501(_0x27a105,_0x1dbb92){_0x27a105=_0x27a105-0xf6;const _0x22142b=a134_0x2214();let _0x450192=_0x22142b[_0x27a105];return _0x450192;}export const RISK_LEVEL_VALUES=[a134_0x32ca0d(0x102),'write','high-risk-write'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a135_0x1533(){const _0xfe491c=['replace','slice','warn','format','1759248JAyTca','env','APPCODE','846376JWJEEM','missing','.lovrabet.json','filter','daily','182400xKegkB','FORMAT','MAX_RISK','project','VERBOSE','riskLevel','empty','apps','authRequired','cwd','utf8','PAGE_SIZE','keys','data','status','./utils/is-non-interactive.js','COOKIE','message','find','1222910APljye','appcode','Global','stringify','3064NGBBHw','\x0a\x20\x20','trim','true','APP','entries','1227205sqsZVZ','maxRisk','object','./constant/env.js','defaultApp','ACCESS_KEY','locale','accessKey','apiDir','2ceTHLF','length','template_base_url','./auth/get-cookie.js','runtimeDomain','read','pageSize','config','.lovrabetrc','string','https://g.lovrabet.com/dist/lovrabet-skill','cookie','production','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','migrated','696VrWrUG','-api.ts','map','write','Project','RISK_LEVEL','9536BKXoZo','setLogPath','app','get','ENV','inherit','error','parse'];a135_0x1533=function(){return _0xfe491c;};return a135_0x1533();}const a135_0xb7b5f2=a135_0x3d47;(function(_0x4f2b5b,_0x1d3fa6){const _0x111032=a135_0x3d47,_0x51124b=_0x4f2b5b();while(!![]){try{const _0x15e7ce=-parseInt(_0x111032(0xbf))/0x1*(-parseInt(_0x111032(0xd4))/0x2)+parseInt(_0x111032(0xce))/0x3*(parseInt(_0x111032(0xb0))/0x4)+parseInt(_0x111032(0xac))/0x5+-parseInt(_0x111032(0x99))/0x6+-parseInt(_0x111032(0xb6))/0x7+parseInt(_0x111032(0x94))/0x8+-parseInt(_0x111032(0x91))/0x9;if(_0x15e7ce===_0x1d3fa6)break;else _0x51124b['push'](_0x51124b['shift']());}catch(_0x2f2bca){_0x51124b['push'](_0x51124b['shift']());}}}(a135_0x1533,0x214f8));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x5cf3ae){return process.env[`RABETBASE_${_0x5cf3ae}`]||process.env[`LOVRABET_${_0x5cf3ae}`]||undefined;}export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a135_0xb7b5f2(0x96),a135_0xb7b5f2(0xc7)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a135_0xb7b5f2(0x97)](_0x14515c=>_0x14515c!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x3ad01d){for(const _0x85fbba of CONFIG_NAMES){const _0x201df7=resolve(_0x3ad01d,_0x85fbba);if(existsSync(_0x201df7))return _0x201df7;}return undefined;}export function findProjectRootDirectory(_0x114027=process[a135_0xb7b5f2(0xa2)]()){let _0x5b057b=resolve(_0x114027);const {root:_0x336c80}=parse(_0x5b057b),_0x385a3=homedir();while(!![]){if(resolveConfigPath(_0x5b057b)){if(_0x5b057b===_0x385a3)break;return _0x5b057b;}if(_0x5b057b===_0x336c80||_0x5b057b===_0x385a3)break;const _0x1645a5=dirname(_0x5b057b);if(_0x1645a5===_0x5b057b)break;_0x5b057b=_0x1645a5;}return resolve(_0x114027);}export async function createContext(_0x54619c){const _0x3c960d=a135_0xb7b5f2,_0x4cce70=readRawConfig(),_0x21c4cb=buildConfig(_0x4cce70,_0x54619c),{initEnv:_0x26dd6d}=await import(_0x3c960d(0xb9));if(_0x21c4cb['env'])_0x26dd6d(_0x21c4cb[_0x3c960d(0x92)]);else _0x54619c['env']&&typeof _0x54619c[_0x3c960d(0x92)]==='string'&&_0x26dd6d(_0x54619c[_0x3c960d(0x92)]);const {initDomains:_0x496c00,getUserDomain:_0x17ea2c,getApiDomain:_0x5ce33e}=await import('./constant/domain.js');_0x496c00({'apiDomain':_0x4cce70['apiDomain']||undefined,'userDomain':_0x4cce70['userDomain']||undefined,'runtimeDomain':_0x4cce70[_0x3c960d(0xc3)]||undefined});const _0x350182={'apiDomain':_0x5ce33e(),'userDomain':_0x17ea2c()},_0x334545=await buildAuth(_0x21c4cb);logger[_0x3c960d(0xd5)](process[_0x3c960d(0xa2)]());const _0x2b90c9=(CLI_BIN_NAME+'\x20'+process['argv'][_0x3c960d(0xdd)](0x2)['join']('\x20'))[_0x3c960d(0xb2)]();logger['setRawCommand'](_0x2b90c9);const {isNonInteractive:_0x4743d8}=await import(_0x3c960d(0xa8)),_0x330464=_0x4743d8(_0x54619c);return{'config':_0x21c4cb,'auth':_0x334545,'logger':logger,'env':_0x350182,'nonInteractive':_0x330464};}export function buildConfigFromFlags(_0x327028){return buildConfig(readRawConfig(),_0x327028);}export function getProjectConfigPath(){const _0x487cea=a135_0xb7b5f2;return resolveConfigPath(process[_0x487cea(0xa2)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0xd07403){const _0x3a1bce=a135_0xb7b5f2;if(!existsSync(_0xd07403))return{'status':_0x3a1bce(0x95)};try{const _0x5e18a4=readFileSync(_0xd07403,{'encoding':_0x3a1bce(0xa3)});if(!_0x5e18a4?.[_0x3a1bce(0xb2)]())return{'status':_0x3a1bce(0x9f)};const _0x7e9595=JSON[_0x3a1bce(0xdb)](_0x5e18a4);return{'status':'ok','data':_0x7e9595};}catch(_0xcef010){return{'status':_0x3a1bce(0xda),'message':_0xcef010 instanceof Error?_0xcef010[_0x3a1bce(0xaa)]:String(_0xcef010)};}}function parseCliConfigJsonFile(_0x5f2bf2,_0x171776,_0x5e0882){const _0x521c3f=a135_0xb7b5f2,_0x4ab836=inspectCliConfigJsonFile(_0x5f2bf2);if(_0x4ab836[_0x521c3f(0xa7)]===_0x521c3f(0x95)||_0x4ab836[_0x521c3f(0xa7)]===_0x521c3f(0x9f))return{};if(_0x4ab836[_0x521c3f(0xa7)]==='ok')return _0x4ab836[_0x521c3f(0xa6)];return _0x171776==='warn'&&_0x5e0882&&console['error'](CLI_BIN_NAME+':\x20'+_0x5e0882+_0x521c3f(0xcc)+_0x5f2bf2+_0x521c3f(0xb1)+_0x4ab836[_0x521c3f(0xaa)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x554dd4){const _0x5a46aa=a135_0xb7b5f2;if(!_0x554dd4||typeof _0x554dd4!==_0x5a46aa(0xb8))return{'config':{},'migrated':![]};const _0x367b9c={..._0x554dd4},_0x404910=_0x367b9c[_0x5a46aa(0xa0)]&&typeof _0x367b9c['apps']===_0x5a46aa(0xb8)?{..._0x367b9c[_0x5a46aa(0xa0)]}:{},_0x3f5297=Object['keys'](_0x404910)[_0x5a46aa(0xc0)],_0x17dc6f=_0x367b9c['appcode']||_0x367b9c[_0x5a46aa(0xd6)];let _0x11baf9=![];if(_0x17dc6f&&_0x3f5297===0x0){const _0x52fab8=typeof _0x367b9c['defaultApp']==='string'&&_0x367b9c[_0x5a46aa(0xba)]['trim']()?_0x367b9c[_0x5a46aa(0xba)]:String(_0x17dc6f)[_0x5a46aa(0xb2)]();_0x404910[_0x52fab8]={'appcode':String(_0x17dc6f)[_0x5a46aa(0xb2)](),..._0x367b9c[_0x5a46aa(0x92)]!=null?{'env':_0x367b9c[_0x5a46aa(0x92)]}:{},..._0x367b9c[_0x5a46aa(0xbe)]!=null?{'apiDir':_0x367b9c[_0x5a46aa(0xbe)]}:{},..._0x367b9c['cookie']!=null?{'cookie':_0x367b9c[_0x5a46aa(0xca)]}:{},..._0x367b9c[_0x5a46aa(0xbd)]!=null?{'accessKey':_0x367b9c[_0x5a46aa(0xbd)]}:{},..._0x367b9c['format']!=null?{'format':_0x367b9c[_0x5a46aa(0x90)]}:{},..._0x367b9c[_0x5a46aa(0xc5)]!=null?{'pageSize':_0x367b9c[_0x5a46aa(0xc5)]}:{},..._0x367b9c[_0x5a46aa(0x9e)]!=null?{'riskLevel':_0x367b9c['riskLevel']}:{},..._0x367b9c[_0x5a46aa(0xbc)]!=null?{'locale':_0x367b9c[_0x5a46aa(0xbc)]}:{}},_0x367b9c[_0x5a46aa(0xa0)]=_0x404910;if(!_0x367b9c[_0x5a46aa(0xba)])_0x367b9c['defaultApp']=_0x52fab8;_0x11baf9=!![];}return(_0x5a46aa(0xad)in _0x367b9c||_0x5a46aa(0xd6)in _0x367b9c)&&(delete _0x367b9c[_0x5a46aa(0xad)],delete _0x367b9c[_0x5a46aa(0xd6)],_0x11baf9=!![]),{'config':_0x367b9c,'migrated':_0x11baf9};}function a135_0x3d47(_0x213bfa,_0x3ff503){_0x213bfa=_0x213bfa-0x90;const _0x1533fe=a135_0x1533();let _0x3d47b4=_0x1533fe[_0x213bfa];return _0x3d47b4;}function writeNormalizedConfigIfNeeded(_0x5316de,_0x4f50ad){const _0x50f14a=a135_0xb7b5f2,_0x5a667e=JSON[_0x50f14a(0xaf)](_0x4f50ad,null,0x2)+'\x0a';if(normalizedWriteCache[_0x50f14a(0xd7)](_0x5316de)===_0x5a667e)return;writeConfigFile(_0x5316de,_0x4f50ad),normalizedWriteCache['set'](_0x5316de,_0x5a667e);}function parseAndNormalizeConfig(_0x200c21,_0x33c778,_0x1a6ec4){const _0x29f630=a135_0xb7b5f2,_0x195c15=parseCliConfigJsonFile(_0x200c21,_0x33c778,_0x1a6ec4),_0x3218d0=normalizeLegacyConfigShape(_0x195c15);if(_0x3218d0[_0x29f630(0xcd)])try{writeNormalizedConfigIfNeeded(_0x200c21,_0x3218d0[_0x29f630(0xc6)]);}catch{}return _0x3218d0[_0x29f630(0xc6)];}export function loadRawConfigLayers(_0x592509){const _0x181190=a135_0xb7b5f2;let _0x3130b1={},_0x53fa61={};const _0x29d0c8=resolveConfigPath(homedir());_0x29d0c8&&(_0x3130b1=parseAndNormalizeConfig(_0x29d0c8,_0x181190(0xde),_0x181190(0xae)));const _0x259413=_0x592509??findProjectRootDirectory(),_0x37598e=resolveConfigPath(_0x259413);return _0x37598e&&(_0x53fa61=parseAndNormalizeConfig(_0x37598e,_0x181190(0xde),_0x181190(0xd2))),{'globalPath':_0x29d0c8,'projectPath':_0x37598e,'globalConfig':_0x3130b1,'projectConfig':_0x53fa61};}function mergeRawConfigLayers(_0x400acb){const _0x38cc3e=a135_0xb7b5f2,{globalConfig:_0x145fdb,projectConfig:_0x25af74}=_0x400acb;if(_0x25af74[_0x38cc3e(0xd9)]===![]){const _0x26eb11={..._0x25af74};delete _0x26eb11[_0x38cc3e(0xd9)];const _0xcaaa17=_0x25af74[_0x38cc3e(0xa0)]&&typeof _0x25af74['apps']===_0x38cc3e(0xb8)?_0x25af74[_0x38cc3e(0xa0)]:{};Object['keys'](_0xcaaa17)['length']>0x0?_0x26eb11[_0x38cc3e(0xa0)]=_0xcaaa17:delete _0x26eb11[_0x38cc3e(0xa0)];if(_0x38cc3e(0xba)in _0x25af74)_0x26eb11[_0x38cc3e(0xba)]=_0x25af74[_0x38cc3e(0xba)];else Object[_0x38cc3e(0xa5)](_0xcaaa17)[_0x38cc3e(0xc0)]>0x0&&(_0x26eb11['defaultApp']=Object['keys'](_0xcaaa17)[0x0]);return _0x26eb11;}const _0x23288d=_0x145fdb['apps']&&typeof _0x145fdb[_0x38cc3e(0xa0)]===_0x38cc3e(0xb8)?_0x145fdb[_0x38cc3e(0xa0)]:{},_0x2bc15f=_0x25af74[_0x38cc3e(0xa0)]&&typeof _0x25af74[_0x38cc3e(0xa0)]===_0x38cc3e(0xb8)?_0x25af74[_0x38cc3e(0xa0)]:{},_0x1e2b17={..._0x23288d,..._0x2bc15f},_0x4334e9={..._0x145fdb,..._0x25af74};Object['keys'](_0x1e2b17)[_0x38cc3e(0xc0)]>0x0&&(_0x4334e9[_0x38cc3e(0xa0)]=_0x1e2b17);if(_0x38cc3e(0xba)in _0x25af74)_0x4334e9[_0x38cc3e(0xba)]=_0x25af74['defaultApp'];else{if(_0x2bc15f&&Object[_0x38cc3e(0xa5)](_0x2bc15f)[_0x38cc3e(0xc0)]>0x0)_0x4334e9[_0x38cc3e(0xba)]=Object[_0x38cc3e(0xa5)](_0x2bc15f)[0x0];else{if(_0x145fdb[_0x38cc3e(0xba)])_0x4334e9[_0x38cc3e(0xba)]=_0x145fdb['defaultApp'];else{const _0x1f769e=Object[_0x38cc3e(0xa5)](_0x23288d);_0x1f769e[_0x38cc3e(0xc0)]>0x0&&(_0x4334e9[_0x38cc3e(0xba)]=_0x1f769e[0x0]);}}}return _0x4334e9;}export function readRawConfigWithLayers(_0x46d868){const _0x5d72ca=loadRawConfigLayers(_0x46d868);return{'config':mergeRawConfigLayers(_0x5d72ca),'layers':_0x5d72ca};}export function readRawConfig(_0x57f6fe){return mergeRawConfigLayers(loadRawConfigLayers(_0x57f6fe));}export function getConfigAppCode(_0xbecfbc){const _0x520eea=a135_0xb7b5f2,_0x5a8f0e=readRawConfig(_0xbecfbc);if(_0x5a8f0e['apps']&&typeof _0x5a8f0e[_0x520eea(0xa0)]===_0x520eea(0xb8)){const _0x3b4926=_0x5a8f0e[_0x520eea(0xba)];if(_0x3b4926&&_0x5a8f0e[_0x520eea(0xa0)][_0x3b4926]?.[_0x520eea(0xad)])return String(_0x5a8f0e['apps'][_0x3b4926][_0x520eea(0xad)])[_0x520eea(0xb2)]();const _0x280bc6=Object['values'](_0x5a8f0e[_0x520eea(0xa0)])[0x0];if(_0x280bc6?.[_0x520eea(0xad)])return String(_0x280bc6[_0x520eea(0xad)])[_0x520eea(0xb2)]();}const _0x484d7b=_0x5a8f0e[_0x520eea(0xad)]||_0x5a8f0e['app'];if(typeof _0x484d7b!==_0x520eea(0xc8)||_0x484d7b['trim']()==='')return undefined;return _0x484d7b[_0x520eea(0xb2)]();}export function getMultiAppConfigs(_0x3f6a04='project',_0x2e9bde){const _0x2abb4e=a135_0xb7b5f2,_0x1bd744=_0x3f6a04==='merged'?readRawConfig(_0x2e9bde):loadRawConfigLayers(_0x2e9bde)['projectConfig'],_0x7219a6=_0x1bd744['apps'];if(!_0x7219a6||typeof _0x7219a6!==_0x2abb4e(0xb8)||Object[_0x2abb4e(0xa5)](_0x7219a6)['length']===0x0)return null;const _0x20fd8b=_0x1bd744[_0x2abb4e(0xba)];return Object[_0x2abb4e(0xb5)](_0x7219a6)[_0x2abb4e(0xd0)](([_0x3dbd6b,_0x4289ac])=>({'name':_0x3dbd6b,'appcode':_0x4289ac?.['appcode']||'','isDefault':_0x3dbd6b===_0x20fd8b,'env':_0x4289ac?.['env'],'apiDir':_0x4289ac?.['apiDir'],'cookie':_0x4289ac?.[_0x2abb4e(0xca)]||undefined}))[_0x2abb4e(0x97)](_0x374bdd=>_0x374bdd['appcode']);}export function getTemplateBaseUrl(_0x18f948){const _0x46ca5c=a135_0xb7b5f2,_0xf59250=readRawConfig(_0x18f948);if(_0xf59250['template_base_url']&&typeof _0xf59250[_0x46ca5c(0xc1)]===_0x46ca5c(0xc8))return _0xf59250[_0x46ca5c(0xc1)][_0x46ca5c(0xdc)](/\/$/,'');return _0x46ca5c(0xc9);}export function readConfigFile(_0x4cb1a5){return parseAndNormalizeConfig(_0x4cb1a5,'silent');}export function writeConfigFile(_0x218629,_0x1da4b3){const _0x402cdb=a135_0xb7b5f2,_0x113732=dirname(_0x218629);!existsSync(_0x113732)&&mkdirSync(_0x113732,{'recursive':!![]});const _0x1de005=_0x218629+'.tmp';try{writeFileSync(_0x1de005,JSON[_0x402cdb(0xaf)](_0x1da4b3,null,0x2)+'\x0a',{'encoding':_0x402cdb(0xa3),'mode':0x180}),renameSync(_0x1de005,_0x218629);}catch(_0x19fb3a){try{unlinkSync(_0x1de005);}catch{}throw _0x19fb3a;}}export function resolveWriteConfigPath(_0x316474){const _0x3316ff=a135_0xb7b5f2,_0x52a3fd=_0x316474===_0x3316ff(0x9c)?process['cwd']():homedir(),_0x5b2ea1=resolveConfigPath(_0x52a3fd);return _0x5b2ea1??resolve(_0x52a3fd,NEW_CONFIG_NAME);}function buildConfig(_0x50ac69,_0x3eb5f9){const _0x4784f5=a135_0xb7b5f2,_0x28a1a4={};if(_0x50ac69['apps']&&typeof _0x50ac69[_0x4784f5(0xa0)]==='object')for(const [_0x5f381b,_0x2b16f0]of Object['entries'](_0x50ac69[_0x4784f5(0xa0)])){_0x2b16f0&&typeof _0x2b16f0==='object'&&_0x2b16f0[_0x4784f5(0xad)]&&(_0x28a1a4[_0x5f381b]=_0x2b16f0);}const _0x149794=_0x50ac69[_0x4784f5(0xba)]||undefined,_0x1c5187=Object['keys'](_0x28a1a4)['length']>0x0,_0x3f3e53=_0x3eb5f9['app']||env(_0x4784f5(0xb4))||undefined,_0x2a8abb=_0x3f3e53||_0x149794||undefined,_0x5d35d0=_0x3eb5f9[_0x4784f5(0xad)]||env(_0x4784f5(0x93))||undefined,_0x56b47f=_0x5d35d0?Object[_0x4784f5(0xb5)](_0x28a1a4)[_0x4784f5(0xab)](([,_0x438992])=>_0x438992?.[_0x4784f5(0xad)]===_0x5d35d0):undefined,_0x389940=_0x56b47f?.[0x0],_0x368ecd=_0x56b47f?.[0x1];let _0x300f16=_0x5d35d0?_0x389940:_0x2a8abb,_0x1af53f=_0x300f16&&_0x28a1a4[_0x300f16]?_0x28a1a4[_0x300f16]:undefined;_0x5d35d0&&_0x368ecd&&(_0x1af53f=_0x368ecd);const _0x2f9b85=_0x5d35d0?_0x368ecd??_0x1af53f:_0x1af53f,_0x16c45f=_0x3f3e53||(_0x5d35d0?_0x389940:undefined),_0x1fc1d4=_0x5d35d0||_0x2f9b85?.[_0x4784f5(0xad)]||undefined,_0x3c1f5d=_0x3eb5f9[_0x4784f5(0x92)]||env(_0x4784f5(0xd8))||_0x2f9b85?.['env']||_0x50ac69[_0x4784f5(0x92)]||DEFAULT_CONFIG_VALUES[_0x4784f5(0x92)],_0x2a9788=_0x2f9b85?.[_0x4784f5(0xbc)]||_0x50ac69['locale']||DEFAULT_CONFIG_VALUES[_0x4784f5(0xbc)],_0x2c536f=env(_0x4784f5(0xa9))||_0x2f9b85?.[_0x4784f5(0xca)]||_0x50ac69[_0x4784f5(0xca)]||undefined,_0x5580dd=env(_0x4784f5(0xbb))||_0x2f9b85?.[_0x4784f5(0xbd)]||_0x50ac69[_0x4784f5(0xbd)]||undefined,_0x3cf857=_0x3eb5f9[_0x4784f5(0x90)]||env(_0x4784f5(0x9a))||_0x2f9b85?.[_0x4784f5(0x90)]||_0x50ac69['format'],_0x248688=normalizeLegacyOutputFormat(_0x3cf857),_0x2aef95=env(_0x4784f5(0xa4))||_0x2f9b85?.[_0x4784f5(0xc5)]||_0x50ac69[_0x4784f5(0xc5)],_0x1b4cc0=_0x2aef95?Number(_0x2aef95)||undefined:undefined,_0x3fa0fd=env(_0x4784f5(0xd3))||env(_0x4784f5(0x9b))||_0x2f9b85?.['riskLevel']||_0x50ac69[_0x4784f5(0x9e)]||_0x50ac69[_0x4784f5(0xb7)],_0x17fbc2=_0x3fa0fd===_0x4784f5(0xc4)||_0x3fa0fd===_0x4784f5(0xd1)?_0x3fa0fd:DEFAULT_CONFIG_VALUES[_0x4784f5(0x9e)],_0x4c29ba=env(_0x4784f5(0x9d)),_0x1e3027=_0x4c29ba==='1'||_0x4c29ba===_0x4784f5(0xb3),_0x49e777=_0x2f9b85?.[_0x4784f5(0xbe)]||_0x50ac69[_0x4784f5(0xbe)]||DEFAULT_CONFIG_VALUES[_0x4784f5(0xbe)],_0x5b00f1=isDaily(normalizeEnv(String(_0x3c1f5d)))?_0x4784f5(0x98):_0x4784f5(0xcb);return{'appCode':typeof _0x1fc1d4===_0x4784f5(0xc8)&&_0x1fc1d4[_0x4784f5(0xb2)]()?_0x1fc1d4[_0x4784f5(0xb2)]():undefined,'env':_0x5b00f1,'locale':_0x2a9788,'cookie':_0x2c536f,'accessKey':_0x5580dd,'format':_0x248688,'pageSize':_0x1b4cc0,'riskLevel':_0x17fbc2,'verbose':_0x1e3027,'apiDir':_0x49e777,'apps':_0x28a1a4,'defaultApp':_0x149794,'currentApp':_0x1c5187?_0x300f16:undefined,'explicitAppName':_0x16c45f,'raw':_0x50ac69};}async function buildAuth(_0x854766){const _0x52c8d5=a135_0xb7b5f2,{getCookie:_0x217367}=await import(_0x52c8d5(0xc2)),_0x22a241=_0x854766[_0x52c8d5(0xca)]||_0x217367(),_0x2ffd56=_0x22a241?await getIsSessionValid():![];return{'cookie':_0x22a241,'isLoggedIn':_0x2ffd56,async 'getOrLogin'(){const _0x1b0ef0=_0x52c8d5;if(_0x22a241&&_0x2ffd56)return _0x22a241;throw CliErrors[_0x1b0ef0(0xa1)]();}};}export function resolveApiFilePath(_0x4bced5,_0x32afcc){const _0x121b70=a135_0xb7b5f2,_0xa9fdf3=resolve(process[_0x121b70(0xa2)](),_0x4bced5),_0x39d16=resolve(_0xa9fdf3,'api.ts');if(!_0x32afcc)return _0x39d16;const _0x2d9149=readRawConfig(),_0x4203e3=_0x2d9149['apps']&&typeof _0x2d9149[_0x121b70(0xa0)]===_0x121b70(0xb8)?_0x2d9149[_0x121b70(0xa0)]:{},_0x524936=Object[_0x121b70(0xb5)](_0x4203e3)[_0x121b70(0xab)](([,_0x503d0c])=>_0x503d0c?.[_0x121b70(0xad)]===_0x32afcc);if(!_0x524936)return _0x39d16;const [_0x35ee71,_0x35e57b]=_0x524936,_0x3d6927=typeof _0x2d9149[_0x121b70(0xba)]==='string'?_0x2d9149[_0x121b70(0xba)]:undefined;if(_0x35e57b?.['apiDir'])return _0x39d16;if(_0x3d6927&&_0x35ee71!==_0x3d6927)return resolve(_0xa9fdf3,_0x35ee71+_0x121b70(0xcf));return _0x39d16;}
|
|
1
|
+
const a135_0x3ac74b=a135_0xf113;(function(_0x17a675,_0x34cce4){const _0x2ab06d=a135_0xf113,_0x33a82c=_0x17a675();while(!![]){try{const _0x20a65b=parseInt(_0x2ab06d(0x153))/0x1*(parseInt(_0x2ab06d(0x196))/0x2)+-parseInt(_0x2ab06d(0x181))/0x3*(-parseInt(_0x2ab06d(0x159))/0x4)+-parseInt(_0x2ab06d(0x189))/0x5+-parseInt(_0x2ab06d(0x15b))/0x6+-parseInt(_0x2ab06d(0x190))/0x7*(-parseInt(_0x2ab06d(0x178))/0x8)+-parseInt(_0x2ab06d(0x170))/0x9+-parseInt(_0x2ab06d(0x18c))/0xa*(-parseInt(_0x2ab06d(0x15c))/0xb);if(_0x20a65b===_0x34cce4)break;else _0x33a82c['push'](_0x33a82c['shift']());}catch(_0x2948e3){_0x33a82c['push'](_0x33a82c['shift']());}}}(a135_0x3fb2,0x5bbf4));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x4f2cfb){return process.env[`RABETBASE_${_0x4f2cfb}`]||process.env[`LOVRABET_${_0x4f2cfb}`]||undefined;}export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=[a135_0x3ac74b(0x160),a135_0x3ac74b(0x161),a135_0x3ac74b(0x158)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a135_0x3ac74b(0x194)](_0x17c99e=>_0x17c99e!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x580964){for(const _0x53397a of CONFIG_NAMES){const _0x5d4a93=resolve(_0x580964,_0x53397a);if(existsSync(_0x5d4a93))return _0x5d4a93;}return undefined;}export function findProjectRootDirectory(_0x208987=process[a135_0x3ac74b(0x184)]()){let _0x3084c8=resolve(_0x208987);const {root:_0x4af422}=parse(_0x3084c8),_0x1061e1=homedir();while(!![]){if(resolveConfigPath(_0x3084c8)){if(_0x3084c8===_0x1061e1)break;return _0x3084c8;}if(_0x3084c8===_0x4af422||_0x3084c8===_0x1061e1)break;const _0x376c73=dirname(_0x3084c8);if(_0x376c73===_0x3084c8)break;_0x3084c8=_0x376c73;}return resolve(_0x208987);}export async function createContext(_0x54dd45){const _0x2a05b0=a135_0x3ac74b,_0x146eec=readRawConfig(),_0xcc01d=buildConfig(_0x146eec,_0x54dd45),{initEnv:_0x225747}=await import(_0x2a05b0(0x15d));if(_0xcc01d[_0x2a05b0(0x154)])_0x225747(_0xcc01d['env']);else _0x54dd45[_0x2a05b0(0x154)]&&typeof _0x54dd45[_0x2a05b0(0x154)]===_0x2a05b0(0x17f)&&_0x225747(_0x54dd45[_0x2a05b0(0x154)]);const {initDomains:_0x49c5fe,getUserDomain:_0x44e677,getApiDomain:_0x426869}=await import(_0x2a05b0(0x168));_0x49c5fe({'apiDomain':_0x146eec['apiDomain']||undefined,'userDomain':_0x146eec[_0x2a05b0(0x173)]||undefined,'runtimeDomain':_0x146eec[_0x2a05b0(0x16f)]||undefined});const _0x1c7b38={'apiDomain':_0x426869(),'userDomain':_0x44e677()},_0x4b85e2=await buildAuth(_0xcc01d);logger[_0x2a05b0(0x163)](process[_0x2a05b0(0x184)]());const _0x1b1437=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2a05b0(0x14f)](0x2)['join']('\x20'))['trim']();logger[_0x2a05b0(0x165)](_0x1b1437);const {isNonInteractive:_0x2f4877}=await import('./utils/is-non-interactive.js'),_0x39e3c8=_0x2f4877(_0x54dd45);return{'config':_0xcc01d,'auth':_0x4b85e2,'logger':logger,'env':_0x1c7b38,'nonInteractive':_0x39e3c8};}export function buildConfigFromFlags(_0x50409c){return buildConfig(readRawConfig(),_0x50409c);}export function getProjectConfigPath(){const _0x93d886=a135_0x3ac74b;return resolveConfigPath(process[_0x93d886(0x184)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}function a135_0x3fb2(){const _0x271222=['./constant/domain.js','FORMAT','utf8','authRequired','defaultApp','https://g.lovrabet.com/dist/lovrabet-skill','./auth/get-cookie.js','runtimeDomain','1626237eRWCJI','APP','message','userDomain','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','riskLevel','silent','entries','5423032xlhRNU','appcode','apiDir','parse','pageSize','APPCODE','Project','string','projectConfig','1113iRUZJO','get','length','cwd','PAGE_SIZE','inherit','merged','RISK_LEVEL','3533380lRfWdp','\x0a\x20\x20','Global','2246770qeFmNh','read','app','status','7wSpQZP','set','-api.ts','map','filter','maxRisk','22604euxncV','COOKIE','find','keys','locale','apps','values','accessKey','true','project','VERBOSE','trim','empty','slice','.tmp','config','api.ts','40JKwUPL','env','template_base_url','migrated','object','.lovrabetrc','1652EWDxOv','cookie','1468164bZIFuG','11QsoHzx','./constant/env.js','stringify','error','.rabetbase.json','.lovrabet.json','format','setLogPath','ENV','setRawCommand','production','replace'];a135_0x3fb2=function(){return _0x271222;};return a135_0x3fb2();}export function inspectCliConfigJsonFile(_0x30815e){const _0x1b0ec4=a135_0x3ac74b;if(!existsSync(_0x30815e))return{'status':'missing'};try{const _0x5b2e42=readFileSync(_0x30815e,{'encoding':'utf8'});if(!_0x5b2e42?.[_0x1b0ec4(0x14d)]())return{'status':'empty'};const _0x5ac6fe=JSON[_0x1b0ec4(0x17b)](_0x5b2e42);return{'status':'ok','data':_0x5ac6fe};}catch(_0x1ff285){return{'status':'error','message':_0x1ff285 instanceof Error?_0x1ff285[_0x1b0ec4(0x172)]:String(_0x1ff285)};}}function a135_0xf113(_0x2bbe50,_0x9017be){_0x2bbe50=_0x2bbe50-0x14d;const _0x3fb249=a135_0x3fb2();let _0xf11361=_0x3fb249[_0x2bbe50];return _0xf11361;}function parseCliConfigJsonFile(_0x4aebf2,_0x538a14,_0x548f65){const _0x8cee3b=a135_0x3ac74b,_0x7ccd6b=inspectCliConfigJsonFile(_0x4aebf2);if(_0x7ccd6b[_0x8cee3b(0x18f)]==='missing'||_0x7ccd6b[_0x8cee3b(0x18f)]===_0x8cee3b(0x14e))return{};if(_0x7ccd6b[_0x8cee3b(0x18f)]==='ok')return _0x7ccd6b['data'];return _0x538a14==='warn'&&_0x548f65&&console[_0x8cee3b(0x15f)](CLI_BIN_NAME+':\x20'+_0x548f65+_0x8cee3b(0x174)+_0x4aebf2+_0x8cee3b(0x18a)+_0x7ccd6b[_0x8cee3b(0x172)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x3b101c){const _0x2b1ff9=a135_0x3ac74b;if(!_0x3b101c||typeof _0x3b101c!==_0x2b1ff9(0x157))return{'config':{},'migrated':![]};const _0x5f0349={..._0x3b101c},_0x595163=_0x5f0349[_0x2b1ff9(0x19b)]&&typeof _0x5f0349[_0x2b1ff9(0x19b)]===_0x2b1ff9(0x157)?{..._0x5f0349[_0x2b1ff9(0x19b)]}:{},_0x1bd2af=Object['keys'](_0x595163)[_0x2b1ff9(0x183)],_0x55aa5a=_0x5f0349[_0x2b1ff9(0x179)]||_0x5f0349[_0x2b1ff9(0x18e)];let _0x3dc829=![];if(_0x55aa5a&&_0x1bd2af===0x0){const _0x43a057=typeof _0x5f0349[_0x2b1ff9(0x16c)]===_0x2b1ff9(0x17f)&&_0x5f0349[_0x2b1ff9(0x16c)]['trim']()?_0x5f0349[_0x2b1ff9(0x16c)]:String(_0x55aa5a)['trim']();_0x595163[_0x43a057]={'appcode':String(_0x55aa5a)[_0x2b1ff9(0x14d)](),..._0x5f0349['env']!=null?{'env':_0x5f0349[_0x2b1ff9(0x154)]}:{},..._0x5f0349[_0x2b1ff9(0x17a)]!=null?{'apiDir':_0x5f0349['apiDir']}:{},..._0x5f0349['cookie']!=null?{'cookie':_0x5f0349[_0x2b1ff9(0x15a)]}:{},..._0x5f0349[_0x2b1ff9(0x19d)]!=null?{'accessKey':_0x5f0349[_0x2b1ff9(0x19d)]}:{},..._0x5f0349['format']!=null?{'format':_0x5f0349[_0x2b1ff9(0x162)]}:{},..._0x5f0349[_0x2b1ff9(0x17c)]!=null?{'pageSize':_0x5f0349[_0x2b1ff9(0x17c)]}:{},..._0x5f0349['riskLevel']!=null?{'riskLevel':_0x5f0349[_0x2b1ff9(0x175)]}:{},..._0x5f0349['locale']!=null?{'locale':_0x5f0349[_0x2b1ff9(0x19a)]}:{}},_0x5f0349[_0x2b1ff9(0x19b)]=_0x595163;if(!_0x5f0349[_0x2b1ff9(0x16c)])_0x5f0349[_0x2b1ff9(0x16c)]=_0x43a057;_0x3dc829=!![];}return('appcode'in _0x5f0349||_0x2b1ff9(0x18e)in _0x5f0349)&&(delete _0x5f0349[_0x2b1ff9(0x179)],delete _0x5f0349[_0x2b1ff9(0x18e)],_0x3dc829=!![]),{'config':_0x5f0349,'migrated':_0x3dc829};}function writeNormalizedConfigIfNeeded(_0x1bfcc8,_0x1b6104){const _0xdc1cc1=a135_0x3ac74b,_0x3667e0=JSON['stringify'](_0x1b6104,null,0x2)+'\x0a';if(normalizedWriteCache[_0xdc1cc1(0x182)](_0x1bfcc8)===_0x3667e0)return;writeConfigFile(_0x1bfcc8,_0x1b6104),normalizedWriteCache[_0xdc1cc1(0x191)](_0x1bfcc8,_0x3667e0);}function parseAndNormalizeConfig(_0x4eac94,_0x391c09,_0x2830a8){const _0xb0c14b=a135_0x3ac74b,_0x4dee38=parseCliConfigJsonFile(_0x4eac94,_0x391c09,_0x2830a8),_0x367a92=normalizeLegacyConfigShape(_0x4dee38);if(_0x367a92[_0xb0c14b(0x156)])try{writeNormalizedConfigIfNeeded(_0x4eac94,_0x367a92['config']);}catch{}return _0x367a92[_0xb0c14b(0x151)];}export function loadRawConfigLayers(_0x495dac){const _0x1ff451=a135_0x3ac74b;let _0x45e314={},_0x5e6dfe={};const _0x278436=resolveConfigPath(homedir());_0x278436&&(_0x45e314=parseAndNormalizeConfig(_0x278436,'warn',_0x1ff451(0x18b)));const _0x27d6dc=_0x495dac??findProjectRootDirectory(),_0x4f4600=resolveConfigPath(_0x27d6dc);return _0x4f4600&&(_0x5e6dfe=parseAndNormalizeConfig(_0x4f4600,'warn',_0x1ff451(0x17e))),{'globalPath':_0x278436,'projectPath':_0x4f4600,'globalConfig':_0x45e314,'projectConfig':_0x5e6dfe};}function mergeRawConfigLayers(_0x31fb63){const _0x301f28=a135_0x3ac74b,{globalConfig:_0x5f28eb,projectConfig:_0x4d26a0}=_0x31fb63;if(_0x4d26a0[_0x301f28(0x186)]===![]){const _0x4f2b84={..._0x4d26a0};delete _0x4f2b84[_0x301f28(0x186)];const _0x3d5bb1=_0x4d26a0[_0x301f28(0x19b)]&&typeof _0x4d26a0[_0x301f28(0x19b)]===_0x301f28(0x157)?_0x4d26a0[_0x301f28(0x19b)]:{};Object[_0x301f28(0x199)](_0x3d5bb1)[_0x301f28(0x183)]>0x0?_0x4f2b84['apps']=_0x3d5bb1:delete _0x4f2b84[_0x301f28(0x19b)];if(_0x301f28(0x16c)in _0x4d26a0)_0x4f2b84[_0x301f28(0x16c)]=_0x4d26a0[_0x301f28(0x16c)];else Object['keys'](_0x3d5bb1)[_0x301f28(0x183)]>0x0&&(_0x4f2b84[_0x301f28(0x16c)]=Object[_0x301f28(0x199)](_0x3d5bb1)[0x0]);return _0x4f2b84;}const _0x1bd7a5=_0x5f28eb['apps']&&typeof _0x5f28eb['apps']===_0x301f28(0x157)?_0x5f28eb[_0x301f28(0x19b)]:{},_0x1946b2=_0x4d26a0[_0x301f28(0x19b)]&&typeof _0x4d26a0[_0x301f28(0x19b)]===_0x301f28(0x157)?_0x4d26a0[_0x301f28(0x19b)]:{},_0x3c8fcd={..._0x1bd7a5,..._0x1946b2},_0x369457={..._0x5f28eb,..._0x4d26a0};Object[_0x301f28(0x199)](_0x3c8fcd)[_0x301f28(0x183)]>0x0&&(_0x369457[_0x301f28(0x19b)]=_0x3c8fcd);if(_0x301f28(0x16c)in _0x4d26a0)_0x369457['defaultApp']=_0x4d26a0[_0x301f28(0x16c)];else{if(_0x1946b2&&Object[_0x301f28(0x199)](_0x1946b2)[_0x301f28(0x183)]>0x0)_0x369457[_0x301f28(0x16c)]=Object[_0x301f28(0x199)](_0x1946b2)[0x0];else{if(_0x5f28eb[_0x301f28(0x16c)])_0x369457[_0x301f28(0x16c)]=_0x5f28eb[_0x301f28(0x16c)];else{const _0x4ec1c2=Object[_0x301f28(0x199)](_0x1bd7a5);_0x4ec1c2[_0x301f28(0x183)]>0x0&&(_0x369457[_0x301f28(0x16c)]=_0x4ec1c2[0x0]);}}}return _0x369457;}export function readRawConfigWithLayers(_0x253607){const _0x40018c=loadRawConfigLayers(_0x253607);return{'config':mergeRawConfigLayers(_0x40018c),'layers':_0x40018c};}export function readRawConfig(_0x54d505){return mergeRawConfigLayers(loadRawConfigLayers(_0x54d505));}export function getConfigAppCode(_0x5b9aa7){const _0x55cbc2=a135_0x3ac74b,_0x55406d=readRawConfig(_0x5b9aa7);if(_0x55406d[_0x55cbc2(0x19b)]&&typeof _0x55406d[_0x55cbc2(0x19b)]===_0x55cbc2(0x157)){const _0x518378=_0x55406d[_0x55cbc2(0x16c)];if(_0x518378&&_0x55406d[_0x55cbc2(0x19b)][_0x518378]?.[_0x55cbc2(0x179)])return String(_0x55406d['apps'][_0x518378][_0x55cbc2(0x179)])['trim']();const _0x31fea8=Object[_0x55cbc2(0x19c)](_0x55406d['apps'])[0x0];if(_0x31fea8?.[_0x55cbc2(0x179)])return String(_0x31fea8[_0x55cbc2(0x179)])[_0x55cbc2(0x14d)]();}const _0x43b01f=_0x55406d[_0x55cbc2(0x179)]||_0x55406d[_0x55cbc2(0x18e)];if(typeof _0x43b01f!==_0x55cbc2(0x17f)||_0x43b01f[_0x55cbc2(0x14d)]()==='')return undefined;return _0x43b01f[_0x55cbc2(0x14d)]();}export function getMultiAppConfigs(_0x42b2f7=a135_0x3ac74b(0x19f),_0x139b7b){const _0x2be4ad=a135_0x3ac74b,_0x385b9a=_0x42b2f7===_0x2be4ad(0x187)?readRawConfig(_0x139b7b):loadRawConfigLayers(_0x139b7b)[_0x2be4ad(0x180)],_0x23693f=_0x385b9a[_0x2be4ad(0x19b)];if(!_0x23693f||typeof _0x23693f!==_0x2be4ad(0x157)||Object[_0x2be4ad(0x199)](_0x23693f)[_0x2be4ad(0x183)]===0x0)return null;const _0x140bd1=_0x385b9a[_0x2be4ad(0x16c)];return Object[_0x2be4ad(0x177)](_0x23693f)[_0x2be4ad(0x193)](([_0x1b5d2f,_0x313bad])=>({'name':_0x1b5d2f,'appcode':_0x313bad?.[_0x2be4ad(0x179)]||'','isDefault':_0x1b5d2f===_0x140bd1,'env':_0x313bad?.[_0x2be4ad(0x154)],'apiDir':_0x313bad?.['apiDir'],'cookie':_0x313bad?.[_0x2be4ad(0x15a)]||undefined}))['filter'](_0x5537e0=>_0x5537e0[_0x2be4ad(0x179)]);}export function getTemplateBaseUrl(_0x42c232){const _0x6b60c9=a135_0x3ac74b,_0x4563c2=readRawConfig(_0x42c232);if(_0x4563c2[_0x6b60c9(0x155)]&&typeof _0x4563c2['template_base_url']===_0x6b60c9(0x17f))return _0x4563c2[_0x6b60c9(0x155)][_0x6b60c9(0x167)](/\/$/,'');return _0x6b60c9(0x16d);}export function readConfigFile(_0x50c0b1){const _0x15048f=a135_0x3ac74b;return parseAndNormalizeConfig(_0x50c0b1,_0x15048f(0x176));}export function writeConfigFile(_0xdcfce2,_0x87e5b6){const _0xe79dd5=a135_0x3ac74b,_0x12bac2=dirname(_0xdcfce2);!existsSync(_0x12bac2)&&mkdirSync(_0x12bac2,{'recursive':!![]});const _0x3fbdc9=_0xdcfce2+_0xe79dd5(0x150);try{writeFileSync(_0x3fbdc9,JSON[_0xe79dd5(0x15e)](_0x87e5b6,null,0x2)+'\x0a',{'encoding':_0xe79dd5(0x16a),'mode':0x180}),renameSync(_0x3fbdc9,_0xdcfce2);}catch(_0x3595ac){try{unlinkSync(_0x3fbdc9);}catch{}throw _0x3595ac;}}export function resolveWriteConfigPath(_0x2664a6){const _0xa0b806=a135_0x3ac74b,_0x497bb2=_0x2664a6==='project'?process[_0xa0b806(0x184)]():homedir(),_0xf258b0=resolveConfigPath(_0x497bb2);return _0xf258b0??resolve(_0x497bb2,NEW_CONFIG_NAME);}function buildConfig(_0x55fef7,_0x4d96c3){const _0x5ddf78=a135_0x3ac74b,_0x2bc96c={};if(_0x55fef7['apps']&&typeof _0x55fef7[_0x5ddf78(0x19b)]===_0x5ddf78(0x157))for(const [_0x2b5e0f,_0x1b4059]of Object[_0x5ddf78(0x177)](_0x55fef7[_0x5ddf78(0x19b)])){_0x1b4059&&typeof _0x1b4059==='object'&&_0x1b4059[_0x5ddf78(0x179)]&&(_0x2bc96c[_0x2b5e0f]=_0x1b4059);}const _0x2d4ccf=_0x55fef7[_0x5ddf78(0x16c)]||undefined,_0x2f9f9a=Object['keys'](_0x2bc96c)[_0x5ddf78(0x183)]>0x0,_0x388769=_0x4d96c3['app']||env(_0x5ddf78(0x171))||undefined,_0x419ffa=_0x388769||_0x2d4ccf||undefined,_0x3fd402=_0x4d96c3[_0x5ddf78(0x179)]||env(_0x5ddf78(0x17d))||undefined,_0x25f335=_0x3fd402?Object[_0x5ddf78(0x177)](_0x2bc96c)[_0x5ddf78(0x198)](([,_0x33b97e])=>_0x33b97e?.['appcode']===_0x3fd402):undefined,_0x192594=_0x25f335?.[0x0],_0x18f331=_0x25f335?.[0x1];let _0x5d8d81=_0x3fd402?_0x192594:_0x419ffa,_0x4415e8=_0x5d8d81&&_0x2bc96c[_0x5d8d81]?_0x2bc96c[_0x5d8d81]:undefined;_0x3fd402&&_0x18f331&&(_0x4415e8=_0x18f331);const _0x34f22d=_0x3fd402?_0x18f331??_0x4415e8:_0x4415e8,_0x164804=_0x388769||(_0x3fd402?_0x192594:undefined),_0x18480a=_0x3fd402||_0x34f22d?.[_0x5ddf78(0x179)]||undefined,_0x5a947f=_0x4d96c3['env']||env(_0x5ddf78(0x164))||_0x34f22d?.[_0x5ddf78(0x154)]||_0x55fef7[_0x5ddf78(0x154)]||DEFAULT_CONFIG_VALUES[_0x5ddf78(0x154)],_0x298412=_0x34f22d?.['locale']||_0x55fef7['locale']||DEFAULT_CONFIG_VALUES[_0x5ddf78(0x19a)],_0xe44195=env(_0x5ddf78(0x197))||_0x34f22d?.[_0x5ddf78(0x15a)]||_0x55fef7[_0x5ddf78(0x15a)]||undefined,_0x1562c7=env('ACCESS_KEY')||_0x34f22d?.[_0x5ddf78(0x19d)]||_0x55fef7[_0x5ddf78(0x19d)]||undefined,_0x547132=_0x4d96c3['format']||env(_0x5ddf78(0x169))||_0x34f22d?.['format']||_0x55fef7[_0x5ddf78(0x162)],_0x35cff7=normalizeLegacyOutputFormat(_0x547132),_0xe35faa=env(_0x5ddf78(0x185))||_0x34f22d?.[_0x5ddf78(0x17c)]||_0x55fef7[_0x5ddf78(0x17c)],_0x477e7b=_0xe35faa?Number(_0xe35faa)||undefined:undefined,_0x4ca627=env(_0x5ddf78(0x188))||env('MAX_RISK')||_0x34f22d?.['riskLevel']||_0x55fef7['riskLevel']||_0x55fef7[_0x5ddf78(0x195)],_0x310d8a=_0x4ca627===_0x5ddf78(0x18d)||_0x4ca627==='write'?_0x4ca627:DEFAULT_CONFIG_VALUES[_0x5ddf78(0x175)],_0x195fbf=env(_0x5ddf78(0x1a0)),_0x3d3e16=_0x195fbf==='1'||_0x195fbf===_0x5ddf78(0x19e),_0x2b84e2=_0x34f22d?.[_0x5ddf78(0x17a)]||_0x55fef7['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x72d738=isDaily(normalizeEnv(String(_0x5a947f)))?'daily':_0x5ddf78(0x166);return{'appCode':typeof _0x18480a==='string'&&_0x18480a[_0x5ddf78(0x14d)]()?_0x18480a[_0x5ddf78(0x14d)]():undefined,'env':_0x72d738,'locale':_0x298412,'cookie':_0xe44195,'accessKey':_0x1562c7,'format':_0x35cff7,'pageSize':_0x477e7b,'riskLevel':_0x310d8a,'verbose':_0x3d3e16,'apiDir':_0x2b84e2,'apps':_0x2bc96c,'defaultApp':_0x2d4ccf,'currentApp':_0x2f9f9a?_0x5d8d81:undefined,'explicitAppName':_0x164804,'raw':_0x55fef7};}async function buildAuth(_0x588dbb){const _0x5bd5fa=a135_0x3ac74b,{getCookie:_0x3b029c}=await import(_0x5bd5fa(0x16e)),_0x3b0721=_0x588dbb[_0x5bd5fa(0x15a)]||_0x3b029c(),_0x544813=_0x3b0721?await getIsSessionValid():![];return{'cookie':_0x3b0721,'isLoggedIn':_0x544813,async 'getOrLogin'(){const _0x385e15=_0x5bd5fa;if(_0x3b0721&&_0x544813)return _0x3b0721;throw CliErrors[_0x385e15(0x16b)]();}};}export function resolveApiFilePath(_0x29fab2,_0x69705b){const _0x4c8aac=a135_0x3ac74b,_0xbe0f89=resolve(process[_0x4c8aac(0x184)](),_0x29fab2),_0x2c8728=resolve(_0xbe0f89,_0x4c8aac(0x152));if(!_0x69705b)return _0x2c8728;const _0x216c91=readRawConfig(),_0x114efc=_0x216c91[_0x4c8aac(0x19b)]&&typeof _0x216c91['apps']==='object'?_0x216c91['apps']:{},_0x31077a=Object['entries'](_0x114efc)[_0x4c8aac(0x198)](([,_0x590fb1])=>_0x590fb1?.[_0x4c8aac(0x179)]===_0x69705b);if(!_0x31077a)return _0x2c8728;const [_0x55050d,_0x2f20e5]=_0x31077a,_0x3d67bc=typeof _0x216c91['defaultApp']===_0x4c8aac(0x17f)?_0x216c91['defaultApp']:undefined;if(_0x2f20e5?.[_0x4c8aac(0x17a)])return _0x2c8728;if(_0x3d67bc&&_0x55050d!==_0x3d67bc)return resolve(_0xbe0f89,_0x55050d+_0x4c8aac(0x192));return _0x2c8728;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44cfbc,_0x5e4963){const _0x3b6c71=a136_0x4500,_0x7415f=_0x44cfbc();while(!![]){try{const _0x1417db=parseInt(_0x3b6c71(0x1f8))/0x1+parseInt(_0x3b6c71(0x1f9))/0x2+parseInt(_0x3b6c71(0x1f1))/0x3+-parseInt(_0x3b6c71(0x1f7))/0x4+-parseInt(_0x3b6c71(0x1ec))/0x5*(parseInt(_0x3b6c71(0x1eb))/0x6)+parseInt(_0x3b6c71(0x1f3))/0x7+-parseInt(_0x3b6c71(0x1f4))/0x8*(parseInt(_0x3b6c71(0x1fa))/0x9);if(_0x1417db===_0x5e4963)break;else _0x7415f['push'](_0x7415f['shift']());}catch(_0xdd0a1a){_0x7415f['push'](_0x7415f['shift']());}}}(a136_0x2878,0xd52da));function a136_0x4500(_0x229a92,_0x11eadd){_0x229a92=_0x229a92-0x1eb;const _0x28784d=a136_0x2878();let _0x450072=_0x28784d[_0x229a92];return _0x450072;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x51c5c0){const _0x180a62=a136_0x4500,_0x47717c=[],_0x1a207d=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x219aa4;while((_0x219aa4=_0x1a207d['exec'](_0x51c5c0))!==null){_0x47717c[_0x180a62(0x1f0)]({'datasetCode':_0x219aa4[0x1],'tableName':_0x219aa4[0x2],'name':_0x219aa4[0x3],'alias':_0x219aa4[0x4]});}return _0x47717c;}export function loadAliasMap(_0x3e11ed,_0x104ec0,_0xff61a4){const _0x2d3298=a136_0x4500,_0x54d335=_0xff61a4??resolve(process[_0x2d3298(0x1ed)](),_0x3e11ed,_0x2d3298(0x1ee));if(cache['has'](_0x54d335))return cache[_0x2d3298(0x1f5)](_0x54d335);if(!existsSync(_0x54d335))return cache[_0x2d3298(0x1ef)](_0x54d335,[]),[];try{const _0x259c17=readFileSync(_0x54d335,_0x2d3298(0x1f6)),_0x7b3683=parseApiFile(_0x259c17);return cache[_0x2d3298(0x1ef)](_0x54d335,_0x7b3683),_0x7b3683;}catch{return cache['set'](_0x54d335,[]),[];}}export function resolveAlias(_0x55da18,_0x3be3c0,_0x5eca60,_0x1b3a1d){const _0x20c5ee=a136_0x4500;if(!_0x3be3c0)return undefined;const _0x288da2=loadAliasMap(_0x55da18,_0x5eca60,_0x1b3a1d),_0x1840ad=_0x288da2[_0x20c5ee(0x1f2)](_0x141576=>_0x141576[_0x20c5ee(0x1fb)]===_0x3be3c0);return _0x1840ad?.['datasetCode'];}function a136_0x2878(){const _0x480527=['6552351NDvyVo','alias','256794iuqPrk','70QZgReb','cwd','api.ts','set','push','657525zTvEMJ','find','9504334wSnWsa','8SJusDK','get','utf-8','2196672hyIYGY','137760UrLCOG','2069748QAXvjp'];a136_0x2878=function(){return _0x480527;};return a136_0x2878();}export function listAliases(_0x160cdc,_0x1e488e,_0x13c979){return loadAliasMap(_0x160cdc,_0x1e488e,_0x13c979);}
|