@lovrabet/rabetbase-cli 2.3.16-beta.1 → 2.3.16-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/README.md +1 -1
- 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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -0
- package/lib/commands/app/remote-directory.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 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/restore.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 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.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/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -0
- package/lib/commands/tenant/members-list.js +1 -0
- package/lib/commands/tenant/shared.js +1 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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/skills/skill-presence.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/add.js +0 -1
- package/lib/commands/app/remove.js +0 -1
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a199_0x31520b=a199_0x1484;(function(_0x209228,_0x39d246){const _0x277f93=a199_0x1484,_0x5930cf=_0x209228();while(!![]){try{const _0x24ab6a=parseInt(_0x277f93(0x178))/0x1*(-parseInt(_0x277f93(0x183))/0x2)+-parseInt(_0x277f93(0x176))/0x3*(parseInt(_0x277f93(0x17d))/0x4)+-parseInt(_0x277f93(0x17a))/0x5*(-parseInt(_0x277f93(0x17f))/0x6)+-parseInt(_0x277f93(0x177))/0x7*(parseInt(_0x277f93(0x179))/0x8)+parseInt(_0x277f93(0x17c))/0x9*(-parseInt(_0x277f93(0x17b))/0xa)+-parseInt(_0x277f93(0x182))/0xb+parseInt(_0x277f93(0x180))/0xc;if(_0x24ab6a===_0x39d246)break;else _0x5930cf['push'](_0x5930cf['shift']());}catch(_0x117274){_0x5930cf['push'](_0x5930cf['shift']());}}}(a199_0x59e9,0xeb3c2));function a199_0x59e9(){const _0x5e4971=['production','126645pXsHre','18816bDYAru','32257dIHBYW','1584SnXZQe','5CCMioF','340VdBvVP','136737AqOgSZ','152wECsQU','compress','6771588iRoQfK','51517536VmuqWu','en-US','7793610XFUXkM','68AMJzLq'];a199_0x59e9=function(){return _0x5e4971;};return a199_0x59e9();}import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a199_0x31520b(0x184),'format':a199_0x31520b(0x17e),'locale':a199_0x31520b(0x181),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};function a199_0x1484(_0x1db2b3,_0x51c5dc){_0x1db2b3=_0x1db2b3-0x176;const _0x59e999=a199_0x59e9();let _0x14848b=_0x59e999[_0x1db2b3];return _0x14848b;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x419367=a200_0x39d9;(function(_0x4895ae,_0x39e42d){const _0x3b0b0=a200_0x39d9,_0x2db65b=_0x4895ae();while(!![]){try{const _0x3e7747=-parseInt(_0x3b0b0(0x10e))/0x1*(parseInt(_0x3b0b0(0x110))/0x2)+parseInt(_0x3b0b0(0x113))/0x3*(-parseInt(_0x3b0b0(0x108))/0x4)+-parseInt(_0x3b0b0(0x116))/0x5+-parseInt(_0x3b0b0(0x106))/0x6*(parseInt(_0x3b0b0(0x10c))/0x7)+-parseInt(_0x3b0b0(0x105))/0x8*(parseInt(_0x3b0b0(0x11d))/0x9)+parseInt(_0x3b0b0(0x11a))/0xa*(-parseInt(_0x3b0b0(0x114))/0xb)+parseInt(_0x3b0b0(0x112))/0xc;if(_0x3e7747===_0x39e42d)break;else _0x2db65b['push'](_0x2db65b['shift']());}catch(_0x52a62a){_0x2db65b['push'](_0x2db65b['shift']());}}}(a200_0x2c4a,0xc47b8));import{getEnv,isProduction}from'../constant/env.js';function a200_0x2c4a(){const _0xab514=['/web-app/app/','https://runtime.lovrabet.com','4720473lbKWOU','8cufrwt','6WpmYFE','/app/','2777108ohlRgK','userDomain','runtimeDomain','https://api.lovrabet.com','9614899hbUqaz','trim','3NIJCVB','https://daily-api.lovrabet.com','388372PJjZZo','https://daily.lovrabet.com','67564476WEJAFn','3PTQdWY','77yFYKcf','https://user.lovrabet.com','4648565akGTvU','apiDomain','https://app.lovrabet.com','https://daily-runtime.lovrabet.com','1029970SBSzPM'];a200_0x2c4a=function(){return _0xab514;};return a200_0x2c4a();}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2b92ad){const _0x5106ce=a200_0x39d9;customApiDomain=_0x2b92ad?.[_0x5106ce(0x117)],customUserDomain=_0x2b92ad?.[_0x5106ce(0x109)],customRuntimeDomain=_0x2b92ad?.[_0x5106ce(0x10a)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a200_0x419367(0x115):'https://user-daily.lovrabet.com');function a200_0x39d9(_0x239749,_0x50352a){_0x239749=_0x239749-0x105;const _0x2c4a08=a200_0x2c4a();let _0x39d99b=_0x2c4a08[_0x239749];return _0x39d99b;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a200_0x419367(0x10b):a200_0x419367(0x10f));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a200_0x419367(0x11c):a200_0x419367(0x119));export const getAppDomain=()=>isProduction(getEnv())?a200_0x419367(0x118):a200_0x419367(0x111);export const getAppBaseUrl=_0x1448e0=>{const _0x2f17d8=a200_0x419367,_0x14d82d=encodeURIComponent(_0x1448e0[_0x2f17d8(0x10d)]());return isProduction(getEnv())?getAppDomain()+_0x2f17d8(0x107)+_0x14d82d:getAppDomain()+_0x2f17d8(0x11b)+_0x14d82d;};
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x4292ec=a201_0x410f;(function(_0x24b894,_0x463333){const _0x86e7f6=a201_0x410f,_0x4dead9=_0x24b894();while(!![]){try{const _0x38eff1=parseInt(_0x86e7f6(0x118))/0x1*(parseInt(_0x86e7f6(0x11f))/0x2)+-parseInt(_0x86e7f6(0x122))/0x3*(-parseInt(_0x86e7f6(0x125))/0x4)+-parseInt(_0x86e7f6(0x123))/0x5+-parseInt(_0x86e7f6(0x127))/0x6*(parseInt(_0x86e7f6(0x126))/0x7)+-parseInt(_0x86e7f6(0x117))/0x8*(-parseInt(_0x86e7f6(0x11e))/0x9)+-parseInt(_0x86e7f6(0x11a))/0xa+-parseInt(_0x86e7f6(0x119))/0xb*(-parseInt(_0x86e7f6(0x11b))/0xc);if(_0x38eff1===_0x463333)break;else _0x4dead9['push'](_0x4dead9['shift']());}catch(_0x13b4ce){_0x4dead9['push'](_0x4dead9['shift']());}}}(a201_0x156c,0xd9efd));export const RABETBASE_ENV_VALUES=['production','daily'];function a201_0x156c(){const _0x20cf84=['1168812WDBwxv','52JTMOKD','online','development','24FvcQme','7767155lwZvtH','production','314576LWcuds','7vcwTyz','6481902bUlijx','40QwYqDW','9056srXpqb','11PtsBJb','3753730MTGGNd','28654104KptOCo','daily','dev'];a201_0x156c=function(){return _0x20cf84;};return a201_0x156c();}export function normalizeEnv(_0x1c9323){const _0x39dd83=a201_0x410f;return _0x1c9323===_0x39dd83(0x120)?'production':_0x1c9323;}export function isProduction(_0x4c4e23){const _0x2c5763=a201_0x410f;return normalizeEnv(_0x4c4e23)===_0x2c5763(0x124);}export function isDaily(_0x11d9c3){const _0x2e6a73=a201_0x410f;return normalizeEnv(_0x11d9c3)===_0x2e6a73(0x11c);}export function isDev(_0x467d86){const _0x2535aa=a201_0x410f,_0x23cc55=normalizeEnv(_0x467d86);return _0x23cc55===_0x2535aa(0x121)||_0x23cc55===_0x2535aa(0x11d);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a201_0x4292ec(0x124));function a201_0x410f(_0x47adec,_0x50118c){_0x47adec=_0x47adec-0x117;const _0x156cea=a201_0x156c();let _0x410f41=_0x156cea[_0x47adec];return _0x410f41;}export function getEnv(){return env;}export function initEnv(_0xe9e749){env=normalizeEnv(_0xe9e749);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x18e936=a202_0x1141;function a202_0x1141(_0x432024,_0x39fd7c){_0x432024=_0x432024-0x98;const _0x1e22ac=a202_0x1e22();let _0x11414c=_0x1e22ac[_0x432024];return _0x11414c;}(function(_0x208590,_0x4f43bf){const _0x1c3d77=a202_0x1141,_0x5e4523=_0x208590();while(!![]){try{const _0x79959=-parseInt(_0x1c3d77(0x99))/0x1*(-parseInt(_0x1c3d77(0x9b))/0x2)+parseInt(_0x1c3d77(0xa5))/0x3*(parseInt(_0x1c3d77(0x9d))/0x4)+-parseInt(_0x1c3d77(0x98))/0x5+parseInt(_0x1c3d77(0xa2))/0x6*(parseInt(_0x1c3d77(0xa4))/0x7)+-parseInt(_0x1c3d77(0xa0))/0x8*(parseInt(_0x1c3d77(0x9a))/0x9)+-parseInt(_0x1c3d77(0xa6))/0xa+parseInt(_0x1c3d77(0xa1))/0xb*(-parseInt(_0x1c3d77(0xa3))/0xc);if(_0x79959===_0x4f43bf)break;else _0x5e4523['push'](_0x5e4523['shift']());}catch(_0x34f147){_0x5e4523['push'](_0x5e4523['shift']());}}}(a202_0x1e22,0xb56e5));function a202_0x1e22(){const _0x22878c=['json','pretty','8IwRxTF','638MydsSg','2748CAukUb','69624hyxERk','12229EVTGQB','977187ZnEAfE','7153090uGDNlY','5222945YbRscu','9oJMVtj','1094481hwQYPM','263078PLKSoC','compress','12WdwAEg'];a202_0x1e22=function(){return _0x22878c;};return a202_0x1e22();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a202_0x18e936(0x9e),a202_0x18e936(0x9f),a202_0x18e936(0x9c)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a203_0x2f10(){const _0x382bca=['9pTFPnt','1wQehLC','5286nUCovE','./src/api','71558MYfjJO','3315455aHtGlr','1113406xcOHWt','31056yKTWap','3ujqNXO','84FYFtMY','1850pmlEUq','5107820mAlTZT','7402256KHvIiN'];a203_0x2f10=function(){return _0x382bca;};return a203_0x2f10();}const a203_0x4e308a=a203_0x5a20;(function(_0x3f6671,_0x3501ee){const _0x527cfd=a203_0x5a20,_0x18ce63=_0x3f6671();while(!![]){try{const _0x35af25=parseInt(_0x527cfd(0x7b))/0x1*(-parseInt(_0x527cfd(0x7e))/0x2)+-parseInt(_0x527cfd(0x82))/0x3*(-parseInt(_0x527cfd(0x81))/0x4)+parseInt(_0x527cfd(0x84))/0x5*(-parseInt(_0x527cfd(0x7c))/0x6)+parseInt(_0x527cfd(0x80))/0x7+-parseInt(_0x527cfd(0x79))/0x8+parseInt(_0x527cfd(0x7a))/0x9*(-parseInt(_0x527cfd(0x78))/0xa)+parseInt(_0x527cfd(0x7f))/0xb*(parseInt(_0x527cfd(0x83))/0xc);if(_0x35af25===_0x3501ee)break;else _0x18ce63['push'](_0x18ce63['shift']());}catch(_0x1b8371){_0x18ce63['push'](_0x18ce63['shift']());}}}(a203_0x2f10,0x74e7c));function a203_0x5a20(_0x38a5ec,_0x249aaf){_0x38a5ec=_0x38a5ec-0x78;const _0x2f108e=a203_0x2f10();let _0x5a20f9=_0x2f108e[_0x38a5ec];return _0x5a20f9;}export const DEFAULT_API_DIR=a203_0x4e308a(0x7d);
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a204_0x5242(){const _0x1b46b6=['high-risk-write','236TezTJQ','1155135kiYZbo','write','2441844UiXjDU','519407cpPzuR','1151670kqzkDY','13245FiNvzD','10jMoDKs','8uBBSug','239151zfQfwN','219862VFdvOS','read'];a204_0x5242=function(){return _0x1b46b6;};return a204_0x5242();}const a204_0x1aac66=a204_0x209c;(function(_0x1823c7,_0x20ff3f){const _0x33819c=a204_0x209c,_0xa5fced=_0x1823c7();while(!![]){try{const _0x522839=parseInt(_0x33819c(0x1b1))/0x1+parseInt(_0x33819c(0x1b2))/0x2+-parseInt(_0x33819c(0x1bb))/0x3*(parseInt(_0x33819c(0x1b5))/0x4)+parseInt(_0x33819c(0x1b6))/0x5+parseInt(_0x33819c(0x1ba))/0x6+-parseInt(_0x33819c(0x1b9))/0x7*(parseInt(_0x33819c(0x1b0))/0x8)+-parseInt(_0x33819c(0x1b8))/0x9*(parseInt(_0x33819c(0x1af))/0xa);if(_0x522839===_0x20ff3f)break;else _0xa5fced['push'](_0xa5fced['shift']());}catch(_0x23b6a5){_0xa5fced['push'](_0xa5fced['shift']());}}}(a204_0x5242,0x288a4));function a204_0x209c(_0x47aea6,_0x4f69c4){_0x47aea6=_0x47aea6-0x1af;const _0x5242ec=a204_0x5242();let _0x209ca6=_0x5242ec[_0x47aea6];return _0x209ca6;}export const RISK_LEVEL_VALUES=[a204_0x1aac66(0x1b3),a204_0x1aac66(0x1b7),a204_0x1aac66(0x1b4)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34e1af,_0x4f3dab){const _0x5747d3=a205_0x2bb5,_0x499efb=_0x34e1af();while(!![]){try{const _0x39d0a3=parseInt(_0x5747d3(0xdc))/0x1*(-parseInt(_0x5747d3(0xc2))/0x2)+parseInt(_0x5747d3(0xcd))/0x3*(parseInt(_0x5747d3(0xc4))/0x4)+parseInt(_0x5747d3(0xdf))/0x5+-parseInt(_0x5747d3(0xdd))/0x6+parseInt(_0x5747d3(0xc0))/0x7+-parseInt(_0x5747d3(0xce))/0x8+parseInt(_0x5747d3(0xd0))/0x9;if(_0x39d0a3===_0x4f3dab)break;else _0x499efb['push'](_0x499efb['shift']());}catch(_0x46c1e3){_0x499efb['push'](_0x499efb['shift']());}}}(a205_0x4f90,0x7b071));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a205_0x2bb5(_0x24a33e,_0x3b174a){_0x24a33e=_0x24a33e-0xbd;const _0x4f9090=a205_0x4f90();let _0x2bb58d=_0x4f9090[_0x24a33e];return _0x2bb58d;}import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x551894){const _0x3d77fe=a205_0x2bb5;return typeof _0x551894===_0x3d77fe(0xdb)&&_0x551894[_0x3d77fe(0xe7)]()?_0x551894[_0x3d77fe(0xe7)]():undefined;}function appProfiles(_0x598733){const _0x7e340f=a205_0x2bb5;return _0x598733[_0x7e340f(0xe3)]&&typeof _0x598733[_0x7e340f(0xe3)]===_0x7e340f(0xd4)?_0x598733[_0x7e340f(0xe3)]:{};}function resolveDefaultAppName(_0x1a69c7){const _0x57316e=a205_0x2bb5,_0x2f0a7e=stringConfigValue(_0x1a69c7[_0x57316e(0xe5)]);if(_0x2f0a7e)return _0x2f0a7e;return Object[_0x57316e(0xc9)](appProfiles(_0x1a69c7))[0x0];}function a205_0x4f90(){const _0x3e68f9=['4AXoIHb','MAX_RISK','write','production','find','keys','cookie','appcode','length','2101515ZhNVQB','6368816eqmbvn','format','5128623oyuauK','locale','ENV','inherit','object','accessKey','RISK_LEVEL','daily','globalConfig','entries','env','string','2437OLjfpR','1841346VpaRxk','read','1677160fzRKPu','maxRisk','projectConfig','apiDir','apps','FORMAT','defaultApp','COOKIE','trim','VERBOSE','pageSize','PAGE_SIZE','app','APP','6473271gGHnJL','riskLevel','758cmIrgP','true'];a205_0x4f90=function(){return _0x3e68f9;};return a205_0x4f90();}function resolveTopLevelAppCode(_0x194721){const _0x16f2e9=a205_0x2bb5;return stringConfigValue(_0x194721['appcode'])||stringConfigValue(_0x194721[_0x16f2e9(0xbe)]);}export function resolveAppConfig({raw:_0x41cfb4,flags:_0x5ca55c,layers:_0x4001dc,readEnv:_0x3cbbce}){const _0x3ebdaa=a205_0x2bb5,_0x277e91=_0x4001dc?.[_0x3ebdaa(0xe1)]??{},_0x3007e1=_0x4001dc?.[_0x3ebdaa(0xd8)]??{},_0x1040ae=Object[_0x3ebdaa(0xc9)](_0x277e91)[_0x3ebdaa(0xcc)]>0x0,_0xb750ab=!_0x1040ae||_0x277e91[_0x3ebdaa(0xd3)]===!![],_0x55df63=_0x1040ae?resolveDefaultAppName(_0x277e91):undefined,_0x57a2f9=_0xb750ab?resolveDefaultAppName(_0x3007e1):undefined,_0x25cce7=stringConfigValue(_0x5ca55c[_0x3ebdaa(0xbe)]),_0x5360b9=_0x3cbbce(_0x3ebdaa(0xbf)),_0x5c31c3={};if(_0x41cfb4[_0x3ebdaa(0xe3)]&&typeof _0x41cfb4[_0x3ebdaa(0xe3)]===_0x3ebdaa(0xd4))for(const [_0x474433,_0x4b02a1]of Object[_0x3ebdaa(0xd9)](_0x41cfb4[_0x3ebdaa(0xe3)])){_0x4b02a1&&typeof _0x4b02a1===_0x3ebdaa(0xd4)&&_0x4b02a1[_0x3ebdaa(0xcb)]&&(_0x5c31c3[_0x474433]=_0x4b02a1);}const _0x5dc9ae=_0x41cfb4[_0x3ebdaa(0xe5)]||undefined,_0x14740f=Object[_0x3ebdaa(0xc9)](_0x5c31c3)['length']>0x0,_0x52b45e=_0x25cce7||_0x55df63||_0x5360b9||_0x57a2f9||_0x5dc9ae||undefined,_0x1f7d2b=stringConfigValue(_0x5ca55c[_0x3ebdaa(0xcb)]),_0x5e7010=_0x1f7d2b?Object['entries'](_0x5c31c3)[_0x3ebdaa(0xc8)](([,_0x14abb2])=>_0x14abb2?.[_0x3ebdaa(0xcb)]===_0x1f7d2b):undefined,_0x4eee3d=_0x5e7010?.[0x0],_0x494862=_0x5e7010?.[0x1],_0x114f87=_0x1f7d2b?_0x4eee3d:_0x52b45e;let _0x262ca6=_0x114f87&&_0x5c31c3[_0x114f87]?_0x5c31c3[_0x114f87]:undefined;_0x1f7d2b&&_0x494862&&(_0x262ca6=_0x494862);const _0x9ca3ed=_0x1f7d2b?_0x494862??_0x262ca6:_0x262ca6,_0x2e2ca3=!_0x25cce7&&!_0x55df63&&_0x5360b9&&_0x114f87===_0x5360b9,_0x2ef764=_0x25cce7||(_0x2e2ca3?_0x5360b9:undefined)||(_0x1f7d2b?_0x4eee3d:undefined),_0x2b05ef=_0x9ca3ed?.[_0x3ebdaa(0xcb)],_0x2e3ef7=_0x1040ae?resolveTopLevelAppCode(_0x277e91):undefined,_0x39d732=_0xb750ab?resolveTopLevelAppCode(_0x3007e1):undefined,_0x12d660=_0x25cce7||_0x55df63?_0x2b05ef:undefined,_0x4556f4=!_0x25cce7&&!_0x55df63?_0x2b05ef:undefined,_0x240de6=_0x1f7d2b||_0x12d660||_0x2e3ef7||_0x4556f4||_0x39d732||undefined,_0x3c4cc2=_0x1040ae?stringConfigValue(_0x277e91[_0x3ebdaa(0xda)]):undefined,_0x2606be=_0xb750ab?stringConfigValue(_0x3007e1['env']):undefined,_0x461c66=_0x5ca55c[_0x3ebdaa(0xda)]||_0x9ca3ed?.[_0x3ebdaa(0xda)]||_0x3c4cc2||_0x3cbbce(_0x3ebdaa(0xd2))||_0x2606be||_0x41cfb4[_0x3ebdaa(0xda)]||DEFAULT_CONFIG_VALUES[_0x3ebdaa(0xda)],_0x94b3b9=_0x9ca3ed?.[_0x3ebdaa(0xd1)]||_0x41cfb4[_0x3ebdaa(0xd1)]||DEFAULT_CONFIG_VALUES[_0x3ebdaa(0xd1)],_0x25a96e=_0x3cbbce(_0x3ebdaa(0xe6))||_0x9ca3ed?.[_0x3ebdaa(0xca)]||_0x41cfb4[_0x3ebdaa(0xca)]||undefined,_0x333169=_0x3cbbce('ACCESS_KEY')||_0x9ca3ed?.[_0x3ebdaa(0xd5)]||_0x41cfb4[_0x3ebdaa(0xd5)]||undefined,_0x207abf=_0x5ca55c[_0x3ebdaa(0xcf)]||_0x3cbbce(_0x3ebdaa(0xe4))||_0x9ca3ed?.['format']||_0x41cfb4[_0x3ebdaa(0xcf)],_0x46acd1=normalizeLegacyOutputFormat(_0x207abf),_0x508225=_0x3cbbce(_0x3ebdaa(0xbd))||_0x9ca3ed?.[_0x3ebdaa(0xe9)]||_0x41cfb4[_0x3ebdaa(0xe9)],_0x21dbd0=_0x508225?Number(_0x508225)||undefined:undefined,_0x1cf599=_0x3cbbce(_0x3ebdaa(0xd6))||_0x3cbbce(_0x3ebdaa(0xc5))||_0x9ca3ed?.['riskLevel']||_0x41cfb4[_0x3ebdaa(0xc1)]||_0x41cfb4[_0x3ebdaa(0xe0)],_0x4817f5=_0x1cf599===_0x3ebdaa(0xde)||_0x1cf599===_0x3ebdaa(0xc6)?_0x1cf599:DEFAULT_CONFIG_VALUES[_0x3ebdaa(0xc1)],_0x234c1f=_0x3cbbce(_0x3ebdaa(0xe8)),_0xf618cb=_0x234c1f==='1'||_0x234c1f===_0x3ebdaa(0xc3),_0x1cd9c3=_0x9ca3ed?.[_0x3ebdaa(0xe2)]||_0x41cfb4[_0x3ebdaa(0xe2)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x1936a7=isDaily(normalizeEnv(String(_0x461c66)))?_0x3ebdaa(0xd7):_0x3ebdaa(0xc7);return{'appCode':typeof _0x240de6===_0x3ebdaa(0xdb)&&_0x240de6[_0x3ebdaa(0xe7)]()?_0x240de6['trim']():undefined,'env':_0x1936a7,'locale':_0x94b3b9,'cookie':_0x25a96e,'accessKey':_0x333169,'format':_0x46acd1,'pageSize':_0x21dbd0,'riskLevel':_0x4817f5,'verbose':_0xf618cb,'apiDir':_0x1cd9c3,'apps':_0x5c31c3,'defaultApp':_0x5dc9ae,'currentApp':_0x14740f?_0x114f87:undefined,'explicitAppName':_0x2ef764};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a206_0x5096(_0x5d2b22,_0x1927bc){_0x5d2b22=_0x5d2b22-0x185;const _0x42ae9e=a206_0x42ae();let _0x5096b5=_0x42ae9e[_0x5d2b22];return _0x5096b5;}(function(_0x36212b,_0x4a53eb){const _0x55a9d5=a206_0x5096,_0x188c25=_0x36212b();while(!![]){try{const _0x44b3fb=-parseInt(_0x55a9d5(0x18d))/0x1*(-parseInt(_0x55a9d5(0x188))/0x2)+-parseInt(_0x55a9d5(0x187))/0x3+-parseInt(_0x55a9d5(0x18c))/0x4*(-parseInt(_0x55a9d5(0x186))/0x5)+parseInt(_0x55a9d5(0x18a))/0x6+-parseInt(_0x55a9d5(0x189))/0x7+-parseInt(_0x55a9d5(0x190))/0x8*(-parseInt(_0x55a9d5(0x18b))/0x9)+-parseInt(_0x55a9d5(0x185))/0xa;if(_0x44b3fb===_0x4a53eb)break;else _0x188c25['push'](_0x188c25['shift']());}catch(_0x1f1698){_0x188c25['push'](_0x188c25['shift']());}}}(a206_0x42ae,0x23f6e));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x345e48){const _0x2ad231=a206_0x5096,{getCookie:_0x20de43}=await import(_0x2ad231(0x18e)),_0x257a76=_0x345e48[_0x2ad231(0x191)]||_0x20de43(),_0x54cd6a=_0x257a76?await getIsSessionValid():![];return{'cookie':_0x257a76,'isLoggedIn':_0x54cd6a,async 'getOrLogin'(){const _0x30e77e=_0x2ad231;if(_0x257a76&&_0x54cd6a)return _0x257a76;throw CliErrors[_0x30e77e(0x18f)]();}};}function a206_0x42ae(){const _0x977a1a=['cookie','3129780WcdsHe','25190QqiOER','525996JNGuhL','78SoIANx','778981oeezVt','1762650UKanWb','334971NvJaQp','208hRjkHL','3947TdFvFW','../auth/get-cookie.js','authRequired','8IHvwji'];a206_0x42ae=function(){return _0x977a1a;};return a206_0x42ae();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a205_0x217270=a205_0x592b;(function(_0x573e27,_0x427b8c){const _0x462749=a205_0x592b,_0x4b0f36=_0x573e27();while(!![]){try{const _0x3cfb67=-parseInt(_0x462749(0x155))/0x1+-parseInt(_0x462749(0x157))/0x2*(parseInt(_0x462749(0x168))/0x3)+-parseInt(_0x462749(0x162))/0x4*(-parseInt(_0x462749(0x16f))/0x5)+-parseInt(_0x462749(0x151))/0x6+-parseInt(_0x462749(0x170))/0x7+-parseInt(_0x462749(0x16b))/0x8*(-parseInt(_0x462749(0x164))/0x9)+parseInt(_0x462749(0x14c))/0xa;if(_0x3cfb67===_0x427b8c)break;else _0x4b0f36['push'](_0x4b0f36['shift']());}catch(_0x117263){_0x4b0f36['push'](_0x4b0f36['shift']());}}}(a205_0x46d7,0xa24e1));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';function a205_0x592b(_0x4b81fa,_0x5d65a2){_0x4b81fa=_0x4b81fa-0x146;const _0x46d798=a205_0x46d7();let _0x592b19=_0x46d798[_0x4b81fa];return _0x592b19;}import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a205_0x217270(0x169);export const CONFIG_NAMES=['.rabetbase.json',a205_0x217270(0x14a),a205_0x217270(0x172)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a205_0x217270(0x16c)](_0x5191d7=>_0x5191d7!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1bbf5c){for(const _0x3f818c of CONFIG_NAMES){const _0x27b9ec=resolve(_0x1bbf5c,_0x3f818c);if(existsSync(_0x27b9ec))return _0x27b9ec;}return undefined;}export function findProjectRootDirectory(_0x5ba754=process['cwd']()){let _0x21c462=resolve(_0x5ba754);const {root:_0x5323c9}=parse(_0x21c462),_0xda0890=homedir();while(!![]){if(resolveConfigPath(_0x21c462)){if(_0x21c462===_0xda0890)break;return _0x21c462;}if(_0x21c462===_0x5323c9||_0x21c462===_0xda0890)break;const _0x34f182=dirname(_0x21c462);if(_0x34f182===_0x21c462)break;_0x21c462=_0x34f182;}return resolve(_0x5ba754);}function a205_0x46d7(){const _0x335b0f=['16265nuktrI','8837563cXxuXS','parse','.lovrabetrc','warn','app','env','accessKey','missing','set','.lovrabet.json','length','20817260EOFFAl','message','.tmp','locale','inherit','2510424ZBMugB','trim','config','defaultApp','1221503GIbmeI','format','4KcrFJo','appcode','empty','cookie','pageSize','utf8','Project','data','keys','status','riskLevel','708rSwxep','error','443214hCIUgT','object','apps','project','38946VxYREs','.rabetbase.json','silent','152LrMdKF','filter','stringify','cwd'];a205_0x46d7=function(){return _0x335b0f;};return a205_0x46d7();}export function getProjectConfigPath(){const _0x250556=a205_0x217270;return resolveConfigPath(process[_0x250556(0x16e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x74253){const _0x5049f0=a205_0x217270;if(!existsSync(_0x74253))return{'status':'missing'};try{const _0x372b0f=readFileSync(_0x74253,{'encoding':_0x5049f0(0x15c)});if(!_0x372b0f?.[_0x5049f0(0x152)]())return{'status':_0x5049f0(0x159)};const _0x131dc2=JSON[_0x5049f0(0x171)](_0x372b0f);return{'status':'ok','data':_0x131dc2};}catch(_0x2352de){return{'status':_0x5049f0(0x163),'message':_0x2352de instanceof Error?_0x2352de[_0x5049f0(0x14d)]:String(_0x2352de)};}}function parseCliConfigJsonFile(_0x1f5184,_0x2e9367,_0x18b1b7){const _0x4cf84c=a205_0x217270,_0x4fe6d7=inspectCliConfigJsonFile(_0x1f5184);if(_0x4fe6d7[_0x4cf84c(0x160)]===_0x4cf84c(0x148)||_0x4fe6d7['status']==='empty')return{};if(_0x4fe6d7['status']==='ok')return _0x4fe6d7[_0x4cf84c(0x15e)];return _0x2e9367===_0x4cf84c(0x173)&&_0x18b1b7&&console['error'](CLI_BIN_NAME+':\x20'+_0x18b1b7+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x1f5184+'\x0a\x20\x20'+_0x4fe6d7[_0x4cf84c(0x14d)]),{};}function normalizeLegacyConfigShape(_0x3623f3){const _0x28b9fc=a205_0x217270;if(!_0x3623f3||typeof _0x3623f3!==_0x28b9fc(0x165))return{'config':{},'migrated':![]};const _0x57c525={..._0x3623f3},_0x5c69ae=_0x57c525[_0x28b9fc(0x166)]&&typeof _0x57c525[_0x28b9fc(0x166)]===_0x28b9fc(0x165)?{..._0x57c525[_0x28b9fc(0x166)]}:{},_0xaf4c84=Object[_0x28b9fc(0x15f)](_0x5c69ae)['length'],_0x19cd31=_0x57c525['appcode']||_0x57c525['app'];let _0x2d094f=![];if(_0x19cd31&&_0xaf4c84===0x0){const _0x57fdcf=typeof _0x57c525['defaultApp']==='string'&&_0x57c525[_0x28b9fc(0x154)]['trim']()?_0x57c525[_0x28b9fc(0x154)]:String(_0x19cd31)[_0x28b9fc(0x152)]();_0x5c69ae[_0x57fdcf]={'appcode':String(_0x19cd31)['trim'](),..._0x57c525[_0x28b9fc(0x146)]!=null?{'env':_0x57c525[_0x28b9fc(0x146)]}:{},..._0x57c525['apiDir']!=null?{'apiDir':_0x57c525['apiDir']}:{},..._0x57c525[_0x28b9fc(0x15a)]!=null?{'cookie':_0x57c525[_0x28b9fc(0x15a)]}:{},..._0x57c525[_0x28b9fc(0x147)]!=null?{'accessKey':_0x57c525[_0x28b9fc(0x147)]}:{},..._0x57c525['format']!=null?{'format':_0x57c525[_0x28b9fc(0x156)]}:{},..._0x57c525['pageSize']!=null?{'pageSize':_0x57c525[_0x28b9fc(0x15b)]}:{},..._0x57c525[_0x28b9fc(0x161)]!=null?{'riskLevel':_0x57c525[_0x28b9fc(0x161)]}:{},..._0x57c525['locale']!=null?{'locale':_0x57c525[_0x28b9fc(0x14f)]}:{}},_0x57c525[_0x28b9fc(0x166)]=_0x5c69ae;if(!_0x57c525[_0x28b9fc(0x154)])_0x57c525[_0x28b9fc(0x154)]=_0x57fdcf;_0x2d094f=!![];}return(_0x28b9fc(0x158)in _0x57c525||_0x28b9fc(0x174)in _0x57c525)&&(delete _0x57c525[_0x28b9fc(0x158)],delete _0x57c525[_0x28b9fc(0x174)],_0x2d094f=!![]),{'config':_0x57c525,'migrated':_0x2d094f};}function writeNormalizedConfigIfNeeded(_0x2df50d,_0x3b11ab){const _0x2e64c8=a205_0x217270,_0x463401=JSON[_0x2e64c8(0x16d)](_0x3b11ab,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x2df50d)===_0x463401)return;writeConfigFile(_0x2df50d,_0x3b11ab),normalizedWriteCache[_0x2e64c8(0x149)](_0x2df50d,_0x463401);}function parseAndNormalizeConfig(_0x5a3e78,_0xaf0e76,_0x184e1f){const _0x134c9d=a205_0x217270,_0x3507c1=parseCliConfigJsonFile(_0x5a3e78,_0xaf0e76,_0x184e1f),_0x3fe59b=normalizeLegacyConfigShape(_0x3507c1);if(_0x3fe59b['migrated'])try{writeNormalizedConfigIfNeeded(_0x5a3e78,_0x3fe59b[_0x134c9d(0x153)]);}catch{}return _0x3fe59b[_0x134c9d(0x153)];}export function loadRawConfigLayers(_0x301f7d){const _0x262801=a205_0x217270;let _0x4b7b17={},_0x4b2b52={};const _0x5ead46=resolveConfigPath(homedir());_0x5ead46&&(_0x4b7b17=parseAndNormalizeConfig(_0x5ead46,'warn','Global'));const _0x2913b3=_0x301f7d??findProjectRootDirectory(),_0x50e52d=resolveConfigPath(_0x2913b3);return _0x50e52d&&(_0x4b2b52=parseAndNormalizeConfig(_0x50e52d,'warn',_0x262801(0x15d))),{'globalPath':_0x5ead46,'projectPath':_0x50e52d,'globalConfig':_0x4b7b17,'projectConfig':_0x4b2b52};}const INHERIT_WHITELIST=[a205_0x217270(0x15a),'accessKey',a205_0x217270(0x14f),a205_0x217270(0x156),'riskLevel',a205_0x217270(0x15b)];export function mergeRawConfigLayers(_0x390a62){const _0xef336f=a205_0x217270,{globalConfig:_0x6a1fc3,projectConfig:_0x276e28}=_0x390a62,_0x378780=Object[_0xef336f(0x15f)](_0x276e28)['length']>0x0;if(!_0x378780)return mergeGlobalOnly(_0x6a1fc3);if(_0x276e28[_0xef336f(0x150)]===!![])return mergeFullInherit(_0x6a1fc3,_0x276e28);if(_0x276e28[_0xef336f(0x150)]===![])return mergeIsolated(_0x276e28);return mergeProjectFirst(_0x6a1fc3,_0x276e28);}function mergeGlobalOnly(_0x5e5b0d){const _0x2424e5=a205_0x217270,_0x2f28da={..._0x5e5b0d},_0x283bc1=_0x5e5b0d['apps']&&typeof _0x5e5b0d[_0x2424e5(0x166)]===_0x2424e5(0x165)?_0x5e5b0d['apps']:{};if(Object['keys'](_0x283bc1)[_0x2424e5(0x14b)]>0x0)_0x2f28da['apps']=_0x283bc1;if(_0x5e5b0d[_0x2424e5(0x154)])_0x2f28da[_0x2424e5(0x154)]=_0x5e5b0d[_0x2424e5(0x154)];else{const _0x53a098=Object[_0x2424e5(0x15f)](_0x283bc1);if(_0x53a098[_0x2424e5(0x14b)]>0x0)_0x2f28da['defaultApp']=_0x53a098[0x0];}return _0x2f28da;}function mergeIsolated(_0x1f0231){const _0x431f66=a205_0x217270,_0x1de170={..._0x1f0231};delete _0x1de170[_0x431f66(0x150)];const _0x458f18=_0x1f0231[_0x431f66(0x166)]&&typeof _0x1f0231[_0x431f66(0x166)]===_0x431f66(0x165)?_0x1f0231[_0x431f66(0x166)]:{};Object[_0x431f66(0x15f)](_0x458f18)[_0x431f66(0x14b)]>0x0?_0x1de170[_0x431f66(0x166)]=_0x458f18:delete _0x1de170[_0x431f66(0x166)];if(_0x431f66(0x154)in _0x1f0231)_0x1de170['defaultApp']=_0x1f0231[_0x431f66(0x154)];else Object[_0x431f66(0x15f)](_0x458f18)[_0x431f66(0x14b)]>0x0?_0x1de170[_0x431f66(0x154)]=Object['keys'](_0x458f18)[0x0]:delete _0x1de170[_0x431f66(0x154)];return _0x1de170;}function mergeProjectFirst(_0x2accfe,_0x5a91b3){const _0x58eb27=a205_0x217270,_0x3b910b={..._0x5a91b3};delete _0x3b910b['inherit'];for(const _0x1410fe of INHERIT_WHITELIST){!(_0x1410fe in _0x3b910b)&&_0x1410fe in _0x2accfe&&(_0x3b910b[_0x1410fe]=_0x2accfe[_0x1410fe]);}const _0x5ebfb4=_0x5a91b3[_0x58eb27(0x166)]&&typeof _0x5a91b3[_0x58eb27(0x166)]===_0x58eb27(0x165)?_0x5a91b3[_0x58eb27(0x166)]:{};Object[_0x58eb27(0x15f)](_0x5ebfb4)[_0x58eb27(0x14b)]>0x0?_0x3b910b[_0x58eb27(0x166)]=_0x5ebfb4:delete _0x3b910b[_0x58eb27(0x166)];if('defaultApp'in _0x5a91b3)_0x3b910b[_0x58eb27(0x154)]=_0x5a91b3[_0x58eb27(0x154)];else Object['keys'](_0x5ebfb4)['length']>0x0?_0x3b910b[_0x58eb27(0x154)]=Object['keys'](_0x5ebfb4)[0x0]:delete _0x3b910b[_0x58eb27(0x154)];return _0x3b910b;}function mergeFullInherit(_0x139550,_0x3b5189){const _0x7e56cd=a205_0x217270,_0x3130b0=_0x139550[_0x7e56cd(0x166)]&&typeof _0x139550[_0x7e56cd(0x166)]===_0x7e56cd(0x165)?_0x139550[_0x7e56cd(0x166)]:{},_0x1238ee=_0x3b5189[_0x7e56cd(0x166)]&&typeof _0x3b5189[_0x7e56cd(0x166)]===_0x7e56cd(0x165)?_0x3b5189['apps']:{},_0x3c5b68={..._0x3130b0,..._0x1238ee},_0x5be7e7={..._0x139550,..._0x3b5189};delete _0x5be7e7[_0x7e56cd(0x150)];if(Object[_0x7e56cd(0x15f)](_0x3c5b68)[_0x7e56cd(0x14b)]>0x0)_0x5be7e7[_0x7e56cd(0x166)]=_0x3c5b68;if(_0x7e56cd(0x154)in _0x3b5189)_0x5be7e7[_0x7e56cd(0x154)]=_0x3b5189[_0x7e56cd(0x154)];else{if(Object[_0x7e56cd(0x15f)](_0x1238ee)['length']>0x0)_0x5be7e7[_0x7e56cd(0x154)]=Object[_0x7e56cd(0x15f)](_0x1238ee)[0x0];else{if(_0x139550[_0x7e56cd(0x154)])_0x5be7e7[_0x7e56cd(0x154)]=_0x139550['defaultApp'];else{const _0x24971e=Object[_0x7e56cd(0x15f)](_0x3130b0);if(_0x24971e[_0x7e56cd(0x14b)]>0x0)_0x5be7e7['defaultApp']=_0x24971e[0x0];}}}return _0x5be7e7;}export function readRawConfigWithLayers(_0x2b0a3a){const _0x4be1a1=loadRawConfigLayers(_0x2b0a3a);return{'config':mergeRawConfigLayers(_0x4be1a1),'layers':_0x4be1a1};}export function readRawConfig(_0x5d4547){return mergeRawConfigLayers(loadRawConfigLayers(_0x5d4547));}export function readConfigFile(_0x588282){const _0x5ddaab=a205_0x217270;return parseAndNormalizeConfig(_0x588282,_0x5ddaab(0x16a));}export function writeConfigFile(_0x2115a4,_0x4c65f8){const _0x4b4d35=a205_0x217270,_0x14c98f=dirname(_0x2115a4);!existsSync(_0x14c98f)&&mkdirSync(_0x14c98f,{'recursive':!![]});const _0x11ac83=_0x2115a4+_0x4b4d35(0x14e);try{writeFileSync(_0x11ac83,JSON[_0x4b4d35(0x16d)](_0x4c65f8,null,0x2)+'\x0a',{'encoding':_0x4b4d35(0x15c),'mode':0x180}),renameSync(_0x11ac83,_0x2115a4);}catch(_0x3f3b49){try{unlinkSync(_0x11ac83);}catch{}throw _0x3f3b49;}}export function resolveWriteConfigPath(_0x164eb8){const _0x33b36f=a205_0x217270,_0x1b9c7f=_0x164eb8===_0x33b36f(0x167)?process['cwd']():homedir(),_0x378fdf=resolveConfigPath(_0x1b9c7f);return _0x378fdf??resolve(_0x1b9c7f,NEW_CONFIG_NAME);}
|
|
1
|
+
const a207_0x515962=a207_0xa763;(function(_0x196c92,_0x413f19){const _0x411e43=a207_0xa763,_0x2b60e2=_0x196c92();while(!![]){try{const _0xd7f929=parseInt(_0x411e43(0x16a))/0x1+parseInt(_0x411e43(0x188))/0x2+-parseInt(_0x411e43(0x16b))/0x3*(parseInt(_0x411e43(0x173))/0x4)+-parseInt(_0x411e43(0x189))/0x5+-parseInt(_0x411e43(0x19b))/0x6+-parseInt(_0x411e43(0x176))/0x7*(parseInt(_0x411e43(0x170))/0x8)+parseInt(_0x411e43(0x17b))/0x9*(parseInt(_0x411e43(0x195))/0xa);if(_0xd7f929===_0x413f19)break;else _0x2b60e2['push'](_0x2b60e2['shift']());}catch(_0x11e18c){_0x2b60e2['push'](_0x2b60e2['shift']());}}}(a207_0x30ec,0xce2b1));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=a207_0x515962(0x16c);export const CONFIG_NAMES=[a207_0x515962(0x16c),a207_0x515962(0x18c),a207_0x515962(0x187)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a207_0x515962(0x18e)](_0x22e0ff=>_0x22e0ff!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1fae98){for(const _0x3e0524 of CONFIG_NAMES){const _0x91b0c1=resolve(_0x1fae98,_0x3e0524);if(existsSync(_0x91b0c1))return _0x91b0c1;}return undefined;}export function findProjectRootDirectory(_0xbb2680=process[a207_0x515962(0x185)]()){let _0x185738=resolve(_0xbb2680);const {root:_0x2fcd5d}=parse(_0x185738),_0x1055a5=homedir();while(!![]){if(resolveConfigPath(_0x185738)){if(_0x185738===_0x1055a5)break;return _0x185738;}if(_0x185738===_0x2fcd5d||_0x185738===_0x1055a5)break;const _0x6ad3f2=dirname(_0x185738);if(_0x6ad3f2===_0x185738)break;_0x185738=_0x6ad3f2;}return resolve(_0xbb2680);}export function getProjectConfigPath(){const _0x7e2ac=a207_0x515962;return resolveConfigPath(process[_0x7e2ac(0x185)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x81429b){const _0x4b2d73=a207_0x515962;if(!existsSync(_0x81429b))return{'status':'missing'};try{const _0x498295=readFileSync(_0x81429b,{'encoding':_0x4b2d73(0x181)});if(!_0x498295?.['trim']())return{'status':'empty'};const _0x1dff00=JSON[_0x4b2d73(0x171)](_0x498295);return{'status':'ok','data':_0x1dff00};}catch(_0x3cf2a8){return{'status':_0x4b2d73(0x16f),'message':_0x3cf2a8 instanceof Error?_0x3cf2a8['message']:String(_0x3cf2a8)};}}function parseCliConfigJsonFile(_0x9eae23,_0x310538,_0x467af3){const _0x4b9dd7=a207_0x515962,_0x39d310=inspectCliConfigJsonFile(_0x9eae23);if(_0x39d310[_0x4b9dd7(0x194)]===_0x4b9dd7(0x183)||_0x39d310[_0x4b9dd7(0x194)]===_0x4b9dd7(0x197))return{};if(_0x39d310[_0x4b9dd7(0x194)]==='ok')return _0x39d310['data'];return _0x310538===_0x4b9dd7(0x174)&&_0x467af3&&console[_0x4b9dd7(0x16f)](CLI_BIN_NAME+':\x20'+_0x467af3+_0x4b9dd7(0x17c)+_0x9eae23+_0x4b9dd7(0x19a)+_0x39d310[_0x4b9dd7(0x18f)]),{};}function a207_0x30ec(){const _0x7f6de1=['3HzUZlF','.rabetbase.json','Global','.tmp','error','28128fAPWok','parse','keys','4150360VXmKqI','warn','locale','1799NLREbm','pageSize','trim','project','riskLevel','33667047Hovtkp','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','string','get','inherit','set','utf8','env','missing','cookie','cwd','appcode','.lovrabetrc','478910RSgJIQ','7714535enFZhW','Project','apps','.lovrabet.json','accessKey','filter','message','apiDir','format','config','app','status','10SLjqYI','length','empty','defaultApp','object','\x0a\x20\x20','1820430sMZkiE','stringify','651741SvKiPa'];a207_0x30ec=function(){return _0x7f6de1;};return a207_0x30ec();}function normalizeLegacyConfigShape(_0x120576){const _0x39d643=a207_0x515962;if(!_0x120576||typeof _0x120576!==_0x39d643(0x199))return{'config':{},'migrated':![]};const _0x31f7ab={..._0x120576},_0x8fa9bb=_0x31f7ab[_0x39d643(0x18b)]&&typeof _0x31f7ab['apps']===_0x39d643(0x199)?{..._0x31f7ab['apps']}:{},_0x55d963=Object[_0x39d643(0x172)](_0x8fa9bb)[_0x39d643(0x196)],_0x4fadfa=_0x31f7ab[_0x39d643(0x186)]||_0x31f7ab[_0x39d643(0x193)];let _0x38b647=![];if(_0x4fadfa&&_0x55d963===0x0){const _0xee744d=typeof _0x31f7ab[_0x39d643(0x198)]===_0x39d643(0x17d)&&_0x31f7ab['defaultApp'][_0x39d643(0x178)]()?_0x31f7ab[_0x39d643(0x198)]:String(_0x4fadfa)[_0x39d643(0x178)]();_0x8fa9bb[_0xee744d]={'appcode':String(_0x4fadfa)[_0x39d643(0x178)](),..._0x31f7ab[_0x39d643(0x182)]!=null?{'env':_0x31f7ab[_0x39d643(0x182)]}:{},..._0x31f7ab['apiDir']!=null?{'apiDir':_0x31f7ab[_0x39d643(0x190)]}:{},..._0x31f7ab[_0x39d643(0x184)]!=null?{'cookie':_0x31f7ab[_0x39d643(0x184)]}:{},..._0x31f7ab[_0x39d643(0x18d)]!=null?{'accessKey':_0x31f7ab[_0x39d643(0x18d)]}:{},..._0x31f7ab['format']!=null?{'format':_0x31f7ab[_0x39d643(0x191)]}:{},..._0x31f7ab['pageSize']!=null?{'pageSize':_0x31f7ab['pageSize']}:{},..._0x31f7ab[_0x39d643(0x17a)]!=null?{'riskLevel':_0x31f7ab[_0x39d643(0x17a)]}:{},..._0x31f7ab[_0x39d643(0x175)]!=null?{'locale':_0x31f7ab[_0x39d643(0x175)]}:{}},_0x31f7ab['apps']=_0x8fa9bb;if(!_0x31f7ab[_0x39d643(0x198)])_0x31f7ab[_0x39d643(0x198)]=_0xee744d;_0x38b647=!![];}return(_0x39d643(0x186)in _0x31f7ab||_0x39d643(0x193)in _0x31f7ab)&&(delete _0x31f7ab[_0x39d643(0x186)],delete _0x31f7ab[_0x39d643(0x193)],_0x38b647=!![]),{'config':_0x31f7ab,'migrated':_0x38b647};}function writeNormalizedConfigIfNeeded(_0x840df,_0x10457c){const _0x484b41=a207_0x515962,_0x5ad569=JSON[_0x484b41(0x169)](_0x10457c,null,0x2)+'\x0a';if(normalizedWriteCache[_0x484b41(0x17e)](_0x840df)===_0x5ad569)return;writeConfigFile(_0x840df,_0x10457c),normalizedWriteCache[_0x484b41(0x180)](_0x840df,_0x5ad569);}function parseAndNormalizeConfig(_0x3664b8,_0x36d767,_0x9572d1){const _0x2d26a4=a207_0x515962,_0x34129c=parseCliConfigJsonFile(_0x3664b8,_0x36d767,_0x9572d1),_0x5b5035=normalizeLegacyConfigShape(_0x34129c);if(_0x5b5035['migrated'])try{writeNormalizedConfigIfNeeded(_0x3664b8,_0x5b5035['config']);}catch{}return _0x5b5035[_0x2d26a4(0x192)];}export function loadRawConfigLayers(_0x52bde9){const _0x215ff8=a207_0x515962;let _0x5b562a={},_0x21d797={};const _0x2986a8=resolveConfigPath(homedir());_0x2986a8&&(_0x5b562a=parseAndNormalizeConfig(_0x2986a8,_0x215ff8(0x174),_0x215ff8(0x16d)));const _0x5a82e7=_0x52bde9??findProjectRootDirectory(),_0x471962=resolveConfigPath(_0x5a82e7);return _0x471962&&(_0x21d797=parseAndNormalizeConfig(_0x471962,_0x215ff8(0x174),_0x215ff8(0x18a))),{'globalPath':_0x2986a8,'projectPath':_0x471962,'globalConfig':_0x5b562a,'projectConfig':_0x21d797};}const INHERIT_WHITELIST=[a207_0x515962(0x184),a207_0x515962(0x18d),a207_0x515962(0x175),a207_0x515962(0x191),a207_0x515962(0x17a),a207_0x515962(0x177)];export function mergeRawConfigLayers(_0x247f03){const _0x4b6773=a207_0x515962,{globalConfig:_0x216886,projectConfig:_0x284213}=_0x247f03,_0x591bc4=Object['keys'](_0x284213)[_0x4b6773(0x196)]>0x0;if(!_0x591bc4)return mergeGlobalOnly(_0x216886);if(_0x284213[_0x4b6773(0x17f)]===!![])return mergeFullInherit(_0x216886,_0x284213);if(_0x284213[_0x4b6773(0x17f)]===![])return mergeIsolated(_0x284213);return mergeProjectFirst(_0x216886,_0x284213);}function mergeGlobalOnly(_0x21ab79){const _0x5a2227=a207_0x515962,_0x3b8760={..._0x21ab79},_0xffb71a=_0x21ab79['apps']&&typeof _0x21ab79[_0x5a2227(0x18b)]===_0x5a2227(0x199)?_0x21ab79[_0x5a2227(0x18b)]:{};if(Object[_0x5a2227(0x172)](_0xffb71a)[_0x5a2227(0x196)]>0x0)_0x3b8760[_0x5a2227(0x18b)]=_0xffb71a;if(_0x21ab79[_0x5a2227(0x198)])_0x3b8760[_0x5a2227(0x198)]=_0x21ab79[_0x5a2227(0x198)];else{const _0x1ede7a=Object[_0x5a2227(0x172)](_0xffb71a);if(_0x1ede7a[_0x5a2227(0x196)]>0x0)_0x3b8760[_0x5a2227(0x198)]=_0x1ede7a[0x0];}return _0x3b8760;}function mergeIsolated(_0x1b7a3d){const _0x198993=a207_0x515962,_0x3c07a7={..._0x1b7a3d};delete _0x3c07a7[_0x198993(0x17f)];const _0x14f0ba=_0x1b7a3d['apps']&&typeof _0x1b7a3d[_0x198993(0x18b)]===_0x198993(0x199)?_0x1b7a3d[_0x198993(0x18b)]:{};Object[_0x198993(0x172)](_0x14f0ba)[_0x198993(0x196)]>0x0?_0x3c07a7[_0x198993(0x18b)]=_0x14f0ba:delete _0x3c07a7[_0x198993(0x18b)];if(_0x198993(0x198)in _0x1b7a3d)_0x3c07a7['defaultApp']=_0x1b7a3d['defaultApp'];else Object[_0x198993(0x172)](_0x14f0ba)[_0x198993(0x196)]>0x0?_0x3c07a7[_0x198993(0x198)]=Object[_0x198993(0x172)](_0x14f0ba)[0x0]:delete _0x3c07a7['defaultApp'];return _0x3c07a7;}function mergeProjectFirst(_0x4c5d0b,_0x4298c9){const _0x1eb911=a207_0x515962,_0x5f052a={..._0x4298c9};delete _0x5f052a[_0x1eb911(0x17f)];for(const _0x1081d9 of INHERIT_WHITELIST){!(_0x1081d9 in _0x5f052a)&&_0x1081d9 in _0x4c5d0b&&(_0x5f052a[_0x1081d9]=_0x4c5d0b[_0x1081d9]);}const _0x39c12b=_0x4298c9[_0x1eb911(0x18b)]&&typeof _0x4298c9[_0x1eb911(0x18b)]==='object'?_0x4298c9[_0x1eb911(0x18b)]:{};Object[_0x1eb911(0x172)](_0x39c12b)[_0x1eb911(0x196)]>0x0?_0x5f052a[_0x1eb911(0x18b)]=_0x39c12b:delete _0x5f052a['apps'];if('defaultApp'in _0x4298c9)_0x5f052a[_0x1eb911(0x198)]=_0x4298c9[_0x1eb911(0x198)];else Object['keys'](_0x39c12b)[_0x1eb911(0x196)]>0x0?_0x5f052a['defaultApp']=Object[_0x1eb911(0x172)](_0x39c12b)[0x0]:delete _0x5f052a[_0x1eb911(0x198)];return _0x5f052a;}function mergeFullInherit(_0x4338de,_0x3eeb3b){const _0x84c1cc=a207_0x515962,_0xa61b32=_0x4338de[_0x84c1cc(0x18b)]&&typeof _0x4338de[_0x84c1cc(0x18b)]===_0x84c1cc(0x199)?_0x4338de[_0x84c1cc(0x18b)]:{},_0xeaa109=_0x3eeb3b[_0x84c1cc(0x18b)]&&typeof _0x3eeb3b['apps']===_0x84c1cc(0x199)?_0x3eeb3b[_0x84c1cc(0x18b)]:{},_0x51b26a={..._0xa61b32,..._0xeaa109},_0x4912ad={..._0x4338de,..._0x3eeb3b};delete _0x4912ad[_0x84c1cc(0x17f)];if(Object[_0x84c1cc(0x172)](_0x51b26a)['length']>0x0)_0x4912ad[_0x84c1cc(0x18b)]=_0x51b26a;if(_0x84c1cc(0x198)in _0x3eeb3b)_0x4912ad['defaultApp']=_0x3eeb3b[_0x84c1cc(0x198)];else{if(Object[_0x84c1cc(0x172)](_0xeaa109)[_0x84c1cc(0x196)]>0x0)_0x4912ad[_0x84c1cc(0x198)]=Object[_0x84c1cc(0x172)](_0xeaa109)[0x0];else{if(_0x4338de[_0x84c1cc(0x198)])_0x4912ad[_0x84c1cc(0x198)]=_0x4338de['defaultApp'];else{const _0x4125c7=Object[_0x84c1cc(0x172)](_0xa61b32);if(_0x4125c7[_0x84c1cc(0x196)]>0x0)_0x4912ad[_0x84c1cc(0x198)]=_0x4125c7[0x0];}}}return _0x4912ad;}function a207_0xa763(_0xd766f1,_0x4170db){_0xd766f1=_0xd766f1-0x169;const _0x30ecd0=a207_0x30ec();let _0xa76310=_0x30ecd0[_0xd766f1];return _0xa76310;}export function readRawConfigWithLayers(_0x40343f){const _0x4e79e5=loadRawConfigLayers(_0x40343f);return{'config':mergeRawConfigLayers(_0x4e79e5),'layers':_0x4e79e5};}export function readRawConfig(_0x49cd82){return mergeRawConfigLayers(loadRawConfigLayers(_0x49cd82));}export function readConfigFile(_0x177010){return parseAndNormalizeConfig(_0x177010,'silent');}export function writeConfigFile(_0x583285,_0x24282d){const _0x2b99ae=a207_0x515962,_0x48d686=dirname(_0x583285);!existsSync(_0x48d686)&&mkdirSync(_0x48d686,{'recursive':!![]});const _0x5f211a=_0x583285+_0x2b99ae(0x16e);try{writeFileSync(_0x5f211a,JSON[_0x2b99ae(0x169)](_0x24282d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5f211a,_0x583285);}catch(_0x2d495a){try{unlinkSync(_0x5f211a);}catch{}throw _0x2d495a;}}export function resolveWriteConfigPath(_0x1536a1){const _0x3c3c2b=a207_0x515962,_0x980a19=_0x1536a1===_0x3c3c2b(0x179)?process[_0x3c3c2b(0x185)]():homedir(),_0x3b227f=resolveConfigPath(_0x980a19);return _0x3b227f??resolve(_0x980a19,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a208_0x16ba18=a208_0x37c4;(function(_0x693f80,_0x233ab5){const _0xda200f=a208_0x37c4,_0x2c9142=_0x693f80();while(!![]){try{const _0x1734b3=parseInt(_0xda200f(0x80))/0x1+parseInt(_0xda200f(0x93))/0x2+-parseInt(_0xda200f(0x94))/0x3+-parseInt(_0xda200f(0x8d))/0x4*(parseInt(_0xda200f(0x88))/0x5)+-parseInt(_0xda200f(0x95))/0x6*(-parseInt(_0xda200f(0x7e))/0x7)+parseInt(_0xda200f(0x7f))/0x8*(parseInt(_0xda200f(0x9f))/0x9)+parseInt(_0xda200f(0xa4))/0xa;if(_0x1734b3===_0x233ab5)break;else _0x2c9142['push'](_0x2c9142['shift']());}catch(_0x136a85){_0x2c9142['push'](_0x2c9142['shift']());}}}(a208_0x3ad2,0x6c0c2));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(_0x3285d0){return process.env[`RABETBASE_${_0x3285d0}`]||process.env[`LOVRABET_${_0x3285d0}`]||undefined;}function a208_0x37c4(_0x2556ad,_0x3c6d19){_0x2556ad=_0x2556ad-0x7d;const _0x3ad24e=a208_0x3ad2();let _0x37c449=_0x3ad24e[_0x2556ad];return _0x37c449;}export async function createContext(_0x36a852){const _0x5e3bee=a208_0x37c4,{config:_0x25cdb7,layers:_0x3ca5e4}=readRawConfigWithLayers(),_0xb2990b=buildConfig(_0x25cdb7,_0x36a852,_0x3ca5e4),{initEnv:_0x1c73d4}=await import(_0x5e3bee(0x8f));if(_0xb2990b['env'])_0x1c73d4(_0xb2990b[_0x5e3bee(0x82)]);else _0x36a852['env']&&typeof _0x36a852[_0x5e3bee(0x82)]===_0x5e3bee(0xa1)&&_0x1c73d4(_0x36a852[_0x5e3bee(0x82)]);const {initDomains:_0x2693ee,getUserDomain:_0x15f218,getApiDomain:_0x59b1cd}=await import('./constant/domain.js');_0x2693ee({'apiDomain':_0x25cdb7['apiDomain']||undefined,'userDomain':_0x25cdb7[_0x5e3bee(0x90)]||undefined,'runtimeDomain':_0x25cdb7[_0x5e3bee(0xa3)]||undefined});const _0x7d9c4f={'apiDomain':_0x59b1cd(),'userDomain':_0x15f218()},_0x223d48=await buildAuth(_0xb2990b);logger[_0x5e3bee(0x85)](process['cwd']());const _0x35d1f7=(CLI_BIN_NAME+'\x20'+process['argv'][_0x5e3bee(0x9b)](0x2)['join']('\x20'))[_0x5e3bee(0x98)]();logger['setRawCommand'](_0x35d1f7);const {isNonInteractive:_0x1cf994}=await import(_0x5e3bee(0x81)),_0x47acb4=_0x1cf994(_0x36a852);return{'config':_0xb2990b,'auth':_0x223d48,'logger':logger,'env':_0x7d9c4f,'nonInteractive':_0x47acb4};}export function buildConfigFromFlags(_0xb225b7){const {config:_0x21c2ce,layers:_0x181f00}=readRawConfigWithLayers();return buildConfig(_0x21c2ce,_0xb225b7,_0x181f00);}export function getConfigAppCode(_0x546fcc){const _0x8314e=a208_0x37c4,_0x444398=readRawConfig(_0x546fcc);if(_0x444398[_0x8314e(0x89)]&&typeof _0x444398[_0x8314e(0x89)]===_0x8314e(0x9a)){const _0x4e7e9e=_0x444398[_0x8314e(0x86)];if(_0x4e7e9e&&_0x444398[_0x8314e(0x89)][_0x4e7e9e]?.[_0x8314e(0x83)])return String(_0x444398['apps'][_0x4e7e9e][_0x8314e(0x83)])[_0x8314e(0x98)]();const _0x3fc2c9=Object[_0x8314e(0x99)](_0x444398[_0x8314e(0x89)])[0x0];if(_0x3fc2c9?.[_0x8314e(0x83)])return String(_0x3fc2c9[_0x8314e(0x83)])['trim']();}const _0xb79c6d=_0x444398[_0x8314e(0x83)]||_0x444398[_0x8314e(0x8b)];if(typeof _0xb79c6d!==_0x8314e(0xa1)||_0xb79c6d[_0x8314e(0x98)]()==='')return undefined;return _0xb79c6d[_0x8314e(0x98)]();}function a208_0x3ad2(){const _0x2f2bd3=['keys','setLogPath','defaultApp','template_base_url','5cDPdwT','apps','https://g.lovrabet.com/dist/lovrabet-skill','app','cookie','2364244lmZoiW','project','./constant/env.js','userDomain','globalConfig','entries','1066248mxtEXw','2242389VbgqFm','650520nzuncc','apiDir','length','trim','values','object','slice','api.ts','projectConfig','find','513036SoJhoi','replace','string','filter','runtimeDomain','1984670sdWOST','-api.ts','7KtkjRi','56XgDUfx','542047tsYRUv','./utils/is-non-interactive.js','env','appcode'];a208_0x3ad2=function(){return _0x2f2bd3;};return a208_0x3ad2();}export function getMultiAppConfigs(_0x4f0a53=a208_0x16ba18(0x8e),_0x184cdf){const _0xd08c3d=a208_0x16ba18,_0x3378d1=loadRawConfigLayers(_0x184cdf);let _0x24d22f,_0x66baac;if(_0x4f0a53==='merged'){const _0x417641=_0x3378d1[_0xd08c3d(0x91)][_0xd08c3d(0x89)]&&typeof _0x3378d1[_0xd08c3d(0x91)][_0xd08c3d(0x89)]==='object'?_0x3378d1['globalConfig'][_0xd08c3d(0x89)]:{},_0xd0bdb1=_0x3378d1[_0xd08c3d(0x9d)][_0xd08c3d(0x89)]&&typeof _0x3378d1[_0xd08c3d(0x9d)]['apps']===_0xd08c3d(0x9a)?_0x3378d1[_0xd08c3d(0x9d)]['apps']:{};_0x24d22f={..._0x417641,..._0xd0bdb1};const _0x3d459e=readRawConfig(_0x184cdf);_0x66baac=_0x3d459e[_0xd08c3d(0x86)];}else _0x24d22f=_0x3378d1[_0xd08c3d(0x9d)][_0xd08c3d(0x89)],_0x66baac=_0x3378d1[_0xd08c3d(0x9d)][_0xd08c3d(0x86)];if(!_0x24d22f||typeof _0x24d22f!==_0xd08c3d(0x9a)||Object[_0xd08c3d(0x84)](_0x24d22f)[_0xd08c3d(0x97)]===0x0)return null;return Object['entries'](_0x24d22f)['map'](([_0x1f3fd7,_0x4a18c4])=>({'name':_0x1f3fd7,'appcode':_0x4a18c4?.['appcode']||'','isDefault':_0x1f3fd7===_0x66baac,'env':_0x4a18c4?.['env'],'apiDir':_0x4a18c4?.[_0xd08c3d(0x96)],'cookie':_0x4a18c4?.[_0xd08c3d(0x8c)]||undefined}))[_0xd08c3d(0xa2)](_0x3a1471=>_0x3a1471[_0xd08c3d(0x83)]);}export function getTemplateBaseUrl(_0x3f2ae0){const _0x1a00b2=a208_0x16ba18,_0x28dec9=readRawConfig(_0x3f2ae0);if(_0x28dec9['template_base_url']&&typeof _0x28dec9[_0x1a00b2(0x87)]==='string')return _0x28dec9[_0x1a00b2(0x87)][_0x1a00b2(0xa0)](/\/$/,'');return _0x1a00b2(0x8a);}function buildConfig(_0x5e6813,_0x2a0fd1,_0x4481d7){return{...resolveAppConfig({'raw':_0x5e6813,'flags':_0x2a0fd1,'layers':_0x4481d7,'readEnv':env}),'raw':_0x5e6813};}export function resolveApiFilePath(_0xb4e762,_0x4d2c6b){const _0x5a902e=a208_0x16ba18,_0x654f9a=resolve(process['cwd'](),_0xb4e762),_0x1d1c6c=resolve(_0x654f9a,_0x5a902e(0x9c));if(!_0x4d2c6b)return _0x1d1c6c;const _0x3b48db=readRawConfig(),_0x234b39=_0x3b48db[_0x5a902e(0x89)]&&typeof _0x3b48db[_0x5a902e(0x89)]===_0x5a902e(0x9a)?_0x3b48db[_0x5a902e(0x89)]:{},_0x4bed96=Object[_0x5a902e(0x92)](_0x234b39)[_0x5a902e(0x9e)](([,_0x24e551])=>_0x24e551?.[_0x5a902e(0x83)]===_0x4d2c6b);if(!_0x4bed96)return _0x1d1c6c;const [_0x5f4ac3,_0x245910]=_0x4bed96,_0x87af7=typeof _0x3b48db[_0x5a902e(0x86)]===_0x5a902e(0xa1)?_0x3b48db[_0x5a902e(0x86)]:undefined;if(_0x245910?.['apiDir'])return _0x1d1c6c;if(_0x87af7&&_0x5f4ac3!==_0x87af7)return resolve(_0x654f9a,_0x5f4ac3+_0x5a902e(0x7d));return _0x1d1c6c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2348d8,_0x3cb20a){const _0x1af28d=a209_0xc654,_0x5631fc=_0x2348d8();while(!![]){try{const _0x402ca3=-parseInt(_0x1af28d(0xb3))/0x1*(-parseInt(_0x1af28d(0xa8))/0x2)+-parseInt(_0x1af28d(0xb2))/0x3+parseInt(_0x1af28d(0xb4))/0x4+parseInt(_0x1af28d(0xa6))/0x5*(parseInt(_0x1af28d(0xa5))/0x6)+parseInt(_0x1af28d(0xab))/0x7+-parseInt(_0x1af28d(0xaa))/0x8*(parseInt(_0x1af28d(0xb0))/0x9)+-parseInt(_0x1af28d(0xa7))/0xa*(parseInt(_0x1af28d(0xae))/0xb);if(_0x402ca3===_0x3cb20a)break;else _0x5631fc['push'](_0x5631fc['shift']());}catch(_0x5ebff7){_0x5631fc['push'](_0x5631fc['shift']());}}}(a209_0x3fad,0xe4fba));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x2022c5){const _0x6b56cc=[],_0x54a97a=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x9d57bc;while((_0x9d57bc=_0x54a97a['exec'](_0x2022c5))!==null){_0x6b56cc['push']({'datasetCode':_0x9d57bc[0x1],'tableName':_0x9d57bc[0x2],'name':_0x9d57bc[0x3],'alias':_0x9d57bc[0x4]});}return _0x6b56cc;}export function loadAliasMap(_0x2f7a86,_0x528e17,_0x29ee8f){const _0x30a1b0=a209_0xc654,_0x4a146b=_0x29ee8f??resolve(process['cwd'](),_0x2f7a86,_0x30a1b0(0xa9));if(cache[_0x30a1b0(0xb1)](_0x4a146b))return cache[_0x30a1b0(0xa4)](_0x4a146b);if(!existsSync(_0x4a146b))return cache['set'](_0x4a146b,[]),[];try{const _0x303435=readFileSync(_0x4a146b,'utf-8'),_0x5f586e=parseApiFile(_0x303435);return cache[_0x30a1b0(0xaf)](_0x4a146b,_0x5f586e),_0x5f586e;}catch{return cache[_0x30a1b0(0xaf)](_0x4a146b,[]),[];}}export function resolveAlias(_0x1205c9,_0x4f6a7a,_0x2936b5,_0x2f2caa){const _0x3ad73d=a209_0xc654;if(!_0x4f6a7a)return undefined;const _0x599153=loadAliasMap(_0x1205c9,_0x2936b5,_0x2f2caa),_0x1faca0=_0x599153['find'](_0x27bfab=>_0x27bfab[_0x3ad73d(0xad)]===_0x4f6a7a);return _0x1faca0?.[_0x3ad73d(0xac)];}function a209_0x3fad(){const _0x242c12=['datasetCode','alias','23350987VLRRXi','set','6325065dBMmfH','has','3252039tZvYYx','649yvHRtU','4446520bqZDtd','get','57978AbaSLa','775uMnnjk','10xUXPnt','4652GanKgr','api.ts','8xJmjhD','5099920JXojzO'];a209_0x3fad=function(){return _0x242c12;};return a209_0x3fad();}function a209_0xc654(_0x4e1a84,_0x2d3548){_0x4e1a84=_0x4e1a84-0xa4;const _0x3fade7=a209_0x3fad();let _0xc654e2=_0x3fade7[_0x4e1a84];return _0xc654e2;}export function listAliases(_0x3d9e37,_0x927d31,_0x1efc82){return loadAliasMap(_0x3d9e37,_0x927d31,_0x1efc82);}
|