@lovrabet/rabetbase-cli 2.3.15-beta.1 → 2.3.15-beta.2
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/rename.js +1 -0
- 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
|
-
(function(
|
|
1
|
+
(function(_0x216236,_0x33b234){const _0x18af6c=a52_0xb726,_0x8c6640=_0x216236();while(!![]){try{const _0x544a7e=-parseInt(_0x18af6c(0xa4))/0x1*(-parseInt(_0x18af6c(0x9d))/0x2)+-parseInt(_0x18af6c(0xa5))/0x3+parseInt(_0x18af6c(0xa2))/0x4+parseInt(_0x18af6c(0xa0))/0x5+parseInt(_0x18af6c(0xa3))/0x6+-parseInt(_0x18af6c(0x9f))/0x7*(-parseInt(_0x18af6c(0xa1))/0x8)+-parseInt(_0x18af6c(0x9e))/0x9;if(_0x544a7e===_0x33b234)break;else _0x8c6640['push'](_0x8c6640['shift']());}catch(_0x3d5e76){_0x8c6640['push'](_0x8c6640['shift']());}}}(a52_0x1694,0xcea30));import{configListDefinition}from'../../commands/config/list.js';function a52_0xb726(_0x1be321,_0x4ad68d){_0x1be321=_0x1be321-0x9d;const _0x169462=a52_0x1694();let _0xb72628=_0x169462[_0x1be321];return _0xb72628;}function a52_0x1694(){const _0xb13903=['5194868lWmwkn','737280WUJOSC','10iaurUJ','1831215diWpEY','230210dTpSAr','24154254mOodlm','35kCoVZe','7526065jGRVgy','100376pyGhpk'];a52_0x1694=function(){return _0xb13903;};return a52_0x1694();}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
|
+
function a53_0x11b1(_0xd2d9c5,_0x2749eb){_0xd2d9c5=_0xd2d9c5-0x145;const _0x47d6f9=a53_0x47d6();let _0x11b114=_0x47d6f9[_0xd2d9c5];return _0x11b114;}const a53_0x29b374=a53_0x11b1;(function(_0x5c94c9,_0x4ba225){const _0x34ebeb=a53_0x11b1,_0x441e88=_0x5c94c9();while(!![]){try{const _0x2f405a=-parseInt(_0x34ebeb(0x14d))/0x1+parseInt(_0x34ebeb(0x145))/0x2+-parseInt(_0x34ebeb(0x146))/0x3+parseInt(_0x34ebeb(0x151))/0x4*(parseInt(_0x34ebeb(0x14e))/0x5)+-parseInt(_0x34ebeb(0x148))/0x6*(-parseInt(_0x34ebeb(0x14c))/0x7)+-parseInt(_0x34ebeb(0x150))/0x8+parseInt(_0x34ebeb(0x14a))/0x9;if(_0x2f405a===_0x4ba225)break;else _0x441e88['push'](_0x441e88['shift']());}catch(_0x3069a7){_0x441e88['push'](_0x441e88['shift']());}}}(a53_0x47d6,0xa1720));function a53_0x47d6(){const _0x36912a=['boolean','1985158gobNAW','905847RMhYyK','config','270EJVhBf','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','7768872obzCke','List\x20all\x20config\x20values','23569cNmFEw','1087827Kvqkjw','1156115NJQcCT','list','1499752YGQqno','4chTODt','read','global'];a53_0x47d6=function(){return _0x36912a;};return a53_0x47d6();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x59ff8b){const _0x23efb9=a53_0x11b1,_0x5da112=_0x59ff8b['bool'](_0x23efb9(0x153))?readScopedConfig(_0x23efb9(0x153)):readConfig();return{'ok':!![],'data':_0x5da112};}export const configListDefinition={'service':a53_0x29b374(0x147),'command':a53_0x29b374(0x14f),'description':a53_0x29b374(0x14b),'risk':a53_0x29b374(0x152),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x29b374(0x153),'type':a53_0x29b374(0x154),'description':a53_0x29b374(0x149),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x33dd0a=a54_0x5bd2;function a54_0x5bd2(_0x5089d4,_0x30a35d){_0x5089d4=_0x5089d4-0x15c;const _0x39d5f2=a54_0x39d5();let _0x5bd2f1=_0x39d5f2[_0x5089d4];return _0x5bd2f1;}(function(_0x211765,_0x2cac87){const _0x1f5906=a54_0x5bd2,_0x2c1696=_0x211765();while(!![]){try{const _0x3dbc3e=-parseInt(_0x1f5906(0x168))/0x1+-parseInt(_0x1f5906(0x17a))/0x2+parseInt(_0x1f5906(0x162))/0x3*(parseInt(_0x1f5906(0x18e))/0x4)+parseInt(_0x1f5906(0x163))/0x5+-parseInt(_0x1f5906(0x171))/0x6*(parseInt(_0x1f5906(0x17f))/0x7)+parseInt(_0x1f5906(0x167))/0x8*(parseInt(_0x1f5906(0x17d))/0x9)+parseInt(_0x1f5906(0x17e))/0xa*(parseInt(_0x1f5906(0x173))/0xb);if(_0x3dbc3e===_0x2cac87)break;else _0x2c1696['push'](_0x2c1696['shift']());}catch(_0x1b8c23){_0x2c1696['push'](_0x2c1696['shift']());}}}(a54_0x39d5,0x83aa5));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a54_0x39d5(){const _0x2e552a=['Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','global','4sXxxqw','Invalid\x20value\x20for\x20\x22','apps','Usage:\x20','Settable\x20top-level\x20keys:\x20','Global','Top-level\x20key\x20\x22','object','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','3019182zlEvpr','1040775IjRDbo','string','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','315992ddxrFA','114172QxpAOQ','str','validation','\x20appcode\x20set\x20to:\x20','locale','Invalid\x20locale\x20value.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','bool','key','6198ZlqSJv','config','297fJZSaJ','env','Missing\x20key.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Use\x20`','Set\x20a\x20config\x20value','Project','968136LsGnci','app','value','108vsOMyM','2910SItMVS','3787lAKIAA','includes','length','\x22\x20is\x20not\x20settable.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Config\x20value','`,\x20`','set','join','\x22.\x20Allowed:\x20','appcode','\x20set\x20to:\x20','write'];a54_0x39d5=function(){return _0x2e552a;};return a54_0x39d5();}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(_0x352057){const _0x452527=a54_0x5bd2,_0x3de9a8=_0x352057[_0x452527(0x169)](_0x452527(0x170)),_0x56aea7=_0x352057[_0x452527(0x169)](_0x452527(0x17c));if(!_0x3de9a8)throw CliErrors[_0x452527(0x16a)](_0x452527(0x175),'Usage:\x20'+CLI_BIN_NAME+_0x452527(0x176));if(_0x56aea7===undefined||_0x56aea7==='')throw CliErrors[_0x452527(0x16a)]('Missing\x20value.',_0x452527(0x191)+CLI_BIN_NAME+_0x452527(0x176));if(_0x56aea7['length']>0x1f4)throw CliErrors[_0x452527(0x16a)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x3de9a8))throw CliErrors['validation'](_0x452527(0x15e)+_0x3de9a8+_0x452527(0x182),_0x452527(0x15c)+getTopLevelConfigKeySummary());if(_0x3de9a8==='riskLevel')throw CliErrors[_0x452527(0x16a)](_0x452527(0x161));if(CONFIG_ENUM_VALUES[_0x3de9a8]&&!CONFIG_ENUM_VALUES[_0x3de9a8][_0x452527(0x180)](_0x56aea7))throw CliErrors[_0x452527(0x16a)](_0x452527(0x18f)+_0x3de9a8+_0x452527(0x188)+CONFIG_ENUM_VALUES[_0x3de9a8][_0x452527(0x187)](',\x20'));if(_0x3de9a8===_0x452527(0x16c)&&!normalizeLocale(_0x56aea7))throw CliErrors[_0x452527(0x16a)](_0x452527(0x16d),_0x452527(0x166));const _0x29ba1d={'global':_0x352057[_0x452527(0x16f)](_0x452527(0x18d))},_0x3230cb=resolveWriteScope(_0x29ba1d),_0x50f92d=readScopedConfig(_0x3230cb);let _0x3e7df8=_0x3de9a8,_0x2e2d14=_0x56aea7;_0x3de9a8===_0x452527(0x17b)&&(_0x3e7df8=_0x452527(0x189),delete _0x50f92d[_0x452527(0x17b)]);_0x3de9a8===_0x452527(0x16c)&&(_0x2e2d14=normalizeLocale(_0x56aea7));if(_0x3de9a8===_0x452527(0x174)){_0x2e2d14=normalizeEnv(_0x56aea7);if(!isProduction(_0x2e2d14)&&!isDaily(_0x2e2d14))throw CliErrors[_0x452527(0x16a)](_0x452527(0x183),_0x452527(0x18c));}if(_0x3de9a8===_0x452527(0x189)){const _0x1cecf6=_0x50f92d[_0x452527(0x190)]&&typeof _0x50f92d[_0x452527(0x190)]===_0x452527(0x15f)?Object['keys'](_0x50f92d[_0x452527(0x190)]):[];if(_0x1cecf6[_0x452527(0x181)]>0x0)throw CliErrors['validation'](_0x452527(0x16e),_0x452527(0x177)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0x2e2d14+_0x452527(0x185)+CLI_BIN_NAME+_0x452527(0x165));const _0x41a602=buildCanonicalProjectConfig({..._0x50f92d},{'appCodes':[_0x2e2d14],'env':typeof _0x50f92d[_0x452527(0x174)]==='string'?_0x50f92d[_0x452527(0x174)]:undefined});writeScopedConfig(_0x41a602,_0x3230cb);const _0x2d49aa=_0x3230cb===_0x452527(0x18d)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x2d49aa+_0x452527(0x16b)+_0x2e2d14+_0x452527(0x160)};}_0x50f92d[_0x3e7df8]=_0x2e2d14,writeScopedConfig(_0x50f92d,_0x3230cb);const _0x23ffa9=_0x3230cb===_0x452527(0x18d)?_0x452527(0x15d):_0x452527(0x179);return{'ok':!![],'message':'✓\x20'+_0x23ffa9+'\x20'+_0x3e7df8+_0x452527(0x18a)+_0x2e2d14};}export const configSetDefinition={'service':a54_0x33dd0a(0x172),'command':a54_0x33dd0a(0x186),'description':a54_0x33dd0a(0x178),'risk':a54_0x33dd0a(0x18b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x33dd0a(0x170),'type':a54_0x33dd0a(0x164),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x33dd0a(0x17c),'type':'string','description':a54_0x33dd0a(0x184),'required':!![]},{'name':a54_0x33dd0a(0x18d),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24d4fd,_0x113393){var _0x47bf60=a55_0x4446,_0x14fd49=_0x24d4fd();while(!![]){try{var _0x17e2b6=parseInt(_0x47bf60(0x1c8))/0x1*(-parseInt(_0x47bf60(0x1c7))/0x2)+parseInt(_0x47bf60(0x1c2))/0x3*(-parseInt(_0x47bf60(0x1ca))/0x4)+parseInt(_0x47bf60(0x1cd))/0x5+parseInt(_0x47bf60(0x1c9))/0x6+parseInt(_0x47bf60(0x1c6))/0x7+parseInt(_0x47bf60(0x1c3))/0x8+-parseInt(_0x47bf60(0x1cb))/0x9;if(_0x17e2b6===_0x113393)break;else _0x14fd49['push'](_0x14fd49['shift']());}catch(_0x10a305){_0x14fd49['push'](_0x14fd49['shift']());}}}(a55_0x1650,0xb999a));function a55_0x4446(_0x2e4b76,_0x24eb15){_0x2e4b76=_0x2e4b76-0x1c2;var _0x16500b=a55_0x1650();var _0x4446a5=_0x16500b[_0x2e4b76];return _0x4446a5;}function a55_0x1650(){var _0x2c4cb2=['1170000CkMwXl','global','3287845SlbDoD','1114122ziiHTZ','9872976SGqHuz','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','1820217OHMMge','246WfhMsm','4397gSFYTI','4588938zlyuIQ','16KhJrRH'];a55_0x1650=function(){return _0x2c4cb2;};return a55_0x1650();}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};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1d576d){var _0x27274b=a55_0x4446;if(_0x1d576d[_0x27274b(0x1cc)])return _0x27274b(0x1cc);if(!isInProject())throw CliErrors['validation'](_0x27274b(0x1c5),_0x27274b(0x1c4)+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}export function readScopedConfig(_0x52e6b0){return readConfigFile(resolveWriteConfigPath(_0x52e6b0));}export function writeScopedConfig(_0x1d5a06,_0x372a9e){writeConfigFile(resolveWriteConfigPath(_0x372a9e),_0x1d5a06);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x295313=a56_0x557b;(function(_0x576e62,_0x122789){const _0x24d964=a56_0x557b,_0xa2d636=_0x576e62();while(!![]){try{const _0x454283=parseInt(_0x24d964(0xb6))/0x1*(-parseInt(_0x24d964(0xab))/0x2)+-parseInt(_0x24d964(0xb0))/0x3*(-parseInt(_0x24d964(0xa6))/0x4)+-parseInt(_0x24d964(0xb4))/0x5*(parseInt(_0x24d964(0xa7))/0x6)+parseInt(_0x24d964(0xa4))/0x7+-parseInt(_0x24d964(0xa9))/0x8*(-parseInt(_0x24d964(0xb1))/0x9)+-parseInt(_0x24d964(0xa5))/0xa+parseInt(_0x24d964(0xaa))/0xb;if(_0x454283===_0x122789)break;else _0xa2d636['push'](_0xa2d636['shift']());}catch(_0x105f50){_0xa2d636['push'](_0xa2d636['shift']());}}}(a56_0x5ebd,0x5de76));function a56_0x557b(_0x5c227c,_0x21591a){_0x5c227c=_0x5c227c-0xa4;const _0x5ebd5c=a56_0x5ebd();let _0x557bbe=_0x5ebd5c[_0x5c227c];return _0x557bbe;}function a56_0x5ebd(){const _0x335719=['6FiBAsV','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\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]','join','filter','3lKBTnA','387sLqzmU','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','5SXwCRe','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','196729MxDWSP','5082434zladZy','3706470qKIEpm','1826668uNsolm','791676mFvELV','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','3160DfmSZm','3054656ZtvhAL'];a56_0x5ebd=function(){return _0x335719;};return a56_0x5ebd();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a56_0x295313(0xaf),'operation':a56_0x295313(0xaf),'description':a56_0x295313(0xb2),'paramsRequired':![],'paramsHint':a56_0x295313(0xb5),'helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a56_0x295313(0xac),a56_0x295313(0xad),'\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}]',a56_0x295313(0xb3),a56_0x295313(0xa8)][a56_0x295313(0xae)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x5e9b83=a57_0x4574;function a57_0x358e(){const _0x2f6c22=['522252ljtvAZ','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','7cEfQaB','getOne','132328WEzfQE','199770zswdeA','68885cQQTgj','242050JUAvYm','805568OBHsfu','3451824sXHuDe'];a57_0x358e=function(){return _0x2f6c22;};return a57_0x358e();}function a57_0x4574(_0x3a30d4,_0x1236d5){_0x3a30d4=_0x3a30d4-0x6d;const _0x358e9b=a57_0x358e();let _0x4574d4=_0x358e9b[_0x3a30d4];return _0x4574d4;}(function(_0x24374e,_0x1f8d85){const _0x3a51d1=a57_0x4574,_0x25b9e0=_0x24374e();while(!![]){try{const _0x584b3c=-parseInt(_0x3a51d1(0x77))/0x1+-parseInt(_0x3a51d1(0x6f))/0x2+parseInt(_0x3a51d1(0x72))/0x3+-parseInt(_0x3a51d1(0x70))/0x4+-parseInt(_0x3a51d1(0x6e))/0x5+-parseInt(_0x3a51d1(0x6d))/0x6*(parseInt(_0x3a51d1(0x75))/0x7)+parseInt(_0x3a51d1(0x71))/0x8;if(_0x584b3c===_0x1f8d85)break;else _0x25b9e0['push'](_0x25b9e0['shift']());}catch(_0x3a4cb8){_0x25b9e0['push'](_0x25b9e0['shift']());}}}(a57_0x358e,0x19541));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x5e9b83(0x76),'operation':'getOne','description':a57_0x5e9b83(0x73),'paramsRequired':!![],'paramsHint':a57_0x5e9b83(0x74)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x281049,_0x5a73ce){const _0x375888=a58_0x4cb2,_0x5449c7=_0x281049();while(!![]){try{const _0x1ba8ab=-parseInt(_0x375888(0x17c))/0x1+-parseInt(_0x375888(0x179))/0x2*(-parseInt(_0x375888(0x17a))/0x3)+parseInt(_0x375888(0x180))/0x4*(parseInt(_0x375888(0x17e))/0x5)+parseInt(_0x375888(0x17b))/0x6*(parseInt(_0x375888(0x181))/0x7)+-parseInt(_0x375888(0x17d))/0x8+-parseInt(_0x375888(0x17f))/0x9+parseInt(_0x375888(0x178))/0xa;if(_0x1ba8ab===_0x5a73ce)break;else _0x5449c7['push'](_0x5449c7['shift']());}catch(_0x28da50){_0x5449c7['push'](_0x5449c7['shift']());}}}(a58_0x991d,0xec834));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a58_0x991d(){const _0x312055=['12625acXRAW','8644878pmclAx','844PiIHyz','6044892cnSkea','9082980LZAJAo','3104SXEnIB','249TboNoo','6LloNgn','492784vYXqoL','90904iEwUWW'];a58_0x991d=function(){return _0x312055;};return a58_0x991d();}function a58_0x4cb2(_0x3753d4,_0x31fc70){_0x3753d4=_0x3753d4-0x178;const _0x991d15=a58_0x991d();let _0x4cb24a=_0x991d15[_0x3753d4];return _0x4cb24a;}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x418b2a,_0x4eafa2){const _0x233dca=a59_0x1583,_0x546b72=_0x418b2a();while(!![]){try{const _0x14256c=-parseInt(_0x233dca(0x147))/0x1*(parseInt(_0x233dca(0x14f))/0x2)+parseInt(_0x233dca(0x13e))/0x3+-parseInt(_0x233dca(0x155))/0x4+-parseInt(_0x233dca(0x14d))/0x5+parseInt(_0x233dca(0x140))/0x6+parseInt(_0x233dca(0x14e))/0x7+parseInt(_0x233dca(0x14b))/0x8;if(_0x14256c===_0x4eafa2)break;else _0x546b72['push'](_0x546b72['shift']());}catch(_0x57499b){_0x546b72['push'](_0x546b72['shift']());}}}(a59_0x3245,0x2e443));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a59_0x3245(){const _0x1eb063=['data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','paramsRequired','string','160343XPClvY','appCode','\x20completed\x20in\x20','description','2070600OITNAw','paramsHint','1187270ysfKUT','326144kcUuPA','2yHZrtl','compress','read','now','data\x20','data','607092fAuOKA','alias','helpExtra','flagMissing','command','validation','getOne','params','operation','381567GGAydz','code','1838826YJxRFB','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','str'];a59_0x3245=function(){return _0x1eb063;};return a59_0x3245();}function assertGetOneId(_0x14d25f){const _0x37c8ea=a59_0x1583;if(!_0x14d25f)throw CliErrors[_0x37c8ea(0x158)](_0x37c8ea(0x13c),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x53ccbf=_0x14d25f['id'];if(_0x53ccbf===undefined||_0x53ccbf===null||_0x53ccbf==='')throw CliErrors[_0x37c8ea(0x15a)](_0x37c8ea(0x143),_0x37c8ea(0x144));}function parseCommandParams(_0x31408e){return parseJsonParams(_0x31408e)??{};}function a59_0x1583(_0x1f1943,_0x349869){_0x1f1943=_0x1f1943-0x13c;const _0x324589=a59_0x3245();let _0x158353=_0x324589[_0x1f1943];return _0x158353;}export function buildDataCommand(_0x24aa78){const _0x1cebc6=a59_0x1583,_0x17efba=_0x1cebc6(0x141);return{'service':_0x1cebc6(0x154),'command':_0x24aa78[_0x1cebc6(0x159)],'description':_0x24aa78[_0x1cebc6(0x14a)],'risk':_0x1cebc6(0x151),'defaultOutputFormat':_0x1cebc6(0x150),'helpExtra':_0x24aa78[_0x1cebc6(0x157)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x1cebc6(0x156),'type':_0x1cebc6(0x146),'description':_0x17efba},{'name':_0x1cebc6(0x13c),'type':_0x1cebc6(0x146),'description':_0x24aa78[_0x1cebc6(0x14c)]}],async 'validate'(_0x1251ca){const _0x42a94b=_0x1cebc6,_0x5559c7=_0x1251ca[_0x42a94b(0x142)](_0x42a94b(0x13c));if(_0x24aa78[_0x42a94b(0x145)]&&!_0x5559c7)throw CliErrors[_0x42a94b(0x158)](_0x42a94b(0x13c),_0x24aa78['paramsHint']);const _0x2c5b1f=parseJsonParams(_0x5559c7);_0x24aa78[_0x42a94b(0x13d)]===_0x42a94b(0x15b)&&assertGetOneId(_0x2c5b1f);},async 'execute'(_0x473beb){const _0x319339=_0x1cebc6,_0x1e63a8=parseCommandParams(_0x473beb[_0x319339(0x142)](_0x319339(0x13c))),_0x4fed3a=Date[_0x319339(0x152)](),_0x566494=await executeDatasetDataOperation(_0x473beb[_0x319339(0x148)],_0x473beb[_0x319339(0x142)](_0x319339(0x13f)),_0x24aa78[_0x319339(0x13d)],_0x1e63a8),_0x4845c4=Date[_0x319339(0x152)]()-_0x4fed3a;return{'ok':!![],'data':{'result':_0x566494,'elapsed':_0x4845c4},'message':_0x319339(0x153)+_0x24aa78[_0x319339(0x159)]+_0x319339(0x149)+_0x4845c4+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a60_0x254d99=a60_0x4d43;(function(_0x415295,_0x100985){const _0x5e1a62=a60_0x4d43,_0x15f009=_0x415295();while(!![]){try{const _0x29b636=-parseInt(_0x5e1a62(0xe1))/0x1*(parseInt(_0x5e1a62(0xda))/0x2)+-parseInt(_0x5e1a62(0xca))/0x3+-parseInt(_0x5e1a62(0xd1))/0x4*(-parseInt(_0x5e1a62(0xf0))/0x5)+-parseInt(_0x5e1a62(0xe9))/0x6+-parseInt(_0x5e1a62(0xc3))/0x7*(-parseInt(_0x5e1a62(0xcc))/0x8)+parseInt(_0x5e1a62(0xc5))/0x9*(parseInt(_0x5e1a62(0xdc))/0xa)+parseInt(_0x5e1a62(0xdb))/0xb;if(_0x29b636===_0x100985)break;else _0x15f009['push'](_0x15f009['shift']());}catch(_0x170911){_0x15f009['push'](_0x15f009['shift']());}}}(a60_0x2d88,0x6b1e8));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_0x254d99(0xf4);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x46020f,input:_0x495158,dryRun:_0x447378}){const _0x4d620d=a60_0x254d99;validateInput(_0x495158);const _0xadf4d=normalizeBusinessGroup(_0x495158[_0x4d620d(0xd6)]),_0x1edae8=await getDatasetDetail(_0x495158[_0x4d620d(0xd5)]),_0xfd1657=resolveBusinessGroupDataset(_0x1edae8,_0x495158[_0x4d620d(0xd5)]),_0x17533c=loadCurrentBusinessGroup(_0x1edae8,_0xfd1657);assertExpectedBusinessGroup(_0x17533c,_0x495158['expectBusinessGroup']);const _0x24a8ca=buildBackendPayload(_0x46020f,_0xfd1657,_0xadf4d),_0x684526=_0x17533c!==_0xadf4d;let _0x51ba6d;if(_0x684526&&!_0x447378){await updateErBusinessGroup(_0x24a8ca);const _0x9d53c1=await getDatasetDetail(_0xfd1657['code']),_0x2244c0=resolveBusinessGroupDataset(_0x9d53c1,_0xfd1657[_0x4d620d(0xd5)]),_0xce83f4=loadCurrentBusinessGroup(_0x9d53c1,_0x2244c0);if(_0xce83f4!==_0xadf4d)throw CliErrors['apiError'](_0x4d620d(0xbc),_0x4d620d(0xc0)+JSON[_0x4d620d(0xef)](_0xadf4d)+',\x20actual\x20'+JSON[_0x4d620d(0xef)](_0xce83f4)+'.');_0x51ba6d={'verified':!![],'status':_0x4d620d(0xd9),'afterReadback':{'businessGroup':_0xce83f4}};}else!_0x684526&&(_0x51ba6d={'verified':!![],'status':_0x4d620d(0xe8),'afterReadback':{'businessGroup':_0x17533c}});const _0x375906={'operation':'update','appCode':_0x46020f,'selector':{'code':_0xfd1657[_0x4d620d(0xd5)]},'dataset':_0xfd1657,'before':{'businessGroup':_0x17533c},'after':{'businessGroup':_0xadf4d},'changed':_0x684526,'dryRun':_0x447378,'submitted':_0x684526&&!_0x447378,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x24a8ca},..._0x51ba6d?{'verification':_0x51ba6d}:{},'warnings':[]};return{'ok':!![],'data':_0x375906,'message':_0x684526?_0x447378?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0xfd1657[_0x4d620d(0xd5)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0xfd1657[_0x4d620d(0xd5)]:_0x4d620d(0xd2)+_0xfd1657[_0x4d620d(0xd5)]};}export const datasetBusinessGroupUpdate={'service':a60_0x254d99(0xc6),'command':a60_0x254d99(0xc9),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':a60_0x254d99(0xbd),'type':a60_0x254d99(0xe6),'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_0x254d99(0xe7),'type':'string','required':![],'description':a60_0x254d99(0xb8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x505084){validateInput(readBusinessGroupUpdateInput(_0x505084));},async 'dryRun'(_0x2255e8){const _0x520cb0=a60_0x254d99,_0x309df1=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2255e8[_0x520cb0(0xeb)],'input':readBusinessGroupUpdateInput(_0x2255e8),'dryRun':!![]});return{'method':_0x520cb0(0xcf),'url':BACKEND_PATH,'body':_0x309df1['data'][_0x520cb0(0xf1)][_0x520cb0(0xe3)],'description':_0x309df1['message'],..._0x309df1[_0x520cb0(0xd3)]};},async 'execute'(_0x36df7c){const _0x2c0d52=a60_0x254d99;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x36df7c[_0x2c0d52(0xeb)],'input':readBusinessGroupUpdateInput(_0x36df7c),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x157987){const _0x4975d1=a60_0x254d99,_0x381036=_0x157987['str']('expect-business-group');return{'code':trim(_0x157987[_0x4975d1(0xdf)](_0x4975d1(0xd5))),'businessGroup':_0x157987[_0x4975d1(0xdf)](_0x4975d1(0xbd)),'expectBusinessGroup':_0x381036===undefined||_0x381036===''?undefined:_0x381036};}function validateInput(_0x27324c){const _0x9f20a8=a60_0x254d99;if(!trim(_0x27324c[_0x9f20a8(0xd5)]))throw CliErrors[_0x9f20a8(0xc4)](_0x9f20a8(0xea));if(_0x27324c[_0x9f20a8(0xd6)]===undefined)throw CliErrors[_0x9f20a8(0xc4)](_0x9f20a8(0xe2));}function resolveBusinessGroupDataset(_0x1e9bf8,_0x105985){const _0x3dad3b=a60_0x254d99,_0x10a608=asPlainObject(_0x1e9bf8[_0x3dad3b(0xc6)]),_0x52948a=asPlainObject(_0x1e9bf8[_0x3dad3b(0xbf)]),_0xb6286b=resolveSourceType(_0x1e9bf8,_0x10a608,_0x52948a),_0x4425b8=firstString(_0x1e9bf8[_0x3dad3b(0xf3)],_0x1e9bf8[_0x3dad3b(0xd5)],_0x10a608['datasetCode'],_0x105985)||_0x105985;return{'id':firstNumber(_0x1e9bf8[_0x3dad3b(0xd4)],_0x1e9bf8['id'],_0x10a608[_0x3dad3b(0xbb)])??firstString(_0x1e9bf8[_0x3dad3b(0xd4)],_0x1e9bf8['id'],_0x10a608[_0x3dad3b(0xbb)])??null,'code':_0x4425b8,'name':firstString(_0x1e9bf8[_0x3dad3b(0xc7)],_0x10a608[_0x3dad3b(0xed)],_0x10a608['name'])||null,'sourceType':_0xb6286b};}function resolveSourceType(_0x4104a2,_0x5c15a6,_0x3d9c74){const _0x259ba8=a60_0x254d99,_0x25bd43=firstString(_0x4104a2['source'],_0x4104a2[_0x259ba8(0xc8)],_0x5c15a6[_0x259ba8(0xde)],_0x5c15a6['sourceType'])?.[_0x259ba8(0xba)]()[_0x259ba8(0xc2)]();if(_0x25bd43==='DB_TABLE'||_0x25bd43===_0x259ba8(0xdd))return _0x25bd43;if(Object['keys'](_0x3d9c74)[_0x259ba8(0xcb)]>0x0)return _0x259ba8(0xd8);throw CliErrors[_0x259ba8(0xc4)](_0x259ba8(0xf2));}function a60_0x4d43(_0x3c5cbe,_0xa1f364){_0x3c5cbe=_0x3c5cbe-0xb8;const _0x2d8872=a60_0x2d88();let _0x4d4355=_0x2d8872[_0x3c5cbe];return _0x4d4355;}function loadCurrentBusinessGroup(_0x29b2cd,_0x364474){const _0x1924fa=a60_0x254d99,_0x5ba7ed=readBusinessGroupFromDatasetDetail(_0x29b2cd,_0x364474['sourceType']);if(_0x5ba7ed[_0x1924fa(0xee)])return normalizeBusinessGroup(_0x5ba7ed[_0x1924fa(0xc1)]);if(_0x364474[_0x1924fa(0xc8)]===_0x1924fa(0xdd))return'';throw CliErrors['validation'](_0x1924fa(0xe4),_0x1924fa(0xe0));}function a60_0x2d88(){const _0xb06dc=['payload','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','number','string','expect-business-group','unchanged','628932FeIMab','--code\x20is\x20required','appCode','hasOwnProperty','datasetName','found','stringify','11555eZyaoI','backend','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','modelCode','/smartapi/question/er-config/business-group/edit','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','object','trim','datasetId','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','extend','dbtableConfig','Expected\x20','value','toUpperCase','582869WBJIsT','validation','126hLpzAp','dataset','name','sourceType','business-group-update','2260860vZZvxm','length','8FiVOsB','parse','isArray','POST','isFinite','928muUVrZ','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','data','modelId','code','businessGroup','call','DB_TABLE','matched','6uiEJIV','1616450YNchie','579470eyXHdb','METADATA','source','str','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','93475QikFNU','--business-group\x20is\x20required'];a60_0x2d88=function(){return _0xb06dc;};return a60_0x2d88();}function readBusinessGroupFromDatasetDetail(_0x10701f,_0x1c4bbd){const _0x3f797c=a60_0x254d99,_0x4c6f0c=asPlainObject(_0x10701f[_0x3f797c(0xc6)]),_0x52c915=firstPresent(_0x10701f[_0x3f797c(0xd6)]);if(_0x52c915[_0x3f797c(0xee)])return _0x52c915;const _0x1c00a9=firstPresent(_0x4c6f0c[_0x3f797c(0xd6)]);if(_0x1c00a9[_0x3f797c(0xee)])return _0x1c00a9;if(_0x1c4bbd===_0x3f797c(0xd8))return{'found':![]};const _0xf74242=readBusinessGroupFromExtend(_0x10701f[_0x3f797c(0xbe)]);if(_0xf74242[_0x3f797c(0xee)])return _0xf74242;return readBusinessGroupFromExtend(_0x4c6f0c[_0x3f797c(0xbe)]);}function readBusinessGroupFromExtend(_0x881f2b){const _0x40a450=a60_0x254d99;if(_0x881f2b===undefined||_0x881f2b===null||_0x881f2b==='')return{'found':![]};if(typeof _0x881f2b===_0x40a450(0xe6))try{const _0x52e6b9=JSON[_0x40a450(0xcd)](_0x881f2b);return readBusinessGroupFromExtend(_0x52e6b9);}catch{return{'found':![]};}const _0x44af83=asPlainObject(_0x881f2b);if(Object['prototype'][_0x40a450(0xec)][_0x40a450(0xd7)](_0x44af83,_0x40a450(0xd6)))return{'found':!![],'value':_0x44af83['businessGroup']};return{'found':![]};}function firstPresent(..._0x259a66){for(const _0x15beef of _0x259a66){if(_0x15beef!==undefined&&_0x15beef!==null)return{'found':!![],'value':_0x15beef};}return{'found':![]};}function assertExpectedBusinessGroup(_0xa90a94,_0x8ca7fc){const _0x2a814d=a60_0x254d99;if(_0x8ca7fc===undefined)return;const _0x48e6e5=normalizeBusinessGroup(_0x8ca7fc);if(_0xa90a94!==_0x48e6e5)throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20businessGroup',_0x2a814d(0xc0)+JSON[_0x2a814d(0xef)](_0x48e6e5)+',\x20actual\x20'+JSON[_0x2a814d(0xef)](_0xa90a94));}function buildBackendPayload(_0x52c036,_0x3dcb5a,_0x4e6a52){const _0x86491a=a60_0x254d99;return{'appCode':_0x52c036,'datasetCode':_0x3dcb5a[_0x86491a(0xd5)],'businessGroup':_0x4e6a52};}function normalizeBusinessGroup(_0x52c52d){const _0x211bcb=a60_0x254d99;if(_0x52c52d===undefined||_0x52c52d===null)return'';return String(_0x52c52d)[_0x211bcb(0xba)]();}function asPlainObject(_0x3c61d3){const _0xca137b=a60_0x254d99;if(!_0x3c61d3||typeof _0x3c61d3!==_0xca137b(0xb9)||Array[_0xca137b(0xce)](_0x3c61d3))return{};return _0x3c61d3;}function firstString(..._0x5c9c4c){const _0x38d97f=a60_0x254d99;for(const _0x4f0504 of _0x5c9c4c){if(typeof _0x4f0504===_0x38d97f(0xe6)&&_0x4f0504[_0x38d97f(0xba)]())return _0x4f0504[_0x38d97f(0xba)]();if(typeof _0x4f0504===_0x38d97f(0xe5)&&Number[_0x38d97f(0xd0)](_0x4f0504))return String(_0x4f0504);}return undefined;}function firstNumber(..._0x31f4e1){const _0x40c39f=a60_0x254d99;for(const _0x5ec63b of _0x31f4e1){if(typeof _0x5ec63b===_0x40c39f(0xe5)&&Number['isFinite'](_0x5ec63b))return _0x5ec63b;if(typeof _0x5ec63b===_0x40c39f(0xe6)&&_0x5ec63b[_0x40c39f(0xba)]()&&Number[_0x40c39f(0xd0)](Number(_0x5ec63b)))return Number(_0x5ec63b);}return null;}function trim(_0x31e896){const _0x43b103=a60_0x254d99;return String(_0x31e896||'')[_0x43b103(0xba)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x219bb9=a61_0x1754;(function(_0x515cc5,_0x5b4740){const _0x340318=a61_0x1754,_0x473108=_0x515cc5();while(!![]){try{const _0x637b81=-parseInt(_0x340318(0x1d4))/0x1*(parseInt(_0x340318(0x1c2))/0x2)+-parseInt(_0x340318(0x1b4))/0x3*(-parseInt(_0x340318(0x1b6))/0x4)+-parseInt(_0x340318(0x1c1))/0x5*(-parseInt(_0x340318(0x1b0))/0x6)+-parseInt(_0x340318(0x1cb))/0x7+parseInt(_0x340318(0x1b2))/0x8+-parseInt(_0x340318(0x1d2))/0x9*(-parseInt(_0x340318(0x1ce))/0xa)+-parseInt(_0x340318(0x1c9))/0xb;if(_0x637b81===_0x5b4740)break;else _0x473108['push'](_0x473108['shift']());}catch(_0x3d3a7f){_0x473108['push'](_0x473108['shift']());}}}(a61_0x1213,0x1cdf4));import{CliErrors}from'../../errors.js';function a61_0x1754(_0x4872d6,_0x3901bc){_0x4872d6=_0x4872d6-0x1ae;const _0x1213a0=a61_0x1213();let _0x17546d=_0x1213a0[_0x4872d6];return _0x17546d;}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x219bb9(0x1bc),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a61_0x219bb9(0x1d0)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x219bb9(0x1c6);function valueToString(_0xc891d2){const _0x2c9f64=a61_0x219bb9;return _0xc891d2==null?'':String(_0xc891d2)[_0x2c9f64(0x1cf)]();}function a61_0x1213(){const _0x3892c0=['METADATA','1629070bTuIUZ','trim','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','filter','9eCAqLJ','当前数据集\x20\x22','2fswehs','dbtable','UNKNOWN','datasetName','29154iFerVB','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','1063056JttiQd','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','409713XKlBzc','length','4omCVIo','\x20的\x20DB_TABLE\x20数据源上下文。','modelCode','code','\x20类型,没有可用于\x20','dbId','lovrabet','datasetCode','\x20是\x20','tableName','object','85BDXDcC','33090mlYkZB','dbtableConfig','SQL\x20schema\x20validation','unknown','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','name','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','2574418dstBKf','dataset','907025yFqUms','toUpperCase'];a61_0x1213=function(){return _0x3892c0;};return a61_0x1213();}function getDatasetCode(_0x2e1c83){const _0x4c36e9=a61_0x219bb9;return valueToString(_0x2e1c83[_0x4c36e9(0x1b9)]??_0x2e1c83[_0x4c36e9(0x1b8)]??_0x2e1c83[_0x4c36e9(0x1ca)]?.[_0x4c36e9(0x1bd)]);}function getDatasetName(_0x370643){const _0x5487f4=a61_0x219bb9;return valueToString(_0x370643[_0x5487f4(0x1c7)]??_0x370643[_0x5487f4(0x1ca)]?.[_0x5487f4(0x1af)])||_0x5487f4(0x1c5);}function getDatasetSource(_0x1a9f03){const _0x18ace1=a61_0x219bb9;return valueToString(_0x1a9f03['source']??_0x1a9f03['dataset']?.['sourceType'])[_0x18ace1(0x1cc)]();}function getDbtableConfig(_0x4390d5){const _0x42d764=a61_0x219bb9,_0x2f2f14=_0x4390d5[_0x42d764(0x1c3)]??_0x4390d5[_0x42d764(0x1d5)];return _0x2f2f14&&typeof _0x2f2f14===_0x42d764(0x1c0)?_0x2f2f14:{};}export function isDbTableBackedDataset(_0x152095){const _0x4f3a39=a61_0x219bb9,_0x4a7afa=getDatasetSource(_0x152095);if(_0x4a7afa===_0x4f3a39(0x1cd))return![];const _0x2ff067=getDbtableConfig(_0x152095),_0x38d52e=_0x2ff067[_0x4f3a39(0x1bb)]??_0x2ff067['id'],_0x449b0d=valueToString(_0x2ff067[_0x4f3a39(0x1bf)]??_0x152095[_0x4f3a39(0x1bf)]??_0x152095[_0x4f3a39(0x1ca)]?.[_0x4f3a39(0x1bf)]);return _0x38d52e!==undefined&&_0x38d52e!==null&&_0x449b0d[_0x4f3a39(0x1b5)]>0x0;}export function filterDbTableBackedDatasets(_0x5bcb59){return _0x5bcb59['filter'](_0x4bb999=>isDbTableBackedDataset(_0x4bb999));}export function buildDbTableBackedRequirementMessage(_0x1cab23,_0xabf758=a61_0x219bb9(0x1c4)){const _0xd33c5f=a61_0x219bb9,_0x189b8c=getDatasetSource(_0x1cab23)||_0xd33c5f(0x1ae),_0x98a43c=getDatasetName(_0x1cab23),_0x44fc6d=getDatasetCode(_0x1cab23),_0x428d95=_0x44fc6d?'\x20('+_0x44fc6d+')':'';return[_0xd33c5f(0x1d3)+_0x98a43c+'\x22'+_0x428d95+_0xd33c5f(0x1be)+_0x189b8c+_0xd33c5f(0x1ba)+_0xabf758+_0xd33c5f(0x1b7),_0xd33c5f(0x1c8),_0xd33c5f(0x1b3),_0xd33c5f(0x1b1)+RUNTIME_DATA_ACCESS_COMMANDS[_0xd33c5f(0x1d1)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x7f4659,_0x5e56ca){if(!isDbTableBackedDataset(_0x7f4659))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x7f4659,_0x5e56ca));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a62_0x534f0a=a62_0x57b2;function a62_0x5a50(){const _0x22e60e=['\x20failed','20qvDPgT','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Would\x20delete\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','object','410245xJefEW','Matched\x20','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','number','length','3679032IJhPRg','POST','num','\x20dataset(s);\x20','relatedPageInfoList','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','149555WjJSjY','high-risk-write','284070XcHaNP','appCode','Deleted\x20','code','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','deleted','dbid','str','Required\x20to\x20execute\x20dataset\x20deletion','2251288YyZalU','filter','delete','dataset','expected-count','description','message','tableName','10SNuvEh','dbid=','dbName','dbId','dbtableConfig','id=','10409202otCkjf','confirm','boolean','source','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','push','/smartapi/dataset/delete-dataset','188499QiaTfJ','isArray','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','validation','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'];a62_0x5a50=function(){return _0x22e60e;};return a62_0x5a50();}(function(_0xeaa42,_0x5d92d5){const _0x336ef9=a62_0x57b2,_0x22eb3e=_0xeaa42();while(!![]){try{const _0xcd950=parseInt(_0x336ef9(0x1fe))/0x1*(-parseInt(_0x336ef9(0x211))/0x2)+-parseInt(_0x336ef9(0x1e8))/0x3*(-parseInt(_0x336ef9(0x1ee))/0x4)+parseInt(_0x336ef9(0x1f3))/0x5+parseInt(_0x336ef9(0x200))/0x6+-parseInt(_0x336ef9(0x1f8))/0x7+parseInt(_0x336ef9(0x209))/0x8+parseInt(_0x336ef9(0x217))/0x9;if(_0xcd950===_0x5d92d5)break;else _0x22eb3e['push'](_0x22eb3e['shift']());}catch(_0x118dea){_0x22eb3e['push'](_0x22eb3e['shift']());}}}(a62_0x5a50,0x947c5));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';function a62_0x57b2(_0x1d8164,_0x3f261d){_0x1d8164=_0x1d8164-0x1e8;const _0x5a50f3=a62_0x5a50();let _0x57b284=_0x5a50f3[_0x1d8164];return _0x57b284;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x534f0a(0x1f6),'description':'Dataset\x20id'},DBID_FLAG={'name':'dbid','type':a62_0x534f0a(0x1f6),'description':a62_0x534f0a(0x1ec)},CONFIRM_FLAG={'name':'confirm','type':a62_0x534f0a(0x219),'description':a62_0x534f0a(0x208)},EXPECTED_COUNT_FLAG={'name':a62_0x534f0a(0x20d),'type':a62_0x534f0a(0x1f6),'description':a62_0x534f0a(0x1ea)};export const datasetDelete={'service':a62_0x534f0a(0x20c),'command':a62_0x534f0a(0x20b),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a62_0x534f0a(0x1ff),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5adc11){const _0x48a2e6=a62_0x534f0a,_0x1e8f93=_0x5adc11[_0x48a2e6(0x1fa)]('id'),_0x4169fe=_0x5adc11[_0x48a2e6(0x207)]('code'),_0xe968e7=_0x5adc11[_0x48a2e6(0x1fa)](_0x48a2e6(0x206)),_0x4c185b=[_0x1e8f93>0x0,Boolean(_0x4169fe),_0xe968e7>0x0][_0x48a2e6(0x20a)](Boolean);if(_0x4c185b[_0x48a2e6(0x1f7)]===0x0)throw CliErrors[_0x48a2e6(0x1eb)](_0x48a2e6(0x1f1));if(_0x4c185b[_0x48a2e6(0x1f7)]>0x1)throw CliErrors[_0x48a2e6(0x1eb)](_0x48a2e6(0x204));},async 'dryRun'(_0x52f12b){const _0x12ea80=a62_0x534f0a,_0xaccf00=await resolveTargets(_0x52f12b);return{'method':_0x12ea80(0x1f9),'url':_0x12ea80(0x21d),'body':{'appCode':_0x52f12b[_0x12ea80(0x201)],'count':_0xaccf00[_0x12ea80(0x1f7)],'datasets':_0xaccf00},'description':_0x12ea80(0x1f0)+_0xaccf00[_0x12ea80(0x1f7)]+_0x12ea80(0x1fd)};},async 'execute'(_0xdf858c){const _0x568924=a62_0x534f0a;if(!_0xdf858c['bool'](_0x568924(0x218)))throw CliErrors[_0x568924(0x1eb)](_0x568924(0x1ef),_0x568924(0x21b));const _0x1e214b=await resolveTargets(_0xdf858c),_0xb00eea=[],_0x2916dc=[];for(const _0x317cd5 of _0x1e214b){try{await deleteDataset(_0xdf858c[_0x568924(0x201)],_0x317cd5['id']),_0xb00eea[_0x568924(0x21c)](_0x317cd5);}catch(_0x51a953){_0x2916dc['push']({..._0x317cd5,'error':_0x51a953 instanceof Error?_0x51a953[_0x568924(0x20f)]:String(_0x51a953)});}}if(_0x2916dc['length']>0x0)return{'ok':![],'data':{'requested':_0x1e214b['length'],'deletedCount':_0xb00eea[_0x568924(0x1f7)],'failedCount':_0x2916dc[_0x568924(0x1f7)],'deleted':_0xb00eea,'failed':_0x2916dc},'message':_0x568924(0x202)+_0xb00eea[_0x568924(0x1f7)]+'/'+_0x1e214b[_0x568924(0x1f7)]+_0x568924(0x1fb)+_0x2916dc[_0x568924(0x1f7)]+_0x568924(0x1ed)};return{'ok':!![],'data':{'requested':_0x1e214b[_0x568924(0x1f7)],'deletedCount':_0xb00eea['length'],'deleted':_0xb00eea},'message':_0x568924(0x202)+_0xb00eea[_0x568924(0x1f7)]+'\x20dataset(s)'};}};async function resolveTargets(_0x12b119){const _0x46cc51=a62_0x534f0a,_0x3c4d65=_0x12b119[_0x46cc51(0x1fa)]('id'),_0x5242f2=_0x12b119[_0x46cc51(0x207)](_0x46cc51(0x203)),_0x5c4c5c=_0x12b119[_0x46cc51(0x1fa)](_0x46cc51(0x206));let _0x3ad61f;_0x5242f2?(_0x3ad61f=await listDatasets(_0x12b119['appCode'],{'code':_0x5242f2}),_0x3ad61f=_0x3ad61f[_0x46cc51(0x20a)](_0x238e06=>_0x238e06['code']===_0x5242f2)):(_0x3ad61f=await listDatasets(_0x12b119[_0x46cc51(0x201)]),_0x3c4d65>0x0&&(_0x3ad61f=_0x3ad61f[_0x46cc51(0x20a)](_0x4ed568=>_0x4ed568['id']===_0x3c4d65)),_0x5c4c5c>0x0&&(_0x3ad61f=_0x3ad61f[_0x46cc51(0x20a)](_0x2a0ece=>_0x2a0ece[_0x46cc51(0x215)]?.['dbId']===_0x5c4c5c)));const _0x243352=[];for(const _0x1dbebd of _0x3ad61f){const _0x1b1ff0=await getDatasetDetail(_0x1dbebd[_0x46cc51(0x203)]),_0x2c47d3=Array[_0x46cc51(0x1e9)](_0x1b1ff0[_0x46cc51(0x1fc)])?_0x1b1ff0['relatedPageInfoList'][_0x46cc51(0x20a)](_0x19df6f=>_0x19df6f!=null&&typeof _0x19df6f===_0x46cc51(0x1f2)&&_0x19df6f[_0x46cc51(0x205)]!==!![]):[];_0x243352[_0x46cc51(0x21c)](normalizeTarget(_0x1dbebd,_0x2c47d3[_0x46cc51(0x1f7)]));}if(_0x243352[_0x46cc51(0x1f7)]===0x0){const _0x48a859=_0x5242f2||(_0x3c4d65>0x0?_0x46cc51(0x216)+_0x3c4d65:_0x46cc51(0x212)+_0x5c4c5c);throw CliErrors[_0x46cc51(0x1eb)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x48a859+'.');}const _0x5cae00=_0x12b119[_0x46cc51(0x1fa)]('expected-count');if(_0x5cae00>0x0&&_0x243352[_0x46cc51(0x1f7)]!==_0x5cae00)throw CliErrors[_0x46cc51(0x1eb)](_0x46cc51(0x1f4)+_0x243352['length']+_0x46cc51(0x1f5)+_0x5cae00+'.');return _0x243352;}function normalizeTarget(_0x36f751,_0x357c60){const _0xef7dc6=a62_0x534f0a,_0x46948a=_0x36f751[_0xef7dc6(0x215)]??{};return{'id':_0x36f751['id'],'code':_0x36f751[_0xef7dc6(0x203)],'name':_0x36f751['name'],'description':_0x36f751[_0xef7dc6(0x20e)],'source':_0x36f751[_0xef7dc6(0x21a)],'dbId':_0x46948a[_0xef7dc6(0x214)],'dbName':_0x46948a[_0xef7dc6(0x213)],'tableName':_0x46948a[_0xef7dc6(0x210)],'relatedPageCount':_0x357c60};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a63_0x4d4b(_0x39f3c1,_0x2c2c3b){_0x39f3c1=_0x39f3c1-0x1df;const _0x530398=a63_0x5303();let _0x4d4bc7=_0x530398[_0x39f3c1];return _0x4d4bc7;}const a63_0x412521=a63_0x4d4b;(function(_0x228172,_0x3c1f20){const _0x516bce=a63_0x4d4b,_0x2abc57=_0x228172();while(!![]){try{const _0x182643=-parseInt(_0x516bce(0x1df))/0x1*(parseInt(_0x516bce(0x1e3))/0x2)+-parseInt(_0x516bce(0x215))/0x3+parseInt(_0x516bce(0x202))/0x4+parseInt(_0x516bce(0x21f))/0x5*(-parseInt(_0x516bce(0x20d))/0x6)+parseInt(_0x516bce(0x1f4))/0x7+-parseInt(_0x516bce(0x21d))/0x8+parseInt(_0x516bce(0x1ec))/0x9*(parseInt(_0x516bce(0x1fe))/0xa);if(_0x182643===_0x3c1f20)break;else _0x2abc57['push'](_0x2abc57['shift']());}catch(_0xd47c8d){_0x2abc57['push'](_0x2abc57['shift']());}}}(a63_0x5303,0x3c190));function a63_0x5303(){const _0x22446a=['name','requestBody','7398GCgOWy','extend','creatorIdField','length','requestFields','tableName','responseBody','toTableName','512400ephMZB','main_sub','isArray','path','description','dbId','allFields','filter','type','required','10520LqBwmr','beforeScriptId','bizRelationType','parse','1726532jhxJpb','modifierIdField','validateRules','method','datasetKey','modelCode','fields','deleted','responseFields','relatedPageInfoList','alias','137658oJCApN','deprecated','map','read','columnCodeListWithDeleted','split','tableComment','toFieldLabel','571185naitlu','dbtableConfig','entries','dbName','trim','toDatasetCode','afterScriptId','dataset','1617504AsfiyY','dbType','65jDAUVg','object','host','labelField','createTimeField','operations','updateTimeField','modelId','displayName','push','logicField','toField','options','properties','dataType','6655gSGVFU','doType','title','code','130DxTgfJ','pkField','formatRules','fromField','string','dblinkInfoDTO','relations'];a63_0x5303=function(){return _0x22446a;};return a63_0x5303();}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3973f6){const _0xb42360=a63_0x4d4b;if(_0x3973f6[_0xb42360(0x209)])return null;const _0x5e7e5b=Boolean(_0x3973f6[_0xb42360(0x227)]!==undefined||_0x3973f6[_0xb42360(0x1e0)]!==undefined);let _0x1665e9={};if(!_0x5e7e5b&&typeof _0x3973f6['extend']==='string')try{_0x1665e9=JSON['parse'](_0x3973f6[_0xb42360(0x1ed)]);}catch{}const _0x2432c5=_0x5e7e5b?_0x3973f6['name']:_0x3973f6['code'],_0x3d38bc=_0x5e7e5b?_0x3973f6[_0xb42360(0x227)]:_0x3973f6[_0xb42360(0x1ea)],_0x287828=_0x5e7e5b?_0x3973f6[_0xb42360(0x1e0)]:_0x3973f6[_0xb42360(0x1fc)]||_0x3973f6[_0xb42360(0x22d)],_0xde1e81=_0x5e7e5b?_0x3973f6[_0xb42360(0x1e4)]===!![]:_0x1665e9['pkField']===!![],_0x3cb666=_0x5e7e5b?_0x3973f6[_0xb42360(0x1fd)]===!![]:_0x1665e9[_0xb42360(0x1fd)]===!![],_0x53b857=_0x5e7e5b?_0x3973f6[_0xb42360(0x22b)]??null:_0x1665e9[_0xb42360(0x22b)]??null,_0x13dc75={'name':_0x2432c5,'displayName':_0x3d38bc||_0x2432c5,'type':_0x287828,'dbType':_0x3973f6[_0xb42360(0x21e)],'pk':_0xde1e81,'required':_0x3cb666,'deprecated':_0x3973f6[_0xb42360(0x20e)]===!![],'description':_0x3973f6[_0xb42360(0x1f8)]||undefined};return Array[_0xb42360(0x1f6)](_0x53b857)&&_0x53b857[_0xb42360(0x1ef)]>0x0&&(_0x13dc75[_0xb42360(0x22b)]=_0x53b857),_0x13dc75;}function parseJsonMaybe(_0x3a0a1d){const _0x7788e8=a63_0x4d4b;if(typeof _0x3a0a1d!==_0x7788e8(0x1e7))return _0x3a0a1d;try{return JSON[_0x7788e8(0x201)](_0x3a0a1d);}catch{return _0x3a0a1d;}}function normalizeOperationEntry(_0x154558,_0x5ceaf8){const _0x2ffbb7=a63_0x4d4b;if(!_0x5ceaf8||typeof _0x5ceaf8!==_0x2ffbb7(0x220))return null;if(!_0x5ceaf8[_0x2ffbb7(0x205)]||!_0x5ceaf8[_0x2ffbb7(0x1f7)])return null;const _0x5efe74={'name':_0x154558,'method':_0x5ceaf8[_0x2ffbb7(0x205)],'path':_0x5ceaf8['path']};if(_0x5ceaf8[_0x2ffbb7(0x221)])_0x5efe74['host']=_0x5ceaf8[_0x2ffbb7(0x221)];if(_0x5ceaf8[_0x2ffbb7(0x1eb)]!=null){const _0x1a9bff=parseJsonMaybe(_0x5ceaf8[_0x2ffbb7(0x1eb)]);_0x5efe74[_0x2ffbb7(0x1eb)]=_0x1a9bff;}if(_0x5ceaf8[_0x2ffbb7(0x1f2)]!=null){const _0x67ef36=parseJsonMaybe(_0x5ceaf8['responseBody']);_0x5efe74['responseBody']=_0x67ef36;}if(_0x5ceaf8[_0x2ffbb7(0x1ff)]!=null)_0x5efe74[_0x2ffbb7(0x1ff)]=_0x5ceaf8[_0x2ffbb7(0x1ff)];if(_0x5ceaf8[_0x2ffbb7(0x21b)]!=null)_0x5efe74[_0x2ffbb7(0x21b)]=_0x5ceaf8[_0x2ffbb7(0x21b)];if(Array['isArray'](_0x5ceaf8[_0x2ffbb7(0x1f0)]))_0x5efe74[_0x2ffbb7(0x1f0)]=_0x5ceaf8[_0x2ffbb7(0x1f0)];if(Array[_0x2ffbb7(0x1f6)](_0x5ceaf8['responseFields']))_0x5efe74[_0x2ffbb7(0x20a)]=_0x5ceaf8['responseFields'];return _0x5efe74;}function summarizeDbtable(_0x1c67c0){const _0x5657a2=a63_0x4d4b,_0x6c7942={},_0x2be65e=[_0x5657a2(0x1f9),_0x5657a2(0x218),_0x5657a2(0x1f1),_0x5657a2(0x206),_0x5657a2(0x1e4),_0x5657a2(0x1fa),_0x5657a2(0x229),_0x5657a2(0x223),_0x5657a2(0x225),_0x5657a2(0x1ee),'creatorNameField',_0x5657a2(0x203),'modifierNameField',_0x5657a2(0x222),_0x5657a2(0x1e8)];for(const _0x3debb5 of _0x2be65e){if(_0x1c67c0[_0x3debb5]!==undefined)_0x6c7942[_0x3debb5]=_0x1c67c0[_0x3debb5];}return typeof _0x6c7942[_0x5657a2(0x1fa)]==='string'&&_0x6c7942['allFields'][_0x5657a2(0x1ef)]>0x0&&(_0x6c7942['allFieldNames']=_0x6c7942['allFields'][_0x5657a2(0x212)](',')[_0x5657a2(0x20f)](_0x43e79f=>_0x43e79f[_0x5657a2(0x219)]())['filter'](Boolean)),_0x6c7942;}function normalizeRelatedPages(_0x14a970){const _0x37b24d=a63_0x4d4b;if(!Array[_0x37b24d(0x1f6)](_0x14a970))return[];return _0x14a970[_0x37b24d(0x1fb)](_0x4bcc39=>_0x4bcc39&&typeof _0x4bcc39===_0x37b24d(0x220))[_0x37b24d(0x20f)](_0x401dba=>({'id':_0x401dba['id'],'type':_0x401dba[_0x37b24d(0x1fc)],'code':_0x401dba[_0x37b24d(0x1e2)],'title':_0x401dba[_0x37b24d(0x1e1)],'deleted':_0x401dba[_0x37b24d(0x209)]===!![]}));}export const datasetDetail={'service':a63_0x412521(0x21c),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a63_0x412521(0x210),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x412521(0x20c),'type':a63_0x412521(0x1e7),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0xae5ae1){const _0x351f2e=a63_0x412521,_0x4a63c8=await getDatasetDetail(_0xae5ae1['str']('code')),_0x3253aa=Array['isArray'](_0x4a63c8[_0x351f2e(0x208)])?_0x4a63c8['fields']:Array[_0x351f2e(0x1f6)](_0x4a63c8[_0x351f2e(0x22c)])?_0x4a63c8['properties']:[],_0x51a8ab=_0x3253aa[_0x351f2e(0x20f)](_0x2a95a0=>normalizeField(_0x2a95a0))['filter'](_0x55572f=>_0x55572f!==null),_0xd119cc=_0x4a63c8[_0x351f2e(0x224)]??{},_0x224e87=[];for(const [_0x287ef1,_0xdcb53f]of Object[_0x351f2e(0x217)](_0xd119cc)){const _0x6b7376=normalizeOperationEntry(_0x287ef1,_0xdcb53f);if(_0x6b7376)_0x224e87[_0x351f2e(0x228)](_0x6b7376);}const _0xb3eff2=_0x4a63c8[_0x351f2e(0x216)]??{},_0x571600=_0x4a63c8[_0x351f2e(0x21c)]??{},_0x56d5da=_0xb3eff2[_0x351f2e(0x1f9)]!=null?{'id':_0xb3eff2[_0x351f2e(0x1f9)],'name':_0xb3eff2[_0x351f2e(0x218)]??null}:undefined;let _0x16fc7d;return typeof _0x4a63c8['extend']===_0x351f2e(0x1e7)&&(_0x16fc7d=parseJsonMaybe(_0x4a63c8[_0x351f2e(0x1ed)])),{'ok':!![],'data':{'id':_0x4a63c8[_0x351f2e(0x226)]??_0x4a63c8['id'],'name':_0x4a63c8['name'],'code':_0x4a63c8[_0x351f2e(0x207)]||_0x4a63c8[_0x351f2e(0x1e2)],'doVersion':_0x4a63c8['doVersion'],'description':_0x4a63c8[_0x351f2e(0x1f8)]||_0x571600[_0x351f2e(0x213)]||undefined,'source':_0x4a63c8['source']||_0x571600['sourceType'],'table':_0xb3eff2[_0x351f2e(0x1f1)]||_0x571600['tableName'],'datasetKey':_0xb3eff2[_0x351f2e(0x206)],'pk':_0xb3eff2[_0x351f2e(0x1e4)],'db':_0x56d5da,'dbtable':summarizeDbtable(_0xb3eff2),'fields':_0x51a8ab,'operations':_0x224e87,'indexes':Array['isArray'](_0x571600['indexes'])?_0x571600['indexes']:[],'relations':Array['isArray'](_0x4a63c8[_0x351f2e(0x1e9)])?_0x4a63c8[_0x351f2e(0x1e9)][_0x351f2e(0x20f)](_0x32d459=>({..._0x32d459['relationId']!=null?{'relationId':_0x32d459['relationId']}:{},'fromDataset':_0x4a63c8[_0x351f2e(0x1ea)],'fromCode':_0x4a63c8[_0x351f2e(0x207)]||_0x4a63c8[_0x351f2e(0x1e2)],'fromTable':_0xb3eff2[_0x351f2e(0x1f1)]||_0x571600[_0x351f2e(0x1f1)],'fromField':_0x32d459[_0x351f2e(0x1e6)],'toDataset':_0x32d459['toDatasetName'],'toCode':_0x32d459[_0x351f2e(0x21a)],'toTable':_0x32d459[_0x351f2e(0x1f3)],'toField':_0x32d459[_0x351f2e(0x22a)],'labelField':_0x32d459[_0x351f2e(0x214)]||undefined,'cardinality':_0x32d459['cardinality']||undefined,'bizRelationType':_0x32d459[_0x351f2e(0x200)]===_0x351f2e(0x1f5)?_0x351f2e(0x1f5):null})):[],'relatedPages':normalizeRelatedPages(_0x4a63c8[_0x351f2e(0x20b)]),...Array[_0x351f2e(0x1f6)](_0x4a63c8[_0x351f2e(0x211)])?{'columnCodeListWithDeleted':_0x4a63c8[_0x351f2e(0x211)]}:{},'formatRules':Array[_0x351f2e(0x1f6)](_0x4a63c8[_0x351f2e(0x1e5)])?_0x4a63c8[_0x351f2e(0x1e5)]:[],'validateRules':Array[_0x351f2e(0x1f6)](_0x4a63c8[_0x351f2e(0x204)])?_0x4a63c8[_0x351f2e(0x204)]:[],..._0x16fc7d!==undefined?{'extend':_0x16fc7d}:{},'stats':{'fieldCount':_0x51a8ab['length'],'operationCount':_0x224e87[_0x351f2e(0x1ef)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x6432f9=a64_0x560a;(function(_0x3c9b17,_0x5fd2a4){const _0x5def83=a64_0x560a,_0x3fb0b2=_0x3c9b17();while(!![]){try{const _0x2cc93a=-parseInt(_0x5def83(0x11d))/0x1+parseInt(_0x5def83(0x10d))/0x2*(-parseInt(_0x5def83(0x10b))/0x3)+parseInt(_0x5def83(0x12b))/0x4+-parseInt(_0x5def83(0x124))/0x5*(-parseInt(_0x5def83(0x11b))/0x6)+-parseInt(_0x5def83(0x115))/0x7+-parseInt(_0x5def83(0x12c))/0x8+parseInt(_0x5def83(0x125))/0x9;if(_0x2cc93a===_0x5fd2a4)break;else _0x3fb0b2['push'](_0x3fb0b2['shift']());}catch(_0x47b05c){_0x3fb0b2['push'](_0x3fb0b2['shift']());}}}(a64_0x1a03,0x55919));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([[a64_0x6432f9(0x106),{'message':a64_0x6432f9(0x109),'hint':a64_0x6432f9(0x13d)}]]);export function parseJsonObjectFlag(_0x4e99a5,_0x31485b){const _0x40a10a=a64_0x6432f9;if(!_0x4e99a5)return undefined;let _0x2ce995;try{_0x2ce995=JSON['parse'](_0x4e99a5);}catch(_0x241bae){const _0xf08a75=_0x241bae instanceof Error?_0x241bae[_0x40a10a(0x131)]:String(_0x241bae);throw CliErrors[_0x40a10a(0x10c)](_0x31485b+_0x40a10a(0x136)+_0xf08a75);}if(!isPlainObject(_0x2ce995)||Array['isArray'](_0x2ce995))throw CliErrors[_0x40a10a(0x10c)](_0x31485b+_0x40a10a(0x114));return _0x2ce995;}export function validateExtendPatchKeys(_0x1ff023){const _0x55aa84=a64_0x6432f9,_0x45edb4=Object[_0x55aa84(0x108)](_0x1ff023);if(_0x45edb4[_0x55aa84(0x10f)]===0x0)throw CliErrors[_0x55aa84(0x10c)](_0x55aa84(0x104));for(const _0x48e9cb of _0x45edb4){const _0xea23dc=EXTEND_PATCH_REDIRECTS[_0x55aa84(0x118)](_0x48e9cb);if(_0xea23dc)throw CliErrors[_0x55aa84(0x10c)](_0xea23dc[_0x55aa84(0x131)],_0xea23dc['hint']);if(!MUTABLE_EXTEND_KEYS[_0x55aa84(0x127)](_0x48e9cb))throw CliErrors[_0x55aa84(0x10c)](_0x55aa84(0x111)+_0x48e9cb,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x50e24f=a64_0x6432f9,_0x2b022d=Array[_0x50e24f(0x117)](MUTABLE_EXTEND_KEYS)[_0x50e24f(0x130)]();return _0x2b022d[_0x50e24f(0x10f)]>0x0?_0x50e24f(0x13b)+_0x2b022d[_0x50e24f(0x112)](',\x20'):_0x50e24f(0x137);}export function applyExtendPatch(_0x3b626d,_0x46bb34){const _0x440582=a64_0x6432f9;validateExtendPatchKeys(_0x46bb34);const _0x171593=deepClone(_0x3b626d),_0x25c75b=[];for(const [_0x6323ba,_0x14b969]of Object[_0x440582(0x13f)](_0x46bb34)){const _0x5ded18=_0x171593[_0x6323ba],_0x210206=deepClone(_0x14b969);!deepEqual(_0x5ded18,_0x210206)&&(_0x171593[_0x6323ba]=_0x210206,_0x25c75b[_0x440582(0x129)](_0x440582(0x120)+_0x6323ba));}return _0x25c75b[_0x440582(0x130)](),{'after':_0x171593,'changedPaths':_0x25c75b,'changed':_0x25c75b[_0x440582(0x10f)]>0x0};}export function assertExpectation(_0x1346f5,_0x512503){const _0x9c2f6=a64_0x6432f9;if(!_0x512503)return;for(const [_0x195711,_0x47745b]of Object[_0x9c2f6(0x13f)](_0x512503)){const _0x1942df=_0x1346f5[_0x195711];if(!deepEqual(_0x1942df,_0x47745b))throw CliErrors[_0x9c2f6(0x10c)]('Expectation\x20mismatch\x20at\x20extend.'+_0x195711,'Expected\x20'+JSON[_0x9c2f6(0x10a)](_0x47745b)+',\x20actual\x20'+JSON[_0x9c2f6(0x10a)](_0x1942df));}}export async function buildDatasetExtendUpdateResult({appCode:_0x5c4688,input:_0x1fd841,dryRun:_0x30c003}){const _0x533562=a64_0x6432f9;validateInput(_0x1fd841);const _0x32c480=await getDatasetDetail(_0x1fd841[_0x533562(0x138)]),_0x1f7cc4=parseDatasetExtend(_0x32c480[_0x533562(0x107)]),_0x26ff09=deepClone(_0x1f7cc4[_0x533562(0x133)]);assertExpectation(_0x26ff09,_0x1fd841[_0x533562(0x134)]);const {after:_0x1338bd,changedPaths:_0x2191fc,changed:_0x1742a9}=applyExtendPatch(_0x26ff09,_0x1fd841[_0x533562(0x13e)]),_0x23fc69=summarizeDataset(_0x32c480,_0x1fd841[_0x533562(0x138)]);return _0x1742a9&&!_0x30c003&&(_0x32c480[_0x533562(0x107)]=serializeDatasetExtend(_0x1338bd,_0x1f7cc4['shape']),await updateDrivenData(_0x32c480)),{'ok':!![],'data':{'appCode':_0x5c4688,'selector':{'code':_0x1fd841['code']},'dataset':_0x23fc69,'dryRun':_0x30c003,'changed':_0x1742a9,'changedPaths':_0x2191fc,'before':{'extend':_0x26ff09},'after':{'extend':_0x1338bd},'submitted':_0x1742a9&&!_0x30c003},'message':_0x1742a9?_0x30c003?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x2191fc['join'](',\x20')+')':_0x533562(0x110)+_0x2191fc[_0x533562(0x112)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':a64_0x6432f9(0x116),'command':'extend-update','description':a64_0x6432f9(0x12d),'risk':a64_0x6432f9(0x132),'flags':[CODE_FLAG,{'name':a64_0x6432f9(0x102),'type':a64_0x6432f9(0x11c),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a64_0x6432f9(0x13a),'type':a64_0x6432f9(0x11c),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x288ad4){validateInput(readExtendUpdateInput(_0x288ad4));},async 'dryRun'(_0x565652){const _0x2dcec7=a64_0x6432f9,_0x21f0f2=await buildDatasetExtendUpdateResult({'appCode':_0x565652[_0x2dcec7(0x121)],'input':readExtendUpdateInput(_0x565652),'dryRun':!![]});return{'method':_0x2dcec7(0x140),'url':'/smartapi/dataset/update-driven-data','body':_0x21f0f2[_0x2dcec7(0x11f)],'description':_0x21f0f2[_0x2dcec7(0x131)]};},async 'execute'(_0x105155){const _0x1a81ac=a64_0x6432f9;return buildDatasetExtendUpdateResult({'appCode':_0x105155[_0x1a81ac(0x121)],'input':readExtendUpdateInput(_0x105155),'dryRun':![]});}};function readExtendUpdateInput(_0x9645c0){const _0x273405=a64_0x6432f9,_0x568e5d=trim(_0x9645c0[_0x273405(0x105)](_0x273405(0x138))),_0x220d82=parseJsonObjectFlag(_0x9645c0['str']('patch-json'),'--patch-json'),_0x3854b4=parseJsonObjectFlag(_0x9645c0[_0x273405(0x105)](_0x273405(0x13a)),_0x273405(0x12e));return{'code':_0x568e5d,'patch':_0x220d82||{},'expect':_0x3854b4};}function validateInput(_0x52d3de){const _0x4b6316=a64_0x6432f9;if(!_0x52d3de[_0x4b6316(0x138)])throw CliErrors[_0x4b6316(0x10c)](_0x4b6316(0x139));validateExtendPatchKeys(_0x52d3de[_0x4b6316(0x13e)]);}function parseDatasetExtend(_0x5dc564){const _0x169083=a64_0x6432f9;if(typeof _0x5dc564===_0x169083(0x11c)){const _0x500d4d=_0x5dc564[_0x169083(0x119)]();if(!_0x500d4d)return{'value':{},'shape':_0x169083(0x11c)};let _0x37f5a7;try{_0x37f5a7=JSON[_0x169083(0x128)](_0x500d4d);}catch(_0x562908){const _0x586907=_0x562908 instanceof Error?_0x562908[_0x169083(0x131)]:String(_0x562908);throw CliErrors[_0x169083(0x10c)](_0x169083(0x13c)+_0x586907);}if(!isPlainObject(_0x37f5a7)||Array[_0x169083(0x122)](_0x37f5a7))throw CliErrors['validation'](_0x169083(0x126));return{'value':_0x37f5a7,'shape':_0x169083(0x11c)};}if(_0x5dc564===undefined||_0x5dc564===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x5dc564)||Array[_0x169083(0x122)](_0x5dc564))throw CliErrors[_0x169083(0x10c)](_0x169083(0x126));return{'value':_0x5dc564,'shape':_0x169083(0x113)};}function a64_0x1a03(){const _0x197a5a=['trim','datasetId','2117172HEdTwi','string','35134slqGJP','dbId','data','extend.','appCode','isArray','dbName','5zrjcKl','1251702zvILRo','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','has','parse','push','modelId','1988120aYvGBC','182832XLsPbe','Patch\x20dataset\x20top-level\x20extend\x20safely','--expect-json','tableName','sort','message','write','value','expect','name','\x20must\x20be\x20valid\x20JSON\x20object:\x20','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','code','--code\x20is\x20required','expect-json','Allowed\x20keys:\x20','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','patch','entries','POST','patch-json','datasetCode','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','str','businessGroup','extend','keys','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','stringify','340665CYyExH','validation','6hvSKkO','dbtableConfig','length','Updated\x20dataset\x20extend\x20(','Unsupported\x20patch\x20key:\x20','join','object','\x20must\x20be\x20a\x20JSON\x20object','1678796rRVPjB','dataset','from','get'];a64_0x1a03=function(){return _0x197a5a;};return a64_0x1a03();}function serializeDatasetExtend(_0x19ba47,_0x13ee2f){return _0x13ee2f==='string'?JSON['stringify'](_0x19ba47):_0x19ba47;}function summarizeDataset(_0x46e3bf,_0x167867){const _0x5c769e=a64_0x6432f9,_0x27e8b8=isPlainObject(_0x46e3bf['dataset'])?_0x46e3bf[_0x5c769e(0x116)]:{},_0x4b00d6=isPlainObject(_0x46e3bf[_0x5c769e(0x10e)])?_0x46e3bf[_0x5c769e(0x10e)]:{};return{'id':_0x46e3bf[_0x5c769e(0x12a)]??_0x46e3bf['id']??_0x27e8b8[_0x5c769e(0x11a)]??null,'code':_0x46e3bf['modelCode']??_0x46e3bf[_0x5c769e(0x138)]??_0x27e8b8[_0x5c769e(0x103)]??_0x167867,'name':_0x46e3bf[_0x5c769e(0x135)]??_0x27e8b8['datasetName']??null,'table':_0x4b00d6[_0x5c769e(0x12f)]??_0x27e8b8[_0x5c769e(0x12f)]??null,'db':_0x4b00d6[_0x5c769e(0x123)]??_0x4b00d6[_0x5c769e(0x11e)]??null};}function a64_0x560a(_0x5eeacb,_0x358d61){_0x5eeacb=_0x5eeacb-0x102;const _0x1a0346=a64_0x1a03();let _0x560acd=_0x1a0346[_0x5eeacb];return _0x560acd;}function deepClone(_0x706872){const _0x177dc9=a64_0x6432f9;if(_0x706872===undefined)return _0x706872;return JSON[_0x177dc9(0x128)](JSON[_0x177dc9(0x10a)](_0x706872));}function deepEqual(_0x253962,_0xdf60d9){const _0xd77d92=a64_0x6432f9;return JSON[_0xd77d92(0x10a)](_0x253962)===JSON['stringify'](_0xdf60d9);}function isPlainObject(_0x3e3678){const _0x569bd0=a64_0x6432f9;return Boolean(_0x3e3678)&&typeof _0x3e3678===_0x569bd0(0x113)&&!Array[_0x569bd0(0x122)](_0x3e3678);}function trim(_0x3bbeb3){const _0x273f53=a64_0x6432f9,_0x696eb5=String(_0x3bbeb3||'')[_0x273f53(0x119)]();return _0x696eb5;}
|
|
@@ -1 +1 @@
|
|
|
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)]();}
|
|
1
|
+
const a65_0x459685=a65_0x5aa4;(function(_0x63cb2c,_0x348059){const _0x12b471=a65_0x5aa4,_0x43cc1f=_0x63cb2c();while(!![]){try{const _0x53994b=parseInt(_0x12b471(0x90))/0x1+parseInt(_0x12b471(0xb2))/0x2+-parseInt(_0x12b471(0x80))/0x3*(parseInt(_0x12b471(0x9d))/0x4)+parseInt(_0x12b471(0x8e))/0x5+parseInt(_0x12b471(0xa9))/0x6+-parseInt(_0x12b471(0x99))/0x7*(-parseInt(_0x12b471(0x76))/0x8)+-parseInt(_0x12b471(0x7c))/0x9;if(_0x53994b===_0x348059)break;else _0x43cc1f['push'](_0x43cc1f['shift']());}catch(_0x1ce3a7){_0x43cc1f['push'](_0x43cc1f['shift']());}}}(a65_0x223d,0xb2284));function a65_0x223d(){const _0x16d753=['dbTypeScale','doType','size','autoIncrement','trim','datasetId','field','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','\x20must\x20be\x20a\x20JSON\x20object','Dry-run:\x20dataset\x20field\x20','add','37848uyDNZV','field-update','dbId','fields','stringify','Expectation\x20mismatch\x20at\x20','5813181xSaEwx','Expected\x20','modelCode','join','4142337yiHIDN','pkField','str','dbFieldName','\x20must\x20be\x20valid\x20JSON\x20object:\x20','datasetCode','object','datetimeFormat','deleted','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','defaultAggregation','systemRetain','required','write','2571340ewZIgj','--field\x20is\x20required','644398hcWxJa','Unsupported\x20patch\x20key:\x20','string','entries','message','properties','code','Exact\x20raw\x20fields[].name\x20to\x20patch','expect-json','1673DUBRdL','description','/smartapi/dataset/update-driven-data','Field\x20not\x20found:\x20','4znVIJj','appCode','patch-json',',\x20actual\x20','validation','name','has','isArray','dbTypeLen','data','modelId','tableName','1945512cgVQWq','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','dbName','dataset','dbType','sort','parse','patch','--patch-json','285586elLgAu','findIndex','--code\x20is\x20required','from','Allowed\x20keys:\x20','keys'];a65_0x223d=function(){return _0x16d753;};return a65_0x223d();}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_0x459685(0x6c),'displayName',a65_0x459685(0x9a),'options',a65_0x459685(0x8c),a65_0x459685(0x87),a65_0x459685(0x8a),'chartRole','deprecated']),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x459685(0xa2),a65_0x459685(0x96),a65_0x459685(0xad),a65_0x459685(0xa5),a65_0x459685(0x6b),a65_0x459685(0x83),'tableName',a65_0x459685(0x88),a65_0x459685(0x81),a65_0x459685(0x6e),a65_0x459685(0x8b)]);export function parseJsonObjectFlag(_0x2e6919,_0x465388){const _0x3d7b30=a65_0x459685;if(!_0x2e6919)return undefined;let _0x388691;try{_0x388691=JSON[_0x3d7b30(0xaf)](_0x2e6919);}catch(_0x49c148){const _0x198389=_0x49c148 instanceof Error?_0x49c148[_0x3d7b30(0x94)]:String(_0x49c148);throw CliErrors[_0x3d7b30(0xa1)](_0x465388+_0x3d7b30(0x84)+_0x198389);}if(!isPlainObject(_0x388691)||Array[_0x3d7b30(0xa4)](_0x388691))throw CliErrors[_0x3d7b30(0xa1)](_0x465388+_0x3d7b30(0x73));return _0x388691;}function a65_0x5aa4(_0x1b9487,_0x56101a){_0x1b9487=_0x1b9487-0x68;const _0x223dbe=a65_0x223d();let _0x5aa4b4=_0x223dbe[_0x1b9487];return _0x5aa4b4;}export function validatePatchKeys(_0x479fa9){const _0x2b15bf=a65_0x459685,_0x1e47a9=Object[_0x2b15bf(0x6a)](_0x479fa9);if(_0x1e47a9['length']===0x0)throw CliErrors[_0x2b15bf(0xa1)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x2e6f25 of _0x1e47a9){if(FORBIDDEN_FIELD_KEYS['has'](_0x2e6f25))throw CliErrors[_0x2b15bf(0xa1)]('Forbidden\x20patch\x20key:\x20'+_0x2e6f25);if(!MUTABLE_FIELD_KEYS[_0x2b15bf(0xa3)](_0x2e6f25))throw CliErrors[_0x2b15bf(0xa1)](_0x2b15bf(0x91)+_0x2e6f25,_0x2b15bf(0x69)+Array[_0x2b15bf(0x68)](MUTABLE_FIELD_KEYS)[_0x2b15bf(0x7f)](',\x20'));}}export function applyFieldPatch(_0x3f9ec5,_0x202d3a){const _0x5815ba=a65_0x459685;validatePatchKeys(_0x202d3a);const _0x312528=deepClone(_0x3f9ec5),_0x2707d8=new Set();for(const [_0x479acd,_0x586ddd]of Object[_0x5815ba(0x93)](_0x202d3a)){const _0x4d3667=_0x312528[_0x479acd],_0x3e4e03=mergePatchValue(_0x4d3667,_0x586ddd);!deepEqual(_0x4d3667,_0x3e4e03)&&(_0x312528[_0x479acd]=_0x3e4e03,_0x2707d8[_0x5815ba(0x75)](_0x479acd),collectChangedPaths(_0x479acd,_0x4d3667,_0x3e4e03,_0x2707d8));}return{'after':_0x312528,'changedPaths':Array['from'](_0x2707d8)[_0x5815ba(0xae)](),'changed':_0x2707d8[_0x5815ba(0x6d)]>0x0};}export function assertExpectation(_0x44fda1,_0xc6857b){const _0x4b4597=a65_0x459685;if(!_0xc6857b)return;for(const [_0x25d7ed,_0xe97fb5]of Object[_0x4b4597(0x93)](_0xc6857b)){const _0x19a278=_0x44fda1[_0x25d7ed];if(!deepEqual(_0x19a278,_0xe97fb5))throw CliErrors['validation'](_0x4b4597(0x7b)+_0x25d7ed,_0x4b4597(0x7d)+JSON[_0x4b4597(0x7a)](_0xe97fb5)+_0x4b4597(0xa0)+JSON['stringify'](_0x19a278));}}export async function buildDatasetFieldUpdateResult({appCode:_0x3e53c5,input:_0x62338,dryRun:_0x3a1f68}){const _0x50174b=a65_0x459685;validateInput(_0x62338);const _0xf2c619=await getDatasetDetail(_0x62338['code']),_0x44bcca=readFieldArray(_0xf2c619),_0x1176c9=_0x44bcca[_0x50174b(0xb3)](_0x24387a=>_0x24387a?.[_0x50174b(0xa2)]===_0x62338['field']);if(_0x1176c9<0x0)throw CliErrors['validation'](_0x50174b(0x9c)+_0x62338[_0x50174b(0x71)]);const _0x43ac1e=deepClone(_0x44bcca[_0x1176c9]);assertExpectation(_0x43ac1e,_0x62338['expect']);const {after:_0x24011f,changedPaths:_0x456330,changed:_0x34885a}=applyFieldPatch(_0x43ac1e,_0x62338[_0x50174b(0xb0)]),_0x35c612=summarizeDataset(_0xf2c619,_0x62338[_0x50174b(0x96)]);return _0x34885a&&!_0x3a1f68&&(_0x44bcca[_0x1176c9]=_0x24011f,await updateDrivenData(_0xf2c619)),{'ok':!![],'data':{'appCode':_0x3e53c5,'selector':{'code':_0x62338[_0x50174b(0x96)]},'dataset':_0x35c612,'field':{'id':_0x43ac1e['id']??null,'name':_0x43ac1e[_0x50174b(0xa2)]},'dryRun':_0x3a1f68,'changed':_0x34885a,'changedPaths':_0x456330,'before':_0x43ac1e,'after':_0x24011f,'submitted':_0x34885a&&!_0x3a1f68},'message':_0x34885a?_0x3a1f68?_0x50174b(0x74)+_0x62338[_0x50174b(0x71)]+'\x20would\x20change\x20('+_0x456330[_0x50174b(0x7f)](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x62338['field']+'\x20('+_0x456330['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20field\x20'+_0x62338[_0x50174b(0x71)]};}export const datasetFieldUpdate={'service':'dataset','command':a65_0x459685(0x77),'description':a65_0x459685(0xaa),'risk':a65_0x459685(0x8d),'flags':[CODE_FLAG,{'name':a65_0x459685(0x71),'type':'string','required':!![],'description':a65_0x459685(0x97)},{'name':'patch-json','type':a65_0x459685(0x92),'required':!![],'description':a65_0x459685(0x72)},{'name':'expect-json','type':'string','required':![],'description':a65_0x459685(0x89)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x14816b){validateInput(readFieldUpdateInput(_0x14816b));},async 'dryRun'(_0x88882f){const _0x41a48f=a65_0x459685,_0x3ad430=await buildDatasetFieldUpdateResult({'appCode':_0x88882f[_0x41a48f(0x9e)],'input':readFieldUpdateInput(_0x88882f),'dryRun':!![]});return{'method':'POST','url':_0x41a48f(0x9b),'body':_0x3ad430[_0x41a48f(0xa6)],'description':_0x3ad430[_0x41a48f(0x94)]};},async 'execute'(_0x1754bb){const _0x2b3ea0=a65_0x459685;return buildDatasetFieldUpdateResult({'appCode':_0x1754bb[_0x2b3ea0(0x9e)],'input':readFieldUpdateInput(_0x1754bb),'dryRun':![]});}};function readFieldUpdateInput(_0x4490f8){const _0x33819f=a65_0x459685,_0x578284=trim(_0x4490f8[_0x33819f(0x82)](_0x33819f(0x96))),_0x2601a5=emptyToUndefined(_0x4490f8[_0x33819f(0x82)](_0x33819f(0x71))),_0x4e9d34=parseJsonObjectFlag(_0x4490f8['str'](_0x33819f(0x9f)),_0x33819f(0xb1)),_0x3e0902=parseJsonObjectFlag(_0x4490f8[_0x33819f(0x82)](_0x33819f(0x98)),'--expect-json');return{'code':_0x578284,'field':_0x2601a5||'','patch':_0x4e9d34||{},'expect':_0x3e0902};}function validateInput(_0x40c27c){const _0x154458=a65_0x459685;if(!_0x40c27c[_0x154458(0x96)])throw CliErrors[_0x154458(0xa1)](_0x154458(0xb4));if(!_0x40c27c['field'])throw CliErrors[_0x154458(0xa1)](_0x154458(0x8f));validatePatchKeys(_0x40c27c[_0x154458(0xb0)]);}function readFieldArray(_0x4fe44e){const _0x1e95fd=a65_0x459685;if(Array[_0x1e95fd(0xa4)](_0x4fe44e[_0x1e95fd(0x79)]))return _0x4fe44e['fields'];if(Array[_0x1e95fd(0xa4)](_0x4fe44e[_0x1e95fd(0x95)]))return _0x4fe44e[_0x1e95fd(0x95)];throw CliErrors[_0x1e95fd(0xa1)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function summarizeDataset(_0x2b41af,_0x31637e){const _0x2553ff=a65_0x459685,_0x1f0177=isPlainObject(_0x2b41af['dataset'])?_0x2b41af[_0x2553ff(0xac)]:{},_0x3d11da=isPlainObject(_0x2b41af['dbtableConfig'])?_0x2b41af['dbtableConfig']:{};return{'id':_0x2b41af[_0x2553ff(0xa7)]??_0x2b41af['id']??_0x1f0177[_0x2553ff(0x70)]??null,'code':_0x2b41af[_0x2553ff(0x7e)]??_0x2b41af[_0x2553ff(0x96)]??_0x1f0177[_0x2553ff(0x85)]??_0x31637e,'name':_0x2b41af['name']??_0x1f0177['datasetName']??null,'table':_0x3d11da[_0x2553ff(0xa8)]??_0x1f0177[_0x2553ff(0xa8)]??null,'db':_0x3d11da[_0x2553ff(0xab)]??_0x3d11da[_0x2553ff(0x78)]??null};}function mergePatchValue(_0x362168,_0x23d4f8){if(isPlainObject(_0x362168)&&isPlainObject(_0x23d4f8))return deepMerge(_0x362168,_0x23d4f8);return deepClone(_0x23d4f8);}function deepMerge(_0x2662d8,_0x49755a){const _0x393f59=a65_0x459685,_0x316589=deepClone(_0x2662d8);for(const [_0x31b3bd,_0x482494]of Object[_0x393f59(0x93)](_0x49755a)){_0x316589[_0x31b3bd]=isPlainObject(_0x316589[_0x31b3bd])&&isPlainObject(_0x482494)?deepMerge(_0x316589[_0x31b3bd],_0x482494):deepClone(_0x482494);}return _0x316589;}function collectChangedPaths(_0x3e7d3d,_0x12ea2b,_0x59a371,_0x343328){const _0x208eb0=a65_0x459685;if(!isPlainObject(_0x12ea2b)||!isPlainObject(_0x59a371))return;const _0x257c88=new Set([...Object[_0x208eb0(0x6a)](_0x12ea2b),...Object[_0x208eb0(0x6a)](_0x59a371)]);for(const _0x2f7f0c of _0x257c88){const _0x36d3a9=_0x12ea2b[_0x2f7f0c],_0x52a12f=_0x59a371[_0x2f7f0c];!deepEqual(_0x36d3a9,_0x52a12f)&&_0x343328[_0x208eb0(0x75)](_0x3e7d3d+'.'+_0x2f7f0c);}}function deepClone(_0x350990){const _0x106843=a65_0x459685;if(_0x350990===undefined)return _0x350990;return JSON['parse'](JSON[_0x106843(0x7a)](_0x350990));}function deepEqual(_0x2cabfb,_0x17bc7a){const _0x51fedb=a65_0x459685;return JSON[_0x51fedb(0x7a)](_0x2cabfb)===JSON[_0x51fedb(0x7a)](_0x17bc7a);}function isPlainObject(_0xa71b01){const _0x23601a=a65_0x459685;return Boolean(_0xa71b01)&&typeof _0xa71b01===_0x23601a(0x86)&&!Array['isArray'](_0xa71b01);}function emptyToUndefined(_0x359bc5){const _0x1f0e53=a65_0x459685,_0x394010=String(_0x359bc5||'')[_0x1f0e53(0x6f)]();return _0x394010||undefined;}function trim(_0x599051){const _0xcbf3c3=a65_0x459685;return String(_0x599051||'')[_0xcbf3c3(0x6f)]();}
|