@lovrabet/rabetbase-cli 2.4.3-beta.1 → 2.4.4-beta.1
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 +22 -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 +24 -2
- 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 a230_0xdee6(_0x350d35,_0x5ae046){_0x350d35=_0x350d35-0x7b;const _0x57b072=a230_0x57b0();let _0xdee61=_0x57b072[_0x350d35];return _0xdee61;}(function(_0x37335a,_0x2de8c6){const _0x37787b=a230_0xdee6,_0x5534bf=_0x37335a();while(!![]){try{const _0x3a9063=-parseInt(_0x37787b(0x84))/0x1+parseInt(_0x37787b(0xa7))/0x2*(parseInt(_0x37787b(0x7d))/0x3)+-parseInt(_0x37787b(0x7f))/0x4*(-parseInt(_0x37787b(0xa5))/0x5)+parseInt(_0x37787b(0x81))/0x6+-parseInt(_0x37787b(0xc0))/0x7+parseInt(_0x37787b(0xb2))/0x8+-parseInt(_0x37787b(0x93))/0x9*(parseInt(_0x37787b(0x86))/0xa);if(_0x3a9063===_0x2de8c6)break;else _0x5534bf['push'](_0x5534bf['shift']());}catch(_0x32ed9c){_0x5534bf['push'](_0x5534bf['shift']());}}}(a230_0x57b0,0x2906c));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x11b0ce,_0x1c0c81){const _0x3d543e=a230_0xdee6,_0x7dfba1=[],_0x1eef44=normalizeSqlForStaticAnalysis(_0x11b0ce),_0x2fbc8e=(_0x1eef44['error']?[]:extractJoinFacts(_0x1eef44[_0x3d543e(0xb6)]))['map'](_0x430bf4=>{const _0x388292=_0x3d543e;if(_0x430bf4[_0x388292(0xb5)]||_0x430bf4[_0x388292(0x83)][_0x388292(0x89)]===0x0)return _0x7dfba1[_0x388292(0xc7)]({'code':_0x388292(0x9d),'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'reason':_0x430bf4['unsupportedReason']??_0x388292(0xc8)}),{'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'status':'unavailable'};const _0x36feea=resolveTableMetadata(_0x1c0c81,_0x430bf4['table']),_0x349587=(_0x36feea?.[_0x388292(0xb8)]??[])[_0x388292(0xbf)](_0x49f324=>({'index':_0x49f324,'matchedPrefix':findEqualityPrefix(_0x49f324[_0x388292(0x83)],_0x430bf4[_0x388292(0x83)])}))[_0x388292(0xa3)](_0xf76818=>_0xf76818['matchedPrefix'][_0x388292(0x89)]>0x0),_0x1b4e5f=_0x349587['reduce']((_0x1ef49a,_0xd1c2cd)=>!_0x1ef49a||_0xd1c2cd[_0x388292(0xbd)]['length']>_0x1ef49a['matchedPrefix']['length']?_0xd1c2cd:_0x1ef49a,_0x349587[0x0]);if(_0x1b4e5f)return{'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'status':_0x388292(0x91),'matchedIndex':{..._0x1b4e5f[_0x388292(0xbe)],'matchedPrefix':_0x1b4e5f[_0x388292(0xbd)]}};const _0x538f28=_0x36feea?.[_0x388292(0xb8)][_0x388292(0xa3)](_0x453964=>_0x453964[_0x388292(0x83)][_0x388292(0xc9)](_0x36cec9=>_0x430bf4[_0x388292(0x83)][_0x388292(0xc9)](_0x435c4a=>columnNamesMatch(_0x36cec9,_0x435c4a))))??[];if(_0x538f28[_0x388292(0x89)]>0x0)return _0x7dfba1[_0x388292(0xc7)]({'code':_0x388292(0x82),'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4['alias'],'columns':_0x430bf4[_0x388292(0x83)],'reason':_0x388292(0xa0)}),{'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'status':'warning','candidateIndexes':_0x538f28};if(_0x36feea&&_0x36feea[_0x388292(0xbc)]!==![]&&_0x36feea['indexes'][_0x388292(0x89)]>0x0&&_0x430bf4[_0x388292(0x83)][_0x388292(0x89)]>0x0)return _0x7dfba1[_0x388292(0xc7)]({'code':_0x388292(0xa8),'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4['alias'],'columns':_0x430bf4['columns'],'reason':_0x388292(0xb9)}),{'table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4['columns'],'status':_0x388292(0xc1)};return _0x7dfba1[_0x388292(0xc7)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x430bf4[_0x388292(0xa6)],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'reason':_0x36feea?_0x388292(0xab):_0x388292(0xa9)}),{'table':_0x430bf4['table'],'alias':_0x430bf4[_0x388292(0xb3)],'columns':_0x430bf4[_0x388292(0x83)],'status':_0x388292(0x9c)};});return{'checked':_0x2fbc8e[_0x3d543e(0x89)]>0x0,'joins':_0x2fbc8e,'warnings':_0x7dfba1};}function extractJoinFacts(_0x1c6ce4){const _0x17b197=a230_0xdee6,_0x42d3a3=maskNestedQueries(stripSqlNoise(_0x1c6ce4)),_0x17ff4a=maskQuotedIdentifiers(_0x42d3a3),_0x4ebe78=[],_0x1a5f21=new Set(),_0x5952e1=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x3236e2 of _0x42d3a3[_0x17b197(0xa2)](_0x5952e1)){const _0x4afd01=_0x3236e2[_0x17b197(0xbe)]??0x0,_0x1932b0=_0x3236e2[0x0][_0x17b197(0x96)](/\bJOIN\b/i),_0x2fb38b=_0x4afd01+Math[_0x17b197(0x8d)](0x0,_0x1932b0);if(!/^JOIN\b/i[_0x17b197(0xc5)](_0x17ff4a[_0x17b197(0xb1)](_0x2fb38b)))continue;_0x1a5f21[_0x17b197(0x80)](_0x2fb38b);const _0x37a75a=normalizeIdentifier(_0x3236e2[0x1]||_0x17b197(0x9a)),_0x289a8a=normalizeIdentifier(_0x3236e2[0x2]??''),_0x39d7db=normalizeIdentifier(_0x3236e2[0x3]||_0x289a8a[_0x17b197(0xba)]('.')['at'](-0x1)||_0x289a8a),_0x45ab31=[],_0x6ac16f=_0x289a8a===_0x17b197(0x9e);let _0x20fc92=_0x37a75a===_0x17b197(0xbb)||_0x37a75a===_0x17b197(0x7e)||_0x6ac16f,_0x5e0eb1=_0x20fc92?_0x6ac16f?_0x17b197(0x85):_0x37a75a[_0x17b197(0xb7)]()+_0x17b197(0x8b):undefined;const _0xb59d2c=stripOuterParentheses(_0x3236e2[0x4]??''),_0x5df194=_0xb59d2c['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0xb59d2c[_0x17b197(0x95)](MYBATIS_DYNAMIC_END_MARKER),_0x229f88=_0xb59d2c[_0x17b197(0x95)](MYBATIS_INCLUDE_MARKER);_0x5df194&&(_0x20fc92=!![],_0x5e0eb1??=_0x17b197(0xc3));_0x229f88&&(_0x20fc92=!![],_0x5e0eb1??=_0x17b197(0x98));const _0x205156=_0xb59d2c[_0x17b197(0x87)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x17b197(0x87)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x205156,'OR')&&(_0x20fc92=!![],_0x5e0eb1??=_0x17b197(0x88));for(const _0x11477f of splitTopLevelAnd(_0x205156)){const _0x1ddf3c=stripOuterParentheses(_0x11477f);if(hasTopLevelKeyword(_0x1ddf3c,'OR')){_0x20fc92=!![],_0x5e0eb1??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0xd1bc5c=splitEquality(_0x1ddf3c);if(!_0xd1bc5c){containsColumnReference(_0x11477f,_0x39d7db)&&(_0x20fc92=!![]);continue;}const _0x5c3fc7=parseDirectColumnReference(_0xd1bc5c[0x0],_0x39d7db),_0x1ef7c8=parseDirectColumnReference(_0xd1bc5c[0x1],_0x39d7db),_0x587276=containsColumnReference(_0xd1bc5c[0x0],_0x39d7db),_0x336ede=containsColumnReference(_0xd1bc5c[0x1],_0x39d7db),_0x2818c5=_0x5c3fc7&&!_0x336ede?_0x5c3fc7:_0x1ef7c8&&!_0x587276?_0x1ef7c8:null;if(_0x2818c5&&!_0x45ab31[_0x17b197(0x95)](_0x2818c5))_0x45ab31['push'](_0x2818c5);else!_0x2818c5&&containsColumnReference(_0x11477f,_0x39d7db)&&(_0x20fc92=!![]);}_0x4ebe78[_0x17b197(0xc7)]({'table':_0x289a8a,'alias':_0x39d7db,'columns':_0x45ab31,'unsupportedPredicate':_0x20fc92,'unsupportedReason':_0x5e0eb1,'containsUnresolvedInclude':_0x229f88,'position':_0x2fb38b});}for(const _0x271efb of _0x17ff4a['matchAll'](/\bJOIN\b/gi)){const _0xc9a1b=_0x271efb[_0x17b197(0xbe)]??0x0;if(_0x1a5f21['has'](_0xc9a1b))continue;const _0x105d62=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x17b197(0xa1)](_0x42d3a3[_0x17b197(0xb1)](_0xc9a1b+_0x271efb[0x0]['length'])),_0x5642a0=normalizeIdentifier(_0x105d62?.[0x1]||'unknown'),_0x36fc03=normalizeIdentifier(_0x105d62?.[0x2]||''),_0x37d417=isSqlClauseKeyword(_0x36fc03)?_0x5642a0['split']('.')['at'](-0x1)||_0x5642a0:_0x36fc03||_0x5642a0[_0x17b197(0xba)]('.')['at'](-0x1)||_0x5642a0;_0x4ebe78['push']({'table':_0x5642a0,'alias':_0x37d417,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x17b197(0x7b),'position':_0xc9a1b});}const _0x4772bd=_0x17ff4a[_0x17b197(0xc2)](MYBATIS_INCLUDE_MARKER);return _0x4772bd>=0x0&&!_0x4ebe78[_0x17b197(0xc9)](_0x17d7b9=>_0x17d7b9[_0x17b197(0x8f)])&&_0x4ebe78[_0x17b197(0xc7)]({'table':_0x17b197(0xb4),'alias':_0x17b197(0xb4),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x17b197(0x8a),'containsUnresolvedInclude':!![],'position':_0x4772bd}),_0x4ebe78[_0x17b197(0x99)]((_0x39740c,_0x31f6e2)=>_0x39740c[_0x17b197(0xa4)]-_0x31f6e2[_0x17b197(0xa4)]);}function stripSqlNoise(_0x19f46c){const _0x378f20=a230_0xdee6,_0x20054b=Array[_0x378f20(0x9f)](_0x19f46c),_0x2c44df=(_0x262853,_0x527a32)=>{for(let _0x55fb51=_0x262853;_0x55fb51<_0x527a32;_0x55fb51+=0x1){_0x20054b[_0x55fb51]!=='\x0a'&&_0x20054b[_0x55fb51]!=='\x0d'&&(_0x20054b[_0x55fb51]='\x20');}};for(let _0x402f81=0x0;_0x402f81<_0x20054b[_0x378f20(0x89)];_0x402f81+=0x1){const _0x2d8d92=_0x20054b[_0x402f81],_0x24a7bd=_0x20054b[_0x402f81+0x1];if(_0x2d8d92==='\x27'||_0x2d8d92==='\x22'||_0x2d8d92==='`'){const _0xa21c1e=_0x2d8d92,_0x56ae6c=_0x402f81;_0x402f81+=0x1;while(_0x402f81<_0x20054b[_0x378f20(0x89)]){if(_0x20054b[_0x402f81]==='\x5c'&&_0x402f81+0x1<_0x20054b['length']){_0x402f81+=0x2;continue;}if(_0x20054b[_0x402f81]!==_0xa21c1e){_0x402f81+=0x1;continue;}if(_0x20054b[_0x402f81+0x1]===_0xa21c1e){_0x402f81+=0x2;continue;}break;}if(_0xa21c1e==='\x27')_0x2c44df(_0x56ae6c,Math[_0x378f20(0xc4)](_0x402f81+0x1,_0x20054b[_0x378f20(0x89)]));continue;}if(_0x2d8d92==='-'&&_0x24a7bd==='-'){const _0x680021=_0x402f81;while(_0x402f81<_0x20054b['length']&&_0x20054b[_0x402f81]!=='\x0a')_0x402f81+=0x1;_0x2c44df(_0x680021,_0x402f81);continue;}if(_0x2d8d92==='/'&&_0x24a7bd==='*'){const _0x3e7bfe=_0x402f81;_0x402f81+=0x2;while(_0x402f81<_0x20054b[_0x378f20(0x89)]&&!(_0x20054b[_0x402f81]==='*'&&_0x20054b[_0x402f81+0x1]==='/')){_0x402f81+=0x1;}_0x402f81=Math[_0x378f20(0xc4)](_0x402f81+0x1,_0x20054b[_0x378f20(0x89)]-0x1),_0x2c44df(_0x3e7bfe,_0x402f81+0x1);continue;}if(_0x2d8d92==='#'&&_0x24a7bd!=='{'){const _0x3c97f5=_0x402f81;while(_0x402f81<_0x20054b[_0x378f20(0x89)]&&_0x20054b[_0x402f81]!=='\x0a')_0x402f81+=0x1;_0x2c44df(_0x3c97f5,_0x402f81);continue;}if((_0x2d8d92==='#'||_0x2d8d92==='$')&&_0x24a7bd==='{'){const _0x36049b=_0x402f81;_0x402f81+=0x2;while(_0x402f81<_0x20054b[_0x378f20(0x89)]&&_0x20054b[_0x402f81]!=='}')_0x402f81+=0x1;_0x2c44df(_0x36049b,Math[_0x378f20(0xc4)](_0x402f81+0x1,_0x20054b['length']));}}return _0x20054b['join']('');}function maskQuotedIdentifiers(_0x19e478){const _0x5156eb=a230_0xdee6,_0x1f6b80=Array[_0x5156eb(0x9f)](_0x19e478);for(let _0x57e2e5=0x0;_0x57e2e5<_0x1f6b80['length'];_0x57e2e5+=0x1){const _0x21b37c=_0x1f6b80[_0x57e2e5];if(_0x21b37c!=='\x22'&&_0x21b37c!=='`')continue;_0x57e2e5+=0x1;while(_0x57e2e5<_0x1f6b80[_0x5156eb(0x89)]){if(_0x1f6b80[_0x57e2e5]===_0x21b37c){if(_0x1f6b80[_0x57e2e5+0x1]===_0x21b37c){_0x1f6b80[_0x57e2e5]='\x20',_0x1f6b80[_0x57e2e5+0x1]='\x20',_0x57e2e5+=0x2;continue;}break;}_0x1f6b80[_0x57e2e5]='\x20',_0x57e2e5+=0x1;}}return _0x1f6b80['join']('');}function maskNestedQueries(_0x3b02e6){const _0x1d733f=a230_0xdee6,_0x594b2c=Array[_0x1d733f(0x9f)](_0x3b02e6);for(let _0x239398=0x0;_0x239398<_0x594b2c[_0x1d733f(0x89)];_0x239398+=0x1){if(_0x594b2c[_0x239398]!=='(')continue;const _0x283dcd=_0x3b02e6[_0x1d733f(0xb1)](_0x239398+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x1d733f(0xc5)](_0x283dcd))continue;let _0x454c59=0x1,_0x19a196=_0x239398+0x1;for(;_0x19a196<_0x594b2c[_0x1d733f(0x89)]&&_0x454c59>0x0;_0x19a196+=0x1){if(_0x594b2c[_0x19a196]==='(')_0x454c59+=0x1;if(_0x594b2c[_0x19a196]===')')_0x454c59-=0x1;}if(_0x454c59!==0x0)continue;for(let _0x8b8415=_0x239398;_0x8b8415<_0x19a196;_0x8b8415+=0x1){_0x594b2c[_0x8b8415]='\x20';}const _0x4608d4=_0x1d733f(0x9e);for(let _0x1e1037=0x0;_0x1e1037<_0x4608d4['length']&&_0x239398+_0x1e1037<_0x19a196;_0x1e1037+=0x1){_0x594b2c[_0x239398+_0x1e1037]=_0x4608d4[_0x1e1037];}_0x239398=_0x19a196-0x1;}return _0x594b2c['join']('');}function splitTopLevelAnd(_0x16ab7c){const _0x21ff02=a230_0xdee6,_0x5d8125=[];let _0x49e225=0x0,_0x501df3=0x0;for(let _0x56d5b9=0x0;_0x56d5b9<_0x16ab7c['length'];_0x56d5b9+=0x1){const _0x160701=_0x16ab7c[_0x56d5b9];if(_0x160701==='(')_0x49e225+=0x1;if(_0x160701===')')_0x49e225=Math[_0x21ff02(0x8d)](0x0,_0x49e225-0x1);_0x49e225===0x0&&_0x16ab7c['slice'](_0x56d5b9)[_0x21ff02(0xaf)](/^AND\b/i)&&(_0x56d5b9===0x0||/\s/[_0x21ff02(0xc5)](_0x16ab7c[_0x56d5b9-0x1]??''))&&(_0x5d8125[_0x21ff02(0xc7)](_0x16ab7c['slice'](_0x501df3,_0x56d5b9)[_0x21ff02(0xaa)]()),_0x56d5b9+=0x2,_0x501df3=_0x56d5b9+0x1);}const _0x3c7d49=_0x16ab7c[_0x21ff02(0xb1)](_0x501df3)[_0x21ff02(0xaa)]();if(_0x3c7d49)_0x5d8125[_0x21ff02(0xc7)](_0x3c7d49);return _0x5d8125;}function hasTopLevelKeyword(_0x485e82,_0x1c654e){const _0x3bb115=a230_0xdee6;let _0x4d642e=0x0;for(let _0x56dfd8=0x0;_0x56dfd8<_0x485e82[_0x3bb115(0x89)];_0x56dfd8+=0x1){const _0x4d85ea=_0x485e82[_0x56dfd8];if(_0x4d85ea==='(')_0x4d642e+=0x1;if(_0x4d85ea===')')_0x4d642e=Math['max'](0x0,_0x4d642e-0x1);if(_0x4d642e!==0x0)continue;const _0x6ce8ec=_0x485e82[_0x3bb115(0xb1)](_0x56dfd8,_0x56dfd8+_0x1c654e[_0x3bb115(0x89)]),_0x5016a8=_0x485e82[_0x56dfd8-0x1]??'\x20',_0x5ea524=_0x485e82[_0x56dfd8+_0x1c654e['length']]??'\x20';if(_0x6ce8ec[_0x3bb115(0xb7)]()===_0x1c654e['toUpperCase']()&&!/[\w$]/[_0x3bb115(0xc5)](_0x5016a8)&&!/[\w$]/['test'](_0x5ea524))return!![];}return![];}function a230_0x57b0(){const _0x30ba0b=['686322hJWklh','warning','indexOf','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','min','test','endsWith','push','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','some','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','where','12bCeAau','full','4EzCNlH','add','1489020xSpQVo','JOIN_INDEX_NOT_USABLE','columns','142550qgfqGI','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','460110pujbnt','replaceAll','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','length','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','has','max','replace','containsUnresolvedInclude','natural','covered','inner','36MsYPyl','(?:^|[^\x5cw$])','includes','search','\x5cs*\x5c.\x5cs*[\x5cw$]+','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','sort','INNER','using','unavailable','JOIN_PREDICATE_UNSUPPORTED','__sq__','from','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','exec','matchAll','filter','position','953620stzjFc','table','62630NJgZHl','JOIN_INDEX_MISSING','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','trim','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','\x5c$&','left','cross','match','startsWith','slice','228240iXdDFH','alias','unknown','unsupportedPredicate','sql','toUpperCase','indexes','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','split','right','metadataAvailable','matchedPrefix','index','map'];a230_0x57b0=function(){return _0x30ba0b;};return a230_0x57b0();}function splitEquality(_0x499d2a){const _0x530604=a230_0xdee6,_0x64bf90=stripOuterParentheses(_0x499d2a);let _0x628ada=0x0,_0x5ec9b3;for(let _0x5a0b13=0x0;_0x5a0b13<_0x64bf90['length'];_0x5a0b13+=0x1){const _0x2aec83=_0x64bf90[_0x5a0b13];if(_0x2aec83==='(')_0x628ada+=0x1;if(_0x2aec83===')')_0x628ada=Math[_0x530604(0x8d)](0x0,_0x628ada-0x1);const _0x45feb3=_0x64bf90[_0x5a0b13-0x1]??'',_0x13dc9a=_0x64bf90[_0x5a0b13+0x1]??'';if(_0x2aec83==='='&&_0x628ada===0x0&&!/[!<>=:]/[_0x530604(0xc5)](_0x45feb3)&&_0x13dc9a!=='='){if(_0x5ec9b3!==undefined)return null;_0x5ec9b3=_0x5a0b13;}}return _0x5ec9b3===undefined?null:[_0x64bf90[_0x530604(0xb1)](0x0,_0x5ec9b3)['trim'](),_0x64bf90[_0x530604(0xb1)](_0x5ec9b3+0x1)['trim']()];}function parseDirectColumnReference(_0xf65649,_0x38eecc){const _0xc926a=a230_0xdee6,_0x150068=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0xc926a(0xa1)](stripOuterParentheses(_0xf65649));if(!_0x150068)return null;if(normalizeIdentifier(_0x150068[0x1]??'')!==normalizeIdentifier(_0x38eecc))return null;return normalizeIdentifier(_0x150068[0x2]??'');}function containsColumnReference(_0x55ad94,_0x4b4dc){const _0x135edf=a230_0xdee6,_0x1af779=_0x55ad94[_0x135edf(0x8e)](/[`"]/g,''),_0x5e4c18=_0x4b4dc[_0x135edf(0x8e)](/[.*+?^${}()|[\]\\]/g,_0x135edf(0xac));return new RegExp(_0x135edf(0x94)+_0x5e4c18+_0x135edf(0x97),'i')[_0x135edf(0xc5)](_0x1af779);}function findEqualityPrefix(_0x44d5f3,_0x8314b7){const _0x406425=a230_0xdee6,_0x32a25d=new Set(_0x8314b7[_0x406425(0xbf)](normalizeIdentifier)),_0x495ac0=[];for(const _0x4e00b0 of _0x44d5f3){if(!_0x32a25d[_0x406425(0x8c)](normalizeIdentifier(_0x4e00b0)))break;_0x495ac0[_0x406425(0xc7)](_0x4e00b0);}return _0x495ac0;}function resolveTableMetadata(_0x488c4e,_0x27848b){const _0x245f31=a230_0xdee6,_0x30a728=normalizeIdentifier(_0x27848b),_0x462612=_0x488c4e[_0x245f31(0xa3)](_0x32a9a9=>normalizeIdentifier(_0x32a9a9['tableName'])===_0x30a728);if(_0x462612[_0x245f31(0x89)]===0x1)return _0x462612[0x0];const _0x42a7ad=_0x30a728[_0x245f31(0x95)]('.'),_0xcd747d=_0x30a728[_0x245f31(0xba)]('.')['at'](-0x1),_0x34529b=_0x488c4e[_0x245f31(0xa3)](_0x377288=>{const _0x4c139c=_0x245f31,_0x318530=normalizeIdentifier(_0x377288['tableName']);if(_0x42a7ad&&_0x318530[_0x4c139c(0x95)]('.'))return![];return _0x318530[_0x4c139c(0xba)]('.')['at'](-0x1)===_0xcd747d;});return _0x34529b['length']===0x1?_0x34529b[0x0]:undefined;}function columnNamesMatch(_0x3c6fbe,_0x1f5a26){return normalizeIdentifier(_0x3c6fbe)===normalizeIdentifier(_0x1f5a26);}function normalizeIdentifier(_0x1582dd){const _0x4782eb=a230_0xdee6;return _0x1582dd[_0x4782eb(0x8e)](/[`"]/g,'')[_0x4782eb(0xaa)]()['toLowerCase']();}function isSqlClauseKeyword(_0x265553){const _0xe6fd77=a230_0xdee6;return new Set(['on',_0xe6fd77(0x9b),_0xe6fd77(0x7c),'join',_0xe6fd77(0x92),_0xe6fd77(0xad),'right','full',_0xe6fd77(0xae),_0xe6fd77(0x90)])[_0xe6fd77(0x8c)](_0x265553);}function stripOuterParentheses(_0x1afe78){const _0x22e23a=a230_0xdee6;let _0xf2d271=_0x1afe78[_0x22e23a(0xaa)]();while(_0xf2d271[_0x22e23a(0xb0)]('(')&&_0xf2d271[_0x22e23a(0xc6)](')')){let _0x413eaa=0x0,_0x599788=!![];for(let _0x3167fd=0x0;_0x3167fd<_0xf2d271['length'];_0x3167fd+=0x1){if(_0xf2d271[_0x3167fd]==='(')_0x413eaa+=0x1;if(_0xf2d271[_0x3167fd]===')')_0x413eaa-=0x1;if(_0x413eaa===0x0&&_0x3167fd<_0xf2d271['length']-0x1){_0x599788=![];break;}}if(!_0x599788||_0x413eaa!==0x0)break;_0xf2d271=_0xf2d271['slice'](0x1,-0x1)[_0x22e23a(0xaa)]();}return _0xf2d271;}
|
|
1
|
+
(function(_0x3ea064,_0x4f8425){const _0x3ef49a=a238_0x2169,_0x469745=_0x3ea064();while(!![]){try{const _0xa8a03d=parseInt(_0x3ef49a(0xb3))/0x1+parseInt(_0x3ef49a(0xd4))/0x2+-parseInt(_0x3ef49a(0xaa))/0x3*(parseInt(_0x3ef49a(0xbf))/0x4)+-parseInt(_0x3ef49a(0xce))/0x5+parseInt(_0x3ef49a(0xd7))/0x6*(-parseInt(_0x3ef49a(0xd6))/0x7)+-parseInt(_0x3ef49a(0xbe))/0x8+parseInt(_0x3ef49a(0xc9))/0x9;if(_0xa8a03d===_0x4f8425)break;else _0x469745['push'](_0x469745['shift']());}catch(_0x3309e1){_0x469745['push'](_0x469745['shift']());}}}(a238_0x2a33,0x39e31));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x53d590,_0x24d1b3){const _0x4b0849=a238_0x2169,_0x27dd1f=[],_0x32327c=normalizeSqlForStaticAnalysis(_0x53d590),_0x4f8526=(_0x32327c[_0x4b0849(0xd8)]?[]:extractJoinFacts(_0x32327c[_0x4b0849(0xa8)]))[_0x4b0849(0x99)](_0x1e5cc6=>{const _0x2400ea=_0x4b0849;if(_0x1e5cc6['unsupportedPredicate']||_0x1e5cc6[_0x2400ea(0xca)]['length']===0x0)return _0x27dd1f[_0x2400ea(0xc5)]({'code':_0x2400ea(0xc2),'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6['alias'],'columns':_0x1e5cc6[_0x2400ea(0xca)],'reason':_0x1e5cc6[_0x2400ea(0xb2)]??_0x2400ea(0x9a)}),{'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6[_0x2400ea(0xca)],'status':'unavailable'};const _0x226b1d=resolveTableMetadata(_0x24d1b3,_0x1e5cc6[_0x2400ea(0xc1)]),_0x37e944=(_0x226b1d?.['indexes']??[])['map'](_0x24b91a=>({'index':_0x24b91a,'matchedPrefix':findEqualityPrefix(_0x24b91a[_0x2400ea(0xca)],_0x1e5cc6[_0x2400ea(0xca)])}))[_0x2400ea(0xab)](_0x34c433=>_0x34c433[_0x2400ea(0xc0)][_0x2400ea(0xd3)]>0x0),_0x530e0e=_0x37e944['reduce']((_0x35e4e0,_0x29ff64)=>!_0x35e4e0||_0x29ff64[_0x2400ea(0xc0)][_0x2400ea(0xd3)]>_0x35e4e0[_0x2400ea(0xc0)][_0x2400ea(0xd3)]?_0x29ff64:_0x35e4e0,_0x37e944[0x0]);if(_0x530e0e)return{'table':_0x1e5cc6['table'],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6['columns'],'status':'covered','matchedIndex':{..._0x530e0e[_0x2400ea(0x9f)],'matchedPrefix':_0x530e0e['matchedPrefix']}};const _0x1e4cc2=_0x226b1d?.[_0x2400ea(0xbd)][_0x2400ea(0xab)](_0x4e8e92=>_0x4e8e92[_0x2400ea(0xca)]['some'](_0xfae7b4=>_0x1e5cc6[_0x2400ea(0xca)][_0x2400ea(0xd2)](_0x2902e8=>columnNamesMatch(_0xfae7b4,_0x2902e8))))??[];if(_0x1e4cc2[_0x2400ea(0xd3)]>0x0)return _0x27dd1f['push']({'code':_0x2400ea(0xa1),'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6[_0x2400ea(0xca)],'reason':_0x2400ea(0xb5)}),{'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6['alias'],'columns':_0x1e5cc6[_0x2400ea(0xca)],'status':_0x2400ea(0xcc),'candidateIndexes':_0x1e4cc2};if(_0x226b1d&&_0x226b1d[_0x2400ea(0x9b)]!==![]&&_0x226b1d[_0x2400ea(0xbd)][_0x2400ea(0xd3)]>0x0&&_0x1e5cc6[_0x2400ea(0xca)][_0x2400ea(0xd3)]>0x0)return _0x27dd1f[_0x2400ea(0xc5)]({'code':'JOIN_INDEX_MISSING','table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6['columns'],'reason':_0x2400ea(0xb4)}),{'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6[_0x2400ea(0xca)],'status':_0x2400ea(0xcc)};return _0x27dd1f['push']({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x1e5cc6['table'],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6[_0x2400ea(0xca)],'reason':_0x226b1d?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x1e5cc6[_0x2400ea(0xc1)],'alias':_0x1e5cc6[_0x2400ea(0x98)],'columns':_0x1e5cc6[_0x2400ea(0xca)],'status':_0x2400ea(0xba)};});return{'checked':_0x4f8526['length']>0x0,'joins':_0x4f8526,'warnings':_0x27dd1f};}function a238_0x2a33(){const _0x3a8bbd=['slice','warning','containsUnresolvedInclude','1934130OIAhGR','inner','cross','max','some','length','540978kqdmhk','sort','1233715BQLLku','12wkXhqR','error','test','full','alias','map','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','metadataAvailable','right','search','unknown','index','tableName','JOIN_INDEX_NOT_USABLE','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','__sq__','trim','matchAll','min','replaceAll','sql','includes','1668ZjNrMe','filter','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','split','position','(?:^|[^\x5cw$])','replace','endsWith','unsupportedReason','148633eHGqdh','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','has','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','indexOf','startsWith','unavailable','join','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','indexes','798584zurCvq','280MOhRbC','matchedPrefix','table','JOIN_PREDICATE_UNSUPPORTED','toLowerCase','exec','push','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','toUpperCase','match','6264378hoHHKm','columns'];a238_0x2a33=function(){return _0x3a8bbd;};return a238_0x2a33();}function extractJoinFacts(_0x1f6326){const _0x4ec1ab=a238_0x2169,_0x4413a9=maskNestedQueries(stripSqlNoise(_0x1f6326)),_0x4b565a=maskQuotedIdentifiers(_0x4413a9),_0x278634=[],_0x21a670=new Set(),_0x2217d3=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x2c9b03 of _0x4413a9[_0x4ec1ab(0xa5)](_0x2217d3)){const _0x29129b=_0x2c9b03[_0x4ec1ab(0x9f)]??0x0,_0x300590=_0x2c9b03[0x0][_0x4ec1ab(0x9d)](/\bJOIN\b/i),_0x22ca36=_0x29129b+Math[_0x4ec1ab(0xd1)](0x0,_0x300590);if(!/^JOIN\b/i[_0x4ec1ab(0xd9)](_0x4b565a[_0x4ec1ab(0xcb)](_0x22ca36)))continue;_0x21a670['add'](_0x22ca36);const _0x3527cd=normalizeIdentifier(_0x2c9b03[0x1]||'INNER'),_0x53274d=normalizeIdentifier(_0x2c9b03[0x2]??''),_0x7c3cc6=normalizeIdentifier(_0x2c9b03[0x3]||_0x53274d[_0x4ec1ab(0xad)]('.')['at'](-0x1)||_0x53274d),_0x1d85d5=[],_0xfe0296=_0x53274d===_0x4ec1ab(0xa3);let _0xcd50bc=_0x3527cd===_0x4ec1ab(0x9c)||_0x3527cd===_0x4ec1ab(0xda)||_0xfe0296,_0x189091=_0xcd50bc?_0xfe0296?_0x4ec1ab(0xa2):_0x3527cd[_0x4ec1ab(0xc7)]()+_0x4ec1ab(0xb7):undefined;const _0x9cfdc7=stripOuterParentheses(_0x2c9b03[0x4]??''),_0x408161=_0x9cfdc7[_0x4ec1ab(0xa9)](MYBATIS_DYNAMIC_START_MARKER)||_0x9cfdc7[_0x4ec1ab(0xa9)](MYBATIS_DYNAMIC_END_MARKER),_0x1d02cd=_0x9cfdc7[_0x4ec1ab(0xa9)](MYBATIS_INCLUDE_MARKER);_0x408161&&(_0xcd50bc=!![],_0x189091??=_0x4ec1ab(0xbc));_0x1d02cd&&(_0xcd50bc=!![],_0x189091??=_0x4ec1ab(0xac));const _0x1fc48d=_0x9cfdc7[_0x4ec1ab(0xa7)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x4ec1ab(0xa7)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x1fc48d,'OR')&&(_0xcd50bc=!![],_0x189091??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x4a8b4 of splitTopLevelAnd(_0x1fc48d)){const _0x5c1db8=stripOuterParentheses(_0x4a8b4);if(hasTopLevelKeyword(_0x5c1db8,'OR')){_0xcd50bc=!![],_0x189091??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x25261a=splitEquality(_0x5c1db8);if(!_0x25261a){containsColumnReference(_0x4a8b4,_0x7c3cc6)&&(_0xcd50bc=!![]);continue;}const _0x1728dc=parseDirectColumnReference(_0x25261a[0x0],_0x7c3cc6),_0x4631a8=parseDirectColumnReference(_0x25261a[0x1],_0x7c3cc6),_0x4c26ef=containsColumnReference(_0x25261a[0x0],_0x7c3cc6),_0x4e079e=containsColumnReference(_0x25261a[0x1],_0x7c3cc6),_0x175136=_0x1728dc&&!_0x4e079e?_0x1728dc:_0x4631a8&&!_0x4c26ef?_0x4631a8:null;if(_0x175136&&!_0x1d85d5['includes'](_0x175136))_0x1d85d5[_0x4ec1ab(0xc5)](_0x175136);else!_0x175136&&containsColumnReference(_0x4a8b4,_0x7c3cc6)&&(_0xcd50bc=!![]);}_0x278634[_0x4ec1ab(0xc5)]({'table':_0x53274d,'alias':_0x7c3cc6,'columns':_0x1d85d5,'unsupportedPredicate':_0xcd50bc,'unsupportedReason':_0x189091,'containsUnresolvedInclude':_0x1d02cd,'position':_0x22ca36});}for(const _0x5cad2a of _0x4b565a[_0x4ec1ab(0xa5)](/\bJOIN\b/gi)){const _0x1d3c00=_0x5cad2a[_0x4ec1ab(0x9f)]??0x0;if(_0x21a670[_0x4ec1ab(0xb6)](_0x1d3c00))continue;const _0x1d509f=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x4ec1ab(0xc4)](_0x4413a9['slice'](_0x1d3c00+_0x5cad2a[0x0][_0x4ec1ab(0xd3)])),_0x283327=normalizeIdentifier(_0x1d509f?.[0x1]||_0x4ec1ab(0x9e)),_0x43133f=normalizeIdentifier(_0x1d509f?.[0x2]||''),_0x47750c=isSqlClauseKeyword(_0x43133f)?_0x283327['split']('.')['at'](-0x1)||_0x283327:_0x43133f||_0x283327[_0x4ec1ab(0xad)]('.')['at'](-0x1)||_0x283327;_0x278634[_0x4ec1ab(0xc5)]({'table':_0x283327,'alias':_0x47750c,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x4ec1ab(0xc6),'position':_0x1d3c00});}const _0x23c12f=_0x4b565a[_0x4ec1ab(0xb8)](MYBATIS_INCLUDE_MARKER);return _0x23c12f>=0x0&&!_0x278634[_0x4ec1ab(0xd2)](_0x47e7a5=>_0x47e7a5[_0x4ec1ab(0xcd)])&&_0x278634[_0x4ec1ab(0xc5)]({'table':'unknown','alias':_0x4ec1ab(0x9e),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x23c12f}),_0x278634[_0x4ec1ab(0xd5)]((_0x19b34c,_0x1beb8b)=>_0x19b34c[_0x4ec1ab(0xae)]-_0x1beb8b[_0x4ec1ab(0xae)]);}function a238_0x2169(_0x5555c9,_0x3d2174){_0x5555c9=_0x5555c9-0x98;const _0x2a33a5=a238_0x2a33();let _0x2169f6=_0x2a33a5[_0x5555c9];return _0x2169f6;}function stripSqlNoise(_0x151241){const _0x56f131=a238_0x2169,_0x69cbda=Array['from'](_0x151241),_0x4ff56b=(_0x2de271,_0x4e36c9)=>{for(let _0x3acdd1=_0x2de271;_0x3acdd1<_0x4e36c9;_0x3acdd1+=0x1){_0x69cbda[_0x3acdd1]!=='\x0a'&&_0x69cbda[_0x3acdd1]!=='\x0d'&&(_0x69cbda[_0x3acdd1]='\x20');}};for(let _0x589de9=0x0;_0x589de9<_0x69cbda[_0x56f131(0xd3)];_0x589de9+=0x1){const _0x55ffc5=_0x69cbda[_0x589de9],_0x4db37e=_0x69cbda[_0x589de9+0x1];if(_0x55ffc5==='\x27'||_0x55ffc5==='\x22'||_0x55ffc5==='`'){const _0x498a4e=_0x55ffc5,_0x291b38=_0x589de9;_0x589de9+=0x1;while(_0x589de9<_0x69cbda[_0x56f131(0xd3)]){if(_0x69cbda[_0x589de9]==='\x5c'&&_0x589de9+0x1<_0x69cbda[_0x56f131(0xd3)]){_0x589de9+=0x2;continue;}if(_0x69cbda[_0x589de9]!==_0x498a4e){_0x589de9+=0x1;continue;}if(_0x69cbda[_0x589de9+0x1]===_0x498a4e){_0x589de9+=0x2;continue;}break;}if(_0x498a4e==='\x27')_0x4ff56b(_0x291b38,Math[_0x56f131(0xa6)](_0x589de9+0x1,_0x69cbda[_0x56f131(0xd3)]));continue;}if(_0x55ffc5==='-'&&_0x4db37e==='-'){const _0x4fb78f=_0x589de9;while(_0x589de9<_0x69cbda[_0x56f131(0xd3)]&&_0x69cbda[_0x589de9]!=='\x0a')_0x589de9+=0x1;_0x4ff56b(_0x4fb78f,_0x589de9);continue;}if(_0x55ffc5==='/'&&_0x4db37e==='*'){const _0x47178f=_0x589de9;_0x589de9+=0x2;while(_0x589de9<_0x69cbda['length']&&!(_0x69cbda[_0x589de9]==='*'&&_0x69cbda[_0x589de9+0x1]==='/')){_0x589de9+=0x1;}_0x589de9=Math['min'](_0x589de9+0x1,_0x69cbda[_0x56f131(0xd3)]-0x1),_0x4ff56b(_0x47178f,_0x589de9+0x1);continue;}if(_0x55ffc5==='#'&&_0x4db37e!=='{'){const _0x23df2c=_0x589de9;while(_0x589de9<_0x69cbda[_0x56f131(0xd3)]&&_0x69cbda[_0x589de9]!=='\x0a')_0x589de9+=0x1;_0x4ff56b(_0x23df2c,_0x589de9);continue;}if((_0x55ffc5==='#'||_0x55ffc5==='$')&&_0x4db37e==='{'){const _0x3193d7=_0x589de9;_0x589de9+=0x2;while(_0x589de9<_0x69cbda[_0x56f131(0xd3)]&&_0x69cbda[_0x589de9]!=='}')_0x589de9+=0x1;_0x4ff56b(_0x3193d7,Math[_0x56f131(0xa6)](_0x589de9+0x1,_0x69cbda[_0x56f131(0xd3)]));}}return _0x69cbda[_0x56f131(0xbb)]('');}function maskQuotedIdentifiers(_0x1e9ea2){const _0x337469=a238_0x2169,_0x3ee0cc=Array['from'](_0x1e9ea2);for(let _0x16d223=0x0;_0x16d223<_0x3ee0cc[_0x337469(0xd3)];_0x16d223+=0x1){const _0x1437c6=_0x3ee0cc[_0x16d223];if(_0x1437c6!=='\x22'&&_0x1437c6!=='`')continue;_0x16d223+=0x1;while(_0x16d223<_0x3ee0cc['length']){if(_0x3ee0cc[_0x16d223]===_0x1437c6){if(_0x3ee0cc[_0x16d223+0x1]===_0x1437c6){_0x3ee0cc[_0x16d223]='\x20',_0x3ee0cc[_0x16d223+0x1]='\x20',_0x16d223+=0x2;continue;}break;}_0x3ee0cc[_0x16d223]='\x20',_0x16d223+=0x1;}}return _0x3ee0cc[_0x337469(0xbb)]('');}function maskNestedQueries(_0x5edc83){const _0x329e20=a238_0x2169,_0x1aab93=Array['from'](_0x5edc83);for(let _0x20f275=0x0;_0x20f275<_0x1aab93[_0x329e20(0xd3)];_0x20f275+=0x1){if(_0x1aab93[_0x20f275]!=='(')continue;const _0x577898=_0x5edc83['slice'](_0x20f275+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x329e20(0xd9)](_0x577898))continue;let _0x21567b=0x1,_0xda3fe8=_0x20f275+0x1;for(;_0xda3fe8<_0x1aab93['length']&&_0x21567b>0x0;_0xda3fe8+=0x1){if(_0x1aab93[_0xda3fe8]==='(')_0x21567b+=0x1;if(_0x1aab93[_0xda3fe8]===')')_0x21567b-=0x1;}if(_0x21567b!==0x0)continue;for(let _0xedef72=_0x20f275;_0xedef72<_0xda3fe8;_0xedef72+=0x1){_0x1aab93[_0xedef72]='\x20';}const _0x492940='__sq__';for(let _0x36bee4=0x0;_0x36bee4<_0x492940[_0x329e20(0xd3)]&&_0x20f275+_0x36bee4<_0xda3fe8;_0x36bee4+=0x1){_0x1aab93[_0x20f275+_0x36bee4]=_0x492940[_0x36bee4];}_0x20f275=_0xda3fe8-0x1;}return _0x1aab93[_0x329e20(0xbb)]('');}function splitTopLevelAnd(_0x23d48d){const _0x57899d=a238_0x2169,_0x17caef=[];let _0x15c8c5=0x0,_0x1355f7=0x0;for(let _0x1c1769=0x0;_0x1c1769<_0x23d48d[_0x57899d(0xd3)];_0x1c1769+=0x1){const _0x2cb45a=_0x23d48d[_0x1c1769];if(_0x2cb45a==='(')_0x15c8c5+=0x1;if(_0x2cb45a===')')_0x15c8c5=Math[_0x57899d(0xd1)](0x0,_0x15c8c5-0x1);_0x15c8c5===0x0&&_0x23d48d[_0x57899d(0xcb)](_0x1c1769)[_0x57899d(0xc8)](/^AND\b/i)&&(_0x1c1769===0x0||/\s/['test'](_0x23d48d[_0x1c1769-0x1]??''))&&(_0x17caef[_0x57899d(0xc5)](_0x23d48d[_0x57899d(0xcb)](_0x1355f7,_0x1c1769)[_0x57899d(0xa4)]()),_0x1c1769+=0x2,_0x1355f7=_0x1c1769+0x1);}const _0x4ecf37=_0x23d48d[_0x57899d(0xcb)](_0x1355f7)['trim']();if(_0x4ecf37)_0x17caef[_0x57899d(0xc5)](_0x4ecf37);return _0x17caef;}function hasTopLevelKeyword(_0x459356,_0x4bb1fd){const _0x5997ba=a238_0x2169;let _0x3aca8b=0x0;for(let _0x2491a1=0x0;_0x2491a1<_0x459356[_0x5997ba(0xd3)];_0x2491a1+=0x1){const _0xbd5610=_0x459356[_0x2491a1];if(_0xbd5610==='(')_0x3aca8b+=0x1;if(_0xbd5610===')')_0x3aca8b=Math[_0x5997ba(0xd1)](0x0,_0x3aca8b-0x1);if(_0x3aca8b!==0x0)continue;const _0x47b578=_0x459356[_0x5997ba(0xcb)](_0x2491a1,_0x2491a1+_0x4bb1fd[_0x5997ba(0xd3)]),_0x1188d0=_0x459356[_0x2491a1-0x1]??'\x20',_0x387e3f=_0x459356[_0x2491a1+_0x4bb1fd[_0x5997ba(0xd3)]]??'\x20';if(_0x47b578[_0x5997ba(0xc7)]()===_0x4bb1fd[_0x5997ba(0xc7)]()&&!/[\w$]/[_0x5997ba(0xd9)](_0x1188d0)&&!/[\w$]/[_0x5997ba(0xd9)](_0x387e3f))return!![];}return![];}function splitEquality(_0x433999){const _0xe7e93b=a238_0x2169,_0x196d90=stripOuterParentheses(_0x433999);let _0x995405=0x0,_0x5a47ef;for(let _0x383541=0x0;_0x383541<_0x196d90[_0xe7e93b(0xd3)];_0x383541+=0x1){const _0x5939ea=_0x196d90[_0x383541];if(_0x5939ea==='(')_0x995405+=0x1;if(_0x5939ea===')')_0x995405=Math[_0xe7e93b(0xd1)](0x0,_0x995405-0x1);const _0x4347b2=_0x196d90[_0x383541-0x1]??'',_0x4aaf7c=_0x196d90[_0x383541+0x1]??'';if(_0x5939ea==='='&&_0x995405===0x0&&!/[!<>=:]/['test'](_0x4347b2)&&_0x4aaf7c!=='='){if(_0x5a47ef!==undefined)return null;_0x5a47ef=_0x383541;}}return _0x5a47ef===undefined?null:[_0x196d90[_0xe7e93b(0xcb)](0x0,_0x5a47ef)['trim'](),_0x196d90['slice'](_0x5a47ef+0x1)[_0xe7e93b(0xa4)]()];}function parseDirectColumnReference(_0x9ab840,_0x1a1d6f){const _0x19e18c=a238_0x2169,_0xe5d3d5=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x19e18c(0xc4)](stripOuterParentheses(_0x9ab840));if(!_0xe5d3d5)return null;if(normalizeIdentifier(_0xe5d3d5[0x1]??'')!==normalizeIdentifier(_0x1a1d6f))return null;return normalizeIdentifier(_0xe5d3d5[0x2]??'');}function containsColumnReference(_0x33f093,_0x3e41a3){const _0x17f9b1=a238_0x2169,_0x33df0d=_0x33f093[_0x17f9b1(0xb0)](/[`"]/g,''),_0x3536c4=_0x3e41a3[_0x17f9b1(0xb0)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x17f9b1(0xaf)+_0x3536c4+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')['test'](_0x33df0d);}function findEqualityPrefix(_0x2e6925,_0x39420d){const _0x4f5a98=a238_0x2169,_0x2ed832=new Set(_0x39420d[_0x4f5a98(0x99)](normalizeIdentifier)),_0x1d6a77=[];for(const _0x2b8db0 of _0x2e6925){if(!_0x2ed832['has'](normalizeIdentifier(_0x2b8db0)))break;_0x1d6a77[_0x4f5a98(0xc5)](_0x2b8db0);}return _0x1d6a77;}function resolveTableMetadata(_0x3916c5,_0x76a587){const _0x341ecf=a238_0x2169,_0x4dfb17=normalizeIdentifier(_0x76a587),_0x3d6347=_0x3916c5[_0x341ecf(0xab)](_0x45c127=>normalizeIdentifier(_0x45c127['tableName'])===_0x4dfb17);if(_0x3d6347[_0x341ecf(0xd3)]===0x1)return _0x3d6347[0x0];const _0xcfcee5=_0x4dfb17[_0x341ecf(0xa9)]('.'),_0x4690af=_0x4dfb17['split']('.')['at'](-0x1),_0x1dcc91=_0x3916c5['filter'](_0x56b362=>{const _0x8ac88b=_0x341ecf,_0xda96cf=normalizeIdentifier(_0x56b362[_0x8ac88b(0xa0)]);if(_0xcfcee5&&_0xda96cf[_0x8ac88b(0xa9)]('.'))return![];return _0xda96cf[_0x8ac88b(0xad)]('.')['at'](-0x1)===_0x4690af;});return _0x1dcc91['length']===0x1?_0x1dcc91[0x0]:undefined;}function columnNamesMatch(_0x24a35f,_0x44113e){return normalizeIdentifier(_0x24a35f)===normalizeIdentifier(_0x44113e);}function normalizeIdentifier(_0x997ccc){const _0x565577=a238_0x2169;return _0x997ccc[_0x565577(0xb0)](/[`"]/g,'')[_0x565577(0xa4)]()[_0x565577(0xc3)]();}function isSqlClauseKeyword(_0x4b60ec){const _0x50e1ec=a238_0x2169;return new Set(['on','using','where',_0x50e1ec(0xbb),_0x50e1ec(0xcf),'left','right',_0x50e1ec(0xda),_0x50e1ec(0xd0),'natural'])[_0x50e1ec(0xb6)](_0x4b60ec);}function stripOuterParentheses(_0x230b17){const _0x5ecd50=a238_0x2169;let _0xe1e79c=_0x230b17['trim']();while(_0xe1e79c[_0x5ecd50(0xb9)]('(')&&_0xe1e79c[_0x5ecd50(0xb1)](')')){let _0x1269c4=0x0,_0x47d5e1=!![];for(let _0x4cc5a1=0x0;_0x4cc5a1<_0xe1e79c[_0x5ecd50(0xd3)];_0x4cc5a1+=0x1){if(_0xe1e79c[_0x4cc5a1]==='(')_0x1269c4+=0x1;if(_0xe1e79c[_0x4cc5a1]===')')_0x1269c4-=0x1;if(_0x1269c4===0x0&&_0x4cc5a1<_0xe1e79c[_0x5ecd50(0xd3)]-0x1){_0x47d5e1=![];break;}}if(!_0x47d5e1||_0x1269c4!==0x0)break;_0xe1e79c=_0xe1e79c[_0x5ecd50(0xcb)](0x1,-0x1)[_0x5ecd50(0xa4)]();}return _0xe1e79c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a239_0x11ae(_0x15c881,_0x3c9b81){_0x15c881=_0x15c881-0x105;const _0xa13fd0=a239_0xa13f();let _0x11aeca=_0xa13fd0[_0x15c881];return _0x11aeca;}const a239_0x33b3ad=a239_0x11ae;(function(_0x2c9a8a,_0x299582){const _0x2981a8=a239_0x11ae,_0x8ea52a=_0x2c9a8a();while(!![]){try{const _0x8f6b82=-parseInt(_0x2981a8(0x111))/0x1*(parseInt(_0x2981a8(0x107))/0x2)+-parseInt(_0x2981a8(0x10b))/0x3+-parseInt(_0x2981a8(0x105))/0x4*(parseInt(_0x2981a8(0x10e))/0x5)+-parseInt(_0x2981a8(0x108))/0x6*(-parseInt(_0x2981a8(0x10f))/0x7)+parseInt(_0x2981a8(0x106))/0x8*(parseInt(_0x2981a8(0x10d))/0x9)+parseInt(_0x2981a8(0x113))/0xa*(parseInt(_0x2981a8(0x109))/0xb)+parseInt(_0x2981a8(0x10a))/0xc;if(_0x8f6b82===_0x299582)break;else _0x8ea52a['push'](_0x8ea52a['shift']());}catch(_0x13acec){_0x8ea52a['push'](_0x8ea52a['shift']());}}}(a239_0xa13f,0xc113b));function a239_0xa13f(){const _0xaef9fd=['sql-trash','117kzdwen','5705DgGofG','1799wPOOSD','sql.lock.json','3nDCigk','/sql','190GalxBG','2044Xkbyum','152584fURMSR','981382xiTYjq','19086YduBCT','900823SiYMjv','8718996KYUCUd','1506147zpRxoV'];a239_0xa13f=function(){return _0xaef9fd;};return a239_0xa13f();}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a239_0x33b3ad(0x110),TRASH_DIR_NAME=a239_0x33b3ad(0x10c);export function loadSqlProjectConfig(_0x26d641,_0x3755a1){const _0x1ed86d=a239_0x33b3ad,_0x4c8aa4=resolve(_0x3755a1??findProjectRootDirectory()),_0x3c2bbc=DOT_DIR+_0x1ed86d(0x112),_0x5a5ee2=_0x3c2bbc+'/'+_0x26d641;return{'projectRoot':_0x4c8aa4,'appCode':_0x26d641,'sqlWorkspaceRoot':_0x3c2bbc,'sqlRoot':_0x5a5ee2,'sqlRootDir':resolve(_0x4c8aa4,DOT_DIR,'sql',_0x26d641),'lockFilePath':resolve(_0x4c8aa4,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4c8aa4,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x359810,_0x4beee1){const _0x1c8135=a240_0x5a94,_0x429d97=_0x359810();while(!![]){try{const _0x3bcf68=parseInt(_0x1c8135(0x101))/0x1+parseInt(_0x1c8135(0x113))/0x2+-parseInt(_0x1c8135(0x103))/0x3*(parseInt(_0x1c8135(0x10d))/0x4)+-parseInt(_0x1c8135(0x10f))/0x5+parseInt(_0x1c8135(0x100))/0x6+parseInt(_0x1c8135(0x10b))/0x7+-parseInt(_0x1c8135(0x110))/0x8*(parseInt(_0x1c8135(0x106))/0x9);if(_0x3bcf68===_0x4beee1)break;else _0x429d97['push'](_0x429d97['shift']());}catch(_0x27a5b6){_0x429d97['push'](_0x429d97['shift']());}}}(a240_0x5496,0x869ff));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x49df7f){const _0x4870f6=a240_0x5a94;if(_0x49df7f==='.sql')return _0x4870f6(0x104);if(_0x49df7f===_0x4870f6(0xf8))return _0x4870f6(0xff);return undefined;}function a240_0x5496(){const _0x30198d=['mybatisXml','5494926auCOBG','870420mMKTFt','path','691791DCzmNS','sql','toLowerCase','657WdGkgn','sqlRootDir','isDirectory','mode','split','1571157Nfqtji','isFile','12ZCjNiQ','dbName','5195790xfjVNw','23176IJmDib','length','code','966322iOPomR','name','.xml','sqlCode','sqlName','dbId','push','slice','replace'];a240_0x5496=function(){return _0x30198d;};return a240_0x5496();}async function scanSqlFilesRecursively(_0x5054e4,_0xacc760){const _0x2fe3f9=a240_0x5a94,_0x3a3080=[];try{const _0x36235f=await readdir(_0x5054e4,{'withFileTypes':!![]});for(const _0x5278de of _0x36235f){const _0x400320=join(_0x5054e4,_0x5278de['name']);if(_0x5278de[_0x2fe3f9(0x108)]()){_0x3a3080[_0x2fe3f9(0xfc)](...await scanSqlFilesRecursively(_0x400320,_0xacc760));continue;}if(!_0x5278de[_0x2fe3f9(0x10c)]())continue;const _0x4393fa=extname(_0x5278de[_0x2fe3f9(0xf7)])[_0x2fe3f9(0x105)](),_0x5abbff=extensionToMode(_0x4393fa);if(!_0x5abbff)continue;const _0x5a89db=relative(_0xacc760,_0x400320)[_0x2fe3f9(0xfe)](/\\/g,'/'),_0xc7ac4a=_0x5a89db[_0x2fe3f9(0x10a)]('/')['filter'](Boolean),_0x251009=parseSqlPath(_0xc7ac4a,_0x5278de['name'],_0x4393fa);if(!_0x251009)continue;_0x3a3080[_0x2fe3f9(0xfc)]({'sqlCode':_0x251009[_0x2fe3f9(0xf9)],'sqlName':_0x251009['sqlName'],'dbDirectory':_0xc7ac4a[0x0],'filePath':_0x400320,'relativePath':_0x5a89db,'lockKey':_0x251009[_0x2fe3f9(0xf9)],'mode':_0x5abbff});}}catch(_0x362f07){if(_0x362f07[_0x2fe3f9(0x112)]!=='ENOENT')throw _0x362f07;}return _0x3a3080;}export async function scanLocalSqlQueries(_0x3ca299){const _0x88a964=a240_0x5a94;return scanSqlFilesRecursively(_0x3ca299[_0x88a964(0x107)],_0x3ca299[_0x88a964(0x107)]);}export function resolveLocalSqlFilePath(_0xbe2da0,_0x1e879b,_0x49dd8){const _0x170ce4=a240_0x5a94,_0x4a2acc=_0x49dd8?.[_0x170ce4(0x102)]||(_0x49dd8?.[_0x170ce4(0xfa)]||_0x49dd8?.[_0x170ce4(0x10e)]?buildSqlRelativePath(_0x1e879b,_0x49dd8?.[_0x170ce4(0xfa)],_0x49dd8?.['dbName'],_0x49dd8?.[_0x170ce4(0x109)]||_0x170ce4(0x104),_0x49dd8?.[_0x170ce4(0xfb)]):buildDefaultSqlFileName(_0x1e879b,_0x49dd8?.[_0x170ce4(0x109)]||_0x170ce4(0x104)));return join(_0xbe2da0['sqlRootDir'],_0x4a2acc);}export async function directoryExists(_0x1153b3){const _0x116ee7=a240_0x5a94;try{const _0x342fbd=await stat(_0x1153b3);return _0x342fbd[_0x116ee7(0x108)]();}catch{return![];}}function parseSqlPath(_0x2c8ff0,_0x2840f2,_0x4fec76){const _0xa04e7=a240_0x5a94,_0x3b4918=_0x2840f2[_0xa04e7(0xfd)](0x0,-_0x4fec76[_0xa04e7(0x111)]);if(_0x2c8ff0[_0xa04e7(0x111)]<0x2)return null;const _0x3ec18f=_0x3b4918['indexOf']('_');if(_0x3ec18f<=0x0||_0x3ec18f>=_0x3b4918[_0xa04e7(0x111)]-0x1)return null;const _0x2adc27=_0x3b4918[_0xa04e7(0xfd)](0x0,_0x3ec18f);if(!isLikelySqlCode(_0x2adc27))return null;return{'sqlCode':_0x2adc27,'sqlName':_0x3b4918[_0xa04e7(0xfd)](_0x3ec18f+0x1)};}function a240_0x5a94(_0x750dd6,_0x4ebaf3){_0x750dd6=_0x750dd6-0xf7;const _0x549603=a240_0x5496();let _0x5a946d=_0x549603[_0x750dd6];return _0x5a946d;}function isLikelySqlCode(_0x19e2a4){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x19e2a4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c836e,_0x287aac){const _0x289a3b=a241_0x5ce3,_0x354db9=_0x3c836e();while(!![]){try{const _0x1dcc00=-parseInt(_0x289a3b(0xea))/0x1*(parseInt(_0x289a3b(0xf3))/0x2)+parseInt(_0x289a3b(0xec))/0x3+-parseInt(_0x289a3b(0xf0))/0x4+-parseInt(_0x289a3b(0xf5))/0x5+parseInt(_0x289a3b(0xf2))/0x6+-parseInt(_0x289a3b(0xf1))/0x7*(parseInt(_0x289a3b(0xe8))/0x8)+parseInt(_0x289a3b(0xed))/0x9;if(_0x1dcc00===_0x287aac)break;else _0x354db9['push'](_0x354db9['shift']());}catch(_0x48d85d){_0x354db9['push'](_0x354db9['shift']());}}}(a241_0x5ae9,0xca91c));import{readFile}from'node:fs/promises';import a241_0x484e8b from'node:crypto';function a241_0x5ae9(){const _0x381c68=['2460900NSTaoZ','917QfToXX','2442936LxeviN','14980Zduiwf','utf8','7621060NTcEaw','52776fnjTWm','digest','19swRIqc','hex','4713075EVNvhY','17977473xuQtwY','createHash','md5'];a241_0x5ae9=function(){return _0x381c68;};return a241_0x5ae9();}function a241_0x5ce3(_0x9d92f1,_0x5800eb){_0x9d92f1=_0x9d92f1-0xe8;const _0x5ae93a=a241_0x5ae9();let _0x5ce346=_0x5ae93a[_0x9d92f1];return _0x5ce346;}export function computeSqlContentHash(_0x57fed6){const _0x2a1bf8=a241_0x5ce3;return a241_0x484e8b[_0x2a1bf8(0xee)](_0x2a1bf8(0xef))['update'](_0x57fed6)[_0x2a1bf8(0xe9)](_0x2a1bf8(0xeb));}export async function computeSqlFileHash(_0x45cab7){const _0x551368=a241_0x5ce3,_0x25ca99=await readFile(_0x45cab7,_0x551368(0xf4));return computeSqlContentHash(_0x25ca99);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b153c,_0xa6d986){const _0x257677=a242_0x3784,_0x690b57=_0x2b153c();while(!![]){try{const _0x5dadf1=parseInt(_0x257677(0x12a))/0x1+-parseInt(_0x257677(0x12b))/0x2+parseInt(_0x257677(0x131))/0x3*(-parseInt(_0x257677(0x134))/0x4)+-parseInt(_0x257677(0x132))/0x5+parseInt(_0x257677(0x128))/0x6+parseInt(_0x257677(0x12f))/0x7+parseInt(_0x257677(0x12c))/0x8*(parseInt(_0x257677(0x12e))/0x9);if(_0x5dadf1===_0xa6d986)break;else _0x690b57['push'](_0x690b57['shift']());}catch(_0x4e4481){_0x690b57['push'](_0x690b57['shift']());}}}(a242_0x3469,0xb53e2));import{mkdir,readFile,writeFile}from'node:fs/promises';function a242_0x3784(_0x5d36e6,_0x10a0e0){_0x5d36e6=_0x5d36e6-0x120;const _0x34691a=a242_0x3469();let _0x378469=_0x34691a[_0x5d36e6];return _0x378469;}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x12fe64,_0x446d92,_0x5a2d66,_0x50f722){const _0x2f2875=a242_0x3784,_0x2a919d=_0x12fe64??createEmptySqlLock();let _0x44a3e7=_0x2a919d[_0x2f2875(0x123)][_0x446d92];if(!_0x44a3e7)return _0x44a3e7={'sqlRoot':_0x5a2d66,'lastSync':'','sqls':{}},_0x2a919d[_0x2f2875(0x123)][_0x446d92]=_0x44a3e7,{'lockData':_0x2a919d,'appLock':_0x44a3e7};if(!_0x44a3e7[_0x2f2875(0x129)])_0x44a3e7[_0x2f2875(0x129)]=_0x5a2d66;else{if(_0x44a3e7[_0x2f2875(0x129)]!==_0x5a2d66)throw new Error(_0x50f722+_0x2f2875(0x130)+_0x5a2d66+_0x2f2875(0x127)+_0x44a3e7[_0x2f2875(0x129)]+_0x2f2875(0x12d)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x44a3e7[_0x2f2875(0x124)]&&(_0x44a3e7[_0x2f2875(0x124)]={}),!_0x44a3e7['lastSync']&&(_0x44a3e7[_0x2f2875(0x133)]=''),{'lockData':_0x2a919d,'appLock':_0x44a3e7};}export async function readSqlLockFile(_0x3005a3){const _0x32590b=a242_0x3784;try{const _0x3f624e=await readFile(_0x3005a3,_0x32590b(0x121));return JSON[_0x32590b(0x125)](_0x3f624e);}catch(_0x5057a3){if(_0x5057a3['code']===_0x32590b(0x126))return null;throw new Error(_0x32590b(0x122)+String(_0x5057a3));}}function a242_0x3469(){const _0x57d882=['ENOENT','\x22\x20vs\x20lock\x20\x22','3224616LtusTb','sqlRoot','300410nAKeyY','1784656McpBMW','1753312RWtUoD','\x22.\x20','99QNcZTW','2864183fTjjsi',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','41766gDtWuH','7400815llLfza','lastSync','156DdoMdf','stringify','utf8','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','apps','sqls','parse'];a242_0x3469=function(){return _0x57d882;};return a242_0x3469();}export async function writeSqlLockFile(_0x305702,_0x3d3589){const _0x4208e8=a242_0x3784;await mkdir(dirname(_0x305702),{'recursive':!![]}),await writeFile(_0x305702,JSON[_0x4208e8(0x120)](_0x3d3589,null,0x2),_0x4208e8(0x121));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b6c0b,_0x2b0326){const _0x2f44a4=a244_0xa131,_0x147729=_0x4b6c0b();while(!![]){try{const _0x150387=parseInt(_0x2f44a4(0x18e))/0x1+parseInt(_0x2f44a4(0x190))/0x2*(-parseInt(_0x2f44a4(0x18c))/0x3)+-parseInt(_0x2f44a4(0x18d))/0x4+parseInt(_0x2f44a4(0x188))/0x5+parseInt(_0x2f44a4(0x192))/0x6*(-parseInt(_0x2f44a4(0x187))/0x7)+parseInt(_0x2f44a4(0x183))/0x8*(parseInt(_0x2f44a4(0x193))/0x9)+parseInt(_0x2f44a4(0x194))/0xa;if(_0x150387===_0x2b0326)break;else _0x147729['push'](_0x147729['shift']());}catch(_0x5175b0){_0x147729['push'](_0x147729['shift']());}}}(a244_0x10d0,0x73f11));export function detectSqlMode(_0x5a32f6){const _0x2b7672=a244_0xa131,_0x56751e=_0x5a32f6[_0x2b7672(0x186)]();if(/^<(select|insert|update|delete)\b/i[_0x2b7672(0x18f)](_0x56751e))return _0x2b7672(0x191);return _0x2b7672(0x195);}function a244_0xa131(_0x1751ff,_0x59eaf9){_0x1751ff=_0x1751ff-0x183;const _0x10d012=a244_0x10d0();let _0xa1312a=_0x10d012[_0x1751ff];return _0xa1312a;}export function getSqlFileExtension(_0xadde02){const _0x1a7826=a244_0xa131;return _0xadde02===_0x1a7826(0x191)?_0x1a7826(0x196):_0x1a7826(0x18a);}export function buildDefaultSqlFileName(_0xa4909b,_0x19fa5c){return''+_0xa4909b+getSqlFileExtension(_0x19fa5c);}export function sanitizeSqlPathSegment(_0x513519,_0x32d74c){const _0x2eec64=a244_0xa131,_0x2ecd84=String(_0x513519??'')[_0x2eec64(0x185)](),_0x3280ed=_0x2ecd84[_0x2eec64(0x184)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2eec64(0x184)](/\s+/g,'-')[_0x2eec64(0x184)](/-+/g,'-')['replace'](/^\.+/,'')[_0x2eec64(0x184)](/\.+$/,'')['replace'](/^-+/,'')[_0x2eec64(0x184)](/-+$/,'');return _0x3280ed||_0x32d74c;}function a244_0x10d0(){const _0x5abd16=['13538290UrYlHH','sql','.xml','unknown-sql','8yTUjFP','replace','trim','trimStart','147oEeADp','3227680ZKoctV','db-','.sql','unknown-db','2281602ZdUEgi','3438420bIarNL','398142FnZcPb','test','2VAcOth','mybatisXml','123408laGzxh','1165113fPXsCS'];a244_0x10d0=function(){return _0x5abd16;};return a244_0x10d0();}export function buildDbDirectoryName(_0x467136,_0x3f72ad){const _0x58ecd0=a244_0xa131;return sanitizeSqlPathSegment(_0x467136,_0x3f72ad!=null?_0x58ecd0(0x189)+_0x3f72ad:_0x58ecd0(0x18b));}export function buildSqlRelativePath(_0x4be788,_0x540bc4,_0x58d248,_0x280d9d,_0x506bc6){const _0x2b6833=a244_0xa131,_0x42442c=buildDbDirectoryName(_0x58d248,_0x506bc6),_0x322b73=sanitizeSqlPathSegment(_0x4be788,_0x2b6833(0x197)),_0xd1c93a=sanitizeSqlPathSegment(_0x540bc4,_0x322b73);return _0x42442c+'/'+_0x322b73+'_'+_0xd1c93a+getSqlFileExtension(_0x280d9d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a237_0x3faed6=a237_0x9d54;(function(_0x5e1797,_0x205018){const _0x5b046d=a237_0x9d54,_0x5f2aaf=_0x5e1797();while(!![]){try{const _0xe72b5d=parseInt(_0x5b046d(0xea))/0x1*(-parseInt(_0x5b046d(0x125))/0x2)+-parseInt(_0x5b046d(0x115))/0x3+parseInt(_0x5b046d(0xfc))/0x4+-parseInt(_0x5b046d(0xef))/0x5*(-parseInt(_0x5b046d(0x109))/0x6)+-parseInt(_0x5b046d(0x104))/0x7+-parseInt(_0x5b046d(0xf3))/0x8*(-parseInt(_0x5b046d(0xde))/0x9)+-parseInt(_0x5b046d(0xd0))/0xa;if(_0xe72b5d===_0x205018)break;else _0x5f2aaf['push'](_0x5f2aaf['shift']());}catch(_0x4e1832){_0x5f2aaf['push'](_0x5f2aaf['shift']());}}}(a237_0x45e8,0xd14b9));const MYBATIS_OUTER_TAGS=new Map([[a237_0x3faed6(0x10b),a237_0x3faed6(0x117)],['insert',a237_0x3faed6(0xd7)],['update',a237_0x3faed6(0x10e)],['delete','DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a237_0x3faed6(0xfa),'foreach','choose',a237_0x3faed6(0x11b),a237_0x3faed6(0x10d),'trim',a237_0x3faed6(0x120),a237_0x3faed6(0x11e),'include',a237_0x3faed6(0xd3)]),MYBATIS_BRANCH_TAGS=new Set(['if',a237_0x3faed6(0x10f),a237_0x3faed6(0xf6),a237_0x3faed6(0x11b),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER=a237_0x3faed6(0xe2);function a237_0x9d54(_0x2747fa,_0x10a335){_0x2747fa=_0x2747fa-0xd0;const _0x45e86a=a237_0x45e8();let _0x9d54c1=_0x45e86a[_0x2747fa];return _0x9d54c1;}export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';function a237_0x45e8(){const _0x30f45b=['exec','join','DELETE','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','1248564LkzdWY','WITH','SELECT','Unterminated\x20CDATA\x20section.','&','Unterminated\x20XML\x20declaration.','when','error','from','bind','^<\x5cs*(?:','set','replace','type','UNKNOWN','pop','8DKrVFo','mybatisXml','\x20query\x20targeting\x20','SQL\x20content\x20is\x20empty','outer','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','trim','indexOf','match','test','add','4896760jSDDTj','get','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','property','tagName','<![CDATA[','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','INSERT','matchAll','push','reason','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','<!--',''','225XtLnmd','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','Unable\x20to\x20detect\x20SQL\x20type.\x20','startsWith','__RABETBASE_MYBATIS_DYNAMIC_START__','\x20SET\x20','>','isDangerous','slice','has','rawName','replaceAll','336481SPRPNk','Unterminated\x20XML\x20comment.','<','include','length','635WMDxke','DDL','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','-->','319528XhxskX','\x20WHERE\x20','"','choose','toUpperCase','sql','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','where','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','2125180qzRucs','\x20with\x20parameters:\x20','statementType','parseInt','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','Unterminated\x20MyBatis\x20XML\x20tag.','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','31143cNXIMH','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','split','keys','includes','74820SnNuUP','Invalid\x20MyBatis\x20XML\x20tag.','select','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','otherwise','UPDATE','foreach',']]>'];a237_0x45e8=function(){return _0x30f45b;};return a237_0x45e8();}export const MYBATIS_INCLUDE_MARKER=a237_0x3faed6(0xf1);const UNRESOLVED_SQL_FRAGMENT=a237_0x3faed6(0x105),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a237_0x3faed6(0x11f)+[...MYBATIS_OUTER_TAGS[a237_0x3faed6(0x107)]()][a237_0x3faed6(0x112)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x5f325d){const _0x2caa2a=a237_0x3faed6,_0x5b56ab=typeof _0x5f325d==='string'?_0x5f325d:'';if(!startsWithMybatisStatementWrapper(_0x5b56ab))return{'sql':_0x5b56ab,'mode':_0x2caa2a(0xf8)};let _0xdaafd7=0x0,_0x573d25='',_0x3278de,_0x5b6490=![],_0x2eb5ce=![];const _0x4a22a9=[];while(_0xdaafd7<_0x5b56ab[_0x2caa2a(0xee)]){if(_0x5b56ab[_0x2caa2a(0xe1)](_0x2caa2a(0xdc),_0xdaafd7)){const _0x39ae69=_0x5b56ab[_0x2caa2a(0x12c)]('-->',_0xdaafd7+0x4);if(_0x39ae69<0x0)return invalidMybatisSource(_0x2caa2a(0xeb));_0x573d25+='\x20',_0xdaafd7=_0x39ae69+0x3;continue;}if(_0x5b56ab[_0x2caa2a(0xe1)](_0x2caa2a(0xd5),_0xdaafd7)){if(!_0x5b6490||_0x2eb5ce)return invalidMybatisSource(_0x2caa2a(0xdb));const _0x4719a8=_0x5b56ab['indexOf'](_0x2caa2a(0x110),_0xdaafd7+0x9);if(_0x4719a8<0x0)return invalidMybatisSource(_0x2caa2a(0x118));_0x573d25+=_0x5b56ab[_0x2caa2a(0xe6)](_0xdaafd7+0x9,_0x4719a8),_0xdaafd7=_0x4719a8+0x3;continue;}if(_0x5b56ab['startsWith']('<?',_0xdaafd7)){if(_0x5b6490)return invalidMybatisSource(_0x2caa2a(0x114));const _0x1b6df9=_0x5b56ab[_0x2caa2a(0x12c)]('?>',_0xdaafd7+0x2);if(_0x1b6df9<0x0)return invalidMybatisSource(_0x2caa2a(0x11a));_0x573d25+='\x20',_0xdaafd7=_0x1b6df9+0x2;continue;}if(_0x5b56ab[_0xdaafd7]!=='<'){const _0x30d0c7=_0x5b56ab[_0x2caa2a(0x12c)]('<',_0xdaafd7),_0x3fa8e3=_0x30d0c7<0x0?_0x5b56ab['length']:_0x30d0c7,_0x75d35a=_0x5b56ab['slice'](_0xdaafd7,_0x3fa8e3);if((!_0x5b6490||_0x2eb5ce)&&_0x75d35a[_0x2caa2a(0x12b)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x5b6490&&!_0x2eb5ce){const _0x5355af=decodeXmlEntities(_0x75d35a);if(_0x5355af===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x573d25+=_0x5355af;}else _0x573d25+='\x20';_0xdaafd7=_0x3fa8e3;continue;}const _0x2df4a1=findXmlTagEnd(_0x5b56ab,_0xdaafd7);if(_0x2df4a1<0x0)return invalidMybatisSource(_0x2caa2a(0x102));const _0x3f170a=_0x5b56ab[_0x2caa2a(0xe6)](_0xdaafd7,_0x2df4a1+0x1),_0x131ead=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x2caa2a(0x111)](_0x3f170a);if(!_0x131ead)return invalidMybatisSource(_0x2caa2a(0x10a));const _0x509ea2=_0x131ead[0x1]==='/',_0x469480=_0x131ead[0x2]??'',_0xc25916=_0x469480['toLowerCase'](),_0x44ee40=_0x131ead[0x3]??'',_0x431c97=_0x131ead[0x4]==='/',_0x4ae4ef=MYBATIS_OUTER_TAGS[_0x2caa2a(0xd1)](_0xc25916);if(!_0x4ae4ef&&!MYBATIS_DYNAMIC_TAGS[_0x2caa2a(0xe7)](_0xc25916))return invalidMybatisSource(_0x2caa2a(0x100)+_0xc25916+'>.');if(!_0x4ae4ef&&_0x469480!==_0xc25916)return invalidMybatisSource(_0x2caa2a(0xdf)+_0x469480+'>.');if(_0x509ea2){if(_0x44ee40[_0x2caa2a(0x12b)]()||_0x431c97)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x469480+'>.');const _0x3bd58a=_0x4a22a9['at'](-0x1);if(!_0x3bd58a||(_0x3bd58a[_0x2caa2a(0x129)]?_0x3bd58a[_0x2caa2a(0xd4)]!==_0xc25916:_0x3bd58a[_0x2caa2a(0xe8)]!==_0x469480))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x469480+'>.');_0x4a22a9[_0x2caa2a(0x124)]();if(_0x3bd58a[_0x2caa2a(0x129)])_0x2eb5ce=!![];_0x573d25+=MYBATIS_BRANCH_TAGS['has'](_0xc25916)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x44ee40))return invalidMybatisSource(_0x2caa2a(0xd2)+_0x469480+'>.');if(_0xc25916===_0x2caa2a(0xd3)&&(!_0x431c97||_0x4a22a9['at'](-0x1)?.[_0x2caa2a(0xd4)]!=='include'))return invalidMybatisSource(_0x2caa2a(0xf9));if(_0x4ae4ef){if(_0x5b6490||_0x4a22a9[_0x2caa2a(0xee)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x5b6490=!![],_0x2eb5ce=_0x431c97,_0x3278de=_0x4ae4ef;}else{if(!_0x5b6490||_0x2eb5ce)return invalidMybatisSource(_0x2caa2a(0x103)+_0x469480+'>.');}_0x573d25+=_0xc25916===_0x2caa2a(0xfa)?_0x2caa2a(0xf4):_0xc25916===_0x2caa2a(0x120)?_0x2caa2a(0xe3):_0xc25916===_0x2caa2a(0xed)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0xc25916)&&!_0x431c97?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x431c97&&_0x4a22a9[_0x2caa2a(0xd9)]({'rawName':_0x469480,'tagName':_0xc25916,'outer':!!_0x4ae4ef});}_0xdaafd7=_0x2df4a1+0x1;}if(_0x4a22a9[_0x2caa2a(0xee)]>0x0)return invalidMybatisSource('Unclosed\x20MyBatis\x20XML\x20tag:\x20<'+_0x4a22a9['at'](-0x1)?.[_0x2caa2a(0xe8)]+'>.');if(!_0x5b6490||!_0x2eb5ce)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x573d25[_0x2caa2a(0x12b)](),'mode':_0x2caa2a(0x126),..._0x3278de?{'statementType':_0x3278de}:{}};}function hasWellFormedXmlAttributes(_0xf8b3e1){const _0xf47652=a237_0x3faed6;let _0x401fb3=0x0;const _0x1b6fed=new Set();while(_0x401fb3<_0xf8b3e1[_0xf47652(0xee)]){while(_0x401fb3<_0xf8b3e1[_0xf47652(0xee)]&&/\s/[_0xf47652(0x12e)](_0xf8b3e1[_0x401fb3]??''))_0x401fb3+=0x1;if(_0x401fb3>=_0xf8b3e1[_0xf47652(0xee)])return!![];const _0x56afaa=/^[A-Za-z_:][\w:.-]*/[_0xf47652(0x111)](_0xf8b3e1[_0xf47652(0xe6)](_0x401fb3)),_0x28d774=_0x56afaa?.[0x0];if(!_0x28d774||_0x1b6fed[_0xf47652(0xe7)](_0x28d774))return![];_0x1b6fed[_0xf47652(0x12f)](_0x28d774),_0x401fb3+=_0x28d774[_0xf47652(0xee)];while(_0x401fb3<_0xf8b3e1[_0xf47652(0xee)]&&/\s/[_0xf47652(0x12e)](_0xf8b3e1[_0x401fb3]??''))_0x401fb3+=0x1;if(_0xf8b3e1[_0x401fb3]!=='=')return![];_0x401fb3+=0x1;while(_0x401fb3<_0xf8b3e1['length']&&/\s/['test'](_0xf8b3e1[_0x401fb3]??''))_0x401fb3+=0x1;const _0x11c2c=_0xf8b3e1[_0x401fb3];if(_0x11c2c!=='\x22'&&_0x11c2c!=='\x27')return![];_0x401fb3+=0x1;const _0x17d3c9=_0xf8b3e1[_0xf47652(0x12c)](_0x11c2c,_0x401fb3);if(_0x17d3c9<0x0)return![];if(decodeXmlEntities(_0xf8b3e1['slice'](_0x401fb3,_0x17d3c9))===null)return![];_0x401fb3=_0x17d3c9+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0xa4148b){const _0x26c66f=a237_0x3faed6;let _0x599f5c=0x0;const _0x17dfa2=()=>{const _0xa08af=a237_0x9d54;while(_0x599f5c<_0xa4148b['length']&&/\s/[_0xa08af(0x12e)](_0xa4148b[_0x599f5c]??''))_0x599f5c+=0x1;};_0x17dfa2();while(_0x599f5c<_0xa4148b['length']){if(_0xa4148b['startsWith'](_0x26c66f(0xdc),_0x599f5c)){const _0x518673=_0xa4148b[_0x26c66f(0x12c)](_0x26c66f(0xf2),_0x599f5c+0x4);if(_0x518673<0x0)return!![];_0x599f5c=_0x518673+0x3,_0x17dfa2();continue;}if(_0xa4148b[_0x26c66f(0xe1)]('<?',_0x599f5c)){const _0xd88480=_0xa4148b[_0x26c66f(0x12c)]('?>',_0x599f5c+0x2);if(_0xd88480<0x0)return!![];_0x599f5c=_0xd88480+0x2,_0x17dfa2();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x26c66f(0x12e)](_0xa4148b[_0x26c66f(0xe6)](_0x599f5c));}function invalidMybatisSource(_0xad1339){return{'sql':'','mode':'mybatisXml','error':_0xad1339};}function findXmlTagEnd(_0x2603f6,_0x33abb8){const _0x1aeab8=a237_0x3faed6;let _0x359830;for(let _0x52a4c6=_0x33abb8+0x1;_0x52a4c6<_0x2603f6[_0x1aeab8(0xee)];_0x52a4c6+=0x1){const _0x52ff60=_0x2603f6[_0x52a4c6];if(_0x359830){if(_0x52ff60===_0x359830)_0x359830=undefined;continue;}if(_0x52ff60==='\x22'||_0x52ff60==='\x27'){_0x359830=_0x52ff60;continue;}if(_0x52ff60==='>')return _0x52a4c6;}return-0x1;}function decodeXmlEntities(_0x2782a9){const _0x35ca74=a237_0x3faed6;let _0x2ccf4b=![];const _0x2b4fa7=_0x2782a9[_0x35ca74(0x121)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x5ee4b5=>{const _0x31b739=_0x35ca74;if(_0x5ee4b5===_0x31b739(0xec))return'<';if(_0x5ee4b5===_0x31b739(0xe4))return'>';if(_0x5ee4b5===_0x31b739(0xf5))return'\x22';if(_0x5ee4b5===_0x31b739(0xdd))return'\x27';if(_0x5ee4b5===_0x31b739(0x119))return'&';const _0xfc8b80=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x31b739(0x111)](_0x5ee4b5);if(_0xfc8b80){const _0x24be0e=_0xfc8b80[0x1],_0x3ce003=_0xfc8b80[0x2],_0x553e21=Number[_0x31b739(0xff)](_0x24be0e??_0x3ce003??'',_0x24be0e?0x10:0xa);if(isValidXmlCharacter(_0x553e21))return String['fromCodePoint'](_0x553e21);}return _0x2ccf4b=!![],'';});return _0x2ccf4b?null:_0x2b4fa7;}function isValidXmlCharacter(_0xc650dd){return _0xc650dd===0x9||_0xc650dd===0xa||_0xc650dd===0xd||_0xc650dd>=0x20&&_0xc650dd<=0xd7ff||_0xc650dd>=0xe000&&_0xc650dd<=0xfffd||_0xc650dd>=0x10000&&_0xc650dd<=0x10ffff;}export function detectSqlType(_0x239465){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x239465));}function detectNormalizedSqlType(_0x46d5a8){const _0x198e1c=a237_0x3faed6;if(_0x46d5a8[_0x198e1c(0x11c)])return{'type':_0x198e1c(0x123),'isSelectOnly':![],'isDangerous':![],'reason':_0x46d5a8['error']};if(!_0x46d5a8['sql']['trim']())return{'type':_0x198e1c(0x123),'isSelectOnly':![],'isDangerous':![],'reason':_0x198e1c(0x128)};const _0x6edf48=stripStaticAnalysisMarkers(_0x46d5a8[_0x198e1c(0xf8)])['replace'](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x198e1c(0x121)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x198e1c(0x121)](/\/\*[\s\S]*?\*\//g,'')[_0x198e1c(0x12b)](),_0x1770ce=_0x6edf48[_0x198e1c(0x106)]('\x0a');let _0x11187e='';for(const _0x5eeb63 of _0x1770ce){const _0x5d0be7=_0x5eeb63[_0x198e1c(0x12b)]();if(!_0x5d0be7||_0x5d0be7[_0x198e1c(0xe1)]('--')||_0x5d0be7[_0x198e1c(0xe1)]('/*'))continue;_0x11187e=_0x5d0be7;break;}const _0x544bcc=_0x11187e[_0x198e1c(0xf7)](),_0x5f43e6=_0x46d5a8[_0x198e1c(0xfe)],_0x986262=maskSqlTextForBlockedKeywordScan(_0x6edf48),_0x392b18=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x198e1c(0x12e)](_0x986262);if(_0x5f43e6==='SELECT'||!_0x5f43e6&&(_0x544bcc[_0x198e1c(0xe1)]('SELECT')||_0x544bcc[_0x198e1c(0xe1)](_0x198e1c(0x116)))){const _0x14235b=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x198e1c(0x12e)](_0x6edf48);return{'type':'SELECT','isSelectOnly':!_0x14235b,'isDangerous':_0x14235b,'reason':_0x14235b?_0x198e1c(0xfb):undefined};}if(_0x5f43e6===_0x198e1c(0xd7)||!_0x5f43e6&&_0x544bcc['startsWith']('INSERT'))return{'type':_0x198e1c(0xd7),'isSelectOnly':![],'isDangerous':_0x392b18,'reason':_0x392b18?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x5f43e6==='UPDATE'||!_0x5f43e6&&_0x544bcc['startsWith'](_0x198e1c(0x10e)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x392b18,'reason':_0x392b18?_0x198e1c(0x12a):undefined};if(_0x5f43e6===_0x198e1c(0x113)||!_0x5f43e6&&_0x544bcc[_0x198e1c(0xe1)]('DELETE'))return{'type':_0x198e1c(0x113),'isSelectOnly':![],'isDangerous':!![],'reason':_0x198e1c(0xd6)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x198e1c(0x12e)](_0x544bcc))return{'type':_0x198e1c(0xf0),'isSelectOnly':![],'isDangerous':!![],'reason':_0x198e1c(0x101)};return{'type':_0x198e1c(0x123),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x3602f4){const _0xf81707=a237_0x3faed6;return _0x3602f4[_0xf81707(0xe9)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0xf81707(0xe9)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0xf81707(0xe9)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x5646b7){const _0x2a09f0=a237_0x3faed6;return _0x5646b7[_0x2a09f0(0x121)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x2a09f0(0x121)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x2a09f0(0x121)](/--.*$/gm,'\x20')[_0x2a09f0(0x121)](/#.*$/gm,'\x20')[_0x2a09f0(0x121)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x458c45){const _0x5a371a=a237_0x3faed6,_0x22159c=_0x458c45['replace'](/#\{[^}]*\}/g,'?')[_0x5a371a(0x121)](/\$\{[^}]*\}/g,'?')[_0x5a371a(0x121)](/'[^']*'/g,'\x27\x27')[_0x5a371a(0x121)](/--.*$/gm,'')[_0x5a371a(0x121)](/\/\*[\s\S]*?\*\//g,''),_0x56e419=[],_0x558faf=_0x22159c[_0x5a371a(0x12d)](/FROM\s+([^\s,)(]+)/i);addTable(_0x56e419,_0x558faf?.[0x1]);for(const _0xd75507 of _0x22159c['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x56e419,_0xd75507[0x1]);}const _0x9f7e9=_0x22159c[_0x5a371a(0x12d)](/INTO\s+([^\s(]+)/i);addTable(_0x56e419,_0x9f7e9?.[0x1]);const _0x8a7c3a=_0x22159c['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x56e419,_0x8a7c3a?.[0x1]),_0x56e419;}function addTable(_0x4b3bea,_0x460dca){const _0x5a692a=a237_0x3faed6,_0x76c710=_0x460dca?.['replace'](/[`"]/g,'');_0x76c710&&_0x76c710!==UNRESOLVED_SQL_FRAGMENT&&!_0x4b3bea[_0x5a692a(0x108)](_0x76c710)&&_0x4b3bea[_0x5a692a(0xd9)](_0x76c710);}function extractParameters(_0x47b408){const _0x3b631b=a237_0x3faed6,_0x4c3e4d=new Set();for(const _0x2dc6af of _0x47b408[_0x3b631b(0xd8)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x2dc6af[0x1])_0x4c3e4d[_0x3b631b(0x12f)](_0x2dc6af[0x1]);}return Array[_0x3b631b(0x11d)](_0x4c3e4d);}export function validateSql(_0x47a5da){const _0x3c6788=a237_0x3faed6,_0x518b61=normalizeSqlForStaticAnalysis(_0x47a5da),_0x1b301c=detectNormalizedSqlType(_0x518b61),_0x3fd582=stripStaticAnalysisMarkers(_0x518b61[_0x3c6788(0xf8)]),_0x470a8e=_0x518b61['error']?[]:extractTables(_0x3fd582),_0x1be424=_0x518b61[_0x3c6788(0x11c)]?[]:extractParameters(_0x3fd582);if(_0x1b301c[_0x3c6788(0xe5)])return{'valid':![],'sqlType':_0x1b301c,'tables':_0x470a8e,'parameters':_0x1be424,'message':_0x1b301c[_0x3c6788(0xda)]||_0x1b301c[_0x3c6788(0x122)]+_0x3c6788(0x10c)};if(_0x1b301c[_0x3c6788(0x122)]===_0x3c6788(0x123))return{'valid':![],'sqlType':_0x1b301c,'tables':_0x470a8e,'parameters':_0x1be424,'message':_0x518b61['error']?_0x3c6788(0xe0)+_0x518b61['error']:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x1b301c,'tables':_0x470a8e,'parameters':_0x1be424,'message':_0x1b301c[_0x3c6788(0x122)]+_0x3c6788(0x127)+(_0x470a8e[_0x3c6788(0xee)]?_0x470a8e[_0x3c6788(0x112)](',\x20'):'unknown\x20table(s)')+(_0x1be424[_0x3c6788(0xee)]?_0x3c6788(0xfd)+_0x1be424[_0x3c6788(0x112)](',\x20'):'')};}
|
|
1
|
+
const a245_0xb0bce7=a245_0x20e2;(function(_0x183541,_0x1aa795){const _0x3d8247=a245_0x20e2,_0x17e939=_0x183541();while(!![]){try{const _0x4516d5=-parseInt(_0x3d8247(0x156))/0x1+parseInt(_0x3d8247(0x17a))/0x2+parseInt(_0x3d8247(0x15a))/0x3*(parseInt(_0x3d8247(0x149))/0x4)+parseInt(_0x3d8247(0x145))/0x5+-parseInt(_0x3d8247(0x160))/0x6+parseInt(_0x3d8247(0x17b))/0x7*(parseInt(_0x3d8247(0x146))/0x8)+-parseInt(_0x3d8247(0x153))/0x9*(-parseInt(_0x3d8247(0x191))/0xa);if(_0x4516d5===_0x1aa795)break;else _0x17e939['push'](_0x17e939['shift']());}catch(_0x559f90){_0x17e939['push'](_0x17e939['shift']());}}}(a245_0x2860,0xac60a));const MYBATIS_OUTER_TAGS=new Map([[a245_0xb0bce7(0x180),a245_0xb0bce7(0x164)],[a245_0xb0bce7(0x142),'INSERT'],['update',a245_0xb0bce7(0x157)],['delete',a245_0xb0bce7(0x168)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a245_0xb0bce7(0x198),'foreach','choose',a245_0xb0bce7(0x15d),a245_0xb0bce7(0x17f),'trim',a245_0xb0bce7(0x143),a245_0xb0bce7(0x182),a245_0xb0bce7(0x17c),a245_0xb0bce7(0x155)]),MYBATIS_BRANCH_TAGS=new Set(['if',a245_0xb0bce7(0x177),a245_0xb0bce7(0x181),'when',a245_0xb0bce7(0x17f)]);export const MYBATIS_DYNAMIC_START_MARKER=a245_0xb0bce7(0x18b);export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';function a245_0x20e2(_0x21a10a,_0x504881){_0x21a10a=_0x21a10a-0x141;const _0x2860ab=a245_0x2860();let _0x20e2d8=_0x2860ab[_0x21a10a];return _0x20e2d8;}export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a245_0xb0bce7(0x176),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a245_0xb0bce7(0x18a)+[...MYBATIS_OUTER_TAGS[a245_0xb0bce7(0x14f)]()][a245_0xb0bce7(0x172)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x1e4dd9){const _0x39e61b=a245_0xb0bce7,_0x243cb0=typeof _0x1e4dd9===_0x39e61b(0x163)?_0x1e4dd9:'';if(!startsWithMybatisStatementWrapper(_0x243cb0))return{'sql':_0x243cb0,'mode':'sql'};let _0x24cbec=0x0,_0x415c41='',_0x1aadee,_0x4aa199=![],_0x522506=![];const _0x373199=[];while(_0x24cbec<_0x243cb0['length']){if(_0x243cb0[_0x39e61b(0x170)](_0x39e61b(0x19d),_0x24cbec)){const _0x3a14e3=_0x243cb0[_0x39e61b(0x16c)](_0x39e61b(0x16d),_0x24cbec+0x4);if(_0x3a14e3<0x0)return invalidMybatisSource(_0x39e61b(0x14a));_0x415c41+='\x20',_0x24cbec=_0x3a14e3+0x3;continue;}if(_0x243cb0[_0x39e61b(0x170)](_0x39e61b(0x166),_0x24cbec)){if(!_0x4aa199||_0x522506)return invalidMybatisSource(_0x39e61b(0x152));const _0x2f25b2=_0x243cb0[_0x39e61b(0x16c)](_0x39e61b(0x184),_0x24cbec+0x9);if(_0x2f25b2<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x415c41+=_0x243cb0[_0x39e61b(0x183)](_0x24cbec+0x9,_0x2f25b2),_0x24cbec=_0x2f25b2+0x3;continue;}if(_0x243cb0[_0x39e61b(0x170)]('<?',_0x24cbec)){if(_0x4aa199)return invalidMybatisSource(_0x39e61b(0x14e));const _0x2b8eac=_0x243cb0[_0x39e61b(0x16c)]('?>',_0x24cbec+0x2);if(_0x2b8eac<0x0)return invalidMybatisSource(_0x39e61b(0x19b));_0x415c41+='\x20',_0x24cbec=_0x2b8eac+0x2;continue;}if(_0x243cb0[_0x24cbec]!=='<'){const _0x44bd56=_0x243cb0[_0x39e61b(0x16c)]('<',_0x24cbec),_0x3b5154=_0x44bd56<0x0?_0x243cb0['length']:_0x44bd56,_0x347da8=_0x243cb0[_0x39e61b(0x183)](_0x24cbec,_0x3b5154);if((!_0x4aa199||_0x522506)&&_0x347da8[_0x39e61b(0x141)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x4aa199&&!_0x522506){const _0x5a48f6=decodeXmlEntities(_0x347da8);if(_0x5a48f6===null)return invalidMybatisSource(_0x39e61b(0x18d));_0x415c41+=_0x5a48f6;}else _0x415c41+='\x20';_0x24cbec=_0x3b5154;continue;}const _0x1e4e56=findXmlTagEnd(_0x243cb0,_0x24cbec);if(_0x1e4e56<0x0)return invalidMybatisSource(_0x39e61b(0x15e));const _0x7c1168=_0x243cb0[_0x39e61b(0x183)](_0x24cbec,_0x1e4e56+0x1),_0x1842bb=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x39e61b(0x175)](_0x7c1168);if(!_0x1842bb)return invalidMybatisSource(_0x39e61b(0x194));const _0xfd02c0=_0x1842bb[0x1]==='/',_0xb1ddd0=_0x1842bb[0x2]??'',_0x3790d3=_0xb1ddd0[_0x39e61b(0x14b)](),_0x42be3e=_0x1842bb[0x3]??'',_0x184b45=_0x1842bb[0x4]==='/',_0x16f5b8=MYBATIS_OUTER_TAGS[_0x39e61b(0x165)](_0x3790d3);if(!_0x16f5b8&&!MYBATIS_DYNAMIC_TAGS[_0x39e61b(0x192)](_0x3790d3))return invalidMybatisSource(_0x39e61b(0x18e)+_0x3790d3+'>.');if(!_0x16f5b8&&_0xb1ddd0!==_0x3790d3)return invalidMybatisSource(_0x39e61b(0x16a)+_0xb1ddd0+'>.');if(_0xfd02c0){if(_0x42be3e['trim']()||_0x184b45)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0xb1ddd0+'>.');const _0x421a03=_0x373199['at'](-0x1);if(!_0x421a03||(_0x421a03[_0x39e61b(0x18c)]?_0x421a03['tagName']!==_0x3790d3:_0x421a03['rawName']!==_0xb1ddd0))return invalidMybatisSource(_0x39e61b(0x19c)+_0xb1ddd0+'>.');_0x373199['pop']();if(_0x421a03[_0x39e61b(0x18c)])_0x522506=!![];_0x415c41+=MYBATIS_BRANCH_TAGS[_0x39e61b(0x192)](_0x3790d3)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x42be3e))return invalidMybatisSource(_0x39e61b(0x193)+_0xb1ddd0+'>.');if(_0x3790d3===_0x39e61b(0x155)&&(!_0x184b45||_0x373199['at'](-0x1)?.['tagName']!=='include'))return invalidMybatisSource(_0x39e61b(0x14c));if(_0x16f5b8){if(_0x4aa199||_0x373199['length']>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x4aa199=!![],_0x522506=_0x184b45,_0x1aadee=_0x16f5b8;}else{if(!_0x4aa199||_0x522506)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<'+_0xb1ddd0+'>.');}_0x415c41+=_0x3790d3===_0x39e61b(0x198)?_0x39e61b(0x14d):_0x3790d3===_0x39e61b(0x143)?_0x39e61b(0x15b):_0x3790d3===_0x39e61b(0x17c)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x39e61b(0x192)](_0x3790d3)&&!_0x184b45?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x184b45&&_0x373199[_0x39e61b(0x189)]({'rawName':_0xb1ddd0,'tagName':_0x3790d3,'outer':!!_0x16f5b8});}_0x24cbec=_0x1e4e56+0x1;}if(_0x373199[_0x39e61b(0x178)]>0x0)return invalidMybatisSource(_0x39e61b(0x161)+_0x373199['at'](-0x1)?.[_0x39e61b(0x18f)]+'>.');if(!_0x4aa199||!_0x522506)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x415c41[_0x39e61b(0x141)](),'mode':_0x39e61b(0x196),..._0x1aadee?{'statementType':_0x1aadee}:{}};}function hasWellFormedXmlAttributes(_0x4dddb2){const _0x4efc10=a245_0xb0bce7;let _0x2142fa=0x0;const _0xc52330=new Set();while(_0x2142fa<_0x4dddb2[_0x4efc10(0x178)]){while(_0x2142fa<_0x4dddb2[_0x4efc10(0x178)]&&/\s/[_0x4efc10(0x190)](_0x4dddb2[_0x2142fa]??''))_0x2142fa+=0x1;if(_0x2142fa>=_0x4dddb2['length'])return!![];const _0x126e7f=/^[A-Za-z_:][\w:.-]*/[_0x4efc10(0x175)](_0x4dddb2[_0x4efc10(0x183)](_0x2142fa)),_0x59c726=_0x126e7f?.[0x0];if(!_0x59c726||_0xc52330[_0x4efc10(0x192)](_0x59c726))return![];_0xc52330[_0x4efc10(0x188)](_0x59c726),_0x2142fa+=_0x59c726['length'];while(_0x2142fa<_0x4dddb2[_0x4efc10(0x178)]&&/\s/['test'](_0x4dddb2[_0x2142fa]??''))_0x2142fa+=0x1;if(_0x4dddb2[_0x2142fa]!=='=')return![];_0x2142fa+=0x1;while(_0x2142fa<_0x4dddb2[_0x4efc10(0x178)]&&/\s/[_0x4efc10(0x190)](_0x4dddb2[_0x2142fa]??''))_0x2142fa+=0x1;const _0x5371f1=_0x4dddb2[_0x2142fa];if(_0x5371f1!=='\x22'&&_0x5371f1!=='\x27')return![];_0x2142fa+=0x1;const _0x1c39dc=_0x4dddb2[_0x4efc10(0x16c)](_0x5371f1,_0x2142fa);if(_0x1c39dc<0x0)return![];if(decodeXmlEntities(_0x4dddb2[_0x4efc10(0x183)](_0x2142fa,_0x1c39dc))===null)return![];_0x2142fa=_0x1c39dc+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x55df47){const _0x4c5347=a245_0xb0bce7;let _0x828687=0x0;const _0x2988c7=()=>{while(_0x828687<_0x55df47['length']&&/\s/['test'](_0x55df47[_0x828687]??''))_0x828687+=0x1;};_0x2988c7();while(_0x828687<_0x55df47[_0x4c5347(0x178)]){if(_0x55df47[_0x4c5347(0x170)](_0x4c5347(0x19d),_0x828687)){const _0x3dfd14=_0x55df47[_0x4c5347(0x16c)](_0x4c5347(0x16d),_0x828687+0x4);if(_0x3dfd14<0x0)return!![];_0x828687=_0x3dfd14+0x3,_0x2988c7();continue;}if(_0x55df47[_0x4c5347(0x170)]('<?',_0x828687)){const _0xdb257c=_0x55df47[_0x4c5347(0x16c)]('?>',_0x828687+0x2);if(_0xdb257c<0x0)return!![];_0x828687=_0xdb257c+0x2,_0x2988c7();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x4c5347(0x190)](_0x55df47[_0x4c5347(0x183)](_0x828687));}function invalidMybatisSource(_0xe60576){const _0x3011b0=a245_0xb0bce7;return{'sql':'','mode':_0x3011b0(0x196),'error':_0xe60576};}function findXmlTagEnd(_0x319100,_0x10c19a){const _0x357035=a245_0xb0bce7;let _0x42d70b;for(let _0x573b2b=_0x10c19a+0x1;_0x573b2b<_0x319100[_0x357035(0x178)];_0x573b2b+=0x1){const _0x39de55=_0x319100[_0x573b2b];if(_0x42d70b){if(_0x39de55===_0x42d70b)_0x42d70b=undefined;continue;}if(_0x39de55==='\x22'||_0x39de55==='\x27'){_0x42d70b=_0x39de55;continue;}if(_0x39de55==='>')return _0x573b2b;}return-0x1;}function decodeXmlEntities(_0x1dab68){const _0x61614d=a245_0xb0bce7;let _0x4fd5eb=![];const _0x2511c7=_0x1dab68[_0x61614d(0x174)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x36fe73=>{const _0x18d76b=_0x61614d;if(_0x36fe73==='<')return'<';if(_0x36fe73==='>')return'>';if(_0x36fe73===_0x18d76b(0x171))return'\x22';if(_0x36fe73===_0x18d76b(0x150))return'\x27';if(_0x36fe73===_0x18d76b(0x15f))return'&';const _0x26a663=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x18d76b(0x175)](_0x36fe73);if(_0x26a663){const _0x4347f4=_0x26a663[0x1],_0x585c03=_0x26a663[0x2],_0x5c79c4=Number[_0x18d76b(0x17d)](_0x4347f4??_0x585c03??'',_0x4347f4?0x10:0xa);if(isValidXmlCharacter(_0x5c79c4))return String['fromCodePoint'](_0x5c79c4);}return _0x4fd5eb=!![],'';});return _0x4fd5eb?null:_0x2511c7;}function isValidXmlCharacter(_0x537ef2){return _0x537ef2===0x9||_0x537ef2===0xa||_0x537ef2===0xd||_0x537ef2>=0x20&&_0x537ef2<=0xd7ff||_0x537ef2>=0xe000&&_0x537ef2<=0xfffd||_0x537ef2>=0x10000&&_0x537ef2<=0x10ffff;}export function detectSqlType(_0x1e0e67){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1e0e67));}function detectNormalizedSqlType(_0x12070c){const _0x39a056=a245_0xb0bce7;if(_0x12070c[_0x39a056(0x158)])return{'type':_0x39a056(0x16b),'isSelectOnly':![],'isDangerous':![],'reason':_0x12070c['error']};if(!_0x12070c[_0x39a056(0x151)]['trim']())return{'type':_0x39a056(0x16b),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x26137a=stripStaticAnalysisMarkers(_0x12070c[_0x39a056(0x151)])['replace'](/#\{[^}]*\}/g,'?')[_0x39a056(0x174)](/\$\{[^}]*\}/g,'?')[_0x39a056(0x174)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x39a056(0x174)](/\/\*[\s\S]*?\*\//g,'')[_0x39a056(0x141)](),_0x16c932=_0x26137a[_0x39a056(0x195)]('\x0a');let _0x5694f6='';for(const _0x2e0503 of _0x16c932){const _0x27591d=_0x2e0503[_0x39a056(0x141)]();if(!_0x27591d||_0x27591d[_0x39a056(0x170)]('--')||_0x27591d[_0x39a056(0x170)]('/*'))continue;_0x5694f6=_0x27591d;break;}const _0x4b073f=_0x5694f6[_0x39a056(0x16f)](),_0x5a5925=_0x12070c['statementType'],_0x55c8ca=maskSqlTextForBlockedKeywordScan(_0x26137a),_0x1bacd4=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x55c8ca);if(_0x5a5925==='SELECT'||!_0x5a5925&&(_0x4b073f[_0x39a056(0x170)](_0x39a056(0x164))||_0x4b073f[_0x39a056(0x170)](_0x39a056(0x15c)))){const _0x2a7f39=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x39a056(0x190)](_0x26137a);return{'type':_0x39a056(0x164),'isSelectOnly':!_0x2a7f39,'isDangerous':_0x2a7f39,'reason':_0x2a7f39?_0x39a056(0x187):undefined};}if(_0x5a5925===_0x39a056(0x186)||!_0x5a5925&&_0x4b073f['startsWith'](_0x39a056(0x186)))return{'type':_0x39a056(0x186),'isSelectOnly':![],'isDangerous':_0x1bacd4,'reason':_0x1bacd4?_0x39a056(0x162):undefined};if(_0x5a5925===_0x39a056(0x157)||!_0x5a5925&&_0x4b073f['startsWith'](_0x39a056(0x157)))return{'type':_0x39a056(0x157),'isSelectOnly':![],'isDangerous':_0x1bacd4,'reason':_0x1bacd4?_0x39a056(0x162):undefined};if(_0x5a5925===_0x39a056(0x168)||!_0x5a5925&&_0x4b073f['startsWith'](_0x39a056(0x168)))return{'type':_0x39a056(0x168),'isSelectOnly':![],'isDangerous':!![],'reason':_0x39a056(0x16e)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x39a056(0x190)](_0x4b073f))return{'type':_0x39a056(0x173),'isSelectOnly':![],'isDangerous':!![],'reason':_0x39a056(0x199)};return{'type':_0x39a056(0x16b),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x3fcfb6){const _0xf60fc7=a245_0xb0bce7;return _0x3fcfb6[_0xf60fc7(0x169)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0xf60fc7(0x169)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x35680e){const _0xd24a02=a245_0xb0bce7;return _0x35680e[_0xd24a02(0x174)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0xd24a02(0x174)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0xd24a02(0x174)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0xd24a02(0x174)](/--.*$/gm,'\x20')[_0xd24a02(0x174)](/#.*$/gm,'\x20')[_0xd24a02(0x174)](/\/\*[\s\S]*?\*\//g,'\x20');}function a245_0x2860(){const _0xbe34ab=['DDL','replace','exec','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','foreach','length','\x20query\x20targeting\x20','6782TNJYkP','1540oukJJs','include','parseInt','unknown\x20table(s)','otherwise','select','choose','bind','slice',']]>','type','INSERT','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','add','push','^<\x5cs*(?:','__RABETBASE_MYBATIS_DYNAMIC_START__','outer','Invalid\x20XML\x20entity\x20reference.','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','rawName','test','4750810sSsjRN','has','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','Invalid\x20MyBatis\x20XML\x20tag.','split','mybatisXml','\x20with\x20parameters:\x20','where','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','isDangerous','Unterminated\x20XML\x20declaration.','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','<!--','trim','insert','set','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','5501155xAhdvb','3288cRKjtm','matchAll','from','8mtmbzX','Unterminated\x20XML\x20comment.','toLowerCase','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','\x20WHERE\x20','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','keys',''','sql','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','9Zacjdy','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','property','223853qFzIEn','UPDATE','error','match','772041IRKdeh','\x20SET\x20','WITH','when','Unterminated\x20MyBatis\x20XML\x20tag.','&','7523436NAgDOg','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','string','SELECT','get','<![CDATA[','reason','DELETE','replaceAll','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','UNKNOWN','indexOf','-->','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','toUpperCase','startsWith','"','join'];a245_0x2860=function(){return _0xbe34ab;};return a245_0x2860();}function extractTables(_0x5491d3){const _0x458b43=a245_0xb0bce7,_0x53fbe5=_0x5491d3[_0x458b43(0x174)](/#\{[^}]*\}/g,'?')[_0x458b43(0x174)](/\$\{[^}]*\}/g,'?')[_0x458b43(0x174)](/'[^']*'/g,'\x27\x27')[_0x458b43(0x174)](/--.*$/gm,'')[_0x458b43(0x174)](/\/\*[\s\S]*?\*\//g,''),_0x3a3427=[],_0x1a9bea=_0x53fbe5['match'](/FROM\s+([^\s,)(]+)/i);addTable(_0x3a3427,_0x1a9bea?.[0x1]);for(const _0x32ac3b of _0x53fbe5[_0x458b43(0x147)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x3a3427,_0x32ac3b[0x1]);}const _0x13c496=_0x53fbe5[_0x458b43(0x159)](/INTO\s+([^\s(]+)/i);addTable(_0x3a3427,_0x13c496?.[0x1]);const _0x3e60f1=_0x53fbe5[_0x458b43(0x159)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x3a3427,_0x3e60f1?.[0x1]),_0x3a3427;}function addTable(_0x26cace,_0x48b6f1){const _0x1c0dab=a245_0xb0bce7,_0x4db355=_0x48b6f1?.['replace'](/[`"]/g,'');_0x4db355&&_0x4db355!==UNRESOLVED_SQL_FRAGMENT&&!_0x26cace['includes'](_0x4db355)&&_0x26cace[_0x1c0dab(0x189)](_0x4db355);}function extractParameters(_0x3d094a){const _0x43fdec=a245_0xb0bce7,_0xe1e42d=new Set();for(const _0x49ea52 of _0x3d094a[_0x43fdec(0x147)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x49ea52[0x1])_0xe1e42d['add'](_0x49ea52[0x1]);}return Array[_0x43fdec(0x148)](_0xe1e42d);}export function validateSql(_0x3f2932){const _0x2f6114=a245_0xb0bce7,_0x4b8134=normalizeSqlForStaticAnalysis(_0x3f2932),_0x4a7893=detectNormalizedSqlType(_0x4b8134),_0x542bb9=stripStaticAnalysisMarkers(_0x4b8134['sql']),_0x31b815=_0x4b8134[_0x2f6114(0x158)]?[]:extractTables(_0x542bb9),_0x1dce48=_0x4b8134[_0x2f6114(0x158)]?[]:extractParameters(_0x542bb9);if(_0x4a7893[_0x2f6114(0x19a)])return{'valid':![],'sqlType':_0x4a7893,'tables':_0x31b815,'parameters':_0x1dce48,'message':_0x4a7893[_0x2f6114(0x167)]||_0x4a7893[_0x2f6114(0x185)]+_0x2f6114(0x154)};if(_0x4a7893[_0x2f6114(0x185)]===_0x2f6114(0x16b))return{'valid':![],'sqlType':_0x4a7893,'tables':_0x31b815,'parameters':_0x1dce48,'message':_0x4b8134[_0x2f6114(0x158)]?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x4b8134[_0x2f6114(0x158)]:_0x2f6114(0x144)};return{'valid':!![],'sqlType':_0x4a7893,'tables':_0x31b815,'parameters':_0x1dce48,'message':_0x4a7893[_0x2f6114(0x185)]+_0x2f6114(0x179)+(_0x31b815[_0x2f6114(0x178)]?_0x31b815[_0x2f6114(0x172)](',\x20'):_0x2f6114(0x17e))+(_0x1dce48[_0x2f6114(0x178)]?_0x2f6114(0x197)+_0x1dce48[_0x2f6114(0x172)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a246_0x1113a0=a246_0x1f64;function a246_0x1f64(_0x3ce27c,_0xeaf62c){_0x3ce27c=_0x3ce27c-0xc1;const _0x4b8454=a246_0x4b84();let _0x1f6466=_0x4b8454[_0x3ce27c];return _0x1f6466;}(function(_0x34ef23,_0x5b0667){const _0x2f2c52=a246_0x1f64,_0x3c5016=_0x34ef23();while(!![]){try{const _0x5e8a7a=-parseInt(_0x2f2c52(0xc5))/0x1+-parseInt(_0x2f2c52(0xce))/0x2*(parseInt(_0x2f2c52(0xcb))/0x3)+-parseInt(_0x2f2c52(0xc1))/0x4+-parseInt(_0x2f2c52(0xc7))/0x5*(-parseInt(_0x2f2c52(0xc8))/0x6)+-parseInt(_0x2f2c52(0xc6))/0x7+parseInt(_0x2f2c52(0xcc))/0x8*(-parseInt(_0x2f2c52(0xc3))/0x9)+parseInt(_0x2f2c52(0xc9))/0xa;if(_0x5e8a7a===_0x5b0667)break;else _0x3c5016['push'](_0x3c5016['shift']());}catch(_0xedb581){_0x3c5016['push'](_0x3c5016['shift']());}}}(a246_0x4b84,0x57c68));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a246_0x4b84(){const _0x309a9d=['2EXaGSt','Set\x20appcode\x20via\x20`','649212DqJntD','Tip:\x20`','3042fWKNup','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','70869pQyPMA','3492951ohYzQE','609955Dgarqx','6wtbYha','16267040RUVytP','\x0a\x20\x20\x20\x20\x20\x20\x20','1531944yOwgNU','3464jsXmxK','Run\x20`'];a246_0x4b84=function(){return _0x309a9d;};return a246_0x4b84();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a246_0x1113a0(0xcd)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a246_0x1113a0(0xcf)+CLI_BIN_NAME+a246_0x1113a0(0xc4),a246_0x1113a0(0xc2)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.']['join'](a246_0x1113a0(0xca)),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a247_0x436f(_0x611121,_0x3bbf43){_0x611121=_0x611121-0x9b;const _0x818966=a247_0x8189();let _0x436f9e=_0x818966[_0x611121];return _0x436f9e;}(function(_0x1ca66a,_0x46101f){const _0x19d1bf=a247_0x436f,_0x1ff7ed=_0x1ca66a();while(!![]){try{const _0x2c0293=-parseInt(_0x19d1bf(0xa7))/0x1*(parseInt(_0x19d1bf(0xa3))/0x2)+parseInt(_0x19d1bf(0x9c))/0x3*(-parseInt(_0x19d1bf(0xa4))/0x4)+parseInt(_0x19d1bf(0x9e))/0x5*(-parseInt(_0x19d1bf(0x9f))/0x6)+parseInt(_0x19d1bf(0x9d))/0x7*(parseInt(_0x19d1bf(0xa6))/0x8)+-parseInt(_0x19d1bf(0xa5))/0x9+parseInt(_0x19d1bf(0xa1))/0xa+-parseInt(_0x19d1bf(0xa2))/0xb*(-parseInt(_0x19d1bf(0xa0))/0xc);if(_0x2c0293===_0x46101f)break;else _0x1ff7ed['push'](_0x1ff7ed['shift']());}catch(_0x1e26a0){_0x1ff7ed['push'](_0x1ff7ed['shift']());}}}(a247_0x8189,0x4cd58));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a247_0x186aa6}from'@lovrabet/cli-framework';function a247_0x8189(){const _0xb19b8c=['5BXRcBp','461010WxBMhD','12fpzXgB','4187390qtZsWe','8103733Zghash','264668TkepMf','1141716flTxFU','3701313ZneDjp','4168EIkUWH','4AkEjAm','map','name','3ubCUQR','6209esmEwb'];a247_0x8189=function(){return _0xb19b8c;};return a247_0x8189();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x1a590d){const _0x54f3d6=a247_0x436f,_0x3ca4fc=a247_0x186aa6(_0x1a590d,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x1a590d))return _0x3ca4fc;return _0x3ca4fc[_0x54f3d6(0xa8)](_0xec526a=>_0xec526a[_0x54f3d6(0x9b)]==='yes'?{..._0xec526a,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0xec526a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16c00e,_0x2e98ed){var _0x49f2fc=a248_0x2795,_0x509e4b=_0x16c00e();while(!![]){try{var _0x29bde0=-parseInt(_0x49f2fc(0xce))/0x1*(parseInt(_0x49f2fc(0xd3))/0x2)+-parseInt(_0x49f2fc(0xd0))/0x3+-parseInt(_0x49f2fc(0xd1))/0x4+-parseInt(_0x49f2fc(0xd2))/0x5+parseInt(_0x49f2fc(0xd4))/0x6*(-parseInt(_0x49f2fc(0xd7))/0x7)+parseInt(_0x49f2fc(0xd8))/0x8+parseInt(_0x49f2fc(0xdb))/0x9*(parseInt(_0x49f2fc(0xd5))/0xa);if(_0x29bde0===_0x2e98ed)break;else _0x509e4b['push'](_0x509e4b['shift']());}catch(_0x3d1653){_0x509e4b['push'](_0x509e4b['shift']());}}}(a248_0x1c9d,0x7f604));function a248_0x2795(_0x11636d,_0x2f5e56){_0x11636d=_0x11636d-0xce;var _0x1c9d50=a248_0x1c9d();var _0x2795e8=_0x1c9d50[_0x11636d];return _0x2795e8;}function a248_0x1c9d(){var _0x169c1e=['445817YGhNwA','def','1198815fbNkJO','3990316znybFD','459275kQuwly','4RCyojz','6288kyAGZi','30uXnuBy','structuredErrors','2569VdWHHp','4445200fdwinT','flags','defaultFormat','8194113nXRlms'];a248_0x1c9d=function(){return _0x169c1e;};return a248_0x1c9d();}import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x330092){var _0x13d539=a248_0x2795;return _0x330092?.[_0x13d539(0xd6)]===!![];}export function resolveErrorOutputFormat(_0x37caa9){var _0x224ea7=a248_0x2795;if(!_0x37caa9[_0x224ea7(0xcf)])return _0x37caa9[_0x224ea7(0xda)]??'compress';return resolveOutputConfig({'flags':_0x37caa9[_0x224ea7(0xd9)]??{},'def':_0x37caa9[_0x224ea7(0xcf)],'configDefault':_0x37caa9[_0x224ea7(0xda)]})['format'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a249_0x6ea3(_0x27da65,_0x3bce59){_0x27da65=_0x27da65-0x161;const _0x15490e=a249_0x1549();let _0x6ea39e=_0x15490e[_0x27da65];return _0x6ea39e;}const a249_0x202cfb=a249_0x6ea3;function a249_0x1549(){const _0x348f36=['menu\x20delete','585bWSZXL','64MwIYew','7CvokuY','10ELalWj','notification\x20config-delete','7023049yHwHwk','has','5394TObQuc','588456YsOVff','command','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','266934mHUeAn','487716DCLUgd','2311795ByBblO','12bigQWi','service','664WydRda','3243002EVadAj'];a249_0x1549=function(){return _0x348f36;};return a249_0x1549();}(function(_0x477d49,_0x24b6a9){const _0xb4513a=a249_0x6ea3,_0x233c0f=_0x477d49();while(!![]){try{const _0x350c7a=-parseInt(_0xb4513a(0x16a))/0x1*(parseInt(_0xb4513a(0x173))/0x2)+parseInt(_0xb4513a(0x16f))/0x3*(parseInt(_0xb4513a(0x165))/0x4)+parseInt(_0xb4513a(0x162))/0x5*(parseInt(_0xb4513a(0x163))/0x6)+-parseInt(_0xb4513a(0x166))/0x7+-parseInt(_0xb4513a(0x169))/0x8*(parseInt(_0xb4513a(0x170))/0x9)+-parseInt(_0xb4513a(0x16b))/0xa*(parseInt(_0xb4513a(0x16d))/0xb)+-parseInt(_0xb4513a(0x161))/0xc*(-parseInt(_0xb4513a(0x168))/0xd);if(_0x350c7a===_0x24b6a9)break;else _0x233c0f['push'](_0x233c0f['shift']());}catch(_0x3d3bbf){_0x233c0f['push'](_0x233c0f['shift']());}}}(a249_0x1549,0x785eb));const EXPLICIT_YES_COMMANDS=new Set([a249_0x202cfb(0x167),'kb\x20delete','notification\x20config-update',a249_0x202cfb(0x16c)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a249_0x202cfb(0x172);export function requiresExplicitYes(_0x4e5b94){const _0x591363=a249_0x202cfb;return EXPLICIT_YES_COMMANDS[_0x591363(0x16e)](_0x4e5b94[_0x591363(0x164)]+'\x20'+_0x4e5b94[_0x591363(0x171)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a250_0x3d7df2=a250_0x39e0;function a250_0x400f(){const _0x54b261=['1681841vfubgX','24pHxHif','parseFlags','1846400pqAIKq','235164hEGKwV','421576ykIzGo','1215612mAVsmM','43685rzebCf','validateFlags','2458686XcFoee'];a250_0x400f=function(){return _0x54b261;};return a250_0x400f();}(function(_0x50c833,_0x4e61bf){const _0x2a36cb=a250_0x39e0,_0x1fe6d2=_0x50c833();while(!![]){try{const _0x520076=parseInt(_0x2a36cb(0xc6))/0x1*(-parseInt(_0x2a36cb(0xca))/0x2)+parseInt(_0x2a36cb(0xc5))/0x3+parseInt(_0x2a36cb(0xcd))/0x4+-parseInt(_0x2a36cb(0xcc))/0x5+parseInt(_0x2a36cb(0xc8))/0x6+parseInt(_0x2a36cb(0xc9))/0x7+parseInt(_0x2a36cb(0xc4))/0x8;if(_0x520076===_0x4e61bf)break;else _0x1fe6d2['push'](_0x1fe6d2['shift']());}catch(_0x255f72){_0x1fe6d2['push'](_0x1fe6d2['shift']());}}}(a250_0x400f,0x42b54));function a250_0x39e0(_0x4588ce,_0x4b12f5){_0x4588ce=_0x4588ce-0xc4;const _0x400f60=a250_0x400f();let _0x39e091=_0x400f60[_0x4588ce];return _0x39e091;}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a250_0x3d7df2(0xcb)];export const validateFlags=helpers[a250_0x3d7df2(0xc7)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a251_0x177a(){const _0x2e771c=['\x20[args]\x20[flags]','9GesYDN','214045LSyoCd','5149330XPXAQr','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','9JRKhhp','450844krVTVG','\x20workspace\x20init`\x20or\x20--appcode).','generateServiceHelp','9121qubuHP','11JCuqAc','get','696525vXxXCs','replace','5026872ZclKPY','60JIVZpN','Requires\x20appcode\x20(set\x20via\x20`','664zgavKN','17381676gqEWKB','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','generateFullHelp'];a251_0x177a=function(){return _0x2e771c;};return a251_0x177a();}const a251_0x4820f4=a251_0x4905;(function(_0x1dd98d,_0x192af6){const _0x77642b=a251_0x4905,_0x29048d=_0x1dd98d();while(!![]){try{const _0x1c6965=parseInt(_0x77642b(0xbd))/0x1+parseInt(_0x77642b(0xb7))/0x2*(parseInt(_0x77642b(0xb6))/0x3)+parseInt(_0x77642b(0xc0))/0x4*(-parseInt(_0x77642b(0xb3))/0x5)+parseInt(_0x77642b(0xbf))/0x6+parseInt(_0x77642b(0xba))/0x7*(parseInt(_0x77642b(0xc2))/0x8)+-parseInt(_0x77642b(0xb2))/0x9*(-parseInt(_0x77642b(0xb4))/0xa)+parseInt(_0x77642b(0xbb))/0xb*(-parseInt(_0x77642b(0xae))/0xc);if(_0x1c6965===_0x192af6)break;else _0x29048d['push'](_0x29048d['shift']());}catch(_0x4f6312){_0x29048d['push'](_0x29048d['shift']());}}}(a251_0x177a,0xb56a5));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x597f02=>serviceGroups[a251_0x4820f4(0xbc)](_0x597f02),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a251_0x4820f4(0xc1)+CLI_BIN_NAME+a251_0x4820f4(0xb8),'serviceUsageSuffix':a251_0x4820f4(0xb1)});export function generateCommandHelp(_0x4d2b17){const _0x415336=a251_0x4820f4,_0x42b4e5=generators['generateCommandHelp'](_0x4d2b17);if(!requiresExplicitYes(_0x4d2b17))return _0x42b4e5;return _0x42b4e5[_0x415336(0xbe)](_0x415336(0xb5),_0x415336(0xaf));}function a251_0x4905(_0x175723,_0x304fb5){_0x175723=_0x175723-0xae;const _0x177aec=a251_0x177a();let _0x49054d=_0x177aec[_0x175723];return _0x49054d;}export const generateServiceHelp=generators[a251_0x4820f4(0xb9)];export const generateFullHelp=generators[a251_0x4820f4(0xb0)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ee349,_0x3922d5){var _0x301660=a252_0x2fcd,_0x29105c=_0x3ee349();while(!![]){try{var _0x14eafb=parseInt(_0x301660(0xaf))/0x1+-parseInt(_0x301660(0xae))/0x2*(-parseInt(_0x301660(0xb4))/0x3)+-parseInt(_0x301660(0xb0))/0x4*(parseInt(_0x301660(0xb5))/0x5)+-parseInt(_0x301660(0xb6))/0x6+-parseInt(_0x301660(0xb3))/0x7+-parseInt(_0x301660(0xb1))/0x8*(-parseInt(_0x301660(0xad))/0x9)+parseInt(_0x301660(0xb2))/0xa;if(_0x14eafb===_0x3922d5)break;else _0x29105c['push'](_0x29105c['shift']());}catch(_0x20703d){_0x29105c['push'](_0x29105c['shift']());}}}(a252_0x5e85,0xc0616));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';function a252_0x2fcd(_0x350641,_0x53dc4e){_0x350641=_0x350641-0xad;var _0x5e8542=a252_0x5e85();var _0x2fcd17=_0x5e8542[_0x350641];return _0x2fcd17;}function a252_0x5e85(){var _0x15a856=['8LvlxSf','9223990oBssnG','7708855PMIjXd','15MFHDhO','385tJZpCQ','4680498zmYcDu','8288919lXHUIh','99034cKEZUc','657057pnFRdb','4088HqXVeZ'];a252_0x5e85=function(){return _0x15a856;};return a252_0x5e85();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fa1ca,_0x4f8488){const _0x16161e=a253_0x41b2,_0x2021a6=_0x2fa1ca();while(!![]){try{const _0x2e6073=parseInt(_0x16161e(0x18d))/0x1+-parseInt(_0x16161e(0x188))/0x2+-parseInt(_0x16161e(0x18a))/0x3*(-parseInt(_0x16161e(0x18c))/0x4)+parseInt(_0x16161e(0x198))/0x5*(-parseInt(_0x16161e(0x190))/0x6)+-parseInt(_0x16161e(0x187))/0x7*(-parseInt(_0x16161e(0x182))/0x8)+-parseInt(_0x16161e(0x199))/0x9+-parseInt(_0x16161e(0x181))/0xa*(-parseInt(_0x16161e(0x193))/0xb);if(_0x2e6073===_0x4f8488)break;else _0x2021a6['push'](_0x2021a6['shift']());}catch(_0x25f3c1){_0x2021a6['push'](_0x2021a6['shift']());}}}(a253_0x1467,0x8d292));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';function a253_0x1467(){const _0x2aba0d=['10510KGeDNY','1637224EUtcCk','error','update','format','jqFilter','7PMjPno','2176914oVdHTx','data','3lryptr','code','3732796mTFgpH','269332PuuBJs','pretty','hint','6SvnBAs','_notice','stringify','13134AccmpR','url','endsWith','json','message','399800ZzzGEY','8239203PwnTYK','stdout','jq:\x20','risk'];a253_0x1467=function(){return _0x2aba0d;};return a253_0x1467();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x40332b,_0x583f07){const _0x6dfca3=a253_0x41b2,_0x5990aa=_0x40332b[_0x6dfca3(0x191)],{_notice:_0x6c9e8f,..._0x3391d3}=_0x40332b;void _0x6c9e8f,baseFormatOutput(_0x3391d3,_0x583f07),_0x583f07['format']==='pretty'&&printPrettyNotice(_0x5990aa);}export function formatCliError(_0x4bbd04,_0x3037e5){const _0x32ba28=a253_0x41b2;if(_0x3037e5['format']===_0x32ba28(0x18e))return![];const _0x46a62e=_0x4bbd04[_0x32ba28(0x189)],_0x139a51={'ok':![],'command':_0x3037e5['command'],'risk':_0x3037e5[_0x32ba28(0x180)],'data':_0x46a62e??null,'error':{'code':_0x4bbd04[_0x32ba28(0x18b)],'message':_0x4bbd04[_0x32ba28(0x197)],..._0x4bbd04['hint']?{'hint':_0x4bbd04['hint']}:{}}},_0x591f27=_0x3037e5[_0x32ba28(0x185)]===_0x32ba28(0x196)?JSON['stringify'](_0x139a51,null,0x2):JSON[_0x32ba28(0x192)](_0x139a51);let _0x17593e=_0x591f27;if(_0x3037e5[_0x32ba28(0x186)]?.['trim']())try{_0x17593e=applyJqFilter(_0x591f27,_0x3037e5[_0x32ba28(0x186)]);}catch(_0x563a7c){const _0x1ccc9c=_0x563a7c instanceof CliError?_0x563a7c:CliErrors['validation'](_0x32ba28(0x17f)+(_0x563a7c instanceof Error?_0x563a7c['message']:String(_0x563a7c))),_0x5d3d04={..._0x139a51,'error':{'code':_0x1ccc9c[_0x32ba28(0x18b)],'message':_0x1ccc9c[_0x32ba28(0x197)],..._0x1ccc9c['hint']?{'hint':_0x1ccc9c[_0x32ba28(0x18f)]}:{},'cause':_0x139a51['error']}};_0x17593e=_0x3037e5[_0x32ba28(0x185)]===_0x32ba28(0x196)?JSON[_0x32ba28(0x192)](_0x5d3d04,null,0x2):JSON['stringify'](_0x5d3d04);}return process[_0x32ba28(0x19a)]['write'](_0x17593e[_0x32ba28(0x195)]('\x0a')?_0x17593e:_0x17593e+'\x0a'),!![];}function a253_0x41b2(_0x1260be,_0x6d480){_0x1260be=_0x1260be-0x17f;const _0x1467dc=a253_0x1467();let _0x41b263=_0x1467dc[_0x1260be];return _0x41b263;}function printPrettyNotice(_0x11e84c){const _0x2c4ce4=a253_0x41b2;if(!_0x11e84c?.['update'])return;console[_0x2c4ce4(0x183)](_0x11e84c[_0x2c4ce4(0x184)][_0x2c4ce4(0x197)]+'\x20('+_0x11e84c[_0x2c4ce4(0x184)][_0x2c4ce4(0x194)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x446ccf,_0x196181){var _0x169857=a254_0x2605,_0x534060=_0x446ccf();while(!![]){try{var _0x7cad05=-parseInt(_0x169857(0x19b))/0x1+-parseInt(_0x169857(0x199))/0x2*(parseInt(_0x169857(0x19a))/0x3)+-parseInt(_0x169857(0x196))/0x4*(-parseInt(_0x169857(0x197))/0x5)+-parseInt(_0x169857(0x192))/0x6*(-parseInt(_0x169857(0x195))/0x7)+-parseInt(_0x169857(0x194))/0x8+-parseInt(_0x169857(0x198))/0x9+parseInt(_0x169857(0x193))/0xa;if(_0x7cad05===_0x196181)break;else _0x534060['push'](_0x534060['shift']());}catch(_0x108b12){_0x534060['push'](_0x534060['shift']());}}}(a254_0x4acd,0xe6653));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a254_0x2605(_0x5e7899,_0x1de9e8){_0x5e7899=_0x5e7899-0x192;var _0x4acda2=a254_0x4acd();var _0x260534=_0x4acda2[_0x5e7899];return _0x260534;}function a254_0x4acd(){var _0x59f5fb=['6458418ZNsiKn','302vmWTvP','13932wxdnyn','1862506pTUARC','97218kbZjoN','39973270zeeVhT','13233480IdxyrV','560aMkLjn','668DNAZBL','17535PkrACf'];a254_0x4acd=function(){return _0x59f5fb;};return a254_0x4acd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b4cf1,_0x2488d3){const _0x3ad731=a255_0x4436,_0x5c348b=_0x1b4cf1();while(!![]){try{const _0x152216=-parseInt(_0x3ad731(0x1a8))/0x1*(parseInt(_0x3ad731(0x1b8))/0x2)+parseInt(_0x3ad731(0x1ae))/0x3*(parseInt(_0x3ad731(0x1b0))/0x4)+parseInt(_0x3ad731(0x1be))/0x5*(parseInt(_0x3ad731(0x1a9))/0x6)+parseInt(_0x3ad731(0x1b9))/0x7*(-parseInt(_0x3ad731(0x1ad))/0x8)+-parseInt(_0x3ad731(0x1bc))/0x9+-parseInt(_0x3ad731(0x1b2))/0xa*(parseInt(_0x3ad731(0x1ac))/0xb)+parseInt(_0x3ad731(0x1ba))/0xc;if(_0x152216===_0x2488d3)break;else _0x5c348b['push'](_0x5c348b['shift']());}catch(_0x26f158){_0x5c348b['push'](_0x5c348b['shift']());}}}(a255_0x1d5e,0xed3c5));function a255_0x1d5e(){const _0x4b2d9f=['name','No\x20api.ts\x20found\x20in\x20','alias','string','3548rnpcct','1457995IQptzg','27805956qrDlur','length','10548324SvIICt','Available\x20aliases:\x20','55zEGeaG','type','\x20api\x20pull`\x20first.','457ZhHbXa','407868rjKyVt','code','join','2156rELKln','40TRKXgd','168429lcTVtm','some','116BywHah','flags','35570KrSPkR','map'];a255_0x1d5e=function(){return _0x4b2d9f;};return a255_0x1d5e();}function a255_0x4436(_0x3ea9bb,_0x4eacba){_0x3ea9bb=_0x3ea9bb-0x1a7;const _0x1d5ec6=a255_0x1d5e();let _0x4436bf=_0x1d5ec6[_0x3ea9bb];return _0x4436bf;}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x2f1513,_0x3f2c88,_0x36d033,_0x3aea00){const _0x1096df=a255_0x4436,_0x43d43c=_0x2f1513[_0x1096df(0x1b1)]['some'](_0x3b5c7b=>_0x3b5c7b['name']===_0x1096df(0x1aa)&&_0x3b5c7b[_0x1096df(0x1bf)]===_0x1096df(0x1b7)),_0x294f69=_0x2f1513[_0x1096df(0x1b1)][_0x1096df(0x1af)](_0x238561=>_0x238561[_0x1096df(0x1b4)]===_0x1096df(0x1b6)&&_0x238561[_0x1096df(0x1bf)]===_0x1096df(0x1b7));if(!_0x43d43c||!_0x294f69)return;const _0xcc99fb=_0x3f2c88[_0x1096df(0x1aa)]?String(_0x3f2c88[_0x1096df(0x1aa)]):'',_0x99ec69=_0x3f2c88[_0x1096df(0x1b6)]?String(_0x3f2c88[_0x1096df(0x1b6)]):'';if(!_0xcc99fb&&!_0x99ec69)throw CliErrors['validation']('`'+_0x3aea00+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x99ec69&&!_0xcc99fb){const _0x40bc09=resolveAlias(_0x36d033,_0x99ec69);if(!_0x40bc09){const _0x3f22f1=listAliases(_0x36d033)[_0x1096df(0x1b3)](_0x2ff622=>_0x2ff622[_0x1096df(0x1b6)]),_0x3c8947=_0x3f22f1[_0x1096df(0x1bb)]?_0x1096df(0x1bd)+_0x3f22f1[_0x1096df(0x1ab)](',\x20'):_0x1096df(0x1b5)+_0x36d033+'.\x20Run\x20`'+CLI_BIN_NAME+_0x1096df(0x1a7);throw CliErrors['validation']('Unknown\x20alias\x20\x22'+_0x99ec69+'\x22.\x20'+_0x3c8947);}_0x3f2c88[_0x1096df(0x1aa)]=_0x40bc09;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x14036c,_0x1b0481){const _0x3d6707=a248_0x397c,_0x379d31=_0x14036c();while(!![]){try{const _0x1f658a=parseInt(_0x3d6707(0x1f5))/0x1+parseInt(_0x3d6707(0x1ed))/0x2*(-parseInt(_0x3d6707(0x221))/0x3)+parseInt(_0x3d6707(0x21c))/0x4+-parseInt(_0x3d6707(0x203))/0x5*(-parseInt(_0x3d6707(0x1e7))/0x6)+parseInt(_0x3d6707(0x21e))/0x7+-parseInt(_0x3d6707(0x1ff))/0x8+parseInt(_0x3d6707(0x20f))/0x9*(parseInt(_0x3d6707(0x222))/0xa);if(_0x1f658a===_0x1b0481)break;else _0x379d31['push'](_0x379d31['shift']());}catch(_0x55f26a){_0x379d31['push'](_0x379d31['shift']());}}}(a248_0x35da,0x94a59));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a248_0x527c05}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0xc15119){const _0xebd139=a248_0x397c;return typeof _0xc15119===_0xebd139(0x219)&&_0xc15119[_0xebd139(0x1f0)]()?_0xc15119[_0xebd139(0x1f0)]():undefined;}function resolveEnvAppCode(){const _0x39f22a=a248_0x397c,_0x550609=stringFlag(process.env.RABETBASE_APPCODE);if(_0x550609)return{'name':'RABETBASE_APPCODE','value':_0x550609};const _0x32be08=stringFlag(process.env.LOVRABET_APPCODE);if(_0x32be08)return{'name':_0x39f22a(0x1f9),'value':_0x32be08};return undefined;}function hasExplicitAppCode(_0x4fa22a,_0xe41c42){const _0x4db25f=a248_0x397c;return!!(stringFlag(_0x4fa22a['appcode'])||stringFlag(_0xe41c42[_0x4db25f(0x1f6)]));}function assertEnvAppCodeNotIgnored(_0x2fc265,_0x2714d9,_0x3f565f){const _0x14c20b=a248_0x397c;if(!_0x2714d9||_0x3f565f||_0x2fc265===_0x2714d9[_0x14c20b(0x1ea)])return;const _0x2e4e6d=_0x2fc265?_0x14c20b(0x201)+_0x2fc265+'\x22.':_0x14c20b(0x1f2);throw CliErrors[_0x14c20b(0x214)](_0x2714d9[_0x14c20b(0x1fc)]+'='+_0x2714d9[_0x14c20b(0x1ea)]+_0x14c20b(0x1f1)+_0x2e4e6d+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0x2714d9['name']+'\x22.'));}export function createPipelineEnv(_0x345a60,_0x53aa49,_0x17a4c9=[]){const _0x5cdf50=a248_0x397c;return{'rawFlags':_0x53aa49,'args':_0x17a4c9,'resolveAppCode':()=>_0x345a60[_0x5cdf50(0x1e5)],'resolveCookie':()=>_0x345a60[_0x5cdf50(0x211)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a248_0x527c05(_0x53aa49),'defaultFormat':_0x345a60[_0x5cdf50(0x204)],'defaultPageSize':_0x345a60[_0x5cdf50(0x213)],'defaultVerbose':_0x345a60[_0x5cdf50(0x205)],'apiDir':_0x345a60[_0x5cdf50(0x1f8)],'riskLevel':_0x345a60[_0x5cdf50(0x218)],'selectedAppName':_0x345a60[_0x5cdf50(0x1f3)],'mergedCli':{'defaultApp':_0x345a60['defaultApp'],'currentApp':_0x345a60['currentApp'],'appCode':_0x345a60[_0x5cdf50(0x1e5)],'apps':_0x345a60[_0x5cdf50(0x20e)]}};}export function createRabetbaseRunnerAdapter(_0x1755b0={}){const _0x37e774=a248_0x397c;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x37e774(0x21b)](_0x1417d4=>PIPELINE_FLAG_NAMES[_0x37e774(0x1fe)](_0x1417d4[_0x37e774(0x1fc)]))['map'](({name:_0x11ac82,type:_0x2fa6ea,description:_0xaa8cbd})=>({'name':_0x11ac82,'type':_0x2fa6ea,'description':_0xaa8cbd})),'formatOutput':_0x1755b0[_0x37e774(0x1e9)]??formatOutput,'getCommandLabel'(_0x117f81){return CLI_BIN_NAME+'\x20'+_0x117f81['service']+'\x20'+_0x117f81['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1b35b9){const _0x137fbe=_0x37e774;return CliErrors[_0x137fbe(0x214)](_0x1b35b9);}},async 'prepare'(_0x1eddbe,_0x2788a0,_0xb9991b,_0x4d3731){const _0x50ca8a=_0x37e774,_0x346b4a=_0x2788a0[_0x50ca8a(0x1f8)]||DEFAULT_API_DIR;resolveAliasToCode(_0x1eddbe,_0xb9991b,_0x346b4a,_0x4d3731);const _0x223744=resolveCommandAuthMode(_0x1eddbe);let _0x55ed26='';if(_0x223744!==_0x50ca8a(0x1fa)){_0x55ed26=_0x2788a0[_0x50ca8a(0x220)]()||'';if(!_0x55ed26){if(_0x223744==='required')throw CliErrors[_0x50ca8a(0x208)]();}else{const {setActiveCookie:_0x414013}=await import('../core/api-client.js');_0x414013(_0x55ed26);}}const _0x48f43b=_0x2788a0[_0x50ca8a(0x212)]()??'';if(_0x1eddbe[_0x50ca8a(0x1eb)]!==![]){assertEnvAppCodeNotIgnored(_0x48f43b,resolveEnvAppCode(),hasExplicitAppCode(_0xb9991b,_0x2788a0[_0x50ca8a(0x210)]));if(!_0x48f43b)throw CliErrors['configMissing'](_0x50ca8a(0x1fd)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}return{'defaults':{'booleans':{'verbose':_0x2788a0[_0x50ca8a(0x209)]},'numbers':{'pagesize':_0x2788a0[_0x50ca8a(0x20c)]}},'extras':{'appCode':_0x48f43b,'cookie':_0x55ed26,'apiDomain':_0x2788a0[_0x50ca8a(0x1e8)](),'apiDir':_0x346b4a,'selectedAppName':_0x2788a0['selectedAppName'],'mergedCli':_0x2788a0[_0x50ca8a(0x1f7)]}};},'confirmHighRisk':_0x1755b0['confirmHighRisk']??(async({env:_0x433da3,commandLabel:_0x43a7eb})=>{const _0x524e17=_0x37e774;if(_0x433da3[_0x524e17(0x20b)])throw CliErrors[_0x524e17(0x214)]('High-risk\x20operation\x20`'+_0x43a7eb+_0x524e17(0x215));await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x43a7eb,_0x524e17(0x21f)],'createCancelledError':_0x548123=>CliErrors['cancelled'](_0x548123)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const {clearActiveCookie:_0x3dffa9}=await import('../core/api-client.js');_0x3dffa9();}export async function finalizeRabetbaseRuntimeState(){const _0x338ee7=a248_0x397c;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x588fdf},{initEnv:_0x360345}]=await Promise['all']([import(_0x338ee7(0x1ec)),import(_0x338ee7(0x1ef))]);_0x588fdf(),_0x360345('production');}}export async function runCommand(_0xd03824,_0x16a9aa,_0x4059c8=terminalRunnerAdapter){assertRejectedFlags(_0xd03824,_0x16a9aa['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0xd03824)?withUpdateNotice(_0xd03824):_0xd03824,_0x16a9aa,_0x4059c8);}function assertRejectedFlags(_0x453234,_0x3e1c37){const _0x30e8bf=a248_0x397c;for(const _0x5d9cea of _0x453234['rejectedFlags']??[]){const _0x1ecd42=GLOBAL_FLAGS[_0x30e8bf(0x200)](_0x1a100f=>_0x1a100f['name']===_0x5d9cea[_0x30e8bf(0x1fc)]),_0x530d1b=new Set([_0x5d9cea[_0x30e8bf(0x1fc)],toCamelCase(_0x5d9cea[_0x30e8bf(0x1fc)]),_0x1ecd42?.[_0x30e8bf(0x1fb)]]),_0x2909d5=[..._0x530d1b][_0x30e8bf(0x20d)](_0x38994c=>{if(!_0x38994c)return![];const _0x30b314=_0x3e1c37[_0x38994c];return _0x30b314!==undefined&&_0x30b314!==null&&_0x30b314!==![];});if(_0x2909d5)throw CliErrors['validation'](_0x5d9cea[_0x30e8bf(0x1f4)],_0x5d9cea['hint']);}}function toCamelCase(_0x40a5b5){return _0x40a5b5['replace'](/-([a-z])/g,(_0x280e82,_0x1ba32c)=>_0x1ba32c['toUpperCase']());}function shouldAttachUpdateNotice(_0x203269){const _0x3d6708=a248_0x397c;if(_0x203269[_0x3d6708(0x206)]===![])return![];return![_0x3d6708(0x1e6),_0x3d6708(0x21a),_0x3d6708(0x1ee)][_0x3d6708(0x217)](_0x203269['service']);}function withUpdateNotice(_0x2b2d0b){return{..._0x2b2d0b,async 'execute'(_0xee95d5){const _0x3b551c=a248_0x397c,_0x2ddfd7=shouldResolveUpdateNotice(_0xee95d5)?resolveLatestUpdateNotice()[_0x3b551c(0x1e4)](()=>null):Promise[_0x3b551c(0x202)](null),_0x585ad2=await _0x2b2d0b[_0x3b551c(0x207)](_0xee95d5);return attachUpdateNotice(_0x585ad2,await _0x2ddfd7);}};}function shouldResolveUpdateNotice(_0x56233e){const _0x4a6f37=a248_0x397c;return _0x56233e[_0x4a6f37(0x204)]===_0x4a6f37(0x21d)&&!_0x56233e[_0x4a6f37(0x216)];}function a248_0x397c(_0x5e82df,_0x54708a){_0x5e82df=_0x5e82df-0x1e4;const _0x35dad6=a248_0x35da();let _0x397c33=_0x35dad6[_0x5e82df];return _0x397c33;}function attachUpdateNotice(_0x35d9ca,_0x446bba){const _0x456ee4=a248_0x397c;if(!_0x446bba||!_0x35d9ca||typeof _0x35d9ca!==_0x456ee4(0x20a))return _0x35d9ca;const _0x49f49c=_0x35d9ca,_0x71e0b9=typeof _0x49f49c[_0x456ee4(0x223)]===_0x456ee4(0x20a)&&_0x49f49c['_notice']!==null?_0x49f49c[_0x456ee4(0x223)]:{};return{..._0x49f49c,'_notice':{..._0x71e0b9,'update':_0x446bba}};}function a248_0x35da(){const _0x54461a=['catch','appCode','update','169836vtaYXU','resolveApiDomain','formatOutput','value','requiresAppCode','../constant/domain.js','2EtoHnF','doctor','../constant/env.js','trim','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','explicitAppName','message','21577KXmhra','appcode','mergedCli','apiDir','LOVRABET_APPCODE','none','meowKey','name','Set\x20appcode\x20via\x20`','has','3226232BShbyl','find','Current\x20resolved\x20appcode\x20is\x20\x22','resolve','90kCiJUU','format','verbose','hasFormat','execute','authRequired','defaultVerbose','object','isNonInteractive','defaultPageSize','some','apps','38907shqfPk','rawFlags','cookie','resolveAppCode','pageSize','validation','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','nonInteractive','includes','riskLevel','string','schema','filter','747764xGskne','pretty','2412375egdqxD','\x20\x20\x20Continue?\x20[y/N]\x20','resolveCookie','1954236FLZVfo','1390DiVdhC','_notice'];a248_0x35da=function(){return _0x54461a;};return a248_0x35da();}
|
|
1
|
+
(function(_0x5dab49,_0x33fd9b){const _0x15684d=a256_0x4328,_0x239bce=_0x5dab49();while(!![]){try{const _0x57f937=parseInt(_0x15684d(0x20a))/0x1*(parseInt(_0x15684d(0x21f))/0x2)+parseInt(_0x15684d(0x224))/0x3+-parseInt(_0x15684d(0x216))/0x4*(parseInt(_0x15684d(0x234))/0x5)+parseInt(_0x15684d(0x204))/0x6*(-parseInt(_0x15684d(0x1f5))/0x7)+parseInt(_0x15684d(0x223))/0x8+parseInt(_0x15684d(0x201))/0x9+-parseInt(_0x15684d(0x227))/0xa*(parseInt(_0x15684d(0x21a))/0xb);if(_0x57f937===_0x33fd9b)break;else _0x239bce['push'](_0x239bce['shift']());}catch(_0x1f1a74){_0x239bce['push'](_0x239bce['shift']());}}}(a256_0x44fe,0x256ea));function a256_0x44fe(){const _0x39cd7f=['currentApp','meowKey','21oDbPNu','schema','filter','command','some','resolve','message','replace','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','../constant/env.js','isNonInteractive','requiresAppCode','1949886ZfPPyb','appCode','includes','267846tIRigQ','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','formatOutput','format','../core/api-client.js','name','146nTDaAf','pretty','Edit\x20the\x20config\x20file\x20manually','RABETBASE_APPCODE','service','hasFormat','value','toUpperCase','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','apiDir','risk','appcode','51652vuEagS','object','find','Set\x20appcode\x20via\x20`','143LTTstb','cookie','apps','mergedCli','../constant/domain.js','1526fYzhOe','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','doctor','configMissing','1061760EWihhh','340167tnBHgP','⚠\x20\x20High-risk\x20operation:\x20','production','12110itriVv','nonInteractive','validation','explicitAppName','resolveAppCode','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','rawFlags','confirmHighRisk','catch','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','trim','hint','resolveApiDomain','105juiJRr','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','all','execute','_notice','required','High-risk\x20operation\x20`','defaultApp'];a256_0x44fe=function(){return _0x39cd7f;};return a256_0x44fe();}import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a256_0x37f04c}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x4bb4e7){const _0x2f922c=a256_0x4328;return typeof _0x4bb4e7==='string'&&_0x4bb4e7[_0x2f922c(0x231)]()?_0x4bb4e7[_0x2f922c(0x231)]():undefined;}function resolveEnvAppCode(){const _0x25ceca=a256_0x4328,_0x2d1b16=stringFlag(process.env.RABETBASE_APPCODE);if(_0x2d1b16)return{'name':_0x25ceca(0x20d),'value':_0x2d1b16};const _0x21bc1b=stringFlag(process.env.LOVRABET_APPCODE);if(_0x21bc1b)return{'name':'LOVRABET_APPCODE','value':_0x21bc1b};return undefined;}function hasExplicitAppCode(_0x117ba9,_0x31b3cf){const _0x407f74=a256_0x4328;return!!(stringFlag(_0x117ba9[_0x407f74(0x215)])||stringFlag(_0x31b3cf[_0x407f74(0x215)]));}function assertEnvAppCodeNotIgnored(_0x3d3960,_0x4e6a12,_0x3cba4c){const _0x18f939=a256_0x4328;if(!_0x4e6a12||_0x3cba4c||_0x3d3960===_0x4e6a12[_0x18f939(0x210)])return;const _0xcc2f23=_0x3d3960?'Current\x20resolved\x20appcode\x20is\x20\x22'+_0x3d3960+'\x22.':_0x18f939(0x230);throw CliErrors[_0x18f939(0x229)](_0x4e6a12[_0x18f939(0x209)]+'='+_0x4e6a12[_0x18f939(0x210)]+_0x18f939(0x1fd)+_0xcc2f23+'\x20'+(_0x18f939(0x22c)+_0x4e6a12[_0x18f939(0x209)]+'\x22.'));}export function createPipelineEnv(_0x4f5c20,_0x6edf8a,_0x32c0ea=[]){const _0x159877=a256_0x4328;return{'rawFlags':_0x6edf8a,'args':_0x32c0ea,'resolveAppCode':()=>_0x4f5c20['appCode'],'resolveCookie':()=>_0x4f5c20[_0x159877(0x21b)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a256_0x37f04c(_0x6edf8a),'defaultFormat':_0x4f5c20[_0x159877(0x207)],'defaultPageSize':_0x4f5c20['pageSize'],'defaultVerbose':_0x4f5c20['verbose'],'apiDir':_0x4f5c20[_0x159877(0x213)],'riskLevel':_0x4f5c20['riskLevel'],'selectedAppName':_0x4f5c20[_0x159877(0x22a)],'mergedCli':{'defaultApp':_0x4f5c20[_0x159877(0x1f2)],'currentApp':_0x4f5c20[_0x159877(0x1f3)],'appCode':_0x4f5c20[_0x159877(0x202)],'apps':_0x4f5c20[_0x159877(0x21c)]}};}function a256_0x4328(_0x193dde,_0x4db04b){_0x193dde=_0x193dde-0x1ed;const _0x44fe10=a256_0x44fe();let _0x432899=_0x44fe10[_0x193dde];return _0x432899;}export function createRabetbaseRunnerAdapter(_0x18f422={}){const _0x3716ca=a256_0x4328;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x3716ca(0x1f7)](_0x1ff8bd=>PIPELINE_FLAG_NAMES['has'](_0x1ff8bd[_0x3716ca(0x209)]))['map'](({name:_0x3c4e45,type:_0x542dbd,description:_0x19d1ee})=>({'name':_0x3c4e45,'type':_0x542dbd,'description':_0x19d1ee})),'formatOutput':_0x18f422[_0x3716ca(0x206)]??formatOutput,'getCommandLabel'(_0x13d143){const _0x389de2=_0x3716ca;return CLI_BIN_NAME+'\x20'+_0x13d143[_0x389de2(0x20e)]+'\x20'+_0x13d143[_0x389de2(0x1f8)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1a09b3,{def:_0x25645f}){const _0xcf0fd9=_0x3716ca,_0x378fd7=_0x1a09b3[_0xcf0fd9(0x203)](_0xcf0fd9(0x20c))?_0xcf0fd9(0x235):_0xcf0fd9(0x220)+_0x25645f[_0xcf0fd9(0x214)]+_0xcf0fd9(0x205)+_0xcf0fd9(0x235);return CliErrors['validation'](_0x1a09b3+'\x0a\x20\x20'+_0x378fd7);}},async 'prepare'(_0x476cf6,_0x4ee446,_0x3429eb,_0x9b280){const _0x378927=_0x3716ca,_0x1c6d08=_0x4ee446['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0x476cf6,_0x3429eb,_0x1c6d08,_0x9b280);const _0xf2e77d=resolveCommandAuthMode(_0x476cf6);let _0x3efe61='';if(_0xf2e77d!=='none'){_0x3efe61=_0x4ee446['resolveCookie']()||'';if(!_0x3efe61){if(_0xf2e77d===_0x378927(0x1f0))throw CliErrors['authRequired']();}else{const {setActiveCookie:_0x6d6ecc}=await import(_0x378927(0x208));_0x6d6ecc(_0x3efe61);}}const _0x4b07e5=_0x4ee446[_0x378927(0x22b)]()??'';if(_0x476cf6[_0x378927(0x200)]!==![]){assertEnvAppCodeNotIgnored(_0x4b07e5,resolveEnvAppCode(),hasExplicitAppCode(_0x3429eb,_0x4ee446[_0x378927(0x22d)]));if(!_0x4b07e5)throw CliErrors[_0x378927(0x222)](_0x378927(0x219)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}return{'defaults':{'booleans':{'verbose':_0x4ee446['defaultVerbose']},'numbers':{'pagesize':_0x4ee446['defaultPageSize']}},'extras':{'appCode':_0x4b07e5,'cookie':_0x3efe61,'apiDomain':_0x4ee446[_0x378927(0x233)](),'apiDir':_0x1c6d08,'selectedAppName':_0x4ee446['selectedAppName'],'mergedCli':_0x4ee446[_0x378927(0x21d)]}};},'confirmHighRisk':_0x18f422[_0x3716ca(0x22e)]??(async({env:_0xed2c0b,commandLabel:_0x5cecb0})=>{const _0x12abdf=_0x3716ca;if(_0xed2c0b[_0x12abdf(0x1ff)])throw CliErrors[_0x12abdf(0x229)](_0x12abdf(0x1f1)+_0x5cecb0+_0x12abdf(0x212));await requireConfirmationPrompt({'lines':[_0x12abdf(0x225)+_0x5cecb0,'\x20\x20\x20Continue?\x20[y/N]\x20'],'createCancelledError':_0xc6845d=>CliErrors['cancelled'](_0xc6845d)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x43cea7=a256_0x4328,{clearActiveCookie:_0xa8f674}=await import(_0x43cea7(0x208));_0xa8f674();}export async function finalizeRabetbaseRuntimeState(){const _0x555e75=a256_0x4328;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x4124dd},{initEnv:_0x5e933f}]=await Promise[_0x555e75(0x1ed)]([import(_0x555e75(0x21e)),import(_0x555e75(0x1fe))]);_0x4124dd(),_0x5e933f(_0x555e75(0x226));}}export async function runCommand(_0x25cb4b,_0xb2a08a,_0x44e0eb=terminalRunnerAdapter){assertRejectedFlags(_0x25cb4b,_0xb2a08a['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x25cb4b)?withUpdateNotice(_0x25cb4b):_0x25cb4b,_0xb2a08a,_0x44e0eb);}function assertRejectedFlags(_0x11573c,_0x16a554){const _0x456f0b=a256_0x4328;for(const _0x316728 of _0x11573c['rejectedFlags']??[]){const _0x21fb99=GLOBAL_FLAGS[_0x456f0b(0x218)](_0x45de14=>_0x45de14[_0x456f0b(0x209)]===_0x316728[_0x456f0b(0x209)]),_0x109667=new Set([_0x316728[_0x456f0b(0x209)],toCamelCase(_0x316728[_0x456f0b(0x209)]),_0x21fb99?.[_0x456f0b(0x1f4)]]),_0x3afc0f=[..._0x109667][_0x456f0b(0x1f9)](_0x4eb51e=>{if(!_0x4eb51e)return![];const _0x1a6b5c=_0x16a554[_0x4eb51e];return _0x1a6b5c!==undefined&&_0x1a6b5c!==null&&_0x1a6b5c!==![];});if(_0x3afc0f)throw CliErrors[_0x456f0b(0x229)](_0x316728[_0x456f0b(0x1fb)],_0x316728[_0x456f0b(0x232)]);}}function toCamelCase(_0x1bdeba){const _0x5094c6=a256_0x4328;return _0x1bdeba[_0x5094c6(0x1fc)](/-([a-z])/g,(_0x2d1e4d,_0x16eadc)=>_0x16eadc[_0x5094c6(0x211)]());}function shouldAttachUpdateNotice(_0x15e883){const _0x30f5c=a256_0x4328;if(_0x15e883[_0x30f5c(0x20f)]===![])return![];return!['update',_0x30f5c(0x1f6),_0x30f5c(0x221)][_0x30f5c(0x203)](_0x15e883[_0x30f5c(0x20e)]);}function withUpdateNotice(_0x1e03a2){return{..._0x1e03a2,async 'execute'(_0x2b5639){const _0x1d1ef3=a256_0x4328,_0x39b602=shouldResolveUpdateNotice(_0x2b5639)?resolveLatestUpdateNotice()[_0x1d1ef3(0x22f)](()=>null):Promise[_0x1d1ef3(0x1fa)](null),_0x359748=await _0x1e03a2[_0x1d1ef3(0x1ee)](_0x2b5639);return attachUpdateNotice(_0x359748,await _0x39b602);}};}function shouldResolveUpdateNotice(_0xfd6729){const _0x25e029=a256_0x4328;return _0xfd6729[_0x25e029(0x207)]===_0x25e029(0x20b)&&!_0xfd6729[_0x25e029(0x228)];}function attachUpdateNotice(_0x15790c,_0x2c1ee2){const _0x325286=a256_0x4328;if(!_0x2c1ee2||!_0x15790c||typeof _0x15790c!==_0x325286(0x217))return _0x15790c;const _0x4ac5b5=_0x15790c,_0x19f35e=typeof _0x4ac5b5[_0x325286(0x1ef)]==='object'&&_0x4ac5b5[_0x325286(0x1ef)]!==null?_0x4ac5b5[_0x325286(0x1ef)]:{};return{..._0x4ac5b5,'_notice':{..._0x19f35e,'update':_0x2c1ee2}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1abd03,_0x164b0d){const _0x578dbb=a257_0x34d2,_0x301757=_0x1abd03();while(!![]){try{const _0x2cea8f=parseInt(_0x578dbb(0xd8))/0x1+-parseInt(_0x578dbb(0xd7))/0x2*(parseInt(_0x578dbb(0xda))/0x3)+parseInt(_0x578dbb(0xdc))/0x4+-parseInt(_0x578dbb(0xd9))/0x5*(-parseInt(_0x578dbb(0xe1))/0x6)+parseInt(_0x578dbb(0xdb))/0x7+parseInt(_0x578dbb(0xdf))/0x8*(-parseInt(_0x578dbb(0xde))/0x9)+-parseInt(_0x578dbb(0xe0))/0xa*(-parseInt(_0x578dbb(0xd6))/0xb);if(_0x2cea8f===_0x164b0d)break;else _0x301757['push'](_0x301757['shift']());}catch(_0x2140e4){_0x301757['push'](_0x301757['shift']());}}}(a257_0x4d6d,0x2d2b2));function a257_0x34d2(_0x1a98f2,_0x328a86){_0x1a98f2=_0x1a98f2-0xd6;const _0x4d6d04=a257_0x4d6d();let _0x34d2e7=_0x4d6d04[_0x1a98f2];return _0x34d2e7;}import{buildSchemaPayload as a257_0x37e912}from'@lovrabet/cli-framework';function a257_0x4d6d(){const _0x31c43c=['8035yernlo','39615TcSMRO','1711024noqiwK','217344kGHoyh','../commands/registry.js','350307kasMem','40brWSMH','2353970wdrxqX','6ftmRRr','11ouesPx','36gJcJVp','81543ffRMkX'];a257_0x4d6d=function(){return _0x31c43c;};return a257_0x4d6d();}import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x593d2d=a257_0x34d2,{serviceRegistry:_0xfaff17,findDefinition:_0x233c85}=await import(_0x593d2d(0xdd));return a257_0x37e912({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0xfaff17,'buildAllFlags':buildAllFlags,'findDefinition':_0x233c85});}
|