@lovrabet/rabetbase-cli 2.3.4 → 2.3.5
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 -1
- 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 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/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 -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/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-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a167_0xc99923=a167_0x5de0;(function(_0x51f9d3,_0x2b40ec){const _0x4efb0c=a167_0x5de0,_0x220820=_0x51f9d3();while(!![]){try{const _0x65de41=parseInt(_0x4efb0c(0x13f))/0x1+parseInt(_0x4efb0c(0x16c))/0x2*(parseInt(_0x4efb0c(0x11d))/0x3)+parseInt(_0x4efb0c(0x178))/0x4+-parseInt(_0x4efb0c(0x135))/0x5*(-parseInt(_0x4efb0c(0x12c))/0x6)+-parseInt(_0x4efb0c(0x155))/0x7*(parseInt(_0x4efb0c(0x16d))/0x8)+parseInt(_0x4efb0c(0x10a))/0x9+-parseInt(_0x4efb0c(0x141))/0xa;if(_0x65de41===_0x2b40ec)break;else _0x220820['push'](_0x220820['shift']());}catch(_0x476064){_0x220820['push'](_0x220820['shift']());}}}(a167_0x1c09,0x97984));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a167_0xc99923(0x14e);export const NPM_PACKAGE_NAME=a167_0xc99923(0x149);export const GLOBAL_FLAGS=[{'name':a167_0xc99923(0x12f),'meowKey':a167_0xc99923(0x12f),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x12a),'hint':'<code>'},{'name':'app','meowKey':'app','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x164),'hint':a167_0xc99923(0x17a)},{'name':a167_0xc99923(0x150),'meowKey':a167_0xc99923(0x150),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x139),'hint':a167_0xc99923(0x11f)},{'name':'format','meowKey':a167_0xc99923(0x15c),'type':'string','description':a167_0xc99923(0x113),'hint':a167_0xc99923(0x11c)},{'name':'jq','meowKey':'jq','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x14b),'hint':a167_0xc99923(0x13a)},{'name':'dry-run','meowKey':'dryRun','type':a167_0xc99923(0x126),'description':a167_0xc99923(0x123)},{'name':a167_0xc99923(0x171),'meowKey':a167_0xc99923(0x171),'type':a167_0xc99923(0x126),'description':a167_0xc99923(0x147)},{'name':a167_0xc99923(0x146),'meowKey':a167_0xc99923(0x169),'type':'boolean','description':a167_0xc99923(0x154)},{'name':a167_0xc99923(0x14a),'meowKey':a167_0xc99923(0x14a),'type':a167_0xc99923(0x126),'description':a167_0xc99923(0x158)},{'name':a167_0xc99923(0x133),'meowKey':a167_0xc99923(0x133),'type':a167_0xc99923(0x126),'description':a167_0xc99923(0x13e)},{'name':'ci','meowKey':'ci','type':a167_0xc99923(0x126),'description':a167_0xc99923(0x16a),'hidden':!![]},{'name':'help','meowKey':a167_0xc99923(0x173),'type':a167_0xc99923(0x126),'description':'Show\x20help'},{'name':a167_0xc99923(0x121),'meowKey':a167_0xc99923(0x121),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x142),'hidden':!![]},{'name':'title','meowKey':a167_0xc99923(0x162),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x16f),'hidden':!![]},{'name':a167_0xc99923(0x143),'meowKey':a167_0xc99923(0x143),'type':'boolean','description':a167_0xc99923(0x125),'hidden':!![]},{'name':a167_0xc99923(0x14f),'meowKey':a167_0xc99923(0x14f),'type':a167_0xc99923(0x126),'description':a167_0xc99923(0x148),'hidden':!![]},{'name':'output','meowKey':'output','type':a167_0xc99923(0x144),'description':'Output\x20path','hidden':!![]},{'name':a167_0xc99923(0x15f),'meowKey':a167_0xc99923(0x15f),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x174),'hidden':!![]},{'name':a167_0xc99923(0x111),'meowKey':a167_0xc99923(0x111),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x156),'hidden':!![]},{'name':a167_0xc99923(0x151),'meowKey':'all','type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':a167_0xc99923(0x152),'meowKey':a167_0xc99923(0x12b),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x10f),'hidden':!![]},{'name':'type','meowKey':a167_0xc99923(0x119),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x136),'hidden':!![]},{'name':a167_0xc99923(0x14d),'meowKey':a167_0xc99923(0x14d),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x120),'hidden':!![]},{'name':'sqlcode','meowKey':a167_0xc99923(0x116),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x10c),'hidden':!![]},{'name':a167_0xc99923(0x129),'meowKey':a167_0xc99923(0x15e),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x110),'hidden':!![]},{'name':a167_0xc99923(0x10e),'meowKey':'sqlname','type':'string','description':'SQL\x20name','hidden':!![]},{'name':'db-id','meowKey':a167_0xc99923(0x137),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x11b),'hidden':!![]},{'name':'dbid','meowKey':a167_0xc99923(0x11e),'type':a167_0xc99923(0x144),'description':'DB\x20ID','hidden':!![]},{'name':'description','meowKey':a167_0xc99923(0x170),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x109),'hidden':!![]},{'name':a167_0xc99923(0x117),'meowKey':a167_0xc99923(0x132),'type':'string','description':a167_0xc99923(0x12e),'hidden':!![]},{'name':a167_0xc99923(0x13b),'meowKey':a167_0xc99923(0x13b),'type':a167_0xc99923(0x144),'description':'Page\x20number','hidden':!![]},{'name':a167_0xc99923(0x177),'meowKey':a167_0xc99923(0x177),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x118),'hidden':!![]},{'name':a167_0xc99923(0x108),'meowKey':a167_0xc99923(0x108),'type':'string','description':a167_0xc99923(0x112),'hidden':!![]},{'name':'code','meowKey':a167_0xc99923(0x15b),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x157),'hidden':!![]},{'name':a167_0xc99923(0x159),'meowKey':a167_0xc99923(0x159),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x161),'hidden':!![]},{'name':a167_0xc99923(0x11a),'meowKey':a167_0xc99923(0x11a),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x138),'hidden':!![]},{'name':a167_0xc99923(0x165),'meowKey':'operation','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x168),'hidden':!![]},{'name':a167_0xc99923(0x140),'meowKey':'target','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x134),'hidden':!![]},{'name':a167_0xc99923(0x17b),'meowKey':a167_0xc99923(0x12d),'type':a167_0xc99923(0x126),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a167_0xc99923(0x130),'meowKey':'key','type':a167_0xc99923(0x144),'description':a167_0xc99923(0x131),'hidden':!![]},{'name':a167_0xc99923(0x176),'meowKey':a167_0xc99923(0x176),'type':'string','description':'Config\x20value','hidden':!![]},{'name':a167_0xc99923(0x172),'meowKey':a167_0xc99923(0x172),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x175),'hidden':!![]},{'name':a167_0xc99923(0x15d),'meowKey':'stdin','type':a167_0xc99923(0x126),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':a167_0xc99923(0x179),'meowKey':a167_0xc99923(0x10d),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x127),'hidden':!![]},{'name':a167_0xc99923(0x14c),'meowKey':'reveal','type':a167_0xc99923(0x126),'description':a167_0xc99923(0x15a),'hidden':!![]},{'name':a167_0xc99923(0x166),'meowKey':a167_0xc99923(0x166),'type':'boolean','description':a167_0xc99923(0x124),'hidden':!![]},{'name':'confirm','meowKey':'confirm','type':a167_0xc99923(0x126),'description':a167_0xc99923(0x114),'hidden':!![]},{'name':a167_0xc99923(0x115),'meowKey':a167_0xc99923(0x115),'type':a167_0xc99923(0x126),'description':'Use\x20remote','hidden':!![]},{'name':a167_0xc99923(0x10b),'meowKey':a167_0xc99923(0x10b),'type':a167_0xc99923(0x126),'description':a167_0xc99923(0x163),'hidden':!![]},{'name':a167_0xc99923(0x153),'meowKey':a167_0xc99923(0x167),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x13c),'hidden':!![]},{'name':a167_0xc99923(0x16e),'meowKey':a167_0xc99923(0x16b),'type':a167_0xc99923(0x144),'description':a167_0xc99923(0x168),'hidden':!![]},{'name':a167_0xc99923(0x160),'meowKey':a167_0xc99923(0x13d),'type':'string','description':'Function\x20node','hidden':!![]}];function a167_0x1c09(){const _0x3e198b=['yes','tags','help','JSON\x20params','Tags','value','pagesize','717156yYhqiI','from-env','<name>','skip-imports','keyword','Description','6278760rFFuob','verbose','SQL\x20code','fromEnv','sqlname','Record\x20ID','SQL\x20name','datasetcode','Keyword\x20filter','Output\x20format','Confirm\x20destructive\x20action','remote','sqlcode','description-file','Page\x20size','type','schemas','DB\x20ID','json\x20|\x20pretty\x20|\x20compress','1371GazfdA','dbid','production\x20|\x20daily','File\x20path','name','map','Preview\x20operation\x20without\x20executing','Force\x20overwrite','Clear','boolean','Read\x20value\x20from\x20environment\x20variable','app','sql-name','Override\x20appcode','enableBffSave','6fzhjJQ','skipImports','Description\x20file','appcode','key','Config\x20key','descriptionFile','project','Target\x20path','4325455KNjXes','Type\x20filter','dbId','Schemas','Environment','<expr>','page','Expected\x20affected\x20count','functionNode','Use\x20project\x20config\x20scope','221760tbJWQK','target','14321960vyLIan','Name','clear','string','meowKey','non-interactive','Skip\x20confirmation\x20for\x20high-risk\x20writes','Watch\x20mode','@lovrabet/rabetbase-cli','global','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','reveal','file','Rabetbase\x20CLI','watch','env','all','enable-bff-save','expected-count','Force\x20non-interactive\x20mode\x20(CI)','20433DLYULR','Dataset\x20code','Code\x20filter','Use\x20global\x20config\x20scope','sql','Reveal\x20sensitive\x20value','code','format','stdin','sqlName','params','function-node','SQL\x20string','title','Verbose\x20output','Select\x20app\x20profile\x20by\x20name','operation','force','expectedCount','Operation\x20type','nonInteractive','Alias\x20for\x20--non-interactive','operationType','2716nCGtuK','1456OkOaWo','operation-type','Title','description'];a167_0x1c09=function(){return _0x3e198b;};return a167_0x1c09();}function a167_0x5de0(_0x585104,_0x47ec3e){_0x585104=_0x585104-0x108;const _0x1c0911=a167_0x1c09();let _0x5de0b9=_0x1c0911[_0x585104];return _0x5de0b9;}export const PIPELINE_FLAG_NAMES=new Set([a167_0xc99923(0x12f),a167_0xc99923(0x128),a167_0xc99923(0x150),a167_0xc99923(0x15c),'jq','dry-run',a167_0xc99923(0x171),'non-interactive','ci']);export function buildMeowFlags(){const _0x45240c=a167_0xc99923;return Object['fromEntries'](GLOBAL_FLAGS[_0x45240c(0x122)](_0x19f30f=>[_0x19f30f[_0x45240c(0x145)],{'type':_0x19f30f[_0x45240c(0x119)]}]));}
|
|
1
|
+
const a167_0x1f05ee=a167_0x58ab;(function(_0x2585a2,_0x39f50e){const _0x2df390=a167_0x58ab,_0x4db205=_0x2585a2();while(!![]){try{const _0x19f0c9=-parseInt(_0x2df390(0xf0))/0x1+parseInt(_0x2df390(0x117))/0x2*(parseInt(_0x2df390(0xe5))/0x3)+parseInt(_0x2df390(0xdb))/0x4*(-parseInt(_0x2df390(0xf3))/0x5)+-parseInt(_0x2df390(0x119))/0x6+parseInt(_0x2df390(0xef))/0x7*(-parseInt(_0x2df390(0x129))/0x8)+-parseInt(_0x2df390(0xf5))/0x9*(-parseInt(_0x2df390(0x106))/0xa)+-parseInt(_0x2df390(0xff))/0xb*(-parseInt(_0x2df390(0x10e))/0xc);if(_0x19f0c9===_0x39f50e)break;else _0x4db205['push'](_0x4db205['shift']());}catch(_0x4636ab){_0x4db205['push'](_0x4db205['shift']());}}}(a167_0x5ad6,0x1ba0c));export const CLI_BIN_NAME='rabetbase';function a167_0x58ab(_0x47b5f7,_0x2dc560){_0x47b5f7=_0x47b5f7-0xce;const _0x5ad68d=a167_0x5ad6();let _0x58abed=_0x5ad68d[_0x47b5f7];return _0x58abed;}export const CLI_DISPLAY_NAME=a167_0x1f05ee(0xf1);export const NPM_PACKAGE_NAME=a167_0x1f05ee(0x12d);export const GLOBAL_FLAGS=[{'name':a167_0x1f05ee(0xe2),'meowKey':a167_0x1f05ee(0xe2),'type':'string','description':a167_0x1f05ee(0xfa),'hint':a167_0x1f05ee(0xf4)},{'name':'app','meowKey':'app','type':'string','description':a167_0x1f05ee(0xd2),'hint':a167_0x1f05ee(0x109)},{'name':a167_0x1f05ee(0x124),'meowKey':a167_0x1f05ee(0x124),'type':a167_0x1f05ee(0x12a),'description':'Environment','hint':a167_0x1f05ee(0x116)},{'name':a167_0x1f05ee(0x12f),'meowKey':a167_0x1f05ee(0x12f),'type':'string','description':a167_0x1f05ee(0x113),'hint':a167_0x1f05ee(0xe3)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':'<expr>'},{'name':a167_0x1f05ee(0xdc),'meowKey':a167_0x1f05ee(0x13c),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x11d)},{'name':a167_0x1f05ee(0xfc),'meowKey':a167_0x1f05ee(0xfc),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x13d)},{'name':a167_0x1f05ee(0x12b),'meowKey':a167_0x1f05ee(0xdd),'type':a167_0x1f05ee(0x127),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':'global','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xfd)},{'name':'project','meowKey':a167_0x1f05ee(0xd4),'type':'boolean','description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xd7),'hidden':!![]},{'name':a167_0x1f05ee(0x122),'meowKey':a167_0x1f05ee(0x122),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x105)},{'name':'name','meowKey':a167_0x1f05ee(0x10d),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10c),'hidden':!![]},{'name':'title','meowKey':a167_0x1f05ee(0xed),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10b),'hidden':!![]},{'name':a167_0x1f05ee(0xe4),'meowKey':a167_0x1f05ee(0xe4),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xee),'hidden':!![]},{'name':a167_0x1f05ee(0xf6),'meowKey':a167_0x1f05ee(0xf6),'type':a167_0x1f05ee(0x127),'description':'Watch\x20mode','hidden':!![]},{'name':'output','meowKey':a167_0x1f05ee(0xe0),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xf8),'hidden':!![]},{'name':'params','meowKey':'params','type':a167_0x1f05ee(0x12a),'description':'JSON\x20params','hidden':!![]},{'name':'datasetcode','meowKey':a167_0x1f05ee(0x120),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10a),'hidden':!![]},{'name':'all','meowKey':a167_0x1f05ee(0x12c),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x104),'hidden':!![]},{'name':a167_0x1f05ee(0x102),'meowKey':'enableBffSave','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x13a),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a167_0x1f05ee(0x101),'hidden':!![]},{'name':a167_0x1f05ee(0xdf),'meowKey':a167_0x1f05ee(0xdf),'type':'string','description':a167_0x1f05ee(0xd8),'hidden':!![]},{'name':a167_0x1f05ee(0x111),'meowKey':a167_0x1f05ee(0x111),'type':a167_0x1f05ee(0x12a),'description':'File\x20path','hidden':!![]},{'name':a167_0x1f05ee(0x11c),'meowKey':a167_0x1f05ee(0x11c),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x114),'hidden':!![]},{'name':a167_0x1f05ee(0x134),'meowKey':a167_0x1f05ee(0x135),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x107),'hidden':!![]},{'name':a167_0x1f05ee(0xd9),'meowKey':'sqlname','type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x107),'hidden':!![]},{'name':a167_0x1f05ee(0xeb),'meowKey':a167_0x1f05ee(0x136),'type':a167_0x1f05ee(0x12a),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':'dbid','type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x11b),'hidden':!![]},{'name':a167_0x1f05ee(0xe9),'meowKey':a167_0x1f05ee(0xe9),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x12e),'hidden':!![]},{'name':a167_0x1f05ee(0xfb),'meowKey':a167_0x1f05ee(0xd3),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x110),'hidden':!![]},{'name':a167_0x1f05ee(0xd0),'meowKey':a167_0x1f05ee(0xd0),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xda),'hidden':!![]},{'name':'pagesize','meowKey':a167_0x1f05ee(0xfe),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x132),'hidden':!![]},{'name':a167_0x1f05ee(0xd6),'meowKey':a167_0x1f05ee(0xd6),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x133),'hidden':!![]},{'name':a167_0x1f05ee(0xe6),'meowKey':a167_0x1f05ee(0xe6),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x108),'hidden':!![]},{'name':'sql','meowKey':a167_0x1f05ee(0x139),'type':a167_0x1f05ee(0x12a),'description':'SQL\x20string','hidden':!![]},{'name':a167_0x1f05ee(0x103),'meowKey':'schemas','type':'string','description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a167_0x1f05ee(0x131),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x11f),'hidden':!![]},{'name':a167_0x1f05ee(0xd5),'meowKey':a167_0x1f05ee(0xd5),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x100),'hidden':!![]},{'name':a167_0x1f05ee(0x115),'meowKey':a167_0x1f05ee(0x11a),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xd1),'hidden':!![]},{'name':a167_0x1f05ee(0x126),'meowKey':a167_0x1f05ee(0x126),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xf2),'hidden':!![]},{'name':a167_0x1f05ee(0x121),'meowKey':a167_0x1f05ee(0x121),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x118),'hidden':!![]},{'name':a167_0x1f05ee(0x11e),'meowKey':a167_0x1f05ee(0x11e),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xe1),'hidden':!![]},{'name':'stdin','meowKey':'stdin','type':'boolean','description':a167_0x1f05ee(0x128),'hidden':!![]},{'name':'from-env','meowKey':a167_0x1f05ee(0x137),'type':'string','description':a167_0x1f05ee(0x10f),'hidden':!![]},{'name':a167_0x1f05ee(0x138),'meowKey':a167_0x1f05ee(0x138),'type':'boolean','description':a167_0x1f05ee(0x125),'hidden':!![]},{'name':a167_0x1f05ee(0xe7),'meowKey':a167_0x1f05ee(0xe7),'type':'boolean','description':a167_0x1f05ee(0xec),'hidden':!![]},{'name':a167_0x1f05ee(0xcf),'meowKey':a167_0x1f05ee(0xcf),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xf7),'hidden':!![]},{'name':'remote','meowKey':a167_0x1f05ee(0xde),'type':a167_0x1f05ee(0x127),'description':'Use\x20remote','hidden':!![]},{'name':'verbose','meowKey':a167_0x1f05ee(0xea),'type':a167_0x1f05ee(0x127),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':a167_0x1f05ee(0xf9),'type':a167_0x1f05ee(0x12a),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':a167_0x1f05ee(0x130),'type':a167_0x1f05ee(0x12a),'description':'Operation\x20type','hidden':!![]},{'name':'function-node','meowKey':a167_0x1f05ee(0x112),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x13b),'hidden':!![]}];function a167_0x5ad6(){const _0x41a22f=['clear','543ffDRWM','code','force','meowKey','description','verbose','db-id','Force\x20overwrite','title','Clear','318073mlKBnK','41270ZjrDyG','Rabetbase\x20CLI','Config\x20key','12680vcxuOv','<code>','8163QGWmMz','watch','Confirm\x20destructive\x20action','Output\x20path','expectedCount','Override\x20appcode','description-file','yes','Use\x20global\x20config\x20scope','pagesize','11pZXBOp','Target\x20path','Record\x20ID','enable-bff-save','schemas','Apply\x20to\x20all','Show\x20help','310CZccxG','SQL\x20name','Code\x20filter','<name>','Dataset\x20code','Title','Name','name','2054772zSHmxI','Read\x20value\x20from\x20environment\x20variable','Description\x20file','file','functionNode','Output\x20format','SQL\x20code','skip-imports','production\x20|\x20daily','1202yUsNoc','Config\x20value','482160nPshXt','skipImports','DB\x20ID','sqlcode','Preview\x20operation\x20without\x20executing','tags','Operation\x20type','datasetcode','value','help','fromEntries','env','Reveal\x20sensitive\x20value','key','boolean','Read\x20value\x20from\x20stdin','8gfgphP','string','non-interactive','all','@lovrabet/rabetbase-cli','Description','format','operationType','operation','Page\x20size','Keyword\x20filter','sql-name','sqlName','dbId','fromEnv','reveal','sql','Enable\x20BFF\x20save','Function\x20node','dryRun','Skip\x20confirmation\x20for\x20high-risk\x20writes','app','confirm','page','Skip\x20import\x20generation','Select\x20app\x20profile\x20by\x20name','descriptionFile','project','target','keyword','Alias\x20for\x20--non-interactive','Type\x20filter','sqlname','Page\x20number','44lqohLE','dry-run','nonInteractive','remote','type','output','Tags','appcode','json\x20|\x20pretty\x20|\x20compress'];a167_0x5ad6=function(){return _0x41a22f;};return a167_0x5ad6();}export const PIPELINE_FLAG_NAMES=new Set(['appcode',a167_0x1f05ee(0xce),a167_0x1f05ee(0x124),a167_0x1f05ee(0x12f),'jq',a167_0x1f05ee(0xdc),a167_0x1f05ee(0xfc),a167_0x1f05ee(0x12b),'ci']);export function buildMeowFlags(){const _0x12ad6e=a167_0x1f05ee;return Object[_0x12ad6e(0x123)](GLOBAL_FLAGS['map'](_0x267b40=>[_0x267b40[_0x12ad6e(0xe8)],{'type':_0x267b40['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a168_0x2512e8=a168_0x3ed5;(function(_0x1f47fa,_0x520e31){const _0x234e8e=a168_0x3ed5,_0x397883=_0x1f47fa();while(!![]){try{const _0x4c9cb7=parseInt(_0x234e8e(0x64))/0x1+parseInt(_0x234e8e(0x70))/0x2+-parseInt(_0x234e8e(0x67))/0x3*(-parseInt(_0x234e8e(0x69))/0x4)+-parseInt(_0x234e8e(0x66))/0x5+-parseInt(_0x234e8e(0x68))/0x6+-parseInt(_0x234e8e(0x6d))/0x7*(-parseInt(_0x234e8e(0x6e))/0x8)+-parseInt(_0x234e8e(0x6a))/0x9;if(_0x4c9cb7===_0x520e31)break;else _0x397883['push'](_0x397883['shift']());}catch(_0x3d0307){_0x397883['push'](_0x397883['shift']());}}}(a168_0x123d,0xe849c));function a168_0x3ed5(_0x4f0308,_0x41f3c1){_0x4f0308=_0x4f0308-0x64;const _0x123d22=a168_0x123d();let _0x3ed569=_0x123d22[_0x4f0308];return _0x3ed569;}import{DEFAULT_API_DIR}from'../constant/paths.js';function a168_0x123d(){const _0x4536df=['4634810crtluQ','106068iFyjcf','2064780GbukDI','8ldBjHI','28647153Wuvmes','high-risk-write','compress','14zspxXg','7096872zmyjjo','en-US','3734126MJguiZ','1693568mDYVxs','production'];a168_0x123d=function(){return _0x4536df;};return a168_0x123d();}export const DEFAULT_CONFIG_VALUES={'env':a168_0x2512e8(0x65),'format':a168_0x2512e8(0x6c),'locale':a168_0x2512e8(0x6f),'riskLevel':a168_0x2512e8(0x6b),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a169_0x23c927=a169_0x5ae3;(function(_0x76e624,_0x1760f1){const _0x3c08a8=a169_0x5ae3,_0x29d7b2=_0x76e624();while(!![]){try{const _0x237471=parseInt(_0x3c08a8(0xeb))/0x1*(parseInt(_0x3c08a8(0xfa))/0x2)+parseInt(_0x3c08a8(0xfd))/0x3*(parseInt(_0x3c08a8(0xfb))/0x4)+-parseInt(_0x3c08a8(0xf8))/0x5*(parseInt(_0x3c08a8(0xec))/0x6)+-parseInt(_0x3c08a8(0xfe))/0x7+-parseInt(_0x3c08a8(0xf4))/0x8+parseInt(_0x3c08a8(0xf1))/0x9+parseInt(_0x3c08a8(0xed))/0xa;if(_0x237471===_0x1760f1)break;else _0x29d7b2['push'](_0x29d7b2['shift']());}catch(_0x439345){_0x29d7b2['push'](_0x29d7b2['shift']());}}}(a169_0x117c,0x28c7c));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a169_0x5ae3(_0x14518f,_0x118709){_0x14518f=_0x14518f-0xeb;const _0x117c0f=a169_0x117c();let _0x5ae385=_0x117c0f[_0x14518f];return _0x5ae385;}export function initDomains(_0x2d7e7a){const _0x49b06b=a169_0x5ae3;customApiDomain=_0x2d7e7a?.['apiDomain'],customUserDomain=_0x2d7e7a?.[_0x49b06b(0xf9)],customRuntimeDomain=_0x2d7e7a?.[_0x49b06b(0xf2)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x23c927(0xfc):a169_0x23c927(0xf5));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a169_0x23c927(0xf3));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x23c927(0xf6):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a169_0x23c927(0xef):a169_0x23c927(0xf0);export const getAppBaseUrl=_0x7cc447=>{const _0x279400=a169_0x23c927,_0x4c8f04=encodeURIComponent(_0x7cc447[_0x279400(0xf7)]());return isProduction(getEnv())?getAppDomain()+_0x279400(0xee)+_0x4c8f04:getAppDomain()+'/web-app/app/'+_0x4c8f04;};function a169_0x117c(){const _0x976c31=['https://app.lovrabet.com','https://daily.lovrabet.com','1145124dNVuxf','runtimeDomain','https://daily-api.lovrabet.com','2422672cCtxjO','https://user-daily.lovrabet.com','https://runtime.lovrabet.com','trim','5pzayTX','userDomain','6820rhWRym','4nxfsdw','https://user.lovrabet.com','662469XRfnLY','678748KvzwvJ','67SxcobN','507090pZAjDJ','748200tjoRky','/app/'];a169_0x117c=function(){return _0x976c31;};return a169_0x117c();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a170_0x2036(){const _0x107476=['daily','9453186DXmyfs','354011rLCrPX','20BHRBTU','online','1059090LaylTT','342184AZxFFJ','development','14VcQURF','dev','1027800iEYOnH','392752wZkPGl','production','315200NNIUkh'];a170_0x2036=function(){return _0x107476;};return a170_0x2036();}const a170_0x30097c=a170_0x423f;function a170_0x423f(_0x21819b,_0x1be59a){_0x21819b=_0x21819b-0xf0;const _0x203602=a170_0x2036();let _0x423fe2=_0x203602[_0x21819b];return _0x423fe2;}(function(_0x25b4a9,_0x2815d4){const _0x2b6899=a170_0x423f,_0x25422c=_0x25b4a9();while(!![]){try{const _0xd94041=parseInt(_0x2b6899(0xf5))/0x1+-parseInt(_0x2b6899(0xf2))/0x2+parseInt(_0x2b6899(0xfd))/0x3+parseInt(_0x2b6899(0xf9))/0x4*(parseInt(_0x2b6899(0xf6))/0x5)+parseInt(_0x2b6899(0xf8))/0x6*(parseInt(_0x2b6899(0xfb))/0x7)+parseInt(_0x2b6899(0xf0))/0x8+-parseInt(_0x2b6899(0xf4))/0x9;if(_0xd94041===_0x2815d4)break;else _0x25422c['push'](_0x25422c['shift']());}catch(_0x2e9cb4){_0x25422c['push'](_0x25422c['shift']());}}}(a170_0x2036,0x38e05));export const RABETBASE_ENV_VALUES=[a170_0x30097c(0xf1),a170_0x30097c(0xf3)];export function normalizeEnv(_0x1a3b34){const _0x18e697=a170_0x30097c;return _0x1a3b34===_0x18e697(0xf7)?_0x18e697(0xf1):_0x1a3b34;}export function isProduction(_0x4a132c){const _0x6fa290=a170_0x30097c;return normalizeEnv(_0x4a132c)===_0x6fa290(0xf1);}export function isDaily(_0x27c0d5){const _0xa3d12f=a170_0x30097c;return normalizeEnv(_0x27c0d5)===_0xa3d12f(0xf3);}export function isDev(_0x499b21){const _0x4e31d7=a170_0x30097c,_0x3dcc6c=normalizeEnv(_0x499b21);return _0x3dcc6c===_0x4e31d7(0xfa)||_0x3dcc6c===_0x4e31d7(0xfc);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x12eb22){env=normalizeEnv(_0x12eb22);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a171_0x3b89(_0x59f323,_0x78ae54){_0x59f323=_0x59f323-0x1cc;const _0x3584f9=a171_0x3584();let _0x3b89da=_0x3584f9[_0x59f323];return _0x3b89da;}const a171_0x5eb813=a171_0x3b89;(function(_0x107eca,_0x5cf94f){const _0x4472d8=a171_0x3b89,_0x52110c=_0x107eca();while(!![]){try{const _0x3b428c=parseInt(_0x4472d8(0x1d5))/0x1+-parseInt(_0x4472d8(0x1d0))/0x2+parseInt(_0x4472d8(0x1cf))/0x3+-parseInt(_0x4472d8(0x1d3))/0x4*(-parseInt(_0x4472d8(0x1cc))/0x5)+-parseInt(_0x4472d8(0x1cd))/0x6*(-parseInt(_0x4472d8(0x1d7))/0x7)+-parseInt(_0x4472d8(0x1d1))/0x8*(-parseInt(_0x4472d8(0x1d2))/0x9)+-parseInt(_0x4472d8(0x1d4))/0xa;if(_0x3b428c===_0x5cf94f)break;else _0x52110c['push'](_0x52110c['shift']());}catch(_0x367b78){_0x52110c['push'](_0x52110c['shift']());}}}(a171_0x3584,0x73b0a));function a171_0x3584(){const _0x58d67f=['4878ygtCFT','compress','348525aoOOME','630722huOwQU','7144784pNXyNQ','9fBpeKQ','37652TRrkKN','17828370lhGIeI','391348dCuwQV','pretty','4494yEySUo','345iWUCvx'];a171_0x3584=function(){return _0x58d67f;};return a171_0x3584();}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a171_0x5eb813(0x1d6),a171_0x5eb813(0x1ce)];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a172_0x19f8(){const _0x380abf=['963582mNhNvH','6xuhBSY','5828840OKVEIk','3eDMQOb','24954TqIdPg','90XkDmNG','1354935tEtbOk','1023155KwECTJ','./src/api','47752obISWE','89360nvbILl'];a172_0x19f8=function(){return _0x380abf;};return a172_0x19f8();}const a172_0xb0456d=a172_0x1ba7;function a172_0x1ba7(_0x2bc6cc,_0xd7e4a1){_0x2bc6cc=_0x2bc6cc-0x184;const _0x19f83f=a172_0x19f8();let _0x1ba7af=_0x19f83f[_0x2bc6cc];return _0x1ba7af;}(function(_0x18067a,_0x4b9e82){const _0x1e816b=a172_0x1ba7,_0x35d732=_0x18067a();while(!![]){try{const _0x123af5=parseInt(_0x1e816b(0x18d))/0x1*(-parseInt(_0x1e816b(0x18a))/0x2)+parseInt(_0x1e816b(0x18c))/0x3*(-parseInt(_0x1e816b(0x188))/0x4)+-parseInt(_0x1e816b(0x184))/0x5+-parseInt(_0x1e816b(0x189))/0x6+parseInt(_0x1e816b(0x185))/0x7+-parseInt(_0x1e816b(0x187))/0x8*(parseInt(_0x1e816b(0x18e))/0x9)+parseInt(_0x1e816b(0x18b))/0xa;if(_0x123af5===_0x4b9e82)break;else _0x35d732['push'](_0x35d732['shift']());}catch(_0x69fdf2){_0x35d732['push'](_0x35d732['shift']());}}}(a172_0x19f8,0x2251d));export const DEFAULT_API_DIR=a172_0xb0456d(0x186);
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a173_0x2843(){const _0x231f13=['34268QdaFSQ','738tRyNzX','5665226ZTdCXW','754512WlctoS','3639625jJYedr','1909UcWZUM','high-risk-write','267GnRhNY','30002390gpVqWk','9tmdTmx','read','2975628fUfbpn'];a173_0x2843=function(){return _0x231f13;};return a173_0x2843();}function a173_0xa6fc(_0x22bc4a,_0x418147){_0x22bc4a=_0x22bc4a-0xc7;const _0x284307=a173_0x2843();let _0xa6fc39=_0x284307[_0x22bc4a];return _0xa6fc39;}const a173_0x3e545c=a173_0xa6fc;(function(_0x52e74c,_0x11cc9a){const _0x57eb4d=a173_0xa6fc,_0x44cb63=_0x52e74c();while(!![]){try{const _0x6d017e=-parseInt(_0x57eb4d(0xc7))/0x1*(-parseInt(_0x57eb4d(0xcf))/0x2)+parseInt(_0x57eb4d(0xc9))/0x3*(parseInt(_0x57eb4d(0xce))/0x4)+parseInt(_0x57eb4d(0xd2))/0x5+parseInt(_0x57eb4d(0xcd))/0x6+parseInt(_0x57eb4d(0xd0))/0x7+-parseInt(_0x57eb4d(0xd1))/0x8+-parseInt(_0x57eb4d(0xcb))/0x9*(parseInt(_0x57eb4d(0xca))/0xa);if(_0x6d017e===_0x11cc9a)break;else _0x44cb63['push'](_0x44cb63['shift']());}catch(_0x55ccf5){_0x44cb63['push'](_0x44cb63['shift']());}}}(a173_0x2843,0x63008));export const RISK_LEVEL_VALUES=[a173_0x3e545c(0xcc),'write',a173_0x3e545c(0xc8)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x459feb,_0x5db4f3){const _0x43c418=a174_0x1f4e,_0x32b38e=_0x459feb();while(!![]){try{const _0x2bcaa2=-parseInt(_0x43c418(0x107))/0x1+parseInt(_0x43c418(0x10b))/0x2+-parseInt(_0x43c418(0x10e))/0x3*(parseInt(_0x43c418(0xf9))/0x4)+parseInt(_0x43c418(0x10f))/0x5+-parseInt(_0x43c418(0x110))/0x6+parseInt(_0x43c418(0xfe))/0x7+-parseInt(_0x43c418(0x116))/0x8*(parseInt(_0x43c418(0xff))/0x9);if(_0x2bcaa2===_0x5db4f3)break;else _0x32b38e['push'](_0x32b38e['shift']());}catch(_0x131208){_0x32b38e['push'](_0x32b38e['shift']());}}}(a174_0x45e0,0xa4009));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x37cc02){const _0x181862=a174_0x1f4e;return typeof _0x37cc02===_0x181862(0x111)&&_0x37cc02['trim']()?_0x37cc02[_0x181862(0xf3)]():undefined;}function appProfiles(_0x2f6248){const _0x4b256a=a174_0x1f4e;return _0x2f6248[_0x4b256a(0x109)]&&typeof _0x2f6248['apps']==='object'?_0x2f6248[_0x4b256a(0x109)]:{};}function a174_0x45e0(){const _0x2db798=['apiDir','trim','accessKey','cookie','read','env','app','8FgVUmQ','FORMAT','ENV','APP','find','8672510drcmDF','2709ZItwaY','appcode','entries','RISK_LEVEL','production','pageSize','riskLevel','keys','614892dBUyVv','defaultApp','apps','globalConfig','1445638wHpLVU','COOKIE','object','354567inhvQq','5879995HYSPEJ','6246114SaQkRa','string','true','MAX_RISK','locale','PAGE_SIZE','15248jQrgTj','format','length','inherit'];a174_0x45e0=function(){return _0x2db798;};return a174_0x45e0();}function resolveDefaultAppName(_0x17a494){const _0xd57002=a174_0x1f4e,_0xf5752c=stringConfigValue(_0x17a494[_0xd57002(0x108)]);if(_0xf5752c)return _0xf5752c;return Object[_0xd57002(0x106)](appProfiles(_0x17a494))[0x0];}function a174_0x1f4e(_0x288624,_0x4b0e76){_0x288624=_0x288624-0xf0;const _0x45e0fd=a174_0x45e0();let _0x1f4ec1=_0x45e0fd[_0x288624];return _0x1f4ec1;}function resolveTopLevelAppCode(_0x58d6ac){const _0x48927b=a174_0x1f4e;return stringConfigValue(_0x58d6ac[_0x48927b(0x100)])||stringConfigValue(_0x58d6ac['app']);}export function resolveAppConfig({raw:_0x144945,flags:_0x301909,layers:_0x462ec8,readEnv:_0x410990}){const _0x42006b=a174_0x1f4e,_0x7d299a=_0x462ec8?.['projectConfig']??{},_0x1e39bc=_0x462ec8?.[_0x42006b(0x10a)]??{},_0x43cf17=Object[_0x42006b(0x106)](_0x7d299a)[_0x42006b(0xf0)]>0x0,_0x3a757c=!_0x43cf17||_0x7d299a[_0x42006b(0xf1)]===!![],_0x2d0d44=_0x43cf17?resolveDefaultAppName(_0x7d299a):undefined,_0x43a8be=_0x3a757c?resolveDefaultAppName(_0x1e39bc):undefined,_0x33527c=stringConfigValue(_0x301909[_0x42006b(0xf8)]),_0x4f4f69=_0x410990(_0x42006b(0xfc)),_0xaa0c19={};if(_0x144945[_0x42006b(0x109)]&&typeof _0x144945[_0x42006b(0x109)]===_0x42006b(0x10d))for(const [_0x12b84d,_0x22a7b4]of Object[_0x42006b(0x101)](_0x144945['apps'])){_0x22a7b4&&typeof _0x22a7b4===_0x42006b(0x10d)&&_0x22a7b4[_0x42006b(0x100)]&&(_0xaa0c19[_0x12b84d]=_0x22a7b4);}const _0x1e8073=_0x144945['defaultApp']||undefined,_0x2ce5cc=Object[_0x42006b(0x106)](_0xaa0c19)[_0x42006b(0xf0)]>0x0,_0x106a68=_0x33527c||_0x2d0d44||_0x4f4f69||_0x43a8be||_0x1e8073||undefined,_0x383876=stringConfigValue(_0x301909[_0x42006b(0x100)]),_0x3dfba0=_0x383876?Object[_0x42006b(0x101)](_0xaa0c19)[_0x42006b(0xfd)](([,_0x4b4550])=>_0x4b4550?.[_0x42006b(0x100)]===_0x383876):undefined,_0x30c60d=_0x3dfba0?.[0x0],_0x301007=_0x3dfba0?.[0x1],_0x40917d=_0x383876?_0x30c60d:_0x106a68;let _0x5cb95c=_0x40917d&&_0xaa0c19[_0x40917d]?_0xaa0c19[_0x40917d]:undefined;_0x383876&&_0x301007&&(_0x5cb95c=_0x301007);const _0x40444c=_0x383876?_0x301007??_0x5cb95c:_0x5cb95c,_0x3424f3=!_0x33527c&&!_0x2d0d44&&_0x4f4f69&&_0x40917d===_0x4f4f69,_0x3eea93=_0x33527c||(_0x3424f3?_0x4f4f69:undefined)||(_0x383876?_0x30c60d:undefined),_0x45bcb5=_0x40444c?.[_0x42006b(0x100)],_0x331cde=_0x43cf17?resolveTopLevelAppCode(_0x7d299a):undefined,_0x3061d5=_0x3a757c?resolveTopLevelAppCode(_0x1e39bc):undefined,_0x425ef0=_0x33527c||_0x2d0d44?_0x45bcb5:undefined,_0x3475e4=!_0x33527c&&!_0x2d0d44?_0x45bcb5:undefined,_0x21ff15=_0x383876||_0x425ef0||_0x331cde||_0x3475e4||_0x3061d5||undefined,_0x10c4aa=_0x43cf17?stringConfigValue(_0x7d299a['env']):undefined,_0x1981e0=_0x3a757c?stringConfigValue(_0x1e39bc[_0x42006b(0xf7)]):undefined,_0x1b4315=_0x301909[_0x42006b(0xf7)]||_0x40444c?.[_0x42006b(0xf7)]||_0x10c4aa||_0x410990(_0x42006b(0xfb))||_0x1981e0||_0x144945['env']||DEFAULT_CONFIG_VALUES[_0x42006b(0xf7)],_0xb65058=_0x40444c?.[_0x42006b(0x114)]||_0x144945[_0x42006b(0x114)]||DEFAULT_CONFIG_VALUES[_0x42006b(0x114)],_0x36a776=_0x410990(_0x42006b(0x10c))||_0x40444c?.[_0x42006b(0xf5)]||_0x144945['cookie']||undefined,_0x3888d7=_0x410990('ACCESS_KEY')||_0x40444c?.[_0x42006b(0xf4)]||_0x144945[_0x42006b(0xf4)]||undefined,_0x3e9f7b=_0x301909['format']||_0x410990(_0x42006b(0xfa))||_0x40444c?.[_0x42006b(0x117)]||_0x144945['format'],_0x1e5406=normalizeLegacyOutputFormat(_0x3e9f7b),_0x6ae08f=_0x410990(_0x42006b(0x115))||_0x40444c?.[_0x42006b(0x104)]||_0x144945[_0x42006b(0x104)],_0x29f723=_0x6ae08f?Number(_0x6ae08f)||undefined:undefined,_0x278a3f=_0x410990(_0x42006b(0x102))||_0x410990(_0x42006b(0x113))||_0x40444c?.[_0x42006b(0x105)]||_0x144945[_0x42006b(0x105)]||_0x144945['maxRisk'],_0x662771=_0x278a3f===_0x42006b(0xf6)||_0x278a3f==='write'?_0x278a3f:DEFAULT_CONFIG_VALUES[_0x42006b(0x105)],_0x1f3853=_0x410990('VERBOSE'),_0x3d3248=_0x1f3853==='1'||_0x1f3853===_0x42006b(0x112),_0x2bf312=_0x40444c?.['apiDir']||_0x144945[_0x42006b(0xf2)]||DEFAULT_CONFIG_VALUES['apiDir'],_0xd121db=isDaily(normalizeEnv(String(_0x1b4315)))?'daily':_0x42006b(0x103);return{'appCode':typeof _0x21ff15===_0x42006b(0x111)&&_0x21ff15['trim']()?_0x21ff15[_0x42006b(0xf3)]():undefined,'env':_0xd121db,'locale':_0xb65058,'cookie':_0x36a776,'accessKey':_0x3888d7,'format':_0x1e5406,'pageSize':_0x29f723,'riskLevel':_0x662771,'verbose':_0x3d3248,'apiDir':_0x2bf312,'apps':_0xaa0c19,'defaultApp':_0x1e8073,'currentApp':_0x2ce5cc?_0x40917d:undefined,'explicitAppName':_0x3eea93};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30954f,_0x132341){const _0x4e2074=a175_0x3d4e,_0x54fdb1=_0x30954f();while(!![]){try{const _0x668def=parseInt(_0x4e2074(0x1cb))/0x1+-parseInt(_0x4e2074(0x1c8))/0x2*(-parseInt(_0x4e2074(0x1ca))/0x3)+parseInt(_0x4e2074(0x1c6))/0x4+-parseInt(_0x4e2074(0x1cd))/0x5+-parseInt(_0x4e2074(0x1c4))/0x6*(parseInt(_0x4e2074(0x1cc))/0x7)+-parseInt(_0x4e2074(0x1c9))/0x8+-parseInt(_0x4e2074(0x1c3))/0x9*(-parseInt(_0x4e2074(0x1c5))/0xa);if(_0x668def===_0x132341)break;else _0x54fdb1['push'](_0x54fdb1['shift']());}catch(_0x333a12){_0x54fdb1['push'](_0x54fdb1['shift']());}}}(a175_0x386a,0xc1aa7));function a175_0x3d4e(_0x3a468d,_0x3f6405){_0x3a468d=_0x3a468d-0x1c3;const _0x386a79=a175_0x386a();let _0x3d4eda=_0x386a79[_0x3a468d];return _0x3d4eda;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x3afc45){const _0x2ae237=a175_0x3d4e,{getCookie:_0x4fb280}=await import(_0x2ae237(0x1ce)),_0x2d5a5c=_0x3afc45[_0x2ae237(0x1c7)]||_0x4fb280(),_0x203377=_0x2d5a5c?await getIsSessionValid():![];return{'cookie':_0x2d5a5c,'isLoggedIn':_0x203377,async 'getOrLogin'(){const _0x2b859a=_0x2ae237;if(_0x2d5a5c&&_0x203377)return _0x2d5a5c;throw CliErrors[_0x2b859a(0x1cf)]();}};}function a175_0x386a(){const _0x38bf92=['3435wySaAu','926521JJuVmu','7Poqkki','6164435sTPdFi','../auth/get-cookie.js','authRequired','15674877kWeyMZ','7518558GBsitG','10eylGir','4421056QPYfuF','cookie','430YBbzuy','5923024AnxKEC'];a175_0x386a=function(){return _0x38bf92;};return a175_0x386a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a176_0x4313ff=a176_0x2be6;(function(_0x2ab01f,_0x164b2f){const _0x29a576=a176_0x2be6,_0x296353=_0x2ab01f();while(!![]){try{const _0x2835b3=-parseInt(_0x29a576(0xa8))/0x1+parseInt(_0x29a576(0xa5))/0x2+-parseInt(_0x29a576(0xbe))/0x3+parseInt(_0x29a576(0x9f))/0x4*(-parseInt(_0x29a576(0x9e))/0x5)+parseInt(_0x29a576(0xa0))/0x6*(parseInt(_0x29a576(0xa4))/0x7)+parseInt(_0x29a576(0xa3))/0x8+parseInt(_0x29a576(0xa7))/0x9;if(_0x2835b3===_0x164b2f)break;else _0x296353['push'](_0x296353['shift']());}catch(_0x1682cc){_0x296353['push'](_0x296353['shift']());}}}(a176_0x4455,0xc3c1c));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='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a176_0x4313ff(0x92),a176_0x4313ff(0xbb)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x4313ff(0xac)](_0x59eaa6=>_0x59eaa6!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x240fc8){for(const _0x4ae749 of CONFIG_NAMES){const _0x109e4c=resolve(_0x240fc8,_0x4ae749);if(existsSync(_0x109e4c))return _0x109e4c;}return undefined;}export function findProjectRootDirectory(_0xcb2f50=process[a176_0x4313ff(0x9c)]()){let _0xfce44a=resolve(_0xcb2f50);const {root:_0x375dec}=parse(_0xfce44a),_0x51db7e=homedir();while(!![]){if(resolveConfigPath(_0xfce44a)){if(_0xfce44a===_0x51db7e)break;return _0xfce44a;}if(_0xfce44a===_0x375dec||_0xfce44a===_0x51db7e)break;const _0x28c24b=dirname(_0xfce44a);if(_0x28c24b===_0xfce44a)break;_0xfce44a=_0x28c24b;}return resolve(_0xcb2f50);}export function getProjectConfigPath(){const _0x1b9342=a176_0x4313ff;return resolveConfigPath(process[_0x1b9342(0x9c)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1b3b63){const _0x4db85b=a176_0x4313ff;if(!existsSync(_0x1b3b63))return{'status':_0x4db85b(0xb0)};try{const _0x5cc30d=readFileSync(_0x1b3b63,{'encoding':_0x4db85b(0x96)});if(!_0x5cc30d?.['trim']())return{'status':_0x4db85b(0xba)};const _0x3f8842=JSON['parse'](_0x5cc30d);return{'status':'ok','data':_0x3f8842};}catch(_0x1ddc1a){return{'status':_0x4db85b(0xb4),'message':_0x1ddc1a instanceof Error?_0x1ddc1a['message']:String(_0x1ddc1a)};}}function parseCliConfigJsonFile(_0x2c678a,_0x550ac5,_0x36fe04){const _0x17a993=a176_0x4313ff,_0x16cab5=inspectCliConfigJsonFile(_0x2c678a);if(_0x16cab5[_0x17a993(0xc0)]===_0x17a993(0xb0)||_0x16cab5[_0x17a993(0xc0)]===_0x17a993(0xba))return{};if(_0x16cab5[_0x17a993(0xc0)]==='ok')return _0x16cab5[_0x17a993(0x97)];return _0x550ac5==='warn'&&_0x36fe04&&console[_0x17a993(0xb4)](CLI_BIN_NAME+':\x20'+_0x36fe04+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x2c678a+_0x17a993(0x9a)+_0x16cab5['message']),{};}function normalizeLegacyConfigShape(_0x1af8f2){const _0x5565c2=a176_0x4313ff;if(!_0x1af8f2||typeof _0x1af8f2!==_0x5565c2(0xb7))return{'config':{},'migrated':![]};const _0x4d6a6f={..._0x1af8f2},_0x14503c=_0x4d6a6f[_0x5565c2(0x99)]&&typeof _0x4d6a6f['apps']===_0x5565c2(0xb7)?{..._0x4d6a6f[_0x5565c2(0x99)]}:{},_0x24a0f1=Object[_0x5565c2(0x93)](_0x14503c)[_0x5565c2(0x95)],_0x4ebeae=_0x4d6a6f[_0x5565c2(0xb3)]||_0x4d6a6f[_0x5565c2(0x94)];let _0x2b56de=![];if(_0x4ebeae&&_0x24a0f1===0x0){const _0x9fbc57=typeof _0x4d6a6f[_0x5565c2(0xbc)]===_0x5565c2(0xa2)&&_0x4d6a6f[_0x5565c2(0xbc)][_0x5565c2(0xb9)]()?_0x4d6a6f[_0x5565c2(0xbc)]:String(_0x4ebeae)['trim']();_0x14503c[_0x9fbc57]={'appcode':String(_0x4ebeae)[_0x5565c2(0xb9)](),..._0x4d6a6f[_0x5565c2(0xb5)]!=null?{'env':_0x4d6a6f[_0x5565c2(0xb5)]}:{},..._0x4d6a6f[_0x5565c2(0xad)]!=null?{'apiDir':_0x4d6a6f['apiDir']}:{},..._0x4d6a6f[_0x5565c2(0x9d)]!=null?{'cookie':_0x4d6a6f[_0x5565c2(0x9d)]}:{},..._0x4d6a6f['accessKey']!=null?{'accessKey':_0x4d6a6f[_0x5565c2(0xae)]}:{},..._0x4d6a6f[_0x5565c2(0xa1)]!=null?{'format':_0x4d6a6f['format']}:{},..._0x4d6a6f[_0x5565c2(0xab)]!=null?{'pageSize':_0x4d6a6f[_0x5565c2(0xab)]}:{},..._0x4d6a6f[_0x5565c2(0xa9)]!=null?{'riskLevel':_0x4d6a6f[_0x5565c2(0xa9)]}:{},..._0x4d6a6f[_0x5565c2(0xb1)]!=null?{'locale':_0x4d6a6f[_0x5565c2(0xb1)]}:{}},_0x4d6a6f[_0x5565c2(0x99)]=_0x14503c;if(!_0x4d6a6f[_0x5565c2(0xbc)])_0x4d6a6f[_0x5565c2(0xbc)]=_0x9fbc57;_0x2b56de=!![];}return(_0x5565c2(0xb3)in _0x4d6a6f||_0x5565c2(0x94)in _0x4d6a6f)&&(delete _0x4d6a6f[_0x5565c2(0xb3)],delete _0x4d6a6f[_0x5565c2(0x94)],_0x2b56de=!![]),{'config':_0x4d6a6f,'migrated':_0x2b56de};}function writeNormalizedConfigIfNeeded(_0x179f12,_0x40ab5d){const _0xf75efc=a176_0x4313ff,_0x1ca12f=JSON['stringify'](_0x40ab5d,null,0x2)+'\x0a';if(normalizedWriteCache[_0xf75efc(0x9b)](_0x179f12)===_0x1ca12f)return;writeConfigFile(_0x179f12,_0x40ab5d),normalizedWriteCache[_0xf75efc(0xb6)](_0x179f12,_0x1ca12f);}function parseAndNormalizeConfig(_0x507b22,_0x1197b9,_0x15bfb6){const _0x18a4f9=a176_0x4313ff,_0x18dda8=parseCliConfigJsonFile(_0x507b22,_0x1197b9,_0x15bfb6),_0x187a29=normalizeLegacyConfigShape(_0x18dda8);if(_0x187a29['migrated'])try{writeNormalizedConfigIfNeeded(_0x507b22,_0x187a29[_0x18a4f9(0xb8)]);}catch{}return _0x187a29[_0x18a4f9(0xb8)];}export function loadRawConfigLayers(_0x24ff9e){const _0x12f018=a176_0x4313ff;let _0x33898={},_0x2846cd={};const _0x729814=resolveConfigPath(homedir());_0x729814&&(_0x33898=parseAndNormalizeConfig(_0x729814,'warn','Global'));const _0x411d44=_0x24ff9e??findProjectRootDirectory(),_0x27967c=resolveConfigPath(_0x411d44);return _0x27967c&&(_0x2846cd=parseAndNormalizeConfig(_0x27967c,_0x12f018(0xbd),_0x12f018(0xaa))),{'globalPath':_0x729814,'projectPath':_0x27967c,'globalConfig':_0x33898,'projectConfig':_0x2846cd};}const INHERIT_WHITELIST=[a176_0x4313ff(0x9d),a176_0x4313ff(0xae),'locale',a176_0x4313ff(0xa1),a176_0x4313ff(0xa9),'pageSize'];export function mergeRawConfigLayers(_0x14fa5e){const _0x2e4b55=a176_0x4313ff,{globalConfig:_0x436832,projectConfig:_0x34784c}=_0x14fa5e,_0xf8e0df=Object[_0x2e4b55(0x93)](_0x34784c)['length']>0x0;if(!_0xf8e0df)return mergeGlobalOnly(_0x436832);if(_0x34784c[_0x2e4b55(0xaf)]===!![])return mergeFullInherit(_0x436832,_0x34784c);if(_0x34784c[_0x2e4b55(0xaf)]===![])return mergeIsolated(_0x34784c);return mergeProjectFirst(_0x436832,_0x34784c);}function mergeGlobalOnly(_0x4c8864){const _0x1347a1=a176_0x4313ff,_0x237ad7={..._0x4c8864},_0x522681=_0x4c8864[_0x1347a1(0x99)]&&typeof _0x4c8864[_0x1347a1(0x99)]===_0x1347a1(0xb7)?_0x4c8864['apps']:{};if(Object[_0x1347a1(0x93)](_0x522681)[_0x1347a1(0x95)]>0x0)_0x237ad7[_0x1347a1(0x99)]=_0x522681;if(_0x4c8864[_0x1347a1(0xbc)])_0x237ad7[_0x1347a1(0xbc)]=_0x4c8864[_0x1347a1(0xbc)];else{const _0x405676=Object[_0x1347a1(0x93)](_0x522681);if(_0x405676['length']>0x0)_0x237ad7[_0x1347a1(0xbc)]=_0x405676[0x0];}return _0x237ad7;}function mergeIsolated(_0x1338b4){const _0x296da4=a176_0x4313ff,_0x1048de={..._0x1338b4};delete _0x1048de['inherit'];const _0x104513=_0x1338b4[_0x296da4(0x99)]&&typeof _0x1338b4[_0x296da4(0x99)]===_0x296da4(0xb7)?_0x1338b4[_0x296da4(0x99)]:{};Object[_0x296da4(0x93)](_0x104513)[_0x296da4(0x95)]>0x0?_0x1048de[_0x296da4(0x99)]=_0x104513:delete _0x1048de[_0x296da4(0x99)];if(_0x296da4(0xbc)in _0x1338b4)_0x1048de[_0x296da4(0xbc)]=_0x1338b4[_0x296da4(0xbc)];else Object['keys'](_0x104513)[_0x296da4(0x95)]>0x0?_0x1048de[_0x296da4(0xbc)]=Object['keys'](_0x104513)[0x0]:delete _0x1048de[_0x296da4(0xbc)];return _0x1048de;}function mergeProjectFirst(_0x5b0419,_0xea348f){const _0x588312=a176_0x4313ff,_0x5dfda5={..._0xea348f};delete _0x5dfda5[_0x588312(0xaf)];for(const _0x53f122 of INHERIT_WHITELIST){!(_0x53f122 in _0x5dfda5)&&_0x53f122 in _0x5b0419&&(_0x5dfda5[_0x53f122]=_0x5b0419[_0x53f122]);}const _0x2c0756=_0xea348f[_0x588312(0x99)]&&typeof _0xea348f[_0x588312(0x99)]===_0x588312(0xb7)?_0xea348f[_0x588312(0x99)]:{};Object[_0x588312(0x93)](_0x2c0756)[_0x588312(0x95)]>0x0?_0x5dfda5['apps']=_0x2c0756:delete _0x5dfda5[_0x588312(0x99)];if('defaultApp'in _0xea348f)_0x5dfda5['defaultApp']=_0xea348f[_0x588312(0xbc)];else Object[_0x588312(0x93)](_0x2c0756)[_0x588312(0x95)]>0x0?_0x5dfda5['defaultApp']=Object[_0x588312(0x93)](_0x2c0756)[0x0]:delete _0x5dfda5['defaultApp'];return _0x5dfda5;}function a176_0x4455(){const _0x40ff0a=['appcode','error','env','set','object','config','trim','empty','.lovrabetrc','defaultApp','warn','745404NAUXwB','project','status','.lovrabet.json','keys','app','length','utf8','data','silent','apps','\x0a\x20\x20','get','cwd','cookie','4835RCSBYT','940bSFDRH','663864MPCpYC','format','string','815992loQlQc','7rSSKnn','2386568fgxDHO','.tmp','10918431piuyVL','1341553lqwTRT','riskLevel','Project','pageSize','filter','apiDir','accessKey','inherit','missing','locale','stringify'];a176_0x4455=function(){return _0x40ff0a;};return a176_0x4455();}function mergeFullInherit(_0xad4cdc,_0x4915fb){const _0x15ab06=a176_0x4313ff,_0x2ff7c8=_0xad4cdc['apps']&&typeof _0xad4cdc[_0x15ab06(0x99)]==='object'?_0xad4cdc[_0x15ab06(0x99)]:{},_0x6f2932=_0x4915fb[_0x15ab06(0x99)]&&typeof _0x4915fb['apps']===_0x15ab06(0xb7)?_0x4915fb['apps']:{},_0x436f09={..._0x2ff7c8,..._0x6f2932},_0x252187={..._0xad4cdc,..._0x4915fb};delete _0x252187['inherit'];if(Object['keys'](_0x436f09)['length']>0x0)_0x252187[_0x15ab06(0x99)]=_0x436f09;if(_0x15ab06(0xbc)in _0x4915fb)_0x252187['defaultApp']=_0x4915fb[_0x15ab06(0xbc)];else{if(Object[_0x15ab06(0x93)](_0x6f2932)[_0x15ab06(0x95)]>0x0)_0x252187['defaultApp']=Object['keys'](_0x6f2932)[0x0];else{if(_0xad4cdc[_0x15ab06(0xbc)])_0x252187[_0x15ab06(0xbc)]=_0xad4cdc[_0x15ab06(0xbc)];else{const _0x326dbc=Object[_0x15ab06(0x93)](_0x2ff7c8);if(_0x326dbc['length']>0x0)_0x252187['defaultApp']=_0x326dbc[0x0];}}}return _0x252187;}export function readRawConfigWithLayers(_0x33d568){const _0x211bc2=loadRawConfigLayers(_0x33d568);return{'config':mergeRawConfigLayers(_0x211bc2),'layers':_0x211bc2};}export function readRawConfig(_0x42de09){return mergeRawConfigLayers(loadRawConfigLayers(_0x42de09));}export function readConfigFile(_0x4ba466){const _0x432f54=a176_0x4313ff;return parseAndNormalizeConfig(_0x4ba466,_0x432f54(0x98));}export function writeConfigFile(_0x56747f,_0x3b9cd9){const _0x41065b=a176_0x4313ff,_0x505f23=dirname(_0x56747f);!existsSync(_0x505f23)&&mkdirSync(_0x505f23,{'recursive':!![]});const _0x51f063=_0x56747f+_0x41065b(0xa6);try{writeFileSync(_0x51f063,JSON[_0x41065b(0xb2)](_0x3b9cd9,null,0x2)+'\x0a',{'encoding':_0x41065b(0x96),'mode':0x180}),renameSync(_0x51f063,_0x56747f);}catch(_0xb8d04c){try{unlinkSync(_0x51f063);}catch{}throw _0xb8d04c;}}function a176_0x2be6(_0x3834bc,_0x399e69){_0x3834bc=_0x3834bc-0x92;const _0x4455af=a176_0x4455();let _0x2be6fd=_0x4455af[_0x3834bc];return _0x2be6fd;}export function resolveWriteConfigPath(_0x5987de){const _0x10ff31=a176_0x4313ff,_0x40a58a=_0x5987de===_0x10ff31(0xbf)?process[_0x10ff31(0x9c)]():homedir(),_0x18f3c0=resolveConfigPath(_0x40a58a);return _0x18f3c0??resolve(_0x40a58a,NEW_CONFIG_NAME);}
|
|
1
|
+
const a176_0x5cda21=a176_0x18a7;(function(_0x24fe71,_0x4341c8){const _0x5c5e3a=a176_0x18a7,_0x49094a=_0x24fe71();while(!![]){try{const _0x5bbbc6=-parseInt(_0x5c5e3a(0x113))/0x1*(parseInt(_0x5c5e3a(0x121))/0x2)+-parseInt(_0x5c5e3a(0xfe))/0x3+-parseInt(_0x5c5e3a(0xfc))/0x4*(-parseInt(_0x5c5e3a(0x10a))/0x5)+-parseInt(_0x5c5e3a(0x100))/0x6+-parseInt(_0x5c5e3a(0xf5))/0x7+-parseInt(_0x5c5e3a(0xff))/0x8+parseInt(_0x5c5e3a(0x11b))/0x9;if(_0x5bbbc6===_0x4341c8)break;else _0x49094a['push'](_0x49094a['shift']());}catch(_0x238e19){_0x49094a['push'](_0x49094a['shift']());}}}(a176_0x4f1d,0x73d37));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_0x5cda21(0x120);export const CONFIG_NAMES=[a176_0x5cda21(0x120),a176_0x5cda21(0xf7),a176_0x5cda21(0x107)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x5cda21(0x119)](_0xf1eda=>_0xf1eda!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();function a176_0x18a7(_0x1a494e,_0x3c775e){_0x1a494e=_0x1a494e-0xf3;const _0x4f1d01=a176_0x4f1d();let _0x18a768=_0x4f1d01[_0x1a494e];return _0x18a768;}export function resolveConfigPath(_0x386153){for(const _0x44374c of CONFIG_NAMES){const _0x4feedc=resolve(_0x386153,_0x44374c);if(existsSync(_0x4feedc))return _0x4feedc;}return undefined;}export function findProjectRootDirectory(_0x43198b=process[a176_0x5cda21(0x105)]()){let _0x446b0c=resolve(_0x43198b);const {root:_0x16c24a}=parse(_0x446b0c),_0x34ecf3=homedir();while(!![]){if(resolveConfigPath(_0x446b0c)){if(_0x446b0c===_0x34ecf3)break;return _0x446b0c;}if(_0x446b0c===_0x16c24a||_0x446b0c===_0x34ecf3)break;const _0x5200df=dirname(_0x446b0c);if(_0x5200df===_0x446b0c)break;_0x446b0c=_0x5200df;}return resolve(_0x43198b);}export function getProjectConfigPath(){const _0x79c2fc=a176_0x5cda21;return resolveConfigPath(process[_0x79c2fc(0x105)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2e2732){const _0x37527d=a176_0x5cda21;if(!existsSync(_0x2e2732))return{'status':_0x37527d(0x117)};try{const _0x12a1db=readFileSync(_0x2e2732,{'encoding':_0x37527d(0xf6)});if(!_0x12a1db?.[_0x37527d(0x106)]())return{'status':_0x37527d(0x104)};const _0x277f85=JSON[_0x37527d(0xf9)](_0x12a1db);return{'status':'ok','data':_0x277f85};}catch(_0x50922d){return{'status':'error','message':_0x50922d instanceof Error?_0x50922d['message']:String(_0x50922d)};}}function a176_0x4f1d(){const _0xf3ea7f=['apiDir','error','missing','status','filter','defaultApp','12367323mRJuft','riskLevel','app','warn','message','.rabetbase.json','16VuSFua','set','project','object','.tmp','cookie','data','229628CHBulz','utf8','.lovrabet.json','format','parse','config','migrated','272836bghjzN','string','1989888oUIuBc','2689480Agxadm','4413384xWQJJt','accessKey','inherit','pageSize','empty','cwd','trim','.lovrabetrc','length','keys','65VvCdyx','apps','stringify','get','env','silent','locale','appcode','Project','2324JhvmJJ','Global'];a176_0x4f1d=function(){return _0xf3ea7f;};return a176_0x4f1d();}function parseCliConfigJsonFile(_0x2146dc,_0xa1da6a,_0x4bd11a){const _0x2a7142=a176_0x5cda21,_0x638db9=inspectCliConfigJsonFile(_0x2146dc);if(_0x638db9[_0x2a7142(0x118)]===_0x2a7142(0x117)||_0x638db9[_0x2a7142(0x118)]===_0x2a7142(0x104))return{};if(_0x638db9['status']==='ok')return _0x638db9[_0x2a7142(0xf4)];return _0xa1da6a===_0x2a7142(0x11e)&&_0x4bd11a&&console[_0x2a7142(0x116)](CLI_BIN_NAME+':\x20'+_0x4bd11a+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x2146dc+'\x0a\x20\x20'+_0x638db9[_0x2a7142(0x11f)]),{};}function normalizeLegacyConfigShape(_0x2f6f37){const _0x3fe2a5=a176_0x5cda21;if(!_0x2f6f37||typeof _0x2f6f37!==_0x3fe2a5(0x124))return{'config':{},'migrated':![]};const _0x212054={..._0x2f6f37},_0x41a904=_0x212054['apps']&&typeof _0x212054[_0x3fe2a5(0x10b)]===_0x3fe2a5(0x124)?{..._0x212054[_0x3fe2a5(0x10b)]}:{},_0x614d4a=Object['keys'](_0x41a904)[_0x3fe2a5(0x108)],_0x4c2ab6=_0x212054[_0x3fe2a5(0x111)]||_0x212054[_0x3fe2a5(0x11d)];let _0x349420=![];if(_0x4c2ab6&&_0x614d4a===0x0){const _0x149308=typeof _0x212054[_0x3fe2a5(0x11a)]===_0x3fe2a5(0xfd)&&_0x212054[_0x3fe2a5(0x11a)]['trim']()?_0x212054[_0x3fe2a5(0x11a)]:String(_0x4c2ab6)[_0x3fe2a5(0x106)]();_0x41a904[_0x149308]={'appcode':String(_0x4c2ab6)[_0x3fe2a5(0x106)](),..._0x212054[_0x3fe2a5(0x10e)]!=null?{'env':_0x212054['env']}:{},..._0x212054[_0x3fe2a5(0x115)]!=null?{'apiDir':_0x212054[_0x3fe2a5(0x115)]}:{},..._0x212054[_0x3fe2a5(0xf3)]!=null?{'cookie':_0x212054['cookie']}:{},..._0x212054['accessKey']!=null?{'accessKey':_0x212054[_0x3fe2a5(0x101)]}:{},..._0x212054[_0x3fe2a5(0xf8)]!=null?{'format':_0x212054[_0x3fe2a5(0xf8)]}:{},..._0x212054[_0x3fe2a5(0x103)]!=null?{'pageSize':_0x212054[_0x3fe2a5(0x103)]}:{},..._0x212054[_0x3fe2a5(0x11c)]!=null?{'riskLevel':_0x212054[_0x3fe2a5(0x11c)]}:{},..._0x212054[_0x3fe2a5(0x110)]!=null?{'locale':_0x212054['locale']}:{}},_0x212054[_0x3fe2a5(0x10b)]=_0x41a904;if(!_0x212054['defaultApp'])_0x212054['defaultApp']=_0x149308;_0x349420=!![];}return(_0x3fe2a5(0x111)in _0x212054||_0x3fe2a5(0x11d)in _0x212054)&&(delete _0x212054[_0x3fe2a5(0x111)],delete _0x212054[_0x3fe2a5(0x11d)],_0x349420=!![]),{'config':_0x212054,'migrated':_0x349420};}function writeNormalizedConfigIfNeeded(_0x2e5324,_0x39efe6){const _0x27829b=a176_0x5cda21,_0x5d9020=JSON[_0x27829b(0x10c)](_0x39efe6,null,0x2)+'\x0a';if(normalizedWriteCache[_0x27829b(0x10d)](_0x2e5324)===_0x5d9020)return;writeConfigFile(_0x2e5324,_0x39efe6),normalizedWriteCache[_0x27829b(0x122)](_0x2e5324,_0x5d9020);}function parseAndNormalizeConfig(_0xc86463,_0x452253,_0x1576bb){const _0x186e09=a176_0x5cda21,_0x55bc52=parseCliConfigJsonFile(_0xc86463,_0x452253,_0x1576bb),_0x19765b=normalizeLegacyConfigShape(_0x55bc52);if(_0x19765b[_0x186e09(0xfb)])try{writeNormalizedConfigIfNeeded(_0xc86463,_0x19765b['config']);}catch{}return _0x19765b[_0x186e09(0xfa)];}export function loadRawConfigLayers(_0x52b87d){const _0x1424a2=a176_0x5cda21;let _0x1aab0e={},_0x1fefd0={};const _0x3fc718=resolveConfigPath(homedir());_0x3fc718&&(_0x1aab0e=parseAndNormalizeConfig(_0x3fc718,_0x1424a2(0x11e),_0x1424a2(0x114)));const _0x2634c9=_0x52b87d??findProjectRootDirectory(),_0x2807d1=resolveConfigPath(_0x2634c9);return _0x2807d1&&(_0x1fefd0=parseAndNormalizeConfig(_0x2807d1,'warn',_0x1424a2(0x112))),{'globalPath':_0x3fc718,'projectPath':_0x2807d1,'globalConfig':_0x1aab0e,'projectConfig':_0x1fefd0};}const INHERIT_WHITELIST=[a176_0x5cda21(0xf3),a176_0x5cda21(0x101),a176_0x5cda21(0x110),a176_0x5cda21(0xf8),a176_0x5cda21(0x11c),a176_0x5cda21(0x103)];export function mergeRawConfigLayers(_0x49be10){const _0x314812=a176_0x5cda21,{globalConfig:_0x513b2e,projectConfig:_0x20cec7}=_0x49be10,_0x3b70b0=Object['keys'](_0x20cec7)[_0x314812(0x108)]>0x0;if(!_0x3b70b0)return mergeGlobalOnly(_0x513b2e);if(_0x20cec7['inherit']===!![])return mergeFullInherit(_0x513b2e,_0x20cec7);if(_0x20cec7[_0x314812(0x102)]===![])return mergeIsolated(_0x20cec7);return mergeProjectFirst(_0x513b2e,_0x20cec7);}function mergeGlobalOnly(_0x17c5d4){const _0x10d351=a176_0x5cda21,_0x30e2b7={..._0x17c5d4},_0x363e38=_0x17c5d4[_0x10d351(0x10b)]&&typeof _0x17c5d4[_0x10d351(0x10b)]===_0x10d351(0x124)?_0x17c5d4[_0x10d351(0x10b)]:{};if(Object[_0x10d351(0x109)](_0x363e38)[_0x10d351(0x108)]>0x0)_0x30e2b7[_0x10d351(0x10b)]=_0x363e38;if(_0x17c5d4[_0x10d351(0x11a)])_0x30e2b7['defaultApp']=_0x17c5d4[_0x10d351(0x11a)];else{const _0x5d9111=Object[_0x10d351(0x109)](_0x363e38);if(_0x5d9111[_0x10d351(0x108)]>0x0)_0x30e2b7[_0x10d351(0x11a)]=_0x5d9111[0x0];}return _0x30e2b7;}function mergeIsolated(_0x2bce53){const _0x45171e=a176_0x5cda21,_0x4c3c1={..._0x2bce53};delete _0x4c3c1[_0x45171e(0x102)];const _0x2ee171=_0x2bce53['apps']&&typeof _0x2bce53[_0x45171e(0x10b)]===_0x45171e(0x124)?_0x2bce53[_0x45171e(0x10b)]:{};Object[_0x45171e(0x109)](_0x2ee171)['length']>0x0?_0x4c3c1[_0x45171e(0x10b)]=_0x2ee171:delete _0x4c3c1['apps'];if(_0x45171e(0x11a)in _0x2bce53)_0x4c3c1[_0x45171e(0x11a)]=_0x2bce53['defaultApp'];else Object[_0x45171e(0x109)](_0x2ee171)[_0x45171e(0x108)]>0x0?_0x4c3c1[_0x45171e(0x11a)]=Object[_0x45171e(0x109)](_0x2ee171)[0x0]:delete _0x4c3c1[_0x45171e(0x11a)];return _0x4c3c1;}function mergeProjectFirst(_0x11edaf,_0x576ef0){const _0x1b1feb=a176_0x5cda21,_0x5d8364={..._0x576ef0};delete _0x5d8364[_0x1b1feb(0x102)];for(const _0x252846 of INHERIT_WHITELIST){!(_0x252846 in _0x5d8364)&&_0x252846 in _0x11edaf&&(_0x5d8364[_0x252846]=_0x11edaf[_0x252846]);}const _0x267a03=_0x576ef0[_0x1b1feb(0x10b)]&&typeof _0x576ef0['apps']===_0x1b1feb(0x124)?_0x576ef0['apps']:{};Object[_0x1b1feb(0x109)](_0x267a03)[_0x1b1feb(0x108)]>0x0?_0x5d8364['apps']=_0x267a03:delete _0x5d8364['apps'];if(_0x1b1feb(0x11a)in _0x576ef0)_0x5d8364[_0x1b1feb(0x11a)]=_0x576ef0[_0x1b1feb(0x11a)];else Object['keys'](_0x267a03)[_0x1b1feb(0x108)]>0x0?_0x5d8364[_0x1b1feb(0x11a)]=Object[_0x1b1feb(0x109)](_0x267a03)[0x0]:delete _0x5d8364[_0x1b1feb(0x11a)];return _0x5d8364;}function mergeFullInherit(_0x35debe,_0xa2ae76){const _0x27a214=a176_0x5cda21,_0x3ee0f1=_0x35debe[_0x27a214(0x10b)]&&typeof _0x35debe[_0x27a214(0x10b)]===_0x27a214(0x124)?_0x35debe['apps']:{},_0x1b05f6=_0xa2ae76[_0x27a214(0x10b)]&&typeof _0xa2ae76[_0x27a214(0x10b)]===_0x27a214(0x124)?_0xa2ae76[_0x27a214(0x10b)]:{},_0x15ea9a={..._0x3ee0f1,..._0x1b05f6},_0x2c9db7={..._0x35debe,..._0xa2ae76};delete _0x2c9db7['inherit'];if(Object[_0x27a214(0x109)](_0x15ea9a)[_0x27a214(0x108)]>0x0)_0x2c9db7[_0x27a214(0x10b)]=_0x15ea9a;if(_0x27a214(0x11a)in _0xa2ae76)_0x2c9db7[_0x27a214(0x11a)]=_0xa2ae76[_0x27a214(0x11a)];else{if(Object[_0x27a214(0x109)](_0x1b05f6)[_0x27a214(0x108)]>0x0)_0x2c9db7[_0x27a214(0x11a)]=Object['keys'](_0x1b05f6)[0x0];else{if(_0x35debe[_0x27a214(0x11a)])_0x2c9db7[_0x27a214(0x11a)]=_0x35debe[_0x27a214(0x11a)];else{const _0x166dd8=Object[_0x27a214(0x109)](_0x3ee0f1);if(_0x166dd8[_0x27a214(0x108)]>0x0)_0x2c9db7[_0x27a214(0x11a)]=_0x166dd8[0x0];}}}return _0x2c9db7;}export function readRawConfigWithLayers(_0x43593e){const _0x13ecaf=loadRawConfigLayers(_0x43593e);return{'config':mergeRawConfigLayers(_0x13ecaf),'layers':_0x13ecaf};}export function readRawConfig(_0x238eba){return mergeRawConfigLayers(loadRawConfigLayers(_0x238eba));}export function readConfigFile(_0x1ad415){const _0x1a6d56=a176_0x5cda21;return parseAndNormalizeConfig(_0x1ad415,_0x1a6d56(0x10f));}export function writeConfigFile(_0x530a7a,_0x82c3e8){const _0x49f4ac=a176_0x5cda21,_0x5cee5f=dirname(_0x530a7a);!existsSync(_0x5cee5f)&&mkdirSync(_0x5cee5f,{'recursive':!![]});const _0xb69700=_0x530a7a+_0x49f4ac(0x125);try{writeFileSync(_0xb69700,JSON[_0x49f4ac(0x10c)](_0x82c3e8,null,0x2)+'\x0a',{'encoding':_0x49f4ac(0xf6),'mode':0x180}),renameSync(_0xb69700,_0x530a7a);}catch(_0x528f07){try{unlinkSync(_0xb69700);}catch{}throw _0x528f07;}}export function resolveWriteConfigPath(_0x248383){const _0x5cbf5b=a176_0x5cda21,_0x113865=_0x248383===_0x5cbf5b(0x123)?process[_0x5cbf5b(0x105)]():homedir(),_0x428471=resolveConfigPath(_0x113865);return _0x428471??resolve(_0x113865,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x3af0d3=a177_0x24ec;(function(_0x4abc71,_0x44887e){const _0x516cd3=a177_0x24ec,_0x25ce48=_0x4abc71();while(!![]){try{const _0x2f9d1d=parseInt(_0x516cd3(0x1ea))/0x1+parseInt(_0x516cd3(0x1eb))/0x2+-parseInt(_0x516cd3(0x1f0))/0x3+parseInt(_0x516cd3(0x1e3))/0x4*(-parseInt(_0x516cd3(0x200))/0x5)+parseInt(_0x516cd3(0x1e7))/0x6+parseInt(_0x516cd3(0x1ec))/0x7+-parseInt(_0x516cd3(0x1df))/0x8;if(_0x2f9d1d===_0x44887e)break;else _0x25ce48['push'](_0x25ce48['shift']());}catch(_0x5abcc8){_0x25ce48['push'](_0x25ce48['shift']());}}}(a177_0xba29,0x85272));import{resolve}from'node:path';function a177_0xba29(){const _0x51ec07=['find','object','./constant/env.js','projectConfig','cwd','globalConfig','apiDir','project','template_base_url','runtimeDomain','string','./utils/is-non-interactive.js','-api.ts','11560QEkukZ','filter','map','3520400Nmognn','entries','join','apps','1588MLtqds','merged','setLogPath','defaultApp','5428446CZjxJq','appcode','keys','775767rkdSZJ','1412362ZWmzWO','3160500YTyRia','env','length','trim','2804643GiFYoM','https://g.lovrabet.com/dist/lovrabet-skill','setRawCommand'];a177_0xba29=function(){return _0x51ec07;};return a177_0xba29();}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(_0x2f5d47){return process.env[`RABETBASE_${_0x2f5d47}`]||process.env[`LOVRABET_${_0x2f5d47}`]||undefined;}export async function createContext(_0x4e5fcc){const _0x69bff9=a177_0x24ec,{config:_0x1ae823,layers:_0x16dcef}=readRawConfigWithLayers(),_0x2f1312=buildConfig(_0x1ae823,_0x4e5fcc,_0x16dcef),{initEnv:_0x580b07}=await import(_0x69bff9(0x1f5));if(_0x2f1312[_0x69bff9(0x1ed)])_0x580b07(_0x2f1312[_0x69bff9(0x1ed)]);else _0x4e5fcc[_0x69bff9(0x1ed)]&&typeof _0x4e5fcc['env']==='string'&&_0x580b07(_0x4e5fcc[_0x69bff9(0x1ed)]);const {initDomains:_0x343b97,getUserDomain:_0x34caf3,getApiDomain:_0x22028a}=await import('./constant/domain.js');_0x343b97({'apiDomain':_0x1ae823['apiDomain']||undefined,'userDomain':_0x1ae823['userDomain']||undefined,'runtimeDomain':_0x1ae823[_0x69bff9(0x1fc)]||undefined});const _0x1b0a23={'apiDomain':_0x22028a(),'userDomain':_0x34caf3()},_0x5a3f8f=await buildAuth(_0x2f1312);logger[_0x69bff9(0x1e5)](process[_0x69bff9(0x1f7)]());const _0x53c146=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0x69bff9(0x1e1)]('\x20'))[_0x69bff9(0x1ef)]();logger[_0x69bff9(0x1f2)](_0x53c146);const {isNonInteractive:_0x16d7ed}=await import(_0x69bff9(0x1fe)),_0x14a8b2=_0x16d7ed(_0x4e5fcc);return{'config':_0x2f1312,'auth':_0x5a3f8f,'logger':logger,'env':_0x1b0a23,'nonInteractive':_0x14a8b2};}export function buildConfigFromFlags(_0xd139bc){const {config:_0x44fe8e,layers:_0x44d5b0}=readRawConfigWithLayers();return buildConfig(_0x44fe8e,_0xd139bc,_0x44d5b0);}export function getConfigAppCode(_0x1fc83d){const _0x32ed12=a177_0x24ec,_0x50e6e8=readRawConfig(_0x1fc83d);if(_0x50e6e8[_0x32ed12(0x1e2)]&&typeof _0x50e6e8[_0x32ed12(0x1e2)]===_0x32ed12(0x1f4)){const _0x2fd6ab=_0x50e6e8[_0x32ed12(0x1e6)];if(_0x2fd6ab&&_0x50e6e8[_0x32ed12(0x1e2)][_0x2fd6ab]?.[_0x32ed12(0x1e8)])return String(_0x50e6e8[_0x32ed12(0x1e2)][_0x2fd6ab]['appcode'])[_0x32ed12(0x1ef)]();const _0x5e88a6=Object['values'](_0x50e6e8[_0x32ed12(0x1e2)])[0x0];if(_0x5e88a6?.['appcode'])return String(_0x5e88a6[_0x32ed12(0x1e8)])[_0x32ed12(0x1ef)]();}const _0x314d12=_0x50e6e8[_0x32ed12(0x1e8)]||_0x50e6e8['app'];if(typeof _0x314d12!==_0x32ed12(0x1fd)||_0x314d12['trim']()==='')return undefined;return _0x314d12[_0x32ed12(0x1ef)]();}export function getMultiAppConfigs(_0x2de031=a177_0x3af0d3(0x1fa),_0x126f1c){const _0xf047ab=a177_0x3af0d3,_0x562273=loadRawConfigLayers(_0x126f1c);let _0x1b919b,_0x177de4;if(_0x2de031===_0xf047ab(0x1e4)){const _0x1ac175=_0x562273['globalConfig'][_0xf047ab(0x1e2)]&&typeof _0x562273[_0xf047ab(0x1f8)]['apps']==='object'?_0x562273['globalConfig'][_0xf047ab(0x1e2)]:{},_0x475347=_0x562273[_0xf047ab(0x1f6)][_0xf047ab(0x1e2)]&&typeof _0x562273[_0xf047ab(0x1f6)][_0xf047ab(0x1e2)]===_0xf047ab(0x1f4)?_0x562273[_0xf047ab(0x1f6)]['apps']:{};_0x1b919b={..._0x1ac175,..._0x475347};const _0x2f7d3b=readRawConfig(_0x126f1c);_0x177de4=_0x2f7d3b[_0xf047ab(0x1e6)];}else _0x1b919b=_0x562273[_0xf047ab(0x1f6)][_0xf047ab(0x1e2)],_0x177de4=_0x562273[_0xf047ab(0x1f6)][_0xf047ab(0x1e6)];if(!_0x1b919b||typeof _0x1b919b!==_0xf047ab(0x1f4)||Object[_0xf047ab(0x1e9)](_0x1b919b)[_0xf047ab(0x1ee)]===0x0)return null;return Object[_0xf047ab(0x1e0)](_0x1b919b)[_0xf047ab(0x202)](([_0x398b5e,_0xafb1f5])=>({'name':_0x398b5e,'appcode':_0xafb1f5?.[_0xf047ab(0x1e8)]||'','isDefault':_0x398b5e===_0x177de4,'env':_0xafb1f5?.[_0xf047ab(0x1ed)],'apiDir':_0xafb1f5?.[_0xf047ab(0x1f9)],'cookie':_0xafb1f5?.['cookie']||undefined}))[_0xf047ab(0x201)](_0x5a7808=>_0x5a7808[_0xf047ab(0x1e8)]);}export function getTemplateBaseUrl(_0x2f1c57){const _0x5b31f9=a177_0x3af0d3,_0x1a5211=readRawConfig(_0x2f1c57);if(_0x1a5211[_0x5b31f9(0x1fb)]&&typeof _0x1a5211['template_base_url']===_0x5b31f9(0x1fd))return _0x1a5211[_0x5b31f9(0x1fb)]['replace'](/\/$/,'');return _0x5b31f9(0x1f1);}function a177_0x24ec(_0x3f63be,_0x51147a){_0x3f63be=_0x3f63be-0x1df;const _0xba29dc=a177_0xba29();let _0x24ecb9=_0xba29dc[_0x3f63be];return _0x24ecb9;}function buildConfig(_0xf32d88,_0x5f5cae,_0x5a4c8b){return{...resolveAppConfig({'raw':_0xf32d88,'flags':_0x5f5cae,'layers':_0x5a4c8b,'readEnv':env}),'raw':_0xf32d88};}export function resolveApiFilePath(_0x13ac28,_0x412350){const _0x3ddd4c=a177_0x3af0d3,_0x54a037=resolve(process['cwd'](),_0x13ac28),_0x32be7a=resolve(_0x54a037,'api.ts');if(!_0x412350)return _0x32be7a;const _0x5c4581=readRawConfig(),_0xf45697=_0x5c4581[_0x3ddd4c(0x1e2)]&&typeof _0x5c4581[_0x3ddd4c(0x1e2)]===_0x3ddd4c(0x1f4)?_0x5c4581[_0x3ddd4c(0x1e2)]:{},_0x11f9f5=Object[_0x3ddd4c(0x1e0)](_0xf45697)[_0x3ddd4c(0x1f3)](([,_0x14b9de])=>_0x14b9de?.['appcode']===_0x412350);if(!_0x11f9f5)return _0x32be7a;const [_0x5bd1e5,_0x3955a2]=_0x11f9f5,_0x753d62=typeof _0x5c4581[_0x3ddd4c(0x1e6)]===_0x3ddd4c(0x1fd)?_0x5c4581[_0x3ddd4c(0x1e6)]:undefined;if(_0x3955a2?.[_0x3ddd4c(0x1f9)])return _0x32be7a;if(_0x753d62&&_0x5bd1e5!==_0x753d62)return resolve(_0x54a037,_0x5bd1e5+_0x3ddd4c(0x1ff));return _0x32be7a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b2823,_0x5e7498){const _0x21063c=a178_0x30f9,_0x364691=_0x2b2823();while(!![]){try{const _0x7d0766=parseInt(_0x21063c(0xab))/0x1+parseInt(_0x21063c(0xb9))/0x2+parseInt(_0x21063c(0xb6))/0x3*(parseInt(_0x21063c(0xaf))/0x4)+parseInt(_0x21063c(0xb8))/0x5*(-parseInt(_0x21063c(0xb5))/0x6)+parseInt(_0x21063c(0xb2))/0x7*(parseInt(_0x21063c(0xb4))/0x8)+-parseInt(_0x21063c(0xb3))/0x9*(parseInt(_0x21063c(0xad))/0xa)+-parseInt(_0x21063c(0xb7))/0xb*(parseInt(_0x21063c(0xa9))/0xc);if(_0x7d0766===_0x5e7498)break;else _0x364691['push'](_0x364691['shift']());}catch(_0x1df3cf){_0x364691['push'](_0x364691['shift']());}}}(a178_0x569d,0x67ee5));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a178_0x569d(){const _0xdd296a=['5nCjwAQ','1227702EBgsDs','cwd','exec','set','find','23448rqlwlh','push','83896tELLQx','get','380OcchnA','alias','387356WlxLku','utf-8','api.ts','4626363yAefaO','99459RtOAOa','8caMwCH','3412932tAwjAd','3HyyEHE','231jdZtzK'];a178_0x569d=function(){return _0xdd296a;};return a178_0x569d();}function a178_0x30f9(_0x5a750b,_0x57cebe){_0x5a750b=_0x5a750b-0xa9;const _0x569d34=a178_0x569d();let _0x30f972=_0x569d34[_0x5a750b];return _0x30f972;}function parseApiFile(_0x34a233){const _0x4435fc=a178_0x30f9,_0x4e1119=[],_0x54a8c3=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3f1b77;while((_0x3f1b77=_0x54a8c3[_0x4435fc(0xbb)](_0x34a233))!==null){_0x4e1119[_0x4435fc(0xaa)]({'datasetCode':_0x3f1b77[0x1],'tableName':_0x3f1b77[0x2],'name':_0x3f1b77[0x3],'alias':_0x3f1b77[0x4]});}return _0x4e1119;}export function loadAliasMap(_0x3eff65,_0x5f2bd3,_0x250cf9){const _0x38ccd2=a178_0x30f9,_0x50c9fe=_0x250cf9??resolve(process[_0x38ccd2(0xba)](),_0x3eff65,_0x38ccd2(0xb1));if(cache['has'](_0x50c9fe))return cache[_0x38ccd2(0xac)](_0x50c9fe);if(!existsSync(_0x50c9fe))return cache[_0x38ccd2(0xbc)](_0x50c9fe,[]),[];try{const _0x176f3d=readFileSync(_0x50c9fe,_0x38ccd2(0xb0)),_0x591f82=parseApiFile(_0x176f3d);return cache[_0x38ccd2(0xbc)](_0x50c9fe,_0x591f82),_0x591f82;}catch{return cache[_0x38ccd2(0xbc)](_0x50c9fe,[]),[];}}export function resolveAlias(_0x21f476,_0x1933e0,_0x3682ce,_0x5d53be){const _0x506119=a178_0x30f9;if(!_0x1933e0)return undefined;const _0x2ff712=loadAliasMap(_0x21f476,_0x3682ce,_0x5d53be),_0x3c6115=_0x2ff712[_0x506119(0xbd)](_0x305457=>_0x305457[_0x506119(0xae)]===_0x1933e0);return _0x3c6115?.['datasetCode'];}export function listAliases(_0x18d71a,_0x52b5cc,_0x33a9b5){return loadAliasMap(_0x18d71a,_0x52b5cc,_0x33a9b5);}
|