@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a74_0x10713d=a74_0x1027;(function(_0x2fb6a7,_0x203719){const _0x50ad7e=a74_0x1027,_0x5edba6=_0x2fb6a7();while(!![]){try{const _0x4e62fc=-parseInt(_0x50ad7e(0x10d))/0x1+parseInt(_0x50ad7e(0x123))/0x2*(-parseInt(_0x50ad7e(0x13a))/0x3)+parseInt(_0x50ad7e(0x10a))/0x4+-parseInt(_0x50ad7e(0x13b))/0x5*(parseInt(_0x50ad7e(0x122))/0x6)+parseInt(_0x50ad7e(0x128))/0x7+parseInt(_0x50ad7e(0x139))/0x8+parseInt(_0x50ad7e(0x143))/0x9*(parseInt(_0x50ad7e(0x11c))/0xa);if(_0x4e62fc===_0x203719)break;else _0x5edba6['push'](_0x5edba6['shift']());}catch(_0x4a2796){_0x5edba6['push'](_0x5edba6['shift']());}}}(a74_0x222d,0xcf035));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a74_0x10713d(0x146),'description':a74_0x10713d(0x134)},DBID_FLAG={'name':a74_0x10713d(0x115),'type':a74_0x10713d(0x146),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a74_0x10713d(0x121),'type':a74_0x10713d(0x126),'description':a74_0x10713d(0x129)},CASCADE_FLAG={'name':'cascade','type':a74_0x10713d(0x126),'description':a74_0x10713d(0x141)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a74_0x10713d(0x146),'description':a74_0x10713d(0x113)};export const datasetDelete={'service':a74_0x10713d(0x12d),'command':a74_0x10713d(0x110),'description':a74_0x10713d(0x130),'risk':a74_0x10713d(0x136),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x540539){const _0x1613b2=a74_0x10713d,_0x478957=_0x540539[_0x1613b2(0x11d)]('id'),_0x4e43f5=_0x540539[_0x1613b2(0x12c)](_0x1613b2(0x11a)),_0x2d7076=_0x540539[_0x1613b2(0x11d)]('dbid'),_0x248c1f=[_0x478957>0x0,Boolean(_0x4e43f5),_0x2d7076>0x0]['filter'](Boolean);if(_0x248c1f['length']===0x0)throw CliErrors[_0x1613b2(0x131)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x248c1f['length']>0x1)throw CliErrors[_0x1613b2(0x131)](_0x1613b2(0x11e));},async 'dryRun'(_0x1c0e17){const _0xef4b56=a74_0x10713d,_0x4a34ac=await resolveTargets(_0x1c0e17),_0x315f39=_0x1c0e17['bool'](_0xef4b56(0x13f));return{'method':_0xef4b56(0x11f),'url':_0xef4b56(0x147)+(_0x315f39?'true':_0xef4b56(0x120)),'body':{'count':_0x4a34ac['length'],'cascade':_0x315f39,'datasets':_0x4a34ac},'description':_0x315f39?_0xef4b56(0x145)+_0x4a34ac[_0xef4b56(0x125)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0xef4b56(0x10b)+_0x4a34ac[_0xef4b56(0x125)]+_0xef4b56(0x12b)};},async 'execute'(_0x132e4d){const _0x5d9995=a74_0x10713d;if(!_0x132e4d['bool'](_0x5d9995(0x121)))throw CliErrors['validation'](_0x5d9995(0x124),_0x5d9995(0x135));const _0x59fb01=await resolveTargets(_0x132e4d),_0x1a68b6=_0x132e4d[_0x5d9995(0x148)](_0x5d9995(0x13f)),_0x1e4a71=[],_0x3a7362=[];for(const _0x504463 of _0x59fb01){try{await deleteDataset(_0x504463['id'],_0x1a68b6),_0x1e4a71[_0x5d9995(0x13d)](_0x504463);}catch(_0x5ae525){_0x3a7362[_0x5d9995(0x13d)]({..._0x504463,'error':_0x5ae525 instanceof Error?_0x5ae525[_0x5d9995(0x10c)]:String(_0x5ae525)});}}if(_0x3a7362[_0x5d9995(0x125)]>0x0){const _0x174749=buildPageRestoreCommands(_0x132e4d[_0x5d9995(0x137)],_0x1a68b6?_0x1e4a71:[]);return{'ok':![],'data':{'requested':_0x59fb01[_0x5d9995(0x125)],'cascade':_0x1a68b6,'deletedCount':_0x1e4a71[_0x5d9995(0x125)],'failedCount':_0x3a7362[_0x5d9995(0x125)],'deleted':_0x1e4a71,'failed':_0x3a7362,'pageRestoreCommands':_0x174749},'message':_0x5d9995(0x13c)+_0x1e4a71[_0x5d9995(0x125)]+'/'+_0x59fb01[_0x5d9995(0x125)]+'\x20dataset(s);\x20'+_0x3a7362[_0x5d9995(0x125)]+_0x5d9995(0x118)};}return{'ok':!![],'data':{'requested':_0x59fb01[_0x5d9995(0x125)],'cascade':_0x1a68b6,'deletedCount':_0x1e4a71[_0x5d9995(0x125)],'deleted':_0x1e4a71,'pageRestoreCommands':buildPageRestoreCommands(_0x132e4d[_0x5d9995(0x137)],_0x1a68b6?_0x1e4a71:[])},'message':_0x5d9995(0x13c)+_0x1e4a71[_0x5d9995(0x125)]+_0x5d9995(0x114)};}};async function resolveTargets(_0x219813){const _0x4c9825=a74_0x10713d,_0x15f6f7=_0x219813[_0x4c9825(0x11d)]('id'),_0x523683=_0x219813[_0x4c9825(0x12c)]('code'),_0x5eafc4=_0x219813[_0x4c9825(0x11d)](_0x4c9825(0x115));let _0x14d72b;_0x523683?(_0x14d72b=await listDatasets(_0x219813['appCode'],{'code':_0x523683}),_0x14d72b=_0x14d72b[_0x4c9825(0x127)](_0x28716d=>_0x28716d[_0x4c9825(0x11a)]===_0x523683)):(_0x14d72b=await listDatasets(_0x219813[_0x4c9825(0x137)]),_0x15f6f7>0x0&&(_0x14d72b=_0x14d72b[_0x4c9825(0x127)](_0x10b72f=>_0x10b72f['id']===_0x15f6f7)),_0x5eafc4>0x0&&(_0x14d72b=_0x14d72b[_0x4c9825(0x127)](_0x5125f6=>_0x5125f6[_0x4c9825(0x116)]?.[_0x4c9825(0x109)]===_0x5eafc4)));const _0x39c82a=[];for(const _0x2ab0d1 of _0x14d72b){const _0x50d06c=await getDatasetDetail(_0x2ab0d1[_0x4c9825(0x11a)]),_0xa74675=Array[_0x4c9825(0x117)](_0x50d06c[_0x4c9825(0x11b)])?_0x50d06c[_0x4c9825(0x11b)][_0x4c9825(0x127)](_0x3072c6=>_0x3072c6!=null&&typeof _0x3072c6===_0x4c9825(0x119)&&_0x3072c6['deleted']!==!![]):[];_0x39c82a[_0x4c9825(0x13d)](normalizeTarget(_0x2ab0d1,_0xa74675));}if(_0x39c82a[_0x4c9825(0x125)]===0x0){const _0x5bf0ff=_0x523683||(_0x15f6f7>0x0?'id='+_0x15f6f7:_0x4c9825(0x144)+_0x5eafc4);throw CliErrors[_0x4c9825(0x131)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x5bf0ff+'.');}const _0x683dbc=_0x219813['num']('expected-count');if(_0x683dbc>0x0&&_0x39c82a[_0x4c9825(0x125)]!==_0x683dbc)throw CliErrors['validation']('Matched\x20'+_0x39c82a['length']+_0x4c9825(0x10e)+_0x683dbc+'.');return _0x39c82a;}function normalizeTarget(_0x5233ee,_0x3e7db1){const _0x1c0a01=a74_0x10713d,_0x21c675=_0x5233ee[_0x1c0a01(0x116)]??{},_0x1b2be4=_0x3e7db1[_0x1c0a01(0x13e)](_0x4ed9c5=>{const _0x1a1f3d=_0x1c0a01;if(_0x4ed9c5==null||typeof _0x4ed9c5!==_0x1a1f3d(0x119))return null;const _0x5a6bc0=_0x4ed9c5,_0x385d95=Number(_0x5a6bc0['id']);if(!Number[_0x1a1f3d(0x112)](_0x385d95)||_0x385d95<=0x0)return null;const _0x4f87b2=_0x5a6bc0[_0x1a1f3d(0x12e)]??_0x5a6bc0[_0x1a1f3d(0x132)];return{'id':_0x385d95,..._0x4f87b2?{'name':String(_0x4f87b2)}:{},..._0x5a6bc0[_0x1a1f3d(0x138)]?{'type':String(_0x5a6bc0[_0x1a1f3d(0x138)])}:{}};})[_0x1c0a01(0x127)](_0x53659a=>_0x53659a!==null);return{'id':_0x5233ee['id'],'code':_0x5233ee[_0x1c0a01(0x11a)],'name':_0x5233ee['name'],'description':_0x5233ee[_0x1c0a01(0x140)],'source':_0x5233ee[_0x1c0a01(0x133)],'dbId':_0x21c675[_0x1c0a01(0x109)],'dbName':_0x21c675[_0x1c0a01(0x111)],'tableName':_0x21c675[_0x1c0a01(0x10f)],'relatedPageCount':_0x1b2be4[_0x1c0a01(0x125)],'relatedPages':_0x1b2be4};}function a74_0x1027(_0x98e8d3,_0x24bd0a){_0x98e8d3=_0x98e8d3-0x109;const _0x222d35=a74_0x222d();let _0x102756=_0x222d35[_0x98e8d3];return _0x102756;}function a74_0x222d(){const _0x2bf36b=['push','map','cascade','description','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','add','8964iufqyz','dbid=','Would\x20delete\x20','number','/smartapi/dataset/delete?cascade=','bool','dbId','3344728KwAsYG','Would\x20safely\x20delete\x20','message','595164nkQBbj','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','tableName','delete','dbName','isInteger','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s)','dbid','dbtableConfig','isArray','\x20failed','object','code','relatedPageInfoList','10470lFPsEk','num','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','POST','false','confirm','1044zALNuX','6HsdNbe','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','length','boolean','filter','3916857iGBRYi','Required\x20to\x20execute\x20dataset\x20deletion','\x20--appcode\x20','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','str','dataset','title','relatedPages','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','validation','name','source','Dataset\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','high-risk-write','appCode','type','3839936iGhOXA','978330ptKmoa','14285TvHPdY','Deleted\x20'];a74_0x222d=function(){return _0x2bf36b;};return a74_0x222d();}function buildPageRestoreCommands(_0x3fcca6,_0x27b45b){const _0xefb553=a74_0x10713d,_0x22c170=new Set();for(const _0x5e4040 of _0x27b45b){for(const _0x36d7af of _0x5e4040[_0xefb553(0x12f)])_0x22c170[_0xefb553(0x142)](_0x36d7af['id']);}return[..._0x22c170][_0xefb553(0x13e)](_0x51081f=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x51081f+_0xefb553(0x12a)+_0x3fcca6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a75_0x562b19=a75_0x7cf2;(function(_0x5da933,_0x3a255e){const _0x5ea302=a75_0x7cf2,_0x1ac089=_0x5da933();while(!![]){try{const _0x1b68cc=parseInt(_0x5ea302(0x19d))/0x1*(-parseInt(_0x5ea302(0x19e))/0x2)+parseInt(_0x5ea302(0x1a2))/0x3+parseInt(_0x5ea302(0x19f))/0x4*(parseInt(_0x5ea302(0x1a7))/0x5)+-parseInt(_0x5ea302(0x1a4))/0x6+parseInt(_0x5ea302(0x19c))/0x7*(parseInt(_0x5ea302(0x1a6))/0x8)+-parseInt(_0x5ea302(0x1a5))/0x9+parseInt(_0x5ea302(0x1a0))/0xa*(parseInt(_0x5ea302(0x1a3))/0xb);if(_0x1b68cc===_0x3a255e)break;else _0x1ac089['push'](_0x1ac089['shift']());}catch(_0x8b16e6){_0x1ac089['push'](_0x1ac089['shift']());}}}(a75_0x1638,0x7ea9e));function a75_0x1638(){const _0x36d372=['53444eoWmUX','21632CzJSnu','12679330HOQift','context','1363266tksmeU','11LCVPmT','4545720bxpTrh','6594021yqkoKV','6915632BlDHgP','380imgQJz','7uMevwG','37pIwuGh'];a75_0x1638=function(){return _0x36d372;};return a75_0x1638();}function a75_0x7cf2(_0x26a02e,_0x13fc5d){_0x26a02e=_0x26a02e-0x19c;const _0x16384f=a75_0x1638();let _0x7cf209=_0x16384f[_0x26a02e];return _0x7cf209;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0x562b19(0x1a1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a76_0x36cd30=a76_0x196e;function a76_0x196e(_0x31cbbd,_0x82ac83){_0x31cbbd=_0x31cbbd-0xa4;const _0x5a0af4=a76_0x5a0a();let _0x196e16=_0x5a0af4[_0x31cbbd];return _0x196e16;}function a76_0x5a0a(){const _0xa9ffc5=['46504nFHqzM','2304124ZkSpaX','125437UamCzm','1080ZuzoFC','3PqqXzL','84310HexfUI','3655841sicKaO','231gRoczO','158226OdHwvy','9iWlwvP','495HUiDCS','128195mSFMMX','36VjMUTY','start'];a76_0x5a0a=function(){return _0xa9ffc5;};return a76_0x5a0a();}(function(_0x20e15f,_0x5576ab){const _0x4ecc20=a76_0x196e,_0x3d4005=_0x20e15f();while(!![]){try{const _0x2e3090=-parseInt(_0x4ecc20(0xae))/0x1*(parseInt(_0x4ecc20(0xad))/0x2)+-parseInt(_0x4ecc20(0xa9))/0x3*(parseInt(_0x4ecc20(0xa6))/0x4)+parseInt(_0x4ecc20(0xb0))/0x5*(-parseInt(_0x4ecc20(0xb1))/0x6)+parseInt(_0x4ecc20(0xab))/0x7+parseInt(_0x4ecc20(0xa5))/0x8*(parseInt(_0x4ecc20(0xaf))/0x9)+-parseInt(_0x4ecc20(0xaa))/0xa*(-parseInt(_0x4ecc20(0xac))/0xb)+-parseInt(_0x4ecc20(0xa8))/0xc*(-parseInt(_0x4ecc20(0xa7))/0xd);if(_0x2e3090===_0x5576ab)break;else _0x3d4005['push'](_0x3d4005['shift']());}catch(_0x59749a){_0x3d4005['push'](_0x3d4005['shift']());}}}(a76_0x5a0a,0x6cc75));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand(a76_0x36cd30(0xa4));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x2d79d4=a77_0x2d1e;(function(_0x3164e6,_0xa0b39d){const _0xb3af0d=a77_0x2d1e,_0x1455b6=_0x3164e6();while(!![]){try{const _0xc363a9=-parseInt(_0xb3af0d(0x15a))/0x1*(-parseInt(_0xb3af0d(0x152))/0x2)+parseInt(_0xb3af0d(0x156))/0x3*(-parseInt(_0xb3af0d(0x157))/0x4)+parseInt(_0xb3af0d(0x151))/0x5*(-parseInt(_0xb3af0d(0x154))/0x6)+-parseInt(_0xb3af0d(0x155))/0x7+-parseInt(_0xb3af0d(0x153))/0x8+-parseInt(_0xb3af0d(0x159))/0x9+parseInt(_0xb3af0d(0x150))/0xa;if(_0xc363a9===_0xa0b39d)break;else _0x1455b6['push'](_0x1455b6['shift']());}catch(_0x1e5bf7){_0x1455b6['push'](_0x1455b6['shift']());}}}(a77_0xf139,0x992d7));function a77_0x2d1e(_0x3ea22b,_0x1e194b){_0x3ea22b=_0x3ea22b-0x150;const _0xf139f1=a77_0xf139();let _0x2d1e8e=_0xf139f1[_0x3ea22b];return _0x2d1e8e;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand(a77_0x2d79d4(0x158));function a77_0xf139(){const _0x41cb3a=['4045993zEYjlv','6InRXtl','1070548yPasdq','status','373608fDnDKU','203330hDaClL','20692910mpMlsm','1149655KQhJUE','2IAcKKv','2083920qWCPMr','6QzlgKP'];a77_0xf139=function(){return _0x41cb3a;};return a77_0xf139();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x20a9f9=a78_0x1232;(function(_0x53feef,_0x23d5aa){const _0x13800c=a78_0x1232,_0x5dc3cf=_0x53feef();while(!![]){try{const _0x499a22=parseInt(_0x13800c(0x1e6))/0x1+-parseInt(_0x13800c(0x1e9))/0x2*(-parseInt(_0x13800c(0x1e2))/0x3)+-parseInt(_0x13800c(0x1e7))/0x4+parseInt(_0x13800c(0x1e0))/0x5*(-parseInt(_0x13800c(0x1e8))/0x6)+parseInt(_0x13800c(0x1e1))/0x7*(parseInt(_0x13800c(0x1e4))/0x8)+parseInt(_0x13800c(0x1df))/0x9*(-parseInt(_0x13800c(0x1e3))/0xa)+parseInt(_0x13800c(0x1ea))/0xb;if(_0x499a22===_0x23d5aa)break;else _0x5dc3cf['push'](_0x5dc3cf['shift']());}catch(_0x2de79e){_0x5dc3cf['push'](_0x5dc3cf['shift']());}}}(a78_0x13f7,0x3c28d));function a78_0x1232(_0x33b5e4,_0x1474b7){_0x33b5e4=_0x33b5e4-0x1df;const _0x13f752=a78_0x13f7();let _0x12321d=_0x13f752[_0x33b5e4];return _0x12321d;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand(a78_0x20a9f9(0x1e5));function a78_0x13f7(){const _0x1e865d=['3693ynQVng','20NgkpnO','133344BEmVBd','sync-retry','292718dPuimK','403048XnAZon','25608ggffft','44YUqclm','6463479iFdlTw','1644993cUoREn','560cHVLbw','119hnpOMX'];a78_0x13f7=function(){return _0x1e865d;};return a78_0x13f7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a79_0x3e5b21=a79_0x142e;(function(_0x1c85bd,_0x8169b8){const _0x573e0e=a79_0x142e,_0x249fd8=_0x1c85bd();while(!![]){try{const _0x547cee=-parseInt(_0x573e0e(0x104))/0x1*(parseInt(_0x573e0e(0x10c))/0x2)+parseInt(_0x573e0e(0x108))/0x3+-parseInt(_0x573e0e(0x107))/0x4+-parseInt(_0x573e0e(0x105))/0x5*(parseInt(_0x573e0e(0x10e))/0x6)+parseInt(_0x573e0e(0x109))/0x7*(-parseInt(_0x573e0e(0x10a))/0x8)+-parseInt(_0x573e0e(0x106))/0x9*(-parseInt(_0x573e0e(0x10f))/0xa)+parseInt(_0x573e0e(0x10d))/0xb;if(_0x547cee===_0x8169b8)break;else _0x249fd8['push'](_0x249fd8['shift']());}catch(_0x12af2c){_0x249fd8['push'](_0x249fd8['shift']());}}}(a79_0x4b26,0xf1f88));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand(a79_0x3e5b21(0x10b));function a79_0x142e(_0x61a9d7,_0x5c8442){_0x61a9d7=_0x61a9d7-0x104;const _0x4b264c=a79_0x4b26();let _0x142e1a=_0x4b264c[_0x61a9d7];return _0x142e1a;}function a79_0x4b26(){const _0x18ea67=['24556928qgPGGT','786WAUhCE','10lSjpBS','13027uWbpzg','15005CjiGnY','11215863GpQTuU','7653904yfJNPj','2506356ZKRCFC','7023527NpiGnP','8ylGkOy','sync-status','2kLoFAm'];a79_0x4b26=function(){return _0x18ea67;};return a79_0x4b26();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x1223ed=a80_0x10ac;function a80_0x5474(){const _0x26c5e8=['1437385ZfUYDA','883616dWiYbp','validate','18ioIQoP','412hrajvG','13851910FIolDI','11TxuGgj','518nsshbZ','108786HzCWqc','11628QmXMrt','1083492ptRqVM','1557872oeKyWi','8gcWUhq','910sahArJ'];a80_0x5474=function(){return _0x26c5e8;};return a80_0x5474();}(function(_0x4bcd95,_0x3eee6d){const _0x43fa7a=a80_0x10ac,_0x487550=_0x4bcd95();while(!![]){try{const _0x5e33c3=-parseInt(_0x43fa7a(0x1e6))/0x1+-parseInt(_0x43fa7a(0x1df))/0x2*(parseInt(_0x43fa7a(0x1e4))/0x3)+parseInt(_0x43fa7a(0x1e7))/0x4*(-parseInt(_0x43fa7a(0x1db))/0x5)+parseInt(_0x43fa7a(0x1e3))/0x6*(-parseInt(_0x43fa7a(0x1e2))/0x7)+-parseInt(_0x43fa7a(0x1dc))/0x8*(-parseInt(_0x43fa7a(0x1de))/0x9)+parseInt(_0x43fa7a(0x1e0))/0xa*(-parseInt(_0x43fa7a(0x1e1))/0xb)+parseInt(_0x43fa7a(0x1e5))/0xc*(parseInt(_0x43fa7a(0x1e8))/0xd);if(_0x5e33c3===_0x3eee6d)break;else _0x487550['push'](_0x487550['shift']());}catch(_0x5a1f4a){_0x487550['push'](_0x487550['shift']());}}}(a80_0x5474,0xd79a3));function a80_0x10ac(_0x15ea10,_0x357147){_0x15ea10=_0x15ea10-0x1db;const _0x547416=a80_0x5474();let _0x10ac7e=_0x547416[_0x15ea10];return _0x10ac7e;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x1223ed(0x1dd));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a81_0x1fd13f=a81_0x4163;(function(_0x579db1,_0x361aec){const _0x5d52e1=a81_0x4163,_0x1e5c9d=_0x579db1();while(!![]){try{const _0x2e5748=parseInt(_0x5d52e1(0x20e))/0x1*(parseInt(_0x5d52e1(0x217))/0x2)+-parseInt(_0x5d52e1(0x220))/0x3*(parseInt(_0x5d52e1(0x22c))/0x4)+parseInt(_0x5d52e1(0x229))/0x5*(-parseInt(_0x5d52e1(0x224))/0x6)+-parseInt(_0x5d52e1(0x1fe))/0x7*(parseInt(_0x5d52e1(0x1f9))/0x8)+-parseInt(_0x5d52e1(0x1f1))/0x9+-parseInt(_0x5d52e1(0x1fb))/0xa*(parseInt(_0x5d52e1(0x233))/0xb)+-parseInt(_0x5d52e1(0x232))/0xc*(-parseInt(_0x5d52e1(0x21a))/0xd);if(_0x2e5748===_0x361aec)break;else _0x1e5c9d['push'](_0x1e5c9d['shift']());}catch(_0x565ed5){_0x1e5c9d['push'](_0x1e5c9d['shift']());}}}(a81_0x48be,0x591cf));import{getDatasetDetail}from'../../core/api-client.js';function a81_0x48be(){const _0x28c97a=['sourceType','properties','filter','12maxdlt','dblinkInfoDTO','dataType','allFields','host','1531105ngIXmn','trim','formatRules','1468GMtknb','length','modelCode','object','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','toFieldLabel','19238988HOPNRu','2497PRPIbP','title','beforeScriptId','indexes','requestFields','doType','fields','createTimeField','method','type','datasetKey','alias','updateTimeField','relationId','map','toDatasetCode','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','split','validateRules','required','2391543PqrBdv','tableName','fromField','path','pkField','options','toTableName','string','16424PFrsnB','extend','850KzFqQm','relatedPageInfoList','description','1554dbtelj','afterScriptId','source','columnCodeListWithDeleted','str','dbName','dataset','creatorNameField','modifierIdField','push','code','toDatasetName','name','logicField','responseBody','displayName','44724AFQPWQ','read','modifierNameField','dbId','requestBody','doVersion','dbtableConfig','isArray','entries','10hIlgFe','creatorIdField','modelId','13mRyfBz','main_sub','operations','bizRelationType','responseFields','deleted','888HVJAkf'];a81_0x48be=function(){return _0x28c97a;};return a81_0x48be();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a81_0x4163(_0x1156b6,_0x533b1a){_0x1156b6=_0x1156b6-0x1ec;const _0x48bef7=a81_0x48be();let _0x416371=_0x48bef7[_0x1156b6];return _0x416371;}function normalizeField(_0x10556e){const _0x2855bc=a81_0x4163;if(_0x10556e[_0x2855bc(0x21f)])return null;const _0x56ef09=Boolean(_0x10556e[_0x2855bc(0x20d)]!==undefined||_0x10556e[_0x2855bc(0x238)]!==undefined);let _0x4cd3ee={};if(!_0x56ef09&&typeof _0x10556e[_0x2855bc(0x1fa)]===_0x2855bc(0x1f8))try{_0x4cd3ee=JSON['parse'](_0x10556e[_0x2855bc(0x1fa)]);}catch{}const _0x5ccfff=_0x56ef09?_0x10556e['name']:_0x10556e['code'],_0x16bbd3=_0x56ef09?_0x10556e[_0x2855bc(0x20d)]:_0x10556e['name'],_0x18f1ad=_0x56ef09?_0x10556e[_0x2855bc(0x238)]:_0x10556e[_0x2855bc(0x23c)]||_0x10556e[_0x2855bc(0x226)],_0x4e29c4=_0x56ef09?_0x10556e[_0x2855bc(0x1f5)]===!![]:_0x4cd3ee[_0x2855bc(0x1f5)]===!![],_0x272187=_0x56ef09?_0x10556e['required']===!![]:_0x4cd3ee[_0x2855bc(0x1f0)]===!![],_0x534910=_0x56ef09?_0x10556e[_0x2855bc(0x1f6)]??null:_0x4cd3ee[_0x2855bc(0x1f6)]??null,_0x1a0a0a={'name':_0x5ccfff,'displayName':_0x16bbd3||_0x5ccfff,'type':_0x18f1ad,'dbType':_0x10556e['dbType'],'pk':_0x4e29c4,'required':_0x272187,'deprecated':_0x10556e['deprecated']===!![],'description':_0x10556e[_0x2855bc(0x1fd)]||undefined};return Array[_0x2855bc(0x215)](_0x534910)&&_0x534910[_0x2855bc(0x22d)]>0x0&&(_0x1a0a0a['options']=_0x534910),_0x1a0a0a;}function parseJsonMaybe(_0x46ab51){if(typeof _0x46ab51!=='string')return _0x46ab51;try{return JSON['parse'](_0x46ab51);}catch{return _0x46ab51;}}function normalizeOperationEntry(_0x270c39,_0x52ae5b){const _0x359fe2=a81_0x4163;if(!_0x52ae5b||typeof _0x52ae5b!=='object')return null;if(!_0x52ae5b[_0x359fe2(0x23b)]||!_0x52ae5b[_0x359fe2(0x1f4)])return null;const _0x2fec1c={'name':_0x270c39,'method':_0x52ae5b[_0x359fe2(0x23b)],'path':_0x52ae5b[_0x359fe2(0x1f4)]};if(_0x52ae5b[_0x359fe2(0x228)])_0x2fec1c[_0x359fe2(0x228)]=_0x52ae5b[_0x359fe2(0x228)];if(_0x52ae5b[_0x359fe2(0x212)]!=null){const _0x131ba6=parseJsonMaybe(_0x52ae5b[_0x359fe2(0x212)]);_0x2fec1c[_0x359fe2(0x212)]=_0x131ba6;}if(_0x52ae5b[_0x359fe2(0x20c)]!=null){const _0x281640=parseJsonMaybe(_0x52ae5b['responseBody']);_0x2fec1c[_0x359fe2(0x20c)]=_0x281640;}if(_0x52ae5b[_0x359fe2(0x235)]!=null)_0x2fec1c[_0x359fe2(0x235)]=_0x52ae5b[_0x359fe2(0x235)];if(_0x52ae5b[_0x359fe2(0x1ff)]!=null)_0x2fec1c[_0x359fe2(0x1ff)]=_0x52ae5b[_0x359fe2(0x1ff)];if(Array['isArray'](_0x52ae5b['requestFields']))_0x2fec1c[_0x359fe2(0x237)]=_0x52ae5b[_0x359fe2(0x237)];if(Array[_0x359fe2(0x215)](_0x52ae5b[_0x359fe2(0x21e)]))_0x2fec1c['responseFields']=_0x52ae5b[_0x359fe2(0x21e)];return _0x2fec1c;}function summarizeDbtable(_0xd3facc){const _0x470010=a81_0x4163,_0x138595={},_0x8b5cbf=[_0x470010(0x211),'dbName','tableName',_0x470010(0x23d),_0x470010(0x1f5),_0x470010(0x227),_0x470010(0x20b),_0x470010(0x23a),_0x470010(0x23f),_0x470010(0x218),_0x470010(0x205),_0x470010(0x206),_0x470010(0x210),'labelField',_0x470010(0x225)];for(const _0x148121 of _0x8b5cbf){if(_0xd3facc[_0x148121]!==undefined)_0x138595[_0x148121]=_0xd3facc[_0x148121];}return typeof _0x138595[_0x470010(0x227)]===_0x470010(0x1f8)&&_0x138595[_0x470010(0x227)]['length']>0x0&&(_0x138595['allFieldNames']=_0x138595[_0x470010(0x227)][_0x470010(0x1ee)](',')[_0x470010(0x241)](_0x3ba997=>_0x3ba997[_0x470010(0x22a)]())['filter'](Boolean)),_0x138595;}function normalizeRelatedPages(_0x11cf5e){const _0x4887ba=a81_0x4163;if(!Array[_0x4887ba(0x215)](_0x11cf5e))return[];return _0x11cf5e['filter'](_0x3915b2=>_0x3915b2&&typeof _0x3915b2===_0x4887ba(0x22f))['map'](_0x548f5c=>({'id':_0x548f5c['id'],'type':_0x548f5c['type'],'code':_0x548f5c[_0x4887ba(0x208)],'title':_0x548f5c[_0x4887ba(0x234)],'deleted':_0x548f5c[_0x4887ba(0x21f)]===!![]}));}export const datasetDetail={'service':'dataset','command':'detail','description':a81_0x1fd13f(0x230),'risk':a81_0x1fd13f(0x20f),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0x1fd13f(0x23e),'type':a81_0x1fd13f(0x1f8),'description':a81_0x1fd13f(0x1ed)}],async 'execute'(_0x229487){const _0x17f4e4=a81_0x1fd13f,_0x4653f3=await getDatasetDetail(_0x229487[_0x17f4e4(0x202)](_0x17f4e4(0x208))),_0x24528c=Array[_0x17f4e4(0x215)](_0x4653f3[_0x17f4e4(0x239)])?_0x4653f3['fields']:Array['isArray'](_0x4653f3[_0x17f4e4(0x222)])?_0x4653f3[_0x17f4e4(0x222)]:[],_0x518d94=_0x24528c['map'](_0x2ec67b=>normalizeField(_0x2ec67b))[_0x17f4e4(0x223)](_0x1248ac=>_0x1248ac!==null),_0x3deee5=_0x4653f3[_0x17f4e4(0x21c)]??{},_0x443f17=[];for(const [_0x2b7a39,_0x493826]of Object[_0x17f4e4(0x216)](_0x3deee5)){const _0x1094c3=normalizeOperationEntry(_0x2b7a39,_0x493826);if(_0x1094c3)_0x443f17[_0x17f4e4(0x207)](_0x1094c3);}const _0x530a68=_0x4653f3[_0x17f4e4(0x214)]??{},_0x5b33e0=_0x4653f3[_0x17f4e4(0x204)]??{},_0x1662bb=_0x530a68['dbId']!=null?{'id':_0x530a68['dbId'],'name':_0x530a68[_0x17f4e4(0x203)]??null}:undefined;let _0x27d1a7;return typeof _0x4653f3['extend']===_0x17f4e4(0x1f8)&&(_0x27d1a7=parseJsonMaybe(_0x4653f3[_0x17f4e4(0x1fa)])),{'ok':!![],'data':{'id':_0x4653f3[_0x17f4e4(0x219)]??_0x4653f3['id'],'name':_0x4653f3[_0x17f4e4(0x20a)],'code':_0x4653f3[_0x17f4e4(0x22e)]||_0x4653f3[_0x17f4e4(0x208)],'doVersion':_0x4653f3[_0x17f4e4(0x213)],'description':_0x4653f3['description']||_0x5b33e0['tableComment']||undefined,'source':_0x4653f3[_0x17f4e4(0x200)]||_0x5b33e0[_0x17f4e4(0x221)],'table':_0x530a68[_0x17f4e4(0x1f2)]||_0x5b33e0[_0x17f4e4(0x1f2)],'datasetKey':_0x530a68[_0x17f4e4(0x23d)],'pk':_0x530a68[_0x17f4e4(0x1f5)],'db':_0x1662bb,'dbtable':summarizeDbtable(_0x530a68),'fields':_0x518d94,'operations':_0x443f17,'indexes':Array['isArray'](_0x5b33e0['indexes'])?_0x5b33e0[_0x17f4e4(0x236)]:[],'relations':Array[_0x17f4e4(0x215)](_0x4653f3['relations'])?_0x4653f3['relations']['map'](_0x2b17c0=>({..._0x2b17c0['relationId']!=null?{'relationId':_0x2b17c0[_0x17f4e4(0x240)]}:{},'fromDataset':_0x4653f3['name'],'fromCode':_0x4653f3['modelCode']||_0x4653f3['code'],'fromTable':_0x530a68[_0x17f4e4(0x1f2)]||_0x5b33e0[_0x17f4e4(0x1f2)],'fromField':_0x2b17c0[_0x17f4e4(0x1f3)],'toDataset':_0x2b17c0[_0x17f4e4(0x209)],'toCode':_0x2b17c0[_0x17f4e4(0x1ec)],'toTable':_0x2b17c0[_0x17f4e4(0x1f7)],'toField':_0x2b17c0['toField'],'labelField':_0x2b17c0[_0x17f4e4(0x231)]||undefined,'cardinality':_0x2b17c0['cardinality']||undefined,'bizRelationType':_0x2b17c0[_0x17f4e4(0x21d)]===_0x17f4e4(0x21b)?_0x17f4e4(0x21b):null})):[],'relatedPages':normalizeRelatedPages(_0x4653f3[_0x17f4e4(0x1fc)]),...Array['isArray'](_0x4653f3[_0x17f4e4(0x201)])?{'columnCodeListWithDeleted':_0x4653f3[_0x17f4e4(0x201)]}:{},'formatRules':Array[_0x17f4e4(0x215)](_0x4653f3['formatRules'])?_0x4653f3[_0x17f4e4(0x22b)]:[],'validateRules':Array[_0x17f4e4(0x215)](_0x4653f3[_0x17f4e4(0x1ef)])?_0x4653f3[_0x17f4e4(0x1ef)]:[],..._0x27d1a7!==undefined?{'extend':_0x27d1a7}:{},'stats':{'fieldCount':_0x518d94[_0x17f4e4(0x22d)],'operationCount':_0x443f17[_0x17f4e4(0x22d)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a82_0x23ac(_0x3ca5c0,_0x54b800){_0x3ca5c0=_0x3ca5c0-0x103;const _0x411699=a82_0x4116();let _0x23ac03=_0x411699[_0x3ca5c0];return _0x23ac03;}const a82_0x299af5=a82_0x23ac;(function(_0x1baa74,_0x323122){const _0x318e99=a82_0x23ac,_0x2a686a=_0x1baa74();while(!![]){try{const _0xfa860b=parseInt(_0x318e99(0x10f))/0x1*(parseInt(_0x318e99(0x111))/0x2)+-parseInt(_0x318e99(0x134))/0x3+parseInt(_0x318e99(0x135))/0x4+-parseInt(_0x318e99(0x127))/0x5+-parseInt(_0x318e99(0x128))/0x6*(-parseInt(_0x318e99(0x12a))/0x7)+parseInt(_0x318e99(0x130))/0x8+-parseInt(_0x318e99(0x140))/0x9*(parseInt(_0x318e99(0x10b))/0xa);if(_0xfa860b===_0x323122)break;else _0x2a686a['push'](_0x2a686a['shift']());}catch(_0x536f2f){_0x2a686a['push'](_0x2a686a['shift']());}}}(a82_0x4116,0xef0b1));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a82_0x299af5(0x11b)}]]);export function parseJsonObjectFlag(_0x1f0dc2,_0x267609){const _0x5efda6=a82_0x299af5;if(!_0x1f0dc2)return undefined;let _0x20c84c;try{_0x20c84c=JSON[_0x5efda6(0x112)](_0x1f0dc2);}catch(_0xf29c7f){const _0x2844ed=_0xf29c7f instanceof Error?_0xf29c7f[_0x5efda6(0x12c)]:String(_0xf29c7f);throw CliErrors[_0x5efda6(0x10e)](_0x267609+_0x5efda6(0x12e)+_0x2844ed);}if(!isPlainObject(_0x20c84c)||Array[_0x5efda6(0x10c)](_0x20c84c))throw CliErrors['validation'](_0x267609+_0x5efda6(0x125));return _0x20c84c;}export function validateExtendPatchKeys(_0x39ef8f){const _0x2e0f64=a82_0x299af5,_0x723b71=Object['keys'](_0x39ef8f);if(_0x723b71[_0x2e0f64(0x126)]===0x0)throw CliErrors[_0x2e0f64(0x10e)](_0x2e0f64(0x131));for(const _0x43ee96 of _0x723b71){const _0xbd96fe=EXTEND_PATCH_REDIRECTS['get'](_0x43ee96);if(_0xbd96fe)throw CliErrors[_0x2e0f64(0x10e)](_0xbd96fe[_0x2e0f64(0x12c)],_0xbd96fe[_0x2e0f64(0x138)]);if(!MUTABLE_EXTEND_KEYS[_0x2e0f64(0x13b)](_0x43ee96))throw CliErrors[_0x2e0f64(0x10e)]('Unsupported\x20patch\x20key:\x20'+_0x43ee96,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x293ad3=a82_0x299af5,_0x1be964=Array['from'](MUTABLE_EXTEND_KEYS)[_0x293ad3(0x11d)]();return _0x1be964[_0x293ad3(0x126)]>0x0?_0x293ad3(0x142)+_0x1be964[_0x293ad3(0x137)](',\x20'):_0x293ad3(0x10d);}export function applyExtendPatch(_0x4136e9,_0x18cbdd){const _0x5b3641=a82_0x299af5;validateExtendPatchKeys(_0x18cbdd);const _0x255da7=deepClone(_0x4136e9),_0x5c907a=[];for(const [_0x4a5fbd,_0x17971f]of Object['entries'](_0x18cbdd)){const _0x547009=_0x255da7[_0x4a5fbd],_0x2c2a37=deepClone(_0x17971f);!deepEqual(_0x547009,_0x2c2a37)&&(_0x255da7[_0x4a5fbd]=_0x2c2a37,_0x5c907a[_0x5b3641(0x13d)](_0x5b3641(0x122)+_0x4a5fbd));}return _0x5c907a[_0x5b3641(0x11d)](),{'after':_0x255da7,'changedPaths':_0x5c907a,'changed':_0x5c907a[_0x5b3641(0x126)]>0x0};}export function assertExpectation(_0x29eb05,_0x345616){const _0x4337b1=a82_0x299af5;if(!_0x345616)return;for(const [_0x518790,_0x4b76f9]of Object[_0x4337b1(0x119)](_0x345616)){const _0x233018=_0x29eb05[_0x518790];if(!deepEqual(_0x233018,_0x4b76f9))throw CliErrors['validation'](_0x4337b1(0x108)+_0x518790,'Expected\x20'+JSON[_0x4337b1(0x117)](_0x4b76f9)+_0x4337b1(0x109)+JSON[_0x4337b1(0x117)](_0x233018));}}export async function buildDatasetExtendUpdateResult({appCode:_0x3dc285,input:_0x3872eb,dryRun:_0x33420f}){const _0x124a50=a82_0x299af5;validateInput(_0x3872eb);const _0x59353e=await getDatasetDetail(_0x3872eb[_0x124a50(0x141)]),_0x26e56f=parseDatasetExtend(_0x59353e[_0x124a50(0x136)]),_0x219beb=deepClone(_0x26e56f[_0x124a50(0x11f)]);assertExpectation(_0x219beb,_0x3872eb[_0x124a50(0x11e)]);const {after:_0x14e84e,changedPaths:_0x5610ed,changed:_0x3120f5}=applyExtendPatch(_0x219beb,_0x3872eb[_0x124a50(0x110)]),_0x30e621=summarizeDataset(_0x59353e,_0x3872eb['code']);return _0x3120f5&&!_0x33420f&&(_0x59353e[_0x124a50(0x136)]=serializeDatasetExtend(_0x14e84e,_0x26e56f[_0x124a50(0x106)]),await updateDrivenData(_0x59353e)),{'ok':!![],'data':{'appCode':_0x3dc285,'selector':{'code':_0x3872eb[_0x124a50(0x141)]},'dataset':_0x30e621,'dryRun':_0x33420f,'changed':_0x3120f5,'changedPaths':_0x5610ed,'before':{'extend':_0x219beb},'after':{'extend':_0x14e84e},'submitted':_0x3120f5&&!_0x33420f},'message':_0x3120f5?_0x33420f?_0x124a50(0x118)+_0x5610ed[_0x124a50(0x137)](',\x20')+')':_0x124a50(0x114)+_0x5610ed[_0x124a50(0x137)](',\x20')+')':_0x124a50(0x13c)};}export const datasetExtendUpdate={'service':a82_0x299af5(0x103),'command':'extend-update','description':a82_0x299af5(0x12f),'risk':a82_0x299af5(0x13f),'flags':[CODE_FLAG,{'name':'patch-json','type':a82_0x299af5(0x115),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':'expect-json','type':a82_0x299af5(0x115),'required':![],'description':a82_0x299af5(0x133)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4d3d4a){validateInput(readExtendUpdateInput(_0x4d3d4a));},async 'dryRun'(_0x3869f8){const _0x208590=a82_0x299af5,_0x13f5ca=await buildDatasetExtendUpdateResult({'appCode':_0x3869f8[_0x208590(0x132)],'input':readExtendUpdateInput(_0x3869f8),'dryRun':!![]});return{'method':_0x208590(0x107),'url':'/smartapi/dataset/update-driven-data','body':_0x13f5ca[_0x208590(0x104)],'description':_0x13f5ca[_0x208590(0x12c)]};},async 'execute'(_0x43c8a0){const _0x492288=a82_0x299af5;return buildDatasetExtendUpdateResult({'appCode':_0x43c8a0[_0x492288(0x132)],'input':readExtendUpdateInput(_0x43c8a0),'dryRun':![]});}};function readExtendUpdateInput(_0x43b26a){const _0x33e862=a82_0x299af5,_0x107312=trim(_0x43b26a['str']('code')),_0x5f00e3=parseJsonObjectFlag(_0x43b26a['str'](_0x33e862(0x124)),_0x33e862(0x123)),_0x148e80=parseJsonObjectFlag(_0x43b26a['str'](_0x33e862(0x116)),_0x33e862(0x121));return{'code':_0x107312,'patch':_0x5f00e3||{},'expect':_0x148e80};}function validateInput(_0x71dd0){const _0x28009c=a82_0x299af5;if(!_0x71dd0[_0x28009c(0x141)])throw CliErrors[_0x28009c(0x10e)]('--code\x20is\x20required');validateExtendPatchKeys(_0x71dd0[_0x28009c(0x110)]);}function parseDatasetExtend(_0x1c9536){const _0x349a25=a82_0x299af5;if(typeof _0x1c9536===_0x349a25(0x115)){const _0x2a6de3=_0x1c9536[_0x349a25(0x12b)]();if(!_0x2a6de3)return{'value':{},'shape':_0x349a25(0x115)};let _0xfef7bb;try{_0xfef7bb=JSON['parse'](_0x2a6de3);}catch(_0x3982c7){const _0x10f357=_0x3982c7 instanceof Error?_0x3982c7[_0x349a25(0x12c)]:String(_0x3982c7);throw CliErrors[_0x349a25(0x10e)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x10f357);}if(!isPlainObject(_0xfef7bb)||Array[_0x349a25(0x10c)](_0xfef7bb))throw CliErrors[_0x349a25(0x10e)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0xfef7bb,'shape':'string'};}if(_0x1c9536===undefined||_0x1c9536===null)return{'value':{},'shape':_0x349a25(0x115)};if(!isPlainObject(_0x1c9536)||Array[_0x349a25(0x10c)](_0x1c9536))throw CliErrors[_0x349a25(0x10e)](_0x349a25(0x13a));return{'value':_0x1c9536,'shape':'object'};}function serializeDatasetExtend(_0xfdabd8,_0x531bf7){const _0x44994a=a82_0x299af5;return _0x531bf7===_0x44994a(0x115)?JSON['stringify'](_0xfdabd8):_0xfdabd8;}function summarizeDataset(_0xa664bd,_0x32f0ad){const _0x2e0332=a82_0x299af5,_0x5ad270=isPlainObject(_0xa664bd['dataset'])?_0xa664bd[_0x2e0332(0x103)]:{},_0x342537=isPlainObject(_0xa664bd[_0x2e0332(0x11a)])?_0xa664bd[_0x2e0332(0x11a)]:{};return{'id':_0xa664bd[_0x2e0332(0x129)]??_0xa664bd['id']??_0x5ad270[_0x2e0332(0x105)]??null,'code':_0xa664bd[_0x2e0332(0x120)]??_0xa664bd['code']??_0x5ad270[_0x2e0332(0x13e)]??_0x32f0ad,'name':_0xa664bd[_0x2e0332(0x10a)]??_0x5ad270[_0x2e0332(0x11c)]??null,'table':_0x342537[_0x2e0332(0x12d)]??_0x5ad270[_0x2e0332(0x12d)]??null,'db':_0x342537[_0x2e0332(0x139)]??_0x342537[_0x2e0332(0x113)]??null};}function a82_0x4116(){const _0x280623=['datasetCode','write','25398QRSZPo','code','Allowed\x20keys:\x20','dataset','data','datasetId','shape','POST','Expectation\x20mismatch\x20at\x20extend.',',\x20actual\x20','name','950twHKeg','isArray','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','validation','263JzfFcG','patch','6418GdyXvO','parse','dbId','Updated\x20dataset\x20extend\x20(','string','expect-json','stringify','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','entries','dbtableConfig','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','datasetName','sort','expect','value','modelCode','--expect-json','extend.','--patch-json','patch-json','\x20must\x20be\x20a\x20JSON\x20object','length','5566820wRWLSA','10214826dBFJNG','modelId','7yDoFfg','trim','message','tableName','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Patch\x20dataset\x20top-level\x20extend\x20safely','1390648MIqSTC','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','appCode','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','1227996ZhbYFn','198552SgSDgh','extend','join','hint','dbName','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','has','No\x20changes\x20for\x20dataset\x20extend','push'];a82_0x4116=function(){return _0x280623;};return a82_0x4116();}function deepClone(_0x1efdc2){const _0xfa478=a82_0x299af5;if(_0x1efdc2===undefined)return _0x1efdc2;return JSON[_0xfa478(0x112)](JSON[_0xfa478(0x117)](_0x1efdc2));}function deepEqual(_0x33f9ab,_0x5b7ba1){const _0x1e7292=a82_0x299af5;return JSON[_0x1e7292(0x117)](_0x33f9ab)===JSON[_0x1e7292(0x117)](_0x5b7ba1);}function isPlainObject(_0x3fdb8c){return Boolean(_0x3fdb8c)&&typeof _0x3fdb8c==='object'&&!Array['isArray'](_0x3fdb8c);}function trim(_0x2e8e70){const _0x7721cf=String(_0x2e8e70||'')['trim']();return _0x7721cf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x2834a6=a83_0x54d5;(function(_0x2ee4b3,_0x2c8ce8){const _0x3fb7a4=a83_0x54d5,_0x1d40f8=_0x2ee4b3();while(!![]){try{const _0x1bb735=-parseInt(_0x3fb7a4(0x15a))/0x1+parseInt(_0x3fb7a4(0x147))/0x2*(-parseInt(_0x3fb7a4(0x138))/0x3)+parseInt(_0x3fb7a4(0x15f))/0x4+parseInt(_0x3fb7a4(0x166))/0x5*(-parseInt(_0x3fb7a4(0x13f))/0x6)+parseInt(_0x3fb7a4(0x148))/0x7*(parseInt(_0x3fb7a4(0x155))/0x8)+parseInt(_0x3fb7a4(0x15b))/0x9*(parseInt(_0x3fb7a4(0x13b))/0xa)+parseInt(_0x3fb7a4(0x159))/0xb;if(_0x1bb735===_0x2c8ce8)break;else _0x1d40f8['push'](_0x1d40f8['shift']());}catch(_0x124f84){_0x1d40f8['push'](_0x1d40f8['shift']());}}}(a83_0x3074,0x6ce37));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{normalizeUserDeletedField,resolveDataset}from'../../commands/dataset/user-deleted-field-list.js';import{getDatasetDetail,isPlatformTransportFailure,listUserDeletedDatasetColumns,restoreDatasetColumns}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a83_0x54d5(_0x4e5564,_0x3ad997){_0x4e5564=_0x4e5564-0x132;const _0x307477=a83_0x3074();let _0x54d5e7=_0x307477[_0x4e5564];return _0x54d5e7;}const PAGE_SYNC_WARNING='Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.',NO_RESUBMIT_WARNING='Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.';export async function buildDatasetFieldRestoreResult({appCode:_0x40069a,input:_0x3c93ba,dryRun:_0x445f34}){const _0x1b5422=a83_0x54d5,_0x3005e5=_0x3c93ba[_0x1b5422(0x154)][_0x1b5422(0x142)](),_0x21f7bd=_0x3c93ba[_0x1b5422(0x14a)][_0x1b5422(0x142)]();if(!_0x3005e5)throw CliErrors[_0x1b5422(0x149)](_0x1b5422(0x160));if(!_0x21f7bd)throw CliErrors[_0x1b5422(0x149)]('--field\x20is\x20required');const _0xf87950=await getDatasetDetail(_0x3005e5),_0x3d3d61=resolveDataset(_0xf87950,_0x3005e5),_0x226ae7=(await listUserDeletedDatasetColumns(_0x3d3d61['id']))[_0x1b5422(0x143)](normalizeUserDeletedField),_0x2828e5=_0x226ae7[_0x1b5422(0x156)](_0x507363=>_0x507363[_0x1b5422(0x154)]===_0x21f7bd);if(_0x2828e5[_0x1b5422(0x150)]===0x0)throw CliErrors[_0x1b5422(0x149)](_0x1b5422(0x146)+_0x21f7bd,_0x1b5422(0x13e));if(_0x2828e5['length']>0x1)throw CliErrors[_0x1b5422(0x149)](_0x1b5422(0x167)+_0x21f7bd,_0x1b5422(0x158));const _0xcc533e=_0x2828e5[0x0],_0x2e6a5f={'id':_0xcc533e['id'],'code':_0xcc533e[_0x1b5422(0x154)],'displayName':_0xcc533e['displayName'],'deleted':![],'active':!![]},_0x553221={'operation':_0x1b5422(0x165),'appCode':_0x40069a,'selector':{'code':_0x3005e5,'field':_0x21f7bd},'dataset':_0x3d3d61,'before':_0xcc533e,'dryRun':_0x445f34,'warnings':[PAGE_SYNC_WARNING]};if(_0x445f34)return{'ok':!![],'data':{..._0x553221,'after':_0x2e6a5f,'backend':{'submitted':![],'requestedColumnIds':[_0xcc533e['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x1b5422(0x14e)+_0x21f7bd+'\x20would\x20be\x20restored'};let _0x3bdf97=null,_0x28b3dc=![];try{_0x3bdf97=await restoreDatasetColumns(_0x3d3d61['id'],[_0xcc533e['id']]);}catch(_0x5c8b07){if(!isPlatformTransportFailure(_0x5c8b07))throw _0x5c8b07;_0x28b3dc=!![];}const _0x28ce8f={'submitted':!![],'requestedColumnIds':[_0xcc533e['id']],'restoredCount':_0x3bdf97,..._0x28b3dc?{'outcome':_0x1b5422(0x162)}:{}};let _0x118235,_0x5061b3;try{[_0x118235,_0x5061b3]=await Promise[_0x1b5422(0x14c)]([listUserDeletedDatasetColumns(_0x3d3d61['id']),getDatasetDetail(_0x3005e5)]);}catch{return{'ok':![],'data':{..._0x553221,'after':null,'backend':_0x28ce8f,'warnings':[..._0x553221[_0x1b5422(0x135)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x28b3dc?_0x1b5422(0x140):'readback-failed'}},'message':_0x28b3dc?'Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20'+_0x21f7bd+'.\x20'+NO_RESUBMIT_WARNING:_0x1b5422(0x13d)+_0x21f7bd+'.\x20'+NO_RESUBMIT_WARNING};}const _0x72d123=!_0x118235[_0x1b5422(0x152)](_0x35eed3=>Number(_0x35eed3['id'])===_0xcc533e['id']||_0x35eed3['code']===_0x21f7bd),_0x34ac34=findActiveField(_0x5061b3,_0xcc533e['id'],_0x21f7bd),_0x1af5db=_0x34ac34!==null,_0x372762=!_0x28b3dc&&_0x3bdf97===0x1&&_0x72d123&&_0x1af5db,_0x2fa871={'performed':!![],'deletedListCleared':_0x72d123,'activeFieldPresent':_0x1af5db,'passed':_0x372762,..._0x28b3dc?{'reason':'mutation-outcome-unknown'}:_0x3bdf97!==0x1?{'reason':'server-restored-count-mismatch'}:{}};return{'ok':_0x372762,'data':{..._0x553221,'after':_0x34ac34,'backend':_0x28ce8f,'warnings':_0x372762?_0x553221[_0x1b5422(0x135)]:[..._0x553221[_0x1b5422(0x135)],NO_RESUBMIT_WARNING],'verification':_0x2fa871},'message':_0x372762?_0x1b5422(0x14b)+_0x21f7bd:_0x28b3dc?'Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20'+_0x21f7bd+'.\x20'+NO_RESUBMIT_WARNING:'Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20'+_0x21f7bd+'.\x20'+NO_RESUBMIT_WARNING};}function a83_0x3074(){const _0x7804d6=['confirm','requestedColumnIds','/smartapi/dataset/restore-column','1912172tmRebF','--code\x20is\x20required','displayName','unknown','Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','dataset','field-restore','70175Szpzmy','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','isArray','object','appCode','fields','warnings','deleted','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','3nhWdhC','write','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','41030ktckAy','string','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','372SBfWKL','mutation-outcome-unknown','data','trim','map','properties','--field\x20is\x20required','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','838942QckTOd','539FkKLSm','validation','field','Restored\x20Dataset\x20field\x20','all','message','Dry-run:\x20Dataset\x20field\x20','str','length','backend','some','name','code','75304jpBXvR','filter','yes','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','2362371RsGRRQ','6094sLbFLv','711TYimCZ'];a83_0x3074=function(){return _0x7804d6;};return a83_0x3074();}export const datasetFieldRestore={'service':a83_0x2834a6(0x164),'command':a83_0x2834a6(0x165),'description':a83_0x2834a6(0x163),'risk':a83_0x2834a6(0x139),'structuredErrors':!![],'rejectedFlags':[{'name':'all','message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':a83_0x2834a6(0x168)},{'name':a83_0x2834a6(0x134),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','hint':a83_0x2834a6(0x168)},{'name':a83_0x2834a6(0x157),'message':a83_0x2834a6(0x13a),'hint':a83_0x2834a6(0x137)},{'name':a83_0x2834a6(0x15c),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x2834a6(0x137)}],'flags':[CODE_FLAG,{'name':a83_0x2834a6(0x14a),'type':a83_0x2834a6(0x13c),'required':!![],'description':a83_0x2834a6(0x169)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x526cd3){readInput(_0x526cd3);},async 'dryRun'(_0x5c92cb){const _0x21d475=a83_0x2834a6,_0x35af65=await buildDatasetFieldRestoreResult({'appCode':_0x5c92cb[_0x21d475(0x133)],'input':readInput(_0x5c92cb),'dryRun':!![]});return asDryRunResult({..._0x35af65[_0x21d475(0x141)],'body':{'datasetId':_0x35af65[_0x21d475(0x141)][_0x21d475(0x164)]['id'],'columnIds':_0x35af65['data'][_0x21d475(0x151)][_0x21d475(0x15d)]}},{'method':'POST','url':_0x21d475(0x15e),'description':_0x35af65[_0x21d475(0x14d)]});},async 'execute'(_0xfe609d){const _0x293c96=a83_0x2834a6;return buildDatasetFieldRestoreResult({'appCode':_0xfe609d[_0x293c96(0x133)],'input':readInput(_0xfe609d),'dryRun':![]});}};function readInput(_0x1638a5){const _0x5d5e8e=a83_0x2834a6,_0x4b42fa={'code':String(_0x1638a5[_0x5d5e8e(0x14f)]('code')||'')[_0x5d5e8e(0x142)](),'field':String(_0x1638a5[_0x5d5e8e(0x14f)]('field')||'')['trim']()};if(!_0x4b42fa[_0x5d5e8e(0x154)])throw CliErrors[_0x5d5e8e(0x149)](_0x5d5e8e(0x160));if(!_0x4b42fa[_0x5d5e8e(0x14a)])throw CliErrors[_0x5d5e8e(0x149)](_0x5d5e8e(0x145));return _0x4b42fa;}function findActiveField(_0xf73b3d,_0x317b86,_0x2ed207){const _0x1a237f=a83_0x2834a6,_0x454a98=Array[_0x1a237f(0x16a)](_0xf73b3d[_0x1a237f(0x134)]),_0x5e12e7=_0x454a98?_0xf73b3d[_0x1a237f(0x134)]:Array[_0x1a237f(0x16a)](_0xf73b3d['properties'])?_0xf73b3d[_0x1a237f(0x144)]:[];for(const _0x335775 of _0x5e12e7){if(!_0x335775||typeof _0x335775!==_0x1a237f(0x132))continue;const _0x5d47d0=_0x335775,_0x8de14e=_0x454a98?_0x5d47d0['name']:_0x5d47d0[_0x1a237f(0x154)],_0x2cba49=_0x5d47d0[_0x1a237f(0x136)]!==!![]&&Number(_0x5d47d0['id'])===_0x317b86&&_0x8de14e===_0x2ed207;if(!_0x2cba49)continue;const _0x16ccec=_0x454a98?_0x5d47d0[_0x1a237f(0x161)]:_0x5d47d0[_0x1a237f(0x153)];return{'id':_0x317b86,'code':_0x2ed207,'displayName':typeof _0x16ccec===_0x1a237f(0x13c)&&_0x16ccec?_0x16ccec:_0x2ed207,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x8b3b6f=a84_0x42bd;(function(_0x35ae79,_0x2f7c76){const _0x4f0807=a84_0x42bd,_0x184ab1=_0x35ae79();while(!![]){try{const _0x47713c=parseInt(_0x4f0807(0x10b))/0x1*(parseInt(_0x4f0807(0xdb))/0x2)+parseInt(_0x4f0807(0xcb))/0x3+-parseInt(_0x4f0807(0xd4))/0x4+-parseInt(_0x4f0807(0x110))/0x5+-parseInt(_0x4f0807(0x10c))/0x6*(parseInt(_0x4f0807(0xfd))/0x7)+-parseInt(_0x4f0807(0xcc))/0x8*(parseInt(_0x4f0807(0xd9))/0x9)+parseInt(_0x4f0807(0xf5))/0xa;if(_0x47713c===_0x2f7c76)break;else _0x184ab1['push'](_0x184ab1['shift']());}catch(_0x407845){_0x184ab1['push'](_0x184ab1['shift']());}}}(a84_0x5505,0x826ff));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a84_0x42bd(_0x54f72e,_0x1725f4){_0x54f72e=_0x54f72e-0xc6;const _0x5505de=a84_0x5505();let _0x42bde8=_0x5505de[_0x54f72e];return _0x42bde8;}const MUTABLE_FIELD_KEYS=new Set([a84_0x8b3b6f(0xee),'displayName',a84_0x8b3b6f(0xdf),a84_0x8b3b6f(0xfa),'required','datetimeFormat',a84_0x8b3b6f(0xed),'chartRole',a84_0x8b3b6f(0x107)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x8b3b6f(0x113),'code',a84_0x8b3b6f(0xc7),a84_0x8b3b6f(0xcf),a84_0x8b3b6f(0xd6),a84_0x8b3b6f(0x108),a84_0x8b3b6f(0xf7),a84_0x8b3b6f(0xf6),'pkField',a84_0x8b3b6f(0xfb),a84_0x8b3b6f(0xd0)]);export function parseJsonObjectFlag(_0x562f11,_0x6eae51){const _0x5616b4=a84_0x8b3b6f;if(!_0x562f11)return undefined;let _0xaf98f7;try{_0xaf98f7=JSON[_0x5616b4(0x105)](_0x562f11);}catch(_0x143168){const _0x50c55e=_0x143168 instanceof Error?_0x143168[_0x5616b4(0x10a)]:String(_0x143168);throw CliErrors[_0x5616b4(0xe4)](_0x6eae51+_0x5616b4(0xf4)+_0x50c55e);}if(!isPlainObject(_0xaf98f7)||Array[_0x5616b4(0xe1)](_0xaf98f7))throw CliErrors[_0x5616b4(0xe4)](_0x6eae51+'\x20must\x20be\x20a\x20JSON\x20object');return _0xaf98f7;}export function validatePatchKeys(_0x4c3da8){const _0x3eb695=a84_0x8b3b6f,_0x5cfff8=Object[_0x3eb695(0xeb)](_0x4c3da8);if(_0x5cfff8[_0x3eb695(0xd7)]===0x0)throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0xc9));for(const _0xdaf79d of _0x5cfff8){if(FORBIDDEN_FIELD_KEYS[_0x3eb695(0xf0)](_0xdaf79d))throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0x101)+_0xdaf79d);if(!MUTABLE_FIELD_KEYS[_0x3eb695(0xf0)](_0xdaf79d))throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0xf3)+_0xdaf79d,'Allowed\x20keys:\x20'+Array[_0x3eb695(0xf9)](MUTABLE_FIELD_KEYS)[_0x3eb695(0xe9)](',\x20'));}}function a84_0x5505(){const _0x3f4c35=['1570060nWbAfW','expect','dbTypeScale','length','Expected\x20','2220147yUGRsH','Exact\x20raw\x20fields[].name\x20to\x20patch','2cEApZv','dbId','write','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','description','--field\x20is\x20required','isArray','add','Expectation\x20mismatch\x20at\x20','validation','datasetId','dataset','field','modelId','join','stringify','keys','object','defaultAggregation','doType','entries','has','datasetName','properties','Unsupported\x20patch\x20key:\x20','\x20must\x20be\x20valid\x20JSON\x20object:\x20','21720860PrtytL','deleted','tableName','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','from','options','autoIncrement','modelCode','2997505pUznwZ','dbtableConfig','fields','/smartapi/dataset/update-driven-data','Forbidden\x20patch\x20key:\x20','expect-json','--code\x20is\x20required','str','parse','datasetCode','deprecated','dbFieldName','appCode','message','600923EZpHKA','6xhQCnx','trim','\x20would\x20change\x20(','patch-json','5219270DcjiNn','patch','code','name','data','string','dbType',',\x20actual\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','1097685NDURxB','24GQSsab','Dry-run:\x20dataset\x20field\x20','No\x20changes\x20for\x20dataset\x20field\x20','dbTypeLen','systemRetain','sort','--expect-json','dbName'];a84_0x5505=function(){return _0x3f4c35;};return a84_0x5505();}export function applyFieldPatch(_0x5bc60a,_0x593ad3){const _0x229f69=a84_0x8b3b6f;validatePatchKeys(_0x593ad3);const _0x30eea5=deepClone(_0x5bc60a),_0x12de2b=new Set();for(const [_0xbf0405,_0x5ec5ee]of Object[_0x229f69(0xef)](_0x593ad3)){const _0x30a82c=_0x30eea5[_0xbf0405],_0x1c2011=mergePatchValue(_0x30a82c,_0x5ec5ee);!deepEqual(_0x30a82c,_0x1c2011)&&(_0x30eea5[_0xbf0405]=_0x1c2011,_0x12de2b['add'](_0xbf0405),collectChangedPaths(_0xbf0405,_0x30a82c,_0x1c2011,_0x12de2b));}return{'after':_0x30eea5,'changedPaths':Array['from'](_0x12de2b)[_0x229f69(0xd1)](),'changed':_0x12de2b['size']>0x0};}export function assertExpectation(_0x28ea9d,_0x2a1232){const _0x5cd2a9=a84_0x8b3b6f;if(!_0x2a1232)return;for(const [_0x1e7adc,_0x278241]of Object[_0x5cd2a9(0xef)](_0x2a1232)){const _0x3443d4=_0x28ea9d[_0x1e7adc];if(!deepEqual(_0x3443d4,_0x278241))throw CliErrors[_0x5cd2a9(0xe4)](_0x5cd2a9(0xe3)+_0x1e7adc,_0x5cd2a9(0xd8)+JSON[_0x5cd2a9(0xea)](_0x278241)+_0x5cd2a9(0xc8)+JSON[_0x5cd2a9(0xea)](_0x3443d4));}}export async function buildDatasetFieldUpdateResult({appCode:_0x58a49b,input:_0x2d3634,dryRun:_0x9b9be}){const _0x3c04ff=a84_0x8b3b6f;validateInput(_0x2d3634);const _0x51d399=await getDatasetDetail(_0x2d3634[_0x3c04ff(0x112)]),_0x2cf073=readFieldArray(_0x51d399),_0x17c03a=_0x2cf073['findIndex'](_0x271086=>_0x271086?.[_0x3c04ff(0x113)]===_0x2d3634['field']);if(_0x17c03a<0x0)throw CliErrors['validation']('Field\x20not\x20found:\x20'+_0x2d3634['field']);const _0x4e2421=deepClone(_0x2cf073[_0x17c03a]);assertExpectation(_0x4e2421,_0x2d3634[_0x3c04ff(0xd5)]);const {after:_0x22918f,changedPaths:_0xd58614,changed:_0x5e9e54}=applyFieldPatch(_0x4e2421,_0x2d3634[_0x3c04ff(0x111)]),_0x482335=summarizeDataset(_0x51d399,_0x2d3634[_0x3c04ff(0x112)]);return _0x5e9e54&&!_0x9b9be&&(_0x2cf073[_0x17c03a]=_0x22918f,await updateDrivenData(_0x51d399)),{'ok':!![],'data':{'appCode':_0x58a49b,'selector':{'code':_0x2d3634[_0x3c04ff(0x112)]},'dataset':_0x482335,'field':{'id':_0x4e2421['id']??null,'name':_0x4e2421[_0x3c04ff(0x113)]},'dryRun':_0x9b9be,'changed':_0x5e9e54,'changedPaths':_0xd58614,'before':_0x4e2421,'after':_0x22918f,'submitted':_0x5e9e54&&!_0x9b9be},'message':_0x5e9e54?_0x9b9be?_0x3c04ff(0xcd)+_0x2d3634['field']+_0x3c04ff(0x10e)+_0xd58614['join'](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x2d3634[_0x3c04ff(0xe7)]+'\x20('+_0xd58614['join'](',\x20')+')':_0x3c04ff(0xce)+_0x2d3634[_0x3c04ff(0xe7)]};}export const datasetFieldUpdate={'service':a84_0x8b3b6f(0xe6),'command':'field-update','description':a84_0x8b3b6f(0xde),'risk':a84_0x8b3b6f(0xdd),'flags':[CODE_FLAG,{'name':a84_0x8b3b6f(0xe7),'type':'string','required':!![],'description':a84_0x8b3b6f(0xda)},{'name':a84_0x8b3b6f(0x10f),'type':a84_0x8b3b6f(0xc6),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a84_0x8b3b6f(0x102),'type':a84_0x8b3b6f(0xc6),'required':![],'description':a84_0x8b3b6f(0xf8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x43ceff){validateInput(readFieldUpdateInput(_0x43ceff));},async 'dryRun'(_0x2514fa){const _0x33b183=a84_0x8b3b6f,_0x27f6c5=await buildDatasetFieldUpdateResult({'appCode':_0x2514fa[_0x33b183(0x109)],'input':readFieldUpdateInput(_0x2514fa),'dryRun':!![]});return{'method':'POST','url':_0x33b183(0x100),'body':_0x27f6c5[_0x33b183(0x114)],'description':_0x27f6c5['message']};},async 'execute'(_0x35b9da){const _0x4554c5=a84_0x8b3b6f;return buildDatasetFieldUpdateResult({'appCode':_0x35b9da[_0x4554c5(0x109)],'input':readFieldUpdateInput(_0x35b9da),'dryRun':![]});}};function readFieldUpdateInput(_0x2c70ee){const _0x2e4573=a84_0x8b3b6f,_0x4248b0=trim(_0x2c70ee[_0x2e4573(0x104)](_0x2e4573(0x112))),_0x222cc3=emptyToUndefined(_0x2c70ee['str'](_0x2e4573(0xe7))),_0x16395f=parseJsonObjectFlag(_0x2c70ee[_0x2e4573(0x104)]('patch-json'),'--patch-json'),_0x27905d=parseJsonObjectFlag(_0x2c70ee[_0x2e4573(0x104)]('expect-json'),_0x2e4573(0xd2));return{'code':_0x4248b0,'field':_0x222cc3||'','patch':_0x16395f||{},'expect':_0x27905d};}function validateInput(_0x5689f8){const _0x4c97d4=a84_0x8b3b6f;if(!_0x5689f8[_0x4c97d4(0x112)])throw CliErrors[_0x4c97d4(0xe4)](_0x4c97d4(0x103));if(!_0x5689f8[_0x4c97d4(0xe7)])throw CliErrors[_0x4c97d4(0xe4)](_0x4c97d4(0xe0));validatePatchKeys(_0x5689f8['patch']);}function readFieldArray(_0x227fcb){const _0x58f191=a84_0x8b3b6f;if(Array[_0x58f191(0xe1)](_0x227fcb[_0x58f191(0xff)]))return _0x227fcb[_0x58f191(0xff)];if(Array[_0x58f191(0xe1)](_0x227fcb['properties']))return _0x227fcb[_0x58f191(0xf2)];throw CliErrors[_0x58f191(0xe4)](_0x58f191(0xca));}function summarizeDataset(_0x52d661,_0x5e725a){const _0x450062=a84_0x8b3b6f,_0x4bb7a9=isPlainObject(_0x52d661[_0x450062(0xe6)])?_0x52d661[_0x450062(0xe6)]:{},_0x2bf5d9=isPlainObject(_0x52d661['dbtableConfig'])?_0x52d661[_0x450062(0xfe)]:{};return{'id':_0x52d661[_0x450062(0xe8)]??_0x52d661['id']??_0x4bb7a9[_0x450062(0xe5)]??null,'code':_0x52d661[_0x450062(0xfc)]??_0x52d661['code']??_0x4bb7a9[_0x450062(0x106)]??_0x5e725a,'name':_0x52d661[_0x450062(0x113)]??_0x4bb7a9[_0x450062(0xf1)]??null,'table':_0x2bf5d9[_0x450062(0xf7)]??_0x4bb7a9['tableName']??null,'db':_0x2bf5d9[_0x450062(0xd3)]??_0x2bf5d9[_0x450062(0xdc)]??null};}function mergePatchValue(_0x284a3d,_0xd9dd4c){if(isPlainObject(_0x284a3d)&&isPlainObject(_0xd9dd4c))return deepMerge(_0x284a3d,_0xd9dd4c);return deepClone(_0xd9dd4c);}function deepMerge(_0x8801b3,_0x3b2c64){const _0x32d7dc=a84_0x8b3b6f,_0x4e4248=deepClone(_0x8801b3);for(const [_0x542e36,_0x2c3688]of Object[_0x32d7dc(0xef)](_0x3b2c64)){_0x4e4248[_0x542e36]=isPlainObject(_0x4e4248[_0x542e36])&&isPlainObject(_0x2c3688)?deepMerge(_0x4e4248[_0x542e36],_0x2c3688):deepClone(_0x2c3688);}return _0x4e4248;}function collectChangedPaths(_0x3fbdfa,_0x1b2ae2,_0x1553ea,_0x555dd2){const _0x123f33=a84_0x8b3b6f;if(!isPlainObject(_0x1b2ae2)||!isPlainObject(_0x1553ea))return;const _0x13285e=new Set([...Object[_0x123f33(0xeb)](_0x1b2ae2),...Object[_0x123f33(0xeb)](_0x1553ea)]);for(const _0x3a0108 of _0x13285e){const _0x2b7350=_0x1b2ae2[_0x3a0108],_0xd62c35=_0x1553ea[_0x3a0108];!deepEqual(_0x2b7350,_0xd62c35)&&_0x555dd2[_0x123f33(0xe2)](_0x3fbdfa+'.'+_0x3a0108);}}function deepClone(_0x4d075d){const _0x3dad87=a84_0x8b3b6f;if(_0x4d075d===undefined)return _0x4d075d;return JSON[_0x3dad87(0x105)](JSON[_0x3dad87(0xea)](_0x4d075d));}function deepEqual(_0x1be07f,_0x2a98ab){const _0x2ea2d3=a84_0x8b3b6f;return JSON[_0x2ea2d3(0xea)](_0x1be07f)===JSON[_0x2ea2d3(0xea)](_0x2a98ab);}function isPlainObject(_0x461e96){const _0x6ddefd=a84_0x8b3b6f;return Boolean(_0x461e96)&&typeof _0x461e96===_0x6ddefd(0xec)&&!Array['isArray'](_0x461e96);}function emptyToUndefined(_0x5c1143){const _0x265e24=String(_0x5c1143||'')['trim']();return _0x265e24||undefined;}function trim(_0x2f89ae){const _0x5db11f=a84_0x8b3b6f;return String(_0x2f89ae||'')[_0x5db11f(0x10d)]();}
|
|
1
|
+
const a84_0x13715f=a84_0x736d;(function(_0x3f6f73,_0x1a0e94){const _0x1aab1e=a84_0x736d,_0x3e3c1b=_0x3f6f73();while(!![]){try{const _0x4f8ad0=parseInt(_0x1aab1e(0xac))/0x1+parseInt(_0x1aab1e(0x92))/0x2+-parseInt(_0x1aab1e(0x8a))/0x3*(-parseInt(_0x1aab1e(0xaf))/0x4)+parseInt(_0x1aab1e(0xb7))/0x5*(parseInt(_0x1aab1e(0x91))/0x6)+parseInt(_0x1aab1e(0x98))/0x7*(parseInt(_0x1aab1e(0xab))/0x8)+parseInt(_0x1aab1e(0xa0))/0x9+-parseInt(_0x1aab1e(0xa9))/0xa;if(_0x4f8ad0===_0x1a0e94)break;else _0x3e3c1b['push'](_0x3e3c1b['shift']());}catch(_0x38bf80){_0x3e3c1b['push'](_0x3e3c1b['shift']());}}}(a84_0x5412,0xdaec0));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a84_0x13715f(0x9d),a84_0x13715f(0xb0),'options',a84_0x13715f(0xb5),a84_0x13715f(0xbf),'defaultAggregation','chartRole',a84_0x13715f(0xb8)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x13715f(0x83),a84_0x13715f(0xc4),'dbType',a84_0x13715f(0x8f),a84_0x13715f(0x97),'dbFieldName',a84_0x13715f(0xb6),a84_0x13715f(0x85),a84_0x13715f(0x86),a84_0x13715f(0x87),a84_0x13715f(0xa8)]);export function parseJsonObjectFlag(_0x26c4b0,_0x2459bf){const _0x2ada1d=a84_0x13715f;if(!_0x26c4b0)return undefined;let _0x39176e;try{_0x39176e=JSON['parse'](_0x26c4b0);}catch(_0x20e686){const _0x4088b8=_0x20e686 instanceof Error?_0x20e686['message']:String(_0x20e686);throw CliErrors[_0x2ada1d(0xc6)](_0x2459bf+_0x2ada1d(0xc3)+_0x4088b8);}if(!isPlainObject(_0x39176e)||Array[_0x2ada1d(0xc9)](_0x39176e))throw CliErrors[_0x2ada1d(0xc6)](_0x2459bf+'\x20must\x20be\x20a\x20JSON\x20object');return _0x39176e;}export function validatePatchKeys(_0x14ecdd){const _0x4bcbe5=a84_0x13715f,_0x474e14=Object[_0x4bcbe5(0xbe)](_0x14ecdd);if(_0x474e14[_0x4bcbe5(0xc7)]===0x0)throw CliErrors['validation'](_0x4bcbe5(0xbd));for(const _0x3fe62d of _0x474e14){if(FORBIDDEN_FIELD_KEYS[_0x4bcbe5(0x84)](_0x3fe62d))throw CliErrors['validation'](_0x4bcbe5(0x96)+_0x3fe62d);if(!MUTABLE_FIELD_KEYS[_0x4bcbe5(0x84)](_0x3fe62d))throw CliErrors[_0x4bcbe5(0xc6)]('Unsupported\x20patch\x20key:\x20'+_0x3fe62d,_0x4bcbe5(0x94)+Array['from'](MUTABLE_FIELD_KEYS)[_0x4bcbe5(0xc1)](',\x20'));}}export function applyFieldPatch(_0x34a87b,_0x306ae3){const _0x183fd0=a84_0x13715f;validatePatchKeys(_0x306ae3);const _0x36d7d6=deepClone(_0x34a87b),_0x1c210e=new Set();for(const [_0x11f452,_0x31d41b]of Object[_0x183fd0(0xc5)](_0x306ae3)){const _0x41a5c5=_0x36d7d6[_0x11f452],_0x4e51d0=mergePatchValue(_0x41a5c5,_0x31d41b);!deepEqual(_0x41a5c5,_0x4e51d0)&&(_0x36d7d6[_0x11f452]=_0x4e51d0,_0x1c210e[_0x183fd0(0x89)](_0x11f452),collectChangedPaths(_0x11f452,_0x41a5c5,_0x4e51d0,_0x1c210e));}return{'after':_0x36d7d6,'changedPaths':Array['from'](_0x1c210e)['sort'](),'changed':_0x1c210e[_0x183fd0(0x9a)]>0x0};}export function assertExpectation(_0x2c26df,_0x150f42){const _0x360e18=a84_0x13715f;if(!_0x150f42)return;for(const [_0x199468,_0xf7b0de]of Object[_0x360e18(0xc5)](_0x150f42)){const _0x26fb79=_0x2c26df[_0x199468];if(!deepEqual(_0x26fb79,_0xf7b0de))throw CliErrors[_0x360e18(0xc6)](_0x360e18(0xa1)+_0x199468,_0x360e18(0x9c)+JSON[_0x360e18(0xcb)](_0xf7b0de)+_0x360e18(0x9b)+JSON[_0x360e18(0xcb)](_0x26fb79));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4f90c7,input:_0x5c5df5,dryRun:_0x1e7f34}){const _0x262e64=a84_0x13715f;validateInput(_0x5c5df5);const _0xd6455c=await getDatasetDetail(_0x5c5df5[_0x262e64(0xc4)]),_0x3a2c04=readFieldArray(_0xd6455c),_0x1ef3dc=_0x3a2c04['findIndex'](_0xa55f01=>_0xa55f01?.[_0x262e64(0x83)]===_0x5c5df5[_0x262e64(0x90)]);if(_0x1ef3dc<0x0)throw CliErrors[_0x262e64(0xc6)](_0x262e64(0xbb)+_0x5c5df5[_0x262e64(0x90)]);const _0x556177=deepClone(_0x3a2c04[_0x1ef3dc]);assertExpectation(_0x556177,_0x5c5df5[_0x262e64(0xcc)]);const {after:_0x4ec537,changedPaths:_0x14bccb,changed:_0x4c25b3}=applyFieldPatch(_0x556177,_0x5c5df5[_0x262e64(0x9f)]),_0x42d12a=summarizeDataset(_0xd6455c,_0x5c5df5[_0x262e64(0xc4)]);return _0x4c25b3&&!_0x1e7f34&&(_0x3a2c04[_0x1ef3dc]=_0x4ec537,await updateDrivenData(_0xd6455c)),{'ok':!![],'data':{'appCode':_0x4f90c7,'selector':{'code':_0x5c5df5['code']},'dataset':_0x42d12a,'field':{'id':_0x556177['id']??null,'name':_0x556177[_0x262e64(0x83)]},'dryRun':_0x1e7f34,'changed':_0x4c25b3,'changedPaths':_0x14bccb,'before':_0x556177,'after':_0x4ec537,'submitted':_0x4c25b3&&!_0x1e7f34},'message':_0x4c25b3?_0x1e7f34?_0x262e64(0x8b)+_0x5c5df5['field']+'\x20would\x20change\x20('+_0x14bccb[_0x262e64(0xc1)](',\x20')+')':_0x262e64(0x95)+_0x5c5df5[_0x262e64(0x90)]+'\x20('+_0x14bccb[_0x262e64(0xc1)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x5c5df5['field']};}export const datasetFieldUpdate={'service':'dataset','command':a84_0x13715f(0xb3),'description':a84_0x13715f(0x93),'risk':a84_0x13715f(0xa7),'flags':[CODE_FLAG,{'name':a84_0x13715f(0x90),'type':a84_0x13715f(0xad),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a84_0x13715f(0xa6),'type':a84_0x13715f(0xad),'required':!![],'description':a84_0x13715f(0xb1)},{'name':a84_0x13715f(0xbc),'type':a84_0x13715f(0xad),'required':![],'description':a84_0x13715f(0x8e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f0146){validateInput(readFieldUpdateInput(_0x1f0146));},async 'dryRun'(_0x5efe12){const _0x2886c8=a84_0x13715f,_0x114f42=await buildDatasetFieldUpdateResult({'appCode':_0x5efe12[_0x2886c8(0xa5)],'input':readFieldUpdateInput(_0x5efe12),'dryRun':!![]});return{'method':_0x2886c8(0xc8),'url':_0x2886c8(0xca),'body':_0x114f42[_0x2886c8(0x9e)],'description':_0x114f42[_0x2886c8(0xa3)]};},async 'execute'(_0x25fc6b){return buildDatasetFieldUpdateResult({'appCode':_0x25fc6b['appCode'],'input':readFieldUpdateInput(_0x25fc6b),'dryRun':![]});}};function readFieldUpdateInput(_0x3eae94){const _0x196d40=a84_0x13715f,_0x5c7752=trim(_0x3eae94[_0x196d40(0xaa)]('code')),_0x29d850=emptyToUndefined(_0x3eae94['str']('field')),_0x4ca7c6=parseJsonObjectFlag(_0x3eae94[_0x196d40(0xaa)](_0x196d40(0xa6)),_0x196d40(0xba)),_0x1dc87c=parseJsonObjectFlag(_0x3eae94[_0x196d40(0xaa)]('expect-json'),_0x196d40(0xa4));return{'code':_0x5c7752,'field':_0x29d850||'','patch':_0x4ca7c6||{},'expect':_0x1dc87c};}function validateInput(_0x47f8af){const _0x2aa3fb=a84_0x13715f;if(!_0x47f8af[_0x2aa3fb(0xc4)])throw CliErrors[_0x2aa3fb(0xc6)]('--code\x20is\x20required');if(!_0x47f8af[_0x2aa3fb(0x90)])throw CliErrors[_0x2aa3fb(0xc6)]('--field\x20is\x20required');validatePatchKeys(_0x47f8af['patch']);}function readFieldArray(_0x1341b1){const _0x2b8acf=a84_0x13715f;if(Array[_0x2b8acf(0xc9)](_0x1341b1[_0x2b8acf(0xc0)]))return _0x1341b1['fields'];if(Array[_0x2b8acf(0xc9)](_0x1341b1[_0x2b8acf(0xb9)]))return _0x1341b1['properties'];throw CliErrors[_0x2b8acf(0xc6)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x5436b3,_0xe58c36){const _0x174f83=a84_0x13715f,_0x5a10ee=isPlainObject(_0x5436b3[_0x174f83(0x8d)])?_0x5436b3[_0x174f83(0x8d)]:{},_0x3ea09e=isPlainObject(_0x5436b3['dbtableConfig'])?_0x5436b3[_0x174f83(0xa2)]:{};return{'id':_0x5436b3[_0x174f83(0xb4)]??_0x5436b3['id']??_0x5a10ee[_0x174f83(0x88)]??null,'code':_0x5436b3['modelCode']??_0x5436b3[_0x174f83(0xc4)]??_0x5a10ee[_0x174f83(0xc2)]??_0xe58c36,'name':_0x5436b3[_0x174f83(0x83)]??_0x5a10ee[_0x174f83(0x82)]??null,'table':_0x3ea09e[_0x174f83(0xb6)]??_0x5a10ee[_0x174f83(0xb6)]??null,'db':_0x3ea09e[_0x174f83(0xb2)]??_0x3ea09e[_0x174f83(0xae)]??null};}function mergePatchValue(_0x42c9ae,_0x1d0a6e){if(isPlainObject(_0x42c9ae)&&isPlainObject(_0x1d0a6e))return deepMerge(_0x42c9ae,_0x1d0a6e);return deepClone(_0x1d0a6e);}function deepMerge(_0x117eda,_0x7ac425){const _0x11aaa4=deepClone(_0x117eda);for(const [_0x4c1eab,_0x39e05d]of Object['entries'](_0x7ac425)){_0x11aaa4[_0x4c1eab]=isPlainObject(_0x11aaa4[_0x4c1eab])&&isPlainObject(_0x39e05d)?deepMerge(_0x11aaa4[_0x4c1eab],_0x39e05d):deepClone(_0x39e05d);}return _0x11aaa4;}function collectChangedPaths(_0x22eb4c,_0x440c31,_0x1b27b3,_0x4e75a5){const _0x265644=a84_0x13715f;if(!isPlainObject(_0x440c31)||!isPlainObject(_0x1b27b3))return;const _0x1aabd3=new Set([...Object[_0x265644(0xbe)](_0x440c31),...Object[_0x265644(0xbe)](_0x1b27b3)]);for(const _0x35b802 of _0x1aabd3){const _0x3a985e=_0x440c31[_0x35b802],_0x4ecf64=_0x1b27b3[_0x35b802];!deepEqual(_0x3a985e,_0x4ecf64)&&_0x4e75a5['add'](_0x22eb4c+'.'+_0x35b802);}}function deepClone(_0x48c023){const _0x326aa4=a84_0x13715f;if(_0x48c023===undefined)return _0x48c023;return JSON['parse'](JSON[_0x326aa4(0xcb)](_0x48c023));}function deepEqual(_0x524163,_0x3fa4e6){const _0x389a12=a84_0x13715f;return JSON[_0x389a12(0xcb)](_0x524163)===JSON['stringify'](_0x3fa4e6);}function a84_0x5412(){const _0x4e91fa=['Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','Allowed\x20keys:\x20','Updated\x20dataset\x20field\x20','Forbidden\x20patch\x20key:\x20','dbTypeScale','7wKBIHf','trim','size',',\x20actual\x20','Expected\x20','displayName','data','patch','3784545VJShVe','Expectation\x20mismatch\x20at\x20','dbtableConfig','message','--expect-json','appCode','patch-json','write','systemRetain','27235520jeWmGV','str','10737392qamobt','254605DWyAmT','string','dbId','345164cnElxr','description','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','dbName','field-update','modelId','required','tableName','274990wjtOeU','deprecated','properties','--patch-json','Field\x20not\x20found:\x20','expect-json','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','keys','datetimeFormat','fields','join','datasetCode','\x20must\x20be\x20valid\x20JSON\x20object:\x20','code','entries','validation','length','POST','isArray','/smartapi/dataset/update-driven-data','stringify','expect','datasetName','name','has','deleted','pkField','autoIncrement','datasetId','add','21oesAVt','Dry-run:\x20dataset\x20field\x20','object','dataset','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','dbTypeLen','field','18qRppsl','1667882MVPGoZ'];a84_0x5412=function(){return _0x4e91fa;};return a84_0x5412();}function isPlainObject(_0x48997f){const _0x4a25be=a84_0x13715f;return Boolean(_0x48997f)&&typeof _0x48997f===_0x4a25be(0x8c)&&!Array[_0x4a25be(0xc9)](_0x48997f);}function emptyToUndefined(_0xc66af3){const _0x35bff8=a84_0x13715f,_0x175b41=String(_0xc66af3||'')[_0x35bff8(0x99)]();return _0x175b41||undefined;}function a84_0x736d(_0x120d44,_0x3499bf){_0x120d44=_0x120d44-0x82;const _0x54126f=a84_0x5412();let _0x736d07=_0x54126f[_0x120d44];return _0x736d07;}function trim(_0x5de0e0){const _0x19e61b=a84_0x13715f;return String(_0x5de0e0||'')[_0x19e61b(0x99)]();}
|