@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.12
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 +1 -1
- 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
|
-
|
|
1
|
+
const a74_0x2537e5=a74_0xb66f;(function(_0x20517b,_0x3e1ec1){const _0x1310fd=a74_0xb66f,_0x26582d=_0x20517b();while(!![]){try{const _0x2a929c=parseInt(_0x1310fd(0x1b0))/0x1+parseInt(_0x1310fd(0x1cb))/0x2*(-parseInt(_0x1310fd(0x1e1))/0x3)+-parseInt(_0x1310fd(0x1ba))/0x4+parseInt(_0x1310fd(0x1b1))/0x5+-parseInt(_0x1310fd(0x1b9))/0x6*(-parseInt(_0x1310fd(0x1ab))/0x7)+-parseInt(_0x1310fd(0x1d0))/0x8*(-parseInt(_0x1310fd(0x1bf))/0x9)+-parseInt(_0x1310fd(0x1b5))/0xa;if(_0x2a929c===_0x3e1ec1)break;else _0x26582d['push'](_0x26582d['shift']());}catch(_0x9b8db7){_0x26582d['push'](_0x26582d['shift']());}}}(a74_0x54bc,0x77615));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';function a74_0xb66f(_0x560c7e,_0xe16cbf){_0x560c7e=_0x560c7e-0x1a8;const _0x54bcad=a74_0x54bc();let _0xb66f00=_0x54bcad[_0x560c7e];return _0xb66f00;}function a74_0x54bc(){const _0x1777f8=['/smartapi/dataset/delete?cascade=','length','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','deleted','validation','expected-count','type','dbtableConfig','isArray','1411401kqkXeq','Would\x20delete\x20','push','add','dbid','relatedPageInfoList','21OdQZJS','dbName','object','description','confirm','217679SaMCCa','4259290gfFQTW','Deleted\x20','appCode','dataset','9582030BGBlmc','No\x20undeleted\x20dataset\x20found\x20for\x20','num','false','1802298MkFkxI','3081612dyNqmi','Would\x20safely\x20delete\x20','name','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','filter','6456312CQLQUj','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','POST','map','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','true','id=','number','boolean','tableName','2VCFBDi','\x20failed','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','code','dbId','8BtgLsA','Dataset\x20id','dbid=','rabetbase\x20page\x20restore\x20--id\x20','\x20dataset(s);\x20','cascade','isInteger','bool'];a74_0x54bc=function(){return _0x1777f8;};return a74_0x54bc();}const DATASET_ID_FLAG={'name':'id','type':'number','description':a74_0x2537e5(0x1d1)},DBID_FLAG={'name':'dbid','type':a74_0x2537e5(0x1c8),'description':a74_0x2537e5(0x1c1)},CONFIRM_FLAG={'name':a74_0x2537e5(0x1af),'type':a74_0x2537e5(0x1c9),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':a74_0x2537e5(0x1d5),'type':'boolean','description':'Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm'},EXPECTED_COUNT_FLAG={'name':a74_0x2537e5(0x1dd),'type':a74_0x2537e5(0x1c8),'description':a74_0x2537e5(0x1c0)};export const datasetDelete={'service':a74_0x2537e5(0x1b4),'command':'delete','description':a74_0x2537e5(0x1da),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x100576){const _0xb858c1=a74_0x2537e5,_0x37b86b=_0x100576['num']('id'),_0x3987d0=_0x100576['str']('code'),_0x5ab657=_0x100576[_0xb858c1(0x1b7)](_0xb858c1(0x1a9)),_0x49a235=[_0x37b86b>0x0,Boolean(_0x3987d0),_0x5ab657>0x0]['filter'](Boolean);if(_0x49a235['length']===0x0)throw CliErrors[_0xb858c1(0x1dc)](_0xb858c1(0x1c5));if(_0x49a235['length']>0x1)throw CliErrors[_0xb858c1(0x1dc)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x1910ee){const _0x42ede7=a74_0x2537e5,_0x4bdd59=await resolveTargets(_0x1910ee),_0x5785ef=_0x1910ee[_0x42ede7(0x1d7)](_0x42ede7(0x1d5));return{'method':_0x42ede7(0x1c3),'url':_0x42ede7(0x1d8)+(_0x5785ef?_0x42ede7(0x1c6):_0x42ede7(0x1b8)),'body':{'count':_0x4bdd59['length'],'cascade':_0x5785ef,'datasets':_0x4bdd59},'description':_0x5785ef?_0x42ede7(0x1e2)+_0x4bdd59[_0x42ede7(0x1d9)]+_0x42ede7(0x1bd):_0x42ede7(0x1bb)+_0x4bdd59['length']+_0x42ede7(0x1c2)};},async 'execute'(_0x30cf86){const _0x12bf87=a74_0x2537e5;if(!_0x30cf86['bool'](_0x12bf87(0x1af)))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x12bf87(0x1cd));const _0x3ecb5e=await resolveTargets(_0x30cf86),_0x3a1dda=_0x30cf86[_0x12bf87(0x1d7)](_0x12bf87(0x1d5)),_0x5ae3dc=[],_0x52e676=[];for(const _0xfcaf5d of _0x3ecb5e){try{await deleteDataset(_0xfcaf5d['id'],_0x3a1dda),_0x5ae3dc['push'](_0xfcaf5d);}catch(_0x99046e){_0x52e676[_0x12bf87(0x1e3)]({..._0xfcaf5d,'error':_0x99046e instanceof Error?_0x99046e['message']:String(_0x99046e)});}}if(_0x52e676[_0x12bf87(0x1d9)]>0x0){const _0x3ce5a8=buildPageRestoreCommands(_0x30cf86['appCode'],_0x3a1dda?_0x5ae3dc:[]);return{'ok':![],'data':{'requested':_0x3ecb5e['length'],'cascade':_0x3a1dda,'deletedCount':_0x5ae3dc[_0x12bf87(0x1d9)],'failedCount':_0x52e676[_0x12bf87(0x1d9)],'deleted':_0x5ae3dc,'failed':_0x52e676,'pageRestoreCommands':_0x3ce5a8},'message':'Deleted\x20'+_0x5ae3dc['length']+'/'+_0x3ecb5e['length']+_0x12bf87(0x1d4)+_0x52e676[_0x12bf87(0x1d9)]+_0x12bf87(0x1cc)};}return{'ok':!![],'data':{'requested':_0x3ecb5e[_0x12bf87(0x1d9)],'cascade':_0x3a1dda,'deletedCount':_0x5ae3dc[_0x12bf87(0x1d9)],'deleted':_0x5ae3dc,'pageRestoreCommands':buildPageRestoreCommands(_0x30cf86['appCode'],_0x3a1dda?_0x5ae3dc:[])},'message':_0x12bf87(0x1b2)+_0x5ae3dc[_0x12bf87(0x1d9)]+'\x20dataset(s)'};}};async function resolveTargets(_0x1ed206){const _0x4faf22=a74_0x2537e5,_0x44e83b=_0x1ed206[_0x4faf22(0x1b7)]('id'),_0xa4e883=_0x1ed206['str'](_0x4faf22(0x1ce)),_0x3e1c80=_0x1ed206[_0x4faf22(0x1b7)](_0x4faf22(0x1a9));let _0x2f9b91;_0xa4e883?(_0x2f9b91=await listDatasets(_0x1ed206[_0x4faf22(0x1b3)],{'code':_0xa4e883}),_0x2f9b91=_0x2f9b91['filter'](_0x18d2b0=>_0x18d2b0['code']===_0xa4e883)):(_0x2f9b91=await listDatasets(_0x1ed206[_0x4faf22(0x1b3)]),_0x44e83b>0x0&&(_0x2f9b91=_0x2f9b91[_0x4faf22(0x1be)](_0x28a6f0=>_0x28a6f0['id']===_0x44e83b)),_0x3e1c80>0x0&&(_0x2f9b91=_0x2f9b91[_0x4faf22(0x1be)](_0xef60bd=>_0xef60bd[_0x4faf22(0x1df)]?.['dbId']===_0x3e1c80)));const _0x335ab1=[];for(const _0x5564fd of _0x2f9b91){const _0x3557c0=await getDatasetDetail(_0x5564fd[_0x4faf22(0x1ce)]),_0x34b8c4=Array[_0x4faf22(0x1e0)](_0x3557c0[_0x4faf22(0x1aa)])?_0x3557c0[_0x4faf22(0x1aa)]['filter'](_0x2b9661=>_0x2b9661!=null&&typeof _0x2b9661===_0x4faf22(0x1ad)&&_0x2b9661[_0x4faf22(0x1db)]!==!![]):[];_0x335ab1[_0x4faf22(0x1e3)](normalizeTarget(_0x5564fd,_0x34b8c4));}if(_0x335ab1[_0x4faf22(0x1d9)]===0x0){const _0x227826=_0xa4e883||(_0x44e83b>0x0?_0x4faf22(0x1c7)+_0x44e83b:_0x4faf22(0x1d2)+_0x3e1c80);throw CliErrors['validation'](_0x4faf22(0x1b6)+_0x227826+'.');}const _0x33cb3a=_0x1ed206[_0x4faf22(0x1b7)](_0x4faf22(0x1dd));if(_0x33cb3a>0x0&&_0x335ab1[_0x4faf22(0x1d9)]!==_0x33cb3a)throw CliErrors[_0x4faf22(0x1dc)]('Matched\x20'+_0x335ab1['length']+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x33cb3a+'.');return _0x335ab1;}function normalizeTarget(_0x1e157b,_0x41762e){const _0x2fadae=a74_0x2537e5,_0x51aea2=_0x1e157b[_0x2fadae(0x1df)]??{},_0x37c67f=_0x41762e[_0x2fadae(0x1c4)](_0x41f9a1=>{const _0x25790c=_0x2fadae;if(_0x41f9a1==null||typeof _0x41f9a1!==_0x25790c(0x1ad))return null;const _0x4dd331=_0x41f9a1,_0x5497d5=Number(_0x4dd331['id']);if(!Number[_0x25790c(0x1d6)](_0x5497d5)||_0x5497d5<=0x0)return null;const _0x1db961=_0x4dd331['title']??_0x4dd331['name'];return{'id':_0x5497d5,..._0x1db961?{'name':String(_0x1db961)}:{},..._0x4dd331[_0x25790c(0x1de)]?{'type':String(_0x4dd331['type'])}:{}};})[_0x2fadae(0x1be)](_0x552e82=>_0x552e82!==null);return{'id':_0x1e157b['id'],'code':_0x1e157b['code'],'name':_0x1e157b[_0x2fadae(0x1bc)],'description':_0x1e157b[_0x2fadae(0x1ae)],'source':_0x1e157b['source'],'dbId':_0x51aea2[_0x2fadae(0x1cf)],'dbName':_0x51aea2[_0x2fadae(0x1ac)],'tableName':_0x51aea2[_0x2fadae(0x1ca)],'relatedPageCount':_0x37c67f[_0x2fadae(0x1d9)],'relatedPages':_0x37c67f};}function buildPageRestoreCommands(_0x761da0,_0x46e7e7){const _0x17a417=a74_0x2537e5,_0x1ae180=new Set();for(const _0x4b85f2 of _0x46e7e7){for(const _0x4bf57d of _0x4b85f2['relatedPages'])_0x1ae180[_0x17a417(0x1a8)](_0x4bf57d['id']);}return[..._0x1ae180][_0x17a417(0x1c4)](_0x3f117f=>_0x17a417(0x1d3)+_0x3f117f+'\x20--appcode\x20'+_0x761da0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f9136,_0x2b3627){const _0x4e69eb=a75_0x268d,_0x5c30a4=_0x4f9136();while(!![]){try{const _0x3e8c1b=parseInt(_0x4e69eb(0x156))/0x1*(parseInt(_0x4e69eb(0x150))/0x2)+parseInt(_0x4e69eb(0x153))/0x3+-parseInt(_0x4e69eb(0x14f))/0x4+parseInt(_0x4e69eb(0x152))/0x5+-parseInt(_0x4e69eb(0x157))/0x6*(parseInt(_0x4e69eb(0x151))/0x7)+parseInt(_0x4e69eb(0x14e))/0x8+parseInt(_0x4e69eb(0x154))/0x9*(-parseInt(_0x4e69eb(0x155))/0xa);if(_0x3e8c1b===_0x2b3627)break;else _0x5c30a4['push'](_0x5c30a4['shift']());}catch(_0x5bfcde){_0x5c30a4['push'](_0x5c30a4['shift']());}}}(a75_0x3237,0xb6f13));import{designCommand}from'../../services/dataset-design/commands.js';function a75_0x268d(_0x44421d,_0x55c7d2){_0x44421d=_0x44421d-0x14e;const _0x3237ee=a75_0x3237();let _0x268d11=_0x3237ee[_0x44421d];return _0x268d11;}export const datasetDesignContext=designCommand('context');function a75_0x3237(){const _0xd83a4=['14571CTALiK','10490RDXIRB','1BnOcsI','876DchrNU','3811264JCCxmf','2495660MOTYjO','1700332vBOSFz','18347PPwOtZ','3735120XFCpTb','4141935pQORFx'];a75_0x3237=function(){return _0xd83a4;};return a75_0x3237();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a76_0x2f973c=a76_0x179f;function a76_0x179f(_0xd8092,_0x1d3ec1){_0xd8092=_0xd8092-0x1e0;const _0x56bb7f=a76_0x56bb();let _0x179f59=_0x56bb7f[_0xd8092];return _0x179f59;}(function(_0x48a2a3,_0x185593){const _0x356c24=a76_0x179f,_0x3a755d=_0x48a2a3();while(!![]){try{const _0xce9b03=-parseInt(_0x356c24(0x1e0))/0x1+parseInt(_0x356c24(0x1e5))/0x2*(parseInt(_0x356c24(0x1e6))/0x3)+-parseInt(_0x356c24(0x1e4))/0x4*(-parseInt(_0x356c24(0x1e3))/0x5)+-parseInt(_0x356c24(0x1eb))/0x6*(-parseInt(_0x356c24(0x1e2))/0x7)+-parseInt(_0x356c24(0x1e7))/0x8*(-parseInt(_0x356c24(0x1e1))/0x9)+-parseInt(_0x356c24(0x1e9))/0xa+parseInt(_0x356c24(0x1ea))/0xb*(parseInt(_0x356c24(0x1e8))/0xc);if(_0xce9b03===_0x185593)break;else _0x3a755d['push'](_0x3a755d['shift']());}catch(_0x167903){_0x3a755d['push'](_0x3a755d['shift']());}}}(a76_0x56bb,0xf0c4e));import{designCommand}from'../../services/dataset-design/commands.js';function a76_0x56bb(){const _0x5bef03=['2760668dWFgmq','2CiPBie','3529101wluYul','925576qPyGdJ','14088720NnloRH','5098010adHZNq','11DHaMHo','6gvUyBO','start','1681831DmpzaN','9bgFYpo','150717KRTZrp','5pbPaVQ'];a76_0x56bb=function(){return _0x5bef03;};return a76_0x56bb();}export const datasetDesignStart=designCommand(a76_0x2f973c(0x1ec));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a77_0x2d72(){const _0x11bfee=['29396dYipIo','100535dWruMw','350474FwuhWA','117jocetf','18alrDxS','835784vqUWIK','318RkkRrM','3066966keborq','1CWTDgW','16220699QDGjVk','3133980bPopUP'];a77_0x2d72=function(){return _0x11bfee;};return a77_0x2d72();}(function(_0x5da048,_0x309e1f){const _0x41a087=a77_0xc2d1,_0x574e1e=_0x5da048();while(!![]){try{const _0x54302d=parseInt(_0x41a087(0xdb))/0x1*(parseInt(_0x41a087(0xd5))/0x2)+-parseInt(_0x41a087(0xd6))/0x3*(-parseInt(_0x41a087(0xd3))/0x4)+parseInt(_0x41a087(0xd4))/0x5*(-parseInt(_0x41a087(0xd9))/0x6)+-parseInt(_0x41a087(0xda))/0x7+parseInt(_0x41a087(0xd8))/0x8*(-parseInt(_0x41a087(0xd7))/0x9)+parseInt(_0x41a087(0xd2))/0xa+parseInt(_0x41a087(0xd1))/0xb;if(_0x54302d===_0x309e1f)break;else _0x574e1e['push'](_0x574e1e['shift']());}catch(_0xd432cb){_0x574e1e['push'](_0x574e1e['shift']());}}}(a77_0x2d72,0x8320c));import{designCommand}from'../../services/dataset-design/commands.js';function a77_0xc2d1(_0x19d860,_0x3c9adf){_0x19d860=_0x19d860-0xd1;const _0x2d72ac=a77_0x2d72();let _0xc2d1aa=_0x2d72ac[_0x19d860];return _0xc2d1aa;}export const datasetDesignStatus=designCommand('status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a78_0x5a4513=a78_0x5353;(function(_0x208738,_0x764fdb){const _0x15863c=a78_0x5353,_0x8bf867=_0x208738();while(!![]){try{const _0x322982=parseInt(_0x15863c(0x1d4))/0x1+-parseInt(_0x15863c(0x1d5))/0x2+parseInt(_0x15863c(0x1d0))/0x3+parseInt(_0x15863c(0x1d9))/0x4*(-parseInt(_0x15863c(0x1d3))/0x5)+-parseInt(_0x15863c(0x1d8))/0x6*(-parseInt(_0x15863c(0x1cf))/0x7)+parseInt(_0x15863c(0x1d2))/0x8+parseInt(_0x15863c(0x1d6))/0x9*(-parseInt(_0x15863c(0x1d7))/0xa);if(_0x322982===_0x764fdb)break;else _0x8bf867['push'](_0x8bf867['shift']());}catch(_0x47fede){_0x8bf867['push'](_0x8bf867['shift']());}}}(a78_0x31d9,0xd89a1));function a78_0x31d9(){const _0x23b89c=['sync-retry','13239064hyblfe','10nowhCJ','1586321IUnhtR','3116516MFWhTz','27YReUVo','8603950qbIxve','6psiNCn','2556184envojv','10811941AhSMMk','4556907YGtkWL'];a78_0x31d9=function(){return _0x23b89c;};return a78_0x31d9();}function a78_0x5353(_0xede7ce,_0x50e22d){_0xede7ce=_0xede7ce-0x1cf;const _0x31d936=a78_0x31d9();let _0x5353f6=_0x31d936[_0xede7ce];return _0x5353f6;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand(a78_0x5a4513(0x1d1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a79_0x3feb45=a79_0x14f9;(function(_0x2f42d,_0x27d907){const _0x5c7b33=a79_0x14f9,_0x26f5ad=_0x2f42d();while(!![]){try{const _0x4684e9=-parseInt(_0x5c7b33(0xcf))/0x1*(parseInt(_0x5c7b33(0xcd))/0x2)+parseInt(_0x5c7b33(0xd3))/0x3+parseInt(_0x5c7b33(0xcc))/0x4+parseInt(_0x5c7b33(0xce))/0x5*(parseInt(_0x5c7b33(0xd0))/0x6)+parseInt(_0x5c7b33(0xd4))/0x7+parseInt(_0x5c7b33(0xcb))/0x8*(-parseInt(_0x5c7b33(0xc9))/0x9)+parseInt(_0x5c7b33(0xca))/0xa*(-parseInt(_0x5c7b33(0xd2))/0xb);if(_0x4684e9===_0x27d907)break;else _0x26f5ad['push'](_0x26f5ad['shift']());}catch(_0x5017a2){_0x26f5ad['push'](_0x26f5ad['shift']());}}}(a79_0x2c05,0x420fd));import{designCommand}from'../../services/dataset-design/commands.js';function a79_0x14f9(_0xb65642,_0x101d18){_0xb65642=_0xb65642-0xc9;const _0x2c05d4=a79_0x2c05();let _0x14f9ab=_0x2c05d4[_0xb65642];return _0x14f9ab;}function a79_0x2c05(){const _0x50ade4=['18KuSQvf','2140jHFGoo','172712YMKBiP','2071972LVONwb','668124dDQjum','50glnKIE','1hBdYQb','259944XyxNmP','sync-status','41338tbBJTO','1158369dtvbVg','802795LcOzcs'];a79_0x2c05=function(){return _0x50ade4;};return a79_0x2c05();}export const datasetDesignSyncStatus=designCommand(a79_0x3feb45(0xd1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a80_0x3f4d4b=a80_0x3b68;(function(_0x4b477e,_0x1edce3){const _0x339123=a80_0x3b68,_0x16bea5=_0x4b477e();while(!![]){try{const _0x4ea0d1=-parseInt(_0x339123(0x6e))/0x1*(parseInt(_0x339123(0x69))/0x2)+-parseInt(_0x339123(0x68))/0x3*(parseInt(_0x339123(0x6f))/0x4)+-parseInt(_0x339123(0x6a))/0x5+parseInt(_0x339123(0x72))/0x6*(parseInt(_0x339123(0x6b))/0x7)+-parseInt(_0x339123(0x67))/0x8+-parseInt(_0x339123(0x6c))/0x9+parseInt(_0x339123(0x71))/0xa*(parseInt(_0x339123(0x70))/0xb);if(_0x4ea0d1===_0x1edce3)break;else _0x16bea5['push'](_0x16bea5['shift']());}catch(_0x1eb6ab){_0x16bea5['push'](_0x16bea5['shift']());}}}(a80_0x6882,0xc8735));function a80_0x3b68(_0x2941ad,_0x665419){_0x2941ad=_0x2941ad-0x67;const _0x688205=a80_0x6882();let _0x3b6879=_0x688205[_0x2941ad];return _0x3b6879;}function a80_0x6882(){const _0x4c9744=['140maemKT','189453kopHBQ','1260MZKsfm','60cwFPUZ','1735872xrcPyX','97260kYnXsQ','4slWfga','2761990ezchOD','988799FdcRXi','4346181ZdVvOZ','validate','187316mFwGQn'];a80_0x6882=function(){return _0x4c9744;};return a80_0x6882();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x3f4d4b(0x6d));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0xca25f1=a81_0xc440;(function(_0x226bf4,_0x592622){const _0x4462bb=a81_0xc440,_0x418807=_0x226bf4();while(!![]){try{const _0x16533a=-parseInt(_0x4462bb(0x149))/0x1+-parseInt(_0x4462bb(0x157))/0x2*(parseInt(_0x4462bb(0x176))/0x3)+-parseInt(_0x4462bb(0x133))/0x4*(parseInt(_0x4462bb(0x15a))/0x5)+-parseInt(_0x4462bb(0x165))/0x6*(parseInt(_0x4462bb(0x15b))/0x7)+parseInt(_0x4462bb(0x170))/0x8*(-parseInt(_0x4462bb(0x14b))/0x9)+-parseInt(_0x4462bb(0x13a))/0xa+-parseInt(_0x4462bb(0x171))/0xb*(-parseInt(_0x4462bb(0x13f))/0xc);if(_0x16533a===_0x592622)break;else _0x418807['push'](_0x418807['shift']());}catch(_0x11bd0d){_0x418807['push'](_0x418807['shift']());}}}(a81_0x525f,0x8409c));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a81_0x525f(){const _0x381235=['toDatasetCode','toTableName','dbName','9QZxJoo','creatorIdField','validateRules','type','entries','relatedPageInfoList','path','formatRules','string','datasetKey','responseBody','required','beforeScriptId','deprecated','toField','updateTimeField','main_sub','object','relations','sourceType','doVersion','226984BnMDXm','afterScriptId','creatorNameField','detail','dbId','parse','displayName','9676510QWoamh','logicField','push','requestFields','filter','86928KJESLw','requestBody','columnCodeListWithDeleted','cardinality','method','alias','allFields','dbtableConfig','fields','isArray','284879hNhegR','toDatasetName','9xVkIbr','relationId','labelField','extend','fromField','operations','toFieldLabel','map','indexes','allFieldNames','modifierIdField','description','114744ZoxwfH','tableComment','bizRelationType','60fnAMwI','810418fvhNYd','modelId','split','responseFields','name','properties','deleted','tableName','trim','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','30UUZxxz','title','dataType','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dblinkInfoDTO','pkField','length','modelCode','host','options','code','7693888PjHSwM','6358OGajKN','dataset'];a81_0x525f=function(){return _0x381235;};return a81_0x525f();}function normalizeField(_0xe9a4a){const _0x49a2aa=a81_0xc440;if(_0xe9a4a[_0x49a2aa(0x161)])return null;const _0x37cdff=Boolean(_0xe9a4a[_0x49a2aa(0x139)]!==undefined||_0xe9a4a['doType']!==undefined);let _0x3d7af2={};if(!_0x37cdff&&typeof _0xe9a4a[_0x49a2aa(0x14e)]===_0x49a2aa(0x17e))try{_0x3d7af2=JSON[_0x49a2aa(0x138)](_0xe9a4a[_0x49a2aa(0x14e)]);}catch{}const _0x1ec22a=_0x37cdff?_0xe9a4a['name']:_0xe9a4a['code'],_0x2cc227=_0x37cdff?_0xe9a4a['displayName']:_0xe9a4a['name'],_0x1fda5e=_0x37cdff?_0xe9a4a['doType']:_0xe9a4a[_0x49a2aa(0x179)]||_0xe9a4a[_0x49a2aa(0x167)],_0x439cf7=_0x37cdff?_0xe9a4a['pkField']===!![]:_0x3d7af2['pkField']===!![],_0x248e72=_0x37cdff?_0xe9a4a['required']===!![]:_0x3d7af2[_0x49a2aa(0x181)]===!![],_0x390312=_0x37cdff?_0xe9a4a[_0x49a2aa(0x16e)]??null:_0x3d7af2[_0x49a2aa(0x16e)]??null,_0x15951b={'name':_0x1ec22a,'displayName':_0x2cc227||_0x1ec22a,'type':_0x1fda5e,'dbType':_0xe9a4a['dbType'],'pk':_0x439cf7,'required':_0x248e72,'deprecated':_0xe9a4a[_0x49a2aa(0x183)]===!![],'description':_0xe9a4a[_0x49a2aa(0x156)]||undefined};return Array['isArray'](_0x390312)&&_0x390312['length']>0x0&&(_0x15951b['options']=_0x390312),_0x15951b;}function parseJsonMaybe(_0x15fba1){const _0x7aab60=a81_0xc440;if(typeof _0x15fba1!==_0x7aab60(0x17e))return _0x15fba1;try{return JSON[_0x7aab60(0x138)](_0x15fba1);}catch{return _0x15fba1;}}function normalizeOperationEntry(_0x1a5804,_0x533128){const _0x243c0c=a81_0xc440;if(!_0x533128||typeof _0x533128!==_0x243c0c(0x12f))return null;if(!_0x533128['method']||!_0x533128[_0x243c0c(0x17c)])return null;const _0x396315={'name':_0x1a5804,'method':_0x533128[_0x243c0c(0x143)],'path':_0x533128[_0x243c0c(0x17c)]};if(_0x533128[_0x243c0c(0x16d)])_0x396315[_0x243c0c(0x16d)]=_0x533128[_0x243c0c(0x16d)];if(_0x533128[_0x243c0c(0x140)]!=null){const _0x476968=parseJsonMaybe(_0x533128[_0x243c0c(0x140)]);_0x396315[_0x243c0c(0x140)]=_0x476968;}if(_0x533128[_0x243c0c(0x180)]!=null){const _0x45c96f=parseJsonMaybe(_0x533128[_0x243c0c(0x180)]);_0x396315['responseBody']=_0x45c96f;}if(_0x533128[_0x243c0c(0x182)]!=null)_0x396315[_0x243c0c(0x182)]=_0x533128[_0x243c0c(0x182)];if(_0x533128['afterScriptId']!=null)_0x396315[_0x243c0c(0x134)]=_0x533128[_0x243c0c(0x134)];if(Array[_0x243c0c(0x148)](_0x533128[_0x243c0c(0x13d)]))_0x396315[_0x243c0c(0x13d)]=_0x533128[_0x243c0c(0x13d)];if(Array[_0x243c0c(0x148)](_0x533128[_0x243c0c(0x15e)]))_0x396315[_0x243c0c(0x15e)]=_0x533128[_0x243c0c(0x15e)];return _0x396315;}function a81_0xc440(_0x5f1d6c,_0x11cab5){_0x5f1d6c=_0x5f1d6c-0x12f;const _0x525fe8=a81_0x525f();let _0xc44044=_0x525fe8[_0x5f1d6c];return _0xc44044;}function summarizeDbtable(_0x154317){const _0x4d68eb=a81_0xc440,_0x16072b={},_0x692ee8=[_0x4d68eb(0x137),_0x4d68eb(0x175),_0x4d68eb(0x162),'datasetKey',_0x4d68eb(0x16a),'allFields',_0x4d68eb(0x13b),'createTimeField',_0x4d68eb(0x185),_0x4d68eb(0x177),_0x4d68eb(0x135),_0x4d68eb(0x155),'modifierNameField',_0x4d68eb(0x14d),_0x4d68eb(0x169)];for(const _0x2b8bb0 of _0x692ee8){if(_0x154317[_0x2b8bb0]!==undefined)_0x16072b[_0x2b8bb0]=_0x154317[_0x2b8bb0];}return typeof _0x16072b[_0x4d68eb(0x145)]===_0x4d68eb(0x17e)&&_0x16072b[_0x4d68eb(0x145)]['length']>0x0&&(_0x16072b[_0x4d68eb(0x154)]=_0x16072b[_0x4d68eb(0x145)][_0x4d68eb(0x15d)](',')['map'](_0x372d3d=>_0x372d3d[_0x4d68eb(0x163)]())[_0x4d68eb(0x13e)](Boolean)),_0x16072b;}function normalizeRelatedPages(_0x37b4e2){const _0x36983a=a81_0xc440;if(!Array[_0x36983a(0x148)](_0x37b4e2))return[];return _0x37b4e2[_0x36983a(0x13e)](_0x2bdb35=>_0x2bdb35&&typeof _0x2bdb35===_0x36983a(0x12f))[_0x36983a(0x152)](_0x4d325f=>({'id':_0x4d325f['id'],'type':_0x4d325f[_0x36983a(0x179)],'code':_0x4d325f[_0x36983a(0x16f)],'title':_0x4d325f[_0x36983a(0x166)],'deleted':_0x4d325f['deleted']===!![]}));}export const datasetDetail={'service':'dataset','command':a81_0xca25f1(0x136),'description':a81_0xca25f1(0x168),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0xca25f1(0x144),'type':a81_0xca25f1(0x17e),'description':a81_0xca25f1(0x164)}],async 'execute'(_0x5d214c){const _0xe78c5c=a81_0xca25f1,_0x333971=await getDatasetDetail(_0x5d214c['str']('code')),_0x5d0b13=Array['isArray'](_0x333971[_0xe78c5c(0x147)])?_0x333971[_0xe78c5c(0x147)]:Array[_0xe78c5c(0x148)](_0x333971[_0xe78c5c(0x160)])?_0x333971[_0xe78c5c(0x160)]:[],_0x750876=_0x5d0b13[_0xe78c5c(0x152)](_0x35200b=>normalizeField(_0x35200b))[_0xe78c5c(0x13e)](_0x12c30d=>_0x12c30d!==null),_0x33c0e9=_0x333971[_0xe78c5c(0x150)]??{},_0x355310=[];for(const [_0x2e88bd,_0x445d98]of Object[_0xe78c5c(0x17a)](_0x33c0e9)){const _0x421bc6=normalizeOperationEntry(_0x2e88bd,_0x445d98);if(_0x421bc6)_0x355310[_0xe78c5c(0x13c)](_0x421bc6);}const _0x2bf9cd=_0x333971[_0xe78c5c(0x146)]??{},_0x47b8f9=_0x333971[_0xe78c5c(0x172)]??{},_0x5dab33=_0x2bf9cd[_0xe78c5c(0x137)]!=null?{'id':_0x2bf9cd[_0xe78c5c(0x137)],'name':_0x2bf9cd[_0xe78c5c(0x175)]??null}:undefined;let _0xff790c;return typeof _0x333971['extend']===_0xe78c5c(0x17e)&&(_0xff790c=parseJsonMaybe(_0x333971[_0xe78c5c(0x14e)])),{'ok':!![],'data':{'id':_0x333971[_0xe78c5c(0x15c)]??_0x333971['id'],'name':_0x333971[_0xe78c5c(0x15f)],'code':_0x333971[_0xe78c5c(0x16c)]||_0x333971['code'],'doVersion':_0x333971[_0xe78c5c(0x132)],'description':_0x333971[_0xe78c5c(0x156)]||_0x47b8f9[_0xe78c5c(0x158)]||undefined,'source':_0x333971['source']||_0x47b8f9[_0xe78c5c(0x131)],'table':_0x2bf9cd[_0xe78c5c(0x162)]||_0x47b8f9['tableName'],'datasetKey':_0x2bf9cd[_0xe78c5c(0x17f)],'pk':_0x2bf9cd[_0xe78c5c(0x16a)],'db':_0x5dab33,'dbtable':summarizeDbtable(_0x2bf9cd),'fields':_0x750876,'operations':_0x355310,'indexes':Array[_0xe78c5c(0x148)](_0x47b8f9[_0xe78c5c(0x153)])?_0x47b8f9[_0xe78c5c(0x153)]:[],'relations':Array[_0xe78c5c(0x148)](_0x333971[_0xe78c5c(0x130)])?_0x333971[_0xe78c5c(0x130)][_0xe78c5c(0x152)](_0x2b19b7=>({..._0x2b19b7[_0xe78c5c(0x14c)]!=null?{'relationId':_0x2b19b7[_0xe78c5c(0x14c)]}:{},'fromDataset':_0x333971['name'],'fromCode':_0x333971[_0xe78c5c(0x16c)]||_0x333971['code'],'fromTable':_0x2bf9cd[_0xe78c5c(0x162)]||_0x47b8f9['tableName'],'fromField':_0x2b19b7[_0xe78c5c(0x14f)],'toDataset':_0x2b19b7[_0xe78c5c(0x14a)],'toCode':_0x2b19b7[_0xe78c5c(0x173)],'toTable':_0x2b19b7[_0xe78c5c(0x174)],'toField':_0x2b19b7[_0xe78c5c(0x184)],'labelField':_0x2b19b7[_0xe78c5c(0x151)]||undefined,'cardinality':_0x2b19b7[_0xe78c5c(0x142)]||undefined,'bizRelationType':_0x2b19b7[_0xe78c5c(0x159)]==='main_sub'?_0xe78c5c(0x186):null})):[],'relatedPages':normalizeRelatedPages(_0x333971[_0xe78c5c(0x17b)]),...Array[_0xe78c5c(0x148)](_0x333971['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x333971[_0xe78c5c(0x141)]}:{},'formatRules':Array[_0xe78c5c(0x148)](_0x333971['formatRules'])?_0x333971[_0xe78c5c(0x17d)]:[],'validateRules':Array[_0xe78c5c(0x148)](_0x333971['validateRules'])?_0x333971[_0xe78c5c(0x178)]:[],..._0xff790c!==undefined?{'extend':_0xff790c}:{},'stats':{'fieldCount':_0x750876[_0xe78c5c(0x16b)],'operationCount':_0x355310[_0xe78c5c(0x16b)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x208c42=a82_0x2389;(function(_0x1b4309,_0x4d8f95){const _0x3c4750=a82_0x2389,_0x54e134=_0x1b4309();while(!![]){try{const _0x4c18ee=parseInt(_0x3c4750(0xc6))/0x1+parseInt(_0x3c4750(0x99))/0x2*(-parseInt(_0x3c4750(0x89))/0x3)+parseInt(_0x3c4750(0x9d))/0x4*(parseInt(_0x3c4750(0xc0))/0x5)+parseInt(_0x3c4750(0x9a))/0x6*(-parseInt(_0x3c4750(0xab))/0x7)+parseInt(_0x3c4750(0x93))/0x8*(-parseInt(_0x3c4750(0x98))/0x9)+parseInt(_0x3c4750(0x9c))/0xa+-parseInt(_0x3c4750(0x8b))/0xb*(-parseInt(_0x3c4750(0xba))/0xc);if(_0x4c18ee===_0x4d8f95)break;else _0x54e134['push'](_0x54e134['shift']());}catch(_0x38211e){_0x54e134['push'](_0x54e134['shift']());}}}(a82_0x2523,0x4c4b2));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_0x208c42(0x87),{'message':a82_0x208c42(0x9f),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x592a73,_0x21167f){const _0x46e003=a82_0x208c42;if(!_0x592a73)return undefined;let _0x404c09;try{_0x404c09=JSON[_0x46e003(0xbc)](_0x592a73);}catch(_0x2f8679){const _0x3dc983=_0x2f8679 instanceof Error?_0x2f8679['message']:String(_0x2f8679);throw CliErrors[_0x46e003(0x90)](_0x21167f+_0x46e003(0xad)+_0x3dc983);}if(!isPlainObject(_0x404c09)||Array[_0x46e003(0xc3)](_0x404c09))throw CliErrors[_0x46e003(0x90)](_0x21167f+_0x46e003(0x97));return _0x404c09;}export function validateExtendPatchKeys(_0x2f4b8c){const _0x4e7d73=a82_0x208c42,_0x598689=Object[_0x4e7d73(0x8c)](_0x2f4b8c);if(_0x598689[_0x4e7d73(0x94)]===0x0)throw CliErrors[_0x4e7d73(0x90)](_0x4e7d73(0x9b));for(const _0x28d440 of _0x598689){const _0x382ed5=EXTEND_PATCH_REDIRECTS[_0x4e7d73(0x8f)](_0x28d440);if(_0x382ed5)throw CliErrors[_0x4e7d73(0x90)](_0x382ed5[_0x4e7d73(0xaa)],_0x382ed5[_0x4e7d73(0x9e)]);if(!MUTABLE_EXTEND_KEYS[_0x4e7d73(0xa5)](_0x28d440))throw CliErrors[_0x4e7d73(0x90)](_0x4e7d73(0x92)+_0x28d440,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4d1bff=a82_0x208c42,_0x5b24c2=Array[_0x4d1bff(0xc5)](MUTABLE_EXTEND_KEYS)[_0x4d1bff(0xc8)]();return _0x5b24c2[_0x4d1bff(0x94)]>0x0?_0x4d1bff(0x8a)+_0x5b24c2[_0x4d1bff(0xa6)](',\x20'):_0x4d1bff(0xc1);}export function applyExtendPatch(_0x59a325,_0x115f89){const _0x4df117=a82_0x208c42;validateExtendPatchKeys(_0x115f89);const _0x251aa7=deepClone(_0x59a325),_0x33b8e8=[];for(const [_0x2a39a2,_0x308673]of Object['entries'](_0x115f89)){const _0x54ea86=_0x251aa7[_0x2a39a2],_0xb97730=deepClone(_0x308673);!deepEqual(_0x54ea86,_0xb97730)&&(_0x251aa7[_0x2a39a2]=_0xb97730,_0x33b8e8[_0x4df117(0xb8)](_0x4df117(0xb2)+_0x2a39a2));}return _0x33b8e8[_0x4df117(0xc8)](),{'after':_0x251aa7,'changedPaths':_0x33b8e8,'changed':_0x33b8e8['length']>0x0};}export function assertExpectation(_0x386c8b,_0x53a470){const _0x1a955f=a82_0x208c42;if(!_0x53a470)return;for(const [_0x1d2852,_0x3b63e9]of Object['entries'](_0x53a470)){const _0x575beb=_0x386c8b[_0x1d2852];if(!deepEqual(_0x575beb,_0x3b63e9))throw CliErrors[_0x1a955f(0x90)](_0x1a955f(0xc7)+_0x1d2852,'Expected\x20'+JSON['stringify'](_0x3b63e9)+_0x1a955f(0xbd)+JSON[_0x1a955f(0xb3)](_0x575beb));}}export async function buildDatasetExtendUpdateResult({appCode:_0xf3310b,input:_0x2a2e05,dryRun:_0x428ed4}){const _0x1e7b37=a82_0x208c42;validateInput(_0x2a2e05);const _0x2fbe4f=await getDatasetDetail(_0x2a2e05[_0x1e7b37(0xa2)]),_0x2026ac=parseDatasetExtend(_0x2fbe4f['extend']),_0x4d0031=deepClone(_0x2026ac['value']);assertExpectation(_0x4d0031,_0x2a2e05[_0x1e7b37(0xac)]);const {after:_0x579d02,changedPaths:_0x388e42,changed:_0xcf6452}=applyExtendPatch(_0x4d0031,_0x2a2e05[_0x1e7b37(0xc2)]),_0x18bca5=summarizeDataset(_0x2fbe4f,_0x2a2e05['code']);return _0xcf6452&&!_0x428ed4&&(_0x2fbe4f[_0x1e7b37(0xb6)]=serializeDatasetExtend(_0x579d02,_0x2026ac['shape']),await updateDrivenData(_0x2fbe4f)),{'ok':!![],'data':{'appCode':_0xf3310b,'selector':{'code':_0x2a2e05[_0x1e7b37(0xa2)]},'dataset':_0x18bca5,'dryRun':_0x428ed4,'changed':_0xcf6452,'changedPaths':_0x388e42,'before':{'extend':_0x4d0031},'after':{'extend':_0x579d02},'submitted':_0xcf6452&&!_0x428ed4},'message':_0xcf6452?_0x428ed4?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x388e42[_0x1e7b37(0xa6)](',\x20')+')':_0x1e7b37(0x88)+_0x388e42[_0x1e7b37(0xa6)](',\x20')+')':_0x1e7b37(0xbe)};}function a82_0x2389(_0x3b5c47,_0x44db1d){_0x3b5c47=_0x3b5c47-0x87;const _0x252350=a82_0x2523();let _0x2389cb=_0x252350[_0x3b5c47];return _0x2389cb;}export const datasetExtendUpdate={'service':a82_0x208c42(0x8d),'command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a82_0x208c42(0xa4),'flags':[CODE_FLAG,{'name':'patch-json','type':a82_0x208c42(0x8e),'required':!![],'description':a82_0x208c42(0xbb)},{'name':'expect-json','type':a82_0x208c42(0x8e),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x172a4d){validateInput(readExtendUpdateInput(_0x172a4d));},async 'dryRun'(_0x573701){const _0x24f922=a82_0x208c42,_0x17cfcf=await buildDatasetExtendUpdateResult({'appCode':_0x573701[_0x24f922(0xa0)],'input':readExtendUpdateInput(_0x573701),'dryRun':!![]});return{'method':_0x24f922(0xb9),'url':_0x24f922(0xb5),'body':_0x17cfcf[_0x24f922(0xa7)],'description':_0x17cfcf[_0x24f922(0xaa)]};},async 'execute'(_0x1aa6bf){return buildDatasetExtendUpdateResult({'appCode':_0x1aa6bf['appCode'],'input':readExtendUpdateInput(_0x1aa6bf),'dryRun':![]});}};function readExtendUpdateInput(_0x2a0753){const _0x5d4b6b=a82_0x208c42,_0x24eb10=trim(_0x2a0753['str'](_0x5d4b6b(0xa2))),_0x5ab04a=parseJsonObjectFlag(_0x2a0753[_0x5d4b6b(0xc4)](_0x5d4b6b(0xb0)),_0x5d4b6b(0xae)),_0x41ac0d=parseJsonObjectFlag(_0x2a0753[_0x5d4b6b(0xc4)]('expect-json'),_0x5d4b6b(0x91));return{'code':_0x24eb10,'patch':_0x5ab04a||{},'expect':_0x41ac0d};}function validateInput(_0x468a3f){const _0x3e7488=a82_0x208c42;if(!_0x468a3f['code'])throw CliErrors[_0x3e7488(0x90)](_0x3e7488(0xca));validateExtendPatchKeys(_0x468a3f[_0x3e7488(0xc2)]);}function a82_0x2523(){const _0x178528=['join','data','datasetName','dbtableConfig','message','70SGduIB','expect','\x20must\x20be\x20valid\x20JSON\x20object:\x20','--patch-json','object','patch-json','name','extend.','stringify','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','/smartapi/dataset/update-driven-data','extend','modelId','push','POST','72SbevTI','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','parse',',\x20actual\x20','No\x20changes\x20for\x20dataset\x20extend','dbName','3430QwZcNt','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','patch','isArray','str','from','566331mdJxzF','Expectation\x20mismatch\x20at\x20extend.','sort','tableName','--code\x20is\x20required','businessGroup','Updated\x20dataset\x20extend\x20(','6KdozHx','Allowed\x20keys:\x20','850069RdxfKU','keys','dataset','string','get','validation','--expect-json','Unsupported\x20patch\x20key:\x20','8yXTSLF','length','modelCode','dbId','\x20must\x20be\x20a\x20JSON\x20object','2668554IOUppw','479188HxVEpJ','280938EIfvBx','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','1916490wVurVH','1952ucMRbl','hint','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','appCode','datasetCode','code','trim','write','has'];a82_0x2523=function(){return _0x178528;};return a82_0x2523();}function parseDatasetExtend(_0x37d514){const _0x1b6f59=a82_0x208c42;if(typeof _0x37d514===_0x1b6f59(0x8e)){const _0x14c6c7=_0x37d514['trim']();if(!_0x14c6c7)return{'value':{},'shape':'string'};let _0x4bc23a;try{_0x4bc23a=JSON[_0x1b6f59(0xbc)](_0x14c6c7);}catch(_0x2755f3){const _0x38b13b=_0x2755f3 instanceof Error?_0x2755f3[_0x1b6f59(0xaa)]:String(_0x2755f3);throw CliErrors[_0x1b6f59(0x90)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x38b13b);}if(!isPlainObject(_0x4bc23a)||Array[_0x1b6f59(0xc3)](_0x4bc23a))throw CliErrors[_0x1b6f59(0x90)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x4bc23a,'shape':_0x1b6f59(0x8e)};}if(_0x37d514===undefined||_0x37d514===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x37d514)||Array[_0x1b6f59(0xc3)](_0x37d514))throw CliErrors[_0x1b6f59(0x90)](_0x1b6f59(0xb4));return{'value':_0x37d514,'shape':'object'};}function serializeDatasetExtend(_0x4bc240,_0x56f7bb){const _0x9700e2=a82_0x208c42;return _0x56f7bb===_0x9700e2(0x8e)?JSON[_0x9700e2(0xb3)](_0x4bc240):_0x4bc240;}function summarizeDataset(_0x471bb8,_0x1f1149){const _0x573910=a82_0x208c42,_0x4cdc83=isPlainObject(_0x471bb8['dataset'])?_0x471bb8[_0x573910(0x8d)]:{},_0x284d8c=isPlainObject(_0x471bb8[_0x573910(0xa9)])?_0x471bb8[_0x573910(0xa9)]:{};return{'id':_0x471bb8[_0x573910(0xb7)]??_0x471bb8['id']??_0x4cdc83['datasetId']??null,'code':_0x471bb8[_0x573910(0x95)]??_0x471bb8[_0x573910(0xa2)]??_0x4cdc83[_0x573910(0xa1)]??_0x1f1149,'name':_0x471bb8[_0x573910(0xb1)]??_0x4cdc83[_0x573910(0xa8)]??null,'table':_0x284d8c[_0x573910(0xc9)]??_0x4cdc83['tableName']??null,'db':_0x284d8c[_0x573910(0xbf)]??_0x284d8c[_0x573910(0x96)]??null};}function deepClone(_0x449f09){const _0x41eab6=a82_0x208c42;if(_0x449f09===undefined)return _0x449f09;return JSON[_0x41eab6(0xbc)](JSON[_0x41eab6(0xb3)](_0x449f09));}function deepEqual(_0x15aac4,_0x312302){const _0xd47280=a82_0x208c42;return JSON[_0xd47280(0xb3)](_0x15aac4)===JSON[_0xd47280(0xb3)](_0x312302);}function isPlainObject(_0xaac3c6){const _0x3cd6c5=a82_0x208c42;return Boolean(_0xaac3c6)&&typeof _0xaac3c6===_0x3cd6c5(0xaf)&&!Array[_0x3cd6c5(0xc3)](_0xaac3c6);}function trim(_0x475be8){const _0xaa8b9=a82_0x208c42,_0xcb2809=String(_0x475be8||'')[_0xaa8b9(0xa3)]();return _0xcb2809;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x5029d6=a83_0x5135;(function(_0x57136f,_0x155c9c){const _0x4ad422=a83_0x5135,_0x5312e6=_0x57136f();while(!![]){try{const _0x8171d2=parseInt(_0x4ad422(0x13f))/0x1*(parseInt(_0x4ad422(0x134))/0x2)+parseInt(_0x4ad422(0x130))/0x3+parseInt(_0x4ad422(0x145))/0x4*(parseInt(_0x4ad422(0x149))/0x5)+parseInt(_0x4ad422(0x15b))/0x6*(parseInt(_0x4ad422(0x15c))/0x7)+-parseInt(_0x4ad422(0x137))/0x8+parseInt(_0x4ad422(0x13e))/0x9*(-parseInt(_0x4ad422(0x133))/0xa)+-parseInt(_0x4ad422(0x151))/0xb*(parseInt(_0x4ad422(0x132))/0xc);if(_0x8171d2===_0x155c9c)break;else _0x5312e6['push'](_0x5312e6['shift']());}catch(_0x4e2e0b){_0x5312e6['push'](_0x5312e6['shift']());}}}(a83_0x5581,0x3028b));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';function a83_0x5581(){const _0x4e7829=['deleted','code','map','unknown','warnings','confirm','yes','appCode','properties','800985uKwlJn','readback-failed','396HXwfwD','473400YRGOKC','12VPkjGr','mutation-outcome-unknown','Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','1217600KjJmLr','displayName','Dry-run:\x20Dataset\x20field\x20','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','--code\x20is\x20required','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','backend','54AlSomJ','4006GDnjCZ','all','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','string','/smartapi/dataset/restore-column','field-restore','4xyJHjj','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','POST','write','1647615VOKvEp','message','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','length','name','data','trim','some','76571GHAdFO','isArray','fields','field','dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.','validation','55998rrRrPi','182fNgRfM','filter','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.','server-restored-count-mismatch'];a83_0x5581=function(){return _0x4e7829;};return a83_0x5581();}import{getDatasetDetail,isPlatformTransportFailure,listUserDeletedDatasetColumns,restoreDatasetColumns}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PAGE_SYNC_WARNING=a83_0x5029d6(0x159),NO_RESUBMIT_WARNING=a83_0x5029d6(0x15f);function a83_0x5135(_0xfe4e8a,_0x145c4c){_0xfe4e8a=_0xfe4e8a-0x127;const _0x55817e=a83_0x5581();let _0x513505=_0x55817e[_0xfe4e8a];return _0x513505;}export async function buildDatasetFieldRestoreResult({appCode:_0x1cee62,input:_0x33416a,dryRun:_0x111d55}){const _0x5439fd=a83_0x5029d6,_0xe63019=_0x33416a['code']['trim'](),_0x294936=_0x33416a[_0x5439fd(0x154)][_0x5439fd(0x14f)]();if(!_0xe63019)throw CliErrors[_0x5439fd(0x15a)](_0x5439fd(0x13b));if(!_0x294936)throw CliErrors[_0x5439fd(0x15a)]('--field\x20is\x20required');const _0x2385da=await getDatasetDetail(_0xe63019),_0x49fda0=resolveDataset(_0x2385da,_0xe63019),_0x3aa84d=(await listUserDeletedDatasetColumns(_0x49fda0['id']))[_0x5439fd(0x129)](normalizeUserDeletedField),_0x52008d=_0x3aa84d[_0x5439fd(0x15d)](_0x4bd834=>_0x4bd834[_0x5439fd(0x128)]===_0x294936);if(_0x52008d[_0x5439fd(0x14c)]===0x0)throw CliErrors[_0x5439fd(0x15a)](_0x5439fd(0x157)+_0x294936,_0x5439fd(0x14b));if(_0x52008d[_0x5439fd(0x14c)]>0x1)throw CliErrors[_0x5439fd(0x15a)]('Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20'+_0x294936,_0x5439fd(0x141));const _0x3e3a14=_0x52008d[0x0],_0xc80e7b={'id':_0x3e3a14['id'],'code':_0x3e3a14[_0x5439fd(0x128)],'displayName':_0x3e3a14[_0x5439fd(0x138)],'deleted':![],'active':!![]},_0x5ac656={'operation':'field-restore','appCode':_0x1cee62,'selector':{'code':_0xe63019,'field':_0x294936},'dataset':_0x49fda0,'before':_0x3e3a14,'dryRun':_0x111d55,'warnings':[PAGE_SYNC_WARNING]};if(_0x111d55)return{'ok':!![],'data':{..._0x5ac656,'after':_0xc80e7b,'backend':{'submitted':![],'requestedColumnIds':[_0x3e3a14['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x5439fd(0x139)+_0x294936+'\x20would\x20be\x20restored'};let _0x2ee6b9=null,_0x38d952=![];try{_0x2ee6b9=await restoreDatasetColumns(_0x49fda0['id'],[_0x3e3a14['id']]);}catch(_0x2991c0){if(!isPlatformTransportFailure(_0x2991c0))throw _0x2991c0;_0x38d952=!![];}const _0x40c1f2={'submitted':!![],'requestedColumnIds':[_0x3e3a14['id']],'restoredCount':_0x2ee6b9,..._0x38d952?{'outcome':_0x5439fd(0x12a)}:{}};let _0x59ba7f,_0x149991;try{[_0x59ba7f,_0x149991]=await Promise[_0x5439fd(0x140)]([listUserDeletedDatasetColumns(_0x49fda0['id']),getDatasetDetail(_0xe63019)]);}catch{return{'ok':![],'data':{..._0x5ac656,'after':null,'backend':_0x40c1f2,'warnings':[..._0x5ac656[_0x5439fd(0x12b)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x38d952?_0x5439fd(0x135):_0x5439fd(0x131)}},'message':_0x38d952?_0x5439fd(0x146)+_0x294936+'.\x20'+NO_RESUBMIT_WARNING:_0x5439fd(0x15e)+_0x294936+'.\x20'+NO_RESUBMIT_WARNING};}const _0x44ec0d=!_0x59ba7f[_0x5439fd(0x150)](_0x524b9a=>Number(_0x524b9a['id'])===_0x3e3a14['id']||_0x524b9a[_0x5439fd(0x128)]===_0x294936),_0x574d13=findActiveField(_0x149991,_0x3e3a14['id'],_0x294936),_0x2e9207=_0x574d13!==null,_0x4abd68=!_0x38d952&&_0x2ee6b9===0x1&&_0x44ec0d&&_0x2e9207,_0x3a74d2={'performed':!![],'deletedListCleared':_0x44ec0d,'activeFieldPresent':_0x2e9207,'passed':_0x4abd68,..._0x38d952?{'reason':_0x5439fd(0x135)}:_0x2ee6b9!==0x1?{'reason':_0x5439fd(0x160)}:{}};return{'ok':_0x4abd68,'data':{..._0x5ac656,'after':_0x574d13,'backend':_0x40c1f2,'warnings':_0x4abd68?_0x5ac656[_0x5439fd(0x12b)]:[..._0x5ac656[_0x5439fd(0x12b)],NO_RESUBMIT_WARNING],'verification':_0x3a74d2},'message':_0x4abd68?'Restored\x20Dataset\x20field\x20'+_0x294936:_0x38d952?_0x5439fd(0x146)+_0x294936+'.\x20'+NO_RESUBMIT_WARNING:_0x5439fd(0x13c)+_0x294936+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':'dataset','command':a83_0x5029d6(0x144),'description':a83_0x5029d6(0x136),'risk':a83_0x5029d6(0x148),'structuredErrors':!![],'rejectedFlags':[{'name':'all','message':a83_0x5029d6(0x155),'hint':'Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.'},{'name':'fields','message':a83_0x5029d6(0x156),'hint':'Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.'},{'name':a83_0x5029d6(0x12d),'message':a83_0x5029d6(0x158),'hint':a83_0x5029d6(0x13a)},{'name':a83_0x5029d6(0x12c),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x5029d6(0x13a)}],'flags':[CODE_FLAG,{'name':'field','type':a83_0x5029d6(0x142),'required':!![],'description':'Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x55fa05){readInput(_0x55fa05);},async 'dryRun'(_0xc1cc15){const _0x18dd8f=a83_0x5029d6,_0x2a72c5=await buildDatasetFieldRestoreResult({'appCode':_0xc1cc15[_0x18dd8f(0x12e)],'input':readInput(_0xc1cc15),'dryRun':!![]});return asDryRunResult({..._0x2a72c5[_0x18dd8f(0x14e)],'body':{'datasetId':_0x2a72c5[_0x18dd8f(0x14e)]['dataset']['id'],'columnIds':_0x2a72c5[_0x18dd8f(0x14e)][_0x18dd8f(0x13d)]['requestedColumnIds']}},{'method':_0x18dd8f(0x147),'url':_0x18dd8f(0x143),'description':_0x2a72c5[_0x18dd8f(0x14a)]});},async 'execute'(_0x46ffd1){const _0x5093bc=a83_0x5029d6;return buildDatasetFieldRestoreResult({'appCode':_0x46ffd1[_0x5093bc(0x12e)],'input':readInput(_0x46ffd1),'dryRun':![]});}};function readInput(_0x4e7a3d){const _0x800f8=a83_0x5029d6,_0x5a777e={'code':String(_0x4e7a3d['str'](_0x800f8(0x128))||'')[_0x800f8(0x14f)](),'field':String(_0x4e7a3d['str'](_0x800f8(0x154))||'')[_0x800f8(0x14f)]()};if(!_0x5a777e[_0x800f8(0x128)])throw CliErrors[_0x800f8(0x15a)]('--code\x20is\x20required');if(!_0x5a777e[_0x800f8(0x154)])throw CliErrors['validation']('--field\x20is\x20required');return _0x5a777e;}function findActiveField(_0x179029,_0x484b8b,_0x5ea985){const _0x4761a3=a83_0x5029d6,_0x503580=Array[_0x4761a3(0x152)](_0x179029[_0x4761a3(0x153)]),_0xf8f694=_0x503580?_0x179029['fields']:Array[_0x4761a3(0x152)](_0x179029[_0x4761a3(0x12f)])?_0x179029[_0x4761a3(0x12f)]:[];for(const _0x4bacc9 of _0xf8f694){if(!_0x4bacc9||typeof _0x4bacc9!=='object')continue;const _0x3b71bc=_0x4bacc9,_0x5cfd39=_0x503580?_0x3b71bc[_0x4761a3(0x14d)]:_0x3b71bc[_0x4761a3(0x128)],_0x2ef4db=_0x3b71bc[_0x4761a3(0x127)]!==!![]&&Number(_0x3b71bc['id'])===_0x484b8b&&_0x5cfd39===_0x5ea985;if(!_0x2ef4db)continue;const _0x3c3738=_0x503580?_0x3b71bc['displayName']:_0x3b71bc[_0x4761a3(0x14d)];return{'id':_0x484b8b,'code':_0x5ea985,'displayName':typeof _0x3c3738===_0x4761a3(0x142)&&_0x3c3738?_0x3c3738:_0x5ea985,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x27bc05=a84_0x1eeb;(function(_0x40077f,_0x2e8291){const _0x5afdd2=a84_0x1eeb,_0x512258=_0x40077f();while(!![]){try{const _0x16b785=-parseInt(_0x5afdd2(0xfe))/0x1*(parseInt(_0x5afdd2(0xf4))/0x2)+-parseInt(_0x5afdd2(0x10e))/0x3+parseInt(_0x5afdd2(0xee))/0x4+-parseInt(_0x5afdd2(0x138))/0x5+parseInt(_0x5afdd2(0x109))/0x6*(parseInt(_0x5afdd2(0x129))/0x7)+parseInt(_0x5afdd2(0x106))/0x8*(-parseInt(_0x5afdd2(0x114))/0x9)+parseInt(_0x5afdd2(0x11a))/0xa;if(_0x16b785===_0x2e8291)break;else _0x512258['push'](_0x512258['shift']());}catch(_0x22d492){_0x512258['push'](_0x512258['shift']());}}}(a84_0xd022,0x927bb));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([a84_0x27bc05(0xf8),a84_0x27bc05(0x10f),a84_0x27bc05(0x108),a84_0x27bc05(0x128),a84_0x27bc05(0xef),a84_0x27bc05(0x101),a84_0x27bc05(0x11b),'chartRole',a84_0x27bc05(0xfb)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x27bc05(0x113),a84_0x27bc05(0x127),a84_0x27bc05(0xf3),a84_0x27bc05(0x12f),a84_0x27bc05(0xff),a84_0x27bc05(0x10a),a84_0x27bc05(0x125),a84_0x27bc05(0x137),a84_0x27bc05(0x116),'autoIncrement','systemRetain']);export function parseJsonObjectFlag(_0x370114,_0x3331d9){const _0x4d03ec=a84_0x27bc05;if(!_0x370114)return undefined;let _0x4e9237;try{_0x4e9237=JSON[_0x4d03ec(0xf2)](_0x370114);}catch(_0xe0b6d5){const _0x3f6d45=_0xe0b6d5 instanceof Error?_0xe0b6d5[_0x4d03ec(0x135)]:String(_0xe0b6d5);throw CliErrors['validation'](_0x3331d9+_0x4d03ec(0x118)+_0x3f6d45);}if(!isPlainObject(_0x4e9237)||Array[_0x4d03ec(0x117)](_0x4e9237))throw CliErrors['validation'](_0x3331d9+_0x4d03ec(0x11c));return _0x4e9237;}export function validatePatchKeys(_0x36f4df){const _0x5c05b9=a84_0x27bc05,_0x46ec92=Object[_0x5c05b9(0x126)](_0x36f4df);if(_0x46ec92['length']===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x135437 of _0x46ec92){if(FORBIDDEN_FIELD_KEYS[_0x5c05b9(0x123)](_0x135437))throw CliErrors[_0x5c05b9(0x100)](_0x5c05b9(0x103)+_0x135437);if(!MUTABLE_FIELD_KEYS['has'](_0x135437))throw CliErrors[_0x5c05b9(0x100)](_0x5c05b9(0xed)+_0x135437,'Allowed\x20keys:\x20'+Array['from'](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x3d350d,_0x2068d1){const _0x14ac7e=a84_0x27bc05;validatePatchKeys(_0x2068d1);const _0x36deda=deepClone(_0x3d350d),_0x1fdfaa=new Set();for(const [_0x5c7875,_0x30f5f8]of Object[_0x14ac7e(0x115)](_0x2068d1)){const _0x3a6d60=_0x36deda[_0x5c7875],_0x25cc50=mergePatchValue(_0x3a6d60,_0x30f5f8);!deepEqual(_0x3a6d60,_0x25cc50)&&(_0x36deda[_0x5c7875]=_0x25cc50,_0x1fdfaa[_0x14ac7e(0x134)](_0x5c7875),collectChangedPaths(_0x5c7875,_0x3a6d60,_0x25cc50,_0x1fdfaa));}return{'after':_0x36deda,'changedPaths':Array['from'](_0x1fdfaa)[_0x14ac7e(0x107)](),'changed':_0x1fdfaa[_0x14ac7e(0x12c)]>0x0};}export function assertExpectation(_0x136019,_0x546786){const _0x4f5c16=a84_0x27bc05;if(!_0x546786)return;for(const [_0x4ad8b0,_0x2b0c00]of Object[_0x4f5c16(0x115)](_0x546786)){const _0x314ea6=_0x136019[_0x4ad8b0];if(!deepEqual(_0x314ea6,_0x2b0c00))throw CliErrors[_0x4f5c16(0x100)](_0x4f5c16(0xf0)+_0x4ad8b0,_0x4f5c16(0x10c)+JSON[_0x4f5c16(0x105)](_0x2b0c00)+_0x4f5c16(0x10d)+JSON[_0x4f5c16(0x105)](_0x314ea6));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4747e7,input:_0x2a870b,dryRun:_0x14ef1d}){const _0x469115=a84_0x27bc05;validateInput(_0x2a870b);const _0xea13c4=await getDatasetDetail(_0x2a870b[_0x469115(0x127)]),_0xd52973=readFieldArray(_0xea13c4),_0x5e2193=_0xd52973[_0x469115(0x130)](_0xc36ba5=>_0xc36ba5?.[_0x469115(0x113)]===_0x2a870b[_0x469115(0x12e)]);if(_0x5e2193<0x0)throw CliErrors[_0x469115(0x100)]('Field\x20not\x20found:\x20'+_0x2a870b[_0x469115(0x12e)]);const _0x22eca4=deepClone(_0xd52973[_0x5e2193]);assertExpectation(_0x22eca4,_0x2a870b[_0x469115(0x12a)]);const {after:_0x2e68b2,changedPaths:_0x4fd8b2,changed:_0x31065e}=applyFieldPatch(_0x22eca4,_0x2a870b[_0x469115(0x136)]),_0x43609f=summarizeDataset(_0xea13c4,_0x2a870b['code']);return _0x31065e&&!_0x14ef1d&&(_0xd52973[_0x5e2193]=_0x2e68b2,await updateDrivenData(_0xea13c4)),{'ok':!![],'data':{'appCode':_0x4747e7,'selector':{'code':_0x2a870b[_0x469115(0x127)]},'dataset':_0x43609f,'field':{'id':_0x22eca4['id']??null,'name':_0x22eca4[_0x469115(0x113)]},'dryRun':_0x14ef1d,'changed':_0x31065e,'changedPaths':_0x4fd8b2,'before':_0x22eca4,'after':_0x2e68b2,'submitted':_0x31065e&&!_0x14ef1d},'message':_0x31065e?_0x14ef1d?'Dry-run:\x20dataset\x20field\x20'+_0x2a870b[_0x469115(0x12e)]+_0x469115(0x102)+_0x4fd8b2[_0x469115(0x110)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x2a870b[_0x469115(0x12e)]+'\x20('+_0x4fd8b2[_0x469115(0x110)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x2a870b[_0x469115(0x12e)]};}export const datasetFieldUpdate={'service':'dataset','command':a84_0x27bc05(0xf5),'description':a84_0x27bc05(0x131),'risk':'write','flags':[CODE_FLAG,{'name':a84_0x27bc05(0x12e),'type':a84_0x27bc05(0xfc),'required':!![],'description':a84_0x27bc05(0xf1)},{'name':a84_0x27bc05(0x12d),'type':a84_0x27bc05(0xfc),'required':!![],'description':a84_0x27bc05(0x11e)},{'name':a84_0x27bc05(0x11d),'type':'string','required':![],'description':a84_0x27bc05(0x122)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bd360){validateInput(readFieldUpdateInput(_0x2bd360));},async 'dryRun'(_0x2f49b0){const _0xbd4c86=a84_0x27bc05,_0x246271=await buildDatasetFieldUpdateResult({'appCode':_0x2f49b0['appCode'],'input':readFieldUpdateInput(_0x2f49b0),'dryRun':!![]});return{'method':_0xbd4c86(0x104),'url':_0xbd4c86(0x124),'body':_0x246271['data'],'description':_0x246271[_0xbd4c86(0x135)]};},async 'execute'(_0x39eb19){const _0x3f68be=a84_0x27bc05;return buildDatasetFieldUpdateResult({'appCode':_0x39eb19[_0x3f68be(0x133)],'input':readFieldUpdateInput(_0x39eb19),'dryRun':![]});}};function readFieldUpdateInput(_0x51579e){const _0x3addbb=a84_0x27bc05,_0x165e64=trim(_0x51579e['str'](_0x3addbb(0x127))),_0x141367=emptyToUndefined(_0x51579e['str'](_0x3addbb(0x12e))),_0x10d648=parseJsonObjectFlag(_0x51579e[_0x3addbb(0x132)](_0x3addbb(0x12d)),'--patch-json'),_0x1f8f84=parseJsonObjectFlag(_0x51579e[_0x3addbb(0x132)](_0x3addbb(0x11d)),_0x3addbb(0x121));return{'code':_0x165e64,'field':_0x141367||'','patch':_0x10d648||{},'expect':_0x1f8f84};}function validateInput(_0x2b46db){const _0x4b5582=a84_0x27bc05;if(!_0x2b46db[_0x4b5582(0x127)])throw CliErrors[_0x4b5582(0x100)]('--code\x20is\x20required');if(!_0x2b46db[_0x4b5582(0x12e)])throw CliErrors[_0x4b5582(0x100)](_0x4b5582(0x12b));validatePatchKeys(_0x2b46db[_0x4b5582(0x136)]);}function readFieldArray(_0x301362){const _0x380a31=a84_0x27bc05;if(Array['isArray'](_0x301362['fields']))return _0x301362['fields'];if(Array[_0x380a31(0x117)](_0x301362[_0x380a31(0x119)]))return _0x301362[_0x380a31(0x119)];throw CliErrors['validation'](_0x380a31(0x11f));}function summarizeDataset(_0x4855b5,_0x1a68d4){const _0x8b6d02=a84_0x27bc05,_0x4def46=isPlainObject(_0x4855b5[_0x8b6d02(0xf9)])?_0x4855b5[_0x8b6d02(0xf9)]:{},_0x487cb9=isPlainObject(_0x4855b5[_0x8b6d02(0x120)])?_0x4855b5[_0x8b6d02(0x120)]:{};return{'id':_0x4855b5[_0x8b6d02(0x111)]??_0x4855b5['id']??_0x4def46[_0x8b6d02(0xf7)]??null,'code':_0x4855b5[_0x8b6d02(0x112)]??_0x4855b5[_0x8b6d02(0x127)]??_0x4def46['datasetCode']??_0x1a68d4,'name':_0x4855b5[_0x8b6d02(0x113)]??_0x4def46[_0x8b6d02(0x10b)]??null,'table':_0x487cb9[_0x8b6d02(0x125)]??_0x4def46[_0x8b6d02(0x125)]??null,'db':_0x487cb9[_0x8b6d02(0xfd)]??_0x487cb9[_0x8b6d02(0xfa)]??null};}function mergePatchValue(_0xe98559,_0x29a5b5){if(isPlainObject(_0xe98559)&&isPlainObject(_0x29a5b5))return deepMerge(_0xe98559,_0x29a5b5);return deepClone(_0x29a5b5);}function a84_0xd022(){const _0x39168c=['has','/smartapi/dataset/update-driven-data','tableName','keys','code','options','105eCkRrH','expect','--field\x20is\x20required','size','patch-json','field','dbTypeLen','findIndex','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','str','appCode','add','message','patch','deleted','1356010GjskLK','Unsupported\x20patch\x20key:\x20','1170548fBOadr','required','Expectation\x20mismatch\x20at\x20','Exact\x20raw\x20fields[].name\x20to\x20patch','parse','dbType','2299746NupEPO','field-update','trim','datasetId','doType','dataset','dbId','deprecated','string','dbName','1EvErIL','dbTypeScale','validation','datetimeFormat','\x20would\x20change\x20(','Forbidden\x20patch\x20key:\x20','POST','stringify','103544wsDOwf','sort','description','273870RZdjGm','dbFieldName','datasetName','Expected\x20',',\x20actual\x20','2293989KNlmSG','displayName','join','modelId','modelCode','name','18XwzzFs','entries','pkField','isArray','\x20must\x20be\x20valid\x20JSON\x20object:\x20','properties','18343070AAJoPt','defaultAggregation','\x20must\x20be\x20a\x20JSON\x20object','expect-json','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','dbtableConfig','--expect-json','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'];a84_0xd022=function(){return _0x39168c;};return a84_0xd022();}function deepMerge(_0x4a0186,_0x57f3d5){const _0x50d7dd=a84_0x27bc05,_0x39a926=deepClone(_0x4a0186);for(const [_0x3e2da9,_0x34d26c]of Object[_0x50d7dd(0x115)](_0x57f3d5)){_0x39a926[_0x3e2da9]=isPlainObject(_0x39a926[_0x3e2da9])&&isPlainObject(_0x34d26c)?deepMerge(_0x39a926[_0x3e2da9],_0x34d26c):deepClone(_0x34d26c);}return _0x39a926;}function collectChangedPaths(_0x14f85d,_0x10969a,_0x121c70,_0x39ed8d){const _0xb8042f=a84_0x27bc05;if(!isPlainObject(_0x10969a)||!isPlainObject(_0x121c70))return;const _0x6895=new Set([...Object[_0xb8042f(0x126)](_0x10969a),...Object[_0xb8042f(0x126)](_0x121c70)]);for(const _0x112ef3 of _0x6895){const _0x5870bb=_0x10969a[_0x112ef3],_0xed96d5=_0x121c70[_0x112ef3];!deepEqual(_0x5870bb,_0xed96d5)&&_0x39ed8d[_0xb8042f(0x134)](_0x14f85d+'.'+_0x112ef3);}}function a84_0x1eeb(_0x424b55,_0x3e20ba){_0x424b55=_0x424b55-0xed;const _0xd02272=a84_0xd022();let _0x1eeb4a=_0xd02272[_0x424b55];return _0x1eeb4a;}function deepClone(_0x17c22e){const _0x416f99=a84_0x27bc05;if(_0x17c22e===undefined)return _0x17c22e;return JSON[_0x416f99(0xf2)](JSON[_0x416f99(0x105)](_0x17c22e));}function deepEqual(_0x5c6c8b,_0x4b4ed5){const _0x4ee1da=a84_0x27bc05;return JSON[_0x4ee1da(0x105)](_0x5c6c8b)===JSON[_0x4ee1da(0x105)](_0x4b4ed5);}function isPlainObject(_0x4dd6ee){const _0x4f5cd7=a84_0x27bc05;return Boolean(_0x4dd6ee)&&typeof _0x4dd6ee==='object'&&!Array[_0x4f5cd7(0x117)](_0x4dd6ee);}function emptyToUndefined(_0x4becb4){const _0x238b6b=a84_0x27bc05,_0x18f251=String(_0x4becb4||'')[_0x238b6b(0xf6)]();return _0x18f251||undefined;}function trim(_0x41066f){const _0xc91044=a84_0x27bc05;return String(_0x41066f||'')[_0xc91044(0xf6)]();}
|
|
1
|
+
const a84_0x3c5372=a84_0x4eca;(function(_0x2c65e7,_0x98e5bc){const _0x11d664=a84_0x4eca,_0x5db47b=_0x2c65e7();while(!![]){try{const _0x1416c6=parseInt(_0x11d664(0x104))/0x1+parseInt(_0x11d664(0xd8))/0x2*(parseInt(_0x11d664(0xda))/0x3)+-parseInt(_0x11d664(0xdc))/0x4*(-parseInt(_0x11d664(0xe0))/0x5)+parseInt(_0x11d664(0xd0))/0x6*(-parseInt(_0x11d664(0xce))/0x7)+-parseInt(_0x11d664(0xf5))/0x8+parseInt(_0x11d664(0x109))/0x9*(-parseInt(_0x11d664(0xf9))/0xa)+parseInt(_0x11d664(0xbc))/0xb;if(_0x1416c6===_0x98e5bc)break;else _0x5db47b['push'](_0x5db47b['shift']());}catch(_0x44a180){_0x5db47b['push'](_0x5db47b['shift']());}}}(a84_0x1982,0x52333));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([a84_0x3c5372(0xc9),'displayName',a84_0x3c5372(0xde),'options',a84_0x3c5372(0xe3),a84_0x3c5372(0xd6),'defaultAggregation',a84_0x3c5372(0xfe),a84_0x3c5372(0xd2)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x3c5372(0xe9),'code','dbType','dbTypeLen','dbTypeScale',a84_0x3c5372(0xcc),'tableName',a84_0x3c5372(0xe7),a84_0x3c5372(0xdd),a84_0x3c5372(0xbf),'systemRetain']);export function parseJsonObjectFlag(_0x169068,_0x42fc92){const _0x37d91c=a84_0x3c5372;if(!_0x169068)return undefined;let _0x14e39d;try{_0x14e39d=JSON[_0x37d91c(0xf7)](_0x169068);}catch(_0x3006f3){const _0x264b5e=_0x3006f3 instanceof Error?_0x3006f3[_0x37d91c(0xc2)]:String(_0x3006f3);throw CliErrors['validation'](_0x42fc92+_0x37d91c(0xef)+_0x264b5e);}if(!isPlainObject(_0x14e39d)||Array[_0x37d91c(0xcb)](_0x14e39d))throw CliErrors[_0x37d91c(0x107)](_0x42fc92+_0x37d91c(0xfc));return _0x14e39d;}export function validatePatchKeys(_0x3b883c){const _0x424e2e=a84_0x3c5372,_0x34b3ef=Object['keys'](_0x3b883c);if(_0x34b3ef[_0x424e2e(0xc5)]===0x0)throw CliErrors['validation'](_0x424e2e(0xc0));for(const _0x5a89da of _0x34b3ef){if(FORBIDDEN_FIELD_KEYS[_0x424e2e(0xc8)](_0x5a89da))throw CliErrors['validation'](_0x424e2e(0xe6)+_0x5a89da);if(!MUTABLE_FIELD_KEYS[_0x424e2e(0xc8)](_0x5a89da))throw CliErrors[_0x424e2e(0x107)](_0x424e2e(0xf3)+_0x5a89da,_0x424e2e(0xbb)+Array['from'](MUTABLE_FIELD_KEYS)[_0x424e2e(0xea)](',\x20'));}}export function applyFieldPatch(_0x521ece,_0x11b8ed){const _0x547b8a=a84_0x3c5372;validatePatchKeys(_0x11b8ed);const _0x36571b=deepClone(_0x521ece),_0x302532=new Set();for(const [_0x284ae1,_0x5730c9]of Object[_0x547b8a(0xfb)](_0x11b8ed)){const _0x2a5cdb=_0x36571b[_0x284ae1],_0x56baa5=mergePatchValue(_0x2a5cdb,_0x5730c9);!deepEqual(_0x2a5cdb,_0x56baa5)&&(_0x36571b[_0x284ae1]=_0x56baa5,_0x302532[_0x547b8a(0x10a)](_0x284ae1),collectChangedPaths(_0x284ae1,_0x2a5cdb,_0x56baa5,_0x302532));}return{'after':_0x36571b,'changedPaths':Array[_0x547b8a(0xc1)](_0x302532)[_0x547b8a(0xee)](),'changed':_0x302532[_0x547b8a(0x102)]>0x0};}function a84_0x1982(){const _0x377d68=[',\x20actual\x20','datasetName','autoIncrement','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','from','message','POST','Expectation\x20mismatch\x20at\x20','length','--expect-json','modelId','has','doType','stringify','isArray','dbFieldName','dataset','91lcuWFi','Updated\x20dataset\x20field\x20','22206UgcJLh','expect-json','deprecated','findIndex','data','datasetId','datetimeFormat','dbtableConfig','154306KHKfqv','code','3WkDkEA','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','20yexWxD','pkField','description','field','330275iAuaNU','object','datasetCode','required','No\x20changes\x20for\x20dataset\x20field\x20','appCode','Forbidden\x20patch\x20key:\x20','deleted','dbId','name','join','keys','modelCode','trim','sort','\x20must\x20be\x20valid\x20JSON\x20object:\x20','patch','string','str','Unsupported\x20patch\x20key:\x20','Dry-run:\x20dataset\x20field\x20','960328TCldco','/smartapi/dataset/update-driven-data','parse','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','742390TpNhYm','write','entries','\x20must\x20be\x20a\x20JSON\x20object','tableName','chartRole','field-update','dbName','fields','size','--code\x20is\x20required','12993lNhsnC','expect','--field\x20is\x20required','validation','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','9WwOLBH','add','Allowed\x20keys:\x20','1745293oPxsNQ'];a84_0x1982=function(){return _0x377d68;};return a84_0x1982();}export function assertExpectation(_0x462c7e,_0x550f87){const _0x14fe87=a84_0x3c5372;if(!_0x550f87)return;for(const [_0xea19d,_0x9fcdac]of Object[_0x14fe87(0xfb)](_0x550f87)){const _0x52d5c5=_0x462c7e[_0xea19d];if(!deepEqual(_0x52d5c5,_0x9fcdac))throw CliErrors[_0x14fe87(0x107)](_0x14fe87(0xc4)+_0xea19d,'Expected\x20'+JSON[_0x14fe87(0xca)](_0x9fcdac)+_0x14fe87(0xbd)+JSON[_0x14fe87(0xca)](_0x52d5c5));}}export async function buildDatasetFieldUpdateResult({appCode:_0xf62601,input:_0x1ff723,dryRun:_0x4888a9}){const _0x56bd6b=a84_0x3c5372;validateInput(_0x1ff723);const _0x3acdbb=await getDatasetDetail(_0x1ff723[_0x56bd6b(0xd9)]),_0x464c1c=readFieldArray(_0x3acdbb),_0x17bb85=_0x464c1c[_0x56bd6b(0xd3)](_0x24d3b6=>_0x24d3b6?.[_0x56bd6b(0xe9)]===_0x1ff723[_0x56bd6b(0xdf)]);if(_0x17bb85<0x0)throw CliErrors[_0x56bd6b(0x107)]('Field\x20not\x20found:\x20'+_0x1ff723[_0x56bd6b(0xdf)]);const _0x4b0795=deepClone(_0x464c1c[_0x17bb85]);assertExpectation(_0x4b0795,_0x1ff723[_0x56bd6b(0x105)]);const {after:_0x33dd90,changedPaths:_0x52bf08,changed:_0x3a61da}=applyFieldPatch(_0x4b0795,_0x1ff723[_0x56bd6b(0xf0)]),_0x865e9e=summarizeDataset(_0x3acdbb,_0x1ff723[_0x56bd6b(0xd9)]);return _0x3a61da&&!_0x4888a9&&(_0x464c1c[_0x17bb85]=_0x33dd90,await updateDrivenData(_0x3acdbb)),{'ok':!![],'data':{'appCode':_0xf62601,'selector':{'code':_0x1ff723[_0x56bd6b(0xd9)]},'dataset':_0x865e9e,'field':{'id':_0x4b0795['id']??null,'name':_0x4b0795['name']},'dryRun':_0x4888a9,'changed':_0x3a61da,'changedPaths':_0x52bf08,'before':_0x4b0795,'after':_0x33dd90,'submitted':_0x3a61da&&!_0x4888a9},'message':_0x3a61da?_0x4888a9?_0x56bd6b(0xf4)+_0x1ff723[_0x56bd6b(0xdf)]+'\x20would\x20change\x20('+_0x52bf08['join'](',\x20')+')':_0x56bd6b(0xcf)+_0x1ff723[_0x56bd6b(0xdf)]+'\x20('+_0x52bf08[_0x56bd6b(0xea)](',\x20')+')':_0x56bd6b(0xe4)+_0x1ff723['field']};}export const datasetFieldUpdate={'service':a84_0x3c5372(0xcd),'command':a84_0x3c5372(0xff),'description':a84_0x3c5372(0xf8),'risk':a84_0x3c5372(0xfa),'flags':[CODE_FLAG,{'name':a84_0x3c5372(0xdf),'type':'string','required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':'patch-json','type':'string','required':!![],'description':a84_0x3c5372(0xdb)},{'name':a84_0x3c5372(0xd1),'type':a84_0x3c5372(0xf1),'required':![],'description':a84_0x3c5372(0x108)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x85002d){validateInput(readFieldUpdateInput(_0x85002d));},async 'dryRun'(_0x579c86){const _0xc588c1=a84_0x3c5372,_0x1c064f=await buildDatasetFieldUpdateResult({'appCode':_0x579c86[_0xc588c1(0xe5)],'input':readFieldUpdateInput(_0x579c86),'dryRun':!![]});return{'method':_0xc588c1(0xc3),'url':_0xc588c1(0xf6),'body':_0x1c064f[_0xc588c1(0xd4)],'description':_0x1c064f[_0xc588c1(0xc2)]};},async 'execute'(_0x4f8762){const _0x38b0c6=a84_0x3c5372;return buildDatasetFieldUpdateResult({'appCode':_0x4f8762[_0x38b0c6(0xe5)],'input':readFieldUpdateInput(_0x4f8762),'dryRun':![]});}};function readFieldUpdateInput(_0x4f2a15){const _0x4206df=a84_0x3c5372,_0x12a8f0=trim(_0x4f2a15[_0x4206df(0xf2)]('code')),_0x50e4ee=emptyToUndefined(_0x4f2a15[_0x4206df(0xf2)]('field')),_0x184a72=parseJsonObjectFlag(_0x4f2a15['str']('patch-json'),'--patch-json'),_0x43d2be=parseJsonObjectFlag(_0x4f2a15[_0x4206df(0xf2)]('expect-json'),_0x4206df(0xc6));return{'code':_0x12a8f0,'field':_0x50e4ee||'','patch':_0x184a72||{},'expect':_0x43d2be};}function validateInput(_0x29ae4b){const _0x36a0d7=a84_0x3c5372;if(!_0x29ae4b[_0x36a0d7(0xd9)])throw CliErrors[_0x36a0d7(0x107)](_0x36a0d7(0x103));if(!_0x29ae4b[_0x36a0d7(0xdf)])throw CliErrors['validation'](_0x36a0d7(0x106));validatePatchKeys(_0x29ae4b[_0x36a0d7(0xf0)]);}function readFieldArray(_0x37c60e){const _0x2dde92=a84_0x3c5372;if(Array[_0x2dde92(0xcb)](_0x37c60e[_0x2dde92(0x101)]))return _0x37c60e[_0x2dde92(0x101)];if(Array[_0x2dde92(0xcb)](_0x37c60e['properties']))return _0x37c60e['properties'];throw CliErrors['validation']('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x5d8a66,_0x1d6839){const _0x3ef7e4=a84_0x3c5372,_0x261c6f=isPlainObject(_0x5d8a66[_0x3ef7e4(0xcd)])?_0x5d8a66[_0x3ef7e4(0xcd)]:{},_0x286dba=isPlainObject(_0x5d8a66['dbtableConfig'])?_0x5d8a66[_0x3ef7e4(0xd7)]:{};return{'id':_0x5d8a66[_0x3ef7e4(0xc7)]??_0x5d8a66['id']??_0x261c6f[_0x3ef7e4(0xd5)]??null,'code':_0x5d8a66[_0x3ef7e4(0xec)]??_0x5d8a66[_0x3ef7e4(0xd9)]??_0x261c6f[_0x3ef7e4(0xe2)]??_0x1d6839,'name':_0x5d8a66['name']??_0x261c6f[_0x3ef7e4(0xbe)]??null,'table':_0x286dba[_0x3ef7e4(0xfd)]??_0x261c6f[_0x3ef7e4(0xfd)]??null,'db':_0x286dba[_0x3ef7e4(0x100)]??_0x286dba[_0x3ef7e4(0xe8)]??null};}function mergePatchValue(_0xa5076b,_0x17203e){if(isPlainObject(_0xa5076b)&&isPlainObject(_0x17203e))return deepMerge(_0xa5076b,_0x17203e);return deepClone(_0x17203e);}function deepMerge(_0xcdb666,_0x3f47a3){const _0xaaa8e5=deepClone(_0xcdb666);for(const [_0x5ac62b,_0x519611]of Object['entries'](_0x3f47a3)){_0xaaa8e5[_0x5ac62b]=isPlainObject(_0xaaa8e5[_0x5ac62b])&&isPlainObject(_0x519611)?deepMerge(_0xaaa8e5[_0x5ac62b],_0x519611):deepClone(_0x519611);}return _0xaaa8e5;}function collectChangedPaths(_0xbbe924,_0x2366c7,_0x49e04b,_0x26e31e){const _0x16df07=a84_0x3c5372;if(!isPlainObject(_0x2366c7)||!isPlainObject(_0x49e04b))return;const _0x255e15=new Set([...Object['keys'](_0x2366c7),...Object[_0x16df07(0xeb)](_0x49e04b)]);for(const _0x589ca3 of _0x255e15){const _0x11dc88=_0x2366c7[_0x589ca3],_0x2fdcd4=_0x49e04b[_0x589ca3];!deepEqual(_0x11dc88,_0x2fdcd4)&&_0x26e31e[_0x16df07(0x10a)](_0xbbe924+'.'+_0x589ca3);}}function deepClone(_0x27f8db){const _0x398925=a84_0x3c5372;if(_0x27f8db===undefined)return _0x27f8db;return JSON[_0x398925(0xf7)](JSON[_0x398925(0xca)](_0x27f8db));}function deepEqual(_0x1db813,_0xc91d90){const _0x234d2a=a84_0x3c5372;return JSON['stringify'](_0x1db813)===JSON[_0x234d2a(0xca)](_0xc91d90);}function isPlainObject(_0x14978c){const _0x2b2a66=a84_0x3c5372;return Boolean(_0x14978c)&&typeof _0x14978c===_0x2b2a66(0xe1)&&!Array[_0x2b2a66(0xcb)](_0x14978c);}function a84_0x4eca(_0xd28a66,_0x27a5f2){_0xd28a66=_0xd28a66-0xbb;const _0x1982e2=a84_0x1982();let _0x4ecadd=_0x1982e2[_0xd28a66];return _0x4ecadd;}function emptyToUndefined(_0x1da787){const _0x28ac24=a84_0x3c5372,_0x5bf689=String(_0x1da787||'')[_0x28ac24(0xed)]();return _0x5bf689||undefined;}function trim(_0xc0a332){return String(_0xc0a332||'')['trim']();}
|