@lovrabet/rabetbase-cli 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.d.ts +2 -0
- package/lib/commands/db/diff-refresh-start.js +1 -0
- package/lib/commands/db/diff-refresh-status.d.ts +2 -0
- package/lib/commands/db/diff-refresh-status.js +1 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-create.d.ts +2 -0
- package/lib/commands/notification/config-create.js +1 -0
- package/lib/commands/notification/config-delete.d.ts +2 -0
- package/lib/commands/notification/config-delete.js +1 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.d.ts +2 -0
- package/lib/commands/notification/config-update.js +1 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.d.ts +97 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
- package/lib/commands/project/create/materialize-project-template.js +1 -0
- package/lib/commands/project/create/project-name.d.ts +2 -0
- package/lib/commands/project/create/project-name.js +1 -0
- package/lib/commands/project/create/project-template-archive.d.ts +6 -0
- package/lib/commands/project/create/project-template-archive.js +1 -0
- package/lib/commands/project/create/project-template-path.d.ts +1 -3
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +2 -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/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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +2 -0
- 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.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +29 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +13 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.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 +9 -4
- package/skills/rabetbase/SKILL.md +33 -22
- package/skills/rabetbase/guides/backend-function.md +5 -3
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/conflict-detection.md +2 -2
- package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
- package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
- package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
- package/skills/rabetbase/guides/sql-mybatis.md +2 -2
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
- package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
- package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +5 -3
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
- package/skills/rabetbase/references/rabetbase-run.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
- package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
- package/skills/rabetbase.manifest.json +5 -5
- package/templates/README.md +14 -2
- package/lib/commands/project/create/non-interactive.d.ts +0 -9
- package/lib/commands/project/create/non-interactive.js +0 -1
- package/lib/utils/copy-directory.d.ts +0 -1
- package/lib/utils/copy-directory.js +0 -1
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
- package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
- package/templates/projects/sub-app-react-demo/README.md +0 -246
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
- package/templates/projects/sub-app-react-demo/index.html +0 -27
- package/templates/projects/sub-app-react-demo/package.json +0 -34
- package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
- package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
- package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
- package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
- package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
- package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
- package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
- package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
- package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
- package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
- package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
- package/templates/projects/sub-app-react-demo/src/style.css +0 -108
- package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
- package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
- package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x538735,_0x3a60cc){const _0x24ab71=a221_0x3f27,_0x38b0c9=_0x538735();while(!![]){try{const _0x1de17b=-parseInt(_0x24ab71(0x1ea))/0x1*(parseInt(_0x24ab71(0x1d1))/0x2)+parseInt(_0x24ab71(0x1c8))/0x3*(parseInt(_0x24ab71(0x1cc))/0x4)+-parseInt(_0x24ab71(0x1d3))/0x5*(-parseInt(_0x24ab71(0x1e6))/0x6)+parseInt(_0x24ab71(0x1e9))/0x7+-parseInt(_0x24ab71(0x1cb))/0x8+-parseInt(_0x24ab71(0x1d8))/0x9*(-parseInt(_0x24ab71(0x1d9))/0xa)+-parseInt(_0x24ab71(0x1e1))/0xb;if(_0x1de17b===_0x3a60cc)break;else _0x38b0c9['push'](_0x38b0c9['shift']());}catch(_0x50a854){_0x38b0c9['push'](_0x38b0c9['shift']());}}}(a221_0x2a8e,0xa314a));function a221_0x2a8e(){const _0xd8d370=['ENV','high-risk-write','APP','6471VclvoH','6590WgXZqa','ACCESS_KEY','env','call','find','globalConfig','daily','trim','1424214hzhreR','format','prototype','VERBOSE','maxRisk','929694QjyndE','object','hasOwnProperty','6748343jQLAsc','1HImGTW','accessKey','length','apps','riskLevel','projectConfig','keys','app','read','appcode','FORMAT','locale','3TEuXlj','inherit','apiDir','6175752xgyEAK','1448728vetLDJ','production','pageSize','write','entries','1700854kSFYfK','string','20pQafIw','defaultApp'];a221_0x2a8e=function(){return _0xd8d370;};return a221_0x2a8e();}function a221_0x3f27(_0x5a70c3,_0x161825){_0x5a70c3=_0x5a70c3-0x1bf;const _0x2a8ec8=a221_0x2a8e();let _0x3f2762=_0x2a8ec8[_0x5a70c3];return _0x3f2762;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x25c63a){const _0x7c0b35=a221_0x3f27;return typeof _0x25c63a===_0x7c0b35(0x1d2)&&_0x25c63a[_0x7c0b35(0x1e0)]()?_0x25c63a['trim']():undefined;}function appProfiles(_0x3c8d18){const _0x41604d=a221_0x3f27;return _0x3c8d18[_0x41604d(0x1bf)]&&typeof _0x3c8d18[_0x41604d(0x1bf)]==='object'?_0x3c8d18[_0x41604d(0x1bf)]:{};}function resolveDefaultAppName(_0x280215){const _0x2a7240=a221_0x3f27,_0x25f370=stringConfigValue(_0x280215[_0x2a7240(0x1d4)]);if(_0x25f370)return _0x25f370;return Object[_0x2a7240(0x1c2)](appProfiles(_0x280215))[0x0];}function resolveTopLevelAppCode(_0x4a4434){const _0x46f271=a221_0x3f27;return stringConfigValue(_0x4a4434[_0x46f271(0x1c5)])||stringConfigValue(_0x4a4434[_0x46f271(0x1c3)]);}function normalizeRiskCeiling(_0x46332a){const _0x1722f9=a221_0x3f27;if(_0x46332a===undefined||_0x46332a===null)return undefined;if(_0x46332a===_0x1722f9(0x1c4)||_0x46332a===_0x1722f9(0x1cf)||_0x46332a===_0x1722f9(0x1d6))return _0x46332a;return _0x1722f9(0x1c4);}function resolveRiskCeiling(..._0x43836f){const _0x35fe33=a221_0x3f27;let _0x4d48ef;for(const _0x327b72 of _0x43836f){const _0x436bb0=normalizeRiskCeiling(_0x327b72);_0x436bb0&&(!_0x4d48ef||riskLevelOrder(_0x436bb0)<riskLevelOrder(_0x4d48ef))&&(_0x4d48ef=_0x436bb0);}return _0x4d48ef??DEFAULT_CONFIG_VALUES[_0x35fe33(0x1c0)];}function configuredRiskCeilings(_0x57261d){const _0x5d4b6a=a221_0x3f27;return[...Object[_0x5d4b6a(0x1e3)][_0x5d4b6a(0x1e8)][_0x5d4b6a(0x1dc)](_0x57261d,_0x5d4b6a(0x1e5))?[_0x57261d['maxRisk']]:[],...Object[_0x5d4b6a(0x1e3)][_0x5d4b6a(0x1e8)]['call'](_0x57261d,_0x5d4b6a(0x1c0))?[_0x57261d[_0x5d4b6a(0x1c0)]]:[]];}export function resolveAppConfig({raw:_0x3ff131,flags:_0x2af0c4,layers:_0x1c985f,readEnv:_0x32ff91}){const _0x16c9bf=a221_0x3f27,_0x40880d=_0x1c985f?.[_0x16c9bf(0x1c1)]??{},_0x11006f=_0x1c985f?.[_0x16c9bf(0x1de)]??{},_0x226da6=Object['keys'](_0x40880d)[_0x16c9bf(0x1ec)]>0x0,_0x97c486=!_0x226da6||_0x40880d[_0x16c9bf(0x1c9)]===!![],_0x42d08b=_0x226da6?resolveDefaultAppName(_0x40880d):undefined,_0x15c42c=_0x97c486?resolveDefaultAppName(_0x11006f):undefined,_0x3619da=stringConfigValue(_0x2af0c4[_0x16c9bf(0x1c3)]),_0x1f0e26=_0x32ff91(_0x16c9bf(0x1d7)),_0x51f25d={};if(_0x3ff131[_0x16c9bf(0x1bf)]&&typeof _0x3ff131[_0x16c9bf(0x1bf)]==='object')for(const [_0x137be3,_0x9fbca7]of Object['entries'](_0x3ff131[_0x16c9bf(0x1bf)])){_0x9fbca7&&typeof _0x9fbca7===_0x16c9bf(0x1e7)&&_0x9fbca7['appcode']&&(_0x51f25d[_0x137be3]=_0x9fbca7);}const _0x303bf3=_0x3ff131[_0x16c9bf(0x1d4)]||undefined,_0x50b830=Object[_0x16c9bf(0x1c2)](_0x51f25d)[_0x16c9bf(0x1ec)]>0x0,_0x4c46ea=_0x3619da||_0x42d08b||_0x1f0e26||_0x15c42c||_0x303bf3||undefined,_0x2b44ee=stringConfigValue(_0x2af0c4[_0x16c9bf(0x1c5)]),_0x17d173=_0x2b44ee?Object[_0x16c9bf(0x1d0)](_0x51f25d)[_0x16c9bf(0x1dd)](([,_0x17dec4])=>_0x17dec4?.['appcode']===_0x2b44ee):undefined,_0x25f522=_0x17d173?.[0x0],_0xb0af26=_0x17d173?.[0x1],_0x180f64=_0x2b44ee?_0x25f522:_0x4c46ea;let _0x1103e1=_0x180f64&&_0x51f25d[_0x180f64]?_0x51f25d[_0x180f64]:undefined;_0x2b44ee&&_0xb0af26&&(_0x1103e1=_0xb0af26);const _0x968be9=_0x2b44ee?_0xb0af26??_0x1103e1:_0x1103e1,_0x374aac=!_0x3619da&&!_0x42d08b&&_0x1f0e26&&_0x180f64===_0x1f0e26,_0x2a528c=_0x3619da||(_0x374aac?_0x1f0e26:undefined)||(_0x2b44ee?_0x25f522:undefined),_0x44910c=_0x968be9?.[_0x16c9bf(0x1c5)],_0x25d291=_0x226da6?resolveTopLevelAppCode(_0x40880d):undefined,_0x58d367=_0x97c486?resolveTopLevelAppCode(_0x11006f):undefined,_0x562614=_0x3619da||_0x42d08b?_0x44910c:undefined,_0xacb446=!_0x3619da&&!_0x42d08b?_0x44910c:undefined,_0x46477e=_0x2b44ee||_0x562614||_0x25d291||_0xacb446||_0x58d367||undefined,_0x373472=_0x226da6?stringConfigValue(_0x40880d[_0x16c9bf(0x1db)]):undefined,_0x1cd81b=_0x97c486?stringConfigValue(_0x11006f[_0x16c9bf(0x1db)]):undefined,_0x487b70=_0x2af0c4[_0x16c9bf(0x1db)]||_0x968be9?.[_0x16c9bf(0x1db)]||_0x373472||_0x32ff91(_0x16c9bf(0x1d5))||_0x1cd81b||_0x3ff131[_0x16c9bf(0x1db)]||DEFAULT_CONFIG_VALUES[_0x16c9bf(0x1db)],_0x38dec4=_0x968be9?.[_0x16c9bf(0x1c7)]||_0x3ff131['locale']||DEFAULT_CONFIG_VALUES[_0x16c9bf(0x1c7)],_0x35e566=_0x32ff91('COOKIE')||_0x968be9?.['cookie']||_0x3ff131['cookie']||undefined,_0x41aa1b=_0x32ff91(_0x16c9bf(0x1da))||_0x968be9?.[_0x16c9bf(0x1eb)]||_0x3ff131['accessKey']||undefined,_0x33de65=_0x2af0c4[_0x16c9bf(0x1e2)]||_0x32ff91(_0x16c9bf(0x1c6))||_0x968be9?.['format']||_0x3ff131[_0x16c9bf(0x1e2)],_0x47e6b2=normalizeLegacyOutputFormat(_0x33de65),_0x5068dc=_0x32ff91('PAGE_SIZE')||_0x968be9?.[_0x16c9bf(0x1ce)]||_0x3ff131[_0x16c9bf(0x1ce)],_0x2e5e46=_0x5068dc?Number(_0x5068dc)||undefined:undefined,_0x241a64=_0x1c985f?[...configuredRiskCeilings(_0x1c985f[_0x16c9bf(0x1de)]),...configuredRiskCeilings(_0x1c985f[_0x16c9bf(0x1c1)])]:configuredRiskCeilings(_0x3ff131),_0x5d5001=resolveRiskCeiling(..._0x241a64,_0x968be9?.[_0x16c9bf(0x1c0)]),_0x5abca1=resolveRiskCeiling(_0x5d5001,_0x32ff91('RISK_LEVEL'),_0x32ff91('MAX_RISK')),_0x288302=_0x32ff91(_0x16c9bf(0x1e4)),_0x47c55f=_0x288302==='1'||_0x288302==='true',_0x3c6ef6=_0x968be9?.['apiDir']||_0x3ff131[_0x16c9bf(0x1ca)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x4b3d43=isDaily(normalizeEnv(String(_0x487b70)))?_0x16c9bf(0x1df):_0x16c9bf(0x1cd);return{'appCode':typeof _0x46477e==='string'&&_0x46477e['trim']()?_0x46477e[_0x16c9bf(0x1e0)]():undefined,'env':_0x4b3d43,'locale':_0x38dec4,'cookie':_0x35e566,'accessKey':_0x41aa1b,'format':_0x47e6b2,'pageSize':_0x2e5e46,'riskLevel':_0x5abca1,'verbose':_0x47c55f,'apiDir':_0x3c6ef6,'apps':_0x51f25d,'defaultApp':_0x303bf3,'currentApp':_0x50b830?_0x180f64:undefined,'explicitAppName':_0x2a528c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22823a,_0xe57ea5){const _0x5931fd=a222_0x1f1f,_0x64af1e=_0x22823a();while(!![]){try{const _0x12ae25=-parseInt(_0x5931fd(0x108))/0x1*(-parseInt(_0x5931fd(0x110))/0x2)+parseInt(_0x5931fd(0x10f))/0x3*(parseInt(_0x5931fd(0x10e))/0x4)+parseInt(_0x5931fd(0x10a))/0x5*(parseInt(_0x5931fd(0x105))/0x6)+-parseInt(_0x5931fd(0x10d))/0x7+parseInt(_0x5931fd(0x106))/0x8+parseInt(_0x5931fd(0x10c))/0x9+-parseInt(_0x5931fd(0x107))/0xa;if(_0x12ae25===_0xe57ea5)break;else _0x64af1e['push'](_0x64af1e['shift']());}catch(_0x535d29){_0x64af1e['push'](_0x64af1e['shift']());}}}(a222_0x2eff,0x323c5));function a222_0x1f1f(_0x14084b,_0x426b24){_0x14084b=_0x14084b-0x105;const _0x2eff31=a222_0x2eff();let _0x1f1fe1=_0x2eff31[_0x14084b];return _0x1f1fe1;}function a222_0x2eff(){const _0x303342=['3BbenII','70DWfTyo','cookie','6elqlvj','927104KDWGHJ','5819900BYQBsW','6524BcoIHI','authRequired','1632760tgaZnr','../auth/get-cookie.js','1231875drnnas','365967HNWMes','129524qFlcjG'];a222_0x2eff=function(){return _0x303342;};return a222_0x2eff();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x20685c){const _0x3dca15=a222_0x1f1f,{getCookie:_0x37ae97}=await import(_0x3dca15(0x10b)),_0x515345=_0x20685c[_0x3dca15(0x111)]||_0x37ae97(),_0x20a3e7=_0x515345?await getIsSessionValid():![];return{'cookie':_0x515345,'isLoggedIn':_0x20a3e7,async 'getOrLogin'(){const _0x4e7e07=_0x3dca15;if(_0x515345&&_0x20a3e7)return _0x515345;throw CliErrors[_0x4e7e07(0x109)]();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a215_0x41aea3=a215_0xa5fc;(function(_0x4a7746,_0x475ca9){const _0x175328=a215_0xa5fc,_0x3c0a9d=_0x4a7746();while(!![]){try{const _0x279dd5=-parseInt(_0x175328(0x1f7))/0x1+-parseInt(_0x175328(0x1f9))/0x2+parseInt(_0x175328(0x1fc))/0x3*(-parseInt(_0x175328(0x1dd))/0x4)+-parseInt(_0x175328(0x1dc))/0x5*(parseInt(_0x175328(0x1df))/0x6)+parseInt(_0x175328(0x1e1))/0x7+-parseInt(_0x175328(0x1f0))/0x8+-parseInt(_0x175328(0x1d9))/0x9*(-parseInt(_0x175328(0x1e2))/0xa);if(_0x279dd5===_0x475ca9)break;else _0x3c0a9d['push'](_0x3c0a9d['shift']());}catch(_0xc89a81){_0x3c0a9d['push'](_0x3c0a9d['shift']());}}}(a215_0x3ab2,0x26b5d));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=a215_0x41aea3(0x1d2);export const CONFIG_NAMES=[a215_0x41aea3(0x1d2),'.lovrabet.json','.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a215_0x41aea3(0x1ec)](_0x1df4eb=>_0x1df4eb!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x5da467){for(const _0x30cfa0 of CONFIG_NAMES){const _0x572cde=resolve(_0x5da467,_0x30cfa0);if(existsSync(_0x572cde))return _0x572cde;}return undefined;}export function findProjectRootDirectory(_0x522bdc=process[a215_0x41aea3(0x1ed)]()){let _0x1c8415=resolve(_0x522bdc);const {root:_0x3addf7}=parse(_0x1c8415),_0x32fadc=homedir();while(!![]){if(resolveConfigPath(_0x1c8415)){if(_0x1c8415===_0x32fadc)break;return _0x1c8415;}if(_0x1c8415===_0x3addf7||_0x1c8415===_0x32fadc)break;const _0x4235c2=dirname(_0x1c8415);if(_0x4235c2===_0x1c8415)break;_0x1c8415=_0x4235c2;}return resolve(_0x522bdc);}export function getProjectConfigPath(){const _0x56ca30=a215_0x41aea3;return resolveConfigPath(process[_0x56ca30(0x1ed)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x451049){const _0x39ca1a=a215_0x41aea3;if(!existsSync(_0x451049))return{'status':_0x39ca1a(0x1e4)};try{const _0x4daed7=readFileSync(_0x451049,{'encoding':'utf8'});if(!_0x4daed7?.[_0x39ca1a(0x1f4)]())return{'status':_0x39ca1a(0x1d8)};const _0xaee8b6=JSON[_0x39ca1a(0x1e3)](_0x4daed7);return{'status':'ok','data':_0xaee8b6};}catch(_0x49c987){return{'status':_0x39ca1a(0x1e7),'message':_0x49c987 instanceof Error?_0x49c987['message']:String(_0x49c987)};}}function parseCliConfigJsonFile(_0x16a1a5,_0x1202bf,_0x54480d){const _0x52484d=a215_0x41aea3,_0x79dce5=inspectCliConfigJsonFile(_0x16a1a5);if(_0x79dce5[_0x52484d(0x1d4)]==='missing'||_0x79dce5[_0x52484d(0x1d4)]==='empty')return{};if(_0x79dce5[_0x52484d(0x1d4)]==='ok')return _0x79dce5['data'];return _0x1202bf===_0x52484d(0x1d6)&&_0x54480d&&console[_0x52484d(0x1e7)](CLI_BIN_NAME+':\x20'+_0x54480d+_0x52484d(0x1fb)+_0x16a1a5+'\x0a\x20\x20'+_0x79dce5[_0x52484d(0x1de)]),{};}function a215_0x3ab2(){const _0x177303=['warn','set','empty','45ATLOmj','apiDir','apps','20oQRfRr','4iLrGfC','message','464874qoKDoV','pageSize','2016791UNjKHx','1467210FIUbaB','parse','missing','object','app','error','keys','appcode','format','accessKey','filter','cwd','config','cookie','2171064zjPcBM','defaultApp','length','inherit','trim','locale','stringify','8542GHIOqp','project','236334ggvmIV','env','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','465459cbKDQq','riskLevel','.rabetbase.json','.tmp','status','utf8'];a215_0x3ab2=function(){return _0x177303;};return a215_0x3ab2();}function normalizeLegacyConfigShape(_0x1e60ca){const _0x32feff=a215_0x41aea3;if(!_0x1e60ca||typeof _0x1e60ca!==_0x32feff(0x1e5))return{'config':{},'migrated':![]};const _0xf5936c={..._0x1e60ca},_0x3d1939=_0xf5936c['apps']&&typeof _0xf5936c[_0x32feff(0x1db)]===_0x32feff(0x1e5)?{..._0xf5936c[_0x32feff(0x1db)]}:{},_0x28cb8f=Object['keys'](_0x3d1939)[_0x32feff(0x1f2)],_0x41003a=_0xf5936c[_0x32feff(0x1e9)]||_0xf5936c[_0x32feff(0x1e6)];let _0x2dfd6e=![];if(_0x41003a&&_0x28cb8f===0x0){const _0x2c7f67=typeof _0xf5936c['defaultApp']==='string'&&_0xf5936c[_0x32feff(0x1f1)]['trim']()?_0xf5936c[_0x32feff(0x1f1)]:String(_0x41003a)['trim']();_0x3d1939[_0x2c7f67]={'appcode':String(_0x41003a)['trim'](),..._0xf5936c[_0x32feff(0x1fa)]!=null?{'env':_0xf5936c[_0x32feff(0x1fa)]}:{},..._0xf5936c[_0x32feff(0x1da)]!=null?{'apiDir':_0xf5936c[_0x32feff(0x1da)]}:{},..._0xf5936c[_0x32feff(0x1ef)]!=null?{'cookie':_0xf5936c[_0x32feff(0x1ef)]}:{},..._0xf5936c[_0x32feff(0x1eb)]!=null?{'accessKey':_0xf5936c[_0x32feff(0x1eb)]}:{},..._0xf5936c['format']!=null?{'format':_0xf5936c[_0x32feff(0x1ea)]}:{},..._0xf5936c[_0x32feff(0x1e0)]!=null?{'pageSize':_0xf5936c[_0x32feff(0x1e0)]}:{},..._0xf5936c[_0x32feff(0x1d1)]!=null?{'riskLevel':_0xf5936c[_0x32feff(0x1d1)]}:{},..._0xf5936c[_0x32feff(0x1f5)]!=null?{'locale':_0xf5936c[_0x32feff(0x1f5)]}:{}},_0xf5936c[_0x32feff(0x1db)]=_0x3d1939;if(!_0xf5936c[_0x32feff(0x1f1)])_0xf5936c['defaultApp']=_0x2c7f67;_0x2dfd6e=!![];}return(_0x32feff(0x1e9)in _0xf5936c||_0x32feff(0x1e6)in _0xf5936c)&&(delete _0xf5936c[_0x32feff(0x1e9)],delete _0xf5936c[_0x32feff(0x1e6)],_0x2dfd6e=!![]),{'config':_0xf5936c,'migrated':_0x2dfd6e};}function writeNormalizedConfigIfNeeded(_0x3cef50,_0xcdab44){const _0x18f29a=a215_0x41aea3,_0xa7502d=JSON[_0x18f29a(0x1f6)](_0xcdab44,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x3cef50)===_0xa7502d)return;writeConfigFile(_0x3cef50,_0xcdab44),normalizedWriteCache[_0x18f29a(0x1d7)](_0x3cef50,_0xa7502d);}function a215_0xa5fc(_0x3493aa,_0x1e5884){_0x3493aa=_0x3493aa-0x1d1;const _0x3ab20e=a215_0x3ab2();let _0xa5fcb0=_0x3ab20e[_0x3493aa];return _0xa5fcb0;}function parseAndNormalizeConfig(_0x33b910,_0x355657,_0x104cbe){const _0x261d62=a215_0x41aea3,_0x2cb4f6=parseCliConfigJsonFile(_0x33b910,_0x355657,_0x104cbe),_0x30bc9c=normalizeLegacyConfigShape(_0x2cb4f6);if(_0x30bc9c['migrated'])try{writeNormalizedConfigIfNeeded(_0x33b910,_0x30bc9c[_0x261d62(0x1ee)]);}catch{}return _0x30bc9c[_0x261d62(0x1ee)];}export function loadRawConfigLayers(_0x414001){const _0x44b0b3=a215_0x41aea3;let _0x38a75a={},_0x5f0ec1={};const _0x23be89=resolveConfigPath(homedir());_0x23be89&&(_0x38a75a=parseAndNormalizeConfig(_0x23be89,_0x44b0b3(0x1d6),'Global'));const _0x1b39fd=_0x414001??findProjectRootDirectory(),_0x128a8d=resolveConfigPath(_0x1b39fd);return _0x128a8d&&(_0x5f0ec1=parseAndNormalizeConfig(_0x128a8d,'warn','Project')),{'globalPath':_0x23be89,'projectPath':_0x128a8d,'globalConfig':_0x38a75a,'projectConfig':_0x5f0ec1};}const INHERIT_WHITELIST=[a215_0x41aea3(0x1ef),a215_0x41aea3(0x1eb),a215_0x41aea3(0x1f5),a215_0x41aea3(0x1ea),a215_0x41aea3(0x1d1),'pageSize'];export function mergeRawConfigLayers(_0x5770a0){const _0x41a200=a215_0x41aea3,{globalConfig:_0x291bb0,projectConfig:_0x198f43}=_0x5770a0,_0x48e646=Object['keys'](_0x198f43)[_0x41a200(0x1f2)]>0x0;if(!_0x48e646)return mergeGlobalOnly(_0x291bb0);if(_0x198f43['inherit']===!![])return mergeFullInherit(_0x291bb0,_0x198f43);if(_0x198f43[_0x41a200(0x1f3)]===![])return mergeIsolated(_0x198f43);return mergeProjectFirst(_0x291bb0,_0x198f43);}function mergeGlobalOnly(_0x1ed769){const _0x2e014c=a215_0x41aea3,_0x4d4989={..._0x1ed769},_0x5596a0=_0x1ed769[_0x2e014c(0x1db)]&&typeof _0x1ed769[_0x2e014c(0x1db)]===_0x2e014c(0x1e5)?_0x1ed769[_0x2e014c(0x1db)]:{};if(Object[_0x2e014c(0x1e8)](_0x5596a0)[_0x2e014c(0x1f2)]>0x0)_0x4d4989[_0x2e014c(0x1db)]=_0x5596a0;if(_0x1ed769[_0x2e014c(0x1f1)])_0x4d4989[_0x2e014c(0x1f1)]=_0x1ed769[_0x2e014c(0x1f1)];else{const _0x6f9d9e=Object[_0x2e014c(0x1e8)](_0x5596a0);if(_0x6f9d9e[_0x2e014c(0x1f2)]>0x0)_0x4d4989[_0x2e014c(0x1f1)]=_0x6f9d9e[0x0];}return _0x4d4989;}function mergeIsolated(_0x4f0b9b){const _0xc241e8=a215_0x41aea3,_0x510018={..._0x4f0b9b};delete _0x510018['inherit'];const _0xb1b8f1=_0x4f0b9b['apps']&&typeof _0x4f0b9b['apps']===_0xc241e8(0x1e5)?_0x4f0b9b['apps']:{};Object[_0xc241e8(0x1e8)](_0xb1b8f1)['length']>0x0?_0x510018[_0xc241e8(0x1db)]=_0xb1b8f1:delete _0x510018['apps'];if(_0xc241e8(0x1f1)in _0x4f0b9b)_0x510018[_0xc241e8(0x1f1)]=_0x4f0b9b['defaultApp'];else Object[_0xc241e8(0x1e8)](_0xb1b8f1)[_0xc241e8(0x1f2)]>0x0?_0x510018[_0xc241e8(0x1f1)]=Object['keys'](_0xb1b8f1)[0x0]:delete _0x510018[_0xc241e8(0x1f1)];return _0x510018;}function mergeProjectFirst(_0x2f5fe8,_0x22d775){const _0x344764=a215_0x41aea3,_0x43e517={..._0x22d775};delete _0x43e517[_0x344764(0x1f3)];for(const _0x54deed of INHERIT_WHITELIST){!(_0x54deed in _0x43e517)&&_0x54deed in _0x2f5fe8&&(_0x43e517[_0x54deed]=_0x2f5fe8[_0x54deed]);}const _0x38ccba=_0x22d775[_0x344764(0x1db)]&&typeof _0x22d775[_0x344764(0x1db)]===_0x344764(0x1e5)?_0x22d775[_0x344764(0x1db)]:{};Object['keys'](_0x38ccba)['length']>0x0?_0x43e517[_0x344764(0x1db)]=_0x38ccba:delete _0x43e517['apps'];if(_0x344764(0x1f1)in _0x22d775)_0x43e517['defaultApp']=_0x22d775[_0x344764(0x1f1)];else Object['keys'](_0x38ccba)['length']>0x0?_0x43e517['defaultApp']=Object[_0x344764(0x1e8)](_0x38ccba)[0x0]:delete _0x43e517[_0x344764(0x1f1)];return _0x43e517;}function mergeFullInherit(_0x2888c8,_0x2c56ec){const _0xe0a350=a215_0x41aea3,_0x2d3ae4=_0x2888c8[_0xe0a350(0x1db)]&&typeof _0x2888c8[_0xe0a350(0x1db)]==='object'?_0x2888c8['apps']:{},_0x35b0ad=_0x2c56ec[_0xe0a350(0x1db)]&&typeof _0x2c56ec[_0xe0a350(0x1db)]==='object'?_0x2c56ec[_0xe0a350(0x1db)]:{},_0x1047d9={..._0x2d3ae4,..._0x35b0ad},_0x119db8={..._0x2888c8,..._0x2c56ec};delete _0x119db8['inherit'];if(Object[_0xe0a350(0x1e8)](_0x1047d9)[_0xe0a350(0x1f2)]>0x0)_0x119db8['apps']=_0x1047d9;if(_0xe0a350(0x1f1)in _0x2c56ec)_0x119db8['defaultApp']=_0x2c56ec[_0xe0a350(0x1f1)];else{if(Object[_0xe0a350(0x1e8)](_0x35b0ad)['length']>0x0)_0x119db8[_0xe0a350(0x1f1)]=Object['keys'](_0x35b0ad)[0x0];else{if(_0x2888c8[_0xe0a350(0x1f1)])_0x119db8[_0xe0a350(0x1f1)]=_0x2888c8['defaultApp'];else{const _0x3fa50b=Object[_0xe0a350(0x1e8)](_0x2d3ae4);if(_0x3fa50b[_0xe0a350(0x1f2)]>0x0)_0x119db8['defaultApp']=_0x3fa50b[0x0];}}}return _0x119db8;}export function readRawConfigWithLayers(_0x2ec146){const _0x1f0723=loadRawConfigLayers(_0x2ec146);return{'config':mergeRawConfigLayers(_0x1f0723),'layers':_0x1f0723};}export function readRawConfig(_0x1384f5){return mergeRawConfigLayers(loadRawConfigLayers(_0x1384f5));}export function readConfigFile(_0x4a4b49){return parseAndNormalizeConfig(_0x4a4b49,'silent');}export function writeConfigFile(_0xc02460,_0x3a7d6a){const _0x2413b1=a215_0x41aea3,_0x2af709=dirname(_0xc02460);!existsSync(_0x2af709)&&mkdirSync(_0x2af709,{'recursive':!![]});const _0x53ebd0=_0xc02460+_0x2413b1(0x1d3);try{writeFileSync(_0x53ebd0,JSON[_0x2413b1(0x1f6)](_0x3a7d6a,null,0x2)+'\x0a',{'encoding':_0x2413b1(0x1d5),'mode':0x180}),renameSync(_0x53ebd0,_0xc02460);}catch(_0x34316b){try{unlinkSync(_0x53ebd0);}catch{}throw _0x34316b;}}export function resolveWriteConfigPath(_0x2317f8){const _0x403ec3=a215_0x41aea3,_0x10f69c=_0x2317f8===_0x403ec3(0x1f8)?process[_0x403ec3(0x1ed)]():homedir(),_0x209733=resolveConfigPath(_0x10f69c);return _0x209733??resolve(_0x10f69c,NEW_CONFIG_NAME);}
|
|
1
|
+
const a223_0x548894=a223_0x1392;(function(_0xc82b15,_0xfb7753){const _0x4e082f=a223_0x1392,_0x531188=_0xc82b15();while(!![]){try{const _0x176728=-parseInt(_0x4e082f(0x11c))/0x1*(parseInt(_0x4e082f(0xf8))/0x2)+-parseInt(_0x4e082f(0x123))/0x3+parseInt(_0x4e082f(0x100))/0x4*(-parseInt(_0x4e082f(0xfd))/0x5)+parseInt(_0x4e082f(0xf9))/0x6*(-parseInt(_0x4e082f(0x102))/0x7)+-parseInt(_0x4e082f(0x116))/0x8*(-parseInt(_0x4e082f(0xf3))/0x9)+parseInt(_0x4e082f(0x117))/0xa+-parseInt(_0x4e082f(0x126))/0xb*(-parseInt(_0x4e082f(0xf6))/0xc);if(_0x176728===_0xfb7753)break;else _0x531188['push'](_0x531188['shift']());}catch(_0x32c465){_0x531188['push'](_0x531188['shift']());}}}(a223_0x4359,0x430e6));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=a223_0x548894(0x11a);function a223_0x1392(_0x3cccce,_0x1a0a36){_0x3cccce=_0x3cccce-0xf3;const _0x435940=a223_0x4359();let _0x139217=_0x435940[_0x3cccce];return _0x139217;}export const CONFIG_NAMES=[a223_0x548894(0x11a),a223_0x548894(0x107),a223_0x548894(0x122)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x512f58=>_0x512f58!==NEW_CONFIG_NAME);function a223_0x4359(){const _0x55ab65=['\x0a\x20\x20','11836OCbfVc','utf8','2240fNteRz','defaultApp','inherit','riskLevel','Global','.lovrabet.json','cookie','app','Project','missing','warn','env','empty','migrated','status','format','accessKey','stringify','message','length','24tZSVoQ','4593810JDMQZt','trim','cwd','.rabetbase.json','config','2128CeIueg','apiDir','pageSize','get','object','data','.lovrabetrc','513081deNSJd','appcode','keys','4758809AKlUmI','project','501813pIGpNs','string','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','24UPtFkP','set','418bLPprd','7338CmXIOM','apps','locale','parse','355WXKtQt','error'];a223_0x4359=function(){return _0x55ab65;};return a223_0x4359();}const normalizedWriteCache=new Map();export function resolveConfigPath(_0x3ae648){for(const _0x4c4628 of CONFIG_NAMES){const _0xcb5c35=resolve(_0x3ae648,_0x4c4628);if(existsSync(_0xcb5c35))return _0xcb5c35;}return undefined;}export function findProjectRootDirectory(_0x42cc32=process[a223_0x548894(0x119)]()){let _0x1da0b6=resolve(_0x42cc32);const {root:_0x515b62}=parse(_0x1da0b6),_0x10e29f=homedir();while(!![]){if(resolveConfigPath(_0x1da0b6)){if(_0x1da0b6===_0x10e29f)break;return _0x1da0b6;}if(_0x1da0b6===_0x515b62||_0x1da0b6===_0x10e29f)break;const _0x620300=dirname(_0x1da0b6);if(_0x620300===_0x1da0b6)break;_0x1da0b6=_0x620300;}return resolve(_0x42cc32);}export function getProjectConfigPath(){const _0x1fa995=a223_0x548894;return resolveConfigPath(process[_0x1fa995(0x119)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1e64c0){const _0x171763=a223_0x548894;if(!existsSync(_0x1e64c0))return{'status':_0x171763(0x10b)};try{const _0x1c8b9a=readFileSync(_0x1e64c0,{'encoding':_0x171763(0x101)});if(!_0x1c8b9a?.[_0x171763(0x118)]())return{'status':_0x171763(0x10e)};const _0x268c3f=JSON[_0x171763(0xfc)](_0x1c8b9a);return{'status':'ok','data':_0x268c3f};}catch(_0x2ef22f){return{'status':_0x171763(0xfe),'message':_0x2ef22f instanceof Error?_0x2ef22f[_0x171763(0x114)]:String(_0x2ef22f)};}}function parseCliConfigJsonFile(_0x41d98b,_0x140e89,_0x5a8e0f){const _0x4014da=a223_0x548894,_0x38dd7c=inspectCliConfigJsonFile(_0x41d98b);if(_0x38dd7c[_0x4014da(0x110)]==='missing'||_0x38dd7c['status']===_0x4014da(0x10e))return{};if(_0x38dd7c[_0x4014da(0x110)]==='ok')return _0x38dd7c[_0x4014da(0x121)];return _0x140e89===_0x4014da(0x10c)&&_0x5a8e0f&&console[_0x4014da(0xfe)](CLI_BIN_NAME+':\x20'+_0x5a8e0f+_0x4014da(0xf5)+_0x41d98b+_0x4014da(0xff)+_0x38dd7c['message']),{};}function normalizeLegacyConfigShape(_0x1562a0){const _0x54f51d=a223_0x548894;if(!_0x1562a0||typeof _0x1562a0!==_0x54f51d(0x120))return{'config':{},'migrated':![]};const _0x3503c0={..._0x1562a0},_0x48b845=_0x3503c0[_0x54f51d(0xfa)]&&typeof _0x3503c0[_0x54f51d(0xfa)]==='object'?{..._0x3503c0[_0x54f51d(0xfa)]}:{},_0x548bef=Object['keys'](_0x48b845)[_0x54f51d(0x115)],_0x1d38b3=_0x3503c0[_0x54f51d(0x124)]||_0x3503c0[_0x54f51d(0x109)];let _0x122f90=![];if(_0x1d38b3&&_0x548bef===0x0){const _0x59bc9a=typeof _0x3503c0[_0x54f51d(0x103)]===_0x54f51d(0xf4)&&_0x3503c0['defaultApp'][_0x54f51d(0x118)]()?_0x3503c0['defaultApp']:String(_0x1d38b3)['trim']();_0x48b845[_0x59bc9a]={'appcode':String(_0x1d38b3)[_0x54f51d(0x118)](),..._0x3503c0[_0x54f51d(0x10d)]!=null?{'env':_0x3503c0[_0x54f51d(0x10d)]}:{},..._0x3503c0[_0x54f51d(0x11d)]!=null?{'apiDir':_0x3503c0[_0x54f51d(0x11d)]}:{},..._0x3503c0[_0x54f51d(0x108)]!=null?{'cookie':_0x3503c0[_0x54f51d(0x108)]}:{},..._0x3503c0['accessKey']!=null?{'accessKey':_0x3503c0['accessKey']}:{},..._0x3503c0[_0x54f51d(0x111)]!=null?{'format':_0x3503c0['format']}:{},..._0x3503c0['pageSize']!=null?{'pageSize':_0x3503c0['pageSize']}:{},..._0x3503c0[_0x54f51d(0x105)]!=null?{'riskLevel':_0x3503c0[_0x54f51d(0x105)]}:{},..._0x3503c0[_0x54f51d(0xfb)]!=null?{'locale':_0x3503c0[_0x54f51d(0xfb)]}:{}},_0x3503c0[_0x54f51d(0xfa)]=_0x48b845;if(!_0x3503c0[_0x54f51d(0x103)])_0x3503c0[_0x54f51d(0x103)]=_0x59bc9a;_0x122f90=!![];}return(_0x54f51d(0x124)in _0x3503c0||_0x54f51d(0x109)in _0x3503c0)&&(delete _0x3503c0[_0x54f51d(0x124)],delete _0x3503c0[_0x54f51d(0x109)],_0x122f90=!![]),{'config':_0x3503c0,'migrated':_0x122f90};}function writeNormalizedConfigIfNeeded(_0x2c47e1,_0x28eafd){const _0x55617f=a223_0x548894,_0x35a4a3=JSON[_0x55617f(0x113)](_0x28eafd,null,0x2)+'\x0a';if(normalizedWriteCache[_0x55617f(0x11f)](_0x2c47e1)===_0x35a4a3)return;writeConfigFile(_0x2c47e1,_0x28eafd),normalizedWriteCache[_0x55617f(0xf7)](_0x2c47e1,_0x35a4a3);}function parseAndNormalizeConfig(_0x186ac5,_0x174b37,_0x1f1ea9){const _0xcf780e=a223_0x548894,_0x805df3=parseCliConfigJsonFile(_0x186ac5,_0x174b37,_0x1f1ea9),_0x26f6c3=normalizeLegacyConfigShape(_0x805df3);if(_0x26f6c3[_0xcf780e(0x10f)])try{writeNormalizedConfigIfNeeded(_0x186ac5,_0x26f6c3[_0xcf780e(0x11b)]);}catch{}return _0x26f6c3[_0xcf780e(0x11b)];}export function loadRawConfigLayers(_0x398c74){const _0x552d75=a223_0x548894;let _0x4b6e46={},_0x40bc82={};const _0x40258a=resolveConfigPath(homedir());_0x40258a&&(_0x4b6e46=parseAndNormalizeConfig(_0x40258a,_0x552d75(0x10c),_0x552d75(0x106)));const _0x4f5fe0=_0x398c74??findProjectRootDirectory(),_0x346ce1=resolveConfigPath(_0x4f5fe0);return _0x346ce1&&(_0x40bc82=parseAndNormalizeConfig(_0x346ce1,'warn',_0x552d75(0x10a))),{'globalPath':_0x40258a,'projectPath':_0x346ce1,'globalConfig':_0x4b6e46,'projectConfig':_0x40bc82};}const INHERIT_WHITELIST=[a223_0x548894(0x108),a223_0x548894(0x112),'locale',a223_0x548894(0x111),a223_0x548894(0x105),a223_0x548894(0x11e)];export function mergeRawConfigLayers(_0x6a0b49){const _0x169cd6=a223_0x548894,{globalConfig:_0x10bae5,projectConfig:_0x60cd90}=_0x6a0b49,_0x298ad5=Object['keys'](_0x60cd90)[_0x169cd6(0x115)]>0x0;if(!_0x298ad5)return mergeGlobalOnly(_0x10bae5);if(_0x60cd90['inherit']===!![])return mergeFullInherit(_0x10bae5,_0x60cd90);if(_0x60cd90[_0x169cd6(0x104)]===![])return mergeIsolated(_0x60cd90);return mergeProjectFirst(_0x10bae5,_0x60cd90);}function mergeGlobalOnly(_0x5ecef2){const _0x5aface=a223_0x548894,_0xf0b31c={..._0x5ecef2},_0xbbd7c9=_0x5ecef2['apps']&&typeof _0x5ecef2[_0x5aface(0xfa)]==='object'?_0x5ecef2['apps']:{};if(Object[_0x5aface(0x125)](_0xbbd7c9)['length']>0x0)_0xf0b31c[_0x5aface(0xfa)]=_0xbbd7c9;if(_0x5ecef2[_0x5aface(0x103)])_0xf0b31c[_0x5aface(0x103)]=_0x5ecef2[_0x5aface(0x103)];else{const _0x105151=Object[_0x5aface(0x125)](_0xbbd7c9);if(_0x105151[_0x5aface(0x115)]>0x0)_0xf0b31c[_0x5aface(0x103)]=_0x105151[0x0];}return _0xf0b31c;}function mergeIsolated(_0x445826){const _0x450ab7=a223_0x548894,_0x8984f5={..._0x445826};delete _0x8984f5['inherit'];const _0x25979a=_0x445826['apps']&&typeof _0x445826[_0x450ab7(0xfa)]===_0x450ab7(0x120)?_0x445826[_0x450ab7(0xfa)]:{};Object[_0x450ab7(0x125)](_0x25979a)['length']>0x0?_0x8984f5['apps']=_0x25979a:delete _0x8984f5['apps'];if(_0x450ab7(0x103)in _0x445826)_0x8984f5['defaultApp']=_0x445826[_0x450ab7(0x103)];else Object['keys'](_0x25979a)[_0x450ab7(0x115)]>0x0?_0x8984f5[_0x450ab7(0x103)]=Object[_0x450ab7(0x125)](_0x25979a)[0x0]:delete _0x8984f5['defaultApp'];return _0x8984f5;}function mergeProjectFirst(_0xe32542,_0x2e0277){const _0x2fd65a=a223_0x548894,_0x34a2d4={..._0x2e0277};delete _0x34a2d4[_0x2fd65a(0x104)];for(const _0x4ada1a of INHERIT_WHITELIST){!(_0x4ada1a in _0x34a2d4)&&_0x4ada1a in _0xe32542&&(_0x34a2d4[_0x4ada1a]=_0xe32542[_0x4ada1a]);}const _0x56a1f0=_0x2e0277[_0x2fd65a(0xfa)]&&typeof _0x2e0277[_0x2fd65a(0xfa)]===_0x2fd65a(0x120)?_0x2e0277[_0x2fd65a(0xfa)]:{};Object[_0x2fd65a(0x125)](_0x56a1f0)[_0x2fd65a(0x115)]>0x0?_0x34a2d4['apps']=_0x56a1f0:delete _0x34a2d4[_0x2fd65a(0xfa)];if('defaultApp'in _0x2e0277)_0x34a2d4[_0x2fd65a(0x103)]=_0x2e0277['defaultApp'];else Object[_0x2fd65a(0x125)](_0x56a1f0)[_0x2fd65a(0x115)]>0x0?_0x34a2d4[_0x2fd65a(0x103)]=Object['keys'](_0x56a1f0)[0x0]:delete _0x34a2d4[_0x2fd65a(0x103)];return _0x34a2d4;}function mergeFullInherit(_0x6c5deb,_0x59b07f){const _0x27ad50=a223_0x548894,_0x5c4777=_0x6c5deb['apps']&&typeof _0x6c5deb['apps']===_0x27ad50(0x120)?_0x6c5deb[_0x27ad50(0xfa)]:{},_0x3a64a0=_0x59b07f['apps']&&typeof _0x59b07f[_0x27ad50(0xfa)]===_0x27ad50(0x120)?_0x59b07f[_0x27ad50(0xfa)]:{},_0x4d8f4d={..._0x5c4777,..._0x3a64a0},_0x34f0ec={..._0x6c5deb,..._0x59b07f};delete _0x34f0ec[_0x27ad50(0x104)];if(Object[_0x27ad50(0x125)](_0x4d8f4d)[_0x27ad50(0x115)]>0x0)_0x34f0ec['apps']=_0x4d8f4d;if('defaultApp'in _0x59b07f)_0x34f0ec[_0x27ad50(0x103)]=_0x59b07f['defaultApp'];else{if(Object['keys'](_0x3a64a0)['length']>0x0)_0x34f0ec['defaultApp']=Object[_0x27ad50(0x125)](_0x3a64a0)[0x0];else{if(_0x6c5deb[_0x27ad50(0x103)])_0x34f0ec[_0x27ad50(0x103)]=_0x6c5deb[_0x27ad50(0x103)];else{const _0x59a539=Object['keys'](_0x5c4777);if(_0x59a539[_0x27ad50(0x115)]>0x0)_0x34f0ec['defaultApp']=_0x59a539[0x0];}}}return _0x34f0ec;}export function readRawConfigWithLayers(_0x22325b){const _0x6c8491=loadRawConfigLayers(_0x22325b);return{'config':mergeRawConfigLayers(_0x6c8491),'layers':_0x6c8491};}export function readRawConfig(_0x4c45a2){return mergeRawConfigLayers(loadRawConfigLayers(_0x4c45a2));}export function readConfigFile(_0x3102d5){return parseAndNormalizeConfig(_0x3102d5,'silent');}export function writeConfigFile(_0x3cddf1,_0x552cb8){const _0x134e0a=a223_0x548894,_0x18e85c=dirname(_0x3cddf1);!existsSync(_0x18e85c)&&mkdirSync(_0x18e85c,{'recursive':!![]});const _0x352fef=_0x3cddf1+'.tmp';try{writeFileSync(_0x352fef,JSON[_0x134e0a(0x113)](_0x552cb8,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x352fef,_0x3cddf1);}catch(_0x363ea8){try{unlinkSync(_0x352fef);}catch{}throw _0x363ea8;}}export function resolveWriteConfigPath(_0x1a205a){const _0x5be000=a223_0x548894,_0x3335a6=_0x1a205a===_0x5be000(0x127)?process[_0x5be000(0x119)]():homedir(),_0x21f91f=resolveConfigPath(_0x3335a6);return _0x21f91f??resolve(_0x3335a6,NEW_CONFIG_NAME);}
|
package/lib/context.d.ts
CHANGED
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33b860,_0x40f788){const _0x45d97a=a224_0x1896,_0x542ec3=_0x33b860();while(!![]){try{const _0x50f61e=-parseInt(_0x45d97a(0xff))/0x1*(-parseInt(_0x45d97a(0x103))/0x2)+parseInt(_0x45d97a(0x10e))/0x3+-parseInt(_0x45d97a(0x11c))/0x4+parseInt(_0x45d97a(0x11a))/0x5+parseInt(_0x45d97a(0x118))/0x6+-parseInt(_0x45d97a(0x110))/0x7*(parseInt(_0x45d97a(0x10a))/0x8)+-parseInt(_0x45d97a(0x10c))/0x9;if(_0x50f61e===_0x40f788)break;else _0x542ec3['push'](_0x542ec3['shift']());}catch(_0x44edee){_0x542ec3['push'](_0x542ec3['shift']());}}}(a224_0x3bf5,0x63c36));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';function a224_0x3bf5(){const _0x2f8228=['https://g.lovrabet.com/dist/lovrabet-skill','./constant/env.js','setLogPath','178GUlYqW','raw','defaultApp','join','length','env','object','8iAcsfU','trim','5203251RjImBs','./utils/is-non-interactive.js','232740JDpWCq','string','2189145bjTImf','find','argv','slice','apiDomain','cwd','runtimeDomain','entries','2385450NkNcQe','map','1700865kqGSLx','appcode','349884JOGXgn','filter','apps','globalConfig','userDomain','template_base_url','app','apiDir','api.ts','cookie','projectConfig','6423kbHpVl'];a224_0x3bf5=function(){return _0x2f8228;};return a224_0x3bf5();}export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x4f81da){return process.env[`RABETBASE_${_0x4f81da}`]||process.env[`LOVRABET_${_0x4f81da}`]||undefined;}function optionalString(_0x557a67){const _0x1a775d=a224_0x1896;return typeof _0x557a67===_0x1a775d(0x10f)&&_0x557a67[_0x1a775d(0x10b)]()?_0x557a67[_0x1a775d(0x10b)]():undefined;}export async function createContext(_0x152632){const _0x1fc9c3=a224_0x1896,{config:_0x2292c6,layers:_0x365896}=readRawConfigWithLayers(),_0x500414=buildConfig(_0x2292c6,_0x152632,_0x365896);await initGlobalEnvironment(_0x500414);const {getUserDomain:_0x3c115e,getApiDomain:_0x33b9a0}=await import('./constant/domain.js'),_0x509ad5={'apiDomain':_0x33b9a0(),'userDomain':_0x3c115e()},_0x5d286b=await buildAuth(_0x500414);logger[_0x1fc9c3(0x102)](process[_0x1fc9c3(0x115)]());const _0x32431f=(CLI_BIN_NAME+'\x20'+process[_0x1fc9c3(0x112)][_0x1fc9c3(0x113)](0x2)[_0x1fc9c3(0x106)]('\x20'))[_0x1fc9c3(0x10b)]();logger['setRawCommand'](_0x32431f);const {isNonInteractive:_0xb7117f}=await import(_0x1fc9c3(0x10d)),_0x1b24e4=_0xb7117f(_0x152632);return{'config':_0x500414,'auth':_0x5d286b,'logger':logger,'env':_0x509ad5,'nonInteractive':_0x1b24e4};}export function buildConfigFromFlags(_0xf568ff){const {config:_0x237a2b,layers:_0x59fb20}=readRawConfigWithLayers();return buildConfig(_0x237a2b,_0xf568ff,_0x59fb20);}export async function initGlobalEnvironment(_0x10b01b){const _0x2e5343=a224_0x1896,{initEnv:_0xbc1b53}=await import(_0x2e5343(0x101));_0xbc1b53(_0x10b01b[_0x2e5343(0x108)]);const {initDomains:_0x12afd4}=await import('./constant/domain.js');_0x12afd4({'apiDomain':optionalString(_0x10b01b[_0x2e5343(0x104)]?.[_0x2e5343(0x114)]),'userDomain':optionalString(_0x10b01b['raw']?.[_0x2e5343(0x120)]),'runtimeDomain':optionalString(_0x10b01b[_0x2e5343(0x104)]?.[_0x2e5343(0x116)])});}export function getConfigAppCode(_0x3b4d0d){const _0x49841e=a224_0x1896,_0x452d05=readRawConfig(_0x3b4d0d);if(_0x452d05[_0x49841e(0x11e)]&&typeof _0x452d05[_0x49841e(0x11e)]===_0x49841e(0x109)){const _0x52cfaf=_0x452d05[_0x49841e(0x105)];if(_0x52cfaf&&_0x452d05['apps'][_0x52cfaf]?.[_0x49841e(0x11b)])return String(_0x452d05[_0x49841e(0x11e)][_0x52cfaf][_0x49841e(0x11b)])['trim']();const _0x122417=Object['values'](_0x452d05[_0x49841e(0x11e)])[0x0];if(_0x122417?.[_0x49841e(0x11b)])return String(_0x122417[_0x49841e(0x11b)])['trim']();}const _0x3f3a1d=_0x452d05[_0x49841e(0x11b)]||_0x452d05[_0x49841e(0x122)];if(typeof _0x3f3a1d!=='string'||_0x3f3a1d[_0x49841e(0x10b)]()==='')return undefined;return _0x3f3a1d[_0x49841e(0x10b)]();}function a224_0x1896(_0x4ee192,_0x53f71e){_0x4ee192=_0x4ee192-0xfe;const _0x3bf559=a224_0x3bf5();let _0x189649=_0x3bf559[_0x4ee192];return _0x189649;}export function getMultiAppConfigs(_0x284852='project',_0x39d1ac){const _0x3d5e08=a224_0x1896,_0x3a61aa=loadRawConfigLayers(_0x39d1ac);let _0x5ded8e,_0x1e8b17;if(_0x284852==='merged'){const _0x410f4b=_0x3a61aa[_0x3d5e08(0x11f)][_0x3d5e08(0x11e)]&&typeof _0x3a61aa['globalConfig'][_0x3d5e08(0x11e)]==='object'?_0x3a61aa['globalConfig'][_0x3d5e08(0x11e)]:{},_0x3a42a6=_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]&&typeof _0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]===_0x3d5e08(0x109)?_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]:{};_0x5ded8e={..._0x410f4b,..._0x3a42a6};const _0x1b6f9e=readRawConfig(_0x39d1ac);_0x1e8b17=_0x1b6f9e[_0x3d5e08(0x105)];}else _0x5ded8e=_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)],_0x1e8b17=_0x3a61aa[_0x3d5e08(0xfe)]['defaultApp'];if(!_0x5ded8e||typeof _0x5ded8e!==_0x3d5e08(0x109)||Object['keys'](_0x5ded8e)[_0x3d5e08(0x107)]===0x0)return null;return Object['entries'](_0x5ded8e)[_0x3d5e08(0x119)](([_0x19ec02,_0x399355])=>({'name':_0x19ec02,'appcode':_0x399355?.[_0x3d5e08(0x11b)]||'','isDefault':_0x19ec02===_0x1e8b17,'env':_0x399355?.[_0x3d5e08(0x108)],'apiDir':_0x399355?.[_0x3d5e08(0x123)],'cookie':_0x399355?.[_0x3d5e08(0x125)]||undefined}))[_0x3d5e08(0x11d)](_0xe50af8=>_0xe50af8[_0x3d5e08(0x11b)]);}export function getTemplateBaseUrl(_0x566746){const _0x40f3b2=a224_0x1896,_0x273ec4=readRawConfig(_0x566746);if(_0x273ec4[_0x40f3b2(0x121)]&&typeof _0x273ec4[_0x40f3b2(0x121)]===_0x40f3b2(0x10f))return _0x273ec4['template_base_url']['replace'](/\/$/,'');return _0x40f3b2(0x100);}function buildConfig(_0x25fad1,_0x4fbcbf,_0x2a2f1a){return{...resolveAppConfig({'raw':_0x25fad1,'flags':_0x4fbcbf,'layers':_0x2a2f1a,'readEnv':env}),'raw':_0x25fad1};}export function resolveApiFilePath(_0x5662b5,_0x25644c){const _0x3f4e7f=a224_0x1896,_0x5b425c=resolve(process[_0x3f4e7f(0x115)](),_0x5662b5),_0x3a8fc3=resolve(_0x5b425c,_0x3f4e7f(0x124));if(!_0x25644c)return _0x3a8fc3;const _0x5e7ea4=readRawConfig(),_0x3573ca=_0x5e7ea4[_0x3f4e7f(0x11e)]&&typeof _0x5e7ea4[_0x3f4e7f(0x11e)]===_0x3f4e7f(0x109)?_0x5e7ea4[_0x3f4e7f(0x11e)]:{},_0x2dcb62=Object[_0x3f4e7f(0x117)](_0x3573ca)[_0x3f4e7f(0x111)](([,_0x1e3c16])=>_0x1e3c16?.[_0x3f4e7f(0x11b)]===_0x25644c);if(!_0x2dcb62)return _0x3a8fc3;const [_0x4baad7,_0x336f8a]=_0x2dcb62,_0xb5b265=typeof _0x5e7ea4['defaultApp']===_0x3f4e7f(0x10f)?_0x5e7ea4[_0x3f4e7f(0x105)]:undefined;if(_0x336f8a?.['apiDir'])return _0x3a8fc3;if(_0xb5b265&&_0x4baad7!==_0xb5b265)return resolve(_0x5b425c,_0x4baad7+'-api.ts');return _0x3a8fc3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x396a01,_0x1378ae){const _0x475051=a225_0xc6a6,_0x143b46=_0x396a01();while(!![]){try{const _0x48f0d5=parseInt(_0x475051(0xf6))/0x1+parseInt(_0x475051(0xfc))/0x2*(parseInt(_0x475051(0xf4))/0x3)+parseInt(_0x475051(0xff))/0x4*(parseInt(_0x475051(0xf1))/0x5)+parseInt(_0x475051(0xf8))/0x6*(-parseInt(_0x475051(0xef))/0x7)+parseInt(_0x475051(0xf3))/0x8+-parseInt(_0x475051(0x100))/0x9*(parseInt(_0x475051(0xfd))/0xa)+-parseInt(_0x475051(0xf7))/0xb*(parseInt(_0x475051(0xf2))/0xc);if(_0x48f0d5===_0x1378ae)break;else _0x143b46['push'](_0x143b46['shift']());}catch(_0xc1c7d){_0x143b46['push'](_0x143b46['shift']());}}}(a225_0x3847,0x208df));import{readFileSync,existsSync}from'node:fs';function a225_0x3847(){const _0x29ca4f=['36ZEBpak','get','399jNyGTR','alias','8430nXxXtY','12vSSDUB','450720QTqXKe','607080ReNxwY','push','126291IFvSEi','5105364bNPynK','3240dRNkkZ','set','has','cwd','2rIXUkd','57830caGjsQ','utf-8','632eYUkxt'];a225_0x3847=function(){return _0x29ca4f;};return a225_0x3847();}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x517cc2){const _0x2ff169=a225_0xc6a6,_0x57cb98=[],_0x429239=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4dd788;while((_0x4dd788=_0x429239['exec'](_0x517cc2))!==null){_0x57cb98[_0x2ff169(0xf5)]({'datasetCode':_0x4dd788[0x1],'tableName':_0x4dd788[0x2],'name':_0x4dd788[0x3],'alias':_0x4dd788[0x4]});}return _0x57cb98;}export function loadAliasMap(_0x3ee38f,_0x352c0e,_0x143bb3){const _0x32750a=a225_0xc6a6,_0x4c46a2=_0x143bb3??resolve(process[_0x32750a(0xfb)](),_0x3ee38f,'api.ts');if(cache[_0x32750a(0xfa)](_0x4c46a2))return cache[_0x32750a(0xee)](_0x4c46a2);if(!existsSync(_0x4c46a2))return cache['set'](_0x4c46a2,[]),[];try{const _0x1379a8=readFileSync(_0x4c46a2,_0x32750a(0xfe)),_0x8fb608=parseApiFile(_0x1379a8);return cache[_0x32750a(0xf9)](_0x4c46a2,_0x8fb608),_0x8fb608;}catch{return cache['set'](_0x4c46a2,[]),[];}}function a225_0xc6a6(_0x1f1550,_0x39a2a0){_0x1f1550=_0x1f1550-0xee;const _0x3847a3=a225_0x3847();let _0xc6a638=_0x3847a3[_0x1f1550];return _0xc6a638;}export function resolveAlias(_0x3cf8a9,_0x3e70b7,_0xf47bb6,_0x14e062){const _0x2f47d6=a225_0xc6a6;if(!_0x3e70b7)return undefined;const _0x4b93a9=loadAliasMap(_0x3cf8a9,_0xf47bb6,_0x14e062),_0x1716d4=_0x4b93a9['find'](_0x37d674=>_0x37d674[_0x2f47d6(0xf0)]===_0x3e70b7);return _0x1716d4?.['datasetCode'];}export function listAliases(_0x392ea4,_0x2aa417,_0x17f2c7){return loadAliasMap(_0x392ea4,_0x2aa417,_0x17f2c7);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -848,6 +848,7 @@ export interface DbLinkInfo {
|
|
|
848
848
|
latestAnalysisStatus?: string | null;
|
|
849
849
|
latestAnalysisTraceId?: string;
|
|
850
850
|
latestAnalysisSuccessTime?: string;
|
|
851
|
+
tableCount?: number;
|
|
851
852
|
[key: string]: unknown;
|
|
852
853
|
}
|
|
853
854
|
export interface DbTableInfo {
|
|
@@ -867,11 +868,15 @@ export interface DbTableDiffInfo {
|
|
|
867
868
|
}
|
|
868
869
|
export interface DbTableDiffResult {
|
|
869
870
|
totalCount: number;
|
|
870
|
-
physicalTableCount
|
|
871
|
-
datasetTableCount
|
|
871
|
+
physicalTableCount?: number;
|
|
872
|
+
datasetTableCount?: number;
|
|
872
873
|
summary?: string;
|
|
873
874
|
tableList: DbTableDiffInfo[];
|
|
874
875
|
}
|
|
876
|
+
export interface DbTableDiffRefreshStartResult {
|
|
877
|
+
traceId: string;
|
|
878
|
+
status?: string;
|
|
879
|
+
}
|
|
875
880
|
export interface DbAnalysisStatus {
|
|
876
881
|
status?: string | null;
|
|
877
882
|
inputParams?: string | null;
|
|
@@ -898,6 +903,16 @@ export interface NotificationChannelConfigItem {
|
|
|
898
903
|
updateTime?: string | null;
|
|
899
904
|
[key: string]: unknown;
|
|
900
905
|
}
|
|
906
|
+
export interface NotificationChannelConfigMutationInput {
|
|
907
|
+
appCode: string;
|
|
908
|
+
configName: string;
|
|
909
|
+
channelType: NotificationChannelType;
|
|
910
|
+
endpointUrl?: string | null;
|
|
911
|
+
channelConfig?: string | null;
|
|
912
|
+
description?: string | null;
|
|
913
|
+
connectTimeout?: number | null;
|
|
914
|
+
readTimeout?: number | null;
|
|
915
|
+
}
|
|
901
916
|
/**
|
|
902
917
|
* GET /notification/channel-config/list:查询当前应用的应用级通知渠道配置。
|
|
903
918
|
*
|
|
@@ -905,6 +920,12 @@ export interface NotificationChannelConfigItem {
|
|
|
905
920
|
* 只输出 configCode 和用于人工选择的描述字段。
|
|
906
921
|
*/
|
|
907
922
|
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|
|
923
|
+
export declare function getNotificationChannelConfig(id: number, appCode: string): Promise<NotificationChannelConfigItem>;
|
|
924
|
+
export declare function createNotificationChannelConfig(input: NotificationChannelConfigMutationInput): Promise<number>;
|
|
925
|
+
export declare function updateNotificationChannelConfig(input: NotificationChannelConfigMutationInput & {
|
|
926
|
+
id: number;
|
|
927
|
+
}): Promise<void>;
|
|
928
|
+
export declare function deleteNotificationChannelConfig(id: number, appCode: string): Promise<void>;
|
|
908
929
|
export interface AppConfigItem {
|
|
909
930
|
id?: number;
|
|
910
931
|
appCode: string;
|
|
@@ -963,6 +984,12 @@ export declare function getDbTableDiff(appCode: string, dbLinkId: number, opts?:
|
|
|
963
984
|
pageSize?: number;
|
|
964
985
|
tableName?: string;
|
|
965
986
|
}): Promise<DbTableDiffResult>;
|
|
987
|
+
export declare function getDbLiveTableDiff(appCode: string, dbLinkId: number, opts?: {
|
|
988
|
+
pageIndex?: number;
|
|
989
|
+
pageSize?: number;
|
|
990
|
+
tableName?: string;
|
|
991
|
+
}): Promise<DbTableDiffResult>;
|
|
992
|
+
export declare function startDbTableDiffRefresh(appCode: string, dbLinkId: number): Promise<DbTableDiffRefreshStartResult>;
|
|
966
993
|
export interface RemoteApp {
|
|
967
994
|
id?: number | string;
|
|
968
995
|
appCode: string;
|