@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.7
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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +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
|
+
function a74_0x500b(){const _0x4d088f=['No\x20undeleted\x20dataset\x20found\x20for\x20','Required\x20to\x20execute\x20dataset\x20deletion','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','5CwLpkt','confirm','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','21EykQuj','deleted','bool','object','2319886GAvoGF','Dataset\x20id','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','2615022haBgXW','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','boolean','Deleted\x20','validation','type','9282726CHSdfJ','dbid=','relatedPages','code','\x20--appcode\x20','push','str','delete','POST','appCode','high-risk-write','\x20dataset(s)','cascade','num','dataset','expected-count','rabetbase\x20page\x20restore\x20--id\x20','/smartapi/dataset/delete?cascade=','\x20failed','map','true','Matched\x20','dbid','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','id=','9393064vMAyZK','\x20dataset(s);\x20','isInteger','2609019WIhLsI','1105288zFwFfl','source','filter','add','number','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','5225276XZPAcq','length','dbId','tableName','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','Would\x20delete\x20','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','name','Would\x20safely\x20delete\x20','dbtableConfig'];a74_0x500b=function(){return _0x4d088f;};return a74_0x500b();}function a74_0x4ad2(_0x1fc776,_0x144a55){_0x1fc776=_0x1fc776-0x174;const _0x500bb6=a74_0x500b();let _0x4ad210=_0x500bb6[_0x1fc776];return _0x4ad210;}const a74_0x258fb3=a74_0x4ad2;(function(_0x7848c8,_0x50ff91){const _0x55862b=a74_0x4ad2,_0x528173=_0x7848c8();while(!![]){try{const _0x10fa32=parseInt(_0x55862b(0x18e))/0x1+-parseInt(_0x55862b(0x1a9))/0x2+parseInt(_0x55862b(0x18d))/0x3+-parseInt(_0x55862b(0x194))/0x4*(-parseInt(_0x55862b(0x1a2))/0x5)+parseInt(_0x55862b(0x1ac))/0x6*(-parseInt(_0x55862b(0x1a5))/0x7)+-parseInt(_0x55862b(0x18a))/0x8+parseInt(_0x55862b(0x1b2))/0x9;if(_0x10fa32===_0x50ff91)break;else _0x528173['push'](_0x528173['shift']());}catch(_0x43802d){_0x528173['push'](_0x528173['shift']());}}}(a74_0x500b,0xa3d83));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_0x258fb3(0x192),'description':a74_0x258fb3(0x1aa)},DBID_FLAG={'name':'dbid','type':a74_0x258fb3(0x192),'description':a74_0x258fb3(0x198)},CONFIRM_FLAG={'name':a74_0x258fb3(0x1a3),'type':'boolean','description':a74_0x258fb3(0x1a0)},CASCADE_FLAG={'name':a74_0x258fb3(0x17d),'type':a74_0x258fb3(0x1ae),'description':a74_0x258fb3(0x1ad)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a74_0x258fb3(0x192),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a74_0x258fb3(0x17f),'command':a74_0x258fb3(0x178),'description':a74_0x258fb3(0x1ab),'risk':a74_0x258fb3(0x17b),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x243a5e){const _0x55f0b1=a74_0x258fb3,_0x1e16d1=_0x243a5e[_0x55f0b1(0x17e)]('id'),_0x4640bb=_0x243a5e[_0x55f0b1(0x177)](_0x55f0b1(0x174)),_0x4f5418=_0x243a5e[_0x55f0b1(0x17e)](_0x55f0b1(0x187)),_0x3c1e85=[_0x1e16d1>0x0,Boolean(_0x4640bb),_0x4f5418>0x0]['filter'](Boolean);if(_0x3c1e85[_0x55f0b1(0x195)]===0x0)throw CliErrors[_0x55f0b1(0x1b0)](_0x55f0b1(0x1a1));if(_0x3c1e85[_0x55f0b1(0x195)]>0x1)throw CliErrors['validation'](_0x55f0b1(0x19b));},async 'dryRun'(_0x4d8a8f){const _0x5bb96d=a74_0x258fb3,_0x44f9ac=await resolveTargets(_0x4d8a8f),_0x2b6bc7=_0x4d8a8f[_0x5bb96d(0x1a7)](_0x5bb96d(0x17d));return{'method':_0x5bb96d(0x179),'url':_0x5bb96d(0x182)+(_0x2b6bc7?_0x5bb96d(0x185):'false'),'body':{'count':_0x44f9ac[_0x5bb96d(0x195)],'cascade':_0x2b6bc7,'datasets':_0x44f9ac},'description':_0x2b6bc7?_0x5bb96d(0x19a)+_0x44f9ac[_0x5bb96d(0x195)]+_0x5bb96d(0x193):_0x5bb96d(0x19d)+_0x44f9ac[_0x5bb96d(0x195)]+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x57328f){const _0x45253c=a74_0x258fb3;if(!_0x57328f['bool'](_0x45253c(0x1a3)))throw CliErrors[_0x45253c(0x1b0)](_0x45253c(0x1a4),_0x45253c(0x199));const _0x3e5015=await resolveTargets(_0x57328f),_0x3e960c=_0x57328f[_0x45253c(0x1a7)](_0x45253c(0x17d)),_0x2639c2=[],_0x9d75bd=[];for(const _0x2dd1e2 of _0x3e5015){try{await deleteDataset(_0x2dd1e2['id'],_0x3e960c),_0x2639c2['push'](_0x2dd1e2);}catch(_0x1fe7b8){_0x9d75bd['push']({..._0x2dd1e2,'error':_0x1fe7b8 instanceof Error?_0x1fe7b8['message']:String(_0x1fe7b8)});}}if(_0x9d75bd[_0x45253c(0x195)]>0x0){const _0x36779a=buildPageRestoreCommands(_0x57328f[_0x45253c(0x17a)],_0x3e960c?_0x2639c2:[]);return{'ok':![],'data':{'requested':_0x3e5015['length'],'cascade':_0x3e960c,'deletedCount':_0x2639c2[_0x45253c(0x195)],'failedCount':_0x9d75bd['length'],'deleted':_0x2639c2,'failed':_0x9d75bd,'pageRestoreCommands':_0x36779a},'message':_0x45253c(0x1af)+_0x2639c2[_0x45253c(0x195)]+'/'+_0x3e5015[_0x45253c(0x195)]+_0x45253c(0x18b)+_0x9d75bd[_0x45253c(0x195)]+_0x45253c(0x183)};}return{'ok':!![],'data':{'requested':_0x3e5015['length'],'cascade':_0x3e960c,'deletedCount':_0x2639c2[_0x45253c(0x195)],'deleted':_0x2639c2,'pageRestoreCommands':buildPageRestoreCommands(_0x57328f[_0x45253c(0x17a)],_0x3e960c?_0x2639c2:[])},'message':'Deleted\x20'+_0x2639c2[_0x45253c(0x195)]+_0x45253c(0x17c)};}};async function resolveTargets(_0x218d9c){const _0x3dc9b9=a74_0x258fb3,_0x5f5250=_0x218d9c[_0x3dc9b9(0x17e)]('id'),_0x296f67=_0x218d9c[_0x3dc9b9(0x177)](_0x3dc9b9(0x174)),_0xa99f70=_0x218d9c[_0x3dc9b9(0x17e)](_0x3dc9b9(0x187));let _0x290a71;_0x296f67?(_0x290a71=await listDatasets(_0x218d9c['appCode'],{'code':_0x296f67}),_0x290a71=_0x290a71[_0x3dc9b9(0x190)](_0x568569=>_0x568569[_0x3dc9b9(0x174)]===_0x296f67)):(_0x290a71=await listDatasets(_0x218d9c[_0x3dc9b9(0x17a)]),_0x5f5250>0x0&&(_0x290a71=_0x290a71[_0x3dc9b9(0x190)](_0x14b51d=>_0x14b51d['id']===_0x5f5250)),_0xa99f70>0x0&&(_0x290a71=_0x290a71[_0x3dc9b9(0x190)](_0x1cdd79=>_0x1cdd79[_0x3dc9b9(0x19e)]?.['dbId']===_0xa99f70)));const _0x1b7036=[];for(const _0x331026 of _0x290a71){const _0x5bb3ec=await getDatasetDetail(_0x331026['code']),_0x6c9acb=Array['isArray'](_0x5bb3ec['relatedPageInfoList'])?_0x5bb3ec['relatedPageInfoList']['filter'](_0x5d7754=>_0x5d7754!=null&&typeof _0x5d7754===_0x3dc9b9(0x1a8)&&_0x5d7754[_0x3dc9b9(0x1a6)]!==!![]):[];_0x1b7036[_0x3dc9b9(0x176)](normalizeTarget(_0x331026,_0x6c9acb));}if(_0x1b7036['length']===0x0){const _0x21c40f=_0x296f67||(_0x5f5250>0x0?_0x3dc9b9(0x189)+_0x5f5250:_0x3dc9b9(0x1b3)+_0xa99f70);throw CliErrors['validation'](_0x3dc9b9(0x19f)+_0x21c40f+'.');}const _0x223c19=_0x218d9c[_0x3dc9b9(0x17e)](_0x3dc9b9(0x180));if(_0x223c19>0x0&&_0x1b7036[_0x3dc9b9(0x195)]!==_0x223c19)throw CliErrors['validation'](_0x3dc9b9(0x186)+_0x1b7036[_0x3dc9b9(0x195)]+_0x3dc9b9(0x188)+_0x223c19+'.');return _0x1b7036;}function normalizeTarget(_0x2671dd,_0x2e76d7){const _0x337638=a74_0x258fb3,_0x332e81=_0x2671dd[_0x337638(0x19e)]??{},_0x43377e=_0x2e76d7['map'](_0x5ebafd=>{const _0x2b42f3=_0x337638;if(_0x5ebafd==null||typeof _0x5ebafd!=='object')return null;const _0x1724f9=_0x5ebafd,_0x5368d2=Number(_0x1724f9['id']);if(!Number[_0x2b42f3(0x18c)](_0x5368d2)||_0x5368d2<=0x0)return null;const _0xe28f81=_0x1724f9['title']??_0x1724f9[_0x2b42f3(0x19c)];return{'id':_0x5368d2,..._0xe28f81?{'name':String(_0xe28f81)}:{},..._0x1724f9['type']?{'type':String(_0x1724f9[_0x2b42f3(0x1b1)])}:{}};})[_0x337638(0x190)](_0x1eeb15=>_0x1eeb15!==null);return{'id':_0x2671dd['id'],'code':_0x2671dd[_0x337638(0x174)],'name':_0x2671dd[_0x337638(0x19c)],'description':_0x2671dd['description'],'source':_0x2671dd[_0x337638(0x18f)],'dbId':_0x332e81[_0x337638(0x196)],'dbName':_0x332e81['dbName'],'tableName':_0x332e81[_0x337638(0x197)],'relatedPageCount':_0x43377e[_0x337638(0x195)],'relatedPages':_0x43377e};}function buildPageRestoreCommands(_0x413cff,_0x28aee5){const _0xcc219b=a74_0x258fb3,_0x224fed=new Set();for(const _0x5c6c6a of _0x28aee5){for(const _0x35c7be of _0x5c6c6a[_0xcc219b(0x1b4)])_0x224fed[_0xcc219b(0x191)](_0x35c7be['id']);}return[..._0x224fed][_0xcc219b(0x184)](_0x3a40f5=>_0xcc219b(0x181)+_0x3a40f5+_0xcc219b(0x175)+_0x413cff);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a75_0x2e04(){const _0x4fff2c=['136855ZAGtUp','context','2hihgzS','447711ixewnC','4750696HFYphg','985912CFVBTa','599450vrDqcP','1542975CRQSZp','1745082hRbuUy'];a75_0x2e04=function(){return _0x4fff2c;};return a75_0x2e04();}const a75_0x203bc4=a75_0xd5f5;(function(_0x377015,_0x551478){const _0x41a930=a75_0xd5f5,_0x183118=_0x377015();while(!![]){try{const _0x4688b8=-parseInt(_0x41a930(0x1c4))/0x1+-parseInt(_0x41a930(0x1c6))/0x2*(parseInt(_0x41a930(0x1c7))/0x3)+parseInt(_0x41a930(0x1c0))/0x4+parseInt(_0x41a930(0x1c1))/0x5+-parseInt(_0x41a930(0x1c3))/0x6+-parseInt(_0x41a930(0x1c2))/0x7+parseInt(_0x41a930(0x1c8))/0x8;if(_0x4688b8===_0x551478)break;else _0x183118['push'](_0x183118['shift']());}catch(_0x50f82f){_0x183118['push'](_0x183118['shift']());}}}(a75_0x2e04,0x27c19));function a75_0xd5f5(_0x1edc31,_0x4a3650){_0x1edc31=_0x1edc31-0x1c0;const _0x2e048a=a75_0x2e04();let _0xd5f5ef=_0x2e048a[_0x1edc31];return _0xd5f5ef;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0x203bc4(0x1c5));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a76_0x2d18(){const _0x33b545=['9042AMoFal','9015590jgWylv','9zPnHCY','start','18945rvEpyA','1616RZfbaM','332020qVWWpT','140khRDUf','410476Rbxbyp','457088JMAPVn','16919hHXpve'];a76_0x2d18=function(){return _0x33b545;};return a76_0x2d18();}function a76_0x4bef(_0x52768b,_0x4130c3){_0x52768b=_0x52768b-0xba;const _0x2d181c=a76_0x2d18();let _0x4bef8c=_0x2d181c[_0x52768b];return _0x4bef8c;}const a76_0x4f3b67=a76_0x4bef;(function(_0x531627,_0x41c840){const _0x516e4f=a76_0x4bef,_0x50e5ca=_0x531627();while(!![]){try{const _0x1b049f=-parseInt(_0x516e4f(0xba))/0x1+parseInt(_0x516e4f(0xbd))/0x2+parseInt(_0x516e4f(0xc3))/0x3+-parseInt(_0x516e4f(0xbc))/0x4+-parseInt(_0x516e4f(0xbb))/0x5*(-parseInt(_0x516e4f(0xbf))/0x6)+-parseInt(_0x516e4f(0xbe))/0x7*(parseInt(_0x516e4f(0xc4))/0x8)+-parseInt(_0x516e4f(0xc1))/0x9*(-parseInt(_0x516e4f(0xc0))/0xa);if(_0x1b049f===_0x41c840)break;else _0x50e5ca['push'](_0x50e5ca['shift']());}catch(_0x120d49){_0x50e5ca['push'](_0x50e5ca['shift']());}}}(a76_0x2d18,0x3e6fd));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand(a76_0x4f3b67(0xc2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0xb0f4e3=a77_0x4b5a;function a77_0x17f3(){const _0x82b95d=['5hayWOB','34rJhJew','status','629571ftkSnX','5317NiCEGp','6569808BrsPlg','11802339aFpPCv','503634rUqdRi','462960QnKCOK','4hJafXw','2305552IOZbWS'];a77_0x17f3=function(){return _0x82b95d;};return a77_0x17f3();}(function(_0x5060d8,_0x56ebcf){const _0x4bef70=a77_0x4b5a,_0x2f7381=_0x5060d8();while(!![]){try{const _0x17f72c=-parseInt(_0x4bef70(0xd6))/0x1*(parseInt(_0x4bef70(0xd3))/0x2)+-parseInt(_0x4bef70(0xd5))/0x3*(-parseInt(_0x4bef70(0xd0))/0x4)+-parseInt(_0x4bef70(0xd2))/0x5*(-parseInt(_0x4bef70(0xce))/0x6)+-parseInt(_0x4bef70(0xd7))/0x7+parseInt(_0x4bef70(0xd1))/0x8+parseInt(_0x4bef70(0xcd))/0x9+parseInt(_0x4bef70(0xcf))/0xa;if(_0x17f72c===_0x56ebcf)break;else _0x2f7381['push'](_0x2f7381['shift']());}catch(_0x167bab){_0x2f7381['push'](_0x2f7381['shift']());}}}(a77_0x17f3,0xde584));import{designCommand}from'../../services/dataset-design/commands.js';function a77_0x4b5a(_0x536809,_0x346bda){_0x536809=_0x536809-0xcd;const _0x17f322=a77_0x17f3();let _0x4b5a82=_0x17f322[_0x536809];return _0x4b5a82;}export const datasetDesignStatus=designCommand(a77_0xb0f4e3(0xd4));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a78_0x59d7dd=a78_0x28ec;(function(_0x244f57,_0x129d98){const _0x43161e=a78_0x28ec,_0x18adbe=_0x244f57();while(!![]){try{const _0x1fc1ab=parseInt(_0x43161e(0x8c))/0x1*(parseInt(_0x43161e(0x87))/0x2)+-parseInt(_0x43161e(0x8d))/0x3*(-parseInt(_0x43161e(0x88))/0x4)+-parseInt(_0x43161e(0x8b))/0x5+-parseInt(_0x43161e(0x89))/0x6+-parseInt(_0x43161e(0x8a))/0x7+-parseInt(_0x43161e(0x85))/0x8+-parseInt(_0x43161e(0x84))/0x9*(-parseInt(_0x43161e(0x86))/0xa);if(_0x1fc1ab===_0x129d98)break;else _0x18adbe['push'](_0x18adbe['shift']());}catch(_0x2aa0b2){_0x18adbe['push'](_0x18adbe['shift']());}}}(a78_0x353a,0x9464a));import{designCommand}from'../../services/dataset-design/commands.js';function a78_0x28ec(_0x58ee39,_0x3e6754){_0x58ee39=_0x58ee39-0x83;const _0x353a3f=a78_0x353a();let _0x28ec5a=_0x353a3f[_0x58ee39];return _0x28ec5a;}function a78_0x353a(){const _0x274df1=['8303384rNdgMK','20pkEXOn','66yhNcHS','4HKqOyp','951750Gwysnx','7362831erkCWY','5176145ItLZrm','34297rEcwIX','3374955jDjUvQ','sync-retry','7355889tctUzL'];a78_0x353a=function(){return _0x274df1;};return a78_0x353a();}export const datasetDesignSyncRetry=designCommand(a78_0x59d7dd(0x83));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a79_0x2e35(){const _0x4f50a4=['355OwfQxl','30aCxjfJ','462biTMMG','254590sKwygo','sync-status','13488561vHPGvT','1511125wASbXy','26276tFAlgW','201712jGJRTD','2514646aZERnh','10847760ZDwwgi','3pYYLWk'];a79_0x2e35=function(){return _0x4f50a4;};return a79_0x2e35();}const a79_0x136ff9=a79_0x5087;(function(_0x63b8d8,_0x3c9b03){const _0x33b185=a79_0x5087,_0x6954db=_0x63b8d8();while(!![]){try{const _0x30eaca=parseInt(_0x33b185(0xd5))/0x1+-parseInt(_0x33b185(0xd6))/0x2*(-parseInt(_0x33b185(0xd8))/0x3)+parseInt(_0x33b185(0xd4))/0x4*(-parseInt(_0x33b185(0xd9))/0x5)+parseInt(_0x33b185(0xce))/0x6*(-parseInt(_0x33b185(0xd3))/0x7)+parseInt(_0x33b185(0xd7))/0x8+-parseInt(_0x33b185(0xd2))/0x9+-parseInt(_0x33b185(0xd0))/0xa*(-parseInt(_0x33b185(0xcf))/0xb);if(_0x30eaca===_0x3c9b03)break;else _0x6954db['push'](_0x6954db['shift']());}catch(_0xce28e3){_0x6954db['push'](_0x6954db['shift']());}}}(a79_0x2e35,0xcd064));import{designCommand}from'../../services/dataset-design/commands.js';function a79_0x5087(_0x6a35a,_0x287908){_0x6a35a=_0x6a35a-0xce;const _0x2e3594=a79_0x2e35();let _0x508743=_0x2e3594[_0x6a35a];return _0x508743;}export const datasetDesignSyncStatus=designCommand(a79_0x136ff9(0xd1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a80_0x208e3f=a80_0x351e;function a80_0x351e(_0x50ea98,_0x5cef9d){_0x50ea98=_0x50ea98-0x70;const _0x142ddc=a80_0x142d();let _0x351e47=_0x142ddc[_0x50ea98];return _0x351e47;}(function(_0x1820dc,_0x1f9a18){const _0xe5721f=a80_0x351e,_0x50f605=_0x1820dc();while(!![]){try{const _0x358a2d=-parseInt(_0xe5721f(0x7b))/0x1*(-parseInt(_0xe5721f(0x75))/0x2)+-parseInt(_0xe5721f(0x79))/0x3*(parseInt(_0xe5721f(0x71))/0x4)+-parseInt(_0xe5721f(0x70))/0x5+parseInt(_0xe5721f(0x73))/0x6*(-parseInt(_0xe5721f(0x74))/0x7)+parseInt(_0xe5721f(0x72))/0x8*(-parseInt(_0xe5721f(0x78))/0x9)+parseInt(_0xe5721f(0x7a))/0xa+parseInt(_0xe5721f(0x77))/0xb;if(_0x358a2d===_0x1f9a18)break;else _0x50f605['push'](_0x50f605['shift']());}catch(_0x2cc59a){_0x50f605['push'](_0x50f605['shift']());}}}(a80_0x142d,0x5c01d));function a80_0x142d(){const _0x2c4ae3=['1729610BfHzHW','78569nKeCyw','934015kgKZkd','2403884zubjVo','3765392OxPfIj','6rezYmx','1863988JxjULi','2VDhZsS','validate','18150693SwKsIU','9VnpmaF','3hYenXO'];a80_0x142d=function(){return _0x2c4ae3;};return a80_0x142d();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x208e3f(0x76));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a81_0x2c5d(){const _0x4cc1fd=['method','operations','indexes','tableName','afterScriptId','options','code','9NvkXEK','2019544tKTSMD','columnCodeListWithDeleted','description','dbId','dataset','doVersion','object','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','doType','filter','allFieldNames','main_sub','deleted','displayName','cardinality','relationId','extend','title','sourceType','502585WuZqAd','relatedPageInfoList','toDatasetCode','trim','labelField','type','pkField','required','224905XLTzpi','name','isArray','validateRules','createTimeField','push','responseFields','creatorNameField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','99JqdQPj','length','requestBody','79908ccIHCp','dblinkInfoDTO','6kYOUyZ','path','allFields','modifierIdField','responseBody','source','dbName','bizRelationType','requestFields','1115900PPdNUT','dbtableConfig','2270910LhTsiC','modelId','tableComment','modelCode','fields','host','str','parse','creatorIdField','entries','map','toTableName','1776124ZlhYSi','beforeScriptId','datasetKey','string','detail','split','formatRules','properties'];a81_0x2c5d=function(){return _0x4cc1fd;};return a81_0x2c5d();}function a81_0x5b09(_0x25d04a,_0x3294da){_0x25d04a=_0x25d04a-0x14f;const _0x2c5df2=a81_0x2c5d();let _0x5b0944=_0x2c5df2[_0x25d04a];return _0x5b0944;}const a81_0x3c917c=a81_0x5b09;(function(_0x442c60,_0x186d5){const _0x19f538=a81_0x5b09,_0x145555=_0x442c60();while(!![]){try{const _0x2af5c1=-parseInt(_0x19f538(0x16f))/0x1+parseInt(_0x19f538(0x186))/0x2+parseInt(_0x19f538(0x178))/0x3*(parseInt(_0x19f538(0x17b))/0x4)+-parseInt(_0x19f538(0x167))/0x5*(-parseInt(_0x19f538(0x17d))/0x6)+-parseInt(_0x19f538(0x194))/0x7+parseInt(_0x19f538(0x154))/0x8*(-parseInt(_0x19f538(0x153))/0x9)+-parseInt(_0x19f538(0x188))/0xa;if(_0x2af5c1===_0x186d5)break;else _0x145555['push'](_0x145555['shift']());}catch(_0x5c08c8){_0x145555['push'](_0x145555['shift']());}}}(a81_0x2c5d,0x57c71));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x2b64e6){const _0x41065f=a81_0x5b09;if(_0x2b64e6[_0x41065f(0x160)])return null;const _0x19ec92=Boolean(_0x2b64e6[_0x41065f(0x161)]!==undefined||_0x2b64e6['doType']!==undefined);let _0x675365={};if(!_0x19ec92&&typeof _0x2b64e6[_0x41065f(0x164)]===_0x41065f(0x197))try{_0x675365=JSON[_0x41065f(0x18f)](_0x2b64e6[_0x41065f(0x164)]);}catch{}const _0x14ef7d=_0x19ec92?_0x2b64e6[_0x41065f(0x170)]:_0x2b64e6[_0x41065f(0x152)],_0x225d7c=_0x19ec92?_0x2b64e6[_0x41065f(0x161)]:_0x2b64e6[_0x41065f(0x170)],_0x558529=_0x19ec92?_0x2b64e6[_0x41065f(0x15c)]:_0x2b64e6[_0x41065f(0x16c)]||_0x2b64e6['dataType'],_0x2755c4=_0x19ec92?_0x2b64e6[_0x41065f(0x16d)]===!![]:_0x675365[_0x41065f(0x16d)]===!![],_0x2bf14c=_0x19ec92?_0x2b64e6[_0x41065f(0x16e)]===!![]:_0x675365[_0x41065f(0x16e)]===!![],_0xe98c1a=_0x19ec92?_0x2b64e6['options']??null:_0x675365[_0x41065f(0x151)]??null,_0x280ae2={'name':_0x14ef7d,'displayName':_0x225d7c||_0x14ef7d,'type':_0x558529,'dbType':_0x2b64e6['dbType'],'pk':_0x2755c4,'required':_0x2bf14c,'deprecated':_0x2b64e6['deprecated']===!![],'description':_0x2b64e6[_0x41065f(0x156)]||undefined};return Array[_0x41065f(0x171)](_0xe98c1a)&&_0xe98c1a['length']>0x0&&(_0x280ae2[_0x41065f(0x151)]=_0xe98c1a),_0x280ae2;}function parseJsonMaybe(_0x40418f){const _0xa47fc=a81_0x5b09;if(typeof _0x40418f!==_0xa47fc(0x197))return _0x40418f;try{return JSON[_0xa47fc(0x18f)](_0x40418f);}catch{return _0x40418f;}}function normalizeOperationEntry(_0x9cc005,_0x937528){const _0x36324f=a81_0x5b09;if(!_0x937528||typeof _0x937528!=='object')return null;if(!_0x937528['method']||!_0x937528['path'])return null;const _0x5d6f28={'name':_0x9cc005,'method':_0x937528[_0x36324f(0x19c)],'path':_0x937528[_0x36324f(0x17e)]};if(_0x937528[_0x36324f(0x18d)])_0x5d6f28['host']=_0x937528['host'];if(_0x937528[_0x36324f(0x17a)]!=null){const _0x4f8f6a=parseJsonMaybe(_0x937528[_0x36324f(0x17a)]);_0x5d6f28[_0x36324f(0x17a)]=_0x4f8f6a;}if(_0x937528[_0x36324f(0x181)]!=null){const _0x5b2dcd=parseJsonMaybe(_0x937528[_0x36324f(0x181)]);_0x5d6f28[_0x36324f(0x181)]=_0x5b2dcd;}if(_0x937528[_0x36324f(0x195)]!=null)_0x5d6f28[_0x36324f(0x195)]=_0x937528[_0x36324f(0x195)];if(_0x937528[_0x36324f(0x150)]!=null)_0x5d6f28[_0x36324f(0x150)]=_0x937528[_0x36324f(0x150)];if(Array[_0x36324f(0x171)](_0x937528[_0x36324f(0x185)]))_0x5d6f28[_0x36324f(0x185)]=_0x937528['requestFields'];if(Array[_0x36324f(0x171)](_0x937528[_0x36324f(0x175)]))_0x5d6f28[_0x36324f(0x175)]=_0x937528[_0x36324f(0x175)];return _0x5d6f28;}function summarizeDbtable(_0x12ac70){const _0xff0819=a81_0x5b09,_0x44cdd4={},_0x3c4c36=[_0xff0819(0x157),_0xff0819(0x183),'tableName','datasetKey',_0xff0819(0x16d),_0xff0819(0x17f),'logicField',_0xff0819(0x173),'updateTimeField',_0xff0819(0x190),_0xff0819(0x176),_0xff0819(0x180),'modifierNameField',_0xff0819(0x16b),_0xff0819(0x17c)];for(const _0x161732 of _0x3c4c36){if(_0x12ac70[_0x161732]!==undefined)_0x44cdd4[_0x161732]=_0x12ac70[_0x161732];}return typeof _0x44cdd4['allFields']===_0xff0819(0x197)&&_0x44cdd4[_0xff0819(0x17f)][_0xff0819(0x179)]>0x0&&(_0x44cdd4[_0xff0819(0x15e)]=_0x44cdd4[_0xff0819(0x17f)][_0xff0819(0x199)](',')[_0xff0819(0x192)](_0x599ade=>_0x599ade[_0xff0819(0x16a)]())[_0xff0819(0x15d)](Boolean)),_0x44cdd4;}function normalizeRelatedPages(_0x252a79){const _0xd7936a=a81_0x5b09;if(!Array[_0xd7936a(0x171)](_0x252a79))return[];return _0x252a79[_0xd7936a(0x15d)](_0x13b1fe=>_0x13b1fe&&typeof _0x13b1fe===_0xd7936a(0x15a))[_0xd7936a(0x192)](_0x68d944=>({'id':_0x68d944['id'],'type':_0x68d944['type'],'code':_0x68d944['code'],'title':_0x68d944[_0xd7936a(0x165)],'deleted':_0x68d944[_0xd7936a(0x160)]===!![]}));}export const datasetDetail={'service':a81_0x3c917c(0x158),'command':a81_0x3c917c(0x198),'description':a81_0x3c917c(0x177),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a81_0x3c917c(0x15b)}],async 'execute'(_0x1368e3){const _0xc1cc9f=a81_0x3c917c,_0x4b9ee1=await getDatasetDetail(_0x1368e3[_0xc1cc9f(0x18e)]('code')),_0x662e86=Array[_0xc1cc9f(0x171)](_0x4b9ee1[_0xc1cc9f(0x18c)])?_0x4b9ee1[_0xc1cc9f(0x18c)]:Array[_0xc1cc9f(0x171)](_0x4b9ee1['properties'])?_0x4b9ee1[_0xc1cc9f(0x19b)]:[],_0x39f7cc=_0x662e86[_0xc1cc9f(0x192)](_0x242cdf=>normalizeField(_0x242cdf))['filter'](_0x4d8910=>_0x4d8910!==null),_0x421d16=_0x4b9ee1[_0xc1cc9f(0x19d)]??{},_0x128539=[];for(const [_0x17e2ea,_0x4e03e6]of Object[_0xc1cc9f(0x191)](_0x421d16)){const _0x27f5b0=normalizeOperationEntry(_0x17e2ea,_0x4e03e6);if(_0x27f5b0)_0x128539[_0xc1cc9f(0x174)](_0x27f5b0);}const _0x378082=_0x4b9ee1[_0xc1cc9f(0x187)]??{},_0x41f5eb=_0x4b9ee1[_0xc1cc9f(0x158)]??{},_0xa585ac=_0x378082[_0xc1cc9f(0x157)]!=null?{'id':_0x378082['dbId'],'name':_0x378082[_0xc1cc9f(0x183)]??null}:undefined;let _0x1fdf0b;return typeof _0x4b9ee1[_0xc1cc9f(0x164)]===_0xc1cc9f(0x197)&&(_0x1fdf0b=parseJsonMaybe(_0x4b9ee1[_0xc1cc9f(0x164)])),{'ok':!![],'data':{'id':_0x4b9ee1[_0xc1cc9f(0x189)]??_0x4b9ee1['id'],'name':_0x4b9ee1['name'],'code':_0x4b9ee1[_0xc1cc9f(0x18b)]||_0x4b9ee1['code'],'doVersion':_0x4b9ee1[_0xc1cc9f(0x159)],'description':_0x4b9ee1[_0xc1cc9f(0x156)]||_0x41f5eb[_0xc1cc9f(0x18a)]||undefined,'source':_0x4b9ee1[_0xc1cc9f(0x182)]||_0x41f5eb[_0xc1cc9f(0x166)],'table':_0x378082[_0xc1cc9f(0x14f)]||_0x41f5eb[_0xc1cc9f(0x14f)],'datasetKey':_0x378082[_0xc1cc9f(0x196)],'pk':_0x378082[_0xc1cc9f(0x16d)],'db':_0xa585ac,'dbtable':summarizeDbtable(_0x378082),'fields':_0x39f7cc,'operations':_0x128539,'indexes':Array['isArray'](_0x41f5eb[_0xc1cc9f(0x19e)])?_0x41f5eb['indexes']:[],'relations':Array[_0xc1cc9f(0x171)](_0x4b9ee1['relations'])?_0x4b9ee1['relations'][_0xc1cc9f(0x192)](_0x21ca87=>({..._0x21ca87[_0xc1cc9f(0x163)]!=null?{'relationId':_0x21ca87['relationId']}:{},'fromDataset':_0x4b9ee1[_0xc1cc9f(0x170)],'fromCode':_0x4b9ee1[_0xc1cc9f(0x18b)]||_0x4b9ee1[_0xc1cc9f(0x152)],'fromTable':_0x378082[_0xc1cc9f(0x14f)]||_0x41f5eb[_0xc1cc9f(0x14f)],'fromField':_0x21ca87['fromField'],'toDataset':_0x21ca87['toDatasetName'],'toCode':_0x21ca87[_0xc1cc9f(0x169)],'toTable':_0x21ca87[_0xc1cc9f(0x193)],'toField':_0x21ca87['toField'],'labelField':_0x21ca87['toFieldLabel']||undefined,'cardinality':_0x21ca87[_0xc1cc9f(0x162)]||undefined,'bizRelationType':_0x21ca87[_0xc1cc9f(0x184)]===_0xc1cc9f(0x15f)?_0xc1cc9f(0x15f):null})):[],'relatedPages':normalizeRelatedPages(_0x4b9ee1[_0xc1cc9f(0x168)]),...Array[_0xc1cc9f(0x171)](_0x4b9ee1[_0xc1cc9f(0x155)])?{'columnCodeListWithDeleted':_0x4b9ee1[_0xc1cc9f(0x155)]}:{},'formatRules':Array[_0xc1cc9f(0x171)](_0x4b9ee1[_0xc1cc9f(0x19a)])?_0x4b9ee1['formatRules']:[],'validateRules':Array[_0xc1cc9f(0x171)](_0x4b9ee1[_0xc1cc9f(0x172)])?_0x4b9ee1[_0xc1cc9f(0x172)]:[],..._0x1fdf0b!==undefined?{'extend':_0x1fdf0b}:{},'stats':{'fieldCount':_0x39f7cc[_0xc1cc9f(0x179)],'operationCount':_0x128539[_0xc1cc9f(0x179)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x2d183d=a82_0x1ec3;(function(_0x462d08,_0x12408f){const _0x474f7f=a82_0x1ec3,_0x44ba0e=_0x462d08();while(!![]){try{const _0x5ce0c2=-parseInt(_0x474f7f(0x181))/0x1+-parseInt(_0x474f7f(0x186))/0x2*(parseInt(_0x474f7f(0x199))/0x3)+parseInt(_0x474f7f(0x163))/0x4+-parseInt(_0x474f7f(0x16e))/0x5+-parseInt(_0x474f7f(0x196))/0x6*(-parseInt(_0x474f7f(0x17f))/0x7)+parseInt(_0x474f7f(0x161))/0x8+-parseInt(_0x474f7f(0x197))/0x9*(parseInt(_0x474f7f(0x164))/0xa);if(_0x5ce0c2===_0x12408f)break;else _0x44ba0e['push'](_0x44ba0e['shift']());}catch(_0x26a1e8){_0x44ba0e['push'](_0x44ba0e['shift']());}}}(a82_0x21ad,0xcbe4b));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_0x2d183d(0x18b),{'message':a82_0x2d183d(0x191),'hint':a82_0x2d183d(0x17d)}]]);function a82_0x21ad(){const _0x5d7613=['message','entries','5336085mSVIPR','push','code','patch','dataset','modelCode','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','appCode','Patch\x20dataset\x20top-level\x20extend\x20safely','stringify','Updated\x20dataset\x20extend\x20(','dbtableConfig','dbId','\x20must\x20be\x20a\x20JSON\x20object','hint','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','isArray','5228657BoLCEC','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','111332bnRcDd','from','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','name','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','2XwleEo','object','join','tableName','extend','businessGroup','datasetCode','keys','length','expect-json','datasetName','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','Allowed\x20keys:\x20','validation','6hPYJDO','1656IPHCFS','Expectation\x20mismatch\x20at\x20extend.','1888143MqZJPF','Unsupported\x20patch\x20key:\x20','shape','datasetId','patch-json','value','get','Expected\x20','7967248aCsqAs','string','5896464LxsBOn','31190pTYqDR','--expect-json','expect','--code\x20is\x20required','sort','str','extend-update',',\x20actual\x20'];a82_0x21ad=function(){return _0x5d7613;};return a82_0x21ad();}export function parseJsonObjectFlag(_0xa99e15,_0x5727db){const _0x82a4=a82_0x2d183d;if(!_0xa99e15)return undefined;let _0x2344bf;try{_0x2344bf=JSON['parse'](_0xa99e15);}catch(_0x505dc0){const _0x1d819d=_0x505dc0 instanceof Error?_0x505dc0['message']:String(_0x505dc0);throw CliErrors[_0x82a4(0x195)](_0x5727db+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x1d819d);}if(!isPlainObject(_0x2344bf)||Array[_0x82a4(0x17e)](_0x2344bf))throw CliErrors['validation'](_0x5727db+_0x82a4(0x17b));return _0x2344bf;}export function validateExtendPatchKeys(_0x594846){const _0x2c9106=a82_0x2d183d,_0x54f181=Object[_0x2c9106(0x18d)](_0x594846);if(_0x54f181[_0x2c9106(0x18e)]===0x0)throw CliErrors[_0x2c9106(0x195)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x2caf88 of _0x54f181){const _0x57e5d7=EXTEND_PATCH_REDIRECTS[_0x2c9106(0x15f)](_0x2caf88);if(_0x57e5d7)throw CliErrors[_0x2c9106(0x195)](_0x57e5d7['message'],_0x57e5d7[_0x2c9106(0x17c)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x2caf88))throw CliErrors[_0x2c9106(0x195)](_0x2c9106(0x19a)+_0x2caf88,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4088c5=a82_0x2d183d,_0x20424a=Array[_0x4088c5(0x182)](MUTABLE_EXTEND_KEYS)['sort']();return _0x20424a[_0x4088c5(0x18e)]>0x0?_0x4088c5(0x194)+_0x20424a[_0x4088c5(0x188)](',\x20'):_0x4088c5(0x180);}export function applyExtendPatch(_0x2c5f2d,_0x5898c1){const _0x1abfa7=a82_0x2d183d;validateExtendPatchKeys(_0x5898c1);const _0x10a5e9=deepClone(_0x2c5f2d),_0x465c0a=[];for(const [_0x3fca9b,_0x176ead]of Object[_0x1abfa7(0x16d)](_0x5898c1)){const _0x45af82=_0x10a5e9[_0x3fca9b],_0x4c86da=deepClone(_0x176ead);!deepEqual(_0x45af82,_0x4c86da)&&(_0x10a5e9[_0x3fca9b]=_0x4c86da,_0x465c0a[_0x1abfa7(0x16f)]('extend.'+_0x3fca9b));}return _0x465c0a[_0x1abfa7(0x168)](),{'after':_0x10a5e9,'changedPaths':_0x465c0a,'changed':_0x465c0a[_0x1abfa7(0x18e)]>0x0};}export function assertExpectation(_0x2979d8,_0x12c127){const _0x4614f8=a82_0x2d183d;if(!_0x12c127)return;for(const [_0x484315,_0x1c5eec]of Object[_0x4614f8(0x16d)](_0x12c127)){const _0x72b60c=_0x2979d8[_0x484315];if(!deepEqual(_0x72b60c,_0x1c5eec))throw CliErrors[_0x4614f8(0x195)](_0x4614f8(0x198)+_0x484315,_0x4614f8(0x160)+JSON[_0x4614f8(0x177)](_0x1c5eec)+_0x4614f8(0x16b)+JSON[_0x4614f8(0x177)](_0x72b60c));}}function a82_0x1ec3(_0x22dcbd,_0x285dbc){_0x22dcbd=_0x22dcbd-0x15d;const _0x21adcc=a82_0x21ad();let _0x1ec34b=_0x21adcc[_0x22dcbd];return _0x1ec34b;}export async function buildDatasetExtendUpdateResult({appCode:_0x3c409d,input:_0x54e16c,dryRun:_0x5e2de8}){const _0xfb8d43=a82_0x2d183d;validateInput(_0x54e16c);const _0x2e2b00=await getDatasetDetail(_0x54e16c[_0xfb8d43(0x170)]),_0x10eddb=parseDatasetExtend(_0x2e2b00['extend']),_0x4c25d5=deepClone(_0x10eddb[_0xfb8d43(0x15e)]);assertExpectation(_0x4c25d5,_0x54e16c[_0xfb8d43(0x166)]);const {after:_0x266ce8,changedPaths:_0x2fdbc6,changed:_0x227cf7}=applyExtendPatch(_0x4c25d5,_0x54e16c[_0xfb8d43(0x171)]),_0x1a9129=summarizeDataset(_0x2e2b00,_0x54e16c[_0xfb8d43(0x170)]);return _0x227cf7&&!_0x5e2de8&&(_0x2e2b00[_0xfb8d43(0x18a)]=serializeDatasetExtend(_0x266ce8,_0x10eddb[_0xfb8d43(0x19b)]),await updateDrivenData(_0x2e2b00)),{'ok':!![],'data':{'appCode':_0x3c409d,'selector':{'code':_0x54e16c[_0xfb8d43(0x170)]},'dataset':_0x1a9129,'dryRun':_0x5e2de8,'changed':_0x227cf7,'changedPaths':_0x2fdbc6,'before':{'extend':_0x4c25d5},'after':{'extend':_0x266ce8},'submitted':_0x227cf7&&!_0x5e2de8},'message':_0x227cf7?_0x5e2de8?_0xfb8d43(0x183)+_0x2fdbc6['join'](',\x20')+')':_0xfb8d43(0x178)+_0x2fdbc6['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a82_0x2d183d(0x172),'command':a82_0x2d183d(0x16a),'description':a82_0x2d183d(0x176),'risk':'write','flags':[CODE_FLAG,{'name':a82_0x2d183d(0x15d),'type':a82_0x2d183d(0x162),'required':!![],'description':a82_0x2d183d(0x192)},{'name':a82_0x2d183d(0x18f),'type':a82_0x2d183d(0x162),'required':![],'description':a82_0x2d183d(0x193)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49ce90){validateInput(readExtendUpdateInput(_0x49ce90));},async 'dryRun'(_0x5781ae){const _0x3e2a99=a82_0x2d183d,_0x514b6d=await buildDatasetExtendUpdateResult({'appCode':_0x5781ae[_0x3e2a99(0x175)],'input':readExtendUpdateInput(_0x5781ae),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x514b6d['data'],'description':_0x514b6d[_0x3e2a99(0x16c)]};},async 'execute'(_0x5d1ad8){const _0x2386e7=a82_0x2d183d;return buildDatasetExtendUpdateResult({'appCode':_0x5d1ad8[_0x2386e7(0x175)],'input':readExtendUpdateInput(_0x5d1ad8),'dryRun':![]});}};function readExtendUpdateInput(_0x441755){const _0x170465=a82_0x2d183d,_0x2d85f1=trim(_0x441755[_0x170465(0x169)](_0x170465(0x170))),_0x459530=parseJsonObjectFlag(_0x441755[_0x170465(0x169)]('patch-json'),'--patch-json'),_0x341bf3=parseJsonObjectFlag(_0x441755[_0x170465(0x169)]('expect-json'),_0x170465(0x165));return{'code':_0x2d85f1,'patch':_0x459530||{},'expect':_0x341bf3};}function validateInput(_0x32166f){const _0x457797=a82_0x2d183d;if(!_0x32166f[_0x457797(0x170)])throw CliErrors['validation'](_0x457797(0x167));validateExtendPatchKeys(_0x32166f['patch']);}function parseDatasetExtend(_0x48e8c1){const _0x21252e=a82_0x2d183d;if(typeof _0x48e8c1===_0x21252e(0x162)){const _0x46bd97=_0x48e8c1['trim']();if(!_0x46bd97)return{'value':{},'shape':'string'};let _0x3f27a7;try{_0x3f27a7=JSON['parse'](_0x46bd97);}catch(_0x5c8ee6){const _0x5429cc=_0x5c8ee6 instanceof Error?_0x5c8ee6[_0x21252e(0x16c)]:String(_0x5c8ee6);throw CliErrors[_0x21252e(0x195)](_0x21252e(0x185)+_0x5429cc);}if(!isPlainObject(_0x3f27a7)||Array['isArray'](_0x3f27a7))throw CliErrors[_0x21252e(0x195)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x3f27a7,'shape':_0x21252e(0x162)};}if(_0x48e8c1===undefined||_0x48e8c1===null)return{'value':{},'shape':_0x21252e(0x162)};if(!isPlainObject(_0x48e8c1)||Array[_0x21252e(0x17e)](_0x48e8c1))throw CliErrors['validation'](_0x21252e(0x174));return{'value':_0x48e8c1,'shape':_0x21252e(0x187)};}function serializeDatasetExtend(_0x401a1b,_0x2e9a3a){return _0x2e9a3a==='string'?JSON['stringify'](_0x401a1b):_0x401a1b;}function summarizeDataset(_0x3ce80b,_0x42b108){const _0x24a248=a82_0x2d183d,_0x5bb751=isPlainObject(_0x3ce80b['dataset'])?_0x3ce80b[_0x24a248(0x172)]:{},_0x270c04=isPlainObject(_0x3ce80b['dbtableConfig'])?_0x3ce80b[_0x24a248(0x179)]:{};return{'id':_0x3ce80b['modelId']??_0x3ce80b['id']??_0x5bb751[_0x24a248(0x19c)]??null,'code':_0x3ce80b[_0x24a248(0x173)]??_0x3ce80b[_0x24a248(0x170)]??_0x5bb751[_0x24a248(0x18c)]??_0x42b108,'name':_0x3ce80b[_0x24a248(0x184)]??_0x5bb751[_0x24a248(0x190)]??null,'table':_0x270c04[_0x24a248(0x189)]??_0x5bb751[_0x24a248(0x189)]??null,'db':_0x270c04['dbName']??_0x270c04[_0x24a248(0x17a)]??null};}function deepClone(_0x4e7e1f){const _0x1201ff=a82_0x2d183d;if(_0x4e7e1f===undefined)return _0x4e7e1f;return JSON['parse'](JSON[_0x1201ff(0x177)](_0x4e7e1f));}function deepEqual(_0x504bf1,_0x3c291e){const _0xf97151=a82_0x2d183d;return JSON[_0xf97151(0x177)](_0x504bf1)===JSON[_0xf97151(0x177)](_0x3c291e);}function isPlainObject(_0x318c06){const _0x197524=a82_0x2d183d;return Boolean(_0x318c06)&&typeof _0x318c06===_0x197524(0x187)&&!Array[_0x197524(0x17e)](_0x318c06);}function trim(_0x5550a0){const _0x501eb5=String(_0x5550a0||'')['trim']();return _0x501eb5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x5aa9ed=a83_0x125b;(function(_0x34040b,_0x94f845){const _0x4180cd=a83_0x125b,_0x3d7825=_0x34040b();while(!![]){try{const _0x41c7a1=parseInt(_0x4180cd(0xcf))/0x1+-parseInt(_0x4180cd(0xbd))/0x2*(-parseInt(_0x4180cd(0xc6))/0x3)+parseInt(_0x4180cd(0xe4))/0x4*(parseInt(_0x4180cd(0xcb))/0x5)+parseInt(_0x4180cd(0xd5))/0x6+-parseInt(_0x4180cd(0xe5))/0x7+-parseInt(_0x4180cd(0xc4))/0x8+-parseInt(_0x4180cd(0xc5))/0x9;if(_0x41c7a1===_0x94f845)break;else _0x3d7825['push'](_0x3d7825['shift']());}catch(_0x2293b3){_0x3d7825['push'](_0x3d7825['shift']());}}}(a83_0x18ee,0x88216));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';const PAGE_SYNC_WARNING=a83_0x5aa9ed(0xd2),NO_RESUBMIT_WARNING=a83_0x5aa9ed(0xe2);function a83_0x18ee(){const _0x514dbe=['Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.','warnings','52oqfNWH','6427554cgQqWg','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','unknown','--code\x20is\x20required','yes','field','POST','code','filter','object','mutation-outcome-unknown','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','deleted','\x20would\x20be\x20restored','properties','14gSLSqf','str','Restored\x20Dataset\x20field\x20','readback-failed','all','some','validation','3042240DVCPpm','10943451cFyQOA','90186gfMdye','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','displayName','fields','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','395515himtbj','message','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','length','881078ERprKG','data','string','Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.','dataset','trim','5713080qUqWnC','map','confirm','appCode','server-restored-count-mismatch','requestedColumnIds','field-restore','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','isArray','name','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20'];a83_0x18ee=function(){return _0x514dbe;};return a83_0x18ee();}export async function buildDatasetFieldRestoreResult({appCode:_0x5a0630,input:_0x3d488a,dryRun:_0x1674a2}){const _0x47aa3f=a83_0x5aa9ed,_0x1d1c85=_0x3d488a[_0x47aa3f(0xb4)][_0x47aa3f(0xd4)](),_0x4a1171=_0x3d488a[_0x47aa3f(0xea)][_0x47aa3f(0xd4)]();if(!_0x1d1c85)throw CliErrors['validation'](_0x47aa3f(0xe8));if(!_0x4a1171)throw CliErrors[_0x47aa3f(0xc3)]('--field\x20is\x20required');const _0x8eec58=await getDatasetDetail(_0x1d1c85),_0x2bd070=resolveDataset(_0x8eec58,_0x1d1c85),_0x404e37=(await listUserDeletedDatasetColumns(_0x2bd070['id']))[_0x47aa3f(0xd6)](normalizeUserDeletedField),_0x12a518=_0x404e37[_0x47aa3f(0xb5)](_0x1fe4d8=>_0x1fe4d8[_0x47aa3f(0xb4)]===_0x4a1171);if(_0x12a518['length']===0x0)throw CliErrors[_0x47aa3f(0xc3)](_0x47aa3f(0xb9)+_0x4a1171,'Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.');if(_0x12a518[_0x47aa3f(0xce)]>0x1)throw CliErrors[_0x47aa3f(0xc3)](_0x47aa3f(0xe6)+_0x4a1171,_0x47aa3f(0xcd));const _0xe3d2a4=_0x12a518[0x0],_0x3bde0f={'id':_0xe3d2a4['id'],'code':_0xe3d2a4[_0x47aa3f(0xb4)],'displayName':_0xe3d2a4[_0x47aa3f(0xc8)],'deleted':![],'active':!![]},_0x4271eb={'operation':_0x47aa3f(0xdb),'appCode':_0x5a0630,'selector':{'code':_0x1d1c85,'field':_0x4a1171},'dataset':_0x2bd070,'before':_0xe3d2a4,'dryRun':_0x1674a2,'warnings':[PAGE_SYNC_WARNING]};if(_0x1674a2)return{'ok':!![],'data':{..._0x4271eb,'after':_0x3bde0f,'backend':{'submitted':![],'requestedColumnIds':[_0xe3d2a4['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':'Dry-run:\x20Dataset\x20field\x20'+_0x4a1171+_0x47aa3f(0xbb)};let _0x1efbf6=null,_0x5b60cd=![];try{_0x1efbf6=await restoreDatasetColumns(_0x2bd070['id'],[_0xe3d2a4['id']]);}catch(_0x2d6de2){if(!isPlatformTransportFailure(_0x2d6de2))throw _0x2d6de2;_0x5b60cd=!![];}const _0x22c704={'submitted':!![],'requestedColumnIds':[_0xe3d2a4['id']],'restoredCount':_0x1efbf6,..._0x5b60cd?{'outcome':_0x47aa3f(0xe7)}:{}};let _0x3efb07,_0x5a7882;try{[_0x3efb07,_0x5a7882]=await Promise[_0x47aa3f(0xc1)]([listUserDeletedDatasetColumns(_0x2bd070['id']),getDatasetDetail(_0x1d1c85)]);}catch{return{'ok':![],'data':{..._0x4271eb,'after':null,'backend':_0x22c704,'warnings':[..._0x4271eb[_0x47aa3f(0xe3)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x5b60cd?_0x47aa3f(0xb7):_0x47aa3f(0xc0)}},'message':_0x5b60cd?_0x47aa3f(0xe1)+_0x4a1171+'.\x20'+NO_RESUBMIT_WARNING:_0x47aa3f(0xdd)+_0x4a1171+'.\x20'+NO_RESUBMIT_WARNING};}const _0x29da34=!_0x3efb07[_0x47aa3f(0xc2)](_0xca3d2b=>Number(_0xca3d2b['id'])===_0xe3d2a4['id']||_0xca3d2b[_0x47aa3f(0xb4)]===_0x4a1171),_0x1cd8a5=findActiveField(_0x5a7882,_0xe3d2a4['id'],_0x4a1171),_0x52dffa=_0x1cd8a5!==null,_0x12616e=!_0x5b60cd&&_0x1efbf6===0x1&&_0x29da34&&_0x52dffa,_0x541e09={'performed':!![],'deletedListCleared':_0x29da34,'activeFieldPresent':_0x52dffa,'passed':_0x12616e,..._0x5b60cd?{'reason':_0x47aa3f(0xb7)}:_0x1efbf6!==0x1?{'reason':_0x47aa3f(0xd9)}:{}};return{'ok':_0x12616e,'data':{..._0x4271eb,'after':_0x1cd8a5,'backend':_0x22c704,'warnings':_0x12616e?_0x4271eb[_0x47aa3f(0xe3)]:[..._0x4271eb[_0x47aa3f(0xe3)],NO_RESUBMIT_WARNING],'verification':_0x541e09},'message':_0x12616e?_0x47aa3f(0xbf)+_0x4a1171:_0x5b60cd?_0x47aa3f(0xe1)+_0x4a1171+'.\x20'+NO_RESUBMIT_WARNING:_0x47aa3f(0xdc)+_0x4a1171+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x5aa9ed(0xd3),'command':a83_0x5aa9ed(0xdb),'description':'Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','risk':'write','structuredErrors':!![],'rejectedFlags':[{'name':a83_0x5aa9ed(0xc1),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':a83_0x5aa9ed(0xb8)},{'name':a83_0x5aa9ed(0xc9),'message':a83_0x5aa9ed(0xc7),'hint':'Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.'},{'name':a83_0x5aa9ed(0xe9),'message':a83_0x5aa9ed(0xca),'hint':a83_0x5aa9ed(0xe0)},{'name':a83_0x5aa9ed(0xd7),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x5aa9ed(0xe0)}],'flags':[CODE_FLAG,{'name':a83_0x5aa9ed(0xea),'type':a83_0x5aa9ed(0xd1),'required':!![],'description':'Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x48af06){readInput(_0x48af06);},async 'dryRun'(_0xd9b5ad){const _0x5b7e6a=a83_0x5aa9ed,_0x38f9f5=await buildDatasetFieldRestoreResult({'appCode':_0xd9b5ad[_0x5b7e6a(0xd8)],'input':readInput(_0xd9b5ad),'dryRun':!![]});return asDryRunResult({..._0x38f9f5[_0x5b7e6a(0xd0)],'body':{'datasetId':_0x38f9f5['data'][_0x5b7e6a(0xd3)]['id'],'columnIds':_0x38f9f5[_0x5b7e6a(0xd0)]['backend'][_0x5b7e6a(0xda)]}},{'method':_0x5b7e6a(0xeb),'url':'/smartapi/dataset/restore-column','description':_0x38f9f5[_0x5b7e6a(0xcc)]});},async 'execute'(_0x44836c){const _0x4b9ac0=a83_0x5aa9ed;return buildDatasetFieldRestoreResult({'appCode':_0x44836c[_0x4b9ac0(0xd8)],'input':readInput(_0x44836c),'dryRun':![]});}};function readInput(_0x3af35a){const _0xfab0e8=a83_0x5aa9ed,_0x2fda28={'code':String(_0x3af35a[_0xfab0e8(0xbe)](_0xfab0e8(0xb4))||'')[_0xfab0e8(0xd4)](),'field':String(_0x3af35a[_0xfab0e8(0xbe)](_0xfab0e8(0xea))||'')[_0xfab0e8(0xd4)]()};if(!_0x2fda28['code'])throw CliErrors[_0xfab0e8(0xc3)](_0xfab0e8(0xe8));if(!_0x2fda28[_0xfab0e8(0xea)])throw CliErrors[_0xfab0e8(0xc3)]('--field\x20is\x20required');return _0x2fda28;}function a83_0x125b(_0x59e6e0,_0x3a92f7){_0x59e6e0=_0x59e6e0-0xb4;const _0x18eeff=a83_0x18ee();let _0x125baf=_0x18eeff[_0x59e6e0];return _0x125baf;}function findActiveField(_0x5204e4,_0x6392ae,_0x484c70){const _0x3ea2e7=a83_0x5aa9ed,_0x4e9966=Array['isArray'](_0x5204e4[_0x3ea2e7(0xc9)]),_0x5be50e=_0x4e9966?_0x5204e4['fields']:Array[_0x3ea2e7(0xde)](_0x5204e4[_0x3ea2e7(0xbc)])?_0x5204e4['properties']:[];for(const _0x4246df of _0x5be50e){if(!_0x4246df||typeof _0x4246df!==_0x3ea2e7(0xb6))continue;const _0x36894c=_0x4246df,_0x19b59d=_0x4e9966?_0x36894c[_0x3ea2e7(0xdf)]:_0x36894c[_0x3ea2e7(0xb4)],_0x41320c=_0x36894c[_0x3ea2e7(0xba)]!==!![]&&Number(_0x36894c['id'])===_0x6392ae&&_0x19b59d===_0x484c70;if(!_0x41320c)continue;const _0x3a5460=_0x4e9966?_0x36894c[_0x3ea2e7(0xc8)]:_0x36894c[_0x3ea2e7(0xdf)];return{'id':_0x6392ae,'code':_0x484c70,'displayName':typeof _0x3a5460===_0x3ea2e7(0xd1)&&_0x3a5460?_0x3a5460:_0x484c70,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x53a6f6=a84_0x36da;(function(_0x2250ef,_0x23aa8a){const _0x115d46=a84_0x36da,_0x518c53=_0x2250ef();while(!![]){try{const _0x103745=-parseInt(_0x115d46(0x1f1))/0x1+-parseInt(_0x115d46(0x1c7))/0x2*(parseInt(_0x115d46(0x1d8))/0x3)+-parseInt(_0x115d46(0x1ee))/0x4*(-parseInt(_0x115d46(0x207))/0x5)+-parseInt(_0x115d46(0x1e8))/0x6+parseInt(_0x115d46(0x1c4))/0x7*(parseInt(_0x115d46(0x1d6))/0x8)+parseInt(_0x115d46(0x200))/0x9*(parseInt(_0x115d46(0x1d5))/0xa)+parseInt(_0x115d46(0x1c2))/0xb;if(_0x103745===_0x23aa8a)break;else _0x518c53['push'](_0x518c53['shift']());}catch(_0x5374c7){_0x518c53['push'](_0x518c53['shift']());}}}(a84_0x3355,0xec416));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a84_0x36da(_0x3a0a59,_0x4eb87f){_0x3a0a59=_0x3a0a59-0x1c2;const _0x3355a1=a84_0x3355();let _0x36da3f=_0x3355a1[_0x3a0a59];return _0x36da3f;}import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a84_0x53a6f6(0x1c3),'description',a84_0x53a6f6(0x205),a84_0x53a6f6(0x1d0),'datetimeFormat','defaultAggregation',a84_0x53a6f6(0x1db),a84_0x53a6f6(0x1ff)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x53a6f6(0x1cf),a84_0x53a6f6(0x1ed),'dbType',a84_0x53a6f6(0x1de),'dbTypeScale',a84_0x53a6f6(0x1ce),a84_0x53a6f6(0x202),a84_0x53a6f6(0x1da),a84_0x53a6f6(0x20a),a84_0x53a6f6(0x1dc),a84_0x53a6f6(0x1cc)]);export function parseJsonObjectFlag(_0x4868f1,_0x1128bc){const _0x1d089b=a84_0x53a6f6;if(!_0x4868f1)return undefined;let _0x5b9925;try{_0x5b9925=JSON['parse'](_0x4868f1);}catch(_0x5434f3){const _0x41324a=_0x5434f3 instanceof Error?_0x5434f3['message']:String(_0x5434f3);throw CliErrors[_0x1d089b(0x1fc)](_0x1128bc+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x41324a);}if(!isPlainObject(_0x5b9925)||Array[_0x1d089b(0x1c5)](_0x5b9925))throw CliErrors[_0x1d089b(0x1fc)](_0x1128bc+_0x1d089b(0x1c9));return _0x5b9925;}export function validatePatchKeys(_0x2db9df){const _0x52556d=a84_0x53a6f6,_0x1a38aa=Object[_0x52556d(0x1fd)](_0x2db9df);if(_0x1a38aa[_0x52556d(0x1ec)]===0x0)throw CliErrors[_0x52556d(0x1fc)](_0x52556d(0x1df));for(const _0x150865 of _0x1a38aa){if(FORBIDDEN_FIELD_KEYS[_0x52556d(0x1e1)](_0x150865))throw CliErrors[_0x52556d(0x1fc)]('Forbidden\x20patch\x20key:\x20'+_0x150865);if(!MUTABLE_FIELD_KEYS[_0x52556d(0x1e1)](_0x150865))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x150865,_0x52556d(0x1ef)+Array['from'](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}function a84_0x3355(){const _0x2f3bba=['str','dbFieldName','name','required','message','from','dbId','parse','126830WfqEWI','560YJHlNn','size','3ZvZDXh','stringify','deleted','chartRole','autoIncrement','POST','dbTypeLen','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','dataset','has','modelId','Expectation\x20mismatch\x20at\x20','datasetName','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','expect-json','Field\x20not\x20found:\x20','1641186OhgGXu','field','/smartapi/dataset/update-driven-data','Updated\x20dataset\x20field\x20','length','code','448276zWOLVV','Allowed\x20keys:\x20','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','1412973YBhPlv','data','Dry-run:\x20dataset\x20field\x20','modelCode','fields','patch-json','dbtableConfig','write','--field\x20is\x20required','entries','No\x20changes\x20for\x20dataset\x20field\x20','validation','keys','add','deprecated','531ehCtaK','expect','tableName','--expect-json','join','options','properties','10DmQKWf','patch','Exact\x20raw\x20fields[].name\x20to\x20patch','pkField','trim','23667908NzYzwM','displayName','64435sjmHUQ','isArray','findIndex','2228414jrFDfB','dbName','\x20must\x20be\x20a\x20JSON\x20object','appCode','string','systemRetain'];a84_0x3355=function(){return _0x2f3bba;};return a84_0x3355();}export function applyFieldPatch(_0x11e832,_0x47dc41){const _0x2197d3=a84_0x53a6f6;validatePatchKeys(_0x47dc41);const _0x4a4247=deepClone(_0x11e832),_0x1c84ad=new Set();for(const [_0x253d3f,_0x465551]of Object['entries'](_0x47dc41)){const _0x412786=_0x4a4247[_0x253d3f],_0x5e840d=mergePatchValue(_0x412786,_0x465551);!deepEqual(_0x412786,_0x5e840d)&&(_0x4a4247[_0x253d3f]=_0x5e840d,_0x1c84ad[_0x2197d3(0x1fe)](_0x253d3f),collectChangedPaths(_0x253d3f,_0x412786,_0x5e840d,_0x1c84ad));}return{'after':_0x4a4247,'changedPaths':Array[_0x2197d3(0x1d2)](_0x1c84ad)['sort'](),'changed':_0x1c84ad[_0x2197d3(0x1d7)]>0x0};}export function assertExpectation(_0x31f069,_0x4298ce){const _0x336c38=a84_0x53a6f6;if(!_0x4298ce)return;for(const [_0x35ccd1,_0x33f705]of Object[_0x336c38(0x1fa)](_0x4298ce)){const _0x35b138=_0x31f069[_0x35ccd1];if(!deepEqual(_0x35b138,_0x33f705))throw CliErrors['validation'](_0x336c38(0x1e3)+_0x35ccd1,'Expected\x20'+JSON[_0x336c38(0x1d9)](_0x33f705)+',\x20actual\x20'+JSON[_0x336c38(0x1d9)](_0x35b138));}}export async function buildDatasetFieldUpdateResult({appCode:_0x1b142f,input:_0x4f4988,dryRun:_0x43effe}){const _0x30c4bc=a84_0x53a6f6;validateInput(_0x4f4988);const _0x573f5a=await getDatasetDetail(_0x4f4988[_0x30c4bc(0x1ed)]),_0x5c1388=readFieldArray(_0x573f5a),_0x27cf4a=_0x5c1388[_0x30c4bc(0x1c6)](_0x15373c=>_0x15373c?.['name']===_0x4f4988[_0x30c4bc(0x1e9)]);if(_0x27cf4a<0x0)throw CliErrors['validation'](_0x30c4bc(0x1e7)+_0x4f4988[_0x30c4bc(0x1e9)]);const _0x576bd4=deepClone(_0x5c1388[_0x27cf4a]);assertExpectation(_0x576bd4,_0x4f4988[_0x30c4bc(0x201)]);const {after:_0x27a3b2,changedPaths:_0x284dd4,changed:_0x144f67}=applyFieldPatch(_0x576bd4,_0x4f4988[_0x30c4bc(0x208)]),_0x54622f=summarizeDataset(_0x573f5a,_0x4f4988[_0x30c4bc(0x1ed)]);return _0x144f67&&!_0x43effe&&(_0x5c1388[_0x27cf4a]=_0x27a3b2,await updateDrivenData(_0x573f5a)),{'ok':!![],'data':{'appCode':_0x1b142f,'selector':{'code':_0x4f4988[_0x30c4bc(0x1ed)]},'dataset':_0x54622f,'field':{'id':_0x576bd4['id']??null,'name':_0x576bd4[_0x30c4bc(0x1cf)]},'dryRun':_0x43effe,'changed':_0x144f67,'changedPaths':_0x284dd4,'before':_0x576bd4,'after':_0x27a3b2,'submitted':_0x144f67&&!_0x43effe},'message':_0x144f67?_0x43effe?_0x30c4bc(0x1f3)+_0x4f4988[_0x30c4bc(0x1e9)]+'\x20would\x20change\x20('+_0x284dd4['join'](',\x20')+')':_0x30c4bc(0x1eb)+_0x4f4988[_0x30c4bc(0x1e9)]+'\x20('+_0x284dd4[_0x30c4bc(0x204)](',\x20')+')':_0x30c4bc(0x1fb)+_0x4f4988[_0x30c4bc(0x1e9)]};}export const datasetFieldUpdate={'service':a84_0x53a6f6(0x1e0),'command':'field-update','description':a84_0x53a6f6(0x1f0),'risk':a84_0x53a6f6(0x1f8),'flags':[CODE_FLAG,{'name':a84_0x53a6f6(0x1e9),'type':a84_0x53a6f6(0x1cb),'required':!![],'description':a84_0x53a6f6(0x209)},{'name':a84_0x53a6f6(0x1f6),'type':a84_0x53a6f6(0x1cb),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a84_0x53a6f6(0x1e6),'type':a84_0x53a6f6(0x1cb),'required':![],'description':a84_0x53a6f6(0x1e5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x381b90){validateInput(readFieldUpdateInput(_0x381b90));},async 'dryRun'(_0x49be61){const _0xf522bc=a84_0x53a6f6,_0x20ee1e=await buildDatasetFieldUpdateResult({'appCode':_0x49be61['appCode'],'input':readFieldUpdateInput(_0x49be61),'dryRun':!![]});return{'method':_0xf522bc(0x1dd),'url':_0xf522bc(0x1ea),'body':_0x20ee1e[_0xf522bc(0x1f2)],'description':_0x20ee1e[_0xf522bc(0x1d1)]};},async 'execute'(_0x14bc00){const _0x7fc3e9=a84_0x53a6f6;return buildDatasetFieldUpdateResult({'appCode':_0x14bc00[_0x7fc3e9(0x1ca)],'input':readFieldUpdateInput(_0x14bc00),'dryRun':![]});}};function readFieldUpdateInput(_0x270fe0){const _0x31a253=a84_0x53a6f6,_0x1de4cf=trim(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1ed))),_0x496aeb=emptyToUndefined(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1e9))),_0x37190d=parseJsonObjectFlag(_0x270fe0[_0x31a253(0x1cd)](_0x31a253(0x1f6)),'--patch-json'),_0xd4b058=parseJsonObjectFlag(_0x270fe0['str'](_0x31a253(0x1e6)),_0x31a253(0x203));return{'code':_0x1de4cf,'field':_0x496aeb||'','patch':_0x37190d||{},'expect':_0xd4b058};}function validateInput(_0x2d28b4){const _0xac73=a84_0x53a6f6;if(!_0x2d28b4[_0xac73(0x1ed)])throw CliErrors[_0xac73(0x1fc)]('--code\x20is\x20required');if(!_0x2d28b4[_0xac73(0x1e9)])throw CliErrors[_0xac73(0x1fc)](_0xac73(0x1f9));validatePatchKeys(_0x2d28b4[_0xac73(0x208)]);}function readFieldArray(_0x2a46fd){const _0x2db287=a84_0x53a6f6;if(Array[_0x2db287(0x1c5)](_0x2a46fd['fields']))return _0x2a46fd[_0x2db287(0x1f5)];if(Array[_0x2db287(0x1c5)](_0x2a46fd[_0x2db287(0x206)]))return _0x2a46fd[_0x2db287(0x206)];throw CliErrors[_0x2db287(0x1fc)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x429a64,_0x14e465){const _0x41eab2=a84_0x53a6f6,_0x576998=isPlainObject(_0x429a64[_0x41eab2(0x1e0)])?_0x429a64['dataset']:{},_0xdc1e72=isPlainObject(_0x429a64['dbtableConfig'])?_0x429a64[_0x41eab2(0x1f7)]:{};return{'id':_0x429a64[_0x41eab2(0x1e2)]??_0x429a64['id']??_0x576998['datasetId']??null,'code':_0x429a64[_0x41eab2(0x1f4)]??_0x429a64[_0x41eab2(0x1ed)]??_0x576998['datasetCode']??_0x14e465,'name':_0x429a64[_0x41eab2(0x1cf)]??_0x576998[_0x41eab2(0x1e4)]??null,'table':_0xdc1e72['tableName']??_0x576998[_0x41eab2(0x202)]??null,'db':_0xdc1e72[_0x41eab2(0x1c8)]??_0xdc1e72[_0x41eab2(0x1d3)]??null};}function mergePatchValue(_0x5065e9,_0xcdc4d5){if(isPlainObject(_0x5065e9)&&isPlainObject(_0xcdc4d5))return deepMerge(_0x5065e9,_0xcdc4d5);return deepClone(_0xcdc4d5);}function deepMerge(_0x19214c,_0x58d9fd){const _0x356b86=a84_0x53a6f6,_0x25dbfe=deepClone(_0x19214c);for(const [_0x2716e2,_0x18268d]of Object[_0x356b86(0x1fa)](_0x58d9fd)){_0x25dbfe[_0x2716e2]=isPlainObject(_0x25dbfe[_0x2716e2])&&isPlainObject(_0x18268d)?deepMerge(_0x25dbfe[_0x2716e2],_0x18268d):deepClone(_0x18268d);}return _0x25dbfe;}function collectChangedPaths(_0x54bf37,_0xe5e28d,_0x2d22a5,_0x26424b){const _0x4e123d=a84_0x53a6f6;if(!isPlainObject(_0xe5e28d)||!isPlainObject(_0x2d22a5))return;const _0xee72dc=new Set([...Object[_0x4e123d(0x1fd)](_0xe5e28d),...Object[_0x4e123d(0x1fd)](_0x2d22a5)]);for(const _0x35cd2b of _0xee72dc){const _0x25d674=_0xe5e28d[_0x35cd2b],_0x2ce2f1=_0x2d22a5[_0x35cd2b];!deepEqual(_0x25d674,_0x2ce2f1)&&_0x26424b[_0x4e123d(0x1fe)](_0x54bf37+'.'+_0x35cd2b);}}function deepClone(_0x182087){const _0x3b1e35=a84_0x53a6f6;if(_0x182087===undefined)return _0x182087;return JSON[_0x3b1e35(0x1d4)](JSON[_0x3b1e35(0x1d9)](_0x182087));}function deepEqual(_0x4eefb4,_0x3ffc12){const _0x1e6da0=a84_0x53a6f6;return JSON[_0x1e6da0(0x1d9)](_0x4eefb4)===JSON[_0x1e6da0(0x1d9)](_0x3ffc12);}function isPlainObject(_0x12bd0a){const _0x198dd7=a84_0x53a6f6;return Boolean(_0x12bd0a)&&typeof _0x12bd0a==='object'&&!Array[_0x198dd7(0x1c5)](_0x12bd0a);}function emptyToUndefined(_0x3bf7a8){const _0x385ef7=a84_0x53a6f6,_0x5342e9=String(_0x3bf7a8||'')[_0x385ef7(0x20b)]();return _0x5342e9||undefined;}function trim(_0x5604e9){const _0x302070=a84_0x53a6f6;return String(_0x5604e9||'')[_0x302070(0x20b)]();}
|
|
1
|
+
const a84_0x8b3b6f=a84_0x42bd;(function(_0x35ae79,_0x2f7c76){const _0x4f0807=a84_0x42bd,_0x184ab1=_0x35ae79();while(!![]){try{const _0x47713c=parseInt(_0x4f0807(0x10b))/0x1*(parseInt(_0x4f0807(0xdb))/0x2)+parseInt(_0x4f0807(0xcb))/0x3+-parseInt(_0x4f0807(0xd4))/0x4+-parseInt(_0x4f0807(0x110))/0x5+-parseInt(_0x4f0807(0x10c))/0x6*(parseInt(_0x4f0807(0xfd))/0x7)+-parseInt(_0x4f0807(0xcc))/0x8*(parseInt(_0x4f0807(0xd9))/0x9)+parseInt(_0x4f0807(0xf5))/0xa;if(_0x47713c===_0x2f7c76)break;else _0x184ab1['push'](_0x184ab1['shift']());}catch(_0x407845){_0x184ab1['push'](_0x184ab1['shift']());}}}(a84_0x5505,0x826ff));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a84_0x42bd(_0x54f72e,_0x1725f4){_0x54f72e=_0x54f72e-0xc6;const _0x5505de=a84_0x5505();let _0x42bde8=_0x5505de[_0x54f72e];return _0x42bde8;}const MUTABLE_FIELD_KEYS=new Set([a84_0x8b3b6f(0xee),'displayName',a84_0x8b3b6f(0xdf),a84_0x8b3b6f(0xfa),'required','datetimeFormat',a84_0x8b3b6f(0xed),'chartRole',a84_0x8b3b6f(0x107)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x8b3b6f(0x113),'code',a84_0x8b3b6f(0xc7),a84_0x8b3b6f(0xcf),a84_0x8b3b6f(0xd6),a84_0x8b3b6f(0x108),a84_0x8b3b6f(0xf7),a84_0x8b3b6f(0xf6),'pkField',a84_0x8b3b6f(0xfb),a84_0x8b3b6f(0xd0)]);export function parseJsonObjectFlag(_0x562f11,_0x6eae51){const _0x5616b4=a84_0x8b3b6f;if(!_0x562f11)return undefined;let _0xaf98f7;try{_0xaf98f7=JSON[_0x5616b4(0x105)](_0x562f11);}catch(_0x143168){const _0x50c55e=_0x143168 instanceof Error?_0x143168[_0x5616b4(0x10a)]:String(_0x143168);throw CliErrors[_0x5616b4(0xe4)](_0x6eae51+_0x5616b4(0xf4)+_0x50c55e);}if(!isPlainObject(_0xaf98f7)||Array[_0x5616b4(0xe1)](_0xaf98f7))throw CliErrors[_0x5616b4(0xe4)](_0x6eae51+'\x20must\x20be\x20a\x20JSON\x20object');return _0xaf98f7;}export function validatePatchKeys(_0x4c3da8){const _0x3eb695=a84_0x8b3b6f,_0x5cfff8=Object[_0x3eb695(0xeb)](_0x4c3da8);if(_0x5cfff8[_0x3eb695(0xd7)]===0x0)throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0xc9));for(const _0xdaf79d of _0x5cfff8){if(FORBIDDEN_FIELD_KEYS[_0x3eb695(0xf0)](_0xdaf79d))throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0x101)+_0xdaf79d);if(!MUTABLE_FIELD_KEYS[_0x3eb695(0xf0)](_0xdaf79d))throw CliErrors[_0x3eb695(0xe4)](_0x3eb695(0xf3)+_0xdaf79d,'Allowed\x20keys:\x20'+Array[_0x3eb695(0xf9)](MUTABLE_FIELD_KEYS)[_0x3eb695(0xe9)](',\x20'));}}function a84_0x5505(){const _0x3f4c35=['1570060nWbAfW','expect','dbTypeScale','length','Expected\x20','2220147yUGRsH','Exact\x20raw\x20fields[].name\x20to\x20patch','2cEApZv','dbId','write','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','description','--field\x20is\x20required','isArray','add','Expectation\x20mismatch\x20at\x20','validation','datasetId','dataset','field','modelId','join','stringify','keys','object','defaultAggregation','doType','entries','has','datasetName','properties','Unsupported\x20patch\x20key:\x20','\x20must\x20be\x20valid\x20JSON\x20object:\x20','21720860PrtytL','deleted','tableName','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','from','options','autoIncrement','modelCode','2997505pUznwZ','dbtableConfig','fields','/smartapi/dataset/update-driven-data','Forbidden\x20patch\x20key:\x20','expect-json','--code\x20is\x20required','str','parse','datasetCode','deprecated','dbFieldName','appCode','message','600923EZpHKA','6xhQCnx','trim','\x20would\x20change\x20(','patch-json','5219270DcjiNn','patch','code','name','data','string','dbType',',\x20actual\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','1097685NDURxB','24GQSsab','Dry-run:\x20dataset\x20field\x20','No\x20changes\x20for\x20dataset\x20field\x20','dbTypeLen','systemRetain','sort','--expect-json','dbName'];a84_0x5505=function(){return _0x3f4c35;};return a84_0x5505();}export function applyFieldPatch(_0x5bc60a,_0x593ad3){const _0x229f69=a84_0x8b3b6f;validatePatchKeys(_0x593ad3);const _0x30eea5=deepClone(_0x5bc60a),_0x12de2b=new Set();for(const [_0xbf0405,_0x5ec5ee]of Object[_0x229f69(0xef)](_0x593ad3)){const _0x30a82c=_0x30eea5[_0xbf0405],_0x1c2011=mergePatchValue(_0x30a82c,_0x5ec5ee);!deepEqual(_0x30a82c,_0x1c2011)&&(_0x30eea5[_0xbf0405]=_0x1c2011,_0x12de2b['add'](_0xbf0405),collectChangedPaths(_0xbf0405,_0x30a82c,_0x1c2011,_0x12de2b));}return{'after':_0x30eea5,'changedPaths':Array['from'](_0x12de2b)[_0x229f69(0xd1)](),'changed':_0x12de2b['size']>0x0};}export function assertExpectation(_0x28ea9d,_0x2a1232){const _0x5cd2a9=a84_0x8b3b6f;if(!_0x2a1232)return;for(const [_0x1e7adc,_0x278241]of Object[_0x5cd2a9(0xef)](_0x2a1232)){const _0x3443d4=_0x28ea9d[_0x1e7adc];if(!deepEqual(_0x3443d4,_0x278241))throw CliErrors[_0x5cd2a9(0xe4)](_0x5cd2a9(0xe3)+_0x1e7adc,_0x5cd2a9(0xd8)+JSON[_0x5cd2a9(0xea)](_0x278241)+_0x5cd2a9(0xc8)+JSON[_0x5cd2a9(0xea)](_0x3443d4));}}export async function buildDatasetFieldUpdateResult({appCode:_0x58a49b,input:_0x2d3634,dryRun:_0x9b9be}){const _0x3c04ff=a84_0x8b3b6f;validateInput(_0x2d3634);const _0x51d399=await getDatasetDetail(_0x2d3634[_0x3c04ff(0x112)]),_0x2cf073=readFieldArray(_0x51d399),_0x17c03a=_0x2cf073['findIndex'](_0x271086=>_0x271086?.[_0x3c04ff(0x113)]===_0x2d3634['field']);if(_0x17c03a<0x0)throw CliErrors['validation']('Field\x20not\x20found:\x20'+_0x2d3634['field']);const _0x4e2421=deepClone(_0x2cf073[_0x17c03a]);assertExpectation(_0x4e2421,_0x2d3634[_0x3c04ff(0xd5)]);const {after:_0x22918f,changedPaths:_0xd58614,changed:_0x5e9e54}=applyFieldPatch(_0x4e2421,_0x2d3634[_0x3c04ff(0x111)]),_0x482335=summarizeDataset(_0x51d399,_0x2d3634[_0x3c04ff(0x112)]);return _0x5e9e54&&!_0x9b9be&&(_0x2cf073[_0x17c03a]=_0x22918f,await updateDrivenData(_0x51d399)),{'ok':!![],'data':{'appCode':_0x58a49b,'selector':{'code':_0x2d3634[_0x3c04ff(0x112)]},'dataset':_0x482335,'field':{'id':_0x4e2421['id']??null,'name':_0x4e2421[_0x3c04ff(0x113)]},'dryRun':_0x9b9be,'changed':_0x5e9e54,'changedPaths':_0xd58614,'before':_0x4e2421,'after':_0x22918f,'submitted':_0x5e9e54&&!_0x9b9be},'message':_0x5e9e54?_0x9b9be?_0x3c04ff(0xcd)+_0x2d3634['field']+_0x3c04ff(0x10e)+_0xd58614['join'](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x2d3634[_0x3c04ff(0xe7)]+'\x20('+_0xd58614['join'](',\x20')+')':_0x3c04ff(0xce)+_0x2d3634[_0x3c04ff(0xe7)]};}export const datasetFieldUpdate={'service':a84_0x8b3b6f(0xe6),'command':'field-update','description':a84_0x8b3b6f(0xde),'risk':a84_0x8b3b6f(0xdd),'flags':[CODE_FLAG,{'name':a84_0x8b3b6f(0xe7),'type':'string','required':!![],'description':a84_0x8b3b6f(0xda)},{'name':a84_0x8b3b6f(0x10f),'type':a84_0x8b3b6f(0xc6),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a84_0x8b3b6f(0x102),'type':a84_0x8b3b6f(0xc6),'required':![],'description':a84_0x8b3b6f(0xf8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x43ceff){validateInput(readFieldUpdateInput(_0x43ceff));},async 'dryRun'(_0x2514fa){const _0x33b183=a84_0x8b3b6f,_0x27f6c5=await buildDatasetFieldUpdateResult({'appCode':_0x2514fa[_0x33b183(0x109)],'input':readFieldUpdateInput(_0x2514fa),'dryRun':!![]});return{'method':'POST','url':_0x33b183(0x100),'body':_0x27f6c5[_0x33b183(0x114)],'description':_0x27f6c5['message']};},async 'execute'(_0x35b9da){const _0x4554c5=a84_0x8b3b6f;return buildDatasetFieldUpdateResult({'appCode':_0x35b9da[_0x4554c5(0x109)],'input':readFieldUpdateInput(_0x35b9da),'dryRun':![]});}};function readFieldUpdateInput(_0x2c70ee){const _0x2e4573=a84_0x8b3b6f,_0x4248b0=trim(_0x2c70ee[_0x2e4573(0x104)](_0x2e4573(0x112))),_0x222cc3=emptyToUndefined(_0x2c70ee['str'](_0x2e4573(0xe7))),_0x16395f=parseJsonObjectFlag(_0x2c70ee[_0x2e4573(0x104)]('patch-json'),'--patch-json'),_0x27905d=parseJsonObjectFlag(_0x2c70ee[_0x2e4573(0x104)]('expect-json'),_0x2e4573(0xd2));return{'code':_0x4248b0,'field':_0x222cc3||'','patch':_0x16395f||{},'expect':_0x27905d};}function validateInput(_0x5689f8){const _0x4c97d4=a84_0x8b3b6f;if(!_0x5689f8[_0x4c97d4(0x112)])throw CliErrors[_0x4c97d4(0xe4)](_0x4c97d4(0x103));if(!_0x5689f8[_0x4c97d4(0xe7)])throw CliErrors[_0x4c97d4(0xe4)](_0x4c97d4(0xe0));validatePatchKeys(_0x5689f8['patch']);}function readFieldArray(_0x227fcb){const _0x58f191=a84_0x8b3b6f;if(Array[_0x58f191(0xe1)](_0x227fcb[_0x58f191(0xff)]))return _0x227fcb[_0x58f191(0xff)];if(Array[_0x58f191(0xe1)](_0x227fcb['properties']))return _0x227fcb[_0x58f191(0xf2)];throw CliErrors[_0x58f191(0xe4)](_0x58f191(0xca));}function summarizeDataset(_0x52d661,_0x5e725a){const _0x450062=a84_0x8b3b6f,_0x4bb7a9=isPlainObject(_0x52d661[_0x450062(0xe6)])?_0x52d661[_0x450062(0xe6)]:{},_0x2bf5d9=isPlainObject(_0x52d661['dbtableConfig'])?_0x52d661[_0x450062(0xfe)]:{};return{'id':_0x52d661[_0x450062(0xe8)]??_0x52d661['id']??_0x4bb7a9[_0x450062(0xe5)]??null,'code':_0x52d661[_0x450062(0xfc)]??_0x52d661['code']??_0x4bb7a9[_0x450062(0x106)]??_0x5e725a,'name':_0x52d661[_0x450062(0x113)]??_0x4bb7a9[_0x450062(0xf1)]??null,'table':_0x2bf5d9[_0x450062(0xf7)]??_0x4bb7a9['tableName']??null,'db':_0x2bf5d9[_0x450062(0xd3)]??_0x2bf5d9[_0x450062(0xdc)]??null};}function mergePatchValue(_0x284a3d,_0xd9dd4c){if(isPlainObject(_0x284a3d)&&isPlainObject(_0xd9dd4c))return deepMerge(_0x284a3d,_0xd9dd4c);return deepClone(_0xd9dd4c);}function deepMerge(_0x8801b3,_0x3b2c64){const _0x32d7dc=a84_0x8b3b6f,_0x4e4248=deepClone(_0x8801b3);for(const [_0x542e36,_0x2c3688]of Object[_0x32d7dc(0xef)](_0x3b2c64)){_0x4e4248[_0x542e36]=isPlainObject(_0x4e4248[_0x542e36])&&isPlainObject(_0x2c3688)?deepMerge(_0x4e4248[_0x542e36],_0x2c3688):deepClone(_0x2c3688);}return _0x4e4248;}function collectChangedPaths(_0x3fbdfa,_0x1b2ae2,_0x1553ea,_0x555dd2){const _0x123f33=a84_0x8b3b6f;if(!isPlainObject(_0x1b2ae2)||!isPlainObject(_0x1553ea))return;const _0x13285e=new Set([...Object[_0x123f33(0xeb)](_0x1b2ae2),...Object[_0x123f33(0xeb)](_0x1553ea)]);for(const _0x3a0108 of _0x13285e){const _0x2b7350=_0x1b2ae2[_0x3a0108],_0xd62c35=_0x1553ea[_0x3a0108];!deepEqual(_0x2b7350,_0xd62c35)&&_0x555dd2[_0x123f33(0xe2)](_0x3fbdfa+'.'+_0x3a0108);}}function deepClone(_0x4d075d){const _0x3dad87=a84_0x8b3b6f;if(_0x4d075d===undefined)return _0x4d075d;return JSON[_0x3dad87(0x105)](JSON[_0x3dad87(0xea)](_0x4d075d));}function deepEqual(_0x1be07f,_0x2a98ab){const _0x2ea2d3=a84_0x8b3b6f;return JSON[_0x2ea2d3(0xea)](_0x1be07f)===JSON[_0x2ea2d3(0xea)](_0x2a98ab);}function isPlainObject(_0x461e96){const _0x6ddefd=a84_0x8b3b6f;return Boolean(_0x461e96)&&typeof _0x461e96===_0x6ddefd(0xec)&&!Array['isArray'](_0x461e96);}function emptyToUndefined(_0x5c1143){const _0x265e24=String(_0x5c1143||'')['trim']();return _0x265e24||undefined;}function trim(_0x2f89ae){const _0x5db11f=a84_0x8b3b6f;return String(_0x2f89ae||'')[_0x5db11f(0x10d)]();}
|