@lovrabet/rabetbase-cli 2.5.10-beta.4 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.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/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.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/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 +4 -4
- package/skills/rabetbase/SKILL.md +1 -1
- 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
|
-
const
|
|
1
|
+
const a74_0xb7b0c1=a74_0x4e99;(function(_0x269675,_0x494eaf){const _0x13cb20=a74_0x4e99,_0x244ba2=_0x269675();while(!![]){try{const _0x397429=parseInt(_0x13cb20(0x137))/0x1*(-parseInt(_0x13cb20(0x128))/0x2)+parseInt(_0x13cb20(0x123))/0x3*(parseInt(_0x13cb20(0x119))/0x4)+-parseInt(_0x13cb20(0x11f))/0x5*(parseInt(_0x13cb20(0x117))/0x6)+-parseInt(_0x13cb20(0x14a))/0x7+-parseInt(_0x13cb20(0x146))/0x8+parseInt(_0x13cb20(0x127))/0x9*(parseInt(_0x13cb20(0x13f))/0xa)+parseInt(_0x13cb20(0x12a))/0xb;if(_0x397429===_0x494eaf)break;else _0x244ba2['push'](_0x244ba2['shift']());}catch(_0x1cd742){_0x244ba2['push'](_0x244ba2['shift']());}}}(a74_0x2250,0x812ca));function a74_0x4e99(_0x377dae,_0x33533f){_0x377dae=_0x377dae-0x111;const _0x225084=a74_0x2250();let _0x4e994a=_0x225084[_0x377dae];return _0x4e994a;}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_0xb7b0c1(0x111),'description':a74_0xb7b0c1(0x118)},DBID_FLAG={'name':'dbid','type':a74_0xb7b0c1(0x111),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a74_0xb7b0c1(0x11b),'type':a74_0xb7b0c1(0x13d),'description':a74_0xb7b0c1(0x138)},CASCADE_FLAG={'name':a74_0xb7b0c1(0x132),'type':a74_0xb7b0c1(0x13d),'description':a74_0xb7b0c1(0x11e)},EXPECTED_COUNT_FLAG={'name':a74_0xb7b0c1(0x139),'type':a74_0xb7b0c1(0x111),'description':a74_0xb7b0c1(0x130)};export const datasetDelete={'service':a74_0xb7b0c1(0x151),'command':a74_0xb7b0c1(0x126),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a74_0xb7b0c1(0x147),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4197fc){const _0x5d4f31=a74_0xb7b0c1,_0x4289d1=_0x4197fc[_0x5d4f31(0x135)]('id'),_0x49af9c=_0x4197fc[_0x5d4f31(0x124)](_0x5d4f31(0x143)),_0x2adf1a=_0x4197fc[_0x5d4f31(0x135)]('dbid'),_0x3cb30d=[_0x4289d1>0x0,Boolean(_0x49af9c),_0x2adf1a>0x0][_0x5d4f31(0x116)](Boolean);if(_0x3cb30d[_0x5d4f31(0x14e)]===0x0)throw CliErrors['validation'](_0x5d4f31(0x125));if(_0x3cb30d[_0x5d4f31(0x14e)]>0x1)throw CliErrors[_0x5d4f31(0x114)](_0x5d4f31(0x141));},async 'dryRun'(_0x432040){const _0x5c16b9=a74_0xb7b0c1,_0x54855a=await resolveTargets(_0x432040),_0x4e722e=_0x432040['bool']('cascade');return{'method':_0x5c16b9(0x11a),'url':_0x5c16b9(0x140)+(_0x4e722e?'true':_0x5c16b9(0x150)),'body':{'count':_0x54855a[_0x5c16b9(0x14e)],'cascade':_0x4e722e,'datasets':_0x54855a},'description':_0x4e722e?_0x5c16b9(0x134)+_0x54855a['length']+_0x5c16b9(0x145):'Would\x20safely\x20delete\x20'+_0x54855a[_0x5c16b9(0x14e)]+_0x5c16b9(0x149)};},async 'execute'(_0xf9c95d){const _0x129464=a74_0xb7b0c1;if(!_0xf9c95d[_0x129464(0x133)]('confirm'))throw CliErrors[_0x129464(0x114)](_0x129464(0x112),_0x129464(0x148));const _0x57324d=await resolveTargets(_0xf9c95d),_0xb88773=_0xf9c95d[_0x129464(0x133)](_0x129464(0x132)),_0x423aec=[],_0x5c445b=[];for(const _0x91e1bb of _0x57324d){try{await deleteDataset(_0x91e1bb['id'],_0xb88773),_0x423aec[_0x129464(0x13a)](_0x91e1bb);}catch(_0x34f333){_0x5c445b['push']({..._0x91e1bb,'error':_0x34f333 instanceof Error?_0x34f333[_0x129464(0x12c)]:String(_0x34f333)});}}if(_0x5c445b[_0x129464(0x14e)]>0x0){const _0x450272=buildPageRestoreCommands(_0xf9c95d[_0x129464(0x13c)],_0xb88773?_0x423aec:[]);return{'ok':![],'data':{'requested':_0x57324d[_0x129464(0x14e)],'cascade':_0xb88773,'deletedCount':_0x423aec[_0x129464(0x14e)],'failedCount':_0x5c445b[_0x129464(0x14e)],'deleted':_0x423aec,'failed':_0x5c445b,'pageRestoreCommands':_0x450272},'message':_0x129464(0x13b)+_0x423aec[_0x129464(0x14e)]+'/'+_0x57324d[_0x129464(0x14e)]+_0x129464(0x144)+_0x5c445b['length']+_0x129464(0x12d)};}return{'ok':!![],'data':{'requested':_0x57324d['length'],'cascade':_0xb88773,'deletedCount':_0x423aec[_0x129464(0x14e)],'deleted':_0x423aec,'pageRestoreCommands':buildPageRestoreCommands(_0xf9c95d[_0x129464(0x13c)],_0xb88773?_0x423aec:[])},'message':_0x129464(0x13b)+_0x423aec[_0x129464(0x14e)]+'\x20dataset(s)'};}};async function resolveTargets(_0x2a51ef){const _0xa5ca7a=a74_0xb7b0c1,_0x2578c5=_0x2a51ef['num']('id'),_0x15f794=_0x2a51ef[_0xa5ca7a(0x124)]('code'),_0xf8d668=_0x2a51ef[_0xa5ca7a(0x135)](_0xa5ca7a(0x121));let _0x37ba93;_0x15f794?(_0x37ba93=await listDatasets(_0x2a51ef[_0xa5ca7a(0x13c)],{'code':_0x15f794}),_0x37ba93=_0x37ba93[_0xa5ca7a(0x116)](_0x2d5034=>_0x2d5034[_0xa5ca7a(0x143)]===_0x15f794)):(_0x37ba93=await listDatasets(_0x2a51ef[_0xa5ca7a(0x13c)]),_0x2578c5>0x0&&(_0x37ba93=_0x37ba93['filter'](_0x1bf9d2=>_0x1bf9d2['id']===_0x2578c5)),_0xf8d668>0x0&&(_0x37ba93=_0x37ba93['filter'](_0x151029=>_0x151029[_0xa5ca7a(0x120)]?.[_0xa5ca7a(0x122)]===_0xf8d668)));const _0x48bde4=[];for(const _0x56c86a of _0x37ba93){const _0x525f47=await getDatasetDetail(_0x56c86a[_0xa5ca7a(0x143)]),_0x288be2=Array['isArray'](_0x525f47[_0xa5ca7a(0x129)])?_0x525f47['relatedPageInfoList'][_0xa5ca7a(0x116)](_0x3f9a81=>_0x3f9a81!=null&&typeof _0x3f9a81===_0xa5ca7a(0x13e)&&_0x3f9a81['deleted']!==!![]):[];_0x48bde4[_0xa5ca7a(0x13a)](normalizeTarget(_0x56c86a,_0x288be2));}if(_0x48bde4['length']===0x0){const _0x5036a8=_0x15f794||(_0x2578c5>0x0?_0xa5ca7a(0x11c)+_0x2578c5:_0xa5ca7a(0x136)+_0xf8d668);throw CliErrors['validation'](_0xa5ca7a(0x115)+_0x5036a8+'.');}const _0x3c8ab6=_0x2a51ef[_0xa5ca7a(0x135)](_0xa5ca7a(0x139));if(_0x3c8ab6>0x0&&_0x48bde4[_0xa5ca7a(0x14e)]!==_0x3c8ab6)throw CliErrors[_0xa5ca7a(0x114)](_0xa5ca7a(0x14d)+_0x48bde4[_0xa5ca7a(0x14e)]+_0xa5ca7a(0x11d)+_0x3c8ab6+'.');return _0x48bde4;}function a74_0x2250(){const _0x18d6e7=['num','dbid=','593864GEKVjX','Required\x20to\x20execute\x20dataset\x20deletion','expected-count','push','Deleted\x20','appCode','boolean','object','170BlWJqa','/smartapi/dataset/delete?cascade=','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','\x20--appcode\x20','code','\x20dataset(s);\x20','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','799368aNJamS','high-risk-write','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','3820775dHFYvn','name','title','Matched\x20','length','dbName','false','dataset','relatedPages','number','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','add','validation','No\x20undeleted\x20dataset\x20found\x20for\x20','filter','4722eFqPlc','Dataset\x20id','49736RgFRjB','POST','confirm','id=','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','105srzcvo','dbtableConfig','dbid','dbId','120LglRLp','str','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','delete','276651ETBLhX','2GyiOtC','relatedPageInfoList','8418432RHWhTY','map','message','\x20failed','type','tableName','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','rabetbase\x20page\x20restore\x20--id\x20','cascade','bool','Would\x20delete\x20'];a74_0x2250=function(){return _0x18d6e7;};return a74_0x2250();}function normalizeTarget(_0x358d92,_0x30453a){const _0x1940d1=a74_0xb7b0c1,_0x238b79=_0x358d92[_0x1940d1(0x120)]??{},_0x4feb91=_0x30453a[_0x1940d1(0x12b)](_0x19c0d2=>{const _0x11d506=_0x1940d1;if(_0x19c0d2==null||typeof _0x19c0d2!=='object')return null;const _0x232093=_0x19c0d2,_0x3445ce=Number(_0x232093['id']);if(!Number['isInteger'](_0x3445ce)||_0x3445ce<=0x0)return null;const _0x59569b=_0x232093[_0x11d506(0x14c)]??_0x232093['name'];return{'id':_0x3445ce,..._0x59569b?{'name':String(_0x59569b)}:{},..._0x232093[_0x11d506(0x12e)]?{'type':String(_0x232093[_0x11d506(0x12e)])}:{}};})[_0x1940d1(0x116)](_0x9aed41=>_0x9aed41!==null);return{'id':_0x358d92['id'],'code':_0x358d92[_0x1940d1(0x143)],'name':_0x358d92[_0x1940d1(0x14b)],'description':_0x358d92['description'],'source':_0x358d92['source'],'dbId':_0x238b79[_0x1940d1(0x122)],'dbName':_0x238b79[_0x1940d1(0x14f)],'tableName':_0x238b79[_0x1940d1(0x12f)],'relatedPageCount':_0x4feb91[_0x1940d1(0x14e)],'relatedPages':_0x4feb91};}function buildPageRestoreCommands(_0x40db26,_0x16e9c7){const _0x33d9c3=a74_0xb7b0c1,_0x5dbd07=new Set();for(const _0x1294ad of _0x16e9c7){for(const _0x3c0bbc of _0x1294ad[_0x33d9c3(0x152)])_0x5dbd07[_0x33d9c3(0x113)](_0x3c0bbc['id']);}return[..._0x5dbd07][_0x33d9c3(0x12b)](_0x523e66=>_0x33d9c3(0x131)+_0x523e66+_0x33d9c3(0x142)+_0x40db26);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a75_0x46c6(_0x14b20f,_0x9cd78b){_0x14b20f=_0x14b20f-0x93;const _0x8a7695=a75_0x8a76();let _0x46c6ff=_0x8a7695[_0x14b20f];return _0x46c6ff;}const a75_0xf7efe3=a75_0x46c6;(function(_0x969206,_0x356a12){const _0x4a5430=a75_0x46c6,_0x499bd2=_0x969206();while(!![]){try{const _0x3d3251=-parseInt(_0x4a5430(0x9c))/0x1+-parseInt(_0x4a5430(0x9b))/0x2*(-parseInt(_0x4a5430(0x9a))/0x3)+-parseInt(_0x4a5430(0x93))/0x4*(parseInt(_0x4a5430(0x95))/0x5)+-parseInt(_0x4a5430(0x9d))/0x6*(-parseInt(_0x4a5430(0x97))/0x7)+parseInt(_0x4a5430(0x99))/0x8+parseInt(_0x4a5430(0x98))/0x9+parseInt(_0x4a5430(0x94))/0xa;if(_0x3d3251===_0x356a12)break;else _0x499bd2['push'](_0x499bd2['shift']());}catch(_0x6d99e1){_0x499bd2['push'](_0x499bd2['shift']());}}}(a75_0x8a76,0x4006f));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0xf7efe3(0x96));function a75_0x8a76(){const _0x3f8ff2=['178ZkktSm','419873zPZQOQ','60AIdliE','6056ASAaAo','3591280UonEfP','1440rMLAGf','context','117110KpyAxr','4454946lHxgnm','740440pcSJFs','141yoWXuh'];a75_0x8a76=function(){return _0x3f8ff2;};return a75_0x8a76();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a76_0x2ba9(_0x42788e,_0x4f800f){_0x42788e=_0x42788e-0x18a;const _0x370a4a=a76_0x370a();let _0x2ba909=_0x370a4a[_0x42788e];return _0x2ba909;}(function(_0x1753a5,_0x4184fa){const _0xb128c1=a76_0x2ba9,_0x183704=_0x1753a5();while(!![]){try{const _0x46676b=-parseInt(_0xb128c1(0x18f))/0x1+parseInt(_0xb128c1(0x192))/0x2+parseInt(_0xb128c1(0x18a))/0x3+parseInt(_0xb128c1(0x190))/0x4+-parseInt(_0xb128c1(0x191))/0x5*(parseInt(_0xb128c1(0x18c))/0x6)+-parseInt(_0xb128c1(0x18d))/0x7+-parseInt(_0xb128c1(0x18e))/0x8*(parseInt(_0xb128c1(0x18b))/0x9);if(_0x46676b===_0x4184fa)break;else _0x183704['push'](_0x183704['shift']());}catch(_0x169c31){_0x183704['push'](_0x183704['shift']());}}}(a76_0x370a,0xc10f1));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand('start');function a76_0x370a(){const _0x54d15c=['1784RacnCw','436668XTVXBw','4060576rFeoKM','14875dyzyqp','1038110HGHrFu','2390808KOUvmh','1584vZnvnu','1248fsdvaR','3119550nNdweE'];a76_0x370a=function(){return _0x54d15c;};return a76_0x370a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x40138c=a77_0x1b1d;(function(_0x3a81ab,_0x5a453e){const _0x4bd3c9=a77_0x1b1d,_0x2c39fa=_0x3a81ab();while(!![]){try{const _0x34e302=-parseInt(_0x4bd3c9(0x14c))/0x1+-parseInt(_0x4bd3c9(0x151))/0x2*(parseInt(_0x4bd3c9(0x14b))/0x3)+parseInt(_0x4bd3c9(0x152))/0x4*(parseInt(_0x4bd3c9(0x148))/0x5)+parseInt(_0x4bd3c9(0x153))/0x6*(parseInt(_0x4bd3c9(0x14f))/0x7)+parseInt(_0x4bd3c9(0x150))/0x8*(-parseInt(_0x4bd3c9(0x14e))/0x9)+parseInt(_0x4bd3c9(0x154))/0xa*(parseInt(_0x4bd3c9(0x149))/0xb)+-parseInt(_0x4bd3c9(0x14a))/0xc*(-parseInt(_0x4bd3c9(0x14d))/0xd);if(_0x34e302===_0x5a453e)break;else _0x2c39fa['push'](_0x2c39fa['shift']());}catch(_0x28dcef){_0x2c39fa['push'](_0x2c39fa['shift']());}}}(a77_0x30e8,0x58eb0));function a77_0x30e8(){const _0x4cb86e=['status','10GfCsdU','700909IDtDWn','121236RwanFj','63GMmcad','100486BpsyIl','13dqcsew','180RMXDtA','4843062PwvVLb','257392VmOjpa','30188wqbgGe','44540TPUeoY','6tXLfAN','110XREKHC'];a77_0x30e8=function(){return _0x4cb86e;};return a77_0x30e8();}function a77_0x1b1d(_0x54d80b,_0xc3dc8f){_0x54d80b=_0x54d80b-0x148;const _0x30e880=a77_0x30e8();let _0x1b1da3=_0x30e880[_0x54d80b];return _0x1b1da3;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand(a77_0x40138c(0x155));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x14b75c,_0x1372d6){const _0x4c0bcc=a78_0x422d,_0x187bdc=_0x14b75c();while(!![]){try{const _0x41fcb7=-parseInt(_0x4c0bcc(0x19a))/0x1+-parseInt(_0x4c0bcc(0x19b))/0x2+-parseInt(_0x4c0bcc(0x199))/0x3*(-parseInt(_0x4c0bcc(0x197))/0x4)+-parseInt(_0x4c0bcc(0x196))/0x5+-parseInt(_0x4c0bcc(0x19c))/0x6*(parseInt(_0x4c0bcc(0x198))/0x7)+-parseInt(_0x4c0bcc(0x19e))/0x8+parseInt(_0x4c0bcc(0x19d))/0x9;if(_0x41fcb7===_0x1372d6)break;else _0x187bdc['push'](_0x187bdc['shift']());}catch(_0x510f7e){_0x187bdc['push'](_0x187bdc['shift']());}}}(a78_0x5d59,0x31fcc));function a78_0x5d59(){const _0x3d56b9=['2084qFBYps','7VgCSAo','717oLnhGA','243425wUmwhE','260202njxoig','1668570KXmkpF','8955225hCRmHv','399592Jnqzxu','1066130VSnTPs'];a78_0x5d59=function(){return _0x3d56b9;};return a78_0x5d59();}function a78_0x422d(_0x2d9c36,_0x3bb05c){_0x2d9c36=_0x2d9c36-0x196;const _0x5d5944=a78_0x5d59();let _0x422d3b=_0x5d5944[_0x2d9c36];return _0x422d3b;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand('sync-retry');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a79_0x4c0b(_0xeb82e4,_0xd7deea){_0xeb82e4=_0xeb82e4-0x1bb;const _0x4a3fd7=a79_0x4a3f();let _0x4c0b4e=_0x4a3fd7[_0xeb82e4];return _0x4c0b4e;}function a79_0x4a3f(){const _0x2e247a=['944581vYbQXQ','718101BrfJeu','228TVnAIE','154272mafzbd','840065KdNuOE','10gZQuPC','8OpUeKJ','80906dzOsYO','5648768INiHbR','3857706lPFaiH','16lUNSXK'];a79_0x4a3f=function(){return _0x2e247a;};return a79_0x4a3f();}(function(_0x138400,_0x45e63f){const _0x332f88=a79_0x4c0b,_0xc7094b=_0x138400();while(!![]){try{const _0xf1b90d=-parseInt(_0x332f88(0x1bc))/0x1*(-parseInt(_0x332f88(0x1c4))/0x2)+-parseInt(_0x332f88(0x1c2))/0x3+-parseInt(_0x332f88(0x1c0))/0x4*(-parseInt(_0x332f88(0x1c5))/0x5)+-parseInt(_0x332f88(0x1c3))/0x6*(parseInt(_0x332f88(0x1bd))/0x7)+-parseInt(_0x332f88(0x1be))/0x8+parseInt(_0x332f88(0x1bf))/0x9+parseInt(_0x332f88(0x1bb))/0xa*(parseInt(_0x332f88(0x1c1))/0xb);if(_0xf1b90d===_0x45e63f)break;else _0xc7094b['push'](_0xc7094b['shift']());}catch(_0x4dba88){_0xc7094b['push'](_0xc7094b['shift']());}}}(a79_0x4a3f,0x664a2));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand('sync-status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x47eee0=a80_0x52cb;(function(_0x17cd2d,_0x154830){const _0x2d3e06=a80_0x52cb,_0x4ae302=_0x17cd2d();while(!![]){try{const _0x3ec842=parseInt(_0x2d3e06(0x170))/0x1+-parseInt(_0x2d3e06(0x16a))/0x2+-parseInt(_0x2d3e06(0x16e))/0x3*(parseInt(_0x2d3e06(0x169))/0x4)+parseInt(_0x2d3e06(0x172))/0x5*(parseInt(_0x2d3e06(0x16c))/0x6)+-parseInt(_0x2d3e06(0x16b))/0x7+-parseInt(_0x2d3e06(0x16f))/0x8+parseInt(_0x2d3e06(0x16d))/0x9;if(_0x3ec842===_0x154830)break;else _0x4ae302['push'](_0x4ae302['shift']());}catch(_0x4b2c9f){_0x4ae302['push'](_0x4ae302['shift']());}}}(a80_0x40b1,0xa2276));import{designCommand}from'../../services/dataset-design/commands.js';function a80_0x52cb(_0x2a6a92,_0x5b3921){_0x2a6a92=_0x2a6a92-0x169;const _0x40b112=a80_0x40b1();let _0x52cbf4=_0x40b112[_0x2a6a92];return _0x52cbf4;}export const datasetDesignValidate=designCommand(a80_0x47eee0(0x171));function a80_0x40b1(){const _0x2a6863=['48yqBHVd','508980NgaREC','3405871lUUixE','8844RSafVA','12020544ntCbjo','272703UpUUya','4713896Carnvu','1213122ZzqlvC','validate','1820hCJiEu'];a80_0x40b1=function(){return _0x2a6863;};return a80_0x40b1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x15ab7d=a81_0x5d53;(function(_0x1b6982,_0x3333d3){const _0x21f696=a81_0x5d53,_0x389f64=_0x1b6982();while(!![]){try{const _0x1b91fc=parseInt(_0x21f696(0x1da))/0x1+-parseInt(_0x21f696(0x1a6))/0x2*(parseInt(_0x21f696(0x1bb))/0x3)+parseInt(_0x21f696(0x1db))/0x4*(parseInt(_0x21f696(0x1a7))/0x5)+-parseInt(_0x21f696(0x1a1))/0x6*(-parseInt(_0x21f696(0x1a3))/0x7)+parseInt(_0x21f696(0x1b0))/0x8*(parseInt(_0x21f696(0x19f))/0x9)+-parseInt(_0x21f696(0x192))/0xa*(parseInt(_0x21f696(0x1ce))/0xb)+-parseInt(_0x21f696(0x1b5))/0xc*(-parseInt(_0x21f696(0x191))/0xd);if(_0x1b91fc===_0x3333d3)break;else _0x389f64['push'](_0x389f64['shift']());}catch(_0x3b8747){_0x389f64['push'](_0x389f64['shift']());}}}(a81_0x316d,0x6b4b3));import{getDatasetDetail}from'../../core/api-client.js';function a81_0x5d53(_0x42ad0f,_0x47f893){_0x42ad0f=_0x42ad0f-0x18a;const _0x316d6a=a81_0x316d();let _0x5d5384=_0x316d6a[_0x42ad0f];return _0x5d5384;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x16ba1f){const _0x58a740=a81_0x5d53;if(_0x16ba1f[_0x58a740(0x19c)])return null;const _0x3f6e0b=Boolean(_0x16ba1f[_0x58a740(0x18b)]!==undefined||_0x16ba1f[_0x58a740(0x1ba)]!==undefined);let _0x1c4676={};if(!_0x3f6e0b&&typeof _0x16ba1f[_0x58a740(0x1cd)]===_0x58a740(0x1ca))try{_0x1c4676=JSON[_0x58a740(0x1d5)](_0x16ba1f['extend']);}catch{}const _0x59952c=_0x3f6e0b?_0x16ba1f['name']:_0x16ba1f[_0x58a740(0x1c0)],_0x5b643a=_0x3f6e0b?_0x16ba1f['displayName']:_0x16ba1f[_0x58a740(0x1cc)],_0x2b8b41=_0x3f6e0b?_0x16ba1f[_0x58a740(0x1ba)]:_0x16ba1f[_0x58a740(0x1dc)]||_0x16ba1f[_0x58a740(0x1b8)],_0x2436ca=_0x3f6e0b?_0x16ba1f[_0x58a740(0x1c6)]===!![]:_0x1c4676['pkField']===!![],_0x519e5c=_0x3f6e0b?_0x16ba1f[_0x58a740(0x1cf)]===!![]:_0x1c4676[_0x58a740(0x1cf)]===!![],_0x14cee8=_0x3f6e0b?_0x16ba1f[_0x58a740(0x1c1)]??null:_0x1c4676['options']??null,_0x299cfb={'name':_0x59952c,'displayName':_0x5b643a||_0x59952c,'type':_0x2b8b41,'dbType':_0x16ba1f['dbType'],'pk':_0x2436ca,'required':_0x519e5c,'deprecated':_0x16ba1f[_0x58a740(0x1bf)]===!![],'description':_0x16ba1f[_0x58a740(0x198)]||undefined};return Array[_0x58a740(0x1dd)](_0x14cee8)&&_0x14cee8['length']>0x0&&(_0x299cfb[_0x58a740(0x1c1)]=_0x14cee8),_0x299cfb;}function a81_0x316d(){const _0x3555cb=['1224rwJfcQ','requestBody','requestFields','dataType','read','doType','1008891tqsjfz','sourceType','trim','fields','deprecated','code','options','relatedPageInfoList','updateTimeField','creatorIdField','source','pkField','dblinkInfoDTO','allFields','filter','string','tableComment','name','extend','473187waDEEn','required','dbName','length','modelId','object','tableName','parse','detail','entries','allFieldNames','responseFields','519762UtuUDr','28kROzdr','type','isArray','relations','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','displayName','createTimeField','doVersion','logicField','toField','path','18694ZzMEdY','190GngIVr','modifierNameField','method','datasetKey','indexes','operations','description','labelField','toDatasetCode','afterScriptId','deleted','modelCode','host','467433sFlrVO','beforeScriptId','1761468lHzqqT','dataset','14oUzAiq','formatRules','str','4yeFyyJ','445615WVewBi','map','main_sub','columnCodeListWithDeleted','relationId','modifierIdField','validateRules','responseBody','properties','8JcOFSw','toTableName','push','dbId','alias'];a81_0x316d=function(){return _0x3555cb;};return a81_0x316d();}function parseJsonMaybe(_0x6f87a7){const _0x5e9365=a81_0x5d53;if(typeof _0x6f87a7!=='string')return _0x6f87a7;try{return JSON[_0x5e9365(0x1d5)](_0x6f87a7);}catch{return _0x6f87a7;}}function normalizeOperationEntry(_0x4e8fc2,_0x51ba64){const _0x33126d=a81_0x5d53;if(!_0x51ba64||typeof _0x51ba64!=='object')return null;if(!_0x51ba64[_0x33126d(0x194)]||!_0x51ba64[_0x33126d(0x190)])return null;const _0x2cf8fe={'name':_0x4e8fc2,'method':_0x51ba64[_0x33126d(0x194)],'path':_0x51ba64[_0x33126d(0x190)]};if(_0x51ba64[_0x33126d(0x19e)])_0x2cf8fe[_0x33126d(0x19e)]=_0x51ba64[_0x33126d(0x19e)];if(_0x51ba64[_0x33126d(0x1b6)]!=null){const _0x500aca=parseJsonMaybe(_0x51ba64['requestBody']);_0x2cf8fe[_0x33126d(0x1b6)]=_0x500aca;}if(_0x51ba64[_0x33126d(0x1ae)]!=null){const _0x44183c=parseJsonMaybe(_0x51ba64[_0x33126d(0x1ae)]);_0x2cf8fe[_0x33126d(0x1ae)]=_0x44183c;}if(_0x51ba64[_0x33126d(0x1a0)]!=null)_0x2cf8fe[_0x33126d(0x1a0)]=_0x51ba64[_0x33126d(0x1a0)];if(_0x51ba64[_0x33126d(0x19b)]!=null)_0x2cf8fe[_0x33126d(0x19b)]=_0x51ba64[_0x33126d(0x19b)];if(Array['isArray'](_0x51ba64[_0x33126d(0x1b7)]))_0x2cf8fe[_0x33126d(0x1b7)]=_0x51ba64['requestFields'];if(Array[_0x33126d(0x1dd)](_0x51ba64[_0x33126d(0x1d9)]))_0x2cf8fe['responseFields']=_0x51ba64[_0x33126d(0x1d9)];return _0x2cf8fe;}function summarizeDbtable(_0x360d84){const _0x3f934f=a81_0x5d53,_0x14da17={},_0x37ad72=['dbId',_0x3f934f(0x1d0),_0x3f934f(0x1d4),_0x3f934f(0x195),_0x3f934f(0x1c6),'allFields',_0x3f934f(0x18e),_0x3f934f(0x18c),_0x3f934f(0x1c3),_0x3f934f(0x1c4),'creatorNameField',_0x3f934f(0x1ac),_0x3f934f(0x193),_0x3f934f(0x199),_0x3f934f(0x1c7)];for(const _0x2fa862 of _0x37ad72){if(_0x360d84[_0x2fa862]!==undefined)_0x14da17[_0x2fa862]=_0x360d84[_0x2fa862];}return typeof _0x14da17[_0x3f934f(0x1c8)]==='string'&&_0x14da17[_0x3f934f(0x1c8)][_0x3f934f(0x1d1)]>0x0&&(_0x14da17[_0x3f934f(0x1d8)]=_0x14da17[_0x3f934f(0x1c8)]['split'](',')[_0x3f934f(0x1a8)](_0x1bd13f=>_0x1bd13f[_0x3f934f(0x1bd)]())[_0x3f934f(0x1c9)](Boolean)),_0x14da17;}function normalizeRelatedPages(_0x2bf0d1){const _0x1a8411=a81_0x5d53;if(!Array['isArray'](_0x2bf0d1))return[];return _0x2bf0d1[_0x1a8411(0x1c9)](_0x137239=>_0x137239&&typeof _0x137239===_0x1a8411(0x1d3))['map'](_0x517981=>({'id':_0x517981['id'],'type':_0x517981[_0x1a8411(0x1dc)],'code':_0x517981[_0x1a8411(0x1c0)],'title':_0x517981['title'],'deleted':_0x517981[_0x1a8411(0x19c)]===!![]}));}export const datasetDetail={'service':a81_0x15ab7d(0x1a2),'command':a81_0x15ab7d(0x1d6),'description':a81_0x15ab7d(0x18a),'risk':a81_0x15ab7d(0x1b9),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0x15ab7d(0x1b4),'type':a81_0x15ab7d(0x1ca),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x19b444){const _0x5e79b1=a81_0x15ab7d,_0x5c1891=await getDatasetDetail(_0x19b444[_0x5e79b1(0x1a5)](_0x5e79b1(0x1c0))),_0x226c3c=Array[_0x5e79b1(0x1dd)](_0x5c1891[_0x5e79b1(0x1be)])?_0x5c1891[_0x5e79b1(0x1be)]:Array[_0x5e79b1(0x1dd)](_0x5c1891[_0x5e79b1(0x1af)])?_0x5c1891['properties']:[],_0x19d7c6=_0x226c3c['map'](_0xd94201=>normalizeField(_0xd94201))['filter'](_0x1e9a16=>_0x1e9a16!==null),_0xcb9f78=_0x5c1891[_0x5e79b1(0x197)]??{},_0x4c00bd=[];for(const [_0x3d000c,_0x577a97]of Object[_0x5e79b1(0x1d7)](_0xcb9f78)){const _0x26a388=normalizeOperationEntry(_0x3d000c,_0x577a97);if(_0x26a388)_0x4c00bd[_0x5e79b1(0x1b2)](_0x26a388);}const _0x3650f5=_0x5c1891['dbtableConfig']??{},_0x296139=_0x5c1891[_0x5e79b1(0x1a2)]??{},_0x4d6967=_0x3650f5['dbId']!=null?{'id':_0x3650f5[_0x5e79b1(0x1b3)],'name':_0x3650f5[_0x5e79b1(0x1d0)]??null}:undefined;let _0x1f6131;return typeof _0x5c1891['extend']===_0x5e79b1(0x1ca)&&(_0x1f6131=parseJsonMaybe(_0x5c1891['extend'])),{'ok':!![],'data':{'id':_0x5c1891[_0x5e79b1(0x1d2)]??_0x5c1891['id'],'name':_0x5c1891['name'],'code':_0x5c1891['modelCode']||_0x5c1891[_0x5e79b1(0x1c0)],'doVersion':_0x5c1891[_0x5e79b1(0x18d)],'description':_0x5c1891[_0x5e79b1(0x198)]||_0x296139[_0x5e79b1(0x1cb)]||undefined,'source':_0x5c1891[_0x5e79b1(0x1c5)]||_0x296139[_0x5e79b1(0x1bc)],'table':_0x3650f5[_0x5e79b1(0x1d4)]||_0x296139[_0x5e79b1(0x1d4)],'datasetKey':_0x3650f5['datasetKey'],'pk':_0x3650f5[_0x5e79b1(0x1c6)],'db':_0x4d6967,'dbtable':summarizeDbtable(_0x3650f5),'fields':_0x19d7c6,'operations':_0x4c00bd,'indexes':Array[_0x5e79b1(0x1dd)](_0x296139[_0x5e79b1(0x196)])?_0x296139[_0x5e79b1(0x196)]:[],'relations':Array[_0x5e79b1(0x1dd)](_0x5c1891[_0x5e79b1(0x1de)])?_0x5c1891[_0x5e79b1(0x1de)][_0x5e79b1(0x1a8)](_0x5be13b=>({..._0x5be13b[_0x5e79b1(0x1ab)]!=null?{'relationId':_0x5be13b['relationId']}:{},'fromDataset':_0x5c1891[_0x5e79b1(0x1cc)],'fromCode':_0x5c1891[_0x5e79b1(0x19d)]||_0x5c1891[_0x5e79b1(0x1c0)],'fromTable':_0x3650f5[_0x5e79b1(0x1d4)]||_0x296139[_0x5e79b1(0x1d4)],'fromField':_0x5be13b['fromField'],'toDataset':_0x5be13b['toDatasetName'],'toCode':_0x5be13b[_0x5e79b1(0x19a)],'toTable':_0x5be13b[_0x5e79b1(0x1b1)],'toField':_0x5be13b[_0x5e79b1(0x18f)],'labelField':_0x5be13b['toFieldLabel']||undefined,'cardinality':_0x5be13b['cardinality']||undefined,'bizRelationType':_0x5be13b['bizRelationType']===_0x5e79b1(0x1a9)?_0x5e79b1(0x1a9):null})):[],'relatedPages':normalizeRelatedPages(_0x5c1891[_0x5e79b1(0x1c2)]),...Array['isArray'](_0x5c1891[_0x5e79b1(0x1aa)])?{'columnCodeListWithDeleted':_0x5c1891[_0x5e79b1(0x1aa)]}:{},'formatRules':Array[_0x5e79b1(0x1dd)](_0x5c1891[_0x5e79b1(0x1a4)])?_0x5c1891['formatRules']:[],'validateRules':Array['isArray'](_0x5c1891[_0x5e79b1(0x1ad)])?_0x5c1891['validateRules']:[],..._0x1f6131!==undefined?{'extend':_0x1f6131}:{},'stats':{'fieldCount':_0x19d7c6[_0x5e79b1(0x1d1)],'operationCount':_0x4c00bd['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0xad4ae3=a82_0x56bf;(function(_0x36e7db,_0x223f5f){const _0x18dfae=a82_0x56bf,_0xcf94cc=_0x36e7db();while(!![]){try{const _0x48ae55=-parseInt(_0x18dfae(0x92))/0x1*(parseInt(_0x18dfae(0x98))/0x2)+-parseInt(_0x18dfae(0x96))/0x3+-parseInt(_0x18dfae(0xc6))/0x4*(-parseInt(_0x18dfae(0x94))/0x5)+parseInt(_0x18dfae(0xca))/0x6+-parseInt(_0x18dfae(0xae))/0x7+-parseInt(_0x18dfae(0xa0))/0x8+parseInt(_0x18dfae(0xa8))/0x9;if(_0x48ae55===_0x223f5f)break;else _0xcf94cc['push'](_0xcf94cc['shift']());}catch(_0x47f7a4){_0xcf94cc['push'](_0xcf94cc['shift']());}}}(a82_0x53b2,0x2c0fb));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([[a82_0xad4ae3(0x9c),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a82_0xad4ae3(0xa3)}]]);export function parseJsonObjectFlag(_0x5a1659,_0x44d4f8){const _0x4a69d2=a82_0xad4ae3;if(!_0x5a1659)return undefined;let _0x42a377;try{_0x42a377=JSON[_0x4a69d2(0xcd)](_0x5a1659);}catch(_0xe34b99){const _0x99be82=_0xe34b99 instanceof Error?_0xe34b99[_0x4a69d2(0xb5)]:String(_0xe34b99);throw CliErrors[_0x4a69d2(0xcb)](_0x44d4f8+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x99be82);}if(!isPlainObject(_0x42a377)||Array[_0x4a69d2(0x9b)](_0x42a377))throw CliErrors[_0x4a69d2(0xcb)](_0x44d4f8+_0x4a69d2(0x99));return _0x42a377;}export function validateExtendPatchKeys(_0x5b9286){const _0x52c7e3=a82_0xad4ae3,_0xe47e51=Object[_0x52c7e3(0xa2)](_0x5b9286);if(_0xe47e51[_0x52c7e3(0xa6)]===0x0)throw CliErrors[_0x52c7e3(0xcb)](_0x52c7e3(0xc2));for(const _0x537852 of _0xe47e51){const _0x35fb71=EXTEND_PATCH_REDIRECTS[_0x52c7e3(0xc7)](_0x537852);if(_0x35fb71)throw CliErrors[_0x52c7e3(0xcb)](_0x35fb71[_0x52c7e3(0xb5)],_0x35fb71[_0x52c7e3(0xaa)]);if(!MUTABLE_EXTEND_KEYS[_0x52c7e3(0xab)](_0x537852))throw CliErrors[_0x52c7e3(0xcb)](_0x52c7e3(0xb0)+_0x537852,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x5ef7d4=a82_0xad4ae3,_0x4fe758=Array[_0x5ef7d4(0xb2)](MUTABLE_EXTEND_KEYS)[_0x5ef7d4(0xc5)]();return _0x4fe758[_0x5ef7d4(0xa6)]>0x0?_0x5ef7d4(0xb3)+_0x4fe758['join'](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x542461,_0x476875){const _0x253186=a82_0xad4ae3;validateExtendPatchKeys(_0x476875);const _0x2e6229=deepClone(_0x542461),_0x23d37c=[];for(const [_0x13713a,_0xba9ef6]of Object[_0x253186(0xc8)](_0x476875)){const _0x4b7c26=_0x2e6229[_0x13713a],_0x317c4d=deepClone(_0xba9ef6);!deepEqual(_0x4b7c26,_0x317c4d)&&(_0x2e6229[_0x13713a]=_0x317c4d,_0x23d37c['push'](_0x253186(0xaf)+_0x13713a));}return _0x23d37c[_0x253186(0xc5)](),{'after':_0x2e6229,'changedPaths':_0x23d37c,'changed':_0x23d37c[_0x253186(0xa6)]>0x0};}export function assertExpectation(_0x1ffb3c,_0xabe5b1){const _0x47a5df=a82_0xad4ae3;if(!_0xabe5b1)return;for(const [_0x1b8a74,_0x3b42a3]of Object[_0x47a5df(0xc8)](_0xabe5b1)){const _0x5c5301=_0x1ffb3c[_0x1b8a74];if(!deepEqual(_0x5c5301,_0x3b42a3))throw CliErrors[_0x47a5df(0xcb)](_0x47a5df(0xbe)+_0x1b8a74,_0x47a5df(0x9e)+JSON['stringify'](_0x3b42a3)+_0x47a5df(0xa9)+JSON['stringify'](_0x5c5301));}}export async function buildDatasetExtendUpdateResult({appCode:_0x1b1cde,input:_0x319545,dryRun:_0x44c43f}){const _0x3ee278=a82_0xad4ae3;validateInput(_0x319545);const _0x366866=await getDatasetDetail(_0x319545[_0x3ee278(0xce)]),_0x45fd6d=parseDatasetExtend(_0x366866[_0x3ee278(0xc1)]),_0x22cbb8=deepClone(_0x45fd6d[_0x3ee278(0x93)]);assertExpectation(_0x22cbb8,_0x319545['expect']);const {after:_0x4dc45b,changedPaths:_0x2e70a9,changed:_0x5254a7}=applyExtendPatch(_0x22cbb8,_0x319545[_0x3ee278(0xa7)]),_0x2bdaf6=summarizeDataset(_0x366866,_0x319545[_0x3ee278(0xce)]);return _0x5254a7&&!_0x44c43f&&(_0x366866['extend']=serializeDatasetExtend(_0x4dc45b,_0x45fd6d[_0x3ee278(0xb1)]),await updateDrivenData(_0x366866)),{'ok':!![],'data':{'appCode':_0x1b1cde,'selector':{'code':_0x319545['code']},'dataset':_0x2bdaf6,'dryRun':_0x44c43f,'changed':_0x5254a7,'changedPaths':_0x2e70a9,'before':{'extend':_0x22cbb8},'after':{'extend':_0x4dc45b},'submitted':_0x5254a7&&!_0x44c43f},'message':_0x5254a7?_0x44c43f?_0x3ee278(0xb8)+_0x2e70a9[_0x3ee278(0xc9)](',\x20')+')':_0x3ee278(0xa5)+_0x2e70a9['join'](',\x20')+')':_0x3ee278(0x9a)};}export const datasetExtendUpdate={'service':a82_0xad4ae3(0xac),'command':a82_0xad4ae3(0xb6),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a82_0xad4ae3(0xc4),'flags':[CODE_FLAG,{'name':'patch-json','type':a82_0xad4ae3(0xb9),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a82_0xad4ae3(0xa1),'type':a82_0xad4ae3(0xb9),'required':![],'description':a82_0xad4ae3(0x95)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x311670){validateInput(readExtendUpdateInput(_0x311670));},async 'dryRun'(_0x49ec86){const _0xb74de6=a82_0xad4ae3,_0x5eec9a=await buildDatasetExtendUpdateResult({'appCode':_0x49ec86[_0xb74de6(0xbf)],'input':readExtendUpdateInput(_0x49ec86),'dryRun':!![]});return{'method':_0xb74de6(0xcc),'url':_0xb74de6(0xba),'body':_0x5eec9a[_0xb74de6(0xbb)],'description':_0x5eec9a[_0xb74de6(0xb5)]};},async 'execute'(_0x4a6a9c){const _0x598342=a82_0xad4ae3;return buildDatasetExtendUpdateResult({'appCode':_0x4a6a9c[_0x598342(0xbf)],'input':readExtendUpdateInput(_0x4a6a9c),'dryRun':![]});}};function readExtendUpdateInput(_0x9f4782){const _0x47d017=a82_0xad4ae3,_0x99a3b3=trim(_0x9f4782[_0x47d017(0x9f)]('code')),_0x2f3b9a=parseJsonObjectFlag(_0x9f4782[_0x47d017(0x9f)]('patch-json'),'--patch-json'),_0x2a937f=parseJsonObjectFlag(_0x9f4782[_0x47d017(0x9f)](_0x47d017(0xa1)),'--expect-json');return{'code':_0x99a3b3,'patch':_0x2f3b9a||{},'expect':_0x2a937f};}function validateInput(_0x517d30){const _0x14248a=a82_0xad4ae3;if(!_0x517d30[_0x14248a(0xce)])throw CliErrors[_0x14248a(0xcb)]('--code\x20is\x20required');validateExtendPatchKeys(_0x517d30['patch']);}function a82_0x56bf(_0x2f25ed,_0x6611df){_0x2f25ed=_0x2f25ed-0x92;const _0x53b276=a82_0x53b2();let _0x56bf09=_0x53b276[_0x2f25ed];return _0x56bf09;}function parseDatasetExtend(_0x3a8e24){const _0x3b2a85=a82_0xad4ae3;if(typeof _0x3a8e24===_0x3b2a85(0xb9)){const _0x2a1e16=_0x3a8e24[_0x3b2a85(0x9d)]();if(!_0x2a1e16)return{'value':{},'shape':_0x3b2a85(0xb9)};let _0x4cfe6;try{_0x4cfe6=JSON[_0x3b2a85(0xcd)](_0x2a1e16);}catch(_0x324d6c){const _0x37ef28=_0x324d6c instanceof Error?_0x324d6c[_0x3b2a85(0xb5)]:String(_0x324d6c);throw CliErrors[_0x3b2a85(0xcb)](_0x3b2a85(0xa4)+_0x37ef28);}if(!isPlainObject(_0x4cfe6)||Array[_0x3b2a85(0x9b)](_0x4cfe6))throw CliErrors[_0x3b2a85(0xcb)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x4cfe6,'shape':_0x3b2a85(0xb9)};}if(_0x3a8e24===undefined||_0x3a8e24===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x3a8e24)||Array[_0x3b2a85(0x9b)](_0x3a8e24))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x3a8e24,'shape':_0x3b2a85(0xad)};}function serializeDatasetExtend(_0x41f3d2,_0x55a1de){const _0x40a364=a82_0xad4ae3;return _0x55a1de===_0x40a364(0xb9)?JSON[_0x40a364(0x97)](_0x41f3d2):_0x41f3d2;}function summarizeDataset(_0x453d91,_0x52bbfb){const _0x4bda8a=a82_0xad4ae3,_0x44ad53=isPlainObject(_0x453d91[_0x4bda8a(0xac)])?_0x453d91[_0x4bda8a(0xac)]:{},_0x4cb31a=isPlainObject(_0x453d91[_0x4bda8a(0xc3)])?_0x453d91['dbtableConfig']:{};return{'id':_0x453d91[_0x4bda8a(0xb4)]??_0x453d91['id']??_0x44ad53['datasetId']??null,'code':_0x453d91[_0x4bda8a(0xbd)]??_0x453d91['code']??_0x44ad53['datasetCode']??_0x52bbfb,'name':_0x453d91['name']??_0x44ad53[_0x4bda8a(0xbc)]??null,'table':_0x4cb31a[_0x4bda8a(0xb7)]??_0x44ad53[_0x4bda8a(0xb7)]??null,'db':_0x4cb31a['dbName']??_0x4cb31a[_0x4bda8a(0xc0)]??null};}function deepClone(_0x56168d){if(_0x56168d===undefined)return _0x56168d;return JSON['parse'](JSON['stringify'](_0x56168d));}function deepEqual(_0x4e4af9,_0x370ccc){const _0x4d54c6=a82_0xad4ae3;return JSON['stringify'](_0x4e4af9)===JSON[_0x4d54c6(0x97)](_0x370ccc);}function a82_0x53b2(){const _0x546460=['code','1PHxldh','value','805IdVJbM','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','790371ZVYVpD','stringify','49792uEITBv','\x20must\x20be\x20a\x20JSON\x20object','No\x20changes\x20for\x20dataset\x20extend','isArray','businessGroup','trim','Expected\x20','str','470616ifuGSX','expect-json','keys','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','Updated\x20dataset\x20extend\x20(','length','patch','5114583GafrWW',',\x20actual\x20','hint','has','dataset','object','842856UwYgzj','extend.','Unsupported\x20patch\x20key:\x20','shape','from','Allowed\x20keys:\x20','modelId','message','extend-update','tableName','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','string','/smartapi/dataset/update-driven-data','data','datasetName','modelCode','Expectation\x20mismatch\x20at\x20extend.','appCode','dbId','extend','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','dbtableConfig','write','sort','1376BOybxh','get','entries','join','146352iYWWti','validation','POST','parse'];a82_0x53b2=function(){return _0x546460;};return a82_0x53b2();}function isPlainObject(_0x2dc595){const _0x31c4e2=a82_0xad4ae3;return Boolean(_0x2dc595)&&typeof _0x2dc595===_0x31c4e2(0xad)&&!Array['isArray'](_0x2dc595);}function trim(_0x5f5b93){const _0x564076=String(_0x5f5b93||'')['trim']();return _0x564076;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x36ee1b=a83_0x25ac;(function(_0x4c69f4,_0x23f658){const _0x22dfbd=a83_0x25ac,_0x1356ed=_0x4c69f4();while(!![]){try{const _0x1101ed=parseInt(_0x22dfbd(0x1de))/0x1+parseInt(_0x22dfbd(0x1f0))/0x2+-parseInt(_0x22dfbd(0x1f1))/0x3+-parseInt(_0x22dfbd(0x1c3))/0x4*(parseInt(_0x22dfbd(0x1df))/0x5)+-parseInt(_0x22dfbd(0x1e5))/0x6*(parseInt(_0x22dfbd(0x1bf))/0x7)+parseInt(_0x22dfbd(0x1c9))/0x8+-parseInt(_0x22dfbd(0x1ea))/0x9*(-parseInt(_0x22dfbd(0x1d0))/0xa);if(_0x1101ed===_0x23f658)break;else _0x1356ed['push'](_0x1356ed['shift']());}catch(_0x48dab7){_0x1356ed['push'](_0x1356ed['shift']());}}}(a83_0x31fa,0x42e03));function a83_0x25ac(_0x3b4fb4,_0x1552ec){_0x3b4fb4=_0x3b4fb4-0x1bd;const _0x31fa27=a83_0x31fa();let _0x25aca4=_0x31fa27[_0x3b4fb4];return _0x25aca4;}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_0x31fa(){const _0x4f3322=['name','/smartapi/dataset/restore-column','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','fields','3658520lrBkFr','requestedColumnIds','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','confirm','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','length','216850OYHyBh','str','POST','warnings','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','isArray','mutation-outcome-unknown','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','validation','trim','Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.','server-restored-count-mismatch','Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.','274215Ogrtam','59155BvHYHi','--field\x20is\x20required','\x20would\x20be\x20restored','data','displayName','code','1542tzpJAH','write','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','map','all','54LoLxqF','Dry-run:\x20Dataset\x20field\x20','yes','field','properties','unknown','643954MoLqjv','1259220KzFrFp','--code\x20is\x20required','backend','deleted','some','string','133RgLfWi','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','field-restore','dataset','164fFuEjV','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.'];a83_0x31fa=function(){return _0x4f3322;};return a83_0x31fa();}const PAGE_SYNC_WARNING=a83_0x36ee1b(0x1dd),NO_RESUBMIT_WARNING=a83_0x36ee1b(0x1db);export async function buildDatasetFieldRestoreResult({appCode:_0x5acca0,input:_0x2f3dea,dryRun:_0x57627f}){const _0x42aea5=a83_0x36ee1b,_0x121d03=_0x2f3dea[_0x42aea5(0x1e4)][_0x42aea5(0x1da)](),_0x157eb9=_0x2f3dea[_0x42aea5(0x1ed)][_0x42aea5(0x1da)]();if(!_0x121d03)throw CliErrors[_0x42aea5(0x1d9)](_0x42aea5(0x1f2));if(!_0x157eb9)throw CliErrors[_0x42aea5(0x1d9)](_0x42aea5(0x1e0));const _0x45904d=await getDatasetDetail(_0x121d03),_0x4512fd=resolveDataset(_0x45904d,_0x121d03),_0xc60084=(await listUserDeletedDatasetColumns(_0x4512fd['id']))[_0x42aea5(0x1e8)](normalizeUserDeletedField),_0x1bc1d8=_0xc60084['filter'](_0x1b85d5=>_0x1b85d5[_0x42aea5(0x1e4)]===_0x157eb9);if(_0x1bc1d8[_0x42aea5(0x1cf)]===0x0)throw CliErrors[_0x42aea5(0x1d9)](_0x42aea5(0x1c0)+_0x157eb9,_0x42aea5(0x1c4));if(_0x1bc1d8[_0x42aea5(0x1cf)]>0x1)throw CliErrors[_0x42aea5(0x1d9)]('Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20'+_0x157eb9,_0x42aea5(0x1d4));const _0x55ede=_0x1bc1d8[0x0],_0x46ab16={'id':_0x55ede['id'],'code':_0x55ede['code'],'displayName':_0x55ede[_0x42aea5(0x1e3)],'deleted':![],'active':!![]},_0xa8700b={'operation':_0x42aea5(0x1c1),'appCode':_0x5acca0,'selector':{'code':_0x121d03,'field':_0x157eb9},'dataset':_0x4512fd,'before':_0x55ede,'dryRun':_0x57627f,'warnings':[PAGE_SYNC_WARNING]};if(_0x57627f)return{'ok':!![],'data':{..._0xa8700b,'after':_0x46ab16,'backend':{'submitted':![],'requestedColumnIds':[_0x55ede['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x42aea5(0x1eb)+_0x157eb9+_0x42aea5(0x1e1)};let _0x4fbbe2=null,_0x15f445=![];try{_0x4fbbe2=await restoreDatasetColumns(_0x4512fd['id'],[_0x55ede['id']]);}catch(_0x56ec21){if(!isPlatformTransportFailure(_0x56ec21))throw _0x56ec21;_0x15f445=!![];}const _0xc2f49e={'submitted':!![],'requestedColumnIds':[_0x55ede['id']],'restoredCount':_0x4fbbe2,..._0x15f445?{'outcome':_0x42aea5(0x1ef)}:{}};let _0x46bfd3,_0x1119e1;try{[_0x46bfd3,_0x1119e1]=await Promise['all']([listUserDeletedDatasetColumns(_0x4512fd['id']),getDatasetDetail(_0x121d03)]);}catch{return{'ok':![],'data':{..._0xa8700b,'after':null,'backend':_0xc2f49e,'warnings':[..._0xa8700b[_0x42aea5(0x1d3)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x15f445?'mutation-outcome-unknown':'readback-failed'}},'message':_0x15f445?_0x42aea5(0x1cd)+_0x157eb9+'.\x20'+NO_RESUBMIT_WARNING:_0x42aea5(0x1d5)+_0x157eb9+'.\x20'+NO_RESUBMIT_WARNING};}const _0x46746f=!_0x46bfd3[_0x42aea5(0x1bd)](_0x2197db=>Number(_0x2197db['id'])===_0x55ede['id']||_0x2197db['code']===_0x157eb9),_0x102e36=findActiveField(_0x1119e1,_0x55ede['id'],_0x157eb9),_0x4ed500=_0x102e36!==null,_0x113f4d=!_0x15f445&&_0x4fbbe2===0x1&&_0x46746f&&_0x4ed500,_0x43bf4a={'performed':!![],'deletedListCleared':_0x46746f,'activeFieldPresent':_0x4ed500,'passed':_0x113f4d,..._0x15f445?{'reason':_0x42aea5(0x1d7)}:_0x4fbbe2!==0x1?{'reason':_0x42aea5(0x1dc)}:{}};return{'ok':_0x113f4d,'data':{..._0xa8700b,'after':_0x102e36,'backend':_0xc2f49e,'warnings':_0x113f4d?_0xa8700b[_0x42aea5(0x1d3)]:[..._0xa8700b[_0x42aea5(0x1d3)],NO_RESUBMIT_WARNING],'verification':_0x43bf4a},'message':_0x113f4d?'Restored\x20Dataset\x20field\x20'+_0x157eb9:_0x15f445?_0x42aea5(0x1cd)+_0x157eb9+'.\x20'+NO_RESUBMIT_WARNING:_0x42aea5(0x1c7)+_0x157eb9+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x36ee1b(0x1c2),'command':'field-restore','description':'Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','risk':a83_0x36ee1b(0x1e6),'structuredErrors':!![],'rejectedFlags':[{'name':a83_0x36ee1b(0x1e9),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':a83_0x36ee1b(0x1e7)},{'name':a83_0x36ee1b(0x1c8),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','hint':a83_0x36ee1b(0x1e7)},{'name':a83_0x36ee1b(0x1ec),'message':a83_0x36ee1b(0x1ce),'hint':a83_0x36ee1b(0x1d8)},{'name':a83_0x36ee1b(0x1cc),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x36ee1b(0x1d8)}],'flags':[CODE_FLAG,{'name':a83_0x36ee1b(0x1ed),'type':a83_0x36ee1b(0x1be),'required':!![],'description':a83_0x36ee1b(0x1cb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c0cb4){readInput(_0x4c0cb4);},async 'dryRun'(_0x3885a9){const _0x31dec4=a83_0x36ee1b,_0x256e1c=await buildDatasetFieldRestoreResult({'appCode':_0x3885a9['appCode'],'input':readInput(_0x3885a9),'dryRun':!![]});return asDryRunResult({..._0x256e1c[_0x31dec4(0x1e2)],'body':{'datasetId':_0x256e1c[_0x31dec4(0x1e2)][_0x31dec4(0x1c2)]['id'],'columnIds':_0x256e1c[_0x31dec4(0x1e2)][_0x31dec4(0x1f3)][_0x31dec4(0x1ca)]}},{'method':_0x31dec4(0x1d2),'url':_0x31dec4(0x1c6),'description':_0x256e1c['message']});},async 'execute'(_0x34bb3f){return buildDatasetFieldRestoreResult({'appCode':_0x34bb3f['appCode'],'input':readInput(_0x34bb3f),'dryRun':![]});}};function readInput(_0x10dff6){const _0x1c3ffb=a83_0x36ee1b,_0x1a6bc3={'code':String(_0x10dff6['str']('code')||'')['trim'](),'field':String(_0x10dff6[_0x1c3ffb(0x1d1)](_0x1c3ffb(0x1ed))||'')[_0x1c3ffb(0x1da)]()};if(!_0x1a6bc3[_0x1c3ffb(0x1e4)])throw CliErrors[_0x1c3ffb(0x1d9)](_0x1c3ffb(0x1f2));if(!_0x1a6bc3['field'])throw CliErrors[_0x1c3ffb(0x1d9)](_0x1c3ffb(0x1e0));return _0x1a6bc3;}function findActiveField(_0x291396,_0x3c7deb,_0x47b44a){const _0x56da8c=a83_0x36ee1b,_0x56e36d=Array[_0x56da8c(0x1d6)](_0x291396[_0x56da8c(0x1c8)]),_0x459133=_0x56e36d?_0x291396[_0x56da8c(0x1c8)]:Array[_0x56da8c(0x1d6)](_0x291396[_0x56da8c(0x1ee)])?_0x291396[_0x56da8c(0x1ee)]:[];for(const _0x53171c of _0x459133){if(!_0x53171c||typeof _0x53171c!=='object')continue;const _0x1acb75=_0x53171c,_0x1db6fb=_0x56e36d?_0x1acb75[_0x56da8c(0x1c5)]:_0x1acb75[_0x56da8c(0x1e4)],_0x2dd4bb=_0x1acb75[_0x56da8c(0x1f4)]!==!![]&&Number(_0x1acb75['id'])===_0x3c7deb&&_0x1db6fb===_0x47b44a;if(!_0x2dd4bb)continue;const _0xd57252=_0x56e36d?_0x1acb75[_0x56da8c(0x1e3)]:_0x1acb75['name'];return{'id':_0x3c7deb,'code':_0x47b44a,'displayName':typeof _0xd57252===_0x56da8c(0x1be)&&_0xd57252?_0xd57252:_0x47b44a,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x1f9902=a84_0x2539;(function(_0x38d576,_0x355f06){const _0x3dba6f=a84_0x2539,_0x3061cb=_0x38d576();while(!![]){try{const _0x13e234=-parseInt(_0x3dba6f(0xda))/0x1*(parseInt(_0x3dba6f(0xc4))/0x2)+-parseInt(_0x3dba6f(0xf0))/0x3*(-parseInt(_0x3dba6f(0xab))/0x4)+parseInt(_0x3dba6f(0xaf))/0x5*(-parseInt(_0x3dba6f(0xdc))/0x6)+parseInt(_0x3dba6f(0xe7))/0x7*(parseInt(_0x3dba6f(0xc3))/0x8)+parseInt(_0x3dba6f(0xc6))/0x9+parseInt(_0x3dba6f(0xb9))/0xa*(-parseInt(_0x3dba6f(0xdb))/0xb)+parseInt(_0x3dba6f(0xbe))/0xc*(parseInt(_0x3dba6f(0xcc))/0xd);if(_0x13e234===_0x355f06)break;else _0x3061cb['push'](_0x3061cb['shift']());}catch(_0x5b359e){_0x3061cb['push'](_0x3061cb['shift']());}}}(a84_0x3f6a,0xcb9fa));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','displayName',a84_0x1f9902(0xae),'options',a84_0x1f9902(0xc2),a84_0x1f9902(0xd1),a84_0x1f9902(0xad),a84_0x1f9902(0xb1),a84_0x1f9902(0xf7)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x1f9902(0xf3),'code',a84_0x1f9902(0xb4),a84_0x1f9902(0xcb),a84_0x1f9902(0xd0),a84_0x1f9902(0xf8),'tableName',a84_0x1f9902(0xe0),a84_0x1f9902(0xb7),'autoIncrement','systemRetain']);export function parseJsonObjectFlag(_0x15484d,_0x5071ae){const _0x5d246f=a84_0x1f9902;if(!_0x15484d)return undefined;let _0x41dc9a;try{_0x41dc9a=JSON[_0x5d246f(0xce)](_0x15484d);}catch(_0x1b080f){const _0xdac13a=_0x1b080f instanceof Error?_0x1b080f[_0x5d246f(0xe9)]:String(_0x1b080f);throw CliErrors[_0x5d246f(0xba)](_0x5071ae+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xdac13a);}if(!isPlainObject(_0x41dc9a)||Array['isArray'](_0x41dc9a))throw CliErrors[_0x5d246f(0xba)](_0x5071ae+_0x5d246f(0xee));return _0x41dc9a;}export function validatePatchKeys(_0x1965bd){const _0x4cd1de=a84_0x1f9902,_0x223b67=Object[_0x4cd1de(0xde)](_0x1965bd);if(_0x223b67[_0x4cd1de(0xef)]===0x0)throw CliErrors[_0x4cd1de(0xba)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x3774a9 of _0x223b67){if(FORBIDDEN_FIELD_KEYS[_0x4cd1de(0xf9)](_0x3774a9))throw CliErrors['validation'](_0x4cd1de(0xcf)+_0x3774a9);if(!MUTABLE_FIELD_KEYS[_0x4cd1de(0xf9)](_0x3774a9))throw CliErrors[_0x4cd1de(0xba)](_0x4cd1de(0xbb)+_0x3774a9,_0x4cd1de(0xea)+Array[_0x4cd1de(0xb3)](MUTABLE_FIELD_KEYS)[_0x4cd1de(0xac)](',\x20'));}}export function applyFieldPatch(_0x3986ad,_0x2abfee){const _0x3a0827=a84_0x1f9902;validatePatchKeys(_0x2abfee);const _0x258d6e=deepClone(_0x3986ad),_0x2aa265=new Set();for(const [_0x19d973,_0x1da373]of Object[_0x3a0827(0xbc)](_0x2abfee)){const _0x4cf1f2=_0x258d6e[_0x19d973],_0x5ca347=mergePatchValue(_0x4cf1f2,_0x1da373);!deepEqual(_0x4cf1f2,_0x5ca347)&&(_0x258d6e[_0x19d973]=_0x5ca347,_0x2aa265['add'](_0x19d973),collectChangedPaths(_0x19d973,_0x4cf1f2,_0x5ca347,_0x2aa265));}return{'after':_0x258d6e,'changedPaths':Array[_0x3a0827(0xb3)](_0x2aa265)['sort'](),'changed':_0x2aa265[_0x3a0827(0xc9)]>0x0};}export function assertExpectation(_0x44ff91,_0x3c397f){const _0x44ad04=a84_0x1f9902;if(!_0x3c397f)return;for(const [_0x52e0d1,_0x51a6fe]of Object['entries'](_0x3c397f)){const _0x3a30b4=_0x44ff91[_0x52e0d1];if(!deepEqual(_0x3a30b4,_0x51a6fe))throw CliErrors['validation'](_0x44ad04(0xd9)+_0x52e0d1,_0x44ad04(0xf5)+JSON[_0x44ad04(0xcd)](_0x51a6fe)+_0x44ad04(0xeb)+JSON[_0x44ad04(0xcd)](_0x3a30b4));}}export async function buildDatasetFieldUpdateResult({appCode:_0x265cd8,input:_0x22ba68,dryRun:_0x532168}){const _0x3b10f3=a84_0x1f9902;validateInput(_0x22ba68);const _0x3d52d7=await getDatasetDetail(_0x22ba68[_0x3b10f3(0xf1)]),_0xb81b88=readFieldArray(_0x3d52d7),_0x4d3800=_0xb81b88[_0x3b10f3(0xc1)](_0x1f2b87=>_0x1f2b87?.['name']===_0x22ba68[_0x3b10f3(0xd8)]);if(_0x4d3800<0x0)throw CliErrors['validation'](_0x3b10f3(0xca)+_0x22ba68[_0x3b10f3(0xd8)]);const _0x3dea0e=deepClone(_0xb81b88[_0x4d3800]);assertExpectation(_0x3dea0e,_0x22ba68[_0x3b10f3(0xd5)]);const {after:_0x205f37,changedPaths:_0x4a61fb,changed:_0x3e5573}=applyFieldPatch(_0x3dea0e,_0x22ba68[_0x3b10f3(0xe4)]),_0x4cf3fd=summarizeDataset(_0x3d52d7,_0x22ba68['code']);return _0x3e5573&&!_0x532168&&(_0xb81b88[_0x4d3800]=_0x205f37,await updateDrivenData(_0x3d52d7)),{'ok':!![],'data':{'appCode':_0x265cd8,'selector':{'code':_0x22ba68[_0x3b10f3(0xf1)]},'dataset':_0x4cf3fd,'field':{'id':_0x3dea0e['id']??null,'name':_0x3dea0e[_0x3b10f3(0xf3)]},'dryRun':_0x532168,'changed':_0x3e5573,'changedPaths':_0x4a61fb,'before':_0x3dea0e,'after':_0x205f37,'submitted':_0x3e5573&&!_0x532168},'message':_0x3e5573?_0x532168?_0x3b10f3(0xd7)+_0x22ba68['field']+'\x20would\x20change\x20('+_0x4a61fb[_0x3b10f3(0xac)](',\x20')+')':_0x3b10f3(0xb5)+_0x22ba68['field']+'\x20('+_0x4a61fb[_0x3b10f3(0xac)](',\x20')+')':_0x3b10f3(0xdf)+_0x22ba68['field']};}export const datasetFieldUpdate={'service':'dataset','command':a84_0x1f9902(0xe6),'description':a84_0x1f9902(0xe8),'risk':'write','flags':[CODE_FLAG,{'name':a84_0x1f9902(0xd8),'type':a84_0x1f9902(0xc0),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a84_0x1f9902(0xc8),'type':a84_0x1f9902(0xc0),'required':!![],'description':a84_0x1f9902(0xb8)},{'name':'expect-json','type':a84_0x1f9902(0xc0),'required':![],'description':a84_0x1f9902(0xdd)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x423f68){validateInput(readFieldUpdateInput(_0x423f68));},async 'dryRun'(_0x21f718){const _0x25742f=a84_0x1f9902,_0x3ff528=await buildDatasetFieldUpdateResult({'appCode':_0x21f718[_0x25742f(0xc7)],'input':readFieldUpdateInput(_0x21f718),'dryRun':!![]});return{'method':'POST','url':_0x25742f(0xe2),'body':_0x3ff528[_0x25742f(0xed)],'description':_0x3ff528[_0x25742f(0xe9)]};},async 'execute'(_0x20b1e7){const _0x95410c=a84_0x1f9902;return buildDatasetFieldUpdateResult({'appCode':_0x20b1e7[_0x95410c(0xc7)],'input':readFieldUpdateInput(_0x20b1e7),'dryRun':![]});}};function readFieldUpdateInput(_0x3f8594){const _0x5260da=a84_0x1f9902,_0x279217=trim(_0x3f8594[_0x5260da(0xb6)](_0x5260da(0xf1))),_0x236bdb=emptyToUndefined(_0x3f8594['str']('field')),_0x1ff37b=parseJsonObjectFlag(_0x3f8594[_0x5260da(0xb6)](_0x5260da(0xc8)),_0x5260da(0xf2)),_0x79aee0=parseJsonObjectFlag(_0x3f8594[_0x5260da(0xb6)](_0x5260da(0xf6)),'--expect-json');return{'code':_0x279217,'field':_0x236bdb||'','patch':_0x1ff37b||{},'expect':_0x79aee0};}function validateInput(_0x2c9e62){const _0xcf96b5=a84_0x1f9902;if(!_0x2c9e62[_0xcf96b5(0xf1)])throw CliErrors[_0xcf96b5(0xba)](_0xcf96b5(0xe1));if(!_0x2c9e62[_0xcf96b5(0xd8)])throw CliErrors[_0xcf96b5(0xba)]('--field\x20is\x20required');validatePatchKeys(_0x2c9e62[_0xcf96b5(0xe4)]);}function readFieldArray(_0x201428){const _0xea3e70=a84_0x1f9902;if(Array[_0xea3e70(0xd6)](_0x201428[_0xea3e70(0xb2)]))return _0x201428[_0xea3e70(0xb2)];if(Array[_0xea3e70(0xd6)](_0x201428[_0xea3e70(0xe3)]))return _0x201428[_0xea3e70(0xe3)];throw CliErrors[_0xea3e70(0xba)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x3a68d8,_0x316acf){const _0xefa01c=a84_0x1f9902,_0x1c3a55=isPlainObject(_0x3a68d8['dataset'])?_0x3a68d8[_0xefa01c(0xbd)]:{},_0x41229d=isPlainObject(_0x3a68d8['dbtableConfig'])?_0x3a68d8[_0xefa01c(0xe5)]:{};return{'id':_0x3a68d8[_0xefa01c(0xd3)]??_0x3a68d8['id']??_0x1c3a55['datasetId']??null,'code':_0x3a68d8[_0xefa01c(0xb0)]??_0x3a68d8[_0xefa01c(0xf1)]??_0x1c3a55[_0xefa01c(0xd4)]??_0x316acf,'name':_0x3a68d8[_0xefa01c(0xf3)]??_0x1c3a55[_0xefa01c(0xbf)]??null,'table':_0x41229d[_0xefa01c(0xf4)]??_0x1c3a55[_0xefa01c(0xf4)]??null,'db':_0x41229d[_0xefa01c(0xd2)]??_0x41229d['dbId']??null};}function mergePatchValue(_0x33c40e,_0x49f822){if(isPlainObject(_0x33c40e)&&isPlainObject(_0x49f822))return deepMerge(_0x33c40e,_0x49f822);return deepClone(_0x49f822);}function deepMerge(_0x32002d,_0x202655){const _0x5bd8cc=a84_0x1f9902,_0x786c9e=deepClone(_0x32002d);for(const [_0xf97959,_0x719ca9]of Object[_0x5bd8cc(0xbc)](_0x202655)){_0x786c9e[_0xf97959]=isPlainObject(_0x786c9e[_0xf97959])&&isPlainObject(_0x719ca9)?deepMerge(_0x786c9e[_0xf97959],_0x719ca9):deepClone(_0x719ca9);}return _0x786c9e;}function collectChangedPaths(_0x9bacd3,_0x1f1979,_0x1b0f6c,_0x1fcd79){const _0x2ba511=a84_0x1f9902;if(!isPlainObject(_0x1f1979)||!isPlainObject(_0x1b0f6c))return;const _0x146298=new Set([...Object[_0x2ba511(0xde)](_0x1f1979),...Object[_0x2ba511(0xde)](_0x1b0f6c)]);for(const _0x127cbd of _0x146298){const _0x2589c6=_0x1f1979[_0x127cbd],_0x3898da=_0x1b0f6c[_0x127cbd];!deepEqual(_0x2589c6,_0x3898da)&&_0x1fcd79[_0x2ba511(0xc5)](_0x9bacd3+'.'+_0x127cbd);}}function deepClone(_0x4d1cc9){const _0xe213a2=a84_0x1f9902;if(_0x4d1cc9===undefined)return _0x4d1cc9;return JSON[_0xe213a2(0xce)](JSON[_0xe213a2(0xcd)](_0x4d1cc9));}function a84_0x2539(_0x5c2637,_0xff7fde){_0x5c2637=_0x5c2637-0xab;const _0x3f6a90=a84_0x3f6a();let _0x253921=_0x3f6a90[_0x5c2637];return _0x253921;}function deepEqual(_0x56c1d4,_0x47ca63){const _0x3140cd=a84_0x1f9902;return JSON[_0x3140cd(0xcd)](_0x56c1d4)===JSON[_0x3140cd(0xcd)](_0x47ca63);}function isPlainObject(_0x54eb35){const _0x46d9fd=a84_0x1f9902;return Boolean(_0x54eb35)&&typeof _0x54eb35==='object'&&!Array[_0x46d9fd(0xd6)](_0x54eb35);}function a84_0x3f6a(){const _0x5de977=['671541eJSBVq','code','--patch-json','name','tableName','Expected\x20','expect-json','deprecated','dbFieldName','has','12CJTHSv','join','defaultAggregation','description','5zCdheF','modelCode','chartRole','fields','from','dbType','Updated\x20dataset\x20field\x20','str','pkField','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','10CqleRK','validation','Unsupported\x20patch\x20key:\x20','entries','dataset','228rmEqGH','datasetName','string','findIndex','required','304GxlhEV','2uXQrJs','add','4339566aflHZd','appCode','patch-json','size','Field\x20not\x20found:\x20','dbTypeLen','1124383IHJDTK','stringify','parse','Forbidden\x20patch\x20key:\x20','dbTypeScale','datetimeFormat','dbName','modelId','datasetCode','expect','isArray','Dry-run:\x20dataset\x20field\x20','field','Expectation\x20mismatch\x20at\x20','914678SxpOCr','15043523vpIZfM','5552526FiASPc','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','keys','No\x20changes\x20for\x20dataset\x20field\x20','deleted','--code\x20is\x20required','/smartapi/dataset/update-driven-data','properties','patch','dbtableConfig','field-update','229285Pojcvs','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','message','Allowed\x20keys:\x20',',\x20actual\x20','trim','data','\x20must\x20be\x20a\x20JSON\x20object','length'];a84_0x3f6a=function(){return _0x5de977;};return a84_0x3f6a();}function emptyToUndefined(_0x4a91a7){const _0x1b16a7=a84_0x1f9902,_0x4d93b1=String(_0x4a91a7||'')[_0x1b16a7(0xec)]();return _0x4d93b1||undefined;}function trim(_0x123113){const _0x59a8e9=a84_0x1f9902;return String(_0x123113||'')[_0x59a8e9(0xec)]();}
|
|
1
|
+
const a84_0x462bb2=a84_0x4dea;(function(_0x18f29e,_0x646cf){const _0x1be923=a84_0x4dea,_0x22dd24=_0x18f29e();while(!![]){try{const _0xafc2df=-parseInt(_0x1be923(0x1c6))/0x1*(parseInt(_0x1be923(0x1ae))/0x2)+-parseInt(_0x1be923(0x1c0))/0x3*(parseInt(_0x1be923(0x1d7))/0x4)+parseInt(_0x1be923(0x1c3))/0x5+parseInt(_0x1be923(0x1aa))/0x6+-parseInt(_0x1be923(0x1d3))/0x7+-parseInt(_0x1be923(0x1ab))/0x8*(parseInt(_0x1be923(0x1d2))/0x9)+parseInt(_0x1be923(0x1c7))/0xa*(parseInt(_0x1be923(0x1cc))/0xb);if(_0xafc2df===_0x646cf)break;else _0x22dd24['push'](_0x22dd24['shift']());}catch(_0x5eb868){_0x22dd24['push'](_0x22dd24['shift']());}}}(a84_0x5b22,0x2aad3));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a84_0x4dea(_0x366b9f,_0x28c971){_0x366b9f=_0x366b9f-0x1a6;const _0x5b22db=a84_0x5b22();let _0x4dea3e=_0x5b22db[_0x366b9f];return _0x4dea3e;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a84_0x462bb2(0x1b6),a84_0x462bb2(0x1b4),'description',a84_0x462bb2(0x1a9),a84_0x462bb2(0x1cd),a84_0x462bb2(0x1de),a84_0x462bb2(0x1c8),a84_0x462bb2(0x1e7),a84_0x462bb2(0x1f4)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x462bb2(0x1ee),a84_0x462bb2(0x1d5),a84_0x462bb2(0x1d6),a84_0x462bb2(0x1e8),a84_0x462bb2(0x1ed),'dbFieldName','tableName',a84_0x462bb2(0x1f3),a84_0x462bb2(0x1cb),a84_0x462bb2(0x1f1),a84_0x462bb2(0x1b0)]);export function parseJsonObjectFlag(_0x209669,_0x46a94e){const _0x58deff=a84_0x462bb2;if(!_0x209669)return undefined;let _0x584800;try{_0x584800=JSON[_0x58deff(0x1b7)](_0x209669);}catch(_0x535a2f){const _0x527c8f=_0x535a2f instanceof Error?_0x535a2f[_0x58deff(0x1e0)]:String(_0x535a2f);throw CliErrors[_0x58deff(0x1bd)](_0x46a94e+_0x58deff(0x1dc)+_0x527c8f);}if(!isPlainObject(_0x584800)||Array[_0x58deff(0x1e2)](_0x584800))throw CliErrors['validation'](_0x46a94e+_0x58deff(0x1ad));return _0x584800;}export function validatePatchKeys(_0x35f3c7){const _0x16a346=a84_0x462bb2,_0x1323a2=Object['keys'](_0x35f3c7);if(_0x1323a2['length']===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x1d205f of _0x1323a2){if(FORBIDDEN_FIELD_KEYS['has'](_0x1d205f))throw CliErrors[_0x16a346(0x1bd)]('Forbidden\x20patch\x20key:\x20'+_0x1d205f);if(!MUTABLE_FIELD_KEYS[_0x16a346(0x1ea)](_0x1d205f))throw CliErrors[_0x16a346(0x1bd)](_0x16a346(0x1c4)+_0x1d205f,_0x16a346(0x1b3)+Array[_0x16a346(0x1a7)](MUTABLE_FIELD_KEYS)[_0x16a346(0x1f0)](',\x20'));}}export function applyFieldPatch(_0x5dbc18,_0x1553bf){const _0x13db81=a84_0x462bb2;validatePatchKeys(_0x1553bf);const _0x5a2a63=deepClone(_0x5dbc18),_0x202e9d=new Set();for(const [_0x2b5c5c,_0x2cd783]of Object[_0x13db81(0x1e6)](_0x1553bf)){const _0x44d51f=_0x5a2a63[_0x2b5c5c],_0x3d9eaf=mergePatchValue(_0x44d51f,_0x2cd783);!deepEqual(_0x44d51f,_0x3d9eaf)&&(_0x5a2a63[_0x2b5c5c]=_0x3d9eaf,_0x202e9d['add'](_0x2b5c5c),collectChangedPaths(_0x2b5c5c,_0x44d51f,_0x3d9eaf,_0x202e9d));}return{'after':_0x5a2a63,'changedPaths':Array['from'](_0x202e9d)['sort'](),'changed':_0x202e9d['size']>0x0};}export function assertExpectation(_0x3d7805,_0x42c8fd){const _0x254fd2=a84_0x462bb2;if(!_0x42c8fd)return;for(const [_0x377590,_0xa25966]of Object['entries'](_0x42c8fd)){const _0x4cda0f=_0x3d7805[_0x377590];if(!deepEqual(_0x4cda0f,_0xa25966))throw CliErrors[_0x254fd2(0x1bd)]('Expectation\x20mismatch\x20at\x20'+_0x377590,_0x254fd2(0x1e3)+JSON['stringify'](_0xa25966)+_0x254fd2(0x1d0)+JSON['stringify'](_0x4cda0f));}}export async function buildDatasetFieldUpdateResult({appCode:_0xd93aa4,input:_0x8db139,dryRun:_0x56a6d3}){const _0x47fa58=a84_0x462bb2;validateInput(_0x8db139);const _0x2a5a6a=await getDatasetDetail(_0x8db139[_0x47fa58(0x1d5)]),_0x2b3919=readFieldArray(_0x2a5a6a),_0x3446bf=_0x2b3919[_0x47fa58(0x1af)](_0x188be4=>_0x188be4?.[_0x47fa58(0x1ee)]===_0x8db139[_0x47fa58(0x1e1)]);if(_0x3446bf<0x0)throw CliErrors[_0x47fa58(0x1bd)](_0x47fa58(0x1bf)+_0x8db139['field']);const _0x5c346a=deepClone(_0x2b3919[_0x3446bf]);assertExpectation(_0x5c346a,_0x8db139[_0x47fa58(0x1a8)]);const {after:_0x559e1c,changedPaths:_0x3a8742,changed:_0x2119b5}=applyFieldPatch(_0x5c346a,_0x8db139['patch']),_0x76187e=summarizeDataset(_0x2a5a6a,_0x8db139['code']);return _0x2119b5&&!_0x56a6d3&&(_0x2b3919[_0x3446bf]=_0x559e1c,await updateDrivenData(_0x2a5a6a)),{'ok':!![],'data':{'appCode':_0xd93aa4,'selector':{'code':_0x8db139[_0x47fa58(0x1d5)]},'dataset':_0x76187e,'field':{'id':_0x5c346a['id']??null,'name':_0x5c346a[_0x47fa58(0x1ee)]},'dryRun':_0x56a6d3,'changed':_0x2119b5,'changedPaths':_0x3a8742,'before':_0x5c346a,'after':_0x559e1c,'submitted':_0x2119b5&&!_0x56a6d3},'message':_0x2119b5?_0x56a6d3?_0x47fa58(0x1c9)+_0x8db139[_0x47fa58(0x1e1)]+_0x47fa58(0x1b1)+_0x3a8742[_0x47fa58(0x1f0)](',\x20')+')':_0x47fa58(0x1e9)+_0x8db139[_0x47fa58(0x1e1)]+'\x20('+_0x3a8742[_0x47fa58(0x1f0)](',\x20')+')':_0x47fa58(0x1be)+_0x8db139[_0x47fa58(0x1e1)]};}export const datasetFieldUpdate={'service':a84_0x462bb2(0x1bc),'command':a84_0x462bb2(0x1d1),'description':a84_0x462bb2(0x1b9),'risk':a84_0x462bb2(0x1ac),'flags':[CODE_FLAG,{'name':a84_0x462bb2(0x1e1),'type':a84_0x462bb2(0x1cf),'required':!![],'description':a84_0x462bb2(0x1e4)},{'name':'patch-json','type':a84_0x462bb2(0x1cf),'required':!![],'description':a84_0x462bb2(0x1f2)},{'name':'expect-json','type':a84_0x462bb2(0x1cf),'required':![],'description':a84_0x462bb2(0x1d8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x61fd04){validateInput(readFieldUpdateInput(_0x61fd04));},async 'dryRun'(_0x405752){const _0x4bd917=a84_0x462bb2,_0xd270d7=await buildDatasetFieldUpdateResult({'appCode':_0x405752[_0x4bd917(0x1f6)],'input':readFieldUpdateInput(_0x405752),'dryRun':!![]});return{'method':_0x4bd917(0x1ef),'url':'/smartapi/dataset/update-driven-data','body':_0xd270d7[_0x4bd917(0x1ca)],'description':_0xd270d7[_0x4bd917(0x1e0)]};},async 'execute'(_0x439953){const _0x5397db=a84_0x462bb2;return buildDatasetFieldUpdateResult({'appCode':_0x439953[_0x5397db(0x1f6)],'input':readFieldUpdateInput(_0x439953),'dryRun':![]});}};function readFieldUpdateInput(_0x3ff882){const _0x3ac727=a84_0x462bb2,_0x429092=trim(_0x3ff882['str']('code')),_0x4afe42=emptyToUndefined(_0x3ff882[_0x3ac727(0x1b2)](_0x3ac727(0x1e1))),_0x1bea6d=parseJsonObjectFlag(_0x3ff882[_0x3ac727(0x1b2)](_0x3ac727(0x1db)),_0x3ac727(0x1b5)),_0x3316e2=parseJsonObjectFlag(_0x3ff882['str']('expect-json'),_0x3ac727(0x1eb));return{'code':_0x429092,'field':_0x4afe42||'','patch':_0x1bea6d||{},'expect':_0x3316e2};}function validateInput(_0x295e10){const _0x3fad3e=a84_0x462bb2;if(!_0x295e10[_0x3fad3e(0x1d5)])throw CliErrors[_0x3fad3e(0x1bd)](_0x3fad3e(0x1d9));if(!_0x295e10[_0x3fad3e(0x1e1)])throw CliErrors[_0x3fad3e(0x1bd)](_0x3fad3e(0x1ce));validatePatchKeys(_0x295e10['patch']);}function readFieldArray(_0x5339f7){const _0x2c62e3=a84_0x462bb2;if(Array[_0x2c62e3(0x1e2)](_0x5339f7[_0x2c62e3(0x1bb)]))return _0x5339f7[_0x2c62e3(0x1bb)];if(Array[_0x2c62e3(0x1e2)](_0x5339f7[_0x2c62e3(0x1f5)]))return _0x5339f7[_0x2c62e3(0x1f5)];throw CliErrors[_0x2c62e3(0x1bd)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function a84_0x5b22(){const _0x25e0b9=['object','entries','chartRole','dbTypeLen','Updated\x20dataset\x20field\x20','has','--expect-json','dbId','dbTypeScale','name','POST','join','autoIncrement','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','deleted','deprecated','properties','appCode','dbName','from','expect','options','1595652JVqjPH','284864hFFzZC','write','\x20must\x20be\x20a\x20JSON\x20object','466AWjwRr','findIndex','systemRetain','\x20would\x20change\x20(','str','Allowed\x20keys:\x20','displayName','--patch-json','doType','parse','modelCode','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','trim','fields','dataset','validation','No\x20changes\x20for\x20dataset\x20field\x20','Field\x20not\x20found:\x20','3JLgiGx','tableName','stringify','126660oFObeg','Unsupported\x20patch\x20key:\x20','datasetCode','1382QBTAkg','3500440RkPCTp','defaultAggregation','Dry-run:\x20dataset\x20field\x20','data','pkField','11IqHobC','required','--field\x20is\x20required','string',',\x20actual\x20','field-update','9scXkll','201334jvvaib','modelId','code','dbType','320556sbaTni','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','--code\x20is\x20required','dbtableConfig','patch-json','\x20must\x20be\x20valid\x20JSON\x20object:\x20','add','datetimeFormat','keys','message','field','isArray','Expected\x20','Exact\x20raw\x20fields[].name\x20to\x20patch'];a84_0x5b22=function(){return _0x25e0b9;};return a84_0x5b22();}function summarizeDataset(_0x4de055,_0x5e161b){const _0x376b9f=a84_0x462bb2,_0x3fe47c=isPlainObject(_0x4de055[_0x376b9f(0x1bc)])?_0x4de055[_0x376b9f(0x1bc)]:{},_0xc53681=isPlainObject(_0x4de055['dbtableConfig'])?_0x4de055[_0x376b9f(0x1da)]:{};return{'id':_0x4de055[_0x376b9f(0x1d4)]??_0x4de055['id']??_0x3fe47c['datasetId']??null,'code':_0x4de055[_0x376b9f(0x1b8)]??_0x4de055[_0x376b9f(0x1d5)]??_0x3fe47c[_0x376b9f(0x1c5)]??_0x5e161b,'name':_0x4de055[_0x376b9f(0x1ee)]??_0x3fe47c['datasetName']??null,'table':_0xc53681[_0x376b9f(0x1c1)]??_0x3fe47c['tableName']??null,'db':_0xc53681[_0x376b9f(0x1a6)]??_0xc53681[_0x376b9f(0x1ec)]??null};}function mergePatchValue(_0x3cc67c,_0x48a96d){if(isPlainObject(_0x3cc67c)&&isPlainObject(_0x48a96d))return deepMerge(_0x3cc67c,_0x48a96d);return deepClone(_0x48a96d);}function deepMerge(_0x248acd,_0x52cfb1){const _0x498f15=a84_0x462bb2,_0x2f4da1=deepClone(_0x248acd);for(const [_0x580d87,_0x4a1add]of Object[_0x498f15(0x1e6)](_0x52cfb1)){_0x2f4da1[_0x580d87]=isPlainObject(_0x2f4da1[_0x580d87])&&isPlainObject(_0x4a1add)?deepMerge(_0x2f4da1[_0x580d87],_0x4a1add):deepClone(_0x4a1add);}return _0x2f4da1;}function collectChangedPaths(_0x4a66f5,_0x3e48e3,_0x3f9dbc,_0x349b10){const _0x7cd7a=a84_0x462bb2;if(!isPlainObject(_0x3e48e3)||!isPlainObject(_0x3f9dbc))return;const _0x3a0297=new Set([...Object[_0x7cd7a(0x1df)](_0x3e48e3),...Object[_0x7cd7a(0x1df)](_0x3f9dbc)]);for(const _0xacffcd of _0x3a0297){const _0x479b90=_0x3e48e3[_0xacffcd],_0x44aeea=_0x3f9dbc[_0xacffcd];!deepEqual(_0x479b90,_0x44aeea)&&_0x349b10[_0x7cd7a(0x1dd)](_0x4a66f5+'.'+_0xacffcd);}}function deepClone(_0x4d4cf9){const _0x5aca00=a84_0x462bb2;if(_0x4d4cf9===undefined)return _0x4d4cf9;return JSON[_0x5aca00(0x1b7)](JSON[_0x5aca00(0x1c2)](_0x4d4cf9));}function deepEqual(_0x4ff256,_0x44502d){const _0x25e725=a84_0x462bb2;return JSON[_0x25e725(0x1c2)](_0x4ff256)===JSON[_0x25e725(0x1c2)](_0x44502d);}function isPlainObject(_0x3bbb86){const _0x75bc8=a84_0x462bb2;return Boolean(_0x3bbb86)&&typeof _0x3bbb86===_0x75bc8(0x1e5)&&!Array['isArray'](_0x3bbb86);}function emptyToUndefined(_0x170cac){const _0x3b37b0=a84_0x462bb2,_0x327e7b=String(_0x170cac||'')[_0x3b37b0(0x1ba)]();return _0x327e7b||undefined;}function trim(_0x26b178){const _0x17456c=a84_0x462bb2;return String(_0x26b178||'')[_0x17456c(0x1ba)]();}
|