@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.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/logs.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.d.ts +1 -0
- package/lib/commands/dataset/design-context.js +1 -0
- package/lib/commands/dataset/design-start.d.ts +1 -0
- package/lib/commands/dataset/design-start.js +1 -0
- package/lib/commands/dataset/design-status.d.ts +1 -0
- package/lib/commands/dataset/design-status.js +1 -0
- package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
- package/lib/commands/dataset/design-sync-retry.js +1 -0
- package/lib/commands/dataset/design-sync-status.d.ts +1 -0
- package/lib/commands/dataset/design-sync-status.js +1 -0
- package/lib/commands/dataset/design-validate.d.ts +1 -0
- package/lib/commands/dataset/design-validate.js +1 -0
- 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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/api-architecture-upgrade.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/feishu-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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +11 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.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.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.d.ts +17 -0
- package/lib/services/dataset-design/checkpoint.js +1 -0
- package/lib/services/dataset-design/commands.d.ts +6 -0
- package/lib/services/dataset-design/commands.js +1 -0
- package/lib/services/dataset-design/contract.d.ts +7 -0
- package/lib/services/dataset-design/contract.js +1 -0
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +4 -4
- package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
- package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
- package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a249_0x27946f=a249_0x11de;(function(_0x517c21,_0x458faa){const _0x339e97=a249_0x11de,_0x1b2217=_0x517c21();while(!![]){try{const _0x1279b6=-parseInt(_0x339e97(0x1f5))/0x1*(-parseInt(_0x339e97(0x209))/0x2)+parseInt(_0x339e97(0x1ff))/0x3*(-parseInt(_0x339e97(0x1fc))/0x4)+parseInt(_0x339e97(0x1f9))/0x5+parseInt(_0x339e97(0x1fb))/0x6*(parseInt(_0x339e97(0x200))/0x7)+parseInt(_0x339e97(0x204))/0x8*(-parseInt(_0x339e97(0x206))/0x9)+-parseInt(_0x339e97(0x1f4))/0xa*(-parseInt(_0x339e97(0x20f))/0xb)+parseInt(_0x339e97(0x1fd))/0xc;if(_0x1279b6===_0x458faa)break;else _0x1b2217['push'](_0x1b2217['shift']());}catch(_0x167030){_0x1b2217['push'](_0x1b2217['shift']());}}}(a249_0x3003,0x7c312));function a249_0x11de(_0x2c8e91,_0x4d5ba6){_0x2c8e91=_0x2c8e91-0x1f3;const _0x3003ba=a249_0x3003();let _0x11ded1=_0x3003ba[_0x2c8e91];return _0x11ded1;}import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a249_0x27946f(0x20d),'command':a249_0x27946f(0x201),'description':a249_0x27946f(0x1f3),'risk':'read','flags':[SQLCODE_FLAG,{'name':'params','type':a249_0x27946f(0x20b),'description':a249_0x27946f(0x1fe)}],async 'execute'(_0x109fb3){const _0x16ae89=a249_0x27946f,_0x4710f9=parseJsonParams(_0x109fb3[_0x16ae89(0x20a)](_0x16ae89(0x202))),_0x2abaf7=Date[_0x16ae89(0x203)](),_0x29ceb0=await executeSql(_0x109fb3[_0x16ae89(0x205)],_0x109fb3[_0x16ae89(0x20a)](_0x16ae89(0x1f8)),_0x4710f9),_0x3e79d3=Date['now']()-_0x2abaf7,_0x26b6cd=_0x29ceb0?.[_0x16ae89(0x207)]??_0x29ceb0,_0x22f5c2=_0x29ceb0?.[_0x16ae89(0x1f7)]??!![];if(!_0x22f5c2)return{'ok':![],'data':{'error':_0x29ceb0?.[_0x16ae89(0x20e)]||_0x16ae89(0x20c),'elapsed':_0x3e79d3},'message':'SQL\x20execution\x20failed'};const _0x1e1530=Array[_0x16ae89(0x1f6)](_0x26b6cd)?_0x26b6cd:[];return{'ok':!![],'data':{'rows':_0x1e1530,'rowCount':_0x1e1530[_0x16ae89(0x1fa)],'elapsed':_0x3e79d3},'message':_0x16ae89(0x208)+_0x1e1530[_0x16ae89(0x1fa)]+'\x20row(s)\x20in\x20'+_0x3e79d3+'ms'};}};function a249_0x3003(){const _0x3b0f3d=['execError','20779aBxvRc','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','3720nWbfcx','1nmtGpx','isArray','execSuccess','sqlcode','336310fBeNLz','length','38994cHMYXy','653068ZvHSFy','4861944JMQctf','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','3TSutME','133NUSZRZ','exec','params','now','76376RDQRGy','appCode','756NJGfhJ','execResult','Returned\x20','350584jwVCXV','str','string','SQL\x20execution\x20failed','sql'];a249_0x3003=function(){return _0x3b0f3d;};return a249_0x3003();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a6672,_0x46c529){const _0x3b3d90=a250_0x4d00,_0x1e05af=_0x3a6672();while(!![]){try{const _0x2d63d2=parseInt(_0x3b3d90(0x12a))/0x1*(parseInt(_0x3b3d90(0x128))/0x2)+parseInt(_0x3b3d90(0x12e))/0x3*(-parseInt(_0x3b3d90(0x130))/0x4)+-parseInt(_0x3b3d90(0x127))/0x5+-parseInt(_0x3b3d90(0x129))/0x6*(-parseInt(_0x3b3d90(0x12f))/0x7)+parseInt(_0x3b3d90(0x12d))/0x8*(parseInt(_0x3b3d90(0x12b))/0x9)+parseInt(_0x3b3d90(0x12c))/0xa+-parseInt(_0x3b3d90(0x126))/0xb;if(_0x2d63d2===_0x46c529)break;else _0x1e05af['push'](_0x1e05af['shift']());}catch(_0x551378){_0x1e05af['push'](_0x1e05af['shift']());}}}(a250_0x5a9f,0x9df9e));import{sqlList}from'../../commands/sql/list.js';function a250_0x4d00(_0x39effa,_0x2be3fc){_0x39effa=_0x39effa-0x126;const _0x5a9f68=a250_0x5a9f();let _0x4d0001=_0x5a9f68[_0x39effa];return _0x4d0001;}function a250_0x5a9f(){const _0x14bf91=['131615KtSKwn','419751wunpKg','4144870nMmDhm','200VVaMAA','382002lQlupJ','2523605BPbmLR','4nEyPnb','22269852kBFWAs','3435455ddGABT','18VzGtuh','12cwvmdq'];a250_0x5a9f=function(){return _0x14bf91;};return a250_0x5a9f();}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';import{sqlCreate}from'../../commands/sql/create.js';import{sqlStatus}from'../../commands/sql/status.js';import{sqlPush}from'../../commands/sql/push.js';import{sqlDelete}from'../../commands/sql/delete.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlExec,sqlPull,sqlDelete];
|
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a251_0x397b05=a251_0x2212;function a251_0x2212(_0x4e9e23,_0x4e1875){_0x4e9e23=_0x4e9e23-0x1d6;const _0x4571d7=a251_0x4571();let _0x2212be=_0x4571d7[_0x4e9e23];return _0x2212be;}function a251_0x4571(){const _0x5d7b92=['boolean','description','4MZVFTY','page','5RHlghS','9CWYcFi','160QxkeYB','128788dFCICs','length','num','name','2204392yNNyGF','17485LPDxjW','\x20SQL\x20queries\x20(total:\x20','sqlCode','all','dbId','6731662TetThw','Page\x20number','sql','bool','6988590uNdHpC','appCode','list','str','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','List\x20custom\x20SQL\x20queries','verbose','142ldLuzb','No\x20custom\x20SQL\x20queries\x20found.','Found\x20','3150054YoTvfV','Filter\x20by\x20SQL\x20name','pagesize','string','read','sqlName','9196668arGIwO'];a251_0x4571=function(){return _0x5d7b92;};return a251_0x4571();}(function(_0x298426,_0x24d641){const _0x1001e6=a251_0x2212,_0x6cc2ed=_0x298426();while(!![]){try{const _0x9b69d4=parseInt(_0x1001e6(0x1ec))/0x1*(parseInt(_0x1001e6(0x1d6))/0x2)+parseInt(_0x1001e6(0x1d9))/0x3*(-parseInt(_0x1001e6(0x1e2))/0x4)+parseInt(_0x1001e6(0x1e4))/0x5*(-parseInt(_0x1001e6(0x1f5))/0x6)+parseInt(_0x1001e6(0x1f1))/0x7+parseInt(_0x1001e6(0x1eb))/0x8*(parseInt(_0x1001e6(0x1e5))/0x9)+parseInt(_0x1001e6(0x1e6))/0xa*(-parseInt(_0x1001e6(0x1e7))/0xb)+parseInt(_0x1001e6(0x1df))/0xc;if(_0x9b69d4===_0x24d641)break;else _0x6cc2ed['push'](_0x6cc2ed['shift']());}catch(_0x2705af){_0x6cc2ed['push'](_0x6cc2ed['shift']());}}}(a251_0x4571,0xcdcb0));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a251_0x397b05(0x1f3),'command':a251_0x397b05(0x1f7),'description':a251_0x397b05(0x1fa),'risk':a251_0x397b05(0x1dd),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a251_0x397b05(0x1ea),'type':a251_0x397b05(0x1dc),'description':a251_0x397b05(0x1da)},{'name':a251_0x397b05(0x1e3),'type':'number','description':a251_0x397b05(0x1f2),'default':0x1},{'name':a251_0x397b05(0x1db),'type':'number','description':'Page\x20size'},{'name':'verbose','type':a251_0x397b05(0x1e0),'description':a251_0x397b05(0x1f9)}],async 'execute'(_0x4956ce){const _0x2263fa=a251_0x397b05,_0x1bd21d=await listSqlQueries(_0x4956ce[_0x2263fa(0x1f6)],{'sqlCode':_0x4956ce['str']('sqlcode')||undefined,'sqlName':_0x4956ce[_0x2263fa(0x1f8)](_0x2263fa(0x1ea))||undefined,'currentPage':_0x4956ce[_0x2263fa(0x1e9)]('page'),'pageSize':_0x4956ce['num'](_0x2263fa(0x1db),0x32)}),_0x2caf3a=_0x4956ce[_0x2263fa(0x1f4)](_0x2263fa(0x1fb)),_0x47416f=_0x1bd21d['tableData']??[],_0x2c1168=_0x1bd21d['paging']?.['totalCount']??_0x47416f[_0x2263fa(0x1e8)];let _0x39d8a1;return _0x2caf3a?_0x39d8a1=_0x47416f:_0x39d8a1=await Promise[_0x2263fa(0x1ef)](_0x47416f['map'](async _0x13e94a=>{const _0x3d4de4=_0x2263fa;let _0x3e0c6b;try{_0x3e0c6b=_0x13e94a[_0x3d4de4(0x1f0)]?await getDbName(_0x4956ce['appCode'],_0x13e94a[_0x3d4de4(0x1f0)]):undefined;}catch{}return{'sqlCode':_0x13e94a[_0x3d4de4(0x1ee)],'sqlName':_0x13e94a[_0x3d4de4(0x1de)],'description':_0x13e94a[_0x3d4de4(0x1e1)]??'','db':_0x3e0c6b?_0x3e0c6b+'\x20('+_0x13e94a[_0x3d4de4(0x1f0)]+')':_0x13e94a['dbId']??''};})),{'ok':!![],'data':_0x39d8a1,'message':_0x47416f['length']===0x0?_0x2263fa(0x1d7):_0x2263fa(0x1d8)+_0x47416f[_0x2263fa(0x1e8)]+_0x2263fa(0x1ed)+_0x2c1168+').'};}};
|
package/lib/commands/sql/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a246_0x46dcea=a246_0x3a6a;(function(_0x5e1686,_0x1b07de){const _0x56b6f6=a246_0x3a6a,_0x1a2dc7=_0x5e1686();while(!![]){try{const _0x558e8d=parseInt(_0x56b6f6(0xc7))/0x1+-parseInt(_0x56b6f6(0xd5))/0x2+-parseInt(_0x56b6f6(0xb4))/0x3+parseInt(_0x56b6f6(0xf4))/0x4*(parseInt(_0x56b6f6(0xd0))/0x5)+parseInt(_0x56b6f6(0xdc))/0x6*(-parseInt(_0x56b6f6(0xbe))/0x7)+parseInt(_0x56b6f6(0xd4))/0x8*(parseInt(_0x56b6f6(0xf5))/0x9)+parseInt(_0x56b6f6(0xd3))/0xa;if(_0x558e8d===_0x1b07de)break;else _0x1a2dc7['push'](_0x1a2dc7['shift']());}catch(_0x4a720e){_0x1a2dc7['push'](_0x1a2dc7['shift']());}}}(a246_0x4610,0xbc91f));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a246_0x3a6a(_0x48b1a1,_0x40c63a){_0x48b1a1=_0x48b1a1-0xb3;const _0x4610b2=a246_0x4610();let _0x3a6a73=_0x4610b2[_0x48b1a1];return _0x3a6a73;}import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{detectSqlMode}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x1a2fbb,_0x354bb8){const _0x1e40a2=a246_0x3a6a,_0x4a800f=[];let _0x326f54=0x1;while(!![]){const _0x251d69=await listSqlQueries(_0x1a2fbb,{'currentPage':_0x326f54,'pageSize':PAGE_SIZE,'sqlCode':_0x354bb8['sqlCode'],'sqlName':_0x354bb8[_0x1e40a2(0xe4)]}),_0x3d5a4a=_0x251d69[_0x1e40a2(0xc3)]??[];_0x4a800f[_0x1e40a2(0xff)](..._0x3d5a4a);if(_0x3d5a4a[_0x1e40a2(0xed)]===0x0)break;const _0x2f127c=_0x251d69[_0x1e40a2(0xbb)]?.[_0x1e40a2(0xf3)];if(_0x2f127c!=null?_0x4a800f[_0x1e40a2(0xed)]>=_0x2f127c:_0x3d5a4a[_0x1e40a2(0xed)]<PAGE_SIZE)break;_0x326f54++;}return _0x4a800f;}async function ensureSqlContent(_0x285f09){const _0x3a876e=a246_0x3a6a;if(_0x285f09['sqlContent']!=null&&String(_0x285f09[_0x3a876e(0x100)])[_0x3a876e(0xed)]>0x0)return _0x285f09;return getSqlQueryDetail(_0x285f09[_0x3a876e(0xc1)]);}export const sqlPull={'service':a246_0x46dcea(0xcc),'command':a246_0x46dcea(0xe0),'description':a246_0x46dcea(0xef),'risk':a246_0x46dcea(0xfb),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a246_0x46dcea(0x101),'type':a246_0x46dcea(0xd2),'description':a246_0x46dcea(0xec)},{'name':a246_0x46dcea(0xe3),'type':a246_0x46dcea(0xfa),'description':a246_0x46dcea(0xb7)}],async 'dryRun'(_0x4f1da3){const _0x370a60=a246_0x46dcea,_0x38cee7=loadSqlProjectConfig(_0x4f1da3[_0x370a60(0xcd)]),_0x1f599e=await readSqlLockFile(_0x38cee7[_0x370a60(0xce)]),{appLock:_0x1cc48d}=ensureSqlLockScope(_0x1f599e??createEmptySqlLock(),_0x38cee7['appCode'],_0x38cee7['sqlRoot'],_0x370a60(0xe0)),_0x25750b=await fetchAllSqlQueries(_0x4f1da3[_0x370a60(0xcd)],{'sqlCode':_0x4f1da3[_0x370a60(0xc5)]('sqlcode')||undefined,'sqlName':_0x4f1da3[_0x370a60(0xc5)](_0x370a60(0x101))||undefined}),_0x26d65d=[];for(const _0xd2ec70 of _0x25750b){const _0x27ce08=await ensureSqlContent(_0xd2ec70),_0x13b1f9=ensureRemoteSqlContent(_0x27ce08),_0x24cfe9=detectSqlMode(_0x13b1f9),_0x295dd5=_0x27ce08[_0x370a60(0xfd)]?await getDbName(_0x4f1da3[_0x370a60(0xcd)],Number(_0x27ce08[_0x370a60(0xfd)]))[_0x370a60(0xc8)](()=>undefined):undefined,_0x27575e=buildLocalSqlFileContent({'sqlCode':_0x27ce08[_0x370a60(0xc1)],'sqlName':_0x27ce08[_0x370a60(0xe4)],'dbId':_0x27ce08['dbId']},_0x13b1f9,{'dbName':_0x295dd5,'mode':_0x24cfe9,'syncedAt':new Date()[_0x370a60(0xd7)](),'description':_0x27ce08[_0x370a60(0xcb)]}),_0x388c3c=buildSqlLockEntry(_0x27ce08,_0x13b1f9,'',{'dbName':_0x295dd5}),_0x5c6d89=resolveLocalSqlFilePath(_0x38cee7,_0x27ce08[_0x370a60(0xc1)],_0x388c3c);let _0x1609fb=_0x370a60(0xde),_0xd275c1;const _0x2bd716=await findExistingSqlFiles(_0x38cee7,_0x5c6d89,_0x24cfe9,_0x1cc48d['sqls'][_0x27ce08[_0x370a60(0xc1)]]);if(_0x2bd716['length']>0x0){const _0x335438=await compareExistingSqlFiles(_0x2bd716,_0x27575e,_0x24cfe9);if(_0x335438[_0x370a60(0xd9)](({equivalent:_0x5533bc})=>!_0x5533bc))_0x1609fb=_0x370a60(0xc2),_0xd275c1=_0x370a60(0xdb);else _0x335438[_0x370a60(0xed)]===0x1&&_0x335438[0x0]?.['file'][_0x370a60(0xe9)]&&(_0x1609fb='skipped',_0xd275c1=_0x370a60(0xba));}_0x26d65d[_0x370a60(0xff)]({'sqlCode':_0x27ce08[_0x370a60(0xc1)],'sqlName':_0x27ce08[_0x370a60(0xe4)],'filePath':_0x5c6d89,'status':_0x1609fb,'reason':_0xd275c1});}return{'method':_0x370a60(0xf7),'url':_0x370a60(0xf8),'body':{'appCode':_0x4f1da3[_0x370a60(0xcd)],'sqlCode':_0x4f1da3[_0x370a60(0xc5)](_0x370a60(0xe1))||null,'sqlName':_0x4f1da3[_0x370a60(0xc5)](_0x370a60(0x101))||null,'files':_0x26d65d},'description':_0x370a60(0xb5)+_0x26d65d[_0x370a60(0xed)]+_0x370a60(0xbf)+_0x38cee7[_0x370a60(0xbd)]};},async 'execute'(_0x5063bc){const _0x3ab690=a246_0x46dcea,_0x2b8a2a=loadSqlProjectConfig(_0x5063bc[_0x3ab690(0xcd)]),_0x2e8320=await readSqlLockFile(_0x2b8a2a[_0x3ab690(0xce)]),{lockData:_0x367d94,appLock:_0x1e5029}=ensureSqlLockScope(_0x2e8320??createEmptySqlLock(),_0x2b8a2a[_0x3ab690(0xcd)],_0x2b8a2a['sqlRoot'],_0x3ab690(0xe0)),_0x38b6d8=_0x5063bc[_0x3ab690(0xb3)](_0x3ab690(0xe3)),_0x373306=await fetchAllSqlQueries(_0x5063bc[_0x3ab690(0xcd)],{'sqlCode':_0x5063bc[_0x3ab690(0xc5)](_0x3ab690(0xe1))||undefined,'sqlName':_0x5063bc[_0x3ab690(0xc5)](_0x3ab690(0x101))||undefined});if(_0x373306['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x3ab690(0xda)};const _0x55a834=[],_0x265942=[];for(const _0x53b9e2 of _0x373306){try{_0x55a834[_0x3ab690(0xff)](await ensureSqlContent(_0x53b9e2));}catch(_0x2a4ff9){_0x265942[_0x3ab690(0xff)]({'sqlCode':_0x53b9e2[_0x3ab690(0xc1)],'error':_0x2a4ff9 instanceof Error?_0x2a4ff9[_0x3ab690(0xf0)]:String(_0x2a4ff9)});}}if(_0x38b6d8&&!_0x5063bc[_0x3ab690(0xeb)]){let _0x19117a=![];for(const _0x2646e4 of _0x55a834){const _0x403736=detectSqlMode(ensureRemoteSqlContent(_0x2646e4)),_0x2855ae=_0x2646e4[_0x3ab690(0xfd)]?await getDbName(_0x5063bc[_0x3ab690(0xcd)],Number(_0x2646e4[_0x3ab690(0xfd)]))[_0x3ab690(0xc8)](()=>undefined):undefined,_0x4c25c0=buildLocalSqlFileContent({'sqlCode':_0x2646e4[_0x3ab690(0xc1)],'sqlName':_0x2646e4[_0x3ab690(0xe4)],'dbId':_0x2646e4[_0x3ab690(0xfd)]},ensureRemoteSqlContent(_0x2646e4),{'dbName':_0x2855ae,'mode':_0x403736,'syncedAt':new Date()[_0x3ab690(0xd7)](),'description':_0x2646e4['description']}),_0x337f07=resolveLocalSqlFilePath(_0x2b8a2a,_0x2646e4[_0x3ab690(0xc1)],buildSqlLockEntry(_0x2646e4,ensureRemoteSqlContent(_0x2646e4),'',{'dbName':_0x2855ae})),_0x3c3c3a=await findExistingSqlFiles(_0x2b8a2a,_0x337f07,_0x403736,_0x1e5029[_0x3ab690(0xc9)][_0x2646e4[_0x3ab690(0xc1)]]),_0x158a25=await compareExistingSqlFiles(_0x3c3c3a,_0x4c25c0,_0x403736);if(_0x158a25['some'](({equivalent:_0xdc190c})=>!_0xdc190c)){_0x19117a=!![];break;}}if(_0x19117a){const _0x395361=await confirmForceOverwrite(_0x3ab690(0xd8));if(!_0x395361)throw CliErrors[_0x3ab690(0xd6)](_0x3ab690(0xf6));}}const _0x4a39c4=cloneSqlLockData(_0x367d94),_0x171eb7=_0x4a39c4[_0x3ab690(0xb9)][_0x2b8a2a[_0x3ab690(0xcd)]],_0x4de8b8=[],_0x50ee86=[];for(const _0x4944e1 of _0x55a834){const _0x36d64e=_0x171eb7['sqls'][_0x4944e1['sqlCode']],_0x487bc7=ensureRemoteSqlContent(_0x4944e1),_0x598492=detectSqlMode(_0x487bc7),_0x499100=_0x4944e1[_0x3ab690(0xfd)]?await getDbName(_0x5063bc[_0x3ab690(0xcd)],Number(_0x4944e1[_0x3ab690(0xfd)]))[_0x3ab690(0xc8)](()=>undefined):undefined,_0x1375d7=buildLocalSqlFileContent({'sqlCode':_0x4944e1[_0x3ab690(0xc1)],'sqlName':_0x4944e1[_0x3ab690(0xe4)],'dbId':_0x4944e1[_0x3ab690(0xfd)]},_0x487bc7,{'dbName':_0x499100,'mode':_0x598492,'syncedAt':new Date()[_0x3ab690(0xd7)](),'description':_0x4944e1[_0x3ab690(0xcb)]}),_0x2d4af1=buildSqlLockEntry(_0x4944e1,_0x487bc7,computeSqlContentHash(_0x1375d7),{'dbName':_0x499100}),_0x5bd5c6=_0x2d4af1[_0x3ab690(0xd1)],_0x5a8d34=join(_0x2b8a2a[_0x3ab690(0xbd)],_0x5bd5c6);try{const _0x32c2e0=await findExistingSqlFiles(_0x2b8a2a,_0x5a8d34,_0x598492,_0x36d64e),_0x4da76a=await compareExistingSqlFiles(_0x32c2e0,_0x1375d7,_0x598492);if(!_0x38b6d8&&_0x4da76a[_0x3ab690(0xd9)](({equivalent:_0xe72b9f})=>!_0xe72b9f)){_0x50ee86[_0x3ab690(0xff)]({'sqlCode':_0x4944e1[_0x3ab690(0xc1)],'reason':_0x3ab690(0xe7)});continue;}const _0x4872dc=_0x4da76a[_0x3ab690(0xe2)](({file:_0x2712ac})=>_0x2712ac[_0x3ab690(0xe9)]),_0x40c278=_0x4da76a[_0x3ab690(0xe2)](({file:_0x5cf39f})=>!_0x5cf39f[_0x3ab690(0xe9)]);if(_0x4872dc?.[_0x3ab690(0xb6)]&&!_0x40c278){_0x50ee86[_0x3ab690(0xff)]({'sqlCode':_0x4944e1[_0x3ab690(0xc1)],'reason':_0x3ab690(0xba)}),_0x171eb7['sqls'][_0x4944e1[_0x3ab690(0xc1)]]={..._0x2d4af1,'hash':computeSqlContentHash(_0x4872dc[_0x3ab690(0xca)]),'path':_0x5bd5c6};continue;}!_0x4872dc?.['equivalent']&&(await ensureParentDirectory(_0x5a8d34),await writeFile(_0x5a8d34,_0x1375d7,_0x3ab690(0xdd))),_0x40c278&&await rm(_0x40c278['file'][_0x3ab690(0xc0)],{'force':!![]}),_0x171eb7[_0x3ab690(0xc9)][_0x4944e1[_0x3ab690(0xc1)]]={..._0x2d4af1,'hash':_0x4872dc?.[_0x3ab690(0xb6)]?computeSqlContentHash(_0x4872dc['content']):_0x2d4af1['hash'],'path':_0x5bd5c6},_0x4de8b8[_0x3ab690(0xff)]({'sqlCode':_0x4944e1[_0x3ab690(0xc1)],'filePath':_0x5a8d34});}catch(_0x18b51d){_0x265942[_0x3ab690(0xff)]({'sqlCode':_0x4944e1[_0x3ab690(0xc1)],'error':_0x18b51d instanceof Error?_0x18b51d[_0x3ab690(0xf0)]:String(_0x18b51d)});}}return _0x171eb7[_0x3ab690(0xf9)]=new Date()[_0x3ab690(0xd7)](),await writeSqlLockFile(_0x2b8a2a[_0x3ab690(0xce)],_0x4a39c4),{'ok':_0x265942[_0x3ab690(0xed)]===0x0,'data':{'pulled':_0x4de8b8,'skipped':_0x50ee86,'failed':_0x265942},'message':_0x3ab690(0xbc)+_0x4de8b8[_0x3ab690(0xed)]+_0x3ab690(0x102)+_0x50ee86['length']+_0x3ab690(0xdf)+_0x265942[_0x3ab690(0xed)]+_0x3ab690(0xf2)};}};function isEquivalentPulledSqlFile(_0x43cea9,_0x256feb,_0xfed297,_0x300eef){if(_0xfed297!==_0x300eef)return normalizePulledSqlBody(_0x43cea9,_0xfed297)===normalizePulledSqlBody(_0x256feb,_0x300eef);return normalizePullComparableContent(_0x43cea9,_0xfed297)===normalizePullComparableContent(_0x256feb,_0x300eef);}async function findExistingSqlFiles(_0x97ce14,_0xa4cd48,_0x489c95,_0x56e1cc){const _0x46eb67=a246_0x46dcea,_0x4f22a9=[];await fileExists(_0xa4cd48)&&_0x4f22a9['push']({'filePath':_0xa4cd48,'mode':_0x489c95,'isCanonical':!![]});if(!_0x56e1cc?.[_0x46eb67(0xd1)])return _0x4f22a9;const _0x208929=join(_0x97ce14[_0x46eb67(0xbd)],_0x56e1cc[_0x46eb67(0xd1)]);if(_0x208929===_0xa4cd48)return _0x4f22a9;return await fileExists(_0x208929)&&_0x4f22a9[_0x46eb67(0xff)]({'filePath':_0x208929,'mode':_0x56e1cc['mode']??modeFromFilePath(_0x208929),'isCanonical':![]}),_0x4f22a9;}async function compareExistingSqlFiles(_0x412a83,_0x232ead,_0xdc56c7){const _0x5854ea=a246_0x46dcea;return Promise[_0x5854ea(0xea)](_0x412a83[_0x5854ea(0xc6)](async _0x235816=>{const _0x331799=_0x5854ea,_0x56df7d=await readFile(_0x235816[_0x331799(0xc0)],_0x331799(0xdd));return{'file':_0x235816,'content':_0x56df7d,'equivalent':isEquivalentPulledSqlFile(_0x56df7d,_0x232ead,_0x235816[_0x331799(0xc4)],_0xdc56c7)};}));}function modeFromFilePath(_0x3e43ac){const _0x43b13a=a246_0x46dcea;return _0x3e43ac[_0x43b13a(0xf1)]()['endsWith'](_0x43b13a(0xcf))?_0x43b13a(0xe8):'sql';}function normalizePulledSqlBody(_0x71d1bf,_0x1dd7d4){const _0x26951b=a246_0x46dcea;return stripLocalSqlMetadata(_0x71d1bf,_0x1dd7d4)[_0x26951b(0xee)](/\r\n/g,'\x0a')[_0x26951b(0xb8)]();}function normalizePullComparableContent(_0x47b9c7,_0x4bcdca){const _0x5ce3f6=a246_0x46dcea,_0x1e55f1=_0x47b9c7[_0x5ce3f6(0xee)](/\r\n/g,'\x0a')[_0x5ce3f6(0xfe)]('\x0a'),_0x2302ba=_0x1e55f1[_0x5ce3f6(0xe6)](_0x9745cf=>!isSyncedAtMetadataLine(_0x9745cf,_0x4bcdca));return _0x2302ba[_0x5ce3f6(0xe5)]('\x0a');}function isSyncedAtMetadataLine(_0x448720,_0x40bf4e){const _0x304261=a246_0x46dcea;if(_0x40bf4e==='mybatisXml')return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x304261(0xfc)](_0x448720);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x304261(0xfc)](_0x448720);}function a246_0x4610(){const _0x2c9c3f=['catch','sqls','content','description','sql','appCode','lockFilePath','.xml','5MMHgOY','path','string','13245860nDuotU','72VLDBrW','1177836PJCnan','cancelled','toISOString','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','some','No\x20remote\x20SQL\x20queries\x20matched.','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','257274jYmraW','utf8','would_pull','\x20skipped,\x20','pull','sqlcode','find','force','sqlName','join','filter','local\x20differs\x20from\x20remote','mybatisXml','isCanonical','all','nonInteractive','Filter\x20by\x20SQL\x20display\x20name','length','replace','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','message','toLowerCase','\x20failed','totalCount','596384ZmCBot','67653ipgefd','Force\x20pull\x20cancelled.','POST','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','lastSync','boolean','read','test','dbId','split','push','sqlContent','name','\x20written,\x20','bool','430419ejHtzr','Would\x20pull\x20','equivalent','Force\x20overwrite\x20local\x20unsynced\x20changes','trim','apps','unchanged','paging','Pull\x20complete:\x20','sqlRootDir','168bFbFBm','\x20SQL\x20file(s)\x20into\x20','filePath','sqlCode','conflict','tableData','mode','str','map','992535CHnWJO'];a246_0x4610=function(){return _0x2c9c3f;};return a246_0x4610();}
|
|
1
|
+
const a252_0x1944a2=a252_0x3a92;(function(_0x33233e,_0x4780cc){const _0x2fab9d=a252_0x3a92,_0x3c1e44=_0x33233e();while(!![]){try{const _0x2f8843=-parseInt(_0x2fab9d(0x9e))/0x1*(-parseInt(_0x2fab9d(0x8a))/0x2)+parseInt(_0x2fab9d(0xd3))/0x3+parseInt(_0x2fab9d(0xc8))/0x4+-parseInt(_0x2fab9d(0x9d))/0x5*(parseInt(_0x2fab9d(0xb6))/0x6)+-parseInt(_0x2fab9d(0xc9))/0x7*(-parseInt(_0x2fab9d(0xa7))/0x8)+parseInt(_0x2fab9d(0xc3))/0x9*(-parseInt(_0x2fab9d(0xb0))/0xa)+-parseInt(_0x2fab9d(0x95))/0xb;if(_0x2f8843===_0x4780cc)break;else _0x3c1e44['push'](_0x3c1e44['shift']());}catch(_0x301a79){_0x3c1e44['push'](_0x3c1e44['shift']());}}}(a252_0x3f32,0x95e7d));import{readFile,rm,writeFile}from'node:fs/promises';function a252_0x3a92(_0x297d20,_0x18ff78){_0x297d20=_0x297d20-0x85;const _0x3f3292=a252_0x3f32();let _0x3a92f5=_0x3f3292[_0x297d20];return _0x3a92f5;}import{join}from'node:path';import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a252_0x3f32(){const _0x223184=['some','hash','paging','5620386ceuBYJ','utf8','equivalent','sqls','push','all','Would\x20pull\x20','No\x20remote\x20SQL\x20queries\x20matched.','map','sqlRoot','replace','join','read','684873dIcIRJ','boolean','totalCount','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','lockFilePath','4305188qaVAoL','10059iBlvQW','Force\x20overwrite\x20local\x20unsynced\x20changes','conflict','sqlcode','endsWith','dbId','sqlRootDir','lastSync','nonInteractive','length','1245270lNbjaw','Force\x20pull\x20cancelled.','test','.xml','filter','mybatisXml','filePath','sqlCode','3918KVrcQJ','Pull\x20complete:\x20','toLowerCase','skipped','name','description','str','\x20failed','sqlContent','split','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','11724262zTKGVo','POST','force','sql','isCanonical','find','local\x20differs\x20from\x20remote','content','5AxZSRr','545TWVTqO','apps','toISOString','string','catch','mode','appCode','\x20SQL\x20file(s)\x20into\x20','path','744xvMXaN','message','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','pull','\x20written,\x20','\x20skipped,\x20','unchanged','sqlName','trim','10gOSARz','file','cancelled'];a252_0x3f32=function(){return _0x223184;};return a252_0x3f32();}import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{detectSqlMode}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x345afd,_0x5a5726){const _0x5333a4=a252_0x3a92,_0x2f411d=[];let _0x5f2868=0x1;while(!![]){const _0x16a27d=await listSqlQueries(_0x345afd,{'currentPage':_0x5f2868,'pageSize':PAGE_SIZE,'sqlCode':_0x5a5726['sqlCode'],'sqlName':_0x5a5726['sqlName']}),_0x15397c=_0x16a27d['tableData']??[];_0x2f411d[_0x5333a4(0xba)](..._0x15397c);if(_0x15397c['length']===0x0)break;const _0x2051f4=_0x16a27d[_0x5333a4(0xb5)]?.[_0x5333a4(0xc5)];if(_0x2051f4!=null?_0x2f411d['length']>=_0x2051f4:_0x15397c[_0x5333a4(0xd2)]<PAGE_SIZE)break;_0x5f2868++;}return _0x2f411d;}async function ensureSqlContent(_0x14ac42){const _0x1a2d44=a252_0x3a92;if(_0x14ac42[_0x1a2d44(0x92)]!=null&&String(_0x14ac42[_0x1a2d44(0x92)])[_0x1a2d44(0xd2)]>0x0)return _0x14ac42;return getSqlQueryDetail(_0x14ac42['sqlCode']);}export const sqlPull={'service':a252_0x1944a2(0x98),'command':a252_0x1944a2(0xaa),'description':'Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','risk':a252_0x1944a2(0xc2),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a252_0x1944a2(0x8e),'type':a252_0x1944a2(0xa1),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':a252_0x1944a2(0x97),'type':a252_0x1944a2(0xc4),'description':a252_0x1944a2(0xca)}],async 'dryRun'(_0x22687f){const _0x40e3d1=a252_0x1944a2,_0x2e6b49=loadSqlProjectConfig(_0x22687f['appCode']),_0x402661=await readSqlLockFile(_0x2e6b49[_0x40e3d1(0xc7)]),{appLock:_0x74ec35}=ensureSqlLockScope(_0x402661??createEmptySqlLock(),_0x2e6b49[_0x40e3d1(0xa4)],_0x2e6b49[_0x40e3d1(0xbf)],_0x40e3d1(0xaa)),_0x4f8795=await fetchAllSqlQueries(_0x22687f[_0x40e3d1(0xa4)],{'sqlCode':_0x22687f['str'](_0x40e3d1(0xcc))||undefined,'sqlName':_0x22687f[_0x40e3d1(0x90)](_0x40e3d1(0x8e))||undefined}),_0x526396=[];for(const _0x493f9f of _0x4f8795){const _0x4254a3=await ensureSqlContent(_0x493f9f),_0x198b7f=ensureRemoteSqlContent(_0x4254a3),_0x405d56=detectSqlMode(_0x198b7f),_0x2deaf3=_0x4254a3[_0x40e3d1(0xce)]?await getDbName(_0x22687f[_0x40e3d1(0xa4)],Number(_0x4254a3[_0x40e3d1(0xce)]))[_0x40e3d1(0xa2)](()=>undefined):undefined,_0x1a4baf=buildLocalSqlFileContent({'sqlCode':_0x4254a3[_0x40e3d1(0x89)],'sqlName':_0x4254a3['sqlName'],'dbId':_0x4254a3[_0x40e3d1(0xce)]},_0x198b7f,{'dbName':_0x2deaf3,'mode':_0x405d56,'syncedAt':new Date()[_0x40e3d1(0xa0)](),'description':_0x4254a3[_0x40e3d1(0x8f)]}),_0x5d8284=buildSqlLockEntry(_0x4254a3,_0x198b7f,'',{'dbName':_0x2deaf3}),_0x306c49=resolveLocalSqlFilePath(_0x2e6b49,_0x4254a3['sqlCode'],_0x5d8284);let _0x4dbb75='would_pull',_0x230d42;const _0x3df5fe=await findExistingSqlFiles(_0x2e6b49,_0x306c49,_0x405d56,_0x74ec35[_0x40e3d1(0xb9)][_0x4254a3[_0x40e3d1(0x89)]]);if(_0x3df5fe[_0x40e3d1(0xd2)]>0x0){const _0x28073c=await compareExistingSqlFiles(_0x3df5fe,_0x1a4baf,_0x405d56);if(_0x28073c[_0x40e3d1(0xb3)](({equivalent:_0x5afa77})=>!_0x5afa77))_0x4dbb75=_0x40e3d1(0xcb),_0x230d42=_0x40e3d1(0x94);else _0x28073c[_0x40e3d1(0xd2)]===0x1&&_0x28073c[0x0]?.[_0x40e3d1(0xb1)][_0x40e3d1(0x99)]&&(_0x4dbb75=_0x40e3d1(0x8d),_0x230d42='unchanged');}_0x526396['push']({'sqlCode':_0x4254a3['sqlCode'],'sqlName':_0x4254a3['sqlName'],'filePath':_0x306c49,'status':_0x4dbb75,'reason':_0x230d42});}return{'method':_0x40e3d1(0x96),'url':_0x40e3d1(0xc6),'body':{'appCode':_0x22687f[_0x40e3d1(0xa4)],'sqlCode':_0x22687f[_0x40e3d1(0x90)](_0x40e3d1(0xcc))||null,'sqlName':_0x22687f['str'](_0x40e3d1(0x8e))||null,'files':_0x526396},'description':_0x40e3d1(0xbc)+_0x526396['length']+_0x40e3d1(0xa5)+_0x2e6b49['sqlRootDir']};},async 'execute'(_0x129f06){const _0x534670=a252_0x1944a2,_0x46d59d=loadSqlProjectConfig(_0x129f06[_0x534670(0xa4)]),_0x1fd151=await readSqlLockFile(_0x46d59d[_0x534670(0xc7)]),{lockData:_0x5d4852,appLock:_0x1e3d6f}=ensureSqlLockScope(_0x1fd151??createEmptySqlLock(),_0x46d59d['appCode'],_0x46d59d[_0x534670(0xbf)],_0x534670(0xaa)),_0x4d30cc=_0x129f06['bool'](_0x534670(0x97)),_0x4a9aee=await fetchAllSqlQueries(_0x129f06[_0x534670(0xa4)],{'sqlCode':_0x129f06[_0x534670(0x90)](_0x534670(0xcc))||undefined,'sqlName':_0x129f06[_0x534670(0x90)](_0x534670(0x8e))||undefined});if(_0x4a9aee['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x534670(0xbd)};const _0x3d8dbd=[],_0x1ac7e8=[];for(const _0x355cec of _0x4a9aee){try{_0x3d8dbd[_0x534670(0xba)](await ensureSqlContent(_0x355cec));}catch(_0x159576){_0x1ac7e8[_0x534670(0xba)]({'sqlCode':_0x355cec[_0x534670(0x89)],'error':_0x159576 instanceof Error?_0x159576[_0x534670(0xa8)]:String(_0x159576)});}}if(_0x4d30cc&&!_0x129f06[_0x534670(0xd1)]){let _0x40e53b=![];for(const _0x38cc3b of _0x3d8dbd){const _0x49524a=detectSqlMode(ensureRemoteSqlContent(_0x38cc3b)),_0x299316=_0x38cc3b[_0x534670(0xce)]?await getDbName(_0x129f06[_0x534670(0xa4)],Number(_0x38cc3b[_0x534670(0xce)]))['catch'](()=>undefined):undefined,_0xe959c2=buildLocalSqlFileContent({'sqlCode':_0x38cc3b['sqlCode'],'sqlName':_0x38cc3b[_0x534670(0xae)],'dbId':_0x38cc3b[_0x534670(0xce)]},ensureRemoteSqlContent(_0x38cc3b),{'dbName':_0x299316,'mode':_0x49524a,'syncedAt':new Date()[_0x534670(0xa0)](),'description':_0x38cc3b[_0x534670(0x8f)]}),_0xe4c862=resolveLocalSqlFilePath(_0x46d59d,_0x38cc3b[_0x534670(0x89)],buildSqlLockEntry(_0x38cc3b,ensureRemoteSqlContent(_0x38cc3b),'',{'dbName':_0x299316})),_0x2af0a4=await findExistingSqlFiles(_0x46d59d,_0xe4c862,_0x49524a,_0x1e3d6f[_0x534670(0xb9)][_0x38cc3b[_0x534670(0x89)]]),_0x3077fc=await compareExistingSqlFiles(_0x2af0a4,_0xe959c2,_0x49524a);if(_0x3077fc[_0x534670(0xb3)](({equivalent:_0x530509})=>!_0x530509)){_0x40e53b=!![];break;}}if(_0x40e53b){const _0x5df7b2=await confirmForceOverwrite(_0x534670(0xa9));if(!_0x5df7b2)throw CliErrors[_0x534670(0xb2)](_0x534670(0xd4));}}const _0x3cbd5f=cloneSqlLockData(_0x5d4852),_0x4fdaf6=_0x3cbd5f[_0x534670(0x9f)][_0x46d59d[_0x534670(0xa4)]],_0xce79f6=[],_0x268323=[];for(const _0x5c2bc9 of _0x3d8dbd){const _0x45022a=_0x4fdaf6[_0x534670(0xb9)][_0x5c2bc9['sqlCode']],_0x59701e=ensureRemoteSqlContent(_0x5c2bc9),_0x5090cb=detectSqlMode(_0x59701e),_0x539bf4=_0x5c2bc9['dbId']?await getDbName(_0x129f06[_0x534670(0xa4)],Number(_0x5c2bc9['dbId']))[_0x534670(0xa2)](()=>undefined):undefined,_0x20c649=buildLocalSqlFileContent({'sqlCode':_0x5c2bc9['sqlCode'],'sqlName':_0x5c2bc9[_0x534670(0xae)],'dbId':_0x5c2bc9['dbId']},_0x59701e,{'dbName':_0x539bf4,'mode':_0x5090cb,'syncedAt':new Date()[_0x534670(0xa0)](),'description':_0x5c2bc9[_0x534670(0x8f)]}),_0x5f28be=buildSqlLockEntry(_0x5c2bc9,_0x59701e,computeSqlContentHash(_0x20c649),{'dbName':_0x539bf4}),_0x2e6c21=_0x5f28be[_0x534670(0xa6)],_0x810e70=join(_0x46d59d[_0x534670(0xcf)],_0x2e6c21);try{const _0x391571=await findExistingSqlFiles(_0x46d59d,_0x810e70,_0x5090cb,_0x45022a),_0x82c0a7=await compareExistingSqlFiles(_0x391571,_0x20c649,_0x5090cb);if(!_0x4d30cc&&_0x82c0a7[_0x534670(0xb3)](({equivalent:_0x58b2c6})=>!_0x58b2c6)){_0x268323[_0x534670(0xba)]({'sqlCode':_0x5c2bc9[_0x534670(0x89)],'reason':_0x534670(0x9b)});continue;}const _0x3b5d9e=_0x82c0a7[_0x534670(0x9a)](({file:_0x196510})=>_0x196510[_0x534670(0x99)]),_0x36b0c2=_0x82c0a7[_0x534670(0x9a)](({file:_0x50712f})=>!_0x50712f[_0x534670(0x99)]);if(_0x3b5d9e?.[_0x534670(0xb8)]&&!_0x36b0c2){_0x268323[_0x534670(0xba)]({'sqlCode':_0x5c2bc9[_0x534670(0x89)],'reason':_0x534670(0xad)}),_0x4fdaf6['sqls'][_0x5c2bc9[_0x534670(0x89)]]={..._0x5f28be,'hash':computeSqlContentHash(_0x3b5d9e[_0x534670(0x9c)]),'path':_0x2e6c21};continue;}!_0x3b5d9e?.[_0x534670(0xb8)]&&(await ensureParentDirectory(_0x810e70),await writeFile(_0x810e70,_0x20c649,_0x534670(0xb7))),_0x36b0c2&&await rm(_0x36b0c2[_0x534670(0xb1)][_0x534670(0x88)],{'force':!![]}),_0x4fdaf6[_0x534670(0xb9)][_0x5c2bc9[_0x534670(0x89)]]={..._0x5f28be,'hash':_0x3b5d9e?.[_0x534670(0xb8)]?computeSqlContentHash(_0x3b5d9e[_0x534670(0x9c)]):_0x5f28be[_0x534670(0xb4)],'path':_0x2e6c21},_0xce79f6['push']({'sqlCode':_0x5c2bc9['sqlCode'],'filePath':_0x810e70});}catch(_0x173af4){_0x1ac7e8[_0x534670(0xba)]({'sqlCode':_0x5c2bc9['sqlCode'],'error':_0x173af4 instanceof Error?_0x173af4['message']:String(_0x173af4)});}}return _0x4fdaf6[_0x534670(0xd0)]=new Date()[_0x534670(0xa0)](),await writeSqlLockFile(_0x46d59d[_0x534670(0xc7)],_0x3cbd5f),{'ok':_0x1ac7e8['length']===0x0,'data':{'pulled':_0xce79f6,'skipped':_0x268323,'failed':_0x1ac7e8},'message':_0x534670(0x8b)+_0xce79f6[_0x534670(0xd2)]+_0x534670(0xab)+_0x268323[_0x534670(0xd2)]+_0x534670(0xac)+_0x1ac7e8[_0x534670(0xd2)]+_0x534670(0x91)};}};function isEquivalentPulledSqlFile(_0x55d5d2,_0x4d85b8,_0x54beaa,_0x210797){if(_0x54beaa!==_0x210797)return normalizePulledSqlBody(_0x55d5d2,_0x54beaa)===normalizePulledSqlBody(_0x4d85b8,_0x210797);return normalizePullComparableContent(_0x55d5d2,_0x54beaa)===normalizePullComparableContent(_0x4d85b8,_0x210797);}async function findExistingSqlFiles(_0x1813ce,_0x1ab1f0,_0x339679,_0x575342){const _0xde1075=a252_0x1944a2,_0x3c9fcf=[];await fileExists(_0x1ab1f0)&&_0x3c9fcf[_0xde1075(0xba)]({'filePath':_0x1ab1f0,'mode':_0x339679,'isCanonical':!![]});if(!_0x575342?.['path'])return _0x3c9fcf;const _0xb30c44=join(_0x1813ce[_0xde1075(0xcf)],_0x575342[_0xde1075(0xa6)]);if(_0xb30c44===_0x1ab1f0)return _0x3c9fcf;return await fileExists(_0xb30c44)&&_0x3c9fcf[_0xde1075(0xba)]({'filePath':_0xb30c44,'mode':_0x575342[_0xde1075(0xa3)]??modeFromFilePath(_0xb30c44),'isCanonical':![]}),_0x3c9fcf;}async function compareExistingSqlFiles(_0x566896,_0x4906d4,_0xbfa21e){const _0x4387cc=a252_0x1944a2;return Promise[_0x4387cc(0xbb)](_0x566896[_0x4387cc(0xbe)](async _0x379edf=>{const _0x29f3c0=_0x4387cc,_0x4ede70=await readFile(_0x379edf[_0x29f3c0(0x88)],'utf8');return{'file':_0x379edf,'content':_0x4ede70,'equivalent':isEquivalentPulledSqlFile(_0x4ede70,_0x4906d4,_0x379edf[_0x29f3c0(0xa3)],_0xbfa21e)};}));}function modeFromFilePath(_0xc2ba62){const _0x2f2fc5=a252_0x1944a2;return _0xc2ba62[_0x2f2fc5(0x8c)]()[_0x2f2fc5(0xcd)](_0x2f2fc5(0x85))?_0x2f2fc5(0x87):_0x2f2fc5(0x98);}function normalizePulledSqlBody(_0x121fd9,_0x49f5eb){const _0x4efb72=a252_0x1944a2;return stripLocalSqlMetadata(_0x121fd9,_0x49f5eb)['replace'](/\r\n/g,'\x0a')[_0x4efb72(0xaf)]();}function normalizePullComparableContent(_0x548b19,_0x39cb3a){const _0x7f7b12=a252_0x1944a2,_0x50f089=_0x548b19[_0x7f7b12(0xc0)](/\r\n/g,'\x0a')[_0x7f7b12(0x93)]('\x0a'),_0x806455=_0x50f089[_0x7f7b12(0x86)](_0xe2b7cf=>!isSyncedAtMetadataLine(_0xe2b7cf,_0x39cb3a));return _0x806455[_0x7f7b12(0xc1)]('\x0a');}function isSyncedAtMetadataLine(_0x104d68,_0x17644e){const _0x4facbf=a252_0x1944a2;if(_0x17644e===_0x4facbf(0x87))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x4facbf(0xd5)](_0x104d68);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x4facbf(0xd5)](_0x104d68);}
|
package/lib/commands/sql/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a247_0x3e21a1=a247_0x3fd7;(function(_0x347df9,_0x4165f9){const _0x206468=a247_0x3fd7,_0x4ac99d=_0x347df9();while(!![]){try{const _0x331369=parseInt(_0x206468(0x20c))/0x1+parseInt(_0x206468(0x1eb))/0x2*(parseInt(_0x206468(0x1e2))/0x3)+parseInt(_0x206468(0x1d8))/0x4*(-parseInt(_0x206468(0x1e8))/0x5)+parseInt(_0x206468(0x1f4))/0x6*(parseInt(_0x206468(0x1fa))/0x7)+parseInt(_0x206468(0x1ea))/0x8*(parseInt(_0x206468(0x1d0))/0x9)+parseInt(_0x206468(0x203))/0xa*(parseInt(_0x206468(0x1ca))/0xb)+-parseInt(_0x206468(0x20d))/0xc*(parseInt(_0x206468(0x1e7))/0xd);if(_0x331369===_0x4165f9)break;else _0x4ac99d['push'](_0x4ac99d['shift']());}catch(_0xaf4425){_0x4ac99d['push'](_0x4ac99d['shift']());}}}(a247_0x4436,0x63311));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a247_0x4436(){const _0x174aa9=['write','appCode','1533904boZoMZ','remoteId','sqlRoot','filter','dbName','\x20skipped,\x20','push','version','get','projectRoot','15WzgmUq','sql','relativePath','trim','force','316381YwDixR','5aIedgn','\x22\x20for\x20sqlCode\x20','5864pBigzp','62998RiLvGm','sqlName','startsWith','bool','sqlCode','str','dbId','\x20pushed,\x20','No\x20local\x20SQL\x20files\x20found.','339468jIfCAB','sqlRootDir','Local\x20directory\x20\x22','validation','\x20SQL\x20file(s)','lastSync','63qqULEv','utf8','\x20failed','replace','boolean','hash','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','Push\x20complete:\x20','mode','150oTVDDa',':\x20SQL\x20content\x20is\x20empty.','Would\x20push\x20','sqls','unchanged','toISOString','sqlcode','length','Push\x20local\x20SQL\x20files\x20to\x20remote','330811TILBzl','372ldQlmK','catch','1529pSiUcb','map','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','/smartapi/custom/updateUserCustomSql','lockFilePath','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','6687eAdmJu',':\x20local\x20SQL\x20is\x20not\x20tracked;\x20run\x20sql\x20create\x20or\x20sql\x20pull\x20first.','Local\x20SQL\x20not\x20found:\x20','path','message','filePath'];a247_0x4436=function(){return _0x174aa9;};return a247_0x4436();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a247_0x3fd7(_0x1a564f,_0x2beaa1){_0x1a564f=_0x1a564f-0x1ca;const _0x4436a8=a247_0x4436();let _0x3fd7d4=_0x4436a8[_0x1a564f];return _0x3fd7d4;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function readSqlUploadContent(_0x2dfa66){const _0x2fe421=a247_0x3fd7,_0x193472=stripLocalSqlMetadata(await readFile(_0x2dfa66[_0x2fe421(0x1d5)],_0x2fe421(0x1fb)),_0x2dfa66[_0x2fe421(0x202)]);if(!_0x193472[_0x2fe421(0x1e5)]())throw CliErrors[_0x2fe421(0x1f7)](_0x2dfa66[_0x2fe421(0x1ef)]+_0x2fe421(0x204));return _0x193472;}async function getTargetSqlQueries(_0x24eb76,_0x1434da,_0x164ce2){const _0x4fa9b0=a247_0x3fd7,_0x205a8e=await scanLocalSqlQueries(_0x24eb76),_0x3a2a6a=new Map();for(const _0x391222 of _0x205a8e){if(_0x164ce2&&_0x391222[_0x4fa9b0(0x1ef)]!==_0x164ce2)continue;const _0x376e92=_0x3a2a6a[_0x4fa9b0(0x1e0)](_0x391222['sqlCode'])??[];_0x376e92[_0x4fa9b0(0x1de)](_0x391222),_0x3a2a6a['set'](_0x391222[_0x4fa9b0(0x1ef)],_0x376e92);}if(_0x164ce2&&!_0x3a2a6a['has'](_0x164ce2))throw CliErrors[_0x4fa9b0(0x1f7)](_0x4fa9b0(0x1d2)+_0x164ce2);const _0x43d7c2=[];for(const [_0xb4989,_0x14c43f]of _0x3a2a6a['entries']()){if(_0x14c43f[_0x4fa9b0(0x20a)]===0x1){_0x43d7c2[_0x4fa9b0(0x1de)](_0x14c43f[0x0]);continue;}const _0x4fec58=_0x1434da[_0x4fa9b0(0x206)][_0xb4989],_0x42d67e=_0x4fec58?.[_0x4fa9b0(0x1d3)],_0x4d1833=_0x42d67e?_0x14c43f[_0x4fa9b0(0x1db)](_0x5b1507=>_0x5b1507[_0x4fa9b0(0x1e4)]!==_0x42d67e):_0x14c43f;if(_0x4fec58&&_0x4d1833['length']===0x1){_0x43d7c2[_0x4fa9b0(0x1de)](_0x4d1833[0x0]);continue;}throw CliErrors[_0x4fa9b0(0x1f7)](_0x4fa9b0(0x1cf)+_0xb4989+_0x4fa9b0(0x1cc));}return _0x43d7c2;}export const sqlPush={'service':a247_0x3e21a1(0x1e3),'command':a247_0x3e21a1(0x1de),'description':a247_0x3e21a1(0x20b),'risk':a247_0x3e21a1(0x1d6),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a247_0x3e21a1(0x1e6),'type':a247_0x3e21a1(0x1fe),'description':a247_0x3e21a1(0x200)}],async 'dryRun'(_0x1b1cf1){const _0x1c65d1=a247_0x3e21a1,_0x360301=loadSqlProjectConfig(_0x1b1cf1[_0x1c65d1(0x1d7)]),_0x4218c7=await readSqlLockFile(_0x360301['lockFilePath']),{appLock:_0x217329}=ensureSqlLockScope(_0x4218c7??createEmptySqlLock(),_0x1b1cf1[_0x1c65d1(0x1d7)],_0x360301[_0x1c65d1(0x1da)],_0x1c65d1(0x1de)),_0x57404c=await getTargetSqlQueries(_0x360301,_0x217329,_0x1b1cf1[_0x1c65d1(0x1f0)](_0x1c65d1(0x209))||undefined),_0x2d308c=[];for(const _0x5f4f3f of _0x57404c){const _0x50ad16=await computeSqlFileHash(_0x5f4f3f[_0x1c65d1(0x1d5)]),_0x5a9782=_0x217329[_0x1c65d1(0x206)][_0x5f4f3f[_0x1c65d1(0x1ef)]],_0x58ac30=!!_0x5a9782&&(_0x5a9782[_0x1c65d1(0x1d3)]!==_0x5f4f3f[_0x1c65d1(0x1e4)]||!!_0x5f4f3f['sqlName']&&_0x5a9782[_0x1c65d1(0x1ec)]!==_0x5f4f3f[_0x1c65d1(0x1ec)]||_0x5a9782[_0x1c65d1(0x202)]!==_0x5f4f3f[_0x1c65d1(0x202)]);if(!_0x1b1cf1[_0x1c65d1(0x1ee)](_0x1c65d1(0x1e6))&&_0x5a9782&&_0x5a9782['hash']===_0x50ad16&&!_0x58ac30)continue;if(!_0x5a9782)throw CliErrors[_0x1c65d1(0x1f7)](_0x5f4f3f[_0x1c65d1(0x1ef)]+_0x1c65d1(0x1d1));if(_0x5a9782['version']==null)throw CliErrors[_0x1c65d1(0x1f7)](_0x5f4f3f[_0x1c65d1(0x1ef)]+':\x20missing\x20remote\x20version;\x20run\x20sql\x20pull\x20first.');await resolveTargetDbBinding(_0x1b1cf1[_0x1c65d1(0x1d7)],_0x5f4f3f,_0x5a9782),await readSqlUploadContent(_0x5f4f3f),_0x2d308c[_0x1c65d1(0x1de)](_0x5f4f3f[_0x1c65d1(0x1ef)]);}return{'method':'POST','url':_0x1c65d1(0x1cd),'body':{'sqlCodes':_0x2d308c,'appCode':_0x1b1cf1[_0x1c65d1(0x1d7)]},'description':_0x1c65d1(0x205)+_0x2d308c['length']+_0x1c65d1(0x1f8)};},async 'execute'(_0x385b1d){const _0x197f8a=a247_0x3e21a1,_0x498c1e=loadSqlProjectConfig(_0x385b1d[_0x197f8a(0x1d7)]),_0x20dae3=await readSqlLockFile(_0x498c1e[_0x197f8a(0x1ce)]),{lockData:_0x567cb9,appLock:_0x2f32c3}=ensureSqlLockScope(_0x20dae3??createEmptySqlLock(),_0x385b1d['appCode'],_0x498c1e[_0x197f8a(0x1da)],_0x197f8a(0x1de)),_0x4b6c88=await getTargetSqlQueries(_0x498c1e,_0x2f32c3,_0x385b1d['str'](_0x197f8a(0x209))||undefined);if(_0x4b6c88[_0x197f8a(0x20a)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x197f8a(0x1f3)};const _0x28278c=[],_0xb88f33=[],_0x51faa6=[];let _0x320614=![];for(const _0x476234 of _0x4b6c88){const _0x45fc03=_0x2f32c3[_0x197f8a(0x206)][_0x476234['sqlCode']];if(!_0x45fc03){_0x51faa6[_0x197f8a(0x1de)]({'sqlCode':_0x476234[_0x197f8a(0x1ef)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x22f7e9=await computeSqlFileHash(_0x476234[_0x197f8a(0x1d5)]),_0x5a5619=_0x45fc03[_0x197f8a(0x1d3)]!==_0x476234[_0x197f8a(0x1e4)]||!!_0x476234[_0x197f8a(0x1ec)]&&_0x45fc03[_0x197f8a(0x1ec)]!==_0x476234['sqlName']||_0x45fc03[_0x197f8a(0x202)]!==_0x476234[_0x197f8a(0x202)];if(!_0x385b1d[_0x197f8a(0x1ee)](_0x197f8a(0x1e6))&&_0x45fc03[_0x197f8a(0x1ff)]===_0x22f7e9&&!_0x5a5619){_0xb88f33['push']({'sqlCode':_0x476234[_0x197f8a(0x1ef)],'reason':_0x197f8a(0x207)});continue;}if(_0x45fc03[_0x197f8a(0x1df)]==null){_0x51faa6['push']({'sqlCode':_0x476234[_0x197f8a(0x1ef)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x147618=_0x476234[_0x197f8a(0x1ec)]||_0x45fc03['sqlName'],_0x2b08af=await resolveTargetDbBinding(_0x385b1d['appCode'],_0x476234,_0x45fc03),_0x1de568=await readSqlUploadContent(_0x476234),_0x19e551=await updateSqlQuery({'id':_0x45fc03[_0x197f8a(0x1d9)],'appCode':_0x385b1d[_0x197f8a(0x1d7)],'sqlCode':_0x476234['sqlCode'],'sqlName':_0x147618,'dbId':_0x2b08af[_0x197f8a(0x1f1)],'version':_0x45fc03['version'],'sqlContent':_0x1de568,'sqlConfig':_0x45fc03['sqlConfig']??undefined}),_0xf95e35=_0x19e551['dbId']?await getDbName(_0x385b1d[_0x197f8a(0x1d7)],Number(_0x19e551['dbId']))['catch'](()=>_0x2b08af[_0x197f8a(0x1dc)]):_0x2b08af[_0x197f8a(0x1dc)];_0x2f32c3['sqls'][_0x476234[_0x197f8a(0x1ef)]]={...buildSqlLockEntry(_0x19e551,_0x1de568,_0x22f7e9,{'dbName':_0xf95e35}),'path':_0x476234[_0x197f8a(0x1e4)],'mode':_0x476234['mode']},_0x320614=!![],await archivePreviousSqlFileIfNeeded(_0x498c1e,_0x45fc03[_0x197f8a(0x1d3)],_0x476234['relativePath']),_0x28278c[_0x197f8a(0x1de)]({'sqlCode':_0x476234[_0x197f8a(0x1ef)],'remoteId':_0x45fc03[_0x197f8a(0x1d9)]});}catch(_0x5a64b9){_0x51faa6[_0x197f8a(0x1de)]({'sqlCode':_0x476234[_0x197f8a(0x1ef)],'error':_0x5a64b9 instanceof Error?_0x5a64b9[_0x197f8a(0x1d4)]:String(_0x5a64b9)});}}(_0x320614||_0x51faa6[_0x197f8a(0x20a)]===0x0)&&(_0x2f32c3[_0x197f8a(0x1f9)]=new Date()[_0x197f8a(0x208)](),await writeSqlLockFile(_0x498c1e[_0x197f8a(0x1ce)],_0x567cb9));const _0x56411c=_0x51faa6[_0x197f8a(0x20a)]===0x0;return{'ok':_0x56411c,'data':{'pushed':_0x28278c,'skipped':_0xb88f33,'failed':_0x51faa6},'message':_0x197f8a(0x201)+_0x28278c[_0x197f8a(0x20a)]+_0x197f8a(0x1f2)+_0xb88f33[_0x197f8a(0x20a)]+_0x197f8a(0x1dd)+_0x51faa6['length']+_0x197f8a(0x1fc)};}};async function archivePreviousSqlFileIfNeeded(_0x3f3303,_0x19bf07,_0xb111dd){const _0x9cc997=a247_0x3e21a1;if(!_0x19bf07||_0x19bf07===_0xb111dd)return;const _0x510569=join(_0x3f3303[_0x9cc997(0x1f5)],_0x19bf07);if(!await fileExists(_0x510569))return;const _0x109742=await moveToTrash(_0x3f3303[_0x9cc997(0x1e1)],_0x3f3303['trashDir'],_0x510569);await cleanupEmptyDirectories(dirname(_0x510569),_0x3f3303[_0x9cc997(0x1f5)]),void _0x109742;}async function moveToTrash(_0x29343f,_0x57a1eb,_0x553275){const _0x52c802=a247_0x3e21a1,_0x3bfe1a=new Date()[_0x52c802(0x208)]()[_0x52c802(0x1fd)](/[:.]/g,'-'),_0xf74a59=relative(_0x29343f,_0x553275),_0x491b3b=join(_0x57a1eb,_0x3bfe1a,_0xf74a59);return await mkdir(dirname(_0x491b3b),{'recursive':!![]}),await rename(_0x553275,_0x491b3b),_0x491b3b;}async function cleanupEmptyDirectories(_0x3af366,_0x5e4dd0){const _0x273fcb=a247_0x3e21a1;let _0x304da8=resolve(_0x3af366);const _0x24d2bf=resolve(_0x5e4dd0);while(_0x304da8[_0x273fcb(0x1ed)](''+_0x24d2bf+sep)||_0x304da8===_0x24d2bf){if(_0x304da8===_0x24d2bf)return;try{const _0x3e0e3f=await readdir(_0x304da8);if(_0x3e0e3f[_0x273fcb(0x20a)]>0x0)return;await rmdir(_0x304da8);}catch{return;}_0x304da8=dirname(_0x304da8);}}async function resolveTargetDbBinding(_0xc88c05,_0x405e74,_0x11c3d1){const _0x3a84ac=a247_0x3e21a1,_0x51453a=_0x405e74['dbDirectory'];if(!_0x51453a)return{'dbId':_0x11c3d1[_0x3a84ac(0x1f1)],'dbName':_0x11c3d1['dbName']};const _0x4ff406=buildDbDirectoryName(_0x11c3d1['dbName'],_0x11c3d1[_0x3a84ac(0x1f1)]);if(_0x51453a===_0x4ff406)return{'dbId':_0x11c3d1[_0x3a84ac(0x1f1)],'dbName':_0x11c3d1[_0x3a84ac(0x1dc)]};const _0x3949ba=parseExplicitDbDirectory(_0x51453a);if(_0x3949ba!=null)return{'dbId':_0x3949ba,'dbName':await getDbName(_0xc88c05,_0x3949ba)[_0x3a84ac(0x20e)](()=>undefined)};const _0x2ec529=await listDatabases(_0xc88c05),_0x5e750c=_0x2ec529['filter'](_0x5d4450=>buildDbDirectoryName(_0x5d4450[_0x3a84ac(0x1dc)],_0x5d4450[_0x3a84ac(0x1f1)])===_0x51453a);if(_0x5e750c[_0x3a84ac(0x20a)]===0x1)return{'dbId':_0x5e750c[0x0][_0x3a84ac(0x1f1)],'dbName':_0x5e750c[0x0][_0x3a84ac(0x1dc)]};if(_0x5e750c[_0x3a84ac(0x20a)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x51453a+_0x3a84ac(0x1e9)+_0x405e74[_0x3a84ac(0x1ef)]+'.');const _0x11c076=_0x5e750c[_0x3a84ac(0x1cb)](_0x4f3d59=>_0x4f3d59[_0x3a84ac(0x1dc)]+'\x20('+_0x4f3d59[_0x3a84ac(0x1f1)]+')')['join'](',\x20');throw CliErrors['validation'](_0x3a84ac(0x1f6)+_0x51453a+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x405e74[_0x3a84ac(0x1ef)]+':\x20'+_0x11c076);}function parseExplicitDbDirectory(_0x1c195e){const _0x553a61=/^db-(\d+)$/['exec'](_0x1c195e);if(!_0x553a61)return null;const _0x22a764=Number(_0x553a61[0x1]);return Number['isFinite'](_0x22a764)&&_0x22a764>0x0?_0x22a764:null;}
|
|
1
|
+
function a253_0x44a9(_0x25eb2e,_0xe4818f){_0x25eb2e=_0x25eb2e-0x1b7;const _0x443e69=a253_0x443e();let _0x44a95c=_0x443e69[_0x25eb2e];return _0x44a95c;}const a253_0x5f4f7d=a253_0x44a9;(function(_0x4d5c43,_0x4ea2c8){const _0xe42b7e=a253_0x44a9,_0x18508e=_0x4d5c43();while(!![]){try{const _0x568aa7=-parseInt(_0xe42b7e(0x1bb))/0x1+-parseInt(_0xe42b7e(0x1c9))/0x2+parseInt(_0xe42b7e(0x1d9))/0x3*(-parseInt(_0xe42b7e(0x1de))/0x4)+-parseInt(_0xe42b7e(0x1d0))/0x5+-parseInt(_0xe42b7e(0x1dc))/0x6+parseInt(_0xe42b7e(0x1ba))/0x7*(-parseInt(_0xe42b7e(0x1d5))/0x8)+parseInt(_0xe42b7e(0x1e7))/0x9;if(_0x568aa7===_0x4ea2c8)break;else _0x18508e['push'](_0x18508e['shift']());}catch(_0x2d465f){_0x18508e['push'](_0x18508e['shift']());}}}(a253_0x443e,0xa64e9));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a253_0x443e(){const _0x581d4e=['appCode','3xKEXWA','boolean','str','4737438gcAlgk','exec','5027048zEvalF','has','No\x20database\x20matches\x20local\x20directory\x20\x22','Local\x20SQL\x20not\x20found:\x20','sqlName','dbName','relativePath','sqls','replace','43907715eVmsMe','\x20pushed,\x20','length','push','hash','message','version','lockFilePath','entries','filePath','sql','write','Would\x20push\x20','catch','Push\x20complete:\x20','force','sqlRoot','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','sqlCode','7TfokdL','688236nbofgb','toISOString','path','dbDirectory','filter','isFinite',':\x20missing\x20remote\x20version;\x20run\x20sql\x20pull\x20first.','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','\x22\x20for\x20sqlCode\x20','remoteId','get','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','mode','validation','1959368EtZMne','No\x20local\x20SQL\x20files\x20found.','set','dbId','Local\x20directory\x20\x22','sqlcode','sqlRootDir','111535QzNLIC','bool','sqlConfig','trashDir','\x20skipped,\x20','3687040dbBAGk','/smartapi/custom/updateUserCustomSql','trim'];a253_0x443e=function(){return _0x581d4e;};return a253_0x443e();}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function readSqlUploadContent(_0x519844){const _0x6eb7df=a253_0x44a9,_0x960026=stripLocalSqlMetadata(await readFile(_0x519844[_0x6eb7df(0x1f0)],'utf8'),_0x519844[_0x6eb7df(0x1c7)]);if(!_0x960026[_0x6eb7df(0x1d7)]())throw CliErrors['validation'](_0x519844[_0x6eb7df(0x1b9)]+':\x20SQL\x20content\x20is\x20empty.');return _0x960026;}async function getTargetSqlQueries(_0x53ca32,_0x128931,_0x14f0a7){const _0x18974d=a253_0x44a9,_0x3504cf=await scanLocalSqlQueries(_0x53ca32),_0x46c9d9=new Map();for(const _0x4116f5 of _0x3504cf){if(_0x14f0a7&&_0x4116f5[_0x18974d(0x1b9)]!==_0x14f0a7)continue;const _0x8fb5fa=_0x46c9d9[_0x18974d(0x1c5)](_0x4116f5['sqlCode'])??[];_0x8fb5fa['push'](_0x4116f5),_0x46c9d9[_0x18974d(0x1cb)](_0x4116f5[_0x18974d(0x1b9)],_0x8fb5fa);}if(_0x14f0a7&&!_0x46c9d9[_0x18974d(0x1df)](_0x14f0a7))throw CliErrors[_0x18974d(0x1c8)](_0x18974d(0x1e1)+_0x14f0a7);const _0x15f901=[];for(const [_0x3691f5,_0x20172d]of _0x46c9d9[_0x18974d(0x1ef)]()){if(_0x20172d[_0x18974d(0x1e9)]===0x1){_0x15f901[_0x18974d(0x1ea)](_0x20172d[0x0]);continue;}const _0x5910c9=_0x128931[_0x18974d(0x1e5)][_0x3691f5],_0x5efcb4=_0x5910c9?.[_0x18974d(0x1bd)],_0x2edde7=_0x5efcb4?_0x20172d[_0x18974d(0x1bf)](_0x46cb3c=>_0x46cb3c[_0x18974d(0x1e4)]!==_0x5efcb4):_0x20172d;if(_0x5910c9&&_0x2edde7['length']===0x1){_0x15f901[_0x18974d(0x1ea)](_0x2edde7[0x0]);continue;}throw CliErrors[_0x18974d(0x1c8)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x3691f5+_0x18974d(0x1b8));}return _0x15f901;}export const sqlPush={'service':a253_0x5f4f7d(0x1f1),'command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a253_0x5f4f7d(0x1f2),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a253_0x5f4f7d(0x1f6),'type':a253_0x5f4f7d(0x1da),'description':a253_0x5f4f7d(0x1c2)}],async 'dryRun'(_0xe88cb2){const _0x393c7=a253_0x5f4f7d,_0x5268d5=loadSqlProjectConfig(_0xe88cb2['appCode']),_0x2dc698=await readSqlLockFile(_0x5268d5[_0x393c7(0x1ee)]),{appLock:_0x812a09}=ensureSqlLockScope(_0x2dc698??createEmptySqlLock(),_0xe88cb2[_0x393c7(0x1d8)],_0x5268d5[_0x393c7(0x1b7)],_0x393c7(0x1ea)),_0x3852d8=await getTargetSqlQueries(_0x5268d5,_0x812a09,_0xe88cb2[_0x393c7(0x1db)](_0x393c7(0x1ce))||undefined),_0x5e008b=[];for(const _0x36a8ba of _0x3852d8){const _0x402093=await computeSqlFileHash(_0x36a8ba['filePath']),_0x314514=_0x812a09[_0x393c7(0x1e5)][_0x36a8ba['sqlCode']],_0x2a2c33=!!_0x314514&&(_0x314514[_0x393c7(0x1bd)]!==_0x36a8ba[_0x393c7(0x1e4)]||!!_0x36a8ba[_0x393c7(0x1e2)]&&_0x314514[_0x393c7(0x1e2)]!==_0x36a8ba[_0x393c7(0x1e2)]||_0x314514['mode']!==_0x36a8ba['mode']);if(!_0xe88cb2[_0x393c7(0x1d1)]('force')&&_0x314514&&_0x314514[_0x393c7(0x1eb)]===_0x402093&&!_0x2a2c33)continue;if(!_0x314514)throw CliErrors[_0x393c7(0x1c8)](_0x36a8ba[_0x393c7(0x1b9)]+':\x20local\x20SQL\x20is\x20not\x20tracked;\x20run\x20sql\x20create\x20or\x20sql\x20pull\x20first.');if(_0x314514['version']==null)throw CliErrors[_0x393c7(0x1c8)](_0x36a8ba['sqlCode']+_0x393c7(0x1c1));await resolveTargetDbBinding(_0xe88cb2['appCode'],_0x36a8ba,_0x314514),await readSqlUploadContent(_0x36a8ba),_0x5e008b['push'](_0x36a8ba[_0x393c7(0x1b9)]);}return{'method':'POST','url':_0x393c7(0x1d6),'body':{'sqlCodes':_0x5e008b,'appCode':_0xe88cb2[_0x393c7(0x1d8)]},'description':_0x393c7(0x1f3)+_0x5e008b[_0x393c7(0x1e9)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x39a075){const _0x12ec19=a253_0x5f4f7d,_0x1b5bbf=loadSqlProjectConfig(_0x39a075[_0x12ec19(0x1d8)]),_0x944ac0=await readSqlLockFile(_0x1b5bbf['lockFilePath']),{lockData:_0xd4f115,appLock:_0x4ffc8c}=ensureSqlLockScope(_0x944ac0??createEmptySqlLock(),_0x39a075['appCode'],_0x1b5bbf[_0x12ec19(0x1b7)],'push'),_0x5e1f4d=await getTargetSqlQueries(_0x1b5bbf,_0x4ffc8c,_0x39a075[_0x12ec19(0x1db)]('sqlcode')||undefined);if(_0x5e1f4d[_0x12ec19(0x1e9)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x12ec19(0x1ca)};const _0x40b592=[],_0x91fc4f=[],_0x58dc2b=[];let _0x4c248f=![];for(const _0x508764 of _0x5e1f4d){const _0x10de1e=_0x4ffc8c[_0x12ec19(0x1e5)][_0x508764[_0x12ec19(0x1b9)]];if(!_0x10de1e){_0x58dc2b[_0x12ec19(0x1ea)]({'sqlCode':_0x508764[_0x12ec19(0x1b9)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x1e4c21=await computeSqlFileHash(_0x508764['filePath']),_0x42c447=_0x10de1e['path']!==_0x508764[_0x12ec19(0x1e4)]||!!_0x508764[_0x12ec19(0x1e2)]&&_0x10de1e[_0x12ec19(0x1e2)]!==_0x508764[_0x12ec19(0x1e2)]||_0x10de1e['mode']!==_0x508764[_0x12ec19(0x1c7)];if(!_0x39a075[_0x12ec19(0x1d1)](_0x12ec19(0x1f6))&&_0x10de1e[_0x12ec19(0x1eb)]===_0x1e4c21&&!_0x42c447){_0x91fc4f['push']({'sqlCode':_0x508764[_0x12ec19(0x1b9)],'reason':'unchanged'});continue;}if(_0x10de1e[_0x12ec19(0x1ed)]==null){_0x58dc2b[_0x12ec19(0x1ea)]({'sqlCode':_0x508764[_0x12ec19(0x1b9)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x3b16ec=_0x508764[_0x12ec19(0x1e2)]||_0x10de1e[_0x12ec19(0x1e2)],_0x43f7e9=await resolveTargetDbBinding(_0x39a075[_0x12ec19(0x1d8)],_0x508764,_0x10de1e),_0x40eddb=await readSqlUploadContent(_0x508764),_0x500d2d=await updateSqlQuery({'id':_0x10de1e[_0x12ec19(0x1c4)],'appCode':_0x39a075['appCode'],'sqlCode':_0x508764[_0x12ec19(0x1b9)],'sqlName':_0x3b16ec,'dbId':_0x43f7e9['dbId'],'version':_0x10de1e['version'],'sqlContent':_0x40eddb,'sqlConfig':_0x10de1e[_0x12ec19(0x1d2)]??undefined}),_0x30c8ea=_0x500d2d[_0x12ec19(0x1cc)]?await getDbName(_0x39a075[_0x12ec19(0x1d8)],Number(_0x500d2d['dbId']))[_0x12ec19(0x1f4)](()=>_0x43f7e9[_0x12ec19(0x1e3)]):_0x43f7e9[_0x12ec19(0x1e3)];_0x4ffc8c['sqls'][_0x508764[_0x12ec19(0x1b9)]]={...buildSqlLockEntry(_0x500d2d,_0x40eddb,_0x1e4c21,{'dbName':_0x30c8ea}),'path':_0x508764['relativePath'],'mode':_0x508764[_0x12ec19(0x1c7)]},_0x4c248f=!![],await archivePreviousSqlFileIfNeeded(_0x1b5bbf,_0x10de1e[_0x12ec19(0x1bd)],_0x508764[_0x12ec19(0x1e4)]),_0x40b592[_0x12ec19(0x1ea)]({'sqlCode':_0x508764[_0x12ec19(0x1b9)],'remoteId':_0x10de1e[_0x12ec19(0x1c4)]});}catch(_0x5e1ae5){_0x58dc2b[_0x12ec19(0x1ea)]({'sqlCode':_0x508764[_0x12ec19(0x1b9)],'error':_0x5e1ae5 instanceof Error?_0x5e1ae5[_0x12ec19(0x1ec)]:String(_0x5e1ae5)});}}(_0x4c248f||_0x58dc2b[_0x12ec19(0x1e9)]===0x0)&&(_0x4ffc8c['lastSync']=new Date()[_0x12ec19(0x1bc)](),await writeSqlLockFile(_0x1b5bbf['lockFilePath'],_0xd4f115));const _0x58a766=_0x58dc2b['length']===0x0;return{'ok':_0x58a766,'data':{'pushed':_0x40b592,'skipped':_0x91fc4f,'failed':_0x58dc2b},'message':_0x12ec19(0x1f5)+_0x40b592[_0x12ec19(0x1e9)]+_0x12ec19(0x1e8)+_0x91fc4f[_0x12ec19(0x1e9)]+_0x12ec19(0x1d4)+_0x58dc2b[_0x12ec19(0x1e9)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x2d883b,_0x5e759a,_0x5dcbc3){const _0x320eaa=a253_0x5f4f7d;if(!_0x5e759a||_0x5e759a===_0x5dcbc3)return;const _0x736194=join(_0x2d883b['sqlRootDir'],_0x5e759a);if(!await fileExists(_0x736194))return;const _0x5b486d=await moveToTrash(_0x2d883b['projectRoot'],_0x2d883b[_0x320eaa(0x1d3)],_0x736194);await cleanupEmptyDirectories(dirname(_0x736194),_0x2d883b[_0x320eaa(0x1cf)]),void _0x5b486d;}async function moveToTrash(_0x494ccd,_0xb789d6,_0x280775){const _0x234a5d=a253_0x5f4f7d,_0x501de6=new Date()[_0x234a5d(0x1bc)]()[_0x234a5d(0x1e6)](/[:.]/g,'-'),_0x56f5f5=relative(_0x494ccd,_0x280775),_0x433770=join(_0xb789d6,_0x501de6,_0x56f5f5);return await mkdir(dirname(_0x433770),{'recursive':!![]}),await rename(_0x280775,_0x433770),_0x433770;}async function cleanupEmptyDirectories(_0x472d0b,_0x19c947){const _0x19913e=a253_0x5f4f7d;let _0x169063=resolve(_0x472d0b);const _0x1ae644=resolve(_0x19c947);while(_0x169063['startsWith'](''+_0x1ae644+sep)||_0x169063===_0x1ae644){if(_0x169063===_0x1ae644)return;try{const _0x4f25b0=await readdir(_0x169063);if(_0x4f25b0[_0x19913e(0x1e9)]>0x0)return;await rmdir(_0x169063);}catch{return;}_0x169063=dirname(_0x169063);}}async function resolveTargetDbBinding(_0x25c8e3,_0x16256a,_0x43f244){const _0x5dd477=a253_0x5f4f7d,_0x46e3c1=_0x16256a[_0x5dd477(0x1be)];if(!_0x46e3c1)return{'dbId':_0x43f244['dbId'],'dbName':_0x43f244['dbName']};const _0x38c2a1=buildDbDirectoryName(_0x43f244[_0x5dd477(0x1e3)],_0x43f244[_0x5dd477(0x1cc)]);if(_0x46e3c1===_0x38c2a1)return{'dbId':_0x43f244[_0x5dd477(0x1cc)],'dbName':_0x43f244[_0x5dd477(0x1e3)]};const _0x1251b5=parseExplicitDbDirectory(_0x46e3c1);if(_0x1251b5!=null)return{'dbId':_0x1251b5,'dbName':await getDbName(_0x25c8e3,_0x1251b5)['catch'](()=>undefined)};const _0x442b61=await listDatabases(_0x25c8e3),_0xab835b=_0x442b61[_0x5dd477(0x1bf)](_0x41a1fc=>buildDbDirectoryName(_0x41a1fc[_0x5dd477(0x1e3)],_0x41a1fc[_0x5dd477(0x1cc)])===_0x46e3c1);if(_0xab835b[_0x5dd477(0x1e9)]===0x1)return{'dbId':_0xab835b[0x0][_0x5dd477(0x1cc)],'dbName':_0xab835b[0x0][_0x5dd477(0x1e3)]};if(_0xab835b[_0x5dd477(0x1e9)]===0x0)throw CliErrors['validation'](_0x5dd477(0x1e0)+_0x46e3c1+_0x5dd477(0x1c3)+_0x16256a[_0x5dd477(0x1b9)]+'.');const _0x138e63=_0xab835b['map'](_0x507eb=>_0x507eb['dbName']+'\x20('+_0x507eb['dbId']+')')['join'](',\x20');throw CliErrors['validation'](_0x5dd477(0x1cd)+_0x46e3c1+_0x5dd477(0x1c6)+_0x16256a[_0x5dd477(0x1b9)]+':\x20'+_0x138e63);}function parseExplicitDbDirectory(_0xaebb66){const _0x1216ed=a253_0x5f4f7d,_0x51843a=/^db-(\d+)$/[_0x1216ed(0x1dd)](_0xaebb66);if(!_0x51843a)return null;const _0x2e9fb3=Number(_0x51843a[0x1]);return Number[_0x1216ed(0x1c0)](_0x2e9fb3)&&_0x2e9fb3>0x0?_0x2e9fb3:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a254_0x1e994f=a254_0x2cd0;(function(_0x5546d6,_0x4fc461){const _0x6c977b=a254_0x2cd0,_0x5378e4=_0x5546d6();while(!![]){try{const _0x5f4b32=-parseInt(_0x6c977b(0x7f))/0x1+-parseInt(_0x6c977b(0x8a))/0x2+-parseInt(_0x6c977b(0x9a))/0x3*(parseInt(_0x6c977b(0x97))/0x4)+parseInt(_0x6c977b(0x7d))/0x5*(-parseInt(_0x6c977b(0x8d))/0x6)+-parseInt(_0x6c977b(0x75))/0x7*(-parseInt(_0x6c977b(0x76))/0x8)+-parseInt(_0x6c977b(0x95))/0x9+parseInt(_0x6c977b(0x77))/0xa;if(_0x5f4b32===_0x4fc461)break;else _0x5378e4['push'](_0x5378e4['shift']());}catch(_0x292a8d){_0x5378e4['push'](_0x5378e4['shift']());}}}(a254_0x2fa9,0xdf5fa));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a254_0x1e994f(0x8b);export function buildSqlLockEntry(_0x126ab9,_0x230aa0,_0x529e13,_0x85f9cf){const _0x25632f=a254_0x1e994f,_0x26a89b=detectSqlMode(_0x230aa0);return{'path':buildSqlRelativePath(_0x126ab9['sqlCode'],_0x126ab9[_0x25632f(0x84)],_0x85f9cf?.[_0x25632f(0x9e)],_0x26a89b,_0x126ab9[_0x25632f(0x94)]),'hash':_0x529e13,'remoteId':_0x126ab9['id'],'version':_0x126ab9[_0x25632f(0x90)],'dbId':Number(_0x126ab9[_0x25632f(0x94)]),'dbName':_0x85f9cf?.['dbName'],'sqlName':_0x126ab9[_0x25632f(0x84)],'sqlConfig':_0x126ab9[_0x25632f(0x9d)]??undefined,'mode':_0x26a89b};}export function cloneSqlLockData(_0x3df0e7){const _0x3a5a0f=a254_0x1e994f;return{'apps':Object[_0x3a5a0f(0x87)](Object[_0x3a5a0f(0x82)](_0x3df0e7[_0x3a5a0f(0x79)])[_0x3a5a0f(0x9c)](([_0x58f3d0,_0x5b400e])=>[_0x58f3d0,{'sqlRoot':_0x5b400e[_0x3a5a0f(0x83)],'lastSync':_0x5b400e[_0x3a5a0f(0x71)],'sqls':{..._0x5b400e[_0x3a5a0f(0x7c)]}}]))};}export function ensureRemoteSqlContent(_0xdb3deb){const _0x5bc7c8=a254_0x1e994f;return _0xdb3deb[_0x5bc7c8(0x81)]??'';}export function buildLocalSqlFileContent(_0x18597b,_0x2b7c07,_0x146602){const _0x595ae5=a254_0x1e994f,_0x358ab1=_0x146602?.[_0x595ae5(0x8c)]??detectSqlMode(_0x2b7c07),_0x200ccf=stripLocalSqlMetadata(_0x2b7c07,_0x358ab1)[_0x595ae5(0x73)](),_0x825ebd=buildMetadataHeaderLines({'sqlCode':_0x18597b[_0x595ae5(0x9f)],'sqlName':_0x18597b[_0x595ae5(0x84)],'dbId':_0x18597b[_0x595ae5(0x94)],'dbName':_0x146602?.['dbName'],'mode':_0x358ab1,'syncedAt':_0x146602?.[_0x595ae5(0x93)],'description':_0x146602?.[_0x595ae5(0x9b)]},_0x358ab1),_0x21312f=_0x358ab1==='mybatisXml'?splitXmlDeclaration(_0x200ccf):{'body':_0x200ccf},_0x48c2e7=[..._0x21312f[_0x595ae5(0x92)]?[_0x21312f['declaration']]:[],..._0x825ebd,'',_0x21312f['body'][_0x595ae5(0x7e)]()],_0x28d8b5=_0x48c2e7['join']('\x0a');return _0x28d8b5['endsWith']('\x0a')?_0x28d8b5:_0x28d8b5+'\x0a';}export function stripLocalSqlMetadata(_0x51b1ee,_0x15271b){const _0x2f94da=a254_0x1e994f;if(_0x15271b===_0x2f94da(0x86)){const {declaration:_0x3af8aa,body:_0x516c0f}=splitXmlDeclaration(_0x51b1ee['replace'](/\r\n/g,'\x0a')),_0x360334=stripLeadingMetadataLines(_0x516c0f,/^\s*<!--\s*@lovrabet\./);return _0x3af8aa?''+_0x3af8aa+(_0x360334?'\x0a'+_0x360334:''):_0x360334;}return stripLeadingMetadataLines(_0x51b1ee['replace'](/\r\n/g,'\x0a'),/^\s*--\s*@lovrabet\./);}export function resolveSqlMode(_0x5e1bd1,_0x4b2d75){const _0x255de8=a254_0x1e994f;if(_0x4b2d75?.['mode'])return _0x4b2d75[_0x255de8(0x8c)];return detectSqlMode(_0x5e1bd1);}export function resolveSqlFileName(_0x1c84e8,_0x297007,_0x287d02){const _0x4891fb=a254_0x1e994f;if(_0x287d02?.[_0x4891fb(0x85)])return _0x287d02['path'];if(_0x287d02?.[_0x4891fb(0x84)]||_0x287d02?.[_0x4891fb(0x9e)])return buildSqlRelativePath(_0x1c84e8,_0x287d02?.[_0x4891fb(0x84)],_0x287d02?.['dbName'],resolveSqlMode(_0x297007,_0x287d02),_0x287d02?.['dbId']);return buildDefaultSqlFileName(_0x1c84e8,resolveSqlMode(_0x297007,_0x287d02));}export function resolveSqlLocalDir(_0x50f31a,_0xbdb1dc){return join(_0x50f31a,SQL_LOCAL_REL_DIR,_0xbdb1dc);}function a254_0x2fa9(){const _0x16664a=['sqlCode','lastSync','close','trim','--\x20@lovrabet.','3416WLPhEv','7048kZFajl','58557340XYOhXd','<!--\x20@lovrabet.','apps','test','toLowerCase','sqls','809225fIXXZL','trimStart','1453974CeqWUe','stdin','sqlContent','entries','sqlRoot','sqlName','path','mybatisXml','fromEntries','slice','exec','1103898jtGIFG','.rabetbase/sql','mode','36PynJev','length','split','version','\x20[y/N]\x20','declaration','syncedAt','dbId','12366783ICIIxK','includes','4TptgUW','yes','filter','3058932JQZnFj','description','map','sqlConfig','dbName'];a254_0x2fa9=function(){return _0x16664a;};return a254_0x2fa9();}export async function confirmForceOverwrite(_0x4507ba){const _0x4a2cd9=a254_0x1e994f,_0x1bfe69=createInterface({'input':process[_0x4a2cd9(0x80)],'output':process['stderr']}),_0x5c72bc=await new Promise(_0x1ad3c4=>{const _0xaa22c8=_0x4a2cd9;_0x1bfe69['question'](_0x4507ba+_0xaa22c8(0x91),_0x1ad3c4);});return _0x1bfe69[_0x4a2cd9(0x72)](),['y',_0x4a2cd9(0x98)][_0x4a2cd9(0x96)](_0x5c72bc[_0x4a2cd9(0x73)]()[_0x4a2cd9(0x7b)]());}function a254_0x2cd0(_0x1b386f,_0x419947){_0x1b386f=_0x1b386f-0x71;const _0x2fa9fe=a254_0x2fa9();let _0x2cd0b4=_0x2fa9fe[_0x1b386f];return _0x2cd0b4;}export function findSqlLockScope(_0x28ed65,_0x2f6b4f){const _0x1ffc33=a254_0x1e994f;return _0x28ed65[_0x1ffc33(0x79)][_0x2f6b4f];}function buildMetadataHeaderLines(_0x40c300,_0x40decb){const _0x1ae6d3=a254_0x1e994f,_0x2e31e5=[[_0x1ae6d3(0x9f),_0x40c300['sqlCode']],['sqlName',_0x40c300['sqlName']],[_0x1ae6d3(0x94),_0x40c300[_0x1ae6d3(0x94)]],[_0x1ae6d3(0x9e),_0x40c300[_0x1ae6d3(0x9e)]],[_0x1ae6d3(0x8c),_0x40c300[_0x1ae6d3(0x8c)]],[_0x1ae6d3(0x93),_0x40c300[_0x1ae6d3(0x93)]],[_0x1ae6d3(0x9b),_0x40c300[_0x1ae6d3(0x9b)]]];if(_0x40decb===_0x1ae6d3(0x86))return _0x2e31e5[_0x1ae6d3(0x99)](([,_0x4a022a])=>_0x4a022a!==undefined&&_0x4a022a!==null&&String(_0x4a022a)[_0x1ae6d3(0x73)]()!=='')['map'](([_0x483638,_0x546aab])=>_0x1ae6d3(0x78)+_0x483638+':\x20'+String(_0x546aab)+'\x20-->');return _0x2e31e5[_0x1ae6d3(0x99)](([,_0x2b379e])=>_0x2b379e!==undefined&&_0x2b379e!==null&&String(_0x2b379e)['trim']()!=='')['map'](([_0x2d16a1,_0x13b378])=>_0x1ae6d3(0x74)+_0x2d16a1+':\x20'+String(_0x13b378));}function splitXmlDeclaration(_0xbb36e6){const _0x2bb707=a254_0x1e994f,_0x3abc0b=_0xbb36e6[_0x2bb707(0x7e)](),_0x248777=/^<\?xml(?=\s|\?>)[\s\S]*?\?>/i[_0x2bb707(0x89)](_0x3abc0b);if(!_0x248777)return{'body':_0xbb36e6};return{'declaration':_0x248777[0x0],'body':_0x3abc0b['slice'](_0x248777[0x0][_0x2bb707(0x8e)])};}function stripLeadingMetadataLines(_0x3507e6,_0x14ff7f){const _0x5b7085=a254_0x1e994f,_0x7d02a6=_0x3507e6[_0x5b7085(0x8f)]('\x0a');let _0x2f748f=0x0;while(_0x2f748f<_0x7d02a6[_0x5b7085(0x8e)]){const _0x34e106=_0x7d02a6[_0x2f748f]??'';if(_0x14ff7f[_0x5b7085(0x7a)](_0x34e106)||_0x34e106[_0x5b7085(0x73)]()===''){_0x2f748f++;continue;}break;}return _0x7d02a6[_0x5b7085(0x88)](_0x2f748f)['join']('\x0a')[_0x5b7085(0x7e)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a255_0x5d2cef=a255_0x4c3c;(function(_0x2d0f47,_0x5bb14a){const _0x1ab86e=a255_0x4c3c,_0x200f9c=_0x2d0f47();while(!![]){try{const _0x4fe26c=parseInt(_0x1ab86e(0x95))/0x1+parseInt(_0x1ab86e(0xa5))/0x2+-parseInt(_0x1ab86e(0x8e))/0x3*(-parseInt(_0x1ab86e(0xa9))/0x4)+-parseInt(_0x1ab86e(0x94))/0x5+-parseInt(_0x1ab86e(0x9b))/0x6*(-parseInt(_0x1ab86e(0x8a))/0x7)+-parseInt(_0x1ab86e(0x9a))/0x8+-parseInt(_0x1ab86e(0xa8))/0x9;if(_0x4fe26c===_0x5bb14a)break;else _0x200f9c['push'](_0x200f9c['shift']());}catch(_0xb0106f){_0x200f9c['push'](_0x200f9c['shift']());}}}(a255_0x156b,0x50739));function a255_0x4c3c(_0x18bb9e,_0x469f0e){_0x18bb9e=_0x18bb9e-0x88;const _0x156b5d=a255_0x156b();let _0x4c3c8a=_0x156b5d[_0x18bb9e];return _0x4c3c8a;}function a255_0x156b(){const _0x143ab8=['sql','sqlName','appCode','map','bool','1210855wavHsm','609926sOwmAO','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sqls','lockKey','\x20missing,\x20','1291328pRwmJo','3941094hvfGmU','hash','All\x20SQL\x20queries\x20are\x20in\x20sync.','relativePath','push','remote','tableData','boolean','\x20modified,\x20','paging','1205182WxjiQA','status','path','13716972lotqNH','8HXiCvT','read','totalCount','7thLPBX','length','\x20unchanged','sqlRoot','581787jzQxaL'];a255_0x156b=function(){return _0x143ab8;};return a255_0x156b();}import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x58436c){const _0x5441a7=a255_0x4c3c,_0xe4890a=[];let _0x1b4005=0x1;while(!![]){const _0x93918d=await listSqlQueries(_0x58436c,{'currentPage':_0x1b4005,'pageSize':PAGE_SIZE}),_0x5493d2=_0x93918d[_0x5441a7(0xa1)]??[];_0xe4890a[_0x5441a7(0x9f)](..._0x5493d2[_0x5441a7(0x92)](_0x1b4d8a=>_0x1b4d8a['sqlCode']));if(_0x5493d2[_0x5441a7(0x8b)]===0x0)break;const _0x4a79b5=_0x93918d[_0x5441a7(0xa4)]?.[_0x5441a7(0x89)];if(_0x4a79b5!=null?_0xe4890a[_0x5441a7(0x8b)]>=_0x4a79b5:_0x5493d2[_0x5441a7(0x8b)]<PAGE_SIZE)break;_0x1b4005++;}return _0xe4890a;}export const sqlStatus={'service':a255_0x5d2cef(0x8f),'command':a255_0x5d2cef(0xa6),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':a255_0x5d2cef(0x88),'flags':[{'name':a255_0x5d2cef(0xa0),'type':a255_0x5d2cef(0xa2),'description':a255_0x5d2cef(0x96)}],async 'execute'(_0x27fb9e){const _0x41b01d=a255_0x5d2cef,_0xf3d06f=loadSqlProjectConfig(_0x27fb9e[_0x41b01d(0x91)]),_0xfc9298=await readSqlLockFile(_0xf3d06f['lockFilePath']),{appLock:_0x9e8036}=ensureSqlLockScope(_0xfc9298??createEmptySqlLock(),_0xf3d06f['appCode'],_0xf3d06f[_0x41b01d(0x8d)],_0x41b01d(0xa6)),_0x2e214b=await scanLocalSqlQueries(_0xf3d06f),_0x3890f3=[],_0x144aa7=[],_0x3c1a1f=[],_0x42494e=[],_0x166e2a=new Set(_0x2e214b[_0x41b01d(0x92)](_0x1ac063=>_0x1ac063[_0x41b01d(0x98)]));for(const _0x264a65 of _0x2e214b){const _0x5b2a48=await computeSqlFileHash(_0x264a65['filePath']),_0x4d825a=_0x9e8036['sqls'][_0x264a65[_0x41b01d(0x98)]],_0x416c11=!!_0x4d825a&&_0x4d825a[_0x41b01d(0xa7)]!==_0x264a65[_0x41b01d(0x9e)],_0x3c7935=!!_0x4d825a&&!!_0x264a65['sqlName']&&_0x4d825a[_0x41b01d(0x90)]!==_0x264a65[_0x41b01d(0x90)];if(!_0x4d825a)_0x3890f3[_0x41b01d(0x9f)](_0x264a65[_0x41b01d(0x98)]);else _0x4d825a[_0x41b01d(0x9c)]!==_0x5b2a48||_0x416c11||_0x3c7935?_0x144aa7[_0x41b01d(0x9f)](_0x264a65[_0x41b01d(0x98)]):_0x3c1a1f[_0x41b01d(0x9f)](_0x264a65['lockKey']);}for(const _0x12b8f8 of Object['keys'](_0x9e8036[_0x41b01d(0x97)])){!_0x166e2a['has'](_0x12b8f8)&&_0x42494e[_0x41b01d(0x9f)](_0x12b8f8);}const _0x278e84=[];if(_0x27fb9e[_0x41b01d(0x93)]('remote')){const _0x453505=await fetchAllSqlCodes(_0x27fb9e[_0x41b01d(0x91)]);for(const _0x5ddcf9 of _0x453505){!_0x166e2a['has'](_0x5ddcf9)&&!_0x9e8036[_0x41b01d(0x97)][_0x5ddcf9]&&_0x278e84[_0x41b01d(0x9f)](_0x5ddcf9);}}const _0x1d4a6e=_0x3890f3[_0x41b01d(0x8b)]===0x0&&_0x144aa7['length']===0x0&&_0x42494e[_0x41b01d(0x8b)]===0x0&&_0x278e84[_0x41b01d(0x8b)]===0x0;return{'ok':!![],'data':{'added':_0x3890f3,'modified':_0x144aa7,'missing':_0x42494e,'unchanged':_0x3c1a1f,'remoteOnly':_0x278e84},'message':_0x1d4a6e?_0x41b01d(0x9d):_0x3890f3[_0x41b01d(0x8b)]+'\x20added,\x20'+_0x144aa7[_0x41b01d(0x8b)]+_0x41b01d(0xa3)+_0x42494e[_0x41b01d(0x8b)]+_0x41b01d(0x99)+_0x3c1a1f[_0x41b01d(0x8b)]+_0x41b01d(0x8c)+(_0x278e84[_0x41b01d(0x8b)]>0x0?',\x20'+_0x278e84['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a256_0x212a78=a256_0x4399;(function(_0x1969c8,_0x508f45){const _0x4c5d42=a256_0x4399,_0x2793a5=_0x1969c8();while(!![]){try{const _0x256418=-parseInt(_0x4c5d42(0xc2))/0x1+parseInt(_0x4c5d42(0xf5))/0x2*(parseInt(_0x4c5d42(0xd7))/0x3)+parseInt(_0x4c5d42(0xed))/0x4+-parseInt(_0x4c5d42(0xe3))/0x5*(-parseInt(_0x4c5d42(0xfe))/0x6)+parseInt(_0x4c5d42(0xe9))/0x7+-parseInt(_0x4c5d42(0xf1))/0x8*(parseInt(_0x4c5d42(0xfb))/0x9)+-parseInt(_0x4c5d42(0xd4))/0xa*(parseInt(_0x4c5d42(0xc6))/0xb);if(_0x256418===_0x508f45)break;else _0x2793a5['push'](_0x2793a5['shift']());}catch(_0xadc146){_0x2793a5['push'](_0x2793a5['shift']());}}}(a256_0x3b61,0xe7f14));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a256_0x3b61(){const _0x44d393=['validation','isDangerous','dataset','size','length','12572252RPhyLN','trim','isArray','map','1165888rGjUwv','bool','joinAudit','pkField','4484064Gflaoa','dbtableConfig','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','214rsgxyc','appCode','flagMissing','boolean','valid','isLockingRead','9OOrQTr','split','\x22\x20not\x20found\x20in\x20any\x20dataset','5078442yUjLJF','schema:','validate','string','index_columns','file','from','1750620NIpAXm','isSelectOnly','name','indexes','5005FiXsst','str','parameters','fields','cwd','utf-8','reason','toLowerCase','sql','type','push','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','columnNames','flatMap','32930jaXlkQ','columns','tableName','27453fZhCwO','Provide\x20--file\x20or\x20--sql','filter','unshift','schemas','SQL\x20schema\x20validation','sqlType','check-indexes','tables','index_name','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','find','10KWtrVx'];a256_0x3b61=function(){return _0x44d393;};return a256_0x3b61();}function a256_0x4399(_0x255da4,_0x576594){_0x255da4=_0x255da4-0xbd;const _0x3b6103=a256_0x3b61();let _0x439964=_0x3b6103[_0x255da4];return _0x439964;}export const sqlValidate={'service':'sql','command':a256_0x212a78(0xbd),'description':a256_0x212a78(0xf3),'risk':'read','flags':[{'name':'file','type':a256_0x212a78(0xbe),'description':a256_0x212a78(0xe1)},{'name':a256_0x212a78(0xce),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a256_0x212a78(0xdb),'type':'string','description':a256_0x212a78(0xd1)},{'name':'check-indexes','type':a256_0x212a78(0xf8),'description':a256_0x212a78(0xf4)}],async 'execute'(_0x4413a8){const _0x2b1821=a256_0x212a78,_0x46b772=_0x4413a8['str'](_0x2b1821(0xc0)),_0x2cf96f=_0x4413a8[_0x2b1821(0xc7)](_0x2b1821(0xce)),_0x6a8c73=_0x4413a8[_0x2b1821(0xc7)](_0x2b1821(0xdb)),_0x28ed2e=_0x4413a8[_0x2b1821(0xee)](_0x2b1821(0xde));if(!_0x46b772&&!_0x2cf96f)throw CliErrors[_0x2b1821(0xf7)](_0x2b1821(0xc0),_0x2b1821(0xd8));if(_0x28ed2e&&!_0x6a8c73)throw CliErrors[_0x2b1821(0xe4)]('--check-indexes\x20requires\x20--schemas.');let _0x375867;if(_0x46b772){const _0x56c1c0=resolve(process[_0x2b1821(0xca)](),_0x46b772);if(!existsSync(_0x56c1c0))throw CliErrors[_0x2b1821(0xe4)]('File\x20not\x20found:\x20'+_0x56c1c0);_0x375867=readFileSync(_0x56c1c0,_0x2b1821(0xcb));}else _0x375867=_0x2cf96f;const _0x33c519=validateSql(_0x375867),_0x2e6bdf={'valid':_0x33c519[_0x2b1821(0xf9)],'sqlType':_0x33c519[_0x2b1821(0xdd)][_0x2b1821(0xcf)],'isSelectOnly':_0x33c519['sqlType'][_0x2b1821(0xc3)],'isLockingRead':_0x33c519[_0x2b1821(0xdd)][_0x2b1821(0xfa)]??![],'isDangerous':_0x33c519[_0x2b1821(0xdd)][_0x2b1821(0xe5)],'tables':_0x33c519[_0x2b1821(0xdf)],'parameters':_0x33c519[_0x2b1821(0xc8)],'message':_0x33c519['message']};_0x33c519[_0x2b1821(0xdd)]['reason']&&(_0x2e6bdf['reason']=_0x33c519['sqlType'][_0x2b1821(0xcc)]);if(_0x6a8c73&&_0x33c519[_0x2b1821(0xf9)]){const _0x115f6e=_0x6a8c73[_0x2b1821(0xfc)](',')['map'](_0x33747b=>_0x33747b['trim']())[_0x2b1821(0xd9)](Boolean),_0x30e7e2=[],_0x2a5986=[],_0x45df56=filterDbTableBackedDatasets(await listDatasets(_0x4413a8[_0x2b1821(0xf6)])),_0x412019=new Map(_0x45df56[_0x2b1821(0xec)](_0x1372e5=>[_0x1372e5[_0x2b1821(0xf2)]?.[_0x2b1821(0xd6)]?.[_0x2b1821(0xcd)](),_0x1372e5]));for(const _0x388f9f of _0x33c519[_0x2b1821(0xdf)]){const _0x555e40=_0x412019['get'](_0x388f9f[_0x2b1821(0xcd)]());!_0x555e40&&_0x30e7e2[_0x2b1821(0xd0)]('Table\x20\x22'+_0x388f9f+_0x2b1821(0xfd));}for(const _0x4e1fdc of _0x115f6e){let _0x40c7e6;try{_0x40c7e6=await getDatasetDetail(_0x4e1fdc);}catch{_0x30e7e2[_0x2b1821(0xd0)]('Dataset\x20\x22'+_0x4e1fdc+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x40c7e6,_0x2b1821(0xdc));const _0x19e065=Array[_0x2b1821(0xeb)](_0x40c7e6[_0x2b1821(0xc9)])?_0x40c7e6[_0x2b1821(0xc9)]:[],_0x25739d=new Set(_0x19e065[_0x2b1821(0xec)](_0x3ebe43=>_0x3ebe43[_0x2b1821(0xc4)]?.[_0x2b1821(0xcd)]())),_0x29ff53=_0x40c7e6['dbtableConfig']?.['tableName']||_0x40c7e6['tableName']||_0x4e1fdc;_0x2e6bdf[_0x2b1821(0xff)+_0x29ff53]={'code':_0x4e1fdc,'tableName':_0x29ff53,'fieldCount':_0x25739d[_0x2b1821(0xe7)],'fields':Array[_0x2b1821(0xc1)](_0x25739d)};if(_0x28ed2e){const _0x11dd13=normalizeDatasetIndexes(_0x40c7e6);_0x2a5986[_0x2b1821(0xd0)]({'tableName':_0x29ff53,..._0x11dd13});}}_0x30e7e2[_0x2b1821(0xe8)]>0x0&&(_0x2e6bdf['schemaWarnings']=_0x30e7e2),_0x28ed2e&&(_0x2e6bdf[_0x2b1821(0xef)]=auditSqlJoinIndexes(_0x375867,_0x2a5986));}return{'ok':_0x33c519[_0x2b1821(0xf9)],'data':_0x2e6bdf,'message':_0x33c519['message']};}};function normalizeDatasetIndexes(_0x431076){const _0x143d51=a256_0x212a78,_0x25f67b=Array[_0x143d51(0xeb)](_0x431076?.[_0x143d51(0xe6)]?.[_0x143d51(0xc5)])?_0x431076[_0x143d51(0xe6)]['indexes']:Array[_0x143d51(0xeb)](_0x431076?.[_0x143d51(0xc5)])?_0x431076[_0x143d51(0xc5)]:[],_0x5f06b4=_0x25f67b[_0x143d51(0xd3)](_0x32c0a2=>{const _0x31da4e=_0x143d51,_0x1e6d4e=Array[_0x31da4e(0xeb)](_0x32c0a2?.[_0x31da4e(0xbf)])?_0x32c0a2[_0x31da4e(0xbf)]:Array[_0x31da4e(0xeb)](_0x32c0a2?.[_0x31da4e(0xd2)])?_0x32c0a2['columnNames']:Array[_0x31da4e(0xeb)](_0x32c0a2?.[_0x31da4e(0xd5)])?_0x32c0a2[_0x31da4e(0xd5)]:[],_0x21f7aa=_0x1e6d4e[_0x31da4e(0xd9)](_0x3efc7d=>typeof _0x3efc7d===_0x31da4e(0xbe))[_0x31da4e(0xec)](_0xc7c617=>_0xc7c617[_0x31da4e(0xea)]())[_0x31da4e(0xd9)](Boolean);if(_0x21f7aa['length']===0x0)return[];const _0x29ed4e=[_0x32c0a2?.['indexName'],_0x32c0a2?.[_0x31da4e(0xe0)],_0x32c0a2?.[_0x31da4e(0xc4)]]['find'](_0x4260e6=>typeof _0x4260e6===_0x31da4e(0xbe)&&_0x4260e6[_0x31da4e(0xea)]()),_0x363f65=[_0x32c0a2?.['index_type'],_0x32c0a2?.[_0x31da4e(0xcf)]][_0x31da4e(0xe2)](_0x579d2c=>typeof _0x579d2c===_0x31da4e(0xbe)&&_0x579d2c[_0x31da4e(0xea)]());return[{..._0x29ed4e?{'name':_0x29ed4e['trim']()}:{},..._0x363f65?{'type':_0x363f65[_0x31da4e(0xea)]()}:{},'columns':_0x21f7aa}];}),_0x362f42=[..._0x5f06b4],_0x5d7d9a=typeof _0x431076?.[_0x143d51(0xf2)]?.[_0x143d51(0xf0)]===_0x143d51(0xbe)?_0x431076[_0x143d51(0xf2)][_0x143d51(0xf0)][_0x143d51(0xfc)](',')[_0x143d51(0xec)](_0x205798=>_0x205798['trim']())[_0x143d51(0xd9)](Boolean):[];return _0x5d7d9a[_0x143d51(0xe8)]>0x0&&_0x362f42[_0x143d51(0xda)]({'type':'primary','columns':_0x5d7d9a}),{'indexes':_0x362f42,'metadataAvailable':_0x5f06b4[_0x143d51(0xe8)]>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c3733,_0x42ef92){const _0x595851=a257_0x25c4,_0x39ab1d=_0x2c3733();while(!![]){try{const _0x522897=-parseInt(_0x595851(0x1f8))/0x1+-parseInt(_0x595851(0x1f4))/0x2*(-parseInt(_0x595851(0x1f6))/0x3)+-parseInt(_0x595851(0x1f3))/0x4+-parseInt(_0x595851(0x1f2))/0x5+-parseInt(_0x595851(0x1f9))/0x6*(parseInt(_0x595851(0x1f5))/0x7)+-parseInt(_0x595851(0x1f0))/0x8*(parseInt(_0x595851(0x1f1))/0x9)+parseInt(_0x595851(0x1f7))/0xa;if(_0x522897===_0x42ef92)break;else _0x39ab1d['push'](_0x39ab1d['shift']());}catch(_0xd1c77f){_0x39ab1d['push'](_0x39ab1d['shift']());}}}(a257_0x4a6b,0x862f5));function a257_0x4a6b(){const _0x191847=['1826820MECMtQ','4105608tqwpMg','423478fZVdyV','5705gGjbPn','15HPPgNK','27091700jPifti','799408xxAher','582Oxqket','360KlwEhV','189603vssPuQ'];a257_0x4a6b=function(){return _0x191847;};return a257_0x4a6b();}function a257_0x25c4(_0x347e61,_0x35bb3a){_0x347e61=_0x347e61-0x1f0;const _0x4a6bed=a257_0x4a6b();let _0x25c458=_0x4a6bed[_0x347e61];return _0x25c458;}import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a258_0xa8edb9=a258_0x4a75;function a258_0x4dfb(){const _0x45c22=['appCode','trim','68131JgbGjK','2mzVnvp','2270460zjyAAp','3756203izpnWp','str','4JDBXsv','compress','read','flagMissing','status','taskId','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','2074221ocRPrK','71040eeqZSv','isTerminal','task-id','cookie','629871yRRqiU','task','227547ZvuIJM','328Znbmlo','95ytvlUi',',\x20received\x20'];a258_0x4dfb=function(){return _0x45c22;};return a258_0x4dfb();}function a258_0x4a75(_0x52019b,_0xb72535){_0x52019b=_0x52019b-0x1c8;const _0x4dfbb1=a258_0x4dfb();let _0x4a75c8=_0x4dfbb1[_0x52019b];return _0x4a75c8;}(function(_0x44fbaf,_0x5f0d4e){const _0x344832=a258_0x4a75,_0x47bd59=_0x44fbaf();while(!![]){try{const _0x2d256e=-parseInt(_0x344832(0x1e0))/0x1*(-parseInt(_0x344832(0x1ce))/0x2)+parseInt(_0x344832(0x1de))/0x3*(parseInt(_0x344832(0x1d2))/0x4)+-parseInt(_0x344832(0x1c9))/0x5*(parseInt(_0x344832(0x1da))/0x6)+-parseInt(_0x344832(0x1cd))/0x7*(-parseInt(_0x344832(0x1c8))/0x8)+-parseInt(_0x344832(0x1d9))/0x9+parseInt(_0x344832(0x1cf))/0xa+-parseInt(_0x344832(0x1d0))/0xb;if(_0x2d256e===_0x5f0d4e)break;else _0x47bd59['push'](_0x47bd59['shift']());}catch(_0x5c8b43){_0x47bd59['push'](_0x47bd59['shift']());}}}(a258_0x4dfb,0x411cd));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':a258_0xa8edb9(0x1df),'command':a258_0xa8edb9(0x1d6),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a258_0xa8edb9(0x1d4),'defaultOutputFormat':a258_0xa8edb9(0x1d3),'structuredErrors':!![],'flags':[{'name':a258_0xa8edb9(0x1dc),'type':'string','required':!![],'description':a258_0xa8edb9(0x1d8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3b5262){const _0x3641a3=a258_0xa8edb9;if(!_0x3b5262['str'](_0x3641a3(0x1dc))[_0x3641a3(0x1cc)]())throw CliErrors[_0x3641a3(0x1d5)](_0x3641a3(0x1dc));},async 'execute'(_0x3364fb){const _0x48c5ce=a258_0xa8edb9,_0x549361=_0x3364fb[_0x48c5ce(0x1d1)](_0x48c5ce(0x1dc))[_0x48c5ce(0x1cc)](),_0x23a9fe=normalizeAsyncTask(await getAsyncTaskStatus(_0x549361,_0x3364fb['appCode'],_0x3364fb[_0x48c5ce(0x1dd)]));if(_0x23a9fe[_0x48c5ce(0x1d7)]!==_0x549361)throw CliErrors['apiError']('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x549361+_0x48c5ce(0x1ca)+_0x23a9fe[_0x48c5ce(0x1d7)]+'.');const _0x3f7405=buildAsyncTaskStatusCommand(_0x23a9fe[_0x48c5ce(0x1d7)],_0x3364fb['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x23a9fe),'data':{'appCode':_0x3364fb[_0x48c5ce(0x1cb)],..._0x23a9fe,'query':_0x23a9fe[_0x48c5ce(0x1db)]?null:{'command':_0x3f7405}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5087b6,_0x377297){const _0x497f3e=a259_0x4eb2,_0x342056=_0x5087b6();while(!![]){try{const _0x11aa88=-parseInt(_0x497f3e(0x190))/0x1*(parseInt(_0x497f3e(0x191))/0x2)+parseInt(_0x497f3e(0x188))/0x3+parseInt(_0x497f3e(0x18d))/0x4*(-parseInt(_0x497f3e(0x18e))/0x5)+-parseInt(_0x497f3e(0x189))/0x6+parseInt(_0x497f3e(0x18b))/0x7+parseInt(_0x497f3e(0x18a))/0x8*(-parseInt(_0x497f3e(0x18f))/0x9)+parseInt(_0x497f3e(0x18c))/0xa;if(_0x11aa88===_0x377297)break;else _0x342056['push'](_0x342056['shift']());}catch(_0x44c996){_0x342056['push'](_0x342056['shift']());}}}(a259_0x5ef4,0x3b0af));function a259_0x5ef4(){const _0x2e456c=['22285FiSomh','9QVwNik','2iHZyAp','431602abLDXm','327648rmrUHR','1573968QkMKuv','2330576sUmUmU','2531410kuamRW','9523530VeAMRJ','176jGKMvK'];a259_0x5ef4=function(){return _0x2e456c;};return a259_0x5ef4();}function a259_0x4eb2(_0x5a3d58,_0x1004bc){_0x5a3d58=_0x5a3d58-0x188;const _0x5ef433=a259_0x5ef4();let _0x4eb206=_0x5ef433[_0x5a3d58];return _0x4eb206;}import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a260_0x2749c2=a260_0x891d;(function(_0x349282,_0xce3cd5){const _0x2092e7=a260_0x891d,_0x314b82=_0x349282();while(!![]){try{const _0x2f95fb=-parseInt(_0x2092e7(0xfa))/0x1*(-parseInt(_0x2092e7(0xfe))/0x2)+-parseInt(_0x2092e7(0xf9))/0x3+-parseInt(_0x2092e7(0xf2))/0x4+parseInt(_0x2092e7(0xf4))/0x5*(-parseInt(_0x2092e7(0xef))/0x6)+-parseInt(_0x2092e7(0xf7))/0x7*(-parseInt(_0x2092e7(0xfb))/0x8)+-parseInt(_0x2092e7(0xfd))/0x9+parseInt(_0x2092e7(0xf6))/0xa*(parseInt(_0x2092e7(0xf1))/0xb);if(_0x2f95fb===_0xce3cd5)break;else _0x314b82['push'](_0x314b82['shift']());}catch(_0x168c04){_0x314b82['push'](_0x314b82['shift']());}}}(a260_0x436e,0x392bb));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a260_0x891d(_0x44b84e,_0x2062ee){_0x44b84e=_0x44b84e-0xe8;const _0x436e27=a260_0x436e();let _0x891def=_0x436e27[_0x44b84e];return _0x891def;}function a260_0x436e(){const _0x482cbd=['246757GTExkw','length','874764BbLshz','15803MCiBUG','8cbKKSD','read','3654378CmCsLx','2mOLrRq','\x20tenant\x20member(s)','Pass\x20--tenant-code\x20<code>.','tenant','members-list','flagMissing','str','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','tenant-code','Found\x20','6RETPgi','Exact\x20tenant\x20code','143qpMTUe','376028DisyVi','trim','242185GEcmHn','string','787070FQAiGF'];a260_0x436e=function(){return _0x482cbd;};return a260_0x436e();}import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a260_0x2749c2(0xe8),'command':a260_0x2749c2(0xe9),'description':a260_0x2749c2(0xec),'risk':a260_0x2749c2(0xfc),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a260_0x2749c2(0xed),'type':a260_0x2749c2(0xf5),'required':!![],'description':a260_0x2749c2(0xf0)}],async 'validate'(_0x55d98a){const _0x500ca9=a260_0x2749c2;if(!_0x55d98a[_0x500ca9(0xeb)](_0x500ca9(0xed))[_0x500ca9(0xf3)]())throw CliErrors[_0x500ca9(0xea)](_0x500ca9(0xed),_0x500ca9(0x100));},async 'execute'(_0xc1e857){const _0x2dece4=a260_0x2749c2,_0x47eec2=_0xc1e857[_0x2dece4(0xeb)](_0x2dece4(0xed))[_0x2dece4(0xf3)](),_0x40c0a2=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x47eec2,_0x40c0a2);const _0x519bb8=projectTenantMembers(await listTenantDirectoryMembers(_0x47eec2));return{'ok':!![],'data':{'tenantCode':_0x47eec2,'items':_0x519bb8,'totalCount':_0x519bb8[_0x2dece4(0xf8)]},'message':_0x2dece4(0xee)+_0x519bb8[_0x2dece4(0xf8)]+_0x2dece4(0xff)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6655e7,_0x5c198c){const _0x2ca98c=a261_0x52b7,_0x1689ff=_0x6655e7();while(!![]){try{const _0x54b91b=parseInt(_0x2ca98c(0x1a7))/0x1+-parseInt(_0x2ca98c(0x1c1))/0x2*(-parseInt(_0x2ca98c(0x1bc))/0x3)+parseInt(_0x2ca98c(0x1a9))/0x4+parseInt(_0x2ca98c(0x1ac))/0x5*(parseInt(_0x2ca98c(0x1ab))/0x6)+parseInt(_0x2ca98c(0x1bf))/0x7*(parseInt(_0x2ca98c(0x1aa))/0x8)+-parseInt(_0x2ca98c(0x1b1))/0x9*(parseInt(_0x2ca98c(0x1b6))/0xa)+-parseInt(_0x2ca98c(0x1b7))/0xb*(parseInt(_0x2ca98c(0x1ba))/0xc);if(_0x54b91b===_0x5c198c)break;else _0x1689ff['push'](_0x1689ff['shift']());}catch(_0x4c44da){_0x1689ff['push'](_0x1689ff['shift']());}}}(a261_0x22c5,0x762c0));import{CliErrors}from'../../errors.js';function a261_0x22c5(){const _0x4d4647=['userId','10fpHxrc','837001FQwRai','adminFlag','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','204OBGTvL','validation','1119isbLes','tenantCode','displayName','1447334RSHwyF','Tenant\x20\x22','1100BTIZKe','status','trim','472667TisIef','username','3121160cvMZNA','16MMNINJ','18rfSLIn','1407505aYodJY','nickname','get','sort','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','8446995Ibblsq','ADMIN','values','role'];a261_0x22c5=function(){return _0x4d4647;};return a261_0x22c5();}function textOrNull(_0x360489){const _0x3ebdea=a261_0x52b7,_0x309131=_0x360489?.[_0x3ebdea(0x1c3)]();return _0x309131?_0x309131:null;}function a261_0x52b7(_0x3a3136,_0x48fb32){_0x3a3136=_0x3a3136-0x1a7;const _0x22c52e=a261_0x22c5();let _0x52b71d=_0x22c52e[_0x3a3136];return _0x52b71d;}export function projectTenantMembers(_0x1aa17e){const _0x5a38ea=a261_0x52b7,_0x176b99=new Map();for(const _0x25c60b of _0x1aa17e){const _0x1bd278=Number(_0x25c60b[_0x5a38ea(0x1b5)]);if(!Number['isFinite'](_0x1bd278)||_0x1bd278<=0x0)continue;const _0x2d4635={'userId':_0x1bd278,'username':textOrNull(_0x25c60b[_0x5a38ea(0x1a8)]),'displayName':textOrNull(_0x25c60b[_0x5a38ea(0x1ad)]),'role':_0x25c60b[_0x5a38ea(0x1b8)]===!![]?_0x5a38ea(0x1b2):'MEMBER','status':textOrNull(_0x25c60b[_0x5a38ea(0x1c2)])},_0x2988ac=_0x176b99[_0x5a38ea(0x1ae)](_0x1bd278);if(!_0x2988ac){_0x176b99['set'](_0x1bd278,_0x2d4635);continue;}_0x2988ac[_0x5a38ea(0x1a8)]??=_0x2d4635[_0x5a38ea(0x1a8)],_0x2988ac['displayName']??=_0x2d4635[_0x5a38ea(0x1be)],_0x2988ac['status']??=_0x2d4635[_0x5a38ea(0x1c2)];if(_0x2d4635[_0x5a38ea(0x1b4)]===_0x5a38ea(0x1b2))_0x2988ac['role']='ADMIN';}return[..._0x176b99[_0x5a38ea(0x1b3)]()][_0x5a38ea(0x1af)]((_0x32510b,_0x4aa64e)=>_0x32510b[_0x5a38ea(0x1b5)]-_0x4aa64e['userId']);}export function assertTenantAccessible(_0x1c9a2c,_0x519433){const _0x19f59b=a261_0x52b7;if(_0x519433['some'](_0x4ace56=>_0x4ace56[_0x19f59b(0x1bd)]===_0x1c9a2c))return;throw CliErrors[_0x19f59b(0x1bb)](_0x19f59b(0x1c0)+_0x1c9a2c+_0x19f59b(0x1b0),_0x19f59b(0x1b9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a262_0x2aaa5c=a262_0x1d27;function a262_0x3212(){const _0x39f83c=['6209307iUZZDR','1697439ZrjXTo','40uYcfAl','validation','1117194KcnbsJ','POST','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','dingding-sandbox-bind','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','2AWRdsA','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','4934742omieDw','4244415NkPSXD','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','ding-talk-user-id','876512kjZZBQ','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','user-account','--ding-talk-user-id\x20cannot\x20be\x20empty.','str','string','1611648tQzMyo','8WSQqie'];a262_0x3212=function(){return _0x39f83c;};return a262_0x3212();}(function(_0x245dee,_0x39e208){const _0x3481f9=a262_0x1d27,_0x55949c=_0x245dee();while(!![]){try{const _0x23dbeb=parseInt(_0x3481f9(0x1b1))/0x1*(parseInt(_0x3481f9(0x1b7))/0x2)+-parseInt(_0x3481f9(0x1c6))/0x3*(-parseInt(_0x3481f9(0x1c4))/0x4)+parseInt(_0x3481f9(0x1ba))/0x5+parseInt(_0x3481f9(0x1b9))/0x6+-parseInt(_0x3481f9(0x1bd))/0x7+-parseInt(_0x3481f9(0x1c3))/0x8+parseInt(_0x3481f9(0x1c5))/0x9*(-parseInt(_0x3481f9(0x1c7))/0xa);if(_0x23dbeb===_0x39e208)break;else _0x55949c['push'](_0x55949c['shift']());}catch(_0x2e54dc){_0x55949c['push'](_0x55949c['shift']());}}}(a262_0x3212,0xcb904));import{asDryRunResult}from'../../commands/common/dry-run.js';function a262_0x1d27(_0x5523b6,_0x5be2d6){_0x5523b6=_0x5523b6-0x1b1;const _0x3212cd=a262_0x3212();let _0x1d2779=_0x3212cd[_0x5523b6];return _0x1d2779;}import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID='dingtalk',CURRENT_BINDING_WARNING=a262_0x2aaa5c(0x1b3);function readDingTalkUserId(_0x103036){const _0x1d5ea1=a262_0x2aaa5c,_0x5443d3=_0x103036[_0x1d5ea1(0x1c1)](_0x1d5ea1(0x1bc))['trim']();if(!_0x5443d3)throw CliErrors[_0x1d5ea1(0x1c8)](_0x1d5ea1(0x1c0),_0x1d5ea1(0x1b5));return _0x5443d3;}function buildBindingData(_0xb013cf,_0x191ca7){const _0x25c5ba=a262_0x2aaa5c;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0xb013cf},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0xb013cf,'bound':!![]},'dryRun':_0x191ca7,'backend':{'method':_0x25c5ba(0x1b2),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a262_0x2aaa5c(0x1bf),'command':a262_0x2aaa5c(0x1b4),'description':a262_0x2aaa5c(0x1b6),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a262_0x2aaa5c(0x1bc),'type':a262_0x2aaa5c(0x1c2),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x4a0995){readDingTalkUserId(_0x4a0995);},async 'dryRun'(_0x221482){const _0xdfc486=a262_0x2aaa5c,_0x4da7e9=readDingTalkUserId(_0x221482);return asDryRunResult(buildBindingData(_0x4da7e9,!![]),{'method':_0xdfc486(0x1b2),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x449e13){const _0x4a4619=a262_0x2aaa5c,_0x5160f9=readDingTalkUserId(_0x449e13),_0x4ce948=await bindDingTalkSandboxAccount(_0x5160f9);if(_0x4ce948!==!![])throw CliErrors['apiError'](_0x4a4619(0x1b8),_0x4a4619(0x1be));return{'ok':!![],'data':buildBindingData(_0x5160f9,![]),'message':_0x4a4619(0x1bb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a263_0x48c9e4=a263_0x102f;function a263_0x102f(_0x5d665b,_0x37aca6){_0x5d665b=_0x5d665b-0x15c;const _0x38f3f8=a263_0x38f3();let _0x102f1e=_0x38f3f8[_0x5d665b];return _0x102f1e;}(function(_0x526d83,_0x15f548){const _0x1f6339=a263_0x102f,_0x3d346b=_0x526d83();while(!![]){try{const _0x522e69=-parseInt(_0x1f6339(0x15e))/0x1+-parseInt(_0x1f6339(0x170))/0x2+parseInt(_0x1f6339(0x16c))/0x3*(-parseInt(_0x1f6339(0x165))/0x4)+parseInt(_0x1f6339(0x174))/0x5+parseInt(_0x1f6339(0x175))/0x6*(parseInt(_0x1f6339(0x164))/0x7)+-parseInt(_0x1f6339(0x172))/0x8*(-parseInt(_0x1f6339(0x161))/0x9)+parseInt(_0x1f6339(0x16d))/0xa*(parseInt(_0x1f6339(0x166))/0xb);if(_0x522e69===_0x15f548)break;else _0x3d346b['push'](_0x3d346b['shift']());}catch(_0x38268f){_0x3d346b['push'](_0x3d346b['shift']());}}}(a263_0x38f3,0xb35b7));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindFeishuAccount,FEISHU_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID='feishu',CURRENT_BINDING_WARNING=a263_0x48c9e4(0x16b);function readUnionId(_0xf42bd3){const _0x2c4044=a263_0x48c9e4,_0x268e16=_0xf42bd3['str']('union-id')[_0x2c4044(0x15c)]();if(!/^on_[A-Za-z0-9_-]+$/[_0x2c4044(0x16a)](_0x268e16))throw CliErrors[_0x2c4044(0x169)](_0x2c4044(0x173),_0x2c4044(0x15f));return _0x268e16;}function buildBindingData(_0x5b9e18,_0x385fbb){const _0x57d0ad=a263_0x48c9e4;return{'operation':_0x57d0ad(0x15d),'selector':{'providerId':PROVIDER_ID,'unionId':_0x5b9e18},'before':null,'after':{'providerId':PROVIDER_ID,'unionId':_0x5b9e18,'bound':!![]},'dryRun':_0x385fbb,'backend':{'method':_0x57d0ad(0x171),'path':FEISHU_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}function a263_0x38f3(){const _0xb2890d=['99kKsBre','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20Feishu\x20account','Bound\x20current\x20user\x20to\x20Feishu\x20account.','validation','test','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','575433hCzzko','815950xGnine','union-id','Feishu\x20account\x20binding\x20was\x20not\x20confirmed.','2864792AdSQQS','POST','72752ttgzJx','--union-id\x20must\x20match\x20on_\x20followed\x20by\x20letters,\x20digits,\x20underscores,\x20or\x20hyphens.','4823235cnADXy','6492354uKQPvl','string','trim','bind','1203454yMvuhQ','Pass\x20a\x20Feishu\x20union\x20id\x20such\x20as\x20on_example_001.','Verify\x20the\x20current\x20binding\x20through\x20the\x20platform\x20before\x20explicitly\x20retrying;\x20do\x20not\x20automatically\x20retry.','963fBWenA','user-account','Feishu\x20union_id\x20for\x20the\x20configured\x20Feishu\x20application\x20developer','7mivApI','8Wgbzkx'];a263_0x38f3=function(){return _0xb2890d;};return a263_0x38f3();}export const feishuBind={'service':a263_0x48c9e4(0x162),'command':'feishu-bind','description':a263_0x48c9e4(0x167),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a263_0x48c9e4(0x16e),'type':a263_0x48c9e4(0x176),'required':!![],'description':a263_0x48c9e4(0x163)}],async 'validate'(_0x1da672){readUnionId(_0x1da672);},async 'dryRun'(_0x385c8e){const _0xfd7716=readUnionId(_0x385c8e);return asDryRunResult(buildBindingData(_0xfd7716,!![]),{'method':'POST','url':FEISHU_BIND_PATH});},async 'execute'(_0x44b2f8){const _0x3bef7d=a263_0x48c9e4,_0x819f0c=readUnionId(_0x44b2f8),_0xd81004=await bindFeishuAccount(_0x819f0c);if(_0xd81004!==!![])throw CliErrors['apiError'](_0x3bef7d(0x16f),_0x3bef7d(0x160));return{'ok':!![],'data':buildBindingData(_0x819f0c,![]),'message':_0x3bef7d(0x168)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a264_0x537e(_0x369326,_0x3f0f12){_0x369326=_0x369326-0x7e;const _0x51579b=a264_0x5157();let _0x537e24=_0x51579b[_0x369326];return _0x537e24;}(function(_0x260ada,_0x5e76f3){const _0x479cb0=a264_0x537e,_0x2962f3=_0x260ada();while(!![]){try{const _0x13a81d=parseInt(_0x479cb0(0x81))/0x1*(parseInt(_0x479cb0(0x83))/0x2)+parseInt(_0x479cb0(0x82))/0x3+-parseInt(_0x479cb0(0x84))/0x4+-parseInt(_0x479cb0(0x80))/0x5+parseInt(_0x479cb0(0x85))/0x6+-parseInt(_0x479cb0(0x7f))/0x7+-parseInt(_0x479cb0(0x7e))/0x8*(parseInt(_0x479cb0(0x86))/0x9);if(_0x13a81d===_0x5e76f3)break;else _0x2962f3['push'](_0x2962f3['shift']());}catch(_0x5b8ffc){_0x2962f3['push'](_0x2962f3['shift']());}}}(a264_0x5157,0x5873f));function a264_0x5157(){const _0x5528a0=['8208QUKHrm','2895970AegFDq','932260rsIXZx','61SlrThI','1675323DFfmnR','21374GLSURD','197172SCvWWh','402864rBvIfw','2331VVLZLr'];a264_0x5157=function(){return _0x5528a0;};return a264_0x5157();}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';import{feishuBind}from'../../commands/user-account/feishu-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind,feishuBind];
|