@lovrabet/rabetbase-cli 2.3.11-beta.1 → 2.3.11
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
|
+
function a205_0x1784(_0x34233d,_0x151d7b){_0x34233d=_0x34233d-0x19d;const _0x1551fa=a205_0x1551();let _0x178415=_0x1551fa[_0x34233d];return _0x178415;}const a205_0x14a4b7=a205_0x1784;(function(_0x20e8a6,_0x2ee6d2){const _0x26d6fe=a205_0x1784,_0x3b5089=_0x20e8a6();while(!![]){try{const _0x1c95f4=parseInt(_0x26d6fe(0x19f))/0x1+parseInt(_0x26d6fe(0x1aa))/0x2+-parseInt(_0x26d6fe(0x19e))/0x3*(parseInt(_0x26d6fe(0x1a1))/0x4)+-parseInt(_0x26d6fe(0x1a7))/0x5*(-parseInt(_0x26d6fe(0x1a8))/0x6)+parseInt(_0x26d6fe(0x1a6))/0x7+-parseInt(_0x26d6fe(0x1a5))/0x8*(parseInt(_0x26d6fe(0x19d))/0x9)+parseInt(_0x26d6fe(0x1a2))/0xa;if(_0x1c95f4===_0x2ee6d2)break;else _0x3b5089['push'](_0x3b5089['shift']());}catch(_0x3b8309){_0x3b5089['push'](_0x3b5089['shift']());}}}(a205_0x1551,0xe1ee2));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x555c70,_0x125e87=process[a205_0x14a4b7(0x1a4)]()){const _0x4913f5=a205_0x14a4b7,_0x4546db=resolve(_0x125e87),_0x52818d=join(_0x4546db,_0x4913f5(0x1a0),_0x4913f5(0x1a9));return{'projectRoot':_0x4546db,'pagesBaseDir':_0x52818d,'appPagesDir':join(_0x52818d,_0x555c70),'lockFilePath':join(_0x4546db,_0x4913f5(0x1a0),'page.lock.json')};}export function buildPageFileName(_0x5ba0a0,_0x1a23c9){const _0x494546=a205_0x14a4b7;return _0x5ba0a0+'-'+String(_0x1a23c9)[_0x494546(0x1a3)]()+'.json';}export function resolvePageFilePath(_0x1d2f7c,_0x1eb568,_0x412352){return join(_0x1d2f7c['appPagesDir'],buildPageFileName(_0x1eb568,_0x412352));}export async function ensureParentDirectory(_0x39ed2f){await mkdir(dirname(_0x39ed2f),{'recursive':!![]});}function a205_0x1551(){const _0x128c41=['13368852SrjmVb','230151YwKBJu','545109jHETxk','.rabetbase','76xUWZzE','7822250ibMRdz','toUpperCase','cwd','8KREWpL','5713120RysEqw','10UZxPnr','2967444wKzizw','page','1471638QxSxaw','F_OK'];a205_0x1551=function(){return _0x128c41;};return a205_0x1551();}export async function fileExists(_0x5d7616){const _0x3986e3=a205_0x14a4b7;try{return await access(_0x5d7616,constants[_0x3986e3(0x1ab)]),!![];}catch{return![];}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x325c90,_0x39446e){const _0xad0dff=a206_0x157d,_0xe455aa=_0x325c90();while(!![]){try{const _0x39f4d6=-parseInt(_0xad0dff(0x146))/0x1*(-parseInt(_0xad0dff(0x145))/0x2)+-parseInt(_0xad0dff(0x13b))/0x3+-parseInt(_0xad0dff(0x13e))/0x4+parseInt(_0xad0dff(0x141))/0x5*(-parseInt(_0xad0dff(0x140))/0x6)+parseInt(_0xad0dff(0x144))/0x7*(parseInt(_0xad0dff(0x13c))/0x8)+parseInt(_0xad0dff(0x13a))/0x9+parseInt(_0xad0dff(0x143))/0xa;if(_0x39f4d6===_0x39446e)break;else _0xe455aa['push'](_0xe455aa['shift']());}catch(_0x42dbab){_0xe455aa['push'](_0xe455aa['shift']());}}}(a206_0x4f11,0xc3b42));import a206_0x59bda6 from'node:crypto';function a206_0x4f11(){const _0x2e6c2b=['23315iDXATP','update','8042890XoRDsy','476lTWinw','2qWjrnw','849459EHCxwW','4652946vkpxYe','3050865ifIKUk','58056TLkebI','md5','3084212QXpnoG','stringify','96DdfbAq'];a206_0x4f11=function(){return _0x2e6c2b;};return a206_0x4f11();}import{readFile}from'node:fs/promises';function a206_0x157d(_0x28b2c0,_0x54b19c){_0x28b2c0=_0x28b2c0-0x13a;const _0x4f116f=a206_0x4f11();let _0x157dee=_0x4f116f[_0x28b2c0];return _0x157dee;}export function serializePageSchemaForFile(_0x40dacb){const _0x93244=a206_0x157d;return JSON[_0x93244(0x13f)](JSON['parse'](_0x40dacb),null,0x2)+'\x0a';}export function computePageContentHash(_0x2ff9ed){const _0x3baeb3=a206_0x157d;return a206_0x59bda6['createHash'](_0x3baeb3(0x13d))[_0x3baeb3(0x142)](_0x2ff9ed)['digest']('hex');}export function computeSerializedSchemaHash(_0x2a4b47){return computePageContentHash(serializePageSchemaForFile(_0x2a4b47));}export async function computePageFileHash(_0x329c79){const _0x229a9c=await readFile(_0x329c79,'utf8');return computePageContentHash(_0x229a9c);}
|
package/lib/core/page/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x10ff(){const _0xa8925e=['811302dToyAW','ENOENT','apps','4MxOSiL','2223ADTAzG','parse','lastSync','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','60Hlopfd','20550sbMeAE','2118865iPaAAL','17666MdDeUZ','3155536URQzVg','code','913499McYBeY','utf8','20752VqhOGY','460518AvuGwi','object','pages'];a207_0x10ff=function(){return _0xa8925e;};return a207_0x10ff();}(function(_0x241118,_0x7343a5){const _0x238055=a207_0x2b64,_0x5b7f29=_0x241118();while(!![]){try{const _0x37b2ac=-parseInt(_0x238055(0x130))/0x1+parseInt(_0x238055(0x139))/0x2*(-parseInt(_0x238055(0x136))/0x3)+-parseInt(_0x238055(0x12e))/0x4+parseInt(_0x238055(0x13e))/0x5*(-parseInt(_0x238055(0x133))/0x6)+-parseInt(_0x238055(0x12c))/0x7+-parseInt(_0x238055(0x132))/0x8*(-parseInt(_0x238055(0x13a))/0x9)+parseInt(_0x238055(0x12b))/0xa*(parseInt(_0x238055(0x12d))/0xb);if(_0x37b2ac===_0x7343a5)break;else _0x5b7f29['push'](_0x5b7f29['shift']());}catch(_0x4489c6){_0x5b7f29['push'](_0x5b7f29['shift']());}}}(a207_0x10ff,0x73bd2));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x5b5c52,_0xc9fe2){const _0xabf04f=a207_0x2b64,_0x4b6d1d={'apps':_0x5b5c52[_0xabf04f(0x138)]&&typeof _0x5b5c52[_0xabf04f(0x138)]===_0xabf04f(0x134)?_0x5b5c52['apps']:{}};let _0x1ad960=_0x4b6d1d[_0xabf04f(0x138)][_0xc9fe2];if(!_0x1ad960)return _0x1ad960={'lastSync':'','pages':{}},_0x4b6d1d[_0xabf04f(0x138)][_0xc9fe2]=_0x1ad960,{'lockData':_0x4b6d1d,'appLock':_0x1ad960};return!_0x1ad960['lastSync']&&(_0x1ad960[_0xabf04f(0x13c)]=''),(!_0x1ad960[_0xabf04f(0x135)]||typeof _0x1ad960[_0xabf04f(0x135)]!==_0xabf04f(0x134))&&(_0x1ad960[_0xabf04f(0x135)]={}),{'lockData':_0x4b6d1d,'appLock':_0x1ad960};}function a207_0x2b64(_0xa1a98e,_0x57020f){_0xa1a98e=_0xa1a98e-0x12b;const _0x10ff82=a207_0x10ff();let _0x2b6457=_0x10ff82[_0xa1a98e];return _0x2b6457;}export async function readPageLockFile(_0x29a06a){const _0x58a015=a207_0x2b64;try{const _0xebbe5c=await readFile(_0x29a06a,_0x58a015(0x131)),_0x33d6ce=JSON[_0x58a015(0x13b)](_0xebbe5c);return{'apps':_0x33d6ce[_0x58a015(0x138)]&&typeof _0x33d6ce[_0x58a015(0x138)]===_0x58a015(0x134)?_0x33d6ce['apps']:{}};}catch(_0x5c514a){if(_0x5c514a[_0x58a015(0x12f)]===_0x58a015(0x137))return null;throw new Error(_0x58a015(0x13d)+String(_0x5c514a));}}export async function writePageLockFile(_0x552126,_0x39e68a){const _0x3cb723=a207_0x2b64;await mkdir(dirname(_0x552126),{'recursive':!![]}),await writeFile(_0x552126,JSON['stringify'](_0x39e68a,null,0x2),_0x3cb723(0x131));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x292fb2,_0x53801f){const _0x4c3d25=a209_0x52aa,_0x47fa6b=_0x292fb2();while(!![]){try{const _0x5481b8=parseInt(_0x4c3d25(0x197))/0x1*(parseInt(_0x4c3d25(0x17e))/0x2)+parseInt(_0x4c3d25(0x18c))/0x3*(parseInt(_0x4c3d25(0x163))/0x4)+-parseInt(_0x4c3d25(0x167))/0x5+parseInt(_0x4c3d25(0x16f))/0x6*(-parseInt(_0x4c3d25(0x162))/0x7)+parseInt(_0x4c3d25(0x173))/0x8*(parseInt(_0x4c3d25(0x1a4))/0x9)+parseInt(_0x4c3d25(0x17a))/0xa*(parseInt(_0x4c3d25(0x165))/0xb)+parseInt(_0x4c3d25(0x164))/0xc*(-parseInt(_0x4c3d25(0x179))/0xd);if(_0x5481b8===_0x53801f)break;else _0x47fa6b['push'](_0x47fa6b['shift']());}catch(_0x4fcf71){_0x47fa6b['push'](_0x47fa6b['shift']());}}}(a209_0x2391,0x57902));export function auditSqlJoinIndexes(_0x335189,_0x3fd2fd){const _0x3c66b6=a209_0x52aa,_0x4e54ba=[],_0xf2e76c=extractJoinFacts(_0x335189)['map'](_0x1da914=>{const _0x2ce1fe=a209_0x52aa;if(_0x1da914[_0x2ce1fe(0x19c)]||_0x1da914[_0x2ce1fe(0x174)][_0x2ce1fe(0x1a5)]===0x0)return _0x4e54ba[_0x2ce1fe(0x169)]({'code':_0x2ce1fe(0x184),'table':_0x1da914['table'],'alias':_0x1da914['alias'],'columns':_0x1da914[_0x2ce1fe(0x174)],'reason':_0x1da914[_0x2ce1fe(0x183)]??_0x2ce1fe(0x168)}),{'table':_0x1da914[_0x2ce1fe(0x180)],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'status':_0x2ce1fe(0x1a3)};const _0x32a01a=resolveTableMetadata(_0x3fd2fd,_0x1da914['table']),_0x5dd272=(_0x32a01a?.[_0x2ce1fe(0x17c)]??[])[_0x2ce1fe(0x186)](_0x26d1c2=>({'index':_0x26d1c2,'matchedPrefix':findEqualityPrefix(_0x26d1c2['columns'],_0x1da914[_0x2ce1fe(0x174)])}))['filter'](_0x3fb01c=>_0x3fb01c[_0x2ce1fe(0x17d)][_0x2ce1fe(0x1a5)]>0x0),_0x1b0e55=_0x5dd272[_0x2ce1fe(0x18a)]((_0x4b6035,_0x199f2a)=>!_0x4b6035||_0x199f2a[_0x2ce1fe(0x17d)][_0x2ce1fe(0x1a5)]>_0x4b6035['matchedPrefix'][_0x2ce1fe(0x1a5)]?_0x199f2a:_0x4b6035,_0x5dd272[0x0]);if(_0x1b0e55)return{'table':_0x1da914['table'],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'status':_0x2ce1fe(0x18d),'matchedIndex':{..._0x1b0e55[_0x2ce1fe(0x17b)],'matchedPrefix':_0x1b0e55['matchedPrefix']}};const _0x33de71=_0x32a01a?.[_0x2ce1fe(0x17c)][_0x2ce1fe(0x16c)](_0x590901=>_0x590901[_0x2ce1fe(0x174)][_0x2ce1fe(0x16d)](_0x708270=>_0x1da914[_0x2ce1fe(0x174)][_0x2ce1fe(0x16d)](_0x34c367=>columnNamesMatch(_0x708270,_0x34c367))))??[];if(_0x33de71['length']>0x0)return _0x4e54ba[_0x2ce1fe(0x169)]({'code':_0x2ce1fe(0x161),'table':_0x1da914[_0x2ce1fe(0x180)],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'reason':_0x2ce1fe(0x185)}),{'table':_0x1da914['table'],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'status':_0x2ce1fe(0x199),'candidateIndexes':_0x33de71};if(_0x32a01a&&_0x32a01a['metadataAvailable']!==![]&&_0x32a01a[_0x2ce1fe(0x17c)][_0x2ce1fe(0x1a5)]>0x0&&_0x1da914['columns'][_0x2ce1fe(0x1a5)]>0x0)return _0x4e54ba['push']({'code':_0x2ce1fe(0x1a1),'table':_0x1da914[_0x2ce1fe(0x180)],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'reason':_0x2ce1fe(0x192)}),{'table':_0x1da914[_0x2ce1fe(0x180)],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'status':_0x2ce1fe(0x199)};return _0x4e54ba[_0x2ce1fe(0x169)]({'code':_0x2ce1fe(0x166),'table':_0x1da914[_0x2ce1fe(0x180)],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'reason':_0x32a01a?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':_0x2ce1fe(0x19b)}),{'table':_0x1da914['table'],'alias':_0x1da914[_0x2ce1fe(0x160)],'columns':_0x1da914[_0x2ce1fe(0x174)],'status':_0x2ce1fe(0x1a3)};});return{'checked':_0xf2e76c[_0x3c66b6(0x1a5)]>0x0,'joins':_0xf2e76c,'warnings':_0x4e54ba};}function a209_0x2391(){const _0x117fe6=['Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','push','(?:^|[^\x5cw$])','cross','filter','some','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','6WIMgud','inner','has','tableName','3224TVyZyi','columns','where','full','includes','test','13lOsDOV','1370810NUNoNB','index','indexes','matchedPrefix','6BdrcLn','position','table','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','\x5cs*\x5c.\x5cs*[\x5cw$]+','unsupportedReason','JOIN_PREDICATE_UNSUPPORTED','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','map','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','right','min','reduce','max','3189ARKvHS','covered','matchAll','split','exec','match','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','join','INNER','add','slice','99677dOxMDk','replace','warning','startsWith','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','unsupportedPredicate','__sq__','trim','using','from','JOIN_INDEX_MISSING','toUpperCase','unavailable','747iSiaQh','length','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','natural','alias','JOIN_INDEX_NOT_USABLE','79471SSYfXD','932DYhNVB','1986864OQVuhc','22eicKIg','INDEX_METADATA_UNAVAILABLE','1593690BCRmDO'];a209_0x2391=function(){return _0x117fe6;};return a209_0x2391();}function extractJoinFacts(_0x3d024e){const _0x457b6f=a209_0x52aa,_0x33abf3=maskNestedQueries(stripSqlNoise(_0x3d024e)),_0xff8121=maskQuotedIdentifiers(_0x33abf3),_0x3d1c41=[],_0x35da0f=new Set(),_0x2385d2=/\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 _0x476822 of _0x33abf3[_0x457b6f(0x18e)](_0x2385d2)){const _0x4884ed=_0x476822[_0x457b6f(0x17b)]??0x0,_0x1af2f8=_0x476822[0x0]['search'](/\bJOIN\b/i),_0x43ba10=_0x4884ed+Math[_0x457b6f(0x18b)](0x0,_0x1af2f8);if(!/^JOIN\b/i[_0x457b6f(0x178)](_0xff8121['slice'](_0x43ba10)))continue;_0x35da0f[_0x457b6f(0x195)](_0x43ba10);const _0x40934b=normalizeIdentifier(_0x476822[0x1]||_0x457b6f(0x194)),_0x3cf0b1=normalizeIdentifier(_0x476822[0x2]??''),_0x26cf89=normalizeIdentifier(_0x476822[0x3]||_0x3cf0b1[_0x457b6f(0x18f)]('.')['at'](-0x1)||_0x3cf0b1),_0x40532e=[],_0x29b9e1=_0x3cf0b1===_0x457b6f(0x19d);let _0x38b3ef=_0x40934b===_0x457b6f(0x188)||_0x40934b===_0x457b6f(0x176)||_0x29b9e1,_0x58cbfd=_0x38b3ef?_0x29b9e1?_0x457b6f(0x187):_0x40934b[_0x457b6f(0x1a2)]()+_0x457b6f(0x16e):undefined;const _0x16f0b0=stripOuterParentheses(_0x476822[0x4]??'');hasTopLevelKeyword(_0x16f0b0,'OR')&&(_0x38b3ef=!![],_0x58cbfd??=_0x457b6f(0x181));for(const _0x1f10de of splitTopLevelAnd(_0x16f0b0)){const _0x8dc91b=stripOuterParentheses(_0x1f10de);if(hasTopLevelKeyword(_0x8dc91b,'OR')){_0x38b3ef=!![],_0x58cbfd??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x1c4313=splitEquality(_0x8dc91b);if(!_0x1c4313){containsColumnReference(_0x1f10de,_0x26cf89)&&(_0x38b3ef=!![]);continue;}const _0x657a73=parseDirectColumnReference(_0x1c4313[0x0],_0x26cf89),_0x3918b5=parseDirectColumnReference(_0x1c4313[0x1],_0x26cf89),_0x24b744=containsColumnReference(_0x1c4313[0x0],_0x26cf89),_0xa2e3c1=containsColumnReference(_0x1c4313[0x1],_0x26cf89),_0x56f08e=_0x657a73&&!_0xa2e3c1?_0x657a73:_0x3918b5&&!_0x24b744?_0x3918b5:null;if(_0x56f08e&&!_0x40532e[_0x457b6f(0x177)](_0x56f08e))_0x40532e[_0x457b6f(0x169)](_0x56f08e);else!_0x56f08e&&containsColumnReference(_0x1f10de,_0x26cf89)&&(_0x38b3ef=!![]);}_0x3d1c41[_0x457b6f(0x169)]({'table':_0x3cf0b1,'alias':_0x26cf89,'columns':_0x40532e,'unsupportedPredicate':_0x38b3ef,'unsupportedReason':_0x58cbfd,'position':_0x43ba10});}for(const _0x2b7d55 of _0xff8121[_0x457b6f(0x18e)](/\bJOIN\b/gi)){const _0x3d3326=_0x2b7d55[_0x457b6f(0x17b)]??0x0;if(_0x35da0f[_0x457b6f(0x171)](_0x3d3326))continue;const _0x38e480=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x457b6f(0x190)](_0x33abf3[_0x457b6f(0x196)](_0x3d3326+_0x2b7d55[0x0][_0x457b6f(0x1a5)])),_0x73b13a=normalizeIdentifier(_0x38e480?.[0x1]||'unknown'),_0x3c34f0=normalizeIdentifier(_0x38e480?.[0x2]||''),_0x1c2201=isSqlClauseKeyword(_0x3c34f0)?_0x73b13a[_0x457b6f(0x18f)]('.')['at'](-0x1)||_0x73b13a:_0x3c34f0||_0x73b13a[_0x457b6f(0x18f)]('.')['at'](-0x1)||_0x73b13a;_0x3d1c41[_0x457b6f(0x169)]({'table':_0x73b13a,'alias':_0x1c2201,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x457b6f(0x15e),'position':_0x3d3326});}return _0x3d1c41['sort']((_0x260cd0,_0x1edac9)=>_0x260cd0[_0x457b6f(0x17f)]-_0x1edac9[_0x457b6f(0x17f)]);}function a209_0x52aa(_0x12b42a,_0x23080a){_0x12b42a=_0x12b42a-0x15e;const _0x2391b6=a209_0x2391();let _0x52aa34=_0x2391b6[_0x12b42a];return _0x52aa34;}function stripSqlNoise(_0x33ae28){const _0x3e371c=a209_0x52aa,_0x4461f7=Array['from'](_0x33ae28),_0x4ec845=(_0x431d74,_0x1ad28a)=>{for(let _0x4b4021=_0x431d74;_0x4b4021<_0x1ad28a;_0x4b4021+=0x1){_0x4461f7[_0x4b4021]!=='\x0a'&&_0x4461f7[_0x4b4021]!=='\x0d'&&(_0x4461f7[_0x4b4021]='\x20');}};for(let _0x28e54b=0x0;_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)];_0x28e54b+=0x1){const _0x4ce421=_0x4461f7[_0x28e54b],_0x2b2fd3=_0x4461f7[_0x28e54b+0x1];if(_0x4ce421==='\x27'||_0x4ce421==='\x22'||_0x4ce421==='`'){const _0x4da832=_0x4ce421,_0x31c93a=_0x28e54b;_0x28e54b+=0x1;while(_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)]){if(_0x4461f7[_0x28e54b]==='\x5c'&&_0x28e54b+0x1<_0x4461f7[_0x3e371c(0x1a5)]){_0x28e54b+=0x2;continue;}if(_0x4461f7[_0x28e54b]!==_0x4da832){_0x28e54b+=0x1;continue;}if(_0x4461f7[_0x28e54b+0x1]===_0x4da832){_0x28e54b+=0x2;continue;}break;}if(_0x4da832==='\x27')_0x4ec845(_0x31c93a,Math[_0x3e371c(0x189)](_0x28e54b+0x1,_0x4461f7[_0x3e371c(0x1a5)]));continue;}if(_0x4ce421==='-'&&_0x2b2fd3==='-'){const _0x44ac99=_0x28e54b;while(_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)]&&_0x4461f7[_0x28e54b]!=='\x0a')_0x28e54b+=0x1;_0x4ec845(_0x44ac99,_0x28e54b);continue;}if(_0x4ce421==='/'&&_0x2b2fd3==='*'){const _0x35f672=_0x28e54b;_0x28e54b+=0x2;while(_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)]&&!(_0x4461f7[_0x28e54b]==='*'&&_0x4461f7[_0x28e54b+0x1]==='/')){_0x28e54b+=0x1;}_0x28e54b=Math[_0x3e371c(0x189)](_0x28e54b+0x1,_0x4461f7[_0x3e371c(0x1a5)]-0x1),_0x4ec845(_0x35f672,_0x28e54b+0x1);continue;}if(_0x4ce421==='#'&&_0x2b2fd3!=='{'){const _0x4a2542=_0x28e54b;while(_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)]&&_0x4461f7[_0x28e54b]!=='\x0a')_0x28e54b+=0x1;_0x4ec845(_0x4a2542,_0x28e54b);continue;}if((_0x4ce421==='#'||_0x4ce421==='$')&&_0x2b2fd3==='{'){const _0x389684=_0x28e54b;_0x28e54b+=0x2;while(_0x28e54b<_0x4461f7[_0x3e371c(0x1a5)]&&_0x4461f7[_0x28e54b]!=='}')_0x28e54b+=0x1;_0x4ec845(_0x389684,Math['min'](_0x28e54b+0x1,_0x4461f7[_0x3e371c(0x1a5)]));}}return _0x4461f7[_0x3e371c(0x193)]('');}function maskQuotedIdentifiers(_0xaaab63){const _0x1dbec0=a209_0x52aa,_0x1498ad=Array[_0x1dbec0(0x1a0)](_0xaaab63);for(let _0x319ebc=0x0;_0x319ebc<_0x1498ad[_0x1dbec0(0x1a5)];_0x319ebc+=0x1){const _0x4f755f=_0x1498ad[_0x319ebc];if(_0x4f755f!=='\x22'&&_0x4f755f!=='`')continue;_0x319ebc+=0x1;while(_0x319ebc<_0x1498ad[_0x1dbec0(0x1a5)]){if(_0x1498ad[_0x319ebc]===_0x4f755f){if(_0x1498ad[_0x319ebc+0x1]===_0x4f755f){_0x1498ad[_0x319ebc]='\x20',_0x1498ad[_0x319ebc+0x1]='\x20',_0x319ebc+=0x2;continue;}break;}_0x1498ad[_0x319ebc]='\x20',_0x319ebc+=0x1;}}return _0x1498ad['join']('');}function maskNestedQueries(_0xd4224a){const _0x29920c=a209_0x52aa,_0x11a095=Array[_0x29920c(0x1a0)](_0xd4224a);for(let _0x21d9bc=0x0;_0x21d9bc<_0x11a095['length'];_0x21d9bc+=0x1){if(_0x11a095[_0x21d9bc]!=='(')continue;const _0x43ed96=_0xd4224a[_0x29920c(0x196)](_0x21d9bc+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x29920c(0x178)](_0x43ed96))continue;let _0x65da9b=0x1,_0x24897a=_0x21d9bc+0x1;for(;_0x24897a<_0x11a095[_0x29920c(0x1a5)]&&_0x65da9b>0x0;_0x24897a+=0x1){if(_0x11a095[_0x24897a]==='(')_0x65da9b+=0x1;if(_0x11a095[_0x24897a]===')')_0x65da9b-=0x1;}if(_0x65da9b!==0x0)continue;for(let _0x57f6df=_0x21d9bc;_0x57f6df<_0x24897a;_0x57f6df+=0x1){_0x11a095[_0x57f6df]='\x20';}const _0x498320='__sq__';for(let _0x1f90f6=0x0;_0x1f90f6<_0x498320[_0x29920c(0x1a5)]&&_0x21d9bc+_0x1f90f6<_0x24897a;_0x1f90f6+=0x1){_0x11a095[_0x21d9bc+_0x1f90f6]=_0x498320[_0x1f90f6];}_0x21d9bc=_0x24897a-0x1;}return _0x11a095[_0x29920c(0x193)]('');}function splitTopLevelAnd(_0x20cd40){const _0x1f4b03=a209_0x52aa,_0x306ca6=[];let _0x204e7a=0x0,_0x2c3328=0x0;for(let _0x2cb9eb=0x0;_0x2cb9eb<_0x20cd40[_0x1f4b03(0x1a5)];_0x2cb9eb+=0x1){const _0x1bc169=_0x20cd40[_0x2cb9eb];if(_0x1bc169==='(')_0x204e7a+=0x1;if(_0x1bc169===')')_0x204e7a=Math[_0x1f4b03(0x18b)](0x0,_0x204e7a-0x1);_0x204e7a===0x0&&_0x20cd40[_0x1f4b03(0x196)](_0x2cb9eb)[_0x1f4b03(0x191)](/^AND\b/i)&&(_0x2cb9eb===0x0||/\s/[_0x1f4b03(0x178)](_0x20cd40[_0x2cb9eb-0x1]??''))&&(_0x306ca6['push'](_0x20cd40['slice'](_0x2c3328,_0x2cb9eb)[_0x1f4b03(0x19e)]()),_0x2cb9eb+=0x2,_0x2c3328=_0x2cb9eb+0x1);}const _0x2ab179=_0x20cd40[_0x1f4b03(0x196)](_0x2c3328)[_0x1f4b03(0x19e)]();if(_0x2ab179)_0x306ca6[_0x1f4b03(0x169)](_0x2ab179);return _0x306ca6;}function hasTopLevelKeyword(_0xf728d9,_0x5cc92c){const _0x371706=a209_0x52aa;let _0x1c94a8=0x0;for(let _0x2e066f=0x0;_0x2e066f<_0xf728d9['length'];_0x2e066f+=0x1){const _0x3c6a49=_0xf728d9[_0x2e066f];if(_0x3c6a49==='(')_0x1c94a8+=0x1;if(_0x3c6a49===')')_0x1c94a8=Math[_0x371706(0x18b)](0x0,_0x1c94a8-0x1);if(_0x1c94a8!==0x0)continue;const _0x3fb7d8=_0xf728d9[_0x371706(0x196)](_0x2e066f,_0x2e066f+_0x5cc92c[_0x371706(0x1a5)]),_0x14ec12=_0xf728d9[_0x2e066f-0x1]??'\x20',_0x448880=_0xf728d9[_0x2e066f+_0x5cc92c[_0x371706(0x1a5)]]??'\x20';if(_0x3fb7d8[_0x371706(0x1a2)]()===_0x5cc92c['toUpperCase']()&&!/[\w$]/['test'](_0x14ec12)&&!/[\w$]/[_0x371706(0x178)](_0x448880))return!![];}return![];}function splitEquality(_0x33dc6c){const _0x512db9=a209_0x52aa,_0x5d1b4e=stripOuterParentheses(_0x33dc6c);let _0x460dff=0x0,_0x5a8cf9;for(let _0x53094c=0x0;_0x53094c<_0x5d1b4e['length'];_0x53094c+=0x1){const _0x5e6ed4=_0x5d1b4e[_0x53094c];if(_0x5e6ed4==='(')_0x460dff+=0x1;if(_0x5e6ed4===')')_0x460dff=Math[_0x512db9(0x18b)](0x0,_0x460dff-0x1);const _0x4f2d66=_0x5d1b4e[_0x53094c-0x1]??'',_0x31dc4e=_0x5d1b4e[_0x53094c+0x1]??'';if(_0x5e6ed4==='='&&_0x460dff===0x0&&!/[!<>=:]/[_0x512db9(0x178)](_0x4f2d66)&&_0x31dc4e!=='='){if(_0x5a8cf9!==undefined)return null;_0x5a8cf9=_0x53094c;}}return _0x5a8cf9===undefined?null:[_0x5d1b4e[_0x512db9(0x196)](0x0,_0x5a8cf9)[_0x512db9(0x19e)](),_0x5d1b4e[_0x512db9(0x196)](_0x5a8cf9+0x1)['trim']()];}function parseDirectColumnReference(_0x2c3e4e,_0x513bbf){const _0x71bf7a=a209_0x52aa,_0x4f0ce1=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x71bf7a(0x190)](stripOuterParentheses(_0x2c3e4e));if(!_0x4f0ce1)return null;if(normalizeIdentifier(_0x4f0ce1[0x1]??'')!==normalizeIdentifier(_0x513bbf))return null;return normalizeIdentifier(_0x4f0ce1[0x2]??'');}function containsColumnReference(_0x4d088e,_0x10ed76){const _0x66ab4a=a209_0x52aa,_0x426e54=_0x4d088e['replace'](/[`"]/g,''),_0x591510=_0x10ed76['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x66ab4a(0x16a)+_0x591510+_0x66ab4a(0x182),'i')[_0x66ab4a(0x178)](_0x426e54);}function findEqualityPrefix(_0x4e2025,_0x2f754d){const _0x44fe1e=new Set(_0x2f754d['map'](normalizeIdentifier)),_0x371c5d=[];for(const _0x512b9e of _0x4e2025){if(!_0x44fe1e['has'](normalizeIdentifier(_0x512b9e)))break;_0x371c5d['push'](_0x512b9e);}return _0x371c5d;}function resolveTableMetadata(_0x5aba8a,_0x41ae41){const _0x26d8e3=a209_0x52aa,_0x2b611a=normalizeIdentifier(_0x41ae41),_0x57e091=_0x5aba8a['filter'](_0x5c6e71=>normalizeIdentifier(_0x5c6e71[_0x26d8e3(0x172)])===_0x2b611a);if(_0x57e091[_0x26d8e3(0x1a5)]===0x1)return _0x57e091[0x0];const _0x3d6376=_0x2b611a[_0x26d8e3(0x177)]('.'),_0x1f04c3=_0x2b611a[_0x26d8e3(0x18f)]('.')['at'](-0x1),_0x2841e4=_0x5aba8a[_0x26d8e3(0x16c)](_0x178308=>{const _0x2bbff7=_0x26d8e3,_0x3264ff=normalizeIdentifier(_0x178308[_0x2bbff7(0x172)]);if(_0x3d6376&&_0x3264ff[_0x2bbff7(0x177)]('.'))return![];return _0x3264ff['split']('.')['at'](-0x1)===_0x1f04c3;});return _0x2841e4[_0x26d8e3(0x1a5)]===0x1?_0x2841e4[0x0]:undefined;}function columnNamesMatch(_0x5b2664,_0x2152a1){return normalizeIdentifier(_0x5b2664)===normalizeIdentifier(_0x2152a1);}function normalizeIdentifier(_0x2b5804){const _0x486f8e=a209_0x52aa;return _0x2b5804[_0x486f8e(0x198)](/[`"]/g,'')[_0x486f8e(0x19e)]()['toLowerCase']();}function isSqlClauseKeyword(_0x3e0257){const _0x149e2b=a209_0x52aa;return new Set(['on',_0x149e2b(0x19f),_0x149e2b(0x175),'join',_0x149e2b(0x170),'left','right','full',_0x149e2b(0x16b),_0x149e2b(0x15f)])['has'](_0x3e0257);}function stripOuterParentheses(_0x15cc02){const _0x4e5431=a209_0x52aa;let _0x95913e=_0x15cc02[_0x4e5431(0x19e)]();while(_0x95913e[_0x4e5431(0x19a)]('(')&&_0x95913e['endsWith'](')')){let _0x709bdb=0x0,_0x5088ea=!![];for(let _0x25a409=0x0;_0x25a409<_0x95913e[_0x4e5431(0x1a5)];_0x25a409+=0x1){if(_0x95913e[_0x25a409]==='(')_0x709bdb+=0x1;if(_0x95913e[_0x25a409]===')')_0x709bdb-=0x1;if(_0x709bdb===0x0&&_0x25a409<_0x95913e[_0x4e5431(0x1a5)]-0x1){_0x5088ea=![];break;}}if(!_0x5088ea||_0x709bdb!==0x0)break;_0x95913e=_0x95913e[_0x4e5431(0x196)](0x1,-0x1)['trim']();}return _0x95913e;}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a210_0x12c092=a210_0x353a;(function(_0x1e4c49,_0xb775a2){const _0x4e3261=a210_0x353a,_0x2f0935=_0x1e4c49();while(!![]){try{const _0x2e0534=-parseInt(_0x4e3261(0xd4))/0x1+-parseInt(_0x4e3261(0xc9))/0x2+parseInt(_0x4e3261(0xd3))/0x3*(parseInt(_0x4e3261(0xd0))/0x4)+-parseInt(_0x4e3261(0xd1))/0x5*(parseInt(_0x4e3261(0xc8))/0x6)+-parseInt(_0x4e3261(0xcb))/0x7+-parseInt(_0x4e3261(0xcf))/0x8*(parseInt(_0x4e3261(0xd2))/0x9)+parseInt(_0x4e3261(0xcd))/0xa;if(_0x2e0534===_0xb775a2)break;else _0x2f0935['push'](_0x2f0935['shift']());}catch(_0x5bbf13){_0x2f0935['push'](_0x2f0935['shift']());}}}(a210_0x4083,0x48398));import{resolve}from'node:path';function a210_0x4083(){const _0x5c4353=['sql','36wvXUup','621384LsJBrF','sql-trash','3664115GeSIWC','sql.lock.json','19380770sJFHwK','/sql','3216440plKnNR','11884qINfaS','187045baAhKj','9tKWykM','258LJdaEk','437105rRaPwH'];a210_0x4083=function(){return _0x5c4353;};return a210_0x4083();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a210_0x12c092(0xcc),TRASH_DIR_NAME=a210_0x12c092(0xca);function a210_0x353a(_0x4fc804,_0x3980a4){_0x4fc804=_0x4fc804-0xc7;const _0x408345=a210_0x4083();let _0x353ac1=_0x408345[_0x4fc804];return _0x353ac1;}export function loadSqlProjectConfig(_0x21d604,_0x48595c){const _0x40e66c=a210_0x12c092,_0x228145=resolve(_0x48595c??findProjectRootDirectory()),_0x333f2e=DOT_DIR+_0x40e66c(0xce),_0x21a65d=_0x333f2e+'/'+_0x21d604;return{'projectRoot':_0x228145,'appCode':_0x21d604,'sqlWorkspaceRoot':_0x333f2e,'sqlRoot':_0x21a65d,'sqlRootDir':resolve(_0x228145,DOT_DIR,_0x40e66c(0xc7),_0x21d604),'lockFilePath':resolve(_0x228145,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x228145,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6990f,_0x3d2027){const _0x46267a=a211_0x3429,_0x541670=_0x6990f();while(!![]){try{const _0x5cf3a6=-parseInt(_0x46267a(0x193))/0x1+parseInt(_0x46267a(0x186))/0x2+-parseInt(_0x46267a(0x19f))/0x3*(-parseInt(_0x46267a(0x194))/0x4)+parseInt(_0x46267a(0x1a0))/0x5*(-parseInt(_0x46267a(0x192))/0x6)+parseInt(_0x46267a(0x18e))/0x7+parseInt(_0x46267a(0x191))/0x8+parseInt(_0x46267a(0x189))/0x9*(-parseInt(_0x46267a(0x1a1))/0xa);if(_0x5cf3a6===_0x3d2027)break;else _0x541670['push'](_0x541670['shift']());}catch(_0x4b6661){_0x541670['push'](_0x541670['shift']());}}}(a211_0x1e86,0x41e86));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a211_0x3429(_0x4a0d5d,_0x1fb13a){_0x4a0d5d=_0x4a0d5d-0x185;const _0x1e8686=a211_0x1e86();let _0x3429a1=_0x1e8686[_0x4a0d5d];return _0x3429a1;}function extensionToMode(_0x166562){const _0x2bb0a1=a211_0x3429;if(_0x166562===_0x2bb0a1(0x196))return _0x2bb0a1(0x195);if(_0x166562===_0x2bb0a1(0x19a))return _0x2bb0a1(0x190);return undefined;}async function scanSqlFilesRecursively(_0x4948d1,_0x1b4271){const _0x5b769d=a211_0x3429,_0x293ba8=[];try{const _0x491d8e=await readdir(_0x4948d1,{'withFileTypes':!![]});for(const _0x5271db of _0x491d8e){const _0x3e00c9=join(_0x4948d1,_0x5271db[_0x5b769d(0x18d)]);if(_0x5271db[_0x5b769d(0x18b)]()){_0x293ba8[_0x5b769d(0x19b)](...await scanSqlFilesRecursively(_0x3e00c9,_0x1b4271));continue;}if(!_0x5271db['isFile']())continue;const _0x3b5f66=extname(_0x5271db['name'])[_0x5b769d(0x1a3)](),_0x43ec61=extensionToMode(_0x3b5f66);if(!_0x43ec61)continue;const _0x18a733=relative(_0x1b4271,_0x3e00c9)[_0x5b769d(0x187)](/\\/g,'/'),_0x2ccd52=_0x18a733['split']('/')[_0x5b769d(0x18c)](Boolean),_0x29cd94=parseSqlPath(_0x2ccd52,_0x5271db[_0x5b769d(0x18d)],_0x3b5f66);if(!_0x29cd94)continue;_0x293ba8[_0x5b769d(0x19b)]({'sqlCode':_0x29cd94[_0x5b769d(0x197)],'sqlName':_0x29cd94['sqlName'],'dbDirectory':_0x2ccd52[0x0],'filePath':_0x3e00c9,'relativePath':_0x18a733,'lockKey':_0x29cd94[_0x5b769d(0x197)],'mode':_0x43ec61});}}catch(_0x40bb13){if(_0x40bb13[_0x5b769d(0x198)]!==_0x5b769d(0x18a))throw _0x40bb13;}return _0x293ba8;}export async function scanLocalSqlQueries(_0x1b2d46){const _0x10f410=a211_0x3429;return scanSqlFilesRecursively(_0x1b2d46[_0x10f410(0x188)],_0x1b2d46[_0x10f410(0x188)]);}function a211_0x1e86(){const _0x2a3f64=['.sql','sqlCode','code','test','.xml','push','mode','length','dbName','6gUqnjM','5MhtsrF','14870aUppEl','slice','toLowerCase','sqlName','117290eseURK','replace','sqlRootDir','1062ZreUjg','ENOENT','isDirectory','filter','name','2169552HSNpgK','path','mybatisXml','3164912QcZEeI','1477182VpcNtN','217740MgEaMQ','290332djRMpu','sql'];a211_0x1e86=function(){return _0x2a3f64;};return a211_0x1e86();}export function resolveLocalSqlFilePath(_0xc2056,_0x53e15d,_0x34d2ba){const _0x20a62b=a211_0x3429,_0x197dee=_0x34d2ba?.[_0x20a62b(0x18f)]||(_0x34d2ba?.[_0x20a62b(0x185)]||_0x34d2ba?.[_0x20a62b(0x19e)]?buildSqlRelativePath(_0x53e15d,_0x34d2ba?.['sqlName'],_0x34d2ba?.[_0x20a62b(0x19e)],_0x34d2ba?.[_0x20a62b(0x19c)]||_0x20a62b(0x195),_0x34d2ba?.['dbId']):buildDefaultSqlFileName(_0x53e15d,_0x34d2ba?.['mode']||_0x20a62b(0x195)));return join(_0xc2056[_0x20a62b(0x188)],_0x197dee);}export async function directoryExists(_0xe88b2e){try{const _0x1e3e64=await stat(_0xe88b2e);return _0x1e3e64['isDirectory']();}catch{return![];}}function parseSqlPath(_0x52e086,_0x2bc99a,_0xd9e2f6){const _0x2bf344=a211_0x3429,_0x106927=_0x2bc99a[_0x2bf344(0x1a2)](0x0,-_0xd9e2f6['length']);if(_0x52e086[_0x2bf344(0x19d)]<0x2)return null;const _0x2823bc=_0x106927['indexOf']('_');if(_0x2823bc<=0x0||_0x2823bc>=_0x106927[_0x2bf344(0x19d)]-0x1)return null;const _0x380c11=_0x106927[_0x2bf344(0x1a2)](0x0,_0x2823bc);if(!isLikelySqlCode(_0x380c11))return null;return{'sqlCode':_0x380c11,'sqlName':_0x106927[_0x2bf344(0x1a2)](_0x2823bc+0x1)};}function isLikelySqlCode(_0x125ac6){const _0x18f232=a211_0x3429;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x18f232(0x199)](_0x125ac6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2907a2,_0x4f4060){const _0x4c93d8=a212_0x74bb,_0x17845c=_0x2907a2();while(!![]){try{const _0x291ac2=-parseInt(_0x4c93d8(0xf5))/0x1*(-parseInt(_0x4c93d8(0xea))/0x2)+-parseInt(_0x4c93d8(0xf6))/0x3+-parseInt(_0x4c93d8(0xee))/0x4+parseInt(_0x4c93d8(0xf3))/0x5+parseInt(_0x4c93d8(0xf2))/0x6*(parseInt(_0x4c93d8(0xef))/0x7)+parseInt(_0x4c93d8(0xf0))/0x8+-parseInt(_0x4c93d8(0xf1))/0x9;if(_0x291ac2===_0x4f4060)break;else _0x17845c['push'](_0x17845c['shift']());}catch(_0x57080f){_0x17845c['push'](_0x17845c['shift']());}}}(a212_0x3d80,0x4b614));import{readFile}from'node:fs/promises';import a212_0x1d0d1e from'node:crypto';export function computeSqlContentHash(_0x51f3ee){const _0x3db1c2=a212_0x74bb;return a212_0x1d0d1e[_0x3db1c2(0xed)](_0x3db1c2(0xeb))[_0x3db1c2(0xec)](_0x51f3ee)['digest'](_0x3db1c2(0xf4));}function a212_0x74bb(_0xb48fc6,_0x3e28a3){_0xb48fc6=_0xb48fc6-0xea;const _0x3d8078=a212_0x3d80();let _0x74bbea=_0x3d8078[_0xb48fc6];return _0x74bbea;}function a212_0x3d80(){const _0x426509=['721086dmXsxZ','md5','update','createHash','1256244vdkCUA','34461wTdwgU','3378152sxOaBK','1197405WjDTjc','378pIytBD','1204295JpgnkI','hex','1vVyaDn','1733874RRyUaM'];a212_0x3d80=function(){return _0x426509;};return a212_0x3d80();}export async function computeSqlFileHash(_0x39e0df){const _0x4ce8e5=await readFile(_0x39e0df,'utf8');return computeSqlContentHash(_0x4ce8e5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a0303,_0x51ef39){const _0x202862=a213_0x2f8b,_0x10cc4b=_0x1a0303();while(!![]){try{const _0x500238=parseInt(_0x202862(0xeb))/0x1*(-parseInt(_0x202862(0xe0))/0x2)+parseInt(_0x202862(0xe6))/0x3*(-parseInt(_0x202862(0xed))/0x4)+parseInt(_0x202862(0xf0))/0x5*(parseInt(_0x202862(0xea))/0x6)+parseInt(_0x202862(0xe1))/0x7*(parseInt(_0x202862(0xe2))/0x8)+-parseInt(_0x202862(0xec))/0x9+parseInt(_0x202862(0xf1))/0xa+-parseInt(_0x202862(0xf4))/0xb*(parseInt(_0x202862(0xe7))/0xc);if(_0x500238===_0x51ef39)break;else _0x10cc4b['push'](_0x10cc4b['shift']());}catch(_0x4d728e){_0x10cc4b['push'](_0x10cc4b['shift']());}}}(a213_0x28b5,0x993ad));import{mkdir,readFile,writeFile}from'node:fs/promises';function a213_0x28b5(){const _0x505c47=['\x22.\x20',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','6070LcrmVK','6560830VSrqDt','apps','stringify','427559zsjHbO','parse','ENOENT','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','6CalrlY','7QLAzPF','3555664OPfMKr','sqlRoot','code','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','566883dfGUjk','60YWkNNA','sqls','lastSync','66WFnEhq','29507IDskFD','129951HuJQbN','4KydYib'];a213_0x28b5=function(){return _0x505c47;};return a213_0x28b5();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x2b3015,_0x5f54ae,_0x191e07,_0x2ec8ff){const _0x420492=a213_0x2f8b,_0x5f4d2d=_0x2b3015??createEmptySqlLock();let _0x2c0668=_0x5f4d2d[_0x420492(0xf2)][_0x5f54ae];if(!_0x2c0668)return _0x2c0668={'sqlRoot':_0x191e07,'lastSync':'','sqls':{}},_0x5f4d2d['apps'][_0x5f54ae]=_0x2c0668,{'lockData':_0x5f4d2d,'appLock':_0x2c0668};if(!_0x2c0668['sqlRoot'])_0x2c0668[_0x420492(0xe3)]=_0x191e07;else{if(_0x2c0668[_0x420492(0xe3)]!==_0x191e07)throw new Error(_0x2ec8ff+_0x420492(0xef)+_0x191e07+'\x22\x20vs\x20lock\x20\x22'+_0x2c0668[_0x420492(0xe3)]+_0x420492(0xee)+_0x420492(0xdf));}return!_0x2c0668[_0x420492(0xe8)]&&(_0x2c0668[_0x420492(0xe8)]={}),!_0x2c0668[_0x420492(0xe9)]&&(_0x2c0668[_0x420492(0xe9)]=''),{'lockData':_0x5f4d2d,'appLock':_0x2c0668};}function a213_0x2f8b(_0x5b7390,_0x5e8a48){_0x5b7390=_0x5b7390-0xde;const _0x28b591=a213_0x28b5();let _0x2f8b3f=_0x28b591[_0x5b7390];return _0x2f8b3f;}export async function readSqlLockFile(_0x6370e1){const _0x3a4700=a213_0x2f8b;try{const _0x94997f=await readFile(_0x6370e1,'utf8');return JSON[_0x3a4700(0xf5)](_0x94997f);}catch(_0x23e370){if(_0x23e370[_0x3a4700(0xe4)]===_0x3a4700(0xde))return null;throw new Error(_0x3a4700(0xe5)+String(_0x23e370));}}export async function writeSqlLockFile(_0x595510,_0x909f71){const _0x452bff=a213_0x2f8b;await mkdir(dirname(_0x595510),{'recursive':!![]}),await writeFile(_0x595510,JSON[_0x452bff(0xf3)](_0x909f71,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a215_0x1535(_0x3b93d5,_0x156ff0){_0x3b93d5=_0x3b93d5-0x190;const _0x5381a9=a215_0x5381();let _0x15352c=_0x5381a9[_0x3b93d5];return _0x15352c;}(function(_0x442305,_0x413546){const _0x4809e0=a215_0x1535,_0x4be241=_0x442305();while(!![]){try{const _0x2630fd=parseInt(_0x4809e0(0x192))/0x1*(-parseInt(_0x4809e0(0x19f))/0x2)+parseInt(_0x4809e0(0x19d))/0x3+parseInt(_0x4809e0(0x19a))/0x4+-parseInt(_0x4809e0(0x197))/0x5*(parseInt(_0x4809e0(0x190))/0x6)+parseInt(_0x4809e0(0x19b))/0x7*(parseInt(_0x4809e0(0x196))/0x8)+-parseInt(_0x4809e0(0x193))/0x9*(-parseInt(_0x4809e0(0x198))/0xa)+parseInt(_0x4809e0(0x199))/0xb*(-parseInt(_0x4809e0(0x194))/0xc);if(_0x2630fd===_0x413546)break;else _0x4be241['push'](_0x4be241['shift']());}catch(_0x26e704){_0x4be241['push'](_0x4be241['shift']());}}}(a215_0x5381,0x5dd47));export function detectSqlMode(_0x128b4b){const _0x2f6aca=a215_0x1535,_0x42bde1=_0x128b4b['trimStart']();if(/^<(select|insert|update|delete)\b/i['test'](_0x42bde1))return _0x2f6aca(0x195);return _0x2f6aca(0x191);}export function getSqlFileExtension(_0x1f2e2b){const _0x43b65d=a215_0x1535;return _0x1f2e2b===_0x43b65d(0x195)?'.xml':'.sql';}export function buildDefaultSqlFileName(_0x55fc8c,_0x11168b){return''+_0x55fc8c+getSqlFileExtension(_0x11168b);}export function sanitizeSqlPathSegment(_0x37a599,_0x592c22){const _0x3b7b33=a215_0x1535,_0x191fc2=String(_0x37a599??'')[_0x3b7b33(0x19e)](),_0xa92dc2=_0x191fc2[_0x3b7b33(0x19c)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')['replace'](/\s+/g,'-')[_0x3b7b33(0x19c)](/-+/g,'-')['replace'](/^\.+/,'')[_0x3b7b33(0x19c)](/\.+$/,'')[_0x3b7b33(0x19c)](/^-+/,'')[_0x3b7b33(0x19c)](/-+$/,'');return _0xa92dc2||_0x592c22;}export function buildDbDirectoryName(_0x5da4f6,_0x49686f){return sanitizeSqlPathSegment(_0x5da4f6,_0x49686f!=null?'db-'+_0x49686f:'unknown-db');}function a215_0x5381(){const _0xecf614=['990912aDgmmC','trim','4KcFOFo','509820MOwSGO','sql','74551slBDmL','27LJbUtD','204eoBsFw','mybatisXml','261432eZtIaf','5bddEKB','1546390AgUnSg','418737OdrxiE','447392qLpjnA','77jVfYXr','replace'];a215_0x5381=function(){return _0xecf614;};return a215_0x5381();}export function buildSqlRelativePath(_0x50b8d3,_0x302bd3,_0x4cee05,_0x988622,_0x4b1d1e){const _0x3a2151=buildDbDirectoryName(_0x4cee05,_0x4b1d1e),_0x49638a=sanitizeSqlPathSegment(_0x50b8d3,'unknown-sql'),_0x5ad952=sanitizeSqlPathSegment(_0x302bd3,_0x49638a);return _0x3a2151+'/'+_0x49638a+'_'+_0x5ad952+getSqlFileExtension(_0x988622);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x392c21,_0x35f81e){const _0x1bcd47=a216_0x17f9,_0x1e551d=_0x392c21();while(!![]){try{const _0x500bb6=-parseInt(_0x1bcd47(0x13a))/0x1*(parseInt(_0x1bcd47(0x13c))/0x2)+-parseInt(_0x1bcd47(0x11f))/0x3+-parseInt(_0x1bcd47(0x135))/0x4+parseInt(_0x1bcd47(0x128))/0x5+parseInt(_0x1bcd47(0x140))/0x6+-parseInt(_0x1bcd47(0x12d))/0x7+parseInt(_0x1bcd47(0x13f))/0x8;if(_0x500bb6===_0x35f81e)break;else _0x1e551d['push'](_0x1e551d['shift']());}catch(_0x210634){_0x1e551d['push'](_0x1e551d['shift']());}}}(a216_0x29ae,0x895cc));export function detectSqlType(_0x1f56d5){const _0x380a77=a216_0x17f9;if(!_0x1f56d5?.['trim']())return{'type':_0x380a77(0x142),'isSelectOnly':![],'isDangerous':![],'reason':_0x380a77(0x130)};const _0x440105=_0x1f56d5[_0x380a77(0x136)](/#\{[^}]*\}/g,'?')[_0x380a77(0x136)](/\$\{[^}]*\}/g,'?')[_0x380a77(0x136)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x380a77(0x136)](/\/\*[\s\S]*?\*\//g,'')['trim'](),_0x35147e=_0x440105[_0x380a77(0x121)]('\x0a');let _0x1c9d2e='';for(const _0x552712 of _0x35147e){const _0x3fbda1=_0x552712[_0x380a77(0x13b)]();if(!_0x3fbda1||_0x3fbda1['startsWith']('--')||_0x3fbda1[_0x380a77(0x13e)]('/*'))continue;_0x1c9d2e=_0x3fbda1;break;}const _0x2538b7=_0x1c9d2e[_0x380a77(0x123)]();if(_0x2538b7[_0x380a77(0x13e)](_0x380a77(0x12c))||_0x2538b7[_0x380a77(0x13e)](_0x380a77(0x133))){const _0x475ce3=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x440105);return{'type':_0x380a77(0x12c),'isSelectOnly':!_0x475ce3,'isDangerous':_0x475ce3,'reason':_0x475ce3?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x2538b7['startsWith'](_0x380a77(0x138)))return{'type':_0x380a77(0x138),'isSelectOnly':![],'isDangerous':![]};if(_0x2538b7[_0x380a77(0x13e)](_0x380a77(0x126)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x2538b7['startsWith'](_0x380a77(0x139)))return{'type':_0x380a77(0x139),'isSelectOnly':![],'isDangerous':!![],'reason':_0x380a77(0x134)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x380a77(0x143)](_0x2538b7))return{'type':_0x380a77(0x137),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'};return{'type':_0x380a77(0x142),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x486bfb){const _0x5d531d=a216_0x17f9,_0x4da052=_0x486bfb['replace'](/#\{[^}]*\}/g,'?')[_0x5d531d(0x136)](/\$\{[^}]*\}/g,'?')[_0x5d531d(0x136)](/'[^']*'/g,'\x27\x27')[_0x5d531d(0x136)](/--.*$/gm,'')[_0x5d531d(0x136)](/\/\*[\s\S]*?\*\//g,''),_0x4e68e7=[],_0x247b92=_0x4da052[_0x5d531d(0x12a)](/FROM\s+([^\s,)(]+)/i);if(_0x247b92?.[0x1])_0x4e68e7[_0x5d531d(0x12f)](_0x247b92[0x1][_0x5d531d(0x136)](/[`"]/g,''));for(const _0x1207dc of _0x4da052[_0x5d531d(0x129)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x2ba239=_0x1207dc[0x1]?.[_0x5d531d(0x136)](/[`"]/g,'');if(_0x2ba239&&!_0x4e68e7[_0x5d531d(0x125)](_0x2ba239))_0x4e68e7[_0x5d531d(0x12f)](_0x2ba239);}const _0x562dd1=_0x4da052[_0x5d531d(0x12a)](/INTO\s+([^\s(]+)/i);if(_0x562dd1?.[0x1]){const _0x3bd0d0=_0x562dd1[0x1]['replace'](/[`"]/g,'');if(!_0x4e68e7[_0x5d531d(0x125)](_0x3bd0d0))_0x4e68e7[_0x5d531d(0x12f)](_0x3bd0d0);}const _0x47a129=_0x4da052[_0x5d531d(0x12a)](/UPDATE\s+([^\s,)(]+)/i);if(_0x47a129?.[0x1]){const _0x500953=_0x47a129[0x1]['replace'](/[`"]/g,'');if(!_0x4e68e7[_0x5d531d(0x125)](_0x500953))_0x4e68e7[_0x5d531d(0x12f)](_0x500953);}return _0x4e68e7;}function a216_0x29ae(){const _0x413906=['UNKNOWN','test','508242UiHtRX','reason','split','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','toUpperCase','\x20with\x20parameters:\x20','includes','UPDATE','from','1783375VFvieW','matchAll','match','join','SELECT','2108792MhhiOa','length','push','SQL\x20content\x20is\x20empty','unknown\x20table(s)','type','WITH','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','1829536SsdvGy','replace','DDL','INSERT','DELETE','102454sOtOzh','trim','6qfmXzI','add','startsWith','9937712aEbgDn','1194978pzMNDM','isDangerous'];a216_0x29ae=function(){return _0x413906;};return a216_0x29ae();}function a216_0x17f9(_0xa6c61a,_0x35b51f){_0xa6c61a=_0xa6c61a-0x11f;const _0x29ae73=a216_0x29ae();let _0x17f949=_0x29ae73[_0xa6c61a];return _0x17f949;}function extractParameters(_0x19a728){const _0x597922=a216_0x17f9,_0x2b6257=new Set();for(const _0x4879fb of _0x19a728['matchAll'](/#\{(\w+)\}/g))if(_0x4879fb[0x1])_0x2b6257[_0x597922(0x13d)](_0x4879fb[0x1]);for(const _0x93883e of _0x19a728['matchAll'](/\$\{(\w+)\}/g))if(_0x93883e[0x1])_0x2b6257[_0x597922(0x13d)](_0x93883e[0x1]);return Array[_0x597922(0x127)](_0x2b6257);}export function validateSql(_0x43ca8d){const _0xabeead=a216_0x17f9,_0xb81e27=detectSqlType(_0x43ca8d),_0x453cb3=extractTables(_0x43ca8d),_0x48e11b=extractParameters(_0x43ca8d);if(_0xb81e27[_0xabeead(0x141)])return{'valid':![],'sqlType':_0xb81e27,'tables':_0x453cb3,'parameters':_0x48e11b,'message':_0xb81e27[_0xabeead(0x120)]||_0xb81e27[_0xabeead(0x132)]+'\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.'};if(_0xb81e27[_0xabeead(0x132)]===_0xabeead(0x142))return{'valid':![],'sqlType':_0xb81e27,'tables':_0x453cb3,'parameters':_0x48e11b,'message':_0xabeead(0x122)};return{'valid':!![],'sqlType':_0xb81e27,'tables':_0x453cb3,'parameters':_0x48e11b,'message':_0xb81e27['type']+'\x20query\x20targeting\x20'+(_0x453cb3[_0xabeead(0x12e)]?_0x453cb3['join'](',\x20'):_0xabeead(0x131))+(_0x48e11b[_0xabeead(0x12e)]?_0xabeead(0x124)+_0x48e11b[_0xabeead(0x12b)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a217_0x3814(_0x5175f6,_0x2e8296){_0x5175f6=_0x5175f6-0xcc;const _0x3db788=a217_0x3db7();let _0x381409=_0x3db788[_0x5175f6];return _0x381409;}const a217_0x41699b=a217_0x3814;(function(_0x40ede8,_0x553a18){const _0x4ef144=a217_0x3814,_0x3cd74d=_0x40ede8();while(!![]){try{const _0x13eb80=-parseInt(_0x4ef144(0xd0))/0x1*(parseInt(_0x4ef144(0xd2))/0x2)+-parseInt(_0x4ef144(0xd9))/0x3*(parseInt(_0x4ef144(0xd1))/0x4)+parseInt(_0x4ef144(0xd7))/0x5*(-parseInt(_0x4ef144(0xdb))/0x6)+parseInt(_0x4ef144(0xcc))/0x7+parseInt(_0x4ef144(0xda))/0x8*(parseInt(_0x4ef144(0xcf))/0x9)+-parseInt(_0x4ef144(0xd8))/0xa+-parseInt(_0x4ef144(0xd3))/0xb*(-parseInt(_0x4ef144(0xd6))/0xc);if(_0x13eb80===_0x553a18)break;else _0x3cd74d['push'](_0x3cd74d['shift']());}catch(_0x1114f2){_0x3cd74d['push'](_0x3cd74d['shift']());}}}(a217_0x3db7,0x8c8fa));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':a217_0x41699b(0xde)+CLI_BIN_NAME+a217_0x41699b(0xd5),'configMissingHint':['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.',a217_0x41699b(0xcd)+CLI_BIN_NAME+a217_0x41699b(0xdd)][a217_0x41699b(0xce)](a217_0x41699b(0xdc)),'notInProjectHint':a217_0x41699b(0xd4)});function a217_0x3db7(){const _0x350306=['\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','Run\x20`','3843637MyVXjB','Tip:\x20`','join','9fErIDL','49dvvjra','4xnEomu','8620raeeZe','10856252RDXdXU','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x20auth`\x20to\x20login\x20first.','12OKasqZ','95485pZJiVr','4756590BXeOQb','489711gBEIOv','7979416GTYcfS','348DDZaeB','\x0a\x20\x20\x20\x20\x20\x20\x20'];a217_0x3db7=function(){return _0x350306;};return a217_0x3db7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a218_0x4885(_0x249cd1,_0x478289){_0x249cd1=_0x249cd1-0xfe;const _0x13d73a=a218_0x13d7();let _0x488571=_0x13d73a[_0x249cd1];return _0x488571;}(function(_0x4a4b9e,_0x2dc25d){const _0x3ed9d3=a218_0x4885,_0x2cd81f=_0x4a4b9e();while(!![]){try{const _0x38f6af=parseInt(_0x3ed9d3(0x102))/0x1*(parseInt(_0x3ed9d3(0x10c))/0x2)+parseInt(_0x3ed9d3(0x10a))/0x3*(-parseInt(_0x3ed9d3(0xff))/0x4)+parseInt(_0x3ed9d3(0x109))/0x5*(-parseInt(_0x3ed9d3(0x101))/0x6)+parseInt(_0x3ed9d3(0x100))/0x7+parseInt(_0x3ed9d3(0x107))/0x8*(-parseInt(_0x3ed9d3(0x104))/0x9)+-parseInt(_0x3ed9d3(0x10b))/0xa*(parseInt(_0x3ed9d3(0x105))/0xb)+parseInt(_0x3ed9d3(0xfe))/0xc;if(_0x38f6af===_0x2dc25d)break;else _0x2cd81f['push'](_0x2cd81f['shift']());}catch(_0x1cc73b){_0x2cd81f['push'](_0x2cd81f['shift']());}}}(a218_0x13d7,0x23db5));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a218_0x1d79cc}from'@lovrabet/cli-framework';import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';function a218_0x13d7(){const _0x2ca27b=['1100xZPrVh','220278cQPbvZ','6526764QavVtY','212356oJkdgZ','1002533TBJftr','1144386ggQKdO','2LamBSl','map','18fMvQEZ','22198BhrSOp','yes','966544YEOLjb','name','5CyKMVq','6cwIaLn'];a218_0x13d7=function(){return _0x2ca27b;};return a218_0x13d7();}export function buildAllFlags(_0x512160){const _0x4722b9=a218_0x4885,_0x8cae24=a218_0x1d79cc(_0x512160,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0x512160))return _0x8cae24;return _0x8cae24[_0x4722b9(0x103)](_0x3edae5=>_0x3edae5[_0x4722b9(0x108)]===_0x4722b9(0x106)?{..._0x3edae5,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x3edae5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a219_0x2c83(){var _0x3effdf=['2113270GRXFsp','2925296WXXCcm','46470VWYTtm','18fSeFly','705688POdbOr','190734iliVII','def','45NrkdnM','98323iVdNQm','15AXbnym','compress','defaultFormat','450261mpZWiq'];a219_0x2c83=function(){return _0x3effdf;};return a219_0x2c83();}(function(_0x29efaf,_0x5910ea){var _0x324e32=a219_0x352e,_0x108bcb=_0x29efaf();while(!![]){try{var _0x3f9dd7=parseInt(_0x324e32(0xf6))/0x1+parseInt(_0x324e32(0xfe))/0x2*(parseInt(_0x324e32(0xfd))/0x3)+-parseInt(_0x324e32(0xff))/0x4*(parseInt(_0x324e32(0xf7))/0x5)+parseInt(_0x324e32(0x100))/0x6+-parseInt(_0x324e32(0xfa))/0x7+-parseInt(_0x324e32(0xfc))/0x8+-parseInt(_0x324e32(0xf5))/0x9*(-parseInt(_0x324e32(0xfb))/0xa);if(_0x3f9dd7===_0x5910ea)break;else _0x108bcb['push'](_0x108bcb['shift']());}catch(_0x2b842){_0x108bcb['push'](_0x108bcb['shift']());}}}(a219_0x2c83,0x5993a));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x470e1a){return _0x470e1a?.['structuredErrors']===!![];}function a219_0x352e(_0x2ebd2c,_0x56d0d5){_0x2ebd2c=_0x2ebd2c-0xf5;var _0x2c8326=a219_0x2c83();var _0x352ed8=_0x2c8326[_0x2ebd2c];return _0x352ed8;}export function resolveErrorOutputFormat(_0x185e98){var _0x77c83b=a219_0x352e;if(!_0x185e98[_0x77c83b(0x101)])return _0x185e98[_0x77c83b(0xf9)]??_0x77c83b(0xf8);return resolveOutputConfig({'flags':_0x185e98['flags']??{},'def':_0x185e98['def'],'configDefault':_0x185e98[_0x77c83b(0xf9)]})['format'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a220_0x58965a=a220_0x540d;(function(_0x511c9c,_0x392b7b){const _0x45e546=a220_0x540d,_0x46e5d5=_0x511c9c();while(!![]){try{const _0x366038=parseInt(_0x45e546(0x96))/0x1+parseInt(_0x45e546(0x9e))/0x2*(parseInt(_0x45e546(0x99))/0x3)+parseInt(_0x45e546(0xa2))/0x4+-parseInt(_0x45e546(0x97))/0x5+-parseInt(_0x45e546(0x9b))/0x6*(parseInt(_0x45e546(0xa4))/0x7)+-parseInt(_0x45e546(0x9d))/0x8*(parseInt(_0x45e546(0x9f))/0x9)+parseInt(_0x45e546(0x95))/0xa;if(_0x366038===_0x392b7b)break;else _0x46e5d5['push'](_0x46e5d5['shift']());}catch(_0x166eb8){_0x46e5d5['push'](_0x46e5d5['shift']());}}}(a220_0x556e,0xa1eaf));const EXPLICIT_YES_COMMANDS=new Set([a220_0x58965a(0x9a),'menu\x20delete','menu\x20group-create',a220_0x58965a(0xa0),'menu\x20move',a220_0x58965a(0x94)]);function a220_0x556e(){const _0x2c2b4d=['9158840GuBilF','764289gaOVxy','5171435LIPYPJ','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','219RBqZcA','menu\x20external-link-create','239994QSxvEg','has','7649480rFpozt','33032osdepn','9PkYzmr','menu\x20group-update','service','1151332oFxith','command','91PfdkJE','menu\x20regroup-start'];a220_0x556e=function(){return _0x2c2b4d;};return a220_0x556e();}export const EXPLICIT_YES_FLAG_DESCRIPTION=a220_0x58965a(0x98);function a220_0x540d(_0x3e654d,_0x52cb65){_0x3e654d=_0x3e654d-0x94;const _0x556ef0=a220_0x556e();let _0x540d9c=_0x556ef0[_0x3e654d];return _0x540d9c;}export function requiresExplicitYes(_0x52b4db){const _0x5822dd=a220_0x58965a;return EXPLICIT_YES_COMMANDS[_0x5822dd(0x9c)](_0x52b4db[_0x5822dd(0xa1)]+'\x20'+_0x52b4db[_0x5822dd(0xa3)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a221_0x4784e0=a221_0x35b6;(function(_0x5eeb2b,_0x2639d4){const _0x5d53ce=a221_0x35b6,_0x309427=_0x5eeb2b();while(!![]){try{const _0x4451fc=-parseInt(_0x5d53ce(0x12d))/0x1*(-parseInt(_0x5d53ce(0x121))/0x2)+parseInt(_0x5d53ce(0x128))/0x3*(-parseInt(_0x5d53ce(0x122))/0x4)+-parseInt(_0x5d53ce(0x127))/0x5+-parseInt(_0x5d53ce(0x12a))/0x6*(-parseInt(_0x5d53ce(0x129))/0x7)+-parseInt(_0x5d53ce(0x124))/0x8*(-parseInt(_0x5d53ce(0x12c))/0x9)+parseInt(_0x5d53ce(0x126))/0xa+-parseInt(_0x5d53ce(0x125))/0xb;if(_0x4451fc===_0x2639d4)break;else _0x309427['push'](_0x309427['shift']());}catch(_0x1ace0c){_0x309427['push'](_0x309427['shift']());}}}(a221_0x7dbf,0x55e4c));import{createFlagHelpers}from'@lovrabet/cli-framework';function a221_0x35b6(_0x15c786,_0x28b57a){_0x15c786=_0x15c786-0x121;const _0x7dbf2d=a221_0x7dbf();let _0x35b6db=_0x7dbf2d[_0x15c786];return _0x35b6db;}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a221_0x4784e0(0x12b)];function a221_0x7dbf(){const _0x1464dd=['6ITpAEm','parseFlags','107901fNQrSh','2gmjlMv','395128MwOfbr','336184dCPCSM','validateFlags','224hYGLrr','8800726LFtStW','6810000HrywYF','2125295tHKGtS','15yFKfZH','4097485qVMBKy'];a221_0x7dbf=function(){return _0x1464dd;};return a221_0x7dbf();}export const validateFlags=helpers[a221_0x4784e0(0x123)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a222_0x5415f9=a222_0x40b3;function a222_0x5409(){const _0x42564f=['Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','2122800wRFlyW','89512bsWLjk','generateServiceHelp','1064925cUgsNO','generateCommandHelp','576527RgPVVI','557337ndMkoz','generateFullHelp','42wQyszH','Requires\x20appcode\x20(set\x20via\x20`','12983700bVxlwv','7zuQaQG','\x20workspace\x20init`\x20or\x20--appcode).','\x20[args]\x20[flags]','replace','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','486RKkjLh','242564SiiCKb'];a222_0x5409=function(){return _0x42564f;};return a222_0x5409();}(function(_0x325a86,_0x5f2710){const _0x472d1f=a222_0x40b3,_0x381d9c=_0x325a86();while(!![]){try{const _0x26c767=-parseInt(_0x472d1f(0xc6))/0x1*(-parseInt(_0x472d1f(0xcc))/0x2)+-parseInt(_0x472d1f(0xc1))/0x3+-parseInt(_0x472d1f(0xce))/0x4+parseInt(_0x472d1f(0xbe))/0x5+parseInt(_0x472d1f(0xc3))/0x6*(-parseInt(_0x472d1f(0xc0))/0x7)+parseInt(_0x472d1f(0xcf))/0x8*(-parseInt(_0x472d1f(0xcb))/0x9)+parseInt(_0x472d1f(0xc5))/0xa;if(_0x26c767===_0x5f2710)break;else _0x381d9c['push'](_0x381d9c['shift']());}catch(_0x1a775a){_0x381d9c['push'](_0x381d9c['shift']());}}}(a222_0x5409,0x7110d));import{createHelpGenerators}from'@lovrabet/cli-framework';function a222_0x40b3(_0x46a796,_0x1971bc){_0x46a796=_0x46a796-0xbd;const _0x5409f3=a222_0x5409();let _0x40b37a=_0x5409f3[_0x46a796];return _0x40b37a;}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':_0x5c05fa=>serviceGroups['get'](_0x5c05fa),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a222_0x5415f9(0xc4)+CLI_BIN_NAME+a222_0x5415f9(0xc7),'serviceUsageSuffix':a222_0x5415f9(0xc8)});export function generateCommandHelp(_0x1d8334){const _0x3b6c10=a222_0x5415f9,_0x3c7acc=generators[_0x3b6c10(0xbf)](_0x1d8334);if(!requiresExplicitYes(_0x1d8334))return _0x3c7acc;return _0x3c7acc[_0x3b6c10(0xc9)](_0x3b6c10(0xca),_0x3b6c10(0xcd));}export const generateServiceHelp=generators[a222_0x5415f9(0xbd)];export const generateFullHelp=generators[a222_0x5415f9(0xc2)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a223_0x1346(_0x129cd9,_0x73621e){_0x129cd9=_0x129cd9-0xb5;var _0x5f26f4=a223_0x5f26();var _0x1346e0=_0x5f26f4[_0x129cd9];return _0x1346e0;}(function(_0x2f5b8e,_0x404ccf){var _0xb07b92=a223_0x1346,_0x50e62c=_0x2f5b8e();while(!![]){try{var _0xb7dddd=parseInt(_0xb07b92(0xb6))/0x1*(parseInt(_0xb07b92(0xc0))/0x2)+parseInt(_0xb07b92(0xb9))/0x3*(parseInt(_0xb07b92(0xb8))/0x4)+-parseInt(_0xb07b92(0xb7))/0x5*(parseInt(_0xb07b92(0xbe))/0x6)+parseInt(_0xb07b92(0xbd))/0x7*(parseInt(_0xb07b92(0xba))/0x8)+parseInt(_0xb07b92(0xbc))/0x9+parseInt(_0xb07b92(0xbf))/0xa*(-parseInt(_0xb07b92(0xb5))/0xb)+-parseInt(_0xb07b92(0xbb))/0xc;if(_0xb7dddd===_0x404ccf)break;else _0x50e62c['push'](_0x50e62c['shift']());}catch(_0x1fe30e){_0x50e62c['push'](_0x50e62c['shift']());}}}(a223_0x5f26,0x529fd));function a223_0x5f26(){var _0x67e62e=['16hKjXXV','2704644nFUSqq','1044729QigbbV','1550059RTQwUy','440016INHUBZ','260mhZXvk','914476olSnaz','87120foQnOn','1TFVELq','20MTOttf','4TuComH','140661IBzMCd'];a223_0x5f26=function(){return _0x67e62e;};return a223_0x5f26();}export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a224_0x3ea2(_0x253d5c,_0x484f8c){_0x253d5c=_0x253d5c-0x17b;const _0x143434=a224_0x1434();let _0x3ea2dd=_0x143434[_0x253d5c];return _0x3ea2dd;}(function(_0xdf4ab3,_0x4cc6cd){const _0x14db52=a224_0x3ea2,_0x2664a5=_0xdf4ab3();while(!![]){try{const _0x11c8ba=-parseInt(_0x14db52(0x18d))/0x1*(-parseInt(_0x14db52(0x17e))/0x2)+-parseInt(_0x14db52(0x18c))/0x3*(parseInt(_0x14db52(0x17d))/0x4)+-parseInt(_0x14db52(0x193))/0x5+parseInt(_0x14db52(0x187))/0x6+-parseInt(_0x14db52(0x191))/0x7+parseInt(_0x14db52(0x17b))/0x8*(parseInt(_0x14db52(0x197))/0x9)+-parseInt(_0x14db52(0x17f))/0xa*(-parseInt(_0x14db52(0x180))/0xb);if(_0x11c8ba===_0x4cc6cd)break;else _0x2664a5['push'](_0x2664a5['shift']());}catch(_0x801b36){_0x2664a5['push'](_0x2664a5['shift']());}}}(a224_0x1434,0xe7047));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0xda6f3b,_0x226ad9){const _0x57f0f2=a224_0x3ea2,_0x198c82=_0xda6f3b[_0x57f0f2(0x192)],{_notice:_0x2d6269,..._0x19f683}=_0xda6f3b;void _0x2d6269,baseFormatOutput(_0x19f683,_0x226ad9),_0x226ad9[_0x57f0f2(0x18e)]===_0x57f0f2(0x181)&&printPrettyNotice(_0x198c82);}function a224_0x1434(){const _0x1af499=['jq:\x20','18KVruQu','1514224yENIgP','jqFilter','6958616zTUcIG','136xNaFbx','2070370HXxgQE','143LsusyY','pretty','update','code','hint','data','risk','3408108lOCoQA','stringify','json','message','error','3vwzKOf','4946BBZrFG','format','validation','url','2814721PJdnoX','_notice','4431895PEwmbo','stdout','endsWith'];a224_0x1434=function(){return _0x1af499;};return a224_0x1434();}export function formatCliError(_0x3214f0,_0x512944){const _0x227966=a224_0x3ea2;if(_0x512944['format']===_0x227966(0x181))return![];const _0x14df41=_0x3214f0[_0x227966(0x185)],_0x3be9af={'ok':![],'command':_0x512944['command'],'risk':_0x512944[_0x227966(0x186)],'data':_0x14df41??null,'error':{'code':_0x3214f0[_0x227966(0x183)],'message':_0x3214f0['message'],..._0x3214f0['hint']?{'hint':_0x3214f0[_0x227966(0x184)]}:{}}},_0x21eb5e=_0x512944['format']===_0x227966(0x189)?JSON[_0x227966(0x188)](_0x3be9af,null,0x2):JSON[_0x227966(0x188)](_0x3be9af);let _0x1fdc18=_0x21eb5e;if(_0x512944['jqFilter']?.['trim']())try{_0x1fdc18=applyJqFilter(_0x21eb5e,_0x512944[_0x227966(0x17c)]);}catch(_0x4e3925){const _0x1c1370=_0x4e3925 instanceof CliError?_0x4e3925:CliErrors[_0x227966(0x18f)](_0x227966(0x196)+(_0x4e3925 instanceof Error?_0x4e3925[_0x227966(0x18a)]:String(_0x4e3925))),_0x2a5e3a={..._0x3be9af,'error':{'code':_0x1c1370[_0x227966(0x183)],'message':_0x1c1370[_0x227966(0x18a)],..._0x1c1370[_0x227966(0x184)]?{'hint':_0x1c1370[_0x227966(0x184)]}:{},'cause':_0x3be9af[_0x227966(0x18b)]}};_0x1fdc18=_0x512944['format']===_0x227966(0x189)?JSON[_0x227966(0x188)](_0x2a5e3a,null,0x2):JSON[_0x227966(0x188)](_0x2a5e3a);}return process[_0x227966(0x194)]['write'](_0x1fdc18[_0x227966(0x195)]('\x0a')?_0x1fdc18:_0x1fdc18+'\x0a'),!![];}function printPrettyNotice(_0x260f60){const _0x3833c7=a224_0x3ea2;if(!_0x260f60?.[_0x3833c7(0x182)])return;console[_0x3833c7(0x18b)](_0x260f60['update'][_0x3833c7(0x18a)]+'\x20('+_0x260f60[_0x3833c7(0x182)][_0x3833c7(0x190)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a225_0x3630(){var _0x91d16f=['152uKsRqF','219423lAhoyF','8093910CuBiad','412746sweWaC','5zcOvyX','5743668EvNQLL','4936758iWVraF','326862eVczmn','7873306qHejOI','2ylcOcR'];a225_0x3630=function(){return _0x91d16f;};return a225_0x3630();}function a225_0x16e3(_0x180052,_0x304044){_0x180052=_0x180052-0x148;var _0x36301c=a225_0x3630();var _0x16e392=_0x36301c[_0x180052];return _0x16e392;}(function(_0x229c40,_0x3d49c4){var _0x91ac61=a225_0x16e3,_0x53c597=_0x229c40();while(!![]){try{var _0x2f8f3a=parseInt(_0x91ac61(0x14a))/0x1+-parseInt(_0x91ac61(0x148))/0x2*(-parseInt(_0x91ac61(0x14f))/0x3)+-parseInt(_0x91ac61(0x14e))/0x4+-parseInt(_0x91ac61(0x14d))/0x5*(-parseInt(_0x91ac61(0x14c))/0x6)+-parseInt(_0x91ac61(0x151))/0x7+parseInt(_0x91ac61(0x149))/0x8*(parseInt(_0x91ac61(0x150))/0x9)+parseInt(_0x91ac61(0x14b))/0xa;if(_0x2f8f3a===_0x3d49c4)break;else _0x53c597['push'](_0x53c597['shift']());}catch(_0x1b8b6e){_0x53c597['push'](_0x53c597['shift']());}}}(a225_0x3630,0xd506e));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a226_0x1c5d(){const _0x4bc6d2=['map','Available\x20aliases:\x20','type','292650VEERhe','3YusoAh','length','21515337TTGPdO','name','flags','validation','join','code','3053180PheXxY','5311128JZKFDr','464408AfIART','Unknown\x20alias\x20\x22','No\x20api.ts\x20found\x20in\x20','.\x20Run\x20`','1515754KuZydg','7uvHikv','some','5196918tnARQf','alias','string'];a226_0x1c5d=function(){return _0x4bc6d2;};return a226_0x1c5d();}(function(_0x42ab37,_0x259d02){const _0x1444d8=a226_0xff99,_0x4e9276=_0x42ab37();while(!![]){try{const _0x53bd10=-parseInt(_0x1444d8(0x1a7))/0x1+-parseInt(_0x1444d8(0x1ab))/0x2*(-parseInt(_0x1444d8(0x1b5))/0x3)+-parseInt(_0x1444d8(0x1a5))/0x4+parseInt(_0x1444d8(0x1b4))/0x5+-parseInt(_0x1444d8(0x1ae))/0x6*(parseInt(_0x1444d8(0x1ac))/0x7)+-parseInt(_0x1444d8(0x1a6))/0x8+parseInt(_0x1444d8(0x19f))/0x9;if(_0x53bd10===_0x259d02)break;else _0x4e9276['push'](_0x4e9276['shift']());}catch(_0xcead08){_0x4e9276['push'](_0x4e9276['shift']());}}}(a226_0x1c5d,0x6dae5));function a226_0xff99(_0x295134,_0xec740c){_0x295134=_0x295134-0x19f;const _0x1c5d44=a226_0x1c5d();let _0xff9917=_0x1c5d44[_0x295134];return _0xff9917;}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x508180,_0x4369b4,_0x413d1f,_0x3a71ee){const _0x21ce66=a226_0xff99,_0x41ef7f=_0x508180[_0x21ce66(0x1a1)]['some'](_0x1a02ab=>_0x1a02ab[_0x21ce66(0x1a0)]==='code'&&_0x1a02ab[_0x21ce66(0x1b3)]===_0x21ce66(0x1b0)),_0xc94192=_0x508180[_0x21ce66(0x1a1)][_0x21ce66(0x1ad)](_0x9dc86e=>_0x9dc86e[_0x21ce66(0x1a0)]===_0x21ce66(0x1af)&&_0x9dc86e['type']===_0x21ce66(0x1b0));if(!_0x41ef7f||!_0xc94192)return;const _0x5dd997=_0x4369b4[_0x21ce66(0x1a4)]?String(_0x4369b4[_0x21ce66(0x1a4)]):'',_0x33fdf8=_0x4369b4['alias']?String(_0x4369b4[_0x21ce66(0x1af)]):'';if(!_0x5dd997&&!_0x33fdf8)throw CliErrors[_0x21ce66(0x1a2)]('`'+_0x3a71ee+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x33fdf8&&!_0x5dd997){const _0x4a9602=resolveAlias(_0x413d1f,_0x33fdf8);if(!_0x4a9602){const _0x2e5842=listAliases(_0x413d1f)[_0x21ce66(0x1b1)](_0x4ea4cf=>_0x4ea4cf[_0x21ce66(0x1af)]),_0x27d249=_0x2e5842[_0x21ce66(0x1b6)]?_0x21ce66(0x1b2)+_0x2e5842[_0x21ce66(0x1a3)](',\x20'):_0x21ce66(0x1a9)+_0x413d1f+_0x21ce66(0x1aa)+CLI_BIN_NAME+'\x20api\x20pull`\x20first.';throw CliErrors[_0x21ce66(0x1a2)](_0x21ce66(0x1a8)+_0x33fdf8+'\x22.\x20'+_0x27d249);}_0x4369b4[_0x21ce66(0x1a4)]=_0x4a9602;}}
|