@lovrabet/rabetbase-cli 2.5.12 → 2.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -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
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x5873d2=a74_0x5250;(function(_0x16e0e9,_0x449a23){const _0x136488=a74_0x5250,_0x5b8c84=_0x16e0e9();while(!![]){try{const _0x3e59ed=parseInt(_0x136488(0x13d))/0x1*(-parseInt(_0x136488(0x14c))/0x2)+parseInt(_0x136488(0x11b))/0x3*(-parseInt(_0x136488(0x142))/0x4)+-parseInt(_0x136488(0x129))/0x5*(-parseInt(_0x136488(0x134))/0x6)+-parseInt(_0x136488(0x12e))/0x7+parseInt(_0x136488(0x14f))/0x8*(parseInt(_0x136488(0x151))/0x9)+-parseInt(_0x136488(0x132))/0xa+-parseInt(_0x136488(0x152))/0xb*(-parseInt(_0x136488(0x13c))/0xc);if(_0x3e59ed===_0x449a23)break;else _0x5b8c84['push'](_0x5b8c84['shift']());}catch(_0xf6eeb2){_0x5b8c84['push'](_0x5b8c84['shift']());}}}(a74_0x1ed0,0x7f779));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a74_0x1ed0(){const _0xe0e997=['isArray','dbid=','description','message','confirm','isInteger','type','16404XCguPU','387624YleqBc','title','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','length','appCode','153828thnDCf','cascade','source','Would\x20delete\x20','map','/smartapi/dataset/delete?cascade=','\x20--appcode\x20','validation','POST','add','4JqsFOc','false','\x20dataset(s)','160pbrQHI','high-risk-write','242685uPyeRg','12815PxdxGo','boolean','Dataset\x20id','dbid','dbId','code','push','Matched\x20','name','No\x20undeleted\x20dataset\x20found\x20for\x20','str','dataset','57ijieRE','num','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','expected-count','tableName','relatedPageInfoList','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','dbtableConfig','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','\x20dataset(s);\x20','Deleted\x20','deleted','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','850wZfQAe','filter','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','relatedPages','true','4206741OGgZRW','object','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','bool','271360EaCQqw','delete','18504kXRYNU'];a74_0x1ed0=function(){return _0xe0e997;};return a74_0x1ed0();}const DATASET_ID_FLAG={'name':'id','type':'number','description':a74_0x5873d2(0x154)},DBID_FLAG={'name':a74_0x5873d2(0x112),'type':'number','description':a74_0x5873d2(0x12b)},CONFIRM_FLAG={'name':a74_0x5873d2(0x139),'type':a74_0x5873d2(0x153),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':a74_0x5873d2(0x143),'type':'boolean','description':a74_0x5873d2(0x128)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':'number','description':a74_0x5873d2(0x11d)};export const datasetDelete={'service':a74_0x5873d2(0x11a),'command':a74_0x5873d2(0x133),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a74_0x5873d2(0x150),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5ab053){const _0x47cbc9=a74_0x5873d2,_0x1b75cc=_0x5ab053[_0x47cbc9(0x11c)]('id'),_0x2160dd=_0x5ab053[_0x47cbc9(0x119)](_0x47cbc9(0x114)),_0x357ccf=_0x5ab053[_0x47cbc9(0x11c)](_0x47cbc9(0x112)),_0x1d1003=[_0x1b75cc>0x0,Boolean(_0x2160dd),_0x357ccf>0x0][_0x47cbc9(0x12a)](Boolean);if(_0x1d1003[_0x47cbc9(0x140)]===0x0)throw CliErrors[_0x47cbc9(0x149)](_0x47cbc9(0x130));if(_0x1d1003[_0x47cbc9(0x140)]>0x1)throw CliErrors[_0x47cbc9(0x149)](_0x47cbc9(0x13f));},async 'dryRun'(_0x29d96f){const _0x44d7cf=a74_0x5873d2,_0x218fe0=await resolveTargets(_0x29d96f),_0x23cb7a=_0x29d96f[_0x44d7cf(0x131)](_0x44d7cf(0x143));return{'method':_0x44d7cf(0x14a),'url':_0x44d7cf(0x147)+(_0x23cb7a?_0x44d7cf(0x12d):_0x44d7cf(0x14d)),'body':{'count':_0x218fe0[_0x44d7cf(0x140)],'cascade':_0x23cb7a,'datasets':_0x218fe0},'description':_0x23cb7a?_0x44d7cf(0x145)+_0x218fe0['length']+_0x44d7cf(0x122):'Would\x20safely\x20delete\x20'+_0x218fe0[_0x44d7cf(0x140)]+_0x44d7cf(0x124)};},async 'execute'(_0x460015){const _0x5a324a=a74_0x5873d2;if(!_0x460015[_0x5a324a(0x131)](_0x5a324a(0x139)))throw CliErrors[_0x5a324a(0x149)](_0x5a324a(0x121),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x169ecd=await resolveTargets(_0x460015),_0x114f78=_0x460015[_0x5a324a(0x131)](_0x5a324a(0x143)),_0x456ec8=[],_0x19097c=[];for(const _0x104a61 of _0x169ecd){try{await deleteDataset(_0x104a61['id'],_0x114f78),_0x456ec8[_0x5a324a(0x115)](_0x104a61);}catch(_0x3ce291){_0x19097c['push']({..._0x104a61,'error':_0x3ce291 instanceof Error?_0x3ce291[_0x5a324a(0x138)]:String(_0x3ce291)});}}if(_0x19097c[_0x5a324a(0x140)]>0x0){const _0x3ba12b=buildPageRestoreCommands(_0x460015['appCode'],_0x114f78?_0x456ec8:[]);return{'ok':![],'data':{'requested':_0x169ecd[_0x5a324a(0x140)],'cascade':_0x114f78,'deletedCount':_0x456ec8['length'],'failedCount':_0x19097c['length'],'deleted':_0x456ec8,'failed':_0x19097c,'pageRestoreCommands':_0x3ba12b},'message':_0x5a324a(0x126)+_0x456ec8['length']+'/'+_0x169ecd[_0x5a324a(0x140)]+_0x5a324a(0x125)+_0x19097c[_0x5a324a(0x140)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x169ecd[_0x5a324a(0x140)],'cascade':_0x114f78,'deletedCount':_0x456ec8[_0x5a324a(0x140)],'deleted':_0x456ec8,'pageRestoreCommands':buildPageRestoreCommands(_0x460015[_0x5a324a(0x141)],_0x114f78?_0x456ec8:[])},'message':_0x5a324a(0x126)+_0x456ec8['length']+_0x5a324a(0x14e)};}};async function resolveTargets(_0x4dd5b8){const _0x165f6f=a74_0x5873d2,_0x67db65=_0x4dd5b8[_0x165f6f(0x11c)]('id'),_0x1ce685=_0x4dd5b8['str'](_0x165f6f(0x114)),_0x415204=_0x4dd5b8[_0x165f6f(0x11c)](_0x165f6f(0x112));let _0x3ea840;_0x1ce685?(_0x3ea840=await listDatasets(_0x4dd5b8[_0x165f6f(0x141)],{'code':_0x1ce685}),_0x3ea840=_0x3ea840['filter'](_0x37afbe=>_0x37afbe[_0x165f6f(0x114)]===_0x1ce685)):(_0x3ea840=await listDatasets(_0x4dd5b8['appCode']),_0x67db65>0x0&&(_0x3ea840=_0x3ea840[_0x165f6f(0x12a)](_0x46119b=>_0x46119b['id']===_0x67db65)),_0x415204>0x0&&(_0x3ea840=_0x3ea840[_0x165f6f(0x12a)](_0xf8cf2e=>_0xf8cf2e[_0x165f6f(0x123)]?.['dbId']===_0x415204)));const _0x2c75d6=[];for(const _0x5c2338 of _0x3ea840){const _0x42555b=await getDatasetDetail(_0x5c2338[_0x165f6f(0x114)]),_0x38a156=Array[_0x165f6f(0x135)](_0x42555b[_0x165f6f(0x120)])?_0x42555b[_0x165f6f(0x120)][_0x165f6f(0x12a)](_0x206d18=>_0x206d18!=null&&typeof _0x206d18===_0x165f6f(0x12f)&&_0x206d18[_0x165f6f(0x127)]!==!![]):[];_0x2c75d6['push'](normalizeTarget(_0x5c2338,_0x38a156));}if(_0x2c75d6[_0x165f6f(0x140)]===0x0){const _0xadd35f=_0x1ce685||(_0x67db65>0x0?'id='+_0x67db65:_0x165f6f(0x136)+_0x415204);throw CliErrors[_0x165f6f(0x149)](_0x165f6f(0x118)+_0xadd35f+'.');}const _0x57ca66=_0x4dd5b8[_0x165f6f(0x11c)](_0x165f6f(0x11e));if(_0x57ca66>0x0&&_0x2c75d6[_0x165f6f(0x140)]!==_0x57ca66)throw CliErrors['validation'](_0x165f6f(0x116)+_0x2c75d6[_0x165f6f(0x140)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x57ca66+'.');return _0x2c75d6;}function normalizeTarget(_0x3a446b,_0x18e5fd){const _0x55e4dd=a74_0x5873d2,_0x44c86a=_0x3a446b[_0x55e4dd(0x123)]??{},_0x41f953=_0x18e5fd[_0x55e4dd(0x146)](_0x357474=>{const _0xe57895=_0x55e4dd;if(_0x357474==null||typeof _0x357474!=='object')return null;const _0x2b61c4=_0x357474,_0x284e1e=Number(_0x2b61c4['id']);if(!Number[_0xe57895(0x13a)](_0x284e1e)||_0x284e1e<=0x0)return null;const _0x56cc10=_0x2b61c4[_0xe57895(0x13e)]??_0x2b61c4[_0xe57895(0x117)];return{'id':_0x284e1e,..._0x56cc10?{'name':String(_0x56cc10)}:{},..._0x2b61c4[_0xe57895(0x13b)]?{'type':String(_0x2b61c4['type'])}:{}};})[_0x55e4dd(0x12a)](_0x5e0f78=>_0x5e0f78!==null);return{'id':_0x3a446b['id'],'code':_0x3a446b[_0x55e4dd(0x114)],'name':_0x3a446b['name'],'description':_0x3a446b[_0x55e4dd(0x137)],'source':_0x3a446b[_0x55e4dd(0x144)],'dbId':_0x44c86a[_0x55e4dd(0x113)],'dbName':_0x44c86a['dbName'],'tableName':_0x44c86a[_0x55e4dd(0x11f)],'relatedPageCount':_0x41f953[_0x55e4dd(0x140)],'relatedPages':_0x41f953};}function a74_0x5250(_0x3f0b1e,_0x4e2c3e){_0x3f0b1e=_0x3f0b1e-0x112;const _0x1ed07a=a74_0x1ed0();let _0x5250f7=_0x1ed07a[_0x3f0b1e];return _0x5250f7;}function buildPageRestoreCommands(_0x19f2ad,_0x31f7ef){const _0x2131ac=a74_0x5873d2,_0x3fe6a0=new Set();for(const _0x542326 of _0x31f7ef){for(const _0xf8802e of _0x542326[_0x2131ac(0x12c)])_0x3fe6a0[_0x2131ac(0x14b)](_0xf8802e['id']);}return[..._0x3fe6a0][_0x2131ac(0x146)](_0x1fd6a5=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x1fd6a5+_0x2131ac(0x148)+_0x19f2ad);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a75_0x2af0(){const _0x36c7d8=['1327944imEUeQ','15mhcPOv','240KDEupC','11MydOru','context','8846988vazgYh','3nvmQKf','2797638tZsmQo','91ZncvkO','543384luQYnN','837080KwmAUK','3141700eJcuqK','412740otRmWh'];a75_0x2af0=function(){return _0x36c7d8;};return a75_0x2af0();}const a75_0x4c3147=a75_0x19e9;function a75_0x19e9(_0x191d07,_0x8cfa6f){_0x191d07=_0x191d07-0x17f;const _0x2af013=a75_0x2af0();let _0x19e99c=_0x2af013[_0x191d07];return _0x19e99c;}(function(_0x387c69,_0x92c8c0){const _0x1deaeb=a75_0x19e9,_0x4b5252=_0x387c69();while(!![]){try{const _0x1dd7d8=parseInt(_0x1deaeb(0x17f))/0x1+parseInt(_0x1deaeb(0x180))/0x2+parseInt(_0x1deaeb(0x188))/0x3*(parseInt(_0x1deaeb(0x182))/0x4)+-parseInt(_0x1deaeb(0x183))/0x5*(parseInt(_0x1deaeb(0x189))/0x6)+-parseInt(_0x1deaeb(0x18a))/0x7*(parseInt(_0x1deaeb(0x18b))/0x8)+-parseInt(_0x1deaeb(0x181))/0x9*(-parseInt(_0x1deaeb(0x184))/0xa)+-parseInt(_0x1deaeb(0x185))/0xb*(parseInt(_0x1deaeb(0x187))/0xc);if(_0x1dd7d8===_0x92c8c0)break;else _0x4b5252['push'](_0x4b5252['shift']());}catch(_0x354365){_0x4b5252['push'](_0x4b5252['shift']());}}}(a75_0x2af0,0xc88f1));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignContext=designCommand(a75_0x4c3147(0x186));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x31de3f=a76_0x4eb5;function a76_0x4eb5(_0x19234f,_0x393225){_0x19234f=_0x19234f-0xd0;const _0xc6849b=a76_0xc684();let _0x4eb54e=_0xc6849b[_0x19234f];return _0x4eb54e;}(function(_0x5bd899,_0x5c4abc){const _0x100e66=a76_0x4eb5,_0x1bec7d=_0x5bd899();while(!![]){try{const _0x3840a0=-parseInt(_0x100e66(0xd3))/0x1+-parseInt(_0x100e66(0xd0))/0x2+-parseInt(_0x100e66(0xd4))/0x3+-parseInt(_0x100e66(0xd5))/0x4+-parseInt(_0x100e66(0xd2))/0x5+-parseInt(_0x100e66(0xd6))/0x6+parseInt(_0x100e66(0xd7))/0x7;if(_0x3840a0===_0x5c4abc)break;else _0x1bec7d['push'](_0x1bec7d['shift']());}catch(_0x2ebf96){_0x1bec7d['push'](_0x1bec7d['shift']());}}}(a76_0xc684,0x5a1ba));import{designCommand}from'../../services/dataset-design/commands.js';function a76_0xc684(){const _0x26eac6=['683892gPWoSg','1663692FYXvaR','1220604DnhbmL','3779454nVNwYx','19758354MOxomD','406570OuZOug','start','383695CeoDIt'];a76_0xc684=function(){return _0x26eac6;};return a76_0xc684();}export const datasetDesignStart=designCommand(a76_0x31de3f(0xd1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a8d58,_0x29fc90){const _0x36be88=a77_0x45ab,_0x19ab8e=_0x3a8d58();while(!![]){try{const _0x3324c0=-parseInt(_0x36be88(0x189))/0x1+-parseInt(_0x36be88(0x186))/0x2+parseInt(_0x36be88(0x184))/0x3*(parseInt(_0x36be88(0x188))/0x4)+parseInt(_0x36be88(0x18a))/0x5*(-parseInt(_0x36be88(0x18c))/0x6)+-parseInt(_0x36be88(0x182))/0x7+parseInt(_0x36be88(0x185))/0x8*(-parseInt(_0x36be88(0x18b))/0x9)+-parseInt(_0x36be88(0x187))/0xa*(-parseInt(_0x36be88(0x183))/0xb);if(_0x3324c0===_0x29fc90)break;else _0x19ab8e['push'](_0x19ab8e['shift']());}catch(_0x119b51){_0x19ab8e['push'](_0x19ab8e['shift']());}}}(a77_0x2923,0x76ccc));function a77_0x45ab(_0x1ac90e,_0x1bcf6e){_0x1ac90e=_0x1ac90e-0x182;const _0x2923d5=a77_0x2923();let _0x45ab88=_0x2923d5[_0x1ac90e];return _0x45ab88;}function a77_0x2923(){const _0x307555=['10ZHCtgI','48476lhTYlc','877054LottGz','2324200XQENYG','63BrdnWE','6vgRHBx','851039pFOaiP','36217676yzoLCq','27QrbCIe','778192GWZXZp','1541188rTbOgf'];a77_0x2923=function(){return _0x307555;};return a77_0x2923();}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignStatus=designCommand('status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4a522e,_0x1f43da){const _0x315d12=a78_0x35ae,_0x4d901b=_0x4a522e();while(!![]){try{const _0x5723b9=parseInt(_0x315d12(0x1c0))/0x1+parseInt(_0x315d12(0x1c3))/0x2+parseInt(_0x315d12(0x1c1))/0x3*(-parseInt(_0x315d12(0x1c6))/0x4)+parseInt(_0x315d12(0x1c4))/0x5*(-parseInt(_0x315d12(0x1c7))/0x6)+parseInt(_0x315d12(0x1c5))/0x7*(parseInt(_0x315d12(0x1ca))/0x8)+-parseInt(_0x315d12(0x1c9))/0x9*(parseInt(_0x315d12(0x1c8))/0xa)+parseInt(_0x315d12(0x1c2))/0xb;if(_0x5723b9===_0x1f43da)break;else _0x4d901b['push'](_0x4d901b['shift']());}catch(_0x324dba){_0x4d901b['push'](_0x4d901b['shift']());}}}(a78_0x47ba,0x7c91a));function a78_0x35ae(_0x1ca806,_0x1933aa){_0x1ca806=_0x1ca806-0x1c0;const _0x47ba2f=a78_0x47ba();let _0x35ae76=_0x47ba2f[_0x1ca806];return _0x35ae76;}import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncRetry=designCommand('sync-retry');function a78_0x47ba(){const _0x57a5ab=['1520510IwDWSM','9mLbswY','8IxQHMK','34425oHkiEK','2742018yyTRpy','10780143LmBCTE','1572304GWyfJR','16045GjTXrm','3641323LfiWBw','4hjkQmE','1392xFzDDI'];a78_0x47ba=function(){return _0x57a5ab;};return a78_0x47ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a79_0x2ce8(_0x3f9264,_0x5e6271){_0x3f9264=_0x3f9264-0x9d;const _0x4fb5c8=a79_0x4fb5();let _0x2ce8b6=_0x4fb5c8[_0x3f9264];return _0x2ce8b6;}function a79_0x4fb5(){const _0x32dbe2=['3267803qWYMbk','1432jRSwzh','12zlOMbd','1472555oMKprR','7LlRKDg','1062872xOygWc','103942QSamlp','60UCjkUn','1660445Soozbq','3tnwVbQ','10737jeCuEb','5304100YDvkxv'];a79_0x4fb5=function(){return _0x32dbe2;};return a79_0x4fb5();}(function(_0x12ac2f,_0x351ad9){const _0x4c00c8=a79_0x2ce8,_0x55d70c=_0x12ac2f();while(!![]){try{const _0x476937=-parseInt(_0x4c00c8(0x9d))/0x1*(-parseInt(_0x4c00c8(0x9f))/0x2)+parseInt(_0x4c00c8(0xa2))/0x3*(parseInt(_0x4c00c8(0x9e))/0x4)+-parseInt(_0x4c00c8(0xa1))/0x5*(-parseInt(_0x4c00c8(0xa7))/0x6)+-parseInt(_0x4c00c8(0xa8))/0x7+-parseInt(_0x4c00c8(0xa6))/0x8*(-parseInt(_0x4c00c8(0xa3))/0x9)+parseInt(_0x4c00c8(0xa4))/0xa+-parseInt(_0x4c00c8(0xa5))/0xb*(parseInt(_0x4c00c8(0xa0))/0xc);if(_0x476937===_0x351ad9)break;else _0x55d70c['push'](_0x55d70c['shift']());}catch(_0x40050a){_0x55d70c['push'](_0x55d70c['shift']());}}}(a79_0x4fb5,0x537a0));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignSyncStatus=designCommand('sync-status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a80_0x13b1(){const _0x372d93=['110257gmnNSy','19621224qECbdG','25491QCfBJW','validate','6965100kbHViY','4053975QoJYGs','2297600yPQtHx','1154011jpOpGO','496qsTlRj'];a80_0x13b1=function(){return _0x372d93;};return a80_0x13b1();}const a80_0x233284=a80_0x374b;function a80_0x374b(_0x3ccbd5,_0x2ba8c7){_0x3ccbd5=_0x3ccbd5-0x155;const _0x13b1bb=a80_0x13b1();let _0x374b15=_0x13b1bb[_0x3ccbd5];return _0x374b15;}(function(_0xfbd8ad,_0x390325){const _0x5ebe20=a80_0x374b,_0x4b3cda=_0xfbd8ad();while(!![]){try{const _0x25f7e6=-parseInt(_0x5ebe20(0x15d))/0x1+parseInt(_0x5ebe20(0x15c))/0x2+parseInt(_0x5ebe20(0x158))/0x3*(parseInt(_0x5ebe20(0x155))/0x4)+parseInt(_0x5ebe20(0x15b))/0x5+parseInt(_0x5ebe20(0x15a))/0x6+parseInt(_0x5ebe20(0x156))/0x7+-parseInt(_0x5ebe20(0x157))/0x8;if(_0x25f7e6===_0x390325)break;else _0x4b3cda['push'](_0x4b3cda['shift']());}catch(_0x58a517){_0x4b3cda['push'](_0x4b3cda['shift']());}}}(a80_0x13b1,0x8e5f8));import{designCommand}from'../../services/dataset-design/commands.js';export const datasetDesignValidate=designCommand(a80_0x233284(0x159));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x104512=a81_0x2918;(function(_0x3d5b98,_0x132d25){const _0x4388e0=a81_0x2918,_0x2f558c=_0x3d5b98();while(!![]){try{const _0x5729c5=-parseInt(_0x4388e0(0x136))/0x1+parseInt(_0x4388e0(0x165))/0x2*(parseInt(_0x4388e0(0x11d))/0x3)+-parseInt(_0x4388e0(0x14d))/0x4+-parseInt(_0x4388e0(0x151))/0x5*(-parseInt(_0x4388e0(0x135))/0x6)+parseInt(_0x4388e0(0x13f))/0x7+parseInt(_0x4388e0(0x122))/0x8+-parseInt(_0x4388e0(0x169))/0x9*(parseInt(_0x4388e0(0x156))/0xa);if(_0x5729c5===_0x132d25)break;else _0x2f558c['push'](_0x2f558c['shift']());}catch(_0x40eefc){_0x2f558c['push'](_0x2f558c['shift']());}}}(a81_0x40eb,0xbbf10));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x5480e3){const _0xcb97ed=a81_0x2918;if(_0x5480e3[_0xcb97ed(0x142)])return null;const _0x490ae0=Boolean(_0x5480e3[_0xcb97ed(0x12c)]!==undefined||_0x5480e3[_0xcb97ed(0x126)]!==undefined);let _0x3b707a={};if(!_0x490ae0&&typeof _0x5480e3['extend']===_0xcb97ed(0x147))try{_0x3b707a=JSON['parse'](_0x5480e3[_0xcb97ed(0x14c)]);}catch{}const _0x25859f=_0x490ae0?_0x5480e3['name']:_0x5480e3[_0xcb97ed(0x161)],_0x42f0bc=_0x490ae0?_0x5480e3['displayName']:_0x5480e3['name'],_0x4c7438=_0x490ae0?_0x5480e3[_0xcb97ed(0x126)]:_0x5480e3['type']||_0x5480e3[_0xcb97ed(0x15f)],_0x2b5bde=_0x490ae0?_0x5480e3['pkField']===!![]:_0x3b707a[_0xcb97ed(0x125)]===!![],_0x2f72bf=_0x490ae0?_0x5480e3['required']===!![]:_0x3b707a[_0xcb97ed(0x13b)]===!![],_0x47cdfb=_0x490ae0?_0x5480e3[_0xcb97ed(0x15a)]??null:_0x3b707a[_0xcb97ed(0x15a)]??null,_0x5969cd={'name':_0x25859f,'displayName':_0x42f0bc||_0x25859f,'type':_0x4c7438,'dbType':_0x5480e3['dbType'],'pk':_0x2b5bde,'required':_0x2f72bf,'deprecated':_0x5480e3['deprecated']===!![],'description':_0x5480e3[_0xcb97ed(0x11c)]||undefined};return Array[_0xcb97ed(0x167)](_0x47cdfb)&&_0x47cdfb['length']>0x0&&(_0x5969cd['options']=_0x47cdfb),_0x5969cd;}function parseJsonMaybe(_0x41a55e){const _0x56b847=a81_0x2918;if(typeof _0x41a55e!==_0x56b847(0x147))return _0x41a55e;try{return JSON['parse'](_0x41a55e);}catch{return _0x41a55e;}}function a81_0x40eb(){const _0x598365=['pkField','doType','createTimeField','sourceType','tableName','beforeScriptId','indexes','displayName','filter','afterScriptId','dbId','title','columnCodeListWithDeleted','entries','map','push','4554LYZLWG','1368023vrbfZt','fields','toFieldLabel','updateTimeField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','required','toTableName','modifierIdField','toDatasetCode','9390563qZiCzE','length','main_sub','deleted','type','dblinkInfoDTO','allFields','datasetKey','string','creatorNameField','operations','object','relatedPageInfoList','extend','1027984wQZpSr','labelField','dbName','name','2935bmRLaG','requestFields','doVersion','fromField','requestBody','110BBfADS','modelId','host','allFieldNames','options','dataset','formatRules','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','validateRules','dataType','path','code','relations','detail','split','764GsjEJA','creatorIdField','isArray','relationId','1684746pPJtpH','method','logicField','modelCode','cardinality','description','11613YACVRd','alias','responseBody','read','properties','9505576BHgmlK','responseFields','tableComment'];a81_0x40eb=function(){return _0x598365;};return a81_0x40eb();}function normalizeOperationEntry(_0xb14f56,_0xa0f3ac){const _0x4fa7e7=a81_0x2918;if(!_0xa0f3ac||typeof _0xa0f3ac!==_0x4fa7e7(0x14a))return null;if(!_0xa0f3ac[_0x4fa7e7(0x16a)]||!_0xa0f3ac[_0x4fa7e7(0x160)])return null;const _0x234069={'name':_0xb14f56,'method':_0xa0f3ac[_0x4fa7e7(0x16a)],'path':_0xa0f3ac['path']};if(_0xa0f3ac['host'])_0x234069[_0x4fa7e7(0x158)]=_0xa0f3ac[_0x4fa7e7(0x158)];if(_0xa0f3ac['requestBody']!=null){const _0x7899d1=parseJsonMaybe(_0xa0f3ac[_0x4fa7e7(0x155)]);_0x234069[_0x4fa7e7(0x155)]=_0x7899d1;}if(_0xa0f3ac['responseBody']!=null){const _0x2f4245=parseJsonMaybe(_0xa0f3ac['responseBody']);_0x234069[_0x4fa7e7(0x11f)]=_0x2f4245;}if(_0xa0f3ac[_0x4fa7e7(0x12a)]!=null)_0x234069[_0x4fa7e7(0x12a)]=_0xa0f3ac['beforeScriptId'];if(_0xa0f3ac[_0x4fa7e7(0x12e)]!=null)_0x234069['afterScriptId']=_0xa0f3ac[_0x4fa7e7(0x12e)];if(Array[_0x4fa7e7(0x167)](_0xa0f3ac['requestFields']))_0x234069[_0x4fa7e7(0x152)]=_0xa0f3ac[_0x4fa7e7(0x152)];if(Array[_0x4fa7e7(0x167)](_0xa0f3ac[_0x4fa7e7(0x123)]))_0x234069[_0x4fa7e7(0x123)]=_0xa0f3ac[_0x4fa7e7(0x123)];return _0x234069;}function summarizeDbtable(_0x2db281){const _0x2af532=a81_0x2918,_0x2dceef={},_0x3466c4=[_0x2af532(0x12f),_0x2af532(0x14f),_0x2af532(0x129),_0x2af532(0x146),_0x2af532(0x125),_0x2af532(0x145),_0x2af532(0x16b),_0x2af532(0x127),_0x2af532(0x139),_0x2af532(0x166),_0x2af532(0x148),_0x2af532(0x13d),'modifierNameField',_0x2af532(0x14e),_0x2af532(0x144)];for(const _0x114dfe of _0x3466c4){if(_0x2db281[_0x114dfe]!==undefined)_0x2dceef[_0x114dfe]=_0x2db281[_0x114dfe];}return typeof _0x2dceef[_0x2af532(0x145)]===_0x2af532(0x147)&&_0x2dceef[_0x2af532(0x145)][_0x2af532(0x140)]>0x0&&(_0x2dceef[_0x2af532(0x159)]=_0x2dceef['allFields'][_0x2af532(0x164)](',')[_0x2af532(0x133)](_0xabf3aa=>_0xabf3aa['trim']())[_0x2af532(0x12d)](Boolean)),_0x2dceef;}function normalizeRelatedPages(_0x5ce722){const _0x1cb63d=a81_0x2918;if(!Array['isArray'](_0x5ce722))return[];return _0x5ce722[_0x1cb63d(0x12d)](_0x2868c6=>_0x2868c6&&typeof _0x2868c6===_0x1cb63d(0x14a))[_0x1cb63d(0x133)](_0x5edf93=>({'id':_0x5edf93['id'],'type':_0x5edf93[_0x1cb63d(0x143)],'code':_0x5edf93[_0x1cb63d(0x161)],'title':_0x5edf93[_0x1cb63d(0x130)],'deleted':_0x5edf93[_0x1cb63d(0x142)]===!![]}));}function a81_0x2918(_0x5d04e1,_0x45c8d6){_0x5d04e1=_0x5d04e1-0x11c;const _0x40eb15=a81_0x40eb();let _0x291863=_0x40eb15[_0x5d04e1];return _0x291863;}export const datasetDetail={'service':'dataset','command':a81_0x104512(0x163),'description':a81_0x104512(0x13a),'risk':a81_0x104512(0x120),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a81_0x104512(0x11e),'type':a81_0x104512(0x147),'description':a81_0x104512(0x15d)}],async 'execute'(_0x59385e){const _0x19a1ab=a81_0x104512,_0x648f80=await getDatasetDetail(_0x59385e['str'](_0x19a1ab(0x161))),_0x436f0d=Array[_0x19a1ab(0x167)](_0x648f80['fields'])?_0x648f80[_0x19a1ab(0x137)]:Array[_0x19a1ab(0x167)](_0x648f80[_0x19a1ab(0x121)])?_0x648f80[_0x19a1ab(0x121)]:[],_0x393b29=_0x436f0d[_0x19a1ab(0x133)](_0x3c74b0=>normalizeField(_0x3c74b0))[_0x19a1ab(0x12d)](_0x131fbf=>_0x131fbf!==null),_0x5140a0=_0x648f80[_0x19a1ab(0x149)]??{},_0x274cc3=[];for(const [_0x49a11c,_0x3a1f29]of Object[_0x19a1ab(0x132)](_0x5140a0)){const _0x2e460d=normalizeOperationEntry(_0x49a11c,_0x3a1f29);if(_0x2e460d)_0x274cc3[_0x19a1ab(0x134)](_0x2e460d);}const _0x4e9dc8=_0x648f80['dbtableConfig']??{},_0x8967b3=_0x648f80[_0x19a1ab(0x15b)]??{},_0x260a0e=_0x4e9dc8[_0x19a1ab(0x12f)]!=null?{'id':_0x4e9dc8[_0x19a1ab(0x12f)],'name':_0x4e9dc8[_0x19a1ab(0x14f)]??null}:undefined;let _0x418f7b;return typeof _0x648f80[_0x19a1ab(0x14c)]===_0x19a1ab(0x147)&&(_0x418f7b=parseJsonMaybe(_0x648f80[_0x19a1ab(0x14c)])),{'ok':!![],'data':{'id':_0x648f80[_0x19a1ab(0x157)]??_0x648f80['id'],'name':_0x648f80[_0x19a1ab(0x150)],'code':_0x648f80[_0x19a1ab(0x16c)]||_0x648f80[_0x19a1ab(0x161)],'doVersion':_0x648f80[_0x19a1ab(0x153)],'description':_0x648f80['description']||_0x8967b3[_0x19a1ab(0x124)]||undefined,'source':_0x648f80['source']||_0x8967b3[_0x19a1ab(0x128)],'table':_0x4e9dc8[_0x19a1ab(0x129)]||_0x8967b3[_0x19a1ab(0x129)],'datasetKey':_0x4e9dc8[_0x19a1ab(0x146)],'pk':_0x4e9dc8[_0x19a1ab(0x125)],'db':_0x260a0e,'dbtable':summarizeDbtable(_0x4e9dc8),'fields':_0x393b29,'operations':_0x274cc3,'indexes':Array[_0x19a1ab(0x167)](_0x8967b3[_0x19a1ab(0x12b)])?_0x8967b3[_0x19a1ab(0x12b)]:[],'relations':Array[_0x19a1ab(0x167)](_0x648f80[_0x19a1ab(0x162)])?_0x648f80['relations'][_0x19a1ab(0x133)](_0x16481a=>({..._0x16481a[_0x19a1ab(0x168)]!=null?{'relationId':_0x16481a['relationId']}:{},'fromDataset':_0x648f80[_0x19a1ab(0x150)],'fromCode':_0x648f80[_0x19a1ab(0x16c)]||_0x648f80[_0x19a1ab(0x161)],'fromTable':_0x4e9dc8['tableName']||_0x8967b3['tableName'],'fromField':_0x16481a[_0x19a1ab(0x154)],'toDataset':_0x16481a['toDatasetName'],'toCode':_0x16481a[_0x19a1ab(0x13e)],'toTable':_0x16481a[_0x19a1ab(0x13c)],'toField':_0x16481a['toField'],'labelField':_0x16481a[_0x19a1ab(0x138)]||undefined,'cardinality':_0x16481a[_0x19a1ab(0x16d)]||undefined,'bizRelationType':_0x16481a['bizRelationType']===_0x19a1ab(0x141)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x648f80[_0x19a1ab(0x14b)]),...Array[_0x19a1ab(0x167)](_0x648f80[_0x19a1ab(0x131)])?{'columnCodeListWithDeleted':_0x648f80['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x19a1ab(0x167)](_0x648f80[_0x19a1ab(0x15c)])?_0x648f80[_0x19a1ab(0x15c)]:[],'validateRules':Array[_0x19a1ab(0x167)](_0x648f80['validateRules'])?_0x648f80[_0x19a1ab(0x15e)]:[],..._0x418f7b!==undefined?{'extend':_0x418f7b}:{},'stats':{'fieldCount':_0x393b29['length'],'operationCount':_0x274cc3['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a82_0x184e(){const _0x29c128=['extend','code','push','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','113416sYHwgo','datasetCode','1vPKxFc','join','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','dbtableConfig','isArray','dbId','trim','length','stringify','entries','2460900hTabNV','get','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','202116FizDVx','21Qnmyea','message','Patch\x20dataset\x20top-level\x20extend\x20safely','Allowed\x20keys:\x20','Expectation\x20mismatch\x20at\x20extend.','10749sAEORm','businessGroup','str','dataset','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','expect','3563536HevFQu','234280jsZSQW','data','patch','name','--expect-json',',\x20actual\x20','2246526hxyHZi','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','has','patch-json','456tNbXdn','parse','appCode','modelId','Updated\x20dataset\x20extend\x20(','Unsupported\x20patch\x20key:\x20','--patch-json','hint','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','tableName','keys','string','from','value','sort','datasetId','\x20must\x20be\x20a\x20JSON\x20object','validation','object','modelCode'];a82_0x184e=function(){return _0x29c128;};return a82_0x184e();}const a82_0x3ad475=a82_0x1d1e;(function(_0x1e7b08,_0x122834){const _0x1c47b9=a82_0x1d1e,_0xbd3bd0=_0x1e7b08();while(!![]){try{const _0x34a544=-parseInt(_0x1c47b9(0x1d1))/0x1*(-parseInt(_0x1c47b9(0x20e))/0x2)+parseInt(_0x1c47b9(0x1e4))/0x3*(-parseInt(_0x1c47b9(0x1f5))/0x4)+parseInt(_0x1c47b9(0x1eb))/0x5+-parseInt(_0x1c47b9(0x1de))/0x6*(-parseInt(_0x1c47b9(0x1df))/0x7)+parseInt(_0x1c47b9(0x1ea))/0x8+parseInt(_0x1c47b9(0x1f1))/0x9+-parseInt(_0x1c47b9(0x1db))/0xa;if(_0x34a544===_0x122834)break;else _0xbd3bd0['push'](_0xbd3bd0['shift']());}catch(_0xec3a93){_0xbd3bd0['push'](_0xbd3bd0['shift']());}}}(a82_0x184e,0x3bd86));function a82_0x1d1e(_0x5b9b53,_0x52b59e){_0x5b9b53=_0x5b9b53-0x1d1;const _0x184e85=a82_0x184e();let _0x1d1e50=_0x184e85[_0x5b9b53];return _0x1d1e50;}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_0x3ad475(0x1e5),{'message':a82_0x3ad475(0x1fd),'hint':a82_0x3ad475(0x1d3)}]]);export function parseJsonObjectFlag(_0x260930,_0xb1d771){const _0xe396d6=a82_0x3ad475;if(!_0x260930)return undefined;let _0x1d6fa7;try{_0x1d6fa7=JSON[_0xe396d6(0x1f6)](_0x260930);}catch(_0x3e5df0){const _0xf0d0b7=_0x3e5df0 instanceof Error?_0x3e5df0[_0xe396d6(0x1e0)]:String(_0x3e5df0);throw CliErrors['validation'](_0xb1d771+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0xf0d0b7);}if(!isPlainObject(_0x1d6fa7)||Array['isArray'](_0x1d6fa7))throw CliErrors[_0xe396d6(0x207)](_0xb1d771+_0xe396d6(0x206));return _0x1d6fa7;}export function validateExtendPatchKeys(_0x5a35fd){const _0x4549e8=a82_0x3ad475,_0x5765d4=Object[_0x4549e8(0x200)](_0x5a35fd);if(_0x5765d4[_0x4549e8(0x1d8)]===0x0)throw CliErrors[_0x4549e8(0x207)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x552a49 of _0x5765d4){const _0x16afb7=EXTEND_PATCH_REDIRECTS[_0x4549e8(0x1dc)](_0x552a49);if(_0x16afb7)throw CliErrors[_0x4549e8(0x207)](_0x16afb7[_0x4549e8(0x1e0)],_0x16afb7[_0x4549e8(0x1fc)]);if(!MUTABLE_EXTEND_KEYS[_0x4549e8(0x1f3)](_0x552a49))throw CliErrors[_0x4549e8(0x207)](_0x4549e8(0x1fa)+_0x552a49,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x2a61c5=a82_0x3ad475,_0x1d16cc=Array[_0x2a61c5(0x202)](MUTABLE_EXTEND_KEYS)[_0x2a61c5(0x204)]();return _0x1d16cc[_0x2a61c5(0x1d8)]>0x0?_0x2a61c5(0x1e2)+_0x1d16cc[_0x2a61c5(0x1d2)](',\x20'):_0x2a61c5(0x1fe);}export function applyExtendPatch(_0x1abe01,_0x1d690b){const _0x18cd66=a82_0x3ad475;validateExtendPatchKeys(_0x1d690b);const _0x3e2222=deepClone(_0x1abe01),_0x3acfb0=[];for(const [_0x354e8b,_0x4bf6f4]of Object[_0x18cd66(0x1da)](_0x1d690b)){const _0x1e565e=_0x3e2222[_0x354e8b],_0x1c3834=deepClone(_0x4bf6f4);!deepEqual(_0x1e565e,_0x1c3834)&&(_0x3e2222[_0x354e8b]=_0x1c3834,_0x3acfb0[_0x18cd66(0x20c)]('extend.'+_0x354e8b));}return _0x3acfb0[_0x18cd66(0x204)](),{'after':_0x3e2222,'changedPaths':_0x3acfb0,'changed':_0x3acfb0[_0x18cd66(0x1d8)]>0x0};}export function assertExpectation(_0x2d2e57,_0x51049){const _0x39ac17=a82_0x3ad475;if(!_0x51049)return;for(const [_0x51c1c9,_0x32eb64]of Object[_0x39ac17(0x1da)](_0x51049)){const _0x45545c=_0x2d2e57[_0x51c1c9];if(!deepEqual(_0x45545c,_0x32eb64))throw CliErrors[_0x39ac17(0x207)](_0x39ac17(0x1e3)+_0x51c1c9,'Expected\x20'+JSON['stringify'](_0x32eb64)+_0x39ac17(0x1f0)+JSON[_0x39ac17(0x1d9)](_0x45545c));}}export async function buildDatasetExtendUpdateResult({appCode:_0x3d6474,input:_0x5346fe,dryRun:_0x5753fc}){const _0x4ad431=a82_0x3ad475;validateInput(_0x5346fe);const _0x4b7253=await getDatasetDetail(_0x5346fe['code']),_0xfc0722=parseDatasetExtend(_0x4b7253['extend']),_0x3f812a=deepClone(_0xfc0722[_0x4ad431(0x203)]);assertExpectation(_0x3f812a,_0x5346fe[_0x4ad431(0x1e9)]);const {after:_0x5182c3,changedPaths:_0x5b2c76,changed:_0x2988de}=applyExtendPatch(_0x3f812a,_0x5346fe[_0x4ad431(0x1ed)]),_0x38358b=summarizeDataset(_0x4b7253,_0x5346fe['code']);return _0x2988de&&!_0x5753fc&&(_0x4b7253[_0x4ad431(0x20a)]=serializeDatasetExtend(_0x5182c3,_0xfc0722['shape']),await updateDrivenData(_0x4b7253)),{'ok':!![],'data':{'appCode':_0x3d6474,'selector':{'code':_0x5346fe[_0x4ad431(0x20b)]},'dataset':_0x38358b,'dryRun':_0x5753fc,'changed':_0x2988de,'changedPaths':_0x5b2c76,'before':{'extend':_0x3f812a},'after':{'extend':_0x5182c3},'submitted':_0x2988de&&!_0x5753fc},'message':_0x2988de?_0x5753fc?_0x4ad431(0x1e8)+_0x5b2c76['join'](',\x20')+')':_0x4ad431(0x1f9)+_0x5b2c76[_0x4ad431(0x1d2)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a82_0x3ad475(0x1e7),'command':'extend-update','description':a82_0x3ad475(0x1e1),'risk':'write','flags':[CODE_FLAG,{'name':a82_0x3ad475(0x1f4),'type':a82_0x3ad475(0x201),'required':!![],'description':a82_0x3ad475(0x20d)},{'name':'expect-json','type':'string','required':![],'description':a82_0x3ad475(0x1f2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4bd13a){validateInput(readExtendUpdateInput(_0x4bd13a));},async 'dryRun'(_0x2a9fb6){const _0x4a29b4=a82_0x3ad475,_0x3b8f43=await buildDatasetExtendUpdateResult({'appCode':_0x2a9fb6[_0x4a29b4(0x1f7)],'input':readExtendUpdateInput(_0x2a9fb6),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x3b8f43[_0x4a29b4(0x1ec)],'description':_0x3b8f43['message']};},async 'execute'(_0x187b68){const _0x2406d9=a82_0x3ad475;return buildDatasetExtendUpdateResult({'appCode':_0x187b68[_0x2406d9(0x1f7)],'input':readExtendUpdateInput(_0x187b68),'dryRun':![]});}};function readExtendUpdateInput(_0x59a3fe){const _0x341323=a82_0x3ad475,_0x264a16=trim(_0x59a3fe[_0x341323(0x1e6)](_0x341323(0x20b))),_0x13da1e=parseJsonObjectFlag(_0x59a3fe[_0x341323(0x1e6)](_0x341323(0x1f4)),_0x341323(0x1fb)),_0x229fed=parseJsonObjectFlag(_0x59a3fe[_0x341323(0x1e6)]('expect-json'),_0x341323(0x1ef));return{'code':_0x264a16,'patch':_0x13da1e||{},'expect':_0x229fed};}function validateInput(_0x4efb73){const _0x14b090=a82_0x3ad475;if(!_0x4efb73[_0x14b090(0x20b)])throw CliErrors[_0x14b090(0x207)]('--code\x20is\x20required');validateExtendPatchKeys(_0x4efb73[_0x14b090(0x1ed)]);}function parseDatasetExtend(_0x128c40){const _0x1baf8d=a82_0x3ad475;if(typeof _0x128c40===_0x1baf8d(0x201)){const _0x1fef1c=_0x128c40[_0x1baf8d(0x1d7)]();if(!_0x1fef1c)return{'value':{},'shape':_0x1baf8d(0x201)};let _0x317854;try{_0x317854=JSON[_0x1baf8d(0x1f6)](_0x1fef1c);}catch(_0xb2acff){const _0x137a40=_0xb2acff instanceof Error?_0xb2acff[_0x1baf8d(0x1e0)]:String(_0xb2acff);throw CliErrors[_0x1baf8d(0x207)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x137a40);}if(!isPlainObject(_0x317854)||Array['isArray'](_0x317854))throw CliErrors[_0x1baf8d(0x207)](_0x1baf8d(0x1dd));return{'value':_0x317854,'shape':'string'};}if(_0x128c40===undefined||_0x128c40===null)return{'value':{},'shape':_0x1baf8d(0x201)};if(!isPlainObject(_0x128c40)||Array['isArray'](_0x128c40))throw CliErrors['validation'](_0x1baf8d(0x1dd));return{'value':_0x128c40,'shape':_0x1baf8d(0x208)};}function serializeDatasetExtend(_0x45931a,_0x3d94e2){const _0x35c4c0=a82_0x3ad475;return _0x3d94e2===_0x35c4c0(0x201)?JSON[_0x35c4c0(0x1d9)](_0x45931a):_0x45931a;}function summarizeDataset(_0x47d835,_0x25e82b){const _0x35a897=a82_0x3ad475,_0x59557b=isPlainObject(_0x47d835[_0x35a897(0x1e7)])?_0x47d835[_0x35a897(0x1e7)]:{},_0x26a8c3=isPlainObject(_0x47d835['dbtableConfig'])?_0x47d835[_0x35a897(0x1d4)]:{};return{'id':_0x47d835[_0x35a897(0x1f8)]??_0x47d835['id']??_0x59557b[_0x35a897(0x205)]??null,'code':_0x47d835[_0x35a897(0x209)]??_0x47d835[_0x35a897(0x20b)]??_0x59557b[_0x35a897(0x20f)]??_0x25e82b,'name':_0x47d835[_0x35a897(0x1ee)]??_0x59557b['datasetName']??null,'table':_0x26a8c3[_0x35a897(0x1ff)]??_0x59557b[_0x35a897(0x1ff)]??null,'db':_0x26a8c3['dbName']??_0x26a8c3[_0x35a897(0x1d6)]??null};}function deepClone(_0x4b0352){const _0x3ddf1d=a82_0x3ad475;if(_0x4b0352===undefined)return _0x4b0352;return JSON[_0x3ddf1d(0x1f6)](JSON['stringify'](_0x4b0352));}function deepEqual(_0x128984,_0x441a5e){return JSON['stringify'](_0x128984)===JSON['stringify'](_0x441a5e);}function isPlainObject(_0x46d9b3){const _0x27cee5=a82_0x3ad475;return Boolean(_0x46d9b3)&&typeof _0x46d9b3===_0x27cee5(0x208)&&!Array[_0x27cee5(0x1d5)](_0x46d9b3);}function trim(_0x479775){const _0x5745e0=a82_0x3ad475,_0x93cd25=String(_0x479775||'')[_0x5745e0(0x1d7)]();return _0x93cd25;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x4c3b46=a83_0x4bd0;(function(_0x336e6b,_0x4abf83){const _0x2560b7=a83_0x4bd0,_0x189815=_0x336e6b();while(!![]){try{const _0x2266f2=parseInt(_0x2560b7(0x149))/0x1+parseInt(_0x2560b7(0x147))/0x2*(-parseInt(_0x2560b7(0x12d))/0x3)+-parseInt(_0x2560b7(0x132))/0x4*(-parseInt(_0x2560b7(0x154))/0x5)+-parseInt(_0x2560b7(0x12e))/0x6+parseInt(_0x2560b7(0x134))/0x7+-parseInt(_0x2560b7(0x13f))/0x8+-parseInt(_0x2560b7(0x146))/0x9;if(_0x2266f2===_0x4abf83)break;else _0x189815['push'](_0x189815['shift']());}catch(_0xfba7e0){_0x189815['push'](_0x189815['shift']());}}}(a83_0x5776,0x66d16));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a83_0x4bd0(_0x5d73ce,_0x395b1b){_0x5d73ce=_0x5d73ce-0x12a;const _0x577626=a83_0x5776();let _0x4bd0ff=_0x577626[_0x5d73ce];return _0x4bd0ff;}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_0x4c3b46(0x13b),NO_RESUBMIT_WARNING='Do\x20not\x20resubmit\x20field-restore\x20automatically;\x20inspect\x20user-deleted-field-list\x20and\x20dataset\x20detail\x20first.';export async function buildDatasetFieldRestoreResult({appCode:_0x2f0bf7,input:_0x3948c0,dryRun:_0x3783c2}){const _0x4b2d40=a83_0x4c3b46,_0x1a9826=_0x3948c0[_0x4b2d40(0x15f)][_0x4b2d40(0x156)](),_0x277097=_0x3948c0[_0x4b2d40(0x13a)][_0x4b2d40(0x156)]();if(!_0x1a9826)throw CliErrors[_0x4b2d40(0x148)](_0x4b2d40(0x131));if(!_0x277097)throw CliErrors['validation']('--field\x20is\x20required');const _0x41c7dd=await getDatasetDetail(_0x1a9826),_0x4943cd=resolveDataset(_0x41c7dd,_0x1a9826),_0x30b984=(await listUserDeletedDatasetColumns(_0x4943cd['id']))[_0x4b2d40(0x142)](normalizeUserDeletedField),_0x327789=_0x30b984[_0x4b2d40(0x152)](_0x45df8a=>_0x45df8a['code']===_0x277097);if(_0x327789[_0x4b2d40(0x15b)]===0x0)throw CliErrors[_0x4b2d40(0x148)](_0x4b2d40(0x15c)+_0x277097,_0x4b2d40(0x12c));if(_0x327789[_0x4b2d40(0x15b)]>0x1)throw CliErrors[_0x4b2d40(0x148)](_0x4b2d40(0x136)+_0x277097,_0x4b2d40(0x135));const _0x2bb387=_0x327789[0x0],_0x4092b3={'id':_0x2bb387['id'],'code':_0x2bb387[_0x4b2d40(0x15f)],'displayName':_0x2bb387['displayName'],'deleted':![],'active':!![]},_0x4c5c55={'operation':_0x4b2d40(0x155),'appCode':_0x2f0bf7,'selector':{'code':_0x1a9826,'field':_0x277097},'dataset':_0x4943cd,'before':_0x2bb387,'dryRun':_0x3783c2,'warnings':[PAGE_SYNC_WARNING]};if(_0x3783c2)return{'ok':!![],'data':{..._0x4c5c55,'after':_0x4092b3,'backend':{'submitted':![],'requestedColumnIds':[_0x2bb387['id']],'restoredCount':null},'verification':{'performed':![],'passed':null}},'message':_0x4b2d40(0x14f)+_0x277097+'\x20would\x20be\x20restored'};let _0x12fbc1=null,_0x343fb2=![];try{_0x12fbc1=await restoreDatasetColumns(_0x4943cd['id'],[_0x2bb387['id']]);}catch(_0x48bca1){if(!isPlatformTransportFailure(_0x48bca1))throw _0x48bca1;_0x343fb2=!![];}const _0x2db92f={'submitted':!![],'requestedColumnIds':[_0x2bb387['id']],'restoredCount':_0x12fbc1,..._0x343fb2?{'outcome':_0x4b2d40(0x151)}:{}};let _0x343309,_0x4f2a99;try{[_0x343309,_0x4f2a99]=await Promise[_0x4b2d40(0x13d)]([listUserDeletedDatasetColumns(_0x4943cd['id']),getDatasetDetail(_0x1a9826)]);}catch{return{'ok':![],'data':{..._0x4c5c55,'after':null,'backend':_0x2db92f,'warnings':[..._0x4c5c55['warnings'],NO_RESUBMIT_WARNING],'verification':{'performed':![],'passed':![],'reason':_0x343fb2?_0x4b2d40(0x133):_0x4b2d40(0x12b)}},'message':_0x343fb2?'Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20'+_0x277097+'.\x20'+NO_RESUBMIT_WARNING:'Dataset\x20field\x20restore\x20readback\x20failed\x20for\x20'+_0x277097+'.\x20'+NO_RESUBMIT_WARNING};}const _0xb8a785=!_0x343309[_0x4b2d40(0x14d)](_0x50a56e=>Number(_0x50a56e['id'])===_0x2bb387['id']||_0x50a56e[_0x4b2d40(0x15f)]===_0x277097),_0x5b906e=findActiveField(_0x4f2a99,_0x2bb387['id'],_0x277097),_0x573221=_0x5b906e!==null,_0x2efefc=!_0x343fb2&&_0x12fbc1===0x1&&_0xb8a785&&_0x573221,_0x26c22c={'performed':!![],'deletedListCleared':_0xb8a785,'activeFieldPresent':_0x573221,'passed':_0x2efefc,..._0x343fb2?{'reason':_0x4b2d40(0x133)}:_0x12fbc1!==0x1?{'reason':_0x4b2d40(0x140)}:{}};return{'ok':_0x2efefc,'data':{..._0x4c5c55,'after':_0x5b906e,'backend':_0x2db92f,'warnings':_0x2efefc?_0x4c5c55[_0x4b2d40(0x141)]:[..._0x4c5c55[_0x4b2d40(0x141)],NO_RESUBMIT_WARNING],'verification':_0x26c22c},'message':_0x2efefc?_0x4b2d40(0x157)+_0x277097:_0x343fb2?_0x4b2d40(0x137)+_0x277097+'.\x20'+NO_RESUBMIT_WARNING:_0x4b2d40(0x12a)+_0x277097+'.\x20'+NO_RESUBMIT_WARNING};}export const datasetFieldRestore={'service':a83_0x4c3b46(0x14a),'command':a83_0x4c3b46(0x155),'description':a83_0x4c3b46(0x144),'risk':a83_0x4c3b46(0x13c),'structuredErrors':!![],'rejectedFlags':[{'name':a83_0x4c3b46(0x13d),'message':a83_0x4c3b46(0x158),'hint':a83_0x4c3b46(0x143)},{'name':a83_0x4c3b46(0x14e),'message':a83_0x4c3b46(0x145),'hint':a83_0x4c3b46(0x143)},{'name':'yes','message':a83_0x4c3b46(0x153),'hint':a83_0x4c3b46(0x15a)},{'name':'confirm','message':'dataset\x20field-restore\x20does\x20not\x20accept\x20--confirm.','hint':a83_0x4c3b46(0x15a)}],'flags':[CODE_FLAG,{'name':a83_0x4c3b46(0x13a),'type':a83_0x4c3b46(0x14c),'required':!![],'description':a83_0x4c3b46(0x14b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x47a357){readInput(_0x47a357);},async 'dryRun'(_0xbf96e5){const _0x15f247=a83_0x4c3b46,_0x14c059=await buildDatasetFieldRestoreResult({'appCode':_0xbf96e5[_0x15f247(0x139)],'input':readInput(_0xbf96e5),'dryRun':!![]});return asDryRunResult({..._0x14c059['data'],'body':{'datasetId':_0x14c059[_0x15f247(0x13e)]['dataset']['id'],'columnIds':_0x14c059[_0x15f247(0x13e)]['backend']['requestedColumnIds']}},{'method':'POST','url':'/smartapi/dataset/restore-column','description':_0x14c059[_0x15f247(0x138)]});},async 'execute'(_0x25c2e4){const _0x135ff5=a83_0x4c3b46;return buildDatasetFieldRestoreResult({'appCode':_0x25c2e4[_0x135ff5(0x139)],'input':readInput(_0x25c2e4),'dryRun':![]});}};function readInput(_0xad76c2){const _0x33d217=a83_0x4c3b46,_0x1f5adf={'code':String(_0xad76c2[_0x33d217(0x12f)]('code')||'')['trim'](),'field':String(_0xad76c2[_0x33d217(0x12f)](_0x33d217(0x13a))||'')[_0x33d217(0x156)]()};if(!_0x1f5adf[_0x33d217(0x15f)])throw CliErrors[_0x33d217(0x148)](_0x33d217(0x131));if(!_0x1f5adf[_0x33d217(0x13a)])throw CliErrors['validation']('--field\x20is\x20required');return _0x1f5adf;}function a83_0x5776(){const _0x1d490d=['trim','Restored\x20Dataset\x20field\x20','dataset\x20field-restore\x20does\x20not\x20accept\x20--all.','name','Run\x20the\x20same\x20single-field\x20command\x20with\x20--dry-run\x20first.','length','No\x20user-deleted\x20field\x20found\x20with\x20code:\x20','isArray','properties','code','Dataset\x20field\x20restore\x20could\x20not\x20be\x20verified\x20for\x20','readback-failed','Use\x20`rabetbase\x20dataset\x20user-deleted-field-list\x20--code\x20<datasetCode>`\x20to\x20inspect\x20exact\x20field\x20codes.','93YjmJwS','2780130dZCWRc','str','displayName','--code\x20is\x20required','140NhENKg','mutation-outcome-unknown','1796872LDmJcx','No\x20restore\x20request\x20was\x20sent.\x20Resolve\x20the\x20duplicate\x20server\x20metadata\x20first.','Matched\x20multiple\x20user-deleted\x20fields\x20with\x20code:\x20','Dataset\x20field\x20restore\x20outcome\x20is\x20unknown\x20for\x20','message','appCode','field','Dataset\x20field\x20restoration\x20does\x20not\x20synchronize\x20or\x20publish\x20related\x20pages.','write','all','data','1651240FeWxUp','server-restored-count-mismatch','warnings','map','Restore\x20one\x20exact\x20user-deleted\x20field\x20code\x20at\x20a\x20time\x20with\x20--field.','Restore\x20one\x20Dataset\x20field\x20explicitly\x20deleted\x20by\x20a\x20user','dataset\x20field-restore\x20does\x20not\x20accept\x20--fields.','112419DgOLir','7470ZhbCNl','validation','274907dZSMtl','dataset','Exact\x20server\x20Dataset\x20field\x20code\x20to\x20restore','string','some','fields','Dry-run:\x20Dataset\x20field\x20','object','unknown','filter','dataset\x20field-restore\x20does\x20not\x20accept\x20--yes.','98225xrqJJK','field-restore'];a83_0x5776=function(){return _0x1d490d;};return a83_0x5776();}function findActiveField(_0x592277,_0x3419fc,_0x18ae3f){const _0x278499=a83_0x4c3b46,_0x434f22=Array[_0x278499(0x15d)](_0x592277[_0x278499(0x14e)]),_0x3cf7f1=_0x434f22?_0x592277[_0x278499(0x14e)]:Array[_0x278499(0x15d)](_0x592277[_0x278499(0x15e)])?_0x592277[_0x278499(0x15e)]:[];for(const _0x274bb0 of _0x3cf7f1){if(!_0x274bb0||typeof _0x274bb0!==_0x278499(0x150))continue;const _0x335723=_0x274bb0,_0x4c86e4=_0x434f22?_0x335723[_0x278499(0x159)]:_0x335723[_0x278499(0x15f)],_0x111a4d=_0x335723['deleted']!==!![]&&Number(_0x335723['id'])===_0x3419fc&&_0x4c86e4===_0x18ae3f;if(!_0x111a4d)continue;const _0x18e068=_0x434f22?_0x335723[_0x278499(0x130)]:_0x335723[_0x278499(0x159)];return{'id':_0x3419fc,'code':_0x18ae3f,'displayName':typeof _0x18e068===_0x278499(0x14c)&&_0x18e068?_0x18e068:_0x18ae3f,'deleted':![],'active':!![]};}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x3c5372=a84_0x4eca;(function(_0x2c65e7,_0x98e5bc){const _0x11d664=a84_0x4eca,_0x5db47b=_0x2c65e7();while(!![]){try{const _0x1416c6=parseInt(_0x11d664(0x104))/0x1+parseInt(_0x11d664(0xd8))/0x2*(parseInt(_0x11d664(0xda))/0x3)+-parseInt(_0x11d664(0xdc))/0x4*(-parseInt(_0x11d664(0xe0))/0x5)+parseInt(_0x11d664(0xd0))/0x6*(-parseInt(_0x11d664(0xce))/0x7)+-parseInt(_0x11d664(0xf5))/0x8+parseInt(_0x11d664(0x109))/0x9*(-parseInt(_0x11d664(0xf9))/0xa)+parseInt(_0x11d664(0xbc))/0xb;if(_0x1416c6===_0x98e5bc)break;else _0x5db47b['push'](_0x5db47b['shift']());}catch(_0x44a180){_0x5db47b['push'](_0x5db47b['shift']());}}}(a84_0x1982,0x52333));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a84_0x3c5372(0xc9),'displayName',a84_0x3c5372(0xde),'options',a84_0x3c5372(0xe3),a84_0x3c5372(0xd6),'defaultAggregation',a84_0x3c5372(0xfe),a84_0x3c5372(0xd2)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x3c5372(0xe9),'code','dbType','dbTypeLen','dbTypeScale',a84_0x3c5372(0xcc),'tableName',a84_0x3c5372(0xe7),a84_0x3c5372(0xdd),a84_0x3c5372(0xbf),'systemRetain']);export function parseJsonObjectFlag(_0x169068,_0x42fc92){const _0x37d91c=a84_0x3c5372;if(!_0x169068)return undefined;let _0x14e39d;try{_0x14e39d=JSON[_0x37d91c(0xf7)](_0x169068);}catch(_0x3006f3){const _0x264b5e=_0x3006f3 instanceof Error?_0x3006f3[_0x37d91c(0xc2)]:String(_0x3006f3);throw CliErrors['validation'](_0x42fc92+_0x37d91c(0xef)+_0x264b5e);}if(!isPlainObject(_0x14e39d)||Array[_0x37d91c(0xcb)](_0x14e39d))throw CliErrors[_0x37d91c(0x107)](_0x42fc92+_0x37d91c(0xfc));return _0x14e39d;}export function validatePatchKeys(_0x3b883c){const _0x424e2e=a84_0x3c5372,_0x34b3ef=Object['keys'](_0x3b883c);if(_0x34b3ef[_0x424e2e(0xc5)]===0x0)throw CliErrors['validation'](_0x424e2e(0xc0));for(const _0x5a89da of _0x34b3ef){if(FORBIDDEN_FIELD_KEYS[_0x424e2e(0xc8)](_0x5a89da))throw CliErrors['validation'](_0x424e2e(0xe6)+_0x5a89da);if(!MUTABLE_FIELD_KEYS[_0x424e2e(0xc8)](_0x5a89da))throw CliErrors[_0x424e2e(0x107)](_0x424e2e(0xf3)+_0x5a89da,_0x424e2e(0xbb)+Array['from'](MUTABLE_FIELD_KEYS)[_0x424e2e(0xea)](',\x20'));}}export function applyFieldPatch(_0x521ece,_0x11b8ed){const _0x547b8a=a84_0x3c5372;validatePatchKeys(_0x11b8ed);const _0x36571b=deepClone(_0x521ece),_0x302532=new Set();for(const [_0x284ae1,_0x5730c9]of Object[_0x547b8a(0xfb)](_0x11b8ed)){const _0x2a5cdb=_0x36571b[_0x284ae1],_0x56baa5=mergePatchValue(_0x2a5cdb,_0x5730c9);!deepEqual(_0x2a5cdb,_0x56baa5)&&(_0x36571b[_0x284ae1]=_0x56baa5,_0x302532[_0x547b8a(0x10a)](_0x284ae1),collectChangedPaths(_0x284ae1,_0x2a5cdb,_0x56baa5,_0x302532));}return{'after':_0x36571b,'changedPaths':Array[_0x547b8a(0xc1)](_0x302532)[_0x547b8a(0xee)](),'changed':_0x302532[_0x547b8a(0x102)]>0x0};}function a84_0x1982(){const _0x377d68=[',\x20actual\x20','datasetName','autoIncrement','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','from','message','POST','Expectation\x20mismatch\x20at\x20','length','--expect-json','modelId','has','doType','stringify','isArray','dbFieldName','dataset','91lcuWFi','Updated\x20dataset\x20field\x20','22206UgcJLh','expect-json','deprecated','findIndex','data','datasetId','datetimeFormat','dbtableConfig','154306KHKfqv','code','3WkDkEA','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','20yexWxD','pkField','description','field','330275iAuaNU','object','datasetCode','required','No\x20changes\x20for\x20dataset\x20field\x20','appCode','Forbidden\x20patch\x20key:\x20','deleted','dbId','name','join','keys','modelCode','trim','sort','\x20must\x20be\x20valid\x20JSON\x20object:\x20','patch','string','str','Unsupported\x20patch\x20key:\x20','Dry-run:\x20dataset\x20field\x20','960328TCldco','/smartapi/dataset/update-driven-data','parse','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','742390TpNhYm','write','entries','\x20must\x20be\x20a\x20JSON\x20object','tableName','chartRole','field-update','dbName','fields','size','--code\x20is\x20required','12993lNhsnC','expect','--field\x20is\x20required','validation','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','9WwOLBH','add','Allowed\x20keys:\x20','1745293oPxsNQ'];a84_0x1982=function(){return _0x377d68;};return a84_0x1982();}export function assertExpectation(_0x462c7e,_0x550f87){const _0x14fe87=a84_0x3c5372;if(!_0x550f87)return;for(const [_0xea19d,_0x9fcdac]of Object[_0x14fe87(0xfb)](_0x550f87)){const _0x52d5c5=_0x462c7e[_0xea19d];if(!deepEqual(_0x52d5c5,_0x9fcdac))throw CliErrors[_0x14fe87(0x107)](_0x14fe87(0xc4)+_0xea19d,'Expected\x20'+JSON[_0x14fe87(0xca)](_0x9fcdac)+_0x14fe87(0xbd)+JSON[_0x14fe87(0xca)](_0x52d5c5));}}export async function buildDatasetFieldUpdateResult({appCode:_0xf62601,input:_0x1ff723,dryRun:_0x4888a9}){const _0x56bd6b=a84_0x3c5372;validateInput(_0x1ff723);const _0x3acdbb=await getDatasetDetail(_0x1ff723[_0x56bd6b(0xd9)]),_0x464c1c=readFieldArray(_0x3acdbb),_0x17bb85=_0x464c1c[_0x56bd6b(0xd3)](_0x24d3b6=>_0x24d3b6?.[_0x56bd6b(0xe9)]===_0x1ff723[_0x56bd6b(0xdf)]);if(_0x17bb85<0x0)throw CliErrors[_0x56bd6b(0x107)]('Field\x20not\x20found:\x20'+_0x1ff723[_0x56bd6b(0xdf)]);const _0x4b0795=deepClone(_0x464c1c[_0x17bb85]);assertExpectation(_0x4b0795,_0x1ff723[_0x56bd6b(0x105)]);const {after:_0x33dd90,changedPaths:_0x52bf08,changed:_0x3a61da}=applyFieldPatch(_0x4b0795,_0x1ff723[_0x56bd6b(0xf0)]),_0x865e9e=summarizeDataset(_0x3acdbb,_0x1ff723[_0x56bd6b(0xd9)]);return _0x3a61da&&!_0x4888a9&&(_0x464c1c[_0x17bb85]=_0x33dd90,await updateDrivenData(_0x3acdbb)),{'ok':!![],'data':{'appCode':_0xf62601,'selector':{'code':_0x1ff723[_0x56bd6b(0xd9)]},'dataset':_0x865e9e,'field':{'id':_0x4b0795['id']??null,'name':_0x4b0795['name']},'dryRun':_0x4888a9,'changed':_0x3a61da,'changedPaths':_0x52bf08,'before':_0x4b0795,'after':_0x33dd90,'submitted':_0x3a61da&&!_0x4888a9},'message':_0x3a61da?_0x4888a9?_0x56bd6b(0xf4)+_0x1ff723[_0x56bd6b(0xdf)]+'\x20would\x20change\x20('+_0x52bf08['join'](',\x20')+')':_0x56bd6b(0xcf)+_0x1ff723[_0x56bd6b(0xdf)]+'\x20('+_0x52bf08[_0x56bd6b(0xea)](',\x20')+')':_0x56bd6b(0xe4)+_0x1ff723['field']};}export const datasetFieldUpdate={'service':a84_0x3c5372(0xcd),'command':a84_0x3c5372(0xff),'description':a84_0x3c5372(0xf8),'risk':a84_0x3c5372(0xfa),'flags':[CODE_FLAG,{'name':a84_0x3c5372(0xdf),'type':'string','required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':'patch-json','type':'string','required':!![],'description':a84_0x3c5372(0xdb)},{'name':a84_0x3c5372(0xd1),'type':a84_0x3c5372(0xf1),'required':![],'description':a84_0x3c5372(0x108)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x85002d){validateInput(readFieldUpdateInput(_0x85002d));},async 'dryRun'(_0x579c86){const _0xc588c1=a84_0x3c5372,_0x1c064f=await buildDatasetFieldUpdateResult({'appCode':_0x579c86[_0xc588c1(0xe5)],'input':readFieldUpdateInput(_0x579c86),'dryRun':!![]});return{'method':_0xc588c1(0xc3),'url':_0xc588c1(0xf6),'body':_0x1c064f[_0xc588c1(0xd4)],'description':_0x1c064f[_0xc588c1(0xc2)]};},async 'execute'(_0x4f8762){const _0x38b0c6=a84_0x3c5372;return buildDatasetFieldUpdateResult({'appCode':_0x4f8762[_0x38b0c6(0xe5)],'input':readFieldUpdateInput(_0x4f8762),'dryRun':![]});}};function readFieldUpdateInput(_0x4f2a15){const _0x4206df=a84_0x3c5372,_0x12a8f0=trim(_0x4f2a15[_0x4206df(0xf2)]('code')),_0x50e4ee=emptyToUndefined(_0x4f2a15[_0x4206df(0xf2)]('field')),_0x184a72=parseJsonObjectFlag(_0x4f2a15['str']('patch-json'),'--patch-json'),_0x43d2be=parseJsonObjectFlag(_0x4f2a15[_0x4206df(0xf2)]('expect-json'),_0x4206df(0xc6));return{'code':_0x12a8f0,'field':_0x50e4ee||'','patch':_0x184a72||{},'expect':_0x43d2be};}function validateInput(_0x29ae4b){const _0x36a0d7=a84_0x3c5372;if(!_0x29ae4b[_0x36a0d7(0xd9)])throw CliErrors[_0x36a0d7(0x107)](_0x36a0d7(0x103));if(!_0x29ae4b[_0x36a0d7(0xdf)])throw CliErrors['validation'](_0x36a0d7(0x106));validatePatchKeys(_0x29ae4b[_0x36a0d7(0xf0)]);}function readFieldArray(_0x37c60e){const _0x2dde92=a84_0x3c5372;if(Array[_0x2dde92(0xcb)](_0x37c60e[_0x2dde92(0x101)]))return _0x37c60e[_0x2dde92(0x101)];if(Array[_0x2dde92(0xcb)](_0x37c60e['properties']))return _0x37c60e['properties'];throw CliErrors['validation']('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x5d8a66,_0x1d6839){const _0x3ef7e4=a84_0x3c5372,_0x261c6f=isPlainObject(_0x5d8a66[_0x3ef7e4(0xcd)])?_0x5d8a66[_0x3ef7e4(0xcd)]:{},_0x286dba=isPlainObject(_0x5d8a66['dbtableConfig'])?_0x5d8a66[_0x3ef7e4(0xd7)]:{};return{'id':_0x5d8a66[_0x3ef7e4(0xc7)]??_0x5d8a66['id']??_0x261c6f[_0x3ef7e4(0xd5)]??null,'code':_0x5d8a66[_0x3ef7e4(0xec)]??_0x5d8a66[_0x3ef7e4(0xd9)]??_0x261c6f[_0x3ef7e4(0xe2)]??_0x1d6839,'name':_0x5d8a66['name']??_0x261c6f[_0x3ef7e4(0xbe)]??null,'table':_0x286dba[_0x3ef7e4(0xfd)]??_0x261c6f[_0x3ef7e4(0xfd)]??null,'db':_0x286dba[_0x3ef7e4(0x100)]??_0x286dba[_0x3ef7e4(0xe8)]??null};}function mergePatchValue(_0xa5076b,_0x17203e){if(isPlainObject(_0xa5076b)&&isPlainObject(_0x17203e))return deepMerge(_0xa5076b,_0x17203e);return deepClone(_0x17203e);}function deepMerge(_0xcdb666,_0x3f47a3){const _0xaaa8e5=deepClone(_0xcdb666);for(const [_0x5ac62b,_0x519611]of Object['entries'](_0x3f47a3)){_0xaaa8e5[_0x5ac62b]=isPlainObject(_0xaaa8e5[_0x5ac62b])&&isPlainObject(_0x519611)?deepMerge(_0xaaa8e5[_0x5ac62b],_0x519611):deepClone(_0x519611);}return _0xaaa8e5;}function collectChangedPaths(_0xbbe924,_0x2366c7,_0x49e04b,_0x26e31e){const _0x16df07=a84_0x3c5372;if(!isPlainObject(_0x2366c7)||!isPlainObject(_0x49e04b))return;const _0x255e15=new Set([...Object['keys'](_0x2366c7),...Object[_0x16df07(0xeb)](_0x49e04b)]);for(const _0x589ca3 of _0x255e15){const _0x11dc88=_0x2366c7[_0x589ca3],_0x2fdcd4=_0x49e04b[_0x589ca3];!deepEqual(_0x11dc88,_0x2fdcd4)&&_0x26e31e[_0x16df07(0x10a)](_0xbbe924+'.'+_0x589ca3);}}function deepClone(_0x27f8db){const _0x398925=a84_0x3c5372;if(_0x27f8db===undefined)return _0x27f8db;return JSON[_0x398925(0xf7)](JSON[_0x398925(0xca)](_0x27f8db));}function deepEqual(_0x1db813,_0xc91d90){const _0x234d2a=a84_0x3c5372;return JSON['stringify'](_0x1db813)===JSON[_0x234d2a(0xca)](_0xc91d90);}function isPlainObject(_0x14978c){const _0x2b2a66=a84_0x3c5372;return Boolean(_0x14978c)&&typeof _0x14978c===_0x2b2a66(0xe1)&&!Array[_0x2b2a66(0xcb)](_0x14978c);}function a84_0x4eca(_0xd28a66,_0x27a5f2){_0xd28a66=_0xd28a66-0xbb;const _0x1982e2=a84_0x1982();let _0x4ecadd=_0x1982e2[_0xd28a66];return _0x4ecadd;}function emptyToUndefined(_0x1da787){const _0x28ac24=a84_0x3c5372,_0x5bf689=String(_0x1da787||'')[_0x28ac24(0xed)]();return _0x5bf689||undefined;}function trim(_0xc0a332){return String(_0xc0a332||'')['trim']();}
|
|
1
|
+
const a84_0x2c88ea=a84_0xe3ff;(function(_0x33909d,_0x137e94){const _0x4e0298=a84_0xe3ff,_0x11f8ff=_0x33909d();while(!![]){try{const _0x5a6feb=-parseInt(_0x4e0298(0x1d8))/0x1+-parseInt(_0x4e0298(0x213))/0x2*(-parseInt(_0x4e0298(0x1f8))/0x3)+parseInt(_0x4e0298(0x1c9))/0x4*(parseInt(_0x4e0298(0x1e3))/0x5)+-parseInt(_0x4e0298(0x200))/0x6*(parseInt(_0x4e0298(0x1e7))/0x7)+-parseInt(_0x4e0298(0x1e0))/0x8+parseInt(_0x4e0298(0x1f0))/0x9+parseInt(_0x4e0298(0x204))/0xa;if(_0x5a6feb===_0x137e94)break;else _0x11f8ff['push'](_0x11f8ff['shift']());}catch(_0x38bb76){_0x11f8ff['push'](_0x11f8ff['shift']());}}}(a84_0x39b1,0x8f3f8));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_0x2c88ea(0x1e9),'displayName',a84_0x2c88ea(0x1cb),a84_0x2c88ea(0x1eb),a84_0x2c88ea(0x1d3),'datetimeFormat',a84_0x2c88ea(0x1f6),'chartRole','deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a84_0x2c88ea(0x1dd),'code',a84_0x2c88ea(0x20f),a84_0x2c88ea(0x1e5),a84_0x2c88ea(0x1ff),'dbFieldName',a84_0x2c88ea(0x1d4),'deleted','pkField',a84_0x2c88ea(0x1d5),a84_0x2c88ea(0x1dc)]);export function parseJsonObjectFlag(_0x233eaf,_0x469c93){const _0x33d31d=a84_0x2c88ea;if(!_0x233eaf)return undefined;let _0x4e52ed;try{_0x4e52ed=JSON[_0x33d31d(0x20e)](_0x233eaf);}catch(_0x51c308){const _0x33b219=_0x51c308 instanceof Error?_0x51c308[_0x33d31d(0x1ec)]:String(_0x51c308);throw CliErrors[_0x33d31d(0x211)](_0x469c93+_0x33d31d(0x210)+_0x33b219);}if(!isPlainObject(_0x4e52ed)||Array[_0x33d31d(0x1f1)](_0x4e52ed))throw CliErrors[_0x33d31d(0x211)](_0x469c93+'\x20must\x20be\x20a\x20JSON\x20object');return _0x4e52ed;}export function validatePatchKeys(_0x327786){const _0xe3c7e4=a84_0x2c88ea,_0x2c4675=Object['keys'](_0x327786);if(_0x2c4675['length']===0x0)throw CliErrors['validation']('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x1cbc57 of _0x2c4675){if(FORBIDDEN_FIELD_KEYS['has'](_0x1cbc57))throw CliErrors[_0xe3c7e4(0x211)]('Forbidden\x20patch\x20key:\x20'+_0x1cbc57);if(!MUTABLE_FIELD_KEYS[_0xe3c7e4(0x1f9)](_0x1cbc57))throw CliErrors[_0xe3c7e4(0x211)](_0xe3c7e4(0x20d)+_0x1cbc57,_0xe3c7e4(0x1e6)+Array[_0xe3c7e4(0x1ef)](MUTABLE_FIELD_KEYS)[_0xe3c7e4(0x205)](',\x20'));}}export function applyFieldPatch(_0x205e0b,_0x59e753){const _0x22c98c=a84_0x2c88ea;validatePatchKeys(_0x59e753);const _0x4efa6a=deepClone(_0x205e0b),_0x58f727=new Set();for(const [_0x472217,_0x362bf5]of Object[_0x22c98c(0x1cc)](_0x59e753)){const _0x562cbc=_0x4efa6a[_0x472217],_0x478033=mergePatchValue(_0x562cbc,_0x362bf5);!deepEqual(_0x562cbc,_0x478033)&&(_0x4efa6a[_0x472217]=_0x478033,_0x58f727[_0x22c98c(0x1d9)](_0x472217),collectChangedPaths(_0x472217,_0x562cbc,_0x478033,_0x58f727));}return{'after':_0x4efa6a,'changedPaths':Array[_0x22c98c(0x1ef)](_0x58f727)[_0x22c98c(0x208)](),'changed':_0x58f727[_0x22c98c(0x1fb)]>0x0};}function a84_0xe3ff(_0x344625,_0x1d688f){_0x344625=_0x344625-0x1c9;const _0x39b168=a84_0x39b1();let _0xe3ffd=_0x39b168[_0x344625];return _0xe3ffd;}export function assertExpectation(_0x1fee32,_0x455f93){const _0x41ac15=a84_0x2c88ea;if(!_0x455f93)return;for(const [_0x43f3bf,_0x3dfd7c]of Object[_0x41ac15(0x1cc)](_0x455f93)){const _0x4231f6=_0x1fee32[_0x43f3bf];if(!deepEqual(_0x4231f6,_0x3dfd7c))throw CliErrors[_0x41ac15(0x211)](_0x41ac15(0x1fd)+_0x43f3bf,_0x41ac15(0x1df)+JSON[_0x41ac15(0x1f3)](_0x3dfd7c)+_0x41ac15(0x201)+JSON['stringify'](_0x4231f6));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4c87a3,input:_0x1e6ad4,dryRun:_0x1fa705}){const _0x4cf888=a84_0x2c88ea;validateInput(_0x1e6ad4);const _0x211240=await getDatasetDetail(_0x1e6ad4[_0x4cf888(0x1db)]),_0xc909a8=readFieldArray(_0x211240),_0x570fbe=_0xc909a8[_0x4cf888(0x212)](_0x9fc6c8=>_0x9fc6c8?.[_0x4cf888(0x1dd)]===_0x1e6ad4[_0x4cf888(0x202)]);if(_0x570fbe<0x0)throw CliErrors[_0x4cf888(0x211)]('Field\x20not\x20found:\x20'+_0x1e6ad4[_0x4cf888(0x202)]);const _0x1380a9=deepClone(_0xc909a8[_0x570fbe]);assertExpectation(_0x1380a9,_0x1e6ad4[_0x4cf888(0x1cf)]);const {after:_0x203a23,changedPaths:_0x41c67a,changed:_0x13530c}=applyFieldPatch(_0x1380a9,_0x1e6ad4[_0x4cf888(0x20a)]),_0x296d27=summarizeDataset(_0x211240,_0x1e6ad4[_0x4cf888(0x1db)]);return _0x13530c&&!_0x1fa705&&(_0xc909a8[_0x570fbe]=_0x203a23,await updateDrivenData(_0x211240)),{'ok':!![],'data':{'appCode':_0x4c87a3,'selector':{'code':_0x1e6ad4[_0x4cf888(0x1db)]},'dataset':_0x296d27,'field':{'id':_0x1380a9['id']??null,'name':_0x1380a9[_0x4cf888(0x1dd)]},'dryRun':_0x1fa705,'changed':_0x13530c,'changedPaths':_0x41c67a,'before':_0x1380a9,'after':_0x203a23,'submitted':_0x13530c&&!_0x1fa705},'message':_0x13530c?_0x1fa705?_0x4cf888(0x1d6)+_0x1e6ad4['field']+_0x4cf888(0x203)+_0x41c67a[_0x4cf888(0x205)](',\x20')+')':_0x4cf888(0x1fc)+_0x1e6ad4[_0x4cf888(0x202)]+'\x20('+_0x41c67a['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x1e6ad4['field']};}export const datasetFieldUpdate={'service':a84_0x2c88ea(0x1d7),'command':'field-update','description':a84_0x2c88ea(0x1e1),'risk':a84_0x2c88ea(0x1de),'flags':[CODE_FLAG,{'name':a84_0x2c88ea(0x202),'type':a84_0x2c88ea(0x1e8),'required':!![],'description':a84_0x2c88ea(0x1f5)},{'name':a84_0x2c88ea(0x209),'type':a84_0x2c88ea(0x1e8),'required':!![],'description':a84_0x2c88ea(0x1ed)},{'name':a84_0x2c88ea(0x1ea),'type':a84_0x2c88ea(0x1e8),'required':![],'description':a84_0x2c88ea(0x1da)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc2cdec){validateInput(readFieldUpdateInput(_0xc2cdec));},async 'dryRun'(_0x245e61){const _0x2bb370=a84_0x2c88ea,_0x2c600b=await buildDatasetFieldUpdateResult({'appCode':_0x245e61[_0x2bb370(0x1d0)],'input':readFieldUpdateInput(_0x245e61),'dryRun':!![]});return{'method':_0x2bb370(0x20c),'url':_0x2bb370(0x1e4),'body':_0x2c600b[_0x2bb370(0x20b)],'description':_0x2c600b[_0x2bb370(0x1ec)]};},async 'execute'(_0x59812f){const _0x45b94d=a84_0x2c88ea;return buildDatasetFieldUpdateResult({'appCode':_0x59812f[_0x45b94d(0x1d0)],'input':readFieldUpdateInput(_0x59812f),'dryRun':![]});}};function readFieldUpdateInput(_0xe53e0e){const _0xc8b206=a84_0x2c88ea,_0x3add26=trim(_0xe53e0e[_0xc8b206(0x1f7)]('code')),_0x564155=emptyToUndefined(_0xe53e0e[_0xc8b206(0x1f7)](_0xc8b206(0x202))),_0x10c190=parseJsonObjectFlag(_0xe53e0e[_0xc8b206(0x1f7)]('patch-json'),'--patch-json'),_0x3d8ed8=parseJsonObjectFlag(_0xe53e0e[_0xc8b206(0x1f7)](_0xc8b206(0x1ea)),'--expect-json');return{'code':_0x3add26,'field':_0x564155||'','patch':_0x10c190||{},'expect':_0x3d8ed8};}function validateInput(_0x59be78){const _0x19da8d=a84_0x2c88ea;if(!_0x59be78[_0x19da8d(0x1db)])throw CliErrors[_0x19da8d(0x211)](_0x19da8d(0x1ce));if(!_0x59be78['field'])throw CliErrors[_0x19da8d(0x211)](_0x19da8d(0x1d2));validatePatchKeys(_0x59be78[_0x19da8d(0x20a)]);}function readFieldArray(_0x2fa1aa){const _0xdbdff6=a84_0x2c88ea;if(Array['isArray'](_0x2fa1aa[_0xdbdff6(0x207)]))return _0x2fa1aa['fields'];if(Array[_0xdbdff6(0x1f1)](_0x2fa1aa[_0xdbdff6(0x1f2)]))return _0x2fa1aa['properties'];throw CliErrors[_0xdbdff6(0x211)](_0xdbdff6(0x1fa));}function a84_0x39b1(){const _0x40ba15=['Dry-run:\x20dataset\x20field\x20','dataset','171952AUaJeP','add','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','code','systemRetain','name','write','Expected\x20','7403384yTzwRL','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','datasetName','5166455Qelfcd','/smartapi/dataset/update-driven-data','dbTypeLen','Allowed\x20keys:\x20','2594802ataLxD','string','doType','expect-json','options','message','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','trim','from','3993462EWKwQm','isArray','properties','stringify','datasetId','Exact\x20raw\x20fields[].name\x20to\x20patch','defaultAggregation','str','1167UnofLX','has','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','size','Updated\x20dataset\x20field\x20','Expectation\x20mismatch\x20at\x20','keys','dbTypeScale','12dvTBYx',',\x20actual\x20','field','\x20would\x20change\x20(','4182750VWmlvH','join','object','fields','sort','patch-json','patch','data','POST','Unsupported\x20patch\x20key:\x20','parse','dbType','\x20must\x20be\x20valid\x20JSON\x20object:\x20','validation','findIndex','2726eDSvjk','4zXlgyD','dbtableConfig','description','entries','dbName','--code\x20is\x20required','expect','appCode','modelCode','--field\x20is\x20required','required','tableName','autoIncrement'];a84_0x39b1=function(){return _0x40ba15;};return a84_0x39b1();}function summarizeDataset(_0x3d84b3,_0x237b70){const _0x446b3d=a84_0x2c88ea,_0x3e062b=isPlainObject(_0x3d84b3[_0x446b3d(0x1d7)])?_0x3d84b3[_0x446b3d(0x1d7)]:{},_0x41b256=isPlainObject(_0x3d84b3[_0x446b3d(0x1ca)])?_0x3d84b3[_0x446b3d(0x1ca)]:{};return{'id':_0x3d84b3['modelId']??_0x3d84b3['id']??_0x3e062b[_0x446b3d(0x1f4)]??null,'code':_0x3d84b3[_0x446b3d(0x1d1)]??_0x3d84b3[_0x446b3d(0x1db)]??_0x3e062b['datasetCode']??_0x237b70,'name':_0x3d84b3[_0x446b3d(0x1dd)]??_0x3e062b[_0x446b3d(0x1e2)]??null,'table':_0x41b256[_0x446b3d(0x1d4)]??_0x3e062b['tableName']??null,'db':_0x41b256[_0x446b3d(0x1cd)]??_0x41b256['dbId']??null};}function mergePatchValue(_0x35d185,_0x3100e7){if(isPlainObject(_0x35d185)&&isPlainObject(_0x3100e7))return deepMerge(_0x35d185,_0x3100e7);return deepClone(_0x3100e7);}function deepMerge(_0x53e552,_0x147ee3){const _0x46a6a0=a84_0x2c88ea,_0x85f3f7=deepClone(_0x53e552);for(const [_0x83b012,_0x5cc19e]of Object[_0x46a6a0(0x1cc)](_0x147ee3)){_0x85f3f7[_0x83b012]=isPlainObject(_0x85f3f7[_0x83b012])&&isPlainObject(_0x5cc19e)?deepMerge(_0x85f3f7[_0x83b012],_0x5cc19e):deepClone(_0x5cc19e);}return _0x85f3f7;}function collectChangedPaths(_0x40baca,_0x556ff9,_0x493369,_0x458842){const _0x4c7503=a84_0x2c88ea;if(!isPlainObject(_0x556ff9)||!isPlainObject(_0x493369))return;const _0x4a8939=new Set([...Object[_0x4c7503(0x1fe)](_0x556ff9),...Object['keys'](_0x493369)]);for(const _0x25f4e7 of _0x4a8939){const _0x55cc88=_0x556ff9[_0x25f4e7],_0x155625=_0x493369[_0x25f4e7];!deepEqual(_0x55cc88,_0x155625)&&_0x458842[_0x4c7503(0x1d9)](_0x40baca+'.'+_0x25f4e7);}}function deepClone(_0x12ecc5){const _0x2d996b=a84_0x2c88ea;if(_0x12ecc5===undefined)return _0x12ecc5;return JSON[_0x2d996b(0x20e)](JSON[_0x2d996b(0x1f3)](_0x12ecc5));}function deepEqual(_0x488fc9,_0x654a4){const _0x21c7c1=a84_0x2c88ea;return JSON['stringify'](_0x488fc9)===JSON[_0x21c7c1(0x1f3)](_0x654a4);}function isPlainObject(_0x171b5c){const _0x3c281c=a84_0x2c88ea;return Boolean(_0x171b5c)&&typeof _0x171b5c===_0x3c281c(0x206)&&!Array['isArray'](_0x171b5c);}function emptyToUndefined(_0x1c15e6){const _0x1fd5da=a84_0x2c88ea,_0x3137ec=String(_0x1c15e6||'')[_0x1fd5da(0x1ee)]();return _0x3137ec||undefined;}function trim(_0x21ccd7){const _0x31aaec=a84_0x2c88ea;return String(_0x21ccd7||'')[_0x31aaec(0x1ee)]();}
|