@lovrabet/rabetbase-cli 2.5.8 → 2.5.9-beta.1
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 +6 -6
- 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.d.ts +8 -5
- 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.d.ts +5 -3
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +14 -11
- 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 +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -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_0x4a593d=a74_0x54b2;(function(_0x4a4c42,_0x3c8d9a){const _0x290601=a74_0x54b2,_0x5e6efc=_0x4a4c42();while(!![]){try{const _0x179d11=parseInt(_0x290601(0x178))/0x1*(parseInt(_0x290601(0x15c))/0x2)+parseInt(_0x290601(0x181))/0x3+-parseInt(_0x290601(0x15a))/0x4*(parseInt(_0x290601(0x149))/0x5)+parseInt(_0x290601(0x187))/0x6*(parseInt(_0x290601(0x16b))/0x7)+-parseInt(_0x290601(0x161))/0x8+-parseInt(_0x290601(0x16d))/0x9*(-parseInt(_0x290601(0x186))/0xa)+-parseInt(_0x290601(0x151))/0xb;if(_0x179d11===_0x3c8d9a)break;else _0x5e6efc['push'](_0x5e6efc['shift']());}catch(_0x1c05bd){_0x5e6efc['push'](_0x5e6efc['shift']());}}}(a74_0x5429,0xca288));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a74_0x5429(){const _0x3b9e61=['boolean','dbId','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','Would\x20delete\x20','Deleted\x20','322HHIeWV','Would\x20safely\x20delete\x20','85662CvkUqB','true','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','length','str','relatedPageInfoList','isInteger','confirm','number','\x20failed','num','448847wEQEzd','\x20dataset(s);\x20','tableName','code','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','deleted','validation','No\x20undeleted\x20dataset\x20found\x20for\x20','high-risk-write','3497115kXegug','type','appCode','source','object','1160rvNeVU','102192kLznZk','dbid=','map','POST','175GANGup','filter','expected-count','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','dbtableConfig','Required\x20to\x20execute\x20dataset\x20deletion','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','name','13828298rQwtFm','title','dbid','cascade','Matched\x20','delete','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','message','42380QctrAw','id=','4vXEcjf','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20dataset(s)','push','11959808mmLkfW','bool','description','\x20--appcode\x20'];a74_0x5429=function(){return _0x3b9e61;};return a74_0x5429();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a74_0x4a593d(0x175),'description':'Dataset\x20id'},DBID_FLAG={'name':a74_0x4a593d(0x153),'type':a74_0x4a593d(0x175),'description':a74_0x4a593d(0x167)},CONFIRM_FLAG={'name':a74_0x4a593d(0x174),'type':'boolean','description':a74_0x4a593d(0x14e)},CASCADE_FLAG={'name':a74_0x4a593d(0x154),'type':a74_0x4a593d(0x165),'description':a74_0x4a593d(0x168)},EXPECTED_COUNT_FLAG={'name':a74_0x4a593d(0x14b),'type':a74_0x4a593d(0x175),'description':a74_0x4a593d(0x14f)};export const datasetDelete={'service':'dataset','command':a74_0x4a593d(0x156),'description':a74_0x4a593d(0x16f),'risk':a74_0x4a593d(0x180),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5d6ed5){const _0x1229d6=a74_0x4a593d,_0x1d8b9b=_0x5d6ed5[_0x1229d6(0x177)]('id'),_0x347c2c=_0x5d6ed5[_0x1229d6(0x171)](_0x1229d6(0x17b)),_0x201225=_0x5d6ed5[_0x1229d6(0x177)](_0x1229d6(0x153)),_0x17f281=[_0x1d8b9b>0x0,Boolean(_0x347c2c),_0x201225>0x0][_0x1229d6(0x14a)](Boolean);if(_0x17f281[_0x1229d6(0x170)]===0x0)throw CliErrors[_0x1229d6(0x17e)](_0x1229d6(0x15e));if(_0x17f281[_0x1229d6(0x170)]>0x1)throw CliErrors[_0x1229d6(0x17e)](_0x1229d6(0x157));},async 'dryRun'(_0x54caef){const _0x2bbc25=a74_0x4a593d,_0x130414=await resolveTargets(_0x54caef),_0x46fb60=_0x54caef[_0x2bbc25(0x162)](_0x2bbc25(0x154));return{'method':_0x2bbc25(0x148),'url':'/smartapi/dataset/delete?cascade='+(_0x46fb60?_0x2bbc25(0x16e):'false'),'body':{'count':_0x130414['length'],'cascade':_0x46fb60,'datasets':_0x130414},'description':_0x46fb60?_0x2bbc25(0x169)+_0x130414[_0x2bbc25(0x170)]+_0x2bbc25(0x17c):_0x2bbc25(0x16c)+_0x130414['length']+_0x2bbc25(0x158)};},async 'execute'(_0x30ac1d){const _0x2c38ed=a74_0x4a593d;if(!_0x30ac1d['bool'](_0x2c38ed(0x174)))throw CliErrors[_0x2c38ed(0x17e)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x2c38ed(0x14c));const _0x34a689=await resolveTargets(_0x30ac1d),_0x3d11ad=_0x30ac1d['bool'](_0x2c38ed(0x154)),_0x1bfe30=[],_0x39b12b=[];for(const _0x18f17b of _0x34a689){try{await deleteDataset(_0x18f17b['id'],_0x3d11ad),_0x1bfe30[_0x2c38ed(0x160)](_0x18f17b);}catch(_0x28a8a0){_0x39b12b[_0x2c38ed(0x160)]({..._0x18f17b,'error':_0x28a8a0 instanceof Error?_0x28a8a0[_0x2c38ed(0x159)]:String(_0x28a8a0)});}}if(_0x39b12b[_0x2c38ed(0x170)]>0x0){const _0x3e1534=buildPageRestoreCommands(_0x30ac1d[_0x2c38ed(0x183)],_0x3d11ad?_0x1bfe30:[]);return{'ok':![],'data':{'requested':_0x34a689[_0x2c38ed(0x170)],'cascade':_0x3d11ad,'deletedCount':_0x1bfe30[_0x2c38ed(0x170)],'failedCount':_0x39b12b[_0x2c38ed(0x170)],'deleted':_0x1bfe30,'failed':_0x39b12b,'pageRestoreCommands':_0x3e1534},'message':_0x2c38ed(0x16a)+_0x1bfe30['length']+'/'+_0x34a689['length']+_0x2c38ed(0x179)+_0x39b12b['length']+_0x2c38ed(0x176)};}return{'ok':!![],'data':{'requested':_0x34a689[_0x2c38ed(0x170)],'cascade':_0x3d11ad,'deletedCount':_0x1bfe30[_0x2c38ed(0x170)],'deleted':_0x1bfe30,'pageRestoreCommands':buildPageRestoreCommands(_0x30ac1d[_0x2c38ed(0x183)],_0x3d11ad?_0x1bfe30:[])},'message':_0x2c38ed(0x16a)+_0x1bfe30[_0x2c38ed(0x170)]+_0x2c38ed(0x15f)};}};async function resolveTargets(_0x4bd57a){const _0x548c31=a74_0x4a593d,_0x27ec5b=_0x4bd57a['num']('id'),_0x316994=_0x4bd57a[_0x548c31(0x171)](_0x548c31(0x17b)),_0x28be9a=_0x4bd57a[_0x548c31(0x177)](_0x548c31(0x153));let _0x58ad4d;_0x316994?(_0x58ad4d=await listDatasets(_0x4bd57a[_0x548c31(0x183)],{'code':_0x316994}),_0x58ad4d=_0x58ad4d[_0x548c31(0x14a)](_0x325d73=>_0x325d73[_0x548c31(0x17b)]===_0x316994)):(_0x58ad4d=await listDatasets(_0x4bd57a['appCode']),_0x27ec5b>0x0&&(_0x58ad4d=_0x58ad4d[_0x548c31(0x14a)](_0x3c81b4=>_0x3c81b4['id']===_0x27ec5b)),_0x28be9a>0x0&&(_0x58ad4d=_0x58ad4d[_0x548c31(0x14a)](_0x5a7473=>_0x5a7473['dbtableConfig']?.[_0x548c31(0x166)]===_0x28be9a)));const _0x2c9e6a=[];for(const _0x5041e6 of _0x58ad4d){const _0x23a8d9=await getDatasetDetail(_0x5041e6[_0x548c31(0x17b)]),_0x23bfbf=Array['isArray'](_0x23a8d9[_0x548c31(0x172)])?_0x23a8d9['relatedPageInfoList'][_0x548c31(0x14a)](_0x44d044=>_0x44d044!=null&&typeof _0x44d044===_0x548c31(0x185)&&_0x44d044[_0x548c31(0x17d)]!==!![]):[];_0x2c9e6a[_0x548c31(0x160)](normalizeTarget(_0x5041e6,_0x23bfbf));}if(_0x2c9e6a[_0x548c31(0x170)]===0x0){const _0xcb5c8a=_0x316994||(_0x27ec5b>0x0?_0x548c31(0x15b)+_0x27ec5b:_0x548c31(0x188)+_0x28be9a);throw CliErrors[_0x548c31(0x17e)](_0x548c31(0x17f)+_0xcb5c8a+'.');}const _0x5a1ef9=_0x4bd57a[_0x548c31(0x177)](_0x548c31(0x14b));if(_0x5a1ef9>0x0&&_0x2c9e6a['length']!==_0x5a1ef9)throw CliErrors[_0x548c31(0x17e)](_0x548c31(0x155)+_0x2c9e6a[_0x548c31(0x170)]+_0x548c31(0x15d)+_0x5a1ef9+'.');return _0x2c9e6a;}function normalizeTarget(_0x54e81d,_0x14d7aa){const _0x833f0d=a74_0x4a593d,_0x433e31=_0x54e81d[_0x833f0d(0x14d)]??{},_0x274e48=_0x14d7aa['map'](_0x364bfe=>{const _0x57e537=_0x833f0d;if(_0x364bfe==null||typeof _0x364bfe!==_0x57e537(0x185))return null;const _0x3f48d1=_0x364bfe,_0x7e8952=Number(_0x3f48d1['id']);if(!Number[_0x57e537(0x173)](_0x7e8952)||_0x7e8952<=0x0)return null;const _0xe1c574=_0x3f48d1[_0x57e537(0x152)]??_0x3f48d1[_0x57e537(0x150)];return{'id':_0x7e8952,..._0xe1c574?{'name':String(_0xe1c574)}:{},..._0x3f48d1[_0x57e537(0x182)]?{'type':String(_0x3f48d1[_0x57e537(0x182)])}:{}};})['filter'](_0x4383ba=>_0x4383ba!==null);return{'id':_0x54e81d['id'],'code':_0x54e81d['code'],'name':_0x54e81d[_0x833f0d(0x150)],'description':_0x54e81d[_0x833f0d(0x163)],'source':_0x54e81d[_0x833f0d(0x184)],'dbId':_0x433e31[_0x833f0d(0x166)],'dbName':_0x433e31['dbName'],'tableName':_0x433e31[_0x833f0d(0x17a)],'relatedPageCount':_0x274e48['length'],'relatedPages':_0x274e48};}function a74_0x54b2(_0x183672,_0x14ffeb){_0x183672=_0x183672-0x147;const _0x54295b=a74_0x5429();let _0x54b23b=_0x54295b[_0x183672];return _0x54b23b;}function buildPageRestoreCommands(_0x5ed069,_0x44385f){const _0x564535=a74_0x4a593d,_0x3ce648=new Set();for(const _0x1a921f of _0x44385f){for(const _0x3e3337 of _0x1a921f['relatedPages'])_0x3ce648['add'](_0x3e3337['id']);}return[..._0x3ce648][_0x564535(0x147)](_0xe2d72a=>'rabetbase\x20page\x20restore\x20--id\x20'+_0xe2d72a+_0x564535(0x164)+_0x5ed069);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a75_0x31f829=a75_0x327f;function a75_0x327f(_0x5b53eb,_0x27b1da){_0x5b53eb=_0x5b53eb-0x134;const _0x4a4e55=a75_0x4a4e();let _0x327f67=_0x4a4e55[_0x5b53eb];return _0x327f67;}function a75_0x4a4e(){const _0xad2d=['964032KGkPlv','3631270ZRvsbk','3804010pMDkqP','70HZdTJD','2259507TKCmWz','context','417892gHGZWL','16234256vhJvSN','315567UOSizn'];a75_0x4a4e=function(){return _0xad2d;};return a75_0x4a4e();}(function(_0x17cb88,_0x25cc46){const _0x584258=a75_0x327f,_0x44f483=_0x17cb88();while(!![]){try{const _0x430ecc=-parseInt(_0x584258(0x138))/0x1+parseInt(_0x584258(0x13a))/0x2+-parseInt(_0x584258(0x134))/0x3+-parseInt(_0x584258(0x136))/0x4+parseInt(_0x584258(0x13b))/0x5+parseInt(_0x584258(0x139))/0x6*(parseInt(_0x584258(0x13c))/0x7)+-parseInt(_0x584258(0x137))/0x8;if(_0x430ecc===_0x25cc46)break;else _0x44f483['push'](_0x44f483['shift']());}catch(_0x4b1e27){_0x44f483['push'](_0x44f483['shift']());}}}(a75_0x4a4e,0xef6ba));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0x31f829(0x135));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a76_0x350d(){const _0x1bdb4a=['162685mLembH','1561lZzXow','10807130whUaYf','1225521vOFSWu','78RWbBBz','993207lScoIm','28352kZBrbn','2686218EJcVCe','969984tAwRya','start','9aUwAri'];a76_0x350d=function(){return _0x1bdb4a;};return a76_0x350d();}const a76_0xc78d24=a76_0x4714;(function(_0x351612,_0x8ee417){const _0x89a0bd=a76_0x4714,_0x2ec866=_0x351612();while(!![]){try{const _0x5dfaee=parseInt(_0x89a0bd(0x10f))/0x1+parseInt(_0x89a0bd(0x111))/0x2+parseInt(_0x89a0bd(0x10d))/0x3+parseInt(_0x89a0bd(0x112))/0x4+-parseInt(_0x89a0bd(0x10a))/0x5*(parseInt(_0x89a0bd(0x10e))/0x6)+-parseInt(_0x89a0bd(0x10b))/0x7*(parseInt(_0x89a0bd(0x110))/0x8)+parseInt(_0x89a0bd(0x109))/0x9*(-parseInt(_0x89a0bd(0x10c))/0xa);if(_0x5dfaee===_0x8ee417)break;else _0x2ec866['push'](_0x2ec866['shift']());}catch(_0x5949cb){_0x2ec866['push'](_0x2ec866['shift']());}}}(a76_0x350d,0xa9441));import{designCommand}from'../../services/dataset-design/commands.js';function a76_0x4714(_0x126856,_0x4f51ea){_0x126856=_0x126856-0x109;const _0x350d8b=a76_0x350d();let _0x47142a=_0x350d8b[_0x126856];return _0x47142a;}export const datasetDesignStart=designCommand(a76_0xc78d24(0x113));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a77_0x21c0(){const _0x3d20e6=['7abnmwL','3604779DfaIqG','4PKmLsB','11009540hRDELg','158071ZxLgIQ','594735FreFQp','921390PKGMaQ','625528cECdGT','2019834cowqMw','6eyduZT'];a77_0x21c0=function(){return _0x3d20e6;};return a77_0x21c0();}function a77_0x2c46(_0x43da7e,_0x4e3d43){_0x43da7e=_0x43da7e-0xad;const _0x21c082=a77_0x21c0();let _0x2c4649=_0x21c082[_0x43da7e];return _0x2c4649;}(function(_0x58e383,_0x1ccfb3){const _0x542881=a77_0x2c46,_0x130fc2=_0x58e383();while(!![]){try{const _0x18b4f5=parseInt(_0x542881(0xaf))/0x1*(parseInt(_0x542881(0xb4))/0x2)+-parseInt(_0x542881(0xb0))/0x3*(parseInt(_0x542881(0xad))/0x4)+-parseInt(_0x542881(0xb1))/0x5+-parseInt(_0x542881(0xb3))/0x6+-parseInt(_0x542881(0xb5))/0x7*(-parseInt(_0x542881(0xb2))/0x8)+-parseInt(_0x542881(0xb6))/0x9+parseInt(_0x542881(0xae))/0xa;if(_0x18b4f5===_0x1ccfb3)break;else _0x130fc2['push'](_0x130fc2['shift']());}catch(_0x5b335c){_0x130fc2['push'](_0x130fc2['shift']());}}}(a77_0x21c0,0x824a1));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand('status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x174996=a78_0x54c1;(function(_0x59a8ea,_0x1a4a7f){const _0x14d495=a78_0x54c1,_0x177e56=_0x59a8ea();while(!![]){try{const _0x540ca3=parseInt(_0x14d495(0x1c1))/0x1+-parseInt(_0x14d495(0x1c2))/0x2*(-parseInt(_0x14d495(0x1c7))/0x3)+-parseInt(_0x14d495(0x1c6))/0x4*(-parseInt(_0x14d495(0x1c8))/0x5)+-parseInt(_0x14d495(0x1c5))/0x6+-parseInt(_0x14d495(0x1c0))/0x7+-parseInt(_0x14d495(0x1c4))/0x8+parseInt(_0x14d495(0x1c3))/0x9;if(_0x540ca3===_0x1a4a7f)break;else _0x177e56['push'](_0x177e56['shift']());}catch(_0x1d7e9b){_0x177e56['push'](_0x177e56['shift']());}}}(a78_0x27d0,0x9b125));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand(a78_0x174996(0x1bf));function a78_0x54c1(_0x323fcb,_0x15e962){_0x323fcb=_0x323fcb-0x1bf;const _0x27d088=a78_0x27d0();let _0x54c1b7=_0x27d088[_0x323fcb];return _0x54c1b7;}function a78_0x27d0(){const _0x2f63a0=['6411414OykJFl','3232scqzpk','3uQvrPd','2895GyPgvA','sync-retry','543515JMTGeL','633432xqOnAS','24556UHKDFe','14488614joEqxH','7536008ytxmrA'];a78_0x27d0=function(){return _0x2f63a0;};return a78_0x27d0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a79_0xc968(_0x2f2125,_0x56d7d1){_0x2f2125=_0x2f2125-0x97;const _0x51b99c=a79_0x51b9();let _0xc9681e=_0x51b99c[_0x2f2125];return _0xc9681e;}function a79_0x51b9(){const _0x8bb20d=['109154XGNAVL','723860vOeZBq','393942oFUYmZ','15xDWMlL','22kZdQsl','32gFrPJi','3678654QCLRjv','21EoaVxh','2053458RESnuc','2789470IASPqo','3427044NqJXtN','sync-status'];a79_0x51b9=function(){return _0x8bb20d;};return a79_0x51b9();}const a79_0x4201e1=a79_0xc968;(function(_0x3f2ae1,_0x331cc2){const _0x1e31e3=a79_0xc968,_0x523fb3=_0x3f2ae1();while(!![]){try{const _0x48a527=-parseInt(_0x1e31e3(0x9c))/0x1+-parseInt(_0x1e31e3(0x9b))/0x2*(parseInt(_0x1e31e3(0xa2))/0x3)+parseInt(_0x1e31e3(0x99))/0x4+-parseInt(_0x1e31e3(0x9e))/0x5*(parseInt(_0x1e31e3(0x9d))/0x6)+-parseInt(_0x1e31e3(0xa1))/0x7+parseInt(_0x1e31e3(0xa0))/0x8*(parseInt(_0x1e31e3(0x97))/0x9)+parseInt(_0x1e31e3(0x98))/0xa*(parseInt(_0x1e31e3(0x9f))/0xb);if(_0x48a527===_0x331cc2)break;else _0x523fb3['push'](_0x523fb3['shift']());}catch(_0x3b45b0){_0x523fb3['push'](_0x523fb3['shift']());}}}(a79_0x51b9,0x79cdf));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand(a79_0x4201e1(0x9a));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a80_0x198652=a80_0x5069;function a80_0x5069(_0x2fc5ba,_0x3a4641){_0x2fc5ba=_0x2fc5ba-0x17c;const _0x49729c=a80_0x4972();let _0x5069ac=_0x49729c[_0x2fc5ba];return _0x5069ac;}(function(_0x1bd6d2,_0x1766d2){const _0x521d20=a80_0x5069,_0x44e420=_0x1bd6d2();while(!![]){try{const _0x2a41c6=parseInt(_0x521d20(0x181))/0x1+-parseInt(_0x521d20(0x180))/0x2+-parseInt(_0x521d20(0x17d))/0x3+parseInt(_0x521d20(0x17e))/0x4+-parseInt(_0x521d20(0x17c))/0x5+parseInt(_0x521d20(0x184))/0x6*(parseInt(_0x521d20(0x17f))/0x7)+parseInt(_0x521d20(0x182))/0x8;if(_0x2a41c6===_0x1766d2)break;else _0x44e420['push'](_0x44e420['shift']());}catch(_0x3f70f6){_0x44e420['push'](_0x44e420['shift']());}}}(a80_0x4972,0xa26df));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x198652(0x183));function a80_0x4972(){const _0x118096=['3818178edXPLx','4642508rIfakl','77ePbhDr','2634254xDRrOE','998481VpUVou','6751280CPZJJr','validate','219876OynNlz','754800DJNPQK'];a80_0x4972=function(){return _0x118096;};return a80_0x4972();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x311409=a81_0x1d17;(function(_0x340c08,_0xd97389){const _0x244453=a81_0x1d17,_0x5a2304=_0x340c08();while(!![]){try{const _0x3fa3c7=-parseInt(_0x244453(0x9e))/0x1*(-parseInt(_0x244453(0x9a))/0x2)+-parseInt(_0x244453(0xb1))/0x3*(parseInt(_0x244453(0x84))/0x4)+-parseInt(_0x244453(0x97))/0x5+-parseInt(_0x244453(0x87))/0x6*(parseInt(_0x244453(0xba))/0x7)+-parseInt(_0x244453(0x95))/0x8*(-parseInt(_0x244453(0x8a))/0x9)+parseInt(_0x244453(0x7b))/0xa+-parseInt(_0x244453(0xa3))/0xb;if(_0x3fa3c7===_0xd97389)break;else _0x5a2304['push'](_0x5a2304['shift']());}catch(_0x3178de){_0x5a2304['push'](_0x5a2304['shift']());}}}(a81_0x1645,0xc2d56));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a81_0x1d17(_0x37b21e,_0xe02b31){_0x37b21e=_0x37b21e-0x71;const _0x164514=a81_0x1645();let _0x1d17b5=_0x164514[_0x37b21e];return _0x1d17b5;}function normalizeField(_0x26687f){const _0x48d883=a81_0x1d17;if(_0x26687f[_0x48d883(0xb2)])return null;const _0x1a652f=Boolean(_0x26687f['displayName']!==undefined||_0x26687f[_0x48d883(0x81)]!==undefined);let _0xda430={};if(!_0x1a652f&&typeof _0x26687f[_0x48d883(0xae)]==='string')try{_0xda430=JSON[_0x48d883(0x8c)](_0x26687f[_0x48d883(0xae)]);}catch{}const _0x42cdc4=_0x1a652f?_0x26687f['name']:_0x26687f[_0x48d883(0xab)],_0x1db696=_0x1a652f?_0x26687f['displayName']:_0x26687f[_0x48d883(0x98)],_0x6f7baa=_0x1a652f?_0x26687f[_0x48d883(0x81)]:_0x26687f[_0x48d883(0x77)]||_0x26687f[_0x48d883(0xac)],_0x8b97d=_0x1a652f?_0x26687f[_0x48d883(0x7d)]===!![]:_0xda430['pkField']===!![],_0x2e5c90=_0x1a652f?_0x26687f['required']===!![]:_0xda430['required']===!![],_0x4ca378=_0x1a652f?_0x26687f['options']??null:_0xda430['options']??null,_0x26ef85={'name':_0x42cdc4,'displayName':_0x1db696||_0x42cdc4,'type':_0x6f7baa,'dbType':_0x26687f[_0x48d883(0x96)],'pk':_0x8b97d,'required':_0x2e5c90,'deprecated':_0x26687f['deprecated']===!![],'description':_0x26687f['description']||undefined};return Array[_0x48d883(0x71)](_0x4ca378)&&_0x4ca378[_0x48d883(0x92)]>0x0&&(_0x26ef85[_0x48d883(0x74)]=_0x4ca378),_0x26ef85;}function a81_0x1645(){const _0x311754=['dblinkInfoDTO','trim','allFields','1TQwdyx','requestFields','relationId','labelField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','8847520EQyUNZ','logicField','toDatasetCode','modelId','afterScriptId','toField','string','entries','code','dataType','dataset','extend','responseBody','detail','177onzVrK','deleted','str','toTableName','path','allFieldNames','sourceType','modelCode','dbId','420GddPGz','isArray','filter','bizRelationType','options','object','map','type','cardinality','formatRules','method','14989840snrSwA','read','pkField','push','requestBody','host','doType','responseFields','columnCodeListWithDeleted','1916KMQYDj','tableComment','relatedPageInfoList','114606ZkjGHu','properties','tableName','194049CgJdhn','relations','parse','validateRules','title','fields','dbName','source','length','main_sub','indexes','432dVJXji','dbType','4754175KuCrkA','name','beforeScriptId','2128472guWxvM'];a81_0x1645=function(){return _0x311754;};return a81_0x1645();}function parseJsonMaybe(_0x5e3004){const _0x54a80a=a81_0x1d17;if(typeof _0x5e3004!=='string')return _0x5e3004;try{return JSON[_0x54a80a(0x8c)](_0x5e3004);}catch{return _0x5e3004;}}function normalizeOperationEntry(_0x4e3211,_0x5c1e60){const _0x1b17ec=a81_0x1d17;if(!_0x5c1e60||typeof _0x5c1e60!==_0x1b17ec(0x75))return null;if(!_0x5c1e60[_0x1b17ec(0x7a)]||!_0x5c1e60[_0x1b17ec(0xb5)])return null;const _0x21807a={'name':_0x4e3211,'method':_0x5c1e60['method'],'path':_0x5c1e60[_0x1b17ec(0xb5)]};if(_0x5c1e60[_0x1b17ec(0x80)])_0x21807a['host']=_0x5c1e60[_0x1b17ec(0x80)];if(_0x5c1e60[_0x1b17ec(0x7f)]!=null){const _0x29faef=parseJsonMaybe(_0x5c1e60[_0x1b17ec(0x7f)]);_0x21807a[_0x1b17ec(0x7f)]=_0x29faef;}if(_0x5c1e60['responseBody']!=null){const _0x32ec94=parseJsonMaybe(_0x5c1e60[_0x1b17ec(0xaf)]);_0x21807a[_0x1b17ec(0xaf)]=_0x32ec94;}if(_0x5c1e60['beforeScriptId']!=null)_0x21807a[_0x1b17ec(0x99)]=_0x5c1e60[_0x1b17ec(0x99)];if(_0x5c1e60[_0x1b17ec(0xa7)]!=null)_0x21807a[_0x1b17ec(0xa7)]=_0x5c1e60[_0x1b17ec(0xa7)];if(Array[_0x1b17ec(0x71)](_0x5c1e60['requestFields']))_0x21807a[_0x1b17ec(0x9f)]=_0x5c1e60['requestFields'];if(Array[_0x1b17ec(0x71)](_0x5c1e60[_0x1b17ec(0x82)]))_0x21807a[_0x1b17ec(0x82)]=_0x5c1e60[_0x1b17ec(0x82)];return _0x21807a;}function summarizeDbtable(_0x396644){const _0x1673ff=a81_0x1d17,_0x1f2d6f={},_0x518501=[_0x1673ff(0xb9),_0x1673ff(0x90),'tableName','datasetKey',_0x1673ff(0x7d),_0x1673ff(0x9d),_0x1673ff(0xa4),'createTimeField','updateTimeField','creatorIdField','creatorNameField','modifierIdField','modifierNameField',_0x1673ff(0xa1),_0x1673ff(0x9b)];for(const _0x32a0f0 of _0x518501){if(_0x396644[_0x32a0f0]!==undefined)_0x1f2d6f[_0x32a0f0]=_0x396644[_0x32a0f0];}return typeof _0x1f2d6f['allFields']===_0x1673ff(0xa9)&&_0x1f2d6f[_0x1673ff(0x9d)][_0x1673ff(0x92)]>0x0&&(_0x1f2d6f[_0x1673ff(0xb6)]=_0x1f2d6f['allFields']['split'](',')[_0x1673ff(0x76)](_0x412ee8=>_0x412ee8[_0x1673ff(0x9c)]())[_0x1673ff(0x72)](Boolean)),_0x1f2d6f;}function normalizeRelatedPages(_0x17e312){const _0x24c163=a81_0x1d17;if(!Array[_0x24c163(0x71)](_0x17e312))return[];return _0x17e312[_0x24c163(0x72)](_0x499b3a=>_0x499b3a&&typeof _0x499b3a===_0x24c163(0x75))['map'](_0x25c859=>({'id':_0x25c859['id'],'type':_0x25c859[_0x24c163(0x77)],'code':_0x25c859[_0x24c163(0xab)],'title':_0x25c859[_0x24c163(0x8e)],'deleted':_0x25c859[_0x24c163(0xb2)]===!![]}));}export const datasetDetail={'service':a81_0x311409(0xad),'command':a81_0x311409(0xb0),'description':a81_0x311409(0xa2),'risk':a81_0x311409(0x7c),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x5a883d){const _0x3e0157=a81_0x311409,_0x592067=await getDatasetDetail(_0x5a883d[_0x3e0157(0xb3)](_0x3e0157(0xab))),_0x5ac4e7=Array['isArray'](_0x592067['fields'])?_0x592067[_0x3e0157(0x8f)]:Array[_0x3e0157(0x71)](_0x592067[_0x3e0157(0x88)])?_0x592067[_0x3e0157(0x88)]:[],_0x24f1ab=_0x5ac4e7[_0x3e0157(0x76)](_0x2f8dac=>normalizeField(_0x2f8dac))[_0x3e0157(0x72)](_0x1d617f=>_0x1d617f!==null),_0x246419=_0x592067['operations']??{},_0x99518e=[];for(const [_0x3f191c,_0x5423b6]of Object[_0x3e0157(0xaa)](_0x246419)){const _0x4b41ac=normalizeOperationEntry(_0x3f191c,_0x5423b6);if(_0x4b41ac)_0x99518e[_0x3e0157(0x7e)](_0x4b41ac);}const _0x563751=_0x592067['dbtableConfig']??{},_0xf60e77=_0x592067['dataset']??{},_0x382c7a=_0x563751['dbId']!=null?{'id':_0x563751[_0x3e0157(0xb9)],'name':_0x563751[_0x3e0157(0x90)]??null}:undefined;let _0x2399f0;return typeof _0x592067[_0x3e0157(0xae)]===_0x3e0157(0xa9)&&(_0x2399f0=parseJsonMaybe(_0x592067['extend'])),{'ok':!![],'data':{'id':_0x592067[_0x3e0157(0xa6)]??_0x592067['id'],'name':_0x592067[_0x3e0157(0x98)],'code':_0x592067[_0x3e0157(0xb8)]||_0x592067['code'],'doVersion':_0x592067['doVersion'],'description':_0x592067['description']||_0xf60e77[_0x3e0157(0x85)]||undefined,'source':_0x592067[_0x3e0157(0x91)]||_0xf60e77[_0x3e0157(0xb7)],'table':_0x563751[_0x3e0157(0x89)]||_0xf60e77['tableName'],'datasetKey':_0x563751['datasetKey'],'pk':_0x563751[_0x3e0157(0x7d)],'db':_0x382c7a,'dbtable':summarizeDbtable(_0x563751),'fields':_0x24f1ab,'operations':_0x99518e,'indexes':Array[_0x3e0157(0x71)](_0xf60e77[_0x3e0157(0x94)])?_0xf60e77[_0x3e0157(0x94)]:[],'relations':Array['isArray'](_0x592067[_0x3e0157(0x8b)])?_0x592067[_0x3e0157(0x8b)]['map'](_0x191649=>({..._0x191649[_0x3e0157(0xa0)]!=null?{'relationId':_0x191649[_0x3e0157(0xa0)]}:{},'fromDataset':_0x592067['name'],'fromCode':_0x592067[_0x3e0157(0xb8)]||_0x592067[_0x3e0157(0xab)],'fromTable':_0x563751[_0x3e0157(0x89)]||_0xf60e77[_0x3e0157(0x89)],'fromField':_0x191649['fromField'],'toDataset':_0x191649['toDatasetName'],'toCode':_0x191649[_0x3e0157(0xa5)],'toTable':_0x191649[_0x3e0157(0xb4)],'toField':_0x191649[_0x3e0157(0xa8)],'labelField':_0x191649['toFieldLabel']||undefined,'cardinality':_0x191649[_0x3e0157(0x78)]||undefined,'bizRelationType':_0x191649[_0x3e0157(0x73)]===_0x3e0157(0x93)?_0x3e0157(0x93):null})):[],'relatedPages':normalizeRelatedPages(_0x592067[_0x3e0157(0x86)]),...Array[_0x3e0157(0x71)](_0x592067[_0x3e0157(0x83)])?{'columnCodeListWithDeleted':_0x592067[_0x3e0157(0x83)]}:{},'formatRules':Array['isArray'](_0x592067['formatRules'])?_0x592067[_0x3e0157(0x79)]:[],'validateRules':Array['isArray'](_0x592067[_0x3e0157(0x8d)])?_0x592067['validateRules']:[],..._0x2399f0!==undefined?{'extend':_0x2399f0}:{},'stats':{'fieldCount':_0x24f1ab['length'],'operationCount':_0x99518e[_0x3e0157(0x92)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a82_0x24f1(){const _0x6b826c=['string','3873969GcoFWr','join','shape','/smartapi/dataset/update-driven-data',',\x20actual\x20','object','stringify','1136970FfAaIn','5tyDanm','patch-json','value','1821774xijcto','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','modelCode','tableName','parse','has','data','hint','appCode','extend','get','datasetName','2114lFLeAu','patch','expect-json','Updated\x20dataset\x20extend\x20(','Expectation\x20mismatch\x20at\x20extend.','--expect-json','Expected\x20','message','6225255xqBmeb','\x20must\x20be\x20a\x20JSON\x20object','dbName','businessGroup','keys','code','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','length','75176RhVfCv','validation','dbtableConfig','isArray','33IZUSrp','13230tPGmJe','1432lPQbNM','dataset','No\x20changes\x20for\x20dataset\x20extend','str','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','trim','Unsupported\x20patch\x20key:\x20','Allowed\x20keys:\x20','--patch-json','write','26Omrrqe','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','sort','dbId','--code\x20is\x20required','expect'];a82_0x24f1=function(){return _0x6b826c;};return a82_0x24f1();}const a82_0x5aa71e=a82_0x476d;(function(_0x28af0b,_0x53654d){const _0xc87ddb=a82_0x476d,_0x4bd323=_0x28af0b();while(!![]){try{const _0xcf261a=-parseInt(_0xc87ddb(0x15a))/0x1*(parseInt(_0xc87ddb(0x17b))/0x2)+parseInt(_0xc87ddb(0x16f))/0x3*(parseInt(_0xc87ddb(0x16b))/0x4)+-parseInt(_0xc87ddb(0x14b))/0x5*(parseInt(_0xc87ddb(0x14e))/0x6)+-parseInt(_0xc87ddb(0x170))/0x7*(-parseInt(_0xc87ddb(0x171))/0x8)+parseInt(_0xc87ddb(0x162))/0x9+-parseInt(_0xc87ddb(0x14a))/0xa+-parseInt(_0xc87ddb(0x182))/0xb;if(_0xcf261a===_0x53654d)break;else _0x4bd323['push'](_0x4bd323['shift']());}catch(_0x466a01){_0x4bd323['push'](_0x4bd323['shift']());}}}(a82_0x24f1,0x6b5c8));function a82_0x476d(_0x4c9a7a,_0x4a74e4){_0x4c9a7a=_0x4c9a7a-0x145;const _0x24f1d7=a82_0x24f1();let _0x476d27=_0x24f1d7[_0x4c9a7a];return _0x476d27;}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_0x5aa71e(0x165),{'message':a82_0x5aa71e(0x175),'hint':a82_0x5aa71e(0x14f)}]]);export function parseJsonObjectFlag(_0x102b05,_0x2de101){const _0x549b7a=a82_0x5aa71e;if(!_0x102b05)return undefined;let _0x260ce0;try{_0x260ce0=JSON[_0x549b7a(0x152)](_0x102b05);}catch(_0x2fc24a){const _0x25ebde=_0x2fc24a instanceof Error?_0x2fc24a[_0x549b7a(0x161)]:String(_0x2fc24a);throw CliErrors['validation'](_0x2de101+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x25ebde);}if(!isPlainObject(_0x260ce0)||Array[_0x549b7a(0x16e)](_0x260ce0))throw CliErrors['validation'](_0x2de101+_0x549b7a(0x163));return _0x260ce0;}export function validateExtendPatchKeys(_0x179944){const _0x26ba58=a82_0x5aa71e,_0x1f5abf=Object[_0x26ba58(0x166)](_0x179944);if(_0x1f5abf[_0x26ba58(0x16a)]===0x0)throw CliErrors[_0x26ba58(0x16c)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x4ed795 of _0x1f5abf){const _0x28045f=EXTEND_PATCH_REDIRECTS[_0x26ba58(0x158)](_0x4ed795);if(_0x28045f)throw CliErrors['validation'](_0x28045f['message'],_0x28045f[_0x26ba58(0x155)]);if(!MUTABLE_EXTEND_KEYS[_0x26ba58(0x153)](_0x4ed795))throw CliErrors['validation'](_0x26ba58(0x177)+_0x4ed795,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x3ee679=a82_0x5aa71e,_0x9f1345=Array['from'](MUTABLE_EXTEND_KEYS)[_0x3ee679(0x17d)]();return _0x9f1345[_0x3ee679(0x16a)]>0x0?_0x3ee679(0x178)+_0x9f1345[_0x3ee679(0x183)](',\x20'):_0x3ee679(0x168);}export function applyExtendPatch(_0xc0581e,_0x410c3d){const _0xd88d78=a82_0x5aa71e;validateExtendPatchKeys(_0x410c3d);const _0x25de7e=deepClone(_0xc0581e),_0x209faf=[];for(const [_0x31922f,_0x5d6804]of Object['entries'](_0x410c3d)){const _0x4ec7f5=_0x25de7e[_0x31922f],_0x230c52=deepClone(_0x5d6804);!deepEqual(_0x4ec7f5,_0x230c52)&&(_0x25de7e[_0x31922f]=_0x230c52,_0x209faf['push']('extend.'+_0x31922f));}return _0x209faf[_0xd88d78(0x17d)](),{'after':_0x25de7e,'changedPaths':_0x209faf,'changed':_0x209faf[_0xd88d78(0x16a)]>0x0};}export function assertExpectation(_0x54c572,_0x2d3621){const _0x233cbb=a82_0x5aa71e;if(!_0x2d3621)return;for(const [_0xf97985,_0xa8a6db]of Object['entries'](_0x2d3621)){const _0x2ed66c=_0x54c572[_0xf97985];if(!deepEqual(_0x2ed66c,_0xa8a6db))throw CliErrors['validation'](_0x233cbb(0x15e)+_0xf97985,_0x233cbb(0x160)+JSON[_0x233cbb(0x149)](_0xa8a6db)+_0x233cbb(0x147)+JSON['stringify'](_0x2ed66c));}}export async function buildDatasetExtendUpdateResult({appCode:_0x3f820c,input:_0x30d9dd,dryRun:_0x17f665}){const _0x4664fd=a82_0x5aa71e;validateInput(_0x30d9dd);const _0x2cb906=await getDatasetDetail(_0x30d9dd[_0x4664fd(0x167)]),_0x3300d2=parseDatasetExtend(_0x2cb906[_0x4664fd(0x157)]),_0x70497c=deepClone(_0x3300d2[_0x4664fd(0x14d)]);assertExpectation(_0x70497c,_0x30d9dd[_0x4664fd(0x180)]);const {after:_0x21119e,changedPaths:_0x4585ef,changed:_0x3013e4}=applyExtendPatch(_0x70497c,_0x30d9dd['patch']),_0x50a050=summarizeDataset(_0x2cb906,_0x30d9dd['code']);return _0x3013e4&&!_0x17f665&&(_0x2cb906[_0x4664fd(0x157)]=serializeDatasetExtend(_0x21119e,_0x3300d2[_0x4664fd(0x145)]),await updateDrivenData(_0x2cb906)),{'ok':!![],'data':{'appCode':_0x3f820c,'selector':{'code':_0x30d9dd['code']},'dataset':_0x50a050,'dryRun':_0x17f665,'changed':_0x3013e4,'changedPaths':_0x4585ef,'before':{'extend':_0x70497c},'after':{'extend':_0x21119e},'submitted':_0x3013e4&&!_0x17f665},'message':_0x3013e4?_0x17f665?_0x4664fd(0x169)+_0x4585ef[_0x4664fd(0x183)](',\x20')+')':_0x4664fd(0x15d)+_0x4585ef[_0x4664fd(0x183)](',\x20')+')':_0x4664fd(0x173)};}export const datasetExtendUpdate={'service':a82_0x5aa71e(0x172),'command':'extend-update','description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a82_0x5aa71e(0x17a),'flags':[CODE_FLAG,{'name':a82_0x5aa71e(0x14c),'type':'string','required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':'expect-json','type':a82_0x5aa71e(0x181),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x8b14ce){validateInput(readExtendUpdateInput(_0x8b14ce));},async 'dryRun'(_0x1e5535){const _0x149032=a82_0x5aa71e,_0x354ff6=await buildDatasetExtendUpdateResult({'appCode':_0x1e5535[_0x149032(0x156)],'input':readExtendUpdateInput(_0x1e5535),'dryRun':!![]});return{'method':'POST','url':_0x149032(0x146),'body':_0x354ff6[_0x149032(0x154)],'description':_0x354ff6['message']};},async 'execute'(_0x56d385){const _0x25f2ca=a82_0x5aa71e;return buildDatasetExtendUpdateResult({'appCode':_0x56d385[_0x25f2ca(0x156)],'input':readExtendUpdateInput(_0x56d385),'dryRun':![]});}};function readExtendUpdateInput(_0x12a571){const _0x4f3911=a82_0x5aa71e,_0x2a7f19=trim(_0x12a571[_0x4f3911(0x174)](_0x4f3911(0x167))),_0x442a37=parseJsonObjectFlag(_0x12a571[_0x4f3911(0x174)](_0x4f3911(0x14c)),_0x4f3911(0x179)),_0x148dc0=parseJsonObjectFlag(_0x12a571['str'](_0x4f3911(0x15c)),_0x4f3911(0x15f));return{'code':_0x2a7f19,'patch':_0x442a37||{},'expect':_0x148dc0};}function validateInput(_0x1450ca){const _0x29ab98=a82_0x5aa71e;if(!_0x1450ca[_0x29ab98(0x167)])throw CliErrors['validation'](_0x29ab98(0x17f));validateExtendPatchKeys(_0x1450ca[_0x29ab98(0x15b)]);}function parseDatasetExtend(_0x4029b2){const _0x363d9f=a82_0x5aa71e;if(typeof _0x4029b2===_0x363d9f(0x181)){const _0x428c9c=_0x4029b2[_0x363d9f(0x176)]();if(!_0x428c9c)return{'value':{},'shape':_0x363d9f(0x181)};let _0x58027f;try{_0x58027f=JSON[_0x363d9f(0x152)](_0x428c9c);}catch(_0xfe28f1){const _0x379637=_0xfe28f1 instanceof Error?_0xfe28f1[_0x363d9f(0x161)]:String(_0xfe28f1);throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x379637);}if(!isPlainObject(_0x58027f)||Array[_0x363d9f(0x16e)](_0x58027f))throw CliErrors[_0x363d9f(0x16c)](_0x363d9f(0x17c));return{'value':_0x58027f,'shape':_0x363d9f(0x181)};}if(_0x4029b2===undefined||_0x4029b2===null)return{'value':{},'shape':_0x363d9f(0x181)};if(!isPlainObject(_0x4029b2)||Array[_0x363d9f(0x16e)](_0x4029b2))throw CliErrors[_0x363d9f(0x16c)](_0x363d9f(0x17c));return{'value':_0x4029b2,'shape':_0x363d9f(0x148)};}function serializeDatasetExtend(_0x108c04,_0x2bf144){const _0x7088c5=a82_0x5aa71e;return _0x2bf144===_0x7088c5(0x181)?JSON[_0x7088c5(0x149)](_0x108c04):_0x108c04;}function summarizeDataset(_0x5e293c,_0xf382f5){const _0x25dcd8=a82_0x5aa71e,_0x109ad6=isPlainObject(_0x5e293c['dataset'])?_0x5e293c['dataset']:{},_0x5c9176=isPlainObject(_0x5e293c[_0x25dcd8(0x16d)])?_0x5e293c['dbtableConfig']:{};return{'id':_0x5e293c['modelId']??_0x5e293c['id']??_0x109ad6['datasetId']??null,'code':_0x5e293c[_0x25dcd8(0x150)]??_0x5e293c[_0x25dcd8(0x167)]??_0x109ad6['datasetCode']??_0xf382f5,'name':_0x5e293c['name']??_0x109ad6[_0x25dcd8(0x159)]??null,'table':_0x5c9176['tableName']??_0x109ad6[_0x25dcd8(0x151)]??null,'db':_0x5c9176[_0x25dcd8(0x164)]??_0x5c9176[_0x25dcd8(0x17e)]??null};}function deepClone(_0x362c84){const _0x5296ac=a82_0x5aa71e;if(_0x362c84===undefined)return _0x362c84;return JSON[_0x5296ac(0x152)](JSON[_0x5296ac(0x149)](_0x362c84));}function deepEqual(_0x38610f,_0x1c379f){const _0x48d379=a82_0x5aa71e;return JSON['stringify'](_0x38610f)===JSON[_0x48d379(0x149)](_0x1c379f);}function isPlainObject(_0x1a47d2){return Boolean(_0x1a47d2)&&typeof _0x1a47d2==='object'&&!Array['isArray'](_0x1a47d2);}function trim(_0x43a2f5){const _0x5ca02c=a82_0x5aa71e,_0x22a0e0=String(_0x43a2f5||'')[_0x5ca02c(0x176)]();return _0x22a0e0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x3eb608=a83_0x4c17;(function(_0x53fe1e,_0x10045d){const _0x161cef=a83_0x4c17,_0x407521=_0x53fe1e();while(!![]){try{const _0x273d3b=parseInt(_0x161cef(0x1fa))/0x1*(-parseInt(_0x161cef(0x1ef))/0x2)+-parseInt(_0x161cef(0x1ee))/0x3*(-parseInt(_0x161cef(0x20d))/0x4)+-parseInt(_0x161cef(0x1e3))/0x5+-parseInt(_0x161cef(0x20c))/0x6+parseInt(_0x161cef(0x20e))/0x7+-parseInt(_0x161cef(0x1e0))/0x8*(parseInt(_0x161cef(0x1da))/0x9)+parseInt(_0x161cef(0x1e6))/0xa;if(_0x273d3b===_0x10045d)break;else _0x407521['push'](_0x407521['shift']());}catch(_0x2b4eaa){_0x407521['push'](_0x407521['shift']());}}}(a83_0x43de,0x2090e));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='Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.',NO_RESUBMIT_WARNING='Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.';function a83_0x43de(){const _0x1bff32=['Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','dataset','backend','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','--field\x20is\x20required','some','displayName','isArray','yes','field-restore','readback-failed','Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20','confirm','235410Thzouq','4CHGGdx','355523vXMzZX','fields','appCode','data','1046934rXOFrt','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','object','str','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','--code\x20is\x20required','8mFDZfK','filter','string','681470ynAQxh','Dry-run:\x20Dataset\x20field\x20','dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','4727500hXflBX','Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','properties','mutation-outcome-unknown','validation','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','name','map','420459zryTNS','1166xfEnym','field','code','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','\x20would\x20be\x20restored','all','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','length','/smartapi/dataset/restore-column','write','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','409MqbJzP','warnings','trim','message'];a83_0x43de=function(){return _0x1bff32;};return a83_0x43de();}export async function buildDatasetFieldRestoreResult({appCode:_0x43f965,input:_0x3ba472,dryRun:_0x43e217}){const _0x85b5b4=a83_0x4c17,_0x4a6215=_0x3ba472['code']['trim'](),_0x818531=_0x3ba472[_0x85b5b4(0x1f0)][_0x85b5b4(0x1fc)]();if(!_0x4a6215)throw CliErrors[_0x85b5b4(0x1ea)](_0x85b5b4(0x1df));if(!_0x818531)throw CliErrors[_0x85b5b4(0x1ea)](_0x85b5b4(0x203));const _0x512c3c=await getDatasetDetail(_0x4a6215),_0x2bf46d=resolveDataset(_0x512c3c,_0x4a6215),_0x34573e=(await listUserDeletedDatasetColumns(_0x2bf46d['id']))[_0x85b5b4(0x1ed)](normalizeUserDeletedField),_0x126526=_0x34573e[_0x85b5b4(0x1e1)](_0x598ee4=>_0x598ee4['code']===_0x818531);if(_0x126526[_0x85b5b4(0x1f6)]===0x0)throw CliErrors[_0x85b5b4(0x1ea)]('No\x20user-deleted\x20field\x20found\x20with\x20code:\x20'+_0x818531,_0x85b5b4(0x1f2));if(_0x126526[_0x85b5b4(0x1f6)]>0x1)throw CliErrors['validation'](_0x85b5b4(0x201)+_0x818531,'No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.');const _0x63863=_0x126526[0x0],_0x11f721={'id':_0x63863['id'],'code':_0x63863[_0x85b5b4(0x1f1)],'displayName':_0x63863[_0x85b5b4(0x205)],'deleted':![],'active':!![]},_0x237509={'operation':_0x85b5b4(0x208),'appCode':_0x43f965,'selector':{'code':_0x4a6215,'field':_0x818531},'dataset':_0x2bf46d,'before':_0x63863,'dryRun':_0x43e217,'warnings':[PAGE_SYNC_WARNING]};if(_0x43e217)return{'ok':!![],'data':{..._0x237509,'after':_0x11f721,'backend':{'submitted':![],'requestedColumnIds':[_0x63863['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x85b5b4(0x1e4)+_0x818531+_0x85b5b4(0x1f3)};let _0x295fdd=null,_0x4edfdf=![];try{_0x295fdd=await restoreDatasetColumns(_0x2bf46d['id'],[_0x63863['id']]);}catch(_0x5ab777){if(!isPlatformTransportFailure(_0x5ab777))throw _0x5ab777;_0x4edfdf=!![];}const _0x3e88e4={'submitted':!![],'requestedColumnIds':[_0x63863['id']],'restoredCount':_0x295fdd,..._0x4edfdf?{'outcome':'unknown'}:{}};let _0x4723c8,_0x5dc1ea;try{[_0x4723c8,_0x5dc1ea]=await Promise[_0x85b5b4(0x1f4)]([listUserDeletedDatasetColumns(_0x2bf46d['id']),getDatasetDetail(_0x4a6215)]);}catch{return{'ok':![],'data':{..._0x237509,'after':null,'backend':_0x3e88e4,'warnings':[..._0x237509[_0x85b5b4(0x1fb)],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x4edfdf?_0x85b5b4(0x1e9):_0x85b5b4(0x209)}},'message':_0x4edfdf?'Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20'+_0x818531+'.\x20'+NO_RESUBMIT_WARNING:_0x85b5b4(0x20a)+_0x818531+'.\x20'+NO_RESUBMIT_WARNING};}const _0x4b422f=!_0x4723c8[_0x85b5b4(0x204)](_0x1765d2=>Number(_0x1765d2['id'])===_0x63863['id']||_0x1765d2[_0x85b5b4(0x1f1)]===_0x818531),_0x5803ff=findActiveField(_0x5dc1ea,_0x63863['id'],_0x818531),_0x177409=_0x5803ff!==null,_0x12d649=!_0x4edfdf&&_0x295fdd===0x1&&_0x4b422f&&_0x177409,_0x19b416={'performed':!![],'deletedListCleared':_0x4b422f,'activeFieldPresent':_0x177409,'passed':_0x12d649,..._0x4edfdf?{'reason':'mutation-outcome-unknown'}:_0x295fdd!==0x1?{'reason':'server-restored-count-mismatch'}:{}};return{'ok':_0x12d649,'data':{..._0x237509,'after':_0x5803ff,'backend':_0x3e88e4,'warnings':_0x12d649?_0x237509['warnings']:[..._0x237509['warnings'],NO_RESUBMIT_WARNING],'verification':_0x19b416},'message':_0x12d649?'Restored\x20Dataset\x20field\x20'+_0x818531:_0x4edfdf?_0x85b5b4(0x1fe)+_0x818531+'.\x20'+NO_RESUBMIT_WARNING:_0x85b5b4(0x1db)+_0x818531+'.\x20'+NO_RESUBMIT_WARNING};}function a83_0x4c17(_0x85d707,_0x46ad42){_0x85d707=_0x85d707-0x1d7;const _0x43deea=a83_0x43de();let _0x4c1731=_0x43deea[_0x85d707];return _0x4c1731;}export const datasetFieldRestore={'service':a83_0x3eb608(0x1ff),'command':a83_0x3eb608(0x208),'description':a83_0x3eb608(0x1e7),'risk':a83_0x3eb608(0x1f8),'structuredErrors':!![],'rejectedFlags':[{'name':a83_0x3eb608(0x1f4),'message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','hint':'Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.'},{'name':'fields','message':a83_0x3eb608(0x202),'hint':a83_0x3eb608(0x1de)},{'name':a83_0x3eb608(0x207),'message':a83_0x3eb608(0x1f5),'hint':a83_0x3eb608(0x1eb)},{'name':a83_0x3eb608(0x20b),'message':a83_0x3eb608(0x1e5),'hint':a83_0x3eb608(0x1eb)}],'flags':[CODE_FLAG,{'name':a83_0x3eb608(0x1f0),'type':'string','required':!![],'description':a83_0x3eb608(0x1f9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x48b96c){readInput(_0x48b96c);},async 'dryRun'(_0x1d916f){const _0x10b247=a83_0x3eb608,_0x497a83=await buildDatasetFieldRestoreResult({'appCode':_0x1d916f['appCode'],'input':readInput(_0x1d916f),'dryRun':!![]});return asDryRunResult({..._0x497a83[_0x10b247(0x1d9)],'body':{'datasetId':_0x497a83['data'][_0x10b247(0x1ff)]['id'],'columnIds':_0x497a83[_0x10b247(0x1d9)][_0x10b247(0x200)]['requestedColumnIds']}},{'method':'POST','url':_0x10b247(0x1f7),'description':_0x497a83[_0x10b247(0x1fd)]});},async 'execute'(_0x4ee809){const _0x1c0d65=a83_0x3eb608;return buildDatasetFieldRestoreResult({'appCode':_0x4ee809[_0x1c0d65(0x1d8)],'input':readInput(_0x4ee809),'dryRun':![]});}};function readInput(_0x236723){const _0x4f4458=a83_0x3eb608,_0x4fb990={'code':String(_0x236723['str']('code')||'')[_0x4f4458(0x1fc)](),'field':String(_0x236723[_0x4f4458(0x1dd)](_0x4f4458(0x1f0))||'')['trim']()};if(!_0x4fb990[_0x4f4458(0x1f1)])throw CliErrors[_0x4f4458(0x1ea)]('--code\x20is\x20required');if(!_0x4fb990[_0x4f4458(0x1f0)])throw CliErrors[_0x4f4458(0x1ea)](_0x4f4458(0x203));return _0x4fb990;}function findActiveField(_0x3a2ce3,_0x1dad28,_0x3c772d){const _0x2526f0=a83_0x3eb608,_0x4f64d9=Array[_0x2526f0(0x206)](_0x3a2ce3[_0x2526f0(0x1d7)]),_0x2534f2=_0x4f64d9?_0x3a2ce3['fields']:Array[_0x2526f0(0x206)](_0x3a2ce3[_0x2526f0(0x1e8)])?_0x3a2ce3['properties']:[];for(const _0x586f84 of _0x2534f2){if(!_0x586f84||typeof _0x586f84!==_0x2526f0(0x1dc))continue;const _0x33411b=_0x586f84,_0x513379=_0x4f64d9?_0x33411b[_0x2526f0(0x1ec)]:_0x33411b['code'],_0x51d35e=_0x33411b['deleted']!==!![]&&Number(_0x33411b['id'])===_0x1dad28&&_0x513379===_0x3c772d;if(!_0x51d35e)continue;const _0x1ba023=_0x4f64d9?_0x33411b[_0x2526f0(0x205)]:_0x33411b[_0x2526f0(0x1ec)];return{'id':_0x1dad28,'code':_0x3c772d,'displayName':typeof _0x1ba023===_0x2526f0(0x1e2)&&_0x1ba023?_0x1ba023:_0x3c772d,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
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']();}
|
|
1
|
+
const a84_0x2b37f6=a84_0x4490;(function(_0x113ca8,_0x13446d){const _0x261ddf=a84_0x4490,_0x4ccf0d=_0x113ca8();while(!![]){try{const _0x497452=-parseInt(_0x261ddf(0x1f7))/0x1+-parseInt(_0x261ddf(0x20a))/0x2+parseInt(_0x261ddf(0x1f3))/0x3+parseInt(_0x261ddf(0x20d))/0x4+parseInt(_0x261ddf(0x21d))/0x5+-parseInt(_0x261ddf(0x1d3))/0x6*(-parseInt(_0x261ddf(0x1d2))/0x7)+parseInt(_0x261ddf(0x212))/0x8*(-parseInt(_0x261ddf(0x1ea))/0x9);if(_0x497452===_0x13446d)break;else _0x4ccf0d['push'](_0x4ccf0d['shift']());}catch(_0x524ba8){_0x4ccf0d['push'](_0x4ccf0d['shift']());}}}(a84_0x3bfb,0x89f4a));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a84_0x3bfb(){const _0x42202c=['defaultAggregation','length','tableName','patch','options','161npPAwJ','127170TIeTXv','/smartapi/dataset/update-driven-data','properties','size','datetimeFormat','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','\x20must\x20be\x20a\x20JSON\x20object','stringify','description','required','expect','dbTypeLen','dbTypeScale','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','--code\x20is\x20required','Field\x20not\x20found:\x20','datasetId','\x20must\x20be\x20valid\x20JSON\x20object:\x20','modelCode','entries','chartRole','code','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','9nvjjQD','join','findIndex','datasetCode','dataset','Expected\x20',',\x20actual\x20','modelId','doType','1662720mHAIqe','fields','sort','expect-json','664682jbmDog','dbName','dbFieldName','Expectation\x20mismatch\x20at\x20','POST','Dry-run:\x20dataset\x20field\x20','from','parse','dbId','--patch-json','validation','Updated\x20dataset\x20field\x20','write','autoIncrement','Exact\x20raw\x20fields[].name\x20to\x20patch','patch-json','--expect-json','isArray','dbtableConfig','662782OMjGTy','message','add','694512oXVQch','str','string','deprecated','Forbidden\x20patch\x20key:\x20','381560fnNMQM','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field','appCode','keys','object','datasetName','trim','systemRetain','pkField','name','1967405EPtEGl'];a84_0x3bfb=function(){return _0x42202c;};return a84_0x3bfb();}import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a84_0x2b37f6(0x1f2),'displayName',a84_0x2b37f6(0x1db),a84_0x2b37f6(0x1d1),a84_0x2b37f6(0x1dc),a84_0x2b37f6(0x1d7),a84_0x2b37f6(0x21e),a84_0x2b37f6(0x1e7),a84_0x2b37f6(0x210)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x2b37f6(0x21c),a84_0x2b37f6(0x1e8),'dbType',a84_0x2b37f6(0x1de),a84_0x2b37f6(0x1df),a84_0x2b37f6(0x1f9),a84_0x2b37f6(0x1cf),'deleted',a84_0x2b37f6(0x21b),a84_0x2b37f6(0x204),a84_0x2b37f6(0x21a)]);export function parseJsonObjectFlag(_0x41c7d,_0x40f2ef){const _0x3f4314=a84_0x2b37f6;if(!_0x41c7d)return undefined;let _0x3f0595;try{_0x3f0595=JSON[_0x3f4314(0x1fe)](_0x41c7d);}catch(_0x5cc339){const _0x4cff40=_0x5cc339 instanceof Error?_0x5cc339[_0x3f4314(0x20b)]:String(_0x5cc339);throw CliErrors['validation'](_0x40f2ef+_0x3f4314(0x1e4)+_0x4cff40);}if(!isPlainObject(_0x3f0595)||Array['isArray'](_0x3f0595))throw CliErrors['validation'](_0x40f2ef+_0x3f4314(0x1d9));return _0x3f0595;}export function validatePatchKeys(_0x47097c){const _0x15e838=a84_0x2b37f6,_0x4e38b4=Object[_0x15e838(0x216)](_0x47097c);if(_0x4e38b4[_0x15e838(0x21f)]===0x0)throw CliErrors[_0x15e838(0x201)](_0x15e838(0x1d8));for(const _0x32844e of _0x4e38b4){if(FORBIDDEN_FIELD_KEYS['has'](_0x32844e))throw CliErrors[_0x15e838(0x201)](_0x15e838(0x211)+_0x32844e);if(!MUTABLE_FIELD_KEYS['has'](_0x32844e))throw CliErrors[_0x15e838(0x201)]('Unsupported\x20patch\x20key:\x20'+_0x32844e,'Allowed\x20keys:\x20'+Array[_0x15e838(0x1fd)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}function a84_0x4490(_0x3d4fa4,_0x5daae3){_0x3d4fa4=_0x3d4fa4-0x1cf;const _0x3bfb68=a84_0x3bfb();let _0x4490fa=_0x3bfb68[_0x3d4fa4];return _0x4490fa;}export function applyFieldPatch(_0x322fd3,_0x479fff){const _0xd2c054=a84_0x2b37f6;validatePatchKeys(_0x479fff);const _0x489527=deepClone(_0x322fd3),_0x47515a=new Set();for(const [_0x27809e,_0x4926ba]of Object[_0xd2c054(0x1e6)](_0x479fff)){const _0x4e89b6=_0x489527[_0x27809e],_0x3ec6f2=mergePatchValue(_0x4e89b6,_0x4926ba);!deepEqual(_0x4e89b6,_0x3ec6f2)&&(_0x489527[_0x27809e]=_0x3ec6f2,_0x47515a[_0xd2c054(0x20c)](_0x27809e),collectChangedPaths(_0x27809e,_0x4e89b6,_0x3ec6f2,_0x47515a));}return{'after':_0x489527,'changedPaths':Array[_0xd2c054(0x1fd)](_0x47515a)[_0xd2c054(0x1f5)](),'changed':_0x47515a[_0xd2c054(0x1d6)]>0x0};}export function assertExpectation(_0x3e5098,_0x274ac2){const _0x77b81e=a84_0x2b37f6;if(!_0x274ac2)return;for(const [_0x597771,_0x1e0447]of Object[_0x77b81e(0x1e6)](_0x274ac2)){const _0x3ce23d=_0x3e5098[_0x597771];if(!deepEqual(_0x3ce23d,_0x1e0447))throw CliErrors[_0x77b81e(0x201)](_0x77b81e(0x1fa)+_0x597771,_0x77b81e(0x1ef)+JSON[_0x77b81e(0x1da)](_0x1e0447)+_0x77b81e(0x1f0)+JSON[_0x77b81e(0x1da)](_0x3ce23d));}}export async function buildDatasetFieldUpdateResult({appCode:_0x37cce8,input:_0x91f1fb,dryRun:_0x597623}){const _0x25aff3=a84_0x2b37f6;validateInput(_0x91f1fb);const _0x75d79=await getDatasetDetail(_0x91f1fb[_0x25aff3(0x1e8)]),_0x3f9289=readFieldArray(_0x75d79),_0x2420cd=_0x3f9289[_0x25aff3(0x1ec)](_0x1e2b22=>_0x1e2b22?.[_0x25aff3(0x21c)]===_0x91f1fb[_0x25aff3(0x214)]);if(_0x2420cd<0x0)throw CliErrors[_0x25aff3(0x201)](_0x25aff3(0x1e2)+_0x91f1fb['field']);const _0x100ece=deepClone(_0x3f9289[_0x2420cd]);assertExpectation(_0x100ece,_0x91f1fb[_0x25aff3(0x1dd)]);const {after:_0x525c18,changedPaths:_0x57bd83,changed:_0x99d6b4}=applyFieldPatch(_0x100ece,_0x91f1fb['patch']),_0x240067=summarizeDataset(_0x75d79,_0x91f1fb[_0x25aff3(0x1e8)]);return _0x99d6b4&&!_0x597623&&(_0x3f9289[_0x2420cd]=_0x525c18,await updateDrivenData(_0x75d79)),{'ok':!![],'data':{'appCode':_0x37cce8,'selector':{'code':_0x91f1fb['code']},'dataset':_0x240067,'field':{'id':_0x100ece['id']??null,'name':_0x100ece[_0x25aff3(0x21c)]},'dryRun':_0x597623,'changed':_0x99d6b4,'changedPaths':_0x57bd83,'before':_0x100ece,'after':_0x525c18,'submitted':_0x99d6b4&&!_0x597623},'message':_0x99d6b4?_0x597623?_0x25aff3(0x1fc)+_0x91f1fb['field']+'\x20would\x20change\x20('+_0x57bd83[_0x25aff3(0x1eb)](',\x20')+')':_0x25aff3(0x202)+_0x91f1fb[_0x25aff3(0x214)]+'\x20('+_0x57bd83[_0x25aff3(0x1eb)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x91f1fb[_0x25aff3(0x214)]};}export const datasetFieldUpdate={'service':'dataset','command':'field-update','description':a84_0x2b37f6(0x1e0),'risk':a84_0x2b37f6(0x203),'flags':[CODE_FLAG,{'name':a84_0x2b37f6(0x214),'type':a84_0x2b37f6(0x20f),'required':!![],'description':a84_0x2b37f6(0x205)},{'name':'patch-json','type':'string','required':!![],'description':a84_0x2b37f6(0x1e9)},{'name':a84_0x2b37f6(0x1f6),'type':a84_0x2b37f6(0x20f),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x41e319){validateInput(readFieldUpdateInput(_0x41e319));},async 'dryRun'(_0x529c9e){const _0x181f5b=a84_0x2b37f6,_0x4c4717=await buildDatasetFieldUpdateResult({'appCode':_0x529c9e[_0x181f5b(0x215)],'input':readFieldUpdateInput(_0x529c9e),'dryRun':!![]});return{'method':_0x181f5b(0x1fb),'url':_0x181f5b(0x1d4),'body':_0x4c4717['data'],'description':_0x4c4717[_0x181f5b(0x20b)]};},async 'execute'(_0x429869){const _0x786ba8=a84_0x2b37f6;return buildDatasetFieldUpdateResult({'appCode':_0x429869[_0x786ba8(0x215)],'input':readFieldUpdateInput(_0x429869),'dryRun':![]});}};function readFieldUpdateInput(_0x288a76){const _0x1ed110=a84_0x2b37f6,_0x549c3b=trim(_0x288a76[_0x1ed110(0x20e)]('code')),_0x1f20e9=emptyToUndefined(_0x288a76[_0x1ed110(0x20e)](_0x1ed110(0x214))),_0x2833c1=parseJsonObjectFlag(_0x288a76[_0x1ed110(0x20e)](_0x1ed110(0x206)),_0x1ed110(0x200)),_0x502169=parseJsonObjectFlag(_0x288a76[_0x1ed110(0x20e)]('expect-json'),_0x1ed110(0x207));return{'code':_0x549c3b,'field':_0x1f20e9||'','patch':_0x2833c1||{},'expect':_0x502169};}function validateInput(_0x5e40c0){const _0x363905=a84_0x2b37f6;if(!_0x5e40c0[_0x363905(0x1e8)])throw CliErrors['validation'](_0x363905(0x1e1));if(!_0x5e40c0[_0x363905(0x214)])throw CliErrors['validation']('--field\x20is\x20required');validatePatchKeys(_0x5e40c0[_0x363905(0x1d0)]);}function readFieldArray(_0xb7ef1c){const _0x1a333c=a84_0x2b37f6;if(Array[_0x1a333c(0x208)](_0xb7ef1c['fields']))return _0xb7ef1c[_0x1a333c(0x1f4)];if(Array[_0x1a333c(0x208)](_0xb7ef1c[_0x1a333c(0x1d5)]))return _0xb7ef1c[_0x1a333c(0x1d5)];throw CliErrors['validation'](_0x1a333c(0x213));}function summarizeDataset(_0x241fd3,_0x26b9a2){const _0x46e3e8=a84_0x2b37f6,_0x6d499c=isPlainObject(_0x241fd3[_0x46e3e8(0x1ee)])?_0x241fd3[_0x46e3e8(0x1ee)]:{},_0xf2a688=isPlainObject(_0x241fd3[_0x46e3e8(0x209)])?_0x241fd3[_0x46e3e8(0x209)]:{};return{'id':_0x241fd3[_0x46e3e8(0x1f1)]??_0x241fd3['id']??_0x6d499c[_0x46e3e8(0x1e3)]??null,'code':_0x241fd3[_0x46e3e8(0x1e5)]??_0x241fd3[_0x46e3e8(0x1e8)]??_0x6d499c[_0x46e3e8(0x1ed)]??_0x26b9a2,'name':_0x241fd3['name']??_0x6d499c[_0x46e3e8(0x218)]??null,'table':_0xf2a688[_0x46e3e8(0x1cf)]??_0x6d499c['tableName']??null,'db':_0xf2a688[_0x46e3e8(0x1f8)]??_0xf2a688[_0x46e3e8(0x1ff)]??null};}function mergePatchValue(_0x224a15,_0x22093b){if(isPlainObject(_0x224a15)&&isPlainObject(_0x22093b))return deepMerge(_0x224a15,_0x22093b);return deepClone(_0x22093b);}function deepMerge(_0x163b22,_0xe70f4b){const _0x4ff181=a84_0x2b37f6,_0x39f15c=deepClone(_0x163b22);for(const [_0x4a9714,_0x8c1cdd]of Object[_0x4ff181(0x1e6)](_0xe70f4b)){_0x39f15c[_0x4a9714]=isPlainObject(_0x39f15c[_0x4a9714])&&isPlainObject(_0x8c1cdd)?deepMerge(_0x39f15c[_0x4a9714],_0x8c1cdd):deepClone(_0x8c1cdd);}return _0x39f15c;}function collectChangedPaths(_0x393321,_0xac84b0,_0x2e26ed,_0x24616f){const _0x279128=a84_0x2b37f6;if(!isPlainObject(_0xac84b0)||!isPlainObject(_0x2e26ed))return;const _0xb2f85=new Set([...Object[_0x279128(0x216)](_0xac84b0),...Object[_0x279128(0x216)](_0x2e26ed)]);for(const _0x2b2e72 of _0xb2f85){const _0x3a5df4=_0xac84b0[_0x2b2e72],_0x1abce5=_0x2e26ed[_0x2b2e72];!deepEqual(_0x3a5df4,_0x1abce5)&&_0x24616f['add'](_0x393321+'.'+_0x2b2e72);}}function deepClone(_0x4bea9a){const _0x472603=a84_0x2b37f6;if(_0x4bea9a===undefined)return _0x4bea9a;return JSON[_0x472603(0x1fe)](JSON[_0x472603(0x1da)](_0x4bea9a));}function deepEqual(_0x2d0bf5,_0x353e99){const _0x580a75=a84_0x2b37f6;return JSON['stringify'](_0x2d0bf5)===JSON[_0x580a75(0x1da)](_0x353e99);}function isPlainObject(_0x537879){const _0x210108=a84_0x2b37f6;return Boolean(_0x537879)&&typeof _0x537879===_0x210108(0x217)&&!Array[_0x210108(0x208)](_0x537879);}function emptyToUndefined(_0x4d8895){const _0x1fe3f9=a84_0x2b37f6,_0x1ef166=String(_0x4d8895||'')[_0x1fe3f9(0x219)]();return _0x1ef166||undefined;}function trim(_0x3463d7){const _0x8a2f27=a84_0x2b37f6;return String(_0x3463d7||'')[_0x8a2f27(0x219)]();}
|