@lovrabet/rabetbase-cli 2.2.5-beta.2 → 2.3.1-beta.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 -0
- 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-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/skill/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x36c69f=a142_0x11d3;(function(_0x39c1f9,_0x1f21c0){const _0x13dd45=a142_0x11d3,_0x294317=_0x39c1f9();while(!![]){try{const _0x3f2070=parseInt(_0x13dd45(0x87))/0x1*(parseInt(_0x13dd45(0x8a))/0x2)+-parseInt(_0x13dd45(0xaa))/0x3*(parseInt(_0x13dd45(0x96))/0x4)+-parseInt(_0x13dd45(0xa9))/0x5+-parseInt(_0x13dd45(0x86))/0x6*(parseInt(_0x13dd45(0x89))/0x7)+parseInt(_0x13dd45(0xa5))/0x8+parseInt(_0x13dd45(0xac))/0x9+-parseInt(_0x13dd45(0xa3))/0xa*(-parseInt(_0x13dd45(0x8d))/0xb);if(_0x3f2070===_0x1f21c0)break;else _0x294317['push'](_0x294317['shift']());}catch(_0x9b250f){_0x294317['push'](_0x294317['shift']());}}}(a142_0x3f3c,0xc7030));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';function a142_0x3f3c(){const _0x2ef787=['isArray','number','workspace.','pageSize','Use\x20`','3359814dJCeMB','23063ltbJLr','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','14TkALXs','10PloAKx','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20use\x20--app\x20<name>`.','9171217kFYNGf','string','appcode','validation','length','flag','Target\x20environment','\x20(appcode:\x20','\x20--appcode\x20<code>`.','10180oJnpRe','object','apps','join','updated','initialized','init','\x22\x20not\x20found.','\x20--app\x20','defaultFormat',').\x20Config:\x20','str','locale','30obrzvY','trim','2688880rveQpo','apiDir','keys','App\x20\x22','6062430oSxGJT','645JGEAVO','Missing\x20workspace\x20app\x20selector.','6678765kZWBAN','globalConfig','workspace','.\x20Credentials:\x20not\x20written.','format','app','riskLevel','\x20workspace\x20','defaultApp','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','write','env','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'];a142_0x3f3c=function(){return _0x2ef787;};return a142_0x3f3c();}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+a142_0x36c69f(0xb6),SAFE_PROFILE_KEYS=[a142_0x36c69f(0x8f),'env','apiDir',a142_0x36c69f(0xb0),'pageSize',a142_0x36c69f(0xb2),a142_0x36c69f(0xa2)],workspaceFlags=[{'name':a142_0x36c69f(0xb1),'type':a142_0x36c69f(0x8e),'description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':a142_0x36c69f(0x8f),'type':a142_0x36c69f(0x8e),'description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a142_0x36c69f(0xb8),'type':a142_0x36c69f(0x8e),'description':a142_0x36c69f(0x93),'enum':[...RABETBASE_ENV_VALUES]},{'name':a142_0x36c69f(0xa6),'type':'string','description':a142_0x36c69f(0x8b)},{'name':'defaultFormat','type':a142_0x36c69f(0x8e),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a142_0x36c69f(0x84),'type':a142_0x36c69f(0xbb),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a142_0x36c69f(0xb2),'type':a142_0x36c69f(0x8e),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a142_0x36c69f(0x8e),'description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x807a35){const _0x5964c7=a142_0x36c69f;return!!_0x807a35&&typeof _0x807a35===_0x5964c7(0x97)&&!Array[_0x5964c7(0xba)](_0x807a35);}function assertValidAppcode(_0x2752e3){const {valid:_0x4245d2,message:_0x1648ad}=validateAppcode(_0x2752e3);if(!_0x4245d2)throw CliErrors['validation']('Invalid\x20appcode:\x20'+_0x2752e3,_0x1648ad);}function sanitizeProfile(_0x373440){if(!isRecord(_0x373440))return{};const _0x917512={};for(const _0x2e9a65 of SAFE_PROFILE_KEYS){if(_0x373440[_0x2e9a65]!==undefined)_0x917512[_0x2e9a65]=_0x373440[_0x2e9a65];}return _0x917512;}function cloneProfile(_0x3ada54){return isRecord(_0x3ada54)?{..._0x3ada54}:{};}function a142_0x11d3(_0x5a093f,_0x15a22d){_0x5a093f=_0x5a093f-0x84;const _0x3f3c2c=a142_0x3f3c();let _0x11d30f=_0x3f3c2c[_0x5a093f];return _0x11d30f;}function collectWorkspaceProfileOverrides(_0x3fcc8f){const _0x46bd1e=a142_0x36c69f,_0x49c5d4={},_0x58c5ab=_0x3fcc8f[_0x46bd1e(0xa1)]('env'),_0x293b59=_0x3fcc8f['str'](_0x46bd1e(0xa6)),_0x184972=_0x3fcc8f[_0x46bd1e(0xa1)](_0x46bd1e(0x9f)),_0x374b34=_0x3fcc8f[_0x46bd1e(0x92)]('pageSize'),_0x299409=_0x3fcc8f[_0x46bd1e(0xa1)](_0x46bd1e(0xb2)),_0x40b632=_0x3fcc8f[_0x46bd1e(0xa1)]('locale');if(_0x58c5ab)_0x49c5d4[_0x46bd1e(0xb8)]=_0x58c5ab;if(_0x293b59)_0x49c5d4[_0x46bd1e(0xa6)]=_0x293b59;if(_0x184972)_0x49c5d4[_0x46bd1e(0xb0)]=_0x184972;if(_0x374b34!==undefined&&_0x374b34!=='')_0x49c5d4['pageSize']=Number(_0x374b34);if(_0x299409)_0x49c5d4[_0x46bd1e(0xb2)]=_0x299409;if(_0x40b632)_0x49c5d4[_0x46bd1e(0xa2)]=_0x40b632;return _0x49c5d4;}async function validateWorkspaceArgs(_0x530b8b){const _0x131027=a142_0x36c69f,_0xf78c1d=_0x530b8b[_0x131027(0xa1)](_0x131027(0xb1))[_0x131027(0xa4)](),_0x3a4493=_0x530b8b[_0x131027(0xa1)](_0x131027(0x8f))[_0x131027(0xa4)]();if(!_0xf78c1d&&!_0x3a4493)throw CliErrors[_0x131027(0x90)](_0x131027(0xab),_0x131027(0x85)+CLI_BIN_NAME+_0x131027(0xb9)+CLI_BIN_NAME+_0x131027(0x8c));if(_0x3a4493)assertValidAppcode(_0x3a4493);}function resolveKnownApps(){const _0x153b53=a142_0x36c69f,{config:_0x3f97cb,layers:_0x8ea288}=readRawConfigWithLayers(),_0x449afc=isRecord(_0x3f97cb[_0x153b53(0x98)])?_0x3f97cb[_0x153b53(0x98)]:{},_0x3fbe4f=isRecord(_0x8ea288[_0x153b53(0xad)]['apps'])?_0x8ea288[_0x153b53(0xad)][_0x153b53(0x98)]:{};return{..._0x3fbe4f,..._0x449afc};}async function configureWorkspace(_0x4bd830,_0x36457e){const _0x213ed4=a142_0x36c69f,_0x37e266=_0x4bd830['str'](_0x213ed4(0xb1))['trim'](),_0xb93532=_0x4bd830[_0x213ed4(0xa1)](_0x213ed4(0x8f))[_0x213ed4(0xa4)](),_0x2ca074=_0x37e266||_0xb93532;if(!_0x2ca074)throw CliErrors[_0x213ed4(0x90)](_0x213ed4(0xab),_0x213ed4(0x85)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x213ed4(0x8c));if(_0xb93532)assertValidAppcode(_0xb93532);const _0x23f10c=resolveWriteConfigPath('project'),_0x360517=readConfigFile(_0x23f10c),_0x367750=resolveKnownApps(),_0x3e1373=isRecord(_0x360517[_0x213ed4(0x98)])?{..._0x360517['apps']}:{},_0x3324a1=cloneProfile(_0x3e1373[_0x2ca074]),_0xcb062a=sanitizeProfile(_0x367750[_0x2ca074]),_0x56d4ee=_0xb93532?{}:_0xcb062a,_0xf908de=_0xb93532||_0x56d4ee[_0x213ed4(0x8f)];if(!_0xf908de){const _0x584f44=Object[_0x213ed4(0xa7)](_0x367750),_0x3634c8=_0x584f44[_0x213ed4(0x91)]===0x0?_0x213ed4(0x85)+CLI_BIN_NAME+_0x213ed4(0xb3)+_0x36457e+_0x213ed4(0x9e)+_0x2ca074+_0x213ed4(0x95):_0x213ed4(0x88)+_0x584f44[_0x213ed4(0x99)](',\x20');throw CliErrors[_0x213ed4(0x90)](_0x213ed4(0xa8)+_0x2ca074+_0x213ed4(0x9d),_0x3634c8);}assertValidAppcode(String(_0xf908de));const _0x2870ef={..._0x56d4ee,..._0x3324a1,'appcode':String(_0xf908de),...collectWorkspaceProfileOverrides(_0x4bd830)};return _0x3e1373[_0x2ca074]=_0x2870ef,_0x360517['apps']=_0x3e1373,_0x360517[_0x213ed4(0xb4)]=_0x2ca074,delete _0x360517['appcode'],delete _0x360517[_0x213ed4(0xb1)],_0x2870ef[_0x213ed4(0xb8)]&&(_0x360517['env']=_0x2870ef['env']),writeConfigFile(_0x23f10c,_0x360517),{'ok':!![],'message':'Workspace\x20'+(_0x36457e===_0x213ed4(0x9c)?_0x213ed4(0x9b):_0x213ed4(0x9a))+':\x20'+_0x2ca074+_0x213ed4(0x94)+_0x2870ef[_0x213ed4(0x8f)]+_0x213ed4(0xa0)+_0x23f10c+_0x213ed4(0xaf),'data':{'operation':_0x213ed4(0xbc)+_0x36457e,'configPath':_0x23f10c,'app':_0x2ca074,'appcode':_0x2870ef['appcode'],'env':_0x2870ef[_0x213ed4(0xb8)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a142_0x36c69f(0xae),'command':a142_0x36c69f(0x9c),'description':a142_0x36c69f(0xb5),'risk':a142_0x36c69f(0xb7),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x20bf03=>configureWorkspace(_0x20bf03,a142_0x36c69f(0x9c))},workspaceUseDefinition={'service':a142_0x36c69f(0xae),'command':'use','description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a142_0x36c69f(0xb7),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x51a811=>configureWorkspace(_0x51a811,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x4d2989=a143_0x2716;(function(_0x4fd4fe,_0x476f9e){const _0x1affa5=a143_0x2716,_0x54409e=_0x4fd4fe();while(!![]){try{const _0x2db213=parseInt(_0x1affa5(0xe5))/0x1*(parseInt(_0x1affa5(0xf8))/0x2)+parseInt(_0x1affa5(0xe9))/0x3+-parseInt(_0x1affa5(0xf9))/0x4+parseInt(_0x1affa5(0xf6))/0x5+parseInt(_0x1affa5(0xfe))/0x6*(parseInt(_0x1affa5(0xe7))/0x7)+-parseInt(_0x1affa5(0xf7))/0x8+parseInt(_0x1affa5(0xf0))/0x9*(-parseInt(_0x1affa5(0xe6))/0xa);if(_0x2db213===_0x476f9e)break;else _0x54409e['push'](_0x54409e['shift']());}catch(_0x1b5d5f){_0x54409e['push'](_0x54409e['shift']());}}}(a143_0x5b16,0x993e5));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=[a143_0x4d2989(0xe0),a143_0x4d2989(0xde),a143_0x4d2989(0xee),'format',a143_0x4d2989(0xe1)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a143_0x4d2989(0xf5),a143_0x4d2989(0x100),a143_0x4d2989(0xee),a143_0x4d2989(0xf2),a143_0x4d2989(0xe0),'accessKey',a143_0x4d2989(0xdc)]);function a143_0x2716(_0x21457b,_0x43cd58){_0x21457b=_0x21457b-0xd9;const _0x5b16e0=a143_0x5b16();let _0x2716d4=_0x5b16e0[_0x21457b];return _0x2716d4;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x4ac542){const _0x5025ab=a143_0x4d2989;return[..._0x4ac542][_0x5025ab(0xed)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x20a432){return TOP_LEVEL_CONFIG_KEYS['has'](_0x20a432);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5b1c65=a143_0x4d2989;return _0x5b1c65(0xf3)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a143_0x4d2989(0xdc),'cookie':a143_0x4d2989(0xe0),'accessKey':'accessKey','defaultFormat':a143_0x4d2989(0xf2),'pageSize':'pageSize','riskLevel':'riskLevel','locale':a143_0x4d2989(0xee)};export function getAppProfileFlagDefs(){const _0x3f48aa=a143_0x4d2989;return[{'name':_0x3f48aa(0x100),'type':_0x3f48aa(0xec),'description':_0x3f48aa(0xd9),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x3f48aa(0xdc),'type':'string','description':_0x3f48aa(0xfb)},{'name':_0x3f48aa(0xe0),'type':_0x3f48aa(0xec),'description':_0x3f48aa(0xdf),'hidden':!![]},{'name':'accessKey','type':'string','description':_0x3f48aa(0xfd),'hidden':!![]},{'name':_0x3f48aa(0xfc),'type':_0x3f48aa(0xec),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x3f48aa(0xdd),'description':_0x3f48aa(0xda)},{'name':_0x3f48aa(0xe1),'type':_0x3f48aa(0xec),'description':_0x3f48aa(0xea),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x3f48aa(0xee),'type':_0x3f48aa(0xec),'description':_0x3f48aa(0xdb)}];}function a143_0x5b16(){const _0x9345ca=['entries','env','Target\x20environment','Default\x20page\x20size','Locale','apiDir','number','accessKey','Auth\x20cookie','cookie','riskLevel','zh-CN','length','defaultApp','3QYGlPX','10kgbzkv','49KXxDwU','en-US','1641420qSTOLs','Risk\x20level','map','string','join','locale','inherit','1800927MmpyIf','apps','format','Config\x20key\x20(','pageSize','appcode','1510855BWgNFp','434400LyqEwY','105346lbghsk','3329780bQBXht','app','API\x20directory\x20path','defaultFormat','Access\x20key','606174hPZHHT'];a143_0x5b16=function(){return _0x9345ca;};return a143_0x5b16();}export function collectAppProfileOverrides(_0x2f78c8){const _0xa79b14=a143_0x4d2989,_0x166812={};for(const [_0x5ec16e,_0x166284]of Object[_0xa79b14(0xff)](APP_PROFILE_FLAG_KEY_MAP)){const _0x3b8905=_0x2f78c8(_0x5ec16e);if(!_0x3b8905)continue;_0x166812[_0x166284]=_0x166284===_0xa79b14(0xf4)?Number(_0x3b8905):_0x3b8905;}return _0x166812;}export function buildAppProfileListFields(_0x558082){const _0x4b1317=a143_0x4d2989;return{'env':_0x558082['env']??null,'apiDir':_0x558082[_0x4b1317(0xdc)]??null,'hasCookie':!!_0x558082[_0x4b1317(0xe0)],'hasAccessKey':!!_0x558082[_0x4b1317(0xde)],'format':_0x558082[_0x4b1317(0xf2)]??null,'pageSize':_0x558082[_0x4b1317(0xf4)]??null,'riskLevel':_0x558082[_0x4b1317(0xe1)]??null,'locale':_0x558082[_0x4b1317(0xee)]??null};}export function buildAppDoctorFields(_0x14a2a1,_0x4b135c){const _0x22305e=a143_0x4d2989;return{'env':{'value':_0x14a2a1[_0x22305e(0x100)]||_0x4b135c[_0x22305e(0x100)],'source':_0x14a2a1[_0x22305e(0x100)]?_0x22305e(0xfa):_0x22305e(0xef)},'apiDir':{'value':_0x14a2a1[_0x22305e(0xdc)]||_0x4b135c['apiDir'],'source':_0x14a2a1[_0x22305e(0xdc)]?'app':_0x22305e(0xef)},'cookie':{'value':_0x14a2a1[_0x22305e(0xe0)]||_0x4b135c[_0x22305e(0xe0)],'source':_0x14a2a1[_0x22305e(0xe0)]?'app':_0x22305e(0xef)},'accessKey':{'value':_0x14a2a1[_0x22305e(0xde)]||_0x4b135c[_0x22305e(0xde)],'source':_0x14a2a1[_0x22305e(0xde)]?_0x22305e(0xfa):'inherit'}};}export function buildCanonicalAppConfig(_0x44a8b9,_0x2dda22){const _0x100ac7=a143_0x4d2989,_0x9387b3=_0x44a8b9[_0x100ac7(0xeb)](_0x4112d4=>String(_0x4112d4||'')['trim']())['filter'](Boolean);if(_0x9387b3[_0x100ac7(0xe3)]===0x0)return{};const _0x3e02f1={};for(const _0x4bbbbb of _0x9387b3){_0x3e02f1[_0x4bbbbb]=_0x2dda22?{'appcode':_0x4bbbbb,'env':_0x2dda22}:{'appcode':_0x4bbbbb};}return{'apps':_0x3e02f1,'defaultApp':_0x9387b3[0x0]};}export function buildCanonicalProjectConfig(_0x277541,_0xd238b4){const _0x21cf3e=a143_0x4d2989,{appCodes:appCodes=[],env:_0x203902,metadata:_0x55c41}=_0xd238b4,_0xc52a9e={..._0x277541,..._0x55c41||{}};delete _0xc52a9e[_0x21cf3e(0xf5)],delete _0xc52a9e[_0x21cf3e(0xfa)];if(_0x203902)_0xc52a9e[_0x21cf3e(0x100)]=_0x203902;else!_0xc52a9e['env']&&(_0xc52a9e[_0x21cf3e(0x100)]=DEFAULT_CONFIG_VALUES[_0x21cf3e(0x100)]);const _0x10d03c=buildCanonicalAppConfig(appCodes,_0xc52a9e['env']);return Object['keys'](_0x10d03c)[_0x21cf3e(0xe3)]>0x0&&(_0xc52a9e[_0x21cf3e(0xf1)]=_0x10d03c[_0x21cf3e(0xf1)],_0xc52a9e['defaultApp']=_0x10d03c[_0x21cf3e(0xe4)]),_0xc52a9e;}const LOCALE_MAP={'zh':a143_0x4d2989(0xe2),'zh-cn':a143_0x4d2989(0xe2),'zh_cn':a143_0x4d2989(0xe2),'en':a143_0x4d2989(0xe8),'en-us':a143_0x4d2989(0xe8),'en_us':a143_0x4d2989(0xe8)};export function normalizeLocale(_0xaaf3f){if(!_0xaaf3f)return null;return LOCALE_MAP[_0xaaf3f['toLowerCase']()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a144_0x5385(_0x284266,_0x23ba53){_0x284266=_0x284266-0xef;const _0x2dd326=a144_0x2dd3();let _0x53856b=_0x2dd326[_0x284266];return _0x53856b;}const a144_0x45718c=a144_0x5385;(function(_0x1be773,_0x194346){const _0x22f82a=a144_0x5385,_0x12b42b=_0x1be773();while(!![]){try{const _0x203d00=parseInt(_0x22f82a(0xf1))/0x1+parseInt(_0x22f82a(0xf8))/0x2+-parseInt(_0x22f82a(0xf2))/0x3*(parseInt(_0x22f82a(0xef))/0x4)+parseInt(_0x22f82a(0xf6))/0x5+parseInt(_0x22f82a(0xf3))/0x6+parseInt(_0x22f82a(0xf5))/0x7*(-parseInt(_0x22f82a(0xf4))/0x8)+-parseInt(_0x22f82a(0xf0))/0x9*(parseInt(_0x22f82a(0xf9))/0xa);if(_0x203d00===_0x194346)break;else _0x12b42b['push'](_0x12b42b['shift']());}catch(_0xb6f022){_0x12b42b['push'](_0x12b42b['shift']());}}}(a144_0x2dd3,0x1ed3a));export const CLI_VERSION_POLICY_URL=a144_0x45718c(0xf7);function a144_0x2dd3(){const _0x273f43=['3767139QlaERv','223731yfApBq','3OqAZuZ','1126500JLQyba','286840jhspoM','7WRpGGp','801790wViKEW','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','412080bvzVtp','10CYzwPF','788748CwYcWc'];a144_0x2dd3=function(){return _0x273f43;};return a144_0x2dd3();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a145_0x4032(){const _0x111b66=['production\x20|\x20daily','type','value','Output\x20path','app','datasetcode','@lovrabet/rabetbase-cli','title','Skip\x20import\x20generation','expectedCount','key','Page\x20size','Title','tags','<name>','functionNode','Alias\x20for\x20--non-interactive','clear','Force\x20overwrite','params','non-interactive','Select\x20app\x20profile\x20by\x20name','description','json\x20|\x20pretty\x20|\x20compress','Force\x20non-interactive\x20mode\x20(CI)','DB\x20ID','name','keyword','<code>','target','appcode','1TgnAqM','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','page','Use\x20remote','nonInteractive','operationType','string','Skip\x20confirmation\x20for\x20high-risk\x20writes','yes','code','Type\x20filter','schemas','JSON\x20params','SQL\x20string','955150NxeoAQ','File\x20path','env','Tags','Verbose\x20output','meowKey','dry-run','sqlName','Operation\x20type','watch','fromEntries','sqlcode','pagesize','Read\x20value\x20from\x20environment\x20variable','verbose','2746816QgIxeP','output','project','expected-count','sqlname','fromEnv','Watch\x20mode','operation-type','56XVTjPB','Enable\x20BFF\x20save','skip-imports','map','all','operation','Use\x20global\x20config\x20scope','Apply\x20to\x20all','SQL\x20name','Name','enable-bff-save','Preview\x20operation\x20without\x20executing','Record\x20ID','confirm','file','18138JOoTpn','<expr>','783390QJvqIr','dbId','dryRun','dbid','Show\x20help','Read\x20value\x20from\x20stdin','Confirm\x20destructive\x20action','Description\x20file','Clear','format','sql','19924164JmKGEb','Output\x20format','reveal','from-env','help','Description','SQL\x20code','function-node','575043LbKNXr','Reveal\x20sensitive\x20value','global','Dataset\x20code','force','boolean','Rabetbase\x20CLI','Schemas','stdin','Config\x20value','skipImports','4069790IGjbTz'];a145_0x4032=function(){return _0x111b66;};return a145_0x4032();}const a145_0xec980b=a145_0x251a;(function(_0x45e8a0,_0x5d7cab){const _0x3b95bc=a145_0x251a,_0x3a28d7=_0x45e8a0();while(!![]){try{const _0x115595=parseInt(_0x3b95bc(0x178))/0x1*(-parseInt(_0x3b95bc(0x186))/0x2)+parseInt(_0x3b95bc(0x1ac))/0x3*(-parseInt(_0x3b95bc(0x19d))/0x4)+-parseInt(_0x3b95bc(0x158))/0x5+-parseInt(_0x3b95bc(0x1ae))/0x6+parseInt(_0x3b95bc(0x14d))/0x7+-parseInt(_0x3b95bc(0x195))/0x8+parseInt(_0x3b95bc(0x145))/0x9;if(_0x115595===_0x5d7cab)break;else _0x3a28d7['push'](_0x3a28d7['shift']());}catch(_0x46af25){_0x3a28d7['push'](_0x3a28d7['shift']());}}}(a145_0x4032,0x6cd9b));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a145_0xec980b(0x153);export const NPM_PACKAGE_NAME=a145_0xec980b(0x15f);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a145_0xec980b(0x177),'type':'string','description':'Override\x20appcode','hint':a145_0xec980b(0x175)},{'name':a145_0xec980b(0x15d),'meowKey':a145_0xec980b(0x15d),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x16e),'hint':a145_0xec980b(0x167)},{'name':'env','meowKey':a145_0xec980b(0x188),'type':a145_0xec980b(0x17e),'description':'Environment','hint':a145_0xec980b(0x159)},{'name':a145_0xec980b(0x143),'meowKey':a145_0xec980b(0x143),'type':'string','description':a145_0xec980b(0x146),'hint':a145_0xec980b(0x170)},{'name':'jq','meowKey':'jq','type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x179),'hint':a145_0xec980b(0x1ad)},{'name':a145_0xec980b(0x18c),'meowKey':a145_0xec980b(0x1b0),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x1a8)},{'name':'yes','meowKey':a145_0xec980b(0x180),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x17f)},{'name':a145_0xec980b(0x16d),'meowKey':a145_0xec980b(0x17c),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x171)},{'name':'global','meowKey':a145_0xec980b(0x14f),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x1a3)},{'name':a145_0xec980b(0x197),'meowKey':'project','type':'boolean','description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a145_0xec980b(0x169),'hidden':!![]},{'name':a145_0xec980b(0x149),'meowKey':a145_0xec980b(0x149),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x1b2)},{'name':'name','meowKey':a145_0xec980b(0x173),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x1a6),'hidden':!![]},{'name':'title','meowKey':a145_0xec980b(0x160),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x165),'hidden':!![]},{'name':a145_0xec980b(0x16a),'meowKey':a145_0xec980b(0x16a),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x142),'hidden':!![]},{'name':a145_0xec980b(0x18f),'meowKey':a145_0xec980b(0x18f),'type':'boolean','description':a145_0xec980b(0x19b),'hidden':!![]},{'name':a145_0xec980b(0x196),'meowKey':'output','type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x15c),'hidden':!![]},{'name':a145_0xec980b(0x16c),'meowKey':a145_0xec980b(0x16c),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x184),'hidden':!![]},{'name':'datasetcode','meowKey':a145_0xec980b(0x15e),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x150),'hidden':!![]},{'name':a145_0xec980b(0x1a1),'meowKey':a145_0xec980b(0x1a1),'type':'boolean','description':a145_0xec980b(0x1a4),'hidden':!![]},{'name':a145_0xec980b(0x1a7),'meowKey':'enableBffSave','type':a145_0xec980b(0x152),'description':a145_0xec980b(0x19e),'hidden':!![]},{'name':'id','meowKey':'id','type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x1a9),'hidden':!![]},{'name':a145_0xec980b(0x15a),'meowKey':a145_0xec980b(0x15a),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x182),'hidden':!![]},{'name':a145_0xec980b(0x1ab),'meowKey':a145_0xec980b(0x1ab),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x187),'hidden':!![]},{'name':a145_0xec980b(0x191),'meowKey':a145_0xec980b(0x191),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x14b),'hidden':!![]},{'name':'sql-name','meowKey':a145_0xec980b(0x18d),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x1a5),'hidden':!![]},{'name':a145_0xec980b(0x199),'meowKey':a145_0xec980b(0x199),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x1a5),'hidden':!![]},{'name':'db-id','meowKey':a145_0xec980b(0x1af),'type':'string','description':a145_0xec980b(0x172),'hidden':!![]},{'name':a145_0xec980b(0x1b1),'meowKey':a145_0xec980b(0x1b1),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x172),'hidden':!![]},{'name':a145_0xec980b(0x16f),'meowKey':a145_0xec980b(0x16f),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x14a),'hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x141),'hidden':!![]},{'name':a145_0xec980b(0x17a),'meowKey':a145_0xec980b(0x17a),'type':a145_0xec980b(0x17e),'description':'Page\x20number','hidden':!![]},{'name':a145_0xec980b(0x192),'meowKey':a145_0xec980b(0x192),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x164),'hidden':!![]},{'name':a145_0xec980b(0x174),'meowKey':a145_0xec980b(0x174),'type':a145_0xec980b(0x17e),'description':'Keyword\x20filter','hidden':!![]},{'name':a145_0xec980b(0x181),'meowKey':a145_0xec980b(0x181),'type':a145_0xec980b(0x17e),'description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':a145_0xec980b(0x144),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x185),'hidden':!![]},{'name':'schemas','meowKey':a145_0xec980b(0x183),'type':'string','description':a145_0xec980b(0x154),'hidden':!![]},{'name':a145_0xec980b(0x1a2),'meowKey':a145_0xec980b(0x1a2),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x18e),'hidden':!![]},{'name':a145_0xec980b(0x176),'meowKey':a145_0xec980b(0x176),'type':a145_0xec980b(0x17e),'description':'Target\x20path','hidden':!![]},{'name':a145_0xec980b(0x19f),'meowKey':a145_0xec980b(0x157),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x161),'hidden':!![]},{'name':a145_0xec980b(0x163),'meowKey':a145_0xec980b(0x163),'type':a145_0xec980b(0x17e),'description':'Config\x20key','hidden':!![]},{'name':a145_0xec980b(0x15b),'meowKey':'value','type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x156),'hidden':!![]},{'name':'tags','meowKey':a145_0xec980b(0x166),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x189),'hidden':!![]},{'name':'stdin','meowKey':a145_0xec980b(0x155),'type':'boolean','description':a145_0xec980b(0x1b3),'hidden':!![]},{'name':a145_0xec980b(0x148),'meowKey':a145_0xec980b(0x19a),'type':a145_0xec980b(0x17e),'description':a145_0xec980b(0x193),'hidden':!![]},{'name':a145_0xec980b(0x147),'meowKey':a145_0xec980b(0x147),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x14e),'hidden':!![]},{'name':a145_0xec980b(0x151),'meowKey':a145_0xec980b(0x151),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x16b),'hidden':!![]},{'name':'confirm','meowKey':a145_0xec980b(0x1aa),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x1b4),'hidden':!![]},{'name':'remote','meowKey':'remote','type':'boolean','description':a145_0xec980b(0x17b),'hidden':!![]},{'name':a145_0xec980b(0x194),'meowKey':a145_0xec980b(0x194),'type':a145_0xec980b(0x152),'description':a145_0xec980b(0x18a),'hidden':!![]},{'name':a145_0xec980b(0x198),'meowKey':a145_0xec980b(0x162),'type':a145_0xec980b(0x17e),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a145_0xec980b(0x19c),'meowKey':a145_0xec980b(0x17d),'type':'string','description':a145_0xec980b(0x18e),'hidden':!![]},{'name':a145_0xec980b(0x14c),'meowKey':a145_0xec980b(0x168),'type':'string','description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a145_0xec980b(0x177),'app',a145_0xec980b(0x188),a145_0xec980b(0x143),'jq',a145_0xec980b(0x18c),a145_0xec980b(0x180),a145_0xec980b(0x16d),'ci']);function a145_0x251a(_0x4b545b,_0x4fd493){_0x4b545b=_0x4b545b-0x141;const _0x4032d1=a145_0x4032();let _0x251a15=_0x4032d1[_0x4b545b];return _0x251a15;}export function buildMeowFlags(){const _0xf4b051=a145_0xec980b;return Object[_0xf4b051(0x190)](GLOBAL_FLAGS[_0xf4b051(0x1a0)](_0x125174=>[_0x125174[_0xf4b051(0x18b)],{'type':_0x125174[_0xf4b051(0x15a)]}]));}
|
|
1
|
+
const a145_0x4f98d5=a145_0x2c25;function a145_0x2c25(_0x44a262,_0x9b07d0){_0x44a262=_0x44a262-0x7b;const _0x418531=a145_0x4185();let _0x2c2530=_0x418531[_0x44a262];return _0x2c2530;}function a145_0x4185(){const _0x2bf569=['SQL\x20name','map','file','Force\x20non-interactive\x20mode\x20(CI)','app','format','from-env','key','keyword','skip-imports','<expr>','fromEntries','stdin','code','Verbose\x20output','dry-run','Environment','DB\x20ID','Force\x20overwrite','enableBffSave','env','meowKey','File\x20path','title','reveal','clear','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','503420jpimzs','string','remote','operation','SQL\x20string','function-node','global','Page\x20number','target','Output\x20format','tags','force','SQL\x20code','params','dbid','datasetcode','enable-bff-save','Operation\x20type','1548239EnvPiq','Select\x20app\x20profile\x20by\x20name','description','Read\x20value\x20from\x20environment\x20variable','JSON\x20params','Show\x20help','pagesize','117GbWYvy','page','Use\x20remote','675303WGMvRZ','Description\x20file','Description','output','Watch\x20mode','operationType','value','Apply\x20to\x20all','help','functionNode','Dataset\x20code','Function\x20node','nonInteractive','project','Read\x20value\x20from\x20stdin','Code\x20filter','20NApKot','Output\x20path','description-file','watch','Target\x20path','Config\x20value','schemas','operation-type','Use\x20global\x20config\x20scope','name','production\x20|\x20daily','sql-name','Preview\x20operation\x20without\x20executing','927822yuCOOc','Config\x20key','sqlcode','verbose','1YzXeLQ','boolean','Enable\x20BFF\x20save','type','confirm','sql','Override\x20appcode','14072JRWVEI','12cjrjaG','Clear','378LGKRaB','12mXigUc','db-id','appcode','1030178KVRjuU','fromEnv','all','9427132MgolKQ','dbId','expected-count','yes','<name>','Skip\x20import\x20generation','Alias\x20for\x20--non-interactive','sqlname'];a145_0x4185=function(){return _0x2bf569;};return a145_0x4185();}(function(_0x2e6e6b,_0x53358f){const _0x380388=a145_0x2c25,_0x36d9a9=_0x2e6e6b();while(!![]){try{const _0x377cbd=-parseInt(_0x380388(0xa5))/0x1*(-parseInt(_0x380388(0xb3))/0x2)+parseInt(_0x380388(0x84))/0x3*(-parseInt(_0x380388(0xb0))/0x4)+parseInt(_0x380388(0x94))/0x5*(-parseInt(_0x380388(0xa1))/0x6)+parseInt(_0x380388(0xaf))/0x7*(-parseInt(_0x380388(0xac))/0x8)+parseInt(_0x380388(0x81))/0x9*(parseInt(_0x380388(0xd9))/0xa)+-parseInt(_0x380388(0xeb))/0xb+-parseInt(_0x380388(0xad))/0xc*(-parseInt(_0x380388(0xb6))/0xd);if(_0x377cbd===_0x53358f)break;else _0x36d9a9['push'](_0x36d9a9['shift']());}catch(_0x54731e){_0x36d9a9['push'](_0x36d9a9['shift']());}}}(a145_0x4185,0x59239));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a145_0x4f98d5(0xb2),'meowKey':a145_0x4f98d5(0xb2),'type':'string','description':a145_0x4f98d5(0xab),'hint':'<code>'},{'name':a145_0x4f98d5(0xc2),'meowKey':a145_0x4f98d5(0xc2),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x7b),'hint':a145_0x4f98d5(0xba)},{'name':a145_0x4f98d5(0xd2),'meowKey':a145_0x4f98d5(0xd2),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xce),'hint':a145_0x4f98d5(0x9e)},{'name':a145_0x4f98d5(0xc3),'meowKey':a145_0x4f98d5(0xc3),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xe2),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xd8),'hint':a145_0x4f98d5(0xc8)},{'name':'dry-run','meowKey':'dryRun','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xa0)},{'name':a145_0x4f98d5(0xb9),'meowKey':a145_0x4f98d5(0xb9),'type':a145_0x4f98d5(0xa6),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':a145_0x4f98d5(0x90),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xc1)},{'name':'global','meowKey':a145_0x4f98d5(0xdf),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x9c)},{'name':'project','meowKey':a145_0x4f98d5(0x91),'type':a145_0x4f98d5(0xa6),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xbc),'hidden':!![]},{'name':a145_0x4f98d5(0x8c),'meowKey':a145_0x4f98d5(0x8c),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x7f)},{'name':a145_0x4f98d5(0x9d),'meowKey':a145_0x4f98d5(0x9d),'type':'string','description':'Name','hidden':!![]},{'name':'title','meowKey':a145_0x4f98d5(0xd5),'type':a145_0x4f98d5(0xda),'description':'Title','hidden':!![]},{'name':a145_0x4f98d5(0xd7),'meowKey':a145_0x4f98d5(0xd7),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xae),'hidden':!![]},{'name':a145_0x4f98d5(0x97),'meowKey':a145_0x4f98d5(0x97),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x88),'hidden':!![]},{'name':a145_0x4f98d5(0x87),'meowKey':a145_0x4f98d5(0x87),'type':'string','description':a145_0x4f98d5(0x95),'hidden':!![]},{'name':a145_0x4f98d5(0xe6),'meowKey':a145_0x4f98d5(0xe6),'type':'string','description':a145_0x4f98d5(0x7e),'hidden':!![]},{'name':a145_0x4f98d5(0xe8),'meowKey':a145_0x4f98d5(0xe8),'type':'string','description':a145_0x4f98d5(0x8e),'hidden':!![]},{'name':a145_0x4f98d5(0xb5),'meowKey':a145_0x4f98d5(0xb5),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x8b),'hidden':!![]},{'name':a145_0x4f98d5(0xe9),'meowKey':a145_0x4f98d5(0xd1),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xa7),'hidden':!![]},{'name':'id','meowKey':'id','type':a145_0x4f98d5(0xda),'description':'Record\x20ID','hidden':!![]},{'name':a145_0x4f98d5(0xa8),'meowKey':a145_0x4f98d5(0xa8),'type':'string','description':'Type\x20filter','hidden':!![]},{'name':a145_0x4f98d5(0xc0),'meowKey':'file','type':'string','description':a145_0x4f98d5(0xd4),'hidden':!![]},{'name':a145_0x4f98d5(0xa3),'meowKey':a145_0x4f98d5(0xa3),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xe5),'hidden':!![]},{'name':a145_0x4f98d5(0x9f),'meowKey':'sqlName','type':a145_0x4f98d5(0xda),'description':'SQL\x20name','hidden':!![]},{'name':a145_0x4f98d5(0xbd),'meowKey':a145_0x4f98d5(0xbd),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xbe),'hidden':!![]},{'name':a145_0x4f98d5(0xb1),'meowKey':a145_0x4f98d5(0xb7),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xcf),'hidden':!![]},{'name':a145_0x4f98d5(0xe7),'meowKey':'dbid','type':a145_0x4f98d5(0xda),'description':'DB\x20ID','hidden':!![]},{'name':a145_0x4f98d5(0x7c),'meowKey':'description','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x86),'hidden':!![]},{'name':a145_0x4f98d5(0x96),'meowKey':'descriptionFile','type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x85),'hidden':!![]},{'name':a145_0x4f98d5(0x82),'meowKey':'page','type':'string','description':a145_0x4f98d5(0xe0),'hidden':!![]},{'name':a145_0x4f98d5(0x80),'meowKey':a145_0x4f98d5(0x80),'type':a145_0x4f98d5(0xda),'description':'Page\x20size','hidden':!![]},{'name':a145_0x4f98d5(0xc6),'meowKey':'keyword','type':a145_0x4f98d5(0xda),'description':'Keyword\x20filter','hidden':!![]},{'name':a145_0x4f98d5(0xcb),'meowKey':a145_0x4f98d5(0xcb),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x93),'hidden':!![]},{'name':a145_0x4f98d5(0xaa),'meowKey':a145_0x4f98d5(0xaa),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xdd),'hidden':!![]},{'name':a145_0x4f98d5(0x9a),'meowKey':a145_0x4f98d5(0x9a),'type':a145_0x4f98d5(0xda),'description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a145_0x4f98d5(0xdc),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xea),'hidden':!![]},{'name':'target','meowKey':a145_0x4f98d5(0xe1),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x98),'hidden':!![]},{'name':a145_0x4f98d5(0xc7),'meowKey':'skipImports','type':'boolean','description':a145_0x4f98d5(0xbb),'hidden':!![]},{'name':a145_0x4f98d5(0xc5),'meowKey':a145_0x4f98d5(0xc5),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xa2),'hidden':!![]},{'name':'value','meowKey':a145_0x4f98d5(0x8a),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x99),'hidden':!![]},{'name':a145_0x4f98d5(0xe3),'meowKey':'tags','type':a145_0x4f98d5(0xda),'description':'Tags','hidden':!![]},{'name':a145_0x4f98d5(0xca),'meowKey':'stdin','type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x92),'hidden':!![]},{'name':a145_0x4f98d5(0xc4),'meowKey':a145_0x4f98d5(0xb4),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x7d),'hidden':!![]},{'name':a145_0x4f98d5(0xd6),'meowKey':a145_0x4f98d5(0xd6),'type':'boolean','description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':a145_0x4f98d5(0xe4),'meowKey':a145_0x4f98d5(0xe4),'type':'boolean','description':a145_0x4f98d5(0xd0),'hidden':!![]},{'name':a145_0x4f98d5(0xa9),'meowKey':'confirm','type':a145_0x4f98d5(0xa6),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a145_0x4f98d5(0xdb),'meowKey':a145_0x4f98d5(0xdb),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0x83),'hidden':!![]},{'name':a145_0x4f98d5(0xa4),'meowKey':a145_0x4f98d5(0xa4),'type':a145_0x4f98d5(0xa6),'description':a145_0x4f98d5(0xcc),'hidden':!![]},{'name':a145_0x4f98d5(0xb8),'meowKey':'expectedCount','type':a145_0x4f98d5(0xda),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a145_0x4f98d5(0x9b),'meowKey':a145_0x4f98d5(0x89),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0xea),'hidden':!![]},{'name':a145_0x4f98d5(0xde),'meowKey':a145_0x4f98d5(0x8d),'type':a145_0x4f98d5(0xda),'description':a145_0x4f98d5(0x8f),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a145_0x4f98d5(0xb2),a145_0x4f98d5(0xc2),a145_0x4f98d5(0xd2),a145_0x4f98d5(0xc3),'jq',a145_0x4f98d5(0xcd),a145_0x4f98d5(0xb9),'non-interactive','ci']);export function buildMeowFlags(){const _0x5eccea=a145_0x4f98d5;return Object[_0x5eccea(0xc9)](GLOBAL_FLAGS[_0x5eccea(0xbf)](_0x2aabf7=>[_0x2aabf7[_0x5eccea(0xd3)],{'type':_0x2aabf7[_0x5eccea(0xa8)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x193d5a=a146_0x5bc8;(function(_0x15e673,_0x15ab02){const _0x590282=a146_0x5bc8,_0x3065fe=_0x15e673();while(!![]){try{const _0x25be08=-parseInt(_0x590282(0x194))/0x1*(-parseInt(_0x590282(0x19d))/0x2)+-parseInt(_0x590282(0x19a))/0x3+parseInt(_0x590282(0x199))/0x4+parseInt(_0x590282(0x19c))/0x5*(parseInt(_0x590282(0x198))/0x6)+parseInt(_0x590282(0x19e))/0x7*(parseInt(_0x590282(0x197))/0x8)+-parseInt(_0x590282(0x196))/0x9*(-parseInt(_0x590282(0x19f))/0xa)+-parseInt(_0x590282(0x191))/0xb;if(_0x25be08===_0x15ab02)break;else _0x3065fe['push'](_0x3065fe['shift']());}catch(_0x500d7c){_0x3065fe['push'](_0x3065fe['shift']());}}}(a146_0x3519,0x5cfd3));import{DEFAULT_API_DIR}from'../constant/paths.js';function a146_0x5bc8(_0x105814,_0x48bb87){_0x105814=_0x105814-0x191;const _0x35197a=a146_0x3519();let _0x5bc8aa=_0x35197a[_0x105814];return _0x5bc8aa;}export const DEFAULT_CONFIG_VALUES={'env':a146_0x193d5a(0x193),'format':'compress','locale':a146_0x193d5a(0x195),'riskLevel':a146_0x193d5a(0x192),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a146_0x193d5a(0x19b);function a146_0x3519(){const _0x425d32=['production','441ZPvINS','en-US','4878ShOhBK','344FZrVJk','162NXelwA','1636884owtXNT','1095729PaZYOu','compress','30265xcMocu','2966QCHQXU','119469HHuiBd','2230ytMwyf','14688036XZKeZJ','high-risk-write'];a146_0x3519=function(){return _0x425d32;};return a146_0x3519();}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x591add=a147_0x5868;(function(_0x304f1a,_0x5b5a94){const _0x1e640f=a147_0x5868,_0x38b7ab=_0x304f1a();while(!![]){try{const _0x174199=parseInt(_0x1e640f(0x190))/0x1*(parseInt(_0x1e640f(0x195))/0x2)+parseInt(_0x1e640f(0x19c))/0x3*(parseInt(_0x1e640f(0x18d))/0x4)+-parseInt(_0x1e640f(0x19a))/0x5+-parseInt(_0x1e640f(0x19b))/0x6+parseInt(_0x1e640f(0x18f))/0x7+parseInt(_0x1e640f(0x18e))/0x8*(parseInt(_0x1e640f(0x1a1))/0x9)+-parseInt(_0x1e640f(0x192))/0xa*(parseInt(_0x1e640f(0x1a0))/0xb);if(_0x174199===_0x5b5a94)break;else _0x38b7ab['push'](_0x38b7ab['shift']());}catch(_0x257830){_0x38b7ab['push'](_0x38b7ab['shift']());}}}(a147_0x1cce,0x6d689));import{getEnv,isProduction}from'../constant/env.js';function a147_0x5868(_0x5076bb,_0x542750){_0x5076bb=_0x5076bb-0x18d;const _0x1ccee9=a147_0x1cce();let _0x586853=_0x1ccee9[_0x5076bb];return _0x586853;}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x4019fc){const _0x319a67=a147_0x5868;customApiDomain=_0x4019fc?.[_0x319a67(0x199)],customUserDomain=_0x4019fc?.[_0x319a67(0x198)],customRuntimeDomain=_0x4019fc?.[_0x319a67(0x197)];}function a147_0x1cce(){const _0x1398cb=['https://daily-runtime.lovrabet.com','10vzpwuO','https://daily-api.lovrabet.com','https://user-daily.lovrabet.com','2ySlEXx','https://user.lovrabet.com','runtimeDomain','userDomain','apiDomain','900940ucQMHj','3246846NGaShA','105gENzzy','https://api.lovrabet.com','/app/','trim','5635762yoQlTS','54ciNqWr','https://daily.lovrabet.com','/web-app/app/','30296MLvQYw','83016tfHwNs','4831169YmuuIs','664289zyrthH'];a147_0x1cce=function(){return _0x1398cb;};return a147_0x1cce();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a147_0x591add(0x196):a147_0x591add(0x194));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a147_0x591add(0x19d):a147_0x591add(0x193));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a147_0x591add(0x191));export const getAppDomain=()=>isProduction(getEnv())?'https://app.lovrabet.com':a147_0x591add(0x1a2);export const getAppBaseUrl=_0x2b70b9=>{const _0xedd0be=a147_0x591add,_0x11ed65=encodeURIComponent(_0x2b70b9[_0xedd0be(0x19f)]());return isProduction(getEnv())?getAppDomain()+_0xedd0be(0x19e)+_0x11ed65:getAppDomain()+_0xedd0be(0x1a3)+_0x11ed65;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x1a89a6=a148_0x2c3c;(function(_0x2aa59c,_0x1e6e67){const _0x5b2cd6=a148_0x2c3c,_0x272a5d=_0x2aa59c();while(!![]){try{const _0x587e90=-parseInt(_0x5b2cd6(0x1d5))/0x1+parseInt(_0x5b2cd6(0x1dc))/0x2+-parseInt(_0x5b2cd6(0x1d3))/0x3*(parseInt(_0x5b2cd6(0x1d8))/0x4)+parseInt(_0x5b2cd6(0x1d0))/0x5+-parseInt(_0x5b2cd6(0x1d6))/0x6+parseInt(_0x5b2cd6(0x1dd))/0x7*(parseInt(_0x5b2cd6(0x1db))/0x8)+-parseInt(_0x5b2cd6(0x1d2))/0x9*(-parseInt(_0x5b2cd6(0x1da))/0xa);if(_0x587e90===_0x1e6e67)break;else _0x272a5d['push'](_0x272a5d['shift']());}catch(_0x35084a){_0x272a5d['push'](_0x272a5d['shift']());}}}(a148_0x50d4,0x5744f));export const RABETBASE_ENV_VALUES=[a148_0x1a89a6(0x1d1),a148_0x1a89a6(0x1d9)];export function normalizeEnv(_0x49984e){const _0x46d644=a148_0x1a89a6;return _0x49984e===_0x46d644(0x1d7)?_0x46d644(0x1d1):_0x49984e;}function a148_0x50d4(){const _0x33001d=['dev','1580100okjunV','production','7320465KEiLsu','1531335tAnzjj','development','218758NPLFuJ','4149990Kjnqda','online','4NLmBRf','daily','10OjZIsi','784arlSME','643784sUldCf','23359bSZXcp'];a148_0x50d4=function(){return _0x33001d;};return a148_0x50d4();}export function isProduction(_0x32bbd1){const _0x115ad9=a148_0x1a89a6;return normalizeEnv(_0x32bbd1)===_0x115ad9(0x1d1);}export function isDaily(_0x4e7972){const _0x51e750=a148_0x1a89a6;return normalizeEnv(_0x4e7972)===_0x51e750(0x1d9);}export function isDev(_0x290323){const _0x304f92=a148_0x1a89a6,_0x13ce88=normalizeEnv(_0x290323);return _0x13ce88===_0x304f92(0x1d4)||_0x13ce88===_0x304f92(0x1cf);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');function a148_0x2c3c(_0x4ddcb9,_0x5cc294){_0x4ddcb9=_0x4ddcb9-0x1cf;const _0x50d420=a148_0x50d4();let _0x2c3c67=_0x50d420[_0x4ddcb9];return _0x2c3c67;}export function getEnv(){return env;}export function initEnv(_0x50051e){env=normalizeEnv(_0x50051e);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a149_0x5641(_0x2cf60f,_0x258564){_0x2cf60f=_0x2cf60f-0x168;const _0x8f9f47=a149_0x8f9f();let _0x56413d=_0x8f9f47[_0x2cf60f];return _0x56413d;}const a149_0x104ba4=a149_0x5641;function a149_0x8f9f(){const _0x1bf42f=['1389966srzCtr','8aEhRBV','pretty','compress','1215cAJima','671949skJpUs','6044KVIwoC','3vhHeaJ','1976835HEMvxV','573771LcACko','3362970jxIHsx','33312vWuxuA'];a149_0x8f9f=function(){return _0x1bf42f;};return a149_0x8f9f();}(function(_0x408711,_0x34f4b8){const _0x5a75e0=a149_0x5641,_0x4ac5d3=_0x408711();while(!![]){try{const _0x714bda=-parseInt(_0x5a75e0(0x16e))/0x1*(-parseInt(_0x5a75e0(0x172))/0x2)+parseInt(_0x5a75e0(0x170))/0x3+-parseInt(_0x5a75e0(0x16d))/0x4*(parseInt(_0x5a75e0(0x16b))/0x5)+-parseInt(_0x5a75e0(0x173))/0x6+parseInt(_0x5a75e0(0x16f))/0x7+-parseInt(_0x5a75e0(0x168))/0x8*(parseInt(_0x5a75e0(0x16c))/0x9)+parseInt(_0x5a75e0(0x171))/0xa;if(_0x714bda===_0x34f4b8)break;else _0x4ac5d3['push'](_0x4ac5d3['shift']());}catch(_0x5ddc1b){_0x4ac5d3['push'](_0x4ac5d3['shift']());}}}(a149_0x8f9f,0x2d840));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a149_0x104ba4(0x169),a149_0x104ba4(0x16a)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x30e950,_0x49817d){const _0x3d4f40=a150_0xa4d1,_0x173ab4=_0x30e950();while(!![]){try{const _0x235201=parseInt(_0x3d4f40(0x9e))/0x1*(parseInt(_0x3d4f40(0x9a))/0x2)+parseInt(_0x3d4f40(0xa0))/0x3*(-parseInt(_0x3d4f40(0x99))/0x4)+parseInt(_0x3d4f40(0xa2))/0x5+parseInt(_0x3d4f40(0x9b))/0x6+-parseInt(_0x3d4f40(0x9f))/0x7*(parseInt(_0x3d4f40(0x9d))/0x8)+parseInt(_0x3d4f40(0x9c))/0x9+-parseInt(_0x3d4f40(0xa1))/0xa;if(_0x235201===_0x49817d)break;else _0x173ab4['push'](_0x173ab4['shift']());}catch(_0x2270ea){_0x173ab4['push'](_0x173ab4['shift']());}}}(a150_0x2182,0x73b08));function a150_0xa4d1(_0x45f80d,_0x2060b0){_0x45f80d=_0x45f80d-0x99;const _0x21826d=a150_0x2182();let _0xa4d185=_0x21826d[_0x45f80d];return _0xa4d185;}export const DEFAULT_API_DIR='./src/api';function a150_0x2182(){const _0x477b59=['115018sfOwLF','2331792FaseNt','4223718CsVJJQ','584YQjRcU','7IdgLna','47992QJooZO','872607BwAAgP','1634890TqfSKF','841065WkfKIz','4KyMgCH'];a150_0x2182=function(){return _0x477b59;};return a150_0x2182();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c0e9c,_0x376353){const _0x42f6b4=a151_0x31e4,_0x51ed93=_0x3c0e9c();while(!![]){try{const _0x5c84ff=parseInt(_0x42f6b4(0xab))/0x1+-parseInt(_0x42f6b4(0xa1))/0x2*(parseInt(_0x42f6b4(0xa0))/0x3)+-parseInt(_0x42f6b4(0xa6))/0x4*(-parseInt(_0x42f6b4(0xa9))/0x5)+-parseInt(_0x42f6b4(0xaa))/0x6+parseInt(_0x42f6b4(0xa8))/0x7*(-parseInt(_0x42f6b4(0xa7))/0x8)+parseInt(_0x42f6b4(0xa2))/0x9*(-parseInt(_0x42f6b4(0xa5))/0xa)+parseInt(_0x42f6b4(0xa4))/0xb*(parseInt(_0x42f6b4(0xa3))/0xc);if(_0x5c84ff===_0x376353)break;else _0x51ed93['push'](_0x51ed93['shift']());}catch(_0x4e4fd6){_0x51ed93['push'](_0x51ed93['shift']());}}}(a151_0x102e,0x7e605));function a151_0x31e4(_0x4b6b9b,_0x4492c8){_0x4b6b9b=_0x4b6b9b-0xa0;const _0x102e48=a151_0x102e();let _0x31e418=_0x102e48[_0x4b6b9b];return _0x31e418;}function a151_0x102e(){const _0x378ef9=['59984wqYPoC','511TbxeQg','5TRGdEE','3650226yEAmwZ','453025LhybIN','27Jvquvj','159508erhajC','2010285RjFAHk','5821464MkPipE','44zHndmy','20ZcuyJn','1777460dYCSmB'];a151_0x102e=function(){return _0x378ef9;};return a151_0x102e();}export const RISK_LEVEL_VALUES=['read','write','high-risk-write'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a152_0x246b(_0x34ff70,_0x1915b7){_0x34ff70=_0x34ff70-0x12a;const _0x95ad5f=a152_0x95ad();let _0x246b1a=_0x95ad5f[_0x34ff70];return _0x246b1a;}(function(_0x1d46a7,_0xdb5128){const _0x292b6c=a152_0x246b,_0x25c61f=_0x1d46a7();while(!![]){try{const _0x4b9660=-parseInt(_0x292b6c(0x12c))/0x1+parseInt(_0x292b6c(0x14f))/0x2*(parseInt(_0x292b6c(0x14b))/0x3)+-parseInt(_0x292b6c(0x14d))/0x4+parseInt(_0x292b6c(0x148))/0x5+parseInt(_0x292b6c(0x142))/0x6*(-parseInt(_0x292b6c(0x151))/0x7)+-parseInt(_0x292b6c(0x141))/0x8+parseInt(_0x292b6c(0x130))/0x9*(parseInt(_0x292b6c(0x13e))/0xa);if(_0x4b9660===_0xdb5128)break;else _0x25c61f['push'](_0x25c61f['shift']());}catch(_0x1c3ffd){_0x25c61f['push'](_0x25c61f['shift']());}}}(a152_0x95ad,0x3bcde));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';function a152_0x95ad(){const _0x134c9a=['pageSize','appcode','COOKIE','accessKey','apps','read','apiDir','RISK_LEVEL','true','projectConfig','locale','30atWDCQ','MAX_RISK','ACCESS_KEY','360688nuETfx','18RvjAmV','defaultApp','entries','riskLevel','object','daily','1266935FtTbwh','find','string','506334YKhhwK','ENV','450796hcIjtU','globalConfig','4MNoqBJ','VERBOSE','273721RNYUsG','format','trim','inherit','production','416968hVtjiU','FORMAT','cookie','write','1038231xnKbsN','keys','env'];a152_0x95ad=function(){return _0x134c9a;};return a152_0x95ad();}import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x5dc387){const _0x4ed2b2=a152_0x246b;return typeof _0x5dc387===_0x4ed2b2(0x14a)&&_0x5dc387[_0x4ed2b2(0x153)]()?_0x5dc387[_0x4ed2b2(0x153)]():undefined;}function appProfiles(_0x238208){const _0x3a71df=a152_0x246b;return _0x238208[_0x3a71df(0x137)]&&typeof _0x238208[_0x3a71df(0x137)]===_0x3a71df(0x146)?_0x238208[_0x3a71df(0x137)]:{};}function resolveDefaultAppName(_0x1d7401){const _0x38269b=a152_0x246b,_0x4da8d1=stringConfigValue(_0x1d7401[_0x38269b(0x143)]);if(_0x4da8d1)return _0x4da8d1;return Object[_0x38269b(0x131)](appProfiles(_0x1d7401))[0x0];}function resolveTopLevelAppCode(_0x59a72e){const _0x4bdece=a152_0x246b;return stringConfigValue(_0x59a72e[_0x4bdece(0x134)])||stringConfigValue(_0x59a72e['app']);}export function resolveAppConfig({raw:_0x595d3c,flags:_0x5635a6,layers:_0x4f95a0,readEnv:_0x458749}){const _0x459adc=a152_0x246b,_0x50fd9d=_0x4f95a0?.[_0x459adc(0x13c)]??{},_0xff7ac7=_0x4f95a0?.[_0x459adc(0x14e)]??{},_0x5a8f91=Object[_0x459adc(0x131)](_0x50fd9d)['length']>0x0,_0x2e65f5=!_0x5a8f91||_0x50fd9d[_0x459adc(0x12a)]===!![],_0x532f12=_0x5a8f91?resolveDefaultAppName(_0x50fd9d):undefined,_0x226558=_0x2e65f5?resolveDefaultAppName(_0xff7ac7):undefined,_0x6d8656=stringConfigValue(_0x5635a6['app']),_0x3d6785=_0x458749('APP'),_0x52481c={};if(_0x595d3c[_0x459adc(0x137)]&&typeof _0x595d3c['apps']===_0x459adc(0x146))for(const [_0x35b951,_0x13a90d]of Object[_0x459adc(0x144)](_0x595d3c['apps'])){_0x13a90d&&typeof _0x13a90d===_0x459adc(0x146)&&_0x13a90d[_0x459adc(0x134)]&&(_0x52481c[_0x35b951]=_0x13a90d);}const _0x2acf11=_0x595d3c[_0x459adc(0x143)]||undefined,_0x419e58=Object[_0x459adc(0x131)](_0x52481c)['length']>0x0,_0x488af9=_0x6d8656||_0x532f12||_0x3d6785||_0x226558||_0x2acf11||undefined,_0x4674c2=stringConfigValue(_0x5635a6[_0x459adc(0x134)]),_0x4bd7bc=_0x4674c2?Object['entries'](_0x52481c)[_0x459adc(0x149)](([,_0x10d2ba])=>_0x10d2ba?.[_0x459adc(0x134)]===_0x4674c2):undefined,_0x54f593=_0x4bd7bc?.[0x0],_0x1f1354=_0x4bd7bc?.[0x1],_0x57282c=_0x4674c2?_0x54f593:_0x488af9;let _0x1ad8c9=_0x57282c&&_0x52481c[_0x57282c]?_0x52481c[_0x57282c]:undefined;_0x4674c2&&_0x1f1354&&(_0x1ad8c9=_0x1f1354);const _0x599e4f=_0x4674c2?_0x1f1354??_0x1ad8c9:_0x1ad8c9,_0x22d430=!_0x6d8656&&!_0x532f12&&_0x3d6785&&_0x57282c===_0x3d6785,_0x1995b7=_0x6d8656||(_0x22d430?_0x3d6785:undefined)||(_0x4674c2?_0x54f593:undefined),_0x24cdbd=_0x599e4f?.[_0x459adc(0x134)],_0x41bda9=_0x5a8f91?resolveTopLevelAppCode(_0x50fd9d):undefined,_0x5c5f40=_0x2e65f5?resolveTopLevelAppCode(_0xff7ac7):undefined,_0x52bb14=_0x6d8656||_0x532f12?_0x24cdbd:undefined,_0x10edc8=!_0x6d8656&&!_0x532f12?_0x24cdbd:undefined,_0x58f634=_0x4674c2||_0x52bb14||_0x41bda9||_0x10edc8||_0x5c5f40||undefined,_0x5dfd1b=_0x5a8f91?stringConfigValue(_0x50fd9d[_0x459adc(0x132)]):undefined,_0x172cdc=_0x2e65f5?stringConfigValue(_0xff7ac7['env']):undefined,_0x37eb6e=_0x5635a6[_0x459adc(0x132)]||_0x599e4f?.[_0x459adc(0x132)]||_0x5dfd1b||_0x458749(_0x459adc(0x14c))||_0x172cdc||_0x595d3c['env']||DEFAULT_CONFIG_VALUES[_0x459adc(0x132)],_0x42cec0=_0x599e4f?.['locale']||_0x595d3c['locale']||DEFAULT_CONFIG_VALUES[_0x459adc(0x13d)],_0x289917=_0x458749(_0x459adc(0x135))||_0x599e4f?.[_0x459adc(0x12e)]||_0x595d3c['cookie']||undefined,_0x1e554b=_0x458749(_0x459adc(0x140))||_0x599e4f?.[_0x459adc(0x136)]||_0x595d3c[_0x459adc(0x136)]||undefined,_0x2f6ca8=_0x5635a6['format']||_0x458749(_0x459adc(0x12d))||_0x599e4f?.['format']||_0x595d3c[_0x459adc(0x152)],_0x519671=normalizeLegacyOutputFormat(_0x2f6ca8),_0x29d7ab=_0x458749('PAGE_SIZE')||_0x599e4f?.['pageSize']||_0x595d3c[_0x459adc(0x133)],_0x182fdb=_0x29d7ab?Number(_0x29d7ab)||undefined:undefined,_0x1a6b23=_0x458749(_0x459adc(0x13a))||_0x458749(_0x459adc(0x13f))||_0x599e4f?.['riskLevel']||_0x595d3c['riskLevel']||_0x595d3c['maxRisk'],_0x1c443f=_0x1a6b23===_0x459adc(0x138)||_0x1a6b23===_0x459adc(0x12f)?_0x1a6b23:DEFAULT_CONFIG_VALUES[_0x459adc(0x145)],_0x237b16=_0x458749(_0x459adc(0x150)),_0x341a9c=_0x237b16==='1'||_0x237b16===_0x459adc(0x13b),_0x20631c=_0x599e4f?.[_0x459adc(0x139)]||_0x595d3c[_0x459adc(0x139)]||DEFAULT_CONFIG_VALUES['apiDir'],_0xdd6712=isDaily(normalizeEnv(String(_0x37eb6e)))?_0x459adc(0x147):_0x459adc(0x12b);return{'appCode':typeof _0x58f634===_0x459adc(0x14a)&&_0x58f634['trim']()?_0x58f634['trim']():undefined,'env':_0xdd6712,'locale':_0x42cec0,'cookie':_0x289917,'accessKey':_0x1e554b,'format':_0x519671,'pageSize':_0x182fdb,'riskLevel':_0x1c443f,'verbose':_0x341a9c,'apiDir':_0x20631c,'apps':_0x52481c,'defaultApp':_0x2acf11,'currentApp':_0x419e58?_0x57282c:undefined,'explicitAppName':_0x1995b7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a153_0x5920(){const _0x40d2e8=['../auth/get-cookie.js','5XclACo','1115988LQGFKd','10172rASTnQ','10YgdBoT','cookie','89BbQbWC','48dXDIDL','1763727EckMGR','4348791kuArrm','241752DbPVyR','15835556IRfLJG','2880186NWkUXz'];a153_0x5920=function(){return _0x40d2e8;};return a153_0x5920();}function a153_0x5922(_0x75723b,_0x27fbd9){_0x75723b=_0x75723b-0x84;const _0x5920a2=a153_0x5920();let _0x592219=_0x5920a2[_0x75723b];return _0x592219;}(function(_0x1b244c,_0x183407){const _0x53d7f5=a153_0x5922,_0x190ab9=_0x1b244c();while(!![]){try{const _0x28cc31=parseInt(_0x53d7f5(0x87))/0x1*(-parseInt(_0x53d7f5(0x84))/0x2)+-parseInt(_0x53d7f5(0x89))/0x3+parseInt(_0x53d7f5(0x90))/0x4+parseInt(_0x53d7f5(0x8f))/0x5*(parseInt(_0x53d7f5(0x8d))/0x6)+parseInt(_0x53d7f5(0x8b))/0x7*(-parseInt(_0x53d7f5(0x88))/0x8)+parseInt(_0x53d7f5(0x8a))/0x9*(-parseInt(_0x53d7f5(0x85))/0xa)+parseInt(_0x53d7f5(0x8c))/0xb;if(_0x28cc31===_0x183407)break;else _0x190ab9['push'](_0x190ab9['shift']());}catch(_0x5e18bf){_0x190ab9['push'](_0x190ab9['shift']());}}}(a153_0x5920,0x722be));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x3fbcfe){const _0x540fe6=a153_0x5922,{getCookie:_0xa12940}=await import(_0x540fe6(0x8e)),_0xebd218=_0x3fbcfe[_0x540fe6(0x86)]||_0xa12940(),_0x958c1b=_0xebd218?await getIsSessionValid():![];return{'cookie':_0xebd218,'isLoggedIn':_0x958c1b,async 'getOrLogin'(){if(_0xebd218&&_0x958c1b)return _0xebd218;throw CliErrors['authRequired']();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x315c01=a154_0x44f3;(function(_0x3fc785,_0x3b68f7){const _0x4f83fc=a154_0x44f3,_0x4ac23c=_0x3fc785();while(!![]){try{const _0x211710=-parseInt(_0x4f83fc(0x16b))/0x1*(parseInt(_0x4f83fc(0x162))/0x2)+parseInt(_0x4f83fc(0x174))/0x3*(-parseInt(_0x4f83fc(0x182))/0x4)+parseInt(_0x4f83fc(0x161))/0x5+parseInt(_0x4f83fc(0x16c))/0x6*(-parseInt(_0x4f83fc(0x164))/0x7)+-parseInt(_0x4f83fc(0x172))/0x8*(-parseInt(_0x4f83fc(0x16e))/0x9)+-parseInt(_0x4f83fc(0x17b))/0xa+parseInt(_0x4f83fc(0x170))/0xb;if(_0x211710===_0x3b68f7)break;else _0x4ac23c['push'](_0x4ac23c['shift']());}catch(_0x263c32){_0x4ac23c['push'](_0x4ac23c['shift']());}}}(a154_0x2f8d,0x54f37));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a154_0x315c01(0x15d);function a154_0x2f8d(){const _0x878f5f=['apiDir','appcode','env','set','5223420YAdTzL','locale','pageSize','string','parse','data','defaultApp','1811532aqspuQ','status','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','empty','inherit','format','apps','config','error','silent','object','riskLevel','filter','.rabetbase.json','message','migrated','warn','719300CuMEqA','772138QWZBlw','cwd','28kQAHca','missing','cookie','keys','accessKey','stringify','length','1mdUKVR','651018coGZmN','trim','1187037stqfcS','utf8','19091809vCrqka','get','16AxNPWu','.lovrabetrc','3PyuNtv','.tmp','app'];a154_0x2f8d=function(){return _0x878f5f;};return a154_0x2f8d();}export const CONFIG_NAMES=[a154_0x315c01(0x15d),'.lovrabet.json',a154_0x315c01(0x173)];function a154_0x44f3(_0x5bbd3d,_0x1f2558){_0x5bbd3d=_0x5bbd3d-0x156;const _0x2f8d4b=a154_0x2f8d();let _0x44f3e4=_0x2f8d4b[_0x5bbd3d];return _0x44f3e4;}export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a154_0x315c01(0x15c)](_0x591dc2=>_0x591dc2!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x3ef45d){for(const _0x130f98 of CONFIG_NAMES){const _0x2e2e72=resolve(_0x3ef45d,_0x130f98);if(existsSync(_0x2e2e72))return _0x2e2e72;}return undefined;}export function findProjectRootDirectory(_0x1a8e6d=process[a154_0x315c01(0x163)]()){let _0x2b1c65=resolve(_0x1a8e6d);const {root:_0x3921cf}=parse(_0x2b1c65),_0x168a4a=homedir();while(!![]){if(resolveConfigPath(_0x2b1c65)){if(_0x2b1c65===_0x168a4a)break;return _0x2b1c65;}if(_0x2b1c65===_0x3921cf||_0x2b1c65===_0x168a4a)break;const _0x7da85c=dirname(_0x2b1c65);if(_0x7da85c===_0x2b1c65)break;_0x2b1c65=_0x7da85c;}return resolve(_0x1a8e6d);}export function getProjectConfigPath(){const _0x4e1375=a154_0x315c01;return resolveConfigPath(process[_0x4e1375(0x163)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x14d4fd){const _0x50610a=a154_0x315c01;if(!existsSync(_0x14d4fd))return{'status':'missing'};try{const _0x3d8b2b=readFileSync(_0x14d4fd,{'encoding':'utf8'});if(!_0x3d8b2b?.[_0x50610a(0x16d)]())return{'status':'empty'};const _0x4c7309=JSON[_0x50610a(0x17f)](_0x3d8b2b);return{'status':'ok','data':_0x4c7309};}catch(_0x352988){return{'status':_0x50610a(0x158),'message':_0x352988 instanceof Error?_0x352988['message']:String(_0x352988)};}}function parseCliConfigJsonFile(_0x13c0d1,_0x512ae4,_0x315dec){const _0x4160d4=a154_0x315c01,_0x4b005b=inspectCliConfigJsonFile(_0x13c0d1);if(_0x4b005b[_0x4160d4(0x183)]===_0x4160d4(0x165)||_0x4b005b[_0x4160d4(0x183)]===_0x4160d4(0x185))return{};if(_0x4b005b[_0x4160d4(0x183)]==='ok')return _0x4b005b[_0x4160d4(0x180)];return _0x512ae4===_0x4160d4(0x160)&&_0x315dec&&console[_0x4160d4(0x158)](CLI_BIN_NAME+':\x20'+_0x315dec+_0x4160d4(0x184)+_0x13c0d1+'\x0a\x20\x20'+_0x4b005b[_0x4160d4(0x15e)]),{};}function normalizeLegacyConfigShape(_0x18e44c){const _0xa1c732=a154_0x315c01;if(!_0x18e44c||typeof _0x18e44c!==_0xa1c732(0x15a))return{'config':{},'migrated':![]};const _0x44e5a7={..._0x18e44c},_0x1129b1=_0x44e5a7[_0xa1c732(0x156)]&&typeof _0x44e5a7[_0xa1c732(0x156)]===_0xa1c732(0x15a)?{..._0x44e5a7[_0xa1c732(0x156)]}:{},_0x39434b=Object[_0xa1c732(0x167)](_0x1129b1)['length'],_0x34d5ee=_0x44e5a7['appcode']||_0x44e5a7[_0xa1c732(0x176)];let _0x272ed8=![];if(_0x34d5ee&&_0x39434b===0x0){const _0x3263fb=typeof _0x44e5a7['defaultApp']===_0xa1c732(0x17e)&&_0x44e5a7[_0xa1c732(0x181)][_0xa1c732(0x16d)]()?_0x44e5a7['defaultApp']:String(_0x34d5ee)[_0xa1c732(0x16d)]();_0x1129b1[_0x3263fb]={'appcode':String(_0x34d5ee)[_0xa1c732(0x16d)](),..._0x44e5a7[_0xa1c732(0x179)]!=null?{'env':_0x44e5a7['env']}:{},..._0x44e5a7[_0xa1c732(0x177)]!=null?{'apiDir':_0x44e5a7[_0xa1c732(0x177)]}:{},..._0x44e5a7[_0xa1c732(0x166)]!=null?{'cookie':_0x44e5a7['cookie']}:{},..._0x44e5a7['accessKey']!=null?{'accessKey':_0x44e5a7[_0xa1c732(0x168)]}:{},..._0x44e5a7[_0xa1c732(0x187)]!=null?{'format':_0x44e5a7[_0xa1c732(0x187)]}:{},..._0x44e5a7[_0xa1c732(0x17d)]!=null?{'pageSize':_0x44e5a7[_0xa1c732(0x17d)]}:{},..._0x44e5a7[_0xa1c732(0x15b)]!=null?{'riskLevel':_0x44e5a7['riskLevel']}:{},..._0x44e5a7[_0xa1c732(0x17c)]!=null?{'locale':_0x44e5a7[_0xa1c732(0x17c)]}:{}},_0x44e5a7['apps']=_0x1129b1;if(!_0x44e5a7['defaultApp'])_0x44e5a7['defaultApp']=_0x3263fb;_0x272ed8=!![];}return(_0xa1c732(0x178)in _0x44e5a7||_0xa1c732(0x176)in _0x44e5a7)&&(delete _0x44e5a7[_0xa1c732(0x178)],delete _0x44e5a7[_0xa1c732(0x176)],_0x272ed8=!![]),{'config':_0x44e5a7,'migrated':_0x272ed8};}function writeNormalizedConfigIfNeeded(_0x3bf2b6,_0x29481d){const _0x4ae3c4=a154_0x315c01,_0x420cba=JSON[_0x4ae3c4(0x169)](_0x29481d,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4ae3c4(0x171)](_0x3bf2b6)===_0x420cba)return;writeConfigFile(_0x3bf2b6,_0x29481d),normalizedWriteCache[_0x4ae3c4(0x17a)](_0x3bf2b6,_0x420cba);}function parseAndNormalizeConfig(_0x464beb,_0x3fc356,_0x3bdf05){const _0x4877ff=a154_0x315c01,_0xa51e5d=parseCliConfigJsonFile(_0x464beb,_0x3fc356,_0x3bdf05),_0x4771e7=normalizeLegacyConfigShape(_0xa51e5d);if(_0x4771e7[_0x4877ff(0x15f)])try{writeNormalizedConfigIfNeeded(_0x464beb,_0x4771e7[_0x4877ff(0x157)]);}catch{}return _0x4771e7[_0x4877ff(0x157)];}export function loadRawConfigLayers(_0x87019a){const _0x3beb6f=a154_0x315c01;let _0x4b5e57={},_0x4c83fa={};const _0x2c234f=resolveConfigPath(homedir());_0x2c234f&&(_0x4b5e57=parseAndNormalizeConfig(_0x2c234f,_0x3beb6f(0x160),'Global'));const _0x1f6a98=_0x87019a??findProjectRootDirectory(),_0x3a9990=resolveConfigPath(_0x1f6a98);return _0x3a9990&&(_0x4c83fa=parseAndNormalizeConfig(_0x3a9990,_0x3beb6f(0x160),'Project')),{'globalPath':_0x2c234f,'projectPath':_0x3a9990,'globalConfig':_0x4b5e57,'projectConfig':_0x4c83fa};}const INHERIT_WHITELIST=[a154_0x315c01(0x166),a154_0x315c01(0x168),a154_0x315c01(0x17c),'format',a154_0x315c01(0x15b),a154_0x315c01(0x17d)];export function mergeRawConfigLayers(_0x5c968b){const _0xfcd6e5=a154_0x315c01,{globalConfig:_0x2d6bd5,projectConfig:_0x493fd1}=_0x5c968b,_0xe6b241=Object[_0xfcd6e5(0x167)](_0x493fd1)[_0xfcd6e5(0x16a)]>0x0;if(!_0xe6b241)return mergeGlobalOnly(_0x2d6bd5);if(_0x493fd1[_0xfcd6e5(0x186)]===!![])return mergeFullInherit(_0x2d6bd5,_0x493fd1);if(_0x493fd1[_0xfcd6e5(0x186)]===![])return mergeIsolated(_0x493fd1);return mergeProjectFirst(_0x2d6bd5,_0x493fd1);}function mergeGlobalOnly(_0x54f0a0){const _0x1ae971=a154_0x315c01,_0x4e37b7={..._0x54f0a0},_0x23c540=_0x54f0a0[_0x1ae971(0x156)]&&typeof _0x54f0a0['apps']===_0x1ae971(0x15a)?_0x54f0a0[_0x1ae971(0x156)]:{};if(Object['keys'](_0x23c540)[_0x1ae971(0x16a)]>0x0)_0x4e37b7[_0x1ae971(0x156)]=_0x23c540;if(_0x54f0a0[_0x1ae971(0x181)])_0x4e37b7['defaultApp']=_0x54f0a0[_0x1ae971(0x181)];else{const _0x4a9173=Object[_0x1ae971(0x167)](_0x23c540);if(_0x4a9173[_0x1ae971(0x16a)]>0x0)_0x4e37b7['defaultApp']=_0x4a9173[0x0];}return _0x4e37b7;}function mergeIsolated(_0x45af00){const _0x11733b=a154_0x315c01,_0x41655e={..._0x45af00};delete _0x41655e[_0x11733b(0x186)];const _0x12220b=_0x45af00[_0x11733b(0x156)]&&typeof _0x45af00[_0x11733b(0x156)]===_0x11733b(0x15a)?_0x45af00[_0x11733b(0x156)]:{};Object[_0x11733b(0x167)](_0x12220b)[_0x11733b(0x16a)]>0x0?_0x41655e['apps']=_0x12220b:delete _0x41655e[_0x11733b(0x156)];if(_0x11733b(0x181)in _0x45af00)_0x41655e[_0x11733b(0x181)]=_0x45af00[_0x11733b(0x181)];else Object['keys'](_0x12220b)[_0x11733b(0x16a)]>0x0?_0x41655e[_0x11733b(0x181)]=Object[_0x11733b(0x167)](_0x12220b)[0x0]:delete _0x41655e['defaultApp'];return _0x41655e;}function mergeProjectFirst(_0x1a362f,_0x16cea8){const _0x5a4d76=a154_0x315c01,_0x8f1585={..._0x16cea8};delete _0x8f1585[_0x5a4d76(0x186)];for(const _0x3cf249 of INHERIT_WHITELIST){!(_0x3cf249 in _0x8f1585)&&_0x3cf249 in _0x1a362f&&(_0x8f1585[_0x3cf249]=_0x1a362f[_0x3cf249]);}const _0x1e9570=_0x16cea8[_0x5a4d76(0x156)]&&typeof _0x16cea8['apps']===_0x5a4d76(0x15a)?_0x16cea8[_0x5a4d76(0x156)]:{};Object[_0x5a4d76(0x167)](_0x1e9570)[_0x5a4d76(0x16a)]>0x0?_0x8f1585['apps']=_0x1e9570:delete _0x8f1585['apps'];if(_0x5a4d76(0x181)in _0x16cea8)_0x8f1585[_0x5a4d76(0x181)]=_0x16cea8['defaultApp'];else Object[_0x5a4d76(0x167)](_0x1e9570)[_0x5a4d76(0x16a)]>0x0?_0x8f1585[_0x5a4d76(0x181)]=Object[_0x5a4d76(0x167)](_0x1e9570)[0x0]:delete _0x8f1585[_0x5a4d76(0x181)];return _0x8f1585;}function mergeFullInherit(_0x5a294c,_0xdc36cd){const _0x2ccc9c=a154_0x315c01,_0x2b6df1=_0x5a294c['apps']&&typeof _0x5a294c[_0x2ccc9c(0x156)]===_0x2ccc9c(0x15a)?_0x5a294c[_0x2ccc9c(0x156)]:{},_0x48ea3a=_0xdc36cd['apps']&&typeof _0xdc36cd[_0x2ccc9c(0x156)]===_0x2ccc9c(0x15a)?_0xdc36cd[_0x2ccc9c(0x156)]:{},_0x5aa870={..._0x2b6df1,..._0x48ea3a},_0x298505={..._0x5a294c,..._0xdc36cd};delete _0x298505[_0x2ccc9c(0x186)];if(Object[_0x2ccc9c(0x167)](_0x5aa870)[_0x2ccc9c(0x16a)]>0x0)_0x298505[_0x2ccc9c(0x156)]=_0x5aa870;if('defaultApp'in _0xdc36cd)_0x298505[_0x2ccc9c(0x181)]=_0xdc36cd['defaultApp'];else{if(Object[_0x2ccc9c(0x167)](_0x48ea3a)[_0x2ccc9c(0x16a)]>0x0)_0x298505['defaultApp']=Object[_0x2ccc9c(0x167)](_0x48ea3a)[0x0];else{if(_0x5a294c[_0x2ccc9c(0x181)])_0x298505['defaultApp']=_0x5a294c['defaultApp'];else{const _0x1c0b66=Object[_0x2ccc9c(0x167)](_0x2b6df1);if(_0x1c0b66['length']>0x0)_0x298505[_0x2ccc9c(0x181)]=_0x1c0b66[0x0];}}}return _0x298505;}export function readRawConfigWithLayers(_0x417ae3){const _0x4ef49a=loadRawConfigLayers(_0x417ae3);return{'config':mergeRawConfigLayers(_0x4ef49a),'layers':_0x4ef49a};}export function readRawConfig(_0x991354){return mergeRawConfigLayers(loadRawConfigLayers(_0x991354));}export function readConfigFile(_0x25784c){const _0x18e8ca=a154_0x315c01;return parseAndNormalizeConfig(_0x25784c,_0x18e8ca(0x159));}export function writeConfigFile(_0x42f13f,_0x4c4f2b){const _0x4801c4=a154_0x315c01,_0x540971=dirname(_0x42f13f);!existsSync(_0x540971)&&mkdirSync(_0x540971,{'recursive':!![]});const _0x509b2d=_0x42f13f+_0x4801c4(0x175);try{writeFileSync(_0x509b2d,JSON[_0x4801c4(0x169)](_0x4c4f2b,null,0x2)+'\x0a',{'encoding':_0x4801c4(0x16f),'mode':0x180}),renameSync(_0x509b2d,_0x42f13f);}catch(_0x387596){try{unlinkSync(_0x509b2d);}catch{}throw _0x387596;}}export function resolveWriteConfigPath(_0x3eff59){const _0x25205c=a154_0x315c01,_0xf40ef4=_0x3eff59==='project'?process[_0x25205c(0x163)]():homedir(),_0x3c4b82=resolveConfigPath(_0xf40ef4);return _0x3c4b82??resolve(_0xf40ef4,NEW_CONFIG_NAME);}
|
|
1
|
+
const a154_0x58e8db=a154_0x1489;(function(_0x305962,_0xc210b0){const _0x5c16cd=a154_0x1489,_0x471630=_0x305962();while(!![]){try{const _0x314579=-parseInt(_0x5c16cd(0x1ee))/0x1+-parseInt(_0x5c16cd(0x1cf))/0x2*(-parseInt(_0x5c16cd(0x1d9))/0x3)+parseInt(_0x5c16cd(0x1e1))/0x4+-parseInt(_0x5c16cd(0x1c5))/0x5*(-parseInt(_0x5c16cd(0x1da))/0x6)+parseInt(_0x5c16cd(0x1e9))/0x7+-parseInt(_0x5c16cd(0x1cb))/0x8*(-parseInt(_0x5c16cd(0x1d7))/0x9)+-parseInt(_0x5c16cd(0x1eb))/0xa;if(_0x314579===_0xc210b0)break;else _0x471630['push'](_0x471630['shift']());}catch(_0x5951f2){_0x471630['push'](_0x471630['shift']());}}}(a154_0xab58,0x9f009));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a154_0x58e8db(0x1c8);export const CONFIG_NAMES=['.rabetbase.json',a154_0x58e8db(0x1e6),a154_0x58e8db(0x1e4)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a154_0x58e8db(0x1c9)](_0x3a60a6=>_0x3a60a6!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x45782f){for(const _0x5645bf of CONFIG_NAMES){const _0x3b2f17=resolve(_0x45782f,_0x5645bf);if(existsSync(_0x3b2f17))return _0x3b2f17;}return undefined;}export function findProjectRootDirectory(_0x9d0a74=process[a154_0x58e8db(0x1ec)]()){let _0x153aa6=resolve(_0x9d0a74);const {root:_0x9862a5}=parse(_0x153aa6),_0x243649=homedir();while(!![]){if(resolveConfigPath(_0x153aa6)){if(_0x153aa6===_0x243649)break;return _0x153aa6;}if(_0x153aa6===_0x9862a5||_0x153aa6===_0x243649)break;const _0x33862b=dirname(_0x153aa6);if(_0x33862b===_0x153aa6)break;_0x153aa6=_0x33862b;}return resolve(_0x9d0a74);}export function getProjectConfigPath(){const _0x372816=a154_0x58e8db;return resolveConfigPath(process[_0x372816(0x1ec)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x4d2c36){const _0x25aaa7=a154_0x58e8db;if(!existsSync(_0x4d2c36))return{'status':_0x25aaa7(0x1e3)};try{const _0x3e6516=readFileSync(_0x4d2c36,{'encoding':_0x25aaa7(0x1d8)});if(!_0x3e6516?.['trim']())return{'status':_0x25aaa7(0x1db)};const _0x1f107f=JSON[_0x25aaa7(0x1cd)](_0x3e6516);return{'status':'ok','data':_0x1f107f};}catch(_0x2c73d5){return{'status':'error','message':_0x2c73d5 instanceof Error?_0x2c73d5['message']:String(_0x2c73d5)};}}function parseCliConfigJsonFile(_0x431d85,_0x46a169,_0x314245){const _0x2f9c02=a154_0x58e8db,_0x2c62d6=inspectCliConfigJsonFile(_0x431d85);if(_0x2c62d6[_0x2f9c02(0x1ef)]==='missing'||_0x2c62d6[_0x2f9c02(0x1ef)]==='empty')return{};if(_0x2c62d6['status']==='ok')return _0x2c62d6[_0x2f9c02(0x1d0)];return _0x46a169===_0x2f9c02(0x1e7)&&_0x314245&&console[_0x2f9c02(0x1ed)](CLI_BIN_NAME+':\x20'+_0x314245+_0x2f9c02(0x1e2)+_0x431d85+_0x2f9c02(0x1c7)+_0x2c62d6[_0x2f9c02(0x1e8)]),{};}function normalizeLegacyConfigShape(_0x42ed83){const _0x512dee=a154_0x58e8db;if(!_0x42ed83||typeof _0x42ed83!==_0x512dee(0x1c0))return{'config':{},'migrated':![]};const _0x3bac5c={..._0x42ed83},_0x2eca51=_0x3bac5c[_0x512dee(0x1dc)]&&typeof _0x3bac5c[_0x512dee(0x1dc)]===_0x512dee(0x1c0)?{..._0x3bac5c[_0x512dee(0x1dc)]}:{},_0x2c70cc=Object[_0x512dee(0x1e0)](_0x2eca51)[_0x512dee(0x1df)],_0xb9effb=_0x3bac5c[_0x512dee(0x1f0)]||_0x3bac5c[_0x512dee(0x1d3)];let _0x3cdab9=![];if(_0xb9effb&&_0x2c70cc===0x0){const _0x307084=typeof _0x3bac5c[_0x512dee(0x1ce)]===_0x512dee(0x1d6)&&_0x3bac5c[_0x512dee(0x1ce)]['trim']()?_0x3bac5c[_0x512dee(0x1ce)]:String(_0xb9effb)[_0x512dee(0x1e5)]();_0x2eca51[_0x307084]={'appcode':String(_0xb9effb)[_0x512dee(0x1e5)](),..._0x3bac5c[_0x512dee(0x1c4)]!=null?{'env':_0x3bac5c[_0x512dee(0x1c4)]}:{},..._0x3bac5c[_0x512dee(0x1c2)]!=null?{'apiDir':_0x3bac5c[_0x512dee(0x1c2)]}:{},..._0x3bac5c[_0x512dee(0x1dd)]!=null?{'cookie':_0x3bac5c[_0x512dee(0x1dd)]}:{},..._0x3bac5c[_0x512dee(0x1d1)]!=null?{'accessKey':_0x3bac5c[_0x512dee(0x1d1)]}:{},..._0x3bac5c[_0x512dee(0x1d4)]!=null?{'format':_0x3bac5c[_0x512dee(0x1d4)]}:{},..._0x3bac5c[_0x512dee(0x1de)]!=null?{'pageSize':_0x3bac5c[_0x512dee(0x1de)]}:{},..._0x3bac5c[_0x512dee(0x1c3)]!=null?{'riskLevel':_0x3bac5c[_0x512dee(0x1c3)]}:{},..._0x3bac5c[_0x512dee(0x1bf)]!=null?{'locale':_0x3bac5c[_0x512dee(0x1bf)]}:{}},_0x3bac5c[_0x512dee(0x1dc)]=_0x2eca51;if(!_0x3bac5c[_0x512dee(0x1ce)])_0x3bac5c['defaultApp']=_0x307084;_0x3cdab9=!![];}return(_0x512dee(0x1f0)in _0x3bac5c||_0x512dee(0x1d3)in _0x3bac5c)&&(delete _0x3bac5c[_0x512dee(0x1f0)],delete _0x3bac5c[_0x512dee(0x1d3)],_0x3cdab9=!![]),{'config':_0x3bac5c,'migrated':_0x3cdab9};}function writeNormalizedConfigIfNeeded(_0x1a1c68,_0x5dfb2f){const _0x2ba3e2=JSON['stringify'](_0x5dfb2f,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x1a1c68)===_0x2ba3e2)return;writeConfigFile(_0x1a1c68,_0x5dfb2f),normalizedWriteCache['set'](_0x1a1c68,_0x2ba3e2);}function parseAndNormalizeConfig(_0x15bf17,_0x50f67f,_0x297332){const _0x533e6d=a154_0x58e8db,_0x5288af=parseCliConfigJsonFile(_0x15bf17,_0x50f67f,_0x297332),_0x450cb4=normalizeLegacyConfigShape(_0x5288af);if(_0x450cb4[_0x533e6d(0x1c1)])try{writeNormalizedConfigIfNeeded(_0x15bf17,_0x450cb4[_0x533e6d(0x1cc)]);}catch{}return _0x450cb4[_0x533e6d(0x1cc)];}function a154_0x1489(_0xb6c39c,_0x57ff07){_0xb6c39c=_0xb6c39c-0x1bf;const _0xab584d=a154_0xab58();let _0x14892f=_0xab584d[_0xb6c39c];return _0x14892f;}export function loadRawConfigLayers(_0x9dc107){const _0x4b37b3=a154_0x58e8db;let _0x50791b={},_0x191a27={};const _0x4e673f=resolveConfigPath(homedir());_0x4e673f&&(_0x50791b=parseAndNormalizeConfig(_0x4e673f,_0x4b37b3(0x1e7),_0x4b37b3(0x1ca)));const _0xbbca16=_0x9dc107??findProjectRootDirectory(),_0x3ff19a=resolveConfigPath(_0xbbca16);return _0x3ff19a&&(_0x191a27=parseAndNormalizeConfig(_0x3ff19a,_0x4b37b3(0x1e7),_0x4b37b3(0x1f1))),{'globalPath':_0x4e673f,'projectPath':_0x3ff19a,'globalConfig':_0x50791b,'projectConfig':_0x191a27};}const INHERIT_WHITELIST=[a154_0x58e8db(0x1dd),a154_0x58e8db(0x1d1),a154_0x58e8db(0x1bf),a154_0x58e8db(0x1d4),'riskLevel',a154_0x58e8db(0x1de)];export function mergeRawConfigLayers(_0x518cdb){const _0x581226=a154_0x58e8db,{globalConfig:_0x5c9594,projectConfig:_0x318371}=_0x518cdb,_0x568d11=Object[_0x581226(0x1e0)](_0x318371)[_0x581226(0x1df)]>0x0;if(!_0x568d11)return mergeGlobalOnly(_0x5c9594);if(_0x318371[_0x581226(0x1d2)]===!![])return mergeFullInherit(_0x5c9594,_0x318371);if(_0x318371[_0x581226(0x1d2)]===![])return mergeIsolated(_0x318371);return mergeProjectFirst(_0x5c9594,_0x318371);}function mergeGlobalOnly(_0x2f014f){const _0x53704f=a154_0x58e8db,_0x5538f9={..._0x2f014f},_0xf1420b=_0x2f014f[_0x53704f(0x1dc)]&&typeof _0x2f014f[_0x53704f(0x1dc)]===_0x53704f(0x1c0)?_0x2f014f[_0x53704f(0x1dc)]:{};if(Object[_0x53704f(0x1e0)](_0xf1420b)[_0x53704f(0x1df)]>0x0)_0x5538f9['apps']=_0xf1420b;if(_0x2f014f[_0x53704f(0x1ce)])_0x5538f9['defaultApp']=_0x2f014f[_0x53704f(0x1ce)];else{const _0x321f6d=Object[_0x53704f(0x1e0)](_0xf1420b);if(_0x321f6d[_0x53704f(0x1df)]>0x0)_0x5538f9[_0x53704f(0x1ce)]=_0x321f6d[0x0];}return _0x5538f9;}function mergeIsolated(_0x2e8867){const _0x1d0787=a154_0x58e8db,_0x38465d={..._0x2e8867};delete _0x38465d[_0x1d0787(0x1d2)];const _0x191214=_0x2e8867['apps']&&typeof _0x2e8867[_0x1d0787(0x1dc)]==='object'?_0x2e8867['apps']:{};Object[_0x1d0787(0x1e0)](_0x191214)['length']>0x0?_0x38465d[_0x1d0787(0x1dc)]=_0x191214:delete _0x38465d[_0x1d0787(0x1dc)];if(_0x1d0787(0x1ce)in _0x2e8867)_0x38465d['defaultApp']=_0x2e8867[_0x1d0787(0x1ce)];else Object[_0x1d0787(0x1e0)](_0x191214)['length']>0x0?_0x38465d[_0x1d0787(0x1ce)]=Object[_0x1d0787(0x1e0)](_0x191214)[0x0]:delete _0x38465d[_0x1d0787(0x1ce)];return _0x38465d;}function mergeProjectFirst(_0x5f3183,_0xf174e7){const _0x4cb6c5=a154_0x58e8db,_0x5bc773={..._0xf174e7};delete _0x5bc773[_0x4cb6c5(0x1d2)];for(const _0xe53f8a of INHERIT_WHITELIST){!(_0xe53f8a in _0x5bc773)&&_0xe53f8a in _0x5f3183&&(_0x5bc773[_0xe53f8a]=_0x5f3183[_0xe53f8a]);}const _0x5d8256=_0xf174e7[_0x4cb6c5(0x1dc)]&&typeof _0xf174e7[_0x4cb6c5(0x1dc)]==='object'?_0xf174e7[_0x4cb6c5(0x1dc)]:{};Object[_0x4cb6c5(0x1e0)](_0x5d8256)[_0x4cb6c5(0x1df)]>0x0?_0x5bc773[_0x4cb6c5(0x1dc)]=_0x5d8256:delete _0x5bc773[_0x4cb6c5(0x1dc)];if(_0x4cb6c5(0x1ce)in _0xf174e7)_0x5bc773[_0x4cb6c5(0x1ce)]=_0xf174e7[_0x4cb6c5(0x1ce)];else Object[_0x4cb6c5(0x1e0)](_0x5d8256)[_0x4cb6c5(0x1df)]>0x0?_0x5bc773[_0x4cb6c5(0x1ce)]=Object[_0x4cb6c5(0x1e0)](_0x5d8256)[0x0]:delete _0x5bc773[_0x4cb6c5(0x1ce)];return _0x5bc773;}function a154_0xab58(){const _0x5e40cb=['29545920wUmmrB','cwd','error','166561tRmMdF','status','appcode','Project','locale','object','migrated','apiDir','riskLevel','env','1435qWMfDC','.tmp','\x0a\x20\x20','.rabetbase.json','filter','Global','8hvMrUD','config','parse','defaultApp','4rmJxYM','data','accessKey','inherit','app','format','silent','string','5524371iIbbTh','utf8','1731531crzQye','9570ioFzdc','empty','apps','cookie','pageSize','length','keys','1062088VVqiUg','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','missing','.lovrabetrc','trim','.lovrabet.json','warn','message','8966762UEdiRD','stringify'];a154_0xab58=function(){return _0x5e40cb;};return a154_0xab58();}function mergeFullInherit(_0x441bdc,_0x1fe63d){const _0x37e986=a154_0x58e8db,_0x44b3de=_0x441bdc[_0x37e986(0x1dc)]&&typeof _0x441bdc[_0x37e986(0x1dc)]==='object'?_0x441bdc[_0x37e986(0x1dc)]:{},_0x50aa6c=_0x1fe63d[_0x37e986(0x1dc)]&&typeof _0x1fe63d[_0x37e986(0x1dc)]==='object'?_0x1fe63d['apps']:{},_0x41c2e8={..._0x44b3de,..._0x50aa6c},_0x65f1dc={..._0x441bdc,..._0x1fe63d};delete _0x65f1dc[_0x37e986(0x1d2)];if(Object['keys'](_0x41c2e8)[_0x37e986(0x1df)]>0x0)_0x65f1dc['apps']=_0x41c2e8;if(_0x37e986(0x1ce)in _0x1fe63d)_0x65f1dc[_0x37e986(0x1ce)]=_0x1fe63d[_0x37e986(0x1ce)];else{if(Object['keys'](_0x50aa6c)[_0x37e986(0x1df)]>0x0)_0x65f1dc['defaultApp']=Object[_0x37e986(0x1e0)](_0x50aa6c)[0x0];else{if(_0x441bdc[_0x37e986(0x1ce)])_0x65f1dc[_0x37e986(0x1ce)]=_0x441bdc['defaultApp'];else{const _0xc927ff=Object[_0x37e986(0x1e0)](_0x44b3de);if(_0xc927ff['length']>0x0)_0x65f1dc[_0x37e986(0x1ce)]=_0xc927ff[0x0];}}}return _0x65f1dc;}export function readRawConfigWithLayers(_0x578478){const _0x1d6f9f=loadRawConfigLayers(_0x578478);return{'config':mergeRawConfigLayers(_0x1d6f9f),'layers':_0x1d6f9f};}export function readRawConfig(_0x1db9ce){return mergeRawConfigLayers(loadRawConfigLayers(_0x1db9ce));}export function readConfigFile(_0x206549){const _0x209f9d=a154_0x58e8db;return parseAndNormalizeConfig(_0x206549,_0x209f9d(0x1d5));}export function writeConfigFile(_0x1dc460,_0x5db22b){const _0x184c37=a154_0x58e8db,_0x3b08a=dirname(_0x1dc460);!existsSync(_0x3b08a)&&mkdirSync(_0x3b08a,{'recursive':!![]});const _0x39685b=_0x1dc460+_0x184c37(0x1c6);try{writeFileSync(_0x39685b,JSON[_0x184c37(0x1ea)](_0x5db22b,null,0x2)+'\x0a',{'encoding':_0x184c37(0x1d8),'mode':0x180}),renameSync(_0x39685b,_0x1dc460);}catch(_0x1dd95d){try{unlinkSync(_0x39685b);}catch{}throw _0x1dd95d;}}export function resolveWriteConfigPath(_0x5e1acf){const _0x440e8b=_0x5e1acf==='project'?process['cwd']():homedir(),_0x43a769=resolveConfigPath(_0x440e8b);return _0x43a769??resolve(_0x440e8b,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e6571,_0x32d8d6){const _0x1548f2=a155_0x1cf2,_0x1b483b=_0x2e6571();while(!![]){try{const _0x33ff87=-parseInt(_0x1548f2(0x152))/0x1*(parseInt(_0x1548f2(0x14a))/0x2)+-parseInt(_0x1548f2(0x150))/0x3*(-parseInt(_0x1548f2(0x151))/0x4)+parseInt(_0x1548f2(0x139))/0x5*(-parseInt(_0x1548f2(0x14b))/0x6)+parseInt(_0x1548f2(0x161))/0x7+parseInt(_0x1548f2(0x153))/0x8+-parseInt(_0x1548f2(0x143))/0x9*(-parseInt(_0x1548f2(0x13e))/0xa)+-parseInt(_0x1548f2(0x149))/0xb*(-parseInt(_0x1548f2(0x14f))/0xc);if(_0x33ff87===_0x32d8d6)break;else _0x1b483b['push'](_0x1b483b['shift']());}catch(_0xd68423){_0x1b483b['push'](_0x1b483b['shift']());}}}(a155_0x3480,0x2c5e0));import{resolve}from'node:path';function a155_0x3480(){const _0x1971fd=['65426dYEtfT','1117878swnsut','template_base_url','join','replace','948rNrhPp','1557DvmzMB','524lDgXIc','2RvPXze','481696oWmBeD','length','object','argv','cwd','apiDir','find','map','-api.ts','trim','globalConfig','setLogPath','appcode','string','271439sLUbaP','defaultApp','app','5evQxEY','./constant/domain.js','apps','slice','runtimeDomain','1159940bpXjOB','userDomain','setRawCommand','api.ts','keys','9FGwEOQ','projectConfig','./constant/env.js','apiDomain','env','entries','20955pgknoC'];a155_0x3480=function(){return _0x1971fd;};return a155_0x3480();}import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2aa5d4){return process.env[`RABETBASE_${_0x2aa5d4}`]||process.env[`LOVRABET_${_0x2aa5d4}`]||undefined;}export async function createContext(_0x596d43){const _0x171d65=a155_0x1cf2,{config:_0x51b1e5,layers:_0x1b183a}=readRawConfigWithLayers(),_0x56814d=buildConfig(_0x51b1e5,_0x596d43,_0x1b183a),{initEnv:_0x17fa46}=await import(_0x171d65(0x145));if(_0x56814d[_0x171d65(0x147)])_0x17fa46(_0x56814d[_0x171d65(0x147)]);else _0x596d43[_0x171d65(0x147)]&&typeof _0x596d43['env']===_0x171d65(0x160)&&_0x17fa46(_0x596d43[_0x171d65(0x147)]);const {initDomains:_0xf12bcc,getUserDomain:_0xaafdaa,getApiDomain:_0x3fda9f}=await import(_0x171d65(0x13a));_0xf12bcc({'apiDomain':_0x51b1e5[_0x171d65(0x146)]||undefined,'userDomain':_0x51b1e5[_0x171d65(0x13f)]||undefined,'runtimeDomain':_0x51b1e5[_0x171d65(0x13d)]||undefined});const _0x5c497e={'apiDomain':_0x3fda9f(),'userDomain':_0xaafdaa()},_0x1c1048=await buildAuth(_0x56814d);logger[_0x171d65(0x15e)](process[_0x171d65(0x157)]());const _0x16ef18=(CLI_BIN_NAME+'\x20'+process[_0x171d65(0x156)][_0x171d65(0x13c)](0x2)[_0x171d65(0x14d)]('\x20'))[_0x171d65(0x15c)]();logger[_0x171d65(0x140)](_0x16ef18);const {isNonInteractive:_0x3b6c9f}=await import('./utils/is-non-interactive.js'),_0x10b6ff=_0x3b6c9f(_0x596d43);return{'config':_0x56814d,'auth':_0x1c1048,'logger':logger,'env':_0x5c497e,'nonInteractive':_0x10b6ff};}function a155_0x1cf2(_0x17c079,_0x4d3dfe){_0x17c079=_0x17c079-0x138;const _0x348027=a155_0x3480();let _0x1cf29c=_0x348027[_0x17c079];return _0x1cf29c;}export function buildConfigFromFlags(_0x193589){const {config:_0x56e7d5,layers:_0x1bdba3}=readRawConfigWithLayers();return buildConfig(_0x56e7d5,_0x193589,_0x1bdba3);}export function getConfigAppCode(_0x2893fb){const _0x1e3e88=a155_0x1cf2,_0x184e12=readRawConfig(_0x2893fb);if(_0x184e12['apps']&&typeof _0x184e12[_0x1e3e88(0x13b)]==='object'){const _0x1a9f98=_0x184e12['defaultApp'];if(_0x1a9f98&&_0x184e12[_0x1e3e88(0x13b)][_0x1a9f98]?.[_0x1e3e88(0x15f)])return String(_0x184e12[_0x1e3e88(0x13b)][_0x1a9f98][_0x1e3e88(0x15f)])['trim']();const _0x48faf2=Object['values'](_0x184e12['apps'])[0x0];if(_0x48faf2?.[_0x1e3e88(0x15f)])return String(_0x48faf2[_0x1e3e88(0x15f)])['trim']();}const _0x4543c8=_0x184e12[_0x1e3e88(0x15f)]||_0x184e12[_0x1e3e88(0x138)];if(typeof _0x4543c8!==_0x1e3e88(0x160)||_0x4543c8[_0x1e3e88(0x15c)]()==='')return undefined;return _0x4543c8['trim']();}export function getMultiAppConfigs(_0x1b662f='project',_0x5dd08a){const _0x93e670=a155_0x1cf2,_0x1833b5=loadRawConfigLayers(_0x5dd08a);let _0x5f22c9,_0x6e4dde;if(_0x1b662f==='merged'){const _0x22dff5=_0x1833b5[_0x93e670(0x15d)][_0x93e670(0x13b)]&&typeof _0x1833b5[_0x93e670(0x15d)][_0x93e670(0x13b)]===_0x93e670(0x155)?_0x1833b5['globalConfig'][_0x93e670(0x13b)]:{},_0x28c62f=_0x1833b5[_0x93e670(0x144)]['apps']&&typeof _0x1833b5[_0x93e670(0x144)][_0x93e670(0x13b)]===_0x93e670(0x155)?_0x1833b5[_0x93e670(0x144)][_0x93e670(0x13b)]:{};_0x5f22c9={..._0x22dff5,..._0x28c62f};const _0x59d763=readRawConfig(_0x5dd08a);_0x6e4dde=_0x59d763[_0x93e670(0x162)];}else _0x5f22c9=_0x1833b5[_0x93e670(0x144)][_0x93e670(0x13b)],_0x6e4dde=_0x1833b5[_0x93e670(0x144)][_0x93e670(0x162)];if(!_0x5f22c9||typeof _0x5f22c9!=='object'||Object[_0x93e670(0x142)](_0x5f22c9)[_0x93e670(0x154)]===0x0)return null;return Object[_0x93e670(0x148)](_0x5f22c9)[_0x93e670(0x15a)](([_0x169b8e,_0x3661a8])=>({'name':_0x169b8e,'appcode':_0x3661a8?.['appcode']||'','isDefault':_0x169b8e===_0x6e4dde,'env':_0x3661a8?.[_0x93e670(0x147)],'apiDir':_0x3661a8?.[_0x93e670(0x158)],'cookie':_0x3661a8?.['cookie']||undefined}))['filter'](_0xc499cd=>_0xc499cd[_0x93e670(0x15f)]);}export function getTemplateBaseUrl(_0x1ac33e){const _0x262a8c=a155_0x1cf2,_0x1ae9ed=readRawConfig(_0x1ac33e);if(_0x1ae9ed['template_base_url']&&typeof _0x1ae9ed[_0x262a8c(0x14c)]===_0x262a8c(0x160))return _0x1ae9ed[_0x262a8c(0x14c)][_0x262a8c(0x14e)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}function buildConfig(_0x395d28,_0x4995de,_0x7fca11){return{...resolveAppConfig({'raw':_0x395d28,'flags':_0x4995de,'layers':_0x7fca11,'readEnv':env}),'raw':_0x395d28};}export function resolveApiFilePath(_0x1a8e4a,_0x5950a9){const _0x2617d5=a155_0x1cf2,_0x163d8e=resolve(process[_0x2617d5(0x157)](),_0x1a8e4a),_0x180957=resolve(_0x163d8e,_0x2617d5(0x141));if(!_0x5950a9)return _0x180957;const _0x274be3=readRawConfig(),_0x41a1c5=_0x274be3[_0x2617d5(0x13b)]&&typeof _0x274be3[_0x2617d5(0x13b)]===_0x2617d5(0x155)?_0x274be3['apps']:{},_0x42af0e=Object['entries'](_0x41a1c5)[_0x2617d5(0x159)](([,_0x109f3b])=>_0x109f3b?.[_0x2617d5(0x15f)]===_0x5950a9);if(!_0x42af0e)return _0x180957;const [_0x12b602,_0x546ec6]=_0x42af0e,_0x1a01ae=typeof _0x274be3[_0x2617d5(0x162)]==='string'?_0x274be3['defaultApp']:undefined;if(_0x546ec6?.[_0x2617d5(0x158)])return _0x180957;if(_0x1a01ae&&_0x12b602!==_0x1a01ae)return resolve(_0x163d8e,_0x12b602+_0x2617d5(0x15b));return _0x180957;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a156_0x1ac4(){const _0x1ac4c2=['get','utf-8','153ctwCwv','1423292LdJtBI','cwd','658120kLZbXy','2238450azjefR','3btmfFe','find','push','126455SxHfWj','exec','datasetCode','alias','set','has','4826aruktL','47RqjDYB','330418TpXnQL','122536LmHBzz','102ndWHax'];a156_0x1ac4=function(){return _0x1ac4c2;};return a156_0x1ac4();}(function(_0x625909,_0x4b88fc){const _0x26b308=a156_0x2252,_0x1b2aca=_0x625909();while(!![]){try{const _0x4be49c=-parseInt(_0x26b308(0xf7))/0x1*(parseInt(_0x26b308(0xf6))/0x2)+parseInt(_0x26b308(0xed))/0x3*(-parseInt(_0x26b308(0xe9))/0x4)+-parseInt(_0x26b308(0xeb))/0x5+-parseInt(_0x26b308(0xfa))/0x6*(-parseInt(_0x26b308(0xf0))/0x7)+parseInt(_0x26b308(0xf9))/0x8*(parseInt(_0x26b308(0xe8))/0x9)+parseInt(_0x26b308(0xec))/0xa+parseInt(_0x26b308(0xf8))/0xb;if(_0x4be49c===_0x4b88fc)break;else _0x1b2aca['push'](_0x1b2aca['shift']());}catch(_0x33e660){_0x1b2aca['push'](_0x1b2aca['shift']());}}}(a156_0x1ac4,0x35d67));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0xbdab81){const _0x321de8=a156_0x2252,_0x84ef7b=[],_0x2f98f1=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x328ebb;while((_0x328ebb=_0x2f98f1[_0x321de8(0xf1)](_0xbdab81))!==null){_0x84ef7b[_0x321de8(0xef)]({'datasetCode':_0x328ebb[0x1],'tableName':_0x328ebb[0x2],'name':_0x328ebb[0x3],'alias':_0x328ebb[0x4]});}return _0x84ef7b;}export function loadAliasMap(_0xbeabb8,_0x81fc7a,_0x14e5b8){const _0x2a8fd0=a156_0x2252,_0x142032=_0x14e5b8??resolve(process[_0x2a8fd0(0xea)](),_0xbeabb8,'api.ts');if(cache[_0x2a8fd0(0xf5)](_0x142032))return cache[_0x2a8fd0(0xe6)](_0x142032);if(!existsSync(_0x142032))return cache[_0x2a8fd0(0xf4)](_0x142032,[]),[];try{const _0xdf844f=readFileSync(_0x142032,_0x2a8fd0(0xe7)),_0x363761=parseApiFile(_0xdf844f);return cache['set'](_0x142032,_0x363761),_0x363761;}catch{return cache[_0x2a8fd0(0xf4)](_0x142032,[]),[];}}export function resolveAlias(_0x38ddae,_0x132399,_0x2f009b,_0x1e921c){const _0x3049df=a156_0x2252;if(!_0x132399)return undefined;const _0x3d3552=loadAliasMap(_0x38ddae,_0x2f009b,_0x1e921c),_0x4c87b3=_0x3d3552[_0x3049df(0xee)](_0x2b786c=>_0x2b786c[_0x3049df(0xf3)]===_0x132399);return _0x4c87b3?.[_0x3049df(0xf2)];}function a156_0x2252(_0x585265,_0x470198){_0x585265=_0x585265-0xe6;const _0x1ac4f0=a156_0x1ac4();let _0x2252e4=_0x1ac4f0[_0x585265];return _0x2252e4;}export function listAliases(_0x3a72d0,_0x30672f,_0x240b42){return loadAliasMap(_0x3a72d0,_0x30672f,_0x240b42);}
|