@lovrabet/rabetbase-cli 2.3.16-beta.6 → 2.4.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -10
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/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/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.d.ts +2 -0
- package/lib/commands/page/react/create.js +1 -0
- package/lib/commands/page/react/detail.d.ts +2 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.d.ts +2 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.d.ts +2 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.d.ts +78 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.d.ts +18 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.d.ts +8 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.d.ts +2 -0
- package/lib/commands/page/react/update.js +1 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +1 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/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.d.ts +2 -0
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -0
- package/lib/commands/user-account/index.d.ts +2 -0
- package/lib/commands/user-account/index.js +1 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +117 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.d.ts +3 -0
- package/lib/postinstall.js +1 -0
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.d.ts +37 -0
- package/lib/skills/builtin-skill.js +1 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +4 -2
- 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/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -3
- package/scripts/postinstall.mjs +24 -0
- package/skills/rabetbase/SKILL.md +493 -0
- package/skills/rabetbase/guides/backend-function.md +835 -0
- package/skills/rabetbase/guides/best-practices.md +137 -0
- package/skills/rabetbase/guides/bff-creation-workflow.md +148 -0
- package/skills/rabetbase/guides/conflict-detection.md +119 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +414 -0
- package/skills/rabetbase/guides/database-connection-workflow.md +169 -0
- package/skills/rabetbase/guides/frontend-development.md +179 -0
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +495 -0
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +137 -0
- package/skills/rabetbase/guides/page-development-workflow.md +187 -0
- package/skills/rabetbase/guides/react-custom-page-workflow.md +184 -0
- package/skills/rabetbase/guides/role-permit-workflow.md +127 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +173 -0
- package/skills/rabetbase/guides/sql-mybatis.md +126 -0
- package/skills/rabetbase/guides/troubleshooting.md +67 -0
- package/skills/rabetbase/guides/typescript-sdk.md +227 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartCreate.md +367 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartDetail.md +153 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +291 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartFilter.md +478 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +119 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +223 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +632 -0
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +172 -0
- package/skills/rabetbase/knowledge/page-schema/dataset-relations.md +126 -0
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +232 -0
- package/skills/rabetbase/knowledge/page-schema/field-components.md +312 -0
- package/skills/rabetbase/knowledge/page-schema/syntax-reference.md +278 -0
- package/skills/rabetbase/knowledge/react-page/components.md +225 -0
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +385 -0
- package/skills/rabetbase/references/rabetbase-api-list.md +58 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +82 -0
- package/skills/rabetbase/references/rabetbase-app-config.md +95 -0
- package/skills/rabetbase/references/rabetbase-app-list.md +79 -0
- package/skills/rabetbase/references/rabetbase-app-members-list.md +64 -0
- package/skills/rabetbase/references/rabetbase-auth-login.md +53 -0
- package/skills/rabetbase/references/rabetbase-auth-logout.md +29 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +59 -0
- package/skills/rabetbase/references/rabetbase-bff-delete.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +38 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +61 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-push.md +65 -0
- package/skills/rabetbase/references/rabetbase-bff-save.md +63 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +37 -0
- package/skills/rabetbase/references/rabetbase-cli-skill-install.md +42 -0
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +35 -0
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +33 -0
- package/skills/rabetbase/references/rabetbase-config.md +296 -0
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +84 -0
- package/skills/rabetbase/references/rabetbase-dataset-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +106 -0
- package/skills/rabetbase/references/rabetbase-dataset-extend-update.md +70 -0
- package/skills/rabetbase/references/rabetbase-dataset-field-update.md +117 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +206 -0
- package/skills/rabetbase/references/rabetbase-dataset-list.md +42 -0
- package/skills/rabetbase/references/rabetbase-dataset-operations.md +34 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-audit.md +63 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +141 -0
- package/skills/rabetbase/references/rabetbase-dataset-relations.md +71 -0
- package/skills/rabetbase/references/rabetbase-dataset-rename.md +107 -0
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +135 -0
- package/skills/rabetbase/references/rabetbase-db-create.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-delete.md +26 -0
- package/skills/rabetbase/references/rabetbase-db-detail.md +27 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +57 -0
- package/skills/rabetbase/references/rabetbase-db-list.md +37 -0
- package/skills/rabetbase/references/rabetbase-db-tables.md +25 -0
- package/skills/rabetbase/references/rabetbase-db-test.md +29 -0
- package/skills/rabetbase/references/rabetbase-db-update.md +29 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +62 -0
- package/skills/rabetbase/references/rabetbase-file.md +35 -0
- package/skills/rabetbase/references/rabetbase-init.md +70 -0
- package/skills/rabetbase/references/rabetbase-issue-report.md +132 -0
- package/skills/rabetbase/references/rabetbase-kb.md +62 -0
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +135 -0
- package/skills/rabetbase/references/rabetbase-menu-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-create.md +63 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +74 -0
- package/skills/rabetbase/references/rabetbase-menu-group-create.md +33 -0
- package/skills/rabetbase/references/rabetbase-menu-group-update.md +38 -0
- package/skills/rabetbase/references/rabetbase-menu-list.md +144 -0
- package/skills/rabetbase/references/rabetbase-menu-move.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +45 -0
- package/skills/rabetbase/references/rabetbase-menu-rename.md +48 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +60 -0
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +80 -0
- package/skills/rabetbase/references/rabetbase-ocr.md +86 -0
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-pull.md +47 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-react-create.md +29 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +26 -0
- package/skills/rabetbase/references/rabetbase-page-react-list.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-update.md +24 -0
- package/skills/rabetbase/references/rabetbase-page-relation-binding.md +72 -0
- package/skills/rabetbase/references/rabetbase-page-restore.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-sync.md +36 -0
- package/skills/rabetbase/references/rabetbase-permit-page-set.md +69 -0
- package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +53 -0
- package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +57 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +46 -0
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +57 -0
- package/skills/rabetbase/references/rabetbase-role-list.md +68 -0
- package/skills/rabetbase/references/rabetbase-role-user-add.md +54 -0
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +27 -0
- package/skills/rabetbase/references/rabetbase-run.md +53 -0
- package/skills/rabetbase/references/rabetbase-schema.md +22 -0
- package/skills/rabetbase/references/rabetbase-sql-create.md +41 -0
- package/skills/rabetbase/references/rabetbase-sql-delete.md +37 -0
- package/skills/rabetbase/references/rabetbase-sql-detail.md +32 -0
- package/skills/rabetbase/references/rabetbase-sql-exec.md +34 -0
- package/skills/rabetbase/references/rabetbase-sql-list.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-pull.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +46 -0
- package/skills/rabetbase/references/rabetbase-sql-status.md +39 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +73 -0
- package/skills/rabetbase/references/rabetbase-standard-page-status.md +31 -0
- package/skills/rabetbase/references/rabetbase-task-status.md +40 -0
- package/skills/rabetbase/references/rabetbase-tenant-members-list.md +69 -0
- package/skills/rabetbase/references/rabetbase-update.md +56 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +45 -0
- package/skills/rabetbase/references/rabetbase-workspace.md +60 -0
- package/skills/rabetbase.manifest.json +137 -0
package/lib/commands/sql/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x4a957d=a188_0x97b4;function a188_0x3d4a(){const _0x277528=['3687992WljeZD','12jlMnRg','24kMoeVy','name','Found\x20','40jrmxrF','Filter\x20by\x20SQL\x20name','304Rdpbqu','description','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','totalCount','length','Page\x20number','sqlcode','129510ABLeBE','appCode','\x20SQL\x20queries\x20(total:\x20','10052003dqWsWO','Page\x20size','paging','sql','page','bool','List\x20custom\x20SQL\x20queries','125370bsbgSl','18qlTcHO','num','boolean','604GVvtBw','266283LSgRUi','sqlName','48PwoayT','read','number','str','pagesize','all','tableData','sqlCode','dbId','235598wUAubi'];a188_0x3d4a=function(){return _0x277528;};return a188_0x3d4a();}(function(_0x47568f,_0x38e9ba){const _0x3ca403=a188_0x97b4,_0x2c1f3e=_0x47568f();while(!![]){try{const _0x31adf3=parseInt(_0x3ca403(0x1ae))/0x1*(parseInt(_0x3ca403(0x1c3))/0x2)+parseInt(_0x3ca403(0x1b5))/0x3*(parseInt(_0x3ca403(0x1a9))/0x4)+parseInt(_0x3ca403(0x1bf))/0x5*(-parseInt(_0x3ca403(0x1c0))/0x6)+-parseInt(_0x3ca403(0x1a7))/0x7+parseInt(_0x3ca403(0x1c6))/0x8*(parseInt(_0x3ca403(0x1c4))/0x9)+-parseInt(_0x3ca403(0x1ac))/0xa*(-parseInt(_0x3ca403(0x1a6))/0xb)+parseInt(_0x3ca403(0x1a8))/0xc*(parseInt(_0x3ca403(0x1b8))/0xd);if(_0x31adf3===_0x38e9ba)break;else _0x2c1f3e['push'](_0x2c1f3e['shift']());}catch(_0x2348bd){_0x2c1f3e['push'](_0x2c1f3e['shift']());}}}(a188_0x3d4a,0xbfb17));import{listSqlQueries}from'../../core/api-client.js';function a188_0x97b4(_0x119260,_0x1a996a){_0x119260=_0x119260-0x1a1;const _0x3d4a0d=a188_0x3d4a();let _0x97b42f=_0x3d4a0d[_0x119260];return _0x97b42f;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a188_0x4a957d(0x1bb),'command':'list','description':a188_0x4a957d(0x1be),'risk':a188_0x4a957d(0x1c7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a188_0x4a957d(0x1aa),'type':'string','description':a188_0x4a957d(0x1ad)},{'name':a188_0x4a957d(0x1bc),'type':a188_0x4a957d(0x1c8),'description':a188_0x4a957d(0x1b3),'default':0x1},{'name':a188_0x4a957d(0x1a1),'type':'number','description':a188_0x4a957d(0x1b9)},{'name':'verbose','type':a188_0x4a957d(0x1c2),'description':a188_0x4a957d(0x1b0)}],async 'execute'(_0xc9d8be){const _0x626bbb=a188_0x4a957d,_0x39c754=await listSqlQueries(_0xc9d8be['appCode'],{'sqlCode':_0xc9d8be['str'](_0x626bbb(0x1b4))||undefined,'sqlName':_0xc9d8be[_0x626bbb(0x1c9)](_0x626bbb(0x1aa))||undefined,'currentPage':_0xc9d8be['num'](_0x626bbb(0x1bc)),'pageSize':_0xc9d8be[_0x626bbb(0x1c1)](_0x626bbb(0x1a1),0x32)}),_0x462244=_0xc9d8be[_0x626bbb(0x1bd)]('verbose'),_0x74ed76=_0x39c754[_0x626bbb(0x1a3)]??[],_0xfb7783=_0x39c754[_0x626bbb(0x1ba)]?.[_0x626bbb(0x1b1)]??_0x74ed76[_0x626bbb(0x1b2)];let _0x5c3d6b;return _0x462244?_0x5c3d6b=_0x74ed76:_0x5c3d6b=await Promise[_0x626bbb(0x1a2)](_0x74ed76['map'](async _0x5a9e3d=>{const _0x567643=_0x626bbb;let _0x1fd0cf;try{_0x1fd0cf=_0x5a9e3d[_0x567643(0x1a5)]?await getDbName(_0xc9d8be[_0x567643(0x1b6)],_0x5a9e3d[_0x567643(0x1a5)]):undefined;}catch{}return{'sqlCode':_0x5a9e3d[_0x567643(0x1a4)],'sqlName':_0x5a9e3d[_0x567643(0x1c5)],'description':_0x5a9e3d[_0x567643(0x1af)]??'','db':_0x1fd0cf?_0x1fd0cf+'\x20('+_0x5a9e3d[_0x567643(0x1a5)]+')':_0x5a9e3d[_0x567643(0x1a5)]??''};})),{'ok':!![],'data':_0x5c3d6b,'message':_0x74ed76[_0x626bbb(0x1b2)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':_0x626bbb(0x1ab)+_0x74ed76[_0x626bbb(0x1b2)]+_0x626bbb(0x1b7)+_0xfb7783+').'};}};
|
package/lib/commands/sql/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0x2f79b8=a181_0x4f5b;function a181_0x1a50(){const _0x524d1a=['replace','sqlRootDir','boolean','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','toISOString','991620Ksvkcn','Force\x20pull\x20cancelled.','bool','310031hIifta','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','cancelled','195686wzZquT','catch','str','\x20SQL\x20file(s)\x20into\x20','sql','2007831FwmUlP','165niSrTk','sqlCode','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','Pull\x20complete:\x20','8104tUUuVF','paging','length','POST','trimStart','conflict','filter','7649140MuVyxF','join','No\x20remote\x20SQL\x20queries\x20matched.','mybatisXml','appCode','name','totalCount','apps','local\x20differs\x20from\x20remote','2409003PLOrpI','pull','lastSync','utf8','sqlcode','Filter\x20by\x20SQL\x20display\x20name','8GKbjIY','tableData','path','push','sqlName','lockFilePath','dbId','test','6bClrPD','sqlContent','read','description','unchanged','sqlRoot','Would\x20pull\x20','skipped'];a181_0x1a50=function(){return _0x524d1a;};return a181_0x1a50();}(function(_0x484bfa,_0x4d2d0c){const _0x427a07=a181_0x4f5b,_0x1501d2=_0x484bfa();while(!![]){try{const _0x2faea7=parseInt(_0x427a07(0x1f5))/0x1+parseInt(_0x427a07(0x1f9))/0x2*(parseInt(_0x427a07(0x1e5))/0x3)+-parseInt(_0x427a07(0x203))/0x4*(-parseInt(_0x427a07(0x1ff))/0x5)+-parseInt(_0x427a07(0x1f2))/0x6+parseInt(_0x427a07(0x1fe))/0x7+parseInt(_0x427a07(0x1dd))/0x8*(parseInt(_0x427a07(0x213))/0x9)+-parseInt(_0x427a07(0x20a))/0xa;if(_0x2faea7===_0x4d2d0c)break;else _0x1501d2['push'](_0x1501d2['shift']());}catch(_0xf0925d){_0x1501d2['push'](_0x1501d2['shift']());}}}(a181_0x1a50,0x3011b));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';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{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(_0x595222,_0x5d0eb5){const _0x47195e=a181_0x4f5b,_0x254a45=[];let _0x2230ef=0x1;while(!![]){const _0x2e7e19=await listSqlQueries(_0x595222,{'currentPage':_0x2230ef,'pageSize':PAGE_SIZE,'sqlCode':_0x5d0eb5[_0x47195e(0x200)],'sqlName':_0x5d0eb5[_0x47195e(0x1e1)]}),_0x886cbd=_0x2e7e19[_0x47195e(0x1de)]??[];_0x254a45[_0x47195e(0x1e0)](..._0x886cbd);if(_0x886cbd['length']===0x0)break;const _0x1b31a6=_0x2e7e19[_0x47195e(0x204)]?.[_0x47195e(0x210)];if(_0x1b31a6!=null?_0x254a45['length']>=_0x1b31a6:_0x886cbd[_0x47195e(0x205)]<PAGE_SIZE)break;_0x2230ef++;}return _0x254a45;}function a181_0x4f5b(_0x2359b4,_0x3c54b8){_0x2359b4=_0x2359b4-0x1dd;const _0x1a5096=a181_0x1a50();let _0x4f5bc0=_0x1a5096[_0x2359b4];return _0x4f5bc0;}async function ensureSqlContent(_0x2f6390){const _0x199ff1=a181_0x4f5b;if(_0x2f6390[_0x199ff1(0x1e6)]!=null&&String(_0x2f6390[_0x199ff1(0x1e6)])[_0x199ff1(0x205)]>0x0)return _0x2f6390;return getSqlQueryDetail(_0x2f6390[_0x199ff1(0x200)]);}export const sqlPull={'service':a181_0x2f79b8(0x1fd),'command':a181_0x2f79b8(0x214),'description':a181_0x2f79b8(0x201),'risk':a181_0x2f79b8(0x1e7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a181_0x2f79b8(0x20f),'type':'string','description':a181_0x2f79b8(0x218)},{'name':'force','type':a181_0x2f79b8(0x1ef),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x2d636b){const _0x3facd6=a181_0x2f79b8,_0x4ad909=loadSqlProjectConfig(_0x2d636b[_0x3facd6(0x20e)]),_0x286080=await readSqlLockFile(_0x4ad909[_0x3facd6(0x1e2)]),{appLock:_0x5464cd}=ensureSqlLockScope(_0x286080??createEmptySqlLock(),_0x4ad909[_0x3facd6(0x20e)],_0x4ad909[_0x3facd6(0x1ea)],_0x3facd6(0x214)),_0x5c23fb=await fetchAllSqlQueries(_0x2d636b['appCode'],{'sqlCode':_0x2d636b[_0x3facd6(0x1fb)](_0x3facd6(0x217))||undefined,'sqlName':_0x2d636b[_0x3facd6(0x1fb)]('name')||undefined}),_0x253852=[];for(const _0xacf946 of _0x5c23fb){const _0xdba66a=await ensureSqlContent(_0xacf946),_0x23f019=ensureRemoteSqlContent(_0xdba66a),_0x46ea25=detectModeFromSql(_0xdba66a),_0x502fc1=_0xdba66a['dbId']?await getDbName(_0x2d636b[_0x3facd6(0x20e)],Number(_0xdba66a[_0x3facd6(0x1e3)]))[_0x3facd6(0x1fa)](()=>undefined):undefined,_0x11f721=buildLocalSqlFileContent({'sqlCode':_0xdba66a['sqlCode'],'sqlName':_0xdba66a[_0x3facd6(0x1e1)],'dbId':_0xdba66a[_0x3facd6(0x1e3)]},_0x23f019,{'dbName':_0x502fc1,'mode':_0x46ea25,'syncedAt':new Date()[_0x3facd6(0x1f1)](),'description':_0xdba66a[_0x3facd6(0x1e8)]}),_0x10157e=buildSqlLockEntry(_0xdba66a,_0x23f019,'',{'dbName':_0x502fc1}),_0x266339=resolveLocalSqlFilePath(_0x4ad909,_0xdba66a[_0x3facd6(0x200)],_0x10157e);let _0x1500f4='would_pull',_0x3e7f1f;if(await fileExists(_0x266339)){const _0x1710ad=await readFile(_0x266339,'utf8');isEquivalentPulledSqlFile(_0x1710ad,_0x11f721,_0x46ea25)?(_0x1500f4=_0x3facd6(0x1ec),_0x3e7f1f=_0x3facd6(0x1e9)):(_0x1500f4=_0x3facd6(0x208),_0x3e7f1f=_0x3facd6(0x1f0));}_0x253852['push']({'sqlCode':_0xdba66a[_0x3facd6(0x200)],'sqlName':_0xdba66a[_0x3facd6(0x1e1)],'filePath':_0x266339,'status':_0x1500f4,'reason':_0x3e7f1f});}return{'method':_0x3facd6(0x206),'url':_0x3facd6(0x1f7),'body':{'appCode':_0x2d636b[_0x3facd6(0x20e)],'sqlCode':_0x2d636b[_0x3facd6(0x1fb)]('sqlcode')||null,'sqlName':_0x2d636b[_0x3facd6(0x1fb)]('name')||null,'files':_0x253852},'description':_0x3facd6(0x1eb)+_0x253852[_0x3facd6(0x205)]+_0x3facd6(0x1fc)+_0x4ad909['sqlRootDir']};},async 'execute'(_0x4306bf){const _0x11e8f8=a181_0x2f79b8,_0x389ad4=loadSqlProjectConfig(_0x4306bf[_0x11e8f8(0x20e)]),_0x4d9cf0=await readSqlLockFile(_0x389ad4[_0x11e8f8(0x1e2)]),{lockData:_0x52f3d3,appLock:_0x519fa8}=ensureSqlLockScope(_0x4d9cf0??createEmptySqlLock(),_0x389ad4['appCode'],_0x389ad4[_0x11e8f8(0x1ea)],_0x11e8f8(0x214)),_0x365187=_0x4306bf[_0x11e8f8(0x1f4)]('force'),_0x2ed122=await fetchAllSqlQueries(_0x4306bf[_0x11e8f8(0x20e)],{'sqlCode':_0x4306bf[_0x11e8f8(0x1fb)]('sqlcode')||undefined,'sqlName':_0x4306bf[_0x11e8f8(0x1fb)](_0x11e8f8(0x20f))||undefined});if(_0x2ed122['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x11e8f8(0x20c)};const _0x71c0c9=[],_0x49b92d=[];for(const _0x217ac8 of _0x2ed122){try{_0x71c0c9['push'](await ensureSqlContent(_0x217ac8));}catch(_0x3e1c7e){_0x49b92d[_0x11e8f8(0x1e0)]({'sqlCode':_0x217ac8[_0x11e8f8(0x200)],'error':_0x3e1c7e instanceof Error?_0x3e1c7e['message']:String(_0x3e1c7e)});}}if(_0x365187&&!_0x4306bf['nonInteractive']){let _0x505cac=![];for(const _0x41db37 of _0x71c0c9){const _0x29788f=detectModeFromSql(_0x41db37),_0x1dad71=_0x41db37[_0x11e8f8(0x1e3)]?await getDbName(_0x4306bf[_0x11e8f8(0x20e)],Number(_0x41db37[_0x11e8f8(0x1e3)]))[_0x11e8f8(0x1fa)](()=>undefined):undefined,_0x284c05=buildLocalSqlFileContent({'sqlCode':_0x41db37[_0x11e8f8(0x200)],'sqlName':_0x41db37[_0x11e8f8(0x1e1)],'dbId':_0x41db37['dbId']},ensureRemoteSqlContent(_0x41db37),{'dbName':_0x1dad71,'mode':_0x29788f,'syncedAt':new Date()['toISOString'](),'description':_0x41db37[_0x11e8f8(0x1e8)]}),_0x1bcf3a=resolveLocalSqlFilePath(_0x389ad4,_0x41db37['sqlCode'],buildSqlLockEntry(_0x41db37,ensureRemoteSqlContent(_0x41db37),'',{'dbName':_0x1dad71}));if(await fileExists(_0x1bcf3a)){const _0x4d9cdd=await readFile(_0x1bcf3a,'utf8');if(!isEquivalentPulledSqlFile(_0x4d9cdd,_0x284c05,_0x29788f)){_0x505cac=!![];break;}}}if(_0x505cac){const _0x62fa89=await confirmForceOverwrite(_0x11e8f8(0x1f6));if(!_0x62fa89)throw CliErrors[_0x11e8f8(0x1f8)](_0x11e8f8(0x1f3));}}const _0x4ba05f=cloneSqlLockData(_0x52f3d3),_0x4d7fa2=_0x4ba05f[_0x11e8f8(0x211)][_0x389ad4[_0x11e8f8(0x20e)]],_0x5b4f22=[],_0x369000=[];for(const _0x1600bf of _0x71c0c9){const _0x221205=_0x4d7fa2['sqls'][_0x1600bf[_0x11e8f8(0x200)]],_0x4c8a23=ensureRemoteSqlContent(_0x1600bf),_0x3ed294=detectModeFromSql(_0x1600bf),_0x12696d=_0x1600bf[_0x11e8f8(0x1e3)]?await getDbName(_0x4306bf[_0x11e8f8(0x20e)],Number(_0x1600bf[_0x11e8f8(0x1e3)]))[_0x11e8f8(0x1fa)](()=>undefined):undefined,_0x3d07ab=buildLocalSqlFileContent({'sqlCode':_0x1600bf[_0x11e8f8(0x200)],'sqlName':_0x1600bf['sqlName'],'dbId':_0x1600bf[_0x11e8f8(0x1e3)]},_0x4c8a23,{'dbName':_0x12696d,'mode':_0x3ed294,'syncedAt':new Date()[_0x11e8f8(0x1f1)](),'description':_0x1600bf[_0x11e8f8(0x1e8)]}),_0x5887ce=buildSqlLockEntry(_0x1600bf,_0x4c8a23,computeSqlContentHash(_0x3d07ab),{'dbName':_0x12696d}),_0x3ba515=_0x5887ce[_0x11e8f8(0x1df)],_0x13abc2=join(_0x389ad4['sqlRootDir'],_0x3ba515);try{if(await fileExists(_0x13abc2)){const _0x2d04f5=await readFile(_0x13abc2,'utf8');if(isEquivalentPulledSqlFile(_0x2d04f5,_0x3d07ab,_0x3ed294)){_0x369000['push']({'sqlCode':_0x1600bf['sqlCode'],'reason':_0x11e8f8(0x1e9)}),_0x4d7fa2['sqls'][_0x1600bf[_0x11e8f8(0x200)]]={..._0x5887ce,'hash':computeSqlContentHash(_0x2d04f5),'path':_0x3ba515};continue;}if(!_0x365187){_0x369000['push']({'sqlCode':_0x1600bf[_0x11e8f8(0x200)],'reason':_0x11e8f8(0x212)});continue;}}const _0x6dcd05=_0x221205?.['path']?join(_0x389ad4[_0x11e8f8(0x1ee)],_0x221205['path']):undefined;_0x6dcd05&&_0x6dcd05!==_0x13abc2&&await fileExists(_0x6dcd05)&&await rm(_0x6dcd05,{'force':!![]}),await ensureParentDirectory(_0x13abc2),await writeFile(_0x13abc2,_0x3d07ab,_0x11e8f8(0x216)),_0x4d7fa2['sqls'][_0x1600bf[_0x11e8f8(0x200)]]={..._0x5887ce,'path':_0x3ba515},_0x5b4f22[_0x11e8f8(0x1e0)]({'sqlCode':_0x1600bf[_0x11e8f8(0x200)],'filePath':_0x13abc2});}catch(_0x466a10){_0x49b92d[_0x11e8f8(0x1e0)]({'sqlCode':_0x1600bf[_0x11e8f8(0x200)],'error':_0x466a10 instanceof Error?_0x466a10['message']:String(_0x466a10)});}}return _0x4d7fa2[_0x11e8f8(0x215)]=new Date()['toISOString'](),await writeSqlLockFile(_0x389ad4[_0x11e8f8(0x1e2)],_0x4ba05f),{'ok':_0x49b92d[_0x11e8f8(0x205)]===0x0,'data':{'pulled':_0x5b4f22,'skipped':_0x369000,'failed':_0x49b92d},'message':_0x11e8f8(0x202)+_0x5b4f22[_0x11e8f8(0x205)]+'\x20written,\x20'+_0x369000[_0x11e8f8(0x205)]+'\x20skipped,\x20'+_0x49b92d['length']+'\x20failed'};}};function detectModeFromSql(_0x5f485f){const _0x545206=a181_0x2f79b8,_0x273d97=ensureRemoteSqlContent(_0x5f485f),_0x207ec8=stripLocalSqlMetadata(_0x273d97,_0x545206(0x20d))[_0x545206(0x207)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x207ec8))return'mybatisXml';return'sql';}function isEquivalentPulledSqlFile(_0x2b89a5,_0x4832f0,_0x3b7a68){return normalizePullComparableContent(_0x2b89a5,_0x3b7a68)===normalizePullComparableContent(_0x4832f0,_0x3b7a68);}function normalizePullComparableContent(_0x491045,_0x55ab0c){const _0x27bf28=a181_0x2f79b8,_0x39dfb0=_0x491045[_0x27bf28(0x1ed)](/\r\n/g,'\x0a')['split']('\x0a'),_0x206e0c=_0x39dfb0[_0x27bf28(0x209)](_0x22b72c=>!isSyncedAtMetadataLine(_0x22b72c,_0x55ab0c));return _0x206e0c[_0x27bf28(0x20b)]('\x0a');}function isSyncedAtMetadataLine(_0x49f614,_0x585c0e){const _0x429191=a181_0x2f79b8;if(_0x585c0e==='mybatisXml')return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x429191(0x1e4)](_0x49f614);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x429191(0x1e4)](_0x49f614);}
|
|
1
|
+
const a189_0x2d5f98=a189_0x38d1;(function(_0x5e71f8,_0x3c761e){const _0x1822cb=a189_0x38d1,_0x55e7e0=_0x5e71f8();while(!![]){try{const _0x1eb95b=-parseInt(_0x1822cb(0x179))/0x1*(parseInt(_0x1822cb(0x17b))/0x2)+parseInt(_0x1822cb(0x15a))/0x3*(parseInt(_0x1822cb(0x18f))/0x4)+-parseInt(_0x1822cb(0x191))/0x5*(parseInt(_0x1822cb(0x17f))/0x6)+parseInt(_0x1822cb(0x158))/0x7*(parseInt(_0x1822cb(0x192))/0x8)+parseInt(_0x1822cb(0x16f))/0x9*(-parseInt(_0x1822cb(0x168))/0xa)+-parseInt(_0x1822cb(0x163))/0xb+-parseInt(_0x1822cb(0x17e))/0xc*(-parseInt(_0x1822cb(0x162))/0xd);if(_0x1eb95b===_0x3c761e)break;else _0x55e7e0['push'](_0x55e7e0['shift']());}catch(_0x357a06){_0x55e7e0['push'](_0x55e7e0['shift']());}}}(a189_0x4ee7,0x949e2));import{readFile,rm,writeFile}from'node:fs/promises';function a189_0x38d1(_0x597f83,_0x50891e){_0x597f83=_0x597f83-0x153;const _0x4ee7c1=a189_0x4ee7();let _0x38d1d8=_0x4ee7c1[_0x597f83];return _0x38d1d8;}import{join}from'node:path';function a189_0x4ee7(){const _0x4d9098=['7ssXhhF','conflict','5046jAcnze','test','toISOString','boolean','sqlcode','Filter\x20by\x20SQL\x20display\x20name','sqls','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','25129EwGOiv','5045458jnHSro','sqlName','catch','utf8','dbId','956870PqVHNy','nonInteractive','\x20written,\x20','description','Force\x20pull\x20cancelled.','unchanged','str','45CTxNzv','message','\x20SQL\x20file(s)\x20into\x20','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','pull','push','name','split','\x20failed','sqlRoot','78522fDcqsG','replace','20qpfxmf','lockFilePath','POST','5760BVhziP','42gDNjhW','sqlCode','trimStart','sqlContent','Pull\x20complete:\x20','path','string','paging','sqlRootDir','would_pull','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','length','sql','skipped','Force\x20overwrite\x20local\x20unsynced\x20changes','filter','2764NttxTE','mybatisXml','534130bjHcmx','7910008qFQwnU','appCode','cancelled','bool','force','No\x20remote\x20SQL\x20queries\x20matched.','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.'];a189_0x4ee7=function(){return _0x4d9098;};return a189_0x4ee7();}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';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{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(_0x36cf71,_0x4acb0a){const _0x1f6635=a189_0x38d1,_0x2f694d=[];let _0x357071=0x1;while(!![]){const _0x56af98=await listSqlQueries(_0x36cf71,{'currentPage':_0x357071,'pageSize':PAGE_SIZE,'sqlCode':_0x4acb0a[_0x1f6635(0x180)],'sqlName':_0x4acb0a[_0x1f6635(0x164)]}),_0xc2861f=_0x56af98['tableData']??[];_0x2f694d[_0x1f6635(0x174)](..._0xc2861f);if(_0xc2861f['length']===0x0)break;const _0x4d6171=_0x56af98[_0x1f6635(0x186)]?.['totalCount'];if(_0x4d6171!=null?_0x2f694d['length']>=_0x4d6171:_0xc2861f['length']<PAGE_SIZE)break;_0x357071++;}return _0x2f694d;}async function ensureSqlContent(_0x4b5b54){const _0x517853=a189_0x38d1;if(_0x4b5b54[_0x517853(0x182)]!=null&&String(_0x4b5b54[_0x517853(0x182)])['length']>0x0)return _0x4b5b54;return getSqlQueryDetail(_0x4b5b54[_0x517853(0x180)]);}export const sqlPull={'service':'sql','command':a189_0x2d5f98(0x173),'description':a189_0x2d5f98(0x172),'risk':'read','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a189_0x2d5f98(0x175),'type':a189_0x2d5f98(0x185),'description':a189_0x2d5f98(0x15f)},{'name':a189_0x2d5f98(0x155),'type':a189_0x2d5f98(0x15d),'description':a189_0x2d5f98(0x18d)}],async 'dryRun'(_0xa7053c){const _0x295c36=a189_0x2d5f98,_0x57556f=loadSqlProjectConfig(_0xa7053c[_0x295c36(0x193)]),_0xeda08e=await readSqlLockFile(_0x57556f[_0x295c36(0x17c)]),{appLock:_0x4a300f}=ensureSqlLockScope(_0xeda08e??createEmptySqlLock(),_0x57556f['appCode'],_0x57556f[_0x295c36(0x178)],_0x295c36(0x173)),_0x471900=await fetchAllSqlQueries(_0xa7053c['appCode'],{'sqlCode':_0xa7053c[_0x295c36(0x16e)](_0x295c36(0x15e))||undefined,'sqlName':_0xa7053c[_0x295c36(0x16e)](_0x295c36(0x175))||undefined}),_0x173589=[];for(const _0x199aa9 of _0x471900){const _0x26a4b9=await ensureSqlContent(_0x199aa9),_0x116add=ensureRemoteSqlContent(_0x26a4b9),_0x22ee05=detectModeFromSql(_0x26a4b9),_0x2b3c15=_0x26a4b9[_0x295c36(0x167)]?await getDbName(_0xa7053c[_0x295c36(0x193)],Number(_0x26a4b9['dbId']))[_0x295c36(0x165)](()=>undefined):undefined,_0x4534ac=buildLocalSqlFileContent({'sqlCode':_0x26a4b9[_0x295c36(0x180)],'sqlName':_0x26a4b9[_0x295c36(0x164)],'dbId':_0x26a4b9[_0x295c36(0x167)]},_0x116add,{'dbName':_0x2b3c15,'mode':_0x22ee05,'syncedAt':new Date()[_0x295c36(0x15c)](),'description':_0x26a4b9[_0x295c36(0x16b)]}),_0x43d492=buildSqlLockEntry(_0x26a4b9,_0x116add,'',{'dbName':_0x2b3c15}),_0x11376b=resolveLocalSqlFilePath(_0x57556f,_0x26a4b9['sqlCode'],_0x43d492);let _0x57ab86=_0x295c36(0x188),_0x57bae6;if(await fileExists(_0x11376b)){const _0x2607e8=await readFile(_0x11376b,_0x295c36(0x166));isEquivalentPulledSqlFile(_0x2607e8,_0x4534ac,_0x22ee05)?(_0x57ab86=_0x295c36(0x18c),_0x57bae6=_0x295c36(0x16d)):(_0x57ab86=_0x295c36(0x159),_0x57bae6=_0x295c36(0x161));}_0x173589['push']({'sqlCode':_0x26a4b9['sqlCode'],'sqlName':_0x26a4b9['sqlName'],'filePath':_0x11376b,'status':_0x57ab86,'reason':_0x57bae6});}return{'method':_0x295c36(0x17d),'url':_0x295c36(0x189),'body':{'appCode':_0xa7053c[_0x295c36(0x193)],'sqlCode':_0xa7053c['str'](_0x295c36(0x15e))||null,'sqlName':_0xa7053c[_0x295c36(0x16e)](_0x295c36(0x175))||null,'files':_0x173589},'description':'Would\x20pull\x20'+_0x173589[_0x295c36(0x18a)]+_0x295c36(0x171)+_0x57556f[_0x295c36(0x187)]};},async 'execute'(_0x181621){const _0x1c746a=a189_0x2d5f98,_0x5f30c6=loadSqlProjectConfig(_0x181621[_0x1c746a(0x193)]),_0x3ada8e=await readSqlLockFile(_0x5f30c6['lockFilePath']),{lockData:_0x47cd08,appLock:_0xd3033d}=ensureSqlLockScope(_0x3ada8e??createEmptySqlLock(),_0x5f30c6[_0x1c746a(0x193)],_0x5f30c6['sqlRoot'],_0x1c746a(0x173)),_0x431f9d=_0x181621[_0x1c746a(0x154)](_0x1c746a(0x155)),_0x202a51=await fetchAllSqlQueries(_0x181621[_0x1c746a(0x193)],{'sqlCode':_0x181621['str'](_0x1c746a(0x15e))||undefined,'sqlName':_0x181621['str'](_0x1c746a(0x175))||undefined});if(_0x202a51['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1c746a(0x156)};const _0x1dffd3=[],_0x4bb1f0=[];for(const _0x4ceee8 of _0x202a51){try{_0x1dffd3['push'](await ensureSqlContent(_0x4ceee8));}catch(_0x2841f4){_0x4bb1f0[_0x1c746a(0x174)]({'sqlCode':_0x4ceee8[_0x1c746a(0x180)],'error':_0x2841f4 instanceof Error?_0x2841f4['message']:String(_0x2841f4)});}}if(_0x431f9d&&!_0x181621[_0x1c746a(0x169)]){let _0x49906a=![];for(const _0x1098b5 of _0x1dffd3){const _0x55f700=detectModeFromSql(_0x1098b5),_0x5e16b7=_0x1098b5[_0x1c746a(0x167)]?await getDbName(_0x181621[_0x1c746a(0x193)],Number(_0x1098b5[_0x1c746a(0x167)]))[_0x1c746a(0x165)](()=>undefined):undefined,_0x32f561=buildLocalSqlFileContent({'sqlCode':_0x1098b5[_0x1c746a(0x180)],'sqlName':_0x1098b5['sqlName'],'dbId':_0x1098b5[_0x1c746a(0x167)]},ensureRemoteSqlContent(_0x1098b5),{'dbName':_0x5e16b7,'mode':_0x55f700,'syncedAt':new Date()[_0x1c746a(0x15c)](),'description':_0x1098b5[_0x1c746a(0x16b)]}),_0x1eb99c=resolveLocalSqlFilePath(_0x5f30c6,_0x1098b5[_0x1c746a(0x180)],buildSqlLockEntry(_0x1098b5,ensureRemoteSqlContent(_0x1098b5),'',{'dbName':_0x5e16b7}));if(await fileExists(_0x1eb99c)){const _0x246d3f=await readFile(_0x1eb99c,'utf8');if(!isEquivalentPulledSqlFile(_0x246d3f,_0x32f561,_0x55f700)){_0x49906a=!![];break;}}}if(_0x49906a){const _0x56a06f=await confirmForceOverwrite(_0x1c746a(0x157));if(!_0x56a06f)throw CliErrors[_0x1c746a(0x153)](_0x1c746a(0x16c));}}const _0x30c7ce=cloneSqlLockData(_0x47cd08),_0x378e99=_0x30c7ce['apps'][_0x5f30c6[_0x1c746a(0x193)]],_0xf2ba11=[],_0x362cba=[];for(const _0x3dfaea of _0x1dffd3){const _0x57e00a=_0x378e99['sqls'][_0x3dfaea[_0x1c746a(0x180)]],_0x4aa01a=ensureRemoteSqlContent(_0x3dfaea),_0x35fa3e=detectModeFromSql(_0x3dfaea),_0x41c87b=_0x3dfaea[_0x1c746a(0x167)]?await getDbName(_0x181621['appCode'],Number(_0x3dfaea['dbId']))['catch'](()=>undefined):undefined,_0x3a14d7=buildLocalSqlFileContent({'sqlCode':_0x3dfaea[_0x1c746a(0x180)],'sqlName':_0x3dfaea[_0x1c746a(0x164)],'dbId':_0x3dfaea[_0x1c746a(0x167)]},_0x4aa01a,{'dbName':_0x41c87b,'mode':_0x35fa3e,'syncedAt':new Date()[_0x1c746a(0x15c)](),'description':_0x3dfaea[_0x1c746a(0x16b)]}),_0x365f62=buildSqlLockEntry(_0x3dfaea,_0x4aa01a,computeSqlContentHash(_0x3a14d7),{'dbName':_0x41c87b}),_0x20a762=_0x365f62['path'],_0x4e8af6=join(_0x5f30c6[_0x1c746a(0x187)],_0x20a762);try{if(await fileExists(_0x4e8af6)){const _0xda69b6=await readFile(_0x4e8af6,'utf8');if(isEquivalentPulledSqlFile(_0xda69b6,_0x3a14d7,_0x35fa3e)){_0x362cba[_0x1c746a(0x174)]({'sqlCode':_0x3dfaea[_0x1c746a(0x180)],'reason':_0x1c746a(0x16d)}),_0x378e99[_0x1c746a(0x160)][_0x3dfaea[_0x1c746a(0x180)]]={..._0x365f62,'hash':computeSqlContentHash(_0xda69b6),'path':_0x20a762};continue;}if(!_0x431f9d){_0x362cba[_0x1c746a(0x174)]({'sqlCode':_0x3dfaea['sqlCode'],'reason':'local\x20differs\x20from\x20remote'});continue;}}const _0x1b45ed=_0x57e00a?.[_0x1c746a(0x184)]?join(_0x5f30c6[_0x1c746a(0x187)],_0x57e00a[_0x1c746a(0x184)]):undefined;_0x1b45ed&&_0x1b45ed!==_0x4e8af6&&await fileExists(_0x1b45ed)&&await rm(_0x1b45ed,{'force':!![]}),await ensureParentDirectory(_0x4e8af6),await writeFile(_0x4e8af6,_0x3a14d7,_0x1c746a(0x166)),_0x378e99[_0x1c746a(0x160)][_0x3dfaea[_0x1c746a(0x180)]]={..._0x365f62,'path':_0x20a762},_0xf2ba11[_0x1c746a(0x174)]({'sqlCode':_0x3dfaea[_0x1c746a(0x180)],'filePath':_0x4e8af6});}catch(_0x3c45f8){_0x4bb1f0[_0x1c746a(0x174)]({'sqlCode':_0x3dfaea[_0x1c746a(0x180)],'error':_0x3c45f8 instanceof Error?_0x3c45f8[_0x1c746a(0x170)]:String(_0x3c45f8)});}}return _0x378e99['lastSync']=new Date()[_0x1c746a(0x15c)](),await writeSqlLockFile(_0x5f30c6[_0x1c746a(0x17c)],_0x30c7ce),{'ok':_0x4bb1f0['length']===0x0,'data':{'pulled':_0xf2ba11,'skipped':_0x362cba,'failed':_0x4bb1f0},'message':_0x1c746a(0x183)+_0xf2ba11['length']+_0x1c746a(0x16a)+_0x362cba['length']+'\x20skipped,\x20'+_0x4bb1f0['length']+_0x1c746a(0x177)};}};function detectModeFromSql(_0x54eb9d){const _0x4327b7=a189_0x2d5f98,_0x565bd1=ensureRemoteSqlContent(_0x54eb9d),_0x26888d=stripLocalSqlMetadata(_0x565bd1,_0x4327b7(0x190))[_0x4327b7(0x181)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x26888d))return _0x4327b7(0x190);return _0x4327b7(0x18b);}function isEquivalentPulledSqlFile(_0x112a1d,_0x393278,_0x38f3a1){return normalizePullComparableContent(_0x112a1d,_0x38f3a1)===normalizePullComparableContent(_0x393278,_0x38f3a1);}function normalizePullComparableContent(_0x22ea52,_0x44ccab){const _0x12fd9b=a189_0x2d5f98,_0x7998ad=_0x22ea52[_0x12fd9b(0x17a)](/\r\n/g,'\x0a')[_0x12fd9b(0x176)]('\x0a'),_0x593a12=_0x7998ad[_0x12fd9b(0x18e)](_0x3c6b22=>!isSyncedAtMetadataLine(_0x3c6b22,_0x44ccab));return _0x593a12['join']('\x0a');}function isSyncedAtMetadataLine(_0x23bdb9,_0x37eac7){const _0x5da92b=a189_0x2d5f98;if(_0x37eac7===_0x5da92b(0x190))return/^\s*<!--\s*@lovrabet\.syncedAt:/['test'](_0x23bdb9);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x5da92b(0x15b)](_0x23bdb9);}
|
package/lib/commands/sql/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a182_0x4f2219=a182_0x210a;(function(_0x51b039,_0x221b5c){const _0x469f58=a182_0x210a,_0x2dd351=_0x51b039();while(!![]){try{const _0x34fe32=parseInt(_0x469f58(0x1e1))/0x1+parseInt(_0x469f58(0x1ef))/0x2+parseInt(_0x469f58(0x1de))/0x3+parseInt(_0x469f58(0x1fd))/0x4+parseInt(_0x469f58(0x1f9))/0x5*(parseInt(_0x469f58(0x1f3))/0x6)+-parseInt(_0x469f58(0x1dc))/0x7+-parseInt(_0x469f58(0x1dd))/0x8;if(_0x34fe32===_0x221b5c)break;else _0x2dd351['push'](_0x2dd351['shift']());}catch(_0x508fe0){_0x2dd351['push'](_0x2dd351['shift']());}}}(a182_0x22ac,0x57c15));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';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';function a182_0x22ac(){const _0x2ed6b8=['missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','sqls','\x22\x20for\x20sqlCode\x20','push','No\x20local\x20SQL\x20files\x20found.','toISOString','\x20SQL\x20file(s)','276732JPygif','filePath','\x20failed','lockFilePath','110226ZAsJcS','get','path','replace','relativePath','filter','15FZoJKe','Local\x20directory\x20\x22','sqlRoot','bool','1490956nRobkE','catch','map','\x20skipped,\x20','startsWith','sql','Push\x20local\x20SQL\x20files\x20to\x20remote','version','No\x20database\x20matches\x20local\x20directory\x20\x22','sqlcode','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','dbName','projectRoot','join','dbDirectory','sqlCode','force','dbId','entries','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','isFinite','exec','str','POST','high-risk-write','length','remoteId','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','/smartapi/custom/updateUserCustomSql','2517578UeGiOQ','4919088RhjmfM','514881XugPVJ','set','has','596140nzlAON','hash','validation','mode','lastSync','sqlName','appCode'];a182_0x22ac=function(){return _0x2ed6b8;};return a182_0x22ac();}function a182_0x210a(_0x840197,_0x4c99e0){_0x840197=_0x840197-0x1c1;const _0x22acee=a182_0x22ac();let _0x210a2f=_0x22acee[_0x840197];return _0x210a2f;}import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0xcde06c,_0x2d62bc,_0x33f371){const _0x5cc710=a182_0x210a,_0x380904=await scanLocalSqlQueries(_0xcde06c),_0x423b83=new Map();for(const _0x13a312 of _0x380904){if(_0x33f371&&_0x13a312[_0x5cc710(0x1ce)]!==_0x33f371)continue;const _0x3821ef=_0x423b83[_0x5cc710(0x1f4)](_0x13a312[_0x5cc710(0x1ce)])??[];_0x3821ef[_0x5cc710(0x1eb)](_0x13a312),_0x423b83[_0x5cc710(0x1df)](_0x13a312['sqlCode'],_0x3821ef);}if(_0x33f371&&!_0x423b83[_0x5cc710(0x1e0)](_0x33f371))throw CliErrors[_0x5cc710(0x1e3)]('Local\x20SQL\x20not\x20found:\x20'+_0x33f371);const _0x5db945=[];for(const [_0x10288b,_0x1bb3ef]of _0x423b83[_0x5cc710(0x1d1)]()){if(_0x1bb3ef[_0x5cc710(0x1d8)]===0x1){_0x5db945[_0x5cc710(0x1eb)](_0x1bb3ef[0x0]);continue;}const _0xd353c4=_0x2d62bc[_0x5cc710(0x1e9)][_0x10288b],_0x3060dd=_0xd353c4?.[_0x5cc710(0x1f5)],_0x2fabb0=_0x3060dd?_0x1bb3ef[_0x5cc710(0x1f8)](_0x274b8d=>_0x274b8d[_0x5cc710(0x1f7)]!==_0x3060dd):_0x1bb3ef;if(_0xd353c4&&_0x2fabb0[_0x5cc710(0x1d8)]===0x1){_0x5db945[_0x5cc710(0x1eb)](_0x2fabb0[0x0]);continue;}throw CliErrors[_0x5cc710(0x1e3)](_0x5cc710(0x1d2)+_0x10288b+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x5db945;}export const sqlPush={'service':a182_0x4f2219(0x1c4),'command':a182_0x4f2219(0x1eb),'description':a182_0x4f2219(0x1c5),'risk':a182_0x4f2219(0x1d7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a182_0x4f2219(0x1cf),'type':'boolean','description':a182_0x4f2219(0x1c9)}],async 'dryRun'(_0x58c411){const _0x69d1b2=a182_0x4f2219,_0x5cf90f=loadSqlProjectConfig(_0x58c411['appCode']),_0x53b167=await readSqlLockFile(_0x5cf90f[_0x69d1b2(0x1f2)]),{appLock:_0x5513cc}=ensureSqlLockScope(_0x53b167??createEmptySqlLock(),_0x58c411[_0x69d1b2(0x1e7)],_0x5cf90f['sqlRoot'],'push'),_0x2a6d61=await getTargetSqlQueries(_0x5cf90f,_0x5513cc,_0x58c411[_0x69d1b2(0x1d5)](_0x69d1b2(0x1c8))||undefined),_0x2e1f85=[];for(const _0x24b27a of _0x2a6d61){const _0x1ff7cc=await computeSqlFileHash(_0x24b27a[_0x69d1b2(0x1f0)]),_0x1cf9b4=_0x5513cc['sqls'][_0x24b27a['sqlCode']],_0x3d1bfe=!!_0x1cf9b4&&(_0x1cf9b4[_0x69d1b2(0x1f5)]!==_0x24b27a[_0x69d1b2(0x1f7)]||!!_0x24b27a[_0x69d1b2(0x1e6)]&&_0x1cf9b4[_0x69d1b2(0x1e6)]!==_0x24b27a['sqlName']);if(!_0x58c411[_0x69d1b2(0x1fc)](_0x69d1b2(0x1cf))&&_0x1cf9b4&&_0x1cf9b4[_0x69d1b2(0x1e2)]===_0x1ff7cc&&!_0x3d1bfe)continue;_0x2e1f85[_0x69d1b2(0x1eb)](_0x24b27a[_0x69d1b2(0x1ce)]);}return{'method':_0x69d1b2(0x1d6),'url':_0x69d1b2(0x1db),'body':{'sqlCodes':_0x2e1f85,'appCode':_0x58c411[_0x69d1b2(0x1e7)]},'description':'Would\x20push\x20'+_0x2e1f85[_0x69d1b2(0x1d8)]+_0x69d1b2(0x1ee)};},async 'execute'(_0x5320c1){const _0x24790e=a182_0x4f2219,_0x41a561=loadSqlProjectConfig(_0x5320c1[_0x24790e(0x1e7)]),_0x2efb6a=await readSqlLockFile(_0x41a561[_0x24790e(0x1f2)]),{lockData:_0x29c507,appLock:_0x31eb36}=ensureSqlLockScope(_0x2efb6a??createEmptySqlLock(),_0x5320c1['appCode'],_0x41a561[_0x24790e(0x1fb)],'push'),_0x59f9d8=await getTargetSqlQueries(_0x41a561,_0x31eb36,_0x5320c1[_0x24790e(0x1d5)](_0x24790e(0x1c8))||undefined);if(_0x59f9d8[_0x24790e(0x1d8)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x24790e(0x1ec)};const _0x4051bf=[],_0x1929ba=[],_0x32aa36=[];for(const _0x227b6f of _0x59f9d8){const _0x457869=_0x31eb36['sqls'][_0x227b6f[_0x24790e(0x1ce)]];if(!_0x457869){_0x32aa36['push']({'sqlCode':_0x227b6f['sqlCode'],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x44d859=await computeSqlFileHash(_0x227b6f[_0x24790e(0x1f0)]),_0x16b22a=_0x457869[_0x24790e(0x1f5)]!==_0x227b6f[_0x24790e(0x1f7)]||!!_0x227b6f[_0x24790e(0x1e6)]&&_0x457869[_0x24790e(0x1e6)]!==_0x227b6f[_0x24790e(0x1e6)];if(!_0x5320c1[_0x24790e(0x1fc)](_0x24790e(0x1cf))&&_0x457869[_0x24790e(0x1e2)]===_0x44d859&&!_0x16b22a){_0x1929ba[_0x24790e(0x1eb)]({'sqlCode':_0x227b6f[_0x24790e(0x1ce)],'reason':'unchanged'});continue;}if(_0x457869[_0x24790e(0x1c6)]==null){_0x32aa36[_0x24790e(0x1eb)]({'sqlCode':_0x227b6f['sqlCode'],'error':_0x24790e(0x1e8)});continue;}const _0x1622bd=await readFile(_0x227b6f[_0x24790e(0x1f0)],'utf8'),_0x49e104=stripLocalSqlMetadata(_0x1622bd,_0x227b6f[_0x24790e(0x1e4)]),_0x43328f=_0x227b6f[_0x24790e(0x1e6)]||_0x457869['sqlName'],_0xb32c58=await resolveTargetDbBinding(_0x5320c1[_0x24790e(0x1e7)],_0x227b6f,_0x457869),_0x328490=await updateSqlQuery({'id':_0x457869[_0x24790e(0x1d9)],'appCode':_0x5320c1[_0x24790e(0x1e7)],'sqlCode':_0x227b6f['sqlCode'],'sqlName':_0x43328f,'dbId':_0xb32c58['dbId'],'version':_0x457869[_0x24790e(0x1c6)],'sqlContent':_0x49e104,'sqlConfig':_0x457869['sqlConfig']??undefined}),_0x43abf7=_0x328490[_0x24790e(0x1d0)]?await getDbName(_0x5320c1[_0x24790e(0x1e7)],Number(_0x328490[_0x24790e(0x1d0)]))[_0x24790e(0x1fe)](()=>_0xb32c58[_0x24790e(0x1ca)]):_0xb32c58['dbName'];_0x31eb36['sqls'][_0x227b6f[_0x24790e(0x1ce)]]={...buildSqlLockEntry(_0x328490,_0x49e104,_0x44d859,{'dbName':_0x43abf7}),'path':_0x227b6f[_0x24790e(0x1f7)],'mode':_0x457869[_0x24790e(0x1e4)]},await archivePreviousSqlFileIfNeeded(_0x41a561,_0x457869[_0x24790e(0x1f5)],_0x227b6f[_0x24790e(0x1f7)]),_0x4051bf[_0x24790e(0x1eb)]({'sqlCode':_0x227b6f[_0x24790e(0x1ce)],'remoteId':_0x457869[_0x24790e(0x1d9)]});}catch(_0x190f64){_0x32aa36['push']({'sqlCode':_0x227b6f[_0x24790e(0x1ce)],'error':_0x190f64 instanceof Error?_0x190f64['message']:String(_0x190f64)});}}return _0x31eb36[_0x24790e(0x1e5)]=new Date()[_0x24790e(0x1ed)](),await writeSqlLockFile(_0x41a561[_0x24790e(0x1f2)],_0x29c507),{'ok':_0x32aa36['length']===0x0,'data':{'pushed':_0x4051bf,'skipped':_0x1929ba,'failed':_0x32aa36},'message':'Push\x20complete:\x20'+_0x4051bf['length']+'\x20pushed,\x20'+_0x1929ba[_0x24790e(0x1d8)]+_0x24790e(0x1c2)+_0x32aa36['length']+_0x24790e(0x1f1)};}};async function archivePreviousSqlFileIfNeeded(_0x259b58,_0x561b17,_0x2e9fd2){const _0x1e64a3=a182_0x4f2219;if(!_0x561b17||_0x561b17===_0x2e9fd2)return;const _0x3184ca=join(_0x259b58['sqlRootDir'],_0x561b17);if(!await fileExists(_0x3184ca))return;const _0x27ed2e=await moveToTrash(_0x259b58[_0x1e64a3(0x1cb)],_0x259b58['trashDir'],_0x3184ca);await cleanupEmptyDirectories(dirname(_0x3184ca),_0x259b58['sqlRootDir']),void _0x27ed2e;}async function moveToTrash(_0x47d122,_0x422b6e,_0x1b0977){const _0x570c00=a182_0x4f2219,_0x44696b=new Date()[_0x570c00(0x1ed)]()[_0x570c00(0x1f6)](/[:.]/g,'-'),_0x146393=relative(_0x47d122,_0x1b0977),_0x45c2e3=join(_0x422b6e,_0x44696b,_0x146393);return await mkdir(dirname(_0x45c2e3),{'recursive':!![]}),await rename(_0x1b0977,_0x45c2e3),_0x45c2e3;}async function cleanupEmptyDirectories(_0x34f659,_0x458779){const _0x490270=a182_0x4f2219;let _0x425889=resolve(_0x34f659);const _0x15f70d=resolve(_0x458779);while(_0x425889[_0x490270(0x1c3)](''+_0x15f70d+sep)||_0x425889===_0x15f70d){if(_0x425889===_0x15f70d)return;try{const _0x561dc1=await readdir(_0x425889);if(_0x561dc1[_0x490270(0x1d8)]>0x0)return;await rmdir(_0x425889);}catch{return;}_0x425889=dirname(_0x425889);}}async function resolveTargetDbBinding(_0x2e91f8,_0x135176,_0x2ece2c){const _0x411d13=a182_0x4f2219,_0x13ea93=_0x135176[_0x411d13(0x1cd)];if(!_0x13ea93)return{'dbId':_0x2ece2c['dbId'],'dbName':_0x2ece2c[_0x411d13(0x1ca)]};const _0x4057c0=buildDbDirectoryName(_0x2ece2c[_0x411d13(0x1ca)],_0x2ece2c['dbId']);if(_0x13ea93===_0x4057c0)return{'dbId':_0x2ece2c[_0x411d13(0x1d0)],'dbName':_0x2ece2c[_0x411d13(0x1ca)]};const _0x2dfbbb=parseExplicitDbDirectory(_0x13ea93);if(_0x2dfbbb!=null)return{'dbId':_0x2dfbbb,'dbName':await getDbName(_0x2e91f8,_0x2dfbbb)['catch'](()=>undefined)};const _0x4a5760=await listDatabases(_0x2e91f8),_0x5646df=_0x4a5760[_0x411d13(0x1f8)](_0x5c0253=>buildDbDirectoryName(_0x5c0253['dbName'],_0x5c0253['dbId'])===_0x13ea93);if(_0x5646df[_0x411d13(0x1d8)]===0x1)return{'dbId':_0x5646df[0x0][_0x411d13(0x1d0)],'dbName':_0x5646df[0x0][_0x411d13(0x1ca)]};if(_0x5646df['length']===0x0)throw CliErrors['validation'](_0x411d13(0x1c7)+_0x13ea93+_0x411d13(0x1ea)+_0x135176[_0x411d13(0x1ce)]+'.');const _0x589524=_0x5646df[_0x411d13(0x1c1)](_0x123463=>_0x123463[_0x411d13(0x1ca)]+'\x20('+_0x123463[_0x411d13(0x1d0)]+')')[_0x411d13(0x1cc)](',\x20');throw CliErrors['validation'](_0x411d13(0x1fa)+_0x13ea93+_0x411d13(0x1da)+_0x135176[_0x411d13(0x1ce)]+':\x20'+_0x589524);}function parseExplicitDbDirectory(_0xea33ca){const _0x48cc0f=a182_0x4f2219,_0x15d23e=/^db-(\d+)$/[_0x48cc0f(0x1d4)](_0xea33ca);if(!_0x15d23e)return null;const _0x52fef9=Number(_0x15d23e[0x1]);return Number[_0x48cc0f(0x1d3)](_0x52fef9)&&_0x52fef9>0x0?_0x52fef9:null;}
|
|
1
|
+
const a190_0x1bb135=a190_0x2b71;(function(_0x245ed6,_0x54f779){const _0x406589=a190_0x2b71,_0x4d503e=_0x245ed6();while(!![]){try{const _0x347af3=-parseInt(_0x406589(0xac))/0x1+-parseInt(_0x406589(0x89))/0x2*(-parseInt(_0x406589(0x9e))/0x3)+-parseInt(_0x406589(0x79))/0x4*(-parseInt(_0x406589(0x82))/0x5)+-parseInt(_0x406589(0x91))/0x6+parseInt(_0x406589(0x9c))/0x7*(-parseInt(_0x406589(0x93))/0x8)+parseInt(_0x406589(0x94))/0x9*(-parseInt(_0x406589(0xa1))/0xa)+-parseInt(_0x406589(0x72))/0xb*(-parseInt(_0x406589(0xb2))/0xc);if(_0x347af3===_0x54f779)break;else _0x4d503e['push'](_0x4d503e['shift']());}catch(_0x5e8739){_0x4d503e['push'](_0x4d503e['shift']());}}}(a190_0x1c77,0x36834));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';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';function a190_0x1c77(){const _0x290448=['appCode','5cWjeNC','toISOString','\x20SQL\x20file(s)','sqlRootDir','sqlConfig','sqlcode','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','2IDNoZW','relativePath','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','sqlRoot','bool','filePath','Push\x20local\x20SQL\x20files\x20to\x20remote','sql','1653126VIdFkU','/smartapi/custom/updateUserCustomSql','1511216fuggZM','140949TKwHOO','map','filter','str','mode','has','boolean','Would\x20push\x20','14NYdlrV','remoteId','465783TKSMAb','version','No\x20local\x20SQL\x20files\x20found.','190DLRaoC','push','isFinite','unchanged','trashDir','path','force','POST','sqlName','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','length','386219ThfuOr','\x20skipped,\x20','utf8','dbDirectory','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','high-risk-write','5676eZzoAc','validation','replace','lockFilePath','27753dbNafd','lastSync','catch','hash','Local\x20SQL\x20not\x20found:\x20','startsWith','\x20pushed,\x20','846988rZWdge','Local\x20directory\x20\x22','\x20failed','set','sqls','dbId','dbName','sqlCode'];a190_0x1c77=function(){return _0x290448;};return a190_0x1c77();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a190_0x2b71(_0x5a32a,_0x4254cf){_0x5a32a=_0x5a32a-0x72;const _0x1c7755=a190_0x1c77();let _0x2b7164=_0x1c7755[_0x5a32a];return _0x2b7164;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x5ef01d,_0x222b0e,_0x4a8fd6){const _0x4f0e30=a190_0x2b71,_0x2e2b5d=await scanLocalSqlQueries(_0x5ef01d),_0x112b05=new Map();for(const _0x3b232a of _0x2e2b5d){if(_0x4a8fd6&&_0x3b232a[_0x4f0e30(0x80)]!==_0x4a8fd6)continue;const _0x504c0f=_0x112b05['get'](_0x3b232a[_0x4f0e30(0x80)])??[];_0x504c0f[_0x4f0e30(0xa2)](_0x3b232a),_0x112b05[_0x4f0e30(0x7c)](_0x3b232a[_0x4f0e30(0x80)],_0x504c0f);}if(_0x4a8fd6&&!_0x112b05[_0x4f0e30(0x99)](_0x4a8fd6))throw CliErrors['validation'](_0x4f0e30(0x76)+_0x4a8fd6);const _0x52706f=[];for(const [_0x17d4e1,_0x2336c4]of _0x112b05['entries']()){if(_0x2336c4[_0x4f0e30(0xab)]===0x1){_0x52706f[_0x4f0e30(0xa2)](_0x2336c4[0x0]);continue;}const _0x29f2ab=_0x222b0e[_0x4f0e30(0x7d)][_0x17d4e1],_0x1978db=_0x29f2ab?.[_0x4f0e30(0xa6)],_0x67c8fa=_0x1978db?_0x2336c4[_0x4f0e30(0x96)](_0x439f5e=>_0x439f5e[_0x4f0e30(0x8a)]!==_0x1978db):_0x2336c4;if(_0x29f2ab&&_0x67c8fa[_0x4f0e30(0xab)]===0x1){_0x52706f[_0x4f0e30(0xa2)](_0x67c8fa[0x0]);continue;}throw CliErrors[_0x4f0e30(0xb3)](_0x4f0e30(0xb0)+_0x17d4e1+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x52706f;}export const sqlPush={'service':a190_0x1bb135(0x90),'command':a190_0x1bb135(0xa2),'description':a190_0x1bb135(0x8f),'risk':a190_0x1bb135(0xb1),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a190_0x1bb135(0x9a),'description':a190_0x1bb135(0xaa)}],async 'dryRun'(_0x360dc3){const _0x5701ed=a190_0x1bb135,_0x1862b1=loadSqlProjectConfig(_0x360dc3[_0x5701ed(0x81)]),_0x1dc825=await readSqlLockFile(_0x1862b1['lockFilePath']),{appLock:_0x5df814}=ensureSqlLockScope(_0x1dc825??createEmptySqlLock(),_0x360dc3[_0x5701ed(0x81)],_0x1862b1[_0x5701ed(0x8c)],_0x5701ed(0xa2)),_0x279ae6=await getTargetSqlQueries(_0x1862b1,_0x5df814,_0x360dc3[_0x5701ed(0x97)](_0x5701ed(0x87))||undefined),_0x9917b3=[];for(const _0x56c858 of _0x279ae6){const _0x121965=await computeSqlFileHash(_0x56c858[_0x5701ed(0x8e)]),_0x56bd6f=_0x5df814['sqls'][_0x56c858[_0x5701ed(0x80)]],_0x2de240=!!_0x56bd6f&&(_0x56bd6f[_0x5701ed(0xa6)]!==_0x56c858[_0x5701ed(0x8a)]||!!_0x56c858['sqlName']&&_0x56bd6f[_0x5701ed(0xa9)]!==_0x56c858[_0x5701ed(0xa9)]);if(!_0x360dc3[_0x5701ed(0x8d)](_0x5701ed(0xa7))&&_0x56bd6f&&_0x56bd6f[_0x5701ed(0x75)]===_0x121965&&!_0x2de240)continue;_0x9917b3[_0x5701ed(0xa2)](_0x56c858['sqlCode']);}return{'method':_0x5701ed(0xa8),'url':_0x5701ed(0x92),'body':{'sqlCodes':_0x9917b3,'appCode':_0x360dc3[_0x5701ed(0x81)]},'description':_0x5701ed(0x9b)+_0x9917b3['length']+_0x5701ed(0x84)};},async 'execute'(_0x2568d1){const _0x542c4a=a190_0x1bb135,_0x188270=loadSqlProjectConfig(_0x2568d1[_0x542c4a(0x81)]),_0x596655=await readSqlLockFile(_0x188270[_0x542c4a(0xb5)]),{lockData:_0x39bdca,appLock:_0xec7e8}=ensureSqlLockScope(_0x596655??createEmptySqlLock(),_0x2568d1[_0x542c4a(0x81)],_0x188270[_0x542c4a(0x8c)],'push'),_0x56ea0b=await getTargetSqlQueries(_0x188270,_0xec7e8,_0x2568d1[_0x542c4a(0x97)](_0x542c4a(0x87))||undefined);if(_0x56ea0b[_0x542c4a(0xab)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x542c4a(0xa0)};const _0x221662=[],_0x34ec37=[],_0x91f347=[];for(const _0x2ca378 of _0x56ea0b){const _0x227cb9=_0xec7e8[_0x542c4a(0x7d)][_0x2ca378[_0x542c4a(0x80)]];if(!_0x227cb9){_0x91f347['push']({'sqlCode':_0x2ca378[_0x542c4a(0x80)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x3ce002=await computeSqlFileHash(_0x2ca378[_0x542c4a(0x8e)]),_0x1aaa52=_0x227cb9['path']!==_0x2ca378[_0x542c4a(0x8a)]||!!_0x2ca378[_0x542c4a(0xa9)]&&_0x227cb9[_0x542c4a(0xa9)]!==_0x2ca378[_0x542c4a(0xa9)];if(!_0x2568d1[_0x542c4a(0x8d)](_0x542c4a(0xa7))&&_0x227cb9[_0x542c4a(0x75)]===_0x3ce002&&!_0x1aaa52){_0x34ec37['push']({'sqlCode':_0x2ca378[_0x542c4a(0x80)],'reason':_0x542c4a(0xa4)});continue;}if(_0x227cb9[_0x542c4a(0x9f)]==null){_0x91f347[_0x542c4a(0xa2)]({'sqlCode':_0x2ca378[_0x542c4a(0x80)],'error':_0x542c4a(0x8b)});continue;}const _0xc042f6=await readFile(_0x2ca378['filePath'],_0x542c4a(0xae)),_0x3d0d1b=stripLocalSqlMetadata(_0xc042f6,_0x2ca378[_0x542c4a(0x98)]),_0x80d46e=_0x2ca378[_0x542c4a(0xa9)]||_0x227cb9[_0x542c4a(0xa9)],_0x293ddf=await resolveTargetDbBinding(_0x2568d1[_0x542c4a(0x81)],_0x2ca378,_0x227cb9),_0x4604e9=await updateSqlQuery({'id':_0x227cb9[_0x542c4a(0x9d)],'appCode':_0x2568d1[_0x542c4a(0x81)],'sqlCode':_0x2ca378[_0x542c4a(0x80)],'sqlName':_0x80d46e,'dbId':_0x293ddf[_0x542c4a(0x7e)],'version':_0x227cb9[_0x542c4a(0x9f)],'sqlContent':_0x3d0d1b,'sqlConfig':_0x227cb9[_0x542c4a(0x86)]??undefined}),_0x5ea742=_0x4604e9[_0x542c4a(0x7e)]?await getDbName(_0x2568d1[_0x542c4a(0x81)],Number(_0x4604e9[_0x542c4a(0x7e)]))[_0x542c4a(0x74)](()=>_0x293ddf[_0x542c4a(0x7f)]):_0x293ddf['dbName'];_0xec7e8['sqls'][_0x2ca378[_0x542c4a(0x80)]]={...buildSqlLockEntry(_0x4604e9,_0x3d0d1b,_0x3ce002,{'dbName':_0x5ea742}),'path':_0x2ca378[_0x542c4a(0x8a)],'mode':_0x227cb9[_0x542c4a(0x98)]},await archivePreviousSqlFileIfNeeded(_0x188270,_0x227cb9[_0x542c4a(0xa6)],_0x2ca378['relativePath']),_0x221662[_0x542c4a(0xa2)]({'sqlCode':_0x2ca378['sqlCode'],'remoteId':_0x227cb9[_0x542c4a(0x9d)]});}catch(_0x147bc3){_0x91f347[_0x542c4a(0xa2)]({'sqlCode':_0x2ca378[_0x542c4a(0x80)],'error':_0x147bc3 instanceof Error?_0x147bc3['message']:String(_0x147bc3)});}}return _0xec7e8[_0x542c4a(0x73)]=new Date()[_0x542c4a(0x83)](),await writeSqlLockFile(_0x188270[_0x542c4a(0xb5)],_0x39bdca),{'ok':_0x91f347[_0x542c4a(0xab)]===0x0,'data':{'pushed':_0x221662,'skipped':_0x34ec37,'failed':_0x91f347},'message':'Push\x20complete:\x20'+_0x221662[_0x542c4a(0xab)]+_0x542c4a(0x78)+_0x34ec37[_0x542c4a(0xab)]+_0x542c4a(0xad)+_0x91f347[_0x542c4a(0xab)]+_0x542c4a(0x7b)};}};async function archivePreviousSqlFileIfNeeded(_0x37ab6d,_0x2579bf,_0x1488dc){const _0x3822f5=a190_0x1bb135;if(!_0x2579bf||_0x2579bf===_0x1488dc)return;const _0x117eb0=join(_0x37ab6d[_0x3822f5(0x85)],_0x2579bf);if(!await fileExists(_0x117eb0))return;const _0x3cec28=await moveToTrash(_0x37ab6d['projectRoot'],_0x37ab6d[_0x3822f5(0xa5)],_0x117eb0);await cleanupEmptyDirectories(dirname(_0x117eb0),_0x37ab6d['sqlRootDir']),void _0x3cec28;}async function moveToTrash(_0x54d3cf,_0x489b10,_0x574896){const _0x389e2e=a190_0x1bb135,_0x58df9e=new Date()['toISOString']()[_0x389e2e(0xb4)](/[:.]/g,'-'),_0x144cb8=relative(_0x54d3cf,_0x574896),_0xa8d56=join(_0x489b10,_0x58df9e,_0x144cb8);return await mkdir(dirname(_0xa8d56),{'recursive':!![]}),await rename(_0x574896,_0xa8d56),_0xa8d56;}async function cleanupEmptyDirectories(_0x34a382,_0x348a7a){const _0x4e2099=a190_0x1bb135;let _0x3fddcd=resolve(_0x34a382);const _0x3bd43e=resolve(_0x348a7a);while(_0x3fddcd[_0x4e2099(0x77)](''+_0x3bd43e+sep)||_0x3fddcd===_0x3bd43e){if(_0x3fddcd===_0x3bd43e)return;try{const _0x17b35e=await readdir(_0x3fddcd);if(_0x17b35e['length']>0x0)return;await rmdir(_0x3fddcd);}catch{return;}_0x3fddcd=dirname(_0x3fddcd);}}async function resolveTargetDbBinding(_0x482b97,_0x34794,_0x457587){const _0x4da4d1=a190_0x1bb135,_0x966277=_0x34794[_0x4da4d1(0xaf)];if(!_0x966277)return{'dbId':_0x457587['dbId'],'dbName':_0x457587[_0x4da4d1(0x7f)]};const _0x592f03=buildDbDirectoryName(_0x457587[_0x4da4d1(0x7f)],_0x457587[_0x4da4d1(0x7e)]);if(_0x966277===_0x592f03)return{'dbId':_0x457587['dbId'],'dbName':_0x457587['dbName']};const _0x57c1a9=parseExplicitDbDirectory(_0x966277);if(_0x57c1a9!=null)return{'dbId':_0x57c1a9,'dbName':await getDbName(_0x482b97,_0x57c1a9)[_0x4da4d1(0x74)](()=>undefined)};const _0x4d0014=await listDatabases(_0x482b97),_0x2cd826=_0x4d0014[_0x4da4d1(0x96)](_0xaa90f1=>buildDbDirectoryName(_0xaa90f1[_0x4da4d1(0x7f)],_0xaa90f1['dbId'])===_0x966277);if(_0x2cd826[_0x4da4d1(0xab)]===0x1)return{'dbId':_0x2cd826[0x0][_0x4da4d1(0x7e)],'dbName':_0x2cd826[0x0][_0x4da4d1(0x7f)]};if(_0x2cd826['length']===0x0)throw CliErrors[_0x4da4d1(0xb3)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x966277+'\x22\x20for\x20sqlCode\x20'+_0x34794['sqlCode']+'.');const _0x1e90ea=_0x2cd826[_0x4da4d1(0x95)](_0x2a27ab=>_0x2a27ab[_0x4da4d1(0x7f)]+'\x20('+_0x2a27ab[_0x4da4d1(0x7e)]+')')['join'](',\x20');throw CliErrors['validation'](_0x4da4d1(0x7a)+_0x966277+_0x4da4d1(0x88)+_0x34794['sqlCode']+':\x20'+_0x1e90ea);}function parseExplicitDbDirectory(_0x3ef908){const _0x7fb085=a190_0x1bb135,_0x338835=/^db-(\d+)$/['exec'](_0x3ef908);if(!_0x338835)return null;const _0xadb2ab=Number(_0x338835[0x1]);return Number[_0x7fb085(0xa3)](_0xadb2ab)&&_0xadb2ab>0x0?_0xadb2ab:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0xd8a501=a191_0x5d1d;(function(_0x13fee3,_0x2aefa8){const _0x371930=a191_0x5d1d,_0x1ecf87=_0x13fee3();while(!![]){try{const _0x36d91e=-parseInt(_0x371930(0xfe))/0x1+-parseInt(_0x371930(0x114))/0x2*(-parseInt(_0x371930(0xfc))/0x3)+-parseInt(_0x371930(0xff))/0x4+parseInt(_0x371930(0xf6))/0x5+parseInt(_0x371930(0xf0))/0x6+-parseInt(_0x371930(0x100))/0x7*(parseInt(_0x371930(0xf9))/0x8)+-parseInt(_0x371930(0xea))/0x9*(-parseInt(_0x371930(0x102))/0xa);if(_0x36d91e===_0x2aefa8)break;else _0x1ecf87['push'](_0x1ecf87['shift']());}catch(_0x41a5bf){_0x1ecf87['push'](_0x1ecf87['shift']());}}}(a191_0x6d93,0x6547d));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=a191_0xd8a501(0xee);export function buildSqlLockEntry(_0x349c65,_0x514c7f,_0x2c43ef,_0x23e39c){const _0x55aa1c=a191_0xd8a501,_0x560198=detectSqlMode(_0x514c7f);return{'path':buildSqlRelativePath(_0x349c65[_0x55aa1c(0xec)],_0x349c65[_0x55aa1c(0x10d)],_0x23e39c?.['dbName'],_0x560198,_0x349c65[_0x55aa1c(0xf3)]),'hash':_0x2c43ef,'remoteId':_0x349c65['id'],'version':_0x349c65[_0x55aa1c(0xed)],'dbId':Number(_0x349c65['dbId']),'dbName':_0x23e39c?.[_0x55aa1c(0xfa)],'sqlName':_0x349c65[_0x55aa1c(0x10d)],'sqlConfig':_0x349c65['sqlConfig']??undefined,'mode':_0x560198};}function a191_0x5d1d(_0x2844fa,_0x50ae35){_0x2844fa=_0x2844fa-0xe6;const _0x6d9345=a191_0x6d93();let _0x5d1d17=_0x6d9345[_0x2844fa];return _0x5d1d17;}export function cloneSqlLockData(_0x1d56f0){const _0x332adb=a191_0xd8a501;return{'apps':Object[_0x332adb(0x112)](Object[_0x332adb(0xf1)](_0x1d56f0['apps'])[_0x332adb(0x101)](([_0x59dee3,_0x1cdc80])=>[_0x59dee3,{'sqlRoot':_0x1cdc80[_0x332adb(0x111)],'lastSync':_0x1cdc80['lastSync'],'sqls':{..._0x1cdc80[_0x332adb(0xfb)]}}]))};}export function ensureRemoteSqlContent(_0x1aa803){const _0x5816ea=a191_0xd8a501;return _0x1aa803[_0x5816ea(0x109)]??'';}export function buildLocalSqlFileContent(_0x2ab7f4,_0x32a72c,_0x3ceac9){const _0x2282a8=a191_0xd8a501,_0x526975=_0x3ceac9?.[_0x2282a8(0xfd)]??detectSqlMode(_0x32a72c),_0x55074e=stripLocalSqlMetadata(_0x32a72c,_0x526975)[_0x2282a8(0xf2)](),_0x551cce=[...buildMetadataHeaderLines({'sqlCode':_0x2ab7f4[_0x2282a8(0xec)],'sqlName':_0x2ab7f4[_0x2282a8(0x10d)],'dbId':_0x2ab7f4['dbId'],'dbName':_0x3ceac9?.[_0x2282a8(0xfa)],'mode':_0x526975,'syncedAt':_0x3ceac9?.[_0x2282a8(0x105)],'description':_0x3ceac9?.[_0x2282a8(0xeb)]},_0x526975),'',_0x55074e],_0x1b100c=_0x551cce['join']('\x0a');return _0x1b100c[_0x2282a8(0xf5)]('\x0a')?_0x1b100c:_0x1b100c+'\x0a';}export function stripLocalSqlMetadata(_0x218bc8,_0x3333c0){const _0x5bf7b9=a191_0xd8a501,_0x5ee736=_0x218bc8[_0x5bf7b9(0x113)](/\r\n/g,'\x0a')[_0x5bf7b9(0xf4)]('\x0a'),_0x278358=[];let _0x38c324=0x0;if(_0x3333c0===_0x5bf7b9(0x104))while(_0x38c324<_0x5ee736[_0x5bf7b9(0x10e)]){const _0x4c10b8=_0x5ee736[_0x38c324]??'';if(/^\s*<!--\s*@lovrabet\./[_0x5bf7b9(0x108)](_0x4c10b8)){_0x38c324++;continue;}if(_0x4c10b8[_0x5bf7b9(0xf2)]()===''&&_0x38c324>0x0){_0x38c324++;continue;}break;}else while(_0x38c324<_0x5ee736[_0x5bf7b9(0x10e)]){const _0x3671ee=_0x5ee736[_0x38c324]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x3671ee)){_0x38c324++;continue;}if(_0x3671ee[_0x5bf7b9(0xf2)]()===''&&_0x38c324>0x0){_0x38c324++;continue;}break;}for(;_0x38c324<_0x5ee736[_0x5bf7b9(0x10e)];_0x38c324++){_0x278358['push'](_0x5ee736[_0x38c324]);}return _0x278358[_0x5bf7b9(0xe8)]('\x0a')[_0x5bf7b9(0xf7)]();}export function resolveSqlMode(_0x213570,_0x4b81c3){const _0x4ad379=a191_0xd8a501;if(_0x4b81c3?.[_0x4ad379(0xfd)])return _0x4b81c3[_0x4ad379(0xfd)];return detectSqlMode(_0x213570);}export function resolveSqlFileName(_0x4b71b7,_0x27bfce,_0x33fc93){const _0xdf2df5=a191_0xd8a501;if(_0x33fc93?.[_0xdf2df5(0xe6)])return _0x33fc93['path'];if(_0x33fc93?.[_0xdf2df5(0x10d)]||_0x33fc93?.[_0xdf2df5(0xfa)])return buildSqlRelativePath(_0x4b71b7,_0x33fc93?.[_0xdf2df5(0x10d)],_0x33fc93?.[_0xdf2df5(0xfa)],resolveSqlMode(_0x27bfce,_0x33fc93),_0x33fc93?.['dbId']);return buildDefaultSqlFileName(_0x4b71b7,resolveSqlMode(_0x27bfce,_0x33fc93));}function a191_0x6d93(){const _0xc97956=['<!--\x20@lovrabet.','close','sqlName','length','\x20-->','stderr','sqlRoot','fromEntries','replace','620DZXyWi','path','includes','join','\x20[y/N]\x20','7929eUShEm','description','sqlCode','version','.rabetbase/sql','filter','2005830cIJhTR','entries','trim','dbId','split','endsWith','557930ZZpnXn','trimStart','apps','459128VjLEhj','dbName','sqls','4974eXDwbS','mode','32231LvLCtG','2540008tCjahe','14lAbofG','map','2690NPreos','toLowerCase','mybatisXml','syncedAt','yes','stdin','test','sqlContent','question'];a191_0x6d93=function(){return _0xc97956;};return a191_0x6d93();}export function resolveSqlLocalDir(_0x4b7654,_0x8c2cc5){return join(_0x4b7654,SQL_LOCAL_REL_DIR,_0x8c2cc5);}export async function confirmForceOverwrite(_0x5700b8){const _0x426bde=a191_0xd8a501,_0xada2ba=createInterface({'input':process[_0x426bde(0x107)],'output':process[_0x426bde(0x110)]}),_0x55c2b9=await new Promise(_0x264792=>{const _0x139559=_0x426bde;_0xada2ba[_0x139559(0x10a)](_0x5700b8+_0x139559(0xe9),_0x264792);});return _0xada2ba[_0x426bde(0x10c)](),['y',_0x426bde(0x106)][_0x426bde(0xe7)](_0x55c2b9[_0x426bde(0xf2)]()[_0x426bde(0x103)]());}export function findSqlLockScope(_0x46dc9f,_0x5c6831){const _0x1d9abb=a191_0xd8a501;return _0x46dc9f[_0x1d9abb(0xf8)][_0x5c6831];}function buildMetadataHeaderLines(_0x4dab08,_0x45c244){const _0x1fa68a=a191_0xd8a501,_0x43ed8f=[[_0x1fa68a(0xec),_0x4dab08[_0x1fa68a(0xec)]],[_0x1fa68a(0x10d),_0x4dab08[_0x1fa68a(0x10d)]],[_0x1fa68a(0xf3),_0x4dab08[_0x1fa68a(0xf3)]],['dbName',_0x4dab08[_0x1fa68a(0xfa)]],[_0x1fa68a(0xfd),_0x4dab08[_0x1fa68a(0xfd)]],[_0x1fa68a(0x105),_0x4dab08['syncedAt']],[_0x1fa68a(0xeb),_0x4dab08[_0x1fa68a(0xeb)]]];if(_0x45c244===_0x1fa68a(0x104))return _0x43ed8f[_0x1fa68a(0xef)](([,_0x42de22])=>_0x42de22!==undefined&&_0x42de22!==null&&String(_0x42de22)[_0x1fa68a(0xf2)]()!=='')[_0x1fa68a(0x101)](([_0x1ec357,_0x1df5c7])=>_0x1fa68a(0x10b)+_0x1ec357+':\x20'+String(_0x1df5c7)+_0x1fa68a(0x10f));return _0x43ed8f['filter'](([,_0x5cd273])=>_0x5cd273!==undefined&&_0x5cd273!==null&&String(_0x5cd273)[_0x1fa68a(0xf2)]()!=='')[_0x1fa68a(0x101)](([_0x50ca41,_0x5d24ad])=>'--\x20@lovrabet.'+_0x50ca41+':\x20'+String(_0x5d24ad));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a192_0x32f9(){const _0x589765=['has','380kydDon','filePath','299595fHDpdi','\x20added,\x20','status','9VsQcmP','lockKey','\x20missing,\x20','totalCount','sqls','bool','\x20remote-only','sqlName','3ckipiC','784398xzlVkg','hash','map','60vBiJGq','lockFilePath','remote','5011936oIEzLA','31748160fGaatK','2299498lvdSwO','sqlCode','length','relativePath','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','push','sqlRoot','boolean','648632gJhYWK','appCode','180532CdrgIU','14MqHtYm','path','sql','keys','\x20unchanged','read'];a192_0x32f9=function(){return _0x589765;};return a192_0x32f9();}const a192_0x24fe57=a192_0x5e9d;(function(_0x389710,_0x244b4d){const _0x1920df=a192_0x5e9d,_0x53c292=_0x389710();while(!![]){try{const _0x81e93d=parseInt(_0x1920df(0x106))/0x1+-parseInt(_0x1920df(0xfe))/0x2*(parseInt(_0x1920df(0xf5))/0x3)+parseInt(_0x1920df(0xf9))/0x4*(-parseInt(_0x1920df(0xea))/0x5)+-parseInt(_0x1920df(0xf6))/0x6*(parseInt(_0x1920df(0x109))/0x7)+parseInt(_0x1920df(0xfc))/0x8*(-parseInt(_0x1920df(0xed))/0x9)+-parseInt(_0x1920df(0xe8))/0xa*(-parseInt(_0x1920df(0x108))/0xb)+parseInt(_0x1920df(0xfd))/0xc;if(_0x81e93d===_0x244b4d)break;else _0x53c292['push'](_0x53c292['shift']());}catch(_0x1b3dd9){_0x53c292['push'](_0x53c292['shift']());}}}(a192_0x32f9,0xef9e4));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';function a192_0x5e9d(_0x1e6883,_0x3c052d){_0x1e6883=_0x1e6883-0xe5;const _0x32f936=a192_0x32f9();let _0x5e9d1f=_0x32f936[_0x1e6883];return _0x5e9d1f;}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x51c45e){const _0x1de4d0=a192_0x5e9d,_0x4d8cf7=[];let _0x4f9f2e=0x1;while(!![]){const _0x39d734=await listSqlQueries(_0x51c45e,{'currentPage':_0x4f9f2e,'pageSize':PAGE_SIZE}),_0xf7eeec=_0x39d734['tableData']??[];_0x4d8cf7[_0x1de4d0(0x103)](..._0xf7eeec['map'](_0x2e7211=>_0x2e7211[_0x1de4d0(0xff)]));if(_0xf7eeec[_0x1de4d0(0x100)]===0x0)break;const _0x18cb70=_0x39d734['paging']?.[_0x1de4d0(0xf0)];if(_0x18cb70!=null?_0x4d8cf7[_0x1de4d0(0x100)]>=_0x18cb70:_0xf7eeec['length']<PAGE_SIZE)break;_0x4f9f2e++;}return _0x4d8cf7;}export const sqlStatus={'service':a192_0x24fe57(0x10b),'command':a192_0x24fe57(0xec),'description':a192_0x24fe57(0x102),'risk':a192_0x24fe57(0xe6),'flags':[{'name':a192_0x24fe57(0xfb),'type':a192_0x24fe57(0x105),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x2c83e7){const _0x4e0bd7=a192_0x24fe57,_0x48908a=loadSqlProjectConfig(_0x2c83e7['appCode']),_0x5c3ea7=await readSqlLockFile(_0x48908a[_0x4e0bd7(0xfa)]),{appLock:_0x2a711b}=ensureSqlLockScope(_0x5c3ea7??createEmptySqlLock(),_0x48908a[_0x4e0bd7(0x107)],_0x48908a[_0x4e0bd7(0x104)],_0x4e0bd7(0xec)),_0x132d40=await scanLocalSqlQueries(_0x48908a),_0x326752=[],_0x4a8f83=[],_0x26f951=[],_0x3ae3b6=[],_0x26739a=new Set(_0x132d40[_0x4e0bd7(0xf8)](_0x3b4d13=>_0x3b4d13[_0x4e0bd7(0xee)]));for(const _0x2e8f79 of _0x132d40){const _0x583b58=await computeSqlFileHash(_0x2e8f79[_0x4e0bd7(0xe9)]),_0x4a53b8=_0x2a711b['sqls'][_0x2e8f79['lockKey']],_0x447e4e=!!_0x4a53b8&&_0x4a53b8[_0x4e0bd7(0x10a)]!==_0x2e8f79[_0x4e0bd7(0x101)],_0x140dd1=!!_0x4a53b8&&!!_0x2e8f79[_0x4e0bd7(0xf4)]&&_0x4a53b8[_0x4e0bd7(0xf4)]!==_0x2e8f79['sqlName'];if(!_0x4a53b8)_0x326752[_0x4e0bd7(0x103)](_0x2e8f79[_0x4e0bd7(0xee)]);else _0x4a53b8[_0x4e0bd7(0xf7)]!==_0x583b58||_0x447e4e||_0x140dd1?_0x4a8f83[_0x4e0bd7(0x103)](_0x2e8f79[_0x4e0bd7(0xee)]):_0x26f951[_0x4e0bd7(0x103)](_0x2e8f79[_0x4e0bd7(0xee)]);}for(const _0x419c52 of Object[_0x4e0bd7(0x10c)](_0x2a711b[_0x4e0bd7(0xf1)])){!_0x26739a[_0x4e0bd7(0xe7)](_0x419c52)&&_0x3ae3b6[_0x4e0bd7(0x103)](_0x419c52);}const _0x1f6706=[];if(_0x2c83e7[_0x4e0bd7(0xf2)](_0x4e0bd7(0xfb))){const _0xc411d1=await fetchAllSqlCodes(_0x2c83e7['appCode']);for(const _0x1d4553 of _0xc411d1){!_0x26739a['has'](_0x1d4553)&&!_0x2a711b[_0x4e0bd7(0xf1)][_0x1d4553]&&_0x1f6706['push'](_0x1d4553);}}const _0x9bef84=_0x326752[_0x4e0bd7(0x100)]===0x0&&_0x4a8f83[_0x4e0bd7(0x100)]===0x0&&_0x3ae3b6[_0x4e0bd7(0x100)]===0x0&&_0x1f6706['length']===0x0;return{'ok':!![],'data':{'added':_0x326752,'modified':_0x4a8f83,'missing':_0x3ae3b6,'unchanged':_0x26f951,'remoteOnly':_0x1f6706},'message':_0x9bef84?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x326752['length']+_0x4e0bd7(0xeb)+_0x4a8f83[_0x4e0bd7(0x100)]+'\x20modified,\x20'+_0x3ae3b6['length']+_0x4e0bd7(0xef)+_0x26f951['length']+_0x4e0bd7(0xe5)+(_0x1f6706[_0x4e0bd7(0x100)]>0x0?',\x20'+_0x1f6706[_0x4e0bd7(0x100)]+_0x4e0bd7(0xf3):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a193_0x19c0(_0x5f2b21,_0x32f2b9){_0x5f2b21=_0x5f2b21-0x15e;const _0x36a80b=a193_0x36a8();let _0x19c0a5=_0x36a80b[_0x5f2b21];return _0x19c0a5;}const a193_0x3321ef=a193_0x19c0;(function(_0x11e0a8,_0x6aaba4){const _0x37e90f=a193_0x19c0,_0x38c501=_0x11e0a8();while(!![]){try{const _0x4d0231=parseInt(_0x37e90f(0x19f))/0x1+-parseInt(_0x37e90f(0x18b))/0x2*(parseInt(_0x37e90f(0x165))/0x3)+-parseInt(_0x37e90f(0x193))/0x4*(-parseInt(_0x37e90f(0x181))/0x5)+parseInt(_0x37e90f(0x18c))/0x6+-parseInt(_0x37e90f(0x171))/0x7*(-parseInt(_0x37e90f(0x19c))/0x8)+-parseInt(_0x37e90f(0x164))/0x9+-parseInt(_0x37e90f(0x180))/0xa;if(_0x4d0231===_0x6aaba4)break;else _0x38c501['push'](_0x38c501['shift']());}catch(_0x1aca85){_0x38c501['push'](_0x38c501['shift']());}}}(a193_0x36a8,0xe81d1));import{readFileSync,existsSync}from'node:fs';function a193_0x36a8(){const _0x43c87d=['isDangerous','message','dbtableConfig','sql','index_type','get','flatMap','1468107GVDctH','12303oXbHCu','read','valid','\x22\x20not\x20found\x20in\x20any\x20dataset','map','columnNames','string','\x22\x20not\x20found\x20or\x20not\x20accessible','length','validation','File\x20not\x20found:\x20','index_columns','4353370iPfnDE','check-indexes','size','find','utf-8','isArray','file','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','boolean','validate','SQL\x20schema\x20validation','dataset','from','appCode','schema:','42480580hriEbq','10zoNehh','schemas','tableName','primary','index_name','indexes','Provide\x20--file\x20or\x20--sql','Dataset\x20\x22','flagMissing','filter','184ULQPFK','7789020uxxPUI','push','type','name','str','fields','bool','2968796SlZzVR','cwd','Table\x20\x22','reason','columns','isSelectOnly','split','sqlType','trim','24cHdrUH','joinAudit','toLowerCase','1090912EIrJTu','unshift'];a193_0x36a8=function(){return _0x43c87d;};return a193_0x36a8();}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';export const sqlValidate={'service':a193_0x3321ef(0x160),'command':a193_0x3321ef(0x17a),'description':a193_0x3321ef(0x178),'risk':a193_0x3321ef(0x166),'flags':[{'name':a193_0x3321ef(0x177),'type':a193_0x3321ef(0x16b),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a193_0x3321ef(0x160),'type':a193_0x3321ef(0x16b),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a193_0x3321ef(0x182),'type':a193_0x3321ef(0x16b),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'},{'name':'check-indexes','type':a193_0x3321ef(0x179),'description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0x2177a1){const _0x581679=a193_0x3321ef,_0x45aa22=_0x2177a1[_0x581679(0x190)]('file'),_0x3d0c84=_0x2177a1[_0x581679(0x190)](_0x581679(0x160)),_0x157781=_0x2177a1[_0x581679(0x190)](_0x581679(0x182)),_0x54a064=_0x2177a1[_0x581679(0x192)](_0x581679(0x172));if(!_0x45aa22&&!_0x3d0c84)throw CliErrors[_0x581679(0x189)](_0x581679(0x177),_0x581679(0x187));if(_0x54a064&&!_0x157781)throw CliErrors['validation']('--check-indexes\x20requires\x20--schemas.');let _0xa091d2;if(_0x45aa22){const _0x48e3a7=resolve(process[_0x581679(0x194)](),_0x45aa22);if(!existsSync(_0x48e3a7))throw CliErrors[_0x581679(0x16e)](_0x581679(0x16f)+_0x48e3a7);_0xa091d2=readFileSync(_0x48e3a7,_0x581679(0x175));}else _0xa091d2=_0x3d0c84;const _0x5ad13f=validateSql(_0xa091d2),_0xb8bccc={'valid':_0x5ad13f['valid'],'sqlType':_0x5ad13f['sqlType'][_0x581679(0x18e)],'isSelectOnly':_0x5ad13f[_0x581679(0x19a)][_0x581679(0x198)],'isDangerous':_0x5ad13f[_0x581679(0x19a)][_0x581679(0x1a1)],'tables':_0x5ad13f['tables'],'parameters':_0x5ad13f['parameters'],'message':_0x5ad13f['message']};_0x5ad13f['sqlType'][_0x581679(0x196)]&&(_0xb8bccc['reason']=_0x5ad13f[_0x581679(0x19a)][_0x581679(0x196)]);if(_0x157781&&_0x5ad13f[_0x581679(0x167)]){const _0x16d0f8=_0x157781[_0x581679(0x199)](',')[_0x581679(0x169)](_0x34bd5b=>_0x34bd5b[_0x581679(0x19b)]())[_0x581679(0x18a)](Boolean),_0x4a98c5=[],_0x15afb2=[],_0x555b98=filterDbTableBackedDatasets(await listDatasets(_0x2177a1[_0x581679(0x17e)])),_0x569330=new Map(_0x555b98[_0x581679(0x169)](_0x3ea837=>[_0x3ea837[_0x581679(0x15f)]?.['tableName']?.[_0x581679(0x19e)](),_0x3ea837]));for(const _0x20567a of _0x5ad13f['tables']){const _0x3fc66b=_0x569330[_0x581679(0x162)](_0x20567a['toLowerCase']());!_0x3fc66b&&_0x4a98c5[_0x581679(0x18d)](_0x581679(0x195)+_0x20567a+_0x581679(0x168));}for(const _0x4b5c5b of _0x16d0f8){let _0x3eb3e6;try{_0x3eb3e6=await getDatasetDetail(_0x4b5c5b);}catch{_0x4a98c5['push'](_0x581679(0x188)+_0x4b5c5b+_0x581679(0x16c));continue;}assertDatasetIsDbTableBacked(_0x3eb3e6,_0x581679(0x17b));const _0xb81937=Array[_0x581679(0x176)](_0x3eb3e6['fields'])?_0x3eb3e6[_0x581679(0x191)]:[],_0x30343f=new Set(_0xb81937['map'](_0x4502ad=>_0x4502ad[_0x581679(0x18f)]?.[_0x581679(0x19e)]())),_0x23c408=_0x3eb3e6[_0x581679(0x15f)]?.[_0x581679(0x183)]||_0x3eb3e6['tableName']||_0x4b5c5b;_0xb8bccc[_0x581679(0x17f)+_0x23c408]={'code':_0x4b5c5b,'tableName':_0x23c408,'fieldCount':_0x30343f[_0x581679(0x173)],'fields':Array[_0x581679(0x17d)](_0x30343f)};if(_0x54a064){const _0x500f3b=normalizeDatasetIndexes(_0x3eb3e6);_0x15afb2[_0x581679(0x18d)]({'tableName':_0x23c408,..._0x500f3b});}}_0x4a98c5['length']>0x0&&(_0xb8bccc['schemaWarnings']=_0x4a98c5),_0x54a064&&(_0xb8bccc[_0x581679(0x19d)]=auditSqlJoinIndexes(_0xa091d2,_0x15afb2));}return{'ok':_0x5ad13f[_0x581679(0x167)],'data':_0xb8bccc,'message':_0x5ad13f[_0x581679(0x15e)]};}};function normalizeDatasetIndexes(_0x1c65c6){const _0x257458=a193_0x3321ef,_0xb1db52=Array[_0x257458(0x176)](_0x1c65c6?.[_0x257458(0x17c)]?.[_0x257458(0x186)])?_0x1c65c6['dataset'][_0x257458(0x186)]:Array['isArray'](_0x1c65c6?.[_0x257458(0x186)])?_0x1c65c6[_0x257458(0x186)]:[],_0x223e03=_0xb1db52[_0x257458(0x163)](_0x4154fc=>{const _0x505f53=_0x257458,_0x4d381e=Array['isArray'](_0x4154fc?.[_0x505f53(0x170)])?_0x4154fc[_0x505f53(0x170)]:Array[_0x505f53(0x176)](_0x4154fc?.[_0x505f53(0x16a)])?_0x4154fc[_0x505f53(0x16a)]:Array[_0x505f53(0x176)](_0x4154fc?.[_0x505f53(0x197)])?_0x4154fc['columns']:[],_0x287b83=_0x4d381e[_0x505f53(0x18a)](_0x335ea2=>typeof _0x335ea2==='string')[_0x505f53(0x169)](_0x5dc6cf=>_0x5dc6cf['trim']())[_0x505f53(0x18a)](Boolean);if(_0x287b83[_0x505f53(0x16d)]===0x0)return[];const _0x22ff67=[_0x4154fc?.['indexName'],_0x4154fc?.[_0x505f53(0x185)],_0x4154fc?.['name']][_0x505f53(0x174)](_0x49eb76=>typeof _0x49eb76==='string'&&_0x49eb76[_0x505f53(0x19b)]()),_0x5d2617=[_0x4154fc?.[_0x505f53(0x161)],_0x4154fc?.[_0x505f53(0x18e)]][_0x505f53(0x174)](_0x531ff5=>typeof _0x531ff5===_0x505f53(0x16b)&&_0x531ff5[_0x505f53(0x19b)]());return[{..._0x22ff67?{'name':_0x22ff67[_0x505f53(0x19b)]()}:{},..._0x5d2617?{'type':_0x5d2617[_0x505f53(0x19b)]()}:{},'columns':_0x287b83}];}),_0x2bedd5=[..._0x223e03],_0xd9a80b=typeof _0x1c65c6?.['dbtableConfig']?.['pkField']===_0x257458(0x16b)?_0x1c65c6[_0x257458(0x15f)]['pkField']['split'](',')['map'](_0x53f07d=>_0x53f07d[_0x257458(0x19b)]())[_0x257458(0x18a)](Boolean):[];return _0xd9a80b[_0x257458(0x16d)]>0x0&&_0x2bedd5[_0x257458(0x1a0)]({'type':_0x257458(0x184),'columns':_0xd9a80b}),{'indexes':_0x2bedd5,'metadataAvailable':_0x223e03['length']>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a194_0x212c(_0x5789bb,_0x24352a){_0x5789bb=_0x5789bb-0x1ea;const _0x192776=a194_0x1927();let _0x212cba=_0x192776[_0x5789bb];return _0x212cba;}(function(_0x5d1ca7,_0x3d9e64){const _0x45e450=a194_0x212c,_0x4e2da9=_0x5d1ca7();while(!![]){try{const _0x857d35=-parseInt(_0x45e450(0x1f0))/0x1*(parseInt(_0x45e450(0x1ee))/0x2)+-parseInt(_0x45e450(0x1ec))/0x3+parseInt(_0x45e450(0x1f1))/0x4*(parseInt(_0x45e450(0x1ea))/0x5)+-parseInt(_0x45e450(0x1ef))/0x6*(parseInt(_0x45e450(0x1f3))/0x7)+parseInt(_0x45e450(0x1eb))/0x8+-parseInt(_0x45e450(0x1ed))/0x9+parseInt(_0x45e450(0x1f2))/0xa;if(_0x857d35===_0x3d9e64)break;else _0x4e2da9['push'](_0x4e2da9['shift']());}catch(_0x4266d7){_0x4e2da9['push'](_0x4e2da9['shift']());}}}(a194_0x1927,0x66ce1));import{taskStatus}from'../../commands/task/status.js';function a194_0x1927(){const _0xe45315=['5xkTTtK','733288AokgPR','44346LBJgyt','4695561uVUwIh','1396012cDnbqv','150gEYUlU','1ruPqmc','605584lBzaEb','17288740MwdsIt','88571vPHfYv'];a194_0x1927=function(){return _0xe45315;};return a194_0x1927();}export const taskDefinitions=[taskStatus];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a195_0x33063d=a195_0x502d;(function(_0x298d5a,_0x3b5080){const _0x346920=a195_0x502d,_0x341b6b=_0x298d5a();while(!![]){try{const _0x3a3123=-parseInt(_0x346920(0xfd))/0x1+-parseInt(_0x346920(0xeb))/0x2+-parseInt(_0x346920(0xf4))/0x3*(parseInt(_0x346920(0xf3))/0x4)+-parseInt(_0x346920(0xf6))/0x5+parseInt(_0x346920(0xe9))/0x6*(parseInt(_0x346920(0xf5))/0x7)+-parseInt(_0x346920(0xf7))/0x8+-parseInt(_0x346920(0xf0))/0x9*(-parseInt(_0x346920(0xf8))/0xa);if(_0x3a3123===_0x3b5080)break;else _0x341b6b['push'](_0x341b6b['shift']());}catch(_0x44140e){_0x341b6b['push'](_0x341b6b['shift']());}}}(a195_0xe2b0,0x43ecb));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';function a195_0x502d(_0x44a529,_0x23bf5f){_0x44a529=_0x44a529-0xe8;const _0xe2b0e1=a195_0xe2b0();let _0x502d56=_0xe2b0e1[_0x44a529];return _0x502d56;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':'task','command':'status','description':a195_0x33063d(0xf2),'risk':'read','defaultOutputFormat':a195_0x33063d(0xec),'structuredErrors':!![],'flags':[{'name':'task-id','type':a195_0x33063d(0xf9),'required':!![],'description':a195_0x33063d(0xfc)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x12c558){const _0x570c50=a195_0x33063d;if(!_0x12c558[_0x570c50(0xee)](_0x570c50(0xef))['trim']())throw CliErrors[_0x570c50(0xfb)](_0x570c50(0xef));},async 'execute'(_0x27b550){const _0xf187a6=a195_0x33063d,_0x205c2c=_0x27b550['str'](_0xf187a6(0xef))['trim'](),_0x1afcac=normalizeAsyncTask(await getAsyncTaskStatus(_0x205c2c,_0x27b550[_0xf187a6(0xf1)],_0x27b550[_0xf187a6(0xea)]));if(_0x1afcac['taskId']!==_0x205c2c)throw CliErrors['apiError'](_0xf187a6(0xed)+_0x205c2c+',\x20received\x20'+_0x1afcac[_0xf187a6(0xfa)]+'.');const _0x32e9c9=buildAsyncTaskStatusCommand(_0x1afcac[_0xf187a6(0xfa)],_0x27b550[_0xf187a6(0xf1)]);return{'ok':!![],'message':asyncTaskMessage(_0x1afcac),'data':{'appCode':_0x27b550[_0xf187a6(0xf1)],..._0x1afcac,'query':_0x1afcac[_0xf187a6(0xe8)]?null:{'command':_0x32e9c9}}};}};function a195_0xe2b0(){const _0x475268=['12QeBczM','cookie','157272UKJcrq','compress','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','str','task-id','15707214WaaBlD','appCode','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','367408WVnfSw','15KZBuTV','889091naOMxS','2021605CNoPJH','4036032ADyJHG','10CoPANw','string','taskId','flagMissing','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','274332QKnTcJ','isTerminal'];a195_0xe2b0=function(){return _0x475268;};return a195_0xe2b0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c01c4,_0x5431b9){const _0x1e19ef=a196_0x21bb,_0x1b60bd=_0x3c01c4();while(!![]){try{const _0x4c0b80=parseInt(_0x1e19ef(0xfe))/0x1*(-parseInt(_0x1e19ef(0x103))/0x2)+parseInt(_0x1e19ef(0x102))/0x3+parseInt(_0x1e19ef(0x105))/0x4*(-parseInt(_0x1e19ef(0x104))/0x5)+-parseInt(_0x1e19ef(0x100))/0x6+parseInt(_0x1e19ef(0xfd))/0x7*(-parseInt(_0x1e19ef(0xff))/0x8)+-parseInt(_0x1e19ef(0xfc))/0x9+parseInt(_0x1e19ef(0x101))/0xa;if(_0x4c0b80===_0x5431b9)break;else _0x1b60bd['push'](_0x1b60bd['shift']());}catch(_0x44858d){_0x1b60bd['push'](_0x1b60bd['shift']());}}}(a196_0x42a0,0xe89f2));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];function a196_0x21bb(_0x35f3d7,_0x33f909){_0x35f3d7=_0x35f3d7-0xfc;const _0x42a0d0=a196_0x42a0();let _0x21bbde=_0x42a0d0[_0x35f3d7];return _0x21bbde;}function a196_0x42a0(){const _0x3d10e4=['12089799PFwUWh','1925urGHhF','575924Kqcbdx','14176ItAZij','2967180GGVOGY','41051500kiFPsv','4113774TpIIpj','4hHbqEn','1215JkMvLm','17228dKEUJX'];a196_0x42a0=function(){return _0x3d10e4;};return a196_0x42a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a197_0x1a7d(_0x57e97c,_0x136941){_0x57e97c=_0x57e97c-0x1bd;const _0x2b2d74=a197_0x2b2d();let _0x1a7dd2=_0x2b2d74[_0x57e97c];return _0x1a7dd2;}const a197_0x123396=a197_0x1a7d;(function(_0x8fd2a0,_0x3b8e71){const _0x4b40c1=a197_0x1a7d,_0x126720=_0x8fd2a0();while(!![]){try{const _0xbf6c91=-parseInt(_0x4b40c1(0x1be))/0x1+-parseInt(_0x4b40c1(0x1c1))/0x2*(-parseInt(_0x4b40c1(0x1cd))/0x3)+-parseInt(_0x4b40c1(0x1cb))/0x4+parseInt(_0x4b40c1(0x1ce))/0x5+-parseInt(_0x4b40c1(0x1d0))/0x6+parseInt(_0x4b40c1(0x1c2))/0x7*(parseInt(_0x4b40c1(0x1ca))/0x8)+-parseInt(_0x4b40c1(0x1c5))/0x9*(-parseInt(_0x4b40c1(0x1c3))/0xa);if(_0xbf6c91===_0x3b8e71)break;else _0x126720['push'](_0x126720['shift']());}catch(_0x3ff2ed){_0x126720['push'](_0x126720['shift']());}}}(a197_0x2b2d,0x55f41));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';function a197_0x2b2d(){const _0x435abb=['length','27JEmoJx','783645TpPFMT','tenant-code','1100712HVPDVW','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','Found\x20','507994NhOAXm','\x20tenant\x20member(s)','string','85216vcByiQ','21CeTMrT','211690HodDlX','read','333sNBVDC','Exact\x20tenant\x20code','members-list','Pass\x20--tenant-code\x20<code>.','str','780008YZVINl','2289784PFcPqi'];a197_0x2b2d=function(){return _0x435abb;};return a197_0x2b2d();}import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':'tenant','command':a197_0x123396(0x1c7),'description':a197_0x123396(0x1d1),'risk':a197_0x123396(0x1c4),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a197_0x123396(0x1cf),'type':a197_0x123396(0x1c0),'required':!![],'description':a197_0x123396(0x1c6)}],async 'validate'(_0x2e4278){const _0x2f08ee=a197_0x123396;if(!_0x2e4278[_0x2f08ee(0x1c9)](_0x2f08ee(0x1cf))['trim']())throw CliErrors['flagMissing'](_0x2f08ee(0x1cf),_0x2f08ee(0x1c8));},async 'execute'(_0xdf371d){const _0xf5b476=a197_0x123396,_0x5c6ee3=_0xdf371d['str']('tenant-code')['trim'](),_0x44e989=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x5c6ee3,_0x44e989);const _0x522eed=projectTenantMembers(await listTenantDirectoryMembers(_0x5c6ee3));return{'ok':!![],'data':{'tenantCode':_0x5c6ee3,'items':_0x522eed,'totalCount':_0x522eed[_0xf5b476(0x1cc)]},'message':_0xf5b476(0x1bd)+_0x522eed[_0xf5b476(0x1cc)]+_0xf5b476(0x1bf)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a198_0x1fa3(_0x4d42da,_0x225ac2){_0x4d42da=_0x4d42da-0x1d6;const _0x1fd85e=a198_0x1fd8();let _0x1fa35d=_0x1fd85e[_0x4d42da];return _0x1fa35d;}(function(_0x4c961c,_0x25c8d3){const _0x9660a0=a198_0x1fa3,_0x497bee=_0x4c961c();while(!![]){try{const _0xa676a6=parseInt(_0x9660a0(0x1e8))/0x1*(-parseInt(_0x9660a0(0x1e7))/0x2)+parseInt(_0x9660a0(0x1e9))/0x3+-parseInt(_0x9660a0(0x1ed))/0x4*(-parseInt(_0x9660a0(0x1e2))/0x5)+parseInt(_0x9660a0(0x1d9))/0x6*(parseInt(_0x9660a0(0x1da))/0x7)+parseInt(_0x9660a0(0x1de))/0x8*(parseInt(_0x9660a0(0x1eb))/0x9)+-parseInt(_0x9660a0(0x1ee))/0xa*(parseInt(_0x9660a0(0x1e1))/0xb)+-parseInt(_0x9660a0(0x1e6))/0xc;if(_0xa676a6===_0x25c8d3)break;else _0x497bee['push'](_0x497bee['shift']());}catch(_0x1a9fd2){_0x497bee['push'](_0x497bee['shift']());}}}(a198_0x1fd8,0x982f5));import{CliErrors}from'../../errors.js';function textOrNull(_0x3181fe){const _0x156e74=_0x3181fe?.['trim']();return _0x156e74?_0x156e74:null;}export function projectTenantMembers(_0x4da6a9){const _0x236304=a198_0x1fa3,_0x2a6001=new Map();for(const _0x2eebc4 of _0x4da6a9){const _0x5be434=Number(_0x2eebc4[_0x236304(0x1d7)]);if(!Number['isFinite'](_0x5be434)||_0x5be434<=0x0)continue;const _0x4f6ddb={'userId':_0x5be434,'username':textOrNull(_0x2eebc4[_0x236304(0x1e5)]),'displayName':textOrNull(_0x2eebc4[_0x236304(0x1d6)]),'role':_0x2eebc4[_0x236304(0x1d8)]===!![]?_0x236304(0x1e3):'MEMBER','status':textOrNull(_0x2eebc4[_0x236304(0x1ec)])},_0x25c137=_0x2a6001[_0x236304(0x1df)](_0x5be434);if(!_0x25c137){_0x2a6001['set'](_0x5be434,_0x4f6ddb);continue;}_0x25c137[_0x236304(0x1e5)]??=_0x4f6ddb[_0x236304(0x1e5)],_0x25c137['displayName']??=_0x4f6ddb[_0x236304(0x1e4)],_0x25c137[_0x236304(0x1ec)]??=_0x4f6ddb[_0x236304(0x1ec)];if(_0x4f6ddb['role']==='ADMIN')_0x25c137[_0x236304(0x1e0)]=_0x236304(0x1e3);}return[..._0x2a6001[_0x236304(0x1ea)]()]['sort']((_0x4d4e6,_0x17e959)=>_0x4d4e6[_0x236304(0x1d7)]-_0x17e959[_0x236304(0x1d7)]);}export function assertTenantAccessible(_0x2849f0,_0x22121e){const _0x136872=a198_0x1fa3;if(_0x22121e[_0x136872(0x1dc)](_0x34e141=>_0x34e141['tenantCode']===_0x2849f0))return;throw CliErrors[_0x136872(0x1db)](_0x136872(0x1dd)+_0x2849f0+'\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.');}function a198_0x1fd8(){const _0x3be6e2=['ADMIN','displayName','username','18958284MgIDWp','173584VSENJQ','1Itbxhp','3194766xbzVmB','values','8901uRCGNC','status','32CeRUtG','10uafKXu','nickname','userId','adminFlag','2414532FGZLyL','7rlQfWq','validation','some','Tenant\x20\x22','3648fXrIkq','get','role','984742rXrxpJ','288245SmUTST'];a198_0x1fd8=function(){return _0x3be6e2;};return a198_0x1fd8();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a199_0x12854f=a199_0x47a6;function a199_0x47a6(_0x608f91,_0x13b5fd){_0x608f91=_0x608f91-0x114;const _0x52d4f7=a199_0x52d4();let _0x47a6ba=_0x52d4f7[_0x608f91];return _0x47a6ba;}(function(_0x923d13,_0x395b74){const _0x599efc=a199_0x47a6,_0x48f473=_0x923d13();while(!![]){try{const _0x406f71=parseInt(_0x599efc(0x11f))/0x1+parseInt(_0x599efc(0x115))/0x2+parseInt(_0x599efc(0x11a))/0x3+parseInt(_0x599efc(0x128))/0x4*(-parseInt(_0x599efc(0x129))/0x5)+-parseInt(_0x599efc(0x116))/0x6+-parseInt(_0x599efc(0x11c))/0x7*(-parseInt(_0x599efc(0x12b))/0x8)+-parseInt(_0x599efc(0x123))/0x9;if(_0x406f71===_0x395b74)break;else _0x48f473['push'](_0x48f473['shift']());}catch(_0x1d8170){_0x48f473['push'](_0x48f473['shift']());}}}(a199_0x52d4,0x42171));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a199_0x12854f(0x126),CURRENT_BINDING_WARNING=a199_0x12854f(0x12c);function readDingTalkUserId(_0x2b6169){const _0x4d3488=a199_0x12854f,_0x4b4848=_0x2b6169['str'](_0x4d3488(0x125))[_0x4d3488(0x118)]();if(!_0x4b4848)throw CliErrors[_0x4d3488(0x12a)]('--ding-talk-user-id\x20cannot\x20be\x20empty.',_0x4d3488(0x122));return _0x4b4848;}function buildBindingData(_0x84038e,_0x1c06f8){const _0x1126fc=a199_0x12854f;return{'operation':_0x1126fc(0x11e),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x84038e},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x84038e,'bound':!![]},'dryRun':_0x1c06f8,'backend':{'method':_0x1126fc(0x127),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a199_0x12854f(0x121),'command':'dingding-sandbox-bind','description':a199_0x12854f(0x114),'risk':a199_0x12854f(0x11d),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a199_0x12854f(0x125),'type':a199_0x12854f(0x117),'required':!![],'description':a199_0x12854f(0x119)}],async 'validate'(_0x3c120c){readDingTalkUserId(_0x3c120c);},async 'dryRun'(_0x37e9bb){const _0x55f152=a199_0x12854f,_0x24cfb8=readDingTalkUserId(_0x37e9bb);return asDryRunResult(buildBindingData(_0x24cfb8,!![]),{'method':_0x55f152(0x127),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x24fdd8){const _0x5e86ca=a199_0x12854f,_0x49a2bc=readDingTalkUserId(_0x24fdd8),_0x19f7dd=await bindDingTalkSandboxAccount(_0x49a2bc);if(_0x19f7dd!==!![])throw CliErrors[_0x5e86ca(0x124)]('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.',_0x5e86ca(0x120));return{'ok':!![],'data':buildBindingData(_0x49a2bc,![]),'message':_0x5e86ca(0x11b)};}};function a199_0x52d4(){const _0x4437d7=['Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','user-account','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','639747lQNAhm','apiError','ding-talk-user-id','dingding-sandbox','POST','356qkBtqW','25765CbOaSi','validation','67688lkwqYz','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','594120QcDNvE','3125286QcvzjC','string','trim','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','1162605PrIyhk','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','350FrQTlo','high-risk-write','bind','213641KTVfSm'];a199_0x52d4=function(){return _0x4437d7;};return a199_0x52d4();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a200_0x1c2b(_0x4b6e8c,_0x3efedc){_0x4b6e8c=_0x4b6e8c-0xbf;const _0x2ef7c9=a200_0x2ef7();let _0x1c2bed=_0x2ef7c9[_0x4b6e8c];return _0x1c2bed;}(function(_0x46f381,_0x26b685){const _0x1dfae3=a200_0x1c2b,_0x3181c8=_0x46f381();while(!![]){try{const _0x583b0e=-parseInt(_0x1dfae3(0xc6))/0x1*(parseInt(_0x1dfae3(0xc0))/0x2)+parseInt(_0x1dfae3(0xc3))/0x3+parseInt(_0x1dfae3(0xc4))/0x4*(-parseInt(_0x1dfae3(0xc9))/0x5)+parseInt(_0x1dfae3(0xc1))/0x6+-parseInt(_0x1dfae3(0xc5))/0x7+parseInt(_0x1dfae3(0xc7))/0x8*(parseInt(_0x1dfae3(0xbf))/0x9)+parseInt(_0x1dfae3(0xc8))/0xa*(parseInt(_0x1dfae3(0xc2))/0xb);if(_0x583b0e===_0x26b685)break;else _0x3181c8['push'](_0x3181c8['shift']());}catch(_0x22767f){_0x3181c8['push'](_0x3181c8['shift']());}}}(a200_0x2ef7,0x3c288));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a200_0x2ef7(){const _0x3bac9e=['445931qenLxR','56LfRKXU','4642590TisBLq','80260iENOHC','324333DoAGgA','2vFRYez','1600254jVMAED','22TTVobE','150327ZCDfuZ','120AhlYJN','2265872PegsuD'];a200_0x2ef7=function(){return _0x3bac9e;};return a200_0x2ef7();}export const userAccountDefinitions=[dingTalkSandboxBind];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a201_0x10bb(_0x575f18,_0x42d90e){_0x575f18=_0x575f18-0x7d;const _0x1653f9=a201_0x1653();let _0x10bb94=_0x1653f9[_0x575f18];return _0x10bb94;}const a201_0x5a90ec=a201_0x10bb;(function(_0x4bf2d9,_0x5ecc73){const _0x25927b=a201_0x10bb,_0x2e6a48=_0x4bf2d9();while(!![]){try{const _0x2ebf7a=-parseInt(_0x25927b(0x84))/0x1*(parseInt(_0x25927b(0x89))/0x2)+parseInt(_0x25927b(0x80))/0x3+parseInt(_0x25927b(0x8a))/0x4*(-parseInt(_0x25927b(0x81))/0x5)+parseInt(_0x25927b(0x85))/0x6+parseInt(_0x25927b(0x8b))/0x7*(parseInt(_0x25927b(0x7d))/0x8)+parseInt(_0x25927b(0x7e))/0x9*(parseInt(_0x25927b(0x87))/0xa)+-parseInt(_0x25927b(0x82))/0xb;if(_0x2ebf7a===_0x5ecc73)break;else _0x2e6a48['push'](_0x2e6a48['shift']());}catch(_0x3c782f){_0x2e6a48['push'](_0x2e6a48['shift']());}}}(a201_0x1653,0x9444d));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a201_0x1653(){const _0x104b34=['219490JGAXbt','write','2zBxHVh','2427704KZPYSh','960799SZHBVm','56kEWaJZ','378PpEBWJ','workspace\x20add','2252508GGniVQ','10LUVVbE','1547469AfisUk','add','972270zmeiAL','1803702ghBTDB','App\x20profile\x20name'];a201_0x1653=function(){return _0x104b34;};return a201_0x1653();}export const workspaceAddDefinition={'service':'workspace','command':a201_0x5a90ec(0x83),'description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a201_0x5a90ec(0x88),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a201_0x5a90ec(0x86),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x21701b=>validateAppName(_0x21701b,a201_0x5a90ec(0x7f)),'execute':_0x292ec1=>runAppAdd(_0x292ec1,a201_0x5a90ec(0x7f))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x42b9ff=a202_0x2aa2;(function(_0x2d60d9,_0x33303c){const _0x3136b5=a202_0x2aa2,_0x24748e=_0x2d60d9();while(!![]){try{const _0x4532b8=-parseInt(_0x3136b5(0x154))/0x1*(-parseInt(_0x3136b5(0x15b))/0x2)+-parseInt(_0x3136b5(0x14e))/0x3+parseInt(_0x3136b5(0x14d))/0x4*(-parseInt(_0x3136b5(0x178))/0x5)+parseInt(_0x3136b5(0x165))/0x6+-parseInt(_0x3136b5(0x151))/0x7*(-parseInt(_0x3136b5(0x162))/0x8)+parseInt(_0x3136b5(0x14f))/0x9*(parseInt(_0x3136b5(0x158))/0xa)+parseInt(_0x3136b5(0x171))/0xb;if(_0x4532b8===_0x33303c)break;else _0x24748e['push'](_0x24748e['shift']());}catch(_0x2d08db){_0x24748e['push'](_0x24748e['shift']());}}}(a202_0x2194,0x94528));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';function a202_0x2aa2(_0x12d0d,_0x261a74){_0x12d0d=_0x12d0d-0x14d;const _0x219498=a202_0x2194();let _0x2aa2e5=_0x219498[_0x12d0d];return _0x2aa2e5;}import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a202_0x2194(){const _0x47c494=['defaultFormat','riskLevel','748AXltKi','2744130XoHqFB','9vXpobA','isArray','14XxmWQY','Use\x20`','appcode','4831JItjKB','app','length','Locale\x20for\x20this\x20workspace\x20app\x20profile','2670510SXnXrD','workspace.','\x20(appcode:\x20','58TarKSh','object','env','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','\x20workspace\x20use\x20--app\x20<name>`.','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','pageSize','2902696hRrUeG','Target\x20environment','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','3270888RelSWS','updated','trim','init','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','.\x20Credentials:\x20not\x20written.','defaultApp','number','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','str','Invalid\x20appcode:\x20','apiDir','350097gZuXdT','Missing\x20workspace\x20app\x20selector.','string','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','format','write','Switch\x20the\x20current\x20workspace\x20app\x20binding','5015yslVVY','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','keys','project','\x20workspace\x20','use','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','workspace','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20--appcode\x20<code>`.','apps','locale','validation','join',').\x20Config:\x20'];a202_0x2194=function(){return _0x47c494;};return a202_0x2194();}import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a202_0x42b9ff(0x164),SAFE_PROFILE_KEYS=[a202_0x42b9ff(0x153),a202_0x42b9ff(0x15d),a202_0x42b9ff(0x170),a202_0x42b9ff(0x175),'pageSize',a202_0x42b9ff(0x188),a202_0x42b9ff(0x183)],workspaceFlags=[{'name':a202_0x42b9ff(0x155),'type':a202_0x42b9ff(0x173),'description':a202_0x42b9ff(0x160)},{'name':a202_0x42b9ff(0x153),'type':'string','description':a202_0x42b9ff(0x15e)},{'name':a202_0x42b9ff(0x15d),'type':a202_0x42b9ff(0x173),'description':a202_0x42b9ff(0x163),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a202_0x42b9ff(0x173),'description':a202_0x42b9ff(0x174)},{'name':'defaultFormat','type':'string','description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a202_0x42b9ff(0x161),'type':a202_0x42b9ff(0x16c),'description':a202_0x42b9ff(0x16d)},{'name':a202_0x42b9ff(0x188),'type':a202_0x42b9ff(0x173),'description':a202_0x42b9ff(0x179),'enum':[...RISK_LEVEL_VALUES]},{'name':a202_0x42b9ff(0x183),'type':a202_0x42b9ff(0x173),'description':a202_0x42b9ff(0x157)}];function isRecord(_0x327c59){const _0x52ffa6=a202_0x42b9ff;return!!_0x327c59&&typeof _0x327c59===_0x52ffa6(0x15c)&&!Array[_0x52ffa6(0x150)](_0x327c59);}function assertValidAppcode(_0x4c827c){const _0x14ee63=a202_0x42b9ff,{valid:_0x396525,message:_0x198f8f}=validateAppcode(_0x4c827c);if(!_0x396525)throw CliErrors['validation'](_0x14ee63(0x16f)+_0x4c827c,_0x198f8f);}function sanitizeProfile(_0x20b882){if(!isRecord(_0x20b882))return{};const _0x2dac5e={};for(const _0x544bfe of SAFE_PROFILE_KEYS){if(_0x20b882[_0x544bfe]!==undefined)_0x2dac5e[_0x544bfe]=_0x20b882[_0x544bfe];}return _0x2dac5e;}function cloneProfile(_0x51ea62){return isRecord(_0x51ea62)?{..._0x51ea62}:{};}function collectWorkspaceProfileOverrides(_0x50206f){const _0x2255f9=a202_0x42b9ff,_0x338956={},_0x4719ba=_0x50206f[_0x2255f9(0x16e)]('env'),_0x1ebb1b=_0x50206f['str'](_0x2255f9(0x170)),_0x441de8=_0x50206f[_0x2255f9(0x16e)](_0x2255f9(0x187)),_0x35d28b=_0x50206f['flag']('pageSize'),_0x2df464=_0x50206f['str']('riskLevel'),_0x1ffb7c=_0x50206f['str'](_0x2255f9(0x183));if(_0x4719ba)_0x338956[_0x2255f9(0x15d)]=_0x4719ba;if(_0x1ebb1b)_0x338956['apiDir']=_0x1ebb1b;if(_0x441de8)_0x338956[_0x2255f9(0x175)]=_0x441de8;if(_0x35d28b!==undefined&&_0x35d28b!=='')_0x338956[_0x2255f9(0x161)]=Number(_0x35d28b);if(_0x2df464)_0x338956['riskLevel']=_0x2df464;if(_0x1ffb7c)_0x338956['locale']=_0x1ffb7c;return _0x338956;}async function validateWorkspaceArgs(_0x46cd13){const _0x313361=a202_0x42b9ff,_0x2371c0=_0x46cd13[_0x313361(0x16e)](_0x313361(0x155))[_0x313361(0x167)](),_0xe304d8=_0x46cd13[_0x313361(0x16e)](_0x313361(0x153))[_0x313361(0x167)]();if(!_0x2371c0&&!_0xe304d8)throw CliErrors[_0x313361(0x184)](_0x313361(0x172),_0x313361(0x152)+CLI_BIN_NAME+_0x313361(0x17e)+CLI_BIN_NAME+_0x313361(0x15f));if(_0xe304d8)assertValidAppcode(_0xe304d8);}function resolveKnownApps(){const _0x4911b5=a202_0x42b9ff,{config:_0x2da54b,layers:_0x1a00b4}=readRawConfigWithLayers(),_0x4b7fe1=isRecord(_0x2da54b['apps'])?_0x2da54b[_0x4911b5(0x182)]:{},_0x28f3bc=isRecord(_0x1a00b4['globalConfig'][_0x4911b5(0x182)])?_0x1a00b4['globalConfig'][_0x4911b5(0x182)]:{};return{..._0x28f3bc,..._0x4b7fe1};}async function configureWorkspace(_0x1921ca,_0x366514){const _0x5a98e3=a202_0x42b9ff,_0x528e52=_0x1921ca[_0x5a98e3(0x16e)](_0x5a98e3(0x155))[_0x5a98e3(0x167)](),_0x45b096=_0x1921ca[_0x5a98e3(0x16e)](_0x5a98e3(0x153))['trim'](),_0x25828d=_0x528e52||_0x45b096;if(!_0x25828d)throw CliErrors[_0x5a98e3(0x184)](_0x5a98e3(0x172),_0x5a98e3(0x152)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x5a98e3(0x15f));if(_0x45b096)assertValidAppcode(_0x45b096);const _0x405e72=resolveWriteConfigPath(_0x5a98e3(0x17b)),_0x3876e7=readConfigFile(_0x405e72),_0x3d0898=resolveKnownApps(),_0x3744f0=isRecord(_0x3876e7[_0x5a98e3(0x182)])?{..._0x3876e7[_0x5a98e3(0x182)]}:{},_0x497070=cloneProfile(_0x3744f0[_0x25828d]),_0xd71ef=sanitizeProfile(_0x3d0898[_0x25828d]),_0x4369ae=_0x45b096?{}:_0xd71ef,_0x11fa8=_0x45b096||_0x4369ae['appcode'];if(!_0x11fa8){const _0x22c1da=Object[_0x5a98e3(0x17a)](_0x3d0898),_0x2b2a5a=_0x22c1da[_0x5a98e3(0x156)]===0x0?_0x5a98e3(0x152)+CLI_BIN_NAME+_0x5a98e3(0x17c)+_0x366514+'\x20--app\x20'+_0x25828d+_0x5a98e3(0x181):_0x5a98e3(0x169)+_0x22c1da[_0x5a98e3(0x185)](',\x20');throw CliErrors[_0x5a98e3(0x184)]('App\x20\x22'+_0x25828d+'\x22\x20not\x20found.',_0x2b2a5a);}assertValidAppcode(String(_0x11fa8));const _0x27c34f={..._0x4369ae,..._0x497070,'appcode':String(_0x11fa8),...collectWorkspaceProfileOverrides(_0x1921ca)};return _0x3744f0[_0x25828d]=_0x27c34f,_0x3876e7['apps']=_0x3744f0,_0x3876e7[_0x5a98e3(0x16b)]=_0x25828d,delete _0x3876e7[_0x5a98e3(0x153)],delete _0x3876e7[_0x5a98e3(0x155)],_0x27c34f[_0x5a98e3(0x15d)]&&(_0x3876e7['env']=_0x27c34f[_0x5a98e3(0x15d)]),writeConfigFile(_0x405e72,_0x3876e7),{'ok':!![],'message':'Workspace\x20'+(_0x366514==='init'?'initialized':_0x5a98e3(0x166))+':\x20'+_0x25828d+_0x5a98e3(0x15a)+_0x27c34f[_0x5a98e3(0x153)]+_0x5a98e3(0x186)+_0x405e72+_0x5a98e3(0x16a),'data':{'operation':_0x5a98e3(0x159)+_0x366514,'configPath':_0x405e72,'app':_0x25828d,'appcode':_0x27c34f['appcode'],'env':_0x27c34f['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a202_0x42b9ff(0x17f),'command':'init','description':a202_0x42b9ff(0x180),'risk':a202_0x42b9ff(0x176),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1f2742=>configureWorkspace(_0x1f2742,a202_0x42b9ff(0x168))},workspaceUseDefinition={'service':a202_0x42b9ff(0x17f),'command':a202_0x42b9ff(0x17d),'description':a202_0x42b9ff(0x177),'risk':a202_0x42b9ff(0x176),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x51a655=>configureWorkspace(_0x51a655,a202_0x42b9ff(0x17d))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a203_0x37e7(_0x290563,_0x4246f4){_0x290563=_0x290563-0x1b1;const _0x353400=a203_0x3534();let _0x37e7d7=_0x353400[_0x290563];return _0x37e7d7;}const a203_0x1906a0=a203_0x37e7;(function(_0x15f76f,_0x1d69a2){const _0x5ca57e=a203_0x37e7,_0x594d58=_0x15f76f();while(!![]){try{const _0x5d1fd6=parseInt(_0x5ca57e(0x1b9))/0x1+parseInt(_0x5ca57e(0x1ba))/0x2+-parseInt(_0x5ca57e(0x1bc))/0x3+parseInt(_0x5ca57e(0x1b5))/0x4+parseInt(_0x5ca57e(0x1bb))/0x5+-parseInt(_0x5ca57e(0x1bd))/0x6+-parseInt(_0x5ca57e(0x1be))/0x7;if(_0x5d1fd6===_0x1d69a2)break;else _0x594d58['push'](_0x594d58['shift']());}catch(_0x3a83c3){_0x594d58['push'](_0x594d58['shift']());}}}(a203_0x3534,0xd04cb));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a203_0x1906a0(0x1b4),'command':a203_0x1906a0(0x1b1),'description':a203_0x1906a0(0x1b2),'risk':a203_0x1906a0(0x1b8),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a203_0x1906a0(0x1b7),'description':a203_0x1906a0(0x1b6),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0xf20f1a=>validateAppName(_0xf20f1a,a203_0x1906a0(0x1b3)),'execute':_0x3dd91d=>runAppRemove(_0x3dd91d,a203_0x1906a0(0x1b3))};function a203_0x3534(){const _0x4048f8=['workspace\x20remove','workspace','4001168fwRCpa','App\x20profile\x20name\x20to\x20remove','name','write','1373632Qzuxnm','46926LmpzYc','4095165sqCqKG','5009688pphJUS','2693076mPwiCd','1711381fjLngf','remove','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)'];a203_0x3534=function(){return _0x4048f8;};return a203_0x3534();}
|