@lovrabet/rabetbase-cli 2.3.11 → 2.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.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/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/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/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.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/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.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/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a205_0x521868=a205_0x4e98;(function(_0x1462fa,_0x4c6e0b){const _0x389c64=a205_0x4e98,_0x5950d3=_0x1462fa();while(!![]){try{const _0x2f5f8b=-parseInt(_0x389c64(0x76))/0x1*(parseInt(_0x389c64(0x74))/0x2)+-parseInt(_0x389c64(0x6b))/0x3+parseInt(_0x389c64(0x67))/0x4+-parseInt(_0x389c64(0x72))/0x5+-parseInt(_0x389c64(0x6a))/0x6*(-parseInt(_0x389c64(0x73))/0x7)+parseInt(_0x389c64(0x6e))/0x8+-parseInt(_0x389c64(0x69))/0x9*(parseInt(_0x389c64(0x68))/0xa);if(_0x2f5f8b===_0x4c6e0b)break;else _0x5950d3['push'](_0x5950d3['shift']());}catch(_0x25e504){_0x5950d3['push'](_0x5950d3['shift']());}}}(a205_0xc029,0xcf8f0));function a205_0xc029(){const _0x1e3d2b=['4965006xqcblb','3045633OLwHNd','F_OK','page.lock.json','11907888rMyJiq','.rabetbase','page','appPagesDir','1747315suKzia','7JFisTt','38DCKKAy','toUpperCase','76700HGXmXI','cwd','5466960EXMSMd','105930VaTWSE','9VfTqes'];a205_0xc029=function(){return _0x1e3d2b;};return a205_0xc029();}import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0xdbe0fe,_0xc3292=process[a205_0x521868(0x77)]()){const _0x4290ee=a205_0x521868,_0x1ec98f=resolve(_0xc3292),_0x1363fd=join(_0x1ec98f,_0x4290ee(0x6f),_0x4290ee(0x70));return{'projectRoot':_0x1ec98f,'pagesBaseDir':_0x1363fd,'appPagesDir':join(_0x1363fd,_0xdbe0fe),'lockFilePath':join(_0x1ec98f,_0x4290ee(0x6f),_0x4290ee(0x6d))};}export function buildPageFileName(_0x565c40,_0x56f4bc){const _0x4be709=a205_0x521868;return _0x565c40+'-'+String(_0x56f4bc)[_0x4be709(0x75)]()+'.json';}export function resolvePageFilePath(_0x32a624,_0x1c4a30,_0x2a53a8){const _0x167a4b=a205_0x521868;return join(_0x32a624[_0x167a4b(0x71)],buildPageFileName(_0x1c4a30,_0x2a53a8));}export async function ensureParentDirectory(_0x754baa){await mkdir(dirname(_0x754baa),{'recursive':!![]});}function a205_0x4e98(_0x3c7906,_0x4d985b){_0x3c7906=_0x3c7906-0x67;const _0xc02945=a205_0xc029();let _0x4e9842=_0xc02945[_0x3c7906];return _0x4e9842;}export async function fileExists(_0x34f63d){const _0x5a63eb=a205_0x521868;try{return await access(_0x34f63d,constants[_0x5a63eb(0x6c)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39156c,_0x3c610c){const _0x3a4956=a206_0x37ae,_0x556e1d=_0x39156c();while(!![]){try{const _0x4e9a6f=-parseInt(_0x3a4956(0xbb))/0x1+parseInt(_0x3a4956(0xc1))/0x2+parseInt(_0x3a4956(0xba))/0x3*(parseInt(_0x3a4956(0xb8))/0x4)+parseInt(_0x3a4956(0xc0))/0x5+-parseInt(_0x3a4956(0xbd))/0x6*(parseInt(_0x3a4956(0xb4))/0x7)+-parseInt(_0x3a4956(0xbf))/0x8*(parseInt(_0x3a4956(0xb6))/0x9)+parseInt(_0x3a4956(0xb7))/0xa;if(_0x4e9a6f===_0x3c610c)break;else _0x556e1d['push'](_0x556e1d['shift']());}catch(_0x10be76){_0x556e1d['push'](_0x556e1d['shift']());}}}(a206_0x4ab3,0x1a8bd));import a206_0x4f4869 from'node:crypto';function a206_0x37ae(_0x1de0ca,_0x5a534e){_0x1de0ca=_0x1de0ca-0xb3;const _0x4ab308=a206_0x4ab3();let _0x37aeb4=_0x4ab308[_0x1de0ca];return _0x37aeb4;}import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x424a6c){const _0x3dc702=a206_0x37ae;return JSON['stringify'](JSON[_0x3dc702(0xc2)](_0x424a6c),null,0x2)+'\x0a';}export function computePageContentHash(_0x5bf459){const _0x2b72f9=a206_0x37ae;return a206_0x4f4869[_0x2b72f9(0xbe)]('md5')[_0x2b72f9(0xb9)](_0x5bf459)[_0x2b72f9(0xb5)](_0x2b72f9(0xbc));}export function computeSerializedSchemaHash(_0xd0661){return computePageContentHash(serializePageSchemaForFile(_0xd0661));}export async function computePageFileHash(_0x5716a7){const _0x332138=a206_0x37ae,_0xad7222=await readFile(_0x5716a7,_0x332138(0xb3));return computePageContentHash(_0xad7222);}function a206_0x4ab3(){const _0x37ed63=['hex','36QgQpRb','createHash','8136xPJuTM','512000LbFWIP','259590DxuYuv','parse','utf8','135317HbNpri','digest','1629MHVPTL','3165930wWwoMy','32DWqMBB','update','18174iDuuZG','188456PCgqbn'];a206_0x4ab3=function(){return _0x37ed63;};return a206_0x4ab3();}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e4ed1,_0x267c66){const _0x317441=a207_0x32a4,_0x13ea69=_0x1e4ed1();while(!![]){try{const _0x43f965=parseInt(_0x317441(0x7d))/0x1+parseInt(_0x317441(0x85))/0x2+parseInt(_0x317441(0x80))/0x3*(-parseInt(_0x317441(0x81))/0x4)+parseInt(_0x317441(0x87))/0x5*(parseInt(_0x317441(0x84))/0x6)+parseInt(_0x317441(0x83))/0x7*(-parseInt(_0x317441(0x8a))/0x8)+-parseInt(_0x317441(0x82))/0x9+parseInt(_0x317441(0x89))/0xa;if(_0x43f965===_0x267c66)break;else _0x13ea69['push'](_0x13ea69['shift']());}catch(_0xf49936){_0x13ea69['push'](_0x13ea69['shift']());}}}(a207_0x4441,0x8950f));import{mkdir,readFile,writeFile}from'node:fs/promises';function a207_0x4441(){const _0x41e5ef=['object','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','117JxcwJC','86660Ytwgrb','3124017EnXnGS','1632407WQFSzK','72oaFTpC','2153888ejDjUz','apps','231250VYHCwN','parse','690480uuqnXQ','16VEjmGF','lastSync','pages','utf8','stringify','519905xIGiKU'];a207_0x4441=function(){return _0x41e5ef;};return a207_0x4441();}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x21025f,_0x56765b){const _0x3a6a05=a207_0x32a4,_0x5288ed={'apps':_0x21025f[_0x3a6a05(0x86)]&&typeof _0x21025f[_0x3a6a05(0x86)]===_0x3a6a05(0x7e)?_0x21025f['apps']:{}};let _0x5cf10c=_0x5288ed[_0x3a6a05(0x86)][_0x56765b];if(!_0x5cf10c)return _0x5cf10c={'lastSync':'','pages':{}},_0x5288ed[_0x3a6a05(0x86)][_0x56765b]=_0x5cf10c,{'lockData':_0x5288ed,'appLock':_0x5cf10c};return!_0x5cf10c[_0x3a6a05(0x8b)]&&(_0x5cf10c[_0x3a6a05(0x8b)]=''),(!_0x5cf10c[_0x3a6a05(0x8c)]||typeof _0x5cf10c[_0x3a6a05(0x8c)]!==_0x3a6a05(0x7e))&&(_0x5cf10c[_0x3a6a05(0x8c)]={}),{'lockData':_0x5288ed,'appLock':_0x5cf10c};}function a207_0x32a4(_0xbf1d35,_0x49a1db){_0xbf1d35=_0xbf1d35-0x7c;const _0x444102=a207_0x4441();let _0x32a4b3=_0x444102[_0xbf1d35];return _0x32a4b3;}export async function readPageLockFile(_0x2668a1){const _0x1ea9f0=a207_0x32a4;try{const _0x2c6c24=await readFile(_0x2668a1,_0x1ea9f0(0x8d)),_0x1f198d=JSON[_0x1ea9f0(0x88)](_0x2c6c24);return{'apps':_0x1f198d[_0x1ea9f0(0x86)]&&typeof _0x1f198d[_0x1ea9f0(0x86)]===_0x1ea9f0(0x7e)?_0x1f198d['apps']:{}};}catch(_0x252dde){if(_0x252dde['code']==='ENOENT')return null;throw new Error(_0x1ea9f0(0x7f)+String(_0x252dde));}}export async function writePageLockFile(_0x26746d,_0x26608a){const _0x3fbb2b=a207_0x32a4;await mkdir(dirname(_0x26746d),{'recursive':!![]}),await writeFile(_0x26746d,JSON[_0x3fbb2b(0x7c)](_0x26608a,null,0x2),_0x3fbb2b(0x8d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3af8b8,_0x1b736e){const _0x426545=a209_0x3f31,_0x578cbf=_0x3af8b8();while(!![]){try{const _0x1ea903=parseInt(_0x426545(0x1c6))/0x1*(-parseInt(_0x426545(0x1ef))/0x2)+parseInt(_0x426545(0x1bf))/0x3+parseInt(_0x426545(0x1c2))/0x4+-parseInt(_0x426545(0x1e7))/0x5*(-parseInt(_0x426545(0x1b4))/0x6)+parseInt(_0x426545(0x1d1))/0x7*(parseInt(_0x426545(0x1e1))/0x8)+-parseInt(_0x426545(0x1c0))/0x9+parseInt(_0x426545(0x1f7))/0xa;if(_0x1ea903===_0x1b736e)break;else _0x578cbf['push'](_0x578cbf['shift']());}catch(_0xb88470){_0x578cbf['push'](_0x578cbf['shift']());}}}(a209_0x5d3f,0xe05a7));function a209_0x5d3f(){const _0x3c512e=['test','toUpperCase','1RBxDYH','endsWith','right','max','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','add','metadataAvailable','filter','using','from','left','14oeTFgc','toLowerCase','position','indexes','cross','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','JOIN_PREDICATE_UNSUPPORTED','search','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','table','matchedPrefix','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','join','natural','has','reduce','6312536JQNvxC','slice','\x5c$&','covered','startsWith','full','4778225EaMixS','columns','alias','unknown','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','replace','JOIN_INDEX_NOT_USABLE','unavailable','1561946dsvMJl','unsupportedPredicate','push','length','where','INDEX_METADATA_UNAVAILABLE','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','index','2305790HAuGbJ','INNER','(?:^|[^\x5cw$])','warning','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','map','min','exec','6jeZwFp','trim','JOIN_INDEX_MISSING','inner','tableName','\x5cs*\x5c.\x5cs*[\x5cw$]+','sort','__sq__','split','matchAll','some','456909kjIxls','12461787tVDPRn','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','671624FaZaJk','includes'];a209_0x5d3f=function(){return _0x3c512e;};return a209_0x5d3f();}export function auditSqlJoinIndexes(_0x42315d,_0x55a0d2){const _0x4542ee=a209_0x3f31,_0x3046a9=[],_0x2277d6=extractJoinFacts(_0x42315d)[_0x4542ee(0x1fc)](_0x4a8711=>{const _0xfafe2c=_0x4542ee;if(_0x4a8711[_0xfafe2c(0x1f0)]||_0x4a8711[_0xfafe2c(0x1e8)][_0xfafe2c(0x1f2)]===0x0)return _0x3046a9['push']({'code':_0xfafe2c(0x1d7),'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711[_0xfafe2c(0x1e8)],'reason':_0x4a8711['unsupportedReason']??_0xfafe2c(0x1eb)}),{'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711['columns'],'status':_0xfafe2c(0x1ee)};const _0x5b8cb7=resolveTableMetadata(_0x55a0d2,_0x4a8711[_0xfafe2c(0x1da)]),_0xf4e23f=(_0x5b8cb7?.[_0xfafe2c(0x1d4)]??[])[_0xfafe2c(0x1fc)](_0x288486=>({'index':_0x288486,'matchedPrefix':findEqualityPrefix(_0x288486['columns'],_0x4a8711[_0xfafe2c(0x1e8)])}))['filter'](_0x2a4d0a=>_0x2a4d0a[_0xfafe2c(0x1db)][_0xfafe2c(0x1f2)]>0x0),_0x3e2512=_0xf4e23f[_0xfafe2c(0x1e0)]((_0x7d129c,_0x18673f)=>!_0x7d129c||_0x18673f[_0xfafe2c(0x1db)]['length']>_0x7d129c[_0xfafe2c(0x1db)][_0xfafe2c(0x1f2)]?_0x18673f:_0x7d129c,_0xf4e23f[0x0]);if(_0x3e2512)return{'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711['columns'],'status':_0xfafe2c(0x1e4),'matchedIndex':{..._0x3e2512[_0xfafe2c(0x1f6)],'matchedPrefix':_0x3e2512[_0xfafe2c(0x1db)]}};const _0x517b88=_0x5b8cb7?.[_0xfafe2c(0x1d4)][_0xfafe2c(0x1cd)](_0x43bf25=>_0x43bf25['columns'][_0xfafe2c(0x1be)](_0x12c1a1=>_0x4a8711[_0xfafe2c(0x1e8)][_0xfafe2c(0x1be)](_0xb0947e=>columnNamesMatch(_0x12c1a1,_0xb0947e))))??[];if(_0x517b88[_0xfafe2c(0x1f2)]>0x0)return _0x3046a9[_0xfafe2c(0x1f1)]({'code':_0xfafe2c(0x1ed),'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711['columns'],'reason':_0xfafe2c(0x1fb)}),{'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711['alias'],'columns':_0x4a8711[_0xfafe2c(0x1e8)],'status':_0xfafe2c(0x1fa),'candidateIndexes':_0x517b88};if(_0x5b8cb7&&_0x5b8cb7[_0xfafe2c(0x1cc)]!==![]&&_0x5b8cb7['indexes'][_0xfafe2c(0x1f2)]>0x0&&_0x4a8711[_0xfafe2c(0x1e8)][_0xfafe2c(0x1f2)]>0x0)return _0x3046a9[_0xfafe2c(0x1f1)]({'code':_0xfafe2c(0x1b6),'table':_0x4a8711['table'],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711[_0xfafe2c(0x1e8)],'reason':_0xfafe2c(0x1dc)}),{'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711[_0xfafe2c(0x1e8)],'status':_0xfafe2c(0x1fa)};return _0x3046a9[_0xfafe2c(0x1f1)]({'code':_0xfafe2c(0x1f4),'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711[_0xfafe2c(0x1e8)],'reason':_0x5b8cb7?_0xfafe2c(0x1f5):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x4a8711[_0xfafe2c(0x1da)],'alias':_0x4a8711[_0xfafe2c(0x1e9)],'columns':_0x4a8711['columns'],'status':_0xfafe2c(0x1ee)};});return{'checked':_0x2277d6[_0x4542ee(0x1f2)]>0x0,'joins':_0x2277d6,'warnings':_0x3046a9};}function extractJoinFacts(_0x1c67be){const _0x3ea2af=a209_0x3f31,_0x23271a=maskNestedQueries(stripSqlNoise(_0x1c67be)),_0x9826b1=maskQuotedIdentifiers(_0x23271a),_0xa431d9=[],_0x3277ce=new Set(),_0x1553c2=/\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 _0x427285 of _0x23271a[_0x3ea2af(0x1bd)](_0x1553c2)){const _0x4a617d=_0x427285['index']??0x0,_0x3045e5=_0x427285[0x0][_0x3ea2af(0x1d8)](/\bJOIN\b/i),_0xc4de4c=_0x4a617d+Math[_0x3ea2af(0x1c9)](0x0,_0x3045e5);if(!/^JOIN\b/i['test'](_0x9826b1['slice'](_0xc4de4c)))continue;_0x3277ce[_0x3ea2af(0x1cb)](_0xc4de4c);const _0x10ddc6=normalizeIdentifier(_0x427285[0x1]||_0x3ea2af(0x1f8)),_0x510f74=normalizeIdentifier(_0x427285[0x2]??''),_0x181fa9=normalizeIdentifier(_0x427285[0x3]||_0x510f74[_0x3ea2af(0x1bc)]('.')['at'](-0x1)||_0x510f74),_0x475736=[],_0x47e088=_0x510f74===_0x3ea2af(0x1bb);let _0x37a134=_0x10ddc6===_0x3ea2af(0x1c8)||_0x10ddc6===_0x3ea2af(0x1e6)||_0x47e088,_0x223126=_0x37a134?_0x47e088?_0x3ea2af(0x1d9):_0x10ddc6[_0x3ea2af(0x1c5)]()+_0x3ea2af(0x1d6):undefined;const _0x76a33b=stripOuterParentheses(_0x427285[0x4]??'');hasTopLevelKeyword(_0x76a33b,'OR')&&(_0x37a134=!![],_0x223126??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x25f95c of splitTopLevelAnd(_0x76a33b)){const _0x4559dd=stripOuterParentheses(_0x25f95c);if(hasTopLevelKeyword(_0x4559dd,'OR')){_0x37a134=!![],_0x223126??=_0x3ea2af(0x1c1);continue;}const _0x3fffb9=splitEquality(_0x4559dd);if(!_0x3fffb9){containsColumnReference(_0x25f95c,_0x181fa9)&&(_0x37a134=!![]);continue;}const _0x51ebcd=parseDirectColumnReference(_0x3fffb9[0x0],_0x181fa9),_0x1ab289=parseDirectColumnReference(_0x3fffb9[0x1],_0x181fa9),_0x536856=containsColumnReference(_0x3fffb9[0x0],_0x181fa9),_0x4375e4=containsColumnReference(_0x3fffb9[0x1],_0x181fa9),_0x1d3d5e=_0x51ebcd&&!_0x4375e4?_0x51ebcd:_0x1ab289&&!_0x536856?_0x1ab289:null;if(_0x1d3d5e&&!_0x475736[_0x3ea2af(0x1c3)](_0x1d3d5e))_0x475736['push'](_0x1d3d5e);else!_0x1d3d5e&&containsColumnReference(_0x25f95c,_0x181fa9)&&(_0x37a134=!![]);}_0xa431d9[_0x3ea2af(0x1f1)]({'table':_0x510f74,'alias':_0x181fa9,'columns':_0x475736,'unsupportedPredicate':_0x37a134,'unsupportedReason':_0x223126,'position':_0xc4de4c});}for(const _0x476e21 of _0x9826b1[_0x3ea2af(0x1bd)](/\bJOIN\b/gi)){const _0xf7418e=_0x476e21[_0x3ea2af(0x1f6)]??0x0;if(_0x3277ce[_0x3ea2af(0x1df)](_0xf7418e))continue;const _0x2340b9=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x3ea2af(0x1fe)](_0x23271a['slice'](_0xf7418e+_0x476e21[0x0][_0x3ea2af(0x1f2)])),_0x2e4863=normalizeIdentifier(_0x2340b9?.[0x1]||_0x3ea2af(0x1ea)),_0xa2e0b=normalizeIdentifier(_0x2340b9?.[0x2]||''),_0xf5716c=isSqlClauseKeyword(_0xa2e0b)?_0x2e4863[_0x3ea2af(0x1bc)]('.')['at'](-0x1)||_0x2e4863:_0xa2e0b||_0x2e4863[_0x3ea2af(0x1bc)]('.')['at'](-0x1)||_0x2e4863;_0xa431d9[_0x3ea2af(0x1f1)]({'table':_0x2e4863,'alias':_0xf5716c,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x3ea2af(0x1ca),'position':_0xf7418e});}return _0xa431d9[_0x3ea2af(0x1ba)]((_0x585d3c,_0x5ab224)=>_0x585d3c[_0x3ea2af(0x1d3)]-_0x5ab224[_0x3ea2af(0x1d3)]);}function stripSqlNoise(_0x40d8f1){const _0x3577a8=a209_0x3f31,_0x147cd7=Array[_0x3577a8(0x1cf)](_0x40d8f1),_0x28eb4f=(_0x101c83,_0x8ef119)=>{for(let _0x5cd8fb=_0x101c83;_0x5cd8fb<_0x8ef119;_0x5cd8fb+=0x1){_0x147cd7[_0x5cd8fb]!=='\x0a'&&_0x147cd7[_0x5cd8fb]!=='\x0d'&&(_0x147cd7[_0x5cd8fb]='\x20');}};for(let _0x4bb0a7=0x0;_0x4bb0a7<_0x147cd7[_0x3577a8(0x1f2)];_0x4bb0a7+=0x1){const _0x245fbd=_0x147cd7[_0x4bb0a7],_0x33d9c5=_0x147cd7[_0x4bb0a7+0x1];if(_0x245fbd==='\x27'||_0x245fbd==='\x22'||_0x245fbd==='`'){const _0x1cfccd=_0x245fbd,_0x239909=_0x4bb0a7;_0x4bb0a7+=0x1;while(_0x4bb0a7<_0x147cd7[_0x3577a8(0x1f2)]){if(_0x147cd7[_0x4bb0a7]==='\x5c'&&_0x4bb0a7+0x1<_0x147cd7[_0x3577a8(0x1f2)]){_0x4bb0a7+=0x2;continue;}if(_0x147cd7[_0x4bb0a7]!==_0x1cfccd){_0x4bb0a7+=0x1;continue;}if(_0x147cd7[_0x4bb0a7+0x1]===_0x1cfccd){_0x4bb0a7+=0x2;continue;}break;}if(_0x1cfccd==='\x27')_0x28eb4f(_0x239909,Math[_0x3577a8(0x1fd)](_0x4bb0a7+0x1,_0x147cd7['length']));continue;}if(_0x245fbd==='-'&&_0x33d9c5==='-'){const _0x487e13=_0x4bb0a7;while(_0x4bb0a7<_0x147cd7[_0x3577a8(0x1f2)]&&_0x147cd7[_0x4bb0a7]!=='\x0a')_0x4bb0a7+=0x1;_0x28eb4f(_0x487e13,_0x4bb0a7);continue;}if(_0x245fbd==='/'&&_0x33d9c5==='*'){const _0x43e0e0=_0x4bb0a7;_0x4bb0a7+=0x2;while(_0x4bb0a7<_0x147cd7['length']&&!(_0x147cd7[_0x4bb0a7]==='*'&&_0x147cd7[_0x4bb0a7+0x1]==='/')){_0x4bb0a7+=0x1;}_0x4bb0a7=Math[_0x3577a8(0x1fd)](_0x4bb0a7+0x1,_0x147cd7[_0x3577a8(0x1f2)]-0x1),_0x28eb4f(_0x43e0e0,_0x4bb0a7+0x1);continue;}if(_0x245fbd==='#'&&_0x33d9c5!=='{'){const _0x3e726e=_0x4bb0a7;while(_0x4bb0a7<_0x147cd7[_0x3577a8(0x1f2)]&&_0x147cd7[_0x4bb0a7]!=='\x0a')_0x4bb0a7+=0x1;_0x28eb4f(_0x3e726e,_0x4bb0a7);continue;}if((_0x245fbd==='#'||_0x245fbd==='$')&&_0x33d9c5==='{'){const _0x21dce9=_0x4bb0a7;_0x4bb0a7+=0x2;while(_0x4bb0a7<_0x147cd7[_0x3577a8(0x1f2)]&&_0x147cd7[_0x4bb0a7]!=='}')_0x4bb0a7+=0x1;_0x28eb4f(_0x21dce9,Math[_0x3577a8(0x1fd)](_0x4bb0a7+0x1,_0x147cd7['length']));}}return _0x147cd7[_0x3577a8(0x1dd)]('');}function maskQuotedIdentifiers(_0x3c1ed3){const _0x237dec=a209_0x3f31,_0x297161=Array['from'](_0x3c1ed3);for(let _0x8f9f4d=0x0;_0x8f9f4d<_0x297161[_0x237dec(0x1f2)];_0x8f9f4d+=0x1){const _0x4fbca8=_0x297161[_0x8f9f4d];if(_0x4fbca8!=='\x22'&&_0x4fbca8!=='`')continue;_0x8f9f4d+=0x1;while(_0x8f9f4d<_0x297161['length']){if(_0x297161[_0x8f9f4d]===_0x4fbca8){if(_0x297161[_0x8f9f4d+0x1]===_0x4fbca8){_0x297161[_0x8f9f4d]='\x20',_0x297161[_0x8f9f4d+0x1]='\x20',_0x8f9f4d+=0x2;continue;}break;}_0x297161[_0x8f9f4d]='\x20',_0x8f9f4d+=0x1;}}return _0x297161[_0x237dec(0x1dd)]('');}function maskNestedQueries(_0x34bc9e){const _0xd2cf9=a209_0x3f31,_0x46e297=Array[_0xd2cf9(0x1cf)](_0x34bc9e);for(let _0x1cb26f=0x0;_0x1cb26f<_0x46e297[_0xd2cf9(0x1f2)];_0x1cb26f+=0x1){if(_0x46e297[_0x1cb26f]!=='(')continue;const _0x34e12d=_0x34bc9e[_0xd2cf9(0x1e2)](_0x1cb26f+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0xd2cf9(0x1c4)](_0x34e12d))continue;let _0x550666=0x1,_0x399ed4=_0x1cb26f+0x1;for(;_0x399ed4<_0x46e297['length']&&_0x550666>0x0;_0x399ed4+=0x1){if(_0x46e297[_0x399ed4]==='(')_0x550666+=0x1;if(_0x46e297[_0x399ed4]===')')_0x550666-=0x1;}if(_0x550666!==0x0)continue;for(let _0x337d6f=_0x1cb26f;_0x337d6f<_0x399ed4;_0x337d6f+=0x1){_0x46e297[_0x337d6f]='\x20';}const _0x4e8cc9=_0xd2cf9(0x1bb);for(let _0x5ad6ee=0x0;_0x5ad6ee<_0x4e8cc9[_0xd2cf9(0x1f2)]&&_0x1cb26f+_0x5ad6ee<_0x399ed4;_0x5ad6ee+=0x1){_0x46e297[_0x1cb26f+_0x5ad6ee]=_0x4e8cc9[_0x5ad6ee];}_0x1cb26f=_0x399ed4-0x1;}return _0x46e297[_0xd2cf9(0x1dd)]('');}function splitTopLevelAnd(_0x1f8d85){const _0x2b28a6=a209_0x3f31,_0x11a193=[];let _0xf08a7b=0x0,_0x106bbc=0x0;for(let _0x2748d0=0x0;_0x2748d0<_0x1f8d85['length'];_0x2748d0+=0x1){const _0x322dd9=_0x1f8d85[_0x2748d0];if(_0x322dd9==='(')_0xf08a7b+=0x1;if(_0x322dd9===')')_0xf08a7b=Math[_0x2b28a6(0x1c9)](0x0,_0xf08a7b-0x1);_0xf08a7b===0x0&&_0x1f8d85[_0x2b28a6(0x1e2)](_0x2748d0)['match'](/^AND\b/i)&&(_0x2748d0===0x0||/\s/[_0x2b28a6(0x1c4)](_0x1f8d85[_0x2748d0-0x1]??''))&&(_0x11a193[_0x2b28a6(0x1f1)](_0x1f8d85[_0x2b28a6(0x1e2)](_0x106bbc,_0x2748d0)[_0x2b28a6(0x1b5)]()),_0x2748d0+=0x2,_0x106bbc=_0x2748d0+0x1);}const _0x246127=_0x1f8d85['slice'](_0x106bbc)[_0x2b28a6(0x1b5)]();if(_0x246127)_0x11a193['push'](_0x246127);return _0x11a193;}function hasTopLevelKeyword(_0x50c547,_0x551ab5){const _0x456695=a209_0x3f31;let _0x4fab63=0x0;for(let _0xd636d1=0x0;_0xd636d1<_0x50c547[_0x456695(0x1f2)];_0xd636d1+=0x1){const _0x1a096f=_0x50c547[_0xd636d1];if(_0x1a096f==='(')_0x4fab63+=0x1;if(_0x1a096f===')')_0x4fab63=Math[_0x456695(0x1c9)](0x0,_0x4fab63-0x1);if(_0x4fab63!==0x0)continue;const _0x36a8f7=_0x50c547['slice'](_0xd636d1,_0xd636d1+_0x551ab5[_0x456695(0x1f2)]),_0x30b3f3=_0x50c547[_0xd636d1-0x1]??'\x20',_0x3fc555=_0x50c547[_0xd636d1+_0x551ab5[_0x456695(0x1f2)]]??'\x20';if(_0x36a8f7['toUpperCase']()===_0x551ab5[_0x456695(0x1c5)]()&&!/[\w$]/[_0x456695(0x1c4)](_0x30b3f3)&&!/[\w$]/[_0x456695(0x1c4)](_0x3fc555))return!![];}return![];}function splitEquality(_0x39b966){const _0x33bbbf=a209_0x3f31,_0x4cbbc3=stripOuterParentheses(_0x39b966);let _0x216424=0x0,_0x235769;for(let _0xd9c1ab=0x0;_0xd9c1ab<_0x4cbbc3[_0x33bbbf(0x1f2)];_0xd9c1ab+=0x1){const _0x3cacec=_0x4cbbc3[_0xd9c1ab];if(_0x3cacec==='(')_0x216424+=0x1;if(_0x3cacec===')')_0x216424=Math[_0x33bbbf(0x1c9)](0x0,_0x216424-0x1);const _0x3b7862=_0x4cbbc3[_0xd9c1ab-0x1]??'',_0x2ca070=_0x4cbbc3[_0xd9c1ab+0x1]??'';if(_0x3cacec==='='&&_0x216424===0x0&&!/[!<>=:]/['test'](_0x3b7862)&&_0x2ca070!=='='){if(_0x235769!==undefined)return null;_0x235769=_0xd9c1ab;}}return _0x235769===undefined?null:[_0x4cbbc3[_0x33bbbf(0x1e2)](0x0,_0x235769)[_0x33bbbf(0x1b5)](),_0x4cbbc3[_0x33bbbf(0x1e2)](_0x235769+0x1)[_0x33bbbf(0x1b5)]()];}function parseDirectColumnReference(_0x19eca7,_0x47c339){const _0x3e2938=a209_0x3f31,_0xa75610=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x3e2938(0x1fe)](stripOuterParentheses(_0x19eca7));if(!_0xa75610)return null;if(normalizeIdentifier(_0xa75610[0x1]??'')!==normalizeIdentifier(_0x47c339))return null;return normalizeIdentifier(_0xa75610[0x2]??'');}function containsColumnReference(_0x1b6f43,_0x10f86c){const _0x59bd85=a209_0x3f31,_0x11a8f9=_0x1b6f43[_0x59bd85(0x1ec)](/[`"]/g,''),_0x3329b8=_0x10f86c[_0x59bd85(0x1ec)](/[.*+?^${}()|[\]\\]/g,_0x59bd85(0x1e3));return new RegExp(_0x59bd85(0x1f9)+_0x3329b8+_0x59bd85(0x1b9),'i')[_0x59bd85(0x1c4)](_0x11a8f9);}function findEqualityPrefix(_0x1e92c2,_0x57ff84){const _0x2ce1af=a209_0x3f31,_0x4b3f4f=new Set(_0x57ff84[_0x2ce1af(0x1fc)](normalizeIdentifier)),_0x4e3fbc=[];for(const _0xfea833 of _0x1e92c2){if(!_0x4b3f4f['has'](normalizeIdentifier(_0xfea833)))break;_0x4e3fbc[_0x2ce1af(0x1f1)](_0xfea833);}return _0x4e3fbc;}function resolveTableMetadata(_0x587808,_0x22aa47){const _0x1b74b5=a209_0x3f31,_0x2905a1=normalizeIdentifier(_0x22aa47),_0x266ca4=_0x587808[_0x1b74b5(0x1cd)](_0x531d5c=>normalizeIdentifier(_0x531d5c[_0x1b74b5(0x1b8)])===_0x2905a1);if(_0x266ca4[_0x1b74b5(0x1f2)]===0x1)return _0x266ca4[0x0];const _0x5ea1bb=_0x2905a1[_0x1b74b5(0x1c3)]('.'),_0x3e75c8=_0x2905a1['split']('.')['at'](-0x1),_0x50264e=_0x587808[_0x1b74b5(0x1cd)](_0x51859a=>{const _0x42307b=_0x1b74b5,_0x5b02e4=normalizeIdentifier(_0x51859a[_0x42307b(0x1b8)]);if(_0x5ea1bb&&_0x5b02e4[_0x42307b(0x1c3)]('.'))return![];return _0x5b02e4[_0x42307b(0x1bc)]('.')['at'](-0x1)===_0x3e75c8;});return _0x50264e['length']===0x1?_0x50264e[0x0]:undefined;}function a209_0x3f31(_0x361bdb,_0x33d723){_0x361bdb=_0x361bdb-0x1b4;const _0x5d3f0b=a209_0x5d3f();let _0x3f3106=_0x5d3f0b[_0x361bdb];return _0x3f3106;}function columnNamesMatch(_0xa98648,_0x2e84e1){return normalizeIdentifier(_0xa98648)===normalizeIdentifier(_0x2e84e1);}function normalizeIdentifier(_0x1ec309){const _0x1515f9=a209_0x3f31;return _0x1ec309[_0x1515f9(0x1ec)](/[`"]/g,'')[_0x1515f9(0x1b5)]()[_0x1515f9(0x1d2)]();}function isSqlClauseKeyword(_0x5af640){const _0x45dc6a=a209_0x3f31;return new Set(['on',_0x45dc6a(0x1ce),_0x45dc6a(0x1f3),_0x45dc6a(0x1dd),_0x45dc6a(0x1b7),_0x45dc6a(0x1d0),_0x45dc6a(0x1c8),_0x45dc6a(0x1e6),_0x45dc6a(0x1d5),_0x45dc6a(0x1de)])[_0x45dc6a(0x1df)](_0x5af640);}function stripOuterParentheses(_0x3483bd){const _0x70d76b=a209_0x3f31;let _0x125939=_0x3483bd[_0x70d76b(0x1b5)]();while(_0x125939[_0x70d76b(0x1e5)]('(')&&_0x125939[_0x70d76b(0x1c7)](')')){let _0x24e414=0x0,_0x2a7ef0=!![];for(let _0xa833ec=0x0;_0xa833ec<_0x125939['length'];_0xa833ec+=0x1){if(_0x125939[_0xa833ec]==='(')_0x24e414+=0x1;if(_0x125939[_0xa833ec]===')')_0x24e414-=0x1;if(_0x24e414===0x0&&_0xa833ec<_0x125939['length']-0x1){_0x2a7ef0=![];break;}}if(!_0x2a7ef0||_0x24e414!==0x0)break;_0x125939=_0x125939[_0x70d76b(0x1e2)](0x1,-0x1)[_0x70d76b(0x1b5)]();}return _0x125939;}
|
|
1
|
+
(function(_0xde0f1a,_0x4df5d7){const _0x40987b=a209_0x1db5,_0x2f7e99=_0xde0f1a();while(!![]){try{const _0x45dee1=parseInt(_0x40987b(0x176))/0x1*(-parseInt(_0x40987b(0x14a))/0x2)+parseInt(_0x40987b(0x15c))/0x3*(parseInt(_0x40987b(0x14c))/0x4)+-parseInt(_0x40987b(0x146))/0x5+-parseInt(_0x40987b(0x168))/0x6+parseInt(_0x40987b(0x188))/0x7+parseInt(_0x40987b(0x159))/0x8*(parseInt(_0x40987b(0x177))/0x9)+-parseInt(_0x40987b(0x185))/0xa*(parseInt(_0x40987b(0x165))/0xb);if(_0x45dee1===_0x4df5d7)break;else _0x2f7e99['push'](_0x2f7e99['shift']());}catch(_0x4a636b){_0x2f7e99['push'](_0x2f7e99['shift']());}}}(a209_0xd5fd,0x48f50));export function auditSqlJoinIndexes(_0x1e9a28,_0x4767c5){const _0x4bd20e=a209_0x1db5,_0x3f1fcb=[],_0x53c3a0=extractJoinFacts(_0x1e9a28)['map'](_0x537796=>{const _0x23b3e5=a209_0x1db5;if(_0x537796[_0x23b3e5(0x162)]||_0x537796['columns'][_0x23b3e5(0x179)]===0x0)return _0x3f1fcb[_0x23b3e5(0x145)]({'code':_0x23b3e5(0x151),'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'reason':_0x537796[_0x23b3e5(0x184)]??'Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.'}),{'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'status':'unavailable'};const _0x17c3cf=resolveTableMetadata(_0x4767c5,_0x537796[_0x23b3e5(0x172)]),_0x267c07=(_0x17c3cf?.[_0x23b3e5(0x157)]??[])[_0x23b3e5(0x17c)](_0x1adbde=>({'index':_0x1adbde,'matchedPrefix':findEqualityPrefix(_0x1adbde[_0x23b3e5(0x144)],_0x537796[_0x23b3e5(0x144)])}))[_0x23b3e5(0x183)](_0x219711=>_0x219711[_0x23b3e5(0x186)][_0x23b3e5(0x179)]>0x0),_0x27fb44=_0x267c07[_0x23b3e5(0x147)]((_0x1144d4,_0x4baaba)=>!_0x1144d4||_0x4baaba[_0x23b3e5(0x186)]['length']>_0x1144d4[_0x23b3e5(0x186)][_0x23b3e5(0x179)]?_0x4baaba:_0x1144d4,_0x267c07[0x0]);if(_0x27fb44)return{'table':_0x537796['table'],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'status':'covered','matchedIndex':{..._0x27fb44['index'],'matchedPrefix':_0x27fb44[_0x23b3e5(0x186)]}};const _0x87ac3c=_0x17c3cf?.[_0x23b3e5(0x157)]['filter'](_0xe77cb8=>_0xe77cb8[_0x23b3e5(0x144)][_0x23b3e5(0x17d)](_0x34472d=>_0x537796['columns'][_0x23b3e5(0x17d)](_0x1a2f8d=>columnNamesMatch(_0x34472d,_0x1a2f8d))))??[];if(_0x87ac3c['length']>0x0)return _0x3f1fcb[_0x23b3e5(0x145)]({'code':_0x23b3e5(0x14b),'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x537796['table'],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'status':'warning','candidateIndexes':_0x87ac3c};if(_0x17c3cf&&_0x17c3cf[_0x23b3e5(0x16a)]!==![]&&_0x17c3cf[_0x23b3e5(0x157)][_0x23b3e5(0x179)]>0x0&&_0x537796['columns'][_0x23b3e5(0x179)]>0x0)return _0x3f1fcb[_0x23b3e5(0x145)]({'code':_0x23b3e5(0x167),'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796['alias'],'columns':_0x537796[_0x23b3e5(0x144)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'status':_0x23b3e5(0x16e)};return _0x3f1fcb[_0x23b3e5(0x145)]({'code':_0x23b3e5(0x164),'table':_0x537796[_0x23b3e5(0x172)],'alias':_0x537796[_0x23b3e5(0x171)],'columns':_0x537796[_0x23b3e5(0x144)],'reason':_0x17c3cf?_0x23b3e5(0x161):_0x23b3e5(0x16d)}),{'table':_0x537796['table'],'alias':_0x537796['alias'],'columns':_0x537796[_0x23b3e5(0x144)],'status':'unavailable'};});return{'checked':_0x53c3a0[_0x4bd20e(0x179)]>0x0,'joins':_0x53c3a0,'warnings':_0x3f1fcb};}function extractJoinFacts(_0x1911c2){const _0x546ff5=a209_0x1db5,_0x4cedac=maskNestedQueries(stripSqlNoise(_0x1911c2)),_0x2e66ed=maskQuotedIdentifiers(_0x4cedac),_0x33a310=[],_0x5c339a=new Set(),_0x4ffd19=/\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 _0x3698d0 of _0x4cedac[_0x546ff5(0x17f)](_0x4ffd19)){const _0x3d8874=_0x3698d0[_0x546ff5(0x158)]??0x0,_0x4da4b2=_0x3698d0[0x0][_0x546ff5(0x17e)](/\bJOIN\b/i),_0x42190a=_0x3d8874+Math[_0x546ff5(0x17b)](0x0,_0x4da4b2);if(!/^JOIN\b/i[_0x546ff5(0x149)](_0x2e66ed['slice'](_0x42190a)))continue;_0x5c339a[_0x546ff5(0x15f)](_0x42190a);const _0x125f58=normalizeIdentifier(_0x3698d0[0x1]||'INNER'),_0x1d70dc=normalizeIdentifier(_0x3698d0[0x2]??''),_0x236373=normalizeIdentifier(_0x3698d0[0x3]||_0x1d70dc['split']('.')['at'](-0x1)||_0x1d70dc),_0x1fdd63=[],_0x422360=_0x1d70dc===_0x546ff5(0x175);let _0x1e54a3=_0x125f58===_0x546ff5(0x15b)||_0x125f58===_0x546ff5(0x154)||_0x422360,_0x46d55a=_0x1e54a3?_0x422360?_0x546ff5(0x14f):_0x125f58['toUpperCase']()+_0x546ff5(0x173):undefined;const _0x2c6cc6=stripOuterParentheses(_0x3698d0[0x4]??'');hasTopLevelKeyword(_0x2c6cc6,'OR')&&(_0x1e54a3=!![],_0x46d55a??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.');for(const _0x57ae5f of splitTopLevelAnd(_0x2c6cc6)){const _0x3d1b97=stripOuterParentheses(_0x57ae5f);if(hasTopLevelKeyword(_0x3d1b97,'OR')){_0x1e54a3=!![],_0x46d55a??=_0x546ff5(0x153);continue;}const _0x46e608=splitEquality(_0x3d1b97);if(!_0x46e608){containsColumnReference(_0x57ae5f,_0x236373)&&(_0x1e54a3=!![]);continue;}const _0x21043a=parseDirectColumnReference(_0x46e608[0x0],_0x236373),_0x1d1efd=parseDirectColumnReference(_0x46e608[0x1],_0x236373),_0x119a2c=containsColumnReference(_0x46e608[0x0],_0x236373),_0x299064=containsColumnReference(_0x46e608[0x1],_0x236373),_0x142c80=_0x21043a&&!_0x299064?_0x21043a:_0x1d1efd&&!_0x119a2c?_0x1d1efd:null;if(_0x142c80&&!_0x1fdd63[_0x546ff5(0x16b)](_0x142c80))_0x1fdd63[_0x546ff5(0x145)](_0x142c80);else!_0x142c80&&containsColumnReference(_0x57ae5f,_0x236373)&&(_0x1e54a3=!![]);}_0x33a310[_0x546ff5(0x145)]({'table':_0x1d70dc,'alias':_0x236373,'columns':_0x1fdd63,'unsupportedPredicate':_0x1e54a3,'unsupportedReason':_0x46d55a,'position':_0x42190a});}for(const _0x2447a8 of _0x2e66ed[_0x546ff5(0x17f)](/\bJOIN\b/gi)){const _0x27f736=_0x2447a8[_0x546ff5(0x158)]??0x0;if(_0x5c339a[_0x546ff5(0x152)](_0x27f736))continue;const _0x43b52f=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x546ff5(0x148)](_0x4cedac[_0x546ff5(0x182)](_0x27f736+_0x2447a8[0x0][_0x546ff5(0x179)])),_0x35caba=normalizeIdentifier(_0x43b52f?.[0x1]||_0x546ff5(0x160)),_0xabad15=normalizeIdentifier(_0x43b52f?.[0x2]||''),_0x593402=isSqlClauseKeyword(_0xabad15)?_0x35caba[_0x546ff5(0x155)]('.')['at'](-0x1)||_0x35caba:_0xabad15||_0x35caba[_0x546ff5(0x155)]('.')['at'](-0x1)||_0x35caba;_0x33a310[_0x546ff5(0x145)]({'table':_0x35caba,'alias':_0x593402,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x546ff5(0x178),'position':_0x27f736});}return _0x33a310[_0x546ff5(0x15d)]((_0x37bb61,_0x2457ba)=>_0x37bb61['position']-_0x2457ba[_0x546ff5(0x187)]);}function stripSqlNoise(_0x1cf98e){const _0x396d8b=a209_0x1db5,_0x22b3ab=Array[_0x396d8b(0x17a)](_0x1cf98e),_0x3784d1=(_0x18a14e,_0xbaf859)=>{for(let _0x522372=_0x18a14e;_0x522372<_0xbaf859;_0x522372+=0x1){_0x22b3ab[_0x522372]!=='\x0a'&&_0x22b3ab[_0x522372]!=='\x0d'&&(_0x22b3ab[_0x522372]='\x20');}};for(let _0x3194a3=0x0;_0x3194a3<_0x22b3ab[_0x396d8b(0x179)];_0x3194a3+=0x1){const _0x43a5e9=_0x22b3ab[_0x3194a3],_0x400fca=_0x22b3ab[_0x3194a3+0x1];if(_0x43a5e9==='\x27'||_0x43a5e9==='\x22'||_0x43a5e9==='`'){const _0x30c712=_0x43a5e9,_0x260ce2=_0x3194a3;_0x3194a3+=0x1;while(_0x3194a3<_0x22b3ab[_0x396d8b(0x179)]){if(_0x22b3ab[_0x3194a3]==='\x5c'&&_0x3194a3+0x1<_0x22b3ab[_0x396d8b(0x179)]){_0x3194a3+=0x2;continue;}if(_0x22b3ab[_0x3194a3]!==_0x30c712){_0x3194a3+=0x1;continue;}if(_0x22b3ab[_0x3194a3+0x1]===_0x30c712){_0x3194a3+=0x2;continue;}break;}if(_0x30c712==='\x27')_0x3784d1(_0x260ce2,Math['min'](_0x3194a3+0x1,_0x22b3ab[_0x396d8b(0x179)]));continue;}if(_0x43a5e9==='-'&&_0x400fca==='-'){const _0x5797c7=_0x3194a3;while(_0x3194a3<_0x22b3ab[_0x396d8b(0x179)]&&_0x22b3ab[_0x3194a3]!=='\x0a')_0x3194a3+=0x1;_0x3784d1(_0x5797c7,_0x3194a3);continue;}if(_0x43a5e9==='/'&&_0x400fca==='*'){const _0x3802da=_0x3194a3;_0x3194a3+=0x2;while(_0x3194a3<_0x22b3ab[_0x396d8b(0x179)]&&!(_0x22b3ab[_0x3194a3]==='*'&&_0x22b3ab[_0x3194a3+0x1]==='/')){_0x3194a3+=0x1;}_0x3194a3=Math[_0x396d8b(0x181)](_0x3194a3+0x1,_0x22b3ab[_0x396d8b(0x179)]-0x1),_0x3784d1(_0x3802da,_0x3194a3+0x1);continue;}if(_0x43a5e9==='#'&&_0x400fca!=='{'){const _0x5785ff=_0x3194a3;while(_0x3194a3<_0x22b3ab[_0x396d8b(0x179)]&&_0x22b3ab[_0x3194a3]!=='\x0a')_0x3194a3+=0x1;_0x3784d1(_0x5785ff,_0x3194a3);continue;}if((_0x43a5e9==='#'||_0x43a5e9==='$')&&_0x400fca==='{'){const _0x2e3c15=_0x3194a3;_0x3194a3+=0x2;while(_0x3194a3<_0x22b3ab[_0x396d8b(0x179)]&&_0x22b3ab[_0x3194a3]!=='}')_0x3194a3+=0x1;_0x3784d1(_0x2e3c15,Math[_0x396d8b(0x181)](_0x3194a3+0x1,_0x22b3ab[_0x396d8b(0x179)]));}}return _0x22b3ab['join']('');}function maskQuotedIdentifiers(_0x135a92){const _0x50cc60=a209_0x1db5,_0x1a1680=Array['from'](_0x135a92);for(let _0x342d10=0x0;_0x342d10<_0x1a1680[_0x50cc60(0x179)];_0x342d10+=0x1){const _0x286ac3=_0x1a1680[_0x342d10];if(_0x286ac3!=='\x22'&&_0x286ac3!=='`')continue;_0x342d10+=0x1;while(_0x342d10<_0x1a1680[_0x50cc60(0x179)]){if(_0x1a1680[_0x342d10]===_0x286ac3){if(_0x1a1680[_0x342d10+0x1]===_0x286ac3){_0x1a1680[_0x342d10]='\x20',_0x1a1680[_0x342d10+0x1]='\x20',_0x342d10+=0x2;continue;}break;}_0x1a1680[_0x342d10]='\x20',_0x342d10+=0x1;}}return _0x1a1680['join']('');}function maskNestedQueries(_0x13082c){const _0x3656c7=a209_0x1db5,_0x29ee68=Array['from'](_0x13082c);for(let _0x3ace86=0x0;_0x3ace86<_0x29ee68[_0x3656c7(0x179)];_0x3ace86+=0x1){if(_0x29ee68[_0x3ace86]!=='(')continue;const _0x419627=_0x13082c['slice'](_0x3ace86+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x3656c7(0x149)](_0x419627))continue;let _0x3af3f1=0x1,_0x105f88=_0x3ace86+0x1;for(;_0x105f88<_0x29ee68['length']&&_0x3af3f1>0x0;_0x105f88+=0x1){if(_0x29ee68[_0x105f88]==='(')_0x3af3f1+=0x1;if(_0x29ee68[_0x105f88]===')')_0x3af3f1-=0x1;}if(_0x3af3f1!==0x0)continue;for(let _0x140638=_0x3ace86;_0x140638<_0x105f88;_0x140638+=0x1){_0x29ee68[_0x140638]='\x20';}const _0x505308=_0x3656c7(0x175);for(let _0x54b790=0x0;_0x54b790<_0x505308[_0x3656c7(0x179)]&&_0x3ace86+_0x54b790<_0x105f88;_0x54b790+=0x1){_0x29ee68[_0x3ace86+_0x54b790]=_0x505308[_0x54b790];}_0x3ace86=_0x105f88-0x1;}return _0x29ee68[_0x3656c7(0x14d)]('');}function splitTopLevelAnd(_0x4a3035){const _0x5f07c7=a209_0x1db5,_0x38bfdd=[];let _0x5bba7c=0x0,_0x3a0ad5=0x0;for(let _0x3d98cb=0x0;_0x3d98cb<_0x4a3035['length'];_0x3d98cb+=0x1){const _0x2b5f8b=_0x4a3035[_0x3d98cb];if(_0x2b5f8b==='(')_0x5bba7c+=0x1;if(_0x2b5f8b===')')_0x5bba7c=Math[_0x5f07c7(0x17b)](0x0,_0x5bba7c-0x1);_0x5bba7c===0x0&&_0x4a3035[_0x5f07c7(0x182)](_0x3d98cb)[_0x5f07c7(0x14e)](/^AND\b/i)&&(_0x3d98cb===0x0||/\s/['test'](_0x4a3035[_0x3d98cb-0x1]??''))&&(_0x38bfdd[_0x5f07c7(0x145)](_0x4a3035[_0x5f07c7(0x182)](_0x3a0ad5,_0x3d98cb)['trim']()),_0x3d98cb+=0x2,_0x3a0ad5=_0x3d98cb+0x1);}const _0x599fae=_0x4a3035[_0x5f07c7(0x182)](_0x3a0ad5)[_0x5f07c7(0x16f)]();if(_0x599fae)_0x38bfdd[_0x5f07c7(0x145)](_0x599fae);return _0x38bfdd;}function a209_0xd5fd(){const _0x1ba770=['right','189951yqQnsK','sort','\x5cs*\x5c.\x5cs*[\x5cw$]+','add','unknown','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','unsupportedPredicate','replace','INDEX_METADATA_UNAVAILABLE','3941003SHHvOb','toLowerCase','JOIN_INDEX_MISSING','1786308NSFYlq','startsWith','metadataAvailable','includes','using','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','warning','trim','where','alias','table','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','(?:^|[^\x5cw$])','__sq__','23788fifuWE','1936773mVvdQy','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','length','from','max','map','some','search','matchAll','toUpperCase','min','slice','filter','unsupportedReason','10EWrVOQ','matchedPrefix','position','2798572dpZTYX','columns','push','165650JWlFNI','reduce','exec','test','24WhfpVi','JOIN_INDEX_NOT_USABLE','28niEcuj','join','match','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','tableName','JOIN_PREDICATE_UNSUPPORTED','has','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','full','split','inner','indexes','index','16JcgqQb','left'];a209_0xd5fd=function(){return _0x1ba770;};return a209_0xd5fd();}function hasTopLevelKeyword(_0x54b1ab,_0x359c4c){const _0x219c7b=a209_0x1db5;let _0x941bbc=0x0;for(let _0x3394e8=0x0;_0x3394e8<_0x54b1ab[_0x219c7b(0x179)];_0x3394e8+=0x1){const _0xd455c8=_0x54b1ab[_0x3394e8];if(_0xd455c8==='(')_0x941bbc+=0x1;if(_0xd455c8===')')_0x941bbc=Math['max'](0x0,_0x941bbc-0x1);if(_0x941bbc!==0x0)continue;const _0x1b07f4=_0x54b1ab['slice'](_0x3394e8,_0x3394e8+_0x359c4c['length']),_0x3631e7=_0x54b1ab[_0x3394e8-0x1]??'\x20',_0x1936a5=_0x54b1ab[_0x3394e8+_0x359c4c[_0x219c7b(0x179)]]??'\x20';if(_0x1b07f4[_0x219c7b(0x180)]()===_0x359c4c[_0x219c7b(0x180)]()&&!/[\w$]/[_0x219c7b(0x149)](_0x3631e7)&&!/[\w$]/['test'](_0x1936a5))return!![];}return![];}function splitEquality(_0x2577e6){const _0x331417=a209_0x1db5,_0x2e1769=stripOuterParentheses(_0x2577e6);let _0x625fe=0x0,_0x4225c4;for(let _0x2e3536=0x0;_0x2e3536<_0x2e1769[_0x331417(0x179)];_0x2e3536+=0x1){const _0x336de5=_0x2e1769[_0x2e3536];if(_0x336de5==='(')_0x625fe+=0x1;if(_0x336de5===')')_0x625fe=Math[_0x331417(0x17b)](0x0,_0x625fe-0x1);const _0x14f0a1=_0x2e1769[_0x2e3536-0x1]??'',_0x401261=_0x2e1769[_0x2e3536+0x1]??'';if(_0x336de5==='='&&_0x625fe===0x0&&!/[!<>=:]/['test'](_0x14f0a1)&&_0x401261!=='='){if(_0x4225c4!==undefined)return null;_0x4225c4=_0x2e3536;}}return _0x4225c4===undefined?null:[_0x2e1769[_0x331417(0x182)](0x0,_0x4225c4)[_0x331417(0x16f)](),_0x2e1769['slice'](_0x4225c4+0x1)[_0x331417(0x16f)]()];}function parseDirectColumnReference(_0x35e4dc,_0x4e1158){const _0x2a71c4=a209_0x1db5,_0x45a38c=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x2a71c4(0x148)](stripOuterParentheses(_0x35e4dc));if(!_0x45a38c)return null;if(normalizeIdentifier(_0x45a38c[0x1]??'')!==normalizeIdentifier(_0x4e1158))return null;return normalizeIdentifier(_0x45a38c[0x2]??'');}function containsColumnReference(_0x3b928e,_0x11c26f){const _0x46731c=a209_0x1db5,_0x519b3d=_0x3b928e['replace'](/[`"]/g,''),_0x33520c=_0x11c26f[_0x46731c(0x163)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x46731c(0x174)+_0x33520c+_0x46731c(0x15e),'i')[_0x46731c(0x149)](_0x519b3d);}function findEqualityPrefix(_0x3247ad,_0x585120){const _0x1c2574=a209_0x1db5,_0x20d022=new Set(_0x585120[_0x1c2574(0x17c)](normalizeIdentifier)),_0x2b42aa=[];for(const _0x59e5a0 of _0x3247ad){if(!_0x20d022[_0x1c2574(0x152)](normalizeIdentifier(_0x59e5a0)))break;_0x2b42aa[_0x1c2574(0x145)](_0x59e5a0);}return _0x2b42aa;}function a209_0x1db5(_0x3d49e4,_0x4891fd){_0x3d49e4=_0x3d49e4-0x144;const _0xd5fd87=a209_0xd5fd();let _0x1db591=_0xd5fd87[_0x3d49e4];return _0x1db591;}function resolveTableMetadata(_0x1e0097,_0x516b1c){const _0x3231bd=a209_0x1db5,_0x165932=normalizeIdentifier(_0x516b1c),_0x114a2e=_0x1e0097[_0x3231bd(0x183)](_0x5b3bb5=>normalizeIdentifier(_0x5b3bb5[_0x3231bd(0x150)])===_0x165932);if(_0x114a2e[_0x3231bd(0x179)]===0x1)return _0x114a2e[0x0];const _0xf84939=_0x165932[_0x3231bd(0x16b)]('.'),_0xdfa5a6=_0x165932[_0x3231bd(0x155)]('.')['at'](-0x1),_0x10c732=_0x1e0097[_0x3231bd(0x183)](_0x581298=>{const _0x3d2d79=_0x3231bd,_0x49a745=normalizeIdentifier(_0x581298[_0x3d2d79(0x150)]);if(_0xf84939&&_0x49a745['includes']('.'))return![];return _0x49a745[_0x3d2d79(0x155)]('.')['at'](-0x1)===_0xdfa5a6;});return _0x10c732[_0x3231bd(0x179)]===0x1?_0x10c732[0x0]:undefined;}function columnNamesMatch(_0x5e0030,_0x6864f9){return normalizeIdentifier(_0x5e0030)===normalizeIdentifier(_0x6864f9);}function normalizeIdentifier(_0x931c62){const _0x38eedf=a209_0x1db5;return _0x931c62['replace'](/[`"]/g,'')['trim']()[_0x38eedf(0x166)]();}function isSqlClauseKeyword(_0x425952){const _0x3d0f25=a209_0x1db5;return new Set(['on',_0x3d0f25(0x16c),_0x3d0f25(0x170),'join',_0x3d0f25(0x156),_0x3d0f25(0x15a),_0x3d0f25(0x15b),_0x3d0f25(0x154),'cross','natural'])[_0x3d0f25(0x152)](_0x425952);}function stripOuterParentheses(_0x22e50c){const _0x25485f=a209_0x1db5;let _0xfbbafa=_0x22e50c[_0x25485f(0x16f)]();while(_0xfbbafa[_0x25485f(0x169)]('(')&&_0xfbbafa['endsWith'](')')){let _0x35e146=0x0,_0x22766a=!![];for(let _0x1a3c83=0x0;_0x1a3c83<_0xfbbafa[_0x25485f(0x179)];_0x1a3c83+=0x1){if(_0xfbbafa[_0x1a3c83]==='(')_0x35e146+=0x1;if(_0xfbbafa[_0x1a3c83]===')')_0x35e146-=0x1;if(_0x35e146===0x0&&_0x1a3c83<_0xfbbafa[_0x25485f(0x179)]-0x1){_0x22766a=![];break;}}if(!_0x22766a||_0x35e146!==0x0)break;_0xfbbafa=_0xfbbafa[_0x25485f(0x182)](0x1,-0x1)[_0x25485f(0x16f)]();}return _0xfbbafa;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a210_0x4bfd02=a210_0x3673;(function(_0x52f9f5,_0x34c71b){const _0x35557f=a210_0x3673,_0x48d4a1=_0x52f9f5();while(!![]){try{const _0x2cf354=-parseInt(_0x35557f(0x1a3))/0x1*(-parseInt(_0x35557f(0x1a8))/0x2)+-parseInt(_0x35557f(0x1a7))/0x3*(-parseInt(_0x35557f(0x1a4))/0x4)+parseInt(_0x35557f(0x1a0))/0x5+-parseInt(_0x35557f(0x1a2))/0x6+parseInt(_0x35557f(0x1a1))/0x7+-parseInt(_0x35557f(0x1a6))/0x8*(-parseInt(_0x35557f(0x19e))/0x9)+-parseInt(_0x35557f(0x19f))/0xa;if(_0x2cf354===_0x34c71b)break;else _0x48d4a1['push'](_0x48d4a1['shift']());}catch(_0x3ebca3){_0x48d4a1['push'](_0x48d4a1['shift']());}}}(a210_0x2c6e,0xafd33));import{resolve}from'node:path';function a210_0x2c6e(){const _0x32e96e=['26818zCGKjr','/sql','sql-trash','sql.lock.json','18zPSkLV','21158310PimlnN','241550pLfcDq','6401535XOugWJ','303510JBjIOt','73PAIDqO','236nGwyTC','.rabetbase','729392VdMIlZ','38775njKujt'];a210_0x2c6e=function(){return _0x32e96e;};return a210_0x2c6e();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a210_0x4bfd02(0x1a5),LOCK_FILE_NAME=a210_0x4bfd02(0x19d),TRASH_DIR_NAME=a210_0x4bfd02(0x19c);function a210_0x3673(_0x5d4254,_0x3e1864){_0x5d4254=_0x5d4254-0x19c;const _0x2c6eb6=a210_0x2c6e();let _0x36733d=_0x2c6eb6[_0x5d4254];return _0x36733d;}export function loadSqlProjectConfig(_0x3b7e2d,_0x4ae62c){const _0x16438c=a210_0x4bfd02,_0x1dc5d2=resolve(_0x4ae62c??findProjectRootDirectory()),_0x4c2731=DOT_DIR+_0x16438c(0x1a9),_0x378a3f=_0x4c2731+'/'+_0x3b7e2d;return{'projectRoot':_0x1dc5d2,'appCode':_0x3b7e2d,'sqlWorkspaceRoot':_0x4c2731,'sqlRoot':_0x378a3f,'sqlRootDir':resolve(_0x1dc5d2,DOT_DIR,'sql',_0x3b7e2d),'lockFilePath':resolve(_0x1dc5d2,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1dc5d2,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bebbb,_0x2d8daa){const _0x331944=a211_0x2e5b,_0x267e18=_0x2bebbb();while(!![]){try{const _0x3f7521=-parseInt(_0x331944(0xbb))/0x1+-parseInt(_0x331944(0xad))/0x2+parseInt(_0x331944(0xc1))/0x3+-parseInt(_0x331944(0xaa))/0x4+-parseInt(_0x331944(0xb8))/0x5+-parseInt(_0x331944(0xb5))/0x6+parseInt(_0x331944(0xb4))/0x7*(parseInt(_0x331944(0xaf))/0x8);if(_0x3f7521===_0x2d8daa)break;else _0x267e18['push'](_0x267e18['shift']());}catch(_0x4329d6){_0x267e18['push'](_0x267e18['shift']());}}}(a211_0x3c2b,0x3d21d));function a211_0x2e5b(_0xe69ef6,_0x277e0a){_0xe69ef6=_0xe69ef6-0xa4;const _0x3c2bb5=a211_0x3c2b();let _0x2e5bac=_0x3c2bb5[_0xe69ef6];return _0x2e5bac;}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x1776df){const _0x3d2a64=a211_0x2e5b;if(_0x1776df===_0x3d2a64(0xb0))return _0x3d2a64(0xae);if(_0x1776df===_0x3d2a64(0xc2))return _0x3d2a64(0xa6);return undefined;}async function scanSqlFilesRecursively(_0x9c6fca,_0x112bbe){const _0x2625e8=a211_0x2e5b,_0x3eb1fa=[];try{const _0x55e785=await readdir(_0x9c6fca,{'withFileTypes':!![]});for(const _0x1a07e5 of _0x55e785){const _0x3f3d08=join(_0x9c6fca,_0x1a07e5[_0x2625e8(0xc0)]);if(_0x1a07e5['isDirectory']()){_0x3eb1fa[_0x2625e8(0xb9)](...await scanSqlFilesRecursively(_0x3f3d08,_0x112bbe));continue;}if(!_0x1a07e5[_0x2625e8(0xc3)]())continue;const _0x217ece=extname(_0x1a07e5[_0x2625e8(0xc0)])[_0x2625e8(0xbf)](),_0x237dfc=extensionToMode(_0x217ece);if(!_0x237dfc)continue;const _0x28e40e=relative(_0x112bbe,_0x3f3d08)[_0x2625e8(0xba)](/\\/g,'/'),_0x1b72ad=_0x28e40e[_0x2625e8(0xbc)]('/')[_0x2625e8(0xb7)](Boolean),_0x5cbc8b=parseSqlPath(_0x1b72ad,_0x1a07e5[_0x2625e8(0xc0)],_0x217ece);if(!_0x5cbc8b)continue;_0x3eb1fa[_0x2625e8(0xb9)]({'sqlCode':_0x5cbc8b[_0x2625e8(0xbd)],'sqlName':_0x5cbc8b[_0x2625e8(0xa5)],'dbDirectory':_0x1b72ad[0x0],'filePath':_0x3f3d08,'relativePath':_0x28e40e,'lockKey':_0x5cbc8b[_0x2625e8(0xbd)],'mode':_0x237dfc});}}catch(_0x45ddcc){if(_0x45ddcc[_0x2625e8(0xb6)]!==_0x2625e8(0xab))throw _0x45ddcc;}return _0x3eb1fa;}export async function scanLocalSqlQueries(_0x5a7ff4){const _0x6de268=a211_0x2e5b;return scanSqlFilesRecursively(_0x5a7ff4['sqlRootDir'],_0x5a7ff4[_0x6de268(0xb2)]);}function a211_0x3c2b(){const _0x393edc=['isDirectory','sqlRootDir','slice','5842697woyByH','2451876lOPbjV','code','filter','1536080WdTJLI','push','replace','262075WAIVIe','split','sqlCode','indexOf','toLowerCase','name','268965PHdDMO','.xml','isFile','length','sqlName','mybatisXml','dbId','dbName','mode','1927900XhERhw','ENOENT','test','97376TWFnAn','sql','16qrIZwL','.sql'];a211_0x3c2b=function(){return _0x393edc;};return a211_0x3c2b();}export function resolveLocalSqlFilePath(_0x48790d,_0x33cdc8,_0x5b58ad){const _0x370aa3=a211_0x2e5b,_0x598279=_0x5b58ad?.['path']||(_0x5b58ad?.['sqlName']||_0x5b58ad?.[_0x370aa3(0xa8)]?buildSqlRelativePath(_0x33cdc8,_0x5b58ad?.['sqlName'],_0x5b58ad?.['dbName'],_0x5b58ad?.[_0x370aa3(0xa9)]||'sql',_0x5b58ad?.[_0x370aa3(0xa7)]):buildDefaultSqlFileName(_0x33cdc8,_0x5b58ad?.['mode']||_0x370aa3(0xae)));return join(_0x48790d[_0x370aa3(0xb2)],_0x598279);}export async function directoryExists(_0x943aca){const _0x3c61dd=a211_0x2e5b;try{const _0x28de67=await stat(_0x943aca);return _0x28de67[_0x3c61dd(0xb1)]();}catch{return![];}}function parseSqlPath(_0x25559a,_0x5f19f1,_0x100325){const _0x1bef2c=a211_0x2e5b,_0x166e5d=_0x5f19f1['slice'](0x0,-_0x100325[_0x1bef2c(0xa4)]);if(_0x25559a[_0x1bef2c(0xa4)]<0x2)return null;const _0xcdcbac=_0x166e5d[_0x1bef2c(0xbe)]('_');if(_0xcdcbac<=0x0||_0xcdcbac>=_0x166e5d[_0x1bef2c(0xa4)]-0x1)return null;const _0x33ab4c=_0x166e5d['slice'](0x0,_0xcdcbac);if(!isLikelySqlCode(_0x33ab4c))return null;return{'sqlCode':_0x33ab4c,'sqlName':_0x166e5d[_0x1bef2c(0xb3)](_0xcdcbac+0x1)};}function isLikelySqlCode(_0x387829){const _0xa9969f=a211_0x2e5b;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0xa9969f(0xac)](_0x387829);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x68e3d4,_0x2df2fa){const _0x5d1990=a212_0x3bd4,_0x8887a9=_0x68e3d4();while(!![]){try{const _0x45c191=parseInt(_0x5d1990(0x133))/0x1+parseInt(_0x5d1990(0x12b))/0x2+-parseInt(_0x5d1990(0x134))/0x3+-parseInt(_0x5d1990(0x130))/0x4+-parseInt(_0x5d1990(0x132))/0x5+-parseInt(_0x5d1990(0x12e))/0x6+-parseInt(_0x5d1990(0x131))/0x7*(-parseInt(_0x5d1990(0x12c))/0x8);if(_0x45c191===_0x2df2fa)break;else _0x8887a9['push'](_0x8887a9['shift']());}catch(_0x46bb3f){_0x8887a9['push'](_0x8887a9['shift']());}}}(a212_0x24db,0x6da2b));import{readFile}from'node:fs/promises';import a212_0x56616f from'node:crypto';export function computeSqlContentHash(_0x1ec788){const _0xe3f128=a212_0x3bd4;return a212_0x56616f['createHash']('md5')['update'](_0x1ec788)[_0xe3f128(0x12d)](_0xe3f128(0x12a));}function a212_0x3bd4(_0x3f03ac,_0x51555d){_0x3f03ac=_0x3f03ac-0x12a;const _0x24db59=a212_0x24db();let _0x3bd4a2=_0x24db59[_0x3f03ac];return _0x3bd4a2;}function a212_0x24db(){const _0x47c06f=['2186072UFfuma','7UUIEXx','379710KRRDdD','72996IqzvTe','1726101fRnSRi','hex','843910VuodNa','12531224YCvChH','digest','2486760vjoXkD','utf8'];a212_0x24db=function(){return _0x47c06f;};return a212_0x24db();}export async function computeSqlFileHash(_0x27c7be){const _0x49ce5f=a212_0x3bd4,_0x11a2b9=await readFile(_0x27c7be,_0x49ce5f(0x12f));return computeSqlContentHash(_0x11a2b9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x218595,_0x2f6432){const _0x39f296=a213_0x3c08,_0x1da223=_0x218595();while(!![]){try{const _0x2e1b28=-parseInt(_0x39f296(0x17b))/0x1+-parseInt(_0x39f296(0x17d))/0x2*(-parseInt(_0x39f296(0x177))/0x3)+parseInt(_0x39f296(0x17f))/0x4*(parseInt(_0x39f296(0x180))/0x5)+parseInt(_0x39f296(0x183))/0x6*(-parseInt(_0x39f296(0x179))/0x7)+-parseInt(_0x39f296(0x175))/0x8*(-parseInt(_0x39f296(0x172))/0x9)+-parseInt(_0x39f296(0x17a))/0xa+parseInt(_0x39f296(0x182))/0xb*(parseInt(_0x39f296(0x17c))/0xc);if(_0x2e1b28===_0x2f6432)break;else _0x1da223['push'](_0x1da223['shift']());}catch(_0x18f484){_0x1da223['push'](_0x1da223['shift']());}}}(a213_0x28db,0xa5444));function a213_0x3c08(_0x1059a2,_0x163acb){_0x1059a2=_0x1059a2-0x16f;const _0x28dbc8=a213_0x28db();let _0x3c0800=_0x28dbc8[_0x1059a2];return _0x3c0800;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x1c0ce6,_0x538d33,_0x333555,_0x5cc52d){const _0x5e30d7=a213_0x3c08,_0x273c57=_0x1c0ce6??createEmptySqlLock();let _0x49bbbb=_0x273c57[_0x5e30d7(0x178)][_0x538d33];if(!_0x49bbbb)return _0x49bbbb={'sqlRoot':_0x333555,'lastSync':'','sqls':{}},_0x273c57['apps'][_0x538d33]=_0x49bbbb,{'lockData':_0x273c57,'appLock':_0x49bbbb};if(!_0x49bbbb['sqlRoot'])_0x49bbbb[_0x5e30d7(0x185)]=_0x333555;else{if(_0x49bbbb[_0x5e30d7(0x185)]!==_0x333555)throw new Error(_0x5cc52d+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x333555+_0x5e30d7(0x184)+_0x49bbbb['sqlRoot']+_0x5e30d7(0x170)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x49bbbb['sqls']&&(_0x49bbbb[_0x5e30d7(0x181)]={}),!_0x49bbbb[_0x5e30d7(0x171)]&&(_0x49bbbb[_0x5e30d7(0x171)]=''),{'lockData':_0x273c57,'appLock':_0x49bbbb};}export async function readSqlLockFile(_0x10805a){const _0x2d9e8c=a213_0x3c08;try{const _0x414833=await readFile(_0x10805a,'utf8');return JSON[_0x2d9e8c(0x176)](_0x414833);}catch(_0x283ebb){if(_0x283ebb[_0x2d9e8c(0x173)]===_0x2d9e8c(0x186))return null;throw new Error(_0x2d9e8c(0x174)+String(_0x283ebb));}}function a213_0x28db(){const _0x531b70=['542UwInqO','utf8','11512FUuQRs','755rEtJtP','sqls','616oFxUdR','6hgoLOq','\x22\x20vs\x20lock\x20\x22','sqlRoot','ENOENT','stringify','\x22.\x20','lastSync','10268631XhXMFs','code','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','8AeLJHe','parse','6336pjJqdg','apps','293650JUMpgJ','10240480yVmvyn','1053551LHFxNC','138984GyzbED'];a213_0x28db=function(){return _0x531b70;};return a213_0x28db();}export async function writeSqlLockFile(_0x3ac5e0,_0x463de8){const _0x25d8a2=a213_0x3c08;await mkdir(dirname(_0x3ac5e0),{'recursive':!![]}),await writeFile(_0x3ac5e0,JSON[_0x25d8a2(0x16f)](_0x463de8,null,0x2),_0x25d8a2(0x17e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ac3f2,_0x31264a){const _0x71a2b4=a215_0x2cd1,_0x5bc832=_0x5ac3f2();while(!![]){try{const _0x233588=-parseInt(_0x71a2b4(0x1cf))/0x1*(parseInt(_0x71a2b4(0x1cd))/0x2)+parseInt(_0x71a2b4(0x1d4))/0x3+-parseInt(_0x71a2b4(0x1d8))/0x4+parseInt(_0x71a2b4(0x1ca))/0x5+-parseInt(_0x71a2b4(0x1d0))/0x6*(parseInt(_0x71a2b4(0x1cc))/0x7)+parseInt(_0x71a2b4(0x1cb))/0x8*(parseInt(_0x71a2b4(0x1ce))/0x9)+-parseInt(_0x71a2b4(0x1da))/0xa*(-parseInt(_0x71a2b4(0x1d5))/0xb);if(_0x233588===_0x31264a)break;else _0x5bc832['push'](_0x5bc832['shift']());}catch(_0x5286d4){_0x5bc832['push'](_0x5bc832['shift']());}}}(a215_0x244c,0xd5cd0));export function detectSqlMode(_0x163476){const _0x596536=a215_0x2cd1,_0x313648=_0x163476['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x596536(0x1d9)](_0x313648))return'mybatisXml';return _0x596536(0x1d2);}export function getSqlFileExtension(_0x390d76){const _0x15cfac=a215_0x2cd1;return _0x390d76===_0x15cfac(0x1d6)?_0x15cfac(0x1d3):'.sql';}export function buildDefaultSqlFileName(_0x119c8f,_0x14ea2a){return''+_0x119c8f+getSqlFileExtension(_0x14ea2a);}export function sanitizeSqlPathSegment(_0xbb8022,_0x38f941){const _0x5521c3=a215_0x2cd1,_0x3b54e3=String(_0xbb8022??'')[_0x5521c3(0x1c8)](),_0x58ed67=_0x3b54e3['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x5521c3(0x1c9)](/\s+/g,'-')[_0x5521c3(0x1c9)](/-+/g,'-')[_0x5521c3(0x1c9)](/^\.+/,'')[_0x5521c3(0x1c9)](/\.+$/,'')[_0x5521c3(0x1c9)](/^-+/,'')['replace'](/-+$/,'');return _0x58ed67||_0x38f941;}export function buildDbDirectoryName(_0x3b3ee6,_0x1e59a1){const _0x69bfaa=a215_0x2cd1;return sanitizeSqlPathSegment(_0x3b3ee6,_0x1e59a1!=null?_0x69bfaa(0x1d1)+_0x1e59a1:_0x69bfaa(0x1d7));}function a215_0x244c(){const _0x41bda4=['trim','replace','4759450eCQYyV','136264iCZhWd','112ZgBRIK','4bUJHiO','279vzxCCZ','26141RvpuDF','544890pHhmCl','db-','sql','.xml','1776231QjyEhB','11SwmMgH','mybatisXml','unknown-db','63964EtrkLq','test','3250510ciwzvd','unknown-sql'];a215_0x244c=function(){return _0x41bda4;};return a215_0x244c();}function a215_0x2cd1(_0x8a9eb,_0x304f8e){_0x8a9eb=_0x8a9eb-0x1c8;const _0x244c99=a215_0x244c();let _0x2cd194=_0x244c99[_0x8a9eb];return _0x2cd194;}export function buildSqlRelativePath(_0x3212e3,_0x228982,_0x526ca7,_0x2ec2b6,_0x90f72d){const _0x5efcf5=a215_0x2cd1,_0x4e5a3c=buildDbDirectoryName(_0x526ca7,_0x90f72d),_0x561340=sanitizeSqlPathSegment(_0x3212e3,_0x5efcf5(0x1db)),_0x5baaeb=sanitizeSqlPathSegment(_0x228982,_0x561340);return _0x4e5a3c+'/'+_0x561340+'_'+_0x5baaeb+getSqlFileExtension(_0x2ec2b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35f409,_0x178845){const _0xeaec95=a216_0x4e23,_0x58f64d=_0x35f409();while(!![]){try{const _0x1945b9=parseInt(_0xeaec95(0x101))/0x1+-parseInt(_0xeaec95(0xf0))/0x2+parseInt(_0xeaec95(0xf7))/0x3*(-parseInt(_0xeaec95(0xef))/0x4)+parseInt(_0xeaec95(0xf8))/0x5*(parseInt(_0xeaec95(0x103))/0x6)+parseInt(_0xeaec95(0x108))/0x7+parseInt(_0xeaec95(0x100))/0x8+-parseInt(_0xeaec95(0x105))/0x9*(-parseInt(_0xeaec95(0x10c))/0xa);if(_0x1945b9===_0x178845)break;else _0x58f64d['push'](_0x58f64d['shift']());}catch(_0x2bd654){_0x58f64d['push'](_0x58f64d['shift']());}}}(a216_0x3193,0x8f0a3));function a216_0x4e23(_0x770ed4,_0x3b40c8){_0x770ed4=_0x770ed4-0xe9;const _0x31933a=a216_0x3193();let _0x4e2379=_0x31933a[_0x770ed4];return _0x4e2379;}export function detectSqlType(_0xc3708e){const _0x10f34b=a216_0x4e23;if(!_0xc3708e?.['trim']())return{'type':_0x10f34b(0x109),'isSelectOnly':![],'isDangerous':![],'reason':_0x10f34b(0xf1)};const _0x1ee173=_0xc3708e['replace'](/#\{[^}]*\}/g,'?')[_0x10f34b(0xfd)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x10f34b(0xfd)](/\/\*[\s\S]*?\*\//g,'')[_0x10f34b(0x104)](),_0x3b003a=_0x1ee173[_0x10f34b(0xfe)]('\x0a');let _0x530cb9='';for(const _0x250f9a of _0x3b003a){const _0x3b76db=_0x250f9a[_0x10f34b(0x104)]();if(!_0x3b76db||_0x3b76db[_0x10f34b(0x10b)]('--')||_0x3b76db[_0x10f34b(0x10b)]('/*'))continue;_0x530cb9=_0x3b76db;break;}const _0x1bbf14=_0x530cb9[_0x10f34b(0xff)]();if(_0x1bbf14[_0x10f34b(0x10b)](_0x10f34b(0xf3))||_0x1bbf14[_0x10f34b(0x10b)]('WITH')){const _0x26c760=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x10f34b(0xf9)](_0x1ee173);return{'type':_0x10f34b(0xf3),'isSelectOnly':!_0x26c760,'isDangerous':_0x26c760,'reason':_0x26c760?_0x10f34b(0x10d):undefined};}if(_0x1bbf14['startsWith'](_0x10f34b(0xe9)))return{'type':_0x10f34b(0xe9),'isSelectOnly':![],'isDangerous':![]};if(_0x1bbf14[_0x10f34b(0x10b)](_0x10f34b(0xfa)))return{'type':_0x10f34b(0xfa),'isSelectOnly':![],'isDangerous':![]};if(_0x1bbf14[_0x10f34b(0x10b)](_0x10f34b(0x107)))return{'type':_0x10f34b(0x107),'isSelectOnly':![],'isDangerous':!![],'reason':_0x10f34b(0xf5)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x10f34b(0xf9)](_0x1bbf14))return{'type':_0x10f34b(0xed),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function a216_0x3193(){const _0x2a9bd2=['1087552MJYRme','SQL\x20content\x20is\x20empty','type','SELECT','reason','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','\x20query\x20targeting\x20','1473111ryxhRl','5ciYQgV','test','UPDATE','\x20with\x20parameters:\x20','unknown\x20table(s)','replace','split','toUpperCase','3917768Jjrfgb','150535DxovUH','includes','2870874gRhsQG','trim','9NRIcjC','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','DELETE','5570229lnvXGP','UNKNOWN','push','startsWith','1972590mdZaow','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','INSERT','match','join','length','DDL','matchAll','8iKFvBj'];a216_0x3193=function(){return _0x2a9bd2;};return a216_0x3193();}function extractTables(_0x1308f6){const _0x214cec=a216_0x4e23,_0x104d15=_0x1308f6['replace'](/#\{[^}]*\}/g,'?')[_0x214cec(0xfd)](/\$\{[^}]*\}/g,'?')[_0x214cec(0xfd)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x214cec(0xfd)](/\/\*[\s\S]*?\*\//g,''),_0x2333b8=[],_0x373776=_0x104d15['match'](/FROM\s+([^\s,)(]+)/i);if(_0x373776?.[0x1])_0x2333b8[_0x214cec(0x10a)](_0x373776[0x1]['replace'](/[`"]/g,''));for(const _0x5132a4 of _0x104d15[_0x214cec(0xee)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x1ae589=_0x5132a4[0x1]?.[_0x214cec(0xfd)](/[`"]/g,'');if(_0x1ae589&&!_0x2333b8[_0x214cec(0x102)](_0x1ae589))_0x2333b8[_0x214cec(0x10a)](_0x1ae589);}const _0x3b3a36=_0x104d15[_0x214cec(0xea)](/INTO\s+([^\s(]+)/i);if(_0x3b3a36?.[0x1]){const _0x330ac2=_0x3b3a36[0x1][_0x214cec(0xfd)](/[`"]/g,'');if(!_0x2333b8['includes'](_0x330ac2))_0x2333b8['push'](_0x330ac2);}const _0x11b5b2=_0x104d15['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x11b5b2?.[0x1]){const _0x1d6d2f=_0x11b5b2[0x1][_0x214cec(0xfd)](/[`"]/g,'');if(!_0x2333b8[_0x214cec(0x102)](_0x1d6d2f))_0x2333b8[_0x214cec(0x10a)](_0x1d6d2f);}return _0x2333b8;}function extractParameters(_0x48fc02){const _0x4407f2=a216_0x4e23,_0x2edf7c=new Set();for(const _0x3b60e1 of _0x48fc02[_0x4407f2(0xee)](/#\{(\w+)\}/g))if(_0x3b60e1[0x1])_0x2edf7c['add'](_0x3b60e1[0x1]);for(const _0x2be581 of _0x48fc02[_0x4407f2(0xee)](/\$\{(\w+)\}/g))if(_0x2be581[0x1])_0x2edf7c['add'](_0x2be581[0x1]);return Array['from'](_0x2edf7c);}export function validateSql(_0x4462df){const _0x34be43=a216_0x4e23,_0x129688=detectSqlType(_0x4462df),_0x4ee47f=extractTables(_0x4462df),_0x4c6ebf=extractParameters(_0x4462df);if(_0x129688['isDangerous'])return{'valid':![],'sqlType':_0x129688,'tables':_0x4ee47f,'parameters':_0x4c6ebf,'message':_0x129688[_0x34be43(0xf4)]||_0x129688[_0x34be43(0xf2)]+_0x34be43(0x106)};if(_0x129688['type']===_0x34be43(0x109))return{'valid':![],'sqlType':_0x129688,'tables':_0x4ee47f,'parameters':_0x4c6ebf,'message':'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x129688,'tables':_0x4ee47f,'parameters':_0x4c6ebf,'message':_0x129688[_0x34be43(0xf2)]+_0x34be43(0xf6)+(_0x4ee47f[_0x34be43(0xec)]?_0x4ee47f[_0x34be43(0xeb)](',\x20'):_0x34be43(0xfc))+(_0x4c6ebf[_0x34be43(0xec)]?_0x34be43(0xfb)+_0x4c6ebf[_0x34be43(0xeb)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a217_0x7a8def=a217_0xb7ae;(function(_0xfaa887,_0x49864f){const _0x2bf9ce=a217_0xb7ae,_0xef6ef6=_0xfaa887();while(!![]){try{const _0x24e8ab=parseInt(_0x2bf9ce(0xe3))/0x1*(-parseInt(_0x2bf9ce(0xeb))/0x2)+parseInt(_0x2bf9ce(0xe8))/0x3+-parseInt(_0x2bf9ce(0xe4))/0x4*(-parseInt(_0x2bf9ce(0xf1))/0x5)+-parseInt(_0x2bf9ce(0xef))/0x6*(-parseInt(_0x2bf9ce(0xee))/0x7)+parseInt(_0x2bf9ce(0xec))/0x8*(parseInt(_0x2bf9ce(0xe5))/0x9)+parseInt(_0x2bf9ce(0xed))/0xa+-parseInt(_0x2bf9ce(0xe6))/0xb;if(_0x24e8ab===_0x49864f)break;else _0xef6ef6['push'](_0xef6ef6['shift']());}catch(_0x3fbef4){_0xef6ef6['push'](_0xef6ef6['shift']());}}}(a217_0x1288,0x2d048));function a217_0xb7ae(_0x373321,_0x380c72){_0x373321=_0x373321-0xe1;const _0x1288e5=a217_0x1288();let _0xb7ae10=_0x1288e5[_0x373321];return _0xb7ae10;}function a217_0x1288(){const _0x1e0844=['1865043iBdLWH','581559jIbYAG','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','156363uqUEzN','\x0a\x20\x20\x20\x20\x20\x20\x20','Set\x20appcode\x20via\x20`','262IMyVyB','8TMkqit','1283400Cbfwzk','7bBAtZW','90672YTxXOT','Tip:\x20`','5wiUWwM','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','join','1745JUQjFr','252224UBCYbp'];a217_0x1288=function(){return _0x1e0844;};return a217_0x1288();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.','configMissingHint':[a217_0x7a8def(0xea)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.',a217_0x7a8def(0xf0)+CLI_BIN_NAME+a217_0x7a8def(0xe7)][a217_0x7a8def(0xe2)](a217_0x7a8def(0xe9)),'notInProjectHint':a217_0x7a8def(0xe1)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x485717,_0x11dabd){const _0x1e9951=a218_0x5cad,_0x3b3b54=_0x485717();while(!![]){try{const _0x232bc9=-parseInt(_0x1e9951(0x1e4))/0x1*(-parseInt(_0x1e9951(0x1e8))/0x2)+-parseInt(_0x1e9951(0x1e2))/0x3*(parseInt(_0x1e9951(0x1e0))/0x4)+-parseInt(_0x1e9951(0x1e1))/0x5+-parseInt(_0x1e9951(0x1de))/0x6*(-parseInt(_0x1e9951(0x1e9))/0x7)+parseInt(_0x1e9951(0x1e3))/0x8+-parseInt(_0x1e9951(0x1dd))/0x9+parseInt(_0x1e9951(0x1e7))/0xa;if(_0x232bc9===_0x11dabd)break;else _0x3b3b54['push'](_0x3b3b54['shift']());}catch(_0x19728a){_0x3b3b54['push'](_0x3b3b54['shift']());}}}(a218_0x559e,0x928c0));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a218_0x5cad(_0x2c0aaa,_0x37eac5){_0x2c0aaa=_0x2c0aaa-0x1dd;const _0x559e9e=a218_0x559e();let _0x5cadb4=_0x559e9e[_0x2c0aaa];return _0x5cadb4;}import{buildAllFlags as a218_0x5279c8}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a218_0x559e(){const _0x1cb015=['7HUCYMd','8721963ZCCLGG','1502268VtBQDv','yes','10808BzQCHR','352150zGuRrW','135qRzbxA','2073440yJyEaf','9YmGeGK','name','map','530160jXoasP','266402HhWlPe'];a218_0x559e=function(){return _0x1cb015;};return a218_0x559e();}export function buildAllFlags(_0x354fd6){const _0x2b966d=a218_0x5cad,_0x43e67a=a218_0x5279c8(_0x354fd6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x354fd6))return _0x43e67a;return _0x43e67a[_0x2b966d(0x1e6)](_0x5a0937=>_0x5a0937[_0x2b966d(0x1e5)]===_0x2b966d(0x1df)?{..._0x5a0937,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x5a0937);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb8a772,_0x87c7fc){var _0x25f9c2=a219_0x2757,_0x3dcc9b=_0xb8a772();while(!![]){try{var _0x592ce3=-parseInt(_0x25f9c2(0x133))/0x1+-parseInt(_0x25f9c2(0x12d))/0x2*(parseInt(_0x25f9c2(0x12b))/0x3)+parseInt(_0x25f9c2(0x134))/0x4*(parseInt(_0x25f9c2(0x12c))/0x5)+-parseInt(_0x25f9c2(0x137))/0x6*(parseInt(_0x25f9c2(0x12f))/0x7)+-parseInt(_0x25f9c2(0x130))/0x8*(-parseInt(_0x25f9c2(0x135))/0x9)+-parseInt(_0x25f9c2(0x136))/0xa+parseInt(_0x25f9c2(0x12e))/0xb;if(_0x592ce3===_0x87c7fc)break;else _0x3dcc9b['push'](_0x3dcc9b['shift']());}catch(_0x5cee8f){_0x3dcc9b['push'](_0x3dcc9b['shift']());}}}(a219_0x429e,0xa38a5));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x1af09e){return _0x1af09e?.['structuredErrors']===!![];}function a219_0x2757(_0x255a4f,_0x3afbe8){_0x255a4f=_0x255a4f-0x12b;var _0x429ee2=a219_0x429e();var _0x2757b1=_0x429ee2[_0x255a4f];return _0x2757b1;}export function resolveErrorOutputFormat(_0x56ecc6){var _0x8c6cfd=a219_0x2757;if(!_0x56ecc6['def'])return _0x56ecc6['defaultFormat']??'compress';return resolveOutputConfig({'flags':_0x56ecc6['flags']??{},'def':_0x56ecc6['def'],'configDefault':_0x56ecc6[_0x8c6cfd(0x132)]})[_0x8c6cfd(0x131)];}function a219_0x429e(){var _0x185cc9=['format','defaultFormat','1112896FqZJzH','22072wyYEzO','198beWQov','7789590dysxYS','30QftQoy','221142FXyRkI','10vXNPpL','28yFNQtM','37521935SMjBHb','264215bsdYGy','131024EAoptI'];a219_0x429e=function(){return _0x185cc9;};return a219_0x429e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a220_0x16390d=a220_0x125b;(function(_0x5ab1c4,_0x2bba0d){const _0x2d0cb2=a220_0x125b,_0x1bb33b=_0x5ab1c4();while(!![]){try{const _0x3e55b1=parseInt(_0x2d0cb2(0x1b4))/0x1+parseInt(_0x2d0cb2(0x1ab))/0x2*(-parseInt(_0x2d0cb2(0x1a7))/0x3)+-parseInt(_0x2d0cb2(0x1b3))/0x4+-parseInt(_0x2d0cb2(0x1a6))/0x5*(parseInt(_0x2d0cb2(0x1b0))/0x6)+parseInt(_0x2d0cb2(0x1b2))/0x7*(-parseInt(_0x2d0cb2(0x1ad))/0x8)+-parseInt(_0x2d0cb2(0x1a9))/0x9+parseInt(_0x2d0cb2(0x1aa))/0xa;if(_0x3e55b1===_0x2bba0d)break;else _0x1bb33b['push'](_0x1bb33b['shift']());}catch(_0x2258d2){_0x1bb33b['push'](_0x1bb33b['shift']());}}}(a220_0x1a19,0xf25b7));function a220_0x1a19(){const _0x182518=['3752XwRBeq','3055508LFqkls','1085804RgVByZ','90WNwaKA','45gByKXG','has','14149350ZRNLjj','57962040rWlilw','161712nOEiLi','service','14048DNgVcP','menu\x20external-link-create','menu\x20regroup-start','466410XIgiul','menu\x20delete'];a220_0x1a19=function(){return _0x182518;};return a220_0x1a19();}function a220_0x125b(_0x5bcbf5,_0x49e0fd){_0x5bcbf5=_0x5bcbf5-0x1a6;const _0x1a1987=a220_0x1a19();let _0x125b64=_0x1a1987[_0x5bcbf5];return _0x125b64;}const EXPLICIT_YES_COMMANDS=new Set([a220_0x16390d(0x1ae),a220_0x16390d(0x1b1),'menu\x20group-create','menu\x20group-update','menu\x20move',a220_0x16390d(0x1af)]);export const EXPLICIT_YES_FLAG_DESCRIPTION='Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan';export function requiresExplicitYes(_0x4803e3){const _0x4e8391=a220_0x16390d;return EXPLICIT_YES_COMMANDS[_0x4e8391(0x1a8)](_0x4803e3[_0x4e8391(0x1ac)]+'\x20'+_0x4803e3['command']);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a221_0x446e(_0xaf9df0,_0x57c44a){_0xaf9df0=_0xaf9df0-0xff;const _0x3730e4=a221_0x3730();let _0x446ea0=_0x3730e4[_0xaf9df0];return _0x446ea0;}function a221_0x3730(){const _0x554640=['parseFlags','1192296kwRZTa','7BiakTQ','548420QJFAAK','27QBbbkJ','1138408tbOepp','1YJTdAh','14267676egvQse','4BNkIbt','55irbaNs','1482369nHKSZg','1199038opZJJz','974305ERppUr'];a221_0x3730=function(){return _0x554640;};return a221_0x3730();}const a221_0x1e314b=a221_0x446e;(function(_0x4700e3,_0x270cdc){const _0x507bfb=a221_0x446e,_0x37ea1d=_0x4700e3();while(!![]){try{const _0x3ca02c=-parseInt(_0x507bfb(0xff))/0x1*(parseInt(_0x507bfb(0x104))/0x2)+-parseInt(_0x507bfb(0x103))/0x3+-parseInt(_0x507bfb(0x101))/0x4*(-parseInt(_0x507bfb(0x105))/0x5)+-parseInt(_0x507bfb(0x107))/0x6*(-parseInt(_0x507bfb(0x108))/0x7)+-parseInt(_0x507bfb(0x10b))/0x8*(parseInt(_0x507bfb(0x10a))/0x9)+parseInt(_0x507bfb(0x109))/0xa*(parseInt(_0x507bfb(0x102))/0xb)+parseInt(_0x507bfb(0x100))/0xc;if(_0x3ca02c===_0x270cdc)break;else _0x37ea1d['push'](_0x37ea1d['shift']());}catch(_0x4503ff){_0x37ea1d['push'](_0x37ea1d['shift']());}}}(a221_0x3730,0x52157));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a221_0x1e314b(0x106)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a222_0x24a9(_0x3f661b,_0x4abec9){_0x3f661b=_0x3f661b-0x194;const _0x318e62=a222_0x318e();let _0x24a9e4=_0x318e62[_0x3f661b];return _0x24a9e4;}const a222_0x115ac1=a222_0x24a9;function a222_0x318e(){const _0x3aaeab=['3PPoEZA','2676302rQQLtT','\x20[args]\x20[flags]','5dyjcqL','get','264eGvWNh','2327672JzWuQZ','Requires\x20appcode\x20(set\x20via\x20`','8446401nsJGmL','7kbTrUn','6428418HGBeSU','generateCommandHelp','892760LQSBMg','2678360emTFDl','replace','generateFullHelp','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','generateServiceHelp','725423wzUxWL'];a222_0x318e=function(){return _0x3aaeab;};return a222_0x318e();}(function(_0x213674,_0x424f05){const _0x29d5bc=a222_0x24a9,_0x70796e=_0x213674();while(!![]){try{const _0x1b208b=-parseInt(_0x29d5bc(0x19c))/0x1+parseInt(_0x29d5bc(0x19e))/0x2*(parseInt(_0x29d5bc(0x19d))/0x3)+parseInt(_0x29d5bc(0x1a3))/0x4+parseInt(_0x29d5bc(0x1a0))/0x5*(parseInt(_0x29d5bc(0x194))/0x6)+-parseInt(_0x29d5bc(0x1a6))/0x7*(parseInt(_0x29d5bc(0x197))/0x8)+parseInt(_0x29d5bc(0x1a5))/0x9+parseInt(_0x29d5bc(0x196))/0xa*(-parseInt(_0x29d5bc(0x1a2))/0xb);if(_0x1b208b===_0x424f05)break;else _0x70796e['push'](_0x70796e['shift']());}catch(_0x446005){_0x70796e['push'](_0x70796e['shift']());}}}(a222_0x318e,0xb184f));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x510af5=>serviceGroups[a222_0x115ac1(0x1a1)](_0x510af5),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a222_0x115ac1(0x1a4)+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':a222_0x115ac1(0x19f)});export function generateCommandHelp(_0x150f00){const _0x15c346=a222_0x115ac1,_0x350f1a=generators[_0x15c346(0x195)](_0x150f00);if(!requiresExplicitYes(_0x150f00))return _0x350f1a;return _0x350f1a[_0x15c346(0x198)]('Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.',_0x15c346(0x19a));}export const generateServiceHelp=generators[a222_0x115ac1(0x19b)];export const generateFullHelp=generators[a222_0x115ac1(0x199)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe6717e,_0x26a98f){var _0x5984b9=a223_0x10b1,_0xda3ee1=_0xe6717e();while(!![]){try{var _0x37a3e3=parseInt(_0x5984b9(0x13e))/0x1+-parseInt(_0x5984b9(0x138))/0x2+-parseInt(_0x5984b9(0x13d))/0x3+parseInt(_0x5984b9(0x139))/0x4+-parseInt(_0x5984b9(0x137))/0x5+parseInt(_0x5984b9(0x13c))/0x6*(-parseInt(_0x5984b9(0x13b))/0x7)+parseInt(_0x5984b9(0x13a))/0x8;if(_0x37a3e3===_0x26a98f)break;else _0xda3ee1['push'](_0xda3ee1['shift']());}catch(_0x5450da){_0xda3ee1['push'](_0xda3ee1['shift']());}}}(a223_0x5d6e,0x37ce2));function a223_0x10b1(_0x46bf83,_0x4e5804){_0x46bf83=_0x46bf83-0x137;var _0x5d6e7b=a223_0x5d6e();var _0x10b1b1=_0x5d6e7b[_0x46bf83];return _0x10b1b1;}export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a223_0x5d6e(){var _0x2a9ade=['8315712gXIlnf','7ggHdoo','936594IsfElt','899397cTtyah','244185qviIbv','2049985CBCIkA','382768fOUDMM','8832ixKACb'];a223_0x5d6e=function(){return _0x2a9ade;};return a223_0x5d6e();}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ae2f7,_0x3569d6){const _0xfe15ed=a224_0x533b,_0x8a8e8f=_0x3ae2f7();while(!![]){try{const _0x4a8f7e=-parseInt(_0xfe15ed(0x19b))/0x1+parseInt(_0xfe15ed(0x1a5))/0x2+-parseInt(_0xfe15ed(0x1ae))/0x3+-parseInt(_0xfe15ed(0x19e))/0x4*(parseInt(_0xfe15ed(0x1a9))/0x5)+-parseInt(_0xfe15ed(0x1a0))/0x6*(-parseInt(_0xfe15ed(0x1aa))/0x7)+-parseInt(_0xfe15ed(0x1a6))/0x8*(-parseInt(_0xfe15ed(0x19c))/0x9)+-parseInt(_0xfe15ed(0x193))/0xa;if(_0x4a8f7e===_0x3569d6)break;else _0x8a8e8f['push'](_0x8a8e8f['shift']());}catch(_0xc35306){_0x8a8e8f['push'](_0x8a8e8f['shift']());}}}(a224_0x5b8a,0xbe526));function a224_0x533b(_0x2a244f,_0x2b885d){_0x2a244f=_0x2a244f-0x193;const _0x5b8a16=a224_0x5b8a();let _0x533b8b=_0x5b8a16[_0x2a244f];return _0x533b8b;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';function a224_0x5b8a(){const _0x506cb7=['5NMxihe','1407525Ouyrrv','jqFilter','trim','message','1990461lceLUh','313630hUBWuW','code','json','_notice','validation','jq:\x20','stdout','write','738319iwBkcD','334683vZbLQe','update','1885216eOslhD','endsWith','36ydkIro','command','format','error','data','128950OoyfiY','304JdlDgT','stringify','hint'];a224_0x5b8a=function(){return _0x506cb7;};return a224_0x5b8a();}import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x4827d2,_0x4c9a2f){const _0x3b5b47=a224_0x533b,_0x493c0d=_0x4827d2[_0x3b5b47(0x196)],{_notice:_0x2c8b8d,..._0x2d6611}=_0x4827d2;void _0x2c8b8d,baseFormatOutput(_0x2d6611,_0x4c9a2f),_0x4c9a2f[_0x3b5b47(0x1a2)]==='pretty'&&printPrettyNotice(_0x493c0d);}export function formatCliError(_0x65a8b5,_0x17b099){const _0x3195ae=a224_0x533b;if(_0x17b099[_0x3195ae(0x1a2)]==='pretty')return![];const _0x575665=_0x65a8b5[_0x3195ae(0x1a4)],_0x31e1c6={'ok':![],'command':_0x17b099[_0x3195ae(0x1a1)],'risk':_0x17b099['risk'],'data':_0x575665??null,'error':{'code':_0x65a8b5[_0x3195ae(0x194)],'message':_0x65a8b5[_0x3195ae(0x1ad)],..._0x65a8b5[_0x3195ae(0x1a8)]?{'hint':_0x65a8b5['hint']}:{}}},_0x419082=_0x17b099[_0x3195ae(0x1a2)]===_0x3195ae(0x195)?JSON[_0x3195ae(0x1a7)](_0x31e1c6,null,0x2):JSON[_0x3195ae(0x1a7)](_0x31e1c6);let _0x4c747b=_0x419082;if(_0x17b099[_0x3195ae(0x1ab)]?.[_0x3195ae(0x1ac)]())try{_0x4c747b=applyJqFilter(_0x419082,_0x17b099[_0x3195ae(0x1ab)]);}catch(_0xb2d083){const _0x429523=_0xb2d083 instanceof CliError?_0xb2d083:CliErrors[_0x3195ae(0x197)](_0x3195ae(0x198)+(_0xb2d083 instanceof Error?_0xb2d083[_0x3195ae(0x1ad)]:String(_0xb2d083))),_0x1710e8={..._0x31e1c6,'error':{'code':_0x429523['code'],'message':_0x429523[_0x3195ae(0x1ad)],..._0x429523[_0x3195ae(0x1a8)]?{'hint':_0x429523[_0x3195ae(0x1a8)]}:{},'cause':_0x31e1c6[_0x3195ae(0x1a3)]}};_0x4c747b=_0x17b099[_0x3195ae(0x1a2)]===_0x3195ae(0x195)?JSON[_0x3195ae(0x1a7)](_0x1710e8,null,0x2):JSON[_0x3195ae(0x1a7)](_0x1710e8);}return process[_0x3195ae(0x199)][_0x3195ae(0x19a)](_0x4c747b[_0x3195ae(0x19f)]('\x0a')?_0x4c747b:_0x4c747b+'\x0a'),!![];}function printPrettyNotice(_0x57b03e){const _0x12a8a5=a224_0x533b;if(!_0x57b03e?.[_0x12a8a5(0x19d)])return;console[_0x12a8a5(0x1a3)](_0x57b03e[_0x12a8a5(0x19d)][_0x12a8a5(0x1ad)]+'\x20('+_0x57b03e[_0x12a8a5(0x19d)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a225_0x562e(_0x2e20d2,_0x41c13f){_0x2e20d2=_0x2e20d2-0x1d5;var _0xdb7924=a225_0xdb79();var _0x562ee8=_0xdb7924[_0x2e20d2];return _0x562ee8;}(function(_0x3a7a7b,_0x46e500){var _0x4e52eb=a225_0x562e,_0x200410=_0x3a7a7b();while(!![]){try{var _0x3fd559=-parseInt(_0x4e52eb(0x1d8))/0x1+-parseInt(_0x4e52eb(0x1d9))/0x2+-parseInt(_0x4e52eb(0x1d5))/0x3*(parseInt(_0x4e52eb(0x1d6))/0x4)+parseInt(_0x4e52eb(0x1da))/0x5*(parseInt(_0x4e52eb(0x1de))/0x6)+-parseInt(_0x4e52eb(0x1db))/0x7*(parseInt(_0x4e52eb(0x1dd))/0x8)+-parseInt(_0x4e52eb(0x1d7))/0x9+parseInt(_0x4e52eb(0x1dc))/0xa;if(_0x3fd559===_0x46e500)break;else _0x200410['push'](_0x200410['shift']());}catch(_0x1566c3){_0x200410['push'](_0x200410['shift']());}}}(a225_0xdb79,0xc875b));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a225_0xdb79(){var _0x5405a9=['39111Krzhyg','20TtOpwI','367776AhjUty','369559EENDci','1715916fflPla','19080iTgNwO','5047mdkBvl','18586900Gbqyls','1416UjrmOZ','666KAdAcn'];a225_0xdb79=function(){return _0x5405a9;};return a225_0xdb79();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a226_0x3c96(_0x367ced,_0x23b20d){_0x367ced=_0x367ced-0x8f;const _0x40b4af=a226_0x40b4();let _0x3c96ee=_0x40b4af[_0x367ced];return _0x3c96ee;}(function(_0x525b85,_0x521ae3){const _0x1825c7=a226_0x3c96,_0x221b0d=_0x525b85();while(!![]){try{const _0x3b08cf=-parseInt(_0x1825c7(0xa5))/0x1*(parseInt(_0x1825c7(0x9b))/0x2)+parseInt(_0x1825c7(0xa2))/0x3+parseInt(_0x1825c7(0x92))/0x4*(parseInt(_0x1825c7(0x93))/0x5)+-parseInt(_0x1825c7(0x9e))/0x6+-parseInt(_0x1825c7(0xa4))/0x7+-parseInt(_0x1825c7(0x91))/0x8+parseInt(_0x1825c7(0x90))/0x9;if(_0x3b08cf===_0x521ae3)break;else _0x221b0d['push'](_0x221b0d['shift']());}catch(_0xeae3b6){_0x221b0d['push'](_0x221b0d['shift']());}}}(a226_0x40b4,0xadac0));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x2f3ce5,_0x1410f2,_0x4e015d,_0x244931){const _0x3217a3=a226_0x3c96,_0x22cbee=_0x2f3ce5[_0x3217a3(0x95)][_0x3217a3(0x94)](_0x373e1b=>_0x373e1b['name']===_0x3217a3(0x9f)&&_0x373e1b[_0x3217a3(0x97)]==='string'),_0x2a6296=_0x2f3ce5[_0x3217a3(0x95)]['some'](_0x1bcd9c=>_0x1bcd9c[_0x3217a3(0x99)]===_0x3217a3(0xa1)&&_0x1bcd9c['type']==='string');if(!_0x22cbee||!_0x2a6296)return;const _0x1f8b77=_0x1410f2[_0x3217a3(0x9f)]?String(_0x1410f2[_0x3217a3(0x9f)]):'',_0x484a15=_0x1410f2[_0x3217a3(0xa1)]?String(_0x1410f2[_0x3217a3(0xa1)]):'';if(!_0x1f8b77&&!_0x484a15)throw CliErrors['validation']('`'+_0x244931+_0x3217a3(0x9c));if(_0x484a15&&!_0x1f8b77){const _0x5a7afe=resolveAlias(_0x4e015d,_0x484a15);if(!_0x5a7afe){const _0x381ea9=listAliases(_0x4e015d)[_0x3217a3(0x9d)](_0xfc60c7=>_0xfc60c7[_0x3217a3(0xa1)]),_0x6384c7=_0x381ea9['length']?_0x3217a3(0x98)+_0x381ea9[_0x3217a3(0xa3)](',\x20'):_0x3217a3(0xa0)+_0x4e015d+_0x3217a3(0x8f)+CLI_BIN_NAME+'\x20api\x20pull`\x20first.';throw CliErrors[_0x3217a3(0x9a)](_0x3217a3(0x96)+_0x484a15+'\x22.\x20'+_0x6384c7);}_0x1410f2['code']=_0x5a7afe;}}function a226_0x40b4(){const _0xb127d9=['name','validation','172hvvYDx','`\x20requires\x20either\x20--code\x20or\x20--alias.','map','551640VIjgyK','code','No\x20api.ts\x20found\x20in\x20','alias','4197591ORasfu','join','3848383MfRIPl','3550JsXpKc','.\x20Run\x20`','951633NicpPC','2802568soHaQH','4708fDLttJ','2140VYVLGS','some','flags','Unknown\x20alias\x20\x22','type','Available\x20aliases:\x20'];a226_0x40b4=function(){return _0xb127d9;};return a226_0x40b4();}
|