@lovrabet/rabetbase-cli 2.5.2-beta.3 → 2.5.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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/api/generate-sdk-config-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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/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-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.d.ts +0 -8
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.d.ts +4 -0
- 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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +5 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -26
- 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/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.d.ts +43 -0
- 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/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +5 -5
- package/skills/rabetbase/guides/custom-page-workflow.md +35 -17
- package/skills/rabetbase/guides/page-development-workflow.md +1 -1
- package/skills/rabetbase/knowledge/components.md +292 -0
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +74 -4
- package/skills/rabetbase/knowledge/custom-page/page-templates.md +68 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +21 -9
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-update.md +13 -9
- package/skills/rabetbase/references/rabetbase-project-create.md +5 -2
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +2 -2
- package/skills/rabetbase/references/rabetbase-run.md +1 -0
- package/skills/rabetbase.manifest.json +5 -4
- package/templates/README.md +10 -4
- package/templates/custom-pages/blank.json +5 -0
- package/templates/custom-pages/dashboard.json +5 -0
- package/templates/custom-pages/onepage.json +5 -0
- package/templates/generate-api/api.ts.tpl +1 -1
- package/lib/commands/page/custom/template.d.ts +0 -8
- package/lib/commands/page/custom/template.js +0 -1
- package/skills/rabetbase/knowledge/custom-page/components.md +0 -225
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a254_0xfbb4(){const _0x32202a=['.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','includes','db-','set','entries','join','\x22\x20matches\x20multiple\x20databases:\x20','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','6532672sjvjAc','\x22.\x20Available:\x20','.\x20Be\x20more\x20specific.','filter','toLowerCase','has','No\x20database\x20matching\x20\x22','dbName','get','find','3071670seCyTx','279iRDNnR','28617LomgFP','708TpfWXP','251218iqWwNr','652710EkcygY','map','\x22\x20under\x20app\x20\x22','430235MdyTsm','2RweDhI','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','isNaN','dbId','7543140haPCVU'];a254_0xfbb4=function(){return _0x32202a;};return a254_0xfbb4();}(function(_0x3dc12e,_0x41aa93){const _0xec1677=a254_0x24ad,_0x37674c=_0x3dc12e();while(!![]){try{const _0x4f3295=-parseInt(_0xec1677(0x169))/0x1*(parseInt(_0xec1677(0x16e))/0x2)+parseInt(_0xec1677(0x167))/0x3*(-parseInt(_0xec1677(0x168))/0x4)+-parseInt(_0xec1677(0x16d))/0x5+parseInt(_0xec1677(0x172))/0x6+parseInt(_0xec1677(0x165))/0x7+-parseInt(_0xec1677(0x15b))/0x8+parseInt(_0xec1677(0x166))/0x9*(parseInt(_0xec1677(0x16a))/0xa);if(_0x4f3295===_0x41aa93)break;else _0x37674c['push'](_0x37674c['shift']());}catch(_0x2aab6d){_0x37674c['push'](_0x37674c['shift']());}}}(a254_0xfbb4,0xd625d));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x42f214){const _0x224c01=a254_0x24ad;if(cache[_0x224c01(0x160)](_0x42f214))return cache[_0x224c01(0x163)](_0x42f214);const _0x1ce828=await listDatasets(_0x42f214),_0x537bfd=new Map();for(const _0xa31f6 of _0x1ce828){const _0x545d60=_0xa31f6['dbtableConfig'];_0x545d60?.[_0x224c01(0x171)]!=null&&_0x537bfd[_0x224c01(0x156)](_0x545d60[_0x224c01(0x171)],_0x545d60['dbName']??_0x224c01(0x155)+_0x545d60[_0x224c01(0x171)]);}const _0x38714d=[..._0x537bfd[_0x224c01(0x157)]()]['map'](([_0x4ac501,_0x23c499])=>({'dbId':_0x4ac501,'dbName':_0x23c499}));return cache[_0x224c01(0x156)](_0x42f214,_0x38714d),_0x38714d;}function a254_0x24ad(_0x549cbc,_0x44a223){_0x549cbc=_0x549cbc-0x155;const _0xfbb470=a254_0xfbb4();let _0x24adee=_0xfbb470[_0x549cbc];return _0x24adee;}export async function resolveDb(_0x27aa44,_0x25ea00){const _0x41313d=a254_0x24ad,_0x5c78a4=await listDatabases(_0x27aa44);if(_0x5c78a4['length']===0x0)return{'resolved':[],'error':_0x41313d(0x16f)+_0x27aa44+'\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x25ea00)return{'resolved':_0x5c78a4};const _0x518293=Number(_0x25ea00);if(!Number[_0x41313d(0x170)](_0x518293)){const _0x465be1=_0x5c78a4['find'](_0xd7ccae=>_0xd7ccae[_0x41313d(0x171)]===_0x518293);if(_0x465be1)return{'resolved':[_0x465be1]};}const _0x42db50=_0x25ea00[_0x41313d(0x15f)](),_0x2c48b6=_0x5c78a4[_0x41313d(0x15e)](_0x27c894=>_0x27c894['dbName'][_0x41313d(0x15f)]()[_0x41313d(0x174)](_0x42db50));if(_0x2c48b6['length']>0x0)return{'resolved':_0x2c48b6};const _0x372bff=_0x5c78a4[_0x41313d(0x16b)](_0x34801c=>_0x34801c['dbName']+'\x20('+_0x34801c[_0x41313d(0x171)]+')')['join'](',\x20');return{'resolved':[],'error':_0x41313d(0x161)+_0x25ea00+_0x41313d(0x16c)+_0x27aa44+_0x41313d(0x15c)+_0x372bff+_0x41313d(0x173)};}export async function resolveOneDb(_0x2436ea,_0x25ebe8){const _0x2553ba=a254_0x24ad,{resolved:_0x337734,error:_0x268528}=await resolveDb(_0x2436ea,_0x25ebe8);if(_0x268528)return{'db':null,'error':_0x268528};if(_0x337734['length']===0x1)return{'db':_0x337734[0x0]};if(!_0x25ebe8){const _0x12974f=_0x337734['map'](_0x2fa699=>_0x2fa699[_0x2553ba(0x162)]+'\x20('+_0x2fa699['dbId']+')')['join'](',\x20');return{'db':null,'error':_0x2553ba(0x15a)+_0x12974f};}const _0x2c3c2f=_0x337734[_0x2553ba(0x16b)](_0xc20d61=>_0xc20d61['dbName']+'\x20('+_0xc20d61[_0x2553ba(0x171)]+')')[_0x2553ba(0x158)](',\x20');return{'db':null,'error':'\x22'+_0x25ebe8+_0x2553ba(0x159)+_0x2c3c2f+_0x2553ba(0x15d)};}export async function getDbName(_0x2058ed,_0x45ca9e){const _0x101d23=a254_0x24ad,_0x4920c1=await listDatabases(_0x2058ed);return _0x4920c1[_0x101d23(0x164)](_0x1096b3=>_0x1096b3[_0x101d23(0x171)]===_0x45ca9e)?.[_0x101d23(0x162)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a255_0x5de97b=a255_0x2b8e;(function(_0x76209c,_0x3ac5b1){const _0x1a939f=a255_0x2b8e,_0x298c99=_0x76209c();while(!![]){try{const _0x5f24b5=parseInt(_0x1a939f(0x20c))/0x1+-parseInt(_0x1a939f(0x1d5))/0x2+-parseInt(_0x1a939f(0x1db))/0x3*(-parseInt(_0x1a939f(0x211))/0x4)+-parseInt(_0x1a939f(0x207))/0x5*(-parseInt(_0x1a939f(0x1e0))/0x6)+-parseInt(_0x1a939f(0x1e1))/0x7+parseInt(_0x1a939f(0x20f))/0x8+parseInt(_0x1a939f(0x20e))/0x9;if(_0x5f24b5===_0x3ac5b1)break;else _0x298c99['push'](_0x298c99['shift']());}catch(_0x517346){_0x298c99['push'](_0x298c99['shift']());}}}(a255_0x4ba0,0x49965));import{randomUUID}from'node:crypto';function a255_0x4ba0(){const _0x5801f2=['appCode','instant_api_policy_file_unreadable','isFile','264pWuIMn','1280307eCOKtU','overwritten','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','version','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','trim','policyRoot','code','catch','policyFilePath','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','byteLength','instant_api_policy_file_exists','unchanged','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','utf8','instant_api_policy_app_code_mismatch','size','stringify','rules','instant_api_policy_defaults_invalid','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22.','Review\x20the\x20file\x20before\x20retrying.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','created','instant_api_policy_file_invalid','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','decode','instant_api_policy_json_invalid','defaults','includes','instant_api_policy_file_too_large','instant_api_policy_file_unwritable','5905xDbBxz','instant_api_policy_version_invalid','.rabetbase/instant-api-policy','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','isArray','493209ismOnR','parse','1809288YMLJQN','1993896kQfdWi','instantApi','16mboEOh','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','policy.json','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','1117400xjICyX','EEXIST','object','length','allow','force','35679BoXzRN','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.'];a255_0x4ba0=function(){return _0x5801f2;};return a255_0x4ba0();}import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';function a255_0x2b8e(_0x300c1a,_0x23f968){_0x300c1a=_0x300c1a-0x1d2;const _0x4ba0de=a255_0x4ba0();let _0x2b8e93=_0x4ba0de[_0x300c1a];return _0x2b8e93;}import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a255_0x5de97b(0x209);export const INSTANT_API_POLICY_FILE_NAME=a255_0x5de97b(0x1d3);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x1bc2e4,_0x601ab9,_0x4ffd20){return new CliError(_0x1bc2e4,0x1,_0x601ab9,_0x4ffd20);}export function loadInstantApiPolicyLocalConfig(_0x3f5da1,_0x46f18b){assertSafeAppCode(_0x3f5da1);const _0x4144c7=resolve(_0x46f18b??findProjectRootDirectory()),_0x4d6b9c=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x3f5da1+'/'+INSTANT_API_POLICY_FILE_NAME,_0x5752d1=resolve(_0x4144c7,INSTANT_API_POLICY_RELATIVE_ROOT,_0x3f5da1),_0x865c97=resolve(_0x5752d1,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x4144c7,'appCode':_0x3f5da1,'policyRoot':_0x5752d1,'policyFilePath':_0x865c97,'policyRelativePath':_0x4d6b9c};}export function createDefaultInstantApiPolicyConfig(_0x531ad2,_0x23d064=a255_0x5de97b(0x1d9)){return assertSafeAppCode(_0x531ad2),{'version':'1','appCode':_0x531ad2,'defaults':{'instantApi':_0x23d064},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x1ae8b9){const _0x21d8a0=a255_0x5de97b;let _0x51bfe4;try{_0x51bfe4=await stat(_0x1ae8b9[_0x21d8a0(0x1ea)]);}catch(_0x304fe3){throw instantApiPolicyError('instant_api_policy_file_missing',_0x21d8a0(0x1eb)+_0x1ae8b9[_0x21d8a0(0x1ea)],_0x21d8a0(0x1f9));}if(!_0x51bfe4[_0x21d8a0(0x1df)]())throw instantApiPolicyError(_0x21d8a0(0x1ff),_0x21d8a0(0x20a)+_0x1ae8b9[_0x21d8a0(0x1ea)]);if(_0x51bfe4[_0x21d8a0(0x1f2)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x21d8a0(0x205),_0x21d8a0(0x1d2));let _0x55f56a;try{_0x55f56a=await readFile(_0x1ae8b9[_0x21d8a0(0x1ea)]);}catch{throw instantApiPolicyError(_0x21d8a0(0x1de),_0x21d8a0(0x1ef)+_0x1ae8b9[_0x21d8a0(0x1ea)]);}if(_0x55f56a[_0x21d8a0(0x1ec)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x21d8a0(0x205),_0x21d8a0(0x1d2));let _0x149418;try{_0x149418=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x21d8a0(0x201)](_0x55f56a);}catch{throw instantApiPolicyError(_0x21d8a0(0x1ff),_0x21d8a0(0x1fd)+_0x1ae8b9[_0x21d8a0(0x1ea)]);}let _0x33124d;try{_0x33124d=JSON[_0x21d8a0(0x20d)](_0x149418);}catch{throw instantApiPolicyError(_0x21d8a0(0x202),_0x21d8a0(0x1d4)+_0x1ae8b9[_0x21d8a0(0x1ea)]);}return assertLocalPolicyContract(_0x33124d,_0x1ae8b9['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x428e11,_0x5d509b,_0x4abc78={}){const _0x221578=a255_0x5de97b,_0x1b658f=assertLocalPolicyContract(_0x5d509b,_0x428e11[_0x221578(0x1dd)]),_0x1d250d=JSON[_0x221578(0x1f3)](_0x1b658f,null,0x2)+'\x0a';if(Buffer[_0x221578(0x1ec)](_0x1d250d,_0x221578(0x1f0))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x221578(0x205),_0x221578(0x1d2));await mkdir(_0x428e11[_0x221578(0x1e7)],{'recursive':!![]});let _0x4f417c;try{_0x4f417c=await readFile(_0x428e11['policyFilePath'],_0x221578(0x1f0));}catch(_0x59b7a1){if(!isMissingFile(_0x59b7a1))throw instantApiPolicyError(_0x221578(0x1de),_0x221578(0x1f7)+_0x428e11[_0x221578(0x1ea)]);}if(_0x4f417c===_0x1d250d)return{'action':_0x221578(0x1ee),'filePath':_0x428e11['policyFilePath']};if(_0x4f417c!==undefined&&!_0x4abc78[_0x221578(0x1da)])throw instantApiPolicyError(_0x221578(0x1ed),'Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x428e11[_0x221578(0x1ea)],_0x221578(0x1dc));if(_0x4f417c===undefined)try{return await writeFile(_0x428e11[_0x221578(0x1ea)],_0x1d250d,{'encoding':_0x221578(0x1f0),'flag':'wx'}),{'action':_0x221578(0x1fe),'filePath':_0x428e11[_0x221578(0x1ea)]};}catch(_0x5a4df6){if(!isAlreadyExists(_0x5a4df6))throw instantApiPolicyError(_0x221578(0x206),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x428e11[_0x221578(0x1ea)]);if(!_0x4abc78[_0x221578(0x1da)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x221578(0x1f6)+_0x428e11[_0x221578(0x1ea)],_0x221578(0x1fb));}const _0x319c96=resolve(dirname(_0x428e11[_0x221578(0x1ea)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x319c96,_0x1d250d,{'encoding':_0x221578(0x1f0),'flag':'wx'}),await rename(_0x319c96,_0x428e11[_0x221578(0x1ea)]);}catch{await unlink(_0x319c96)[_0x221578(0x1e9)](()=>undefined);throw instantApiPolicyError(_0x221578(0x206),_0x221578(0x1fc)+_0x428e11[_0x221578(0x1ea)]);}return{'action':_0x221578(0x1e2),'filePath':_0x428e11[_0x221578(0x1ea)]};}function assertSafeAppCode(_0xcf5a13){const _0x59d596=a255_0x5de97b,_0x2a1f11=_0xcf5a13[_0x59d596(0x1e6)]();if(!_0x2a1f11||_0x2a1f11!==_0xcf5a13||_0x2a1f11[_0x59d596(0x1d8)]>0x64||_0x2a1f11==='.'||_0x2a1f11==='..'||_0x2a1f11[_0x59d596(0x204)]('/')||_0x2a1f11[_0x59d596(0x204)]('\x5c')||_0x2a1f11[_0x59d596(0x204)]('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x2cc198,_0x3b8d87){const _0x2f09aa=a255_0x5de97b;if(!isObject(_0x2cc198))throw instantApiPolicyError(_0x2f09aa(0x202),_0x2f09aa(0x1f8));if(_0x2cc198[_0x2f09aa(0x1e4)]!=='1')throw instantApiPolicyError(_0x2f09aa(0x208),_0x2f09aa(0x1fa),_0x2f09aa(0x200));if(_0x2cc198[_0x2f09aa(0x1dd)]!==_0x3b8d87)throw instantApiPolicyError(_0x2f09aa(0x1f1),_0x2f09aa(0x1e3)+_0x3b8d87+'.');if(!isObject(_0x2cc198[_0x2f09aa(0x203)])||typeof _0x2cc198[_0x2f09aa(0x203)][_0x2f09aa(0x210)]!=='string')throw instantApiPolicyError(_0x2f09aa(0x1f5),'Policy\x20defaults.instantApi\x20is\x20required.');if(_0x2cc198['rules']!==undefined&&_0x2cc198[_0x2f09aa(0x1f4)]!==null&&!Array[_0x2f09aa(0x20b)](_0x2cc198[_0x2f09aa(0x1f4)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x2f09aa(0x1e5));return _0x2cc198;}function isObject(_0x1cdc18){const _0x48c436=a255_0x5de97b;return _0x1cdc18!==null&&typeof _0x1cdc18===_0x48c436(0x1d7)&&!Array[_0x48c436(0x20b)](_0x1cdc18);}function isMissingFile(_0x4e238c){const _0x41b508=a255_0x5de97b;return Boolean(_0x4e238c&&typeof _0x4e238c===_0x41b508(0x1d7)&&_0x4e238c[_0x41b508(0x1e8)]==='ENOENT');}function isAlreadyExists(_0x1727d3){const _0x2dc7a5=a255_0x5de97b;return Boolean(_0x1727d3&&typeof _0x1727d3===_0x2dc7a5(0x1d7)&&_0x1727d3[_0x2dc7a5(0x1e8)]===_0x2dc7a5(0x1d6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a256_0x2e85ee=a256_0x18a5;(function(_0x62b185,_0x482b1e){const _0x4f21fe=a256_0x18a5,_0x2aec5a=_0x62b185();while(!![]){try{const _0x6e5ba=parseInt(_0x4f21fe(0x114))/0x1+parseInt(_0x4f21fe(0x113))/0x2+parseInt(_0x4f21fe(0xf8))/0x3*(-parseInt(_0x4f21fe(0x11d))/0x4)+parseInt(_0x4f21fe(0x10d))/0x5*(-parseInt(_0x4f21fe(0x115))/0x6)+-parseInt(_0x4f21fe(0x128))/0x7*(-parseInt(_0x4f21fe(0xef))/0x8)+parseInt(_0x4f21fe(0x12b))/0x9+-parseInt(_0x4f21fe(0x11f))/0xa;if(_0x6e5ba===_0x482b1e)break;else _0x2aec5a['push'](_0x2aec5a['shift']());}catch(_0x1e92ae){_0x2aec5a['push'](_0x2aec5a['shift']());}}}(a256_0x10ec,0x24aaa));import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a256_0x2e85ee(0x129),a256_0x2e85ee(0xf9),'total',a256_0x2e85ee(0x10a),a256_0x2e85ee(0x122),a256_0x2e85ee(0x10b)],HIT_KEYS=[a256_0x2e85ee(0xfb),a256_0x2e85ee(0x12c),a256_0x2e85ee(0x123),a256_0x2e85ee(0xed),a256_0x2e85ee(0xe5),a256_0x2e85ee(0x101),a256_0x2e85ee(0x135),a256_0x2e85ee(0x12a),a256_0x2e85ee(0x120),a256_0x2e85ee(0xfd),a256_0x2e85ee(0x118)];function a256_0x10ec(){const _0x965425=['networkError','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','128196dsXaXw','no-store','5345660ugODTu','rawScore','number','strategyFingerprint','chunkId','keys','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','topK','test','17423CBEDRA','schemaVersion','rank','2582973bZwAlb','revision','some','query','get','appCode','split','entries','string','name','tags','map','title','public','total','sort','authRequired','object','application/json','SmartCode\x20knowledge\x20search\x20failed.','scope','signal','904RHPLVL','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','validation','status','json','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','Knowledge\x20search\x20appCode\x20is\x20required.','score','hits[','15ilOWTE','profile','trim','documentId','includes','finalScore','/smartapi/knowledge/company-public/search','headers','cli:rabetbase','text','company','apiError','AbortError','stringify','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','toLowerCase','POST','success','hits','timingsMs','response\x20envelope','115360LOISsu','response','isArray','development','data','content-type','460956ayIxaz','230841EQFFSZ','48dBTLDJ','length','isFinite','scoreKind','cookie','isSafeInteger'];a256_0x10ec=function(){return _0x965425;};return a256_0x10ec();}export async function searchDevelopmentKnowledge(_0x14a3a2){const _0x4f9ead=a256_0x2e85ee,_0x537096=_0x14a3a2[_0x4f9ead(0x130)][_0x4f9ead(0xfa)](),_0x38e452=_0x14a3a2[_0x4f9ead(0x12e)][_0x4f9ead(0xfa)]();if(!_0x537096)throw CliErrors[_0x4f9ead(0xf1)](_0x4f9ead(0xf5));if(!_0x14a3a2[_0x4f9ead(0x119)][_0x4f9ead(0xfa)]())throw CliErrors[_0x4f9ead(0xe9)]();if(!_0x38e452)throw CliErrors[_0x4f9ead(0xf1)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x14a3a2[_0x4f9ead(0x126)]);const _0x2028fb=getKbDomain()+_0x4f9ead(0xfe);let _0x299842;try{_0x299842=await fetch(_0x2028fb,{'method':_0x4f9ead(0x108),'headers':{'Content-Type':_0x4f9ead(0xeb),'Cookie':_0x14a3a2['cookie'],'X-Invoke-Source':_0x4f9ead(0x100)},'body':JSON[_0x4f9ead(0x105)]({'appCode':_0x537096,'query':_0x38e452,..._0x14a3a2['topK']!==undefined?{'topK':_0x14a3a2['topK']}:{}}),'signal':_0x14a3a2[_0x4f9ead(0xee)]});}catch(_0x57d7de){if(_0x57d7de instanceof CliError)throw _0x57d7de;if(_0x57d7de instanceof Error&&_0x57d7de[_0x4f9ead(0x134)]===_0x4f9ead(0x104))throw _0x57d7de;throw CliErrors[_0x4f9ead(0x11b)]('SmartCode\x20knowledge\x20search\x20request\x20failed.');}if(!hasNoStore(_0x299842[_0x4f9ead(0xff)]))throw CliErrors[_0x4f9ead(0x103)](_0x4f9ead(0xf4));if(_0x299842[_0x4f9ead(0xf2)]===0x191)throw CliErrors[_0x4f9ead(0xe9)]();if(!_0x299842['ok'])throw CliErrors['apiError'](_0x4f9ead(0x11c)+_0x299842[_0x4f9ead(0xf2)]+').');if(!(_0x299842[_0x4f9ead(0xff)][_0x4f9ead(0x12f)](_0x4f9ead(0x112))??'')[_0x4f9ead(0x107)]()[_0x4f9ead(0xfc)]('application/json'))throw CliErrors[_0x4f9ead(0x103)](_0x4f9ead(0x125));let _0x1b7959;try{_0x1b7959=await _0x299842[_0x4f9ead(0xf3)]();}catch{throw CliErrors[_0x4f9ead(0x103)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0x1b7959),_0x14a3a2[_0x4f9ead(0x126)]);}function readEnvelopeData(_0x496a05){const _0x2d3ea7=a256_0x2e85ee,_0x926b8a=requireRecord(_0x496a05,_0x2d3ea7(0x10c));if(_0x926b8a[_0x2d3ea7(0x109)]===![])throw CliErrors[_0x2d3ea7(0x103)](_0x2d3ea7(0xec));if(!(_0x2d3ea7(0x111)in _0x926b8a))throw invalidContract(_0x2d3ea7(0x10c));return _0x926b8a[_0x2d3ea7(0x111)];}function validateTopK(_0x11b90e){const _0x24ecfc=a256_0x2e85ee;if(_0x11b90e!==undefined&&(!Number[_0x24ecfc(0x11a)](_0x11b90e)||_0x11b90e<0x1||_0x11b90e>0x32))throw CliErrors[_0x24ecfc(0xf1)](_0x24ecfc(0x106));}function hasNoStore(_0x1eaf1d){const _0x370e35=a256_0x2e85ee;return(_0x1eaf1d[_0x370e35(0x12f)]('cache-control')??'')[_0x370e35(0x131)](',')['some'](_0x5e5667=>_0x5e5667[_0x370e35(0xfa)]()[_0x370e35(0x107)]()===_0x370e35(0x11e));}function parseDevelopmentSearchResponse(_0x11f7c3,_0x274c11){const _0x2093f4=a256_0x2e85ee,_0x4ce55c=requireExactRecord(_0x11f7c3,RESPONSE_KEYS,_0x2093f4(0x10e));if(_0x4ce55c[_0x2093f4(0x129)]!==0x2||_0x4ce55c[_0x2093f4(0xf9)]!==_0x2093f4(0x110))throw invalidContract(_0x2093f4(0xf9));if(!Array[_0x2093f4(0x10f)](_0x4ce55c[_0x2093f4(0x10a)])||_0x4ce55c['hits']['length']>(_0x274c11??0x32))throw invalidContract(_0x2093f4(0x10a));if(typeof _0x4ce55c['strategyFingerprint']!==_0x2093f4(0x133)||!/^sha256:[0-9a-f]{64}$/[_0x2093f4(0x127)](_0x4ce55c['strategyFingerprint']))throw invalidContract(_0x2093f4(0x122));const _0x5e47d4=requireRecord(_0x4ce55c[_0x2093f4(0x10b)],_0x2093f4(0x10b)),_0x4fc877={};for(const [_0x1f0a4a,_0x39ad1c]of Object[_0x2093f4(0x132)](_0x5e47d4)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2093f4(0x127)](_0x1f0a4a)||typeof _0x39ad1c!==_0x2093f4(0x121)||!Number['isFinite'](_0x39ad1c)||_0x39ad1c<0x0)throw invalidContract(_0x2093f4(0x10b));_0x4fc877[_0x1f0a4a]=_0x39ad1c;}const _0x11c622=_0x4ce55c[_0x2093f4(0x10a)][_0x2093f4(0x136)]((_0x205cec,_0x829177)=>parseHit(_0x205cec,_0x829177));if(!Number[_0x2093f4(0x11a)](_0x4ce55c['total'])||_0x4ce55c['total']!==_0x11c622['length'])throw invalidContract(_0x2093f4(0xe7));return{'schemaVersion':_0x4ce55c[_0x2093f4(0x129)],'profile':_0x4ce55c[_0x2093f4(0xf9)],'total':_0x4ce55c[_0x2093f4(0xe7)],'strategyFingerprint':_0x4ce55c[_0x2093f4(0x122)],'timingsMs':_0x4fc877,'hits':_0x11c622};}function parseHit(_0x313f54,_0x5c9116){const _0x584ad4=a256_0x2e85ee,_0x2d1477=requireExactRecord(_0x313f54,HIT_KEYS,_0x584ad4(0xf7)+_0x5c9116+']'),_0x45172c=_0x574344=>{const _0x2ab957=_0x584ad4,_0x5ca521=_0x2d1477[_0x574344];if(typeof _0x5ca521!==_0x2ab957(0x133)||!_0x5ca521)throw invalidContract(_0x574344);return _0x5ca521;};if(!Number[_0x584ad4(0x11a)](_0x2d1477[_0x584ad4(0x12c)])||_0x2d1477[_0x584ad4(0x12c)]<0x1)throw invalidContract(_0x584ad4(0x12c));if(_0x2d1477[_0x584ad4(0xed)]!==_0x584ad4(0xe6)&&_0x2d1477[_0x584ad4(0xed)]!==_0x584ad4(0x102))throw invalidContract(_0x584ad4(0xed));if(typeof _0x2d1477['title']!=='string'||typeof _0x2d1477['text']!==_0x584ad4(0x133))throw invalidContract('text');if(!Array['isArray'](_0x2d1477[_0x584ad4(0x135)])||_0x2d1477['tags'][_0x584ad4(0x12d)](_0x4ad9cf=>typeof _0x4ad9cf!=='string'))throw invalidContract(_0x584ad4(0x135));if(!Number[_0x584ad4(0x11a)](_0x2d1477[_0x584ad4(0x12a)])||_0x2d1477[_0x584ad4(0x12a)]!==_0x5c9116+0x1)throw invalidContract(_0x584ad4(0x12a));if(!isFiniteNumber(_0x2d1477[_0x584ad4(0x120)])||!isFiniteNumber(_0x2d1477[_0x584ad4(0xfd)]))throw invalidContract(_0x584ad4(0xf6));return{'documentId':_0x45172c(_0x584ad4(0xfb)),'revision':_0x2d1477[_0x584ad4(0x12c)],'chunkId':_0x45172c(_0x584ad4(0x123)),'scope':_0x2d1477['scope'],'title':_0x2d1477[_0x584ad4(0xe5)],'text':_0x2d1477['text'],'tags':[..._0x2d1477[_0x584ad4(0x135)]],'rank':_0x2d1477[_0x584ad4(0x12a)],'rawScore':_0x2d1477['rawScore'],'finalScore':_0x2d1477['finalScore'],'scoreKind':_0x45172c('scoreKind')};}function requireExactRecord(_0x4af1f9,_0x175c28,_0x104642){const _0x1f837f=a256_0x2e85ee,_0x4e0ce3=requireRecord(_0x4af1f9,_0x104642),_0x37cd92=Object[_0x1f837f(0x124)](_0x4e0ce3)[_0x1f837f(0xe8)](),_0x4fd3f3=[..._0x175c28][_0x1f837f(0xe8)]();if(_0x37cd92[_0x1f837f(0x116)]!==_0x4fd3f3[_0x1f837f(0x116)]||_0x37cd92[_0x1f837f(0x12d)]((_0x4d2720,_0x58b9d5)=>_0x4d2720!==_0x4fd3f3[_0x58b9d5]))throw invalidContract(_0x104642);return _0x4e0ce3;}function requireRecord(_0x5f289b,_0x357847){const _0x21cfa0=a256_0x2e85ee;if(!_0x5f289b||typeof _0x5f289b!==_0x21cfa0(0xea)||Array['isArray'](_0x5f289b))throw invalidContract(_0x357847);return _0x5f289b;}function a256_0x18a5(_0x38b1fd,_0x861d1f){_0x38b1fd=_0x38b1fd-0xe5;const _0x10ec98=a256_0x10ec();let _0x18a5bb=_0x10ec98[_0x38b1fd];return _0x18a5bb;}function isFiniteNumber(_0x48f026){const _0x589cd0=a256_0x2e85ee;return typeof _0x48f026===_0x589cd0(0x121)&&Number[_0x589cd0(0x117)](_0x48f026);}function invalidContract(_0x440218){const _0x192213=a256_0x2e85ee;return CliErrors['apiError'](_0x192213(0xf0)+_0x440218+'\x20contract.');}
|
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
import type { PageProjectConfig } from "../../core/page/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* 读取当前工作目录下页面工程的基础配置
|
|
4
|
+
*
|
|
5
|
+
* @param appCode 应用 code
|
|
6
|
+
* @param cwd 命令执行时的工作目录
|
|
7
|
+
* @returns 页面工程目录与文件锁路径等核心路径信息
|
|
8
|
+
*/
|
|
2
9
|
export declare function loadPageProjectConfig(appCode: string, cwd?: string): PageProjectConfig;
|
|
10
|
+
/**
|
|
11
|
+
* 按 pageId 和类型生成页面文件名
|
|
12
|
+
*
|
|
13
|
+
* @param pageId 页面标识
|
|
14
|
+
* @param type 文件类型,如 draft 或 release
|
|
15
|
+
* @returns 约定格式的文件名,如 100-DRAFT.json
|
|
16
|
+
*/
|
|
3
17
|
export declare function buildPageFileName(pageId: number, type: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* 拼接指定页面类型文件的完整路径
|
|
20
|
+
*
|
|
21
|
+
* @param config 页面工程配置
|
|
22
|
+
* @param pageId 页面标识
|
|
23
|
+
* @param type 页面文件类型
|
|
24
|
+
* @returns 页面文件绝对路径
|
|
25
|
+
*/
|
|
4
26
|
export declare function resolvePageFilePath(config: PageProjectConfig, pageId: number, type: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* 确保文件父目录存在
|
|
29
|
+
*
|
|
30
|
+
* @param filePath 文件完整路径
|
|
31
|
+
*/
|
|
5
32
|
export declare function ensureParentDirectory(filePath: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* 检查文件是否存在
|
|
35
|
+
*
|
|
36
|
+
* @param filePath 文件路径
|
|
37
|
+
* @returns 文件存在返回 true,不存在返回 false
|
|
38
|
+
*/
|
|
6
39
|
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* 读取自定义页面目录中的全部常规文件
|
|
42
|
+
*
|
|
43
|
+
* 返回值使用相对于输入目录的 POSIX 路径,便于直接作为页面完整文件映射提交
|
|
44
|
+
* 符号链接和其他特殊文件会被拒绝,避免目录外内容或非文本资源被静默写入页面
|
|
45
|
+
*
|
|
46
|
+
* @param directory 页面文件根目录
|
|
47
|
+
* @returns 相对文件路径到 UTF-8 内容的映射
|
|
48
|
+
*/
|
|
49
|
+
export declare function readCustomPageDirectory(directory: string): Promise<Record<string, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cd9d4,_0x31424f){const _0x2a89b8=a257_0x1da1,_0x5657ca=_0x2cd9d4();while(!![]){try{const _0x3f70e4=parseInt(_0x2a89b8(0x15b))/0x1*(parseInt(_0x2a89b8(0x162))/0x2)+parseInt(_0x2a89b8(0x15c))/0x3*(-parseInt(_0x2a89b8(0x16d))/0x4)+parseInt(_0x2a89b8(0x165))/0x5*(-parseInt(_0x2a89b8(0x16a))/0x6)+parseInt(_0x2a89b8(0x163))/0x7+parseInt(_0x2a89b8(0x164))/0x8*(parseInt(_0x2a89b8(0x16f))/0x9)+-parseInt(_0x2a89b8(0x160))/0xa*(parseInt(_0x2a89b8(0x15a))/0xb)+parseInt(_0x2a89b8(0x16c))/0xc*(parseInt(_0x2a89b8(0x158))/0xd);if(_0x3f70e4===_0x31424f)break;else _0x5657ca['push'](_0x5657ca['shift']());}catch(_0x19a6d3){_0x5657ca['push'](_0x5657ca['shift']());}}}(a257_0xa382,0xf2b31));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';function a257_0xa382(){const _0x45767b=['name','1960404HiUsoG','isFile','1020156IWtLuB','4goVlll','trim','9stRSOu','sort','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','page','toUpperCase','validation','split','.json','isDirectory','169vfkKFj','.rabetbase','11oiqYGB','1116439Xkinmk','3607413XkVbjZ','flagMissing','join','appPagesDir','5447750dGIicP','Page\x20directory\x20not\x20found:\x20','2qgddPT','3794420ZCejKg','10276888fLOXku','20WJWTfQ','localeCompare','Unsupported\x20file\x20in\x20page\x20directory:\x20','F_OK'];a257_0xa382=function(){return _0x45767b;};return a257_0xa382();}import{dirname,join,relative,resolve,sep}from'node:path';function a257_0x1da1(_0x2a4c52,_0x592b4e){_0x2a4c52=_0x2a4c52-0x153;const _0xa382ec=a257_0xa382();let _0x1da166=_0xa382ec[_0x2a4c52];return _0x1da166;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x2fcce1,_0x5c239a=process['cwd']()){const _0x25c5be=a257_0x1da1,_0x2c3b8b=resolve(_0x5c239a),_0x43f8ab=join(_0x2c3b8b,_0x25c5be(0x159),_0x25c5be(0x172));return{'projectRoot':_0x2c3b8b,'pagesBaseDir':_0x43f8ab,'appPagesDir':join(_0x43f8ab,_0x2fcce1),'lockFilePath':join(_0x2c3b8b,_0x25c5be(0x159),'page.lock.json')};}export function buildPageFileName(_0xf6bdd,_0x24b74c){const _0x53746a=a257_0x1da1;return _0xf6bdd+'-'+_0x24b74c[_0x53746a(0x153)]()+_0x53746a(0x156);}export function resolvePageFilePath(_0x4d16a0,_0x523ded,_0x33fe45){const _0x146cb3=a257_0x1da1;return join(_0x4d16a0[_0x146cb3(0x15f)],buildPageFileName(_0x523ded,_0x33fe45));}export async function ensureParentDirectory(_0x56c61a){await mkdir(dirname(_0x56c61a),{'recursive':!![]});}export async function fileExists(_0x38b5f4){const _0x3631f9=a257_0x1da1;try{return await access(_0x38b5f4,constants[_0x3631f9(0x168)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x21d7f9){const _0x318c4d=a257_0x1da1,_0x2a3f56=_0x21d7f9[_0x318c4d(0x16e)]();if(!_0x2a3f56)throw CliErrors[_0x318c4d(0x15d)]('page-dir');const _0x5ce8a8=resolve(_0x2a3f56);let _0x23a180;try{_0x23a180=await lstat(_0x5ce8a8);}catch{throw CliErrors[_0x318c4d(0x154)](_0x318c4d(0x161)+_0x2a3f56);}if(!_0x23a180[_0x318c4d(0x157)]())throw CliErrors[_0x318c4d(0x154)](_0x318c4d(0x171)+_0x2a3f56);const _0x5eee34={};return await readDirectory(_0x5ce8a8,_0x5ce8a8,_0x5eee34),_0x5eee34;}async function readDirectory(_0x504c3f,_0x5bc438,_0x2de48f){const _0x3737ba=a257_0x1da1,_0xb4d679=await readdir(_0x5bc438,{'withFileTypes':!![]});for(const _0x4525a0 of _0xb4d679[_0x3737ba(0x170)]((_0x2ff6ba,_0x3f1a98)=>_0x2ff6ba[_0x3737ba(0x169)][_0x3737ba(0x166)](_0x3f1a98['name']))){const _0x35eb47=join(_0x5bc438,_0x4525a0[_0x3737ba(0x169)]);if(_0x4525a0[_0x3737ba(0x157)]()){await readDirectory(_0x504c3f,_0x35eb47,_0x2de48f);continue;}if(!_0x4525a0[_0x3737ba(0x16b)]())throw CliErrors[_0x3737ba(0x154)](_0x3737ba(0x167)+_0x35eb47);_0x2de48f[relative(_0x504c3f,_0x35eb47)[_0x3737ba(0x155)](sep)[_0x3737ba(0x15e)]('/')]=await readFile(_0x35eb47,'utf8');}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53e121,_0x1e2bb3){const _0x1a8e44=a258_0x259b,_0x2c3044=_0x53e121();while(!![]){try{const _0x47d9a5=parseInt(_0x1a8e44(0x112))/0x1*(parseInt(_0x1a8e44(0x113))/0x2)+-parseInt(_0x1a8e44(0x10f))/0x3+parseInt(_0x1a8e44(0x11d))/0x4*(parseInt(_0x1a8e44(0x11b))/0x5)+-parseInt(_0x1a8e44(0x117))/0x6*(-parseInt(_0x1a8e44(0x110))/0x7)+-parseInt(_0x1a8e44(0x11a))/0x8*(-parseInt(_0x1a8e44(0x119))/0x9)+parseInt(_0x1a8e44(0x11c))/0xa*(parseInt(_0x1a8e44(0x115))/0xb)+-parseInt(_0x1a8e44(0x10e))/0xc;if(_0x47d9a5===_0x1e2bb3)break;else _0x2c3044['push'](_0x2c3044['shift']());}catch(_0x5dbbeb){_0x2c3044['push'](_0x2c3044['shift']());}}}(a258_0x2beb,0x9885a));function a258_0x259b(_0xba5d59,_0x3878a8){_0xba5d59=_0xba5d59-0x10d;const _0x2bebb0=a258_0x2beb();let _0x259b4b=_0x2bebb0[_0xba5d59];return _0x259b4b;}import a258_0x4f8581 from'node:crypto';import{readFile}from'node:fs/promises';function a258_0x2beb(){const _0x34389c=['update','124597VsyDnn','parse','5028IRoPss','createHash','85311txzRtv','232WzTbjf','2452910PzMXMr','960KIyPUs','4LcoOzE','utf8','13088688evNyPT','2859783KVPNMn','2653paRVce','stringify','8OeYXgZ','124562VYMdvB'];a258_0x2beb=function(){return _0x34389c;};return a258_0x2beb();}export function serializePageSchemaForFile(_0x41fd7a){const _0x349ed6=a258_0x259b;return JSON[_0x349ed6(0x111)](JSON[_0x349ed6(0x116)](_0x41fd7a),null,0x2)+'\x0a';}export function computePageContentHash(_0x269a21){const _0x3beccb=a258_0x259b;return a258_0x4f8581[_0x3beccb(0x118)]('md5')[_0x3beccb(0x114)](_0x269a21)['digest']('hex');}export function computeSerializedSchemaHash(_0x290fd9){return computePageContentHash(serializePageSchemaForFile(_0x290fd9));}export async function computePageFileHash(_0x33a954){const _0x5f3582=a258_0x259b,_0x2022aa=await readFile(_0x33a954,_0x5f3582(0x10d));return computePageContentHash(_0x2022aa);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc517b9,_0x3fa4a8){const _0x501bbf=a259_0xaf79,_0xb99051=_0xc517b9();while(!![]){try{const _0x1d6dea=parseInt(_0x501bbf(0x185))/0x1*(-parseInt(_0x501bbf(0x18c))/0x2)+parseInt(_0x501bbf(0x188))/0x3+parseInt(_0x501bbf(0x18b))/0x4+-parseInt(_0x501bbf(0x17e))/0x5*(-parseInt(_0x501bbf(0x183))/0x6)+-parseInt(_0x501bbf(0x186))/0x7+parseInt(_0x501bbf(0x184))/0x8+parseInt(_0x501bbf(0x18e))/0x9;if(_0x1d6dea===_0x3fa4a8)break;else _0xb99051['push'](_0xb99051['shift']());}catch(_0x2182e2){_0xb99051['push'](_0xb99051['shift']());}}}(a259_0x4c7b,0x4f872));import{mkdir,readFile,writeFile}from'node:fs/promises';function a259_0x4c7b(){const _0x5a0c5c=['29751OTecTu','2139844PvKDhI','lastSync','128346vbMuqX','code','pages','678300FnorUM','16ONbuPo','object','4251726YoLgjc','apps','110PqpZcz','parse','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','ENOENT','utf8','35922NdOEEP','423688GWcaNY'];a259_0x4c7b=function(){return _0x5a0c5c;};return a259_0x4c7b();}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x13dafe,_0x18cd03){const _0xa01d90=a259_0xaf79,_0x2e2877={'apps':_0x13dafe[_0xa01d90(0x18f)]&&typeof _0x13dafe['apps']==='object'?_0x13dafe[_0xa01d90(0x18f)]:{}};let _0x5b0bdc=_0x2e2877[_0xa01d90(0x18f)][_0x18cd03];if(!_0x5b0bdc)return _0x5b0bdc={'lastSync':'','pages':{}},_0x2e2877[_0xa01d90(0x18f)][_0x18cd03]=_0x5b0bdc,{'lockData':_0x2e2877,'appLock':_0x5b0bdc};return!_0x5b0bdc[_0xa01d90(0x187)]&&(_0x5b0bdc[_0xa01d90(0x187)]=''),(!_0x5b0bdc[_0xa01d90(0x18a)]||typeof _0x5b0bdc[_0xa01d90(0x18a)]!=='object')&&(_0x5b0bdc[_0xa01d90(0x18a)]={}),{'lockData':_0x2e2877,'appLock':_0x5b0bdc};}function a259_0xaf79(_0x1132de,_0x58cde0){_0x1132de=_0x1132de-0x17e;const _0x4c7bf0=a259_0x4c7b();let _0xaf79d0=_0x4c7bf0[_0x1132de];return _0xaf79d0;}export async function readPageLockFile(_0xc7973){const _0x438225=a259_0xaf79;try{const _0x3afa85=await readFile(_0xc7973,_0x438225(0x182)),_0x3105cd=JSON[_0x438225(0x17f)](_0x3afa85);return{'apps':_0x3105cd['apps']&&typeof _0x3105cd[_0x438225(0x18f)]===_0x438225(0x18d)?_0x3105cd[_0x438225(0x18f)]:{}};}catch(_0x15f65d){if(_0x15f65d[_0x438225(0x189)]===_0x438225(0x181))return null;throw new Error(_0x438225(0x180)+String(_0x15f65d));}}export async function writePageLockFile(_0x4f12ac,_0x4cc0c1){const _0x3a4223=a259_0xaf79;await mkdir(dirname(_0x4f12ac),{'recursive':!![]}),await writeFile(_0x4f12ac,JSON['stringify'](_0x4cc0c1,null,0x2),_0x3a4223(0x182));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a262_0x23ea(){const _0x456ce0=['2Kzvqvl','map','trim','natural','split','138921lErmQm','__sq__','metadataAvailable','exec','21105864HcLrQZ','unavailable','5220495skVOhU','from','matchedPrefix','table','reduce','toUpperCase','178677iObPko','max','index','containsUnresolvedInclude','endsWith','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','toLowerCase','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','inner','where','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','columns','232DUHCph','unknown','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','710NVSKZc','27174pUlnlC','cross','position','JOIN_INDEX_NOT_USABLE','\x5cs*\x5c.\x5cs*[\x5cw$]+','132HSBzlt','includes','search','join','unsupportedPredicate','covered','has','test','3277ExXuJS','warning','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','length','57530rFjQfL','INNER','min','full','alias','JOIN_INDEX_MISSING','replace','2508NgcHLM','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','push','right','some','(?:^|[^\x5cw$])','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','slice','INDEX_METADATA_UNAVAILABLE','indexes','using','match','matchAll','indexOf','filter'];a262_0x23ea=function(){return _0x456ce0;};return a262_0x23ea();}(function(_0x1c1fc4,_0x4549cb){const _0x1685be=a262_0x557d,_0x4a7c9a=_0x1c1fc4();while(!![]){try{const _0xc9cb2f=-parseInt(_0x1685be(0x116))/0x1*(parseInt(_0x1685be(0x131))/0x2)+parseInt(_0x1685be(0x136))/0x3*(-parseInt(_0x1685be(0x158))/0x4)+parseInt(_0x1685be(0x152))/0x5*(parseInt(_0x1685be(0x153))/0x6)+-parseInt(_0x1685be(0x13c))/0x7+-parseInt(_0x1685be(0x14f))/0x8*(parseInt(_0x1685be(0x142))/0x9)+parseInt(_0x1685be(0x11a))/0xa*(parseInt(_0x1685be(0x121))/0xb)+parseInt(_0x1685be(0x13a))/0xc;if(_0xc9cb2f===_0x4549cb)break;else _0x4a7c9a['push'](_0x4a7c9a['shift']());}catch(_0x5da186){_0x4a7c9a['push'](_0x4a7c9a['shift']());}}}(a262_0x23ea,0xd2216));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x26cf97,_0x12e237){const _0x48ff65=a262_0x557d,_0x1bdfb1=[],_0x5a0261=normalizeSqlForStaticAnalysis(_0x26cf97),_0x514cd9=(_0x5a0261['error']?[]:extractJoinFacts(_0x5a0261['sql']))['map'](_0x896c23=>{const _0x4dda8b=a262_0x557d;if(_0x896c23[_0x4dda8b(0x112)]||_0x896c23[_0x4dda8b(0x14e)][_0x4dda8b(0x119)]===0x0)return _0x1bdfb1[_0x4dda8b(0x123)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x896c23['table'],'alias':_0x896c23[_0x4dda8b(0x11e)],'columns':_0x896c23[_0x4dda8b(0x14e)],'reason':_0x896c23['unsupportedReason']??_0x4dda8b(0x151)}),{'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23['alias'],'columns':_0x896c23[_0x4dda8b(0x14e)],'status':_0x4dda8b(0x13b)};const _0xd9ac0c=resolveTableMetadata(_0x12e237,_0x896c23['table']),_0xafcf80=(_0xd9ac0c?.['indexes']??[])[_0x4dda8b(0x132)](_0x1815f3=>({'index':_0x1815f3,'matchedPrefix':findEqualityPrefix(_0x1815f3[_0x4dda8b(0x14e)],_0x896c23[_0x4dda8b(0x14e)])}))['filter'](_0x3e91e9=>_0x3e91e9[_0x4dda8b(0x13e)][_0x4dda8b(0x119)]>0x0),_0x2f1ca1=_0xafcf80[_0x4dda8b(0x140)]((_0x5f5c48,_0x5ecd4d)=>!_0x5f5c48||_0x5ecd4d[_0x4dda8b(0x13e)][_0x4dda8b(0x119)]>_0x5f5c48[_0x4dda8b(0x13e)][_0x4dda8b(0x119)]?_0x5ecd4d:_0x5f5c48,_0xafcf80[0x0]);if(_0x2f1ca1)return{'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23[_0x4dda8b(0x11e)],'columns':_0x896c23[_0x4dda8b(0x14e)],'status':_0x4dda8b(0x113),'matchedIndex':{..._0x2f1ca1[_0x4dda8b(0x144)],'matchedPrefix':_0x2f1ca1[_0x4dda8b(0x13e)]}};const _0x1ce25d=_0xd9ac0c?.[_0x4dda8b(0x12b)][_0x4dda8b(0x130)](_0x1e2220=>_0x1e2220[_0x4dda8b(0x14e)]['some'](_0x2874cf=>_0x896c23[_0x4dda8b(0x14e)][_0x4dda8b(0x125)](_0x472ea4=>columnNamesMatch(_0x2874cf,_0x472ea4))))??[];if(_0x1ce25d[_0x4dda8b(0x119)]>0x0)return _0x1bdfb1[_0x4dda8b(0x123)]({'code':_0x4dda8b(0x156),'table':_0x896c23['table'],'alias':_0x896c23['alias'],'columns':_0x896c23[_0x4dda8b(0x14e)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23['alias'],'columns':_0x896c23['columns'],'status':'warning','candidateIndexes':_0x1ce25d};if(_0xd9ac0c&&_0xd9ac0c[_0x4dda8b(0x138)]!==![]&&_0xd9ac0c[_0x4dda8b(0x12b)][_0x4dda8b(0x119)]>0x0&&_0x896c23[_0x4dda8b(0x14e)][_0x4dda8b(0x119)]>0x0)return _0x1bdfb1['push']({'code':_0x4dda8b(0x11f),'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23['alias'],'columns':_0x896c23['columns'],'reason':_0x4dda8b(0x118)}),{'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23[_0x4dda8b(0x11e)],'columns':_0x896c23[_0x4dda8b(0x14e)],'status':_0x4dda8b(0x117)};return _0x1bdfb1[_0x4dda8b(0x123)]({'code':_0x4dda8b(0x12a),'table':_0x896c23['table'],'alias':_0x896c23[_0x4dda8b(0x11e)],'columns':_0x896c23['columns'],'reason':_0xd9ac0c?_0x4dda8b(0x128):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x896c23[_0x4dda8b(0x13f)],'alias':_0x896c23[_0x4dda8b(0x11e)],'columns':_0x896c23[_0x4dda8b(0x14e)],'status':_0x4dda8b(0x13b)};});return{'checked':_0x514cd9[_0x48ff65(0x119)]>0x0,'joins':_0x514cd9,'warnings':_0x1bdfb1};}function extractJoinFacts(_0x9eb5a1){const _0x2d1a08=a262_0x557d,_0x4ff1a1=maskNestedQueries(stripSqlNoise(_0x9eb5a1)),_0x387589=maskQuotedIdentifiers(_0x4ff1a1),_0x3c0f91=[],_0x5717c5=new Set(),_0x36bb1e=/\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 _0x51270d of _0x4ff1a1[_0x2d1a08(0x12e)](_0x36bb1e)){const _0xc6d9a7=_0x51270d[_0x2d1a08(0x144)]??0x0,_0x4e01e2=_0x51270d[0x0][_0x2d1a08(0x110)](/\bJOIN\b/i),_0xf4b880=_0xc6d9a7+Math[_0x2d1a08(0x143)](0x0,_0x4e01e2);if(!/^JOIN\b/i[_0x2d1a08(0x115)](_0x387589[_0x2d1a08(0x129)](_0xf4b880)))continue;_0x5717c5['add'](_0xf4b880);const _0x246a38=normalizeIdentifier(_0x51270d[0x1]||_0x2d1a08(0x11b)),_0x54adcf=normalizeIdentifier(_0x51270d[0x2]??''),_0x2df325=normalizeIdentifier(_0x51270d[0x3]||_0x54adcf['split']('.')['at'](-0x1)||_0x54adcf),_0x2ed331=[],_0x560c7a=_0x54adcf===_0x2d1a08(0x137);let _0xf00e3b=_0x246a38===_0x2d1a08(0x124)||_0x246a38===_0x2d1a08(0x11d)||_0x560c7a,_0x2d31e9=_0xf00e3b?_0x560c7a?_0x2d1a08(0x127):_0x246a38[_0x2d1a08(0x141)]()+_0x2d1a08(0x14c):undefined;const _0x30ad4c=stripOuterParentheses(_0x51270d[0x4]??''),_0x354d34=_0x30ad4c['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x30ad4c[_0x2d1a08(0x159)](MYBATIS_DYNAMIC_END_MARKER),_0x592741=_0x30ad4c[_0x2d1a08(0x159)](MYBATIS_INCLUDE_MARKER);_0x354d34&&(_0xf00e3b=!![],_0x2d31e9??=_0x2d1a08(0x122));_0x592741&&(_0xf00e3b=!![],_0x2d31e9??=_0x2d1a08(0x149));const _0x77ffbd=_0x30ad4c['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x77ffbd,'OR')&&(_0xf00e3b=!![],_0x2d31e9??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x193192 of splitTopLevelAnd(_0x77ffbd)){const _0x1f4fbf=stripOuterParentheses(_0x193192);if(hasTopLevelKeyword(_0x1f4fbf,'OR')){_0xf00e3b=!![],_0x2d31e9??=_0x2d1a08(0x147);continue;}const _0x2eb61a=splitEquality(_0x1f4fbf);if(!_0x2eb61a){containsColumnReference(_0x193192,_0x2df325)&&(_0xf00e3b=!![]);continue;}const _0x55ef87=parseDirectColumnReference(_0x2eb61a[0x0],_0x2df325),_0x4d27f3=parseDirectColumnReference(_0x2eb61a[0x1],_0x2df325),_0x1cd9f7=containsColumnReference(_0x2eb61a[0x0],_0x2df325),_0x25fc59=containsColumnReference(_0x2eb61a[0x1],_0x2df325),_0x25b688=_0x55ef87&&!_0x25fc59?_0x55ef87:_0x4d27f3&&!_0x1cd9f7?_0x4d27f3:null;if(_0x25b688&&!_0x2ed331['includes'](_0x25b688))_0x2ed331[_0x2d1a08(0x123)](_0x25b688);else!_0x25b688&&containsColumnReference(_0x193192,_0x2df325)&&(_0xf00e3b=!![]);}_0x3c0f91[_0x2d1a08(0x123)]({'table':_0x54adcf,'alias':_0x2df325,'columns':_0x2ed331,'unsupportedPredicate':_0xf00e3b,'unsupportedReason':_0x2d31e9,'containsUnresolvedInclude':_0x592741,'position':_0xf4b880});}for(const _0x385d59 of _0x387589[_0x2d1a08(0x12e)](/\bJOIN\b/gi)){const _0x1f066d=_0x385d59[_0x2d1a08(0x144)]??0x0;if(_0x5717c5['has'](_0x1f066d))continue;const _0x3a6b9c=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x2d1a08(0x139)](_0x4ff1a1[_0x2d1a08(0x129)](_0x1f066d+_0x385d59[0x0][_0x2d1a08(0x119)])),_0x43eac4=normalizeIdentifier(_0x3a6b9c?.[0x1]||_0x2d1a08(0x150)),_0x3a45c7=normalizeIdentifier(_0x3a6b9c?.[0x2]||''),_0x5510f2=isSqlClauseKeyword(_0x3a45c7)?_0x43eac4[_0x2d1a08(0x135)]('.')['at'](-0x1)||_0x43eac4:_0x3a45c7||_0x43eac4[_0x2d1a08(0x135)]('.')['at'](-0x1)||_0x43eac4;_0x3c0f91[_0x2d1a08(0x123)]({'table':_0x43eac4,'alias':_0x5510f2,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x1f066d});}const _0x357777=_0x387589[_0x2d1a08(0x12f)](MYBATIS_INCLUDE_MARKER);return _0x357777>=0x0&&!_0x3c0f91[_0x2d1a08(0x125)](_0x3a7a40=>_0x3a7a40[_0x2d1a08(0x145)])&&_0x3c0f91['push']({'table':_0x2d1a08(0x150),'alias':'unknown','columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x2d1a08(0x14d),'containsUnresolvedInclude':!![],'position':_0x357777}),_0x3c0f91['sort']((_0x57ef09,_0x2f21c0)=>_0x57ef09[_0x2d1a08(0x155)]-_0x2f21c0[_0x2d1a08(0x155)]);}function stripSqlNoise(_0x417c84){const _0x314531=a262_0x557d,_0x41f5b7=Array[_0x314531(0x13d)](_0x417c84),_0x27f0eb=(_0x327ddf,_0x5e35dc)=>{for(let _0x50e23e=_0x327ddf;_0x50e23e<_0x5e35dc;_0x50e23e+=0x1){_0x41f5b7[_0x50e23e]!=='\x0a'&&_0x41f5b7[_0x50e23e]!=='\x0d'&&(_0x41f5b7[_0x50e23e]='\x20');}};for(let _0x22a752=0x0;_0x22a752<_0x41f5b7[_0x314531(0x119)];_0x22a752+=0x1){const _0x38f44a=_0x41f5b7[_0x22a752],_0x409d0b=_0x41f5b7[_0x22a752+0x1];if(_0x38f44a==='\x27'||_0x38f44a==='\x22'||_0x38f44a==='`'){const _0x52cd16=_0x38f44a,_0x1df58b=_0x22a752;_0x22a752+=0x1;while(_0x22a752<_0x41f5b7[_0x314531(0x119)]){if(_0x41f5b7[_0x22a752]==='\x5c'&&_0x22a752+0x1<_0x41f5b7[_0x314531(0x119)]){_0x22a752+=0x2;continue;}if(_0x41f5b7[_0x22a752]!==_0x52cd16){_0x22a752+=0x1;continue;}if(_0x41f5b7[_0x22a752+0x1]===_0x52cd16){_0x22a752+=0x2;continue;}break;}if(_0x52cd16==='\x27')_0x27f0eb(_0x1df58b,Math[_0x314531(0x11c)](_0x22a752+0x1,_0x41f5b7[_0x314531(0x119)]));continue;}if(_0x38f44a==='-'&&_0x409d0b==='-'){const _0x51d7ef=_0x22a752;while(_0x22a752<_0x41f5b7[_0x314531(0x119)]&&_0x41f5b7[_0x22a752]!=='\x0a')_0x22a752+=0x1;_0x27f0eb(_0x51d7ef,_0x22a752);continue;}if(_0x38f44a==='/'&&_0x409d0b==='*'){const _0xeeed39=_0x22a752;_0x22a752+=0x2;while(_0x22a752<_0x41f5b7['length']&&!(_0x41f5b7[_0x22a752]==='*'&&_0x41f5b7[_0x22a752+0x1]==='/')){_0x22a752+=0x1;}_0x22a752=Math[_0x314531(0x11c)](_0x22a752+0x1,_0x41f5b7['length']-0x1),_0x27f0eb(_0xeeed39,_0x22a752+0x1);continue;}if(_0x38f44a==='#'&&_0x409d0b!=='{'){const _0x42c0e7=_0x22a752;while(_0x22a752<_0x41f5b7[_0x314531(0x119)]&&_0x41f5b7[_0x22a752]!=='\x0a')_0x22a752+=0x1;_0x27f0eb(_0x42c0e7,_0x22a752);continue;}if((_0x38f44a==='#'||_0x38f44a==='$')&&_0x409d0b==='{'){const _0x27fb6d=_0x22a752;_0x22a752+=0x2;while(_0x22a752<_0x41f5b7[_0x314531(0x119)]&&_0x41f5b7[_0x22a752]!=='}')_0x22a752+=0x1;_0x27f0eb(_0x27fb6d,Math['min'](_0x22a752+0x1,_0x41f5b7[_0x314531(0x119)]));}}return _0x41f5b7[_0x314531(0x111)]('');}function maskQuotedIdentifiers(_0x43cd76){const _0x3a9ca6=a262_0x557d,_0x114b75=Array['from'](_0x43cd76);for(let _0x3c41c0=0x0;_0x3c41c0<_0x114b75[_0x3a9ca6(0x119)];_0x3c41c0+=0x1){const _0x2f75cf=_0x114b75[_0x3c41c0];if(_0x2f75cf!=='\x22'&&_0x2f75cf!=='`')continue;_0x3c41c0+=0x1;while(_0x3c41c0<_0x114b75['length']){if(_0x114b75[_0x3c41c0]===_0x2f75cf){if(_0x114b75[_0x3c41c0+0x1]===_0x2f75cf){_0x114b75[_0x3c41c0]='\x20',_0x114b75[_0x3c41c0+0x1]='\x20',_0x3c41c0+=0x2;continue;}break;}_0x114b75[_0x3c41c0]='\x20',_0x3c41c0+=0x1;}}return _0x114b75[_0x3a9ca6(0x111)]('');}function maskNestedQueries(_0x37622e){const _0x122699=a262_0x557d,_0x5cd30a=Array['from'](_0x37622e);for(let _0x563934=0x0;_0x563934<_0x5cd30a[_0x122699(0x119)];_0x563934+=0x1){if(_0x5cd30a[_0x563934]!=='(')continue;const _0x366696=_0x37622e[_0x122699(0x129)](_0x563934+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x122699(0x115)](_0x366696))continue;let _0x13a8b1=0x1,_0x1b5853=_0x563934+0x1;for(;_0x1b5853<_0x5cd30a[_0x122699(0x119)]&&_0x13a8b1>0x0;_0x1b5853+=0x1){if(_0x5cd30a[_0x1b5853]==='(')_0x13a8b1+=0x1;if(_0x5cd30a[_0x1b5853]===')')_0x13a8b1-=0x1;}if(_0x13a8b1!==0x0)continue;for(let _0x417a95=_0x563934;_0x417a95<_0x1b5853;_0x417a95+=0x1){_0x5cd30a[_0x417a95]='\x20';}const _0x1ac846=_0x122699(0x137);for(let _0x3cb5da=0x0;_0x3cb5da<_0x1ac846['length']&&_0x563934+_0x3cb5da<_0x1b5853;_0x3cb5da+=0x1){_0x5cd30a[_0x563934+_0x3cb5da]=_0x1ac846[_0x3cb5da];}_0x563934=_0x1b5853-0x1;}return _0x5cd30a[_0x122699(0x111)]('');}function a262_0x557d(_0x2d8d2,_0x2c2f40){_0x2d8d2=_0x2d8d2-0x110;const _0x23ea50=a262_0x23ea();let _0x557dc0=_0x23ea50[_0x2d8d2];return _0x557dc0;}function splitTopLevelAnd(_0x5b51a1){const _0x3381c4=a262_0x557d,_0x40a2c0=[];let _0x5b0f94=0x0,_0x77c59a=0x0;for(let _0x15c6d6=0x0;_0x15c6d6<_0x5b51a1[_0x3381c4(0x119)];_0x15c6d6+=0x1){const _0x6d4f25=_0x5b51a1[_0x15c6d6];if(_0x6d4f25==='(')_0x5b0f94+=0x1;if(_0x6d4f25===')')_0x5b0f94=Math[_0x3381c4(0x143)](0x0,_0x5b0f94-0x1);_0x5b0f94===0x0&&_0x5b51a1[_0x3381c4(0x129)](_0x15c6d6)[_0x3381c4(0x12d)](/^AND\b/i)&&(_0x15c6d6===0x0||/\s/[_0x3381c4(0x115)](_0x5b51a1[_0x15c6d6-0x1]??''))&&(_0x40a2c0[_0x3381c4(0x123)](_0x5b51a1['slice'](_0x77c59a,_0x15c6d6)[_0x3381c4(0x133)]()),_0x15c6d6+=0x2,_0x77c59a=_0x15c6d6+0x1);}const _0x3bbcf2=_0x5b51a1['slice'](_0x77c59a)[_0x3381c4(0x133)]();if(_0x3bbcf2)_0x40a2c0[_0x3381c4(0x123)](_0x3bbcf2);return _0x40a2c0;}function hasTopLevelKeyword(_0x1a7eaa,_0x2672c7){const _0x1d33b3=a262_0x557d;let _0x5f2bb1=0x0;for(let _0x4ddddc=0x0;_0x4ddddc<_0x1a7eaa['length'];_0x4ddddc+=0x1){const _0x5ccc73=_0x1a7eaa[_0x4ddddc];if(_0x5ccc73==='(')_0x5f2bb1+=0x1;if(_0x5ccc73===')')_0x5f2bb1=Math[_0x1d33b3(0x143)](0x0,_0x5f2bb1-0x1);if(_0x5f2bb1!==0x0)continue;const _0x505adf=_0x1a7eaa[_0x1d33b3(0x129)](_0x4ddddc,_0x4ddddc+_0x2672c7[_0x1d33b3(0x119)]),_0x11db74=_0x1a7eaa[_0x4ddddc-0x1]??'\x20',_0x114973=_0x1a7eaa[_0x4ddddc+_0x2672c7[_0x1d33b3(0x119)]]??'\x20';if(_0x505adf['toUpperCase']()===_0x2672c7[_0x1d33b3(0x141)]()&&!/[\w$]/['test'](_0x11db74)&&!/[\w$]/[_0x1d33b3(0x115)](_0x114973))return!![];}return![];}function splitEquality(_0x287152){const _0x6cb46b=a262_0x557d,_0x551c1=stripOuterParentheses(_0x287152);let _0x29a9a3=0x0,_0x4d2c65;for(let _0x15ec1a=0x0;_0x15ec1a<_0x551c1[_0x6cb46b(0x119)];_0x15ec1a+=0x1){const _0x9463c8=_0x551c1[_0x15ec1a];if(_0x9463c8==='(')_0x29a9a3+=0x1;if(_0x9463c8===')')_0x29a9a3=Math[_0x6cb46b(0x143)](0x0,_0x29a9a3-0x1);const _0x245549=_0x551c1[_0x15ec1a-0x1]??'',_0x3f8ff4=_0x551c1[_0x15ec1a+0x1]??'';if(_0x9463c8==='='&&_0x29a9a3===0x0&&!/[!<>=:]/[_0x6cb46b(0x115)](_0x245549)&&_0x3f8ff4!=='='){if(_0x4d2c65!==undefined)return null;_0x4d2c65=_0x15ec1a;}}return _0x4d2c65===undefined?null:[_0x551c1['slice'](0x0,_0x4d2c65)['trim'](),_0x551c1['slice'](_0x4d2c65+0x1)[_0x6cb46b(0x133)]()];}function parseDirectColumnReference(_0x790701,_0x57a581){const _0x8df899=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x790701));if(!_0x8df899)return null;if(normalizeIdentifier(_0x8df899[0x1]??'')!==normalizeIdentifier(_0x57a581))return null;return normalizeIdentifier(_0x8df899[0x2]??'');}function containsColumnReference(_0x349623,_0x2cb685){const _0x2c1f88=a262_0x557d,_0x30ad76=_0x349623[_0x2c1f88(0x120)](/[`"]/g,''),_0x31899d=_0x2cb685[_0x2c1f88(0x120)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x2c1f88(0x126)+_0x31899d+_0x2c1f88(0x157),'i')[_0x2c1f88(0x115)](_0x30ad76);}function findEqualityPrefix(_0x188a00,_0x289229){const _0x52861e=a262_0x557d,_0x37bb5e=new Set(_0x289229['map'](normalizeIdentifier)),_0x5f1e93=[];for(const _0x21fe39 of _0x188a00){if(!_0x37bb5e[_0x52861e(0x114)](normalizeIdentifier(_0x21fe39)))break;_0x5f1e93[_0x52861e(0x123)](_0x21fe39);}return _0x5f1e93;}function resolveTableMetadata(_0x591f7a,_0x5acef9){const _0x58d4fe=a262_0x557d,_0x2795c0=normalizeIdentifier(_0x5acef9),_0x5edcbb=_0x591f7a[_0x58d4fe(0x130)](_0x496b64=>normalizeIdentifier(_0x496b64['tableName'])===_0x2795c0);if(_0x5edcbb[_0x58d4fe(0x119)]===0x1)return _0x5edcbb[0x0];const _0x176655=_0x2795c0['includes']('.'),_0xa345ec=_0x2795c0['split']('.')['at'](-0x1),_0x2f587b=_0x591f7a[_0x58d4fe(0x130)](_0x32e342=>{const _0x5427b9=_0x58d4fe,_0x3811dd=normalizeIdentifier(_0x32e342['tableName']);if(_0x176655&&_0x3811dd['includes']('.'))return![];return _0x3811dd[_0x5427b9(0x135)]('.')['at'](-0x1)===_0xa345ec;});return _0x2f587b[_0x58d4fe(0x119)]===0x1?_0x2f587b[0x0]:undefined;}function columnNamesMatch(_0x372fe6,_0x3f25f7){return normalizeIdentifier(_0x372fe6)===normalizeIdentifier(_0x3f25f7);}function normalizeIdentifier(_0x19eecf){const _0x1fae02=a262_0x557d;return _0x19eecf[_0x1fae02(0x120)](/[`"]/g,'')[_0x1fae02(0x133)]()[_0x1fae02(0x148)]();}function isSqlClauseKeyword(_0x3a451f){const _0x3d8cb5=a262_0x557d;return new Set(['on',_0x3d8cb5(0x12c),_0x3d8cb5(0x14b),_0x3d8cb5(0x111),_0x3d8cb5(0x14a),'left',_0x3d8cb5(0x124),_0x3d8cb5(0x11d),_0x3d8cb5(0x154),_0x3d8cb5(0x134)])['has'](_0x3a451f);}function stripOuterParentheses(_0x4da3c1){const _0x5539d9=a262_0x557d;let _0x59aa49=_0x4da3c1[_0x5539d9(0x133)]();while(_0x59aa49['startsWith']('(')&&_0x59aa49[_0x5539d9(0x146)](')')){let _0x424bc4=0x0,_0x363df7=!![];for(let _0xb71b8b=0x0;_0xb71b8b<_0x59aa49[_0x5539d9(0x119)];_0xb71b8b+=0x1){if(_0x59aa49[_0xb71b8b]==='(')_0x424bc4+=0x1;if(_0x59aa49[_0xb71b8b]===')')_0x424bc4-=0x1;if(_0x424bc4===0x0&&_0xb71b8b<_0x59aa49['length']-0x1){_0x363df7=![];break;}}if(!_0x363df7||_0x424bc4!==0x0)break;_0x59aa49=_0x59aa49[_0x5539d9(0x129)](0x1,-0x1)['trim']();}return _0x59aa49;}
|
|
1
|
+
(function(_0x548205,_0x3552d6){const _0x10cb9b=a261_0x4a76,_0x20e58f=_0x548205();while(!![]){try{const _0x16b144=-parseInt(_0x10cb9b(0xb1))/0x1*(-parseInt(_0x10cb9b(0xdd))/0x2)+parseInt(_0x10cb9b(0xb2))/0x3*(-parseInt(_0x10cb9b(0xb3))/0x4)+-parseInt(_0x10cb9b(0xbd))/0x5+parseInt(_0x10cb9b(0xd8))/0x6*(-parseInt(_0x10cb9b(0xe9))/0x7)+-parseInt(_0x10cb9b(0xe5))/0x8+parseInt(_0x10cb9b(0xf6))/0x9+parseInt(_0x10cb9b(0xe8))/0xa*(parseInt(_0x10cb9b(0xc0))/0xb);if(_0x16b144===_0x3552d6)break;else _0x20e58f['push'](_0x20e58f['shift']());}catch(_0x1c27d5){_0x20e58f['push'](_0x20e58f['shift']());}}}(a261_0x15ff,0xbf076));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0xd1c550,_0x5472b6){const _0x533680=a261_0x4a76,_0x56b6c0=[],_0x2f0b15=normalizeSqlForStaticAnalysis(_0xd1c550),_0x1cb46f=(_0x2f0b15[_0x533680(0xc8)]?[]:extractJoinFacts(_0x2f0b15[_0x533680(0xd9)]))[_0x533680(0xe6)](_0x22cd11=>{const _0x477aee=_0x533680;if(_0x22cd11[_0x477aee(0xf3)]||_0x22cd11['columns']['length']===0x0)return _0x56b6c0[_0x477aee(0xc6)]({'code':_0x477aee(0xda),'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'reason':_0x22cd11['unsupportedReason']??_0x477aee(0xf2)}),{'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'status':_0x477aee(0xc5)};const _0x20f9cf=resolveTableMetadata(_0x5472b6,_0x22cd11[_0x477aee(0xf0)]),_0xd0f57b=(_0x20f9cf?.[_0x477aee(0xe4)]??[])[_0x477aee(0xe6)](_0x21d0b7=>({'index':_0x21d0b7,'matchedPrefix':findEqualityPrefix(_0x21d0b7[_0x477aee(0xe2)],_0x22cd11[_0x477aee(0xe2)])}))[_0x477aee(0xab)](_0x34b6e6=>_0x34b6e6['matchedPrefix'][_0x477aee(0xb4)]>0x0),_0x1589d0=_0xd0f57b[_0x477aee(0xca)]((_0x4efdd9,_0x3a9e38)=>!_0x4efdd9||_0x3a9e38[_0x477aee(0xed)][_0x477aee(0xb4)]>_0x4efdd9['matchedPrefix'][_0x477aee(0xb4)]?_0x3a9e38:_0x4efdd9,_0xd0f57b[0x0]);if(_0x1589d0)return{'table':_0x22cd11['table'],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'status':_0x477aee(0xbe),'matchedIndex':{..._0x1589d0[_0x477aee(0xba)],'matchedPrefix':_0x1589d0['matchedPrefix']}};const _0x102f5a=_0x20f9cf?.[_0x477aee(0xe4)]['filter'](_0x11758b=>_0x11758b[_0x477aee(0xe2)][_0x477aee(0xd2)](_0x2cc6c4=>_0x22cd11[_0x477aee(0xe2)][_0x477aee(0xd2)](_0x977618=>columnNamesMatch(_0x2cc6c4,_0x977618))))??[];if(_0x102f5a[_0x477aee(0xb4)]>0x0)return _0x56b6c0['push']({'code':_0x477aee(0xb8),'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'reason':_0x477aee(0xeb)}),{'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'status':_0x477aee(0xb6),'candidateIndexes':_0x102f5a};if(_0x20f9cf&&_0x20f9cf['metadataAvailable']!==![]&&_0x20f9cf[_0x477aee(0xe4)][_0x477aee(0xb4)]>0x0&&_0x22cd11['columns'][_0x477aee(0xb4)]>0x0)return _0x56b6c0[_0x477aee(0xc6)]({'code':_0x477aee(0xee),'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'reason':_0x477aee(0xc2)}),{'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11['columns'],'status':_0x477aee(0xb6)};return _0x56b6c0[_0x477aee(0xc6)]({'code':_0x477aee(0xbc),'table':_0x22cd11['table'],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11[_0x477aee(0xe2)],'reason':_0x20f9cf?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':_0x477aee(0xd6)}),{'table':_0x22cd11[_0x477aee(0xf0)],'alias':_0x22cd11[_0x477aee(0xae)],'columns':_0x22cd11['columns'],'status':'unavailable'};});return{'checked':_0x1cb46f[_0x533680(0xb4)]>0x0,'joins':_0x1cb46f,'warnings':_0x56b6c0};}function extractJoinFacts(_0x247fd7){const _0x1fedb8=a261_0x4a76,_0x220ed8=maskNestedQueries(stripSqlNoise(_0x247fd7)),_0x126632=maskQuotedIdentifiers(_0x220ed8),_0x20b332=[],_0xc1b4fd=new Set(),_0x1e3816=/\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 _0x28ba68 of _0x220ed8[_0x1fedb8(0xb9)](_0x1e3816)){const _0x2e75eb=_0x28ba68[_0x1fedb8(0xba)]??0x0,_0x216083=_0x28ba68[0x0][_0x1fedb8(0xcc)](/\bJOIN\b/i),_0x1b1f00=_0x2e75eb+Math[_0x1fedb8(0xef)](0x0,_0x216083);if(!/^JOIN\b/i[_0x1fedb8(0xaa)](_0x126632[_0x1fedb8(0xce)](_0x1b1f00)))continue;_0xc1b4fd[_0x1fedb8(0xdc)](_0x1b1f00);const _0x440c82=normalizeIdentifier(_0x28ba68[0x1]||_0x1fedb8(0xc1)),_0x262e5f=normalizeIdentifier(_0x28ba68[0x2]??''),_0x31f3f1=normalizeIdentifier(_0x28ba68[0x3]||_0x262e5f['split']('.')['at'](-0x1)||_0x262e5f),_0x36baf9=[],_0x3d8815=_0x262e5f===_0x1fedb8(0xd4);let _0x3b7c07=_0x440c82===_0x1fedb8(0xdb)||_0x440c82===_0x1fedb8(0xd3)||_0x3d8815,_0x34dd8b=_0x3b7c07?_0x3d8815?_0x1fedb8(0xd5):_0x440c82[_0x1fedb8(0xc3)]()+'\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.':undefined;const _0x404dd3=stripOuterParentheses(_0x28ba68[0x4]??''),_0x51de41=_0x404dd3[_0x1fedb8(0xd7)](MYBATIS_DYNAMIC_START_MARKER)||_0x404dd3[_0x1fedb8(0xd7)](MYBATIS_DYNAMIC_END_MARKER),_0x35d0a5=_0x404dd3[_0x1fedb8(0xd7)](MYBATIS_INCLUDE_MARKER);_0x51de41&&(_0x3b7c07=!![],_0x34dd8b??=_0x1fedb8(0xe0));_0x35d0a5&&(_0x3b7c07=!![],_0x34dd8b??=_0x1fedb8(0xe1));const _0x27149f=_0x404dd3[_0x1fedb8(0xb5)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x1fedb8(0xb5)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x27149f,'OR')&&(_0x3b7c07=!![],_0x34dd8b??=_0x1fedb8(0xc9));for(const _0x2af7ff of splitTopLevelAnd(_0x27149f)){const _0x5a67ca=stripOuterParentheses(_0x2af7ff);if(hasTopLevelKeyword(_0x5a67ca,'OR')){_0x3b7c07=!![],_0x34dd8b??=_0x1fedb8(0xc9);continue;}const _0x5bf0b1=splitEquality(_0x5a67ca);if(!_0x5bf0b1){containsColumnReference(_0x2af7ff,_0x31f3f1)&&(_0x3b7c07=!![]);continue;}const _0x36c169=parseDirectColumnReference(_0x5bf0b1[0x0],_0x31f3f1),_0x3960eb=parseDirectColumnReference(_0x5bf0b1[0x1],_0x31f3f1),_0x570526=containsColumnReference(_0x5bf0b1[0x0],_0x31f3f1),_0x282183=containsColumnReference(_0x5bf0b1[0x1],_0x31f3f1),_0x52f458=_0x36c169&&!_0x282183?_0x36c169:_0x3960eb&&!_0x570526?_0x3960eb:null;if(_0x52f458&&!_0x36baf9[_0x1fedb8(0xd7)](_0x52f458))_0x36baf9[_0x1fedb8(0xc6)](_0x52f458);else!_0x52f458&&containsColumnReference(_0x2af7ff,_0x31f3f1)&&(_0x3b7c07=!![]);}_0x20b332[_0x1fedb8(0xc6)]({'table':_0x262e5f,'alias':_0x31f3f1,'columns':_0x36baf9,'unsupportedPredicate':_0x3b7c07,'unsupportedReason':_0x34dd8b,'containsUnresolvedInclude':_0x35d0a5,'position':_0x1b1f00});}for(const _0x1327ad of _0x126632['matchAll'](/\bJOIN\b/gi)){const _0x134826=_0x1327ad[_0x1fedb8(0xba)]??0x0;if(_0xc1b4fd[_0x1fedb8(0xe7)](_0x134826))continue;const _0x1e9862=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0x220ed8[_0x1fedb8(0xce)](_0x134826+_0x1327ad[0x0]['length'])),_0x1b2bc9=normalizeIdentifier(_0x1e9862?.[0x1]||_0x1fedb8(0xf4)),_0x25a092=normalizeIdentifier(_0x1e9862?.[0x2]||''),_0xb2703c=isSqlClauseKeyword(_0x25a092)?_0x1b2bc9[_0x1fedb8(0xb7)]('.')['at'](-0x1)||_0x1b2bc9:_0x25a092||_0x1b2bc9[_0x1fedb8(0xb7)]('.')['at'](-0x1)||_0x1b2bc9;_0x20b332[_0x1fedb8(0xc6)]({'table':_0x1b2bc9,'alias':_0xb2703c,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x1fedb8(0xbb),'position':_0x134826});}const _0x31f651=_0x126632[_0x1fedb8(0xd1)](MYBATIS_INCLUDE_MARKER);return _0x31f651>=0x0&&!_0x20b332[_0x1fedb8(0xd2)](_0x138b3c=>_0x138b3c[_0x1fedb8(0xf7)])&&_0x20b332[_0x1fedb8(0xc6)]({'table':'unknown','alias':_0x1fedb8(0xf4),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x1fedb8(0xd0),'containsUnresolvedInclude':!![],'position':_0x31f651}),_0x20b332[_0x1fedb8(0xdf)]((_0x36ba2f,_0x398c55)=>_0x36ba2f[_0x1fedb8(0xe3)]-_0x398c55[_0x1fedb8(0xe3)]);}function stripSqlNoise(_0x338fcf){const _0x19efac=a261_0x4a76,_0x9e12f1=Array[_0x19efac(0xcd)](_0x338fcf),_0x34229d=(_0x5271b4,_0x59d5b0)=>{for(let _0x31f174=_0x5271b4;_0x31f174<_0x59d5b0;_0x31f174+=0x1){_0x9e12f1[_0x31f174]!=='\x0a'&&_0x9e12f1[_0x31f174]!=='\x0d'&&(_0x9e12f1[_0x31f174]='\x20');}};for(let _0x3d0613=0x0;_0x3d0613<_0x9e12f1[_0x19efac(0xb4)];_0x3d0613+=0x1){const _0x1714f5=_0x9e12f1[_0x3d0613],_0x3a05a5=_0x9e12f1[_0x3d0613+0x1];if(_0x1714f5==='\x27'||_0x1714f5==='\x22'||_0x1714f5==='`'){const _0x527c54=_0x1714f5,_0x32a780=_0x3d0613;_0x3d0613+=0x1;while(_0x3d0613<_0x9e12f1[_0x19efac(0xb4)]){if(_0x9e12f1[_0x3d0613]==='\x5c'&&_0x3d0613+0x1<_0x9e12f1['length']){_0x3d0613+=0x2;continue;}if(_0x9e12f1[_0x3d0613]!==_0x527c54){_0x3d0613+=0x1;continue;}if(_0x9e12f1[_0x3d0613+0x1]===_0x527c54){_0x3d0613+=0x2;continue;}break;}if(_0x527c54==='\x27')_0x34229d(_0x32a780,Math[_0x19efac(0xde)](_0x3d0613+0x1,_0x9e12f1[_0x19efac(0xb4)]));continue;}if(_0x1714f5==='-'&&_0x3a05a5==='-'){const _0x474992=_0x3d0613;while(_0x3d0613<_0x9e12f1[_0x19efac(0xb4)]&&_0x9e12f1[_0x3d0613]!=='\x0a')_0x3d0613+=0x1;_0x34229d(_0x474992,_0x3d0613);continue;}if(_0x1714f5==='/'&&_0x3a05a5==='*'){const _0x1cede7=_0x3d0613;_0x3d0613+=0x2;while(_0x3d0613<_0x9e12f1[_0x19efac(0xb4)]&&!(_0x9e12f1[_0x3d0613]==='*'&&_0x9e12f1[_0x3d0613+0x1]==='/')){_0x3d0613+=0x1;}_0x3d0613=Math[_0x19efac(0xde)](_0x3d0613+0x1,_0x9e12f1[_0x19efac(0xb4)]-0x1),_0x34229d(_0x1cede7,_0x3d0613+0x1);continue;}if(_0x1714f5==='#'&&_0x3a05a5!=='{'){const _0x2ec301=_0x3d0613;while(_0x3d0613<_0x9e12f1[_0x19efac(0xb4)]&&_0x9e12f1[_0x3d0613]!=='\x0a')_0x3d0613+=0x1;_0x34229d(_0x2ec301,_0x3d0613);continue;}if((_0x1714f5==='#'||_0x1714f5==='$')&&_0x3a05a5==='{'){const _0x3ebf64=_0x3d0613;_0x3d0613+=0x2;while(_0x3d0613<_0x9e12f1[_0x19efac(0xb4)]&&_0x9e12f1[_0x3d0613]!=='}')_0x3d0613+=0x1;_0x34229d(_0x3ebf64,Math[_0x19efac(0xde)](_0x3d0613+0x1,_0x9e12f1[_0x19efac(0xb4)]));}}return _0x9e12f1[_0x19efac(0xf8)]('');}function maskQuotedIdentifiers(_0x1d8a61){const _0x18dcfb=a261_0x4a76,_0x1bd6eb=Array[_0x18dcfb(0xcd)](_0x1d8a61);for(let _0x1d0456=0x0;_0x1d0456<_0x1bd6eb[_0x18dcfb(0xb4)];_0x1d0456+=0x1){const _0x4e4493=_0x1bd6eb[_0x1d0456];if(_0x4e4493!=='\x22'&&_0x4e4493!=='`')continue;_0x1d0456+=0x1;while(_0x1d0456<_0x1bd6eb[_0x18dcfb(0xb4)]){if(_0x1bd6eb[_0x1d0456]===_0x4e4493){if(_0x1bd6eb[_0x1d0456+0x1]===_0x4e4493){_0x1bd6eb[_0x1d0456]='\x20',_0x1bd6eb[_0x1d0456+0x1]='\x20',_0x1d0456+=0x2;continue;}break;}_0x1bd6eb[_0x1d0456]='\x20',_0x1d0456+=0x1;}}return _0x1bd6eb[_0x18dcfb(0xf8)]('');}function maskNestedQueries(_0x1c5662){const _0x4cc2f7=a261_0x4a76,_0x4f0200=Array[_0x4cc2f7(0xcd)](_0x1c5662);for(let _0x58e614=0x0;_0x58e614<_0x4f0200['length'];_0x58e614+=0x1){if(_0x4f0200[_0x58e614]!=='(')continue;const _0x14f2ac=_0x1c5662[_0x4cc2f7(0xce)](_0x58e614+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x4cc2f7(0xaa)](_0x14f2ac))continue;let _0x36d162=0x1,_0x1186b9=_0x58e614+0x1;for(;_0x1186b9<_0x4f0200[_0x4cc2f7(0xb4)]&&_0x36d162>0x0;_0x1186b9+=0x1){if(_0x4f0200[_0x1186b9]==='(')_0x36d162+=0x1;if(_0x4f0200[_0x1186b9]===')')_0x36d162-=0x1;}if(_0x36d162!==0x0)continue;for(let _0x2bc829=_0x58e614;_0x2bc829<_0x1186b9;_0x2bc829+=0x1){_0x4f0200[_0x2bc829]='\x20';}const _0x1a3f47=_0x4cc2f7(0xd4);for(let _0x104fc8=0x0;_0x104fc8<_0x1a3f47[_0x4cc2f7(0xb4)]&&_0x58e614+_0x104fc8<_0x1186b9;_0x104fc8+=0x1){_0x4f0200[_0x58e614+_0x104fc8]=_0x1a3f47[_0x104fc8];}_0x58e614=_0x1186b9-0x1;}return _0x4f0200[_0x4cc2f7(0xf8)]('');}function splitTopLevelAnd(_0x3ebbc5){const _0x1cc55c=a261_0x4a76,_0x186d5d=[];let _0x4a24fc=0x0,_0x215310=0x0;for(let _0x40388b=0x0;_0x40388b<_0x3ebbc5[_0x1cc55c(0xb4)];_0x40388b+=0x1){const _0x3066f5=_0x3ebbc5[_0x40388b];if(_0x3066f5==='(')_0x4a24fc+=0x1;if(_0x3066f5===')')_0x4a24fc=Math[_0x1cc55c(0xef)](0x0,_0x4a24fc-0x1);_0x4a24fc===0x0&&_0x3ebbc5[_0x1cc55c(0xce)](_0x40388b)[_0x1cc55c(0xea)](/^AND\b/i)&&(_0x40388b===0x0||/\s/['test'](_0x3ebbc5[_0x40388b-0x1]??''))&&(_0x186d5d['push'](_0x3ebbc5[_0x1cc55c(0xce)](_0x215310,_0x40388b)[_0x1cc55c(0xf5)]()),_0x40388b+=0x2,_0x215310=_0x40388b+0x1);}const _0x53e98b=_0x3ebbc5['slice'](_0x215310)[_0x1cc55c(0xf5)]();if(_0x53e98b)_0x186d5d[_0x1cc55c(0xc6)](_0x53e98b);return _0x186d5d;}function hasTopLevelKeyword(_0x2c59d4,_0x16df94){const _0x38b64e=a261_0x4a76;let _0x4e118f=0x0;for(let _0x360460=0x0;_0x360460<_0x2c59d4[_0x38b64e(0xb4)];_0x360460+=0x1){const _0x2a64dc=_0x2c59d4[_0x360460];if(_0x2a64dc==='(')_0x4e118f+=0x1;if(_0x2a64dc===')')_0x4e118f=Math[_0x38b64e(0xef)](0x0,_0x4e118f-0x1);if(_0x4e118f!==0x0)continue;const _0x41c918=_0x2c59d4[_0x38b64e(0xce)](_0x360460,_0x360460+_0x16df94[_0x38b64e(0xb4)]),_0x8cdc16=_0x2c59d4[_0x360460-0x1]??'\x20',_0x13299c=_0x2c59d4[_0x360460+_0x16df94['length']]??'\x20';if(_0x41c918[_0x38b64e(0xc3)]()===_0x16df94['toUpperCase']()&&!/[\w$]/['test'](_0x8cdc16)&&!/[\w$]/['test'](_0x13299c))return!![];}return![];}function splitEquality(_0x545756){const _0x43c2df=a261_0x4a76,_0x3b3845=stripOuterParentheses(_0x545756);let _0x525d81=0x0,_0x1249d6;for(let _0x3f1613=0x0;_0x3f1613<_0x3b3845[_0x43c2df(0xb4)];_0x3f1613+=0x1){const _0x4cb538=_0x3b3845[_0x3f1613];if(_0x4cb538==='(')_0x525d81+=0x1;if(_0x4cb538===')')_0x525d81=Math[_0x43c2df(0xef)](0x0,_0x525d81-0x1);const _0xa12fab=_0x3b3845[_0x3f1613-0x1]??'',_0x4197aa=_0x3b3845[_0x3f1613+0x1]??'';if(_0x4cb538==='='&&_0x525d81===0x0&&!/[!<>=:]/[_0x43c2df(0xaa)](_0xa12fab)&&_0x4197aa!=='='){if(_0x1249d6!==undefined)return null;_0x1249d6=_0x3f1613;}}return _0x1249d6===undefined?null:[_0x3b3845['slice'](0x0,_0x1249d6)[_0x43c2df(0xf5)](),_0x3b3845[_0x43c2df(0xce)](_0x1249d6+0x1)[_0x43c2df(0xf5)]()];}function parseDirectColumnReference(_0x4736f4,_0x4a04aa){const _0x3c87ee=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x4736f4));if(!_0x3c87ee)return null;if(normalizeIdentifier(_0x3c87ee[0x1]??'')!==normalizeIdentifier(_0x4a04aa))return null;return normalizeIdentifier(_0x3c87ee[0x2]??'');}function containsColumnReference(_0x2fb7ec,_0x4a5030){const _0x372b27=a261_0x4a76,_0x1566df=_0x2fb7ec['replace'](/[`"]/g,''),_0x451777=_0x4a5030[_0x372b27(0xc4)](/[.*+?^${}()|[\]\\]/g,_0x372b27(0xf9));return new RegExp(_0x372b27(0xec)+_0x451777+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x372b27(0xaa)](_0x1566df);}function findEqualityPrefix(_0x4bbbfd,_0x5eb55a){const _0x29e386=a261_0x4a76,_0x437d0c=new Set(_0x5eb55a[_0x29e386(0xe6)](normalizeIdentifier)),_0x985c78=[];for(const _0x1a8404 of _0x4bbbfd){if(!_0x437d0c[_0x29e386(0xe7)](normalizeIdentifier(_0x1a8404)))break;_0x985c78[_0x29e386(0xc6)](_0x1a8404);}return _0x985c78;}function resolveTableMetadata(_0x5b37c8,_0xd24e60){const _0x2eb125=a261_0x4a76,_0x2101ff=normalizeIdentifier(_0xd24e60),_0xa895e1=_0x5b37c8[_0x2eb125(0xab)](_0x353875=>normalizeIdentifier(_0x353875[_0x2eb125(0xf1)])===_0x2101ff);if(_0xa895e1['length']===0x1)return _0xa895e1[0x0];const _0x3478f0=_0x2101ff[_0x2eb125(0xd7)]('.'),_0x5d52cc=_0x2101ff[_0x2eb125(0xb7)]('.')['at'](-0x1),_0x4dfab9=_0x5b37c8['filter'](_0x245cf0=>{const _0x27250c=_0x2eb125,_0x2eecc9=normalizeIdentifier(_0x245cf0[_0x27250c(0xf1)]);if(_0x3478f0&&_0x2eecc9[_0x27250c(0xd7)]('.'))return![];return _0x2eecc9[_0x27250c(0xb7)]('.')['at'](-0x1)===_0x5d52cc;});return _0x4dfab9[_0x2eb125(0xb4)]===0x1?_0x4dfab9[0x0]:undefined;}function columnNamesMatch(_0xbf0d45,_0x21c107){return normalizeIdentifier(_0xbf0d45)===normalizeIdentifier(_0x21c107);}function normalizeIdentifier(_0x5b9076){const _0x36e2ba=a261_0x4a76;return _0x5b9076[_0x36e2ba(0xc4)](/[`"]/g,'')['trim']()['toLowerCase']();}function a261_0x4a76(_0x3bf921,_0x1495be){_0x3bf921=_0x3bf921-0xaa;const _0x15ff2a=a261_0x15ff();let _0x4a7606=_0x15ff2a[_0x3bf921];return _0x4a7606;}function a261_0x15ff(){const _0x1f5895=['sql','JOIN_PREDICATE_UNSUPPORTED','right','add','70iagiCY','min','sort','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','columns','position','indexes','643360tCtZdR','map','has','15170VFxxeO','195419MqnzCn','match','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','(?:^|[^\x5cw$])','matchedPrefix','JOIN_INDEX_MISSING','max','table','tableName','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','unsupportedPredicate','unknown','trim','13771476DDBOoX','containsUnresolvedInclude','join','\x5c$&','test','filter','where','natural','alias','startsWith','using','34607XetdUW','15564wgFiGw','1036emzHyK','length','replaceAll','warning','split','JOIN_INDEX_NOT_USABLE','matchAll','index','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','INDEX_METADATA_UNAVAILABLE','2299285cBrAne','covered','endsWith','1683HsMxmn','INNER','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','toUpperCase','replace','unavailable','push','inner','error','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','reduce','cross','search','from','slice','left','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','indexOf','some','full','__sq__','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','includes','66relMad'];a261_0x15ff=function(){return _0x1f5895;};return a261_0x15ff();}function isSqlClauseKeyword(_0x7d0035){const _0x105497=a261_0x4a76;return new Set(['on',_0x105497(0xb0),_0x105497(0xac),_0x105497(0xf8),_0x105497(0xc7),_0x105497(0xcf),_0x105497(0xdb),_0x105497(0xd3),_0x105497(0xcb),_0x105497(0xad)])[_0x105497(0xe7)](_0x7d0035);}function stripOuterParentheses(_0x5d4b1b){const _0x45339e=a261_0x4a76;let _0x29fc72=_0x5d4b1b[_0x45339e(0xf5)]();while(_0x29fc72[_0x45339e(0xaf)]('(')&&_0x29fc72[_0x45339e(0xbf)](')')){let _0x12814c=0x0,_0x3df359=!![];for(let _0x32eb7a=0x0;_0x32eb7a<_0x29fc72['length'];_0x32eb7a+=0x1){if(_0x29fc72[_0x32eb7a]==='(')_0x12814c+=0x1;if(_0x29fc72[_0x32eb7a]===')')_0x12814c-=0x1;if(_0x12814c===0x0&&_0x32eb7a<_0x29fc72[_0x45339e(0xb4)]-0x1){_0x3df359=![];break;}}if(!_0x3df359||_0x12814c!==0x0)break;_0x29fc72=_0x29fc72[_0x45339e(0xce)](0x1,-0x1)[_0x45339e(0xf5)]();}return _0x29fc72;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a262_0x4f8432=a262_0x5dbe;(function(_0x1c9896,_0x4c567d){const _0xecbea=a262_0x5dbe,_0x3e9f12=_0x1c9896();while(!![]){try{const _0x26617d=-parseInt(_0xecbea(0x168))/0x1*(-parseInt(_0xecbea(0x167))/0x2)+-parseInt(_0xecbea(0x163))/0x3*(parseInt(_0xecbea(0x162))/0x4)+parseInt(_0xecbea(0x16e))/0x5+parseInt(_0xecbea(0x16c))/0x6+parseInt(_0xecbea(0x164))/0x7+parseInt(_0xecbea(0x16a))/0x8+-parseInt(_0xecbea(0x169))/0x9;if(_0x26617d===_0x4c567d)break;else _0x3e9f12['push'](_0x3e9f12['shift']());}catch(_0x5c31ac){_0x3e9f12['push'](_0x3e9f12['shift']());}}}(a262_0x4ccf,0x626bd));function a262_0x5dbe(_0x578ef7,_0x5d533b){_0x578ef7=_0x578ef7-0x162;const _0x4ccfa4=a262_0x4ccf();let _0x5dbe2b=_0x4ccfa4[_0x578ef7];return _0x5dbe2b;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a262_0x4f8432(0x16d),LOCK_FILE_NAME=a262_0x4f8432(0x16b),TRASH_DIR_NAME=a262_0x4f8432(0x165);export function loadSqlProjectConfig(_0x5ca7cb,_0x175c2f){const _0x498377=a262_0x4f8432,_0x4d5f05=resolve(_0x175c2f??findProjectRootDirectory()),_0x490405=DOT_DIR+'/sql',_0xf758a8=_0x490405+'/'+_0x5ca7cb;return{'projectRoot':_0x4d5f05,'appCode':_0x5ca7cb,'sqlWorkspaceRoot':_0x490405,'sqlRoot':_0xf758a8,'sqlRootDir':resolve(_0x4d5f05,DOT_DIR,_0x498377(0x166),_0x5ca7cb),'lockFilePath':resolve(_0x4d5f05,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4d5f05,DOT_DIR,TRASH_DIR_NAME)};}function a262_0x4ccf(){const _0x30ce0e=['596bbrMhu','13992NJYJLO','3636913CqKtNB','sql-trash','sql','2IHxxLS','6826CenXvB','7826571IFoEoo','3488128TlCOej','sql.lock.json','3670440iapWJs','.rabetbase','1967735hMXqIh'];a262_0x4ccf=function(){return _0x30ce0e;};return a262_0x4ccf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x587b41,_0x1e5a19){const _0x22ae03=a263_0x396f,_0x4ebc43=_0x587b41();while(!![]){try{const _0x31c67c=parseInt(_0x22ae03(0x1ff))/0x1*(-parseInt(_0x22ae03(0x208))/0x2)+parseInt(_0x22ae03(0x206))/0x3+-parseInt(_0x22ae03(0x20f))/0x4*(parseInt(_0x22ae03(0x20e))/0x5)+parseInt(_0x22ae03(0x203))/0x6+parseInt(_0x22ae03(0x20d))/0x7+parseInt(_0x22ae03(0x205))/0x8*(-parseInt(_0x22ae03(0x1f6))/0x9)+-parseInt(_0x22ae03(0x1fe))/0xa*(-parseInt(_0x22ae03(0x1f4))/0xb);if(_0x31c67c===_0x1e5a19)break;else _0x4ebc43['push'](_0x4ebc43['shift']());}catch(_0x4b9ba3){_0x4ebc43['push'](_0x4ebc43['shift']());}}}(a263_0xa272,0x7596f));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x3812c3){const _0x1c22ba=a263_0x396f;if(_0x3812c3===_0x1c22ba(0x200))return _0x1c22ba(0x1f8);if(_0x3812c3==='.xml')return _0x1c22ba(0x209);return undefined;}async function scanSqlFilesRecursively(_0x516b7d,_0x1b9973){const _0x2e43f8=a263_0x396f,_0x1f63ab=[];try{const _0x54826a=await readdir(_0x516b7d,{'withFileTypes':!![]});for(const _0x3dbe73 of _0x54826a){const _0x5c8c1e=join(_0x516b7d,_0x3dbe73[_0x2e43f8(0x1fd)]);if(_0x3dbe73[_0x2e43f8(0x210)]()){_0x1f63ab[_0x2e43f8(0x20c)](...await scanSqlFilesRecursively(_0x5c8c1e,_0x1b9973));continue;}if(!_0x3dbe73[_0x2e43f8(0x1f5)]())continue;const _0x563734=extname(_0x3dbe73['name'])['toLowerCase'](),_0xa625fb=extensionToMode(_0x563734);if(!_0xa625fb)continue;const _0x556935=relative(_0x1b9973,_0x5c8c1e)[_0x2e43f8(0x211)](/\\/g,'/'),_0x42292f=_0x556935[_0x2e43f8(0x1fa)]('/')['filter'](Boolean),_0x2e6851=parseSqlPath(_0x42292f,_0x3dbe73[_0x2e43f8(0x1fd)],_0x563734);if(!_0x2e6851)continue;_0x1f63ab[_0x2e43f8(0x20c)]({'sqlCode':_0x2e6851['sqlCode'],'sqlName':_0x2e6851[_0x2e43f8(0x1fb)],'dbDirectory':_0x42292f[0x0],'filePath':_0x5c8c1e,'relativePath':_0x556935,'lockKey':_0x2e6851['sqlCode'],'mode':_0xa625fb});}}catch(_0x2b604c){if(_0x2b604c[_0x2e43f8(0x20a)]!==_0x2e43f8(0x204))throw _0x2b604c;}return _0x1f63ab;}function a263_0xa272(){const _0x4da302=['sql','length','split','sqlName','indexOf','name','1490PhqUSs','827143XBirHG','.sql','sqlRootDir','slice','5020596WXnlkf','ENOENT','9872XnamLV','1311717HLhgmK','mode','2RsuGQv','mybatisXml','code','dbId','push','5103287RpomZE','5Irhqds','3223568JlRHno','isDirectory','replace','path','dbName','24002yExTBF','isFile','1557jTXlIf','test'];a263_0xa272=function(){return _0x4da302;};return a263_0xa272();}export async function scanLocalSqlQueries(_0x3a6edb){const _0x38cc16=a263_0x396f;return scanSqlFilesRecursively(_0x3a6edb[_0x38cc16(0x201)],_0x3a6edb[_0x38cc16(0x201)]);}export function resolveLocalSqlFilePath(_0x4dc600,_0x1d4fcd,_0x321b58){const _0x4dd111=a263_0x396f,_0x2f08a2=_0x321b58?.[_0x4dd111(0x212)]||(_0x321b58?.[_0x4dd111(0x1fb)]||_0x321b58?.[_0x4dd111(0x1f3)]?buildSqlRelativePath(_0x1d4fcd,_0x321b58?.[_0x4dd111(0x1fb)],_0x321b58?.[_0x4dd111(0x1f3)],_0x321b58?.[_0x4dd111(0x207)]||'sql',_0x321b58?.[_0x4dd111(0x20b)]):buildDefaultSqlFileName(_0x1d4fcd,_0x321b58?.[_0x4dd111(0x207)]||_0x4dd111(0x1f8)));return join(_0x4dc600[_0x4dd111(0x201)],_0x2f08a2);}function a263_0x396f(_0x547c36,_0x456ec3){_0x547c36=_0x547c36-0x1f3;const _0xa272cb=a263_0xa272();let _0x396f13=_0xa272cb[_0x547c36];return _0x396f13;}export async function directoryExists(_0x5c8f5a){try{const _0x1479cc=await stat(_0x5c8f5a);return _0x1479cc['isDirectory']();}catch{return![];}}function parseSqlPath(_0x409628,_0x5ea826,_0x4bb5ee){const _0x19eee7=a263_0x396f,_0x4ad2f9=_0x5ea826['slice'](0x0,-_0x4bb5ee[_0x19eee7(0x1f9)]);if(_0x409628[_0x19eee7(0x1f9)]<0x2)return null;const _0x142ee2=_0x4ad2f9[_0x19eee7(0x1fc)]('_');if(_0x142ee2<=0x0||_0x142ee2>=_0x4ad2f9[_0x19eee7(0x1f9)]-0x1)return null;const _0x31835c=_0x4ad2f9['slice'](0x0,_0x142ee2);if(!isLikelySqlCode(_0x31835c))return null;return{'sqlCode':_0x31835c,'sqlName':_0x4ad2f9[_0x19eee7(0x202)](_0x142ee2+0x1)};}function isLikelySqlCode(_0x19a934){const _0x3b41f6=a263_0x396f;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x3b41f6(0x1f7)](_0x19a934);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f1bfa,_0x6adc53){const _0x5d4f2d=a264_0x1c12,_0x4ec86d=_0x2f1bfa();while(!![]){try{const _0x25fff4=-parseInt(_0x5d4f2d(0x141))/0x1+parseInt(_0x5d4f2d(0x14d))/0x2+-parseInt(_0x5d4f2d(0x143))/0x3*(-parseInt(_0x5d4f2d(0x14c))/0x4)+-parseInt(_0x5d4f2d(0x149))/0x5+-parseInt(_0x5d4f2d(0x14b))/0x6*(parseInt(_0x5d4f2d(0x144))/0x7)+parseInt(_0x5d4f2d(0x14e))/0x8+parseInt(_0x5d4f2d(0x14a))/0x9;if(_0x25fff4===_0x6adc53)break;else _0x4ec86d['push'](_0x4ec86d['shift']());}catch(_0x2dfddf){_0x4ec86d['push'](_0x4ec86d['shift']());}}}(a264_0x259b,0x225a2));function a264_0x1c12(_0x182359,_0x2859bc){_0x182359=_0x182359-0x141;const _0x259b65=a264_0x259b();let _0x1c12ac=_0x259b65[_0x182359];return _0x1c12ac;}import{readFile}from'node:fs/promises';function a264_0x259b(){const _0x47f6c7=['utf8','1194210udRcOi','2061864HPyRIN','180ScIDqn','88172MibfTD','440464LWtNZW','1781920UBBrgh','132315clmJAc','digest','15FZEZWk','63098aBtefK','createHash','md5','hex'];a264_0x259b=function(){return _0x47f6c7;};return a264_0x259b();}import a264_0x3ea12b from'node:crypto';export function computeSqlContentHash(_0x45a1b1){const _0x3422e3=a264_0x1c12;return a264_0x3ea12b[_0x3422e3(0x145)](_0x3422e3(0x146))['update'](_0x45a1b1)[_0x3422e3(0x142)](_0x3422e3(0x147));}export async function computeSqlFileHash(_0x1970ca){const _0x4265db=a264_0x1c12,_0xd97a6d=await readFile(_0x1970ca,_0x4265db(0x148));return computeSqlContentHash(_0xd97a6d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x185d4b,_0x44a69c){const _0x342af7=a265_0x10a1,_0xc01d2e=_0x185d4b();while(!![]){try{const _0x4e478d=parseInt(_0x342af7(0xe6))/0x1+parseInt(_0x342af7(0xdf))/0x2+-parseInt(_0x342af7(0xe7))/0x3+parseInt(_0x342af7(0xe8))/0x4+-parseInt(_0x342af7(0xe2))/0x5+parseInt(_0x342af7(0xef))/0x6+-parseInt(_0x342af7(0xee))/0x7;if(_0x4e478d===_0x44a69c)break;else _0xc01d2e['push'](_0xc01d2e['shift']());}catch(_0x4eee5e){_0xc01d2e['push'](_0xc01d2e['shift']());}}}(a265_0x5d56,0xaf5b8));import{mkdir,readFile,writeFile}from'node:fs/promises';function a265_0x5d56(){const _0x1c1fde=['5491339JtewIa','1291086jDXybJ','\x22.\x20','703758QyPJSo','sqlRoot','sqls','1539290UwOUsp','parse','apps','utf8','1398464WdSXpX','3883893GNdRBo','4558824HMVUUU','code',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','ENOENT','lastSync','\x22\x20vs\x20lock\x20\x22'];a265_0x5d56=function(){return _0x1c1fde;};return a265_0x5d56();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a265_0x10a1(_0xdd44d3,_0x46b6f8){_0xdd44d3=_0xdd44d3-0xdf;const _0x5d561e=a265_0x5d56();let _0x10a17d=_0x5d561e[_0xdd44d3];return _0x10a17d;}export function ensureSqlLockScope(_0x3a34a9,_0x91d420,_0x482d40,_0x34b5c3){const _0x2ae897=a265_0x10a1,_0x528288=_0x3a34a9??createEmptySqlLock();let _0x50c4da=_0x528288['apps'][_0x91d420];if(!_0x50c4da)return _0x50c4da={'sqlRoot':_0x482d40,'lastSync':'','sqls':{}},_0x528288[_0x2ae897(0xe4)][_0x91d420]=_0x50c4da,{'lockData':_0x528288,'appLock':_0x50c4da};if(!_0x50c4da[_0x2ae897(0xe0)])_0x50c4da[_0x2ae897(0xe0)]=_0x482d40;else{if(_0x50c4da['sqlRoot']!==_0x482d40)throw new Error(_0x34b5c3+_0x2ae897(0xea)+_0x482d40+_0x2ae897(0xed)+_0x50c4da[_0x2ae897(0xe0)]+_0x2ae897(0xf0)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x50c4da[_0x2ae897(0xe1)]&&(_0x50c4da[_0x2ae897(0xe1)]={}),!_0x50c4da[_0x2ae897(0xec)]&&(_0x50c4da[_0x2ae897(0xec)]=''),{'lockData':_0x528288,'appLock':_0x50c4da};}export async function readSqlLockFile(_0x2a2c3e){const _0x18339f=a265_0x10a1;try{const _0x4f1440=await readFile(_0x2a2c3e,_0x18339f(0xe5));return JSON[_0x18339f(0xe3)](_0x4f1440);}catch(_0x2b6b2b){if(_0x2b6b2b[_0x18339f(0xe9)]===_0x18339f(0xeb))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x2b6b2b));}}export async function writeSqlLockFile(_0x29c9d4,_0x452fd0){const _0x5b48f4=a265_0x10a1;await mkdir(dirname(_0x29c9d4),{'recursive':!![]}),await writeFile(_0x29c9d4,JSON['stringify'](_0x452fd0,null,0x2),_0x5b48f4(0xe5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a267_0x1384(_0x201bc9,_0x2bfe3a){_0x201bc9=_0x201bc9-0xdc;const _0x5cd634=a267_0x5cd6();let _0x13844e=_0x5cd634[_0x201bc9];return _0x13844e;}(function(_0x374ccd,_0x2bfde2){const _0x5ef7d0=a267_0x1384,_0x138fa1=_0x374ccd();while(!![]){try{const _0x1c1818=parseInt(_0x5ef7d0(0xe4))/0x1+-parseInt(_0x5ef7d0(0xe2))/0x2*(-parseInt(_0x5ef7d0(0xeb))/0x3)+-parseInt(_0x5ef7d0(0xe1))/0x4*(-parseInt(_0x5ef7d0(0xde))/0x5)+parseInt(_0x5ef7d0(0xe0))/0x6*(-parseInt(_0x5ef7d0(0xe3))/0x7)+parseInt(_0x5ef7d0(0xe9))/0x8+parseInt(_0x5ef7d0(0xee))/0x9*(parseInt(_0x5ef7d0(0xdd))/0xa)+-parseInt(_0x5ef7d0(0xed))/0xb;if(_0x1c1818===_0x2bfde2)break;else _0x138fa1['push'](_0x138fa1['shift']());}catch(_0x2f824c){_0x138fa1['push'](_0x138fa1['shift']());}}}(a267_0x5cd6,0xd7bd3));export function detectSqlMode(_0x324142){const _0x3d7b54=a267_0x1384,_0x447d99=_0x324142['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x3d7b54(0xec)](_0x447d99))return _0x3d7b54(0xea);return _0x3d7b54(0xe8);}export function getSqlFileExtension(_0x5457bc){const _0x286753=a267_0x1384;return _0x5457bc==='mybatisXml'?_0x286753(0xe6):_0x286753(0xe5);}export function buildDefaultSqlFileName(_0x3e5beb,_0x587b23){return''+_0x3e5beb+getSqlFileExtension(_0x587b23);}export function sanitizeSqlPathSegment(_0x17726f,_0x53e985){const _0x32e0d6=a267_0x1384,_0x47045f=String(_0x17726f??'')['trim'](),_0x3e0f84=_0x47045f[_0x32e0d6(0xdc)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')['replace'](/\s+/g,'-')[_0x32e0d6(0xdc)](/-+/g,'-')[_0x32e0d6(0xdc)](/^\.+/,'')[_0x32e0d6(0xdc)](/\.+$/,'')[_0x32e0d6(0xdc)](/^-+/,'')[_0x32e0d6(0xdc)](/-+$/,'');return _0x3e0f84||_0x53e985;}export function buildDbDirectoryName(_0x35efb9,_0x5447cc){const _0x856944=a267_0x1384;return sanitizeSqlPathSegment(_0x35efb9,_0x5447cc!=null?_0x856944(0xdf)+_0x5447cc:_0x856944(0xe7));}function a267_0x5cd6(){const _0x355c44=['db-','696oPuYeZ','4SAlDCy','64gVhUHA','14882vExxuF','1333327SNVGlA','.sql','.xml','unknown-db','sql','8664784mDTNZr','mybatisXml','36786SiHDii','test','48400088JAOkWO','15691887dVJdxI','unknown-sql','replace','10ssJmRC','4889695hNiQfX'];a267_0x5cd6=function(){return _0x355c44;};return a267_0x5cd6();}export function buildSqlRelativePath(_0x5eb7e1,_0x23e206,_0x17bb0d,_0x483202,_0x497399){const _0x5b330a=a267_0x1384,_0x2a423f=buildDbDirectoryName(_0x17bb0d,_0x497399),_0x233779=sanitizeSqlPathSegment(_0x5eb7e1,_0x5b330a(0xef)),_0x188c23=sanitizeSqlPathSegment(_0x23e206,_0x233779);return _0x2a423f+'/'+_0x233779+'_'+_0x188c23+getSqlFileExtension(_0x483202);}
|