@lovrabet/rabetbase-cli 2.5.8-beta.1 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +19 -0
- package/lib/core/kb-management-client.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-kb.md +7 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0xd4ec1b=a74_0x46ba;function a74_0x4043(){const _0x400d6b=['1rciVzq','id=','isArray','type','2149hcuEoY','relatedPageInfoList','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbId','3766468NtWlsM','delete','isInteger','7212uFaXfR','bool','cascade','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','/smartapi/dataset/delete?cascade=','3tlgMTS','dbid','dbtableConfig','763054XRCxGd','\x20failed','9309438IxPAPn','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','expected-count','1480iZVuVx','code','confirm','num','deleted','4973472HYtKMb','str','Required\x20to\x20execute\x20dataset\x20deletion','Deleted\x20','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','false','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','filter','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','name','21032kIcSoc','rabetbase\x20page\x20restore\x20--id\x20','message','\x20--appcode\x20','add','number','description','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','object','11OFPJsr','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','validation','\x20dataset(s);\x20','push','appCode','dbName','title','No\x20undeleted\x20dataset\x20found\x20for\x20','length','Would\x20delete\x20','dbid=','source','1300520MlrcRh','high-risk-write'];a74_0x4043=function(){return _0x400d6b;};return a74_0x4043();}(function(_0x3580b8,_0xf48064){const _0xf62bd2=a74_0x46ba,_0x1a616f=_0x3580b8();while(!![]){try{const _0xc07998=-parseInt(_0xf62bd2(0x112))/0x1*(-parseInt(_0xf62bd2(0x125))/0x2)+-parseInt(_0xf62bd2(0x122))/0x3*(parseInt(_0xf62bd2(0x11a))/0x4)+-parseInt(_0xf62bd2(0x12a))/0x5*(-parseInt(_0xf62bd2(0x11d))/0x6)+parseInt(_0xf62bd2(0x116))/0x7*(-parseInt(_0xf62bd2(0x139))/0x8)+parseInt(_0xf62bd2(0x127))/0x9+-parseInt(_0xf62bd2(0x110))/0xa*(-parseInt(_0xf62bd2(0x102))/0xb)+parseInt(_0xf62bd2(0x12f))/0xc;if(_0xc07998===_0xf48064)break;else _0x1a616f['push'](_0x1a616f['shift']());}catch(_0x488ce8){_0x1a616f['push'](_0x1a616f['shift']());}}}(a74_0x4043,0x8a8c1));function a74_0x46ba(_0x46ccea,_0x5bd97b){_0x46ccea=_0x46ccea-0xfd;const _0x40436d=a74_0x4043();let _0x46ba4c=_0x40436d[_0x46ccea];return _0x46ba4c;}import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':'Dataset\x20id'},DBID_FLAG={'name':'dbid','type':a74_0xd4ec1b(0xfd),'description':a74_0xd4ec1b(0x118)},CONFIRM_FLAG={'name':a74_0xd4ec1b(0x12c),'type':'boolean','description':a74_0xd4ec1b(0x131)},CASCADE_FLAG={'name':'cascade','type':'boolean','description':a74_0xd4ec1b(0x120)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a74_0xd4ec1b(0xfd),'description':a74_0xd4ec1b(0x103)};export const datasetDelete={'service':'dataset','command':a74_0xd4ec1b(0x11b),'description':a74_0xd4ec1b(0x135),'risk':a74_0xd4ec1b(0x111),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3738f3){const _0x251aba=a74_0xd4ec1b,_0x4462d5=_0x3738f3[_0x251aba(0x12d)]('id'),_0x3aa587=_0x3738f3['str'](_0x251aba(0x12b)),_0x500781=_0x3738f3['num']('dbid'),_0x347f47=[_0x4462d5>0x0,Boolean(_0x3aa587),_0x500781>0x0][_0x251aba(0x136)](Boolean);if(_0x347f47[_0x251aba(0x10c)]===0x0)throw CliErrors['validation'](_0x251aba(0x104));if(_0x347f47[_0x251aba(0x10c)]>0x1)throw CliErrors[_0x251aba(0x105)](_0x251aba(0xff));},async 'dryRun'(_0x25f478){const _0x30d8ed=a74_0xd4ec1b,_0x531034=await resolveTargets(_0x25f478),_0x2f48e4=_0x25f478['bool'](_0x30d8ed(0x11f));return{'method':'POST','url':_0x30d8ed(0x121)+(_0x2f48e4?'true':_0x30d8ed(0x134)),'body':{'count':_0x531034[_0x30d8ed(0x10c)],'cascade':_0x2f48e4,'datasets':_0x531034},'description':_0x2f48e4?_0x30d8ed(0x10d)+_0x531034[_0x30d8ed(0x10c)]+_0x30d8ed(0x128):'Would\x20safely\x20delete\x20'+_0x531034[_0x30d8ed(0x10c)]+_0x30d8ed(0x133)};},async 'execute'(_0x493f13){const _0x5a0038=a74_0xd4ec1b;if(!_0x493f13[_0x5a0038(0x11e)](_0x5a0038(0x12c)))throw CliErrors[_0x5a0038(0x105)](_0x5a0038(0x100),_0x5a0038(0x137));const _0x5a670a=await resolveTargets(_0x493f13),_0x14d3d9=_0x493f13[_0x5a0038(0x11e)](_0x5a0038(0x11f)),_0x3d2f88=[],_0x25ec51=[];for(const _0x2eedcf of _0x5a670a){try{await deleteDataset(_0x2eedcf['id'],_0x14d3d9),_0x3d2f88[_0x5a0038(0x107)](_0x2eedcf);}catch(_0x49e3ac){_0x25ec51['push']({..._0x2eedcf,'error':_0x49e3ac instanceof Error?_0x49e3ac[_0x5a0038(0x13b)]:String(_0x49e3ac)});}}if(_0x25ec51[_0x5a0038(0x10c)]>0x0){const _0x1bcf4a=buildPageRestoreCommands(_0x493f13['appCode'],_0x14d3d9?_0x3d2f88:[]);return{'ok':![],'data':{'requested':_0x5a670a[_0x5a0038(0x10c)],'cascade':_0x14d3d9,'deletedCount':_0x3d2f88[_0x5a0038(0x10c)],'failedCount':_0x25ec51[_0x5a0038(0x10c)],'deleted':_0x3d2f88,'failed':_0x25ec51,'pageRestoreCommands':_0x1bcf4a},'message':_0x5a0038(0x132)+_0x3d2f88[_0x5a0038(0x10c)]+'/'+_0x5a670a[_0x5a0038(0x10c)]+_0x5a0038(0x106)+_0x25ec51['length']+_0x5a0038(0x126)};}return{'ok':!![],'data':{'requested':_0x5a670a[_0x5a0038(0x10c)],'cascade':_0x14d3d9,'deletedCount':_0x3d2f88['length'],'deleted':_0x3d2f88,'pageRestoreCommands':buildPageRestoreCommands(_0x493f13[_0x5a0038(0x108)],_0x14d3d9?_0x3d2f88:[])},'message':'Deleted\x20'+_0x3d2f88[_0x5a0038(0x10c)]+'\x20dataset(s)'};}};async function resolveTargets(_0x50fa62){const _0x4e12b0=a74_0xd4ec1b,_0x11835c=_0x50fa62[_0x4e12b0(0x12d)]('id'),_0x15cf32=_0x50fa62[_0x4e12b0(0x130)](_0x4e12b0(0x12b)),_0x594278=_0x50fa62[_0x4e12b0(0x12d)](_0x4e12b0(0x123));let _0x1d9bf5;_0x15cf32?(_0x1d9bf5=await listDatasets(_0x50fa62['appCode'],{'code':_0x15cf32}),_0x1d9bf5=_0x1d9bf5['filter'](_0x259eb3=>_0x259eb3[_0x4e12b0(0x12b)]===_0x15cf32)):(_0x1d9bf5=await listDatasets(_0x50fa62['appCode']),_0x11835c>0x0&&(_0x1d9bf5=_0x1d9bf5[_0x4e12b0(0x136)](_0x54b563=>_0x54b563['id']===_0x11835c)),_0x594278>0x0&&(_0x1d9bf5=_0x1d9bf5[_0x4e12b0(0x136)](_0x45df37=>_0x45df37['dbtableConfig']?.[_0x4e12b0(0x119)]===_0x594278)));const _0x2e933b=[];for(const _0x5323dd of _0x1d9bf5){const _0x586a57=await getDatasetDetail(_0x5323dd[_0x4e12b0(0x12b)]),_0x3e24b4=Array[_0x4e12b0(0x114)](_0x586a57[_0x4e12b0(0x117)])?_0x586a57[_0x4e12b0(0x117)]['filter'](_0x2e395e=>_0x2e395e!=null&&typeof _0x2e395e==='object'&&_0x2e395e[_0x4e12b0(0x12e)]!==!![]):[];_0x2e933b['push'](normalizeTarget(_0x5323dd,_0x3e24b4));}if(_0x2e933b[_0x4e12b0(0x10c)]===0x0){const _0x56af14=_0x15cf32||(_0x11835c>0x0?_0x4e12b0(0x113)+_0x11835c:_0x4e12b0(0x10e)+_0x594278);throw CliErrors[_0x4e12b0(0x105)](_0x4e12b0(0x10b)+_0x56af14+'.');}const _0x8fffff=_0x50fa62['num'](_0x4e12b0(0x129));if(_0x8fffff>0x0&&_0x2e933b['length']!==_0x8fffff)throw CliErrors[_0x4e12b0(0x105)]('Matched\x20'+_0x2e933b[_0x4e12b0(0x10c)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x8fffff+'.');return _0x2e933b;}function normalizeTarget(_0x1d646b,_0x4923fb){const _0x411637=a74_0xd4ec1b,_0x18e1fd=_0x1d646b[_0x411637(0x124)]??{},_0x43a5e6=_0x4923fb['map'](_0x4772e4=>{const _0x3b626c=_0x411637;if(_0x4772e4==null||typeof _0x4772e4!==_0x3b626c(0x101))return null;const _0x1595f9=_0x4772e4,_0x34957e=Number(_0x1595f9['id']);if(!Number[_0x3b626c(0x11c)](_0x34957e)||_0x34957e<=0x0)return null;const _0x2279e0=_0x1595f9[_0x3b626c(0x10a)]??_0x1595f9['name'];return{'id':_0x34957e,..._0x2279e0?{'name':String(_0x2279e0)}:{},..._0x1595f9[_0x3b626c(0x115)]?{'type':String(_0x1595f9['type'])}:{}};})[_0x411637(0x136)](_0x185b7e=>_0x185b7e!==null);return{'id':_0x1d646b['id'],'code':_0x1d646b[_0x411637(0x12b)],'name':_0x1d646b[_0x411637(0x138)],'description':_0x1d646b[_0x411637(0xfe)],'source':_0x1d646b[_0x411637(0x10f)],'dbId':_0x18e1fd[_0x411637(0x119)],'dbName':_0x18e1fd[_0x411637(0x109)],'tableName':_0x18e1fd['tableName'],'relatedPageCount':_0x43a5e6[_0x411637(0x10c)],'relatedPages':_0x43a5e6};}function buildPageRestoreCommands(_0x444ff9,_0x5ea3b1){const _0x55de65=a74_0xd4ec1b,_0x366d2e=new Set();for(const _0x1837b5 of _0x5ea3b1){for(const _0x153ae3 of _0x1837b5['relatedPages'])_0x366d2e[_0x55de65(0x13d)](_0x153ae3['id']);}return[..._0x366d2e]['map'](_0x5635e0=>_0x55de65(0x13a)+_0x5635e0+_0x55de65(0x13c)+_0x444ff9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a75_0x96e5(){const _0x5c590f=['context','428658UKmaMt','1138274QoHdgU','7fmGfZl','2116376sWlmsv','5593352pEfoIf','18513738ATcLLf','4187319BeoJjM','65NSQXLg','5185592PwybOd'];a75_0x96e5=function(){return _0x5c590f;};return a75_0x96e5();}function a75_0x49fa(_0x2c0d45,_0x1dd118){_0x2c0d45=_0x2c0d45-0x132;const _0x96e579=a75_0x96e5();let _0x49fa8b=_0x96e579[_0x2c0d45];return _0x49fa8b;}const a75_0x33be95=a75_0x49fa;(function(_0x2fef5f,_0x24580f){const _0x5774cf=a75_0x49fa,_0x14cc6a=_0x2fef5f();while(!![]){try{const _0x42094e=-parseInt(_0x5774cf(0x139))/0x1+parseInt(_0x5774cf(0x13b))/0x2+-parseInt(_0x5774cf(0x134))/0x3+-parseInt(_0x5774cf(0x132))/0x4+parseInt(_0x5774cf(0x135))/0x5*(parseInt(_0x5774cf(0x138))/0x6)+-parseInt(_0x5774cf(0x13a))/0x7*(-parseInt(_0x5774cf(0x136))/0x8)+parseInt(_0x5774cf(0x133))/0x9;if(_0x42094e===_0x24580f)break;else _0x14cc6a['push'](_0x14cc6a['shift']());}catch(_0x2b6fd9){_0x14cc6a['push'](_0x14cc6a['shift']());}}}(a75_0x96e5,0xb9823));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0x33be95(0x137));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a76_0xf1553=a76_0x2dab;(function(_0x110b98,_0x1c4f00){const _0x2d0cb4=a76_0x2dab,_0x12e3cc=_0x110b98();while(!![]){try{const _0x4f3236=-parseInt(_0x2d0cb4(0x71))/0x1*(-parseInt(_0x2d0cb4(0x7c))/0x2)+parseInt(_0x2d0cb4(0x77))/0x3*(-parseInt(_0x2d0cb4(0x7b))/0x4)+parseInt(_0x2d0cb4(0x76))/0x5*(-parseInt(_0x2d0cb4(0x6f))/0x6)+parseInt(_0x2d0cb4(0x79))/0x7*(-parseInt(_0x2d0cb4(0x74))/0x8)+parseInt(_0x2d0cb4(0x70))/0x9+-parseInt(_0x2d0cb4(0x7a))/0xa*(parseInt(_0x2d0cb4(0x75))/0xb)+parseInt(_0x2d0cb4(0x73))/0xc*(parseInt(_0x2d0cb4(0x72))/0xd);if(_0x4f3236===_0x1c4f00)break;else _0x12e3cc['push'](_0x12e3cc['shift']());}catch(_0x2a8a6a){_0x12e3cc['push'](_0x12e3cc['shift']());}}}(a76_0x4f98,0x8b287));function a76_0x2dab(_0x2e55a8,_0x377d69){_0x2e55a8=_0x2e55a8-0x6f;const _0x4f984d=a76_0x4f98();let _0x2daba7=_0x4f984d[_0x2e55a8];return _0x2daba7;}function a76_0x4f98(){const _0x1fe504=['286029ZHkpNy','143QpuGrJ','3386124oqIhPf','8ceoQNa','4905208mjGhuv','145235Hyzzyv','81TtkBuK','start','5632291ZhRbRl','20SJTZMC','31456RYhQmT','2xVxxCf','192ZQMzGn','164844Jruqtm'];a76_0x4f98=function(){return _0x1fe504;};return a76_0x4f98();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStart=designCommand(a76_0xf1553(0x78));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a77_0xc5b6fe=a77_0x218e;function a77_0x218e(_0x5d52f0,_0xc4093d){_0x5d52f0=_0x5d52f0-0x1d5;const _0x243dad=a77_0x243d();let _0x218e07=_0x243dad[_0x5d52f0];return _0x218e07;}(function(_0x3d4c49,_0x110a8a){const _0x1138fd=a77_0x218e,_0x2aec57=_0x3d4c49();while(!![]){try{const _0x2bce1b=parseInt(_0x1138fd(0x1dd))/0x1*(-parseInt(_0x1138fd(0x1dc))/0x2)+-parseInt(_0x1138fd(0x1db))/0x3*(-parseInt(_0x1138fd(0x1d9))/0x4)+parseInt(_0x1138fd(0x1de))/0x5*(parseInt(_0x1138fd(0x1d7))/0x6)+-parseInt(_0x1138fd(0x1d5))/0x7+-parseInt(_0x1138fd(0x1da))/0x8+-parseInt(_0x1138fd(0x1e0))/0x9+-parseInt(_0x1138fd(0x1d8))/0xa*(-parseInt(_0x1138fd(0x1df))/0xb);if(_0x2bce1b===_0x110a8a)break;else _0x2aec57['push'](_0x2aec57['shift']());}catch(_0x3471d2){_0x2aec57['push'](_0x2aec57['shift']());}}}(a77_0x243d,0xd5445));import{designCommand}from'../../services/dataset-design/commands.js';function a77_0x243d(){const _0x275698=['2anJUXr','1505353lpEvtC','5OvbKUE','50809143QVDIuP','14467896fmySbH','8888250uVuBZB','status','5117286FKRrNf','10viZTIU','4MpzoJa','10686944HVsCMq','3360486mJiiLA'];a77_0x243d=function(){return _0x275698;};return a77_0x243d();}export const datasetDesignStatus=designCommand(a77_0xc5b6fe(0x1d6));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a78_0x4aed18=a78_0x5c2f;(function(_0x4ede30,_0x49a419){const _0x33b7d5=a78_0x5c2f,_0x2982bc=_0x4ede30();while(!![]){try{const _0x36de66=-parseInt(_0x33b7d5(0xa5))/0x1+-parseInt(_0x33b7d5(0xab))/0x2*(-parseInt(_0x33b7d5(0xaa))/0x3)+-parseInt(_0x33b7d5(0xa7))/0x4+parseInt(_0x33b7d5(0xa4))/0x5+parseInt(_0x33b7d5(0xa3))/0x6+-parseInt(_0x33b7d5(0xac))/0x7+-parseInt(_0x33b7d5(0xa8))/0x8*(parseInt(_0x33b7d5(0xa9))/0x9);if(_0x36de66===_0x49a419)break;else _0x2982bc['push'](_0x2982bc['shift']());}catch(_0x22c8ae){_0x2982bc['push'](_0x2982bc['shift']());}}}(a78_0x26aa,0xe987e));function a78_0x5c2f(_0x2dc1c1,_0x508ea2){_0x2dc1c1=_0x2dc1c1-0xa3;const _0x26aa87=a78_0x26aa();let _0x5c2ffd=_0x26aa87[_0x2dc1c1];return _0x5c2ffd;}function a78_0x26aa(){const _0x5d9950=['4781388qxmeHm','9547230xxaOKL','176943mIBMKI','sync-retry','2680464qWyXAz','8144LRnIqW','13518ipYYzK','4757574Htjdjh','2arHdBd','6716955JzlGqW'];a78_0x26aa=function(){return _0x5d9950;};return a78_0x26aa();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand(a78_0x4aed18(0xa6));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a79_0x1b6d(_0x461fe7,_0x41f395){_0x461fe7=_0x461fe7-0xd1;const _0x436a5b=a79_0x436a();let _0x1b6d5d=_0x436a5b[_0x461fe7];return _0x1b6d5d;}const a79_0x3d3ce5=a79_0x1b6d;(function(_0x1f1f72,_0x22053b){const _0x313186=a79_0x1b6d,_0x3b6605=_0x1f1f72();while(!![]){try{const _0x452539=-parseInt(_0x313186(0xd2))/0x1+parseInt(_0x313186(0xd4))/0x2+parseInt(_0x313186(0xd1))/0x3+parseInt(_0x313186(0xd9))/0x4+-parseInt(_0x313186(0xd5))/0x5*(parseInt(_0x313186(0xd3))/0x6)+parseInt(_0x313186(0xd7))/0x7+-parseInt(_0x313186(0xd6))/0x8;if(_0x452539===_0x22053b)break;else _0x3b6605['push'](_0x3b6605['shift']());}catch(_0x47f12a){_0x3b6605['push'](_0x3b6605['shift']());}}}(a79_0x436a,0x5e53d));import{designCommand}from'../../services/dataset-design/commands.js';function a79_0x436a(){const _0x236842=['2032232OXJTXq','326214PJpQvc','75815EInsVm','5898BwHoaV','1105338TNotxP','3095YtIaye','6459928uGLkGb','4960781leHsDn','sync-status'];a79_0x436a=function(){return _0x236842;};return a79_0x436a();}export const datasetDesignSyncStatus=designCommand(a79_0x3d3ce5(0xd8));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a80_0x496b(_0x4d14f6,_0x3bc04d){_0x4d14f6=_0x4d14f6-0x154;const _0x28f85b=a80_0x28f8();let _0x496bd3=_0x28f85b[_0x4d14f6];return _0x496bd3;}(function(_0x1cce0b,_0x4b9e25){const _0x4e8d5c=a80_0x496b,_0x71a370=_0x1cce0b();while(!![]){try{const _0x547c8f=parseInt(_0x4e8d5c(0x157))/0x1*(parseInt(_0x4e8d5c(0x156))/0x2)+parseInt(_0x4e8d5c(0x15d))/0x3*(parseInt(_0x4e8d5c(0x15a))/0x4)+parseInt(_0x4e8d5c(0x158))/0x5+parseInt(_0x4e8d5c(0x159))/0x6*(-parseInt(_0x4e8d5c(0x154))/0x7)+-parseInt(_0x4e8d5c(0x155))/0x8+parseInt(_0x4e8d5c(0x15c))/0x9+parseInt(_0x4e8d5c(0x15e))/0xa*(-parseInt(_0x4e8d5c(0x15b))/0xb);if(_0x547c8f===_0x4b9e25)break;else _0x71a370['push'](_0x71a370['shift']());}catch(_0x4ccb2c){_0x71a370['push'](_0x71a370['shift']());}}}(a80_0x28f8,0x76c6b));import{designCommand}from'../../services/dataset-design/commands.js';function a80_0x28f8(){const _0x32a72c=['1624344KnoOZf','1sZafrx','462630TloXuI','12kmNdsl','4Yzkhwj','48257YwehDY','5849739NgCjiS','1980183tMqIyO','1730BOhjJH','242102RkvLOb','7200800hZJNjG'];a80_0x28f8=function(){return _0x32a72c;};return a80_0x28f8();}export const datasetDesignValidate=designCommand('validate');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a81_0x508277=a81_0x5265;function a81_0x5265(_0x4d2fae,_0x55fc34){_0x4d2fae=_0x4d2fae-0x15f;const _0x1609d1=a81_0x1609();let _0x5265b4=_0x1609d1[_0x4d2fae];return _0x5265b4;}function a81_0x1609(){const _0x574c68=['tableComment','7760648qzuBSw','253488UQIpPS','modelId','length','str','path','15PHkzgw','description','dataType','allFields','type','relations','alias','modifierNameField','options','fromField','allFieldNames','entries','toDatasetCode','relatedPageInfoList','formatRules','dblinkInfoDTO','pkField','modifierIdField','cardinality','fields','title','read','properties','name','createTimeField','toFieldLabel','dbType','map','detail','doVersion','extend','dbName','relationId','method','1675995TkEUMm','4EahxPp','30NmJXxl','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','code','tableName','requestFields','deprecated','creatorNameField','validateRules','modelCode','responseFields','responseBody','main_sub','toDatasetName','bizRelationType','sourceType','beforeScriptId','columnCodeListWithDeleted','213412pgUiVF','49884nExoBI','datasetKey','368306nivmbO','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','indexes','dataset','2167kjrLKQ','requestBody','dbtableConfig','toField','doType','split','filter','isArray','object','dbId','string','394551AQJqAS','host','7esDSSu','afterScriptId','deleted','required','displayName'];a81_0x1609=function(){return _0x574c68;};return a81_0x1609();}(function(_0x5c60b6,_0x538ef2){const _0x4f9cb3=a81_0x5265,_0x45ac78=_0x5c60b6();while(!![]){try{const _0xaf6338=parseInt(_0x4f9cb3(0x16c))/0x1+-parseInt(_0x4f9cb3(0x16f))/0x2*(-parseInt(_0x4f9cb3(0x18c))/0x3)+parseInt(_0x4f9cb3(0x1af))/0x4*(-parseInt(_0x4f9cb3(0x1ae))/0x5)+parseInt(_0x4f9cb3(0x187))/0x6+parseInt(_0x4f9cb3(0x180))/0x7*(-parseInt(_0x4f9cb3(0x186))/0x8)+parseInt(_0x4f9cb3(0x17e))/0x9*(-parseInt(_0x4f9cb3(0x1b0))/0xa)+parseInt(_0x4f9cb3(0x173))/0xb*(parseInt(_0x4f9cb3(0x16d))/0xc);if(_0xaf6338===_0x538ef2)break;else _0x45ac78['push'](_0x45ac78['shift']());}catch(_0x40025a){_0x45ac78['push'](_0x45ac78['shift']());}}}(a81_0x1609,0x885dd));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x1194a3){const _0x2ea286=a81_0x5265;if(_0x1194a3[_0x2ea286(0x182)])return null;const _0x46ef9f=Boolean(_0x1194a3[_0x2ea286(0x184)]!==undefined||_0x1194a3['doType']!==undefined);let _0x2d7e33={};if(!_0x46ef9f&&typeof _0x1194a3[_0x2ea286(0x1aa)]===_0x2ea286(0x17d))try{_0x2d7e33=JSON['parse'](_0x1194a3['extend']);}catch{}const _0x5581f1=_0x46ef9f?_0x1194a3[_0x2ea286(0x1a3)]:_0x1194a3[_0x2ea286(0x1b2)],_0x2d0ae9=_0x46ef9f?_0x1194a3[_0x2ea286(0x184)]:_0x1194a3[_0x2ea286(0x1a3)],_0x17251f=_0x46ef9f?_0x1194a3[_0x2ea286(0x177)]:_0x1194a3[_0x2ea286(0x190)]||_0x1194a3[_0x2ea286(0x18e)],_0x43425e=_0x46ef9f?_0x1194a3[_0x2ea286(0x19c)]===!![]:_0x2d7e33['pkField']===!![],_0x9e1af3=_0x46ef9f?_0x1194a3[_0x2ea286(0x183)]===!![]:_0x2d7e33[_0x2ea286(0x183)]===!![],_0x1e7808=_0x46ef9f?_0x1194a3[_0x2ea286(0x194)]??null:_0x2d7e33[_0x2ea286(0x194)]??null,_0xdc27ff={'name':_0x5581f1,'displayName':_0x2d0ae9||_0x5581f1,'type':_0x17251f,'dbType':_0x1194a3[_0x2ea286(0x1a6)],'pk':_0x43425e,'required':_0x9e1af3,'deprecated':_0x1194a3[_0x2ea286(0x160)]===!![],'description':_0x1194a3[_0x2ea286(0x18d)]||undefined};return Array[_0x2ea286(0x17a)](_0x1e7808)&&_0x1e7808[_0x2ea286(0x189)]>0x0&&(_0xdc27ff['options']=_0x1e7808),_0xdc27ff;}function parseJsonMaybe(_0x5ddc8e){if(typeof _0x5ddc8e!=='string')return _0x5ddc8e;try{return JSON['parse'](_0x5ddc8e);}catch{return _0x5ddc8e;}}function normalizeOperationEntry(_0x250fe7,_0x14f211){const _0x2cd86c=a81_0x5265;if(!_0x14f211||typeof _0x14f211!=='object')return null;if(!_0x14f211[_0x2cd86c(0x1ad)]||!_0x14f211[_0x2cd86c(0x18b)])return null;const _0x16ce61={'name':_0x250fe7,'method':_0x14f211[_0x2cd86c(0x1ad)],'path':_0x14f211[_0x2cd86c(0x18b)]};if(_0x14f211[_0x2cd86c(0x17f)])_0x16ce61[_0x2cd86c(0x17f)]=_0x14f211[_0x2cd86c(0x17f)];if(_0x14f211[_0x2cd86c(0x174)]!=null){const _0x1305eb=parseJsonMaybe(_0x14f211[_0x2cd86c(0x174)]);_0x16ce61[_0x2cd86c(0x174)]=_0x1305eb;}if(_0x14f211[_0x2cd86c(0x165)]!=null){const _0x2e373f=parseJsonMaybe(_0x14f211[_0x2cd86c(0x165)]);_0x16ce61[_0x2cd86c(0x165)]=_0x2e373f;}if(_0x14f211['beforeScriptId']!=null)_0x16ce61[_0x2cd86c(0x16a)]=_0x14f211[_0x2cd86c(0x16a)];if(_0x14f211[_0x2cd86c(0x181)]!=null)_0x16ce61['afterScriptId']=_0x14f211[_0x2cd86c(0x181)];if(Array[_0x2cd86c(0x17a)](_0x14f211[_0x2cd86c(0x15f)]))_0x16ce61[_0x2cd86c(0x15f)]=_0x14f211[_0x2cd86c(0x15f)];if(Array[_0x2cd86c(0x17a)](_0x14f211[_0x2cd86c(0x164)]))_0x16ce61[_0x2cd86c(0x164)]=_0x14f211[_0x2cd86c(0x164)];return _0x16ce61;}function summarizeDbtable(_0x2e4aa7){const _0x13f571=a81_0x5265,_0x37ee5f={},_0x4bfb18=['dbId',_0x13f571(0x1ab),_0x13f571(0x1b3),_0x13f571(0x16e),_0x13f571(0x19c),_0x13f571(0x18f),'logicField',_0x13f571(0x1a4),'updateTimeField','creatorIdField',_0x13f571(0x161),_0x13f571(0x19d),_0x13f571(0x193),'labelField',_0x13f571(0x19b)];for(const _0x132774 of _0x4bfb18){if(_0x2e4aa7[_0x132774]!==undefined)_0x37ee5f[_0x132774]=_0x2e4aa7[_0x132774];}return typeof _0x37ee5f[_0x13f571(0x18f)]==='string'&&_0x37ee5f[_0x13f571(0x18f)][_0x13f571(0x189)]>0x0&&(_0x37ee5f[_0x13f571(0x196)]=_0x37ee5f[_0x13f571(0x18f)][_0x13f571(0x178)](',')['map'](_0x5c199c=>_0x5c199c['trim']())[_0x13f571(0x179)](Boolean)),_0x37ee5f;}function normalizeRelatedPages(_0x5df75c){const _0x69f86d=a81_0x5265;if(!Array[_0x69f86d(0x17a)](_0x5df75c))return[];return _0x5df75c[_0x69f86d(0x179)](_0x53e686=>_0x53e686&&typeof _0x53e686===_0x69f86d(0x17b))[_0x69f86d(0x1a7)](_0x11d8dc=>({'id':_0x11d8dc['id'],'type':_0x11d8dc[_0x69f86d(0x190)],'code':_0x11d8dc[_0x69f86d(0x1b2)],'title':_0x11d8dc[_0x69f86d(0x1a0)],'deleted':_0x11d8dc['deleted']===!![]}));}export const datasetDetail={'service':a81_0x508277(0x172),'command':a81_0x508277(0x1a8),'description':a81_0x508277(0x170),'risk':a81_0x508277(0x1a1),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0x508277(0x192),'type':a81_0x508277(0x17d),'description':a81_0x508277(0x1b1)}],async 'execute'(_0x171682){const _0x22e7b3=a81_0x508277,_0x27105d=await getDatasetDetail(_0x171682[_0x22e7b3(0x18a)](_0x22e7b3(0x1b2))),_0x3093ff=Array['isArray'](_0x27105d[_0x22e7b3(0x19f)])?_0x27105d[_0x22e7b3(0x19f)]:Array[_0x22e7b3(0x17a)](_0x27105d[_0x22e7b3(0x1a2)])?_0x27105d[_0x22e7b3(0x1a2)]:[],_0x10e6dc=_0x3093ff['map'](_0x311a3d=>normalizeField(_0x311a3d))[_0x22e7b3(0x179)](_0x295f21=>_0x295f21!==null),_0x12024a=_0x27105d['operations']??{},_0x97006b=[];for(const [_0x37c506,_0x3c0b86]of Object[_0x22e7b3(0x197)](_0x12024a)){const _0x375195=normalizeOperationEntry(_0x37c506,_0x3c0b86);if(_0x375195)_0x97006b['push'](_0x375195);}const _0x345a4a=_0x27105d[_0x22e7b3(0x175)]??{},_0xa9aaf7=_0x27105d[_0x22e7b3(0x172)]??{},_0x7c5f7e=_0x345a4a[_0x22e7b3(0x17c)]!=null?{'id':_0x345a4a[_0x22e7b3(0x17c)],'name':_0x345a4a[_0x22e7b3(0x1ab)]??null}:undefined;let _0x211c6b;return typeof _0x27105d[_0x22e7b3(0x1aa)]==='string'&&(_0x211c6b=parseJsonMaybe(_0x27105d[_0x22e7b3(0x1aa)])),{'ok':!![],'data':{'id':_0x27105d[_0x22e7b3(0x188)]??_0x27105d['id'],'name':_0x27105d[_0x22e7b3(0x1a3)],'code':_0x27105d[_0x22e7b3(0x163)]||_0x27105d[_0x22e7b3(0x1b2)],'doVersion':_0x27105d[_0x22e7b3(0x1a9)],'description':_0x27105d[_0x22e7b3(0x18d)]||_0xa9aaf7[_0x22e7b3(0x185)]||undefined,'source':_0x27105d['source']||_0xa9aaf7[_0x22e7b3(0x169)],'table':_0x345a4a['tableName']||_0xa9aaf7[_0x22e7b3(0x1b3)],'datasetKey':_0x345a4a['datasetKey'],'pk':_0x345a4a[_0x22e7b3(0x19c)],'db':_0x7c5f7e,'dbtable':summarizeDbtable(_0x345a4a),'fields':_0x10e6dc,'operations':_0x97006b,'indexes':Array[_0x22e7b3(0x17a)](_0xa9aaf7[_0x22e7b3(0x171)])?_0xa9aaf7[_0x22e7b3(0x171)]:[],'relations':Array[_0x22e7b3(0x17a)](_0x27105d[_0x22e7b3(0x191)])?_0x27105d[_0x22e7b3(0x191)]['map'](_0x1fb62a=>({..._0x1fb62a[_0x22e7b3(0x1ac)]!=null?{'relationId':_0x1fb62a[_0x22e7b3(0x1ac)]}:{},'fromDataset':_0x27105d[_0x22e7b3(0x1a3)],'fromCode':_0x27105d[_0x22e7b3(0x163)]||_0x27105d[_0x22e7b3(0x1b2)],'fromTable':_0x345a4a[_0x22e7b3(0x1b3)]||_0xa9aaf7[_0x22e7b3(0x1b3)],'fromField':_0x1fb62a[_0x22e7b3(0x195)],'toDataset':_0x1fb62a[_0x22e7b3(0x167)],'toCode':_0x1fb62a[_0x22e7b3(0x198)],'toTable':_0x1fb62a['toTableName'],'toField':_0x1fb62a[_0x22e7b3(0x176)],'labelField':_0x1fb62a[_0x22e7b3(0x1a5)]||undefined,'cardinality':_0x1fb62a[_0x22e7b3(0x19e)]||undefined,'bizRelationType':_0x1fb62a[_0x22e7b3(0x168)]===_0x22e7b3(0x166)?_0x22e7b3(0x166):null})):[],'relatedPages':normalizeRelatedPages(_0x27105d[_0x22e7b3(0x199)]),...Array[_0x22e7b3(0x17a)](_0x27105d[_0x22e7b3(0x16b)])?{'columnCodeListWithDeleted':_0x27105d[_0x22e7b3(0x16b)]}:{},'formatRules':Array[_0x22e7b3(0x17a)](_0x27105d[_0x22e7b3(0x19a)])?_0x27105d['formatRules']:[],'validateRules':Array[_0x22e7b3(0x17a)](_0x27105d[_0x22e7b3(0x162)])?_0x27105d[_0x22e7b3(0x162)]:[],..._0x211c6b!==undefined?{'extend':_0x211c6b}:{},'stats':{'fieldCount':_0x10e6dc[_0x22e7b3(0x189)],'operationCount':_0x97006b['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x4657cb=a82_0x2cb9;(function(_0x1d7619,_0x2ec96d){const _0x4ec11e=a82_0x2cb9,_0x201056=_0x1d7619();while(!![]){try{const _0x37ca32=parseInt(_0x4ec11e(0xe5))/0x1*(-parseInt(_0x4ec11e(0x112))/0x2)+parseInt(_0x4ec11e(0xf9))/0x3+-parseInt(_0x4ec11e(0xe7))/0x4*(-parseInt(_0x4ec11e(0xdb))/0x5)+-parseInt(_0x4ec11e(0x10d))/0x6+-parseInt(_0x4ec11e(0xf4))/0x7+-parseInt(_0x4ec11e(0x10e))/0x8+parseInt(_0x4ec11e(0xe2))/0x9*(parseInt(_0x4ec11e(0x110))/0xa);if(_0x37ca32===_0x2ec96d)break;else _0x201056['push'](_0x201056['shift']());}catch(_0x27726e){_0x201056['push'](_0x201056['shift']());}}}(a82_0x2b2f,0x5bf8f));function a82_0x2cb9(_0x11b966,_0x2f107b){_0x11b966=_0x11b966-0xd1;const _0x2b2fae=a82_0x2b2f();let _0x2cb949=_0x2b2fae[_0x11b966];return _0x2cb949;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a82_0x4657cb(0x113),{'message':a82_0x4657cb(0x115),'hint':a82_0x4657cb(0xf8)}]]);export function parseJsonObjectFlag(_0x3f46eb,_0x752941){const _0x4d2fa6=a82_0x4657cb;if(!_0x3f46eb)return undefined;let _0x56af85;try{_0x56af85=JSON['parse'](_0x3f46eb);}catch(_0x59c61b){const _0x24fc78=_0x59c61b instanceof Error?_0x59c61b['message']:String(_0x59c61b);throw CliErrors[_0x4d2fa6(0xf0)](_0x752941+_0x4d2fa6(0xdc)+_0x24fc78);}if(!isPlainObject(_0x56af85)||Array[_0x4d2fa6(0xd3)](_0x56af85))throw CliErrors['validation'](_0x752941+'\x20must\x20be\x20a\x20JSON\x20object');return _0x56af85;}export function validateExtendPatchKeys(_0x2aa43f){const _0x19839c=a82_0x4657cb,_0x528063=Object[_0x19839c(0x100)](_0x2aa43f);if(_0x528063[_0x19839c(0x109)]===0x0)throw CliErrors[_0x19839c(0xf0)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x3cac78 of _0x528063){const _0x23514f=EXTEND_PATCH_REDIRECTS[_0x19839c(0xe0)](_0x3cac78);if(_0x23514f)throw CliErrors[_0x19839c(0xf0)](_0x23514f[_0x19839c(0xfd)],_0x23514f[_0x19839c(0x107)]);if(!MUTABLE_EXTEND_KEYS[_0x19839c(0xec)](_0x3cac78))throw CliErrors[_0x19839c(0xf0)]('Unsupported\x20patch\x20key:\x20'+_0x3cac78,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x5c78f4=a82_0x4657cb,_0x5b8730=Array[_0x5c78f4(0xfe)](MUTABLE_EXTEND_KEYS)[_0x5c78f4(0xee)]();return _0x5b8730['length']>0x0?_0x5c78f4(0xdf)+_0x5b8730[_0x5c78f4(0xd9)](',\x20'):_0x5c78f4(0xd6);}export function applyExtendPatch(_0x297947,_0x1f1db7){const _0x5d8519=a82_0x4657cb;validateExtendPatchKeys(_0x1f1db7);const _0x389252=deepClone(_0x297947),_0x14f034=[];for(const [_0x2d58fc,_0x2cb560]of Object['entries'](_0x1f1db7)){const _0x459a57=_0x389252[_0x2d58fc],_0x586db4=deepClone(_0x2cb560);!deepEqual(_0x459a57,_0x586db4)&&(_0x389252[_0x2d58fc]=_0x586db4,_0x14f034[_0x5d8519(0xef)](_0x5d8519(0xe3)+_0x2d58fc));}return _0x14f034[_0x5d8519(0xee)](),{'after':_0x389252,'changedPaths':_0x14f034,'changed':_0x14f034[_0x5d8519(0x109)]>0x0};}export function assertExpectation(_0x5f10c2,_0x14b4ac){const _0x4774a8=a82_0x4657cb;if(!_0x14b4ac)return;for(const [_0x529b20,_0x206fbb]of Object[_0x4774a8(0xea)](_0x14b4ac)){const _0x43d692=_0x5f10c2[_0x529b20];if(!deepEqual(_0x43d692,_0x206fbb))throw CliErrors[_0x4774a8(0xf0)](_0x4774a8(0x102)+_0x529b20,_0x4774a8(0x10c)+JSON[_0x4774a8(0xf1)](_0x206fbb)+_0x4774a8(0x101)+JSON[_0x4774a8(0xf1)](_0x43d692));}}export async function buildDatasetExtendUpdateResult({appCode:_0x525563,input:_0x36b842,dryRun:_0x47af8e}){const _0x2be64d=a82_0x4657cb;validateInput(_0x36b842);const _0x56175f=await getDatasetDetail(_0x36b842['code']),_0x2610fe=parseDatasetExtend(_0x56175f[_0x2be64d(0xeb)]),_0x5186f9=deepClone(_0x2610fe[_0x2be64d(0x106)]);assertExpectation(_0x5186f9,_0x36b842['expect']);const {after:_0x57fc75,changedPaths:_0x5c7d50,changed:_0x16327d}=applyExtendPatch(_0x5186f9,_0x36b842['patch']),_0x14ea7a=summarizeDataset(_0x56175f,_0x36b842[_0x2be64d(0x104)]);return _0x16327d&&!_0x47af8e&&(_0x56175f[_0x2be64d(0xeb)]=serializeDatasetExtend(_0x57fc75,_0x2610fe[_0x2be64d(0xd7)]),await updateDrivenData(_0x56175f)),{'ok':!![],'data':{'appCode':_0x525563,'selector':{'code':_0x36b842[_0x2be64d(0x104)]},'dataset':_0x14ea7a,'dryRun':_0x47af8e,'changed':_0x16327d,'changedPaths':_0x5c7d50,'before':{'extend':_0x5186f9},'after':{'extend':_0x57fc75},'submitted':_0x16327d&&!_0x47af8e},'message':_0x16327d?_0x47af8e?_0x2be64d(0xff)+_0x5c7d50[_0x2be64d(0xd9)](',\x20')+')':_0x2be64d(0x114)+_0x5c7d50[_0x2be64d(0xd9)](',\x20')+')':_0x2be64d(0xfc)};}function a82_0x2b2f(){const _0x585efc=[',\x20actual\x20','Expectation\x20mismatch\x20at\x20extend.','patch','code','string','value','hint','data','length','modelCode','dataset','Expected\x20','2381292myajYa','3795920HnHkbb','Patch\x20dataset\x20top-level\x20extend\x20safely','1087590MxVYEJ','--expect-json','164zGyMnW','businessGroup','Updated\x20dataset\x20extend\x20(','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','str','isArray','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','/smartapi/dataset/update-driven-data','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','shape','expect-json','join','trim','110fdEojH','\x20must\x20be\x20valid\x20JSON\x20object:\x20','tableName','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','Allowed\x20keys:\x20','get','patch-json','153tfjlvR','extend.','dbName','5899wBdQmo','datasetId','75316bRUQNK','parse','dbId','entries','extend','has','--code\x20is\x20required','sort','push','validation','stringify','extend-update','modelId','4898957RCiTZG','object','appCode','datasetName','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','505557NcEkJm','write','--patch-json','No\x20changes\x20for\x20dataset\x20extend','message','from','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','keys'];a82_0x2b2f=function(){return _0x585efc;};return a82_0x2b2f();}export const datasetExtendUpdate={'service':'dataset','command':a82_0x4657cb(0xf2),'description':a82_0x4657cb(0x10f),'risk':a82_0x4657cb(0xfa),'flags':[CODE_FLAG,{'name':a82_0x4657cb(0xe1),'type':a82_0x4657cb(0x105),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a82_0x4657cb(0xd8),'type':'string','required':![],'description':a82_0x4657cb(0xde)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f3cee){validateInput(readExtendUpdateInput(_0x1f3cee));},async 'dryRun'(_0x4feaaf){const _0x509934=a82_0x4657cb,_0x46837e=await buildDatasetExtendUpdateResult({'appCode':_0x4feaaf[_0x509934(0xf6)],'input':readExtendUpdateInput(_0x4feaaf),'dryRun':!![]});return{'method':'POST','url':_0x509934(0xd5),'body':_0x46837e[_0x509934(0x108)],'description':_0x46837e[_0x509934(0xfd)]};},async 'execute'(_0x2b4fba){return buildDatasetExtendUpdateResult({'appCode':_0x2b4fba['appCode'],'input':readExtendUpdateInput(_0x2b4fba),'dryRun':![]});}};function readExtendUpdateInput(_0x4169c6){const _0x27a0a9=a82_0x4657cb,_0x3b2f6c=trim(_0x4169c6[_0x27a0a9(0xd2)](_0x27a0a9(0x104))),_0x505aca=parseJsonObjectFlag(_0x4169c6[_0x27a0a9(0xd2)](_0x27a0a9(0xe1)),_0x27a0a9(0xfb)),_0x129db4=parseJsonObjectFlag(_0x4169c6[_0x27a0a9(0xd2)](_0x27a0a9(0xd8)),_0x27a0a9(0x111));return{'code':_0x3b2f6c,'patch':_0x505aca||{},'expect':_0x129db4};}function validateInput(_0x206ebb){const _0x7fefe7=a82_0x4657cb;if(!_0x206ebb[_0x7fefe7(0x104)])throw CliErrors[_0x7fefe7(0xf0)](_0x7fefe7(0xed));validateExtendPatchKeys(_0x206ebb[_0x7fefe7(0x103)]);}function parseDatasetExtend(_0x112381){const _0x55e831=a82_0x4657cb;if(typeof _0x112381===_0x55e831(0x105)){const _0x1392c9=_0x112381[_0x55e831(0xda)]();if(!_0x1392c9)return{'value':{},'shape':_0x55e831(0x105)};let _0xdfe6cf;try{_0xdfe6cf=JSON[_0x55e831(0xe8)](_0x1392c9);}catch(_0x23ac79){const _0x458df7=_0x23ac79 instanceof Error?_0x23ac79['message']:String(_0x23ac79);throw CliErrors[_0x55e831(0xf0)](_0x55e831(0xd4)+_0x458df7);}if(!isPlainObject(_0xdfe6cf)||Array['isArray'](_0xdfe6cf))throw CliErrors[_0x55e831(0xf0)](_0x55e831(0xd1));return{'value':_0xdfe6cf,'shape':_0x55e831(0x105)};}if(_0x112381===undefined||_0x112381===null)return{'value':{},'shape':_0x55e831(0x105)};if(!isPlainObject(_0x112381)||Array[_0x55e831(0xd3)](_0x112381))throw CliErrors[_0x55e831(0xf0)](_0x55e831(0xd1));return{'value':_0x112381,'shape':'object'};}function serializeDatasetExtend(_0x340189,_0x3291c3){const _0x34ceef=a82_0x4657cb;return _0x3291c3===_0x34ceef(0x105)?JSON[_0x34ceef(0xf1)](_0x340189):_0x340189;}function summarizeDataset(_0x52fa1b,_0xed009a){const _0x38f069=a82_0x4657cb,_0x5b09d7=isPlainObject(_0x52fa1b[_0x38f069(0x10b)])?_0x52fa1b[_0x38f069(0x10b)]:{},_0x8f28d8=isPlainObject(_0x52fa1b['dbtableConfig'])?_0x52fa1b['dbtableConfig']:{};return{'id':_0x52fa1b[_0x38f069(0xf3)]??_0x52fa1b['id']??_0x5b09d7[_0x38f069(0xe6)]??null,'code':_0x52fa1b[_0x38f069(0x10a)]??_0x52fa1b['code']??_0x5b09d7['datasetCode']??_0xed009a,'name':_0x52fa1b['name']??_0x5b09d7[_0x38f069(0xf7)]??null,'table':_0x8f28d8['tableName']??_0x5b09d7[_0x38f069(0xdd)]??null,'db':_0x8f28d8[_0x38f069(0xe4)]??_0x8f28d8[_0x38f069(0xe9)]??null};}function deepClone(_0x2524de){const _0x4bb49f=a82_0x4657cb;if(_0x2524de===undefined)return _0x2524de;return JSON['parse'](JSON[_0x4bb49f(0xf1)](_0x2524de));}function deepEqual(_0x28ad3a,_0x36fe97){const _0x37f8bb=a82_0x4657cb;return JSON['stringify'](_0x28ad3a)===JSON[_0x37f8bb(0xf1)](_0x36fe97);}function isPlainObject(_0x530d44){const _0x5783b0=a82_0x4657cb;return Boolean(_0x530d44)&&typeof _0x530d44===_0x5783b0(0xf5)&&!Array[_0x5783b0(0xd3)](_0x530d44);}function trim(_0x3893eb){const _0x4b759f=a82_0x4657cb,_0x1fe60a=String(_0x3893eb||'')[_0x4b759f(0xda)]();return _0x1fe60a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x53c348=a83_0x112d;function a83_0x2c11(){const _0x4fb926=['write','field-restore','warnings','mutation-outcome-unknown','POST','1074950RvXwNB','data','12EGsyNG','message','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','displayName','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','field','isArray','trim','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','4312ZzSKTS','7458uBJBzV','all','2662472hkXPpK','length','fields','unknown','71668UumQJx','validation','Dry-run:\x20Dataset\x20field\x20','45mUMVMK','dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.','42BgIuBi','appCode','filter','35YZajyP','Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.','dataset','\x20would\x20be\x20restored','server-restored-count-mismatch','backend','some','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','name','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','str','deleted','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','514088jpeszI','94382upfnAu','35364EeMuOv','properties','string','/smartapi/dataset/restore-column','map','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','code'];a83_0x2c11=function(){return _0x4fb926;};return a83_0x2c11();}(function(_0x7431e8,_0x474bee){const _0x373d9b=a83_0x112d,_0x585a40=_0x7431e8();while(!![]){try{const _0x20f83b=-parseInt(_0x373d9b(0xaa))/0x1+parseInt(_0x373d9b(0xab))/0x2*(-parseInt(_0x373d9b(0xbb))/0x3)+-parseInt(_0x373d9b(0x92))/0x4*(-parseInt(_0x373d9b(0x9b))/0x5)+parseInt(_0x373d9b(0xc6))/0x6*(-parseInt(_0x373d9b(0x98))/0x7)+parseInt(_0x373d9b(0xc8))/0x8+-parseInt(_0x373d9b(0x95))/0x9*(parseInt(_0x373d9b(0xb9))/0xa)+parseInt(_0x373d9b(0xc5))/0xb*(parseInt(_0x373d9b(0xac))/0xc);if(_0x20f83b===_0x474bee)break;else _0x585a40['push'](_0x585a40['shift']());}catch(_0x45db5f){_0x585a40['push'](_0x585a40['shift']());}}}(a83_0x2c11,0x59463));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{normalizeUserDeletedField,resolveDataset}from'../../commands/dataset/user-deleted-field-list.js';import{getDatasetDetail,isPlatformTransportFailure,listUserDeletedDatasetColumns,restoreDatasetColumns}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PAGE_SYNC_WARNING=a83_0x53c348(0x97),NO_RESUBMIT_WARNING=a83_0x53c348(0x9c);export async function buildDatasetFieldRestoreResult({appCode:_0x580d6b,input:_0xf63f0f,dryRun:_0x478da2}){const _0x407a1c=a83_0x53c348,_0x48b2e6=_0xf63f0f[_0x407a1c(0xb3)][_0x407a1c(0xc2)](),_0x49e744=_0xf63f0f[_0x407a1c(0xc0)][_0x407a1c(0xc2)]();if(!_0x48b2e6)throw CliErrors['validation']('--code\x20is\x20required');if(!_0x49e744)throw CliErrors[_0x407a1c(0x93)]('--field\x20is\x20required');const _0x517464=await getDatasetDetail(_0x48b2e6),_0x47163c=resolveDataset(_0x517464,_0x48b2e6),_0x5a1ea9=(await listUserDeletedDatasetColumns(_0x47163c['id']))[_0x407a1c(0xb0)](normalizeUserDeletedField),_0x1f4512=_0x5a1ea9[_0x407a1c(0x9a)](_0x571da9=>_0x571da9[_0x407a1c(0xb3)]===_0x49e744);if(_0x1f4512[_0x407a1c(0x8f)]===0x0)throw CliErrors[_0x407a1c(0x93)](_0x407a1c(0xbf)+_0x49e744,'Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.');if(_0x1f4512[_0x407a1c(0x8f)]>0x1)throw CliErrors['validation'](_0x407a1c(0xb2)+_0x49e744,_0x407a1c(0xc3));const _0x288670=_0x1f4512[0x0],_0x328256={'id':_0x288670['id'],'code':_0x288670['code'],'displayName':_0x288670[_0x407a1c(0xbe)],'deleted':![],'active':!![]},_0x3acd58={'operation':_0x407a1c(0xb5),'appCode':_0x580d6b,'selector':{'code':_0x48b2e6,'field':_0x49e744},'dataset':_0x47163c,'before':_0x288670,'dryRun':_0x478da2,'warnings':[PAGE_SYNC_WARNING]};if(_0x478da2)return{'ok':!![],'data':{..._0x3acd58,'after':_0x328256,'backend':{'submitted':![],'requestedColumnIds':[_0x288670['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x407a1c(0x94)+_0x49e744+_0x407a1c(0x9e)};let _0x234e66=null,_0x52243d=![];try{_0x234e66=await restoreDatasetColumns(_0x47163c['id'],[_0x288670['id']]);}catch(_0x391b76){if(!isPlatformTransportFailure(_0x391b76))throw _0x391b76;_0x52243d=!![];}const _0x443143={'submitted':!![],'requestedColumnIds':[_0x288670['id']],'restoredCount':_0x234e66,..._0x52243d?{'outcome':_0x407a1c(0x91)}:{}};let _0x4c6fa0,_0xfd1621;try{[_0x4c6fa0,_0xfd1621]=await Promise[_0x407a1c(0xc7)]([listUserDeletedDatasetColumns(_0x47163c['id']),getDatasetDetail(_0x48b2e6)]);}catch{return{'ok':![],'data':{..._0x3acd58,'after':null,'backend':_0x443143,'warnings':[..._0x3acd58[_0x407a1c(0xb6)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x52243d?_0x407a1c(0xb7):'readback-failed'}},'message':_0x52243d?_0x407a1c(0xc4)+_0x49e744+'.\x20'+NO_RESUBMIT_WARNING:_0x407a1c(0xa5)+_0x49e744+'.\x20'+NO_RESUBMIT_WARNING};}const _0x4ac025=!_0x4c6fa0[_0x407a1c(0xa1)](_0x2b411c=>Number(_0x2b411c['id'])===_0x288670['id']||_0x2b411c[_0x407a1c(0xb3)]===_0x49e744),_0x19d83d=findActiveField(_0xfd1621,_0x288670['id'],_0x49e744),_0x2180de=_0x19d83d!==null,_0x39478a=!_0x52243d&&_0x234e66===0x1&&_0x4ac025&&_0x2180de,_0x48edaf={'performed':!![],'deletedListCleared':_0x4ac025,'activeFieldPresent':_0x2180de,'passed':_0x39478a,..._0x52243d?{'reason':_0x407a1c(0xb7)}:_0x234e66!==0x1?{'reason':_0x407a1c(0x9f)}:{}};return{'ok':_0x39478a,'data':{..._0x3acd58,'after':_0x19d83d,'backend':_0x443143,'warnings':_0x39478a?_0x3acd58[_0x407a1c(0xb6)]:[..._0x3acd58['warnings'],NO_RESUBMIT_WARNING],'verification':_0x48edaf},'message':_0x39478a?'Restored\x20Dataset\x20field\x20'+_0x49e744:_0x52243d?_0x407a1c(0xc4)+_0x49e744+'.\x20'+NO_RESUBMIT_WARNING:_0x407a1c(0xbd)+_0x49e744+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x53c348(0x9d),'command':a83_0x53c348(0xb5),'description':'Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','risk':a83_0x53c348(0xb4),'structuredErrors':!![],'rejectedFlags':[{'name':a83_0x53c348(0xc7),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':a83_0x53c348(0xa9)},{'name':a83_0x53c348(0x90),'message':a83_0x53c348(0xa2),'hint':a83_0x53c348(0xa9)},{'name':'yes','message':a83_0x53c348(0xa8),'hint':'Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.'},{'name':'confirm','message':a83_0x53c348(0x96),'hint':a83_0x53c348(0xa4)}],'flags':[CODE_FLAG,{'name':a83_0x53c348(0xc0),'type':a83_0x53c348(0xae),'required':!![],'description':a83_0x53c348(0xb1)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3797d4){readInput(_0x3797d4);},async 'dryRun'(_0x58218a){const _0x185c69=a83_0x53c348,_0x1dbee1=await buildDatasetFieldRestoreResult({'appCode':_0x58218a['appCode'],'input':readInput(_0x58218a),'dryRun':!![]});return asDryRunResult({..._0x1dbee1[_0x185c69(0xba)],'body':{'datasetId':_0x1dbee1[_0x185c69(0xba)][_0x185c69(0x9d)]['id'],'columnIds':_0x1dbee1['data'][_0x185c69(0xa0)]['requestedColumnIds']}},{'method':_0x185c69(0xb8),'url':_0x185c69(0xaf),'description':_0x1dbee1[_0x185c69(0xbc)]});},async 'execute'(_0xd705bd){const _0x379b6d=a83_0x53c348;return buildDatasetFieldRestoreResult({'appCode':_0xd705bd[_0x379b6d(0x99)],'input':readInput(_0xd705bd),'dryRun':![]});}};function a83_0x112d(_0x23e20d,_0x148a68){_0x23e20d=_0x23e20d-0x8f;const _0x2c116d=a83_0x2c11();let _0x112db6=_0x2c116d[_0x23e20d];return _0x112db6;}function readInput(_0x1c52bb){const _0x396515=a83_0x53c348,_0x3bddd9={'code':String(_0x1c52bb[_0x396515(0xa6)](_0x396515(0xb3))||'')[_0x396515(0xc2)](),'field':String(_0x1c52bb[_0x396515(0xa6)]('field')||'')[_0x396515(0xc2)]()};if(!_0x3bddd9['code'])throw CliErrors[_0x396515(0x93)]('--code\x20is\x20required');if(!_0x3bddd9['field'])throw CliErrors[_0x396515(0x93)]('--field\x20is\x20required');return _0x3bddd9;}function findActiveField(_0x4f44bc,_0x14c4af,_0x1afc4c){const _0x478367=a83_0x53c348,_0x39dfa8=Array[_0x478367(0xc1)](_0x4f44bc[_0x478367(0x90)]),_0x3c9fa0=_0x39dfa8?_0x4f44bc[_0x478367(0x90)]:Array[_0x478367(0xc1)](_0x4f44bc[_0x478367(0xad)])?_0x4f44bc[_0x478367(0xad)]:[];for(const _0x3dd1ed of _0x3c9fa0){if(!_0x3dd1ed||typeof _0x3dd1ed!=='object')continue;const _0x1c1c28=_0x3dd1ed,_0x5d7dd3=_0x39dfa8?_0x1c1c28[_0x478367(0xa3)]:_0x1c1c28[_0x478367(0xb3)],_0x1932c0=_0x1c1c28[_0x478367(0xa7)]!==!![]&&Number(_0x1c1c28['id'])===_0x14c4af&&_0x5d7dd3===_0x1afc4c;if(!_0x1932c0)continue;const _0xbd1fbf=_0x39dfa8?_0x1c1c28[_0x478367(0xbe)]:_0x1c1c28['name'];return{'id':_0x14c4af,'code':_0x1afc4c,'displayName':typeof _0xbd1fbf===_0x478367(0xae)&&_0xbd1fbf?_0xbd1fbf:_0x1afc4c,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0xbc5188=a84_0x3f1b;(function(_0x108400,_0x30977b){const _0x1f96e7=a84_0x3f1b,_0x4849f4=_0x108400();while(!![]){try{const _0x27f5f5=-parseInt(_0x1f96e7(0xb6))/0x1*(-parseInt(_0x1f96e7(0xe3))/0x2)+parseInt(_0x1f96e7(0xcd))/0x3*(parseInt(_0x1f96e7(0xd6))/0x4)+-parseInt(_0x1f96e7(0xda))/0x5*(parseInt(_0x1f96e7(0xe4))/0x6)+parseInt(_0x1f96e7(0xd5))/0x7+parseInt(_0x1f96e7(0xe8))/0x8*(-parseInt(_0x1f96e7(0xde))/0x9)+parseInt(_0x1f96e7(0xf9))/0xa*(-parseInt(_0x1f96e7(0xed))/0xb)+-parseInt(_0x1f96e7(0xea))/0xc*(-parseInt(_0x1f96e7(0xbe))/0xd);if(_0x27f5f5===_0x30977b)break;else _0x4849f4['push'](_0x4849f4['shift']());}catch(_0x4de7bb){_0x4849f4['push'](_0x4849f4['shift']());}}}(a84_0x2c73,0xc3fcb));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a84_0xbc5188(0xaf),a84_0xbc5188(0xca),a84_0xbc5188(0xcb),'options',a84_0xbc5188(0xd4),'datetimeFormat','defaultAggregation',a84_0xbc5188(0xf8),a84_0xbc5188(0xce)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0xbc5188(0xc9),'code',a84_0xbc5188(0xe7),a84_0xbc5188(0xb0),a84_0xbc5188(0xb4),a84_0xbc5188(0xc6),a84_0xbc5188(0xb8),a84_0xbc5188(0xcf),'pkField',a84_0xbc5188(0xc7),a84_0xbc5188(0xef)]);function a84_0x2c73(){const _0x360597=['stringify','datasetId','properties','3809xGCwjQ','modelId','sort','join','entries','appCode','field-update','isArray','dbFieldName','autoIncrement','str','name','displayName','description','Expected\x20','1851837uGNqtf','deprecated','deleted','trim','add','Forbidden\x20patch\x20key:\x20','\x20must\x20be\x20a\x20JSON\x20object','required','549514bdUzyK','8LcFZIo','code','data','has','4467070vbVbLj','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','size','expect-json','2232goPvdu','Field\x20not\x20found:\x20','string','validation','Unsupported\x20patch\x20key:\x20','742618mztRXU','6ElJzsC','patch-json','write','dbType','26360tyXrVl','length','648ccybnG','Updated\x20dataset\x20field\x20','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','2431qPjtNg','\x20would\x20change\x20(','systemRetain','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Allowed\x20keys:\x20','fields','Exact\x20raw\x20fields[].name\x20to\x20patch',',\x20actual\x20','dataset','datasetName','chartRole','13610IWjyxm','keys','field','dbtableConfig','message','modelCode','findIndex','patch','from','doType','dbTypeLen','\x20must\x20be\x20valid\x20JSON\x20object:\x20','--field\x20is\x20required','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','dbTypeScale','expect','4vNFcVb','POST','tableName','datasetCode','No\x20changes\x20for\x20dataset\x20field\x20'];a84_0x2c73=function(){return _0x360597;};return a84_0x2c73();}export function parseJsonObjectFlag(_0x349d6e,_0x3c7849){const _0x7be8c4=a84_0xbc5188;if(!_0x349d6e)return undefined;let _0x4886cd;try{_0x4886cd=JSON['parse'](_0x349d6e);}catch(_0x53f873){const _0x1371b2=_0x53f873 instanceof Error?_0x53f873[_0x7be8c4(0xaa)]:String(_0x53f873);throw CliErrors[_0x7be8c4(0xe1)](_0x3c7849+_0x7be8c4(0xb1)+_0x1371b2);}if(!isPlainObject(_0x4886cd)||Array['isArray'](_0x4886cd))throw CliErrors[_0x7be8c4(0xe1)](_0x3c7849+_0x7be8c4(0xd3));return _0x4886cd;}export function validatePatchKeys(_0x45b45d){const _0x3bcf5b=a84_0xbc5188,_0x145fe8=Object['keys'](_0x45b45d);if(_0x145fe8[_0x3bcf5b(0xe9)]===0x0)throw CliErrors['validation'](_0x3bcf5b(0xdb));for(const _0x4ef21f of _0x145fe8){if(FORBIDDEN_FIELD_KEYS[_0x3bcf5b(0xd9)](_0x4ef21f))throw CliErrors['validation'](_0x3bcf5b(0xd2)+_0x4ef21f);if(!MUTABLE_FIELD_KEYS[_0x3bcf5b(0xd9)](_0x4ef21f))throw CliErrors[_0x3bcf5b(0xe1)](_0x3bcf5b(0xe2)+_0x4ef21f,_0x3bcf5b(0xf2)+Array[_0x3bcf5b(0xae)](MUTABLE_FIELD_KEYS)[_0x3bcf5b(0xc1)](',\x20'));}}export function applyFieldPatch(_0xe50707,_0x34f768){const _0x80356a=a84_0xbc5188;validatePatchKeys(_0x34f768);const _0x243d51=deepClone(_0xe50707),_0x335ec5=new Set();for(const [_0x3b1336,_0x75ef86]of Object[_0x80356a(0xc2)](_0x34f768)){const _0x512f88=_0x243d51[_0x3b1336],_0x3f30e6=mergePatchValue(_0x512f88,_0x75ef86);!deepEqual(_0x512f88,_0x3f30e6)&&(_0x243d51[_0x3b1336]=_0x3f30e6,_0x335ec5[_0x80356a(0xd1)](_0x3b1336),collectChangedPaths(_0x3b1336,_0x512f88,_0x3f30e6,_0x335ec5));}return{'after':_0x243d51,'changedPaths':Array[_0x80356a(0xae)](_0x335ec5)[_0x80356a(0xc0)](),'changed':_0x335ec5[_0x80356a(0xdc)]>0x0};}export function assertExpectation(_0x359340,_0x580adf){const _0x31e992=a84_0xbc5188;if(!_0x580adf)return;for(const [_0x465a93,_0x2784f5]of Object[_0x31e992(0xc2)](_0x580adf)){const _0x3248d9=_0x359340[_0x465a93];if(!deepEqual(_0x3248d9,_0x2784f5))throw CliErrors[_0x31e992(0xe1)]('Expectation\x20mismatch\x20at\x20'+_0x465a93,_0x31e992(0xcc)+JSON[_0x31e992(0xbb)](_0x2784f5)+_0x31e992(0xf5)+JSON[_0x31e992(0xbb)](_0x3248d9));}}function a84_0x3f1b(_0x454dcb,_0x2fe574){_0x454dcb=_0x454dcb-0xa9;const _0x2c735d=a84_0x2c73();let _0x3f1b92=_0x2c735d[_0x454dcb];return _0x3f1b92;}export async function buildDatasetFieldUpdateResult({appCode:_0x11581d,input:_0x191957,dryRun:_0x185b80}){const _0xe545e=a84_0xbc5188;validateInput(_0x191957);const _0x5cc29e=await getDatasetDetail(_0x191957['code']),_0x812a26=readFieldArray(_0x5cc29e),_0x4887d3=_0x812a26[_0xe545e(0xac)](_0x54da17=>_0x54da17?.['name']===_0x191957['field']);if(_0x4887d3<0x0)throw CliErrors[_0xe545e(0xe1)](_0xe545e(0xdf)+_0x191957[_0xe545e(0xfb)]);const _0x579f7a=deepClone(_0x812a26[_0x4887d3]);assertExpectation(_0x579f7a,_0x191957[_0xe545e(0xb5)]);const {after:_0x3fe505,changedPaths:_0x1aa49c,changed:_0x2ea60f}=applyFieldPatch(_0x579f7a,_0x191957[_0xe545e(0xad)]),_0x4695fd=summarizeDataset(_0x5cc29e,_0x191957[_0xe545e(0xd7)]);return _0x2ea60f&&!_0x185b80&&(_0x812a26[_0x4887d3]=_0x3fe505,await updateDrivenData(_0x5cc29e)),{'ok':!![],'data':{'appCode':_0x11581d,'selector':{'code':_0x191957['code']},'dataset':_0x4695fd,'field':{'id':_0x579f7a['id']??null,'name':_0x579f7a[_0xe545e(0xc9)]},'dryRun':_0x185b80,'changed':_0x2ea60f,'changedPaths':_0x1aa49c,'before':_0x579f7a,'after':_0x3fe505,'submitted':_0x2ea60f&&!_0x185b80},'message':_0x2ea60f?_0x185b80?'Dry-run:\x20dataset\x20field\x20'+_0x191957[_0xe545e(0xfb)]+_0xe545e(0xee)+_0x1aa49c[_0xe545e(0xc1)](',\x20')+')':_0xe545e(0xeb)+_0x191957[_0xe545e(0xfb)]+'\x20('+_0x1aa49c['join'](',\x20')+')':_0xe545e(0xba)+_0x191957[_0xe545e(0xfb)]};}export const datasetFieldUpdate={'service':a84_0xbc5188(0xf6),'command':a84_0xbc5188(0xc4),'description':a84_0xbc5188(0xf0),'risk':a84_0xbc5188(0xe6),'flags':[CODE_FLAG,{'name':a84_0xbc5188(0xfb),'type':a84_0xbc5188(0xe0),'required':!![],'description':a84_0xbc5188(0xf4)},{'name':'patch-json','type':'string','required':!![],'description':a84_0xbc5188(0xf1)},{'name':a84_0xbc5188(0xdd),'type':a84_0xbc5188(0xe0),'required':![],'description':a84_0xbc5188(0xb3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5312cd){validateInput(readFieldUpdateInput(_0x5312cd));},async 'dryRun'(_0x308c6e){const _0x4b1e99=a84_0xbc5188,_0x29dcaa=await buildDatasetFieldUpdateResult({'appCode':_0x308c6e[_0x4b1e99(0xc3)],'input':readFieldUpdateInput(_0x308c6e),'dryRun':!![]});return{'method':_0x4b1e99(0xb7),'url':'/smartapi/dataset/update-driven-data','body':_0x29dcaa[_0x4b1e99(0xd8)],'description':_0x29dcaa[_0x4b1e99(0xaa)]};},async 'execute'(_0xcc7474){const _0x103b81=a84_0xbc5188;return buildDatasetFieldUpdateResult({'appCode':_0xcc7474[_0x103b81(0xc3)],'input':readFieldUpdateInput(_0xcc7474),'dryRun':![]});}};function readFieldUpdateInput(_0xf116a0){const _0x4de3d5=a84_0xbc5188,_0x2a8718=trim(_0xf116a0['str'](_0x4de3d5(0xd7))),_0x2eb6c1=emptyToUndefined(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xfb))),_0x264023=parseJsonObjectFlag(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xe5)),'--patch-json'),_0xf9462a=parseJsonObjectFlag(_0xf116a0[_0x4de3d5(0xc8)](_0x4de3d5(0xdd)),'--expect-json');return{'code':_0x2a8718,'field':_0x2eb6c1||'','patch':_0x264023||{},'expect':_0xf9462a};}function validateInput(_0xa72d7e){const _0x14b411=a84_0xbc5188;if(!_0xa72d7e['code'])throw CliErrors[_0x14b411(0xe1)]('--code\x20is\x20required');if(!_0xa72d7e['field'])throw CliErrors[_0x14b411(0xe1)](_0x14b411(0xb2));validatePatchKeys(_0xa72d7e[_0x14b411(0xad)]);}function readFieldArray(_0x36a75a){const _0x593b55=a84_0xbc5188;if(Array[_0x593b55(0xc5)](_0x36a75a[_0x593b55(0xf3)]))return _0x36a75a[_0x593b55(0xf3)];if(Array[_0x593b55(0xc5)](_0x36a75a[_0x593b55(0xbd)]))return _0x36a75a[_0x593b55(0xbd)];throw CliErrors[_0x593b55(0xe1)](_0x593b55(0xec));}function summarizeDataset(_0x278b5e,_0x4d31c5){const _0x151eb2=a84_0xbc5188,_0x1c3090=isPlainObject(_0x278b5e['dataset'])?_0x278b5e[_0x151eb2(0xf6)]:{},_0x102b98=isPlainObject(_0x278b5e[_0x151eb2(0xa9)])?_0x278b5e[_0x151eb2(0xa9)]:{};return{'id':_0x278b5e[_0x151eb2(0xbf)]??_0x278b5e['id']??_0x1c3090[_0x151eb2(0xbc)]??null,'code':_0x278b5e[_0x151eb2(0xab)]??_0x278b5e[_0x151eb2(0xd7)]??_0x1c3090[_0x151eb2(0xb9)]??_0x4d31c5,'name':_0x278b5e['name']??_0x1c3090[_0x151eb2(0xf7)]??null,'table':_0x102b98[_0x151eb2(0xb8)]??_0x1c3090[_0x151eb2(0xb8)]??null,'db':_0x102b98['dbName']??_0x102b98['dbId']??null};}function mergePatchValue(_0x1e4b75,_0x497d67){if(isPlainObject(_0x1e4b75)&&isPlainObject(_0x497d67))return deepMerge(_0x1e4b75,_0x497d67);return deepClone(_0x497d67);}function deepMerge(_0x1f5bbe,_0x19e624){const _0x228911=a84_0xbc5188,_0x5ec44b=deepClone(_0x1f5bbe);for(const [_0x7e166d,_0x460ea3]of Object[_0x228911(0xc2)](_0x19e624)){_0x5ec44b[_0x7e166d]=isPlainObject(_0x5ec44b[_0x7e166d])&&isPlainObject(_0x460ea3)?deepMerge(_0x5ec44b[_0x7e166d],_0x460ea3):deepClone(_0x460ea3);}return _0x5ec44b;}function collectChangedPaths(_0xb83872,_0xd6d231,_0x407972,_0x5adafe){const _0x4c764c=a84_0xbc5188;if(!isPlainObject(_0xd6d231)||!isPlainObject(_0x407972))return;const _0x71f32b=new Set([...Object[_0x4c764c(0xfa)](_0xd6d231),...Object[_0x4c764c(0xfa)](_0x407972)]);for(const _0x9c3759 of _0x71f32b){const _0x3ba6ba=_0xd6d231[_0x9c3759],_0x2d5962=_0x407972[_0x9c3759];!deepEqual(_0x3ba6ba,_0x2d5962)&&_0x5adafe[_0x4c764c(0xd1)](_0xb83872+'.'+_0x9c3759);}}function deepClone(_0x43bd3d){const _0x11afd4=a84_0xbc5188;if(_0x43bd3d===undefined)return _0x43bd3d;return JSON['parse'](JSON[_0x11afd4(0xbb)](_0x43bd3d));}function deepEqual(_0xc2d114,_0x2f402b){const _0xe587d8=a84_0xbc5188;return JSON[_0xe587d8(0xbb)](_0xc2d114)===JSON[_0xe587d8(0xbb)](_0x2f402b);}function isPlainObject(_0x1a2eb0){const _0x5eb001=a84_0xbc5188;return Boolean(_0x1a2eb0)&&typeof _0x1a2eb0==='object'&&!Array[_0x5eb001(0xc5)](_0x1a2eb0);}function emptyToUndefined(_0x20d1cb){const _0x10d635=String(_0x20d1cb||'')['trim']();return _0x10d635||undefined;}function trim(_0x8a5ff6){const _0x2fe7b2=a84_0xbc5188;return String(_0x8a5ff6||'')[_0x2fe7b2(0xd0)]();}
|
|
1
|
+
const a84_0x129b34=a84_0x1b42;(function(_0x5d33ff,_0x3ce0d7){const _0xff924b=a84_0x1b42,_0x3c50a2=_0x5d33ff();while(!![]){try{const _0x118f57=-parseInt(_0xff924b(0x145))/0x1*(-parseInt(_0xff924b(0x151))/0x2)+-parseInt(_0xff924b(0x143))/0x3*(parseInt(_0xff924b(0x14e))/0x4)+parseInt(_0xff924b(0x14b))/0x5+-parseInt(_0xff924b(0x12b))/0x6+-parseInt(_0xff924b(0x138))/0x7+-parseInt(_0xff924b(0x124))/0x8*(-parseInt(_0xff924b(0x13c))/0x9)+parseInt(_0xff924b(0x12d))/0xa;if(_0x118f57===_0x3ce0d7)break;else _0x3c50a2['push'](_0x3c50a2['shift']());}catch(_0x375916){_0x3c50a2['push'](_0x3c50a2['shift']());}}}(a84_0x4aa0,0x9f3ed));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a84_0x129b34(0x14c),'description',a84_0x129b34(0x119),a84_0x129b34(0x11c),a84_0x129b34(0x121),a84_0x129b34(0x158),a84_0x129b34(0x118),a84_0x129b34(0x149)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a84_0x129b34(0x129),'dbType','dbTypeLen','dbTypeScale',a84_0x129b34(0x126),a84_0x129b34(0x157),a84_0x129b34(0x11e),'pkField','autoIncrement',a84_0x129b34(0x11a)]);export function parseJsonObjectFlag(_0x5e8786,_0x19f1fd){const _0x4fb56d=a84_0x129b34;if(!_0x5e8786)return undefined;let _0x173c17;try{_0x173c17=JSON[_0x4fb56d(0x13b)](_0x5e8786);}catch(_0x540c1c){const _0xdff275=_0x540c1c instanceof Error?_0x540c1c[_0x4fb56d(0x13a)]:String(_0x540c1c);throw CliErrors[_0x4fb56d(0x113)](_0x19f1fd+_0x4fb56d(0x136)+_0xdff275);}if(!isPlainObject(_0x173c17)||Array[_0x4fb56d(0x12c)](_0x173c17))throw CliErrors[_0x4fb56d(0x113)](_0x19f1fd+_0x4fb56d(0x131));return _0x173c17;}export function validatePatchKeys(_0x2c29b9){const _0x1e8522=a84_0x129b34,_0x4ff2d8=Object[_0x1e8522(0x115)](_0x2c29b9);if(_0x4ff2d8['length']===0x0)throw CliErrors[_0x1e8522(0x113)](_0x1e8522(0x140));for(const _0x27f049 of _0x4ff2d8){if(FORBIDDEN_FIELD_KEYS[_0x1e8522(0x133)](_0x27f049))throw CliErrors[_0x1e8522(0x113)]('Forbidden\x20patch\x20key:\x20'+_0x27f049);if(!MUTABLE_FIELD_KEYS[_0x1e8522(0x133)](_0x27f049))throw CliErrors[_0x1e8522(0x113)](_0x1e8522(0x128)+_0x27f049,_0x1e8522(0x123)+Array['from'](MUTABLE_FIELD_KEYS)[_0x1e8522(0x11d)](',\x20'));}}export function applyFieldPatch(_0x520ea9,_0x3ce832){const _0x351de6=a84_0x129b34;validatePatchKeys(_0x3ce832);const _0x495620=deepClone(_0x520ea9),_0x60b4b9=new Set();for(const [_0x295374,_0x45d085]of Object['entries'](_0x3ce832)){const _0x3708e6=_0x495620[_0x295374],_0x4aeaf7=mergePatchValue(_0x3708e6,_0x45d085);!deepEqual(_0x3708e6,_0x4aeaf7)&&(_0x495620[_0x295374]=_0x4aeaf7,_0x60b4b9[_0x351de6(0x116)](_0x295374),collectChangedPaths(_0x295374,_0x3708e6,_0x4aeaf7,_0x60b4b9));}return{'after':_0x495620,'changedPaths':Array[_0x351de6(0x141)](_0x60b4b9)['sort'](),'changed':_0x60b4b9[_0x351de6(0x12e)]>0x0};}export function assertExpectation(_0x14f9a0,_0xfc260a){const _0x432283=a84_0x129b34;if(!_0xfc260a)return;for(const [_0x38a9aa,_0x5309a8]of Object[_0x432283(0x148)](_0xfc260a)){const _0x2d6679=_0x14f9a0[_0x38a9aa];if(!deepEqual(_0x2d6679,_0x5309a8))throw CliErrors[_0x432283(0x113)]('Expectation\x20mismatch\x20at\x20'+_0x38a9aa,_0x432283(0x14d)+JSON[_0x432283(0x14a)](_0x5309a8)+_0x432283(0x13f)+JSON[_0x432283(0x14a)](_0x2d6679));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4dda86,input:_0x11d915,dryRun:_0x10c0bd}){const _0x10d466=a84_0x129b34;validateInput(_0x11d915);const _0x1060e8=await getDatasetDetail(_0x11d915[_0x10d466(0x129)]),_0x384136=readFieldArray(_0x1060e8),_0x38809e=_0x384136['findIndex'](_0x54e7e4=>_0x54e7e4?.[_0x10d466(0x12f)]===_0x11d915['field']);if(_0x38809e<0x0)throw CliErrors[_0x10d466(0x113)](_0x10d466(0x147)+_0x11d915[_0x10d466(0x146)]);const _0x5bbb87=deepClone(_0x384136[_0x38809e]);assertExpectation(_0x5bbb87,_0x11d915[_0x10d466(0x11b)]);const {after:_0x110573,changedPaths:_0x3f55ad,changed:_0x1c5611}=applyFieldPatch(_0x5bbb87,_0x11d915[_0x10d466(0x125)]),_0x72e29=summarizeDataset(_0x1060e8,_0x11d915['code']);return _0x1c5611&&!_0x10c0bd&&(_0x384136[_0x38809e]=_0x110573,await updateDrivenData(_0x1060e8)),{'ok':!![],'data':{'appCode':_0x4dda86,'selector':{'code':_0x11d915[_0x10d466(0x129)]},'dataset':_0x72e29,'field':{'id':_0x5bbb87['id']??null,'name':_0x5bbb87[_0x10d466(0x12f)]},'dryRun':_0x10c0bd,'changed':_0x1c5611,'changedPaths':_0x3f55ad,'before':_0x5bbb87,'after':_0x110573,'submitted':_0x1c5611&&!_0x10c0bd},'message':_0x1c5611?_0x10c0bd?_0x10d466(0x112)+_0x11d915[_0x10d466(0x146)]+_0x10d466(0x15b)+_0x3f55ad[_0x10d466(0x11d)](',\x20')+')':_0x10d466(0x130)+_0x11d915[_0x10d466(0x146)]+'\x20('+_0x3f55ad[_0x10d466(0x11d)](',\x20')+')':_0x10d466(0x154)+_0x11d915[_0x10d466(0x146)]};}export const datasetFieldUpdate={'service':a84_0x129b34(0x144),'command':a84_0x129b34(0x14f),'description':a84_0x129b34(0x137),'risk':a84_0x129b34(0x159),'flags':[CODE_FLAG,{'name':'field','type':'string','required':!![],'description':a84_0x129b34(0x132)},{'name':'patch-json','type':a84_0x129b34(0x114),'required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a84_0x129b34(0x156),'type':a84_0x129b34(0x114),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1dd46c){validateInput(readFieldUpdateInput(_0x1dd46c));},async 'dryRun'(_0x1c978a){const _0x3182d9=a84_0x129b34,_0x56e553=await buildDatasetFieldUpdateResult({'appCode':_0x1c978a[_0x3182d9(0x13d)],'input':readFieldUpdateInput(_0x1c978a),'dryRun':!![]});return{'method':_0x3182d9(0x120),'url':_0x3182d9(0x15c),'body':_0x56e553[_0x3182d9(0x11f)],'description':_0x56e553[_0x3182d9(0x13a)]};},async 'execute'(_0x2a3284){const _0x4f697d=a84_0x129b34;return buildDatasetFieldUpdateResult({'appCode':_0x2a3284[_0x4f697d(0x13d)],'input':readFieldUpdateInput(_0x2a3284),'dryRun':![]});}};function readFieldUpdateInput(_0x1695c2){const _0x12b67e=a84_0x129b34,_0xb6db99=trim(_0x1695c2[_0x12b67e(0x111)](_0x12b67e(0x129))),_0x5d49ed=emptyToUndefined(_0x1695c2[_0x12b67e(0x111)](_0x12b67e(0x146))),_0x3b2459=parseJsonObjectFlag(_0x1695c2[_0x12b67e(0x111)]('patch-json'),_0x12b67e(0x127)),_0x1c3c4f=parseJsonObjectFlag(_0x1695c2[_0x12b67e(0x111)](_0x12b67e(0x156)),_0x12b67e(0x155));return{'code':_0xb6db99,'field':_0x5d49ed||'','patch':_0x3b2459||{},'expect':_0x1c3c4f};}function validateInput(_0x3e5c1f){const _0x4763dd=a84_0x129b34;if(!_0x3e5c1f['code'])throw CliErrors[_0x4763dd(0x113)](_0x4763dd(0x122));if(!_0x3e5c1f[_0x4763dd(0x146)])throw CliErrors[_0x4763dd(0x113)](_0x4763dd(0x13e));validatePatchKeys(_0x3e5c1f[_0x4763dd(0x125)]);}function readFieldArray(_0x1c71e6){const _0x507858=a84_0x129b34;if(Array[_0x507858(0x12c)](_0x1c71e6[_0x507858(0x134)]))return _0x1c71e6[_0x507858(0x134)];if(Array[_0x507858(0x12c)](_0x1c71e6[_0x507858(0x117)]))return _0x1c71e6[_0x507858(0x117)];throw CliErrors[_0x507858(0x113)](_0x507858(0x152));}function a84_0x4aa0(){const _0xec784=['expect','required','join','deleted','data','POST','datetimeFormat','--code\x20is\x20required','Allowed\x20keys:\x20','3392cUzdOQ','patch','dbFieldName','--patch-json','Unsupported\x20patch\x20key:\x20','code','object','1928964Hkooda','isArray','9059250TGEHag','size','name','Updated\x20dataset\x20field\x20','\x20must\x20be\x20a\x20JSON\x20object','Exact\x20raw\x20fields[].name\x20to\x20patch','has','fields','datasetCode','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','2905847xdBBwp','modelId','message','parse','7272SBqOzA','appCode','--field\x20is\x20required',',\x20actual\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','from','dbName','26193wkGrEg','dataset','787exDEGa','field','Field\x20not\x20found:\x20','entries','deprecated','stringify','1334130BBselb','displayName','Expected\x20','412ckNGJW','field-update','trim','1964MfBmrF','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','dbtableConfig','No\x20changes\x20for\x20dataset\x20field\x20','--expect-json','expect-json','tableName','defaultAggregation','write','dbId','\x20would\x20change\x20(','/smartapi/dataset/update-driven-data','datasetName','str','Dry-run:\x20dataset\x20field\x20','validation','string','keys','add','properties','chartRole','options','systemRetain'];a84_0x4aa0=function(){return _0xec784;};return a84_0x4aa0();}function summarizeDataset(_0x4bc386,_0x30bf28){const _0x1bebf5=a84_0x129b34,_0x2945cf=isPlainObject(_0x4bc386[_0x1bebf5(0x144)])?_0x4bc386[_0x1bebf5(0x144)]:{},_0x28ded0=isPlainObject(_0x4bc386[_0x1bebf5(0x153)])?_0x4bc386['dbtableConfig']:{};return{'id':_0x4bc386[_0x1bebf5(0x139)]??_0x4bc386['id']??_0x2945cf['datasetId']??null,'code':_0x4bc386['modelCode']??_0x4bc386[_0x1bebf5(0x129)]??_0x2945cf[_0x1bebf5(0x135)]??_0x30bf28,'name':_0x4bc386[_0x1bebf5(0x12f)]??_0x2945cf[_0x1bebf5(0x15d)]??null,'table':_0x28ded0['tableName']??_0x2945cf[_0x1bebf5(0x157)]??null,'db':_0x28ded0[_0x1bebf5(0x142)]??_0x28ded0[_0x1bebf5(0x15a)]??null};}function mergePatchValue(_0x585758,_0x135695){if(isPlainObject(_0x585758)&&isPlainObject(_0x135695))return deepMerge(_0x585758,_0x135695);return deepClone(_0x135695);}function a84_0x1b42(_0x7a0162,_0x2c4f7f){_0x7a0162=_0x7a0162-0x111;const _0x4aa073=a84_0x4aa0();let _0x1b4228=_0x4aa073[_0x7a0162];return _0x1b4228;}function deepMerge(_0xb8124d,_0x1f03ff){const _0x35810e=a84_0x129b34,_0x32c2cb=deepClone(_0xb8124d);for(const [_0x46bb54,_0x3399f2]of Object[_0x35810e(0x148)](_0x1f03ff)){_0x32c2cb[_0x46bb54]=isPlainObject(_0x32c2cb[_0x46bb54])&&isPlainObject(_0x3399f2)?deepMerge(_0x32c2cb[_0x46bb54],_0x3399f2):deepClone(_0x3399f2);}return _0x32c2cb;}function collectChangedPaths(_0x4d7fe0,_0x3d6984,_0x44b514,_0x1b9068){const _0x396677=a84_0x129b34;if(!isPlainObject(_0x3d6984)||!isPlainObject(_0x44b514))return;const _0x476adc=new Set([...Object[_0x396677(0x115)](_0x3d6984),...Object[_0x396677(0x115)](_0x44b514)]);for(const _0x3fae04 of _0x476adc){const _0x15f49d=_0x3d6984[_0x3fae04],_0x233af4=_0x44b514[_0x3fae04];!deepEqual(_0x15f49d,_0x233af4)&&_0x1b9068[_0x396677(0x116)](_0x4d7fe0+'.'+_0x3fae04);}}function deepClone(_0x3d2052){const _0x143b2b=a84_0x129b34;if(_0x3d2052===undefined)return _0x3d2052;return JSON[_0x143b2b(0x13b)](JSON[_0x143b2b(0x14a)](_0x3d2052));}function deepEqual(_0x2d58d8,_0x49e311){const _0x5424e1=a84_0x129b34;return JSON[_0x5424e1(0x14a)](_0x2d58d8)===JSON[_0x5424e1(0x14a)](_0x49e311);}function isPlainObject(_0x589b5d){const _0x294c86=a84_0x129b34;return Boolean(_0x589b5d)&&typeof _0x589b5d===_0x294c86(0x12a)&&!Array['isArray'](_0x589b5d);}function emptyToUndefined(_0x31eb2c){const _0x212811=a84_0x129b34,_0x408b94=String(_0x31eb2c||'')[_0x212811(0x150)]();return _0x408b94||undefined;}function trim(_0x4d749b){return String(_0x4d749b||'')['trim']();}
|