@lovrabet/rabetbase-cli 2.5.5 → 2.5.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/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.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- 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/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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +7 -0
- 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.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- 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/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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -4
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a3d54,_0x149e6e){const _0x134c94=a297_0x342f,_0x5ae348=_0x3a3d54();while(!![]){try{const _0x31008b=-parseInt(_0x134c94(0x15b))/0x1+parseInt(_0x134c94(0x157))/0x2+-parseInt(_0x134c94(0x150))/0x3+-parseInt(_0x134c94(0x154))/0x4+parseInt(_0x134c94(0x156))/0x5+parseInt(_0x134c94(0x15d))/0x6*(-parseInt(_0x134c94(0x15a))/0x7)+parseInt(_0x134c94(0x14f))/0x8*(parseInt(_0x134c94(0x151))/0x9);if(_0x31008b===_0x149e6e)break;else _0x5ae348['push'](_0x5ae348['shift']());}catch(_0x19d315){_0x5ae348['push'](_0x5ae348['shift']());}}}(a297_0x441e,0xdfb4c));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x29a962,_0x1a6929){const _0x147b88=a297_0x342f,_0x456bc5={'apps':_0x29a962['apps']&&typeof _0x29a962[_0x147b88(0x159)]===_0x147b88(0x14c)?_0x29a962['apps']:{}};let _0x1d5350=_0x456bc5[_0x147b88(0x159)][_0x1a6929];if(!_0x1d5350)return _0x1d5350={'lastSync':'','pages':{}},_0x456bc5[_0x147b88(0x159)][_0x1a6929]=_0x1d5350,{'lockData':_0x456bc5,'appLock':_0x1d5350};return!_0x1d5350[_0x147b88(0x15c)]&&(_0x1d5350[_0x147b88(0x15c)]=''),(!_0x1d5350[_0x147b88(0x155)]||typeof _0x1d5350[_0x147b88(0x155)]!=='object')&&(_0x1d5350[_0x147b88(0x155)]={}),{'lockData':_0x456bc5,'appLock':_0x1d5350};}export async function readPageLockFile(_0x31d37b){const _0x38eec7=a297_0x342f;try{const _0x48af65=await readFile(_0x31d37b,_0x38eec7(0x14b)),_0x3b79ed=JSON[_0x38eec7(0x152)](_0x48af65);return{'apps':_0x3b79ed[_0x38eec7(0x159)]&&typeof _0x3b79ed[_0x38eec7(0x159)]===_0x38eec7(0x14c)?_0x3b79ed[_0x38eec7(0x159)]:{}};}catch(_0x1b1ac1){if(_0x1b1ac1[_0x38eec7(0x153)]===_0x38eec7(0x14e))return null;throw new Error(_0x38eec7(0x14d)+String(_0x1b1ac1));}}export async function writePageLockFile(_0x2c4c74,_0x5270c0){const _0x1e2e72=a297_0x342f;await mkdir(dirname(_0x2c4c74),{'recursive':!![]}),await writeFile(_0x2c4c74,JSON[_0x1e2e72(0x158)](_0x5270c0,null,0x2),'utf8');}function a297_0x342f(_0x4e42ff,_0xda162c){_0x4e42ff=_0x4e42ff-0x14b;const _0x441e93=a297_0x441e();let _0x342f51=_0x441e93[_0x4e42ff];return _0x342f51;}function a297_0x441e(){const _0x4fe1a5=['lastSync','54uKUQzt','utf8','object','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','ENOENT','1136EBWdbm','5423649CtUobT','182718MKSGwo','parse','code','1682028NZDzSY','pages','6839055AbXAre','312838woPfPo','stringify','apps','675381NKjwwZ','394077VfKKRg'];a297_0x441e=function(){return _0x4fe1a5;};return a297_0x441e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45ce06,_0x1e66e6){const _0x577dc4=a298_0x5db3,_0x23309c=_0x45ce06();while(!![]){try{const _0x45c65b=-parseInt(_0x577dc4(0x17d))/0x1+parseInt(_0x577dc4(0x18e))/0x2*(-parseInt(_0x577dc4(0x198))/0x3)+parseInt(_0x577dc4(0x17a))/0x4*(-parseInt(_0x577dc4(0x17f))/0x5)+parseInt(_0x577dc4(0x192))/0x6+-parseInt(_0x577dc4(0x18b))/0x7*(-parseInt(_0x577dc4(0x171))/0x8)+-parseInt(_0x577dc4(0x19c))/0x9*(-parseInt(_0x577dc4(0x174))/0xa)+parseInt(_0x577dc4(0x18f))/0xb*(-parseInt(_0x577dc4(0x18d))/0xc);if(_0x45c65b===_0x1e66e6)break;else _0x23309c['push'](_0x23309c['shift']());}catch(_0x988fda){_0x23309c['push'](_0x23309c['shift']());}}}(a298_0x2888,0x7ff97));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x2a29b1,_0x40a5cc,_0xa7e762){const _0x5ec682=a298_0x5db3,_0xde9794=parseSchema(_0x2a29b1,_0x5ec682(0x182)),_0x1fe053=parseSchema(_0x40a5cc,'remote'),_0x5c266d=collectLrSmartJsx(_0xde9794,!![]);if(_0x5c266d[_0x5ec682(0x172)]===0x0)return{'content':_0x2a29b1,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x2b37f5=new Map(collectLrSmartJsx(_0x1fe053)['map'](_0x469e70=>[_0x469e70[_0x5ec682(0x19b)],_0x469e70]));let _0x39700f=0x0,_0x5f0878=0x0;for(const _0x1c7b65 of _0x5c266d){const _0xd6b354=readNonEmptyString(_0x1c7b65[_0x5ec682(0x194)][_0x5ec682(0x184)]),_0x5bb92f=readNonEmptyString(_0x1c7b65['render'][_0x5ec682(0x197)]),_0x29682c=_0x2b37f5[_0x5ec682(0x196)](_0x1c7b65[_0x5ec682(0x19b)]),_0x2e97dd=readNonEmptyString(_0x29682c?.['render']['source']),_0x286cda=readNonEmptyString(_0x29682c?.[_0x5ec682(0x194)][_0x5ec682(0x197)]);let _0x4f0e96=![];_0x1c7b65['render'][_0x5ec682(0x177)]!=='JSFunction'&&(_0x1c7b65[_0x5ec682(0x194)]['type']=_0x5ec682(0x18a),_0x4f0e96=!![]);!isPageContextExpression(_0x1c7b65[_0x5ec682(0x190)]['_context'])&&(_0x1c7b65[_0x5ec682(0x190)]['_context']={'type':_0x5ec682(0x19a),'value':_0x5ec682(0x178)},_0x4f0e96=!![]);if(!_0xd6b354){if(!_0x5bb92f)throw CliErrors[_0x5ec682(0x18c)](_0x5ec682(0x185)+_0x1c7b65[_0x5ec682(0x17b)]+_0x5ec682(0x17c),_0x5ec682(0x181));if(_0x4f0e96)_0x5f0878+=0x1;continue;}const _0x19c65e=!_0x29682c||_0xd6b354!==_0x2e97dd,_0x467865=!_0x5bb92f;if(!_0x19c65e&&_0x5bb92f&&_0x286cda&&_0x5bb92f!==_0x286cda)throw CliErrors[_0x5ec682(0x18c)]('LrSmartJsx\x20node\x20\x22'+_0x1c7b65[_0x5ec682(0x17b)]+'\x22\x20has\x20a\x20manually\x20changed\x20render.value.',_0x5ec682(0x179));if(_0x19c65e||_0x467865||!_0x286cda){const _0xffe2f8=readNonEmptyString(await _0xa7e762(_0xd6b354));if(!_0xffe2f8)throw CliErrors[_0x5ec682(0x175)](_0x5ec682(0x19f)+_0x1c7b65[_0x5ec682(0x17b)]+'\x22.');_0x1c7b65[_0x5ec682(0x194)][_0x5ec682(0x197)]=_0xffe2f8,_0x39700f+=0x1,_0x4f0e96=!![];}if(_0x4f0e96)_0x5f0878+=0x1;}if(_0x5f0878===0x0)return{'content':_0x2a29b1,'compiledNodes':_0x39700f,'normalizedNodes':_0x5f0878};return{'content':JSON[_0x5ec682(0x173)](_0xde9794),'compiledNodes':_0x39700f,'normalizedNodes':_0x5f0878};}function parseSchema(_0x5ea8d6,_0x4aaaa3){const _0x383870=a298_0x5db3;try{return JSON[_0x383870(0x19d)](_0x5ea8d6);}catch{throw CliErrors[_0x383870(0x18c)](_0x383870(0x193)+_0x4aaaa3+_0x383870(0x189));}}function collectLrSmartJsx(_0x3f136d,_0x5c6ec7=![]){const _0x45ea2b=[],_0x1f44c5=(_0x31e6b1,_0x47a2d6)=>{const _0x4942b5=a298_0x5db3;if(Array[_0x4942b5(0x186)](_0x31e6b1)){_0x31e6b1[_0x4942b5(0x191)]((_0xa492db,_0x4351a6)=>_0x1f44c5(_0xa492db,_0x47a2d6+'['+_0x4351a6+']'));return;}if(!isObject(_0x31e6b1))return;if(_0x31e6b1['componentName']===_0x4942b5(0x199)){const _0x230e61=readNonEmptyString(_0x31e6b1['id']),_0x21ecf8=_0x230e61||_0x47a2d6,_0x117151=isObject(_0x31e6b1[_0x4942b5(0x190)])?_0x31e6b1[_0x4942b5(0x190)]:undefined;if(!_0x117151){if(_0x5c6ec7)throw CliErrors[_0x4942b5(0x18c)](_0x4942b5(0x185)+_0x21ecf8+'\x22\x20has\x20missing\x20or\x20invalid\x20props.',_0x4942b5(0x176));return;}const _0x3b1234=isObject(_0x117151[_0x4942b5(0x194)])?_0x117151[_0x4942b5(0x194)]:undefined;if(!_0x3b1234){if(_0x5c6ec7)throw CliErrors[_0x4942b5(0x18c)](_0x4942b5(0x185)+_0x21ecf8+_0x4942b5(0x19e),_0x4942b5(0x180));return;}_0x45ea2b[_0x4942b5(0x187)]({'key':_0x230e61?_0x4942b5(0x188)+_0x230e61:_0x4942b5(0x195)+_0x47a2d6,'label':_0x21ecf8,'props':_0x117151,'render':_0x3b1234});}for(const [_0x820914,_0x4eb846]of Object['entries'](_0x31e6b1)){if(_0x820914===_0x4942b5(0x190)&&_0x31e6b1[_0x4942b5(0x17e)]===_0x4942b5(0x199))continue;_0x1f44c5(_0x4eb846,_0x47a2d6+'.'+_0x820914);}};return _0x1f44c5(_0x3f136d,'$'),_0x45ea2b;}function isObject(_0x1bc500){const _0x293226=a298_0x5db3;return Boolean(_0x1bc500)&&typeof _0x1bc500===_0x293226(0x183)&&!Array[_0x293226(0x186)](_0x1bc500);}function a298_0x5db3(_0x5f3fa9,_0x2b9b59){_0x5f3fa9=_0x5f3fa9-0x171;const _0x288879=a298_0x2888();let _0x5db3fe=_0x288879[_0x5f3fa9];return _0x5db3fe;}function a298_0x2888(){const _0x2e7b70=['path:','get','value','24oCCpZr','LrSmartJsx','JSExpression','key','188217CHHOfj','parse','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','7892920OeQdEA','length','stringify','470UMhngO','apiError','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','type','this','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','4XVZGjE','label','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','734062ANXbfg','componentName','3769975LbDXUp','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','local','object','source','LrSmartJsx\x20node\x20\x22','isArray','push','id:','\x20page\x20schema.','JSFunction','7yIjMXP','validation','1962516ItEfpG','68434ZjXbcQ','33ZHGEzs','props','forEach','4842474FRjMpu','Invalid\x20JSON\x20in\x20','render'];a298_0x2888=function(){return _0x2e7b70;};return a298_0x2888();}function readNonEmptyString(_0x3e064c){return typeof _0x3e064c==='string'&&_0x3e064c['trim']()?_0x3e064c:undefined;}function isPageContextExpression(_0x47c450){const _0x501691=a298_0x5db3;return isObject(_0x47c450)&&_0x47c450['type']===_0x501691(0x19a)&&_0x47c450['value']===_0x501691(0x178);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x24ba25,_0x353df4){const _0x403af9=a295_0x515a,_0x1db17d=_0x24ba25();while(!![]){try{const _0x24e394=parseInt(_0x403af9(0x1e7))/0x1*(-parseInt(_0x403af9(0x202))/0x2)+-parseInt(_0x403af9(0x21c))/0x3+-parseInt(_0x403af9(0x1e5))/0x4+-parseInt(_0x403af9(0x220))/0x5+parseInt(_0x403af9(0x1f0))/0x6+parseInt(_0x403af9(0x222))/0x7*(parseInt(_0x403af9(0x229))/0x8)+parseInt(_0x403af9(0x21b))/0x9*(parseInt(_0x403af9(0x218))/0xa);if(_0x24e394===_0x353df4)break;else _0x1db17d['push'](_0x1db17d['shift']());}catch(_0x10781e){_0x1db17d['push'](_0x1db17d['shift']());}}}(a295_0x15b0,0x382ea));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x1d22f7,_0x2dd330){const _0x40e352=a295_0x515a,_0x57c8e2=[],_0x23179a=normalizeSqlForStaticAnalysis(_0x1d22f7),_0x19d6ca=(_0x23179a['error']?[]:extractJoinFacts(_0x23179a['sql']))[_0x40e352(0x217)](_0x93f9a3=>{const _0x24e9fa=_0x40e352;if(_0x93f9a3[_0x24e9fa(0x22f)]||_0x93f9a3[_0x24e9fa(0x20a)]['length']===0x0)return _0x57c8e2[_0x24e9fa(0x216)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':_0x93f9a3[_0x24e9fa(0x210)]??_0x24e9fa(0x1ee)}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3['columns'],'status':_0x24e9fa(0x209)};const _0x2a002b=resolveTableMetadata(_0x2dd330,_0x93f9a3[_0x24e9fa(0x205)]),_0x2b1f31=(_0x2a002b?.[_0x24e9fa(0x212)]??[])[_0x24e9fa(0x217)](_0x2b5ed4=>({'index':_0x2b5ed4,'matchedPrefix':findEqualityPrefix(_0x2b5ed4[_0x24e9fa(0x20a)],_0x93f9a3[_0x24e9fa(0x20a)])}))[_0x24e9fa(0x1ed)](_0x593258=>_0x593258['matchedPrefix'][_0x24e9fa(0x22d)]>0x0),_0x1c36fc=_0x2b1f31[_0x24e9fa(0x1f9)]((_0x3d2168,_0x2aa58c)=>!_0x3d2168||_0x2aa58c[_0x24e9fa(0x206)]['length']>_0x3d2168['matchedPrefix'][_0x24e9fa(0x22d)]?_0x2aa58c:_0x3d2168,_0x2b1f31[0x0]);if(_0x1c36fc)return{'table':_0x93f9a3['table'],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x1fd),'matchedIndex':{..._0x1c36fc['index'],'matchedPrefix':_0x1c36fc[_0x24e9fa(0x206)]}};const _0x2532f9=_0x2a002b?.[_0x24e9fa(0x212)]['filter'](_0x3c1ea4=>_0x3c1ea4[_0x24e9fa(0x20a)][_0x24e9fa(0x1f6)](_0x4a546b=>_0x93f9a3[_0x24e9fa(0x20a)][_0x24e9fa(0x1f6)](_0x40fa88=>columnNamesMatch(_0x4a546b,_0x40fa88))))??[];if(_0x2532f9[_0x24e9fa(0x22d)]>0x0)return _0x57c8e2['push']({'code':_0x24e9fa(0x226),'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x201),'candidateIndexes':_0x2532f9};if(_0x2a002b&&_0x2a002b['metadataAvailable']!==![]&&_0x2a002b[_0x24e9fa(0x212)][_0x24e9fa(0x22d)]>0x0&&_0x93f9a3[_0x24e9fa(0x20a)][_0x24e9fa(0x22d)]>0x0)return _0x57c8e2[_0x24e9fa(0x216)]({'code':_0x24e9fa(0x22a),'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'status':_0x24e9fa(0x201)};return _0x57c8e2[_0x24e9fa(0x216)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x93f9a3[_0x24e9fa(0x205)],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3[_0x24e9fa(0x20a)],'reason':_0x2a002b?_0x24e9fa(0x1e9):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x93f9a3['table'],'alias':_0x93f9a3[_0x24e9fa(0x1fc)],'columns':_0x93f9a3['columns'],'status':_0x24e9fa(0x209)};});return{'checked':_0x19d6ca['length']>0x0,'joins':_0x19d6ca,'warnings':_0x57c8e2};}function extractJoinFacts(_0x61a013){const _0x270436=a295_0x515a,_0x51cef4=maskNestedQueries(stripSqlNoise(_0x61a013)),_0x1e09ed=maskQuotedIdentifiers(_0x51cef4),_0x549e49=[],_0x202280=new Set(),_0x1edae7=/\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 _0x4444ea of _0x51cef4[_0x270436(0x224)](_0x1edae7)){const _0x1425ee=_0x4444ea[_0x270436(0x214)]??0x0,_0x3b96ce=_0x4444ea[0x0][_0x270436(0x21f)](/\bJOIN\b/i),_0x51b3dd=_0x1425ee+Math[_0x270436(0x1f2)](0x0,_0x3b96ce);if(!/^JOIN\b/i[_0x270436(0x1f8)](_0x1e09ed['slice'](_0x51b3dd)))continue;_0x202280[_0x270436(0x1fa)](_0x51b3dd);const _0x13fa66=normalizeIdentifier(_0x4444ea[0x1]||_0x270436(0x225)),_0x454d9b=normalizeIdentifier(_0x4444ea[0x2]??''),_0x592d34=normalizeIdentifier(_0x4444ea[0x3]||_0x454d9b[_0x270436(0x22e)]('.')['at'](-0x1)||_0x454d9b),_0x4ad2f3=[],_0x4afe3b=_0x454d9b===_0x270436(0x1ef);let _0x3e48cf=_0x13fa66===_0x270436(0x1e8)||_0x13fa66===_0x270436(0x204)||_0x4afe3b,_0xdcb82a=_0x3e48cf?_0x4afe3b?_0x270436(0x22c):_0x13fa66[_0x270436(0x1f5)]()+_0x270436(0x208):undefined;const _0x570d2e=stripOuterParentheses(_0x4444ea[0x4]??''),_0x1c2b26=_0x570d2e[_0x270436(0x1f7)](MYBATIS_DYNAMIC_START_MARKER)||_0x570d2e['includes'](MYBATIS_DYNAMIC_END_MARKER),_0xf6772a=_0x570d2e['includes'](MYBATIS_INCLUDE_MARKER);_0x1c2b26&&(_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x1fe));_0xf6772a&&(_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x20e));const _0xe54fe5=_0x570d2e[_0x270436(0x227)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x270436(0x227)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0xe54fe5,'OR')&&(_0x3e48cf=!![],_0xdcb82a??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x5d823f of splitTopLevelAnd(_0xe54fe5)){const _0xd44f6a=stripOuterParentheses(_0x5d823f);if(hasTopLevelKeyword(_0xd44f6a,'OR')){_0x3e48cf=!![],_0xdcb82a??=_0x270436(0x1ec);continue;}const _0x490015=splitEquality(_0xd44f6a);if(!_0x490015){containsColumnReference(_0x5d823f,_0x592d34)&&(_0x3e48cf=!![]);continue;}const _0x1ef697=parseDirectColumnReference(_0x490015[0x0],_0x592d34),_0x277e3d=parseDirectColumnReference(_0x490015[0x1],_0x592d34),_0x360e45=containsColumnReference(_0x490015[0x0],_0x592d34),_0xfc0ae3=containsColumnReference(_0x490015[0x1],_0x592d34),_0x508720=_0x1ef697&&!_0xfc0ae3?_0x1ef697:_0x277e3d&&!_0x360e45?_0x277e3d:null;if(_0x508720&&!_0x4ad2f3[_0x270436(0x1f7)](_0x508720))_0x4ad2f3['push'](_0x508720);else!_0x508720&&containsColumnReference(_0x5d823f,_0x592d34)&&(_0x3e48cf=!![]);}_0x549e49['push']({'table':_0x454d9b,'alias':_0x592d34,'columns':_0x4ad2f3,'unsupportedPredicate':_0x3e48cf,'unsupportedReason':_0xdcb82a,'containsUnresolvedInclude':_0xf6772a,'position':_0x51b3dd});}for(const _0x2f49fc of _0x1e09ed[_0x270436(0x224)](/\bJOIN\b/gi)){const _0x3ee1e9=_0x2f49fc['index']??0x0;if(_0x202280['has'](_0x3ee1e9))continue;const _0x229991=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x270436(0x21a)](_0x51cef4['slice'](_0x3ee1e9+_0x2f49fc[0x0][_0x270436(0x22d)])),_0x5080b4=normalizeIdentifier(_0x229991?.[0x1]||_0x270436(0x215)),_0x32571f=normalizeIdentifier(_0x229991?.[0x2]||''),_0x2233e8=isSqlClauseKeyword(_0x32571f)?_0x5080b4[_0x270436(0x22e)]('.')['at'](-0x1)||_0x5080b4:_0x32571f||_0x5080b4['split']('.')['at'](-0x1)||_0x5080b4;_0x549e49['push']({'table':_0x5080b4,'alias':_0x2233e8,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x270436(0x20b),'position':_0x3ee1e9});}const _0x2ea90b=_0x1e09ed[_0x270436(0x1f3)](MYBATIS_INCLUDE_MARKER);return _0x2ea90b>=0x0&&!_0x549e49[_0x270436(0x1f6)](_0x2c2ba2=>_0x2c2ba2[_0x270436(0x20f)])&&_0x549e49['push']({'table':_0x270436(0x215),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x270436(0x21d),'containsUnresolvedInclude':!![],'position':_0x2ea90b}),_0x549e49['sort']((_0x4caf08,_0x17dd82)=>_0x4caf08[_0x270436(0x21e)]-_0x17dd82['position']);}function stripSqlNoise(_0x4fae9a){const _0x16c722=a295_0x515a,_0x178dc0=Array[_0x16c722(0x1f4)](_0x4fae9a),_0x3aaaf3=(_0x54b7c9,_0x18da17)=>{for(let _0x4c6108=_0x54b7c9;_0x4c6108<_0x18da17;_0x4c6108+=0x1){_0x178dc0[_0x4c6108]!=='\x0a'&&_0x178dc0[_0x4c6108]!=='\x0d'&&(_0x178dc0[_0x4c6108]='\x20');}};for(let _0xd1ed45=0x0;_0xd1ed45<_0x178dc0[_0x16c722(0x22d)];_0xd1ed45+=0x1){const _0x4397de=_0x178dc0[_0xd1ed45],_0x4757a7=_0x178dc0[_0xd1ed45+0x1];if(_0x4397de==='\x27'||_0x4397de==='\x22'||_0x4397de==='`'){const _0x451b72=_0x4397de,_0x4eb4fc=_0xd1ed45;_0xd1ed45+=0x1;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]){if(_0x178dc0[_0xd1ed45]==='\x5c'&&_0xd1ed45+0x1<_0x178dc0['length']){_0xd1ed45+=0x2;continue;}if(_0x178dc0[_0xd1ed45]!==_0x451b72){_0xd1ed45+=0x1;continue;}if(_0x178dc0[_0xd1ed45+0x1]===_0x451b72){_0xd1ed45+=0x2;continue;}break;}if(_0x451b72==='\x27')_0x3aaaf3(_0x4eb4fc,Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0['length']));continue;}if(_0x4397de==='-'&&_0x4757a7==='-'){const _0x4705d2=_0xd1ed45;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&_0x178dc0[_0xd1ed45]!=='\x0a')_0xd1ed45+=0x1;_0x3aaaf3(_0x4705d2,_0xd1ed45);continue;}if(_0x4397de==='/'&&_0x4757a7==='*'){const _0x23eae6=_0xd1ed45;_0xd1ed45+=0x2;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&!(_0x178dc0[_0xd1ed45]==='*'&&_0x178dc0[_0xd1ed45+0x1]==='/')){_0xd1ed45+=0x1;}_0xd1ed45=Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0[_0x16c722(0x22d)]-0x1),_0x3aaaf3(_0x23eae6,_0xd1ed45+0x1);continue;}if(_0x4397de==='#'&&_0x4757a7!=='{'){const _0x539818=_0xd1ed45;while(_0xd1ed45<_0x178dc0[_0x16c722(0x22d)]&&_0x178dc0[_0xd1ed45]!=='\x0a')_0xd1ed45+=0x1;_0x3aaaf3(_0x539818,_0xd1ed45);continue;}if((_0x4397de==='#'||_0x4397de==='$')&&_0x4757a7==='{'){const _0x2830f7=_0xd1ed45;_0xd1ed45+=0x2;while(_0xd1ed45<_0x178dc0['length']&&_0x178dc0[_0xd1ed45]!=='}')_0xd1ed45+=0x1;_0x3aaaf3(_0x2830f7,Math[_0x16c722(0x20c)](_0xd1ed45+0x1,_0x178dc0[_0x16c722(0x22d)]));}}return _0x178dc0[_0x16c722(0x1eb)]('');}function maskQuotedIdentifiers(_0x707068){const _0x31cddc=a295_0x515a,_0x2bc811=Array['from'](_0x707068);for(let _0x4c9762=0x0;_0x4c9762<_0x2bc811[_0x31cddc(0x22d)];_0x4c9762+=0x1){const _0x370fa6=_0x2bc811[_0x4c9762];if(_0x370fa6!=='\x22'&&_0x370fa6!=='`')continue;_0x4c9762+=0x1;while(_0x4c9762<_0x2bc811[_0x31cddc(0x22d)]){if(_0x2bc811[_0x4c9762]===_0x370fa6){if(_0x2bc811[_0x4c9762+0x1]===_0x370fa6){_0x2bc811[_0x4c9762]='\x20',_0x2bc811[_0x4c9762+0x1]='\x20',_0x4c9762+=0x2;continue;}break;}_0x2bc811[_0x4c9762]='\x20',_0x4c9762+=0x1;}}return _0x2bc811['join']('');}function maskNestedQueries(_0x180abf){const _0xf5f17e=a295_0x515a,_0x2fc068=Array[_0xf5f17e(0x1f4)](_0x180abf);for(let _0x4a8872=0x0;_0x4a8872<_0x2fc068[_0xf5f17e(0x22d)];_0x4a8872+=0x1){if(_0x2fc068[_0x4a8872]!=='(')continue;const _0x213542=_0x180abf[_0xf5f17e(0x219)](_0x4a8872+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x213542))continue;let _0x194193=0x1,_0x1b8ceb=_0x4a8872+0x1;for(;_0x1b8ceb<_0x2fc068['length']&&_0x194193>0x0;_0x1b8ceb+=0x1){if(_0x2fc068[_0x1b8ceb]==='(')_0x194193+=0x1;if(_0x2fc068[_0x1b8ceb]===')')_0x194193-=0x1;}if(_0x194193!==0x0)continue;for(let _0x85bb1e=_0x4a8872;_0x85bb1e<_0x1b8ceb;_0x85bb1e+=0x1){_0x2fc068[_0x85bb1e]='\x20';}const _0x23b811=_0xf5f17e(0x1ef);for(let _0x18573c=0x0;_0x18573c<_0x23b811[_0xf5f17e(0x22d)]&&_0x4a8872+_0x18573c<_0x1b8ceb;_0x18573c+=0x1){_0x2fc068[_0x4a8872+_0x18573c]=_0x23b811[_0x18573c];}_0x4a8872=_0x1b8ceb-0x1;}return _0x2fc068['join']('');}function splitTopLevelAnd(_0x2d349a){const _0xcb55ef=a295_0x515a,_0x7a18b1=[];let _0x2483ff=0x0,_0x4d9346=0x0;for(let _0x538c21=0x0;_0x538c21<_0x2d349a['length'];_0x538c21+=0x1){const _0x1fe354=_0x2d349a[_0x538c21];if(_0x1fe354==='(')_0x2483ff+=0x1;if(_0x1fe354===')')_0x2483ff=Math['max'](0x0,_0x2483ff-0x1);_0x2483ff===0x0&&_0x2d349a['slice'](_0x538c21)[_0xcb55ef(0x20d)](/^AND\b/i)&&(_0x538c21===0x0||/\s/[_0xcb55ef(0x1f8)](_0x2d349a[_0x538c21-0x1]??''))&&(_0x7a18b1['push'](_0x2d349a['slice'](_0x4d9346,_0x538c21)[_0xcb55ef(0x1ea)]()),_0x538c21+=0x2,_0x4d9346=_0x538c21+0x1);}const _0x3f4960=_0x2d349a[_0xcb55ef(0x219)](_0x4d9346)[_0xcb55ef(0x1ea)]();if(_0x3f4960)_0x7a18b1[_0xcb55ef(0x216)](_0x3f4960);return _0x7a18b1;}function hasTopLevelKeyword(_0x4bbfbe,_0x2800a3){const _0x52030f=a295_0x515a;let _0x253a2e=0x0;for(let _0x1bc7fa=0x0;_0x1bc7fa<_0x4bbfbe[_0x52030f(0x22d)];_0x1bc7fa+=0x1){const _0x2677e6=_0x4bbfbe[_0x1bc7fa];if(_0x2677e6==='(')_0x253a2e+=0x1;if(_0x2677e6===')')_0x253a2e=Math[_0x52030f(0x1f2)](0x0,_0x253a2e-0x1);if(_0x253a2e!==0x0)continue;const _0x42df47=_0x4bbfbe['slice'](_0x1bc7fa,_0x1bc7fa+_0x2800a3['length']),_0x4bd65a=_0x4bbfbe[_0x1bc7fa-0x1]??'\x20',_0x36ba19=_0x4bbfbe[_0x1bc7fa+_0x2800a3[_0x52030f(0x22d)]]??'\x20';if(_0x42df47[_0x52030f(0x1f5)]()===_0x2800a3[_0x52030f(0x1f5)]()&&!/[\w$]/['test'](_0x4bd65a)&&!/[\w$]/[_0x52030f(0x1f8)](_0x36ba19))return!![];}return![];}function splitEquality(_0x589b5b){const _0x4d9fd2=a295_0x515a,_0xc34982=stripOuterParentheses(_0x589b5b);let _0x85ac7=0x0,_0x3cecb2;for(let _0x3b66ea=0x0;_0x3b66ea<_0xc34982[_0x4d9fd2(0x22d)];_0x3b66ea+=0x1){const _0x11b9f6=_0xc34982[_0x3b66ea];if(_0x11b9f6==='(')_0x85ac7+=0x1;if(_0x11b9f6===')')_0x85ac7=Math[_0x4d9fd2(0x1f2)](0x0,_0x85ac7-0x1);const _0x5789d6=_0xc34982[_0x3b66ea-0x1]??'',_0x139499=_0xc34982[_0x3b66ea+0x1]??'';if(_0x11b9f6==='='&&_0x85ac7===0x0&&!/[!<>=:]/[_0x4d9fd2(0x1f8)](_0x5789d6)&&_0x139499!=='='){if(_0x3cecb2!==undefined)return null;_0x3cecb2=_0x3b66ea;}}return _0x3cecb2===undefined?null:[_0xc34982['slice'](0x0,_0x3cecb2)[_0x4d9fd2(0x1ea)](),_0xc34982['slice'](_0x3cecb2+0x1)[_0x4d9fd2(0x1ea)]()];}function parseDirectColumnReference(_0x23a736,_0x20a982){const _0x1c35e8=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x23a736));if(!_0x1c35e8)return null;if(normalizeIdentifier(_0x1c35e8[0x1]??'')!==normalizeIdentifier(_0x20a982))return null;return normalizeIdentifier(_0x1c35e8[0x2]??'');}function containsColumnReference(_0x2b9c27,_0x1c56bd){const _0x137d71=a295_0x515a,_0xcfa019=_0x2b9c27[_0x137d71(0x211)](/[`"]/g,''),_0x211099=_0x1c56bd['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x137d71(0x1ff)+_0x211099+_0x137d71(0x213),'i')['test'](_0xcfa019);}function a295_0x15b0(){const _0x2bc60a=['has','full','table','matchedPrefix','using','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','unavailable','columns','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','min','match','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','containsUnresolvedInclude','unsupportedReason','replace','indexes','\x5cs*\x5c.\x5cs*[\x5cw$]+','index','unknown','push','map','5905630EQhuvW','slice','exec','9cbNOTL','1369431RzUcvb','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','position','search','603425xMCmtv','toLowerCase','26159IhIbFC','tableName','matchAll','INNER','JOIN_INDEX_NOT_USABLE','replaceAll','startsWith','144TQqBoD','JOIN_INDEX_MISSING','cross','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','length','split','unsupportedPredicate','558996uOxgae','inner','1yNxPHI','right','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','trim','join','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','filter','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','__sq__','2475342MEiBZj','left','max','indexOf','from','toUpperCase','some','includes','test','reduce','add','where','alias','covered','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','(?:^|[^\x5cw$])','natural','warning','246706MBTjlM'];a295_0x15b0=function(){return _0x2bc60a;};return a295_0x15b0();}function findEqualityPrefix(_0x33763c,_0x5173a2){const _0x171b54=a295_0x515a,_0x523fd7=new Set(_0x5173a2['map'](normalizeIdentifier)),_0x5614a0=[];for(const _0x452f76 of _0x33763c){if(!_0x523fd7[_0x171b54(0x203)](normalizeIdentifier(_0x452f76)))break;_0x5614a0['push'](_0x452f76);}return _0x5614a0;}function resolveTableMetadata(_0x456e4f,_0xf85526){const _0x1617ad=a295_0x515a,_0x2741a3=normalizeIdentifier(_0xf85526),_0x4c80cf=_0x456e4f[_0x1617ad(0x1ed)](_0x40888c=>normalizeIdentifier(_0x40888c[_0x1617ad(0x223)])===_0x2741a3);if(_0x4c80cf[_0x1617ad(0x22d)]===0x1)return _0x4c80cf[0x0];const _0x15c7e7=_0x2741a3[_0x1617ad(0x1f7)]('.'),_0x28946e=_0x2741a3['split']('.')['at'](-0x1),_0x268191=_0x456e4f[_0x1617ad(0x1ed)](_0x1e690b=>{const _0x10eb1d=_0x1617ad,_0x2cd4c0=normalizeIdentifier(_0x1e690b[_0x10eb1d(0x223)]);if(_0x15c7e7&&_0x2cd4c0['includes']('.'))return![];return _0x2cd4c0[_0x10eb1d(0x22e)]('.')['at'](-0x1)===_0x28946e;});return _0x268191[_0x1617ad(0x22d)]===0x1?_0x268191[0x0]:undefined;}function columnNamesMatch(_0x53336a,_0x3101b2){return normalizeIdentifier(_0x53336a)===normalizeIdentifier(_0x3101b2);}function normalizeIdentifier(_0x474c7d){const _0x5de2d9=a295_0x515a;return _0x474c7d[_0x5de2d9(0x211)](/[`"]/g,'')[_0x5de2d9(0x1ea)]()[_0x5de2d9(0x221)]();}function a295_0x515a(_0x43f3c1,_0xcd01c2){_0x43f3c1=_0x43f3c1-0x1e5;const _0x15b07f=a295_0x15b0();let _0x515ab3=_0x15b07f[_0x43f3c1];return _0x515ab3;}function isSqlClauseKeyword(_0x213135){const _0x360c3c=a295_0x515a;return new Set(['on',_0x360c3c(0x207),_0x360c3c(0x1fb),_0x360c3c(0x1eb),_0x360c3c(0x1e6),_0x360c3c(0x1f1),'right',_0x360c3c(0x204),_0x360c3c(0x22b),_0x360c3c(0x200)])[_0x360c3c(0x203)](_0x213135);}function stripOuterParentheses(_0x2698de){const _0x144abe=a295_0x515a;let _0x5ce766=_0x2698de[_0x144abe(0x1ea)]();while(_0x5ce766[_0x144abe(0x228)]('(')&&_0x5ce766['endsWith'](')')){let _0xb011f9=0x0,_0x4d579b=!![];for(let _0x1ff789=0x0;_0x1ff789<_0x5ce766[_0x144abe(0x22d)];_0x1ff789+=0x1){if(_0x5ce766[_0x1ff789]==='(')_0xb011f9+=0x1;if(_0x5ce766[_0x1ff789]===')')_0xb011f9-=0x1;if(_0xb011f9===0x0&&_0x1ff789<_0x5ce766[_0x144abe(0x22d)]-0x1){_0x4d579b=![];break;}}if(!_0x4d579b||_0xb011f9!==0x0)break;_0x5ce766=_0x5ce766['slice'](0x1,-0x1)['trim']();}return _0x5ce766;}
|
|
1
|
+
(function(_0x558cc5,_0x36d8d9){const _0x5b3c4a=a300_0x8b42,_0x338d51=_0x558cc5();while(!![]){try{const _0x4780cd=parseInt(_0x5b3c4a(0x106))/0x1+-parseInt(_0x5b3c4a(0xde))/0x2*(parseInt(_0x5b3c4a(0x113))/0x3)+parseInt(_0x5b3c4a(0x102))/0x4+parseInt(_0x5b3c4a(0xe9))/0x5+parseInt(_0x5b3c4a(0xdd))/0x6+parseInt(_0x5b3c4a(0x107))/0x7*(parseInt(_0x5b3c4a(0xf9))/0x8)+-parseInt(_0x5b3c4a(0xe1))/0x9*(parseInt(_0x5b3c4a(0xfc))/0xa);if(_0x4780cd===_0x36d8d9)break;else _0x338d51['push'](_0x338d51['shift']());}catch(_0x20901b){_0x338d51['push'](_0x338d51['shift']());}}}(a300_0x3ea4,0x3827f));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0xcc53b9,_0x35d17c){const _0x966fc8=a300_0x8b42,_0x35c49b=[],_0x136b81=normalizeSqlForStaticAnalysis(_0xcc53b9),_0xde9301=(_0x136b81['error']?[]:extractJoinFacts(_0x136b81[_0x966fc8(0x10e)]))['map'](_0x29ebfc=>{const _0x21f5ee=_0x966fc8;if(_0x29ebfc[_0x21f5ee(0x105)]||_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0xd9)]===0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0x11c),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':_0x29ebfc[_0x21f5ee(0xf5)]??_0x21f5ee(0x10c)}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0x119)};const _0x3ada6d=resolveTableMetadata(_0x35d17c,_0x29ebfc[_0x21f5ee(0xfb)]),_0x3dcb1b=(_0x3ada6d?.[_0x21f5ee(0xe8)]??[])[_0x21f5ee(0xe6)](_0x1342b0=>({'index':_0x1342b0,'matchedPrefix':findEqualityPrefix(_0x1342b0[_0x21f5ee(0xd7)],_0x29ebfc[_0x21f5ee(0xd7)])}))[_0x21f5ee(0xe5)](_0x29bb3d=>_0x29bb3d[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]>0x0),_0x272771=_0x3dcb1b[_0x21f5ee(0xfe)]((_0x2341c1,_0x4eb06a)=>!_0x2341c1||_0x4eb06a[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]>_0x2341c1[_0x21f5ee(0xdb)][_0x21f5ee(0xd9)]?_0x4eb06a:_0x2341c1,_0x3dcb1b[0x0]);if(_0x272771)return{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0x10d),'matchedIndex':{..._0x272771[_0x21f5ee(0xf6)],'matchedPrefix':_0x272771['matchedPrefix']}};const _0x1e741c=_0x3ada6d?.[_0x21f5ee(0xe8)][_0x21f5ee(0xe5)](_0x11921d=>_0x11921d[_0x21f5ee(0xd7)][_0x21f5ee(0x11e)](_0x1a7051=>_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0x11e)](_0x3d8b22=>columnNamesMatch(_0x1a7051,_0x3d8b22))))??[];if(_0x1e741c['length']>0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0x10b),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x29ebfc['table'],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0xd8),'candidateIndexes':_0x1e741c};if(_0x3ada6d&&_0x3ada6d[_0x21f5ee(0x100)]!==![]&&_0x3ada6d[_0x21f5ee(0xe8)]['length']>0x0&&_0x29ebfc[_0x21f5ee(0xd7)][_0x21f5ee(0xd9)]>0x0)return _0x35c49b[_0x21f5ee(0x112)]({'code':_0x21f5ee(0xfa),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc['alias'],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'status':_0x21f5ee(0xd8)};return _0x35c49b['push']({'code':_0x21f5ee(0xff),'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc[_0x21f5ee(0xd7)],'reason':_0x3ada6d?_0x21f5ee(0x117):_0x21f5ee(0x108)}),{'table':_0x29ebfc[_0x21f5ee(0xfb)],'alias':_0x29ebfc[_0x21f5ee(0xee)],'columns':_0x29ebfc['columns'],'status':'unavailable'};});return{'checked':_0xde9301['length']>0x0,'joins':_0xde9301,'warnings':_0x35c49b};}function extractJoinFacts(_0x7d57fc){const _0x44c4e0=a300_0x8b42,_0x45b2f0=maskNestedQueries(stripSqlNoise(_0x7d57fc)),_0x21e7fc=maskQuotedIdentifiers(_0x45b2f0),_0x55ab5b=[],_0x588951=new Set(),_0xdfd86d=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x2b70f3 of _0x45b2f0[_0x44c4e0(0xf8)](_0xdfd86d)){const _0x3d86a9=_0x2b70f3['index']??0x0,_0x3ae8bd=_0x2b70f3[0x0][_0x44c4e0(0xdf)](/\bJOIN\b/i),_0x502e97=_0x3d86a9+Math[_0x44c4e0(0x10f)](0x0,_0x3ae8bd);if(!/^JOIN\b/i['test'](_0x21e7fc[_0x44c4e0(0xe4)](_0x502e97)))continue;_0x588951['add'](_0x502e97);const _0x1a9b5b=normalizeIdentifier(_0x2b70f3[0x1]||_0x44c4e0(0x11a)),_0x53ec17=normalizeIdentifier(_0x2b70f3[0x2]??''),_0x4f5d71=normalizeIdentifier(_0x2b70f3[0x3]||_0x53ec17[_0x44c4e0(0x101)]('.')['at'](-0x1)||_0x53ec17),_0x2674a2=[],_0x90e02e=_0x53ec17==='__sq__';let _0x29b270=_0x1a9b5b==='right'||_0x1a9b5b===_0x44c4e0(0xe3)||_0x90e02e,_0x3d7dcf=_0x29b270?_0x90e02e?_0x44c4e0(0x103):_0x1a9b5b[_0x44c4e0(0xea)]()+_0x44c4e0(0xe0):undefined;const _0xd55d2b=stripOuterParentheses(_0x2b70f3[0x4]??''),_0x794116=_0xd55d2b[_0x44c4e0(0x104)](MYBATIS_DYNAMIC_START_MARKER)||_0xd55d2b[_0x44c4e0(0x104)](MYBATIS_DYNAMIC_END_MARKER),_0x5f1869=_0xd55d2b['includes'](MYBATIS_INCLUDE_MARKER);_0x794116&&(_0x29b270=!![],_0x3d7dcf??=_0x44c4e0(0xf4));_0x5f1869&&(_0x29b270=!![],_0x3d7dcf??=_0x44c4e0(0x11f));const _0xdf9c96=_0xd55d2b[_0x44c4e0(0xf0)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x44c4e0(0xf0)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x44c4e0(0xf0)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0xdf9c96,'OR')&&(_0x29b270=!![],_0x3d7dcf??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x186a93 of splitTopLevelAnd(_0xdf9c96)){const _0x52966d=stripOuterParentheses(_0x186a93);if(hasTopLevelKeyword(_0x52966d,'OR')){_0x29b270=!![],_0x3d7dcf??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x27894a=splitEquality(_0x52966d);if(!_0x27894a){containsColumnReference(_0x186a93,_0x4f5d71)&&(_0x29b270=!![]);continue;}const _0x287f02=parseDirectColumnReference(_0x27894a[0x0],_0x4f5d71),_0x1a6a5f=parseDirectColumnReference(_0x27894a[0x1],_0x4f5d71),_0x1fdc08=containsColumnReference(_0x27894a[0x0],_0x4f5d71),_0x125ef3=containsColumnReference(_0x27894a[0x1],_0x4f5d71),_0x11284a=_0x287f02&&!_0x125ef3?_0x287f02:_0x1a6a5f&&!_0x1fdc08?_0x1a6a5f:null;if(_0x11284a&&!_0x2674a2[_0x44c4e0(0x104)](_0x11284a))_0x2674a2[_0x44c4e0(0x112)](_0x11284a);else!_0x11284a&&containsColumnReference(_0x186a93,_0x4f5d71)&&(_0x29b270=!![]);}_0x55ab5b[_0x44c4e0(0x112)]({'table':_0x53ec17,'alias':_0x4f5d71,'columns':_0x2674a2,'unsupportedPredicate':_0x29b270,'unsupportedReason':_0x3d7dcf,'containsUnresolvedInclude':_0x5f1869,'position':_0x502e97});}for(const _0x454658 of _0x21e7fc[_0x44c4e0(0xf8)](/\bJOIN\b/gi)){const _0x3536b2=_0x454658[_0x44c4e0(0xf6)]??0x0;if(_0x588951[_0x44c4e0(0xef)](_0x3536b2))continue;const _0x58cd44=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x44c4e0(0xda)](_0x45b2f0[_0x44c4e0(0xe4)](_0x3536b2+_0x454658[0x0][_0x44c4e0(0xd9)])),_0x1d0c63=normalizeIdentifier(_0x58cd44?.[0x1]||_0x44c4e0(0x114)),_0x43c791=normalizeIdentifier(_0x58cd44?.[0x2]||''),_0x2ad21c=isSqlClauseKeyword(_0x43c791)?_0x1d0c63['split']('.')['at'](-0x1)||_0x1d0c63:_0x43c791||_0x1d0c63['split']('.')['at'](-0x1)||_0x1d0c63;_0x55ab5b['push']({'table':_0x1d0c63,'alias':_0x2ad21c,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x3536b2});}const _0xfde339=_0x21e7fc[_0x44c4e0(0xeb)](MYBATIS_INCLUDE_MARKER);return _0xfde339>=0x0&&!_0x55ab5b[_0x44c4e0(0x11e)](_0x41c492=>_0x41c492[_0x44c4e0(0xec)])&&_0x55ab5b['push']({'table':_0x44c4e0(0x114),'alias':_0x44c4e0(0x114),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','containsUnresolvedInclude':!![],'position':_0xfde339}),_0x55ab5b[_0x44c4e0(0x109)]((_0x4ca64e,_0x492452)=>_0x4ca64e['position']-_0x492452[_0x44c4e0(0xf2)]);}function stripSqlNoise(_0x32ebf8){const _0x5564c8=a300_0x8b42,_0x556d2b=Array[_0x5564c8(0xed)](_0x32ebf8),_0x2c3787=(_0x2a08dd,_0x52d6ce)=>{for(let _0x112e0e=_0x2a08dd;_0x112e0e<_0x52d6ce;_0x112e0e+=0x1){_0x556d2b[_0x112e0e]!=='\x0a'&&_0x556d2b[_0x112e0e]!=='\x0d'&&(_0x556d2b[_0x112e0e]='\x20');}};for(let _0x40aa0b=0x0;_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)];_0x40aa0b+=0x1){const _0x58e0dd=_0x556d2b[_0x40aa0b],_0x539e79=_0x556d2b[_0x40aa0b+0x1];if(_0x58e0dd==='\x27'||_0x58e0dd==='\x22'||_0x58e0dd==='`'){const _0x20e395=_0x58e0dd,_0x296511=_0x40aa0b;_0x40aa0b+=0x1;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]){if(_0x556d2b[_0x40aa0b]==='\x5c'&&_0x40aa0b+0x1<_0x556d2b[_0x5564c8(0xd9)]){_0x40aa0b+=0x2;continue;}if(_0x556d2b[_0x40aa0b]!==_0x20e395){_0x40aa0b+=0x1;continue;}if(_0x556d2b[_0x40aa0b+0x1]===_0x20e395){_0x40aa0b+=0x2;continue;}break;}if(_0x20e395==='\x27')_0x2c3787(_0x296511,Math['min'](_0x40aa0b+0x1,_0x556d2b[_0x5564c8(0xd9)]));continue;}if(_0x58e0dd==='-'&&_0x539e79==='-'){const _0x4fa6c2=_0x40aa0b;while(_0x40aa0b<_0x556d2b['length']&&_0x556d2b[_0x40aa0b]!=='\x0a')_0x40aa0b+=0x1;_0x2c3787(_0x4fa6c2,_0x40aa0b);continue;}if(_0x58e0dd==='/'&&_0x539e79==='*'){const _0x1ef898=_0x40aa0b;_0x40aa0b+=0x2;while(_0x40aa0b<_0x556d2b['length']&&!(_0x556d2b[_0x40aa0b]==='*'&&_0x556d2b[_0x40aa0b+0x1]==='/')){_0x40aa0b+=0x1;}_0x40aa0b=Math[_0x5564c8(0x115)](_0x40aa0b+0x1,_0x556d2b[_0x5564c8(0xd9)]-0x1),_0x2c3787(_0x1ef898,_0x40aa0b+0x1);continue;}if(_0x58e0dd==='#'&&_0x539e79!=='{'){const _0x5ef7f2=_0x40aa0b;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]&&_0x556d2b[_0x40aa0b]!=='\x0a')_0x40aa0b+=0x1;_0x2c3787(_0x5ef7f2,_0x40aa0b);continue;}if((_0x58e0dd==='#'||_0x58e0dd==='$')&&_0x539e79==='{'){const _0x502921=_0x40aa0b;_0x40aa0b+=0x2;while(_0x40aa0b<_0x556d2b[_0x5564c8(0xd9)]&&_0x556d2b[_0x40aa0b]!=='}')_0x40aa0b+=0x1;_0x2c3787(_0x502921,Math[_0x5564c8(0x115)](_0x40aa0b+0x1,_0x556d2b['length']));}}return _0x556d2b[_0x5564c8(0xf1)]('');}function maskQuotedIdentifiers(_0x3205c1){const _0x4f5bd8=a300_0x8b42,_0x2e23ec=Array[_0x4f5bd8(0xed)](_0x3205c1);for(let _0x5c55a2=0x0;_0x5c55a2<_0x2e23ec['length'];_0x5c55a2+=0x1){const _0x635d0e=_0x2e23ec[_0x5c55a2];if(_0x635d0e!=='\x22'&&_0x635d0e!=='`')continue;_0x5c55a2+=0x1;while(_0x5c55a2<_0x2e23ec['length']){if(_0x2e23ec[_0x5c55a2]===_0x635d0e){if(_0x2e23ec[_0x5c55a2+0x1]===_0x635d0e){_0x2e23ec[_0x5c55a2]='\x20',_0x2e23ec[_0x5c55a2+0x1]='\x20',_0x5c55a2+=0x2;continue;}break;}_0x2e23ec[_0x5c55a2]='\x20',_0x5c55a2+=0x1;}}return _0x2e23ec[_0x4f5bd8(0xf1)]('');}function maskNestedQueries(_0x52a3bf){const _0x149dec=a300_0x8b42,_0x50a322=Array[_0x149dec(0xed)](_0x52a3bf);for(let _0x1756a4=0x0;_0x1756a4<_0x50a322[_0x149dec(0xd9)];_0x1756a4+=0x1){if(_0x50a322[_0x1756a4]!=='(')continue;const _0x182ac2=_0x52a3bf['slice'](_0x1756a4+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x149dec(0x111)](_0x182ac2))continue;let _0x512ed1=0x1,_0x5e0d42=_0x1756a4+0x1;for(;_0x5e0d42<_0x50a322[_0x149dec(0xd9)]&&_0x512ed1>0x0;_0x5e0d42+=0x1){if(_0x50a322[_0x5e0d42]==='(')_0x512ed1+=0x1;if(_0x50a322[_0x5e0d42]===')')_0x512ed1-=0x1;}if(_0x512ed1!==0x0)continue;for(let _0x7d398=_0x1756a4;_0x7d398<_0x5e0d42;_0x7d398+=0x1){_0x50a322[_0x7d398]='\x20';}const _0x170211=_0x149dec(0x118);for(let _0x3a266e=0x0;_0x3a266e<_0x170211['length']&&_0x1756a4+_0x3a266e<_0x5e0d42;_0x3a266e+=0x1){_0x50a322[_0x1756a4+_0x3a266e]=_0x170211[_0x3a266e];}_0x1756a4=_0x5e0d42-0x1;}return _0x50a322[_0x149dec(0xf1)]('');}function splitTopLevelAnd(_0x3ec0f5){const _0x486b2c=a300_0x8b42,_0x35a0b6=[];let _0x36df5c=0x0,_0x8cdf77=0x0;for(let _0x565eda=0x0;_0x565eda<_0x3ec0f5[_0x486b2c(0xd9)];_0x565eda+=0x1){const _0x240c50=_0x3ec0f5[_0x565eda];if(_0x240c50==='(')_0x36df5c+=0x1;if(_0x240c50===')')_0x36df5c=Math['max'](0x0,_0x36df5c-0x1);_0x36df5c===0x0&&_0x3ec0f5[_0x486b2c(0xe4)](_0x565eda)[_0x486b2c(0x11b)](/^AND\b/i)&&(_0x565eda===0x0||/\s/['test'](_0x3ec0f5[_0x565eda-0x1]??''))&&(_0x35a0b6['push'](_0x3ec0f5[_0x486b2c(0xe4)](_0x8cdf77,_0x565eda)[_0x486b2c(0xf7)]()),_0x565eda+=0x2,_0x8cdf77=_0x565eda+0x1);}const _0x1dde69=_0x3ec0f5[_0x486b2c(0xe4)](_0x8cdf77)[_0x486b2c(0xf7)]();if(_0x1dde69)_0x35a0b6[_0x486b2c(0x112)](_0x1dde69);return _0x35a0b6;}function hasTopLevelKeyword(_0x270660,_0x579c82){const _0x5bc9f6=a300_0x8b42;let _0x19d8d6=0x0;for(let _0x46d161=0x0;_0x46d161<_0x270660[_0x5bc9f6(0xd9)];_0x46d161+=0x1){const _0x405dfb=_0x270660[_0x46d161];if(_0x405dfb==='(')_0x19d8d6+=0x1;if(_0x405dfb===')')_0x19d8d6=Math[_0x5bc9f6(0x10f)](0x0,_0x19d8d6-0x1);if(_0x19d8d6!==0x0)continue;const _0x238739=_0x270660['slice'](_0x46d161,_0x46d161+_0x579c82[_0x5bc9f6(0xd9)]),_0x535725=_0x270660[_0x46d161-0x1]??'\x20',_0x4b4a95=_0x270660[_0x46d161+_0x579c82[_0x5bc9f6(0xd9)]]??'\x20';if(_0x238739[_0x5bc9f6(0xea)]()===_0x579c82[_0x5bc9f6(0xea)]()&&!/[\w$]/[_0x5bc9f6(0x111)](_0x535725)&&!/[\w$]/[_0x5bc9f6(0x111)](_0x4b4a95))return!![];}return![];}function splitEquality(_0x444cc9){const _0x4778a2=a300_0x8b42,_0x29777c=stripOuterParentheses(_0x444cc9);let _0x451436=0x0,_0x562076;for(let _0x2e9935=0x0;_0x2e9935<_0x29777c[_0x4778a2(0xd9)];_0x2e9935+=0x1){const _0x5d0adf=_0x29777c[_0x2e9935];if(_0x5d0adf==='(')_0x451436+=0x1;if(_0x5d0adf===')')_0x451436=Math[_0x4778a2(0x10f)](0x0,_0x451436-0x1);const _0x5368cb=_0x29777c[_0x2e9935-0x1]??'',_0x17b7d2=_0x29777c[_0x2e9935+0x1]??'';if(_0x5d0adf==='='&&_0x451436===0x0&&!/[!<>=:]/[_0x4778a2(0x111)](_0x5368cb)&&_0x17b7d2!=='='){if(_0x562076!==undefined)return null;_0x562076=_0x2e9935;}}return _0x562076===undefined?null:[_0x29777c[_0x4778a2(0xe4)](0x0,_0x562076)['trim'](),_0x29777c[_0x4778a2(0xe4)](_0x562076+0x1)[_0x4778a2(0xf7)]()];}function parseDirectColumnReference(_0xbf2b86,_0x52ebd4){const _0x4da537=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0xbf2b86));if(!_0x4da537)return null;if(normalizeIdentifier(_0x4da537[0x1]??'')!==normalizeIdentifier(_0x52ebd4))return null;return normalizeIdentifier(_0x4da537[0x2]??'');}function containsColumnReference(_0x2ff7d1,_0x2c8ce5){const _0x31514f=a300_0x8b42,_0x3c7e59=_0x2ff7d1[_0x31514f(0x116)](/[`"]/g,''),_0x1334c1=_0x2c8ce5['replace'](/[.*+?^${}()|[\]\\]/g,_0x31514f(0x10a));return new RegExp(_0x31514f(0x110)+_0x1334c1+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x31514f(0x111)](_0x3c7e59);}function findEqualityPrefix(_0x555750,_0x2cf005){const _0x486613=a300_0x8b42,_0x775363=new Set(_0x2cf005[_0x486613(0xe6)](normalizeIdentifier)),_0x455f6a=[];for(const _0x208e0 of _0x555750){if(!_0x775363['has'](normalizeIdentifier(_0x208e0)))break;_0x455f6a[_0x486613(0x112)](_0x208e0);}return _0x455f6a;}function resolveTableMetadata(_0x2fb4cb,_0x5df036){const _0x3793a0=a300_0x8b42,_0x11d1a9=normalizeIdentifier(_0x5df036),_0x3d1fdc=_0x2fb4cb[_0x3793a0(0xe5)](_0x4a5f09=>normalizeIdentifier(_0x4a5f09[_0x3793a0(0xe2)])===_0x11d1a9);if(_0x3d1fdc[_0x3793a0(0xd9)]===0x1)return _0x3d1fdc[0x0];const _0xd69168=_0x11d1a9['includes']('.'),_0x536700=_0x11d1a9[_0x3793a0(0x101)]('.')['at'](-0x1),_0x28d6af=_0x2fb4cb['filter'](_0x12e868=>{const _0x4dc95a=_0x3793a0,_0x216ef4=normalizeIdentifier(_0x12e868[_0x4dc95a(0xe2)]);if(_0xd69168&&_0x216ef4['includes']('.'))return![];return _0x216ef4[_0x4dc95a(0x101)]('.')['at'](-0x1)===_0x536700;});return _0x28d6af[_0x3793a0(0xd9)]===0x1?_0x28d6af[0x0]:undefined;}function columnNamesMatch(_0x10df01,_0x494cb8){return normalizeIdentifier(_0x10df01)===normalizeIdentifier(_0x494cb8);}function a300_0x8b42(_0x4f562c,_0x185370){_0x4f562c=_0x4f562c-0xd7;const _0x3ea4a2=a300_0x3ea4();let _0x8b4251=_0x3ea4a2[_0x4f562c];return _0x8b4251;}function a300_0x3ea4(){const _0x3df5a9=['replace','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','__sq__','unavailable','INNER','match','JOIN_PREDICATE_UNSUPPORTED','endsWith','some','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','columns','warning','length','exec','matchedPrefix','left','1661004LsatuL','738WqCLgG','search','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','8793tdjwyu','tableName','full','slice','filter','map','startsWith','indexes','112790iHXTEh','toUpperCase','indexOf','containsUnresolvedInclude','from','alias','has','replaceAll','join','position','inner','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','unsupportedReason','index','trim','matchAll','8tcusJh','JOIN_INDEX_MISSING','table','3660UhMxZI','toLowerCase','reduce','INDEX_METADATA_UNAVAILABLE','metadataAvailable','split','1011276DiuINr','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','includes','unsupportedPredicate','271211JbvKQg','673925NRxuHy','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','sort','\x5c$&','JOIN_INDEX_NOT_USABLE','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','covered','sql','max','(?:^|[^\x5cw$])','test','push','2700didCPR','unknown','min'];a300_0x3ea4=function(){return _0x3df5a9;};return a300_0x3ea4();}function normalizeIdentifier(_0x99241d){const _0x47a388=a300_0x8b42;return _0x99241d['replace'](/[`"]/g,'')[_0x47a388(0xf7)]()[_0x47a388(0xfd)]();}function isSqlClauseKeyword(_0x17642d){const _0x5c19c4=a300_0x8b42;return new Set(['on','using','where',_0x5c19c4(0xf1),_0x5c19c4(0xf3),_0x5c19c4(0xdc),'right',_0x5c19c4(0xe3),'cross','natural'])[_0x5c19c4(0xef)](_0x17642d);}function stripOuterParentheses(_0x5d9eec){const _0x15749b=a300_0x8b42;let _0x467bef=_0x5d9eec[_0x15749b(0xf7)]();while(_0x467bef[_0x15749b(0xe7)]('(')&&_0x467bef[_0x15749b(0x11d)](')')){let _0x5c1fcb=0x0,_0x14331d=!![];for(let _0x453353=0x0;_0x453353<_0x467bef[_0x15749b(0xd9)];_0x453353+=0x1){if(_0x467bef[_0x453353]==='(')_0x5c1fcb+=0x1;if(_0x467bef[_0x453353]===')')_0x5c1fcb-=0x1;if(_0x5c1fcb===0x0&&_0x453353<_0x467bef[_0x15749b(0xd9)]-0x1){_0x14331d=![];break;}}if(!_0x14331d||_0x5c1fcb!==0x0)break;_0x467bef=_0x467bef[_0x15749b(0xe4)](0x1,-0x1)[_0x15749b(0xf7)]();}return _0x467bef;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x10d0c5,_0x5ae247){const _0x51aad2=a301_0x4980,_0x1f57a3=_0x10d0c5();while(!![]){try{const _0x283f0f=-parseInt(_0x51aad2(0x10d))/0x1*(parseInt(_0x51aad2(0x108))/0x2)+parseInt(_0x51aad2(0x109))/0x3*(parseInt(_0x51aad2(0x103))/0x4)+-parseInt(_0x51aad2(0x105))/0x5+parseInt(_0x51aad2(0x10a))/0x6+-parseInt(_0x51aad2(0x107))/0x7*(-parseInt(_0x51aad2(0x10c))/0x8)+-parseInt(_0x51aad2(0x104))/0x9*(parseInt(_0x51aad2(0x106))/0xa)+parseInt(_0x51aad2(0x10b))/0xb;if(_0x283f0f===_0x5ae247)break;else _0x1f57a3['push'](_0x1f57a3['shift']());}catch(_0x364d56){_0x1f57a3['push'](_0x1f57a3['shift']());}}}(a301_0x11ca,0x37012));import{resolve}from'node:path';function a301_0x4980(_0x2904f8,_0x1add80){_0x2904f8=_0x2904f8-0x103;const _0x11ca7f=a301_0x11ca();let _0x4980ed=_0x11ca7f[_0x2904f8];return _0x4980ed;}function a301_0x11ca(){const _0x56cafc=['sql','259820osQoDl','99522RPTEew','458580JwMxys','280mavJtR','28elrdXY','8wkJaOD','15JvweCd','313476RFdpEW','6563491hydIEj','153848KeUlsh','105997MujkDb'];a301_0x11ca=function(){return _0x56cafc;};return a301_0x11ca();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME='sql.lock.json',TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x4a40dc,_0xf5ba7b){const _0x5739e=a301_0x4980,_0x463c45=resolve(_0xf5ba7b??findProjectRootDirectory()),_0x30ad7e=DOT_DIR+'/sql',_0x5891ca=_0x30ad7e+'/'+_0x4a40dc;return{'projectRoot':_0x463c45,'appCode':_0x4a40dc,'sqlWorkspaceRoot':_0x30ad7e,'sqlRoot':_0x5891ca,'sqlRootDir':resolve(_0x463c45,DOT_DIR,_0x5739e(0x10e),_0x4a40dc),'lockFilePath':resolve(_0x463c45,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x463c45,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5b761a,_0xe2ed65){const _0x5ccca8=a302_0x445f,_0x2aedd2=_0x5b761a();while(!![]){try{const _0xfb6ffb=parseInt(_0x5ccca8(0x1ff))/0x1*(-parseInt(_0x5ccca8(0x1f6))/0x2)+parseInt(_0x5ccca8(0x1e4))/0x3*(parseInt(_0x5ccca8(0x201))/0x4)+parseInt(_0x5ccca8(0x1fb))/0x5*(-parseInt(_0x5ccca8(0x1e2))/0x6)+-parseInt(_0x5ccca8(0x1ed))/0x7*(-parseInt(_0x5ccca8(0x1f0))/0x8)+parseInt(_0x5ccca8(0x1f3))/0x9*(parseInt(_0x5ccca8(0x1e8))/0xa)+-parseInt(_0x5ccca8(0x1e7))/0xb+-parseInt(_0x5ccca8(0x1e0))/0xc*(-parseInt(_0x5ccca8(0x1fa))/0xd);if(_0xfb6ffb===_0xe2ed65)break;else _0x2aedd2['push'](_0x2aedd2['shift']());}catch(_0x7bf4d3){_0x2aedd2['push'](_0x2aedd2['shift']());}}}(a302_0x4632,0x2f555));import{readdir,stat}from'node:fs/promises';function a302_0x445f(_0xf56314,_0x1c1df5){_0xf56314=_0xf56314-0x1df;const _0x4632a4=a302_0x4632();let _0x445fc4=_0x4632a4[_0xf56314];return _0x445fc4;}import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x2c2155){const _0x5c0528=a302_0x445f;if(_0x2c2155===_0x5c0528(0x1fe))return _0x5c0528(0x1fc);if(_0x2c2155===_0x5c0528(0x1e6))return _0x5c0528(0x1f5);return undefined;}async function scanSqlFilesRecursively(_0x408813,_0x5e4f73){const _0x36367e=a302_0x445f,_0x501533=[];try{const _0x3d8220=await readdir(_0x408813,{'withFileTypes':!![]});for(const _0x24257f of _0x3d8220){const _0x9aa9df=join(_0x408813,_0x24257f[_0x36367e(0x1e3)]);if(_0x24257f[_0x36367e(0x1f4)]()){_0x501533['push'](...await scanSqlFilesRecursively(_0x9aa9df,_0x5e4f73));continue;}if(!_0x24257f[_0x36367e(0x1e1)]())continue;const _0x533f0c=extname(_0x24257f[_0x36367e(0x1e3)])[_0x36367e(0x200)](),_0x1d9795=extensionToMode(_0x533f0c);if(!_0x1d9795)continue;const _0x4b9402=relative(_0x5e4f73,_0x9aa9df)['replace'](/\\/g,'/'),_0x531d51=_0x4b9402[_0x36367e(0x1ea)]('/')['filter'](Boolean),_0x1e64d6=parseSqlPath(_0x531d51,_0x24257f[_0x36367e(0x1e3)],_0x533f0c);if(!_0x1e64d6)continue;_0x501533[_0x36367e(0x1f2)]({'sqlCode':_0x1e64d6['sqlCode'],'sqlName':_0x1e64d6[_0x36367e(0x1f1)],'dbDirectory':_0x531d51[0x0],'filePath':_0x9aa9df,'relativePath':_0x4b9402,'lockKey':_0x1e64d6[_0x36367e(0x1e5)],'mode':_0x1d9795});}}catch(_0x3a2583){if(_0x3a2583[_0x36367e(0x1ee)]!==_0x36367e(0x1f8))throw _0x3a2583;}return _0x501533;}export async function scanLocalSqlQueries(_0x499b2c){const _0x20310f=a302_0x445f;return scanSqlFilesRecursively(_0x499b2c[_0x20310f(0x1fd)],_0x499b2c[_0x20310f(0x1fd)]);}function a302_0x4632(){const _0x2a091b=['292464wEKXvI','isFile','1490166PXNEBM','name','21awVHpb','sqlCode','.xml','3259905QtZgRi','16870iPZiqk','indexOf','split','path','mode','938EIUABl','code','length','3488arwOUu','sqlName','push','99sXGyPK','isDirectory','mybatisXml','696734PpuWec','dbName','ENOENT','slice','377SpuWWV','5SsViWu','sql','sqlRootDir','.sql','1VqpKwI','toLowerCase','173252sjnrSU','test'];a302_0x4632=function(){return _0x2a091b;};return a302_0x4632();}export function resolveLocalSqlFilePath(_0x59a5e7,_0x2fd9b1,_0x1c2fc7){const _0x53f09b=a302_0x445f,_0x356a90=_0x1c2fc7?.[_0x53f09b(0x1eb)]||(_0x1c2fc7?.[_0x53f09b(0x1f1)]||_0x1c2fc7?.[_0x53f09b(0x1f7)]?buildSqlRelativePath(_0x2fd9b1,_0x1c2fc7?.[_0x53f09b(0x1f1)],_0x1c2fc7?.[_0x53f09b(0x1f7)],_0x1c2fc7?.[_0x53f09b(0x1ec)]||_0x53f09b(0x1fc),_0x1c2fc7?.['dbId']):buildDefaultSqlFileName(_0x2fd9b1,_0x1c2fc7?.[_0x53f09b(0x1ec)]||_0x53f09b(0x1fc)));return join(_0x59a5e7[_0x53f09b(0x1fd)],_0x356a90);}export async function directoryExists(_0x395356){const _0x3ad558=a302_0x445f;try{const _0xabce27=await stat(_0x395356);return _0xabce27[_0x3ad558(0x1f4)]();}catch{return![];}}function parseSqlPath(_0x280c9a,_0x15bc8a,_0x2d250d){const _0x25fade=a302_0x445f,_0x2da8c2=_0x15bc8a[_0x25fade(0x1f9)](0x0,-_0x2d250d['length']);if(_0x280c9a[_0x25fade(0x1ef)]<0x2)return null;const _0x49e79e=_0x2da8c2[_0x25fade(0x1e9)]('_');if(_0x49e79e<=0x0||_0x49e79e>=_0x2da8c2[_0x25fade(0x1ef)]-0x1)return null;const _0x3b7a2b=_0x2da8c2[_0x25fade(0x1f9)](0x0,_0x49e79e);if(!isLikelySqlCode(_0x3b7a2b))return null;return{'sqlCode':_0x3b7a2b,'sqlName':_0x2da8c2['slice'](_0x49e79e+0x1)};}function isLikelySqlCode(_0x1c9015){const _0x776bc8=a302_0x445f;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x776bc8(0x1df)](_0x1c9015);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f52be,_0x329ee2){const _0x6c1a71=a303_0x4246,_0x51eb70=_0x4f52be();while(!![]){try{const _0x26b8a5=-parseInt(_0x6c1a71(0x10c))/0x1+-parseInt(_0x6c1a71(0x113))/0x2*(-parseInt(_0x6c1a71(0x117))/0x3)+parseInt(_0x6c1a71(0x115))/0x4+-parseInt(_0x6c1a71(0x110))/0x5*(-parseInt(_0x6c1a71(0x10e))/0x6)+-parseInt(_0x6c1a71(0x10f))/0x7*(parseInt(_0x6c1a71(0x111))/0x8)+-parseInt(_0x6c1a71(0x10d))/0x9*(parseInt(_0x6c1a71(0x112))/0xa)+-parseInt(_0x6c1a71(0x11a))/0xb*(-parseInt(_0x6c1a71(0x116))/0xc);if(_0x26b8a5===_0x329ee2)break;else _0x51eb70['push'](_0x51eb70['shift']());}catch(_0x3a1548){_0x51eb70['push'](_0x51eb70['shift']());}}}(a303_0x3f8d,0xbc6f9));function a303_0x4246(_0x45507f,_0x4f2ad3){_0x45507f=_0x45507f-0x10b;const _0x3f8d6f=a303_0x3f8d();let _0x424678=_0x3f8d6f[_0x45507f];return _0x424678;}function a303_0x3f8d(){const _0x3a053d=['4942ZRkwrm','2666065kIhqNh','4152xZyHaG','40hFIwVx','22VXMrzZ','hex','3446072cEjmkH','1062408neCxxC','233793zUrhPy','utf8','createHash','11frajQD','md5','157631asxVxe','2350413daxAUu','6NlFsYE'];a303_0x3f8d=function(){return _0x3a053d;};return a303_0x3f8d();}import{readFile}from'node:fs/promises';import a303_0x3f5fcd from'node:crypto';export function computeSqlContentHash(_0x3620fa){const _0x54a872=a303_0x4246;return a303_0x3f5fcd[_0x54a872(0x119)](_0x54a872(0x10b))['update'](_0x3620fa)['digest'](_0x54a872(0x114));}export async function computeSqlFileHash(_0x413021){const _0x1d51a9=a303_0x4246,_0x805f2b=await readFile(_0x413021,_0x1d51a9(0x118));return computeSqlContentHash(_0x805f2b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x503b76,_0x3e45db){const _0x5f3b4f=a304_0x46c7,_0x2ba8f7=_0x503b76();while(!![]){try{const _0x3d6d1f=-parseInt(_0x5f3b4f(0xfb))/0x1+-parseInt(_0x5f3b4f(0xf6))/0x2+parseInt(_0x5f3b4f(0xf0))/0x3*(-parseInt(_0x5f3b4f(0x101))/0x4)+parseInt(_0x5f3b4f(0xf7))/0x5+parseInt(_0x5f3b4f(0xfc))/0x6*(parseInt(_0x5f3b4f(0xef))/0x7)+-parseInt(_0x5f3b4f(0xf9))/0x8+parseInt(_0x5f3b4f(0xfe))/0x9;if(_0x3d6d1f===_0x3e45db)break;else _0x2ba8f7['push'](_0x2ba8f7['shift']());}catch(_0x327a59){_0x2ba8f7['push'](_0x2ba8f7['shift']());}}}(a304_0x240a,0x53ce1));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xe870ed,_0x51186d,_0x3ad410,_0x2e37a5){const _0x4bb59d=a304_0x46c7,_0x1d08e6=_0xe870ed??createEmptySqlLock();let _0x234c8d=_0x1d08e6[_0x4bb59d(0xf4)][_0x51186d];if(!_0x234c8d)return _0x234c8d={'sqlRoot':_0x3ad410,'lastSync':'','sqls':{}},_0x1d08e6[_0x4bb59d(0xf4)][_0x51186d]=_0x234c8d,{'lockData':_0x1d08e6,'appLock':_0x234c8d};if(!_0x234c8d['sqlRoot'])_0x234c8d[_0x4bb59d(0xf2)]=_0x3ad410;else{if(_0x234c8d[_0x4bb59d(0xf2)]!==_0x3ad410)throw new Error(_0x2e37a5+_0x4bb59d(0xfa)+_0x3ad410+_0x4bb59d(0xf1)+_0x234c8d[_0x4bb59d(0xf2)]+'\x22.\x20'+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x234c8d[_0x4bb59d(0x100)]&&(_0x234c8d[_0x4bb59d(0x100)]={}),!_0x234c8d['lastSync']&&(_0x234c8d[_0x4bb59d(0xf3)]=''),{'lockData':_0x1d08e6,'appLock':_0x234c8d};}export async function readSqlLockFile(_0x55e015){const _0x31b8b2=a304_0x46c7;try{const _0x2a7481=await readFile(_0x55e015,_0x31b8b2(0xf5));return JSON['parse'](_0x2a7481);}catch(_0x246832){if(_0x246832[_0x31b8b2(0xf8)]===_0x31b8b2(0xfd))return null;throw new Error(_0x31b8b2(0xff)+String(_0x246832));}}function a304_0x240a(){const _0x1894cd=['1069516jgummw','688930IaRmQG','code','2858536SoFADU',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','275860yAOloV','568218ZvBVVG','ENOENT','15903144gZKhQi','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','sqls','48584frdGgg','14sHOllG','144ypChUo','\x22\x20vs\x20lock\x20\x22','sqlRoot','lastSync','apps','utf8'];a304_0x240a=function(){return _0x1894cd;};return a304_0x240a();}function a304_0x46c7(_0x3371e6,_0x3339c6){_0x3371e6=_0x3371e6-0xef;const _0x240a6f=a304_0x240a();let _0x46c725=_0x240a6f[_0x3371e6];return _0x46c725;}export async function writeSqlLockFile(_0x54e957,_0x129c58){const _0x20b29a=a304_0x46c7;await mkdir(dirname(_0x54e957),{'recursive':!![]}),await writeFile(_0x54e957,JSON['stringify'](_0x129c58,null,0x2),_0x20b29a(0xf5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e56b3,_0x44d93b){const _0x13fa8d=a306_0x1cb5,_0x159891=_0x1e56b3();while(!![]){try{const _0x3e994c=-parseInt(_0x13fa8d(0x142))/0x1+-parseInt(_0x13fa8d(0x143))/0x2+parseInt(_0x13fa8d(0x139))/0x3*(-parseInt(_0x13fa8d(0x13b))/0x4)+-parseInt(_0x13fa8d(0x137))/0x5*(-parseInt(_0x13fa8d(0x13e))/0x6)+parseInt(_0x13fa8d(0x138))/0x7+parseInt(_0x13fa8d(0x140))/0x8+-parseInt(_0x13fa8d(0x13d))/0x9*(-parseInt(_0x13fa8d(0x13a))/0xa);if(_0x3e994c===_0x44d93b)break;else _0x159891['push'](_0x159891['shift']());}catch(_0x5e19e3){_0x159891['push'](_0x159891['shift']());}}}(a306_0x142e,0x97d5b));function a306_0x1cb5(_0x4f9f33,_0x5bc7c5){_0x4f9f33=_0x4f9f33-0x137;const _0x142e81=a306_0x142e();let _0x1cb58d=_0x142e81[_0x4f9f33];return _0x1cb58d;}import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x6f685e){return detectSqlSourceMode(_0x6f685e);}export function getSqlFileExtension(_0x3ab6bf){return _0x3ab6bf==='mybatisXml'?'.xml':'.sql';}export function buildDefaultSqlFileName(_0x45c4ee,_0x3b75cb){return''+_0x45c4ee+getSqlFileExtension(_0x3b75cb);}export function sanitizeSqlPathSegment(_0x5d7914,_0x19cc92){const _0x4293bd=a306_0x1cb5,_0x11a8f9=String(_0x5d7914??'')['trim'](),_0x40f5c9=_0x11a8f9[_0x4293bd(0x13c)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x4293bd(0x13c)](/\s+/g,'-')[_0x4293bd(0x13c)](/-+/g,'-')[_0x4293bd(0x13c)](/^\.+/,'')[_0x4293bd(0x13c)](/\.+$/,'')['replace'](/^-+/,'')[_0x4293bd(0x13c)](/-+$/,'');return _0x40f5c9||_0x19cc92;}function a306_0x142e(){const _0x36e908=['593813EHyUUJ','1173206TakGDj','5DIQAtk','6792331bNvZds','240meHkFK','20IfnuOS','38840tMdQhM','replace','3372372fFBNfO','3777366oOthQG','unknown-sql','1838568pEKiOx','unknown-db'];a306_0x142e=function(){return _0x36e908;};return a306_0x142e();}export function buildDbDirectoryName(_0x486102,_0x3d8afa){const _0x1d7980=a306_0x1cb5;return sanitizeSqlPathSegment(_0x486102,_0x3d8afa!=null?'db-'+_0x3d8afa:_0x1d7980(0x141));}export function buildSqlRelativePath(_0xc610a0,_0x22e1c9,_0x530a53,_0x5a78fb,_0x1c4a60){const _0x10494e=a306_0x1cb5,_0x50527a=buildDbDirectoryName(_0x530a53,_0x1c4a60),_0x3cea44=sanitizeSqlPathSegment(_0xc610a0,_0x10494e(0x13f)),_0x127cd3=sanitizeSqlPathSegment(_0x22e1c9,_0x3cea44);return _0x50527a+'/'+_0x3cea44+'_'+_0x127cd3+getSqlFileExtension(_0x5a78fb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a302_0x2ae9a3=a302_0x5e36;(function(_0x4581dd,_0x1958db){const _0x4ca7d6=a302_0x5e36,_0x2f7fea=_0x4581dd();while(!![]){try{const _0x228cee=parseInt(_0x4ca7d6(0x1da))/0x1*(-parseInt(_0x4ca7d6(0x1eb))/0x2)+-parseInt(_0x4ca7d6(0x1e4))/0x3*(-parseInt(_0x4ca7d6(0x1b7))/0x4)+parseInt(_0x4ca7d6(0x20a))/0x5*(-parseInt(_0x4ca7d6(0x1ff))/0x6)+parseInt(_0x4ca7d6(0x1d9))/0x7+parseInt(_0x4ca7d6(0x1a6))/0x8*(parseInt(_0x4ca7d6(0x1dd))/0x9)+parseInt(_0x4ca7d6(0x1dc))/0xa+parseInt(_0x4ca7d6(0x1bd))/0xb;if(_0x228cee===_0x1958db)break;else _0x2f7fea['push'](_0x2f7fea['shift']());}catch(_0x4feeb5){_0x2f7fea['push'](_0x2f7fea['shift']());}}}(a302_0x71c3,0xd9adf));const MYBATIS_OUTER_TAGS=new Map([['select',a302_0x2ae9a3(0x1e1)],['insert','INSERT'],[a302_0x2ae9a3(0x1c1),a302_0x2ae9a3(0x1d2)],[a302_0x2ae9a3(0x1fc),a302_0x2ae9a3(0x1f4)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a302_0x2ae9a3(0x1ab),'foreach',a302_0x2ae9a3(0x1a5),a302_0x2ae9a3(0x207),a302_0x2ae9a3(0x1f3),a302_0x2ae9a3(0x1db),a302_0x2ae9a3(0x1d4),a302_0x2ae9a3(0x1c3),'include',a302_0x2ae9a3(0x1c2)]),MYBATIS_BRANCH_TAGS=new Set(['if',a302_0x2ae9a3(0x1e2),a302_0x2ae9a3(0x1a5),a302_0x2ae9a3(0x207),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER='__RABETBASE_MYBATIS_DYNAMIC_START__';export const MYBATIS_DYNAMIC_END_MARKER=a302_0x2ae9a3(0x1b4);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a302_0x2ae9a3(0x1a9),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a302_0x2ae9a3(0x1e0)+[...MYBATIS_OUTER_TAGS[a302_0x2ae9a3(0x1fb)]()][a302_0x2ae9a3(0x1b2)]('|')+a302_0x2ae9a3(0x1af),'i');function a302_0x71c3(){const _0x237721=['SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','set','toLowerCase','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','parseInt','WITH','6514144evJyFK','264062jAOTec','trim','11090630UkUUSD','189rOOLwr','test','reason','^<\x5cs*(?:','SELECT','foreach','FOR','3zpVHQj','slice','INSERT','Unterminated\x20XML\x20comment.','push','&','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','8uLAJMv','MATERIALIZED','includes','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','rawName','<![CDATA[','\x20query\x20targeting\x20','toUpperCase','otherwise','DELETE','statementType','SET','from','sql','DELETE\x20statements\x20require\x20explicit\x20review','SHARE','keys','delete','<!--','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','6Ijrffp','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','startsWith','DDL','SQL\x20content\x20is\x20empty','mybatisXml','NOT','get','when','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','4844125WyDXYR','>','type','choose','110672tXIRcX','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','UNKNOWN','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','\x20WHERE\x20','where','"','include','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.',')\x5cb','length','replace','join','match','__RABETBASE_MYBATIS_DYNAMIC_END__','some','matchAll','1826684xxonLU','Unterminated\x20MyBatis\x20XML\x20tag.','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','Unterminated\x20CDATA\x20section.','error','pop','1428328CIYyJk','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','tagName','Unterminated\x20XML\x20declaration.','update','property','bind','indexOf','KEY','has','-->','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','replaceAll','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','Unable\x20to\x20detect\x20SQL\x20type.\x20','fromCodePoint','outer','\x20SET\x20','exec','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','add','UPDATE'];a302_0x71c3=function(){return _0x237721;};return a302_0x71c3();}export function normalizeSqlForStaticAnalysis(_0x90a689){const _0x18a82b=a302_0x2ae9a3,_0x95200a=typeof _0x90a689==='string'?_0x90a689:'';if(detectSqlSourceMode(_0x95200a)===_0x18a82b(0x1f8))return{'sql':_0x95200a,'mode':_0x18a82b(0x1f8)};let _0x1af4bd=0x0,_0x36dd63='',_0x4a6003,_0x30acbf=![],_0x3ea5ca=![];const _0x3cdcc7=[];while(_0x1af4bd<_0x95200a[_0x18a82b(0x1b0)]){if(_0x95200a[_0x18a82b(0x201)](_0x18a82b(0x1fd),_0x1af4bd)){const _0x4482e0=_0x95200a[_0x18a82b(0x1c4)](_0x18a82b(0x1c7),_0x1af4bd+0x4);if(_0x4482e0<0x0)return invalidMybatisSource(_0x18a82b(0x1e7));_0x36dd63+='\x20',_0x1af4bd=_0x4482e0+0x3;continue;}if(_0x95200a[_0x18a82b(0x201)](_0x18a82b(0x1f0),_0x1af4bd)){if(!_0x30acbf||_0x3ea5ca)return invalidMybatisSource(_0x18a82b(0x1ae));const _0x383d30=_0x95200a[_0x18a82b(0x1c4)](']]>',_0x1af4bd+0x9);if(_0x383d30<0x0)return invalidMybatisSource(_0x18a82b(0x1ba));_0x36dd63+=_0x95200a[_0x18a82b(0x1e5)](_0x1af4bd+0x9,_0x383d30),_0x1af4bd=_0x383d30+0x3;continue;}if(_0x95200a[_0x18a82b(0x201)]('<?',_0x1af4bd)){if(_0x30acbf)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x27859a=_0x95200a[_0x18a82b(0x1c4)]('?>',_0x1af4bd+0x2);if(_0x27859a<0x0)return invalidMybatisSource(_0x18a82b(0x1c0));_0x36dd63+='\x20',_0x1af4bd=_0x27859a+0x2;continue;}if(_0x95200a[_0x1af4bd]!=='<'){const _0x1831fd=_0x95200a['indexOf']('<',_0x1af4bd),_0x5b7a24=_0x1831fd<0x0?_0x95200a[_0x18a82b(0x1b0)]:_0x1831fd,_0x464afb=_0x95200a['slice'](_0x1af4bd,_0x5b7a24);if((!_0x30acbf||_0x3ea5ca)&&_0x464afb[_0x18a82b(0x1db)]())return invalidMybatisSource(_0x18a82b(0x208));if(_0x30acbf&&!_0x3ea5ca){const _0x3bf531=decodeXmlEntities(_0x464afb);if(_0x3bf531===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x36dd63+=_0x3bf531;}else _0x36dd63+='\x20';_0x1af4bd=_0x5b7a24;continue;}const _0x30526b=findXmlTagEnd(_0x95200a,_0x1af4bd);if(_0x30526b<0x0)return invalidMybatisSource(_0x18a82b(0x1b8));const _0x4d1d6c=_0x95200a['slice'](_0x1af4bd,_0x30526b+0x1),_0x5c04bd=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x18a82b(0x1cf)](_0x4d1d6c);if(!_0x5c04bd)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x174f5e=_0x5c04bd[0x1]==='/',_0x3fc6de=_0x5c04bd[0x2]??'',_0x12119e=_0x3fc6de[_0x18a82b(0x1d5)](),_0x316c9c=_0x5c04bd[0x3]??'',_0x2cec01=_0x5c04bd[0x4]==='/',_0x5f50a1=MYBATIS_OUTER_TAGS[_0x18a82b(0x206)](_0x12119e);if(!_0x5f50a1&&!MYBATIS_DYNAMIC_TAGS['has'](_0x12119e))return invalidMybatisSource(_0x18a82b(0x1ee)+_0x12119e+'>.');if(!_0x5f50a1&&_0x3fc6de!==_0x12119e)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x3fc6de+'>.');if(_0x174f5e){if(_0x316c9c[_0x18a82b(0x1db)]()||_0x2cec01)return invalidMybatisSource(_0x18a82b(0x209)+_0x3fc6de+'>.');const _0x272024=_0x3cdcc7['at'](-0x1);if(!_0x272024||(_0x272024['outer']?_0x272024[_0x18a82b(0x1bf)]!==_0x12119e:_0x272024[_0x18a82b(0x1ef)]!==_0x3fc6de))return invalidMybatisSource(_0x18a82b(0x1c8)+_0x3fc6de+'>.');_0x3cdcc7[_0x18a82b(0x1bc)]();if(_0x272024[_0x18a82b(0x1cd)])_0x3ea5ca=!![];_0x36dd63+=MYBATIS_BRANCH_TAGS[_0x18a82b(0x1c6)](_0x12119e)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x316c9c))return invalidMybatisSource(_0x18a82b(0x1a7)+_0x3fc6de+'>.');if(_0x12119e===_0x18a82b(0x1c2)&&(!_0x2cec01||_0x3cdcc7['at'](-0x1)?.['tagName']!==_0x18a82b(0x1ad)))return invalidMybatisSource(_0x18a82b(0x1ca));if(_0x5f50a1){if(_0x30acbf||_0x3cdcc7['length']>0x0)return invalidMybatisSource(_0x18a82b(0x1ea));_0x30acbf=!![],_0x3ea5ca=_0x2cec01,_0x4a6003=_0x5f50a1;}else{if(!_0x30acbf||_0x3ea5ca)return invalidMybatisSource(_0x18a82b(0x1d0)+_0x3fc6de+'>.');}_0x36dd63+=_0x12119e===_0x18a82b(0x1ab)?_0x18a82b(0x1aa):_0x12119e==='set'?_0x18a82b(0x1ce):_0x12119e===_0x18a82b(0x1ad)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x18a82b(0x1c6)](_0x12119e)&&!_0x2cec01?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x2cec01&&_0x3cdcc7['push']({'rawName':_0x3fc6de,'tagName':_0x12119e,'outer':!!_0x5f50a1});}_0x1af4bd=_0x30526b+0x1;}if(_0x3cdcc7[_0x18a82b(0x1b0)]>0x0)return invalidMybatisSource(_0x18a82b(0x1be)+_0x3cdcc7['at'](-0x1)?.[_0x18a82b(0x1ef)]+'>.');if(!_0x30acbf||!_0x3ea5ca)return invalidMybatisSource(_0x18a82b(0x1d6));return{'sql':_0x36dd63[_0x18a82b(0x1db)](),'mode':_0x18a82b(0x204),..._0x4a6003?{'statementType':_0x4a6003}:{}};}function hasWellFormedXmlAttributes(_0x264df6){const _0x38d52a=a302_0x2ae9a3;let _0x421339=0x0;const _0x2e58ed=new Set();while(_0x421339<_0x264df6[_0x38d52a(0x1b0)]){while(_0x421339<_0x264df6['length']&&/\s/[_0x38d52a(0x1de)](_0x264df6[_0x421339]??''))_0x421339+=0x1;if(_0x421339>=_0x264df6[_0x38d52a(0x1b0)])return!![];const _0x122a49=/^[A-Za-z_:][\w:.-]*/['exec'](_0x264df6['slice'](_0x421339)),_0x56b594=_0x122a49?.[0x0];if(!_0x56b594||_0x2e58ed[_0x38d52a(0x1c6)](_0x56b594))return![];_0x2e58ed[_0x38d52a(0x1d1)](_0x56b594),_0x421339+=_0x56b594[_0x38d52a(0x1b0)];while(_0x421339<_0x264df6[_0x38d52a(0x1b0)]&&/\s/[_0x38d52a(0x1de)](_0x264df6[_0x421339]??''))_0x421339+=0x1;if(_0x264df6[_0x421339]!=='=')return![];_0x421339+=0x1;while(_0x421339<_0x264df6[_0x38d52a(0x1b0)]&&/\s/['test'](_0x264df6[_0x421339]??''))_0x421339+=0x1;const _0x28b4a8=_0x264df6[_0x421339];if(_0x28b4a8!=='\x22'&&_0x28b4a8!=='\x27')return![];_0x421339+=0x1;const _0x8b10e7=_0x264df6[_0x38d52a(0x1c4)](_0x28b4a8,_0x421339);if(_0x8b10e7<0x0)return![];if(decodeXmlEntities(_0x264df6[_0x38d52a(0x1e5)](_0x421339,_0x8b10e7))===null)return![];_0x421339=_0x8b10e7+0x1;}return!![];}export function detectSqlSourceMode(_0x4456b2){const _0x4b5792=a302_0x2ae9a3;let _0xade896=0x0;const _0x5e53c7=()=>{const _0x25a096=a302_0x5e36;while(_0xade896<_0x4456b2[_0x25a096(0x1b0)]&&/\s/[_0x25a096(0x1de)](_0x4456b2[_0xade896]??''))_0xade896+=0x1;};_0x5e53c7();while(_0xade896<_0x4456b2['length']){if(_0x4456b2[_0x4b5792(0x201)](_0x4b5792(0x1fd),_0xade896)){const _0x9d8fa8=_0x4456b2[_0x4b5792(0x1c4)]('-->',_0xade896+0x4);if(_0x9d8fa8<0x0)return'mybatisXml';_0xade896=_0x9d8fa8+0x3,_0x5e53c7();continue;}if(_0x4456b2['startsWith']('<?',_0xade896)){const _0x23f014=_0x4456b2[_0x4b5792(0x1c4)]('?>',_0xade896+0x2);if(_0x23f014<0x0)return _0x4b5792(0x204);_0xade896=_0x23f014+0x2,_0x5e53c7();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x4b5792(0x1de)](_0x4456b2[_0x4b5792(0x1e5)](_0xade896))?_0x4b5792(0x204):_0x4b5792(0x1f8);}function invalidMybatisSource(_0x2ae191){const _0x383eec=a302_0x2ae9a3;return{'sql':'','mode':_0x383eec(0x204),'error':_0x2ae191};}function findXmlTagEnd(_0x518678,_0x15a88d){let _0x13c16d;for(let _0x26c6f0=_0x15a88d+0x1;_0x26c6f0<_0x518678['length'];_0x26c6f0+=0x1){const _0x1f8b83=_0x518678[_0x26c6f0];if(_0x13c16d){if(_0x1f8b83===_0x13c16d)_0x13c16d=undefined;continue;}if(_0x1f8b83==='\x22'||_0x1f8b83==='\x27'){_0x13c16d=_0x1f8b83;continue;}if(_0x1f8b83==='>')return _0x26c6f0;}return-0x1;}function a302_0x5e36(_0x657205,_0x308cbf){_0x657205=_0x657205-0x1a3;const _0x71c35e=a302_0x71c3();let _0x5e3662=_0x71c35e[_0x657205];return _0x5e3662;}function decodeXmlEntities(_0x2b364b){const _0x344e0e=a302_0x2ae9a3;let _0x4fcb13=![];const _0x25b7c0=_0x2b364b[_0x344e0e(0x1b1)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x3653ce=>{const _0x6f2583=_0x344e0e;if(_0x3653ce==='<')return'<';if(_0x3653ce===_0x6f2583(0x1a3))return'>';if(_0x3653ce===_0x6f2583(0x1ac))return'\x22';if(_0x3653ce===''')return'\x27';if(_0x3653ce===_0x6f2583(0x1e9))return'&';const _0xbe7802=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x3653ce);if(_0xbe7802){const _0x390662=_0xbe7802[0x1],_0xb2eda=_0xbe7802[0x2],_0xadd549=Number[_0x6f2583(0x1d7)](_0x390662??_0xb2eda??'',_0x390662?0x10:0xa);if(isValidXmlCharacter(_0xadd549))return String[_0x6f2583(0x1cc)](_0xadd549);}return _0x4fcb13=!![],'';});return _0x4fcb13?null:_0x25b7c0;}function isValidXmlCharacter(_0x5d6a55){return _0x5d6a55===0x9||_0x5d6a55===0xa||_0x5d6a55===0xd||_0x5d6a55>=0x20&&_0x5d6a55<=0xd7ff||_0x5d6a55>=0xe000&&_0x5d6a55<=0xfffd||_0x5d6a55>=0x10000&&_0x5d6a55<=0x10ffff;}export function detectSqlType(_0x1b25b7){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1b25b7));}function detectNormalizedSqlType(_0x5bb44e){const _0x7bcce=a302_0x2ae9a3;if(_0x5bb44e[_0x7bcce(0x1bb)])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x5bb44e[_0x7bcce(0x1bb)]};if(!_0x5bb44e[_0x7bcce(0x1f8)][_0x7bcce(0x1db)]())return{'type':_0x7bcce(0x1a8),'isSelectOnly':![],'isDangerous':![],'reason':_0x7bcce(0x203)};const _0x203223=tokenizeSqlForTypeAnalysis(_0x5bb44e[_0x7bcce(0x1f8)]),_0x8b2dd3=_0x203223['filter'](_0x25dc0d=>_0x25dc0d!==MYBATIS_DYNAMIC_START_MARKER&&_0x25dc0d!==MYBATIS_DYNAMIC_END_MARKER),_0x3fbff8=findMainStatementIndex(_0x8b2dd3);if(_0x3fbff8<0x0)return{'type':_0x7bcce(0x1a8),'isSelectOnly':![],'isDangerous':![],'reason':_0x7bcce(0x1fe)};const _0x4beb6a=_0x8b2dd3[_0x3fbff8]??'',_0x4974df=_0x5bb44e[_0x7bcce(0x1f5)]??_0x4beb6a,_0x4c959f=_0x203223['some'](_0x44dbdb=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/['test'](_0x44dbdb)),_0x5dd46d=new Set();let _0x7bbd3d=![];for(let _0x49ce28=0x0;_0x49ce28<_0x203223['length'];_0x49ce28+=0x1){const _0x331c9c=_0x203223[_0x49ce28];(_0x331c9c===_0x7bcce(0x1d2)||_0x331c9c===_0x7bcce(0x1fa))&&isLockingClauseKeyword(_0x203223,_0x49ce28)&&(_0x5dd46d[_0x7bcce(0x1d1)](_0x49ce28),_0x7bbd3d=!![]);if(_0x203223[_0x7bcce(0x1e5)](_0x49ce28,_0x49ce28+0x4)[_0x7bcce(0x1b2)]('\x20')==='LOCK\x20IN\x20SHARE\x20MODE')_0x7bbd3d=!![];}if(_0x4974df===_0x7bcce(0x1e1)){const _0x2a51c5=_0x203223[_0x7bcce(0x1b5)]((_0x65dae3,_0x224e65)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x7bcce(0x1de)](_0x65dae3)&&!_0x5dd46d[_0x7bcce(0x1c6)](_0x224e65));return{'type':_0x7bcce(0x1e1),'isSelectOnly':!_0x2a51c5&&!_0x7bbd3d,'isLockingRead':_0x7bbd3d,'isDangerous':_0x2a51c5,'reason':_0x2a51c5?_0x7bcce(0x1d3):undefined};}if(_0x4974df===_0x7bcce(0x1e6))return{'type':_0x7bcce(0x1e6),'isSelectOnly':![],'isDangerous':_0x4c959f,'reason':_0x4c959f?_0x7bcce(0x200):undefined};if(_0x4974df===_0x7bcce(0x1d2))return{'type':_0x7bcce(0x1d2),'isSelectOnly':![],'isDangerous':_0x4c959f,'reason':_0x4c959f?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x4974df==='DELETE')return{'type':_0x7bcce(0x1f4),'isSelectOnly':![],'isDangerous':!![],'reason':_0x7bcce(0x1f9)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x7bcce(0x1de)](_0x4beb6a))return{'type':_0x7bcce(0x202),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20require\x20explicit\x20review'};return{'type':_0x7bcce(0x1a8),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x28e47a,_0x23cc80){const _0x145ad8=a302_0x2ae9a3,_0x5850ef=_0x28e47a[_0x23cc80]===_0x145ad8(0x1d2)?[['FOR'],[_0x145ad8(0x1e3),'NO',_0x145ad8(0x1c5)]]:[[_0x145ad8(0x1e3)],[_0x145ad8(0x1e3),_0x145ad8(0x1c5)]],_0x1ce973=_0x5850ef[_0x145ad8(0x1b5)](_0x59bda8=>{const _0x5bcd9d=_0x145ad8,_0x2966f8=_0x23cc80-_0x59bda8['length'];return _0x2966f8>=0x0&&_0x28e47a['slice'](_0x2966f8,_0x23cc80)[_0x5bcd9d(0x1b2)]('\x20')===_0x59bda8[_0x5bcd9d(0x1b2)]('\x20');});if(!_0x1ce973)return![];return!_0x28e47a[_0x145ad8(0x1e5)](_0x23cc80+0x1,_0x23cc80+0x5)[_0x145ad8(0x1ed)](_0x145ad8(0x1f6));}function findMainStatementIndex(_0xb07016){const _0x1f3397=a302_0x2ae9a3;if(_0xb07016[0x0]!==_0x1f3397(0x1d8))return 0x0;let _0x20c93e=_0xb07016[0x1]==='RECURSIVE'?0x2:0x1;while(_0x20c93e<_0xb07016[_0x1f3397(0x1b0)]){const _0x378047=_0xb07016[_0x20c93e];if(!_0x378047||!(/^[A-Z_][\w$]*$/[_0x1f3397(0x1de)](_0x378047)||/^[`"]/[_0x1f3397(0x1de)](_0x378047)))return-0x1;_0x20c93e+=0x1;if(_0xb07016[_0x20c93e]==='('){_0x20c93e=skipSqlParentheses(_0xb07016,_0x20c93e);if(_0x20c93e<0x0)return-0x1;}if(_0xb07016[_0x20c93e]!=='AS')return-0x1;_0x20c93e+=0x1;if(_0xb07016[_0x20c93e]===_0x1f3397(0x205)&&_0xb07016[_0x20c93e+0x1]===_0x1f3397(0x1ec))_0x20c93e+=0x2;else{if(_0xb07016[_0x20c93e]===_0x1f3397(0x1ec))_0x20c93e+=0x1;}_0x20c93e=skipSqlParentheses(_0xb07016,_0x20c93e);if(_0x20c93e<0x0)return-0x1;if(_0xb07016[_0x20c93e]!==','){const _0x5b36e0=_0xb07016[_0x20c93e]==='('?_0x20c93e+0x1:_0x20c93e;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x1f3397(0x1de)](_0xb07016[_0x5b36e0]??'')?_0x5b36e0:-0x1;}_0x20c93e+=0x1;}return-0x1;}function skipSqlParentheses(_0x29664d,_0x2a9a4a){const _0x2db907=a302_0x2ae9a3;if(_0x29664d[_0x2a9a4a]!=='(')return-0x1;let _0x320f17=0x0;for(let _0x52ea16=_0x2a9a4a;_0x52ea16<_0x29664d[_0x2db907(0x1b0)];_0x52ea16+=0x1){const _0x503d7e=_0x29664d[_0x52ea16];if(_0x503d7e===';')return-0x1;if(_0x503d7e==='(')_0x320f17+=0x1;if(_0x503d7e===')'&&--_0x320f17===0x0)return _0x52ea16+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x39dc3a){const _0x23ffbb=a302_0x2ae9a3;return _0x39dc3a[_0x23ffbb(0x1c9)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x23ffbb(0x1c9)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x23ffbb(0x1c9)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x50a4eb){const _0x352974=a302_0x2ae9a3,_0x5486e6=[],_0x4b5355=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x1a5055 of _0x50a4eb['matchAll'](_0x4b5355)){const _0x3ddeea=_0x1a5055[0x0];if(_0x3ddeea[_0x352974(0x201)]('/*')||_0x3ddeea[_0x352974(0x201)]('--')||_0x3ddeea[_0x352974(0x201)]('#')&&!_0x3ddeea['startsWith']('#{'))continue;_0x5486e6[_0x352974(0x1e8)](/^["`]/[_0x352974(0x1de)](_0x3ddeea)?_0x3ddeea:/^[\x27@#$]/[_0x352974(0x1de)](_0x3ddeea)?'?':_0x3ddeea[_0x352974(0x1f2)]());}return _0x5486e6;}function extractTables(_0x39a8b2,_0x105e7d){const _0x557222=a302_0x2ae9a3,_0x3d5164=_0x39a8b2[_0x557222(0x1b1)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x557222(0x1b1)](/'[^']*'/g,'\x27\x27')[_0x557222(0x1b1)](/--.*$/gm,'')[_0x557222(0x1b1)](/\/\*[\s\S]*?\*\//g,''),_0x108abf=[],_0x59dda6=_0x3d5164[_0x557222(0x1b3)](/FROM\s+([^\s,)(]+)/i);addTable(_0x108abf,_0x59dda6?.[0x1]);for(const _0xd28fb8 of _0x3d5164[_0x557222(0x1b6)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x108abf,_0xd28fb8[0x1]);}const _0x299f59=_0x3d5164['match'](/INTO\s+([^\s(]+)/i);addTable(_0x108abf,_0x299f59?.[0x1]);if(_0x105e7d===_0x557222(0x1d2)){const _0x3027f0=_0x3d5164[_0x557222(0x1b3)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x108abf,_0x3027f0?.[0x1]);}return _0x108abf;}function addTable(_0x3a420d,_0x73dd9a){const _0x30c166=a302_0x2ae9a3,_0x566495=_0x73dd9a?.[_0x30c166(0x1b1)](/[`"]/g,'');_0x566495&&_0x566495!==UNRESOLVED_SQL_FRAGMENT&&!_0x3a420d[_0x30c166(0x1ed)](_0x566495)&&_0x3a420d[_0x30c166(0x1e8)](_0x566495);}function extractParameters(_0x58854e){const _0x562061=a302_0x2ae9a3,_0x2680db=new Set();for(const _0x3b895e of _0x58854e['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x3b895e[0x1])_0x2680db[_0x562061(0x1d1)](_0x3b895e[0x1]);}return Array[_0x562061(0x1f7)](_0x2680db);}export function validateSql(_0x1b4d42){const _0x205df0=a302_0x2ae9a3,_0x144569=normalizeSqlForStaticAnalysis(_0x1b4d42),_0x2af72e=detectNormalizedSqlType(_0x144569),_0x57f00b=stripStaticAnalysisMarkers(_0x144569[_0x205df0(0x1f8)]),_0x3c65f1=_0x144569['error']?[]:extractTables(_0x57f00b,_0x2af72e[_0x205df0(0x1a4)]),_0x1d372e=_0x144569[_0x205df0(0x1bb)]?[]:extractParameters(_0x57f00b);if(_0x2af72e['isDangerous'])return{'valid':![],'sqlType':_0x2af72e,'tables':_0x3c65f1,'parameters':_0x1d372e,'message':_0x2af72e[_0x205df0(0x1df)]||_0x2af72e[_0x205df0(0x1a4)]+_0x205df0(0x1b9)};if(_0x2af72e[_0x205df0(0x1a4)]===_0x205df0(0x1a8))return{'valid':![],'sqlType':_0x2af72e,'tables':_0x3c65f1,'parameters':_0x1d372e,'message':_0x144569[_0x205df0(0x1bb)]?_0x205df0(0x1cb)+_0x144569[_0x205df0(0x1bb)]:_0x2af72e[_0x205df0(0x1df)]?_0x205df0(0x1cb)+_0x2af72e[_0x205df0(0x1df)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x2af72e,'tables':_0x3c65f1,'parameters':_0x1d372e,'message':_0x2af72e[_0x205df0(0x1a4)]+_0x205df0(0x1f1)+(_0x3c65f1['length']?_0x3c65f1[_0x205df0(0x1b2)](',\x20'):'unknown\x20table(s)')+(_0x1d372e['length']?'\x20with\x20parameters:\x20'+_0x1d372e[_0x205df0(0x1b2)](',\x20'):'')};}
|
|
1
|
+
const a307_0x4f83e8=a307_0xf0b1;(function(_0x21d1f9,_0x5039cf){const _0x3d3186=a307_0xf0b1,_0x1d02bd=_0x21d1f9();while(!![]){try{const _0x139a95=parseInt(_0x3d3186(0x17a))/0x1*(parseInt(_0x3d3186(0x186))/0x2)+-parseInt(_0x3d3186(0x151))/0x3*(parseInt(_0x3d3186(0x13d))/0x4)+parseInt(_0x3d3186(0x16e))/0x5+-parseInt(_0x3d3186(0x146))/0x6+-parseInt(_0x3d3186(0x179))/0x7+-parseInt(_0x3d3186(0x14a))/0x8*(-parseInt(_0x3d3186(0x167))/0x9)+parseInt(_0x3d3186(0x14c))/0xa;if(_0x139a95===_0x5039cf)break;else _0x1d02bd['push'](_0x1d02bd['shift']());}catch(_0x33aad6){_0x1d02bd['push'](_0x1d02bd['shift']());}}}(a307_0x1945,0xeb507));const MYBATIS_OUTER_TAGS=new Map([[a307_0x4f83e8(0x139),a307_0x4f83e8(0x17d)],[a307_0x4f83e8(0x157),'INSERT'],[a307_0x4f83e8(0x158),a307_0x4f83e8(0x121)],[a307_0x4f83e8(0x11f),a307_0x4f83e8(0x16a)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a307_0x4f83e8(0x16d),a307_0x4f83e8(0x133),a307_0x4f83e8(0x136),a307_0x4f83e8(0x131),a307_0x4f83e8(0x124),a307_0x4f83e8(0x123),a307_0x4f83e8(0x119),'bind',a307_0x4f83e8(0x178),a307_0x4f83e8(0x173)]),MYBATIS_BRANCH_TAGS=new Set(['if',a307_0x4f83e8(0x133),'choose',a307_0x4f83e8(0x131),a307_0x4f83e8(0x124)]);export const MYBATIS_DYNAMIC_START_MARKER=a307_0x4f83e8(0x169);export const MYBATIS_DYNAMIC_END_MARKER='__RABETBASE_MYBATIS_DYNAMIC_END__';export const MYBATIS_INCLUDE_MARKER=a307_0x4f83e8(0x183);const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a307_0x4f83e8(0x175)+[...MYBATIS_OUTER_TAGS[a307_0x4f83e8(0x15b)]()][a307_0x4f83e8(0x156)]('|')+a307_0x4f83e8(0x127),'i');export function normalizeSqlForStaticAnalysis(_0x4f1a09){const _0x5e3d8f=a307_0x4f83e8,_0x3d595f=typeof _0x4f1a09===_0x5e3d8f(0x17b)?_0x4f1a09:'';if(detectSqlSourceMode(_0x3d595f)===_0x5e3d8f(0x153))return{'sql':_0x3d595f,'mode':_0x5e3d8f(0x153)};let _0x24f5b8=0x0,_0x1a3c84='',_0x4351b0,_0xba67b7=![],_0x495c89=![];const _0x36f619=[];while(_0x24f5b8<_0x3d595f[_0x5e3d8f(0x12b)]){if(_0x3d595f['startsWith'](_0x5e3d8f(0x16c),_0x24f5b8)){const _0x5aad0c=_0x3d595f['indexOf'](_0x5e3d8f(0x155),_0x24f5b8+0x4);if(_0x5aad0c<0x0)return invalidMybatisSource(_0x5e3d8f(0x152));_0x1a3c84+='\x20',_0x24f5b8=_0x5aad0c+0x3;continue;}if(_0x3d595f[_0x5e3d8f(0x16f)]('<,_0x24f5b8+0x9);if(_0x4ed8eb<0x0)return invalidMybatisSource(_0x5e3d8f(0x11a));_0x1a3c84+=_0x3d595f['slice'](_0x24f5b8+0x9,_0x4ed8eb),_0x24f5b8=_0x4ed8eb+0x3;continue;}if(_0x3d595f[_0x5e3d8f(0x16f)]('<?',_0x24f5b8)){if(_0xba67b7)return invalidMybatisSource(_0x5e3d8f(0x182));const _0x192912=_0x3d595f[_0x5e3d8f(0x12e)]('?>',_0x24f5b8+0x2);if(_0x192912<0x0)return invalidMybatisSource(_0x5e3d8f(0x135));_0x1a3c84+='\x20',_0x24f5b8=_0x192912+0x2;continue;}if(_0x3d595f[_0x24f5b8]!=='<'){const _0x35ce23=_0x3d595f[_0x5e3d8f(0x12e)]('<',_0x24f5b8),_0x349b0e=_0x35ce23<0x0?_0x3d595f[_0x5e3d8f(0x12b)]:_0x35ce23,_0x195f96=_0x3d595f['slice'](_0x24f5b8,_0x349b0e);if((!_0xba67b7||_0x495c89)&&_0x195f96[_0x5e3d8f(0x123)]())return invalidMybatisSource(_0x5e3d8f(0x11d));if(_0xba67b7&&!_0x495c89){const _0x1a1353=decodeXmlEntities(_0x195f96);if(_0x1a1353===null)return invalidMybatisSource(_0x5e3d8f(0x142));_0x1a3c84+=_0x1a1353;}else _0x1a3c84+='\x20';_0x24f5b8=_0x349b0e;continue;}const _0xc89fc0=findXmlTagEnd(_0x3d595f,_0x24f5b8);if(_0xc89fc0<0x0)return invalidMybatisSource(_0x5e3d8f(0x13e));const _0x4c83e3=_0x3d595f[_0x5e3d8f(0x118)](_0x24f5b8,_0xc89fc0+0x1),_0x4b1b6b=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x5e3d8f(0x141)](_0x4c83e3);if(!_0x4b1b6b)return invalidMybatisSource(_0x5e3d8f(0x17e));const _0x83ef66=_0x4b1b6b[0x1]==='/',_0x259fdb=_0x4b1b6b[0x2]??'',_0x133a8d=_0x259fdb['toLowerCase'](),_0x34c25d=_0x4b1b6b[0x3]??'',_0x29f5ff=_0x4b1b6b[0x4]==='/',_0x1004f2=MYBATIS_OUTER_TAGS[_0x5e3d8f(0x176)](_0x133a8d);if(!_0x1004f2&&!MYBATIS_DYNAMIC_TAGS[_0x5e3d8f(0x161)](_0x133a8d))return invalidMybatisSource(_0x5e3d8f(0x130)+_0x133a8d+'>.');if(!_0x1004f2&&_0x259fdb!==_0x133a8d)return invalidMybatisSource(_0x5e3d8f(0x148)+_0x259fdb+'>.');if(_0x83ef66){if(_0x34c25d[_0x5e3d8f(0x123)]()||_0x29f5ff)return invalidMybatisSource(_0x5e3d8f(0x15e)+_0x259fdb+'>.');const _0x2b2c98=_0x36f619['at'](-0x1);if(!_0x2b2c98||(_0x2b2c98[_0x5e3d8f(0x14f)]?_0x2b2c98[_0x5e3d8f(0x145)]!==_0x133a8d:_0x2b2c98['rawName']!==_0x259fdb))return invalidMybatisSource(_0x5e3d8f(0x143)+_0x259fdb+'>.');_0x36f619[_0x5e3d8f(0x128)]();if(_0x2b2c98['outer'])_0x495c89=!![];_0x1a3c84+=MYBATIS_BRANCH_TAGS[_0x5e3d8f(0x161)](_0x133a8d)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x34c25d))return invalidMybatisSource(_0x5e3d8f(0x11b)+_0x259fdb+'>.');if(_0x133a8d===_0x5e3d8f(0x173)&&(!_0x29f5ff||_0x36f619['at'](-0x1)?.['tagName']!==_0x5e3d8f(0x178)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x1004f2){if(_0xba67b7||_0x36f619[_0x5e3d8f(0x12b)]>0x0)return invalidMybatisSource(_0x5e3d8f(0x12f));_0xba67b7=!![],_0x495c89=_0x29f5ff,_0x4351b0=_0x1004f2;}else{if(!_0xba67b7||_0x495c89)return invalidMybatisSource(_0x5e3d8f(0x14e)+_0x259fdb+'>.');}_0x1a3c84+=_0x133a8d===_0x5e3d8f(0x16d)?_0x5e3d8f(0x15f):_0x133a8d==='set'?_0x5e3d8f(0x168):_0x133a8d===_0x5e3d8f(0x178)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x5e3d8f(0x161)](_0x133a8d)&&!_0x29f5ff?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x29f5ff&&_0x36f619[_0x5e3d8f(0x134)]({'rawName':_0x259fdb,'tagName':_0x133a8d,'outer':!!_0x1004f2});}_0x24f5b8=_0xc89fc0+0x1;}if(_0x36f619[_0x5e3d8f(0x12b)]>0x0)return invalidMybatisSource(_0x5e3d8f(0x126)+_0x36f619['at'](-0x1)?.[_0x5e3d8f(0x160)]+'>.');if(!_0xba67b7||!_0x495c89)return invalidMybatisSource(_0x5e3d8f(0x14b));return{'sql':_0x1a3c84[_0x5e3d8f(0x123)](),'mode':_0x5e3d8f(0x150),..._0x4351b0?{'statementType':_0x4351b0}:{}};}function hasWellFormedXmlAttributes(_0x6dc47){const _0x431f22=a307_0x4f83e8;let _0xa03aff=0x0;const _0x429658=new Set();while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]){while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/['test'](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;if(_0xa03aff>=_0x6dc47['length'])return!![];const _0x4b9f78=/^[A-Za-z_:][\w:.-]*/[_0x431f22(0x141)](_0x6dc47['slice'](_0xa03aff)),_0x192827=_0x4b9f78?.[0x0];if(!_0x192827||_0x429658[_0x431f22(0x161)](_0x192827))return![];_0x429658['add'](_0x192827),_0xa03aff+=_0x192827['length'];while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/[_0x431f22(0x13f)](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;if(_0x6dc47[_0xa03aff]!=='=')return![];_0xa03aff+=0x1;while(_0xa03aff<_0x6dc47[_0x431f22(0x12b)]&&/\s/[_0x431f22(0x13f)](_0x6dc47[_0xa03aff]??''))_0xa03aff+=0x1;const _0x2c4694=_0x6dc47[_0xa03aff];if(_0x2c4694!=='\x22'&&_0x2c4694!=='\x27')return![];_0xa03aff+=0x1;const _0x5ae348=_0x6dc47['indexOf'](_0x2c4694,_0xa03aff);if(_0x5ae348<0x0)return![];if(decodeXmlEntities(_0x6dc47[_0x431f22(0x118)](_0xa03aff,_0x5ae348))===null)return![];_0xa03aff=_0x5ae348+0x1;}return!![];}export function detectSqlSourceMode(_0x215a1f){const _0x1cee0a=a307_0x4f83e8;let _0xa33989=0x0;const _0x200bc4=()=>{const _0x58f037=a307_0xf0b1;while(_0xa33989<_0x215a1f[_0x58f037(0x12b)]&&/\s/[_0x58f037(0x13f)](_0x215a1f[_0xa33989]??''))_0xa33989+=0x1;};_0x200bc4();while(_0xa33989<_0x215a1f[_0x1cee0a(0x12b)]){if(_0x215a1f['startsWith'](_0x1cee0a(0x16c),_0xa33989)){const _0x5c0724=_0x215a1f[_0x1cee0a(0x12e)]('-->',_0xa33989+0x4);if(_0x5c0724<0x0)return'mybatisXml';_0xa33989=_0x5c0724+0x3,_0x200bc4();continue;}if(_0x215a1f[_0x1cee0a(0x16f)]('<?',_0xa33989)){const _0x10f0f2=_0x215a1f[_0x1cee0a(0x12e)]('?>',_0xa33989+0x2);if(_0x10f0f2<0x0)return _0x1cee0a(0x150);_0xa33989=_0x10f0f2+0x2,_0x200bc4();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x1cee0a(0x13f)](_0x215a1f[_0x1cee0a(0x118)](_0xa33989))?_0x1cee0a(0x150):_0x1cee0a(0x153);}function invalidMybatisSource(_0x6c014d){const _0x3806df=a307_0x4f83e8;return{'sql':'','mode':_0x3806df(0x150),'error':_0x6c014d};}function findXmlTagEnd(_0x44a5ec,_0x3bd373){const _0x38fdfe=a307_0x4f83e8;let _0xabf665;for(let _0x5981cc=_0x3bd373+0x1;_0x5981cc<_0x44a5ec[_0x38fdfe(0x12b)];_0x5981cc+=0x1){const _0x3cc82a=_0x44a5ec[_0x5981cc];if(_0xabf665){if(_0x3cc82a===_0xabf665)_0xabf665=undefined;continue;}if(_0x3cc82a==='\x22'||_0x3cc82a==='\x27'){_0xabf665=_0x3cc82a;continue;}if(_0x3cc82a==='>')return _0x5981cc;}return-0x1;}function decodeXmlEntities(_0x59e4bd){const _0x431c28=a307_0x4f83e8;let _0x8a022f=![];const _0x6ddef5=_0x59e4bd[_0x431c28(0x159)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x3d4a04=>{const _0x5541dd=_0x431c28;if(_0x3d4a04==='<')return'<';if(_0x3d4a04===_0x5541dd(0x163))return'>';if(_0x3d4a04===_0x5541dd(0x177))return'\x22';if(_0x3d4a04===_0x5541dd(0x165))return'\x27';if(_0x3d4a04===_0x5541dd(0x11e))return'&';const _0x6a9b06=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x3d4a04);if(_0x6a9b06){const _0x2f9b1=_0x6a9b06[0x1],_0x32e5cf=_0x6a9b06[0x2],_0x1f9943=Number[_0x5541dd(0x13a)](_0x2f9b1??_0x32e5cf??'',_0x2f9b1?0x10:0xa);if(isValidXmlCharacter(_0x1f9943))return String['fromCodePoint'](_0x1f9943);}return _0x8a022f=!![],'';});return _0x8a022f?null:_0x6ddef5;}function isValidXmlCharacter(_0x20d137){return _0x20d137===0x9||_0x20d137===0xa||_0x20d137===0xd||_0x20d137>=0x20&&_0x20d137<=0xd7ff||_0x20d137>=0xe000&&_0x20d137<=0xfffd||_0x20d137>=0x10000&&_0x20d137<=0x10ffff;}export function detectSqlType(_0x409296){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x409296));}function detectNormalizedSqlType(_0x3c93ab){const _0x180024=a307_0x4f83e8;if(_0x3c93ab[_0x180024(0x164)])return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x3c93ab[_0x180024(0x164)]};if(!_0x3c93ab[_0x180024(0x153)][_0x180024(0x123)]())return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x180024(0x185)};const _0x4a5a07=tokenizeSqlForTypeAnalysis(_0x3c93ab[_0x180024(0x153)]),_0x59cae3=_0x4a5a07[_0x180024(0x166)](_0x21efa2=>_0x21efa2!==MYBATIS_DYNAMIC_START_MARKER&&_0x21efa2!==MYBATIS_DYNAMIC_END_MARKER),_0x524072=findMainStatementIndex(_0x59cae3);if(_0x524072<0x0)return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![],'reason':_0x180024(0x15c)};const _0x224f25=_0x59cae3[_0x524072]??'',_0x483051=_0x3c93ab[_0x180024(0x162)]??_0x224f25,_0x5ab668=_0x4a5a07[_0x180024(0x140)](_0x4d97e3=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x180024(0x13f)](_0x4d97e3)),_0x1b357e=new Set();let _0x10d054=![];for(let _0x2f1315=0x0;_0x2f1315<_0x4a5a07[_0x180024(0x12b)];_0x2f1315+=0x1){const _0x350f00=_0x4a5a07[_0x2f1315];(_0x350f00===_0x180024(0x121)||_0x350f00===_0x180024(0x11c))&&isLockingClauseKeyword(_0x4a5a07,_0x2f1315)&&(_0x1b357e['add'](_0x2f1315),_0x10d054=!![]);if(_0x4a5a07['slice'](_0x2f1315,_0x2f1315+0x4)[_0x180024(0x156)]('\x20')==='LOCK\x20IN\x20SHARE\x20MODE')_0x10d054=!![];}if(_0x483051===_0x180024(0x17d)){const _0x2feb13=_0x4a5a07[_0x180024(0x140)]((_0x3bae8f,_0x521199)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x180024(0x13f)](_0x3bae8f)&&!_0x1b357e[_0x180024(0x161)](_0x521199));return{'type':'SELECT','isSelectOnly':!_0x2feb13&&!_0x10d054,'isLockingRead':_0x10d054,'isDangerous':_0x2feb13,'reason':_0x2feb13?_0x180024(0x149):undefined};}if(_0x483051==='INSERT')return{'type':_0x180024(0x129),'isSelectOnly':![],'isDangerous':_0x5ab668,'reason':_0x5ab668?_0x180024(0x184):undefined};if(_0x483051==='UPDATE')return{'type':_0x180024(0x121),'isSelectOnly':![],'isDangerous':_0x5ab668,'reason':_0x5ab668?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x483051===_0x180024(0x16a))return{'type':_0x180024(0x16a),'isSelectOnly':![],'isDangerous':!![],'reason':_0x180024(0x15a)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x180024(0x13f)](_0x224f25))return{'type':_0x180024(0x154),'isSelectOnly':![],'isDangerous':!![],'reason':_0x180024(0x181)};return{'type':_0x180024(0x170),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x2f9c4c,_0x5666b3){const _0x210326=a307_0x4f83e8,_0xcba2d5=_0x2f9c4c[_0x5666b3]==='UPDATE'?[[_0x210326(0x13c)],[_0x210326(0x13c),'NO',_0x210326(0x16b)]]:[['FOR'],[_0x210326(0x13c),_0x210326(0x16b)]],_0x4e2039=_0xcba2d5[_0x210326(0x140)](_0x5b4f69=>{const _0x1473e1=_0x210326,_0x24ca8f=_0x5666b3-_0x5b4f69[_0x1473e1(0x12b)];return _0x24ca8f>=0x0&&_0x2f9c4c['slice'](_0x24ca8f,_0x5666b3)[_0x1473e1(0x156)]('\x20')===_0x5b4f69[_0x1473e1(0x156)]('\x20');});if(!_0x4e2039)return![];return!_0x2f9c4c[_0x210326(0x118)](_0x5666b3+0x1,_0x5666b3+0x5)[_0x210326(0x12c)](_0x210326(0x147));}function findMainStatementIndex(_0x4ad624){const _0x6573a2=a307_0x4f83e8;if(_0x4ad624[0x0]!=='WITH')return 0x0;let _0x3171a1=_0x4ad624[0x1]===_0x6573a2(0x122)?0x2:0x1;while(_0x3171a1<_0x4ad624['length']){const _0x225a9a=_0x4ad624[_0x3171a1];if(!_0x225a9a||!(/^[A-Z_][\w$]*$/[_0x6573a2(0x13f)](_0x225a9a)||/^[`"]/['test'](_0x225a9a)))return-0x1;_0x3171a1+=0x1;if(_0x4ad624[_0x3171a1]==='('){_0x3171a1=skipSqlParentheses(_0x4ad624,_0x3171a1);if(_0x3171a1<0x0)return-0x1;}if(_0x4ad624[_0x3171a1]!=='AS')return-0x1;_0x3171a1+=0x1;if(_0x4ad624[_0x3171a1]===_0x6573a2(0x17c)&&_0x4ad624[_0x3171a1+0x1]===_0x6573a2(0x120))_0x3171a1+=0x2;else{if(_0x4ad624[_0x3171a1]===_0x6573a2(0x120))_0x3171a1+=0x1;}_0x3171a1=skipSqlParentheses(_0x4ad624,_0x3171a1);if(_0x3171a1<0x0)return-0x1;if(_0x4ad624[_0x3171a1]!==','){const _0x506992=_0x4ad624[_0x3171a1]==='('?_0x3171a1+0x1:_0x3171a1;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x6573a2(0x13f)](_0x4ad624[_0x506992]??'')?_0x506992:-0x1;}_0x3171a1+=0x1;}return-0x1;}function a307_0x1945(){const _0x11325c=['replace','DELETE\x20statements\x20require\x20explicit\x20review','keys','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','Unable\x20to\x20detect\x20SQL\x20type.\x20','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','\x20WHERE\x20','rawName','has','statementType','>','error',''','filter','672642XVzLYm','\x20SET\x20','__RABETBASE_MYBATIS_DYNAMIC_START__','DELETE','KEY','<!--','where','2105555STdOXF','startsWith','UNKNOWN','\x20query\x20targeting\x20','from','property','type','^<\x5cs*(?:','get','"','include','5683944JNwpln','87MbXkhG','string','NOT','SELECT','Invalid\x20MyBatis\x20XML\x20tag.','match','reason','DDL\x20statements\x20require\x20explicit\x20review','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','SQL\x20content\x20is\x20empty','27998bQoWGZ','slice','set','Unterminated\x20CDATA\x20section.','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','SHARE','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','&','delete','MATERIALIZED','UPDATE','RECURSIVE','trim','otherwise','isDangerous','Unclosed\x20MyBatis\x20XML\x20tag:\x20<',')\x5cb','pop','INSERT',']]>','length','includes','add','indexOf','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','when','replaceAll','foreach','push','Unterminated\x20XML\x20declaration.','choose','\x20with\x20parameters:\x20','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','select','parseInt','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','FOR','256keEEOF','Unterminated\x20MyBatis\x20XML\x20tag.','test','some','exec','Invalid\x20XML\x20entity\x20reference.','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','unknown\x20table(s)','tagName','4424436Tpoxik','SET','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','200cnsjJI','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','1745390nCtpvt','matchAll','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','outer','mybatisXml','54786ClBRqG','Unterminated\x20XML\x20comment.','sql','DDL','-->','join','insert','update'];a307_0x1945=function(){return _0x11325c;};return a307_0x1945();}function skipSqlParentheses(_0x152c07,_0x21047a){const _0x2ba0a5=a307_0x4f83e8;if(_0x152c07[_0x21047a]!=='(')return-0x1;let _0x721b38=0x0;for(let _0x8e3164=_0x21047a;_0x8e3164<_0x152c07[_0x2ba0a5(0x12b)];_0x8e3164+=0x1){const _0x2a107e=_0x152c07[_0x8e3164];if(_0x2a107e===';')return-0x1;if(_0x2a107e==='(')_0x721b38+=0x1;if(_0x2a107e===')'&&--_0x721b38===0x0)return _0x8e3164+0x1;}return-0x1;}function a307_0xf0b1(_0x455dec,_0x8979a7){_0x455dec=_0x455dec-0x118;const _0x194566=a307_0x1945();let _0xf0b13c=_0x194566[_0x455dec];return _0xf0b13c;}function stripStaticAnalysisMarkers(_0x54f2ae){const _0x1d8248=a307_0x4f83e8;return _0x54f2ae[_0x1d8248(0x132)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1d8248(0x132)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x1d8248(0x132)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x295e9b){const _0x2396a4=a307_0x4f83e8,_0x21d8bf=[],_0x5349b5=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x2c833b of _0x295e9b[_0x2396a4(0x14d)](_0x5349b5)){const _0x5b721a=_0x2c833b[0x0];if(_0x5b721a[_0x2396a4(0x16f)]('/*')||_0x5b721a['startsWith']('--')||_0x5b721a[_0x2396a4(0x16f)]('#')&&!_0x5b721a[_0x2396a4(0x16f)]('#{'))continue;_0x21d8bf[_0x2396a4(0x134)](/^["`]/[_0x2396a4(0x13f)](_0x5b721a)?_0x5b721a:/^[\x27@#$]/[_0x2396a4(0x13f)](_0x5b721a)?'?':_0x5b721a['toUpperCase']());}return _0x21d8bf;}function extractTables(_0x2b2eb9,_0x1e7e9e){const _0x29d4d1=a307_0x4f83e8,_0x295ae0=_0x2b2eb9[_0x29d4d1(0x159)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x29d4d1(0x159)](/'[^']*'/g,'\x27\x27')[_0x29d4d1(0x159)](/--.*$/gm,'')[_0x29d4d1(0x159)](/\/\*[\s\S]*?\*\//g,''),_0x32d109=[],_0x2cf4b4=_0x295ae0[_0x29d4d1(0x17f)](/FROM\s+([^\s,)(]+)/i);addTable(_0x32d109,_0x2cf4b4?.[0x1]);for(const _0xeea78d of _0x295ae0[_0x29d4d1(0x14d)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x32d109,_0xeea78d[0x1]);}const _0x73ca0b=_0x295ae0['match'](/INTO\s+([^\s(]+)/i);addTable(_0x32d109,_0x73ca0b?.[0x1]);if(_0x1e7e9e===_0x29d4d1(0x121)){const _0x263576=_0x295ae0['match'](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x32d109,_0x263576?.[0x1]);}return _0x32d109;}function addTable(_0x49e59d,_0x52665d){const _0x3a17e2=a307_0x4f83e8,_0x48f659=_0x52665d?.[_0x3a17e2(0x159)](/[`"]/g,'');_0x48f659&&_0x48f659!==UNRESOLVED_SQL_FRAGMENT&&!_0x49e59d[_0x3a17e2(0x12c)](_0x48f659)&&_0x49e59d[_0x3a17e2(0x134)](_0x48f659);}function extractParameters(_0x361c76){const _0x45dc63=a307_0x4f83e8,_0x5392a7=new Set();for(const _0x493a97 of _0x361c76['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x493a97[0x1])_0x5392a7[_0x45dc63(0x12d)](_0x493a97[0x1]);}return Array[_0x45dc63(0x172)](_0x5392a7);}export function validateSql(_0x121676){const _0x14f64a=a307_0x4f83e8,_0x49c01b=normalizeSqlForStaticAnalysis(_0x121676),_0x4b8117=detectNormalizedSqlType(_0x49c01b),_0x3036d7=stripStaticAnalysisMarkers(_0x49c01b[_0x14f64a(0x153)]),_0x4b807b=_0x49c01b[_0x14f64a(0x164)]?[]:extractTables(_0x3036d7,_0x4b8117[_0x14f64a(0x174)]),_0x3b3e5f=_0x49c01b['error']?[]:extractParameters(_0x3036d7);if(_0x4b8117[_0x14f64a(0x125)])return{'valid':![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x4b8117['reason']||_0x4b8117[_0x14f64a(0x174)]+_0x14f64a(0x13b)};if(_0x4b8117[_0x14f64a(0x174)]===_0x14f64a(0x170))return{'valid':![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x49c01b[_0x14f64a(0x164)]?_0x14f64a(0x15d)+_0x49c01b['error']:_0x4b8117[_0x14f64a(0x180)]?_0x14f64a(0x15d)+_0x4b8117[_0x14f64a(0x180)]:'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x4b8117,'tables':_0x4b807b,'parameters':_0x3b3e5f,'message':_0x4b8117[_0x14f64a(0x174)]+_0x14f64a(0x171)+(_0x4b807b[_0x14f64a(0x12b)]?_0x4b807b['join'](',\x20'):_0x14f64a(0x144))+(_0x3b3e5f[_0x14f64a(0x12b)]?_0x14f64a(0x137)+_0x3b3e5f[_0x14f64a(0x156)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a308_0x25c2e8=a308_0x1c7f;(function(_0x4730a0,_0x1201fc){const _0x1e52ff=a308_0x1c7f,_0x35819a=_0x4730a0();while(!![]){try{const _0xfbea45=-parseInt(_0x1e52ff(0x1b4))/0x1*(-parseInt(_0x1e52ff(0x1bd))/0x2)+-parseInt(_0x1e52ff(0x1ae))/0x3*(parseInt(_0x1e52ff(0x1b0))/0x4)+-parseInt(_0x1e52ff(0x1c5))/0x5+-parseInt(_0x1e52ff(0x1c1))/0x6+-parseInt(_0x1e52ff(0x1c4))/0x7+parseInt(_0x1e52ff(0x1b7))/0x8+parseInt(_0x1e52ff(0x1b8))/0x9*(parseInt(_0x1e52ff(0x1ba))/0xa);if(_0xfbea45===_0x1201fc)break;else _0x35819a['push'](_0x35819a['shift']());}catch(_0x407382){_0x35819a['push'](_0x35819a['shift']());}}}(a308_0x2613,0xae963));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a308_0x25c2e8(0x1bf)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':a308_0x25c2e8(0x1c0)+CLI_BIN_NAME+a308_0x25c2e8(0x1b9)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','notInProjectHint':a308_0x25c2e8(0x1bc)});function a308_0x2613(){const _0x2daeb4=['1489820fQmCPv','Configuration\x20file\x20not\x20found','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','150sZVnIY','unknown_command','Run\x20`','Set\x20appcode\x20via\x20`','8415894NJkhdp','validation','config_missing','2055690uJaAoU','2756390jifZXn','flag_missing','\x20--help`\x20to\x20see\x20available\x20commands.','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','Operation\x20cancelled.','Network\x20error:\x20','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','9NonBBe','apiError','1773548fuKJNV','Missing\x20required\x20flag:\x20--','\x20project\x20directory','\x20auth`\x20to\x20login\x20first.','8105dTjHXD','not_in_project','Authentication\x20required','6834656xINDvy','171sEfguh','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`'];a308_0x2613=function(){return _0x2daeb4;};return a308_0x2613();}function a308_0x1c7f(_0x52939f,_0x51bbe5){_0x52939f=_0x52939f-0x1ac;const _0x2613b8=a308_0x2613();let _0x1c7f9b=_0x2613b8[_0x52939f];return _0x1c7f9b;}export const CliErrors={'authRequired'(_0x47897b){const _0x1e33be=a308_0x25c2e8;return new CliError('auth_required',0x1,_0x1e33be(0x1b6),_0x47897b??'Run\x20`'+CLI_BIN_NAME+_0x1e33be(0x1b3));},'configMissing'(_0x45cc1f){const _0x1a1177=a308_0x25c2e8;return new CliError(_0x1a1177(0x1c3),0x1,_0x1a1177(0x1bb),_0x45cc1f??_0x1a1177(0x1c0)+CLI_BIN_NAME+_0x1a1177(0x1b9)+CLI_BIN_NAME+_0x1a1177(0x1ad));},'notInProject'(){const _0x2e5b15=a308_0x25c2e8;return new CliError(_0x2e5b15(0x1b5),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+_0x2e5b15(0x1b2),'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.');},'apiError'(_0x454cc8,_0x567d26){const _0x2d08a7=a308_0x25c2e8;return baseCliErrors[_0x2d08a7(0x1af)](_0x454cc8,_0x567d26);},'networkError'(_0x4ff30a){const _0x4d1144=a308_0x25c2e8;return new CliError('network_error',0x2,_0x4d1144(0x1ac)+_0x4ff30a,_0x4d1144(0x1c8));},'unknownCommand'(_0x150691){const _0xe59a48=a308_0x25c2e8;return new CliError(_0xe59a48(0x1be),0x1,'Unknown\x20command:\x20'+_0x150691,'Run\x20`'+CLI_BIN_NAME+_0xe59a48(0x1c7));},'flagMissing'(_0x263b95,_0x55b74d){const _0x27ef7a=a308_0x25c2e8;return new CliError(_0x27ef7a(0x1c6),0x1,_0x27ef7a(0x1b1)+_0x263b95,_0x55b74d);},'validation'(_0x459578,_0x4230f0){const _0x1e387e=a308_0x25c2e8;return baseCliErrors[_0x1e387e(0x1c2)](_0x459578,_0x4230f0);},'cancelled'(_0x557417){const _0x5c42d6=a308_0x25c2e8;return new CliError('cancelled',0x0,_0x557417??_0x5c42d6(0x1c9));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x50c089,_0x136f7d){const _0x26ea07=a309_0x1d20,_0x2dc777=_0x50c089();while(!![]){try{const _0x2e5f32=parseInt(_0x26ea07(0x140))/0x1*(-parseInt(_0x26ea07(0x143))/0x2)+parseInt(_0x26ea07(0x137))/0x3*(-parseInt(_0x26ea07(0x139))/0x4)+parseInt(_0x26ea07(0x13a))/0x5+-parseInt(_0x26ea07(0x13d))/0x6+parseInt(_0x26ea07(0x141))/0x7*(-parseInt(_0x26ea07(0x13e))/0x8)+-parseInt(_0x26ea07(0x13f))/0x9*(-parseInt(_0x26ea07(0x144))/0xa)+parseInt(_0x26ea07(0x142))/0xb*(parseInt(_0x26ea07(0x13c))/0xc);if(_0x2e5f32===_0x136f7d)break;else _0x2dc777['push'](_0x2dc777['shift']());}catch(_0x53cf7b){_0x2dc777['push'](_0x2dc777['shift']());}}}(a309_0x34d2,0xd0f42));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a309_0x513c15}from'@lovrabet/cli-framework';function a309_0x1d20(_0x3b3f02,_0x432d20){_0x3b3f02=_0x3b3f02-0x137;const _0x34d243=a309_0x34d2();let _0x1d206e=_0x34d243[_0x3b3f02];return _0x1d206e;}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a309_0x34d2(){const _0xb59d07=['name','25112jQKoAy','5832410sHTcqU','yes','84nKFCsD','4674252vHCiWY','1432GWuCSb','9225657PISksV','424054EWYVOx','11620sAQBUc','2622719jAJSDI','8DqFxSk','10nSNhvm','111XltoDf'];a309_0x34d2=function(){return _0xb59d07;};return a309_0x34d2();}export function buildAllFlags(_0x4b37f2){const _0x3556a0=a309_0x1d20,_0x582e8f=a309_0x513c15(_0x4b37f2,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x4b37f2))return _0x582e8f;return _0x582e8f['map'](_0x36abc4=>_0x36abc4[_0x3556a0(0x138)]===_0x3556a0(0x13b)?{..._0x36abc4,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x36abc4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46e871,_0x5d683d){var _0x5b4563=a310_0x31af,_0x3f552c=_0x46e871();while(!![]){try{var _0x2036ab=parseInt(_0x5b4563(0x129))/0x1+-parseInt(_0x5b4563(0x130))/0x2+parseInt(_0x5b4563(0x12d))/0x3+parseInt(_0x5b4563(0x128))/0x4+parseInt(_0x5b4563(0x12a))/0x5+-parseInt(_0x5b4563(0x12e))/0x6*(-parseInt(_0x5b4563(0x12b))/0x7)+-parseInt(_0x5b4563(0x131))/0x8*(parseInt(_0x5b4563(0x125))/0x9);if(_0x2036ab===_0x5d683d)break;else _0x3f552c['push'](_0x3f552c['shift']());}catch(_0x10ea25){_0x3f552c['push'](_0x3f552c['shift']());}}}(a310_0xba52,0x4129a));function a310_0x31af(_0x2db5f5,_0x316abd){_0x2db5f5=_0x2db5f5-0x124;var _0xba524=a310_0xba52();var _0x31af32=_0xba524[_0x2db5f5];return _0x31af32;}import{resolveOutputConfig}from'@lovrabet/cli-framework';function a310_0xba52(){var _0x4f254c=['2183935uKnhkC','1068172hvcaTN','def','93495jHVnfc','6bIXGHo','compress','256144qHMhfg','1544HXytuo','format','29871kXRDDq','defaultFormat','structuredErrors','200396eTcSGp','364898sHiERH'];a310_0xba52=function(){return _0x4f254c;};return a310_0xba52();}export function usesStructuredErrorOutput(_0x485ae1){var _0x2cfe44=a310_0x31af;return _0x485ae1?.[_0x2cfe44(0x127)]===!![];}export function resolveErrorOutputFormat(_0x38e7b6){var _0x5da0dd=a310_0x31af;if(!_0x38e7b6[_0x5da0dd(0x12c)])return _0x38e7b6['defaultFormat']??_0x5da0dd(0x12f);return resolveOutputConfig({'flags':_0x38e7b6['flags']??{},'def':_0x38e7b6[_0x5da0dd(0x12c)],'configDefault':_0x38e7b6[_0x5da0dd(0x126)]})[_0x5da0dd(0x124)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a311_0x3caa(){const _0x50a40e=['4481835bIBjoA','6iJgGGt','100328HtwFXF','menu\x20delete','notification\x20config-delete','617645ssNsYF','notification\x20config-update','981RiiYSV','command','has','service','4483839AnyQnp','101616GwdNEG','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','4JhWKpP','kb\x20delete','8141160vQNAZR','912841XmgVol'];a311_0x3caa=function(){return _0x50a40e;};return a311_0x3caa();}const a311_0x5bb71d=a311_0x38b5;function a311_0x38b5(_0x8f87d2,_0x47956d){_0x8f87d2=_0x8f87d2-0x152;const _0x3caaeb=a311_0x3caa();let _0x38b5d3=_0x3caaeb[_0x8f87d2];return _0x38b5d3;}(function(_0x4deeb4,_0x2e0488){const _0x163f5f=a311_0x38b5,_0x39e2de=_0x4deeb4();while(!![]){try{const _0x5d3984=parseInt(_0x163f5f(0x15f))/0x1+-parseInt(_0x163f5f(0x15a))/0x2+-parseInt(_0x163f5f(0x159))/0x3+parseInt(_0x163f5f(0x15c))/0x4*(parseInt(_0x163f5f(0x160))/0x5)+parseInt(_0x163f5f(0x161))/0x6*(parseInt(_0x163f5f(0x153))/0x7)+-parseInt(_0x163f5f(0x162))/0x8*(-parseInt(_0x163f5f(0x155))/0x9)+-parseInt(_0x163f5f(0x15e))/0xa;if(_0x5d3984===_0x2e0488)break;else _0x39e2de['push'](_0x39e2de['shift']());}catch(_0x3946b8){_0x39e2de['push'](_0x39e2de['shift']());}}}(a311_0x3caa,0xdceab));const EXPLICIT_YES_COMMANDS=new Set([a311_0x5bb71d(0x163),a311_0x5bb71d(0x15d),a311_0x5bb71d(0x154),a311_0x5bb71d(0x152)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a311_0x5bb71d(0x15b);export function requiresExplicitYes(_0x23903a){const _0xf93325=a311_0x5bb71d;return EXPLICIT_YES_COMMANDS[_0xf93325(0x157)](_0x23903a[_0xf93325(0x158)]+'\x20'+_0x23903a[_0xf93325(0x156)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x6f53ee,_0x2a5d07){const _0x3cb159=a312_0x2419,_0x5612d8=_0x6f53ee();while(!![]){try{const _0x2645b1=-parseInt(_0x3cb159(0xd9))/0x1*(-parseInt(_0x3cb159(0xdb))/0x2)+-parseInt(_0x3cb159(0xdf))/0x3+parseInt(_0x3cb159(0xda))/0x4+parseInt(_0x3cb159(0xdc))/0x5+-parseInt(_0x3cb159(0xdd))/0x6*(-parseInt(_0x3cb159(0xd8))/0x7)+parseInt(_0x3cb159(0xd7))/0x8*(-parseInt(_0x3cb159(0xd6))/0x9)+parseInt(_0x3cb159(0xe0))/0xa*(parseInt(_0x3cb159(0xde))/0xb);if(_0x2645b1===_0x2a5d07)break;else _0x5612d8['push'](_0x5612d8['shift']());}catch(_0x376e45){_0x5612d8['push'](_0x5612d8['shift']());}}}(a312_0x3858,0x672ab));function a312_0x3858(){const _0x4e7839=['3338zOcRev','1137768SDmRpc','466npDNdQ','575685eGSmPy','215382UczuuJ','6590925xbhpyN','1844466QXNWdK','10crXTxd','73719vVOMYC','792IsvMfE','14NDRXlP'];a312_0x3858=function(){return _0x4e7839;};return a312_0x3858();}function a312_0x2419(_0x198d45,_0x4456ca){_0x198d45=_0x198d45-0xd6;const _0x3858f5=a312_0x3858();let _0x24194b=_0x3858f5[_0x198d45];return _0x24194b;}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x547792,_0x3735a1){const _0x21927c=a313_0x467e,_0x21ec8d=_0x547792();while(!![]){try{const _0x236669=parseInt(_0x21927c(0xec))/0x1*(-parseInt(_0x21927c(0xe4))/0x2)+-parseInt(_0x21927c(0xe6))/0x3+-parseInt(_0x21927c(0xe7))/0x4*(-parseInt(_0x21927c(0xe9))/0x5)+-parseInt(_0x21927c(0xe2))/0x6+parseInt(_0x21927c(0xe8))/0x7+parseInt(_0x21927c(0xea))/0x8+parseInt(_0x21927c(0xe5))/0x9;if(_0x236669===_0x3735a1)break;else _0x21ec8d['push'](_0x21ec8d['shift']());}catch(_0x29961c){_0x21ec8d['push'](_0x21ec8d['shift']());}}}(a313_0x1a34,0x312e9));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 _0x86243f=a313_0x467e;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x4e9b7c=>serviceGroups[_0x86243f(0xe0)](_0x4e9b7c),'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x86243f(0xe1)+CLI_BIN_NAME+_0x86243f(0xeb),'serviceUsageSuffix':'\x20[args]\x20[flags]'});}function a313_0x467e(_0xc1adf4,_0x450f80){_0xc1adf4=_0xc1adf4-0xde;const _0x1a34f9=a313_0x1a34();let _0x467e38=_0x1a34f9[_0xc1adf4];return _0x467e38;}export function generateCommandHelp(_0x86a0bf){const _0xee41f6=a313_0x467e,_0x156e7b=createGenerators()[_0xee41f6(0xe3)](_0x86a0bf);if(!requiresExplicitYes(_0x86a0bf))return _0x156e7b;return _0x156e7b[_0xee41f6(0xee)](_0xee41f6(0xdf),_0xee41f6(0xde));}export function generateServiceHelp(_0x3db238){const _0x2a1ad2=a313_0x467e;return createGenerators()[_0x2a1ad2(0xed)](_0x3db238);}function a313_0x1a34(){const _0x56dde5=['Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','get','Requires\x20appcode\x20(set\x20via\x20`','908160RsCjPy','generateCommandHelp','48ZAMVFN','2709261SZaNCL','121545zOeeDE','297092OUCJlR','817628glEhAR','5OpnGUO','710992UaMdWH','\x20workspace\x20init`\x20or\x20--appcode).','7819vKYJSo','generateServiceHelp','replace','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.'];a313_0x1a34=function(){return _0x56dde5;};return a313_0x1a34();}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4240dd,_0x411fa2){var _0x540f79=a314_0x1425,_0x271090=_0x4240dd();while(!![]){try{var _0x367000=parseInt(_0x540f79(0xb3))/0x1*(-parseInt(_0x540f79(0xb5))/0x2)+-parseInt(_0x540f79(0xb9))/0x3*(-parseInt(_0x540f79(0xb2))/0x4)+parseInt(_0x540f79(0xbc))/0x5+parseInt(_0x540f79(0xb7))/0x6*(parseInt(_0x540f79(0xbb))/0x7)+parseInt(_0x540f79(0xb4))/0x8+-parseInt(_0x540f79(0xba))/0x9+-parseInt(_0x540f79(0xb6))/0xa*(parseInt(_0x540f79(0xb8))/0xb);if(_0x367000===_0x411fa2)break;else _0x271090['push'](_0x271090['shift']());}catch(_0x2ac4fc){_0x271090['push'](_0x271090['shift']());}}}(a314_0x3738,0x2b023));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a314_0x3738(){var _0x317fb8=['5166rUXqKx','8537903oRxUEF','657183QbpQCt','282582rjJAme','2723pCZXDI','940230aRqzWI','4OLkjFb','2Vbduck','2480080OgrpcN','68312vxQner','10vtUqed'];a314_0x3738=function(){return _0x317fb8;};return a314_0x3738();}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a314_0x1425(_0x15f2ae,_0xf5fca3){_0x15f2ae=_0x15f2ae-0xb2;var _0x3738d=a314_0x3738();var _0x142508=_0x3738d[_0x15f2ae];return _0x142508;}export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35e6e8,_0x56e0ff){const _0x506903=a315_0x5613,_0x48e043=_0x35e6e8();while(!![]){try{const _0x1792b4=parseInt(_0x506903(0x1aa))/0x1*(-parseInt(_0x506903(0x1a3))/0x2)+parseInt(_0x506903(0x1ae))/0x3*(parseInt(_0x506903(0x1b9))/0x4)+parseInt(_0x506903(0x1a0))/0x5+parseInt(_0x506903(0x1a2))/0x6+parseInt(_0x506903(0x1b3))/0x7*(parseInt(_0x506903(0x1a7))/0x8)+-parseInt(_0x506903(0x1bc))/0x9+-parseInt(_0x506903(0x1af))/0xa;if(_0x1792b4===_0x56e0ff)break;else _0x48e043['push'](_0x48e043['shift']());}catch(_0x47ebc4){_0x48e043['push'](_0x48e043['shift']());}}}(a315_0x3b02,0x73df2));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';function a315_0x3b02(){const _0x41eda8=['stringify','5148792DIPitg','_notice','4249815RgJwZD','hint','4980012cLyChZ','214lvqKVw','risk','message','endsWith','2080216SBBQSf','data','format','3037xaSVRi','url','update','jq:\x20','39HXTQWh','10726960VhGYkc','stdout','jqFilter','error','7MAAYce','code','command','trim','json','validation','155188zGkhQl','pretty'];a315_0x3b02=function(){return _0x41eda8;};return a315_0x3b02();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a315_0x5613(_0x2e490f,_0x1f0c3f){_0x2e490f=_0x2e490f-0x1a0;const _0x3b0206=a315_0x3b02();let _0x56136d=_0x3b0206[_0x2e490f];return _0x56136d;}export function formatOutput(_0x4ed719,_0x541eea){const _0x4adbf1=a315_0x5613,_0x56d570=_0x4ed719[_0x4adbf1(0x1bd)],{_notice:_0x13ddb7,..._0x287de5}=_0x4ed719;void _0x13ddb7,baseFormatOutput(_0x287de5,_0x541eea),_0x541eea['format']==='pretty'&&printPrettyNotice(_0x56d570);}export function formatCliError(_0x47711c,_0x43485a){const _0x2f15b2=a315_0x5613;if(_0x43485a[_0x2f15b2(0x1a9)]===_0x2f15b2(0x1ba))return![];const _0x548962=_0x47711c[_0x2f15b2(0x1a8)],_0x1c8c4f={'ok':![],'command':_0x43485a[_0x2f15b2(0x1b5)],'risk':_0x43485a[_0x2f15b2(0x1a4)],'data':_0x548962??null,'error':{'code':_0x47711c[_0x2f15b2(0x1b4)],'message':_0x47711c[_0x2f15b2(0x1a5)],..._0x47711c['hint']?{'hint':_0x47711c[_0x2f15b2(0x1a1)]}:{}}},_0x59c631=_0x43485a[_0x2f15b2(0x1a9)]===_0x2f15b2(0x1b7)?JSON['stringify'](_0x1c8c4f,null,0x2):JSON[_0x2f15b2(0x1bb)](_0x1c8c4f);let _0x19db1d=_0x59c631;if(_0x43485a['jqFilter']?.[_0x2f15b2(0x1b6)]())try{_0x19db1d=applyJqFilter(_0x59c631,_0x43485a[_0x2f15b2(0x1b1)]);}catch(_0x28fbec){const _0x54e568=_0x28fbec instanceof CliError?_0x28fbec:CliErrors[_0x2f15b2(0x1b8)](_0x2f15b2(0x1ad)+(_0x28fbec instanceof Error?_0x28fbec['message']:String(_0x28fbec))),_0x1e1c61={..._0x1c8c4f,'error':{'code':_0x54e568[_0x2f15b2(0x1b4)],'message':_0x54e568[_0x2f15b2(0x1a5)],..._0x54e568[_0x2f15b2(0x1a1)]?{'hint':_0x54e568['hint']}:{},'cause':_0x1c8c4f[_0x2f15b2(0x1b2)]}};_0x19db1d=_0x43485a[_0x2f15b2(0x1a9)]===_0x2f15b2(0x1b7)?JSON[_0x2f15b2(0x1bb)](_0x1e1c61,null,0x2):JSON[_0x2f15b2(0x1bb)](_0x1e1c61);}return process[_0x2f15b2(0x1b0)]['write'](_0x19db1d[_0x2f15b2(0x1a6)]('\x0a')?_0x19db1d:_0x19db1d+'\x0a'),!![];}function printPrettyNotice(_0x32a7ca){const _0x55443e=a315_0x5613;if(!_0x32a7ca?.['update'])return;console[_0x55443e(0x1b2)](_0x32a7ca[_0x55443e(0x1ac)][_0x55443e(0x1a5)]+'\x20('+_0x32a7ca[_0x55443e(0x1ac)][_0x55443e(0x1ab)]+')');}
|