@lovrabet/rabetbase-cli 2.5.2-beta.7 → 2.5.3-beta.1
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.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- 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.d.ts +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +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.d.ts +2 -8
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +2 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -5
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2ce2,_0x3c09cd){const _0x3cb069=a263_0x4570,_0x5b39bb=_0x5f2ce2();while(!![]){try{const _0x5936d1=parseInt(_0x3cb069(0xaa))/0x1*(parseInt(_0x3cb069(0xc4))/0x2)+-parseInt(_0x3cb069(0xa9))/0x3+parseInt(_0x3cb069(0xac))/0x4*(-parseInt(_0x3cb069(0xb8))/0x5)+-parseInt(_0x3cb069(0xc3))/0x6*(parseInt(_0x3cb069(0xaf))/0x7)+-parseInt(_0x3cb069(0xb1))/0x8*(-parseInt(_0x3cb069(0xc2))/0x9)+parseInt(_0x3cb069(0xba))/0xa*(parseInt(_0x3cb069(0xa7))/0xb)+parseInt(_0x3cb069(0xad))/0xc;if(_0x5936d1===_0x3c09cd)break;else _0x5b39bb['push'](_0x5b39bb['shift']());}catch(_0x662e82){_0x5b39bb['push'](_0x5b39bb['shift']());}}}(a263_0x4e8c,0xe9ff5));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x53e6d2){const _0x4bb234=a263_0x4570;if(_0x53e6d2===_0x4bb234(0xb7))return _0x4bb234(0xb2);if(_0x53e6d2===_0x4bb234(0xb5))return _0x4bb234(0xc5);return undefined;}function a263_0x4570(_0x3fcdab,_0x17c908){_0x3fcdab=_0x3fcdab-0xa7;const _0x4e8ce2=a263_0x4e8c();let _0x4570d7=_0x4e8ce2[_0x3fcdab];return _0x4570d7;}async function scanSqlFilesRecursively(_0x31bd41,_0x19a530){const _0x25b329=a263_0x4570,_0x4d3823=[];try{const _0x1fc0c1=await readdir(_0x31bd41,{'withFileTypes':!![]});for(const _0x2cb42b of _0x1fc0c1){const _0x32caf8=join(_0x31bd41,_0x2cb42b[_0x25b329(0xbe)]);if(_0x2cb42b['isDirectory']()){_0x4d3823['push'](...await scanSqlFilesRecursively(_0x32caf8,_0x19a530));continue;}if(!_0x2cb42b['isFile']())continue;const _0x244d19=extname(_0x2cb42b[_0x25b329(0xbe)])[_0x25b329(0xb9)](),_0x487b01=extensionToMode(_0x244d19);if(!_0x487b01)continue;const _0x4e173d=relative(_0x19a530,_0x32caf8)[_0x25b329(0xb4)](/\\/g,'/'),_0x436e8d=_0x4e173d[_0x25b329(0xc1)]('/')[_0x25b329(0xa8)](Boolean),_0x145396=parseSqlPath(_0x436e8d,_0x2cb42b[_0x25b329(0xbe)],_0x244d19);if(!_0x145396)continue;_0x4d3823['push']({'sqlCode':_0x145396[_0x25b329(0xc6)],'sqlName':_0x145396[_0x25b329(0xc0)],'dbDirectory':_0x436e8d[0x0],'filePath':_0x32caf8,'relativePath':_0x4e173d,'lockKey':_0x145396[_0x25b329(0xc6)],'mode':_0x487b01});}}catch(_0x4f3e4d){if(_0x4f3e4d['code']!==_0x25b329(0xbc))throw _0x4f3e4d;}return _0x4d3823;}export async function scanLocalSqlQueries(_0x2bb64f){const _0x4295bd=a263_0x4570;return scanSqlFilesRecursively(_0x2bb64f[_0x4295bd(0xb3)],_0x2bb64f[_0x4295bd(0xb3)]);}export function resolveLocalSqlFilePath(_0x57efd4,_0x3ce81f,_0x4c83a5){const _0x384596=a263_0x4570,_0x4678b2=_0x4c83a5?.[_0x384596(0xb6)]||(_0x4c83a5?.['sqlName']||_0x4c83a5?.[_0x384596(0xbf)]?buildSqlRelativePath(_0x3ce81f,_0x4c83a5?.[_0x384596(0xc0)],_0x4c83a5?.[_0x384596(0xbf)],_0x4c83a5?.[_0x384596(0xbb)]||_0x384596(0xb2),_0x4c83a5?.[_0x384596(0xae)]):buildDefaultSqlFileName(_0x3ce81f,_0x4c83a5?.[_0x384596(0xbb)]||_0x384596(0xb2)));return join(_0x57efd4['sqlRootDir'],_0x4678b2);}export async function directoryExists(_0x375666){try{const _0x2e1f6d=await stat(_0x375666);return _0x2e1f6d['isDirectory']();}catch{return![];}}function parseSqlPath(_0x43d603,_0x33fc71,_0x2c2ebd){const _0x461138=a263_0x4570,_0x4815e8=_0x33fc71[_0x461138(0xb0)](0x0,-_0x2c2ebd[_0x461138(0xbd)]);if(_0x43d603[_0x461138(0xbd)]<0x2)return null;const _0x414100=_0x4815e8['indexOf']('_');if(_0x414100<=0x0||_0x414100>=_0x4815e8[_0x461138(0xbd)]-0x1)return null;const _0x4926ac=_0x4815e8[_0x461138(0xb0)](0x0,_0x414100);if(!isLikelySqlCode(_0x4926ac))return null;return{'sqlCode':_0x4926ac,'sqlName':_0x4815e8[_0x461138(0xb0)](_0x414100+0x1)};}function a263_0x4e8c(){const _0x331247=['288UjebBc','6qmMOmo','2cKmbnu','mybatisXml','sqlCode','18210126fdcmdA','filter','2516574JRjyuL','1094459NeKQpj','test','5164596NCwXyd','4238532xSiEbp','dbId','5541004KuhgVi','slice','194224DVVTjA','sql','sqlRootDir','replace','.xml','path','.sql','5INTxdO','toLowerCase','10DWzbCy','mode','ENOENT','length','name','dbName','sqlName','split'];a263_0x4e8c=function(){return _0x331247;};return a263_0x4e8c();}function isLikelySqlCode(_0x22211b){const _0x16f3fb=a263_0x4570;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x16f3fb(0xab)](_0x22211b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1301fa,_0x3c2fad){const _0x400422=a264_0x4e8e,_0x3739d8=_0x1301fa();while(!![]){try{const _0x1510e6=parseInt(_0x400422(0x1dd))/0x1*(-parseInt(_0x400422(0x1df))/0x2)+parseInt(_0x400422(0x1d8))/0x3+parseInt(_0x400422(0x1da))/0x4+parseInt(_0x400422(0x1db))/0x5+-parseInt(_0x400422(0x1e1))/0x6*(-parseInt(_0x400422(0x1e4))/0x7)+parseInt(_0x400422(0x1d9))/0x8+parseInt(_0x400422(0x1e3))/0x9*(-parseInt(_0x400422(0x1e0))/0xa);if(_0x1510e6===_0x3c2fad)break;else _0x3739d8['push'](_0x3739d8['shift']());}catch(_0x206c2a){_0x3739d8['push'](_0x3739d8['shift']());}}}(a264_0x4fc3,0x840d3));import{readFile}from'node:fs/promises';import a264_0x297fe0 from'node:crypto';export function computeSqlContentHash(_0x34ea46){const _0x4b5fbe=a264_0x4e8e;return a264_0x297fe0['createHash'](_0x4b5fbe(0x1de))[_0x4b5fbe(0x1dc)](_0x34ea46)['digest']('hex');}function a264_0x4fc3(){const _0x47b40c=['2455176OiYszx','4893765pgIJeo','update','6oMOvha','md5','168106DZGtqm','30tbIhcE','745530fNpfNI','utf8','5217489hFLhLD','7ywRqtm','1671375tlwlvg','4083496wXTnZh'];a264_0x4fc3=function(){return _0x47b40c;};return a264_0x4fc3();}function a264_0x4e8e(_0x57e3de,_0x52da34){_0x57e3de=_0x57e3de-0x1d8;const _0x4fc3e9=a264_0x4fc3();let _0x4e8ec=_0x4fc3e9[_0x57e3de];return _0x4e8ec;}export async function computeSqlFileHash(_0x372c30){const _0x54a946=a264_0x4e8e,_0x3db966=await readFile(_0x372c30,_0x54a946(0x1e2));return computeSqlContentHash(_0x3db966);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5743f5,_0xf506da){const _0x14a7ee=a265_0x1e77,_0x9b9ac7=_0x5743f5();while(!![]){try{const _0x199630=parseInt(_0x14a7ee(0xc9))/0x1+-parseInt(_0x14a7ee(0xc3))/0x2+-parseInt(_0x14a7ee(0xc8))/0x3*(-parseInt(_0x14a7ee(0xc4))/0x4)+-parseInt(_0x14a7ee(0xd0))/0x5+-parseInt(_0x14a7ee(0xcc))/0x6*(parseInt(_0x14a7ee(0xd4))/0x7)+-parseInt(_0x14a7ee(0xcf))/0x8*(parseInt(_0x14a7ee(0xcb))/0x9)+-parseInt(_0x14a7ee(0xcd))/0xa*(-parseInt(_0x14a7ee(0xc5))/0xb);if(_0x199630===_0xf506da)break;else _0x9b9ac7['push'](_0x9b9ac7['shift']());}catch(_0x154c88){_0x9b9ac7['push'](_0x9b9ac7['shift']());}}}(a265_0x4d40,0x7a1a3));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a265_0x1e77(_0x23166e,_0x24ad6f){_0x23166e=_0x23166e-0xc3;const _0x4d40fe=a265_0x4d40();let _0x1e779d=_0x4d40fe[_0x23166e];return _0x1e779d;}function a265_0x4d40(){const _0x1f738a=['9rJbwUT','1266AzpWmQ','5930oNORlG','code','1799864xRBZvi','3606725MjtVSt','sqlRoot','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','apps','3136lZsNIS','\x22.\x20','1938588iPTmOS','3841476RRUxbH','22264ZYeAuB','\x22\x20vs\x20lock\x20\x22','lastSync','3HAZjwU','349680GPNVmT','ENOENT'];a265_0x4d40=function(){return _0x1f738a;};return a265_0x4d40();}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x1ddb4a,_0x5eca6a,_0x4a952c,_0x24a020){const _0x39f9cd=a265_0x1e77,_0x2442e8=_0x1ddb4a??createEmptySqlLock();let _0x54574f=_0x2442e8[_0x39f9cd(0xd3)][_0x5eca6a];if(!_0x54574f)return _0x54574f={'sqlRoot':_0x4a952c,'lastSync':'','sqls':{}},_0x2442e8[_0x39f9cd(0xd3)][_0x5eca6a]=_0x54574f,{'lockData':_0x2442e8,'appLock':_0x54574f};if(!_0x54574f[_0x39f9cd(0xd1)])_0x54574f['sqlRoot']=_0x4a952c;else{if(_0x54574f[_0x39f9cd(0xd1)]!==_0x4a952c)throw new Error(_0x24a020+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x4a952c+_0x39f9cd(0xc6)+_0x54574f[_0x39f9cd(0xd1)]+_0x39f9cd(0xd5)+_0x39f9cd(0xd2));}return!_0x54574f['sqls']&&(_0x54574f['sqls']={}),!_0x54574f['lastSync']&&(_0x54574f[_0x39f9cd(0xc7)]=''),{'lockData':_0x2442e8,'appLock':_0x54574f};}export async function readSqlLockFile(_0x506e42){const _0x541411=a265_0x1e77;try{const _0x1ffcad=await readFile(_0x506e42,'utf8');return JSON['parse'](_0x1ffcad);}catch(_0x51c70b){if(_0x51c70b[_0x541411(0xce)]===_0x541411(0xca))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x51c70b));}}export async function writeSqlLockFile(_0x57e72a,_0x59f2cc){await mkdir(dirname(_0x57e72a),{'recursive':!![]}),await writeFile(_0x57e72a,JSON['stringify'](_0x59f2cc,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a267_0x3ae8(){const _0x2d477b=['1058344atukCY','.sql','1317012RacXdX','trim','1571256SJAvOj','457406ENoSbV','mybatisXml','427lpOZho','replace','1612sFXvyo','sql','10895kjpyxl','unknown-sql','4yyjICu','1671210VVHBjm','.xml','unknown-db','db-','68844OFyTLO'];a267_0x3ae8=function(){return _0x2d477b;};return a267_0x3ae8();}(function(_0x175cec,_0x61443c){const _0x469508=a267_0x5510,_0x1cb276=_0x175cec();while(!![]){try{const _0x54b960=-parseInt(_0x469508(0x126))/0x1+parseInt(_0x469508(0x11b))/0x2*(parseInt(_0x469508(0x123))/0x3)+-parseInt(_0x469508(0x117))/0x4*(parseInt(_0x469508(0x119))/0x5)+parseInt(_0x469508(0x120))/0x6*(parseInt(_0x469508(0x115))/0x7)+-parseInt(_0x469508(0x121))/0x8+parseInt(_0x469508(0x125))/0x9+parseInt(_0x469508(0x11c))/0xa;if(_0x54b960===_0x61443c)break;else _0x1cb276['push'](_0x1cb276['shift']());}catch(_0x39d880){_0x1cb276['push'](_0x1cb276['shift']());}}}(a267_0x3ae8,0x6e4cf));export function detectSqlMode(_0x191083){const _0x45919c=a267_0x5510,_0x1efbbd=_0x191083['trimStart']();if(/^<(select|insert|update|delete)\b/i['test'](_0x1efbbd))return _0x45919c(0x127);return _0x45919c(0x118);}export function getSqlFileExtension(_0x566426){const _0xb80006=a267_0x5510;return _0x566426===_0xb80006(0x127)?_0xb80006(0x11d):_0xb80006(0x122);}export function buildDefaultSqlFileName(_0x567999,_0x2794cc){return''+_0x567999+getSqlFileExtension(_0x2794cc);}export function sanitizeSqlPathSegment(_0x3c6f3f,_0x3888de){const _0x85d534=a267_0x5510,_0x4857c6=String(_0x3c6f3f??'')[_0x85d534(0x124)](),_0x120773=_0x4857c6['replace'](/[<>:"/\\|?*\u0000-\u001F]/g,'-')['replace'](/\s+/g,'-')['replace'](/-+/g,'-')[_0x85d534(0x116)](/^\.+/,'')['replace'](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x120773||_0x3888de;}export function buildDbDirectoryName(_0x2de34b,_0x5d0d6a){const _0x5f576c=a267_0x5510;return sanitizeSqlPathSegment(_0x2de34b,_0x5d0d6a!=null?_0x5f576c(0x11f)+_0x5d0d6a:_0x5f576c(0x11e));}function a267_0x5510(_0x4c9518,_0x453f00){_0x4c9518=_0x4c9518-0x115;const _0x3ae848=a267_0x3ae8();let _0x551000=_0x3ae848[_0x4c9518];return _0x551000;}export function buildSqlRelativePath(_0x3d2524,_0x14a733,_0x99527a,_0x59f905,_0x3dc640){const _0x395b16=a267_0x5510,_0x273243=buildDbDirectoryName(_0x99527a,_0x3dc640),_0x288737=sanitizeSqlPathSegment(_0x3d2524,_0x395b16(0x11a)),_0x5d0c4d=sanitizeSqlPathSegment(_0x14a733,_0x288737);return _0x273243+'/'+_0x288737+'_'+_0x5d0c4d+getSqlFileExtension(_0x59f905);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a266_0x486c15=a266_0x2ec7;(function(_0xf8d8f2,_0x228a62){const _0xa6346=a266_0x2ec7,_0x2c5899=_0xf8d8f2();while(!![]){try{const _0x1ebaf0=parseInt(_0xa6346(0x1f4))/0x1*(-parseInt(_0xa6346(0x1fe))/0x2)+-parseInt(_0xa6346(0x20c))/0x3*(parseInt(_0xa6346(0x1ea))/0x4)+parseInt(_0xa6346(0x1f7))/0x5+-parseInt(_0xa6346(0x1d3))/0x6+-parseInt(_0xa6346(0x1ee))/0x7*(parseInt(_0xa6346(0x1ef))/0x8)+-parseInt(_0xa6346(0x1d7))/0x9*(-parseInt(_0xa6346(0x210))/0xa)+parseInt(_0xa6346(0x213))/0xb;if(_0x1ebaf0===_0x228a62)break;else _0x2c5899['push'](_0x2c5899['shift']());}catch(_0x1e28df){_0x2c5899['push'](_0x2c5899['shift']());}}}(a266_0x1adf,0x2e425));const MYBATIS_OUTER_TAGS=new Map([[a266_0x486c15(0x20a),a266_0x486c15(0x221)],[a266_0x486c15(0x1cc),a266_0x486c15(0x1df)],[a266_0x486c15(0x211),a266_0x486c15(0x1f8)],[a266_0x486c15(0x20b),a266_0x486c15(0x202)]]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a266_0x486c15(0x1eb),a266_0x486c15(0x1e3),a266_0x486c15(0x1dd),'when',a266_0x486c15(0x222),a266_0x486c15(0x200),a266_0x486c15(0x204),a266_0x486c15(0x1f0),a266_0x486c15(0x220),'property']),MYBATIS_BRANCH_TAGS=new Set(['if','foreach','choose','when',a266_0x486c15(0x222)]);export const MYBATIS_DYNAMIC_START_MARKER=a266_0x486c15(0x228);export const MYBATIS_DYNAMIC_END_MARKER=a266_0x486c15(0x21a);export const MYBATIS_INCLUDE_MARKER='__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__';const UNRESOLVED_SQL_FRAGMENT=a266_0x486c15(0x205),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a266_0x486c15(0x208)+[...MYBATIS_OUTER_TAGS[a266_0x486c15(0x1d2)]()]['join']('|')+a266_0x486c15(0x21c),'i');export function normalizeSqlForStaticAnalysis(_0x2bf2ad){const _0x4d39c7=a266_0x486c15,_0x51310e=typeof _0x2bf2ad===_0x4d39c7(0x1f3)?_0x2bf2ad:'';if(!startsWithMybatisStatementWrapper(_0x51310e))return{'sql':_0x51310e,'mode':_0x4d39c7(0x1ec)};let _0x17a8b3=0x0,_0xd1e60a='',_0x1fe036,_0x32d573=![],_0x15088e=![];const _0x2cfea3=[];while(_0x17a8b3<_0x51310e[_0x4d39c7(0x21f)]){if(_0x51310e['startsWith'](_0x4d39c7(0x216),_0x17a8b3)){const _0x390546=_0x51310e[_0x4d39c7(0x1e6)](_0x4d39c7(0x1f6),_0x17a8b3+0x4);if(_0x390546<0x0)return invalidMybatisSource(_0x4d39c7(0x215));_0xd1e60a+='\x20',_0x17a8b3=_0x390546+0x3;continue;}if(_0x51310e[_0x4d39c7(0x1e8)](_0x4d39c7(0x209),_0x17a8b3)){if(!_0x32d573||_0x15088e)return invalidMybatisSource(_0x4d39c7(0x1fd));const _0x193d59=_0x51310e[_0x4d39c7(0x1e6)](']]>',_0x17a8b3+0x9);if(_0x193d59<0x0)return invalidMybatisSource(_0x4d39c7(0x223));_0xd1e60a+=_0x51310e['slice'](_0x17a8b3+0x9,_0x193d59),_0x17a8b3=_0x193d59+0x3;continue;}if(_0x51310e[_0x4d39c7(0x1e8)]('<?',_0x17a8b3)){if(_0x32d573)return invalidMybatisSource(_0x4d39c7(0x1de));const _0x5ae82e=_0x51310e[_0x4d39c7(0x1e6)]('?>',_0x17a8b3+0x2);if(_0x5ae82e<0x0)return invalidMybatisSource(_0x4d39c7(0x201));_0xd1e60a+='\x20',_0x17a8b3=_0x5ae82e+0x2;continue;}if(_0x51310e[_0x17a8b3]!=='<'){const _0x4aca52=_0x51310e['indexOf']('<',_0x17a8b3),_0x42c858=_0x4aca52<0x0?_0x51310e[_0x4d39c7(0x21f)]:_0x4aca52,_0x279ca0=_0x51310e[_0x4d39c7(0x217)](_0x17a8b3,_0x42c858);if((!_0x32d573||_0x15088e)&&_0x279ca0[_0x4d39c7(0x200)]())return invalidMybatisSource('SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.');if(_0x32d573&&!_0x15088e){const _0x4251cb=decodeXmlEntities(_0x279ca0);if(_0x4251cb===null)return invalidMybatisSource(_0x4d39c7(0x219));_0xd1e60a+=_0x4251cb;}else _0xd1e60a+='\x20';_0x17a8b3=_0x42c858;continue;}const _0x1d48cd=findXmlTagEnd(_0x51310e,_0x17a8b3);if(_0x1d48cd<0x0)return invalidMybatisSource('Unterminated\x20MyBatis\x20XML\x20tag.');const _0x46ed4f=_0x51310e['slice'](_0x17a8b3,_0x1d48cd+0x1),_0x1dd7ca=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/[_0x4d39c7(0x21b)](_0x46ed4f);if(!_0x1dd7ca)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x68d395=_0x1dd7ca[0x1]==='/',_0x33987c=_0x1dd7ca[0x2]??'',_0x5b256e=_0x33987c['toLowerCase'](),_0x2569a8=_0x1dd7ca[0x3]??'',_0x1dbed7=_0x1dd7ca[0x4]==='/',_0x24abc2=MYBATIS_OUTER_TAGS['get'](_0x5b256e);if(!_0x24abc2&&!MYBATIS_DYNAMIC_TAGS[_0x4d39c7(0x207)](_0x5b256e))return invalidMybatisSource(_0x4d39c7(0x1d0)+_0x5b256e+'>.');if(!_0x24abc2&&_0x33987c!==_0x5b256e)return invalidMybatisSource('MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<'+_0x33987c+'>.');if(_0x68d395){if(_0x2569a8[_0x4d39c7(0x200)]()||_0x1dbed7)return invalidMybatisSource(_0x4d39c7(0x225)+_0x33987c+'>.');const _0x20e866=_0x2cfea3['at'](-0x1);if(!_0x20e866||(_0x20e866[_0x4d39c7(0x1e9)]?_0x20e866[_0x4d39c7(0x1d5)]!==_0x5b256e:_0x20e866[_0x4d39c7(0x1e0)]!==_0x33987c))return invalidMybatisSource(_0x4d39c7(0x218)+_0x33987c+'>.');_0x2cfea3['pop']();if(_0x20e866['outer'])_0x15088e=!![];_0xd1e60a+=MYBATIS_BRANCH_TAGS[_0x4d39c7(0x207)](_0x5b256e)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x2569a8))return invalidMybatisSource('Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<'+_0x33987c+'>.');if(_0x5b256e==='property'&&(!_0x1dbed7||_0x2cfea3['at'](-0x1)?.[_0x4d39c7(0x1d5)]!=='include'))return invalidMybatisSource(_0x4d39c7(0x1f5));if(_0x24abc2){if(_0x32d573||_0x2cfea3['length']>0x0)return invalidMybatisSource('Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.');_0x32d573=!![],_0x15088e=_0x1dbed7,_0x1fe036=_0x24abc2;}else{if(!_0x32d573||_0x15088e)return invalidMybatisSource(_0x4d39c7(0x1d1)+_0x33987c+'>.');}_0xd1e60a+=_0x5b256e==='where'?_0x4d39c7(0x1da):_0x5b256e===_0x4d39c7(0x204)?'\x20SET\x20':_0x5b256e===_0x4d39c7(0x220)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS[_0x4d39c7(0x207)](_0x5b256e)&&!_0x1dbed7?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x1dbed7&&_0x2cfea3[_0x4d39c7(0x1fb)]({'rawName':_0x33987c,'tagName':_0x5b256e,'outer':!!_0x24abc2});}_0x17a8b3=_0x1d48cd+0x1;}if(_0x2cfea3[_0x4d39c7(0x21f)]>0x0)return invalidMybatisSource('Unclosed\x20MyBatis\x20XML\x20tag:\x20<'+_0x2cfea3['at'](-0x1)?.['rawName']+'>.');if(!_0x32d573||!_0x15088e)return invalidMybatisSource(_0x4d39c7(0x21d));return{'sql':_0xd1e60a[_0x4d39c7(0x200)](),'mode':_0x4d39c7(0x1fc),..._0x1fe036?{'statementType':_0x1fe036}:{}};}function hasWellFormedXmlAttributes(_0x3ed5d2){const _0x160941=a266_0x486c15;let _0x4ec0a3=0x0;const _0x337dd5=new Set();while(_0x4ec0a3<_0x3ed5d2[_0x160941(0x21f)]){while(_0x4ec0a3<_0x3ed5d2[_0x160941(0x21f)]&&/\s/[_0x160941(0x1e4)](_0x3ed5d2[_0x4ec0a3]??''))_0x4ec0a3+=0x1;if(_0x4ec0a3>=_0x3ed5d2[_0x160941(0x21f)])return!![];const _0x3aaba0=/^[A-Za-z_:][\w:.-]*/[_0x160941(0x21b)](_0x3ed5d2[_0x160941(0x217)](_0x4ec0a3)),_0x5957bc=_0x3aaba0?.[0x0];if(!_0x5957bc||_0x337dd5[_0x160941(0x207)](_0x5957bc))return![];_0x337dd5[_0x160941(0x1db)](_0x5957bc),_0x4ec0a3+=_0x5957bc['length'];while(_0x4ec0a3<_0x3ed5d2['length']&&/\s/['test'](_0x3ed5d2[_0x4ec0a3]??''))_0x4ec0a3+=0x1;if(_0x3ed5d2[_0x4ec0a3]!=='=')return![];_0x4ec0a3+=0x1;while(_0x4ec0a3<_0x3ed5d2[_0x160941(0x21f)]&&/\s/[_0x160941(0x1e4)](_0x3ed5d2[_0x4ec0a3]??''))_0x4ec0a3+=0x1;const _0x277ef5=_0x3ed5d2[_0x4ec0a3];if(_0x277ef5!=='\x22'&&_0x277ef5!=='\x27')return![];_0x4ec0a3+=0x1;const _0x4efa21=_0x3ed5d2[_0x160941(0x1e6)](_0x277ef5,_0x4ec0a3);if(_0x4efa21<0x0)return![];if(decodeXmlEntities(_0x3ed5d2[_0x160941(0x217)](_0x4ec0a3,_0x4efa21))===null)return![];_0x4ec0a3=_0x4efa21+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x96d266){const _0x565730=a266_0x486c15;let _0x42312c=0x0;const _0x56a0ce=()=>{const _0x5975ad=a266_0x2ec7;while(_0x42312c<_0x96d266[_0x5975ad(0x21f)]&&/\s/[_0x5975ad(0x1e4)](_0x96d266[_0x42312c]??''))_0x42312c+=0x1;};_0x56a0ce();while(_0x42312c<_0x96d266[_0x565730(0x21f)]){if(_0x96d266[_0x565730(0x1e8)](_0x565730(0x216),_0x42312c)){const _0x12f490=_0x96d266[_0x565730(0x1e6)](_0x565730(0x1f6),_0x42312c+0x4);if(_0x12f490<0x0)return!![];_0x42312c=_0x12f490+0x3,_0x56a0ce();continue;}if(_0x96d266['startsWith']('<?',_0x42312c)){const _0xc58b9b=_0x96d266[_0x565730(0x1e6)]('?>',_0x42312c+0x2);if(_0xc58b9b<0x0)return!![];_0x42312c=_0xc58b9b+0x2,_0x56a0ce();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN['test'](_0x96d266['slice'](_0x42312c));}function invalidMybatisSource(_0x5f0ca3){const _0x192d55=a266_0x486c15;return{'sql':'','mode':_0x192d55(0x1fc),'error':_0x5f0ca3};}function findXmlTagEnd(_0x242340,_0xb39772){const _0x203e9e=a266_0x486c15;let _0x4c433f;for(let _0x5cd3b2=_0xb39772+0x1;_0x5cd3b2<_0x242340[_0x203e9e(0x21f)];_0x5cd3b2+=0x1){const _0x240d6d=_0x242340[_0x5cd3b2];if(_0x4c433f){if(_0x240d6d===_0x4c433f)_0x4c433f=undefined;continue;}if(_0x240d6d==='\x22'||_0x240d6d==='\x27'){_0x4c433f=_0x240d6d;continue;}if(_0x240d6d==='>')return _0x5cd3b2;}return-0x1;}function decodeXmlEntities(_0x2f5f36){const _0x2d8131=a266_0x486c15;let _0x26000f=![];const _0x1df3e8=_0x2f5f36[_0x2d8131(0x1e7)](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0xc4cf65=>{const _0x382c0d=_0x2d8131;if(_0xc4cf65==='<')return'<';if(_0xc4cf65===_0x382c0d(0x1d8))return'>';if(_0xc4cf65==='"')return'\x22';if(_0xc4cf65===_0x382c0d(0x206))return'\x27';if(_0xc4cf65===_0x382c0d(0x1ce))return'&';const _0x58a39f=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x382c0d(0x21b)](_0xc4cf65);if(_0x58a39f){const _0x4948e5=_0x58a39f[0x1],_0x4a8f09=_0x58a39f[0x2],_0x4d186e=Number[_0x382c0d(0x1d9)](_0x4948e5??_0x4a8f09??'',_0x4948e5?0x10:0xa);if(isValidXmlCharacter(_0x4d186e))return String['fromCodePoint'](_0x4d186e);}return _0x26000f=!![],'';});return _0x26000f?null:_0x1df3e8;}function isValidXmlCharacter(_0x54fed3){return _0x54fed3===0x9||_0x54fed3===0xa||_0x54fed3===0xd||_0x54fed3>=0x20&&_0x54fed3<=0xd7ff||_0x54fed3>=0xe000&&_0x54fed3<=0xfffd||_0x54fed3>=0x10000&&_0x54fed3<=0x10ffff;}export function detectSqlType(_0x53ac85){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x53ac85));}function detectNormalizedSqlType(_0xbbbcfc){const _0x42ba37=a266_0x486c15;if(_0xbbbcfc[_0x42ba37(0x1d4)])return{'type':_0x42ba37(0x224),'isSelectOnly':![],'isDangerous':![],'reason':_0xbbbcfc['error']};if(!_0xbbbcfc[_0x42ba37(0x1ec)][_0x42ba37(0x200)]())return{'type':_0x42ba37(0x224),'isSelectOnly':![],'isDangerous':![],'reason':_0x42ba37(0x227)};const _0x526138=stripStaticAnalysisMarkers(_0xbbbcfc[_0x42ba37(0x1ec)])[_0x42ba37(0x1e7)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x42ba37(0x1e7)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x42ba37(0x1e7)](/\/\*[\s\S]*?\*\//g,'')[_0x42ba37(0x200)](),_0x165a1b=_0x526138[_0x42ba37(0x1dc)]('\x0a');let _0x50dca2='';for(const _0xfefb1d of _0x165a1b){const _0x573d14=_0xfefb1d['trim']();if(!_0x573d14||_0x573d14[_0x42ba37(0x1e8)]('--')||_0x573d14[_0x42ba37(0x1e8)]('/*'))continue;_0x50dca2=_0x573d14;break;}const _0xb33d41=_0x50dca2[_0x42ba37(0x1cf)](),_0x4dfd9f=_0xbbbcfc[_0x42ba37(0x20d)],_0x3dfaf2=maskSqlTextForBlockedKeywordScan(_0x526138),_0x444506=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x42ba37(0x1e4)](_0x3dfaf2);if(_0x4dfd9f==='SELECT'||!_0x4dfd9f&&(_0xb33d41[_0x42ba37(0x1e8)]('SELECT')||_0xb33d41[_0x42ba37(0x1e8)](_0x42ba37(0x1f9)))){const _0x2446a0=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x42ba37(0x1e4)](_0x526138);return{'type':_0x42ba37(0x221),'isSelectOnly':!_0x2446a0,'isDangerous':_0x2446a0,'reason':_0x2446a0?_0x42ba37(0x1fa):undefined};}if(_0x4dfd9f===_0x42ba37(0x1df)||!_0x4dfd9f&&_0xb33d41[_0x42ba37(0x1e8)](_0x42ba37(0x1df)))return{'type':_0x42ba37(0x1df),'isSelectOnly':![],'isDangerous':_0x444506,'reason':_0x444506?_0x42ba37(0x1e1):undefined};if(_0x4dfd9f===_0x42ba37(0x1f8)||!_0x4dfd9f&&_0xb33d41[_0x42ba37(0x1e8)](_0x42ba37(0x1f8)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':_0x444506,'reason':_0x444506?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x4dfd9f===_0x42ba37(0x202)||!_0x4dfd9f&&_0xb33d41[_0x42ba37(0x1e8)]('DELETE'))return{'type':_0x42ba37(0x202),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x42ba37(0x1e4)](_0xb33d41))return{'type':_0x42ba37(0x21e),'isSelectOnly':![],'isDangerous':!![],'reason':_0x42ba37(0x1ff)};return{'type':_0x42ba37(0x224),'isSelectOnly':![],'isDangerous':![]};}function stripStaticAnalysisMarkers(_0x2fdd41){const _0x441c37=a266_0x486c15;return _0x2fdd41[_0x441c37(0x1f2)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x441c37(0x1f2)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x441c37(0x1f2)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function a266_0x1adf(){const _0x25240c=['replace','startsWith','outer','4sTJGwY','where','sql','type','1130906LHwArJ','16lMDNFQ','bind','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','replaceAll','string','7393ecrcPG','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','-->','1121910piOiZC','UPDATE','WITH','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','push','mybatisXml','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','6EVSAMe','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','trim','Unterminated\x20XML\x20declaration.','DELETE','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','set','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__',''','has','^<\x5cs*(?:','<![CDATA[','select','delete','345894HNaUij','statementType','Unable\x20to\x20detect\x20SQL\x20type.\x20','join','4840UjywZa','update','\x20query\x20targeting\x20','3170552OoWjzb','match','Unterminated\x20XML\x20comment.','<!--','slice','Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</','Invalid\x20XML\x20entity\x20reference.','__RABETBASE_MYBATIS_DYNAMIC_END__','exec',')\x5cb','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','DDL','length','include','SELECT','otherwise','Unterminated\x20CDATA\x20section.','UNKNOWN','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','from','SQL\x20content\x20is\x20empty','__RABETBASE_MYBATIS_DYNAMIC_START__','insert','isDangerous','&','toUpperCase','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','keys','737616pUWBQH','error','tagName','includes','4842LDBBCO','>','parseInt','\x20WHERE\x20','add','split','choose','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','INSERT','rawName','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','matchAll','foreach','test','unknown\x20table(s)','indexOf'];a266_0x1adf=function(){return _0x25240c;};return a266_0x1adf();}function maskSqlTextForBlockedKeywordScan(_0x357c49){const _0x26cee9=a266_0x486c15;return _0x357c49[_0x26cee9(0x1e7)](/'(?:''|\\.|[^'])*'/g,'\x20')[_0x26cee9(0x1e7)](/"(?:""|\\.|[^"])*"/g,'\x20')['replace'](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x26cee9(0x1e7)](/--.*$/gm,'\x20')[_0x26cee9(0x1e7)](/#.*$/gm,'\x20')['replace'](/\/\*[\s\S]*?\*\//g,'\x20');}function a266_0x2ec7(_0x2112a4,_0x37da8f){_0x2112a4=_0x2112a4-0x1cc;const _0x1adf74=a266_0x1adf();let _0x2ec7b6=_0x1adf74[_0x2112a4];return _0x2ec7b6;}function extractTables(_0x562759){const _0x5a0236=a266_0x486c15,_0x351195=_0x562759[_0x5a0236(0x1e7)](/#\{[^}]*\}/g,'?')[_0x5a0236(0x1e7)](/\$\{[^}]*\}/g,'?')['replace'](/'[^']*'/g,'\x27\x27')[_0x5a0236(0x1e7)](/--.*$/gm,'')[_0x5a0236(0x1e7)](/\/\*[\s\S]*?\*\//g,''),_0x315420=[],_0x2c2767=_0x351195[_0x5a0236(0x214)](/FROM\s+([^\s,)(]+)/i);addTable(_0x315420,_0x2c2767?.[0x1]);for(const _0x863857 of _0x351195['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x315420,_0x863857[0x1]);}const _0x2f16a9=_0x351195[_0x5a0236(0x214)](/INTO\s+([^\s(]+)/i);addTable(_0x315420,_0x2f16a9?.[0x1]);const _0x9e3c9b=_0x351195['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x315420,_0x9e3c9b?.[0x1]),_0x315420;}function addTable(_0x2f6648,_0x2548b6){const _0x40df86=a266_0x486c15,_0x1e4660=_0x2548b6?.[_0x40df86(0x1e7)](/[`"]/g,'');_0x1e4660&&_0x1e4660!==UNRESOLVED_SQL_FRAGMENT&&!_0x2f6648[_0x40df86(0x1d6)](_0x1e4660)&&_0x2f6648['push'](_0x1e4660);}function extractParameters(_0x4e3fe0){const _0x2f90d2=a266_0x486c15,_0x2ea85a=new Set();for(const _0x58b20a of _0x4e3fe0[_0x2f90d2(0x1e2)](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x58b20a[0x1])_0x2ea85a[_0x2f90d2(0x1db)](_0x58b20a[0x1]);}return Array[_0x2f90d2(0x226)](_0x2ea85a);}export function validateSql(_0x2a0644){const _0x4cf1f1=a266_0x486c15,_0x165e23=normalizeSqlForStaticAnalysis(_0x2a0644),_0x4c4be5=detectNormalizedSqlType(_0x165e23),_0x416e07=stripStaticAnalysisMarkers(_0x165e23[_0x4cf1f1(0x1ec)]),_0x2ae8d0=_0x165e23[_0x4cf1f1(0x1d4)]?[]:extractTables(_0x416e07),_0x261755=_0x165e23[_0x4cf1f1(0x1d4)]?[]:extractParameters(_0x416e07);if(_0x4c4be5[_0x4cf1f1(0x1cd)])return{'valid':![],'sqlType':_0x4c4be5,'tables':_0x2ae8d0,'parameters':_0x261755,'message':_0x4c4be5['reason']||_0x4c4be5[_0x4cf1f1(0x1ed)]+_0x4cf1f1(0x1f1)};if(_0x4c4be5['type']===_0x4cf1f1(0x224))return{'valid':![],'sqlType':_0x4c4be5,'tables':_0x2ae8d0,'parameters':_0x261755,'message':_0x165e23['error']?_0x4cf1f1(0x20e)+_0x165e23['error']:_0x4cf1f1(0x203)};return{'valid':!![],'sqlType':_0x4c4be5,'tables':_0x2ae8d0,'parameters':_0x261755,'message':_0x4c4be5[_0x4cf1f1(0x1ed)]+_0x4cf1f1(0x212)+(_0x2ae8d0[_0x4cf1f1(0x21f)]?_0x2ae8d0[_0x4cf1f1(0x20f)](',\x20'):_0x4cf1f1(0x1e5))+(_0x261755['length']?'\x20with\x20parameters:\x20'+_0x261755[_0x4cf1f1(0x20f)](',\x20'):'')};}
|
|
1
|
+
const a268_0x18081a=a268_0x36b4;(function(_0x4804c5,_0x479d50){const _0x4792b9=a268_0x36b4,_0x59c1cb=_0x4804c5();while(!![]){try{const _0x2d267a=parseInt(_0x4792b9(0x135))/0x1+parseInt(_0x4792b9(0xf5))/0x2+-parseInt(_0x4792b9(0x114))/0x3*(parseInt(_0x4792b9(0x11f))/0x4)+-parseInt(_0x4792b9(0x136))/0x5*(parseInt(_0x4792b9(0x13a))/0x6)+-parseInt(_0x4792b9(0x116))/0x7*(parseInt(_0x4792b9(0xfd))/0x8)+parseInt(_0x4792b9(0x12b))/0x9+-parseInt(_0x4792b9(0x11a))/0xa*(-parseInt(_0x4792b9(0xed))/0xb);if(_0x2d267a===_0x479d50)break;else _0x59c1cb['push'](_0x59c1cb['shift']());}catch(_0x139d9f){_0x59c1cb['push'](_0x59c1cb['shift']());}}}(a268_0x3a79,0x7b22e));const MYBATIS_OUTER_TAGS=new Map([[a268_0x18081a(0x11b),a268_0x18081a(0x113)],[a268_0x18081a(0x109),a268_0x18081a(0x127)],['update',a268_0x18081a(0x11c)],['delete','DELETE']]),MYBATIS_DYNAMIC_TAGS=new Set(['if',a268_0x18081a(0xf3),'foreach',a268_0x18081a(0x110),'when',a268_0x18081a(0x124),'trim','set',a268_0x18081a(0xf8),a268_0x18081a(0x129),a268_0x18081a(0xe5)]),MYBATIS_BRANCH_TAGS=new Set(['if','foreach','choose',a268_0x18081a(0x13d),a268_0x18081a(0x124)]);export const MYBATIS_DYNAMIC_START_MARKER=a268_0x18081a(0x134);export const MYBATIS_DYNAMIC_END_MARKER=a268_0x18081a(0x137);export const MYBATIS_INCLUDE_MARKER=a268_0x18081a(0x10c);const UNRESOLVED_SQL_FRAGMENT=a268_0x18081a(0xf1),MYBATIS_OUTER_TAG_PATTERN=new RegExp(a268_0x18081a(0x101)+[...MYBATIS_OUTER_TAGS[a268_0x18081a(0x121)]()][a268_0x18081a(0xec)]('|')+')\x5cb','i');export function normalizeSqlForStaticAnalysis(_0x4a9bfb){const _0x2045ec=a268_0x18081a,_0x2c722e=typeof _0x4a9bfb===_0x2045ec(0x111)?_0x4a9bfb:'';if(!startsWithMybatisStatementWrapper(_0x2c722e))return{'sql':_0x2c722e,'mode':_0x2045ec(0x107)};let _0x28868f=0x0,_0x39e1e5='',_0x2b04bd,_0x5894a4=![],_0x54c4d1=![];const _0x341686=[];while(_0x28868f<_0x2c722e[_0x2045ec(0x13c)]){if(_0x2c722e[_0x2045ec(0x118)](_0x2045ec(0x115),_0x28868f)){const _0x2242e5=_0x2c722e[_0x2045ec(0x12a)](_0x2045ec(0x131),_0x28868f+0x4);if(_0x2242e5<0x0)return invalidMybatisSource('Unterminated\x20XML\x20comment.');_0x39e1e5+='\x20',_0x28868f=_0x2242e5+0x3;continue;}if(_0x2c722e[_0x2045ec(0x118)]('<;if(_0x2f00e5<0x0)return invalidMybatisSource('Unterminated\x20CDATA\x20section.');_0x39e1e5+=_0x2c722e[_0x2045ec(0x122)](_0x28868f+0x9,_0x2f00e5),_0x28868f=_0x2f00e5+0x3;continue;}if(_0x2c722e[_0x2045ec(0x118)]('<?',_0x28868f)){if(_0x5894a4)return invalidMybatisSource(_0x2045ec(0x120));const _0x4267c6=_0x2c722e[_0x2045ec(0x12a)]('?>',_0x28868f+0x2);if(_0x4267c6<0x0)return invalidMybatisSource(_0x2045ec(0x125));_0x39e1e5+='\x20',_0x28868f=_0x4267c6+0x2;continue;}if(_0x2c722e[_0x28868f]!=='<'){const _0x514945=_0x2c722e[_0x2045ec(0x12a)]('<',_0x28868f),_0x2c1ca9=_0x514945<0x0?_0x2c722e['length']:_0x514945,_0x44b200=_0x2c722e['slice'](_0x28868f,_0x2c1ca9);if((!_0x5894a4||_0x54c4d1)&&_0x44b200[_0x2045ec(0xe7)]())return invalidMybatisSource(_0x2045ec(0xe4));if(_0x5894a4&&!_0x54c4d1){const _0x230b6a=decodeXmlEntities(_0x44b200);if(_0x230b6a===null)return invalidMybatisSource('Invalid\x20XML\x20entity\x20reference.');_0x39e1e5+=_0x230b6a;}else _0x39e1e5+='\x20';_0x28868f=_0x2c1ca9;continue;}const _0x156529=findXmlTagEnd(_0x2c722e,_0x28868f);if(_0x156529<0x0)return invalidMybatisSource(_0x2045ec(0x100));const _0x5d100b=_0x2c722e[_0x2045ec(0x122)](_0x28868f,_0x156529+0x1),_0x535eac=/^<\s*(\/?)\s*([A-Za-z][\w:-]*)([\s\S]*?)(\/?)\s*>$/['exec'](_0x5d100b);if(!_0x535eac)return invalidMybatisSource('Invalid\x20MyBatis\x20XML\x20tag.');const _0x511c81=_0x535eac[0x1]==='/',_0x5b16aa=_0x535eac[0x2]??'',_0xdebc83=_0x5b16aa[_0x2045ec(0x132)](),_0x553bf8=_0x535eac[0x3]??'',_0x1d2d1f=_0x535eac[0x4]==='/',_0x38c9a5=MYBATIS_OUTER_TAGS[_0x2045ec(0xf6)](_0xdebc83);if(!_0x38c9a5&&!MYBATIS_DYNAMIC_TAGS[_0x2045ec(0x102)](_0xdebc83))return invalidMybatisSource(_0x2045ec(0x12d)+_0xdebc83+'>.');if(!_0x38c9a5&&_0x5b16aa!==_0xdebc83)return invalidMybatisSource(_0x2045ec(0x10f)+_0x5b16aa+'>.');if(_0x511c81){if(_0x553bf8[_0x2045ec(0xe7)]()||_0x1d2d1f)return invalidMybatisSource(_0x2045ec(0x12f)+_0x5b16aa+'>.');const _0x272851=_0x341686['at'](-0x1);if(!_0x272851||(_0x272851['outer']?_0x272851[_0x2045ec(0x103)]!==_0xdebc83:_0x272851[_0x2045ec(0x104)]!==_0x5b16aa))return invalidMybatisSource('Mismatched\x20MyBatis\x20XML\x20closing\x20tag:\x20</'+_0x5b16aa+'>.');_0x341686[_0x2045ec(0xf9)]();if(_0x272851[_0x2045ec(0x140)])_0x54c4d1=!![];_0x39e1e5+=MYBATIS_BRANCH_TAGS[_0x2045ec(0x102)](_0xdebc83)?'\x20'+MYBATIS_DYNAMIC_END_MARKER+'\x20':'\x20';}else{if(!hasWellFormedXmlAttributes(_0x553bf8))return invalidMybatisSource(_0x2045ec(0x117)+_0x5b16aa+'>.');if(_0xdebc83===_0x2045ec(0xe5)&&(!_0x1d2d1f||_0x341686['at'](-0x1)?.[_0x2045ec(0x103)]!=='include'))return invalidMybatisSource(_0x2045ec(0xe9));if(_0x38c9a5){if(_0x5894a4||_0x341686[_0x2045ec(0x13c)]>0x0)return invalidMybatisSource(_0x2045ec(0xe6));_0x5894a4=!![],_0x54c4d1=_0x1d2d1f,_0x2b04bd=_0x38c9a5;}else{if(!_0x5894a4||_0x54c4d1)return invalidMybatisSource(_0x2045ec(0xff)+_0x5b16aa+'>.');}_0x39e1e5+=_0xdebc83===_0x2045ec(0xf3)?'\x20WHERE\x20':_0xdebc83===_0x2045ec(0x108)?_0x2045ec(0xf2):_0xdebc83===_0x2045ec(0x129)?'\x20'+MYBATIS_INCLUDE_MARKER+'\x20':MYBATIS_BRANCH_TAGS['has'](_0xdebc83)&&!_0x1d2d1f?'\x20'+MYBATIS_DYNAMIC_START_MARKER+'\x20':'\x20',!_0x1d2d1f&&_0x341686[_0x2045ec(0xeb)]({'rawName':_0x5b16aa,'tagName':_0xdebc83,'outer':!!_0x38c9a5});}_0x28868f=_0x156529+0x1;}if(_0x341686[_0x2045ec(0x13c)]>0x0)return invalidMybatisSource(_0x2045ec(0x11e)+_0x341686['at'](-0x1)?.[_0x2045ec(0x104)]+'>.');if(!_0x5894a4||!_0x54c4d1)return invalidMybatisSource(_0x2045ec(0xf4));return{'sql':_0x39e1e5[_0x2045ec(0xe7)](),'mode':_0x2045ec(0xf7),..._0x2b04bd?{'statementType':_0x2b04bd}:{}};}function hasWellFormedXmlAttributes(_0x21220a){const _0x23c268=a268_0x18081a;let _0xe9f684=0x0;const _0x955e00=new Set();while(_0xe9f684<_0x21220a[_0x23c268(0x13c)]){while(_0xe9f684<_0x21220a[_0x23c268(0x13c)]&&/\s/['test'](_0x21220a[_0xe9f684]??''))_0xe9f684+=0x1;if(_0xe9f684>=_0x21220a['length'])return!![];const _0x31bef6=/^[A-Za-z_:][\w:.-]*/[_0x23c268(0x126)](_0x21220a[_0x23c268(0x122)](_0xe9f684)),_0x3d6458=_0x31bef6?.[0x0];if(!_0x3d6458||_0x955e00[_0x23c268(0x102)](_0x3d6458))return![];_0x955e00[_0x23c268(0x10e)](_0x3d6458),_0xe9f684+=_0x3d6458[_0x23c268(0x13c)];while(_0xe9f684<_0x21220a['length']&&/\s/['test'](_0x21220a[_0xe9f684]??''))_0xe9f684+=0x1;if(_0x21220a[_0xe9f684]!=='=')return![];_0xe9f684+=0x1;while(_0xe9f684<_0x21220a[_0x23c268(0x13c)]&&/\s/[_0x23c268(0x13b)](_0x21220a[_0xe9f684]??''))_0xe9f684+=0x1;const _0x5db30c=_0x21220a[_0xe9f684];if(_0x5db30c!=='\x22'&&_0x5db30c!=='\x27')return![];_0xe9f684+=0x1;const _0xb679cf=_0x21220a[_0x23c268(0x12a)](_0x5db30c,_0xe9f684);if(_0xb679cf<0x0)return![];if(decodeXmlEntities(_0x21220a[_0x23c268(0x122)](_0xe9f684,_0xb679cf))===null)return![];_0xe9f684=_0xb679cf+0x1;}return!![];}function startsWithMybatisStatementWrapper(_0x5a0591){const _0x42ddc2=a268_0x18081a;let _0x2e4ecd=0x0;const _0x457b82=()=>{const _0x3277fd=a268_0x36b4;while(_0x2e4ecd<_0x5a0591['length']&&/\s/[_0x3277fd(0x13b)](_0x5a0591[_0x2e4ecd]??''))_0x2e4ecd+=0x1;};_0x457b82();while(_0x2e4ecd<_0x5a0591['length']){if(_0x5a0591['startsWith']('<!--',_0x2e4ecd)){const _0x2ed3c6=_0x5a0591[_0x42ddc2(0x12a)]('-->',_0x2e4ecd+0x4);if(_0x2ed3c6<0x0)return!![];_0x2e4ecd=_0x2ed3c6+0x3,_0x457b82();continue;}if(_0x5a0591[_0x42ddc2(0x118)]('<?',_0x2e4ecd)){const _0x442bbe=_0x5a0591[_0x42ddc2(0x12a)]('?>',_0x2e4ecd+0x2);if(_0x442bbe<0x0)return!![];_0x2e4ecd=_0x442bbe+0x2,_0x457b82();continue;}break;}return MYBATIS_OUTER_TAG_PATTERN[_0x42ddc2(0x13b)](_0x5a0591['slice'](_0x2e4ecd));}function invalidMybatisSource(_0x1d8e30){const _0x201337=a268_0x18081a;return{'sql':'','mode':_0x201337(0xf7),'error':_0x1d8e30};}function findXmlTagEnd(_0x56da9a,_0x251aa6){const _0x100f4e=a268_0x18081a;let _0x569f8d;for(let _0x4338ea=_0x251aa6+0x1;_0x4338ea<_0x56da9a[_0x100f4e(0x13c)];_0x4338ea+=0x1){const _0x4d13eb=_0x56da9a[_0x4338ea];if(_0x569f8d){if(_0x4d13eb===_0x569f8d)_0x569f8d=undefined;continue;}if(_0x4d13eb==='\x22'||_0x4d13eb==='\x27'){_0x569f8d=_0x4d13eb;continue;}if(_0x4d13eb==='>')return _0x4338ea;}return-0x1;}function decodeXmlEntities(_0x3de34d){let _0x1836d4=![];const _0x5d4be7=_0x3de34d['replace'](/&(?:#x[0-9a-f]+;|#[0-9]+;|[A-Za-z_:][\w:.-]*;)?/g,_0xaa342e=>{const _0x3cb016=a268_0x36b4;if(_0xaa342e===_0x3cb016(0x130))return'<';if(_0xaa342e===_0x3cb016(0x10d))return'>';if(_0xaa342e===_0x3cb016(0x128))return'\x22';if(_0xaa342e===_0x3cb016(0x10a))return'\x27';if(_0xaa342e==='&')return'&';const _0x5b3b3a=/^&#(?:x([0-9a-f]+)|([0-9]+));$/[_0x3cb016(0x126)](_0xaa342e);if(_0x5b3b3a){const _0xa72075=_0x5b3b3a[0x1],_0x206354=_0x5b3b3a[0x2],_0x2758c1=Number[_0x3cb016(0x10b)](_0xa72075??_0x206354??'',_0xa72075?0x10:0xa);if(isValidXmlCharacter(_0x2758c1))return String['fromCodePoint'](_0x2758c1);}return _0x1836d4=!![],'';});return _0x1836d4?null:_0x5d4be7;}function isValidXmlCharacter(_0x5814d4){return _0x5814d4===0x9||_0x5814d4===0xa||_0x5814d4===0xd||_0x5814d4>=0x20&&_0x5814d4<=0xd7ff||_0x5814d4>=0xe000&&_0x5814d4<=0xfffd||_0x5814d4>=0x10000&&_0x5814d4<=0x10ffff;}function a268_0x3a79(){const _0x3a101f=['include','indexOf','1350567DCNwss','error','Unsupported\x20MyBatis\x20XML\x20tag:\x20<','SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements','Invalid\x20MyBatis\x20XML\x20closing\x20tag:\x20</','<','-->','toLowerCase','match','__RABETBASE_MYBATIS_DYNAMIC_START__','971723SaRGhw','3385wsfOGy','__RABETBASE_MYBATIS_DYNAMIC_END__','\x20with\x20parameters:\x20','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','5550ZWjxfu','test','length','when','DELETE','WITH','outer','SQL\x20text\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','property','Multiple\x20MyBatis\x20statement\x20wrappers\x20are\x20not\x20supported.','trim','CDATA\x20sections\x20must\x20be\x20inside\x20the\x20MyBatis\x20statement\x20wrapper.','MyBatis\x20<property>\x20must\x20be\x20a\x20self-closing\x20direct\x20child\x20of\x20<include>.','unknown\x20table(s)','push','join','66nMIvYf','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','includes','replaceAll','__RABETBASE_UNRESOLVED_SQL_FRAGMENT__','\x20SET\x20','where','MyBatis\x20XML\x20must\x20contain\x20exactly\x20one\x20complete\x20statement\x20wrapper.','1843232CFnehi','get','mybatisXml','bind','pop','UNKNOWN','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','replace','1973096hnuWPk','split','MyBatis\x20dynamic\x20tag\x20must\x20be\x20inside\x20the\x20statement\x20wrapper:\x20<','Unterminated\x20MyBatis\x20XML\x20tag.','^<\x5cs*(?:','has','tagName','rawName','matchAll','Unable\x20to\x20detect\x20SQL\x20type.\x20','sql','set','insert',''','parseInt','__RABETBASE_MYBATIS_INCLUDE_UNRESOLVED__','>','add','MyBatis\x20dynamic\x20tag\x20names\x20must\x20be\x20lowercase:\x20<','choose','string','type','SELECT','942MvDjbf','<!--','7JinfZd','Invalid\x20attributes\x20on\x20MyBatis\x20XML\x20tag:\x20<','startsWith','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','101750IbrwdK','select','UPDATE','DDL','Unclosed\x20MyBatis\x20XML\x20tag:\x20<','9264bxEeVk','XML\x20declarations\x20must\x20precede\x20the\x20MyBatis\x20statement\x20wrapper.','keys','slice','statementType','otherwise','Unterminated\x20XML\x20declaration.','exec','INSERT','"'];a268_0x3a79=function(){return _0x3a101f;};return a268_0x3a79();}export function detectSqlType(_0x5da672){return detectNormalizedSqlType(normalizeSqlForStaticAnalysis(_0x5da672));}function detectNormalizedSqlType(_0x5bad0d){const _0x38083e=a268_0x18081a;if(_0x5bad0d[_0x38083e(0x12c)])return{'type':_0x38083e(0xfa),'isSelectOnly':![],'isDangerous':![],'reason':_0x5bad0d[_0x38083e(0x12c)]};if(!_0x5bad0d[_0x38083e(0x107)]['trim']())return{'type':_0x38083e(0xfa),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x3fbd3f=stripStaticAnalysisMarkers(_0x5bad0d['sql'])[_0x38083e(0xfc)](/#\{[^}]*\}/g,'?')[_0x38083e(0xfc)](/\$\{[^}]*\}/g,'?')[_0x38083e(0xfc)](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x38083e(0xe7)](),_0x4a3b16=_0x3fbd3f[_0x38083e(0xfe)]('\x0a');let _0x4434db='';for(const _0x4f97ac of _0x4a3b16){const _0x14ba93=_0x4f97ac['trim']();if(!_0x14ba93||_0x14ba93[_0x38083e(0x118)]('--')||_0x14ba93['startsWith']('/*'))continue;_0x4434db=_0x14ba93;break;}const _0x858642=_0x4434db['toUpperCase'](),_0x505c39=_0x5bad0d[_0x38083e(0x123)],_0x178292=maskSqlTextForBlockedKeywordScan(_0x3fbd3f),_0x533980=/\b(DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x178292);if(_0x505c39===_0x38083e(0x113)||!_0x505c39&&(_0x858642['startsWith'](_0x38083e(0x113))||_0x858642[_0x38083e(0x118)](_0x38083e(0x13f)))){const _0x1ee446=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x38083e(0x13b)](_0x3fbd3f);return{'type':'SELECT','isSelectOnly':!_0x1ee446,'isDangerous':_0x1ee446,'reason':_0x1ee446?_0x38083e(0x139):undefined};}if(_0x505c39===_0x38083e(0x127)||!_0x505c39&&_0x858642[_0x38083e(0x118)](_0x38083e(0x127)))return{'type':'INSERT','isSelectOnly':![],'isDangerous':_0x533980,'reason':_0x533980?'SQL\x20contains\x20blocked\x20DELETE\x20or\x20DDL\x20statements':undefined};if(_0x505c39===_0x38083e(0x11c)||!_0x505c39&&_0x858642[_0x38083e(0x118)](_0x38083e(0x11c)))return{'type':_0x38083e(0x11c),'isSelectOnly':![],'isDangerous':_0x533980,'reason':_0x533980?_0x38083e(0x12e):undefined};if(_0x505c39===_0x38083e(0x13e)||!_0x505c39&&_0x858642[_0x38083e(0x118)](_0x38083e(0x13e)))return{'type':_0x38083e(0x13e),'isSelectOnly':![],'isDangerous':!![],'reason':'DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save'};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x38083e(0x13b)](_0x858642))return{'type':_0x38083e(0x11d),'isSelectOnly':![],'isDangerous':!![],'reason':_0x38083e(0x119)};return{'type':_0x38083e(0xfa),'isSelectOnly':![],'isDangerous':![]};}function a268_0x36b4(_0x246316,_0x96fa64){_0x246316=_0x246316-0xe4;const _0x3a79d1=a268_0x3a79();let _0x36b4b6=_0x3a79d1[_0x246316];return _0x36b4b6;}function stripStaticAnalysisMarkers(_0x2be65c){const _0x489b12=a268_0x18081a;return _0x2be65c[_0x489b12(0xf0)](MYBATIS_DYNAMIC_START_MARKER,'\x20')['replaceAll'](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x489b12(0xf0)](MYBATIS_INCLUDE_MARKER,'\x20'+UNRESOLVED_SQL_FRAGMENT+'\x20');}function maskSqlTextForBlockedKeywordScan(_0x32c0dc){const _0x2192c7=a268_0x18081a;return _0x32c0dc[_0x2192c7(0xfc)](/'(?:''|\\.|[^'])*'/g,'\x20')['replace'](/"(?:""|\\.|[^"])*"/g,'\x20')[_0x2192c7(0xfc)](/`(?:``|\\.|[^`])*`/g,'\x20')[_0x2192c7(0xfc)](/--.*$/gm,'\x20')[_0x2192c7(0xfc)](/#.*$/gm,'\x20')[_0x2192c7(0xfc)](/\/\*[\s\S]*?\*\//g,'\x20');}function extractTables(_0x5a8240){const _0xbf0a5f=a268_0x18081a,_0x364621=_0x5a8240[_0xbf0a5f(0xfc)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0xbf0a5f(0xfc)](/'[^']*'/g,'\x27\x27')[_0xbf0a5f(0xfc)](/--.*$/gm,'')[_0xbf0a5f(0xfc)](/\/\*[\s\S]*?\*\//g,''),_0x34034b=[],_0xa6d260=_0x364621[_0xbf0a5f(0x133)](/FROM\s+([^\s,)(]+)/i);addTable(_0x34034b,_0xa6d260?.[0x1]);for(const _0x41438b of _0x364621[_0xbf0a5f(0x105)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){addTable(_0x34034b,_0x41438b[0x1]);}const _0x44621a=_0x364621['match'](/INTO\s+([^\s(]+)/i);addTable(_0x34034b,_0x44621a?.[0x1]);const _0x56f184=_0x364621['match'](/UPDATE\s+([^\s,)(]+)/i);return addTable(_0x34034b,_0x56f184?.[0x1]),_0x34034b;}function addTable(_0x7d3b52,_0x15c6f4){const _0x578c80=a268_0x18081a,_0x109159=_0x15c6f4?.[_0x578c80(0xfc)](/[`"]/g,'');_0x109159&&_0x109159!==UNRESOLVED_SQL_FRAGMENT&&!_0x7d3b52[_0x578c80(0xef)](_0x109159)&&_0x7d3b52[_0x578c80(0xeb)](_0x109159);}function extractParameters(_0x257c39){const _0x381b32=a268_0x18081a,_0x2b7254=new Set();for(const _0x3c6273 of _0x257c39['matchAll'](/[#$]\{\s*([A-Za-z_][\w.]*)\s*(?=[,}])/g)){if(_0x3c6273[0x1])_0x2b7254[_0x381b32(0x10e)](_0x3c6273[0x1]);}return Array['from'](_0x2b7254);}export function validateSql(_0x2772e4){const _0x302ee0=a268_0x18081a,_0x5b316a=normalizeSqlForStaticAnalysis(_0x2772e4),_0x44e483=detectNormalizedSqlType(_0x5b316a),_0x22889f=stripStaticAnalysisMarkers(_0x5b316a['sql']),_0x1a1477=_0x5b316a[_0x302ee0(0x12c)]?[]:extractTables(_0x22889f),_0x3af217=_0x5b316a[_0x302ee0(0x12c)]?[]:extractParameters(_0x22889f);if(_0x44e483['isDangerous'])return{'valid':![],'sqlType':_0x44e483,'tables':_0x1a1477,'parameters':_0x3af217,'message':_0x44e483['reason']||_0x44e483[_0x302ee0(0x112)]+_0x302ee0(0xfb)};if(_0x44e483[_0x302ee0(0x112)]===_0x302ee0(0xfa))return{'valid':![],'sqlType':_0x44e483,'tables':_0x1a1477,'parameters':_0x3af217,'message':_0x5b316a[_0x302ee0(0x12c)]?_0x302ee0(0x106)+_0x5b316a[_0x302ee0(0x12c)]:_0x302ee0(0xee)};return{'valid':!![],'sqlType':_0x44e483,'tables':_0x1a1477,'parameters':_0x3af217,'message':_0x44e483[_0x302ee0(0x112)]+'\x20query\x20targeting\x20'+(_0x1a1477[_0x302ee0(0x13c)]?_0x1a1477[_0x302ee0(0xec)](',\x20'):_0x302ee0(0xea))+(_0x3af217[_0x302ee0(0x13c)]?_0x302ee0(0x138)+_0x3af217['join'](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a269_0x3725(_0x42a1aa,_0x4736a4){_0x42a1aa=_0x42a1aa-0x113;const _0xbdc6ae=a269_0xbdc6();let _0x372542=_0xbdc6ae[_0x42a1aa];return _0x372542;}const a269_0x624b95=a269_0x3725;(function(_0x24f394,_0x253e15){const _0x56d34f=a269_0x3725,_0x39d43a=_0x24f394();while(!![]){try{const _0x1534b1=parseInt(_0x56d34f(0x113))/0x1*(parseInt(_0x56d34f(0x122))/0x2)+-parseInt(_0x56d34f(0x127))/0x3*(-parseInt(_0x56d34f(0x12d))/0x4)+parseInt(_0x56d34f(0x11c))/0x5*(parseInt(_0x56d34f(0x116))/0x6)+parseInt(_0x56d34f(0x11e))/0x7*(-parseInt(_0x56d34f(0x121))/0x8)+parseInt(_0x56d34f(0x129))/0x9+-parseInt(_0x56d34f(0x120))/0xa+-parseInt(_0x56d34f(0x123))/0xb;if(_0x1534b1===_0x253e15)break;else _0x39d43a['push'](_0x39d43a['shift']());}catch(_0x35f373){_0x39d43a['push'](_0x39d43a['shift']());}}}(a269_0xbdc6,0x574a3));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a269_0xbdc6(){const _0xb0dc82=['6792082pyYnHH','Not\x20in\x20a\x20','config_missing','\x20--help`\x20to\x20see\x20available\x20commands.','251133GykLKF','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.\x0a\x20\x20\x20\x20\x20\x20\x20Tip:\x20`','2844180FYiUjB','network_error','apiError','\x20auth`\x20to\x20login\x20first.','28CgPjck','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>\x20--global`\x20registers\x20a\x20reusable\x20global\x20app\x20profile.','auth_required','unknown_command','cancelled','5kqUNuk','Configuration\x20file\x20not\x20found','Operation\x20cancelled.','4872ieUNIm','not_in_project','Set\x20appcode\x20via\x20`','Run\x20`','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','2120TkgUon','validation','2863SnnwAO','Authentication\x20required','2286840zAcczp','6040NygzPU','106478NLYdfJ'];a269_0xbdc6=function(){return _0xb0dc82;};return a269_0xbdc6();}export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Run\x20`'+CLI_BIN_NAME+a269_0x624b95(0x12c),'configMissingHint':a269_0x624b95(0x118)+CLI_BIN_NAME+a269_0x624b95(0x128)+CLI_BIN_NAME+a269_0x624b95(0x12e),'notInProjectHint':a269_0x624b95(0x11a)});export const CliErrors={'authRequired'(_0x347461){const _0x51a4aa=a269_0x624b95;return new CliError(_0x51a4aa(0x12f),0x1,_0x51a4aa(0x11f),_0x347461??'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.');},'configMissing'(_0x3450a4){const _0x35a94a=a269_0x624b95;return new CliError(_0x35a94a(0x125),0x1,_0x35a94a(0x114),_0x3450a4??'Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+_0x35a94a(0x128)+CLI_BIN_NAME+_0x35a94a(0x12e));},'notInProject'(){const _0x275232=a269_0x624b95;return new CliError(_0x275232(0x117),0x1,_0x275232(0x124)+CLI_BIN_NAME+'\x20project\x20directory','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.');},'apiError'(_0x3b88f2,_0x455bac){const _0x1c18f1=a269_0x624b95;return baseCliErrors[_0x1c18f1(0x12b)](_0x3b88f2,_0x455bac);},'networkError'(_0x3b2427){const _0x2adf89=a269_0x624b95;return new CliError(_0x2adf89(0x12a),0x2,'Network\x20error:\x20'+_0x3b2427,_0x2adf89(0x11b));},'unknownCommand'(_0x468eae){const _0x1470cd=a269_0x624b95;return new CliError(_0x1470cd(0x130),0x1,'Unknown\x20command:\x20'+_0x468eae,_0x1470cd(0x119)+CLI_BIN_NAME+_0x1470cd(0x126));},'flagMissing'(_0x4b25cc,_0x5839f0){return new CliError('flag_missing',0x1,'Missing\x20required\x20flag:\x20--'+_0x4b25cc,_0x5839f0);},'validation'(_0x4d8a1d,_0x5c10cb){const _0x4575ff=a269_0x624b95;return baseCliErrors[_0x4575ff(0x11d)](_0x4d8a1d,_0x5c10cb);},'cancelled'(_0x3b7818){const _0x1ce234=a269_0x624b95;return new CliError(_0x1ce234(0x131),0x0,_0x3b7818??_0x1ce234(0x115));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a270_0xaded(_0x16230e,_0x2cbc66){_0x16230e=_0x16230e-0x1e6;const _0xa20282=a270_0xa202();let _0xaded4=_0xa20282[_0x16230e];return _0xaded4;}(function(_0x3b5907,_0x316a07){const _0x37225a=a270_0xaded,_0x44adf8=_0x3b5907();while(!![]){try{const _0x2762d7=-parseInt(_0x37225a(0x1e6))/0x1+-parseInt(_0x37225a(0x1ee))/0x2+parseInt(_0x37225a(0x1f2))/0x3+-parseInt(_0x37225a(0x1ea))/0x4*(parseInt(_0x37225a(0x1e8))/0x5)+-parseInt(_0x37225a(0x1f1))/0x6*(parseInt(_0x37225a(0x1e7))/0x7)+parseInt(_0x37225a(0x1ed))/0x8*(parseInt(_0x37225a(0x1e9))/0x9)+-parseInt(_0x37225a(0x1f0))/0xa*(-parseInt(_0x37225a(0x1ef))/0xb);if(_0x2762d7===_0x316a07)break;else _0x44adf8['push'](_0x44adf8['shift']());}catch(_0x6fde32){_0x44adf8['push'](_0x44adf8['shift']());}}}(a270_0xa202,0x45514));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a270_0x5034f9}from'@lovrabet/cli-framework';function a270_0xa202(){const _0x8f875d=['6SsvkEv','84840ACayRe','445207gLGrPO','2956163TiWPAQ','64755SfOBaw','38853VaKZPb','60JeQFkV','map','name','456gyKpIw','35636GvYdsw','11tYrMBO','10891740vUwFKP'];a270_0xa202=function(){return _0x8f875d;};return a270_0xa202();}import{EXPLICIT_YES_FLAG_DESCRIPTION,requiresExplicitYes}from'../framework/explicit-yes.js';export function buildAllFlags(_0xa1d246){const _0x11c81d=a270_0xaded,_0x16aa57=a270_0x5034f9(_0xa1d246,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});if(!requiresExplicitYes(_0xa1d246))return _0x16aa57;return _0x16aa57[_0x11c81d(0x1eb)](_0x3d2ef8=>_0x3d2ef8[_0x11c81d(0x1ec)]==='yes'?{..._0x3d2ef8,'description':EXPLICIT_YES_FLAG_DESCRIPTION}:_0x3d2ef8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e346e,_0x1cb68b){var _0x3d17d1=a271_0x3655,_0x11e8bd=_0x5e346e();while(!![]){try{var _0xc947f6=parseInt(_0x3d17d1(0xe0))/0x1*(parseInt(_0x3d17d1(0xdd))/0x2)+parseInt(_0x3d17d1(0xdb))/0x3+parseInt(_0x3d17d1(0xdf))/0x4+-parseInt(_0x3d17d1(0xdc))/0x5*(-parseInt(_0x3d17d1(0xd6))/0x6)+-parseInt(_0x3d17d1(0xd4))/0x7+parseInt(_0x3d17d1(0xda))/0x8+-parseInt(_0x3d17d1(0xd8))/0x9;if(_0xc947f6===_0x1cb68b)break;else _0x11e8bd['push'](_0x11e8bd['shift']());}catch(_0x41450f){_0x11e8bd['push'](_0x11e8bd['shift']());}}}(a271_0x3f51,0xb80ad));import{resolveOutputConfig}from'@lovrabet/cli-framework';export function usesStructuredErrorOutput(_0x1a06d7){var _0x321959=a271_0x3655;return _0x1a06d7?.[_0x321959(0xd7)]===!![];}function a271_0x3655(_0x2022f8,_0x336fac){_0x2022f8=_0x2022f8-0xd4;var _0x3f5198=a271_0x3f51();var _0x365591=_0x3f5198[_0x2022f8];return _0x365591;}export function resolveErrorOutputFormat(_0x51ad41){var _0x3b7e09=a271_0x3655;if(!_0x51ad41['def'])return _0x51ad41[_0x3b7e09(0xd5)]??_0x3b7e09(0xd9);return resolveOutputConfig({'flags':_0x51ad41['flags']??{},'def':_0x51ad41[_0x3b7e09(0xde)],'configDefault':_0x51ad41[_0x3b7e09(0xd5)]})[_0x3b7e09(0xe1)];}function a271_0x3f51(){var _0x20bdb3=['format','8457064UFRuiD','defaultFormat','451092ZPmWuI','structuredErrors','17009136fGefOM','compress','5982376YsfaKz','1246590ioTzae','90tmAyWZ','16Dpckft','def','740232lpflBW','143779YgGQXl'];a271_0x3f51=function(){return _0x20bdb3;};return a271_0x3f51();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a272_0x4d96(_0x5ed86b,_0x242c82){_0x5ed86b=_0x5ed86b-0x141;const _0x2b3501=a272_0x2b35();let _0x4d9675=_0x2b3501[_0x5ed86b];return _0x4d9675;}const a272_0x5910b7=a272_0x4d96;(function(_0xba6ac8,_0x3408b1){const _0x137909=a272_0x4d96,_0x5da68b=_0xba6ac8();while(!![]){try{const _0x2a1b1c=parseInt(_0x137909(0x143))/0x1+-parseInt(_0x137909(0x146))/0x2*(parseInt(_0x137909(0x14a))/0x3)+parseInt(_0x137909(0x14d))/0x4*(parseInt(_0x137909(0x142))/0x5)+-parseInt(_0x137909(0x144))/0x6+-parseInt(_0x137909(0x147))/0x7+parseInt(_0x137909(0x148))/0x8*(parseInt(_0x137909(0x141))/0x9)+parseInt(_0x137909(0x14f))/0xa;if(_0x2a1b1c===_0x3408b1)break;else _0x5da68b['push'](_0x5da68b['shift']());}catch(_0x572fb5){_0x5da68b['push'](_0x5da68b['shift']());}}}(a272_0x2b35,0x497d1));const EXPLICIT_YES_COMMANDS=new Set([a272_0x5910b7(0x14c),a272_0x5910b7(0x150),a272_0x5910b7(0x14e),a272_0x5910b7(0x145)]);export const EXPLICIT_YES_FLAG_DESCRIPTION=a272_0x5910b7(0x14b);export function requiresExplicitYes(_0x4f429a){const _0x481079=a272_0x5910b7;return EXPLICIT_YES_COMMANDS['has'](_0x4f429a['service']+'\x20'+_0x4f429a[_0x481079(0x149)]);}function a272_0x2b35(){const _0x2a4814=['341437YIrwEW','2358966aSlGYe','notification\x20config-delete','70410fLqGHf','3673348uavesX','37208pGbLeE','command','42iGCgeJ','Required\x20for\x20execution\x20after\x20reviewing\x20the\x20--dry-run\x20plan','menu\x20delete','228uPmjmf','notification\x20config-update','10002920DzkQKF','kb\x20delete','657cRgQej','2680nEhMHA'];a272_0x2b35=function(){return _0x2a4814;};return a272_0x2b35();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a273_0x3e7c9c=a273_0x7fc0;function a273_0x28e2(){const _0x15740a=['8IjXOdY','310729yklyyZ','12552fWkmzz','161XYDZbI','2249322OTuyRv','2bPDTlY','459448BuXOxZ','15485830aIwHfA','79299EhXJLW','parseFlags','validateFlags','24aHTGDt','3915NDDNSy','6889473fFQgNB'];a273_0x28e2=function(){return _0x15740a;};return a273_0x28e2();}(function(_0x38b273,_0x4d7185){const _0x58f3ae=a273_0x7fc0,_0x18f74d=_0x38b273();while(!![]){try{const _0x449ecc=-parseInt(_0x58f3ae(0x118))/0x1*(-parseInt(_0x58f3ae(0x11c))/0x2)+parseInt(_0x58f3ae(0x11b))/0x3*(-parseInt(_0x58f3ae(0x117))/0x4)+parseInt(_0x58f3ae(0x115))/0x5*(parseInt(_0x58f3ae(0x119))/0x6)+parseInt(_0x58f3ae(0x11a))/0x7*(parseInt(_0x58f3ae(0x11d))/0x8)+parseInt(_0x58f3ae(0x116))/0x9+-parseInt(_0x58f3ae(0x110))/0xa+-parseInt(_0x58f3ae(0x111))/0xb*(parseInt(_0x58f3ae(0x114))/0xc);if(_0x449ecc===_0x4d7185)break;else _0x18f74d['push'](_0x18f74d['shift']());}catch(_0x2cc9ce){_0x18f74d['push'](_0x18f74d['shift']());}}}(a273_0x28e2,0xed752));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a273_0x3e7c9c(0x112)];function a273_0x7fc0(_0x5dea5f,_0x319d28){_0x5dea5f=_0x5dea5f-0x110;const _0x28e228=a273_0x28e2();let _0x7fc0e5=_0x28e228[_0x5dea5f];return _0x7fc0e5;}export const validateFlags=helpers[a273_0x3e7c9c(0x113)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7f1030,_0x963a6){const _0x4af81a=a274_0x1d28,_0x4f228c=_0x7f1030();while(!![]){try{const _0x2697ca=parseInt(_0x4af81a(0x102))/0x1+parseInt(_0x4af81a(0x103))/0x2*(-parseInt(_0x4af81a(0x108))/0x3)+-parseInt(_0x4af81a(0x10c))/0x4*(parseInt(_0x4af81a(0x10d))/0x5)+parseInt(_0x4af81a(0x101))/0x6*(-parseInt(_0x4af81a(0x100))/0x7)+parseInt(_0x4af81a(0x109))/0x8+-parseInt(_0x4af81a(0x107))/0x9+parseInt(_0x4af81a(0x10a))/0xa;if(_0x2697ca===_0x963a6)break;else _0x4f228c['push'](_0x4f228c['shift']());}catch(_0x9f0648){_0x4f228c['push'](_0x4f228c['shift']());}}}(a274_0x9544,0xeb3c1));function a274_0x9544(){const _0x431ae1=['generateFullHelp','42GYvkbB','120738CqJEtq','65600IDwGLl','22wqFsaS','Requires\x20explicit\x20--yes\x20for\x20execution;\x20use\x20--dry-run\x20to\x20preview.','replace','generateCommandHelp','262404cWgCFZ','239172gObzyC','6719320wCxSIE','12313580hHTCtU','\x20[args]\x20[flags]','585976mrdXVC','5ZGepJR','generateServiceHelp'];a274_0x9544=function(){return _0x431ae1;};return a274_0x9544();}import{createHelpGenerators}from'@lovrabet/cli-framework';function a274_0x1d28(_0x412542,_0x53f549){_0x412542=_0x412542-0xfe;const _0x95442c=a274_0x9544();let _0x1d28ff=_0x95442c[_0x412542];return _0x1d28ff;}import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{requiresExplicitYes}from'../framework/explicit-yes.js';function createGenerators(){const _0x1b80c4=a274_0x1d28;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x3af5c3=>serviceGroups['get'](_0x3af5c3),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20`'+CLI_BIN_NAME+'\x20workspace\x20init`\x20or\x20--appcode).','serviceUsageSuffix':_0x1b80c4(0x10b)});}export function generateCommandHelp(_0x5e612c){const _0x3cf967=a274_0x1d28,_0x3bf9b3=createGenerators()[_0x3cf967(0x106)](_0x5e612c);if(!requiresExplicitYes(_0x5e612c))return _0x3bf9b3;return _0x3bf9b3[_0x3cf967(0x105)]('Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.',_0x3cf967(0x104));}export function generateServiceHelp(_0xf1ec5b){const _0x5ba719=a274_0x1d28;return createGenerators()[_0x5ba719(0xfe)](_0xf1ec5b);}export function generateFullHelp(){const _0x168453=a274_0x1d28;return createGenerators()[_0x168453(0xff)]();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf9633a,_0x117af0){var _0x1fd10e=a275_0x57bd,_0x531aaa=_0xf9633a();while(!![]){try{var _0x17eee8=-parseInt(_0x1fd10e(0x16d))/0x1*(parseInt(_0x1fd10e(0x16b))/0x2)+-parseInt(_0x1fd10e(0x167))/0x3*(-parseInt(_0x1fd10e(0x166))/0x4)+parseInt(_0x1fd10e(0x169))/0x5+-parseInt(_0x1fd10e(0x16f))/0x6+-parseInt(_0x1fd10e(0x165))/0x7*(parseInt(_0x1fd10e(0x168))/0x8)+parseInt(_0x1fd10e(0x16c))/0x9+parseInt(_0x1fd10e(0x16e))/0xa*(parseInt(_0x1fd10e(0x16a))/0xb);if(_0x17eee8===_0x117af0)break;else _0x531aaa['push'](_0x531aaa['shift']());}catch(_0x20c8c3){_0x531aaa['push'](_0x531aaa['shift']());}}}(a275_0x4006,0xc2c85));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a275_0x57bd(_0x3de3de,_0x411787){_0x3de3de=_0x3de3de-0x165;var _0x4006e6=a275_0x4006();var _0x57bd71=_0x4006e6[_0x3de3de];return _0x57bd71;}export{riskLevelOrder}from'../framework/types.js';function a275_0x4006(){var _0x240f9a=['1238742ROZRfX','10099607GkHNqZ','724jTgniD','12237jvDQAU','8aTUwFU','4429640wrjQiV','5039672KnGXpw','26IYibwx','3923766RVNFTs','5482NLVYdG','10pPTJlb'];a275_0x4006=function(){return _0x240f9a;};return a275_0x4006();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x420c9c,_0x2f6c34){const _0x5c9e50=a276_0x33d0,_0x22fe26=_0x420c9c();while(!![]){try{const _0x5a6a03=-parseInt(_0x5c9e50(0x102))/0x1*(-parseInt(_0x5c9e50(0x10d))/0x2)+parseInt(_0x5c9e50(0x113))/0x3+-parseInt(_0x5c9e50(0x10e))/0x4+parseInt(_0x5c9e50(0x109))/0x5*(parseInt(_0x5c9e50(0x10a))/0x6)+-parseInt(_0x5c9e50(0x101))/0x7+parseInt(_0x5c9e50(0x107))/0x8*(-parseInt(_0x5c9e50(0x106))/0x9)+parseInt(_0x5c9e50(0x104))/0xa;if(_0x5a6a03===_0x2f6c34)break;else _0x22fe26['push'](_0x22fe26['shift']());}catch(_0x1a02d9){_0x22fe26['push'](_0x22fe26['shift']());}}}(a276_0x1708,0xcd85e));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliError,CliErrors}from'../errors.js';import{applyJqFilter}from'../utils/apply-jq-filter.js';function a276_0x33d0(_0x4c8898,_0x4ef132){_0x4c8898=_0x4c8898-0xfc;const _0x17088d=a276_0x1708();let _0x33d0a0=_0x17088d[_0x4c8898];return _0x33d0a0;}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x465f88,_0x48d928){const _0x3171b5=a276_0x33d0,_0x21fe1c=_0x465f88[_0x3171b5(0x110)],{_notice:_0xbfdeca,..._0x26434e}=_0x465f88;void _0xbfdeca,baseFormatOutput(_0x26434e,_0x48d928),_0x48d928[_0x3171b5(0x103)]===_0x3171b5(0x108)&&printPrettyNotice(_0x21fe1c);}function a276_0x1708(){const _0x634efa=['jq:\x20','4745724oatBqs','message','write','risk','code','validation','stdout','jqFilter','stringify','3387699lbGCER','89Vkuqpl','format','6000850vJquLH','data','11662659xKixav','8tiJsTC','pretty','1580yiJwUx','1956xoDKkD','trim','hint','30260MOKyRM','4039796cJBNPU','update','_notice','error'];a276_0x1708=function(){return _0x634efa;};return a276_0x1708();}export function formatCliError(_0x50bd07,_0xebaf4c){const _0x2a71d3=a276_0x33d0;if(_0xebaf4c[_0x2a71d3(0x103)]==='pretty')return![];const _0x1e454f=_0x50bd07[_0x2a71d3(0x105)],_0x578a93={'ok':![],'command':_0xebaf4c['command'],'risk':_0xebaf4c[_0x2a71d3(0x116)],'data':_0x1e454f??null,'error':{'code':_0x50bd07[_0x2a71d3(0xfc)],'message':_0x50bd07[_0x2a71d3(0x114)],..._0x50bd07[_0x2a71d3(0x10c)]?{'hint':_0x50bd07['hint']}:{}}},_0xf4af3b=_0xebaf4c[_0x2a71d3(0x103)]==='json'?JSON['stringify'](_0x578a93,null,0x2):JSON[_0x2a71d3(0x100)](_0x578a93);let _0x1c03c7=_0xf4af3b;if(_0xebaf4c[_0x2a71d3(0xff)]?.[_0x2a71d3(0x10b)]())try{_0x1c03c7=applyJqFilter(_0xf4af3b,_0xebaf4c['jqFilter']);}catch(_0x116d18){const _0x280e43=_0x116d18 instanceof CliError?_0x116d18:CliErrors[_0x2a71d3(0xfd)](_0x2a71d3(0x112)+(_0x116d18 instanceof Error?_0x116d18[_0x2a71d3(0x114)]:String(_0x116d18))),_0x586378={..._0x578a93,'error':{'code':_0x280e43[_0x2a71d3(0xfc)],'message':_0x280e43[_0x2a71d3(0x114)],..._0x280e43[_0x2a71d3(0x10c)]?{'hint':_0x280e43[_0x2a71d3(0x10c)]}:{},'cause':_0x578a93[_0x2a71d3(0x111)]}};_0x1c03c7=_0xebaf4c[_0x2a71d3(0x103)]==='json'?JSON[_0x2a71d3(0x100)](_0x586378,null,0x2):JSON[_0x2a71d3(0x100)](_0x586378);}return process[_0x2a71d3(0xfe)][_0x2a71d3(0x115)](_0x1c03c7['endsWith']('\x0a')?_0x1c03c7:_0x1c03c7+'\x0a'),!![];}function printPrettyNotice(_0x362a2c){const _0x36bdcc=a276_0x33d0;if(!_0x362a2c?.[_0x36bdcc(0x10f)])return;console[_0x36bdcc(0x111)](_0x362a2c['update'][_0x36bdcc(0x114)]+'\x20('+_0x362a2c[_0x36bdcc(0x10f)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a277_0x1aff(_0x3ba65b,_0x1803ba){_0x3ba65b=_0x3ba65b-0x126;var _0x2f7938=a277_0x2f79();var _0x1afffe=_0x2f7938[_0x3ba65b];return _0x1afffe;}(function(_0x5c7950,_0x29869b){var _0x540a40=a277_0x1aff,_0x31a52a=_0x5c7950();while(!![]){try{var _0x2eb8c8=parseInt(_0x540a40(0x128))/0x1+parseInt(_0x540a40(0x127))/0x2+parseInt(_0x540a40(0x12b))/0x3+parseInt(_0x540a40(0x12c))/0x4+parseInt(_0x540a40(0x126))/0x5*(parseInt(_0x540a40(0x12d))/0x6)+parseInt(_0x540a40(0x12a))/0x7+-parseInt(_0x540a40(0x129))/0x8;if(_0x2eb8c8===_0x29869b)break;else _0x31a52a['push'](_0x31a52a['shift']());}catch(_0x486cbf){_0x31a52a['push'](_0x31a52a['shift']());}}}(a277_0x2f79,0x43df1));function a277_0x2f79(){var _0x1e57b1=['2859594aYcYQU','5XIPybh','693510OCNFGs','307974JFYsBd','12929224bXgIBH','1285956Psnste','277587yxqrNS','1946356AmVsYb'];a277_0x2f79=function(){return _0x1e57b1;};return a277_0x2f79();}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x233eb7,_0x19a5fe){const _0x4d8d9f=a278_0x4a7b,_0xdc6f54=_0x233eb7();while(!![]){try{const _0x2a537e=-parseInt(_0x4d8d9f(0x71))/0x1*(-parseInt(_0x4d8d9f(0x67))/0x2)+parseInt(_0x4d8d9f(0x7b))/0x3+parseInt(_0x4d8d9f(0x65))/0x4*(-parseInt(_0x4d8d9f(0x75))/0x5)+parseInt(_0x4d8d9f(0x7d))/0x6*(-parseInt(_0x4d8d9f(0x74))/0x7)+-parseInt(_0x4d8d9f(0x6a))/0x8+-parseInt(_0x4d8d9f(0x6d))/0x9*(parseInt(_0x4d8d9f(0x72))/0xa)+parseInt(_0x4d8d9f(0x6c))/0xb*(parseInt(_0x4d8d9f(0x64))/0xc);if(_0x2a537e===_0x19a5fe)break;else _0xdc6f54['push'](_0xdc6f54['shift']());}catch(_0x21a31e){_0xdc6f54['push'](_0xdc6f54['shift']());}}}(a278_0x3e24,0x5b10f));function a278_0x3e24(){const _0x2d292d=['63996iPoWoE','2876QhtcwK','map','11266qvCxla','.\x20Run\x20`','some','1961920nArmcb','code','2244PJGoYx','683919vLhoKS','No\x20api.ts\x20found\x20in\x20','flags','join','62NjGdju','30OXxrAj','length','291515KGbgeE','3695jmiOII','type','name','\x22.\x20','alias','Unknown\x20alias\x20\x22','445824jXyZNd','`\x20requires\x20either\x20--code\x20or\x20--alias.','30QKNNvu'];a278_0x3e24=function(){return _0x2d292d;};return a278_0x3e24();}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';function a278_0x4a7b(_0x614c00,_0x2ef800){_0x614c00=_0x614c00-0x64;const _0x3e2411=a278_0x3e24();let _0x4a7b49=_0x3e2411[_0x614c00];return _0x4a7b49;}import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x186178,_0x21883d,_0x5f3324,_0xd863fb){const _0x54626b=a278_0x4a7b,_0x9aa41c=_0x186178[_0x54626b(0x6f)][_0x54626b(0x69)](_0x58f4da=>_0x58f4da[_0x54626b(0x77)]===_0x54626b(0x6b)&&_0x58f4da[_0x54626b(0x76)]==='string'),_0x6d04df=_0x186178[_0x54626b(0x6f)][_0x54626b(0x69)](_0x4e5f38=>_0x4e5f38[_0x54626b(0x77)]===_0x54626b(0x79)&&_0x4e5f38[_0x54626b(0x76)]==='string');if(!_0x9aa41c||!_0x6d04df)return;const _0x1a94f1=_0x21883d[_0x54626b(0x6b)]?String(_0x21883d[_0x54626b(0x6b)]):'',_0x75c79e=_0x21883d[_0x54626b(0x79)]?String(_0x21883d[_0x54626b(0x79)]):'';if(!_0x1a94f1&&!_0x75c79e)throw CliErrors['validation']('`'+_0xd863fb+_0x54626b(0x7c));if(_0x75c79e&&!_0x1a94f1){const _0x9e833c=resolveAlias(_0x5f3324,_0x75c79e);if(!_0x9e833c){const _0x331410=listAliases(_0x5f3324)[_0x54626b(0x66)](_0x272e84=>_0x272e84[_0x54626b(0x79)]),_0x5e5c25=_0x331410[_0x54626b(0x73)]?'Available\x20aliases:\x20'+_0x331410[_0x54626b(0x70)](',\x20'):_0x54626b(0x6e)+_0x5f3324+_0x54626b(0x68)+CLI_BIN_NAME+'\x20api\x20pull`\x20first.';throw CliErrors['validation'](_0x54626b(0x7a)+_0x75c79e+_0x54626b(0x78)+_0x5e5c25);}_0x21883d['code']=_0x9e833c;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5579ec,_0x50020c){const _0x1c1a71=a277_0x53c9,_0x289496=_0x5579ec();while(!![]){try{const _0x56f285=-parseInt(_0x1c1a71(0x98))/0x1+-parseInt(_0x1c1a71(0x9c))/0x2*(-parseInt(_0x1c1a71(0xd7))/0x3)+-parseInt(_0x1c1a71(0xc3))/0x4+-parseInt(_0x1c1a71(0xd1))/0x5*(-parseInt(_0x1c1a71(0x8e))/0x6)+-parseInt(_0x1c1a71(0xa7))/0x7+-parseInt(_0x1c1a71(0xbf))/0x8+parseInt(_0x1c1a71(0xa0))/0x9*(parseInt(_0x1c1a71(0xc0))/0xa);if(_0x56f285===_0x50020c)break;else _0x289496['push'](_0x289496['shift']());}catch(_0x5b6e97){_0x289496['push'](_0x289496['shift']());}}}(a277_0x2900,0x9fcbd));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 a277_0x887336}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x5508c6){const _0x18dd1e=a277_0x53c9;return typeof _0x5508c6===_0x18dd1e(0xda)&&_0x5508c6[_0x18dd1e(0xb8)]()?_0x5508c6[_0x18dd1e(0xb8)]():undefined;}function resolveEnvAppCode(){const _0x2cd3a1=a277_0x53c9,_0x4fe9df=stringFlag(process.env.RABETBASE_APPCODE);if(_0x4fe9df)return{'name':_0x2cd3a1(0xbd),'value':_0x4fe9df};const _0xc4af8c=stringFlag(process.env.LOVRABET_APPCODE);if(_0xc4af8c)return{'name':_0x2cd3a1(0xba),'value':_0xc4af8c};return undefined;}function hasExplicitAppCode(_0x1d0e05,_0x224eb3){const _0x117276=a277_0x53c9;return!!(stringFlag(_0x1d0e05[_0x117276(0x90)])||stringFlag(_0x224eb3[_0x117276(0x90)]));}function assertEnvAppCodeNotIgnored(_0x4ca4b5,_0x585148,_0x2f3b18){const _0x12716c=a277_0x53c9;if(!_0x585148||_0x2f3b18||_0x4ca4b5===_0x585148[_0x12716c(0xd4)])return;const _0x863691=_0x4ca4b5?_0x12716c(0xbe)+_0x4ca4b5+'\x22.':'No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.';throw CliErrors[_0x12716c(0x8f)](_0x585148[_0x12716c(0xae)]+'='+_0x585148[_0x12716c(0xd4)]+'\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20'+_0x863691+'\x20'+(_0x12716c(0xdc)+_0x585148[_0x12716c(0xae)]+'\x22.'));}export function createPipelineEnv(_0x1742ab,_0x873b38,_0x207678=[]){const _0x34af78=a277_0x53c9;return{'rawFlags':_0x873b38,'args':_0x207678,'resolveAppCode':()=>_0x1742ab[_0x34af78(0xa3)],'resolveCookie':()=>_0x1742ab['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a277_0x887336(_0x873b38),'defaultFormat':_0x1742ab[_0x34af78(0xcf)],'defaultPageSize':_0x1742ab[_0x34af78(0x91)],'defaultVerbose':_0x1742ab[_0x34af78(0xa4)],'apiDir':_0x1742ab['apiDir'],'riskLevel':_0x1742ab[_0x34af78(0xcd)],'selectedAppName':_0x1742ab[_0x34af78(0x96)],'mergedCli':{'defaultApp':_0x1742ab[_0x34af78(0xa5)],'currentApp':_0x1742ab[_0x34af78(0xc1)],'appCode':_0x1742ab[_0x34af78(0xa3)],'apps':_0x1742ab[_0x34af78(0xc8)]}};}export function createRabetbaseRunnerAdapter(_0x597ff4={}){const _0x47a4f3=a277_0x53c9;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x47a4f3(0xaf)](_0x48fbb5=>PIPELINE_FLAG_NAMES['has'](_0x48fbb5[_0x47a4f3(0xae)]))[_0x47a4f3(0xcb)](({name:_0x2006e9,type:_0x599271,description:_0x1caf79})=>({'name':_0x2006e9,'type':_0x599271,'description':_0x1caf79})),'formatOutput':_0x597ff4[_0x47a4f3(0xb0)]??formatOutput,'getCommandLabel'(_0xf9fbb7){const _0x4697b1=_0x47a4f3;return CLI_BIN_NAME+'\x20'+_0xf9fbb7[_0x4697b1(0xa8)]+'\x20'+_0xf9fbb7[_0x4697b1(0x97)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x7db345,{def:_0x361416}){const _0x19eef9=_0x47a4f3,_0x1ae177=_0x7db345[_0x19eef9(0xb2)](_0x19eef9(0xce))?_0x19eef9(0xc6):_0x19eef9(0xc9)+_0x361416[_0x19eef9(0xb5)]+_0x19eef9(0x9b)+_0x19eef9(0xc6);return CliErrors['validation'](_0x7db345+'\x0a\x20\x20'+_0x1ae177);}},async 'prepare'(_0x545924,_0x250266,_0x3827d2,_0x46fd7a){const _0x1cfd97=_0x47a4f3,_0x2134cd=_0x250266[_0x1cfd97(0x95)]||DEFAULT_API_DIR;resolveAliasToCode(_0x545924,_0x3827d2,_0x2134cd,_0x46fd7a);const _0x5079fc=resolveCommandAuthMode(_0x545924);let _0x366a45='';if(_0x5079fc!==_0x1cfd97(0x99)){_0x366a45=_0x250266[_0x1cfd97(0xcc)]()||'';if(!_0x366a45){if(_0x5079fc===_0x1cfd97(0xb9))throw CliErrors[_0x1cfd97(0xc7)]();}else{const {setActiveCookie:_0x47e225}=await import(_0x1cfd97(0x9e));_0x47e225(_0x366a45);}}const _0x3c7c21=_0x250266[_0x1cfd97(0xad)]()??'';if(_0x545924[_0x1cfd97(0xb7)]!==![]){const _0x4a68f4=hasExplicitAppCode(_0x3827d2,_0x250266['rawFlags']),_0x8d9a3e=_0x250266[_0x1cfd97(0xa9)]?.[_0x1cfd97(0xc8)]??{},_0x225381=_0x250266[_0x1cfd97(0xa6)]||_0x250266[_0x1cfd97(0xa9)]?.[_0x1cfd97(0xc1)]||_0x250266[_0x1cfd97(0xa9)]?.[_0x1cfd97(0xa5)];if(!_0x4a68f4&&_0x225381&&!_0x8d9a3e[_0x225381]){const _0x2eb055=Object[_0x1cfd97(0xdb)](_0x8d9a3e);throw CliErrors[_0x1cfd97(0x8f)](_0x1cfd97(0x93)+_0x225381+'\x22\x20is\x20selected\x20but\x20not\x20defined\x20in\x20the\x20effective\x20project\x20apps.',_0x2eb055[_0x1cfd97(0xa2)]>0x0?_0x1cfd97(0xd3)+_0x2eb055[_0x1cfd97(0xdd)](',\x20')+_0x1cfd97(0xd6)+CLI_BIN_NAME+_0x1cfd97(0xb4):_0x1cfd97(0xdf)+CLI_BIN_NAME+'\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.');}assertEnvAppCodeNotIgnored(_0x3c7c21,resolveEnvAppCode(),_0x4a68f4);if(!_0x3c7c21){const _0xbda335=Object[_0x1cfd97(0xdb)](_0x8d9a3e);if(!_0x225381&&_0xbda335[_0x1cfd97(0xa2)]>0x1)throw CliErrors[_0x1cfd97(0xac)]('Multiple\x20apps\x20are\x20configured\x20but\x20no\x20default\x20app\x20is\x20selected.\x20Use\x20--app\x20<name>\x20or\x20run\x20`'+CLI_BIN_NAME+_0x1cfd97(0xaa)+_0xbda335[_0x1cfd97(0xdd)](',\x20')+'.');throw CliErrors[_0x1cfd97(0xac)](_0x1cfd97(0x92)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}}return{'defaults':{'booleans':{'verbose':_0x250266['defaultVerbose']},'numbers':{'pagesize':_0x250266[_0x1cfd97(0xb1)]}},'extras':{'appCode':_0x3c7c21,'cookie':_0x366a45,'apiDomain':_0x250266['resolveApiDomain'](),'apiDir':_0x2134cd,'selectedAppName':_0x250266[_0x1cfd97(0xa6)],'mergedCli':_0x250266[_0x1cfd97(0xa9)]}};},'confirmHighRisk':_0x597ff4[_0x47a4f3(0xd9)]??(async({env:_0x83fa2,commandLabel:_0x101aba})=>{const _0x39f3b3=_0x47a4f3;if(_0x83fa2[_0x39f3b3(0xd2)])throw CliErrors[_0x39f3b3(0x8f)](_0x39f3b3(0x9f)+_0x101aba+_0x39f3b3(0x9a));await requireConfirmationPrompt({'lines':[_0x39f3b3(0xc4)+_0x101aba,'\x20\x20\x20Continue?\x20[y/N]\x20'],'createCancelledError':_0x761803=>CliErrors[_0x39f3b3(0xbc)](_0x761803)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x288dc5=a277_0x53c9,{clearActiveCookie:_0x5f358d}=await import(_0x288dc5(0x9e));_0x5f358d();}export async function finalizeRabetbaseRuntimeState(){const _0x5bf374=a277_0x53c9;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x5cd02c},{initEnv:_0x4fd325}]=await Promise['all']([import('../constant/domain.js'),import(_0x5bf374(0xc2))]);_0x5cd02c(),_0x4fd325(_0x5bf374(0xb6));}}function a277_0x2900(){const _0xc8feb2=['service','mergedCli','\x20workspace\x20use\x20--app\x20<name>`.\x20Available:\x20','hint','configMissing','resolveAppCode','name','filter','formatOutput','defaultPageSize','includes','pretty','\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.','risk','production','requiresAppCode','trim','required','LOVRABET_APPCODE','update','cancelled','RABETBASE_APPCODE','Current\x20resolved\x20appcode\x20is\x20\x22','5540288etUPKx','10ViImyZ','currentApp','../constant/env.js','4334724Bnhuzp','⚠\x20\x20High-risk\x20operation:\x20','hasFormat','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','authRequired','apps','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','find','map','resolveCookie','riskLevel','Edit\x20the\x20config\x20file\x20manually','format','meowKey','1273260TEmKnO','isNonInteractive','Available:\x20','value','nonInteractive','.\x20Use\x20--app/--appcode,\x20or\x20run\x20`','3045TtfMPg','rejectedFlags','confirmHighRisk','string','keys','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','join','rawFlags','Use\x20--appcode,\x20add\x20the\x20app\x20to\x20the\x20project\x20workspace,\x20or\x20run\x20`','30AnQdiK','validation','appcode','pageSize','Set\x20appcode\x20via\x20`','App\x20\x22','catch','apiDir','explicitAppName','command','395798nmcFCE','none','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','\x22\x20if\x20this\x20operation\x20is\x20intended.\x20','1514EYmygh','object','../core/api-client.js','High-risk\x20operation\x20`','12166137EszgFP','_notice','length','appCode','verbose','defaultApp','selectedAppName','3968076WDERDk'];a277_0x2900=function(){return _0xc8feb2;};return a277_0x2900();}export async function runCommand(_0x52886c,_0x2ebdba,_0x467d12=terminalRunnerAdapter){const _0x4477b6=a277_0x53c9;assertRejectedFlags(_0x52886c,_0x2ebdba[_0x4477b6(0xde)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x52886c)?withUpdateNotice(_0x52886c):_0x52886c,_0x2ebdba,_0x467d12);}function assertRejectedFlags(_0x25256f,_0x39bd97){const _0x4d7477=a277_0x53c9;for(const _0x2e84f of _0x25256f[_0x4d7477(0xd8)]??[]){const _0xec005d=GLOBAL_FLAGS[_0x4d7477(0xca)](_0x3d5586=>_0x3d5586[_0x4d7477(0xae)]===_0x2e84f[_0x4d7477(0xae)]),_0x2bc647=new Set([_0x2e84f[_0x4d7477(0xae)],toCamelCase(_0x2e84f[_0x4d7477(0xae)]),_0xec005d?.[_0x4d7477(0xd0)]]),_0x458d0a=[..._0x2bc647]['some'](_0x5d586f=>{if(!_0x5d586f)return![];const _0x4496dc=_0x39bd97[_0x5d586f];return _0x4496dc!==undefined&&_0x4496dc!==null&&_0x4496dc!==![];});if(_0x458d0a)throw CliErrors['validation'](_0x2e84f['message'],_0x2e84f[_0x4d7477(0xab)]);}}function toCamelCase(_0x2c3257){return _0x2c3257['replace'](/-([a-z])/g,(_0xd50ceb,_0x1cdbb6)=>_0x1cdbb6['toUpperCase']());}function shouldAttachUpdateNotice(_0x2fd63e){const _0x17ba47=a277_0x53c9;if(_0x2fd63e[_0x17ba47(0xc5)]===![])return![];return![_0x17ba47(0xbb),'schema','doctor'][_0x17ba47(0xb2)](_0x2fd63e['service']);}function withUpdateNotice(_0x215a4d){return{..._0x215a4d,async 'execute'(_0x5b2ea9){const _0x2b9665=a277_0x53c9,_0x3b3d4c=shouldResolveUpdateNotice(_0x5b2ea9)?resolveLatestUpdateNotice()[_0x2b9665(0x94)](()=>null):Promise['resolve'](null),_0x597018=await _0x215a4d['execute'](_0x5b2ea9);return attachUpdateNotice(_0x597018,await _0x3b3d4c);}};}function a277_0x53c9(_0x219635,_0x3530df){_0x219635=_0x219635-0x8e;const _0x290025=a277_0x2900();let _0x53c982=_0x290025[_0x219635];return _0x53c982;}function shouldResolveUpdateNotice(_0x3bc649){const _0x3f37f6=a277_0x53c9;return _0x3bc649['format']===_0x3f37f6(0xb3)&&!_0x3bc649[_0x3f37f6(0xd5)];}function attachUpdateNotice(_0x201e7d,_0x2b4003){const _0x22db80=a277_0x53c9;if(!_0x2b4003||!_0x201e7d||typeof _0x201e7d!==_0x22db80(0x9d))return _0x201e7d;const _0x39dbfc=_0x201e7d,_0x1f21bf=typeof _0x39dbfc[_0x22db80(0xa1)]===_0x22db80(0x9d)&&_0x39dbfc[_0x22db80(0xa1)]!==null?_0x39dbfc[_0x22db80(0xa1)]:{};return{..._0x39dbfc,'_notice':{..._0x1f21bf,'update':_0x2b4003}};}
|
|
1
|
+
(function(_0x11c3bc,_0x17934e){const _0xbab801=a279_0x3a48,_0x50ceb5=_0x11c3bc();while(!![]){try{const _0x1e44b4=parseInt(_0xbab801(0x12f))/0x1*(parseInt(_0xbab801(0x146))/0x2)+-parseInt(_0xbab801(0x12b))/0x3+-parseInt(_0xbab801(0x174))/0x4*(-parseInt(_0xbab801(0x143))/0x5)+-parseInt(_0xbab801(0x17b))/0x6+-parseInt(_0xbab801(0x161))/0x7*(parseInt(_0xbab801(0x17a))/0x8)+-parseInt(_0xbab801(0x14a))/0x9+parseInt(_0xbab801(0x167))/0xa;if(_0x1e44b4===_0x17934e)break;else _0x50ceb5['push'](_0x50ceb5['shift']());}catch(_0x397583){_0x50ceb5['push'](_0x50ceb5['shift']());}}}(a279_0x21a3,0x8c25d));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 a279_0x3fd8e2}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x28b814){const _0x1a4ca7=a279_0x3a48;return typeof _0x28b814===_0x1a4ca7(0x16f)&&_0x28b814['trim']()?_0x28b814[_0x1a4ca7(0x151)]():undefined;}function resolveEnvAppCode(){const _0x502fb7=a279_0x3a48,_0x4a953f=stringFlag(process.env.RABETBASE_APPCODE);if(_0x4a953f)return{'name':_0x502fb7(0x168),'value':_0x4a953f};const _0x5b584b=stringFlag(process.env.LOVRABET_APPCODE);if(_0x5b584b)return{'name':_0x502fb7(0x138),'value':_0x5b584b};return undefined;}function hasExplicitAppCode(_0x163496,_0x4d8d0e){const _0x1e125e=a279_0x3a48;return!!(stringFlag(_0x163496[_0x1e125e(0x162)])||stringFlag(_0x4d8d0e['appcode']));}function assertEnvAppCodeNotIgnored(_0x5bfae2,_0xe32790,_0x3cb5f6){const _0xae3f49=a279_0x3a48;if(!_0xe32790||_0x3cb5f6||_0x5bfae2===_0xe32790[_0xae3f49(0x160)])return;const _0x3c4ce9=_0x5bfae2?_0xae3f49(0x175)+_0x5bfae2+'\x22.':'No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.';throw CliErrors[_0xae3f49(0x16a)](_0xe32790[_0xae3f49(0x153)]+'='+_0xe32790[_0xae3f49(0x160)]+_0xae3f49(0x15c)+_0x3c4ce9+'\x20'+('To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$'+_0xe32790['name']+'\x22.'));}export function createPipelineEnv(_0x594114,_0x1e843c,_0x5a27c9=[]){const _0x37bcf6=a279_0x3a48;return{'rawFlags':_0x1e843c,'args':_0x5a27c9,'resolveAppCode':()=>_0x594114['appCode'],'resolveCookie':()=>_0x594114[_0x37bcf6(0x13c)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a279_0x3fd8e2(_0x1e843c),'defaultFormat':_0x594114[_0x37bcf6(0x140)],'defaultPageSize':_0x594114[_0x37bcf6(0x137)],'defaultVerbose':_0x594114[_0x37bcf6(0x136)],'apiDir':_0x594114[_0x37bcf6(0x179)],'riskLevel':_0x594114[_0x37bcf6(0x171)],'selectedAppName':_0x594114[_0x37bcf6(0x172)],'mergedCli':{'defaultApp':_0x594114[_0x37bcf6(0x159)],'currentApp':_0x594114[_0x37bcf6(0x127)],'appCode':_0x594114[_0x37bcf6(0x150)],'apps':_0x594114[_0x37bcf6(0x152)]}};}export function createRabetbaseRunnerAdapter(_0x579c57={}){const _0x4dacdc=a279_0x3a48;return{'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x4dacdc(0x163)](_0x565528=>PIPELINE_FLAG_NAMES[_0x4dacdc(0x16e)](_0x565528[_0x4dacdc(0x153)]))[_0x4dacdc(0x155)](({name:_0x5c3556,type:_0x420dff,description:_0x19f332})=>({'name':_0x5c3556,'type':_0x420dff,'description':_0x19f332})),'formatOutput':_0x579c57[_0x4dacdc(0x12a)]??formatOutput,'getCommandLabel'(_0x1b87a0){const _0x3547f7=_0x4dacdc;return CLI_BIN_NAME+'\x20'+_0x1b87a0[_0x3547f7(0x130)]+'\x20'+_0x1b87a0['command'];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x2bf24b,{def:_0x2e9543}){const _0x5ec18e=_0x4dacdc,_0x3a8822=_0x2bf24b[_0x5ec18e(0x15d)]('Edit\x20the\x20config\x20file\x20manually')?_0x5ec18e(0x135):_0x5ec18e(0x14f)+_0x2e9543['risk']+'\x22\x20if\x20this\x20operation\x20is\x20intended.\x20'+'AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.';return CliErrors[_0x5ec18e(0x16a)](_0x2bf24b+_0x5ec18e(0x128)+_0x3a8822);}},async 'prepare'(_0x128327,_0x14a0fe,_0x5e5f08,_0x48add1){const _0x3c741a=_0x4dacdc,_0xddb0c=_0x14a0fe[_0x3c741a(0x179)]||DEFAULT_API_DIR;resolveAliasToCode(_0x128327,_0x5e5f08,_0xddb0c,_0x48add1);const _0x1a620a=resolveCommandAuthMode(_0x128327);let _0x52dc6e='';if(_0x1a620a!==_0x3c741a(0x17c)){_0x52dc6e=_0x14a0fe['resolveCookie']()||'';if(!_0x52dc6e){if(_0x1a620a==='required')throw CliErrors[_0x3c741a(0x170)]();}else{const {setActiveCookie:_0x2ca5c2}=await import(_0x3c741a(0x14e));_0x2ca5c2(_0x52dc6e);}}const _0x48ab99=_0x14a0fe['resolveAppCode']()??'';if(_0x128327[_0x3c741a(0x15a)]!==![]){const _0x2a51d0=hasExplicitAppCode(_0x5e5f08,_0x14a0fe[_0x3c741a(0x176)]),_0x155933=_0x14a0fe[_0x3c741a(0x15b)]?.[_0x3c741a(0x152)]??{},_0x59f472=_0x14a0fe['selectedAppName']||_0x14a0fe[_0x3c741a(0x15b)]?.[_0x3c741a(0x127)]||_0x14a0fe[_0x3c741a(0x15b)]?.[_0x3c741a(0x159)];if(!_0x2a51d0&&_0x59f472&&!_0x155933[_0x59f472]){const _0x5edf4e=Object['keys'](_0x155933);throw CliErrors[_0x3c741a(0x16a)](_0x3c741a(0x12c)+_0x59f472+_0x3c741a(0x149),_0x5edf4e[_0x3c741a(0x142)]>0x0?_0x3c741a(0x132)+_0x5edf4e[_0x3c741a(0x131)](',\x20')+'.\x20Use\x20--app/--appcode,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x3c741a(0x12e):_0x3c741a(0x16c)+CLI_BIN_NAME+'\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.');}assertEnvAppCodeNotIgnored(_0x48ab99,resolveEnvAppCode(),_0x2a51d0);if(!_0x48ab99){const _0x8cd94=Object['keys'](_0x155933);if(!_0x59f472&&_0x8cd94[_0x3c741a(0x142)]>0x1)throw CliErrors['configMissing']('Multiple\x20apps\x20are\x20configured\x20but\x20no\x20default\x20app\x20is\x20selected.\x20Use\x20--app\x20<name>\x20or\x20run\x20`'+CLI_BIN_NAME+_0x3c741a(0x13b)+_0x8cd94[_0x3c741a(0x131)](',\x20')+'.');throw CliErrors[_0x3c741a(0x156)](_0x3c741a(0x139)+CLI_BIN_NAME+_0x3c741a(0x144));}}return{'defaults':{'booleans':{'verbose':_0x14a0fe[_0x3c741a(0x157)]},'numbers':{'pagesize':_0x14a0fe[_0x3c741a(0x15e)]}},'extras':{'appCode':_0x48ab99,'cookie':_0x52dc6e,'apiDomain':_0x14a0fe[_0x3c741a(0x141)](),'apiDir':_0xddb0c,'selectedAppName':_0x14a0fe['selectedAppName'],'mergedCli':_0x14a0fe['mergedCli']}};},'confirmHighRisk':_0x579c57[_0x4dacdc(0x14b)]??(async({env:_0x790e59,commandLabel:_0x1e054e})=>{const _0x4cb172=_0x4dacdc;if(_0x790e59[_0x4cb172(0x178)])throw CliErrors[_0x4cb172(0x16a)](_0x4cb172(0x14c)+_0x1e054e+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmationPrompt({'lines':[_0x4cb172(0x173)+_0x1e054e,_0x4cb172(0x14d)],'createCancelledError':_0x3a7cc4=>CliErrors[_0x4cb172(0x133)](_0x3a7cc4)});}),async 'finalize'(){await clearRabetbaseCommandState();}};}const terminalRunnerAdapter=createRabetbaseRunnerAdapter();async function clearRabetbaseCommandState(){const _0x1b7522=a279_0x3a48,{clearActiveCookie:_0xd65922}=await import(_0x1b7522(0x14e));_0xd65922();}export async function finalizeRabetbaseRuntimeState(){const _0x4f8f9f=a279_0x3a48;try{await clearRabetbaseCommandState();}finally{const [{initDomains:_0x1a12f0},{initEnv:_0x10e592}]=await Promise[_0x4f8f9f(0x16b)]([import(_0x4f8f9f(0x15f)),import(_0x4f8f9f(0x12d))]);_0x1a12f0(),_0x10e592('production');}}export async function runCommand(_0x35c099,_0x2b8d09,_0x70bd06=terminalRunnerAdapter){const _0x548776=a279_0x3a48;assertRejectedFlags(_0x35c099,_0x2b8d09[_0x548776(0x176)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x35c099)?withUpdateNotice(_0x35c099):_0x35c099,_0x2b8d09,_0x70bd06);}function assertRejectedFlags(_0x43f989,_0x59b375){const _0x4dcf0f=a279_0x3a48;for(const _0x4fa557 of _0x43f989[_0x4dcf0f(0x16d)]??[]){const _0x13a09f=GLOBAL_FLAGS['find'](_0x268c0c=>_0x268c0c[_0x4dcf0f(0x153)]===_0x4fa557[_0x4dcf0f(0x153)]),_0x3145b2=new Set([_0x4fa557['name'],toCamelCase(_0x4fa557[_0x4dcf0f(0x153)]),_0x13a09f?.[_0x4dcf0f(0x166)]]),_0x1de9ac=[..._0x3145b2][_0x4dcf0f(0x13e)](_0x465649=>{if(!_0x465649)return![];const _0x358281=_0x59b375[_0x465649];return _0x358281!==undefined&&_0x358281!==null&&_0x358281!==![];});if(_0x1de9ac)throw CliErrors['validation'](_0x4fa557[_0x4dcf0f(0x154)],_0x4fa557[_0x4dcf0f(0x13a)]);}}function toCamelCase(_0x452172){const _0x2f6977=a279_0x3a48;return _0x452172[_0x2f6977(0x129)](/-([a-z])/g,(_0x568e47,_0x35d4d4)=>_0x35d4d4[_0x2f6977(0x147)]());}function shouldAttachUpdateNotice(_0x5897c4){const _0x516ed6=a279_0x3a48;if(_0x5897c4[_0x516ed6(0x13d)]===![])return![];return![_0x516ed6(0x134),_0x516ed6(0x148),_0x516ed6(0x145)][_0x516ed6(0x15d)](_0x5897c4[_0x516ed6(0x130)]);}function withUpdateNotice(_0x536cc9){return{..._0x536cc9,async 'execute'(_0x1bd63b){const _0x7e2229=a279_0x3a48,_0x2463ce=shouldResolveUpdateNotice(_0x1bd63b)?resolveLatestUpdateNotice()[_0x7e2229(0x169)](()=>null):Promise[_0x7e2229(0x158)](null),_0x40042c=await _0x536cc9['execute'](_0x1bd63b);return attachUpdateNotice(_0x40042c,await _0x2463ce);}};}function a279_0x21a3(){const _0x58a93c=['all','Use\x20--appcode,\x20add\x20the\x20app\x20to\x20the\x20project\x20workspace,\x20or\x20run\x20`','rejectedFlags','has','string','authRequired','riskLevel','explicitAppName','⚠\x20\x20High-risk\x20operation:\x20','393332eQehaO','Current\x20resolved\x20appcode\x20is\x20\x22','rawFlags','_notice','isNonInteractive','apiDir','152KHYTRS','3200886iKeirL','none','currentApp','\x0a\x20\x20','replace','formatOutput','2287890XERJTC','App\x20\x22','../constant/env.js','\x20config\x20delete\x20defaultApp`\x20to\x20repair\x20the\x20selection.','18KFGlig','service','join','Available:\x20','cancelled','update','AI\x20Agents\x20and\x20automated\x20scripts\x20must\x20not\x20modify\x20riskLevel\x20or\x20attempt\x20to\x20elevate\x20it.','verbose','pageSize','LOVRABET_APPCODE','Set\x20appcode\x20via\x20`','hint','\x20workspace\x20use\x20--app\x20<name>`.\x20Available:\x20','cookie','hasFormat','some','nonInteractive','format','resolveApiDomain','length','45MOjiXu','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','doctor','98652HkAYwC','toUpperCase','schema','\x22\x20is\x20selected\x20but\x20not\x20defined\x20in\x20the\x20effective\x20project\x20apps.','3585510HArlEr','confirmHighRisk','High-risk\x20operation\x20`','\x20\x20\x20Continue?\x20[y/N]\x20','../core/api-client.js','A\x20human\x20user\x20may\x20review\x20the\x20active\x20risk\x20ceilings\x20and\x20manually\x20edit\x20the\x20applicable\x20.rabetbase.json\x20file\x20to\x20set\x20riskLevel\x20to\x20\x22','appCode','trim','apps','name','message','map','configMissing','defaultVerbose','resolve','defaultApp','requiresAppCode','mergedCli','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','includes','defaultPageSize','../constant/domain.js','value','135667JHWqWM','appcode','filter','object','pretty','meowKey','8639200dbFDHO','RABETBASE_APPCODE','catch','validation'];a279_0x21a3=function(){return _0x58a93c;};return a279_0x21a3();}function a279_0x3a48(_0x8bc824,_0xe94a12){_0x8bc824=_0x8bc824-0x127;const _0x21a31c=a279_0x21a3();let _0x3a48d7=_0x21a31c[_0x8bc824];return _0x3a48d7;}function shouldResolveUpdateNotice(_0x3716f2){const _0x1ce590=a279_0x3a48;return _0x3716f2[_0x1ce590(0x140)]===_0x1ce590(0x165)&&!_0x3716f2[_0x1ce590(0x13f)];}function attachUpdateNotice(_0x5380c7,_0x1978ee){const _0x41eb62=a279_0x3a48;if(!_0x1978ee||!_0x5380c7||typeof _0x5380c7!==_0x41eb62(0x164))return _0x5380c7;const _0x11dfee=_0x5380c7,_0x2651aa=typeof _0x11dfee[_0x41eb62(0x177)]===_0x41eb62(0x164)&&_0x11dfee[_0x41eb62(0x177)]!==null?_0x11dfee[_0x41eb62(0x177)]:{};return{..._0x11dfee,'_notice':{..._0x2651aa,'update':_0x1978ee}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2cd282,_0x2954e4){const _0x305af2=a280_0x5034,_0x4d9bc3=_0x2cd282();while(!![]){try{const _0xfc468d=parseInt(_0x305af2(0x8d))/0x1+-parseInt(_0x305af2(0x89))/0x2*(parseInt(_0x305af2(0x87))/0x3)+-parseInt(_0x305af2(0x88))/0x4*(-parseInt(_0x305af2(0x8b))/0x5)+parseInt(_0x305af2(0x86))/0x6*(-parseInt(_0x305af2(0x8c))/0x7)+parseInt(_0x305af2(0x83))/0x8*(-parseInt(_0x305af2(0x84))/0x9)+parseInt(_0x305af2(0x8e))/0xa+parseInt(_0x305af2(0x8a))/0xb;if(_0xfc468d===_0x2954e4)break;else _0x4d9bc3['push'](_0x4d9bc3['shift']());}catch(_0x461dbd){_0x4d9bc3['push'](_0x4d9bc3['shift']());}}}(a280_0x1fcc,0x29db0));import{buildSchemaPayload as a280_0x5716be}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a280_0x1fcc(){const _0x339028=['../commands/registry.js','896838askUhT','9rTsCmr','52NDchrk','204908Pniddw','3909246HrPOQk','39810gAqHHX','14NglprE','217088NqrOvs','1970810koVMBX','254168nReRsA','27OVzQZo'];a280_0x1fcc=function(){return _0x339028;};return a280_0x1fcc();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a280_0x5034(_0x5947bc,_0x340101){_0x5947bc=_0x5947bc-0x83;const _0x1fcc0e=a280_0x1fcc();let _0x50342c=_0x1fcc0e[_0x5947bc];return _0x50342c;}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x3b16aa=a280_0x5034,{serviceRegistry:_0x53897b,findDefinition:_0x2d22d6}=await import(_0x3b16aa(0x85));return a280_0x5716be({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x53897b,'buildAllFlags':buildAllFlags,'findDefinition':_0x2d22d6});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33902f,_0x37d140){const _0x2893bf=a281_0xd3f8,_0x2ea572=_0x33902f();while(!![]){try{const _0x18f76f=parseInt(_0x2893bf(0xc5))/0x1+-parseInt(_0x2893bf(0xae))/0x2*(-parseInt(_0x2893bf(0xc2))/0x3)+parseInt(_0x2893bf(0xad))/0x4+parseInt(_0x2893bf(0xb6))/0x5*(parseInt(_0x2893bf(0xbf))/0x6)+-parseInt(_0x2893bf(0xaf))/0x7+parseInt(_0x2893bf(0xb2))/0x8+-parseInt(_0x2893bf(0xbb))/0x9*(parseInt(_0x2893bf(0xb3))/0xa);if(_0x18f76f===_0x37d140)break;else _0x2ea572['push'](_0x2ea572['shift']());}catch(_0x26ff12){_0x2ea572['push'](_0x2ea572['shift']());}}}(a281_0x3a79,0xb2f6e));import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function assertSupportedCommandFlags(_0x5953ef,_0x192d30){const _0x1455d1=a281_0xd3f8;if(!_0x5953ef['strictFlags'])return;const _0xac82e4=new Set([_0x1455d1(0xc1),_0x1455d1(0xbc)]),_0x3bcc7c=GLOBAL_FLAGS[_0x1455d1(0xb7)](_0x14d401=>PIPELINE_FLAG_NAMES[_0x1455d1(0xc6)](_0x14d401['name']));for(const _0x3053d9 of[..._0x5953ef['flags'],..._0x3bcc7c]){addFlagCandidates(_0xac82e4,_0x3053d9);}for(const [_0x437b27,_0x4ba1d7]of Object[_0x1455d1(0xc3)](_0x192d30)){if(!isExplicitValue(_0x4ba1d7)||_0xac82e4[_0x1455d1(0xc6)](_0x437b27))continue;const _0x1556dd=GLOBAL_FLAGS[_0x1455d1(0xb9)](_0x19947c=>_0x19947c[_0x1455d1(0xc8)]===_0x437b27)?.[_0x1455d1(0xbd)]??toKebabCase(_0x437b27);throw CliErrors['validation'](_0x1455d1(0xc0)+_0x1556dd+_0x1455d1(0xc4)+CLI_BIN_NAME+'\x20'+_0x5953ef[_0x1455d1(0xb5)]+'\x20'+_0x5953ef['command']+'`.',_0x1455d1(0xc7)+CLI_BIN_NAME+'\x20'+_0x5953ef[_0x1455d1(0xb5)]+'\x20'+_0x5953ef['command']+_0x1455d1(0xb4));}}function addFlagCandidates(_0x30ffe3,_0x5e1d81){const _0xa25cad=a281_0xd3f8,_0x30f2d3=_0xa25cad(0xc8)in _0x5e1d81?[_0x5e1d81[_0xa25cad(0xbd)],_0x5e1d81[_0xa25cad(0xc8)]]:[_0x5e1d81[_0xa25cad(0xbd)],_0x5e1d81[_0xa25cad(0xb1)]];for(const _0xfe4ef1 of _0x30f2d3){if(!_0xfe4ef1)continue;_0x30ffe3['add'](_0xfe4ef1),_0x30ffe3[_0xa25cad(0xbe)](toCamelCase(_0xfe4ef1));}}function isExplicitValue(_0x9ab0a1){const _0x4c3f32=a281_0xd3f8;return _0x9ab0a1!==undefined&&_0x9ab0a1!==null&&_0x9ab0a1!==![]&&(!Array[_0x4c3f32(0xb8)](_0x9ab0a1)||_0x9ab0a1[_0x4c3f32(0xac)]>0x0);}function a281_0xd3f8(_0x3c67cb,_0x16bc2d){_0x3c67cb=_0x3c67cb-0xac;const _0x3a7934=a281_0x3a79();let _0xd3f836=_0x3a7934[_0x3c67cb];return _0xd3f836;}function toCamelCase(_0x1e1c84){const _0x2bdb71=a281_0xd3f8;return _0x1e1c84[_0x2bdb71(0xb0)](/-([a-z])/g,(_0x1de80e,_0x365631)=>_0x365631[_0x2bdb71(0xba)]());}function toKebabCase(_0x3d874c){const _0x31010c=a281_0xd3f8;return _0x3d874c[_0x31010c(0xb0)](/([a-z0-9])([A-Z])/g,_0x31010c(0xc9))['toLowerCase']();}function a281_0x3a79(){const _0x401549=['length','583656HOXJIZ','1455604mNDWFK','5354363ZMNTAg','replace','alias','8572400SgSWHE','5962730LmHWmd','\x20--help`\x20to\x20view\x20the\x20current\x20command\x20contract.','service','10ysPeJD','filter','isArray','find','toUpperCase','9RTdkpp','version','name','add','437748PieqcT','Unsupported\x20flag\x20--','help','3oaauRo','entries','\x20for\x20`','3038koopdb','has','Run\x20`','meowKey','$1-$2'];a281_0x3a79=function(){return _0x401549;};return a281_0x3a79();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a282_0x1c42(_0x4541e6,_0x19c190){_0x4541e6=_0x4541e6-0x1ec;var _0x42355b=a282_0x4235();var _0x1c429e=_0x42355b[_0x4541e6];return _0x1c429e;}(function(_0x496615,_0x413d45){var _0x4e0dc3=a282_0x1c42,_0x557718=_0x496615();while(!![]){try{var _0x17818c=parseInt(_0x4e0dc3(0x1ef))/0x1*(-parseInt(_0x4e0dc3(0x1ed))/0x2)+-parseInt(_0x4e0dc3(0x1f4))/0x3*(-parseInt(_0x4e0dc3(0x1ee))/0x4)+parseInt(_0x4e0dc3(0x1f2))/0x5*(parseInt(_0x4e0dc3(0x1f5))/0x6)+parseInt(_0x4e0dc3(0x1f3))/0x7*(-parseInt(_0x4e0dc3(0x1f0))/0x8)+parseInt(_0x4e0dc3(0x1f1))/0x9+-parseInt(_0x4e0dc3(0x1ec))/0xa+-parseInt(_0x4e0dc3(0x1f6))/0xb;if(_0x17818c===_0x413d45)break;else _0x557718['push'](_0x557718['shift']());}catch(_0x2c1f8f){_0x557718['push'](_0x557718['shift']());}}}(a282_0x4235,0x18c28));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';function a282_0x4235(){var _0x5ae5be=['1734240hlyAyc','2IodLiU','348cdyTIG','102181OvwRrL','1256aqHZQX','1240956cVFcJE','130CJJpmH','3052nAPNLd','5034jGtjuk','42450QnsZCT','245817WsghdY'];a282_0x4235=function(){return _0x5ae5be;};return a282_0x4235();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.5.
|
|
2
|
-
export declare const GIT_TAG = "v2.5.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-09-
|
|
1
|
+
export declare const VERSION = "2.5.3-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.5.3-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "bb7d5183";
|
|
4
|
+
export declare const BUILD_TIME = "2026-09-10T02:00:22.032Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a283_0x1cedca=a283_0x34c3;function a283_0x34c3(_0x20ebd3,_0x58785b){_0x20ebd3=_0x20ebd3-0x107;const _0x221271=a283_0x2212();let _0x34c38b=_0x221271[_0x20ebd3];return _0x34c38b;}function a283_0x2212(){const _0x56b3cb=['5uKwzUw','8297030VxAudN','805718mykqQj','621fvgpOa','6947382CZBEGP','3834436BuQuCr','2628249kYnjCN','91024nySFGu','1BmGCHm','2026-09-10T02:00:22.032Z','10hPEzES','30643261dUfTLQ','v2.5.3-beta.1'];a283_0x2212=function(){return _0x56b3cb;};return a283_0x2212();}(function(_0x34ad13,_0x172881){const _0x3fe8da=a283_0x34c3,_0x44489e=_0x34ad13();while(!![]){try{const _0x1003c1=-parseInt(_0x3fe8da(0x109))/0x1*(-parseInt(_0x3fe8da(0x110))/0x2)+-parseInt(_0x3fe8da(0x107))/0x3+parseInt(_0x3fe8da(0x113))/0x4+parseInt(_0x3fe8da(0x10e))/0x5*(parseInt(_0x3fe8da(0x112))/0x6)+parseInt(_0x3fe8da(0x10f))/0x7+-parseInt(_0x3fe8da(0x108))/0x8*(-parseInt(_0x3fe8da(0x111))/0x9)+parseInt(_0x3fe8da(0x10b))/0xa*(-parseInt(_0x3fe8da(0x10c))/0xb);if(_0x1003c1===_0x172881)break;else _0x44489e['push'](_0x44489e['shift']());}catch(_0x58d445){_0x44489e['push'](_0x44489e['shift']());}}}(a283_0x2212,0xca1ff));export const VERSION='2.5.3-beta.1';export const GIT_TAG=a283_0x1cedca(0x10d);export const GIT_COMMIT='bb7d5183';export const BUILD_TIME=a283_0x1cedca(0x10a);
|