@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/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/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/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/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 +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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 +2 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a287_0x40bf(_0x214293,_0x314bdf){_0x214293=_0x214293-0x1b4;const _0x10ff01=a287_0x10ff();let _0x40bffb=_0x10ff01[_0x214293];return _0x40bffb;}(function(_0xa28ed6,_0x41a6b2){const _0x4c9433=a287_0x40bf,_0x47ea5f=_0xa28ed6();while(!![]){try{const _0x4613b0=-parseInt(_0x4c9433(0x1b5))/0x1+parseInt(_0x4c9433(0x1c8))/0x2+-parseInt(_0x4c9433(0x1c7))/0x3*(parseInt(_0x4c9433(0x1bb))/0x4)+-parseInt(_0x4c9433(0x1bc))/0x5*(parseInt(_0x4c9433(0x1b9))/0x6)+-parseInt(_0x4c9433(0x1b7))/0x7+parseInt(_0x4c9433(0x1b4))/0x8*(-parseInt(_0x4c9433(0x1c1))/0x9)+-parseInt(_0x4c9433(0x1be))/0xa*(-parseInt(_0x4c9433(0x1c6))/0xb);if(_0x4613b0===_0x41a6b2)break;else _0x47ea5f['push'](_0x47ea5f['shift']());}catch(_0x1d2897){_0x47ea5f['push'](_0x47ea5f['shift']());}}}(a287_0x10ff,0x2efc8));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a287_0x10ff(){const _0xad3db7=['310194hfbSGA','399304ZEwsnd','8EhRkiW','187757eeFzpm','apps','485702GEDCjN','ENOENT','1522086HGZnjp','lastSync','4fbtKcd','5ZdtLYR','code','27330YVjdLr','parse','stringify','2186433AHZSVk','object','utf8','pages','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','3421AGlWwm'];a287_0x10ff=function(){return _0xad3db7;};return a287_0x10ff();}export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x19c043,_0x318f26){const _0x2fd47a=a287_0x40bf,_0x4ce82d={'apps':_0x19c043[_0x2fd47a(0x1b6)]&&typeof _0x19c043[_0x2fd47a(0x1b6)]===_0x2fd47a(0x1c2)?_0x19c043[_0x2fd47a(0x1b6)]:{}};let _0x2cb944=_0x4ce82d[_0x2fd47a(0x1b6)][_0x318f26];if(!_0x2cb944)return _0x2cb944={'lastSync':'','pages':{}},_0x4ce82d[_0x2fd47a(0x1b6)][_0x318f26]=_0x2cb944,{'lockData':_0x4ce82d,'appLock':_0x2cb944};return!_0x2cb944[_0x2fd47a(0x1ba)]&&(_0x2cb944[_0x2fd47a(0x1ba)]=''),(!_0x2cb944['pages']||typeof _0x2cb944[_0x2fd47a(0x1c4)]!==_0x2fd47a(0x1c2))&&(_0x2cb944['pages']={}),{'lockData':_0x4ce82d,'appLock':_0x2cb944};}export async function readPageLockFile(_0x2062b3){const _0x5e8bc5=a287_0x40bf;try{const _0x57385b=await readFile(_0x2062b3,_0x5e8bc5(0x1c3)),_0x26d2da=JSON[_0x5e8bc5(0x1bf)](_0x57385b);return{'apps':_0x26d2da[_0x5e8bc5(0x1b6)]&&typeof _0x26d2da['apps']===_0x5e8bc5(0x1c2)?_0x26d2da[_0x5e8bc5(0x1b6)]:{}};}catch(_0x181d99){if(_0x181d99[_0x5e8bc5(0x1bd)]===_0x5e8bc5(0x1b8))return null;throw new Error(_0x5e8bc5(0x1c5)+String(_0x181d99));}}export async function writePageLockFile(_0x5a4df3,_0x568343){const _0xf2646b=a287_0x40bf;await mkdir(dirname(_0x5a4df3),{'recursive':!![]}),await writeFile(_0x5a4df3,JSON[_0xf2646b(0x1c0)](_0x568343,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x179d5b,_0x1a5b90){const _0x613529=a288_0x433c,_0x2d6bfc=_0x179d5b();while(!![]){try{const _0x5f5796=-parseInt(_0x613529(0x1e5))/0x1*(-parseInt(_0x613529(0x1d5))/0x2)+-parseInt(_0x613529(0x1d9))/0x3+-parseInt(_0x613529(0x1c4))/0x4*(-parseInt(_0x613529(0x1c7))/0x5)+parseInt(_0x613529(0x1cc))/0x6*(-parseInt(_0x613529(0x1df))/0x7)+parseInt(_0x613529(0x1ef))/0x8+parseInt(_0x613529(0x1d8))/0x9*(parseInt(_0x613529(0x1c6))/0xa)+-parseInt(_0x613529(0x1c2))/0xb*(parseInt(_0x613529(0x1d3))/0xc);if(_0x5f5796===_0x1a5b90)break;else _0x2d6bfc['push'](_0x2d6bfc['shift']());}catch(_0x2b213d){_0x2d6bfc['push'](_0x2d6bfc['shift']());}}}(a288_0x681a,0x64b19));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x97df54,_0x15d3a5,_0x5acb6d){const _0x350ffe=a288_0x433c,_0x75fe95=parseSchema(_0x97df54,_0x350ffe(0x1cd)),_0x788e4=parseSchema(_0x15d3a5,_0x350ffe(0x1e2)),_0x51641b=collectLrSmartJsx(_0x75fe95,!![]);if(_0x51641b[_0x350ffe(0x1cf)]===0x0)return{'content':_0x97df54,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x2991e8=new Map(collectLrSmartJsx(_0x788e4)['map'](_0x488d08=>[_0x488d08[_0x350ffe(0x1ec)],_0x488d08]));let _0x40897d=0x0,_0x371769=0x0;for(const _0x3f1378 of _0x51641b){const _0xc49320=readNonEmptyString(_0x3f1378['render'][_0x350ffe(0x1c8)]),_0x11f04e=readNonEmptyString(_0x3f1378['render'][_0x350ffe(0x1dc)]),_0x39b6b8=_0x2991e8[_0x350ffe(0x1e4)](_0x3f1378[_0x350ffe(0x1ec)]),_0x10cc0b=readNonEmptyString(_0x39b6b8?.['render'][_0x350ffe(0x1c8)]),_0x34dfca=readNonEmptyString(_0x39b6b8?.['render'][_0x350ffe(0x1dc)]);let _0x308978=![];_0x3f1378['render'][_0x350ffe(0x1ea)]!==_0x350ffe(0x1d6)&&(_0x3f1378[_0x350ffe(0x1c3)][_0x350ffe(0x1ea)]=_0x350ffe(0x1d6),_0x308978=!![]);!isPageContextExpression(_0x3f1378[_0x350ffe(0x1da)][_0x350ffe(0x1dd)])&&(_0x3f1378[_0x350ffe(0x1da)]['_context']={'type':_0x350ffe(0x1eb),'value':_0x350ffe(0x1ce)},_0x308978=!![]);if(!_0xc49320){if(!_0x11f04e)throw CliErrors['validation']('LrSmartJsx\x20node\x20\x22'+_0x3f1378[_0x350ffe(0x1e1)]+'\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.');if(_0x308978)_0x371769+=0x1;continue;}const _0x5aa262=!_0x39b6b8||_0xc49320!==_0x10cc0b,_0x53854a=!_0x11f04e;if(!_0x5aa262&&_0x11f04e&&_0x34dfca&&_0x11f04e!==_0x34dfca)throw CliErrors[_0x350ffe(0x1ed)]('LrSmartJsx\x20node\x20\x22'+_0x3f1378[_0x350ffe(0x1e1)]+_0x350ffe(0x1d7),'Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x5aa262||_0x53854a||!_0x34dfca){const _0x40fc29=readNonEmptyString(await _0x5acb6d(_0xc49320));if(!_0x40fc29)throw CliErrors[_0x350ffe(0x1db)](_0x350ffe(0x1e7)+_0x3f1378[_0x350ffe(0x1e1)]+'\x22.');_0x3f1378[_0x350ffe(0x1c3)][_0x350ffe(0x1dc)]=_0x40fc29,_0x40897d+=0x1,_0x308978=!![];}if(_0x308978)_0x371769+=0x1;}if(_0x371769===0x0)return{'content':_0x97df54,'compiledNodes':_0x40897d,'normalizedNodes':_0x371769};return{'content':JSON['stringify'](_0x75fe95),'compiledNodes':_0x40897d,'normalizedNodes':_0x371769};}function a288_0x681a(){const _0x66535e=['props','apiError','value','_context','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','50421tysPif','componentName','label','remote','id:','get','186682UXpiVg','forEach','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','LrSmartJsx\x20node\x20\x22','push','type','JSExpression','key','validation','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','3332072zHSdaK','4994121HwtRKZ','render','892teNqwl','trim','119390hYSDNn','5XMejcv','source','parse','Invalid\x20JSON\x20in\x20','\x20page\x20schema.','30ermNgi','local','this','length','path:','isArray','entries','12EcWPSM','LrSmartJsx','6DrrSEi','JSFunction','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','18XQvbnf','294567SAArSR'];a288_0x681a=function(){return _0x66535e;};return a288_0x681a();}function parseSchema(_0x21b5b4,_0x305e45){const _0x1f927c=a288_0x433c;try{return JSON[_0x1f927c(0x1c9)](_0x21b5b4);}catch{throw CliErrors[_0x1f927c(0x1ed)](_0x1f927c(0x1ca)+_0x305e45+_0x1f927c(0x1cb));}}function collectLrSmartJsx(_0x53b979,_0x3e0b50=![]){const _0x5868e7=[],_0x111ff7=(_0x534041,_0x356c8b)=>{const _0x3c5aad=a288_0x433c;if(Array[_0x3c5aad(0x1d1)](_0x534041)){_0x534041[_0x3c5aad(0x1e6)]((_0x36097c,_0x2d9693)=>_0x111ff7(_0x36097c,_0x356c8b+'['+_0x2d9693+']'));return;}if(!isObject(_0x534041))return;if(_0x534041[_0x3c5aad(0x1e0)]===_0x3c5aad(0x1d4)){const _0x4bf0d7=readNonEmptyString(_0x534041['id']),_0x172515=_0x4bf0d7||_0x356c8b,_0x1ddde2=isObject(_0x534041['props'])?_0x534041['props']:undefined;if(!_0x1ddde2){if(_0x3e0b50)throw CliErrors['validation'](_0x3c5aad(0x1e8)+_0x172515+'\x22\x20has\x20missing\x20or\x20invalid\x20props.','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.');return;}const _0x305c1f=isObject(_0x1ddde2[_0x3c5aad(0x1c3)])?_0x1ddde2[_0x3c5aad(0x1c3)]:undefined;if(!_0x305c1f){if(_0x3e0b50)throw CliErrors[_0x3c5aad(0x1ed)]('LrSmartJsx\x20node\x20\x22'+_0x172515+_0x3c5aad(0x1de),_0x3c5aad(0x1ee));return;}_0x5868e7[_0x3c5aad(0x1e9)]({'key':_0x4bf0d7?_0x3c5aad(0x1e3)+_0x4bf0d7:_0x3c5aad(0x1d0)+_0x356c8b,'label':_0x172515,'props':_0x1ddde2,'render':_0x305c1f});}for(const [_0x5af6a2,_0x51dfac]of Object[_0x3c5aad(0x1d2)](_0x534041)){if(_0x5af6a2===_0x3c5aad(0x1da)&&_0x534041[_0x3c5aad(0x1e0)]===_0x3c5aad(0x1d4))continue;_0x111ff7(_0x51dfac,_0x356c8b+'.'+_0x5af6a2);}};return _0x111ff7(_0x53b979,'$'),_0x5868e7;}function a288_0x433c(_0x5a8d90,_0x5b0f6b){_0x5a8d90=_0x5a8d90-0x1c2;const _0x681a8d=a288_0x681a();let _0x433c08=_0x681a8d[_0x5a8d90];return _0x433c08;}function isObject(_0x1dda1f){const _0x3cb4db=a288_0x433c;return Boolean(_0x1dda1f)&&typeof _0x1dda1f==='object'&&!Array[_0x3cb4db(0x1d1)](_0x1dda1f);}function readNonEmptyString(_0x30c61e){const _0x222f0f=a288_0x433c;return typeof _0x30c61e==='string'&&_0x30c61e[_0x222f0f(0x1c5)]()?_0x30c61e:undefined;}function isPageContextExpression(_0x469f43){const _0x5294b9=a288_0x433c;return isObject(_0x469f43)&&_0x469f43[_0x5294b9(0x1ea)]===_0x5294b9(0x1eb)&&_0x469f43[_0x5294b9(0x1dc)]===_0x5294b9(0x1ce);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x12ec32,_0x15a61e){const _0x10c510=a290_0x2eb9,_0x393626=_0x12ec32();while(!![]){try{const _0x4cc0f1=parseInt(_0x10c510(0xe7))/0x1*(-parseInt(_0x10c510(0xe4))/0x2)+-parseInt(_0x10c510(0xd6))/0x3+parseInt(_0x10c510(0xc2))/0x4*(-parseInt(_0x10c510(0xd5))/0x5)+parseInt(_0x10c510(0xc4))/0x6+parseInt(_0x10c510(0xde))/0x7+-parseInt(_0x10c510(0xb8))/0x8*(-parseInt(_0x10c510(0xbd))/0x9)+parseInt(_0x10c510(0xdb))/0xa;if(_0x4cc0f1===_0x15a61e)break;else _0x393626['push'](_0x393626['shift']());}catch(_0x5086a4){_0x393626['push'](_0x393626['shift']());}}}(a290_0x5c70,0x478ba));function a290_0x5c70(){const _0x2d6824=['No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','full','columns','unsupportedPredicate','917703BIXVGR','\x5c$&','includes','JOIN_PREDICATE_UNSUPPORTED','join','944708ZGbHMx','search','425712pTMXdz','\x5cs*\x5c.\x5cs*[\x5cw$]+','add','split','max','toUpperCase','test','min','replace','from','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','slice','covered','matchAll','where','trim','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','5qUkidw','1313991LUnZng','inner','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','unavailable','toLowerCase','9436930FUPKdk','metadataAvailable','indexes','2026577sOhlFm','__sq__','INDEX_METADATA_UNAVAILABLE','right','sort','unsupportedReason','2UqlcLN','warning','match','438899TukcFU','(?:^|[^\x5cw$])','INNER','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','containsUnresolvedInclude','filter','endsWith','push','length','error','some','index','unknown','table','has','map','reduce','exec','replaceAll','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','position','alias','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','matchedPrefix','JOIN_INDEX_NOT_USABLE','tableName','using','8bXAPWz'];a290_0x5c70=function(){return _0x2d6824;};return a290_0x5c70();}import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x2c9861,_0x5c3a4a){const _0x1e2d3e=a290_0x2eb9,_0x48706f=[],_0x3d2fc8=normalizeSqlForStaticAnalysis(_0x2c9861),_0x113d16=(_0x3d2fc8[_0x1e2d3e(0xf0)]?[]:extractJoinFacts(_0x3d2fc8['sql']))[_0x1e2d3e(0xf6)](_0xe73750=>{const _0x3b7425=_0x1e2d3e;if(_0xe73750[_0x3b7425(0xbc)]||_0xe73750[_0x3b7425(0xbb)]['length']===0x0)return _0x48706f['push']({'code':_0x3b7425(0xc0),'table':_0xe73750['table'],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750[_0x3b7425(0xbb)],'reason':_0xe73750[_0x3b7425(0xe3)]??_0x3b7425(0xea)}),{'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750['columns'],'status':'unavailable'};const _0x220154=resolveTableMetadata(_0x5c3a4a,_0xe73750[_0x3b7425(0xf4)]),_0x5ee0c8=(_0x220154?.[_0x3b7425(0xdd)]??[])[_0x3b7425(0xf6)](_0x1b528e=>({'index':_0x1b528e,'matchedPrefix':findEqualityPrefix(_0x1b528e[_0x3b7425(0xbb)],_0xe73750['columns'])}))[_0x3b7425(0xec)](_0x5c35d5=>_0x5c35d5['matchedPrefix']['length']>0x0),_0x28d756=_0x5ee0c8[_0x3b7425(0xf7)]((_0x2e9ceb,_0x1d0daa)=>!_0x2e9ceb||_0x1d0daa[_0x3b7425(0xb4)][_0x3b7425(0xef)]>_0x2e9ceb[_0x3b7425(0xb4)][_0x3b7425(0xef)]?_0x1d0daa:_0x2e9ceb,_0x5ee0c8[0x0]);if(_0x28d756)return{'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750['columns'],'status':_0x3b7425(0xd0),'matchedIndex':{..._0x28d756[_0x3b7425(0xf2)],'matchedPrefix':_0x28d756['matchedPrefix']}};const _0x226ca9=_0x220154?.[_0x3b7425(0xdd)]['filter'](_0x5c7ad4=>_0x5c7ad4['columns'][_0x3b7425(0xf1)](_0x2c9b15=>_0xe73750['columns'][_0x3b7425(0xf1)](_0x4053aa=>columnNamesMatch(_0x2c9b15,_0x4053aa))))??[];if(_0x226ca9['length']>0x0)return _0x48706f[_0x3b7425(0xee)]({'code':_0x3b7425(0xb5),'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750['columns'],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750['alias'],'columns':_0xe73750[_0x3b7425(0xbb)],'status':_0x3b7425(0xe5),'candidateIndexes':_0x226ca9};if(_0x220154&&_0x220154[_0x3b7425(0xdc)]!==![]&&_0x220154[_0x3b7425(0xdd)][_0x3b7425(0xef)]>0x0&&_0xe73750['columns'][_0x3b7425(0xef)]>0x0)return _0x48706f[_0x3b7425(0xee)]({'code':'JOIN_INDEX_MISSING','table':_0xe73750['table'],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750[_0x3b7425(0xbb)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750['alias'],'columns':_0xe73750['columns'],'status':'warning'};return _0x48706f[_0x3b7425(0xee)]({'code':_0x3b7425(0xe0),'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750[_0x3b7425(0xb1)],'columns':_0xe73750[_0x3b7425(0xbb)],'reason':_0x220154?_0x3b7425(0xce):_0x3b7425(0xb9)}),{'table':_0xe73750[_0x3b7425(0xf4)],'alias':_0xe73750['alias'],'columns':_0xe73750[_0x3b7425(0xbb)],'status':_0x3b7425(0xd9)};});return{'checked':_0x113d16[_0x1e2d3e(0xef)]>0x0,'joins':_0x113d16,'warnings':_0x48706f};}function extractJoinFacts(_0x35b6fd){const _0x2804a3=a290_0x2eb9,_0xed2455=maskNestedQueries(stripSqlNoise(_0x35b6fd)),_0xf30c77=maskQuotedIdentifiers(_0xed2455),_0x51c59e=[],_0x219675=new Set(),_0x1c148b=/\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 _0x37f882 of _0xed2455[_0x2804a3(0xd1)](_0x1c148b)){const _0x5df9cd=_0x37f882[_0x2804a3(0xf2)]??0x0,_0x47d1c0=_0x37f882[0x0][_0x2804a3(0xc3)](/\bJOIN\b/i),_0x320fd9=_0x5df9cd+Math[_0x2804a3(0xc8)](0x0,_0x47d1c0);if(!/^JOIN\b/i[_0x2804a3(0xca)](_0xf30c77[_0x2804a3(0xcf)](_0x320fd9)))continue;_0x219675[_0x2804a3(0xc6)](_0x320fd9);const _0x86d10f=normalizeIdentifier(_0x37f882[0x1]||_0x2804a3(0xe9)),_0xaa57c6=normalizeIdentifier(_0x37f882[0x2]??''),_0x485cf2=normalizeIdentifier(_0x37f882[0x3]||_0xaa57c6[_0x2804a3(0xc7)]('.')['at'](-0x1)||_0xaa57c6),_0x45b73c=[],_0x2713e8=_0xaa57c6===_0x2804a3(0xdf);let _0x207e2d=_0x86d10f===_0x2804a3(0xe1)||_0x86d10f==='full'||_0x2713e8,_0x497a19=_0x207e2d?_0x2713e8?_0x2804a3(0xb2):_0x86d10f[_0x2804a3(0xc9)]()+_0x2804a3(0xd8):undefined;const _0x2c6d0d=stripOuterParentheses(_0x37f882[0x4]??''),_0x25d54f=_0x2c6d0d[_0x2804a3(0xbf)](MYBATIS_DYNAMIC_START_MARKER)||_0x2c6d0d['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x56bdb8=_0x2c6d0d[_0x2804a3(0xbf)](MYBATIS_INCLUDE_MARKER);_0x25d54f&&(_0x207e2d=!![],_0x497a19??=_0x2804a3(0xd4));_0x56bdb8&&(_0x207e2d=!![],_0x497a19??='MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.');const _0x26ed09=_0x2c6d0d[_0x2804a3(0xae)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x2804a3(0xae)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x2804a3(0xae)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x26ed09,'OR')&&(_0x207e2d=!![],_0x497a19??=_0x2804a3(0xb3));for(const _0x5c78e1 of splitTopLevelAnd(_0x26ed09)){const _0x307598=stripOuterParentheses(_0x5c78e1);if(hasTopLevelKeyword(_0x307598,'OR')){_0x207e2d=!![],_0x497a19??=_0x2804a3(0xb3);continue;}const _0x52fbd2=splitEquality(_0x307598);if(!_0x52fbd2){containsColumnReference(_0x5c78e1,_0x485cf2)&&(_0x207e2d=!![]);continue;}const _0x4f5d19=parseDirectColumnReference(_0x52fbd2[0x0],_0x485cf2),_0x42d22b=parseDirectColumnReference(_0x52fbd2[0x1],_0x485cf2),_0x116d12=containsColumnReference(_0x52fbd2[0x0],_0x485cf2),_0x12042f=containsColumnReference(_0x52fbd2[0x1],_0x485cf2),_0x22cfce=_0x4f5d19&&!_0x12042f?_0x4f5d19:_0x42d22b&&!_0x116d12?_0x42d22b:null;if(_0x22cfce&&!_0x45b73c[_0x2804a3(0xbf)](_0x22cfce))_0x45b73c[_0x2804a3(0xee)](_0x22cfce);else!_0x22cfce&&containsColumnReference(_0x5c78e1,_0x485cf2)&&(_0x207e2d=!![]);}_0x51c59e[_0x2804a3(0xee)]({'table':_0xaa57c6,'alias':_0x485cf2,'columns':_0x45b73c,'unsupportedPredicate':_0x207e2d,'unsupportedReason':_0x497a19,'containsUnresolvedInclude':_0x56bdb8,'position':_0x320fd9});}for(const _0x4b3dd2 of _0xf30c77[_0x2804a3(0xd1)](/\bJOIN\b/gi)){const _0x7db8d0=_0x4b3dd2['index']??0x0;if(_0x219675[_0x2804a3(0xf5)](_0x7db8d0))continue;const _0x5731b6=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x2804a3(0xad)](_0xed2455[_0x2804a3(0xcf)](_0x7db8d0+_0x4b3dd2[0x0][_0x2804a3(0xef)])),_0x38c731=normalizeIdentifier(_0x5731b6?.[0x1]||'unknown'),_0x351c61=normalizeIdentifier(_0x5731b6?.[0x2]||''),_0xdaccc1=isSqlClauseKeyword(_0x351c61)?_0x38c731[_0x2804a3(0xc7)]('.')['at'](-0x1)||_0x38c731:_0x351c61||_0x38c731[_0x2804a3(0xc7)]('.')['at'](-0x1)||_0x38c731;_0x51c59e[_0x2804a3(0xee)]({'table':_0x38c731,'alias':_0xdaccc1,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x7db8d0});}const _0x3bdb1c=_0xf30c77['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x3bdb1c>=0x0&&!_0x51c59e['some'](_0x2536d3=>_0x2536d3[_0x2804a3(0xeb)])&&_0x51c59e[_0x2804a3(0xee)]({'table':_0x2804a3(0xf3),'alias':_0x2804a3(0xf3),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x2804a3(0xaf),'containsUnresolvedInclude':!![],'position':_0x3bdb1c}),_0x51c59e[_0x2804a3(0xe2)]((_0x230840,_0x28c3c2)=>_0x230840[_0x2804a3(0xb0)]-_0x28c3c2[_0x2804a3(0xb0)]);}function stripSqlNoise(_0x594359){const _0x42579a=a290_0x2eb9,_0x7e405b=Array[_0x42579a(0xcd)](_0x594359),_0x39d8f9=(_0x1f6146,_0x5e5684)=>{for(let _0x5f2bec=_0x1f6146;_0x5f2bec<_0x5e5684;_0x5f2bec+=0x1){_0x7e405b[_0x5f2bec]!=='\x0a'&&_0x7e405b[_0x5f2bec]!=='\x0d'&&(_0x7e405b[_0x5f2bec]='\x20');}};for(let _0x32bd9c=0x0;_0x32bd9c<_0x7e405b[_0x42579a(0xef)];_0x32bd9c+=0x1){const _0x182c11=_0x7e405b[_0x32bd9c],_0xe24f0d=_0x7e405b[_0x32bd9c+0x1];if(_0x182c11==='\x27'||_0x182c11==='\x22'||_0x182c11==='`'){const _0x5bf275=_0x182c11,_0x256acb=_0x32bd9c;_0x32bd9c+=0x1;while(_0x32bd9c<_0x7e405b['length']){if(_0x7e405b[_0x32bd9c]==='\x5c'&&_0x32bd9c+0x1<_0x7e405b['length']){_0x32bd9c+=0x2;continue;}if(_0x7e405b[_0x32bd9c]!==_0x5bf275){_0x32bd9c+=0x1;continue;}if(_0x7e405b[_0x32bd9c+0x1]===_0x5bf275){_0x32bd9c+=0x2;continue;}break;}if(_0x5bf275==='\x27')_0x39d8f9(_0x256acb,Math[_0x42579a(0xcb)](_0x32bd9c+0x1,_0x7e405b['length']));continue;}if(_0x182c11==='-'&&_0xe24f0d==='-'){const _0x566dcd=_0x32bd9c;while(_0x32bd9c<_0x7e405b['length']&&_0x7e405b[_0x32bd9c]!=='\x0a')_0x32bd9c+=0x1;_0x39d8f9(_0x566dcd,_0x32bd9c);continue;}if(_0x182c11==='/'&&_0xe24f0d==='*'){const _0x19034b=_0x32bd9c;_0x32bd9c+=0x2;while(_0x32bd9c<_0x7e405b['length']&&!(_0x7e405b[_0x32bd9c]==='*'&&_0x7e405b[_0x32bd9c+0x1]==='/')){_0x32bd9c+=0x1;}_0x32bd9c=Math[_0x42579a(0xcb)](_0x32bd9c+0x1,_0x7e405b[_0x42579a(0xef)]-0x1),_0x39d8f9(_0x19034b,_0x32bd9c+0x1);continue;}if(_0x182c11==='#'&&_0xe24f0d!=='{'){const _0x1b0e3d=_0x32bd9c;while(_0x32bd9c<_0x7e405b[_0x42579a(0xef)]&&_0x7e405b[_0x32bd9c]!=='\x0a')_0x32bd9c+=0x1;_0x39d8f9(_0x1b0e3d,_0x32bd9c);continue;}if((_0x182c11==='#'||_0x182c11==='$')&&_0xe24f0d==='{'){const _0x1a7aee=_0x32bd9c;_0x32bd9c+=0x2;while(_0x32bd9c<_0x7e405b[_0x42579a(0xef)]&&_0x7e405b[_0x32bd9c]!=='}')_0x32bd9c+=0x1;_0x39d8f9(_0x1a7aee,Math[_0x42579a(0xcb)](_0x32bd9c+0x1,_0x7e405b['length']));}}return _0x7e405b['join']('');}function a290_0x2eb9(_0x509719,_0x4667e1){_0x509719=_0x509719-0xad;const _0x5c70c4=a290_0x5c70();let _0x2eb9fe=_0x5c70c4[_0x509719];return _0x2eb9fe;}function maskQuotedIdentifiers(_0xf22e21){const _0x4265a8=a290_0x2eb9,_0x36978a=Array[_0x4265a8(0xcd)](_0xf22e21);for(let _0x5eab0f=0x0;_0x5eab0f<_0x36978a['length'];_0x5eab0f+=0x1){const _0x8eeadb=_0x36978a[_0x5eab0f];if(_0x8eeadb!=='\x22'&&_0x8eeadb!=='`')continue;_0x5eab0f+=0x1;while(_0x5eab0f<_0x36978a[_0x4265a8(0xef)]){if(_0x36978a[_0x5eab0f]===_0x8eeadb){if(_0x36978a[_0x5eab0f+0x1]===_0x8eeadb){_0x36978a[_0x5eab0f]='\x20',_0x36978a[_0x5eab0f+0x1]='\x20',_0x5eab0f+=0x2;continue;}break;}_0x36978a[_0x5eab0f]='\x20',_0x5eab0f+=0x1;}}return _0x36978a[_0x4265a8(0xc1)]('');}function maskNestedQueries(_0x20490a){const _0x5e72ce=a290_0x2eb9,_0x265b4e=Array[_0x5e72ce(0xcd)](_0x20490a);for(let _0x960f3f=0x0;_0x960f3f<_0x265b4e['length'];_0x960f3f+=0x1){if(_0x265b4e[_0x960f3f]!=='(')continue;const _0x506d2c=_0x20490a['slice'](_0x960f3f+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x506d2c))continue;let _0x3facc7=0x1,_0x40e958=_0x960f3f+0x1;for(;_0x40e958<_0x265b4e['length']&&_0x3facc7>0x0;_0x40e958+=0x1){if(_0x265b4e[_0x40e958]==='(')_0x3facc7+=0x1;if(_0x265b4e[_0x40e958]===')')_0x3facc7-=0x1;}if(_0x3facc7!==0x0)continue;for(let _0x3ea920=_0x960f3f;_0x3ea920<_0x40e958;_0x3ea920+=0x1){_0x265b4e[_0x3ea920]='\x20';}const _0xab6c86=_0x5e72ce(0xdf);for(let _0x3c6ea8=0x0;_0x3c6ea8<_0xab6c86[_0x5e72ce(0xef)]&&_0x960f3f+_0x3c6ea8<_0x40e958;_0x3c6ea8+=0x1){_0x265b4e[_0x960f3f+_0x3c6ea8]=_0xab6c86[_0x3c6ea8];}_0x960f3f=_0x40e958-0x1;}return _0x265b4e[_0x5e72ce(0xc1)]('');}function splitTopLevelAnd(_0x6851c){const _0x404fc6=a290_0x2eb9,_0x353dd0=[];let _0x52d80d=0x0,_0x72c9d8=0x0;for(let _0x5d12ad=0x0;_0x5d12ad<_0x6851c[_0x404fc6(0xef)];_0x5d12ad+=0x1){const _0x423605=_0x6851c[_0x5d12ad];if(_0x423605==='(')_0x52d80d+=0x1;if(_0x423605===')')_0x52d80d=Math['max'](0x0,_0x52d80d-0x1);_0x52d80d===0x0&&_0x6851c[_0x404fc6(0xcf)](_0x5d12ad)[_0x404fc6(0xe6)](/^AND\b/i)&&(_0x5d12ad===0x0||/\s/[_0x404fc6(0xca)](_0x6851c[_0x5d12ad-0x1]??''))&&(_0x353dd0[_0x404fc6(0xee)](_0x6851c['slice'](_0x72c9d8,_0x5d12ad)['trim']()),_0x5d12ad+=0x2,_0x72c9d8=_0x5d12ad+0x1);}const _0xf83828=_0x6851c['slice'](_0x72c9d8)['trim']();if(_0xf83828)_0x353dd0['push'](_0xf83828);return _0x353dd0;}function hasTopLevelKeyword(_0x36b3a4,_0x339d9b){const _0x4f896b=a290_0x2eb9;let _0x3a1a57=0x0;for(let _0x3c8384=0x0;_0x3c8384<_0x36b3a4[_0x4f896b(0xef)];_0x3c8384+=0x1){const _0x9df949=_0x36b3a4[_0x3c8384];if(_0x9df949==='(')_0x3a1a57+=0x1;if(_0x9df949===')')_0x3a1a57=Math[_0x4f896b(0xc8)](0x0,_0x3a1a57-0x1);if(_0x3a1a57!==0x0)continue;const _0x435d8a=_0x36b3a4[_0x4f896b(0xcf)](_0x3c8384,_0x3c8384+_0x339d9b['length']),_0x5c918f=_0x36b3a4[_0x3c8384-0x1]??'\x20',_0x46768a=_0x36b3a4[_0x3c8384+_0x339d9b['length']]??'\x20';if(_0x435d8a['toUpperCase']()===_0x339d9b[_0x4f896b(0xc9)]()&&!/[\w$]/[_0x4f896b(0xca)](_0x5c918f)&&!/[\w$]/[_0x4f896b(0xca)](_0x46768a))return!![];}return![];}function splitEquality(_0x58180d){const _0x837efd=a290_0x2eb9,_0x49b860=stripOuterParentheses(_0x58180d);let _0x228b59=0x0,_0x340f63;for(let _0x381109=0x0;_0x381109<_0x49b860[_0x837efd(0xef)];_0x381109+=0x1){const _0x98aa66=_0x49b860[_0x381109];if(_0x98aa66==='(')_0x228b59+=0x1;if(_0x98aa66===')')_0x228b59=Math[_0x837efd(0xc8)](0x0,_0x228b59-0x1);const _0x4514bc=_0x49b860[_0x381109-0x1]??'',_0xaeb3bb=_0x49b860[_0x381109+0x1]??'';if(_0x98aa66==='='&&_0x228b59===0x0&&!/[!<>=:]/[_0x837efd(0xca)](_0x4514bc)&&_0xaeb3bb!=='='){if(_0x340f63!==undefined)return null;_0x340f63=_0x381109;}}return _0x340f63===undefined?null:[_0x49b860[_0x837efd(0xcf)](0x0,_0x340f63)[_0x837efd(0xd3)](),_0x49b860[_0x837efd(0xcf)](_0x340f63+0x1)[_0x837efd(0xd3)]()];}function parseDirectColumnReference(_0x28820c,_0x5d5bef){const _0x54b258=a290_0x2eb9,_0x5ed86c=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x54b258(0xad)](stripOuterParentheses(_0x28820c));if(!_0x5ed86c)return null;if(normalizeIdentifier(_0x5ed86c[0x1]??'')!==normalizeIdentifier(_0x5d5bef))return null;return normalizeIdentifier(_0x5ed86c[0x2]??'');}function containsColumnReference(_0x2b7bfe,_0x51c06b){const _0x2a64c5=a290_0x2eb9,_0x4f25d4=_0x2b7bfe['replace'](/[`"]/g,''),_0x188d3d=_0x51c06b[_0x2a64c5(0xcc)](/[.*+?^${}()|[\]\\]/g,_0x2a64c5(0xbe));return new RegExp(_0x2a64c5(0xe8)+_0x188d3d+_0x2a64c5(0xc5),'i')[_0x2a64c5(0xca)](_0x4f25d4);}function findEqualityPrefix(_0x1c5ea0,_0x367d4d){const _0x18601c=a290_0x2eb9,_0x5bf3ca=new Set(_0x367d4d[_0x18601c(0xf6)](normalizeIdentifier)),_0x3545b3=[];for(const _0x5ee159 of _0x1c5ea0){if(!_0x5bf3ca['has'](normalizeIdentifier(_0x5ee159)))break;_0x3545b3[_0x18601c(0xee)](_0x5ee159);}return _0x3545b3;}function resolveTableMetadata(_0x5d5e7d,_0x8fe0d0){const _0x3976d6=a290_0x2eb9,_0xfe4411=normalizeIdentifier(_0x8fe0d0),_0x2b4106=_0x5d5e7d['filter'](_0x56a51c=>normalizeIdentifier(_0x56a51c[_0x3976d6(0xb6)])===_0xfe4411);if(_0x2b4106[_0x3976d6(0xef)]===0x1)return _0x2b4106[0x0];const _0x242c3c=_0xfe4411[_0x3976d6(0xbf)]('.'),_0xf20f6b=_0xfe4411[_0x3976d6(0xc7)]('.')['at'](-0x1),_0x1a677b=_0x5d5e7d[_0x3976d6(0xec)](_0x490a70=>{const _0x116422=_0x3976d6,_0x4b4a60=normalizeIdentifier(_0x490a70[_0x116422(0xb6)]);if(_0x242c3c&&_0x4b4a60[_0x116422(0xbf)]('.'))return![];return _0x4b4a60[_0x116422(0xc7)]('.')['at'](-0x1)===_0xf20f6b;});return _0x1a677b[_0x3976d6(0xef)]===0x1?_0x1a677b[0x0]:undefined;}function columnNamesMatch(_0x4331b1,_0x5a490e){return normalizeIdentifier(_0x4331b1)===normalizeIdentifier(_0x5a490e);}function normalizeIdentifier(_0x3051ce){const _0x2f2e54=a290_0x2eb9;return _0x3051ce['replace'](/[`"]/g,'')[_0x2f2e54(0xd3)]()[_0x2f2e54(0xda)]();}function isSqlClauseKeyword(_0x847d4){const _0x2e8902=a290_0x2eb9;return new Set(['on',_0x2e8902(0xb7),_0x2e8902(0xd2),_0x2e8902(0xc1),_0x2e8902(0xd7),'left',_0x2e8902(0xe1),_0x2e8902(0xba),'cross','natural'])[_0x2e8902(0xf5)](_0x847d4);}function stripOuterParentheses(_0x1234d8){const _0x27e916=a290_0x2eb9;let _0x2fd468=_0x1234d8[_0x27e916(0xd3)]();while(_0x2fd468['startsWith']('(')&&_0x2fd468[_0x27e916(0xed)](')')){let _0x32cd36=0x0,_0x307875=!![];for(let _0x1ac9b1=0x0;_0x1ac9b1<_0x2fd468[_0x27e916(0xef)];_0x1ac9b1+=0x1){if(_0x2fd468[_0x1ac9b1]==='(')_0x32cd36+=0x1;if(_0x2fd468[_0x1ac9b1]===')')_0x32cd36-=0x1;if(_0x32cd36===0x0&&_0x1ac9b1<_0x2fd468[_0x27e916(0xef)]-0x1){_0x307875=![];break;}}if(!_0x307875||_0x32cd36!==0x0)break;_0x2fd468=_0x2fd468[_0x27e916(0xcf)](0x1,-0x1)[_0x27e916(0xd3)]();}return _0x2fd468;}
|
|
1
|
+
(function(_0x5aa182,_0x108e20){const _0x47a620=a290_0x2f96,_0x3b4d68=_0x5aa182();while(!![]){try{const _0x3aecb1=parseInt(_0x47a620(0x170))/0x1*(-parseInt(_0x47a620(0x17e))/0x2)+parseInt(_0x47a620(0x17d))/0x3*(-parseInt(_0x47a620(0x17f))/0x4)+-parseInt(_0x47a620(0x176))/0x5*(-parseInt(_0x47a620(0x183))/0x6)+-parseInt(_0x47a620(0x1a7))/0x7*(-parseInt(_0x47a620(0x1af))/0x8)+parseInt(_0x47a620(0x191))/0x9*(-parseInt(_0x47a620(0x175))/0xa)+-parseInt(_0x47a620(0x19f))/0xb+parseInt(_0x47a620(0x1a9))/0xc;if(_0x3aecb1===_0x108e20)break;else _0x3b4d68['push'](_0x3b4d68['shift']());}catch(_0x2bc0c8){_0x3b4d68['push'](_0x3b4d68['shift']());}}}(a290_0x366c,0x72ede));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';function a290_0x2f96(_0x52632b,_0x3f7752){_0x52632b=_0x52632b-0x16b;const _0x366cdb=a290_0x366c();let _0x2f964e=_0x366cdb[_0x52632b];return _0x2f964e;}export function auditSqlJoinIndexes(_0x569cfb,_0x30566f){const _0x2ec051=a290_0x2f96,_0x56a98b=[],_0x3e26da=normalizeSqlForStaticAnalysis(_0x569cfb),_0x32232b=(_0x3e26da[_0x2ec051(0x16b)]?[]:extractJoinFacts(_0x3e26da[_0x2ec051(0x1a2)]))[_0x2ec051(0x17b)](_0x32965b=>{const _0x15cb67=_0x2ec051;if(_0x32965b[_0x15cb67(0x1b0)]||_0x32965b[_0x15cb67(0x19d)]['length']===0x0)return _0x56a98b[_0x15cb67(0x17a)]({'code':_0x15cb67(0x186),'table':_0x32965b['table'],'alias':_0x32965b['alias'],'columns':_0x32965b[_0x15cb67(0x19d)],'reason':_0x32965b[_0x15cb67(0x198)]??_0x15cb67(0x1b4)}),{'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b[_0x15cb67(0x19d)],'status':'unavailable'};const _0x2ff419=resolveTableMetadata(_0x30566f,_0x32965b['table']),_0xa82696=(_0x2ff419?.['indexes']??[])['map'](_0x3dcb5e=>({'index':_0x3dcb5e,'matchedPrefix':findEqualityPrefix(_0x3dcb5e[_0x15cb67(0x19d)],_0x32965b[_0x15cb67(0x19d)])}))[_0x15cb67(0x1a6)](_0x5f5aa3=>_0x5f5aa3[_0x15cb67(0x192)][_0x15cb67(0x173)]>0x0),_0x584d0e=_0xa82696[_0x15cb67(0x1aa)]((_0x4a2d76,_0x31ef74)=>!_0x4a2d76||_0x31ef74[_0x15cb67(0x192)][_0x15cb67(0x173)]>_0x4a2d76[_0x15cb67(0x192)][_0x15cb67(0x173)]?_0x31ef74:_0x4a2d76,_0xa82696[0x0]);if(_0x584d0e)return{'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b['alias'],'columns':_0x32965b[_0x15cb67(0x19d)],'status':_0x15cb67(0x1a8),'matchedIndex':{..._0x584d0e['index'],'matchedPrefix':_0x584d0e[_0x15cb67(0x192)]}};const _0x29af63=_0x2ff419?.['indexes'][_0x15cb67(0x1a6)](_0xbb19bd=>_0xbb19bd[_0x15cb67(0x19d)]['some'](_0x2acc76=>_0x32965b[_0x15cb67(0x19d)][_0x15cb67(0x1a5)](_0x2aa99a=>columnNamesMatch(_0x2acc76,_0x2aa99a))))??[];if(_0x29af63['length']>0x0)return _0x56a98b['push']({'code':'JOIN_INDEX_NOT_USABLE','table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b[_0x15cb67(0x19d)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b['columns'],'status':_0x15cb67(0x18b),'candidateIndexes':_0x29af63};if(_0x2ff419&&_0x2ff419[_0x15cb67(0x18a)]!==![]&&_0x2ff419[_0x15cb67(0x1ad)][_0x15cb67(0x173)]>0x0&&_0x32965b[_0x15cb67(0x19d)]['length']>0x0)return _0x56a98b[_0x15cb67(0x17a)]({'code':_0x15cb67(0x178),'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b[_0x15cb67(0x19d)],'reason':_0x15cb67(0x19b)}),{'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b['columns'],'status':_0x15cb67(0x18b)};return _0x56a98b['push']({'code':_0x15cb67(0x174),'table':_0x32965b[_0x15cb67(0x189)],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b['columns'],'reason':_0x2ff419?_0x15cb67(0x1a1):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x32965b['table'],'alias':_0x32965b[_0x15cb67(0x199)],'columns':_0x32965b[_0x15cb67(0x19d)],'status':'unavailable'};});return{'checked':_0x32232b[_0x2ec051(0x173)]>0x0,'joins':_0x32232b,'warnings':_0x56a98b};}function extractJoinFacts(_0x5c9893){const _0x46d765=a290_0x2f96,_0x5b5582=maskNestedQueries(stripSqlNoise(_0x5c9893)),_0x29ed91=maskQuotedIdentifiers(_0x5b5582),_0x10175a=[],_0x82270a=new Set(),_0x1d2a52=/\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 _0x11184 of _0x5b5582[_0x46d765(0x1ae)](_0x1d2a52)){const _0x140852=_0x11184[_0x46d765(0x185)]??0x0,_0x2aab34=_0x11184[0x0][_0x46d765(0x195)](/\bJOIN\b/i),_0xfe1c7a=_0x140852+Math[_0x46d765(0x1a0)](0x0,_0x2aab34);if(!/^JOIN\b/i[_0x46d765(0x19c)](_0x29ed91[_0x46d765(0x18e)](_0xfe1c7a)))continue;_0x82270a['add'](_0xfe1c7a);const _0x40b5b8=normalizeIdentifier(_0x11184[0x1]||_0x46d765(0x1ac)),_0x25287a=normalizeIdentifier(_0x11184[0x2]??''),_0x1c165b=normalizeIdentifier(_0x11184[0x3]||_0x25287a[_0x46d765(0x17c)]('.')['at'](-0x1)||_0x25287a),_0x119032=[],_0x4b17d6=_0x25287a===_0x46d765(0x19a);let _0x55982c=_0x40b5b8===_0x46d765(0x184)||_0x40b5b8===_0x46d765(0x1a4)||_0x4b17d6,_0x46d3e3=_0x55982c?_0x4b17d6?_0x46d765(0x172):_0x40b5b8[_0x46d765(0x197)]()+_0x46d765(0x16f):undefined;const _0xd3b6fb=stripOuterParentheses(_0x11184[0x4]??''),_0x2d8285=_0xd3b6fb[_0x46d765(0x180)](MYBATIS_DYNAMIC_START_MARKER)||_0xd3b6fb[_0x46d765(0x180)](MYBATIS_DYNAMIC_END_MARKER),_0xb25398=_0xd3b6fb[_0x46d765(0x180)](MYBATIS_INCLUDE_MARKER);_0x2d8285&&(_0x55982c=!![],_0x46d3e3??='MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.');_0xb25398&&(_0x55982c=!![],_0x46d3e3??=_0x46d765(0x18d));const _0x24b750=_0xd3b6fb['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x46d765(0x1b1)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x24b750,'OR')&&(_0x55982c=!![],_0x46d3e3??=_0x46d765(0x16e));for(const _0x298d76 of splitTopLevelAnd(_0x24b750)){const _0x425475=stripOuterParentheses(_0x298d76);if(hasTopLevelKeyword(_0x425475,'OR')){_0x55982c=!![],_0x46d3e3??=_0x46d765(0x16e);continue;}const _0x1fc730=splitEquality(_0x425475);if(!_0x1fc730){containsColumnReference(_0x298d76,_0x1c165b)&&(_0x55982c=!![]);continue;}const _0x12875b=parseDirectColumnReference(_0x1fc730[0x0],_0x1c165b),_0x2fa7fc=parseDirectColumnReference(_0x1fc730[0x1],_0x1c165b),_0x1c61c7=containsColumnReference(_0x1fc730[0x0],_0x1c165b),_0x32776f=containsColumnReference(_0x1fc730[0x1],_0x1c165b),_0x43dc25=_0x12875b&&!_0x32776f?_0x12875b:_0x2fa7fc&&!_0x1c61c7?_0x2fa7fc:null;if(_0x43dc25&&!_0x119032[_0x46d765(0x180)](_0x43dc25))_0x119032[_0x46d765(0x17a)](_0x43dc25);else!_0x43dc25&&containsColumnReference(_0x298d76,_0x1c165b)&&(_0x55982c=!![]);}_0x10175a[_0x46d765(0x17a)]({'table':_0x25287a,'alias':_0x1c165b,'columns':_0x119032,'unsupportedPredicate':_0x55982c,'unsupportedReason':_0x46d3e3,'containsUnresolvedInclude':_0xb25398,'position':_0xfe1c7a});}for(const _0x2124f5 of _0x29ed91[_0x46d765(0x1ae)](/\bJOIN\b/gi)){const _0x3ad8b8=_0x2124f5['index']??0x0;if(_0x82270a['has'](_0x3ad8b8))continue;const _0x56e6c4=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x46d765(0x196)](_0x5b5582[_0x46d765(0x18e)](_0x3ad8b8+_0x2124f5[0x0][_0x46d765(0x173)])),_0x26ec81=normalizeIdentifier(_0x56e6c4?.[0x1]||'unknown'),_0x4b54e8=normalizeIdentifier(_0x56e6c4?.[0x2]||''),_0x4651a2=isSqlClauseKeyword(_0x4b54e8)?_0x26ec81[_0x46d765(0x17c)]('.')['at'](-0x1)||_0x26ec81:_0x4b54e8||_0x26ec81[_0x46d765(0x17c)]('.')['at'](-0x1)||_0x26ec81;_0x10175a[_0x46d765(0x17a)]({'table':_0x26ec81,'alias':_0x4651a2,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x46d765(0x18f),'position':_0x3ad8b8});}const _0x20d9ff=_0x29ed91[_0x46d765(0x1b2)](MYBATIS_INCLUDE_MARKER);return _0x20d9ff>=0x0&&!_0x10175a[_0x46d765(0x1a5)](_0x3e0f1b=>_0x3e0f1b[_0x46d765(0x187)])&&_0x10175a['push']({'table':'unknown','alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x46d765(0x1ab),'containsUnresolvedInclude':!![],'position':_0x20d9ff}),_0x10175a[_0x46d765(0x182)]((_0x1b239f,_0x2c3de5)=>_0x1b239f[_0x46d765(0x1a3)]-_0x2c3de5[_0x46d765(0x1a3)]);}function stripSqlNoise(_0xbcc809){const _0x350de6=a290_0x2f96,_0x62c008=Array[_0x350de6(0x1b5)](_0xbcc809),_0x44d709=(_0x32cc8f,_0x1d4841)=>{for(let _0x5491fa=_0x32cc8f;_0x5491fa<_0x1d4841;_0x5491fa+=0x1){_0x62c008[_0x5491fa]!=='\x0a'&&_0x62c008[_0x5491fa]!=='\x0d'&&(_0x62c008[_0x5491fa]='\x20');}};for(let _0x343c98=0x0;_0x343c98<_0x62c008[_0x350de6(0x173)];_0x343c98+=0x1){const _0x4bf03=_0x62c008[_0x343c98],_0xadc798=_0x62c008[_0x343c98+0x1];if(_0x4bf03==='\x27'||_0x4bf03==='\x22'||_0x4bf03==='`'){const _0x5ddb91=_0x4bf03,_0x26a854=_0x343c98;_0x343c98+=0x1;while(_0x343c98<_0x62c008['length']){if(_0x62c008[_0x343c98]==='\x5c'&&_0x343c98+0x1<_0x62c008[_0x350de6(0x173)]){_0x343c98+=0x2;continue;}if(_0x62c008[_0x343c98]!==_0x5ddb91){_0x343c98+=0x1;continue;}if(_0x62c008[_0x343c98+0x1]===_0x5ddb91){_0x343c98+=0x2;continue;}break;}if(_0x5ddb91==='\x27')_0x44d709(_0x26a854,Math['min'](_0x343c98+0x1,_0x62c008['length']));continue;}if(_0x4bf03==='-'&&_0xadc798==='-'){const _0x3a998d=_0x343c98;while(_0x343c98<_0x62c008['length']&&_0x62c008[_0x343c98]!=='\x0a')_0x343c98+=0x1;_0x44d709(_0x3a998d,_0x343c98);continue;}if(_0x4bf03==='/'&&_0xadc798==='*'){const _0x40c5a4=_0x343c98;_0x343c98+=0x2;while(_0x343c98<_0x62c008[_0x350de6(0x173)]&&!(_0x62c008[_0x343c98]==='*'&&_0x62c008[_0x343c98+0x1]==='/')){_0x343c98+=0x1;}_0x343c98=Math[_0x350de6(0x194)](_0x343c98+0x1,_0x62c008[_0x350de6(0x173)]-0x1),_0x44d709(_0x40c5a4,_0x343c98+0x1);continue;}if(_0x4bf03==='#'&&_0xadc798!=='{'){const _0x2fe37c=_0x343c98;while(_0x343c98<_0x62c008['length']&&_0x62c008[_0x343c98]!=='\x0a')_0x343c98+=0x1;_0x44d709(_0x2fe37c,_0x343c98);continue;}if((_0x4bf03==='#'||_0x4bf03==='$')&&_0xadc798==='{'){const _0x2b84c4=_0x343c98;_0x343c98+=0x2;while(_0x343c98<_0x62c008[_0x350de6(0x173)]&&_0x62c008[_0x343c98]!=='}')_0x343c98+=0x1;_0x44d709(_0x2b84c4,Math['min'](_0x343c98+0x1,_0x62c008[_0x350de6(0x173)]));}}return _0x62c008[_0x350de6(0x177)]('');}function maskQuotedIdentifiers(_0x56adfa){const _0x2ad0fe=a290_0x2f96,_0x38c193=Array['from'](_0x56adfa);for(let _0x256e8e=0x0;_0x256e8e<_0x38c193[_0x2ad0fe(0x173)];_0x256e8e+=0x1){const _0x49bea2=_0x38c193[_0x256e8e];if(_0x49bea2!=='\x22'&&_0x49bea2!=='`')continue;_0x256e8e+=0x1;while(_0x256e8e<_0x38c193[_0x2ad0fe(0x173)]){if(_0x38c193[_0x256e8e]===_0x49bea2){if(_0x38c193[_0x256e8e+0x1]===_0x49bea2){_0x38c193[_0x256e8e]='\x20',_0x38c193[_0x256e8e+0x1]='\x20',_0x256e8e+=0x2;continue;}break;}_0x38c193[_0x256e8e]='\x20',_0x256e8e+=0x1;}}return _0x38c193[_0x2ad0fe(0x177)]('');}function maskNestedQueries(_0x3543c2){const _0x33d346=a290_0x2f96,_0x584318=Array[_0x33d346(0x1b5)](_0x3543c2);for(let _0x58a8d9=0x0;_0x58a8d9<_0x584318[_0x33d346(0x173)];_0x58a8d9+=0x1){if(_0x584318[_0x58a8d9]!=='(')continue;const _0xee821d=_0x3543c2[_0x33d346(0x18e)](_0x58a8d9+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x33d346(0x19c)](_0xee821d))continue;let _0x2244b8=0x1,_0xbd2c74=_0x58a8d9+0x1;for(;_0xbd2c74<_0x584318[_0x33d346(0x173)]&&_0x2244b8>0x0;_0xbd2c74+=0x1){if(_0x584318[_0xbd2c74]==='(')_0x2244b8+=0x1;if(_0x584318[_0xbd2c74]===')')_0x2244b8-=0x1;}if(_0x2244b8!==0x0)continue;for(let _0x40c698=_0x58a8d9;_0x40c698<_0xbd2c74;_0x40c698+=0x1){_0x584318[_0x40c698]='\x20';}const _0x5cdefa=_0x33d346(0x19a);for(let _0x3e6a59=0x0;_0x3e6a59<_0x5cdefa[_0x33d346(0x173)]&&_0x58a8d9+_0x3e6a59<_0xbd2c74;_0x3e6a59+=0x1){_0x584318[_0x58a8d9+_0x3e6a59]=_0x5cdefa[_0x3e6a59];}_0x58a8d9=_0xbd2c74-0x1;}return _0x584318[_0x33d346(0x177)]('');}function a290_0x366c(){const _0xe4049b=['8312722zpTyCI','max','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','sql','position','full','some','filter','23576wnqMzj','covered','28925604vbzkiQ','reduce','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','INNER','indexes','matchAll','128Xvgeoh','unsupportedPredicate','replaceAll','indexOf','natural','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','from','inner','error','match','cross','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','15687SYZVZy','endsWith','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','length','INDEX_METADATA_UNAVAILABLE','10WxdRPv','11740UUCgSi','join','JOIN_INDEX_MISSING','where','push','map','split','3kowHSe','74WYcNdw','3313736ktAUBy','includes','trim','sort','1032pWSuZN','right','index','JOIN_PREDICATE_UNSUPPORTED','containsUnresolvedInclude','has','table','metadataAvailable','warning','replace','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','slice','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','using','2096154yTDcYX','matchedPrefix','\x5c$&','min','search','exec','toUpperCase','unsupportedReason','alias','__sq__','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','test','columns','\x5cs*\x5c.\x5cs*[\x5cw$]+'];a290_0x366c=function(){return _0xe4049b;};return a290_0x366c();}function splitTopLevelAnd(_0x25ff97){const _0x589d8c=a290_0x2f96,_0x15a7ee=[];let _0xb67d2a=0x0,_0x146be8=0x0;for(let _0x52d3c9=0x0;_0x52d3c9<_0x25ff97['length'];_0x52d3c9+=0x1){const _0x26705a=_0x25ff97[_0x52d3c9];if(_0x26705a==='(')_0xb67d2a+=0x1;if(_0x26705a===')')_0xb67d2a=Math[_0x589d8c(0x1a0)](0x0,_0xb67d2a-0x1);_0xb67d2a===0x0&&_0x25ff97[_0x589d8c(0x18e)](_0x52d3c9)[_0x589d8c(0x16c)](/^AND\b/i)&&(_0x52d3c9===0x0||/\s/[_0x589d8c(0x19c)](_0x25ff97[_0x52d3c9-0x1]??''))&&(_0x15a7ee[_0x589d8c(0x17a)](_0x25ff97[_0x589d8c(0x18e)](_0x146be8,_0x52d3c9)[_0x589d8c(0x181)]()),_0x52d3c9+=0x2,_0x146be8=_0x52d3c9+0x1);}const _0x47a774=_0x25ff97['slice'](_0x146be8)['trim']();if(_0x47a774)_0x15a7ee[_0x589d8c(0x17a)](_0x47a774);return _0x15a7ee;}function hasTopLevelKeyword(_0x1f02a5,_0x12658e){const _0x4c850f=a290_0x2f96;let _0x14d93f=0x0;for(let _0x241c58=0x0;_0x241c58<_0x1f02a5[_0x4c850f(0x173)];_0x241c58+=0x1){const _0x10536=_0x1f02a5[_0x241c58];if(_0x10536==='(')_0x14d93f+=0x1;if(_0x10536===')')_0x14d93f=Math[_0x4c850f(0x1a0)](0x0,_0x14d93f-0x1);if(_0x14d93f!==0x0)continue;const _0x1babea=_0x1f02a5[_0x4c850f(0x18e)](_0x241c58,_0x241c58+_0x12658e['length']),_0x50a8f9=_0x1f02a5[_0x241c58-0x1]??'\x20',_0x583e47=_0x1f02a5[_0x241c58+_0x12658e['length']]??'\x20';if(_0x1babea[_0x4c850f(0x197)]()===_0x12658e[_0x4c850f(0x197)]()&&!/[\w$]/[_0x4c850f(0x19c)](_0x50a8f9)&&!/[\w$]/['test'](_0x583e47))return!![];}return![];}function splitEquality(_0x2f021d){const _0x55361f=a290_0x2f96,_0x2c245e=stripOuterParentheses(_0x2f021d);let _0x77b2c6=0x0,_0x351547;for(let _0x512ea3=0x0;_0x512ea3<_0x2c245e[_0x55361f(0x173)];_0x512ea3+=0x1){const _0x3676fa=_0x2c245e[_0x512ea3];if(_0x3676fa==='(')_0x77b2c6+=0x1;if(_0x3676fa===')')_0x77b2c6=Math['max'](0x0,_0x77b2c6-0x1);const _0x54e7c3=_0x2c245e[_0x512ea3-0x1]??'',_0x4d8099=_0x2c245e[_0x512ea3+0x1]??'';if(_0x3676fa==='='&&_0x77b2c6===0x0&&!/[!<>=:]/[_0x55361f(0x19c)](_0x54e7c3)&&_0x4d8099!=='='){if(_0x351547!==undefined)return null;_0x351547=_0x512ea3;}}return _0x351547===undefined?null:[_0x2c245e[_0x55361f(0x18e)](0x0,_0x351547)[_0x55361f(0x181)](),_0x2c245e[_0x55361f(0x18e)](_0x351547+0x1)[_0x55361f(0x181)]()];}function parseDirectColumnReference(_0xcfa9c,_0xa2ff74){const _0xcbd267=a290_0x2f96,_0x4f79ff=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0xcbd267(0x196)](stripOuterParentheses(_0xcfa9c));if(!_0x4f79ff)return null;if(normalizeIdentifier(_0x4f79ff[0x1]??'')!==normalizeIdentifier(_0xa2ff74))return null;return normalizeIdentifier(_0x4f79ff[0x2]??'');}function containsColumnReference(_0x1e4fe9,_0x4bceb7){const _0x3a5e85=a290_0x2f96,_0x5da3a0=_0x1e4fe9['replace'](/[`"]/g,''),_0x41a0d5=_0x4bceb7[_0x3a5e85(0x18c)](/[.*+?^${}()|[\]\\]/g,_0x3a5e85(0x193));return new RegExp('(?:^|[^\x5cw$])'+_0x41a0d5+_0x3a5e85(0x19e),'i')[_0x3a5e85(0x19c)](_0x5da3a0);}function findEqualityPrefix(_0x1e250a,_0x103fd2){const _0x51b93d=a290_0x2f96,_0x2cc45b=new Set(_0x103fd2[_0x51b93d(0x17b)](normalizeIdentifier)),_0x43bfa5=[];for(const _0x492514 of _0x1e250a){if(!_0x2cc45b['has'](normalizeIdentifier(_0x492514)))break;_0x43bfa5[_0x51b93d(0x17a)](_0x492514);}return _0x43bfa5;}function resolveTableMetadata(_0x21f023,_0x5972bc){const _0x415e1e=a290_0x2f96,_0x3972d8=normalizeIdentifier(_0x5972bc),_0x131e8c=_0x21f023[_0x415e1e(0x1a6)](_0x541d93=>normalizeIdentifier(_0x541d93['tableName'])===_0x3972d8);if(_0x131e8c[_0x415e1e(0x173)]===0x1)return _0x131e8c[0x0];const _0x1f4821=_0x3972d8['includes']('.'),_0x119f16=_0x3972d8[_0x415e1e(0x17c)]('.')['at'](-0x1),_0x598e88=_0x21f023[_0x415e1e(0x1a6)](_0xdc8d67=>{const _0x4079c7=_0x415e1e,_0x5a79c7=normalizeIdentifier(_0xdc8d67['tableName']);if(_0x1f4821&&_0x5a79c7[_0x4079c7(0x180)]('.'))return![];return _0x5a79c7[_0x4079c7(0x17c)]('.')['at'](-0x1)===_0x119f16;});return _0x598e88['length']===0x1?_0x598e88[0x0]:undefined;}function columnNamesMatch(_0xf5338f,_0x4ddf13){return normalizeIdentifier(_0xf5338f)===normalizeIdentifier(_0x4ddf13);}function normalizeIdentifier(_0x4059ed){const _0x517c7c=a290_0x2f96;return _0x4059ed[_0x517c7c(0x18c)](/[`"]/g,'')['trim']()['toLowerCase']();}function isSqlClauseKeyword(_0x582d65){const _0x33d84c=a290_0x2f96;return new Set(['on',_0x33d84c(0x190),_0x33d84c(0x179),_0x33d84c(0x177),_0x33d84c(0x1b6),'left',_0x33d84c(0x184),'full',_0x33d84c(0x16d),_0x33d84c(0x1b3)])[_0x33d84c(0x188)](_0x582d65);}function stripOuterParentheses(_0x3df680){const _0x2da87d=a290_0x2f96;let _0x192651=_0x3df680[_0x2da87d(0x181)]();while(_0x192651['startsWith']('(')&&_0x192651[_0x2da87d(0x171)](')')){let _0x1dd559=0x0,_0x38781e=!![];for(let _0x3e81db=0x0;_0x3e81db<_0x192651[_0x2da87d(0x173)];_0x3e81db+=0x1){if(_0x192651[_0x3e81db]==='(')_0x1dd559+=0x1;if(_0x192651[_0x3e81db]===')')_0x1dd559-=0x1;if(_0x1dd559===0x0&&_0x3e81db<_0x192651[_0x2da87d(0x173)]-0x1){_0x38781e=![];break;}}if(!_0x38781e||_0x1dd559!==0x0)break;_0x192651=_0x192651[_0x2da87d(0x18e)](0x1,-0x1)[_0x2da87d(0x181)]();}return _0x192651;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a291_0x46069b=a291_0x3f01;(function(_0x5a1568,_0x31b29a){const _0x56e53d=a291_0x3f01,_0x3bcadc=_0x5a1568();while(!![]){try{const _0x52ee05=parseInt(_0x56e53d(0xe5))/0x1+-parseInt(_0x56e53d(0xe3))/0x2*(-parseInt(_0x56e53d(0xde))/0x3)+-parseInt(_0x56e53d(0xdc))/0x4+parseInt(_0x56e53d(0xe0))/0x5+-parseInt(_0x56e53d(0xdf))/0x6+parseInt(_0x56e53d(0xdb))/0x7*(-parseInt(_0x56e53d(0xdd))/0x8)+parseInt(_0x56e53d(0xe2))/0x9;if(_0x52ee05===_0x31b29a)break;else _0x3bcadc['push'](_0x3bcadc['shift']());}catch(_0x12e869){_0x3bcadc['push'](_0x3bcadc['shift']());}}}(a291_0x358d,0x3b376));import{resolve}from'node:path';function a291_0x358d(){const _0x250736=['/sql','1278972bDMIox','12754AcJWpP','.rabetbase','122381Wussfd','sql-trash','sql','sql.lock.json','434CBcDKN','693800vHoQLV','2776LBFhZx','159zgtBlA','999900wMLfXc','8470XVJzqr'];a291_0x358d=function(){return _0x250736;};return a291_0x358d();}function a291_0x3f01(_0x31f4fa,_0x4a04f7){_0x31f4fa=_0x31f4fa-0xd9;const _0x358db8=a291_0x358d();let _0x3f01a4=_0x358db8[_0x31f4fa];return _0x3f01a4;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a291_0x46069b(0xe4),LOCK_FILE_NAME=a291_0x46069b(0xda),TRASH_DIR_NAME=a291_0x46069b(0xe6);export function loadSqlProjectConfig(_0x441bbf,_0x4b0e55){const _0x5c4f4b=a291_0x46069b,_0x238771=resolve(_0x4b0e55??findProjectRootDirectory()),_0x385f63=DOT_DIR+_0x5c4f4b(0xe1),_0x487231=_0x385f63+'/'+_0x441bbf;return{'projectRoot':_0x238771,'appCode':_0x441bbf,'sqlWorkspaceRoot':_0x385f63,'sqlRoot':_0x487231,'sqlRootDir':resolve(_0x238771,DOT_DIR,_0x5c4f4b(0xd9),_0x441bbf),'lockFilePath':resolve(_0x238771,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x238771,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x96e01c,_0xe08e50){const _0x4fd1a3=a292_0x4c5c,_0x4c0b08=_0x96e01c();while(!![]){try{const _0xb2dff6=-parseInt(_0x4fd1a3(0x1ff))/0x1*(-parseInt(_0x4fd1a3(0x20f))/0x2)+parseInt(_0x4fd1a3(0x206))/0x3*(-parseInt(_0x4fd1a3(0x20c))/0x4)+parseInt(_0x4fd1a3(0x211))/0x5+-parseInt(_0x4fd1a3(0x1f9))/0x6+parseInt(_0x4fd1a3(0x202))/0x7*(-parseInt(_0x4fd1a3(0x20e))/0x8)+-parseInt(_0x4fd1a3(0x1fe))/0x9*(-parseInt(_0x4fd1a3(0x20d))/0xa)+parseInt(_0x4fd1a3(0x213))/0xb*(parseInt(_0x4fd1a3(0x204))/0xc);if(_0xb2dff6===_0xe08e50)break;else _0x4c0b08['push'](_0x4c0b08['shift']());}catch(_0x34a60d){_0x4c0b08['push'](_0x4c0b08['shift']());}}}(a292_0x1738,0x22e59));function a292_0x1738(){const _0x31d9a1=['mybatisXml','581TDCCon','name','185304kQFfjr','isDirectory','593289XQoLYF','.xml','push','sqlName','sqlCode','path','4gmlXtY','790BMsmkS','5376TPBPyW','2RITLPl','replace','1286795fbxZBC','filter','121ODxnct','.sql','length','ENOENT','sql','slice','split','1543242mUTRmX','toLowerCase','mode','sqlRootDir','isFile','5004wWSAKA','182538jdZWfC','dbName'];a292_0x1738=function(){return _0x31d9a1;};return a292_0x1738();}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';function a292_0x4c5c(_0x465e87,_0x45f793){_0x465e87=_0x465e87-0x1f4;const _0x173822=a292_0x1738();let _0x4c5ca9=_0x173822[_0x465e87];return _0x4c5ca9;}import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x19bef2){const _0x37c0f0=a292_0x4c5c;if(_0x19bef2===_0x37c0f0(0x214))return _0x37c0f0(0x1f6);if(_0x19bef2===_0x37c0f0(0x207))return _0x37c0f0(0x201);return undefined;}async function scanSqlFilesRecursively(_0x3dad61,_0x19f689){const _0x503ad8=a292_0x4c5c,_0x2ffa80=[];try{const _0x16f8eb=await readdir(_0x3dad61,{'withFileTypes':!![]});for(const _0x40c366 of _0x16f8eb){const _0x8416d=join(_0x3dad61,_0x40c366[_0x503ad8(0x203)]);if(_0x40c366[_0x503ad8(0x205)]()){_0x2ffa80['push'](...await scanSqlFilesRecursively(_0x8416d,_0x19f689));continue;}if(!_0x40c366[_0x503ad8(0x1fd)]())continue;const _0x1b0574=extname(_0x40c366[_0x503ad8(0x203)])[_0x503ad8(0x1fa)](),_0xaea6fe=extensionToMode(_0x1b0574);if(!_0xaea6fe)continue;const _0x11f155=relative(_0x19f689,_0x8416d)[_0x503ad8(0x210)](/\\/g,'/'),_0x9de14d=_0x11f155[_0x503ad8(0x1f8)]('/')[_0x503ad8(0x212)](Boolean),_0x264786=parseSqlPath(_0x9de14d,_0x40c366['name'],_0x1b0574);if(!_0x264786)continue;_0x2ffa80[_0x503ad8(0x208)]({'sqlCode':_0x264786['sqlCode'],'sqlName':_0x264786[_0x503ad8(0x209)],'dbDirectory':_0x9de14d[0x0],'filePath':_0x8416d,'relativePath':_0x11f155,'lockKey':_0x264786[_0x503ad8(0x20a)],'mode':_0xaea6fe});}}catch(_0x3a5206){if(_0x3a5206['code']!==_0x503ad8(0x1f5))throw _0x3a5206;}return _0x2ffa80;}export async function scanLocalSqlQueries(_0x47fac7){const _0x44984b=a292_0x4c5c;return scanSqlFilesRecursively(_0x47fac7[_0x44984b(0x1fc)],_0x47fac7[_0x44984b(0x1fc)]);}export function resolveLocalSqlFilePath(_0x52dddf,_0xd88b77,_0x59a5dc){const _0x2bfbcc=a292_0x4c5c,_0x48ebea=_0x59a5dc?.[_0x2bfbcc(0x20b)]||(_0x59a5dc?.[_0x2bfbcc(0x209)]||_0x59a5dc?.[_0x2bfbcc(0x200)]?buildSqlRelativePath(_0xd88b77,_0x59a5dc?.['sqlName'],_0x59a5dc?.['dbName'],_0x59a5dc?.[_0x2bfbcc(0x1fb)]||'sql',_0x59a5dc?.['dbId']):buildDefaultSqlFileName(_0xd88b77,_0x59a5dc?.[_0x2bfbcc(0x1fb)]||_0x2bfbcc(0x1f6)));return join(_0x52dddf[_0x2bfbcc(0x1fc)],_0x48ebea);}export async function directoryExists(_0x395eb1){const _0xd2c805=a292_0x4c5c;try{const _0x3372f8=await stat(_0x395eb1);return _0x3372f8[_0xd2c805(0x205)]();}catch{return![];}}function parseSqlPath(_0x3c15ea,_0x3820d3,_0x36bdb5){const _0x32aa92=a292_0x4c5c,_0x53ccad=_0x3820d3['slice'](0x0,-_0x36bdb5[_0x32aa92(0x1f4)]);if(_0x3c15ea[_0x32aa92(0x1f4)]<0x2)return null;const _0x3e6c46=_0x53ccad['indexOf']('_');if(_0x3e6c46<=0x0||_0x3e6c46>=_0x53ccad[_0x32aa92(0x1f4)]-0x1)return null;const _0x1f6a5a=_0x53ccad[_0x32aa92(0x1f7)](0x0,_0x3e6c46);if(!isLikelySqlCode(_0x1f6a5a))return null;return{'sqlCode':_0x1f6a5a,'sqlName':_0x53ccad[_0x32aa92(0x1f7)](_0x3e6c46+0x1)};}function isLikelySqlCode(_0x785797){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x785797);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x531e7e,_0x423bee){const _0x2f08f0=a293_0xf233,_0x3d6f3d=_0x531e7e();while(!![]){try{const _0x458407=-parseInt(_0x2f08f0(0x1d7))/0x1+parseInt(_0x2f08f0(0x1cf))/0x2*(-parseInt(_0x2f08f0(0x1d6))/0x3)+-parseInt(_0x2f08f0(0x1d4))/0x4*(-parseInt(_0x2f08f0(0x1d9))/0x5)+parseInt(_0x2f08f0(0x1d0))/0x6*(-parseInt(_0x2f08f0(0x1d5))/0x7)+parseInt(_0x2f08f0(0x1d2))/0x8+-parseInt(_0x2f08f0(0x1da))/0x9*(parseInt(_0x2f08f0(0x1ce))/0xa)+parseInt(_0x2f08f0(0x1cd))/0xb;if(_0x458407===_0x423bee)break;else _0x3d6f3d['push'](_0x3d6f3d['shift']());}catch(_0x51628a){_0x3d6f3d['push'](_0x3d6f3d['shift']());}}}(a293_0x3397,0xb45b9));import{readFile}from'node:fs/promises';function a293_0x3397(){const _0xaa430f=['update','md5','17428312aLrJnV','10JlbhQH','8622rRmguO','7320UMZZbx','hex','11220600HgAoGB','digest','2498452IMVKOL','1631OcZBEo','813KJtXlD','568173bmlJaa','createHash','5roZMCD','7669089xADdji'];a293_0x3397=function(){return _0xaa430f;};return a293_0x3397();}function a293_0xf233(_0x373fe9,_0x468dc6){_0x373fe9=_0x373fe9-0x1cb;const _0x3397af=a293_0x3397();let _0xf2334f=_0x3397af[_0x373fe9];return _0xf2334f;}import a293_0x2f1759 from'node:crypto';export function computeSqlContentHash(_0x51edd7){const _0x8655e1=a293_0xf233;return a293_0x2f1759[_0x8655e1(0x1d8)](_0x8655e1(0x1cc))[_0x8655e1(0x1cb)](_0x51edd7)[_0x8655e1(0x1d3)](_0x8655e1(0x1d1));}export async function computeSqlFileHash(_0x5308c7){const _0x4bb460=await readFile(_0x5308c7,'utf8');return computeSqlContentHash(_0x4bb460);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c6df3,_0x444eea){const _0xeb8300=a294_0x2d11,_0xd2e690=_0x4c6df3();while(!![]){try{const _0x58f1c2=parseInt(_0xeb8300(0x1b4))/0x1*(-parseInt(_0xeb8300(0x1af))/0x2)+-parseInt(_0xeb8300(0x1c3))/0x3*(-parseInt(_0xeb8300(0x1b8))/0x4)+-parseInt(_0xeb8300(0x1b5))/0x5+-parseInt(_0xeb8300(0x1ae))/0x6+-parseInt(_0xeb8300(0x1b2))/0x7+parseInt(_0xeb8300(0x1b0))/0x8*(-parseInt(_0xeb8300(0x1b9))/0x9)+parseInt(_0xeb8300(0x1bc))/0xa;if(_0x58f1c2===_0x444eea)break;else _0xd2e690['push'](_0xd2e690['shift']());}catch(_0x4afdf1){_0xd2e690['push'](_0xd2e690['shift']());}}}(a294_0x15bc,0x74ad7));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x5692be,_0x4ea0e8,_0x4dcb2d,_0x466f95){const _0x11ac28=a294_0x2d11,_0xa4775e=_0x5692be??createEmptySqlLock();let _0x1b5972=_0xa4775e['apps'][_0x4ea0e8];if(!_0x1b5972)return _0x1b5972={'sqlRoot':_0x4dcb2d,'lastSync':'','sqls':{}},_0xa4775e[_0x11ac28(0x1bd)][_0x4ea0e8]=_0x1b5972,{'lockData':_0xa4775e,'appLock':_0x1b5972};if(!_0x1b5972[_0x11ac28(0x1b6)])_0x1b5972[_0x11ac28(0x1b6)]=_0x4dcb2d;else{if(_0x1b5972[_0x11ac28(0x1b6)]!==_0x4dcb2d)throw new Error(_0x466f95+_0x11ac28(0x1b1)+_0x4dcb2d+_0x11ac28(0x1bf)+_0x1b5972[_0x11ac28(0x1b6)]+_0x11ac28(0x1be)+_0x11ac28(0x1c2));}return!_0x1b5972[_0x11ac28(0x1b3)]&&(_0x1b5972[_0x11ac28(0x1b3)]={}),!_0x1b5972[_0x11ac28(0x1b7)]&&(_0x1b5972[_0x11ac28(0x1b7)]=''),{'lockData':_0xa4775e,'appLock':_0x1b5972};}export async function readSqlLockFile(_0x5c8e05){const _0x18a318=a294_0x2d11;try{const _0x59e61e=await readFile(_0x5c8e05,_0x18a318(0x1ba));return JSON[_0x18a318(0x1c4)](_0x59e61e);}catch(_0x4b5558){if(_0x4b5558['code']===_0x18a318(0x1bb))return null;throw new Error(_0x18a318(0x1c1)+String(_0x4b5558));}}export async function writeSqlLockFile(_0x3d9f31,_0x11afe5){const _0x5c23cc=a294_0x2d11;await mkdir(dirname(_0x3d9f31),{'recursive':!![]}),await writeFile(_0x3d9f31,JSON[_0x5c23cc(0x1c0)](_0x11afe5,null,0x2),_0x5c23cc(0x1ba));}function a294_0x2d11(_0x32439b,_0xcc57fe){_0x32439b=_0x32439b-0x1ae;const _0x15bc23=a294_0x15bc();let _0x2d11dd=_0x15bc23[_0x32439b];return _0x2d11dd;}function a294_0x15bc(){const _0x356c52=['36emyiFh','utf8','ENOENT','15848710dvEHGF','apps','\x22.\x20','\x22\x20vs\x20lock\x20\x22','stringify','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','42BSoVJq','parse','57198uToRvW','738950ocSboN','147848QtFtJA',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','2645636agqwyb','sqls','1kKgtWh','3381770GDqDeH','sqlRoot','lastSync','114364ngTkEr'];a294_0x15bc=function(){return _0x356c52;};return a294_0x15bc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a296_0x5c38(){const _0x460993=['1570580JDbWjY','7006300gwleQs','112qVQTqU','4ROWBhR','12030QZcXpk','44AdAAPZ','.xml','replace','unknown-db','365xMxnBx','4071116Vmoxtb','unknown-sql','.sql','db-','1033173iqiYyT','trim','1793889LJarjR','290410bTDjsK'];a296_0x5c38=function(){return _0x460993;};return a296_0x5c38();}(function(_0x5d8d5c,_0xa625a5){const _0x265b5d=a296_0x122c,_0x5ef997=_0x5d8d5c();while(!![]){try{const _0x301a5b=-parseInt(_0x265b5d(0x1e6))/0x1+-parseInt(_0x265b5d(0x1e5))/0x2+parseInt(_0x265b5d(0x1e4))/0x3*(parseInt(_0x265b5d(0x1e9))/0x4)+-parseInt(_0x265b5d(0x1ef))/0x5*(-parseInt(_0x265b5d(0x1ea))/0x6)+parseInt(_0x265b5d(0x1de))/0x7+-parseInt(_0x265b5d(0x1e8))/0x8*(parseInt(_0x265b5d(0x1e2))/0x9)+parseInt(_0x265b5d(0x1e7))/0xa*(parseInt(_0x265b5d(0x1eb))/0xb);if(_0x301a5b===_0xa625a5)break;else _0x5ef997['push'](_0x5ef997['shift']());}catch(_0x11f2e2){_0x5ef997['push'](_0x5ef997['shift']());}}}(a296_0x5c38,0xc4a75));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x32c644){return detectSqlSourceMode(_0x32c644);}export function getSqlFileExtension(_0x5a2796){const _0x19e2d6=a296_0x122c;return _0x5a2796==='mybatisXml'?_0x19e2d6(0x1ec):_0x19e2d6(0x1e0);}export function buildDefaultSqlFileName(_0x3958ad,_0x2f3f3a){return''+_0x3958ad+getSqlFileExtension(_0x2f3f3a);}function a296_0x122c(_0x15d746,_0x4b150b){_0x15d746=_0x15d746-0x1de;const _0x5c38fc=a296_0x5c38();let _0x122c7d=_0x5c38fc[_0x15d746];return _0x122c7d;}export function sanitizeSqlPathSegment(_0x44d52b,_0x24f53f){const _0x4ae052=a296_0x122c,_0x442ee8=String(_0x44d52b??'')[_0x4ae052(0x1e3)](),_0x1b2347=_0x442ee8['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x4ae052(0x1ed)](/\s+/g,'-')[_0x4ae052(0x1ed)](/-+/g,'-')[_0x4ae052(0x1ed)](/^\.+/,'')[_0x4ae052(0x1ed)](/\.+$/,'')[_0x4ae052(0x1ed)](/^-+/,'')['replace'](/-+$/,'');return _0x1b2347||_0x24f53f;}export function buildDbDirectoryName(_0xe633d1,_0x4ffbe1){const _0x510a54=a296_0x122c;return sanitizeSqlPathSegment(_0xe633d1,_0x4ffbe1!=null?_0x510a54(0x1e1)+_0x4ffbe1:_0x510a54(0x1ee));}export function buildSqlRelativePath(_0x8c6d51,_0x2f473e,_0x55c36f,_0x2b778a,_0x4d2644){const _0x5d4d0a=a296_0x122c,_0x2bfd57=buildDbDirectoryName(_0x55c36f,_0x4d2644),_0x4b728a=sanitizeSqlPathSegment(_0x8c6d51,_0x5d4d0a(0x1df)),_0x4c8569=sanitizeSqlPathSegment(_0x2f473e,_0x4b728a);return _0x2bfd57+'/'+_0x4b728a+'_'+_0x4c8569+getSqlFileExtension(_0x2b778a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a297_0x530d6c=a297_0x29d3;(function(_0x521565,_0x4244c4){const _0x1d515a=a297_0x29d3,_0xaf714d=_0x521565();while(!![]){try{const _0x51c854=parseInt(_0x1d515a(0x239))/0x1*(parseInt(_0x1d515a(0x235))/0x2)+-parseInt(_0x1d515a(0x208))/0x3*(-parseInt(_0x1d515a(0x232))/0x4)+-parseInt(_0x1d515a(0x245))/0x5+parseInt(_0x1d515a(0x225))/0x6+parseInt(_0x1d515a(0x1f6))/0x7+-parseInt(_0x1d515a(0x1f2))/0x8*(parseInt(_0x1d515a(0x207))/0x9)+-parseInt(_0x1d515a(0x219))/0xa*(-parseInt(_0x1d515a(0x20a))/0xb);if(_0x51c854===_0x4244c4)break;else _0xaf714d['push'](_0xaf714d['shift']());}catch(_0x57f26b){_0xaf714d['push'](_0xaf714d['shift']());}}}(a297_0x5390,0xd3ec1));const MYBATIS_OUTER_TAGS=new Map([[a297_0x530d6c(0x1f3),'SELECT'],['insert',a297_0x530d6c(0x1f0)],[a297_0x530d6c(0x1ea),'UPDATE'],[a297_0x530d6c(0x1fa),a297_0x530d6c(0x251)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a297_0x530d6c(0x210),a297_0x530d6c(0x242),a297_0x530d6c(0x238),a297_0x530d6c(0x229),a297_0x530d6c(0x22f),'trim',a297_0x530d6c(0x214),a297_0x530d6c(0x234),a297_0x530d6c(0x253),'property']),MYBATIS_BRANCH_TAGS=new Set(['if',a297_0x530d6c(0x242),a297_0x530d6c(0x238),a297_0x530d6c(0x229),a297_0x530d6c(0x22f)]);export const MYBATIS_DYNAMIC_START_MARKER=a297_0x530d6c(0x252);export const MYBATIS_DYNAMIC_END_MARKER=a297_0x530d6c(0x248);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';function a297_0x29d3(_0x2e3a56,_0x28337c){_0x2e3a56=_0x2e3a56-0x1e7;const _0x5390d1=a297_0x5390();let _0x29d3e0=_0x5390d1[_0x2e3a56];return _0x29d3e0;}const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS[a297_0x530d6c(0x230)]()]['join']('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0xdaac1e){const _0x2b5028=a297_0x530d6c,_0x3e3e54=typeof _0xdaac1e===_0x2b5028(0x222)?_0xdaac1e:'';if(detectSqlSourceMode(_0x3e3e54)===_0x2b5028(0x218))return{'sql':_0x3e3e54,'mode':_0x2b5028(0x218)};let _0x83b051=0x0,_0x6934e='',_0x5c966f,_0x539a41=![],_0x44e3c8=![];const _0x203669=[];while(_0x83b051<_0x3e3e54['length']){if(_0x3e3e54[_0x2b5028(0x227)](_0x2b5028(0x22b),_0x83b051)){const _0x195ee7=_0x3e3e54[_0x2b5028(0x220)]('-->',_0x83b051+0x4);if(_0x195ee7<0x0)return invalidMybatisSource(_0x2b5028(0x224));_0x6934e+='\x20',_0x83b051=_0x195ee7+0x3;continue;}if(_0x3e3e54[_0x2b5028(0x227)](_0x2b5028(0x215),_0x83b051)){if(!_0x539a41||_0x44e3c8)return invalidMybatisSource('CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x31d885=_0x3e3e54[_0x2b5028(0x220)](_0x2b5028(0x231),_0x83b051+0x9);if(_0x31d885<0x0)return invalidMybatisSource(_0x2b5028(0x250));_0x6934e+=_0x3e3e54['slice'](_0x83b051+0x9,_0x31d885),_0x83b051=_0x31d885+0x3;continue;}if(_0x3e3e54['startsWith']('<?',_0x83b051)){if(_0x539a41)return invalidMybatisSource('XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.');const _0xa6b26f=_0x3e3e54[_0x2b5028(0x220)]('?>',_0x83b051+0x2);if(_0xa6b26f<0x0)return invalidMybatisSource(_0x2b5028(0x212));_0x6934e+='\x20',_0x83b051=_0xa6b26f+0x2;continue;}if(_0x3e3e54[_0x83b051]!=='<'){const _0x43978a=_0x3e3e54['indexOf']('<',_0x83b051),_0x26697c=_0x43978a<0x0?_0x3e3e54['length']:_0x43978a,_0x53f0f3=_0x3e3e54['slice'](_0x83b051,_0x26697c);if((!_0x539a41||_0x44e3c8)&&_0x53f0f3['trim']())return invalidMybatisSource(_0x2b5028(0x21c));if(_0x539a41&&!_0x44e3c8){const _0x1904ab=decodeXmlEntities(_0x53f0f3);if(_0x1904ab===null)return invalidMybatisSource(_0x2b5028(0x247));_0x6934e+=_0x1904ab;}else _0x6934e+='\x20';_0x83b051=_0x26697c;continue;}const _0x5bf1f6=findXmlTagEnd(_0x3e3e54,_0x83b051);if(_0x5bf1f6<0x0)return invalidMybatisSource(_0x2b5028(0x24a));const _0x4014cf=_0x3e3e54[_0x2b5028(0x255)](_0x83b051,_0x5bf1f6+0x1),_0x3cbdbd=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x2b5028(0x1f1)](_0x4014cf);if(!_0x3cbdbd)return invalidMybatisSource(_0x2b5028(0x23a));const _0x2ad251=_0x3cbdbd[0x1]==='/',_0x14577f=_0x3cbdbd[0x2]??'',_0x58fd68=_0x14577f[_0x2b5028(0x206)](),_0x2ab522=_0x3cbdbd[0x3]??'',_0x3a0caa=_0x3cbdbd[0x4]==='/',_0x3db9d5=MYBATIS_OUTER_TAGS['get'](_0x58fd68);if(!_0x3db9d5&&!MYBATIS_DYNAMIC_TAGS[_0x2b5028(0x1fb)](_0x58fd68))return invalidMybatisSource(_0x2b5028(0x21f)+_0x58fd68+'>.');if(!_0x3db9d5&&_0x14577f!==_0x58fd68)return invalidMybatisSource(_0x2b5028(0x23e)+_0x14577f+'>.');if(_0x2ad251){if(_0x2ab522[_0x2b5028(0x1eb)]()||_0x3a0caa)return invalidMybatisSource(_0x2b5028(0x24f)+_0x14577f+'>.');const _0xa1aa22=_0x203669['at'](-0x1);if(!_0xa1aa22||(_0xa1aa22[_0x2b5028(0x22a)]?_0xa1aa22[_0x2b5028(0x24c)]!==_0x58fd68:_0xa1aa22[_0x2b5028(0x21a)]!==_0x14577f))return invalidMybatisSource(_0x2b5028(0x1e8)+_0x14577f+'>.');_0x203669[_0x2b5028(0x211)]();if(_0xa1aa22[_0x2b5028(0x22a)])_0x44e3c8=!![];_0x6934e+=MYBATIS_BRANCH_TAGS[_0x2b5028(0x1fb)](_0x58fd68)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x2ab522))return invalidMybatisSource(_0x2b5028(0x256)+_0x14577f+'>.');if(_0x58fd68===_0x2b5028(0x20d)&&(!_0x3a0caa||_0x203669['at'](-0x1)?.[_0x2b5028(0x24c)]!==_0x2b5028(0x253)))return invalidMybatisSource(_0x2b5028(0x244));if(_0x3db9d5){if(_0x539a41||_0x203669[_0x2b5028(0x1ee)]>0x0)return invalidMybatisSource(_0x2b5028(0x24d));_0x539a41=!![],_0x44e3c8=_0x3a0caa,_0x5c966f=_0x3db9d5;}else{if(!_0x539a41||_0x44e3c8)return invalidMybatisSource(_0x2b5028(0x1ef)+_0x14577f+'>.');}_0x6934e+=_0x58fd68===_0x2b5028(0x210)?_0x2b5028(0x24b):_0x58fd68===_0x2b5028(0x214)?_0x2b5028(0x1ec):_0x58fd68===_0x2b5028(0x253)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x2b5028(0x1fb)](_0x58fd68)&&!_0x3a0caa?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x3a0caa&&_0x203669[_0x2b5028(0x254)]({'rawName':_0x14577f,'tagName':_0x58fd68,'outer':!!_0x3db9d5});}_0x83b051=_0x5bf1f6+0x1;}if(_0x203669[_0x2b5028(0x1ee)]>0x0)return invalidMybatisSource(_0x2b5028(0x204)+_0x203669['at'](-0x1)?.[_0x2b5028(0x21a)]+'>.');if(!_0x539a41||!_0x44e3c8)return invalidMybatisSource(_0x2b5028(0x217));return{'sql':_0x6934e[_0x2b5028(0x1eb)](),'mode':'mybatisXml',..._0x5c966f?{'statementType':_0x5c966f}:{}};}function hasWellFormedXmlAttributes(_0x33e5be){const _0x3fa3fb=a297_0x530d6c;let _0x2f7909=0x0;const _0x132578=new Set();while(_0x2f7909<_0x33e5be[_0x3fa3fb(0x1ee)]){while(_0x2f7909<_0x33e5be[_0x3fa3fb(0x1ee)]&&/\s/[_0x3fa3fb(0x1f5)](_0x33e5be[_0x2f7909]??''))_0x2f7909+=0x1;if(_0x2f7909>=_0x33e5be[_0x3fa3fb(0x1ee)])return!![];const _0x5bab43=/^[A-Za-z_:][\w:.-]*/['exec'](_0x33e5be['slice'](_0x2f7909)),_0x18b924=_0x5bab43?.[0x0];if(!_0x18b924||_0x132578['has'](_0x18b924))return![];_0x132578[_0x3fa3fb(0x1fd)](_0x18b924),_0x2f7909+=_0x18b924['length'];while(_0x2f7909<_0x33e5be[_0x3fa3fb(0x1ee)]&&/\s/['test'](_0x33e5be[_0x2f7909]??''))_0x2f7909+=0x1;if(_0x33e5be[_0x2f7909]!=='=')return![];_0x2f7909+=0x1;while(_0x2f7909<_0x33e5be[_0x3fa3fb(0x1ee)]&&/\s/[_0x3fa3fb(0x1f5)](_0x33e5be[_0x2f7909]??''))_0x2f7909+=0x1;const _0x485a86=_0x33e5be[_0x2f7909];if(_0x485a86!=='\x22'&&_0x485a86!=='\x27')return![];_0x2f7909+=0x1;const _0x4d8472=_0x33e5be[_0x3fa3fb(0x220)](_0x485a86,_0x2f7909);if(_0x4d8472<0x0)return![];if(decodeXmlEntities(_0x33e5be[_0x3fa3fb(0x255)](_0x2f7909,_0x4d8472))===null)return![];_0x2f7909=_0x4d8472+0x1;}return!![];}export function detectSqlSourceMode(_0x5620b0){const _0x668aed=a297_0x530d6c;let _0x66836e=0x0;const _0x54c9c2=()=>{const _0xb8dd66=a297_0x29d3;while(_0x66836e<_0x5620b0[_0xb8dd66(0x1ee)]&&/\s/['test'](_0x5620b0[_0x66836e]??''))_0x66836e+=0x1;};_0x54c9c2();while(_0x66836e<_0x5620b0[_0x668aed(0x1ee)]){if(_0x5620b0[_0x668aed(0x227)]('<!--',_0x66836e)){const _0x32dcf7=_0x5620b0[_0x668aed(0x220)](_0x668aed(0x1ff),_0x66836e+0x4);if(_0x32dcf7<0x0)return _0x668aed(0x20c);_0x66836e=_0x32dcf7+0x3,_0x54c9c2();continue;}if(_0x5620b0['startsWith']('<?',_0x66836e)){const _0x45cdf8=_0x5620b0[_0x668aed(0x220)]('?>',_0x66836e+0x2);if(_0x45cdf8<0x0)return _0x668aed(0x20c);_0x66836e=_0x45cdf8+0x2,_0x54c9c2();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x668aed(0x1f5)](_0x5620b0[_0x668aed(0x255)](_0x66836e))?_0x668aed(0x20c):_0x668aed(0x218);}function invalidMybatisSource(_0x4e0859){return{'sql':'','mode':'mybatisXml','error':_0x4e0859};}function findXmlTagEnd(_0xe27ee1,_0x4e5f77){const _0x24ddd8=a297_0x530d6c;let _0x37d424;for(let _0x2c114e=_0x4e5f77+0x1;_0x2c114e<_0xe27ee1[_0x24ddd8(0x1ee)];_0x2c114e+=0x1){const _0x2739ae=_0xe27ee1[_0x2c114e];if(_0x37d424){if(_0x2739ae===_0x37d424)_0x37d424=undefined;continue;}if(_0x2739ae==='\x22'||_0x2739ae==='\x27'){_0x37d424=_0x2739ae;continue;}if(_0x2739ae==='>')return _0x2c114e;}return-0x1;}function decodeXmlEntities(_0x231c4f){let _0x470b7f=![];const _0x5d8fd9=_0x231c4f['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x24bea9=>{const _0x21188c=a297_0x29d3;if(_0x24bea9===_0x21188c(0x209))return'<';if(_0x24bea9===_0x21188c(0x246))return'>';if(_0x24bea9===_0x21188c(0x23d))return'\x22';if(_0x24bea9===''')return'\x27';if(_0x24bea9===_0x21188c(0x1fc))return'&';const _0x58de8c=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x21188c(0x1f1)](_0x24bea9);if(_0x58de8c){const _0x431d04=_0x58de8c[0x1],_0x49ecc8=_0x58de8c[0x2],_0x1de5fc=Number[_0x21188c(0x21e)](_0x431d04??_0x49ecc8??'',_0x431d04?0x10:0xa);if(isValidXmlCharacter(_0x1de5fc))return String[_0x21188c(0x257)](_0x1de5fc);}return _0x470b7f=!![],'';});return _0x470b7f?null:_0x5d8fd9;}function isValidXmlCharacter(_0x28128a){return _0x28128a===0x9||_0x28128a===0xa||_0x28128a===0xd||_0x28128a>=0x20&&_0x28128a<=0xd7ff||_0x28128a>=0xe000&&_0x28128a<=0xfffd||_0x28128a>=0x10000&&_0x28128a<=0x10ffff;}export function detectSqlType(_0xd9f55c){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0xd9f55c));}function detectNormalizedSqlType(_0x4fde51){const _0x555830=a297_0x530d6c;if(_0x4fde51['error'])return{'type':_0x555830(0x21b),'isSelectOnly':![],'isDangerous':![],'reason':_0x4fde51[_0x555830(0x1f9)]};if(!_0x4fde51[_0x555830(0x218)][_0x555830(0x1eb)]())return{'type':_0x555830(0x21b),'isSelectOnly':![],'isDangerous':![],'reason':_0x555830(0x22e)};const _0x54c239=tokenizeSqlForTypeAnalysis(_0x4fde51[_0x555830(0x218)]),_0x3eb5fc=_0x54c239[_0x555830(0x23b)](_0x54bfea=>_0x54bfea!==MYBATIS_DYNAMIC_START_MARKER&&_0x54bfea!==MYBATIS_DYNAMIC_END_MARKER),_0x4cbc40=findMainStatementIndex(_0x3eb5fc);if(_0x4cbc40<0x0)return{'type':_0x555830(0x21b),'isSelectOnly':![],'isDangerous':![],'reason':_0x555830(0x243)};const _0x1fd5dc=_0x3eb5fc[_0x4cbc40]??'',_0x128a97=_0x4fde51[_0x555830(0x240)]??_0x1fd5dc,_0x476ad8=_0x54c239[_0x555830(0x21d)](_0x20b1c3=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x555830(0x1f5)](_0x20b1c3)),_0x52ca7a=new Set();let _0x1cfb4a=![];for(let _0x1e33d4=0x0;_0x1e33d4<_0x54c239[_0x555830(0x1ee)];_0x1e33d4+=0x1){const _0x4018a3=_0x54c239[_0x1e33d4];(_0x4018a3===_0x555830(0x233)||_0x4018a3===_0x555830(0x1ed))&&isLockingClauseKeyword(_0x54c239,_0x1e33d4)&&(_0x52ca7a[_0x555830(0x1fd)](_0x1e33d4),_0x1cfb4a=!![]);if(_0x54c239[_0x555830(0x255)](_0x1e33d4,_0x1e33d4+0x4)[_0x555830(0x1f4)]('\x20')===_0x555830(0x202))_0x1cfb4a=!![];}if(_0x128a97===_0x555830(0x216)){const _0x16847e=_0x54c239[_0x555830(0x21d)]((_0xbc3761,_0x1c2fa)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x555830(0x1f5)](_0xbc3761)&&!_0x52ca7a[_0x555830(0x1fb)](_0x1c2fa));return{'type':'SELECT','isSelectOnly':!_0x16847e&&!_0x1cfb4a,'isLockingRead':_0x1cfb4a,'isDangerous':_0x16847e,'reason':_0x16847e?_0x555830(0x223):undefined};}if(_0x128a97===_0x555830(0x1f0))return{'type':_0x555830(0x1f0),'isSelectOnly':![],'isDangerous':_0x476ad8,'reason':_0x476ad8?_0x555830(0x213):undefined};if(_0x128a97===_0x555830(0x233))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x476ad8,'reason':_0x476ad8?_0x555830(0x213):undefined};if(_0x128a97==='DELETE')return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x555830(0x23c)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x555830(0x1f5)](_0x1fd5dc))return{'type':_0x555830(0x201),'isSelectOnly':![],'isDangerous':!![],'reason':_0x555830(0x20e)};return{'type':_0x555830(0x21b),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x18e9b8,_0xb8c25f){const _0x39fb7c=a297_0x530d6c,_0x16b9f2=_0x18e9b8[_0xb8c25f]===_0x39fb7c(0x233)?[[_0x39fb7c(0x221)],[_0x39fb7c(0x221),'NO',_0x39fb7c(0x228)]]:[['FOR'],['FOR',_0x39fb7c(0x228)]],_0x486e87=_0x16b9f2[_0x39fb7c(0x21d)](_0x3e0dc8=>{const _0xb0c0a2=_0x39fb7c,_0x44b5c6=_0xb8c25f-_0x3e0dc8[_0xb0c0a2(0x1ee)];return _0x44b5c6>=0x0&&_0x18e9b8[_0xb0c0a2(0x255)](_0x44b5c6,_0xb8c25f)[_0xb0c0a2(0x1f4)]('\x20')===_0x3e0dc8['join']('\x20');});if(!_0x486e87)return![];return!_0x18e9b8[_0x39fb7c(0x255)](_0xb8c25f+0x1,_0xb8c25f+0x5)['includes'](_0x39fb7c(0x20b));}function findMainStatementIndex(_0x3b92d6){const _0x36df70=a297_0x530d6c;if(_0x3b92d6[0x0]!=='WITH')return 0x0;let _0x294d22=_0x3b92d6[0x1]===_0x36df70(0x20f)?0x2:0x1;while(_0x294d22<_0x3b92d6[_0x36df70(0x1ee)]){const _0x3bfb9f=_0x3b92d6[_0x294d22];if(!_0x3bfb9f||!(/^[A-Z_][\w$]*$/['test'](_0x3bfb9f)||/^[`"]/['test'](_0x3bfb9f)))return-0x1;_0x294d22+=0x1;if(_0x3b92d6[_0x294d22]==='('){_0x294d22=skipSqlParentheses(_0x3b92d6,_0x294d22);if(_0x294d22<0x0)return-0x1;}if(_0x3b92d6[_0x294d22]!=='AS')return-0x1;_0x294d22+=0x1;if(_0x3b92d6[_0x294d22]===_0x36df70(0x200)&&_0x3b92d6[_0x294d22+0x1]===_0x36df70(0x1fe))_0x294d22+=0x2;else{if(_0x3b92d6[_0x294d22]==='MATERIALIZED')_0x294d22+=0x1;}_0x294d22=skipSqlParentheses(_0x3b92d6,_0x294d22);if(_0x294d22<0x0)return-0x1;if(_0x3b92d6[_0x294d22]!==','){const _0x2500da=_0x3b92d6[_0x294d22]==='('?_0x294d22+0x1:_0x294d22;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x36df70(0x1f5)](_0x3b92d6[_0x2500da]??'')?_0x2500da:-0x1;}_0x294d22+=0x1;}return-0x1;}function skipSqlParentheses(_0x1eb043,_0x473deb){const _0x31a2fb=a297_0x530d6c;if(_0x1eb043[_0x473deb]!=='(')return-0x1;let _0x58d132=0x0;for(let _0xb23562=_0x473deb;_0xb23562<_0x1eb043[_0x31a2fb(0x1ee)];_0xb23562+=0x1){const _0x3cd897=_0x1eb043[_0xb23562];if(_0x3cd897===';')return-0x1;if(_0x3cd897==='(')_0x58d132+=0x1;if(_0x3cd897===')'&&--_0x58d132===0x0)return _0xb23562+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x4be66f){const _0x1bda68=a297_0x530d6c;return _0x4be66f[_0x1bda68(0x236)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1bda68(0x236)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x1bda68(0x236)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x5d39f4){const _0x4e2119=a297_0x530d6c,_0x25fe91=[],_0xaa4248=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x5e4563 of _0x5d39f4[_0x4e2119(0x1f8)](_0xaa4248)){const _0x26ae91=_0x5e4563[0x0];if(_0x26ae91[_0x4e2119(0x227)]('/*')||_0x26ae91[_0x4e2119(0x227)]('--')||_0x26ae91['startsWith']('#')&&!_0x26ae91['startsWith']('#{'))continue;_0x25fe91[_0x4e2119(0x254)](/^["`]/[_0x4e2119(0x1f5)](_0x26ae91)?_0x26ae91:/^[\x27@#$]/['test'](_0x26ae91)?'?':_0x26ae91['toUpperCase']());}return _0x25fe91;}function a297_0x5390(){const _0x126f9c=['push','slice','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','fromCodePoint','isDangerous','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','type','update','trim','\x20SET\x20','SHARE','length','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','INSERT','exec','19112RlUluH','select','join','test','3670219HYBJCi','includes','matchAll','error','delete','has','&','add','MATERIALIZED','-->','NOT','DDL','LOCK\x20IN\x20SHARE\x20MODE','\x20with\x20parameters:\x20','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','toLowerCase','6183AaZkqE','387051jYIkIx','<','2186327RGIiSY','SET','mybatisXml','property','DDL\x20statements\x20require\x20explicit\x20review','RECURSIVE','where','pop','Unterminated\x20XML\x20declaration.','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','set','<![CDATA[','SELECT','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','sql','60MSLbzm','rawName','UNKNOWN','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','some','parseInt','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','indexOf','FOR','string','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','Unterminated\x20XML\x20comment.','7930650zKYHWd','\x20query\x20targeting\x20','startsWith','KEY','when','outer','<!--','from','replace','SQL\x20content\x20is\x20empty','otherwise','keys',']]>','28qacruK','UPDATE','bind','2GfOtBZ','replaceAll','reason','choose','184076ABMMBb','Invalid\x20MyBatis\x20XML\x20tag.','filter','DELETE\x20statements\x20require\x20explicit\x20review','"','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','match','statementType','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','foreach','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','8082765FqqGKP','>','Invalid\x20XML\x20entity\x20reference.','__RABETBASE_MYBATIS_DYNAMIC_END__','unknown\x20table(s)','Unterminated\x20MyBatis\x20XML\x20tag.','\x20WHERE\x20','tagName','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','Unable\x20to\x20detect\x20SQL\x20type.\x20','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Unterminated\x20CDATA\x20section.','DELETE','__RABETBASE_MYBATIS_DYNAMIC_START__','include'];a297_0x5390=function(){return _0x126f9c;};return a297_0x5390();}function extractTables(_0x24701d,_0x223d32){const _0x4733f7=a297_0x530d6c,_0x3fb79e=_0x24701d[_0x4733f7(0x22d)](/#\{[^}]*\}/g,'?')[_0x4733f7(0x22d)](/\$\{[^}]*\}/g,'?')[_0x4733f7(0x22d)](/'[^']*'/g,'\x27\x27')[_0x4733f7(0x22d)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x1fb8a5=[],_0x1b9f2f=_0x3fb79e[_0x4733f7(0x23f)](/FROM\s+([^\s,)(]+)/i);addTable(_0x1fb8a5,_0x1b9f2f?.[0x1]);for(const _0x225251 of _0x3fb79e[_0x4733f7(0x1f8)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x1fb8a5,_0x225251[0x1]);}const _0xdf9902=_0x3fb79e['match'](/INTO\s+([^\s(]+)/i);addTable(_0x1fb8a5,_0xdf9902?.[0x1]);if(_0x223d32===_0x4733f7(0x233)){const _0x483c6b=_0x3fb79e['match'](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x1fb8a5,_0x483c6b?.[0x1]);}return _0x1fb8a5;}function addTable(_0x268461,_0x220400){const _0x486875=a297_0x530d6c,_0x62ca1=_0x220400?.['replace'](/[`"]/g,'');_0x62ca1&&_0x62ca1!==UNRESOLVED_SQL_FRAGMENT&&!_0x268461[_0x486875(0x1f7)](_0x62ca1)&&_0x268461[_0x486875(0x254)](_0x62ca1);}function extractParameters(_0x3034ae){const _0x4b7bcd=a297_0x530d6c,_0x5f5575=new Set();for(const _0x110961 of _0x3034ae[_0x4b7bcd(0x1f8)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x110961[0x1])_0x5f5575[_0x4b7bcd(0x1fd)](_0x110961[0x1]);}return Array[_0x4b7bcd(0x22c)](_0x5f5575);}export function validateSql(_0x52d0c7){const _0xb71b84=a297_0x530d6c,_0x2e7835=normalizeSqlForStaticAnalysis(_0x52d0c7),_0x5bdfe7=detectNormalizedSqlType(_0x2e7835),_0x1e4438=stripStaticAnalysisMarkers(_0x2e7835['sql']),_0x4a9b40=_0x2e7835[_0xb71b84(0x1f9)]?[]:extractTables(_0x1e4438,_0x5bdfe7[_0xb71b84(0x1e9)]),_0x50de8b=_0x2e7835[_0xb71b84(0x1f9)]?[]:extractParameters(_0x1e4438);if(_0x5bdfe7[_0xb71b84(0x1e7)])return{'valid':![],'sqlType':_0x5bdfe7,'tables':_0x4a9b40,'parameters':_0x50de8b,'message':_0x5bdfe7['reason']||_0x5bdfe7[_0xb71b84(0x1e9)]+_0xb71b84(0x205)};if(_0x5bdfe7[_0xb71b84(0x1e9)]===_0xb71b84(0x21b))return{'valid':![],'sqlType':_0x5bdfe7,'tables':_0x4a9b40,'parameters':_0x50de8b,'message':_0x2e7835['error']?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x2e7835['error']:_0x5bdfe7[_0xb71b84(0x237)]?_0xb71b84(0x24e)+_0x5bdfe7['reason']:_0xb71b84(0x241)};return{'valid':!![],'sqlType':_0x5bdfe7,'tables':_0x4a9b40,'parameters':_0x50de8b,'message':_0x5bdfe7[_0xb71b84(0x1e9)]+_0xb71b84(0x226)+(_0x4a9b40[_0xb71b84(0x1ee)]?_0x4a9b40[_0xb71b84(0x1f4)](',\x20'):_0xb71b84(0x249))+(_0x50de8b[_0xb71b84(0x1ee)]?_0xb71b84(0x203)+_0x50de8b[_0xb71b84(0x1f4)](',\x20'):'')};}
|
|
1
|
+
const a297_0x112381=a297_0x5a06;(function(_0x2371f7,_0x10617c){const _0x30d972=a297_0x5a06,_0x4b6af1=_0x2371f7();while(!![]){try{const _0x30cc72=-parseInt(_0x30d972(0xa9))/0x1*(parseInt(_0x30d972(0x95))/0x2)+parseInt(_0x30d972(0xe4))/0x3*(parseInt(_0x30d972(0xd0))/0x4)+parseInt(_0x30d972(0xab))/0x5+parseInt(_0x30d972(0xe5))/0x6*(-parseInt(_0x30d972(0xbd))/0x7)+parseInt(_0x30d972(0xe1))/0x8+parseInt(_0x30d972(0xb6))/0x9*(-parseInt(_0x30d972(0xb4))/0xa)+parseInt(_0x30d972(0xdb))/0xb;if(_0x30cc72===_0x10617c)break;else _0x4b6af1['push'](_0x4b6af1['shift']());}catch(_0x3d54e4){_0x4b6af1['push'](_0x4b6af1['shift']());}}}(a297_0x59a5,0xbb97f));const MYBATIS_OUTER_TAGS=new Map([[a297_0x112381(0xa5),a297_0x112381(0xe9)],[a297_0x112381(0xa3),a297_0x112381(0x9a)],[a297_0x112381(0x9b),a297_0x112381(0xe6)],[a297_0x112381(0xf0),'DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a297_0x112381(0xd1),a297_0x112381(0xdd),a297_0x112381(0xda),a297_0x112381(0xf5),a297_0x112381(0x96),a297_0x112381(0xba),a297_0x112381(0xc1),'bind',a297_0x112381(0xc9),a297_0x112381(0x9f)]),MYBATIS_BRANCH_TAGS=new Set(['if',a297_0x112381(0xdd),'choose','when',a297_0x112381(0x96)]);export const MYBATIS_DYNAMIC_START_MARKER=a297_0x112381(0xea);export const MYBATIS_DYNAMIC_END_MARKER=a297_0x112381(0xe7);export const MYBATIS_INCLUDE_MARKER=a297_0x112381(0xc2);const UNRESOLVED_SQL_FRAGMENT=a297_0x112381(0xe2),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a297_0x112381(0xfe)+[...MYBATIS_OUTER_TAGS[a297_0x112381(0xbf)]()][a297_0x112381(0xc3)]('|')+a297_0x112381(0xa6),'i');export function normalizeSqlForStaticAnalysis(_0x1b2cd7){const _0x355409=a297_0x112381,_0x729f7b=typeof _0x1b2cd7===_0x355409(0xf1)?_0x1b2cd7:'';if(detectSqlSourceMode(_0x729f7b)===_0x355409(0xec))return{'sql':_0x729f7b,'mode':_0x355409(0xec)};let _0x1d705a=0x0,_0x3360ee='',_0x35016a,_0x48a7a2=![],_0x2f15a7=![];const _0x521e36=[];while(_0x1d705a<_0x729f7b[_0x355409(0xbb)]){if(_0x729f7b[_0x355409(0xdf)](_0x355409(0x9d),_0x1d705a)){const _0x3ea524=_0x729f7b['indexOf']('-->',_0x1d705a+0x4);if(_0x3ea524<0x0)return invalidMybatisSource(_0x355409(0xd9));_0x3360ee+='\x20',_0x1d705a=_0x3ea524+0x3;continue;}if(_0x729f7b[_0x355409(0xdf)](_0x355409(0xeb),_0x1d705a)){if(!_0x48a7a2||_0x2f15a7)return invalidMybatisSource(_0x355409(0xcd));const _0x4c0341=_0x729f7b[_0x355409(0xf4)](_0x355409(0xaf),_0x1d705a+0x9);if(_0x4c0341<0x0)return invalidMybatisSource(_0x355409(0x98));_0x3360ee+=_0x729f7b[_0x355409(0x9e)](_0x1d705a+0x9,_0x4c0341),_0x1d705a=_0x4c0341+0x3;continue;}if(_0x729f7b['startsWith']('<?',_0x1d705a)){if(_0x48a7a2)return invalidMybatisSource(_0x355409(0xf3));const _0x4ed773=_0x729f7b[_0x355409(0xf4)]('?>',_0x1d705a+0x2);if(_0x4ed773<0x0)return invalidMybatisSource(_0x355409(0xa2));_0x3360ee+='\x20',_0x1d705a=_0x4ed773+0x2;continue;}if(_0x729f7b[_0x1d705a]!=='<'){const _0x555846=_0x729f7b[_0x355409(0xf4)]('<',_0x1d705a),_0x1b9724=_0x555846<0x0?_0x729f7b[_0x355409(0xbb)]:_0x555846,_0x16ce42=_0x729f7b[_0x355409(0x9e)](_0x1d705a,_0x1b9724);if((!_0x48a7a2||_0x2f15a7)&&_0x16ce42[_0x355409(0xba)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x48a7a2&&!_0x2f15a7){const _0x11f6cc=decodeXmlEntities(_0x16ce42);if(_0x11f6cc===null)return invalidMybatisSource(_0x355409(0xf2));_0x3360ee+=_0x11f6cc;}else _0x3360ee+='\x20';_0x1d705a=_0x1b9724;continue;}const _0x5bc3f4=findXmlTagEnd(_0x729f7b,_0x1d705a);if(_0x5bc3f4<0x0)return invalidMybatisSource(_0x355409(0xc8));const _0x16bf72=_0x729f7b[_0x355409(0x9e)](_0x1d705a,_0x5bc3f4+0x1),_0x30e7f3=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x355409(0xfb)](_0x16bf72);if(!_0x30e7f3)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x4f2973=_0x30e7f3[0x1]==='/',_0x418e2d=_0x30e7f3[0x2]??'',_0x1d9076=_0x418e2d['toLowerCase'](),_0x418b29=_0x30e7f3[0x3]??'',_0x22e18e=_0x30e7f3[0x4]==='/',_0x35cb1b=MYBATIS_OUTER_TAGS[_0x355409(0xa4)](_0x1d9076);if(!_0x35cb1b&&!MYBATIS_DYNAMIC_TAGS['has'](_0x1d9076))return invalidMybatisSource('Unsupported\x20MyBatis\x20XML\x20tag:\x20<'+_0x1d9076+'>.');if(!_0x35cb1b&&_0x418e2d!==_0x1d9076)return invalidMybatisSource(_0x355409(0xd4)+_0x418e2d+'>.');if(_0x4f2973){if(_0x418b29[_0x355409(0xba)]()||_0x22e18e)return invalidMybatisSource(_0x355409(0xaa)+_0x418e2d+'>.');const _0x4117b7=_0x521e36['at'](-0x1);if(!_0x4117b7||(_0x4117b7[_0x355409(0xc6)]?_0x4117b7['tagName']!==_0x1d9076:_0x4117b7['rawName']!==_0x418e2d))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x418e2d+'>.');_0x521e36['pop']();if(_0x4117b7[_0x355409(0xc6)])_0x2f15a7=!![];_0x3360ee+=MYBATIS_BRANCH_TAGS[_0x355409(0xdc)](_0x1d9076)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x418b29))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x418e2d+'>.');if(_0x1d9076===_0x355409(0x9f)&&(!_0x22e18e||_0x521e36['at'](-0x1)?.[_0x355409(0xad)]!==_0x355409(0xc9)))return invalidMybatisSource(_0x355409(0xc0));if(_0x35cb1b){if(_0x48a7a2||_0x521e36[_0x355409(0xbb)]>0x0)return invalidMybatisSource(_0x355409(0x9c));_0x48a7a2=!![],_0x2f15a7=_0x22e18e,_0x35016a=_0x35cb1b;}else{if(!_0x48a7a2||_0x2f15a7)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<'+_0x418e2d+'>.');}_0x3360ee+=_0x1d9076===_0x355409(0xd1)?_0x355409(0xca):_0x1d9076==='set'?_0x355409(0xd2):_0x1d9076===_0x355409(0xc9)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x355409(0xdc)](_0x1d9076)&&!_0x22e18e?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x22e18e&&_0x521e36[_0x355409(0xa0)]({'rawName':_0x418e2d,'tagName':_0x1d9076,'outer':!!_0x35cb1b});}_0x1d705a=_0x5bc3f4+0x1;}if(_0x521e36['length']>0x0)return invalidMybatisSource(_0x355409(0xb7)+_0x521e36['at'](-0x1)?.[_0x355409(0xb5)]+'>.');if(!_0x48a7a2||!_0x2f15a7)return invalidMybatisSource(_0x355409(0xf8));return{'sql':_0x3360ee[_0x355409(0xba)](),'mode':'mybatisXml',..._0x35016a?{'statementType':_0x35016a}:{}};}function hasWellFormedXmlAttributes(_0x4fecde){const _0x128517=a297_0x112381;let _0x137fd4=0x0;const _0x316bf0=new Set();while(_0x137fd4<_0x4fecde[_0x128517(0xbb)]){while(_0x137fd4<_0x4fecde[_0x128517(0xbb)]&&/\s/[_0x128517(0xe3)](_0x4fecde[_0x137fd4]??''))_0x137fd4+=0x1;if(_0x137fd4>=_0x4fecde[_0x128517(0xbb)])return!![];const _0x243b6a=/^[A-Za-z_:][\w:.-]*/[_0x128517(0xfb)](_0x4fecde[_0x128517(0x9e)](_0x137fd4)),_0x284c29=_0x243b6a?.[0x0];if(!_0x284c29||_0x316bf0[_0x128517(0xdc)](_0x284c29))return![];_0x316bf0[_0x128517(0xbc)](_0x284c29),_0x137fd4+=_0x284c29['length'];while(_0x137fd4<_0x4fecde['length']&&/\s/[_0x128517(0xe3)](_0x4fecde[_0x137fd4]??''))_0x137fd4+=0x1;if(_0x4fecde[_0x137fd4]!=='=')return![];_0x137fd4+=0x1;while(_0x137fd4<_0x4fecde['length']&&/\s/[_0x128517(0xe3)](_0x4fecde[_0x137fd4]??''))_0x137fd4+=0x1;const _0x155c95=_0x4fecde[_0x137fd4];if(_0x155c95!=='\x22'&&_0x155c95!=='\x27')return![];_0x137fd4+=0x1;const _0x36598f=_0x4fecde['indexOf'](_0x155c95,_0x137fd4);if(_0x36598f<0x0)return![];if(decodeXmlEntities(_0x4fecde[_0x128517(0x9e)](_0x137fd4,_0x36598f))===null)return![];_0x137fd4=_0x36598f+0x1;}return!![];}export function detectSqlSourceMode(_0xbe02e4){const _0x37abb3=a297_0x112381;let _0x2ed980=0x0;const _0x560390=()=>{while(_0x2ed980<_0xbe02e4['length']&&/\s/['test'](_0xbe02e4[_0x2ed980]??''))_0x2ed980+=0x1;};_0x560390();while(_0x2ed980<_0xbe02e4[_0x37abb3(0xbb)]){if(_0xbe02e4[_0x37abb3(0xdf)](_0x37abb3(0x9d),_0x2ed980)){const _0x14fc57=_0xbe02e4[_0x37abb3(0xf4)](_0x37abb3(0xcf),_0x2ed980+0x4);if(_0x14fc57<0x0)return'mybatisXml';_0x2ed980=_0x14fc57+0x3,_0x560390();continue;}if(_0xbe02e4[_0x37abb3(0xdf)]('<?',_0x2ed980)){const _0x156728=_0xbe02e4[_0x37abb3(0xf4)]('?>',_0x2ed980+0x2);if(_0x156728<0x0)return'mybatisXml';_0x2ed980=_0x156728+0x2,_0x560390();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x37abb3(0xe3)](_0xbe02e4[_0x37abb3(0x9e)](_0x2ed980))?_0x37abb3(0xb0):'sql';}function invalidMybatisSource(_0x2f3f84){const _0x1f76fb=a297_0x112381;return{'sql':'','mode':_0x1f76fb(0xb0),'error':_0x2f3f84};}function findXmlTagEnd(_0x4a4ecc,_0x8727db){const _0x38541f=a297_0x112381;let _0x12d283;for(let _0x3c27c5=_0x8727db+0x1;_0x3c27c5<_0x4a4ecc[_0x38541f(0xbb)];_0x3c27c5+=0x1){const _0x2b63b8=_0x4a4ecc[_0x3c27c5];if(_0x12d283){if(_0x2b63b8===_0x12d283)_0x12d283=undefined;continue;}if(_0x2b63b8==='\x22'||_0x2b63b8==='\x27'){_0x12d283=_0x2b63b8;continue;}if(_0x2b63b8==='>')return _0x3c27c5;}return-0x1;}function decodeXmlEntities(_0x1b5959){const _0x39a623=a297_0x112381;let _0x5be4e5=![];const _0x25b5a4=_0x1b5959[_0x39a623(0x97)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x55a2a7=>{const _0x234d51=_0x39a623;if(_0x55a2a7===_0x234d51(0xd6))return'<';if(_0x55a2a7==='>')return'>';if(_0x55a2a7===_0x234d51(0xfc))return'\x22';if(_0x55a2a7===_0x234d51(0xf7))return'\x27';if(_0x55a2a7==='&')return'&';const _0x189aec=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x55a2a7);if(_0x189aec){const _0x537153=_0x189aec[0x1],_0x58c541=_0x189aec[0x2],_0x288cdc=Number[_0x234d51(0xce)](_0x537153??_0x58c541??'',_0x537153?0x10:0xa);if(isValidXmlCharacter(_0x288cdc))return String[_0x234d51(0xb3)](_0x288cdc);}return _0x5be4e5=!![],'';});return _0x5be4e5?null:_0x25b5a4;}function isValidXmlCharacter(_0x2e3060){return _0x2e3060===0x9||_0x2e3060===0xa||_0x2e3060===0xd||_0x2e3060>=0x20&&_0x2e3060<=0xd7ff||_0x2e3060>=0xe000&&_0x2e3060<=0xfffd||_0x2e3060>=0x10000&&_0x2e3060<=0x10ffff;}function a297_0x5a06(_0x2d02b1,_0x2b7c20){_0x2d02b1=_0x2d02b1-0x95;const _0x59a578=a297_0x59a5();let _0x5a062b=_0x59a578[_0x2d02b1];return _0x5a062b;}export function detectSqlType(_0x5bda37){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x5bda37));}function detectNormalizedSqlType(_0xfd41ad){const _0x10c456=a297_0x112381;if(_0xfd41ad[_0x10c456(0xf9)])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0xfd41ad[_0x10c456(0xf9)]};if(!_0xfd41ad[_0x10c456(0xec)][_0x10c456(0xba)]())return{'type':_0x10c456(0xd5),'isSelectOnly':![],'isDangerous':![],'reason':_0x10c456(0xef)};const _0x3302f0=tokenizeSqlForTypeAnalysis(_0xfd41ad[_0x10c456(0xec)]),_0x5abb0d=_0x3302f0[_0x10c456(0xc4)](_0x45dda4=>_0x45dda4!==MYBATIS_DYNAMIC_START_MARKER&&_0x45dda4!==MYBATIS_DYNAMIC_END_MARKER),_0x357efd=findMainStatementIndex(_0x5abb0d);if(_0x357efd<0x0)return{'type':_0x10c456(0xd5),'isSelectOnly':![],'isDangerous':![],'reason':_0x10c456(0xa1)};const _0x53bebf=_0x5abb0d[_0x357efd]??'',_0x74d56f=_0xfd41ad[_0x10c456(0xd8)]??_0x53bebf,_0x19c3e8=_0x3302f0[_0x10c456(0xd3)](_0x335a81=>/^(DELETE|DROP|ALTER|CREATE|TRUNCATE)$/['test'](_0x335a81)),_0x466cdb=new Set();let _0x127dc3=![];for(let _0x1049e2=0x0;_0x1049e2<_0x3302f0[_0x10c456(0xbb)];_0x1049e2+=0x1){const _0x4471a8=_0x3302f0[_0x1049e2];(_0x4471a8==='UPDATE'||_0x4471a8===_0x10c456(0xbe))&&isLockingClauseKeyword(_0x3302f0,_0x1049e2)&&(_0x466cdb['add'](_0x1049e2),_0x127dc3=!![]);if(_0x3302f0['slice'](_0x1049e2,_0x1049e2+0x4)[_0x10c456(0xc3)]('\x20')===_0x10c456(0xb8))_0x127dc3=!![];}if(_0x74d56f==='SELECT'){const _0x4df48d=_0x3302f0[_0x10c456(0xd3)]((_0x15de3c,_0x51d03e)=>/^(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)$/[_0x10c456(0xe3)](_0x15de3c)&&!_0x466cdb[_0x10c456(0xdc)](_0x51d03e));return{'type':_0x10c456(0xe9),'isSelectOnly':!_0x4df48d&&!_0x127dc3,'isLockingRead':_0x127dc3,'isDangerous':_0x4df48d,'reason':_0x4df48d?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x74d56f===_0x10c456(0x9a))return{'type':_0x10c456(0x9a),'isSelectOnly':![],'isDangerous':_0x19c3e8,'reason':_0x19c3e8?_0x10c456(0xde):undefined};if(_0x74d56f===_0x10c456(0xe6))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x19c3e8,'reason':_0x19c3e8?_0x10c456(0xde):undefined};if(_0x74d56f==='DELETE')return{'type':_0x10c456(0xfd),'isSelectOnly':![],'isDangerous':!![],'reason':_0x10c456(0xcc)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x10c456(0xe3)](_0x53bebf))return{'type':'DDL','isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20require\x20explicit\x20review'};return{'type':_0x10c456(0xd5),'isSelectOnly':![],'isDangerous':![]};}function isLockingClauseKeyword(_0x12de91,_0x1e65b3){const _0x2643e8=a297_0x112381,_0x56ae39=_0x12de91[_0x1e65b3]===_0x2643e8(0xe6)?[[_0x2643e8(0xf6)],[_0x2643e8(0xf6),'NO',_0x2643e8(0xe8)]]:[[_0x2643e8(0xf6)],[_0x2643e8(0xf6),_0x2643e8(0xe8)]],_0x596e41=_0x56ae39[_0x2643e8(0xd3)](_0x102d02=>{const _0x3b8693=_0x2643e8,_0x46d71f=_0x1e65b3-_0x102d02['length'];return _0x46d71f>=0x0&&_0x12de91[_0x3b8693(0x9e)](_0x46d71f,_0x1e65b3)[_0x3b8693(0xc3)]('\x20')===_0x102d02[_0x3b8693(0xc3)]('\x20');});if(!_0x596e41)return![];return!_0x12de91[_0x2643e8(0x9e)](_0x1e65b3+0x1,_0x1e65b3+0x5)['includes'](_0x2643e8(0xb9));}function findMainStatementIndex(_0x452b4f){const _0x16d7cd=a297_0x112381;if(_0x452b4f[0x0]!=='WITH')return 0x0;let _0x2e44d8=_0x452b4f[0x1]===_0x16d7cd(0xed)?0x2:0x1;while(_0x2e44d8<_0x452b4f['length']){const _0xa6eb23=_0x452b4f[_0x2e44d8];if(!_0xa6eb23||!(/^[A-Z_][\w$]*$/[_0x16d7cd(0xe3)](_0xa6eb23)||/^[`"]/[_0x16d7cd(0xe3)](_0xa6eb23)))return-0x1;_0x2e44d8+=0x1;if(_0x452b4f[_0x2e44d8]==='('){_0x2e44d8=skipSqlParentheses(_0x452b4f,_0x2e44d8);if(_0x2e44d8<0x0)return-0x1;}if(_0x452b4f[_0x2e44d8]!=='AS')return-0x1;_0x2e44d8+=0x1;if(_0x452b4f[_0x2e44d8]===_0x16d7cd(0xd7)&&_0x452b4f[_0x2e44d8+0x1]===_0x16d7cd(0xcb))_0x2e44d8+=0x2;else{if(_0x452b4f[_0x2e44d8]==='MATERIALIZED')_0x2e44d8+=0x1;}_0x2e44d8=skipSqlParentheses(_0x452b4f,_0x2e44d8);if(_0x2e44d8<0x0)return-0x1;if(_0x452b4f[_0x2e44d8]!==','){const _0x1d0c1b=_0x452b4f[_0x2e44d8]==='('?_0x2e44d8+0x1:_0x2e44d8;return/^(SELECT|INSERT|UPDATE|DELETE)$/[_0x16d7cd(0xe3)](_0x452b4f[_0x1d0c1b]??'')?_0x1d0c1b:-0x1;}_0x2e44d8+=0x1;}return-0x1;}function skipSqlParentheses(_0x1bff44,_0x37a478){const _0x3aaaba=a297_0x112381;if(_0x1bff44[_0x37a478]!=='(')return-0x1;let _0x2e4927=0x0;for(let _0x1a3d6d=_0x37a478;_0x1a3d6d<_0x1bff44[_0x3aaaba(0xbb)];_0x1a3d6d+=0x1){const _0x389498=_0x1bff44[_0x1a3d6d];if(_0x389498===';')return-0x1;if(_0x389498==='(')_0x2e4927+=0x1;if(_0x389498===')'&&--_0x2e4927===0x0)return _0x1a3d6d+0x1;}return-0x1;}function stripStaticAnalysisMarkers(_0x4fef1e){const _0x53f370=a297_0x112381;return _0x4fef1e[_0x53f370(0xa8)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x53f370(0xa8)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x53f370(0xa8)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function tokenizeSqlForTypeAnalysis(_0x5e8b3f){const _0x28e776=a297_0x112381,_0x332286=[],_0x1b8f04=/\/\*[\s\S]*?\*\/|--[^\r\n]*|[#$]\{[^}]*\}|#[^\r\n]*|'(?:''|\\[\s\S]|[^'\\])*'|"(?:""|\\[\s\S]|[^"\\])*"|`(?:``|\\[\s\S]|[^`\\])*`|@[A-Za-z_]\w*|[A-Za-z_]\w*|\S/g;for(const _0x506b11 of _0x5e8b3f['matchAll'](_0x1b8f04)){const _0x16428b=_0x506b11[0x0];if(_0x16428b[_0x28e776(0xdf)]('/*')||_0x16428b['startsWith']('--')||_0x16428b['startsWith']('#')&&!_0x16428b[_0x28e776(0xdf)]('#{'))continue;_0x332286['push'](/^["`]/[_0x28e776(0xe3)](_0x16428b)?_0x16428b:/^[\x27@#$]/['test'](_0x16428b)?'?':_0x16428b[_0x28e776(0xfa)]());}return _0x332286;}function extractTables(_0x5e0d27,_0x146f9c){const _0x36649a=a297_0x112381,_0xfd13bb=_0x5e0d27[_0x36649a(0x97)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x36649a(0x97)](/'[^']*'/g,'\x27\x27')[_0x36649a(0x97)](/--.*$/gm,'')[_0x36649a(0x97)](/\/\*[\s\S]*?\*\//g,''),_0x560f71=[],_0x4ba1d9=_0xfd13bb[_0x36649a(0xae)](/FROM\s+([^\s,)(]+)/i);addTable(_0x560f71,_0x4ba1d9?.[0x1]);for(const _0x89d95 of _0xfd13bb[_0x36649a(0xc5)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x560f71,_0x89d95[0x1]);}const _0x9ff2ed=_0xfd13bb[_0x36649a(0xae)](/INTO\s+([^\s(]+)/i);addTable(_0x560f71,_0x9ff2ed?.[0x1]);if(_0x146f9c===_0x36649a(0xe6)){const _0x8b60be=_0xfd13bb[_0x36649a(0xae)](/UPDATE\s+([^\s,)(]+)/i);addTable(_0x560f71,_0x8b60be?.[0x1]);}return _0x560f71;}function a297_0x59a5(){const _0x26fa14=['LOCK\x20IN\x20SHARE\x20MODE','SET','trim','length','add','29365sRABpc','SHARE','keys','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','set','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','join','filter','matchAll','outer','Unable\x20to\x20detect\x20SQL\x20type.\x20','Unterminated\x20MyBatis\x20XML\x20tag.','include','\x20WHERE\x20','MATERIALIZED','DELETE\x20statements\x20require\x20explicit\x20review','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','parseInt','-->','3726452mhBWrZ','where','\x20SET\x20','some','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','UNKNOWN','<','NOT','statementType','Unterminated\x20XML\x20comment.','choose','6609724cqmkus','has','foreach','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','startsWith','isDangerous','5789008GyZbxH','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','test','3nkJjGG','732zxjcmu','UPDATE','__RABETBASE_MYBATIS_DYNAMIC_END__','KEY','SELECT','__RABETBASE_MYBATIS_DYNAMIC_START__','<![CDATA[','sql','RECURSIVE','\x20statements\x20require\x20explicit\x20review.\x20Local\x20analysis\x20does\x20not\x20authorize\x20saving\x20or\x20execution.','SQL\x20content\x20is\x20empty','delete','string','Invalid\x20XML\x20entity\x20reference.','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','indexOf','when','FOR',''','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','error','toUpperCase','exec','"','DELETE','^<\x5cs*(?:','2752DfZDdx','otherwise','replace','Unterminated\x20CDATA\x20section.','\x20query\x20targeting\x20','INSERT','update','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','<!--','slice','property','push','Local\x20analysis\x20could\x20not\x20parse\x20the\x20WITH\x20prefix;\x20this\x20is\x20a\x20local\x20capability\x20limit,\x20not\x20a\x20platform\x20rejection.','Unterminated\x20XML\x20declaration.','insert','get','select',')\x5cb','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','replaceAll','770dLUkFa','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','5005535SRWjPm','type','tagName','match',']]>','mybatisXml','includes','reason','fromCodePoint','10UhQNDC','rawName','8257833IAmszM','Unclosed\x20MyBatis\x20XML\x20tag:\x20<'];a297_0x59a5=function(){return _0x26fa14;};return a297_0x59a5();}function addTable(_0x3df427,_0x3d10d9){const _0x2bf30e=a297_0x112381,_0xd63ef2=_0x3d10d9?.[_0x2bf30e(0x97)](/[`"]/g,'');_0xd63ef2&&_0xd63ef2!==UNRESOLVED_SQL_FRAGMENT&&!_0x3df427[_0x2bf30e(0xb1)](_0xd63ef2)&&_0x3df427['push'](_0xd63ef2);}function extractParameters(_0x43151c){const _0x2e9eeb=a297_0x112381,_0x306193=new Set();for(const _0x48e6a5 of _0x43151c[_0x2e9eeb(0xc5)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x48e6a5[0x1])_0x306193[_0x2e9eeb(0xbc)](_0x48e6a5[0x1]);}return Array['from'](_0x306193);}export function validateSql(_0x384757){const _0x3e18eb=a297_0x112381,_0x5a2807=normalizeSqlForStaticAnalysis(_0x384757),_0x69f22f=detectNormalizedSqlType(_0x5a2807),_0x488f44=stripStaticAnalysisMarkers(_0x5a2807[_0x3e18eb(0xec)]),_0x1dcc2e=_0x5a2807[_0x3e18eb(0xf9)]?[]:extractTables(_0x488f44,_0x69f22f[_0x3e18eb(0xac)]),_0x4a8b64=_0x5a2807['error']?[]:extractParameters(_0x488f44);if(_0x69f22f[_0x3e18eb(0xe0)])return{'valid':![],'sqlType':_0x69f22f,'tables':_0x1dcc2e,'parameters':_0x4a8b64,'message':_0x69f22f[_0x3e18eb(0xb2)]||_0x69f22f[_0x3e18eb(0xac)]+_0x3e18eb(0xee)};if(_0x69f22f[_0x3e18eb(0xac)]===_0x3e18eb(0xd5))return{'valid':![],'sqlType':_0x69f22f,'tables':_0x1dcc2e,'parameters':_0x4a8b64,'message':_0x5a2807[_0x3e18eb(0xf9)]?_0x3e18eb(0xc7)+_0x5a2807[_0x3e18eb(0xf9)]:_0x69f22f[_0x3e18eb(0xb2)]?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x69f22f['reason']:_0x3e18eb(0xa7)};return{'valid':!![],'sqlType':_0x69f22f,'tables':_0x1dcc2e,'parameters':_0x4a8b64,'message':_0x69f22f[_0x3e18eb(0xac)]+_0x3e18eb(0x99)+(_0x1dcc2e[_0x3e18eb(0xbb)]?_0x1dcc2e[_0x3e18eb(0xc3)](',\x20'):'unknown\x20table(s)')+(_0x4a8b64['length']?'\x20with\x20parameters:\x20'+_0x4a8b64[_0x3e18eb(0xc3)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a298_0x501434=a298_0x256d;(function(_0x1b8fdf,_0x509c64){const _0x1f6514=a298_0x256d,_0x642e4c=_0x1b8fdf();while(!![]){try{const _0x341fc9=parseInt(_0x1f6514(0x12f))/0x1+-parseInt(_0x1f6514(0x134))/0x2*(parseInt(_0x1f6514(0x124))/0x3)+parseInt(_0x1f6514(0x122))/0x4+-parseInt(_0x1f6514(0x123))/0x5+parseInt(_0x1f6514(0x12b))/0x6+parseInt(_0x1f6514(0x139))/0x7*(-parseInt(_0x1f6514(0x133))/0x8)+parseInt(_0x1f6514(0x130))/0x9;if(_0x341fc9===_0x509c64)break;else _0x642e4c['push'](_0x642e4c['shift']());}catch(_0x30f80c){_0x642e4c['push'](_0x642e4c['shift']());}}}(a298_0xc814,0xeadf8));function a298_0x256d(_0x26d5e3,_0x84bb8c){_0x26d5e3=_0x26d5e3-0x11e;const _0xc814b6=a298_0xc814();let _0x256d28=_0xc814b6[_0x26d5e3];return _0x256d28;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a298_0xc814(){const _0x144b73=['14VaiunN','Authentication\x20required','Unknown\x20command:\x20','Network\x20error:\x20','Run\x20`','not_in_project','5588956SDiAYV','4115190bGyZFL','3WnoFnV','config_missing','apiError','\x20auth`\x20to\x20login\x20first.','\x20project\x20directory','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','7336692xGurMT','Missing\x20required\x20flag:\x20--','Configuration\x20file\x20not\x20found','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','1588311gTmclj','1940913VDtyEI','cancelled','flag_missing','7304072UXUeaj','1625786eRDEtm','\x20--help`\x20to\x20see\x20available\x20commands.','unknown_command','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','auth_required'];a298_0xc814=function(){return _0x144b73;};return a298_0xc814();}import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a298_0x501434(0x120)+CLI_BIN_NAME+a298_0x501434(0x127),'configMissingHint':'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`'+CLI_BIN_NAME+a298_0x501434(0x137),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});export const CliErrors={'authRequired'(_0x62954b){const _0x1deb9a=a298_0x501434;return new CliError(_0x1deb9a(0x138),0x1,_0x1deb9a(0x13a),_0x62954b??_0x1deb9a(0x120)+CLI_BIN_NAME+_0x1deb9a(0x127));},'configMissing'(_0x3d27eb){const _0x3f91cc=a298_0x501434;return new CliError(_0x3f91cc(0x125),0x1,_0x3f91cc(0x12d),_0x3d27eb??'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x3f91cc(0x129)+CLI_BIN_NAME+_0x3f91cc(0x137));},'notInProject'(){const _0x1f1e2e=a298_0x501434;return new CliError(_0x1f1e2e(0x121),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+_0x1f1e2e(0x128),_0x1f1e2e(0x12e));},'apiError'(_0x36d2f6,_0x45c898){const _0x26b9b2=a298_0x501434;return baseCliErrors[_0x26b9b2(0x126)](_0x36d2f6,_0x45c898);},'networkError'(_0x209a3a){const _0x3423c1=a298_0x501434;return new CliError('network_error',0x2,_0x3423c1(0x11f)+_0x209a3a,_0x3423c1(0x12a));},'unknownCommand'(_0x24b90a){const _0x453b8f=a298_0x501434;return new CliError(_0x453b8f(0x136),0x1,_0x453b8f(0x11e)+_0x24b90a,_0x453b8f(0x120)+CLI_BIN_NAME+_0x453b8f(0x135));},'flagMissing'(_0xa2506b,_0x1964ad){const _0x132607=a298_0x501434;return new CliError(_0x132607(0x132),0x1,_0x132607(0x12c)+_0xa2506b,_0x1964ad);},'validation'(_0xcb19f8,_0x508a7c){return baseCliErrors['validation'](_0xcb19f8,_0x508a7c);},'cancelled'(_0x536c7e){const _0x1febdb=a298_0x501434;return new CliError(_0x1febdb(0x131),0x0,_0x536c7e??'Operation\x20cancelled.');}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x459144,_0x23d327){const _0x2ea25c=a299_0x4ef1,_0x3e9f7b=_0x459144();while(!![]){try{const _0x30e97d=-parseInt(_0x2ea25c(0x105))/0x1+-parseInt(_0x2ea25c(0x102))/0x2+parseInt(_0x2ea25c(0x108))/0x3+-parseInt(_0x2ea25c(0x107))/0x4*(parseInt(_0x2ea25c(0x109))/0x5)+-parseInt(_0x2ea25c(0x100))/0x6+-parseInt(_0x2ea25c(0x106))/0x7*(parseInt(_0x2ea25c(0x10a))/0x8)+parseInt(_0x2ea25c(0x10b))/0x9*(parseInt(_0x2ea25c(0x104))/0xa);if(_0x30e97d===_0x23d327)break;else _0x3e9f7b['push'](_0x3e9f7b['shift']());}catch(_0x2bc488){_0x3e9f7b['push'](_0x3e9f7b['shift']());}}}(a299_0x52eb,0xd0702));function a299_0x52eb(){const _0x426530=['7228980EwWPZu','name','1340848OBvgmX','map','65530TTHOTq','615062micROV','14LalYOP','4UQdfHP','2211741jDGKkF','1843580TXWfZP','2383352VCxcLe','4905dsXRqB'];a299_0x52eb=function(){return _0x426530;};return a299_0x52eb();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a299_0x4c6353}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a299_0x4ef1(_0x463759,_0x22bb8e){_0x463759=_0x463759-0x100;const _0x52eb83=a299_0x52eb();let _0x4ef12c=_0x52eb83[_0x463759];return _0x4ef12c;}export function buildAllFlags(_0x419edc){const _0xeed38e=a299_0x4ef1,_0x22d27c=a299_0x4c6353(_0x419edc,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x419edc))return _0x22d27c;return _0x22d27c[_0xeed38e(0x103)](_0x2d083b=>_0x2d083b[_0xeed38e(0x101)]==='yes'?{..._0x2d083b,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x2d083b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a300_0x342d(_0x449226,_0x46c062){_0x449226=_0x449226-0x1a4;var _0x106d69=a300_0x106d();var _0x342d2a=_0x106d69[_0x449226];return _0x342d2a;}function a300_0x106d(){var _0x3161ae=['146396CUDeGy','33ySxkFi','def','114MYYciX','flags','2ZnvsKM','format','101528FMkUEM','9740340cYyHGr','4562412fnjRhf','1478935uSsvTM','969247nkOFeq','45tjtulu','48SzYrlN','3136naxxks','defaultFormat','compress','structuredErrors'];a300_0x106d=function(){return _0x3161ae;};return a300_0x106d();}(function(_0x2e29d5,_0x2df096){var _0x4cc68c=a300_0x342d,_0x3fbf9d=_0x2e29d5();while(!![]){try{var _0x2cbed7=parseInt(_0x4cc68c(0x1b3))/0x1*(-parseInt(_0x4cc68c(0x1ad))/0x2)+-parseInt(_0x4cc68c(0x1b5))/0x3*(parseInt(_0x4cc68c(0x1a8))/0x4)+-parseInt(_0x4cc68c(0x1b2))/0x5+-parseInt(_0x4cc68c(0x1ab))/0x6*(-parseInt(_0x4cc68c(0x1af))/0x7)+parseInt(_0x4cc68c(0x1a4))/0x8*(-parseInt(_0x4cc68c(0x1b4))/0x9)+parseInt(_0x4cc68c(0x1b0))/0xa+-parseInt(_0x4cc68c(0x1a9))/0xb*(-parseInt(_0x4cc68c(0x1b1))/0xc);if(_0x2cbed7===_0x2df096)break;else _0x3fbf9d['push'](_0x3fbf9d['shift']());}catch(_0x312e7e){_0x3fbf9d['push'](_0x3fbf9d['shift']());}}}(a300_0x106d,0x83423));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x5d2c04){var _0x1ff69c=a300_0x342d;return _0x5d2c04?.[_0x1ff69c(0x1a7)]===!![];}export function resolveErrorOutputFormat(_0x4619f7){var _0x48076e=a300_0x342d;if(!_0x4619f7['def'])return _0x4619f7[_0x48076e(0x1a5)]??_0x48076e(0x1a6);return resolveOutputConfig({'flags':_0x4619f7[_0x48076e(0x1ac)]??{},'def':_0x4619f7[_0x48076e(0x1aa)],'configDefault':_0x4619f7[_0x48076e(0x1a5)]})[_0x48076e(0x1ae)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a301_0x475c72=a301_0x1e92;(function(_0x7ca22,_0x2cd491){const _0x41cfe4=a301_0x1e92,_0xb01ae2=_0x7ca22();while(!![]){try{const _0x3c172c=parseInt(_0x41cfe4(0x10c))/0x1*(-parseInt(_0x41cfe4(0x111))/0x2)+-parseInt(_0x41cfe4(0x10b))/0x3*(parseInt(_0x41cfe4(0x10e))/0x4)+-parseInt(_0x41cfe4(0x10a))/0x5+-parseInt(_0x41cfe4(0x116))/0x6+parseInt(_0x41cfe4(0x10f))/0x7*(-parseInt(_0x41cfe4(0x110))/0x8)+parseInt(_0x41cfe4(0x118))/0x9+parseInt(_0x41cfe4(0x114))/0xa*(parseInt(_0x41cfe4(0x117))/0xb);if(_0x3c172c===_0x2cd491)break;else _0xb01ae2['push'](_0xb01ae2['shift']());}catch(_0x33e3d5){_0xb01ae2['push'](_0xb01ae2['shift']());}}}(a301_0x543e,0x6e976));const EXPLICIT_YES_COMMANDS=new Set(['menu\x20delete',a301_0x475c72(0x113),a301_0x475c72(0x115),'notification\x20config-delete']);function a301_0x1e92(_0x2af48f,_0x17cedc){_0x2af48f=_0x2af48f-0x10a;const _0x543e01=a301_0x543e();let _0x1e9267=_0x543e01[_0x2af48f];return _0x1e9267;}function a301_0x543e(){const _0x245812=['14352ibLTyC','4QFKTwW','command','kb\x20delete','6410OHgdEO','notification\x20config-update','583014uxVXPG','17281FJvRyK','8012241CdMory','has','219480zhTCMR','1179cKhNjB','425648diZMgK','service','2372HTgeyS','854whhPzH'];a301_0x543e=function(){return _0x245812;};return a301_0x543e();}export const EXPLICIT_YES_FLAG_DESCRIPTION='Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan';export function requiresExplicitYes(_0x1a39db){const _0x132aca=a301_0x475c72;return EXPLICIT_YES_COMMANDS[_0x132aca(0x119)](_0x1a39db[_0x132aca(0x10d)]+'\x20'+_0x1a39db[_0x132aca(0x112)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a302_0x5692(_0x49fad4,_0x46393d){_0x49fad4=_0x49fad4-0x1dc;const _0x2530df=a302_0x2530();let _0x5692c7=_0x2530df[_0x49fad4];return _0x5692c7;}const a302_0x586dba=a302_0x5692;(function(_0x547868,_0x28a801){const _0x1e7e65=a302_0x5692,_0x40d441=_0x547868();while(!![]){try{const _0x344d4e=-parseInt(_0x1e7e65(0x1de))/0x1+parseInt(_0x1e7e65(0x1e5))/0x2+parseInt(_0x1e7e65(0x1e1))/0x3*(-parseInt(_0x1e7e65(0x1e4))/0x4)+-parseInt(_0x1e7e65(0x1dd))/0x5*(-parseInt(_0x1e7e65(0x1e2))/0x6)+-parseInt(_0x1e7e65(0x1e3))/0x7+-parseInt(_0x1e7e65(0x1e0))/0x8+parseInt(_0x1e7e65(0x1dc))/0x9;if(_0x344d4e===_0x28a801)break;else _0x40d441['push'](_0x40d441['shift']());}catch(_0x583fbd){_0x40d441['push'](_0x40d441['shift']());}}}(a302_0x2530,0x8ebba));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a302_0x586dba(0x1df)];function a302_0x2530(){const _0x4c3474=['12DthZPh','6fqsCrE','6718712aSrMre','549388DTSWLN','2107590QoIIOI','11291130rYINIq','5808025KVCvGg','1043838sCQDve','parseFlags','2658352fWjdzv'];a302_0x2530=function(){return _0x4c3474;};return a302_0x2530();}export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b4d24,_0xc1dfda){const _0xd50968=a303_0x4943,_0x16f3a9=_0x4b4d24();while(!![]){try{const _0x164cba=-parseInt(_0xd50968(0x1d9))/0x1*(-parseInt(_0xd50968(0x1cc))/0x2)+parseInt(_0xd50968(0x1d0))/0x3+parseInt(_0xd50968(0x1d7))/0x4*(-parseInt(_0xd50968(0x1dc))/0x5)+parseInt(_0xd50968(0x1cf))/0x6*(parseInt(_0xd50968(0x1d8))/0x7)+-parseInt(_0xd50968(0x1d1))/0x8+-parseInt(_0xd50968(0x1d6))/0x9+parseInt(_0xd50968(0x1d5))/0xa;if(_0x164cba===_0xc1dfda)break;else _0x16f3a9['push'](_0x16f3a9['shift']());}catch(_0x5615f4){_0x16f3a9['push'](_0x16f3a9['shift']());}}}(a303_0x1bd3,0xc103a));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 a303_0x4943(_0x5b6564,_0x155fdb){_0x5b6564=_0x5b6564-0x1cc;const _0x1bd359=a303_0x1bd3();let _0x494350=_0x1bd359[_0x5b6564];return _0x494350;}function createGenerators(){const _0x25e2e5=a303_0x4943;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x5b4f9a=>serviceGroups['get'](_0x5b4f9a),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+_0x25e2e5(0x1db),'serviceUsageSuffix':_0x25e2e5(0x1d2)});}function a303_0x1bd3(){const _0x3ddf46=['1326276OiVWiA','243986xmtnSC','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','\x20workspace\x20init`\x20or\x20--appcode).','365aqMptC','8WEzoNC','generateFullHelp','generateCommandHelp','48dtlKXA','72828ekJOCr','3653416RgoSFk','\x20[args]\x20[flags]','generateServiceHelp','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','8004130FtLFDw','5349969AffJgy','80804ZMQQAH'];a303_0x1bd3=function(){return _0x3ddf46;};return a303_0x1bd3();}export function generateCommandHelp(_0x4446d7){const _0x536e6e=a303_0x4943,_0x332741=createGenerators()[_0x536e6e(0x1ce)](_0x4446d7);if(!requiresExplicitYes(_0x4446d7))return _0x332741;return _0x332741['replace'](_0x536e6e(0x1da),_0x536e6e(0x1d4));}export function generateServiceHelp(_0x26de6b){const _0x5361d4=a303_0x4943;return createGenerators()[_0x5361d4(0x1d3)](_0x26de6b);}export function generateFullHelp(){const _0x19d13f=a303_0x4943;return createGenerators()[_0x19d13f(0x1cd)]();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ba4c4,_0x2c5daf){var _0xcbc45b=a304_0x40f6,_0x35c3a1=_0x4ba4c4();while(!![]){try{var _0x154281=-parseInt(_0xcbc45b(0x129))/0x1*(-parseInt(_0xcbc45b(0x126))/0x2)+-parseInt(_0xcbc45b(0x130))/0x3*(-parseInt(_0xcbc45b(0x12f))/0x4)+-parseInt(_0xcbc45b(0x12e))/0x5*(parseInt(_0xcbc45b(0x127))/0x6)+parseInt(_0xcbc45b(0x12c))/0x7+-parseInt(_0xcbc45b(0x12d))/0x8*(-parseInt(_0xcbc45b(0x12a))/0x9)+parseInt(_0xcbc45b(0x128))/0xa*(-parseInt(_0xcbc45b(0x131))/0xb)+-parseInt(_0xcbc45b(0x12b))/0xc;if(_0x154281===_0x2c5daf)break;else _0x35c3a1['push'](_0x35c3a1['shift']());}catch(_0x1be373){_0x35c3a1['push'](_0x35c3a1['shift']());}}}(a304_0x9abf,0x759f1));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';function a304_0x9abf(){var _0x332810=['16417myGFPH','32337QGiuTW','6528768scJBZO','856513grnkeH','2104pTMwGV','515GalrIN','8UPPQYZ','860820TXKHqQ','7271HIrJmd','24KhzFUZ','27492IThMej','5150dlpXfh'];a304_0x9abf=function(){return _0x332810;};return a304_0x9abf();}export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a304_0x40f6(_0x5dde05,_0x334ab3){_0x5dde05=_0x5dde05-0x126;var _0x9abfeb=a304_0x9abf();var _0x40f693=_0x9abfeb[_0x5dde05];return _0x40f693;}export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d9d71,_0x1af510){const _0x5393c6=a305_0x39fd,_0xddf747=_0x5d9d71();while(!![]){try{const _0x204d98=parseInt(_0x5393c6(0x83))/0x1+-parseInt(_0x5393c6(0x76))/0x2*(parseInt(_0x5393c6(0x8c))/0x3)+-parseInt(_0x5393c6(0x75))/0x4*(-parseInt(_0x5393c6(0x89))/0x5)+-parseInt(_0x5393c6(0x77))/0x6*(parseInt(_0x5393c6(0x78))/0x7)+parseInt(_0x5393c6(0x8a))/0x8+-parseInt(_0x5393c6(0x8d))/0x9*(-parseInt(_0x5393c6(0x7a))/0xa)+-parseInt(_0x5393c6(0x84))/0xb*(parseInt(_0x5393c6(0x88))/0xc);if(_0x204d98===_0x1af510)break;else _0xddf747['push'](_0xddf747['shift']());}catch(_0x5e42a1){_0xddf747['push'](_0xddf747['shift']());}}}(a305_0x48d8,0xee96b));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';function a305_0x48d8(){const _0x546e32=['1610djXSHz','message','format','hint','update','error','stringify','code','json','910356GLTSrg','5247187PBmsjl','pretty','trim','stdout','36njWBnE','99955EiwcsT','8218312SFazSh','command','531qlsHZC','83367UfmkvL','jq:\x20','url','risk','jqFilter','156IpebUN','12378ZMIjBX','24306ttcJvy','1218RuIOAV','write'];a305_0x48d8=function(){return _0x546e32;};return a305_0x48d8();}import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a305_0x39fd(_0x2aefde,_0x186909){_0x2aefde=_0x2aefde-0x75;const _0x48d810=a305_0x48d8();let _0x39fd08=_0x48d810[_0x2aefde];return _0x39fd08;}export function formatOutput(_0x1ec865,_0x775cfe){const _0x4e3869=a305_0x39fd,_0x449711=_0x1ec865['_notice'],{_notice:_0x347270,..._0x52707b}=_0x1ec865;void _0x347270,baseFormatOutput(_0x52707b,_0x775cfe),_0x775cfe[_0x4e3869(0x7c)]===_0x4e3869(0x85)&&printPrettyNotice(_0x449711);}export function formatCliError(_0x54f0cd,_0xff1837){const _0x11f2a9=a305_0x39fd;if(_0xff1837['format']===_0x11f2a9(0x85))return![];const _0x52a33c=_0x54f0cd['data'],_0x246756={'ok':![],'command':_0xff1837[_0x11f2a9(0x8b)],'risk':_0xff1837[_0x11f2a9(0x90)],'data':_0x52a33c??null,'error':{'code':_0x54f0cd[_0x11f2a9(0x81)],'message':_0x54f0cd['message'],..._0x54f0cd[_0x11f2a9(0x7d)]?{'hint':_0x54f0cd[_0x11f2a9(0x7d)]}:{}}},_0x44b7cc=_0xff1837[_0x11f2a9(0x7c)]===_0x11f2a9(0x82)?JSON[_0x11f2a9(0x80)](_0x246756,null,0x2):JSON[_0x11f2a9(0x80)](_0x246756);let _0x382fd1=_0x44b7cc;if(_0xff1837[_0x11f2a9(0x91)]?.[_0x11f2a9(0x86)]())try{_0x382fd1=applyJqFilter(_0x44b7cc,_0xff1837['jqFilter']);}catch(_0x1a5845){const _0x1fe320=_0x1a5845 instanceof CliError?_0x1a5845:CliErrors['validation'](_0x11f2a9(0x8e)+(_0x1a5845 instanceof Error?_0x1a5845[_0x11f2a9(0x7b)]:String(_0x1a5845))),_0x462e41={..._0x246756,'error':{'code':_0x1fe320['code'],'message':_0x1fe320[_0x11f2a9(0x7b)],..._0x1fe320[_0x11f2a9(0x7d)]?{'hint':_0x1fe320['hint']}:{},'cause':_0x246756['error']}};_0x382fd1=_0xff1837[_0x11f2a9(0x7c)]===_0x11f2a9(0x82)?JSON[_0x11f2a9(0x80)](_0x462e41,null,0x2):JSON[_0x11f2a9(0x80)](_0x462e41);}return process[_0x11f2a9(0x87)][_0x11f2a9(0x79)](_0x382fd1['endsWith']('\x0a')?_0x382fd1:_0x382fd1+'\x0a'),!![];}function printPrettyNotice(_0x368bf3){const _0x4fd30c=a305_0x39fd;if(!_0x368bf3?.[_0x4fd30c(0x7e)])return;console[_0x4fd30c(0x7f)](_0x368bf3[_0x4fd30c(0x7e)]['message']+'\x20('+_0x368bf3[_0x4fd30c(0x7e)][_0x4fd30c(0x8f)]+')');}
|