@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
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.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x369ad3=a62_0x2102;(function(_0xc31a67,_0x1d2c01){const _0x251bc0=a62_0x2102,_0x3f604b=_0xc31a67();while(!![]){try{const _0x27c05e=parseInt(_0x251bc0(0x128))/0x1+parseInt(_0x251bc0(0x15d))/0x2+parseInt(_0x251bc0(0x14b))/0x3*(-parseInt(_0x251bc0(0x113))/0x4)+parseInt(_0x251bc0(0x157))/0x5*(parseInt(_0x251bc0(0x11f))/0x6)+parseInt(_0x251bc0(0x12a))/0x7*(-parseInt(_0x251bc0(0x11e))/0x8)+-parseInt(_0x251bc0(0x120))/0x9+parseInt(_0x251bc0(0x15c))/0xa*(-parseInt(_0x251bc0(0x151))/0xb);if(_0x27c05e===_0x1d2c01)break;else _0x3f604b['push'](_0x3f604b['shift']());}catch(_0x22b516){_0x3f604b['push'](_0x3f604b['shift']());}}}(a62_0x20de,0x8ed62));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x2e9b83){const _0xbc879e=a62_0x2102;if(_0x2e9b83[_0xbc879e(0x13f)])return null;const _0x1e2b0d=Boolean(_0x2e9b83[_0xbc879e(0x136)]!==undefined||_0x2e9b83['doType']!==undefined);let _0x4d5062={};if(!_0x1e2b0d&&typeof _0x2e9b83['extend']===_0xbc879e(0x122))try{_0x4d5062=JSON[_0xbc879e(0x143)](_0x2e9b83[_0xbc879e(0x146)]);}catch{}const _0x45775c=_0x1e2b0d?_0x2e9b83[_0xbc879e(0x14d)]:_0x2e9b83[_0xbc879e(0x11c)],_0x185aff=_0x1e2b0d?_0x2e9b83[_0xbc879e(0x136)]:_0x2e9b83[_0xbc879e(0x14d)],_0x3f085a=_0x1e2b0d?_0x2e9b83['doType']:_0x2e9b83[_0xbc879e(0x126)]||_0x2e9b83['dataType'],_0x2a0dfc=_0x1e2b0d?_0x2e9b83[_0xbc879e(0x15f)]===!![]:_0x4d5062['pkField']===!![],_0x23bc86=_0x1e2b0d?_0x2e9b83[_0xbc879e(0x131)]===!![]:_0x4d5062[_0xbc879e(0x131)]===!![],_0x12384b=_0x1e2b0d?_0x2e9b83[_0xbc879e(0x11a)]??null:_0x4d5062[_0xbc879e(0x11a)]??null,_0x243a76={'name':_0x45775c,'displayName':_0x185aff||_0x45775c,'type':_0x3f085a,'dbType':_0x2e9b83['dbType'],'pk':_0x2a0dfc,'required':_0x23bc86,'deprecated':_0x2e9b83[_0xbc879e(0x140)]===!![],'description':_0x2e9b83['description']||undefined};return Array[_0xbc879e(0x144)](_0x12384b)&&_0x12384b[_0xbc879e(0x12d)]>0x0&&(_0x243a76[_0xbc879e(0x11a)]=_0x12384b),_0x243a76;}function a62_0x2102(_0x328294,_0x50d7f6){_0x328294=_0x328294-0x110;const _0x20de0c=a62_0x20de();let _0x21022a=_0x20de0c[_0x328294];return _0x21022a;}function parseJsonMaybe(_0x4c393c){const _0x44f100=a62_0x2102;if(typeof _0x4c393c!==_0x44f100(0x122))return _0x4c393c;try{return JSON['parse'](_0x4c393c);}catch{return _0x4c393c;}}function normalizeOperationEntry(_0x45445f,_0x17ba30){const _0x2bd69f=a62_0x2102;if(!_0x17ba30||typeof _0x17ba30!==_0x2bd69f(0x133))return null;if(!_0x17ba30[_0x2bd69f(0x13c)]||!_0x17ba30[_0x2bd69f(0x116)])return null;const _0x511c12={'name':_0x45445f,'method':_0x17ba30[_0x2bd69f(0x13c)],'path':_0x17ba30[_0x2bd69f(0x116)]};if(_0x17ba30['host'])_0x511c12['host']=_0x17ba30[_0x2bd69f(0x111)];if(_0x17ba30[_0x2bd69f(0x13b)]!=null){const _0x1ae9e8=parseJsonMaybe(_0x17ba30[_0x2bd69f(0x13b)]);_0x511c12[_0x2bd69f(0x13b)]=_0x1ae9e8;}if(_0x17ba30[_0x2bd69f(0x110)]!=null){const _0x340cf5=parseJsonMaybe(_0x17ba30[_0x2bd69f(0x110)]);_0x511c12[_0x2bd69f(0x110)]=_0x340cf5;}if(_0x17ba30[_0x2bd69f(0x125)]!=null)_0x511c12[_0x2bd69f(0x125)]=_0x17ba30[_0x2bd69f(0x125)];if(_0x17ba30[_0x2bd69f(0x139)]!=null)_0x511c12[_0x2bd69f(0x139)]=_0x17ba30[_0x2bd69f(0x139)];if(Array[_0x2bd69f(0x144)](_0x17ba30['requestFields']))_0x511c12[_0x2bd69f(0x14e)]=_0x17ba30[_0x2bd69f(0x14e)];if(Array[_0x2bd69f(0x144)](_0x17ba30[_0x2bd69f(0x12e)]))_0x511c12[_0x2bd69f(0x12e)]=_0x17ba30[_0x2bd69f(0x12e)];return _0x511c12;}function summarizeDbtable(_0x422a38){const _0x3fab7e=a62_0x2102,_0x4dc081={},_0x3095ce=[_0x3fab7e(0x150),_0x3fab7e(0x158),_0x3fab7e(0x130),_0x3fab7e(0x11d),_0x3fab7e(0x15f),_0x3fab7e(0x14f),_0x3fab7e(0x124),_0x3fab7e(0x152),_0x3fab7e(0x13a),_0x3fab7e(0x134),_0x3fab7e(0x15a),'modifierIdField','modifierNameField',_0x3fab7e(0x117),'dblinkInfoDTO'];for(const _0x2025ad of _0x3095ce){if(_0x422a38[_0x2025ad]!==undefined)_0x4dc081[_0x2025ad]=_0x422a38[_0x2025ad];}return typeof _0x4dc081[_0x3fab7e(0x14f)]===_0x3fab7e(0x122)&&_0x4dc081['allFields']['length']>0x0&&(_0x4dc081[_0x3fab7e(0x149)]=_0x4dc081[_0x3fab7e(0x14f)][_0x3fab7e(0x145)](',')[_0x3fab7e(0x135)](_0x1696c0=>_0x1696c0[_0x3fab7e(0x138)]())[_0x3fab7e(0x129)](Boolean)),_0x4dc081;}function a62_0x20de(){const _0x1231cd=['fields','516cUIoBe','formatRules','alias','path','labelField','toDatasetName','doVersion','options','push','code','datasetKey','1444624mKzCtJ','6vMinOG','3266163GECAva','toField','string','columnCodeListWithDeleted','logicField','beforeScriptId','type','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','16084SviSOz','filter','7hpAYkX','main_sub','entries','length','responseFields','validateRules','tableName','required','properties','object','creatorIdField','map','displayName','operations','trim','afterScriptId','updateTimeField','requestBody','method','toTableName','indexes','deleted','deprecated','dataset','detail','parse','isArray','split','extend','relatedPageInfoList','dbtableConfig','allFieldNames','tableComment','3618tgWLZv','relations','name','requestFields','allFields','dbId','52723UkORZX','createTimeField','modelCode','relationId','sourceType','bizRelationType','3008645kzzoyr','dbName','modelId','creatorNameField','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','380oSqFEL','1696876PklAwa','title','pkField','source','responseBody','host'];a62_0x20de=function(){return _0x1231cd;};return a62_0x20de();}function normalizeRelatedPages(_0x89975e){const _0xf448f5=a62_0x2102;if(!Array[_0xf448f5(0x144)](_0x89975e))return[];return _0x89975e[_0xf448f5(0x129)](_0x5ed8b0=>_0x5ed8b0&&typeof _0x5ed8b0===_0xf448f5(0x133))[_0xf448f5(0x135)](_0x545608=>({'id':_0x545608['id'],'type':_0x545608[_0xf448f5(0x126)],'code':_0x545608[_0xf448f5(0x11c)],'title':_0x545608[_0xf448f5(0x15e)],'deleted':_0x545608[_0xf448f5(0x13f)]===!![]}));}export const datasetDetail={'service':a62_0x369ad3(0x141),'command':a62_0x369ad3(0x142),'description':a62_0x369ad3(0x127),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x369ad3(0x115),'type':a62_0x369ad3(0x122),'description':a62_0x369ad3(0x15b)}],async 'execute'(_0xdb6cc){const _0x39d5d8=a62_0x369ad3,_0x389b62=await getDatasetDetail(_0xdb6cc['str'](_0x39d5d8(0x11c))),_0x57298c=Array['isArray'](_0x389b62['fields'])?_0x389b62[_0x39d5d8(0x112)]:Array[_0x39d5d8(0x144)](_0x389b62[_0x39d5d8(0x132)])?_0x389b62[_0x39d5d8(0x132)]:[],_0x21467d=_0x57298c[_0x39d5d8(0x135)](_0x15c702=>normalizeField(_0x15c702))[_0x39d5d8(0x129)](_0x3c13bf=>_0x3c13bf!==null),_0x18264e=_0x389b62[_0x39d5d8(0x137)]??{},_0x25e55e=[];for(const [_0xcf1514,_0x53017f]of Object[_0x39d5d8(0x12c)](_0x18264e)){const _0x20511c=normalizeOperationEntry(_0xcf1514,_0x53017f);if(_0x20511c)_0x25e55e[_0x39d5d8(0x11b)](_0x20511c);}const _0x349a2f=_0x389b62[_0x39d5d8(0x148)]??{},_0x509d93=_0x389b62[_0x39d5d8(0x141)]??{},_0x30c4a1=_0x349a2f['dbId']!=null?{'id':_0x349a2f[_0x39d5d8(0x150)],'name':_0x349a2f[_0x39d5d8(0x158)]??null}:undefined;let _0x19111f;return typeof _0x389b62['extend']===_0x39d5d8(0x122)&&(_0x19111f=parseJsonMaybe(_0x389b62[_0x39d5d8(0x146)])),{'ok':!![],'data':{'id':_0x389b62[_0x39d5d8(0x159)]??_0x389b62['id'],'name':_0x389b62[_0x39d5d8(0x14d)],'code':_0x389b62[_0x39d5d8(0x153)]||_0x389b62[_0x39d5d8(0x11c)],'doVersion':_0x389b62[_0x39d5d8(0x119)],'description':_0x389b62['description']||_0x509d93[_0x39d5d8(0x14a)]||undefined,'source':_0x389b62[_0x39d5d8(0x160)]||_0x509d93[_0x39d5d8(0x155)],'table':_0x349a2f['tableName']||_0x509d93[_0x39d5d8(0x130)],'datasetKey':_0x349a2f['datasetKey'],'pk':_0x349a2f['pkField'],'db':_0x30c4a1,'dbtable':summarizeDbtable(_0x349a2f),'fields':_0x21467d,'operations':_0x25e55e,'indexes':Array[_0x39d5d8(0x144)](_0x509d93[_0x39d5d8(0x13e)])?_0x509d93[_0x39d5d8(0x13e)]:[],'relations':Array['isArray'](_0x389b62[_0x39d5d8(0x14c)])?_0x389b62['relations'][_0x39d5d8(0x135)](_0x1f56ce=>({..._0x1f56ce['relationId']!=null?{'relationId':_0x1f56ce[_0x39d5d8(0x154)]}:{},'fromDataset':_0x389b62[_0x39d5d8(0x14d)],'fromCode':_0x389b62[_0x39d5d8(0x153)]||_0x389b62['code'],'fromTable':_0x349a2f['tableName']||_0x509d93[_0x39d5d8(0x130)],'fromField':_0x1f56ce['fromField'],'toDataset':_0x1f56ce[_0x39d5d8(0x118)],'toCode':_0x1f56ce['toDatasetCode'],'toTable':_0x1f56ce[_0x39d5d8(0x13d)],'toField':_0x1f56ce[_0x39d5d8(0x121)],'labelField':_0x1f56ce['toFieldLabel']||undefined,'cardinality':_0x1f56ce['cardinality']||undefined,'bizRelationType':_0x1f56ce[_0x39d5d8(0x156)]==='main_sub'?_0x39d5d8(0x12b):null})):[],'relatedPages':normalizeRelatedPages(_0x389b62[_0x39d5d8(0x147)]),...Array[_0x39d5d8(0x144)](_0x389b62[_0x39d5d8(0x123)])?{'columnCodeListWithDeleted':_0x389b62[_0x39d5d8(0x123)]}:{},'formatRules':Array['isArray'](_0x389b62[_0x39d5d8(0x114)])?_0x389b62['formatRules']:[],'validateRules':Array[_0x39d5d8(0x144)](_0x389b62[_0x39d5d8(0x12f)])?_0x389b62[_0x39d5d8(0x12f)]:[],..._0x19111f!==undefined?{'extend':_0x19111f}:{},'stats':{'fieldCount':_0x21467d[_0x39d5d8(0x12d)],'operationCount':_0x25e55e[_0x39d5d8(0x12d)]}}};}};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../../framework/types.js";
|
|
2
|
+
interface ExtendUpdateInput {
|
|
3
|
+
code: string;
|
|
4
|
+
patch: Record<string, unknown>;
|
|
5
|
+
expect?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
interface BuildExtendUpdateResultOptions {
|
|
8
|
+
appCode: string;
|
|
9
|
+
input: ExtendUpdateInput;
|
|
10
|
+
dryRun: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function parseJsonObjectFlag(value: string | undefined, flagName: string): Record<string, unknown> | undefined;
|
|
13
|
+
export declare function validateExtendPatchKeys(patch: Record<string, unknown>): void;
|
|
14
|
+
export declare function applyExtendPatch(before: Record<string, unknown>, patch: Record<string, unknown>): {
|
|
15
|
+
after: Record<string, unknown>;
|
|
16
|
+
changedPaths: string[];
|
|
17
|
+
changed: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare function assertExpectation(extend: Record<string, unknown>, expected: Record<string, unknown> | undefined): void;
|
|
20
|
+
export declare function buildDatasetExtendUpdateResult({ appCode, input, dryRun, }: BuildExtendUpdateResultOptions): Promise<{
|
|
21
|
+
ok: true;
|
|
22
|
+
data: Record<string, unknown>;
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const datasetExtendUpdate: CommandDefinition;
|
|
26
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x3a7a86=a63_0x1f1b;(function(_0x3c141e,_0xf83c4a){const _0x1eb426=a63_0x1f1b,_0x5383ed=_0x3c141e();while(!![]){try{const _0x31df6a=parseInt(_0x1eb426(0x1e8))/0x1+-parseInt(_0x1eb426(0x1f8))/0x2*(-parseInt(_0x1eb426(0x1e2))/0x3)+parseInt(_0x1eb426(0x1fb))/0x4+parseInt(_0x1eb426(0x1f4))/0x5*(parseInt(_0x1eb426(0x1f1))/0x6)+-parseInt(_0x1eb426(0x1ff))/0x7+parseInt(_0x1eb426(0x1e4))/0x8+parseInt(_0x1eb426(0x1c7))/0x9*(-parseInt(_0x1eb426(0x201))/0xa);if(_0x31df6a===_0xf83c4a)break;else _0x5383ed['push'](_0x5383ed['shift']());}catch(_0x16e31f){_0x5383ed['push'](_0x5383ed['shift']());}}}(a63_0x53d6,0x773d1));function a63_0x1f1b(_0x4c2480,_0x3553bf){_0x4c2480=_0x4c2480-0x1c2;const _0x53d6cb=a63_0x53d6();let _0x1f1b50=_0x53d6cb[_0x4c2480];return _0x1f1b50;}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([[a63_0x3a7a86(0x1e3),{'message':a63_0x3a7a86(0x1da),'hint':a63_0x3a7a86(0x1ca)}]]);export function parseJsonObjectFlag(_0x421e37,_0x2ca8ce){const _0x4c32cf=a63_0x3a7a86;if(!_0x421e37)return undefined;let _0x3cd786;try{_0x3cd786=JSON[_0x4c32cf(0x1d7)](_0x421e37);}catch(_0x862c47){const _0x175de8=_0x862c47 instanceof Error?_0x862c47[_0x4c32cf(0x1df)]:String(_0x862c47);throw CliErrors[_0x4c32cf(0x1dc)](_0x2ca8ce+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x175de8);}if(!isPlainObject(_0x3cd786)||Array['isArray'](_0x3cd786))throw CliErrors[_0x4c32cf(0x1dc)](_0x2ca8ce+_0x4c32cf(0x1c3));return _0x3cd786;}export function validateExtendPatchKeys(_0x4ef6f5){const _0xb1fce2=a63_0x3a7a86,_0x4e38eb=Object[_0xb1fce2(0x1dd)](_0x4ef6f5);if(_0x4e38eb[_0xb1fce2(0x1ea)]===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x285a0f of _0x4e38eb){const _0xc7a464=EXTEND_PATCH_REDIRECTS[_0xb1fce2(0x1f6)](_0x285a0f);if(_0xc7a464)throw CliErrors[_0xb1fce2(0x1dc)](_0xc7a464[_0xb1fce2(0x1df)],_0xc7a464[_0xb1fce2(0x1fa)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x285a0f))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x285a0f,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4740f3=a63_0x3a7a86,_0x41ee46=Array[_0x4740f3(0x1ef)](MUTABLE_EXTEND_KEYS)['sort']();return _0x41ee46[_0x4740f3(0x1ea)]>0x0?_0x4740f3(0x1d2)+_0x41ee46[_0x4740f3(0x1ee)](',\x20'):_0x4740f3(0x1d5);}export function applyExtendPatch(_0x1c853a,_0x4a1216){const _0x4f8108=a63_0x3a7a86;validateExtendPatchKeys(_0x4a1216);const _0x44df30=deepClone(_0x1c853a),_0x5d37e8=[];for(const [_0x5a8505,_0x3e5b65]of Object[_0x4f8108(0x1fc)](_0x4a1216)){const _0x3bf824=_0x44df30[_0x5a8505],_0x128468=deepClone(_0x3e5b65);!deepEqual(_0x3bf824,_0x128468)&&(_0x44df30[_0x5a8505]=_0x128468,_0x5d37e8['push'](_0x4f8108(0x1d9)+_0x5a8505));}return _0x5d37e8[_0x4f8108(0x1f2)](),{'after':_0x44df30,'changedPaths':_0x5d37e8,'changed':_0x5d37e8['length']>0x0};}export function assertExpectation(_0x118b82,_0x41b5ed){const _0x3705f9=a63_0x3a7a86;if(!_0x41b5ed)return;for(const [_0xa404c5,_0x888d3c]of Object[_0x3705f9(0x1fc)](_0x41b5ed)){const _0x1a72bf=_0x118b82[_0xa404c5];if(!deepEqual(_0x1a72bf,_0x888d3c))throw CliErrors[_0x3705f9(0x1dc)](_0x3705f9(0x1f5)+_0xa404c5,_0x3705f9(0x1c2)+JSON[_0x3705f9(0x1de)](_0x888d3c)+_0x3705f9(0x1f9)+JSON[_0x3705f9(0x1de)](_0x1a72bf));}}export async function buildDatasetExtendUpdateResult({appCode:_0x2adfca,input:_0x196d84,dryRun:_0x28c347}){const _0x5f1d83=a63_0x3a7a86;validateInput(_0x196d84);const _0x52e4b7=await getDatasetDetail(_0x196d84[_0x5f1d83(0x1c8)]),_0x14ef9a=parseDatasetExtend(_0x52e4b7[_0x5f1d83(0x1e1)]),_0x21df56=deepClone(_0x14ef9a['value']);assertExpectation(_0x21df56,_0x196d84['expect']);const {after:_0x3b15a5,changedPaths:_0xbf2cd8,changed:_0x4331f9}=applyExtendPatch(_0x21df56,_0x196d84[_0x5f1d83(0x1cd)]),_0x200448=summarizeDataset(_0x52e4b7,_0x196d84[_0x5f1d83(0x1c8)]);return _0x4331f9&&!_0x28c347&&(_0x52e4b7[_0x5f1d83(0x1e1)]=serializeDatasetExtend(_0x3b15a5,_0x14ef9a[_0x5f1d83(0x1c5)]),await updateDrivenData(_0x52e4b7)),{'ok':!![],'data':{'appCode':_0x2adfca,'selector':{'code':_0x196d84[_0x5f1d83(0x1c8)]},'dataset':_0x200448,'dryRun':_0x28c347,'changed':_0x4331f9,'changedPaths':_0xbf2cd8,'before':{'extend':_0x21df56},'after':{'extend':_0x3b15a5},'submitted':_0x4331f9&&!_0x28c347},'message':_0x4331f9?_0x28c347?_0x5f1d83(0x1f7)+_0xbf2cd8[_0x5f1d83(0x1ee)](',\x20')+')':_0x5f1d83(0x1f3)+_0xbf2cd8['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a63_0x3a7a86(0x1e5),'command':a63_0x3a7a86(0x1c9),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0x3a7a86(0x1f0),'flags':[CODE_FLAG,{'name':a63_0x3a7a86(0x1e9),'type':a63_0x3a7a86(0x1fd),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a63_0x3a7a86(0x1ec),'type':a63_0x3a7a86(0x1fd),'required':![],'description':a63_0x3a7a86(0x1d0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1ea405){validateInput(readExtendUpdateInput(_0x1ea405));},async 'dryRun'(_0x2c92a1){const _0x165bdd=a63_0x3a7a86,_0x183e15=await buildDatasetExtendUpdateResult({'appCode':_0x2c92a1[_0x165bdd(0x1cb)],'input':readExtendUpdateInput(_0x2c92a1),'dryRun':!![]});return{'method':_0x165bdd(0x1d6),'url':_0x165bdd(0x1cf),'body':_0x183e15['data'],'description':_0x183e15[_0x165bdd(0x1df)]};},async 'execute'(_0x56298a){const _0x53dacd=a63_0x3a7a86;return buildDatasetExtendUpdateResult({'appCode':_0x56298a[_0x53dacd(0x1cb)],'input':readExtendUpdateInput(_0x56298a),'dryRun':![]});}};function readExtendUpdateInput(_0x5967df){const _0x41bc15=a63_0x3a7a86,_0x654dfe=trim(_0x5967df['str'](_0x41bc15(0x1c8))),_0x506719=parseJsonObjectFlag(_0x5967df[_0x41bc15(0x1e6)]('patch-json'),_0x41bc15(0x200)),_0x584f3b=parseJsonObjectFlag(_0x5967df[_0x41bc15(0x1e6)]('expect-json'),'--expect-json');return{'code':_0x654dfe,'patch':_0x506719||{},'expect':_0x584f3b};}function a63_0x53d6(){const _0xce186c=['dataset','str','object','613513thWzIj','patch-json','length','isArray','expect-json','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','join','from','write','2960556PXEDmB','sort','Updated\x20dataset\x20extend\x20(','5EepCoT','Expectation\x20mismatch\x20at\x20extend.','get','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','2RoJubs',',\x20actual\x20','hint','1152136Nqkqzv','entries','string','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','4101496awDpUQ','--patch-json','20492630WvOsGC','Expected\x20','\x20must\x20be\x20a\x20JSON\x20object','datasetId','shape','modelCode','9rsTkih','code','extend-update','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','appCode','dbtableConfig','patch','modelId','/smartapi/dataset/update-driven-data','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','--code\x20is\x20required','Allowed\x20keys:\x20','tableName','trim','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','POST','parse','dbName','extend.','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','name','validation','keys','stringify','message','dbId','extend','2554107wMiyCT','businessGroup','7018000RqGoBZ'];a63_0x53d6=function(){return _0xce186c;};return a63_0x53d6();}function validateInput(_0x175a83){const _0x2819a2=a63_0x3a7a86;if(!_0x175a83['code'])throw CliErrors[_0x2819a2(0x1dc)](_0x2819a2(0x1d1));validateExtendPatchKeys(_0x175a83['patch']);}function parseDatasetExtend(_0x5b0b04){const _0x881bec=a63_0x3a7a86;if(typeof _0x5b0b04==='string'){const _0xcc3ba9=_0x5b0b04[_0x881bec(0x1d4)]();if(!_0xcc3ba9)return{'value':{},'shape':_0x881bec(0x1fd)};let _0x262a8d;try{_0x262a8d=JSON[_0x881bec(0x1d7)](_0xcc3ba9);}catch(_0xd83139){const _0x45170d=_0xd83139 instanceof Error?_0xd83139['message']:String(_0xd83139);throw CliErrors[_0x881bec(0x1dc)](_0x881bec(0x1fe)+_0x45170d);}if(!isPlainObject(_0x262a8d)||Array['isArray'](_0x262a8d))throw CliErrors[_0x881bec(0x1dc)](_0x881bec(0x1ed));return{'value':_0x262a8d,'shape':_0x881bec(0x1fd)};}if(_0x5b0b04===undefined||_0x5b0b04===null)return{'value':{},'shape':_0x881bec(0x1fd)};if(!isPlainObject(_0x5b0b04)||Array[_0x881bec(0x1eb)](_0x5b0b04))throw CliErrors[_0x881bec(0x1dc)]('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x5b0b04,'shape':_0x881bec(0x1e7)};}function serializeDatasetExtend(_0x3dc2cb,_0x429f88){const _0x2e86a1=a63_0x3a7a86;return _0x429f88==='string'?JSON[_0x2e86a1(0x1de)](_0x3dc2cb):_0x3dc2cb;}function summarizeDataset(_0x4a3686,_0x1d73dd){const _0x586cfe=a63_0x3a7a86,_0x36ad30=isPlainObject(_0x4a3686['dataset'])?_0x4a3686[_0x586cfe(0x1e5)]:{},_0x2d1c51=isPlainObject(_0x4a3686['dbtableConfig'])?_0x4a3686[_0x586cfe(0x1cc)]:{};return{'id':_0x4a3686[_0x586cfe(0x1ce)]??_0x4a3686['id']??_0x36ad30[_0x586cfe(0x1c4)]??null,'code':_0x4a3686[_0x586cfe(0x1c6)]??_0x4a3686['code']??_0x36ad30['datasetCode']??_0x1d73dd,'name':_0x4a3686[_0x586cfe(0x1db)]??_0x36ad30['datasetName']??null,'table':_0x2d1c51[_0x586cfe(0x1d3)]??_0x36ad30['tableName']??null,'db':_0x2d1c51[_0x586cfe(0x1d8)]??_0x2d1c51[_0x586cfe(0x1e0)]??null};}function deepClone(_0x564500){const _0x95e820=a63_0x3a7a86;if(_0x564500===undefined)return _0x564500;return JSON[_0x95e820(0x1d7)](JSON['stringify'](_0x564500));}function deepEqual(_0x4cf67a,_0x184b4f){const _0x5b0637=a63_0x3a7a86;return JSON[_0x5b0637(0x1de)](_0x4cf67a)===JSON[_0x5b0637(0x1de)](_0x184b4f);}function isPlainObject(_0xfa175d){const _0x4be157=a63_0x3a7a86;return Boolean(_0xfa175d)&&typeof _0xfa175d===_0x4be157(0x1e7)&&!Array[_0x4be157(0x1eb)](_0xfa175d);}function trim(_0x34675c){const _0x52d13a=a63_0x3a7a86,_0x1fde9b=String(_0x34675c||'')[_0x52d13a(0x1d4)]();return _0x1fde9b;}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../../framework/types.js";
|
|
2
|
+
interface FieldUpdateInput {
|
|
3
|
+
code: string;
|
|
4
|
+
field: string;
|
|
5
|
+
patch: Record<string, unknown>;
|
|
6
|
+
expect?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
interface BuildFieldUpdateResultOptions {
|
|
9
|
+
appCode: string;
|
|
10
|
+
input: FieldUpdateInput;
|
|
11
|
+
dryRun: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function parseJsonObjectFlag(value: string | undefined, flagName: string): Record<string, unknown> | undefined;
|
|
14
|
+
export declare function validatePatchKeys(patch: Record<string, unknown>): void;
|
|
15
|
+
export declare function applyFieldPatch(before: Record<string, unknown>, patch: Record<string, unknown>): {
|
|
16
|
+
after: Record<string, unknown>;
|
|
17
|
+
changedPaths: string[];
|
|
18
|
+
changed: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function assertExpectation(field: Record<string, unknown>, expected: Record<string, unknown> | undefined): void;
|
|
21
|
+
export declare function buildDatasetFieldUpdateResult({ appCode, input, dryRun, }: BuildFieldUpdateResultOptions): Promise<{
|
|
22
|
+
ok: true;
|
|
23
|
+
data: Record<string, unknown>;
|
|
24
|
+
message: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const datasetFieldUpdate: CommandDefinition;
|
|
27
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a64_0x53ad(){const _0x25a428=['Dry-run:\x20dataset\x20field\x20','parse','21MQRUFO','sort','dataset','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Field\x20not\x20found:\x20','code','5010lxnduc',',\x20actual\x20','2679924RmUKTR','\x20would\x20change\x20(','defaultAggregation','pkField','has','6225102dCGwZI','\x20must\x20be\x20valid\x20JSON\x20object:\x20','668232BuTRIm','field','1213270vSJIAw','tableName','dbTypeScale','1336AiZCbj','chartRole','keys','6799290XnVLjz','dbType','/smartapi/dataset/update-driven-data','message','POST','field-update','--expect-json','patch','Allowed\x20keys:\x20','options','Updated\x20dataset\x20field\x20','findIndex','write','autoIncrement','expect-json','Forbidden\x20patch\x20key:\x20','add','stringify','deleted','length','join','1256375khbosF','datasetCode','data','name','Exact\x20raw\x20fields[].name\x20to\x20patch','entries','description','systemRetain','isArray','displayName','datasetId','from','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','string','dbId','validation','datetimeFormat','--code\x20is\x20required','1Gylxor','\x20must\x20be\x20a\x20JSON\x20object','str','Unsupported\x20patch\x20key:\x20','dbtableConfig','trim','properties','size','patch-json','Expected\x20','modelCode'];a64_0x53ad=function(){return _0x25a428;};return a64_0x53ad();}const a64_0x3f5281=a64_0x48e9;(function(_0x28177c,_0x1b4c3a){const _0x5c6390=a64_0x48e9,_0x51a451=_0x28177c();while(!![]){try{const _0xfd5e35=parseInt(_0x5c6390(0xbd))/0x1*(parseInt(_0x5c6390(0xdb))/0x2)+-parseInt(_0x5c6390(0xd0))/0x3*(-parseInt(_0x5c6390(0xde))/0x4)+-parseInt(_0x5c6390(0xab))/0x5+-parseInt(_0x5c6390(0xd2))/0x6+-parseInt(_0x5c6390(0xca))/0x7*(-parseInt(_0x5c6390(0xd9))/0x8)+-parseInt(_0x5c6390(0xd7))/0x9+parseInt(_0x5c6390(0xe1))/0xa;if(_0xfd5e35===_0x1b4c3a)break;else _0x51a451['push'](_0x51a451['shift']());}catch(_0x1ec2a0){_0x51a451['push'](_0x51a451['shift']());}}}(a64_0x53ad,0xac32c));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x48e9(_0x3d7663,_0x1b1fb2){_0x3d7663=_0x3d7663-0xa2;const _0x53ad2e=a64_0x53ad();let _0x48e917=_0x53ad2e[_0x3d7663];return _0x48e917;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a64_0x3f5281(0xb4),a64_0x3f5281(0xb1),a64_0x3f5281(0xea),'required',a64_0x3f5281(0xbb),a64_0x3f5281(0xd4),a64_0x3f5281(0xdf),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x3f5281(0xae),a64_0x3f5281(0xcf),a64_0x3f5281(0xe2),'dbTypeLen',a64_0x3f5281(0xdd),'dbFieldName','tableName',a64_0x3f5281(0xa8),a64_0x3f5281(0xd5),a64_0x3f5281(0xa3),a64_0x3f5281(0xb2)]);export function parseJsonObjectFlag(_0x4d0050,_0x5520d6){const _0x4eafde=a64_0x3f5281;if(!_0x4d0050)return undefined;let _0x3957b7;try{_0x3957b7=JSON['parse'](_0x4d0050);}catch(_0x4feeb2){const _0x47fe68=_0x4feeb2 instanceof Error?_0x4feeb2[_0x4eafde(0xe4)]:String(_0x4feeb2);throw CliErrors['validation'](_0x5520d6+_0x4eafde(0xd8)+_0x47fe68);}if(!isPlainObject(_0x3957b7)||Array[_0x4eafde(0xb3)](_0x3957b7))throw CliErrors[_0x4eafde(0xba)](_0x5520d6+_0x4eafde(0xbe));return _0x3957b7;}export function validatePatchKeys(_0x184693){const _0x208425=a64_0x3f5281,_0x2d1c5f=Object[_0x208425(0xe0)](_0x184693);if(_0x2d1c5f[_0x208425(0xa9)]===0x0)throw CliErrors[_0x208425(0xba)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x1131cc of _0x2d1c5f){if(FORBIDDEN_FIELD_KEYS[_0x208425(0xd6)](_0x1131cc))throw CliErrors[_0x208425(0xba)](_0x208425(0xa5)+_0x1131cc);if(!MUTABLE_FIELD_KEYS[_0x208425(0xd6)](_0x1131cc))throw CliErrors[_0x208425(0xba)](_0x208425(0xc0)+_0x1131cc,_0x208425(0xe9)+Array[_0x208425(0xb6)](MUTABLE_FIELD_KEYS)[_0x208425(0xaa)](',\x20'));}}export function applyFieldPatch(_0x263331,_0x53679e){const _0x1cc6ee=a64_0x3f5281;validatePatchKeys(_0x53679e);const _0x5eebec=deepClone(_0x263331),_0x42591b=new Set();for(const [_0x4fe461,_0x2505e6]of Object[_0x1cc6ee(0xb0)](_0x53679e)){const _0x8173ba=_0x5eebec[_0x4fe461],_0x2689a8=mergePatchValue(_0x8173ba,_0x2505e6);!deepEqual(_0x8173ba,_0x2689a8)&&(_0x5eebec[_0x4fe461]=_0x2689a8,_0x42591b[_0x1cc6ee(0xa6)](_0x4fe461),collectChangedPaths(_0x4fe461,_0x8173ba,_0x2689a8,_0x42591b));}return{'after':_0x5eebec,'changedPaths':Array[_0x1cc6ee(0xb6)](_0x42591b)[_0x1cc6ee(0xcb)](),'changed':_0x42591b[_0x1cc6ee(0xc4)]>0x0};}export function assertExpectation(_0xdb4f25,_0x4c808e){const _0x26352d=a64_0x3f5281;if(!_0x4c808e)return;for(const [_0x530588,_0x5e85b9]of Object[_0x26352d(0xb0)](_0x4c808e)){const _0x1dd598=_0xdb4f25[_0x530588];if(!deepEqual(_0x1dd598,_0x5e85b9))throw CliErrors[_0x26352d(0xba)]('Expectation\x20mismatch\x20at\x20'+_0x530588,_0x26352d(0xc6)+JSON[_0x26352d(0xa7)](_0x5e85b9)+_0x26352d(0xd1)+JSON[_0x26352d(0xa7)](_0x1dd598));}}export async function buildDatasetFieldUpdateResult({appCode:_0x8b06a2,input:_0x29dc27,dryRun:_0x4b7f6c}){const _0x5f4559=a64_0x3f5281;validateInput(_0x29dc27);const _0x16979f=await getDatasetDetail(_0x29dc27[_0x5f4559(0xcf)]),_0x188d91=readFieldArray(_0x16979f),_0xd5677b=_0x188d91[_0x5f4559(0xec)](_0x275015=>_0x275015?.[_0x5f4559(0xae)]===_0x29dc27[_0x5f4559(0xda)]);if(_0xd5677b<0x0)throw CliErrors['validation'](_0x5f4559(0xce)+_0x29dc27[_0x5f4559(0xda)]);const _0x105c95=deepClone(_0x188d91[_0xd5677b]);assertExpectation(_0x105c95,_0x29dc27['expect']);const {after:_0x36d030,changedPaths:_0x1d53c9,changed:_0x1abc04}=applyFieldPatch(_0x105c95,_0x29dc27[_0x5f4559(0xe8)]),_0x1d2e37=summarizeDataset(_0x16979f,_0x29dc27[_0x5f4559(0xcf)]);return _0x1abc04&&!_0x4b7f6c&&(_0x188d91[_0xd5677b]=_0x36d030,await updateDrivenData(_0x16979f)),{'ok':!![],'data':{'appCode':_0x8b06a2,'selector':{'code':_0x29dc27[_0x5f4559(0xcf)]},'dataset':_0x1d2e37,'field':{'id':_0x105c95['id']??null,'name':_0x105c95[_0x5f4559(0xae)]},'dryRun':_0x4b7f6c,'changed':_0x1abc04,'changedPaths':_0x1d53c9,'before':_0x105c95,'after':_0x36d030,'submitted':_0x1abc04&&!_0x4b7f6c},'message':_0x1abc04?_0x4b7f6c?_0x5f4559(0xc8)+_0x29dc27[_0x5f4559(0xda)]+_0x5f4559(0xd3)+_0x1d53c9['join'](',\x20')+')':_0x5f4559(0xeb)+_0x29dc27[_0x5f4559(0xda)]+'\x20('+_0x1d53c9[_0x5f4559(0xaa)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x29dc27['field']};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x3f5281(0xe6),'description':a64_0x3f5281(0xb7),'risk':a64_0x3f5281(0xa2),'flags':[CODE_FLAG,{'name':a64_0x3f5281(0xda),'type':a64_0x3f5281(0xb8),'required':!![],'description':a64_0x3f5281(0xaf)},{'name':a64_0x3f5281(0xc5),'type':'string','required':!![],'description':a64_0x3f5281(0xcd)},{'name':a64_0x3f5281(0xa4),'type':a64_0x3f5281(0xb8),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x591291){validateInput(readFieldUpdateInput(_0x591291));},async 'dryRun'(_0x59c3dd){const _0x4fdbdd=a64_0x3f5281,_0x3e55f8=await buildDatasetFieldUpdateResult({'appCode':_0x59c3dd['appCode'],'input':readFieldUpdateInput(_0x59c3dd),'dryRun':!![]});return{'method':_0x4fdbdd(0xe5),'url':_0x4fdbdd(0xe3),'body':_0x3e55f8[_0x4fdbdd(0xad)],'description':_0x3e55f8[_0x4fdbdd(0xe4)]};},async 'execute'(_0x50d729){return buildDatasetFieldUpdateResult({'appCode':_0x50d729['appCode'],'input':readFieldUpdateInput(_0x50d729),'dryRun':![]});}};function readFieldUpdateInput(_0x35d869){const _0x3a72af=a64_0x3f5281,_0x29f737=trim(_0x35d869['str'](_0x3a72af(0xcf))),_0x1de2b6=emptyToUndefined(_0x35d869[_0x3a72af(0xbf)]('field')),_0x5292e2=parseJsonObjectFlag(_0x35d869[_0x3a72af(0xbf)]('patch-json'),'--patch-json'),_0x4317d6=parseJsonObjectFlag(_0x35d869[_0x3a72af(0xbf)](_0x3a72af(0xa4)),_0x3a72af(0xe7));return{'code':_0x29f737,'field':_0x1de2b6||'','patch':_0x5292e2||{},'expect':_0x4317d6};}function validateInput(_0x3d3d90){const _0x17f767=a64_0x3f5281;if(!_0x3d3d90['code'])throw CliErrors['validation'](_0x17f767(0xbc));if(!_0x3d3d90[_0x17f767(0xda)])throw CliErrors['validation']('--field\x20is\x20required');validatePatchKeys(_0x3d3d90['patch']);}function readFieldArray(_0x20ed84){const _0xfeb7c0=a64_0x3f5281;if(Array[_0xfeb7c0(0xb3)](_0x20ed84['fields']))return _0x20ed84['fields'];if(Array[_0xfeb7c0(0xb3)](_0x20ed84[_0xfeb7c0(0xc3)]))return _0x20ed84[_0xfeb7c0(0xc3)];throw CliErrors['validation']('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x3e8678,_0x5e1248){const _0x5f3558=a64_0x3f5281,_0x34f1dc=isPlainObject(_0x3e8678[_0x5f3558(0xcc)])?_0x3e8678['dataset']:{},_0x532823=isPlainObject(_0x3e8678['dbtableConfig'])?_0x3e8678[_0x5f3558(0xc1)]:{};return{'id':_0x3e8678['modelId']??_0x3e8678['id']??_0x34f1dc[_0x5f3558(0xb5)]??null,'code':_0x3e8678[_0x5f3558(0xc7)]??_0x3e8678['code']??_0x34f1dc[_0x5f3558(0xac)]??_0x5e1248,'name':_0x3e8678[_0x5f3558(0xae)]??_0x34f1dc['datasetName']??null,'table':_0x532823[_0x5f3558(0xdc)]??_0x34f1dc[_0x5f3558(0xdc)]??null,'db':_0x532823['dbName']??_0x532823[_0x5f3558(0xb9)]??null};}function mergePatchValue(_0x292ec9,_0x405112){if(isPlainObject(_0x292ec9)&&isPlainObject(_0x405112))return deepMerge(_0x292ec9,_0x405112);return deepClone(_0x405112);}function deepMerge(_0xaecb91,_0x19d161){const _0x278dcf=a64_0x3f5281,_0x49ca59=deepClone(_0xaecb91);for(const [_0x2d1010,_0x2a9b97]of Object[_0x278dcf(0xb0)](_0x19d161)){_0x49ca59[_0x2d1010]=isPlainObject(_0x49ca59[_0x2d1010])&&isPlainObject(_0x2a9b97)?deepMerge(_0x49ca59[_0x2d1010],_0x2a9b97):deepClone(_0x2a9b97);}return _0x49ca59;}function collectChangedPaths(_0xeb1b9d,_0x38b648,_0x3b0aec,_0x3698a3){const _0x4f65ee=a64_0x3f5281;if(!isPlainObject(_0x38b648)||!isPlainObject(_0x3b0aec))return;const _0x5ebade=new Set([...Object[_0x4f65ee(0xe0)](_0x38b648),...Object[_0x4f65ee(0xe0)](_0x3b0aec)]);for(const _0x1ade84 of _0x5ebade){const _0x314cd3=_0x38b648[_0x1ade84],_0x4e2ae1=_0x3b0aec[_0x1ade84];!deepEqual(_0x314cd3,_0x4e2ae1)&&_0x3698a3[_0x4f65ee(0xa6)](_0xeb1b9d+'.'+_0x1ade84);}}function deepClone(_0x36fa9e){const _0xd5b9d1=a64_0x3f5281;if(_0x36fa9e===undefined)return _0x36fa9e;return JSON[_0xd5b9d1(0xc9)](JSON['stringify'](_0x36fa9e));}function deepEqual(_0x2fa008,_0x19fa82){const _0x3266d8=a64_0x3f5281;return JSON['stringify'](_0x2fa008)===JSON[_0x3266d8(0xa7)](_0x19fa82);}function isPlainObject(_0x57765c){return Boolean(_0x57765c)&&typeof _0x57765c==='object'&&!Array['isArray'](_0x57765c);}function emptyToUndefined(_0x5cecab){const _0x408b62=String(_0x5cecab||'')['trim']();return _0x408b62||undefined;}function trim(_0x1cfb2a){const _0x2fe722=a64_0x3f5281;return String(_0x1cfb2a||'')[_0x2fe722(0xc2)]();}
|
|
1
|
+
const a64_0x5f4047=a64_0x1144;(function(_0x3c6e14,_0x29c987){const _0x29f67d=a64_0x1144,_0x140a3a=_0x3c6e14();while(!![]){try{const _0x22e8b9=parseInt(_0x29f67d(0x1d0))/0x1*(parseInt(_0x29f67d(0x1ed))/0x2)+-parseInt(_0x29f67d(0x1c8))/0x3*(-parseInt(_0x29f67d(0x1fd))/0x4)+parseInt(_0x29f67d(0x1fb))/0x5+parseInt(_0x29f67d(0x1f0))/0x6*(-parseInt(_0x29f67d(0x1da))/0x7)+parseInt(_0x29f67d(0x1f8))/0x8+-parseInt(_0x29f67d(0x1ea))/0x9*(parseInt(_0x29f67d(0x1f2))/0xa)+-parseInt(_0x29f67d(0x1f3))/0xb;if(_0x22e8b9===_0x29c987)break;else _0x140a3a['push'](_0x140a3a['shift']());}catch(_0x38c945){_0x140a3a['push'](_0x140a3a['shift']());}}}(a64_0x4542,0xdd0c7));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([a64_0x5f4047(0x1e8),a64_0x5f4047(0x1d7),'description',a64_0x5f4047(0x1cc),a64_0x5f4047(0x1e7),a64_0x5f4047(0x1f6),'defaultAggregation',a64_0x5f4047(0x1d3),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x5f4047(0x1c9),a64_0x5f4047(0x20a),'dbType','dbTypeLen',a64_0x5f4047(0x1e2),a64_0x5f4047(0x1f4),a64_0x5f4047(0x201),a64_0x5f4047(0x1e0),a64_0x5f4047(0x1e1),a64_0x5f4047(0x202),'systemRetain']);export function parseJsonObjectFlag(_0x4df8f5,_0x51d6f1){const _0xcdbd97=a64_0x5f4047;if(!_0x4df8f5)return undefined;let _0x316e65;try{_0x316e65=JSON['parse'](_0x4df8f5);}catch(_0x384c4c){const _0x4efc5b=_0x384c4c instanceof Error?_0x384c4c[_0xcdbd97(0x1bb)]:String(_0x384c4c);throw CliErrors['validation'](_0x51d6f1+_0xcdbd97(0x1d1)+_0x4efc5b);}if(!isPlainObject(_0x316e65)||Array[_0xcdbd97(0x1f5)](_0x316e65))throw CliErrors[_0xcdbd97(0x1fa)](_0x51d6f1+_0xcdbd97(0x1c1));return _0x316e65;}function a64_0x1144(_0x1dec34,_0x1fd2a5){_0x1dec34=_0x1dec34-0x1bb;const _0x4542f8=a64_0x4542();let _0x114415=_0x4542f8[_0x1dec34];return _0x114415;}export function validatePatchKeys(_0xd82fc3){const _0x118e6a=a64_0x5f4047,_0x252f56=Object['keys'](_0xd82fc3);if(_0x252f56['length']===0x0)throw CliErrors[_0x118e6a(0x1fa)](_0x118e6a(0x1e3));for(const _0x174d02 of _0x252f56){if(FORBIDDEN_FIELD_KEYS[_0x118e6a(0x1be)](_0x174d02))throw CliErrors[_0x118e6a(0x1fa)](_0x118e6a(0x20b)+_0x174d02);if(!MUTABLE_FIELD_KEYS['has'](_0x174d02))throw CliErrors[_0x118e6a(0x1fa)](_0x118e6a(0x1de)+_0x174d02,_0x118e6a(0x1cd)+Array[_0x118e6a(0x1d2)](MUTABLE_FIELD_KEYS)[_0x118e6a(0x1c0)](',\x20'));}}export function applyFieldPatch(_0x44aae6,_0x5e3ad8){const _0x1cf2d5=a64_0x5f4047;validatePatchKeys(_0x5e3ad8);const _0x39bb74=deepClone(_0x44aae6),_0x34c82c=new Set();for(const [_0x33378a,_0x1dbd6d]of Object['entries'](_0x5e3ad8)){const _0x20c9d4=_0x39bb74[_0x33378a],_0x3ad529=mergePatchValue(_0x20c9d4,_0x1dbd6d);!deepEqual(_0x20c9d4,_0x3ad529)&&(_0x39bb74[_0x33378a]=_0x3ad529,_0x34c82c[_0x1cf2d5(0x203)](_0x33378a),collectChangedPaths(_0x33378a,_0x20c9d4,_0x3ad529,_0x34c82c));}return{'after':_0x39bb74,'changedPaths':Array[_0x1cf2d5(0x1d2)](_0x34c82c)[_0x1cf2d5(0x206)](),'changed':_0x34c82c['size']>0x0};}export function assertExpectation(_0x39b4d8,_0x30f956){const _0x3eef7b=a64_0x5f4047;if(!_0x30f956)return;for(const [_0x49e790,_0x1053d1]of Object[_0x3eef7b(0x1cb)](_0x30f956)){const _0x4b1306=_0x39b4d8[_0x49e790];if(!deepEqual(_0x4b1306,_0x1053d1))throw CliErrors['validation'](_0x3eef7b(0x1e4)+_0x49e790,_0x3eef7b(0x1db)+JSON[_0x3eef7b(0x1e6)](_0x1053d1)+_0x3eef7b(0x207)+JSON[_0x3eef7b(0x1e6)](_0x4b1306));}}export async function buildDatasetFieldUpdateResult({appCode:_0xce2c55,input:_0x298972,dryRun:_0x259103}){const _0x34de3e=a64_0x5f4047;validateInput(_0x298972);const _0x2b8add=await getDatasetDetail(_0x298972[_0x34de3e(0x20a)]),_0x3ab926=readFieldArray(_0x2b8add),_0xc8a5b9=_0x3ab926[_0x34de3e(0x1c5)](_0x1792c0=>_0x1792c0?.[_0x34de3e(0x1c9)]===_0x298972[_0x34de3e(0x1f7)]);if(_0xc8a5b9<0x0)throw CliErrors[_0x34de3e(0x1fa)](_0x34de3e(0x1e9)+_0x298972[_0x34de3e(0x1f7)]);const _0x544dc9=deepClone(_0x3ab926[_0xc8a5b9]);assertExpectation(_0x544dc9,_0x298972['expect']);const {after:_0x1692ab,changedPaths:_0x17cdb9,changed:_0x451868}=applyFieldPatch(_0x544dc9,_0x298972[_0x34de3e(0x1dd)]),_0x5b766b=summarizeDataset(_0x2b8add,_0x298972[_0x34de3e(0x20a)]);return _0x451868&&!_0x259103&&(_0x3ab926[_0xc8a5b9]=_0x1692ab,await updateDrivenData(_0x2b8add)),{'ok':!![],'data':{'appCode':_0xce2c55,'selector':{'code':_0x298972[_0x34de3e(0x20a)]},'dataset':_0x5b766b,'field':{'id':_0x544dc9['id']??null,'name':_0x544dc9[_0x34de3e(0x1c9)]},'dryRun':_0x259103,'changed':_0x451868,'changedPaths':_0x17cdb9,'before':_0x544dc9,'after':_0x1692ab,'submitted':_0x451868&&!_0x259103},'message':_0x451868?_0x259103?_0x34de3e(0x1d6)+_0x298972[_0x34de3e(0x1f7)]+_0x34de3e(0x1f1)+_0x17cdb9['join'](',\x20')+')':_0x34de3e(0x1bd)+_0x298972[_0x34de3e(0x1f7)]+'\x20('+_0x17cdb9[_0x34de3e(0x1c0)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x298972[_0x34de3e(0x1f7)]};}export const datasetFieldUpdate={'service':a64_0x5f4047(0x1fe),'command':a64_0x5f4047(0x200),'description':a64_0x5f4047(0x1fc),'risk':a64_0x5f4047(0x208),'flags':[CODE_FLAG,{'name':a64_0x5f4047(0x1f7),'type':a64_0x5f4047(0x1c6),'required':!![],'description':a64_0x5f4047(0x1ca)},{'name':a64_0x5f4047(0x1cf),'type':a64_0x5f4047(0x1c6),'required':!![],'description':a64_0x5f4047(0x1eb)},{'name':'expect-json','type':a64_0x5f4047(0x1c6),'required':![],'description':a64_0x5f4047(0x1ee)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4867e4){validateInput(readFieldUpdateInput(_0x4867e4));},async 'dryRun'(_0x62a07a){const _0x24face=a64_0x5f4047,_0x39a5bd=await buildDatasetFieldUpdateResult({'appCode':_0x62a07a[_0x24face(0x204)],'input':readFieldUpdateInput(_0x62a07a),'dryRun':!![]});return{'method':_0x24face(0x1ec),'url':_0x24face(0x1df),'body':_0x39a5bd[_0x24face(0x1c7)],'description':_0x39a5bd[_0x24face(0x1bb)]};},async 'execute'(_0x26e21b){return buildDatasetFieldUpdateResult({'appCode':_0x26e21b['appCode'],'input':readFieldUpdateInput(_0x26e21b),'dryRun':![]});}};function readFieldUpdateInput(_0x41a85c){const _0x3e58d6=a64_0x5f4047,_0x3a53c7=trim(_0x41a85c[_0x3e58d6(0x1c4)](_0x3e58d6(0x20a))),_0x2bbd5c=emptyToUndefined(_0x41a85c['str'](_0x3e58d6(0x1f7))),_0x59e8fc=parseJsonObjectFlag(_0x41a85c['str'](_0x3e58d6(0x1cf)),_0x3e58d6(0x1c2)),_0x50e400=parseJsonObjectFlag(_0x41a85c['str'](_0x3e58d6(0x1bf)),_0x3e58d6(0x1bc));return{'code':_0x3a53c7,'field':_0x2bbd5c||'','patch':_0x59e8fc||{},'expect':_0x50e400};}function validateInput(_0x2f40ce){const _0x4cc0f6=a64_0x5f4047;if(!_0x2f40ce['code'])throw CliErrors[_0x4cc0f6(0x1fa)]('--code\x20is\x20required');if(!_0x2f40ce[_0x4cc0f6(0x1f7)])throw CliErrors['validation'](_0x4cc0f6(0x1d8));validatePatchKeys(_0x2f40ce[_0x4cc0f6(0x1dd)]);}function a64_0x4542(){const _0x150b62=['patch','Unsupported\x20patch\x20key:\x20','/smartapi/dataset/update-driven-data','deleted','pkField','dbTypeScale','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Expectation\x20mismatch\x20at\x20','object','stringify','required','doType','Field\x20not\x20found:\x20','99063NOfsBk','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','POST','316454tzplhr','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','fields','418800MfXhXZ','\x20would\x20change\x20(','70yrItef','36027123KMJHTD','dbFieldName','isArray','datetimeFormat','field','9708664rQQuZj','dbtableConfig','validation','4116890jYTvXF','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','19476nnAhRM','dataset','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field-update','tableName','autoIncrement','add','appCode','datasetCode','sort',',\x20actual\x20','write','keys','code','Forbidden\x20patch\x20key:\x20','message','--expect-json','Updated\x20dataset\x20field\x20','has','expect-json','join','\x20must\x20be\x20a\x20JSON\x20object','--patch-json','parse','str','findIndex','string','data','1113czXNqC','name','Exact\x20raw\x20fields[].name\x20to\x20patch','entries','options','Allowed\x20keys:\x20','modelCode','patch-json','11SWmkKg','\x20must\x20be\x20valid\x20JSON\x20object:\x20','from','chartRole','modelId','properties','Dry-run:\x20dataset\x20field\x20','displayName','--field\x20is\x20required','trim','133oqblFm','Expected\x20','dbName'];a64_0x4542=function(){return _0x150b62;};return a64_0x4542();}function readFieldArray(_0x24edbc){const _0x2dc151=a64_0x5f4047;if(Array['isArray'](_0x24edbc['fields']))return _0x24edbc[_0x2dc151(0x1ef)];if(Array[_0x2dc151(0x1f5)](_0x24edbc['properties']))return _0x24edbc[_0x2dc151(0x1d5)];throw CliErrors[_0x2dc151(0x1fa)](_0x2dc151(0x1ff));}function summarizeDataset(_0x53e0fb,_0x68c0c4){const _0x2b7e82=a64_0x5f4047,_0x413123=isPlainObject(_0x53e0fb[_0x2b7e82(0x1fe)])?_0x53e0fb[_0x2b7e82(0x1fe)]:{},_0x26aef6=isPlainObject(_0x53e0fb[_0x2b7e82(0x1f9)])?_0x53e0fb[_0x2b7e82(0x1f9)]:{};return{'id':_0x53e0fb[_0x2b7e82(0x1d4)]??_0x53e0fb['id']??_0x413123['datasetId']??null,'code':_0x53e0fb[_0x2b7e82(0x1ce)]??_0x53e0fb['code']??_0x413123[_0x2b7e82(0x205)]??_0x68c0c4,'name':_0x53e0fb['name']??_0x413123['datasetName']??null,'table':_0x26aef6['tableName']??_0x413123['tableName']??null,'db':_0x26aef6[_0x2b7e82(0x1dc)]??_0x26aef6['dbId']??null};}function mergePatchValue(_0x194cba,_0x56693c){if(isPlainObject(_0x194cba)&&isPlainObject(_0x56693c))return deepMerge(_0x194cba,_0x56693c);return deepClone(_0x56693c);}function deepMerge(_0x3536e5,_0x446861){const _0xf9cb50=a64_0x5f4047,_0x207d72=deepClone(_0x3536e5);for(const [_0x78343f,_0x5c1772]of Object[_0xf9cb50(0x1cb)](_0x446861)){_0x207d72[_0x78343f]=isPlainObject(_0x207d72[_0x78343f])&&isPlainObject(_0x5c1772)?deepMerge(_0x207d72[_0x78343f],_0x5c1772):deepClone(_0x5c1772);}return _0x207d72;}function collectChangedPaths(_0x5444a7,_0xfc84f1,_0x1b53ee,_0x12b754){const _0x39d7cf=a64_0x5f4047;if(!isPlainObject(_0xfc84f1)||!isPlainObject(_0x1b53ee))return;const _0xe40df5=new Set([...Object[_0x39d7cf(0x209)](_0xfc84f1),...Object[_0x39d7cf(0x209)](_0x1b53ee)]);for(const _0x468129 of _0xe40df5){const _0x397101=_0xfc84f1[_0x468129],_0x17c231=_0x1b53ee[_0x468129];!deepEqual(_0x397101,_0x17c231)&&_0x12b754['add'](_0x5444a7+'.'+_0x468129);}}function deepClone(_0x1dfdb1){const _0x99aafd=a64_0x5f4047;if(_0x1dfdb1===undefined)return _0x1dfdb1;return JSON[_0x99aafd(0x1c3)](JSON[_0x99aafd(0x1e6)](_0x1dfdb1));}function deepEqual(_0x50c1ee,_0x561082){const _0x2b5692=a64_0x5f4047;return JSON[_0x2b5692(0x1e6)](_0x50c1ee)===JSON['stringify'](_0x561082);}function isPlainObject(_0x158a85){const _0xe92bec=a64_0x5f4047;return Boolean(_0x158a85)&&typeof _0x158a85===_0xe92bec(0x1e5)&&!Array['isArray'](_0x158a85);}function emptyToUndefined(_0x13030e){const _0x929703=a64_0x5f4047,_0xfff539=String(_0x13030e||'')[_0x929703(0x1d9)]();return _0xfff539||undefined;}function trim(_0x525967){const _0x3dd535=a64_0x5f4047;return String(_0x525967||'')[_0x3dd535(0x1d9)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a65_0x36c3(){const _0x3ae090=['dataset.generate.status','reused','read','PENDING','SUCCESS','relations','Local\x20JSON\x20design\x20snapshot\x20created\x20by\x20dataset\x20generate-start\x20preview','Would\x20start\x20async\x20creation\x20of\x20one\x20new\x20METADATA\x20dataset\x20from\x20the\x20local\x20design\x20snapshot.','Would\x20request\x20a\x20dataset\x20design\x20preview\x20and\x20write\x20it\x20to\x20','toUpperCase','11akXgMu','bool','--design-output','datasetId','operation_failed','/smartapi/dataset/text-generate/status','toString','Preview\x20or\x20start\x20async\x20METADATA\x20dataset\x20generation\x20from\x20text','clientOperationId','modelCode','modelId','--description','trim','6DgVUnE','Local\x20JSON\x20file\x20path\x20for\x20the\x20generated\x20design\x20snapshot','dbtableConfig','Would\x20query\x20async\x20dataset\x20generation\x20operation\x20status.','set','generate-start','数据集生成任务等待执行','\x20--format\x20compress','test','design-output','requirementDescription','mode','isArray','tableName','properties','49665PehWXB','Preview\x20response\x20does\x20not\x20contain\x20a\x20dataset\x20design\x20object.','数据集生成任务执行中','--design-file\x20is\x20only\x20supported\x20with\x20--apply.','Generated\x20dataset\x20design\x20snapshot:\x20','--design-file\x20must\x20contain\x20a\x20JSON\x20object.','generate-status','write','39551nXbmgr','POST','Dataset\x20name\x20for\x20text-generated\x20METADATA\x20design\x20preview','appCode','\x20dataset\x20generate-status','designFile','fieldCount','createdDataset','1591780ZgXCAo','operation_pending','已提交数据集生成任务','name','status','Query\x20async\x20METADATA\x20dataset\x20generation\x20status','FAILED','number','RUNNING','数据集生成任务已结束,但未返回可识别的数据集信息','2zPRWPZ','--design-file','\x20is\x20required.','dataset.generate.start','errorMsg','compress','--name','description','string','/smartapi/dataset/text-generate/start','map','dataset','unknown_reconcile_failed','复用已有数据集生成任务','dataset-generate-','4178530ruiFyo','apply','4484934KldjRA','validation','PARTIAL_SUCCESS','code','utf8','123417QipXEv','operationId','数据集生成任务状态未知','currentStep','object','Async\x20operation\x20id\x20returned\x20by\x20dataset\x20generate-start','warnings','/smartapi/dataset/text-generate/preview','relationCount','CANCELLED','generatedDataset','message','\x20--operation-id\x20','design','preview','fields','datasetCode','datasetName','Generate\x20status\x20response\x20does\x20not\x20contain\x20a\x20created\x20dataset\x20object.','design-file','progressRate','GET','length','Review\x20the\x20design\x20snapshot,\x20then\x20run\x20this\x20command\x20to\x20submit\x20the\x20async\x20creation\x20task.','数据集生成任务失败','result','designOutput','nextAction','operation-id','RETRYING','--apply','284473uNTgIs','str','CANCELING','query_operation_status','filter','stringify','16WBSBTO','operation_running','数据集生成任务已完成'];a65_0x36c3=function(){return _0x3ae090;};return a65_0x36c3();}const a65_0x28dd97=a65_0x5a11;(function(_0x2f3131,_0x1bf819){const _0x5c4d65=a65_0x5a11,_0x4d0ad2=_0x2f3131();while(!![]){try{const _0x437435=-parseInt(_0x5c4d65(0xfc))/0x1*(parseInt(_0x5c4d65(0x10e))/0x2)+-parseInt(_0x5c4d65(0xe5))/0x3*(-parseInt(_0x5c4d65(0x104))/0x4)+-parseInt(_0x5c4d65(0xf4))/0x5+-parseInt(_0x5c4d65(0x11f))/0x6+parseInt(_0x5c4d65(0xc5))/0x7+-parseInt(_0x5c4d65(0xcb))/0x8*(parseInt(_0x5c4d65(0xa6))/0x9)+-parseInt(_0x5c4d65(0x11d))/0xa*(-parseInt(_0x5c4d65(0xd8))/0xb);if(_0x437435===_0x1bf819)break;else _0x4d0ad2['push'](_0x4d0ad2['shift']());}catch(_0x3e8913){_0x4d0ad2['push'](_0x4d0ad2['shift']());}}}(a65_0x36c3,0x68f9f));function a65_0x5a11(_0x3d292e,_0x2ea3d3){_0x3d292e=_0x3d292e-0xa4;const _0x36c3e7=a65_0x36c3();let _0x5a112b=_0x36c3e7[_0x3d292e];return _0x5a112b;}import{randomUUID}from'node:crypto';import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getTextGeneratedDatasetStatus,previewTextGeneratedDataset,startTextGeneratedDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PREVIEW_ENDPOINT=a65_0x28dd97(0xad),START_ENDPOINT=a65_0x28dd97(0x117),STATUS_ENDPOINT=a65_0x28dd97(0xdd),NAME_FLAG={'name':a65_0x28dd97(0x107),'type':'string','description':a65_0x28dd97(0xfe)},DESCRIPTION_FLAG={'name':a65_0x28dd97(0x115),'type':a65_0x28dd97(0x116),'description':'Natural\x20language\x20requirement\x20for\x20dataset\x20generation'},DESIGN_OUTPUT_FLAG={'name':a65_0x28dd97(0xee),'type':a65_0x28dd97(0x116),'description':a65_0x28dd97(0xe6)},APPLY_FLAG={'name':a65_0x28dd97(0x11e),'type':'boolean','description':'Start\x20async\x20dataset\x20generation\x20from\x20--design-file'},DESIGN_FILE_FLAG={'name':a65_0x28dd97(0xb9),'type':a65_0x28dd97(0x116),'description':a65_0x28dd97(0xd4)},OPERATION_ID_FLAG={'name':a65_0x28dd97(0xc2),'type':a65_0x28dd97(0x116),'description':a65_0x28dd97(0xab)},CLIENT_OPERATION_ID_FLAG={'name':'client-operation-id','type':a65_0x28dd97(0x116),'description':'Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'};export const datasetGenerateStart={'service':a65_0x28dd97(0x119),'command':a65_0x28dd97(0xea),'description':a65_0x28dd97(0xdf),'risk':a65_0x28dd97(0xfb),'defaultOutputFormat':a65_0x28dd97(0x113),'flags':[NAME_FLAG,DESCRIPTION_FLAG,DESIGN_OUTPUT_FLAG,APPLY_FLAG,DESIGN_FILE_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23ac5a){readStartInput(_0x23ac5a);},async 'dryRun'(_0xbb11a3){const _0x145f34=a65_0x28dd97,_0x20ec37=readStartInput(_0xbb11a3);if(_0x20ec37[_0x145f34(0xf0)]==='apply'){const _0x1dd054=await readDesignFile(_0x20ec37['designFile']),_0x26da95=createDatasetGenerateClientOperationId();return{'method':_0x145f34(0xfd),'url':START_ENDPOINT,'body':{'appCode':_0xbb11a3[_0x145f34(0xff)],'clientOperationId':_0x26da95,'design':_0x1dd054},'description':_0x145f34(0xd5)};}return{'method':'POST','url':PREVIEW_ENDPOINT,'body':{'appCode':_0xbb11a3[_0x145f34(0xff)],'datasetName':_0x20ec37['datasetName'],'requirementDescription':_0x20ec37[_0x145f34(0xef)]},'description':_0x145f34(0xd6)+_0x20ec37[_0x145f34(0xc0)]+'.'};},async 'execute'(_0x5a5dbc){const _0x47dfc7=a65_0x28dd97,_0x1d7b7a=readStartInput(_0x5a5dbc);if(_0x1d7b7a[_0x47dfc7(0xf0)]==='apply'){const _0x2aa77e=await readDesignFile(_0x1d7b7a[_0x47dfc7(0x101)]),_0x235ce2=createDatasetGenerateClientOperationId(),_0x3b2d64=await startTextGeneratedDataset(_0x5a5dbc[_0x47dfc7(0xff)],_0x2aa77e,{'clientOperationId':_0x235ce2}),_0x58772c=stringOrUndefined(_0x3b2d64[_0x47dfc7(0xa7)]),_0xf4b921=stringOrUndefined(_0x3b2d64[_0x47dfc7(0xe0)])??_0x235ce2,_0x49396e=assessDatasetGenerateState(_0x3b2d64['status'],extractCreatedDataset(_0x3b2d64));return{'ok':!![],'message':_0x3b2d64[_0x47dfc7(0xcf)]?_0x47dfc7(0x11b):_0x47dfc7(0x106),'data':{'operation':_0x47dfc7(0x111),'appCode':_0x5a5dbc['appCode'],'operationId':_0x58772c??null,'clientOperationId':_0xf4b921,'jobStatus':_0x3b2d64[_0x47dfc7(0x108)]??null,'progressRate':typeof _0x3b2d64[_0x47dfc7(0xba)]===_0x47dfc7(0x10b)?_0x3b2d64[_0x47dfc7(0xba)]:null,'currentStep':_0x3b2d64[_0x47dfc7(0xa9)]??null,'reused':_0x3b2d64[_0x47dfc7(0xcf)]===!![],'status':_0x49396e[_0x47dfc7(0x108)],'nextAction':_0x49396e['nextAction'],'query':{'command':buildDatasetGenerateStatusQueryCommand({'operationId':_0x58772c,'clientOperationId':_0xf4b921})}}};}const _0x5089f1=await previewTextGeneratedDataset(_0x5a5dbc[_0x47dfc7(0xff)],{'datasetName':_0x1d7b7a[_0x47dfc7(0xb7)],'requirementDescription':_0x1d7b7a[_0x47dfc7(0xef)]}),_0x577a5e=extractDesign(_0x5089f1);return await writeDesignFile(_0x1d7b7a[_0x47dfc7(0xc0)],_0x577a5e),{'ok':!![],'message':_0x47dfc7(0xf8)+_0x1d7b7a[_0x47dfc7(0xc0)],'data':{'operation':'dataset.generate.preview','input':{'appCode':_0x5a5dbc[_0x47dfc7(0xff)],'datasetName':_0x1d7b7a[_0x47dfc7(0xb7)],'requirementDescription':_0x1d7b7a[_0x47dfc7(0xef)]},'design':_0x577a5e,'designFile':_0x1d7b7a[_0x47dfc7(0xc0)],'warnings':normalizeWarnings(_0x5089f1),'nextAction':{'command':CLI_BIN_NAME+'\x20dataset\x20generate-start\x20--apply\x20--design-file\x20'+quoteCliValue(_0x1d7b7a['designOutput'])+_0x47dfc7(0xec),'description':_0x47dfc7(0xbd)}}};}};export const datasetGenerateStatus={'service':a65_0x28dd97(0x119),'command':a65_0x28dd97(0xfa),'description':a65_0x28dd97(0x109),'risk':a65_0x28dd97(0xd0),'defaultOutputFormat':a65_0x28dd97(0x113),'flags':[OPERATION_ID_FLAG,CLIENT_OPERATION_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c290e){readStatusInput(_0x4c290e);},async 'dryRun'(_0x4276c5){const _0x26d20a=a65_0x28dd97,_0x534eef=readStatusInput(_0x4276c5),_0x3213cb=new URLSearchParams({'appCode':_0x4276c5[_0x26d20a(0xff)]});if(_0x534eef[_0x26d20a(0xa7)])_0x3213cb[_0x26d20a(0xe9)](_0x26d20a(0xa7),_0x534eef['operationId']);else _0x534eef['clientOperationId']&&_0x3213cb['set'](_0x26d20a(0xe0),_0x534eef[_0x26d20a(0xe0)]);return{'method':_0x26d20a(0xbb),'url':STATUS_ENDPOINT+'?'+_0x3213cb[_0x26d20a(0xde)](),'description':_0x26d20a(0xe8)};},async 'execute'(_0x2bd1b4){const _0x538815=a65_0x28dd97,_0x4d941c=readStatusInput(_0x2bd1b4),_0x9ef332=await getTextGeneratedDatasetStatus(_0x2bd1b4[_0x538815(0xff)],_0x4d941c),_0x17780a=stringOrUndefined(_0x9ef332['operationId'])??_0x4d941c[_0x538815(0xa7)],_0x571e44=stringOrUndefined(_0x9ef332['clientOperationId'])??_0x4d941c[_0x538815(0xe0)],_0x53da66=extractCreatedDataset(_0x9ef332),_0x26cac3=assessDatasetGenerateState(_0x9ef332['status'],_0x53da66),_0x613c66={'operation':_0x538815(0xce),'appCode':_0x2bd1b4[_0x538815(0xff)],'operationId':_0x17780a??null,'clientOperationId':_0x571e44??null,'jobStatus':_0x9ef332[_0x538815(0x108)]??null,'progressRate':typeof _0x9ef332[_0x538815(0xba)]==='number'?_0x9ef332['progressRate']:null,'currentStep':_0x9ef332['currentStep']??null,'errorMsg':_0x9ef332[_0x538815(0x112)]??null,'status':_0x26cac3[_0x538815(0x108)],'nextAction':_0x26cac3[_0x538815(0xc1)],'query':{'command':buildDatasetGenerateStatusQueryCommand({'operationId':_0x17780a,'clientOperationId':_0x571e44})}};return _0x26cac3['status']==='generated_dataset_created'&&_0x53da66&&(_0x613c66[_0x538815(0x103)]=_0x53da66),{'ok':!![],'message':_0x26cac3[_0x538815(0x108)]===_0x538815(0xdc)?_0x9ef332[_0x538815(0x112)]||_0x26cac3[_0x538815(0xb1)]:_0x26cac3[_0x538815(0xb1)],'data':_0x613c66};}};function readStartInput(_0x53a7c7){const _0xa0b8e3=a65_0x28dd97,_0x58d14f=_0x53a7c7[_0xa0b8e3(0xd9)]('apply'),_0x551b89=trim(_0x53a7c7['str'](_0xa0b8e3(0x107))),_0x42328f=trim(_0x53a7c7[_0xa0b8e3(0xc6)](_0xa0b8e3(0x115))),_0xffe828=trim(_0x53a7c7[_0xa0b8e3(0xc6)](_0xa0b8e3(0xee))),_0x287cd9=trim(_0x53a7c7[_0xa0b8e3(0xc6)]('design-file'));if(_0x58d14f)return rejectPresent(_0x551b89,_0xa0b8e3(0x114),_0xa0b8e3(0xc4)),rejectPresent(_0x42328f,_0xa0b8e3(0xe3),_0xa0b8e3(0xc4)),rejectPresent(_0xffe828,'--design-output','--apply'),required(_0x287cd9,_0xa0b8e3(0x10f)),{'mode':'apply','designFile':_0x287cd9};if(_0x287cd9)throw CliErrors['validation'](_0xa0b8e3(0xf7));return required(_0x551b89,_0xa0b8e3(0x114)),required(_0x42328f,'--description'),required(_0xffe828,_0xa0b8e3(0xda)),{'mode':_0xa0b8e3(0xb4),'datasetName':_0x551b89,'requirementDescription':_0x42328f,'designOutput':_0xffe828};}function readStatusInput(_0x275fb0){const _0x733a0b=a65_0x28dd97,_0x30c74f=trim(_0x275fb0[_0x733a0b(0xc6)]('operation-id')),_0x533918=trim(_0x275fb0['str']('client-operation-id'));if(_0x30c74f&&_0x533918)throw CliErrors[_0x733a0b(0x120)]('Use\x20only\x20one\x20of\x20--operation-id\x20or\x20--client-operation-id.');if(!_0x30c74f&&!_0x533918)throw CliErrors[_0x733a0b(0x120)]('--operation-id\x20or\x20--client-operation-id\x20is\x20required.');return _0x30c74f?{'operationId':_0x30c74f}:{'clientOperationId':_0x533918};}async function writeDesignFile(_0x3c017c,_0x10d077){const _0x1576b7=resolve(_0x3c017c);await mkdir(dirname(_0x1576b7),{'recursive':!![]}),await writeFile(_0x1576b7,JSON['stringify'](_0x10d077,null,0x2)+'\x0a','utf8');}async function readDesignFile(_0x1d396a){const _0x3036ee=a65_0x28dd97;let _0x1734ea;try{_0x1734ea=await readFile(resolve(_0x1d396a),_0x3036ee(0xa5));}catch(_0xf873db){const _0xac6b7d=_0xf873db instanceof Error?_0xf873db[_0x3036ee(0xb1)]:String(_0xf873db);throw CliErrors[_0x3036ee(0x120)]('Cannot\x20read\x20--design-file:\x20'+_0x1d396a,_0xac6b7d);}let _0x1ec522;try{_0x1ec522=JSON['parse'](_0x1734ea);}catch(_0x29f3dc){const _0x2372e6=_0x29f3dc instanceof Error?_0x29f3dc[_0x3036ee(0xb1)]:String(_0x29f3dc);throw CliErrors[_0x3036ee(0x120)]('Invalid\x20JSON\x20in\x20--design-file:\x20'+_0x1d396a,_0x2372e6);}if(!isPlainObject(_0x1ec522))throw CliErrors[_0x3036ee(0x120)](_0x3036ee(0xf9));return _0x1ec522;}function extractDesign(_0x5697fe){const _0x344244=a65_0x28dd97;if(isPlainObject(_0x5697fe)&&isPlainObject(_0x5697fe['design']))return _0x5697fe[_0x344244(0xb3)];if(isPlainObject(_0x5697fe))return _0x5697fe;throw CliErrors[_0x344244(0x120)](_0x344244(0xf5));}function extractCreatedDataset(_0x301887){const _0xd14357=a65_0x28dd97;if(!isPlainObject(_0x301887))return null;const _0x3bc07a=firstPlainObject(_0x301887[_0xd14357(0x103)],_0x301887[_0xd14357(0x119)],_0x301887[_0xd14357(0xb0)]);if(_0x3bc07a)return projectCreatedDataset(_0x3bc07a);if(isPlainObject(_0x301887[_0xd14357(0xbf)])){const _0x37951a=firstPlainObject(_0x301887['result'][_0xd14357(0x103)],_0x301887['result'][_0xd14357(0x119)],_0x301887[_0xd14357(0xbf)][_0xd14357(0xb0)]);if(_0x37951a)return projectCreatedDataset(_0x37951a);}return null;}function projectCreatedDataset(_0x1c1d3b){const _0x26e55d=a65_0x28dd97,_0x359e4a=isPlainObject(_0x1c1d3b)&&isPlainObject(_0x1c1d3b['dataset'])?_0x1c1d3b[_0x26e55d(0x119)]:isPlainObject(_0x1c1d3b)&&isPlainObject(_0x1c1d3b[_0x26e55d(0x103)])?_0x1c1d3b['createdDataset']:_0x1c1d3b;if(!isPlainObject(_0x359e4a))throw CliErrors['validation'](_0x26e55d(0xb8));const _0x23bcea=Array[_0x26e55d(0xf1)](_0x359e4a[_0x26e55d(0xb5)])?_0x359e4a[_0x26e55d(0xb5)]:Array[_0x26e55d(0xf1)](_0x359e4a[_0x26e55d(0xf3)])?_0x359e4a[_0x26e55d(0xf3)]:[],_0x92da68=Array[_0x26e55d(0xf1)](_0x359e4a[_0x26e55d(0xd3)])?_0x359e4a[_0x26e55d(0xd3)]:[],_0x51b32a=numberOrUndefined(_0x359e4a[_0x26e55d(0x102)])??_0x23bcea[_0x26e55d(0xbc)],_0x8e6d4f=numberOrUndefined(_0x359e4a[_0x26e55d(0xae)])??_0x92da68[_0x26e55d(0xbc)];return{'id':_0x359e4a['id']??_0x359e4a[_0x26e55d(0xdb)]??_0x359e4a[_0x26e55d(0xe2)]??null,'code':_0x359e4a[_0x26e55d(0xa4)]??_0x359e4a[_0x26e55d(0xb6)]??_0x359e4a[_0x26e55d(0xe1)]??null,'name':_0x359e4a['name']??_0x359e4a['datasetName']??_0x359e4a['modelName']??null,'tableName':_0x359e4a[_0x26e55d(0xf2)]??(isPlainObject(_0x359e4a[_0x26e55d(0xe7)])?_0x359e4a[_0x26e55d(0xe7)][_0x26e55d(0xf2)]:undefined)??null,'fieldCount':_0x51b32a,'relationCount':_0x8e6d4f};}function assessDatasetGenerateState(_0x3d6625,_0x564642){const _0x3bc885=a65_0x28dd97,_0x827f3c=typeof _0x3d6625===_0x3bc885(0x116)?_0x3d6625[_0x3bc885(0xd7)]():'';if(_0x827f3c===_0x3bc885(0xd1))return{'status':_0x3bc885(0x105),'nextAction':_0x3bc885(0xc8),'message':_0x3bc885(0xeb)};if(_0x827f3c===_0x3bc885(0x10c)||_0x827f3c===_0x3bc885(0xc3)||_0x827f3c===_0x3bc885(0xc7))return{'status':_0x3bc885(0xcc),'nextAction':_0x3bc885(0xc8),'message':_0x3bc885(0xf6)};if(_0x827f3c===_0x3bc885(0xd2)||_0x827f3c===_0x3bc885(0x121)){if(_0x564642)return{'status':'generated_dataset_created','nextAction':null,'message':_0x3bc885(0xcd)};return{'status':_0x3bc885(0x11a),'nextAction':_0x3bc885(0xc8),'message':_0x3bc885(0x10d)};}if(_0x827f3c===_0x3bc885(0x10a)||_0x827f3c===_0x3bc885(0xaf))return{'status':_0x3bc885(0xdc),'nextAction':null,'message':_0x3bc885(0xbe)};return{'status':_0x3bc885(0x11a),'nextAction':_0x3bc885(0xc8),'message':_0x3bc885(0xa8)};}function buildDatasetGenerateStatusQueryCommand(_0x213eeb){const _0x315caa=a65_0x28dd97,_0x37bd4c=_0x213eeb?.[_0x315caa(0xa7)]&&_0x213eeb[_0x315caa(0xa7)][_0x315caa(0xe4)]()?_0x315caa(0xb2)+quoteCliValue(_0x213eeb[_0x315caa(0xa7)]):_0x213eeb?.[_0x315caa(0xe0)]&&_0x213eeb['clientOperationId']['trim']()?'\x20--client-operation-id\x20'+quoteCliValue(_0x213eeb[_0x315caa(0xe0)]):'';return CLI_BIN_NAME+_0x315caa(0x100)+_0x37bd4c+_0x315caa(0xec);}function createDatasetGenerateClientOperationId(){const _0x3019db=a65_0x28dd97;return _0x3019db(0x11c)+randomUUID();}function normalizeWarnings(_0x396792){const _0x4944cc=a65_0x28dd97;if(!isPlainObject(_0x396792)||!Array['isArray'](_0x396792[_0x4944cc(0xac)]))return[];return _0x396792['warnings'][_0x4944cc(0xc9)](_0x401a4f=>typeof _0x401a4f===_0x4944cc(0x116))[_0x4944cc(0x118)](_0x4cf3e1=>_0x4cf3e1[_0x4944cc(0xe4)]())[_0x4944cc(0xc9)](Boolean);}function required(_0x3bc09e,_0x4886fe){const _0x4e5fdf=a65_0x28dd97;if(!_0x3bc09e)throw CliErrors[_0x4e5fdf(0x120)](_0x4886fe+_0x4e5fdf(0x110));}function rejectPresent(_0x2340b7,_0x1e1c3b,_0x8fc949){const _0xa81070=a65_0x28dd97;if(_0x2340b7)throw CliErrors[_0xa81070(0x120)](_0x1e1c3b+'\x20is\x20not\x20supported\x20with\x20'+_0x8fc949+'.');}function trim(_0x466448){const _0x4a43a7=a65_0x28dd97;return _0x466448?.[_0x4a43a7(0xe4)]()??'';}function isPlainObject(_0x20a243){const _0x2aa889=a65_0x28dd97;return Boolean(_0x20a243)&&typeof _0x20a243===_0x2aa889(0xaa)&&!Array[_0x2aa889(0xf1)](_0x20a243);}function firstPlainObject(..._0x382b74){for(const _0x56c270 of _0x382b74){if(isPlainObject(_0x56c270))return _0x56c270;}return null;}function stringOrUndefined(_0xf3ec15){const _0x301425=a65_0x28dd97;return typeof _0xf3ec15===_0x301425(0x116)&&_0xf3ec15['trim']()?_0xf3ec15:undefined;}function numberOrUndefined(_0x4ce954){const _0xd043b1=a65_0x28dd97;return typeof _0x4ce954===_0xd043b1(0x10b)&&Number['isFinite'](_0x4ce954)?_0x4ce954:undefined;}function quoteCliValue(_0x2057f1){const _0x3f82c2=a65_0x28dd97;return/^[A-Za-z0-9_./:@=-]+$/[_0x3f82c2(0xed)](_0x2057f1)?_0x2057f1:JSON[_0x3f82c2(0xca)](_0x2057f1);}
|
|
1
|
+
const a65_0x268e81=a65_0x4c4d;function a65_0x4c4d(_0x2e139d,_0x1026d5){_0x2e139d=_0x2e139d-0xb8;const _0xb8d4b4=a65_0xb8d4();let _0x4c4d82=_0xb8d4b4[_0x2e139d];return _0x4c4d82;}(function(_0x25edf2,_0x3f4725){const _0x2626ce=a65_0x4c4d,_0x41435c=_0x25edf2();while(!![]){try{const _0x11a59a=-parseInt(_0x2626ce(0x125))/0x1+-parseInt(_0x2626ce(0xf7))/0x2*(-parseInt(_0x2626ce(0x126))/0x3)+parseInt(_0x2626ce(0x107))/0x4*(-parseInt(_0x2626ce(0x111))/0x5)+-parseInt(_0x2626ce(0xca))/0x6+parseInt(_0x2626ce(0x12c))/0x7*(-parseInt(_0x2626ce(0xfb))/0x8)+parseInt(_0x2626ce(0xd3))/0x9*(parseInt(_0x2626ce(0xec))/0xa)+parseInt(_0x2626ce(0x123))/0xb;if(_0x11a59a===_0x3f4725)break;else _0x41435c['push'](_0x41435c['shift']());}catch(_0x1f6f65){_0x41435c['push'](_0x41435c['shift']());}}}(a65_0xb8d4,0xddf9b));import{randomUUID}from'node:crypto';import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getTextGeneratedDatasetStatus,previewTextGeneratedDataset,startTextGeneratedDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PREVIEW_ENDPOINT=a65_0x268e81(0x105),START_ENDPOINT=a65_0x268e81(0x129),STATUS_ENDPOINT=a65_0x268e81(0xd8),NAME_FLAG={'name':a65_0x268e81(0xdb),'type':a65_0x268e81(0x116),'description':a65_0x268e81(0x110)},DESCRIPTION_FLAG={'name':a65_0x268e81(0x124),'type':a65_0x268e81(0x116),'description':a65_0x268e81(0x11f)},DESIGN_OUTPUT_FLAG={'name':a65_0x268e81(0xc2),'type':'string','description':a65_0x268e81(0xdf)},APPLY_FLAG={'name':a65_0x268e81(0xc4),'type':a65_0x268e81(0xbc),'description':'Start\x20async\x20dataset\x20generation\x20from\x20--design-file'},DESIGN_FILE_FLAG={'name':a65_0x268e81(0x10f),'type':a65_0x268e81(0x116),'description':a65_0x268e81(0x117)},OPERATION_ID_FLAG={'name':'operation-id','type':a65_0x268e81(0x116),'description':'Async\x20operation\x20id\x20returned\x20by\x20dataset\x20generate-start'},CLIENT_OPERATION_ID_FLAG={'name':'client-operation-id','type':a65_0x268e81(0x116),'description':a65_0x268e81(0xed)};export const datasetGenerateStart={'service':'dataset','command':a65_0x268e81(0xd2),'description':a65_0x268e81(0xe1),'risk':a65_0x268e81(0x12b),'defaultOutputFormat':a65_0x268e81(0x10c),'flags':[NAME_FLAG,DESCRIPTION_FLAG,DESIGN_OUTPUT_FLAG,APPLY_FLAG,DESIGN_FILE_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5a87b3){readStartInput(_0x5a87b3);},async 'dryRun'(_0x5d3657){const _0x39cd74=a65_0x268e81,_0x36d828=readStartInput(_0x5d3657);if(_0x36d828[_0x39cd74(0x113)]===_0x39cd74(0xc4)){const _0xf2654=await readDesignFile(_0x36d828[_0x39cd74(0xe0)]),_0x1c412a=createDatasetGenerateClientOperationId();return{'method':_0x39cd74(0x10a),'url':START_ENDPOINT,'body':{'appCode':_0x5d3657[_0x39cd74(0xbb)],'clientOperationId':_0x1c412a,'design':_0xf2654},'description':_0x39cd74(0x108)};}return{'method':_0x39cd74(0x10a),'url':PREVIEW_ENDPOINT,'body':{'appCode':_0x5d3657[_0x39cd74(0xbb)],'datasetName':_0x36d828['datasetName'],'requirementDescription':_0x36d828[_0x39cd74(0xc7)]},'description':_0x39cd74(0x128)+_0x36d828['designOutput']+'.'};},async 'execute'(_0x174929){const _0x54e9bb=a65_0x268e81,_0x1b2d8a=readStartInput(_0x174929);if(_0x1b2d8a[_0x54e9bb(0x113)]==='apply'){const _0x224d74=await readDesignFile(_0x1b2d8a[_0x54e9bb(0xe0)]),_0x373b35=createDatasetGenerateClientOperationId(),_0x3848f6=await startTextGeneratedDataset(_0x174929['appCode'],_0x224d74,{'clientOperationId':_0x373b35}),_0x10db21=stringOrUndefined(_0x3848f6[_0x54e9bb(0x114)]),_0x2a4702=stringOrUndefined(_0x3848f6['clientOperationId'])??_0x373b35,_0xe77e75=assessDatasetGenerateState(_0x3848f6[_0x54e9bb(0x10d)],extractCreatedDataset(_0x3848f6));return{'ok':!![],'message':_0x3848f6[_0x54e9bb(0x115)]?_0x54e9bb(0xc3):_0x54e9bb(0xf8),'data':{'operation':'dataset.generate.start','appCode':_0x174929[_0x54e9bb(0xbb)],'operationId':_0x10db21??null,'clientOperationId':_0x2a4702,'jobStatus':_0x3848f6[_0x54e9bb(0x10d)]??null,'progressRate':typeof _0x3848f6[_0x54e9bb(0xbf)]==='number'?_0x3848f6[_0x54e9bb(0xbf)]:null,'currentStep':_0x3848f6['currentStep']??null,'reused':_0x3848f6['reused']===!![],'status':_0xe77e75[_0x54e9bb(0x10d)],'nextAction':_0xe77e75[_0x54e9bb(0xfa)],'query':{'command':buildDatasetGenerateStatusQueryCommand({'operationId':_0x10db21,'clientOperationId':_0x2a4702})}}};}const _0x488951=await previewTextGeneratedDataset(_0x174929[_0x54e9bb(0xbb)],{'datasetName':_0x1b2d8a[_0x54e9bb(0x119)],'requirementDescription':_0x1b2d8a['requirementDescription']}),_0xdc9ae6=extractDesign(_0x488951);return await writeDesignFile(_0x1b2d8a['designOutput'],_0xdc9ae6),{'ok':!![],'message':_0x54e9bb(0xb9)+_0x1b2d8a['designOutput'],'data':{'operation':_0x54e9bb(0xfe),'input':{'appCode':_0x174929[_0x54e9bb(0xbb)],'datasetName':_0x1b2d8a[_0x54e9bb(0x119)],'requirementDescription':_0x1b2d8a['requirementDescription']},'design':_0xdc9ae6,'designFile':_0x1b2d8a[_0x54e9bb(0x112)],'warnings':normalizeWarnings(_0x488951),'nextAction':{'command':CLI_BIN_NAME+_0x54e9bb(0x118)+quoteCliValue(_0x1b2d8a['designOutput'])+_0x54e9bb(0x122),'description':_0x54e9bb(0x103)}}};}};export const datasetGenerateStatus={'service':'dataset','command':a65_0x268e81(0xbd),'description':'Query\x20async\x20METADATA\x20dataset\x20generation\x20status','risk':'read','defaultOutputFormat':a65_0x268e81(0x10c),'flags':[OPERATION_ID_FLAG,CLIENT_OPERATION_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5cbbb2){readStatusInput(_0x5cbbb2);},async 'dryRun'(_0x34957d){const _0x350875=a65_0x268e81,_0x334971=readStatusInput(_0x34957d),_0x3661dd=new URLSearchParams({'appCode':_0x34957d['appCode']});if(_0x334971[_0x350875(0x114)])_0x3661dd[_0x350875(0xba)](_0x350875(0x114),_0x334971[_0x350875(0x114)]);else _0x334971[_0x350875(0x11b)]&&_0x3661dd[_0x350875(0xba)](_0x350875(0x11b),_0x334971[_0x350875(0x11b)]);return{'method':_0x350875(0xd1),'url':STATUS_ENDPOINT+'?'+_0x3661dd[_0x350875(0xde)](),'description':'Would\x20query\x20async\x20dataset\x20generation\x20operation\x20status.'};},async 'execute'(_0x192e93){const _0x380b10=a65_0x268e81,_0x58c39e=readStatusInput(_0x192e93),_0x35079c=await getTextGeneratedDatasetStatus(_0x192e93['appCode'],_0x58c39e),_0x37cd9f=stringOrUndefined(_0x35079c[_0x380b10(0x114)])??_0x58c39e['operationId'],_0x374383=stringOrUndefined(_0x35079c[_0x380b10(0x11b)])??_0x58c39e['clientOperationId'],_0x7aa25f=extractCreatedDataset(_0x35079c),_0x29c57b=assessDatasetGenerateState(_0x35079c[_0x380b10(0x10d)],_0x7aa25f),_0x102366={'operation':'dataset.generate.status','appCode':_0x192e93['appCode'],'operationId':_0x37cd9f??null,'clientOperationId':_0x374383??null,'jobStatus':_0x35079c[_0x380b10(0x10d)]??null,'progressRate':typeof _0x35079c[_0x380b10(0xbf)]===_0x380b10(0x106)?_0x35079c['progressRate']:null,'currentStep':_0x35079c[_0x380b10(0xce)]??null,'errorMsg':_0x35079c[_0x380b10(0xf6)]??null,'status':_0x29c57b[_0x380b10(0x10d)],'nextAction':_0x29c57b[_0x380b10(0xfa)],'query':{'command':buildDatasetGenerateStatusQueryCommand({'operationId':_0x37cd9f,'clientOperationId':_0x374383})}};return _0x29c57b[_0x380b10(0x10d)]==='generated_dataset_created'&&_0x7aa25f&&(_0x102366[_0x380b10(0x10b)]=_0x7aa25f),{'ok':!![],'message':_0x29c57b['status']===_0x380b10(0xf4)?_0x35079c[_0x380b10(0xf6)]||_0x29c57b[_0x380b10(0xcb)]:_0x29c57b['message'],'data':_0x102366};}};function readStartInput(_0x1e556d){const _0x1d3349=a65_0x268e81,_0x3c077e=_0x1e556d[_0x1d3349(0xe4)](_0x1d3349(0xc4)),_0x4117f1=trim(_0x1e556d['str'](_0x1d3349(0xdb))),_0x70f43f=trim(_0x1e556d[_0x1d3349(0xb8)]('description')),_0x354da3=trim(_0x1e556d[_0x1d3349(0xb8)](_0x1d3349(0xc2))),_0x4b8643=trim(_0x1e556d[_0x1d3349(0xb8)](_0x1d3349(0x10f)));if(_0x3c077e)return rejectPresent(_0x4117f1,_0x1d3349(0x100),_0x1d3349(0xbe)),rejectPresent(_0x70f43f,_0x1d3349(0xea),'--apply'),rejectPresent(_0x354da3,_0x1d3349(0x101),_0x1d3349(0xbe)),required(_0x4b8643,_0x1d3349(0xfd)),{'mode':'apply','designFile':_0x4b8643};if(_0x4b8643)throw CliErrors[_0x1d3349(0xe9)](_0x1d3349(0xf9));return required(_0x4117f1,_0x1d3349(0x100)),required(_0x70f43f,'--description'),required(_0x354da3,'--design-output'),{'mode':_0x1d3349(0xf5),'datasetName':_0x4117f1,'requirementDescription':_0x70f43f,'designOutput':_0x354da3};}function readStatusInput(_0x1873c1){const _0x42339b=a65_0x268e81,_0x201aa1=trim(_0x1873c1[_0x42339b(0xb8)](_0x42339b(0xf2))),_0x32b739=trim(_0x1873c1[_0x42339b(0xb8)]('client-operation-id'));if(_0x201aa1&&_0x32b739)throw CliErrors[_0x42339b(0xe9)](_0x42339b(0x12a));if(!_0x201aa1&&!_0x32b739)throw CliErrors[_0x42339b(0xe9)](_0x42339b(0xcd));return _0x201aa1?{'operationId':_0x201aa1}:{'clientOperationId':_0x32b739};}async function writeDesignFile(_0x3fa17f,_0x4c2330){const _0x3e6774=a65_0x268e81,_0x5c5010=resolve(_0x3fa17f);await mkdir(dirname(_0x5c5010),{'recursive':!![]}),await writeFile(_0x5c5010,JSON[_0x3e6774(0x11a)](_0x4c2330,null,0x2)+'\x0a',_0x3e6774(0xe7));}async function readDesignFile(_0x3345a9){const _0xf133cc=a65_0x268e81;let _0x50c34b;try{_0x50c34b=await readFile(resolve(_0x3345a9),'utf8');}catch(_0x10ad2b){const _0xd2c946=_0x10ad2b instanceof Error?_0x10ad2b[_0xf133cc(0xcb)]:String(_0x10ad2b);throw CliErrors[_0xf133cc(0xe9)](_0xf133cc(0x109)+_0x3345a9,_0xd2c946);}let _0x5d3a5f;try{_0x5d3a5f=JSON['parse'](_0x50c34b);}catch(_0x35dd8a){const _0x42da99=_0x35dd8a instanceof Error?_0x35dd8a['message']:String(_0x35dd8a);throw CliErrors['validation']('Invalid\x20JSON\x20in\x20--design-file:\x20'+_0x3345a9,_0x42da99);}if(!isPlainObject(_0x5d3a5f))throw CliErrors['validation'](_0xf133cc(0x11e));return _0x5d3a5f;}function extractDesign(_0x1cf570){const _0x3c8d5b=a65_0x268e81;if(isPlainObject(_0x1cf570)&&isPlainObject(_0x1cf570[_0x3c8d5b(0xf0)]))return _0x1cf570[_0x3c8d5b(0xf0)];if(isPlainObject(_0x1cf570))return _0x1cf570;throw CliErrors[_0x3c8d5b(0xe9)](_0x3c8d5b(0xff));}function extractCreatedDataset(_0x54551e){const _0x734f35=a65_0x268e81;if(!isPlainObject(_0x54551e))return null;const _0x13203f=firstPlainObject(_0x54551e[_0x734f35(0x10b)],_0x54551e[_0x734f35(0xdd)],_0x54551e['generatedDataset']);if(_0x13203f)return projectCreatedDataset(_0x13203f);if(isPlainObject(_0x54551e[_0x734f35(0xd5)])){const _0x7a4e5c=firstPlainObject(_0x54551e['result'][_0x734f35(0x10b)],_0x54551e[_0x734f35(0xd5)]['dataset'],_0x54551e['result'][_0x734f35(0xc1)]);if(_0x7a4e5c)return projectCreatedDataset(_0x7a4e5c);}return null;}function projectCreatedDataset(_0x14aae5){const _0x3072bd=a65_0x268e81,_0x40366a=isPlainObject(_0x14aae5)&&isPlainObject(_0x14aae5['dataset'])?_0x14aae5[_0x3072bd(0xdd)]:isPlainObject(_0x14aae5)&&isPlainObject(_0x14aae5[_0x3072bd(0x10b)])?_0x14aae5['createdDataset']:_0x14aae5;if(!isPlainObject(_0x40366a))throw CliErrors[_0x3072bd(0xe9)](_0x3072bd(0xd4));const _0x4fcad9=Array[_0x3072bd(0xef)](_0x40366a[_0x3072bd(0x102)])?_0x40366a[_0x3072bd(0x102)]:Array['isArray'](_0x40366a[_0x3072bd(0x121)])?_0x40366a['properties']:[],_0x44b11e=Array['isArray'](_0x40366a['relations'])?_0x40366a[_0x3072bd(0xfc)]:[],_0x1e2157=numberOrUndefined(_0x40366a[_0x3072bd(0x11d)])??_0x4fcad9[_0x3072bd(0xe5)],_0xb51b0c=numberOrUndefined(_0x40366a[_0x3072bd(0xc9)])??_0x44b11e[_0x3072bd(0xe5)];return{'id':_0x40366a['id']??_0x40366a[_0x3072bd(0xdc)]??_0x40366a['modelId']??null,'code':_0x40366a['code']??_0x40366a[_0x3072bd(0xee)]??_0x40366a[_0x3072bd(0x10e)]??null,'name':_0x40366a[_0x3072bd(0xdb)]??_0x40366a[_0x3072bd(0x119)]??_0x40366a[_0x3072bd(0xf1)]??null,'tableName':_0x40366a[_0x3072bd(0xc5)]??(isPlainObject(_0x40366a['dbtableConfig'])?_0x40366a[_0x3072bd(0x120)][_0x3072bd(0xc5)]:undefined)??null,'fieldCount':_0x1e2157,'relationCount':_0xb51b0c};}function assessDatasetGenerateState(_0x93d65e,_0x12cec6){const _0x3504f0=a65_0x268e81,_0x237e9e=typeof _0x93d65e===_0x3504f0(0x116)?_0x93d65e[_0x3504f0(0x104)]():'';if(_0x237e9e==='PENDING')return{'status':_0x3504f0(0x11c),'nextAction':_0x3504f0(0x127),'message':'数据集生成任务等待执行'};if(_0x237e9e==='RUNNING'||_0x237e9e==='RETRYING'||_0x237e9e===_0x3504f0(0xe3))return{'status':'operation_running','nextAction':_0x3504f0(0x127),'message':'数据集生成任务执行中'};if(_0x237e9e===_0x3504f0(0xeb)||_0x237e9e===_0x3504f0(0xf3)){if(_0x12cec6)return{'status':_0x3504f0(0xc0),'nextAction':null,'message':'数据集生成任务已完成'};return{'status':_0x3504f0(0xd9),'nextAction':'query_operation_status','message':_0x3504f0(0xc6)};}if(_0x237e9e===_0x3504f0(0xc8)||_0x237e9e==='CANCELLED')return{'status':_0x3504f0(0xf4),'nextAction':null,'message':_0x3504f0(0xe6)};return{'status':_0x3504f0(0xd9),'nextAction':_0x3504f0(0x127),'message':_0x3504f0(0xcc)};}function buildDatasetGenerateStatusQueryCommand(_0x3dc977){const _0x8782bf=a65_0x268e81,_0x19ace8=_0x3dc977?.[_0x8782bf(0x114)]&&_0x3dc977['operationId']['trim']()?_0x8782bf(0xd7)+quoteCliValue(_0x3dc977[_0x8782bf(0x114)]):_0x3dc977?.[_0x8782bf(0x11b)]&&_0x3dc977['clientOperationId'][_0x8782bf(0xd0)]()?_0x8782bf(0xda)+quoteCliValue(_0x3dc977[_0x8782bf(0x11b)]):'';return CLI_BIN_NAME+'\x20dataset\x20generate-status'+_0x19ace8+_0x8782bf(0x122);}function createDatasetGenerateClientOperationId(){const _0x3679f8=a65_0x268e81;return _0x3679f8(0xe2)+randomUUID();}function normalizeWarnings(_0x489aac){const _0x14b211=a65_0x268e81;if(!isPlainObject(_0x489aac)||!Array[_0x14b211(0xef)](_0x489aac[_0x14b211(0xd6)]))return[];return _0x489aac[_0x14b211(0xd6)][_0x14b211(0xe8)](_0x43be09=>typeof _0x43be09===_0x14b211(0x116))[_0x14b211(0xcf)](_0x8de89=>_0x8de89[_0x14b211(0xd0)]())[_0x14b211(0xe8)](Boolean);}function required(_0x26ecb2,_0x33e78c){const _0x427e2a=a65_0x268e81;if(!_0x26ecb2)throw CliErrors[_0x427e2a(0xe9)](_0x33e78c+'\x20is\x20required.');}function rejectPresent(_0x40c88f,_0x108527,_0x355fa2){const _0x563736=a65_0x268e81;if(_0x40c88f)throw CliErrors[_0x563736(0xe9)](_0x108527+'\x20is\x20not\x20supported\x20with\x20'+_0x355fa2+'.');}function trim(_0x1dcfbe){const _0x3c1294=a65_0x268e81;return _0x1dcfbe?.[_0x3c1294(0xd0)]()??'';}function isPlainObject(_0x5beb35){const _0x596b07=a65_0x268e81;return Boolean(_0x5beb35)&&typeof _0x5beb35==='object'&&!Array[_0x596b07(0xef)](_0x5beb35);}function firstPlainObject(..._0x4afee5){for(const _0x131d81 of _0x4afee5){if(isPlainObject(_0x131d81))return _0x131d81;}return null;}function stringOrUndefined(_0x5e132c){const _0x461145=a65_0x268e81;return typeof _0x5e132c===_0x461145(0x116)&&_0x5e132c[_0x461145(0xd0)]()?_0x5e132c:undefined;}function a65_0xb8d4(){const _0x36f913=['/smartapi/dataset/text-generate/start','Use\x20only\x20one\x20of\x20--operation-id\x20or\x20--client-operation-id.','write','29981vCyOfG','str','Generated\x20dataset\x20design\x20snapshot:\x20','set','appCode','boolean','generate-status','--apply','progressRate','generated_dataset_created','generatedDataset','design-output','复用已有数据集生成任务','apply','tableName','数据集生成任务已结束,但未返回可识别的数据集信息','requirementDescription','FAILED','relationCount','8839872hVqUAz','message','数据集生成任务状态未知','--operation-id\x20or\x20--client-operation-id\x20is\x20required.','currentStep','map','trim','GET','generate-start','171XZbmGx','Generate\x20status\x20response\x20does\x20not\x20contain\x20a\x20created\x20dataset\x20object.','result','warnings','\x20--operation-id\x20','/smartapi/dataset/text-generate/status','unknown_reconcile_failed','\x20--client-operation-id\x20','name','datasetId','dataset','toString','Local\x20JSON\x20file\x20path\x20for\x20the\x20generated\x20design\x20snapshot','designFile','Preview\x20or\x20start\x20async\x20METADATA\x20dataset\x20generation\x20from\x20text','dataset-generate-','CANCELING','bool','length','数据集生成任务失败','utf8','filter','validation','--description','SUCCESS','422270bgQGkl','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','datasetCode','isArray','design','modelName','operation-id','PARTIAL_SUCCESS','operation_failed','preview','errorMsg','250AyKdUe','已提交数据集生成任务','--design-file\x20is\x20only\x20supported\x20with\x20--apply.','nextAction','712dlHlGV','relations','--design-file','dataset.generate.preview','Preview\x20response\x20does\x20not\x20contain\x20a\x20dataset\x20design\x20object.','--name','--design-output','fields','Review\x20the\x20design\x20snapshot,\x20then\x20run\x20this\x20command\x20to\x20submit\x20the\x20async\x20creation\x20task.','toUpperCase','/smartapi/dataset/text-generate/preview','number','25252NAYXRY','Would\x20start\x20async\x20creation\x20of\x20one\x20new\x20METADATA\x20dataset\x20from\x20the\x20local\x20design\x20snapshot.','Cannot\x20read\x20--design-file:\x20','POST','createdDataset','compress','status','modelCode','design-file','Dataset\x20name\x20for\x20text-generated\x20METADATA\x20design\x20preview','1270nbIETv','designOutput','mode','operationId','reused','string','Local\x20JSON\x20design\x20snapshot\x20created\x20by\x20dataset\x20generate-start\x20preview','\x20dataset\x20generate-start\x20--apply\x20--design-file\x20','datasetName','stringify','clientOperationId','operation_pending','fieldCount','--design-file\x20must\x20contain\x20a\x20JSON\x20object.','Natural\x20language\x20requirement\x20for\x20dataset\x20generation','dbtableConfig','properties','\x20--format\x20compress','36050828fikLjs','description','1417699EJClAF','40926aqyJFW','query_operation_status','Would\x20request\x20a\x20dataset\x20design\x20preview\x20and\x20write\x20it\x20to\x20'];a65_0xb8d4=function(){return _0x36f913;};return a65_0xb8d4();}function numberOrUndefined(_0x3a3329){const _0x5afba3=a65_0x268e81;return typeof _0x3a3329===_0x5afba3(0x106)&&Number['isFinite'](_0x3a3329)?_0x3a3329:undefined;}function quoteCliValue(_0x56281a){const _0x5a7716=a65_0x268e81;return/^[A-Za-z0-9_./:@=-]+$/['test'](_0x56281a)?_0x56281a:JSON[_0x5a7716(0x11a)](_0x56281a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4aed61,_0x4d31a0){const _0xcf9f22=a66_0x2182,_0x36f435=_0x4aed61();while(!![]){try{const _0x51ac55=-parseInt(_0xcf9f22(0xa4))/0x1*(-parseInt(_0xcf9f22(0x9e))/0x2)+-parseInt(_0xcf9f22(0xa3))/0x3*(-parseInt(_0xcf9f22(0xa1))/0x4)+parseInt(_0xcf9f22(0xa8))/0x5*(parseInt(_0xcf9f22(0xa7))/0x6)+parseInt(_0xcf9f22(0xa2))/0x7*(-parseInt(_0xcf9f22(0x9d))/0x8)+parseInt(_0xcf9f22(0xa9))/0x9*(parseInt(_0xcf9f22(0xa5))/0xa)+-parseInt(_0xcf9f22(0x9f))/0xb+-parseInt(_0xcf9f22(0xa0))/0xc*(parseInt(_0xcf9f22(0xa6))/0xd);if(_0x51ac55===_0x4d31a0)break;else _0x36f435['push'](_0x36f435['shift']());}catch(_0x51d48a){_0x36f435['push'](_0x36f435['shift']());}}}(a66_0xf508,0xb903d));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetOperations}from'../../commands/dataset/operations.js';import{datasetRelations}from'../../commands/dataset/relations.js';import{datasetRelationAudit}from'../../commands/dataset/relation-audit.js';function a66_0x2182(_0x2f6c50,_0x531f8a){_0x2f6c50=_0x2f6c50-0x9d;const _0xf508e9=a66_0xf508();let _0x21821f=_0xf508e9[_0x2f6c50];return _0x21821f;}import{datasetRelationCreate}from'../../commands/dataset/relation-create.js';import{datasetRelationUpdate}from'../../commands/dataset/relation-update.js';import{datasetRelationDelete}from'../../commands/dataset/relation-delete.js';import{datasetDelete}from'../../commands/dataset/delete.js';import{datasetRestore}from'../../commands/dataset/restore.js';import{datasetGenerateStart,datasetGenerateStatus}from'../../commands/dataset/generate.js';import{datasetFieldUpdate}from'../../commands/dataset/field-update.js';function a66_0xf508(){const _0x265663=['7qJFfXu','3361359EkALYx','42902iPDEIj','1160HuMtZQ','103207QHCIDP','8333994JINpMh','5mKTJIK','14913uLxIlP','230680ULWfWL','26HJzSHb','5979127ljWaZb','2916JDmnBJ','4uCECYD'];a66_0xf508=function(){return _0x265663;};return a66_0xf508();}import{datasetRename}from'../../commands/dataset/rename.js';import{datasetExtendUpdate}from'../../commands/dataset/extend-update.js';import{datasetBusinessGroupUpdate}from'../../commands/dataset/business-group-update.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetOperations,datasetRelations,datasetRelationAudit,datasetRelationCreate,datasetRelationUpdate,datasetRelationDelete,datasetDelete,datasetRestore,datasetGenerateStart,datasetGenerateStatus,datasetFieldUpdate,datasetRename,datasetExtendUpdate,datasetBusinessGroupUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x10ad62=a67_0x1f6e;(function(_0x274c20,_0x5ddf29){const _0x447476=a67_0x1f6e,_0x37c6aa=_0x274c20();while(!![]){try{const _0x55d6b0=-parseInt(_0x447476(0x137))/0x1+-parseInt(_0x447476(0x11c))/0x2+parseInt(_0x447476(0x138))/0x3+-parseInt(_0x447476(0x131))/0x4*(-parseInt(_0x447476(0x11e))/0x5)+parseInt(_0x447476(0x128))/0x6*(-parseInt(_0x447476(0x124))/0x7)+-parseInt(_0x447476(0x133))/0x8*(-parseInt(_0x447476(0x135))/0x9)+parseInt(_0x447476(0x12b))/0xa*(parseInt(_0x447476(0x136))/0xb);if(_0x55d6b0===_0x5ddf29)break;else _0x37c6aa['push'](_0x37c6aa['shift']());}catch(_0x444a69){_0x37c6aa['push'](_0x37c6aa['shift']());}}}(a67_0x73a4,0x33864));import{listDatasets}from'../../core/api-client.js';function a67_0x73a4(){const _0x42202b=['8ogpfXt','dataset','1084275lkAHoq','583WxTTKp','356689EWayJX','337284IfEiRE','toUpperCase','code','has','name','length','List\x20DO\x20V2\x20datasets\x20in\x20the\x20app','\x20dataset(s)','719490dxJdAt','tableName','1425WGaGNQ','description','map','str','appCode','METADATA','1064567tbkjbO','list','source','pkField','6snQzzC','dbtableConfig','allFields','108070WwUloa','dbName','string','trim','Filter\x20datasets\x20by\x20source\x20type','split','3844ImVarx','DB_TABLE'];a67_0x73a4=function(){return _0x42202b;};return a67_0x73a4();}function a67_0x1f6e(_0x8426bb,_0x5bbc77){_0x8426bb=_0x8426bb-0x11b;const _0x73a4a2=a67_0x73a4();let _0x1f6e2f=_0x73a4a2[_0x8426bb];return _0x1f6e2f;}import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DO_V2_DATASET_SOURCES=new Set([a67_0x10ad62(0x132),a67_0x10ad62(0x123)]);function normalizeSource(_0x76372b){const _0x13c159=a67_0x10ad62;return _0x76372b==null?'':String(_0x76372b)['trim']()[_0x13c159(0x139)]();}export const datasetList={'service':a67_0x10ad62(0x134),'command':a67_0x10ad62(0x125),'description':a67_0x10ad62(0x13e),'risk':'read','flags':[{'name':a67_0x10ad62(0x13c),'type':'string','description':'Filter\x20datasets\x20by\x20name\x20(server-side\x20fuzzy\x20match)'},CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a67_0x10ad62(0x126),'type':a67_0x10ad62(0x12d),'description':a67_0x10ad62(0x12f),'enum':[a67_0x10ad62(0x132),'METADATA']}],async 'execute'(_0x50c66f){const _0x212d05=a67_0x10ad62,_0x3fbbcd=_0x50c66f[_0x212d05(0x121)](_0x212d05(0x13c)),_0x31eedc=_0x50c66f[_0x212d05(0x121)](_0x212d05(0x13a)),_0x283eb4=normalizeSource(_0x50c66f[_0x212d05(0x121)](_0x212d05(0x126))),_0x116e3a=await listDatasets(_0x50c66f[_0x212d05(0x122)],{..._0x3fbbcd&&{'name':_0x3fbbcd},..._0x31eedc&&{'code':_0x31eedc}}),_0x218511=_0x116e3a['filter'](_0x17abac=>DO_V2_DATASET_SOURCES[_0x212d05(0x13b)](normalizeSource(_0x17abac[_0x212d05(0x126)]))),_0x10eb94=_0x283eb4?_0x218511['filter'](_0x152684=>normalizeSource(_0x152684[_0x212d05(0x126)])===_0x283eb4):_0x218511,_0x213660=_0x10eb94[_0x212d05(0x120)](_0x16a687=>{const _0x9f191c=_0x212d05,_0x5af18f=_0x16a687[_0x9f191c(0x129)]??{};return{'id':_0x16a687['id'],'name':_0x16a687[_0x9f191c(0x13c)],'code':_0x16a687[_0x9f191c(0x13a)],'description':_0x16a687[_0x9f191c(0x11f)],'source':_0x16a687[_0x9f191c(0x126)],'db':_0x5af18f[_0x9f191c(0x12c)],'table':_0x5af18f[_0x9f191c(0x11d)],'datasetKey':_0x5af18f['datasetKey'],'pk':_0x5af18f[_0x9f191c(0x127)],'fields':_0x5af18f[_0x9f191c(0x12a)]?_0x5af18f[_0x9f191c(0x12a)][_0x9f191c(0x130)](',')[_0x9f191c(0x120)](_0x397efa=>_0x397efa[_0x9f191c(0x12e)]()):[]};});return{'ok':!![],'data':{'total':_0x213660[_0x212d05(0x13d)],'datasets':_0x213660},'message':'Found\x20'+_0x213660[_0x212d05(0x13d)]+_0x212d05(0x11b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a68_0x588a(_0x40941e,_0x251c03){_0x40941e=_0x40941e-0x1e6;const _0x2dd287=a68_0x2dd2();let _0x588ab5=_0x2dd287[_0x40941e];return _0x588ab5;}const a68_0x897ad1=a68_0x588a;(function(_0x304148,_0x10f084){const _0x5d58d3=a68_0x588a,_0x48b6ee=_0x304148();while(!![]){try{const _0x501f31=parseInt(_0x5d58d3(0x1f6))/0x1+-parseInt(_0x5d58d3(0x1f1))/0x2+-parseInt(_0x5d58d3(0x1ec))/0x3*(-parseInt(_0x5d58d3(0x1fe))/0x4)+parseInt(_0x5d58d3(0x1fa))/0x5*(-parseInt(_0x5d58d3(0x1ea))/0x6)+parseInt(_0x5d58d3(0x1fc))/0x7+parseInt(_0x5d58d3(0x1ef))/0x8*(-parseInt(_0x5d58d3(0x1e7))/0x9)+parseInt(_0x5d58d3(0x1f2))/0xa*(parseInt(_0x5d58d3(0x1ee))/0xb);if(_0x501f31===_0x10f084)break;else _0x48b6ee['push'](_0x48b6ee['shift']());}catch(_0x59ecea){_0x48b6ee['push'](_0x48b6ee['shift']());}}}(a68_0x2dd2,0x40c5b));import{getDatasetOperations,getOperationDetail}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const datasetOperations={'service':'dataset','command':a68_0x897ad1(0x1e8),'description':'Get\x20operations\x20for\x20a\x20dataset,\x20optionally\x20with\x20full\x20detail\x20for\x20one\x20operation','risk':a68_0x897ad1(0x200),'flags':[CODE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL,{'name':a68_0x897ad1(0x1ed),'type':a68_0x897ad1(0x1f9),'description':a68_0x897ad1(0x1fb)},{'name':a68_0x897ad1(0x1ff),'type':a68_0x897ad1(0x1f9),'description':a68_0x897ad1(0x1f7)},{'name':a68_0x897ad1(0x1fd),'type':a68_0x897ad1(0x1f0),'description':'Return\x20full\x20operation\x20objects\x20including\x20requestFields\x20and\x20responseFields'}],async 'execute'(_0x10a55f){const _0x4bce27=a68_0x897ad1,_0x26b04b=_0x10a55f[_0x4bce27(0x1e9)]('code'),_0x3bba59=_0x10a55f[_0x4bce27(0x1e9)]('operation'),_0x186c9d=_0x10a55f[_0x4bce27(0x1f5)](_0x4bce27(0x1fd));if(_0x3bba59){const {dataset:_0x55848e,operation:_0x1479b2}=await getOperationDetail(_0x10a55f['appCode'],_0x26b04b,_0x3bba59);return{'ok':!![],'data':{'dataset':_0x55848e,'operation':_0x1479b2}};}const {dataset:_0x4081f3,operations:_0x28e181}=await getDatasetOperations(_0x26b04b);return{'ok':!![],'data':{'dataset':_0x4081f3,'total':_0x28e181['length'],'operations':_0x186c9d?_0x28e181:_0x28e181[_0x4bce27(0x1f3)](_0xe6bc78=>({'name':_0xe6bc78[_0x4bce27(0x1eb)],'displayName':_0xe6bc78['displayName'],'type':_0xe6bc78[_0x4bce27(0x1e6)],'method':_0xe6bc78[_0x4bce27(0x1f4)],'enabled':_0xe6bc78[_0x4bce27(0x1f8)]}))}};}};function a68_0x2dd2(){const _0x25da43=['string','865hiVCqU','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','1960077xUyEZm','verbose','788228pMFJOd','operation','read','type','1507743GfpdLN','operations','str','3396rlEPIG','name','6QdXypi','alias','110nXmcFA','16vngyPT','boolean','688666qzSklC','333400GTQsEP','map','method','bool','35087XrpslE','Operation\x20name\x20to\x20get\x20full\x20detail\x20(e.g.\x20filter,\x20getOne,\x20create)','enabled'];a68_0x2dd2=function(){return _0x25da43;};return a68_0x2dd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a69_0x684b9a=a69_0x3929;(function(_0x2930ae,_0x367fa3){const _0x580f28=a69_0x3929,_0x3a628d=_0x2930ae();while(!![]){try{const _0x46812e=-parseInt(_0x580f28(0x203))/0x1*(-parseInt(_0x580f28(0x1db))/0x2)+parseInt(_0x580f28(0x1fd))/0x3+-parseInt(_0x580f28(0x1f2))/0x4*(parseInt(_0x580f28(0x212))/0x5)+parseInt(_0x580f28(0x210))/0x6*(-parseInt(_0x580f28(0x1f1))/0x7)+-parseInt(_0x580f28(0x1ef))/0x8+-parseInt(_0x580f28(0x1fc))/0x9+parseInt(_0x580f28(0x1d9))/0xa*(parseInt(_0x580f28(0x1f9))/0xb);if(_0x46812e===_0x367fa3)break;else _0x3a628d['push'](_0x3a628d['shift']());}catch(_0x36323b){_0x3a628d['push'](_0x3a628d['shift']());}}}(a69_0x41c7,0x63afc));import{getDatasetDetail}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{collectDatasetRelationFacts,readSourceFilter,SOURCE_TYPES,toDatasetInfo,trim}from'../../commands/dataset/relations.js';const FROM_SOURCE_FLAG={'name':a69_0x684b9a(0x1e8),'type':'string','required':![],'enum':[...SOURCE_TYPES],'description':a69_0x684b9a(0x227)},TO_SOURCE_FLAG={'name':a69_0x684b9a(0x204),'type':a69_0x684b9a(0x1cf),'required':![],'enum':[...SOURCE_TYPES],'description':a69_0x684b9a(0x1e2)},STATUS_ORDER={'error':0x0,'manual_review':0x1,'warning':0x2,'ok':0x3};export const datasetRelationAudit={'service':a69_0x684b9a(0x1ee),'command':'relation-audit','description':a69_0x684b9a(0x211),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,FROM_SOURCE_FLAG,TO_SOURCE_FLAG],async 'validate'(_0x4c8b68){const _0x462a6d=a69_0x684b9a;readSourceFilter(_0x4c8b68['str'](_0x462a6d(0x1e8)),'--from-source'),readSourceFilter(_0x4c8b68[_0x462a6d(0x1d0)](_0x462a6d(0x204)),_0x462a6d(0x21e));},async 'execute'(_0x44c8b3){const _0x489dc1=a69_0x684b9a,_0x4f9553=await collectDatasetRelationFacts(_0x44c8b3,{'includeUnsupportedDirections':!![]});await hydrateMissingTargetDetails(_0x4f9553['relations'],_0x4f9553[_0x489dc1(0x20f)]);const _0x242699=countDuplicateRelations(_0x4f9553[_0x489dc1(0x20e)]),_0x122950=_0x4f9553[_0x489dc1(0x20e)]['map']((_0x291ddf,_0x1769ff)=>({'index':_0x1769ff,'item':auditRelation(_0x291ddf,_0x4f9553[_0x489dc1(0x20f)],_0x242699)}));_0x122950[_0x489dc1(0x20b)]((_0x246f62,_0x5f5510)=>{const _0x2497cc=_0x489dc1,_0x5ef644=STATUS_ORDER[_0x246f62[_0x2497cc(0x221)]['status']]-STATUS_ORDER[_0x5f5510[_0x2497cc(0x221)][_0x2497cc(0x1d5)]];return _0x5ef644||_0x246f62['index']-_0x5f5510[_0x2497cc(0x224)];});const _0x2b3e47=_0x122950[_0x489dc1(0x1ec)](({item:_0x2e92bc})=>_0x2e92bc),_0x90adec=summarize(_0x2b3e47);return{'ok':!![],'data':{'appCode':_0x44c8b3[_0x489dc1(0x1ea)],..._0x4f9553[_0x489dc1(0x1f5)]?{'datasetCode':_0x4f9553['datasetCode']}:{},'total':_0x2b3e47[_0x489dc1(0x1e4)],'summary':_0x90adec,'items':_0x2b3e47},'message':'Dataset\x20relation\x20audit:\x20'+_0x2b3e47[_0x489dc1(0x1e4)]+'\x20relation(s),\x20'+(_0x90adec['error']+_0x489dc1(0x21f)+_0x90adec[_0x489dc1(0x1f7)]+_0x489dc1(0x208))};}};function a69_0x41c7(){const _0x1b958d=['missing_label_field','medium','fieldName','endsWith','目标关系缺少展示字段,需要人工确认业务展示口径','code','label_field_technical','from','--to-source','\x20error(s),\x20','get','item','labelField','low','index','catch','存在重复关系定义','Filter\x20source\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','string','str','toLowerCase','relation','cardinality','resolve','status','label_field_missing','isArray','split','1798750CpImLU','columnName','50iAxcJa','目标展示字段可能是技术字段','allFields','field','warning','missing_cardinality','目标数据集不存在','Filter\x20target\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','none','length','add','names','error','from-source','key','appCode','METADATA','map','has','dataset','4737864LXTfMN','size','14bMAbOq','13044dlimKZ','target_dataset_missing','high','datasetCode','source','manualReview','filter','55NFTgiX','detail','duplicate_relation','1879956wiZHBh','2012769uQLalw','fields','DB_TABLE','object','关系基数缺失,需要人工确认','level','11246RXKmnK','to-source','name','manual_review','join','\x20manual\x20review\x20item(s)','known','source_dataset_missing','sort','some','push','relations','detailByCode','390114zEnXei','Audit\x20dataset\x20relation\x20facts\x20and\x20list\x20structural\x20issues\x20or\x20manual\x20review\x20items','785KchviY','不支持\x20METADATA\x20到\x20DB_TABLE\x20的关系方向','目标字段不存在','set'];a69_0x41c7=function(){return _0x1b958d;};return a69_0x41c7();}async function hydrateMissingTargetDetails(_0x2a94fc,_0x3769ae){const _0x4b486b=a69_0x684b9a,_0x112e5f=new Set(_0x2a94fc['map'](_0x2dab4e=>_0x2dab4e['to'][_0x4b486b(0x1f5)])['filter'](_0x4444aa=>_0x4444aa&&!_0x3769ae[_0x4b486b(0x1ed)](_0x4444aa)));for(const _0x58fc82 of _0x112e5f){const _0x5b8287=await Promise[_0x4b486b(0x1d4)](getDatasetDetail(_0x58fc82))[_0x4b486b(0x225)](()=>null);if(!_0x5b8287||typeof _0x5b8287!==_0x4b486b(0x200))continue;const _0x780bc8=toDatasetInfo(_0x5b8287);if(_0x780bc8['code'])_0x3769ae[_0x4b486b(0x215)](_0x780bc8[_0x4b486b(0x21b)],_0x780bc8);}}function auditRelation(_0x885644,_0x4de50a,_0x4fe5c5){const _0x20d71c=a69_0x684b9a,_0x4d7064=[],_0xac33c6=_0x4de50a[_0x20d71c(0x220)](_0x885644[_0x20d71c(0x21d)][_0x20d71c(0x1f5)]),_0x1aaeb9=_0x4de50a[_0x20d71c(0x220)](_0x885644['to'][_0x20d71c(0x1f5)]);!_0xac33c6&&_0x4d7064[_0x20d71c(0x20d)](reason(_0x20d71c(0x1e7),_0x20d71c(0x20a),'来源数据集不存在',{'datasetCode':_0x885644[_0x20d71c(0x21d)][_0x20d71c(0x1f5)]}));!_0x1aaeb9&&_0x4d7064['push'](reason(_0x20d71c(0x1e7),_0x20d71c(0x1f3),_0x20d71c(0x1e1),{'datasetCode':_0x885644['to'][_0x20d71c(0x1f5)]}));const _0x3d09c2=fieldIndexOf(_0xac33c6),_0x43ec49=fieldIndexOf(_0x1aaeb9);_0x3d09c2[_0x20d71c(0x209)]&&!_0x3d09c2[_0x20d71c(0x1e6)][_0x20d71c(0x1ed)](_0x885644['from']['field'])&&_0x4d7064['push'](reason(_0x20d71c(0x1e7),'source_field_missing','来源字段不存在',{'datasetCode':_0x885644['from'][_0x20d71c(0x1f5)],'field':_0x885644[_0x20d71c(0x21d)][_0x20d71c(0x1de)]}));_0x43ec49[_0x20d71c(0x209)]&&!_0x43ec49['names'][_0x20d71c(0x1ed)](_0x885644['to']['field'])&&_0x4d7064[_0x20d71c(0x20d)](reason(_0x20d71c(0x1e7),'target_field_missing',_0x20d71c(0x214),{'datasetCode':_0x885644['to'][_0x20d71c(0x1f5)],'field':_0x885644['to'][_0x20d71c(0x1de)]}));_0x885644['from'][_0x20d71c(0x1f6)]===_0x20d71c(0x1eb)&&_0x885644['to'][_0x20d71c(0x1f6)]===_0x20d71c(0x1ff)&&_0x4d7064['push'](reason('error','unsupported_direction',_0x20d71c(0x213)));(_0x4fe5c5[_0x20d71c(0x220)](relationKey(_0x885644))??0x0)>0x1&&_0x4d7064['push'](reason('warning',_0x20d71c(0x1fb),_0x20d71c(0x226)));const _0x37c9fe=trim(_0x885644['to'][_0x20d71c(0x222)]);if(!_0x37c9fe)_0x4d7064[_0x20d71c(0x20d)](reason(_0x20d71c(0x206),_0x20d71c(0x216),_0x20d71c(0x21a)));else{if(_0x43ec49[_0x20d71c(0x209)]&&!_0x43ec49[_0x20d71c(0x1e6)][_0x20d71c(0x1ed)](_0x37c9fe))_0x4d7064[_0x20d71c(0x20d)](reason(_0x20d71c(0x1df),_0x20d71c(0x1d6),'目标展示字段不存在',{'datasetCode':_0x885644['to']['datasetCode'],'labelField':_0x37c9fe}));else isTechnicalField(_0x37c9fe)&&_0x4d7064[_0x20d71c(0x20d)](reason(_0x20d71c(0x1df),_0x20d71c(0x21c),_0x20d71c(0x1dc),{'labelField':_0x37c9fe}));}!trim(_0x885644[_0x20d71c(0x1d2)]?.[_0x20d71c(0x1d3)])&&_0x4d7064['push'](reason(_0x20d71c(0x206),_0x20d71c(0x1e0),_0x20d71c(0x201)));const _0x1c5bba=statusOf(_0x4d7064);return{'status':_0x1c5bba,'severity':severityOf(_0x1c5bba),'manualReviewRequired':_0x4d7064['some'](_0x16e19c=>_0x16e19c['level']===_0x20d71c(0x206)),'from':_0x885644[_0x20d71c(0x21d)],'to':_0x885644['to'],..._0x885644[_0x20d71c(0x1d2)]?{'relation':_0x885644[_0x20d71c(0x1d2)]}:{},'reasons':_0x4d7064['map'](({level:_0x5b9c4f,..._0x2fcf67})=>_0x2fcf67)};}function a69_0x3929(_0x1af102,_0x45b203){_0x1af102=_0x1af102-0x1cf;const _0x41c73f=a69_0x41c7();let _0x39293f=_0x41c73f[_0x1af102];return _0x39293f;}function countDuplicateRelations(_0x4c4c67){const _0x36c4e8=a69_0x684b9a,_0x5e7f30=new Map();for(const _0x2b07e8 of _0x4c4c67){const _0x48edc3=relationKey(_0x2b07e8);_0x5e7f30['set'](_0x48edc3,(_0x5e7f30[_0x36c4e8(0x220)](_0x48edc3)??0x0)+0x1);}return _0x5e7f30;}function relationKey(_0x1e0ade){const _0x6d34d1=a69_0x684b9a;return[_0x1e0ade['from'][_0x6d34d1(0x1f6)],_0x1e0ade['from']['datasetCode'],_0x1e0ade['from'][_0x6d34d1(0x1de)],_0x1e0ade['to'][_0x6d34d1(0x1f6)],_0x1e0ade['to'][_0x6d34d1(0x1f5)],_0x1e0ade['to'][_0x6d34d1(0x1de)]][_0x6d34d1(0x207)]('\x00');}function fieldIndexOf(_0x40ae59){const _0x4c4219=a69_0x684b9a;if(!_0x40ae59)return{'known':![],'names':new Set()};const _0x37d1ae=new Set(),_0x33322d=_0x40ae59[_0x4c4219(0x1fa)]??{},_0xccf9de=Array[_0x4c4219(0x1d7)](_0x33322d[_0x4c4219(0x1fe)])?_0x33322d['fields']:Array[_0x4c4219(0x1d7)](_0x33322d['properties'])?_0x33322d['properties']:[];for(const _0x41ea30 of _0xccf9de){addFieldName(_0x37d1ae,_0x41ea30?.[_0x4c4219(0x205)]),addFieldName(_0x37d1ae,_0x41ea30?.[_0x4c4219(0x21b)]),addFieldName(_0x37d1ae,_0x41ea30?.[_0x4c4219(0x1da)]),addFieldName(_0x37d1ae,_0x41ea30?.[_0x4c4219(0x218)]);}const _0x5c6543=_0x33322d['dbtableConfig']??{};addFieldName(_0x37d1ae,_0x5c6543['pkField']),addFieldName(_0x37d1ae,_0x5c6543[_0x4c4219(0x222)]);if(typeof _0x5c6543[_0x4c4219(0x1dd)]===_0x4c4219(0x1cf))for(const _0x1900fd of _0x5c6543[_0x4c4219(0x1dd)][_0x4c4219(0x1d8)](',')){addFieldName(_0x37d1ae,_0x1900fd);}return{'known':_0x37d1ae[_0x4c4219(0x1f0)]>0x0,'names':_0x37d1ae};}function addFieldName(_0x538bda,_0x1a783c){const _0x12a555=a69_0x684b9a,_0x3a2032=trim(_0x1a783c);if(_0x3a2032)_0x538bda[_0x12a555(0x1e5)](_0x3a2032);}function isTechnicalField(_0x2aad3a){const _0x418cab=a69_0x684b9a,_0x4307b9=_0x2aad3a[_0x418cab(0x1d1)]();return _0x4307b9==='id'||_0x4307b9==='uuid'||_0x4307b9===_0x418cab(0x21b)||_0x4307b9===_0x418cab(0x1e9)||_0x4307b9[_0x418cab(0x219)]('_id');}function reason(_0x4bb986,_0x1b6908,_0x45452a,_0x12fe4b){return{'level':_0x4bb986,'code':_0x1b6908,'message':_0x45452a,..._0x12fe4b?{'evidence':_0x12fe4b}:{}};}function statusOf(_0x4e03cf){const _0x8adb41=a69_0x684b9a;if(_0x4e03cf[_0x8adb41(0x20c)](_0x1d9cc2=>_0x1d9cc2[_0x8adb41(0x202)]===_0x8adb41(0x1e7)))return _0x8adb41(0x1e7);if(_0x4e03cf[_0x8adb41(0x20c)](_0x92efd9=>_0x92efd9['level']==='manual_review'))return'manual_review';if(_0x4e03cf[_0x8adb41(0x20c)](_0x346969=>_0x346969['level']===_0x8adb41(0x1df)))return _0x8adb41(0x1df);return'ok';}function severityOf(_0x275779){const _0x3b9c1c=a69_0x684b9a;if(_0x275779===_0x3b9c1c(0x1e7))return _0x3b9c1c(0x1f4);if(_0x275779===_0x3b9c1c(0x206))return _0x3b9c1c(0x217);if(_0x275779===_0x3b9c1c(0x1df))return _0x3b9c1c(0x223);return _0x3b9c1c(0x1e3);}function summarize(_0x5109ac){const _0x1a559a=a69_0x684b9a;return{'ok':_0x5109ac[_0x1a559a(0x1f8)](_0x13c03c=>_0x13c03c[_0x1a559a(0x1d5)]==='ok')[_0x1a559a(0x1e4)],'warning':_0x5109ac[_0x1a559a(0x1f8)](_0x51518e=>_0x51518e[_0x1a559a(0x1d5)]===_0x1a559a(0x1df))[_0x1a559a(0x1e4)],'error':_0x5109ac[_0x1a559a(0x1f8)](_0x53ecd8=>_0x53ecd8[_0x1a559a(0x1d5)]===_0x1a559a(0x1e7))[_0x1a559a(0x1e4)],'manualReview':_0x5109ac[_0x1a559a(0x1f8)](_0x7f491a=>_0x7f491a['status']===_0x1a559a(0x206))['length']};}
|
|
1
|
+
const a69_0x2bf818=a69_0xf653;function a69_0x13f5(){const _0x57dcfd=['unsupported_direction','6vvtvWt','name','5oPTwGV','names','4kEXKJX','source','catch','存在重复关系定义','manualReview','duplicate_relation','不支持\x20METADATA\x20到\x20DB_TABLE\x20的关系方向','目标字段不存在','index','来源数据集不存在','2453JMcIod','read','medium','get','from-source','relation-audit','known','METADATA','level','目标关系缺少展示字段,需要人工确认业务展示口径','detailByCode','label_field_technical','object','isArray','string','push','endsWith','560598sPdllm','1591857QjuZce','join','from','目标展示字段可能是技术字段','Audit\x20dataset\x20relation\x20facts\x20and\x20list\x20structural\x20issues\x20or\x20manual\x20review\x20items','missing_cardinality','resolve','properties','cardinality','--to-source','uuid','manual_review','4842068VFcARh','dbtableConfig','关系基数缺失,需要人工确认','274982FDgqoz','item','fieldName','\x20relation(s),\x20','length','allFields','low','fields','add','str','relations','high','\x20manual\x20review\x20item(s)','3172DYMOZF','status','561252OoDGTU','set','warning','labelField','Dataset\x20relation\x20audit:\x20','toLowerCase','relation','DB_TABLE','key','has','some','sort','detail','47640CPYvfR','field','目标数据集不存在','8uwiTRM','to-source','10330Ahcszg','datasetCode','Filter\x20source\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','columnName','none','code','filter','pkField','Filter\x20target\x20dataset\x20type:\x20DB_TABLE\x20or\x20METADATA','source_field_missing','error','map'];a69_0x13f5=function(){return _0x57dcfd;};return a69_0x13f5();}(function(_0x2eef0f,_0x2c6656){const _0x115abf=a69_0xf653,_0x347cb3=_0x2eef0f();while(!![]){try{const _0x41a187=-parseInt(_0x115abf(0x227))/0x1*(-parseInt(_0x115abf(0x1f9))/0x2)+-parseInt(_0x115abf(0x1e9))/0x3*(-parseInt(_0x115abf(0x22b))/0x4)+parseInt(_0x115abf(0x229))/0x5*(parseInt(_0x115abf(0x208))/0x6)+parseInt(_0x115abf(0x1f6))/0x7+parseInt(_0x115abf(0x218))/0x8*(-parseInt(_0x115abf(0x1ea))/0x9)+parseInt(_0x115abf(0x21a))/0xa*(-parseInt(_0x115abf(0x1d8))/0xb)+-parseInt(_0x115abf(0x215))/0xc*(parseInt(_0x115abf(0x206))/0xd);if(_0x41a187===_0x2c6656)break;else _0x347cb3['push'](_0x347cb3['shift']());}catch(_0x2a9151){_0x347cb3['push'](_0x347cb3['shift']());}}}(a69_0x13f5,0x66d2e));import{getDatasetDetail}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{collectDatasetRelationFacts,readSourceFilter,SOURCE_TYPES,toDatasetInfo,trim}from'../../commands/dataset/relations.js';const FROM_SOURCE_FLAG={'name':a69_0x2bf818(0x1dc),'type':a69_0x2bf818(0x1e6),'required':![],'enum':[...SOURCE_TYPES],'description':a69_0x2bf818(0x21c)},TO_SOURCE_FLAG={'name':a69_0x2bf818(0x219),'type':a69_0x2bf818(0x1e6),'required':![],'enum':[...SOURCE_TYPES],'description':a69_0x2bf818(0x222)},STATUS_ORDER={'error':0x0,'manual_review':0x1,'warning':0x2,'ok':0x3};function a69_0xf653(_0x1e5021,_0x19c37f){_0x1e5021=_0x1e5021-0x1d5;const _0x13f59a=a69_0x13f5();let _0xf65354=_0x13f59a[_0x1e5021];return _0xf65354;}export const datasetRelationAudit={'service':'dataset','command':a69_0x2bf818(0x1dd),'description':a69_0x2bf818(0x1ee),'risk':a69_0x2bf818(0x1d9),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,FROM_SOURCE_FLAG,TO_SOURCE_FLAG],async 'validate'(_0x345475){const _0x1a5964=a69_0x2bf818;readSourceFilter(_0x345475[_0x1a5964(0x202)]('from-source'),'--from-source'),readSourceFilter(_0x345475['str'](_0x1a5964(0x219)),_0x1a5964(0x1f3));},async 'execute'(_0x4cd8c0){const _0x4cd9e2=a69_0x2bf818,_0x1eb0fc=await collectDatasetRelationFacts(_0x4cd8c0,{'includeUnsupportedDirections':!![]});await hydrateMissingTargetDetails(_0x1eb0fc['relations'],_0x1eb0fc['detailByCode']);const _0x9b9d04=countDuplicateRelations(_0x1eb0fc[_0x4cd9e2(0x203)]),_0x5cc9e2=_0x1eb0fc[_0x4cd9e2(0x203)][_0x4cd9e2(0x225)]((_0x508551,_0x24f88a)=>({'index':_0x24f88a,'item':auditRelation(_0x508551,_0x1eb0fc[_0x4cd9e2(0x1e2)],_0x9b9d04)}));_0x5cc9e2[_0x4cd9e2(0x213)]((_0x313543,_0x3cf17c)=>{const _0x176993=_0x4cd9e2,_0x44564b=STATUS_ORDER[_0x313543[_0x176993(0x1fa)]['status']]-STATUS_ORDER[_0x3cf17c[_0x176993(0x1fa)][_0x176993(0x207)]];return _0x44564b||_0x313543[_0x176993(0x1d6)]-_0x3cf17c[_0x176993(0x1d6)];});const _0x5a117e=_0x5cc9e2[_0x4cd9e2(0x225)](({item:_0x3d9625})=>_0x3d9625),_0x2af006=summarize(_0x5a117e);return{'ok':!![],'data':{'appCode':_0x4cd8c0['appCode'],..._0x1eb0fc[_0x4cd9e2(0x21b)]?{'datasetCode':_0x1eb0fc[_0x4cd9e2(0x21b)]}:{},'total':_0x5a117e[_0x4cd9e2(0x1fd)],'summary':_0x2af006,'items':_0x5a117e},'message':_0x4cd9e2(0x20c)+_0x5a117e[_0x4cd9e2(0x1fd)]+_0x4cd9e2(0x1fc)+(_0x2af006[_0x4cd9e2(0x224)]+'\x20error(s),\x20'+_0x2af006[_0x4cd9e2(0x22f)]+_0x4cd9e2(0x205))};}};async function hydrateMissingTargetDetails(_0x10cbb6,_0x23e627){const _0x40a820=a69_0x2bf818,_0x2f8b68=new Set(_0x10cbb6['map'](_0x6b9f06=>_0x6b9f06['to']['datasetCode'])[_0x40a820(0x220)](_0x2bfd75=>_0x2bfd75&&!_0x23e627['has'](_0x2bfd75)));for(const _0xc03fe7 of _0x2f8b68){const _0xa25741=await Promise[_0x40a820(0x1f0)](getDatasetDetail(_0xc03fe7))[_0x40a820(0x22d)](()=>null);if(!_0xa25741||typeof _0xa25741!==_0x40a820(0x1e4))continue;const _0x3c6c5c=toDatasetInfo(_0xa25741);if(_0x3c6c5c['code'])_0x23e627[_0x40a820(0x209)](_0x3c6c5c['code'],_0x3c6c5c);}}function auditRelation(_0x14353f,_0x58b746,_0x1e545b){const _0xd05572=a69_0x2bf818,_0x525a78=[],_0x322605=_0x58b746[_0xd05572(0x1db)](_0x14353f[_0xd05572(0x1ec)][_0xd05572(0x21b)]),_0x166866=_0x58b746[_0xd05572(0x1db)](_0x14353f['to']['datasetCode']);!_0x322605&&_0x525a78['push'](reason(_0xd05572(0x224),'source_dataset_missing',_0xd05572(0x1d7),{'datasetCode':_0x14353f[_0xd05572(0x1ec)]['datasetCode']}));!_0x166866&&_0x525a78['push'](reason('error','target_dataset_missing',_0xd05572(0x217),{'datasetCode':_0x14353f['to'][_0xd05572(0x21b)]}));const _0x21341a=fieldIndexOf(_0x322605),_0x4f2f53=fieldIndexOf(_0x166866);_0x21341a[_0xd05572(0x1de)]&&!_0x21341a['names'][_0xd05572(0x211)](_0x14353f['from'][_0xd05572(0x216)])&&_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x224),_0xd05572(0x223),'来源字段不存在',{'datasetCode':_0x14353f['from']['datasetCode'],'field':_0x14353f['from'][_0xd05572(0x216)]}));_0x4f2f53['known']&&!_0x4f2f53[_0xd05572(0x22a)][_0xd05572(0x211)](_0x14353f['to'][_0xd05572(0x216)])&&_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x224),'target_field_missing',_0xd05572(0x1d5),{'datasetCode':_0x14353f['to'][_0xd05572(0x21b)],'field':_0x14353f['to'][_0xd05572(0x216)]}));_0x14353f[_0xd05572(0x1ec)][_0xd05572(0x22c)]===_0xd05572(0x1df)&&_0x14353f['to'][_0xd05572(0x22c)]===_0xd05572(0x20f)&&_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x224),_0xd05572(0x226),_0xd05572(0x231)));(_0x1e545b[_0xd05572(0x1db)](relationKey(_0x14353f))??0x0)>0x1&&_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x20a),_0xd05572(0x230),_0xd05572(0x22e)));const _0x2ddd6f=trim(_0x14353f['to'][_0xd05572(0x20b)]);if(!_0x2ddd6f)_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x1f5),'missing_label_field',_0xd05572(0x1e1)));else{if(_0x4f2f53[_0xd05572(0x1de)]&&!_0x4f2f53[_0xd05572(0x22a)][_0xd05572(0x211)](_0x2ddd6f))_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x20a),'label_field_missing','目标展示字段不存在',{'datasetCode':_0x14353f['to'][_0xd05572(0x21b)],'labelField':_0x2ddd6f}));else isTechnicalField(_0x2ddd6f)&&_0x525a78[_0xd05572(0x1e7)](reason(_0xd05572(0x20a),_0xd05572(0x1e3),_0xd05572(0x1ed),{'labelField':_0x2ddd6f}));}!trim(_0x14353f[_0xd05572(0x20e)]?.[_0xd05572(0x1f2)])&&_0x525a78['push'](reason(_0xd05572(0x1f5),_0xd05572(0x1ef),_0xd05572(0x1f8)));const _0x5b598f=statusOf(_0x525a78);return{'status':_0x5b598f,'severity':severityOf(_0x5b598f),'manualReviewRequired':_0x525a78[_0xd05572(0x212)](_0x215232=>_0x215232[_0xd05572(0x1e0)]===_0xd05572(0x1f5)),'from':_0x14353f[_0xd05572(0x1ec)],'to':_0x14353f['to'],..._0x14353f[_0xd05572(0x20e)]?{'relation':_0x14353f['relation']}:{},'reasons':_0x525a78['map'](({level:_0x34cc3e,..._0x37916f})=>_0x37916f)};}function countDuplicateRelations(_0x3dd68b){const _0x320593=a69_0x2bf818,_0x5f1b6d=new Map();for(const _0x3b68d5 of _0x3dd68b){const _0x57341f=relationKey(_0x3b68d5);_0x5f1b6d[_0x320593(0x209)](_0x57341f,(_0x5f1b6d[_0x320593(0x1db)](_0x57341f)??0x0)+0x1);}return _0x5f1b6d;}function relationKey(_0x352c4c){const _0x5e437d=a69_0x2bf818;return[_0x352c4c['from'][_0x5e437d(0x22c)],_0x352c4c[_0x5e437d(0x1ec)][_0x5e437d(0x21b)],_0x352c4c[_0x5e437d(0x1ec)]['field'],_0x352c4c['to'][_0x5e437d(0x22c)],_0x352c4c['to'][_0x5e437d(0x21b)],_0x352c4c['to']['field']][_0x5e437d(0x1eb)]('\x00');}function fieldIndexOf(_0x3bf486){const _0x46bfe5=a69_0x2bf818;if(!_0x3bf486)return{'known':![],'names':new Set()};const _0x116e3b=new Set(),_0x5d9815=_0x3bf486[_0x46bfe5(0x214)]??{},_0x477bce=Array[_0x46bfe5(0x1e5)](_0x5d9815[_0x46bfe5(0x200)])?_0x5d9815[_0x46bfe5(0x200)]:Array[_0x46bfe5(0x1e5)](_0x5d9815[_0x46bfe5(0x1f1)])?_0x5d9815[_0x46bfe5(0x1f1)]:[];for(const _0x44f0c7 of _0x477bce){addFieldName(_0x116e3b,_0x44f0c7?.[_0x46bfe5(0x228)]),addFieldName(_0x116e3b,_0x44f0c7?.[_0x46bfe5(0x21f)]),addFieldName(_0x116e3b,_0x44f0c7?.[_0x46bfe5(0x21d)]),addFieldName(_0x116e3b,_0x44f0c7?.[_0x46bfe5(0x1fb)]);}const _0x1f361a=_0x5d9815[_0x46bfe5(0x1f7)]??{};addFieldName(_0x116e3b,_0x1f361a[_0x46bfe5(0x221)]),addFieldName(_0x116e3b,_0x1f361a[_0x46bfe5(0x20b)]);if(typeof _0x1f361a[_0x46bfe5(0x1fe)]===_0x46bfe5(0x1e6))for(const _0x4717b9 of _0x1f361a[_0x46bfe5(0x1fe)]['split'](',')){addFieldName(_0x116e3b,_0x4717b9);}return{'known':_0x116e3b['size']>0x0,'names':_0x116e3b};}function addFieldName(_0x141c46,_0x2ae5ae){const _0x1268e5=a69_0x2bf818,_0x24deb4=trim(_0x2ae5ae);if(_0x24deb4)_0x141c46[_0x1268e5(0x201)](_0x24deb4);}function isTechnicalField(_0x20643a){const _0x5841b9=a69_0x2bf818,_0x4b75ae=_0x20643a[_0x5841b9(0x20d)]();return _0x4b75ae==='id'||_0x4b75ae===_0x5841b9(0x1f4)||_0x4b75ae===_0x5841b9(0x21f)||_0x4b75ae===_0x5841b9(0x210)||_0x4b75ae[_0x5841b9(0x1e8)]('_id');}function reason(_0x261a6e,_0x53ae97,_0x22352f,_0x4a2f78){return{'level':_0x261a6e,'code':_0x53ae97,'message':_0x22352f,..._0x4a2f78?{'evidence':_0x4a2f78}:{}};}function statusOf(_0x1d8420){const _0x472884=a69_0x2bf818;if(_0x1d8420[_0x472884(0x212)](_0x4b461f=>_0x4b461f[_0x472884(0x1e0)]===_0x472884(0x224)))return'error';if(_0x1d8420[_0x472884(0x212)](_0x482b65=>_0x482b65[_0x472884(0x1e0)]===_0x472884(0x1f5)))return'manual_review';if(_0x1d8420['some'](_0x1e3f93=>_0x1e3f93['level']===_0x472884(0x20a)))return _0x472884(0x20a);return'ok';}function severityOf(_0x125427){const _0x23c9a9=a69_0x2bf818;if(_0x125427===_0x23c9a9(0x224))return _0x23c9a9(0x204);if(_0x125427===_0x23c9a9(0x1f5))return _0x23c9a9(0x1da);if(_0x125427==='warning')return _0x23c9a9(0x1ff);return _0x23c9a9(0x21e);}function summarize(_0x188633){const _0x5d6db8=a69_0x2bf818;return{'ok':_0x188633[_0x5d6db8(0x220)](_0x3371a7=>_0x3371a7[_0x5d6db8(0x207)]==='ok')[_0x5d6db8(0x1fd)],'warning':_0x188633[_0x5d6db8(0x220)](_0x566b80=>_0x566b80[_0x5d6db8(0x207)]===_0x5d6db8(0x20a))['length'],'error':_0x188633[_0x5d6db8(0x220)](_0xdecb4a=>_0xdecb4a[_0x5d6db8(0x207)]===_0x5d6db8(0x224))[_0x5d6db8(0x1fd)],'manualReview':_0x188633['filter'](_0x5f5084=>_0x5f5084[_0x5d6db8(0x207)]==='manual_review')[_0x5d6db8(0x1fd)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x3a15ac=a70_0x4fa5;(function(_0x21f083,_0x106260){const _0x5b0a59=a70_0x4fa5,_0x39f96d=_0x21f083();while(!![]){try{const _0x2efa78=parseInt(_0x5b0a59(0x1e7))/0x1*(parseInt(_0x5b0a59(0x1e9))/0x2)+-parseInt(_0x5b0a59(0x1ed))/0x3+parseInt(_0x5b0a59(0x1f1))/0x4*(-parseInt(_0x5b0a59(0x1ef))/0x5)+parseInt(_0x5b0a59(0x1e3))/0x6*(parseInt(_0x5b0a59(0x1f2))/0x7)+-parseInt(_0x5b0a59(0x1e5))/0x8+-parseInt(_0x5b0a59(0x1f3))/0x9*(-parseInt(_0x5b0a59(0x1ec))/0xa)+parseInt(_0x5b0a59(0x1e8))/0xb;if(_0x2efa78===_0x106260)break;else _0x39f96d['push'](_0x39f96d['shift']());}catch(_0x8cc773){_0x39f96d['push'](_0x39f96d['shift']());}}}(a70_0x8ca6,0xc1983));import{createErRelation}from'../../core/api-client.js';function a70_0x8ca6(){const _0x1b80f6=['32hdypyW','6040244wOchqN','18HMKAnx','6edtESF','dataset','3076976BCyDCM','relation_conflict:\x20relation\x20already\x20exists:\x20','170887JXrcyf','13138807sRwBTR','6tRDoaA','/smartapi/question/er-config/cli/erCreate','Create\x20one\x20dataset\x20relation','4933370OZRksh','4179093KwkWlP','create','616280APRqIX','appCode'];a70_0x8ca6=function(){return _0x1b80f6;};return a70_0x8ca6();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDryRunPreview,buildMutationData,formatRelationSelector,loadRelationContext,readRelationInput,relationToBackend,RELATION_TYPE_FLAG_OPTIONAL,FROM_DATASETCODE_FLAG,FROM_COLUMN_FLAG,CARDINALITY_FLAG,TO_COLUMN_FLAG,TO_DATASETCODE_FLAG,TO_LABEL_COLUMN_FLAG,verifyRelationMutation}from'../../commands/dataset/relation-shared.js';function a70_0x4fa5(_0x42160d,_0x539822){_0x42160d=_0x42160d-0x1e3;const _0x8ca6f0=a70_0x8ca6();let _0x4fa520=_0x8ca6f0[_0x42160d];return _0x4fa520;}const BACKEND_PATH=a70_0x3a15ac(0x1ea),READ_RELATION_OPTIONS={'includeLabelAndCardinality':!![]};export const datasetRelationCreate={'service':a70_0x3a15ac(0x1e4),'command':'relation-create','description':a70_0x3a15ac(0x1eb),'risk':'write','flags':[FROM_DATASETCODE_FLAG,FROM_COLUMN_FLAG,TO_DATASETCODE_FLAG,TO_COLUMN_FLAG,TO_LABEL_COLUMN_FLAG,CARDINALITY_FLAG,RELATION_TYPE_FLAG_OPTIONAL,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3bbf32){await readRelationInput(_0x3bbf32,READ_RELATION_OPTIONS);},async 'dryRun'(_0x54d46a){const _0x3c3b8d=a70_0x3a15ac,_0x28379a=await readRelationInput(_0x54d46a,READ_RELATION_OPTIONS);return buildDryRunPreview({'operation':_0x3c3b8d(0x1ee),'appCode':_0x54d46a[_0x3c3b8d(0x1f0)],'input':_0x28379a,'backendPath':BACKEND_PATH});},async 'execute'(_0x2d8365){const _0xf0b7eb=a70_0x3a15ac,_0x174ba2=await readRelationInput(_0x2d8365,READ_RELATION_OPTIONS),{existing:_0x45d193,readbackHint:_0x5b7a4d}=await loadRelationContext(_0x2d8365[_0xf0b7eb(0x1f0)],_0x174ba2);if(_0x45d193)throw CliErrors['validation'](_0xf0b7eb(0x1e6)+formatRelationSelector(_0x174ba2),'Use\x20dataset\x20relation-update\x20for\x20metadata\x20changes.\x20Do\x20not\x20automate\x20delete+create\x20as\x20an\x20atomic\x20edit;\x20confirm\x20both\x20dry-runs\x20with\x20the\x20user\x20before\x20changing\x20relation\x20identity.');await createErRelation({'appCode':_0x2d8365[_0xf0b7eb(0x1f0)],'relation':relationToBackend(_0x174ba2)});const _0xcb8954=await verifyRelationMutation({'operation':'create','appCode':_0x2d8365['appCode'],'input':_0x174ba2,'readbackHint':_0x5b7a4d});return{'ok':!![],'data':buildMutationData({'operation':_0xf0b7eb(0x1ee),'appCode':_0x2d8365[_0xf0b7eb(0x1f0)],'input':_0x174ba2,'before':null,'after':_0xcb8954['afterReadback'],'verification':_0xcb8954,'dryRun':![],'backendPath':BACKEND_PATH}),'message':'Created\x20dataset\x20relation:\x20'+formatRelationSelector(_0x174ba2)};}};
|