@lovrabet/rabetbase-cli 2.3.14-beta.1 → 2.3.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.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/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.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/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/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.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/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.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/save.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/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.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.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/copy-directory.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
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x355e4d,_0x49ce74){const _0x13efdd=a52_0x43f3,_0x5735a4=_0x355e4d();while(!![]){try{const _0x672ce0=parseInt(_0x13efdd(0x76))/0x1*(-parseInt(_0x13efdd(0x72))/0x2)+-parseInt(_0x13efdd(0x73))/0x3*(parseInt(_0x13efdd(0x74))/0x4)+parseInt(_0x13efdd(0x77))/0x5+parseInt(_0x13efdd(0x79))/0x6*(parseInt(_0x13efdd(0x75))/0x7)+parseInt(_0x13efdd(0x71))/0x8*(-parseInt(_0x13efdd(0x6f))/0x9)+-parseInt(_0x13efdd(0x78))/0xa+parseInt(_0x13efdd(0x70))/0xb;if(_0x672ce0===_0x49ce74)break;else _0x5735a4['push'](_0x5735a4['shift']());}catch(_0x8ccbc8){_0x5735a4['push'](_0x5735a4['shift']());}}}(a52_0x3f01,0xf3983));import{configListDefinition}from'../../commands/config/list.js';function a52_0x3f01(){const _0x4f482e=['2425180LRcuxQ','977000cuXKhg','30pvegCF','234GxQkgq','23767029MFiMbQ','454544PpVyeq','554yHDsHJ','1670910RDCTUB','12tmLJso','2420194JllKbm','472hvjnxW'];a52_0x3f01=function(){return _0x4f482e;};return a52_0x3f01();}function a52_0x43f3(_0xcc8bbf,_0x53b5b2){_0xcc8bbf=_0xcc8bbf-0x6f;const _0x3f0107=a52_0x3f01();let _0x43f3ef=_0x3f0107[_0xcc8bbf];return _0x43f3ef;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0xea505e=a53_0x6e33;(function(_0x37e9d6,_0x37dbd4){const _0x2a41fb=a53_0x6e33,_0x112bd6=_0x37e9d6();while(!![]){try{const _0x5a81af=parseInt(_0x2a41fb(0x157))/0x1+parseInt(_0x2a41fb(0x160))/0x2+-parseInt(_0x2a41fb(0x15c))/0x3*(parseInt(_0x2a41fb(0x161))/0x4)+-parseInt(_0x2a41fb(0x163))/0x5+parseInt(_0x2a41fb(0x167))/0x6*(-parseInt(_0x2a41fb(0x165))/0x7)+parseInt(_0x2a41fb(0x158))/0x8+parseInt(_0x2a41fb(0x15b))/0x9;if(_0x5a81af===_0x37dbd4)break;else _0x112bd6['push'](_0x112bd6['shift']());}catch(_0x1a4bb8){_0x112bd6['push'](_0x112bd6['shift']());}}}(a53_0x1e83,0xab174));function a53_0x1e83(){const _0x413781=['boolean','bool','265666REnRXU','4432OqHPLM','List\x20all\x20config\x20values','2878890EnBOMh','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','1222557QyzSiH','read','42tKtuMn','1234378IgszgU','10971056VLSVQn','global','config','8275482TQwBES','3138BqmNIP','list'];a53_0x1e83=function(){return _0x413781;};return a53_0x1e83();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x1af71b){const _0x96665f=a53_0x6e33,_0x4b4e25=_0x1af71b[_0x96665f(0x15f)](_0x96665f(0x159))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x4b4e25};}function a53_0x6e33(_0x4f9635,_0x1d72cd){_0x4f9635=_0x4f9635-0x157;const _0x1e8343=a53_0x1e83();let _0x6e33e7=_0x1e8343[_0x4f9635];return _0x6e33e7;}export const configListDefinition={'service':a53_0xea505e(0x15a),'command':a53_0xea505e(0x15d),'description':a53_0xea505e(0x162),'risk':a53_0xea505e(0x166),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0xea505e(0x159),'type':a53_0xea505e(0x15e),'description':a53_0xea505e(0x164),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x22758b=a54_0x1ca9;function a54_0x1ca9(_0x50d8eb,_0x3b95d0){_0x50d8eb=_0x50d8eb-0x119;const _0x1391ad=a54_0x1391();let _0x1ca9aa=_0x1391ad[_0x50d8eb];return _0x1ca9aa;}function a54_0x1391(){const _0x23e238=['Missing\x20key.','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','riskLevel','56993jstnYo','apps','str','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x22\x20is\x20not\x20settable.','14844511rCtVhc','app','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','locale','22455ZFwJNS','1692273rAzpNv','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','value','env','6OuzEdm','Invalid\x20value\x20for\x20\x22','key','config','6305089FkIaIk','Top-level\x20key\x20\x22','2390rXrwbV','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','boolean','\x20set\x20to:\x20','12yXdskT','appcode','24237hnvSTI','184Mdpbgy','set','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Config\x20value','object','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','includes','Usage:\x20','Invalid\x20locale\x20value.','length','Project','Missing\x20value.','222296zRxJoz','keys','`,\x20`','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','26tRHzdG','string','validation','write','Global','global','Settable\x20top-level\x20keys:\x20'];a54_0x1391=function(){return _0x23e238;};return a54_0x1391();}(function(_0x56b610,_0x81ecdf){const _0x2bb2ca=a54_0x1ca9,_0x34b1e9=_0x56b610();while(!![]){try{const _0x4f38af=parseInt(_0x2bb2ca(0x127))/0x1*(parseInt(_0x2bb2ca(0x11d))/0x2)+-parseInt(_0x2bb2ca(0x131))/0x3+parseInt(_0x2bb2ca(0x142))/0x4*(parseInt(_0x2bb2ca(0x130))/0x5)+-parseInt(_0x2bb2ca(0x135))/0x6*(-parseInt(_0x2bb2ca(0x139))/0x7)+parseInt(_0x2bb2ca(0x119))/0x8+parseInt(_0x2bb2ca(0x141))/0x9*(parseInt(_0x2bb2ca(0x13b))/0xa)+-parseInt(_0x2bb2ca(0x12c))/0xb*(parseInt(_0x2bb2ca(0x13f))/0xc);if(_0x4f38af===_0x81ecdf)break;else _0x34b1e9['push'](_0x34b1e9['shift']());}catch(_0x46aea3){_0x34b1e9['push'](_0x34b1e9['shift']());}}}(a54_0x1391,0x93f5c));import{CliErrors}from'../../errors.js';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';async function execute(_0x3b382f){const _0x1ecdf6=a54_0x1ca9,_0x350120=_0x3b382f['str']('key'),_0xfd0bd2=_0x3b382f[_0x1ecdf6(0x129)](_0x1ecdf6(0x133));if(!_0x350120)throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x124),_0x1ecdf6(0x149)+CLI_BIN_NAME+_0x1ecdf6(0x12a));if(_0xfd0bd2===undefined||_0xfd0bd2==='')throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x14d),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0xfd0bd2['length']>0x1f4)throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x11c));if(!isTopLevelConfigKey(_0x350120))throw CliErrors['validation'](_0x1ecdf6(0x13a)+_0x350120+_0x1ecdf6(0x12b),_0x1ecdf6(0x123)+getTopLevelConfigKeySummary());if(_0x350120===_0x1ecdf6(0x126))throw CliErrors[_0x1ecdf6(0x11f)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x350120]&&!CONFIG_ENUM_VALUES[_0x350120][_0x1ecdf6(0x148)](_0xfd0bd2))throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x136)+_0x350120+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x350120]['join'](',\x20'));if(_0x350120==='locale'&&!normalizeLocale(_0xfd0bd2))throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x14a),_0x1ecdf6(0x132));const _0x5175db={'global':_0x3b382f['bool'](_0x1ecdf6(0x122))},_0x31638e=resolveWriteScope(_0x5175db),_0x56aad1=readScopedConfig(_0x31638e);let _0x74044d=_0x350120,_0xcb705b=_0xfd0bd2;_0x350120===_0x1ecdf6(0x12d)&&(_0x74044d=_0x1ecdf6(0x140),delete _0x56aad1[_0x1ecdf6(0x12d)]);_0x350120===_0x1ecdf6(0x12f)&&(_0xcb705b=normalizeLocale(_0xfd0bd2));if(_0x350120===_0x1ecdf6(0x134)){_0xcb705b=normalizeEnv(_0xfd0bd2);if(!isProduction(_0xcb705b)&&!isDaily(_0xcb705b))throw CliErrors[_0x1ecdf6(0x11f)](_0x1ecdf6(0x144),_0x1ecdf6(0x12e));}if(_0x350120===_0x1ecdf6(0x140)){const _0xd95886=_0x56aad1[_0x1ecdf6(0x128)]&&typeof _0x56aad1['apps']===_0x1ecdf6(0x146)?Object[_0x1ecdf6(0x11a)](_0x56aad1[_0x1ecdf6(0x128)]):[];if(_0xd95886[_0x1ecdf6(0x14b)]>0x0)throw CliErrors['validation'](_0x1ecdf6(0x13c),'Use\x20`'+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0xcb705b+_0x1ecdf6(0x11b)+CLI_BIN_NAME+_0x1ecdf6(0x147));const _0x170478=buildCanonicalProjectConfig({..._0x56aad1},{'appCodes':[_0xcb705b],'env':typeof _0x56aad1['env']===_0x1ecdf6(0x11e)?_0x56aad1['env']:undefined});writeScopedConfig(_0x170478,_0x31638e);const _0x3f94ca=_0x31638e==='global'?'Global':_0x1ecdf6(0x14c);return{'ok':!![],'message':'✓\x20'+_0x3f94ca+'\x20appcode\x20set\x20to:\x20'+_0xcb705b+_0x1ecdf6(0x125)};}_0x56aad1[_0x74044d]=_0xcb705b,writeScopedConfig(_0x56aad1,_0x31638e);const _0x30637d=_0x31638e==='global'?_0x1ecdf6(0x121):_0x1ecdf6(0x14c);return{'ok':!![],'message':'✓\x20'+_0x30637d+'\x20'+_0x74044d+_0x1ecdf6(0x13e)+_0xcb705b};}export const configSetDefinition={'service':a54_0x22758b(0x138),'command':a54_0x22758b(0x143),'description':'Set\x20a\x20config\x20value','risk':a54_0x22758b(0x120),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x22758b(0x137),'type':a54_0x22758b(0x11e),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a54_0x22758b(0x145),'required':!![]},{'name':'global','type':a54_0x22758b(0x13d),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d0278,_0x2b9136){var _0x24f22d=a55_0x4873,_0x106e55=_0x1d0278();while(!![]){try{var _0x211063=-parseInt(_0x24f22d(0x1a4))/0x1*(parseInt(_0x24f22d(0x1a8))/0x2)+-parseInt(_0x24f22d(0x1b4))/0x3*(-parseInt(_0x24f22d(0x1ac))/0x4)+-parseInt(_0x24f22d(0x1ad))/0x5*(parseInt(_0x24f22d(0x1a6))/0x6)+parseInt(_0x24f22d(0x1b1))/0x7+-parseInt(_0x24f22d(0x1a5))/0x8+parseInt(_0x24f22d(0x1ae))/0x9*(parseInt(_0x24f22d(0x1ab))/0xa)+-parseInt(_0x24f22d(0x1aa))/0xb*(parseInt(_0x24f22d(0x1a9))/0xc);if(_0x211063===_0x2b9136)break;else _0x106e55['push'](_0x106e55['shift']());}catch(_0xd62a17){_0x106e55['push'](_0x106e55['shift']());}}}(a55_0xdc35,0x7eb8d));function a55_0xdc35(){var _0x33c423=['49821hjPDTK','245198AnLXJa','1350408rxvLpy','815022sbVRRh','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','4OBVnsG','12YSrNox','4050211jEpOMa','10WnutAV','196EoLgwl','15fFwKZY','5825997NUHaAN','global','project','3450202FzeWaN','validation','\x20init`\x20first.'];a55_0xdc35=function(){return _0x33c423;};return a55_0xdc35();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a55_0x4873(_0x8a741c,_0x3c7878){_0x8a741c=_0x8a741c-0x1a4;var _0xdc355e=a55_0xdc35();var _0x4873b4=_0xdc355e[_0x8a741c];return _0x4873b4;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x31fa86){var _0x45aaa7=a55_0x4873;if(_0x31fa86[_0x45aaa7(0x1af)])return _0x45aaa7(0x1af);if(!isInProject())throw CliErrors[_0x45aaa7(0x1b2)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x45aaa7(0x1a7)+CLI_BIN_NAME+_0x45aaa7(0x1b3));return _0x45aaa7(0x1b0);}export function readScopedConfig(_0x225e72){return readConfigFile(resolveWriteConfigPath(_0x225e72));}export function writeScopedConfig(_0x49ca38,_0x59d9ab){writeConfigFile(resolveWriteConfigPath(_0x59d9ab),_0x49ca38);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x12082f=a56_0x532a;(function(_0x3bbb7d,_0x5cc595){const _0x3973d4=a56_0x532a,_0x1e9dc0=_0x3bbb7d();while(!![]){try{const _0x53af62=-parseInt(_0x3973d4(0xd9))/0x1*(parseInt(_0x3973d4(0xe1))/0x2)+-parseInt(_0x3973d4(0xe2))/0x3+parseInt(_0x3973d4(0xe0))/0x4*(parseInt(_0x3973d4(0xe7))/0x5)+parseInt(_0x3973d4(0xe5))/0x6*(parseInt(_0x3973d4(0xdf))/0x7)+parseInt(_0x3973d4(0xe4))/0x8+parseInt(_0x3973d4(0xd8))/0x9*(-parseInt(_0x3973d4(0xdb))/0xa)+parseInt(_0x3973d4(0xdc))/0xb;if(_0x53af62===_0x5cc595)break;else _0x1e9dc0['push'](_0x1e9dc0['shift']());}catch(_0xe57fc9){_0x1e9dc0['push'](_0x1e9dc0['shift']());}}}(a56_0x3e15,0x53309));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x12082f(0xdd),'operation':'filter','description':a56_0x12082f(0xe6),'paramsRequired':![],'paramsHint':a56_0x12082f(0xe8),'helpExtra':[a56_0x12082f(0xd7),a56_0x12082f(0xda),'\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]',a56_0x12082f(0xe3),a56_0x12082f(0xde),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page']['join']('\x0a')});function a56_0x532a(_0x227d21,_0x327cf0){_0x227d21=_0x227d21-0xd7;const _0x3e157f=a56_0x3e15();let _0x532aa7=_0x3e157f[_0x227d21];return _0x532aa7;}function a56_0x3e15(){const _0x228e2e=['\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}]','1525016xgsLIL','6PtQyQX','Filter\x20dataset\x20records\x20with\x20query\x20conditions','14465aUHwwy','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','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','9hSAVrh','78296kpCimM','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','5265340nMadNk','1097580kfOFly','filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','2559144yLkFDv','584QxRyvp','4IabYqH','163518ykCuIj'];a56_0x3e15=function(){return _0x228e2e;};return a56_0x3e15();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x3bcc14=a57_0x2e4b;function a57_0x2e4b(_0x5652c0,_0x569c94){_0x5652c0=_0x5652c0-0x153;const _0x291f1e=a57_0x291f();let _0x2e4bb7=_0x291f1e[_0x5652c0];return _0x2e4bb7;}(function(_0x35c162,_0x210e68){const _0x3ca516=a57_0x2e4b,_0x5e931b=_0x35c162();while(!![]){try{const _0x1d6a2e=parseInt(_0x3ca516(0x154))/0x1*(-parseInt(_0x3ca516(0x157))/0x2)+parseInt(_0x3ca516(0x156))/0x3+-parseInt(_0x3ca516(0x15d))/0x4+parseInt(_0x3ca516(0x15b))/0x5+-parseInt(_0x3ca516(0x159))/0x6*(-parseInt(_0x3ca516(0x15c))/0x7)+-parseInt(_0x3ca516(0x15a))/0x8+parseInt(_0x3ca516(0x153))/0x9*(parseInt(_0x3ca516(0x155))/0xa);if(_0x1d6a2e===_0x210e68)break;else _0x5e931b['push'](_0x5e931b['shift']());}catch(_0x44132f){_0x5e931b['push'](_0x5e931b['shift']());}}}(a57_0x291f,0xb0adb));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x3bcc14(0x15e),'operation':a57_0x3bcc14(0x15e),'description':a57_0x3bcc14(0x158),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});function a57_0x291f(){const _0x56a0d9=['6123278mTKBLv','1864132oSiRjf','getOne','8559ADpMRg','9kgqkkF','18470PcqMEi','1928481PzCZws','291372YoDaQU','Get\x20a\x20single\x20record\x20by\x20ID','6vuCeiU','9984608DhNXeC','2374400aUfOQv'];a57_0x291f=function(){return _0x56a0d9;};return a57_0x291f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x2799(){const _0x4e04be=['949357GTmOVe','1071636JrdEXc','16204914WbEnug','495030wTRMhB','4698320rpPEwg','9xAkIjb','7NrvmHD','6289610XZiwPm','1302292jCSpzI','5JEkTjy','2grsbbZ'];a58_0x2799=function(){return _0x4e04be;};return a58_0x2799();}function a58_0x5528(_0x32381a,_0x1e11a9){_0x32381a=_0x32381a-0x94;const _0x2799fa=a58_0x2799();let _0x552809=_0x2799fa[_0x32381a];return _0x552809;}(function(_0x4e9e82,_0x4b54a5){const _0x2cc8bd=a58_0x5528,_0x583678=_0x4e9e82();while(!![]){try{const _0x37fbee=parseInt(_0x2cc8bd(0x95))/0x1*(parseInt(_0x2cc8bd(0x94))/0x2)+-parseInt(_0x2cc8bd(0x98))/0x3+parseInt(_0x2cc8bd(0x9d))/0x4*(-parseInt(_0x2cc8bd(0x9e))/0x5)+-parseInt(_0x2cc8bd(0x96))/0x6*(parseInt(_0x2cc8bd(0x9b))/0x7)+-parseInt(_0x2cc8bd(0x99))/0x8+-parseInt(_0x2cc8bd(0x9a))/0x9*(parseInt(_0x2cc8bd(0x9c))/0xa)+parseInt(_0x2cc8bd(0x97))/0xb;if(_0x37fbee===_0x4b54a5)break;else _0x583678['push'](_0x583678['shift']());}catch(_0x8a22ad){_0x583678['push'](_0x583678['shift']());}}}(a58_0x2799,0x83203));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fbf3e,_0x15a02f){const _0x316977=a59_0x4e59,_0x23f461=_0x1fbf3e();while(!![]){try{const _0x17552a=-parseInt(_0x316977(0xb4))/0x1+-parseInt(_0x316977(0xaf))/0x2*(parseInt(_0x316977(0xb5))/0x3)+-parseInt(_0x316977(0x9d))/0x4+-parseInt(_0x316977(0xb7))/0x5*(parseInt(_0x316977(0xa3))/0x6)+-parseInt(_0x316977(0xb2))/0x7+parseInt(_0x316977(0xa6))/0x8+-parseInt(_0x316977(0x9c))/0x9*(-parseInt(_0x316977(0xa5))/0xa);if(_0x17552a===_0x15a02f)break;else _0x23f461['push'](_0x23f461['shift']());}catch(_0x472fd0){_0x23f461['push'](_0x23f461['shift']());}}}(a59_0xcd94,0xd3c58));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0xcd94(){const _0x2a6d44=['2247091ecPxig','data\x20','184235LRajzD','111003QEdPzO','operation','890EzZXNV','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','23060502QxBZId','2665404aADIdw','command','\x20completed\x20in\x20','string','data','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','25764OTDVyE','compress','10VdrIwK','11104800XInArU','appCode','str','paramsHint','getOne','paramsRequired','flagMissing','read','params','62hdHLuw','now','alias'];a59_0xcd94=function(){return _0x2a6d44;};return a59_0xcd94();}import{CliErrors}from'../../errors.js';function a59_0x4e59(_0x57183c,_0x3ed56e){_0x57183c=_0x57183c-0x9c;const _0xcd9440=a59_0xcd94();let _0x4e5971=_0xcd9440[_0x57183c];return _0x4e5971;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4ea2a9){const _0x254ad5=a59_0x4e59;if(!_0x4ea2a9)throw CliErrors[_0x254ad5(0xac)]('params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x3cf57e=_0x4ea2a9['id'];if(_0x3cf57e===undefined||_0x3cf57e===null||_0x3cf57e==='')throw CliErrors['validation']('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x254ad5(0xb8));}function parseCommandParams(_0x2321ca){return parseJsonParams(_0x2321ca)??{};}export function buildDataCommand(_0x202710){const _0x5adef5=a59_0x4e59,_0x400a25=_0x5adef5(0xa2);return{'service':_0x5adef5(0xa1),'command':_0x202710[_0x5adef5(0x9e)],'description':_0x202710['description'],'risk':_0x5adef5(0xad),'defaultOutputFormat':_0x5adef5(0xa4),'helpExtra':_0x202710['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x5adef5(0xb1),'type':_0x5adef5(0xa0),'description':_0x400a25},{'name':_0x5adef5(0xae),'type':_0x5adef5(0xa0),'description':_0x202710[_0x5adef5(0xa9)]}],async 'validate'(_0x4f396d){const _0x2d1621=_0x5adef5,_0x131230=_0x4f396d[_0x2d1621(0xa8)]('params');if(_0x202710[_0x2d1621(0xab)]&&!_0x131230)throw CliErrors[_0x2d1621(0xac)](_0x2d1621(0xae),_0x202710[_0x2d1621(0xa9)]);const _0x25e92c=parseJsonParams(_0x131230);_0x202710[_0x2d1621(0xb6)]===_0x2d1621(0xaa)&&assertGetOneId(_0x25e92c);},async 'execute'(_0x8b33b7){const _0x570094=_0x5adef5,_0xa9eea9=parseCommandParams(_0x8b33b7[_0x570094(0xa8)]('params')),_0x2a46cd=Date[_0x570094(0xb0)](),_0x58c71a=await executeDatasetDataOperation(_0x8b33b7[_0x570094(0xa7)],_0x8b33b7[_0x570094(0xa8)]('code'),_0x202710[_0x570094(0xb6)],_0xa9eea9),_0x1391db=Date[_0x570094(0xb0)]()-_0x2a46cd;return{'ok':!![],'data':{'result':_0x58c71a,'elapsed':_0x1391db},'message':_0x570094(0xb3)+_0x202710[_0x570094(0x9e)]+_0x570094(0x9f)+_0x1391db+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a60_0x24f1ca=a60_0x251f;(function(_0x3a9a9b,_0x539279){const _0x453997=a60_0x251f,_0x499488=_0x3a9a9b();while(!![]){try{const _0x42607c=parseInt(_0x453997(0x72))/0x1*(-parseInt(_0x453997(0x7e))/0x2)+parseInt(_0x453997(0x96))/0x3+parseInt(_0x453997(0x92))/0x4+-parseInt(_0x453997(0x91))/0x5*(parseInt(_0x453997(0x9d))/0x6)+-parseInt(_0x453997(0xa1))/0x7+parseInt(_0x453997(0xa4))/0x8+parseInt(_0x453997(0xa0))/0x9*(parseInt(_0x453997(0x8f))/0xa);if(_0x42607c===_0x539279)break;else _0x499488['push'](_0x499488['shift']());}catch(_0x24d605){_0x499488['push'](_0x499488['shift']());}}}(a60_0x2b95,0x78c6e));function a60_0x2b95(){const _0x5974b5=['extend','modelId','call','sourceType','datasetId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20','number','dbtableConfig','found','Expectation\x20mismatch\x20at\x20businessGroup','unchanged','2577TRfXun','METADATA','validation','apiError','str','code','data','isFinite','business-group-update','matched','/smartapi/question/er-config/business-group/edit','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','154cpQTnM','trim','message','expect-business-group','backend','expectBusinessGroup','hasOwnProperty','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','length','appCode','stringify','datasetName','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','object','dataset','businessGroup',',\x20actual\x20','20zdtiyP','modelCode','71905pNZnEd','2565524jDrWdn','datasetCode','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','name','1226472WuKSKL','write','parse','string','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','DB_TABLE','source','102vRYBQo','business-group','isArray','1523331WSPaoZ','6701870NCKQmw','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','4050360yjoObH','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.'];a60_0x2b95=function(){return _0x5974b5;};return a60_0x2b95();}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=a60_0x24f1ca(0x7c);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x6126a,input:_0x14f15d,dryRun:_0x38cfa5}){const _0x2f5777=a60_0x24f1ca;validateInput(_0x14f15d);const _0x3d7cfc=normalizeBusinessGroup(_0x14f15d[_0x2f5777(0x8d)]),_0x3d6f16=await getDatasetDetail(_0x14f15d[_0x2f5777(0x77)]),_0x5d1f6c=resolveBusinessGroupDataset(_0x3d6f16,_0x14f15d['code']),_0x17bc44=loadCurrentBusinessGroup(_0x3d6f16,_0x5d1f6c);assertExpectedBusinessGroup(_0x17bc44,_0x14f15d[_0x2f5777(0x83)]);const _0x5aec1f=buildBackendPayload(_0x6126a,_0x5d1f6c,_0x3d7cfc),_0x2e7528=_0x17bc44!==_0x3d7cfc;let _0x2625b6;if(_0x2e7528&&!_0x38cfa5){await updateErBusinessGroup(_0x5aec1f);const _0x554617=await getDatasetDetail(_0x5d1f6c[_0x2f5777(0x77)]),_0xed7dfb=resolveBusinessGroupDataset(_0x554617,_0x5d1f6c[_0x2f5777(0x77)]),_0x381bf7=loadCurrentBusinessGroup(_0x554617,_0xed7dfb);if(_0x381bf7!==_0x3d7cfc)throw CliErrors[_0x2f5777(0x75)](_0x2f5777(0x6b),_0x2f5777(0x6c)+JSON[_0x2f5777(0x88)](_0x3d7cfc)+_0x2f5777(0x8e)+JSON['stringify'](_0x381bf7)+'.');_0x2625b6={'verified':!![],'status':_0x2f5777(0x7b),'afterReadback':{'businessGroup':_0x381bf7}};}else!_0x2e7528&&(_0x2625b6={'verified':!![],'status':_0x2f5777(0x71),'afterReadback':{'businessGroup':_0x17bc44}});const _0x412cdd={'operation':'update','appCode':_0x6126a,'selector':{'code':_0x5d1f6c[_0x2f5777(0x77)]},'dataset':_0x5d1f6c,'before':{'businessGroup':_0x17bc44},'after':{'businessGroup':_0x3d7cfc},'changed':_0x2e7528,'dryRun':_0x38cfa5,'submitted':_0x2e7528&&!_0x38cfa5,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x5aec1f},..._0x2625b6?{'verification':_0x2625b6}:{},'warnings':[]};return{'ok':!![],'data':_0x412cdd,'message':_0x2e7528?_0x38cfa5?_0x2f5777(0x9a)+_0x5d1f6c[_0x2f5777(0x77)]:_0x2f5777(0x7d)+_0x5d1f6c[_0x2f5777(0x77)]:_0x2f5777(0x8a)+_0x5d1f6c[_0x2f5777(0x77)]};}export const datasetBusinessGroupUpdate={'service':a60_0x24f1ca(0x8c),'command':a60_0x24f1ca(0x7a),'description':'Update\x20business\x20scenario\x20group','risk':a60_0x24f1ca(0x97),'flags':[CODE_FLAG,{'name':a60_0x24f1ca(0x9e),'type':a60_0x24f1ca(0x99),'required':!![],'description':a60_0x24f1ca(0x85)},{'name':a60_0x24f1ca(0x81),'type':a60_0x24f1ca(0x99),'required':![],'description':a60_0x24f1ca(0xa3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x171680){validateInput(readBusinessGroupUpdateInput(_0x171680));},async 'dryRun'(_0x8124ae){const _0x282801=a60_0x24f1ca,_0x2f156c=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x8124ae[_0x282801(0x87)],'input':readBusinessGroupUpdateInput(_0x8124ae),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x2f156c[_0x282801(0x78)][_0x282801(0x82)]['payload'],'description':_0x2f156c[_0x282801(0x80)],..._0x2f156c[_0x282801(0x78)]};},async 'execute'(_0x418f5f){const _0x2cec18=a60_0x24f1ca;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x418f5f[_0x2cec18(0x87)],'input':readBusinessGroupUpdateInput(_0x418f5f),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x314df6){const _0x25b1f1=a60_0x24f1ca,_0x47e652=_0x314df6[_0x25b1f1(0x76)](_0x25b1f1(0x81));return{'code':trim(_0x314df6['str'](_0x25b1f1(0x77))),'businessGroup':_0x314df6['str'](_0x25b1f1(0x9e)),'expectBusinessGroup':_0x47e652===undefined||_0x47e652===''?undefined:_0x47e652};}function validateInput(_0xe6f865){const _0x15ddd9=a60_0x24f1ca;if(!trim(_0xe6f865['code']))throw CliErrors[_0x15ddd9(0x74)]('--code\x20is\x20required');if(_0xe6f865[_0x15ddd9(0x8d)]===undefined)throw CliErrors[_0x15ddd9(0x74)]('--business-group\x20is\x20required');}function a60_0x251f(_0x357853,_0x241e23){_0x357853=_0x357853-0x6b;const _0x2b9562=a60_0x2b95();let _0x251f4a=_0x2b9562[_0x357853];return _0x251f4a;}function resolveBusinessGroupDataset(_0x42f5dd,_0x43816d){const _0x12a81d=a60_0x24f1ca,_0x33b759=asPlainObject(_0x42f5dd['dataset']),_0x5572e7=asPlainObject(_0x42f5dd[_0x12a81d(0x6e)]),_0xedb023=resolveSourceType(_0x42f5dd,_0x33b759,_0x5572e7),_0x112329=firstString(_0x42f5dd[_0x12a81d(0x90)],_0x42f5dd[_0x12a81d(0x77)],_0x33b759[_0x12a81d(0x93)],_0x43816d)||_0x43816d;return{'id':firstNumber(_0x42f5dd[_0x12a81d(0xa7)],_0x42f5dd['id'],_0x33b759[_0x12a81d(0xaa)])??firstString(_0x42f5dd[_0x12a81d(0xa7)],_0x42f5dd['id'],_0x33b759[_0x12a81d(0xaa)])??null,'code':_0x112329,'name':firstString(_0x42f5dd[_0x12a81d(0x95)],_0x33b759[_0x12a81d(0x89)],_0x33b759[_0x12a81d(0x95)])||null,'sourceType':_0xedb023};}function resolveSourceType(_0x51c0a6,_0x3b5cbb,_0x6084a){const _0x38fb02=a60_0x24f1ca,_0x41e570=firstString(_0x51c0a6[_0x38fb02(0x9c)],_0x51c0a6[_0x38fb02(0xa9)],_0x3b5cbb[_0x38fb02(0x9c)],_0x3b5cbb[_0x38fb02(0xa9)])?.[_0x38fb02(0x7f)]()['toUpperCase']();if(_0x41e570===_0x38fb02(0x9b)||_0x41e570===_0x38fb02(0x73))return _0x41e570;if(Object['keys'](_0x6084a)[_0x38fb02(0x86)]>0x0)return'DB_TABLE';throw CliErrors[_0x38fb02(0x74)](_0x38fb02(0xa2));}function loadCurrentBusinessGroup(_0x3b4c51,_0x3673d1){const _0x1ec91d=a60_0x24f1ca,_0x47d212=readBusinessGroupFromDatasetDetail(_0x3b4c51,_0x3673d1['sourceType']);if(_0x47d212['found'])return normalizeBusinessGroup(_0x47d212['value']);if(_0x3673d1[_0x1ec91d(0xa9)]===_0x1ec91d(0x73))return'';throw CliErrors['validation'](_0x1ec91d(0xa5),_0x1ec91d(0x94));}function readBusinessGroupFromDatasetDetail(_0x433a7d,_0x53efc8){const _0x26a884=a60_0x24f1ca,_0x30c6ab=asPlainObject(_0x433a7d[_0x26a884(0x8c)]),_0x500b79=firstPresent(_0x433a7d[_0x26a884(0x8d)]);if(_0x500b79[_0x26a884(0x6f)])return _0x500b79;const _0x53ae68=firstPresent(_0x30c6ab['businessGroup']);if(_0x53ae68['found'])return _0x53ae68;if(_0x53efc8===_0x26a884(0x9b))return{'found':![]};const _0x48aa44=readBusinessGroupFromExtend(_0x433a7d['extend']);if(_0x48aa44[_0x26a884(0x6f)])return _0x48aa44;return readBusinessGroupFromExtend(_0x30c6ab[_0x26a884(0xa6)]);}function readBusinessGroupFromExtend(_0x248350){const _0x2f03ac=a60_0x24f1ca;if(_0x248350===undefined||_0x248350===null||_0x248350==='')return{'found':![]};if(typeof _0x248350===_0x2f03ac(0x99))try{const _0x212077=JSON[_0x2f03ac(0x98)](_0x248350);return readBusinessGroupFromExtend(_0x212077);}catch{return{'found':![]};}const _0x2aab8d=asPlainObject(_0x248350);if(Object['prototype'][_0x2f03ac(0x84)][_0x2f03ac(0xa8)](_0x2aab8d,_0x2f03ac(0x8d)))return{'found':!![],'value':_0x2aab8d[_0x2f03ac(0x8d)]};return{'found':![]};}function firstPresent(..._0x5d4a61){for(const _0xb35328 of _0x5d4a61){if(_0xb35328!==undefined&&_0xb35328!==null)return{'found':!![],'value':_0xb35328};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1704ed,_0x28892f){const _0x55ea12=a60_0x24f1ca;if(_0x28892f===undefined)return;const _0x15b1bb=normalizeBusinessGroup(_0x28892f);if(_0x1704ed!==_0x15b1bb)throw CliErrors[_0x55ea12(0x74)](_0x55ea12(0x70),_0x55ea12(0x6c)+JSON[_0x55ea12(0x88)](_0x15b1bb)+_0x55ea12(0x8e)+JSON['stringify'](_0x1704ed));}function buildBackendPayload(_0x51463a,_0x186ce1,_0x592227){const _0x3897d8=a60_0x24f1ca;return{'appCode':_0x51463a,'datasetCode':_0x186ce1[_0x3897d8(0x77)],'businessGroup':_0x592227};}function normalizeBusinessGroup(_0xec816c){const _0x12cbd0=a60_0x24f1ca;if(_0xec816c===undefined||_0xec816c===null)return'';return String(_0xec816c)[_0x12cbd0(0x7f)]();}function asPlainObject(_0x263ddf){const _0x59656a=a60_0x24f1ca;if(!_0x263ddf||typeof _0x263ddf!==_0x59656a(0x8b)||Array[_0x59656a(0x9f)](_0x263ddf))return{};return _0x263ddf;}function firstString(..._0x25eb22){const _0x5bcb22=a60_0x24f1ca;for(const _0x744b40 of _0x25eb22){if(typeof _0x744b40===_0x5bcb22(0x99)&&_0x744b40[_0x5bcb22(0x7f)]())return _0x744b40[_0x5bcb22(0x7f)]();if(typeof _0x744b40===_0x5bcb22(0x6d)&&Number[_0x5bcb22(0x79)](_0x744b40))return String(_0x744b40);}return undefined;}function firstNumber(..._0x922c5e){const _0x27dcb4=a60_0x24f1ca;for(const _0x47133c of _0x922c5e){if(typeof _0x47133c===_0x27dcb4(0x6d)&&Number['isFinite'](_0x47133c))return _0x47133c;if(typeof _0x47133c==='string'&&_0x47133c[_0x27dcb4(0x7f)]()&&Number[_0x27dcb4(0x79)](Number(_0x47133c)))return Number(_0x47133c);}return null;}function trim(_0x15fa91){const _0x652e0b=a60_0x24f1ca;return String(_0x15fa91||'')[_0x652e0b(0x7f)]();}
|
|
1
|
+
const a60_0x33c330=a60_0x4160;(function(_0x40a42b,_0x8acf86){const _0x2ce5b1=a60_0x4160,_0x30a716=_0x40a42b();while(!![]){try{const _0x136362=parseInt(_0x2ce5b1(0x146))/0x1*(parseInt(_0x2ce5b1(0x11e))/0x2)+parseInt(_0x2ce5b1(0x11d))/0x3*(parseInt(_0x2ce5b1(0x12f))/0x4)+-parseInt(_0x2ce5b1(0x118))/0x5*(parseInt(_0x2ce5b1(0x14c))/0x6)+parseInt(_0x2ce5b1(0x13b))/0x7+parseInt(_0x2ce5b1(0x12c))/0x8*(parseInt(_0x2ce5b1(0x127))/0x9)+parseInt(_0x2ce5b1(0x12a))/0xa*(-parseInt(_0x2ce5b1(0x14b))/0xb)+parseInt(_0x2ce5b1(0x142))/0xc;if(_0x136362===_0x8acf86)break;else _0x30a716['push'](_0x30a716['shift']());}catch(_0xe43b92){_0x30a716['push'](_0x30a716['shift']());}}}(a60_0xb60b,0x221d4));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=a60_0x33c330(0x11f);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x9331a9,input:_0x16bb99,dryRun:_0x4fc97b}){const _0x2dfdab=a60_0x33c330;validateInput(_0x16bb99);const _0x3fc5d4=normalizeBusinessGroup(_0x16bb99['businessGroup']),_0x31d44c=await getDatasetDetail(_0x16bb99[_0x2dfdab(0x13a)]),_0x3ebee1=resolveBusinessGroupDataset(_0x31d44c,_0x16bb99[_0x2dfdab(0x13a)]),_0x1853ac=loadCurrentBusinessGroup(_0x31d44c,_0x3ebee1);assertExpectedBusinessGroup(_0x1853ac,_0x16bb99[_0x2dfdab(0x14e)]);const _0x423864=buildBackendPayload(_0x9331a9,_0x3ebee1,_0x3fc5d4),_0x5dc545=_0x1853ac!==_0x3fc5d4;let _0x4814a0;if(_0x5dc545&&!_0x4fc97b){await updateErBusinessGroup(_0x423864);const _0x2cf859=await getDatasetDetail(_0x3ebee1['code']),_0x42675f=resolveBusinessGroupDataset(_0x2cf859,_0x3ebee1[_0x2dfdab(0x13a)]),_0x4495e3=loadCurrentBusinessGroup(_0x2cf859,_0x42675f);if(_0x4495e3!==_0x3fc5d4)throw CliErrors[_0x2dfdab(0x124)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x2dfdab(0x114)+JSON[_0x2dfdab(0x130)](_0x3fc5d4)+_0x2dfdab(0x11a)+JSON[_0x2dfdab(0x130)](_0x4495e3)+'.');_0x4814a0={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x4495e3}};}else!_0x5dc545&&(_0x4814a0={'verified':!![],'status':_0x2dfdab(0x144),'afterReadback':{'businessGroup':_0x1853ac}});const _0x50e135={'operation':_0x2dfdab(0x13e),'appCode':_0x9331a9,'selector':{'code':_0x3ebee1[_0x2dfdab(0x13a)]},'dataset':_0x3ebee1,'before':{'businessGroup':_0x1853ac},'after':{'businessGroup':_0x3fc5d4},'changed':_0x5dc545,'dryRun':_0x4fc97b,'submitted':_0x5dc545&&!_0x4fc97b,'backend':{'method':_0x2dfdab(0x129),'path':BACKEND_PATH,'payload':_0x423864},..._0x4814a0?{'verification':_0x4814a0}:{},'warnings':[]};return{'ok':!![],'data':_0x50e135,'message':_0x5dc545?_0x4fc97b?_0x2dfdab(0x12e)+_0x3ebee1[_0x2dfdab(0x13a)]:_0x2dfdab(0x120)+_0x3ebee1[_0x2dfdab(0x13a)]:_0x2dfdab(0x132)+_0x3ebee1['code']};}export const datasetBusinessGroupUpdate={'service':a60_0x33c330(0x128),'command':a60_0x33c330(0x141),'description':a60_0x33c330(0x122),'risk':a60_0x33c330(0x119),'flags':[CODE_FLAG,{'name':a60_0x33c330(0x151),'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':a60_0x33c330(0x133),'type':a60_0x33c330(0x14f),'required':![],'description':a60_0x33c330(0x117)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f33bd){validateInput(readBusinessGroupUpdateInput(_0x2f33bd));},async 'dryRun'(_0x7341ed){const _0x353f9f=a60_0x33c330,_0x30accf=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x7341ed[_0x353f9f(0x14d)],'input':readBusinessGroupUpdateInput(_0x7341ed),'dryRun':!![]});return{'method':_0x353f9f(0x129),'url':BACKEND_PATH,'body':_0x30accf[_0x353f9f(0x131)]['backend'][_0x353f9f(0x134)],'description':_0x30accf[_0x353f9f(0x150)],..._0x30accf[_0x353f9f(0x131)]};},async 'execute'(_0x35cbd9){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x35cbd9['appCode'],'input':readBusinessGroupUpdateInput(_0x35cbd9),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5426ba){const _0x42fbbf=a60_0x33c330,_0x6ced9b=_0x5426ba[_0x42fbbf(0x137)]('expect-business-group');return{'code':trim(_0x5426ba[_0x42fbbf(0x137)](_0x42fbbf(0x13a))),'businessGroup':_0x5426ba['str'](_0x42fbbf(0x151)),'expectBusinessGroup':_0x6ced9b===undefined||_0x6ced9b===''?undefined:_0x6ced9b};}function validateInput(_0x51917c){const _0x559771=a60_0x33c330;if(!trim(_0x51917c['code']))throw CliErrors[_0x559771(0x12b)](_0x559771(0x138));if(_0x51917c['businessGroup']===undefined)throw CliErrors['validation'](_0x559771(0x139));}function resolveBusinessGroupDataset(_0x3b7078,_0x4701af){const _0x2cd2c7=a60_0x33c330,_0x5a08a7=asPlainObject(_0x3b7078['dataset']),_0x38d128=asPlainObject(_0x3b7078['dbtableConfig']),_0x3243dd=resolveSourceType(_0x3b7078,_0x5a08a7,_0x38d128),_0x456f2e=firstString(_0x3b7078[_0x2cd2c7(0x152)],_0x3b7078['code'],_0x5a08a7[_0x2cd2c7(0x143)],_0x4701af)||_0x4701af;return{'id':firstNumber(_0x3b7078[_0x2cd2c7(0x11c)],_0x3b7078['id'],_0x5a08a7[_0x2cd2c7(0x116)])??firstString(_0x3b7078[_0x2cd2c7(0x11c)],_0x3b7078['id'],_0x5a08a7['datasetId'])??null,'code':_0x456f2e,'name':firstString(_0x3b7078[_0x2cd2c7(0x123)],_0x5a08a7['datasetName'],_0x5a08a7['name'])||null,'sourceType':_0x3243dd};}function resolveSourceType(_0xaaf377,_0x1e5212,_0xc196df){const _0x39e955=a60_0x33c330,_0x55bc8f=firstString(_0xaaf377[_0x39e955(0x136)],_0xaaf377[_0x39e955(0x115)],_0x1e5212[_0x39e955(0x136)],_0x1e5212[_0x39e955(0x115)])?.[_0x39e955(0x140)]()[_0x39e955(0x126)]();if(_0x55bc8f===_0x39e955(0x125)||_0x55bc8f===_0x39e955(0x121))return _0x55bc8f;if(Object['keys'](_0xc196df)['length']>0x0)return'DB_TABLE';throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x1f116b,_0x4a5602){const _0x33b295=a60_0x33c330,_0x5111e7=readBusinessGroupFromDatasetDetail(_0x1f116b,_0x4a5602[_0x33b295(0x115)]);if(_0x5111e7['found'])return normalizeBusinessGroup(_0x5111e7[_0x33b295(0x145)]);if(_0x4a5602[_0x33b295(0x115)]===_0x33b295(0x121))return'';throw CliErrors[_0x33b295(0x12b)](_0x33b295(0x11b),'Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x41bfd2,_0x361171){const _0x428f47=a60_0x33c330,_0x57009b=asPlainObject(_0x41bfd2[_0x428f47(0x128)]),_0x5c1c03=firstPresent(_0x41bfd2[_0x428f47(0x147)]);if(_0x5c1c03[_0x428f47(0x149)])return _0x5c1c03;const _0x254602=firstPresent(_0x57009b['businessGroup']);if(_0x254602['found'])return _0x254602;if(_0x361171===_0x428f47(0x125))return{'found':![]};const _0x4f57b6=readBusinessGroupFromExtend(_0x41bfd2[_0x428f47(0x12d)]);if(_0x4f57b6[_0x428f47(0x149)])return _0x4f57b6;return readBusinessGroupFromExtend(_0x57009b[_0x428f47(0x12d)]);}function readBusinessGroupFromExtend(_0xc6ade5){const _0x5f485c=a60_0x33c330;if(_0xc6ade5===undefined||_0xc6ade5===null||_0xc6ade5==='')return{'found':![]};if(typeof _0xc6ade5==='string')try{const _0x34d3e0=JSON[_0x5f485c(0x135)](_0xc6ade5);return readBusinessGroupFromExtend(_0x34d3e0);}catch{return{'found':![]};}const _0x4bb442=asPlainObject(_0xc6ade5);if(Object[_0x5f485c(0x14a)][_0x5f485c(0x13c)][_0x5f485c(0x13d)](_0x4bb442,_0x5f485c(0x147)))return{'found':!![],'value':_0x4bb442['businessGroup']};return{'found':![]};}function firstPresent(..._0x46ee73){for(const _0x3cc101 of _0x46ee73){if(_0x3cc101!==undefined&&_0x3cc101!==null)return{'found':!![],'value':_0x3cc101};}return{'found':![]};}function assertExpectedBusinessGroup(_0xeb4984,_0x1e25ff){const _0x45a39b=a60_0x33c330;if(_0x1e25ff===undefined)return;const _0x116427=normalizeBusinessGroup(_0x1e25ff);if(_0xeb4984!==_0x116427)throw CliErrors[_0x45a39b(0x12b)]('Expectation\x20mismatch\x20at\x20businessGroup',_0x45a39b(0x114)+JSON[_0x45a39b(0x130)](_0x116427)+_0x45a39b(0x11a)+JSON[_0x45a39b(0x130)](_0xeb4984));}function buildBackendPayload(_0x7753ef,_0x5b041c,_0x2fb7d5){return{'appCode':_0x7753ef,'datasetCode':_0x5b041c['code'],'businessGroup':_0x2fb7d5};}function normalizeBusinessGroup(_0x460ab4){if(_0x460ab4===undefined||_0x460ab4===null)return'';return String(_0x460ab4)['trim']();}function asPlainObject(_0x257180){if(!_0x257180||typeof _0x257180!=='object'||Array['isArray'](_0x257180))return{};return _0x257180;}function a60_0x4160(_0x516cca,_0x2c351d){_0x516cca=_0x516cca-0x114;const _0xb60b2f=a60_0xb60b();let _0x416041=_0xb60b2f[_0x516cca];return _0x416041;}function firstString(..._0x441f41){const _0x477b67=a60_0x33c330;for(const _0x5aee4d of _0x441f41){if(typeof _0x5aee4d===_0x477b67(0x14f)&&_0x5aee4d[_0x477b67(0x140)]())return _0x5aee4d[_0x477b67(0x140)]();if(typeof _0x5aee4d===_0x477b67(0x148)&&Number[_0x477b67(0x13f)](_0x5aee4d))return String(_0x5aee4d);}return undefined;}function firstNumber(..._0x5e5037){const _0x355c57=a60_0x33c330;for(const _0x3670de of _0x5e5037){if(typeof _0x3670de===_0x355c57(0x148)&&Number[_0x355c57(0x13f)](_0x3670de))return _0x3670de;if(typeof _0x3670de===_0x355c57(0x14f)&&_0x3670de[_0x355c57(0x140)]()&&Number['isFinite'](Number(_0x3670de)))return Number(_0x3670de);}return null;}function trim(_0xa7440e){const _0x58771e=a60_0x33c330;return String(_0xa7440e||'')[_0x58771e(0x140)]();}function a60_0xb60b(){const _0x170562=['modelCode','Expected\x20','sourceType','datasetId','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','18275kOXaMY','write',',\x20actual\x20','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','modelId','33qgPBcu','6496uMRGJH','/smartapi/question/er-config/business-group/edit','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','METADATA','Update\x20business\x20scenario\x20group','name','apiError','DB_TABLE','toUpperCase','74799KxdcBu','dataset','POST','124640JKxiyP','validation','120OkFZhF','extend','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','41712GKNEVw','stringify','data','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','expect-business-group','payload','parse','source','str','--code\x20is\x20required','--business-group\x20is\x20required','code','449869uRUwWQ','hasOwnProperty','call','update','isFinite','trim','business-group-update','2427012GcbREB','datasetCode','unchanged','value','50VMVipM','businessGroup','number','found','prototype','231qUdTpe','438YnbTjx','appCode','expectBusinessGroup','string','message','business-group'];a60_0xb60b=function(){return _0x170562;};return a60_0xb60b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3b7b87=a61_0x3aae;(function(_0x2ac9bd,_0x5bb123){const _0x2ef8c3=a61_0x3aae,_0x256b80=_0x2ac9bd();while(!![]){try{const _0x516e11=-parseInt(_0x2ef8c3(0x1bd))/0x1+-parseInt(_0x2ef8c3(0x1a3))/0x2+parseInt(_0x2ef8c3(0x1c5))/0x3+-parseInt(_0x2ef8c3(0x1b6))/0x4*(parseInt(_0x2ef8c3(0x1c2))/0x5)+parseInt(_0x2ef8c3(0x1c0))/0x6*(parseInt(_0x2ef8c3(0x1ad))/0x7)+parseInt(_0x2ef8c3(0x1a9))/0x8*(-parseInt(_0x2ef8c3(0x1b7))/0x9)+parseInt(_0x2ef8c3(0x1c6))/0xa*(parseInt(_0x2ef8c3(0x1a7))/0xb);if(_0x516e11===_0x5bb123)break;else _0x256b80['push'](_0x256b80['shift']());}catch(_0x1b0970){_0x256b80['push'](_0x256b80['shift']());}}}(a61_0x3cca,0xc6ba5));import{CliErrors}from'../../errors.js';function a61_0x3cca(){const _0x1ab02e=['tableName','\x20是\x20','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','4547792leyejO','4973553MRtdXg','trim','object','code','METADATA','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','732172OeJgkJ','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dbtable','237900cPJgSL','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','5wDSvJk','datasetName','\x20类型,没有可用于\x20','158997rjMtKX','2064410IdrXOo','\x20的\x20DB_TABLE\x20数据源上下文。','length','当前数据集\x20\x22','1342052Iffyxx','validation','dataset','UNKNOWN','220LdIzqi','getOne','16ZnTEaA','lovrabet','name','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','49ZzNQal','sourceType','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','source','toUpperCase','unknown'];a61_0x3cca=function(){return _0x1ab02e;};return a61_0x3cca();}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x3b7b87(0x1aa),'filter':a61_0x3b7b87(0x1bc),'getOne':a61_0x3b7b87(0x1b5)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x3b7b87(0x1ac);function a61_0x3aae(_0x5e5be5,_0xe8fb4e){_0x5e5be5=_0x5e5be5-0x1a2;const _0x3cca67=a61_0x3cca();let _0x3aae36=_0x3cca67[_0x5e5be5];return _0x3aae36;}function valueToString(_0x28a104){const _0x5642ae=a61_0x3b7b87;return _0x28a104==null?'':String(_0x28a104)[_0x5642ae(0x1b8)]();}function getDatasetCode(_0x240934){const _0x148488=a61_0x3b7b87;return valueToString(_0x240934[_0x148488(0x1ba)]??_0x240934['modelCode']??_0x240934[_0x148488(0x1a5)]?.['datasetCode']);}function getDatasetName(_0x536d7f){const _0x5cd2c2=a61_0x3b7b87;return valueToString(_0x536d7f[_0x5cd2c2(0x1ab)]??_0x536d7f[_0x5cd2c2(0x1a5)]?.[_0x5cd2c2(0x1c3)])||_0x5cd2c2(0x1b2);}function getDatasetSource(_0x53f5c6){const _0x1e5a91=a61_0x3b7b87;return valueToString(_0x53f5c6[_0x1e5a91(0x1b0)]??_0x53f5c6['dataset']?.[_0x1e5a91(0x1ae)])[_0x1e5a91(0x1b1)]();}function getDbtableConfig(_0x1c1c0d){const _0x5b25f3=a61_0x3b7b87,_0x195cab=_0x1c1c0d['dbtableConfig']??_0x1c1c0d[_0x5b25f3(0x1bf)];return _0x195cab&&typeof _0x195cab===_0x5b25f3(0x1b9)?_0x195cab:{};}export function isDbTableBackedDataset(_0x9cdc18){const _0x395f61=a61_0x3b7b87,_0x496946=getDatasetSource(_0x9cdc18);if(_0x496946===_0x395f61(0x1bb))return![];const _0x158741=getDbtableConfig(_0x9cdc18),_0x4ffd22=_0x158741['dbId']??_0x158741['id'],_0x21eab3=valueToString(_0x158741[_0x395f61(0x1b3)]??_0x9cdc18[_0x395f61(0x1b3)]??_0x9cdc18[_0x395f61(0x1a5)]?.[_0x395f61(0x1b3)]);return _0x4ffd22!==undefined&&_0x4ffd22!==null&&_0x21eab3[_0x395f61(0x1c8)]>0x0;}export function filterDbTableBackedDatasets(_0x2ffcaf){return _0x2ffcaf['filter'](_0xe910bd=>isDbTableBackedDataset(_0xe910bd));}export function buildDbTableBackedRequirementMessage(_0x5074e8,_0x4db174='SQL\x20schema\x20validation'){const _0x1ce139=a61_0x3b7b87,_0x482a1a=getDatasetSource(_0x5074e8)||_0x1ce139(0x1a6),_0x2294fd=getDatasetName(_0x5074e8),_0x15a715=getDatasetCode(_0x5074e8),_0x312dbb=_0x15a715?'\x20('+_0x15a715+')':'';return[_0x1ce139(0x1a2)+_0x2294fd+'\x22'+_0x312dbb+_0x1ce139(0x1b4)+_0x482a1a+_0x1ce139(0x1c4)+_0x4db174+_0x1ce139(0x1c7),_0x1ce139(0x1af),_0x1ce139(0x1c1),_0x1ce139(0x1be)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x1ce139(0x1a8)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x580373,_0x30381d){const _0x3d5c8a=a61_0x3b7b87;if(!isDbTableBackedDataset(_0x580373))throw CliErrors[_0x3d5c8a(0x1a4)](buildDbTableBackedRequirementMessage(_0x580373,_0x30381d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a62_0x22b0(){const _0x244e85=['818776JzGckp','object','488352kvIwzq','confirm','relatedPageInfoList','delete','12pYFhta','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','bool','appCode','dbName','expected-count','boolean','33OHkQSo','2299npCgjl','98396LxMkxN','code','num','5710SLljkY','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','filter','116797TOLtOr','115150SjCaBt','4810020fclXog','str','\x20dataset(s)','2OzvNlZ','id=','name','36yjfMef','Deleted\x20','dataset','dbtableConfig','source','\x20dataset(s);\x20','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','validation','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','push','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','message','Dataset\x20id','number','isArray','description','/smartapi/dataset/delete-dataset','length','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','POST','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','dbid','deleted','dbId'];a62_0x22b0=function(){return _0x244e85;};return a62_0x22b0();}function a62_0x5615(_0x5b86e7,_0x548da2){_0x5b86e7=_0x5b86e7-0x14c;const _0x22b020=a62_0x22b0();let _0x56157f=_0x22b020[_0x5b86e7];return _0x56157f;}const a62_0x54b7a3=a62_0x5615;(function(_0x370bab,_0x6710c1){const _0x34e125=a62_0x5615,_0x4bb763=_0x370bab();while(!![]){try{const _0x5a9499=parseInt(_0x34e125(0x167))/0x1*(-parseInt(_0x34e125(0x16c))/0x2)+-parseInt(_0x34e125(0x15f))/0x3*(-parseInt(_0x34e125(0x161))/0x4)+-parseInt(_0x34e125(0x168))/0x5+parseInt(_0x34e125(0x158))/0x6*(-parseInt(_0x34e125(0x152))/0x7)+parseInt(_0x34e125(0x154))/0x8*(-parseInt(_0x34e125(0x16f))/0x9)+parseInt(_0x34e125(0x164))/0xa*(parseInt(_0x34e125(0x160))/0xb)+parseInt(_0x34e125(0x169))/0xc;if(_0x5a9499===_0x6710c1)break;else _0x4bb763['push'](_0x4bb763['shift']());}catch(_0x32a079){_0x4bb763['push'](_0x4bb763['shift']());}}}(a62_0x22b0,0x2a318));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':a62_0x54b7a3(0x17c)},DBID_FLAG={'name':a62_0x54b7a3(0x14f),'type':a62_0x54b7a3(0x17d),'description':a62_0x54b7a3(0x175)},CONFIRM_FLAG={'name':'confirm','type':a62_0x54b7a3(0x15e),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a62_0x54b7a3(0x15d),'type':a62_0x54b7a3(0x17d),'description':a62_0x54b7a3(0x177)};export const datasetDelete={'service':a62_0x54b7a3(0x171),'command':a62_0x54b7a3(0x157),'description':a62_0x54b7a3(0x159),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xada58c){const _0x3e13c2=a62_0x54b7a3,_0x320caf=_0xada58c[_0x3e13c2(0x163)]('id'),_0x46c678=_0xada58c[_0x3e13c2(0x16a)](_0x3e13c2(0x162)),_0x1955f5=_0xada58c[_0x3e13c2(0x163)](_0x3e13c2(0x14f)),_0x20dac7=[_0x320caf>0x0,Boolean(_0x46c678),_0x1955f5>0x0]['filter'](Boolean);if(_0x20dac7[_0x3e13c2(0x181)]===0x0)throw CliErrors[_0x3e13c2(0x176)](_0x3e13c2(0x178));if(_0x20dac7[_0x3e13c2(0x181)]>0x1)throw CliErrors[_0x3e13c2(0x176)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x169ff8){const _0x1fd4d9=a62_0x54b7a3,_0x17f98e=await resolveTargets(_0x169ff8);return{'method':_0x1fd4d9(0x14d),'url':_0x1fd4d9(0x180),'body':{'appCode':_0x169ff8[_0x1fd4d9(0x15b)],'count':_0x17f98e[_0x1fd4d9(0x181)],'datasets':_0x17f98e},'description':'Would\x20delete\x20'+_0x17f98e[_0x1fd4d9(0x181)]+_0x1fd4d9(0x14e)};},async 'execute'(_0x38fbec){const _0x552a90=a62_0x54b7a3;if(!_0x38fbec[_0x552a90(0x15a)](_0x552a90(0x155)))throw CliErrors[_0x552a90(0x176)](_0x552a90(0x165),_0x552a90(0x17a));const _0x286328=await resolveTargets(_0x38fbec),_0x1af7d8=[],_0x4c2385=[];for(const _0x307148 of _0x286328){try{await deleteDataset(_0x38fbec[_0x552a90(0x15b)],_0x307148['id']),_0x1af7d8['push'](_0x307148);}catch(_0x4bea1b){_0x4c2385[_0x552a90(0x179)]({..._0x307148,'error':_0x4bea1b instanceof Error?_0x4bea1b[_0x552a90(0x17b)]:String(_0x4bea1b)});}}if(_0x4c2385[_0x552a90(0x181)]>0x0)return{'ok':![],'data':{'requested':_0x286328[_0x552a90(0x181)],'deletedCount':_0x1af7d8[_0x552a90(0x181)],'failedCount':_0x4c2385[_0x552a90(0x181)],'deleted':_0x1af7d8,'failed':_0x4c2385},'message':_0x552a90(0x170)+_0x1af7d8[_0x552a90(0x181)]+'/'+_0x286328[_0x552a90(0x181)]+_0x552a90(0x174)+_0x4c2385['length']+'\x20failed'};return{'ok':!![],'data':{'requested':_0x286328[_0x552a90(0x181)],'deletedCount':_0x1af7d8[_0x552a90(0x181)],'deleted':_0x1af7d8},'message':_0x552a90(0x170)+_0x1af7d8[_0x552a90(0x181)]+_0x552a90(0x16b)};}};async function resolveTargets(_0x2ccc21){const _0x5d0ad3=a62_0x54b7a3,_0x9780e9=_0x2ccc21[_0x5d0ad3(0x163)]('id'),_0x21f230=_0x2ccc21[_0x5d0ad3(0x16a)](_0x5d0ad3(0x162)),_0x35153d=_0x2ccc21[_0x5d0ad3(0x163)](_0x5d0ad3(0x14f));let _0x52e7e0;_0x21f230?(_0x52e7e0=await listDatasets(_0x2ccc21[_0x5d0ad3(0x15b)],{'code':_0x21f230}),_0x52e7e0=_0x52e7e0[_0x5d0ad3(0x166)](_0x5ce45e=>_0x5ce45e[_0x5d0ad3(0x162)]===_0x21f230)):(_0x52e7e0=await listDatasets(_0x2ccc21[_0x5d0ad3(0x15b)]),_0x9780e9>0x0&&(_0x52e7e0=_0x52e7e0['filter'](_0x124d99=>_0x124d99['id']===_0x9780e9)),_0x35153d>0x0&&(_0x52e7e0=_0x52e7e0['filter'](_0x545c0f=>_0x545c0f[_0x5d0ad3(0x172)]?.[_0x5d0ad3(0x151)]===_0x35153d)));const _0x51b921=[];for(const _0x480528 of _0x52e7e0){const _0x33e6c8=await getDatasetDetail(_0x480528['code']),_0x1d09f1=Array[_0x5d0ad3(0x17e)](_0x33e6c8[_0x5d0ad3(0x156)])?_0x33e6c8[_0x5d0ad3(0x156)][_0x5d0ad3(0x166)](_0x47dbac=>_0x47dbac!=null&&typeof _0x47dbac===_0x5d0ad3(0x153)&&_0x47dbac[_0x5d0ad3(0x150)]!==!![]):[];_0x51b921[_0x5d0ad3(0x179)](normalizeTarget(_0x480528,_0x1d09f1[_0x5d0ad3(0x181)]));}if(_0x51b921[_0x5d0ad3(0x181)]===0x0){const _0x599897=_0x21f230||(_0x9780e9>0x0?_0x5d0ad3(0x16d)+_0x9780e9:'dbid='+_0x35153d);throw CliErrors[_0x5d0ad3(0x176)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x599897+'.');}const _0x343d9b=_0x2ccc21[_0x5d0ad3(0x163)](_0x5d0ad3(0x15d));if(_0x343d9b>0x0&&_0x51b921[_0x5d0ad3(0x181)]!==_0x343d9b)throw CliErrors[_0x5d0ad3(0x176)]('Matched\x20'+_0x51b921['length']+_0x5d0ad3(0x14c)+_0x343d9b+'.');return _0x51b921;}function normalizeTarget(_0x2e5aad,_0x1f0e8a){const _0x293958=a62_0x54b7a3,_0x6f610b=_0x2e5aad[_0x293958(0x172)]??{};return{'id':_0x2e5aad['id'],'code':_0x2e5aad[_0x293958(0x162)],'name':_0x2e5aad[_0x293958(0x16e)],'description':_0x2e5aad[_0x293958(0x17f)],'source':_0x2e5aad[_0x293958(0x173)],'dbId':_0x6f610b[_0x293958(0x151)],'dbName':_0x6f610b[_0x293958(0x15c)],'tableName':_0x6f610b['tableName'],'relatedPageCount':_0x1f0e8a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a63_0x3f7ce5=a63_0xeb95;function a63_0x5e13(){const _0x129f45=['28710GtjrYo','title','logicField','entries','method','7qTrlAU','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','creatorNameField','read','datasetKey','creatorIdField','operations','host','indexes','object','pkField','177522XDFNLM','responseBody','775IFHDHE','parse','filter','toTableName','deleted','dbType','doType','isArray','properties','beforeScriptId','afterScriptId','updateTimeField','modifierIdField','columnCodeListWithDeleted','678lJkVFT','relations','responseFields','44jpPZMu','map','52cYCumD','modifierNameField','allFields','fields','type','displayName','toDatasetCode','options','requestFields','labelField','dataType','name','toFieldLabel','toDatasetName','main_sub','detail','2200IHjZhx','dataset','extend','tableName','trim','18649gKXDXS','required','split','string','length','doVersion','dbName','dbtableConfig','str','alias','formatRules','path','52092APxMte','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','50886693xYQcBm','push','12616184JALuTx','166qeQYuu','requestBody','modelCode','toField','dbId','description','tableComment','relationId','code'];a63_0x5e13=function(){return _0x129f45;};return a63_0x5e13();}(function(_0x397b27,_0x5638fe){const _0x1aa42e=a63_0xeb95,_0x272831=_0x397b27();while(!![]){try{const _0x8a921a=-parseInt(_0x1aa42e(0x152))/0x1*(parseInt(_0x1aa42e(0x163))/0x2)+parseInt(_0x1aa42e(0x17c))/0x3*(parseInt(_0x1aa42e(0x13d))/0x4)+-parseInt(_0x1aa42e(0x17e))/0x5*(parseInt(_0x1aa42e(0x138))/0x6)+parseInt(_0x1aa42e(0x171))/0x7*(-parseInt(_0x1aa42e(0x162))/0x8)+-parseInt(_0x1aa42e(0x16c))/0x9*(parseInt(_0x1aa42e(0x14d))/0xa)+parseInt(_0x1aa42e(0x13b))/0xb*(-parseInt(_0x1aa42e(0x15e))/0xc)+parseInt(_0x1aa42e(0x160))/0xd;if(_0x8a921a===_0x5638fe)break;else _0x272831['push'](_0x272831['shift']());}catch(_0x38dd75){_0x272831['push'](_0x272831['shift']());}}}(a63_0x5e13,0xc8b26));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x11cf23){const _0x1b4f3a=a63_0xeb95;if(_0x11cf23[_0x1b4f3a(0x182)])return null;const _0x1b3928=Boolean(_0x11cf23[_0x1b4f3a(0x142)]!==undefined||_0x11cf23[_0x1b4f3a(0x184)]!==undefined);let _0x267259={};if(!_0x1b3928&&typeof _0x11cf23['extend']===_0x1b4f3a(0x155))try{_0x267259=JSON[_0x1b4f3a(0x17f)](_0x11cf23['extend']);}catch{}const _0x1507b8=_0x1b3928?_0x11cf23[_0x1b4f3a(0x148)]:_0x11cf23[_0x1b4f3a(0x16b)],_0x345c0a=_0x1b3928?_0x11cf23[_0x1b4f3a(0x142)]:_0x11cf23[_0x1b4f3a(0x148)],_0x2fcb5b=_0x1b3928?_0x11cf23[_0x1b4f3a(0x184)]:_0x11cf23['type']||_0x11cf23[_0x1b4f3a(0x147)],_0x46fac7=_0x1b3928?_0x11cf23[_0x1b4f3a(0x17b)]===!![]:_0x267259[_0x1b4f3a(0x17b)]===!![],_0x56dde5=_0x1b3928?_0x11cf23[_0x1b4f3a(0x153)]===!![]:_0x267259[_0x1b4f3a(0x153)]===!![],_0x37ccb7=_0x1b3928?_0x11cf23[_0x1b4f3a(0x144)]??null:_0x267259[_0x1b4f3a(0x144)]??null,_0x23f1d2={'name':_0x1507b8,'displayName':_0x345c0a||_0x1507b8,'type':_0x2fcb5b,'dbType':_0x11cf23[_0x1b4f3a(0x183)],'pk':_0x46fac7,'required':_0x56dde5,'deprecated':_0x11cf23['deprecated']===!![],'description':_0x11cf23[_0x1b4f3a(0x168)]||undefined};return Array['isArray'](_0x37ccb7)&&_0x37ccb7[_0x1b4f3a(0x156)]>0x0&&(_0x23f1d2[_0x1b4f3a(0x144)]=_0x37ccb7),_0x23f1d2;}function a63_0xeb95(_0x314451,_0x450312){_0x314451=_0x314451-0x135;const _0x5e1326=a63_0x5e13();let _0xeb95cf=_0x5e1326[_0x314451];return _0xeb95cf;}function parseJsonMaybe(_0x317c11){const _0x9db609=a63_0xeb95;if(typeof _0x317c11!==_0x9db609(0x155))return _0x317c11;try{return JSON[_0x9db609(0x17f)](_0x317c11);}catch{return _0x317c11;}}function normalizeOperationEntry(_0x15963e,_0xf92f67){const _0x125f4c=a63_0xeb95;if(!_0xf92f67||typeof _0xf92f67!=='object')return null;if(!_0xf92f67[_0x125f4c(0x170)]||!_0xf92f67['path'])return null;const _0x18fcd6={'name':_0x15963e,'method':_0xf92f67['method'],'path':_0xf92f67[_0x125f4c(0x15d)]};if(_0xf92f67['host'])_0x18fcd6['host']=_0xf92f67[_0x125f4c(0x178)];if(_0xf92f67[_0x125f4c(0x164)]!=null){const _0x1374a3=parseJsonMaybe(_0xf92f67[_0x125f4c(0x164)]);_0x18fcd6[_0x125f4c(0x164)]=_0x1374a3;}if(_0xf92f67[_0x125f4c(0x17d)]!=null){const _0x5823c3=parseJsonMaybe(_0xf92f67[_0x125f4c(0x17d)]);_0x18fcd6['responseBody']=_0x5823c3;}if(_0xf92f67[_0x125f4c(0x187)]!=null)_0x18fcd6['beforeScriptId']=_0xf92f67[_0x125f4c(0x187)];if(_0xf92f67[_0x125f4c(0x188)]!=null)_0x18fcd6['afterScriptId']=_0xf92f67[_0x125f4c(0x188)];if(Array[_0x125f4c(0x185)](_0xf92f67[_0x125f4c(0x145)]))_0x18fcd6[_0x125f4c(0x145)]=_0xf92f67['requestFields'];if(Array[_0x125f4c(0x185)](_0xf92f67[_0x125f4c(0x13a)]))_0x18fcd6['responseFields']=_0xf92f67[_0x125f4c(0x13a)];return _0x18fcd6;}function summarizeDbtable(_0x2b6e6e){const _0x3db8a6=a63_0xeb95,_0x4731f6={},_0x12427e=[_0x3db8a6(0x167),_0x3db8a6(0x158),_0x3db8a6(0x150),_0x3db8a6(0x175),'pkField',_0x3db8a6(0x13f),_0x3db8a6(0x16e),'createTimeField',_0x3db8a6(0x135),_0x3db8a6(0x176),_0x3db8a6(0x173),_0x3db8a6(0x136),_0x3db8a6(0x13e),_0x3db8a6(0x146),'dblinkInfoDTO'];for(const _0x53c70d of _0x12427e){if(_0x2b6e6e[_0x53c70d]!==undefined)_0x4731f6[_0x53c70d]=_0x2b6e6e[_0x53c70d];}return typeof _0x4731f6[_0x3db8a6(0x13f)]===_0x3db8a6(0x155)&&_0x4731f6[_0x3db8a6(0x13f)][_0x3db8a6(0x156)]>0x0&&(_0x4731f6['allFieldNames']=_0x4731f6[_0x3db8a6(0x13f)][_0x3db8a6(0x154)](',')[_0x3db8a6(0x13c)](_0x2a35ec=>_0x2a35ec[_0x3db8a6(0x151)]())[_0x3db8a6(0x180)](Boolean)),_0x4731f6;}function normalizeRelatedPages(_0x1fd4b8){const _0x506e3f=a63_0xeb95;if(!Array[_0x506e3f(0x185)](_0x1fd4b8))return[];return _0x1fd4b8[_0x506e3f(0x180)](_0x1da25d=>_0x1da25d&&typeof _0x1da25d===_0x506e3f(0x17a))[_0x506e3f(0x13c)](_0x506fc8=>({'id':_0x506fc8['id'],'type':_0x506fc8[_0x506e3f(0x141)],'code':_0x506fc8[_0x506e3f(0x16b)],'title':_0x506fc8[_0x506e3f(0x16d)],'deleted':_0x506fc8[_0x506e3f(0x182)]===!![]}));}export const datasetDetail={'service':'dataset','command':a63_0x3f7ce5(0x14c),'description':a63_0x3f7ce5(0x172),'risk':a63_0x3f7ce5(0x174),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x3f7ce5(0x15b),'type':a63_0x3f7ce5(0x155),'description':a63_0x3f7ce5(0x15f)}],async 'execute'(_0x37d5b0){const _0x2b280e=a63_0x3f7ce5,_0x41651e=await getDatasetDetail(_0x37d5b0[_0x2b280e(0x15a)](_0x2b280e(0x16b))),_0x378701=Array[_0x2b280e(0x185)](_0x41651e['fields'])?_0x41651e[_0x2b280e(0x140)]:Array['isArray'](_0x41651e['properties'])?_0x41651e[_0x2b280e(0x186)]:[],_0xeea894=_0x378701['map'](_0x24204d=>normalizeField(_0x24204d))[_0x2b280e(0x180)](_0x2302e3=>_0x2302e3!==null),_0xd9a11a=_0x41651e[_0x2b280e(0x177)]??{},_0x115092=[];for(const [_0x43ebd0,_0xd223ff]of Object[_0x2b280e(0x16f)](_0xd9a11a)){const _0x10d615=normalizeOperationEntry(_0x43ebd0,_0xd223ff);if(_0x10d615)_0x115092[_0x2b280e(0x161)](_0x10d615);}const _0x3ed3dd=_0x41651e[_0x2b280e(0x159)]??{},_0x42fb2c=_0x41651e[_0x2b280e(0x14e)]??{},_0x36576c=_0x3ed3dd[_0x2b280e(0x167)]!=null?{'id':_0x3ed3dd['dbId'],'name':_0x3ed3dd[_0x2b280e(0x158)]??null}:undefined;let _0x1f5fbc;return typeof _0x41651e['extend']===_0x2b280e(0x155)&&(_0x1f5fbc=parseJsonMaybe(_0x41651e[_0x2b280e(0x14f)])),{'ok':!![],'data':{'id':_0x41651e['modelId']??_0x41651e['id'],'name':_0x41651e[_0x2b280e(0x148)],'code':_0x41651e[_0x2b280e(0x165)]||_0x41651e[_0x2b280e(0x16b)],'doVersion':_0x41651e[_0x2b280e(0x157)],'description':_0x41651e[_0x2b280e(0x168)]||_0x42fb2c[_0x2b280e(0x169)]||undefined,'source':_0x41651e['source']||_0x42fb2c['sourceType'],'table':_0x3ed3dd[_0x2b280e(0x150)]||_0x42fb2c['tableName'],'datasetKey':_0x3ed3dd[_0x2b280e(0x175)],'pk':_0x3ed3dd['pkField'],'db':_0x36576c,'dbtable':summarizeDbtable(_0x3ed3dd),'fields':_0xeea894,'operations':_0x115092,'indexes':Array['isArray'](_0x42fb2c[_0x2b280e(0x179)])?_0x42fb2c[_0x2b280e(0x179)]:[],'relations':Array[_0x2b280e(0x185)](_0x41651e['relations'])?_0x41651e[_0x2b280e(0x139)][_0x2b280e(0x13c)](_0xe50b9c=>({..._0xe50b9c[_0x2b280e(0x16a)]!=null?{'relationId':_0xe50b9c[_0x2b280e(0x16a)]}:{},'fromDataset':_0x41651e[_0x2b280e(0x148)],'fromCode':_0x41651e[_0x2b280e(0x165)]||_0x41651e[_0x2b280e(0x16b)],'fromTable':_0x3ed3dd[_0x2b280e(0x150)]||_0x42fb2c[_0x2b280e(0x150)],'fromField':_0xe50b9c['fromField'],'toDataset':_0xe50b9c[_0x2b280e(0x14a)],'toCode':_0xe50b9c[_0x2b280e(0x143)],'toTable':_0xe50b9c[_0x2b280e(0x181)],'toField':_0xe50b9c[_0x2b280e(0x166)],'labelField':_0xe50b9c[_0x2b280e(0x149)]||undefined,'cardinality':_0xe50b9c['cardinality']||undefined,'bizRelationType':_0xe50b9c['bizRelationType']===_0x2b280e(0x14b)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x41651e['relatedPageInfoList']),...Array[_0x2b280e(0x185)](_0x41651e[_0x2b280e(0x137)])?{'columnCodeListWithDeleted':_0x41651e[_0x2b280e(0x137)]}:{},'formatRules':Array[_0x2b280e(0x185)](_0x41651e[_0x2b280e(0x15c)])?_0x41651e[_0x2b280e(0x15c)]:[],'validateRules':Array[_0x2b280e(0x185)](_0x41651e['validateRules'])?_0x41651e['validateRules']:[],..._0x1f5fbc!==undefined?{'extend':_0x1f5fbc}:{},'stats':{'fieldCount':_0xeea894[_0x2b280e(0x156)],'operationCount':_0x115092[_0x2b280e(0x156)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x397ff2=a64_0x3293;(function(_0x2f51fd,_0x14d3f2){const _0x5dd7ed=a64_0x3293,_0x143276=_0x2f51fd();while(!![]){try{const _0x567f28=-parseInt(_0x5dd7ed(0x1b6))/0x1*(parseInt(_0x5dd7ed(0x1ce))/0x2)+parseInt(_0x5dd7ed(0x19d))/0x3+-parseInt(_0x5dd7ed(0x1b1))/0x4*(-parseInt(_0x5dd7ed(0x1bd))/0x5)+-parseInt(_0x5dd7ed(0x1a2))/0x6+parseInt(_0x5dd7ed(0x1c5))/0x7*(parseInt(_0x5dd7ed(0x1b7))/0x8)+parseInt(_0x5dd7ed(0x19c))/0x9+-parseInt(_0x5dd7ed(0x1cf))/0xa;if(_0x567f28===_0x14d3f2)break;else _0x143276['push'](_0x143276['shift']());}catch(_0x10a60f){_0x143276['push'](_0x143276['shift']());}}}(a64_0x5d2c,0x35702));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_0x3293(_0x281908,_0x45fbf6){_0x281908=_0x281908-0x198;const _0x5d2cef=a64_0x5d2c();let _0x3293d5=_0x5d2cef[_0x281908];return _0x3293d5;}const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x397ff2(0x1ba),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x397ff2(0x1a8)}]]);export function parseJsonObjectFlag(_0x2127d5,_0x15d5ed){const _0x42aaf7=a64_0x397ff2;if(!_0x2127d5)return undefined;let _0x1d6d56;try{_0x1d6d56=JSON[_0x42aaf7(0x1a3)](_0x2127d5);}catch(_0x1b51c2){const _0x39a823=_0x1b51c2 instanceof Error?_0x1b51c2[_0x42aaf7(0x1d5)]:String(_0x1b51c2);throw CliErrors[_0x42aaf7(0x19b)](_0x15d5ed+_0x42aaf7(0x1d9)+_0x39a823);}if(!isPlainObject(_0x1d6d56)||Array[_0x42aaf7(0x1bc)](_0x1d6d56))throw CliErrors[_0x42aaf7(0x19b)](_0x15d5ed+_0x42aaf7(0x1c8));return _0x1d6d56;}function a64_0x5d2c(){const _0x239f74=['/smartapi/dataset/update-driven-data','entries','dbName','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','8THNFOW','dbtableConfig','modelCode','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','patch','137LKRmSe','15272GhWKsB','datasetId','extend-update','businessGroup','--code\x20is\x20required','isArray','700770cLqyXY','Expected\x20','Updated\x20dataset\x20extend\x20(','Allowed\x20keys:\x20','join','get','Patch\x20dataset\x20top-level\x20extend\x20safely','expect-json','175fyJYyC','string',',\x20actual\x20','\x20must\x20be\x20a\x20JSON\x20object','object','trim','shape','data','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','330KWeECR','4104450rHuwFP','--patch-json','sort','expect','has','tableName','message','length','code','extend','\x20must\x20be\x20valid\x20JSON\x20object:\x20','dataset','dbId','keys','validation','3266676iLqQUK','454410oDKyhs','extend.','str','stringify','value','1143210eJFGSR','parse','push','appCode','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','POST','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','datasetName','modelId','name','patch-json'];a64_0x5d2c=function(){return _0x239f74;};return a64_0x5d2c();}export function validateExtendPatchKeys(_0x29f00d){const _0x4d89d5=a64_0x397ff2,_0x1d2fc7=Object[_0x4d89d5(0x19a)](_0x29f00d);if(_0x1d2fc7[_0x4d89d5(0x1d6)]===0x0)throw CliErrors[_0x4d89d5(0x19b)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x7cd540 of _0x1d2fc7){const _0x2646d8=EXTEND_PATCH_REDIRECTS[_0x4d89d5(0x1c2)](_0x7cd540);if(_0x2646d8)throw CliErrors[_0x4d89d5(0x19b)](_0x2646d8['message'],_0x2646d8['hint']);if(!MUTABLE_EXTEND_KEYS[_0x4d89d5(0x1d3)](_0x7cd540))throw CliErrors[_0x4d89d5(0x19b)]('Unsupported\x20patch\x20key:\x20'+_0x7cd540,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x501671=a64_0x397ff2,_0x1a9c5f=Array['from'](MUTABLE_EXTEND_KEYS)[_0x501671(0x1d1)]();return _0x1a9c5f[_0x501671(0x1d6)]>0x0?_0x501671(0x1c0)+_0x1a9c5f[_0x501671(0x1c1)](',\x20'):'No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.';}export function applyExtendPatch(_0x5e5022,_0x3d7f7f){const _0x2ed498=a64_0x397ff2;validateExtendPatchKeys(_0x3d7f7f);const _0x316c3a=deepClone(_0x5e5022),_0x35eed1=[];for(const [_0x536292,_0x5ee77b]of Object[_0x2ed498(0x1ae)](_0x3d7f7f)){const _0x3c1142=_0x316c3a[_0x536292],_0x4ad2e9=deepClone(_0x5ee77b);!deepEqual(_0x3c1142,_0x4ad2e9)&&(_0x316c3a[_0x536292]=_0x4ad2e9,_0x35eed1[_0x2ed498(0x1a4)](_0x2ed498(0x19e)+_0x536292));}return _0x35eed1['sort'](),{'after':_0x316c3a,'changedPaths':_0x35eed1,'changed':_0x35eed1[_0x2ed498(0x1d6)]>0x0};}export function assertExpectation(_0xd09aa,_0x1db256){const _0x51edc0=a64_0x397ff2;if(!_0x1db256)return;for(const [_0x2aa180,_0x8eadea]of Object['entries'](_0x1db256)){const _0x3f9a8e=_0xd09aa[_0x2aa180];if(!deepEqual(_0x3f9a8e,_0x8eadea))throw CliErrors[_0x51edc0(0x19b)]('Expectation\x20mismatch\x20at\x20extend.'+_0x2aa180,_0x51edc0(0x1be)+JSON['stringify'](_0x8eadea)+_0x51edc0(0x1c7)+JSON['stringify'](_0x3f9a8e));}}export async function buildDatasetExtendUpdateResult({appCode:_0x58e297,input:_0x238f22,dryRun:_0x3298a9}){const _0x1f8f04=a64_0x397ff2;validateInput(_0x238f22);const _0x1e9c2b=await getDatasetDetail(_0x238f22[_0x1f8f04(0x1d7)]),_0x1ed4b0=parseDatasetExtend(_0x1e9c2b[_0x1f8f04(0x1d8)]),_0x3210f1=deepClone(_0x1ed4b0[_0x1f8f04(0x1a1)]);assertExpectation(_0x3210f1,_0x238f22[_0x1f8f04(0x1d2)]);const {after:_0x29be7e,changedPaths:_0x3254e1,changed:_0x249ea1}=applyExtendPatch(_0x3210f1,_0x238f22['patch']),_0x5ec7c7=summarizeDataset(_0x1e9c2b,_0x238f22[_0x1f8f04(0x1d7)]);return _0x249ea1&&!_0x3298a9&&(_0x1e9c2b[_0x1f8f04(0x1d8)]=serializeDatasetExtend(_0x29be7e,_0x1ed4b0[_0x1f8f04(0x1cb)]),await updateDrivenData(_0x1e9c2b)),{'ok':!![],'data':{'appCode':_0x58e297,'selector':{'code':_0x238f22[_0x1f8f04(0x1d7)]},'dataset':_0x5ec7c7,'dryRun':_0x3298a9,'changed':_0x249ea1,'changedPaths':_0x3254e1,'before':{'extend':_0x3210f1},'after':{'extend':_0x29be7e},'submitted':_0x249ea1&&!_0x3298a9},'message':_0x249ea1?_0x3298a9?_0x1f8f04(0x1b4)+_0x3254e1[_0x1f8f04(0x1c1)](',\x20')+')':_0x1f8f04(0x1bf)+_0x3254e1['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a64_0x397ff2(0x198),'command':a64_0x397ff2(0x1b9),'description':a64_0x397ff2(0x1c3),'risk':'write','flags':[CODE_FLAG,{'name':a64_0x397ff2(0x1ac),'type':'string','required':!![],'description':a64_0x397ff2(0x1b0)},{'name':a64_0x397ff2(0x1c4),'type':'string','required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3532be){validateInput(readExtendUpdateInput(_0x3532be));},async 'dryRun'(_0x5287a3){const _0x2ea702=a64_0x397ff2,_0x1e6da8=await buildDatasetExtendUpdateResult({'appCode':_0x5287a3[_0x2ea702(0x1a5)],'input':readExtendUpdateInput(_0x5287a3),'dryRun':!![]});return{'method':_0x2ea702(0x1a7),'url':_0x2ea702(0x1ad),'body':_0x1e6da8[_0x2ea702(0x1cc)],'description':_0x1e6da8[_0x2ea702(0x1d5)]};},async 'execute'(_0x12361b){const _0x58ad5c=a64_0x397ff2;return buildDatasetExtendUpdateResult({'appCode':_0x12361b[_0x58ad5c(0x1a5)],'input':readExtendUpdateInput(_0x12361b),'dryRun':![]});}};function readExtendUpdateInput(_0x21e174){const _0x2a2c1=a64_0x397ff2,_0x403668=trim(_0x21e174[_0x2a2c1(0x19f)](_0x2a2c1(0x1d7))),_0x1924f9=parseJsonObjectFlag(_0x21e174[_0x2a2c1(0x19f)](_0x2a2c1(0x1ac)),_0x2a2c1(0x1d0)),_0xe09eb1=parseJsonObjectFlag(_0x21e174[_0x2a2c1(0x19f)](_0x2a2c1(0x1c4)),'--expect-json');return{'code':_0x403668,'patch':_0x1924f9||{},'expect':_0xe09eb1};}function validateInput(_0x12ca19){const _0x373930=a64_0x397ff2;if(!_0x12ca19[_0x373930(0x1d7)])throw CliErrors[_0x373930(0x19b)](_0x373930(0x1bb));validateExtendPatchKeys(_0x12ca19[_0x373930(0x1b5)]);}function parseDatasetExtend(_0x4058a6){const _0x4e2c28=a64_0x397ff2;if(typeof _0x4058a6===_0x4e2c28(0x1c6)){const _0x32cf4f=_0x4058a6[_0x4e2c28(0x1ca)]();if(!_0x32cf4f)return{'value':{},'shape':'string'};let _0x36f7e5;try{_0x36f7e5=JSON[_0x4e2c28(0x1a3)](_0x32cf4f);}catch(_0xa5f009){const _0x42a1c9=_0xa5f009 instanceof Error?_0xa5f009[_0x4e2c28(0x1d5)]:String(_0xa5f009);throw CliErrors[_0x4e2c28(0x19b)](_0x4e2c28(0x1a6)+_0x42a1c9);}if(!isPlainObject(_0x36f7e5)||Array[_0x4e2c28(0x1bc)](_0x36f7e5))throw CliErrors[_0x4e2c28(0x19b)](_0x4e2c28(0x1cd));return{'value':_0x36f7e5,'shape':_0x4e2c28(0x1c6)};}if(_0x4058a6===undefined||_0x4058a6===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x4058a6)||Array['isArray'](_0x4058a6))throw CliErrors[_0x4e2c28(0x19b)](_0x4e2c28(0x1cd));return{'value':_0x4058a6,'shape':'object'};}function serializeDatasetExtend(_0x224f94,_0x2e11a1){const _0x3b1533=a64_0x397ff2;return _0x2e11a1===_0x3b1533(0x1c6)?JSON[_0x3b1533(0x1a0)](_0x224f94):_0x224f94;}function summarizeDataset(_0x5c6757,_0x49e664){const _0x1ffa79=a64_0x397ff2,_0x4ecef4=isPlainObject(_0x5c6757['dataset'])?_0x5c6757[_0x1ffa79(0x198)]:{},_0x157af5=isPlainObject(_0x5c6757[_0x1ffa79(0x1b2)])?_0x5c6757[_0x1ffa79(0x1b2)]:{};return{'id':_0x5c6757[_0x1ffa79(0x1aa)]??_0x5c6757['id']??_0x4ecef4[_0x1ffa79(0x1b8)]??null,'code':_0x5c6757[_0x1ffa79(0x1b3)]??_0x5c6757[_0x1ffa79(0x1d7)]??_0x4ecef4['datasetCode']??_0x49e664,'name':_0x5c6757[_0x1ffa79(0x1ab)]??_0x4ecef4[_0x1ffa79(0x1a9)]??null,'table':_0x157af5[_0x1ffa79(0x1d4)]??_0x4ecef4[_0x1ffa79(0x1d4)]??null,'db':_0x157af5[_0x1ffa79(0x1af)]??_0x157af5[_0x1ffa79(0x199)]??null};}function deepClone(_0x49906e){const _0x20b4c9=a64_0x397ff2;if(_0x49906e===undefined)return _0x49906e;return JSON['parse'](JSON[_0x20b4c9(0x1a0)](_0x49906e));}function deepEqual(_0x37a8e5,_0x37a8da){const _0x78e983=a64_0x397ff2;return JSON[_0x78e983(0x1a0)](_0x37a8e5)===JSON[_0x78e983(0x1a0)](_0x37a8da);}function isPlainObject(_0x2d01d4){const _0x556710=a64_0x397ff2;return Boolean(_0x2d01d4)&&typeof _0x2d01d4===_0x556710(0x1c9)&&!Array[_0x556710(0x1bc)](_0x2d01d4);}function trim(_0x126ed1){const _0x1a62f0=a64_0x397ff2,_0xbc837c=String(_0x126ed1||'')[_0x1a62f0(0x1ca)]();return _0xbc837c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x29cf73=a65_0x1f3a;(function(_0x551c58,_0x4e481d){const _0x2358af=a65_0x1f3a,_0x1f91b0=_0x551c58();while(!![]){try{const _0x3c89ad=parseInt(_0x2358af(0x153))/0x1+-parseInt(_0x2358af(0x14f))/0x2+-parseInt(_0x2358af(0x181))/0x3*(-parseInt(_0x2358af(0x183))/0x4)+-parseInt(_0x2358af(0x168))/0x5+-parseInt(_0x2358af(0x178))/0x6+-parseInt(_0x2358af(0x145))/0x7+-parseInt(_0x2358af(0x149))/0x8*(-parseInt(_0x2358af(0x139))/0x9);if(_0x3c89ad===_0x4e481d)break;else _0x1f91b0['push'](_0x1f91b0['shift']());}catch(_0x402232){_0x1f91b0['push'](_0x1f91b0['shift']());}}}(a65_0x4cdb,0xbb178));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType','displayName',a65_0x29cf73(0x15e),a65_0x29cf73(0x136),a65_0x29cf73(0x16b),'datetimeFormat','defaultAggregation','chartRole',a65_0x29cf73(0x152)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x29cf73(0x13c),a65_0x29cf73(0x13f),a65_0x29cf73(0x138),a65_0x29cf73(0x144),a65_0x29cf73(0x174),a65_0x29cf73(0x140),a65_0x29cf73(0x13e),a65_0x29cf73(0x15a),a65_0x29cf73(0x166),a65_0x29cf73(0x154),a65_0x29cf73(0x176)]);export function parseJsonObjectFlag(_0x33bee1,_0x344f56){const _0x2e0d88=a65_0x29cf73;if(!_0x33bee1)return undefined;let _0xe873db;try{_0xe873db=JSON[_0x2e0d88(0x180)](_0x33bee1);}catch(_0xc671ed){const _0x4abbec=_0xc671ed instanceof Error?_0xc671ed[_0x2e0d88(0x14a)]:String(_0xc671ed);throw CliErrors[_0x2e0d88(0x160)](_0x344f56+_0x2e0d88(0x14c)+_0x4abbec);}if(!isPlainObject(_0xe873db)||Array[_0x2e0d88(0x151)](_0xe873db))throw CliErrors[_0x2e0d88(0x160)](_0x344f56+_0x2e0d88(0x17d));return _0xe873db;}export function validatePatchKeys(_0x2baf0f){const _0x38afe8=a65_0x29cf73,_0x38186e=Object['keys'](_0x2baf0f);if(_0x38186e[_0x38afe8(0x17a)]===0x0)throw CliErrors['validation'](_0x38afe8(0x146));for(const _0x526b69 of _0x38186e){if(FORBIDDEN_FIELD_KEYS[_0x38afe8(0x137)](_0x526b69))throw CliErrors['validation']('Forbidden\x20patch\x20key:\x20'+_0x526b69);if(!MUTABLE_FIELD_KEYS[_0x38afe8(0x137)](_0x526b69))throw CliErrors['validation'](_0x38afe8(0x15c)+_0x526b69,_0x38afe8(0x179)+Array[_0x38afe8(0x172)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x4848d1,_0x279168){const _0x4e08c1=a65_0x29cf73;validatePatchKeys(_0x279168);const _0x4becba=deepClone(_0x4848d1),_0x19c58f=new Set();for(const [_0x36f76e,_0x998510]of Object[_0x4e08c1(0x16f)](_0x279168)){const _0x374b86=_0x4becba[_0x36f76e],_0x424987=mergePatchValue(_0x374b86,_0x998510);!deepEqual(_0x374b86,_0x424987)&&(_0x4becba[_0x36f76e]=_0x424987,_0x19c58f[_0x4e08c1(0x158)](_0x36f76e),collectChangedPaths(_0x36f76e,_0x374b86,_0x424987,_0x19c58f));}return{'after':_0x4becba,'changedPaths':Array[_0x4e08c1(0x172)](_0x19c58f)[_0x4e08c1(0x13b)](),'changed':_0x19c58f['size']>0x0};}export function assertExpectation(_0x55215d,_0x3a59ac){const _0xc00b65=a65_0x29cf73;if(!_0x3a59ac)return;for(const [_0x2e47dc,_0x2c1163]of Object[_0xc00b65(0x16f)](_0x3a59ac)){const _0x10dd6a=_0x55215d[_0x2e47dc];if(!deepEqual(_0x10dd6a,_0x2c1163))throw CliErrors[_0xc00b65(0x160)](_0xc00b65(0x147)+_0x2e47dc,_0xc00b65(0x163)+JSON[_0xc00b65(0x182)](_0x2c1163)+_0xc00b65(0x16a)+JSON[_0xc00b65(0x182)](_0x10dd6a));}}export async function buildDatasetFieldUpdateResult({appCode:_0x2a5909,input:_0x134d95,dryRun:_0x44af11}){const _0x11ecbf=a65_0x29cf73;validateInput(_0x134d95);const _0x1f4ec3=await getDatasetDetail(_0x134d95[_0x11ecbf(0x13f)]),_0x407043=readFieldArray(_0x1f4ec3),_0x48bbe6=_0x407043['findIndex'](_0xd2a84e=>_0xd2a84e?.[_0x11ecbf(0x13c)]===_0x134d95[_0x11ecbf(0x17e)]);if(_0x48bbe6<0x0)throw CliErrors[_0x11ecbf(0x160)](_0x11ecbf(0x17f)+_0x134d95[_0x11ecbf(0x17e)]);const _0x43934a=deepClone(_0x407043[_0x48bbe6]);assertExpectation(_0x43934a,_0x134d95[_0x11ecbf(0x167)]);const {after:_0x322676,changedPaths:_0x2d31ea,changed:_0x29f4fa}=applyFieldPatch(_0x43934a,_0x134d95[_0x11ecbf(0x159)]),_0x5015b7=summarizeDataset(_0x1f4ec3,_0x134d95[_0x11ecbf(0x13f)]);return _0x29f4fa&&!_0x44af11&&(_0x407043[_0x48bbe6]=_0x322676,await updateDrivenData(_0x1f4ec3)),{'ok':!![],'data':{'appCode':_0x2a5909,'selector':{'code':_0x134d95[_0x11ecbf(0x13f)]},'dataset':_0x5015b7,'field':{'id':_0x43934a['id']??null,'name':_0x43934a[_0x11ecbf(0x13c)]},'dryRun':_0x44af11,'changed':_0x29f4fa,'changedPaths':_0x2d31ea,'before':_0x43934a,'after':_0x322676,'submitted':_0x29f4fa&&!_0x44af11},'message':_0x29f4fa?_0x44af11?_0x11ecbf(0x156)+_0x134d95[_0x11ecbf(0x17e)]+_0x11ecbf(0x177)+_0x2d31ea[_0x11ecbf(0x16c)](',\x20')+')':_0x11ecbf(0x164)+_0x134d95[_0x11ecbf(0x17e)]+'\x20('+_0x2d31ea[_0x11ecbf(0x16c)](',\x20')+')':_0x11ecbf(0x15b)+_0x134d95[_0x11ecbf(0x17e)]};}export const datasetFieldUpdate={'service':a65_0x29cf73(0x17c),'command':'field-update','description':a65_0x29cf73(0x14d),'risk':a65_0x29cf73(0x169),'flags':[CODE_FLAG,{'name':a65_0x29cf73(0x17e),'type':'string','required':!![],'description':a65_0x29cf73(0x170)},{'name':a65_0x29cf73(0x165),'type':a65_0x29cf73(0x175),'required':!![],'description':a65_0x29cf73(0x142)},{'name':'expect-json','type':a65_0x29cf73(0x175),'required':![],'description':a65_0x29cf73(0x14b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e26f7){validateInput(readFieldUpdateInput(_0x5e26f7));},async 'dryRun'(_0x55bcb3){const _0x3d3a43=a65_0x29cf73,_0x4746cd=await buildDatasetFieldUpdateResult({'appCode':_0x55bcb3[_0x3d3a43(0x13d)],'input':readFieldUpdateInput(_0x55bcb3),'dryRun':!![]});return{'method':'POST','url':_0x3d3a43(0x162),'body':_0x4746cd['data'],'description':_0x4746cd[_0x3d3a43(0x14a)]};},async 'execute'(_0x47c11e){const _0x2edee8=a65_0x29cf73;return buildDatasetFieldUpdateResult({'appCode':_0x47c11e[_0x2edee8(0x13d)],'input':readFieldUpdateInput(_0x47c11e),'dryRun':![]});}};function readFieldUpdateInput(_0x31df0f){const _0xf84d3e=a65_0x29cf73,_0x2f38cc=trim(_0x31df0f[_0xf84d3e(0x143)]('code')),_0x3fab30=emptyToUndefined(_0x31df0f[_0xf84d3e(0x143)](_0xf84d3e(0x17e))),_0x1f8581=parseJsonObjectFlag(_0x31df0f[_0xf84d3e(0x143)](_0xf84d3e(0x165)),'--patch-json'),_0x5d63d2=parseJsonObjectFlag(_0x31df0f['str'](_0xf84d3e(0x13a)),'--expect-json');return{'code':_0x2f38cc,'field':_0x3fab30||'','patch':_0x1f8581||{},'expect':_0x5d63d2};}function validateInput(_0xbe5202){const _0x11a4f6=a65_0x29cf73;if(!_0xbe5202[_0x11a4f6(0x13f)])throw CliErrors[_0x11a4f6(0x160)](_0x11a4f6(0x173));if(!_0xbe5202['field'])throw CliErrors[_0x11a4f6(0x160)](_0x11a4f6(0x161));validatePatchKeys(_0xbe5202[_0x11a4f6(0x159)]);}function readFieldArray(_0xf004c2){const _0x1c7d33=a65_0x29cf73;if(Array[_0x1c7d33(0x151)](_0xf004c2[_0x1c7d33(0x17b)]))return _0xf004c2[_0x1c7d33(0x17b)];if(Array[_0x1c7d33(0x151)](_0xf004c2[_0x1c7d33(0x171)]))return _0xf004c2[_0x1c7d33(0x171)];throw CliErrors[_0x1c7d33(0x160)](_0x1c7d33(0x15f));}function summarizeDataset(_0x1473a1,_0x1e4dca){const _0x52a325=a65_0x29cf73,_0x231e35=isPlainObject(_0x1473a1[_0x52a325(0x17c)])?_0x1473a1[_0x52a325(0x17c)]:{},_0x42ed0b=isPlainObject(_0x1473a1[_0x52a325(0x16d)])?_0x1473a1[_0x52a325(0x16d)]:{};return{'id':_0x1473a1[_0x52a325(0x16e)]??_0x1473a1['id']??_0x231e35[_0x52a325(0x15d)]??null,'code':_0x1473a1[_0x52a325(0x14e)]??_0x1473a1[_0x52a325(0x13f)]??_0x231e35[_0x52a325(0x148)]??_0x1e4dca,'name':_0x1473a1[_0x52a325(0x13c)]??_0x231e35['datasetName']??null,'table':_0x42ed0b[_0x52a325(0x13e)]??_0x231e35['tableName']??null,'db':_0x42ed0b['dbName']??_0x42ed0b[_0x52a325(0x141)]??null};}function mergePatchValue(_0x3592be,_0xb4d2a0){if(isPlainObject(_0x3592be)&&isPlainObject(_0xb4d2a0))return deepMerge(_0x3592be,_0xb4d2a0);return deepClone(_0xb4d2a0);}function deepMerge(_0x1b6202,_0x3a5073){const _0x2641d5=a65_0x29cf73,_0x12f6ef=deepClone(_0x1b6202);for(const [_0x81ffe9,_0x3c2e59]of Object[_0x2641d5(0x16f)](_0x3a5073)){_0x12f6ef[_0x81ffe9]=isPlainObject(_0x12f6ef[_0x81ffe9])&&isPlainObject(_0x3c2e59)?deepMerge(_0x12f6ef[_0x81ffe9],_0x3c2e59):deepClone(_0x3c2e59);}return _0x12f6ef;}function collectChangedPaths(_0xc6956c,_0x1fb178,_0x47499b,_0x1a504a){const _0x53deb6=a65_0x29cf73;if(!isPlainObject(_0x1fb178)||!isPlainObject(_0x47499b))return;const _0x30db7b=new Set([...Object['keys'](_0x1fb178),...Object[_0x53deb6(0x155)](_0x47499b)]);for(const _0x5a9ff2 of _0x30db7b){const _0xc889d0=_0x1fb178[_0x5a9ff2],_0x332a85=_0x47499b[_0x5a9ff2];!deepEqual(_0xc889d0,_0x332a85)&&_0x1a504a[_0x53deb6(0x158)](_0xc6956c+'.'+_0x5a9ff2);}}function deepClone(_0x17424f){const _0xaa93dd=a65_0x29cf73;if(_0x17424f===undefined)return _0x17424f;return JSON[_0xaa93dd(0x180)](JSON[_0xaa93dd(0x182)](_0x17424f));}function deepEqual(_0x34c6a1,_0x51a4bf){const _0x3d7700=a65_0x29cf73;return JSON['stringify'](_0x34c6a1)===JSON[_0x3d7700(0x182)](_0x51a4bf);}function a65_0x1f3a(_0x17ad1a,_0xf92c98){_0x17ad1a=_0x17ad1a-0x136;const _0x4cdb7c=a65_0x4cdb();let _0x1f3a62=_0x4cdb7c[_0x17ad1a];return _0x1f3a62;}function isPlainObject(_0x887bcd){const _0x5ee22c=a65_0x29cf73;return Boolean(_0x887bcd)&&typeof _0x887bcd===_0x5ee22c(0x150)&&!Array['isArray'](_0x887bcd);}function emptyToUndefined(_0xd2d4cc){const _0x2c3c87=String(_0xd2d4cc||'')['trim']();return _0x2c3c87||undefined;}function a65_0x4cdb(){const _0xc85c60=['description','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','validation','--field\x20is\x20required','/smartapi/dataset/update-driven-data','Expected\x20','Updated\x20dataset\x20field\x20','patch-json','pkField','expect','1307615LUPIcv','write',',\x20actual\x20','required','join','dbtableConfig','modelId','entries','Exact\x20raw\x20fields[].name\x20to\x20patch','properties','from','--code\x20is\x20required','dbTypeScale','string','systemRetain','\x20would\x20change\x20(','1263834JiRaWY','Allowed\x20keys:\x20','length','fields','dataset','\x20must\x20be\x20a\x20JSON\x20object','field','Field\x20not\x20found:\x20','parse','3535563nntmTs','stringify','4QnRQFh','options','has','dbType','13447044AdEXFt','expect-json','sort','name','appCode','tableName','code','dbFieldName','dbId','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','str','dbTypeLen','7033404DZrhBx','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Expectation\x20mismatch\x20at\x20','datasetCode','8gayGMl','message','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','modelCode','2328308LUsxqv','object','isArray','deprecated','734779peKMLz','autoIncrement','keys','Dry-run:\x20dataset\x20field\x20','trim','add','patch','deleted','No\x20changes\x20for\x20dataset\x20field\x20','Unsupported\x20patch\x20key:\x20','datasetId'];a65_0x4cdb=function(){return _0xc85c60;};return a65_0x4cdb();}function trim(_0x7f28a2){const _0x32e486=a65_0x29cf73;return String(_0x7f28a2||'')[_0x32e486(0x157)]();}
|
|
1
|
+
const a65_0x52d9ef=a65_0x1649;(function(_0x1f195e,_0xd2d30){const _0x2926c4=a65_0x1649,_0x4d9ff5=_0x1f195e();while(!![]){try{const _0x304c3e=parseInt(_0x2926c4(0xa2))/0x1*(parseInt(_0x2926c4(0x6b))/0x2)+parseInt(_0x2926c4(0x9f))/0x3+parseInt(_0x2926c4(0x96))/0x4+parseInt(_0x2926c4(0xa7))/0x5+parseInt(_0x2926c4(0x93))/0x6*(-parseInt(_0x2926c4(0x83))/0x7)+-parseInt(_0x2926c4(0xac))/0x8+-parseInt(_0x2926c4(0xa4))/0x9;if(_0x304c3e===_0xd2d30)break;else _0x4d9ff5['push'](_0x4d9ff5['shift']());}catch(_0x16c5f7){_0x4d9ff5['push'](_0x4d9ff5['shift']());}}}(a65_0x23d7,0x4acbf));function a65_0x1649(_0x47e270,_0x14365c){_0x47e270=_0x47e270-0x69;const _0x23d766=a65_0x23d7();let _0x164924=_0x23d766[_0x47e270];return _0x164924;}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([a65_0x52d9ef(0x97),a65_0x52d9ef(0x9b),a65_0x52d9ef(0x8c),'options','required',a65_0x52d9ef(0xb2),'defaultAggregation',a65_0x52d9ef(0xae),'deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x52d9ef(0xa5),'code',a65_0x52d9ef(0x69),'dbTypeLen',a65_0x52d9ef(0x8b),a65_0x52d9ef(0x94),a65_0x52d9ef(0x91),a65_0x52d9ef(0x8e),'pkField',a65_0x52d9ef(0x75),a65_0x52d9ef(0x78)]);export function parseJsonObjectFlag(_0x2d5a7d,_0x525c7b){const _0x446359=a65_0x52d9ef;if(!_0x2d5a7d)return undefined;let _0x410d35;try{_0x410d35=JSON[_0x446359(0xb1)](_0x2d5a7d);}catch(_0x4e319b){const _0x39d097=_0x4e319b instanceof Error?_0x4e319b[_0x446359(0x7a)]:String(_0x4e319b);throw CliErrors[_0x446359(0x72)](_0x525c7b+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x39d097);}if(!isPlainObject(_0x410d35)||Array[_0x446359(0x88)](_0x410d35))throw CliErrors[_0x446359(0x72)](_0x525c7b+_0x446359(0xa3));return _0x410d35;}export function validatePatchKeys(_0x4c2665){const _0x8d1a44=a65_0x52d9ef,_0x1b42e9=Object[_0x8d1a44(0x82)](_0x4c2665);if(_0x1b42e9[_0x8d1a44(0x9a)]===0x0)throw CliErrors[_0x8d1a44(0x72)](_0x8d1a44(0xb7));for(const _0x1c55bf of _0x1b42e9){if(FORBIDDEN_FIELD_KEYS[_0x8d1a44(0x6f)](_0x1c55bf))throw CliErrors['validation'](_0x8d1a44(0x71)+_0x1c55bf);if(!MUTABLE_FIELD_KEYS[_0x8d1a44(0x6f)](_0x1c55bf))throw CliErrors['validation'](_0x8d1a44(0xb3)+_0x1c55bf,_0x8d1a44(0x81)+Array[_0x8d1a44(0x85)](MUTABLE_FIELD_KEYS)[_0x8d1a44(0x70)](',\x20'));}}export function applyFieldPatch(_0x507dea,_0x4f80b9){const _0x4386b1=a65_0x52d9ef;validatePatchKeys(_0x4f80b9);const _0x3515a3=deepClone(_0x507dea),_0x3007eb=new Set();for(const [_0x2b5ee7,_0x5736b8]of Object[_0x4386b1(0xb4)](_0x4f80b9)){const _0x1f3094=_0x3515a3[_0x2b5ee7],_0x5519af=mergePatchValue(_0x1f3094,_0x5736b8);!deepEqual(_0x1f3094,_0x5519af)&&(_0x3515a3[_0x2b5ee7]=_0x5519af,_0x3007eb['add'](_0x2b5ee7),collectChangedPaths(_0x2b5ee7,_0x1f3094,_0x5519af,_0x3007eb));}return{'after':_0x3515a3,'changedPaths':Array[_0x4386b1(0x85)](_0x3007eb)['sort'](),'changed':_0x3007eb[_0x4386b1(0x8d)]>0x0};}export function assertExpectation(_0x2180ef,_0x3fb6a6){const _0x54f84a=a65_0x52d9ef;if(!_0x3fb6a6)return;for(const [_0xa50521,_0x2f7102]of Object['entries'](_0x3fb6a6)){const _0xd791d9=_0x2180ef[_0xa50521];if(!deepEqual(_0xd791d9,_0x2f7102))throw CliErrors[_0x54f84a(0x72)](_0x54f84a(0x7c)+_0xa50521,'Expected\x20'+JSON['stringify'](_0x2f7102)+_0x54f84a(0x92)+JSON['stringify'](_0xd791d9));}}export async function buildDatasetFieldUpdateResult({appCode:_0x32df59,input:_0x4e97f8,dryRun:_0x5e8814}){const _0xf3fb9c=a65_0x52d9ef;validateInput(_0x4e97f8);const _0x37fa12=await getDatasetDetail(_0x4e97f8['code']),_0x130bc7=readFieldArray(_0x37fa12),_0x3d0e32=_0x130bc7[_0xf3fb9c(0xaf)](_0x4b8fd1=>_0x4b8fd1?.[_0xf3fb9c(0xa5)]===_0x4e97f8[_0xf3fb9c(0x77)]);if(_0x3d0e32<0x0)throw CliErrors[_0xf3fb9c(0x72)](_0xf3fb9c(0xaa)+_0x4e97f8[_0xf3fb9c(0x77)]);const _0x2961c7=deepClone(_0x130bc7[_0x3d0e32]);assertExpectation(_0x2961c7,_0x4e97f8[_0xf3fb9c(0x95)]);const {after:_0x1d6df6,changedPaths:_0x282415,changed:_0x42b24c}=applyFieldPatch(_0x2961c7,_0x4e97f8['patch']),_0x3b6567=summarizeDataset(_0x37fa12,_0x4e97f8[_0xf3fb9c(0xa8)]);return _0x42b24c&&!_0x5e8814&&(_0x130bc7[_0x3d0e32]=_0x1d6df6,await updateDrivenData(_0x37fa12)),{'ok':!![],'data':{'appCode':_0x32df59,'selector':{'code':_0x4e97f8[_0xf3fb9c(0xa8)]},'dataset':_0x3b6567,'field':{'id':_0x2961c7['id']??null,'name':_0x2961c7[_0xf3fb9c(0xa5)]},'dryRun':_0x5e8814,'changed':_0x42b24c,'changedPaths':_0x282415,'before':_0x2961c7,'after':_0x1d6df6,'submitted':_0x42b24c&&!_0x5e8814},'message':_0x42b24c?_0x5e8814?_0xf3fb9c(0x86)+_0x4e97f8['field']+_0xf3fb9c(0xab)+_0x282415[_0xf3fb9c(0x70)](',\x20')+')':_0xf3fb9c(0x9e)+_0x4e97f8['field']+'\x20('+_0x282415[_0xf3fb9c(0x70)](',\x20')+')':_0xf3fb9c(0xa1)+_0x4e97f8[_0xf3fb9c(0x77)]};}export const datasetFieldUpdate={'service':a65_0x52d9ef(0x7b),'command':a65_0x52d9ef(0x9c),'description':a65_0x52d9ef(0x98),'risk':a65_0x52d9ef(0xad),'flags':[CODE_FLAG,{'name':a65_0x52d9ef(0x77),'type':a65_0x52d9ef(0x79),'required':!![],'description':a65_0x52d9ef(0xb9)},{'name':'patch-json','type':a65_0x52d9ef(0x79),'required':!![],'description':a65_0x52d9ef(0x8f)},{'name':a65_0x52d9ef(0x76),'type':a65_0x52d9ef(0x79),'required':![],'description':a65_0x52d9ef(0x7e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x551863){validateInput(readFieldUpdateInput(_0x551863));},async 'dryRun'(_0x51bad8){const _0x10f838=a65_0x52d9ef,_0x3b7452=await buildDatasetFieldUpdateResult({'appCode':_0x51bad8[_0x10f838(0x84)],'input':readFieldUpdateInput(_0x51bad8),'dryRun':!![]});return{'method':_0x10f838(0xb0),'url':_0x10f838(0x7d),'body':_0x3b7452['data'],'description':_0x3b7452[_0x10f838(0x7a)]};},async 'execute'(_0x2b5da8){return buildDatasetFieldUpdateResult({'appCode':_0x2b5da8['appCode'],'input':readFieldUpdateInput(_0x2b5da8),'dryRun':![]});}};function readFieldUpdateInput(_0x3c4656){const _0x178310=a65_0x52d9ef,_0x5be6e2=trim(_0x3c4656[_0x178310(0x6e)](_0x178310(0xa8))),_0x4ae4de=emptyToUndefined(_0x3c4656['str'](_0x178310(0x77))),_0xa29c05=parseJsonObjectFlag(_0x3c4656['str'](_0x178310(0xa9)),_0x178310(0x89)),_0x48c5e4=parseJsonObjectFlag(_0x3c4656[_0x178310(0x6e)](_0x178310(0x76)),_0x178310(0x73));return{'code':_0x5be6e2,'field':_0x4ae4de||'','patch':_0xa29c05||{},'expect':_0x48c5e4};}function validateInput(_0x28d9bd){const _0x1009f3=a65_0x52d9ef;if(!_0x28d9bd['code'])throw CliErrors[_0x1009f3(0x72)](_0x1009f3(0x6a));if(!_0x28d9bd[_0x1009f3(0x77)])throw CliErrors[_0x1009f3(0x72)](_0x1009f3(0xb6));validatePatchKeys(_0x28d9bd[_0x1009f3(0x87)]);}function a65_0x23d7(){const _0x4e4da7=['753612YOmKwv','dbFieldName','expect','1166756nYxYNm','doType','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','dbtableConfig','length','displayName','field-update','datasetId','Updated\x20dataset\x20field\x20','990750FxNXaY','stringify','No\x20changes\x20for\x20dataset\x20field\x20','60267yYzyVA','\x20must\x20be\x20a\x20JSON\x20object','1629882yKEfvO','name','add','1448605ZQlJqr','code','patch-json','Field\x20not\x20found:\x20','\x20would\x20change\x20(','2830336WNWAFZ','write','chartRole','findIndex','POST','parse','datetimeFormat','Unsupported\x20patch\x20key:\x20','entries','fields','--field\x20is\x20required','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','object','Exact\x20raw\x20fields[].name\x20to\x20patch','dbType','--code\x20is\x20required','6FOWbww','dbId','properties','str','has','join','Forbidden\x20patch\x20key:\x20','validation','--expect-json','modelId','autoIncrement','expect-json','field','systemRetain','string','message','dataset','Expectation\x20mismatch\x20at\x20','/smartapi/dataset/update-driven-data','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','modelCode','datasetName','Allowed\x20keys:\x20','keys','14SfMimi','appCode','from','Dry-run:\x20dataset\x20field\x20','patch','isArray','--patch-json','trim','dbTypeScale','description','size','deleted','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','tableName',',\x20actual\x20'];a65_0x23d7=function(){return _0x4e4da7;};return a65_0x23d7();}function readFieldArray(_0x30e789){const _0x283136=a65_0x52d9ef;if(Array[_0x283136(0x88)](_0x30e789[_0x283136(0xb5)]))return _0x30e789['fields'];if(Array[_0x283136(0x88)](_0x30e789[_0x283136(0x6d)]))return _0x30e789[_0x283136(0x6d)];throw CliErrors['validation'](_0x283136(0x90));}function summarizeDataset(_0x4bd401,_0x49f647){const _0x5d1c17=a65_0x52d9ef,_0x218f46=isPlainObject(_0x4bd401[_0x5d1c17(0x7b)])?_0x4bd401[_0x5d1c17(0x7b)]:{},_0x4d9ad8=isPlainObject(_0x4bd401[_0x5d1c17(0x99)])?_0x4bd401[_0x5d1c17(0x99)]:{};return{'id':_0x4bd401[_0x5d1c17(0x74)]??_0x4bd401['id']??_0x218f46[_0x5d1c17(0x9d)]??null,'code':_0x4bd401[_0x5d1c17(0x7f)]??_0x4bd401['code']??_0x218f46['datasetCode']??_0x49f647,'name':_0x4bd401[_0x5d1c17(0xa5)]??_0x218f46[_0x5d1c17(0x80)]??null,'table':_0x4d9ad8['tableName']??_0x218f46[_0x5d1c17(0x91)]??null,'db':_0x4d9ad8['dbName']??_0x4d9ad8[_0x5d1c17(0x6c)]??null};}function mergePatchValue(_0x5be09e,_0x4b7e58){if(isPlainObject(_0x5be09e)&&isPlainObject(_0x4b7e58))return deepMerge(_0x5be09e,_0x4b7e58);return deepClone(_0x4b7e58);}function deepMerge(_0x4818bc,_0x5c1e12){const _0x129acf=a65_0x52d9ef,_0x2ebbc7=deepClone(_0x4818bc);for(const [_0x1dbd4b,_0x20cddf]of Object[_0x129acf(0xb4)](_0x5c1e12)){_0x2ebbc7[_0x1dbd4b]=isPlainObject(_0x2ebbc7[_0x1dbd4b])&&isPlainObject(_0x20cddf)?deepMerge(_0x2ebbc7[_0x1dbd4b],_0x20cddf):deepClone(_0x20cddf);}return _0x2ebbc7;}function collectChangedPaths(_0x18e7f3,_0x3023ed,_0x156625,_0x2405b8){const _0x33c702=a65_0x52d9ef;if(!isPlainObject(_0x3023ed)||!isPlainObject(_0x156625))return;const _0x543563=new Set([...Object[_0x33c702(0x82)](_0x3023ed),...Object[_0x33c702(0x82)](_0x156625)]);for(const _0x17415b of _0x543563){const _0x2e5730=_0x3023ed[_0x17415b],_0x18b72f=_0x156625[_0x17415b];!deepEqual(_0x2e5730,_0x18b72f)&&_0x2405b8[_0x33c702(0xa6)](_0x18e7f3+'.'+_0x17415b);}}function deepClone(_0x6a6d02){const _0x23b72a=a65_0x52d9ef;if(_0x6a6d02===undefined)return _0x6a6d02;return JSON[_0x23b72a(0xb1)](JSON['stringify'](_0x6a6d02));}function deepEqual(_0x21776a,_0x3bbfbe){const _0x56afa8=a65_0x52d9ef;return JSON[_0x56afa8(0xa0)](_0x21776a)===JSON['stringify'](_0x3bbfbe);}function isPlainObject(_0x38e75e){const _0x55fe65=a65_0x52d9ef;return Boolean(_0x38e75e)&&typeof _0x38e75e===_0x55fe65(0xb8)&&!Array[_0x55fe65(0x88)](_0x38e75e);}function emptyToUndefined(_0x19e11f){const _0x3123fc=a65_0x52d9ef,_0xd15dd9=String(_0x19e11f||'')[_0x3123fc(0x8a)]();return _0xd15dd9||undefined;}function trim(_0x3878f8){const _0x11a591=a65_0x52d9ef;return String(_0x3878f8||'')[_0x11a591(0x8a)]();}
|