@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.7-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/README.md +15 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.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/logs.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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.d.ts +1 -0
- package/lib/commands/dataset/design-context.js +1 -0
- package/lib/commands/dataset/design-start.d.ts +1 -0
- package/lib/commands/dataset/design-start.js +1 -0
- package/lib/commands/dataset/design-status.d.ts +1 -0
- package/lib/commands/dataset/design-status.js +1 -0
- package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
- package/lib/commands/dataset/design-sync-retry.js +1 -0
- package/lib/commands/dataset/design-sync-status.d.ts +1 -0
- package/lib/commands/dataset/design-sync-status.js +1 -0
- package/lib/commands/dataset/design-validate.d.ts +1 -0
- package/lib/commands/dataset/design-validate.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.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/dataset/user-deleted-field-list.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-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/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.d.ts +6 -2
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/search.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.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/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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/feishu-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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +37 -6
- 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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +12 -0
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.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/supported-flags.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/services/dataset-design/checkpoint.d.ts +17 -0
- package/lib/services/dataset-design/checkpoint.js +1 -0
- package/lib/services/dataset-design/commands.d.ts +6 -0
- package/lib/services/dataset-design/commands.js +1 -0
- package/lib/services/dataset-design/contract.d.ts +7 -0
- package/lib/services/dataset-design/contract.js +1 -0
- 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.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/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 +3 -2
- package/skills/rabetbase/SKILL.md +11 -7
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
- package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +6 -3
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bc7d7,_0x4a327d){const _0x40d5a1=a304_0x1b70,_0x47581c=_0x1bc7d7();while(!![]){try{const _0x329a1e=parseInt(_0x40d5a1(0xc3))/0x1*(parseInt(_0x40d5a1(0xc0))/0x2)+-parseInt(_0x40d5a1(0xc9))/0x3+-parseInt(_0x40d5a1(0xbd))/0x4*(parseInt(_0x40d5a1(0xcf))/0x5)+-parseInt(_0x40d5a1(0xc4))/0x6+-parseInt(_0x40d5a1(0xc2))/0x7+-parseInt(_0x40d5a1(0xcb))/0x8+parseInt(_0x40d5a1(0xc7))/0x9;if(_0x329a1e===_0x4a327d)break;else _0x47581c['push'](_0x47581c['shift']());}catch(_0x57ae2e){_0x47581c['push'](_0x47581c['shift']());}}}(a304_0x16f3,0x8f089));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x5ca22f,_0x289800){const _0x6d3a71=a304_0x1b70,_0x4ac7b6={'apps':_0x5ca22f[_0x6d3a71(0xcc)]&&typeof _0x5ca22f['apps']===_0x6d3a71(0xc5)?_0x5ca22f[_0x6d3a71(0xcc)]:{}};let _0x485a7c=_0x4ac7b6[_0x6d3a71(0xcc)][_0x289800];if(!_0x485a7c)return _0x485a7c={'lastSync':'','pages':{}},_0x4ac7b6[_0x6d3a71(0xcc)][_0x289800]=_0x485a7c,{'lockData':_0x4ac7b6,'appLock':_0x485a7c};return!_0x485a7c[_0x6d3a71(0xbe)]&&(_0x485a7c['lastSync']=''),(!_0x485a7c[_0x6d3a71(0xc1)]||typeof _0x485a7c['pages']!==_0x6d3a71(0xc5))&&(_0x485a7c[_0x6d3a71(0xc1)]={}),{'lockData':_0x4ac7b6,'appLock':_0x485a7c};}function a304_0x1b70(_0x330ade,_0x1af53f){_0x330ade=_0x330ade-0xbd;const _0x16f301=a304_0x16f3();let _0x1b70da=_0x16f301[_0x330ade];return _0x1b70da;}export async function readPageLockFile(_0x4235b5){const _0x28fb66=a304_0x1b70;try{const _0x1465d4=await readFile(_0x4235b5,_0x28fb66(0xc6)),_0x2ec637=JSON[_0x28fb66(0xce)](_0x1465d4);return{'apps':_0x2ec637[_0x28fb66(0xcc)]&&typeof _0x2ec637['apps']==='object'?_0x2ec637[_0x28fb66(0xcc)]:{}};}catch(_0xa6595b){if(_0xa6595b[_0x28fb66(0xc8)]===_0x28fb66(0xca))return null;throw new Error(_0x28fb66(0xcd)+String(_0xa6595b));}}function a304_0x16f3(){const _0x37604a=['6532296obXXMk','object','utf8','41418180tSzZnw','code','2817567BGMDiV','ENOENT','6620808uQYQUU','apps','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','parse','45xFNaFA','499524PxHeXy','lastSync','stringify','770vmDWrL','pages','7013405cQfcVb','2507AQiEiv'];a304_0x16f3=function(){return _0x37604a;};return a304_0x16f3();}export async function writePageLockFile(_0x502a3a,_0x24b602){const _0x3008c0=a304_0x1b70;await mkdir(dirname(_0x502a3a),{'recursive':!![]}),await writeFile(_0x502a3a,JSON[_0x3008c0(0xbf)](_0x24b602,null,0x2),_0x3008c0(0xc6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a305_0x168a(_0x567c04,_0x3087c5){_0x567c04=_0x567c04-0x166;const _0xe49bfb=a305_0xe49b();let _0x168abc=_0xe49bfb[_0x567c04];return _0x168abc;}(function(_0x2b6a60,_0xd404ee){const _0xeed476=a305_0x168a,_0xe9d697=_0x2b6a60();while(!![]){try{const _0x274a77=parseInt(_0xeed476(0x17c))/0x1*(-parseInt(_0xeed476(0x178))/0x2)+parseInt(_0xeed476(0x16a))/0x3*(-parseInt(_0xeed476(0x18b))/0x4)+-parseInt(_0xeed476(0x191))/0x5*(-parseInt(_0xeed476(0x18f))/0x6)+-parseInt(_0xeed476(0x17f))/0x7*(-parseInt(_0xeed476(0x17e))/0x8)+parseInt(_0xeed476(0x193))/0x9+-parseInt(_0xeed476(0x18a))/0xa*(parseInt(_0xeed476(0x167))/0xb)+-parseInt(_0xeed476(0x18d))/0xc;if(_0x274a77===_0xd404ee)break;else _0xe9d697['push'](_0xe9d697['shift']());}catch(_0x527b3a){_0xe9d697['push'](_0xe9d697['shift']());}}}(a305_0xe49b,0x6c5e8));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x4e9845,_0x50e6ed,_0x139a3e){const _0x1a78c7=a305_0x168a,_0x17442a=parseSchema(_0x4e9845,_0x1a78c7(0x17b)),_0x3ac49f=parseSchema(_0x50e6ed,_0x1a78c7(0x188)),_0x14ef5e=collectLrSmartJsx(_0x17442a,!![]);if(_0x14ef5e[_0x1a78c7(0x174)]===0x0)return{'content':_0x4e9845,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x8c8169=new Map(collectLrSmartJsx(_0x3ac49f)[_0x1a78c7(0x176)](_0xbe5043=>[_0xbe5043[_0x1a78c7(0x192)],_0xbe5043]));let _0x2d98a2=0x0,_0x596263=0x0;for(const _0x576e4f of _0x14ef5e){const _0xb08b5e=readNonEmptyString(_0x576e4f[_0x1a78c7(0x16d)][_0x1a78c7(0x182)]),_0x4f5810=readNonEmptyString(_0x576e4f[_0x1a78c7(0x16d)][_0x1a78c7(0x184)]),_0x3c64e7=_0x8c8169[_0x1a78c7(0x16c)](_0x576e4f[_0x1a78c7(0x192)]),_0x14ad9c=readNonEmptyString(_0x3c64e7?.[_0x1a78c7(0x16d)][_0x1a78c7(0x182)]),_0x267055=readNonEmptyString(_0x3c64e7?.[_0x1a78c7(0x16d)]['value']);let _0x5d9966=![];_0x576e4f[_0x1a78c7(0x16d)][_0x1a78c7(0x169)]!==_0x1a78c7(0x166)&&(_0x576e4f[_0x1a78c7(0x16d)][_0x1a78c7(0x169)]=_0x1a78c7(0x166),_0x5d9966=!![]);!isPageContextExpression(_0x576e4f['props'][_0x1a78c7(0x17a)])&&(_0x576e4f[_0x1a78c7(0x186)][_0x1a78c7(0x17a)]={'type':'JSExpression','value':_0x1a78c7(0x190)},_0x5d9966=!![]);if(!_0xb08b5e){if(!_0x4f5810)throw CliErrors[_0x1a78c7(0x173)](_0x1a78c7(0x183)+_0x576e4f['label']+'\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.',_0x1a78c7(0x170));if(_0x5d9966)_0x596263+=0x1;continue;}const _0x185c9f=!_0x3c64e7||_0xb08b5e!==_0x14ad9c,_0x554006=!_0x4f5810;if(!_0x185c9f&&_0x4f5810&&_0x267055&&_0x4f5810!==_0x267055)throw CliErrors[_0x1a78c7(0x173)](_0x1a78c7(0x183)+_0x576e4f[_0x1a78c7(0x187)]+_0x1a78c7(0x185),'Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x185c9f||_0x554006||!_0x267055){const _0x63254e=readNonEmptyString(await _0x139a3e(_0xb08b5e));if(!_0x63254e)throw CliErrors['apiError']('LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22'+_0x576e4f[_0x1a78c7(0x187)]+'\x22.');_0x576e4f[_0x1a78c7(0x16d)][_0x1a78c7(0x184)]=_0x63254e,_0x2d98a2+=0x1,_0x5d9966=!![];}if(_0x5d9966)_0x596263+=0x1;}if(_0x596263===0x0)return{'content':_0x4e9845,'compiledNodes':_0x2d98a2,'normalizedNodes':_0x596263};return{'content':JSON[_0x1a78c7(0x175)](_0x17442a),'compiledNodes':_0x2d98a2,'normalizedNodes':_0x596263};}function parseSchema(_0x1a5eb2,_0x38d733){const _0x1c0f79=a305_0x168a;try{return JSON[_0x1c0f79(0x16b)](_0x1a5eb2);}catch{throw CliErrors[_0x1c0f79(0x173)](_0x1c0f79(0x16e)+_0x38d733+_0x1c0f79(0x18c));}}function collectLrSmartJsx(_0x45180d,_0x4897eb=![]){const _0x52cd05=[],_0x5c84d4=(_0x47727a,_0x34fdcc)=>{const _0x998a3a=a305_0x168a;if(Array['isArray'](_0x47727a)){_0x47727a['forEach']((_0x3a6553,_0x5bee5f)=>_0x5c84d4(_0x3a6553,_0x34fdcc+'['+_0x5bee5f+']'));return;}if(!isObject(_0x47727a))return;if(_0x47727a['componentName']==='LrSmartJsx'){const _0x4add2c=readNonEmptyString(_0x47727a['id']),_0x59af1b=_0x4add2c||_0x34fdcc,_0xbbfbce=isObject(_0x47727a['props'])?_0x47727a[_0x998a3a(0x186)]:undefined;if(!_0xbbfbce){if(_0x4897eb)throw CliErrors['validation'](_0x998a3a(0x183)+_0x59af1b+_0x998a3a(0x189),_0x998a3a(0x17d));return;}const _0x46ad90=isObject(_0xbbfbce[_0x998a3a(0x16d)])?_0xbbfbce[_0x998a3a(0x16d)]:undefined;if(!_0x46ad90){if(_0x4897eb)throw CliErrors[_0x998a3a(0x173)](_0x998a3a(0x183)+_0x59af1b+_0x998a3a(0x168),_0x998a3a(0x171));return;}_0x52cd05['push']({'key':_0x4add2c?'id:'+_0x4add2c:_0x998a3a(0x177)+_0x34fdcc,'label':_0x59af1b,'props':_0xbbfbce,'render':_0x46ad90});}for(const [_0x5bfae5,_0x2afe15]of Object[_0x998a3a(0x180)](_0x47727a)){if(_0x5bfae5===_0x998a3a(0x186)&&_0x47727a[_0x998a3a(0x179)]===_0x998a3a(0x181))continue;_0x5c84d4(_0x2afe15,_0x34fdcc+'.'+_0x5bfae5);}};return _0x5c84d4(_0x45180d,'$'),_0x52cd05;}function isObject(_0x51107f){const _0x194f83=a305_0x168a;return Boolean(_0x51107f)&&typeof _0x51107f==='object'&&!Array[_0x194f83(0x18e)](_0x51107f);}function readNonEmptyString(_0x552789){const _0x2a2762=a305_0x168a;return typeof _0x552789===_0x2a2762(0x172)&&_0x552789['trim']()?_0x552789:undefined;}function isPageContextExpression(_0x3edbe4){const _0x404acb=a305_0x168a;return isObject(_0x3edbe4)&&_0x3edbe4[_0x404acb(0x169)]===_0x404acb(0x16f)&&_0x3edbe4[_0x404acb(0x184)]===_0x404acb(0x190);}function a305_0xe49b(){const _0x3c2842=['validation','length','stringify','map','path:','2cedDyT','componentName','_context','local','8917ISDXvN','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','4008zYcXYq','4956YfViOL','entries','LrSmartJsx','source','LrSmartJsx\x20node\x20\x22','value','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','props','label','remote','\x22\x20has\x20missing\x20or\x20invalid\x20props.','10fBIXEc','4kDbezj','\x20page\x20schema.','2450496znJTLY','isArray','268518zwiDrO','this','15hfYsyC','key','3752820hwKNzD','JSFunction','687005GVjajK','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','type','559461RfNGmR','parse','get','render','Invalid\x20JSON\x20in\x20','JSExpression','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','string'];a305_0xe49b=function(){return _0x3c2842;};return a305_0xe49b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x558cc5,_0x36d8d9){const _0x5b3c4a=a300_0x8b42,_0x338d51=_0x558cc5();while(!![]){try{const _0x4780cd=parseInt(_0x5b3c4a(0x106))/0x1+-parseInt(_0x5b3c4a(0xde))/0x2*(parseInt(_0x5b3c4a(0x113))/0x3)+parseInt(_0x5b3c4a(0x102))/0x4+parseInt(_0x5b3c4a(0xe9))/0x5+parseInt(_0x5b3c4a(0xdd))/0x6+parseInt(_0x5b3c4a(0x107))/0x7*(parseInt(_0x5b3c4a(0xf9))/0x8)+-parseInt(_0x5b3c4a(0xe1))/0x9*(parseInt(_0x5b3c4a(0xfc))/0xa);if(_0x4780cd===_0x36d8d9)break;else _0x338d51['push'](_0x338d51['shift']());}catch(_0x20901b){_0x338d51['push'](_0x338d51['shift']());}}}(a300_0x3ea4,0x3827f));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0xcc53b9,_0x35d17c){const _0x966fc8=a300_0x8b42,_0x35c49b=[],_0x136b81=normalizeSqlForStaticAnalysis(_0xcc53b9),_0xde9301=(_0x136b81['error']?[]:extractJoinFacts(_0x136b81[_0x966fc8(0x10e)]))['map'](_0x29ebfc=>{const _0x21f5ee=_0x966fc8;if(_0x29ebfc[_0x21f5ee(0x105)]||_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0xd9)]===0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0x11c),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':_0x29ebfc[_0x21f5ee(0xf5)]??_0x21f5ee(0x10c)}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0x119)};const _0x3ada6d=resolveTableMetadata(_0x35d17c,_0x29ebfc[_0x21f5ee(0xfb)]),_0x3dcb1b=(_0x3ada6d?.[_0x21f5ee(0xe8)]??[])[_0x21f5ee(0xe6)](_0x1342b0=>({'index':_0x1342b0,'matchedPrefix':findEqualityPrefix(_0x1342b0[_0x21f5ee(0xd7)],_0x29ebfc[_0x21f5ee(0xd7)])}))[_0x21f5ee(0xe5)](_0x29bb3d=>_0x29bb3d[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]>0x0),_0x272771=_0x3dcb1b[_0x21f5ee(0xfe)]((_0x2341c1,_0x4eb06a)=>!_0x2341c1||_0x4eb06a[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]>_0x2341c1[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]?_0x4eb06a:_0x2341c1,_0x3dcb1b[0x0]);if(_0x272771)return{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0x10d),'matchedIndex':{..._0x272771[_0x21f5ee(0xf6)],'matchedPrefix':_0x272771['matchedPrefix']}};const _0x1e741c=_0x3ada6d?.[_0x21f5ee(0xe8)][_0x21f5ee(0xe5)](_0x11921d=>_0x11921d[_0x21f5ee(0xd7)][_0x21f5ee(0x11e)](_0x1a7051=>_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0x11e)](_0x3d8b22=>columnNamesMatch(_0x1a7051,_0x3d8b22))))??[];if(_0x1e741c['length']>0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0x10b),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x29ebfc['table'],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0xd8),'candidateIndexes':_0x1e741c};if(_0x3ada6d&&_0x3ada6d[_0x21f5ee(0x100)]!==![]&&_0x3ada6d[_0x21f5ee(0xe8)]['length']>0x0&&_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0xd9)]>0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0xfa),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0xd8)};return _0x35c49b['push']({'code':_0x21f5ee(0xff),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':_0x3ada6d?_0x21f5ee(0x117):_0x21f5ee(0x108)}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc['columns'],'status':'unavailable'};});return{'checked':_0xde9301['length']>0x0,'joins':_0xde9301,'warnings':_0x35c49b};}function extractJoinFacts(_0x7d57fc){const _0x44c4e0=a300_0x8b42,_0x45b2f0=maskNestedQueries(stripSqlNoise(_0x7d57fc)),_0x21e7fc=maskQuotedIdentifiers(_0x45b2f0),_0x55ab5b=[],_0x588951=new Set(),_0xdfd86d=/\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 _0x2b70f3 of _0x45b2f0[_0x44c4e0(0xf8)](_0xdfd86d)){const _0x3d86a9=_0x2b70f3['index']??0x0,_0x3ae8bd=_0x2b70f3[0x0][_0x44c4e0(0xdf)](/\bJOIN\b/i),_0x502e97=_0x3d86a9+Math[_0x44c4e0(0x10f)](0x0,_0x3ae8bd);if(!/^JOIN\b/i['test'](_0x21e7fc[_0x44c4e0(0xe4)](_0x502e97)))continue;_0x588951['add'](_0x502e97);const _0x1a9b5b=normalizeIdentifier(_0x2b70f3[0x1]||_0x44c4e0(0x11a)),_0x53ec17=normalizeIdentifier(_0x2b70f3[0x2]??''),_0x4f5d71=normalizeIdentifier(_0x2b70f3[0x3]||_0x53ec17[_0x44c4e0(0x101)]('.')['at'](-0x1)||_0x53ec17),_0x2674a2=[],_0x90e02e=_0x53ec17==='__sq__';let _0x29b270=_0x1a9b5b==='right'||_0x1a9b5b===_0x44c4e0(0xe3)||_0x90e02e,_0x3d7dcf=_0x29b270?_0x90e02e?_0x44c4e0(0x103):_0x1a9b5b[_0x44c4e0(0xea)]()+_0x44c4e0(0xe0):undefined;const _0xd55d2b=stripOuterParentheses(_0x2b70f3[0x4]??''),_0x794116=_0xd55d2b[_0x44c4e0(0x104)](MYBATIS_DYNAMIC_START_MARKER)||_0xd55d2b[_0x44c4e0(0x104)](MYBATIS_DYNAMIC_END_MARKER),_0x5f1869=_0xd55d2b['includes'](MYBATIS_INCLUDE_MARKER);_0x794116&&(_0x29b270=!![],_0x3d7dcf??=_0x44c4e0(0xf4));_0x5f1869&&(_0x29b270=!![],_0x3d7dcf??=_0x44c4e0(0x11f));const _0xdf9c96=_0xd55d2b[_0x44c4e0(0xf0)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x44c4e0(0xf0)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x44c4e0(0xf0)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0xdf9c96,'OR')&&(_0x29b270=!![],_0x3d7dcf??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x186a93 of splitTopLevelAnd(_0xdf9c96)){const _0x52966d=stripOuterParentheses(_0x186a93);if(hasTopLevelKeyword(_0x52966d,'OR')){_0x29b270=!![],_0x3d7dcf??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x27894a=splitEquality(_0x52966d);if(!_0x27894a){containsColumnReference(_0x186a93,_0x4f5d71)&&(_0x29b270=!![]);continue;}const _0x287f02=parseDirectColumnReference(_0x27894a[0x0],_0x4f5d71),_0x1a6a5f=parseDirectColumnReference(_0x27894a[0x1],_0x4f5d71),_0x1fdc08=containsColumnReference(_0x27894a[0x0],_0x4f5d71),_0x125ef3=containsColumnReference(_0x27894a[0x1],_0x4f5d71),_0x11284a=_0x287f02&&!_0x125ef3?_0x287f02:_0x1a6a5f&&!_0x1fdc08?_0x1a6a5f:null;if(_0x11284a&&!_0x2674a2[_0x44c4e0(0x104)](_0x11284a))_0x2674a2[_0x44c4e0(0x112)](_0x11284a);else!_0x11284a&&containsColumnReference(_0x186a93,_0x4f5d71)&&(_0x29b270=!![]);}_0x55ab5b[_0x44c4e0(0x112)]({'table':_0x53ec17,'alias':_0x4f5d71,'columns':_0x2674a2,'unsupportedPredicate':_0x29b270,'unsupportedReason':_0x3d7dcf,'containsUnresolvedInclude':_0x5f1869,'position':_0x502e97});}for(const _0x454658 of _0x21e7fc[_0x44c4e0(0xf8)](/\bJOIN\b/gi)){const _0x3536b2=_0x454658[_0x44c4e0(0xf6)]??0x0;if(_0x588951[_0x44c4e0(0xef)](_0x3536b2))continue;const _0x58cd44=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x44c4e0(0xda)](_0x45b2f0[_0x44c4e0(0xe4)](_0x3536b2+_0x454658[0x0][_0x44c4e0(0xd9)])),_0x1d0c63=normalizeIdentifier(_0x58cd44?.[0x1]||_0x44c4e0(0x114)),_0x43c791=normalizeIdentifier(_0x58cd44?.[0x2]||''),_0x2ad21c=isSqlClauseKeyword(_0x43c791)?_0x1d0c63['split']('.')['at'](-0x1)||_0x1d0c63:_0x43c791||_0x1d0c63['split']('.')['at'](-0x1)||_0x1d0c63;_0x55ab5b['push']({'table':_0x1d0c63,'alias':_0x2ad21c,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x3536b2});}const _0xfde339=_0x21e7fc[_0x44c4e0(0xeb)](MYBATIS_INCLUDE_MARKER);return _0xfde339>=0x0&&!_0x55ab5b[_0x44c4e0(0x11e)](_0x41c492=>_0x41c492[_0x44c4e0(0xec)])&&_0x55ab5b['push']({'table':_0x44c4e0(0x114),'alias':_0x44c4e0(0x114),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0xfde339}),_0x55ab5b[_0x44c4e0(0x109)]((_0x4ca64e,_0x492452)=>_0x4ca64e['position']-_0x492452[_0x44c4e0(0xf2)]);}function stripSqlNoise(_0x32ebf8){const _0x5564c8=a300_0x8b42,_0x556d2b=Array[_0x5564c8(0xed)](_0x32ebf8),_0x2c3787=(_0x2a08dd,_0x52d6ce)=>{for(let _0x112e0e=_0x2a08dd;_0x112e0e<_0x52d6ce;_0x112e0e+=0x1){_0x556d2b[_0x112e0e]!=='\x0a'&&_0x556d2b[_0x112e0e]!=='\x0d'&&(_0x556d2b[_0x112e0e]='\x20');}};for(let _0x40aa0b=0x0;_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)];_0x40aa0b+=0x1){const _0x58e0dd=_0x556d2b[_0x40aa0b],_0x539e79=_0x556d2b[_0x40aa0b+0x1];if(_0x58e0dd==='\x27'||_0x58e0dd==='\x22'||_0x58e0dd==='`'){const _0x20e395=_0x58e0dd,_0x296511=_0x40aa0b;_0x40aa0b+=0x1;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]){if(_0x556d2b[_0x40aa0b]==='\x5c'&&_0x40aa0b+0x1<_0x556d2b[_0x5564c8(0xd9)]){_0x40aa0b+=0x2;continue;}if(_0x556d2b[_0x40aa0b]!==_0x20e395){_0x40aa0b+=0x1;continue;}if(_0x556d2b[_0x40aa0b+0x1]===_0x20e395){_0x40aa0b+=0x2;continue;}break;}if(_0x20e395==='\x27')_0x2c3787(_0x296511,Math['min'](_0x40aa0b+0x1,_0x556d2b[_0x5564c8(0xd9)]));continue;}if(_0x58e0dd==='-'&&_0x539e79==='-'){const _0x4fa6c2=_0x40aa0b;while(_0x40aa0b<_0x556d2b['length']&&_0x556d2b[_0x40aa0b]!=='\x0a')_0x40aa0b+=0x1;_0x2c3787(_0x4fa6c2,_0x40aa0b);continue;}if(_0x58e0dd==='/'&&_0x539e79==='*'){const _0x1ef898=_0x40aa0b;_0x40aa0b+=0x2;while(_0x40aa0b<_0x556d2b['length']&&!(_0x556d2b[_0x40aa0b]==='*'&&_0x556d2b[_0x40aa0b+0x1]==='/')){_0x40aa0b+=0x1;}_0x40aa0b=Math[_0x5564c8(0x115)](_0x40aa0b+0x1,_0x556d2b[_0x5564c8(0xd9)]-0x1),_0x2c3787(_0x1ef898,_0x40aa0b+0x1);continue;}if(_0x58e0dd==='#'&&_0x539e79!=='{'){const _0x5ef7f2=_0x40aa0b;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]&&_0x556d2b[_0x40aa0b]!=='\x0a')_0x40aa0b+=0x1;_0x2c3787(_0x5ef7f2,_0x40aa0b);continue;}if((_0x58e0dd==='#'||_0x58e0dd==='$')&&_0x539e79==='{'){const _0x502921=_0x40aa0b;_0x40aa0b+=0x2;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]&&_0x556d2b[_0x40aa0b]!=='}')_0x40aa0b+=0x1;_0x2c3787(_0x502921,Math[_0x5564c8(0x115)](_0x40aa0b+0x1,_0x556d2b['length']));}}return _0x556d2b[_0x5564c8(0xf1)]('');}function maskQuotedIdentifiers(_0x3205c1){const _0x4f5bd8=a300_0x8b42,_0x2e23ec=Array[_0x4f5bd8(0xed)](_0x3205c1);for(let _0x5c55a2=0x0;_0x5c55a2<_0x2e23ec['length'];_0x5c55a2+=0x1){const _0x635d0e=_0x2e23ec[_0x5c55a2];if(_0x635d0e!=='\x22'&&_0x635d0e!=='`')continue;_0x5c55a2+=0x1;while(_0x5c55a2<_0x2e23ec['length']){if(_0x2e23ec[_0x5c55a2]===_0x635d0e){if(_0x2e23ec[_0x5c55a2+0x1]===_0x635d0e){_0x2e23ec[_0x5c55a2]='\x20',_0x2e23ec[_0x5c55a2+0x1]='\x20',_0x5c55a2+=0x2;continue;}break;}_0x2e23ec[_0x5c55a2]='\x20',_0x5c55a2+=0x1;}}return _0x2e23ec[_0x4f5bd8(0xf1)]('');}function maskNestedQueries(_0x52a3bf){const _0x149dec=a300_0x8b42,_0x50a322=Array[_0x149dec(0xed)](_0x52a3bf);for(let _0x1756a4=0x0;_0x1756a4<_0x50a322[_0x149dec(0xd9)];_0x1756a4+=0x1){if(_0x50a322[_0x1756a4]!=='(')continue;const _0x182ac2=_0x52a3bf['slice'](_0x1756a4+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x149dec(0x111)](_0x182ac2))continue;let _0x512ed1=0x1,_0x5e0d42=_0x1756a4+0x1;for(;_0x5e0d42<_0x50a322[_0x149dec(0xd9)]&&_0x512ed1>0x0;_0x5e0d42+=0x1){if(_0x50a322[_0x5e0d42]==='(')_0x512ed1+=0x1;if(_0x50a322[_0x5e0d42]===')')_0x512ed1-=0x1;}if(_0x512ed1!==0x0)continue;for(let _0x7d398=_0x1756a4;_0x7d398<_0x5e0d42;_0x7d398+=0x1){_0x50a322[_0x7d398]='\x20';}const _0x170211=_0x149dec(0x118);for(let _0x3a266e=0x0;_0x3a266e<_0x170211['length']&&_0x1756a4+_0x3a266e<_0x5e0d42;_0x3a266e+=0x1){_0x50a322[_0x1756a4+_0x3a266e]=_0x170211[_0x3a266e];}_0x1756a4=_0x5e0d42-0x1;}return _0x50a322[_0x149dec(0xf1)]('');}function splitTopLevelAnd(_0x3ec0f5){const _0x486b2c=a300_0x8b42,_0x35a0b6=[];let _0x36df5c=0x0,_0x8cdf77=0x0;for(let _0x565eda=0x0;_0x565eda<_0x3ec0f5[_0x486b2c(0xd9)];_0x565eda+=0x1){const _0x240c50=_0x3ec0f5[_0x565eda];if(_0x240c50==='(')_0x36df5c+=0x1;if(_0x240c50===')')_0x36df5c=Math['max'](0x0,_0x36df5c-0x1);_0x36df5c===0x0&&_0x3ec0f5[_0x486b2c(0xe4)](_0x565eda)[_0x486b2c(0x11b)](/^AND\b/i)&&(_0x565eda===0x0||/\s/['test'](_0x3ec0f5[_0x565eda-0x1]??''))&&(_0x35a0b6['push'](_0x3ec0f5[_0x486b2c(0xe4)](_0x8cdf77,_0x565eda)[_0x486b2c(0xf7)]()),_0x565eda+=0x2,_0x8cdf77=_0x565eda+0x1);}const _0x1dde69=_0x3ec0f5[_0x486b2c(0xe4)](_0x8cdf77)[_0x486b2c(0xf7)]();if(_0x1dde69)_0x35a0b6[_0x486b2c(0x112)](_0x1dde69);return _0x35a0b6;}function hasTopLevelKeyword(_0x270660,_0x579c82){const _0x5bc9f6=a300_0x8b42;let _0x19d8d6=0x0;for(let _0x46d161=0x0;_0x46d161<_0x270660[_0x5bc9f6(0xd9)];_0x46d161+=0x1){const _0x405dfb=_0x270660[_0x46d161];if(_0x405dfb==='(')_0x19d8d6+=0x1;if(_0x405dfb===')')_0x19d8d6=Math[_0x5bc9f6(0x10f)](0x0,_0x19d8d6-0x1);if(_0x19d8d6!==0x0)continue;const _0x238739=_0x270660['slice'](_0x46d161,_0x46d161+_0x579c82[_0x5bc9f6(0xd9)]),_0x535725=_0x270660[_0x46d161-0x1]??'\x20',_0x4b4a95=_0x270660[_0x46d161+_0x579c82[_0x5bc9f6(0xd9)]]??'\x20';if(_0x238739[_0x5bc9f6(0xea)]()===_0x579c82[_0x5bc9f6(0xea)]()&&!/[\w$]/[_0x5bc9f6(0x111)](_0x535725)&&!/[\w$]/[_0x5bc9f6(0x111)](_0x4b4a95))return!![];}return![];}function splitEquality(_0x444cc9){const _0x4778a2=a300_0x8b42,_0x29777c=stripOuterParentheses(_0x444cc9);let _0x451436=0x0,_0x562076;for(let _0x2e9935=0x0;_0x2e9935<_0x29777c[_0x4778a2(0xd9)];_0x2e9935+=0x1){const _0x5d0adf=_0x29777c[_0x2e9935];if(_0x5d0adf==='(')_0x451436+=0x1;if(_0x5d0adf===')')_0x451436=Math[_0x4778a2(0x10f)](0x0,_0x451436-0x1);const _0x5368cb=_0x29777c[_0x2e9935-0x1]??'',_0x17b7d2=_0x29777c[_0x2e9935+0x1]??'';if(_0x5d0adf==='='&&_0x451436===0x0&&!/[!<>=:]/[_0x4778a2(0x111)](_0x5368cb)&&_0x17b7d2!=='='){if(_0x562076!==undefined)return null;_0x562076=_0x2e9935;}}return _0x562076===undefined?null:[_0x29777c[_0x4778a2(0xe4)](0x0,_0x562076)['trim'](),_0x29777c[_0x4778a2(0xe4)](_0x562076+0x1)[_0x4778a2(0xf7)]()];}function parseDirectColumnReference(_0xbf2b86,_0x52ebd4){const _0x4da537=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0xbf2b86));if(!_0x4da537)return null;if(normalizeIdentifier(_0x4da537[0x1]??'')!==normalizeIdentifier(_0x52ebd4))return null;return normalizeIdentifier(_0x4da537[0x2]??'');}function containsColumnReference(_0x2ff7d1,_0x2c8ce5){const _0x31514f=a300_0x8b42,_0x3c7e59=_0x2ff7d1[_0x31514f(0x116)](/[`"]/g,''),_0x1334c1=_0x2c8ce5['replace'](/[.*+?^${}()|[\]\\]/g,_0x31514f(0x10a));return new RegExp(_0x31514f(0x110)+_0x1334c1+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x31514f(0x111)](_0x3c7e59);}function findEqualityPrefix(_0x555750,_0x2cf005){const _0x486613=a300_0x8b42,_0x775363=new Set(_0x2cf005[_0x486613(0xe6)](normalizeIdentifier)),_0x455f6a=[];for(const _0x208e0 of _0x555750){if(!_0x775363['has'](normalizeIdentifier(_0x208e0)))break;_0x455f6a[_0x486613(0x112)](_0x208e0);}return _0x455f6a;}function resolveTableMetadata(_0x2fb4cb,_0x5df036){const _0x3793a0=a300_0x8b42,_0x11d1a9=normalizeIdentifier(_0x5df036),_0x3d1fdc=_0x2fb4cb[_0x3793a0(0xe5)](_0x4a5f09=>normalizeIdentifier(_0x4a5f09[_0x3793a0(0xe2)])===_0x11d1a9);if(_0x3d1fdc[_0x3793a0(0xd9)]===0x1)return _0x3d1fdc[0x0];const _0xd69168=_0x11d1a9['includes']('.'),_0x536700=_0x11d1a9[_0x3793a0(0x101)]('.')['at'](-0x1),_0x28d6af=_0x2fb4cb['filter'](_0x12e868=>{const _0x4dc95a=_0x3793a0,_0x216ef4=normalizeIdentifier(_0x12e868[_0x4dc95a(0xe2)]);if(_0xd69168&&_0x216ef4['includes']('.'))return![];return _0x216ef4[_0x4dc95a(0x101)]('.')['at'](-0x1)===_0x536700;});return _0x28d6af[_0x3793a0(0xd9)]===0x1?_0x28d6af[0x0]:undefined;}function columnNamesMatch(_0x10df01,_0x494cb8){return normalizeIdentifier(_0x10df01)===normalizeIdentifier(_0x494cb8);}function a300_0x8b42(_0x4f562c,_0x185370){_0x4f562c=_0x4f562c-0xd7;const _0x3ea4a2=a300_0x3ea4();let _0x8b4251=_0x3ea4a2[_0x4f562c];return _0x8b4251;}function a300_0x3ea4(){const _0x3df5a9=['replace','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','__sq__','unavailable','INNER','match','JOIN_PREDICATE_UNSUPPORTED','endsWith','some','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','columns','warning','length','exec','matchedPrefix','left','1661004LsatuL','738WqCLgG','search','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','8793tdjwyu','tableName','full','slice','filter','map','startsWith','indexes','112790iHXTEh','toUpperCase','indexOf','containsUnresolvedInclude','from','alias','has','replaceAll','join','position','inner','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','unsupportedReason','index','trim','matchAll','8tcusJh','JOIN_INDEX_MISSING','table','3660UhMxZI','toLowerCase','reduce','INDEX_METADATA_UNAVAILABLE','metadataAvailable','split','1011276DiuINr','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','includes','unsupportedPredicate','271211JbvKQg','673925NRxuHy','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','sort','\x5c$&','JOIN_INDEX_NOT_USABLE','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','covered','sql','max','(?:^|[^\x5cw$])','test','push','2700didCPR','unknown','min'];a300_0x3ea4=function(){return _0x3df5a9;};return a300_0x3ea4();}function normalizeIdentifier(_0x99241d){const _0x47a388=a300_0x8b42;return _0x99241d['replace'](/[`"]/g,'')[_0x47a388(0xf7)]()[_0x47a388(0xfd)]();}function isSqlClauseKeyword(_0x17642d){const _0x5c19c4=a300_0x8b42;return new Set(['on','using','where',_0x5c19c4(0xf1),_0x5c19c4(0xf3),_0x5c19c4(0xdc),'right',_0x5c19c4(0xe3),'cross','natural'])[_0x5c19c4(0xef)](_0x17642d);}function stripOuterParentheses(_0x5d9eec){const _0x15749b=a300_0x8b42;let _0x467bef=_0x5d9eec[_0x15749b(0xf7)]();while(_0x467bef[_0x15749b(0xe7)]('(')&&_0x467bef[_0x15749b(0x11d)](')')){let _0x5c1fcb=0x0,_0x14331d=!![];for(let _0x453353=0x0;_0x453353<_0x467bef[_0x15749b(0xd9)];_0x453353+=0x1){if(_0x467bef[_0x453353]==='(')_0x5c1fcb+=0x1;if(_0x467bef[_0x453353]===')')_0x5c1fcb-=0x1;if(_0x5c1fcb===0x0&&_0x453353<_0x467bef[_0x15749b(0xd9)]-0x1){_0x14331d=![];break;}}if(!_0x14331d||_0x5c1fcb!==0x0)break;_0x467bef=_0x467bef[_0x15749b(0xe4)](0x1,-0x1)[_0x15749b(0xf7)]();}return _0x467bef;}
|
|
1
|
+
(function(_0x2ec22d,_0x59ae28){const _0x5685e2=a307_0x9fa4,_0x43ae1e=_0x2ec22d();while(!![]){try{const _0x1afcaa=parseInt(_0x5685e2(0x174))/0x1*(-parseInt(_0x5685e2(0x171))/0x2)+parseInt(_0x5685e2(0x143))/0x3+-parseInt(_0x5685e2(0x14e))/0x4+parseInt(_0x5685e2(0x151))/0x5+parseInt(_0x5685e2(0x16f))/0x6*(-parseInt(_0x5685e2(0x150))/0x7)+parseInt(_0x5685e2(0x168))/0x8*(-parseInt(_0x5685e2(0x15e))/0x9)+parseInt(_0x5685e2(0x16c))/0xa;if(_0x1afcaa===_0x59ae28)break;else _0x43ae1e['push'](_0x43ae1e['shift']());}catch(_0x3466fb){_0x43ae1e['push'](_0x43ae1e['shift']());}}}(a307_0x3300,0x37308));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x1df5aa,_0x1c18e0){const _0x31e035=a307_0x9fa4,_0x3ba8b2=[],_0x2580f9=normalizeSqlForStaticAnalysis(_0x1df5aa),_0x2dbbf2=(_0x2580f9[_0x31e035(0x149)]?[]:extractJoinFacts(_0x2580f9[_0x31e035(0x147)]))[_0x31e035(0x15d)](_0x24cd66=>{const _0x3bea0e=_0x31e035;if(_0x24cd66[_0x3bea0e(0x158)]||_0x24cd66[_0x3bea0e(0x14f)][_0x3bea0e(0x161)]===0x0)return _0x3ba8b2['push']({'code':_0x3bea0e(0x146),'table':_0x24cd66['table'],'alias':_0x24cd66['alias'],'columns':_0x24cd66['columns'],'reason':_0x24cd66[_0x3bea0e(0x13b)]??_0x3bea0e(0x16b)}),{'table':_0x24cd66[_0x3bea0e(0x153)],'alias':_0x24cd66[_0x3bea0e(0x15b)],'columns':_0x24cd66[_0x3bea0e(0x14f)],'status':_0x3bea0e(0x14d)};const _0x593d83=resolveTableMetadata(_0x1c18e0,_0x24cd66['table']),_0x28e29c=(_0x593d83?.[_0x3bea0e(0x177)]??[])[_0x3bea0e(0x15d)](_0x593a4f=>({'index':_0x593a4f,'matchedPrefix':findEqualityPrefix(_0x593a4f[_0x3bea0e(0x14f)],_0x24cd66[_0x3bea0e(0x14f)])}))[_0x3bea0e(0x132)](_0x27e9c1=>_0x27e9c1[_0x3bea0e(0x179)][_0x3bea0e(0x161)]>0x0),_0x27de3a=_0x28e29c[_0x3bea0e(0x136)]((_0x10684c,_0x549052)=>!_0x10684c||_0x549052['matchedPrefix'][_0x3bea0e(0x161)]>_0x10684c[_0x3bea0e(0x179)][_0x3bea0e(0x161)]?_0x549052:_0x10684c,_0x28e29c[0x0]);if(_0x27de3a)return{'table':_0x24cd66[_0x3bea0e(0x153)],'alias':_0x24cd66['alias'],'columns':_0x24cd66[_0x3bea0e(0x14f)],'status':_0x3bea0e(0x139),'matchedIndex':{..._0x27de3a[_0x3bea0e(0x13e)],'matchedPrefix':_0x27de3a[_0x3bea0e(0x179)]}};const _0x56d620=_0x593d83?.[_0x3bea0e(0x177)]['filter'](_0xe38980=>_0xe38980[_0x3bea0e(0x14f)][_0x3bea0e(0x141)](_0x231a1c=>_0x24cd66[_0x3bea0e(0x14f)][_0x3bea0e(0x141)](_0x142bf4=>columnNamesMatch(_0x231a1c,_0x142bf4))))??[];if(_0x56d620['length']>0x0)return _0x3ba8b2[_0x3bea0e(0x140)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x24cd66['table'],'alias':_0x24cd66[_0x3bea0e(0x15b)],'columns':_0x24cd66[_0x3bea0e(0x14f)],'reason':_0x3bea0e(0x13a)}),{'table':_0x24cd66['table'],'alias':_0x24cd66['alias'],'columns':_0x24cd66[_0x3bea0e(0x14f)],'status':_0x3bea0e(0x16d),'candidateIndexes':_0x56d620};if(_0x593d83&&_0x593d83['metadataAvailable']!==![]&&_0x593d83['indexes'][_0x3bea0e(0x161)]>0x0&&_0x24cd66['columns'][_0x3bea0e(0x161)]>0x0)return _0x3ba8b2['push']({'code':_0x3bea0e(0x138),'table':_0x24cd66[_0x3bea0e(0x153)],'alias':_0x24cd66[_0x3bea0e(0x15b)],'columns':_0x24cd66[_0x3bea0e(0x14f)],'reason':_0x3bea0e(0x142)}),{'table':_0x24cd66[_0x3bea0e(0x153)],'alias':_0x24cd66['alias'],'columns':_0x24cd66['columns'],'status':_0x3bea0e(0x16d)};return _0x3ba8b2['push']({'code':_0x3bea0e(0x14a),'table':_0x24cd66['table'],'alias':_0x24cd66[_0x3bea0e(0x15b)],'columns':_0x24cd66[_0x3bea0e(0x14f)],'reason':_0x593d83?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':_0x3bea0e(0x133)}),{'table':_0x24cd66[_0x3bea0e(0x153)],'alias':_0x24cd66[_0x3bea0e(0x15b)],'columns':_0x24cd66[_0x3bea0e(0x14f)],'status':_0x3bea0e(0x14d)};});return{'checked':_0x2dbbf2[_0x31e035(0x161)]>0x0,'joins':_0x2dbbf2,'warnings':_0x3ba8b2};}function a307_0x9fa4(_0x35d800,_0xae8a74){_0x35d800=_0x35d800-0x130;const _0x3300cd=a307_0x3300();let _0x9fa4c9=_0x3300cd[_0x35d800];return _0x9fa4c9;}function extractJoinFacts(_0x582022){const _0x36491f=a307_0x9fa4,_0x5c9981=maskNestedQueries(stripSqlNoise(_0x582022)),_0x4b90a2=maskQuotedIdentifiers(_0x5c9981),_0x33c50c=[],_0xeeae91=new Set(),_0x2e09d5=/\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 _0x43a6c0 of _0x5c9981[_0x36491f(0x176)](_0x2e09d5)){const _0x414e3f=_0x43a6c0[_0x36491f(0x13e)]??0x0,_0x550418=_0x43a6c0[0x0][_0x36491f(0x178)](/\bJOIN\b/i),_0x84631f=_0x414e3f+Math[_0x36491f(0x16e)](0x0,_0x550418);if(!/^JOIN\b/i[_0x36491f(0x164)](_0x4b90a2['slice'](_0x84631f)))continue;_0xeeae91[_0x36491f(0x167)](_0x84631f);const _0x5027e4=normalizeIdentifier(_0x43a6c0[0x1]||_0x36491f(0x13f)),_0x565642=normalizeIdentifier(_0x43a6c0[0x2]??''),_0x5391e3=normalizeIdentifier(_0x43a6c0[0x3]||_0x565642['split']('.')['at'](-0x1)||_0x565642),_0x51377f=[],_0x4f8364=_0x565642===_0x36491f(0x15c);let _0x4ce1ca=_0x5027e4===_0x36491f(0x157)||_0x5027e4===_0x36491f(0x156)||_0x4f8364,_0x2e8f15=_0x4ce1ca?_0x4f8364?_0x36491f(0x14b):_0x5027e4[_0x36491f(0x155)]()+_0x36491f(0x170):undefined;const _0x56bf85=stripOuterParentheses(_0x43a6c0[0x4]??''),_0xd59d10=_0x56bf85[_0x36491f(0x15f)](MYBATIS_DYNAMIC_START_MARKER)||_0x56bf85[_0x36491f(0x15f)](MYBATIS_DYNAMIC_END_MARKER),_0x2f69d2=_0x56bf85[_0x36491f(0x15f)](MYBATIS_INCLUDE_MARKER);_0xd59d10&&(_0x4ce1ca=!![],_0x2e8f15??=_0x36491f(0x130));_0x2f69d2&&(_0x4ce1ca=!![],_0x2e8f15??=_0x36491f(0x169));const _0x146c43=_0x56bf85[_0x36491f(0x14c)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x36491f(0x14c)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x146c43,'OR')&&(_0x4ce1ca=!![],_0x2e8f15??=_0x36491f(0x166));for(const _0x3a4038 of splitTopLevelAnd(_0x146c43)){const _0x3b32d4=stripOuterParentheses(_0x3a4038);if(hasTopLevelKeyword(_0x3b32d4,'OR')){_0x4ce1ca=!![],_0x2e8f15??=_0x36491f(0x166);continue;}const _0x675d97=splitEquality(_0x3b32d4);if(!_0x675d97){containsColumnReference(_0x3a4038,_0x5391e3)&&(_0x4ce1ca=!![]);continue;}const _0xa5aa1e=parseDirectColumnReference(_0x675d97[0x0],_0x5391e3),_0x30a6aa=parseDirectColumnReference(_0x675d97[0x1],_0x5391e3),_0x349014=containsColumnReference(_0x675d97[0x0],_0x5391e3),_0x47fa27=containsColumnReference(_0x675d97[0x1],_0x5391e3),_0x2ef981=_0xa5aa1e&&!_0x47fa27?_0xa5aa1e:_0x30a6aa&&!_0x349014?_0x30a6aa:null;if(_0x2ef981&&!_0x51377f[_0x36491f(0x15f)](_0x2ef981))_0x51377f[_0x36491f(0x140)](_0x2ef981);else!_0x2ef981&&containsColumnReference(_0x3a4038,_0x5391e3)&&(_0x4ce1ca=!![]);}_0x33c50c['push']({'table':_0x565642,'alias':_0x5391e3,'columns':_0x51377f,'unsupportedPredicate':_0x4ce1ca,'unsupportedReason':_0x2e8f15,'containsUnresolvedInclude':_0x2f69d2,'position':_0x84631f});}for(const _0x3956e3 of _0x4b90a2[_0x36491f(0x176)](/\bJOIN\b/gi)){const _0x9d6a7a=_0x3956e3[_0x36491f(0x13e)]??0x0;if(_0xeeae91[_0x36491f(0x162)](_0x9d6a7a))continue;const _0x3c1eec=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x36491f(0x135)](_0x5c9981[_0x36491f(0x134)](_0x9d6a7a+_0x3956e3[0x0][_0x36491f(0x161)])),_0xc70068=normalizeIdentifier(_0x3c1eec?.[0x1]||_0x36491f(0x16a)),_0x4cad43=normalizeIdentifier(_0x3c1eec?.[0x2]||''),_0x920144=isSqlClauseKeyword(_0x4cad43)?_0xc70068[_0x36491f(0x145)]('.')['at'](-0x1)||_0xc70068:_0x4cad43||_0xc70068[_0x36491f(0x145)]('.')['at'](-0x1)||_0xc70068;_0x33c50c[_0x36491f(0x140)]({'table':_0xc70068,'alias':_0x920144,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x9d6a7a});}const _0x32d79d=_0x4b90a2['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x32d79d>=0x0&&!_0x33c50c[_0x36491f(0x141)](_0x38cb74=>_0x38cb74[_0x36491f(0x148)])&&_0x33c50c[_0x36491f(0x140)]({'table':_0x36491f(0x16a),'alias':_0x36491f(0x16a),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x36491f(0x137),'containsUnresolvedInclude':!![],'position':_0x32d79d}),_0x33c50c['sort']((_0x3067bb,_0x45eb31)=>_0x3067bb['position']-_0x45eb31[_0x36491f(0x172)]);}function stripSqlNoise(_0x3c4abb){const _0x5421e8=a307_0x9fa4,_0x3d0c37=Array[_0x5421e8(0x131)](_0x3c4abb),_0x4793ed=(_0x26d91b,_0x1e1a6c)=>{for(let _0x2e591c=_0x26d91b;_0x2e591c<_0x1e1a6c;_0x2e591c+=0x1){_0x3d0c37[_0x2e591c]!=='\x0a'&&_0x3d0c37[_0x2e591c]!=='\x0d'&&(_0x3d0c37[_0x2e591c]='\x20');}};for(let _0x418a11=0x0;_0x418a11<_0x3d0c37[_0x5421e8(0x161)];_0x418a11+=0x1){const _0x5052e2=_0x3d0c37[_0x418a11],_0x3be7db=_0x3d0c37[_0x418a11+0x1];if(_0x5052e2==='\x27'||_0x5052e2==='\x22'||_0x5052e2==='`'){const _0x345576=_0x5052e2,_0x122324=_0x418a11;_0x418a11+=0x1;while(_0x418a11<_0x3d0c37[_0x5421e8(0x161)]){if(_0x3d0c37[_0x418a11]==='\x5c'&&_0x418a11+0x1<_0x3d0c37[_0x5421e8(0x161)]){_0x418a11+=0x2;continue;}if(_0x3d0c37[_0x418a11]!==_0x345576){_0x418a11+=0x1;continue;}if(_0x3d0c37[_0x418a11+0x1]===_0x345576){_0x418a11+=0x2;continue;}break;}if(_0x345576==='\x27')_0x4793ed(_0x122324,Math[_0x5421e8(0x15a)](_0x418a11+0x1,_0x3d0c37[_0x5421e8(0x161)]));continue;}if(_0x5052e2==='-'&&_0x3be7db==='-'){const _0x1ef866=_0x418a11;while(_0x418a11<_0x3d0c37[_0x5421e8(0x161)]&&_0x3d0c37[_0x418a11]!=='\x0a')_0x418a11+=0x1;_0x4793ed(_0x1ef866,_0x418a11);continue;}if(_0x5052e2==='/'&&_0x3be7db==='*'){const _0x5ca2f5=_0x418a11;_0x418a11+=0x2;while(_0x418a11<_0x3d0c37[_0x5421e8(0x161)]&&!(_0x3d0c37[_0x418a11]==='*'&&_0x3d0c37[_0x418a11+0x1]==='/')){_0x418a11+=0x1;}_0x418a11=Math[_0x5421e8(0x15a)](_0x418a11+0x1,_0x3d0c37[_0x5421e8(0x161)]-0x1),_0x4793ed(_0x5ca2f5,_0x418a11+0x1);continue;}if(_0x5052e2==='#'&&_0x3be7db!=='{'){const _0x8b55cc=_0x418a11;while(_0x418a11<_0x3d0c37[_0x5421e8(0x161)]&&_0x3d0c37[_0x418a11]!=='\x0a')_0x418a11+=0x1;_0x4793ed(_0x8b55cc,_0x418a11);continue;}if((_0x5052e2==='#'||_0x5052e2==='$')&&_0x3be7db==='{'){const _0x4cc7bc=_0x418a11;_0x418a11+=0x2;while(_0x418a11<_0x3d0c37['length']&&_0x3d0c37[_0x418a11]!=='}')_0x418a11+=0x1;_0x4793ed(_0x4cc7bc,Math[_0x5421e8(0x15a)](_0x418a11+0x1,_0x3d0c37[_0x5421e8(0x161)]));}}return _0x3d0c37[_0x5421e8(0x159)]('');}function maskQuotedIdentifiers(_0x24d9ef){const _0x57d583=a307_0x9fa4,_0x52b20a=Array[_0x57d583(0x131)](_0x24d9ef);for(let _0x1657fd=0x0;_0x1657fd<_0x52b20a[_0x57d583(0x161)];_0x1657fd+=0x1){const _0x46dd72=_0x52b20a[_0x1657fd];if(_0x46dd72!=='\x22'&&_0x46dd72!=='`')continue;_0x1657fd+=0x1;while(_0x1657fd<_0x52b20a[_0x57d583(0x161)]){if(_0x52b20a[_0x1657fd]===_0x46dd72){if(_0x52b20a[_0x1657fd+0x1]===_0x46dd72){_0x52b20a[_0x1657fd]='\x20',_0x52b20a[_0x1657fd+0x1]='\x20',_0x1657fd+=0x2;continue;}break;}_0x52b20a[_0x1657fd]='\x20',_0x1657fd+=0x1;}}return _0x52b20a[_0x57d583(0x159)]('');}function maskNestedQueries(_0x153a82){const _0x53f764=a307_0x9fa4,_0x5b421b=Array[_0x53f764(0x131)](_0x153a82);for(let _0x37b303=0x0;_0x37b303<_0x5b421b['length'];_0x37b303+=0x1){if(_0x5b421b[_0x37b303]!=='(')continue;const _0x491873=_0x153a82['slice'](_0x37b303+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x53f764(0x164)](_0x491873))continue;let _0xcb803c=0x1,_0x4c0b95=_0x37b303+0x1;for(;_0x4c0b95<_0x5b421b[_0x53f764(0x161)]&&_0xcb803c>0x0;_0x4c0b95+=0x1){if(_0x5b421b[_0x4c0b95]==='(')_0xcb803c+=0x1;if(_0x5b421b[_0x4c0b95]===')')_0xcb803c-=0x1;}if(_0xcb803c!==0x0)continue;for(let _0x2a5249=_0x37b303;_0x2a5249<_0x4c0b95;_0x2a5249+=0x1){_0x5b421b[_0x2a5249]='\x20';}const _0x450ada=_0x53f764(0x15c);for(let _0x3adc86=0x0;_0x3adc86<_0x450ada[_0x53f764(0x161)]&&_0x37b303+_0x3adc86<_0x4c0b95;_0x3adc86+=0x1){_0x5b421b[_0x37b303+_0x3adc86]=_0x450ada[_0x3adc86];}_0x37b303=_0x4c0b95-0x1;}return _0x5b421b['join']('');}function splitTopLevelAnd(_0x1b478d){const _0x44c15d=a307_0x9fa4,_0x3925a2=[];let _0x3ab044=0x0,_0x5197d8=0x0;for(let _0x29d5fe=0x0;_0x29d5fe<_0x1b478d[_0x44c15d(0x161)];_0x29d5fe+=0x1){const _0x2f4d49=_0x1b478d[_0x29d5fe];if(_0x2f4d49==='(')_0x3ab044+=0x1;if(_0x2f4d49===')')_0x3ab044=Math[_0x44c15d(0x16e)](0x0,_0x3ab044-0x1);_0x3ab044===0x0&&_0x1b478d['slice'](_0x29d5fe)['match'](/^AND\b/i)&&(_0x29d5fe===0x0||/\s/[_0x44c15d(0x164)](_0x1b478d[_0x29d5fe-0x1]??''))&&(_0x3925a2[_0x44c15d(0x140)](_0x1b478d[_0x44c15d(0x134)](_0x5197d8,_0x29d5fe)[_0x44c15d(0x160)]()),_0x29d5fe+=0x2,_0x5197d8=_0x29d5fe+0x1);}const _0x537357=_0x1b478d[_0x44c15d(0x134)](_0x5197d8)[_0x44c15d(0x160)]();if(_0x537357)_0x3925a2[_0x44c15d(0x140)](_0x537357);return _0x3925a2;}function hasTopLevelKeyword(_0x313ae7,_0x51abc2){const _0x173a3c=a307_0x9fa4;let _0x128b4e=0x0;for(let _0x1e9860=0x0;_0x1e9860<_0x313ae7['length'];_0x1e9860+=0x1){const _0x5696f7=_0x313ae7[_0x1e9860];if(_0x5696f7==='(')_0x128b4e+=0x1;if(_0x5696f7===')')_0x128b4e=Math[_0x173a3c(0x16e)](0x0,_0x128b4e-0x1);if(_0x128b4e!==0x0)continue;const _0x34276f=_0x313ae7[_0x173a3c(0x134)](_0x1e9860,_0x1e9860+_0x51abc2[_0x173a3c(0x161)]),_0x354a63=_0x313ae7[_0x1e9860-0x1]??'\x20',_0x5d242e=_0x313ae7[_0x1e9860+_0x51abc2[_0x173a3c(0x161)]]??'\x20';if(_0x34276f[_0x173a3c(0x155)]()===_0x51abc2[_0x173a3c(0x155)]()&&!/[\w$]/['test'](_0x354a63)&&!/[\w$]/[_0x173a3c(0x164)](_0x5d242e))return!![];}return![];}function splitEquality(_0x5f0cdc){const _0x1004cb=a307_0x9fa4,_0x894bff=stripOuterParentheses(_0x5f0cdc);let _0x7ad013=0x0,_0x52e396;for(let _0x51da8e=0x0;_0x51da8e<_0x894bff[_0x1004cb(0x161)];_0x51da8e+=0x1){const _0x5ad615=_0x894bff[_0x51da8e];if(_0x5ad615==='(')_0x7ad013+=0x1;if(_0x5ad615===')')_0x7ad013=Math[_0x1004cb(0x16e)](0x0,_0x7ad013-0x1);const _0xef6b9d=_0x894bff[_0x51da8e-0x1]??'',_0x371b17=_0x894bff[_0x51da8e+0x1]??'';if(_0x5ad615==='='&&_0x7ad013===0x0&&!/[!<>=:]/[_0x1004cb(0x164)](_0xef6b9d)&&_0x371b17!=='='){if(_0x52e396!==undefined)return null;_0x52e396=_0x51da8e;}}return _0x52e396===undefined?null:[_0x894bff[_0x1004cb(0x134)](0x0,_0x52e396)[_0x1004cb(0x160)](),_0x894bff[_0x1004cb(0x134)](_0x52e396+0x1)[_0x1004cb(0x160)]()];}function parseDirectColumnReference(_0x4fbfbf,_0x37310c){const _0x1485fc=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x4fbfbf));if(!_0x1485fc)return null;if(normalizeIdentifier(_0x1485fc[0x1]??'')!==normalizeIdentifier(_0x37310c))return null;return normalizeIdentifier(_0x1485fc[0x2]??'');}function containsColumnReference(_0x355054,_0x13157d){const _0x25901c=a307_0x9fa4,_0x15c167=_0x355054['replace'](/[`"]/g,''),_0x5e7192=_0x13157d[_0x25901c(0x175)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp('(?:^|[^\x5cw$])'+_0x5e7192+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x25901c(0x164)](_0x15c167);}function findEqualityPrefix(_0x36815a,_0x2d4c7f){const _0x576501=a307_0x9fa4,_0x194457=new Set(_0x2d4c7f[_0x576501(0x15d)](normalizeIdentifier)),_0x4cd619=[];for(const _0x439e7a of _0x36815a){if(!_0x194457[_0x576501(0x162)](normalizeIdentifier(_0x439e7a)))break;_0x4cd619[_0x576501(0x140)](_0x439e7a);}return _0x4cd619;}function a307_0x3300(){const _0x3ceb89=['unsupportedPredicate','join','min','alias','__sq__','map','1293822YeTmkT','includes','trim','length','has','tableName','test','endsWith','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','add','8ltDcvI','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','unknown','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','5406260qGWkZk','warning','max','52680hhWqza','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','2728SaEaHO','position','startsWith','255hUdvwv','replace','matchAll','indexes','search','matchedPrefix','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','from','filter','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','slice','exec','reduce','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','JOIN_INDEX_MISSING','covered','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','unsupportedReason','using','where','index','INNER','push','some','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','978459HJRIxe','toLowerCase','split','JOIN_PREDICATE_UNSUPPORTED','sql','containsUnresolvedInclude','error','INDEX_METADATA_UNAVAILABLE','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','replaceAll','unavailable','326440kPJOcN','columns','105eegVkM','320825NWXAPG','natural','table','inner','toUpperCase','full','right'];a307_0x3300=function(){return _0x3ceb89;};return a307_0x3300();}function resolveTableMetadata(_0x1b1fca,_0x3a450a){const _0x15e1d9=a307_0x9fa4,_0x29fe3c=normalizeIdentifier(_0x3a450a),_0xa270d0=_0x1b1fca[_0x15e1d9(0x132)](_0x1e18cc=>normalizeIdentifier(_0x1e18cc[_0x15e1d9(0x163)])===_0x29fe3c);if(_0xa270d0[_0x15e1d9(0x161)]===0x1)return _0xa270d0[0x0];const _0x20ec34=_0x29fe3c[_0x15e1d9(0x15f)]('.'),_0x697bd5=_0x29fe3c[_0x15e1d9(0x145)]('.')['at'](-0x1),_0x5bbcab=_0x1b1fca[_0x15e1d9(0x132)](_0x4407c1=>{const _0x236e5c=_0x15e1d9,_0x272f54=normalizeIdentifier(_0x4407c1[_0x236e5c(0x163)]);if(_0x20ec34&&_0x272f54['includes']('.'))return![];return _0x272f54[_0x236e5c(0x145)]('.')['at'](-0x1)===_0x697bd5;});return _0x5bbcab[_0x15e1d9(0x161)]===0x1?_0x5bbcab[0x0]:undefined;}function columnNamesMatch(_0x15535b,_0x5c3bfb){return normalizeIdentifier(_0x15535b)===normalizeIdentifier(_0x5c3bfb);}function normalizeIdentifier(_0x4149ae){const _0x3817b2=a307_0x9fa4;return _0x4149ae[_0x3817b2(0x175)](/[`"]/g,'')[_0x3817b2(0x160)]()[_0x3817b2(0x144)]();}function isSqlClauseKeyword(_0x4ad841){const _0x50994a=a307_0x9fa4;return new Set(['on',_0x50994a(0x13c),_0x50994a(0x13d),_0x50994a(0x159),_0x50994a(0x154),'left',_0x50994a(0x157),_0x50994a(0x156),'cross',_0x50994a(0x152)])[_0x50994a(0x162)](_0x4ad841);}function stripOuterParentheses(_0x4b7fdf){const _0x10bbfa=a307_0x9fa4;let _0x211070=_0x4b7fdf[_0x10bbfa(0x160)]();while(_0x211070[_0x10bbfa(0x173)]('(')&&_0x211070[_0x10bbfa(0x165)](')')){let _0x16de41=0x0,_0x5e523e=!![];for(let _0x242ef6=0x0;_0x242ef6<_0x211070[_0x10bbfa(0x161)];_0x242ef6+=0x1){if(_0x211070[_0x242ef6]==='(')_0x16de41+=0x1;if(_0x211070[_0x242ef6]===')')_0x16de41-=0x1;if(_0x16de41===0x0&&_0x242ef6<_0x211070[_0x10bbfa(0x161)]-0x1){_0x5e523e=![];break;}}if(!_0x5e523e||_0x16de41!==0x0)break;_0x211070=_0x211070['slice'](0x1,-0x1)['trim']();}return _0x211070;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a308_0x3e57(){const _0x5dae44=['178810EkKLID','sql.lock.json','195yPYUps','1289449HifwIY','698xTKcYM','55923868KsaiwR','36yvlnbY','/sql','217128RBdlKY','92bIuFlb','sql-trash','.rabetbase','2495911iylipo','621GdpDsf','4009dbbdYh','161457bqJwHJ','sql','8QdljBM'];a308_0x3e57=function(){return _0x5dae44;};return a308_0x3e57();}const a308_0x78ec77=a308_0x862f;(function(_0x53e43d,_0x9672a9){const _0x389e22=a308_0x862f,_0x545c73=_0x53e43d();while(!![]){try{const _0x4f42f7=parseInt(_0x389e22(0xa5))/0x1*(-parseInt(_0x389e22(0x9b))/0x2)+parseInt(_0x389e22(0xa6))/0x3*(-parseInt(_0x389e22(0xa0))/0x4)+parseInt(_0x389e22(0xab))/0x5*(-parseInt(_0x389e22(0x9f))/0x6)+-parseInt(_0x389e22(0x9a))/0x7*(-parseInt(_0x389e22(0xa8))/0x8)+parseInt(_0x389e22(0xa4))/0x9*(parseInt(_0x389e22(0xa9))/0xa)+-parseInt(_0x389e22(0xa3))/0xb*(parseInt(_0x389e22(0x9d))/0xc)+parseInt(_0x389e22(0x9c))/0xd;if(_0x4f42f7===_0x9672a9)break;else _0x545c73['push'](_0x545c73['shift']());}catch(_0x346836){_0x545c73['push'](_0x545c73['shift']());}}}(a308_0x3e57,0xf1e63));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a308_0x78ec77(0xa2),LOCK_FILE_NAME=a308_0x78ec77(0xaa),TRASH_DIR_NAME=a308_0x78ec77(0xa1);function a308_0x862f(_0x4dee68,_0x4dfe51){_0x4dee68=_0x4dee68-0x9a;const _0x3e57bb=a308_0x3e57();let _0x862f29=_0x3e57bb[_0x4dee68];return _0x862f29;}export function loadSqlProjectConfig(_0x30ac7d,_0x2babb6){const _0x217563=a308_0x78ec77,_0x1143dd=resolve(_0x2babb6??findProjectRootDirectory()),_0x1b3b0f=DOT_DIR+_0x217563(0x9e),_0x205583=_0x1b3b0f+'/'+_0x30ac7d;return{'projectRoot':_0x1143dd,'appCode':_0x30ac7d,'sqlWorkspaceRoot':_0x1b3b0f,'sqlRoot':_0x205583,'sqlRootDir':resolve(_0x1143dd,DOT_DIR,_0x217563(0xa7),_0x30ac7d),'lockFilePath':resolve(_0x1143dd,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1143dd,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x341a6a,_0x5c4abc){const _0x151022=a309_0x322a,_0x43db1a=_0x341a6a();while(!![]){try{const _0x1b1fe1=-parseInt(_0x151022(0x16a))/0x1*(parseInt(_0x151022(0x161))/0x2)+parseInt(_0x151022(0x167))/0x3+-parseInt(_0x151022(0x16d))/0x4+-parseInt(_0x151022(0x174))/0x5+parseInt(_0x151022(0x177))/0x6+parseInt(_0x151022(0x162))/0x7*(parseInt(_0x151022(0x15b))/0x8)+-parseInt(_0x151022(0x171))/0x9*(-parseInt(_0x151022(0x164))/0xa);if(_0x1b1fe1===_0x5c4abc)break;else _0x43db1a['push'](_0x43db1a['shift']());}catch(_0x34823e){_0x43db1a['push'](_0x43db1a['shift']());}}}(a309_0x20fc,0xd9418));function a309_0x20fc(){const _0x393bb6=['9650248Uxsskz','dbName','ENOENT','slice','filter','sqlName','2qRcppw','7AlMcHb','sql','8090yKInhN','mybatisXml','.xml','2796783JtUzmR','sqlCode','push','1429301VkaqdB','.sql','test','6349196vdwUBp','code','sqlRootDir','isDirectory','22959ANkukn','mode','isFile','2213200sOiUNC','path','length','880914oebEro','indexOf','name','replace','split'];a309_0x20fc=function(){return _0x393bb6;};return a309_0x20fc();}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x67ccd9){const _0x19337b=a309_0x322a;if(_0x67ccd9===_0x19337b(0x16b))return'sql';if(_0x67ccd9===_0x19337b(0x166))return _0x19337b(0x165);return undefined;}async function scanSqlFilesRecursively(_0x556ce9,_0x4e9c17){const _0x2fc3ef=a309_0x322a,_0xaad9ad=[];try{const _0x40aceb=await readdir(_0x556ce9,{'withFileTypes':!![]});for(const _0x15a64a of _0x40aceb){const _0x4621d0=join(_0x556ce9,_0x15a64a[_0x2fc3ef(0x158)]);if(_0x15a64a[_0x2fc3ef(0x170)]()){_0xaad9ad[_0x2fc3ef(0x169)](...await scanSqlFilesRecursively(_0x4621d0,_0x4e9c17));continue;}if(!_0x15a64a[_0x2fc3ef(0x173)]())continue;const _0x5d059e=extname(_0x15a64a[_0x2fc3ef(0x158)])['toLowerCase'](),_0x1cf791=extensionToMode(_0x5d059e);if(!_0x1cf791)continue;const _0x514d1e=relative(_0x4e9c17,_0x4621d0)[_0x2fc3ef(0x159)](/\\/g,'/'),_0x5bb308=_0x514d1e[_0x2fc3ef(0x15a)]('/')[_0x2fc3ef(0x15f)](Boolean),_0x4bb537=parseSqlPath(_0x5bb308,_0x15a64a[_0x2fc3ef(0x158)],_0x5d059e);if(!_0x4bb537)continue;_0xaad9ad[_0x2fc3ef(0x169)]({'sqlCode':_0x4bb537['sqlCode'],'sqlName':_0x4bb537['sqlName'],'dbDirectory':_0x5bb308[0x0],'filePath':_0x4621d0,'relativePath':_0x514d1e,'lockKey':_0x4bb537[_0x2fc3ef(0x168)],'mode':_0x1cf791});}}catch(_0x1ae97b){if(_0x1ae97b[_0x2fc3ef(0x16e)]!==_0x2fc3ef(0x15d))throw _0x1ae97b;}return _0xaad9ad;}export async function scanLocalSqlQueries(_0x3c14ef){const _0x5056f2=a309_0x322a;return scanSqlFilesRecursively(_0x3c14ef[_0x5056f2(0x16f)],_0x3c14ef['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x515a68,_0x33a17c,_0x11291c){const _0x28dd3c=a309_0x322a,_0xb779d0=_0x11291c?.[_0x28dd3c(0x175)]||(_0x11291c?.[_0x28dd3c(0x160)]||_0x11291c?.[_0x28dd3c(0x15c)]?buildSqlRelativePath(_0x33a17c,_0x11291c?.[_0x28dd3c(0x160)],_0x11291c?.[_0x28dd3c(0x15c)],_0x11291c?.[_0x28dd3c(0x172)]||_0x28dd3c(0x163),_0x11291c?.['dbId']):buildDefaultSqlFileName(_0x33a17c,_0x11291c?.[_0x28dd3c(0x172)]||_0x28dd3c(0x163)));return join(_0x515a68[_0x28dd3c(0x16f)],_0xb779d0);}function a309_0x322a(_0x113377,_0x10ca21){_0x113377=_0x113377-0x158;const _0x20fc59=a309_0x20fc();let _0x322a50=_0x20fc59[_0x113377];return _0x322a50;}export async function directoryExists(_0x306378){const _0x11a2ca=a309_0x322a;try{const _0x5c7ca7=await stat(_0x306378);return _0x5c7ca7[_0x11a2ca(0x170)]();}catch{return![];}}function parseSqlPath(_0x3ccd52,_0x3cad18,_0x29a630){const _0x5ae300=a309_0x322a,_0x194d8c=_0x3cad18['slice'](0x0,-_0x29a630['length']);if(_0x3ccd52[_0x5ae300(0x176)]<0x2)return null;const _0x567a39=_0x194d8c[_0x5ae300(0x178)]('_');if(_0x567a39<=0x0||_0x567a39>=_0x194d8c[_0x5ae300(0x176)]-0x1)return null;const _0x168378=_0x194d8c[_0x5ae300(0x15e)](0x0,_0x567a39);if(!isLikelySqlCode(_0x168378))return null;return{'sqlCode':_0x168378,'sqlName':_0x194d8c[_0x5ae300(0x15e)](_0x567a39+0x1)};}function isLikelySqlCode(_0xcbb04d){const _0x4756ca=a309_0x322a;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x4756ca(0x16c)](_0xcbb04d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c311c,_0xba0c96){const _0x54de08=a310_0x4e58,_0x38fcf8=_0x3c311c();while(!![]){try{const _0x4e06a4=-parseInt(_0x54de08(0x150))/0x1*(parseInt(_0x54de08(0x155))/0x2)+parseInt(_0x54de08(0x14d))/0x3+parseInt(_0x54de08(0x157))/0x4*(-parseInt(_0x54de08(0x153))/0x5)+parseInt(_0x54de08(0x151))/0x6*(-parseInt(_0x54de08(0x148))/0x7)+-parseInt(_0x54de08(0x14e))/0x8*(parseInt(_0x54de08(0x14a))/0x9)+-parseInt(_0x54de08(0x154))/0xa*(parseInt(_0x54de08(0x152))/0xb)+parseInt(_0x54de08(0x14c))/0xc;if(_0x4e06a4===_0xba0c96)break;else _0x38fcf8['push'](_0x38fcf8['shift']());}catch(_0x56254e){_0x38fcf8['push'](_0x38fcf8['shift']());}}}(a310_0x4305,0x82112));function a310_0x4e58(_0x172a2f,_0x1a1217){_0x172a2f=_0x172a2f-0x148;const _0x430540=a310_0x4305();let _0x4e5821=_0x430540[_0x172a2f];return _0x4e5821;}import{readFile}from'node:fs/promises';function a310_0x4305(){const _0x1a25fa=['73722aOVqJz','2253590ZOHflv','900nnFUYw','9326KQXDzo','update','4sarPtw','7YrTgJG','hex','99mlXGbL','digest','20881464hKeclD','2325675JboIrw','1672gYMmBp','md5','5qjwqoz','5418486UQELyB'];a310_0x4305=function(){return _0x1a25fa;};return a310_0x4305();}import a310_0x305a22 from'node:crypto';export function computeSqlContentHash(_0x165694){const _0x211053=a310_0x4e58;return a310_0x305a22['createHash'](_0x211053(0x14f))[_0x211053(0x156)](_0x165694)[_0x211053(0x14b)](_0x211053(0x149));}export async function computeSqlFileHash(_0x178c07){const _0xf54780=await readFile(_0x178c07,'utf8');return computeSqlContentHash(_0xf54780);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a311_0x4138(_0x3a32eb,_0x356583){_0x3a32eb=_0x3a32eb-0x1ea;const _0x23c857=a311_0x23c8();let _0x4138a9=_0x23c857[_0x3a32eb];return _0x4138a9;}(function(_0x415b82,_0x481805){const _0x491269=a311_0x4138,_0x59da5c=_0x415b82();while(!![]){try{const _0x355209=-parseInt(_0x491269(0x1f7))/0x1*(parseInt(_0x491269(0x1f0))/0x2)+parseInt(_0x491269(0x1f4))/0x3*(-parseInt(_0x491269(0x1eb))/0x4)+-parseInt(_0x491269(0x201))/0x5*(parseInt(_0x491269(0x1fc))/0x6)+-parseInt(_0x491269(0x1f2))/0x7*(-parseInt(_0x491269(0x1f3))/0x8)+-parseInt(_0x491269(0x1f9))/0x9+parseInt(_0x491269(0x1f8))/0xa*(parseInt(_0x491269(0x1f5))/0xb)+parseInt(_0x491269(0x1ee))/0xc*(parseInt(_0x491269(0x1fe))/0xd);if(_0x355209===_0x481805)break;else _0x59da5c['push'](_0x59da5c['shift']());}catch(_0x27b263){_0x59da5c['push'](_0x59da5c['shift']());}}}(a311_0x23c8,0x42437));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x5884d7,_0x3e2156,_0xb7612f,_0x392ea0){const _0xd977dc=a311_0x4138,_0x4ce1c4=_0x5884d7??createEmptySqlLock();let _0x20755d=_0x4ce1c4['apps'][_0x3e2156];if(!_0x20755d)return _0x20755d={'sqlRoot':_0xb7612f,'lastSync':'','sqls':{}},_0x4ce1c4[_0xd977dc(0x1fd)][_0x3e2156]=_0x20755d,{'lockData':_0x4ce1c4,'appLock':_0x20755d};if(!_0x20755d[_0xd977dc(0x1f1)])_0x20755d[_0xd977dc(0x1f1)]=_0xb7612f;else{if(_0x20755d['sqlRoot']!==_0xb7612f)throw new Error(_0x392ea0+_0xd977dc(0x1fa)+_0xb7612f+_0xd977dc(0x1f6)+_0x20755d[_0xd977dc(0x1f1)]+_0xd977dc(0x200)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x20755d[_0xd977dc(0x202)]&&(_0x20755d['sqls']={}),!_0x20755d[_0xd977dc(0x1ea)]&&(_0x20755d['lastSync']=''),{'lockData':_0x4ce1c4,'appLock':_0x20755d};}export async function readSqlLockFile(_0x39bd25){const _0xba300b=a311_0x4138;try{const _0x238bc2=await readFile(_0x39bd25,'utf8');return JSON[_0xba300b(0x1ec)](_0x238bc2);}catch(_0x1afc4d){if(_0x1afc4d[_0xba300b(0x1fb)]===_0xba300b(0x203))return null;throw new Error(_0xba300b(0x1ed)+String(_0x1afc4d));}}export async function writeSqlLockFile(_0x2d2d7c,_0x4bd72c){const _0x387230=a311_0x4138;await mkdir(dirname(_0x2d2d7c),{'recursive':!![]}),await writeFile(_0x2d2d7c,JSON[_0x387230(0x1ff)](_0x4bd72c,null,0x2),_0x387230(0x1ef));}function a311_0x23c8(){const _0x2cba5f=['ENOENT','lastSync','1441528PigoVN','parse','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','7044sbyKup','utf8','22UrTLtL','sqlRoot','112McsUCU','77632fFzhlr','3QzfbxF','404943yVKLFb','\x22\x20vs\x20lock\x20\x22','10859EEEQZF','100CxMHVh','518400SEhqRS',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','code','1026yMVXVW','apps','7189HFQkcb','stringify','\x22.\x20','1145fKPyTZ','sqls'];a311_0x23c8=function(){return _0x2cba5f;};return a311_0x23c8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1988ff,_0x439f72){const _0x3cf844=a313_0x7a05,_0x2b2c5d=_0x1988ff();while(!![]){try{const _0x5d7a1c=-parseInt(_0x3cf844(0xef))/0x1+parseInt(_0x3cf844(0xf1))/0x2+-parseInt(_0x3cf844(0xf4))/0x3+parseInt(_0x3cf844(0xee))/0x4*(parseInt(_0x3cf844(0xec))/0x5)+parseInt(_0x3cf844(0xe8))/0x6*(parseInt(_0x3cf844(0xf3))/0x7)+-parseInt(_0x3cf844(0xf5))/0x8*(-parseInt(_0x3cf844(0xf2))/0x9)+-parseInt(_0x3cf844(0xeb))/0xa;if(_0x5d7a1c===_0x439f72)break;else _0x2b2c5d['push'](_0x2b2c5d['shift']());}catch(_0x522298){_0x2b2c5d['push'](_0x2b2c5d['shift']());}}}(a313_0x42de,0x819b8));function a313_0x7a05(_0x5d97c2,_0x360031){_0x5d97c2=_0x5d97c2-0xe4;const _0x42de7e=a313_0x42de();let _0x7a0521=_0x42de7e[_0x5d97c2];return _0x7a0521;}import{detectSqlSourceMode}from'../../core/sql-validator.js';function a313_0x42de(){const _0x54da39=['1112229HVcZdN','16vFmQLC','.sql','unknown-db','mybatisXml','replace','4741068UyhRnA','trim','db-','1565020WUBZnx','300qEUEPx','.xml','46268sfMUKu','988802BfQTRc','unknown-sql','1106094RUDtUS','43533kZBlqH','7TLwcJR'];a313_0x42de=function(){return _0x54da39;};return a313_0x42de();}export function detectSqlMode(_0x177527){return detectSqlSourceMode(_0x177527);}export function getSqlFileExtension(_0x4e4182){const _0x348713=a313_0x7a05;return _0x4e4182===_0x348713(0xe6)?_0x348713(0xed):_0x348713(0xe4);}export function buildDefaultSqlFileName(_0x525497,_0x485070){return''+_0x525497+getSqlFileExtension(_0x485070);}export function sanitizeSqlPathSegment(_0x52016c,_0x135a83){const _0x4bc958=a313_0x7a05,_0xc63eee=String(_0x52016c??'')[_0x4bc958(0xe9)](),_0x4954e7=_0xc63eee[_0x4bc958(0xe7)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x4bc958(0xe7)](/\s+/g,'-')[_0x4bc958(0xe7)](/-+/g,'-')[_0x4bc958(0xe7)](/^\.+/,'')[_0x4bc958(0xe7)](/\.+$/,'')[_0x4bc958(0xe7)](/^-+/,'')[_0x4bc958(0xe7)](/-+$/,'');return _0x4954e7||_0x135a83;}export function buildDbDirectoryName(_0x110436,_0x23c7de){const _0x33b387=a313_0x7a05;return sanitizeSqlPathSegment(_0x110436,_0x23c7de!=null?_0x33b387(0xea)+_0x23c7de:_0x33b387(0xe5));}export function buildSqlRelativePath(_0x5bfa74,_0x4a5dc1,_0x1df8b5,_0x27c3d5,_0xd0d642){const _0x3367b1=a313_0x7a05,_0x2b452e=buildDbDirectoryName(_0x1df8b5,_0xd0d642),_0x474ca3=sanitizeSqlPathSegment(_0x5bfa74,_0x3367b1(0xf0)),_0x5f003d=sanitizeSqlPathSegment(_0x4a5dc1,_0x474ca3);return _0x2b452e+'/'+_0x474ca3+'_'+_0x5f003d+getSqlFileExtension(_0x27c3d5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a307_0x4f83e8=a307_0xf0b1;(function(_0x21d1f9,_0x5039cf){const _0x3d3186=a307_0xf0b1,_0x1d02bd=_0x21d1f9();while(!![]){try{const _0x139a95=parseInt(_0x3d3186(0x17a))/0x1*(parseInt(_0x3d3186(0x186))/0x2)+-parseInt(_0x3d3186(0x151))/0x3*(parseInt(_0x3d3186(0x13d))/0x4)+parseInt(_0x3d3186(0x16e))/0x5+-parseInt(_0x3d3186(0x146))/0x6+-parseInt(_0x3d3186(0x179))/0x7+-parseInt(_0x3d3186(0x14a))/0x8*(-parseInt(_0x3d3186(0x167))/0x9)+parseInt(_0x3d3186(0x14c))/0xa;if(_0x139a95===_0x5039cf)break;else _0x1d02bd['push'](_0x1d02bd['shift']());}catch(_0x33aad6){_0x1d02bd['push'](_0x1d02bd['shift']());}}}(a307_0x1945,0xeb507));const MYBATIS_OUTER_TAGS=new Map([[a307_0x4f83e8(0x139),a307_0x4f83e8(0x17d)],[a307_0x4f83e8(0x157),'INSERT'],[a307_0x4f83e8(0x158),a307_0x4f83e8(0x121)],[a307_0x4f83e8(0x11f),a307_0x4f83e8(0x16a)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a307_0x4f83e8(0x16d),a307_0x4f83e8(0x133),a307_0x4f83e8(0x136),a307_0x4f83e8(0x131),a307_0x4f83e8(0x124),a307_0x4f83e8(0x123),a307_0x4f83e8(0x119),'bind',a307_0x4f83e8(0x178),a307_0x4f83e8(0x173)]),MYBATIS_BRANCH_TAGS=new Set(['if',a307_0x4f83e8(0x133),'choose',a307_0x4f83e8(0x131),a307_0x4f83e8(0x124)]);export const MYBATIS_DYNAMIC_START_MARKER=a307_0x4f83e8(0x169);export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';export const MYBATIS_INCLUDE_MARKER=a307_0x4f83e8(0x183);const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a307_0x4f83e8(0x175)+[...MYBATIS_OUTER_TAGS[a307_0x4f83e8(0x15b)]()][a307_0x4f83e8(0x156)]('|')+a307_0x4f83e8(0x127),'i');export function normalizeSqlForStaticAnalysis(_0x4f1a09){const _0x5e3d8f=a307_0x4f83e8,_0x3d595f=typeof _0x4f1a09===_0x5e3d8f(0x17b)?_0x4f1a09:'';if(detectSqlSourceMode(_0x3d595f)===_0x5e3d8f(0x153))return{'sql':_0x3d595f,'mode':_0x5e3d8f(0x153)};let _0x24f5b8=0x0,_0x1a3c84='',_0x4351b0,_0xba67b7=![],_0x495c89=![];const _0x36f619=[];while(_0x24f5b8<_0x3d595f[_0x5e3d8f(0x12b)]){if(_0x3d595f['startsWith'](_0x5e3d8f(0x16c),_0x24f5b8)){const _0x5aad0c=_0x3d595f['indexOf'](_0x5e3d8f(0x155),_0x24f5b8+0x4);if(_0x5aad0c<0x0)return invalidMybatisSource(_0x5e3d8f(0x152));_0x1a3c84+='\x20',_0x24f5b8=_0x5aad0c+0x3;continue;}if(_0x3d595f[_0x5e3d8f(0x16f)]('<,_0x24f5b8+0x9);if(_0x4ed8eb<0x0)return invalidMybatisSource(_0x5e3d8f(0x11a));_0x1a3c84+=_0x3d595f['slice'](_0x24f5b8+0x9,_0x4ed8eb),_0x24f5b8=_0x4ed8eb+0x3;continue;}if(_0x3d595f[_0x5e3d8f(0x16f)]('<?',_0x24f5b8)){if(_0xba67b7)return invalidMybatisSource(_0x5e3d8f(0x182));const _0x192912=_0x3d595f[_0x5e3d8f(0x12e)]('?>',_0x24f5b8+0x2);if(_0x192912<0x0)return invalidMybatisSource(_0x5e3d8f(0x135));_0x1a3c84+='\x20',_0x24f5b8=_0x192912+0x2;continue;}if(_0x3d595f[_0x24f5b8]!=='<'){const _0x35ce23=_0x3d595f[_0x5e3d8f(0x12e)]('<',_0x24f5b8),_0x349b0e=_0x35ce23<0x0?_0x3d595f[_0x5e3d8f(0x12b)]:_0x35ce23,_0x195f96=_0x3d595f['slice'](_0x24f5b8,_0x349b0e);if((!_0xba67b7||_0x495c89)&&_0x195f96[_0x5e3d8f(0x123)]())return invalidMybatisSource(_0x5e3d8f(0x11d));if(_0xba67b7&&!_0x495c89){const _0x1a1353=decodeXmlEntities(_0x195f96);if(_0x1a1353===null)return invalidMybatisSource(_0x5e3d8f(0x142));_0x1a3c84+=_0x1a1353;}else _0x1a3c84+='\x20';_0x24f5b8=_0x349b0e;continue;}const _0xc89fc0=findXmlTagEnd(_0x3d595f,_0x24f5b8);if(_0xc89fc0<0x0)return invalidMybatisSource(_0x5e3d8f(0x13e));const _0x4c83e3=_0x3d595f[_0x5e3d8f(0x118)](_0x24f5b8,_0xc89fc0+0x1),_0x4b1b6b=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x5e3d8f(0x141)](_0x4c83e3);if(!_0x4b1b6b)return invalidMybatisSource(_0x5e3d8f(0x17e));const _0x83ef66=_0x4b1b6b[0x1]==='/',_0x259fdb=_0x4b1b6b[0x2]??'',_0x133a8d=_0x259fdb['toLowerCase'](),_0x34c25d=_0x4b1b6b[0x3]??'',_0x29f5ff=_0x4b1b6b[0x4]==='/',_0x1004f2=MYBATIS_OUTER_TAGS[_0x5e3d8f(0x176)](_0x133a8d);if(!_0x1004f2&&!MYBATIS_DYNAMIC_TAGS[_0x5e3d8f(0x161)](_0x133a8d))return invalidMybatisSource(_0x5e3d8f(0x130)+_0x133a8d+'>.');if(!_0x1004f2&&_0x259fdb!==_0x133a8d)return invalidMybatisSource(_0x5e3d8f(0x148)+_0x259fdb+'>.');if(_0x83ef66){if(_0x34c25d[_0x5e3d8f(0x123)]()||_0x29f5ff)return invalidMybatisSource(_0x5e3d8f(0x15e)+_0x259fdb+'>.');const _0x2b2c98=_0x36f619['at'](-0x1);if(!_0x2b2c98||(_0x2b2c98[_0x5e3d8f(0x14f)]?_0x2b2c98[_0x5e3d8f(0x145)]!==_0x133a8d:_0x2b2c98['rawName']!==_0x259fdb))return invalidMybatisSource(_0x5e3d8f(0x143)+_0x259fdb+'>.');_0x36f619[_0x5e3d8f(0x128)]();if(_0x2b2c98['outer'])_0x495c89=!![];_0x1a3c84+=MYBATIS_BRANCH_TAGS[_0x5e3d8f(0x161)](_0x133a8d)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x34c25d))return invalidMybatisSource(_0x5e3d8f(0x11b)+_0x259fdb+'>.');if(_0x133a8d===_0x5e3d8f(0x173)&&(!_0x29f5ff||_0x36f619['at'](-0x1)?.['tagName']!==_0x5e3d8f(0x178)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x1004f2){if(_0xba67b7||_0x36f619[_0x5e3d8f(0x12b)]>0x0)return invalidMybatisSource(_0x5e3d8f(0x12f));_0xba67b7=!![],_0x495c89=_0x29f5ff,_0x4351b0=_0x1004f2;}else{if(!_0xba67b7||_0x495c89)return invalidMybatisSource(_0x5e3d8f(0x14e)+_0x259fdb+'>.');}_0x1a3c84+=_0x133a8d===_0x5e3d8f(0x16d)?_0x5e3d8f(0x15f):_0x133a8d==='set'?_0x5e3d8f(0x168):_0x133a8d===_0x5e3d8f(0x178)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x5e3d8f(0x161)](_0x133a8d)&&!_0x29f5ff?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x29f5ff&&_0x36f619[_0x5e3d8f(0x134)]({'rawName':_0x259fdb,'tagName':_0x133a8d,'outer':!!_0x1004f2});}_0x24f5b8=_0xc89fc0+0x1;}if(_0x36f619[_0x5e3d8f(0x12b)]>0x0)return invalidMybatisSource(_0x5e3d8f(0x126)+_0x36f619['at'](-0x1)?.[_0x5e3d8f(0x160)]+'>.');if(!_0xba67b7||!_0x495c89)return invalidMybatisSource(_0x5e3d8f(0x14b));return{'sql':_0x1a3c84[_0x5e3d8f(0x123)](),'mode':_0x5e3d8f(0x150),..._0x4351b0?{'statementType':_0x4351b0}:{}};}function hasWellFormedXmlAttributes(_0x6dc47){const _0x431f22=a307_0x4f83e8;let _0xa03aff=0x0;const _0x429658=new Set();while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]){while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/['test'](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;if(_0xa03aff>=_0x6dc47['length'])return!![];const _0x4b9f78=/^[A-Za-z_:][\w:.-]*/[_0x431f22(0x141)](_0x6dc47['slice'](_0xa03aff)),_0x192827=_0x4b9f78?.[0x0];if(!_0x192827||_0x429658[_0x431f22(0x161)](_0x192827))return![];_0x429658['add'](_0x192827),_0xa03aff+=_0x192827['length'];while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/[_0x431f22(0x13f)](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;if(_0x6dc47[_0xa03aff]!=='=')return![];_0xa03aff+=0x1;while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/[_0x431f22(0x13f)](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;const _0x2c4694=_0x6dc47[_0xa03aff];if(_0x2c4694!=='\x22'&&_0x2c4694!=='\x27')return![];_0xa03aff+=0x1;const _0x5ae348=_0x6dc47['indexOf'](_0x2c4694,_0xa03aff);if(_0x5ae348<0x0)return![];if(decodeXmlEntities(_0x6dc47[_0x431f22(0x118)](_0xa03aff,_0x5ae348))===null)return![];_0xa03aff=_0x5ae348+0x1;}return!![];}export function detectSqlSourceMode(_0x215a1f){const _0x1cee0a=a307_0x4f83e8;let _0xa33989=0x0;const _0x200bc4=()=>{const _0x58f037=a307_0xf0b1;while(_0xa33989<_0x215a1f[_0x58f037(0x12b)]&&/\s/[_0x58f037(0x13f)](_0x215a1f[_0xa33989]??''))_0xa33989+=0x1;};_0x200bc4();while(_0xa33989<_0x215a1f[_0x1cee0a(0x12b)]){if(_0x215a1f['startsWith'](_0x1cee0a(0x16c),_0xa33989)){const _0x5c0724=_0x215a1f[_0x1cee0a(0x12e)]('-->',_0xa33989+0x4);if(_0x5c0724<0x0)return'mybatisXml';_0xa33989=_0x5c0724+0x3,_0x200bc4();continue;}if(_0x215a1f[_0x1cee0a(0x16f)]('<?',_0xa33989)){const _0x10f0f2=_0x215a1f[_0x1cee0a(0x12e)]('?>',_0xa33989+0x2);if(_0x10f0f2<0x0)return _0x1cee0a(0x150);_0xa33989=_0x10f0f2+0x2,_0x200bc4();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x1cee0a(0x13f)](_0x215a1f[_0x1cee0a(0x118)](_0xa33989))?_0x1cee0a(0x150):_0x1cee0a(0x153);}function invalidMybatisSource(_0x6c014d){const _0x3806df=a307_0x4f83e8;return{'sql':'','mode':_0x3806df(0x150),'error':_0x6c014d};}function findXmlTagEnd(_0x44a5ec,_0x3bd373){const _0x38fdfe=a307_0x4f83e8;let _0xabf665;for(let _0x5981cc=_0x3bd373+0x1;_0x5981cc<_0x44a5ec[_0x38fdfe(0x12b)];_0x5981cc+=0x1){const _0x3cc82a=_0x44a5ec[_0x5981cc];if(_0xabf665){if(_0x3cc82a===_0xabf665)_0xabf665=undefined;continue;}if(_0x3cc82a==='\x22'||_0x3cc82a==='\x27'){_0xabf665=_0x3cc82a;continue;}if(_0x3cc82a==='>')return _0x5981cc;}return-0x1;}function decodeXmlEntities(_0x59e4bd){const _0x431c28=a307_0x4f83e8;let _0x8a022f=![];const _0x6ddef5=_0x59e4bd[_0x431c28(0x159)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x3d4a04=>{const _0x5541dd=_0x431c28;if(_0x3d4a04==='<')return'<';if(_0x3d4a04===_0x5541dd(0x163))return'>';if(_0x3d4a04===_0x5541dd(0x177))return'\x22';if(_0x3d4a04===_0x5541dd(0x165))return'\x27';if(_0x3d4a04===_0x5541dd(0x11e))return'&';const _0x6a9b06=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x3d4a04);if(_0x6a9b06){const _0x2f9b1=_0x6a9b06[0x1],_0x32e5cf=_0x6a9b06[0x2],_0x1f9943=Number[_0x5541dd(0x13a)](_0x2f9b1??_0x32e5cf??'',_0x2f9b1?0x10:0xa);if(isValidXmlCharacter(_0x1f9943))return String['fromCodePoint'](_0x1f9943);}return _0x8a022f=!![],'';});return _0x8a022f?null:_0x6ddef5;}function isValidXmlCharacter(_0x20d137){return _0x20d137===0x9||_0x20d137===0xa||_0x20d137===0xd||_0x20d137>=0x20&&_0x20d137<=0xd7ff||_0x20d137>=0xe000&&_0x20d137<=0xfffd||_0x20d137>=0x10000&&_0x20d137<=0x10ffff;}export function detectSqlType(_0x409296){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x409296));}function detectNormalizedSqlType(_0x3c93ab){const _0x180024=a307_0x4f83e8;if(_0x3c93ab[_0x180024(0x164)])return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x3c93ab[_0x180024(0x164)]};if(!_0x3c93ab[_0x180024(0x153)][_0x180024(0x123)]())return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x180024(0x185)};const _0x4a5a07=tokenizeSqlForTypeAnalysis(_0x3c93ab[_0x180024(0x153)]),_0x59cae3=_0x4a5a07[_0x180024(0x166)](_0x21efa2=>_0x21efa2!==MYBATIS_DYNAMIC_START_MARKER&&_0x21efa2!==MYBATIS_DYNAMIC_END_MARKER),_0x524072=findMainStatementIndex(_0x59cae3);if(_0x524072<0x0)return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x180024(0x15c)};const _0x224f25=_0x59cae3[_0x524072]??'',_0x483051=_0x3c93ab[_0x180024(0x162)]??_0x224f25,_0x5ab668=_0x4a5a07[_0x180024(0x140)](_0x4d97e3=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x180024(0x13f)](_0x4d97e3)),_0x1b357e=new Set();let _0x10d054=![];for(let _0x2f1315=0x0;_0x2f1315<_0x4a5a07[_0x180024(0x12b)];_0x2f1315+=0x1){const _0x350f00=_0x4a5a07[_0x2f1315];(_0x350f00===_0x180024(0x121)||_0x350f00===_0x180024(0x11c))&&isLockingClauseKeyword(_0x4a5a07,_0x2f1315)&&(_0x1b357e['add'](_0x2f1315),_0x10d054=!![]);if(_0x4a5a07['slice'](_0x2f1315,_0x2f1315+0x4)[_0x180024(0x156)]('\x20')==='LOCK\x20IN\x20SHARE\x20MODE')_0x10d054=!![];}if(_0x483051===_0x180024(0x17d)){const _0x2feb13=_0x4a5a07[_0x180024(0x140)]((_0x3bae8f,_0x521199)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x180024(0x13f)](_0x3bae8f)&&!_0x1b357e[_0x180024(0x161)](_0x521199));return{'type':'SELECT','isSelectOnly':!_0x2feb13&&!_0x10d054,'isLockingRead':_0x10d054,'isDangerous':_0x2feb13,'reason':_0x2feb13?_0x180024(0x149):undefined};}if(_0x483051==='INSERT')return{'type':_0x180024(0x129),'isSelectOnly':![],'isDangerous':_0x5ab668,'reason':_0x5ab668?_0x180024(0x184):undefined};if(_0x483051==='UPDATE')return{'type':_0x180024(0x121),'isSelectOnly':![],'isDangerous':_0x5ab668,'reason':_0x5ab668?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x483051===_0x180024(0x16a))return{'type':_0x180024(0x16a),'isSelectOnly':![],'isDangerous':!![],'reason':_0x180024(0x15a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x180024(0x13f)](_0x224f25))return{'type':_0x180024(0x154),'isSelectOnly':![],'isDangerous':!![],'reason':_0x180024(0x181)};return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x2f9c4c,_0x5666b3){const _0x210326=a307_0x4f83e8,_0xcba2d5=_0x2f9c4c[_0x5666b3]==='UPDATE'?[[_0x210326(0x13c)],[_0x210326(0x13c),'NO',_0x210326(0x16b)]]:[['FOR'],[_0x210326(0x13c),_0x210326(0x16b)]],_0x4e2039=_0xcba2d5[_0x210326(0x140)](_0x5b4f69=>{const _0x1473e1=_0x210326,_0x24ca8f=_0x5666b3-_0x5b4f69[_0x1473e1(0x12b)];return _0x24ca8f>=0x0&&_0x2f9c4c['slice'](_0x24ca8f,_0x5666b3)[_0x1473e1(0x156)]('\x20')===_0x5b4f69[_0x1473e1(0x156)]('\x20');});if(!_0x4e2039)return![];return!_0x2f9c4c[_0x210326(0x118)](_0x5666b3+0x1,_0x5666b3+0x5)[_0x210326(0x12c)](_0x210326(0x147));}function findMainStatementIndex(_0x4ad624){const _0x6573a2=a307_0x4f83e8;if(_0x4ad624[0x0]!=='WITH')return 0x0;let _0x3171a1=_0x4ad624[0x1]===_0x6573a2(0x122)?0x2:0x1;while(_0x3171a1<_0x4ad624['length']){const _0x225a9a=_0x4ad624[_0x3171a1];if(!_0x225a9a||!(/^[A-Z_][\w$]*$/[_0x6573a2(0x13f)](_0x225a9a)||/^[`"]/['test'](_0x225a9a)))return-0x1;_0x3171a1+=0x1;if(_0x4ad624[_0x3171a1]==='('){_0x3171a1=skipSqlParentheses(_0x4ad624,_0x3171a1);if(_0x3171a1<0x0)return-0x1;}if(_0x4ad624[_0x3171a1]!=='AS')return-0x1;_0x3171a1+=0x1;if(_0x4ad624[_0x3171a1]===_0x6573a2(0x17c)&&_0x4ad624[_0x3171a1+0x1]===_0x6573a2(0x120))_0x3171a1+=0x2;else{if(_0x4ad624[_0x3171a1]===_0x6573a2(0x120))_0x3171a1+=0x1;}_0x3171a1=skipSqlParentheses(_0x4ad624,_0x3171a1);if(_0x3171a1<0x0)return-0x1;if(_0x4ad624[_0x3171a1]!==','){const _0x506992=_0x4ad624[_0x3171a1]==='('?_0x3171a1+0x1:_0x3171a1;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x6573a2(0x13f)](_0x4ad624[_0x506992]??'')?_0x506992:-0x1;}_0x3171a1+=0x1;}return-0x1;}function a307_0x1945(){const _0x11325c=['replace','DELETE\x20statements\x20require\x20explicit\x20review','keys','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','Unable\x20to\x20detect\x20SQL\x20type.\x20','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','\x20WHERE\x20','rawName','has','statementType','>','error',''','filter','672642XVzLYm','\x20SET\x20','__RABETBASE_MYBATIS_DYNAMIC_START__','DELETE','KEY','<!--','where','2105555STdOXF','startsWith','UNKNOWN','\x20query\x20targeting\x20','from','property','type','^<\x5cs*(?:','get','"','include','5683944JNwpln','87MbXkhG','string','NOT','SELECT','Invalid\x20MyBatis\x20XML\x20tag.','match','reason','DDL\x20statements\x20require\x20explicit\x20review','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','SQL\x20content\x20is\x20empty','27998bQoWGZ','slice','set','Unterminated\x20CDATA\x20section.','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','SHARE','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','&','delete','MATERIALIZED','UPDATE','RECURSIVE','trim','otherwise','isDangerous','Unclosed\x20MyBatis\x20XML\x20tag:\x20<',')\x5cb','pop','INSERT',']]>','length','includes','add','indexOf','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','when','replaceAll','foreach','push','Unterminated\x20XML\x20declaration.','choose','\x20with\x20parameters:\x20','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','select','parseInt','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','FOR','256keEEOF','Unterminated\x20MyBatis\x20XML\x20tag.','test','some','exec','Invalid\x20XML\x20entity\x20reference.','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','unknown\x20table(s)','tagName','4424436Tpoxik','SET','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','200cnsjJI','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','1745390nCtpvt','matchAll','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','outer','mybatisXml','54786ClBRqG','Unterminated\x20XML\x20comment.','sql','DDL','-->','join','insert','update'];a307_0x1945=function(){return _0x11325c;};return a307_0x1945();}function skipSqlParentheses(_0x152c07,_0x21047a){const _0x2ba0a5=a307_0x4f83e8;if(_0x152c07[_0x21047a]!=='(')return-0x1;let _0x721b38=0x0;for(let _0x8e3164=_0x21047a;_0x8e3164<_0x152c07[_0x2ba0a5(0x12b)];_0x8e3164+=0x1){const _0x2a107e=_0x152c07[_0x8e3164];if(_0x2a107e===';')return-0x1;if(_0x2a107e==='(')_0x721b38+=0x1;if(_0x2a107e===')'&&--_0x721b38===0x0)return _0x8e3164+0x1;}return-0x1;}function a307_0xf0b1(_0x455dec,_0x8979a7){_0x455dec=_0x455dec-0x118;const _0x194566=a307_0x1945();let _0xf0b13c=_0x194566[_0x455dec];return _0xf0b13c;}function stripStaticAnalysisMarkers(_0x54f2ae){const _0x1d8248=a307_0x4f83e8;return _0x54f2ae[_0x1d8248(0x132)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1d8248(0x132)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x1d8248(0x132)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x295e9b){const _0x2396a4=a307_0x4f83e8,_0x21d8bf=[],_0x5349b5=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x2c833b of _0x295e9b[_0x2396a4(0x14d)](_0x5349b5)){const _0x5b721a=_0x2c833b[0x0];if(_0x5b721a[_0x2396a4(0x16f)]('/*')||_0x5b721a['startsWith']('--')||_0x5b721a[_0x2396a4(0x16f)]('#')&&!_0x5b721a[_0x2396a4(0x16f)]('#{'))continue;_0x21d8bf[_0x2396a4(0x134)](/^["`]/[_0x2396a4(0x13f)](_0x5b721a)?_0x5b721a:/^[\x27@#$]/[_0x2396a4(0x13f)](_0x5b721a)?'?':_0x5b721a['toUpperCase']());}return _0x21d8bf;}function extractTables(_0x2b2eb9,_0x1e7e9e){const _0x29d4d1=a307_0x4f83e8,_0x295ae0=_0x2b2eb9[_0x29d4d1(0x159)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x29d4d1(0x159)](/'[^']*'/g,'\x27\x27')[_0x29d4d1(0x159)](/--.*$/gm,'')[_0x29d4d1(0x159)](/\/\*[\s\S]*?\*\//g,''),_0x32d109=[],_0x2cf4b4=_0x295ae0[_0x29d4d1(0x17f)](/FROM\s+([^\s,)(]+)/i);addTable(_0x32d109,_0x2cf4b4?.[0x1]);for(const _0xeea78d of _0x295ae0[_0x29d4d1(0x14d)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x32d109,_0xeea78d[0x1]);}const _0x73ca0b=_0x295ae0['match'](/INTO\s+([^\s(]+)/i);addTable(_0x32d109,_0x73ca0b?.[0x1]);if(_0x1e7e9e===_0x29d4d1(0x121)){const _0x263576=_0x295ae0['match'](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x32d109,_0x263576?.[0x1]);}return _0x32d109;}function addTable(_0x49e59d,_0x52665d){const _0x3a17e2=a307_0x4f83e8,_0x48f659=_0x52665d?.[_0x3a17e2(0x159)](/[`"]/g,'');_0x48f659&&_0x48f659!==UNRESOLVED_SQL_FRAGMENT&&!_0x49e59d[_0x3a17e2(0x12c)](_0x48f659)&&_0x49e59d[_0x3a17e2(0x134)](_0x48f659);}function extractParameters(_0x361c76){const _0x45dc63=a307_0x4f83e8,_0x5392a7=new Set();for(const _0x493a97 of _0x361c76['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x493a97[0x1])_0x5392a7[_0x45dc63(0x12d)](_0x493a97[0x1]);}return Array[_0x45dc63(0x172)](_0x5392a7);}export function validateSql(_0x121676){const _0x14f64a=a307_0x4f83e8,_0x49c01b=normalizeSqlForStaticAnalysis(_0x121676),_0x4b8117=detectNormalizedSqlType(_0x49c01b),_0x3036d7=stripStaticAnalysisMarkers(_0x49c01b[_0x14f64a(0x153)]),_0x4b807b=_0x49c01b[_0x14f64a(0x164)]?[]:extractTables(_0x3036d7,_0x4b8117[_0x14f64a(0x174)]),_0x3b3e5f=_0x49c01b['error']?[]:extractParameters(_0x3036d7);if(_0x4b8117[_0x14f64a(0x125)])return{'valid':![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x4b8117['reason']||_0x4b8117[_0x14f64a(0x174)]+_0x14f64a(0x13b)};if(_0x4b8117[_0x14f64a(0x174)]===_0x14f64a(0x170))return{'valid':![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x49c01b[_0x14f64a(0x164)]?_0x14f64a(0x15d)+_0x49c01b['error']:_0x4b8117[_0x14f64a(0x180)]?_0x14f64a(0x15d)+_0x4b8117[_0x14f64a(0x180)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x4b8117[_0x14f64a(0x174)]+_0x14f64a(0x171)+(_0x4b807b[_0x14f64a(0x12b)]?_0x4b807b['join'](',\x20'):_0x14f64a(0x144))+(_0x3b3e5f[_0x14f64a(0x12b)]?_0x14f64a(0x137)+_0x3b3e5f[_0x14f64a(0x156)](',\x20'):'')};}
|
|
1
|
+
const a314_0x5407a0=a314_0x5d9e;(function(_0x13fbb6,_0x813039){const _0x2cef4c=a314_0x5d9e,_0x5c508f=_0x13fbb6();while(!![]){try{const _0xb53bc3=-parseInt(_0x2cef4c(0xc7))/0x1*(parseInt(_0x2cef4c(0xe4))/0x2)+parseInt(_0x2cef4c(0xa7))/0x3+-parseInt(_0x2cef4c(0xc2))/0x4+parseInt(_0x2cef4c(0xd6))/0x5+parseInt(_0x2cef4c(0xed))/0x6+-parseInt(_0x2cef4c(0xd5))/0x7+-parseInt(_0x2cef4c(0xc6))/0x8*(-parseInt(_0x2cef4c(0xee))/0x9);if(_0xb53bc3===_0x813039)break;else _0x5c508f['push'](_0x5c508f['shift']());}catch(_0x208e99){_0x5c508f['push'](_0x5c508f['shift']());}}}(a314_0x145b,0xee1e6));const MYBATIS_OUTER_TAGS=new Map([[a314_0x5407a0(0xf8),a314_0x5407a0(0xbb)],[a314_0x5407a0(0xb8),a314_0x5407a0(0x9a)],['update',a314_0x5407a0(0xf4)],[a314_0x5407a0(0xac),'DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a314_0x5407a0(0xdd),'foreach',a314_0x5407a0(0xce),'when',a314_0x5407a0(0xb2),'trim','set','bind',a314_0x5407a0(0xe5),a314_0x5407a0(0xe9)]),MYBATIS_BRANCH_TAGS=new Set(['if',a314_0x5407a0(0xe2),a314_0x5407a0(0xce),'when',a314_0x5407a0(0xb2)]);function a314_0x5d9e(_0x42e372,_0x1f4159){_0x42e372=_0x42e372-0x9a;const _0x145bb1=a314_0x145b();let _0x5d9eed=_0x145bb1[_0x42e372];return _0x5d9eed;}export const MYBATIS_DYNAMIC_START_MARKER='__RABETBASE_MYBATIS_DYNAMIC_START__';export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';export const MYBATIS_INCLUDE_MARKER=a314_0x5407a0(0xf1);const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS['keys']()][a314_0x5407a0(0x9b)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x34336d){const _0x390f62=a314_0x5407a0,_0x1a90a8=typeof _0x34336d===_0x390f62(0xc3)?_0x34336d:'';if(detectSqlSourceMode(_0x1a90a8)==='sql')return{'sql':_0x1a90a8,'mode':_0x390f62(0xb0)};let _0x24357f=0x0,_0x586145='',_0x54f58d,_0x7fb910=![],_0x2e1cfa=![];const _0x340cdf=[];while(_0x24357f<_0x1a90a8[_0x390f62(0xe3)]){if(_0x1a90a8[_0x390f62(0x9c)]('<!--',_0x24357f)){const _0x1dc8ae=_0x1a90a8[_0x390f62(0xd1)]('-->',_0x24357f+0x4);if(_0x1dc8ae<0x0)return invalidMybatisSource(_0x390f62(0xb4));_0x586145+='\x20',_0x24357f=_0x1dc8ae+0x3;continue;}if(_0x1a90a8['startsWith']('<,_0x24357f+0x9);if(_0x147216<0x0)return invalidMybatisSource(_0x390f62(0xbd));_0x586145+=_0x1a90a8[_0x390f62(0xc4)](_0x24357f+0x9,_0x147216),_0x24357f=_0x147216+0x3;continue;}if(_0x1a90a8[_0x390f62(0x9c)]('<?',_0x24357f)){if(_0x7fb910)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x1ee7f4=_0x1a90a8[_0x390f62(0xd1)]('?>',_0x24357f+0x2);if(_0x1ee7f4<0x0)return invalidMybatisSource(_0x390f62(0xa4));_0x586145+='\x20',_0x24357f=_0x1ee7f4+0x2;continue;}if(_0x1a90a8[_0x24357f]!=='<'){const _0x13d1a2=_0x1a90a8[_0x390f62(0xd1)]('<',_0x24357f),_0x5c0fe3=_0x13d1a2<0x0?_0x1a90a8[_0x390f62(0xe3)]:_0x13d1a2,_0x1f75be=_0x1a90a8[_0x390f62(0xc4)](_0x24357f,_0x5c0fe3);if((!_0x7fb910||_0x2e1cfa)&&_0x1f75be[_0x390f62(0xaf)]())return invalidMybatisSource(_0x390f62(0xab));if(_0x7fb910&&!_0x2e1cfa){const _0x48242d=decodeXmlEntities(_0x1f75be);if(_0x48242d===null)return invalidMybatisSource(_0x390f62(0xae));_0x586145+=_0x48242d;}else _0x586145+='\x20';_0x24357f=_0x5c0fe3;continue;}const _0x5c0c79=findXmlTagEnd(_0x1a90a8,_0x24357f);if(_0x5c0c79<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x4caa42=_0x1a90a8['slice'](_0x24357f,_0x5c0c79+0x1),_0x46c34a=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x390f62(0xea)](_0x4caa42);if(!_0x46c34a)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x34f022=_0x46c34a[0x1]==='/',_0xba445b=_0x46c34a[0x2]??'',_0x15fd38=_0xba445b[_0x390f62(0xad)](),_0x8e5672=_0x46c34a[0x3]??'',_0x3b7649=_0x46c34a[0x4]==='/',_0x22ef2f=MYBATIS_OUTER_TAGS[_0x390f62(0xd4)](_0x15fd38);if(!_0x22ef2f&&!MYBATIS_DYNAMIC_TAGS[_0x390f62(0xf6)](_0x15fd38))return invalidMybatisSource('Unsupported\x20MyBatis\x20XML\x20tag:\x20<'+_0x15fd38+'>.');if(!_0x22ef2f&&_0xba445b!==_0x15fd38)return invalidMybatisSource(_0x390f62(0xf5)+_0xba445b+'>.');if(_0x34f022){if(_0x8e5672['trim']()||_0x3b7649)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0xba445b+'>.');const _0x121499=_0x340cdf['at'](-0x1);if(!_0x121499||(_0x121499[_0x390f62(0xef)]?_0x121499['tagName']!==_0x15fd38:_0x121499[_0x390f62(0xa8)]!==_0xba445b))return invalidMybatisSource(_0x390f62(0xde)+_0xba445b+'>.');_0x340cdf[_0x390f62(0xb5)]();if(_0x121499[_0x390f62(0xef)])_0x2e1cfa=!![];_0x586145+=MYBATIS_BRANCH_TAGS[_0x390f62(0xf6)](_0x15fd38)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x8e5672))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0xba445b+'>.');if(_0x15fd38===_0x390f62(0xe9)&&(!_0x3b7649||_0x340cdf['at'](-0x1)?.[_0x390f62(0xa0)]!==_0x390f62(0xe5)))return invalidMybatisSource(_0x390f62(0xf2));if(_0x22ef2f){if(_0x7fb910||_0x340cdf[_0x390f62(0xe3)]>0x0)return invalidMybatisSource(_0x390f62(0xdf));_0x7fb910=!![],_0x2e1cfa=_0x3b7649,_0x54f58d=_0x22ef2f;}else{if(!_0x7fb910||_0x2e1cfa)return invalidMybatisSource(_0x390f62(0x9d)+_0xba445b+'>.');}_0x586145+=_0x15fd38==='where'?_0x390f62(0xd9):_0x15fd38===_0x390f62(0xcd)?_0x390f62(0xcc):_0x15fd38===_0x390f62(0xe5)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x390f62(0xf6)](_0x15fd38)&&!_0x3b7649?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x3b7649&&_0x340cdf['push']({'rawName':_0xba445b,'tagName':_0x15fd38,'outer':!!_0x22ef2f});}_0x24357f=_0x5c0c79+0x1;}if(_0x340cdf[_0x390f62(0xe3)]>0x0)return invalidMybatisSource(_0x390f62(0xe8)+_0x340cdf['at'](-0x1)?.[_0x390f62(0xa8)]+'>.');if(!_0x7fb910||!_0x2e1cfa)return invalidMybatisSource(_0x390f62(0xb7));return{'sql':_0x586145[_0x390f62(0xaf)](),'mode':_0x390f62(0xc5),..._0x54f58d?{'statementType':_0x54f58d}:{}};}function hasWellFormedXmlAttributes(_0x3f612d){const _0x465852=a314_0x5407a0;let _0x119e3a=0x0;const _0xd9cf5c=new Set();while(_0x119e3a<_0x3f612d[_0x465852(0xe3)]){while(_0x119e3a<_0x3f612d[_0x465852(0xe3)]&&/\s/[_0x465852(0xbc)](_0x3f612d[_0x119e3a]??''))_0x119e3a+=0x1;if(_0x119e3a>=_0x3f612d[_0x465852(0xe3)])return!![];const _0x337574=/^[A-Za-z_:][\w:.-]*/[_0x465852(0xea)](_0x3f612d[_0x465852(0xc4)](_0x119e3a)),_0x1e47ec=_0x337574?.[0x0];if(!_0x1e47ec||_0xd9cf5c[_0x465852(0xf6)](_0x1e47ec))return![];_0xd9cf5c[_0x465852(0xa2)](_0x1e47ec),_0x119e3a+=_0x1e47ec['length'];while(_0x119e3a<_0x3f612d[_0x465852(0xe3)]&&/\s/[_0x465852(0xbc)](_0x3f612d[_0x119e3a]??''))_0x119e3a+=0x1;if(_0x3f612d[_0x119e3a]!=='=')return![];_0x119e3a+=0x1;while(_0x119e3a<_0x3f612d[_0x465852(0xe3)]&&/\s/[_0x465852(0xbc)](_0x3f612d[_0x119e3a]??''))_0x119e3a+=0x1;const _0xb5a75c=_0x3f612d[_0x119e3a];if(_0xb5a75c!=='\x22'&&_0xb5a75c!=='\x27')return![];_0x119e3a+=0x1;const _0xb81038=_0x3f612d[_0x465852(0xd1)](_0xb5a75c,_0x119e3a);if(_0xb81038<0x0)return![];if(decodeXmlEntities(_0x3f612d[_0x465852(0xc4)](_0x119e3a,_0xb81038))===null)return![];_0x119e3a=_0xb81038+0x1;}return!![];}export function detectSqlSourceMode(_0x4878c6){const _0x53e8ee=a314_0x5407a0;let _0x2d7e44=0x0;const _0x1c89b5=()=>{const _0x5bfa44=a314_0x5d9e;while(_0x2d7e44<_0x4878c6[_0x5bfa44(0xe3)]&&/\s/['test'](_0x4878c6[_0x2d7e44]??''))_0x2d7e44+=0x1;};_0x1c89b5();while(_0x2d7e44<_0x4878c6[_0x53e8ee(0xe3)]){if(_0x4878c6['startsWith'](_0x53e8ee(0xe0),_0x2d7e44)){const _0x508efb=_0x4878c6[_0x53e8ee(0xd1)](_0x53e8ee(0xd7),_0x2d7e44+0x4);if(_0x508efb<0x0)return _0x53e8ee(0xc5);_0x2d7e44=_0x508efb+0x3,_0x1c89b5();continue;}if(_0x4878c6[_0x53e8ee(0x9c)]('<?',_0x2d7e44)){const _0x119317=_0x4878c6[_0x53e8ee(0xd1)]('?>',_0x2d7e44+0x2);if(_0x119317<0x0)return _0x53e8ee(0xc5);_0x2d7e44=_0x119317+0x2,_0x1c89b5();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x53e8ee(0xbc)](_0x4878c6[_0x53e8ee(0xc4)](_0x2d7e44))?_0x53e8ee(0xc5):_0x53e8ee(0xb0);}function invalidMybatisSource(_0x44bf36){const _0x478e05=a314_0x5407a0;return{'sql':'','mode':_0x478e05(0xc5),'error':_0x44bf36};}function findXmlTagEnd(_0x10b9c3,_0x2b3315){let _0x3a7aa6;for(let _0x525f79=_0x2b3315+0x1;_0x525f79<_0x10b9c3['length'];_0x525f79+=0x1){const _0x191819=_0x10b9c3[_0x525f79];if(_0x3a7aa6){if(_0x191819===_0x3a7aa6)_0x3a7aa6=undefined;continue;}if(_0x191819==='\x22'||_0x191819==='\x27'){_0x3a7aa6=_0x191819;continue;}if(_0x191819==='>')return _0x525f79;}return-0x1;}function decodeXmlEntities(_0x52e523){let _0x237bc2=![];const _0x5d97a9=_0x52e523['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x2c1110=>{const _0x5da73d=a314_0x5d9e;if(_0x2c1110===_0x5da73d(0xa6))return'<';if(_0x2c1110===_0x5da73d(0xbf))return'>';if(_0x2c1110===_0x5da73d(0xec))return'\x22';if(_0x2c1110===''')return'\x27';if(_0x2c1110==='&')return'&';const _0x1a186a=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x5da73d(0xea)](_0x2c1110);if(_0x1a186a){const _0x3f91e2=_0x1a186a[0x1],_0x494307=_0x1a186a[0x2],_0x47a6b9=Number[_0x5da73d(0xa9)](_0x3f91e2??_0x494307??'',_0x3f91e2?0x10:0xa);if(isValidXmlCharacter(_0x47a6b9))return String[_0x5da73d(0xb1)](_0x47a6b9);}return _0x237bc2=!![],'';});return _0x237bc2?null:_0x5d97a9;}function isValidXmlCharacter(_0x26941e){return _0x26941e===0x9||_0x26941e===0xa||_0x26941e===0xd||_0x26941e>=0x20&&_0x26941e<=0xd7ff||_0x26941e>=0xe000&&_0x26941e<=0xfffd||_0x26941e>=0x10000&&_0x26941e<=0x10ffff;}export function detectSqlType(_0x23f96b){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x23f96b));}function detectNormalizedSqlType(_0x27e266){const _0x19fa02=a314_0x5407a0;if(_0x27e266[_0x19fa02(0xeb)])return{'type':_0x19fa02(0xc9),'isSelectOnly':![],'isDangerous':![],'reason':_0x27e266['error']};if(!_0x27e266['sql'][_0x19fa02(0xaf)]())return{'type':_0x19fa02(0xc9),'isSelectOnly':![],'isDangerous':![],'reason':_0x19fa02(0xd2)};const _0x1cdf6a=tokenizeSqlForTypeAnalysis(_0x27e266['sql']),_0xcb5097=_0x1cdf6a['filter'](_0x451598=>_0x451598!==MYBATIS_DYNAMIC_START_MARKER&&_0x451598!==MYBATIS_DYNAMIC_END_MARKER),_0x4354e0=findMainStatementIndex(_0xcb5097);if(_0x4354e0<0x0)return{'type':_0x19fa02(0xc9),'isSelectOnly':![],'isDangerous':![],'reason':'Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.'};const _0x3b6676=_0xcb5097[_0x4354e0]??'',_0x4553e4=_0x27e266[_0x19fa02(0xba)]??_0x3b6676,_0x1958be=_0x1cdf6a['some'](_0x1eea60=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x19fa02(0xbc)](_0x1eea60)),_0x2e8a85=new Set();let _0x4edd9d=![];for(let _0x5afd01=0x0;_0x5afd01<_0x1cdf6a['length'];_0x5afd01+=0x1){const _0x309289=_0x1cdf6a[_0x5afd01];(_0x309289===_0x19fa02(0xf4)||_0x309289===_0x19fa02(0xd3))&&isLockingClauseKeyword(_0x1cdf6a,_0x5afd01)&&(_0x2e8a85['add'](_0x5afd01),_0x4edd9d=!![]);if(_0x1cdf6a['slice'](_0x5afd01,_0x5afd01+0x4)[_0x19fa02(0x9b)]('\x20')==='LOCK\x20IN\x20SHARE\x20MODE')_0x4edd9d=!![];}if(_0x4553e4==='SELECT'){const _0x3816dd=_0x1cdf6a[_0x19fa02(0xb6)]((_0x1ed2fb,_0x100e24)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x19fa02(0xbc)](_0x1ed2fb)&&!_0x2e8a85[_0x19fa02(0xf6)](_0x100e24));return{'type':_0x19fa02(0xbb),'isSelectOnly':!_0x3816dd&&!_0x4edd9d,'isLockingRead':_0x4edd9d,'isDangerous':_0x3816dd,'reason':_0x3816dd?_0x19fa02(0xda):undefined};}if(_0x4553e4===_0x19fa02(0x9a))return{'type':_0x19fa02(0x9a),'isSelectOnly':![],'isDangerous':_0x1958be,'reason':_0x1958be?_0x19fa02(0x9f):undefined};if(_0x4553e4===_0x19fa02(0xf4))return{'type':_0x19fa02(0xf4),'isSelectOnly':![],'isDangerous':_0x1958be,'reason':_0x1958be?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x4553e4===_0x19fa02(0xe6))return{'type':_0x19fa02(0xe6),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20require\x20explicit\x20review'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x19fa02(0xbc)](_0x3b6676))return{'type':_0x19fa02(0xd0),'isSelectOnly':![],'isDangerous':!![],'reason':_0x19fa02(0xcb)};return{'type':_0x19fa02(0xc9),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x24fe3f,_0x14f047){const _0x5be703=a314_0x5407a0,_0x3bec9f=_0x24fe3f[_0x14f047]===_0x5be703(0xf4)?[[_0x5be703(0xa5)],[_0x5be703(0xa5),'NO',_0x5be703(0xb9)]]:[[_0x5be703(0xa5)],['FOR',_0x5be703(0xb9)]],_0x357171=_0x3bec9f[_0x5be703(0xb6)](_0x11a178=>{const _0x237c42=_0x5be703,_0x3d637a=_0x14f047-_0x11a178[_0x237c42(0xe3)];return _0x3d637a>=0x0&&_0x24fe3f['slice'](_0x3d637a,_0x14f047)[_0x237c42(0x9b)]('\x20')===_0x11a178['join']('\x20');});if(!_0x357171)return![];return!_0x24fe3f[_0x5be703(0xc4)](_0x14f047+0x1,_0x14f047+0x5)[_0x5be703(0xc8)]('SET');}function findMainStatementIndex(_0x251b6){const _0xa879f3=a314_0x5407a0;if(_0x251b6[0x0]!==_0xa879f3(0xca))return 0x0;let _0x2f99b9=_0x251b6[0x1]===_0xa879f3(0xbe)?0x2:0x1;while(_0x2f99b9<_0x251b6[_0xa879f3(0xe3)]){const _0x5f04b0=_0x251b6[_0x2f99b9];if(!_0x5f04b0||!(/^[A-Z_][\w$]*$/[_0xa879f3(0xbc)](_0x5f04b0)||/^[`"]/[_0xa879f3(0xbc)](_0x5f04b0)))return-0x1;_0x2f99b9+=0x1;if(_0x251b6[_0x2f99b9]==='('){_0x2f99b9=skipSqlParentheses(_0x251b6,_0x2f99b9);if(_0x2f99b9<0x0)return-0x1;}if(_0x251b6[_0x2f99b9]!=='AS')return-0x1;_0x2f99b9+=0x1;if(_0x251b6[_0x2f99b9]===_0xa879f3(0xc1)&&_0x251b6[_0x2f99b9+0x1]===_0xa879f3(0xa1))_0x2f99b9+=0x2;else{if(_0x251b6[_0x2f99b9]===_0xa879f3(0xa1))_0x2f99b9+=0x1;}_0x2f99b9=skipSqlParentheses(_0x251b6,_0x2f99b9);if(_0x2f99b9<0x0)return-0x1;if(_0x251b6[_0x2f99b9]!==','){const _0x5634a1=_0x251b6[_0x2f99b9]==='('?_0x2f99b9+0x1:_0x2f99b9;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0xa879f3(0xbc)](_0x251b6[_0x5634a1]??'')?_0x5634a1:-0x1;}_0x2f99b9+=0x1;}return-0x1;}function skipSqlParentheses(_0x462eaa,_0x18125b){const _0x16cec2=a314_0x5407a0;if(_0x462eaa[_0x18125b]!=='(')return-0x1;let _0x5c5ef8=0x0;for(let _0x36b537=_0x18125b;_0x36b537<_0x462eaa[_0x16cec2(0xe3)];_0x36b537+=0x1){const _0x5af134=_0x462eaa[_0x36b537];if(_0x5af134===';')return-0x1;if(_0x5af134==='(')_0x5c5ef8+=0x1;if(_0x5af134===')'&&--_0x5c5ef8===0x0)return _0x36b537+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x25ee10){const _0x5dcec5=a314_0x5407a0;return _0x25ee10[_0x5dcec5(0x9e)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x5dcec5(0x9e)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x377e02){const _0x2e36a8=a314_0x5407a0,_0x3f3411=[],_0x49510e=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x3f01f9 of _0x377e02['matchAll'](_0x49510e)){const _0x380e3c=_0x3f01f9[0x0];if(_0x380e3c[_0x2e36a8(0x9c)]('/*')||_0x380e3c[_0x2e36a8(0x9c)]('--')||_0x380e3c['startsWith']('#')&&!_0x380e3c[_0x2e36a8(0x9c)]('#{'))continue;_0x3f3411[_0x2e36a8(0xd8)](/^["`]/[_0x2e36a8(0xbc)](_0x380e3c)?_0x380e3c:/^[\x27@#$]/[_0x2e36a8(0xbc)](_0x380e3c)?'?':_0x380e3c['toUpperCase']());}return _0x3f3411;}function extractTables(_0x54a860,_0x3ac334){const _0xfbbf80=a314_0x5407a0,_0x598d86=_0x54a860[_0xfbbf80(0xf3)](/#\{[^}]*\}/g,'?')[_0xfbbf80(0xf3)](/\$\{[^}]*\}/g,'?')[_0xfbbf80(0xf3)](/'[^']*'/g,'\x27\x27')[_0xfbbf80(0xf3)](/--.*$/gm,'')[_0xfbbf80(0xf3)](/\/\*[\s\S]*?\*\//g,''),_0x47a7d5=[],_0x40abeb=_0x598d86[_0xfbbf80(0xf0)](/FROM\s+([^\s,)(]+)/i);addTable(_0x47a7d5,_0x40abeb?.[0x1]);for(const _0x2b7953 of _0x598d86[_0xfbbf80(0xfa)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x47a7d5,_0x2b7953[0x1]);}const _0x349a9e=_0x598d86[_0xfbbf80(0xf0)](/INTO\s+([^\s(]+)/i);addTable(_0x47a7d5,_0x349a9e?.[0x1]);if(_0x3ac334===_0xfbbf80(0xf4)){const _0x399cdb=_0x598d86[_0xfbbf80(0xf0)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x47a7d5,_0x399cdb?.[0x1]);}return _0x47a7d5;}function addTable(_0x4423c1,_0x9f5c58){const _0x377d2c=a314_0x5407a0,_0x5208a1=_0x9f5c58?.['replace'](/[`"]/g,'');_0x5208a1&&_0x5208a1!==UNRESOLVED_SQL_FRAGMENT&&!_0x4423c1[_0x377d2c(0xc8)](_0x5208a1)&&_0x4423c1[_0x377d2c(0xd8)](_0x5208a1);}function extractParameters(_0x1849d6){const _0x127e4c=a314_0x5407a0,_0x15c279=new Set();for(const _0xc4d010 of _0x1849d6[_0x127e4c(0xfa)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0xc4d010[0x1])_0x15c279[_0x127e4c(0xa2)](_0xc4d010[0x1]);}return Array['from'](_0x15c279);}export function validateSql(_0x469dba){const _0x42a5b5=a314_0x5407a0,_0x16433c=normalizeSqlForStaticAnalysis(_0x469dba),_0x1c37fa=detectNormalizedSqlType(_0x16433c),_0x3ab607=stripStaticAnalysisMarkers(_0x16433c[_0x42a5b5(0xb0)]),_0x930964=_0x16433c[_0x42a5b5(0xeb)]?[]:extractTables(_0x3ab607,_0x1c37fa[_0x42a5b5(0xc0)]),_0x28dbdc=_0x16433c[_0x42a5b5(0xeb)]?[]:extractParameters(_0x3ab607);if(_0x1c37fa[_0x42a5b5(0xdc)])return{'valid':![],'sqlType':_0x1c37fa,'tables':_0x930964,'parameters':_0x28dbdc,'message':_0x1c37fa[_0x42a5b5(0xb3)]||_0x1c37fa[_0x42a5b5(0xc0)]+_0x42a5b5(0xe7)};if(_0x1c37fa['type']===_0x42a5b5(0xc9))return{'valid':![],'sqlType':_0x1c37fa,'tables':_0x930964,'parameters':_0x28dbdc,'message':_0x16433c[_0x42a5b5(0xeb)]?_0x42a5b5(0xf7)+_0x16433c[_0x42a5b5(0xeb)]:_0x1c37fa[_0x42a5b5(0xb3)]?_0x42a5b5(0xf7)+_0x1c37fa[_0x42a5b5(0xb3)]:_0x42a5b5(0xcf)};return{'valid':!![],'sqlType':_0x1c37fa,'tables':_0x930964,'parameters':_0x28dbdc,'message':_0x1c37fa['type']+_0x42a5b5(0xe1)+(_0x930964[_0x42a5b5(0xe3)]?_0x930964['join'](',\x20'):_0x42a5b5(0xdb))+(_0x28dbdc['length']?_0x42a5b5(0xaa)+_0x28dbdc['join'](',\x20'):'')};}function a314_0x145b(){const _0x2fb275=['Unterminated\x20XML\x20declaration.','FOR','<','1921512FWSzIv','rawName','parseInt','\x20with\x20parameters:\x20','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','delete','toLowerCase','Invalid\x20XML\x20entity\x20reference.','trim','sql','fromCodePoint','otherwise','reason','Unterminated\x20XML\x20comment.','pop','some','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','insert','KEY','statementType','SELECT','test','Unterminated\x20CDATA\x20section.','RECURSIVE','>','type','NOT','4588840kvaxsa','string','slice','mybatisXml','6586984vOSeFs','1MnOnXn','includes','UNKNOWN','WITH','DDL\x20statements\x20require\x20explicit\x20review','\x20SET\x20','set','choose','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','DDL','indexOf','SQL\x20content\x20is\x20empty','SHARE','get','2179569wjiVli','8142425GAdWwU','-->','push','\x20WHERE\x20','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','unknown\x20table(s)','isDangerous','where','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','<!--','\x20query\x20targeting\x20','foreach','length','2360816UPWGRI','include','DELETE','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','property','exec','error','"','3131742uylwWe','9LKmRPh','outer','match','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','replace','UPDATE','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','has','Unable\x20to\x20detect\x20SQL\x20type.\x20','select','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','matchAll','INSERT','join','startsWith','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','replaceAll','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','tagName','MATERIALIZED','add',']]>'];a314_0x145b=function(){return _0x2fb275;};return a314_0x145b();}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a315_0x4b9bdd=a315_0x1542;(function(_0x17e730,_0x415742){const _0x200f59=a315_0x1542,_0xceeeab=_0x17e730();while(!![]){try{const _0x58477f=parseInt(_0x200f59(0x100))/0x1+-parseInt(_0x200f59(0xf3))/0x2*(-parseInt(_0x200f59(0xf6))/0x3)+parseInt(_0x200f59(0xe7))/0x4+-parseInt(_0x200f59(0xed))/0x5+parseInt(_0x200f59(0xfe))/0x6+parseInt(_0x200f59(0xf8))/0x7+-parseInt(_0x200f59(0xea))/0x8;if(_0x58477f===_0x415742)break;else _0xceeeab['push'](_0xceeeab['shift']());}catch(_0x4d0a3d){_0xceeeab['push'](_0xceeeab['shift']());}}}(a315_0x2a64,0xd3e17));function a315_0x1542(_0x2e6055,_0x18442a){_0x2e6055=_0x2e6055-0xe5;const _0x2a64a8=a315_0x2a64();let _0x154210=_0x2a64a8[_0x2e6055];return _0x154210;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+a315_0x4b9bdd(0xf2),'configMissingHint':a315_0x4b9bdd(0xf5)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`'+CLI_BIN_NAME+a315_0x4b9bdd(0x102),'notInProjectHint':a315_0x4b9bdd(0xe9)});export const CliErrors={'authRequired'(_0x5cd405){const _0x13c4a0=a315_0x4b9bdd;return new CliError('auth_required',0x1,_0x13c4a0(0xff),_0x5cd405??_0x13c4a0(0xfc)+CLI_BIN_NAME+_0x13c4a0(0xf2));},'configMissing'(_0x3c87ec){const _0x334e6e=a315_0x4b9bdd;return new CliError(_0x334e6e(0xf7),0x1,_0x334e6e(0xfd),_0x3c87ec??'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x334e6e(0xfa)+CLI_BIN_NAME+_0x334e6e(0x102));},'notInProject'(){const _0x3e1c60=a315_0x4b9bdd;return new CliError(_0x3e1c60(0x101),0x1,_0x3e1c60(0xfb)+CLI_BIN_NAME+_0x3e1c60(0xeb),_0x3e1c60(0xe9));},'apiError'(_0x417a16,_0x50beb3){const _0x1a4dbb=a315_0x4b9bdd;return baseCliErrors[_0x1a4dbb(0xe5)](_0x417a16,_0x50beb3);},'networkError'(_0x3f5524){const _0x2965f8=a315_0x4b9bdd;return new CliError(_0x2965f8(0xf9),0x2,_0x2965f8(0xee)+_0x3f5524,_0x2965f8(0xe6));},'unknownCommand'(_0x50900d){const _0x21be7a=a315_0x4b9bdd;return new CliError(_0x21be7a(0xf4),0x1,'Unknown\x20command:\x20'+_0x50900d,'Run\x20`'+CLI_BIN_NAME+_0x21be7a(0xe8));},'flagMissing'(_0x47a18b,_0x288493){const _0x139459=a315_0x4b9bdd;return new CliError(_0x139459(0xf1),0x1,_0x139459(0xf0)+_0x47a18b,_0x288493);},'validation'(_0x1538ba,_0x3b37b8){const _0x527938=a315_0x4b9bdd;return baseCliErrors[_0x527938(0xec)](_0x1538ba,_0x3b37b8);},'cancelled'(_0x1178e0){const _0x2964a1=a315_0x4b9bdd;return new CliError(_0x2964a1(0xef),0x0,_0x1178e0??_0x2964a1(0x103));}};function a315_0x2a64(){const _0x4ad751=['apiError','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','1757204vwXScA','\x20--help`\x20to\x20see\x20available\x20commands.','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','13609608ARkhLI','\x20project\x20directory','validation','6128820NKViyg','Network\x20error:\x20','cancelled','Missing\x20required\x20flag:\x20--','flag_missing','\x20auth`\x20to\x20login\x20first.','8wxjoyB','unknown_command','Set\x20appcode\x20via\x20`','184044wSEQZJ','config_missing','11815993aoLaHw','network_error','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','Not\x20in\x20a\x20','Run\x20`','Configuration\x20file\x20not\x20found','1374762luHkkI','Authentication\x20required','1193009PIquXv','not_in_project','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','Operation\x20cancelled.'];a315_0x2a64=function(){return _0x4ad751;};return a315_0x2a64();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5737c9,_0x3da80d){const _0x31dc09=a316_0x10ed,_0x28402c=_0x5737c9();while(!![]){try{const _0xdc6b54=parseInt(_0x31dc09(0x135))/0x1*(parseInt(_0x31dc09(0x133))/0x2)+-parseInt(_0x31dc09(0x139))/0x3+-parseInt(_0x31dc09(0x13a))/0x4*(-parseInt(_0x31dc09(0x13f))/0x5)+-parseInt(_0x31dc09(0x13e))/0x6*(-parseInt(_0x31dc09(0x136))/0x7)+-parseInt(_0x31dc09(0x13d))/0x8*(parseInt(_0x31dc09(0x134))/0x9)+parseInt(_0x31dc09(0x137))/0xa+parseInt(_0x31dc09(0x138))/0xb;if(_0xdc6b54===_0x3da80d)break;else _0x28402c['push'](_0x28402c['shift']());}catch(_0x37e439){_0x28402c['push'](_0x28402c['shift']());}}}(a316_0x2171,0x9d635));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a316_0x504bf2}from'@lovrabet/cli-framework';function a316_0x2171(){const _0x447df3=['map','yes','16pMDivu','2588022OmDyed','115wQruqJ','name','159138bKgeBW','4873581tZBHAs','1gpRArV','7PNOwXz','6503010utUXcR','11150909GaYkxw','3233031OyqJgA','109640VngVGp'];a316_0x2171=function(){return _0x447df3;};return a316_0x2171();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a316_0x10ed(_0x4ba8d0,_0x49e9b2){_0x4ba8d0=_0x4ba8d0-0x133;const _0x217152=a316_0x2171();let _0x10ed50=_0x217152[_0x4ba8d0];return _0x10ed50;}export function buildAllFlags(_0x23c84c){const _0x3aa6a5=a316_0x10ed,_0x31deed=a316_0x504bf2(_0x23c84c,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x23c84c))return _0x31deed;return _0x31deed[_0x3aa6a5(0x13b)](_0x49f017=>_0x49f017[_0x3aa6a5(0x140)]===_0x3aa6a5(0x13c)?{..._0x49f017,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x49f017);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b7a5f,_0x28b1a1){var _0x51d607=a317_0x55a4,_0x4ef65c=_0x5b7a5f();while(!![]){try{var _0x54de56=parseInt(_0x51d607(0x9a))/0x1*(parseInt(_0x51d607(0xa3))/0x2)+-parseInt(_0x51d607(0x9e))/0x3*(parseInt(_0x51d607(0x9b))/0x4)+-parseInt(_0x51d607(0x9d))/0x5*(parseInt(_0x51d607(0x97))/0x6)+-parseInt(_0x51d607(0xa7))/0x7+parseInt(_0x51d607(0x98))/0x8*(parseInt(_0x51d607(0xa1))/0x9)+-parseInt(_0x51d607(0xa5))/0xa+parseInt(_0x51d607(0x9c))/0xb;if(_0x54de56===_0x28b1a1)break;else _0x4ef65c['push'](_0x4ef65c['shift']());}catch(_0x2859c6){_0x4ef65c['push'](_0x4ef65c['shift']());}}}(a317_0x4efc,0x5273e));import{resolveOutputConfig}from'@lovrabet/cli-framework';function a317_0x4efc(){var _0x418f76=['83mUouQt','1786636XsaBcE','10298959jFRLAF','49310EYthCn','3HDzeiR','compress','defaultFormat','5238AMJInf','structuredErrors','12044Lsqvrp','format','4262100PjAgLa','flags','1560958RIdmUP','294DOVXgb','6608qUXYhS','def'];a317_0x4efc=function(){return _0x418f76;};return a317_0x4efc();}export function usesStructuredErrorOutput(_0x5a5ac2){var _0x42fc61=a317_0x55a4;return _0x5a5ac2?.[_0x42fc61(0xa2)]===!![];}function a317_0x55a4(_0x16ec31,_0x2e32f9){_0x16ec31=_0x16ec31-0x97;var _0x4efcd5=a317_0x4efc();var _0x55a45b=_0x4efcd5[_0x16ec31];return _0x55a45b;}export function resolveErrorOutputFormat(_0x507b38){var _0x3f3cc3=a317_0x55a4;if(!_0x507b38[_0x3f3cc3(0x99)])return _0x507b38[_0x3f3cc3(0xa0)]??_0x3f3cc3(0x9f);return resolveOutputConfig({'flags':_0x507b38[_0x3f3cc3(0xa6)]??{},'def':_0x507b38[_0x3f3cc3(0x99)],'configDefault':_0x507b38['defaultFormat']})[_0x3f3cc3(0xa4)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a318_0x1967da=a318_0x44f1;(function(_0x3ce544,_0x4c9b39){const _0x2e1b53=a318_0x44f1,_0x580046=_0x3ce544();while(!![]){try{const _0x27b3ce=parseInt(_0x2e1b53(0xd9))/0x1+-parseInt(_0x2e1b53(0xe5))/0x2+parseInt(_0x2e1b53(0xdc))/0x3*(-parseInt(_0x2e1b53(0xe7))/0x4)+parseInt(_0x2e1b53(0xe0))/0x5+parseInt(_0x2e1b53(0xe6))/0x6*(-parseInt(_0x2e1b53(0xe2))/0x7)+parseInt(_0x2e1b53(0xde))/0x8+-parseInt(_0x2e1b53(0xdd))/0x9*(-parseInt(_0x2e1b53(0xe4))/0xa);if(_0x27b3ce===_0x4c9b39)break;else _0x580046['push'](_0x580046['shift']());}catch(_0x4f1c2b){_0x580046['push'](_0x580046['shift']());}}}(a318_0x44c1,0xe6b78));const EXPLICIT_YES_COMMANDS=new Set(['menu\x20delete',a318_0x1967da(0xdf),'notification\x20config-update',a318_0x1967da(0xe3)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a318_0x1967da(0xda);function a318_0x44f1(_0x1c8278,_0xe4fe2a){_0x1c8278=_0x1c8278-0xd9;const _0x44c16d=a318_0x44c1();let _0x44f143=_0x44c16d[_0x1c8278];return _0x44f143;}function a318_0x44c1(){const _0x7e3343=['47410EGssnv','816072XGxyiM','131550HsKMmZ','1507956OUevbw','41473bJwcUf','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','service','6nYAGAf','4329DUUWRZ','7846248PsuESv','kb\x20delete','2353275bPcaEY','command','532wZcOgO','notification\x20config-delete'];a318_0x44c1=function(){return _0x7e3343;};return a318_0x44c1();}export function requiresExplicitYes(_0x3023c5){const _0x5b143e=a318_0x1967da;return EXPLICIT_YES_COMMANDS['has'](_0x3023c5[_0x5b143e(0xdb)]+'\x20'+_0x3023c5[_0x5b143e(0xe1)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a319_0x4b6fcf=a319_0x468e;(function(_0x140a54,_0x58f306){const _0x2d2825=a319_0x468e,_0x3bea40=_0x140a54();while(!![]){try{const _0x279299=-parseInt(_0x2d2825(0xb4))/0x1+-parseInt(_0x2d2825(0xac))/0x2*(-parseInt(_0x2d2825(0xaf))/0x3)+parseInt(_0x2d2825(0xad))/0x4*(-parseInt(_0x2d2825(0xb0))/0x5)+-parseInt(_0x2d2825(0xb7))/0x6+parseInt(_0x2d2825(0xb6))/0x7+-parseInt(_0x2d2825(0xb1))/0x8*(parseInt(_0x2d2825(0xb3))/0x9)+parseInt(_0x2d2825(0xb2))/0xa*(parseInt(_0x2d2825(0xb5))/0xb);if(_0x279299===_0x58f306)break;else _0x3bea40['push'](_0x3bea40['shift']());}catch(_0x2c3599){_0x3bea40['push'](_0x3bea40['shift']());}}}(a319_0x1a76,0xdaaea));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a319_0x1a76(){const _0x23d955=['1740780knIKcH','46989844pmhuld','3576398WfvRLe','4092612TigJhQ','8ecZrTt','7544OzrFGo','parseFlags','951978JFooMB','3545VHaplg','136qMNgwC','10TMDyoL','739188DIUceG'];a319_0x1a76=function(){return _0x23d955;};return a319_0x1a76();}export const parseFlags=helpers[a319_0x4b6fcf(0xae)];function a319_0x468e(_0x71d449,_0x39c012){_0x71d449=_0x71d449-0xac;const _0x1a76e1=a319_0x1a76();let _0x468e55=_0x1a76e1[_0x71d449];return _0x468e55;}export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x246902,_0x16851c){const _0x140dcb=a320_0x324d,_0x5f25bf=_0x246902();while(!![]){try{const _0x302a7f=parseInt(_0x140dcb(0x14b))/0x1*(-parseInt(_0x140dcb(0x148))/0x2)+parseInt(_0x140dcb(0x14d))/0x3*(parseInt(_0x140dcb(0x159))/0x4)+-parseInt(_0x140dcb(0x156))/0x5*(parseInt(_0x140dcb(0x154))/0x6)+-parseInt(_0x140dcb(0x146))/0x7*(-parseInt(_0x140dcb(0x14a))/0x8)+parseInt(_0x140dcb(0x149))/0x9*(parseInt(_0x140dcb(0x14f))/0xa)+-parseInt(_0x140dcb(0x14e))/0xb+parseInt(_0x140dcb(0x152))/0xc;if(_0x302a7f===_0x16851c)break;else _0x5f25bf['push'](_0x5f25bf['shift']());}catch(_0x5c592c){_0x5f25bf['push'](_0x5f25bf['shift']());}}}(a320_0x5b95,0x86759));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';function createGenerators(){const _0x37c579=a320_0x324d;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x111d2f=>serviceGroups[_0x37c579(0x150)](_0x111d2f),'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x37c579(0x153)+CLI_BIN_NAME+_0x37c579(0x158),'serviceUsageSuffix':_0x37c579(0x151)});}export function generateCommandHelp(_0x367313){const _0x5ca9b6=a320_0x324d,_0x44450c=createGenerators()[_0x5ca9b6(0x14c)](_0x367313);if(!requiresExplicitYes(_0x367313))return _0x44450c;return _0x44450c[_0x5ca9b6(0x147)](_0x5ca9b6(0x157),_0x5ca9b6(0x155));}export function generateServiceHelp(_0x1f7bea){return createGenerators()['generateServiceHelp'](_0x1f7bea);}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}function a320_0x324d(_0x274a33,_0x2ae1e3){_0x274a33=_0x274a33-0x146;const _0x5b9524=a320_0x5b95();let _0x324d58=_0x5b9524[_0x274a33];return _0x324d58;}function a320_0x5b95(){const _0x4e2253=['6TFqzrh','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','4326695OjitFz','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','\x20workspace\x20init`\x20or\x20--appcode).','236YEGAon','7nxuxwb','replace','2rouHjA','6669usajbN','8235528DaFEoJ','881479ArohDF','generateCommandHelp','8466xyzucV','6376689TUnwrD','1940wCwhBz','get','\x20[args]\x20[flags]','18450828vknnkE','Requires\x20appcode\x20(set\x20via\x20`'];a320_0x5b95=function(){return _0x4e2253;};return a320_0x5b95();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5392ae,_0x181ba2){var _0x2a4c7f=a321_0x1379,_0x54849a=_0x5392ae();while(!![]){try{var _0x47af63=-parseInt(_0x2a4c7f(0xcd))/0x1+parseInt(_0x2a4c7f(0xd2))/0x2+parseInt(_0x2a4c7f(0xca))/0x3*(parseInt(_0x2a4c7f(0xcf))/0x4)+parseInt(_0x2a4c7f(0xcc))/0x5+parseInt(_0x2a4c7f(0xcb))/0x6+parseInt(_0x2a4c7f(0xce))/0x7*(parseInt(_0x2a4c7f(0xd1))/0x8)+-parseInt(_0x2a4c7f(0xd0))/0x9;if(_0x47af63===_0x181ba2)break;else _0x54849a['push'](_0x54849a['shift']());}catch(_0x5b2cc4){_0x54849a['push'](_0x54849a['shift']());}}}(a321_0xa893,0x97ae4));function a321_0x1379(_0x29e9e9,_0x4624e6){_0x29e9e9=_0x29e9e9-0xca;var _0xa89326=a321_0xa893();var _0x13799e=_0xa89326[_0x29e9e9];return _0x13799e;}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 a321_0xa893(){var _0x401bab=['40rmBeBJ','780814WVkkgo','3VJShIc','4025142slWDcJ','5173025EfmUtR','1021903VRXfOA','1162287CXWEXD','3145364opPOOr','18623052rUizcJ'];a321_0xa893=function(){return _0x401bab;};return a321_0xa893();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29894d,_0x2c86e1){const _0x54f0e9=a322_0x2949,_0x57a21e=_0x29894d();while(!![]){try{const _0xc9446b=-parseInt(_0x54f0e9(0xf9))/0x1+-parseInt(_0x54f0e9(0x111))/0x2*(-parseInt(_0x54f0e9(0x10c))/0x3)+-parseInt(_0x54f0e9(0xfc))/0x4*(-parseInt(_0x54f0e9(0x108))/0x5)+-parseInt(_0x54f0e9(0x107))/0x6+parseInt(_0x54f0e9(0x100))/0x7*(parseInt(_0x54f0e9(0x10e))/0x8)+parseInt(_0x54f0e9(0xfd))/0x9+-parseInt(_0x54f0e9(0x10f))/0xa;if(_0xc9446b===_0x2c86e1)break;else _0x57a21e['push'](_0x57a21e['shift']());}catch(_0x18d7c1){_0x57a21e['push'](_0x57a21e['shift']());}}}(a322_0x536e,0xe9fab));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x2d4585,_0x47dedd){const _0xf23632=a322_0x2949,_0x3abc04=_0x2d4585[_0xf23632(0xff)],{_notice:_0x105417,..._0x1c0c1f}=_0x2d4585;void _0x105417,baseFormatOutput(_0x1c0c1f,_0x47dedd),_0x47dedd['format']==='pretty'&&printPrettyNotice(_0x3abc04);}export function formatCliError(_0x5eebf5,_0x54c0f2){const _0x32cbb2=a322_0x2949;if(_0x54c0f2[_0x32cbb2(0x106)]==='pretty')return![];const _0x29025f=_0x5eebf5[_0x32cbb2(0x10a)],_0x26aa3a={'ok':![],'command':_0x54c0f2[_0x32cbb2(0x101)],'risk':_0x54c0f2[_0x32cbb2(0x105)],'data':_0x29025f??null,'error':{'code':_0x5eebf5[_0x32cbb2(0xfb)],'message':_0x5eebf5[_0x32cbb2(0x10b)],..._0x5eebf5[_0x32cbb2(0x102)]?{'hint':_0x5eebf5[_0x32cbb2(0x102)]}:{}}},_0x4d657a=_0x54c0f2[_0x32cbb2(0x106)]===_0x32cbb2(0x10d)?JSON[_0x32cbb2(0xfe)](_0x26aa3a,null,0x2):JSON[_0x32cbb2(0xfe)](_0x26aa3a);let _0x1b73bf=_0x4d657a;if(_0x54c0f2[_0x32cbb2(0x104)]?.[_0x32cbb2(0x103)]())try{_0x1b73bf=applyJqFilter(_0x4d657a,_0x54c0f2['jqFilter']);}catch(_0x501679){const _0x3bd152=_0x501679 instanceof CliError?_0x501679:CliErrors['validation'](_0x32cbb2(0x110)+(_0x501679 instanceof Error?_0x501679[_0x32cbb2(0x10b)]:String(_0x501679))),_0x5238d5={..._0x26aa3a,'error':{'code':_0x3bd152[_0x32cbb2(0xfb)],'message':_0x3bd152[_0x32cbb2(0x10b)],..._0x3bd152[_0x32cbb2(0x102)]?{'hint':_0x3bd152['hint']}:{},'cause':_0x26aa3a[_0x32cbb2(0x109)]}};_0x1b73bf=_0x54c0f2[_0x32cbb2(0x106)]==='json'?JSON['stringify'](_0x5238d5,null,0x2):JSON[_0x32cbb2(0xfe)](_0x5238d5);}return process['stdout']['write'](_0x1b73bf[_0x32cbb2(0xfa)]('\x0a')?_0x1b73bf:_0x1b73bf+'\x0a'),!![];}function a322_0x2949(_0x2102d0,_0x1fdddc){_0x2102d0=_0x2102d0-0xf9;const _0x536edc=a322_0x536e();let _0x294959=_0x536edc[_0x2102d0];return _0x294959;}function printPrettyNotice(_0x2c56c4){const _0x196ece=a322_0x2949;if(!_0x2c56c4?.['update'])return;console['error'](_0x2c56c4[_0x196ece(0x112)][_0x196ece(0x10b)]+'\x20('+_0x2c56c4[_0x196ece(0x112)]['url']+')');}function a322_0x536e(){const _0x3c9667=['565926IeBSEi','json','712QdlmzC','20183420ZAVyfb','jq:\x20','6AXqUGs','update','464469adlMun','endsWith','code','1464nzGcmc','9760986muebOi','stringify','_notice','54614iNZisN','command','hint','trim','jqFilter','risk','format','4650156RUUhYA','25565vyzOux','error','data','message'];a322_0x536e=function(){return _0x3c9667;};return a322_0x536e();}
|