@lovrabet/rabetbase-cli 2.5.12 → 2.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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.js +1 -1
- package/lib/commands/flow/publish.js +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.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/context.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/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.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.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.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.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x534885,_0x523d5f){const _0x5ee44d=a305_0x416f,_0x36bc67=_0x534885();while(!![]){try{const _0xc5350=parseInt(_0x5ee44d(0x99))/0x1+-parseInt(_0x5ee44d(0xa5))/0x2*(parseInt(_0x5ee44d(0x9c))/0x3)+-parseInt(_0x5ee44d(0x9b))/0x4+parseInt(_0x5ee44d(0xa4))/0x5*(parseInt(_0x5ee44d(0x97))/0x6)+parseInt(_0x5ee44d(0xa0))/0x7+parseInt(_0x5ee44d(0x96))/0x8+parseInt(_0x5ee44d(0xa2))/0x9*(-parseInt(_0x5ee44d(0x9d))/0xa);if(_0xc5350===_0x523d5f)break;else _0x36bc67['push'](_0x36bc67['shift']());}catch(_0x4dadee){_0x36bc67['push'](_0x36bc67['shift']());}}}(a305_0x3897,0x2e92d));function a305_0x416f(_0x54c568,_0x54c94e){_0x54c568=_0x54c568-0x96;const _0x38974b=a305_0x3897();let _0x416fae=_0x38974b[_0x54c568];return _0x416fae;}import a305_0x167406 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x135f3c){const _0x1bdc2e=a305_0x416f;return JSON[_0x1bdc2e(0xa1)](JSON['parse'](_0x135f3c),null,0x2)+'\x0a';}export function computePageContentHash(_0x4122c9){const _0x357eb6=a305_0x416f;return a305_0x167406[_0x357eb6(0x98)](_0x357eb6(0x9f))[_0x357eb6(0xa3)](_0x4122c9)['digest'](_0x357eb6(0x9e));}export function computeSerializedSchemaHash(_0x312a9d){return computePageContentHash(serializePageSchemaForFile(_0x312a9d));}function a305_0x3897(){const _0x521d0d=['2647824dgbXgt','5910NeflRi','createHash','293316XvgMPu','utf8','22272ipDXlh','18024KaekKe','1148330VAOQeP','hex','md5','1955520GTEdTv','stringify','45OEqcpR','update','300sSkyAY','64cSGxiy'];a305_0x3897=function(){return _0x521d0d;};return a305_0x3897();}export async function computePageFileHash(_0x31c160){const _0x14bd48=a305_0x416f,_0x13226f=await readFile(_0x31c160,_0x14bd48(0x9a));return computePageContentHash(_0x13226f);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x497f2a,_0x4e1cc2){const _0x35f3a6=a306_0x50a6,_0x545fce=_0x497f2a();while(!![]){try{const _0x4ab15b=parseInt(_0x35f3a6(0x15c))/0x1+parseInt(_0x35f3a6(0x15d))/0x2+parseInt(_0x35f3a6(0x16c))/0x3*(-parseInt(_0x35f3a6(0x15f))/0x4)+-parseInt(_0x35f3a6(0x164))/0x5+-parseInt(_0x35f3a6(0x168))/0x6*(-parseInt(_0x35f3a6(0x162))/0x7)+parseInt(_0x35f3a6(0x15e))/0x8*(parseInt(_0x35f3a6(0x16b))/0x9)+parseInt(_0x35f3a6(0x15b))/0xa*(-parseInt(_0x35f3a6(0x166))/0xb);if(_0x4ab15b===_0x4e1cc2)break;else _0x545fce['push'](_0x545fce['shift']());}catch(_0xea3a42){_0x545fce['push'](_0x545fce['shift']());}}}(a306_0xf97d,0x46717));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a306_0x50a6(_0x24f4dc,_0x21b847){_0x24f4dc=_0x24f4dc-0x15a;const _0xf97d3d=a306_0xf97d();let _0x50a6c2=_0xf97d3d[_0x24f4dc];return _0x50a6c2;}export function ensurePageLockScope(_0x18b973,_0x41977e){const _0x80c870=a306_0x50a6,_0x1f3928={'apps':_0x18b973[_0x80c870(0x167)]&&typeof _0x18b973['apps']==='object'?_0x18b973[_0x80c870(0x167)]:{}};let _0x26b6b7=_0x1f3928[_0x80c870(0x167)][_0x41977e];if(!_0x26b6b7)return _0x26b6b7={'lastSync':'','pages':{}},_0x1f3928[_0x80c870(0x167)][_0x41977e]=_0x26b6b7,{'lockData':_0x1f3928,'appLock':_0x26b6b7};return!_0x26b6b7[_0x80c870(0x169)]&&(_0x26b6b7[_0x80c870(0x169)]=''),(!_0x26b6b7[_0x80c870(0x165)]||typeof _0x26b6b7[_0x80c870(0x165)]!==_0x80c870(0x161))&&(_0x26b6b7[_0x80c870(0x165)]={}),{'lockData':_0x1f3928,'appLock':_0x26b6b7};}export async function readPageLockFile(_0x1707aa){const _0xa72ca7=a306_0x50a6;try{const _0x19f499=await readFile(_0x1707aa,'utf8'),_0x2913c2=JSON[_0xa72ca7(0x15a)](_0x19f499);return{'apps':_0x2913c2[_0xa72ca7(0x167)]&&typeof _0x2913c2[_0xa72ca7(0x167)]===_0xa72ca7(0x161)?_0x2913c2[_0xa72ca7(0x167)]:{}};}catch(_0x5a8137){if(_0x5a8137[_0xa72ca7(0x163)]===_0xa72ca7(0x16a))return null;throw new Error(_0xa72ca7(0x160)+String(_0x5a8137));}}function a306_0xf97d(){const _0x39f15f=['lastSync','ENOENT','2115846tKGeKx','183rHwrtl','stringify','parse','70ufoPzL','291564oUVLEp','326450HPxhNf','16VHTpit','3372nUbags','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','object','7Kevdkd','code','2417615nRgqGf','pages','665137ieABIw','apps','1930638ukZshk'];a306_0xf97d=function(){return _0x39f15f;};return a306_0xf97d();}export async function writePageLockFile(_0x477abe,_0xc12c76){const _0x374a70=a306_0x50a6;await mkdir(dirname(_0x477abe),{'recursive':!![]}),await writeFile(_0x477abe,JSON[_0x374a70(0x16d)](_0xc12c76,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc2a4c0,_0x40c587){const _0x57c4b1=a307_0x5c63,_0x57c4c8=_0xc2a4c0();while(!![]){try{const _0xacff81=parseInt(_0x57c4b1(0xb6))/0x1+-parseInt(_0x57c4b1(0xc9))/0x2*(-parseInt(_0x57c4b1(0xc3))/0x3)+-parseInt(_0x57c4b1(0xb0))/0x4*(-parseInt(_0x57c4b1(0xa3))/0x5)+-parseInt(_0x57c4b1(0xa4))/0x6+parseInt(_0x57c4b1(0xb8))/0x7+parseInt(_0x57c4b1(0xa6))/0x8*(-parseInt(_0x57c4b1(0xb7))/0x9)+parseInt(_0x57c4b1(0xbf))/0xa;if(_0xacff81===_0x40c587)break;else _0x57c4c8['push'](_0x57c4c8['shift']());}catch(_0x2c23a7){_0x57c4c8['push'](_0x57c4c8['shift']());}}}(a307_0xd00c,0x9d7ff));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x2893e1,_0x4b59e9,_0x303ea6){const _0x369b55=a307_0x5c63,_0x12fdf7=parseSchema(_0x2893e1,'local'),_0x33074f=parseSchema(_0x4b59e9,_0x369b55(0xad)),_0x2843f1=collectLrSmartJsx(_0x12fdf7,!![]);if(_0x2843f1[_0x369b55(0xb3)]===0x0)return{'content':_0x2893e1,'compiledNodes':0x0,'normalizedNodes':0x0};const _0xd0f94a=new Map(collectLrSmartJsx(_0x33074f)[_0x369b55(0xcb)](_0x52c59b=>[_0x52c59b[_0x369b55(0x9e)],_0x52c59b]));let _0x5491f1=0x0,_0x3ce255=0x0;for(const _0xc22d30 of _0x2843f1){const _0x4024fc=readNonEmptyString(_0xc22d30[_0x369b55(0xa1)][_0x369b55(0xae)]),_0x245bf7=readNonEmptyString(_0xc22d30[_0x369b55(0xa1)][_0x369b55(0xcc)]),_0x37faf2=_0xd0f94a[_0x369b55(0xa0)](_0xc22d30[_0x369b55(0x9e)]),_0x1a05d9=readNonEmptyString(_0x37faf2?.[_0x369b55(0xa1)]['source']),_0x395690=readNonEmptyString(_0x37faf2?.['render'][_0x369b55(0xcc)]);let _0x459aab=![];_0xc22d30[_0x369b55(0xa1)][_0x369b55(0xb5)]!==_0x369b55(0xa8)&&(_0xc22d30[_0x369b55(0xa1)][_0x369b55(0xb5)]='JSFunction',_0x459aab=!![]);!isPageContextExpression(_0xc22d30[_0x369b55(0xc4)][_0x369b55(0xbe)])&&(_0xc22d30[_0x369b55(0xc4)][_0x369b55(0xbe)]={'type':_0x369b55(0xc0),'value':_0x369b55(0xab)},_0x459aab=!![]);if(!_0x4024fc){if(!_0x245bf7)throw CliErrors[_0x369b55(0xa9)](_0x369b55(0xaf)+_0xc22d30[_0x369b55(0xc6)]+_0x369b55(0xca),_0x369b55(0xbc));if(_0x459aab)_0x3ce255+=0x1;continue;}const _0x4a1f5e=!_0x37faf2||_0x4024fc!==_0x1a05d9,_0x22a0fd=!_0x245bf7;if(!_0x4a1f5e&&_0x245bf7&&_0x395690&&_0x245bf7!==_0x395690)throw CliErrors['validation'](_0x369b55(0xaf)+_0xc22d30['label']+_0x369b55(0xc1),_0x369b55(0xc2));if(_0x4a1f5e||_0x22a0fd||!_0x395690){const _0x2ae174=readNonEmptyString(await _0x303ea6(_0x4024fc));if(!_0x2ae174)throw CliErrors[_0x369b55(0x9f)](_0x369b55(0xbd)+_0xc22d30['label']+'\x22.');_0xc22d30[_0x369b55(0xa1)]['value']=_0x2ae174,_0x5491f1+=0x1,_0x459aab=!![];}if(_0x459aab)_0x3ce255+=0x1;}if(_0x3ce255===0x0)return{'content':_0x2893e1,'compiledNodes':_0x5491f1,'normalizedNodes':_0x3ce255};return{'content':JSON[_0x369b55(0xc7)](_0x12fdf7),'compiledNodes':_0x5491f1,'normalizedNodes':_0x3ce255};}function a307_0x5c63(_0x1162bf,_0x52beec){_0x1162bf=_0x1162bf-0x9e;const _0xd00c4c=a307_0xd00c();let _0x5c632a=_0xd00c4c[_0x1162bf];return _0x5c632a;}function parseSchema(_0x3186ac,_0x285793){const _0x444539=a307_0x5c63;try{return JSON['parse'](_0x3186ac);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20in\x20'+_0x285793+_0x444539(0xaa));}}function collectLrSmartJsx(_0x251096,_0x83835=![]){const _0x528675=[],_0x3d277d=(_0x2ecf7e,_0x4abce9)=>{const _0x58d9b4=a307_0x5c63;if(Array[_0x58d9b4(0xc5)](_0x2ecf7e)){_0x2ecf7e[_0x58d9b4(0xa2)]((_0x4829c2,_0x375fdd)=>_0x3d277d(_0x4829c2,_0x4abce9+'['+_0x375fdd+']'));return;}if(!isObject(_0x2ecf7e))return;if(_0x2ecf7e[_0x58d9b4(0xc8)]===_0x58d9b4(0xbb)){const _0x400acb=readNonEmptyString(_0x2ecf7e['id']),_0x30119b=_0x400acb||_0x4abce9,_0x1a7e28=isObject(_0x2ecf7e[_0x58d9b4(0xc4)])?_0x2ecf7e['props']:undefined;if(!_0x1a7e28){if(_0x83835)throw CliErrors[_0x58d9b4(0xa9)]('LrSmartJsx\x20node\x20\x22'+_0x30119b+_0x58d9b4(0xb2),_0x58d9b4(0xb4));return;}const _0x2826e2=isObject(_0x1a7e28[_0x58d9b4(0xa1)])?_0x1a7e28[_0x58d9b4(0xa1)]:undefined;if(!_0x2826e2){if(_0x83835)throw CliErrors['validation'](_0x58d9b4(0xaf)+_0x30119b+'\x22\x20has\x20missing\x20or\x20invalid\x20props.render.',_0x58d9b4(0xba));return;}_0x528675[_0x58d9b4(0xb9)]({'key':_0x400acb?'id:'+_0x400acb:_0x58d9b4(0xb1)+_0x4abce9,'label':_0x30119b,'props':_0x1a7e28,'render':_0x2826e2});}for(const [_0x259dcc,_0x122975]of Object['entries'](_0x2ecf7e)){if(_0x259dcc===_0x58d9b4(0xc4)&&_0x2ecf7e[_0x58d9b4(0xc8)]===_0x58d9b4(0xbb))continue;_0x3d277d(_0x122975,_0x4abce9+'.'+_0x259dcc);}};return _0x3d277d(_0x251096,'$'),_0x528675;}function isObject(_0x49c294){const _0x4726dc=a307_0x5c63;return Boolean(_0x49c294)&&typeof _0x49c294===_0x4726dc(0xa7)&&!Array['isArray'](_0x49c294);}function readNonEmptyString(_0xa7601f){const _0x3eea3f=a307_0x5c63;return typeof _0xa7601f===_0x3eea3f(0xac)&&_0xa7601f[_0x3eea3f(0xa5)]()?_0xa7601f:undefined;}function isPageContextExpression(_0x404db1){const _0x3d6f93=a307_0x5c63;return isObject(_0x404db1)&&_0x404db1[_0x3d6f93(0xb5)]===_0x3d6f93(0xc0)&&_0x404db1['value']===_0x3d6f93(0xab);}function a307_0xd00c(){const _0xa4e2b9=['apiError','get','render','forEach','515dNbWFM','5035734XhENxI','trim','88IpiHPB','object','JSFunction','validation','\x20page\x20schema.','this','string','remote','source','LrSmartJsx\x20node\x20\x22','24836QsRKIv','path:','\x22\x20has\x20missing\x20or\x20invalid\x20props.','length','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','type','163898PowAdJ','615375TQOjHD','8983492LmiKtj','push','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','LrSmartJsx','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','_context','768720TzQXob','JSExpression','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','21864nbUoRu','props','isArray','label','stringify','componentName','20XwUlXF','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','map','value','key'];a307_0xd00c=function(){return _0xa4e2b9;};return a307_0xd00c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x23f5c9,_0xabe011){const _0x22758b=a309_0x35f1,_0x2d2fc5=_0x23f5c9();while(!![]){try{const _0x555a66=-parseInt(_0x22758b(0xb2))/0x1*(parseInt(_0x22758b(0xdb))/0x2)+parseInt(_0x22758b(0xd7))/0x3+-parseInt(_0x22758b(0xe4))/0x4+parseInt(_0x22758b(0xcc))/0x5+parseInt(_0x22758b(0xe0))/0x6*(parseInt(_0x22758b(0xb1))/0x7)+parseInt(_0x22758b(0xc6))/0x8+parseInt(_0x22758b(0xe9))/0x9*(-parseInt(_0x22758b(0xb9))/0xa);if(_0x555a66===_0xabe011)break;else _0x2d2fc5['push'](_0x2d2fc5['shift']());}catch(_0x4e6eb0){_0x2d2fc5['push'](_0x2d2fc5['shift']());}}}(a309_0x1672,0x537dc));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x1d99e6,_0x3f6d2d){const _0x2f8079=a309_0x35f1,_0x33d3d3=[],_0x39d1ac=normalizeSqlForStaticAnalysis(_0x1d99e6),_0x38b35e=(_0x39d1ac[_0x2f8079(0xb5)]?[]:extractJoinFacts(_0x39d1ac[_0x2f8079(0xc7)]))[_0x2f8079(0xcb)](_0x3d91a7=>{const _0x3a18d5=_0x2f8079;if(_0x3d91a7[_0x3a18d5(0xd5)]||_0x3d91a7[_0x3a18d5(0xc8)][_0x3a18d5(0xcf)]===0x0)return _0x33d3d3[_0x3a18d5(0xd2)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x3d91a7['table'],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'reason':_0x3d91a7[_0x3a18d5(0xeb)]??'Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.'}),{'table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'status':_0x3a18d5(0xbb)};const _0x16585e=resolveTableMetadata(_0x3f6d2d,_0x3d91a7[_0x3a18d5(0xe2)]),_0xce4cce=(_0x16585e?.[_0x3a18d5(0xb7)]??[])[_0x3a18d5(0xcb)](_0x3e7b85=>({'index':_0x3e7b85,'matchedPrefix':findEqualityPrefix(_0x3e7b85['columns'],_0x3d91a7[_0x3a18d5(0xc8)])}))[_0x3a18d5(0xa7)](_0x13b126=>_0x13b126['matchedPrefix'][_0x3a18d5(0xcf)]>0x0),_0x4c9bfd=_0xce4cce['reduce']((_0x1e09b0,_0x385478)=>!_0x1e09b0||_0x385478[_0x3a18d5(0xe8)]['length']>_0x1e09b0[_0x3a18d5(0xe8)]['length']?_0x385478:_0x1e09b0,_0xce4cce[0x0]);if(_0x4c9bfd)return{'table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'status':_0x3a18d5(0xc1),'matchedIndex':{..._0x4c9bfd[_0x3a18d5(0xc9)],'matchedPrefix':_0x4c9bfd[_0x3a18d5(0xe8)]}};const _0x1326c0=_0x16585e?.[_0x3a18d5(0xb7)][_0x3a18d5(0xa7)](_0x5e9cfd=>_0x5e9cfd[_0x3a18d5(0xc8)][_0x3a18d5(0xb4)](_0x5a01eb=>_0x3d91a7[_0x3a18d5(0xc8)][_0x3a18d5(0xb4)](_0x87f19f=>columnNamesMatch(_0x5a01eb,_0x87f19f))))??[];if(_0x1326c0[_0x3a18d5(0xcf)]>0x0)return _0x33d3d3[_0x3a18d5(0xd2)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7['alias'],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'reason':_0x3a18d5(0xb0)}),{'table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'status':'warning','candidateIndexes':_0x1326c0};if(_0x16585e&&_0x16585e[_0x3a18d5(0xad)]!==![]&&_0x16585e['indexes'][_0x3a18d5(0xcf)]>0x0&&_0x3d91a7[_0x3a18d5(0xc8)][_0x3a18d5(0xcf)]>0x0)return _0x33d3d3[_0x3a18d5(0xd2)]({'code':'JOIN_INDEX_MISSING','table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'reason':_0x3a18d5(0xea)}),{'table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7['alias'],'columns':_0x3d91a7['columns'],'status':_0x3a18d5(0xdf)};return _0x33d3d3[_0x3a18d5(0xd2)]({'code':_0x3a18d5(0xa9),'table':_0x3d91a7[_0x3a18d5(0xe2)],'alias':_0x3d91a7['alias'],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'reason':_0x16585e?_0x3a18d5(0xd9):_0x3a18d5(0xc0)}),{'table':_0x3d91a7['table'],'alias':_0x3d91a7[_0x3a18d5(0xc5)],'columns':_0x3d91a7[_0x3a18d5(0xc8)],'status':_0x3a18d5(0xbb)};});return{'checked':_0x38b35e[_0x2f8079(0xcf)]>0x0,'joins':_0x38b35e,'warnings':_0x33d3d3};}function extractJoinFacts(_0x34b2c1){const _0x5039b7=a309_0x35f1,_0x15b6be=maskNestedQueries(stripSqlNoise(_0x34b2c1)),_0x41831e=maskQuotedIdentifiers(_0x15b6be),_0x24e8e1=[],_0x5bcba1=new Set(),_0x28598c=/\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 _0x55c54e of _0x15b6be['matchAll'](_0x28598c)){const _0x540890=_0x55c54e[_0x5039b7(0xc9)]??0x0,_0x5272e0=_0x55c54e[0x0][_0x5039b7(0xc4)](/\bJOIN\b/i),_0x15c437=_0x540890+Math[_0x5039b7(0xe5)](0x0,_0x5272e0);if(!/^JOIN\b/i[_0x5039b7(0xce)](_0x41831e[_0x5039b7(0xa5)](_0x15c437)))continue;_0x5bcba1[_0x5039b7(0xc2)](_0x15c437);const _0x139aa4=normalizeIdentifier(_0x55c54e[0x1]||'INNER'),_0x385a90=normalizeIdentifier(_0x55c54e[0x2]??''),_0x34c8b1=normalizeIdentifier(_0x55c54e[0x3]||_0x385a90[_0x5039b7(0xb8)]('.')['at'](-0x1)||_0x385a90),_0x40b601=[],_0x46406e=_0x385a90==='__sq__';let _0x323cf2=_0x139aa4===_0x5039b7(0xaf)||_0x139aa4==='full'||_0x46406e,_0x178f43=_0x323cf2?_0x46406e?_0x5039b7(0xe6):_0x139aa4[_0x5039b7(0xe7)]()+'\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.':undefined;const _0x469ce3=stripOuterParentheses(_0x55c54e[0x4]??''),_0xc46194=_0x469ce3[_0x5039b7(0xac)](MYBATIS_DYNAMIC_START_MARKER)||_0x469ce3['includes'](MYBATIS_DYNAMIC_END_MARKER),_0xe37e5a=_0x469ce3[_0x5039b7(0xac)](MYBATIS_INCLUDE_MARKER);_0xc46194&&(_0x323cf2=!![],_0x178f43??='MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.');_0xe37e5a&&(_0x323cf2=!![],_0x178f43??=_0x5039b7(0xb3));const _0x481130=_0x469ce3[_0x5039b7(0xd0)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x5039b7(0xd0)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x5039b7(0xd0)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x481130,'OR')&&(_0x323cf2=!![],_0x178f43??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x4c3c70 of splitTopLevelAnd(_0x481130)){const _0x232cb5=stripOuterParentheses(_0x4c3c70);if(hasTopLevelKeyword(_0x232cb5,'OR')){_0x323cf2=!![],_0x178f43??=_0x5039b7(0xbc);continue;}const _0x2f06b9=splitEquality(_0x232cb5);if(!_0x2f06b9){containsColumnReference(_0x4c3c70,_0x34c8b1)&&(_0x323cf2=!![]);continue;}const _0x193383=parseDirectColumnReference(_0x2f06b9[0x0],_0x34c8b1),_0xa28a29=parseDirectColumnReference(_0x2f06b9[0x1],_0x34c8b1),_0x3e9b55=containsColumnReference(_0x2f06b9[0x0],_0x34c8b1),_0xd8022c=containsColumnReference(_0x2f06b9[0x1],_0x34c8b1),_0x5d7b65=_0x193383&&!_0xd8022c?_0x193383:_0xa28a29&&!_0x3e9b55?_0xa28a29:null;if(_0x5d7b65&&!_0x40b601[_0x5039b7(0xac)](_0x5d7b65))_0x40b601[_0x5039b7(0xd2)](_0x5d7b65);else!_0x5d7b65&&containsColumnReference(_0x4c3c70,_0x34c8b1)&&(_0x323cf2=!![]);}_0x24e8e1[_0x5039b7(0xd2)]({'table':_0x385a90,'alias':_0x34c8b1,'columns':_0x40b601,'unsupportedPredicate':_0x323cf2,'unsupportedReason':_0x178f43,'containsUnresolvedInclude':_0xe37e5a,'position':_0x15c437});}for(const _0x627a64 of _0x41831e[_0x5039b7(0xba)](/\bJOIN\b/gi)){const _0x3b98f5=_0x627a64[_0x5039b7(0xc9)]??0x0;if(_0x5bcba1['has'](_0x3b98f5))continue;const _0x8f8967=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x5039b7(0xd6)](_0x15b6be[_0x5039b7(0xa5)](_0x3b98f5+_0x627a64[0x0][_0x5039b7(0xcf)])),_0x5431ea=normalizeIdentifier(_0x8f8967?.[0x1]||_0x5039b7(0xd1)),_0x1d44d4=normalizeIdentifier(_0x8f8967?.[0x2]||''),_0x412951=isSqlClauseKeyword(_0x1d44d4)?_0x5431ea['split']('.')['at'](-0x1)||_0x5431ea:_0x1d44d4||_0x5431ea[_0x5039b7(0xb8)]('.')['at'](-0x1)||_0x5431ea;_0x24e8e1[_0x5039b7(0xd2)]({'table':_0x5431ea,'alias':_0x412951,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x5039b7(0xab),'position':_0x3b98f5});}const _0x492649=_0x41831e['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x492649>=0x0&&!_0x24e8e1['some'](_0x357a12=>_0x357a12[_0x5039b7(0xa8)])&&_0x24e8e1[_0x5039b7(0xd2)]({'table':_0x5039b7(0xd1),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x5039b7(0xee),'containsUnresolvedInclude':!![],'position':_0x492649}),_0x24e8e1[_0x5039b7(0xaa)]((_0x472b8d,_0x1b0ee1)=>_0x472b8d['position']-_0x1b0ee1[_0x5039b7(0xd4)]);}function stripSqlNoise(_0x35f46f){const _0x3d72bd=a309_0x35f1,_0x552441=Array[_0x3d72bd(0xc3)](_0x35f46f),_0x1e73b4=(_0x4beefa,_0x3102f3)=>{for(let _0x3a36b2=_0x4beefa;_0x3a36b2<_0x3102f3;_0x3a36b2+=0x1){_0x552441[_0x3a36b2]!=='\x0a'&&_0x552441[_0x3a36b2]!=='\x0d'&&(_0x552441[_0x3a36b2]='\x20');}};for(let _0x2afd5f=0x0;_0x2afd5f<_0x552441[_0x3d72bd(0xcf)];_0x2afd5f+=0x1){const _0x1fd818=_0x552441[_0x2afd5f],_0x2d4b8d=_0x552441[_0x2afd5f+0x1];if(_0x1fd818==='\x27'||_0x1fd818==='\x22'||_0x1fd818==='`'){const _0x5196db=_0x1fd818,_0x596dc7=_0x2afd5f;_0x2afd5f+=0x1;while(_0x2afd5f<_0x552441[_0x3d72bd(0xcf)]){if(_0x552441[_0x2afd5f]==='\x5c'&&_0x2afd5f+0x1<_0x552441[_0x3d72bd(0xcf)]){_0x2afd5f+=0x2;continue;}if(_0x552441[_0x2afd5f]!==_0x5196db){_0x2afd5f+=0x1;continue;}if(_0x552441[_0x2afd5f+0x1]===_0x5196db){_0x2afd5f+=0x2;continue;}break;}if(_0x5196db==='\x27')_0x1e73b4(_0x596dc7,Math[_0x3d72bd(0xdd)](_0x2afd5f+0x1,_0x552441[_0x3d72bd(0xcf)]));continue;}if(_0x1fd818==='-'&&_0x2d4b8d==='-'){const _0x42ce2e=_0x2afd5f;while(_0x2afd5f<_0x552441[_0x3d72bd(0xcf)]&&_0x552441[_0x2afd5f]!=='\x0a')_0x2afd5f+=0x1;_0x1e73b4(_0x42ce2e,_0x2afd5f);continue;}if(_0x1fd818==='/'&&_0x2d4b8d==='*'){const _0x438535=_0x2afd5f;_0x2afd5f+=0x2;while(_0x2afd5f<_0x552441['length']&&!(_0x552441[_0x2afd5f]==='*'&&_0x552441[_0x2afd5f+0x1]==='/')){_0x2afd5f+=0x1;}_0x2afd5f=Math[_0x3d72bd(0xdd)](_0x2afd5f+0x1,_0x552441['length']-0x1),_0x1e73b4(_0x438535,_0x2afd5f+0x1);continue;}if(_0x1fd818==='#'&&_0x2d4b8d!=='{'){const _0x551773=_0x2afd5f;while(_0x2afd5f<_0x552441['length']&&_0x552441[_0x2afd5f]!=='\x0a')_0x2afd5f+=0x1;_0x1e73b4(_0x551773,_0x2afd5f);continue;}if((_0x1fd818==='#'||_0x1fd818==='$')&&_0x2d4b8d==='{'){const _0x422318=_0x2afd5f;_0x2afd5f+=0x2;while(_0x2afd5f<_0x552441[_0x3d72bd(0xcf)]&&_0x552441[_0x2afd5f]!=='}')_0x2afd5f+=0x1;_0x1e73b4(_0x422318,Math[_0x3d72bd(0xdd)](_0x2afd5f+0x1,_0x552441[_0x3d72bd(0xcf)]));}}return _0x552441['join']('');}function maskQuotedIdentifiers(_0x3c0ba2){const _0x4397d6=a309_0x35f1,_0x18e976=Array[_0x4397d6(0xc3)](_0x3c0ba2);for(let _0x107078=0x0;_0x107078<_0x18e976['length'];_0x107078+=0x1){const _0x4ead04=_0x18e976[_0x107078];if(_0x4ead04!=='\x22'&&_0x4ead04!=='`')continue;_0x107078+=0x1;while(_0x107078<_0x18e976['length']){if(_0x18e976[_0x107078]===_0x4ead04){if(_0x18e976[_0x107078+0x1]===_0x4ead04){_0x18e976[_0x107078]='\x20',_0x18e976[_0x107078+0x1]='\x20',_0x107078+=0x2;continue;}break;}_0x18e976[_0x107078]='\x20',_0x107078+=0x1;}}return _0x18e976[_0x4397d6(0xdc)]('');}function maskNestedQueries(_0x225b1c){const _0x43b630=a309_0x35f1,_0x301307=Array[_0x43b630(0xc3)](_0x225b1c);for(let _0x380436=0x0;_0x380436<_0x301307[_0x43b630(0xcf)];_0x380436+=0x1){if(_0x301307[_0x380436]!=='(')continue;const _0x56566b=_0x225b1c[_0x43b630(0xa5)](_0x380436+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x43b630(0xce)](_0x56566b))continue;let _0x5e7d83=0x1,_0x586beb=_0x380436+0x1;for(;_0x586beb<_0x301307[_0x43b630(0xcf)]&&_0x5e7d83>0x0;_0x586beb+=0x1){if(_0x301307[_0x586beb]==='(')_0x5e7d83+=0x1;if(_0x301307[_0x586beb]===')')_0x5e7d83-=0x1;}if(_0x5e7d83!==0x0)continue;for(let _0x2e91f4=_0x380436;_0x2e91f4<_0x586beb;_0x2e91f4+=0x1){_0x301307[_0x2e91f4]='\x20';}const _0x2943d7=_0x43b630(0xd3);for(let _0x1cf751=0x0;_0x1cf751<_0x2943d7[_0x43b630(0xcf)]&&_0x380436+_0x1cf751<_0x586beb;_0x1cf751+=0x1){_0x301307[_0x380436+_0x1cf751]=_0x2943d7[_0x1cf751];}_0x380436=_0x586beb-0x1;}return _0x301307[_0x43b630(0xdc)]('');}function a309_0x1672(){const _0x5aa74c=['matchAll','unavailable','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','left','inner','full','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','covered','add','from','search','alias','2744824ArFcvy','sql','columns','index','cross','map','2925830IhmcDO','tableName','test','length','replaceAll','unknown','push','__sq__','position','unsupportedPredicate','exec','745965hYgOFV','match','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','\x5cs*\x5c.\x5cs*[\x5cw$]+','138550DAADID','join','min','toLowerCase','warning','814422qhNTrz','(?:^|[^\x5cw$])','table','endsWith','1985108oUBKFg','max','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','toUpperCase','matchedPrefix','73989QiEZEt','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','unsupportedReason','replace','has','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','slice','\x5c$&','filter','containsUnresolvedInclude','INDEX_METADATA_UNAVAILABLE','sort','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','includes','metadataAvailable','trim','right','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','7Flgqgd','4fFDLtI','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','some','error','startsWith','indexes','split','240ADrUOO'];a309_0x1672=function(){return _0x5aa74c;};return a309_0x1672();}function splitTopLevelAnd(_0x29d705){const _0x7f29fd=a309_0x35f1,_0x20ea7=[];let _0x173555=0x0,_0x44d971=0x0;for(let _0x43068d=0x0;_0x43068d<_0x29d705['length'];_0x43068d+=0x1){const _0x1cfaed=_0x29d705[_0x43068d];if(_0x1cfaed==='(')_0x173555+=0x1;if(_0x1cfaed===')')_0x173555=Math['max'](0x0,_0x173555-0x1);_0x173555===0x0&&_0x29d705[_0x7f29fd(0xa5)](_0x43068d)[_0x7f29fd(0xd8)](/^AND\b/i)&&(_0x43068d===0x0||/\s/[_0x7f29fd(0xce)](_0x29d705[_0x43068d-0x1]??''))&&(_0x20ea7['push'](_0x29d705['slice'](_0x44d971,_0x43068d)[_0x7f29fd(0xae)]()),_0x43068d+=0x2,_0x44d971=_0x43068d+0x1);}const _0x420003=_0x29d705[_0x7f29fd(0xa5)](_0x44d971)['trim']();if(_0x420003)_0x20ea7[_0x7f29fd(0xd2)](_0x420003);return _0x20ea7;}function hasTopLevelKeyword(_0x55ac4e,_0xada280){const _0x474b98=a309_0x35f1;let _0x18095f=0x0;for(let _0x22e8ca=0x0;_0x22e8ca<_0x55ac4e[_0x474b98(0xcf)];_0x22e8ca+=0x1){const _0x22d397=_0x55ac4e[_0x22e8ca];if(_0x22d397==='(')_0x18095f+=0x1;if(_0x22d397===')')_0x18095f=Math['max'](0x0,_0x18095f-0x1);if(_0x18095f!==0x0)continue;const _0x18ac79=_0x55ac4e[_0x474b98(0xa5)](_0x22e8ca,_0x22e8ca+_0xada280['length']),_0x24b323=_0x55ac4e[_0x22e8ca-0x1]??'\x20',_0x3b7f2b=_0x55ac4e[_0x22e8ca+_0xada280[_0x474b98(0xcf)]]??'\x20';if(_0x18ac79[_0x474b98(0xe7)]()===_0xada280[_0x474b98(0xe7)]()&&!/[\w$]/[_0x474b98(0xce)](_0x24b323)&&!/[\w$]/[_0x474b98(0xce)](_0x3b7f2b))return!![];}return![];}function splitEquality(_0x40482a){const _0x25c049=a309_0x35f1,_0x4c7dd4=stripOuterParentheses(_0x40482a);let _0x19ee01=0x0,_0x5e58fc;for(let _0x2dda0f=0x0;_0x2dda0f<_0x4c7dd4['length'];_0x2dda0f+=0x1){const _0x2f8e83=_0x4c7dd4[_0x2dda0f];if(_0x2f8e83==='(')_0x19ee01+=0x1;if(_0x2f8e83===')')_0x19ee01=Math['max'](0x0,_0x19ee01-0x1);const _0xc9b03e=_0x4c7dd4[_0x2dda0f-0x1]??'',_0x50d4d1=_0x4c7dd4[_0x2dda0f+0x1]??'';if(_0x2f8e83==='='&&_0x19ee01===0x0&&!/[!<>=:]/[_0x25c049(0xce)](_0xc9b03e)&&_0x50d4d1!=='='){if(_0x5e58fc!==undefined)return null;_0x5e58fc=_0x2dda0f;}}return _0x5e58fc===undefined?null:[_0x4c7dd4[_0x25c049(0xa5)](0x0,_0x5e58fc)[_0x25c049(0xae)](),_0x4c7dd4['slice'](_0x5e58fc+0x1)[_0x25c049(0xae)]()];}function parseDirectColumnReference(_0x337c26,_0x1cc104){const _0x2eba33=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x337c26));if(!_0x2eba33)return null;if(normalizeIdentifier(_0x2eba33[0x1]??'')!==normalizeIdentifier(_0x1cc104))return null;return normalizeIdentifier(_0x2eba33[0x2]??'');}function a309_0x35f1(_0x2972f2,_0x5e4e86){_0x2972f2=_0x2972f2-0xa5;const _0x16726b=a309_0x1672();let _0x35f1a5=_0x16726b[_0x2972f2];return _0x35f1a5;}function containsColumnReference(_0x5eb15e,_0x113845){const _0x48b76e=a309_0x35f1,_0x1837aa=_0x5eb15e[_0x48b76e(0xec)](/[`"]/g,''),_0x459088=_0x113845['replace'](/[.*+?^${}()|[\]\\]/g,_0x48b76e(0xa6));return new RegExp(_0x48b76e(0xe1)+_0x459088+_0x48b76e(0xda),'i')[_0x48b76e(0xce)](_0x1837aa);}function findEqualityPrefix(_0xb981ae,_0x3ec6df){const _0x423f14=a309_0x35f1,_0x5e558e=new Set(_0x3ec6df[_0x423f14(0xcb)](normalizeIdentifier)),_0x53613b=[];for(const _0x2ba0d2 of _0xb981ae){if(!_0x5e558e['has'](normalizeIdentifier(_0x2ba0d2)))break;_0x53613b[_0x423f14(0xd2)](_0x2ba0d2);}return _0x53613b;}function resolveTableMetadata(_0x184aff,_0x267351){const _0x25f9ff=a309_0x35f1,_0x41eb29=normalizeIdentifier(_0x267351),_0x191f4f=_0x184aff[_0x25f9ff(0xa7)](_0x3797df=>normalizeIdentifier(_0x3797df[_0x25f9ff(0xcd)])===_0x41eb29);if(_0x191f4f['length']===0x1)return _0x191f4f[0x0];const _0x22a68e=_0x41eb29[_0x25f9ff(0xac)]('.'),_0x1facb0=_0x41eb29[_0x25f9ff(0xb8)]('.')['at'](-0x1),_0x3feac8=_0x184aff[_0x25f9ff(0xa7)](_0x5ac2c0=>{const _0x528ce8=_0x25f9ff,_0x53f369=normalizeIdentifier(_0x5ac2c0[_0x528ce8(0xcd)]);if(_0x22a68e&&_0x53f369['includes']('.'))return![];return _0x53f369[_0x528ce8(0xb8)]('.')['at'](-0x1)===_0x1facb0;});return _0x3feac8[_0x25f9ff(0xcf)]===0x1?_0x3feac8[0x0]:undefined;}function columnNamesMatch(_0x27ca9b,_0x18f713){return normalizeIdentifier(_0x27ca9b)===normalizeIdentifier(_0x18f713);}function normalizeIdentifier(_0x6146ac){const _0x1a9fcf=a309_0x35f1;return _0x6146ac[_0x1a9fcf(0xec)](/[`"]/g,'')[_0x1a9fcf(0xae)]()[_0x1a9fcf(0xde)]();}function isSqlClauseKeyword(_0xc82cb0){const _0x22367b=a309_0x35f1;return new Set(['on','using','where','join',_0x22367b(0xbe),_0x22367b(0xbd),_0x22367b(0xaf),_0x22367b(0xbf),_0x22367b(0xca),'natural'])[_0x22367b(0xed)](_0xc82cb0);}function stripOuterParentheses(_0x2a1c58){const _0x4c7981=a309_0x35f1;let _0x1b4430=_0x2a1c58[_0x4c7981(0xae)]();while(_0x1b4430[_0x4c7981(0xb6)]('(')&&_0x1b4430[_0x4c7981(0xe3)](')')){let _0x2fda0f=0x0,_0x3e247e=!![];for(let _0x36829e=0x0;_0x36829e<_0x1b4430['length'];_0x36829e+=0x1){if(_0x1b4430[_0x36829e]==='(')_0x2fda0f+=0x1;if(_0x1b4430[_0x36829e]===')')_0x2fda0f-=0x1;if(_0x2fda0f===0x0&&_0x36829e<_0x1b4430[_0x4c7981(0xcf)]-0x1){_0x3e247e=![];break;}}if(!_0x3e247e||_0x2fda0f!==0x0)break;_0x1b4430=_0x1b4430[_0x4c7981(0xa5)](0x1,-0x1)[_0x4c7981(0xae)]();}return _0x1b4430;}
|
|
1
|
+
(function(_0x6b4829,_0x23a490){const _0x4d9f74=a309_0x236a,_0x27a485=_0x6b4829();while(!![]){try{const _0x4602a6=parseInt(_0x4d9f74(0x1be))/0x1*(parseInt(_0x4d9f74(0x187))/0x2)+-parseInt(_0x4d9f74(0x183))/0x3*(-parseInt(_0x4d9f74(0x1a3))/0x4)+parseInt(_0x4d9f74(0x1b2))/0x5*(-parseInt(_0x4d9f74(0x18f))/0x6)+-parseInt(_0x4d9f74(0x1b6))/0x7*(parseInt(_0x4d9f74(0x17f))/0x8)+-parseInt(_0x4d9f74(0x181))/0x9+-parseInt(_0x4d9f74(0x1ac))/0xa*(parseInt(_0x4d9f74(0x17a))/0xb)+parseInt(_0x4d9f74(0x1af))/0xc*(parseInt(_0x4d9f74(0x1bd))/0xd);if(_0x4602a6===_0x23a490)break;else _0x27a485['push'](_0x27a485['shift']());}catch(_0x110757){_0x27a485['push'](_0x27a485['shift']());}}}(a309_0x3948,0x26290));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x4e9626,_0x28221c){const _0x3ccfaa=a309_0x236a,_0x4e6991=[],_0x23c998=normalizeSqlForStaticAnalysis(_0x4e9626),_0x17c442=(_0x23c998['error']?[]:extractJoinFacts(_0x23c998[_0x3ccfaa(0x1c3)]))['map'](_0x2e04a7=>{const _0x2aa669=_0x3ccfaa;if(_0x2e04a7[_0x2aa669(0x1c1)]||_0x2e04a7[_0x2aa669(0x186)][_0x2aa669(0x1ae)]===0x0)return _0x4e6991[_0x2aa669(0x19d)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x2e04a7['table'],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7['columns'],'reason':_0x2e04a7['unsupportedReason']??_0x2aa669(0x1c6)}),{'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'status':'unavailable'};const _0x1107da=resolveTableMetadata(_0x28221c,_0x2e04a7[_0x2aa669(0x199)]),_0x5b362b=(_0x1107da?.[_0x2aa669(0x17d)]??[])[_0x2aa669(0x193)](_0x1e5798=>({'index':_0x1e5798,'matchedPrefix':findEqualityPrefix(_0x1e5798[_0x2aa669(0x186)],_0x2e04a7[_0x2aa669(0x186)])}))['filter'](_0x3bf898=>_0x3bf898[_0x2aa669(0x192)]['length']>0x0),_0xb7417c=_0x5b362b[_0x2aa669(0x1aa)]((_0x20741a,_0x90d6fa)=>!_0x20741a||_0x90d6fa[_0x2aa669(0x192)][_0x2aa669(0x1ae)]>_0x20741a[_0x2aa669(0x192)][_0x2aa669(0x1ae)]?_0x90d6fa:_0x20741a,_0x5b362b[0x0]);if(_0xb7417c)return{'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7['alias'],'columns':_0x2e04a7[_0x2aa669(0x186)],'status':_0x2aa669(0x1b0),'matchedIndex':{..._0xb7417c['index'],'matchedPrefix':_0xb7417c['matchedPrefix']}};const _0x4944cc=_0x1107da?.[_0x2aa669(0x17d)]['filter'](_0x128192=>_0x128192['columns'][_0x2aa669(0x185)](_0x590086=>_0x2e04a7['columns']['some'](_0x57692c=>columnNamesMatch(_0x590086,_0x57692c))))??[];if(_0x4944cc[_0x2aa669(0x1ae)]>0x0)return _0x4e6991[_0x2aa669(0x19d)]({'code':_0x2aa669(0x1a1),'table':_0x2e04a7['table'],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'reason':_0x2aa669(0x18d)}),{'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'status':_0x2aa669(0x1ba),'candidateIndexes':_0x4944cc};if(_0x1107da&&_0x1107da['metadataAvailable']!==![]&&_0x1107da[_0x2aa669(0x17d)][_0x2aa669(0x1ae)]>0x0&&_0x2e04a7[_0x2aa669(0x186)][_0x2aa669(0x1ae)]>0x0)return _0x4e6991[_0x2aa669(0x19d)]({'code':_0x2aa669(0x18c),'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'reason':_0x2aa669(0x19e)}),{'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'status':_0x2aa669(0x1ba)};return _0x4e6991[_0x2aa669(0x19d)]({'code':_0x2aa669(0x17b),'table':_0x2e04a7[_0x2aa669(0x199)],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7['columns'],'reason':_0x1107da?_0x2aa669(0x1bf):_0x2aa669(0x18b)}),{'table':_0x2e04a7['table'],'alias':_0x2e04a7[_0x2aa669(0x196)],'columns':_0x2e04a7[_0x2aa669(0x186)],'status':_0x2aa669(0x18e)};});return{'checked':_0x17c442[_0x3ccfaa(0x1ae)]>0x0,'joins':_0x17c442,'warnings':_0x4e6991};}function extractJoinFacts(_0xe4a534){const _0x8bcf47=a309_0x236a,_0xea4d43=maskNestedQueries(stripSqlNoise(_0xe4a534)),_0x53dd16=maskQuotedIdentifiers(_0xea4d43),_0x3752b2=[],_0x34d44=new Set(),_0x5c818b=/\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 _0x29c736 of _0xea4d43[_0x8bcf47(0x197)](_0x5c818b)){const _0x582b4a=_0x29c736[_0x8bcf47(0x1a0)]??0x0,_0x43bd7e=_0x29c736[0x0]['search'](/\bJOIN\b/i),_0x550b1e=_0x582b4a+Math[_0x8bcf47(0x1b4)](0x0,_0x43bd7e);if(!/^JOIN\b/i[_0x8bcf47(0x1a5)](_0x53dd16[_0x8bcf47(0x17e)](_0x550b1e)))continue;_0x34d44[_0x8bcf47(0x1b9)](_0x550b1e);const _0x2a21f9=normalizeIdentifier(_0x29c736[0x1]||_0x8bcf47(0x1a8)),_0x40e619=normalizeIdentifier(_0x29c736[0x2]??''),_0x1c4ec4=normalizeIdentifier(_0x29c736[0x3]||_0x40e619['split']('.')['at'](-0x1)||_0x40e619),_0x4d9eaa=[],_0x2ed3b9=_0x40e619==='__sq__';let _0x2d2227=_0x2a21f9===_0x8bcf47(0x1a9)||_0x2a21f9===_0x8bcf47(0x1b3)||_0x2ed3b9,_0xc2cc8=_0x2d2227?_0x2ed3b9?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0x2a21f9[_0x8bcf47(0x198)]()+_0x8bcf47(0x1a4):undefined;const _0x560a45=stripOuterParentheses(_0x29c736[0x4]??''),_0x44de47=_0x560a45['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x560a45[_0x8bcf47(0x188)](MYBATIS_DYNAMIC_END_MARKER),_0xe161d4=_0x560a45[_0x8bcf47(0x188)](MYBATIS_INCLUDE_MARKER);_0x44de47&&(_0x2d2227=!![],_0xc2cc8??=_0x8bcf47(0x1a2));_0xe161d4&&(_0x2d2227=!![],_0xc2cc8??=_0x8bcf47(0x19a));const _0x47b5de=_0x560a45[_0x8bcf47(0x1c5)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x8bcf47(0x1c5)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x47b5de,'OR')&&(_0x2d2227=!![],_0xc2cc8??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x3ce247 of splitTopLevelAnd(_0x47b5de)){const _0x4e5671=stripOuterParentheses(_0x3ce247);if(hasTopLevelKeyword(_0x4e5671,'OR')){_0x2d2227=!![],_0xc2cc8??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x9c8d48=splitEquality(_0x4e5671);if(!_0x9c8d48){containsColumnReference(_0x3ce247,_0x1c4ec4)&&(_0x2d2227=!![]);continue;}const _0x4e3208=parseDirectColumnReference(_0x9c8d48[0x0],_0x1c4ec4),_0x9e0b64=parseDirectColumnReference(_0x9c8d48[0x1],_0x1c4ec4),_0x183c90=containsColumnReference(_0x9c8d48[0x0],_0x1c4ec4),_0x4d84d4=containsColumnReference(_0x9c8d48[0x1],_0x1c4ec4),_0x3e4a56=_0x4e3208&&!_0x4d84d4?_0x4e3208:_0x9e0b64&&!_0x183c90?_0x9e0b64:null;if(_0x3e4a56&&!_0x4d9eaa[_0x8bcf47(0x188)](_0x3e4a56))_0x4d9eaa[_0x8bcf47(0x19d)](_0x3e4a56);else!_0x3e4a56&&containsColumnReference(_0x3ce247,_0x1c4ec4)&&(_0x2d2227=!![]);}_0x3752b2['push']({'table':_0x40e619,'alias':_0x1c4ec4,'columns':_0x4d9eaa,'unsupportedPredicate':_0x2d2227,'unsupportedReason':_0xc2cc8,'containsUnresolvedInclude':_0xe161d4,'position':_0x550b1e});}for(const _0x39eb93 of _0x53dd16[_0x8bcf47(0x197)](/\bJOIN\b/gi)){const _0x2fbe5e=_0x39eb93[_0x8bcf47(0x1a0)]??0x0;if(_0x34d44['has'](_0x2fbe5e))continue;const _0x281ecc=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x8bcf47(0x1b7)](_0xea4d43[_0x8bcf47(0x17e)](_0x2fbe5e+_0x39eb93[0x0][_0x8bcf47(0x1ae)])),_0x4491e8=normalizeIdentifier(_0x281ecc?.[0x1]||_0x8bcf47(0x18a)),_0xd889b9=normalizeIdentifier(_0x281ecc?.[0x2]||''),_0x51f5ec=isSqlClauseKeyword(_0xd889b9)?_0x4491e8[_0x8bcf47(0x1bc)]('.')['at'](-0x1)||_0x4491e8:_0xd889b9||_0x4491e8['split']('.')['at'](-0x1)||_0x4491e8;_0x3752b2[_0x8bcf47(0x19d)]({'table':_0x4491e8,'alias':_0x51f5ec,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x8bcf47(0x194),'position':_0x2fbe5e});}const _0x486bee=_0x53dd16[_0x8bcf47(0x1a7)](MYBATIS_INCLUDE_MARKER);return _0x486bee>=0x0&&!_0x3752b2[_0x8bcf47(0x185)](_0x2df61e=>_0x2df61e[_0x8bcf47(0x180)])&&_0x3752b2[_0x8bcf47(0x19d)]({'table':_0x8bcf47(0x18a),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0x486bee}),_0x3752b2[_0x8bcf47(0x1c2)]((_0x2651d5,_0x182d56)=>_0x2651d5[_0x8bcf47(0x184)]-_0x182d56[_0x8bcf47(0x184)]);}function a309_0x3948(){const _0x35d0ba=['250248ceZzFX','covered','has','7120APELRB','full','max','inner','14rsYIRP','exec','cross','add','warning','\x5c$&','split','377kBNcrt','628LBioMJ','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','from','unsupportedPredicate','sort','sql','\x5cs*\x5c.\x5cs*[\x5cw$]+','replaceAll','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','56111FRffkG','INDEX_METADATA_UNAVAILABLE','where','indexes','slice','1114184uLUuSW','containsUnresolvedInclude','920880cxbgmS','tableName','27WUSRws','position','some','columns','508AsgexC','includes','match','unknown','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','JOIN_INDEX_MISSING','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','unavailable','72MBMmph','join','min','matchedPrefix','map','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','toLowerCase','alias','matchAll','toUpperCase','table','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','filter','trim','push','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','(?:^|[^\x5cw$])','index','JOIN_INDEX_NOT_USABLE','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','13212ruzOMV','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','test','replace','indexOf','INNER','right','reduce','natural','470gdomBn','using','length'];a309_0x3948=function(){return _0x35d0ba;};return a309_0x3948();}function stripSqlNoise(_0x437188){const _0x22181a=a309_0x236a,_0x47e114=Array[_0x22181a(0x1c0)](_0x437188),_0xcf5850=(_0x59cb59,_0x3829a7)=>{for(let _0x5ccc10=_0x59cb59;_0x5ccc10<_0x3829a7;_0x5ccc10+=0x1){_0x47e114[_0x5ccc10]!=='\x0a'&&_0x47e114[_0x5ccc10]!=='\x0d'&&(_0x47e114[_0x5ccc10]='\x20');}};for(let _0x3f61df=0x0;_0x3f61df<_0x47e114['length'];_0x3f61df+=0x1){const _0x504d00=_0x47e114[_0x3f61df],_0x2887da=_0x47e114[_0x3f61df+0x1];if(_0x504d00==='\x27'||_0x504d00==='\x22'||_0x504d00==='`'){const _0x2769a2=_0x504d00,_0x5c520b=_0x3f61df;_0x3f61df+=0x1;while(_0x3f61df<_0x47e114[_0x22181a(0x1ae)]){if(_0x47e114[_0x3f61df]==='\x5c'&&_0x3f61df+0x1<_0x47e114[_0x22181a(0x1ae)]){_0x3f61df+=0x2;continue;}if(_0x47e114[_0x3f61df]!==_0x2769a2){_0x3f61df+=0x1;continue;}if(_0x47e114[_0x3f61df+0x1]===_0x2769a2){_0x3f61df+=0x2;continue;}break;}if(_0x2769a2==='\x27')_0xcf5850(_0x5c520b,Math['min'](_0x3f61df+0x1,_0x47e114[_0x22181a(0x1ae)]));continue;}if(_0x504d00==='-'&&_0x2887da==='-'){const _0x54ce62=_0x3f61df;while(_0x3f61df<_0x47e114[_0x22181a(0x1ae)]&&_0x47e114[_0x3f61df]!=='\x0a')_0x3f61df+=0x1;_0xcf5850(_0x54ce62,_0x3f61df);continue;}if(_0x504d00==='/'&&_0x2887da==='*'){const _0x424338=_0x3f61df;_0x3f61df+=0x2;while(_0x3f61df<_0x47e114[_0x22181a(0x1ae)]&&!(_0x47e114[_0x3f61df]==='*'&&_0x47e114[_0x3f61df+0x1]==='/')){_0x3f61df+=0x1;}_0x3f61df=Math[_0x22181a(0x191)](_0x3f61df+0x1,_0x47e114[_0x22181a(0x1ae)]-0x1),_0xcf5850(_0x424338,_0x3f61df+0x1);continue;}if(_0x504d00==='#'&&_0x2887da!=='{'){const _0xc6d546=_0x3f61df;while(_0x3f61df<_0x47e114[_0x22181a(0x1ae)]&&_0x47e114[_0x3f61df]!=='\x0a')_0x3f61df+=0x1;_0xcf5850(_0xc6d546,_0x3f61df);continue;}if((_0x504d00==='#'||_0x504d00==='$')&&_0x2887da==='{'){const _0x5bf4e7=_0x3f61df;_0x3f61df+=0x2;while(_0x3f61df<_0x47e114[_0x22181a(0x1ae)]&&_0x47e114[_0x3f61df]!=='}')_0x3f61df+=0x1;_0xcf5850(_0x5bf4e7,Math[_0x22181a(0x191)](_0x3f61df+0x1,_0x47e114['length']));}}return _0x47e114['join']('');}function maskQuotedIdentifiers(_0x34724e){const _0x1ca1d1=a309_0x236a,_0xc9d6ac=Array['from'](_0x34724e);for(let _0x50e7d1=0x0;_0x50e7d1<_0xc9d6ac[_0x1ca1d1(0x1ae)];_0x50e7d1+=0x1){const _0x17e968=_0xc9d6ac[_0x50e7d1];if(_0x17e968!=='\x22'&&_0x17e968!=='`')continue;_0x50e7d1+=0x1;while(_0x50e7d1<_0xc9d6ac['length']){if(_0xc9d6ac[_0x50e7d1]===_0x17e968){if(_0xc9d6ac[_0x50e7d1+0x1]===_0x17e968){_0xc9d6ac[_0x50e7d1]='\x20',_0xc9d6ac[_0x50e7d1+0x1]='\x20',_0x50e7d1+=0x2;continue;}break;}_0xc9d6ac[_0x50e7d1]='\x20',_0x50e7d1+=0x1;}}return _0xc9d6ac[_0x1ca1d1(0x190)]('');}function maskNestedQueries(_0x54bafb){const _0x1f3964=a309_0x236a,_0x49effa=Array[_0x1f3964(0x1c0)](_0x54bafb);for(let _0x2bbaa6=0x0;_0x2bbaa6<_0x49effa[_0x1f3964(0x1ae)];_0x2bbaa6+=0x1){if(_0x49effa[_0x2bbaa6]!=='(')continue;const _0xf04c53=_0x54bafb[_0x1f3964(0x17e)](_0x2bbaa6+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x1f3964(0x1a5)](_0xf04c53))continue;let _0x3028e8=0x1,_0x5ec51d=_0x2bbaa6+0x1;for(;_0x5ec51d<_0x49effa[_0x1f3964(0x1ae)]&&_0x3028e8>0x0;_0x5ec51d+=0x1){if(_0x49effa[_0x5ec51d]==='(')_0x3028e8+=0x1;if(_0x49effa[_0x5ec51d]===')')_0x3028e8-=0x1;}if(_0x3028e8!==0x0)continue;for(let _0x1cc616=_0x2bbaa6;_0x1cc616<_0x5ec51d;_0x1cc616+=0x1){_0x49effa[_0x1cc616]='\x20';}const _0x79eff0='__sq__';for(let _0x2ada1b=0x0;_0x2ada1b<_0x79eff0[_0x1f3964(0x1ae)]&&_0x2bbaa6+_0x2ada1b<_0x5ec51d;_0x2ada1b+=0x1){_0x49effa[_0x2bbaa6+_0x2ada1b]=_0x79eff0[_0x2ada1b];}_0x2bbaa6=_0x5ec51d-0x1;}return _0x49effa[_0x1f3964(0x190)]('');}function splitTopLevelAnd(_0x31ae53){const _0x3dd9ed=a309_0x236a,_0x2259bb=[];let _0x2f4f03=0x0,_0x6414b9=0x0;for(let _0x2c77df=0x0;_0x2c77df<_0x31ae53['length'];_0x2c77df+=0x1){const _0x52fed3=_0x31ae53[_0x2c77df];if(_0x52fed3==='(')_0x2f4f03+=0x1;if(_0x52fed3===')')_0x2f4f03=Math[_0x3dd9ed(0x1b4)](0x0,_0x2f4f03-0x1);_0x2f4f03===0x0&&_0x31ae53[_0x3dd9ed(0x17e)](_0x2c77df)[_0x3dd9ed(0x189)](/^AND\b/i)&&(_0x2c77df===0x0||/\s/[_0x3dd9ed(0x1a5)](_0x31ae53[_0x2c77df-0x1]??''))&&(_0x2259bb['push'](_0x31ae53[_0x3dd9ed(0x17e)](_0x6414b9,_0x2c77df)[_0x3dd9ed(0x19c)]()),_0x2c77df+=0x2,_0x6414b9=_0x2c77df+0x1);}const _0x175212=_0x31ae53[_0x3dd9ed(0x17e)](_0x6414b9)[_0x3dd9ed(0x19c)]();if(_0x175212)_0x2259bb['push'](_0x175212);return _0x2259bb;}function hasTopLevelKeyword(_0x578770,_0x4b31b3){const _0x5c8867=a309_0x236a;let _0x3e6803=0x0;for(let _0x24e680=0x0;_0x24e680<_0x578770[_0x5c8867(0x1ae)];_0x24e680+=0x1){const _0x3f5756=_0x578770[_0x24e680];if(_0x3f5756==='(')_0x3e6803+=0x1;if(_0x3f5756===')')_0x3e6803=Math['max'](0x0,_0x3e6803-0x1);if(_0x3e6803!==0x0)continue;const _0x206add=_0x578770[_0x5c8867(0x17e)](_0x24e680,_0x24e680+_0x4b31b3['length']),_0x2d913b=_0x578770[_0x24e680-0x1]??'\x20',_0xeae871=_0x578770[_0x24e680+_0x4b31b3[_0x5c8867(0x1ae)]]??'\x20';if(_0x206add[_0x5c8867(0x198)]()===_0x4b31b3[_0x5c8867(0x198)]()&&!/[\w$]/['test'](_0x2d913b)&&!/[\w$]/[_0x5c8867(0x1a5)](_0xeae871))return!![];}return![];}function splitEquality(_0x41ffd4){const _0x59406c=a309_0x236a,_0x22f496=stripOuterParentheses(_0x41ffd4);let _0x4d518f=0x0,_0x59f5a2;for(let _0xb8847a=0x0;_0xb8847a<_0x22f496[_0x59406c(0x1ae)];_0xb8847a+=0x1){const _0x553e3c=_0x22f496[_0xb8847a];if(_0x553e3c==='(')_0x4d518f+=0x1;if(_0x553e3c===')')_0x4d518f=Math[_0x59406c(0x1b4)](0x0,_0x4d518f-0x1);const _0x562c96=_0x22f496[_0xb8847a-0x1]??'',_0x4d38d5=_0x22f496[_0xb8847a+0x1]??'';if(_0x553e3c==='='&&_0x4d518f===0x0&&!/[!<>=:]/['test'](_0x562c96)&&_0x4d38d5!=='='){if(_0x59f5a2!==undefined)return null;_0x59f5a2=_0xb8847a;}}return _0x59f5a2===undefined?null:[_0x22f496[_0x59406c(0x17e)](0x0,_0x59f5a2)['trim'](),_0x22f496['slice'](_0x59f5a2+0x1)[_0x59406c(0x19c)]()];}function parseDirectColumnReference(_0x4677b7,_0x24da14){const _0x28dab9=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x4677b7));if(!_0x28dab9)return null;if(normalizeIdentifier(_0x28dab9[0x1]??'')!==normalizeIdentifier(_0x24da14))return null;return normalizeIdentifier(_0x28dab9[0x2]??'');}function containsColumnReference(_0x113b0d,_0x1ac1a4){const _0xfe02f2=a309_0x236a,_0x2ccd77=_0x113b0d[_0xfe02f2(0x1a6)](/[`"]/g,''),_0x301878=_0x1ac1a4[_0xfe02f2(0x1a6)](/[.*+?^${}()|[\]\\]/g,_0xfe02f2(0x1bb));return new RegExp(_0xfe02f2(0x19f)+_0x301878+_0xfe02f2(0x1c4),'i')[_0xfe02f2(0x1a5)](_0x2ccd77);}function findEqualityPrefix(_0x457f70,_0x46fddd){const _0x1e86e4=a309_0x236a,_0x207206=new Set(_0x46fddd['map'](normalizeIdentifier)),_0xdbdfe9=[];for(const _0x5c94dd of _0x457f70){if(!_0x207206[_0x1e86e4(0x1b1)](normalizeIdentifier(_0x5c94dd)))break;_0xdbdfe9[_0x1e86e4(0x19d)](_0x5c94dd);}return _0xdbdfe9;}function resolveTableMetadata(_0x482d58,_0x3ce158){const _0x127a01=a309_0x236a,_0x9cfc4=normalizeIdentifier(_0x3ce158),_0x2d0a26=_0x482d58[_0x127a01(0x19b)](_0x40b180=>normalizeIdentifier(_0x40b180['tableName'])===_0x9cfc4);if(_0x2d0a26[_0x127a01(0x1ae)]===0x1)return _0x2d0a26[0x0];const _0x340aae=_0x9cfc4[_0x127a01(0x188)]('.'),_0x3add60=_0x9cfc4[_0x127a01(0x1bc)]('.')['at'](-0x1),_0xcfb3a3=_0x482d58[_0x127a01(0x19b)](_0x1242a4=>{const _0x20c6e4=_0x127a01,_0x4b12ef=normalizeIdentifier(_0x1242a4[_0x20c6e4(0x182)]);if(_0x340aae&&_0x4b12ef[_0x20c6e4(0x188)]('.'))return![];return _0x4b12ef[_0x20c6e4(0x1bc)]('.')['at'](-0x1)===_0x3add60;});return _0xcfb3a3[_0x127a01(0x1ae)]===0x1?_0xcfb3a3[0x0]:undefined;}function columnNamesMatch(_0x599171,_0xa0a93d){return normalizeIdentifier(_0x599171)===normalizeIdentifier(_0xa0a93d);}function a309_0x236a(_0x35bfe0,_0x402829){_0x35bfe0=_0x35bfe0-0x17a;const _0x39487f=a309_0x3948();let _0x236a2a=_0x39487f[_0x35bfe0];return _0x236a2a;}function normalizeIdentifier(_0x2af80b){const _0x312740=a309_0x236a;return _0x2af80b[_0x312740(0x1a6)](/[`"]/g,'')[_0x312740(0x19c)]()[_0x312740(0x195)]();}function isSqlClauseKeyword(_0x209ac5){const _0x283562=a309_0x236a;return new Set(['on',_0x283562(0x1ad),_0x283562(0x17c),'join',_0x283562(0x1b5),'left',_0x283562(0x1a9),_0x283562(0x1b3),_0x283562(0x1b8),_0x283562(0x1ab)])['has'](_0x209ac5);}function stripOuterParentheses(_0x40bcb6){const _0x3169ee=a309_0x236a;let _0x30f1a0=_0x40bcb6[_0x3169ee(0x19c)]();while(_0x30f1a0['startsWith']('(')&&_0x30f1a0['endsWith'](')')){let _0x499bc2=0x0,_0xf04ae1=!![];for(let _0x38f280=0x0;_0x38f280<_0x30f1a0['length'];_0x38f280+=0x1){if(_0x30f1a0[_0x38f280]==='(')_0x499bc2+=0x1;if(_0x30f1a0[_0x38f280]===')')_0x499bc2-=0x1;if(_0x499bc2===0x0&&_0x38f280<_0x30f1a0['length']-0x1){_0xf04ae1=![];break;}}if(!_0xf04ae1||_0x499bc2!==0x0)break;_0x30f1a0=_0x30f1a0['slice'](0x1,-0x1)['trim']();}return _0x30f1a0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a310_0x5a482c=a310_0x3d42;(function(_0x1dd941,_0x598616){const _0x6aa24=a310_0x3d42,_0x3978ed=_0x1dd941();while(!![]){try{const _0x2fe6c2=parseInt(_0x6aa24(0x1dd))/0x1*(-parseInt(_0x6aa24(0x1d7))/0x2)+-parseInt(_0x6aa24(0x1de))/0x3+-parseInt(_0x6aa24(0x1e0))/0x4*(-parseInt(_0x6aa24(0x1e2))/0x5)+-parseInt(_0x6aa24(0x1db))/0x6*(parseInt(_0x6aa24(0x1df))/0x7)+parseInt(_0x6aa24(0x1da))/0x8+-parseInt(_0x6aa24(0x1e1))/0x9*(parseInt(_0x6aa24(0x1d8))/0xa)+-parseInt(_0x6aa24(0x1d9))/0xb*(-parseInt(_0x6aa24(0x1dc))/0xc);if(_0x2fe6c2===_0x598616)break;else _0x3978ed['push'](_0x3978ed['shift']());}catch(_0x38e635){_0x3978ed['push'](_0x3978ed['shift']());}}}(a310_0x1179,0x7f6eb));function a310_0x3d42(_0x414640,_0x41d9cf){_0x414640=_0x414640-0x1d6;const _0x1179d6=a310_0x1179();let _0x3d425e=_0x1179d6[_0x414640];return _0x3d425e;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a310_0x5a482c(0x1d6),LOCK_FILE_NAME='sql.lock.json',TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x16c7f4,_0x38a5d1){const _0x1128c5=a310_0x5a482c,_0x30ac89=resolve(_0x38a5d1??findProjectRootDirectory()),_0x177575=DOT_DIR+'/sql',_0x5431fd=_0x177575+'/'+_0x16c7f4;return{'projectRoot':_0x30ac89,'appCode':_0x16c7f4,'sqlWorkspaceRoot':_0x177575,'sqlRoot':_0x5431fd,'sqlRootDir':resolve(_0x30ac89,DOT_DIR,_0x1128c5(0x1e3),_0x16c7f4),'lockFilePath':resolve(_0x30ac89,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x30ac89,DOT_DIR,TRASH_DIR_NAME)};}function a310_0x1179(){const _0x2fe1c6=['sql','.rabetbase','1042icnrYC','390oHSiGR','11AIZOou','8296536PJlDLZ','81102BzHQoX','14890884wiLqHz','854JubQfY','2681331DZqUod','154tTBKfK','1436kjUtBW','78957XSIgRY','3095cHkyZp'];a310_0x1179=function(){return _0x2fe1c6;};return a310_0x1179();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x319de4,_0x54e42f){const _0x6ad21e=a311_0xd79b,_0x719572=_0x319de4();while(!![]){try{const _0x5ec638=-parseInt(_0x6ad21e(0x174))/0x1+-parseInt(_0x6ad21e(0x16e))/0x2*(-parseInt(_0x6ad21e(0x15c))/0x3)+-parseInt(_0x6ad21e(0x161))/0x4*(-parseInt(_0x6ad21e(0x169))/0x5)+-parseInt(_0x6ad21e(0x15a))/0x6*(-parseInt(_0x6ad21e(0x172))/0x7)+parseInt(_0x6ad21e(0x159))/0x8+parseInt(_0x6ad21e(0x15e))/0x9*(-parseInt(_0x6ad21e(0x158))/0xa)+parseInt(_0x6ad21e(0x16f))/0xb*(-parseInt(_0x6ad21e(0x164))/0xc);if(_0x5ec638===_0x54e42f)break;else _0x719572['push'](_0x719572['shift']());}catch(_0xdc2bc1){_0x719572['push'](_0x719572['shift']());}}}(a311_0x1188,0x7be37));import{readdir,stat}from'node:fs/promises';function a311_0xd79b(_0x1d8d49,_0x4c5009){_0x1d8d49=_0x1d8d49-0x158;const _0x1188ee=a311_0x1188();let _0xd79bb0=_0x1188ee[_0x1d8d49];return _0xd79bb0;}import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x3625d0){const _0x3829f5=a311_0xd79b;if(_0x3625d0==='.sql')return _0x3829f5(0x15f);if(_0x3625d0===_0x3829f5(0x173))return'mybatisXml';return undefined;}function a311_0x1188(){const _0x482bf2=['name','217870eynnMR','split','push','toLowerCase','ENOENT','44818NEmdlL','2348588KpcHHq','sqlRootDir','sqlCode','5748848ZdjOJe','.xml','316555rFvsGC','sqlName','isFile','filter','10BfjpuX','6126336VGGyAx','6lmPBYH','isDirectory','63EAlKLB','mode','5416587AmCSUt','sql','slice','40qhHvLE','test','dbName','60jDQDxW','path','length','replace'];a311_0x1188=function(){return _0x482bf2;};return a311_0x1188();}async function scanSqlFilesRecursively(_0x4a9fb5,_0x38607a){const _0x2957f3=a311_0xd79b,_0x39c1f0=[];try{const _0x447bc8=await readdir(_0x4a9fb5,{'withFileTypes':!![]});for(const _0x4e9fcd of _0x447bc8){const _0x4e54ce=join(_0x4a9fb5,_0x4e9fcd[_0x2957f3(0x168)]);if(_0x4e9fcd['isDirectory']()){_0x39c1f0[_0x2957f3(0x16b)](...await scanSqlFilesRecursively(_0x4e54ce,_0x38607a));continue;}if(!_0x4e9fcd[_0x2957f3(0x176)]())continue;const _0x4ab4d8=extname(_0x4e9fcd[_0x2957f3(0x168)])[_0x2957f3(0x16c)](),_0x2ea168=extensionToMode(_0x4ab4d8);if(!_0x2ea168)continue;const _0x10bf9c=relative(_0x38607a,_0x4e54ce)[_0x2957f3(0x167)](/\\/g,'/'),_0x37b161=_0x10bf9c[_0x2957f3(0x16a)]('/')[_0x2957f3(0x177)](Boolean),_0x16f2a3=parseSqlPath(_0x37b161,_0x4e9fcd[_0x2957f3(0x168)],_0x4ab4d8);if(!_0x16f2a3)continue;_0x39c1f0['push']({'sqlCode':_0x16f2a3[_0x2957f3(0x171)],'sqlName':_0x16f2a3[_0x2957f3(0x175)],'dbDirectory':_0x37b161[0x0],'filePath':_0x4e54ce,'relativePath':_0x10bf9c,'lockKey':_0x16f2a3[_0x2957f3(0x171)],'mode':_0x2ea168});}}catch(_0x3a68dd){if(_0x3a68dd['code']!==_0x2957f3(0x16d))throw _0x3a68dd;}return _0x39c1f0;}export async function scanLocalSqlQueries(_0x47872d){const _0x79638=a311_0xd79b;return scanSqlFilesRecursively(_0x47872d[_0x79638(0x170)],_0x47872d[_0x79638(0x170)]);}export function resolveLocalSqlFilePath(_0x14f7a5,_0x3a9c40,_0x5c28f1){const _0x94969=a311_0xd79b,_0x39d891=_0x5c28f1?.[_0x94969(0x165)]||(_0x5c28f1?.[_0x94969(0x175)]||_0x5c28f1?.[_0x94969(0x163)]?buildSqlRelativePath(_0x3a9c40,_0x5c28f1?.[_0x94969(0x175)],_0x5c28f1?.[_0x94969(0x163)],_0x5c28f1?.[_0x94969(0x15d)]||_0x94969(0x15f),_0x5c28f1?.['dbId']):buildDefaultSqlFileName(_0x3a9c40,_0x5c28f1?.['mode']||'sql'));return join(_0x14f7a5[_0x94969(0x170)],_0x39d891);}export async function directoryExists(_0x507962){const _0x54d512=a311_0xd79b;try{const _0x2c4b01=await stat(_0x507962);return _0x2c4b01[_0x54d512(0x15b)]();}catch{return![];}}function parseSqlPath(_0x589d94,_0x2fe341,_0x28d1db){const _0x1c202d=a311_0xd79b,_0x3b33af=_0x2fe341[_0x1c202d(0x160)](0x0,-_0x28d1db[_0x1c202d(0x166)]);if(_0x589d94[_0x1c202d(0x166)]<0x2)return null;const _0x89fa8d=_0x3b33af['indexOf']('_');if(_0x89fa8d<=0x0||_0x89fa8d>=_0x3b33af[_0x1c202d(0x166)]-0x1)return null;const _0x3b4f8b=_0x3b33af[_0x1c202d(0x160)](0x0,_0x89fa8d);if(!isLikelySqlCode(_0x3b4f8b))return null;return{'sqlCode':_0x3b4f8b,'sqlName':_0x3b33af['slice'](_0x89fa8d+0x1)};}function isLikelySqlCode(_0x3e136d){const _0xa98784=a311_0xd79b;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0xa98784(0x162)](_0x3e136d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x22e0cc,_0x370ec4){const _0xae704=a312_0x2f17,_0x46509a=_0x22e0cc();while(!![]){try{const _0x34ec17=parseInt(_0xae704(0x1c9))/0x1+-parseInt(_0xae704(0x1ce))/0x2+parseInt(_0xae704(0x1cf))/0x3+parseInt(_0xae704(0x1c3))/0x4*(parseInt(_0xae704(0x1c7))/0x5)+-parseInt(_0xae704(0x1cc))/0x6+parseInt(_0xae704(0x1c4))/0x7*(-parseInt(_0xae704(0x1cd))/0x8)+parseInt(_0xae704(0x1cb))/0x9;if(_0x34ec17===_0x370ec4)break;else _0x46509a['push'](_0x46509a['shift']());}catch(_0x4380b2){_0x46509a['push'](_0x46509a['shift']());}}}(a312_0xc283,0x53529));function a312_0x2f17(_0x53807f,_0x42216e){_0x53807f=_0x53807f-0x1c3;const _0xc2838e=a312_0xc283();let _0x2f17d7=_0xc2838e[_0x53807f];return _0x2f17d7;}import{readFile}from'node:fs/promises';import a312_0x16c4ec from'node:crypto';export function computeSqlContentHash(_0x10aa7f){const _0x480a0a=a312_0x2f17;return a312_0x16c4ec[_0x480a0a(0x1d0)](_0x480a0a(0x1c8))[_0x480a0a(0x1c5)](_0x10aa7f)[_0x480a0a(0x1c6)](_0x480a0a(0x1ca));}export async function computeSqlFileHash(_0x207df){const _0x5dba9e=a312_0x2f17,_0x46fcb5=await readFile(_0x207df,_0x5dba9e(0x1d1));return computeSqlContentHash(_0x46fcb5);}function a312_0xc283(){const _0x243840=['update','digest','1375laFTQj','md5','440154RsROMS','hex','9755811ZUMLhy','3165924PEqeFy','16MpOnEv','803736bnqXQe','772764xIZIaL','createHash','utf8','416BQgPkc','1888285AuJnjY'];a312_0xc283=function(){return _0x243840;};return a312_0xc283();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a313_0x36d4(_0x3636c3,_0x4f5094){_0x3636c3=_0x3636c3-0x1c7;const _0x3a9875=a313_0x3a98();let _0x36d424=_0x3a9875[_0x3636c3];return _0x36d424;}(function(_0xb9b07a,_0x53447a){const _0x5c2d28=a313_0x36d4,_0x2962da=_0xb9b07a();while(!![]){try{const _0x248715=-parseInt(_0x5c2d28(0x1c7))/0x1+parseInt(_0x5c2d28(0x1d6))/0x2+parseInt(_0x5c2d28(0x1d9))/0x3+-parseInt(_0x5c2d28(0x1d7))/0x4*(parseInt(_0x5c2d28(0x1d8))/0x5)+parseInt(_0x5c2d28(0x1cd))/0x6*(-parseInt(_0x5c2d28(0x1cc))/0x7)+parseInt(_0x5c2d28(0x1d5))/0x8*(parseInt(_0x5c2d28(0x1c9))/0x9)+parseInt(_0x5c2d28(0x1d4))/0xa*(parseInt(_0x5c2d28(0x1ca))/0xb);if(_0x248715===_0x53447a)break;else _0x2962da['push'](_0x2962da['shift']());}catch(_0x5407af){_0x2962da['push'](_0x2962da['shift']());}}}(a313_0x3a98,0xc61cb));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a313_0x3a98(){const _0x4a09c0=['4078950CsKiPz','1280mMBpNd','273294nITYFg','8DXtbFW','3644995vlNjHN','3630975GnnDYT','stringify','sqlRoot','494948rCpoga','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','22032LHhIVP','55peJVPv','sqls','545846XFjWgQ','78kYFmqC','\x22\x20vs\x20lock\x20\x22','code','\x22.\x20','apps','parse','utf8'];a313_0x3a98=function(){return _0x4a09c0;};return a313_0x3a98();}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x4dc9dd,_0x3b4384,_0x10265d,_0x22334a){const _0x27ff9c=a313_0x36d4,_0x420b4d=_0x4dc9dd??createEmptySqlLock();let _0x367ac4=_0x420b4d[_0x27ff9c(0x1d1)][_0x3b4384];if(!_0x367ac4)return _0x367ac4={'sqlRoot':_0x10265d,'lastSync':'','sqls':{}},_0x420b4d[_0x27ff9c(0x1d1)][_0x3b4384]=_0x367ac4,{'lockData':_0x420b4d,'appLock':_0x367ac4};if(!_0x367ac4[_0x27ff9c(0x1db)])_0x367ac4[_0x27ff9c(0x1db)]=_0x10265d;else{if(_0x367ac4[_0x27ff9c(0x1db)]!==_0x10265d)throw new Error(_0x22334a+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x10265d+_0x27ff9c(0x1ce)+_0x367ac4[_0x27ff9c(0x1db)]+_0x27ff9c(0x1d0)+_0x27ff9c(0x1c8));}return!_0x367ac4[_0x27ff9c(0x1cb)]&&(_0x367ac4['sqls']={}),!_0x367ac4['lastSync']&&(_0x367ac4['lastSync']=''),{'lockData':_0x420b4d,'appLock':_0x367ac4};}export async function readSqlLockFile(_0x58c42d){const _0x3a9114=a313_0x36d4;try{const _0x1c651a=await readFile(_0x58c42d,'utf8');return JSON[_0x3a9114(0x1d2)](_0x1c651a);}catch(_0x42385e){if(_0x42385e[_0x3a9114(0x1cf)]==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x42385e));}}export async function writeSqlLockFile(_0x2460cd,_0x53fbd3){const _0x7e3a66=a313_0x36d4;await mkdir(dirname(_0x2460cd),{'recursive':!![]}),await writeFile(_0x2460cd,JSON[_0x7e3a66(0x1da)](_0x53fbd3,null,0x2),_0x7e3a66(0x1d3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d299f,_0x3eee34){const _0x4a8449=a315_0x3fa1,_0x4781f7=_0x2d299f();while(!![]){try{const _0x597281=-parseInt(_0x4a8449(0x7e))/0x1+-parseInt(_0x4a8449(0x8b))/0x2+-parseInt(_0x4a8449(0x81))/0x3+-parseInt(_0x4a8449(0x8c))/0x4+parseInt(_0x4a8449(0x82))/0x5*(-parseInt(_0x4a8449(0x84))/0x6)+-parseInt(_0x4a8449(0x85))/0x7+-parseInt(_0x4a8449(0x7f))/0x8*(-parseInt(_0x4a8449(0x8d))/0x9);if(_0x597281===_0x3eee34)break;else _0x4781f7['push'](_0x4781f7['shift']());}catch(_0x4dcfdf){_0x4781f7['push'](_0x4781f7['shift']());}}}(a315_0xab10,0xd42fe));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x1e9b3d){return detectSqlSourceMode(_0x1e9b3d);}export function getSqlFileExtension(_0x58c085){const _0x1a7691=a315_0x3fa1;return _0x58c085===_0x1a7691(0x83)?_0x1a7691(0x88):_0x1a7691(0x80);}export function buildDefaultSqlFileName(_0x1a860f,_0x5c6130){return''+_0x1a860f+getSqlFileExtension(_0x5c6130);}function a315_0xab10(){const _0x21b469=['2675580hAFYec','4633580TPhKIb','5373taHTUT','replace','121167llyVeY','54976bVSiYo','.sql','892476TnwkPx','1293035tiRpuH','mybatisXml','6NwVCgr','420105HyHZzL','trim','unknown-db','.xml','db-','unknown-sql'];a315_0xab10=function(){return _0x21b469;};return a315_0xab10();}function a315_0x3fa1(_0x581675,_0x5b0f90){_0x581675=_0x581675-0x7d;const _0xab1025=a315_0xab10();let _0x3fa1f4=_0xab1025[_0x581675];return _0x3fa1f4;}export function sanitizeSqlPathSegment(_0x3adcab,_0x2675ef){const _0xca1453=a315_0x3fa1,_0x5b4e80=String(_0x3adcab??'')[_0xca1453(0x86)](),_0x1d2f2f=_0x5b4e80[_0xca1453(0x7d)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0xca1453(0x7d)](/\s+/g,'-')[_0xca1453(0x7d)](/-+/g,'-')[_0xca1453(0x7d)](/^\.+/,'')['replace'](/\.+$/,'')['replace'](/^-+/,'')[_0xca1453(0x7d)](/-+$/,'');return _0x1d2f2f||_0x2675ef;}export function buildDbDirectoryName(_0x298fbe,_0x178caa){const _0x2df418=a315_0x3fa1;return sanitizeSqlPathSegment(_0x298fbe,_0x178caa!=null?_0x2df418(0x89)+_0x178caa:_0x2df418(0x87));}export function buildSqlRelativePath(_0x59e052,_0x52b43f,_0x9cf3e0,_0x15e87f,_0x500496){const _0x382bb6=a315_0x3fa1,_0x1549c8=buildDbDirectoryName(_0x9cf3e0,_0x500496),_0x46c471=sanitizeSqlPathSegment(_0x59e052,_0x382bb6(0x8a)),_0x274330=sanitizeSqlPathSegment(_0x52b43f,_0x46c471);return _0x1549c8+'/'+_0x46c471+'_'+_0x274330+getSqlFileExtension(_0x15e87f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a316_0x5b7f6a=a316_0x3d80;(function(_0x590e76,_0xd65849){const _0x2effea=a316_0x3d80,_0x294de=_0x590e76();while(!![]){try{const _0x54f680=-parseInt(_0x2effea(0xde))/0x1*(-parseInt(_0x2effea(0x142))/0x2)+-parseInt(_0x2effea(0x12f))/0x3*(parseInt(_0x2effea(0x128))/0x4)+-parseInt(_0x2effea(0x132))/0x5+parseInt(_0x2effea(0xe5))/0x6*(parseInt(_0x2effea(0x108))/0x7)+parseInt(_0x2effea(0x130))/0x8+-parseInt(_0x2effea(0xf4))/0x9*(-parseInt(_0x2effea(0xd9))/0xa)+-parseInt(_0x2effea(0xeb))/0xb*(-parseInt(_0x2effea(0xef))/0xc);if(_0x54f680===_0xd65849)break;else _0x294de['push'](_0x294de['shift']());}catch(_0x49ee81){_0x294de['push'](_0x294de['shift']());}}}(a316_0x1655,0xdf077));const MYBATIS_OUTER_TAGS=new Map([[a316_0x5b7f6a(0xd8),a316_0x5b7f6a(0x12b)],[a316_0x5b7f6a(0xff),'INSERT'],[a316_0x5b7f6a(0xe6),a316_0x5b7f6a(0xf6)],['delete',a316_0x5b7f6a(0xe8)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if','where',a316_0x5b7f6a(0xf2),a316_0x5b7f6a(0x13a),a316_0x5b7f6a(0x10e),a316_0x5b7f6a(0x10b),a316_0x5b7f6a(0x11b),a316_0x5b7f6a(0x11c),a316_0x5b7f6a(0xf8),a316_0x5b7f6a(0xd7),'property']),MYBATIS_BRANCH_TAGS=new Set(['if',a316_0x5b7f6a(0xf2),a316_0x5b7f6a(0x13a),a316_0x5b7f6a(0x10e),a316_0x5b7f6a(0x10b)]);export const MYBATIS_DYNAMIC_START_MARKER=a316_0x5b7f6a(0x104);export const MYBATIS_DYNAMIC_END_MARKER=a316_0x5b7f6a(0xfc);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a316_0x5b7f6a(0x127),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a316_0x5b7f6a(0x126)+[...MYBATIS_OUTER_TAGS[a316_0x5b7f6a(0xd5)]()]['join']('|')+a316_0x5b7f6a(0x141),'i');export function normalizeSqlForStaticAnalysis(_0x2b7f15){const _0x483256=a316_0x5b7f6a,_0x47ed0f=typeof _0x2b7f15===_0x483256(0x13c)?_0x2b7f15:'';if(detectSqlSourceMode(_0x47ed0f)===_0x483256(0x13d))return{'sql':_0x47ed0f,'mode':_0x483256(0x13d)};let _0x56acfc=0x0,_0x271d19='',_0x1c7b73,_0x2bae26=![],_0x5eea5b=![];const _0x45d7d5=[];while(_0x56acfc<_0x47ed0f[_0x483256(0x101)]){if(_0x47ed0f[_0x483256(0xe4)](_0x483256(0xf7),_0x56acfc)){const _0x87b51e=_0x47ed0f[_0x483256(0x100)]('-->',_0x56acfc+0x4);if(_0x87b51e<0x0)return invalidMybatisSource(_0x483256(0xfd));_0x271d19+='\x20',_0x56acfc=_0x87b51e+0x3;continue;}if(_0x47ed0f['startsWith']('<;if(_0x25b307<0x0)return invalidMybatisSource(_0x483256(0x115));_0x271d19+=_0x47ed0f[_0x483256(0xfa)](_0x56acfc+0x9,_0x25b307),_0x56acfc=_0x25b307+0x3;continue;}if(_0x47ed0f[_0x483256(0xe4)]('<?',_0x56acfc)){if(_0x2bae26)return invalidMybatisSource(_0x483256(0xdc));const _0x22b9de=_0x47ed0f[_0x483256(0x100)]('?>',_0x56acfc+0x2);if(_0x22b9de<0x0)return invalidMybatisSource(_0x483256(0x131));_0x271d19+='\x20',_0x56acfc=_0x22b9de+0x2;continue;}if(_0x47ed0f[_0x56acfc]!=='<'){const _0x444493=_0x47ed0f['indexOf']('<',_0x56acfc),_0x3b0484=_0x444493<0x0?_0x47ed0f[_0x483256(0x101)]:_0x444493,_0x1dae77=_0x47ed0f[_0x483256(0xfa)](_0x56acfc,_0x3b0484);if((!_0x2bae26||_0x5eea5b)&&_0x1dae77['trim']())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x2bae26&&!_0x5eea5b){const _0x470e03=decodeXmlEntities(_0x1dae77);if(_0x470e03===null)return invalidMybatisSource(_0x483256(0xea));_0x271d19+=_0x470e03;}else _0x271d19+='\x20';_0x56acfc=_0x3b0484;continue;}const _0x493749=findXmlTagEnd(_0x47ed0f,_0x56acfc);if(_0x493749<0x0)return invalidMybatisSource(_0x483256(0x143));const _0x2fd5e6=_0x47ed0f[_0x483256(0xfa)](_0x56acfc,_0x493749+0x1),_0x5a85c5=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x483256(0xee)](_0x2fd5e6);if(!_0x5a85c5)return invalidMybatisSource(_0x483256(0x112));const _0x197922=_0x5a85c5[0x1]==='/',_0x4d14fa=_0x5a85c5[0x2]??'',_0x310777=_0x4d14fa[_0x483256(0xe9)](),_0x3ef7f9=_0x5a85c5[0x3]??'',_0x55f8ac=_0x5a85c5[0x4]==='/',_0x599f83=MYBATIS_OUTER_TAGS[_0x483256(0xe3)](_0x310777);if(!_0x599f83&&!MYBATIS_DYNAMIC_TAGS[_0x483256(0x12c)](_0x310777))return invalidMybatisSource(_0x483256(0x139)+_0x310777+'>.');if(!_0x599f83&&_0x4d14fa!==_0x310777)return invalidMybatisSource(_0x483256(0xf3)+_0x4d14fa+'>.');if(_0x197922){if(_0x3ef7f9[_0x483256(0x11b)]()||_0x55f8ac)return invalidMybatisSource(_0x483256(0xda)+_0x4d14fa+'>.');const _0x3e7e83=_0x45d7d5['at'](-0x1);if(!_0x3e7e83||(_0x3e7e83[_0x483256(0xec)]?_0x3e7e83['tagName']!==_0x310777:_0x3e7e83[_0x483256(0x11d)]!==_0x4d14fa))return invalidMybatisSource(_0x483256(0x10d)+_0x4d14fa+'>.');_0x45d7d5[_0x483256(0x137)]();if(_0x3e7e83['outer'])_0x5eea5b=!![];_0x271d19+=MYBATIS_BRANCH_TAGS[_0x483256(0x12c)](_0x310777)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x3ef7f9))return invalidMybatisSource(_0x483256(0x123)+_0x4d14fa+'>.');if(_0x310777==='property'&&(!_0x55f8ac||_0x45d7d5['at'](-0x1)?.[_0x483256(0xe7)]!==_0x483256(0xd7)))return invalidMybatisSource(_0x483256(0x120));if(_0x599f83){if(_0x2bae26||_0x45d7d5['length']>0x0)return invalidMybatisSource(_0x483256(0xe1));_0x2bae26=!![],_0x5eea5b=_0x55f8ac,_0x1c7b73=_0x599f83;}else{if(!_0x2bae26||_0x5eea5b)return invalidMybatisSource(_0x483256(0x13b)+_0x4d14fa+'>.');}_0x271d19+=_0x310777==='where'?_0x483256(0xe2):_0x310777===_0x483256(0x11c)?'\x20SET\x20':_0x310777===_0x483256(0xd7)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x483256(0x12c)](_0x310777)&&!_0x55f8ac?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x55f8ac&&_0x45d7d5[_0x483256(0x13f)]({'rawName':_0x4d14fa,'tagName':_0x310777,'outer':!!_0x599f83});}_0x56acfc=_0x493749+0x1;}if(_0x45d7d5[_0x483256(0x101)]>0x0)return invalidMybatisSource(_0x483256(0x134)+_0x45d7d5['at'](-0x1)?.[_0x483256(0x11d)]+'>.');if(!_0x2bae26||!_0x5eea5b)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x271d19['trim'](),'mode':_0x483256(0x133),..._0x1c7b73?{'statementType':_0x1c7b73}:{}};}function hasWellFormedXmlAttributes(_0x5acf8e){const _0xf13aae=a316_0x5b7f6a;let _0x39ccad=0x0;const _0xb98e07=new Set();while(_0x39ccad<_0x5acf8e[_0xf13aae(0x101)]){while(_0x39ccad<_0x5acf8e['length']&&/\s/['test'](_0x5acf8e[_0x39ccad]??''))_0x39ccad+=0x1;if(_0x39ccad>=_0x5acf8e[_0xf13aae(0x101)])return!![];const _0x4bac09=/^[A-Za-z_:][\w:.-]*/[_0xf13aae(0xee)](_0x5acf8e[_0xf13aae(0xfa)](_0x39ccad)),_0x40afea=_0x4bac09?.[0x0];if(!_0x40afea||_0xb98e07['has'](_0x40afea))return![];_0xb98e07[_0xf13aae(0x11e)](_0x40afea),_0x39ccad+=_0x40afea[_0xf13aae(0x101)];while(_0x39ccad<_0x5acf8e[_0xf13aae(0x101)]&&/\s/[_0xf13aae(0x106)](_0x5acf8e[_0x39ccad]??''))_0x39ccad+=0x1;if(_0x5acf8e[_0x39ccad]!=='=')return![];_0x39ccad+=0x1;while(_0x39ccad<_0x5acf8e[_0xf13aae(0x101)]&&/\s/[_0xf13aae(0x106)](_0x5acf8e[_0x39ccad]??''))_0x39ccad+=0x1;const _0x6ff57f=_0x5acf8e[_0x39ccad];if(_0x6ff57f!=='\x22'&&_0x6ff57f!=='\x27')return![];_0x39ccad+=0x1;const _0x4f046d=_0x5acf8e[_0xf13aae(0x100)](_0x6ff57f,_0x39ccad);if(_0x4f046d<0x0)return![];if(decodeXmlEntities(_0x5acf8e[_0xf13aae(0xfa)](_0x39ccad,_0x4f046d))===null)return![];_0x39ccad=_0x4f046d+0x1;}return!![];}export function detectSqlSourceMode(_0x5bfa2d){const _0x591477=a316_0x5b7f6a;let _0x3b36be=0x0;const _0x2dc820=()=>{const _0x2056ea=a316_0x3d80;while(_0x3b36be<_0x5bfa2d[_0x2056ea(0x101)]&&/\s/[_0x2056ea(0x106)](_0x5bfa2d[_0x3b36be]??''))_0x3b36be+=0x1;};_0x2dc820();while(_0x3b36be<_0x5bfa2d['length']){if(_0x5bfa2d[_0x591477(0xe4)](_0x591477(0xf7),_0x3b36be)){const _0x2fc2a2=_0x5bfa2d[_0x591477(0x100)](_0x591477(0x12e),_0x3b36be+0x4);if(_0x2fc2a2<0x0)return _0x591477(0x133);_0x3b36be=_0x2fc2a2+0x3,_0x2dc820();continue;}if(_0x5bfa2d['startsWith']('<?',_0x3b36be)){const _0x30c6f2=_0x5bfa2d[_0x591477(0x100)]('?>',_0x3b36be+0x2);if(_0x30c6f2<0x0)return _0x591477(0x133);_0x3b36be=_0x30c6f2+0x2,_0x2dc820();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x5bfa2d[_0x591477(0xfa)](_0x3b36be))?_0x591477(0x133):'sql';}function invalidMybatisSource(_0x34fa86){const _0xadd600=a316_0x5b7f6a;return{'sql':'','mode':_0xadd600(0x133),'error':_0x34fa86};}function findXmlTagEnd(_0x1a2d9e,_0x200213){let _0x211980;for(let _0x338ac1=_0x200213+0x1;_0x338ac1<_0x1a2d9e['length'];_0x338ac1+=0x1){const _0x3fe68e=_0x1a2d9e[_0x338ac1];if(_0x211980){if(_0x3fe68e===_0x211980)_0x211980=undefined;continue;}if(_0x3fe68e==='\x22'||_0x3fe68e==='\x27'){_0x211980=_0x3fe68e;continue;}if(_0x3fe68e==='>')return _0x338ac1;}return-0x1;}function decodeXmlEntities(_0x64cdda){const _0x30f950=a316_0x5b7f6a;let _0x3105b0=![];const _0x182770=_0x64cdda[_0x30f950(0x110)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x3a6dbe=>{const _0x1eb35d=_0x30f950;if(_0x3a6dbe===_0x1eb35d(0x105))return'<';if(_0x3a6dbe===_0x1eb35d(0xf0))return'>';if(_0x3a6dbe===_0x1eb35d(0xdf))return'\x22';if(_0x3a6dbe===_0x1eb35d(0x12d))return'\x27';if(_0x3a6dbe===_0x1eb35d(0x122))return'&';const _0x33d727=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x1eb35d(0xee)](_0x3a6dbe);if(_0x33d727){const _0x5d4200=_0x33d727[0x1],_0x2fc6ca=_0x33d727[0x2],_0x3e12f1=Number[_0x1eb35d(0x117)](_0x5d4200??_0x2fc6ca??'',_0x5d4200?0x10:0xa);if(isValidXmlCharacter(_0x3e12f1))return String[_0x1eb35d(0xd4)](_0x3e12f1);}return _0x3105b0=!![],'';});return _0x3105b0?null:_0x182770;}function isValidXmlCharacter(_0x99ae09){return _0x99ae09===0x9||_0x99ae09===0xa||_0x99ae09===0xd||_0x99ae09>=0x20&&_0x99ae09<=0xd7ff||_0x99ae09>=0xe000&&_0x99ae09<=0xfffd||_0x99ae09>=0x10000&&_0x99ae09<=0x10ffff;}export function detectSqlType(_0x1e6b5b){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1e6b5b));}function a316_0x1655(){const _0x1b2a2d=['__RABETBASE_MYBATIS_DYNAMIC_START__','<','test','LOCK\x20IN\x20SHARE\x20MODE','7625093LtLvHC','SQL\x20content\x20is\x20empty','DELETE\x20statements\x20require\x20explicit\x20review','otherwise','join','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','when','\x20with\x20parameters:\x20','replace','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','Invalid\x20MyBatis\x20XML\x20tag.','toUpperCase','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Unterminated\x20CDATA\x20section.','INSERT','parseInt','DDL','WITH','filter','trim','set','rawName','add','reason','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','FOR','&','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','type','includes','^<\x5cs*(?:','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','5857604kXEEMA','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','isDangerous','SELECT','has',''','-->','3nwWpKt','244792fkLyNY','Unterminated\x20XML\x20declaration.','7046010uYdiGV','mybatisXml','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','replaceAll','matchAll','pop','statementType','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','choose','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','string','sql','UNKNOWN','push','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT',')\x5cb','12732qFcPTk','Unterminated\x20MyBatis\x20XML\x20tag.','Unable\x20to\x20detect\x20SQL\x20type.\x20','fromCodePoint','keys','match','include','select','11954710TczXcD','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','from','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','MATERIALIZED','178MLPCuo','"','error','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','\x20WHERE\x20','get','startsWith','6UrLCPr','update','tagName','DELETE','toLowerCase','Invalid\x20XML\x20entity\x20reference.','3641pBmMVR','outer','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','exec','12276ydFGhE','>','\x20query\x20targeting\x20','foreach','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','9IriuSy','SET','UPDATE','<!--','bind','SHARE','slice','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','__RABETBASE_MYBATIS_DYNAMIC_END__','Unterminated\x20XML\x20comment.','some','insert','indexOf','length','KEY','NOT'];a316_0x1655=function(){return _0x1b2a2d;};return a316_0x1655();}function detectNormalizedSqlType(_0x2df2c5){const _0x490743=a316_0x5b7f6a;if(_0x2df2c5['error'])return{'type':_0x490743(0x13e),'isSelectOnly':![],'isDangerous':![],'reason':_0x2df2c5[_0x490743(0xe0)]};if(!_0x2df2c5[_0x490743(0x13d)][_0x490743(0x11b)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x490743(0x109)};const _0x224997=tokenizeSqlForTypeAnalysis(_0x2df2c5[_0x490743(0x13d)]),_0x532ac9=_0x224997[_0x490743(0x11a)](_0x466d7a=>_0x466d7a!==MYBATIS_DYNAMIC_START_MARKER&&_0x466d7a!==MYBATIS_DYNAMIC_END_MARKER),_0x476048=findMainStatementIndex(_0x532ac9);if(_0x476048<0x0)return{'type':_0x490743(0x13e),'isSelectOnly':![],'isDangerous':![],'reason':_0x490743(0xfb)};const _0x1be842=_0x532ac9[_0x476048]??'',_0x27c3f0=_0x2df2c5[_0x490743(0x138)]??_0x1be842,_0x2edee6=_0x224997['some'](_0x103912=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x490743(0x106)](_0x103912)),_0x414ccb=new Set();let _0x264a5c=![];for(let _0x200a0a=0x0;_0x200a0a<_0x224997[_0x490743(0x101)];_0x200a0a+=0x1){const _0x49f610=_0x224997[_0x200a0a];(_0x49f610===_0x490743(0xf6)||_0x49f610===_0x490743(0xf9))&&isLockingClauseKeyword(_0x224997,_0x200a0a)&&(_0x414ccb[_0x490743(0x11e)](_0x200a0a),_0x264a5c=!![]);if(_0x224997[_0x490743(0xfa)](_0x200a0a,_0x200a0a+0x4)[_0x490743(0x10c)]('\x20')===_0x490743(0x107))_0x264a5c=!![];}if(_0x27c3f0===_0x490743(0x12b)){const _0x4757bc=_0x224997[_0x490743(0xfe)]((_0x59e061,_0x4cbc7d)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x490743(0x106)](_0x59e061)&&!_0x414ccb[_0x490743(0x12c)](_0x4cbc7d));return{'type':'SELECT','isSelectOnly':!_0x4757bc&&!_0x264a5c,'isLockingRead':_0x264a5c,'isDangerous':_0x4757bc,'reason':_0x4757bc?_0x490743(0x140):undefined};}if(_0x27c3f0===_0x490743(0x116))return{'type':_0x490743(0x116),'isSelectOnly':![],'isDangerous':_0x2edee6,'reason':_0x2edee6?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x27c3f0===_0x490743(0xf6))return{'type':_0x490743(0xf6),'isSelectOnly':![],'isDangerous':_0x2edee6,'reason':_0x2edee6?_0x490743(0x129):undefined};if(_0x27c3f0===_0x490743(0xe8))return{'type':_0x490743(0xe8),'isSelectOnly':![],'isDangerous':!![],'reason':_0x490743(0x10a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x490743(0x106)](_0x1be842))return{'type':_0x490743(0x118),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20require\x20explicit\x20review'};return{'type':_0x490743(0x13e),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x201b9d,_0x262dab){const _0x3cf300=a316_0x5b7f6a,_0x5ddb4e=_0x201b9d[_0x262dab]===_0x3cf300(0xf6)?[[_0x3cf300(0x121)],['FOR','NO','KEY']]:[[_0x3cf300(0x121)],[_0x3cf300(0x121),_0x3cf300(0x102)]],_0x5b1762=_0x5ddb4e[_0x3cf300(0xfe)](_0x1a770b=>{const _0xd6e87e=_0x3cf300,_0x151a58=_0x262dab-_0x1a770b[_0xd6e87e(0x101)];return _0x151a58>=0x0&&_0x201b9d[_0xd6e87e(0xfa)](_0x151a58,_0x262dab)[_0xd6e87e(0x10c)]('\x20')===_0x1a770b[_0xd6e87e(0x10c)]('\x20');});if(!_0x5b1762)return![];return!_0x201b9d[_0x3cf300(0xfa)](_0x262dab+0x1,_0x262dab+0x5)[_0x3cf300(0x125)](_0x3cf300(0xf5));}function a316_0x3d80(_0x5469c6,_0x3f8fae){_0x5469c6=_0x5469c6-0xd3;const _0x165540=a316_0x1655();let _0x3d80f0=_0x165540[_0x5469c6];return _0x3d80f0;}function findMainStatementIndex(_0x2b3165){const _0x155822=a316_0x5b7f6a;if(_0x2b3165[0x0]!==_0x155822(0x119))return 0x0;let _0x222133=_0x2b3165[0x1]==='RECURSIVE'?0x2:0x1;while(_0x222133<_0x2b3165[_0x155822(0x101)]){const _0x316d28=_0x2b3165[_0x222133];if(!_0x316d28||!(/^[A-Z_][\w$]*$/[_0x155822(0x106)](_0x316d28)||/^[`"]/[_0x155822(0x106)](_0x316d28)))return-0x1;_0x222133+=0x1;if(_0x2b3165[_0x222133]==='('){_0x222133=skipSqlParentheses(_0x2b3165,_0x222133);if(_0x222133<0x0)return-0x1;}if(_0x2b3165[_0x222133]!=='AS')return-0x1;_0x222133+=0x1;if(_0x2b3165[_0x222133]===_0x155822(0x103)&&_0x2b3165[_0x222133+0x1]===_0x155822(0xdd))_0x222133+=0x2;else{if(_0x2b3165[_0x222133]==='MATERIALIZED')_0x222133+=0x1;}_0x222133=skipSqlParentheses(_0x2b3165,_0x222133);if(_0x222133<0x0)return-0x1;if(_0x2b3165[_0x222133]!==','){const _0x112bb7=_0x2b3165[_0x222133]==='('?_0x222133+0x1:_0x222133;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x155822(0x106)](_0x2b3165[_0x112bb7]??'')?_0x112bb7:-0x1;}_0x222133+=0x1;}return-0x1;}function skipSqlParentheses(_0x53d08d,_0x2cbd0e){const _0x31b6f1=a316_0x5b7f6a;if(_0x53d08d[_0x2cbd0e]!=='(')return-0x1;let _0x3c3ad5=0x0;for(let _0x2efb57=_0x2cbd0e;_0x2efb57<_0x53d08d[_0x31b6f1(0x101)];_0x2efb57+=0x1){const _0x3dfc07=_0x53d08d[_0x2efb57];if(_0x3dfc07===';')return-0x1;if(_0x3dfc07==='(')_0x3c3ad5+=0x1;if(_0x3dfc07===')'&&--_0x3c3ad5===0x0)return _0x2efb57+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x537c0d){const _0x47da9b=a316_0x5b7f6a;return _0x537c0d[_0x47da9b(0x135)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x47da9b(0x135)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x47da9b(0x135)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x593bea){const _0x16645a=a316_0x5b7f6a,_0x5c7c63=[],_0x2c1ccd=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x2bb656 of _0x593bea[_0x16645a(0x136)](_0x2c1ccd)){const _0x49f363=_0x2bb656[0x0];if(_0x49f363['startsWith']('/*')||_0x49f363[_0x16645a(0xe4)]('--')||_0x49f363['startsWith']('#')&&!_0x49f363[_0x16645a(0xe4)]('#{'))continue;_0x5c7c63['push'](/^["`]/[_0x16645a(0x106)](_0x49f363)?_0x49f363:/^[\x27@#$]/['test'](_0x49f363)?'?':_0x49f363[_0x16645a(0x113)]());}return _0x5c7c63;}function extractTables(_0x3ad086,_0x2e129f){const _0x1e906b=a316_0x5b7f6a,_0x3e8eb5=_0x3ad086[_0x1e906b(0x110)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x1e906b(0x110)](/'[^']*'/g,'\x27\x27')[_0x1e906b(0x110)](/--.*$/gm,'')[_0x1e906b(0x110)](/\/\*[\s\S]*?\*\//g,''),_0x5772f5=[],_0x272a11=_0x3e8eb5['match'](/FROM\s+([^\s,)(]+)/i);addTable(_0x5772f5,_0x272a11?.[0x1]);for(const _0x1c0038 of _0x3e8eb5[_0x1e906b(0x136)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x5772f5,_0x1c0038[0x1]);}const _0x82cfc5=_0x3e8eb5['match'](/INTO\s+([^\s(]+)/i);addTable(_0x5772f5,_0x82cfc5?.[0x1]);if(_0x2e129f===_0x1e906b(0xf6)){const _0x591612=_0x3e8eb5[_0x1e906b(0xd6)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x5772f5,_0x591612?.[0x1]);}return _0x5772f5;}function addTable(_0x14d520,_0x3a8001){const _0x4e0ac5=a316_0x5b7f6a,_0x583947=_0x3a8001?.['replace'](/[`"]/g,'');_0x583947&&_0x583947!==UNRESOLVED_SQL_FRAGMENT&&!_0x14d520[_0x4e0ac5(0x125)](_0x583947)&&_0x14d520[_0x4e0ac5(0x13f)](_0x583947);}function extractParameters(_0x5ea2a6){const _0x1ffe9b=a316_0x5b7f6a,_0x4c32b1=new Set();for(const _0x2516f3 of _0x5ea2a6[_0x1ffe9b(0x136)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x2516f3[0x1])_0x4c32b1[_0x1ffe9b(0x11e)](_0x2516f3[0x1]);}return Array[_0x1ffe9b(0xdb)](_0x4c32b1);}export function validateSql(_0x5d8737){const _0x45775b=a316_0x5b7f6a,_0x4066f8=normalizeSqlForStaticAnalysis(_0x5d8737),_0x4ec55c=detectNormalizedSqlType(_0x4066f8),_0x5e93c5=stripStaticAnalysisMarkers(_0x4066f8['sql']),_0x32e0e7=_0x4066f8[_0x45775b(0xe0)]?[]:extractTables(_0x5e93c5,_0x4ec55c[_0x45775b(0x124)]),_0x4ad850=_0x4066f8[_0x45775b(0xe0)]?[]:extractParameters(_0x5e93c5);if(_0x4ec55c[_0x45775b(0x12a)])return{'valid':![],'sqlType':_0x4ec55c,'tables':_0x32e0e7,'parameters':_0x4ad850,'message':_0x4ec55c[_0x45775b(0x11f)]||_0x4ec55c['type']+_0x45775b(0x111)};if(_0x4ec55c[_0x45775b(0x124)]===_0x45775b(0x13e))return{'valid':![],'sqlType':_0x4ec55c,'tables':_0x32e0e7,'parameters':_0x4ad850,'message':_0x4066f8['error']?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x4066f8[_0x45775b(0xe0)]:_0x4ec55c['reason']?_0x45775b(0xd3)+_0x4ec55c[_0x45775b(0x11f)]:_0x45775b(0xed)};return{'valid':!![],'sqlType':_0x4ec55c,'tables':_0x32e0e7,'parameters':_0x4ad850,'message':_0x4ec55c[_0x45775b(0x124)]+_0x45775b(0xf1)+(_0x32e0e7[_0x45775b(0x101)]?_0x32e0e7[_0x45775b(0x10c)](',\x20'):'unknown\x20table(s)')+(_0x4ad850[_0x45775b(0x101)]?_0x45775b(0x10f)+_0x4ad850['join'](',\x20'):'')};}
|
|
1
|
+
const a316_0x5e390b=a316_0x33c6;(function(_0x440d3d,_0x2599ab){const _0x3f92ea=a316_0x33c6,_0x583ae9=_0x440d3d();while(!![]){try{const _0x24f1e1=-parseInt(_0x3f92ea(0x13a))/0x1*(-parseInt(_0x3f92ea(0x110))/0x2)+parseInt(_0x3f92ea(0xfe))/0x3*(-parseInt(_0x3f92ea(0x121))/0x4)+parseInt(_0x3f92ea(0x115))/0x5+parseInt(_0x3f92ea(0x136))/0x6*(-parseInt(_0x3f92ea(0x103))/0x7)+-parseInt(_0x3f92ea(0x141))/0x8+-parseInt(_0x3f92ea(0x13f))/0x9*(-parseInt(_0x3f92ea(0x12b))/0xa)+-parseInt(_0x3f92ea(0xf9))/0xb;if(_0x24f1e1===_0x2599ab)break;else _0x583ae9['push'](_0x583ae9['shift']());}catch(_0x4f9936){_0x583ae9['push'](_0x583ae9['shift']());}}}(a316_0x5984,0xa0c29));const MYBATIS_OUTER_TAGS=new Map([[a316_0x5e390b(0x139),'SELECT'],['insert','INSERT'],[a316_0x5e390b(0xff),a316_0x5e390b(0x118)],[a316_0x5e390b(0x144),a316_0x5e390b(0x12f)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if','where','foreach',a316_0x5e390b(0xf4),'when','otherwise',a316_0x5e390b(0x116),'set',a316_0x5e390b(0x13d),a316_0x5e390b(0x138),a316_0x5e390b(0x149)]),MYBATIS_BRANCH_TAGS=new Set(['if',a316_0x5e390b(0x12d),a316_0x5e390b(0xf4),a316_0x5e390b(0x12c),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER=a316_0x5e390b(0x11b);export const MYBATIS_DYNAMIC_END_MARKER=a316_0x5e390b(0x152);export const MYBATIS_INCLUDE_MARKER=a316_0x5e390b(0x153);const UNRESOLVED_SQL_FRAGMENT=a316_0x5e390b(0x120),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a316_0x5e390b(0x14c)+[...MYBATIS_OUTER_TAGS[a316_0x5e390b(0x12a)]()]['join']('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x19c25e){const _0x9a2fbb=a316_0x5e390b,_0x1d749e=typeof _0x19c25e===_0x9a2fbb(0x137)?_0x19c25e:'';if(detectSqlSourceMode(_0x1d749e)===_0x9a2fbb(0x13e))return{'sql':_0x1d749e,'mode':_0x9a2fbb(0x13e)};let _0x31c0ef=0x0,_0x35ce97='',_0x238a8c,_0x1a9231=![],_0x1b5bae=![];const _0x587ea5=[];while(_0x31c0ef<_0x1d749e['length']){if(_0x1d749e[_0x9a2fbb(0x107)](_0x9a2fbb(0x104),_0x31c0ef)){const _0x1d0ac0=_0x1d749e[_0x9a2fbb(0x102)](_0x9a2fbb(0x148),_0x31c0ef+0x4);if(_0x1d0ac0<0x0)return invalidMybatisSource(_0x9a2fbb(0x101));_0x35ce97+='\x20',_0x31c0ef=_0x1d0ac0+0x3;continue;}if(_0x1d749e[_0x9a2fbb(0x107)](_0x9a2fbb(0x10f),_0x31c0ef)){if(!_0x1a9231||_0x1b5bae)return invalidMybatisSource(_0x9a2fbb(0xfb));const _0x232fb7=_0x1d749e[_0x9a2fbb(0x102)](_0x9a2fbb(0xf1),_0x31c0ef+0x9);if(_0x232fb7<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x35ce97+=_0x1d749e[_0x9a2fbb(0xfd)](_0x31c0ef+0x9,_0x232fb7),_0x31c0ef=_0x232fb7+0x3;continue;}if(_0x1d749e['startsWith']('<?',_0x31c0ef)){if(_0x1a9231)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x487d3=_0x1d749e[_0x9a2fbb(0x102)]('?>',_0x31c0ef+0x2);if(_0x487d3<0x0)return invalidMybatisSource('Unterminated\x20XML\x20declaration.');_0x35ce97+='\x20',_0x31c0ef=_0x487d3+0x2;continue;}if(_0x1d749e[_0x31c0ef]!=='<'){const _0x2d608f=_0x1d749e[_0x9a2fbb(0x102)]('<',_0x31c0ef),_0x376e6f=_0x2d608f<0x0?_0x1d749e[_0x9a2fbb(0x147)]:_0x2d608f,_0x478937=_0x1d749e[_0x9a2fbb(0xfd)](_0x31c0ef,_0x376e6f);if((!_0x1a9231||_0x1b5bae)&&_0x478937[_0x9a2fbb(0x116)]())return invalidMybatisSource(_0x9a2fbb(0x10a));if(_0x1a9231&&!_0x1b5bae){const _0xb9e68e=decodeXmlEntities(_0x478937);if(_0xb9e68e===null)return invalidMybatisSource(_0x9a2fbb(0x10d));_0x35ce97+=_0xb9e68e;}else _0x35ce97+='\x20';_0x31c0ef=_0x376e6f;continue;}const _0x39e419=findXmlTagEnd(_0x1d749e,_0x31c0ef);if(_0x39e419<0x0)return invalidMybatisSource(_0x9a2fbb(0x10b));const _0x5c64ac=_0x1d749e[_0x9a2fbb(0xfd)](_0x31c0ef,_0x39e419+0x1),_0x3e0870=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x9a2fbb(0x111)](_0x5c64ac);if(!_0x3e0870)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x3415e5=_0x3e0870[0x1]==='/',_0x29a915=_0x3e0870[0x2]??'',_0x40d337=_0x29a915['toLowerCase'](),_0x53aa59=_0x3e0870[0x3]??'',_0xc4c5de=_0x3e0870[0x4]==='/',_0x23389e=MYBATIS_OUTER_TAGS[_0x9a2fbb(0x11c)](_0x40d337);if(!_0x23389e&&!MYBATIS_DYNAMIC_TAGS[_0x9a2fbb(0x109)](_0x40d337))return invalidMybatisSource('Unsupported\x20MyBatis\x20XML\x20tag:\x20<'+_0x40d337+'>.');if(!_0x23389e&&_0x29a915!==_0x40d337)return invalidMybatisSource(_0x9a2fbb(0x126)+_0x29a915+'>.');if(_0x3415e5){if(_0x53aa59[_0x9a2fbb(0x116)]()||_0xc4c5de)return invalidMybatisSource(_0x9a2fbb(0x134)+_0x29a915+'>.');const _0x5d5144=_0x587ea5['at'](-0x1);if(!_0x5d5144||(_0x5d5144[_0x9a2fbb(0x146)]?_0x5d5144['tagName']!==_0x40d337:_0x5d5144[_0x9a2fbb(0x124)]!==_0x29a915))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x29a915+'>.');_0x587ea5['pop']();if(_0x5d5144[_0x9a2fbb(0x146)])_0x1b5bae=!![];_0x35ce97+=MYBATIS_BRANCH_TAGS[_0x9a2fbb(0x109)](_0x40d337)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x53aa59))return invalidMybatisSource(_0x9a2fbb(0x151)+_0x29a915+'>.');if(_0x40d337===_0x9a2fbb(0x149)&&(!_0xc4c5de||_0x587ea5['at'](-0x1)?.[_0x9a2fbb(0x113)]!==_0x9a2fbb(0x138)))return invalidMybatisSource(_0x9a2fbb(0x150));if(_0x23389e){if(_0x1a9231||_0x587ea5[_0x9a2fbb(0x147)]>0x0)return invalidMybatisSource(_0x9a2fbb(0x117));_0x1a9231=!![],_0x1b5bae=_0xc4c5de,_0x238a8c=_0x23389e;}else{if(!_0x1a9231||_0x1b5bae)return invalidMybatisSource(_0x9a2fbb(0x13b)+_0x29a915+'>.');}_0x35ce97+=_0x40d337==='where'?_0x9a2fbb(0x145):_0x40d337===_0x9a2fbb(0x14b)?_0x9a2fbb(0x133):_0x40d337===_0x9a2fbb(0x138)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x9a2fbb(0x109)](_0x40d337)&&!_0xc4c5de?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0xc4c5de&&_0x587ea5[_0x9a2fbb(0x114)]({'rawName':_0x29a915,'tagName':_0x40d337,'outer':!!_0x23389e});}_0x31c0ef=_0x39e419+0x1;}if(_0x587ea5[_0x9a2fbb(0x147)]>0x0)return invalidMybatisSource(_0x9a2fbb(0x11f)+_0x587ea5['at'](-0x1)?.[_0x9a2fbb(0x124)]+'>.');if(!_0x1a9231||!_0x1b5bae)return invalidMybatisSource('MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.');return{'sql':_0x35ce97[_0x9a2fbb(0x116)](),'mode':_0x9a2fbb(0x108),..._0x238a8c?{'statementType':_0x238a8c}:{}};}function hasWellFormedXmlAttributes(_0x7fde92){const _0x2a0a01=a316_0x5e390b;let _0x259ba2=0x0;const _0x4c23ba=new Set();while(_0x259ba2<_0x7fde92[_0x2a0a01(0x147)]){while(_0x259ba2<_0x7fde92[_0x2a0a01(0x147)]&&/\s/['test'](_0x7fde92[_0x259ba2]??''))_0x259ba2+=0x1;if(_0x259ba2>=_0x7fde92[_0x2a0a01(0x147)])return!![];const _0x101fd5=/^[A-Za-z_:][\w:.-]*/[_0x2a0a01(0x111)](_0x7fde92[_0x2a0a01(0xfd)](_0x259ba2)),_0x491532=_0x101fd5?.[0x0];if(!_0x491532||_0x4c23ba[_0x2a0a01(0x109)](_0x491532))return![];_0x4c23ba[_0x2a0a01(0x125)](_0x491532),_0x259ba2+=_0x491532[_0x2a0a01(0x147)];while(_0x259ba2<_0x7fde92['length']&&/\s/[_0x2a0a01(0x14d)](_0x7fde92[_0x259ba2]??''))_0x259ba2+=0x1;if(_0x7fde92[_0x259ba2]!=='=')return![];_0x259ba2+=0x1;while(_0x259ba2<_0x7fde92['length']&&/\s/[_0x2a0a01(0x14d)](_0x7fde92[_0x259ba2]??''))_0x259ba2+=0x1;const _0x37f7e5=_0x7fde92[_0x259ba2];if(_0x37f7e5!=='\x22'&&_0x37f7e5!=='\x27')return![];_0x259ba2+=0x1;const _0xa94393=_0x7fde92[_0x2a0a01(0x102)](_0x37f7e5,_0x259ba2);if(_0xa94393<0x0)return![];if(decodeXmlEntities(_0x7fde92[_0x2a0a01(0xfd)](_0x259ba2,_0xa94393))===null)return![];_0x259ba2=_0xa94393+0x1;}return!![];}export function detectSqlSourceMode(_0x4b8e29){const _0x50849e=a316_0x5e390b;let _0x2dd284=0x0;const _0x2596db=()=>{const _0xd6bb14=a316_0x33c6;while(_0x2dd284<_0x4b8e29['length']&&/\s/[_0xd6bb14(0x14d)](_0x4b8e29[_0x2dd284]??''))_0x2dd284+=0x1;};_0x2596db();while(_0x2dd284<_0x4b8e29[_0x50849e(0x147)]){if(_0x4b8e29[_0x50849e(0x107)](_0x50849e(0x104),_0x2dd284)){const _0x4aa668=_0x4b8e29[_0x50849e(0x102)]('-->',_0x2dd284+0x4);if(_0x4aa668<0x0)return _0x50849e(0x108);_0x2dd284=_0x4aa668+0x3,_0x2596db();continue;}if(_0x4b8e29['startsWith']('<?',_0x2dd284)){const _0x752d03=_0x4b8e29[_0x50849e(0x102)]('?>',_0x2dd284+0x2);if(_0x752d03<0x0)return'mybatisXml';_0x2dd284=_0x752d03+0x2,_0x2596db();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x4b8e29[_0x50849e(0xfd)](_0x2dd284))?_0x50849e(0x108):'sql';}function invalidMybatisSource(_0x2c9896){return{'sql':'','mode':'mybatisXml','error':_0x2c9896};}function findXmlTagEnd(_0x30d198,_0xe967de){const _0x578ecd=a316_0x5e390b;let _0x323743;for(let _0x4f4d32=_0xe967de+0x1;_0x4f4d32<_0x30d198[_0x578ecd(0x147)];_0x4f4d32+=0x1){const _0x1bfd6b=_0x30d198[_0x4f4d32];if(_0x323743){if(_0x1bfd6b===_0x323743)_0x323743=undefined;continue;}if(_0x1bfd6b==='\x22'||_0x1bfd6b==='\x27'){_0x323743=_0x1bfd6b;continue;}if(_0x1bfd6b==='>')return _0x4f4d32;}return-0x1;}function decodeXmlEntities(_0x566924){let _0x269abe=![];const _0x38a1ac=_0x566924['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x46be3a=>{const _0x550d07=a316_0x33c6;if(_0x46be3a===_0x550d07(0x14a))return'<';if(_0x46be3a===_0x550d07(0x14e))return'>';if(_0x46be3a==='"')return'\x22';if(_0x46be3a===_0x550d07(0x128))return'\x27';if(_0x46be3a===_0x550d07(0x14f))return'&';const _0x290431=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x550d07(0x111)](_0x46be3a);if(_0x290431){const _0x4d82ae=_0x290431[0x1],_0x2730df=_0x290431[0x2],_0x38d15c=Number['parseInt'](_0x4d82ae??_0x2730df??'',_0x4d82ae?0x10:0xa);if(isValidXmlCharacter(_0x38d15c))return String['fromCodePoint'](_0x38d15c);}return _0x269abe=!![],'';});return _0x269abe?null:_0x38a1ac;}function isValidXmlCharacter(_0x14b81d){return _0x14b81d===0x9||_0x14b81d===0xa||_0x14b81d===0xd||_0x14b81d>=0x20&&_0x14b81d<=0xd7ff||_0x14b81d>=0xe000&&_0x14b81d<=0xfffd||_0x14b81d>=0x10000&&_0x14b81d<=0x10ffff;}export function detectSqlType(_0x408af0){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x408af0));}function detectNormalizedSqlType(_0x4c9fbf){const _0x52c7c6=a316_0x5e390b;if(_0x4c9fbf[_0x52c7c6(0x129)])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x4c9fbf[_0x52c7c6(0x129)]};if(!_0x4c9fbf[_0x52c7c6(0x13e)][_0x52c7c6(0x116)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x1ff9a1=tokenizeSqlForTypeAnalysis(_0x4c9fbf[_0x52c7c6(0x13e)]),_0x5d4382=_0x1ff9a1[_0x52c7c6(0xf3)](_0x43d9f2=>_0x43d9f2!==MYBATIS_DYNAMIC_START_MARKER&&_0x43d9f2!==MYBATIS_DYNAMIC_END_MARKER),_0x26103a=findMainStatementIndex(_0x5d4382);if(_0x26103a<0x0)return{'type':_0x52c7c6(0xfa),'isSelectOnly':![],'isDangerous':![],'reason':_0x52c7c6(0x127)};const _0x3d2b9a=_0x5d4382[_0x26103a]??'',_0x538964=_0x4c9fbf[_0x52c7c6(0x123)]??_0x3d2b9a,_0x472e79=_0x1ff9a1[_0x52c7c6(0x143)](_0x17eeac=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x52c7c6(0x14d)](_0x17eeac)),_0x32190f=new Set();let _0xc7b750=![];for(let _0x38913c=0x0;_0x38913c<_0x1ff9a1[_0x52c7c6(0x147)];_0x38913c+=0x1){const _0x59eb5e=_0x1ff9a1[_0x38913c];(_0x59eb5e==='UPDATE'||_0x59eb5e===_0x52c7c6(0x142))&&isLockingClauseKeyword(_0x1ff9a1,_0x38913c)&&(_0x32190f[_0x52c7c6(0x125)](_0x38913c),_0xc7b750=!![]);if(_0x1ff9a1[_0x52c7c6(0xfd)](_0x38913c,_0x38913c+0x4)[_0x52c7c6(0x131)]('\x20')===_0x52c7c6(0x11e))_0xc7b750=!![];}if(_0x538964==='SELECT'){const _0x158973=_0x1ff9a1[_0x52c7c6(0x143)]((_0x536620,_0xfaf349)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/['test'](_0x536620)&&!_0x32190f['has'](_0xfaf349));return{'type':_0x52c7c6(0x130),'isSelectOnly':!_0x158973&&!_0xc7b750,'isLockingRead':_0xc7b750,'isDangerous':_0x158973,'reason':_0x158973?_0x52c7c6(0x11a):undefined};}if(_0x538964===_0x52c7c6(0x106))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x472e79,'reason':_0x472e79?_0x52c7c6(0x10c):undefined};if(_0x538964===_0x52c7c6(0x118))return{'type':_0x52c7c6(0x118),'isSelectOnly':![],'isDangerous':_0x472e79,'reason':_0x472e79?_0x52c7c6(0x10c):undefined};if(_0x538964==='DELETE')return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20require\x20explicit\x20review'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x52c7c6(0x14d)](_0x3d2b9a))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':_0x52c7c6(0x135)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x4b0543,_0x391873){const _0x4979da=a316_0x5e390b,_0x401e79=_0x4b0543[_0x391873]===_0x4979da(0x118)?[[_0x4979da(0x105)],[_0x4979da(0x105),'NO','KEY']]:[[_0x4979da(0x105)],['FOR',_0x4979da(0xf5)]],_0x1d988e=_0x401e79['some'](_0x5355d6=>{const _0xf8b387=_0x4979da,_0x47d150=_0x391873-_0x5355d6['length'];return _0x47d150>=0x0&&_0x4b0543[_0xf8b387(0xfd)](_0x47d150,_0x391873)['join']('\x20')===_0x5355d6['join']('\x20');});if(!_0x1d988e)return![];return!_0x4b0543[_0x4979da(0xfd)](_0x391873+0x1,_0x391873+0x5)['includes']('SET');}function findMainStatementIndex(_0x23d765){const _0x4f642d=a316_0x5e390b;if(_0x23d765[0x0]!==_0x4f642d(0x119))return 0x0;let _0x5c02c2=_0x23d765[0x1]===_0x4f642d(0x132)?0x2:0x1;while(_0x5c02c2<_0x23d765['length']){const _0x1c690e=_0x23d765[_0x5c02c2];if(!_0x1c690e||!(/^[A-Z_][\w$]*$/[_0x4f642d(0x14d)](_0x1c690e)||/^[`"]/[_0x4f642d(0x14d)](_0x1c690e)))return-0x1;_0x5c02c2+=0x1;if(_0x23d765[_0x5c02c2]==='('){_0x5c02c2=skipSqlParentheses(_0x23d765,_0x5c02c2);if(_0x5c02c2<0x0)return-0x1;}if(_0x23d765[_0x5c02c2]!=='AS')return-0x1;_0x5c02c2+=0x1;if(_0x23d765[_0x5c02c2]===_0x4f642d(0xfc)&&_0x23d765[_0x5c02c2+0x1]===_0x4f642d(0xf6))_0x5c02c2+=0x2;else{if(_0x23d765[_0x5c02c2]==='MATERIALIZED')_0x5c02c2+=0x1;}_0x5c02c2=skipSqlParentheses(_0x23d765,_0x5c02c2);if(_0x5c02c2<0x0)return-0x1;if(_0x23d765[_0x5c02c2]!==','){const _0x3422ff=_0x23d765[_0x5c02c2]==='('?_0x5c02c2+0x1:_0x5c02c2;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x4f642d(0x14d)](_0x23d765[_0x3422ff]??'')?_0x3422ff:-0x1;}_0x5c02c2+=0x1;}return-0x1;}function a316_0x33c6(_0x1c53c8,_0x52adc1){_0x1c53c8=_0x1c53c8-0xf0;const _0x598447=a316_0x5984();let _0x33c665=_0x598447[_0x1c53c8];return _0x33c665;}function skipSqlParentheses(_0x5c4b50,_0x4b8b98){const _0x4c5b1d=a316_0x5e390b;if(_0x5c4b50[_0x4b8b98]!=='(')return-0x1;let _0x1a97be=0x0;for(let _0x4d7d0d=_0x4b8b98;_0x4d7d0d<_0x5c4b50[_0x4c5b1d(0x147)];_0x4d7d0d+=0x1){const _0x5dc6f9=_0x5c4b50[_0x4d7d0d];if(_0x5dc6f9===';')return-0x1;if(_0x5dc6f9==='(')_0x1a97be+=0x1;if(_0x5dc6f9===')'&&--_0x1a97be===0x0)return _0x4d7d0d+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x4b7028){const _0x16ce59=a316_0x5e390b;return _0x4b7028['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x16ce59(0xf7)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x16ce59(0xf7)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x2da81a){const _0x1cc20e=a316_0x5e390b,_0x22fdb5=[],_0x53787=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x58a0e7 of _0x2da81a['matchAll'](_0x53787)){const _0x301446=_0x58a0e7[0x0];if(_0x301446[_0x1cc20e(0x107)]('/*')||_0x301446[_0x1cc20e(0x107)]('--')||_0x301446['startsWith']('#')&&!_0x301446[_0x1cc20e(0x107)]('#{'))continue;_0x22fdb5[_0x1cc20e(0x114)](/^["`]/[_0x1cc20e(0x14d)](_0x301446)?_0x301446:/^[\x27@#$]/[_0x1cc20e(0x14d)](_0x301446)?'?':_0x301446[_0x1cc20e(0xf2)]());}return _0x22fdb5;}function a316_0x5984(){const _0x3bb7bd=['Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','DDL\x20statements\x20require\x20explicit\x20review','30516YbhGwo','string','include','select','2zmuWzY','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','isDangerous','bind','sql','180ahjxec','Unable\x20to\x20detect\x20SQL\x20type.\x20','68000pKzSQb','SHARE','some','delete','\x20WHERE\x20','outer','length','-->','property','<','set','^<\x5cs*(?:','test','>','&','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','__RABETBASE_MYBATIS_DYNAMIC_END__','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','unknown\x20table(s)',']]>','toUpperCase','filter','choose','KEY','MATERIALIZED','replaceAll','reason','5384764Bpcbfa','UNKNOWN','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','NOT','slice','12bHxfhw','update','replace','Unterminated\x20XML\x20comment.','indexOf','1393zyCGGa','<!--','FOR','INSERT','startsWith','mybatisXml','has','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Unterminated\x20MyBatis\x20XML\x20tag.','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','Invalid\x20XML\x20entity\x20reference.','match','<![CDATA[','791512hRqHJs','exec','\x20with\x20parameters:\x20','tagName','push','2886775TfLxxH','trim','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','UPDATE','WITH','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','__RABETBASE_MYBATIS_DYNAMIC_START__','get','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','LOCK\x20IN\x20SHARE\x20MODE','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','460396USvYKX','type','statementType','rawName','add','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.',''','error','keys','630070QbrCqj','when','foreach','includes','DELETE','SELECT','join','RECURSIVE','\x20SET\x20'];a316_0x5984=function(){return _0x3bb7bd;};return a316_0x5984();}function extractTables(_0x5a0bf1,_0x2e3740){const _0x2c8e93=a316_0x5e390b,_0x1fa8d4=_0x5a0bf1[_0x2c8e93(0x100)](/#\{[^}]*\}/g,'?')[_0x2c8e93(0x100)](/\$\{[^}]*\}/g,'?')[_0x2c8e93(0x100)](/'[^']*'/g,'\x27\x27')[_0x2c8e93(0x100)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x12b4e8=[],_0xd84ba=_0x1fa8d4[_0x2c8e93(0x10e)](/FROM\s+([^\s,)(]+)/i);addTable(_0x12b4e8,_0xd84ba?.[0x1]);for(const _0x59f792 of _0x1fa8d4['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x12b4e8,_0x59f792[0x1]);}const _0x2295af=_0x1fa8d4[_0x2c8e93(0x10e)](/INTO\s+([^\s(]+)/i);addTable(_0x12b4e8,_0x2295af?.[0x1]);if(_0x2e3740===_0x2c8e93(0x118)){const _0x324801=_0x1fa8d4[_0x2c8e93(0x10e)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x12b4e8,_0x324801?.[0x1]);}return _0x12b4e8;}function addTable(_0x18b612,_0x128ecb){const _0x1522bd=a316_0x5e390b,_0x4c4418=_0x128ecb?.[_0x1522bd(0x100)](/[`"]/g,'');_0x4c4418&&_0x4c4418!==UNRESOLVED_SQL_FRAGMENT&&!_0x18b612[_0x1522bd(0x12e)](_0x4c4418)&&_0x18b612[_0x1522bd(0x114)](_0x4c4418);}function extractParameters(_0x3dc919){const _0x44e9a8=a316_0x5e390b,_0x56eb6e=new Set();for(const _0x21b341 of _0x3dc919['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x21b341[0x1])_0x56eb6e[_0x44e9a8(0x125)](_0x21b341[0x1]);}return Array['from'](_0x56eb6e);}export function validateSql(_0x2cbcd4){const _0x97f65=a316_0x5e390b,_0x9ac5ab=normalizeSqlForStaticAnalysis(_0x2cbcd4),_0x20946f=detectNormalizedSqlType(_0x9ac5ab),_0x3d334c=stripStaticAnalysisMarkers(_0x9ac5ab[_0x97f65(0x13e)]),_0x35c559=_0x9ac5ab[_0x97f65(0x129)]?[]:extractTables(_0x3d334c,_0x20946f[_0x97f65(0x122)]),_0x138e8f=_0x9ac5ab['error']?[]:extractParameters(_0x3d334c);if(_0x20946f[_0x97f65(0x13c)])return{'valid':![],'sqlType':_0x20946f,'tables':_0x35c559,'parameters':_0x138e8f,'message':_0x20946f['reason']||_0x20946f[_0x97f65(0x122)]+'\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.'};if(_0x20946f['type']===_0x97f65(0xfa))return{'valid':![],'sqlType':_0x20946f,'tables':_0x35c559,'parameters':_0x138e8f,'message':_0x9ac5ab['error']?_0x97f65(0x140)+_0x9ac5ab[_0x97f65(0x129)]:_0x20946f['reason']?_0x97f65(0x140)+_0x20946f[_0x97f65(0xf8)]:_0x97f65(0x11d)};return{'valid':!![],'sqlType':_0x20946f,'tables':_0x35c559,'parameters':_0x138e8f,'message':_0x20946f[_0x97f65(0x122)]+'\x20query\x20targeting\x20'+(_0x35c559[_0x97f65(0x147)]?_0x35c559[_0x97f65(0x131)](',\x20'):_0x97f65(0xf0))+(_0x138e8f[_0x97f65(0x147)]?_0x97f65(0x112)+_0x138e8f[_0x97f65(0x131)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a317_0x414434=a317_0x18a4;(function(_0x47e2e1,_0x4533ef){const _0x2ec30d=a317_0x18a4,_0x17d075=_0x47e2e1();while(!![]){try{const _0x28eff8=-parseInt(_0x2ec30d(0x18d))/0x1*(-parseInt(_0x2ec30d(0x17f))/0x2)+-parseInt(_0x2ec30d(0x191))/0x3+-parseInt(_0x2ec30d(0x17b))/0x4*(-parseInt(_0x2ec30d(0x17e))/0x5)+-parseInt(_0x2ec30d(0x189))/0x6*(parseInt(_0x2ec30d(0x190))/0x7)+-parseInt(_0x2ec30d(0x195))/0x8*(parseInt(_0x2ec30d(0x192))/0x9)+-parseInt(_0x2ec30d(0x187))/0xa+parseInt(_0x2ec30d(0x183))/0xb*(parseInt(_0x2ec30d(0x179))/0xc);if(_0x28eff8===_0x4533ef)break;else _0x17d075['push'](_0x17d075['shift']());}catch(_0x5cc64d){_0x17d075['push'](_0x17d075['shift']());}}}(a317_0x5644,0x9d60c));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a317_0x5644(){const _0x12d93f=['Operation\x20cancelled.','16302BDedOB','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','config_missing','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','943vwZwnO','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','Network\x20error:\x20','518rZxqdj','1374159ihMIAf','9sgSrsw','validation','auth_required','7815464Gjcaxd','Authentication\x20required','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','12SYUwcu','\x20auth`\x20to\x20login\x20first.','9468qgXeZo','Configuration\x20file\x20not\x20found','Not\x20in\x20a\x20','1035zUruPR','998rCjzvM','\x20project\x20directory','Run\x20`','network_error','15059726aneZjx','apiError','Missing\x20required\x20flag:\x20--','\x20--help`\x20to\x20see\x20available\x20commands.','489280uvBGQN'];a317_0x5644=function(){return _0x12d93f;};return a317_0x5644();}function a317_0x18a4(_0xc9e5c1,_0x18bd15){_0xc9e5c1=_0xc9e5c1-0x177;const _0x564417=a317_0x5644();let _0x18a457=_0x564417[_0xc9e5c1];return _0x18a457;}const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a317_0x414434(0x181)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a317_0x414434(0x18a)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','notInProjectHint':a317_0x414434(0x178)});export const CliErrors={'authRequired'(_0x5769ce){const _0x22abee=a317_0x414434;return new CliError(_0x22abee(0x194),0x1,_0x22abee(0x177),_0x5769ce??_0x22abee(0x181)+CLI_BIN_NAME+_0x22abee(0x17a));},'configMissing'(_0x1d9668){const _0x4b3d43=a317_0x414434;return new CliError(_0x4b3d43(0x18b),0x1,_0x4b3d43(0x17c),_0x1d9668??'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x4b3d43(0x18a)+CLI_BIN_NAME+_0x4b3d43(0x18c));},'notInProject'(){const _0x627fb8=a317_0x414434;return new CliError('not_in_project',0x1,_0x627fb8(0x17d)+CLI_BIN_NAME+_0x627fb8(0x180),_0x627fb8(0x178));},'apiError'(_0x2ac183,_0x4eb5d8){const _0x5ab09e=a317_0x414434;return baseCliErrors[_0x5ab09e(0x184)](_0x2ac183,_0x4eb5d8);},'networkError'(_0x44c9ba){const _0x3e4b72=a317_0x414434;return new CliError(_0x3e4b72(0x182),0x2,_0x3e4b72(0x18f)+_0x44c9ba,_0x3e4b72(0x18e));},'unknownCommand'(_0x141093){const _0x1c876d=a317_0x414434;return new CliError('unknown_command',0x1,'Unknown\x20command:\x20'+_0x141093,_0x1c876d(0x181)+CLI_BIN_NAME+_0x1c876d(0x186));},'flagMissing'(_0x57120f,_0x2d5324){const _0x2530ab=a317_0x414434;return new CliError('flag_missing',0x1,_0x2530ab(0x185)+_0x57120f,_0x2d5324);},'validation'(_0x443da2,_0x486237){const _0x1e8322=a317_0x414434;return baseCliErrors[_0x1e8322(0x193)](_0x443da2,_0x486237);},'cancelled'(_0x49f8bb){const _0x38b2b2=a317_0x414434;return new CliError('cancelled',0x0,_0x49f8bb??_0x38b2b2(0x188));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x20acab,_0x428f14){const _0x23ac7e=a318_0x2ce9,_0x4a24e0=_0x20acab();while(!![]){try{const _0x40e4b0=-parseInt(_0x23ac7e(0x1a6))/0x1+parseInt(_0x23ac7e(0x1ab))/0x2+parseInt(_0x23ac7e(0x1ac))/0x3+-parseInt(_0x23ac7e(0x1ae))/0x4*(-parseInt(_0x23ac7e(0x1a9))/0x5)+-parseInt(_0x23ac7e(0x1aa))/0x6+-parseInt(_0x23ac7e(0x1ad))/0x7+parseInt(_0x23ac7e(0x1af))/0x8;if(_0x40e4b0===_0x428f14)break;else _0x4a24e0['push'](_0x4a24e0['shift']());}catch(_0x51cd86){_0x4a24e0['push'](_0x4a24e0['shift']());}}}(a318_0x42d3,0x41e8f));function a318_0x2ce9(_0x226728,_0x1cff4d){_0x226728=_0x226728-0x1a6;const _0x42d3b3=a318_0x42d3();let _0x2ce938=_0x42d3b3[_0x226728];return _0x2ce938;}function a318_0x42d3(){const _0x402ca7=['3193326bwMAFI','281516AVPDhB','1473717ClcTLo','3409154zbAGRu','491420vNfSWq','4915976vQhRLy','80139EvJaPM','name','yes','5jlnsRg'];a318_0x42d3=function(){return _0x402ca7;};return a318_0x42d3();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a318_0x1018c7}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0x19aee7){const _0x4590e4=a318_0x2ce9,_0x211341=a318_0x1018c7(_0x19aee7,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x19aee7))return _0x211341;return _0x211341['map'](_0x421ad2=>_0x421ad2[_0x4590e4(0x1a7)]===_0x4590e4(0x1a8)?{..._0x421ad2,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x421ad2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54bfb0,_0xec993b){var _0x325135=a319_0x402c,_0x4b265b=_0x54bfb0();while(!![]){try{var _0x184722=parseInt(_0x325135(0x153))/0x1*(parseInt(_0x325135(0x154))/0x2)+parseInt(_0x325135(0x14e))/0x3+parseInt(_0x325135(0x14b))/0x4+-parseInt(_0x325135(0x155))/0x5+-parseInt(_0x325135(0x156))/0x6+-parseInt(_0x325135(0x157))/0x7*(-parseInt(_0x325135(0x14f))/0x8)+-parseInt(_0x325135(0x14d))/0x9*(parseInt(_0x325135(0x150))/0xa);if(_0x184722===_0xec993b)break;else _0x4b265b['push'](_0x4b265b['shift']());}catch(_0x544d26){_0x4b265b['push'](_0x4b265b['shift']());}}}(a319_0x2d24,0xa1595));import{resolveOutputConfig}from'@lovrabet/cli-framework';function a319_0x2d24(){var _0x35f38f=['2127500ubUXcs','5241150EIEbLb','578921LYnsWd','compress','1505684hXeFSp','structuredErrors','18SVInud','3022017sgfRlK','56RRJOQr','764520cGjmxo','defaultFormat','flags','899HOHMfQ','334lXIdjB'];a319_0x2d24=function(){return _0x35f38f;};return a319_0x2d24();}function a319_0x402c(_0x303165,_0x17f86d){_0x303165=_0x303165-0x14b;var _0x2d24f9=a319_0x2d24();var _0x402c84=_0x2d24f9[_0x303165];return _0x402c84;}export function usesStructuredErrorOutput(_0xc4cbbf){var _0x2c1e7b=a319_0x402c;return _0xc4cbbf?.[_0x2c1e7b(0x14c)]===!![];}export function resolveErrorOutputFormat(_0x1af24c){var _0x42491b=a319_0x402c;if(!_0x1af24c['def'])return _0x1af24c[_0x42491b(0x151)]??_0x42491b(0x158);return resolveOutputConfig({'flags':_0x1af24c[_0x42491b(0x152)]??{},'def':_0x1af24c['def'],'configDefault':_0x1af24c['defaultFormat']})['format'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a320_0x12fa85=a320_0x3f20;(function(_0x54588f,_0x5a399b){const _0x243c81=a320_0x3f20,_0x230233=_0x54588f();while(!![]){try{const _0x5925d8=-parseInt(_0x243c81(0xe7))/0x1*(-parseInt(_0x243c81(0xe9))/0x2)+-parseInt(_0x243c81(0xec))/0x3+-parseInt(_0x243c81(0xef))/0x4+parseInt(_0x243c81(0xe8))/0x5+parseInt(_0x243c81(0xe5))/0x6+-parseInt(_0x243c81(0xe4))/0x7+parseInt(_0x243c81(0xe3))/0x8;if(_0x5925d8===_0x5a399b)break;else _0x230233['push'](_0x230233['shift']());}catch(_0x3926ee){_0x230233['push'](_0x230233['shift']());}}}(a320_0xa3df,0x9b1fa));function a320_0x3f20(_0x2ce443,_0x108e6d){_0x2ce443=_0x2ce443-0xe3;const _0xa3dff3=a320_0xa3df();let _0x3f2017=_0xa3dff3[_0x2ce443];return _0x3f2017;}const EXPLICIT_YES_COMMANDS=new Set(['menu\x20delete',a320_0x12fa85(0xea),'notification\x20config-update',a320_0x12fa85(0xeb)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a320_0x12fa85(0xe6);function a320_0xa3df(){const _0x84b617=['service','4325492bTvDIQ','11623728SmHQKM','5339887YTaksW','1088700BqktGU','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','866627zsICUZ','330540WnQgld','2Tmvlcz','kb\x20delete','notification\x20config-delete','262653buXLxy','has'];a320_0xa3df=function(){return _0x84b617;};return a320_0xa3df();}export function requiresExplicitYes(_0x3c9972){const _0x44e85a=a320_0x12fa85;return EXPLICIT_YES_COMMANDS[_0x44e85a(0xed)](_0x3c9972[_0x44e85a(0xee)]+'\x20'+_0x3c9972['command']);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a321_0x2aa7d8=a321_0x389e;(function(_0x1ee408,_0x256f1d){const _0x132d4b=a321_0x389e,_0x238e96=_0x1ee408();while(!![]){try{const _0x39ba4c=parseInt(_0x132d4b(0x162))/0x1+-parseInt(_0x132d4b(0x15f))/0x2+-parseInt(_0x132d4b(0x15c))/0x3+-parseInt(_0x132d4b(0x15e))/0x4+parseInt(_0x132d4b(0x161))/0x5*(-parseInt(_0x132d4b(0x160))/0x6)+-parseInt(_0x132d4b(0x15d))/0x7*(parseInt(_0x132d4b(0x166))/0x8)+parseInt(_0x132d4b(0x163))/0x9;if(_0x39ba4c===_0x256f1d)break;else _0x238e96['push'](_0x238e96['shift']());}catch(_0x532bb2){_0x238e96['push'](_0x238e96['shift']());}}}(a321_0x4b8f,0x6d8ad));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a321_0x389e(_0x553a32,_0xe548e2){_0x553a32=_0x553a32-0x15c;const _0x4b8ff6=a321_0x4b8f();let _0x389e52=_0x4b8ff6[_0x553a32];return _0x389e52;}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a321_0x2aa7d8(0x165)];export const validateFlags=helpers[a321_0x2aa7d8(0x164)];function a321_0x4b8f(){const _0x1c0e3d=['16SWbxdE','159009pYeirh','1878394XfkREZ','1236256UMOJID','559872JPqRqq','12CAjOki','1238420cryMuS','368846izHdgZ','15785046AMpBIK','validateFlags','parseFlags'];a321_0x4b8f=function(){return _0x1c0e3d;};return a321_0x4b8f();}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x543730,_0x4840de){const _0x1e1e21=a322_0x1aaa,_0x3c1965=_0x543730();while(!![]){try{const _0x3fca63=parseInt(_0x1e1e21(0x193))/0x1+-parseInt(_0x1e1e21(0x19e))/0x2+-parseInt(_0x1e1e21(0x1a2))/0x3*(-parseInt(_0x1e1e21(0x1a1))/0x4)+-parseInt(_0x1e1e21(0x197))/0x5*(parseInt(_0x1e1e21(0x195))/0x6)+-parseInt(_0x1e1e21(0x198))/0x7*(-parseInt(_0x1e1e21(0x1a0))/0x8)+-parseInt(_0x1e1e21(0x19d))/0x9*(-parseInt(_0x1e1e21(0x19f))/0xa)+parseInt(_0x1e1e21(0x199))/0xb;if(_0x3fca63===_0x4840de)break;else _0x3c1965['push'](_0x3c1965['shift']());}catch(_0x21d6ba){_0x3c1965['push'](_0x3c1965['shift']());}}}(a322_0x451e,0xbfb4c));function a322_0x1aaa(_0x8cba9a,_0x19a2ab){_0x8cba9a=_0x8cba9a-0x191;const _0x451e7f=a322_0x451e();let _0x1aaabf=_0x451e7f[_0x8cba9a];return _0x1aaabf;}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 _0x276fa1=a322_0x1aaa;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x49acb4=>serviceGroups[_0x276fa1(0x1a3)](_0x49acb4),'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x276fa1(0x1a4)+CLI_BIN_NAME+_0x276fa1(0x192),'serviceUsageSuffix':_0x276fa1(0x191)});}export function generateCommandHelp(_0x424871){const _0x5cef53=a322_0x1aaa,_0x11eb51=createGenerators()[_0x5cef53(0x194)](_0x424871);if(!requiresExplicitYes(_0x424871))return _0x11eb51;return _0x11eb51[_0x5cef53(0x19c)](_0x5cef53(0x196),_0x5cef53(0x19b));}export function generateServiceHelp(_0x16a087){return createGenerators()['generateServiceHelp'](_0x16a087);}export function generateFullHelp(){const _0x48f5fa=a322_0x1aaa;return createGenerators()[_0x48f5fa(0x19a)]();}function a322_0x451e(){const _0x4a170=['\x20workspace\x20init`\x20or\x20--appcode).','97549zdLQNy','generateCommandHelp','342JMlLLC','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','133555obLoBT','322QhqzDe','12327909pMlfMu','generateFullHelp','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','replace','2107305lTiczR','1093438XVDpdI','50qRYsRc','13528cpoEXs','140Rqnbey','33231glTASN','get','Requires\x20appcode\x20(set\x20via\x20`','\x20[args]\x20[flags]'];a322_0x451e=function(){return _0x4a170;};return a322_0x451e();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2277d6,_0x9bee73){var _0xaa9f0c=a323_0x7b4d,_0x2d5e61=_0x2277d6();while(!![]){try{var _0x142ec6=-parseInt(_0xaa9f0c(0x132))/0x1*(-parseInt(_0xaa9f0c(0x135))/0x2)+parseInt(_0xaa9f0c(0x134))/0x3*(-parseInt(_0xaa9f0c(0x130))/0x4)+-parseInt(_0xaa9f0c(0x133))/0x5+-parseInt(_0xaa9f0c(0x12f))/0x6+-parseInt(_0xaa9f0c(0x137))/0x7+-parseInt(_0xaa9f0c(0x136))/0x8+parseInt(_0xaa9f0c(0x131))/0x9;if(_0x142ec6===_0x9bee73)break;else _0x2d5e61['push'](_0x2d5e61['shift']());}catch(_0x5f33a4){_0x2d5e61['push'](_0x2d5e61['shift']());}}}(a323_0x4b15,0x2b3b6));export{runCommand}from'../framework/runner.js';function a323_0x7b4d(_0x4ed1ea,_0x20629f){_0x4ed1ea=_0x4ed1ea-0x12f;var _0x4b1519=a323_0x4b15();var _0x7b4d9e=_0x4b1519[_0x4ed1ea];return _0x7b4d9e;}export{parseFlags,validateFlags}from'../framework/flags.js';function a323_0x4b15(){var _0x117f75=['4HSeZsl','8453718kcVZPF','3IcbTxf','1003570HVWlLO','1019778HCriEO','13986lkLoxr','113184JtpKba','55587eSlBpj','1322844KJhzIU'];a323_0x4b15=function(){return _0x117f75;};return a323_0x4b15();}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';
|