@lovrabet/rabetbase-cli 2.3.7-beta.4 → 2.3.7
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/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/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/notification/config-list.js +1 -1
- package/lib/commands/notification/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/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
|
-
function a173_0x3179(){const _0x17f6f5=['Config\x20value','<code>','appcode','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','1254Ponoek','json\x20|\x20pretty\x20|\x20compress','watch','help','name','dry-run','SQL\x20string','@lovrabet/rabetbase-cli','output','map','rabetbase','yes','function-node','env','Dataset\x20code','Description\x20file','Skip\x20confirmation\x20for\x20high-risk\x20writes','confirm','reveal','non-interactive','Name','functionNode','Function\x20node','2378StXeAP','Clear','Force\x20overwrite','Output\x20format','<expr>','operation','Show\x20help','remote','SQL\x20name','expectedCount','skip-imports','Verbose\x20output','Record\x20ID','Override\x20appcode','fromEnv','Keyword\x20filter','operation-type','descriptionFile','type','Page\x20number','10UdaxCq','SQL\x20code','schemas','File\x20path','params','format','page','tags','934NWlWoF','boolean','sql','stdin','enable-bff-save','Output\x20path','Use\x20project\x20config\x20scope','description','DB\x20ID','description-file','Page\x20size','5zrNOIB','target','db-id','Schemas','pagesize','Config\x20key','Code\x20filter','Environment','project','3997888DfACMn','sqlcode','Use\x20remote','global','JSON\x20params','dbid','328644bngAzE','from-env','enableBffSave','38143mJTysZ','production\x20|\x20daily','Skip\x20import\x20generation','sql-name','Use\x20global\x20config\x20scope','file','keyword','3651836hzSPLw','Apply\x20to\x20all','verbose','Type\x20filter','title','Title','code','Confirm\x20destructive\x20action','36872539CmimeO','dryRun','app','Expected\x20affected\x20count','all','value','datasetcode','string','clear','7445313ILXcbr','Tags','sqlname'];a173_0x3179=function(){return _0x17f6f5;};return a173_0x3179();}function a173_0x4570(_0x6d580b,_0x5438d7){_0x6d580b=_0x6d580b-0x11b;const _0x317948=a173_0x3179();let _0x4570b1=_0x317948[_0x6d580b];return _0x4570b1;}const a173_0x3dc5e9=a173_0x4570;(function(_0x2eeb59,_0x5b9189){const _0x149e42=a173_0x4570,_0x3826ed=_0x2eeb59();while(!![]){try{const _0x527c46=parseInt(_0x149e42(0x137))/0x1*(-parseInt(_0x149e42(0x153))/0x2)+parseInt(_0x149e42(0x16d))/0x3+-parseInt(_0x149e42(0x177))/0x4*(parseInt(_0x149e42(0x15e))/0x5)+parseInt(_0x149e42(0x120))/0x6*(-parseInt(_0x149e42(0x170))/0x7)+-parseInt(_0x149e42(0x167))/0x8+-parseInt(_0x149e42(0x188))/0x9*(-parseInt(_0x149e42(0x14b))/0xa)+parseInt(_0x149e42(0x17f))/0xb;if(_0x527c46===_0x5b9189)break;else _0x3826ed['push'](_0x3826ed['shift']());}catch(_0x286743){_0x3826ed['push'](_0x3826ed['shift']());}}}(a173_0x3179,0x99068));export const CLI_BIN_NAME=a173_0x3dc5e9(0x12a);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a173_0x3dc5e9(0x127);export const GLOBAL_FLAGS=[{'name':a173_0x3dc5e9(0x11e),'meowKey':a173_0x3dc5e9(0x11e),'type':'string','description':a173_0x3dc5e9(0x144),'hint':a173_0x3dc5e9(0x11d)},{'name':'app','meowKey':a173_0x3dc5e9(0x181),'type':a173_0x3dc5e9(0x186),'description':'Select\x20app\x20profile\x20by\x20name','hint':'<name>'},{'name':a173_0x3dc5e9(0x12d),'meowKey':a173_0x3dc5e9(0x12d),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x165),'hint':a173_0x3dc5e9(0x171)},{'name':a173_0x3dc5e9(0x150),'meowKey':a173_0x3dc5e9(0x150),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x13a),'hint':a173_0x3dc5e9(0x121)},{'name':'jq','meowKey':'jq','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x11f),'hint':a173_0x3dc5e9(0x13b)},{'name':'dry-run','meowKey':a173_0x3dc5e9(0x180),'type':a173_0x3dc5e9(0x154),'description':'Preview\x20operation\x20without\x20executing'},{'name':a173_0x3dc5e9(0x12b),'meowKey':a173_0x3dc5e9(0x12b),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x130)},{'name':a173_0x3dc5e9(0x133),'meowKey':'nonInteractive','type':a173_0x3dc5e9(0x154),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a173_0x3dc5e9(0x16a),'meowKey':a173_0x3dc5e9(0x16a),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x174)},{'name':a173_0x3dc5e9(0x166),'meowKey':a173_0x3dc5e9(0x166),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x159)},{'name':'ci','meowKey':'ci','type':a173_0x3dc5e9(0x154),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a173_0x3dc5e9(0x123),'meowKey':a173_0x3dc5e9(0x123),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x13d)},{'name':a173_0x3dc5e9(0x124),'meowKey':a173_0x3dc5e9(0x124),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x134),'hidden':!![]},{'name':a173_0x3dc5e9(0x17b),'meowKey':a173_0x3dc5e9(0x17b),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x17c),'hidden':!![]},{'name':a173_0x3dc5e9(0x187),'meowKey':a173_0x3dc5e9(0x187),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x138),'hidden':!![]},{'name':a173_0x3dc5e9(0x122),'meowKey':a173_0x3dc5e9(0x122),'type':'boolean','description':'Watch\x20mode','hidden':!![]},{'name':a173_0x3dc5e9(0x128),'meowKey':'output','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x158),'hidden':!![]},{'name':'params','meowKey':a173_0x3dc5e9(0x14f),'type':'string','description':a173_0x3dc5e9(0x16b),'hidden':!![]},{'name':a173_0x3dc5e9(0x185),'meowKey':'datasetcode','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x12e),'hidden':!![]},{'name':a173_0x3dc5e9(0x183),'meowKey':a173_0x3dc5e9(0x183),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x178),'hidden':!![]},{'name':a173_0x3dc5e9(0x157),'meowKey':a173_0x3dc5e9(0x16f),'type':a173_0x3dc5e9(0x154),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x143),'hidden':!![]},{'name':a173_0x3dc5e9(0x149),'meowKey':a173_0x3dc5e9(0x149),'type':'string','description':a173_0x3dc5e9(0x17a),'hidden':!![]},{'name':'file','meowKey':a173_0x3dc5e9(0x175),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x14e),'hidden':!![]},{'name':a173_0x3dc5e9(0x168),'meowKey':a173_0x3dc5e9(0x168),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x14c),'hidden':!![]},{'name':a173_0x3dc5e9(0x173),'meowKey':'sqlName','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x13f),'hidden':!![]},{'name':a173_0x3dc5e9(0x11b),'meowKey':a173_0x3dc5e9(0x11b),'type':'string','description':a173_0x3dc5e9(0x13f),'hidden':!![]},{'name':a173_0x3dc5e9(0x160),'meowKey':'dbId','type':a173_0x3dc5e9(0x186),'description':'DB\x20ID','hidden':!![]},{'name':a173_0x3dc5e9(0x16c),'meowKey':a173_0x3dc5e9(0x16c),'type':'string','description':a173_0x3dc5e9(0x15b),'hidden':!![]},{'name':'description','meowKey':a173_0x3dc5e9(0x15a),'type':a173_0x3dc5e9(0x186),'description':'Description','hidden':!![]},{'name':a173_0x3dc5e9(0x15c),'meowKey':a173_0x3dc5e9(0x148),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x12f),'hidden':!![]},{'name':a173_0x3dc5e9(0x151),'meowKey':a173_0x3dc5e9(0x151),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x14a),'hidden':!![]},{'name':a173_0x3dc5e9(0x162),'meowKey':a173_0x3dc5e9(0x162),'type':'string','description':a173_0x3dc5e9(0x15d),'hidden':!![]},{'name':a173_0x3dc5e9(0x176),'meowKey':a173_0x3dc5e9(0x176),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x146),'hidden':!![]},{'name':a173_0x3dc5e9(0x17d),'meowKey':a173_0x3dc5e9(0x17d),'type':'string','description':a173_0x3dc5e9(0x164),'hidden':!![]},{'name':a173_0x3dc5e9(0x155),'meowKey':'sql','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x126),'hidden':!![]},{'name':'schemas','meowKey':a173_0x3dc5e9(0x14d),'type':'string','description':a173_0x3dc5e9(0x161),'hidden':!![]},{'name':a173_0x3dc5e9(0x13c),'meowKey':a173_0x3dc5e9(0x13c),'type':a173_0x3dc5e9(0x186),'description':'Operation\x20type','hidden':!![]},{'name':a173_0x3dc5e9(0x15f),'meowKey':a173_0x3dc5e9(0x15f),'type':a173_0x3dc5e9(0x186),'description':'Target\x20path','hidden':!![]},{'name':a173_0x3dc5e9(0x141),'meowKey':'skipImports','type':'boolean','description':a173_0x3dc5e9(0x172),'hidden':!![]},{'name':'key','meowKey':'key','type':'string','description':a173_0x3dc5e9(0x163),'hidden':!![]},{'name':a173_0x3dc5e9(0x184),'meowKey':'value','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x11c),'hidden':!![]},{'name':a173_0x3dc5e9(0x152),'meowKey':'tags','type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x189),'hidden':!![]},{'name':a173_0x3dc5e9(0x156),'meowKey':a173_0x3dc5e9(0x156),'type':a173_0x3dc5e9(0x154),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':a173_0x3dc5e9(0x16e),'meowKey':a173_0x3dc5e9(0x145),'type':'string','description':'Read\x20value\x20from\x20environment\x20variable','hidden':!![]},{'name':a173_0x3dc5e9(0x132),'meowKey':'reveal','type':'boolean','description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':'force','meowKey':'force','type':'boolean','description':a173_0x3dc5e9(0x139),'hidden':!![]},{'name':a173_0x3dc5e9(0x131),'meowKey':a173_0x3dc5e9(0x131),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x17e),'hidden':!![]},{'name':a173_0x3dc5e9(0x13e),'meowKey':a173_0x3dc5e9(0x13e),'type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x169),'hidden':!![]},{'name':a173_0x3dc5e9(0x179),'meowKey':'verbose','type':a173_0x3dc5e9(0x154),'description':a173_0x3dc5e9(0x142),'hidden':!![]},{'name':'expected-count','meowKey':a173_0x3dc5e9(0x140),'type':'string','description':a173_0x3dc5e9(0x182),'hidden':!![]},{'name':a173_0x3dc5e9(0x147),'meowKey':'operationType','type':a173_0x3dc5e9(0x186),'description':'Operation\x20type','hidden':!![]},{'name':a173_0x3dc5e9(0x12c),'meowKey':a173_0x3dc5e9(0x135),'type':a173_0x3dc5e9(0x186),'description':a173_0x3dc5e9(0x136),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a173_0x3dc5e9(0x11e),a173_0x3dc5e9(0x181),a173_0x3dc5e9(0x12d),'format','jq',a173_0x3dc5e9(0x125),a173_0x3dc5e9(0x12b),a173_0x3dc5e9(0x133),'ci']);export function buildMeowFlags(){const _0x52dbcf=a173_0x3dc5e9;return Object['fromEntries'](GLOBAL_FLAGS[_0x52dbcf(0x129)](_0x2b35fc=>[_0x2b35fc['meowKey'],{'type':_0x2b35fc[_0x52dbcf(0x149)]}]));}
|
|
1
|
+
const a173_0x494d19=a173_0x1f82;function a173_0x297f(){const _0x4b87ee=['Config\x20key','Description','Description\x20file','enableBffSave','95767kcRubL','fromEnv','rabetbase','sqlcode','skip-imports','Tags','Clear','params','Reveal\x20sensitive\x20value','Use\x20global\x20config\x20scope','enable-bff-save','sqlname','sql','type','appcode','Skip\x20import\x20generation','db-id','name','all','global','project','remote','Force\x20overwrite','Alias\x20for\x20--non-interactive','Record\x20ID','yes','471240EdvBKj','Verbose\x20output','nonInteractive','Select\x20app\x20profile\x20by\x20name','verbose','skipImports','Read\x20value\x20from\x20stdin','dbid','Schemas','JSON\x20params','keyword','Output\x20path','datasetcode','Skip\x20confirmation\x20for\x20high-risk\x20writes','1239700EYTEbB','boolean','<expr>','key','4231265NLBAvM','Confirm\x20destructive\x20action','file','function-node','env','tags','Keyword\x20filter','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','code','expectedCount','Watch\x20mode','descriptionFile','Output\x20format','operation','Page\x20size','Target\x20path','Preview\x20operation\x20without\x20executing','Read\x20value\x20from\x20environment\x20variable','target','non-interactive','12692WjAkQM','page','dbId','production\x20|\x20daily','pagesize','Page\x20number','description-file','clear','operation-type','13491oQRaVG','<name>','map','DB\x20ID','stdin','Function\x20node','string','format','help','Title','expected-count','title','Use\x20remote','schemas','Enable\x20BFF\x20save','9529350QGiopx','confirm','File\x20path','output','dry-run','Config\x20value','sql-name','414ahuotS','app','3824SHdLXB','fromEntries','9qfQTJO','Type\x20filter','SQL\x20name','Rabetbase\x20CLI','reveal','Show\x20help'];a173_0x297f=function(){return _0x4b87ee;};return a173_0x297f();}(function(_0x30d336,_0x5d0ee9){const _0x2ee055=a173_0x1f82,_0x556fe6=_0x30d336();while(!![]){try{const _0xe27033=-parseInt(_0x2ee055(0x141))/0x1+-parseInt(_0x2ee055(0xfa))/0x2*(parseInt(_0x2ee055(0x11d))/0x3)+-parseInt(_0x2ee055(0x14f))/0x4+parseInt(_0x2ee055(0xe6))/0x5+parseInt(_0x2ee055(0x119))/0x6*(-parseInt(_0x2ee055(0x127))/0x7)+parseInt(_0x2ee055(0x11b))/0x8*(parseInt(_0x2ee055(0x103))/0x9)+parseInt(_0x2ee055(0x112))/0xa;if(_0xe27033===_0x5d0ee9)break;else _0x556fe6['push'](_0x556fe6['shift']());}catch(_0x34d1ff){_0x556fe6['push'](_0x556fe6['shift']());}}}(a173_0x297f,0xbc5be));function a173_0x1f82(_0x21d1ed,_0x36e4dd){_0x21d1ed=_0x21d1ed-0xe3;const _0x297f70=a173_0x297f();let _0x1f823d=_0x297f70[_0x21d1ed];return _0x1f823d;}export const CLI_BIN_NAME=a173_0x494d19(0x129);export const CLI_DISPLAY_NAME=a173_0x494d19(0x120);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a173_0x494d19(0x135),'meowKey':a173_0x494d19(0x135),'type':a173_0x494d19(0x109),'description':'Override\x20appcode','hint':'<code>'},{'name':a173_0x494d19(0x11a),'meowKey':a173_0x494d19(0x11a),'type':'string','description':a173_0x494d19(0x144),'hint':a173_0x494d19(0x104)},{'name':a173_0x494d19(0xea),'meowKey':a173_0x494d19(0xea),'type':a173_0x494d19(0x109),'description':'Environment','hint':a173_0x494d19(0xfd)},{'name':a173_0x494d19(0x10a),'meowKey':a173_0x494d19(0x10a),'type':'string','description':a173_0x494d19(0xf2),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a173_0x494d19(0x109),'description':a173_0x494d19(0xed),'hint':a173_0x494d19(0xe4)},{'name':a173_0x494d19(0x116),'meowKey':'dryRun','type':a173_0x494d19(0xe3),'description':a173_0x494d19(0xf6)},{'name':a173_0x494d19(0x140),'meowKey':a173_0x494d19(0x140),'type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x14e)},{'name':'non-interactive','meowKey':a173_0x494d19(0x143),'type':a173_0x494d19(0xe3),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a173_0x494d19(0x13a),'meowKey':a173_0x494d19(0x13a),'type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x130)},{'name':a173_0x494d19(0x13b),'meowKey':a173_0x494d19(0x13b),'type':a173_0x494d19(0xe3),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a173_0x494d19(0x13e),'hidden':!![]},{'name':a173_0x494d19(0x10b),'meowKey':'help','type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x122)},{'name':a173_0x494d19(0x138),'meowKey':'name','type':a173_0x494d19(0x109),'description':'Name','hidden':!![]},{'name':a173_0x494d19(0x10e),'meowKey':a173_0x494d19(0x10e),'type':'string','description':a173_0x494d19(0x10c),'hidden':!![]},{'name':a173_0x494d19(0x101),'meowKey':'clear','type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x12d),'hidden':!![]},{'name':'watch','meowKey':'watch','type':a173_0x494d19(0xe3),'description':a173_0x494d19(0xf0),'hidden':!![]},{'name':a173_0x494d19(0x115),'meowKey':'output','type':a173_0x494d19(0x109),'description':a173_0x494d19(0x14c),'hidden':!![]},{'name':a173_0x494d19(0x12e),'meowKey':a173_0x494d19(0x12e),'type':'string','description':a173_0x494d19(0x14a),'hidden':!![]},{'name':a173_0x494d19(0x14d),'meowKey':a173_0x494d19(0x14d),'type':a173_0x494d19(0x109),'description':'Dataset\x20code','hidden':!![]},{'name':'all','meowKey':a173_0x494d19(0x139),'type':a173_0x494d19(0xe3),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a173_0x494d19(0x131),'meowKey':a173_0x494d19(0x126),'type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x111),'hidden':!![]},{'name':'id','meowKey':'id','type':a173_0x494d19(0x109),'description':a173_0x494d19(0x13f),'hidden':!![]},{'name':a173_0x494d19(0x134),'meowKey':a173_0x494d19(0x134),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x11e),'hidden':!![]},{'name':a173_0x494d19(0xe8),'meowKey':a173_0x494d19(0xe8),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x114),'hidden':!![]},{'name':a173_0x494d19(0x12a),'meowKey':a173_0x494d19(0x12a),'type':a173_0x494d19(0x109),'description':'SQL\x20code','hidden':!![]},{'name':a173_0x494d19(0x118),'meowKey':'sqlName','type':a173_0x494d19(0x109),'description':a173_0x494d19(0x11f),'hidden':!![]},{'name':a173_0x494d19(0x132),'meowKey':a173_0x494d19(0x132),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x11f),'hidden':!![]},{'name':a173_0x494d19(0x137),'meowKey':a173_0x494d19(0xfc),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x106),'hidden':!![]},{'name':'dbid','meowKey':a173_0x494d19(0x148),'type':a173_0x494d19(0x109),'description':'DB\x20ID','hidden':!![]},{'name':'description','meowKey':'description','type':'string','description':a173_0x494d19(0x124),'hidden':!![]},{'name':a173_0x494d19(0x100),'meowKey':a173_0x494d19(0xf1),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x125),'hidden':!![]},{'name':a173_0x494d19(0xfb),'meowKey':a173_0x494d19(0xfb),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0xff),'hidden':!![]},{'name':a173_0x494d19(0xfe),'meowKey':'pagesize','type':'string','description':a173_0x494d19(0xf4),'hidden':!![]},{'name':a173_0x494d19(0x14b),'meowKey':a173_0x494d19(0x14b),'type':'string','description':a173_0x494d19(0xec),'hidden':!![]},{'name':a173_0x494d19(0xee),'meowKey':a173_0x494d19(0xee),'type':'string','description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':a173_0x494d19(0x133),'type':a173_0x494d19(0x109),'description':'SQL\x20string','hidden':!![]},{'name':a173_0x494d19(0x110),'meowKey':'schemas','type':a173_0x494d19(0x109),'description':a173_0x494d19(0x149),'hidden':!![]},{'name':'operation','meowKey':a173_0x494d19(0xf3),'type':a173_0x494d19(0x109),'description':'Operation\x20type','hidden':!![]},{'name':'target','meowKey':a173_0x494d19(0xf8),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0xf5),'hidden':!![]},{'name':a173_0x494d19(0x12b),'meowKey':a173_0x494d19(0x146),'type':'boolean','description':a173_0x494d19(0x136),'hidden':!![]},{'name':a173_0x494d19(0xe5),'meowKey':a173_0x494d19(0xe5),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0x123),'hidden':!![]},{'name':'value','meowKey':'value','type':a173_0x494d19(0x109),'description':a173_0x494d19(0x117),'hidden':!![]},{'name':'tags','meowKey':a173_0x494d19(0xeb),'type':'string','description':a173_0x494d19(0x12c),'hidden':!![]},{'name':'stdin','meowKey':a173_0x494d19(0x107),'type':'boolean','description':a173_0x494d19(0x147),'hidden':!![]},{'name':'from-env','meowKey':a173_0x494d19(0x128),'type':a173_0x494d19(0x109),'description':a173_0x494d19(0xf7),'hidden':!![]},{'name':a173_0x494d19(0x121),'meowKey':'reveal','type':a173_0x494d19(0xe3),'description':a173_0x494d19(0x12f),'hidden':!![]},{'name':'force','meowKey':'force','type':'boolean','description':a173_0x494d19(0x13d),'hidden':!![]},{'name':'confirm','meowKey':a173_0x494d19(0x113),'type':a173_0x494d19(0xe3),'description':a173_0x494d19(0xe7),'hidden':!![]},{'name':a173_0x494d19(0x13c),'meowKey':'remote','type':'boolean','description':a173_0x494d19(0x10f),'hidden':!![]},{'name':a173_0x494d19(0x145),'meowKey':a173_0x494d19(0x145),'type':'boolean','description':a173_0x494d19(0x142),'hidden':!![]},{'name':a173_0x494d19(0x10d),'meowKey':a173_0x494d19(0xef),'type':a173_0x494d19(0x109),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a173_0x494d19(0x102),'meowKey':'operationType','type':a173_0x494d19(0x109),'description':'Operation\x20type','hidden':!![]},{'name':a173_0x494d19(0xe9),'meowKey':'functionNode','type':'string','description':a173_0x494d19(0x108),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a173_0x494d19(0x135),a173_0x494d19(0x11a),'env',a173_0x494d19(0x10a),'jq','dry-run',a173_0x494d19(0x140),a173_0x494d19(0xf9),'ci']);export function buildMeowFlags(){const _0x1cf13b=a173_0x494d19;return Object[_0x1cf13b(0x11c)](GLOBAL_FLAGS[_0x1cf13b(0x105)](_0xb2e296=>[_0xb2e296['meowKey'],{'type':_0xb2e296[_0x1cf13b(0x134)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a174_0x41a347=a174_0xd8c8;(function(_0x599f4a,_0x36952a){const _0x4637cb=a174_0xd8c8,_0x5cd99c=_0x599f4a();while(!![]){try{const _0x441850=parseInt(_0x4637cb(0xe4))/0x1*(-parseInt(_0x4637cb(0xea))/0x2)+-parseInt(_0x4637cb(0xe3))/0x3+parseInt(_0x4637cb(0xec))/0x4*(-parseInt(_0x4637cb(0xeb))/0x5)+-parseInt(_0x4637cb(0xe1))/0x6*(-parseInt(_0x4637cb(0xe7))/0x7)+parseInt(_0x4637cb(0xe2))/0x8*(parseInt(_0x4637cb(0xe6))/0x9)+-parseInt(_0x4637cb(0xe9))/0xa+parseInt(_0x4637cb(0xed))/0xb*(parseInt(_0x4637cb(0xe5))/0xc);if(_0x441850===_0x36952a)break;else _0x5cd99c['push'](_0x5cd99c['shift']());}catch(_0x3b1879){_0x5cd99c['push'](_0x5cd99c['shift']());}}}(a174_0xb826,0x5dfc2));import{DEFAULT_API_DIR}from'../constant/paths.js';function a174_0xd8c8(_0x3efe46,_0x239891){_0x3efe46=_0x3efe46-0xdf;const _0xb826de=a174_0xb826();let _0xd8c8b8=_0xb826de[_0x3efe46];return _0xd8c8b8;}export const DEFAULT_CONFIG_VALUES={'env':a174_0x41a347(0xdf),'format':a174_0x41a347(0xe8),'locale':a174_0x41a347(0xe0),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};function a174_0xb826(){const _0x47405e=['597771vFUSyN','14dDOdaY','compress','3618730fCtPkt','242582XfddmX','5zfPFsL','2630828whzLyw','19701glgJdV','production','en-US','650124JvLArf','56dLStUK','1288218wLyawh','5HgngTQ','11784xHVsHC'];a174_0xb826=function(){return _0x47405e;};return a174_0xb826();}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x592eed=a175_0x49f8;(function(_0x39609e,_0x3912eb){const _0x4fdff1=a175_0x49f8,_0x370049=_0x39609e();while(!![]){try{const _0x1aba4e=-parseInt(_0x4fdff1(0xaa))/0x1*(-parseInt(_0x4fdff1(0xab))/0x2)+-parseInt(_0x4fdff1(0xb2))/0x3+-parseInt(_0x4fdff1(0xb6))/0x4+-parseInt(_0x4fdff1(0xb4))/0x5+-parseInt(_0x4fdff1(0xb7))/0x6+-parseInt(_0x4fdff1(0xb8))/0x7*(-parseInt(_0x4fdff1(0xae))/0x8)+parseInt(_0x4fdff1(0xb1))/0x9*(parseInt(_0x4fdff1(0xa7))/0xa);if(_0x1aba4e===_0x3912eb)break;else _0x370049['push'](_0x370049['shift']());}catch(_0x4bfb83){_0x370049['push'](_0x370049['shift']());}}}(a175_0x1f06,0xbd8c6));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2df1f6){const _0x5a0e07=a175_0x49f8;customApiDomain=_0x2df1f6?.[_0x5a0e07(0xb3)],customUserDomain=_0x2df1f6?.[_0x5a0e07(0xb0)],customRuntimeDomain=_0x2df1f6?.[_0x5a0e07(0xb5)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a175_0x592eed(0xaf):a175_0x592eed(0xa9));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a175_0x592eed(0xad):a175_0x592eed(0xac));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?'https://app.lovrabet.com':'https://daily.lovrabet.com';function a175_0x49f8(_0x354e91,_0x4322af){_0x354e91=_0x354e91-0xa6;const _0x1f069b=a175_0x1f06();let _0x49f862=_0x1f069b[_0x354e91];return _0x49f862;}export const getAppBaseUrl=_0x31c1dd=>{const _0x213224=a175_0x592eed,_0x1de658=encodeURIComponent(_0x31c1dd[_0x213224(0xa6)]());return isProduction(getEnv())?getAppDomain()+_0x213224(0xa8)+_0x1de658:getAppDomain()+'/web-app/app/'+_0x1de658;};function a175_0x1f06(){const _0x408144=['5500864peQrel','6451776dsZeMx','378XDMgfv','trim','8860WmbBOa','/app/','https://user-daily.lovrabet.com','347117WgAhbf','6KKeWji','https://daily-api.lovrabet.com','https://api.lovrabet.com','132536GYVtRj','https://user.lovrabet.com','userDomain','40176ifOIsc','4415034fmNXqJ','apiDomain','5962465XSXXQA','runtimeDomain'];a175_0x1f06=function(){return _0x408144;};return a175_0x1f06();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a176_0x513d(){const _0x3fc74a=['online','dev','316042fsWOWU','366120vdpnHN','6ImYXJm','1426854atHTyI','26037feHcAl','1100204UrrsrK','1446764fASuqQ','production','daily','5LvAucj','5693360lFUfgf','104FFyKZi'];a176_0x513d=function(){return _0x3fc74a;};return a176_0x513d();}const a176_0x1c70e9=a176_0x2ca9;(function(_0x2bef92,_0x4ef913){const _0xdfb8d5=a176_0x2ca9,_0x165b50=_0x2bef92();while(!![]){try{const _0x2e614b=parseInt(_0xdfb8d5(0x172))/0x1+parseInt(_0xdfb8d5(0x171))/0x2*(-parseInt(_0xdfb8d5(0x173))/0x3)+-parseInt(_0xdfb8d5(0x169))/0x4*(parseInt(_0xdfb8d5(0x16c))/0x5)+-parseInt(_0xdfb8d5(0x174))/0x6+parseInt(_0xdfb8d5(0x176))/0x7+parseInt(_0xdfb8d5(0x16e))/0x8*(parseInt(_0xdfb8d5(0x175))/0x9)+parseInt(_0xdfb8d5(0x16d))/0xa;if(_0x2e614b===_0x4ef913)break;else _0x165b50['push'](_0x165b50['shift']());}catch(_0x56a8d6){_0x165b50['push'](_0x165b50['shift']());}}}(a176_0x513d,0x346a7));export const RABETBASE_ENV_VALUES=[a176_0x1c70e9(0x16a),a176_0x1c70e9(0x16b)];export function normalizeEnv(_0x3c8886){const _0x4dc392=a176_0x1c70e9;return _0x3c8886===_0x4dc392(0x16f)?_0x4dc392(0x16a):_0x3c8886;}export function isProduction(_0x4ea600){const _0x4a1251=a176_0x1c70e9;return normalizeEnv(_0x4ea600)===_0x4a1251(0x16a);}export function isDaily(_0x873fc){return normalizeEnv(_0x873fc)==='daily';}export function isDev(_0x52bed6){const _0x2f5fa1=a176_0x1c70e9,_0x3d67a6=normalizeEnv(_0x52bed6);return _0x3d67a6==='development'||_0x3d67a6===_0x2f5fa1(0x170);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a176_0x1c70e9(0x16a));export function getEnv(){return env;}function a176_0x2ca9(_0x47ceb0,_0x591f94){_0x47ceb0=_0x47ceb0-0x169;const _0x513d91=a176_0x513d();let _0x2ca944=_0x513d91[_0x47ceb0];return _0x2ca944;}export function initEnv(_0xe78e9b){env=normalizeEnv(_0xe78e9b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a177_0x37a8(){const _0x2457b5=['672848BxwDtx','1520682bUyCpf','1732388Hsymna','4918YgAcpl','46668egEGQD','570796HBBIag','407qQQOsA','5wbWHeB','pretty','9NGcNNE','81FvRxJx','6OBVRov','json','1303250QLIMgH'];a177_0x37a8=function(){return _0x2457b5;};return a177_0x37a8();}function a177_0x722c(_0x54be12,_0x59abda){_0x54be12=_0x54be12-0x1e8;const _0x37a855=a177_0x37a8();let _0x722c7b=_0x37a855[_0x54be12];return _0x722c7b;}const a177_0x419a18=a177_0x722c;(function(_0x3d12ab,_0x723ce3){const _0x419cdd=a177_0x722c,_0x1cd390=_0x3d12ab();while(!![]){try{const _0x559fb6=-parseInt(_0x419cdd(0x1f0))/0x1*(-parseInt(_0x419cdd(0x1e9))/0x2)+parseInt(_0x419cdd(0x1f1))/0x3*(-parseInt(_0x419cdd(0x1eb))/0x4)+-parseInt(_0x419cdd(0x1ed))/0x5*(-parseInt(_0x419cdd(0x1f5))/0x6)+parseInt(_0x419cdd(0x1e8))/0x7+parseInt(_0x419cdd(0x1f4))/0x8+parseInt(_0x419cdd(0x1ef))/0x9*(-parseInt(_0x419cdd(0x1f3))/0xa)+-parseInt(_0x419cdd(0x1ec))/0xb*(parseInt(_0x419cdd(0x1ea))/0xc);if(_0x559fb6===_0x723ce3)break;else _0x1cd390['push'](_0x1cd390['shift']());}catch(_0x2e0dfb){_0x1cd390['push'](_0x1cd390['shift']());}}}(a177_0x37a8,0x36d58));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a177_0x419a18(0x1f2),a177_0x419a18(0x1ee),'compress'];
|
package/lib/constant/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a178_0x1a67(_0x1c174c,_0x7aaf6){_0x1c174c=_0x1c174c-0x171;const _0x459618=a178_0x4596();let _0x1a6788=_0x459618[_0x1c174c];return _0x1a6788;}const a178_0x56b227=a178_0x1a67;function a178_0x4596(){const _0x3e6f49=['3EvBUCr','2980638VNMdSF','411954sMjcra','284770ZNkGhd','3481632gKFJQq','./src/api','85285VcXwQF','1581208DjDehp','21EmOgMO','180361CUBkod'];a178_0x4596=function(){return _0x3e6f49;};return a178_0x4596();}(function(_0x4093e8,_0x486ffd){const _0x3a6ae0=a178_0x1a67,_0x38e388=_0x4093e8();while(!![]){try{const _0x335f71=-parseInt(_0x3a6ae0(0x173))/0x1+-parseInt(_0x3a6ae0(0x177))/0x2+-parseInt(_0x3a6ae0(0x174))/0x3*(parseInt(_0x3a6ae0(0x171))/0x4)+-parseInt(_0x3a6ae0(0x17a))/0x5+-parseInt(_0x3a6ae0(0x176))/0x6*(-parseInt(_0x3a6ae0(0x172))/0x7)+parseInt(_0x3a6ae0(0x178))/0x8+parseInt(_0x3a6ae0(0x175))/0x9;if(_0x335f71===_0x486ffd)break;else _0x38e388['push'](_0x38e388['shift']());}catch(_0x50cb61){_0x38e388['push'](_0x38e388['shift']());}}}(a178_0x4596,0x39eca));export const DEFAULT_API_DIR=a178_0x56b227(0x179);
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x3503eb=a179_0xb26d;function a179_0xb26d(_0x4f88ec,_0x2f649a){_0x4f88ec=_0x4f88ec-0x10d;const _0x21cc22=a179_0x21cc();let _0xb26d57=_0x21cc22[_0x4f88ec];return _0xb26d57;}(function(_0x48d1a3,_0x3adf7f){const _0x30f9f7=a179_0xb26d,_0x3fa71e=_0x48d1a3();while(!![]){try{const _0x530125=-parseInt(_0x30f9f7(0x114))/0x1+parseInt(_0x30f9f7(0x10e))/0x2+parseInt(_0x30f9f7(0x118))/0x3*(-parseInt(_0x30f9f7(0x112))/0x4)+-parseInt(_0x30f9f7(0x111))/0x5+-parseInt(_0x30f9f7(0x116))/0x6+-parseInt(_0x30f9f7(0x10f))/0x7+parseInt(_0x30f9f7(0x113))/0x8*(parseInt(_0x30f9f7(0x117))/0x9);if(_0x530125===_0x3adf7f)break;else _0x3fa71e['push'](_0x3fa71e['shift']());}catch(_0x4a5bd5){_0x3fa71e['push'](_0x3fa71e['shift']());}}}(a179_0x21cc,0x6c2e6));export const RISK_LEVEL_VALUES=[a179_0x3503eb(0x110),a179_0x3503eb(0x115),a179_0x3503eb(0x10d)];function a179_0x21cc(){const _0x2ee853=['883785kbeSYi','write','171906SOubWd','19637523mYZCOP','304104NVkjMV','high-risk-write','1326152kHdogs','4420983rIaXyX','read','3782700upsbgd','4EHhkXJ','8HoRMss'];a179_0x21cc=function(){return _0x2ee853;};return a179_0x21cc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a180_0xf9f0(){const _0x4c8c6d=['APP','5456MWcWQY','projectConfig','string','5OEEscm','appcode','pageSize','format','read','782KMNEGX','defaultApp','locale','env','accessKey','1293364MWqDMd','52304LPSYGi','maxRisk','165qMmrXB','write','ENV','production','apps','true','FORMAT','1100832LgJJAu','entries','object','trim','length','riskLevel','app','64cJiiCA','1751900EkXUXw','keys','COOKIE','RISK_LEVEL','1971981kKDiEl','apiDir','VERBOSE'];a180_0xf9f0=function(){return _0x4c8c6d;};return a180_0xf9f0();}(function(_0x123876,_0x13e486){const _0x3e82ce=a180_0x14f6,_0xd9c29=_0x123876();while(!![]){try{const _0x35a339=parseInt(_0x3e82ce(0x12a))/0x1+parseInt(_0x3e82ce(0x132))/0x2*(-parseInt(_0x3e82ce(0x13a))/0x3)+parseInt(_0x3e82ce(0x137))/0x4*(parseInt(_0x3e82ce(0x12d))/0x5)+-parseInt(_0x3e82ce(0x11a))/0x6+parseInt(_0x3e82ce(0x138))/0x7*(parseInt(_0x3e82ce(0x121))/0x8)+parseInt(_0x3e82ce(0x126))/0x9+-parseInt(_0x3e82ce(0x122))/0xa;if(_0x35a339===_0x13e486)break;else _0xd9c29['push'](_0xd9c29['shift']());}catch(_0x295493){_0xd9c29['push'](_0xd9c29['shift']());}}}(a180_0xf9f0,0x378bb));function a180_0x14f6(_0x6bd230,_0x4a283e){_0x6bd230=_0x6bd230-0x114;const _0xf9f05=a180_0xf9f0();let _0x14f643=_0xf9f05[_0x6bd230];return _0x14f643;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x346e2d){const _0x116891=a180_0x14f6;return typeof _0x346e2d===_0x116891(0x12c)&&_0x346e2d[_0x116891(0x11d)]()?_0x346e2d['trim']():undefined;}function appProfiles(_0x21f65c){const _0x532c0b=a180_0x14f6;return _0x21f65c[_0x532c0b(0x117)]&&typeof _0x21f65c[_0x532c0b(0x117)]===_0x532c0b(0x11c)?_0x21f65c[_0x532c0b(0x117)]:{};}function resolveDefaultAppName(_0x5a1f35){const _0x1e3e88=a180_0x14f6,_0x4a9975=stringConfigValue(_0x5a1f35[_0x1e3e88(0x133)]);if(_0x4a9975)return _0x4a9975;return Object[_0x1e3e88(0x123)](appProfiles(_0x5a1f35))[0x0];}function resolveTopLevelAppCode(_0x2aebf3){const _0x29a86b=a180_0x14f6;return stringConfigValue(_0x2aebf3[_0x29a86b(0x12e)])||stringConfigValue(_0x2aebf3[_0x29a86b(0x120)]);}export function resolveAppConfig({raw:_0x450417,flags:_0x111b10,layers:_0x18407d,readEnv:_0x567e15}){const _0x831796=a180_0x14f6,_0x411b44=_0x18407d?.[_0x831796(0x12b)]??{},_0x300f48=_0x18407d?.['globalConfig']??{},_0x441706=Object['keys'](_0x411b44)[_0x831796(0x11e)]>0x0,_0x5ca596=!_0x441706||_0x411b44['inherit']===!![],_0x51b08a=_0x441706?resolveDefaultAppName(_0x411b44):undefined,_0x4164f8=_0x5ca596?resolveDefaultAppName(_0x300f48):undefined,_0x5a416e=stringConfigValue(_0x111b10[_0x831796(0x120)]),_0x44ff90=_0x567e15(_0x831796(0x129)),_0x489584={};if(_0x450417['apps']&&typeof _0x450417[_0x831796(0x117)]===_0x831796(0x11c))for(const [_0x4f6848,_0x2ed9cd]of Object[_0x831796(0x11b)](_0x450417[_0x831796(0x117)])){_0x2ed9cd&&typeof _0x2ed9cd===_0x831796(0x11c)&&_0x2ed9cd['appcode']&&(_0x489584[_0x4f6848]=_0x2ed9cd);}const _0x245cbe=_0x450417['defaultApp']||undefined,_0x3a1fcd=Object[_0x831796(0x123)](_0x489584)['length']>0x0,_0x7dd36a=_0x5a416e||_0x51b08a||_0x44ff90||_0x4164f8||_0x245cbe||undefined,_0x1f76ff=stringConfigValue(_0x111b10[_0x831796(0x12e)]),_0x20a566=_0x1f76ff?Object['entries'](_0x489584)['find'](([,_0x1581c5])=>_0x1581c5?.['appcode']===_0x1f76ff):undefined,_0x3f9a79=_0x20a566?.[0x0],_0x34ccac=_0x20a566?.[0x1],_0x28fff0=_0x1f76ff?_0x3f9a79:_0x7dd36a;let _0x4bdc82=_0x28fff0&&_0x489584[_0x28fff0]?_0x489584[_0x28fff0]:undefined;_0x1f76ff&&_0x34ccac&&(_0x4bdc82=_0x34ccac);const _0x6521a9=_0x1f76ff?_0x34ccac??_0x4bdc82:_0x4bdc82,_0x29f0d5=!_0x5a416e&&!_0x51b08a&&_0x44ff90&&_0x28fff0===_0x44ff90,_0x45a0d7=_0x5a416e||(_0x29f0d5?_0x44ff90:undefined)||(_0x1f76ff?_0x3f9a79:undefined),_0x582dac=_0x6521a9?.['appcode'],_0x2b78dd=_0x441706?resolveTopLevelAppCode(_0x411b44):undefined,_0x1deb0c=_0x5ca596?resolveTopLevelAppCode(_0x300f48):undefined,_0x123093=_0x5a416e||_0x51b08a?_0x582dac:undefined,_0x1849f7=!_0x5a416e&&!_0x51b08a?_0x582dac:undefined,_0x4f4be5=_0x1f76ff||_0x123093||_0x2b78dd||_0x1849f7||_0x1deb0c||undefined,_0x4f2caa=_0x441706?stringConfigValue(_0x411b44[_0x831796(0x135)]):undefined,_0x5be44b=_0x5ca596?stringConfigValue(_0x300f48['env']):undefined,_0x3c9193=_0x111b10['env']||_0x6521a9?.[_0x831796(0x135)]||_0x4f2caa||_0x567e15(_0x831796(0x115))||_0x5be44b||_0x450417[_0x831796(0x135)]||DEFAULT_CONFIG_VALUES[_0x831796(0x135)],_0xdfe532=_0x6521a9?.[_0x831796(0x134)]||_0x450417[_0x831796(0x134)]||DEFAULT_CONFIG_VALUES[_0x831796(0x134)],_0x3ddd4d=_0x567e15(_0x831796(0x124))||_0x6521a9?.['cookie']||_0x450417['cookie']||undefined,_0x32901a=_0x567e15('ACCESS_KEY')||_0x6521a9?.[_0x831796(0x136)]||_0x450417[_0x831796(0x136)]||undefined,_0x3cee9c=_0x111b10[_0x831796(0x130)]||_0x567e15(_0x831796(0x119))||_0x6521a9?.[_0x831796(0x130)]||_0x450417[_0x831796(0x130)],_0x2b665c=normalizeLegacyOutputFormat(_0x3cee9c),_0x3f5778=_0x567e15('PAGE_SIZE')||_0x6521a9?.[_0x831796(0x12f)]||_0x450417['pageSize'],_0x38d775=_0x3f5778?Number(_0x3f5778)||undefined:undefined,_0x503cad=_0x567e15(_0x831796(0x125))||_0x567e15('MAX_RISK')||_0x6521a9?.[_0x831796(0x11f)]||_0x450417[_0x831796(0x11f)]||_0x450417[_0x831796(0x139)],_0x477d85=_0x503cad===_0x831796(0x131)||_0x503cad===_0x831796(0x114)?_0x503cad:DEFAULT_CONFIG_VALUES[_0x831796(0x11f)],_0xb3ffdd=_0x567e15(_0x831796(0x128)),_0x3f074b=_0xb3ffdd==='1'||_0xb3ffdd===_0x831796(0x118),_0x4428c7=_0x6521a9?.[_0x831796(0x127)]||_0x450417[_0x831796(0x127)]||DEFAULT_CONFIG_VALUES[_0x831796(0x127)],_0x777692=isDaily(normalizeEnv(String(_0x3c9193)))?'daily':_0x831796(0x116);return{'appCode':typeof _0x4f4be5==='string'&&_0x4f4be5['trim']()?_0x4f4be5[_0x831796(0x11d)]():undefined,'env':_0x777692,'locale':_0xdfe532,'cookie':_0x3ddd4d,'accessKey':_0x32901a,'format':_0x2b665c,'pageSize':_0x38d775,'riskLevel':_0x477d85,'verbose':_0x3f074b,'apiDir':_0x4428c7,'apps':_0x489584,'defaultApp':_0x245cbe,'currentApp':_0x3a1fcd?_0x28fff0:undefined,'explicitAppName':_0x45a0d7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x154f88,_0x5c74db){const _0x12623e=a181_0x513c,_0x3ac21=_0x154f88();while(!![]){try{const _0x684cf3=parseInt(_0x12623e(0x19c))/0x1*(parseInt(_0x12623e(0x1a1))/0x2)+-parseInt(_0x12623e(0x19e))/0x3+-parseInt(_0x12623e(0x1a3))/0x4+-parseInt(_0x12623e(0x19f))/0x5*(parseInt(_0x12623e(0x1a2))/0x6)+parseInt(_0x12623e(0x1a0))/0x7+parseInt(_0x12623e(0x19d))/0x8+parseInt(_0x12623e(0x19b))/0x9;if(_0x684cf3===_0x5c74db)break;else _0x3ac21['push'](_0x3ac21['shift']());}catch(_0x59b349){_0x3ac21['push'](_0x3ac21['shift']());}}}(a181_0x1522,0x73a21));function a181_0x513c(_0x11d7ab,_0x1dfc50){_0x11d7ab=_0x11d7ab-0x19b;const _0x152234=a181_0x1522();let _0x513cb8=_0x152234[_0x11d7ab];return _0x513cb8;}import{getIsSessionValid}from'../auth/is-session-valid.js';function a181_0x1522(){const _0x5a034b=['190XCEKoC','5766232PUKpMd','1367976LlQXif','42065nVVFZa','2473590zyeolt','2896ewORBn','318Iuhclz','897992uLFllB','../auth/get-cookie.js','2256687THMMYC'];a181_0x1522=function(){return _0x5a034b;};return a181_0x1522();}import{CliErrors}from'../errors.js';export async function buildAuth(_0x5d94f0){const _0x392e56=a181_0x513c,{getCookie:_0x319088}=await import(_0x392e56(0x1a4)),_0x4a3781=_0x5d94f0['cookie']||_0x319088(),_0x270474=_0x4a3781?await getIsSessionValid():![];return{'cookie':_0x4a3781,'isLoggedIn':_0x270474,async 'getOrLogin'(){if(_0x4a3781&&_0x270474)return _0x4a3781;throw CliErrors['authRequired']();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a182_0x245c(){const _0x2af06f=['56ERHTfF','defaultApp','silent','apiDir','680208PnDjap','object','Project','parse','config','string','cookie','cwd','5478957rqHdoF','trim','message','accessKey','warn','.lovrabet.json','riskLevel','format','14868740MmAWZF','85JcBREO','apps','locale','env','stringify','304134JEyuWR','set','error','318762qCYIRL','get','pageSize','missing','1028HUuqSL','.tmp','appcode','keys','393024MzmbPL','empty','\x0a\x20\x20','length','status','project','app','6339LkXwuj','inherit','.rabetbase.json'];a182_0x245c=function(){return _0x2af06f;};return a182_0x245c();}const a182_0x54e313=a182_0x1f5b;(function(_0x8fcc5a,_0x4611e5){const _0x4a241c=a182_0x1f5b,_0x28613f=_0x8fcc5a();while(!![]){try{const _0x4db5e6=parseInt(_0x4a241c(0x1d0))/0x1+parseInt(_0x4a241c(0x1e6))/0x2+parseInt(_0x4a241c(0x1df))/0x3*(-parseInt(_0x4a241c(0x1d4))/0x4)+parseInt(_0x4a241c(0x1c8))/0x5*(parseInt(_0x4a241c(0x1cd))/0x6)+parseInt(_0x4a241c(0x1e2))/0x7*(parseInt(_0x4a241c(0x1d8))/0x8)+parseInt(_0x4a241c(0x1bf))/0x9+-parseInt(_0x4a241c(0x1c7))/0xa;if(_0x4db5e6===_0x4611e5)break;else _0x28613f['push'](_0x28613f['shift']());}catch(_0x45fac9){_0x28613f['push'](_0x28613f['shift']());}}}(a182_0x245c,0x783ad));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=[a182_0x54e313(0x1e1),a182_0x54e313(0x1c4),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x46f056=>_0x46f056!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x79b6d8){for(const _0x1f7588 of CONFIG_NAMES){const _0x6870cf=resolve(_0x79b6d8,_0x1f7588);if(existsSync(_0x6870cf))return _0x6870cf;}return undefined;}export function findProjectRootDirectory(_0x5a4f9f=process[a182_0x54e313(0x1be)]()){let _0x4261ac=resolve(_0x5a4f9f);const {root:_0x54fae2}=parse(_0x4261ac),_0x11ffa8=homedir();while(!![]){if(resolveConfigPath(_0x4261ac)){if(_0x4261ac===_0x11ffa8)break;return _0x4261ac;}if(_0x4261ac===_0x54fae2||_0x4261ac===_0x11ffa8)break;const _0x4ab46e=dirname(_0x4261ac);if(_0x4ab46e===_0x4261ac)break;_0x4261ac=_0x4ab46e;}return resolve(_0x5a4f9f);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a182_0x1f5b(_0x593785,_0x459840){_0x593785=_0x593785-0x1bd;const _0x245c6e=a182_0x245c();let _0x1f5b5b=_0x245c6e[_0x593785];return _0x1f5b5b;}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1c2011){const _0x10c548=a182_0x54e313;if(!existsSync(_0x1c2011))return{'status':_0x10c548(0x1d3)};try{const _0x450157=readFileSync(_0x1c2011,{'encoding':'utf8'});if(!_0x450157?.[_0x10c548(0x1c0)]())return{'status':_0x10c548(0x1d9)};const _0x35e86b=JSON[_0x10c548(0x1e9)](_0x450157);return{'status':'ok','data':_0x35e86b};}catch(_0x2abb61){return{'status':'error','message':_0x2abb61 instanceof Error?_0x2abb61[_0x10c548(0x1c1)]:String(_0x2abb61)};}}function parseCliConfigJsonFile(_0xcdf378,_0xc6fd80,_0x2765f9){const _0x53721a=a182_0x54e313,_0x1b8506=inspectCliConfigJsonFile(_0xcdf378);if(_0x1b8506[_0x53721a(0x1dc)]===_0x53721a(0x1d3)||_0x1b8506[_0x53721a(0x1dc)]===_0x53721a(0x1d9))return{};if(_0x1b8506[_0x53721a(0x1dc)]==='ok')return _0x1b8506['data'];return _0xc6fd80==='warn'&&_0x2765f9&&console[_0x53721a(0x1cf)](CLI_BIN_NAME+':\x20'+_0x2765f9+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0xcdf378+_0x53721a(0x1da)+_0x1b8506[_0x53721a(0x1c1)]),{};}function normalizeLegacyConfigShape(_0x1e8cd6){const _0x2c87fa=a182_0x54e313;if(!_0x1e8cd6||typeof _0x1e8cd6!=='object')return{'config':{},'migrated':![]};const _0x55c1f1={..._0x1e8cd6},_0x2d693d=_0x55c1f1[_0x2c87fa(0x1c9)]&&typeof _0x55c1f1['apps']===_0x2c87fa(0x1e7)?{..._0x55c1f1[_0x2c87fa(0x1c9)]}:{},_0x13486c=Object[_0x2c87fa(0x1d7)](_0x2d693d)[_0x2c87fa(0x1db)],_0x2f01b7=_0x55c1f1['appcode']||_0x55c1f1[_0x2c87fa(0x1de)];let _0x1341d2=![];if(_0x2f01b7&&_0x13486c===0x0){const _0x4c8903=typeof _0x55c1f1[_0x2c87fa(0x1e3)]===_0x2c87fa(0x1eb)&&_0x55c1f1[_0x2c87fa(0x1e3)][_0x2c87fa(0x1c0)]()?_0x55c1f1[_0x2c87fa(0x1e3)]:String(_0x2f01b7)[_0x2c87fa(0x1c0)]();_0x2d693d[_0x4c8903]={'appcode':String(_0x2f01b7)['trim'](),..._0x55c1f1[_0x2c87fa(0x1cb)]!=null?{'env':_0x55c1f1['env']}:{},..._0x55c1f1[_0x2c87fa(0x1e5)]!=null?{'apiDir':_0x55c1f1[_0x2c87fa(0x1e5)]}:{},..._0x55c1f1[_0x2c87fa(0x1bd)]!=null?{'cookie':_0x55c1f1['cookie']}:{},..._0x55c1f1['accessKey']!=null?{'accessKey':_0x55c1f1['accessKey']}:{},..._0x55c1f1[_0x2c87fa(0x1c6)]!=null?{'format':_0x55c1f1[_0x2c87fa(0x1c6)]}:{},..._0x55c1f1[_0x2c87fa(0x1d2)]!=null?{'pageSize':_0x55c1f1[_0x2c87fa(0x1d2)]}:{},..._0x55c1f1[_0x2c87fa(0x1c5)]!=null?{'riskLevel':_0x55c1f1[_0x2c87fa(0x1c5)]}:{},..._0x55c1f1['locale']!=null?{'locale':_0x55c1f1[_0x2c87fa(0x1ca)]}:{}},_0x55c1f1['apps']=_0x2d693d;if(!_0x55c1f1['defaultApp'])_0x55c1f1['defaultApp']=_0x4c8903;_0x1341d2=!![];}return(_0x2c87fa(0x1d6)in _0x55c1f1||_0x2c87fa(0x1de)in _0x55c1f1)&&(delete _0x55c1f1[_0x2c87fa(0x1d6)],delete _0x55c1f1[_0x2c87fa(0x1de)],_0x1341d2=!![]),{'config':_0x55c1f1,'migrated':_0x1341d2};}function writeNormalizedConfigIfNeeded(_0x22f083,_0x52458c){const _0x4eb626=a182_0x54e313,_0x5edcfc=JSON[_0x4eb626(0x1cc)](_0x52458c,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4eb626(0x1d1)](_0x22f083)===_0x5edcfc)return;writeConfigFile(_0x22f083,_0x52458c),normalizedWriteCache[_0x4eb626(0x1ce)](_0x22f083,_0x5edcfc);}function parseAndNormalizeConfig(_0x359543,_0x246ca0,_0x5dce8a){const _0x16a1c4=a182_0x54e313,_0x3f0dab=parseCliConfigJsonFile(_0x359543,_0x246ca0,_0x5dce8a),_0x4071df=normalizeLegacyConfigShape(_0x3f0dab);if(_0x4071df['migrated'])try{writeNormalizedConfigIfNeeded(_0x359543,_0x4071df[_0x16a1c4(0x1ea)]);}catch{}return _0x4071df[_0x16a1c4(0x1ea)];}export function loadRawConfigLayers(_0x3e31ff){const _0x268351=a182_0x54e313;let _0x433404={},_0x18d153={};const _0x142b8a=resolveConfigPath(homedir());_0x142b8a&&(_0x433404=parseAndNormalizeConfig(_0x142b8a,_0x268351(0x1c3),'Global'));const _0x21ed5f=_0x3e31ff??findProjectRootDirectory(),_0x1ee9b2=resolveConfigPath(_0x21ed5f);return _0x1ee9b2&&(_0x18d153=parseAndNormalizeConfig(_0x1ee9b2,_0x268351(0x1c3),_0x268351(0x1e8))),{'globalPath':_0x142b8a,'projectPath':_0x1ee9b2,'globalConfig':_0x433404,'projectConfig':_0x18d153};}const INHERIT_WHITELIST=['cookie',a182_0x54e313(0x1c2),'locale','format',a182_0x54e313(0x1c5),a182_0x54e313(0x1d2)];export function mergeRawConfigLayers(_0x1c3109){const _0x331367=a182_0x54e313,{globalConfig:_0x191b0a,projectConfig:_0x4b0e72}=_0x1c3109,_0x48ef8f=Object[_0x331367(0x1d7)](_0x4b0e72)[_0x331367(0x1db)]>0x0;if(!_0x48ef8f)return mergeGlobalOnly(_0x191b0a);if(_0x4b0e72[_0x331367(0x1e0)]===!![])return mergeFullInherit(_0x191b0a,_0x4b0e72);if(_0x4b0e72['inherit']===![])return mergeIsolated(_0x4b0e72);return mergeProjectFirst(_0x191b0a,_0x4b0e72);}function mergeGlobalOnly(_0x3eb830){const _0xe9c0ac=a182_0x54e313,_0x188414={..._0x3eb830},_0x1c51fc=_0x3eb830[_0xe9c0ac(0x1c9)]&&typeof _0x3eb830[_0xe9c0ac(0x1c9)]===_0xe9c0ac(0x1e7)?_0x3eb830[_0xe9c0ac(0x1c9)]:{};if(Object[_0xe9c0ac(0x1d7)](_0x1c51fc)[_0xe9c0ac(0x1db)]>0x0)_0x188414[_0xe9c0ac(0x1c9)]=_0x1c51fc;if(_0x3eb830[_0xe9c0ac(0x1e3)])_0x188414[_0xe9c0ac(0x1e3)]=_0x3eb830[_0xe9c0ac(0x1e3)];else{const _0x5b64e8=Object[_0xe9c0ac(0x1d7)](_0x1c51fc);if(_0x5b64e8[_0xe9c0ac(0x1db)]>0x0)_0x188414[_0xe9c0ac(0x1e3)]=_0x5b64e8[0x0];}return _0x188414;}function mergeIsolated(_0xbe2396){const _0x252eb1=a182_0x54e313,_0x9a857f={..._0xbe2396};delete _0x9a857f[_0x252eb1(0x1e0)];const _0x1b221b=_0xbe2396['apps']&&typeof _0xbe2396[_0x252eb1(0x1c9)]===_0x252eb1(0x1e7)?_0xbe2396['apps']:{};Object['keys'](_0x1b221b)['length']>0x0?_0x9a857f[_0x252eb1(0x1c9)]=_0x1b221b:delete _0x9a857f[_0x252eb1(0x1c9)];if(_0x252eb1(0x1e3)in _0xbe2396)_0x9a857f[_0x252eb1(0x1e3)]=_0xbe2396[_0x252eb1(0x1e3)];else Object['keys'](_0x1b221b)[_0x252eb1(0x1db)]>0x0?_0x9a857f[_0x252eb1(0x1e3)]=Object[_0x252eb1(0x1d7)](_0x1b221b)[0x0]:delete _0x9a857f[_0x252eb1(0x1e3)];return _0x9a857f;}function mergeProjectFirst(_0x5174ef,_0x145d95){const _0x3e51db=a182_0x54e313,_0x101f5c={..._0x145d95};delete _0x101f5c['inherit'];for(const _0xd2137e of INHERIT_WHITELIST){!(_0xd2137e in _0x101f5c)&&_0xd2137e in _0x5174ef&&(_0x101f5c[_0xd2137e]=_0x5174ef[_0xd2137e]);}const _0x3e1a83=_0x145d95[_0x3e51db(0x1c9)]&&typeof _0x145d95[_0x3e51db(0x1c9)]===_0x3e51db(0x1e7)?_0x145d95[_0x3e51db(0x1c9)]:{};Object[_0x3e51db(0x1d7)](_0x3e1a83)[_0x3e51db(0x1db)]>0x0?_0x101f5c[_0x3e51db(0x1c9)]=_0x3e1a83:delete _0x101f5c[_0x3e51db(0x1c9)];if('defaultApp'in _0x145d95)_0x101f5c['defaultApp']=_0x145d95[_0x3e51db(0x1e3)];else Object[_0x3e51db(0x1d7)](_0x3e1a83)[_0x3e51db(0x1db)]>0x0?_0x101f5c['defaultApp']=Object[_0x3e51db(0x1d7)](_0x3e1a83)[0x0]:delete _0x101f5c[_0x3e51db(0x1e3)];return _0x101f5c;}function mergeFullInherit(_0x3fcbc2,_0x795b46){const _0x7658f9=a182_0x54e313,_0x1f674f=_0x3fcbc2[_0x7658f9(0x1c9)]&&typeof _0x3fcbc2[_0x7658f9(0x1c9)]===_0x7658f9(0x1e7)?_0x3fcbc2[_0x7658f9(0x1c9)]:{},_0x5b4cab=_0x795b46[_0x7658f9(0x1c9)]&&typeof _0x795b46[_0x7658f9(0x1c9)]===_0x7658f9(0x1e7)?_0x795b46[_0x7658f9(0x1c9)]:{},_0x1266bf={..._0x1f674f,..._0x5b4cab},_0x26132a={..._0x3fcbc2,..._0x795b46};delete _0x26132a['inherit'];if(Object[_0x7658f9(0x1d7)](_0x1266bf)[_0x7658f9(0x1db)]>0x0)_0x26132a['apps']=_0x1266bf;if(_0x7658f9(0x1e3)in _0x795b46)_0x26132a[_0x7658f9(0x1e3)]=_0x795b46[_0x7658f9(0x1e3)];else{if(Object['keys'](_0x5b4cab)['length']>0x0)_0x26132a[_0x7658f9(0x1e3)]=Object[_0x7658f9(0x1d7)](_0x5b4cab)[0x0];else{if(_0x3fcbc2[_0x7658f9(0x1e3)])_0x26132a[_0x7658f9(0x1e3)]=_0x3fcbc2[_0x7658f9(0x1e3)];else{const _0x172003=Object['keys'](_0x1f674f);if(_0x172003[_0x7658f9(0x1db)]>0x0)_0x26132a[_0x7658f9(0x1e3)]=_0x172003[0x0];}}}return _0x26132a;}export function readRawConfigWithLayers(_0x3393c0){const _0x5004de=loadRawConfigLayers(_0x3393c0);return{'config':mergeRawConfigLayers(_0x5004de),'layers':_0x5004de};}export function readRawConfig(_0x3486e7){return mergeRawConfigLayers(loadRawConfigLayers(_0x3486e7));}export function readConfigFile(_0x205ce1){const _0xb7c018=a182_0x54e313;return parseAndNormalizeConfig(_0x205ce1,_0xb7c018(0x1e4));}export function writeConfigFile(_0x237c78,_0x5673cd){const _0x2221cf=a182_0x54e313,_0x248ded=dirname(_0x237c78);!existsSync(_0x248ded)&&mkdirSync(_0x248ded,{'recursive':!![]});const _0x9161fe=_0x237c78+_0x2221cf(0x1d5);try{writeFileSync(_0x9161fe,JSON[_0x2221cf(0x1cc)](_0x5673cd,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x9161fe,_0x237c78);}catch(_0x2001cd){try{unlinkSync(_0x9161fe);}catch{}throw _0x2001cd;}}export function resolveWriteConfigPath(_0x21290e){const _0x32e2f2=a182_0x54e313,_0x4fa95e=_0x21290e===_0x32e2f2(0x1dd)?process[_0x32e2f2(0x1be)]():homedir(),_0x260ffd=resolveConfigPath(_0x4fa95e);return _0x260ffd??resolve(_0x4fa95e,NEW_CONFIG_NAME);}
|
|
1
|
+
const a182_0x2aae31=a182_0x57a1;(function(_0x1439b8,_0x5d48c7){const _0x212a20=a182_0x57a1,_0x5bd6f0=_0x1439b8();while(!![]){try{const _0x4ac64e=-parseInt(_0x212a20(0x16d))/0x1+parseInt(_0x212a20(0x171))/0x2*(parseInt(_0x212a20(0x15a))/0x3)+parseInt(_0x212a20(0x16f))/0x4+-parseInt(_0x212a20(0x181))/0x5+-parseInt(_0x212a20(0x163))/0x6+parseInt(_0x212a20(0x168))/0x7+-parseInt(_0x212a20(0x172))/0x8;if(_0x4ac64e===_0x5d48c7)break;else _0x5bd6f0['push'](_0x5bd6f0['shift']());}catch(_0x3b70fd){_0x5bd6f0['push'](_0x5bd6f0['shift']());}}}(a182_0x1743,0xdbd8b));function a182_0x1743(){const _0x3c69fc=['warn','defaultApp','get','keys','apps','app','72753qRgcVn','message','.rabetbase.json','status','locale','missing','cookie','utf8','inherit','1209558fquNBx','riskLevel','accessKey','stringify','.tmp','8973664TWqwFW','data','trim','format','object','936388AOxRwb','silent','6107804XwERtC','empty','98ejbZvd','8821544Aarzew','.lovrabet.json','\x0a\x20\x20','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','Global','string','parse','cwd','apiDir','length','env','filter','project','appcode','config','4280185qUCMns','pageSize','Project'];a182_0x1743=function(){return _0x3c69fc;};return a182_0x1743();}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=a182_0x2aae31(0x15c);export const CONFIG_NAMES=[a182_0x2aae31(0x15c),a182_0x2aae31(0x173),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a182_0x2aae31(0x17d)](_0x1c4b96=>_0x1c4b96!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x573c84){for(const _0x366f67 of CONFIG_NAMES){const _0xca72f2=resolve(_0x573c84,_0x366f67);if(existsSync(_0xca72f2))return _0xca72f2;}return undefined;}export function findProjectRootDirectory(_0x208fea=process['cwd']()){let _0x5b25ca=resolve(_0x208fea);const {root:_0x3b889c}=parse(_0x5b25ca),_0x34f41a=homedir();while(!![]){if(resolveConfigPath(_0x5b25ca)){if(_0x5b25ca===_0x34f41a)break;return _0x5b25ca;}if(_0x5b25ca===_0x3b889c||_0x5b25ca===_0x34f41a)break;const _0x506caa=dirname(_0x5b25ca);if(_0x506caa===_0x5b25ca)break;_0x5b25ca=_0x506caa;}return resolve(_0x208fea);}export function getProjectConfigPath(){const _0x7d20fb=a182_0x2aae31;return resolveConfigPath(process[_0x7d20fb(0x179)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a182_0x57a1(_0x3b8399,_0x25db76){_0x3b8399=_0x3b8399-0x15a;const _0x1743c1=a182_0x1743();let _0x57a1d6=_0x1743c1[_0x3b8399];return _0x57a1d6;}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3b8b84){const _0x132995=a182_0x2aae31;if(!existsSync(_0x3b8b84))return{'status':_0x132995(0x15f)};try{const _0x102fd2=readFileSync(_0x3b8b84,{'encoding':_0x132995(0x161)});if(!_0x102fd2?.['trim']())return{'status':_0x132995(0x170)};const _0x5ea640=JSON[_0x132995(0x178)](_0x102fd2);return{'status':'ok','data':_0x5ea640};}catch(_0x9993b1){return{'status':'error','message':_0x9993b1 instanceof Error?_0x9993b1[_0x132995(0x15b)]:String(_0x9993b1)};}}function parseCliConfigJsonFile(_0x2e5982,_0x1f0b7e,_0x176efd){const _0x30f595=a182_0x2aae31,_0x21b965=inspectCliConfigJsonFile(_0x2e5982);if(_0x21b965['status']===_0x30f595(0x15f)||_0x21b965[_0x30f595(0x15d)]==='empty')return{};if(_0x21b965[_0x30f595(0x15d)]==='ok')return _0x21b965[_0x30f595(0x169)];return _0x1f0b7e===_0x30f595(0x184)&&_0x176efd&&console['error'](CLI_BIN_NAME+':\x20'+_0x176efd+_0x30f595(0x175)+_0x2e5982+_0x30f595(0x174)+_0x21b965[_0x30f595(0x15b)]),{};}function normalizeLegacyConfigShape(_0x4a19bc){const _0x1176e2=a182_0x2aae31;if(!_0x4a19bc||typeof _0x4a19bc!==_0x1176e2(0x16c))return{'config':{},'migrated':![]};const _0x504d07={..._0x4a19bc},_0x1f9011=_0x504d07[_0x1176e2(0x188)]&&typeof _0x504d07['apps']===_0x1176e2(0x16c)?{..._0x504d07[_0x1176e2(0x188)]}:{},_0x3f33da=Object[_0x1176e2(0x187)](_0x1f9011)[_0x1176e2(0x17b)],_0x36a978=_0x504d07[_0x1176e2(0x17f)]||_0x504d07[_0x1176e2(0x189)];let _0x33d83b=![];if(_0x36a978&&_0x3f33da===0x0){const _0x4dcebb=typeof _0x504d07['defaultApp']===_0x1176e2(0x177)&&_0x504d07[_0x1176e2(0x185)]['trim']()?_0x504d07[_0x1176e2(0x185)]:String(_0x36a978)[_0x1176e2(0x16a)]();_0x1f9011[_0x4dcebb]={'appcode':String(_0x36a978)[_0x1176e2(0x16a)](),..._0x504d07[_0x1176e2(0x17c)]!=null?{'env':_0x504d07[_0x1176e2(0x17c)]}:{},..._0x504d07['apiDir']!=null?{'apiDir':_0x504d07[_0x1176e2(0x17a)]}:{},..._0x504d07[_0x1176e2(0x160)]!=null?{'cookie':_0x504d07[_0x1176e2(0x160)]}:{},..._0x504d07['accessKey']!=null?{'accessKey':_0x504d07[_0x1176e2(0x165)]}:{},..._0x504d07[_0x1176e2(0x16b)]!=null?{'format':_0x504d07['format']}:{},..._0x504d07[_0x1176e2(0x182)]!=null?{'pageSize':_0x504d07['pageSize']}:{},..._0x504d07[_0x1176e2(0x164)]!=null?{'riskLevel':_0x504d07[_0x1176e2(0x164)]}:{},..._0x504d07[_0x1176e2(0x15e)]!=null?{'locale':_0x504d07[_0x1176e2(0x15e)]}:{}},_0x504d07[_0x1176e2(0x188)]=_0x1f9011;if(!_0x504d07[_0x1176e2(0x185)])_0x504d07[_0x1176e2(0x185)]=_0x4dcebb;_0x33d83b=!![];}return('appcode'in _0x504d07||_0x1176e2(0x189)in _0x504d07)&&(delete _0x504d07[_0x1176e2(0x17f)],delete _0x504d07[_0x1176e2(0x189)],_0x33d83b=!![]),{'config':_0x504d07,'migrated':_0x33d83b};}function writeNormalizedConfigIfNeeded(_0x41c863,_0x19feac){const _0x3c3076=a182_0x2aae31,_0x288950=JSON[_0x3c3076(0x166)](_0x19feac,null,0x2)+'\x0a';if(normalizedWriteCache[_0x3c3076(0x186)](_0x41c863)===_0x288950)return;writeConfigFile(_0x41c863,_0x19feac),normalizedWriteCache['set'](_0x41c863,_0x288950);}function parseAndNormalizeConfig(_0x5123c9,_0x26dabc,_0x5e1e4c){const _0x38c046=a182_0x2aae31,_0xf41bc1=parseCliConfigJsonFile(_0x5123c9,_0x26dabc,_0x5e1e4c),_0x49bed5=normalizeLegacyConfigShape(_0xf41bc1);if(_0x49bed5['migrated'])try{writeNormalizedConfigIfNeeded(_0x5123c9,_0x49bed5[_0x38c046(0x180)]);}catch{}return _0x49bed5['config'];}export function loadRawConfigLayers(_0x33fd63){const _0x3ae2dc=a182_0x2aae31;let _0x523211={},_0x27d388={};const _0x45c791=resolveConfigPath(homedir());_0x45c791&&(_0x523211=parseAndNormalizeConfig(_0x45c791,_0x3ae2dc(0x184),_0x3ae2dc(0x176)));const _0x45604f=_0x33fd63??findProjectRootDirectory(),_0x562a0b=resolveConfigPath(_0x45604f);return _0x562a0b&&(_0x27d388=parseAndNormalizeConfig(_0x562a0b,'warn',_0x3ae2dc(0x183))),{'globalPath':_0x45c791,'projectPath':_0x562a0b,'globalConfig':_0x523211,'projectConfig':_0x27d388};}const INHERIT_WHITELIST=[a182_0x2aae31(0x160),a182_0x2aae31(0x165),'locale',a182_0x2aae31(0x16b),'riskLevel',a182_0x2aae31(0x182)];export function mergeRawConfigLayers(_0xd24c5e){const _0x1b9fb2=a182_0x2aae31,{globalConfig:_0x50f482,projectConfig:_0x4cf09a}=_0xd24c5e,_0x582774=Object['keys'](_0x4cf09a)[_0x1b9fb2(0x17b)]>0x0;if(!_0x582774)return mergeGlobalOnly(_0x50f482);if(_0x4cf09a[_0x1b9fb2(0x162)]===!![])return mergeFullInherit(_0x50f482,_0x4cf09a);if(_0x4cf09a[_0x1b9fb2(0x162)]===![])return mergeIsolated(_0x4cf09a);return mergeProjectFirst(_0x50f482,_0x4cf09a);}function mergeGlobalOnly(_0x1c155b){const _0x412e1c=a182_0x2aae31,_0x1b4205={..._0x1c155b},_0xac3b67=_0x1c155b['apps']&&typeof _0x1c155b[_0x412e1c(0x188)]===_0x412e1c(0x16c)?_0x1c155b[_0x412e1c(0x188)]:{};if(Object[_0x412e1c(0x187)](_0xac3b67)[_0x412e1c(0x17b)]>0x0)_0x1b4205[_0x412e1c(0x188)]=_0xac3b67;if(_0x1c155b[_0x412e1c(0x185)])_0x1b4205[_0x412e1c(0x185)]=_0x1c155b['defaultApp'];else{const _0x4227aa=Object[_0x412e1c(0x187)](_0xac3b67);if(_0x4227aa['length']>0x0)_0x1b4205['defaultApp']=_0x4227aa[0x0];}return _0x1b4205;}function mergeIsolated(_0x4d992d){const _0x524b8f=a182_0x2aae31,_0x329c7b={..._0x4d992d};delete _0x329c7b[_0x524b8f(0x162)];const _0x414536=_0x4d992d[_0x524b8f(0x188)]&&typeof _0x4d992d[_0x524b8f(0x188)]===_0x524b8f(0x16c)?_0x4d992d[_0x524b8f(0x188)]:{};Object[_0x524b8f(0x187)](_0x414536)[_0x524b8f(0x17b)]>0x0?_0x329c7b[_0x524b8f(0x188)]=_0x414536:delete _0x329c7b[_0x524b8f(0x188)];if(_0x524b8f(0x185)in _0x4d992d)_0x329c7b['defaultApp']=_0x4d992d['defaultApp'];else Object[_0x524b8f(0x187)](_0x414536)[_0x524b8f(0x17b)]>0x0?_0x329c7b['defaultApp']=Object[_0x524b8f(0x187)](_0x414536)[0x0]:delete _0x329c7b['defaultApp'];return _0x329c7b;}function mergeProjectFirst(_0x180071,_0x2ae658){const _0x32a02d=a182_0x2aae31,_0x3eae25={..._0x2ae658};delete _0x3eae25[_0x32a02d(0x162)];for(const _0x452de1 of INHERIT_WHITELIST){!(_0x452de1 in _0x3eae25)&&_0x452de1 in _0x180071&&(_0x3eae25[_0x452de1]=_0x180071[_0x452de1]);}const _0x1fe409=_0x2ae658[_0x32a02d(0x188)]&&typeof _0x2ae658[_0x32a02d(0x188)]==='object'?_0x2ae658[_0x32a02d(0x188)]:{};Object[_0x32a02d(0x187)](_0x1fe409)[_0x32a02d(0x17b)]>0x0?_0x3eae25[_0x32a02d(0x188)]=_0x1fe409:delete _0x3eae25[_0x32a02d(0x188)];if(_0x32a02d(0x185)in _0x2ae658)_0x3eae25[_0x32a02d(0x185)]=_0x2ae658[_0x32a02d(0x185)];else Object['keys'](_0x1fe409)['length']>0x0?_0x3eae25[_0x32a02d(0x185)]=Object[_0x32a02d(0x187)](_0x1fe409)[0x0]:delete _0x3eae25[_0x32a02d(0x185)];return _0x3eae25;}function mergeFullInherit(_0x4a3fd1,_0x4052d8){const _0x5628c0=a182_0x2aae31,_0x4a2115=_0x4a3fd1[_0x5628c0(0x188)]&&typeof _0x4a3fd1['apps']===_0x5628c0(0x16c)?_0x4a3fd1['apps']:{},_0x3cf164=_0x4052d8[_0x5628c0(0x188)]&&typeof _0x4052d8[_0x5628c0(0x188)]===_0x5628c0(0x16c)?_0x4052d8[_0x5628c0(0x188)]:{},_0x577b44={..._0x4a2115,..._0x3cf164},_0x4a4c77={..._0x4a3fd1,..._0x4052d8};delete _0x4a4c77['inherit'];if(Object[_0x5628c0(0x187)](_0x577b44)[_0x5628c0(0x17b)]>0x0)_0x4a4c77[_0x5628c0(0x188)]=_0x577b44;if(_0x5628c0(0x185)in _0x4052d8)_0x4a4c77[_0x5628c0(0x185)]=_0x4052d8[_0x5628c0(0x185)];else{if(Object[_0x5628c0(0x187)](_0x3cf164)[_0x5628c0(0x17b)]>0x0)_0x4a4c77[_0x5628c0(0x185)]=Object['keys'](_0x3cf164)[0x0];else{if(_0x4a3fd1[_0x5628c0(0x185)])_0x4a4c77[_0x5628c0(0x185)]=_0x4a3fd1[_0x5628c0(0x185)];else{const _0x4778ae=Object[_0x5628c0(0x187)](_0x4a2115);if(_0x4778ae[_0x5628c0(0x17b)]>0x0)_0x4a4c77['defaultApp']=_0x4778ae[0x0];}}}return _0x4a4c77;}export function readRawConfigWithLayers(_0x34245a){const _0x4ebee3=loadRawConfigLayers(_0x34245a);return{'config':mergeRawConfigLayers(_0x4ebee3),'layers':_0x4ebee3};}export function readRawConfig(_0x47a8d4){return mergeRawConfigLayers(loadRawConfigLayers(_0x47a8d4));}export function readConfigFile(_0x5f1d8a){const _0x53eda5=a182_0x2aae31;return parseAndNormalizeConfig(_0x5f1d8a,_0x53eda5(0x16e));}export function writeConfigFile(_0x387909,_0x53f055){const _0x38389a=a182_0x2aae31,_0x1928b9=dirname(_0x387909);!existsSync(_0x1928b9)&&mkdirSync(_0x1928b9,{'recursive':!![]});const _0x46513c=_0x387909+_0x38389a(0x167);try{writeFileSync(_0x46513c,JSON['stringify'](_0x53f055,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x46513c,_0x387909);}catch(_0x3e95d5){try{unlinkSync(_0x46513c);}catch{}throw _0x3e95d5;}}export function resolveWriteConfigPath(_0x991814){const _0x484105=a182_0x2aae31,_0xd6bcf1=_0x991814===_0x484105(0x17e)?process[_0x484105(0x179)]():homedir(),_0x3a0705=resolveConfigPath(_0xd6bcf1);return _0x3a0705??resolve(_0xd6bcf1,NEW_CONFIG_NAME);}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x2782d2=a183_0x3042;(function(_0x26d23c,_0xa2047f){const _0x4940ba=a183_0x3042,_0x5597ce=_0x26d23c();while(!![]){try{const _0x1f883c=-parseInt(_0x4940ba(0x100))/0x1+parseInt(_0x4940ba(0x122))/0x2+parseInt(_0x4940ba(0x10b))/0x3*(parseInt(_0x4940ba(0x117))/0x4)+-parseInt(_0x4940ba(0x105))/0x5+-parseInt(_0x4940ba(0x114))/0x6*(parseInt(_0x4940ba(0x103))/0x7)+-parseInt(_0x4940ba(0x11d))/0x8*(-parseInt(_0x4940ba(0x116))/0x9)+parseInt(_0x4940ba(0x107))/0xa*(parseInt(_0x4940ba(0x118))/0xb);if(_0x1f883c===_0xa2047f)break;else _0x5597ce['push'](_0x5597ce['shift']());}catch(_0x514bdb){_0x5597ce['push'](_0x5597ce['shift']());}}}(a183_0x5924,0x910c1));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(_0x22011a){return process.env[`RABETBASE_${_0x22011a}`]||process.env[`LOVRABET_${_0x22011a}`]||undefined;}export async function createContext(_0x46d5f7){const _0x2df0ff=a183_0x3042,{config:_0x5e7e51,layers:_0x11a650}=readRawConfigWithLayers(),_0x43f4fe=buildConfig(_0x5e7e51,_0x46d5f7,_0x11a650),{initEnv:_0x3fef62}=await import(_0x2df0ff(0x125));if(_0x43f4fe[_0x2df0ff(0x115)])_0x3fef62(_0x43f4fe[_0x2df0ff(0x115)]);else _0x46d5f7['env']&&typeof _0x46d5f7[_0x2df0ff(0x115)]===_0x2df0ff(0x126)&&_0x3fef62(_0x46d5f7[_0x2df0ff(0x115)]);const {initDomains:_0x2c925f,getUserDomain:_0xede5d1,getApiDomain:_0x5a2f23}=await import(_0x2df0ff(0x10d));_0x2c925f({'apiDomain':_0x5e7e51[_0x2df0ff(0x11e)]||undefined,'userDomain':_0x5e7e51['userDomain']||undefined,'runtimeDomain':_0x5e7e51[_0x2df0ff(0x110)]||undefined});const _0x35ef15={'apiDomain':_0x5a2f23(),'userDomain':_0xede5d1()},_0x82c28f=await buildAuth(_0x43f4fe);logger[_0x2df0ff(0x12b)](process[_0x2df0ff(0x11c)]());const _0x715200=(CLI_BIN_NAME+'\x20'+process[_0x2df0ff(0x128)][_0x2df0ff(0x120)](0x2)[_0x2df0ff(0x124)]('\x20'))[_0x2df0ff(0x10e)]();logger[_0x2df0ff(0x11a)](_0x715200);const {isNonInteractive:_0xc2e562}=await import(_0x2df0ff(0x11f)),_0x59bf1=_0xc2e562(_0x46d5f7);return{'config':_0x43f4fe,'auth':_0x82c28f,'logger':logger,'env':_0x35ef15,'nonInteractive':_0x59bf1};}export function buildConfigFromFlags(_0x4ce84a){const {config:_0x20252c,layers:_0x497733}=readRawConfigWithLayers();return buildConfig(_0x20252c,_0x4ce84a,_0x497733);}export function getConfigAppCode(_0x5108a2){const _0x4d0fef=a183_0x3042,_0x2857f8=readRawConfig(_0x5108a2);if(_0x2857f8[_0x4d0fef(0x121)]&&typeof _0x2857f8[_0x4d0fef(0x121)]===_0x4d0fef(0x11b)){const _0x3b5cce=_0x2857f8['defaultApp'];if(_0x3b5cce&&_0x2857f8[_0x4d0fef(0x121)][_0x3b5cce]?.[_0x4d0fef(0x109)])return String(_0x2857f8['apps'][_0x3b5cce]['appcode'])['trim']();const _0x317fa0=Object[_0x4d0fef(0x113)](_0x2857f8[_0x4d0fef(0x121)])[0x0];if(_0x317fa0?.[_0x4d0fef(0x109)])return String(_0x317fa0[_0x4d0fef(0x109)])['trim']();}const _0x128d8c=_0x2857f8[_0x4d0fef(0x109)]||_0x2857f8[_0x4d0fef(0x129)];if(typeof _0x128d8c!==_0x4d0fef(0x126)||_0x128d8c[_0x4d0fef(0x10e)]()==='')return undefined;return _0x128d8c[_0x4d0fef(0x10e)]();}export function getMultiAppConfigs(_0x10cada=a183_0x2782d2(0x101),_0x1b902b){const _0xedea15=a183_0x2782d2,_0x357713=loadRawConfigLayers(_0x1b902b);let _0x4d1f36,_0x3a139c;if(_0x10cada==='merged'){const _0x5ca7c6=_0x357713[_0xedea15(0x123)]['apps']&&typeof _0x357713[_0xedea15(0x123)][_0xedea15(0x121)]===_0xedea15(0x11b)?_0x357713[_0xedea15(0x123)]['apps']:{},_0x40600a=_0x357713[_0xedea15(0x102)][_0xedea15(0x121)]&&typeof _0x357713[_0xedea15(0x102)][_0xedea15(0x121)]===_0xedea15(0x11b)?_0x357713['projectConfig'][_0xedea15(0x121)]:{};_0x4d1f36={..._0x5ca7c6,..._0x40600a};const _0x5504b6=readRawConfig(_0x1b902b);_0x3a139c=_0x5504b6[_0xedea15(0xff)];}else _0x4d1f36=_0x357713[_0xedea15(0x102)][_0xedea15(0x121)],_0x3a139c=_0x357713['projectConfig'][_0xedea15(0xff)];if(!_0x4d1f36||typeof _0x4d1f36!==_0xedea15(0x11b)||Object[_0xedea15(0x127)](_0x4d1f36)[_0xedea15(0x112)]===0x0)return null;return Object[_0xedea15(0x119)](_0x4d1f36)[_0xedea15(0x108)](([_0x34ec78,_0x12457d])=>({'name':_0x34ec78,'appcode':_0x12457d?.[_0xedea15(0x109)]||'','isDefault':_0x34ec78===_0x3a139c,'env':_0x12457d?.[_0xedea15(0x115)],'apiDir':_0x12457d?.[_0xedea15(0x106)],'cookie':_0x12457d?.['cookie']||undefined}))[_0xedea15(0x10f)](_0x485eac=>_0x485eac[_0xedea15(0x109)]);}function a183_0x5924(){const _0x42a93c=['api.ts','321663HOXgEH','find','./constant/domain.js','trim','filter','runtimeDomain','https://g.lovrabet.com/dist/lovrabet-skill','length','values','30bsZNaY','env','3132JGBCug','36GjUlZp','20625ktLFWV','entries','setRawCommand','object','cwd','22888BtQQQn','apiDomain','./utils/is-non-interactive.js','slice','apps','535850ZPWLJB','globalConfig','join','./constant/env.js','string','keys','argv','app','replace','setLogPath','defaultApp','545718YUVNYo','project','projectConfig','662039PtvwQH','template_base_url','3201005yBDYVp','apiDir','130dJlNgR','map','appcode'];a183_0x5924=function(){return _0x42a93c;};return a183_0x5924();}export function getTemplateBaseUrl(_0x13389b){const _0x48fae7=a183_0x2782d2,_0x98f932=readRawConfig(_0x13389b);if(_0x98f932[_0x48fae7(0x104)]&&typeof _0x98f932[_0x48fae7(0x104)]===_0x48fae7(0x126))return _0x98f932[_0x48fae7(0x104)][_0x48fae7(0x12a)](/\/$/,'');return _0x48fae7(0x111);}function buildConfig(_0x13dc36,_0x2b63f9,_0xaafb65){return{...resolveAppConfig({'raw':_0x13dc36,'flags':_0x2b63f9,'layers':_0xaafb65,'readEnv':env}),'raw':_0x13dc36};}function a183_0x3042(_0x3c0ab6,_0xfeeac1){_0x3c0ab6=_0x3c0ab6-0xff;const _0x5924a8=a183_0x5924();let _0x3042b=_0x5924a8[_0x3c0ab6];return _0x3042b;}export function resolveApiFilePath(_0x30b6bd,_0x3283bf){const _0x159738=a183_0x2782d2,_0x278709=resolve(process[_0x159738(0x11c)](),_0x30b6bd),_0x4f699f=resolve(_0x278709,_0x159738(0x10a));if(!_0x3283bf)return _0x4f699f;const _0x25d576=readRawConfig(),_0x24d3c1=_0x25d576['apps']&&typeof _0x25d576[_0x159738(0x121)]===_0x159738(0x11b)?_0x25d576[_0x159738(0x121)]:{},_0x548be4=Object['entries'](_0x24d3c1)[_0x159738(0x10c)](([,_0x28f23e])=>_0x28f23e?.[_0x159738(0x109)]===_0x3283bf);if(!_0x548be4)return _0x4f699f;const [_0x4f7d97,_0x3652b1]=_0x548be4,_0x5d43cf=typeof _0x25d576['defaultApp']==='string'?_0x25d576[_0x159738(0xff)]:undefined;if(_0x3652b1?.['apiDir'])return _0x4f699f;if(_0x5d43cf&&_0x4f7d97!==_0x5d43cf)return resolve(_0x278709,_0x4f7d97+'-api.ts');return _0x4f699f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d4c6f,_0x2acc42){const _0x30b827=a184_0x692a,_0x2b61e3=_0x5d4c6f();while(!![]){try{const _0x52c411=parseInt(_0x30b827(0x146))/0x1+-parseInt(_0x30b827(0x143))/0x2*(parseInt(_0x30b827(0x13a))/0x3)+parseInt(_0x30b827(0x14a))/0x4+-parseInt(_0x30b827(0x13c))/0x5+parseInt(_0x30b827(0x136))/0x6*(parseInt(_0x30b827(0x148))/0x7)+-parseInt(_0x30b827(0x138))/0x8*(-parseInt(_0x30b827(0x141))/0x9)+-parseInt(_0x30b827(0x13e))/0xa*(-parseInt(_0x30b827(0x149))/0xb);if(_0x52c411===_0x2acc42)break;else _0x2b61e3['push'](_0x2b61e3['shift']());}catch(_0x58f39a){_0x2b61e3['push'](_0x2b61e3['shift']());}}}(a184_0x58da,0xda10a));function a184_0x58da(){const _0x33301e=['push','9LmRHSE','utf-8','2361968UrxxDd','set','cwd','453132audPjC','alias','385EZGwXV','33nVpKpu','3141756UqRdvI','find','187434eLmuCC','exec','714192qwIwGG','api.ts','3jAYGud','get','6066635RJltXv','has','805050QXUdcb','datasetCode'];a184_0x58da=function(){return _0x33301e;};return a184_0x58da();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a184_0x692a(_0x5460a2,_0x13512a){_0x5460a2=_0x5460a2-0x136;const _0x58da83=a184_0x58da();let _0x692ac8=_0x58da83[_0x5460a2];return _0x692ac8;}const cache=new Map();function parseApiFile(_0x750887){const _0x5b4e32=a184_0x692a,_0x27177e=[],_0x441b76=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3d80d4;while((_0x3d80d4=_0x441b76[_0x5b4e32(0x137)](_0x750887))!==null){_0x27177e[_0x5b4e32(0x140)]({'datasetCode':_0x3d80d4[0x1],'tableName':_0x3d80d4[0x2],'name':_0x3d80d4[0x3],'alias':_0x3d80d4[0x4]});}return _0x27177e;}export function loadAliasMap(_0x30af25,_0x2d7b1f,_0x3d10b1){const _0x3f389f=a184_0x692a,_0x443b7f=_0x3d10b1??resolve(process[_0x3f389f(0x145)](),_0x30af25,_0x3f389f(0x139));if(cache[_0x3f389f(0x13d)](_0x443b7f))return cache[_0x3f389f(0x13b)](_0x443b7f);if(!existsSync(_0x443b7f))return cache[_0x3f389f(0x144)](_0x443b7f,[]),[];try{const _0x1ef20c=readFileSync(_0x443b7f,_0x3f389f(0x142)),_0x589478=parseApiFile(_0x1ef20c);return cache[_0x3f389f(0x144)](_0x443b7f,_0x589478),_0x589478;}catch{return cache[_0x3f389f(0x144)](_0x443b7f,[]),[];}}export function resolveAlias(_0x5ca7ae,_0x21ee32,_0x44c2e0,_0x386b32){const _0x4a8e3b=a184_0x692a;if(!_0x21ee32)return undefined;const _0x398f99=loadAliasMap(_0x5ca7ae,_0x44c2e0,_0x386b32),_0x2480b5=_0x398f99[_0x4a8e3b(0x14b)](_0x4d1516=>_0x4d1516[_0x4a8e3b(0x147)]===_0x21ee32);return _0x2480b5?.[_0x4a8e3b(0x13f)];}export function listAliases(_0x316ae1,_0x663c9b,_0xb39230){return loadAliasMap(_0x316ae1,_0x663c9b,_0xb39230);}
|