@lovrabet/rabetbase-cli 2.4.6-beta.3 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.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/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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.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/delete.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-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/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/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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.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/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/service.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/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/template.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/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/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/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/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/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/risk.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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.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/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/rules-cdn.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.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x88d85e=a50_0x7e2f;(function(_0x375ced,_0x13783d){const _0x137413=a50_0x7e2f,_0x8f21f5=_0x375ced();while(!![]){try{const _0x5e0448=parseInt(_0x137413(0xe7))/0x1*(parseInt(_0x137413(0xd8))/0x2)+-parseInt(_0x137413(0xd7))/0x3*(parseInt(_0x137413(0xdc))/0x4)+-parseInt(_0x137413(0xe0))/0x5+-parseInt(_0x137413(0xe4))/0x6*(parseInt(_0x137413(0xea))/0x7)+-parseInt(_0x137413(0xe1))/0x8*(-parseInt(_0x137413(0xee))/0x9)+parseInt(_0x137413(0xe6))/0xa*(parseInt(_0x137413(0xed))/0xb)+-parseInt(_0x137413(0xe5))/0xc*(-parseInt(_0x137413(0xe3))/0xd);if(_0x5e0448===_0x13783d)break;else _0x8f21f5['push'](_0x8f21f5['shift']());}catch(_0x3141e3){_0x8f21f5['push'](_0x8f21f5['shift']());}}}(a50_0x53a7,0x683d8));function a50_0x7e2f(_0x4afbf0,_0x31b205){_0x4afbf0=_0x4afbf0-0xd7;const _0x53a762=a50_0x53a7();let _0x7e2f1=_0x53a762[_0x4afbf0];return _0x7e2f1;}function a50_0x53a7(){const _0xc31537=['object','Key\x20not\x20found:\x20','41923iMvsXu','config','string','189079TgqMDM','423zZqkbF','app','759477AJNJyI','435694lgTUOA','validation','str','Get\x20a\x20config\x20value\x20by\x20key','12vMYptQ','appcode','Usage:\x20','read','324280WKkXuU','71824tCqpoY','key','39mbwmih','786WPRhdl','3727776PvCPbh','270HqNkPE','1WRIVCX'];a50_0x53a7=function(){return _0xc31537;};return a50_0x53a7();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2c4f56){const _0x17bf0a=a50_0x7e2f,_0x432cef=_0x2c4f56[_0x17bf0a(0xda)](_0x17bf0a(0xe2));if(!_0x432cef)throw CliErrors['validation']('Missing\x20key.',_0x17bf0a(0xde)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x34bd0e=readConfig(),_0x39aee5=_0x432cef===_0x17bf0a(0xef)?_0x17bf0a(0xdd):_0x432cef,_0x409fde=_0x34bd0e[_0x39aee5];if(_0x409fde===undefined)throw CliErrors[_0x17bf0a(0xd9)](_0x17bf0a(0xe9)+_0x432cef);return{'ok':!![],'data':typeof _0x409fde===_0x17bf0a(0xe8)?_0x409fde:{[_0x39aee5]:_0x409fde},'message':typeof _0x409fde===_0x17bf0a(0xe8)?undefined:String(_0x409fde)};}export const configGetDefinition={'service':a50_0x88d85e(0xeb),'command':'get','description':a50_0x88d85e(0xdb),'risk':a50_0x88d85e(0xdf),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x88d85e(0xe2),'type':a50_0x88d85e(0xec),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x584eb5,_0x1b2679){const _0x301973=a51_0x57f3,_0x45dc82=_0x584eb5();while(!![]){try{const _0x57518f=parseInt(_0x301973(0x70))/0x1+-parseInt(_0x301973(0x78))/0x2*(parseInt(_0x301973(0x6f))/0x3)+parseInt(_0x301973(0x72))/0x4+parseInt(_0x301973(0x77))/0x5*(parseInt(_0x301973(0x74))/0x6)+-parseInt(_0x301973(0x73))/0x7+-parseInt(_0x301973(0x76))/0x8+-parseInt(_0x301973(0x75))/0x9*(parseInt(_0x301973(0x71))/0xa);if(_0x57518f===_0x1b2679)break;else _0x45dc82['push'](_0x45dc82['shift']());}catch(_0x9c9444){_0x45dc82['push'](_0x45dc82['shift']());}}}(a51_0x3885,0x8a799));import{configListDefinition}from'../../commands/config/list.js';function a51_0x57f3(_0x46efc1,_0x247100){_0x46efc1=_0x46efc1-0x6f;const _0x388553=a51_0x3885();let _0x57f388=_0x388553[_0x46efc1];return _0x57f388;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a51_0x3885(){const _0x1cd1f0=['140212LOBxLz','24aqIkos','449240tUyqEK','26050TqCJNT','3457508aAmqMF','2068416bvqolB','18opzwjU','657GXlqKS','6083936sjkHgi','1767615GInake'];a51_0x3885=function(){return _0x1cd1f0;};return a51_0x3885();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x1254(_0x2ea6e8,_0x4850c0){_0x2ea6e8=_0x2ea6e8-0x130;const _0x240246=a52_0x2402();let _0x1254e1=_0x240246[_0x2ea6e8];return _0x1254e1;}const a52_0x357434=a52_0x1254;(function(_0x35b263,_0x5412d1){const _0x267599=a52_0x1254,_0x2f5418=_0x35b263();while(!![]){try{const _0x57161d=-parseInt(_0x267599(0x133))/0x1+parseInt(_0x267599(0x136))/0x2+parseInt(_0x267599(0x139))/0x3*(parseInt(_0x267599(0x13e))/0x4)+parseInt(_0x267599(0x137))/0x5+parseInt(_0x267599(0x130))/0x6+-parseInt(_0x267599(0x138))/0x7*(parseInt(_0x267599(0x131))/0x8)+-parseInt(_0x267599(0x13a))/0x9*(parseInt(_0x267599(0x13b))/0xa);if(_0x57161d===_0x5412d1)break;else _0x2f5418['push'](_0x2f5418['shift']());}catch(_0x3e68b4){_0x2f5418['push'](_0x2f5418['shift']());}}}(a52_0x2402,0x721f4));function a52_0x2402(){const _0x269e61=['read','586860btIOQA','72392fnSEoK','boolean','453981lgQrOD','config','List\x20all\x20config\x20values','1612752UXWbXs','3413335nuGEkD','14Aywsio','93ErqoCf','531brZdhp','176430BvnTWz','list','global','50788zzorWG'];a52_0x2402=function(){return _0x269e61;};return a52_0x2402();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x4ed4e7){const _0x1a7455=a52_0x1254,_0x453610=_0x4ed4e7['bool'](_0x1a7455(0x13d))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x453610};}export const configListDefinition={'service':a52_0x357434(0x134),'command':a52_0x357434(0x13c),'description':a52_0x357434(0x135),'risk':a52_0x357434(0x13f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x357434(0x13d),'type':a52_0x357434(0x132),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x3fe775=a53_0x2f78;(function(_0x526a08,_0x150394){const _0x3ab50a=a53_0x2f78,_0x11a677=_0x526a08();while(!![]){try{const _0x19e025=-parseInt(_0x3ab50a(0xbb))/0x1*(-parseInt(_0x3ab50a(0xb7))/0x2)+parseInt(_0x3ab50a(0xa4))/0x3*(-parseInt(_0x3ab50a(0x8a))/0x4)+parseInt(_0x3ab50a(0xab))/0x5*(parseInt(_0x3ab50a(0xa8))/0x6)+parseInt(_0x3ab50a(0xb3))/0x7*(parseInt(_0x3ab50a(0x8b))/0x8)+-parseInt(_0x3ab50a(0x9c))/0x9+-parseInt(_0x3ab50a(0x88))/0xa*(-parseInt(_0x3ab50a(0x95))/0xb)+-parseInt(_0x3ab50a(0xa7))/0xc;if(_0x19e025===_0x150394)break;else _0x11a677['push'](_0x11a677['shift']());}catch(_0x3d3fa5){_0x11a677['push'](_0x11a677['shift']());}}}(a53_0x251d,0xbc0ec));import{CliErrors}from'../../errors.js';function a53_0x251d(){const _0xa0d7a=['6350564IyHGIo','validation','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','config','Project','join','set','12286206Cccahw','keys','apps','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','bool','write','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','1383abwdKT','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Use\x20`','17000400AxFkkl','555234hRlhAT','`,\x20`','global','50wVNAbj','\x20set\x20to:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Config\x20value','\x22\x20is\x20not\x20settable.','key','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Usage:\x20','301xLXMFR','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','object','length','2IXFTsq','value','Missing\x20value.','Invalid\x20value\x20for\x20\x22','557014SBiLyo','appcode','20nOlpoo','includes','668SKyxNe','184568PQwzVK','Global','Missing\x20key.','env','str','locale','string','app','\x22.\x20Allowed:\x20','\x20workspace\x20add\x20<name>\x20--appcode\x20'];a53_0x251d=function(){return _0xa0d7a;};return a53_0x251d();}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a53_0x2f78(_0x29f18c,_0x6030f8){_0x29f18c=_0x29f18c-0x88;const _0x251d56=a53_0x251d();let _0x2f78bc=_0x251d56[_0x29f18c];return _0x2f78bc;}async function execute(_0x3ec3f6){const _0x1e7cb7=a53_0x2f78,_0x55ad41=_0x3ec3f6[_0x1e7cb7(0x8f)](_0x1e7cb7(0xb0)),_0x854deb=_0x3ec3f6[_0x1e7cb7(0x8f)]('value');if(!_0x55ad41)throw CliErrors[_0x1e7cb7(0x96)](_0x1e7cb7(0x8d),'Usage:\x20'+CLI_BIN_NAME+_0x1e7cb7(0x9f));if(_0x854deb===undefined||_0x854deb==='')throw CliErrors['validation'](_0x1e7cb7(0xb9),_0x1e7cb7(0xb2)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x854deb[_0x1e7cb7(0xb6)]>0x1f4)throw CliErrors['validation'](_0x1e7cb7(0x97));if(!isTopLevelConfigKey(_0x55ad41))throw CliErrors[_0x1e7cb7(0x96)]('Top-level\x20key\x20\x22'+_0x55ad41+_0x1e7cb7(0xaf),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x55ad41==='riskLevel')throw CliErrors['validation'](_0x1e7cb7(0xa3));if(CONFIG_ENUM_VALUES[_0x55ad41]&&!CONFIG_ENUM_VALUES[_0x55ad41][_0x1e7cb7(0x89)](_0x854deb))throw CliErrors[_0x1e7cb7(0x96)](_0x1e7cb7(0xba)+_0x55ad41+_0x1e7cb7(0x93)+CONFIG_ENUM_VALUES[_0x55ad41][_0x1e7cb7(0x9a)](',\x20'));if(_0x55ad41===_0x1e7cb7(0x90)&&!normalizeLocale(_0x854deb))throw CliErrors[_0x1e7cb7(0x96)]('Invalid\x20locale\x20value.',_0x1e7cb7(0xa5));const _0x4e0f21={'global':_0x3ec3f6[_0x1e7cb7(0xa1)](_0x1e7cb7(0xaa))},_0x4d19a4=resolveWriteScope(_0x4e0f21),_0x4496ad=readScopedConfig(_0x4d19a4);let _0x5d3fc4=_0x55ad41,_0x5ec217=_0x854deb;_0x55ad41==='app'&&(_0x5d3fc4=_0x1e7cb7(0xbc),delete _0x4496ad[_0x1e7cb7(0x92)]);_0x55ad41===_0x1e7cb7(0x90)&&(_0x5ec217=normalizeLocale(_0x854deb));if(_0x55ad41==='env'){_0x5ec217=normalizeEnv(_0x854deb);if(!isProduction(_0x5ec217)&&!isDaily(_0x5ec217))throw CliErrors['validation']('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x1e7cb7(0xad));}if(_0x55ad41==='appcode'){const _0x43f561=_0x4496ad[_0x1e7cb7(0x9e)]&&typeof _0x4496ad[_0x1e7cb7(0x9e)]===_0x1e7cb7(0xb5)?Object[_0x1e7cb7(0x9d)](_0x4496ad['apps']):[];if(_0x43f561['length']>0x0)throw CliErrors['validation'](_0x1e7cb7(0xa0),_0x1e7cb7(0xa6)+CLI_BIN_NAME+_0x1e7cb7(0x94)+_0x5ec217+_0x1e7cb7(0xa9)+CLI_BIN_NAME+_0x1e7cb7(0xb1));const _0x2ddf61=buildCanonicalProjectConfig({..._0x4496ad},{'appCodes':[_0x5ec217],'env':typeof _0x4496ad[_0x1e7cb7(0x8e)]===_0x1e7cb7(0x91)?_0x4496ad[_0x1e7cb7(0x8e)]:undefined});writeScopedConfig(_0x2ddf61,_0x4d19a4);const _0x1df458=_0x4d19a4===_0x1e7cb7(0xaa)?_0x1e7cb7(0x8c):_0x1e7cb7(0x99);return{'ok':!![],'message':'✓\x20'+_0x1df458+'\x20appcode\x20set\x20to:\x20'+_0x5ec217+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x4496ad[_0x5d3fc4]=_0x5ec217,writeScopedConfig(_0x4496ad,_0x4d19a4);const _0x1aca57=_0x4d19a4===_0x1e7cb7(0xaa)?_0x1e7cb7(0x8c):_0x1e7cb7(0x99);return{'ok':!![],'message':'✓\x20'+_0x1aca57+'\x20'+_0x5d3fc4+_0x1e7cb7(0xac)+_0x5ec217};}export const configSetDefinition={'service':a53_0x3fe775(0x98),'command':a53_0x3fe775(0x9b),'description':'Set\x20a\x20config\x20value','risk':a53_0x3fe775(0xa2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x3fe775(0xb0),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a53_0x3fe775(0xb8),'type':a53_0x3fe775(0x91),'description':a53_0x3fe775(0xae),'required':!![]},{'name':a53_0x3fe775(0xaa),'type':'boolean','description':a53_0x3fe775(0xb4),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x11aa84,_0x479877){var _0x5b6aba=a54_0x134d,_0x4c0e9f=_0x11aa84();while(!![]){try{var _0x23fabb=-parseInt(_0x5b6aba(0x1c1))/0x1+parseInt(_0x5b6aba(0x1c2))/0x2*(-parseInt(_0x5b6aba(0x1c0))/0x3)+parseInt(_0x5b6aba(0x1c6))/0x4*(parseInt(_0x5b6aba(0x1bc))/0x5)+parseInt(_0x5b6aba(0x1ba))/0x6*(parseInt(_0x5b6aba(0x1c3))/0x7)+parseInt(_0x5b6aba(0x1bb))/0x8*(parseInt(_0x5b6aba(0x1bf))/0x9)+-parseInt(_0x5b6aba(0x1c4))/0xa*(-parseInt(_0x5b6aba(0x1bd))/0xb)+-parseInt(_0x5b6aba(0x1c5))/0xc*(-parseInt(_0x5b6aba(0x1b9))/0xd);if(_0x23fabb===_0x479877)break;else _0x4c0e9f['push'](_0x4c0e9f['shift']());}catch(_0x2625de){_0x4c0e9f['push'](_0x4c0e9f['shift']());}}}(a54_0x411e,0xe76f6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a54_0x411e(){var _0xf162f4=['3weBPYI','1694905LgbJzp','1964434xYUFiE','2513581KHUTMk','3030VDBBhz','72RGezzU','4130684TAXPli','\x20init`\x20first.','validation','127543HGgiKK','6GlSUTs','72Nveaax','5xxeELm','62711soGNMX','global','447057mgciYv'];a54_0x411e=function(){return _0xf162f4;};return a54_0x411e();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a54_0x134d(_0x5f2746,_0x5b8313){_0x5f2746=_0x5f2746-0x1b7;var _0x411e1b=a54_0x411e();var _0x134dfc=_0x411e1b[_0x5f2746];return _0x134dfc;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3384a1){var _0x23445e=a54_0x134d;if(_0x3384a1[_0x23445e(0x1be)])return _0x23445e(0x1be);if(!isInProject())throw CliErrors[_0x23445e(0x1b8)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x23445e(0x1b7));return'project';}export function readScopedConfig(_0x10758c){return readConfigFile(resolveWriteConfigPath(_0x10758c));}export function writeScopedConfig(_0x1d2f07,_0x40c893){writeConfigFile(resolveWriteConfigPath(_0x40c893),_0x1d2f07);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0x2cde(_0x3c2b70,_0x5d9f75){_0x3c2b70=_0x3c2b70-0x89;const _0x1db542=a55_0x1db5();let _0x2cdebd=_0x1db542[_0x3c2b70];return _0x2cdebd;}const a55_0xda7f3b=a55_0x2cde;function a55_0x1db5(){const _0x3e2a9=['5MeBpDt','Filter\x20dataset\x20records\x20with\x20query\x20conditions','6556630wJSZVA','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','7301gNItKB','7601160iSdvWu','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','join','9nVbcKo','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','5413566QqLuiM','759rWFsZG','424836QDNnXr','filter','767340zyNbBy','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','186Flgnov','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','4855bhBOUX','4168dObMey'];a55_0x1db5=function(){return _0x3e2a9;};return a55_0x1db5();}(function(_0x10f0fa,_0x34eec7){const _0xb1da78=a55_0x2cde,_0x3b848a=_0x10f0fa();while(!![]){try{const _0x28ce4c=-parseInt(_0xb1da78(0x96))/0x1*(-parseInt(_0xb1da78(0x93))/0x2)+parseInt(_0xb1da78(0x91))/0x3+parseInt(_0xb1da78(0x9d))/0x4+parseInt(_0xb1da78(0x98))/0x5*(parseInt(_0xb1da78(0x8d))/0x6)+parseInt(_0xb1da78(0x9c))/0x7*(parseInt(_0xb1da78(0x97))/0x8)+parseInt(_0xb1da78(0x8b))/0x9*(-parseInt(_0xb1da78(0x9a))/0xa)+parseInt(_0xb1da78(0x8e))/0xb*(-parseInt(_0xb1da78(0x8f))/0xc);if(_0x28ce4c===_0x34eec7)break;else _0x3b848a['push'](_0x3b848a['shift']());}catch(_0x47e81a){_0x3b848a['push'](_0x3b848a['shift']());}}}(a55_0x1db5,0xe919b));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0xda7f3b(0x90),'operation':a55_0xda7f3b(0x90),'description':a55_0xda7f3b(0x99),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a55_0xda7f3b(0x94),a55_0xda7f3b(0x8c),a55_0xda7f3b(0x92),a55_0xda7f3b(0x89),a55_0xda7f3b(0x9b),a55_0xda7f3b(0x95)][a55_0xda7f3b(0x8a)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a56_0x2516(_0x2e1ff9,_0x1b3de5){_0x2e1ff9=_0x2e1ff9-0xe6;const _0x244819=a56_0x2448();let _0x2516be=_0x244819[_0x2e1ff9];return _0x2516be;}const a56_0x493c09=a56_0x2516;(function(_0x18f584,_0x3991f3){const _0x23f3a2=a56_0x2516,_0xccfe84=_0x18f584();while(!![]){try{const _0xa98f23=parseInt(_0x23f3a2(0xe9))/0x1*(parseInt(_0x23f3a2(0xf2))/0x2)+-parseInt(_0x23f3a2(0xe7))/0x3*(-parseInt(_0x23f3a2(0xf0))/0x4)+parseInt(_0x23f3a2(0xea))/0x5*(-parseInt(_0x23f3a2(0xe6))/0x6)+parseInt(_0x23f3a2(0xf3))/0x7+parseInt(_0x23f3a2(0xee))/0x8+-parseInt(_0x23f3a2(0xe8))/0x9+-parseInt(_0x23f3a2(0xed))/0xa*(parseInt(_0x23f3a2(0xec))/0xb);if(_0xa98f23===_0x3991f3)break;else _0xccfe84['push'](_0xccfe84['shift']());}catch(_0x230ae0){_0xccfe84['push'](_0xccfe84['shift']());}}}(a56_0x2448,0x6b17c));function a56_0x2448(){const _0x11bdfd=['172avWlTm','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','445166LEUQkl','45864YymHNk','903192CZHKyl','59775CDcAxs','3350655UcZBRe','1jzfqAd','5FNfmep','Get\x20a\x20single\x20record\x20by\x20ID','11PWqdwC','8997340qpPqjf','6202424tyRquS','getOne'];a56_0x2448=function(){return _0x11bdfd;};return a56_0x2448();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x493c09(0xef),'operation':a56_0x493c09(0xef),'description':a56_0x493c09(0xeb),'paramsRequired':!![],'paramsHint':a56_0x493c09(0xf1)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x58f3(){const _0x341b89=['18910HQMhWL','35RgeANu','2118612UMvbvO','2548500HhWBpV','17682UGGFZc','4SElJNd','1093912WkSITx','245700JSiUoP','5508243mMmaIz'];a57_0x58f3=function(){return _0x341b89;};return a57_0x58f3();}(function(_0x357aaf,_0x18b192){const _0x414db2=a57_0x5709,_0x1fa7a7=_0x357aaf();while(!![]){try{const _0x40bea8=parseInt(_0x414db2(0xc4))/0x1+parseInt(_0x414db2(0xbd))/0x2+parseInt(_0x414db2(0xbf))/0x3*(parseInt(_0x414db2(0xc2))/0x4)+-parseInt(_0x414db2(0xc0))/0x5+-parseInt(_0x414db2(0xc1))/0x6+-parseInt(_0x414db2(0xbe))/0x7*(parseInt(_0x414db2(0xc3))/0x8)+parseInt(_0x414db2(0xc5))/0x9;if(_0x40bea8===_0x18b192)break;else _0x1fa7a7['push'](_0x1fa7a7['shift']());}catch(_0x589794){_0x1fa7a7['push'](_0x1fa7a7['shift']());}}}(a57_0x58f3,0x5c0d4));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a57_0x5709(_0x2b277d,_0x1e8943){_0x2b277d=_0x2b277d-0xbd;const _0x58f304=a57_0x58f3();let _0x57090a=_0x58f304[_0x2b277d];return _0x57090a;}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x8dd6(_0x543d99,_0x4a9e31){_0x543d99=_0x543d99-0xcb;const _0x5db23f=a58_0x5db2();let _0x8dd6a1=_0x5db23f[_0x543d99];return _0x8dd6a1;}function a58_0x5db2(){const _0x22cd06=['alias','str','operation','827078CbDDBj','string','2261700dmbHSK','39177XiDtFN','paramsHint','getOne','data\x20','40336OTgulD','helpExtra','params','compress','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','162gOWpsh','1822455yPaDEh','validation','1643954fpresi','appCode','4471950fLDkRk','code','command','paramsRequired','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','now','16NAMfLi'];a58_0x5db2=function(){return _0x22cd06;};return a58_0x5db2();}(function(_0x15b62c,_0x3d470a){const _0x45a925=a58_0x8dd6,_0xfa633a=_0x15b62c();while(!![]){try{const _0x3666be=parseInt(_0x45a925(0xd4))/0x1+-parseInt(_0x45a925(0xe3))/0x2+-parseInt(_0x45a925(0xd7))/0x3*(parseInt(_0x45a925(0xd0))/0x4)+parseInt(_0x45a925(0xe1))/0x5+-parseInt(_0x45a925(0xd6))/0x6+parseInt(_0x45a925(0xe5))/0x7+parseInt(_0x45a925(0xdb))/0x8*(parseInt(_0x45a925(0xe0))/0x9);if(_0x3666be===_0x3d470a)break;else _0xfa633a['push'](_0xfa633a['shift']());}catch(_0x37050d){_0xfa633a['push'](_0xfa633a['shift']());}}}(a58_0x5db2,0xa393c));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x28465d){const _0xb5cb9a=a58_0x8dd6;if(!_0x28465d)throw CliErrors['flagMissing']('params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x45fcab=_0x28465d['id'];if(_0x45fcab===undefined||_0x45fcab===null||_0x45fcab==='')throw CliErrors[_0xb5cb9a(0xe2)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0xb5cb9a(0xce));}function parseCommandParams(_0x40081b){return parseJsonParams(_0x40081b)??{};}export function buildDataCommand(_0x5141f7){const _0x3c7ec0=a58_0x8dd6,_0x5bbf81=_0x3c7ec0(0xdf);return{'service':'data','command':_0x5141f7[_0x3c7ec0(0xcc)],'description':_0x5141f7['description'],'risk':'read','defaultOutputFormat':_0x3c7ec0(0xde),'helpExtra':_0x5141f7[_0x3c7ec0(0xdc)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x3c7ec0(0xd1),'type':_0x3c7ec0(0xd5),'description':_0x5bbf81},{'name':'params','type':_0x3c7ec0(0xd5),'description':_0x5141f7['paramsHint']}],async 'validate'(_0x1a61e5){const _0x30a014=_0x3c7ec0,_0x153349=_0x1a61e5['str']('params');if(_0x5141f7[_0x30a014(0xcd)]&&!_0x153349)throw CliErrors['flagMissing'](_0x30a014(0xdd),_0x5141f7[_0x30a014(0xd8)]);const _0xa92b0f=parseJsonParams(_0x153349);_0x5141f7['operation']===_0x30a014(0xd9)&&assertGetOneId(_0xa92b0f);},async 'execute'(_0x455085){const _0x5c795d=_0x3c7ec0,_0x63365=parseCommandParams(_0x455085[_0x5c795d(0xd2)](_0x5c795d(0xdd))),_0x4e06e6=Date[_0x5c795d(0xcf)](),_0x555e4a=await executeDatasetDataOperation(_0x455085[_0x5c795d(0xe4)],_0x455085[_0x5c795d(0xd2)](_0x5c795d(0xcb)),_0x5141f7[_0x5c795d(0xd3)],_0x63365),_0x3c9c82=Date[_0x5c795d(0xcf)]()-_0x4e06e6;return{'ok':!![],'data':{'result':_0x555e4a,'elapsed':_0x3c9c82},'message':_0x5c795d(0xda)+_0x5141f7['command']+'\x20completed\x20in\x20'+_0x3c9c82+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a59_0x3715(_0x432fbd,_0xba0d71){_0x432fbd=_0x432fbd-0x18f;const _0x2212a9=a59_0x2212();let _0x3715cf=_0x2212a9[_0x432fbd];return _0x3715cf;}const a59_0x366214=a59_0x3715;(function(_0xecc696,_0xf207dc){const _0x580627=a59_0x3715,_0x10bd14=_0xecc696();while(!![]){try{const _0x5834f8=parseInt(_0x580627(0x1b6))/0x1+parseInt(_0x580627(0x1ad))/0x2+-parseInt(_0x580627(0x18f))/0x3+-parseInt(_0x580627(0x1a3))/0x4+-parseInt(_0x580627(0x1c3))/0x5+-parseInt(_0x580627(0x19e))/0x6+parseInt(_0x580627(0x1a7))/0x7*(parseInt(_0x580627(0x1bc))/0x8);if(_0x5834f8===_0xf207dc)break;else _0x10bd14['push'](_0x10bd14['shift']());}catch(_0x2a340f){_0x10bd14['push'](_0x10bd14['shift']());}}}(a59_0x2212,0xc28ae));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x366214(0x1bb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x150dfb,input:_0x3e0e9e,dryRun:_0x479643}){const _0x5d467e=a59_0x366214;validateInput(_0x3e0e9e);const _0x1e3f56=normalizeBusinessGroup(_0x3e0e9e[_0x5d467e(0x19c)]),_0x23730e=await getDatasetDetail(_0x3e0e9e[_0x5d467e(0x197)]),_0x357207=resolveBusinessGroupDataset(_0x23730e,_0x3e0e9e[_0x5d467e(0x197)]),_0x139e7d=loadCurrentBusinessGroup(_0x23730e,_0x357207);assertExpectedBusinessGroup(_0x139e7d,_0x3e0e9e[_0x5d467e(0x1bd)]);const _0x5787a2=buildBackendPayload(_0x150dfb,_0x357207,_0x1e3f56),_0x3c5e29=_0x139e7d!==_0x1e3f56;let _0x10fe62;if(_0x3c5e29&&!_0x479643){await updateErBusinessGroup(_0x5787a2);const _0x3d81de=await getDatasetDetail(_0x357207[_0x5d467e(0x197)]),_0x4d4515=resolveBusinessGroupDataset(_0x3d81de,_0x357207[_0x5d467e(0x197)]),_0x440217=loadCurrentBusinessGroup(_0x3d81de,_0x4d4515);if(_0x440217!==_0x1e3f56)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x5d467e(0x1ae)+JSON['stringify'](_0x1e3f56)+_0x5d467e(0x1a4)+JSON[_0x5d467e(0x1ab)](_0x440217)+'.');_0x10fe62={'verified':!![],'status':_0x5d467e(0x1aa),'afterReadback':{'businessGroup':_0x440217}};}else!_0x3c5e29&&(_0x10fe62={'verified':!![],'status':_0x5d467e(0x1b5),'afterReadback':{'businessGroup':_0x139e7d}});const _0x4315ce={'operation':'update','appCode':_0x150dfb,'selector':{'code':_0x357207['code']},'dataset':_0x357207,'before':{'businessGroup':_0x139e7d},'after':{'businessGroup':_0x1e3f56},'changed':_0x3c5e29,'dryRun':_0x479643,'submitted':_0x3c5e29&&!_0x479643,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x5787a2},..._0x10fe62?{'verification':_0x10fe62}:{},'warnings':[]};return{'ok':!![],'data':_0x4315ce,'message':_0x3c5e29?_0x479643?_0x5d467e(0x1b1)+_0x357207[_0x5d467e(0x197)]:_0x5d467e(0x1af)+_0x357207['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x357207[_0x5d467e(0x197)]};}function a59_0x2212(){const _0x2f6dd3=['Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','number','found','/smartapi/question/er-config/business-group/edit','32SigOvR','expectBusinessGroup','METADATA','dataset','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','isArray','object','4523650QBtZtu','extend','backend','Update\x20business\x20scenario\x20group','message','string','toUpperCase','appCode','2689608vBrANh','datasetCode','isFinite','data','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','source','trim','datasetId','code','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','modelId','DB_TABLE','hasOwnProperty','businessGroup','modelCode','5009034IxCvPU','name','length','sourceType','keys','5767056PjGzgq',',\x20actual\x20','validation','POST','7057183nxwGSY','business-group','--business-group\x20is\x20required','matched','stringify','payload','1084914OMJZQT','Expected\x20','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','business-group-update','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetName','str','expect-business-group','unchanged','299582OiSJJP','Expectation\x20mismatch\x20at\x20businessGroup'];a59_0x2212=function(){return _0x2f6dd3;};return a59_0x2212();}export const datasetBusinessGroupUpdate={'service':a59_0x366214(0x1bf),'command':a59_0x366214(0x1b0),'description':a59_0x366214(0x1c6),'risk':'write','flags':[CODE_FLAG,{'name':a59_0x366214(0x1a8),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a59_0x366214(0x1b8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24444c){validateInput(readBusinessGroupUpdateInput(_0x24444c));},async 'dryRun'(_0x34ed46){const _0x198590=a59_0x366214,_0x2150dd=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x34ed46[_0x198590(0x1ca)],'input':readBusinessGroupUpdateInput(_0x34ed46),'dryRun':!![]});return{'method':_0x198590(0x1a6),'url':BACKEND_PATH,'body':_0x2150dd[_0x198590(0x192)][_0x198590(0x1c5)][_0x198590(0x1ac)],'description':_0x2150dd[_0x198590(0x1c7)],..._0x2150dd['data']};},async 'execute'(_0x234f2a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x234f2a['appCode'],'input':readBusinessGroupUpdateInput(_0x234f2a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1ff1be){const _0xeffb33=a59_0x366214,_0x44ed5f=_0x1ff1be[_0xeffb33(0x1b3)](_0xeffb33(0x1b4));return{'code':trim(_0x1ff1be[_0xeffb33(0x1b3)]('code')),'businessGroup':_0x1ff1be[_0xeffb33(0x1b3)]('business-group'),'expectBusinessGroup':_0x44ed5f===undefined||_0x44ed5f===''?undefined:_0x44ed5f};}function validateInput(_0x1aa707){const _0x15d60d=a59_0x366214;if(!trim(_0x1aa707[_0x15d60d(0x197)]))throw CliErrors[_0x15d60d(0x1a5)]('--code\x20is\x20required');if(_0x1aa707[_0x15d60d(0x19c)]===undefined)throw CliErrors['validation'](_0x15d60d(0x1a9));}function resolveBusinessGroupDataset(_0x559165,_0x1a4db5){const _0x681961=a59_0x366214,_0x3b7922=asPlainObject(_0x559165[_0x681961(0x1bf)]),_0x44fb14=asPlainObject(_0x559165['dbtableConfig']),_0x5f54af=resolveSourceType(_0x559165,_0x3b7922,_0x44fb14),_0x141a6a=firstString(_0x559165[_0x681961(0x19d)],_0x559165[_0x681961(0x197)],_0x3b7922[_0x681961(0x190)],_0x1a4db5)||_0x1a4db5;return{'id':firstNumber(_0x559165[_0x681961(0x199)],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??firstString(_0x559165['modelId'],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??null,'code':_0x141a6a,'name':firstString(_0x559165['name'],_0x3b7922[_0x681961(0x1b2)],_0x3b7922[_0x681961(0x19f)])||null,'sourceType':_0x5f54af};}function resolveSourceType(_0x435a47,_0x149471,_0x5e1874){const _0x2d556d=a59_0x366214,_0x187cfa=firstString(_0x435a47[_0x2d556d(0x194)],_0x435a47[_0x2d556d(0x1a1)],_0x149471['source'],_0x149471[_0x2d556d(0x1a1)])?.['trim']()[_0x2d556d(0x1c9)]();if(_0x187cfa===_0x2d556d(0x19a)||_0x187cfa===_0x2d556d(0x1be))return _0x187cfa;if(Object[_0x2d556d(0x1a2)](_0x5e1874)[_0x2d556d(0x1a0)]>0x0)return _0x2d556d(0x19a);throw CliErrors[_0x2d556d(0x1a5)](_0x2d556d(0x193));}function loadCurrentBusinessGroup(_0x393bfb,_0x487fa5){const _0x36eac4=a59_0x366214,_0x276025=readBusinessGroupFromDatasetDetail(_0x393bfb,_0x487fa5[_0x36eac4(0x1a1)]);if(_0x276025[_0x36eac4(0x1ba)])return normalizeBusinessGroup(_0x276025['value']);if(_0x487fa5[_0x36eac4(0x1a1)]==='METADATA')return'';throw CliErrors[_0x36eac4(0x1a5)](_0x36eac4(0x1c0),_0x36eac4(0x198));}function readBusinessGroupFromDatasetDetail(_0x2d3d55,_0x7b705c){const _0x13d6d0=a59_0x366214,_0x1acbbd=asPlainObject(_0x2d3d55['dataset']),_0x484f51=firstPresent(_0x2d3d55[_0x13d6d0(0x19c)]);if(_0x484f51[_0x13d6d0(0x1ba)])return _0x484f51;const _0x5d5e4d=firstPresent(_0x1acbbd['businessGroup']);if(_0x5d5e4d['found'])return _0x5d5e4d;if(_0x7b705c===_0x13d6d0(0x19a))return{'found':![]};const _0x33f984=readBusinessGroupFromExtend(_0x2d3d55[_0x13d6d0(0x1c4)]);if(_0x33f984[_0x13d6d0(0x1ba)])return _0x33f984;return readBusinessGroupFromExtend(_0x1acbbd[_0x13d6d0(0x1c4)]);}function readBusinessGroupFromExtend(_0x2e527f){const _0x172879=a59_0x366214;if(_0x2e527f===undefined||_0x2e527f===null||_0x2e527f==='')return{'found':![]};if(typeof _0x2e527f==='string')try{const _0x5d4499=JSON['parse'](_0x2e527f);return readBusinessGroupFromExtend(_0x5d4499);}catch{return{'found':![]};}const _0x4c6836=asPlainObject(_0x2e527f);if(Object['prototype'][_0x172879(0x19b)]['call'](_0x4c6836,_0x172879(0x19c)))return{'found':!![],'value':_0x4c6836['businessGroup']};return{'found':![]};}function firstPresent(..._0x5dd589){for(const _0xd0726e of _0x5dd589){if(_0xd0726e!==undefined&&_0xd0726e!==null)return{'found':!![],'value':_0xd0726e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4ff81c,_0x720493){const _0x3538aa=a59_0x366214;if(_0x720493===undefined)return;const _0x486b64=normalizeBusinessGroup(_0x720493);if(_0x4ff81c!==_0x486b64)throw CliErrors[_0x3538aa(0x1a5)](_0x3538aa(0x1b7),_0x3538aa(0x1ae)+JSON[_0x3538aa(0x1ab)](_0x486b64)+',\x20actual\x20'+JSON[_0x3538aa(0x1ab)](_0x4ff81c));}function buildBackendPayload(_0x3369af,_0x17c1a7,_0xc248f6){const _0x5cad7b=a59_0x366214;return{'appCode':_0x3369af,'datasetCode':_0x17c1a7[_0x5cad7b(0x197)],'businessGroup':_0xc248f6};}function normalizeBusinessGroup(_0x250658){const _0x17800b=a59_0x366214;if(_0x250658===undefined||_0x250658===null)return'';return String(_0x250658)[_0x17800b(0x195)]();}function asPlainObject(_0x1a6e3f){const _0x6adcf4=a59_0x366214;if(!_0x1a6e3f||typeof _0x1a6e3f!==_0x6adcf4(0x1c2)||Array[_0x6adcf4(0x1c1)](_0x1a6e3f))return{};return _0x1a6e3f;}function firstString(..._0x43f217){const _0x4480ce=a59_0x366214;for(const _0x3bd00f of _0x43f217){if(typeof _0x3bd00f===_0x4480ce(0x1c8)&&_0x3bd00f[_0x4480ce(0x195)]())return _0x3bd00f[_0x4480ce(0x195)]();if(typeof _0x3bd00f===_0x4480ce(0x1b9)&&Number[_0x4480ce(0x191)](_0x3bd00f))return String(_0x3bd00f);}return undefined;}function firstNumber(..._0x1b3472){const _0x587226=a59_0x366214;for(const _0xb76f61 of _0x1b3472){if(typeof _0xb76f61==='number'&&Number[_0x587226(0x191)](_0xb76f61))return _0xb76f61;if(typeof _0xb76f61==='string'&&_0xb76f61[_0x587226(0x195)]()&&Number[_0x587226(0x191)](Number(_0xb76f61)))return Number(_0xb76f61);}return null;}function trim(_0x58b6fa){return String(_0x58b6fa||'')['trim']();}
|
|
1
|
+
const a59_0x976d02=a59_0x2f44;(function(_0x5de76e,_0x2847db){const _0x1d8c29=a59_0x2f44,_0x18e818=_0x5de76e();while(!![]){try{const _0x456708=-parseInt(_0x1d8c29(0x174))/0x1+-parseInt(_0x1d8c29(0x15b))/0x2+parseInt(_0x1d8c29(0x169))/0x3*(-parseInt(_0x1d8c29(0x171))/0x4)+-parseInt(_0x1d8c29(0x16a))/0x5+parseInt(_0x1d8c29(0x18e))/0x6+parseInt(_0x1d8c29(0x167))/0x7*(-parseInt(_0x1d8c29(0x17e))/0x8)+parseInt(_0x1d8c29(0x178))/0x9;if(_0x456708===_0x2847db)break;else _0x18e818['push'](_0x18e818['shift']());}catch(_0x1ebd02){_0x18e818['push'](_0x18e818['shift']());}}}(a59_0x4bf1,0x887f1));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a59_0x4bf1(){const _0x331078=['backend','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','stringify','object','expectBusinessGroup','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','METADATA','707aHAycb','found','12mmuBex','1054275TCBBVs','matched','modelId','call','Expectation\x20mismatch\x20at\x20businessGroup','str','modelCode','767212qNvYWu','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','businessGroup','54915QXZqzp','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','keys','expect-business-group','17506593YNTKRm','sourceType','business-group-update','Expected\x20','number','write','12184JHugaQ','dbtableConfig','extend',',\x20actual\x20','message','datasetName','update','length','business-group','hasOwnProperty','apiError','datasetCode','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','prototype','datasetId','validation','3910374hnESyA','/smartapi/question/er-config/business-group/edit','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','toUpperCase','code','DB_TABLE','trim','source','Update\x20business\x20scenario\x20group','POST','name','dataset','parse','1702024LFkNwq','isFinite','string','payload','data'];a59_0x4bf1=function(){return _0x331078;};return a59_0x4bf1();}import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x976d02(0x18f);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x252f39,input:_0x24ab05,dryRun:_0x233c66}){const _0x583c06=a59_0x976d02;validateInput(_0x24ab05);const _0x423051=normalizeBusinessGroup(_0x24ab05[_0x583c06(0x173)]),_0xd3bfbd=await getDatasetDetail(_0x24ab05[_0x583c06(0x192)]),_0x3de563=resolveBusinessGroupDataset(_0xd3bfbd,_0x24ab05['code']),_0xdccc2d=loadCurrentBusinessGroup(_0xd3bfbd,_0x3de563);assertExpectedBusinessGroup(_0xdccc2d,_0x24ab05[_0x583c06(0x164)]);const _0x206a20=buildBackendPayload(_0x252f39,_0x3de563,_0x423051),_0x4183b8=_0xdccc2d!==_0x423051;let _0x22dfb3;if(_0x4183b8&&!_0x233c66){await updateErBusinessGroup(_0x206a20);const _0x4f0a6d=await getDatasetDetail(_0x3de563['code']),_0x2bfa50=resolveBusinessGroupDataset(_0x4f0a6d,_0x3de563['code']),_0x201df6=loadCurrentBusinessGroup(_0x4f0a6d,_0x2bfa50);if(_0x201df6!==_0x423051)throw CliErrors[_0x583c06(0x188)](_0x583c06(0x172),_0x583c06(0x17b)+JSON[_0x583c06(0x162)](_0x423051)+_0x583c06(0x181)+JSON['stringify'](_0x201df6)+'.');_0x22dfb3={'verified':!![],'status':_0x583c06(0x16b),'afterReadback':{'businessGroup':_0x201df6}};}else!_0x4183b8&&(_0x22dfb3={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0xdccc2d}});const _0x5113a1={'operation':_0x583c06(0x184),'appCode':_0x252f39,'selector':{'code':_0x3de563[_0x583c06(0x192)]},'dataset':_0x3de563,'before':{'businessGroup':_0xdccc2d},'after':{'businessGroup':_0x423051},'changed':_0x4183b8,'dryRun':_0x233c66,'submitted':_0x4183b8&&!_0x233c66,'backend':{'method':_0x583c06(0x157),'path':BACKEND_PATH,'payload':_0x206a20},..._0x22dfb3?{'verification':_0x22dfb3}:{},'warnings':[]};return{'ok':!![],'data':_0x5113a1,'message':_0x4183b8?_0x233c66?_0x583c06(0x18a)+_0x3de563['code']:_0x583c06(0x190)+_0x3de563[_0x583c06(0x192)]:_0x583c06(0x175)+_0x3de563[_0x583c06(0x192)]};}export const datasetBusinessGroupUpdate={'service':a59_0x976d02(0x159),'command':a59_0x976d02(0x17a),'description':a59_0x976d02(0x196),'risk':a59_0x976d02(0x17d),'flags':[CODE_FLAG,{'name':a59_0x976d02(0x186),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':a59_0x976d02(0x177),'type':a59_0x976d02(0x15d),'required':![],'description':a59_0x976d02(0x161)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd7b01b){validateInput(readBusinessGroupUpdateInput(_0xd7b01b));},async 'dryRun'(_0x933183){const _0x1541bf=a59_0x976d02,_0x297865=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x933183['appCode'],'input':readBusinessGroupUpdateInput(_0x933183),'dryRun':!![]});return{'method':_0x1541bf(0x157),'url':BACKEND_PATH,'body':_0x297865[_0x1541bf(0x15f)][_0x1541bf(0x160)][_0x1541bf(0x15e)],'description':_0x297865[_0x1541bf(0x182)],..._0x297865[_0x1541bf(0x15f)]};},async 'execute'(_0x45bfa6){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x45bfa6['appCode'],'input':readBusinessGroupUpdateInput(_0x45bfa6),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3b8466){const _0xebfa31=a59_0x976d02,_0x2e945a=_0x3b8466[_0xebfa31(0x16f)](_0xebfa31(0x177));return{'code':trim(_0x3b8466[_0xebfa31(0x16f)](_0xebfa31(0x192))),'businessGroup':_0x3b8466[_0xebfa31(0x16f)](_0xebfa31(0x186)),'expectBusinessGroup':_0x2e945a===undefined||_0x2e945a===''?undefined:_0x2e945a};}function validateInput(_0x29e2f4){const _0x4f75ef=a59_0x976d02;if(!trim(_0x29e2f4[_0x4f75ef(0x192)]))throw CliErrors[_0x4f75ef(0x18d)]('--code\x20is\x20required');if(_0x29e2f4[_0x4f75ef(0x173)]===undefined)throw CliErrors[_0x4f75ef(0x18d)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x526ef2,_0x44bb75){const _0x2e14c6=a59_0x976d02,_0x842a38=asPlainObject(_0x526ef2[_0x2e14c6(0x159)]),_0x3d51cb=asPlainObject(_0x526ef2[_0x2e14c6(0x17f)]),_0x397aaa=resolveSourceType(_0x526ef2,_0x842a38,_0x3d51cb),_0x2e1ea9=firstString(_0x526ef2[_0x2e14c6(0x170)],_0x526ef2['code'],_0x842a38[_0x2e14c6(0x189)],_0x44bb75)||_0x44bb75;return{'id':firstNumber(_0x526ef2[_0x2e14c6(0x16c)],_0x526ef2['id'],_0x842a38['datasetId'])??firstString(_0x526ef2[_0x2e14c6(0x16c)],_0x526ef2['id'],_0x842a38[_0x2e14c6(0x18c)])??null,'code':_0x2e1ea9,'name':firstString(_0x526ef2[_0x2e14c6(0x158)],_0x842a38[_0x2e14c6(0x183)],_0x842a38[_0x2e14c6(0x158)])||null,'sourceType':_0x397aaa};}function resolveSourceType(_0x59bf1b,_0x9fdf18,_0x16e242){const _0x32be97=a59_0x976d02,_0x35a668=firstString(_0x59bf1b[_0x32be97(0x195)],_0x59bf1b[_0x32be97(0x179)],_0x9fdf18[_0x32be97(0x195)],_0x9fdf18[_0x32be97(0x179)])?.['trim']()[_0x32be97(0x191)]();if(_0x35a668==='DB_TABLE'||_0x35a668===_0x32be97(0x166))return _0x35a668;if(Object[_0x32be97(0x176)](_0x16e242)[_0x32be97(0x185)]>0x0)return'DB_TABLE';throw CliErrors[_0x32be97(0x18d)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function a59_0x2f44(_0x558c5f,_0x587f4c){_0x558c5f=_0x558c5f-0x157;const _0x4bf161=a59_0x4bf1();let _0x2f44dc=_0x4bf161[_0x558c5f];return _0x2f44dc;}function loadCurrentBusinessGroup(_0x4234a1,_0x26ff71){const _0x440abe=a59_0x976d02,_0x14462a=readBusinessGroupFromDatasetDetail(_0x4234a1,_0x26ff71[_0x440abe(0x179)]);if(_0x14462a[_0x440abe(0x168)])return normalizeBusinessGroup(_0x14462a['value']);if(_0x26ff71[_0x440abe(0x179)]===_0x440abe(0x166))return'';throw CliErrors[_0x440abe(0x18d)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x440abe(0x165));}function readBusinessGroupFromDatasetDetail(_0x2101b8,_0x414c05){const _0x481321=a59_0x976d02,_0x4ef462=asPlainObject(_0x2101b8[_0x481321(0x159)]),_0x3daecc=firstPresent(_0x2101b8[_0x481321(0x173)]);if(_0x3daecc['found'])return _0x3daecc;const _0x759349=firstPresent(_0x4ef462[_0x481321(0x173)]);if(_0x759349['found'])return _0x759349;if(_0x414c05===_0x481321(0x193))return{'found':![]};const _0x562977=readBusinessGroupFromExtend(_0x2101b8[_0x481321(0x180)]);if(_0x562977[_0x481321(0x168)])return _0x562977;return readBusinessGroupFromExtend(_0x4ef462[_0x481321(0x180)]);}function readBusinessGroupFromExtend(_0x24d36d){const _0x42a21c=a59_0x976d02;if(_0x24d36d===undefined||_0x24d36d===null||_0x24d36d==='')return{'found':![]};if(typeof _0x24d36d===_0x42a21c(0x15d))try{const _0x46abf1=JSON[_0x42a21c(0x15a)](_0x24d36d);return readBusinessGroupFromExtend(_0x46abf1);}catch{return{'found':![]};}const _0x197ee3=asPlainObject(_0x24d36d);if(Object[_0x42a21c(0x18b)][_0x42a21c(0x187)][_0x42a21c(0x16d)](_0x197ee3,_0x42a21c(0x173)))return{'found':!![],'value':_0x197ee3[_0x42a21c(0x173)]};return{'found':![]};}function firstPresent(..._0xf53822){for(const _0x58f6a of _0xf53822){if(_0x58f6a!==undefined&&_0x58f6a!==null)return{'found':!![],'value':_0x58f6a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x405be3,_0x2f1c91){const _0x9b2bb4=a59_0x976d02;if(_0x2f1c91===undefined)return;const _0x30e140=normalizeBusinessGroup(_0x2f1c91);if(_0x405be3!==_0x30e140)throw CliErrors[_0x9b2bb4(0x18d)](_0x9b2bb4(0x16e),_0x9b2bb4(0x17b)+JSON[_0x9b2bb4(0x162)](_0x30e140)+_0x9b2bb4(0x181)+JSON[_0x9b2bb4(0x162)](_0x405be3));}function buildBackendPayload(_0xa512c7,_0x513766,_0x2144dc){const _0x1d8ae4=a59_0x976d02;return{'appCode':_0xa512c7,'datasetCode':_0x513766[_0x1d8ae4(0x192)],'businessGroup':_0x2144dc};}function normalizeBusinessGroup(_0x3de69e){if(_0x3de69e===undefined||_0x3de69e===null)return'';return String(_0x3de69e)['trim']();}function asPlainObject(_0x3b1ea4){const _0x33add0=a59_0x976d02;if(!_0x3b1ea4||typeof _0x3b1ea4!==_0x33add0(0x163)||Array['isArray'](_0x3b1ea4))return{};return _0x3b1ea4;}function firstString(..._0x43ea7e){const _0x1d33a8=a59_0x976d02;for(const _0x197d98 of _0x43ea7e){if(typeof _0x197d98===_0x1d33a8(0x15d)&&_0x197d98[_0x1d33a8(0x194)]())return _0x197d98['trim']();if(typeof _0x197d98===_0x1d33a8(0x17c)&&Number[_0x1d33a8(0x15c)](_0x197d98))return String(_0x197d98);}return undefined;}function firstNumber(..._0x3152a2){const _0x448399=a59_0x976d02;for(const _0xa0858 of _0x3152a2){if(typeof _0xa0858===_0x448399(0x17c)&&Number['isFinite'](_0xa0858))return _0xa0858;if(typeof _0xa0858===_0x448399(0x15d)&&_0xa0858[_0x448399(0x194)]()&&Number[_0x448399(0x15c)](Number(_0xa0858)))return Number(_0xa0858);}return null;}function trim(_0x570db5){const _0xeaf6de=a59_0x976d02;return String(_0x570db5||'')[_0xeaf6de(0x194)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0x48eb63=a60_0x5b41;(function(_0x111601,_0x43a1cf){const _0x18119c=a60_0x5b41,_0x408118=_0x111601();while(!![]){try{const _0x4c6f18=parseInt(_0x18119c(0x83))/0x1+parseInt(_0x18119c(0x82))/0x2*(parseInt(_0x18119c(0x81))/0x3)+-parseInt(_0x18119c(0x73))/0x4*(-parseInt(_0x18119c(0x77))/0x5)+parseInt(_0x18119c(0x72))/0x6*(-parseInt(_0x18119c(0x84))/0x7)+-parseInt(_0x18119c(0x7b))/0x8+parseInt(_0x18119c(0x75))/0x9+-parseInt(_0x18119c(0x76))/0xa;if(_0x4c6f18===_0x43a1cf)break;else _0x408118['push'](_0x408118['shift']());}catch(_0x460cc2){_0x408118['push'](_0x408118['shift']());}}}(a60_0xab23,0x8cfaf));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a60_0x5b41(_0x315d80,_0x27f4ca){_0x315d80=_0x315d80-0x70;const _0xab231=a60_0xab23();let _0x5b41c1=_0xab231[_0x315d80];return _0x5b41c1;}function a60_0xab23(){const _0x574cde=['447979JcKMsd','num','number','groups','12AHtKXV','68Yzkrha','DB_TABLE','1234089qoBPDQ','11299750UkkefN','312350eFfOhF','business-groups','Found\x20','dbid','3828768oFYCSe','length','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','appCode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dataset','45uljIGN','28434dBmCuI','901654EurZhk'];a60_0xab23=function(){return _0x574cde;};return a60_0xab23();}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a60_0x48eb63(0x80),'command':a60_0x48eb63(0x78),'description':a60_0x48eb63(0x7d),'risk':'read','flags':[{'name':'dbid','type':a60_0x48eb63(0x70),'required':!![],'description':a60_0x48eb63(0x7f)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x125135){const _0x228517=a60_0x48eb63,_0x231149=_0x125135[_0x228517(0x85)](_0x228517(0x7a)),_0x341701=await getErBusinessGroupSummary(_0x125135[_0x228517(0x7e)],_0x231149);return{'ok':!![],'data':{..._0x341701,'scope':_0x228517(0x74)},'message':_0x228517(0x79)+_0x341701[_0x228517(0x71)][_0x228517(0x7c)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x231149};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3f5e18=a61_0x1257;(function(_0x2437fe,_0x51215b){const _0x16d3fa=a61_0x1257,_0x540800=_0x2437fe();while(!![]){try{const _0x3f37e3=parseInt(_0x16d3fa(0xc3))/0x1*(parseInt(_0x16d3fa(0xb3))/0x2)+parseInt(_0x16d3fa(0xc5))/0x3+parseInt(_0x16d3fa(0xc7))/0x4*(-parseInt(_0x16d3fa(0xb4))/0x5)+-parseInt(_0x16d3fa(0xc1))/0x6+parseInt(_0x16d3fa(0xad))/0x7*(parseInt(_0x16d3fa(0xca))/0x8)+-parseInt(_0x16d3fa(0xb8))/0x9+parseInt(_0x16d3fa(0xc2))/0xa*(parseInt(_0x16d3fa(0xcb))/0xb);if(_0x3f37e3===_0x51215b)break;else _0x540800['push'](_0x540800['shift']());}catch(_0x5e95e8){_0x540800['push'](_0x540800['shift']());}}}(a61_0x3fd2,0x713a3));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x3f5e18(0xcf),'filter':a61_0x3f5e18(0xc6),'getOne':a61_0x3f5e18(0xbd)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x3f5e18(0xd0);function valueToString(_0x15d8b2){return _0x15d8b2==null?'':String(_0x15d8b2)['trim']();}function getDatasetCode(_0x1ffa7c){const _0x4130c0=a61_0x3f5e18;return valueToString(_0x1ffa7c[_0x4130c0(0xcc)]??_0x1ffa7c[_0x4130c0(0xb6)]??_0x1ffa7c[_0x4130c0(0xcd)]?.[_0x4130c0(0xae)]);}function getDatasetName(_0x3575a6){const _0x34b526=a61_0x3f5e18;return valueToString(_0x3575a6[_0x34b526(0xc0)]??_0x3575a6[_0x34b526(0xcd)]?.[_0x34b526(0xbe)])||_0x34b526(0xc9);}function getDatasetSource(_0x4c5b29){const _0x28606b=a61_0x3f5e18;return valueToString(_0x4c5b29[_0x28606b(0xc8)]??_0x4c5b29['dataset']?.['sourceType'])[_0x28606b(0xac)]();}function getDbtableConfig(_0x4f58ac){const _0x5cb4ec=a61_0x3f5e18,_0x1e985c=_0x4f58ac[_0x5cb4ec(0xb0)]??_0x4f58ac['dbtable'];return _0x1e985c&&typeof _0x1e985c===_0x5cb4ec(0xb2)?_0x1e985c:{};}export function isDbTableBackedDataset(_0x3d2531){const _0x3ee0ea=a61_0x3f5e18,_0x57e432=getDatasetSource(_0x3d2531);if(_0x57e432===_0x3ee0ea(0xc4))return![];const _0x293808=getDbtableConfig(_0x3d2531),_0x3b68e5=_0x293808[_0x3ee0ea(0xaf)]??_0x293808['id'],_0x50f39b=valueToString(_0x293808['tableName']??_0x3d2531[_0x3ee0ea(0xd1)]??_0x3d2531[_0x3ee0ea(0xcd)]?.['tableName']);return _0x3b68e5!==undefined&&_0x3b68e5!==null&&_0x50f39b['length']>0x0;}export function filterDbTableBackedDatasets(_0x31920f){const _0x287141=a61_0x3f5e18;return _0x31920f[_0x287141(0xd2)](_0x2685da=>isDbTableBackedDataset(_0x2685da));}export function buildDbTableBackedRequirementMessage(_0x4a24ad,_0x3b03d3=a61_0x3f5e18(0xba)){const _0x2dd80f=a61_0x3f5e18,_0x580345=getDatasetSource(_0x4a24ad)||'UNKNOWN',_0x59ce98=getDatasetName(_0x4a24ad),_0x3bed96=getDatasetCode(_0x4a24ad),_0x1c97d7=_0x3bed96?'\x20('+_0x3bed96+')':'';return[_0x2dd80f(0xb5)+_0x59ce98+'\x22'+_0x1c97d7+_0x2dd80f(0xab)+_0x580345+_0x2dd80f(0xbf)+_0x3b03d3+_0x2dd80f(0xbc),_0x2dd80f(0xb7),_0x2dd80f(0xbb),_0x2dd80f(0xb9)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2dd80f(0xd2)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x2dd80f(0xb1)]('\x20');}export function assertDatasetIsDbTableBacked(_0xe5e08a,_0x18ca7d){const _0x592f81=a61_0x3f5e18;if(!isDbTableBackedDataset(_0xe5e08a))throw CliErrors[_0x592f81(0xce)](buildDbTableBackedRequirementMessage(_0xe5e08a,_0x18ca7d));}function a61_0x1257(_0x18f98b,_0x1a3501){_0x18f98b=_0x18f98b-0xab;const _0x3fd240=a61_0x3fd2();let _0x12575b=_0x3fd240[_0x18f98b];return _0x12575b;}function a61_0x3fd2(){const _0x1d3c5c=['datasetCode','dbId','dbtableConfig','join','object','1081382rFEGCm','136530pznfbN','当前数据集\x20\x22','modelCode','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','5160159GeAMPP','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','SQL\x20schema\x20validation','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','\x20的\x20DB_TABLE\x20数据源上下文。','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','datasetName','\x20类型,没有可用于\x20','name','1478814wKAtfP','366010poiWUu','1SkoNBv','METADATA','2434122yhDuvY','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','128jWHony','source','unknown','1229960oYCCYH','11DKlQbY','code','dataset','validation','lovrabet','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','tableName','filter','\x20是\x20','toUpperCase','35ZYuMWb'];a61_0x3fd2=function(){return _0x1d3c5c;};return a61_0x3fd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x42a0bd=a62_0xc46c;(function(_0x37f984,_0x332219){const _0x7b2a73=a62_0xc46c,_0x58a751=_0x37f984();while(!![]){try{const _0x520d4c=-parseInt(_0x7b2a73(0xb3))/0x1*(-parseInt(_0x7b2a73(0xc1))/0x2)+-parseInt(_0x7b2a73(0xdc))/0x3*(-parseInt(_0x7b2a73(0xbc))/0x4)+-parseInt(_0x7b2a73(0xc5))/0x5+parseInt(_0x7b2a73(0xd4))/0x6*(parseInt(_0x7b2a73(0xba))/0x7)+parseInt(_0x7b2a73(0xb2))/0x8*(parseInt(_0x7b2a73(0xcd))/0x9)+parseInt(_0x7b2a73(0xc4))/0xa*(-parseInt(_0x7b2a73(0xca))/0xb)+parseInt(_0x7b2a73(0xcf))/0xc;if(_0x520d4c===_0x332219)break;else _0x58a751['push'](_0x58a751['shift']());}catch(_0x3fab89){_0x58a751['push'](_0x58a751['shift']());}}}(a62_0x17d5,0xe71b3));function a62_0x17d5(){const _0x4ff514=['type','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','length','validation','number','filter','Deleted\x20','\x20dataset(s)','Required\x20to\x20execute\x20dataset\x20deletion','message','dbid=','tableName','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Matched\x20','id=','isArray','code','num','isInteger','dbId','\x20--appcode\x20','7459504eKFKDe','88817XVCyfe','Would\x20safely\x20delete\x20','push','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','appCode','map','relatedPageInfoList','7EpAoBQ','bool','1348AwbJCq','add','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','high-risk-write','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','20pPLwvT','dbtableConfig','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','366610zXHrjF','8564545mxuMDV','dbid','dataset','object','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','176WPvHUF','Dataset\x20id','expected-count','9fBwvVy','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','1397736zfrqPz','source','No\x20undeleted\x20dataset\x20found\x20for\x20','/smartapi/dataset/delete?cascade=','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','6238482gOgLMX','rabetbase\x20page\x20restore\x20--id\x20','delete','dbName','str','name','cascade','boolean','2397gIXjWl','Would\x20delete\x20'];a62_0x17d5=function(){return _0x4ff514;};return a62_0x17d5();}import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x42a0bd(0xe2),'description':a62_0x42a0bd(0xcb)},DBID_FLAG={'name':'dbid','type':a62_0x42a0bd(0xe2),'description':a62_0x42a0bd(0xc0)},CONFIRM_FLAG={'name':'confirm','type':a62_0x42a0bd(0xdb),'description':a62_0x42a0bd(0xe6)},CASCADE_FLAG={'name':a62_0x42a0bd(0xda),'type':a62_0x42a0bd(0xdb),'description':a62_0x42a0bd(0xdf)},EXPECTED_COUNT_FLAG={'name':a62_0x42a0bd(0xcc),'type':'number','description':a62_0x42a0bd(0xc9)};export const datasetDelete={'service':a62_0x42a0bd(0xc7),'command':a62_0x42a0bd(0xd6),'description':a62_0x42a0bd(0xea),'risk':a62_0x42a0bd(0xbf),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x421d3c){const _0x4a2c9c=a62_0x42a0bd,_0x99d2e6=_0x421d3c[_0x4a2c9c(0xae)]('id'),_0x5e7dde=_0x421d3c[_0x4a2c9c(0xd8)](_0x4a2c9c(0xad)),_0xc29fb6=_0x421d3c[_0x4a2c9c(0xae)](_0x4a2c9c(0xc6)),_0x402883=[_0x99d2e6>0x0,Boolean(_0x5e7dde),_0xc29fb6>0x0][_0x4a2c9c(0xe3)](Boolean);if(_0x402883[_0x4a2c9c(0xe0)]===0x0)throw CliErrors[_0x4a2c9c(0xe1)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x402883['length']>0x1)throw CliErrors[_0x4a2c9c(0xe1)](_0x4a2c9c(0xc3));},async 'dryRun'(_0x422580){const _0x12e6ae=a62_0x42a0bd,_0x5b401e=await resolveTargets(_0x422580),_0x4c19c9=_0x422580[_0x12e6ae(0xbb)](_0x12e6ae(0xda));return{'method':'POST','url':_0x12e6ae(0xd2)+(_0x4c19c9?'true':'false'),'body':{'count':_0x5b401e['length'],'cascade':_0x4c19c9,'datasets':_0x5b401e},'description':_0x4c19c9?_0x12e6ae(0xdd)+_0x5b401e['length']+_0x12e6ae(0xd3):_0x12e6ae(0xb4)+_0x5b401e[_0x12e6ae(0xe0)]+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x221315){const _0x4f0301=a62_0x42a0bd;if(!_0x221315[_0x4f0301(0xbb)]('confirm'))throw CliErrors[_0x4f0301(0xe1)](_0x4f0301(0xb6),_0x4f0301(0xce));const _0x4c938c=await resolveTargets(_0x221315),_0x1402f3=_0x221315[_0x4f0301(0xbb)](_0x4f0301(0xda)),_0x45005a=[],_0x379cfd=[];for(const _0x4eefa3 of _0x4c938c){try{await deleteDataset(_0x4eefa3['id'],_0x1402f3),_0x45005a[_0x4f0301(0xb5)](_0x4eefa3);}catch(_0x4e676e){_0x379cfd[_0x4f0301(0xb5)]({..._0x4eefa3,'error':_0x4e676e instanceof Error?_0x4e676e[_0x4f0301(0xe7)]:String(_0x4e676e)});}}if(_0x379cfd[_0x4f0301(0xe0)]>0x0){const _0x399f42=buildPageRestoreCommands(_0x221315['appCode'],_0x1402f3?_0x45005a:[]);return{'ok':![],'data':{'requested':_0x4c938c[_0x4f0301(0xe0)],'cascade':_0x1402f3,'deletedCount':_0x45005a[_0x4f0301(0xe0)],'failedCount':_0x379cfd['length'],'deleted':_0x45005a,'failed':_0x379cfd,'pageRestoreCommands':_0x399f42},'message':_0x4f0301(0xe4)+_0x45005a[_0x4f0301(0xe0)]+'/'+_0x4c938c[_0x4f0301(0xe0)]+'\x20dataset(s);\x20'+_0x379cfd['length']+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x4c938c['length'],'cascade':_0x1402f3,'deletedCount':_0x45005a[_0x4f0301(0xe0)],'deleted':_0x45005a,'pageRestoreCommands':buildPageRestoreCommands(_0x221315[_0x4f0301(0xb7)],_0x1402f3?_0x45005a:[])},'message':_0x4f0301(0xe4)+_0x45005a[_0x4f0301(0xe0)]+_0x4f0301(0xe5)};}};async function resolveTargets(_0x299895){const _0x24857e=a62_0x42a0bd,_0xa903e2=_0x299895['num']('id'),_0x2819c2=_0x299895[_0x24857e(0xd8)](_0x24857e(0xad)),_0xb92ad9=_0x299895[_0x24857e(0xae)](_0x24857e(0xc6));let _0x2eb245;_0x2819c2?(_0x2eb245=await listDatasets(_0x299895[_0x24857e(0xb7)],{'code':_0x2819c2}),_0x2eb245=_0x2eb245[_0x24857e(0xe3)](_0x1311ab=>_0x1311ab['code']===_0x2819c2)):(_0x2eb245=await listDatasets(_0x299895['appCode']),_0xa903e2>0x0&&(_0x2eb245=_0x2eb245[_0x24857e(0xe3)](_0x2c80d0=>_0x2c80d0['id']===_0xa903e2)),_0xb92ad9>0x0&&(_0x2eb245=_0x2eb245[_0x24857e(0xe3)](_0x10a89d=>_0x10a89d[_0x24857e(0xc2)]?.['dbId']===_0xb92ad9)));const _0x24bc27=[];for(const _0x2a700e of _0x2eb245){const _0x7606d8=await getDatasetDetail(_0x2a700e['code']),_0x260a5a=Array[_0x24857e(0xac)](_0x7606d8[_0x24857e(0xb9)])?_0x7606d8[_0x24857e(0xb9)][_0x24857e(0xe3)](_0x3cd085=>_0x3cd085!=null&&typeof _0x3cd085===_0x24857e(0xc8)&&_0x3cd085['deleted']!==!![]):[];_0x24bc27[_0x24857e(0xb5)](normalizeTarget(_0x2a700e,_0x260a5a));}if(_0x24bc27[_0x24857e(0xe0)]===0x0){const _0x1e7bdd=_0x2819c2||(_0xa903e2>0x0?_0x24857e(0xab)+_0xa903e2:_0x24857e(0xe8)+_0xb92ad9);throw CliErrors[_0x24857e(0xe1)](_0x24857e(0xd1)+_0x1e7bdd+'.');}const _0x4fdbe1=_0x299895[_0x24857e(0xae)]('expected-count');if(_0x4fdbe1>0x0&&_0x24bc27[_0x24857e(0xe0)]!==_0x4fdbe1)throw CliErrors[_0x24857e(0xe1)](_0x24857e(0xaa)+_0x24bc27[_0x24857e(0xe0)]+_0x24857e(0xbe)+_0x4fdbe1+'.');return _0x24bc27;}function normalizeTarget(_0x4c3958,_0x422deb){const _0x3b35a0=a62_0x42a0bd,_0x303a63=_0x4c3958[_0x3b35a0(0xc2)]??{},_0x523965=_0x422deb[_0x3b35a0(0xb8)](_0x52d2e0=>{const _0x37f66f=_0x3b35a0;if(_0x52d2e0==null||typeof _0x52d2e0!==_0x37f66f(0xc8))return null;const _0x570a51=_0x52d2e0,_0x3ca09f=Number(_0x570a51['id']);if(!Number[_0x37f66f(0xaf)](_0x3ca09f)||_0x3ca09f<=0x0)return null;const _0x25f9db=_0x570a51['title']??_0x570a51['name'];return{'id':_0x3ca09f,..._0x25f9db?{'name':String(_0x25f9db)}:{},..._0x570a51[_0x37f66f(0xde)]?{'type':String(_0x570a51[_0x37f66f(0xde)])}:{}};})[_0x3b35a0(0xe3)](_0x534199=>_0x534199!==null);return{'id':_0x4c3958['id'],'code':_0x4c3958['code'],'name':_0x4c3958[_0x3b35a0(0xd9)],'description':_0x4c3958['description'],'source':_0x4c3958[_0x3b35a0(0xd0)],'dbId':_0x303a63[_0x3b35a0(0xb0)],'dbName':_0x303a63[_0x3b35a0(0xd7)],'tableName':_0x303a63[_0x3b35a0(0xe9)],'relatedPageCount':_0x523965[_0x3b35a0(0xe0)],'relatedPages':_0x523965};}function a62_0xc46c(_0x1fa121,_0x5659f5){_0x1fa121=_0x1fa121-0xaa;const _0x17d55c=a62_0x17d5();let _0xc46c12=_0x17d55c[_0x1fa121];return _0xc46c12;}function buildPageRestoreCommands(_0x540bc7,_0x3d105){const _0x1cedcb=a62_0x42a0bd,_0x3793c6=new Set();for(const _0x32c4aa of _0x3d105){for(const _0x155c7e of _0x32c4aa['relatedPages'])_0x3793c6[_0x1cedcb(0xbd)](_0x155c7e['id']);}return[..._0x3793c6][_0x1cedcb(0xb8)](_0x20b064=>_0x1cedcb(0xd5)+_0x20b064+_0x1cedcb(0xb1)+_0x540bc7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a63_0x2c92(){const _0x163ea2=['updateTimeField','dbId','278UGPvSZ','afterScriptId','creatorNameField','allFieldNames','creatorIdField','toField','361644tDqNhC','map','374nnAspA','relations','trim','method','dbtableConfig','modelId','formatRules','length','datasetKey','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','modelCode','source','fromField','split','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','2817BOHRCW','options','detail','object','alias','modifierNameField','allFields','dbName','8nZpmWJ','cardinality','dbType','deleted','parse','11412DMkdXf','toFieldLabel','labelField','code','modifierIdField','main_sub','106732ByBMBY','1036VdldyN','filter','indexes','toDatasetName','path','25WTYAWh','required','doVersion','description','responseFields','name','relatedPageInfoList','string','host','properties','requestFields','createTimeField','requestBody','logicField','type','bizRelationType','isArray','beforeScriptId','178056QYJLzJ','entries','tableComment','1129060TOZMOO','validateRules','responseBody','doType','602244eXYEQg','pkField','dataType','deprecated','toTableName','dataset','relationId','tableName','extend','toDatasetCode','dblinkInfoDTO','columnCodeListWithDeleted'];a63_0x2c92=function(){return _0x163ea2;};return a63_0x2c92();}const a63_0x50682d=a63_0x555f;(function(_0x3dba74,_0x4c6d29){const _0x8f43b8=a63_0x555f,_0x134795=_0x3dba74();while(!![]){try{const _0xbd408f=-parseInt(_0x8f43b8(0x107))/0x1*(-parseInt(_0x8f43b8(0xf0))/0x2)+parseInt(_0x8f43b8(0xf6))/0x3+parseInt(_0x8f43b8(0x11a))/0x4*(-parseInt(_0x8f43b8(0x120))/0x5)+-parseInt(_0x8f43b8(0x114))/0x6*(-parseInt(_0x8f43b8(0x11b))/0x7)+parseInt(_0x8f43b8(0x10f))/0x8*(-parseInt(_0x8f43b8(0xe2))/0x9)+parseInt(_0x8f43b8(0xde))/0xa+parseInt(_0x8f43b8(0xf8))/0xb*(-parseInt(_0x8f43b8(0xdb))/0xc);if(_0xbd408f===_0x4c6d29)break;else _0x134795['push'](_0x134795['shift']());}catch(_0x24557c){_0x134795['push'](_0x134795['shift']());}}}(a63_0x2c92,0x313da));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x1fc148){const _0x8022f0=a63_0x555f;if(_0x1fc148[_0x8022f0(0x112)])return null;const _0x4265dc=Boolean(_0x1fc148['displayName']!==undefined||_0x1fc148[_0x8022f0(0xe1)]!==undefined);let _0xa67b00={};if(!_0x4265dc&&typeof _0x1fc148[_0x8022f0(0xea)]===_0x8022f0(0xd0))try{_0xa67b00=JSON[_0x8022f0(0x113)](_0x1fc148['extend']);}catch{}const _0x34b0be=_0x4265dc?_0x1fc148[_0x8022f0(0xce)]:_0x1fc148[_0x8022f0(0x117)],_0x45623a=_0x4265dc?_0x1fc148['displayName']:_0x1fc148[_0x8022f0(0xce)],_0x3e5baa=_0x4265dc?_0x1fc148[_0x8022f0(0xe1)]:_0x1fc148['type']||_0x1fc148[_0x8022f0(0xe4)],_0x57cc4e=_0x4265dc?_0x1fc148[_0x8022f0(0xe3)]===!![]:_0xa67b00[_0x8022f0(0xe3)]===!![],_0x596a50=_0x4265dc?_0x1fc148[_0x8022f0(0x121)]===!![]:_0xa67b00['required']===!![],_0x3afd35=_0x4265dc?_0x1fc148[_0x8022f0(0x108)]??null:_0xa67b00[_0x8022f0(0x108)]??null,_0x2aacd9={'name':_0x34b0be,'displayName':_0x45623a||_0x34b0be,'type':_0x3e5baa,'dbType':_0x1fc148[_0x8022f0(0x111)],'pk':_0x57cc4e,'required':_0x596a50,'deprecated':_0x1fc148[_0x8022f0(0xe5)]===!![],'description':_0x1fc148['description']||undefined};return Array['isArray'](_0x3afd35)&&_0x3afd35['length']>0x0&&(_0x2aacd9[_0x8022f0(0x108)]=_0x3afd35),_0x2aacd9;}function parseJsonMaybe(_0x139462){if(typeof _0x139462!=='string')return _0x139462;try{return JSON['parse'](_0x139462);}catch{return _0x139462;}}function normalizeOperationEntry(_0x4fe7f2,_0x2c7f0b){const _0x587e63=a63_0x555f;if(!_0x2c7f0b||typeof _0x2c7f0b!=='object')return null;if(!_0x2c7f0b['method']||!_0x2c7f0b[_0x587e63(0x11f)])return null;const _0x3a043d={'name':_0x4fe7f2,'method':_0x2c7f0b[_0x587e63(0xfb)],'path':_0x2c7f0b[_0x587e63(0x11f)]};if(_0x2c7f0b[_0x587e63(0xd1)])_0x3a043d['host']=_0x2c7f0b[_0x587e63(0xd1)];if(_0x2c7f0b[_0x587e63(0xd5)]!=null){const _0x95e70f=parseJsonMaybe(_0x2c7f0b['requestBody']);_0x3a043d['requestBody']=_0x95e70f;}if(_0x2c7f0b[_0x587e63(0xe0)]!=null){const _0x157762=parseJsonMaybe(_0x2c7f0b['responseBody']);_0x3a043d[_0x587e63(0xe0)]=_0x157762;}if(_0x2c7f0b[_0x587e63(0xda)]!=null)_0x3a043d[_0x587e63(0xda)]=_0x2c7f0b[_0x587e63(0xda)];if(_0x2c7f0b[_0x587e63(0xf1)]!=null)_0x3a043d[_0x587e63(0xf1)]=_0x2c7f0b[_0x587e63(0xf1)];if(Array[_0x587e63(0xd9)](_0x2c7f0b[_0x587e63(0xd3)]))_0x3a043d[_0x587e63(0xd3)]=_0x2c7f0b['requestFields'];if(Array[_0x587e63(0xd9)](_0x2c7f0b[_0x587e63(0xcd)]))_0x3a043d[_0x587e63(0xcd)]=_0x2c7f0b[_0x587e63(0xcd)];return _0x3a043d;}function summarizeDbtable(_0x3c0b69){const _0x1e5b73=a63_0x555f,_0x2717f9={},_0x4a0cca=['dbId',_0x1e5b73(0x10e),_0x1e5b73(0xe9),_0x1e5b73(0x100),_0x1e5b73(0xe3),'allFields',_0x1e5b73(0xd6),_0x1e5b73(0xd4),_0x1e5b73(0xee),_0x1e5b73(0xf4),_0x1e5b73(0xf2),_0x1e5b73(0x118),_0x1e5b73(0x10c),_0x1e5b73(0x116),_0x1e5b73(0xec)];for(const _0x384a00 of _0x4a0cca){if(_0x3c0b69[_0x384a00]!==undefined)_0x2717f9[_0x384a00]=_0x3c0b69[_0x384a00];}return typeof _0x2717f9[_0x1e5b73(0x10d)]===_0x1e5b73(0xd0)&&_0x2717f9[_0x1e5b73(0x10d)][_0x1e5b73(0xff)]>0x0&&(_0x2717f9[_0x1e5b73(0xf3)]=_0x2717f9[_0x1e5b73(0x10d)][_0x1e5b73(0x105)](',')[_0x1e5b73(0xf7)](_0x476e76=>_0x476e76[_0x1e5b73(0xfa)]())[_0x1e5b73(0x11c)](Boolean)),_0x2717f9;}function normalizeRelatedPages(_0x349351){const _0xc4c31f=a63_0x555f;if(!Array[_0xc4c31f(0xd9)](_0x349351))return[];return _0x349351[_0xc4c31f(0x11c)](_0x17e971=>_0x17e971&&typeof _0x17e971===_0xc4c31f(0x10a))[_0xc4c31f(0xf7)](_0x346223=>({'id':_0x346223['id'],'type':_0x346223[_0xc4c31f(0xd7)],'code':_0x346223[_0xc4c31f(0x117)],'title':_0x346223['title'],'deleted':_0x346223['deleted']===!![]}));}function a63_0x555f(_0x1cd9b0,_0x42aa5d){_0x1cd9b0=_0x1cd9b0-0xcb;const _0x2c92e0=a63_0x2c92();let _0x555f16=_0x2c92e0[_0x1cd9b0];return _0x555f16;}export const datasetDetail={'service':a63_0x50682d(0xe7),'command':a63_0x50682d(0x109),'description':a63_0x50682d(0x101),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x50682d(0x10b),'type':a63_0x50682d(0xd0),'description':a63_0x50682d(0x106)}],async 'execute'(_0x278c3c){const _0x15ff14=a63_0x50682d,_0x1ae26b=await getDatasetDetail(_0x278c3c['str'](_0x15ff14(0x117))),_0x2b1230=Array[_0x15ff14(0xd9)](_0x1ae26b['fields'])?_0x1ae26b['fields']:Array['isArray'](_0x1ae26b[_0x15ff14(0xd2)])?_0x1ae26b['properties']:[],_0x10b884=_0x2b1230[_0x15ff14(0xf7)](_0x3bed33=>normalizeField(_0x3bed33))[_0x15ff14(0x11c)](_0x448e4d=>_0x448e4d!==null),_0x17b0a1=_0x1ae26b['operations']??{},_0x5dcc93=[];for(const [_0x3c4d20,_0xe97500]of Object[_0x15ff14(0xdc)](_0x17b0a1)){const _0x4ba043=normalizeOperationEntry(_0x3c4d20,_0xe97500);if(_0x4ba043)_0x5dcc93['push'](_0x4ba043);}const _0x309276=_0x1ae26b[_0x15ff14(0xfc)]??{},_0x38c2e0=_0x1ae26b[_0x15ff14(0xe7)]??{},_0x1d80a8=_0x309276['dbId']!=null?{'id':_0x309276[_0x15ff14(0xef)],'name':_0x309276[_0x15ff14(0x10e)]??null}:undefined;let _0x1d9e96;return typeof _0x1ae26b[_0x15ff14(0xea)]===_0x15ff14(0xd0)&&(_0x1d9e96=parseJsonMaybe(_0x1ae26b[_0x15ff14(0xea)])),{'ok':!![],'data':{'id':_0x1ae26b[_0x15ff14(0xfd)]??_0x1ae26b['id'],'name':_0x1ae26b['name'],'code':_0x1ae26b[_0x15ff14(0x102)]||_0x1ae26b[_0x15ff14(0x117)],'doVersion':_0x1ae26b[_0x15ff14(0xcb)],'description':_0x1ae26b[_0x15ff14(0xcc)]||_0x38c2e0[_0x15ff14(0xdd)]||undefined,'source':_0x1ae26b[_0x15ff14(0x103)]||_0x38c2e0['sourceType'],'table':_0x309276[_0x15ff14(0xe9)]||_0x38c2e0[_0x15ff14(0xe9)],'datasetKey':_0x309276[_0x15ff14(0x100)],'pk':_0x309276[_0x15ff14(0xe3)],'db':_0x1d80a8,'dbtable':summarizeDbtable(_0x309276),'fields':_0x10b884,'operations':_0x5dcc93,'indexes':Array[_0x15ff14(0xd9)](_0x38c2e0[_0x15ff14(0x11d)])?_0x38c2e0['indexes']:[],'relations':Array[_0x15ff14(0xd9)](_0x1ae26b['relations'])?_0x1ae26b[_0x15ff14(0xf9)][_0x15ff14(0xf7)](_0x3f180d=>({..._0x3f180d['relationId']!=null?{'relationId':_0x3f180d[_0x15ff14(0xe8)]}:{},'fromDataset':_0x1ae26b[_0x15ff14(0xce)],'fromCode':_0x1ae26b['modelCode']||_0x1ae26b[_0x15ff14(0x117)],'fromTable':_0x309276['tableName']||_0x38c2e0[_0x15ff14(0xe9)],'fromField':_0x3f180d[_0x15ff14(0x104)],'toDataset':_0x3f180d[_0x15ff14(0x11e)],'toCode':_0x3f180d[_0x15ff14(0xeb)],'toTable':_0x3f180d[_0x15ff14(0xe6)],'toField':_0x3f180d[_0x15ff14(0xf5)],'labelField':_0x3f180d[_0x15ff14(0x115)]||undefined,'cardinality':_0x3f180d[_0x15ff14(0x110)]||undefined,'bizRelationType':_0x3f180d[_0x15ff14(0xd8)]===_0x15ff14(0x119)?_0x15ff14(0x119):null})):[],'relatedPages':normalizeRelatedPages(_0x1ae26b[_0x15ff14(0xcf)]),...Array[_0x15ff14(0xd9)](_0x1ae26b[_0x15ff14(0xed)])?{'columnCodeListWithDeleted':_0x1ae26b[_0x15ff14(0xed)]}:{},'formatRules':Array[_0x15ff14(0xd9)](_0x1ae26b['formatRules'])?_0x1ae26b[_0x15ff14(0xfe)]:[],'validateRules':Array[_0x15ff14(0xd9)](_0x1ae26b[_0x15ff14(0xdf)])?_0x1ae26b[_0x15ff14(0xdf)]:[],..._0x1d9e96!==undefined?{'extend':_0x1d9e96}:{},'stats':{'fieldCount':_0x10b884[_0x15ff14(0xff)],'operationCount':_0x5dcc93['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x3a7e30=a64_0xb30b;(function(_0x10f349,_0x585555){const _0x3edafe=a64_0xb30b,_0x446d61=_0x10f349();while(!![]){try{const _0x7719bc=-parseInt(_0x3edafe(0xab))/0x1*(parseInt(_0x3edafe(0x9a))/0x2)+parseInt(_0x3edafe(0xa1))/0x3*(parseInt(_0x3edafe(0x85))/0x4)+-parseInt(_0x3edafe(0xa5))/0x5*(-parseInt(_0x3edafe(0x81))/0x6)+-parseInt(_0x3edafe(0xac))/0x7*(-parseInt(_0x3edafe(0x94))/0x8)+-parseInt(_0x3edafe(0x98))/0x9+-parseInt(_0x3edafe(0xaf))/0xa*(-parseInt(_0x3edafe(0x7f))/0xb)+-parseInt(_0x3edafe(0x80))/0xc;if(_0x7719bc===_0x585555)break;else _0x446d61['push'](_0x446d61['shift']());}catch(_0x542ce5){_0x446d61['push'](_0x446d61['shift']());}}}(a64_0x4971,0x9676a));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a64_0x4971(){const _0x562b46=['No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','appCode','expect','length','Expectation\x20mismatch\x20at\x20extend.','3333VPkPQW','--patch-json','patch-json','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','200XjpQeQ','extend','datasetCode','\x20must\x20be\x20a\x20JSON\x20object','keys','Allowed\x20keys:\x20','7386sUxYAa','136696pkjRIP','stringify','parse','106330wQBfUa','tableName','Updated\x20dataset\x20extend\x20(','value','Unsupported\x20patch\x20key:\x20','code','data','hint','isArray','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','No\x20changes\x20for\x20dataset\x20extend','string','write','patch','str','message','77WEEhbp','11399376RzelTs','173124nACuzt','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','from','modelId','3176AexORi','dbId','datasetName','has','Patch\x20dataset\x20top-level\x20extend\x20safely','object','businessGroup','push','get','extend.','validation','sort','dbtableConfig','expect-json','\x20must\x20be\x20valid\x20JSON\x20object:\x20','376tkCGgz','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object',',\x20actual\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','2325393MrDdHK','join','326FmFeRP','shape'];a64_0x4971=function(){return _0x562b46;};return a64_0x4971();}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x3a7e30(0x8b),{'message':a64_0x3a7e30(0xb8),'hint':a64_0x3a7e30(0xa4)}]]);export function parseJsonObjectFlag(_0x4bf877,_0x4187bc){const _0x2a1e8a=a64_0x3a7e30;if(!_0x4bf877)return undefined;let _0x3028a3;try{_0x3028a3=JSON[_0x2a1e8a(0xae)](_0x4bf877);}catch(_0x854f){const _0x4dc10b=_0x854f instanceof Error?_0x854f[_0x2a1e8a(0x7e)]:String(_0x854f);throw CliErrors['validation'](_0x4187bc+_0x2a1e8a(0x93)+_0x4dc10b);}if(!isPlainObject(_0x3028a3)||Array[_0x2a1e8a(0xb7)](_0x3028a3))throw CliErrors['validation'](_0x4187bc+_0x2a1e8a(0xa8));return _0x3028a3;}export function validateExtendPatchKeys(_0x40b6e2){const _0x2a73c3=a64_0x3a7e30,_0x65ea38=Object[_0x2a73c3(0xa9)](_0x40b6e2);if(_0x65ea38['length']===0x0)throw CliErrors[_0x2a73c3(0x8f)](_0x2a73c3(0x97));for(const _0x6a4d35 of _0x65ea38){const _0x5b76a2=EXTEND_PATCH_REDIRECTS[_0x2a73c3(0x8d)](_0x6a4d35);if(_0x5b76a2)throw CliErrors[_0x2a73c3(0x8f)](_0x5b76a2['message'],_0x5b76a2[_0x2a73c3(0xb6)]);if(!MUTABLE_EXTEND_KEYS[_0x2a73c3(0x88)](_0x6a4d35))throw CliErrors[_0x2a73c3(0x8f)](_0x2a73c3(0xb3)+_0x6a4d35,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4075b5=a64_0x3a7e30,_0x27d8d3=Array[_0x4075b5(0x83)](MUTABLE_EXTEND_KEYS)[_0x4075b5(0x90)]();return _0x27d8d3[_0x4075b5(0x9f)]>0x0?_0x4075b5(0xaa)+_0x27d8d3[_0x4075b5(0x99)](',\x20'):_0x4075b5(0x9c);}export function applyExtendPatch(_0x134999,_0x55d957){const _0x65c58=a64_0x3a7e30;validateExtendPatchKeys(_0x55d957);const _0x156f73=deepClone(_0x134999),_0x315274=[];for(const [_0x19e0b3,_0x18d503]of Object['entries'](_0x55d957)){const _0x398ad4=_0x156f73[_0x19e0b3],_0x544c3e=deepClone(_0x18d503);!deepEqual(_0x398ad4,_0x544c3e)&&(_0x156f73[_0x19e0b3]=_0x544c3e,_0x315274[_0x65c58(0x8c)](_0x65c58(0x8e)+_0x19e0b3));}return _0x315274[_0x65c58(0x90)](),{'after':_0x156f73,'changedPaths':_0x315274,'changed':_0x315274['length']>0x0};}export function assertExpectation(_0x1efaba,_0xc402fd){const _0x5e48e5=a64_0x3a7e30;if(!_0xc402fd)return;for(const [_0x305041,_0x48865c]of Object['entries'](_0xc402fd)){const _0x445675=_0x1efaba[_0x305041];if(!deepEqual(_0x445675,_0x48865c))throw CliErrors[_0x5e48e5(0x8f)](_0x5e48e5(0xa0)+_0x305041,'Expected\x20'+JSON[_0x5e48e5(0xad)](_0x48865c)+_0x5e48e5(0x96)+JSON[_0x5e48e5(0xad)](_0x445675));}}export async function buildDatasetExtendUpdateResult({appCode:_0x496704,input:_0x36c7bc,dryRun:_0x52d381}){const _0x48b989=a64_0x3a7e30;validateInput(_0x36c7bc);const _0x226d51=await getDatasetDetail(_0x36c7bc[_0x48b989(0xb4)]),_0x36994b=parseDatasetExtend(_0x226d51[_0x48b989(0xa6)]),_0x3b8dbf=deepClone(_0x36994b[_0x48b989(0xb2)]);assertExpectation(_0x3b8dbf,_0x36c7bc[_0x48b989(0x9e)]);const {after:_0x53d951,changedPaths:_0x1a3fcf,changed:_0x31d1ab}=applyExtendPatch(_0x3b8dbf,_0x36c7bc[_0x48b989(0x7c)]),_0xd08ca=summarizeDataset(_0x226d51,_0x36c7bc[_0x48b989(0xb4)]);return _0x31d1ab&&!_0x52d381&&(_0x226d51[_0x48b989(0xa6)]=serializeDatasetExtend(_0x53d951,_0x36994b[_0x48b989(0x9b)]),await updateDrivenData(_0x226d51)),{'ok':!![],'data':{'appCode':_0x496704,'selector':{'code':_0x36c7bc[_0x48b989(0xb4)]},'dataset':_0xd08ca,'dryRun':_0x52d381,'changed':_0x31d1ab,'changedPaths':_0x1a3fcf,'before':{'extend':_0x3b8dbf},'after':{'extend':_0x53d951},'submitted':_0x31d1ab&&!_0x52d381},'message':_0x31d1ab?_0x52d381?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x1a3fcf[_0x48b989(0x99)](',\x20')+')':_0x48b989(0xb1)+_0x1a3fcf['join'](',\x20')+')':_0x48b989(0x79)};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':a64_0x3a7e30(0x89),'risk':a64_0x3a7e30(0x7b),'flags':[CODE_FLAG,{'name':a64_0x3a7e30(0xa3),'type':a64_0x3a7e30(0x7a),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a64_0x3a7e30(0x92),'type':a64_0x3a7e30(0x7a),'required':![],'description':a64_0x3a7e30(0x82)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x52557d){validateInput(readExtendUpdateInput(_0x52557d));},async 'dryRun'(_0x50770e){const _0x22e2f9=a64_0x3a7e30,_0x45577d=await buildDatasetExtendUpdateResult({'appCode':_0x50770e[_0x22e2f9(0x9d)],'input':readExtendUpdateInput(_0x50770e),'dryRun':!![]});return{'method':'POST','url':'/smartapi/dataset/update-driven-data','body':_0x45577d[_0x22e2f9(0xb5)],'description':_0x45577d[_0x22e2f9(0x7e)]};},async 'execute'(_0x2fec9c){return buildDatasetExtendUpdateResult({'appCode':_0x2fec9c['appCode'],'input':readExtendUpdateInput(_0x2fec9c),'dryRun':![]});}};function readExtendUpdateInput(_0x24552c){const _0x2acf56=a64_0x3a7e30,_0x1ebc39=trim(_0x24552c[_0x2acf56(0x7d)](_0x2acf56(0xb4))),_0xe2d26=parseJsonObjectFlag(_0x24552c[_0x2acf56(0x7d)](_0x2acf56(0xa3)),_0x2acf56(0xa2)),_0x27e257=parseJsonObjectFlag(_0x24552c['str'](_0x2acf56(0x92)),'--expect-json');return{'code':_0x1ebc39,'patch':_0xe2d26||{},'expect':_0x27e257};}function validateInput(_0x448041){const _0x1156b1=a64_0x3a7e30;if(!_0x448041[_0x1156b1(0xb4)])throw CliErrors['validation']('--code\x20is\x20required');validateExtendPatchKeys(_0x448041[_0x1156b1(0x7c)]);}function parseDatasetExtend(_0x41325a){const _0x28a094=a64_0x3a7e30;if(typeof _0x41325a==='string'){const _0x1d185e=_0x41325a['trim']();if(!_0x1d185e)return{'value':{},'shape':'string'};let _0x2fea65;try{_0x2fea65=JSON['parse'](_0x1d185e);}catch(_0x73a625){const _0x321fce=_0x73a625 instanceof Error?_0x73a625['message']:String(_0x73a625);throw CliErrors[_0x28a094(0x8f)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x321fce);}if(!isPlainObject(_0x2fea65)||Array['isArray'](_0x2fea65))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x2fea65,'shape':'string'};}if(_0x41325a===undefined||_0x41325a===null)return{'value':{},'shape':_0x28a094(0x7a)};if(!isPlainObject(_0x41325a)||Array[_0x28a094(0xb7)](_0x41325a))throw CliErrors[_0x28a094(0x8f)](_0x28a094(0x95));return{'value':_0x41325a,'shape':_0x28a094(0x8a)};}function serializeDatasetExtend(_0x5273f6,_0x28e0d3){const _0x3db361=a64_0x3a7e30;return _0x28e0d3===_0x3db361(0x7a)?JSON[_0x3db361(0xad)](_0x5273f6):_0x5273f6;}function summarizeDataset(_0x3e4c0c,_0x2a602e){const _0x60dd8e=a64_0x3a7e30,_0x3ca9db=isPlainObject(_0x3e4c0c['dataset'])?_0x3e4c0c['dataset']:{},_0x1ce0d4=isPlainObject(_0x3e4c0c[_0x60dd8e(0x91)])?_0x3e4c0c['dbtableConfig']:{};return{'id':_0x3e4c0c[_0x60dd8e(0x84)]??_0x3e4c0c['id']??_0x3ca9db['datasetId']??null,'code':_0x3e4c0c['modelCode']??_0x3e4c0c[_0x60dd8e(0xb4)]??_0x3ca9db[_0x60dd8e(0xa7)]??_0x2a602e,'name':_0x3e4c0c['name']??_0x3ca9db[_0x60dd8e(0x87)]??null,'table':_0x1ce0d4[_0x60dd8e(0xb0)]??_0x3ca9db[_0x60dd8e(0xb0)]??null,'db':_0x1ce0d4['dbName']??_0x1ce0d4[_0x60dd8e(0x86)]??null};}function a64_0xb30b(_0x1a7077,_0x4fe1a0){_0x1a7077=_0x1a7077-0x79;const _0x4971cb=a64_0x4971();let _0xb30b2=_0x4971cb[_0x1a7077];return _0xb30b2;}function deepClone(_0x5d5c43){const _0x4edb64=a64_0x3a7e30;if(_0x5d5c43===undefined)return _0x5d5c43;return JSON[_0x4edb64(0xae)](JSON[_0x4edb64(0xad)](_0x5d5c43));}function deepEqual(_0x2b1b95,_0x52c49d){const _0x1a9d58=a64_0x3a7e30;return JSON[_0x1a9d58(0xad)](_0x2b1b95)===JSON[_0x1a9d58(0xad)](_0x52c49d);}function isPlainObject(_0x4f3b50){const _0x1b61d0=a64_0x3a7e30;return Boolean(_0x4f3b50)&&typeof _0x4f3b50==='object'&&!Array[_0x1b61d0(0xb7)](_0x4f3b50);}function trim(_0x422bab){const _0x593d35=String(_0x422bab||'')['trim']();return _0x593d35;}
|