@lovrabet/rabetbase-cli 2.4.5-beta.1 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-create.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/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/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/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c89f4,_0x31790e){const _0x20d645=a229_0x2e05,_0x59041e=_0x4c89f4();while(!![]){try{const _0x309ef0=-parseInt(_0x20d645(0x117))/0x1+parseInt(_0x20d645(0x114))/0x2+-parseInt(_0x20d645(0x121))/0x3*(parseInt(_0x20d645(0x116))/0x4)+parseInt(_0x20d645(0x120))/0x5*(parseInt(_0x20d645(0x11e))/0x6)+-parseInt(_0x20d645(0x113))/0x7+parseInt(_0x20d645(0x11b))/0x8*(parseInt(_0x20d645(0x115))/0x9)+-parseInt(_0x20d645(0x112))/0xa;if(_0x309ef0===_0x31790e)break;else _0x59041e['push'](_0x59041e['shift']());}catch(_0x2d3761){_0x59041e['push'](_0x59041e['shift']());}}}(a229_0xb5a1,0x86e2b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0xfa1a67,_0x11fc99){const _0x2ac67=a229_0x2e05,_0x11650f={'apps':_0xfa1a67['apps']&&typeof _0xfa1a67[_0x2ac67(0x122)]===_0x2ac67(0x124)?_0xfa1a67['apps']:{}};let _0x5cbcb0=_0x11650f[_0x2ac67(0x122)][_0x11fc99];if(!_0x5cbcb0)return _0x5cbcb0={'lastSync':'','pages':{}},_0x11650f[_0x2ac67(0x122)][_0x11fc99]=_0x5cbcb0,{'lockData':_0x11650f,'appLock':_0x5cbcb0};return!_0x5cbcb0[_0x2ac67(0x11d)]&&(_0x5cbcb0[_0x2ac67(0x11d)]=''),(!_0x5cbcb0[_0x2ac67(0x123)]||typeof _0x5cbcb0[_0x2ac67(0x123)]!==_0x2ac67(0x124))&&(_0x5cbcb0['pages']={}),{'lockData':_0x11650f,'appLock':_0x5cbcb0};}function a229_0xb5a1(){const _0x4d8c10=['apps','pages','object','924550qoHTek','1380547cJbLVR','1929326oeDFDm','269109iODBpy','2135764YLddjl','794151RwhCsa','ENOENT','parse','stringify','72gyEIVl','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','lastSync','5618922zoHXhK','utf8','5mOXAbA','3mvLJFE'];a229_0xb5a1=function(){return _0x4d8c10;};return a229_0xb5a1();}export async function readPageLockFile(_0x5d7858){const _0x531e1f=a229_0x2e05;try{const _0x17e2b1=await readFile(_0x5d7858,_0x531e1f(0x11f)),_0x2189b8=JSON[_0x531e1f(0x119)](_0x17e2b1);return{'apps':_0x2189b8['apps']&&typeof _0x2189b8[_0x531e1f(0x122)]===_0x531e1f(0x124)?_0x2189b8['apps']:{}};}catch(_0x54c172){if(_0x54c172['code']===_0x531e1f(0x118))return null;throw new Error(_0x531e1f(0x11c)+String(_0x54c172));}}function a229_0x2e05(_0x4f4569,_0x4a7a14){_0x4f4569=_0x4f4569-0x112;const _0xb5a1d0=a229_0xb5a1();let _0x2e0595=_0xb5a1d0[_0x4f4569];return _0x2e0595;}export async function writePageLockFile(_0x217c30,_0x1b3dc6){const _0x4876bd=a229_0x2e05;await mkdir(dirname(_0x217c30),{'recursive':!![]}),await writeFile(_0x217c30,JSON[_0x4876bd(0x11a)](_0x1b3dc6,null,0x2),_0x4876bd(0x11f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a231_0x412f(_0xeba4e2,_0x779e13){_0xeba4e2=_0xeba4e2-0x94;const _0x4ffa22=a231_0x4ffa();let _0x412ff3=_0x4ffa22[_0xeba4e2];return _0x412ff3;}(function(_0x5b4fa2,_0x265d60){const _0x5a0659=a231_0x412f,_0x444817=_0x5b4fa2();while(!![]){try{const _0x243cc3=parseInt(_0x5a0659(0xba))/0x1+-parseInt(_0x5a0659(0x99))/0x2+-parseInt(_0x5a0659(0xc1))/0x3+-parseInt(_0x5a0659(0xb4))/0x4*(parseInt(_0x5a0659(0xc5))/0x5)+-parseInt(_0x5a0659(0xbe))/0x6*(parseInt(_0x5a0659(0xb7))/0x7)+-parseInt(_0x5a0659(0xbb))/0x8*(-parseInt(_0x5a0659(0xbf))/0x9)+parseInt(_0x5a0659(0xa4))/0xa;if(_0x243cc3===_0x265d60)break;else _0x444817['push'](_0x444817['shift']());}catch(_0x226c69){_0x444817['push'](_0x444817['shift']());}}}(a231_0x4ffa,0xb0b08));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x573443,_0x71c0f5){const _0x4449a3=a231_0x412f,_0x41a2fc=[],_0x1806de=normalizeSqlForStaticAnalysis(_0x573443),_0x26b330=(_0x1806de[_0x4449a3(0xab)]?[]:extractJoinFacts(_0x1806de[_0x4449a3(0xb2)]))[_0x4449a3(0xd2)](_0x27ac42=>{const _0x1298c0=_0x4449a3;if(_0x27ac42[_0x1298c0(0x9e)]||_0x27ac42['columns'][_0x1298c0(0xcf)]===0x0)return _0x41a2fc[_0x1298c0(0xcb)]({'code':_0x1298c0(0xbd),'table':_0x27ac42[_0x1298c0(0xad)],'alias':_0x27ac42['alias'],'columns':_0x27ac42[_0x1298c0(0xa1)],'reason':_0x27ac42['unsupportedReason']??'Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.'}),{'table':_0x27ac42['table'],'alias':_0x27ac42[_0x1298c0(0xc2)],'columns':_0x27ac42[_0x1298c0(0xa1)],'status':'unavailable'};const _0x4ba00d=resolveTableMetadata(_0x71c0f5,_0x27ac42[_0x1298c0(0xad)]),_0x42664c=(_0x4ba00d?.[_0x1298c0(0xae)]??[])[_0x1298c0(0xd2)](_0x1e20e9=>({'index':_0x1e20e9,'matchedPrefix':findEqualityPrefix(_0x1e20e9[_0x1298c0(0xa1)],_0x27ac42[_0x1298c0(0xa1)])}))[_0x1298c0(0xd4)](_0x36e732=>_0x36e732['matchedPrefix'][_0x1298c0(0xcf)]>0x0),_0x48e286=_0x42664c['reduce']((_0x2e1a64,_0x1d443a)=>!_0x2e1a64||_0x1d443a[_0x1298c0(0xc0)][_0x1298c0(0xcf)]>_0x2e1a64[_0x1298c0(0xc0)][_0x1298c0(0xcf)]?_0x1d443a:_0x2e1a64,_0x42664c[0x0]);if(_0x48e286)return{'table':_0x27ac42['table'],'alias':_0x27ac42['alias'],'columns':_0x27ac42[_0x1298c0(0xa1)],'status':'covered','matchedIndex':{..._0x48e286[_0x1298c0(0xc4)],'matchedPrefix':_0x48e286[_0x1298c0(0xc0)]}};const _0x2272f5=_0x4ba00d?.[_0x1298c0(0xae)][_0x1298c0(0xd4)](_0x2626ca=>_0x2626ca[_0x1298c0(0xa1)]['some'](_0x53fac2=>_0x27ac42['columns'][_0x1298c0(0xda)](_0x5b0fab=>columnNamesMatch(_0x53fac2,_0x5b0fab))))??[];if(_0x2272f5[_0x1298c0(0xcf)]>0x0)return _0x41a2fc[_0x1298c0(0xcb)]({'code':_0x1298c0(0xca),'table':_0x27ac42['table'],'alias':_0x27ac42['alias'],'columns':_0x27ac42[_0x1298c0(0xa1)],'reason':_0x1298c0(0x9c)}),{'table':_0x27ac42['table'],'alias':_0x27ac42[_0x1298c0(0xc2)],'columns':_0x27ac42[_0x1298c0(0xa1)],'status':'warning','candidateIndexes':_0x2272f5};if(_0x4ba00d&&_0x4ba00d[_0x1298c0(0xb5)]!==![]&&_0x4ba00d[_0x1298c0(0xae)][_0x1298c0(0xcf)]>0x0&&_0x27ac42[_0x1298c0(0xa1)][_0x1298c0(0xcf)]>0x0)return _0x41a2fc[_0x1298c0(0xcb)]({'code':_0x1298c0(0xdb),'table':_0x27ac42[_0x1298c0(0xad)],'alias':_0x27ac42[_0x1298c0(0xc2)],'columns':_0x27ac42[_0x1298c0(0xa1)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x27ac42[_0x1298c0(0xad)],'alias':_0x27ac42['alias'],'columns':_0x27ac42['columns'],'status':_0x1298c0(0xaa)};return _0x41a2fc[_0x1298c0(0xcb)]({'code':'INDEX_METADATA_UNAVAILABLE','table':_0x27ac42['table'],'alias':_0x27ac42[_0x1298c0(0xc2)],'columns':_0x27ac42[_0x1298c0(0xa1)],'reason':_0x4ba00d?_0x1298c0(0xd5):_0x1298c0(0x97)}),{'table':_0x27ac42[_0x1298c0(0xad)],'alias':_0x27ac42[_0x1298c0(0xc2)],'columns':_0x27ac42[_0x1298c0(0xa1)],'status':_0x1298c0(0xd1)};});return{'checked':_0x26b330[_0x4449a3(0xcf)]>0x0,'joins':_0x26b330,'warnings':_0x41a2fc};}function extractJoinFacts(_0x4134a1){const _0x321252=a231_0x412f,_0x44ab8f=maskNestedQueries(stripSqlNoise(_0x4134a1)),_0x5e28e=maskQuotedIdentifiers(_0x44ab8f),_0x3d2fec=[],_0x5d5abc=new Set(),_0x274857=/\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 _0x2dd720 of _0x44ab8f[_0x321252(0x96)](_0x274857)){const _0x1fa712=_0x2dd720['index']??0x0,_0x12c4c3=_0x2dd720[0x0]['search'](/\bJOIN\b/i),_0x87e0e6=_0x1fa712+Math[_0x321252(0xb9)](0x0,_0x12c4c3);if(!/^JOIN\b/i[_0x321252(0x95)](_0x5e28e[_0x321252(0xa7)](_0x87e0e6)))continue;_0x5d5abc[_0x321252(0xc3)](_0x87e0e6);const _0x5c9a7b=normalizeIdentifier(_0x2dd720[0x1]||_0x321252(0xce)),_0x4a0246=normalizeIdentifier(_0x2dd720[0x2]??''),_0x6f5d0d=normalizeIdentifier(_0x2dd720[0x3]||_0x4a0246[_0x321252(0x9d)]('.')['at'](-0x1)||_0x4a0246),_0x37bb3e=[],_0x4dcc34=_0x4a0246==='__sq__';let _0x33d8ab=_0x5c9a7b==='right'||_0x5c9a7b===_0x321252(0xa5)||_0x4dcc34,_0x3b5d72=_0x33d8ab?_0x4dcc34?_0x321252(0xcd):_0x5c9a7b[_0x321252(0x9f)]()+_0x321252(0xb0):undefined;const _0x2831b2=stripOuterParentheses(_0x2dd720[0x4]??''),_0x39c07a=_0x2831b2[_0x321252(0xb1)](MYBATIS_DYNAMIC_START_MARKER)||_0x2831b2['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x42f4f0=_0x2831b2[_0x321252(0xb1)](MYBATIS_INCLUDE_MARKER);_0x39c07a&&(_0x33d8ab=!![],_0x3b5d72??='MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.');_0x42f4f0&&(_0x33d8ab=!![],_0x3b5d72??='MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.');const _0xbeb44b=_0x2831b2[_0x321252(0xa0)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x321252(0xa0)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x321252(0xa0)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0xbeb44b,'OR')&&(_0x33d8ab=!![],_0x3b5d72??=_0x321252(0xc6));for(const _0x4531d0 of splitTopLevelAnd(_0xbeb44b)){const _0x5f0222=stripOuterParentheses(_0x4531d0);if(hasTopLevelKeyword(_0x5f0222,'OR')){_0x33d8ab=!![],_0x3b5d72??=_0x321252(0xc6);continue;}const _0x4c0a26=splitEquality(_0x5f0222);if(!_0x4c0a26){containsColumnReference(_0x4531d0,_0x6f5d0d)&&(_0x33d8ab=!![]);continue;}const _0x3314a8=parseDirectColumnReference(_0x4c0a26[0x0],_0x6f5d0d),_0x34222d=parseDirectColumnReference(_0x4c0a26[0x1],_0x6f5d0d),_0x3b2af5=containsColumnReference(_0x4c0a26[0x0],_0x6f5d0d),_0x58ea59=containsColumnReference(_0x4c0a26[0x1],_0x6f5d0d),_0x573298=_0x3314a8&&!_0x58ea59?_0x3314a8:_0x34222d&&!_0x3b2af5?_0x34222d:null;if(_0x573298&&!_0x37bb3e[_0x321252(0xb1)](_0x573298))_0x37bb3e[_0x321252(0xcb)](_0x573298);else!_0x573298&&containsColumnReference(_0x4531d0,_0x6f5d0d)&&(_0x33d8ab=!![]);}_0x3d2fec[_0x321252(0xcb)]({'table':_0x4a0246,'alias':_0x6f5d0d,'columns':_0x37bb3e,'unsupportedPredicate':_0x33d8ab,'unsupportedReason':_0x3b5d72,'containsUnresolvedInclude':_0x42f4f0,'position':_0x87e0e6});}for(const _0x123a27 of _0x5e28e[_0x321252(0x96)](/\bJOIN\b/gi)){const _0x125ed4=_0x123a27[_0x321252(0xc4)]??0x0;if(_0x5d5abc[_0x321252(0xa6)](_0x125ed4))continue;const _0x470d0f=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x321252(0xd8)](_0x44ab8f[_0x321252(0xa7)](_0x125ed4+_0x123a27[0x0]['length'])),_0x59a41a=normalizeIdentifier(_0x470d0f?.[0x1]||_0x321252(0xcc)),_0x1fdc1c=normalizeIdentifier(_0x470d0f?.[0x2]||''),_0x46fbf2=isSqlClauseKeyword(_0x1fdc1c)?_0x59a41a[_0x321252(0x9d)]('.')['at'](-0x1)||_0x59a41a:_0x1fdc1c||_0x59a41a[_0x321252(0x9d)]('.')['at'](-0x1)||_0x59a41a;_0x3d2fec[_0x321252(0xcb)]({'table':_0x59a41a,'alias':_0x46fbf2,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x321252(0xa9),'position':_0x125ed4});}const _0x2cd76b=_0x5e28e['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x2cd76b>=0x0&&!_0x3d2fec[_0x321252(0xda)](_0x20a566=>_0x20a566[_0x321252(0x9a)])&&_0x3d2fec[_0x321252(0xcb)]({'table':_0x321252(0xcc),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x321252(0xd7),'containsUnresolvedInclude':!![],'position':_0x2cd76b}),_0x3d2fec[_0x321252(0xa8)]((_0x1c159e,_0x46a501)=>_0x1c159e['position']-_0x46a501[_0x321252(0x98)]);}function stripSqlNoise(_0x1fe942){const _0xce864d=a231_0x412f,_0xa91920=Array['from'](_0x1fe942),_0x442f3e=(_0x985ec7,_0x104eaf)=>{for(let _0x4362b1=_0x985ec7;_0x4362b1<_0x104eaf;_0x4362b1+=0x1){_0xa91920[_0x4362b1]!=='\x0a'&&_0xa91920[_0x4362b1]!=='\x0d'&&(_0xa91920[_0x4362b1]='\x20');}};for(let _0x1bfb36=0x0;_0x1bfb36<_0xa91920[_0xce864d(0xcf)];_0x1bfb36+=0x1){const _0x6fdd69=_0xa91920[_0x1bfb36],_0xc3902e=_0xa91920[_0x1bfb36+0x1];if(_0x6fdd69==='\x27'||_0x6fdd69==='\x22'||_0x6fdd69==='`'){const _0x2c593e=_0x6fdd69,_0x4eaa3d=_0x1bfb36;_0x1bfb36+=0x1;while(_0x1bfb36<_0xa91920[_0xce864d(0xcf)]){if(_0xa91920[_0x1bfb36]==='\x5c'&&_0x1bfb36+0x1<_0xa91920['length']){_0x1bfb36+=0x2;continue;}if(_0xa91920[_0x1bfb36]!==_0x2c593e){_0x1bfb36+=0x1;continue;}if(_0xa91920[_0x1bfb36+0x1]===_0x2c593e){_0x1bfb36+=0x2;continue;}break;}if(_0x2c593e==='\x27')_0x442f3e(_0x4eaa3d,Math['min'](_0x1bfb36+0x1,_0xa91920['length']));continue;}if(_0x6fdd69==='-'&&_0xc3902e==='-'){const _0x5a74dc=_0x1bfb36;while(_0x1bfb36<_0xa91920[_0xce864d(0xcf)]&&_0xa91920[_0x1bfb36]!=='\x0a')_0x1bfb36+=0x1;_0x442f3e(_0x5a74dc,_0x1bfb36);continue;}if(_0x6fdd69==='/'&&_0xc3902e==='*'){const _0x33553a=_0x1bfb36;_0x1bfb36+=0x2;while(_0x1bfb36<_0xa91920[_0xce864d(0xcf)]&&!(_0xa91920[_0x1bfb36]==='*'&&_0xa91920[_0x1bfb36+0x1]==='/')){_0x1bfb36+=0x1;}_0x1bfb36=Math[_0xce864d(0xa2)](_0x1bfb36+0x1,_0xa91920[_0xce864d(0xcf)]-0x1),_0x442f3e(_0x33553a,_0x1bfb36+0x1);continue;}if(_0x6fdd69==='#'&&_0xc3902e!=='{'){const _0x41bdd3=_0x1bfb36;while(_0x1bfb36<_0xa91920[_0xce864d(0xcf)]&&_0xa91920[_0x1bfb36]!=='\x0a')_0x1bfb36+=0x1;_0x442f3e(_0x41bdd3,_0x1bfb36);continue;}if((_0x6fdd69==='#'||_0x6fdd69==='$')&&_0xc3902e==='{'){const _0x367c57=_0x1bfb36;_0x1bfb36+=0x2;while(_0x1bfb36<_0xa91920[_0xce864d(0xcf)]&&_0xa91920[_0x1bfb36]!=='}')_0x1bfb36+=0x1;_0x442f3e(_0x367c57,Math[_0xce864d(0xa2)](_0x1bfb36+0x1,_0xa91920[_0xce864d(0xcf)]));}}return _0xa91920[_0xce864d(0xb3)]('');}function maskQuotedIdentifiers(_0x92296){const _0x238823=a231_0x412f,_0x2179d8=Array[_0x238823(0xaf)](_0x92296);for(let _0x335279=0x0;_0x335279<_0x2179d8[_0x238823(0xcf)];_0x335279+=0x1){const _0xe30e59=_0x2179d8[_0x335279];if(_0xe30e59!=='\x22'&&_0xe30e59!=='`')continue;_0x335279+=0x1;while(_0x335279<_0x2179d8[_0x238823(0xcf)]){if(_0x2179d8[_0x335279]===_0xe30e59){if(_0x2179d8[_0x335279+0x1]===_0xe30e59){_0x2179d8[_0x335279]='\x20',_0x2179d8[_0x335279+0x1]='\x20',_0x335279+=0x2;continue;}break;}_0x2179d8[_0x335279]='\x20',_0x335279+=0x1;}}return _0x2179d8[_0x238823(0xb3)]('');}function maskNestedQueries(_0x3d1fef){const _0x44ba21=a231_0x412f,_0xbb56a9=Array[_0x44ba21(0xaf)](_0x3d1fef);for(let _0x2a534c=0x0;_0x2a534c<_0xbb56a9[_0x44ba21(0xcf)];_0x2a534c+=0x1){if(_0xbb56a9[_0x2a534c]!=='(')continue;const _0x2047f8=_0x3d1fef[_0x44ba21(0xa7)](_0x2a534c+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x2047f8))continue;let _0x4dd8ba=0x1,_0x539643=_0x2a534c+0x1;for(;_0x539643<_0xbb56a9[_0x44ba21(0xcf)]&&_0x4dd8ba>0x0;_0x539643+=0x1){if(_0xbb56a9[_0x539643]==='(')_0x4dd8ba+=0x1;if(_0xbb56a9[_0x539643]===')')_0x4dd8ba-=0x1;}if(_0x4dd8ba!==0x0)continue;for(let _0x452482=_0x2a534c;_0x452482<_0x539643;_0x452482+=0x1){_0xbb56a9[_0x452482]='\x20';}const _0x15ee36='__sq__';for(let _0x5cd710=0x0;_0x5cd710<_0x15ee36[_0x44ba21(0xcf)]&&_0x2a534c+_0x5cd710<_0x539643;_0x5cd710+=0x1){_0xbb56a9[_0x2a534c+_0x5cd710]=_0x15ee36[_0x5cd710];}_0x2a534c=_0x539643-0x1;}return _0xbb56a9[_0x44ba21(0xb3)]('');}function splitTopLevelAnd(_0x4cea5a){const _0x4403ef=a231_0x412f,_0x2fef55=[];let _0x32bec5=0x0,_0x1850cc=0x0;for(let _0x1dc9e2=0x0;_0x1dc9e2<_0x4cea5a['length'];_0x1dc9e2+=0x1){const _0x2cbf7=_0x4cea5a[_0x1dc9e2];if(_0x2cbf7==='(')_0x32bec5+=0x1;if(_0x2cbf7===')')_0x32bec5=Math[_0x4403ef(0xb9)](0x0,_0x32bec5-0x1);_0x32bec5===0x0&&_0x4cea5a[_0x4403ef(0xa7)](_0x1dc9e2)['match'](/^AND\b/i)&&(_0x1dc9e2===0x0||/\s/['test'](_0x4cea5a[_0x1dc9e2-0x1]??''))&&(_0x2fef55[_0x4403ef(0xcb)](_0x4cea5a[_0x4403ef(0xa7)](_0x1850cc,_0x1dc9e2)[_0x4403ef(0xc8)]()),_0x1dc9e2+=0x2,_0x1850cc=_0x1dc9e2+0x1);}const _0x206e10=_0x4cea5a[_0x4403ef(0xa7)](_0x1850cc)[_0x4403ef(0xc8)]();if(_0x206e10)_0x2fef55['push'](_0x206e10);return _0x2fef55;}function hasTopLevelKeyword(_0x5c3c5c,_0x14fd48){const _0x3d6ffa=a231_0x412f;let _0x400e4e=0x0;for(let _0x5cc2b5=0x0;_0x5cc2b5<_0x5c3c5c[_0x3d6ffa(0xcf)];_0x5cc2b5+=0x1){const _0x13d408=_0x5c3c5c[_0x5cc2b5];if(_0x13d408==='(')_0x400e4e+=0x1;if(_0x13d408===')')_0x400e4e=Math['max'](0x0,_0x400e4e-0x1);if(_0x400e4e!==0x0)continue;const _0x5051ce=_0x5c3c5c[_0x3d6ffa(0xa7)](_0x5cc2b5,_0x5cc2b5+_0x14fd48[_0x3d6ffa(0xcf)]),_0x131f2c=_0x5c3c5c[_0x5cc2b5-0x1]??'\x20',_0x2917c8=_0x5c3c5c[_0x5cc2b5+_0x14fd48[_0x3d6ffa(0xcf)]]??'\x20';if(_0x5051ce[_0x3d6ffa(0x9f)]()===_0x14fd48['toUpperCase']()&&!/[\w$]/[_0x3d6ffa(0x95)](_0x131f2c)&&!/[\w$]/[_0x3d6ffa(0x95)](_0x2917c8))return!![];}return![];}function splitEquality(_0x2037de){const _0x175c15=a231_0x412f,_0x425a64=stripOuterParentheses(_0x2037de);let _0x7a3145=0x0,_0x5d0d85;for(let _0x9ac076=0x0;_0x9ac076<_0x425a64[_0x175c15(0xcf)];_0x9ac076+=0x1){const _0x22cbea=_0x425a64[_0x9ac076];if(_0x22cbea==='(')_0x7a3145+=0x1;if(_0x22cbea===')')_0x7a3145=Math[_0x175c15(0xb9)](0x0,_0x7a3145-0x1);const _0x199116=_0x425a64[_0x9ac076-0x1]??'',_0x32f0ce=_0x425a64[_0x9ac076+0x1]??'';if(_0x22cbea==='='&&_0x7a3145===0x0&&!/[!<>=:]/[_0x175c15(0x95)](_0x199116)&&_0x32f0ce!=='='){if(_0x5d0d85!==undefined)return null;_0x5d0d85=_0x9ac076;}}return _0x5d0d85===undefined?null:[_0x425a64['slice'](0x0,_0x5d0d85)[_0x175c15(0xc8)](),_0x425a64[_0x175c15(0xa7)](_0x5d0d85+0x1)[_0x175c15(0xc8)]()];}function parseDirectColumnReference(_0x1ab2d1,_0x84695e){const _0x20f29e=a231_0x412f,_0xa525af=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x20f29e(0xd8)](stripOuterParentheses(_0x1ab2d1));if(!_0xa525af)return null;if(normalizeIdentifier(_0xa525af[0x1]??'')!==normalizeIdentifier(_0x84695e))return null;return normalizeIdentifier(_0xa525af[0x2]??'');}function containsColumnReference(_0x453188,_0x37dcad){const _0x4457a4=a231_0x412f,_0x1a2ef3=_0x453188[_0x4457a4(0xb6)](/[`"]/g,''),_0x45906d=_0x37dcad[_0x4457a4(0xb6)](/[.*+?^${}()|[\]\\]/g,_0x4457a4(0xb8));return new RegExp('(?:^|[^\x5cw$])'+_0x45906d+_0x4457a4(0xa3),'i')[_0x4457a4(0x95)](_0x1a2ef3);}function findEqualityPrefix(_0x436eda,_0x410283){const _0x1f9d1b=a231_0x412f,_0x5b978f=new Set(_0x410283[_0x1f9d1b(0xd2)](normalizeIdentifier)),_0x57b1e7=[];for(const _0x5d78be of _0x436eda){if(!_0x5b978f[_0x1f9d1b(0xa6)](normalizeIdentifier(_0x5d78be)))break;_0x57b1e7[_0x1f9d1b(0xcb)](_0x5d78be);}return _0x57b1e7;}function resolveTableMetadata(_0x2227ca,_0x5bf399){const _0x428f68=a231_0x412f,_0x56c24d=normalizeIdentifier(_0x5bf399),_0x2574d7=_0x2227ca[_0x428f68(0xd4)](_0x9b343a=>normalizeIdentifier(_0x9b343a[_0x428f68(0xbc)])===_0x56c24d);if(_0x2574d7[_0x428f68(0xcf)]===0x1)return _0x2574d7[0x0];const _0x45e969=_0x56c24d[_0x428f68(0xb1)]('.'),_0x59a716=_0x56c24d[_0x428f68(0x9d)]('.')['at'](-0x1),_0x1b192c=_0x2227ca[_0x428f68(0xd4)](_0x186662=>{const _0x38ede0=_0x428f68,_0x56d30f=normalizeIdentifier(_0x186662[_0x38ede0(0xbc)]);if(_0x45e969&&_0x56d30f[_0x38ede0(0xb1)]('.'))return![];return _0x56d30f[_0x38ede0(0x9d)]('.')['at'](-0x1)===_0x59a716;});return _0x1b192c[_0x428f68(0xcf)]===0x1?_0x1b192c[0x0]:undefined;}function columnNamesMatch(_0x55440d,_0x5b4a87){return normalizeIdentifier(_0x55440d)===normalizeIdentifier(_0x5b4a87);}function normalizeIdentifier(_0x5c2802){const _0x106285=a231_0x412f;return _0x5c2802['replace'](/[`"]/g,'')[_0x106285(0xc8)]()[_0x106285(0xac)]();}function a231_0x4ffa(){const _0x4333c4=['endsWith','test','matchAll','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','position','1115094zIEnRp','containsUnresolvedInclude','startsWith','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','split','unsupportedPredicate','toUpperCase','replaceAll','columns','min','\x5cs*\x5c.\x5cs*[\x5cw$]+','40149880ymhYAb','full','has','slice','sort','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','warning','error','toLowerCase','table','indexes','from','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','includes','sql','join','4gAGDQb','metadataAvailable','replace','309785nnLZbf','\x5c$&','max','92130kSWdHW','45928muFKcs','tableName','JOIN_PREDICATE_UNSUPPORTED','120OopSlq','288ytmHDB','matchedPrefix','3837795CVZFSQ','alias','add','index','4225990DndwLh','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','using','trim','where','JOIN_INDEX_NOT_USABLE','push','unknown','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','INNER','length','cross','unavailable','map','natural','filter','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','left','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','exec','right','some','JOIN_INDEX_MISSING'];a231_0x4ffa=function(){return _0x4333c4;};return a231_0x4ffa();}function isSqlClauseKeyword(_0x123f9d){const _0x3eb85e=a231_0x412f;return new Set(['on',_0x3eb85e(0xc7),_0x3eb85e(0xc9),_0x3eb85e(0xb3),'inner',_0x3eb85e(0xd6),_0x3eb85e(0xd9),'full',_0x3eb85e(0xd0),_0x3eb85e(0xd3)])[_0x3eb85e(0xa6)](_0x123f9d);}function stripOuterParentheses(_0xe9b18){const _0x285e4f=a231_0x412f;let _0x673c0e=_0xe9b18[_0x285e4f(0xc8)]();while(_0x673c0e[_0x285e4f(0x9b)]('(')&&_0x673c0e[_0x285e4f(0x94)](')')){let _0x142289=0x0,_0x4477c0=!![];for(let _0x357bb2=0x0;_0x357bb2<_0x673c0e['length'];_0x357bb2+=0x1){if(_0x673c0e[_0x357bb2]==='(')_0x142289+=0x1;if(_0x673c0e[_0x357bb2]===')')_0x142289-=0x1;if(_0x142289===0x0&&_0x357bb2<_0x673c0e['length']-0x1){_0x4477c0=![];break;}}if(!_0x4477c0||_0x142289!==0x0)break;_0x673c0e=_0x673c0e['slice'](0x1,-0x1)[_0x285e4f(0xc8)]();}return _0x673c0e;}
|
|
1
|
+
function a231_0x3cba(_0x30aa6b,_0x375469){_0x30aa6b=_0x30aa6b-0x100;const _0x5851cf=a231_0x5851();let _0x3cbad9=_0x5851cf[_0x30aa6b];return _0x3cbad9;}(function(_0xaa1781,_0x2367a6){const _0x3a029f=a231_0x3cba,_0x16e552=_0xaa1781();while(!![]){try{const _0x3a57e3=-parseInt(_0x3a029f(0x104))/0x1+parseInt(_0x3a029f(0x134))/0x2+-parseInt(_0x3a029f(0x106))/0x3*(parseInt(_0x3a029f(0x108))/0x4)+-parseInt(_0x3a029f(0x13b))/0x5*(-parseInt(_0x3a029f(0x11e))/0x6)+-parseInt(_0x3a029f(0x146))/0x7+parseInt(_0x3a029f(0x116))/0x8+parseInt(_0x3a029f(0x122))/0x9;if(_0x3a57e3===_0x2367a6)break;else _0x16e552['push'](_0x16e552['shift']());}catch(_0x103d3e){_0x16e552['push'](_0x16e552['shift']());}}}(a231_0x5851,0xb3a84));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x5a7e95,_0x2eb208){const _0x498b79=a231_0x3cba,_0x346d7d=[],_0x46dbe3=normalizeSqlForStaticAnalysis(_0x5a7e95),_0x2bf4a9=(_0x46dbe3[_0x498b79(0x103)]?[]:extractJoinFacts(_0x46dbe3['sql']))[_0x498b79(0x120)](_0x1b7828=>{const _0x37a86f=_0x498b79;if(_0x1b7828['unsupportedPredicate']||_0x1b7828[_0x37a86f(0x12c)]['length']===0x0)return _0x346d7d[_0x37a86f(0x109)]({'code':_0x37a86f(0x13d),'table':_0x1b7828[_0x37a86f(0x145)],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828['columns'],'reason':_0x1b7828['unsupportedReason']??_0x37a86f(0x12b)}),{'table':_0x1b7828[_0x37a86f(0x145)],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828[_0x37a86f(0x12c)],'status':'unavailable'};const _0x5dae07=resolveTableMetadata(_0x2eb208,_0x1b7828['table']),_0x533079=(_0x5dae07?.[_0x37a86f(0x10b)]??[])[_0x37a86f(0x120)](_0x28c321=>({'index':_0x28c321,'matchedPrefix':findEqualityPrefix(_0x28c321[_0x37a86f(0x12c)],_0x1b7828[_0x37a86f(0x12c)])}))[_0x37a86f(0x149)](_0x2991ba=>_0x2991ba[_0x37a86f(0x137)][_0x37a86f(0x12f)]>0x0),_0x186b0d=_0x533079[_0x37a86f(0x130)]((_0x3b9d55,_0x37c890)=>!_0x3b9d55||_0x37c890[_0x37a86f(0x137)][_0x37a86f(0x12f)]>_0x3b9d55['matchedPrefix'][_0x37a86f(0x12f)]?_0x37c890:_0x3b9d55,_0x533079[0x0]);if(_0x186b0d)return{'table':_0x1b7828[_0x37a86f(0x145)],'alias':_0x1b7828['alias'],'columns':_0x1b7828[_0x37a86f(0x12c)],'status':_0x37a86f(0x124),'matchedIndex':{..._0x186b0d[_0x37a86f(0x142)],'matchedPrefix':_0x186b0d['matchedPrefix']}};const _0x507a6f=_0x5dae07?.['indexes'][_0x37a86f(0x149)](_0x204cc4=>_0x204cc4[_0x37a86f(0x12c)][_0x37a86f(0x101)](_0x5b53bc=>_0x1b7828[_0x37a86f(0x12c)][_0x37a86f(0x101)](_0x125661=>columnNamesMatch(_0x5b53bc,_0x125661))))??[];if(_0x507a6f[_0x37a86f(0x12f)]>0x0)return _0x346d7d[_0x37a86f(0x109)]({'code':_0x37a86f(0x102),'table':_0x1b7828['table'],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828['columns'],'reason':_0x37a86f(0x12a)}),{'table':_0x1b7828['table'],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828[_0x37a86f(0x12c)],'status':_0x37a86f(0x11f),'candidateIndexes':_0x507a6f};if(_0x5dae07&&_0x5dae07[_0x37a86f(0x13f)]!==![]&&_0x5dae07[_0x37a86f(0x10b)][_0x37a86f(0x12f)]>0x0&&_0x1b7828[_0x37a86f(0x12c)][_0x37a86f(0x12f)]>0x0)return _0x346d7d['push']({'code':_0x37a86f(0x138),'table':_0x1b7828['table'],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828[_0x37a86f(0x12c)],'reason':_0x37a86f(0x117)}),{'table':_0x1b7828[_0x37a86f(0x145)],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828[_0x37a86f(0x12c)],'status':'warning'};return _0x346d7d[_0x37a86f(0x109)]({'code':_0x37a86f(0x14b),'table':_0x1b7828['table'],'alias':_0x1b7828['alias'],'columns':_0x1b7828[_0x37a86f(0x12c)],'reason':_0x5dae07?_0x37a86f(0x115):_0x37a86f(0x123)}),{'table':_0x1b7828[_0x37a86f(0x145)],'alias':_0x1b7828[_0x37a86f(0x13e)],'columns':_0x1b7828[_0x37a86f(0x12c)],'status':'unavailable'};});return{'checked':_0x2bf4a9[_0x498b79(0x12f)]>0x0,'joins':_0x2bf4a9,'warnings':_0x346d7d};}function extractJoinFacts(_0x3e1b40){const _0x55a6b1=a231_0x3cba,_0xf701f3=maskNestedQueries(stripSqlNoise(_0x3e1b40)),_0x385662=maskQuotedIdentifiers(_0xf701f3),_0x933afc=[],_0x103d2b=new Set(),_0x2821cf=/\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 _0x37bfc0 of _0xf701f3['matchAll'](_0x2821cf)){const _0x1e2516=_0x37bfc0[_0x55a6b1(0x142)]??0x0,_0x434e83=_0x37bfc0[0x0][_0x55a6b1(0x121)](/\bJOIN\b/i),_0x48c31d=_0x1e2516+Math[_0x55a6b1(0x10f)](0x0,_0x434e83);if(!/^JOIN\b/i[_0x55a6b1(0x127)](_0x385662[_0x55a6b1(0x111)](_0x48c31d)))continue;_0x103d2b[_0x55a6b1(0x11c)](_0x48c31d);const _0x18f1e4=normalizeIdentifier(_0x37bfc0[0x1]||_0x55a6b1(0x136)),_0x35571d=normalizeIdentifier(_0x37bfc0[0x2]??''),_0x4e62f4=normalizeIdentifier(_0x37bfc0[0x3]||_0x35571d['split']('.')['at'](-0x1)||_0x35571d),_0xbc7c86=[],_0x4e81e9=_0x35571d===_0x55a6b1(0x13a);let _0xc508a9=_0x18f1e4===_0x55a6b1(0x11a)||_0x18f1e4===_0x55a6b1(0x10c)||_0x4e81e9,_0x2b407d=_0xc508a9?_0x4e81e9?_0x55a6b1(0x10d):_0x18f1e4[_0x55a6b1(0x133)]()+_0x55a6b1(0x131):undefined;const _0x35486c=stripOuterParentheses(_0x37bfc0[0x4]??''),_0x7b4b33=_0x35486c['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x35486c[_0x55a6b1(0x139)](MYBATIS_DYNAMIC_END_MARKER),_0x38b3ae=_0x35486c[_0x55a6b1(0x139)](MYBATIS_INCLUDE_MARKER);_0x7b4b33&&(_0xc508a9=!![],_0x2b407d??=_0x55a6b1(0x128));_0x38b3ae&&(_0xc508a9=!![],_0x2b407d??=_0x55a6b1(0x144));const _0x5d5ee6=_0x35486c[_0x55a6b1(0x119)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x55a6b1(0x119)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x55a6b1(0x119)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x5d5ee6,'OR')&&(_0xc508a9=!![],_0x2b407d??=_0x55a6b1(0x100));for(const _0x270cac of splitTopLevelAnd(_0x5d5ee6)){const _0x45770c=stripOuterParentheses(_0x270cac);if(hasTopLevelKeyword(_0x45770c,'OR')){_0xc508a9=!![],_0x2b407d??=_0x55a6b1(0x100);continue;}const _0x19e0df=splitEquality(_0x45770c);if(!_0x19e0df){containsColumnReference(_0x270cac,_0x4e62f4)&&(_0xc508a9=!![]);continue;}const _0x7e52bc=parseDirectColumnReference(_0x19e0df[0x0],_0x4e62f4),_0x2b3ba9=parseDirectColumnReference(_0x19e0df[0x1],_0x4e62f4),_0x22371a=containsColumnReference(_0x19e0df[0x0],_0x4e62f4),_0x1de3d7=containsColumnReference(_0x19e0df[0x1],_0x4e62f4),_0xc57d48=_0x7e52bc&&!_0x1de3d7?_0x7e52bc:_0x2b3ba9&&!_0x22371a?_0x2b3ba9:null;if(_0xc57d48&&!_0xbc7c86[_0x55a6b1(0x139)](_0xc57d48))_0xbc7c86[_0x55a6b1(0x109)](_0xc57d48);else!_0xc57d48&&containsColumnReference(_0x270cac,_0x4e62f4)&&(_0xc508a9=!![]);}_0x933afc[_0x55a6b1(0x109)]({'table':_0x35571d,'alias':_0x4e62f4,'columns':_0xbc7c86,'unsupportedPredicate':_0xc508a9,'unsupportedReason':_0x2b407d,'containsUnresolvedInclude':_0x38b3ae,'position':_0x48c31d});}for(const _0x3eae81 of _0x385662[_0x55a6b1(0x13c)](/\bJOIN\b/gi)){const _0x4fb5af=_0x3eae81[_0x55a6b1(0x142)]??0x0;if(_0x103d2b[_0x55a6b1(0x105)](_0x4fb5af))continue;const _0x9d1131=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x55a6b1(0x143)](_0xf701f3[_0x55a6b1(0x111)](_0x4fb5af+_0x3eae81[0x0][_0x55a6b1(0x12f)])),_0x103da9=normalizeIdentifier(_0x9d1131?.[0x1]||_0x55a6b1(0x113)),_0x566781=normalizeIdentifier(_0x9d1131?.[0x2]||''),_0x2e8964=isSqlClauseKeyword(_0x566781)?_0x103da9[_0x55a6b1(0x10e)]('.')['at'](-0x1)||_0x103da9:_0x566781||_0x103da9['split']('.')['at'](-0x1)||_0x103da9;_0x933afc['push']({'table':_0x103da9,'alias':_0x2e8964,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x55a6b1(0x12d),'position':_0x4fb5af});}const _0x3b36de=_0x385662[_0x55a6b1(0x140)](MYBATIS_INCLUDE_MARKER);return _0x3b36de>=0x0&&!_0x933afc[_0x55a6b1(0x101)](_0x27e7cf=>_0x27e7cf[_0x55a6b1(0x114)])&&_0x933afc[_0x55a6b1(0x109)]({'table':_0x55a6b1(0x113),'alias':_0x55a6b1(0x113),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x55a6b1(0x118),'containsUnresolvedInclude':!![],'position':_0x3b36de}),_0x933afc[_0x55a6b1(0x126)]((_0x1eb8b8,_0x1768b1)=>_0x1eb8b8[_0x55a6b1(0x148)]-_0x1768b1[_0x55a6b1(0x148)]);}function stripSqlNoise(_0x1d630c){const _0x5a232b=a231_0x3cba,_0x182457=Array[_0x5a232b(0x12e)](_0x1d630c),_0x46e04d=(_0x525433,_0x2a3cd6)=>{for(let _0x1fc15b=_0x525433;_0x1fc15b<_0x2a3cd6;_0x1fc15b+=0x1){_0x182457[_0x1fc15b]!=='\x0a'&&_0x182457[_0x1fc15b]!=='\x0d'&&(_0x182457[_0x1fc15b]='\x20');}};for(let _0x2cd06b=0x0;_0x2cd06b<_0x182457['length'];_0x2cd06b+=0x1){const _0x3367cf=_0x182457[_0x2cd06b],_0x4d312f=_0x182457[_0x2cd06b+0x1];if(_0x3367cf==='\x27'||_0x3367cf==='\x22'||_0x3367cf==='`'){const _0x212028=_0x3367cf,_0x4d9f8c=_0x2cd06b;_0x2cd06b+=0x1;while(_0x2cd06b<_0x182457[_0x5a232b(0x12f)]){if(_0x182457[_0x2cd06b]==='\x5c'&&_0x2cd06b+0x1<_0x182457[_0x5a232b(0x12f)]){_0x2cd06b+=0x2;continue;}if(_0x182457[_0x2cd06b]!==_0x212028){_0x2cd06b+=0x1;continue;}if(_0x182457[_0x2cd06b+0x1]===_0x212028){_0x2cd06b+=0x2;continue;}break;}if(_0x212028==='\x27')_0x46e04d(_0x4d9f8c,Math[_0x5a232b(0x11b)](_0x2cd06b+0x1,_0x182457['length']));continue;}if(_0x3367cf==='-'&&_0x4d312f==='-'){const _0x1eb439=_0x2cd06b;while(_0x2cd06b<_0x182457['length']&&_0x182457[_0x2cd06b]!=='\x0a')_0x2cd06b+=0x1;_0x46e04d(_0x1eb439,_0x2cd06b);continue;}if(_0x3367cf==='/'&&_0x4d312f==='*'){const _0x5a63b2=_0x2cd06b;_0x2cd06b+=0x2;while(_0x2cd06b<_0x182457['length']&&!(_0x182457[_0x2cd06b]==='*'&&_0x182457[_0x2cd06b+0x1]==='/')){_0x2cd06b+=0x1;}_0x2cd06b=Math[_0x5a232b(0x11b)](_0x2cd06b+0x1,_0x182457[_0x5a232b(0x12f)]-0x1),_0x46e04d(_0x5a63b2,_0x2cd06b+0x1);continue;}if(_0x3367cf==='#'&&_0x4d312f!=='{'){const _0x534464=_0x2cd06b;while(_0x2cd06b<_0x182457[_0x5a232b(0x12f)]&&_0x182457[_0x2cd06b]!=='\x0a')_0x2cd06b+=0x1;_0x46e04d(_0x534464,_0x2cd06b);continue;}if((_0x3367cf==='#'||_0x3367cf==='$')&&_0x4d312f==='{'){const _0x1ea897=_0x2cd06b;_0x2cd06b+=0x2;while(_0x2cd06b<_0x182457[_0x5a232b(0x12f)]&&_0x182457[_0x2cd06b]!=='}')_0x2cd06b+=0x1;_0x46e04d(_0x1ea897,Math[_0x5a232b(0x11b)](_0x2cd06b+0x1,_0x182457[_0x5a232b(0x12f)]));}}return _0x182457[_0x5a232b(0x147)]('');}function maskQuotedIdentifiers(_0x1ac020){const _0x38631c=a231_0x3cba,_0x53cdc9=Array[_0x38631c(0x12e)](_0x1ac020);for(let _0x46b897=0x0;_0x46b897<_0x53cdc9[_0x38631c(0x12f)];_0x46b897+=0x1){const _0x5cc742=_0x53cdc9[_0x46b897];if(_0x5cc742!=='\x22'&&_0x5cc742!=='`')continue;_0x46b897+=0x1;while(_0x46b897<_0x53cdc9[_0x38631c(0x12f)]){if(_0x53cdc9[_0x46b897]===_0x5cc742){if(_0x53cdc9[_0x46b897+0x1]===_0x5cc742){_0x53cdc9[_0x46b897]='\x20',_0x53cdc9[_0x46b897+0x1]='\x20',_0x46b897+=0x2;continue;}break;}_0x53cdc9[_0x46b897]='\x20',_0x46b897+=0x1;}}return _0x53cdc9['join']('');}function maskNestedQueries(_0x5e0eb3){const _0x3a8af9=a231_0x3cba,_0x2457fc=Array[_0x3a8af9(0x12e)](_0x5e0eb3);for(let _0x3c9878=0x0;_0x3c9878<_0x2457fc['length'];_0x3c9878+=0x1){if(_0x2457fc[_0x3c9878]!=='(')continue;const _0x2671d2=_0x5e0eb3[_0x3a8af9(0x111)](_0x3c9878+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x3a8af9(0x127)](_0x2671d2))continue;let _0x30fd99=0x1,_0x56f654=_0x3c9878+0x1;for(;_0x56f654<_0x2457fc[_0x3a8af9(0x12f)]&&_0x30fd99>0x0;_0x56f654+=0x1){if(_0x2457fc[_0x56f654]==='(')_0x30fd99+=0x1;if(_0x2457fc[_0x56f654]===')')_0x30fd99-=0x1;}if(_0x30fd99!==0x0)continue;for(let _0x2488eb=_0x3c9878;_0x2488eb<_0x56f654;_0x2488eb+=0x1){_0x2457fc[_0x2488eb]='\x20';}const _0x392fc8='__sq__';for(let _0x2be582=0x0;_0x2be582<_0x392fc8[_0x3a8af9(0x12f)]&&_0x3c9878+_0x2be582<_0x56f654;_0x2be582+=0x1){_0x2457fc[_0x3c9878+_0x2be582]=_0x392fc8[_0x2be582];}_0x3c9878=_0x56f654-0x1;}return _0x2457fc[_0x3a8af9(0x147)]('');}function splitTopLevelAnd(_0x122c3a){const _0x4934c2=a231_0x3cba,_0x2e11d7=[];let _0xdf58c1=0x0,_0x38c9d9=0x0;for(let _0x416663=0x0;_0x416663<_0x122c3a[_0x4934c2(0x12f)];_0x416663+=0x1){const _0x37ce0c=_0x122c3a[_0x416663];if(_0x37ce0c==='(')_0xdf58c1+=0x1;if(_0x37ce0c===')')_0xdf58c1=Math[_0x4934c2(0x10f)](0x0,_0xdf58c1-0x1);_0xdf58c1===0x0&&_0x122c3a['slice'](_0x416663)['match'](/^AND\b/i)&&(_0x416663===0x0||/\s/['test'](_0x122c3a[_0x416663-0x1]??''))&&(_0x2e11d7[_0x4934c2(0x109)](_0x122c3a[_0x4934c2(0x111)](_0x38c9d9,_0x416663)[_0x4934c2(0x141)]()),_0x416663+=0x2,_0x38c9d9=_0x416663+0x1);}const _0x1dd6db=_0x122c3a[_0x4934c2(0x111)](_0x38c9d9)[_0x4934c2(0x141)]();if(_0x1dd6db)_0x2e11d7[_0x4934c2(0x109)](_0x1dd6db);return _0x2e11d7;}function hasTopLevelKeyword(_0x46f52e,_0x45e419){const _0xd26b53=a231_0x3cba;let _0x5aecfd=0x0;for(let _0x526fbe=0x0;_0x526fbe<_0x46f52e[_0xd26b53(0x12f)];_0x526fbe+=0x1){const _0xcf0b30=_0x46f52e[_0x526fbe];if(_0xcf0b30==='(')_0x5aecfd+=0x1;if(_0xcf0b30===')')_0x5aecfd=Math[_0xd26b53(0x10f)](0x0,_0x5aecfd-0x1);if(_0x5aecfd!==0x0)continue;const _0x1cf06f=_0x46f52e['slice'](_0x526fbe,_0x526fbe+_0x45e419[_0xd26b53(0x12f)]),_0x3a6826=_0x46f52e[_0x526fbe-0x1]??'\x20',_0x2c477f=_0x46f52e[_0x526fbe+_0x45e419[_0xd26b53(0x12f)]]??'\x20';if(_0x1cf06f['toUpperCase']()===_0x45e419[_0xd26b53(0x133)]()&&!/[\w$]/[_0xd26b53(0x127)](_0x3a6826)&&!/[\w$]/[_0xd26b53(0x127)](_0x2c477f))return!![];}return![];}function splitEquality(_0x10df56){const _0x17dfc7=a231_0x3cba,_0xfd9526=stripOuterParentheses(_0x10df56);let _0x8d34cf=0x0,_0xd85c67;for(let _0x813141=0x0;_0x813141<_0xfd9526['length'];_0x813141+=0x1){const _0x5d59cd=_0xfd9526[_0x813141];if(_0x5d59cd==='(')_0x8d34cf+=0x1;if(_0x5d59cd===')')_0x8d34cf=Math['max'](0x0,_0x8d34cf-0x1);const _0x4de4b3=_0xfd9526[_0x813141-0x1]??'',_0x3669d2=_0xfd9526[_0x813141+0x1]??'';if(_0x5d59cd==='='&&_0x8d34cf===0x0&&!/[!<>=:]/[_0x17dfc7(0x127)](_0x4de4b3)&&_0x3669d2!=='='){if(_0xd85c67!==undefined)return null;_0xd85c67=_0x813141;}}return _0xd85c67===undefined?null:[_0xfd9526[_0x17dfc7(0x111)](0x0,_0xd85c67)[_0x17dfc7(0x141)](),_0xfd9526[_0x17dfc7(0x111)](_0xd85c67+0x1)[_0x17dfc7(0x141)]()];}function parseDirectColumnReference(_0x2af45c,_0x1f0397){const _0x84ddef=a231_0x3cba,_0x44c7ac=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x84ddef(0x143)](stripOuterParentheses(_0x2af45c));if(!_0x44c7ac)return null;if(normalizeIdentifier(_0x44c7ac[0x1]??'')!==normalizeIdentifier(_0x1f0397))return null;return normalizeIdentifier(_0x44c7ac[0x2]??'');}function containsColumnReference(_0x558a6e,_0x8fe3f9){const _0x47aa4b=a231_0x3cba,_0x208c4a=_0x558a6e[_0x47aa4b(0x132)](/[`"]/g,''),_0x143184=_0x8fe3f9[_0x47aa4b(0x132)](/[.*+?^${}()|[\]\\]/g,_0x47aa4b(0x129));return new RegExp('(?:^|[^\x5cw$])'+_0x143184+_0x47aa4b(0x112),'i')[_0x47aa4b(0x127)](_0x208c4a);}function findEqualityPrefix(_0x4478b3,_0x3c0663){const _0x527577=a231_0x3cba,_0x338739=new Set(_0x3c0663[_0x527577(0x120)](normalizeIdentifier)),_0x1f0372=[];for(const _0x6afb43 of _0x4478b3){if(!_0x338739[_0x527577(0x105)](normalizeIdentifier(_0x6afb43)))break;_0x1f0372[_0x527577(0x109)](_0x6afb43);}return _0x1f0372;}function a231_0x5851(){const _0x587a1d=['Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','columns','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','from','length','reduce','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','replace','toUpperCase','970070JcGHGE','inner','INNER','matchedPrefix','JOIN_INDEX_MISSING','includes','__sq__','35nAFKlS','matchAll','JOIN_PREDICATE_UNSUPPORTED','alias','metadataAvailable','indexOf','trim','index','exec','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','table','6125644akDVzc','join','position','filter','endsWith','INDEX_METADATA_UNAVAILABLE','toLowerCase','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','some','JOIN_INDEX_NOT_USABLE','error','65410oPonXi','has','629247ToWRkc','left','28cgDBJI','push','using','indexes','full','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','split','max','startsWith','slice','\x5cs*\x5c.\x5cs*[\x5cw$]+','unknown','containsUnresolvedInclude','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','3180640MWMPKr','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','replaceAll','right','min','add','tableName','1014756XhLCRl','warning','map','search','9703116hNiEyG','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','covered','where','sort','test','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','\x5c$&','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'];a231_0x5851=function(){return _0x587a1d;};return a231_0x5851();}function resolveTableMetadata(_0xf0f516,_0x1943ba){const _0x306bcc=a231_0x3cba,_0x2180fa=normalizeIdentifier(_0x1943ba),_0x32ed93=_0xf0f516[_0x306bcc(0x149)](_0x62ae64=>normalizeIdentifier(_0x62ae64['tableName'])===_0x2180fa);if(_0x32ed93[_0x306bcc(0x12f)]===0x1)return _0x32ed93[0x0];const _0x420497=_0x2180fa[_0x306bcc(0x139)]('.'),_0x3b2666=_0x2180fa[_0x306bcc(0x10e)]('.')['at'](-0x1),_0x4398b2=_0xf0f516[_0x306bcc(0x149)](_0x66adb7=>{const _0x53ee69=_0x306bcc,_0x79c146=normalizeIdentifier(_0x66adb7[_0x53ee69(0x11d)]);if(_0x420497&&_0x79c146[_0x53ee69(0x139)]('.'))return![];return _0x79c146[_0x53ee69(0x10e)]('.')['at'](-0x1)===_0x3b2666;});return _0x4398b2['length']===0x1?_0x4398b2[0x0]:undefined;}function columnNamesMatch(_0x4084d2,_0x432777){return normalizeIdentifier(_0x4084d2)===normalizeIdentifier(_0x432777);}function normalizeIdentifier(_0x91e18a){const _0x284e55=a231_0x3cba;return _0x91e18a[_0x284e55(0x132)](/[`"]/g,'')[_0x284e55(0x141)]()[_0x284e55(0x14c)]();}function isSqlClauseKeyword(_0x24c4e9){const _0x25e6bd=a231_0x3cba;return new Set(['on',_0x25e6bd(0x10a),_0x25e6bd(0x125),_0x25e6bd(0x147),_0x25e6bd(0x135),_0x25e6bd(0x107),_0x25e6bd(0x11a),_0x25e6bd(0x10c),'cross','natural'])['has'](_0x24c4e9);}function stripOuterParentheses(_0x4dcda0){const _0x5c74e0=a231_0x3cba;let _0x4faf28=_0x4dcda0[_0x5c74e0(0x141)]();while(_0x4faf28[_0x5c74e0(0x110)]('(')&&_0x4faf28[_0x5c74e0(0x14a)](')')){let _0x4e4f51=0x0,_0x36d2a3=!![];for(let _0x4fffce=0x0;_0x4fffce<_0x4faf28[_0x5c74e0(0x12f)];_0x4fffce+=0x1){if(_0x4faf28[_0x4fffce]==='(')_0x4e4f51+=0x1;if(_0x4faf28[_0x4fffce]===')')_0x4e4f51-=0x1;if(_0x4e4f51===0x0&&_0x4fffce<_0x4faf28[_0x5c74e0(0x12f)]-0x1){_0x36d2a3=![];break;}}if(!_0x36d2a3||_0x4e4f51!==0x0)break;_0x4faf28=_0x4faf28[_0x5c74e0(0x111)](0x1,-0x1)[_0x5c74e0(0x141)]();}return _0x4faf28;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a232_0x4e390f=a232_0x2ee3;(function(_0x4adae1,_0xdc30fe){const _0x503fc0=a232_0x2ee3,_0x5bf84e=_0x4adae1();while(!![]){try{const _0x4f099c=-parseInt(_0x503fc0(0x6e))/0x1*(parseInt(_0x503fc0(0x72))/0x2)+parseInt(_0x503fc0(0x70))/0x3*(parseInt(_0x503fc0(0x74))/0x4)+-parseInt(_0x503fc0(0x76))/0x5+parseInt(_0x503fc0(0x77))/0x6+-parseInt(_0x503fc0(0x7a))/0x7*(-parseInt(_0x503fc0(0x75))/0x8)+-parseInt(_0x503fc0(0x73))/0x9*(parseInt(_0x503fc0(0x78))/0xa)+-parseInt(_0x503fc0(0x71))/0xb*(-parseInt(_0x503fc0(0x6f))/0xc);if(_0x4f099c===_0xdc30fe)break;else _0x5bf84e['push'](_0x5bf84e['shift']());}catch(_0x1fc353){_0x5bf84e['push'](_0x5bf84e['shift']());}}}(a232_0x4d7f,0x30f2e));import{resolve}from'node:path';function a232_0x2ee3(_0x5e5cf0,_0x37b0f5){_0x5e5cf0=_0x5e5cf0-0x6d;const _0x4d7f4e=a232_0x4d7f();let _0x2ee362=_0x4d7f4e[_0x5e5cf0];return _0x2ee362;}import{findProjectRootDirectory}from'../../context.js';function a232_0x4d7f(){const _0x4aee85=['sql.lock.json','295673TSeZqI','/sql','.rabetbase','sql-trash','199FnaczO','12zCKiOI','25341LPxkOc','1273261ecBXPN','1658FmHSer','2478591NwCNBe','4InElss','72zuZupq','987125iNNDRy','2003640AttqjU','10ypehha'];a232_0x4d7f=function(){return _0x4aee85;};return a232_0x4d7f();}const DOT_DIR=a232_0x4e390f(0x7c),LOCK_FILE_NAME=a232_0x4e390f(0x79),TRASH_DIR_NAME=a232_0x4e390f(0x6d);export function loadSqlProjectConfig(_0x33eabb,_0x4e48ed){const _0x44101b=a232_0x4e390f,_0x51fdc6=resolve(_0x4e48ed??findProjectRootDirectory()),_0x1c31e0=DOT_DIR+_0x44101b(0x7b),_0x103538=_0x1c31e0+'/'+_0x33eabb;return{'projectRoot':_0x51fdc6,'appCode':_0x33eabb,'sqlWorkspaceRoot':_0x1c31e0,'sqlRoot':_0x103538,'sqlRootDir':resolve(_0x51fdc6,DOT_DIR,'sql',_0x33eabb),'lockFilePath':resolve(_0x51fdc6,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x51fdc6,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44465d,_0x193057){const _0x15a418=a233_0x30ec,_0x3e844a=_0x44465d();while(!![]){try{const _0x3c8451=-parseInt(_0x15a418(0x1dd))/0x1*(-parseInt(_0x15a418(0x1f5))/0x2)+-parseInt(_0x15a418(0x1dc))/0x3*(-parseInt(_0x15a418(0x1db))/0x4)+parseInt(_0x15a418(0x1d5))/0x5*(parseInt(_0x15a418(0x1ec))/0x6)+parseInt(_0x15a418(0x1e1))/0x7*(parseInt(_0x15a418(0x1f4))/0x8)+parseInt(_0x15a418(0x1f3))/0x9+parseInt(_0x15a418(0x1e6))/0xa+-parseInt(_0x15a418(0x1d7))/0xb;if(_0x3c8451===_0x193057)break;else _0x3e844a['push'](_0x3e844a['shift']());}catch(_0x314171){_0x3e844a['push'](_0x3e844a['shift']());}}}(a233_0x4abc,0xe7651));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x43784a){const _0x1f7166=a233_0x30ec;if(_0x43784a===_0x1f7166(0x1f6))return _0x1f7166(0x1eb);if(_0x43784a===_0x1f7166(0x1d8))return _0x1f7166(0x1ed);return undefined;}async function scanSqlFilesRecursively(_0x52c15b,_0x459bde){const _0xa9bdca=a233_0x30ec,_0x43d86e=[];try{const _0x239e99=await readdir(_0x52c15b,{'withFileTypes':!![]});for(const _0x5506dc of _0x239e99){const _0x139c2e=join(_0x52c15b,_0x5506dc[_0xa9bdca(0x1ee)]);if(_0x5506dc[_0xa9bdca(0x1e0)]()){_0x43d86e['push'](...await scanSqlFilesRecursively(_0x139c2e,_0x459bde));continue;}if(!_0x5506dc[_0xa9bdca(0x1e4)]())continue;const _0x24d277=extname(_0x5506dc['name'])[_0xa9bdca(0x1ea)](),_0x2313fd=extensionToMode(_0x24d277);if(!_0x2313fd)continue;const _0x47e725=relative(_0x459bde,_0x139c2e)[_0xa9bdca(0x1d6)](/\\/g,'/'),_0x5ed202=_0x47e725[_0xa9bdca(0x1de)]('/')['filter'](Boolean),_0x27dd8d=parseSqlPath(_0x5ed202,_0x5506dc['name'],_0x24d277);if(!_0x27dd8d)continue;_0x43d86e[_0xa9bdca(0x1d9)]({'sqlCode':_0x27dd8d[_0xa9bdca(0x1f2)],'sqlName':_0x27dd8d[_0xa9bdca(0x1e2)],'dbDirectory':_0x5ed202[0x0],'filePath':_0x139c2e,'relativePath':_0x47e725,'lockKey':_0x27dd8d[_0xa9bdca(0x1f2)],'mode':_0x2313fd});}}catch(_0x4220a9){if(_0x4220a9[_0xa9bdca(0x1e5)]!==_0xa9bdca(0x1e7))throw _0x4220a9;}return _0x43d86e;}function a233_0x30ec(_0x12aa9a,_0x962bb1){_0x12aa9a=_0x12aa9a-0x1d5;const _0x4abc9d=a233_0x4abc();let _0x30ec9d=_0x4abc9d[_0x12aa9a];return _0x30ec9d;}export async function scanLocalSqlQueries(_0x54b059){const _0x43bf7c=a233_0x30ec;return scanSqlFilesRecursively(_0x54b059[_0x43bf7c(0x1e3)],_0x54b059['sqlRootDir']);}export function resolveLocalSqlFilePath(_0x231c29,_0x2ffb0d,_0x1adf60){const _0x126ece=a233_0x30ec,_0x5c4d7c=_0x1adf60?.[_0x126ece(0x1da)]||(_0x1adf60?.[_0x126ece(0x1e2)]||_0x1adf60?.[_0x126ece(0x1e9)]?buildSqlRelativePath(_0x2ffb0d,_0x1adf60?.[_0x126ece(0x1e2)],_0x1adf60?.[_0x126ece(0x1e9)],_0x1adf60?.[_0x126ece(0x1f7)]||_0x126ece(0x1eb),_0x1adf60?.[_0x126ece(0x1df)]):buildDefaultSqlFileName(_0x2ffb0d,_0x1adf60?.[_0x126ece(0x1f7)]||'sql'));return join(_0x231c29[_0x126ece(0x1e3)],_0x5c4d7c);}function a233_0x4abc(){const _0xe45e87=['91284HsIxrV','165154OgVebE','split','dbId','isDirectory','5929NnLljx','sqlName','sqlRootDir','isFile','code','1346320gtxPWK','ENOENT','length','dbName','toLowerCase','sql','12tRNSay','mybatisXml','name','indexOf','slice','test','sqlCode','3763179biEeDt','7192bTYllV','16GONsDz','.sql','mode','2474570uxuCDu','replace','37820013osbwMf','.xml','push','path','100suVYNM'];a233_0x4abc=function(){return _0xe45e87;};return a233_0x4abc();}export async function directoryExists(_0x54eb88){const _0x4f0f51=a233_0x30ec;try{const _0x25e5ed=await stat(_0x54eb88);return _0x25e5ed[_0x4f0f51(0x1e0)]();}catch{return![];}}function parseSqlPath(_0x6f8323,_0x94fcec,_0x53e044){const _0x5305fc=a233_0x30ec,_0x5beeec=_0x94fcec[_0x5305fc(0x1f0)](0x0,-_0x53e044[_0x5305fc(0x1e8)]);if(_0x6f8323[_0x5305fc(0x1e8)]<0x2)return null;const _0x3adee8=_0x5beeec[_0x5305fc(0x1ef)]('_');if(_0x3adee8<=0x0||_0x3adee8>=_0x5beeec[_0x5305fc(0x1e8)]-0x1)return null;const _0x194f62=_0x5beeec[_0x5305fc(0x1f0)](0x0,_0x3adee8);if(!isLikelySqlCode(_0x194f62))return null;return{'sqlCode':_0x194f62,'sqlName':_0x5beeec['slice'](_0x3adee8+0x1)};}function isLikelySqlCode(_0x41eedf){const _0x47353c=a233_0x30ec;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x47353c(0x1f1)](_0x41eedf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36c2e7,_0x317875){const _0x384d30=a234_0x2dd2,_0xeca667=_0x36c2e7();while(!![]){try{const _0x2edc39=parseInt(_0x384d30(0x1a5))/0x1*(-parseInt(_0x384d30(0x1a6))/0x2)+parseInt(_0x384d30(0x1a3))/0x3+parseInt(_0x384d30(0x1a1))/0x4+-parseInt(_0x384d30(0x1a2))/0x5*(-parseInt(_0x384d30(0x19c))/0x6)+parseInt(_0x384d30(0x19e))/0x7+parseInt(_0x384d30(0x19d))/0x8+-parseInt(_0x384d30(0x19f))/0x9;if(_0x2edc39===_0x317875)break;else _0xeca667['push'](_0xeca667['shift']());}catch(_0xc232dd){_0xeca667['push'](_0xeca667['shift']());}}}(a234_0x1940,0xa2fe3));import{readFile}from'node:fs/promises';function a234_0x2dd2(_0x532b71,_0x15d2dd){_0x532b71=_0x532b71-0x19c;const _0x194048=a234_0x1940();let _0x2dd25c=_0x194048[_0x532b71];return _0x2dd25c;}function a234_0x1940(){const _0x380056=['7626618vDEcKv','2031976nXOVEA','2541560anqNaE','10224387tzsTtD','update','1597556Yydaah','5HZrzRX','586881BUznOe','digest','82zpcqfA','16574kLuGXu'];a234_0x1940=function(){return _0x380056;};return a234_0x1940();}import a234_0x41f1d from'node:crypto';export function computeSqlContentHash(_0x394542){const _0x3909fb=a234_0x2dd2;return a234_0x41f1d['createHash']('md5')[_0x3909fb(0x1a0)](_0x394542)[_0x3909fb(0x1a4)]('hex');}export async function computeSqlFileHash(_0x22d813){const _0x2a58d6=await readFile(_0x22d813,'utf8');return computeSqlContentHash(_0x2a58d6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21e3f2,_0x422f1c){const _0x422adf=a235_0x535d,_0x514798=_0x21e3f2();while(!![]){try{const _0x3538aa=parseInt(_0x422adf(0x171))/0x1+parseInt(_0x422adf(0x16f))/0x2+parseInt(_0x422adf(0x175))/0x3*(parseInt(_0x422adf(0x16d))/0x4)+-parseInt(_0x422adf(0x174))/0x5+-parseInt(_0x422adf(0x16e))/0x6+-parseInt(_0x422adf(0x167))/0x7+-parseInt(_0x422adf(0x16b))/0x8;if(_0x3538aa===_0x422f1c)break;else _0x514798['push'](_0x514798['shift']());}catch(_0x1cc0d5){_0x514798['push'](_0x514798['shift']());}}}(a235_0x2fbc,0x40827));import{mkdir,readFile,writeFile}from'node:fs/promises';function a235_0x2fbc(){const _0x554960=['Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','\x22\x20vs\x20lock\x20\x22','1959180fnEWHG','3981kOibKv','\x22.\x20','ENOENT','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','2619582rbCUmL','sqlRoot','lastSync','apps','399128ZxygYr','stringify','964xPtOlf','1060524iMYfDA','977562CUYHPV','sqls','448350hDgeks'];a235_0x2fbc=function(){return _0x554960;};return a235_0x2fbc();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a235_0x535d(_0x4b8d18,_0x2640ad){_0x4b8d18=_0x4b8d18-0x166;const _0x2fbc64=a235_0x2fbc();let _0x535d89=_0x2fbc64[_0x4b8d18];return _0x535d89;}export function ensureSqlLockScope(_0x261e75,_0x2d4139,_0x54f94b,_0x1d8e0e){const _0x45d2fe=a235_0x535d,_0xb2cde=_0x261e75??createEmptySqlLock();let _0x521d4f=_0xb2cde[_0x45d2fe(0x16a)][_0x2d4139];if(!_0x521d4f)return _0x521d4f={'sqlRoot':_0x54f94b,'lastSync':'','sqls':{}},_0xb2cde['apps'][_0x2d4139]=_0x521d4f,{'lockData':_0xb2cde,'appLock':_0x521d4f};if(!_0x521d4f['sqlRoot'])_0x521d4f[_0x45d2fe(0x168)]=_0x54f94b;else{if(_0x521d4f[_0x45d2fe(0x168)]!==_0x54f94b)throw new Error(_0x1d8e0e+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x54f94b+_0x45d2fe(0x173)+_0x521d4f[_0x45d2fe(0x168)]+_0x45d2fe(0x176)+_0x45d2fe(0x166));}return!_0x521d4f[_0x45d2fe(0x170)]&&(_0x521d4f[_0x45d2fe(0x170)]={}),!_0x521d4f[_0x45d2fe(0x169)]&&(_0x521d4f[_0x45d2fe(0x169)]=''),{'lockData':_0xb2cde,'appLock':_0x521d4f};}export async function readSqlLockFile(_0x5c7323){const _0x4f28bd=a235_0x535d;try{const _0xf753a3=await readFile(_0x5c7323,'utf8');return JSON['parse'](_0xf753a3);}catch(_0xce8917){if(_0xce8917['code']===_0x4f28bd(0x177))return null;throw new Error(_0x4f28bd(0x172)+String(_0xce8917));}}export async function writeSqlLockFile(_0x49594a,_0x3ac89f){const _0x331e25=a235_0x535d;await mkdir(dirname(_0x49594a),{'recursive':!![]}),await writeFile(_0x49594a,JSON[_0x331e25(0x16c)](_0x3ac89f,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x64e1bb,_0x3840a3){const _0x245c82=a237_0x517c,_0x54cf10=_0x64e1bb();while(!![]){try{const _0x1f4c5e=parseInt(_0x245c82(0x12f))/0x1*(-parseInt(_0x245c82(0x12d))/0x2)+-parseInt(_0x245c82(0x120))/0x3+-parseInt(_0x245c82(0x123))/0x4+-parseInt(_0x245c82(0x12a))/0x5+-parseInt(_0x245c82(0x121))/0x6+parseInt(_0x245c82(0x124))/0x7+-parseInt(_0x245c82(0x126))/0x8*(-parseInt(_0x245c82(0x122))/0x9);if(_0x1f4c5e===_0x3840a3)break;else _0x54cf10['push'](_0x54cf10['shift']());}catch(_0x40184e){_0x54cf10['push'](_0x54cf10['shift']());}}}(a237_0x56bc,0xaac88));function a237_0x517c(_0x52836f,_0x22ee0e){_0x52836f=_0x52836f-0x11f;const _0x56bcbe=a237_0x56bc();let _0x517c58=_0x56bcbe[_0x52836f];return _0x517c58;}export function detectSqlMode(_0x64b13d){const _0x5c9b31=a237_0x517c,_0x74b25d=_0x64b13d['trimStart']();if(/^<(select|insert|update|delete)\b/i['test'](_0x74b25d))return _0x5c9b31(0x12e);return _0x5c9b31(0x129);}export function getSqlFileExtension(_0x4fc87f){const _0x4ef075=a237_0x517c;return _0x4fc87f===_0x4ef075(0x12e)?_0x4ef075(0x127):_0x4ef075(0x125);}export function buildDefaultSqlFileName(_0x6c606e,_0x124532){return''+_0x6c606e+getSqlFileExtension(_0x124532);}export function sanitizeSqlPathSegment(_0x210041,_0x44fef0){const _0x2cfd80=a237_0x517c,_0x445cb0=String(_0x210041??'')[_0x2cfd80(0x11f)](),_0x368a30=_0x445cb0[_0x2cfd80(0x128)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2cfd80(0x128)](/\s+/g,'-')[_0x2cfd80(0x128)](/-+/g,'-')[_0x2cfd80(0x128)](/^\.+/,'')[_0x2cfd80(0x128)](/\.+$/,'')[_0x2cfd80(0x128)](/^-+/,'')[_0x2cfd80(0x128)](/-+$/,'');return _0x368a30||_0x44fef0;}function a237_0x56bc(){const _0x5935e3=['3107211hEEPet','4730832aalLhF','17759268ieKjAl','2125892aVZrjT','671881TGaXYE','.sql','16NrriHZ','.xml','replace','sql','1218960nImgoX','unknown-sql','unknown-db','1486970aRCGlG','mybatisXml','1qBYKUf','trim'];a237_0x56bc=function(){return _0x5935e3;};return a237_0x56bc();}export function buildDbDirectoryName(_0x49b192,_0x49fa62){const _0x1f2ec8=a237_0x517c;return sanitizeSqlPathSegment(_0x49b192,_0x49fa62!=null?'db-'+_0x49fa62:_0x1f2ec8(0x12c));}export function buildSqlRelativePath(_0x5592ea,_0x1264b3,_0x43b2ad,_0x349185,_0x41e560){const _0x342a71=a237_0x517c,_0x5b5498=buildDbDirectoryName(_0x43b2ad,_0x41e560),_0x1c1216=sanitizeSqlPathSegment(_0x5592ea,_0x342a71(0x12b)),_0x176ce2=sanitizeSqlPathSegment(_0x1264b3,_0x1c1216);return _0x5b5498+'/'+_0x1c1216+'_'+_0x176ce2+getSqlFileExtension(_0x349185);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a238_0x5b0503=a238_0x1b08;(function(_0x4ff72b,_0x1568ba){const _0x2ea590=a238_0x1b08,_0x13162e=_0x4ff72b();while(!![]){try{const _0x37740e=parseInt(_0x2ea590(0x1de))/0x1*(-parseInt(_0x2ea590(0x1b8))/0x2)+parseInt(_0x2ea590(0x1ba))/0x3+-parseInt(_0x2ea590(0x20e))/0x4*(-parseInt(_0x2ea590(0x1fa))/0x5)+parseInt(_0x2ea590(0x1c1))/0x6+parseInt(_0x2ea590(0x204))/0x7*(-parseInt(_0x2ea590(0x201))/0x8)+-parseInt(_0x2ea590(0x1f7))/0x9+parseInt(_0x2ea590(0x1c8))/0xa*(parseInt(_0x2ea590(0x1ee))/0xb);if(_0x37740e===_0x1568ba)break;else _0x13162e['push'](_0x13162e['shift']());}catch(_0x572b9d){_0x13162e['push'](_0x13162e['shift']());}}}(a238_0x14d3,0x9fa05));const MYBATIS_OUTER_TAGS=new Map([[a238_0x5b0503(0x1fe),'SELECT'],['insert',a238_0x5b0503(0x1b3)],[a238_0x5b0503(0x1e2),'UPDATE'],[a238_0x5b0503(0x1bb),'DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a238_0x5b0503(0x1cd),a238_0x5b0503(0x1d5),'choose',a238_0x5b0503(0x203),a238_0x5b0503(0x1dd),a238_0x5b0503(0x1f4),a238_0x5b0503(0x20c),'bind',a238_0x5b0503(0x1be),a238_0x5b0503(0x1fc)]),MYBATIS_BRANCH_TAGS=new Set(['if','foreach','choose',a238_0x5b0503(0x203),'otherwise']);function a238_0x14d3(){const _0x4a7f7f=['"','Unterminated\x20CDATA\x20section.','outer','<![CDATA[','otherwise','3CzNacE','includes','Unterminated\x20MyBatis\x20XML\x20tag.','SQL\x20content\x20is\x20empty','update','startsWith','DELETE','\x20SET\x20','<','mybatisXml',''','push','<!--','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','length','join','256993WPeoou','parseInt','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','matchAll','indexOf','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','trim','-->','error','7414596JTVbDa','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','isDangerous','1017305OLJrlz','__RABETBASE_MYBATIS_DYNAMIC_START__','property','Invalid\x20MyBatis\x20XML\x20tag.','select','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','split','232912WMtFHP','&','when','238LaqSmZ','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','fromCodePoint','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save',']]>','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Unterminated\x20XML\x20declaration.','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','set','has','16SvtLdG','string','test','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','Unable\x20to\x20detect\x20SQL\x20type.\x20','DDL','keys','INSERT','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','slice','get','59788dBgbSr','sql','584115ecyJEp','delete','Invalid\x20XML\x20entity\x20reference.','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','include','^<\x5cs*(?:','type','6208176LmKlsH','from','exec','SELECT','UPDATE','UNKNOWN','tagName','220jzQMYc','replace','unknown\x20table(s)','toUpperCase','__RABETBASE_MYBATIS_DYNAMIC_END__','where','\x20with\x20parameters:\x20',')\x5cb','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','rawName','match','add','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','foreach','toLowerCase','replaceAll','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'];a238_0x14d3=function(){return _0x4a7f7f;};return a238_0x14d3();}function a238_0x1b08(_0x47b387,_0x346de0){_0x47b387=_0x47b387-0x1b1;const _0x14d365=a238_0x14d3();let _0x1b082d=_0x14d365[_0x47b387];return _0x1b082d;}export const MYBATIS_DYNAMIC_START_MARKER=a238_0x5b0503(0x1fb);export const MYBATIS_DYNAMIC_END_MARKER=a238_0x5b0503(0x1cc);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT='__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',MYBATIS_OUTER_TAG_PATTERN=new RegExp(a238_0x5b0503(0x1bf)+[...MYBATIS_OUTER_TAGS[a238_0x5b0503(0x1b2)]()][a238_0x5b0503(0x1ed)]('|')+a238_0x5b0503(0x1cf),'i');export function normalizeSqlForStaticAnalysis(_0x1c51ba){const _0x439129=a238_0x5b0503,_0x8c0ca5=typeof _0x1c51ba===_0x439129(0x20f)?_0x1c51ba:'';if(!startsWithMybatisStatementWrapper(_0x8c0ca5))return{'sql':_0x8c0ca5,'mode':_0x439129(0x1b9)};let _0x1da474=0x0,_0x18ae1d='',_0x3363b9,_0xf5f5c7=![],_0x23929d=![];const _0x31a9ce=[];while(_0x1da474<_0x8c0ca5[_0x439129(0x1ec)]){if(_0x8c0ca5['startsWith']('<!--',_0x1da474)){const _0x16657a=_0x8c0ca5[_0x439129(0x1f2)](_0x439129(0x1f5),_0x1da474+0x4);if(_0x16657a<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0x18ae1d+='\x20',_0x1da474=_0x16657a+0x3;continue;}if(_0x8c0ca5[_0x439129(0x1e3)](_0x439129(0x1dc),_0x1da474)){if(!_0xf5f5c7||_0x23929d)return invalidMybatisSource(_0x439129(0x211));const _0x275d68=_0x8c0ca5[_0x439129(0x1f2)](_0x439129(0x208),_0x1da474+0x9);if(_0x275d68<0x0)return invalidMybatisSource(_0x439129(0x1da));_0x18ae1d+=_0x8c0ca5[_0x439129(0x1b6)](_0x1da474+0x9,_0x275d68),_0x1da474=_0x275d68+0x3;continue;}if(_0x8c0ca5[_0x439129(0x1e3)]('<?',_0x1da474)){if(_0xf5f5c7)return invalidMybatisSource(_0x439129(0x1eb));const _0x1630cc=_0x8c0ca5[_0x439129(0x1f2)]('?>',_0x1da474+0x2);if(_0x1630cc<0x0)return invalidMybatisSource(_0x439129(0x20a));_0x18ae1d+='\x20',_0x1da474=_0x1630cc+0x2;continue;}if(_0x8c0ca5[_0x1da474]!=='<'){const _0x44a7c5=_0x8c0ca5[_0x439129(0x1f2)]('<',_0x1da474),_0x51088e=_0x44a7c5<0x0?_0x8c0ca5[_0x439129(0x1ec)]:_0x44a7c5,_0x870ceb=_0x8c0ca5[_0x439129(0x1b6)](_0x1da474,_0x51088e);if((!_0xf5f5c7||_0x23929d)&&_0x870ceb[_0x439129(0x1f4)]())return invalidMybatisSource(_0x439129(0x209));if(_0xf5f5c7&&!_0x23929d){const _0x58b005=decodeXmlEntities(_0x870ceb);if(_0x58b005===null)return invalidMybatisSource(_0x439129(0x1bc));_0x18ae1d+=_0x58b005;}else _0x18ae1d+='\x20';_0x1da474=_0x51088e;continue;}const _0x20d09d=findXmlTagEnd(_0x8c0ca5,_0x1da474);if(_0x20d09d<0x0)return invalidMybatisSource(_0x439129(0x1e0));const _0x26f459=_0x8c0ca5[_0x439129(0x1b6)](_0x1da474,_0x20d09d+0x1),_0x301901=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x439129(0x1c3)](_0x26f459);if(!_0x301901)return invalidMybatisSource(_0x439129(0x1fd));const _0x842c4d=_0x301901[0x1]==='/',_0x5ade0a=_0x301901[0x2]??'',_0x411d72=_0x5ade0a[_0x439129(0x1d6)](),_0x2cd93b=_0x301901[0x3]??'',_0x11ffb4=_0x301901[0x4]==='/',_0x463a85=MYBATIS_OUTER_TAGS[_0x439129(0x1b7)](_0x411d72);if(!_0x463a85&&!MYBATIS_DYNAMIC_TAGS[_0x439129(0x20d)](_0x411d72))return invalidMybatisSource(_0x439129(0x1bd)+_0x411d72+'>.');if(!_0x463a85&&_0x5ade0a!==_0x411d72)return invalidMybatisSource(_0x439129(0x1d8)+_0x5ade0a+'>.');if(_0x842c4d){if(_0x2cd93b['trim']()||_0x11ffb4)return invalidMybatisSource(_0x439129(0x1ff)+_0x5ade0a+'>.');const _0x1c51f6=_0x31a9ce['at'](-0x1);if(!_0x1c51f6||(_0x1c51f6[_0x439129(0x1db)]?_0x1c51f6[_0x439129(0x1c7)]!==_0x411d72:_0x1c51f6[_0x439129(0x1d1)]!==_0x5ade0a))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x5ade0a+'>.');_0x31a9ce['pop']();if(_0x1c51f6['outer'])_0x23929d=!![];_0x18ae1d+=MYBATIS_BRANCH_TAGS[_0x439129(0x20d)](_0x411d72)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x2cd93b))return invalidMybatisSource(_0x439129(0x1f0)+_0x5ade0a+'>.');if(_0x411d72===_0x439129(0x1fc)&&(!_0x11ffb4||_0x31a9ce['at'](-0x1)?.[_0x439129(0x1c7)]!==_0x439129(0x1be)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x463a85){if(_0xf5f5c7||_0x31a9ce[_0x439129(0x1ec)]>0x0)return invalidMybatisSource(_0x439129(0x1d4));_0xf5f5c7=!![],_0x23929d=_0x11ffb4,_0x3363b9=_0x463a85;}else{if(!_0xf5f5c7||_0x23929d)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<'+_0x5ade0a+'>.');}_0x18ae1d+=_0x411d72===_0x439129(0x1cd)?'\x20WHERE\x20':_0x411d72==='set'?_0x439129(0x1e5):_0x411d72===_0x439129(0x1be)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x439129(0x20d)](_0x411d72)&&!_0x11ffb4?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x11ffb4&&_0x31a9ce[_0x439129(0x1e9)]({'rawName':_0x5ade0a,'tagName':_0x411d72,'outer':!!_0x463a85});}_0x1da474=_0x20d09d+0x1;}if(_0x31a9ce[_0x439129(0x1ec)]>0x0)return invalidMybatisSource(_0x439129(0x205)+_0x31a9ce['at'](-0x1)?.[_0x439129(0x1d1)]+'>.');if(!_0xf5f5c7||!_0x23929d)return invalidMybatisSource(_0x439129(0x1b5));return{'sql':_0x18ae1d[_0x439129(0x1f4)](),'mode':'mybatisXml',..._0x3363b9?{'statementType':_0x3363b9}:{}};}function hasWellFormedXmlAttributes(_0x49ef66){const _0x2378a3=a238_0x5b0503;let _0x6139c2=0x0;const _0x2a78dc=new Set();while(_0x6139c2<_0x49ef66[_0x2378a3(0x1ec)]){while(_0x6139c2<_0x49ef66['length']&&/\s/[_0x2378a3(0x210)](_0x49ef66[_0x6139c2]??''))_0x6139c2+=0x1;if(_0x6139c2>=_0x49ef66['length'])return!![];const _0x84cb03=/^[A-Za-z_:][\w:.-]*/[_0x2378a3(0x1c3)](_0x49ef66[_0x2378a3(0x1b6)](_0x6139c2)),_0x2762c4=_0x84cb03?.[0x0];if(!_0x2762c4||_0x2a78dc[_0x2378a3(0x20d)](_0x2762c4))return![];_0x2a78dc[_0x2378a3(0x1d3)](_0x2762c4),_0x6139c2+=_0x2762c4['length'];while(_0x6139c2<_0x49ef66[_0x2378a3(0x1ec)]&&/\s/[_0x2378a3(0x210)](_0x49ef66[_0x6139c2]??''))_0x6139c2+=0x1;if(_0x49ef66[_0x6139c2]!=='=')return![];_0x6139c2+=0x1;while(_0x6139c2<_0x49ef66[_0x2378a3(0x1ec)]&&/\s/[_0x2378a3(0x210)](_0x49ef66[_0x6139c2]??''))_0x6139c2+=0x1;const _0x4ad802=_0x49ef66[_0x6139c2];if(_0x4ad802!=='\x22'&&_0x4ad802!=='\x27')return![];_0x6139c2+=0x1;const _0x35cc02=_0x49ef66[_0x2378a3(0x1f2)](_0x4ad802,_0x6139c2);if(_0x35cc02<0x0)return![];if(decodeXmlEntities(_0x49ef66[_0x2378a3(0x1b6)](_0x6139c2,_0x35cc02))===null)return![];_0x6139c2=_0x35cc02+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x32e071){const _0x9ca4d3=a238_0x5b0503;let _0x100df2=0x0;const _0x1dab6b=()=>{const _0x4fae4e=a238_0x1b08;while(_0x100df2<_0x32e071[_0x4fae4e(0x1ec)]&&/\s/['test'](_0x32e071[_0x100df2]??''))_0x100df2+=0x1;};_0x1dab6b();while(_0x100df2<_0x32e071['length']){if(_0x32e071['startsWith'](_0x9ca4d3(0x1ea),_0x100df2)){const _0x224974=_0x32e071[_0x9ca4d3(0x1f2)](_0x9ca4d3(0x1f5),_0x100df2+0x4);if(_0x224974<0x0)return!![];_0x100df2=_0x224974+0x3,_0x1dab6b();continue;}if(_0x32e071[_0x9ca4d3(0x1e3)]('<?',_0x100df2)){const _0x4b9dc2=_0x32e071[_0x9ca4d3(0x1f2)]('?>',_0x100df2+0x2);if(_0x4b9dc2<0x0)return!![];_0x100df2=_0x4b9dc2+0x2,_0x1dab6b();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x9ca4d3(0x210)](_0x32e071[_0x9ca4d3(0x1b6)](_0x100df2));}function invalidMybatisSource(_0x48b0e7){const _0xfbf2ce=a238_0x5b0503;return{'sql':'','mode':_0xfbf2ce(0x1e7),'error':_0x48b0e7};}function findXmlTagEnd(_0x5378a2,_0x72bbf7){const _0x3c606f=a238_0x5b0503;let _0x2bdd85;for(let _0x45b888=_0x72bbf7+0x1;_0x45b888<_0x5378a2[_0x3c606f(0x1ec)];_0x45b888+=0x1){const _0x50faf8=_0x5378a2[_0x45b888];if(_0x2bdd85){if(_0x50faf8===_0x2bdd85)_0x2bdd85=undefined;continue;}if(_0x50faf8==='\x22'||_0x50faf8==='\x27'){_0x2bdd85=_0x50faf8;continue;}if(_0x50faf8==='>')return _0x45b888;}return-0x1;}function decodeXmlEntities(_0x4341dc){const _0x596323=a238_0x5b0503;let _0x12c694=![];const _0x47c521=_0x4341dc[_0x596323(0x1c9)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x23424c=>{const _0x1fb624=_0x596323;if(_0x23424c===_0x1fb624(0x1e6))return'<';if(_0x23424c==='>')return'>';if(_0x23424c===_0x1fb624(0x1d9))return'\x22';if(_0x23424c===_0x1fb624(0x1e8))return'\x27';if(_0x23424c===_0x1fb624(0x202))return'&';const _0x370862=/^&#(?:x([0-9a-f]+)|([0-9]+));$/['exec'](_0x23424c);if(_0x370862){const _0x52596d=_0x370862[0x1],_0x4043d9=_0x370862[0x2],_0x31c1be=Number[_0x1fb624(0x1ef)](_0x52596d??_0x4043d9??'',_0x52596d?0x10:0xa);if(isValidXmlCharacter(_0x31c1be))return String[_0x1fb624(0x206)](_0x31c1be);}return _0x12c694=!![],'';});return _0x12c694?null:_0x47c521;}function isValidXmlCharacter(_0x5a65ee){return _0x5a65ee===0x9||_0x5a65ee===0xa||_0x5a65ee===0xd||_0x5a65ee>=0x20&&_0x5a65ee<=0xd7ff||_0x5a65ee>=0xe000&&_0x5a65ee<=0xfffd||_0x5a65ee>=0x10000&&_0x5a65ee<=0x10ffff;}export function detectSqlType(_0x42b930){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x42b930));}function detectNormalizedSqlType(_0x3c11b4){const _0x3de69f=a238_0x5b0503;if(_0x3c11b4[_0x3de69f(0x1f6)])return{'type':_0x3de69f(0x1c6),'isSelectOnly':![],'isDangerous':![],'reason':_0x3c11b4[_0x3de69f(0x1f6)]};if(!_0x3c11b4['sql'][_0x3de69f(0x1f4)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x3de69f(0x1e1)};const _0x1a0ee2=stripStaticAnalysisMarkers(_0x3c11b4[_0x3de69f(0x1b9)])[_0x3de69f(0x1c9)](/#\{[^}]*\}/g,'?')[_0x3de69f(0x1c9)](/\$\{[^}]*\}/g,'?')[_0x3de69f(0x1c9)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x3de69f(0x1c9)](/\/\*[\s\S]*?\*\//g,'')[_0x3de69f(0x1f4)](),_0x5c6c14=_0x1a0ee2[_0x3de69f(0x200)]('\x0a');let _0x289c00='';for(const _0x374c49 of _0x5c6c14){const _0x2ceff8=_0x374c49[_0x3de69f(0x1f4)]();if(!_0x2ceff8||_0x2ceff8['startsWith']('--')||_0x2ceff8[_0x3de69f(0x1e3)]('/*'))continue;_0x289c00=_0x2ceff8;break;}const _0x24271a=_0x289c00[_0x3de69f(0x1cb)](),_0x5e2a57=_0x3c11b4['statementType'],_0x5454e2=maskSqlTextForBlockedKeywordScan(_0x1a0ee2),_0x4aa834=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3de69f(0x210)](_0x5454e2);if(_0x5e2a57===_0x3de69f(0x1c4)||!_0x5e2a57&&(_0x24271a[_0x3de69f(0x1e3)](_0x3de69f(0x1c4))||_0x24271a['startsWith']('WITH'))){const _0x4192ae=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3de69f(0x210)](_0x1a0ee2);return{'type':'SELECT','isSelectOnly':!_0x4192ae,'isDangerous':_0x4192ae,'reason':_0x4192ae?_0x3de69f(0x1d0):undefined};}if(_0x5e2a57===_0x3de69f(0x1b3)||!_0x5e2a57&&_0x24271a[_0x3de69f(0x1e3)]('INSERT'))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x4aa834,'reason':_0x4aa834?_0x3de69f(0x1b4):undefined};if(_0x5e2a57===_0x3de69f(0x1c5)||!_0x5e2a57&&_0x24271a[_0x3de69f(0x1e3)](_0x3de69f(0x1c5)))return{'type':_0x3de69f(0x1c5),'isSelectOnly':![],'isDangerous':_0x4aa834,'reason':_0x4aa834?_0x3de69f(0x1b4):undefined};if(_0x5e2a57===_0x3de69f(0x1e4)||!_0x5e2a57&&_0x24271a[_0x3de69f(0x1e3)](_0x3de69f(0x1e4)))return{'type':_0x3de69f(0x1e4),'isSelectOnly':![],'isDangerous':!![],'reason':_0x3de69f(0x207)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x3de69f(0x210)](_0x24271a))return{'type':_0x3de69f(0x1b1),'isSelectOnly':![],'isDangerous':!![],'reason':_0x3de69f(0x1f3)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x12c419){const _0xe3ac0c=a238_0x5b0503;return _0x12c419[_0xe3ac0c(0x1d7)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0xe3ac0c(0x1d7)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x3b2cb7){const _0x4344b1=a238_0x5b0503;return _0x3b2cb7[_0x4344b1(0x1c9)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x4344b1(0x1c9)](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x4344b1(0x1c9)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x4344b1(0x1c9)](/--.*$/gm,'\x20')[_0x4344b1(0x1c9)](/#.*$/gm,'\x20')['replace'](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x2c5406){const _0x4368a6=a238_0x5b0503,_0x3b1044=_0x2c5406[_0x4368a6(0x1c9)](/#\{[^}]*\}/g,'?')[_0x4368a6(0x1c9)](/\$\{[^}]*\}/g,'?')[_0x4368a6(0x1c9)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x4368a6(0x1c9)](/\/\*[\s\S]*?\*\//g,''),_0x530dec=[],_0x288747=_0x3b1044[_0x4368a6(0x1d2)](/FROM\s+([^\s,)(]+)/i);addTable(_0x530dec,_0x288747?.[0x1]);for(const _0x383167 of _0x3b1044[_0x4368a6(0x1f1)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x530dec,_0x383167[0x1]);}const _0x45016b=_0x3b1044[_0x4368a6(0x1d2)](/INTO\s+([^\s(]+)/i);addTable(_0x530dec,_0x45016b?.[0x1]);const _0x254dad=_0x3b1044[_0x4368a6(0x1d2)](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x530dec,_0x254dad?.[0x1]),_0x530dec;}function addTable(_0x44606e,_0x270b46){const _0x229cb9=a238_0x5b0503,_0x3e9bf9=_0x270b46?.[_0x229cb9(0x1c9)](/[`"]/g,'');_0x3e9bf9&&_0x3e9bf9!==UNRESOLVED_SQL_FRAGMENT&&!_0x44606e[_0x229cb9(0x1df)](_0x3e9bf9)&&_0x44606e[_0x229cb9(0x1e9)](_0x3e9bf9);}function extractParameters(_0x47668e){const _0x3506fa=a238_0x5b0503,_0x18ae01=new Set();for(const _0x38ff82 of _0x47668e[_0x3506fa(0x1f1)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x38ff82[0x1])_0x18ae01[_0x3506fa(0x1d3)](_0x38ff82[0x1]);}return Array[_0x3506fa(0x1c2)](_0x18ae01);}export function validateSql(_0x1b5806){const _0x3a8894=a238_0x5b0503,_0x152325=normalizeSqlForStaticAnalysis(_0x1b5806),_0x245e3d=detectNormalizedSqlType(_0x152325),_0x4254a2=stripStaticAnalysisMarkers(_0x152325[_0x3a8894(0x1b9)]),_0x298363=_0x152325[_0x3a8894(0x1f6)]?[]:extractTables(_0x4254a2),_0x2e4b3c=_0x152325[_0x3a8894(0x1f6)]?[]:extractParameters(_0x4254a2);if(_0x245e3d[_0x3a8894(0x1f9)])return{'valid':![],'sqlType':_0x245e3d,'tables':_0x298363,'parameters':_0x2e4b3c,'message':_0x245e3d['reason']||_0x245e3d['type']+_0x3a8894(0x1f8)};if(_0x245e3d[_0x3a8894(0x1c0)]===_0x3a8894(0x1c6))return{'valid':![],'sqlType':_0x245e3d,'tables':_0x298363,'parameters':_0x2e4b3c,'message':_0x152325[_0x3a8894(0x1f6)]?_0x3a8894(0x212)+_0x152325[_0x3a8894(0x1f6)]:_0x3a8894(0x20b)};return{'valid':!![],'sqlType':_0x245e3d,'tables':_0x298363,'parameters':_0x2e4b3c,'message':_0x245e3d[_0x3a8894(0x1c0)]+'\x20query\x20targeting\x20'+(_0x298363[_0x3a8894(0x1ec)]?_0x298363[_0x3a8894(0x1ed)](',\x20'):_0x3a8894(0x1ca))+(_0x2e4b3c['length']?_0x3a8894(0x1ce)+_0x2e4b3c[_0x3a8894(0x1ed)](',\x20'):'')};}
|
|
1
|
+
const a238_0x5ef39d=a238_0x3fe4;(function(_0x1c1d96,_0x3e9c5a){const _0x2ec155=a238_0x3fe4,_0x3bec70=_0x1c1d96();while(!![]){try{const _0x23ef5c=-parseInt(_0x2ec155(0x1c6))/0x1*(-parseInt(_0x2ec155(0x1aa))/0x2)+parseInt(_0x2ec155(0x1b1))/0x3+-parseInt(_0x2ec155(0x18d))/0x4*(parseInt(_0x2ec155(0x196))/0x5)+-parseInt(_0x2ec155(0x1a8))/0x6+parseInt(_0x2ec155(0x1a7))/0x7*(-parseInt(_0x2ec155(0x183))/0x8)+parseInt(_0x2ec155(0x191))/0x9+parseInt(_0x2ec155(0x182))/0xa;if(_0x23ef5c===_0x3e9c5a)break;else _0x3bec70['push'](_0x3bec70['shift']());}catch(_0x539a03){_0x3bec70['push'](_0x3bec70['shift']());}}}(a238_0x35f1,0x8a722));const MYBATIS_OUTER_TAGS=new Map([[a238_0x5ef39d(0x1c5),a238_0x5ef39d(0x16b)],[a238_0x5ef39d(0x1ad),a238_0x5ef39d(0x1c1)],[a238_0x5ef39d(0x1b0),a238_0x5ef39d(0x1bd)],[a238_0x5ef39d(0x18a),a238_0x5ef39d(0x177)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a238_0x5ef39d(0x16f),a238_0x5ef39d(0x16e),'choose','when',a238_0x5ef39d(0x169),'trim',a238_0x5ef39d(0x168),a238_0x5ef39d(0x188),a238_0x5ef39d(0x1a9),a238_0x5ef39d(0x19d)]),MYBATIS_BRANCH_TAGS=new Set(['if','foreach',a238_0x5ef39d(0x199),a238_0x5ef39d(0x192),'otherwise']);export const MYBATIS_DYNAMIC_START_MARKER=a238_0x5ef39d(0x176);export const MYBATIS_DYNAMIC_END_MARKER=a238_0x5ef39d(0x195);function a238_0x35f1(){const _0x33ac03=['Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','statementType','INSERT','rawName','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','select','31ZZFpWR','set','otherwise','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','SELECT','Unterminated\x20XML\x20declaration.','Invalid\x20MyBatis\x20XML\x20tag.','foreach','where','startsWith','type','matchAll','error','tagName','from','__RABETBASE_MYBATIS_DYNAMIC_START__','DELETE','UNKNOWN','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','"','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','push','DDL','<![CDATA[','get','slice','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','17524540FggTWR','8770544TstFrU','WITH','&','unknown\x20table(s)','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','bind','has','delete','Invalid\x20XML\x20entity\x20reference.','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','30252mnozPi','replaceAll','test','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','6504903nPhTjV','when','-->','<','__RABETBASE_MYBATIS_DYNAMIC_END__','430cFtlNg',']]>','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','choose','add','trim','indexOf','property','>','keys',''','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','outer','mybatisXml','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','<!--','\x20with\x20parameters:\x20','7kyMsrw','5182482WQHaZQ','include','31264YRwYVo','exec','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','insert','\x20WHERE\x20',')\x5cb','update','653232jAcLFi','fromCodePoint','join','\x20query\x20targeting\x20','toUpperCase','sql','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','replace','split','match','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','length','UPDATE','toLowerCase'];a238_0x35f1=function(){return _0x33ac03;};return a238_0x35f1();}export const MYBATIS_INCLUDE_MARKER=a238_0x5ef39d(0x16a);const UNRESOLVED_SQL_FRAGMENT=a238_0x5ef39d(0x1c3),MYBATIS_OUTER_TAG_PATTERN=new RegExp('^<\x5cs*(?:'+[...MYBATIS_OUTER_TAGS[a238_0x5ef39d(0x19f)]()][a238_0x5ef39d(0x1b3)]('|')+a238_0x5ef39d(0x1af),'i');export function normalizeSqlForStaticAnalysis(_0x55dcab){const _0x380762=a238_0x5ef39d,_0x260222=typeof _0x55dcab==='string'?_0x55dcab:'';if(!startsWithMybatisStatementWrapper(_0x260222))return{'sql':_0x260222,'mode':_0x380762(0x1b6)};let _0x54b902=0x0,_0x560611='',_0x3d657f,_0x11ba2c=![],_0x3bcc03=![];const _0x253b2d=[];while(_0x54b902<_0x260222[_0x380762(0x1bc)]){if(_0x260222[_0x380762(0x170)](_0x380762(0x1a5),_0x54b902)){const _0x1ce886=_0x260222[_0x380762(0x19c)](_0x380762(0x193),_0x54b902+0x4);if(_0x1ce886<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0x560611+='\x20',_0x54b902=_0x1ce886+0x3;continue;}if(_0x260222[_0x380762(0x170)](_0x380762(0x17e),_0x54b902)){if(!_0x11ba2c||_0x3bcc03)return invalidMybatisSource('CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');const _0x407d6c=_0x260222['indexOf'](_0x380762(0x197),_0x54b902+0x9);if(_0x407d6c<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x560611+=_0x260222[_0x380762(0x180)](_0x54b902+0x9,_0x407d6c),_0x54b902=_0x407d6c+0x3;continue;}if(_0x260222[_0x380762(0x170)]('<?',_0x54b902)){if(_0x11ba2c)return invalidMybatisSource(_0x380762(0x179));const _0x12f92f=_0x260222[_0x380762(0x19c)]('?>',_0x54b902+0x2);if(_0x12f92f<0x0)return invalidMybatisSource(_0x380762(0x16c));_0x560611+='\x20',_0x54b902=_0x12f92f+0x2;continue;}if(_0x260222[_0x54b902]!=='<'){const _0x3d148d=_0x260222['indexOf']('<',_0x54b902),_0x3f73e7=_0x3d148d<0x0?_0x260222[_0x380762(0x1bc)]:_0x3d148d,_0x1e9817=_0x260222[_0x380762(0x180)](_0x54b902,_0x3f73e7);if((!_0x11ba2c||_0x3bcc03)&&_0x1e9817[_0x380762(0x19b)]())return invalidMybatisSource(_0x380762(0x1ac));if(_0x11ba2c&&!_0x3bcc03){const _0x2dfb9e=decodeXmlEntities(_0x1e9817);if(_0x2dfb9e===null)return invalidMybatisSource(_0x380762(0x18b));_0x560611+=_0x2dfb9e;}else _0x560611+='\x20';_0x54b902=_0x3f73e7;continue;}const _0x179b05=findXmlTagEnd(_0x260222,_0x54b902);if(_0x179b05<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x1ad399=_0x260222[_0x380762(0x180)](_0x54b902,_0x179b05+0x1),_0x829b85=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/['exec'](_0x1ad399);if(!_0x829b85)return invalidMybatisSource(_0x380762(0x16d));const _0x17a8dd=_0x829b85[0x1]==='/',_0x47ec6f=_0x829b85[0x2]??'',_0x575e30=_0x47ec6f[_0x380762(0x1be)](),_0x1b7305=_0x829b85[0x3]??'',_0x233885=_0x829b85[0x4]==='/',_0x5b304a=MYBATIS_OUTER_TAGS[_0x380762(0x17f)](_0x575e30);if(!_0x5b304a&&!MYBATIS_DYNAMIC_TAGS[_0x380762(0x189)](_0x575e30))return invalidMybatisSource(_0x380762(0x1a4)+_0x575e30+'>.');if(!_0x5b304a&&_0x47ec6f!==_0x575e30)return invalidMybatisSource(_0x380762(0x1c4)+_0x47ec6f+'>.');if(_0x17a8dd){if(_0x1b7305[_0x380762(0x19b)]()||_0x233885)return invalidMybatisSource(_0x380762(0x187)+_0x47ec6f+'>.');const _0x3c024e=_0x253b2d['at'](-0x1);if(!_0x3c024e||(_0x3c024e[_0x380762(0x1a2)]?_0x3c024e[_0x380762(0x174)]!==_0x575e30:_0x3c024e[_0x380762(0x1c2)]!==_0x47ec6f))return invalidMybatisSource(_0x380762(0x1bf)+_0x47ec6f+'>.');_0x253b2d['pop']();if(_0x3c024e[_0x380762(0x1a2)])_0x3bcc03=!![];_0x560611+=MYBATIS_BRANCH_TAGS[_0x380762(0x189)](_0x575e30)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x1b7305))return invalidMybatisSource(_0x380762(0x1a1)+_0x47ec6f+'>.');if(_0x575e30===_0x380762(0x19d)&&(!_0x233885||_0x253b2d['at'](-0x1)?.['tagName']!==_0x380762(0x1a9)))return invalidMybatisSource('MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.');if(_0x5b304a){if(_0x11ba2c||_0x253b2d[_0x380762(0x1bc)]>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x11ba2c=!![],_0x3bcc03=_0x233885,_0x3d657f=_0x5b304a;}else{if(!_0x11ba2c||_0x3bcc03)return invalidMybatisSource(_0x380762(0x1b7)+_0x47ec6f+'>.');}_0x560611+=_0x575e30==='where'?_0x380762(0x1ae):_0x575e30===_0x380762(0x168)?'\x20SET\x20':_0x575e30===_0x380762(0x1a9)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x380762(0x189)](_0x575e30)&&!_0x233885?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x233885&&_0x253b2d['push']({'rawName':_0x47ec6f,'tagName':_0x575e30,'outer':!!_0x5b304a});}_0x54b902=_0x179b05+0x1;}if(_0x253b2d['length']>0x0)return invalidMybatisSource(_0x380762(0x1bb)+_0x253b2d['at'](-0x1)?.[_0x380762(0x1c2)]+'>.');if(!_0x11ba2c||!_0x3bcc03)return invalidMybatisSource(_0x380762(0x18c));return{'sql':_0x560611['trim'](),'mode':_0x380762(0x1a3),..._0x3d657f?{'statementType':_0x3d657f}:{}};}function hasWellFormedXmlAttributes(_0x2e52b9){const _0x830a64=a238_0x5ef39d;let _0x263119=0x0;const _0xa37c00=new Set();while(_0x263119<_0x2e52b9['length']){while(_0x263119<_0x2e52b9['length']&&/\s/[_0x830a64(0x18f)](_0x2e52b9[_0x263119]??''))_0x263119+=0x1;if(_0x263119>=_0x2e52b9['length'])return!![];const _0x29747b=/^[A-Za-z_:][\w:.-]*/[_0x830a64(0x1ab)](_0x2e52b9[_0x830a64(0x180)](_0x263119)),_0x8a0cac=_0x29747b?.[0x0];if(!_0x8a0cac||_0xa37c00[_0x830a64(0x189)](_0x8a0cac))return![];_0xa37c00['add'](_0x8a0cac),_0x263119+=_0x8a0cac['length'];while(_0x263119<_0x2e52b9['length']&&/\s/['test'](_0x2e52b9[_0x263119]??''))_0x263119+=0x1;if(_0x2e52b9[_0x263119]!=='=')return![];_0x263119+=0x1;while(_0x263119<_0x2e52b9[_0x830a64(0x1bc)]&&/\s/[_0x830a64(0x18f)](_0x2e52b9[_0x263119]??''))_0x263119+=0x1;const _0x883f79=_0x2e52b9[_0x263119];if(_0x883f79!=='\x22'&&_0x883f79!=='\x27')return![];_0x263119+=0x1;const _0x8a560d=_0x2e52b9[_0x830a64(0x19c)](_0x883f79,_0x263119);if(_0x8a560d<0x0)return![];if(decodeXmlEntities(_0x2e52b9['slice'](_0x263119,_0x8a560d))===null)return![];_0x263119=_0x8a560d+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x555e6d){const _0x351347=a238_0x5ef39d;let _0x1d7ad1=0x0;const _0x1904f7=()=>{const _0x1c9fb5=a238_0x3fe4;while(_0x1d7ad1<_0x555e6d[_0x1c9fb5(0x1bc)]&&/\s/[_0x1c9fb5(0x18f)](_0x555e6d[_0x1d7ad1]??''))_0x1d7ad1+=0x1;};_0x1904f7();while(_0x1d7ad1<_0x555e6d['length']){if(_0x555e6d['startsWith'](_0x351347(0x1a5),_0x1d7ad1)){const _0xf17c46=_0x555e6d[_0x351347(0x19c)](_0x351347(0x193),_0x1d7ad1+0x4);if(_0xf17c46<0x0)return!![];_0x1d7ad1=_0xf17c46+0x3,_0x1904f7();continue;}if(_0x555e6d[_0x351347(0x170)]('<?',_0x1d7ad1)){const _0x32565d=_0x555e6d['indexOf']('?>',_0x1d7ad1+0x2);if(_0x32565d<0x0)return!![];_0x1d7ad1=_0x32565d+0x2,_0x1904f7();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x351347(0x18f)](_0x555e6d['slice'](_0x1d7ad1));}function invalidMybatisSource(_0x2eb720){const _0xb9a0c8=a238_0x5ef39d;return{'sql':'','mode':_0xb9a0c8(0x1a3),'error':_0x2eb720};}function findXmlTagEnd(_0x52c284,_0x5db3e4){const _0xfef338=a238_0x5ef39d;let _0x2e06d1;for(let _0x39d7a7=_0x5db3e4+0x1;_0x39d7a7<_0x52c284[_0xfef338(0x1bc)];_0x39d7a7+=0x1){const _0x386db7=_0x52c284[_0x39d7a7];if(_0x2e06d1){if(_0x386db7===_0x2e06d1)_0x2e06d1=undefined;continue;}if(_0x386db7==='\x22'||_0x386db7==='\x27'){_0x2e06d1=_0x386db7;continue;}if(_0x386db7==='>')return _0x39d7a7;}return-0x1;}function decodeXmlEntities(_0x170104){const _0x43834f=a238_0x5ef39d;let _0x511f06=![];const _0x1d48f1=_0x170104[_0x43834f(0x1b8)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0x225584=>{const _0x56d253=_0x43834f;if(_0x225584===_0x56d253(0x194))return'<';if(_0x225584===_0x56d253(0x19e))return'>';if(_0x225584===_0x56d253(0x17a))return'\x22';if(_0x225584===_0x56d253(0x1a0))return'\x27';if(_0x225584===_0x56d253(0x185))return'&';const _0x22e2c8=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x56d253(0x1ab)](_0x225584);if(_0x22e2c8){const _0x4802c7=_0x22e2c8[0x1],_0x5a88a0=_0x22e2c8[0x2],_0x5c54ad=Number['parseInt'](_0x4802c7??_0x5a88a0??'',_0x4802c7?0x10:0xa);if(isValidXmlCharacter(_0x5c54ad))return String[_0x56d253(0x1b2)](_0x5c54ad);}return _0x511f06=!![],'';});return _0x511f06?null:_0x1d48f1;}function isValidXmlCharacter(_0x16dfc3){return _0x16dfc3===0x9||_0x16dfc3===0xa||_0x16dfc3===0xd||_0x16dfc3>=0x20&&_0x16dfc3<=0xd7ff||_0x16dfc3>=0xe000&&_0x16dfc3<=0xfffd||_0x16dfc3>=0x10000&&_0x16dfc3<=0x10ffff;}export function detectSqlType(_0x1a9d43){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x1a9d43));}function detectNormalizedSqlType(_0x18cb25){const _0x39ef98=a238_0x5ef39d;if(_0x18cb25[_0x39ef98(0x173)])return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':_0x18cb25['error']};if(!_0x18cb25[_0x39ef98(0x1b6)][_0x39ef98(0x19b)]())return{'type':_0x39ef98(0x178),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x3283c6=stripStaticAnalysisMarkers(_0x18cb25[_0x39ef98(0x1b6)])[_0x39ef98(0x1b8)](/#\{[^}]*\}/g,'?')[_0x39ef98(0x1b8)](/\$\{[^}]*\}/g,'?')[_0x39ef98(0x1b8)](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x39ef98(0x19b)](),_0xf73bbc=_0x3283c6[_0x39ef98(0x1b9)]('\x0a');let _0x16c888='';for(const _0x585de7 of _0xf73bbc){const _0x4c5325=_0x585de7['trim']();if(!_0x4c5325||_0x4c5325['startsWith']('--')||_0x4c5325[_0x39ef98(0x170)]('/*'))continue;_0x16c888=_0x4c5325;break;}const _0xb3ee04=_0x16c888[_0x39ef98(0x1b5)](),_0x4b826b=_0x18cb25[_0x39ef98(0x1c0)],_0xf43f6b=maskSqlTextForBlockedKeywordScan(_0x3283c6),_0x3e46c3=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x39ef98(0x18f)](_0xf43f6b);if(_0x4b826b==='SELECT'||!_0x4b826b&&(_0xb3ee04[_0x39ef98(0x170)]('SELECT')||_0xb3ee04[_0x39ef98(0x170)](_0x39ef98(0x184)))){const _0x233179=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x39ef98(0x18f)](_0x3283c6);return{'type':_0x39ef98(0x16b),'isSelectOnly':!_0x233179,'isDangerous':_0x233179,'reason':_0x233179?_0x39ef98(0x181):undefined};}if(_0x4b826b==='INSERT'||!_0x4b826b&&_0xb3ee04[_0x39ef98(0x170)](_0x39ef98(0x1c1)))return{'type':_0x39ef98(0x1c1),'isSelectOnly':![],'isDangerous':_0x3e46c3,'reason':_0x3e46c3?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x4b826b===_0x39ef98(0x1bd)||!_0x4b826b&&_0xb3ee04[_0x39ef98(0x170)](_0x39ef98(0x1bd)))return{'type':_0x39ef98(0x1bd),'isSelectOnly':![],'isDangerous':_0x3e46c3,'reason':_0x3e46c3?_0x39ef98(0x17b):undefined};if(_0x4b826b===_0x39ef98(0x177)||!_0x4b826b&&_0xb3ee04['startsWith'](_0x39ef98(0x177)))return{'type':_0x39ef98(0x177),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0xb3ee04))return{'type':_0x39ef98(0x17d),'isSelectOnly':![],'isDangerous':!![],'reason':_0x39ef98(0x198)};return{'type':_0x39ef98(0x178),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x130482){const _0x2bd3f6=a238_0x5ef39d;return _0x130482[_0x2bd3f6(0x18e)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x2bd3f6(0x18e)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x265a6a){const _0xa97d9e=a238_0x5ef39d;return _0x265a6a[_0xa97d9e(0x1b8)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')[_0xa97d9e(0x1b8)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0xa97d9e(0x1b8)](/--.*$/gm,'\x20')['replace'](/#.*$/gm,'\x20')[_0xa97d9e(0x1b8)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0xa46620){const _0x3d455e=a238_0x5ef39d,_0x5a69f8=_0xa46620['replace'](/#\{[^}]*\}/g,'?')[_0x3d455e(0x1b8)](/\$\{[^}]*\}/g,'?')[_0x3d455e(0x1b8)](/'[^']*'/g,'\x27\x27')[_0x3d455e(0x1b8)](/--.*$/gm,'')[_0x3d455e(0x1b8)](/\/\*[\s\S]*?\*\//g,''),_0x142923=[],_0x232313=_0x5a69f8[_0x3d455e(0x1ba)](/FROM\s+([^\s,)(]+)/i);addTable(_0x142923,_0x232313?.[0x1]);for(const _0x249379 of _0x5a69f8[_0x3d455e(0x172)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x142923,_0x249379[0x1]);}const _0x383282=_0x5a69f8[_0x3d455e(0x1ba)](/INTO\s+([^\s(]+)/i);addTable(_0x142923,_0x383282?.[0x1]);const _0x4e7636=_0x5a69f8['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x142923,_0x4e7636?.[0x1]),_0x142923;}function a238_0x3fe4(_0x68081e,_0x3becce){_0x68081e=_0x68081e-0x168;const _0x35f180=a238_0x35f1();let _0x3fe4cd=_0x35f180[_0x68081e];return _0x3fe4cd;}function addTable(_0x1400f1,_0x294ca0){const _0x3898ec=a238_0x5ef39d,_0x31290d=_0x294ca0?.[_0x3898ec(0x1b8)](/[`"]/g,'');_0x31290d&&_0x31290d!==UNRESOLVED_SQL_FRAGMENT&&!_0x1400f1['includes'](_0x31290d)&&_0x1400f1[_0x3898ec(0x17c)](_0x31290d);}function extractParameters(_0x3f98a1){const _0x4becbd=a238_0x5ef39d,_0x35756e=new Set();for(const _0x3976ae of _0x3f98a1[_0x4becbd(0x172)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x3976ae[0x1])_0x35756e[_0x4becbd(0x19a)](_0x3976ae[0x1]);}return Array[_0x4becbd(0x175)](_0x35756e);}export function validateSql(_0x2c1c77){const _0x1fc96a=a238_0x5ef39d,_0x23c505=normalizeSqlForStaticAnalysis(_0x2c1c77),_0x43508f=detectNormalizedSqlType(_0x23c505),_0x5d144c=stripStaticAnalysisMarkers(_0x23c505['sql']),_0x14d925=_0x23c505[_0x1fc96a(0x173)]?[]:extractTables(_0x5d144c),_0x503feb=_0x23c505[_0x1fc96a(0x173)]?[]:extractParameters(_0x5d144c);if(_0x43508f['isDangerous'])return{'valid':![],'sqlType':_0x43508f,'tables':_0x14d925,'parameters':_0x503feb,'message':_0x43508f['reason']||_0x43508f[_0x1fc96a(0x171)]+'\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.'};if(_0x43508f[_0x1fc96a(0x171)]==='UNKNOWN')return{'valid':![],'sqlType':_0x43508f,'tables':_0x14d925,'parameters':_0x503feb,'message':_0x23c505[_0x1fc96a(0x173)]?'Unable\x20to\x20detect\x20SQL\x20type.\x20'+_0x23c505[_0x1fc96a(0x173)]:_0x1fc96a(0x190)};return{'valid':!![],'sqlType':_0x43508f,'tables':_0x14d925,'parameters':_0x503feb,'message':_0x43508f['type']+_0x1fc96a(0x1b4)+(_0x14d925[_0x1fc96a(0x1bc)]?_0x14d925[_0x1fc96a(0x1b3)](',\x20'):_0x1fc96a(0x186))+(_0x503feb[_0x1fc96a(0x1bc)]?_0x1fc96a(0x1a6)+_0x503feb[_0x1fc96a(0x1b3)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a239_0x109874=a239_0x5ae8;(function(_0x383a2c,_0x389764){const _0x5bc20d=a239_0x5ae8,_0x53a5c8=_0x383a2c();while(!![]){try{const _0x1f6250=parseInt(_0x5bc20d(0x11f))/0x1*(parseInt(_0x5bc20d(0x126))/0x2)+-parseInt(_0x5bc20d(0x120))/0x3+parseInt(_0x5bc20d(0x124))/0x4+-parseInt(_0x5bc20d(0x127))/0x5*(parseInt(_0x5bc20d(0x125))/0x6)+-parseInt(_0x5bc20d(0x123))/0x7+parseInt(_0x5bc20d(0x128))/0x8+-parseInt(_0x5bc20d(0x129))/0x9;if(_0x1f6250===_0x389764)break;else _0x53a5c8['push'](_0x53a5c8['shift']());}catch(_0x135c05){_0x53a5c8['push'](_0x53a5c8['shift']());}}}(a239_0x3553,0x4e183));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a239_0x5ae8(_0x5d52b6,_0x51c06e){_0x5d52b6=_0x5d52b6-0x11c;const _0x3553ba=a239_0x3553();let _0x5ae824=_0x3553ba[_0x5d52b6];return _0x5ae824;}import{CLI_BIN_NAME}from'./constant/cli.js';function a239_0x3553(){const _0x3e39ae=['\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','Run\x20`','Tip:\x20`','join','11bkMQey','1279131xGEzmH','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','666288AORAiy','1463164CGsssB','45282MmcLKR','51026rqUbSR','70MLoZlm','4154328eqrJJY','1967679IeDQKF','Set\x20appcode\x20via\x20`'];a239_0x3553=function(){return _0x3e39ae;};return a239_0x3553();}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a239_0x109874(0x11c)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a239_0x109874(0x12a)+CLI_BIN_NAME+a239_0x109874(0x12b),a239_0x109874(0x11d)+CLI_BIN_NAME+a239_0x109874(0x122)][a239_0x109874(0x11e)]('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':a239_0x109874(0x121)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c0617,_0x502561){const _0x2b99ad=a240_0x548f,_0x178e4b=_0x1c0617();while(!![]){try{const _0x3d4fca=-parseInt(_0x2b99ad(0x10b))/0x1*(parseInt(_0x2b99ad(0x103))/0x2)+-parseInt(_0x2b99ad(0x108))/0x3*(parseInt(_0x2b99ad(0x109))/0x4)+parseInt(_0x2b99ad(0x102))/0x5+-parseInt(_0x2b99ad(0x104))/0x6*(-parseInt(_0x2b99ad(0x101))/0x7)+-parseInt(_0x2b99ad(0x10a))/0x8*(parseInt(_0x2b99ad(0x10c))/0x9)+-parseInt(_0x2b99ad(0x107))/0xa+parseInt(_0x2b99ad(0x100))/0xb*(parseInt(_0x2b99ad(0x105))/0xc);if(_0x3d4fca===_0x502561)break;else _0x178e4b['push'](_0x178e4b['shift']());}catch(_0xfa3ebd){_0x178e4b['push'](_0x178e4b['shift']());}}}(a240_0x1c94,0x78f06));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a240_0x4204cd}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a240_0x1c94(){const _0x148945=['2988wFmsXm','36eQJIzm','36YwpYsJ','map','1179280aGjrxz','24501tXwTay','44SrHVkY','24COWUGT','521bzdcwa','1284831GFIImX','yes','6103196ctYKQx','167069ZZoOSB','510360CrEeOm'];a240_0x1c94=function(){return _0x148945;};return a240_0x1c94();}function a240_0x548f(_0x393b87,_0x4b92b1){_0x393b87=_0x393b87-0xff;const _0x1c94d3=a240_0x1c94();let _0x548f84=_0x1c94d3[_0x393b87];return _0x548f84;}export function buildAllFlags(_0x41c917){const _0x31041a=a240_0x548f,_0x5e86f8=a240_0x4204cd(_0x41c917,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x41c917))return _0x5e86f8;return _0x5e86f8[_0x31041a(0x106)](_0x387cc2=>_0x387cc2['name']===_0x31041a(0xff)?{..._0x387cc2,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x387cc2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13a5ec,_0x3d97c5){var _0x51bde0=a241_0xf5ce,_0x9228b7=_0x13a5ec();while(!![]){try{var _0x418f5a=parseInt(_0x51bde0(0x68))/0x1+parseInt(_0x51bde0(0x72))/0x2+parseInt(_0x51bde0(0x74))/0x3*(parseInt(_0x51bde0(0x6f))/0x4)+parseInt(_0x51bde0(0x69))/0x5+parseInt(_0x51bde0(0x70))/0x6+-parseInt(_0x51bde0(0x75))/0x7*(-parseInt(_0x51bde0(0x73))/0x8)+-parseInt(_0x51bde0(0x76))/0x9*(parseInt(_0x51bde0(0x6d))/0xa);if(_0x418f5a===_0x3d97c5)break;else _0x9228b7['push'](_0x9228b7['shift']());}catch(_0x44b62e){_0x9228b7['push'](_0x9228b7['shift']());}}}(a241_0x3ca0,0x66744));function a241_0xf5ce(_0x4619bf,_0x1aa70e){_0x4619bf=_0x4619bf-0x68;var _0x3ca0e2=a241_0x3ca0();var _0xf5ce5e=_0x3ca0e2[_0x4619bf];return _0xf5ce5e;}import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x7011af){var _0xf4e25=a241_0xf5ce;return _0x7011af?.[_0xf4e25(0x6c)]===!![];}function a241_0x3ca0(){var _0x5ab71f=['def','418860omQQbx','1498650dOZvFS','compress','833236FEzKTd','8ebzPTi','15KLXupS','211631gkcGXT','3691719opsOGS','defaultFormat','763088Qiozqe','2436590ksRKwu','format','flags','structuredErrors','50xNXwAo'];a241_0x3ca0=function(){return _0x5ab71f;};return a241_0x3ca0();}export function resolveErrorOutputFormat(_0xe7eecb){var _0x491bdf=a241_0xf5ce;if(!_0xe7eecb[_0x491bdf(0x6e)])return _0xe7eecb[_0x491bdf(0x77)]??_0x491bdf(0x71);return resolveOutputConfig({'flags':_0xe7eecb[_0x491bdf(0x6b)]??{},'def':_0xe7eecb['def'],'configDefault':_0xe7eecb[_0x491bdf(0x77)]})[_0x491bdf(0x6a)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a242_0x439d(_0x2c1520,_0x4b5519){_0x2c1520=_0x2c1520-0x69;const _0x4235b8=a242_0x4235();let _0x439d59=_0x4235b8[_0x2c1520];return _0x439d59;}const a242_0x49fba8=a242_0x439d;(function(_0x3568c6,_0x2023f6){const _0x1d07f0=a242_0x439d,_0x5518ba=_0x3568c6();while(!![]){try{const _0x57a4b2=parseInt(_0x1d07f0(0x74))/0x1+-parseInt(_0x1d07f0(0x79))/0x2+parseInt(_0x1d07f0(0x6c))/0x3+parseInt(_0x1d07f0(0x75))/0x4+-parseInt(_0x1d07f0(0x6a))/0x5+parseInt(_0x1d07f0(0x71))/0x6*(-parseInt(_0x1d07f0(0x76))/0x7)+parseInt(_0x1d07f0(0x69))/0x8*(parseInt(_0x1d07f0(0x73))/0x9);if(_0x57a4b2===_0x2023f6)break;else _0x5518ba['push'](_0x5518ba['shift']());}catch(_0x295fe4){_0x5518ba['push'](_0x5518ba['shift']());}}}(a242_0x4235,0xe68ba));const EXPLICIT_YES_COMMANDS=new Set([a242_0x49fba8(0x6e),a242_0x49fba8(0x78),a242_0x49fba8(0x70),a242_0x49fba8(0x6f)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a242_0x49fba8(0x6d);export function requiresExplicitYes(_0x378452){const _0x2c7f2a=a242_0x49fba8;return EXPLICIT_YES_COMMANDS[_0x2c7f2a(0x72)](_0x378452[_0x2c7f2a(0x6b)]+'\x20'+_0x378452[_0x2c7f2a(0x77)]);}function a242_0x4235(){const _0x2b03da=['command','kb\x20delete','2534460hsOpWL','8hYlrSZ','7336185awCUBc','service','4457154YcqDnu','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','menu\x20delete','notification\x20config-delete','notification\x20config-update','1774698xqWGAw','has','3454452pSEmYC','1698418JpWknv','1626400sGKEBY','7pPgpiC'];a242_0x4235=function(){return _0x2b03da;};return a242_0x4235();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a243_0x1ef04c=a243_0x53eb;(function(_0x1c6270,_0x3975db){const _0x313d72=a243_0x53eb,_0x40d827=_0x1c6270();while(!![]){try{const _0x5d32ab=-parseInt(_0x313d72(0x1b6))/0x1+parseInt(_0x313d72(0x1b8))/0x2*(parseInt(_0x313d72(0x1ba))/0x3)+-parseInt(_0x313d72(0x1bc))/0x4+parseInt(_0x313d72(0x1b9))/0x5*(parseInt(_0x313d72(0x1bd))/0x6)+parseInt(_0x313d72(0x1be))/0x7*(-parseInt(_0x313d72(0x1b7))/0x8)+parseInt(_0x313d72(0x1bf))/0x9+parseInt(_0x313d72(0x1bb))/0xa;if(_0x5d32ab===_0x3975db)break;else _0x40d827['push'](_0x40d827['shift']());}catch(_0x252885){_0x40d827['push'](_0x40d827['shift']());}}}(a243_0x2cd6,0x6cc9b));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a243_0x2cd6(){const _0x12caa0=['18GJFGHu','42ozhFFP','4717962fgWPwI','parseFlags','392304MNsXSs','694296LSxLnr','2ZFOEDw','219665TGAraq','1512474yMpPqO','10284690mQCuja','3320092KdHhfF'];a243_0x2cd6=function(){return _0x12caa0;};return a243_0x2cd6();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a243_0x1ef04c(0x1b5)];function a243_0x53eb(_0x2e33ec,_0x562ff0){_0x2e33ec=_0x2e33ec-0x1b5;const _0x2cd634=a243_0x2cd6();let _0x53eb7f=_0x2cd634[_0x2e33ec];return _0x53eb7f;}export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a244_0x31f379=a244_0x15cb;(function(_0xe64439,_0x182b72){const _0x3abab3=a244_0x15cb,_0x11459c=_0xe64439();while(!![]){try{const _0x273f4c=-parseInt(_0x3abab3(0x9f))/0x1*(-parseInt(_0x3abab3(0x94))/0x2)+-parseInt(_0x3abab3(0xa0))/0x3*(-parseInt(_0x3abab3(0x96))/0x4)+-parseInt(_0x3abab3(0x93))/0x5*(parseInt(_0x3abab3(0x92))/0x6)+parseInt(_0x3abab3(0x9c))/0x7+-parseInt(_0x3abab3(0xa3))/0x8*(parseInt(_0x3abab3(0x98))/0x9)+-parseInt(_0x3abab3(0x9a))/0xa+parseInt(_0x3abab3(0x91))/0xb;if(_0x273f4c===_0x182b72)break;else _0x11459c['push'](_0x11459c['shift']());}catch(_0x3b69df){_0x11459c['push'](_0x11459c['shift']());}}}(a244_0x1081,0x3a51e));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';function a244_0x1081(){const _0x3cb7af=['5030432RSfiFG','26652VohpJz','425nBNSoD','22fpidgC','generateServiceHelp','247252bKLWQR','replace','27bSNlTn','get','4384900xNUpKp','generateCommandHelp','135597PmuqPo','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','34244fVWyZg','12jHnFSP','\x20[args]\x20[flags]','generateFullHelp','121816KvluNq','\x20workspace\x20init`\x20or\x20--appcode).'];a244_0x1081=function(){return _0x3cb7af;};return a244_0x1081();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x508b5d=>serviceGroups[a244_0x31f379(0x99)](_0x508b5d),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+a244_0x31f379(0x90),'serviceUsageSuffix':a244_0x31f379(0xa1)});export function generateCommandHelp(_0x4a6540){const _0x27ff79=a244_0x31f379,_0xf98bf0=generators[_0x27ff79(0x9b)](_0x4a6540);if(!requiresExplicitYes(_0x4a6540))return _0xf98bf0;return _0xf98bf0[_0x27ff79(0x97)](_0x27ff79(0x9d),_0x27ff79(0x9e));}function a244_0x15cb(_0x28afac,_0x5abcb2){_0x28afac=_0x28afac-0x90;const _0x10812c=a244_0x1081();let _0x15cb9c=_0x10812c[_0x28afac];return _0x15cb9c;}export const generateServiceHelp=generators[a244_0x31f379(0x95)];export const generateFullHelp=generators[a244_0x31f379(0xa2)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55a2ba,_0x3e590f){var _0x4b991f=a245_0x4cd7,_0x5ae374=_0x55a2ba();while(!![]){try{var _0x1ce008=-parseInt(_0x4b991f(0x160))/0x1*(-parseInt(_0x4b991f(0x166))/0x2)+parseInt(_0x4b991f(0x15e))/0x3+-parseInt(_0x4b991f(0x161))/0x4*(parseInt(_0x4b991f(0x163))/0x5)+-parseInt(_0x4b991f(0x165))/0x6*(-parseInt(_0x4b991f(0x162))/0x7)+parseInt(_0x4b991f(0x168))/0x8+-parseInt(_0x4b991f(0x167))/0x9*(-parseInt(_0x4b991f(0x15f))/0xa)+-parseInt(_0x4b991f(0x164))/0xb;if(_0x1ce008===_0x3e590f)break;else _0x5ae374['push'](_0x5ae374['shift']());}catch(_0x15c751){_0x5ae374['push'](_0x5ae374['shift']());}}}(a245_0x4ec0,0xbeaa9));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a245_0x4cd7(_0x4c1a75,_0x2e8318){_0x4c1a75=_0x4c1a75-0x15e;var _0x4ec0f8=a245_0x4ec0();var _0x4cd76a=_0x4ec0f8[_0x4c1a75];return _0x4cd76a;}export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';function a245_0x4ec0(){var _0x5dbae5=['6samsAK','1090778gJdHtr','63uvBgNx','861480kWvMsl','199143IvKgRD','774030XwPOmM','1wSVsKR','224vAPaJj','3587682svcQaZ','30260nXKlxk','7193131vmyAUM'];a245_0x4ec0=function(){return _0x5dbae5;};return a245_0x4ec0();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a246_0x496e(_0x278591,_0x12dfba){_0x278591=_0x278591-0x1dc;const _0x3d3ebb=a246_0x3d3e();let _0x496e32=_0x3d3ebb[_0x278591];return _0x496e32;}(function(_0x3332fe,_0x34bc44){const _0x33c490=a246_0x496e,_0x582fc2=_0x3332fe();while(!![]){try{const _0x53a3f6=-parseInt(_0x33c490(0x1ef))/0x1+-parseInt(_0x33c490(0x1e0))/0x2*(-parseInt(_0x33c490(0x1f2))/0x3)+-parseInt(_0x33c490(0x1ec))/0x4+parseInt(_0x33c490(0x1ea))/0x5+parseInt(_0x33c490(0x1df))/0x6+parseInt(_0x33c490(0x1e5))/0x7*(parseInt(_0x33c490(0x1e2))/0x8)+-parseInt(_0x33c490(0x1e3))/0x9*(parseInt(_0x33c490(0x1ee))/0xa);if(_0x53a3f6===_0x34bc44)break;else _0x582fc2['push'](_0x582fc2['shift']());}catch(_0x190318){_0x582fc2['push'](_0x582fc2['shift']());}}}(a246_0x3d3e,0xdd900));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x8c66c3,_0x4a1d9f){const _0x560c27=a246_0x496e,_0x23c430=_0x8c66c3[_0x560c27(0x1f1)],{_notice:_0x174e2e,..._0x4f2fa3}=_0x8c66c3;void _0x174e2e,baseFormatOutput(_0x4f2fa3,_0x4a1d9f),_0x4a1d9f[_0x560c27(0x1eb)]===_0x560c27(0x1e7)&&printPrettyNotice(_0x23c430);}function a246_0x3d3e(){const _0x13ac0d=['format','1629960YFeENy','risk','210890WxOqlU','850686amizVn','error','_notice','12UvXliO','code','message','jqFilter','validation','command','url','update','10018464CjvGZX','869290HfOvTB','data','16808WwPMgU','801svWRQM','hint','49tsyOdN','stringify','pretty','endsWith','trim','3097930aeKlLL'];a246_0x3d3e=function(){return _0x13ac0d;};return a246_0x3d3e();}export function formatCliError(_0x278a79,_0x3ef4a8){const _0x39c298=a246_0x496e;if(_0x3ef4a8[_0x39c298(0x1eb)]==='pretty')return![];const _0x247044=_0x278a79[_0x39c298(0x1e1)],_0x312a04={'ok':![],'command':_0x3ef4a8[_0x39c298(0x1dc)],'risk':_0x3ef4a8[_0x39c298(0x1ed)],'data':_0x247044??null,'error':{'code':_0x278a79[_0x39c298(0x1f3)],'message':_0x278a79[_0x39c298(0x1f4)],..._0x278a79[_0x39c298(0x1e4)]?{'hint':_0x278a79[_0x39c298(0x1e4)]}:{}}},_0x456a1b=_0x3ef4a8[_0x39c298(0x1eb)]==='json'?JSON[_0x39c298(0x1e6)](_0x312a04,null,0x2):JSON[_0x39c298(0x1e6)](_0x312a04);let _0xac3865=_0x456a1b;if(_0x3ef4a8[_0x39c298(0x1f5)]?.[_0x39c298(0x1e9)]())try{_0xac3865=applyJqFilter(_0x456a1b,_0x3ef4a8[_0x39c298(0x1f5)]);}catch(_0x50c1b5){const _0x350798=_0x50c1b5 instanceof CliError?_0x50c1b5:CliErrors[_0x39c298(0x1f6)]('jq:\x20'+(_0x50c1b5 instanceof Error?_0x50c1b5[_0x39c298(0x1f4)]:String(_0x50c1b5))),_0x43cb5e={..._0x312a04,'error':{'code':_0x350798['code'],'message':_0x350798[_0x39c298(0x1f4)],..._0x350798['hint']?{'hint':_0x350798[_0x39c298(0x1e4)]}:{},'cause':_0x312a04[_0x39c298(0x1f0)]}};_0xac3865=_0x3ef4a8[_0x39c298(0x1eb)]==='json'?JSON[_0x39c298(0x1e6)](_0x43cb5e,null,0x2):JSON[_0x39c298(0x1e6)](_0x43cb5e);}return process['stdout']['write'](_0xac3865[_0x39c298(0x1e8)]('\x0a')?_0xac3865:_0xac3865+'\x0a'),!![];}function printPrettyNotice(_0x3b717f){const _0x490e99=a246_0x496e;if(!_0x3b717f?.[_0x490e99(0x1de)])return;console[_0x490e99(0x1f0)](_0x3b717f[_0x490e99(0x1de)][_0x490e99(0x1f4)]+'\x20('+_0x3b717f['update'][_0x490e99(0x1dd)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a247_0x2cfb(_0x487f19,_0x4b1819){_0x487f19=_0x487f19-0x73;var _0x3523f0=a247_0x3523();var _0x2cfb01=_0x3523f0[_0x487f19];return _0x2cfb01;}function a247_0x3523(){var _0x2f996d=['21439mtUzLt','495iSbQkx','30ljeBoo','4573080ahzTyg','10077OkdloG','468NlZiGP','1494juZStz','40750OiKjau','7764yVyPrY','660709SYJJsE','1751590wODoRX','106HrGfBj'];a247_0x3523=function(){return _0x2f996d;};return a247_0x3523();}(function(_0x5b141f,_0x50d4b6){var _0x1a54c6=a247_0x2cfb,_0x2d16a5=_0x5b141f();while(!![]){try{var _0x9a1a8b=-parseInt(_0x1a54c6(0x7d))/0x1*(parseInt(_0x1a54c6(0x7b))/0x2)+-parseInt(_0x1a54c6(0x74))/0x3*(parseInt(_0x1a54c6(0x75))/0x4)+parseInt(_0x1a54c6(0x7a))/0x5+parseInt(_0x1a54c6(0x7e))/0x6*(parseInt(_0x1a54c6(0x79))/0x7)+-parseInt(_0x1a54c6(0x73))/0x8+-parseInt(_0x1a54c6(0x76))/0x9*(parseInt(_0x1a54c6(0x77))/0xa)+parseInt(_0x1a54c6(0x7c))/0xb*(parseInt(_0x1a54c6(0x78))/0xc);if(_0x9a1a8b===_0x50d4b6)break;else _0x2d16a5['push'](_0x2d16a5['shift']());}catch(_0x38abf3){_0x2d16a5['push'](_0x2d16a5['shift']());}}}(a247_0x3523,0x658bd));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21af9a,_0x29124b){const _0x50799f=a248_0x53da,_0x9ef1ff=_0x21af9a();while(!![]){try{const _0x3a4ccf=parseInt(_0x50799f(0x14b))/0x1+-parseInt(_0x50799f(0x162))/0x2+parseInt(_0x50799f(0x14a))/0x3+-parseInt(_0x50799f(0x156))/0x4+-parseInt(_0x50799f(0x15c))/0x5*(-parseInt(_0x50799f(0x152))/0x6)+-parseInt(_0x50799f(0x158))/0x7*(-parseInt(_0x50799f(0x14e))/0x8)+-parseInt(_0x50799f(0x15d))/0x9*(parseInt(_0x50799f(0x14f))/0xa);if(_0x3a4ccf===_0x29124b)break;else _0x9ef1ff['push'](_0x9ef1ff['shift']());}catch(_0x283d74){_0x9ef1ff['push'](_0x9ef1ff['shift']());}}}(a248_0x881b,0xda757));function a248_0x881b(){const _0x13c7e5=['4454838bJfDfS','length','join','Available\x20aliases:\x20','4859840TsxjcW','alias','24829AJlZdg','\x22.\x20','string','flags','10SpEoWj','279JdZZLJ','No\x20api.ts\x20found\x20in\x20','code','name','.\x20Run\x20`','1161632AYmIBB','map','4230270SGjnqf','687254qcjkmQ','some','validation','3248tIVKxH','752190fBNwsm','\x20api\x20pull`\x20first.','Unknown\x20alias\x20\x22'];a248_0x881b=function(){return _0x13c7e5;};return a248_0x881b();}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a248_0x53da(_0x33f329,_0x1eff45){_0x33f329=_0x33f329-0x14a;const _0x881bb=a248_0x881b();let _0x53da4b=_0x881bb[_0x33f329];return _0x53da4b;}export function resolveAliasToCode(_0x19717d,_0x2e2b0b,_0x3e4e6e,_0x125fba){const _0x14c50e=a248_0x53da,_0x3c0da2=_0x19717d['flags'][_0x14c50e(0x14c)](_0xaf4c15=>_0xaf4c15[_0x14c50e(0x160)]==='code'&&_0xaf4c15['type']===_0x14c50e(0x15a)),_0x4949c9=_0x19717d[_0x14c50e(0x15b)][_0x14c50e(0x14c)](_0xda12d9=>_0xda12d9[_0x14c50e(0x160)]===_0x14c50e(0x157)&&_0xda12d9['type']===_0x14c50e(0x15a));if(!_0x3c0da2||!_0x4949c9)return;const _0x3ea9eb=_0x2e2b0b[_0x14c50e(0x15f)]?String(_0x2e2b0b['code']):'',_0x4f372b=_0x2e2b0b[_0x14c50e(0x157)]?String(_0x2e2b0b['alias']):'';if(!_0x3ea9eb&&!_0x4f372b)throw CliErrors['validation']('`'+_0x125fba+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x4f372b&&!_0x3ea9eb){const _0x16b317=resolveAlias(_0x3e4e6e,_0x4f372b);if(!_0x16b317){const _0x47e8c9=listAliases(_0x3e4e6e)[_0x14c50e(0x163)](_0x3fc362=>_0x3fc362[_0x14c50e(0x157)]),_0x4f452f=_0x47e8c9[_0x14c50e(0x153)]?_0x14c50e(0x155)+_0x47e8c9[_0x14c50e(0x154)](',\x20'):_0x14c50e(0x15e)+_0x3e4e6e+_0x14c50e(0x161)+CLI_BIN_NAME+_0x14c50e(0x150);throw CliErrors[_0x14c50e(0x14d)](_0x14c50e(0x151)+_0x4f372b+_0x14c50e(0x159)+_0x4f452f);}_0x2e2b0b[_0x14c50e(0x15f)]=_0x16b317;}}
|