@lovrabet/rabetbase-cli 2.3.9-beta.2 → 2.3.9-beta.3
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 -0
- 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/delete.js +1 -0
- package/lib/commands/menu/group-create.js +1 -0
- package/lib/commands/menu/group-update.js +1 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -0
- package/lib/commands/menu/shared/facts.js +1 -0
- 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 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/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/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 -0
- package/lib/commands/task/status.js +1 -0
- 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 -0
- 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 -0
- package/lib/framework/explicit-yes.js +1 -0
- 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 a53_0x1303(){const _0xbbfd2f=['1527278WcrOJy','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','List\x20all\x20config\x20values','820150Jsjlll','config','global','2515eUqiAG','920862kUJsGz','9276gkumZT','boolean','19243iCkWxX','read','40bfIzXd','12088370bHBhti','bool','924lJYrKD','176259CzOSEK','list'];a53_0x1303=function(){return _0xbbfd2f;};return a53_0x1303();}const a53_0x1df112=a53_0x2fe1;(function(_0xcc3441,_0x1651f6){const _0x34158c=a53_0x2fe1,_0x2c3a62=_0xcc3441();while(!![]){try{const _0x1c052b=-parseInt(_0x34158c(0x102))/0x1+-parseInt(_0x34158c(0xff))/0x2+-parseInt(_0x34158c(0xfd))/0x3+parseInt(_0x34158c(0x107))/0x4*(parseInt(_0x34158c(0x105))/0x5)+parseInt(_0x34158c(0xfc))/0x6*(parseInt(_0x34158c(0x109))/0x7)+parseInt(_0x34158c(0x10b))/0x8*(-parseInt(_0x34158c(0x106))/0x9)+parseInt(_0x34158c(0xfa))/0xa;if(_0x1c052b===_0x1651f6)break;else _0x2c3a62['push'](_0x2c3a62['shift']());}catch(_0x153a9b){_0x2c3a62['push'](_0x2c3a62['shift']());}}}(a53_0x1303,0x9d59c));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2a2fa6){const _0x276e13=a53_0x2fe1,_0x2b3ee7=_0x2a2fa6[_0x276e13(0xfb)](_0x276e13(0x104))?readScopedConfig(_0x276e13(0x104)):readConfig();return{'ok':!![],'data':_0x2b3ee7};}function a53_0x2fe1(_0x4c5001,_0x37033e){_0x4c5001=_0x4c5001-0xfa;const _0x1303bf=a53_0x1303();let _0x2fe1f8=_0x1303bf[_0x4c5001];return _0x2fe1f8;}export const configListDefinition={'service':a53_0x1df112(0x103),'command':a53_0x1df112(0xfe),'description':a53_0x1df112(0x101),'risk':a53_0x1df112(0x10a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x1df112(0x104),'type':a53_0x1df112(0x108),'description':a53_0x1df112(0x100),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a54_0x11c0(_0x3a086f,_0x259206){_0x3a086f=_0x3a086f-0x141;const _0x4a6a54=a54_0x4a6a();let _0x11c026=_0x4a6a54[_0x3a086f];return _0x11c026;}const a54_0x5771ab=a54_0x11c0;(function(_0x453963,_0x2cdda1){const _0x1f509d=a54_0x11c0,_0x214e86=_0x453963();while(!![]){try{const _0x41743d=-parseInt(_0x1f509d(0x160))/0x1+-parseInt(_0x1f509d(0x143))/0x2+parseInt(_0x1f509d(0x149))/0x3+-parseInt(_0x1f509d(0x164))/0x4*(parseInt(_0x1f509d(0x154))/0x5)+parseInt(_0x1f509d(0x171))/0x6+parseInt(_0x1f509d(0x145))/0x7+-parseInt(_0x1f509d(0x161))/0x8*(-parseInt(_0x1f509d(0x146))/0x9);if(_0x41743d===_0x2cdda1)break;else _0x214e86['push'](_0x214e86['shift']());}catch(_0xd49167){_0x214e86['push'](_0x214e86['shift']());}}}(a54_0x4a6a,0x4ce35));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x3816b9){const _0x24101f=a54_0x11c0,_0x1c0f21=_0x3816b9[_0x24101f(0x167)](_0x24101f(0x157)),_0xc0350e=_0x3816b9[_0x24101f(0x167)](_0x24101f(0x141));if(!_0x1c0f21)throw CliErrors[_0x24101f(0x155)](_0x24101f(0x173),'Usage:\x20'+CLI_BIN_NAME+_0x24101f(0x170));if(_0xc0350e===undefined||_0xc0350e==='')throw CliErrors[_0x24101f(0x155)](_0x24101f(0x158),_0x24101f(0x15f)+CLI_BIN_NAME+_0x24101f(0x170));if(_0xc0350e[_0x24101f(0x172)]>0x1f4)throw CliErrors['validation'](_0x24101f(0x151));if(!isTopLevelConfigKey(_0x1c0f21))throw CliErrors[_0x24101f(0x155)](_0x24101f(0x174)+_0x1c0f21+_0x24101f(0x153),_0x24101f(0x14d)+getTopLevelConfigKeySummary());if(_0x1c0f21===_0x24101f(0x147))throw CliErrors[_0x24101f(0x155)](_0x24101f(0x152));if(CONFIG_ENUM_VALUES[_0x1c0f21]&&!CONFIG_ENUM_VALUES[_0x1c0f21]['includes'](_0xc0350e))throw CliErrors[_0x24101f(0x155)](_0x24101f(0x14e)+_0x1c0f21+_0x24101f(0x166)+CONFIG_ENUM_VALUES[_0x1c0f21][_0x24101f(0x15b)](',\x20'));if(_0x1c0f21===_0x24101f(0x142)&&!normalizeLocale(_0xc0350e))throw CliErrors[_0x24101f(0x155)]('Invalid\x20locale\x20value.',_0x24101f(0x16a));const _0x1c1399={'global':_0x3816b9[_0x24101f(0x159)](_0x24101f(0x15c))},_0x3d6f52=resolveWriteScope(_0x1c1399),_0x10d08d=readScopedConfig(_0x3d6f52);let _0x2c82e6=_0x1c0f21,_0x17525d=_0xc0350e;_0x1c0f21===_0x24101f(0x156)&&(_0x2c82e6=_0x24101f(0x15a),delete _0x10d08d[_0x24101f(0x156)]);_0x1c0f21===_0x24101f(0x142)&&(_0x17525d=normalizeLocale(_0xc0350e));if(_0x1c0f21===_0x24101f(0x16c)){_0x17525d=normalizeEnv(_0xc0350e);if(!isProduction(_0x17525d)&&!isDaily(_0x17525d))throw CliErrors[_0x24101f(0x155)](_0x24101f(0x144),_0x24101f(0x15e));}if(_0x1c0f21==='appcode'){const _0x6f2d2f=_0x10d08d[_0x24101f(0x165)]&&typeof _0x10d08d['apps']===_0x24101f(0x15d)?Object[_0x24101f(0x169)](_0x10d08d['apps']):[];if(_0x6f2d2f['length']>0x0)throw CliErrors[_0x24101f(0x155)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x24101f(0x14c)+CLI_BIN_NAME+_0x24101f(0x16f)+_0x17525d+'`,\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x30ef4c=buildCanonicalProjectConfig({..._0x10d08d},{'appCodes':[_0x17525d],'env':typeof _0x10d08d[_0x24101f(0x16c)]===_0x24101f(0x162)?_0x10d08d[_0x24101f(0x16c)]:undefined});writeScopedConfig(_0x30ef4c,_0x3d6f52);const _0xac8a40=_0x3d6f52==='global'?_0x24101f(0x14b):_0x24101f(0x168);return{'ok':!![],'message':'✓\x20'+_0xac8a40+_0x24101f(0x16e)+_0x17525d+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x10d08d[_0x2c82e6]=_0x17525d,writeScopedConfig(_0x10d08d,_0x3d6f52);const _0x463f37=_0x3d6f52===_0x24101f(0x15c)?_0x24101f(0x14b):_0x24101f(0x168);return{'ok':!![],'message':'✓\x20'+_0x463f37+'\x20'+_0x2c82e6+_0x24101f(0x163)+_0x17525d};}function a54_0x4a6a(){const _0x331e39=['Settable\x20top-level\x20keys:\x20','Invalid\x20value\x20for\x20\x22','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','config','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x22\x20is\x20not\x20settable.','2435nwzzSL','validation','app','key','Missing\x20value.','bool','appcode','join','global','object','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Usage:\x20','577583ceIstn','4243496wmPAyq','string','\x20set\x20to:\x20','596WkGGVZ','apps','\x22.\x20Allowed:\x20','str','Project','keys','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','boolean','env','write','\x20appcode\x20set\x20to:\x20','\x20app\x20add\x20<name>\x20--appcode\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','3471330neuALy','length','Missing\x20key.','Top-level\x20key\x20\x22','value','locale','1150796jprozv','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','3192hChXXY','9ULdRXJ','riskLevel','set','1293087ucAOMd','Set\x20a\x20config\x20value','Global','Use\x20`'];a54_0x4a6a=function(){return _0x331e39;};return a54_0x4a6a();}export const configSetDefinition={'service':a54_0x5771ab(0x150),'command':a54_0x5771ab(0x148),'description':a54_0x5771ab(0x14a),'risk':a54_0x5771ab(0x16d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a54_0x5771ab(0x162),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x5771ab(0x141),'type':a54_0x5771ab(0x162),'description':'Config\x20value','required':!![]},{'name':a54_0x5771ab(0x15c),'type':a54_0x5771ab(0x16b),'description':a54_0x5771ab(0x14f),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a89d8,_0x838429){var _0x203dd1=a55_0x1ea6,_0x393d6a=_0x1a89d8();while(!![]){try{var _0x5c2b9a=parseInt(_0x203dd1(0x1c1))/0x1*(-parseInt(_0x203dd1(0x1b8))/0x2)+-parseInt(_0x203dd1(0x1bb))/0x3+-parseInt(_0x203dd1(0x1b6))/0x4+parseInt(_0x203dd1(0x1c0))/0x5*(parseInt(_0x203dd1(0x1be))/0x6)+-parseInt(_0x203dd1(0x1b4))/0x7*(-parseInt(_0x203dd1(0x1b2))/0x8)+parseInt(_0x203dd1(0x1b3))/0x9*(-parseInt(_0x203dd1(0x1b9))/0xa)+-parseInt(_0x203dd1(0x1ba))/0xb*(-parseInt(_0x203dd1(0x1b7))/0xc);if(_0x5c2b9a===_0x838429)break;else _0x393d6a['push'](_0x393d6a['shift']());}catch(_0x61be30){_0x393d6a['push'](_0x393d6a['shift']());}}}(a55_0xc5ce,0x1feac));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a55_0x1ea6(_0x3c748d,_0x37f85e){_0x3c748d=_0x3c748d-0x1b2;var _0xc5cec1=a55_0xc5ce();var _0x1ea6bc=_0xc5cec1[_0x3c748d];return _0x1ea6bc;}function a55_0xc5ce(){var _0x4cddd0=['Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','6BVZXYO','project','244940eGvDUu','2RJlRke','11552vZIKkX','110277kluvtA','819pSRArc','validation','1039080NsqlZO','5438604SIIJQW','77326yCWJZV','70XWUXgz','11dmvVrM','352662WIzYjh'];a55_0xc5ce=function(){return _0x4cddd0;};return a55_0xc5ce();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3a103a){var _0x8ac888=a55_0x1ea6;if(_0x3a103a['global'])return _0x8ac888(0x1bd);if(!isInProject())throw CliErrors[_0x8ac888(0x1b5)](_0x8ac888(0x1bc),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x8ac888(0x1bf);}export function readScopedConfig(_0x425cc4){return readConfigFile(resolveWriteConfigPath(_0x425cc4));}export function writeScopedConfig(_0x32471f,_0x3b5df9){writeConfigFile(resolveWriteConfigPath(_0x3b5df9),_0x32471f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x1673f2=a56_0x5e00;(function(_0x4d80af,_0x280851){const _0x2ccc89=a56_0x5e00,_0x1ce5a3=_0x4d80af();while(!![]){try{const _0xf61caf=parseInt(_0x2ccc89(0xe2))/0x1+-parseInt(_0x2ccc89(0xe4))/0x2*(parseInt(_0x2ccc89(0xe1))/0x3)+parseInt(_0x2ccc89(0xe0))/0x4+-parseInt(_0x2ccc89(0xeb))/0x5+parseInt(_0x2ccc89(0xe6))/0x6*(parseInt(_0x2ccc89(0xdf))/0x7)+-parseInt(_0x2ccc89(0xe7))/0x8*(parseInt(_0x2ccc89(0xe5))/0x9)+parseInt(_0x2ccc89(0xee))/0xa;if(_0xf61caf===_0x280851)break;else _0x1ce5a3['push'](_0x1ce5a3['shift']());}catch(_0x50a244){_0x1ce5a3['push'](_0x1ce5a3['shift']());}}}(a56_0xdfb1,0xf3178));import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x5e00(_0x2297c9,_0x2b2932){_0x2297c9=_0x2297c9-0xdf;const _0xdfb129=a56_0xdfb1();let _0x5e0083=_0xdfb129[_0x2297c9];return _0x5e0083;}function a56_0xdfb1(){const _0x22f9dd=['\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','28209750GnlyzK','\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]','28tTTECr','1520944MhyBYe','84117eOPNNk','463292rCWfFp','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','22gWnZNG','26253NZzxbC','308514FJtyAW','4936EnwTQp','filter','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','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','3831285gYZqkd','\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_0xdfb1=function(){return _0x22f9dd;};return a56_0xdfb1();}export const dataFilter=buildDataCommand({'command':a56_0x1673f2(0xe8),'operation':a56_0x1673f2(0xe8),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a56_0x1673f2(0xea),'helpExtra':[a56_0x1673f2(0xe9),a56_0x1673f2(0xe3),a56_0x1673f2(0xef),a56_0x1673f2(0xec),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a56_0x1673f2(0xed)]['join']('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x48dbd2=a57_0x58de;(function(_0x2d1544,_0x2ed8c4){const _0x4c019d=a57_0x58de,_0x4df4e5=_0x2d1544();while(!![]){try{const _0x53afac=parseInt(_0x4c019d(0x10c))/0x1*(parseInt(_0x4c019d(0x115))/0x2)+parseInt(_0x4c019d(0x114))/0x3+parseInt(_0x4c019d(0x10e))/0x4+parseInt(_0x4c019d(0x110))/0x5+-parseInt(_0x4c019d(0x116))/0x6+-parseInt(_0x4c019d(0x117))/0x7*(-parseInt(_0x4c019d(0x10f))/0x8)+parseInt(_0x4c019d(0x113))/0x9*(-parseInt(_0x4c019d(0x10d))/0xa);if(_0x53afac===_0x2ed8c4)break;else _0x4df4e5['push'](_0x4df4e5['shift']());}catch(_0x1714a8){_0x4df4e5['push'](_0x4df4e5['shift']());}}}(a57_0x1f64,0x49e4d));import{buildDataCommand}from'../../commands/data/shared.js';function a57_0x58de(_0xfa28a1,_0xf91ed5){_0xfa28a1=_0xfa28a1-0x10c;const _0x1f649d=a57_0x1f64();let _0x58de95=_0x1f649d[_0xfa28a1];return _0x58de95;}function a57_0x1f64(){const _0x342830=['79020xCHzQX','359482uBOsax','1861170WhQySe','182aZRIee','1bhPxKv','10sfxwCC','1893740emnIZo','142976bxInrl','515195wFZWtg','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','getOne','5709267AkWGgd'];a57_0x1f64=function(){return _0x342830;};return a57_0x1f64();}export const dataGetOne=buildDataCommand({'command':a57_0x48dbd2(0x112),'operation':a57_0x48dbd2(0x112),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a57_0x48dbd2(0x111)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37f44c,_0x41b591){const _0x5222f1=a58_0x2c72,_0x392b09=_0x37f44c();while(!![]){try{const _0x1ddcec=-parseInt(_0x5222f1(0x1c0))/0x1+-parseInt(_0x5222f1(0x1bc))/0x2+parseInt(_0x5222f1(0x1c1))/0x3+-parseInt(_0x5222f1(0x1be))/0x4*(parseInt(_0x5222f1(0x1bf))/0x5)+parseInt(_0x5222f1(0x1bb))/0x6+-parseInt(_0x5222f1(0x1c2))/0x7+parseInt(_0x5222f1(0x1bd))/0x8;if(_0x1ddcec===_0x41b591)break;else _0x392b09['push'](_0x392b09['shift']());}catch(_0x2b4575){_0x392b09['push'](_0x392b09['shift']());}}}(a58_0x197a,0x71946));function a58_0x2c72(_0xe49b63,_0x17870d){_0xe49b63=_0xe49b63-0x1bb;const _0x197a3f=a58_0x197a();let _0x2c727f=_0x197a3f[_0xe49b63];return _0x2c727f;}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a58_0x197a(){const _0x284ef8=['2475MDDuPN','527624KfTsqB','1144005HmLVWy','1184218LXUidW','4703598gDxjQr','668158wQMMuZ','4282128CTvIFf','1652buVEaX'];a58_0x197a=function(){return _0x284ef8;};return a58_0x197a();}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x396d1e,_0x15d426){const _0x39305e=a59_0x5228,_0x59677c=_0x396d1e();while(!![]){try{const _0x2ef075=parseInt(_0x39305e(0x1d4))/0x1+-parseInt(_0x39305e(0x1dc))/0x2*(-parseInt(_0x39305e(0x1d3))/0x3)+parseInt(_0x39305e(0x1cf))/0x4+-parseInt(_0x39305e(0x1d9))/0x5*(-parseInt(_0x39305e(0x1c2))/0x6)+-parseInt(_0x39305e(0x1cb))/0x7+-parseInt(_0x39305e(0x1de))/0x8*(-parseInt(_0x39305e(0x1d2))/0x9)+-parseInt(_0x39305e(0x1c8))/0xa;if(_0x2ef075===_0x15d426)break;else _0x59677c['push'](_0x59677c['shift']());}catch(_0x27b9fc){_0x59677c['push'](_0x59677c['shift']());}}}(a59_0x1368,0x97f1d));function a59_0x1368(){const _0x17d52f=['params','7057085RfZclg','appCode','paramsRequired','now','1732848nDwYIe','command','str','1566UuSPvq','1469931SiuLjL','563161CWFKmw','getOne','\x20completed\x20in\x20','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','flagMissing','1338385iFfBwJ','code','compress','2mwsQcA','operation','26800EIcZSu','description','read','12oCIZGD','alias','paramsHint','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','string','helpExtra','9740840uUnyRM','data'];a59_0x1368=function(){return _0x17d52f;};return a59_0x1368();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x257726){const _0x580aac=a59_0x5228;if(!_0x257726)throw CliErrors[_0x580aac(0x1d8)](_0x580aac(0x1ca),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x1489a0=_0x257726['id'];if(_0x1489a0===undefined||_0x1489a0===null||_0x1489a0==='')throw CliErrors['validation'](_0x580aac(0x1d7),_0x580aac(0x1c5));}function a59_0x5228(_0x2869a6,_0x50b423){_0x2869a6=_0x2869a6-0x1c2;const _0x1368d1=a59_0x1368();let _0x5228f5=_0x1368d1[_0x2869a6];return _0x5228f5;}function parseCommandParams(_0x42f483){return parseJsonParams(_0x42f483)??{};}export function buildDataCommand(_0x1a2f91){const _0x594156=a59_0x5228,_0x15c1db='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x594156(0x1c9),'command':_0x1a2f91[_0x594156(0x1d0)],'description':_0x1a2f91[_0x594156(0x1df)],'risk':_0x594156(0x1e0),'defaultOutputFormat':_0x594156(0x1db),'helpExtra':_0x1a2f91[_0x594156(0x1c7)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x594156(0x1c3),'type':_0x594156(0x1c6),'description':_0x15c1db},{'name':_0x594156(0x1ca),'type':_0x594156(0x1c6),'description':_0x1a2f91[_0x594156(0x1c4)]}],async 'validate'(_0x1e0955){const _0x1294f9=_0x594156,_0x20c5c8=_0x1e0955['str'](_0x1294f9(0x1ca));if(_0x1a2f91[_0x1294f9(0x1cd)]&&!_0x20c5c8)throw CliErrors['flagMissing'](_0x1294f9(0x1ca),_0x1a2f91[_0x1294f9(0x1c4)]);const _0x4c22b2=parseJsonParams(_0x20c5c8);_0x1a2f91['operation']===_0x1294f9(0x1d5)&&assertGetOneId(_0x4c22b2);},async 'execute'(_0x322ff4){const _0x2aa78b=_0x594156,_0x233db1=parseCommandParams(_0x322ff4[_0x2aa78b(0x1d1)](_0x2aa78b(0x1ca))),_0x2bf460=Date[_0x2aa78b(0x1ce)](),_0x492ee1=await executeDatasetDataOperation(_0x322ff4[_0x2aa78b(0x1cc)],_0x322ff4[_0x2aa78b(0x1d1)](_0x2aa78b(0x1da)),_0x1a2f91[_0x2aa78b(0x1dd)],_0x233db1),_0x1d9efe=Date[_0x2aa78b(0x1ce)]()-_0x2bf460;return{'ok':!![],'data':{'result':_0x492ee1,'elapsed':_0x1d9efe},'message':'data\x20'+_0x1a2f91[_0x2aa78b(0x1d0)]+_0x2aa78b(0x1d6)+_0x1d9efe+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a59_0x541e58=a59_0x1bbf;(function(_0x5ad9c0,_0x232a10){const _0x258de7=a59_0x1bbf,_0xa27b87=_0x5ad9c0();while(!![]){try{const _0x11d1d0=-parseInt(_0x258de7(0x1ed))/0x1*(-parseInt(_0x258de7(0x1d9))/0x2)+parseInt(_0x258de7(0x1e4))/0x3*(-parseInt(_0x258de7(0x1f8))/0x4)+parseInt(_0x258de7(0x1cd))/0x5*(parseInt(_0x258de7(0x1e3))/0x6)+parseInt(_0x258de7(0x1f4))/0x7+-parseInt(_0x258de7(0x1d4))/0x8*(-parseInt(_0x258de7(0x1db))/0x9)+-parseInt(_0x258de7(0x1ce))/0xa+-parseInt(_0x258de7(0x1e5))/0xb;if(_0x11d1d0===_0x232a10)break;else _0xa27b87['push'](_0xa27b87['shift']());}catch(_0x50fa98){_0xa27b87['push'](_0xa27b87['shift']());}}}(a59_0xeaa4,0x45556));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x541e58(0x1c2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x256f77,input:_0x5dba29,dryRun:_0x628e32}){const _0x10824b=a59_0x541e58;validateInput(_0x5dba29);const _0x255e03=normalizeBusinessGroup(_0x5dba29[_0x10824b(0x1c3)]),_0x4337ed=await getDatasetDetail(_0x5dba29[_0x10824b(0x1cf)]),_0x1da7bc=resolveBusinessGroupDataset(_0x4337ed,_0x5dba29['code']),_0x182d5c=loadCurrentBusinessGroup(_0x4337ed,_0x1da7bc);assertExpectedBusinessGroup(_0x182d5c,_0x5dba29[_0x10824b(0x1c4)]);const _0x3cfe3f=buildBackendPayload(_0x256f77,_0x1da7bc,_0x255e03),_0xb11ce0=_0x182d5c!==_0x255e03;let _0x175777;if(_0xb11ce0&&!_0x628e32){await updateErBusinessGroup(_0x3cfe3f);const _0x5bc85e=await getDatasetDetail(_0x1da7bc[_0x10824b(0x1cf)]),_0x462e4b=resolveBusinessGroupDataset(_0x5bc85e,_0x1da7bc[_0x10824b(0x1cf)]),_0x5cafe2=loadCurrentBusinessGroup(_0x5bc85e,_0x462e4b);if(_0x5cafe2!==_0x255e03)throw CliErrors[_0x10824b(0x1c7)](_0x10824b(0x1f2),_0x10824b(0x1c5)+JSON[_0x10824b(0x1e2)](_0x255e03)+',\x20actual\x20'+JSON[_0x10824b(0x1e2)](_0x5cafe2)+'.');_0x175777={'verified':!![],'status':_0x10824b(0x1c1),'afterReadback':{'businessGroup':_0x5cafe2}};}else!_0xb11ce0&&(_0x175777={'verified':!![],'status':_0x10824b(0x1e1),'afterReadback':{'businessGroup':_0x182d5c}});const _0xcd5e95={'operation':_0x10824b(0x1ea),'appCode':_0x256f77,'selector':{'code':_0x1da7bc[_0x10824b(0x1cf)]},'dataset':_0x1da7bc,'before':{'businessGroup':_0x182d5c},'after':{'businessGroup':_0x255e03},'changed':_0xb11ce0,'dryRun':_0x628e32,'submitted':_0xb11ce0&&!_0x628e32,'backend':{'method':_0x10824b(0x1be),'path':BACKEND_PATH,'payload':_0x3cfe3f},..._0x175777?{'verification':_0x175777}:{},'warnings':[]};return{'ok':!![],'data':_0xcd5e95,'message':_0xb11ce0?_0x628e32?_0x10824b(0x1d0)+_0x1da7bc[_0x10824b(0x1cf)]:'Updated\x20business\x20model\x20group\x20for\x20dataset\x20'+_0x1da7bc[_0x10824b(0x1cf)]:_0x10824b(0x1c6)+_0x1da7bc[_0x10824b(0x1cf)]};}export const datasetBusinessGroupUpdate={'service':a59_0x541e58(0x1f1),'command':a59_0x541e58(0x1d2),'description':'Update\x20business\x20model\x20group','risk':a59_0x541e58(0x1bc),'flags':[CODE_FLAG,{'name':'business-group','type':a59_0x541e58(0x1e6),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':a59_0x541e58(0x1e6),'required':![],'description':a59_0x541e58(0x1ca)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f8161){validateInput(readBusinessGroupUpdateInput(_0x3f8161));},async 'dryRun'(_0x4b4e52){const _0x2a05dd=a59_0x541e58,_0x4e7c8a=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x4b4e52['appCode'],'input':readBusinessGroupUpdateInput(_0x4b4e52),'dryRun':!![]});return{'method':_0x2a05dd(0x1be),'url':BACKEND_PATH,'body':_0x4e7c8a['data']['backend'][_0x2a05dd(0x1da)],'description':_0x4e7c8a[_0x2a05dd(0x1c9)],..._0x4e7c8a[_0x2a05dd(0x1e9)]};},async 'execute'(_0x4fda73){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x4fda73['appCode'],'input':readBusinessGroupUpdateInput(_0x4fda73),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x23e9fd){const _0x484b4d=a59_0x541e58,_0x1dead3=_0x23e9fd[_0x484b4d(0x1bf)](_0x484b4d(0x1d5));return{'code':trim(_0x23e9fd[_0x484b4d(0x1bf)]('code')),'businessGroup':_0x23e9fd[_0x484b4d(0x1bf)](_0x484b4d(0x1f3)),'expectBusinessGroup':_0x1dead3===undefined||_0x1dead3===''?undefined:_0x1dead3};}function validateInput(_0x1fcd7f){const _0x1ccb03=a59_0x541e58;if(!trim(_0x1fcd7f['code']))throw CliErrors[_0x1ccb03(0x1e8)](_0x1ccb03(0x1ec));if(_0x1fcd7f[_0x1ccb03(0x1c3)]===undefined)throw CliErrors[_0x1ccb03(0x1e8)](_0x1ccb03(0x1cb));}function resolveBusinessGroupDataset(_0x37d51e,_0xcc5a23){const _0x51b0d0=a59_0x541e58,_0x221176=asPlainObject(_0x37d51e[_0x51b0d0(0x1f1)]),_0x22de1a=asPlainObject(_0x37d51e['dbtableConfig']),_0x4148d0=resolveSourceType(_0x37d51e,_0x221176,_0x22de1a),_0x182f2f=firstString(_0x37d51e[_0x51b0d0(0x1eb)],_0x37d51e['code'],_0x221176[_0x51b0d0(0x1d3)],_0xcc5a23)||_0xcc5a23;return{'id':firstNumber(_0x37d51e[_0x51b0d0(0x1ba)],_0x37d51e['id'],_0x221176[_0x51b0d0(0x1dc)])??firstString(_0x37d51e[_0x51b0d0(0x1ba)],_0x37d51e['id'],_0x221176['datasetId'])??null,'code':_0x182f2f,'name':firstString(_0x37d51e['name'],_0x221176[_0x51b0d0(0x1c0)],_0x221176[_0x51b0d0(0x1e7)])||null,'sourceType':_0x4148d0};}function resolveSourceType(_0x431d1e,_0x1d86eb,_0x306c84){const _0x41b5d4=a59_0x541e58,_0x3256ab=firstString(_0x431d1e[_0x41b5d4(0x1f7)],_0x431d1e[_0x41b5d4(0x1d7)],_0x1d86eb['source'],_0x1d86eb[_0x41b5d4(0x1d7)])?.[_0x41b5d4(0x1d1)]()[_0x41b5d4(0x1d8)]();if(_0x3256ab==='DB_TABLE'||_0x3256ab==='METADATA')return _0x3256ab;if(Object['keys'](_0x306c84)[_0x41b5d4(0x1f9)]>0x0)return _0x41b5d4(0x1df);throw CliErrors[_0x41b5d4(0x1e8)](_0x41b5d4(0x1ee));}function loadCurrentBusinessGroup(_0x52023b,_0x532a15){const _0x163a54=a59_0x541e58,_0x45dc44=readBusinessGroupFromDatasetDetail(_0x52023b,_0x532a15[_0x163a54(0x1d7)]);if(_0x45dc44['found'])return normalizeBusinessGroup(_0x45dc44['value']);if(_0x532a15['sourceType']==='METADATA')return'';throw CliErrors[_0x163a54(0x1e8)](_0x163a54(0x1d6),'Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x377f0d,_0x21ec94){const _0x2fe2ef=a59_0x541e58,_0x4c7fa5=asPlainObject(_0x377f0d[_0x2fe2ef(0x1f1)]),_0x5e048e=firstPresent(_0x377f0d[_0x2fe2ef(0x1c3)]);if(_0x5e048e[_0x2fe2ef(0x1cc)])return _0x5e048e;const _0x313901=firstPresent(_0x4c7fa5[_0x2fe2ef(0x1c3)]);if(_0x313901[_0x2fe2ef(0x1cc)])return _0x313901;if(_0x21ec94===_0x2fe2ef(0x1df))return{'found':![]};const _0x11db47=readBusinessGroupFromExtend(_0x377f0d[_0x2fe2ef(0x1c8)]);if(_0x11db47[_0x2fe2ef(0x1cc)])return _0x11db47;return readBusinessGroupFromExtend(_0x4c7fa5[_0x2fe2ef(0x1c8)]);}function readBusinessGroupFromExtend(_0x432165){const _0x5864d6=a59_0x541e58;if(_0x432165===undefined||_0x432165===null||_0x432165==='')return{'found':![]};if(typeof _0x432165===_0x5864d6(0x1e6))try{const _0x48de14=JSON[_0x5864d6(0x1bb)](_0x432165);return readBusinessGroupFromExtend(_0x48de14);}catch{return{'found':![]};}const _0x201b17=asPlainObject(_0x432165);if(Object[_0x5864d6(0x1f5)][_0x5864d6(0x1f6)]['call'](_0x201b17,_0x5864d6(0x1c3)))return{'found':!![],'value':_0x201b17['businessGroup']};return{'found':![]};}function a59_0xeaa4(){const _0xcf439f=['update','modelCode','--code\x20is\x20required','1HuMJZq','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isFinite','object','dataset','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','business-group','3968391ppdkms','prototype','hasOwnProperty','source','4wvmCwW','length','modelId','parse','write','isArray','POST','str','datasetName','matched','/smartapi/question/er-config/business-group/edit','businessGroup','expectBusinessGroup','Expected\x20','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','apiError','extend','message','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','--business-group\x20is\x20required','found','5NpTaAg','3683260ZIsGxL','code','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','trim','business-group-update','datasetCode','24wQEMeH','expect-business-group','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','sourceType','toUpperCase','643362rejbHT','payload','1345833sOujgZ','datasetId','number',',\x20actual\x20','DB_TABLE','Expectation\x20mismatch\x20at\x20businessGroup','unchanged','stringify','2264964LWtUEN','110613lIRfeo','11280632TQVueS','string','name','validation','data'];a59_0xeaa4=function(){return _0xcf439f;};return a59_0xeaa4();}function a59_0x1bbf(_0x3a6d9b,_0x382cb5){_0x3a6d9b=_0x3a6d9b-0x1ba;const _0xeaa4cb=a59_0xeaa4();let _0x1bbf10=_0xeaa4cb[_0x3a6d9b];return _0x1bbf10;}function firstPresent(..._0x56f524){for(const _0x228c11 of _0x56f524){if(_0x228c11!==undefined&&_0x228c11!==null)return{'found':!![],'value':_0x228c11};}return{'found':![]};}function assertExpectedBusinessGroup(_0x1dde3f,_0x226816){const _0x45fc31=a59_0x541e58;if(_0x226816===undefined)return;const _0x4f5d93=normalizeBusinessGroup(_0x226816);if(_0x1dde3f!==_0x4f5d93)throw CliErrors[_0x45fc31(0x1e8)](_0x45fc31(0x1e0),'Expected\x20'+JSON['stringify'](_0x4f5d93)+_0x45fc31(0x1de)+JSON['stringify'](_0x1dde3f));}function buildBackendPayload(_0x30dfbd,_0x50a54e,_0x2b6564){const _0x43c52e=a59_0x541e58;return{'appCode':_0x30dfbd,'datasetCode':_0x50a54e[_0x43c52e(0x1cf)],'businessGroup':_0x2b6564};}function normalizeBusinessGroup(_0x1fb5db){const _0x32b924=a59_0x541e58;if(_0x1fb5db===undefined||_0x1fb5db===null)return'';return String(_0x1fb5db)[_0x32b924(0x1d1)]();}function asPlainObject(_0x4a1e0a){const _0x4a8031=a59_0x541e58;if(!_0x4a1e0a||typeof _0x4a1e0a!==_0x4a8031(0x1f0)||Array[_0x4a8031(0x1bd)](_0x4a1e0a))return{};return _0x4a1e0a;}function firstString(..._0x2ab6ef){const _0x23a792=a59_0x541e58;for(const _0x19a6f6 of _0x2ab6ef){if(typeof _0x19a6f6===_0x23a792(0x1e6)&&_0x19a6f6[_0x23a792(0x1d1)]())return _0x19a6f6[_0x23a792(0x1d1)]();if(typeof _0x19a6f6===_0x23a792(0x1dd)&&Number[_0x23a792(0x1ef)](_0x19a6f6))return String(_0x19a6f6);}return undefined;}function firstNumber(..._0x2b4c20){const _0x3450a6=a59_0x541e58;for(const _0x239959 of _0x2b4c20){if(typeof _0x239959===_0x3450a6(0x1dd)&&Number[_0x3450a6(0x1ef)](_0x239959))return _0x239959;if(typeof _0x239959===_0x3450a6(0x1e6)&&_0x239959[_0x3450a6(0x1d1)]()&&Number['isFinite'](Number(_0x239959)))return Number(_0x239959);}return null;}function trim(_0x587ccf){const _0x3110ed=a59_0x541e58;return String(_0x587ccf||'')[_0x3110ed(0x1d1)]();}
|
|
1
|
+
const a60_0xd48ba7=a60_0xc8a1;(function(_0x14f66b,_0x3e29c2){const _0x5cbc93=a60_0xc8a1,_0x21872b=_0x14f66b();while(!![]){try{const _0x5f49b6=parseInt(_0x5cbc93(0x175))/0x1*(parseInt(_0x5cbc93(0x172))/0x2)+-parseInt(_0x5cbc93(0x16d))/0x3+parseInt(_0x5cbc93(0x156))/0x4+parseInt(_0x5cbc93(0x16c))/0x5+parseInt(_0x5cbc93(0x176))/0x6*(parseInt(_0x5cbc93(0x17d))/0x7)+-parseInt(_0x5cbc93(0x184))/0x8*(parseInt(_0x5cbc93(0x169))/0x9)+-parseInt(_0x5cbc93(0x15c))/0xa*(parseInt(_0x5cbc93(0x17e))/0xb);if(_0x5f49b6===_0x3e29c2)break;else _0x21872b['push'](_0x21872b['shift']());}catch(_0xeaf63a){_0x21872b['push'](_0x21872b['shift']());}}}(a60_0xc17e,0xa179a));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a60_0xc17e(){const _0x3a4fe1=['7tsrtrW','32505979YvKRPd','sourceType','length','Update\x20business\x20model\x20group','modelCode','update','32AEUXID','matched','name','write','METADATA','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','Expected\x20','appCode','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','POST','validation','DB_TABLE','datasetId','3338140iqPBNz','businessGroup','prototype','isArray','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','10gEMgEQ','extend','call','expect-business-group','dataset',',\x20actual\x20','str','modelId','business-group','string','code','source','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','2187459VDDHcN','trim','apiError','5987815WWWMwo','65019XRXHkN','number','data','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','datasetName','237086wPfItv','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','11ZdhxnK','7645782OERjRX','found','backend','stringify','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','datasetCode','dbtableConfig'];a60_0xc17e=function(){return _0x3a4fe1;};return a60_0xc17e();}import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0xca922d,input:_0x5da46d,dryRun:_0x13863f}){const _0x30d030=a60_0xc8a1;validateInput(_0x5da46d);const _0x1f7ad7=normalizeBusinessGroup(_0x5da46d['businessGroup']),_0x1e75bd=await getDatasetDetail(_0x5da46d['code']),_0x4d2101=resolveBusinessGroupDataset(_0x1e75bd,_0x5da46d[_0x30d030(0x166)]),_0x4cc435=loadCurrentBusinessGroup(_0x1e75bd,_0x4d2101);assertExpectedBusinessGroup(_0x4cc435,_0x5da46d['expectBusinessGroup']);const _0x3f7ca9=buildBackendPayload(_0xca922d,_0x4d2101,_0x1f7ad7),_0x16ef66=_0x4cc435!==_0x1f7ad7;let _0x4bbb8a;if(_0x16ef66&&!_0x13863f){await updateErBusinessGroup(_0x3f7ca9);const _0x5633e8=await getDatasetDetail(_0x4d2101['code']),_0x26d8b2=resolveBusinessGroupDataset(_0x5633e8,_0x4d2101[_0x30d030(0x166)]),_0x33c934=loadCurrentBusinessGroup(_0x5633e8,_0x26d8b2);if(_0x33c934!==_0x1f7ad7)throw CliErrors[_0x30d030(0x16b)](_0x30d030(0x173),_0x30d030(0x14f)+JSON[_0x30d030(0x179)](_0x1f7ad7)+',\x20actual\x20'+JSON[_0x30d030(0x179)](_0x33c934)+'.');_0x4bbb8a={'verified':!![],'status':_0x30d030(0x185),'afterReadback':{'businessGroup':_0x33c934}};}else!_0x16ef66&&(_0x4bbb8a={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x4cc435}});const _0x5c1250={'operation':_0x30d030(0x183),'appCode':_0xca922d,'selector':{'code':_0x4d2101[_0x30d030(0x166)]},'dataset':_0x4d2101,'before':{'businessGroup':_0x4cc435},'after':{'businessGroup':_0x1f7ad7},'changed':_0x16ef66,'dryRun':_0x13863f,'submitted':_0x16ef66&&!_0x13863f,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x3f7ca9},..._0x4bbb8a?{'verification':_0x4bbb8a}:{},'warnings':[]};return{'ok':!![],'data':_0x5c1250,'message':_0x16ef66?_0x13863f?_0x30d030(0x168)+_0x4d2101[_0x30d030(0x166)]:_0x30d030(0x189)+_0x4d2101[_0x30d030(0x166)]:_0x30d030(0x170)+_0x4d2101[_0x30d030(0x166)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a60_0xd48ba7(0x181),'risk':a60_0xd48ba7(0x187),'flags':[CODE_FLAG,{'name':a60_0xd48ba7(0x164),'type':a60_0xd48ba7(0x165),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':a60_0xd48ba7(0x15f),'type':'string','required':![],'description':a60_0xd48ba7(0x17a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15a171){validateInput(readBusinessGroupUpdateInput(_0x15a171));},async 'dryRun'(_0x3199a6){const _0x2629ff=a60_0xd48ba7,_0x2cec67=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3199a6[_0x2629ff(0x150)],'input':readBusinessGroupUpdateInput(_0x3199a6),'dryRun':!![]});return{'method':_0x2629ff(0x152),'url':BACKEND_PATH,'body':_0x2cec67[_0x2629ff(0x16f)][_0x2629ff(0x178)]['payload'],'description':_0x2cec67['message'],..._0x2cec67[_0x2629ff(0x16f)]};},async 'execute'(_0x77b1cc){const _0x3ccc39=a60_0xd48ba7;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x77b1cc[_0x3ccc39(0x150)],'input':readBusinessGroupUpdateInput(_0x77b1cc),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4f8380){const _0x1ef6c7=a60_0xd48ba7,_0x50abdb=_0x4f8380[_0x1ef6c7(0x162)](_0x1ef6c7(0x15f));return{'code':trim(_0x4f8380[_0x1ef6c7(0x162)]('code')),'businessGroup':_0x4f8380['str'](_0x1ef6c7(0x164)),'expectBusinessGroup':_0x50abdb===undefined||_0x50abdb===''?undefined:_0x50abdb};}function validateInput(_0x5b67b6){const _0x1430bc=a60_0xd48ba7;if(!trim(_0x5b67b6[_0x1430bc(0x166)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x5b67b6[_0x1430bc(0x157)]===undefined)throw CliErrors[_0x1430bc(0x153)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x36dbca,_0x56f943){const _0x3874c8=a60_0xd48ba7,_0x5cb091=asPlainObject(_0x36dbca[_0x3874c8(0x160)]),_0x8d7454=asPlainObject(_0x36dbca[_0x3874c8(0x17c)]),_0x2dd4b7=resolveSourceType(_0x36dbca,_0x5cb091,_0x8d7454),_0x2b9be5=firstString(_0x36dbca[_0x3874c8(0x182)],_0x36dbca[_0x3874c8(0x166)],_0x5cb091[_0x3874c8(0x17b)],_0x56f943)||_0x56f943;return{'id':firstNumber(_0x36dbca[_0x3874c8(0x163)],_0x36dbca['id'],_0x5cb091[_0x3874c8(0x155)])??firstString(_0x36dbca['modelId'],_0x36dbca['id'],_0x5cb091[_0x3874c8(0x155)])??null,'code':_0x2b9be5,'name':firstString(_0x36dbca['name'],_0x5cb091[_0x3874c8(0x171)],_0x5cb091[_0x3874c8(0x186)])||null,'sourceType':_0x2dd4b7};}function resolveSourceType(_0x4445d0,_0x4d76ca,_0x37397f){const _0x3fcab2=a60_0xd48ba7,_0x337c06=firstString(_0x4445d0[_0x3fcab2(0x167)],_0x4445d0[_0x3fcab2(0x17f)],_0x4d76ca['source'],_0x4d76ca['sourceType'])?.[_0x3fcab2(0x16a)]()['toUpperCase']();if(_0x337c06===_0x3fcab2(0x154)||_0x337c06===_0x3fcab2(0x188))return _0x337c06;if(Object['keys'](_0x37397f)[_0x3fcab2(0x180)]>0x0)return _0x3fcab2(0x154);throw CliErrors[_0x3fcab2(0x153)](_0x3fcab2(0x174));}function loadCurrentBusinessGroup(_0x10dbf4,_0x502232){const _0x4fae4a=a60_0xd48ba7,_0x35a95a=readBusinessGroupFromDatasetDetail(_0x10dbf4,_0x502232['sourceType']);if(_0x35a95a[_0x4fae4a(0x177)])return normalizeBusinessGroup(_0x35a95a['value']);if(_0x502232[_0x4fae4a(0x17f)]===_0x4fae4a(0x188))return'';throw CliErrors[_0x4fae4a(0x153)](_0x4fae4a(0x151),'Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x2502c5,_0x48b1a0){const _0x5a0c67=a60_0xd48ba7,_0x3216ce=asPlainObject(_0x2502c5['dataset']),_0x5d9231=firstPresent(_0x2502c5[_0x5a0c67(0x157)]);if(_0x5d9231['found'])return _0x5d9231;const _0x5251ff=firstPresent(_0x3216ce[_0x5a0c67(0x157)]);if(_0x5251ff['found'])return _0x5251ff;if(_0x48b1a0===_0x5a0c67(0x154))return{'found':![]};const _0x433e2b=readBusinessGroupFromExtend(_0x2502c5[_0x5a0c67(0x15d)]);if(_0x433e2b['found'])return _0x433e2b;return readBusinessGroupFromExtend(_0x3216ce[_0x5a0c67(0x15d)]);}function readBusinessGroupFromExtend(_0x394720){const _0x3b8059=a60_0xd48ba7;if(_0x394720===undefined||_0x394720===null||_0x394720==='')return{'found':![]};if(typeof _0x394720===_0x3b8059(0x165))try{const _0x10cd0d=JSON['parse'](_0x394720);return readBusinessGroupFromExtend(_0x10cd0d);}catch{return{'found':![]};}const _0xa90bac=asPlainObject(_0x394720);if(Object[_0x3b8059(0x158)]['hasOwnProperty'][_0x3b8059(0x15e)](_0xa90bac,_0x3b8059(0x157)))return{'found':!![],'value':_0xa90bac[_0x3b8059(0x157)]};return{'found':![]};}function firstPresent(..._0x4bd69e){for(const _0x3c2a00 of _0x4bd69e){if(_0x3c2a00!==undefined&&_0x3c2a00!==null)return{'found':!![],'value':_0x3c2a00};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4e33f4,_0x596619){const _0xb88d1f=a60_0xd48ba7;if(_0x596619===undefined)return;const _0x1083fb=normalizeBusinessGroup(_0x596619);if(_0x4e33f4!==_0x1083fb)throw CliErrors[_0xb88d1f(0x153)](_0xb88d1f(0x15b),_0xb88d1f(0x14f)+JSON['stringify'](_0x1083fb)+_0xb88d1f(0x161)+JSON[_0xb88d1f(0x179)](_0x4e33f4));}function buildBackendPayload(_0x46f91f,_0xb143f2,_0x105c72){const _0x87711f=a60_0xd48ba7;return{'appCode':_0x46f91f,'datasetCode':_0xb143f2[_0x87711f(0x166)],'businessGroup':_0x105c72};}function normalizeBusinessGroup(_0x72ed7f){if(_0x72ed7f===undefined||_0x72ed7f===null)return'';return String(_0x72ed7f)['trim']();}function a60_0xc8a1(_0x3b168f,_0x4bad43){_0x3b168f=_0x3b168f-0x14f;const _0xc17e2c=a60_0xc17e();let _0xc8a13d=_0xc17e2c[_0x3b168f];return _0xc8a13d;}function asPlainObject(_0x1999c3){const _0xa664cc=a60_0xd48ba7;if(!_0x1999c3||typeof _0x1999c3!=='object'||Array[_0xa664cc(0x159)](_0x1999c3))return{};return _0x1999c3;}function firstString(..._0x553de7){const _0x3854b4=a60_0xd48ba7;for(const _0x2ecfd6 of _0x553de7){if(typeof _0x2ecfd6===_0x3854b4(0x165)&&_0x2ecfd6['trim']())return _0x2ecfd6[_0x3854b4(0x16a)]();if(typeof _0x2ecfd6===_0x3854b4(0x16e)&&Number[_0x3854b4(0x15a)](_0x2ecfd6))return String(_0x2ecfd6);}return undefined;}function firstNumber(..._0x6fb921){const _0xf577f5=a60_0xd48ba7;for(const _0x53570c of _0x6fb921){if(typeof _0x53570c===_0xf577f5(0x16e)&&Number[_0xf577f5(0x15a)](_0x53570c))return _0x53570c;if(typeof _0x53570c===_0xf577f5(0x165)&&_0x53570c[_0xf577f5(0x16a)]()&&Number[_0xf577f5(0x15a)](Number(_0x53570c)))return Number(_0x53570c);}return null;}function trim(_0x5a8636){const _0x159d2a=a60_0xd48ba7;return String(_0x5a8636||'')[_0x159d2a(0x16a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a61_0x3b67(){const _0x31fdef=['source','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','toUpperCase','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','\x20是\x20','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','135vUrtkA','unknown','filter','validation','join','dbtableConfig','4682QkAdJT','tableName','102NEpUQT','METADATA','1311051EFVzdn','156432oyAzvD','70412QoabtI','lovrabet','96250mEhVdl','2769576pPhtHm','11EGtKqk','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','80gJDaeQ','object','\x20的\x20DB_TABLE\x20数据源上下文。','dbtable','当前数据集\x20\x22','5704veXjho','modelCode','datasetName','UNKNOWN','dbId','getOne','datasetCode','trim','1737mskErz'];a61_0x3b67=function(){return _0x31fdef;};return a61_0x3b67();}const a61_0x22f1db=a61_0x55ae;function a61_0x55ae(_0x3d8a93,_0x493959){_0x3d8a93=_0x3d8a93-0x156;const _0x3b6733=a61_0x3b67();let _0x55ae2a=_0x3b6733[_0x3d8a93];return _0x55ae2a;}(function(_0x55f502,_0x8ca087){const _0xe6898d=a61_0x55ae,_0xeef640=_0x55f502();while(!![]){try{const _0x157e88=-parseInt(_0xe6898d(0x16f))/0x1*(-parseInt(_0xe6898d(0x163))/0x2)+parseInt(_0xe6898d(0x165))/0x3*(parseInt(_0xe6898d(0x169))/0x4)+parseInt(_0xe6898d(0x15d))/0x5*(-parseInt(_0xe6898d(0x168))/0x6)+parseInt(_0xe6898d(0x167))/0x7+-parseInt(_0xe6898d(0x174))/0x8*(parseInt(_0xe6898d(0x156))/0x9)+-parseInt(_0xe6898d(0x16b))/0xa+-parseInt(_0xe6898d(0x16d))/0xb*(-parseInt(_0xe6898d(0x16c))/0xc);if(_0x157e88===_0x8ca087)break;else _0xeef640['push'](_0xeef640['shift']());}catch(_0x556d64){_0xeef640['push'](_0xeef640['shift']());}}}(a61_0x3b67,0x561b7));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x22f1db(0x16a),'filter':a61_0x22f1db(0x15c),'getOne':a61_0x22f1db(0x16e)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x192cd3){const _0x5d4f23=a61_0x22f1db;return _0x192cd3==null?'':String(_0x192cd3)[_0x5d4f23(0x17b)]();}function getDatasetCode(_0x369b22){const _0x5c0cdc=a61_0x22f1db;return valueToString(_0x369b22['code']??_0x369b22[_0x5c0cdc(0x175)]??_0x369b22['dataset']?.[_0x5c0cdc(0x17a)]);}function getDatasetName(_0x381563){const _0x2e12f4=a61_0x22f1db;return valueToString(_0x381563['name']??_0x381563['dataset']?.[_0x2e12f4(0x176)])||_0x2e12f4(0x15e);}function getDatasetSource(_0x255e23){const _0x213029=a61_0x22f1db;return valueToString(_0x255e23[_0x213029(0x157)]??_0x255e23['dataset']?.['sourceType'])[_0x213029(0x159)]();}function getDbtableConfig(_0x5ce7b2){const _0x5907ea=a61_0x22f1db,_0x2eedb2=_0x5ce7b2[_0x5907ea(0x162)]??_0x5ce7b2[_0x5907ea(0x172)];return _0x2eedb2&&typeof _0x2eedb2===_0x5907ea(0x170)?_0x2eedb2:{};}export function isDbTableBackedDataset(_0x303e33){const _0x43a7a9=a61_0x22f1db,_0x139c86=getDatasetSource(_0x303e33);if(_0x139c86===_0x43a7a9(0x166))return![];const _0xa61eae=getDbtableConfig(_0x303e33),_0x27bd6e=_0xa61eae[_0x43a7a9(0x178)]??_0xa61eae['id'],_0x361ecf=valueToString(_0xa61eae[_0x43a7a9(0x164)]??_0x303e33[_0x43a7a9(0x164)]??_0x303e33['dataset']?.[_0x43a7a9(0x164)]);return _0x27bd6e!==undefined&&_0x27bd6e!==null&&_0x361ecf['length']>0x0;}export function filterDbTableBackedDatasets(_0x16a8ae){const _0x166b9b=a61_0x22f1db;return _0x16a8ae[_0x166b9b(0x15f)](_0x445bf5=>isDbTableBackedDataset(_0x445bf5));}export function buildDbTableBackedRequirementMessage(_0x10f875,_0x54e667='SQL\x20schema\x20validation'){const _0x333bbc=a61_0x22f1db,_0x5ba879=getDatasetSource(_0x10f875)||_0x333bbc(0x177),_0x541c4f=getDatasetName(_0x10f875),_0x26810e=getDatasetCode(_0x10f875),_0x41a784=_0x26810e?'\x20('+_0x26810e+')':'';return[_0x333bbc(0x173)+_0x541c4f+'\x22'+_0x41a784+_0x333bbc(0x15b)+_0x5ba879+'\x20类型,没有可用于\x20'+_0x54e667+_0x333bbc(0x171),_0x333bbc(0x15a),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x333bbc(0x158)+RUNTIME_DATA_ACCESS_COMMANDS[_0x333bbc(0x15f)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x333bbc(0x179)]+'。'][_0x333bbc(0x161)]('\x20');}export function assertDatasetIsDbTableBacked(_0x49a1ad,_0x25a900){const _0x2d664e=a61_0x22f1db;if(!isDbTableBackedDataset(_0x49a1ad))throw CliErrors[_0x2d664e(0x160)](buildDbTableBackedRequirementMessage(_0x49a1ad,_0x25a900));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x543fbc=a62_0x24a9;(function(_0x1e3c64,_0x140eea){const _0xfe2a20=a62_0x24a9,_0x5d14f7=_0x1e3c64();while(!![]){try{const _0x339f98=parseInt(_0xfe2a20(0x14a))/0x1+-parseInt(_0xfe2a20(0x155))/0x2*(-parseInt(_0xfe2a20(0x154))/0x3)+parseInt(_0xfe2a20(0x168))/0x4*(parseInt(_0xfe2a20(0x149))/0x5)+-parseInt(_0xfe2a20(0x165))/0x6*(-parseInt(_0xfe2a20(0x161))/0x7)+-parseInt(_0xfe2a20(0x163))/0x8+parseInt(_0xfe2a20(0x166))/0x9*(-parseInt(_0xfe2a20(0x159))/0xa)+-parseInt(_0xfe2a20(0x178))/0xb;if(_0x339f98===_0x140eea)break;else _0x5d14f7['push'](_0x5d14f7['shift']());}catch(_0x40ec51){_0x5d14f7['push'](_0x5d14f7['shift']());}}}(a62_0x5184,0x50df6));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x543fbc(0x177),'description':'Dataset\x20id'},DBID_FLAG={'name':a62_0x543fbc(0x16a),'type':a62_0x543fbc(0x177),'description':a62_0x543fbc(0x14b)},CONFIRM_FLAG={'name':a62_0x543fbc(0x158),'type':a62_0x543fbc(0x14c),'description':a62_0x543fbc(0x172)},EXPECTED_COUNT_FLAG={'name':a62_0x543fbc(0x175),'type':a62_0x543fbc(0x177),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':'dataset','command':a62_0x543fbc(0x15c),'description':a62_0x543fbc(0x171),'risk':a62_0x543fbc(0x15f),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38b04d){const _0x888f24=a62_0x543fbc,_0x40e1d8=_0x38b04d[_0x888f24(0x173)]('id'),_0xbee512=_0x38b04d[_0x888f24(0x16e)](_0x888f24(0x162)),_0x31edec=_0x38b04d[_0x888f24(0x173)](_0x888f24(0x16a)),_0x1b721a=[_0x40e1d8>0x0,Boolean(_0xbee512),_0x31edec>0x0][_0x888f24(0x16f)](Boolean);if(_0x1b721a['length']===0x0)throw CliErrors[_0x888f24(0x15e)](_0x888f24(0x151));if(_0x1b721a[_0x888f24(0x160)]>0x1)throw CliErrors['validation'](_0x888f24(0x179));},async 'dryRun'(_0x45deb4){const _0x303dd2=a62_0x543fbc,_0x115308=await resolveTargets(_0x45deb4);return{'method':_0x303dd2(0x169),'url':_0x303dd2(0x15a),'body':{'appCode':_0x45deb4[_0x303dd2(0x156)],'count':_0x115308['length'],'datasets':_0x115308},'description':_0x303dd2(0x176)+_0x115308[_0x303dd2(0x160)]+_0x303dd2(0x157)};},async 'execute'(_0x9f0ae9){const _0x5632cd=a62_0x543fbc;if(!_0x9f0ae9[_0x5632cd(0x167)](_0x5632cd(0x158)))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x5632cd(0x16d));const _0x58df42=await resolveTargets(_0x9f0ae9),_0x3ae9f4=[],_0x26e247=[];for(const _0x5e901b of _0x58df42){try{await deleteDataset(_0x9f0ae9[_0x5632cd(0x156)],_0x5e901b['id']),_0x3ae9f4[_0x5632cd(0x153)](_0x5e901b);}catch(_0x50bebc){_0x26e247[_0x5632cd(0x153)]({..._0x5e901b,'error':_0x50bebc instanceof Error?_0x50bebc['message']:String(_0x50bebc)});}}if(_0x26e247[_0x5632cd(0x160)]>0x0)return{'ok':![],'data':{'requested':_0x58df42[_0x5632cd(0x160)],'deletedCount':_0x3ae9f4[_0x5632cd(0x160)],'failedCount':_0x26e247['length'],'deleted':_0x3ae9f4,'failed':_0x26e247},'message':'Deleted\x20'+_0x3ae9f4[_0x5632cd(0x160)]+'/'+_0x58df42[_0x5632cd(0x160)]+_0x5632cd(0x152)+_0x26e247['length']+'\x20failed'};return{'ok':!![],'data':{'requested':_0x58df42[_0x5632cd(0x160)],'deletedCount':_0x3ae9f4[_0x5632cd(0x160)],'deleted':_0x3ae9f4},'message':_0x5632cd(0x164)+_0x3ae9f4[_0x5632cd(0x160)]+_0x5632cd(0x170)};}};function a62_0x24a9(_0x4c53b3,_0x4af252){_0x4c53b3=_0x4c53b3-0x149;const _0x518471=a62_0x5184();let _0x24a95a=_0x518471[_0x4c53b3];return _0x24a95a;}async function resolveTargets(_0x402fea){const _0x25c80e=a62_0x543fbc,_0x4f55f5=_0x402fea[_0x25c80e(0x173)]('id'),_0x445904=_0x402fea[_0x25c80e(0x16e)](_0x25c80e(0x162)),_0x319fb2=_0x402fea[_0x25c80e(0x173)]('dbid');let _0x559050;_0x445904?(_0x559050=await listDatasets(_0x402fea[_0x25c80e(0x156)],{'code':_0x445904}),_0x559050=_0x559050[_0x25c80e(0x16f)](_0x2d6aa2=>_0x2d6aa2[_0x25c80e(0x162)]===_0x445904)):(_0x559050=await listDatasets(_0x402fea['appCode']),_0x4f55f5>0x0&&(_0x559050=_0x559050['filter'](_0x129f84=>_0x129f84['id']===_0x4f55f5)),_0x319fb2>0x0&&(_0x559050=_0x559050['filter'](_0x47331d=>_0x47331d[_0x25c80e(0x14e)]?.[_0x25c80e(0x17c)]===_0x319fb2)));const _0xe9d46b=_0x559050['map'](normalizeTarget);if(_0xe9d46b[_0x25c80e(0x160)]===0x0){const _0x380557=_0x445904||(_0x4f55f5>0x0?_0x25c80e(0x15b)+_0x4f55f5:_0x25c80e(0x174)+_0x319fb2);throw CliErrors[_0x25c80e(0x15e)](_0x25c80e(0x17a)+_0x380557+'.');}const _0x294113=_0x402fea[_0x25c80e(0x173)]('expected-count');if(_0x294113>0x0&&_0xe9d46b['length']!==_0x294113)throw CliErrors[_0x25c80e(0x15e)](_0x25c80e(0x16c)+_0xe9d46b[_0x25c80e(0x160)]+_0x25c80e(0x14f)+_0x294113+'.');return _0xe9d46b;}function a62_0x5184(){const _0x4e2e2d=['1959683YBLFYL','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','No\x20undeleted\x20dataset\x20found\x20for\x20','description','dbId','5WFfSEG','579795cKzIEm','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','boolean','isArray','dbtableConfig','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','dbName','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20dataset(s);\x20','push','15ZISGKI','5966xhoRqP','appCode','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','confirm','2176690lgAxhB','/smartapi/dataset/delete-dataset','id=','delete','source','validation','high-risk-write','length','582547mUFfir','code','505600fLrXbs','Deleted\x20','6blAXoP','9UpoAPC','bool','449380VCiJvb','POST','dbid','relationPages','Matched\x20','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','str','filter','\x20dataset(s)','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Required\x20to\x20execute\x20dataset\x20deletion','num','dbid=','expected-count','Would\x20delete\x20','number'];a62_0x5184=function(){return _0x4e2e2d;};return a62_0x5184();}function normalizeTarget(_0x5bfda8){const _0x11d0bb=a62_0x543fbc,_0x47b60b=_0x5bfda8[_0x11d0bb(0x14e)]??{};return{'id':_0x5bfda8['id'],'code':_0x5bfda8[_0x11d0bb(0x162)],'name':_0x5bfda8['name'],'description':_0x5bfda8[_0x11d0bb(0x17b)],'source':_0x5bfda8[_0x11d0bb(0x15d)],'dbId':_0x47b60b[_0x11d0bb(0x17c)],'dbName':_0x47b60b[_0x11d0bb(0x150)],'tableName':_0x47b60b['tableName'],'relatedPageCount':Array[_0x11d0bb(0x14d)](_0x5bfda8['relationPages'])?_0x5bfda8[_0x11d0bb(0x16b)][_0x11d0bb(0x160)]:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x4699b5=a63_0x5a39;function a63_0x2b88(){const _0x1a65d0=['doType','main_sub','44wEQIAq','map','requestFields','columnCodeListWithDeleted','721654qjsALr','options','toField','dbType','path','dataType','dataset','indexes','dbName','deleted','2ZebUla','parse','240AmOTzR','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dblinkInfoDTO','entries','createTimeField','1255270dGSnfc','properties','fromField','required','toTableName','type','modifierIdField','cardinality','397671bCpPqf','8808110tDHOhi','validateRules','doVersion','beforeScriptId','7122906zQOlXw','relations','push','responseFields','bizRelationType','sourceType','length','toFieldLabel','modifierNameField','creatorIdField','host','updateTimeField','relationId','fields','allFields','creatorNameField','allFieldNames','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','detail','object','datasetKey','filter','modelId','name','description','method','tableName','pkField','labelField','logicField','displayName','deprecated','source','2914160pTXEtG','string','formatRules','code','4oHEQpx','extend','135709fvEPHF','afterScriptId','trim','dbId','requestBody','isArray'];a63_0x2b88=function(){return _0x1a65d0;};return a63_0x2b88();}(function(_0x161e37,_0x2f07ba){const _0x27ae16=a63_0x5a39,_0x3f3e4b=_0x161e37();while(!![]){try{const _0x159ffc=parseInt(_0x27ae16(0xa5))/0x1*(-parseInt(_0x27ae16(0x9b))/0x2)+-parseInt(_0x27ae16(0xb4))/0x3+parseInt(_0x27ae16(0x8d))/0x4*(-parseInt(_0x27ae16(0xac))/0x5)+parseInt(_0x27ae16(0xa7))/0x6*(-parseInt(_0x27ae16(0x8f))/0x7)+-parseInt(_0x27ae16(0x89))/0x8+-parseInt(_0x27ae16(0x68))/0x9+parseInt(_0x27ae16(0xb5))/0xa*(parseInt(_0x27ae16(0x97))/0xb);if(_0x159ffc===_0x2f07ba)break;else _0x3f3e4b['push'](_0x3f3e4b['shift']());}catch(_0x2b2194){_0x3f3e4b['push'](_0x3f3e4b['shift']());}}}(a63_0x2b88,0x76d8b));import{getDatasetDetail}from'../../core/api-client.js';function a63_0x5a39(_0x47516e,_0x2cffe2){_0x47516e=_0x47516e-0x66;const _0x2b8833=a63_0x2b88();let _0x5a39ee=_0x2b8833[_0x47516e];return _0x5a39ee;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x50554b){const _0x1fc05b=a63_0x5a39;if(_0x50554b[_0x1fc05b(0xa4)])return null;const _0x35772c=Boolean(_0x50554b[_0x1fc05b(0x86)]!==undefined||_0x50554b[_0x1fc05b(0x95)]!==undefined);let _0x52b62e={};if(!_0x35772c&&typeof _0x50554b[_0x1fc05b(0x8e)]===_0x1fc05b(0x8a))try{_0x52b62e=JSON[_0x1fc05b(0xa6)](_0x50554b[_0x1fc05b(0x8e)]);}catch{}const _0x5b2ee1=_0x35772c?_0x50554b[_0x1fc05b(0x7f)]:_0x50554b[_0x1fc05b(0x8c)],_0x537c2d=_0x35772c?_0x50554b[_0x1fc05b(0x86)]:_0x50554b['name'],_0x14ba74=_0x35772c?_0x50554b[_0x1fc05b(0x95)]:_0x50554b[_0x1fc05b(0xb1)]||_0x50554b[_0x1fc05b(0xa0)],_0x458883=_0x35772c?_0x50554b[_0x1fc05b(0x83)]===!![]:_0x52b62e[_0x1fc05b(0x83)]===!![],_0x5ecb2f=_0x35772c?_0x50554b[_0x1fc05b(0xaf)]===!![]:_0x52b62e[_0x1fc05b(0xaf)]===!![],_0x347906=_0x35772c?_0x50554b['options']??null:_0x52b62e[_0x1fc05b(0x9c)]??null,_0x1c5c12={'name':_0x5b2ee1,'displayName':_0x537c2d||_0x5b2ee1,'type':_0x14ba74,'dbType':_0x50554b[_0x1fc05b(0x9e)],'pk':_0x458883,'required':_0x5ecb2f,'deprecated':_0x50554b[_0x1fc05b(0x87)]===!![],'description':_0x50554b['description']||undefined};return Array['isArray'](_0x347906)&&_0x347906['length']>0x0&&(_0x1c5c12['options']=_0x347906),_0x1c5c12;}function parseJsonMaybe(_0x32f3ed){const _0x30d5da=a63_0x5a39;if(typeof _0x32f3ed!==_0x30d5da(0x8a))return _0x32f3ed;try{return JSON[_0x30d5da(0xa6)](_0x32f3ed);}catch{return _0x32f3ed;}}function normalizeOperationEntry(_0x486f45,_0x34ffb2){const _0x516c32=a63_0x5a39;if(!_0x34ffb2||typeof _0x34ffb2!==_0x516c32(0x7b))return null;if(!_0x34ffb2[_0x516c32(0x81)]||!_0x34ffb2[_0x516c32(0x9f)])return null;const _0x5d4a5a={'name':_0x486f45,'method':_0x34ffb2[_0x516c32(0x81)],'path':_0x34ffb2[_0x516c32(0x9f)]};if(_0x34ffb2[_0x516c32(0x72)])_0x5d4a5a[_0x516c32(0x72)]=_0x34ffb2['host'];if(_0x34ffb2[_0x516c32(0x93)]!=null){const _0x28d1c0=parseJsonMaybe(_0x34ffb2['requestBody']);_0x5d4a5a[_0x516c32(0x93)]=_0x28d1c0;}if(_0x34ffb2['responseBody']!=null){const _0x4e7071=parseJsonMaybe(_0x34ffb2['responseBody']);_0x5d4a5a['responseBody']=_0x4e7071;}if(_0x34ffb2['beforeScriptId']!=null)_0x5d4a5a[_0x516c32(0x67)]=_0x34ffb2[_0x516c32(0x67)];if(_0x34ffb2[_0x516c32(0x90)]!=null)_0x5d4a5a['afterScriptId']=_0x34ffb2[_0x516c32(0x90)];if(Array[_0x516c32(0x94)](_0x34ffb2[_0x516c32(0x99)]))_0x5d4a5a[_0x516c32(0x99)]=_0x34ffb2['requestFields'];if(Array[_0x516c32(0x94)](_0x34ffb2[_0x516c32(0x6b)]))_0x5d4a5a['responseFields']=_0x34ffb2[_0x516c32(0x6b)];return _0x5d4a5a;}function summarizeDbtable(_0x1c27bf){const _0x574eb5=a63_0x5a39,_0x3ca5d0={},_0x3c93cd=[_0x574eb5(0x92),_0x574eb5(0xa3),'tableName',_0x574eb5(0x7c),_0x574eb5(0x83),'allFields',_0x574eb5(0x85),_0x574eb5(0xab),_0x574eb5(0x73),_0x574eb5(0x71),_0x574eb5(0x77),_0x574eb5(0xb2),_0x574eb5(0x70),_0x574eb5(0x84),_0x574eb5(0xa9)];for(const _0x453bd0 of _0x3c93cd){if(_0x1c27bf[_0x453bd0]!==undefined)_0x3ca5d0[_0x453bd0]=_0x1c27bf[_0x453bd0];}return typeof _0x3ca5d0[_0x574eb5(0x76)]===_0x574eb5(0x8a)&&_0x3ca5d0[_0x574eb5(0x76)][_0x574eb5(0x6e)]>0x0&&(_0x3ca5d0[_0x574eb5(0x78)]=_0x3ca5d0['allFields']['split'](',')['map'](_0x3d64b0=>_0x3d64b0[_0x574eb5(0x91)]())['filter'](Boolean)),_0x3ca5d0;}function normalizeRelatedPages(_0x4bcb46){const _0x400a52=a63_0x5a39;if(!Array[_0x400a52(0x94)](_0x4bcb46))return[];return _0x4bcb46[_0x400a52(0x7d)](_0x1ebb1f=>_0x1ebb1f&&typeof _0x1ebb1f===_0x400a52(0x7b))[_0x400a52(0x98)](_0x3b028c=>({'id':_0x3b028c['id'],'type':_0x3b028c[_0x400a52(0xb1)],'code':_0x3b028c[_0x400a52(0x8c)],'title':_0x3b028c['title'],'deleted':_0x3b028c[_0x400a52(0xa4)]===!![]}));}export const datasetDetail={'service':a63_0x4699b5(0xa1),'command':a63_0x4699b5(0x7a),'description':a63_0x4699b5(0xa8),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':a63_0x4699b5(0x8a),'description':a63_0x4699b5(0x79)}],async 'execute'(_0x3984f9){const _0x30e4b5=a63_0x4699b5,_0x1fc60b=await getDatasetDetail(_0x3984f9['str'](_0x30e4b5(0x8c))),_0x25139f=Array['isArray'](_0x1fc60b[_0x30e4b5(0x75)])?_0x1fc60b['fields']:Array[_0x30e4b5(0x94)](_0x1fc60b['properties'])?_0x1fc60b[_0x30e4b5(0xad)]:[],_0x3c0fe8=_0x25139f[_0x30e4b5(0x98)](_0x32da02=>normalizeField(_0x32da02))[_0x30e4b5(0x7d)](_0x42f353=>_0x42f353!==null),_0x1b81e8=_0x1fc60b['operations']??{},_0x443f4a=[];for(const [_0x51dc8b,_0x179db8]of Object[_0x30e4b5(0xaa)](_0x1b81e8)){const _0x275ab8=normalizeOperationEntry(_0x51dc8b,_0x179db8);if(_0x275ab8)_0x443f4a[_0x30e4b5(0x6a)](_0x275ab8);}const _0xf0634a=_0x1fc60b['dbtableConfig']??{},_0x621eeb=_0x1fc60b[_0x30e4b5(0xa1)]??{},_0x2934ce=_0xf0634a['dbId']!=null?{'id':_0xf0634a[_0x30e4b5(0x92)],'name':_0xf0634a['dbName']??null}:undefined;let _0x595786;return typeof _0x1fc60b[_0x30e4b5(0x8e)]===_0x30e4b5(0x8a)&&(_0x595786=parseJsonMaybe(_0x1fc60b[_0x30e4b5(0x8e)])),{'ok':!![],'data':{'id':_0x1fc60b[_0x30e4b5(0x7e)]??_0x1fc60b['id'],'name':_0x1fc60b[_0x30e4b5(0x7f)],'code':_0x1fc60b['modelCode']||_0x1fc60b[_0x30e4b5(0x8c)],'doVersion':_0x1fc60b[_0x30e4b5(0x66)],'description':_0x1fc60b[_0x30e4b5(0x80)]||_0x621eeb['tableComment']||undefined,'source':_0x1fc60b[_0x30e4b5(0x88)]||_0x621eeb[_0x30e4b5(0x6d)],'table':_0xf0634a[_0x30e4b5(0x82)]||_0x621eeb['tableName'],'datasetKey':_0xf0634a[_0x30e4b5(0x7c)],'pk':_0xf0634a['pkField'],'db':_0x2934ce,'dbtable':summarizeDbtable(_0xf0634a),'fields':_0x3c0fe8,'operations':_0x443f4a,'indexes':Array[_0x30e4b5(0x94)](_0x621eeb[_0x30e4b5(0xa2)])?_0x621eeb[_0x30e4b5(0xa2)]:[],'relations':Array['isArray'](_0x1fc60b['relations'])?_0x1fc60b[_0x30e4b5(0x69)]['map'](_0x1f27c2=>({..._0x1f27c2[_0x30e4b5(0x74)]!=null?{'relationId':_0x1f27c2[_0x30e4b5(0x74)]}:{},'fromDataset':_0x1fc60b[_0x30e4b5(0x7f)],'fromCode':_0x1fc60b['modelCode']||_0x1fc60b[_0x30e4b5(0x8c)],'fromTable':_0xf0634a[_0x30e4b5(0x82)]||_0x621eeb[_0x30e4b5(0x82)],'fromField':_0x1f27c2[_0x30e4b5(0xae)],'toDataset':_0x1f27c2['toDatasetName'],'toCode':_0x1f27c2['toDatasetCode'],'toTable':_0x1f27c2[_0x30e4b5(0xb0)],'toField':_0x1f27c2[_0x30e4b5(0x9d)],'labelField':_0x1f27c2[_0x30e4b5(0x6f)]||undefined,'cardinality':_0x1f27c2[_0x30e4b5(0xb3)]||undefined,'bizRelationType':_0x1f27c2[_0x30e4b5(0x6c)]==='main_sub'?_0x30e4b5(0x96):null})):[],'relatedPages':normalizeRelatedPages(_0x1fc60b['relatedPageInfoList']),...Array['isArray'](_0x1fc60b[_0x30e4b5(0x9a)])?{'columnCodeListWithDeleted':_0x1fc60b[_0x30e4b5(0x9a)]}:{},'formatRules':Array[_0x30e4b5(0x94)](_0x1fc60b[_0x30e4b5(0x8b)])?_0x1fc60b['formatRules']:[],'validateRules':Array[_0x30e4b5(0x94)](_0x1fc60b[_0x30e4b5(0xb6)])?_0x1fc60b[_0x30e4b5(0xb6)]:[],..._0x595786!==undefined?{'extend':_0x595786}:{},'stats':{'fieldCount':_0x3c0fe8[_0x30e4b5(0x6e)],'operationCount':_0x443f4a['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a64_0x5ba3(){const _0x43ef7d=['value','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','businessGroup','18srEpxE','patch-json','from','\x20must\x20be\x20valid\x20JSON\x20object:\x20','77563RIAiJD','validation','/smartapi/dataset/update-driven-data','--expect-json','isArray','246402WobjEu','extend.','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','dataset','join','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','data','push','appCode','parse','string','datasetName','stringify','object','1030320FavzQe','entries','9462FTzSXT','keys','has','No\x20changes\x20for\x20dataset\x20extend','modelId','sort','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','modelCode','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','message','patch','tableName','dbtableConfig','dbId','write','1745DdxPoB','str','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','\x20must\x20be\x20a\x20JSON\x20object','trim','14203760fUQUXh','extend','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','1700783WrfHWt','Allowed\x20keys:\x20','code','get','extend-update','Patch\x20dataset\x20top-level\x20extend\x20safely','2263050qeEePS','16mBXmln','length','expect-json','Updated\x20dataset\x20extend\x20('];a64_0x5ba3=function(){return _0x43ef7d;};return a64_0x5ba3();}const a64_0x3e7b3b=a64_0x516a;function a64_0x516a(_0x53ffa6,_0xeb263b){_0x53ffa6=_0x53ffa6-0x1c8;const _0x5ba3d1=a64_0x5ba3();let _0x516a40=_0x5ba3d1[_0x53ffa6];return _0x516a40;}(function(_0x1d17df,_0x3d1ccc){const _0x35b081=a64_0x516a,_0x3ba0c0=_0x1d17df();while(!![]){try{const _0x3011e3=-parseInt(_0x35b081(0x1d2))/0x1*(parseInt(_0x35b081(0x1ce))/0x2)+parseInt(_0x35b081(0x1d7))/0x3+-parseInt(_0x35b081(0x1e5))/0x4+-parseInt(_0x35b081(0x1f6))/0x5*(-parseInt(_0x35b081(0x1e7))/0x6)+-parseInt(_0x35b081(0x1fe))/0x7*(parseInt(_0x35b081(0x205))/0x8)+-parseInt(_0x35b081(0x204))/0x9+parseInt(_0x35b081(0x1fb))/0xa;if(_0x3011e3===_0x3d1ccc)break;else _0x3ba0c0['push'](_0x3ba0c0['shift']());}catch(_0x55a4e1){_0x3ba0c0['push'](_0x3ba0c0['shift']());}}}(a64_0x5ba3,0x57da8));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_0x3e7b3b(0x1cd),{'message':a64_0x3e7b3b(0x1fd),'hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);export function parseJsonObjectFlag(_0x589348,_0x5e507b){const _0x1003b8=a64_0x3e7b3b;if(!_0x589348)return undefined;let _0x14aed8;try{_0x14aed8=JSON[_0x1003b8(0x1e0)](_0x589348);}catch(_0x75036){const _0x117f44=_0x75036 instanceof Error?_0x75036[_0x1003b8(0x1f0)]:String(_0x75036);throw CliErrors[_0x1003b8(0x1d3)](_0x5e507b+_0x1003b8(0x1d1)+_0x117f44);}if(!isPlainObject(_0x14aed8)||Array[_0x1003b8(0x1d6)](_0x14aed8))throw CliErrors[_0x1003b8(0x1d3)](_0x5e507b+_0x1003b8(0x1f9));return _0x14aed8;}export function validateExtendPatchKeys(_0x1cc3eb){const _0x167560=a64_0x3e7b3b,_0x4a9b39=Object[_0x167560(0x1e8)](_0x1cc3eb);if(_0x4a9b39[_0x167560(0x1c8)]===0x0)throw CliErrors[_0x167560(0x1d3)](_0x167560(0x1ef));for(const _0x1ce6d8 of _0x4a9b39){const _0x2cc035=EXTEND_PATCH_REDIRECTS[_0x167560(0x201)](_0x1ce6d8);if(_0x2cc035)throw CliErrors['validation'](_0x2cc035['message'],_0x2cc035['hint']);if(!MUTABLE_EXTEND_KEYS[_0x167560(0x1e9)](_0x1ce6d8))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x1ce6d8,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x18c88f=a64_0x3e7b3b,_0x32a53e=Array[_0x18c88f(0x1d0)](MUTABLE_EXTEND_KEYS)[_0x18c88f(0x1ec)]();return _0x32a53e[_0x18c88f(0x1c8)]>0x0?_0x18c88f(0x1ff)+_0x32a53e[_0x18c88f(0x1db)](',\x20'):_0x18c88f(0x1ed);}export function applyExtendPatch(_0x18439c,_0x2f3fb2){const _0x5a76c1=a64_0x3e7b3b;validateExtendPatchKeys(_0x2f3fb2);const _0x4f35a0=deepClone(_0x18439c),_0x258397=[];for(const [_0x544450,_0x20356c]of Object[_0x5a76c1(0x1e6)](_0x2f3fb2)){const _0x4d3e44=_0x4f35a0[_0x544450],_0xadd022=deepClone(_0x20356c);!deepEqual(_0x4d3e44,_0xadd022)&&(_0x4f35a0[_0x544450]=_0xadd022,_0x258397[_0x5a76c1(0x1de)](_0x5a76c1(0x1d8)+_0x544450));}return _0x258397[_0x5a76c1(0x1ec)](),{'after':_0x4f35a0,'changedPaths':_0x258397,'changed':_0x258397[_0x5a76c1(0x1c8)]>0x0};}export function assertExpectation(_0x2e7697,_0x29ab74){const _0x2d9da9=a64_0x3e7b3b;if(!_0x29ab74)return;for(const [_0x5e1d7e,_0x503412]of Object[_0x2d9da9(0x1e6)](_0x29ab74)){const _0x394c59=_0x2e7697[_0x5e1d7e];if(!deepEqual(_0x394c59,_0x503412))throw CliErrors[_0x2d9da9(0x1d3)]('Expectation\x20mismatch\x20at\x20extend.'+_0x5e1d7e,'Expected\x20'+JSON[_0x2d9da9(0x1e3)](_0x503412)+',\x20actual\x20'+JSON[_0x2d9da9(0x1e3)](_0x394c59));}}export async function buildDatasetExtendUpdateResult({appCode:_0x522261,input:_0x27ace1,dryRun:_0x545c15}){const _0x11872b=a64_0x3e7b3b;validateInput(_0x27ace1);const _0x5e7b1f=await getDatasetDetail(_0x27ace1[_0x11872b(0x200)]),_0x4e52bd=parseDatasetExtend(_0x5e7b1f[_0x11872b(0x1fc)]),_0x440d65=deepClone(_0x4e52bd[_0x11872b(0x1cb)]);assertExpectation(_0x440d65,_0x27ace1['expect']);const {after:_0x289053,changedPaths:_0x2c8b96,changed:_0x693b85}=applyExtendPatch(_0x440d65,_0x27ace1[_0x11872b(0x1f1)]),_0x32151a=summarizeDataset(_0x5e7b1f,_0x27ace1[_0x11872b(0x200)]);return _0x693b85&&!_0x545c15&&(_0x5e7b1f['extend']=serializeDatasetExtend(_0x289053,_0x4e52bd['shape']),await updateDrivenData(_0x5e7b1f)),{'ok':!![],'data':{'appCode':_0x522261,'selector':{'code':_0x27ace1[_0x11872b(0x200)]},'dataset':_0x32151a,'dryRun':_0x545c15,'changed':_0x693b85,'changedPaths':_0x2c8b96,'before':{'extend':_0x440d65},'after':{'extend':_0x289053},'submitted':_0x693b85&&!_0x545c15},'message':_0x693b85?_0x545c15?'Dry-run:\x20dataset\x20extend\x20would\x20change\x20('+_0x2c8b96['join'](',\x20')+')':_0x11872b(0x1ca)+_0x2c8b96[_0x11872b(0x1db)](',\x20')+')':_0x11872b(0x1ea)};}export const datasetExtendUpdate={'service':a64_0x3e7b3b(0x1da),'command':a64_0x3e7b3b(0x202),'description':a64_0x3e7b3b(0x203),'risk':a64_0x3e7b3b(0x1f5),'flags':[CODE_FLAG,{'name':'patch-json','type':a64_0x3e7b3b(0x1e1),'required':!![],'description':a64_0x3e7b3b(0x1dc)},{'name':'expect-json','type':a64_0x3e7b3b(0x1e1),'required':![],'description':a64_0x3e7b3b(0x1d9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x516626){validateInput(readExtendUpdateInput(_0x516626));},async 'dryRun'(_0x511bb9){const _0x5b6fd8=a64_0x3e7b3b,_0x1502c5=await buildDatasetExtendUpdateResult({'appCode':_0x511bb9['appCode'],'input':readExtendUpdateInput(_0x511bb9),'dryRun':!![]});return{'method':'POST','url':_0x5b6fd8(0x1d4),'body':_0x1502c5[_0x5b6fd8(0x1dd)],'description':_0x1502c5[_0x5b6fd8(0x1f0)]};},async 'execute'(_0x203089){const _0x1921ee=a64_0x3e7b3b;return buildDatasetExtendUpdateResult({'appCode':_0x203089[_0x1921ee(0x1df)],'input':readExtendUpdateInput(_0x203089),'dryRun':![]});}};function readExtendUpdateInput(_0x4f6b7d){const _0x4eb90a=a64_0x3e7b3b,_0x57dd39=trim(_0x4f6b7d[_0x4eb90a(0x1f7)](_0x4eb90a(0x200))),_0x4f65b6=parseJsonObjectFlag(_0x4f6b7d[_0x4eb90a(0x1f7)](_0x4eb90a(0x1cf)),'--patch-json'),_0x130b15=parseJsonObjectFlag(_0x4f6b7d[_0x4eb90a(0x1f7)](_0x4eb90a(0x1c9)),_0x4eb90a(0x1d5));return{'code':_0x57dd39,'patch':_0x4f65b6||{},'expect':_0x130b15};}function validateInput(_0xab3009){const _0xb24271=a64_0x3e7b3b;if(!_0xab3009[_0xb24271(0x200)])throw CliErrors[_0xb24271(0x1d3)]('--code\x20is\x20required');validateExtendPatchKeys(_0xab3009[_0xb24271(0x1f1)]);}function parseDatasetExtend(_0x2f35d8){const _0x26812f=a64_0x3e7b3b;if(typeof _0x2f35d8===_0x26812f(0x1e1)){const _0x2635a6=_0x2f35d8[_0x26812f(0x1fa)]();if(!_0x2635a6)return{'value':{},'shape':_0x26812f(0x1e1)};let _0x58f755;try{_0x58f755=JSON[_0x26812f(0x1e0)](_0x2635a6);}catch(_0x40184c){const _0x29184d=_0x40184c instanceof Error?_0x40184c[_0x26812f(0x1f0)]:String(_0x40184c);throw CliErrors['validation'](_0x26812f(0x1f8)+_0x29184d);}if(!isPlainObject(_0x58f755)||Array[_0x26812f(0x1d6)](_0x58f755))throw CliErrors[_0x26812f(0x1d3)](_0x26812f(0x1cc));return{'value':_0x58f755,'shape':_0x26812f(0x1e1)};}if(_0x2f35d8===undefined||_0x2f35d8===null)return{'value':{},'shape':_0x26812f(0x1e1)};if(!isPlainObject(_0x2f35d8)||Array[_0x26812f(0x1d6)](_0x2f35d8))throw CliErrors['validation'](_0x26812f(0x1cc));return{'value':_0x2f35d8,'shape':_0x26812f(0x1e4)};}function serializeDatasetExtend(_0x4a75c2,_0x346ba7){const _0x1118d5=a64_0x3e7b3b;return _0x346ba7===_0x1118d5(0x1e1)?JSON[_0x1118d5(0x1e3)](_0x4a75c2):_0x4a75c2;}function summarizeDataset(_0x3ee8b2,_0x408090){const _0x3da530=a64_0x3e7b3b,_0x4c32b7=isPlainObject(_0x3ee8b2[_0x3da530(0x1da)])?_0x3ee8b2[_0x3da530(0x1da)]:{},_0x3802f7=isPlainObject(_0x3ee8b2[_0x3da530(0x1f3)])?_0x3ee8b2[_0x3da530(0x1f3)]:{};return{'id':_0x3ee8b2[_0x3da530(0x1eb)]??_0x3ee8b2['id']??_0x4c32b7['datasetId']??null,'code':_0x3ee8b2[_0x3da530(0x1ee)]??_0x3ee8b2[_0x3da530(0x200)]??_0x4c32b7['datasetCode']??_0x408090,'name':_0x3ee8b2['name']??_0x4c32b7[_0x3da530(0x1e2)]??null,'table':_0x3802f7[_0x3da530(0x1f2)]??_0x4c32b7[_0x3da530(0x1f2)]??null,'db':_0x3802f7['dbName']??_0x3802f7[_0x3da530(0x1f4)]??null};}function deepClone(_0x10fe2a){if(_0x10fe2a===undefined)return _0x10fe2a;return JSON['parse'](JSON['stringify'](_0x10fe2a));}function deepEqual(_0x332ec9,_0x38c5ea){const _0x251bb9=a64_0x3e7b3b;return JSON[_0x251bb9(0x1e3)](_0x332ec9)===JSON[_0x251bb9(0x1e3)](_0x38c5ea);}function isPlainObject(_0x233ec6){const _0x434787=a64_0x3e7b3b;return Boolean(_0x233ec6)&&typeof _0x233ec6===_0x434787(0x1e4)&&!Array['isArray'](_0x233ec6);}function trim(_0xf627c5){const _0x1879b7=a64_0x3e7b3b,_0x29a962=String(_0xf627c5||'')[_0x1879b7(0x1fa)]();return _0x29a962;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x2ac64e=a64_0x3de8;(function(_0x16bc9b,_0x94ff83){const _0x4900d5=a64_0x3de8,_0x4ffcee=_0x16bc9b();while(!![]){try{const _0x33ab78=parseInt(_0x4900d5(0x9d))/0x1*(parseInt(_0x4900d5(0xc3))/0x2)+-parseInt(_0x4900d5(0xa3))/0x3*(-parseInt(_0x4900d5(0x97))/0x4)+parseInt(_0x4900d5(0xa1))/0x5+parseInt(_0x4900d5(0x7c))/0x6*(parseInt(_0x4900d5(0xb3))/0x7)+-parseInt(_0x4900d5(0x89))/0x8+-parseInt(_0x4900d5(0x80))/0x9+-parseInt(_0x4900d5(0xb5))/0xa*(parseInt(_0x4900d5(0x9e))/0xb);if(_0x33ab78===_0x94ff83)break;else _0x4ffcee['push'](_0x4ffcee['shift']());}catch(_0xd5f2b3){_0x4ffcee['push'](_0x4ffcee['shift']());}}}(a64_0x316b,0xd7fd6));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set(['doType',a64_0x2ac64e(0x7e),a64_0x2ac64e(0x93),a64_0x2ac64e(0xc0),a64_0x2ac64e(0x8e),a64_0x2ac64e(0xc1),a64_0x2ac64e(0x96),a64_0x2ac64e(0x94),a64_0x2ac64e(0x83)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a64_0x2ac64e(0xa0),a64_0x2ac64e(0xc4),a64_0x2ac64e(0xba),a64_0x2ac64e(0x85),a64_0x2ac64e(0x7b),a64_0x2ac64e(0xb4),a64_0x2ac64e(0xbe),a64_0x2ac64e(0x81),'pkField',a64_0x2ac64e(0x9a),'systemRetain']);export function parseJsonObjectFlag(_0x414d6f,_0x3635fe){const _0x2a85a7=a64_0x2ac64e;if(!_0x414d6f)return undefined;let _0x5925ef;try{_0x5925ef=JSON[_0x2a85a7(0x99)](_0x414d6f);}catch(_0x5e32f4){const _0x449648=_0x5e32f4 instanceof Error?_0x5e32f4['message']:String(_0x5e32f4);throw CliErrors[_0x2a85a7(0x7d)](_0x3635fe+_0x2a85a7(0x82)+_0x449648);}if(!isPlainObject(_0x5925ef)||Array['isArray'](_0x5925ef))throw CliErrors['validation'](_0x3635fe+'\x20must\x20be\x20a\x20JSON\x20object');return _0x5925ef;}export function validatePatchKeys(_0x55dbc4){const _0x21d13d=a64_0x2ac64e,_0x5eadd6=Object[_0x21d13d(0x87)](_0x55dbc4);if(_0x5eadd6[_0x21d13d(0xbb)]===0x0)throw CliErrors['validation'](_0x21d13d(0xaf));for(const _0x325e99 of _0x5eadd6){if(FORBIDDEN_FIELD_KEYS[_0x21d13d(0xa6)](_0x325e99))throw CliErrors['validation'](_0x21d13d(0xb6)+_0x325e99);if(!MUTABLE_FIELD_KEYS[_0x21d13d(0xa6)](_0x325e99))throw CliErrors[_0x21d13d(0x7d)](_0x21d13d(0x95)+_0x325e99,'Allowed\x20keys:\x20'+Array[_0x21d13d(0xb2)](MUTABLE_FIELD_KEYS)['join'](',\x20'));}}export function applyFieldPatch(_0x100b2f,_0x5a3d30){const _0x513890=a64_0x2ac64e;validatePatchKeys(_0x5a3d30);const _0x67e647=deepClone(_0x100b2f),_0x4daa0b=new Set();for(const [_0x1734b6,_0x205695]of Object[_0x513890(0xab)](_0x5a3d30)){const _0x58d739=_0x67e647[_0x1734b6],_0x5a9f31=mergePatchValue(_0x58d739,_0x205695);!deepEqual(_0x58d739,_0x5a9f31)&&(_0x67e647[_0x1734b6]=_0x5a9f31,_0x4daa0b[_0x513890(0x8d)](_0x1734b6),collectChangedPaths(_0x1734b6,_0x58d739,_0x5a9f31,_0x4daa0b));}return{'after':_0x67e647,'changedPaths':Array['from'](_0x4daa0b)[_0x513890(0xa4)](),'changed':_0x4daa0b['size']>0x0};}export function assertExpectation(_0x4adf8a,_0x5d0caf){const _0x78c309=a64_0x2ac64e;if(!_0x5d0caf)return;for(const [_0x1f9ef,_0x874c62]of Object[_0x78c309(0xab)](_0x5d0caf)){const _0x15271c=_0x4adf8a[_0x1f9ef];if(!deepEqual(_0x15271c,_0x874c62))throw CliErrors['validation'](_0x78c309(0xb0)+_0x1f9ef,_0x78c309(0x8f)+JSON[_0x78c309(0xc5)](_0x874c62)+_0x78c309(0x9b)+JSON[_0x78c309(0xc5)](_0x15271c));}}export async function buildDatasetFieldUpdateResult({appCode:_0x1bfcd2,input:_0x11a0f5,dryRun:_0x3f7b5a}){const _0x1ebd37=a64_0x2ac64e;validateInput(_0x11a0f5);const _0x253901=await getDatasetDetail(_0x11a0f5[_0x1ebd37(0xc4)]),_0x3b4620=readFieldArray(_0x253901),_0x455b35=_0x3b4620[_0x1ebd37(0xb8)](_0x45c9af=>_0x45c9af?.[_0x1ebd37(0xa0)]===_0x11a0f5[_0x1ebd37(0x84)]);if(_0x455b35<0x0)throw CliErrors[_0x1ebd37(0x7d)]('Field\x20not\x20found:\x20'+_0x11a0f5[_0x1ebd37(0x84)]);const _0x5f5782=deepClone(_0x3b4620[_0x455b35]);assertExpectation(_0x5f5782,_0x11a0f5[_0x1ebd37(0x8b)]);const {after:_0x14df37,changedPaths:_0x4d0a21,changed:_0xd5398e}=applyFieldPatch(_0x5f5782,_0x11a0f5['patch']),_0x6e6e12=summarizeDataset(_0x253901,_0x11a0f5[_0x1ebd37(0xc4)]);return _0xd5398e&&!_0x3f7b5a&&(_0x3b4620[_0x455b35]=_0x14df37,await updateDrivenData(_0x253901)),{'ok':!![],'data':{'appCode':_0x1bfcd2,'selector':{'code':_0x11a0f5[_0x1ebd37(0xc4)]},'dataset':_0x6e6e12,'field':{'id':_0x5f5782['id']??null,'name':_0x5f5782[_0x1ebd37(0xa0)]},'dryRun':_0x3f7b5a,'changed':_0xd5398e,'changedPaths':_0x4d0a21,'before':_0x5f5782,'after':_0x14df37,'submitted':_0xd5398e&&!_0x3f7b5a},'message':_0xd5398e?_0x3f7b5a?_0x1ebd37(0x92)+_0x11a0f5[_0x1ebd37(0x84)]+'\x20would\x20change\x20('+_0x4d0a21[_0x1ebd37(0x7f)](',\x20')+')':_0x1ebd37(0xae)+_0x11a0f5[_0x1ebd37(0x84)]+'\x20('+_0x4d0a21[_0x1ebd37(0x7f)](',\x20')+')':_0x1ebd37(0xbc)+_0x11a0f5['field']};}export const datasetFieldUpdate={'service':'dataset','command':a64_0x2ac64e(0x90),'description':a64_0x2ac64e(0xaa),'risk':'write','flags':[CODE_FLAG,{'name':a64_0x2ac64e(0x84),'type':a64_0x2ac64e(0x7a),'required':!![],'description':a64_0x2ac64e(0xa8)},{'name':a64_0x2ac64e(0xa7),'type':'string','required':!![],'description':a64_0x2ac64e(0xa2)},{'name':a64_0x2ac64e(0xb9),'type':a64_0x2ac64e(0x7a),'required':![],'description':a64_0x2ac64e(0x9f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x826ac1){validateInput(readFieldUpdateInput(_0x826ac1));},async 'dryRun'(_0x232746){const _0x3e68dd=a64_0x2ac64e,_0x462aee=await buildDatasetFieldUpdateResult({'appCode':_0x232746[_0x3e68dd(0x86)],'input':readFieldUpdateInput(_0x232746),'dryRun':!![]});return{'method':_0x3e68dd(0xbf),'url':_0x3e68dd(0xb7),'body':_0x462aee[_0x3e68dd(0xa9)],'description':_0x462aee['message']};},async 'execute'(_0x56f1bc){const _0x5a6643=a64_0x2ac64e;return buildDatasetFieldUpdateResult({'appCode':_0x56f1bc[_0x5a6643(0x86)],'input':readFieldUpdateInput(_0x56f1bc),'dryRun':![]});}};function readFieldUpdateInput(_0x2b7e70){const _0x3eb638=a64_0x2ac64e,_0x54c83d=trim(_0x2b7e70[_0x3eb638(0xad)]('code')),_0x11cdbc=emptyToUndefined(_0x2b7e70['str'](_0x3eb638(0x84))),_0x2e1192=parseJsonObjectFlag(_0x2b7e70['str']('patch-json'),'--patch-json'),_0x1e773f=parseJsonObjectFlag(_0x2b7e70[_0x3eb638(0xad)](_0x3eb638(0xb9)),'--expect-json');return{'code':_0x54c83d,'field':_0x11cdbc||'','patch':_0x2e1192||{},'expect':_0x1e773f};}function validateInput(_0x442463){const _0x433035=a64_0x2ac64e;if(!_0x442463[_0x433035(0xc4)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x442463[_0x433035(0x84)])throw CliErrors['validation'](_0x433035(0x98));validatePatchKeys(_0x442463[_0x433035(0x9c)]);}function a64_0x316b(){const _0x13113b=['2VFexoE','code','stringify','string','dbTypeScale','113994TGjFmG','validation','displayName','join','12164499EfWjxE','deleted','\x20must\x20be\x20valid\x20JSON\x20object:\x20','deprecated','field','dbTypeLen','appCode','keys','datasetId','6322200HSzdrv','datasetCode','expect','dataset','add','required','Expected\x20','field-update','dbId','Dry-run:\x20dataset\x20field\x20','description','chartRole','Unsupported\x20patch\x20key:\x20','defaultAggregation','3656172yiHdYo','--field\x20is\x20required','parse','autoIncrement',',\x20actual\x20','patch','1319705dLRJzh','16456fuVBYH','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','name','7938375pgkUEL','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','3qfWeXD','sort','object','has','patch-json','Exact\x20raw\x20fields[].name\x20to\x20patch','data','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','entries','properties','str','Updated\x20dataset\x20field\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Expectation\x20mismatch\x20at\x20','isArray','from','637LrMayb','dbFieldName','16870EVzRWz','Forbidden\x20patch\x20key:\x20','/smartapi/dataset/update-driven-data','findIndex','expect-json','dbType','length','No\x20changes\x20for\x20dataset\x20field\x20','dbtableConfig','tableName','POST','options','datetimeFormat','fields'];a64_0x316b=function(){return _0x13113b;};return a64_0x316b();}function readFieldArray(_0x46bf6e){const _0x4deb5e=a64_0x2ac64e;if(Array[_0x4deb5e(0xb1)](_0x46bf6e[_0x4deb5e(0xc2)]))return _0x46bf6e[_0x4deb5e(0xc2)];if(Array['isArray'](_0x46bf6e[_0x4deb5e(0xac)]))return _0x46bf6e[_0x4deb5e(0xac)];throw CliErrors[_0x4deb5e(0x7d)]('Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]');}function a64_0x3de8(_0x1c8c79,_0x3c6ade){_0x1c8c79=_0x1c8c79-0x7a;const _0x316b10=a64_0x316b();let _0x3de824=_0x316b10[_0x1c8c79];return _0x3de824;}function summarizeDataset(_0x23e477,_0x62eb61){const _0x397288=a64_0x2ac64e,_0x23dfb1=isPlainObject(_0x23e477[_0x397288(0x8c)])?_0x23e477[_0x397288(0x8c)]:{},_0x584740=isPlainObject(_0x23e477[_0x397288(0xbd)])?_0x23e477[_0x397288(0xbd)]:{};return{'id':_0x23e477['modelId']??_0x23e477['id']??_0x23dfb1[_0x397288(0x88)]??null,'code':_0x23e477['modelCode']??_0x23e477[_0x397288(0xc4)]??_0x23dfb1[_0x397288(0x8a)]??_0x62eb61,'name':_0x23e477[_0x397288(0xa0)]??_0x23dfb1['datasetName']??null,'table':_0x584740[_0x397288(0xbe)]??_0x23dfb1[_0x397288(0xbe)]??null,'db':_0x584740['dbName']??_0x584740[_0x397288(0x91)]??null};}function mergePatchValue(_0x52989f,_0x3631f1){if(isPlainObject(_0x52989f)&&isPlainObject(_0x3631f1))return deepMerge(_0x52989f,_0x3631f1);return deepClone(_0x3631f1);}function deepMerge(_0x39c3c7,_0x2dccd3){const _0x3686a1=a64_0x2ac64e,_0x574d19=deepClone(_0x39c3c7);for(const [_0x58dc43,_0x5b0607]of Object[_0x3686a1(0xab)](_0x2dccd3)){_0x574d19[_0x58dc43]=isPlainObject(_0x574d19[_0x58dc43])&&isPlainObject(_0x5b0607)?deepMerge(_0x574d19[_0x58dc43],_0x5b0607):deepClone(_0x5b0607);}return _0x574d19;}function collectChangedPaths(_0x3ee433,_0x5a259f,_0x25651d,_0x1f5fa5){const _0x12524c=a64_0x2ac64e;if(!isPlainObject(_0x5a259f)||!isPlainObject(_0x25651d))return;const _0x5aade5=new Set([...Object[_0x12524c(0x87)](_0x5a259f),...Object[_0x12524c(0x87)](_0x25651d)]);for(const _0x4fadd0 of _0x5aade5){const _0x4d162f=_0x5a259f[_0x4fadd0],_0x177889=_0x25651d[_0x4fadd0];!deepEqual(_0x4d162f,_0x177889)&&_0x1f5fa5['add'](_0x3ee433+'.'+_0x4fadd0);}}function deepClone(_0x239d2a){if(_0x239d2a===undefined)return _0x239d2a;return JSON['parse'](JSON['stringify'](_0x239d2a));}function deepEqual(_0xb48cdb,_0x193194){const _0x340714=a64_0x2ac64e;return JSON[_0x340714(0xc5)](_0xb48cdb)===JSON[_0x340714(0xc5)](_0x193194);}function isPlainObject(_0x63a40a){const _0x4060a5=a64_0x2ac64e;return Boolean(_0x63a40a)&&typeof _0x63a40a===_0x4060a5(0xa5)&&!Array[_0x4060a5(0xb1)](_0x63a40a);}function emptyToUndefined(_0xfeeaaf){const _0x1a2874=String(_0xfeeaaf||'')['trim']();return _0x1a2874||undefined;}function trim(_0xd12614){return String(_0xd12614||'')['trim']();}
|
|
1
|
+
const a65_0x5dfe2e=a65_0x5e77;(function(_0x4734ec,_0x5c9e67){const _0x556057=a65_0x5e77,_0x158542=_0x4734ec();while(!![]){try{const _0x56657e=-parseInt(_0x556057(0x139))/0x1+parseInt(_0x556057(0x13e))/0x2+-parseInt(_0x556057(0x10d))/0x3+parseInt(_0x556057(0x10e))/0x4*(-parseInt(_0x556057(0x127))/0x5)+-parseInt(_0x556057(0x118))/0x6+parseInt(_0x556057(0x132))/0x7+parseInt(_0x556057(0x14a))/0x8;if(_0x56657e===_0x5c9e67)break;else _0x158542['push'](_0x158542['shift']());}catch(_0x4799e0){_0x158542['push'](_0x158542['shift']());}}}(a65_0x4c91,0x6f462));function a65_0x5e77(_0xbc63d0,_0x4f140c){_0xbc63d0=_0xbc63d0-0x105;const _0x4c9192=a65_0x4c91();let _0x5e77e6=_0x4c9192[_0xbc63d0];return _0x5e77e6;}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_0x5dfe2e(0x14c),'displayName',a65_0x5dfe2e(0x14e),a65_0x5dfe2e(0x124),a65_0x5dfe2e(0x106),'datetimeFormat',a65_0x5dfe2e(0x107),a65_0x5dfe2e(0x12e),a65_0x5dfe2e(0x138)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x5dfe2e(0x14f),'code','dbType','dbTypeLen','dbTypeScale','dbFieldName',a65_0x5dfe2e(0x128),a65_0x5dfe2e(0x150),a65_0x5dfe2e(0x10a),a65_0x5dfe2e(0x140),a65_0x5dfe2e(0x152)]);function a65_0x4c91(){const _0x3e5300=['Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','pkField','has','field','2485287NzdnpZ','391484jedkWZ','size','datasetName','\x20would\x20change\x20(','trim','POST','join','/smartapi/dataset/update-driven-data','findIndex','--field\x20is\x20required','2440146KHOeUL','modelId','code','Expectation\x20mismatch\x20at\x20','datasetId','expect-json','from','properties','--expect-json','--code\x20is\x20required','patch','Field\x20not\x20found:\x20','options','Updated\x20dataset\x20field\x20','message','40bTmdaW','tableName','fields','string','Expected\x20','Allowed\x20keys:\x20','entries','chartRole','object','--patch-json','data','17227XNZhbo','parse','validation','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','length','stringify','deprecated','583879tDuwwl','Exact\x20raw\x20fields[].name\x20to\x20patch','str','expect','dataset','1599506NPbxzv','dbtableConfig','autoIncrement','write','keys','\x20must\x20be\x20valid\x20JSON\x20object:\x20','isArray','appCode','No\x20changes\x20for\x20dataset\x20field\x20','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field-update','modelCode','18044248gBGbeu','dbName','doType','Forbidden\x20patch\x20key:\x20','description','name','deleted','add','systemRetain','patch-json','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','required','defaultAggregation','Dry-run:\x20dataset\x20field\x20'];a65_0x4c91=function(){return _0x3e5300;};return a65_0x4c91();}export function parseJsonObjectFlag(_0x59e863,_0x40a9d6){const _0x47de23=a65_0x5dfe2e;if(!_0x59e863)return undefined;let _0xc3a651;try{_0xc3a651=JSON[_0x47de23(0x133)](_0x59e863);}catch(_0x1a5225){const _0x17b3bb=_0x1a5225 instanceof Error?_0x1a5225[_0x47de23(0x126)]:String(_0x1a5225);throw CliErrors[_0x47de23(0x134)](_0x40a9d6+_0x47de23(0x143)+_0x17b3bb);}if(!isPlainObject(_0xc3a651)||Array[_0x47de23(0x144)](_0xc3a651))throw CliErrors[_0x47de23(0x134)](_0x40a9d6+'\x20must\x20be\x20a\x20JSON\x20object');return _0xc3a651;}export function validatePatchKeys(_0x2ef81d){const _0x1c534e=a65_0x5dfe2e,_0x3260f0=Object[_0x1c534e(0x142)](_0x2ef81d);if(_0x3260f0[_0x1c534e(0x136)]===0x0)throw CliErrors['validation'](_0x1c534e(0x135));for(const _0x74af21 of _0x3260f0){if(FORBIDDEN_FIELD_KEYS[_0x1c534e(0x10b)](_0x74af21))throw CliErrors[_0x1c534e(0x134)](_0x1c534e(0x14d)+_0x74af21);if(!MUTABLE_FIELD_KEYS[_0x1c534e(0x10b)](_0x74af21))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x74af21,_0x1c534e(0x12c)+Array[_0x1c534e(0x11e)](MUTABLE_FIELD_KEYS)[_0x1c534e(0x114)](',\x20'));}}export function applyFieldPatch(_0x261db7,_0x3d36d5){const _0x2d7e53=a65_0x5dfe2e;validatePatchKeys(_0x3d36d5);const _0x527fa8=deepClone(_0x261db7),_0x13f7ee=new Set();for(const [_0x35c08c,_0x58bff4]of Object['entries'](_0x3d36d5)){const _0x3ff468=_0x527fa8[_0x35c08c],_0x2c2d5b=mergePatchValue(_0x3ff468,_0x58bff4);!deepEqual(_0x3ff468,_0x2c2d5b)&&(_0x527fa8[_0x35c08c]=_0x2c2d5b,_0x13f7ee[_0x2d7e53(0x151)](_0x35c08c),collectChangedPaths(_0x35c08c,_0x3ff468,_0x2c2d5b,_0x13f7ee));}return{'after':_0x527fa8,'changedPaths':Array[_0x2d7e53(0x11e)](_0x13f7ee)['sort'](),'changed':_0x13f7ee[_0x2d7e53(0x10f)]>0x0};}export function assertExpectation(_0x3ae9b7,_0x2c424e){const _0x13cec6=a65_0x5dfe2e;if(!_0x2c424e)return;for(const [_0x376607,_0x3ce3c1]of Object[_0x13cec6(0x12d)](_0x2c424e)){const _0x1c581e=_0x3ae9b7[_0x376607];if(!deepEqual(_0x1c581e,_0x3ce3c1))throw CliErrors[_0x13cec6(0x134)](_0x13cec6(0x11b)+_0x376607,_0x13cec6(0x12b)+JSON[_0x13cec6(0x137)](_0x3ce3c1)+',\x20actual\x20'+JSON[_0x13cec6(0x137)](_0x1c581e));}}export async function buildDatasetFieldUpdateResult({appCode:_0x5c993c,input:_0x452335,dryRun:_0x16fde2}){const _0x33ff6f=a65_0x5dfe2e;validateInput(_0x452335);const _0xf2151=await getDatasetDetail(_0x452335[_0x33ff6f(0x11a)]),_0x22db3c=readFieldArray(_0xf2151),_0x1ad299=_0x22db3c[_0x33ff6f(0x116)](_0x2d7747=>_0x2d7747?.[_0x33ff6f(0x14f)]===_0x452335['field']);if(_0x1ad299<0x0)throw CliErrors['validation'](_0x33ff6f(0x123)+_0x452335['field']);const _0x4afc01=deepClone(_0x22db3c[_0x1ad299]);assertExpectation(_0x4afc01,_0x452335[_0x33ff6f(0x13c)]);const {after:_0x14cb67,changedPaths:_0x1df220,changed:_0x40d924}=applyFieldPatch(_0x4afc01,_0x452335['patch']),_0x418fee=summarizeDataset(_0xf2151,_0x452335['code']);return _0x40d924&&!_0x16fde2&&(_0x22db3c[_0x1ad299]=_0x14cb67,await updateDrivenData(_0xf2151)),{'ok':!![],'data':{'appCode':_0x5c993c,'selector':{'code':_0x452335['code']},'dataset':_0x418fee,'field':{'id':_0x4afc01['id']??null,'name':_0x4afc01[_0x33ff6f(0x14f)]},'dryRun':_0x16fde2,'changed':_0x40d924,'changedPaths':_0x1df220,'before':_0x4afc01,'after':_0x14cb67,'submitted':_0x40d924&&!_0x16fde2},'message':_0x40d924?_0x16fde2?_0x33ff6f(0x108)+_0x452335[_0x33ff6f(0x10c)]+_0x33ff6f(0x111)+_0x1df220['join'](',\x20')+')':_0x33ff6f(0x125)+_0x452335['field']+'\x20('+_0x1df220['join'](',\x20')+')':_0x33ff6f(0x146)+_0x452335[_0x33ff6f(0x10c)]};}export const datasetFieldUpdate={'service':a65_0x5dfe2e(0x13d),'command':a65_0x5dfe2e(0x148),'description':a65_0x5dfe2e(0x109),'risk':a65_0x5dfe2e(0x141),'flags':[CODE_FLAG,{'name':'field','type':a65_0x5dfe2e(0x12a),'required':!![],'description':a65_0x5dfe2e(0x13a)},{'name':a65_0x5dfe2e(0x153),'type':'string','required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a65_0x5dfe2e(0x11d),'type':a65_0x5dfe2e(0x12a),'required':![],'description':a65_0x5dfe2e(0x105)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29300d){validateInput(readFieldUpdateInput(_0x29300d));},async 'dryRun'(_0x234277){const _0x2f5092=a65_0x5dfe2e,_0x5d3b14=await buildDatasetFieldUpdateResult({'appCode':_0x234277[_0x2f5092(0x145)],'input':readFieldUpdateInput(_0x234277),'dryRun':!![]});return{'method':_0x2f5092(0x113),'url':_0x2f5092(0x115),'body':_0x5d3b14[_0x2f5092(0x131)],'description':_0x5d3b14['message']};},async 'execute'(_0x41b953){const _0x2898d2=a65_0x5dfe2e;return buildDatasetFieldUpdateResult({'appCode':_0x41b953[_0x2898d2(0x145)],'input':readFieldUpdateInput(_0x41b953),'dryRun':![]});}};function readFieldUpdateInput(_0x4056f5){const _0x4f0e13=a65_0x5dfe2e,_0xf8e8d6=trim(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x11a))),_0x2e6684=emptyToUndefined(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x10c))),_0x3c8308=parseJsonObjectFlag(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x153)),_0x4f0e13(0x130)),_0x2f95cd=parseJsonObjectFlag(_0x4056f5['str'](_0x4f0e13(0x11d)),_0x4f0e13(0x120));return{'code':_0xf8e8d6,'field':_0x2e6684||'','patch':_0x3c8308||{},'expect':_0x2f95cd};}function validateInput(_0x4295d7){const _0x1de812=a65_0x5dfe2e;if(!_0x4295d7['code'])throw CliErrors[_0x1de812(0x134)](_0x1de812(0x121));if(!_0x4295d7[_0x1de812(0x10c)])throw CliErrors[_0x1de812(0x134)](_0x1de812(0x117));validatePatchKeys(_0x4295d7[_0x1de812(0x122)]);}function readFieldArray(_0x2a5e91){const _0x2da875=a65_0x5dfe2e;if(Array[_0x2da875(0x144)](_0x2a5e91['fields']))return _0x2a5e91[_0x2da875(0x129)];if(Array[_0x2da875(0x144)](_0x2a5e91[_0x2da875(0x11f)]))return _0x2a5e91[_0x2da875(0x11f)];throw CliErrors['validation'](_0x2da875(0x147));}function summarizeDataset(_0x39180b,_0x4c9d08){const _0x4063a7=a65_0x5dfe2e,_0x10c803=isPlainObject(_0x39180b[_0x4063a7(0x13d)])?_0x39180b[_0x4063a7(0x13d)]:{},_0x5b3c05=isPlainObject(_0x39180b[_0x4063a7(0x13f)])?_0x39180b['dbtableConfig']:{};return{'id':_0x39180b[_0x4063a7(0x119)]??_0x39180b['id']??_0x10c803[_0x4063a7(0x11c)]??null,'code':_0x39180b[_0x4063a7(0x149)]??_0x39180b['code']??_0x10c803['datasetCode']??_0x4c9d08,'name':_0x39180b[_0x4063a7(0x14f)]??_0x10c803[_0x4063a7(0x110)]??null,'table':_0x5b3c05[_0x4063a7(0x128)]??_0x10c803[_0x4063a7(0x128)]??null,'db':_0x5b3c05[_0x4063a7(0x14b)]??_0x5b3c05['dbId']??null};}function mergePatchValue(_0x33bfe9,_0x26b8f8){if(isPlainObject(_0x33bfe9)&&isPlainObject(_0x26b8f8))return deepMerge(_0x33bfe9,_0x26b8f8);return deepClone(_0x26b8f8);}function deepMerge(_0x1e0ea,_0x342983){const _0x319ff8=deepClone(_0x1e0ea);for(const [_0x2e4a6b,_0x427506]of Object['entries'](_0x342983)){_0x319ff8[_0x2e4a6b]=isPlainObject(_0x319ff8[_0x2e4a6b])&&isPlainObject(_0x427506)?deepMerge(_0x319ff8[_0x2e4a6b],_0x427506):deepClone(_0x427506);}return _0x319ff8;}function collectChangedPaths(_0x13be8a,_0x5e265d,_0x5b672d,_0x1b351b){const _0x48d217=a65_0x5dfe2e;if(!isPlainObject(_0x5e265d)||!isPlainObject(_0x5b672d))return;const _0x28c449=new Set([...Object[_0x48d217(0x142)](_0x5e265d),...Object[_0x48d217(0x142)](_0x5b672d)]);for(const _0x5f526a of _0x28c449){const _0xac1808=_0x5e265d[_0x5f526a],_0x357f27=_0x5b672d[_0x5f526a];!deepEqual(_0xac1808,_0x357f27)&&_0x1b351b[_0x48d217(0x151)](_0x13be8a+'.'+_0x5f526a);}}function deepClone(_0x4c682d){const _0x3d0c06=a65_0x5dfe2e;if(_0x4c682d===undefined)return _0x4c682d;return JSON[_0x3d0c06(0x133)](JSON[_0x3d0c06(0x137)](_0x4c682d));}function deepEqual(_0x23cc50,_0x27fd01){const _0x310d93=a65_0x5dfe2e;return JSON[_0x310d93(0x137)](_0x23cc50)===JSON[_0x310d93(0x137)](_0x27fd01);}function isPlainObject(_0x396a15){const _0x23399a=a65_0x5dfe2e;return Boolean(_0x396a15)&&typeof _0x396a15===_0x23399a(0x12f)&&!Array['isArray'](_0x396a15);}function emptyToUndefined(_0x423be0){const _0x281209=String(_0x423be0||'')['trim']();return _0x281209||undefined;}function trim(_0x22046a){const _0x12da08=a65_0x5dfe2e;return String(_0x22046a||'')[_0x12da08(0x112)]();}
|