@lovrabet/rabetbase-cli 2.3.10-beta.1 → 2.3.10-beta.2
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 -0
- 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/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
|
-
(function(_0xb97686,_0x131129){const _0x38fb82=a207_0x5a50,_0x1fef19=_0xb97686();while(!![]){try{const _0xa3b0f5=parseInt(_0x38fb82(0x154))/0x1*(parseInt(_0x38fb82(0x15a))/0x2)+parseInt(_0x38fb82(0x17b))/0x3*(-parseInt(_0x38fb82(0x183))/0x4)+parseInt(_0x38fb82(0x158))/0x5+-parseInt(_0x38fb82(0x194))/0x6*(-parseInt(_0x38fb82(0x18f))/0x7)+-parseInt(_0x38fb82(0x188))/0x8*(-parseInt(_0x38fb82(0x156))/0x9)+parseInt(_0x38fb82(0x164))/0xa+-parseInt(_0x38fb82(0x16f))/0xb*(parseInt(_0x38fb82(0x15d))/0xc);if(_0xa3b0f5===_0x131129)break;else _0x1fef19['push'](_0x1fef19['shift']());}catch(_0x5d5c86){_0x1fef19['push'](_0x1fef19['shift']());}}}(a207_0x384a,0x344e4));export function auditSqlJoinIndexes(_0x2ef7de,_0x3e5145){const _0x394ce4=a207_0x5a50,_0x4649d9=[],_0x1827e1=extractJoinFacts(_0x2ef7de)[_0x394ce4(0x182)](_0x5a2c01=>{const _0x448a2c=_0x394ce4;if(_0x5a2c01[_0x448a2c(0x172)]||_0x5a2c01[_0x448a2c(0x192)]['length']===0x0)return _0x4649d9[_0x448a2c(0x18c)]({'code':_0x448a2c(0x195),'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01['columns'],'reason':_0x5a2c01['unsupportedReason']??_0x448a2c(0x177)}),{'table':_0x5a2c01['table'],'alias':_0x5a2c01['alias'],'columns':_0x5a2c01['columns'],'status':'unavailable'};const _0x5f2307=resolveTableMetadata(_0x3e5145,_0x5a2c01[_0x448a2c(0x189)]),_0x214e91=(_0x5f2307?.[_0x448a2c(0x190)]??[])[_0x448a2c(0x182)](_0x233ac7=>({'index':_0x233ac7,'matchedPrefix':findEqualityPrefix(_0x233ac7['columns'],_0x5a2c01[_0x448a2c(0x192)])}))[_0x448a2c(0x166)](_0x3c6443=>_0x3c6443['matchedPrefix']['length']>0x0),_0x4b5207=_0x214e91[_0x448a2c(0x186)]((_0x5d11e8,_0x127bae)=>!_0x5d11e8||_0x127bae[_0x448a2c(0x187)][_0x448a2c(0x167)]>_0x5d11e8[_0x448a2c(0x187)][_0x448a2c(0x167)]?_0x127bae:_0x5d11e8,_0x214e91[0x0]);if(_0x4b5207)return{'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01['alias'],'columns':_0x5a2c01[_0x448a2c(0x192)],'status':_0x448a2c(0x179),'matchedIndex':{..._0x4b5207['index'],'matchedPrefix':_0x4b5207['matchedPrefix']}};const _0x5a829f=_0x5f2307?.['indexes'][_0x448a2c(0x166)](_0x4213a1=>_0x4213a1['columns'][_0x448a2c(0x159)](_0xfc5342=>_0x5a2c01[_0x448a2c(0x192)][_0x448a2c(0x159)](_0x5d0950=>columnNamesMatch(_0xfc5342,_0x5d0950))))??[];if(_0x5a829f['length']>0x0)return _0x4649d9[_0x448a2c(0x18c)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01[_0x448a2c(0x192)],'reason':_0x448a2c(0x193)}),{'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01[_0x448a2c(0x192)],'status':'warning','candidateIndexes':_0x5a829f};if(_0x5f2307&&_0x5f2307['metadataAvailable']!==![]&&_0x5f2307[_0x448a2c(0x190)][_0x448a2c(0x167)]>0x0&&_0x5a2c01[_0x448a2c(0x192)][_0x448a2c(0x167)]>0x0)return _0x4649d9[_0x448a2c(0x18c)]({'code':_0x448a2c(0x15b),'table':_0x5a2c01['table'],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01[_0x448a2c(0x192)],'reason':_0x448a2c(0x185)}),{'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01['alias'],'columns':_0x5a2c01[_0x448a2c(0x192)],'status':'warning'};return _0x4649d9['push']({'code':_0x448a2c(0x152),'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01[_0x448a2c(0x192)],'reason':_0x5f2307?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x5a2c01[_0x448a2c(0x189)],'alias':_0x5a2c01[_0x448a2c(0x18a)],'columns':_0x5a2c01[_0x448a2c(0x192)],'status':_0x448a2c(0x18e)};});return{'checked':_0x1827e1[_0x394ce4(0x167)]>0x0,'joins':_0x1827e1,'warnings':_0x4649d9};}function extractJoinFacts(_0x5d7416){const _0x4c2676=a207_0x5a50,_0x39c765=maskNestedQueries(stripSqlNoise(_0x5d7416)),_0x50eea8=maskQuotedIdentifiers(_0x39c765),_0x2ef8c0=[],_0x58dbe1=new Set(),_0x124ea0=/\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 _0x4a83ae of _0x39c765[_0x4c2676(0x15f)](_0x124ea0)){const _0x3296ae=_0x4a83ae[_0x4c2676(0x160)]??0x0,_0x491f42=_0x4a83ae[0x0]['search'](/\bJOIN\b/i),_0x28ca3a=_0x3296ae+Math[_0x4c2676(0x17f)](0x0,_0x491f42);if(!/^JOIN\b/i[_0x4c2676(0x157)](_0x50eea8[_0x4c2676(0x169)](_0x28ca3a)))continue;_0x58dbe1[_0x4c2676(0x17c)](_0x28ca3a);const _0xf1aca3=normalizeIdentifier(_0x4a83ae[0x1]||_0x4c2676(0x171)),_0x433666=normalizeIdentifier(_0x4a83ae[0x2]??''),_0x5e5cbc=normalizeIdentifier(_0x4a83ae[0x3]||_0x433666[_0x4c2676(0x153)]('.')['at'](-0x1)||_0x433666),_0x1ffc30=[],_0x134d7f=_0x433666===_0x4c2676(0x197);let _0x23107a=_0xf1aca3===_0x4c2676(0x184)||_0xf1aca3==='full'||_0x134d7f,_0x5176ab=_0x23107a?_0x134d7f?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0xf1aca3[_0x4c2676(0x165)]()+_0x4c2676(0x175):undefined;const _0x74719d=stripOuterParentheses(_0x4a83ae[0x4]??'');hasTopLevelKeyword(_0x74719d,'OR')&&(_0x23107a=!![],_0x5176ab??=_0x4c2676(0x180));for(const _0x56598b of splitTopLevelAnd(_0x74719d)){const _0x33d18f=stripOuterParentheses(_0x56598b);if(hasTopLevelKeyword(_0x33d18f,'OR')){_0x23107a=!![],_0x5176ab??=_0x4c2676(0x180);continue;}const _0x4b92dd=splitEquality(_0x33d18f);if(!_0x4b92dd){containsColumnReference(_0x56598b,_0x5e5cbc)&&(_0x23107a=!![]);continue;}const _0x2a893f=parseDirectColumnReference(_0x4b92dd[0x0],_0x5e5cbc),_0x2b3356=parseDirectColumnReference(_0x4b92dd[0x1],_0x5e5cbc),_0x1fbe4f=containsColumnReference(_0x4b92dd[0x0],_0x5e5cbc),_0x93cc13=containsColumnReference(_0x4b92dd[0x1],_0x5e5cbc),_0xf5a3a3=_0x2a893f&&!_0x93cc13?_0x2a893f:_0x2b3356&&!_0x1fbe4f?_0x2b3356:null;if(_0xf5a3a3&&!_0x1ffc30[_0x4c2676(0x161)](_0xf5a3a3))_0x1ffc30['push'](_0xf5a3a3);else!_0xf5a3a3&&containsColumnReference(_0x56598b,_0x5e5cbc)&&(_0x23107a=!![]);}_0x2ef8c0[_0x4c2676(0x18c)]({'table':_0x433666,'alias':_0x5e5cbc,'columns':_0x1ffc30,'unsupportedPredicate':_0x23107a,'unsupportedReason':_0x5176ab,'position':_0x28ca3a});}for(const _0xf84cf7 of _0x50eea8['matchAll'](/\bJOIN\b/gi)){const _0x1e0d5d=_0xf84cf7[_0x4c2676(0x160)]??0x0;if(_0x58dbe1[_0x4c2676(0x17d)](_0x1e0d5d))continue;const _0x40f99d=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0x39c765[_0x4c2676(0x169)](_0x1e0d5d+_0xf84cf7[0x0]['length'])),_0x1fd7cf=normalizeIdentifier(_0x40f99d?.[0x1]||_0x4c2676(0x196)),_0x33b7cf=normalizeIdentifier(_0x40f99d?.[0x2]||''),_0x5c874f=isSqlClauseKeyword(_0x33b7cf)?_0x1fd7cf[_0x4c2676(0x153)]('.')['at'](-0x1)||_0x1fd7cf:_0x33b7cf||_0x1fd7cf[_0x4c2676(0x153)]('.')['at'](-0x1)||_0x1fd7cf;_0x2ef8c0[_0x4c2676(0x18c)]({'table':_0x1fd7cf,'alias':_0x5c874f,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x4c2676(0x163),'position':_0x1e0d5d});}return _0x2ef8c0[_0x4c2676(0x15e)]((_0x35730d,_0x2c6256)=>_0x35730d[_0x4c2676(0x15c)]-_0x2c6256['position']);}function stripSqlNoise(_0x130248){const _0x4b0194=a207_0x5a50,_0x56d7de=Array[_0x4b0194(0x176)](_0x130248),_0x37b0a4=(_0x3ef0bf,_0x3fb3c4)=>{for(let _0x5b5a1e=_0x3ef0bf;_0x5b5a1e<_0x3fb3c4;_0x5b5a1e+=0x1){_0x56d7de[_0x5b5a1e]!=='\x0a'&&_0x56d7de[_0x5b5a1e]!=='\x0d'&&(_0x56d7de[_0x5b5a1e]='\x20');}};for(let _0x1cf488=0x0;_0x1cf488<_0x56d7de[_0x4b0194(0x167)];_0x1cf488+=0x1){const _0xa68546=_0x56d7de[_0x1cf488],_0x2abd5b=_0x56d7de[_0x1cf488+0x1];if(_0xa68546==='\x27'||_0xa68546==='\x22'||_0xa68546==='`'){const _0x3e1771=_0xa68546,_0x354b1e=_0x1cf488;_0x1cf488+=0x1;while(_0x1cf488<_0x56d7de['length']){if(_0x56d7de[_0x1cf488]==='\x5c'&&_0x1cf488+0x1<_0x56d7de[_0x4b0194(0x167)]){_0x1cf488+=0x2;continue;}if(_0x56d7de[_0x1cf488]!==_0x3e1771){_0x1cf488+=0x1;continue;}if(_0x56d7de[_0x1cf488+0x1]===_0x3e1771){_0x1cf488+=0x2;continue;}break;}if(_0x3e1771==='\x27')_0x37b0a4(_0x354b1e,Math[_0x4b0194(0x181)](_0x1cf488+0x1,_0x56d7de[_0x4b0194(0x167)]));continue;}if(_0xa68546==='-'&&_0x2abd5b==='-'){const _0x1478ac=_0x1cf488;while(_0x1cf488<_0x56d7de['length']&&_0x56d7de[_0x1cf488]!=='\x0a')_0x1cf488+=0x1;_0x37b0a4(_0x1478ac,_0x1cf488);continue;}if(_0xa68546==='/'&&_0x2abd5b==='*'){const _0x4fcbd1=_0x1cf488;_0x1cf488+=0x2;while(_0x1cf488<_0x56d7de['length']&&!(_0x56d7de[_0x1cf488]==='*'&&_0x56d7de[_0x1cf488+0x1]==='/')){_0x1cf488+=0x1;}_0x1cf488=Math[_0x4b0194(0x181)](_0x1cf488+0x1,_0x56d7de[_0x4b0194(0x167)]-0x1),_0x37b0a4(_0x4fcbd1,_0x1cf488+0x1);continue;}if(_0xa68546==='#'&&_0x2abd5b!=='{'){const _0x5755df=_0x1cf488;while(_0x1cf488<_0x56d7de[_0x4b0194(0x167)]&&_0x56d7de[_0x1cf488]!=='\x0a')_0x1cf488+=0x1;_0x37b0a4(_0x5755df,_0x1cf488);continue;}if((_0xa68546==='#'||_0xa68546==='$')&&_0x2abd5b==='{'){const _0x1bc1a9=_0x1cf488;_0x1cf488+=0x2;while(_0x1cf488<_0x56d7de['length']&&_0x56d7de[_0x1cf488]!=='}')_0x1cf488+=0x1;_0x37b0a4(_0x1bc1a9,Math[_0x4b0194(0x181)](_0x1cf488+0x1,_0x56d7de[_0x4b0194(0x167)]));}}return _0x56d7de[_0x4b0194(0x168)]('');}function maskQuotedIdentifiers(_0xb348d3){const _0x35fba9=a207_0x5a50,_0x902b5=Array[_0x35fba9(0x176)](_0xb348d3);for(let _0x47a24c=0x0;_0x47a24c<_0x902b5['length'];_0x47a24c+=0x1){const _0x2335b2=_0x902b5[_0x47a24c];if(_0x2335b2!=='\x22'&&_0x2335b2!=='`')continue;_0x47a24c+=0x1;while(_0x47a24c<_0x902b5['length']){if(_0x902b5[_0x47a24c]===_0x2335b2){if(_0x902b5[_0x47a24c+0x1]===_0x2335b2){_0x902b5[_0x47a24c]='\x20',_0x902b5[_0x47a24c+0x1]='\x20',_0x47a24c+=0x2;continue;}break;}_0x902b5[_0x47a24c]='\x20',_0x47a24c+=0x1;}}return _0x902b5['join']('');}function a207_0x384a(){const _0x30d322=['filter','length','join','slice','trim','\x5c$&','where','replace','left','8573169vKRVpv','toLowerCase','INNER','unsupportedPredicate','cross','(?:^|[^\x5cw$])','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','from','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','natural','covered','startsWith','48YZmWSM','add','has','tableName','max','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','min','map','47156djJtPv','right','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','reduce','matchedPrefix','6312UUfQkD','table','alias','using','push','match','unavailable','393190trJMTV','indexes','full','columns','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','30kVkaQX','JOIN_PREDICATE_UNSUPPORTED','unknown','__sq__','INDEX_METADATA_UNAVAILABLE','split','473hGalnW','exec','1269HHNRmr','test','629175igkQJp','some','1622cmRCXL','JOIN_INDEX_MISSING','position','12YygcUy','sort','matchAll','index','includes','endsWith','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','2807100jBQAVD','toUpperCase'];a207_0x384a=function(){return _0x30d322;};return a207_0x384a();}function maskNestedQueries(_0x4024d0){const _0x3b4f0c=a207_0x5a50,_0x391c59=Array[_0x3b4f0c(0x176)](_0x4024d0);for(let _0x1052ed=0x0;_0x1052ed<_0x391c59[_0x3b4f0c(0x167)];_0x1052ed+=0x1){if(_0x391c59[_0x1052ed]!=='(')continue;const _0x300864=_0x4024d0[_0x3b4f0c(0x169)](_0x1052ed+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x3b4f0c(0x157)](_0x300864))continue;let _0x5675af=0x1,_0x2ad06b=_0x1052ed+0x1;for(;_0x2ad06b<_0x391c59['length']&&_0x5675af>0x0;_0x2ad06b+=0x1){if(_0x391c59[_0x2ad06b]==='(')_0x5675af+=0x1;if(_0x391c59[_0x2ad06b]===')')_0x5675af-=0x1;}if(_0x5675af!==0x0)continue;for(let _0x3b685b=_0x1052ed;_0x3b685b<_0x2ad06b;_0x3b685b+=0x1){_0x391c59[_0x3b685b]='\x20';}const _0x185bcc=_0x3b4f0c(0x197);for(let _0x1f4006=0x0;_0x1f4006<_0x185bcc[_0x3b4f0c(0x167)]&&_0x1052ed+_0x1f4006<_0x2ad06b;_0x1f4006+=0x1){_0x391c59[_0x1052ed+_0x1f4006]=_0x185bcc[_0x1f4006];}_0x1052ed=_0x2ad06b-0x1;}return _0x391c59[_0x3b4f0c(0x168)]('');}function splitTopLevelAnd(_0x14efb8){const _0x3041f6=a207_0x5a50,_0x1ef7f8=[];let _0x2b9fca=0x0,_0x142a47=0x0;for(let _0x5620c4=0x0;_0x5620c4<_0x14efb8[_0x3041f6(0x167)];_0x5620c4+=0x1){const _0x28f76b=_0x14efb8[_0x5620c4];if(_0x28f76b==='(')_0x2b9fca+=0x1;if(_0x28f76b===')')_0x2b9fca=Math['max'](0x0,_0x2b9fca-0x1);_0x2b9fca===0x0&&_0x14efb8[_0x3041f6(0x169)](_0x5620c4)[_0x3041f6(0x18d)](/^AND\b/i)&&(_0x5620c4===0x0||/\s/[_0x3041f6(0x157)](_0x14efb8[_0x5620c4-0x1]??''))&&(_0x1ef7f8[_0x3041f6(0x18c)](_0x14efb8['slice'](_0x142a47,_0x5620c4)[_0x3041f6(0x16a)]()),_0x5620c4+=0x2,_0x142a47=_0x5620c4+0x1);}const _0x281076=_0x14efb8[_0x3041f6(0x169)](_0x142a47)[_0x3041f6(0x16a)]();if(_0x281076)_0x1ef7f8[_0x3041f6(0x18c)](_0x281076);return _0x1ef7f8;}function hasTopLevelKeyword(_0x430e18,_0x23cbad){const _0x26ee46=a207_0x5a50;let _0x147e35=0x0;for(let _0x1d4f82=0x0;_0x1d4f82<_0x430e18[_0x26ee46(0x167)];_0x1d4f82+=0x1){const _0x4e708a=_0x430e18[_0x1d4f82];if(_0x4e708a==='(')_0x147e35+=0x1;if(_0x4e708a===')')_0x147e35=Math['max'](0x0,_0x147e35-0x1);if(_0x147e35!==0x0)continue;const _0x37b805=_0x430e18[_0x26ee46(0x169)](_0x1d4f82,_0x1d4f82+_0x23cbad[_0x26ee46(0x167)]),_0x1e1771=_0x430e18[_0x1d4f82-0x1]??'\x20',_0x54f3f4=_0x430e18[_0x1d4f82+_0x23cbad[_0x26ee46(0x167)]]??'\x20';if(_0x37b805[_0x26ee46(0x165)]()===_0x23cbad[_0x26ee46(0x165)]()&&!/[\w$]/[_0x26ee46(0x157)](_0x1e1771)&&!/[\w$]/[_0x26ee46(0x157)](_0x54f3f4))return!![];}return![];}function splitEquality(_0x120d78){const _0x205509=a207_0x5a50,_0x2723c3=stripOuterParentheses(_0x120d78);let _0x2b862a=0x0,_0x5d3193;for(let _0x5553f0=0x0;_0x5553f0<_0x2723c3['length'];_0x5553f0+=0x1){const _0x44e421=_0x2723c3[_0x5553f0];if(_0x44e421==='(')_0x2b862a+=0x1;if(_0x44e421===')')_0x2b862a=Math[_0x205509(0x17f)](0x0,_0x2b862a-0x1);const _0x53a8f1=_0x2723c3[_0x5553f0-0x1]??'',_0x233b0a=_0x2723c3[_0x5553f0+0x1]??'';if(_0x44e421==='='&&_0x2b862a===0x0&&!/[!<>=:]/[_0x205509(0x157)](_0x53a8f1)&&_0x233b0a!=='='){if(_0x5d3193!==undefined)return null;_0x5d3193=_0x5553f0;}}return _0x5d3193===undefined?null:[_0x2723c3[_0x205509(0x169)](0x0,_0x5d3193)[_0x205509(0x16a)](),_0x2723c3['slice'](_0x5d3193+0x1)[_0x205509(0x16a)]()];}function parseDirectColumnReference(_0x577603,_0x1fe744){const _0x171b9b=a207_0x5a50,_0x54a9ff=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x171b9b(0x155)](stripOuterParentheses(_0x577603));if(!_0x54a9ff)return null;if(normalizeIdentifier(_0x54a9ff[0x1]??'')!==normalizeIdentifier(_0x1fe744))return null;return normalizeIdentifier(_0x54a9ff[0x2]??'');}function containsColumnReference(_0x2d782a,_0x1e8426){const _0x27839f=a207_0x5a50,_0x283ddd=_0x2d782a['replace'](/[`"]/g,''),_0x4bca4d=_0x1e8426[_0x27839f(0x16d)](/[.*+?^${}()|[\]\\]/g,_0x27839f(0x16b));return new RegExp(_0x27839f(0x174)+_0x4bca4d+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x27839f(0x157)](_0x283ddd);}function findEqualityPrefix(_0x12d38e,_0x318407){const _0x7039c=a207_0x5a50,_0x51ff56=new Set(_0x318407[_0x7039c(0x182)](normalizeIdentifier)),_0x7d5356=[];for(const _0x487852 of _0x12d38e){if(!_0x51ff56['has'](normalizeIdentifier(_0x487852)))break;_0x7d5356[_0x7039c(0x18c)](_0x487852);}return _0x7d5356;}function resolveTableMetadata(_0x9af14b,_0x568c9f){const _0x509037=a207_0x5a50,_0x4fea95=normalizeIdentifier(_0x568c9f),_0x5da4c0=_0x9af14b[_0x509037(0x166)](_0x5c33d6=>normalizeIdentifier(_0x5c33d6[_0x509037(0x17e)])===_0x4fea95);if(_0x5da4c0[_0x509037(0x167)]===0x1)return _0x5da4c0[0x0];const _0x4e6c2e=_0x4fea95[_0x509037(0x161)]('.'),_0x2f0bc8=_0x4fea95[_0x509037(0x153)]('.')['at'](-0x1),_0x32eafd=_0x9af14b[_0x509037(0x166)](_0xfc19db=>{const _0x226bb5=_0x509037,_0x2a7829=normalizeIdentifier(_0xfc19db['tableName']);if(_0x4e6c2e&&_0x2a7829[_0x226bb5(0x161)]('.'))return![];return _0x2a7829[_0x226bb5(0x153)]('.')['at'](-0x1)===_0x2f0bc8;});return _0x32eafd[_0x509037(0x167)]===0x1?_0x32eafd[0x0]:undefined;}function columnNamesMatch(_0x1fa6ab,_0x4b7451){return normalizeIdentifier(_0x1fa6ab)===normalizeIdentifier(_0x4b7451);}function normalizeIdentifier(_0x2d99f7){const _0x3605f0=a207_0x5a50;return _0x2d99f7[_0x3605f0(0x16d)](/[`"]/g,'')['trim']()[_0x3605f0(0x170)]();}function isSqlClauseKeyword(_0x31b68b){const _0x21580c=a207_0x5a50;return new Set(['on',_0x21580c(0x18b),_0x21580c(0x16c),_0x21580c(0x168),'inner',_0x21580c(0x16e),_0x21580c(0x184),_0x21580c(0x191),_0x21580c(0x173),_0x21580c(0x178)])[_0x21580c(0x17d)](_0x31b68b);}function a207_0x5a50(_0xd26b3d,_0x2f7860){_0xd26b3d=_0xd26b3d-0x152;const _0x384ac8=a207_0x384a();let _0x5a5044=_0x384ac8[_0xd26b3d];return _0x5a5044;}function stripOuterParentheses(_0x1524d4){const _0x18c661=a207_0x5a50;let _0x4be0bb=_0x1524d4[_0x18c661(0x16a)]();while(_0x4be0bb[_0x18c661(0x17a)]('(')&&_0x4be0bb[_0x18c661(0x162)](')')){let _0x5e6229=0x0,_0x335ab4=!![];for(let _0x15ca45=0x0;_0x15ca45<_0x4be0bb['length'];_0x15ca45+=0x1){if(_0x4be0bb[_0x15ca45]==='(')_0x5e6229+=0x1;if(_0x4be0bb[_0x15ca45]===')')_0x5e6229-=0x1;if(_0x5e6229===0x0&&_0x15ca45<_0x4be0bb['length']-0x1){_0x335ab4=![];break;}}if(!_0x335ab4||_0x5e6229!==0x0)break;_0x4be0bb=_0x4be0bb[_0x18c661(0x169)](0x1,-0x1)[_0x18c661(0x16a)]();}return _0x4be0bb;}
|
|
1
|
+
(function(_0x6b282a,_0x45692e){const _0x3392ca=a208_0xafa2,_0x1e4949=_0x6b282a();while(!![]){try{const _0x2b08d1=-parseInt(_0x3392ca(0x1a7))/0x1+-parseInt(_0x3392ca(0x1a8))/0x2+parseInt(_0x3392ca(0x178))/0x3+parseInt(_0x3392ca(0x185))/0x4*(-parseInt(_0x3392ca(0x198))/0x5)+-parseInt(_0x3392ca(0x197))/0x6*(parseInt(_0x3392ca(0x1a6))/0x7)+-parseInt(_0x3392ca(0x1ad))/0x8*(-parseInt(_0x3392ca(0x191))/0x9)+parseInt(_0x3392ca(0x174))/0xa;if(_0x2b08d1===_0x45692e)break;else _0x1e4949['push'](_0x1e4949['shift']());}catch(_0x536a37){_0x1e4949['push'](_0x1e4949['shift']());}}}(a208_0x2e16,0xf2719));export function auditSqlJoinIndexes(_0x575397,_0x2fffb5){const _0x43fe27=a208_0xafa2,_0x3701a8=[],_0x3c07af=extractJoinFacts(_0x575397)['map'](_0x3face1=>{const _0x1b1e8f=a208_0xafa2;if(_0x3face1[_0x1b1e8f(0x1a4)]||_0x3face1['columns']['length']===0x0)return _0x3701a8['push']({'code':_0x1b1e8f(0x17c),'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1['alias'],'columns':_0x3face1[_0x1b1e8f(0x17f)],'reason':_0x3face1[_0x1b1e8f(0x19b)]??_0x1b1e8f(0x179)}),{'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1['alias'],'columns':_0x3face1[_0x1b1e8f(0x17f)],'status':_0x1b1e8f(0x19c)};const _0x217575=resolveTableMetadata(_0x2fffb5,_0x3face1['table']),_0x10d170=(_0x217575?.[_0x1b1e8f(0x190)]??[])[_0x1b1e8f(0x176)](_0x264e8d=>({'index':_0x264e8d,'matchedPrefix':findEqualityPrefix(_0x264e8d['columns'],_0x3face1[_0x1b1e8f(0x17f)])}))[_0x1b1e8f(0x175)](_0x57d90c=>_0x57d90c[_0x1b1e8f(0x196)][_0x1b1e8f(0x18d)]>0x0),_0x26ba3f=_0x10d170['reduce']((_0x3cd1c0,_0x5e81a9)=>!_0x3cd1c0||_0x5e81a9['matchedPrefix'][_0x1b1e8f(0x18d)]>_0x3cd1c0[_0x1b1e8f(0x196)][_0x1b1e8f(0x18d)]?_0x5e81a9:_0x3cd1c0,_0x10d170[0x0]);if(_0x26ba3f)return{'table':_0x3face1['table'],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'status':_0x1b1e8f(0x1ab),'matchedIndex':{..._0x26ba3f[_0x1b1e8f(0x1b4)],'matchedPrefix':_0x26ba3f[_0x1b1e8f(0x196)]}};const _0x422c8d=_0x217575?.[_0x1b1e8f(0x190)][_0x1b1e8f(0x175)](_0x582ace=>_0x582ace[_0x1b1e8f(0x17f)][_0x1b1e8f(0x18e)](_0x54acf3=>_0x3face1[_0x1b1e8f(0x17f)][_0x1b1e8f(0x18e)](_0x4c73df=>columnNamesMatch(_0x54acf3,_0x4c73df))))??[];if(_0x422c8d[_0x1b1e8f(0x18d)]>0x0)return _0x3701a8[_0x1b1e8f(0x18a)]({'code':'JOIN_INDEX_NOT_USABLE','table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'status':_0x1b1e8f(0x1aa),'candidateIndexes':_0x422c8d};if(_0x217575&&_0x217575['metadataAvailable']!==![]&&_0x217575[_0x1b1e8f(0x190)][_0x1b1e8f(0x18d)]>0x0&&_0x3face1[_0x1b1e8f(0x17f)][_0x1b1e8f(0x18d)]>0x0)return _0x3701a8['push']({'code':_0x1b1e8f(0x19e),'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'reason':_0x1b1e8f(0x1b5)}),{'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'status':_0x1b1e8f(0x1aa)};return _0x3701a8[_0x1b1e8f(0x18a)]({'code':_0x1b1e8f(0x181),'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1[_0x1b1e8f(0x199)],'columns':_0x3face1[_0x1b1e8f(0x17f)],'reason':_0x217575?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':_0x1b1e8f(0x173)}),{'table':_0x3face1[_0x1b1e8f(0x184)],'alias':_0x3face1['alias'],'columns':_0x3face1[_0x1b1e8f(0x17f)],'status':_0x1b1e8f(0x19c)};});return{'checked':_0x3c07af[_0x43fe27(0x18d)]>0x0,'joins':_0x3c07af,'warnings':_0x3701a8};}function extractJoinFacts(_0x292031){const _0x373e9e=a208_0xafa2,_0x5ba049=maskNestedQueries(stripSqlNoise(_0x292031)),_0x40d23d=maskQuotedIdentifiers(_0x5ba049),_0x15a983=[],_0x41d736=new Set(),_0xfba219=/\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 _0x3c2d95 of _0x5ba049[_0x373e9e(0x1a1)](_0xfba219)){const _0x1b902d=_0x3c2d95[_0x373e9e(0x1b4)]??0x0,_0x5635cd=_0x3c2d95[0x0]['search'](/\bJOIN\b/i),_0xe3a9bf=_0x1b902d+Math[_0x373e9e(0x17a)](0x0,_0x5635cd);if(!/^JOIN\b/i[_0x373e9e(0x18b)](_0x40d23d[_0x373e9e(0x189)](_0xe3a9bf)))continue;_0x41d736[_0x373e9e(0x1a3)](_0xe3a9bf);const _0x4b8909=normalizeIdentifier(_0x3c2d95[0x1]||_0x373e9e(0x193)),_0x2e07f2=normalizeIdentifier(_0x3c2d95[0x2]??''),_0x19cf4e=normalizeIdentifier(_0x3c2d95[0x3]||_0x2e07f2[_0x373e9e(0x186)]('.')['at'](-0x1)||_0x2e07f2),_0x5e5f8c=[],_0x2fb0b6=_0x2e07f2===_0x373e9e(0x1ae);let _0xe5c30a=_0x4b8909==='right'||_0x4b8909===_0x373e9e(0x1af)||_0x2fb0b6,_0x32041b=_0xe5c30a?_0x2fb0b6?_0x373e9e(0x195):_0x4b8909[_0x373e9e(0x17e)]()+_0x373e9e(0x177):undefined;const _0x570695=stripOuterParentheses(_0x3c2d95[0x4]??'');hasTopLevelKeyword(_0x570695,'OR')&&(_0xe5c30a=!![],_0x32041b??=_0x373e9e(0x1a2));for(const _0x16c2be of splitTopLevelAnd(_0x570695)){const _0x3964fb=stripOuterParentheses(_0x16c2be);if(hasTopLevelKeyword(_0x3964fb,'OR')){_0xe5c30a=!![],_0x32041b??=_0x373e9e(0x1a2);continue;}const _0x51742b=splitEquality(_0x3964fb);if(!_0x51742b){containsColumnReference(_0x16c2be,_0x19cf4e)&&(_0xe5c30a=!![]);continue;}const _0x27f110=parseDirectColumnReference(_0x51742b[0x0],_0x19cf4e),_0x29c8f4=parseDirectColumnReference(_0x51742b[0x1],_0x19cf4e),_0x4a6317=containsColumnReference(_0x51742b[0x0],_0x19cf4e),_0x8daa32=containsColumnReference(_0x51742b[0x1],_0x19cf4e),_0x5acbe4=_0x27f110&&!_0x8daa32?_0x27f110:_0x29c8f4&&!_0x4a6317?_0x29c8f4:null;if(_0x5acbe4&&!_0x5e5f8c[_0x373e9e(0x187)](_0x5acbe4))_0x5e5f8c[_0x373e9e(0x18a)](_0x5acbe4);else!_0x5acbe4&&containsColumnReference(_0x16c2be,_0x19cf4e)&&(_0xe5c30a=!![]);}_0x15a983[_0x373e9e(0x18a)]({'table':_0x2e07f2,'alias':_0x19cf4e,'columns':_0x5e5f8c,'unsupportedPredicate':_0xe5c30a,'unsupportedReason':_0x32041b,'position':_0xe3a9bf});}for(const _0x26149c of _0x40d23d[_0x373e9e(0x1a1)](/\bJOIN\b/gi)){const _0x2ed4e1=_0x26149c['index']??0x0;if(_0x41d736[_0x373e9e(0x19d)](_0x2ed4e1))continue;const _0x5190ad=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x373e9e(0x17d)](_0x5ba049[_0x373e9e(0x189)](_0x2ed4e1+_0x26149c[0x0][_0x373e9e(0x18d)])),_0x4402bd=normalizeIdentifier(_0x5190ad?.[0x1]||_0x373e9e(0x1b3)),_0x25fc98=normalizeIdentifier(_0x5190ad?.[0x2]||''),_0x4816a1=isSqlClauseKeyword(_0x25fc98)?_0x4402bd['split']('.')['at'](-0x1)||_0x4402bd:_0x25fc98||_0x4402bd[_0x373e9e(0x186)]('.')['at'](-0x1)||_0x4402bd;_0x15a983[_0x373e9e(0x18a)]({'table':_0x4402bd,'alias':_0x4816a1,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x373e9e(0x182),'position':_0x2ed4e1});}return _0x15a983['sort']((_0x4b3869,_0x5a7e34)=>_0x4b3869[_0x373e9e(0x1b0)]-_0x5a7e34[_0x373e9e(0x1b0)]);}function a208_0xafa2(_0x2136bd,_0x5337ef){_0x2136bd=_0x2136bd-0x173;const _0x2e169e=a208_0x2e16();let _0xafa2d9=_0x2e169e[_0x2136bd];return _0xafa2d9;}function stripSqlNoise(_0x4a03e4){const _0x559c48=a208_0xafa2,_0x5055cd=Array[_0x559c48(0x19f)](_0x4a03e4),_0x2eddfa=(_0x11eb01,_0x2aaf5f)=>{for(let _0x5f4810=_0x11eb01;_0x5f4810<_0x2aaf5f;_0x5f4810+=0x1){_0x5055cd[_0x5f4810]!=='\x0a'&&_0x5055cd[_0x5f4810]!=='\x0d'&&(_0x5055cd[_0x5f4810]='\x20');}};for(let _0x42bbe4=0x0;_0x42bbe4<_0x5055cd['length'];_0x42bbe4+=0x1){const _0x59e3db=_0x5055cd[_0x42bbe4],_0x488208=_0x5055cd[_0x42bbe4+0x1];if(_0x59e3db==='\x27'||_0x59e3db==='\x22'||_0x59e3db==='`'){const _0x3f91f5=_0x59e3db,_0x2e8aa7=_0x42bbe4;_0x42bbe4+=0x1;while(_0x42bbe4<_0x5055cd[_0x559c48(0x18d)]){if(_0x5055cd[_0x42bbe4]==='\x5c'&&_0x42bbe4+0x1<_0x5055cd[_0x559c48(0x18d)]){_0x42bbe4+=0x2;continue;}if(_0x5055cd[_0x42bbe4]!==_0x3f91f5){_0x42bbe4+=0x1;continue;}if(_0x5055cd[_0x42bbe4+0x1]===_0x3f91f5){_0x42bbe4+=0x2;continue;}break;}if(_0x3f91f5==='\x27')_0x2eddfa(_0x2e8aa7,Math[_0x559c48(0x183)](_0x42bbe4+0x1,_0x5055cd[_0x559c48(0x18d)]));continue;}if(_0x59e3db==='-'&&_0x488208==='-'){const _0x3b5198=_0x42bbe4;while(_0x42bbe4<_0x5055cd[_0x559c48(0x18d)]&&_0x5055cd[_0x42bbe4]!=='\x0a')_0x42bbe4+=0x1;_0x2eddfa(_0x3b5198,_0x42bbe4);continue;}if(_0x59e3db==='/'&&_0x488208==='*'){const _0x5f3ae2=_0x42bbe4;_0x42bbe4+=0x2;while(_0x42bbe4<_0x5055cd['length']&&!(_0x5055cd[_0x42bbe4]==='*'&&_0x5055cd[_0x42bbe4+0x1]==='/')){_0x42bbe4+=0x1;}_0x42bbe4=Math[_0x559c48(0x183)](_0x42bbe4+0x1,_0x5055cd[_0x559c48(0x18d)]-0x1),_0x2eddfa(_0x5f3ae2,_0x42bbe4+0x1);continue;}if(_0x59e3db==='#'&&_0x488208!=='{'){const _0x6634fe=_0x42bbe4;while(_0x42bbe4<_0x5055cd['length']&&_0x5055cd[_0x42bbe4]!=='\x0a')_0x42bbe4+=0x1;_0x2eddfa(_0x6634fe,_0x42bbe4);continue;}if((_0x59e3db==='#'||_0x59e3db==='$')&&_0x488208==='{'){const _0x5208aa=_0x42bbe4;_0x42bbe4+=0x2;while(_0x42bbe4<_0x5055cd[_0x559c48(0x18d)]&&_0x5055cd[_0x42bbe4]!=='}')_0x42bbe4+=0x1;_0x2eddfa(_0x5208aa,Math['min'](_0x42bbe4+0x1,_0x5055cd['length']));}}return _0x5055cd[_0x559c48(0x180)]('');}function maskQuotedIdentifiers(_0x4e8942){const _0x1b7fe2=a208_0xafa2,_0x30795a=Array[_0x1b7fe2(0x19f)](_0x4e8942);for(let _0x109fd8=0x0;_0x109fd8<_0x30795a[_0x1b7fe2(0x18d)];_0x109fd8+=0x1){const _0x31e569=_0x30795a[_0x109fd8];if(_0x31e569!=='\x22'&&_0x31e569!=='`')continue;_0x109fd8+=0x1;while(_0x109fd8<_0x30795a[_0x1b7fe2(0x18d)]){if(_0x30795a[_0x109fd8]===_0x31e569){if(_0x30795a[_0x109fd8+0x1]===_0x31e569){_0x30795a[_0x109fd8]='\x20',_0x30795a[_0x109fd8+0x1]='\x20',_0x109fd8+=0x2;continue;}break;}_0x30795a[_0x109fd8]='\x20',_0x109fd8+=0x1;}}return _0x30795a[_0x1b7fe2(0x180)]('');}function maskNestedQueries(_0x1e46da){const _0x292c6a=a208_0xafa2,_0x2b81e1=Array[_0x292c6a(0x19f)](_0x1e46da);for(let _0x4b4e91=0x0;_0x4b4e91<_0x2b81e1[_0x292c6a(0x18d)];_0x4b4e91+=0x1){if(_0x2b81e1[_0x4b4e91]!=='(')continue;const _0x49d73e=_0x1e46da[_0x292c6a(0x189)](_0x4b4e91+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x49d73e))continue;let _0x3c9d83=0x1,_0x2ce75f=_0x4b4e91+0x1;for(;_0x2ce75f<_0x2b81e1['length']&&_0x3c9d83>0x0;_0x2ce75f+=0x1){if(_0x2b81e1[_0x2ce75f]==='(')_0x3c9d83+=0x1;if(_0x2b81e1[_0x2ce75f]===')')_0x3c9d83-=0x1;}if(_0x3c9d83!==0x0)continue;for(let _0x5ccbf1=_0x4b4e91;_0x5ccbf1<_0x2ce75f;_0x5ccbf1+=0x1){_0x2b81e1[_0x5ccbf1]='\x20';}const _0x4de698=_0x292c6a(0x1ae);for(let _0x35c6df=0x0;_0x35c6df<_0x4de698[_0x292c6a(0x18d)]&&_0x4b4e91+_0x35c6df<_0x2ce75f;_0x35c6df+=0x1){_0x2b81e1[_0x4b4e91+_0x35c6df]=_0x4de698[_0x35c6df];}_0x4b4e91=_0x2ce75f-0x1;}return _0x2b81e1['join']('');}function a208_0x2e16(){const _0x5b161b=['1226314KGfolp','1956090sYGNXU','match','warning','covered','natural','116168QGHvYu','__sq__','full','position','(?:^|[^\x5cw$])','tableName','unknown','index','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','36511510zuxeyg','filter','map','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','1824225zVXVdM','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','max','startsWith','JOIN_PREDICATE_UNSUPPORTED','exec','toUpperCase','columns','join','INDEX_METADATA_UNAVAILABLE','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','min','table','472324CdNRGO','split','includes','where','slice','push','test','toLowerCase','length','some','replace','indexes','1089kDCFeX','trim','INNER','using','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','matchedPrefix','9119808wUiKhX','55DiDSJo','alias','\x5cs*\x5c.\x5cs*[\x5cw$]+','unsupportedReason','unavailable','has','JOIN_INDEX_MISSING','from','cross','matchAll','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','add','unsupportedPredicate','endsWith','7ZHKSSy'];a208_0x2e16=function(){return _0x5b161b;};return a208_0x2e16();}function splitTopLevelAnd(_0x525340){const _0x133ab2=a208_0xafa2,_0x3d738d=[];let _0x21ccdf=0x0,_0x5b36e9=0x0;for(let _0x426f94=0x0;_0x426f94<_0x525340[_0x133ab2(0x18d)];_0x426f94+=0x1){const _0x2fcdf9=_0x525340[_0x426f94];if(_0x2fcdf9==='(')_0x21ccdf+=0x1;if(_0x2fcdf9===')')_0x21ccdf=Math['max'](0x0,_0x21ccdf-0x1);_0x21ccdf===0x0&&_0x525340[_0x133ab2(0x189)](_0x426f94)[_0x133ab2(0x1a9)](/^AND\b/i)&&(_0x426f94===0x0||/\s/[_0x133ab2(0x18b)](_0x525340[_0x426f94-0x1]??''))&&(_0x3d738d[_0x133ab2(0x18a)](_0x525340[_0x133ab2(0x189)](_0x5b36e9,_0x426f94)['trim']()),_0x426f94+=0x2,_0x5b36e9=_0x426f94+0x1);}const _0x2fe396=_0x525340[_0x133ab2(0x189)](_0x5b36e9)['trim']();if(_0x2fe396)_0x3d738d[_0x133ab2(0x18a)](_0x2fe396);return _0x3d738d;}function hasTopLevelKeyword(_0x5cc250,_0x4667a8){const _0x38d66a=a208_0xafa2;let _0x461dc5=0x0;for(let _0x40ce94=0x0;_0x40ce94<_0x5cc250['length'];_0x40ce94+=0x1){const _0x10537f=_0x5cc250[_0x40ce94];if(_0x10537f==='(')_0x461dc5+=0x1;if(_0x10537f===')')_0x461dc5=Math[_0x38d66a(0x17a)](0x0,_0x461dc5-0x1);if(_0x461dc5!==0x0)continue;const _0x12d787=_0x5cc250[_0x38d66a(0x189)](_0x40ce94,_0x40ce94+_0x4667a8['length']),_0x40ea96=_0x5cc250[_0x40ce94-0x1]??'\x20',_0x2a81e7=_0x5cc250[_0x40ce94+_0x4667a8[_0x38d66a(0x18d)]]??'\x20';if(_0x12d787[_0x38d66a(0x17e)]()===_0x4667a8[_0x38d66a(0x17e)]()&&!/[\w$]/[_0x38d66a(0x18b)](_0x40ea96)&&!/[\w$]/['test'](_0x2a81e7))return!![];}return![];}function splitEquality(_0x4f77c1){const _0x2e4530=a208_0xafa2,_0x5ea8e5=stripOuterParentheses(_0x4f77c1);let _0xef7e8c=0x0,_0x44cb09;for(let _0x21d8cc=0x0;_0x21d8cc<_0x5ea8e5['length'];_0x21d8cc+=0x1){const _0x2e289e=_0x5ea8e5[_0x21d8cc];if(_0x2e289e==='(')_0xef7e8c+=0x1;if(_0x2e289e===')')_0xef7e8c=Math[_0x2e4530(0x17a)](0x0,_0xef7e8c-0x1);const _0xd384b5=_0x5ea8e5[_0x21d8cc-0x1]??'',_0x396471=_0x5ea8e5[_0x21d8cc+0x1]??'';if(_0x2e289e==='='&&_0xef7e8c===0x0&&!/[!<>=:]/[_0x2e4530(0x18b)](_0xd384b5)&&_0x396471!=='='){if(_0x44cb09!==undefined)return null;_0x44cb09=_0x21d8cc;}}return _0x44cb09===undefined?null:[_0x5ea8e5[_0x2e4530(0x189)](0x0,_0x44cb09)[_0x2e4530(0x192)](),_0x5ea8e5[_0x2e4530(0x189)](_0x44cb09+0x1)['trim']()];}function parseDirectColumnReference(_0x5eeaca,_0x21fbb6){const _0x174803=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/['exec'](stripOuterParentheses(_0x5eeaca));if(!_0x174803)return null;if(normalizeIdentifier(_0x174803[0x1]??'')!==normalizeIdentifier(_0x21fbb6))return null;return normalizeIdentifier(_0x174803[0x2]??'');}function containsColumnReference(_0x891e10,_0x52ea4f){const _0x4c76e0=a208_0xafa2,_0x39c70a=_0x891e10['replace'](/[`"]/g,''),_0x329728=_0x52ea4f[_0x4c76e0(0x18f)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x4c76e0(0x1b1)+_0x329728+_0x4c76e0(0x19a),'i')[_0x4c76e0(0x18b)](_0x39c70a);}function findEqualityPrefix(_0x334cd7,_0x4fb8b6){const _0x59d81f=a208_0xafa2,_0x232832=new Set(_0x4fb8b6[_0x59d81f(0x176)](normalizeIdentifier)),_0x9aaaa5=[];for(const _0x54b7be of _0x334cd7){if(!_0x232832['has'](normalizeIdentifier(_0x54b7be)))break;_0x9aaaa5[_0x59d81f(0x18a)](_0x54b7be);}return _0x9aaaa5;}function resolveTableMetadata(_0x548692,_0x25cadc){const _0x1d2a18=a208_0xafa2,_0x1872c1=normalizeIdentifier(_0x25cadc),_0x27fb2c=_0x548692['filter'](_0x389883=>normalizeIdentifier(_0x389883[_0x1d2a18(0x1b2)])===_0x1872c1);if(_0x27fb2c[_0x1d2a18(0x18d)]===0x1)return _0x27fb2c[0x0];const _0x5c341a=_0x1872c1['includes']('.'),_0x4684b0=_0x1872c1['split']('.')['at'](-0x1),_0x2be160=_0x548692['filter'](_0x299568=>{const _0x3e9e32=_0x1d2a18,_0x16126b=normalizeIdentifier(_0x299568[_0x3e9e32(0x1b2)]);if(_0x5c341a&&_0x16126b[_0x3e9e32(0x187)]('.'))return![];return _0x16126b[_0x3e9e32(0x186)]('.')['at'](-0x1)===_0x4684b0;});return _0x2be160[_0x1d2a18(0x18d)]===0x1?_0x2be160[0x0]:undefined;}function columnNamesMatch(_0x379fcd,_0xb0df8){return normalizeIdentifier(_0x379fcd)===normalizeIdentifier(_0xb0df8);}function normalizeIdentifier(_0x4ede77){const _0x37ad40=a208_0xafa2;return _0x4ede77[_0x37ad40(0x18f)](/[`"]/g,'')[_0x37ad40(0x192)]()[_0x37ad40(0x18c)]();}function isSqlClauseKeyword(_0x610cb1){const _0x568d4f=a208_0xafa2;return new Set(['on',_0x568d4f(0x194),_0x568d4f(0x188),_0x568d4f(0x180),'inner','left','right',_0x568d4f(0x1af),_0x568d4f(0x1a0),_0x568d4f(0x1ac)])['has'](_0x610cb1);}function stripOuterParentheses(_0x32dc87){const _0x34d004=a208_0xafa2;let _0x3becff=_0x32dc87[_0x34d004(0x192)]();while(_0x3becff[_0x34d004(0x17b)]('(')&&_0x3becff[_0x34d004(0x1a5)](')')){let _0xc81527=0x0,_0x3ffa26=!![];for(let _0x528cd0=0x0;_0x528cd0<_0x3becff[_0x34d004(0x18d)];_0x528cd0+=0x1){if(_0x3becff[_0x528cd0]==='(')_0xc81527+=0x1;if(_0x3becff[_0x528cd0]===')')_0xc81527-=0x1;if(_0xc81527===0x0&&_0x528cd0<_0x3becff[_0x34d004(0x18d)]-0x1){_0x3ffa26=![];break;}}if(!_0x3ffa26||_0xc81527!==0x0)break;_0x3becff=_0x3becff['slice'](0x1,-0x1)[_0x34d004(0x192)]();}return _0x3becff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a209_0xce19b6=a209_0x596f;function a209_0x6389(){const _0x1b95b2=['5tRxcBW','2733160uUVNkO','7621132iDpqvP','296tMvbCa','18777375ZtZrhw','sql.lock.json','/sql','23051mAGeVG','1719114cxgqth','210141qoZMeH','10XePcfQ','474607MYmQEd'];a209_0x6389=function(){return _0x1b95b2;};return a209_0x6389();}(function(_0x2027e4,_0x35e185){const _0x2b56d4=a209_0x596f,_0x207efd=_0x2027e4();while(!![]){try{const _0x410fd2=-parseInt(_0x2b56d4(0x13f))/0x1+parseInt(_0x2b56d4(0x141))/0x2+parseInt(_0x2b56d4(0x13d))/0x3+-parseInt(_0x2b56d4(0x142))/0x4*(parseInt(_0x2b56d4(0x140))/0x5)+-parseInt(_0x2b56d4(0x148))/0x6+parseInt(_0x2b56d4(0x147))/0x7*(parseInt(_0x2b56d4(0x143))/0x8)+parseInt(_0x2b56d4(0x144))/0x9*(parseInt(_0x2b56d4(0x13e))/0xa);if(_0x410fd2===_0x35e185)break;else _0x207efd['push'](_0x207efd['shift']());}catch(_0x20681c){_0x207efd['push'](_0x207efd['shift']());}}}(a209_0x6389,0xeee02));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a209_0x596f(_0x2b7ec4,_0x37c955){_0x2b7ec4=_0x2b7ec4-0x13d;const _0x6389a=a209_0x6389();let _0x596f63=_0x6389a[_0x2b7ec4];return _0x596f63;}const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a209_0xce19b6(0x145),TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x28c62e,_0x493f37){const _0x5803b9=a209_0xce19b6,_0x2c7cf8=resolve(_0x493f37??findProjectRootDirectory()),_0x3e849a=DOT_DIR+_0x5803b9(0x146),_0x4ea283=_0x3e849a+'/'+_0x28c62e;return{'projectRoot':_0x2c7cf8,'appCode':_0x28c62e,'sqlWorkspaceRoot':_0x3e849a,'sqlRoot':_0x4ea283,'sqlRootDir':resolve(_0x2c7cf8,DOT_DIR,'sql',_0x28c62e),'lockFilePath':resolve(_0x2c7cf8,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2c7cf8,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38893e,_0x54b38e){const _0x5eb605=a210_0x5b7d,_0x12ee35=_0x38893e();while(!![]){try{const _0x8b3be6=parseInt(_0x5eb605(0x12b))/0x1*(-parseInt(_0x5eb605(0x133))/0x2)+-parseInt(_0x5eb605(0x131))/0x3*(-parseInt(_0x5eb605(0x13a))/0x4)+parseInt(_0x5eb605(0x123))/0x5*(-parseInt(_0x5eb605(0x13b))/0x6)+-parseInt(_0x5eb605(0x136))/0x7*(parseInt(_0x5eb605(0x12c))/0x8)+parseInt(_0x5eb605(0x139))/0x9*(-parseInt(_0x5eb605(0x132))/0xa)+-parseInt(_0x5eb605(0x141))/0xb+parseInt(_0x5eb605(0x128))/0xc;if(_0x8b3be6===_0x54b38e)break;else _0x12ee35['push'](_0x12ee35['shift']());}catch(_0x31b512){_0x12ee35['push'](_0x12ee35['shift']());}}}(a210_0x131a,0x6d420));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x37a561){const _0xf16e6b=a210_0x5b7d;if(_0x37a561==='.sql')return'sql';if(_0x37a561===_0xf16e6b(0x130))return _0xf16e6b(0x121);return undefined;}async function scanSqlFilesRecursively(_0x61748a,_0x52e622){const _0x3c666d=a210_0x5b7d,_0x5716c2=[];try{const _0x51a56b=await readdir(_0x61748a,{'withFileTypes':!![]});for(const _0x46a7c6 of _0x51a56b){const _0x570370=join(_0x61748a,_0x46a7c6[_0x3c666d(0x135)]);if(_0x46a7c6['isDirectory']()){_0x5716c2[_0x3c666d(0x12d)](...await scanSqlFilesRecursively(_0x570370,_0x52e622));continue;}if(!_0x46a7c6[_0x3c666d(0x124)]())continue;const _0x45c586=extname(_0x46a7c6[_0x3c666d(0x135)])[_0x3c666d(0x143)](),_0x43e709=extensionToMode(_0x45c586);if(!_0x43e709)continue;const _0x5cd4d1=relative(_0x52e622,_0x570370)[_0x3c666d(0x13f)](/\\/g,'/'),_0x3c1c60=_0x5cd4d1[_0x3c666d(0x140)]('/')[_0x3c666d(0x129)](Boolean),_0x253a9d=parseSqlPath(_0x3c1c60,_0x46a7c6[_0x3c666d(0x135)],_0x45c586);if(!_0x253a9d)continue;_0x5716c2['push']({'sqlCode':_0x253a9d['sqlCode'],'sqlName':_0x253a9d[_0x3c666d(0x13d)],'dbDirectory':_0x3c1c60[0x0],'filePath':_0x570370,'relativePath':_0x5cd4d1,'lockKey':_0x253a9d[_0x3c666d(0x12f)],'mode':_0x43e709});}}catch(_0x5cd19a){if(_0x5cd19a[_0x3c666d(0x125)]!==_0x3c666d(0x137))throw _0x5cd19a;}return _0x5716c2;}export async function scanLocalSqlQueries(_0x55777e){const _0x2b2be3=a210_0x5b7d;return scanSqlFilesRecursively(_0x55777e[_0x2b2be3(0x138)],_0x55777e[_0x2b2be3(0x138)]);}function a210_0x131a(){const _0xa5ae62=['30GoDXyR','dbId','sqlName','mode','replace','split','7477371lxufej','slice','toLowerCase','dbName','mybatisXml','length','88915SciFhO','isFile','code','isDirectory','path','29591376TpIDPM','filter','indexOf','424789igxLrK','3043864JymkjG','push','test','sqlCode','.xml','33411DMDOxB','20mPJyPg','4FirqbF','sql','name','7QULAgP','ENOENT','sqlRootDir','940590JVRveH','68hPboDn'];a210_0x131a=function(){return _0xa5ae62;};return a210_0x131a();}export function resolveLocalSqlFilePath(_0x45addc,_0xed85ec,_0x576f98){const _0x983f58=a210_0x5b7d,_0x2fa0e2=_0x576f98?.[_0x983f58(0x127)]||(_0x576f98?.['sqlName']||_0x576f98?.[_0x983f58(0x120)]?buildSqlRelativePath(_0xed85ec,_0x576f98?.['sqlName'],_0x576f98?.[_0x983f58(0x120)],_0x576f98?.[_0x983f58(0x13e)]||_0x983f58(0x134),_0x576f98?.[_0x983f58(0x13c)]):buildDefaultSqlFileName(_0xed85ec,_0x576f98?.[_0x983f58(0x13e)]||_0x983f58(0x134)));return join(_0x45addc[_0x983f58(0x138)],_0x2fa0e2);}export async function directoryExists(_0x3784c2){const _0x4bd563=a210_0x5b7d;try{const _0x3e9484=await stat(_0x3784c2);return _0x3e9484[_0x4bd563(0x126)]();}catch{return![];}}function parseSqlPath(_0x2250a1,_0x207136,_0x314ec6){const _0xca041d=a210_0x5b7d,_0x19f749=_0x207136[_0xca041d(0x142)](0x0,-_0x314ec6[_0xca041d(0x122)]);if(_0x2250a1[_0xca041d(0x122)]<0x2)return null;const _0x49b07c=_0x19f749[_0xca041d(0x12a)]('_');if(_0x49b07c<=0x0||_0x49b07c>=_0x19f749[_0xca041d(0x122)]-0x1)return null;const _0x2d9b4a=_0x19f749['slice'](0x0,_0x49b07c);if(!isLikelySqlCode(_0x2d9b4a))return null;return{'sqlCode':_0x2d9b4a,'sqlName':_0x19f749[_0xca041d(0x142)](_0x49b07c+0x1)};}function a210_0x5b7d(_0x258346,_0x57961a){_0x258346=_0x258346-0x120;const _0x131a6b=a210_0x131a();let _0x5b7dd3=_0x131a6b[_0x258346];return _0x5b7dd3;}function isLikelySqlCode(_0x5abcfc){const _0x4f2d59=a210_0x5b7d;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x4f2d59(0x12e)](_0x5abcfc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xce1e11,_0x5d3108){const _0x409cf2=a211_0x4255,_0x4f0dd8=_0xce1e11();while(!![]){try{const _0x58299c=-parseInt(_0x409cf2(0x162))/0x1+parseInt(_0x409cf2(0x160))/0x2*(-parseInt(_0x409cf2(0x15a))/0x3)+parseInt(_0x409cf2(0x15b))/0x4+-parseInt(_0x409cf2(0x163))/0x5+-parseInt(_0x409cf2(0x15d))/0x6+parseInt(_0x409cf2(0x15c))/0x7+-parseInt(_0x409cf2(0x161))/0x8*(-parseInt(_0x409cf2(0x15f))/0x9);if(_0x58299c===_0x5d3108)break;else _0x4f0dd8['push'](_0x4f0dd8['shift']());}catch(_0x551827){_0x4f0dd8['push'](_0x4f0dd8['shift']());}}}(a211_0x38c0,0xe2c3a));import{readFile}from'node:fs/promises';function a211_0x4255(_0x4665ea,_0x1fe261){_0x4665ea=_0x4665ea-0x15a;const _0x38c0b7=a211_0x38c0();let _0x42550f=_0x38c0b7[_0x4665ea];return _0x42550f;}function a211_0x38c0(){const _0x288d2e=['2640520wAHuBw','1184939kOQstv','9573762IqAoUo','update','16047873bcYqzk','4NTntXY','24wJjGUU','1783993zIBDeH','5158960KtxsgZ','createHash','utf8','1257690zUUfOL'];a211_0x38c0=function(){return _0x288d2e;};return a211_0x38c0();}import a211_0x2956aa from'node:crypto';export function computeSqlContentHash(_0x514e23){const _0x5148d9=a211_0x4255;return a211_0x2956aa[_0x5148d9(0x164)]('md5')[_0x5148d9(0x15e)](_0x514e23)['digest']('hex');}export async function computeSqlFileHash(_0x2bfc16){const _0xe798b6=a211_0x4255,_0x544d7d=await readFile(_0x2bfc16,_0xe798b6(0x165));return computeSqlContentHash(_0x544d7d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3419c4,_0x164511){const _0x1e8d27=a212_0xbade,_0x292955=_0x3419c4();while(!![]){try{const _0x1dc71e=-parseInt(_0x1e8d27(0x1ac))/0x1*(-parseInt(_0x1e8d27(0x1ab))/0x2)+parseInt(_0x1e8d27(0x1b5))/0x3+-parseInt(_0x1e8d27(0x1a4))/0x4+-parseInt(_0x1e8d27(0x1a3))/0x5*(parseInt(_0x1e8d27(0x1a2))/0x6)+-parseInt(_0x1e8d27(0x1af))/0x7+parseInt(_0x1e8d27(0x1ae))/0x8*(parseInt(_0x1e8d27(0x19e))/0x9)+-parseInt(_0x1e8d27(0x1a8))/0xa*(-parseInt(_0x1e8d27(0x1a1))/0xb);if(_0x1dc71e===_0x164511)break;else _0x292955['push'](_0x292955['shift']());}catch(_0x2f87ca){_0x292955['push'](_0x292955['shift']());}}}(a212_0x3f57,0xe59c3));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a212_0xbade(_0x1532f8,_0x51afe1){_0x1532f8=_0x1532f8-0x19e;const _0x3f5749=a212_0x3f57();let _0xbadefd=_0x3f5749[_0x1532f8];return _0xbadefd;}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x44b078,_0xfa7f73,_0x2542d7,_0x55d0c4){const _0x2c88ca=a212_0xbade,_0x33743e=_0x44b078??createEmptySqlLock();let _0x483b24=_0x33743e['apps'][_0xfa7f73];if(!_0x483b24)return _0x483b24={'sqlRoot':_0x2542d7,'lastSync':'','sqls':{}},_0x33743e[_0x2c88ca(0x1a6)][_0xfa7f73]=_0x483b24,{'lockData':_0x33743e,'appLock':_0x483b24};if(!_0x483b24[_0x2c88ca(0x19f)])_0x483b24[_0x2c88ca(0x19f)]=_0x2542d7;else{if(_0x483b24[_0x2c88ca(0x19f)]!==_0x2542d7)throw new Error(_0x55d0c4+_0x2c88ca(0x1b0)+_0x2542d7+'\x22\x20vs\x20lock\x20\x22'+_0x483b24[_0x2c88ca(0x19f)]+_0x2c88ca(0x1b1)+_0x2c88ca(0x1a7));}return!_0x483b24[_0x2c88ca(0x1b3)]&&(_0x483b24[_0x2c88ca(0x1b3)]={}),!_0x483b24['lastSync']&&(_0x483b24[_0x2c88ca(0x1a0)]=''),{'lockData':_0x33743e,'appLock':_0x483b24};}function a212_0x3f57(){const _0x130757=['ENOENT','utf8','323978nxjHbR','8eyItfG','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','316264PSvpLQ','4723971wKbvfe',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','\x22.\x20','parse','sqls','code','585375PmdxxV','423ZGqbeE','sqlRoot','lastSync','223751HtIxiT','1326FrgqiM','37720BwlTcn','3764764xCvPAK','stringify','apps','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','430IPgzJg'];a212_0x3f57=function(){return _0x130757;};return a212_0x3f57();}export async function readSqlLockFile(_0x55298f){const _0xdc3615=a212_0xbade;try{const _0x3b4598=await readFile(_0x55298f,_0xdc3615(0x1aa));return JSON[_0xdc3615(0x1b2)](_0x3b4598);}catch(_0x31fa44){if(_0x31fa44[_0xdc3615(0x1b4)]===_0xdc3615(0x1a9))return null;throw new Error(_0xdc3615(0x1ad)+String(_0x31fa44));}}export async function writeSqlLockFile(_0x335a77,_0x136882){const _0x3274ed=a212_0xbade;await mkdir(dirname(_0x335a77),{'recursive':!![]}),await writeFile(_0x335a77,JSON[_0x3274ed(0x1a5)](_0x136882,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b9a05,_0x5e80f0){const _0x3ef7db=a214_0x550f,_0x586847=_0x1b9a05();while(!![]){try{const _0x583c4f=parseInt(_0x3ef7db(0x198))/0x1+parseInt(_0x3ef7db(0x19c))/0x2+parseInt(_0x3ef7db(0x190))/0x3*(-parseInt(_0x3ef7db(0x196))/0x4)+-parseInt(_0x3ef7db(0x18e))/0x5+parseInt(_0x3ef7db(0x191))/0x6+-parseInt(_0x3ef7db(0x19f))/0x7*(-parseInt(_0x3ef7db(0x199))/0x8)+parseInt(_0x3ef7db(0x194))/0x9*(-parseInt(_0x3ef7db(0x19b))/0xa);if(_0x583c4f===_0x5e80f0)break;else _0x586847['push'](_0x586847['shift']());}catch(_0x4f02bc){_0x586847['push'](_0x586847['shift']());}}}(a214_0x322f,0xd7781));export function detectSqlMode(_0x21576c){const _0x3bb495=a214_0x550f,_0x33e05e=_0x21576c[_0x3bb495(0x193)]();if(/^<(select|insert|update|delete)\b/i[_0x3bb495(0x18f)](_0x33e05e))return _0x3bb495(0x19e);return _0x3bb495(0x192);}export function getSqlFileExtension(_0x78d709){const _0x7e6f48=a214_0x550f;return _0x78d709===_0x7e6f48(0x19e)?'.xml':_0x7e6f48(0x19d);}export function buildDefaultSqlFileName(_0x364788,_0x1ec7cd){return''+_0x364788+getSqlFileExtension(_0x1ec7cd);}export function sanitizeSqlPathSegment(_0x2b3a02,_0x16625){const _0x22dc9d=a214_0x550f,_0xb5ea3e=String(_0x2b3a02??'')[_0x22dc9d(0x197)](),_0x15be1b=_0xb5ea3e[_0x22dc9d(0x19a)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x22dc9d(0x19a)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x22dc9d(0x19a)](/^\.+/,'')['replace'](/\.+$/,'')[_0x22dc9d(0x19a)](/^-+/,'')[_0x22dc9d(0x19a)](/-+$/,'');return _0x15be1b||_0x16625;}export function buildDbDirectoryName(_0x1f138f,_0x4c12c3){return sanitizeSqlPathSegment(_0x1f138f,_0x4c12c3!=null?'db-'+_0x4c12c3:'unknown-db');}export function buildSqlRelativePath(_0x4d424b,_0x4f78b6,_0x52ced8,_0x4d8600,_0x3a9326){const _0x2b6361=a214_0x550f,_0x615d8=buildDbDirectoryName(_0x52ced8,_0x3a9326),_0x36ad44=sanitizeSqlPathSegment(_0x4d424b,_0x2b6361(0x195)),_0x5469ff=sanitizeSqlPathSegment(_0x4f78b6,_0x36ad44);return _0x615d8+'/'+_0x36ad44+'_'+_0x5469ff+getSqlFileExtension(_0x4d8600);}function a214_0x550f(_0xb915c,_0x4d2cdf){_0xb915c=_0xb915c-0x18e;const _0x322fd0=a214_0x322f();let _0x550f04=_0x322fd0[_0xb915c];return _0x550f04;}function a214_0x322f(){const _0x5722a9=['7127274QtLvEl','sql','trimStart','14013OXheeU','unknown-sql','8gpFGim','trim','193872uysGgd','2616yabIQe','replace','1710sWIqBE','389882RQTrug','.sql','mybatisXml','11165YMEhvz','3715835tLJfXO','test','309423hAjkBc'];a214_0x322f=function(){return _0x5722a9;};return a214_0x322f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x7604c2,_0x3bbcc5){const _0x490d06=a215_0x2f39,_0x10418d=_0x7604c2();while(!![]){try{const _0x1683af=parseInt(_0x490d06(0x144))/0x1*(parseInt(_0x490d06(0x13f))/0x2)+-parseInt(_0x490d06(0x12f))/0x3+parseInt(_0x490d06(0x137))/0x4+-parseInt(_0x490d06(0x146))/0x5+-parseInt(_0x490d06(0x142))/0x6+parseInt(_0x490d06(0x150))/0x7+-parseInt(_0x490d06(0x135))/0x8*(parseInt(_0x490d06(0x14b))/0x9);if(_0x1683af===_0x3bbcc5)break;else _0x10418d['push'](_0x10418d['shift']());}catch(_0x2ec2ed){_0x10418d['push'](_0x10418d['shift']());}}}(a215_0x4abc,0x2480c));export function detectSqlType(_0x245a0c){const _0x46113b=a215_0x2f39;if(!_0x245a0c?.[_0x46113b(0x13a)]())return{'type':_0x46113b(0x14e),'isSelectOnly':![],'isDangerous':![],'reason':_0x46113b(0x14c)};const _0x49f0d0=_0x245a0c[_0x46113b(0x130)](/#\{[^}]*\}/g,'?')[_0x46113b(0x130)](/\$\{[^}]*\}/g,'?')[_0x46113b(0x130)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x46113b(0x130)](/\/\*[\s\S]*?\*\//g,'')[_0x46113b(0x13a)](),_0x13f601=_0x49f0d0[_0x46113b(0x147)]('\x0a');let _0x20e4cf='';for(const _0x4b1633 of _0x13f601){const _0x435e5d=_0x4b1633[_0x46113b(0x13a)]();if(!_0x435e5d||_0x435e5d[_0x46113b(0x12d)]('--')||_0x435e5d['startsWith']('/*'))continue;_0x20e4cf=_0x435e5d;break;}const _0x14f314=_0x20e4cf[_0x46113b(0x13b)]();if(_0x14f314[_0x46113b(0x12d)]('SELECT')||_0x14f314[_0x46113b(0x12d)](_0x46113b(0x143))){const _0x1a42df=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x46113b(0x13c)](_0x49f0d0);return{'type':_0x46113b(0x14f),'isSelectOnly':!_0x1a42df,'isDangerous':_0x1a42df,'reason':_0x1a42df?_0x46113b(0x131):undefined};}if(_0x14f314[_0x46113b(0x12d)]('INSERT'))return{'type':_0x46113b(0x13d),'isSelectOnly':![],'isDangerous':![]};if(_0x14f314[_0x46113b(0x12d)](_0x46113b(0x145)))return{'type':_0x46113b(0x145),'isSelectOnly':![],'isDangerous':![]};if(_0x14f314[_0x46113b(0x12d)]('DELETE'))return{'type':_0x46113b(0x12e),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x46113b(0x13c)](_0x14f314))return{'type':_0x46113b(0x153),'isSelectOnly':![],'isDangerous':!![],'reason':_0x46113b(0x134)};return{'type':_0x46113b(0x14e),'isSelectOnly':![],'isDangerous':![]};}function a215_0x2f39(_0x84260a,_0x41004c){_0x84260a=_0x84260a-0x12c;const _0x4abcb5=a215_0x4abc();let _0x2f393b=_0x4abcb5[_0x84260a];return _0x2f393b;}function a215_0x4abc(){const _0x41424f=['matchAll','2007XepiLI','SQL\x20content\x20is\x20empty','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','UNKNOWN','SELECT','1872129yeZLPp','type','join','DDL','unknown\x20table(s)','startsWith','DELETE','611652dZgcVh','replace','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','\x20query\x20targeting\x20','\x20with\x20parameters:\x20','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','6024nWKvsC','match','998964WGOciD','includes','length','trim','toUpperCase','test','INSERT','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','55912YnWTBq','reason','from','351882HTYFvo','WITH','7eTCDwc','UPDATE','664570SgELJT','split','push','add'];a215_0x4abc=function(){return _0x41424f;};return a215_0x4abc();}function extractTables(_0x35f894){const _0x5463c3=a215_0x2f39,_0x2ea1bd=_0x35f894[_0x5463c3(0x130)](/#\{[^}]*\}/g,'?')[_0x5463c3(0x130)](/\$\{[^}]*\}/g,'?')[_0x5463c3(0x130)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x5463c3(0x130)](/\/\*[\s\S]*?\*\//g,''),_0x35c6d7=[],_0x2f333d=_0x2ea1bd['match'](/FROM\s+([^\s,)(]+)/i);if(_0x2f333d?.[0x1])_0x35c6d7[_0x5463c3(0x148)](_0x2f333d[0x1][_0x5463c3(0x130)](/[`"]/g,''));for(const _0x404337 of _0x2ea1bd[_0x5463c3(0x14a)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x548cf3=_0x404337[0x1]?.[_0x5463c3(0x130)](/[`"]/g,'');if(_0x548cf3&&!_0x35c6d7['includes'](_0x548cf3))_0x35c6d7[_0x5463c3(0x148)](_0x548cf3);}const _0x5e247a=_0x2ea1bd[_0x5463c3(0x136)](/INTO\s+([^\s(]+)/i);if(_0x5e247a?.[0x1]){const _0x17d9ac=_0x5e247a[0x1][_0x5463c3(0x130)](/[`"]/g,'');if(!_0x35c6d7['includes'](_0x17d9ac))_0x35c6d7[_0x5463c3(0x148)](_0x17d9ac);}const _0x2ba1e2=_0x2ea1bd[_0x5463c3(0x136)](/UPDATE\s+([^\s,)(]+)/i);if(_0x2ba1e2?.[0x1]){const _0x415d0d=_0x2ba1e2[0x1][_0x5463c3(0x130)](/[`"]/g,'');if(!_0x35c6d7[_0x5463c3(0x138)](_0x415d0d))_0x35c6d7[_0x5463c3(0x148)](_0x415d0d);}return _0x35c6d7;}function extractParameters(_0x21a93a){const _0x202670=a215_0x2f39,_0x21ab04=new Set();for(const _0x43fc7a of _0x21a93a[_0x202670(0x14a)](/#\{(\w+)\}/g))if(_0x43fc7a[0x1])_0x21ab04[_0x202670(0x149)](_0x43fc7a[0x1]);for(const _0x3836ee of _0x21a93a[_0x202670(0x14a)](/\$\{(\w+)\}/g))if(_0x3836ee[0x1])_0x21ab04[_0x202670(0x149)](_0x3836ee[0x1]);return Array[_0x202670(0x141)](_0x21ab04);}export function validateSql(_0x959379){const _0x4f146f=a215_0x2f39,_0x6ad454=detectSqlType(_0x959379),_0x4d53cc=extractTables(_0x959379),_0x29aea2=extractParameters(_0x959379);if(_0x6ad454['isDangerous'])return{'valid':![],'sqlType':_0x6ad454,'tables':_0x4d53cc,'parameters':_0x29aea2,'message':_0x6ad454[_0x4f146f(0x140)]||_0x6ad454[_0x4f146f(0x151)]+_0x4f146f(0x13e)};if(_0x6ad454[_0x4f146f(0x151)]===_0x4f146f(0x14e))return{'valid':![],'sqlType':_0x6ad454,'tables':_0x4d53cc,'parameters':_0x29aea2,'message':_0x4f146f(0x14d)};return{'valid':!![],'sqlType':_0x6ad454,'tables':_0x4d53cc,'parameters':_0x29aea2,'message':_0x6ad454[_0x4f146f(0x151)]+_0x4f146f(0x132)+(_0x4d53cc[_0x4f146f(0x139)]?_0x4d53cc[_0x4f146f(0x152)](',\x20'):_0x4f146f(0x12c))+(_0x29aea2[_0x4f146f(0x139)]?_0x4f146f(0x133)+_0x29aea2['join'](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a216_0x5576(){const _0x403e0e=['4292799qRUdCQ','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','9177751qExaJs','582533xTGvcs','20pOdJqe','114rotipR','11388BRXTUF','322gVFroP','Tip:\x20`','1259260JqzrHH','3684kdTfJy','4130lFeUTB','Run\x20`','20968JlovAf','10lGABRW','1377zttiPv','\x20auth`\x20to\x20login\x20first.'];a216_0x5576=function(){return _0x403e0e;};return a216_0x5576();}const a216_0x2fb150=a216_0x4306;(function(_0x2eefec,_0x1b13a7){const _0x4a7953=a216_0x4306,_0x294999=_0x2eefec();while(!![]){try{const _0x5c825e=-parseInt(_0x4a7953(0x1d2))/0x1*(parseInt(_0x4a7953(0x1ce))/0x2)+parseInt(_0x4a7953(0x1d8))/0x3+-parseInt(_0x4a7953(0x1cb))/0x4*(parseInt(_0x4a7953(0x1d0))/0x5)+-parseInt(_0x4a7953(0x1cc))/0x6*(-parseInt(_0x4a7953(0x1ca))/0x7)+-parseInt(_0x4a7953(0x1d4))/0x8*(-parseInt(_0x4a7953(0x1d6))/0x9)+-parseInt(_0x4a7953(0x1d5))/0xa*(parseInt(_0x4a7953(0x1c9))/0xb)+-parseInt(_0x4a7953(0x1d1))/0xc*(-parseInt(_0x4a7953(0x1cd))/0xd);if(_0x5c825e===_0x1b13a7)break;else _0x294999['push'](_0x294999['shift']());}catch(_0x25dd5e){_0x294999['push'](_0x294999['shift']());}}}(a216_0x5576,0xe1774));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a216_0x4306(_0x36eebd,_0x1b9e32){_0x36eebd=_0x36eebd-0x1c9;const _0x557662=a216_0x5576();let _0x4306ab=_0x557662[_0x36eebd];return _0x4306ab;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a216_0x2fb150(0x1d3)+CLI_BIN_NAME+a216_0x2fb150(0x1d7),'configMissingHint':['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.',a216_0x2fb150(0x1cf)+CLI_BIN_NAME+a216_0x2fb150(0x1d9)]['join']('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a217_0x522d(){const _0x422d8d=['4821032RqCver','910CxsTcM','824287pZaybV','map','1051755NsAOgc','2hMKvns','1809hnZHaq','6993FrIkuM','1844HaGkam','5802665YYUswp','name','625975CzCZsK','6MgfcZf','12MzgGZt'];a217_0x522d=function(){return _0x422d8d;};return a217_0x522d();}(function(_0x5411c9,_0x1cf268){const _0x11f152=a217_0x3a78,_0x941da3=_0x5411c9();while(!![]){try{const _0x59464e=-parseInt(_0x11f152(0x107))/0x1*(-parseInt(_0x11f152(0xfc))/0x2)+parseInt(_0x11f152(0xfd))/0x3*(-parseInt(_0x11f152(0xff))/0x4)+-parseInt(_0x11f152(0x109))/0x5*(parseInt(_0x11f152(0x103))/0x6)+parseInt(_0x11f152(0x102))/0x7+-parseInt(_0x11f152(0x105))/0x8+parseInt(_0x11f152(0xfe))/0x9*(parseInt(_0x11f152(0x106))/0xa)+-parseInt(_0x11f152(0x100))/0xb*(-parseInt(_0x11f152(0x104))/0xc);if(_0x59464e===_0x1cf268)break;else _0x941da3['push'](_0x941da3['shift']());}catch(_0x27ee88){_0x941da3['push'](_0x941da3['shift']());}}}(a217_0x522d,0x66c6b));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a217_0x40de4c}from'@lovrabet/cli-framework';function a217_0x3a78(_0x3fa607,_0xde7dee){_0x3fa607=_0x3fa607-0xfc;const _0x522d5b=a217_0x522d();let _0x3a785c=_0x522d5b[_0x3fa607];return _0x3a785c;}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0xb5f5da){const _0x29282b=a217_0x3a78,_0x5be6a1=a217_0x40de4c(_0xb5f5da,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0xb5f5da))return _0x5be6a1;return _0x5be6a1[_0x29282b(0x108)](_0x85e27=>_0x85e27[_0x29282b(0x101)]==='yes'?{..._0x85e27,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x85e27);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a218_0x39dc(){var _0xfbfbfb=['structuredErrors','985104nYWvRe','def','28vQnvNI','2791710qsafxs','677862gnAXAz','2153836cZGWHA','1704726iaHVeg','1004aegIha','350oQbzbn','22615QKDGlx','4049560lozxdx','compress'];a218_0x39dc=function(){return _0xfbfbfb;};return a218_0x39dc();}(function(_0x2cd5d2,_0x45ec2f){var _0x17ac00=a218_0x7871,_0x5e170b=_0x2cd5d2();while(!![]){try{var _0x40c0ae=parseInt(_0x17ac00(0x1d8))/0x1+parseInt(_0x17ac00(0x1d9))/0x2+parseInt(_0x17ac00(0x1d7))/0x3+-parseInt(_0x17ac00(0x1ce))/0x4*(-parseInt(_0x17ac00(0x1d0))/0x5)+parseInt(_0x17ac00(0x1da))/0x6*(parseInt(_0x17ac00(0x1d6))/0x7)+-parseInt(_0x17ac00(0x1d1))/0x8+parseInt(_0x17ac00(0x1d4))/0x9*(-parseInt(_0x17ac00(0x1cf))/0xa);if(_0x40c0ae===_0x45ec2f)break;else _0x5e170b['push'](_0x5e170b['shift']());}catch(_0x3b7829){_0x5e170b['push'](_0x5e170b['shift']());}}}(a218_0x39dc,0x975b0));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x2d9ea1){var _0x3da33e=a218_0x7871;return _0x2d9ea1?.[_0x3da33e(0x1d3)]===!![];}function a218_0x7871(_0xd59a0c,_0x368636){_0xd59a0c=_0xd59a0c-0x1ce;var _0x39dcbf=a218_0x39dc();var _0x78713d=_0x39dcbf[_0xd59a0c];return _0x78713d;}export function resolveErrorOutputFormat(_0x1e296c){var _0x58a14a=a218_0x7871;if(!_0x1e296c[_0x58a14a(0x1d5)])return _0x1e296c['defaultFormat']??_0x58a14a(0x1d2);return resolveOutputConfig({'flags':_0x1e296c['flags']??{},'def':_0x1e296c[_0x58a14a(0x1d5)],'configDefault':_0x1e296c['defaultFormat']})['format'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a219_0x4f6c62=a219_0x3a75;function a219_0x2888(){const _0x3004e9=['446210NdhbEd','menu\x20regroup-start','70ycokLB','11641nkmBjP','659336fLdVxW','1480vNLtwj','menu\x20delete','menu\x20external-link-create','30963tGoXge','menu\x20group-create','1592226aZisov','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','99adnvig','menu\x20group-update','198201EipWfd','service','609380CZeIzg','command'];a219_0x2888=function(){return _0x3004e9;};return a219_0x2888();}(function(_0x4d35e4,_0x351c9f){const _0x2c1af0=a219_0x3a75,_0x44e6bd=_0x4d35e4();while(!![]){try{const _0x253c8c=parseInt(_0x2c1af0(0x16f))/0x1+parseInt(_0x2c1af0(0x175))/0x2*(parseInt(_0x2c1af0(0x17b))/0x3)+parseInt(_0x2c1af0(0x177))/0x4+parseInt(_0x2c1af0(0x171))/0x5+parseInt(_0x2c1af0(0x17d))/0x6+-parseInt(_0x2c1af0(0x176))/0x7*(parseInt(_0x2c1af0(0x178))/0x8)+parseInt(_0x2c1af0(0x17f))/0x9*(-parseInt(_0x2c1af0(0x173))/0xa);if(_0x253c8c===_0x351c9f)break;else _0x44e6bd['push'](_0x44e6bd['shift']());}catch(_0x859a20){_0x44e6bd['push'](_0x44e6bd['shift']());}}}(a219_0x2888,0x4c6c7));const EXPLICIT_YES_COMMANDS=new Set([a219_0x4f6c62(0x17a),a219_0x4f6c62(0x179),a219_0x4f6c62(0x17c),a219_0x4f6c62(0x16e),a219_0x4f6c62(0x174)]);function a219_0x3a75(_0x3e64ab,_0x3a4cc2){_0x3e64ab=_0x3e64ab-0x16e;const _0x288875=a219_0x2888();let _0x3a7583=_0x288875[_0x3e64ab];return _0x3a7583;}export const EXPLICIT_YES_FLAG_DESCRIPTION=a219_0x4f6c62(0x17e);export function requiresExplicitYes(_0x4283a9){const _0x57cc82=a219_0x4f6c62;return EXPLICIT_YES_COMMANDS['has'](_0x4283a9[_0x57cc82(0x170)]+'\x20'+_0x4283a9[_0x57cc82(0x172)]);}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a220_0xbc429b=a220_0x37cc;(function(_0x2c88ca,_0x50cce6){const _0xa04a83=a220_0x37cc,_0x228797=_0x2c88ca();while(!![]){try{const _0x4cca9b=-parseInt(_0xa04a83(0x176))/0x1+-parseInt(_0xa04a83(0x178))/0x2+-parseInt(_0xa04a83(0x173))/0x3+parseInt(_0xa04a83(0x177))/0x4*(parseInt(_0xa04a83(0x172))/0x5)+-parseInt(_0xa04a83(0x16f))/0x6+parseInt(_0xa04a83(0x170))/0x7+-parseInt(_0xa04a83(0x175))/0x8*(-parseInt(_0xa04a83(0x179))/0x9);if(_0x4cca9b===_0x50cce6)break;else _0x228797['push'](_0x228797['shift']());}catch(_0x2e7df5){_0x228797['push'](_0x228797['shift']());}}}(a220_0x1b1c,0x640ec));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a220_0xbc429b(0x174)];export const validateFlags=helpers[a220_0xbc429b(0x171)];function a220_0x37cc(_0x2e2c9c,_0x5a269c){_0x2e2c9c=_0x2e2c9c-0x16f;const _0x1b1c86=a220_0x1b1c();let _0x37cc9f=_0x1b1c86[_0x2e2c9c];return _0x37cc9f;}function a220_0x1b1c(){const _0x1ffe92=['2028564uyBpjV','parseFlags','122328qOWjms','184343GoMiRr','92564gTPvHL','1235568YEetzE','873YsSjPj','1801062hlDfDn','238084bJExRY','validateFlags','145PhQStD'];a220_0x1b1c=function(){return _0x1ffe92;};return a220_0x1b1c();}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a221_0x2a14a3=a221_0x32ce;function a221_0x544f(){const _0x23eed8=['8529405nXFYoS','4xaQNEJ','646712dIrvkR','get','generateFullHelp','14772220fEsMDo','141918Jypsvr','112NWESgD','2054949qXSNaO','Requires\x20appcode\x20(set\x20via\x20`','\x20[args]\x20[flags]','913518OREJgu','8PgRxsy','1020nxCdYo','replace','504TeVGVe','Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','69367KKFHga','\x20workspace\x20init`\x20or\x20--appcode).'];a221_0x544f=function(){return _0x23eed8;};return a221_0x544f();}(function(_0x580d9a,_0x30d12d){const _0x13095a=a221_0x32ce,_0x2f81e7=_0x580d9a();while(!![]){try{const _0x1ed34c=parseInt(_0x13095a(0xdc))/0x1*(parseInt(_0x13095a(0xdf))/0x2)+-parseInt(_0x13095a(0xe6))/0x3*(parseInt(_0x13095a(0xea))/0x4)+-parseInt(_0x13095a(0xde))/0x5+parseInt(_0x13095a(0xe4))/0x6*(parseInt(_0x13095a(0xda))/0x7)+parseInt(_0x13095a(0xe5))/0x8*(-parseInt(_0x13095a(0xe9))/0x9)+-parseInt(_0x13095a(0xe3))/0xa+-parseInt(_0x13095a(0xe0))/0xb*(-parseInt(_0x13095a(0xd8))/0xc);if(_0x1ed34c===_0x30d12d)break;else _0x2f81e7['push'](_0x2f81e7['shift']());}catch(_0x3b247e){_0x2f81e7['push'](_0x2f81e7['shift']());}}}(a221_0x544f,0xd32cd));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';function a221_0x32ce(_0x5100d9,_0x40a805){_0x5100d9=_0x5100d9-0xd8;const _0x544ffd=a221_0x544f();let _0x32ce09=_0x544ffd[_0x5100d9];return _0x32ce09;}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':_0x57be34=>serviceGroups[a221_0x2a14a3(0xe1)](_0x57be34),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a221_0x2a14a3(0xe7)+CLI_BIN_NAME+a221_0x2a14a3(0xdd),'serviceUsageSuffix':a221_0x2a14a3(0xe8)});export function generateCommandHelp(_0x2e14b8){const _0x6f0a1d=a221_0x2a14a3,_0x3e617e=generators['generateCommandHelp'](_0x2e14b8);if(!requiresExplicitYes(_0x2e14b8))return _0x3e617e;return _0x3e617e[_0x6f0a1d(0xd9)](_0x6f0a1d(0xdb),'Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.');}export const generateServiceHelp=generators['generateServiceHelp'];export const generateFullHelp=generators[a221_0x2a14a3(0xe2)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x114764,_0x317f81){var _0x3867a8=a222_0x5a68,_0x2768ce=_0x114764();while(!![]){try{var _0x573c4d=parseInt(_0x3867a8(0xc8))/0x1+-parseInt(_0x3867a8(0xd1))/0x2+parseInt(_0x3867a8(0xcf))/0x3*(-parseInt(_0x3867a8(0xce))/0x4)+parseInt(_0x3867a8(0xd2))/0x5*(parseInt(_0x3867a8(0xd0))/0x6)+-parseInt(_0x3867a8(0xca))/0x7*(parseInt(_0x3867a8(0xcb))/0x8)+parseInt(_0x3867a8(0xcd))/0x9*(-parseInt(_0x3867a8(0xcc))/0xa)+-parseInt(_0x3867a8(0xc9))/0xb;if(_0x573c4d===_0x317f81)break;else _0x2768ce['push'](_0x2768ce['shift']());}catch(_0x2d9ef5){_0x2768ce['push'](_0x2768ce['shift']());}}}(a222_0x2752,0x6898d));export{runCommand}from'../framework/runner.js';function a222_0x5a68(_0x3d9bf4,_0x368eb5){_0x3d9bf4=_0x3d9bf4-0xc8;var _0x2752c3=a222_0x2752();var _0x5a6898=_0x2752c3[_0x3d9bf4];return _0x5a6898;}export{parseFlags,validateFlags}from'../framework/flags.js';function a222_0x2752(){var _0x11bbd0=['668139DEsaIA','26172SXlbdr','53704GCaCGr','595UpGnKp','690193nmFEXl','3382621kcdHOW','1435acDtfL','752AHezam','80xxsqMx','230058gdiqZQ','4dmCniw'];a222_0x2752=function(){return _0x11bbd0;};return a222_0x2752();}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(_0x2f01c4,_0x254cbd){const _0x2b66bd=a223_0x1b13,_0x59a49e=_0x2f01c4();while(!![]){try{const _0x465f72=parseInt(_0x2b66bd(0x134))/0x1*(-parseInt(_0x2b66bd(0x138))/0x2)+-parseInt(_0x2b66bd(0x139))/0x3+-parseInt(_0x2b66bd(0x144))/0x4*(parseInt(_0x2b66bd(0x133))/0x5)+-parseInt(_0x2b66bd(0x13f))/0x6*(-parseInt(_0x2b66bd(0x13e))/0x7)+-parseInt(_0x2b66bd(0x135))/0x8*(-parseInt(_0x2b66bd(0x137))/0x9)+parseInt(_0x2b66bd(0x13b))/0xa+parseInt(_0x2b66bd(0x143))/0xb;if(_0x465f72===_0x254cbd)break;else _0x59a49e['push'](_0x59a49e['shift']());}catch(_0x4420f1){_0x59a49e['push'](_0x59a49e['shift']());}}}(a223_0xfe32,0xb68b8));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()}});function a223_0xfe32(){const _0x160e63=['endsWith','error','validation','jq:\x20','jqFilter','risk','command','pretty','message','3875PDTvcr','470333eTdqkP','2728dkLuNE','hint','34083zkvQHB','2ZKQsKK','4122039UbPezb','json','10098600tRMKFT','code','stringify','371602NtfPVS','90yJleXl','data','_notice','update','5675813rXsaXJ','5272dzPCek','format'];a223_0xfe32=function(){return _0x160e63;};return a223_0xfe32();}export function formatOutput(_0x29000a,_0x4011b2){const _0x2dd974=a223_0x1b13,_0x2177a3=_0x29000a[_0x2dd974(0x141)],{_notice:_0x5c28cd,..._0x534293}=_0x29000a;void _0x5c28cd,baseFormatOutput(_0x534293,_0x4011b2),_0x4011b2[_0x2dd974(0x145)]===_0x2dd974(0x131)&&printPrettyNotice(_0x2177a3);}export function formatCliError(_0x140c6c,_0x34102e){const _0x49f60d=a223_0x1b13;if(_0x34102e[_0x49f60d(0x145)]===_0x49f60d(0x131))return![];const _0x134eab=_0x140c6c[_0x49f60d(0x140)],_0x39c80e={'ok':![],'command':_0x34102e[_0x49f60d(0x14c)],'risk':_0x34102e[_0x49f60d(0x14b)],'data':_0x134eab??null,'error':{'code':_0x140c6c[_0x49f60d(0x13c)],'message':_0x140c6c['message'],..._0x140c6c[_0x49f60d(0x136)]?{'hint':_0x140c6c[_0x49f60d(0x136)]}:{}}},_0x153e5a=_0x34102e[_0x49f60d(0x145)]===_0x49f60d(0x13a)?JSON[_0x49f60d(0x13d)](_0x39c80e,null,0x2):JSON[_0x49f60d(0x13d)](_0x39c80e);let _0x176e70=_0x153e5a;if(_0x34102e[_0x49f60d(0x14a)]?.['trim']())try{_0x176e70=applyJqFilter(_0x153e5a,_0x34102e['jqFilter']);}catch(_0x11817e){const _0x3d0393=_0x11817e instanceof CliError?_0x11817e:CliErrors[_0x49f60d(0x148)](_0x49f60d(0x149)+(_0x11817e instanceof Error?_0x11817e['message']:String(_0x11817e))),_0x5015f7={..._0x39c80e,'error':{'code':_0x3d0393[_0x49f60d(0x13c)],'message':_0x3d0393['message'],..._0x3d0393[_0x49f60d(0x136)]?{'hint':_0x3d0393[_0x49f60d(0x136)]}:{},'cause':_0x39c80e['error']}};_0x176e70=_0x34102e[_0x49f60d(0x145)]==='json'?JSON['stringify'](_0x5015f7,null,0x2):JSON[_0x49f60d(0x13d)](_0x5015f7);}return process['stdout']['write'](_0x176e70[_0x49f60d(0x146)]('\x0a')?_0x176e70:_0x176e70+'\x0a'),!![];}function a223_0x1b13(_0x1d87cc,_0x2a304c){_0x1d87cc=_0x1d87cc-0x131;const _0xfe3273=a223_0xfe32();let _0x1b139d=_0xfe3273[_0x1d87cc];return _0x1b139d;}function printPrettyNotice(_0xb298d4){const _0xf0ba79=a223_0x1b13;if(!_0xb298d4?.[_0xf0ba79(0x142)])return;console[_0xf0ba79(0x147)](_0xb298d4[_0xf0ba79(0x142)][_0xf0ba79(0x132)]+'\x20('+_0xb298d4[_0xf0ba79(0x142)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a224_0x2db8(_0x3cd20b,_0x24fe1c){_0x3cd20b=_0x3cd20b-0x109;var _0x448d01=a224_0x448d();var _0x2db89c=_0x448d01[_0x3cd20b];return _0x2db89c;}(function(_0x608c5,_0x1b3983){var _0x197ea1=a224_0x2db8,_0x278e2c=_0x608c5();while(!![]){try{var _0x453385=parseInt(_0x197ea1(0x10a))/0x1*(parseInt(_0x197ea1(0x109))/0x2)+-parseInt(_0x197ea1(0x10f))/0x3+-parseInt(_0x197ea1(0x10c))/0x4*(parseInt(_0x197ea1(0x113))/0x5)+-parseInt(_0x197ea1(0x10b))/0x6+parseInt(_0x197ea1(0x111))/0x7+-parseInt(_0x197ea1(0x110))/0x8*(parseInt(_0x197ea1(0x112))/0x9)+-parseInt(_0x197ea1(0x10e))/0xa*(-parseInt(_0x197ea1(0x10d))/0xb);if(_0x453385===_0x1b3983)break;else _0x278e2c['push'](_0x278e2c['shift']());}catch(_0x510ab9){_0x278e2c['push'](_0x278e2c['shift']());}}}(a224_0x448d,0xad491));function a224_0x448d(){var _0x311900=['5334325nxIlFL','2qxYxbu','1096146lvczmU','7023384pGLfNC','4wIGAtP','793133KiPzZf','170PxRffr','249543vnfrQA','500064YtUliz','9772546xlpFGF','99ySJAZK'];a224_0x448d=function(){return _0x311900;};return a224_0x448d();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a225_0x75aa(){const _0x52d2dd=['Available\x20aliases:\x20','validation','`\x20requires\x20either\x20--code\x20or\x20--alias.','flags','name','2736522tbgNjA','string','alias','some','join','4246522QKliPF','8344776ZbVBAk','12jXkAHQ','\x22.\x20','Unknown\x20alias\x20\x22','\x20api\x20pull`\x20first.','map','12317913FaLPIw','code','635512JInskc','26jtbyIb','No\x20api.ts\x20found\x20in\x20','length','type','841080eHMRuY','10662GnbePG'];a225_0x75aa=function(){return _0x52d2dd;};return a225_0x75aa();}function a225_0x1e1f(_0x5ea327,_0x42bb43){_0x5ea327=_0x5ea327-0xdd;const _0x75aa12=a225_0x75aa();let _0x1e1ff7=_0x75aa12[_0x5ea327];return _0x1e1ff7;}(function(_0x5d183b,_0x2b8fc6){const _0x44e397=a225_0x1e1f,_0x302ad3=_0x5d183b();while(!![]){try{const _0x27d784=parseInt(_0x44e397(0xde))/0x1*(parseInt(_0x44e397(0xf3))/0x2)+-parseInt(_0x44e397(0xeb))/0x3*(parseInt(_0x44e397(0xf2))/0x4)+-parseInt(_0x44e397(0xdd))/0x5+parseInt(_0x44e397(0xe4))/0x6+parseInt(_0x44e397(0xe9))/0x7+-parseInt(_0x44e397(0xea))/0x8+parseInt(_0x44e397(0xf0))/0x9;if(_0x27d784===_0x2b8fc6)break;else _0x302ad3['push'](_0x302ad3['shift']());}catch(_0x42b4ef){_0x302ad3['push'](_0x302ad3['shift']());}}}(a225_0x75aa,0xb08e3));import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x3d20c9,_0x20123d,_0x3713e6,_0x1f7eb7){const _0x459bac=a225_0x1e1f,_0x435fb6=_0x3d20c9[_0x459bac(0xe2)][_0x459bac(0xe7)](_0x30ace4=>_0x30ace4[_0x459bac(0xe3)]===_0x459bac(0xf1)&&_0x30ace4['type']===_0x459bac(0xe5)),_0x7a9de6=_0x3d20c9[_0x459bac(0xe2)][_0x459bac(0xe7)](_0x4e29bb=>_0x4e29bb[_0x459bac(0xe3)]===_0x459bac(0xe6)&&_0x4e29bb[_0x459bac(0xf6)]===_0x459bac(0xe5));if(!_0x435fb6||!_0x7a9de6)return;const _0xb43f86=_0x20123d[_0x459bac(0xf1)]?String(_0x20123d[_0x459bac(0xf1)]):'',_0x537204=_0x20123d['alias']?String(_0x20123d[_0x459bac(0xe6)]):'';if(!_0xb43f86&&!_0x537204)throw CliErrors[_0x459bac(0xe0)]('`'+_0x1f7eb7+_0x459bac(0xe1));if(_0x537204&&!_0xb43f86){const _0x19a979=resolveAlias(_0x3713e6,_0x537204);if(!_0x19a979){const _0x2d9b58=listAliases(_0x3713e6)[_0x459bac(0xef)](_0x568f8e=>_0x568f8e[_0x459bac(0xe6)]),_0x37d033=_0x2d9b58[_0x459bac(0xf5)]?_0x459bac(0xdf)+_0x2d9b58[_0x459bac(0xe8)](',\x20'):_0x459bac(0xf4)+_0x3713e6+'.\x20Run\x20`'+CLI_BIN_NAME+_0x459bac(0xee);throw CliErrors[_0x459bac(0xe0)](_0x459bac(0xed)+_0x537204+_0x459bac(0xec)+_0x37d033);}_0x20123d[_0x459bac(0xf1)]=_0x19a979;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a226_0x480213=a226_0x3b11;(function(_0x2c3f2d,_0x43f98d){const _0x574b55=a226_0x3b11,_0x273478=_0x2c3f2d();while(!![]){try{const _0x1b560f=parseInt(_0x574b55(0x20e))/0x1+-parseInt(_0x574b55(0x206))/0x2*(-parseInt(_0x574b55(0x203))/0x3)+parseInt(_0x574b55(0x224))/0x4+-parseInt(_0x574b55(0x21d))/0x5+parseInt(_0x574b55(0x1fd))/0x6*(parseInt(_0x574b55(0x207))/0x7)+-parseInt(_0x574b55(0x22a))/0x8*(parseInt(_0x574b55(0x217))/0x9)+-parseInt(_0x574b55(0x21c))/0xa;if(_0x1b560f===_0x43f98d)break;else _0x273478['push'](_0x273478['shift']());}catch(_0x409fce){_0x273478['push'](_0x273478['shift']());}}}(a226_0xc657,0x93868));import{resolveCommandAuthMode,runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a226_0x4a7313}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x1ca0b8){const _0x4f32a4=a226_0x3b11;return typeof _0x1ca0b8===_0x4f32a4(0x1f0)&&_0x1ca0b8[_0x4f32a4(0x212)]()?_0x1ca0b8[_0x4f32a4(0x212)]():undefined;}function resolveEnvAppCode(){const _0x38a4bf=a226_0x3b11,_0x198174=stringFlag(process.env.RABETBASE_APPCODE);if(_0x198174)return{'name':_0x38a4bf(0x1ff),'value':_0x198174};const _0x43ff56=stringFlag(process.env.LOVRABET_APPCODE);if(_0x43ff56)return{'name':'LOVRABET_APPCODE','value':_0x43ff56};return undefined;}function hasExplicitAppCode(_0x1d0186,_0xcb13af){const _0x12a34e=a226_0x3b11;return!!(stringFlag(_0x1d0186[_0x12a34e(0x205)])||stringFlag(_0xcb13af[_0x12a34e(0x205)]));}function assertEnvAppCodeNotIgnored(_0x5cd3ef,_0x16db64,_0x35c9cc){const _0x53e4fe=a226_0x3b11;if(!_0x16db64||_0x35c9cc||_0x5cd3ef===_0x16db64[_0x53e4fe(0x1fe)])return;const _0x2c6277=_0x5cd3ef?_0x53e4fe(0x1ef)+_0x5cd3ef+'\x22.':'No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.';throw CliErrors[_0x53e4fe(0x222)](_0x16db64[_0x53e4fe(0x1fa)]+'='+_0x16db64['value']+_0x53e4fe(0x22b)+_0x2c6277+'\x20'+(_0x53e4fe(0x226)+_0x16db64[_0x53e4fe(0x1fa)]+'\x22.'));}function a226_0x3b11(_0x217215,_0x15feb7){_0x217215=_0x217215-0x1ee;const _0xc65701=a226_0xc657();let _0x3b11f3=_0xc65701[_0x217215];return _0x3b11f3;}export function createPipelineEnv(_0x4fb55f,_0x716c14,_0x1b31fa=[]){const _0x33423e=a226_0x3b11;return{'rawFlags':_0x716c14,'args':_0x1b31fa,'resolveAppCode':()=>_0x4fb55f[_0x33423e(0x1f3)],'resolveCookie':()=>_0x4fb55f['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a226_0x4a7313(_0x716c14),'defaultFormat':_0x4fb55f[_0x33423e(0x218)],'defaultPageSize':_0x4fb55f[_0x33423e(0x1f5)],'defaultVerbose':_0x4fb55f[_0x33423e(0x1f1)],'apiDir':_0x4fb55f[_0x33423e(0x21a)],'riskLevel':_0x4fb55f['riskLevel'],'selectedAppName':_0x4fb55f[_0x33423e(0x209)],'mergedCli':{'defaultApp':_0x4fb55f[_0x33423e(0x1fc)],'currentApp':_0x4fb55f[_0x33423e(0x221)],'appCode':_0x4fb55f[_0x33423e(0x1f3)],'apps':_0x4fb55f[_0x33423e(0x214)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a226_0x480213(0x227)](_0x1aea0d=>PIPELINE_FLAG_NAMES['has'](_0x1aea0d[a226_0x480213(0x1fa)]))[a226_0x480213(0x20c)](({name:_0x4addd4,type:_0x2656a1,description:_0x48ed8b})=>({'name':_0x4addd4,'type':_0x2656a1,'description':_0x48ed8b})),'formatOutput':formatOutput,'getCommandLabel'(_0x44bad4){const _0x232850=a226_0x480213;return CLI_BIN_NAME+'\x20'+_0x44bad4[_0x232850(0x213)]+'\x20'+_0x44bad4['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x1de474){const _0x2dae8a=a226_0x480213;return CliErrors[_0x2dae8a(0x222)](_0x1de474);}},async 'prepare'(_0x51ff20,_0x3537a5,_0xdf4216,_0x4c1be9){const _0x229581=a226_0x480213,_0x4e93e2=_0x3537a5[_0x229581(0x21a)]||DEFAULT_API_DIR;resolveAliasToCode(_0x51ff20,_0xdf4216,_0x4e93e2,_0x4c1be9);const _0xb30e9f=resolveCommandAuthMode(_0x51ff20);let _0x1e8544='';if(_0xb30e9f!==_0x229581(0x1ee)){_0x1e8544=_0x3537a5['resolveCookie']()||'';if(!_0x1e8544){if(_0xb30e9f===_0x229581(0x21b))throw CliErrors[_0x229581(0x20f)]();}else{const {setActiveCookie:_0x22e610}=await import(_0x229581(0x20a));_0x22e610(_0x1e8544);}}const _0xe2f7ce=_0x3537a5[_0x229581(0x21f)]()??'';if(_0x51ff20['requiresAppCode']!==![]){assertEnvAppCodeNotIgnored(_0xe2f7ce,resolveEnvAppCode(),hasExplicitAppCode(_0xdf4216,_0x3537a5[_0x229581(0x1f6)]));if(!_0xe2f7ce)throw CliErrors[_0x229581(0x201)](_0x229581(0x223)+CLI_BIN_NAME+_0x229581(0x1f9));}return{'defaults':{'booleans':{'verbose':_0x3537a5[_0x229581(0x229)]},'numbers':{'pagesize':_0x3537a5[_0x229581(0x228)]}},'extras':{'appCode':_0xe2f7ce,'cookie':_0x1e8544,'apiDomain':_0x3537a5['resolveApiDomain'](),'apiDir':_0x4e93e2,'selectedAppName':_0x3537a5[_0x229581(0x21e)],'mergedCli':_0x3537a5[_0x229581(0x202)]}};},async 'confirmHighRisk'({env:_0x494839,commandLabel:_0x2d56a0}){const _0xa3af33=a226_0x480213;if(_0x494839['isNonInteractive'])throw CliErrors['validation']('High-risk\x20operation\x20`'+_0x2d56a0+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmationPrompt({'lines':['⚠\x20\x20High-risk\x20operation:\x20'+_0x2d56a0,_0xa3af33(0x204)],'createCancelledError':_0x1c61d4=>CliErrors[_0xa3af33(0x1f7)](_0x1c61d4)});},async 'finalize'(){const _0x3489c8=a226_0x480213,{clearActiveCookie:_0x32a491}=await import(_0x3489c8(0x20a));_0x32a491();}};export async function runCommand(_0x2427cc,_0x51593b){assertRejectedFlags(_0x2427cc,_0x51593b['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2427cc)?withUpdateNotice(_0x2427cc):_0x2427cc,_0x51593b,runnerAdapter);}function assertRejectedFlags(_0x3fadc3,_0x158c56){const _0x42f941=a226_0x480213;for(const _0x5c2f64 of _0x3fadc3[_0x42f941(0x210)]??[]){const _0x464f75=GLOBAL_FLAGS[_0x42f941(0x1f2)](_0xe1b061=>_0xe1b061[_0x42f941(0x1fa)]===_0x5c2f64['name']),_0x10c7ed=new Set([_0x5c2f64[_0x42f941(0x1fa)],toCamelCase(_0x5c2f64[_0x42f941(0x1fa)]),_0x464f75?.[_0x42f941(0x216)]]),_0x1e2bc3=[..._0x10c7ed][_0x42f941(0x220)](_0x11246d=>{if(!_0x11246d)return![];const _0x2c6ed3=_0x158c56[_0x11246d];return _0x2c6ed3!==undefined&&_0x2c6ed3!==null&&_0x2c6ed3!==![];});if(_0x1e2bc3)throw CliErrors[_0x42f941(0x222)](_0x5c2f64[_0x42f941(0x1fb)],_0x5c2f64[_0x42f941(0x219)]);}}function toCamelCase(_0x3a76e8){const _0x456825=a226_0x480213;return _0x3a76e8[_0x456825(0x208)](/-([a-z])/g,(_0x5173b5,_0x46f69b)=>_0x46f69b[_0x456825(0x1f4)]());}function shouldAttachUpdateNotice(_0x6f3d51){const _0x4ed794=a226_0x480213;if(_0x6f3d51[_0x4ed794(0x200)]===![])return![];return![_0x4ed794(0x20b),'schema',_0x4ed794(0x211)][_0x4ed794(0x20d)](_0x6f3d51[_0x4ed794(0x213)]);}function withUpdateNotice(_0x239316){return{..._0x239316,async 'execute'(_0x50e8df){const _0x503804=a226_0x3b11,_0x1f5a1a=shouldResolveUpdateNotice(_0x50e8df)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x503804(0x22d)](null),_0xff4c6f=await _0x239316[_0x503804(0x1f8)](_0x50e8df);return attachUpdateNotice(_0xff4c6f,await _0x1f5a1a);}};}function shouldResolveUpdateNotice(_0x5b010f){const _0x46a2fb=a226_0x480213;return _0x5b010f['format']===_0x46a2fb(0x215)&&!_0x5b010f['nonInteractive'];}function a226_0xc657(){const _0x534934=['pretty','meowKey','4938471TJdRKF','format','hint','apiDir','required','7240160jCMqkX','5853585QMBXbv','selectedAppName','resolveAppCode','some','currentApp','validation','Set\x20appcode\x20via\x20`','3690460yUhYoF','object','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','filter','defaultPageSize','defaultVerbose','16XjEVUF','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','_notice','resolve','none','Current\x20resolved\x20appcode\x20is\x20\x22','string','verbose','find','appCode','toUpperCase','pageSize','rawFlags','cancelled','execute','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','name','message','defaultApp','6xlQmwY','value','RABETBASE_APPCODE','hasFormat','configMissing','mergedCli','2718726hLwinx','\x20\x20\x20Continue?\x20[y/N]\x20','appcode','2RqVJqN','4893623FhzTWO','replace','explicitAppName','../core/api-client.js','update','map','includes','1068489vjaFYm','authRequired','rejectedFlags','doctor','trim','service','apps'];a226_0xc657=function(){return _0x534934;};return a226_0xc657();}function attachUpdateNotice(_0x31e450,_0x1123e3){const _0x1adffd=a226_0x480213;if(!_0x1123e3||!_0x31e450||typeof _0x31e450!==_0x1adffd(0x225))return _0x31e450;const _0x2478ce=_0x31e450,_0x4e5a86=typeof _0x2478ce[_0x1adffd(0x22c)]===_0x1adffd(0x225)&&_0x2478ce[_0x1adffd(0x22c)]!==null?_0x2478ce[_0x1adffd(0x22c)]:{};return{..._0x2478ce,'_notice':{..._0x4e5a86,'update':_0x1123e3}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a227_0x3e05(_0x287f76,_0x48dbfe){_0x287f76=_0x287f76-0x1b7;const _0x4d0eb5=a227_0x4d0e();let _0x3e05b4=_0x4d0eb5[_0x287f76];return _0x3e05b4;}(function(_0x38fe27,_0x5bfbb1){const _0x52ee87=a227_0x3e05,_0x25094e=_0x38fe27();while(!![]){try{const _0x1310b0=-parseInt(_0x52ee87(0x1bc))/0x1*(-parseInt(_0x52ee87(0x1c2))/0x2)+parseInt(_0x52ee87(0x1c3))/0x3*(parseInt(_0x52ee87(0x1c0))/0x4)+-parseInt(_0x52ee87(0x1c1))/0x5+-parseInt(_0x52ee87(0x1b8))/0x6*(-parseInt(_0x52ee87(0x1bb))/0x7)+parseInt(_0x52ee87(0x1bf))/0x8+-parseInt(_0x52ee87(0x1b9))/0x9*(parseInt(_0x52ee87(0x1bd))/0xa)+parseInt(_0x52ee87(0x1be))/0xb*(-parseInt(_0x52ee87(0x1b7))/0xc);if(_0x1310b0===_0x5bfbb1)break;else _0x25094e['push'](_0x25094e['shift']());}catch(_0x5239ab){_0x25094e['push'](_0x25094e['shift']());}}}(a227_0x4d0e,0x2d30f));import{buildSchemaPayload as a227_0x2bfd11}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x43e63f=a227_0x3e05,{serviceRegistry:_0x5e446f,findDefinition:_0xda2141}=await import(_0x43e63f(0x1ba));return a227_0x2bfd11({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x5e446f,'buildAllFlags':buildAllFlags,'findDefinition':_0xda2141});}function a227_0x4d0e(){const _0x18eff5=['2EBByRW','75wziGiD','36ciMkug','2334wjUqGF','180ZFiRek','../commands/registry.js','3465InFIYv','305286Gcofvk','11650reifJb','1729849hAMrna','1573376FjjjzY','46496GuqCkT','1524665hnXgtX'];a227_0x4d0e=function(){return _0x18eff5;};return a227_0x4d0e();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a228_0xe9bf(_0x5c9581,_0x518282){_0x5c9581=_0x5c9581-0x88;var _0x57cf5f=a228_0x57cf();var _0xe9bf1f=_0x57cf5f[_0x5c9581];return _0xe9bf1f;}function a228_0x57cf(){var _0x2ebdde=['2766784BnWAKH','27oSACfp','2121021xrDGZX','287192wRFsyY','344208uWIMix','39DUeGJm','1764735ITuZrl','125140SzAkMR','60068ooXsMr','2PAvivp'];a228_0x57cf=function(){return _0x2ebdde;};return a228_0x57cf();}(function(_0x46af21,_0x57790a){var _0x46cbff=a228_0xe9bf,_0x291321=_0x46af21();while(!![]){try{var _0x7a64f9=-parseInt(_0x46cbff(0x8a))/0x1*(parseInt(_0x46cbff(0x8e))/0x2)+-parseInt(_0x46cbff(0x90))/0x3*(-parseInt(_0x46cbff(0x89))/0x4)+parseInt(_0x46cbff(0x91))/0x5+-parseInt(_0x46cbff(0x8f))/0x6+parseInt(_0x46cbff(0x8d))/0x7+-parseInt(_0x46cbff(0x8b))/0x8+-parseInt(_0x46cbff(0x8c))/0x9*(-parseInt(_0x46cbff(0x88))/0xa);if(_0x7a64f9===_0x57790a)break;else _0x291321['push'](_0x291321['shift']());}catch(_0x5ec246){_0x291321['push'](_0x291321['shift']());}}}(a228_0x57cf,0x306a1));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a229_0x158744=a229_0x5899;(function(_0x595a69,_0x536244){const _0x216ce5=a229_0x5899,_0x464692=_0x595a69();while(!![]){try{const _0xd185ca=parseInt(_0x216ce5(0x18a))/0x1*(parseInt(_0x216ce5(0x187))/0x2)+-parseInt(_0x216ce5(0x18b))/0x3+parseInt(_0x216ce5(0x186))/0x4+-parseInt(_0x216ce5(0x191))/0x5+-parseInt(_0x216ce5(0x18d))/0x6*(-parseInt(_0x216ce5(0x18f))/0x7)+parseInt(_0x216ce5(0x190))/0x8+parseInt(_0x216ce5(0x188))/0x9;if(_0xd185ca===_0x536244)break;else _0x464692['push'](_0x464692['shift']());}catch(_0x4dd57a){_0x464692['push'](_0x464692['shift']());}}}(a229_0x527f,0x66b6b));function a229_0x527f(){const _0x4f2a42=['67559ab','498BcSUXs','2026-08-01T08:13:02.979Z','1603jldMuq','5099680iQrbGN','2577070kXqKqU','v2.3.10-beta.2','980628lQftnU','8566byyJcN','4386969tmKQtp','2.3.10-beta.2','73DDkHDB','2296785psoUiP'];a229_0x527f=function(){return _0x4f2a42;};return a229_0x527f();}function a229_0x5899(_0x237341,_0x116e41){_0x237341=_0x237341-0x186;const _0x527fd0=a229_0x527f();let _0x58992a=_0x527fd0[_0x237341];return _0x58992a;}export const VERSION=a229_0x158744(0x189);export const GIT_TAG=a229_0x158744(0x192);export const GIT_COMMIT=a229_0x158744(0x18c);export const BUILD_TIME=a229_0x158744(0x18e);
|