@lovrabet/rabetbase-cli 2.3.4-beta.2 → 2.3.4-beta.4
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -0
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -0
- 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/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-apis-set.js +1 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.js +1 -0
- 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/role/create.js +1 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/role/user-resolve.js +1 -0
- 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/add.js +1 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -0
- 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 +2 -2
- package/lib/commands/app/discover.js +0 -1
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x364542=a165_0xce96;(function(_0xcaa8aa,_0x131c77){const _0x4b7b5a=a165_0xce96,_0x2c7beb=_0xcaa8aa();while(!![]){try{const _0x58f3d5=parseInt(_0x4b7b5a(0xcc))/0x1*(-parseInt(_0x4b7b5a(0xf0))/0x2)+parseInt(_0x4b7b5a(0xca))/0x3+parseInt(_0x4b7b5a(0xd9))/0x4+parseInt(_0x4b7b5a(0xd5))/0x5*(-parseInt(_0x4b7b5a(0xd7))/0x6)+-parseInt(_0x4b7b5a(0xe6))/0x7*(-parseInt(_0x4b7b5a(0xe4))/0x8)+-parseInt(_0x4b7b5a(0xe5))/0x9+parseInt(_0x4b7b5a(0xf1))/0xa;if(_0x58f3d5===_0x131c77)break;else _0x2c7beb['push'](_0x2c7beb['shift']());}catch(_0x1c3ab0){_0x2c7beb['push'](_0x2c7beb['shift']());}}}(a165_0x13a3,0x4375e));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=['cookie',a165_0x364542(0xda),'locale',a165_0x364542(0xcd),a165_0x364542(0xef)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a165_0x364542(0xc8),a165_0x364542(0xdf),'locale',a165_0x364542(0xcd),a165_0x364542(0xe2),a165_0x364542(0xda),a165_0x364542(0xd4)]);function a165_0xce96(_0x4e5695,_0x227cfd){_0x4e5695=_0x4e5695-0xc8;const _0x13a350=a165_0x13a3();let _0xce9611=_0x13a350[_0x4e5695];return _0xce9611;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x2acee5){const _0x5c4eb4=a165_0x364542;return[..._0x2acee5][_0x5c4eb4(0xd1)](',\x20');}function a165_0x13a3(){const _0x202bc5=['cookie','filter','8gPWjvN','3548520UyrSsM','1846481cUZRUB','Locale','Auth\x20cookie','trim','Target\x20environment','API\x20directory\x20path','pageSize','string','has','riskLevel','8Pfvyej','5998310eOlesj','appcode','Risk\x20level','1644159dZnqGM','locale','134843WqfNCC','format','zh-CN','defaultApp','inherit','join','keys','app','apiDir','85GQVoCF','en-US','114918XEVYRM','number','495616WASpdQ','accessKey','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Default\x20page\x20size','apps','toLowerCase','env','Config\x20key\x20(','length'];a165_0x13a3=function(){return _0x202bc5;};return a165_0x13a3();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x2dbe63){const _0x13cfad=a165_0x364542;return TOP_LEVEL_CONFIG_KEYS[_0x13cfad(0xee)](_0x2dbe63);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x13df37=a165_0x364542;return _0x13df37(0xe0)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a165_0x364542(0xdf),'apiDir':a165_0x364542(0xd4),'cookie':a165_0x364542(0xe2),'accessKey':a165_0x364542(0xda),'defaultFormat':a165_0x364542(0xcd),'pageSize':a165_0x364542(0xec),'riskLevel':'riskLevel','locale':'locale'};export function getAppProfileFlagDefs(){const _0x4fa24a=a165_0x364542;return[{'name':'env','type':_0x4fa24a(0xed),'description':_0x4fa24a(0xea),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x4fa24a(0xd4),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xeb)},{'name':_0x4fa24a(0xe2),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xe8),'hidden':!![]},{'name':_0x4fa24a(0xda),'type':_0x4fa24a(0xed),'description':'Access\x20key','hidden':!![]},{'name':'defaultFormat','type':'string','description':_0x4fa24a(0xdb),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x4fa24a(0xd8),'description':_0x4fa24a(0xdc)},{'name':_0x4fa24a(0xef),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xc9),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x4fa24a(0xcb),'type':'string','description':_0x4fa24a(0xe7)}];}export function collectAppProfileOverrides(_0x33a22e){const _0xb29959=a165_0x364542,_0x480e5c={};for(const [_0x477f00,_0x65c0a]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x4961a9=_0x33a22e(_0x477f00);if(!_0x4961a9)continue;_0x480e5c[_0x65c0a]=_0x65c0a===_0xb29959(0xec)?Number(_0x4961a9):_0x4961a9;}return _0x480e5c;}export function buildAppProfileListFields(_0x48bdd7){const _0x5121e4=a165_0x364542;return{'env':_0x48bdd7[_0x5121e4(0xdf)]??null,'apiDir':_0x48bdd7[_0x5121e4(0xd4)]??null,'hasCookie':!!_0x48bdd7[_0x5121e4(0xe2)],'hasAccessKey':!!_0x48bdd7[_0x5121e4(0xda)],'format':_0x48bdd7[_0x5121e4(0xcd)]??null,'pageSize':_0x48bdd7[_0x5121e4(0xec)]??null,'riskLevel':_0x48bdd7['riskLevel']??null,'locale':_0x48bdd7[_0x5121e4(0xcb)]??null};}export function buildAppDoctorFields(_0x32092f,_0x330356){const _0x1741ec=a165_0x364542;return{'env':{'value':_0x32092f['env']||_0x330356[_0x1741ec(0xdf)],'source':_0x32092f['env']?_0x1741ec(0xd3):_0x1741ec(0xd0)},'apiDir':{'value':_0x32092f[_0x1741ec(0xd4)]||_0x330356[_0x1741ec(0xd4)],'source':_0x32092f[_0x1741ec(0xd4)]?_0x1741ec(0xd3):_0x1741ec(0xd0)},'cookie':{'value':_0x32092f[_0x1741ec(0xe2)]||_0x330356[_0x1741ec(0xe2)],'source':_0x32092f[_0x1741ec(0xe2)]?_0x1741ec(0xd3):_0x1741ec(0xd0)},'accessKey':{'value':_0x32092f[_0x1741ec(0xda)]||_0x330356['accessKey'],'source':_0x32092f['accessKey']?_0x1741ec(0xd3):_0x1741ec(0xd0)}};}export function buildCanonicalAppConfig(_0x2ca8e2,_0x2cd22a){const _0x37db93=a165_0x364542,_0x2dd3a6=_0x2ca8e2['map'](_0x4754c9=>String(_0x4754c9||'')[_0x37db93(0xe9)]())[_0x37db93(0xe3)](Boolean);if(_0x2dd3a6[_0x37db93(0xe1)]===0x0)return{};const _0x2e79fe={};for(const _0x55144a of _0x2dd3a6){_0x2e79fe[_0x55144a]=_0x2cd22a?{'appcode':_0x55144a,'env':_0x2cd22a}:{'appcode':_0x55144a};}return{'apps':_0x2e79fe,'defaultApp':_0x2dd3a6[0x0]};}export function buildCanonicalProjectConfig(_0x1b2ce2,_0x40a7bc){const _0x53f1e8=a165_0x364542,{appCodes:appCodes=[],env:_0x1e8e87,metadata:_0x53340d}=_0x40a7bc,_0x164ac8={..._0x1b2ce2,..._0x53340d||{}};delete _0x164ac8[_0x53f1e8(0xc8)],delete _0x164ac8[_0x53f1e8(0xd3)];if(_0x1e8e87)_0x164ac8[_0x53f1e8(0xdf)]=_0x1e8e87;else!_0x164ac8[_0x53f1e8(0xdf)]&&(_0x164ac8[_0x53f1e8(0xdf)]=DEFAULT_CONFIG_VALUES[_0x53f1e8(0xdf)]);const _0x41ed8c=buildCanonicalAppConfig(appCodes,_0x164ac8[_0x53f1e8(0xdf)]);return Object[_0x53f1e8(0xd2)](_0x41ed8c)[_0x53f1e8(0xe1)]>0x0&&(_0x164ac8[_0x53f1e8(0xdd)]=_0x41ed8c[_0x53f1e8(0xdd)],_0x164ac8[_0x53f1e8(0xcf)]=_0x41ed8c[_0x53f1e8(0xcf)]),_0x164ac8;}const LOCALE_MAP={'zh':a165_0x364542(0xce),'zh-cn':'zh-CN','zh_cn':a165_0x364542(0xce),'en':a165_0x364542(0xd6),'en-us':a165_0x364542(0xd6),'en_us':a165_0x364542(0xd6)};export function normalizeLocale(_0x359f2b){const _0x1dd88e=a165_0x364542;if(!_0x359f2b)return null;return LOCALE_MAP[_0x359f2b[_0x1dd88e(0xde)]()]??null;}
|
package/lib/constant/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a166_0x366675=a166_0x2d26;function a166_0x4ce5(){const _0xfb39d3=['2wIxkkV','791520diXeKd','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','16689664BobtxR','1578530ZkNlgp','3994697ibcdGX','3770776ZJyeol','533915fWaaLx','2345352FroubD'];a166_0x4ce5=function(){return _0xfb39d3;};return a166_0x4ce5();}(function(_0x3f8718,_0x1ab05a){const _0x3cd41e=a166_0x2d26,_0x5d8c6b=_0x3f8718();while(!![]){try{const _0x164144=-parseInt(_0x3cd41e(0xce))/0x1*(parseInt(_0x3cd41e(0xd0))/0x2)+-parseInt(_0x3cd41e(0xd1))/0x3+-parseInt(_0x3cd41e(0xcd))/0x4+parseInt(_0x3cd41e(0xcb))/0x5+parseInt(_0x3cd41e(0xcf))/0x6+-parseInt(_0x3cd41e(0xcc))/0x7+parseInt(_0x3cd41e(0xd3))/0x8;if(_0x164144===_0x1ab05a)break;else _0x5d8c6b['push'](_0x5d8c6b['shift']());}catch(_0x4e4e84){_0x5d8c6b['push'](_0x5d8c6b['shift']());}}}(a166_0x4ce5,0x75996));function a166_0x2d26(_0x8ba882,_0x4a7caa){_0x8ba882=_0x8ba882-0xcb;const _0x4ce529=a166_0x4ce5();let _0x2d26bb=_0x4ce529[_0x8ba882];return _0x2d26bb;}export const CLI_VERSION_POLICY_URL=a166_0x366675(0xd2);
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x1b5098=a167_0x2654;(function(_0x107906,_0x47a44d){const _0x4cc5f8=a167_0x2654,_0x3a8e64=_0x107906();while(!![]){try{const _0x36786b=-parseInt(_0x4cc5f8(0x1f6))/0x1*(-parseInt(_0x4cc5f8(0x20b))/0x2)+parseInt(_0x4cc5f8(0x1df))/0x3*(parseInt(_0x4cc5f8(0x217))/0x4)+parseInt(_0x4cc5f8(0x1d2))/0x5*(parseInt(_0x4cc5f8(0x21d))/0x6)+-parseInt(_0x4cc5f8(0x20f))/0x7+parseInt(_0x4cc5f8(0x1e8))/0x8*(parseInt(_0x4cc5f8(0x232))/0x9)+-parseInt(_0x4cc5f8(0x21f))/0xa+parseInt(_0x4cc5f8(0x1ea))/0xb*(-parseInt(_0x4cc5f8(0x1ec))/0xc);if(_0x36786b===_0x47a44d)break;else _0x3a8e64['push'](_0x3a8e64['shift']());}catch(_0x2eeb5d){_0x3a8e64['push'](_0x3a8e64['shift']());}}}(a167_0x4c97,0x57ad5));function a167_0x4c97(){const _0x3cbda4=['Skip\x20confirmation\x20for\x20high-risk\x20writes','Select\x20app\x20profile\x20by\x20name','target','Confirm\x20destructive\x20action','app','Output\x20format','rabetbase','Show\x20help','Type\x20filter','functionNode','Page\x20size','2RPxLbT','all','dbid','Tags','208348DqURJi','Read\x20value\x20from\x20environment\x20variable','sqlcode','Rabetbase\x20CLI','file','SQL\x20code','Title','dryRun','96BEuqmT','Target\x20path','Config\x20key','Force\x20non-interactive\x20mode\x20(CI)','enable-bff-save','verbose','102RPlkBk','production\x20|\x20daily','1945230rFfPmW','map','Keyword\x20filter','schemas','Reveal\x20sensitive\x20value','remote','confirm','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','File\x20path','reveal','format','Apply\x20to\x20all','non-interactive','Schemas','SQL\x20name','skipImports','sql-name','Force\x20overwrite','Dataset\x20code','2339271glkHFx','@lovrabet/rabetbase-cli','enableBffSave','JSON\x20params','Page\x20number','sqlname','type','global','<expr>','Watch\x20mode','db-id','value','Preview\x20operation\x20without\x20executing','Override\x20appcode','Use\x20project\x20config\x20scope','60195eGXXmC','Use\x20global\x20config\x20scope','datasetcode','json\x20|\x20pretty\x20|\x20compress','yes','Verbose\x20output','watch','appcode','force','Clear','fromEnv','fromEntries','Use\x20remote','303fGSYQs','Environment','operation','dbId','tags','key','help','function-node','string','16NoUOVf','keyword','4301CvYTbk','title','19632xXpZBc','meowKey','boolean','project','description','Skip\x20import\x20generation','sql','env','Operation\x20type','params','496163gPGPoU','clear','sqlName','Record\x20ID','page','output','Read\x20value\x20from\x20stdin','from-env','nonInteractive','skip-imports'];a167_0x4c97=function(){return _0x3cbda4;};return a167_0x4c97();}export const CLI_BIN_NAME=a167_0x1b5098(0x206);export const CLI_DISPLAY_NAME=a167_0x1b5098(0x212);export const NPM_PACKAGE_NAME=a167_0x1b5098(0x233);function a167_0x2654(_0x2e4d8,_0x578e2d){_0x2e4d8=_0x2e4d8-0x1c8;const _0x4c975d=a167_0x4c97();let _0x265412=_0x4c975d[_0x2e4d8];return _0x265412;}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x1d0),'hint':'<code>'},{'name':a167_0x1b5098(0x204),'meowKey':a167_0x1b5098(0x204),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x201),'hint':'<name>'},{'name':a167_0x1b5098(0x1f3),'meowKey':a167_0x1b5098(0x1f3),'type':'string','description':a167_0x1b5098(0x1e0),'hint':a167_0x1b5098(0x21e)},{'name':a167_0x1b5098(0x229),'meowKey':a167_0x1b5098(0x229),'type':'string','description':a167_0x1b5098(0x205),'hint':a167_0x1b5098(0x1d5)},{'name':'jq','meowKey':'jq','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x226),'hint':a167_0x1b5098(0x1cb)},{'name':'dry-run','meowKey':a167_0x1b5098(0x216),'type':'boolean','description':a167_0x1b5098(0x1cf)},{'name':'yes','meowKey':a167_0x1b5098(0x1d6),'type':'boolean','description':a167_0x1b5098(0x200)},{'name':'non-interactive','meowKey':a167_0x1b5098(0x1fe),'type':'boolean','description':a167_0x1b5098(0x21a)},{'name':a167_0x1b5098(0x1ca),'meowKey':a167_0x1b5098(0x1ca),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d3)},{'name':a167_0x1b5098(0x1ef),'meowKey':a167_0x1b5098(0x1ef),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d1)},{'name':'ci','meowKey':'ci','type':a167_0x1b5098(0x1ee),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a167_0x1b5098(0x1e5),'meowKey':a167_0x1b5098(0x1e5),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x207)},{'name':'name','meowKey':'name','type':'string','description':'Name','hidden':!![]},{'name':a167_0x1b5098(0x1eb),'meowKey':a167_0x1b5098(0x1eb),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x215),'hidden':!![]},{'name':a167_0x1b5098(0x1f7),'meowKey':a167_0x1b5098(0x1f7),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1db),'hidden':!![]},{'name':a167_0x1b5098(0x1d8),'meowKey':'watch','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1cc),'hidden':!![]},{'name':a167_0x1b5098(0x1fb),'meowKey':a167_0x1b5098(0x1fb),'type':a167_0x1b5098(0x1e7),'description':'Output\x20path','hidden':!![]},{'name':a167_0x1b5098(0x1f5),'meowKey':a167_0x1b5098(0x1f5),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x235),'hidden':!![]},{'name':'datasetcode','meowKey':a167_0x1b5098(0x1d4),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x231),'hidden':!![]},{'name':a167_0x1b5098(0x20c),'meowKey':a167_0x1b5098(0x20c),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x22a),'hidden':!![]},{'name':a167_0x1b5098(0x21b),'meowKey':a167_0x1b5098(0x234),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a167_0x1b5098(0x1f9),'hidden':!![]},{'name':a167_0x1b5098(0x1c9),'meowKey':'type','type':'string','description':a167_0x1b5098(0x208),'hidden':!![]},{'name':a167_0x1b5098(0x213),'meowKey':'file','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x227),'hidden':!![]},{'name':a167_0x1b5098(0x211),'meowKey':a167_0x1b5098(0x211),'type':'string','description':a167_0x1b5098(0x214),'hidden':!![]},{'name':a167_0x1b5098(0x22f),'meowKey':a167_0x1b5098(0x1f8),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22d),'hidden':!![]},{'name':'sqlname','meowKey':a167_0x1b5098(0x1c8),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22d),'hidden':!![]},{'name':a167_0x1b5098(0x1cd),'meowKey':a167_0x1b5098(0x1e2),'type':a167_0x1b5098(0x1e7),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':a167_0x1b5098(0x20d),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a167_0x1b5098(0x1f0),'meowKey':a167_0x1b5098(0x1f0),'type':'string','description':'Description','hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':'string','description':'Description\x20file','hidden':!![]},{'name':a167_0x1b5098(0x1fa),'meowKey':a167_0x1b5098(0x1fa),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x236),'hidden':!![]},{'name':'pagesize','meowKey':'pagesize','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x20a),'hidden':!![]},{'name':a167_0x1b5098(0x1e9),'meowKey':a167_0x1b5098(0x1e9),'type':'string','description':a167_0x1b5098(0x221),'hidden':!![]},{'name':'code','meowKey':'code','type':'string','description':'Code\x20filter','hidden':!![]},{'name':a167_0x1b5098(0x1f2),'meowKey':a167_0x1b5098(0x1f2),'type':a167_0x1b5098(0x1e7),'description':'SQL\x20string','hidden':!![]},{'name':a167_0x1b5098(0x222),'meowKey':a167_0x1b5098(0x222),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22c),'hidden':!![]},{'name':a167_0x1b5098(0x1e1),'meowKey':a167_0x1b5098(0x1e1),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x1f4),'hidden':!![]},{'name':a167_0x1b5098(0x202),'meowKey':a167_0x1b5098(0x202),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x218),'hidden':!![]},{'name':a167_0x1b5098(0x1ff),'meowKey':a167_0x1b5098(0x22e),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1f1),'hidden':!![]},{'name':'key','meowKey':a167_0x1b5098(0x1e4),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x219),'hidden':!![]},{'name':a167_0x1b5098(0x1ce),'meowKey':a167_0x1b5098(0x1ce),'type':a167_0x1b5098(0x1e7),'description':'Config\x20value','hidden':!![]},{'name':'tags','meowKey':a167_0x1b5098(0x1e3),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x20e),'hidden':!![]},{'name':'stdin','meowKey':'stdin','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1fc),'hidden':!![]},{'name':a167_0x1b5098(0x1fd),'meowKey':a167_0x1b5098(0x1dc),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x210),'hidden':!![]},{'name':a167_0x1b5098(0x228),'meowKey':a167_0x1b5098(0x228),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x223),'hidden':!![]},{'name':a167_0x1b5098(0x1da),'meowKey':a167_0x1b5098(0x1da),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x230),'hidden':!![]},{'name':'confirm','meowKey':a167_0x1b5098(0x225),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x203),'hidden':!![]},{'name':a167_0x1b5098(0x224),'meowKey':'remote','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1de),'hidden':!![]},{'name':a167_0x1b5098(0x21c),'meowKey':a167_0x1b5098(0x21c),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d7),'hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':'string','description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':'string','description':a167_0x1b5098(0x1f4),'hidden':!![]},{'name':a167_0x1b5098(0x1e6),'meowKey':a167_0x1b5098(0x209),'type':a167_0x1b5098(0x1e7),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a167_0x1b5098(0x1d9),a167_0x1b5098(0x204),a167_0x1b5098(0x1f3),a167_0x1b5098(0x229),'jq','dry-run',a167_0x1b5098(0x1d6),a167_0x1b5098(0x22b),'ci']);export function buildMeowFlags(){const _0x843115=a167_0x1b5098;return Object[_0x843115(0x1dd)](GLOBAL_FLAGS[_0x843115(0x220)](_0x58340b=>[_0x58340b[_0x843115(0x1ed)],{'type':_0x58340b[_0x843115(0x1c9)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a168_0xec81(){const _0x3cf756=['2215510PlsiuJ','2IJmSCY','en-US','1169253vRRLIZ','155022PHGCMh','compress','13454KceiNz','243906oJHYug','567693XbfbjT','high-risk-write','1400UuyyTP','104ZcTuyb','59525IMrQGA','10NOLuSl'];a168_0xec81=function(){return _0x3cf756;};return a168_0xec81();}const a168_0xc80119=a168_0x405f;(function(_0x4f9107,_0x3976b7){const _0x12eb00=a168_0x405f,_0x50a9be=_0x4f9107();while(!![]){try{const _0x371565=-parseInt(_0x12eb00(0x1f0))/0x1*(parseInt(_0x12eb00(0x1ea))/0x2)+parseInt(_0x12eb00(0x1f1))/0x3+parseInt(_0x12eb00(0x1e6))/0x4*(parseInt(_0x12eb00(0x1e7))/0x5)+-parseInt(_0x12eb00(0x1ed))/0x6+parseInt(_0x12eb00(0x1ef))/0x7*(-parseInt(_0x12eb00(0x1e5))/0x8)+-parseInt(_0x12eb00(0x1ec))/0x9*(-parseInt(_0x12eb00(0x1e8))/0xa)+parseInt(_0x12eb00(0x1e9))/0xb;if(_0x371565===_0x3976b7)break;else _0x50a9be['push'](_0x50a9be['shift']());}catch(_0x4e9fb3){_0x50a9be['push'](_0x50a9be['shift']());}}}(a168_0xec81,0x36afb));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a168_0xc80119(0x1ee),'locale':a168_0xc80119(0x1eb),'riskLevel':a168_0xc80119(0x1f2),'apiDir':DEFAULT_API_DIR};function a168_0x405f(_0x536489,_0x51ee50){_0x536489=_0x536489-0x1e5;const _0xec81d5=a168_0xec81();let _0x405f89=_0xec81d5[_0x536489];return _0x405f89;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a168_0xc80119(0x1ee);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a169_0x177587=a169_0x2626;(function(_0x2e171a,_0x90e66){const _0x41c96e=a169_0x2626,_0x1440bb=_0x2e171a();while(!![]){try{const _0x3e8269=parseInt(_0x41c96e(0x15e))/0x1*(parseInt(_0x41c96e(0x166))/0x2)+parseInt(_0x41c96e(0x170))/0x3+-parseInt(_0x41c96e(0x16d))/0x4+-parseInt(_0x41c96e(0x160))/0x5+-parseInt(_0x41c96e(0x164))/0x6+parseInt(_0x41c96e(0x168))/0x7*(parseInt(_0x41c96e(0x167))/0x8)+parseInt(_0x41c96e(0x16f))/0x9;if(_0x3e8269===_0x90e66)break;else _0x1440bb['push'](_0x1440bb['shift']());}catch(_0x50ee5c){_0x1440bb['push'](_0x1440bb['shift']());}}}(a169_0x4833,0x720ae));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x19b609){const _0x21550e=a169_0x2626;customApiDomain=_0x19b609?.[_0x21550e(0x16b)],customUserDomain=_0x19b609?.[_0x21550e(0x15f)],customRuntimeDomain=_0x19b609?.[_0x21550e(0x16e)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x177587(0x16a):a169_0x177587(0x15c));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a169_0x177587(0x165):a169_0x177587(0x162));function a169_0x2626(_0x88b7c3,_0x408487){_0x88b7c3=_0x88b7c3-0x15c;const _0x483359=a169_0x4833();let _0x26267d=_0x483359[_0x88b7c3];return _0x26267d;}function a169_0x4833(){const _0x4b86ba=['https://user.lovrabet.com','apiDomain','https://app.lovrabet.com','1527232KCEkqk','runtimeDomain','15019902MOTPLy','30504ilbdYf','https://user-daily.lovrabet.com','/web-app/app/','206OdLVEx','userDomain','3065260sUYrya','https://daily.lovrabet.com','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','5216448cJxGvs','https://api.lovrabet.com','1868dKevKC','1152bOKYyR','22358gyROAZ','trim'];a169_0x4833=function(){return _0x4b86ba;};return a169_0x4833();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x177587(0x163):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a169_0x177587(0x16c):a169_0x177587(0x161);export const getAppBaseUrl=_0xd3253b=>{const _0x20e38a=a169_0x177587,_0x2348bf=encodeURIComponent(_0xd3253b[_0x20e38a(0x169)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x2348bf:getAppDomain()+_0x20e38a(0x15d)+_0x2348bf;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x2be509=a170_0x5d4c;function a170_0x5d4c(_0x25bde4,_0x9466ae){_0x25bde4=_0x25bde4-0x84;const _0x346bb2=a170_0x346b();let _0x5d4cb2=_0x346bb2[_0x25bde4];return _0x5d4cb2;}(function(_0xff6ad8,_0x3f48be){const _0x934f71=a170_0x5d4c,_0x53256d=_0xff6ad8();while(!![]){try{const _0x33c499=-parseInt(_0x934f71(0x8b))/0x1+parseInt(_0x934f71(0x84))/0x2*(-parseInt(_0x934f71(0x85))/0x3)+-parseInt(_0x934f71(0x93))/0x4*(-parseInt(_0x934f71(0x8d))/0x5)+parseInt(_0x934f71(0x89))/0x6*(-parseInt(_0x934f71(0x8e))/0x7)+-parseInt(_0x934f71(0x88))/0x8*(-parseInt(_0x934f71(0x92))/0x9)+parseInt(_0x934f71(0x91))/0xa+parseInt(_0x934f71(0x86))/0xb;if(_0x33c499===_0x3f48be)break;else _0x53256d['push'](_0x53256d['shift']());}catch(_0x2364e9){_0x53256d['push'](_0x53256d['shift']());}}}(a170_0x346b,0x627a8));export const RABETBASE_ENV_VALUES=[a170_0x2be509(0x87),a170_0x2be509(0x90)];export function normalizeEnv(_0x49eb01){const _0x4f9f77=a170_0x2be509;return _0x49eb01===_0x4f9f77(0x8f)?_0x4f9f77(0x87):_0x49eb01;}export function isProduction(_0x5beed1){const _0x56d09a=a170_0x2be509;return normalizeEnv(_0x5beed1)===_0x56d09a(0x87);}export function isDaily(_0xa5b677){return normalizeEnv(_0xa5b677)==='daily';}export function isDev(_0x543fa6){const _0x1499a1=a170_0x2be509,_0x149dd4=normalizeEnv(_0x543fa6);return _0x149dd4===_0x1499a1(0x8c)||_0x149dd4===_0x1499a1(0x8a);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x2be509(0x87));export function getEnv(){return env;}export function initEnv(_0x387134){env=normalizeEnv(_0x387134);}function a170_0x346b(){const _0x4f4198=['6YPnhqH','dev','356585gSnsxH','development','61175uSraVm','3446492wYDgru','online','daily','1846410JyiBOv','1341JNUadd','36JrnCbu','249122FtBfPO','9GDeVCS','12053976XVGvWE','production','12640vIldSL'];a170_0x346b=function(){return _0x4f4198;};return a170_0x346b();}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a171_0x149b(){const _0x5ce56a=['77Lblyrd','1278804YEmWxw','7452888jXFgTX','9ONsoSS','982183gtrBRg','54fyZJGv','483960uexvJq','pretty','3721792BFsAvE','compress','2DnRzqc','556927eZGcGK','4491710vKFTlp','json'];a171_0x149b=function(){return _0x5ce56a;};return a171_0x149b();}const a171_0x5d8cc1=a171_0x45c2;function a171_0x45c2(_0x21567f,_0x4c6918){_0x21567f=_0x21567f-0x15d;const _0x149b89=a171_0x149b();let _0x45c227=_0x149b89[_0x21567f];return _0x45c227;}(function(_0x3a1988,_0x12b39e){const _0x55c666=a171_0x45c2,_0x3a03f0=_0x3a1988();while(!![]){try{const _0x51cc46=-parseInt(_0x55c666(0x161))/0x1*(parseInt(_0x55c666(0x167))/0x2)+-parseInt(_0x55c666(0x15e))/0x3+-parseInt(_0x55c666(0x165))/0x4+-parseInt(_0x55c666(0x163))/0x5+-parseInt(_0x55c666(0x162))/0x6*(-parseInt(_0x55c666(0x168))/0x7)+-parseInt(_0x55c666(0x15f))/0x8*(parseInt(_0x55c666(0x160))/0x9)+-parseInt(_0x55c666(0x169))/0xa*(-parseInt(_0x55c666(0x15d))/0xb);if(_0x51cc46===_0x12b39e)break;else _0x3a03f0['push'](_0x3a03f0['shift']());}catch(_0x383b56){_0x3a03f0['push'](_0x3a03f0['shift']());}}}(a171_0x149b,0x78590));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x5d8cc1(0x16a),a171_0x5d8cc1(0x164),a171_0x5d8cc1(0x166)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a172_0x31254b=a172_0x5aa2;(function(_0x491f96,_0xc8457f){const _0x2895bb=a172_0x5aa2,_0x307ffb=_0x491f96();while(!![]){try{const _0x5bef33=-parseInt(_0x2895bb(0xdb))/0x1*(-parseInt(_0x2895bb(0xdd))/0x2)+-parseInt(_0x2895bb(0xd7))/0x3+-parseInt(_0x2895bb(0xde))/0x4*(parseInt(_0x2895bb(0xdc))/0x5)+-parseInt(_0x2895bb(0xd9))/0x6+-parseInt(_0x2895bb(0xda))/0x7*(parseInt(_0x2895bb(0xd4))/0x8)+-parseInt(_0x2895bb(0xd8))/0x9*(parseInt(_0x2895bb(0xdf))/0xa)+parseInt(_0x2895bb(0xd6))/0xb;if(_0x5bef33===_0xc8457f)break;else _0x307ffb['push'](_0x307ffb['shift']());}catch(_0x328eff){_0x307ffb['push'](_0x307ffb['shift']());}}}(a172_0x3262,0xe9ccf));export const DEFAULT_API_DIR=a172_0x31254b(0xd5);function a172_0x5aa2(_0x25ecbc,_0x22016f){_0x25ecbc=_0x25ecbc-0xd4;const _0x326270=a172_0x3262();let _0x5aa2fb=_0x326270[_0x25ecbc];return _0x5aa2fb;}function a172_0x3262(){const _0x37312f=['49GHsCNR','374047saXQCi','115lipjva','4pFJBhs','135864YroppK','1829530FMASAQ','823536ZzOave','./src/api','32297782MkSdWX','123468TGxoRv','45DCwGgg','1613256qZhjly'];a172_0x3262=function(){return _0x37312f;};return a172_0x3262();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a173_0x6eb73a=a173_0x16ba;function a173_0x16ba(_0x250fb0,_0x196b60){_0x250fb0=_0x250fb0-0xab;const _0x3f70fa=a173_0x3f70();let _0x16ba30=_0x3f70fa[_0x250fb0];return _0x16ba30;}(function(_0x1f6658,_0x1e0f11){const _0x1cb049=a173_0x16ba,_0x343ccd=_0x1f6658();while(!![]){try{const _0x5977f4=-parseInt(_0x1cb049(0xac))/0x1*(parseInt(_0x1cb049(0xae))/0x2)+-parseInt(_0x1cb049(0xaf))/0x3+-parseInt(_0x1cb049(0xab))/0x4+parseInt(_0x1cb049(0xb5))/0x5+parseInt(_0x1cb049(0xb4))/0x6*(-parseInt(_0x1cb049(0xb0))/0x7)+parseInt(_0x1cb049(0xb3))/0x8+parseInt(_0x1cb049(0xb2))/0x9;if(_0x5977f4===_0x1e0f11)break;else _0x343ccd['push'](_0x343ccd['shift']());}catch(_0x326db1){_0x343ccd['push'](_0x343ccd['shift']());}}}(a173_0x3f70,0xc0431));function a173_0x3f70(){const _0x36bd6e=['2FkPcLt','3545346qMNHqr','147UoNSvt','write','13071330NLngNl','6369696ojLtjx','188322Enxxew','7523905uPLums','1019600TqHIMF','870049pQxzVb','high-risk-write'];a173_0x3f70=function(){return _0x36bd6e;};return a173_0x3f70();}export const RISK_LEVEL_VALUES=['read',a173_0x6eb73a(0xb1),a173_0x6eb73a(0xad)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x462951,_0x2923c1){const _0x1ee36b=a174_0x5c85,_0x56a9d7=_0x462951();while(!![]){try{const _0x5c1f22=parseInt(_0x1ee36b(0xc0))/0x1*(parseInt(_0x1ee36b(0xce))/0x2)+parseInt(_0x1ee36b(0xd3))/0x3+-parseInt(_0x1ee36b(0xd0))/0x4+-parseInt(_0x1ee36b(0xd1))/0x5*(parseInt(_0x1ee36b(0xe9))/0x6)+-parseInt(_0x1ee36b(0xca))/0x7+parseInt(_0x1ee36b(0xda))/0x8*(parseInt(_0x1ee36b(0xd9))/0x9)+parseInt(_0x1ee36b(0xc4))/0xa*(parseInt(_0x1ee36b(0xc9))/0xb);if(_0x5c1f22===_0x2923c1)break;else _0x56a9d7['push'](_0x56a9d7['shift']());}catch(_0x79c2e2){_0x56a9d7['push'](_0x56a9d7['shift']());}}}(a174_0x1b79,0xdd596));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x291783){const _0x113210=a174_0x5c85;return typeof _0x291783==='string'&&_0x291783['trim']()?_0x291783[_0x113210(0xc1)]():undefined;}function appProfiles(_0x10c710){const _0x3374a0=a174_0x5c85;return _0x10c710['apps']&&typeof _0x10c710[_0x3374a0(0xe7)]===_0x3374a0(0xd7)?_0x10c710[_0x3374a0(0xe7)]:{};}function a174_0x1b79(){const _0x29981f=['4928205dORbPm','locale','accessKey','APP','object','pageSize','9iFJtJB','3321728RubOpt','format','daily','COOKIE','VERBOSE','find','keys','globalConfig','app','entries','string','RISK_LEVEL','defaultApp','apps','true','143958whVvgH','appcode','527ZKHHpm','trim','cookie','maxRisk','3400120fCpmmx','MAX_RISK','ACCESS_KEY','env','riskLevel','88zURjVV','10919615xZTlxj','ENV','production','write','2022WSFFym','FORMAT','5426748BPkBOL','310ucuedh','inherit'];a174_0x1b79=function(){return _0x29981f;};return a174_0x1b79();}function resolveDefaultAppName(_0x139c1d){const _0x4925fb=stringConfigValue(_0x139c1d['defaultApp']);if(_0x4925fb)return _0x4925fb;return Object['keys'](appProfiles(_0x139c1d))[0x0];}function a174_0x5c85(_0x30c2df,_0x3c36e8){_0x30c2df=_0x30c2df-0xbf;const _0x1b799c=a174_0x1b79();let _0x5c85a0=_0x1b799c[_0x30c2df];return _0x5c85a0;}function resolveTopLevelAppCode(_0x1bcd88){const _0x274743=a174_0x5c85;return stringConfigValue(_0x1bcd88[_0x274743(0xbf)])||stringConfigValue(_0x1bcd88[_0x274743(0xe2)]);}export function resolveAppConfig({raw:_0x3c7828,flags:_0x239ebc,layers:_0x37eef9,readEnv:_0x43eec3}){const _0x4916b1=a174_0x5c85,_0x1717ce=_0x37eef9?.['projectConfig']??{},_0x1d9415=_0x37eef9?.[_0x4916b1(0xe1)]??{},_0x3cf03d=Object[_0x4916b1(0xe0)](_0x1717ce)['length']>0x0,_0x1b657d=!_0x3cf03d||_0x1717ce[_0x4916b1(0xd2)]===!![],_0x5bc5b5=_0x3cf03d?resolveDefaultAppName(_0x1717ce):undefined,_0x7f7654=_0x1b657d?resolveDefaultAppName(_0x1d9415):undefined,_0xe524e4=stringConfigValue(_0x239ebc[_0x4916b1(0xe2)]),_0x203a36=_0x43eec3(_0x4916b1(0xd6)),_0x2d4360={};if(_0x3c7828[_0x4916b1(0xe7)]&&typeof _0x3c7828[_0x4916b1(0xe7)]===_0x4916b1(0xd7))for(const [_0x2ef240,_0x5f1177]of Object[_0x4916b1(0xe3)](_0x3c7828[_0x4916b1(0xe7)])){_0x5f1177&&typeof _0x5f1177===_0x4916b1(0xd7)&&_0x5f1177['appcode']&&(_0x2d4360[_0x2ef240]=_0x5f1177);}const _0x251af2=_0x3c7828[_0x4916b1(0xe6)]||undefined,_0x4641cd=Object[_0x4916b1(0xe0)](_0x2d4360)['length']>0x0,_0x326b85=_0xe524e4||_0x5bc5b5||_0x203a36||_0x7f7654||_0x251af2||undefined,_0x155384=stringConfigValue(_0x239ebc['appcode']),_0x2e1439=_0x155384?Object[_0x4916b1(0xe3)](_0x2d4360)[_0x4916b1(0xdf)](([,_0x1db865])=>_0x1db865?.[_0x4916b1(0xbf)]===_0x155384):undefined,_0x2836fe=_0x2e1439?.[0x0],_0x33e98b=_0x2e1439?.[0x1],_0x414c5e=_0x155384?_0x2836fe:_0x326b85;let _0x33c5b1=_0x414c5e&&_0x2d4360[_0x414c5e]?_0x2d4360[_0x414c5e]:undefined;_0x155384&&_0x33e98b&&(_0x33c5b1=_0x33e98b);const _0x5f39f6=_0x155384?_0x33e98b??_0x33c5b1:_0x33c5b1,_0x3c84bd=!_0xe524e4&&!_0x5bc5b5&&_0x203a36&&_0x414c5e===_0x203a36,_0x2bc681=_0xe524e4||(_0x3c84bd?_0x203a36:undefined)||(_0x155384?_0x2836fe:undefined),_0x5cb3d9=_0x5f39f6?.[_0x4916b1(0xbf)],_0x2e968a=_0x3cf03d?resolveTopLevelAppCode(_0x1717ce):undefined,_0x5b0147=_0x1b657d?resolveTopLevelAppCode(_0x1d9415):undefined,_0x7b98ff=_0xe524e4||_0x5bc5b5?_0x5cb3d9:undefined,_0x1e1ea0=!_0xe524e4&&!_0x5bc5b5?_0x5cb3d9:undefined,_0x2df812=_0x155384||_0x7b98ff||_0x2e968a||_0x1e1ea0||_0x5b0147||undefined,_0x52ade4=_0x3cf03d?stringConfigValue(_0x1717ce[_0x4916b1(0xc7)]):undefined,_0x2d0e3e=_0x1b657d?stringConfigValue(_0x1d9415[_0x4916b1(0xc7)]):undefined,_0x1ed668=_0x239ebc[_0x4916b1(0xc7)]||_0x5f39f6?.['env']||_0x52ade4||_0x43eec3(_0x4916b1(0xcb))||_0x2d0e3e||_0x3c7828[_0x4916b1(0xc7)]||DEFAULT_CONFIG_VALUES[_0x4916b1(0xc7)],_0x641583=_0x5f39f6?.[_0x4916b1(0xd4)]||_0x3c7828['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x597f17=_0x43eec3(_0x4916b1(0xdd))||_0x5f39f6?.[_0x4916b1(0xc2)]||_0x3c7828[_0x4916b1(0xc2)]||undefined,_0x2ae525=_0x43eec3(_0x4916b1(0xc6))||_0x5f39f6?.[_0x4916b1(0xd5)]||_0x3c7828['accessKey']||undefined,_0x104421=_0x239ebc['format']||_0x43eec3(_0x4916b1(0xcf))||_0x5f39f6?.[_0x4916b1(0xdb)]||_0x3c7828[_0x4916b1(0xdb)],_0x3585f6=normalizeLegacyOutputFormat(_0x104421),_0x5e991e=_0x43eec3('PAGE_SIZE')||_0x5f39f6?.['pageSize']||_0x3c7828[_0x4916b1(0xd8)],_0x4d1c8c=_0x5e991e?Number(_0x5e991e)||undefined:undefined,_0x409a39=_0x43eec3(_0x4916b1(0xe5))||_0x43eec3(_0x4916b1(0xc5))||_0x5f39f6?.['riskLevel']||_0x3c7828['riskLevel']||_0x3c7828[_0x4916b1(0xc3)],_0x994b90=_0x409a39==='read'||_0x409a39===_0x4916b1(0xcd)?_0x409a39:DEFAULT_CONFIG_VALUES[_0x4916b1(0xc8)],_0x24181a=_0x43eec3(_0x4916b1(0xde)),_0x43fa4b=_0x24181a==='1'||_0x24181a===_0x4916b1(0xe8),_0x1be851=_0x5f39f6?.['apiDir']||_0x3c7828['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x210850=isDaily(normalizeEnv(String(_0x1ed668)))?_0x4916b1(0xdc):_0x4916b1(0xcc);return{'appCode':typeof _0x2df812===_0x4916b1(0xe4)&&_0x2df812['trim']()?_0x2df812['trim']():undefined,'env':_0x210850,'locale':_0x641583,'cookie':_0x597f17,'accessKey':_0x2ae525,'format':_0x3585f6,'pageSize':_0x4d1c8c,'riskLevel':_0x994b90,'verbose':_0x43fa4b,'apiDir':_0x1be851,'apps':_0x2d4360,'defaultApp':_0x251af2,'currentApp':_0x4641cd?_0x414c5e:undefined,'explicitAppName':_0x2bc681};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d8927,_0x19ff73){const _0x40cbf2=a175_0x1e6b,_0xc3a873=_0x4d8927();while(!![]){try{const _0x3958e7=parseInt(_0x40cbf2(0x172))/0x1*(parseInt(_0x40cbf2(0x168))/0x2)+-parseInt(_0x40cbf2(0x167))/0x3*(-parseInt(_0x40cbf2(0x16e))/0x4)+-parseInt(_0x40cbf2(0x16d))/0x5+parseInt(_0x40cbf2(0x16f))/0x6+-parseInt(_0x40cbf2(0x16c))/0x7+-parseInt(_0x40cbf2(0x165))/0x8*(-parseInt(_0x40cbf2(0x171))/0x9)+parseInt(_0x40cbf2(0x169))/0xa*(-parseInt(_0x40cbf2(0x166))/0xb);if(_0x3958e7===_0x19ff73)break;else _0xc3a873['push'](_0xc3a873['shift']());}catch(_0x48e3ce){_0xc3a873['push'](_0xc3a873['shift']());}}}(a175_0x1ce0,0xbbf41));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x115125){const _0x155a77=a175_0x1e6b,{getCookie:_0xf17587}=await import(_0x155a77(0x16b)),_0x293c7a=_0x115125[_0x155a77(0x16a)]||_0xf17587(),_0x3b5442=_0x293c7a?await getIsSessionValid():![];return{'cookie':_0x293c7a,'isLoggedIn':_0x3b5442,async 'getOrLogin'(){const _0x48c28c=_0x155a77;if(_0x293c7a&&_0x3b5442)return _0x293c7a;throw CliErrors[_0x48c28c(0x170)]();}};}function a175_0x1e6b(_0x5d14c5,_0x31d213){_0x5d14c5=_0x5d14c5-0x165;const _0x1ce0e9=a175_0x1ce0();let _0x1e6b4c=_0x1ce0e9[_0x5d14c5];return _0x1e6b4c;}function a175_0x1ce0(){const _0x1135fa=['99HRqzst','18EdOqEn','1364830ELZXiQ','cookie','../auth/get-cookie.js','7845488BqEdap','1428600SQZxlL','21096vPIMmk','7504860RKWawM','authRequired','2221119mNsZuU','143537uPRCPq','40GqFBol','143LcbnRQ'];a175_0x1ce0=function(){return _0x1135fa;};return a175_0x1ce0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a155_0x1f466b=a155_0x15d2;(function(_0x26b604,_0x3fd252){const _0x3ec529=a155_0x15d2,_0x456294=_0x26b604();while(!![]){try{const _0x2962ac=parseInt(_0x3ec529(0x196))/0x1+-parseInt(_0x3ec529(0x193))/0x2*(parseInt(_0x3ec529(0x180))/0x3)+parseInt(_0x3ec529(0x18a))/0x4*(parseInt(_0x3ec529(0x184))/0x5)+-parseInt(_0x3ec529(0x175))/0x6+parseInt(_0x3ec529(0x198))/0x7+parseInt(_0x3ec529(0x16f))/0x8+-parseInt(_0x3ec529(0x187))/0x9*(-parseInt(_0x3ec529(0x18b))/0xa);if(_0x2962ac===_0x3fd252)break;else _0x456294['push'](_0x456294['shift']());}catch(_0x3bc263){_0x456294['push'](_0x456294['shift']());}}}(a155_0x2068,0xccb91));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=a155_0x1f466b(0x189);export const CONFIG_NAMES=[a155_0x1f466b(0x189),'.lovrabet.json',a155_0x1f466b(0x19f)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a155_0x1f466b(0x185)](_0x3b902f=>_0x3b902f!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1f386e){for(const _0x3fbc78 of CONFIG_NAMES){const _0x254277=resolve(_0x1f386e,_0x3fbc78);if(existsSync(_0x254277))return _0x254277;}return undefined;}function a155_0x15d2(_0x3cb8f4,_0x3fba64){_0x3cb8f4=_0x3cb8f4-0x16e;const _0x206830=a155_0x2068();let _0x15d269=_0x206830[_0x3cb8f4];return _0x15d269;}function a155_0x2068(){const _0x167ede=['silent','pageSize','1082105ynUeVx','filter','status','360fZUARI','message','.rabetbase.json','4mVuNOs','102940iqJPAM','Global','utf8','appcode','project','format','config','.tmp','788638dcBMbs','string','length','297602hlYnkv','accessKey','4520747HzdviF','defaultApp','inherit','Project','error','parse','get','.lovrabetrc','trim','13352352TgpQil','app','warn','data','env','object','4948962UGtVfv','keys','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','locale','migrated','missing','set','cwd','cookie','apiDir','apps','12EDooiW','empty'];a155_0x2068=function(){return _0x167ede;};return a155_0x2068();}export function findProjectRootDirectory(_0x2c8357=process['cwd']()){let _0x4aa1de=resolve(_0x2c8357);const {root:_0x4867bb}=parse(_0x4aa1de),_0x40a92c=homedir();while(!![]){if(resolveConfigPath(_0x4aa1de)){if(_0x4aa1de===_0x40a92c)break;return _0x4aa1de;}if(_0x4aa1de===_0x4867bb||_0x4aa1de===_0x40a92c)break;const _0xd7ba22=dirname(_0x4aa1de);if(_0xd7ba22===_0x4aa1de)break;_0x4aa1de=_0xd7ba22;}return resolve(_0x2c8357);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3153c0){const _0x41a8c1=a155_0x1f466b;if(!existsSync(_0x3153c0))return{'status':'missing'};try{const _0x545fc2=readFileSync(_0x3153c0,{'encoding':_0x41a8c1(0x18d)});if(!_0x545fc2?.[_0x41a8c1(0x16e)]())return{'status':_0x41a8c1(0x181)};const _0x32c502=JSON[_0x41a8c1(0x19d)](_0x545fc2);return{'status':'ok','data':_0x32c502};}catch(_0x47387f){return{'status':_0x41a8c1(0x19c),'message':_0x47387f instanceof Error?_0x47387f[_0x41a8c1(0x188)]:String(_0x47387f)};}}function parseCliConfigJsonFile(_0x30fa3c,_0x4dfeeb,_0x425217){const _0x4e1605=a155_0x1f466b,_0xadc96e=inspectCliConfigJsonFile(_0x30fa3c);if(_0xadc96e[_0x4e1605(0x186)]===_0x4e1605(0x17a)||_0xadc96e[_0x4e1605(0x186)]===_0x4e1605(0x181))return{};if(_0xadc96e[_0x4e1605(0x186)]==='ok')return _0xadc96e[_0x4e1605(0x172)];return _0x4dfeeb===_0x4e1605(0x171)&&_0x425217&&console[_0x4e1605(0x19c)](CLI_BIN_NAME+':\x20'+_0x425217+_0x4e1605(0x177)+_0x30fa3c+'\x0a\x20\x20'+_0xadc96e[_0x4e1605(0x188)]),{};}function normalizeLegacyConfigShape(_0x4168b7){const _0x45cb0b=a155_0x1f466b;if(!_0x4168b7||typeof _0x4168b7!==_0x45cb0b(0x174))return{'config':{},'migrated':![]};const _0x3d5630={..._0x4168b7},_0x8776fe=_0x3d5630[_0x45cb0b(0x17f)]&&typeof _0x3d5630[_0x45cb0b(0x17f)]===_0x45cb0b(0x174)?{..._0x3d5630[_0x45cb0b(0x17f)]}:{},_0x39953f=Object[_0x45cb0b(0x176)](_0x8776fe)[_0x45cb0b(0x195)],_0x3edddc=_0x3d5630[_0x45cb0b(0x18e)]||_0x3d5630[_0x45cb0b(0x170)];let _0x22f08e=![];if(_0x3edddc&&_0x39953f===0x0){const _0x4b800a=typeof _0x3d5630[_0x45cb0b(0x199)]===_0x45cb0b(0x194)&&_0x3d5630[_0x45cb0b(0x199)]['trim']()?_0x3d5630[_0x45cb0b(0x199)]:String(_0x3edddc)[_0x45cb0b(0x16e)]();_0x8776fe[_0x4b800a]={'appcode':String(_0x3edddc)[_0x45cb0b(0x16e)](),..._0x3d5630[_0x45cb0b(0x173)]!=null?{'env':_0x3d5630[_0x45cb0b(0x173)]}:{},..._0x3d5630[_0x45cb0b(0x17e)]!=null?{'apiDir':_0x3d5630['apiDir']}:{},..._0x3d5630[_0x45cb0b(0x17d)]!=null?{'cookie':_0x3d5630['cookie']}:{},..._0x3d5630[_0x45cb0b(0x197)]!=null?{'accessKey':_0x3d5630[_0x45cb0b(0x197)]}:{},..._0x3d5630[_0x45cb0b(0x190)]!=null?{'format':_0x3d5630[_0x45cb0b(0x190)]}:{},..._0x3d5630[_0x45cb0b(0x183)]!=null?{'pageSize':_0x3d5630['pageSize']}:{},..._0x3d5630['riskLevel']!=null?{'riskLevel':_0x3d5630['riskLevel']}:{},..._0x3d5630[_0x45cb0b(0x178)]!=null?{'locale':_0x3d5630[_0x45cb0b(0x178)]}:{}},_0x3d5630[_0x45cb0b(0x17f)]=_0x8776fe;if(!_0x3d5630[_0x45cb0b(0x199)])_0x3d5630[_0x45cb0b(0x199)]=_0x4b800a;_0x22f08e=!![];}return(_0x45cb0b(0x18e)in _0x3d5630||_0x45cb0b(0x170)in _0x3d5630)&&(delete _0x3d5630[_0x45cb0b(0x18e)],delete _0x3d5630['app'],_0x22f08e=!![]),{'config':_0x3d5630,'migrated':_0x22f08e};}function writeNormalizedConfigIfNeeded(_0x970202,_0x2961b5){const _0x321fbe=a155_0x1f466b,_0x1fccdf=JSON['stringify'](_0x2961b5,null,0x2)+'\x0a';if(normalizedWriteCache[_0x321fbe(0x19e)](_0x970202)===_0x1fccdf)return;writeConfigFile(_0x970202,_0x2961b5),normalizedWriteCache[_0x321fbe(0x17b)](_0x970202,_0x1fccdf);}function parseAndNormalizeConfig(_0xfaad51,_0x5ea551,_0x4ad00a){const _0x445804=a155_0x1f466b,_0x2e0596=parseCliConfigJsonFile(_0xfaad51,_0x5ea551,_0x4ad00a),_0x4fbe7d=normalizeLegacyConfigShape(_0x2e0596);if(_0x4fbe7d[_0x445804(0x179)])try{writeNormalizedConfigIfNeeded(_0xfaad51,_0x4fbe7d[_0x445804(0x191)]);}catch{}return _0x4fbe7d[_0x445804(0x191)];}export function loadRawConfigLayers(_0x41ce28){const _0x4ef5fa=a155_0x1f466b;let _0x2fea65={},_0x4a690a={};const _0x26e188=resolveConfigPath(homedir());_0x26e188&&(_0x2fea65=parseAndNormalizeConfig(_0x26e188,'warn',_0x4ef5fa(0x18c)));const _0x528de8=_0x41ce28??findProjectRootDirectory(),_0x339448=resolveConfigPath(_0x528de8);return _0x339448&&(_0x4a690a=parseAndNormalizeConfig(_0x339448,'warn',_0x4ef5fa(0x19b))),{'globalPath':_0x26e188,'projectPath':_0x339448,'globalConfig':_0x2fea65,'projectConfig':_0x4a690a};}const INHERIT_WHITELIST=[a155_0x1f466b(0x17d),a155_0x1f466b(0x197),a155_0x1f466b(0x178),a155_0x1f466b(0x190),'riskLevel','pageSize'];export function mergeRawConfigLayers(_0x4243a3){const _0x4bf08f=a155_0x1f466b,{globalConfig:_0x43b76b,projectConfig:_0x5d9469}=_0x4243a3,_0x3a0a84=Object[_0x4bf08f(0x176)](_0x5d9469)[_0x4bf08f(0x195)]>0x0;if(!_0x3a0a84)return mergeGlobalOnly(_0x43b76b);if(_0x5d9469['inherit']===!![])return mergeFullInherit(_0x43b76b,_0x5d9469);if(_0x5d9469[_0x4bf08f(0x19a)]===![])return mergeIsolated(_0x5d9469);return mergeProjectFirst(_0x43b76b,_0x5d9469);}function mergeGlobalOnly(_0x258a60){const _0x2ea56f=a155_0x1f466b,_0x1b5ee9={..._0x258a60},_0x3a9761=_0x258a60[_0x2ea56f(0x17f)]&&typeof _0x258a60[_0x2ea56f(0x17f)]===_0x2ea56f(0x174)?_0x258a60[_0x2ea56f(0x17f)]:{};if(Object[_0x2ea56f(0x176)](_0x3a9761)[_0x2ea56f(0x195)]>0x0)_0x1b5ee9[_0x2ea56f(0x17f)]=_0x3a9761;if(_0x258a60[_0x2ea56f(0x199)])_0x1b5ee9[_0x2ea56f(0x199)]=_0x258a60['defaultApp'];else{const _0x24cf8f=Object['keys'](_0x3a9761);if(_0x24cf8f[_0x2ea56f(0x195)]>0x0)_0x1b5ee9[_0x2ea56f(0x199)]=_0x24cf8f[0x0];}return _0x1b5ee9;}function mergeIsolated(_0x4983e6){const _0x5c1fa7=a155_0x1f466b,_0x57f5d7={..._0x4983e6};delete _0x57f5d7[_0x5c1fa7(0x19a)];const _0x51b5d7=_0x4983e6[_0x5c1fa7(0x17f)]&&typeof _0x4983e6[_0x5c1fa7(0x17f)]===_0x5c1fa7(0x174)?_0x4983e6[_0x5c1fa7(0x17f)]:{};Object[_0x5c1fa7(0x176)](_0x51b5d7)['length']>0x0?_0x57f5d7[_0x5c1fa7(0x17f)]=_0x51b5d7:delete _0x57f5d7['apps'];if(_0x5c1fa7(0x199)in _0x4983e6)_0x57f5d7[_0x5c1fa7(0x199)]=_0x4983e6[_0x5c1fa7(0x199)];else Object['keys'](_0x51b5d7)[_0x5c1fa7(0x195)]>0x0?_0x57f5d7[_0x5c1fa7(0x199)]=Object['keys'](_0x51b5d7)[0x0]:delete _0x57f5d7[_0x5c1fa7(0x199)];return _0x57f5d7;}function mergeProjectFirst(_0x3c6dcb,_0x2c261f){const _0x3edb3d=a155_0x1f466b,_0x148135={..._0x2c261f};delete _0x148135[_0x3edb3d(0x19a)];for(const _0xca8520 of INHERIT_WHITELIST){!(_0xca8520 in _0x148135)&&_0xca8520 in _0x3c6dcb&&(_0x148135[_0xca8520]=_0x3c6dcb[_0xca8520]);}const _0x2aa853=_0x2c261f[_0x3edb3d(0x17f)]&&typeof _0x2c261f['apps']==='object'?_0x2c261f[_0x3edb3d(0x17f)]:{};Object[_0x3edb3d(0x176)](_0x2aa853)[_0x3edb3d(0x195)]>0x0?_0x148135[_0x3edb3d(0x17f)]=_0x2aa853:delete _0x148135[_0x3edb3d(0x17f)];if(_0x3edb3d(0x199)in _0x2c261f)_0x148135['defaultApp']=_0x2c261f[_0x3edb3d(0x199)];else Object[_0x3edb3d(0x176)](_0x2aa853)[_0x3edb3d(0x195)]>0x0?_0x148135[_0x3edb3d(0x199)]=Object['keys'](_0x2aa853)[0x0]:delete _0x148135['defaultApp'];return _0x148135;}function mergeFullInherit(_0x4c7324,_0x1c47ed){const _0x125075=a155_0x1f466b,_0x1d93fb=_0x4c7324['apps']&&typeof _0x4c7324[_0x125075(0x17f)]===_0x125075(0x174)?_0x4c7324[_0x125075(0x17f)]:{},_0x5d879a=_0x1c47ed[_0x125075(0x17f)]&&typeof _0x1c47ed[_0x125075(0x17f)]===_0x125075(0x174)?_0x1c47ed[_0x125075(0x17f)]:{},_0x46671e={..._0x1d93fb,..._0x5d879a},_0x2d6d8a={..._0x4c7324,..._0x1c47ed};delete _0x2d6d8a[_0x125075(0x19a)];if(Object[_0x125075(0x176)](_0x46671e)[_0x125075(0x195)]>0x0)_0x2d6d8a['apps']=_0x46671e;if(_0x125075(0x199)in _0x1c47ed)_0x2d6d8a[_0x125075(0x199)]=_0x1c47ed[_0x125075(0x199)];else{if(Object[_0x125075(0x176)](_0x5d879a)['length']>0x0)_0x2d6d8a[_0x125075(0x199)]=Object[_0x125075(0x176)](_0x5d879a)[0x0];else{if(_0x4c7324[_0x125075(0x199)])_0x2d6d8a[_0x125075(0x199)]=_0x4c7324['defaultApp'];else{const _0x32f591=Object[_0x125075(0x176)](_0x1d93fb);if(_0x32f591[_0x125075(0x195)]>0x0)_0x2d6d8a[_0x125075(0x199)]=_0x32f591[0x0];}}}return _0x2d6d8a;}export function readRawConfigWithLayers(_0x48aedf){const _0x5dc4b5=loadRawConfigLayers(_0x48aedf);return{'config':mergeRawConfigLayers(_0x5dc4b5),'layers':_0x5dc4b5};}export function readRawConfig(_0x4f1053){return mergeRawConfigLayers(loadRawConfigLayers(_0x4f1053));}export function readConfigFile(_0x3120c8){const _0x3708cd=a155_0x1f466b;return parseAndNormalizeConfig(_0x3120c8,_0x3708cd(0x182));}export function writeConfigFile(_0x530850,_0x32685c){const _0x564a41=a155_0x1f466b,_0x4d0157=dirname(_0x530850);!existsSync(_0x4d0157)&&mkdirSync(_0x4d0157,{'recursive':!![]});const _0x39b527=_0x530850+_0x564a41(0x192);try{writeFileSync(_0x39b527,JSON['stringify'](_0x32685c,null,0x2)+'\x0a',{'encoding':_0x564a41(0x18d),'mode':0x180}),renameSync(_0x39b527,_0x530850);}catch(_0x2e21c5){try{unlinkSync(_0x39b527);}catch{}throw _0x2e21c5;}}export function resolveWriteConfigPath(_0x225015){const _0x27803a=a155_0x1f466b,_0x4a0c00=_0x225015===_0x27803a(0x18f)?process[_0x27803a(0x17c)]():homedir(),_0x2a412e=resolveConfigPath(_0x4a0c00);return _0x2a412e??resolve(_0x4a0c00,NEW_CONFIG_NAME);}
|
|
1
|
+
const a176_0x4a5579=a176_0xa147;(function(_0x4a1199,_0x3733c1){const _0x4022b0=a176_0xa147,_0x154b1b=_0x4a1199();while(!![]){try{const _0x30b3ed=-parseInt(_0x4022b0(0xa7))/0x1+-parseInt(_0x4022b0(0x8d))/0x2+-parseInt(_0x4022b0(0x9b))/0x3+parseInt(_0x4022b0(0x96))/0x4+parseInt(_0x4022b0(0x95))/0x5+parseInt(_0x4022b0(0xa8))/0x6*(parseInt(_0x4022b0(0xb8))/0x7)+-parseInt(_0x4022b0(0x92))/0x8*(parseInt(_0x4022b0(0xbc))/0x9);if(_0x30b3ed===_0x3733c1)break;else _0x154b1b['push'](_0x154b1b['shift']());}catch(_0x5debd4){_0x154b1b['push'](_0x154b1b['shift']());}}}(a176_0x1a5f,0x62eb3));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=a176_0x4a5579(0xb3);export const CONFIG_NAMES=[a176_0x4a5579(0xb3),a176_0x4a5579(0x8e),a176_0x4a5579(0xba)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x4a5579(0xa6)](_0x302555=>_0x302555!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();function a176_0xa147(_0x8ee1cd,_0xe2ee8b){_0x8ee1cd=_0x8ee1cd-0x8d;const _0x1a5f73=a176_0x1a5f();let _0xa1479e=_0x1a5f73[_0x8ee1cd];return _0xa1479e;}export function resolveConfigPath(_0x2fe4cf){for(const _0x2c1552 of CONFIG_NAMES){const _0xba4dc4=resolve(_0x2fe4cf,_0x2c1552);if(existsSync(_0xba4dc4))return _0xba4dc4;}return undefined;}export function findProjectRootDirectory(_0x251951=process['cwd']()){let _0x2d4996=resolve(_0x251951);const {root:_0x15bda2}=parse(_0x2d4996),_0x56fa83=homedir();while(!![]){if(resolveConfigPath(_0x2d4996)){if(_0x2d4996===_0x56fa83)break;return _0x2d4996;}if(_0x2d4996===_0x15bda2||_0x2d4996===_0x56fa83)break;const _0x2010a4=dirname(_0x2d4996);if(_0x2010a4===_0x2d4996)break;_0x2d4996=_0x2010a4;}return resolve(_0x251951);}export function getProjectConfigPath(){const _0x45d2ba=a176_0x4a5579;return resolveConfigPath(process[_0x45d2ba(0x8f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2a5af6){const _0x3137c7=a176_0x4a5579;if(!existsSync(_0x2a5af6))return{'status':_0x3137c7(0xa3)};try{const _0x1401f3=readFileSync(_0x2a5af6,{'encoding':_0x3137c7(0x94)});if(!_0x1401f3?.[_0x3137c7(0x93)]())return{'status':'empty'};const _0x42aac1=JSON['parse'](_0x1401f3);return{'status':'ok','data':_0x42aac1};}catch(_0x3ecafb){return{'status':_0x3137c7(0x9d),'message':_0x3ecafb instanceof Error?_0x3ecafb[_0x3137c7(0xa0)]:String(_0x3ecafb)};}}function parseCliConfigJsonFile(_0x3acbcf,_0x20c79a,_0x21a410){const _0x43cc97=a176_0x4a5579,_0x5d238d=inspectCliConfigJsonFile(_0x3acbcf);if(_0x5d238d[_0x43cc97(0xad)]===_0x43cc97(0xa3)||_0x5d238d[_0x43cc97(0xad)]===_0x43cc97(0xbb))return{};if(_0x5d238d[_0x43cc97(0xad)]==='ok')return _0x5d238d[_0x43cc97(0xbe)];return _0x20c79a==='warn'&&_0x21a410&&console[_0x43cc97(0x9d)](CLI_BIN_NAME+':\x20'+_0x21a410+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x3acbcf+_0x43cc97(0xaf)+_0x5d238d[_0x43cc97(0xa0)]),{};}function normalizeLegacyConfigShape(_0x17061e){const _0x4ae633=a176_0x4a5579;if(!_0x17061e||typeof _0x17061e!==_0x4ae633(0x98))return{'config':{},'migrated':![]};const _0x5de381={..._0x17061e},_0x469f02=_0x5de381[_0x4ae633(0xa5)]&&typeof _0x5de381[_0x4ae633(0xa5)]===_0x4ae633(0x98)?{..._0x5de381[_0x4ae633(0xa5)]}:{},_0x135928=Object[_0x4ae633(0x9e)](_0x469f02)[_0x4ae633(0x90)],_0x1646ed=_0x5de381[_0x4ae633(0xbd)]||_0x5de381[_0x4ae633(0xb9)];let _0x367db2=![];if(_0x1646ed&&_0x135928===0x0){const _0x39a4ac=typeof _0x5de381[_0x4ae633(0xb1)]===_0x4ae633(0xb2)&&_0x5de381[_0x4ae633(0xb1)][_0x4ae633(0x93)]()?_0x5de381['defaultApp']:String(_0x1646ed)[_0x4ae633(0x93)]();_0x469f02[_0x39a4ac]={'appcode':String(_0x1646ed)[_0x4ae633(0x93)](),..._0x5de381[_0x4ae633(0x91)]!=null?{'env':_0x5de381[_0x4ae633(0x91)]}:{},..._0x5de381['apiDir']!=null?{'apiDir':_0x5de381[_0x4ae633(0xac)]}:{},..._0x5de381[_0x4ae633(0xab)]!=null?{'cookie':_0x5de381[_0x4ae633(0xab)]}:{},..._0x5de381[_0x4ae633(0xb7)]!=null?{'accessKey':_0x5de381['accessKey']}:{},..._0x5de381['format']!=null?{'format':_0x5de381[_0x4ae633(0xb4)]}:{},..._0x5de381['pageSize']!=null?{'pageSize':_0x5de381[_0x4ae633(0xb5)]}:{},..._0x5de381['riskLevel']!=null?{'riskLevel':_0x5de381[_0x4ae633(0xa4)]}:{},..._0x5de381[_0x4ae633(0x9c)]!=null?{'locale':_0x5de381[_0x4ae633(0x9c)]}:{}},_0x5de381[_0x4ae633(0xa5)]=_0x469f02;if(!_0x5de381[_0x4ae633(0xb1)])_0x5de381[_0x4ae633(0xb1)]=_0x39a4ac;_0x367db2=!![];}return(_0x4ae633(0xbd)in _0x5de381||'app'in _0x5de381)&&(delete _0x5de381[_0x4ae633(0xbd)],delete _0x5de381[_0x4ae633(0xb9)],_0x367db2=!![]),{'config':_0x5de381,'migrated':_0x367db2};}function a176_0x1a5f(){const _0x202da2=['utf8','3471820HJspsq','1288860cszKWQ','Project','object','set','inherit','446103ZNSbuk','locale','error','keys','migrated','message','.tmp','config','missing','riskLevel','apps','filter','277055iKJSzq','1802418yFsQpz','project','get','cookie','apiDir','status','silent','\x0a\x20\x20','warn','defaultApp','string','.rabetbase.json','format','pageSize','stringify','accessKey','14YgYRpO','app','.lovrabetrc','empty','9wGDrpl','appcode','data','Global','993030byZZyf','.lovrabet.json','cwd','length','env','2319544PVHbfk','trim'];a176_0x1a5f=function(){return _0x202da2;};return a176_0x1a5f();}function writeNormalizedConfigIfNeeded(_0x4d5d76,_0x5e2594){const _0x3c01c5=a176_0x4a5579,_0x1b815c=JSON[_0x3c01c5(0xb6)](_0x5e2594,null,0x2)+'\x0a';if(normalizedWriteCache[_0x3c01c5(0xaa)](_0x4d5d76)===_0x1b815c)return;writeConfigFile(_0x4d5d76,_0x5e2594),normalizedWriteCache[_0x3c01c5(0x99)](_0x4d5d76,_0x1b815c);}function parseAndNormalizeConfig(_0x43e851,_0x131de4,_0x3e2371){const _0x325fb1=a176_0x4a5579,_0x911059=parseCliConfigJsonFile(_0x43e851,_0x131de4,_0x3e2371),_0x2d31b2=normalizeLegacyConfigShape(_0x911059);if(_0x2d31b2[_0x325fb1(0x9f)])try{writeNormalizedConfigIfNeeded(_0x43e851,_0x2d31b2[_0x325fb1(0xa2)]);}catch{}return _0x2d31b2[_0x325fb1(0xa2)];}export function loadRawConfigLayers(_0x22abd5){const _0x46fbef=a176_0x4a5579;let _0x33feb4={},_0x5ed582={};const _0x48135d=resolveConfigPath(homedir());_0x48135d&&(_0x33feb4=parseAndNormalizeConfig(_0x48135d,_0x46fbef(0xb0),_0x46fbef(0xbf)));const _0x1203cb=_0x22abd5??findProjectRootDirectory(),_0x47473a=resolveConfigPath(_0x1203cb);return _0x47473a&&(_0x5ed582=parseAndNormalizeConfig(_0x47473a,'warn',_0x46fbef(0x97))),{'globalPath':_0x48135d,'projectPath':_0x47473a,'globalConfig':_0x33feb4,'projectConfig':_0x5ed582};}const INHERIT_WHITELIST=[a176_0x4a5579(0xab),a176_0x4a5579(0xb7),a176_0x4a5579(0x9c),'format',a176_0x4a5579(0xa4),a176_0x4a5579(0xb5)];export function mergeRawConfigLayers(_0x54517a){const _0x382b90=a176_0x4a5579,{globalConfig:_0x57e3e3,projectConfig:_0x3981fc}=_0x54517a,_0x3b56a3=Object[_0x382b90(0x9e)](_0x3981fc)['length']>0x0;if(!_0x3b56a3)return mergeGlobalOnly(_0x57e3e3);if(_0x3981fc[_0x382b90(0x9a)]===!![])return mergeFullInherit(_0x57e3e3,_0x3981fc);if(_0x3981fc[_0x382b90(0x9a)]===![])return mergeIsolated(_0x3981fc);return mergeProjectFirst(_0x57e3e3,_0x3981fc);}function mergeGlobalOnly(_0x3f8aa8){const _0x4eb69a=a176_0x4a5579,_0x4949f9={..._0x3f8aa8},_0x52028e=_0x3f8aa8[_0x4eb69a(0xa5)]&&typeof _0x3f8aa8['apps']===_0x4eb69a(0x98)?_0x3f8aa8[_0x4eb69a(0xa5)]:{};if(Object[_0x4eb69a(0x9e)](_0x52028e)[_0x4eb69a(0x90)]>0x0)_0x4949f9[_0x4eb69a(0xa5)]=_0x52028e;if(_0x3f8aa8[_0x4eb69a(0xb1)])_0x4949f9[_0x4eb69a(0xb1)]=_0x3f8aa8[_0x4eb69a(0xb1)];else{const _0x2a0d8d=Object[_0x4eb69a(0x9e)](_0x52028e);if(_0x2a0d8d[_0x4eb69a(0x90)]>0x0)_0x4949f9['defaultApp']=_0x2a0d8d[0x0];}return _0x4949f9;}function mergeIsolated(_0xb3f117){const _0x135b75=a176_0x4a5579,_0x224e8e={..._0xb3f117};delete _0x224e8e[_0x135b75(0x9a)];const _0x21b8a4=_0xb3f117[_0x135b75(0xa5)]&&typeof _0xb3f117[_0x135b75(0xa5)]===_0x135b75(0x98)?_0xb3f117[_0x135b75(0xa5)]:{};Object[_0x135b75(0x9e)](_0x21b8a4)[_0x135b75(0x90)]>0x0?_0x224e8e[_0x135b75(0xa5)]=_0x21b8a4:delete _0x224e8e[_0x135b75(0xa5)];if(_0x135b75(0xb1)in _0xb3f117)_0x224e8e[_0x135b75(0xb1)]=_0xb3f117['defaultApp'];else Object[_0x135b75(0x9e)](_0x21b8a4)['length']>0x0?_0x224e8e[_0x135b75(0xb1)]=Object[_0x135b75(0x9e)](_0x21b8a4)[0x0]:delete _0x224e8e[_0x135b75(0xb1)];return _0x224e8e;}function mergeProjectFirst(_0x9eaab4,_0x4c6ba5){const _0x22e2d3=a176_0x4a5579,_0x322fea={..._0x4c6ba5};delete _0x322fea[_0x22e2d3(0x9a)];for(const _0x3cc5cd of INHERIT_WHITELIST){!(_0x3cc5cd in _0x322fea)&&_0x3cc5cd in _0x9eaab4&&(_0x322fea[_0x3cc5cd]=_0x9eaab4[_0x3cc5cd]);}const _0x31a05b=_0x4c6ba5[_0x22e2d3(0xa5)]&&typeof _0x4c6ba5['apps']===_0x22e2d3(0x98)?_0x4c6ba5[_0x22e2d3(0xa5)]:{};Object['keys'](_0x31a05b)[_0x22e2d3(0x90)]>0x0?_0x322fea[_0x22e2d3(0xa5)]=_0x31a05b:delete _0x322fea['apps'];if(_0x22e2d3(0xb1)in _0x4c6ba5)_0x322fea[_0x22e2d3(0xb1)]=_0x4c6ba5[_0x22e2d3(0xb1)];else Object[_0x22e2d3(0x9e)](_0x31a05b)['length']>0x0?_0x322fea['defaultApp']=Object[_0x22e2d3(0x9e)](_0x31a05b)[0x0]:delete _0x322fea[_0x22e2d3(0xb1)];return _0x322fea;}function mergeFullInherit(_0x4e1720,_0x7a0160){const _0x40d117=a176_0x4a5579,_0x536a5d=_0x4e1720[_0x40d117(0xa5)]&&typeof _0x4e1720[_0x40d117(0xa5)]==='object'?_0x4e1720[_0x40d117(0xa5)]:{},_0xe5f0fc=_0x7a0160[_0x40d117(0xa5)]&&typeof _0x7a0160[_0x40d117(0xa5)]===_0x40d117(0x98)?_0x7a0160[_0x40d117(0xa5)]:{},_0x40db83={..._0x536a5d,..._0xe5f0fc},_0x10a16e={..._0x4e1720,..._0x7a0160};delete _0x10a16e['inherit'];if(Object[_0x40d117(0x9e)](_0x40db83)[_0x40d117(0x90)]>0x0)_0x10a16e[_0x40d117(0xa5)]=_0x40db83;if('defaultApp'in _0x7a0160)_0x10a16e['defaultApp']=_0x7a0160['defaultApp'];else{if(Object[_0x40d117(0x9e)](_0xe5f0fc)[_0x40d117(0x90)]>0x0)_0x10a16e[_0x40d117(0xb1)]=Object[_0x40d117(0x9e)](_0xe5f0fc)[0x0];else{if(_0x4e1720[_0x40d117(0xb1)])_0x10a16e['defaultApp']=_0x4e1720['defaultApp'];else{const _0x209eb3=Object[_0x40d117(0x9e)](_0x536a5d);if(_0x209eb3['length']>0x0)_0x10a16e['defaultApp']=_0x209eb3[0x0];}}}return _0x10a16e;}export function readRawConfigWithLayers(_0x1ec4f3){const _0x3f3adc=loadRawConfigLayers(_0x1ec4f3);return{'config':mergeRawConfigLayers(_0x3f3adc),'layers':_0x3f3adc};}export function readRawConfig(_0xc203e){return mergeRawConfigLayers(loadRawConfigLayers(_0xc203e));}export function readConfigFile(_0x4e199a){const _0x431b33=a176_0x4a5579;return parseAndNormalizeConfig(_0x4e199a,_0x431b33(0xae));}export function writeConfigFile(_0x27fd9e,_0x41d10c){const _0x1f0d02=a176_0x4a5579,_0x5efb5a=dirname(_0x27fd9e);!existsSync(_0x5efb5a)&&mkdirSync(_0x5efb5a,{'recursive':!![]});const _0x284e40=_0x27fd9e+_0x1f0d02(0xa1);try{writeFileSync(_0x284e40,JSON[_0x1f0d02(0xb6)](_0x41d10c,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x284e40,_0x27fd9e);}catch(_0x3de44b){try{unlinkSync(_0x284e40);}catch{}throw _0x3de44b;}}export function resolveWriteConfigPath(_0x1f0b76){const _0xe18f38=a176_0x4a5579,_0x3fcf=_0x1f0b76===_0xe18f38(0xa9)?process[_0xe18f38(0x8f)]():homedir(),_0x108dbf=resolveConfigPath(_0x3fcf);return _0x108dbf??resolve(_0x3fcf,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x9871a=a177_0x1b6b;function a177_0x1b6b(_0x539976,_0x44f031){_0x539976=_0x539976-0x12b;const _0x4b62ff=a177_0x4b62();let _0x1b6bf7=_0x4b62ff[_0x539976];return _0x1b6bf7;}(function(_0x40d704,_0x26f214){const _0x4e2699=a177_0x1b6b,_0x26b541=_0x40d704();while(!![]){try{const _0x3c8dbc=-parseInt(_0x4e2699(0x136))/0x1+parseInt(_0x4e2699(0x135))/0x2*(parseInt(_0x4e2699(0x140))/0x3)+-parseInt(_0x4e2699(0x148))/0x4*(parseInt(_0x4e2699(0x13e))/0x5)+parseInt(_0x4e2699(0x13c))/0x6+-parseInt(_0x4e2699(0x13f))/0x7+parseInt(_0x4e2699(0x12c))/0x8+parseInt(_0x4e2699(0x130))/0x9*(parseInt(_0x4e2699(0x154))/0xa);if(_0x3c8dbc===_0x26f214)break;else _0x26b541['push'](_0x26b541['shift']());}catch(_0x35631e){_0x26b541['push'](_0x26b541['shift']());}}}(a177_0x4b62,0xe041d));function a177_0x4b62(){const _0x79f0db=['9psrcWu','project','string','defaultApp','app','826556bIzSpa','1617962DCPCLm','https://g.lovrabet.com/dist/lovrabet-skill','filter','apiDir','apiDomain','template_base_url','9039048ZFMjaC','object','6190RGwLAx','7730912kbjTVh','6WBwYlQ','find','userDomain','argv','projectConfig','-api.ts','./constant/env.js','./constant/domain.js','776YZoneP','env','apps','setLogPath','join','globalConfig','appcode','values','merged','keys','cwd','trim','1845590JyAOIs','api.ts','10907872FGExUr','entries','replace','./utils/is-non-interactive.js'];a177_0x4b62=function(){return _0x79f0db;};return a177_0x4b62();}import{resolve}from'node:path';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(_0x36a536){return process.env[`RABETBASE_${_0x36a536}`]||process.env[`LOVRABET_${_0x36a536}`]||undefined;}export async function createContext(_0x3e1540){const _0x26c04a=a177_0x1b6b,{config:_0x4cd8f5,layers:_0x635933}=readRawConfigWithLayers(),_0x2339d8=buildConfig(_0x4cd8f5,_0x3e1540,_0x635933),{initEnv:_0x35d44f}=await import(_0x26c04a(0x146));if(_0x2339d8[_0x26c04a(0x149)])_0x35d44f(_0x2339d8['env']);else _0x3e1540['env']&&typeof _0x3e1540[_0x26c04a(0x149)]===_0x26c04a(0x132)&&_0x35d44f(_0x3e1540[_0x26c04a(0x149)]);const {initDomains:_0x3655b3,getUserDomain:_0x1e01f9,getApiDomain:_0x223219}=await import(_0x26c04a(0x147));_0x3655b3({'apiDomain':_0x4cd8f5[_0x26c04a(0x13a)]||undefined,'userDomain':_0x4cd8f5[_0x26c04a(0x142)]||undefined,'runtimeDomain':_0x4cd8f5['runtimeDomain']||undefined});const _0x4bd849={'apiDomain':_0x223219(),'userDomain':_0x1e01f9()},_0x7aabe1=await buildAuth(_0x2339d8);logger[_0x26c04a(0x14b)](process[_0x26c04a(0x152)]());const _0x4aa06b=(CLI_BIN_NAME+'\x20'+process[_0x26c04a(0x143)]['slice'](0x2)[_0x26c04a(0x14c)]('\x20'))[_0x26c04a(0x153)]();logger['setRawCommand'](_0x4aa06b);const {isNonInteractive:_0x37a592}=await import(_0x26c04a(0x12f)),_0x5f3557=_0x37a592(_0x3e1540);return{'config':_0x2339d8,'auth':_0x7aabe1,'logger':logger,'env':_0x4bd849,'nonInteractive':_0x5f3557};}export function buildConfigFromFlags(_0x1b4647){const {config:_0x147f87,layers:_0x287136}=readRawConfigWithLayers();return buildConfig(_0x147f87,_0x1b4647,_0x287136);}export function getConfigAppCode(_0x477581){const _0x34265a=a177_0x1b6b,_0x10dd5d=readRawConfig(_0x477581);if(_0x10dd5d[_0x34265a(0x14a)]&&typeof _0x10dd5d[_0x34265a(0x14a)]===_0x34265a(0x13d)){const _0xf748c5=_0x10dd5d[_0x34265a(0x133)];if(_0xf748c5&&_0x10dd5d[_0x34265a(0x14a)][_0xf748c5]?.[_0x34265a(0x14e)])return String(_0x10dd5d[_0x34265a(0x14a)][_0xf748c5][_0x34265a(0x14e)])[_0x34265a(0x153)]();const _0x30a31a=Object[_0x34265a(0x14f)](_0x10dd5d[_0x34265a(0x14a)])[0x0];if(_0x30a31a?.['appcode'])return String(_0x30a31a[_0x34265a(0x14e)])[_0x34265a(0x153)]();}const _0x60e715=_0x10dd5d['appcode']||_0x10dd5d[_0x34265a(0x134)];if(typeof _0x60e715!==_0x34265a(0x132)||_0x60e715[_0x34265a(0x153)]()==='')return undefined;return _0x60e715['trim']();}export function getMultiAppConfigs(_0x5a8992=a177_0x9871a(0x131),_0x5c36ae){const _0x570559=a177_0x9871a,_0xafbace=loadRawConfigLayers(_0x5c36ae);let _0x35ee8f,_0x60eba;if(_0x5a8992===_0x570559(0x150)){const _0x598755=_0xafbace[_0x570559(0x14d)]['apps']&&typeof _0xafbace[_0x570559(0x14d)]['apps']===_0x570559(0x13d)?_0xafbace[_0x570559(0x14d)][_0x570559(0x14a)]:{},_0x487d10=_0xafbace[_0x570559(0x144)][_0x570559(0x14a)]&&typeof _0xafbace[_0x570559(0x144)][_0x570559(0x14a)]===_0x570559(0x13d)?_0xafbace[_0x570559(0x144)]['apps']:{};_0x35ee8f={..._0x598755,..._0x487d10};const _0x247cc4=readRawConfig(_0x5c36ae);_0x60eba=_0x247cc4[_0x570559(0x133)];}else _0x35ee8f=_0xafbace[_0x570559(0x144)][_0x570559(0x14a)],_0x60eba=_0xafbace[_0x570559(0x144)]['defaultApp'];if(!_0x35ee8f||typeof _0x35ee8f!==_0x570559(0x13d)||Object[_0x570559(0x151)](_0x35ee8f)['length']===0x0)return null;return Object[_0x570559(0x12d)](_0x35ee8f)['map'](([_0x58cd95,_0x18e1c1])=>({'name':_0x58cd95,'appcode':_0x18e1c1?.[_0x570559(0x14e)]||'','isDefault':_0x58cd95===_0x60eba,'env':_0x18e1c1?.[_0x570559(0x149)],'apiDir':_0x18e1c1?.[_0x570559(0x139)],'cookie':_0x18e1c1?.['cookie']||undefined}))[_0x570559(0x138)](_0x4456a0=>_0x4456a0['appcode']);}export function getTemplateBaseUrl(_0x188c06){const _0x2988ae=a177_0x9871a,_0x304e9c=readRawConfig(_0x188c06);if(_0x304e9c['template_base_url']&&typeof _0x304e9c[_0x2988ae(0x13b)]==='string')return _0x304e9c[_0x2988ae(0x13b)][_0x2988ae(0x12e)](/\/$/,'');return _0x2988ae(0x137);}function buildConfig(_0x3b76b7,_0x2d1eec,_0x59c886){return{...resolveAppConfig({'raw':_0x3b76b7,'flags':_0x2d1eec,'layers':_0x59c886,'readEnv':env}),'raw':_0x3b76b7};}export function resolveApiFilePath(_0x18b10f,_0x1597d4){const _0x2498b9=a177_0x9871a,_0x5cfb22=resolve(process[_0x2498b9(0x152)](),_0x18b10f),_0x255962=resolve(_0x5cfb22,_0x2498b9(0x12b));if(!_0x1597d4)return _0x255962;const _0x229b8d=readRawConfig(),_0xacaab4=_0x229b8d[_0x2498b9(0x14a)]&&typeof _0x229b8d['apps']===_0x2498b9(0x13d)?_0x229b8d[_0x2498b9(0x14a)]:{},_0x928b02=Object[_0x2498b9(0x12d)](_0xacaab4)[_0x2498b9(0x141)](([,_0x23fd2c])=>_0x23fd2c?.['appcode']===_0x1597d4);if(!_0x928b02)return _0x255962;const [_0x358cb1,_0x24776d]=_0x928b02,_0x3074e6=typeof _0x229b8d[_0x2498b9(0x133)]===_0x2498b9(0x132)?_0x229b8d[_0x2498b9(0x133)]:undefined;if(_0x24776d?.['apiDir'])return _0x255962;if(_0x3074e6&&_0x358cb1!==_0x3074e6)return resolve(_0x5cfb22,_0x358cb1+_0x2498b9(0x145));return _0x255962;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x514d1d,_0x5a18d3){const _0x15df70=a178_0x2f3b,_0x1a99cb=_0x514d1d();while(!![]){try{const _0xfde4b=parseInt(_0x15df70(0xe4))/0x1*(-parseInt(_0x15df70(0xde))/0x2)+parseInt(_0x15df70(0xef))/0x3+-parseInt(_0x15df70(0xea))/0x4*(parseInt(_0x15df70(0xdc))/0x5)+-parseInt(_0x15df70(0xe1))/0x6+-parseInt(_0x15df70(0xeb))/0x7+parseInt(_0x15df70(0xee))/0x8+parseInt(_0x15df70(0xec))/0x9*(parseInt(_0x15df70(0xe9))/0xa);if(_0xfde4b===_0x5a18d3)break;else _0x1a99cb['push'](_0x1a99cb['shift']());}catch(_0x4cb751){_0x1a99cb['push'](_0x1a99cb['shift']());}}}(a178_0x12f3,0x89104));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x481cf2){const _0x491e49=a178_0x2f3b,_0x263be8=[],_0x9c0d44=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x1c9394;while((_0x1c9394=_0x9c0d44[_0x491e49(0xe7)](_0x481cf2))!==null){_0x263be8[_0x491e49(0xe5)]({'datasetCode':_0x1c9394[0x1],'tableName':_0x1c9394[0x2],'name':_0x1c9394[0x3],'alias':_0x1c9394[0x4]});}return _0x263be8;}export function loadAliasMap(_0x5112ff,_0x1b44b1,_0x24f040){const _0x5c2d08=a178_0x2f3b,_0x5cffc5=_0x24f040??resolve(process['cwd'](),_0x5112ff,_0x5c2d08(0xe6));if(cache[_0x5c2d08(0xe0)](_0x5cffc5))return cache[_0x5c2d08(0xed)](_0x5cffc5);if(!existsSync(_0x5cffc5))return cache['set'](_0x5cffc5,[]),[];try{const _0x48fd8c=readFileSync(_0x5cffc5,_0x5c2d08(0xe8)),_0x504a21=parseApiFile(_0x48fd8c);return cache[_0x5c2d08(0xe2)](_0x5cffc5,_0x504a21),_0x504a21;}catch{return cache[_0x5c2d08(0xe2)](_0x5cffc5,[]),[];}}export function resolveAlias(_0x347283,_0x3436f4,_0x56a4b8,_0x5d171d){const _0x54a6b3=a178_0x2f3b;if(!_0x3436f4)return undefined;const _0x3c51d5=loadAliasMap(_0x347283,_0x56a4b8,_0x5d171d),_0x4eed94=_0x3c51d5[_0x54a6b3(0xdf)](_0x3831f2=>_0x3831f2[_0x54a6b3(0xdd)]===_0x3436f4);return _0x4eed94?.[_0x54a6b3(0xe3)];}export function listAliases(_0x5d698d,_0x31688d,_0x5b0939){return loadAliasMap(_0x5d698d,_0x31688d,_0x5b0939);}function a178_0x2f3b(_0x15d839,_0x41a591){_0x15d839=_0x15d839-0xdc;const _0x12f3e0=a178_0x12f3();let _0x2f3bf1=_0x12f3e0[_0x15d839];return _0x2f3bf1;}function a178_0x12f3(){const _0x409b53=['68IKLiqx','5778626xHigVm','4149gFBKuc','get','4123016pbbgvC','2928825fxKHPy','267055xcTaOL','alias','9466ywheHB','find','has','2789262speyUZ','set','datasetCode','113RLqYRv','push','api.ts','exec','utf-8','39110AKxSCS'];a178_0x12f3=function(){return _0x409b53;};return a178_0x12f3();}
|