@lovrabet/rabetbase-cli 2.3.10 → 2.3.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/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 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x31a741=a53_0x20c4;(function(_0x128cd8,_0x1f83d8){const _0x4d4410=a53_0x20c4,_0x25c539=_0x128cd8();while(!![]){try{const _0x54e2ea=parseInt(_0x4d4410(0xe4))/0x1+parseInt(_0x4d4410(0xdc))/0x2+parseInt(_0x4d4410(0xe3))/0x3*(parseInt(_0x4d4410(0xdf))/0x4)+parseInt(_0x4d4410(0xd4))/0x5+-parseInt(_0x4d4410(0xda))/0x6+-parseInt(_0x4d4410(0xd9))/0x7+parseInt(_0x4d4410(0xdb))/0x8*(parseInt(_0x4d4410(0xdd))/0x9);if(_0x54e2ea===_0x1f83d8)break;else _0x25c539['push'](_0x25c539['shift']());}catch(_0x191819){_0x25c539['push'](_0x25c539['shift']());}}}(a53_0x2046,0x2db26));function a53_0x20c4(_0x21de97,_0x1222f4){_0x21de97=_0x21de97-0xd4;const _0x2046ee=a53_0x2046();let _0x20c4c1=_0x2046ee[_0x21de97];return _0x20c4c1;}function a53_0x2046(){const _0x6e7161=['boolean','read','3WJmFEg','6712laIkXG','265020seZUpy','List\x20all\x20config\x20values','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','config','global','872781uiVNuK','1751454HwzSMW','1566184yAhjZs','650076veFjzW','9nFHvuG','list','92956EPmVsP','bool'];a53_0x2046=function(){return _0x6e7161;};return a53_0x2046();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x567de8){const _0x434c51=a53_0x20c4,_0x263ebb=_0x567de8[_0x434c51(0xe0)]('global')?readScopedConfig(_0x434c51(0xd8)):readConfig();return{'ok':!![],'data':_0x263ebb};}export const configListDefinition={'service':a53_0x31a741(0xd7),'command':a53_0x31a741(0xde),'description':a53_0x31a741(0xd5),'risk':a53_0x31a741(0xe2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a53_0x31a741(0xe1),'description':a53_0x31a741(0xd6),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x370437=a54_0x44f8;(function(_0x28975f,_0xe19d71){const _0x2df210=a54_0x44f8,_0x132858=_0x28975f();while(!![]){try{const _0x50bd0c=parseInt(_0x2df210(0x199))/0x1+-parseInt(_0x2df210(0x1a0))/0x2+parseInt(_0x2df210(0x196))/0x3*(parseInt(_0x2df210(0x182))/0x4)+parseInt(_0x2df210(0x18e))/0x5+parseInt(_0x2df210(0x194))/0x6*(parseInt(_0x2df210(0x17f))/0x7)+-parseInt(_0x2df210(0x19c))/0x8*(parseInt(_0x2df210(0x183))/0x9)+parseInt(_0x2df210(0x18b))/0xa;if(_0x50bd0c===_0xe19d71)break;else _0x132858['push'](_0x132858['shift']());}catch(_0x2da37e){_0x132858['push'](_0x132858['shift']());}}}(a54_0x3357,0x32510));import{CliErrors}from'../../errors.js';function a54_0x3357(){const _0x3aea8c=['Set\x20a\x20config\x20value','392FPGtPr','1135629tOuLNW','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Global','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','apps','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','includes','840800fqdpOJ','value','keys','954200miRole','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x20app\x20add\x20<name>\x20--appcode\x20','global','Use\x20`','join','932628WeFYBu','Invalid\x20locale\x20value.','7023bOJXxg','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20\x22','108451mmvnkq','Project','string','16rwYImY','write','env','\x20set\x20to:\x20','619538pfrryL','key','length','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','locale','\x22\x20is\x20not\x20settable.','app','appcode','str','boolean','Usage:\x20','Settable\x20top-level\x20keys:\x20','\x20appcode\x20set\x20to:\x20','Missing\x20key.','validation','Missing\x20value.','riskLevel','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Top-level\x20key\x20\x22','7nnoYOA','\x20(stored\x20as\x20apps\x20+\x20defaultApp)'];a54_0x3357=function(){return _0x3aea8c;};return a54_0x3357();}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';function a54_0x44f8(_0xdb1710,_0x2ec75c){_0xdb1710=_0xdb1710-0x178;const _0x335712=a54_0x3357();let _0x44f8c9=_0x335712[_0xdb1710];return _0x44f8c9;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0xa7904b){const _0x5e2200=a54_0x44f8,_0x229f68=_0xa7904b['str'](_0x5e2200(0x1a1)),_0x2f45b6=_0xa7904b[_0x5e2200(0x1a8)]('value');if(!_0x229f68)throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x179),_0x5e2200(0x1aa)+CLI_BIN_NAME+_0x5e2200(0x17d));if(_0x2f45b6===undefined||_0x2f45b6==='')throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x17b),_0x5e2200(0x1aa)+CLI_BIN_NAME+_0x5e2200(0x17d));if(_0x2f45b6[_0x5e2200(0x1a2)]>0x1f4)throw CliErrors['validation'](_0x5e2200(0x18f));if(!isTopLevelConfigKey(_0x229f68))throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x17e)+_0x229f68+_0x5e2200(0x1a5),_0x5e2200(0x1ab)+getTopLevelConfigKeySummary());if(_0x229f68===_0x5e2200(0x17c))throw CliErrors['validation'](_0x5e2200(0x1a3));if(CONFIG_ENUM_VALUES[_0x229f68]&&!CONFIG_ENUM_VALUES[_0x229f68][_0x5e2200(0x18a)](_0x2f45b6))throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x198)+_0x229f68+_0x5e2200(0x197)+CONFIG_ENUM_VALUES[_0x229f68][_0x5e2200(0x193)](',\x20'));if(_0x229f68===_0x5e2200(0x1a4)&&!normalizeLocale(_0x2f45b6))throw CliErrors['validation'](_0x5e2200(0x195),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x1de990={'global':_0xa7904b['bool'](_0x5e2200(0x191))},_0x2655f0=resolveWriteScope(_0x1de990),_0x3edc93=readScopedConfig(_0x2655f0);let _0x9b43dc=_0x229f68,_0x5e1cbd=_0x2f45b6;_0x229f68===_0x5e2200(0x1a6)&&(_0x9b43dc=_0x5e2200(0x1a7),delete _0x3edc93[_0x5e2200(0x1a6)]);_0x229f68===_0x5e2200(0x1a4)&&(_0x5e1cbd=normalizeLocale(_0x2f45b6));if(_0x229f68==='env'){_0x5e1cbd=normalizeEnv(_0x2f45b6);if(!isProduction(_0x5e1cbd)&&!isDaily(_0x5e1cbd))throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x187),_0x5e2200(0x184));}if(_0x229f68===_0x5e2200(0x1a7)){const _0x429a9c=_0x3edc93['apps']&&typeof _0x3edc93['apps']==='object'?Object[_0x5e2200(0x18d)](_0x3edc93[_0x5e2200(0x188)]):[];if(_0x429a9c[_0x5e2200(0x1a2)]>0x0)throw CliErrors[_0x5e2200(0x17a)](_0x5e2200(0x189),_0x5e2200(0x192)+CLI_BIN_NAME+_0x5e2200(0x190)+_0x5e1cbd+'`,\x20`'+CLI_BIN_NAME+_0x5e2200(0x186));const _0x20b61a=buildCanonicalProjectConfig({..._0x3edc93},{'appCodes':[_0x5e1cbd],'env':typeof _0x3edc93[_0x5e2200(0x19e)]===_0x5e2200(0x19b)?_0x3edc93[_0x5e2200(0x19e)]:undefined});writeScopedConfig(_0x20b61a,_0x2655f0);const _0x1cdeff=_0x2655f0==='global'?'Global':_0x5e2200(0x19a);return{'ok':!![],'message':'✓\x20'+_0x1cdeff+_0x5e2200(0x178)+_0x5e1cbd+_0x5e2200(0x180)};}_0x3edc93[_0x9b43dc]=_0x5e1cbd,writeScopedConfig(_0x3edc93,_0x2655f0);const _0x30162e=_0x2655f0===_0x5e2200(0x191)?_0x5e2200(0x185):_0x5e2200(0x19a);return{'ok':!![],'message':'✓\x20'+_0x30162e+'\x20'+_0x9b43dc+_0x5e2200(0x19f)+_0x5e1cbd};}export const configSetDefinition={'service':'config','command':'set','description':a54_0x370437(0x181),'risk':a54_0x370437(0x19d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a54_0x370437(0x1a1),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0x370437(0x18c),'type':a54_0x370437(0x19b),'description':'Config\x20value','required':!![]},{'name':'global','type':a54_0x370437(0x1a9),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x477537,_0x448e6d){var _0x3fe4b1=a55_0x139d,_0x243a17=_0x477537();while(!![]){try{var _0x49b906=parseInt(_0x3fe4b1(0xce))/0x1+parseInt(_0x3fe4b1(0xc9))/0x2+parseInt(_0x3fe4b1(0xcf))/0x3*(parseInt(_0x3fe4b1(0xc3))/0x4)+parseInt(_0x3fe4b1(0xc7))/0x5*(-parseInt(_0x3fe4b1(0xd1))/0x6)+-parseInt(_0x3fe4b1(0xc6))/0x7*(parseInt(_0x3fe4b1(0xcb))/0x8)+-parseInt(_0x3fe4b1(0xcc))/0x9+parseInt(_0x3fe4b1(0xc8))/0xa*(-parseInt(_0x3fe4b1(0xcd))/0xb);if(_0x49b906===_0x448e6d)break;else _0x243a17['push'](_0x243a17['shift']());}catch(_0x5c9468){_0x243a17['push'](_0x243a17['shift']());}}}(a55_0x365c,0xba9a0));import{CLI_BIN_NAME}from'../../constant/cli.js';function a55_0x365c(){var _0x236e99=['6HOAuBG','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','4bFcEuf','global','project','7TgHZIY','1828130vxiCZg','790JaeQbN','2670782nKGtEU','validation','1227720QnqoMj','4510935tHgHhK','16159QwMDxT','531155YqGMWH','102393RBsVzW','\x20init`\x20first.'];a55_0x365c=function(){return _0x236e99;};return a55_0x365c();}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_0x139d(_0x36a989,_0xf399ea){_0x36a989=_0x36a989-0xc3;var _0x365c44=a55_0x365c();var _0x139d0e=_0x365c44[_0x36a989];return _0x139d0e;}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x5a1c06){var _0x5774e0=a55_0x139d;if(_0x5a1c06['global'])return _0x5774e0(0xc4);if(!isInProject())throw CliErrors[_0x5774e0(0xca)](_0x5774e0(0xd3),_0x5774e0(0xd2)+CLI_BIN_NAME+_0x5774e0(0xd0));return _0x5774e0(0xc5);}export function readScopedConfig(_0x9b9d24){return readConfigFile(resolveWriteConfigPath(_0x9b9d24));}export function writeScopedConfig(_0x2be1b9,_0x408d47){writeConfigFile(resolveWriteConfigPath(_0x408d47),_0x2be1b9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x145897=a56_0x205d;(function(_0x128ec5,_0x19f052){const _0x1b33db=a56_0x205d,_0x255cfe=_0x128ec5();while(!![]){try{const _0x14fc7a=parseInt(_0x1b33db(0x108))/0x1+-parseInt(_0x1b33db(0x107))/0x2+parseInt(_0x1b33db(0x10a))/0x3*(parseInt(_0x1b33db(0xfc))/0x4)+-parseInt(_0x1b33db(0x105))/0x5*(parseInt(_0x1b33db(0x10c))/0x6)+parseInt(_0x1b33db(0x101))/0x7+-parseInt(_0x1b33db(0x106))/0x8+parseInt(_0x1b33db(0x10b))/0x9;if(_0x14fc7a===_0x19f052)break;else _0x255cfe['push'](_0x255cfe['shift']());}catch(_0xc52db5){_0x255cfe['push'](_0x255cfe['shift']());}}}(a56_0x1e83,0x39c91));function a56_0x205d(_0x5a9cf4,_0x1963c5){_0x5a9cf4=_0x5a9cf4-0xfb;const _0x1e8397=a56_0x1e83();let _0x205de7=_0x1e8397[_0x5a9cf4];return _0x205de7;}import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x1e83(){const _0xb27ba2=['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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]','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','1083544zeRcrk','Filter\x20dataset\x20records\x20with\x20query\x20conditions','filter','join','4135ElNAgw','3198152ZwnPGh','759200cAlENL','365857qHRkzI','\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}]','433929nLgIxR','1491138hXsmbB','756ZuTBfw','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','12RxGmyX','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'];a56_0x1e83=function(){return _0xb27ba2;};return a56_0x1e83();}export const dataFilter=buildDataCommand({'command':a56_0x145897(0x103),'operation':a56_0x145897(0x103),'description':a56_0x145897(0x102),'paramsRequired':![],'paramsHint':a56_0x145897(0x100),'helpExtra':[a56_0x145897(0xfe),a56_0x145897(0xfb),a56_0x145897(0xff),a56_0x145897(0x109),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a56_0x145897(0xfd)][a56_0x145897(0x104)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a57_0x4367(){const _0x2cfc29=['6238370rZMuWR','getOne','1003797fqGtts','4ysPsiW','16569DqXwcu','624VbawLq','4YdhKBX','Get\x20a\x20single\x20record\x20by\x20ID','3168056xOAMaO','1031118cwWEXS','716535JkNglJ','1042841YaoLun','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'];a57_0x4367=function(){return _0x2cfc29;};return a57_0x4367();}const a57_0x2147df=a57_0x5133;(function(_0x607e50,_0x725af7){const _0x13b68b=a57_0x5133,_0x1aeecd=_0x607e50();while(!![]){try{const _0x495946=parseInt(_0x13b68b(0x1d8))/0x1+parseInt(_0x13b68b(0x1dd))/0x2*(parseInt(_0x13b68b(0x1d6))/0x3)+parseInt(_0x13b68b(0x1d3))/0x4*(parseInt(_0x13b68b(0x1d7))/0x5)+-parseInt(_0x13b68b(0x1d2))/0x6*(parseInt(_0x13b68b(0x1d1))/0x7)+-parseInt(_0x13b68b(0x1d5))/0x8+parseInt(_0x13b68b(0x1dc))/0x9+-parseInt(_0x13b68b(0x1da))/0xa;if(_0x495946===_0x725af7)break;else _0x1aeecd['push'](_0x1aeecd['shift']());}catch(_0x341c00){_0x1aeecd['push'](_0x1aeecd['shift']());}}}(a57_0x4367,0xaf8e9));function a57_0x5133(_0x503c4e,_0x32e62c){_0x503c4e=_0x503c4e-0x1d1;const _0x43678e=a57_0x4367();let _0x5133ce=_0x43678e[_0x503c4e];return _0x5133ce;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a57_0x2147df(0x1db),'operation':'getOne','description':a57_0x2147df(0x1d4),'paramsRequired':!![],'paramsHint':a57_0x2147df(0x1d9)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x16f2(_0x378801,_0x5965c4){_0x378801=_0x378801-0xec;const _0x20a0f8=a58_0x20a0();let _0x16f2a2=_0x20a0f8[_0x378801];return _0x16f2a2;}(function(_0x9d9b6f,_0x26fa61){const _0x4c98eb=a58_0x16f2,_0x37edf9=_0x9d9b6f();while(!![]){try{const _0x479e7b=-parseInt(_0x4c98eb(0xf0))/0x1+parseInt(_0x4c98eb(0xf3))/0x2+-parseInt(_0x4c98eb(0xed))/0x3+parseInt(_0x4c98eb(0xf1))/0x4+-parseInt(_0x4c98eb(0xee))/0x5*(-parseInt(_0x4c98eb(0xef))/0x6)+-parseInt(_0x4c98eb(0xf2))/0x7+parseInt(_0x4c98eb(0xec))/0x8;if(_0x479e7b===_0x26fa61)break;else _0x37edf9['push'](_0x37edf9['shift']());}catch(_0x452cdf){_0x37edf9['push'](_0x37edf9['shift']());}}}(a58_0x20a0,0x5edc8));function a58_0x20a0(){const _0x465a1e=['5zWkCFN','4438686RUnNup','735618QbSIbU','1113780vcfPWM','432152xhvSPj','330778cayUoO','479440LFnwMT','172917hNEsyX'];a58_0x20a0=function(){return _0x465a1e;};return a58_0x20a0();}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a59_0x58ce(_0x170282,_0xce885c){_0x170282=_0x170282-0x109;const _0x29164c=a59_0x2916();let _0x58ce4a=_0x29164c[_0x170282];return _0x58ce4a;}(function(_0x4412e6,_0x176499){const _0x5ca3d5=a59_0x58ce,_0x26e87f=_0x4412e6();while(!![]){try{const _0x24702f=-parseInt(_0x5ca3d5(0x117))/0x1+parseInt(_0x5ca3d5(0x10f))/0x2*(-parseInt(_0x5ca3d5(0x124))/0x3)+parseInt(_0x5ca3d5(0x10e))/0x4*(-parseInt(_0x5ca3d5(0x10c))/0x5)+-parseInt(_0x5ca3d5(0x11b))/0x6*(parseInt(_0x5ca3d5(0x112))/0x7)+parseInt(_0x5ca3d5(0x123))/0x8+-parseInt(_0x5ca3d5(0x126))/0x9+parseInt(_0x5ca3d5(0x10d))/0xa;if(_0x24702f===_0x176499)break;else _0x26e87f['push'](_0x26e87f['shift']());}catch(_0x4d18dc){_0x26e87f['push'](_0x26e87f['shift']());}}}(a59_0x2916,0x289a9));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(_0x29da73){const _0x276017=a59_0x58ce;if(!_0x29da73)throw CliErrors[_0x276017(0x11c)](_0x276017(0x121),_0x276017(0x119));const _0xd8f7a4=_0x29da73['id'];if(_0xd8f7a4===undefined||_0xd8f7a4===null||_0xd8f7a4==='')throw CliErrors['validation'](_0x276017(0x120),_0x276017(0x115));}function a59_0x2916(){const _0xbdf951=['1393etPdHT','now','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','getOne','114148DOHSRb','str','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','command','9714PabbBf','flagMissing','read','string','helpExtra','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','params','operation','2242544vlrJwo','101226DBShmc','alias','339291uSCgSY','data','\x20completed\x20in\x20','appCode','compress','288100OSCiBe','7690770Vbfmnj','12QUQZXM','14VKBldn','paramsRequired','code'];a59_0x2916=function(){return _0xbdf951;};return a59_0x2916();}function parseCommandParams(_0x4719b5){return parseJsonParams(_0x4719b5)??{};}export function buildDataCommand(_0x585a11){const _0x20706e=a59_0x58ce,_0x4ff165=_0x20706e(0x114);return{'service':_0x20706e(0x127),'command':_0x585a11[_0x20706e(0x11a)],'description':_0x585a11['description'],'risk':_0x20706e(0x11d),'defaultOutputFormat':_0x20706e(0x10b),'helpExtra':_0x585a11[_0x20706e(0x11f)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x20706e(0x125),'type':_0x20706e(0x11e),'description':_0x4ff165},{'name':'params','type':_0x20706e(0x11e),'description':_0x585a11['paramsHint']}],async 'validate'(_0x1fc00f){const _0x41b447=_0x20706e,_0x18e903=_0x1fc00f[_0x41b447(0x118)](_0x41b447(0x121));if(_0x585a11[_0x41b447(0x110)]&&!_0x18e903)throw CliErrors[_0x41b447(0x11c)]('params',_0x585a11['paramsHint']);const _0x2a93c2=parseJsonParams(_0x18e903);_0x585a11[_0x41b447(0x122)]===_0x41b447(0x116)&&assertGetOneId(_0x2a93c2);},async 'execute'(_0x4df774){const _0x1a5b8b=_0x20706e,_0x50e7b2=parseCommandParams(_0x4df774[_0x1a5b8b(0x118)](_0x1a5b8b(0x121))),_0x317ae8=Date[_0x1a5b8b(0x113)](),_0xd93ecb=await executeDatasetDataOperation(_0x4df774[_0x1a5b8b(0x10a)],_0x4df774[_0x1a5b8b(0x118)](_0x1a5b8b(0x111)),_0x585a11[_0x1a5b8b(0x122)],_0x50e7b2),_0x56eb95=Date[_0x1a5b8b(0x113)]()-_0x317ae8;return{'ok':!![],'data':{'result':_0xd93ecb,'elapsed':_0x56eb95},'message':'data\x20'+_0x585a11['command']+_0x1a5b8b(0x109)+_0x56eb95+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a60_0x1d86f3=a60_0x23d3;(function(_0x45538e,_0xa53b6d){const _0x3434f7=a60_0x23d3,_0x14c8ff=_0x45538e();while(!![]){try{const _0x2105e3=-parseInt(_0x3434f7(0x11c))/0x1*(-parseInt(_0x3434f7(0x108))/0x2)+parseInt(_0x3434f7(0xf2))/0x3+parseInt(_0x3434f7(0x114))/0x4*(-parseInt(_0x3434f7(0x10f))/0x5)+parseInt(_0x3434f7(0x121))/0x6*(parseInt(_0x3434f7(0x129))/0x7)+parseInt(_0x3434f7(0x11e))/0x8+-parseInt(_0x3434f7(0x126))/0x9*(parseInt(_0x3434f7(0xff))/0xa)+-parseInt(_0x3434f7(0x106))/0xb*(parseInt(_0x3434f7(0xfa))/0xc);if(_0x2105e3===_0xa53b6d)break;else _0x14c8ff['push'](_0x14c8ff['shift']());}catch(_0x39525c){_0x14c8ff['push'](_0x14c8ff['shift']());}}}(a60_0x3b88,0x47596));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a60_0x23d3(_0x83caa8,_0x21a995){_0x83caa8=_0x83caa8-0xef;const _0x3b8849=a60_0x3b88();let _0x23d37b=_0x3b8849[_0x83caa8];return _0x23d37b;}import{CliErrors}from'../../errors.js';const BACKEND_PATH=a60_0x1d86f3(0x102);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x5d2498,input:_0x1371c6,dryRun:_0x290c98}){const _0x386895=a60_0x1d86f3;validateInput(_0x1371c6);const _0x37f9aa=normalizeBusinessGroup(_0x1371c6[_0x386895(0x107)]),_0x43430c=await getDatasetDetail(_0x1371c6['code']),_0x45c6cd=resolveBusinessGroupDataset(_0x43430c,_0x1371c6[_0x386895(0xfb)]),_0x27aa41=loadCurrentBusinessGroup(_0x43430c,_0x45c6cd);assertExpectedBusinessGroup(_0x27aa41,_0x1371c6[_0x386895(0xf1)]);const _0x3006a5=buildBackendPayload(_0x5d2498,_0x45c6cd,_0x37f9aa),_0x48c159=_0x27aa41!==_0x37f9aa;let _0x4c1da1;if(_0x48c159&&!_0x290c98){await updateErBusinessGroup(_0x3006a5);const _0x2a6d1e=await getDatasetDetail(_0x45c6cd[_0x386895(0xfb)]),_0x3f16ac=resolveBusinessGroupDataset(_0x2a6d1e,_0x45c6cd[_0x386895(0xfb)]),_0x3cd155=loadCurrentBusinessGroup(_0x2a6d1e,_0x3f16ac);if(_0x3cd155!==_0x37f9aa)throw CliErrors[_0x386895(0x120)](_0x386895(0x10a),'Expected\x20'+JSON[_0x386895(0xf4)](_0x37f9aa)+_0x386895(0xfc)+JSON[_0x386895(0xf4)](_0x3cd155)+'.');_0x4c1da1={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x3cd155}};}else!_0x48c159&&(_0x4c1da1={'verified':!![],'status':_0x386895(0x10c),'afterReadback':{'businessGroup':_0x27aa41}});const _0x3e1d37={'operation':_0x386895(0x112),'appCode':_0x5d2498,'selector':{'code':_0x45c6cd[_0x386895(0xfb)]},'dataset':_0x45c6cd,'before':{'businessGroup':_0x27aa41},'after':{'businessGroup':_0x37f9aa},'changed':_0x48c159,'dryRun':_0x290c98,'submitted':_0x48c159&&!_0x290c98,'backend':{'method':_0x386895(0x113),'path':BACKEND_PATH,'payload':_0x3006a5},..._0x4c1da1?{'verification':_0x4c1da1}:{},'warnings':[]};return{'ok':!![],'data':_0x3e1d37,'message':_0x48c159?_0x290c98?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x45c6cd[_0x386895(0xfb)]:_0x386895(0x128)+_0x45c6cd[_0x386895(0xfb)]:_0x386895(0x105)+_0x45c6cd[_0x386895(0xfb)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a60_0x1d86f3(0x100),'risk':a60_0x1d86f3(0x103),'flags':[CODE_FLAG,{'name':'business-group','type':a60_0x1d86f3(0x115),'required':!![],'description':a60_0x1d86f3(0xf3)},{'name':a60_0x1d86f3(0x101),'type':a60_0x1d86f3(0x115),'required':![],'description':a60_0x1d86f3(0x116)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d5c9e){validateInput(readBusinessGroupUpdateInput(_0x1d5c9e));},async 'dryRun'(_0x186f9d){const _0x3aeded=a60_0x1d86f3,_0x578c4f=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x186f9d[_0x3aeded(0x110)],'input':readBusinessGroupUpdateInput(_0x186f9d),'dryRun':!![]});return{'method':_0x3aeded(0x113),'url':BACKEND_PATH,'body':_0x578c4f['data'][_0x3aeded(0x11d)][_0x3aeded(0xef)],'description':_0x578c4f[_0x3aeded(0x117)],..._0x578c4f['data']};},async 'execute'(_0x200287){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x200287['appCode'],'input':readBusinessGroupUpdateInput(_0x200287),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x421e52){const _0x30e0a7=a60_0x1d86f3,_0x360740=_0x421e52['str']('expect-business-group');return{'code':trim(_0x421e52['str'](_0x30e0a7(0xfb))),'businessGroup':_0x421e52['str']('business-group'),'expectBusinessGroup':_0x360740===undefined||_0x360740===''?undefined:_0x360740};}function validateInput(_0x51dad4){const _0x157e5a=a60_0x1d86f3;if(!trim(_0x51dad4[_0x157e5a(0xfb)]))throw CliErrors['validation'](_0x157e5a(0x123));if(_0x51dad4[_0x157e5a(0x107)]===undefined)throw CliErrors[_0x157e5a(0x11f)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x32ca6f,_0x5528bc){const _0x1663fa=a60_0x1d86f3,_0x15ebb9=asPlainObject(_0x32ca6f[_0x1663fa(0x125)]),_0x52a859=asPlainObject(_0x32ca6f[_0x1663fa(0x109)]),_0x59f7f0=resolveSourceType(_0x32ca6f,_0x15ebb9,_0x52a859),_0xbac595=firstString(_0x32ca6f['modelCode'],_0x32ca6f['code'],_0x15ebb9['datasetCode'],_0x5528bc)||_0x5528bc;return{'id':firstNumber(_0x32ca6f[_0x1663fa(0xf9)],_0x32ca6f['id'],_0x15ebb9[_0x1663fa(0xfd)])??firstString(_0x32ca6f[_0x1663fa(0xf9)],_0x32ca6f['id'],_0x15ebb9[_0x1663fa(0xfd)])??null,'code':_0xbac595,'name':firstString(_0x32ca6f['name'],_0x15ebb9[_0x1663fa(0xf8)],_0x15ebb9[_0x1663fa(0x111)])||null,'sourceType':_0x59f7f0};}function resolveSourceType(_0x2c10db,_0x38e829,_0x1743a7){const _0x43e230=a60_0x1d86f3,_0xc51e57=firstString(_0x2c10db['source'],_0x2c10db[_0x43e230(0x10e)],_0x38e829[_0x43e230(0x127)],_0x38e829[_0x43e230(0x10e)])?.[_0x43e230(0x119)]()[_0x43e230(0x11b)]();if(_0xc51e57==='DB_TABLE'||_0xc51e57===_0x43e230(0xf5))return _0xc51e57;if(Object['keys'](_0x1743a7)[_0x43e230(0xf0)]>0x0)return'DB_TABLE';throw CliErrors[_0x43e230(0x11f)](_0x43e230(0x122));}function loadCurrentBusinessGroup(_0x351b4a,_0x522d95){const _0x6210e6=a60_0x1d86f3,_0x29e6e0=readBusinessGroupFromDatasetDetail(_0x351b4a,_0x522d95[_0x6210e6(0x10e)]);if(_0x29e6e0[_0x6210e6(0xf7)])return normalizeBusinessGroup(_0x29e6e0[_0x6210e6(0xfe)]);if(_0x522d95[_0x6210e6(0x10e)]===_0x6210e6(0xf5))return'';throw CliErrors['validation']('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x6210e6(0x124));}function readBusinessGroupFromDatasetDetail(_0x2160c5,_0x2a63b6){const _0x3e42f7=a60_0x1d86f3,_0x1b7fe4=asPlainObject(_0x2160c5[_0x3e42f7(0x125)]),_0x246e43=firstPresent(_0x2160c5[_0x3e42f7(0x107)]);if(_0x246e43[_0x3e42f7(0xf7)])return _0x246e43;const _0x32c9e5=firstPresent(_0x1b7fe4['businessGroup']);if(_0x32c9e5[_0x3e42f7(0xf7)])return _0x32c9e5;if(_0x2a63b6===_0x3e42f7(0x10d))return{'found':![]};const _0x3bed35=readBusinessGroupFromExtend(_0x2160c5[_0x3e42f7(0x11a)]);if(_0x3bed35[_0x3e42f7(0xf7)])return _0x3bed35;return readBusinessGroupFromExtend(_0x1b7fe4['extend']);}function readBusinessGroupFromExtend(_0x4eef1d){const _0x48453f=a60_0x1d86f3;if(_0x4eef1d===undefined||_0x4eef1d===null||_0x4eef1d==='')return{'found':![]};if(typeof _0x4eef1d===_0x48453f(0x115))try{const _0xde0cc3=JSON[_0x48453f(0x10b)](_0x4eef1d);return readBusinessGroupFromExtend(_0xde0cc3);}catch{return{'found':![]};}const _0x1197a8=asPlainObject(_0x4eef1d);if(Object['prototype']['hasOwnProperty']['call'](_0x1197a8,'businessGroup'))return{'found':!![],'value':_0x1197a8[_0x48453f(0x107)]};return{'found':![]};}function firstPresent(..._0x19b189){for(const _0x246822 of _0x19b189){if(_0x246822!==undefined&&_0x246822!==null)return{'found':!![],'value':_0x246822};}return{'found':![]};}function assertExpectedBusinessGroup(_0x41183b,_0xb32a82){const _0x35e8f0=a60_0x1d86f3;if(_0xb32a82===undefined)return;const _0x4e2a70=normalizeBusinessGroup(_0xb32a82);if(_0x41183b!==_0x4e2a70)throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x35e8f0(0xf4)](_0x4e2a70)+_0x35e8f0(0xfc)+JSON[_0x35e8f0(0xf4)](_0x41183b));}function buildBackendPayload(_0xfe2925,_0x42823a,_0x1c3599){const _0x4c6626=a60_0x1d86f3;return{'appCode':_0xfe2925,'datasetCode':_0x42823a[_0x4c6626(0xfb)],'businessGroup':_0x1c3599};}function normalizeBusinessGroup(_0x368068){if(_0x368068===undefined||_0x368068===null)return'';return String(_0x368068)['trim']();}function a60_0x3b88(){const _0x32d1e8=['message','isArray','trim','extend','toUpperCase','440wCFbZY','backend','3502760kJHbmM','validation','apiError','271344LLoqwr','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','--code\x20is\x20required','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','dataset','54VBEMQx','source','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','28LPiUDc','payload','length','expectBusinessGroup','541740QnvgcB','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','stringify','METADATA','number','found','datasetName','modelId','3108NBYGyI','code',',\x20actual\x20','datasetId','value','51650VQMNXc','Update\x20business\x20scenario\x20group','expect-business-group','/smartapi/question/er-config/business-group/edit','write','object','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','41503dqUsNv','businessGroup','2362gXdYTy','dbtableConfig','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','parse','unchanged','DB_TABLE','sourceType','235Xdzvka','appCode','name','update','POST','1576MXYjMw','string','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'];a60_0x3b88=function(){return _0x32d1e8;};return a60_0x3b88();}function asPlainObject(_0x40c8fe){const _0x1d2bab=a60_0x1d86f3;if(!_0x40c8fe||typeof _0x40c8fe!==_0x1d2bab(0x104)||Array[_0x1d2bab(0x118)](_0x40c8fe))return{};return _0x40c8fe;}function firstString(..._0x9c7123){const _0x2cf441=a60_0x1d86f3;for(const _0x2263a4 of _0x9c7123){if(typeof _0x2263a4==='string'&&_0x2263a4[_0x2cf441(0x119)]())return _0x2263a4['trim']();if(typeof _0x2263a4===_0x2cf441(0xf6)&&Number['isFinite'](_0x2263a4))return String(_0x2263a4);}return undefined;}function firstNumber(..._0x5ba204){const _0x126e16=a60_0x1d86f3;for(const _0xbd0b0a of _0x5ba204){if(typeof _0xbd0b0a===_0x126e16(0xf6)&&Number['isFinite'](_0xbd0b0a))return _0xbd0b0a;if(typeof _0xbd0b0a===_0x126e16(0x115)&&_0xbd0b0a[_0x126e16(0x119)]()&&Number['isFinite'](Number(_0xbd0b0a)))return Number(_0xbd0b0a);}return null;}function trim(_0x1c5781){const _0x4dbd87=a60_0x1d86f3;return String(_0x1c5781||'')[_0x4dbd87(0x119)]();}
|
|
1
|
+
function a60_0x414f(_0xf6550c,_0x401601){_0xf6550c=_0xf6550c-0xb8;const _0x185862=a60_0x1858();let _0x414fba=_0x185862[_0xf6550c];return _0x414fba;}const a60_0x4834ea=a60_0x414f;(function(_0x3498ca,_0x2fb158){const _0xf58325=a60_0x414f,_0x1b4d8a=_0x3498ca();while(!![]){try{const _0x39faf8=parseInt(_0xf58325(0xd0))/0x1+-parseInt(_0xf58325(0xbd))/0x2+parseInt(_0xf58325(0xcd))/0x3+-parseInt(_0xf58325(0xda))/0x4+-parseInt(_0xf58325(0xea))/0x5+-parseInt(_0xf58325(0xc7))/0x6*(parseInt(_0xf58325(0xe1))/0x7)+parseInt(_0xf58325(0xe0))/0x8;if(_0x39faf8===_0x2fb158)break;else _0x1b4d8a['push'](_0x1b4d8a['shift']());}catch(_0x1e7f45){_0x1b4d8a['push'](_0x1b4d8a['shift']());}}}(a60_0x1858,0xb3425));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a60_0x4834ea(0xc0);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x33b75a,input:_0xef260f,dryRun:_0x19dfbe}){const _0x271ba1=a60_0x4834ea;validateInput(_0xef260f);const _0x31d225=normalizeBusinessGroup(_0xef260f[_0x271ba1(0xd6)]),_0x33d03d=await getDatasetDetail(_0xef260f['code']),_0x354d17=resolveBusinessGroupDataset(_0x33d03d,_0xef260f[_0x271ba1(0xe5)]),_0x573894=loadCurrentBusinessGroup(_0x33d03d,_0x354d17);assertExpectedBusinessGroup(_0x573894,_0xef260f['expectBusinessGroup']);const _0x3667d3=buildBackendPayload(_0x33b75a,_0x354d17,_0x31d225),_0x190a48=_0x573894!==_0x31d225;let _0x1bf71d;if(_0x190a48&&!_0x19dfbe){await updateErBusinessGroup(_0x3667d3);const _0x504d58=await getDatasetDetail(_0x354d17[_0x271ba1(0xe5)]),_0xaac352=resolveBusinessGroupDataset(_0x504d58,_0x354d17[_0x271ba1(0xe5)]),_0x523593=loadCurrentBusinessGroup(_0x504d58,_0xaac352);if(_0x523593!==_0x31d225)throw CliErrors['apiError'](_0x271ba1(0xf0),_0x271ba1(0xdb)+JSON[_0x271ba1(0xcb)](_0x31d225)+_0x271ba1(0xc6)+JSON['stringify'](_0x523593)+'.');_0x1bf71d={'verified':!![],'status':_0x271ba1(0xf1),'afterReadback':{'businessGroup':_0x523593}};}else!_0x190a48&&(_0x1bf71d={'verified':!![],'status':_0x271ba1(0xc9),'afterReadback':{'businessGroup':_0x573894}});const _0x18840d={'operation':'update','appCode':_0x33b75a,'selector':{'code':_0x354d17['code']},'dataset':_0x354d17,'before':{'businessGroup':_0x573894},'after':{'businessGroup':_0x31d225},'changed':_0x190a48,'dryRun':_0x19dfbe,'submitted':_0x190a48&&!_0x19dfbe,'backend':{'method':_0x271ba1(0xd9),'path':BACKEND_PATH,'payload':_0x3667d3},..._0x1bf71d?{'verification':_0x1bf71d}:{},'warnings':[]};return{'ok':!![],'data':_0x18840d,'message':_0x190a48?_0x19dfbe?_0x271ba1(0xde)+_0x354d17['code']:_0x271ba1(0xc5)+_0x354d17['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x354d17[_0x271ba1(0xe5)]};}export const datasetBusinessGroupUpdate={'service':a60_0x4834ea(0xed),'command':a60_0x4834ea(0xd2),'description':a60_0x4834ea(0xbe),'risk':a60_0x4834ea(0xe7),'flags':[CODE_FLAG,{'name':a60_0x4834ea(0xe4),'type':a60_0x4834ea(0xdc),'required':!![],'description':a60_0x4834ea(0xe6)},{'name':'expect-business-group','type':'string','required':![],'description':a60_0x4834ea(0xc3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ba608){validateInput(readBusinessGroupUpdateInput(_0x3ba608));},async 'dryRun'(_0x9a1bd6){const _0x332559=a60_0x4834ea,_0xce4f88=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x9a1bd6[_0x332559(0xdd)],'input':readBusinessGroupUpdateInput(_0x9a1bd6),'dryRun':!![]});return{'method':_0x332559(0xd9),'url':BACKEND_PATH,'body':_0xce4f88[_0x332559(0xf3)][_0x332559(0xef)][_0x332559(0xc2)],'description':_0xce4f88['message'],..._0xce4f88[_0x332559(0xf3)]};},async 'execute'(_0x58f318){const _0x1ed4f7=a60_0x4834ea;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x58f318[_0x1ed4f7(0xdd)],'input':readBusinessGroupUpdateInput(_0x58f318),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x11e133){const _0x2182dc=a60_0x4834ea,_0x2fb06d=_0x11e133['str'](_0x2182dc(0xc8));return{'code':trim(_0x11e133['str'](_0x2182dc(0xe5))),'businessGroup':_0x11e133[_0x2182dc(0xeb)](_0x2182dc(0xe4)),'expectBusinessGroup':_0x2fb06d===undefined||_0x2fb06d===''?undefined:_0x2fb06d};}function validateInput(_0x14a1d4){const _0x15003c=a60_0x4834ea;if(!trim(_0x14a1d4[_0x15003c(0xe5)]))throw CliErrors[_0x15003c(0xd5)](_0x15003c(0xc1));if(_0x14a1d4[_0x15003c(0xd6)]===undefined)throw CliErrors[_0x15003c(0xd5)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x182e3d,_0x4532c0){const _0x5df4cc=a60_0x4834ea,_0x556ec4=asPlainObject(_0x182e3d[_0x5df4cc(0xed)]),_0x49d79a=asPlainObject(_0x182e3d[_0x5df4cc(0xd1)]),_0x3e1abc=resolveSourceType(_0x182e3d,_0x556ec4,_0x49d79a),_0x3c8fc2=firstString(_0x182e3d['modelCode'],_0x182e3d['code'],_0x556ec4['datasetCode'],_0x4532c0)||_0x4532c0;return{'id':firstNumber(_0x182e3d[_0x5df4cc(0xe2)],_0x182e3d['id'],_0x556ec4[_0x5df4cc(0xb9)])??firstString(_0x182e3d[_0x5df4cc(0xe2)],_0x182e3d['id'],_0x556ec4['datasetId'])??null,'code':_0x3c8fc2,'name':firstString(_0x182e3d['name'],_0x556ec4[_0x5df4cc(0xba)],_0x556ec4[_0x5df4cc(0xec)])||null,'sourceType':_0x3e1abc};}function resolveSourceType(_0x21dd06,_0x4b3cbf,_0x55deca){const _0x20f7cf=a60_0x4834ea,_0x5e5d49=firstString(_0x21dd06[_0x20f7cf(0xe9)],_0x21dd06['sourceType'],_0x4b3cbf['source'],_0x4b3cbf['sourceType'])?.[_0x20f7cf(0xcc)]()[_0x20f7cf(0xbc)]();if(_0x5e5d49==='DB_TABLE'||_0x5e5d49===_0x20f7cf(0xf4))return _0x5e5d49;if(Object[_0x20f7cf(0xd8)](_0x55deca)[_0x20f7cf(0xdf)]>0x0)return _0x20f7cf(0xd7);throw CliErrors['validation'](_0x20f7cf(0xc4));}function loadCurrentBusinessGroup(_0x4c2d90,_0x4f16fc){const _0x2dcde4=a60_0x4834ea,_0x3221b5=readBusinessGroupFromDatasetDetail(_0x4c2d90,_0x4f16fc[_0x2dcde4(0xe3)]);if(_0x3221b5[_0x2dcde4(0xcf)])return normalizeBusinessGroup(_0x3221b5['value']);if(_0x4f16fc[_0x2dcde4(0xe3)]===_0x2dcde4(0xf4))return'';throw CliErrors[_0x2dcde4(0xd5)](_0x2dcde4(0xca),_0x2dcde4(0xce));}function readBusinessGroupFromDatasetDetail(_0x1985ad,_0x5459e1){const _0x486497=a60_0x4834ea,_0xf188c5=asPlainObject(_0x1985ad['dataset']),_0x444bc3=firstPresent(_0x1985ad[_0x486497(0xd6)]);if(_0x444bc3['found'])return _0x444bc3;const _0x399695=firstPresent(_0xf188c5[_0x486497(0xd6)]);if(_0x399695['found'])return _0x399695;if(_0x5459e1===_0x486497(0xd7))return{'found':![]};const _0x177728=readBusinessGroupFromExtend(_0x1985ad[_0x486497(0xee)]);if(_0x177728[_0x486497(0xcf)])return _0x177728;return readBusinessGroupFromExtend(_0xf188c5[_0x486497(0xee)]);}function readBusinessGroupFromExtend(_0x4202f1){const _0x5badd0=a60_0x4834ea;if(_0x4202f1===undefined||_0x4202f1===null||_0x4202f1==='')return{'found':![]};if(typeof _0x4202f1==='string')try{const _0x313d3d=JSON[_0x5badd0(0xd4)](_0x4202f1);return readBusinessGroupFromExtend(_0x313d3d);}catch{return{'found':![]};}const _0x5bd0cb=asPlainObject(_0x4202f1);if(Object['prototype'][_0x5badd0(0xd3)][_0x5badd0(0xf2)](_0x5bd0cb,_0x5badd0(0xd6)))return{'found':!![],'value':_0x5bd0cb['businessGroup']};return{'found':![]};}function a60_0x1858(){const _0x2721d1=['sourceType','business-group','code','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it','write','isFinite','source','2119635mFoJet','str','name','dataset','extend','backend','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','matched','call','data','METADATA','isArray','datasetId','datasetName','Expectation\x20mismatch\x20at\x20businessGroup','toUpperCase','1498290iaOhQp','Update\x20business\x20scenario\x20group','number','/smartapi/question/er-config/business-group/edit','--code\x20is\x20required','payload','Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20',',\x20actual\x20','4569012WTEoyJ','expect-business-group','unchanged','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','stringify','trim','1102941TeEdak','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','found','580812hOmsPv','dbtableConfig','business-group-update','hasOwnProperty','parse','validation','businessGroup','DB_TABLE','keys','POST','3833204SnVNJS','Expected\x20','string','appCode','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','length','21429288ggfitT','7ygqvmL','modelId'];a60_0x1858=function(){return _0x2721d1;};return a60_0x1858();}function firstPresent(..._0x9a53ed){for(const _0x2b80e6 of _0x9a53ed){if(_0x2b80e6!==undefined&&_0x2b80e6!==null)return{'found':!![],'value':_0x2b80e6};}return{'found':![]};}function assertExpectedBusinessGroup(_0x169fcc,_0x12c40d){const _0x599ad2=a60_0x4834ea;if(_0x12c40d===undefined)return;const _0x58a5aa=normalizeBusinessGroup(_0x12c40d);if(_0x169fcc!==_0x58a5aa)throw CliErrors[_0x599ad2(0xd5)](_0x599ad2(0xbb),_0x599ad2(0xdb)+JSON[_0x599ad2(0xcb)](_0x58a5aa)+_0x599ad2(0xc6)+JSON[_0x599ad2(0xcb)](_0x169fcc));}function buildBackendPayload(_0x3c4fc5,_0x13c27d,_0x3125e0){const _0x4931ad=a60_0x4834ea;return{'appCode':_0x3c4fc5,'datasetCode':_0x13c27d[_0x4931ad(0xe5)],'businessGroup':_0x3125e0};}function normalizeBusinessGroup(_0x48806a){const _0x4055c8=a60_0x4834ea;if(_0x48806a===undefined||_0x48806a===null)return'';return String(_0x48806a)[_0x4055c8(0xcc)]();}function asPlainObject(_0x30ab4d){const _0x1c0ee2=a60_0x4834ea;if(!_0x30ab4d||typeof _0x30ab4d!=='object'||Array[_0x1c0ee2(0xb8)](_0x30ab4d))return{};return _0x30ab4d;}function firstString(..._0x23fcb5){const _0x4a06f4=a60_0x4834ea;for(const _0x3e9041 of _0x23fcb5){if(typeof _0x3e9041==='string'&&_0x3e9041[_0x4a06f4(0xcc)]())return _0x3e9041['trim']();if(typeof _0x3e9041===_0x4a06f4(0xbf)&&Number[_0x4a06f4(0xe8)](_0x3e9041))return String(_0x3e9041);}return undefined;}function firstNumber(..._0x4ba9c5){const _0x202153=a60_0x4834ea;for(const _0x55eb26 of _0x4ba9c5){if(typeof _0x55eb26==='number'&&Number[_0x202153(0xe8)](_0x55eb26))return _0x55eb26;if(typeof _0x55eb26===_0x202153(0xdc)&&_0x55eb26[_0x202153(0xcc)]()&&Number[_0x202153(0xe8)](Number(_0x55eb26)))return Number(_0x55eb26);}return null;}function trim(_0x1819fe){const _0x3a8996=a60_0x4834ea;return String(_0x1819fe||'')[_0x3a8996(0xcc)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3587cb=a61_0x231c;(function(_0x3dcb06,_0x328015){const _0x5b6423=a61_0x231c,_0x1b942b=_0x3dcb06();while(!![]){try{const _0x450230=-parseInt(_0x5b6423(0x197))/0x1*(-parseInt(_0x5b6423(0x1a7))/0x2)+parseInt(_0x5b6423(0x1b4))/0x3*(-parseInt(_0x5b6423(0x1b0))/0x4)+parseInt(_0x5b6423(0x19c))/0x5*(parseInt(_0x5b6423(0x1a2))/0x6)+-parseInt(_0x5b6423(0x1a6))/0x7+parseInt(_0x5b6423(0x1ae))/0x8+parseInt(_0x5b6423(0x1ac))/0x9*(-parseInt(_0x5b6423(0x195))/0xa)+-parseInt(_0x5b6423(0x1a1))/0xb;if(_0x450230===_0x328015)break;else _0x1b942b['push'](_0x1b942b['shift']());}catch(_0x3920c7){_0x1b942b['push'](_0x1b942b['shift']());}}}(a61_0x43b8,0x64a2c));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x3587cb(0x1b3),'filter':a61_0x3587cb(0x194),'getOne':a61_0x3587cb(0x1b8)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x4fc3eb){const _0x5e1e42=a61_0x3587cb;return _0x4fc3eb==null?'':String(_0x4fc3eb)[_0x5e1e42(0x1b7)]();}function getDatasetCode(_0x5d2b3e){const _0x16f72b=a61_0x3587cb;return valueToString(_0x5d2b3e[_0x16f72b(0x1aa)]??_0x5d2b3e[_0x16f72b(0x1a5)]??_0x5d2b3e['dataset']?.[_0x16f72b(0x198)]);}function getDatasetName(_0x3538ee){const _0x39af4a=a61_0x3587cb;return valueToString(_0x3538ee[_0x39af4a(0x1af)]??_0x3538ee[_0x39af4a(0x1b1)]?.[_0x39af4a(0x1a0)])||_0x39af4a(0x1ba);}function getDatasetSource(_0x460faa){const _0x1d8d42=a61_0x3587cb;return valueToString(_0x460faa['source']??_0x460faa[_0x1d8d42(0x1b1)]?.[_0x1d8d42(0x19d)])[_0x1d8d42(0x1a4)]();}function getDbtableConfig(_0x35bea0){const _0x1c8c55=a61_0x3587cb,_0xb5c27c=_0x35bea0[_0x1c8c55(0x1a8)]??_0x35bea0['dbtable'];return _0xb5c27c&&typeof _0xb5c27c===_0x1c8c55(0x1b9)?_0xb5c27c:{};}function a61_0x231c(_0x45e2fe,_0x5b4b10){_0x45e2fe=_0x45e2fe-0x194;const _0x43b8c1=a61_0x43b8();let _0x231c58=_0x43b8c1[_0x45e2fe];return _0x231c58;}export function isDbTableBackedDataset(_0x2c730f){const _0x56bd17=a61_0x3587cb,_0x1689e5=getDatasetSource(_0x2c730f);if(_0x1689e5===_0x56bd17(0x19b))return![];const _0x5ed6b2=getDbtableConfig(_0x2c730f),_0x4aebb9=_0x5ed6b2[_0x56bd17(0x199)]??_0x5ed6b2['id'],_0x2110d0=valueToString(_0x5ed6b2['tableName']??_0x2c730f[_0x56bd17(0x1b2)]??_0x2c730f[_0x56bd17(0x1b1)]?.[_0x56bd17(0x1b2)]);return _0x4aebb9!==undefined&&_0x4aebb9!==null&&_0x2110d0['length']>0x0;}function a61_0x43b8(){const _0x3cfe35=['\x20类型,没有可用于\x20','datasetName','7514892KIrxRe','587094sGAuNx','filter','toUpperCase','modelCode','1413307CVMRqn','4vLHyFg','dbtableConfig','\x20是\x20','code','join','9KQzEje','\x20的\x20DB_TABLE\x20数据源上下文。','3366040WXLRLr','name','219016DpcxWk','dataset','tableName','lovrabet','21xTDTbO','validation','UNKNOWN','trim','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','object','unknown','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','SQL\x20schema\x20validation','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','395170wWDDfE','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','405036EEOiqJ','datasetCode','dbId','当前数据集\x20\x22','METADATA','25GJoFjK','sourceType','getOne'];a61_0x43b8=function(){return _0x3cfe35;};return a61_0x43b8();}export function filterDbTableBackedDatasets(_0x1f4069){return _0x1f4069['filter'](_0x501211=>isDbTableBackedDataset(_0x501211));}export function buildDbTableBackedRequirementMessage(_0xc31bdd,_0x30a9e5=a61_0x3587cb(0x1bc)){const _0xb5b40f=a61_0x3587cb,_0x26594f=getDatasetSource(_0xc31bdd)||_0xb5b40f(0x1b6),_0x56ee7d=getDatasetName(_0xc31bdd),_0x203f7c=getDatasetCode(_0xc31bdd),_0x9a64dc=_0x203f7c?'\x20('+_0x203f7c+')':'';return[_0xb5b40f(0x19a)+_0x56ee7d+'\x22'+_0x9a64dc+_0xb5b40f(0x1a9)+_0x26594f+_0xb5b40f(0x19f)+_0x30a9e5+_0xb5b40f(0x1ad),_0xb5b40f(0x196),_0xb5b40f(0x1bd),_0xb5b40f(0x1bb)+RUNTIME_DATA_ACCESS_COMMANDS[_0xb5b40f(0x1a3)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0xb5b40f(0x19e)]+'。'][_0xb5b40f(0x1ab)]('\x20');}export function assertDatasetIsDbTableBacked(_0x1877e1,_0x5cbaf6){const _0x5b8c57=a61_0x3587cb;if(!isDbTableBackedDataset(_0x1877e1))throw CliErrors[_0x5b8c57(0x1b5)](buildDbTableBackedRequirementMessage(_0x1877e1,_0x5cbaf6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x402f96=a62_0xc902;(function(_0x7c4f0c,_0x4bdf40){const _0x53b9ef=a62_0xc902,_0x488f06=_0x7c4f0c();while(!![]){try{const _0x143b11=-parseInt(_0x53b9ef(0x20f))/0x1*(-parseInt(_0x53b9ef(0x215))/0x2)+parseInt(_0x53b9ef(0x210))/0x3*(-parseInt(_0x53b9ef(0x218))/0x4)+parseInt(_0x53b9ef(0x220))/0x5+-parseInt(_0x53b9ef(0x1f1))/0x6*(parseInt(_0x53b9ef(0x221))/0x7)+parseInt(_0x53b9ef(0x213))/0x8*(parseInt(_0x53b9ef(0x21e))/0x9)+-parseInt(_0x53b9ef(0x214))/0xa*(parseInt(_0x53b9ef(0x21f))/0xb)+-parseInt(_0x53b9ef(0x201))/0xc*(-parseInt(_0x53b9ef(0x1ff))/0xd);if(_0x143b11===_0x4bdf40)break;else _0x488f06['push'](_0x488f06['shift']());}catch(_0x4293d3){_0x488f06['push'](_0x488f06['shift']());}}}(a62_0x384c,0x8f5a7));function a62_0xc902(_0x2ff215,_0x20c09f){_0x2ff215=_0x2ff215-0x1f0;const _0x384c73=a62_0x384c();let _0xc9022f=_0x384c73[_0x2ff215];return _0xc9022f;}import{deleteDataset,listDatasets}from'../../core/api-client.js';function a62_0x384c(){const _0x1b5cff=['Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','5268wcaeMB','source','name','Would\x20delete\x20','filter','Dataset\x20id','relationPages','expected-count','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','Deleted\x20','\x20failed','id=','dbId','push','1Dsjplf','3uyqnhO','\x20dataset(s)','dbid','16snAfUF','20TIyZbY','943348OCHncy','confirm','/smartapi/dataset/delete-dataset','4443320YBanXU','high-risk-write','tableName','message','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','map','3703977WGVBVN','4710882fBCgLE','182260htAZEU','14bTIBsg','delete','\x20dataset(s);\x20','num','number','length','2305338QyzdNr','code','dbid=','bool','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dataset','dbtableConfig','str','validation','description','Matched\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','isArray','appCode','58981lpucXF'];a62_0x384c=function(){return _0x1b5cff;};return a62_0x384c();}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_0x402f96(0x225),'description':a62_0x402f96(0x206)},DBID_FLAG={'name':'dbid','type':a62_0x402f96(0x225),'description':a62_0x402f96(0x1f5)},CONFIRM_FLAG={'name':a62_0x402f96(0x216),'type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':a62_0x402f96(0x208),'type':a62_0x402f96(0x225),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a62_0x402f96(0x1f6),'command':a62_0x402f96(0x222),'description':a62_0x402f96(0x200),'risk':a62_0x402f96(0x219),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x197e54){const _0x2732b2=a62_0x402f96,_0x44794f=_0x197e54['num']('id'),_0x32c21d=_0x197e54[_0x2732b2(0x1f8)](_0x2732b2(0x1f2)),_0x148431=_0x197e54[_0x2732b2(0x224)](_0x2732b2(0x212)),_0x1d8bb4=[_0x44794f>0x0,Boolean(_0x32c21d),_0x148431>0x0][_0x2732b2(0x205)](Boolean);if(_0x1d8bb4[_0x2732b2(0x1f0)]===0x0)throw CliErrors[_0x2732b2(0x1f9)](_0x2732b2(0x1fc));if(_0x1d8bb4[_0x2732b2(0x1f0)]>0x1)throw CliErrors['validation']('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x329142){const _0x220899=a62_0x402f96,_0x1c7881=await resolveTargets(_0x329142);return{'method':'POST','url':_0x220899(0x217),'body':{'appCode':_0x329142['appCode'],'count':_0x1c7881[_0x220899(0x1f0)],'datasets':_0x1c7881},'description':_0x220899(0x204)+_0x1c7881[_0x220899(0x1f0)]+_0x220899(0x209)};},async 'execute'(_0x20676e){const _0x383254=a62_0x402f96;if(!_0x20676e[_0x383254(0x1f4)](_0x383254(0x216)))throw CliErrors['validation']('--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x366373=await resolveTargets(_0x20676e),_0x36453a=[],_0x460ec5=[];for(const _0x435202 of _0x366373){try{await deleteDataset(_0x20676e[_0x383254(0x1fe)],_0x435202['id']),_0x36453a[_0x383254(0x20e)](_0x435202);}catch(_0x4f0fcc){_0x460ec5['push']({..._0x435202,'error':_0x4f0fcc instanceof Error?_0x4f0fcc[_0x383254(0x21b)]:String(_0x4f0fcc)});}}if(_0x460ec5[_0x383254(0x1f0)]>0x0)return{'ok':![],'data':{'requested':_0x366373['length'],'deletedCount':_0x36453a[_0x383254(0x1f0)],'failedCount':_0x460ec5[_0x383254(0x1f0)],'deleted':_0x36453a,'failed':_0x460ec5},'message':_0x383254(0x20a)+_0x36453a[_0x383254(0x1f0)]+'/'+_0x366373[_0x383254(0x1f0)]+_0x383254(0x223)+_0x460ec5['length']+_0x383254(0x20b)};return{'ok':!![],'data':{'requested':_0x366373[_0x383254(0x1f0)],'deletedCount':_0x36453a[_0x383254(0x1f0)],'deleted':_0x36453a},'message':'Deleted\x20'+_0x36453a['length']+_0x383254(0x211)};}};async function resolveTargets(_0x3329fd){const _0x4c0840=a62_0x402f96,_0x414128=_0x3329fd[_0x4c0840(0x224)]('id'),_0x15b313=_0x3329fd[_0x4c0840(0x1f8)]('code'),_0x5d701a=_0x3329fd[_0x4c0840(0x224)](_0x4c0840(0x212));let _0x2e10d6;_0x15b313?(_0x2e10d6=await listDatasets(_0x3329fd[_0x4c0840(0x1fe)],{'code':_0x15b313}),_0x2e10d6=_0x2e10d6[_0x4c0840(0x205)](_0x30975b=>_0x30975b[_0x4c0840(0x1f2)]===_0x15b313)):(_0x2e10d6=await listDatasets(_0x3329fd[_0x4c0840(0x1fe)]),_0x414128>0x0&&(_0x2e10d6=_0x2e10d6[_0x4c0840(0x205)](_0x687a1f=>_0x687a1f['id']===_0x414128)),_0x5d701a>0x0&&(_0x2e10d6=_0x2e10d6[_0x4c0840(0x205)](_0x23cf2f=>_0x23cf2f[_0x4c0840(0x1f7)]?.[_0x4c0840(0x20d)]===_0x5d701a)));const _0xa97d=_0x2e10d6[_0x4c0840(0x21d)](normalizeTarget);if(_0xa97d['length']===0x0){const _0x51f495=_0x15b313||(_0x414128>0x0?_0x4c0840(0x20c)+_0x414128:_0x4c0840(0x1f3)+_0x5d701a);throw CliErrors[_0x4c0840(0x1f9)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x51f495+'.');}const _0xf674b0=_0x3329fd['num'](_0x4c0840(0x208));if(_0xf674b0>0x0&&_0xa97d['length']!==_0xf674b0)throw CliErrors[_0x4c0840(0x1f9)](_0x4c0840(0x1fb)+_0xa97d[_0x4c0840(0x1f0)]+_0x4c0840(0x21c)+_0xf674b0+'.');return _0xa97d;}function normalizeTarget(_0x4abbfb){const _0x4517bd=a62_0x402f96,_0x741af3=_0x4abbfb[_0x4517bd(0x1f7)]??{};return{'id':_0x4abbfb['id'],'code':_0x4abbfb[_0x4517bd(0x1f2)],'name':_0x4abbfb[_0x4517bd(0x203)],'description':_0x4abbfb[_0x4517bd(0x1fa)],'source':_0x4abbfb[_0x4517bd(0x202)],'dbId':_0x741af3['dbId'],'dbName':_0x741af3['dbName'],'tableName':_0x741af3[_0x4517bd(0x21a)],'relatedPageCount':Array[_0x4517bd(0x1fd)](_0x4abbfb[_0x4517bd(0x207)])?_0x4abbfb[_0x4517bd(0x207)]['length']:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x16940c=a63_0x5a02;function a63_0x5a02(_0x2353f9,_0x2690ef){_0x2353f9=_0x2353f9-0x1a0;const _0x3526e7=a63_0x3526();let _0x5a02f5=_0x3526e7[_0x2353f9];return _0x5a02f5;}(function(_0x1bf508,_0x5ea7df){const _0x505317=a63_0x5a02,_0x27a951=_0x1bf508();while(!![]){try{const _0x115f75=parseInt(_0x505317(0x1c3))/0x1*(-parseInt(_0x505317(0x1be))/0x2)+parseInt(_0x505317(0x1ae))/0x3*(-parseInt(_0x505317(0x1af))/0x4)+parseInt(_0x505317(0x1d8))/0x5+-parseInt(_0x505317(0x1b3))/0x6*(-parseInt(_0x505317(0x1d3))/0x7)+parseInt(_0x505317(0x1a7))/0x8*(-parseInt(_0x505317(0x1f2))/0x9)+parseInt(_0x505317(0x1cb))/0xa+parseInt(_0x505317(0x1db))/0xb;if(_0x115f75===_0x5ea7df)break;else _0x27a951['push'](_0x27a951['shift']());}catch(_0x2003c5){_0x27a951['push'](_0x27a951['shift']());}}}(a63_0x3526,0x329f2));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x2d26eb){const _0x4c7f47=a63_0x5a02;if(_0x2d26eb[_0x4c7f47(0x1e9)])return null;const _0x2c7f12=Boolean(_0x2d26eb[_0x4c7f47(0x1e6)]!==undefined||_0x2d26eb[_0x4c7f47(0x1df)]!==undefined);let _0x145345={};if(!_0x2c7f12&&typeof _0x2d26eb[_0x4c7f47(0x1b0)]===_0x4c7f47(0x1bd))try{_0x145345=JSON[_0x4c7f47(0x1f0)](_0x2d26eb[_0x4c7f47(0x1b0)]);}catch{}const _0x1c882f=_0x2c7f12?_0x2d26eb[_0x4c7f47(0x1a2)]:_0x2d26eb[_0x4c7f47(0x1c0)],_0x38c052=_0x2c7f12?_0x2d26eb['displayName']:_0x2d26eb['name'],_0x9316f2=_0x2c7f12?_0x2d26eb[_0x4c7f47(0x1df)]:_0x2d26eb[_0x4c7f47(0x1c4)]||_0x2d26eb[_0x4c7f47(0x1e5)],_0x5a26b1=_0x2c7f12?_0x2d26eb[_0x4c7f47(0x1a3)]===!![]:_0x145345[_0x4c7f47(0x1a3)]===!![],_0x471ff6=_0x2c7f12?_0x2d26eb[_0x4c7f47(0x1d4)]===!![]:_0x145345['required']===!![],_0x3a2146=_0x2c7f12?_0x2d26eb[_0x4c7f47(0x1e2)]??null:_0x145345[_0x4c7f47(0x1e2)]??null,_0x4d1062={'name':_0x1c882f,'displayName':_0x38c052||_0x1c882f,'type':_0x9316f2,'dbType':_0x2d26eb['dbType'],'pk':_0x5a26b1,'required':_0x471ff6,'deprecated':_0x2d26eb[_0x4c7f47(0x1b5)]===!![],'description':_0x2d26eb[_0x4c7f47(0x1aa)]||undefined};return Array[_0x4c7f47(0x1cc)](_0x3a2146)&&_0x3a2146[_0x4c7f47(0x1b4)]>0x0&&(_0x4d1062[_0x4c7f47(0x1e2)]=_0x3a2146),_0x4d1062;}function parseJsonMaybe(_0x5a9e49){const _0x463892=a63_0x5a02;if(typeof _0x5a9e49!==_0x463892(0x1bd))return _0x5a9e49;try{return JSON[_0x463892(0x1f0)](_0x5a9e49);}catch{return _0x5a9e49;}}function normalizeOperationEntry(_0x30ecfb,_0x28d7d6){const _0x523ae0=a63_0x5a02;if(!_0x28d7d6||typeof _0x28d7d6!==_0x523ae0(0x1ea))return null;if(!_0x28d7d6['method']||!_0x28d7d6['path'])return null;const _0x24d43a={'name':_0x30ecfb,'method':_0x28d7d6[_0x523ae0(0x1e1)],'path':_0x28d7d6[_0x523ae0(0x1e0)]};if(_0x28d7d6[_0x523ae0(0x1a0)])_0x24d43a[_0x523ae0(0x1a0)]=_0x28d7d6[_0x523ae0(0x1a0)];if(_0x28d7d6[_0x523ae0(0x1a4)]!=null){const _0x391299=parseJsonMaybe(_0x28d7d6[_0x523ae0(0x1a4)]);_0x24d43a[_0x523ae0(0x1a4)]=_0x391299;}if(_0x28d7d6[_0x523ae0(0x1bf)]!=null){const _0x18effe=parseJsonMaybe(_0x28d7d6['responseBody']);_0x24d43a['responseBody']=_0x18effe;}if(_0x28d7d6[_0x523ae0(0x1b1)]!=null)_0x24d43a[_0x523ae0(0x1b1)]=_0x28d7d6['beforeScriptId'];if(_0x28d7d6['afterScriptId']!=null)_0x24d43a['afterScriptId']=_0x28d7d6['afterScriptId'];if(Array['isArray'](_0x28d7d6[_0x523ae0(0x1d1)]))_0x24d43a[_0x523ae0(0x1d1)]=_0x28d7d6[_0x523ae0(0x1d1)];if(Array[_0x523ae0(0x1cc)](_0x28d7d6['responseFields']))_0x24d43a[_0x523ae0(0x1d7)]=_0x28d7d6[_0x523ae0(0x1d7)];return _0x24d43a;}function summarizeDbtable(_0x5557ff){const _0x22c262=a63_0x5a02,_0xdb77b6={},_0x2ad296=[_0x22c262(0x1ab),_0x22c262(0x1bb),_0x22c262(0x1b9),_0x22c262(0x1ef),_0x22c262(0x1a3),_0x22c262(0x1d2),_0x22c262(0x1c7),'createTimeField',_0x22c262(0x1a8),_0x22c262(0x1c9),_0x22c262(0x1d0),'modifierIdField',_0x22c262(0x1e4),_0x22c262(0x1cf),_0x22c262(0x1a5)];for(const _0x48b41d of _0x2ad296){if(_0x5557ff[_0x48b41d]!==undefined)_0xdb77b6[_0x48b41d]=_0x5557ff[_0x48b41d];}return typeof _0xdb77b6['allFields']==='string'&&_0xdb77b6[_0x22c262(0x1d2)]['length']>0x0&&(_0xdb77b6[_0x22c262(0x1eb)]=_0xdb77b6['allFields'][_0x22c262(0x1da)](',')[_0x22c262(0x1c5)](_0x4ba5ac=>_0x4ba5ac[_0x22c262(0x1b8)]())[_0x22c262(0x1dd)](Boolean)),_0xdb77b6;}function normalizeRelatedPages(_0x176d09){const _0x1a0ac9=a63_0x5a02;if(!Array[_0x1a0ac9(0x1cc)](_0x176d09))return[];return _0x176d09[_0x1a0ac9(0x1dd)](_0x4de430=>_0x4de430&&typeof _0x4de430===_0x1a0ac9(0x1ea))[_0x1a0ac9(0x1c5)](_0x8169e0=>({'id':_0x8169e0['id'],'type':_0x8169e0[_0x1a0ac9(0x1c4)],'code':_0x8169e0[_0x1a0ac9(0x1c0)],'title':_0x8169e0[_0x1a0ac9(0x1ca)],'deleted':_0x8169e0[_0x1a0ac9(0x1e9)]===!![]}));}function a63_0x3526(){const _0x21d552=['labelField','creatorNameField','requestFields','allFields','553AMexuy','required','dataset','indexes','responseFields','1176865ELWlEl','formatRules','split','3328028QHXiyN','properties','filter','toDatasetName','doType','path','method','options','str','modifierNameField','dataType','displayName','toTableName','main_sub','deleted','object','allFieldNames','fromField','columnCodeListWithDeleted','tableComment','datasetKey','parse','toDatasetCode','5823QeduHv','cardinality','push','bizRelationType','host','source','name','pkField','requestBody','dblinkInfoDTO','modelCode','3336LzFGNj','updateTimeField','doVersion','description','dbId','toFieldLabel','operations','699InbTSO','2892OmEIOr','extend','beforeScriptId','relatedPageInfoList','3996qLwlnb','length','deprecated','fields','read','trim','tableName','relations','dbName','alias','string','5884VghDmq','responseBody','code','detail','toField','46rSZHiE','type','map','dbtableConfig','logicField','sourceType','creatorIdField','title','1904010zdaYNa','isArray','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','relationId'];a63_0x3526=function(){return _0x21d552;};return a63_0x3526();}export const datasetDetail={'service':a63_0x16940c(0x1d5),'command':a63_0x16940c(0x1c1),'description':a63_0x16940c(0x1cd),'risk':a63_0x16940c(0x1b7),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x16940c(0x1bc),'type':a63_0x16940c(0x1bd),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x49a92d){const _0x5bdff9=a63_0x16940c,_0x29e970=await getDatasetDetail(_0x49a92d[_0x5bdff9(0x1e3)](_0x5bdff9(0x1c0))),_0x427a1e=Array[_0x5bdff9(0x1cc)](_0x29e970[_0x5bdff9(0x1b6)])?_0x29e970[_0x5bdff9(0x1b6)]:Array[_0x5bdff9(0x1cc)](_0x29e970['properties'])?_0x29e970[_0x5bdff9(0x1dc)]:[],_0x321b79=_0x427a1e[_0x5bdff9(0x1c5)](_0x35f786=>normalizeField(_0x35f786))[_0x5bdff9(0x1dd)](_0xae19f6=>_0xae19f6!==null),_0x4df135=_0x29e970[_0x5bdff9(0x1ad)]??{},_0x496cde=[];for(const [_0x4037f8,_0x4f7d63]of Object['entries'](_0x4df135)){const _0x54f125=normalizeOperationEntry(_0x4037f8,_0x4f7d63);if(_0x54f125)_0x496cde[_0x5bdff9(0x1f4)](_0x54f125);}const _0x3a4537=_0x29e970[_0x5bdff9(0x1c6)]??{},_0x4d583d=_0x29e970[_0x5bdff9(0x1d5)]??{},_0x4850be=_0x3a4537[_0x5bdff9(0x1ab)]!=null?{'id':_0x3a4537['dbId'],'name':_0x3a4537[_0x5bdff9(0x1bb)]??null}:undefined;let _0x3998fd;return typeof _0x29e970[_0x5bdff9(0x1b0)]===_0x5bdff9(0x1bd)&&(_0x3998fd=parseJsonMaybe(_0x29e970[_0x5bdff9(0x1b0)])),{'ok':!![],'data':{'id':_0x29e970['modelId']??_0x29e970['id'],'name':_0x29e970[_0x5bdff9(0x1a2)],'code':_0x29e970[_0x5bdff9(0x1a6)]||_0x29e970[_0x5bdff9(0x1c0)],'doVersion':_0x29e970[_0x5bdff9(0x1a9)],'description':_0x29e970[_0x5bdff9(0x1aa)]||_0x4d583d[_0x5bdff9(0x1ee)]||undefined,'source':_0x29e970[_0x5bdff9(0x1a1)]||_0x4d583d[_0x5bdff9(0x1c8)],'table':_0x3a4537['tableName']||_0x4d583d[_0x5bdff9(0x1b9)],'datasetKey':_0x3a4537[_0x5bdff9(0x1ef)],'pk':_0x3a4537[_0x5bdff9(0x1a3)],'db':_0x4850be,'dbtable':summarizeDbtable(_0x3a4537),'fields':_0x321b79,'operations':_0x496cde,'indexes':Array['isArray'](_0x4d583d[_0x5bdff9(0x1d6)])?_0x4d583d[_0x5bdff9(0x1d6)]:[],'relations':Array[_0x5bdff9(0x1cc)](_0x29e970['relations'])?_0x29e970[_0x5bdff9(0x1ba)][_0x5bdff9(0x1c5)](_0x1c6ac2=>({..._0x1c6ac2['relationId']!=null?{'relationId':_0x1c6ac2[_0x5bdff9(0x1ce)]}:{},'fromDataset':_0x29e970[_0x5bdff9(0x1a2)],'fromCode':_0x29e970[_0x5bdff9(0x1a6)]||_0x29e970['code'],'fromTable':_0x3a4537[_0x5bdff9(0x1b9)]||_0x4d583d[_0x5bdff9(0x1b9)],'fromField':_0x1c6ac2[_0x5bdff9(0x1ec)],'toDataset':_0x1c6ac2[_0x5bdff9(0x1de)],'toCode':_0x1c6ac2[_0x5bdff9(0x1f1)],'toTable':_0x1c6ac2[_0x5bdff9(0x1e7)],'toField':_0x1c6ac2[_0x5bdff9(0x1c2)],'labelField':_0x1c6ac2[_0x5bdff9(0x1ac)]||undefined,'cardinality':_0x1c6ac2[_0x5bdff9(0x1f3)]||undefined,'bizRelationType':_0x1c6ac2[_0x5bdff9(0x1f5)]==='main_sub'?_0x5bdff9(0x1e8):null})):[],'relatedPages':normalizeRelatedPages(_0x29e970[_0x5bdff9(0x1b2)]),...Array[_0x5bdff9(0x1cc)](_0x29e970[_0x5bdff9(0x1ed)])?{'columnCodeListWithDeleted':_0x29e970[_0x5bdff9(0x1ed)]}:{},'formatRules':Array[_0x5bdff9(0x1cc)](_0x29e970['formatRules'])?_0x29e970[_0x5bdff9(0x1d9)]:[],'validateRules':Array[_0x5bdff9(0x1cc)](_0x29e970['validateRules'])?_0x29e970['validateRules']:[],..._0x3998fd!==undefined?{'extend':_0x3998fd}:{},'stats':{'fieldCount':_0x321b79['length'],'operationCount':_0x496cde[_0x5bdff9(0x1b4)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x2282f9=a64_0xe2cb;(function(_0x4d18ee,_0x33ad7e){const _0x43e850=a64_0xe2cb,_0x565eb1=_0x4d18ee();while(!![]){try{const _0x17ffb7=-parseInt(_0x43e850(0xef))/0x1*(parseInt(_0x43e850(0xea))/0x2)+-parseInt(_0x43e850(0xf4))/0x3*(parseInt(_0x43e850(0xe1))/0x4)+-parseInt(_0x43e850(0xd3))/0x5+parseInt(_0x43e850(0xdd))/0x6+parseInt(_0x43e850(0xcf))/0x7+parseInt(_0x43e850(0xe3))/0x8*(parseInt(_0x43e850(0xd8))/0x9)+parseInt(_0x43e850(0xbc))/0xa;if(_0x17ffb7===_0x33ad7e)break;else _0x565eb1['push'](_0x565eb1['shift']());}catch(_0x40355f){_0x565eb1['push'](_0x565eb1['shift']());}}}(a64_0x1ebc,0x8d42f));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_0x2282f9(0xc4),{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':'Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.'}]]);function a64_0x1ebc(){const _0xcf4922=['--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','stringify','Patch\x20dataset\x20top-level\x20extend\x20safely','1nVYFrP','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','length','isArray','from','17157YAEovp','--code\x20is\x20required','join','str','datasetId','parse','get','/smartapi/dataset/update-driven-data','validation','modelCode','patch-json','483270nwqPAx','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','extend','value','Unsupported\x20patch\x20key:\x20','dbtableConfig','modelId','--patch-json','businessGroup','Allowed\x20keys:\x20','expect','trim','write','object','patch','\x20must\x20be\x20valid\x20JSON\x20object:\x20','hint','\x20must\x20be\x20a\x20JSON\x20object','appCode','7640290wMaMKE','code','string','Expected\x20','3817175njuFlp','expect-json','extend-update','data','Expectation\x20mismatch\x20at\x20extend.','14472EEdIwi','Updated\x20dataset\x20extend\x20(','--expect-json','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','5346936nLYccn','push','shape','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','456ZwOoBV','tableName','3544vyXLiL','entries','sort','keys','message','POST','dataset','1498578ITthmM','extend.'];a64_0x1ebc=function(){return _0xcf4922;};return a64_0x1ebc();}export function parseJsonObjectFlag(_0x497f64,_0x499183){const _0x13c802=a64_0x2282f9;if(!_0x497f64)return undefined;let _0x4e1d5d;try{_0x4e1d5d=JSON[_0x13c802(0xb6)](_0x497f64);}catch(_0xa3a9cb){const _0x346544=_0xa3a9cb instanceof Error?_0xa3a9cb[_0x13c802(0xe7)]:String(_0xa3a9cb);throw CliErrors[_0x13c802(0xb9)](_0x499183+_0x13c802(0xcb)+_0x346544);}if(!isPlainObject(_0x4e1d5d)||Array[_0x13c802(0xf2)](_0x4e1d5d))throw CliErrors[_0x13c802(0xb9)](_0x499183+_0x13c802(0xcd));return _0x4e1d5d;}export function validateExtendPatchKeys(_0x2ad7f5){const _0xded9c0=a64_0x2282f9,_0x894c3=Object[_0xded9c0(0xe6)](_0x2ad7f5);if(_0x894c3[_0xded9c0(0xf1)]===0x0)throw CliErrors['validation'](_0xded9c0(0xec));for(const _0x45e7cc of _0x894c3){const _0x4df17e=EXTEND_PATCH_REDIRECTS[_0xded9c0(0xb7)](_0x45e7cc);if(_0x4df17e)throw CliErrors['validation'](_0x4df17e['message'],_0x4df17e[_0xded9c0(0xcc)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x45e7cc))throw CliErrors[_0xded9c0(0xb9)](_0xded9c0(0xc0)+_0x45e7cc,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x49f98d=a64_0x2282f9,_0x5387f4=Array[_0x49f98d(0xf3)](MUTABLE_EXTEND_KEYS)[_0x49f98d(0xe5)]();return _0x5387f4[_0x49f98d(0xf1)]>0x0?_0x49f98d(0xc5)+_0x5387f4[_0x49f98d(0xb3)](',\x20'):_0x49f98d(0xe0);}export function applyExtendPatch(_0x5457fd,_0x2b9924){const _0x42faad=a64_0x2282f9;validateExtendPatchKeys(_0x2b9924);const _0x5cb965=deepClone(_0x5457fd),_0x3f7883=[];for(const [_0x1f18a8,_0x235ce6]of Object[_0x42faad(0xe4)](_0x2b9924)){const _0x27e685=_0x5cb965[_0x1f18a8],_0x2a0ba1=deepClone(_0x235ce6);!deepEqual(_0x27e685,_0x2a0ba1)&&(_0x5cb965[_0x1f18a8]=_0x2a0ba1,_0x3f7883[_0x42faad(0xde)](_0x42faad(0xeb)+_0x1f18a8));}return _0x3f7883[_0x42faad(0xe5)](),{'after':_0x5cb965,'changedPaths':_0x3f7883,'changed':_0x3f7883[_0x42faad(0xf1)]>0x0};}export function assertExpectation(_0x2c2edc,_0x3565db){const _0x38175d=a64_0x2282f9;if(!_0x3565db)return;for(const [_0x289050,_0x2adbf]of Object[_0x38175d(0xe4)](_0x3565db)){const _0xa4db20=_0x2c2edc[_0x289050];if(!deepEqual(_0xa4db20,_0x2adbf))throw CliErrors[_0x38175d(0xb9)](_0x38175d(0xd7)+_0x289050,_0x38175d(0xd2)+JSON[_0x38175d(0xed)](_0x2adbf)+',\x20actual\x20'+JSON[_0x38175d(0xed)](_0xa4db20));}}export async function buildDatasetExtendUpdateResult({appCode:_0x28cf7b,input:_0x47b04c,dryRun:_0x4b1348}){const _0x4a0230=a64_0x2282f9;validateInput(_0x47b04c);const _0x1a73a5=await getDatasetDetail(_0x47b04c['code']),_0x1b51f9=parseDatasetExtend(_0x1a73a5[_0x4a0230(0xbe)]),_0x4513e1=deepClone(_0x1b51f9[_0x4a0230(0xbf)]);assertExpectation(_0x4513e1,_0x47b04c[_0x4a0230(0xc6)]);const {after:_0x21ec70,changedPaths:_0x3b575d,changed:_0x5a8c21}=applyExtendPatch(_0x4513e1,_0x47b04c['patch']),_0x18e36f=summarizeDataset(_0x1a73a5,_0x47b04c[_0x4a0230(0xd0)]);return _0x5a8c21&&!_0x4b1348&&(_0x1a73a5[_0x4a0230(0xbe)]=serializeDatasetExtend(_0x21ec70,_0x1b51f9[_0x4a0230(0xdf)]),await updateDrivenData(_0x1a73a5)),{'ok':!![],'data':{'appCode':_0x28cf7b,'selector':{'code':_0x47b04c[_0x4a0230(0xd0)]},'dataset':_0x18e36f,'dryRun':_0x4b1348,'changed':_0x5a8c21,'changedPaths':_0x3b575d,'before':{'extend':_0x4513e1},'after':{'extend':_0x21ec70},'submitted':_0x5a8c21&&!_0x4b1348},'message':_0x5a8c21?_0x4b1348?_0x4a0230(0xdc)+_0x3b575d[_0x4a0230(0xb3)](',\x20')+')':_0x4a0230(0xd9)+_0x3b575d[_0x4a0230(0xb3)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}function a64_0xe2cb(_0xde4987,_0x323832){_0xde4987=_0xde4987-0xb2;const _0x1ebc75=a64_0x1ebc();let _0xe2cbd7=_0x1ebc75[_0xde4987];return _0xe2cbd7;}export const datasetExtendUpdate={'service':a64_0x2282f9(0xe9),'command':a64_0x2282f9(0xd5),'description':a64_0x2282f9(0xee),'risk':a64_0x2282f9(0xc8),'flags':[CODE_FLAG,{'name':a64_0x2282f9(0xbb),'type':a64_0x2282f9(0xd1),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a64_0x2282f9(0xd4),'type':a64_0x2282f9(0xd1),'required':![],'description':a64_0x2282f9(0xbd)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3c8e95){validateInput(readExtendUpdateInput(_0x3c8e95));},async 'dryRun'(_0x2481eb){const _0x4f80be=a64_0x2282f9,_0x3d388a=await buildDatasetExtendUpdateResult({'appCode':_0x2481eb[_0x4f80be(0xce)],'input':readExtendUpdateInput(_0x2481eb),'dryRun':!![]});return{'method':_0x4f80be(0xe8),'url':_0x4f80be(0xb8),'body':_0x3d388a[_0x4f80be(0xd6)],'description':_0x3d388a[_0x4f80be(0xe7)]};},async 'execute'(_0x16d3c0){return buildDatasetExtendUpdateResult({'appCode':_0x16d3c0['appCode'],'input':readExtendUpdateInput(_0x16d3c0),'dryRun':![]});}};function readExtendUpdateInput(_0x43b435){const _0xe7770b=a64_0x2282f9,_0x130025=trim(_0x43b435[_0xe7770b(0xb4)](_0xe7770b(0xd0))),_0x3dd107=parseJsonObjectFlag(_0x43b435[_0xe7770b(0xb4)](_0xe7770b(0xbb)),_0xe7770b(0xc3)),_0xb5a550=parseJsonObjectFlag(_0x43b435[_0xe7770b(0xb4)](_0xe7770b(0xd4)),_0xe7770b(0xda));return{'code':_0x130025,'patch':_0x3dd107||{},'expect':_0xb5a550};}function validateInput(_0x20f260){const _0x334314=a64_0x2282f9;if(!_0x20f260['code'])throw CliErrors[_0x334314(0xb9)](_0x334314(0xb2));validateExtendPatchKeys(_0x20f260[_0x334314(0xca)]);}function parseDatasetExtend(_0x53b4c0){const _0x5f1026=a64_0x2282f9;if(typeof _0x53b4c0===_0x5f1026(0xd1)){const _0x28942b=_0x53b4c0[_0x5f1026(0xc7)]();if(!_0x28942b)return{'value':{},'shape':_0x5f1026(0xd1)};let _0x5e81a3;try{_0x5e81a3=JSON[_0x5f1026(0xb6)](_0x28942b);}catch(_0x4af229){const _0x2836df=_0x4af229 instanceof Error?_0x4af229[_0x5f1026(0xe7)]:String(_0x4af229);throw CliErrors['validation'](_0x5f1026(0xdb)+_0x2836df);}if(!isPlainObject(_0x5e81a3)||Array[_0x5f1026(0xf2)](_0x5e81a3))throw CliErrors[_0x5f1026(0xb9)](_0x5f1026(0xf0));return{'value':_0x5e81a3,'shape':_0x5f1026(0xd1)};}if(_0x53b4c0===undefined||_0x53b4c0===null)return{'value':{},'shape':_0x5f1026(0xd1)};if(!isPlainObject(_0x53b4c0)||Array[_0x5f1026(0xf2)](_0x53b4c0))throw CliErrors[_0x5f1026(0xb9)](_0x5f1026(0xf0));return{'value':_0x53b4c0,'shape':'object'};}function serializeDatasetExtend(_0x311fdb,_0x220ca9){const _0x196372=a64_0x2282f9;return _0x220ca9===_0x196372(0xd1)?JSON[_0x196372(0xed)](_0x311fdb):_0x311fdb;}function summarizeDataset(_0x592f4b,_0x7078c8){const _0xb83c6a=a64_0x2282f9,_0x5797ab=isPlainObject(_0x592f4b[_0xb83c6a(0xe9)])?_0x592f4b[_0xb83c6a(0xe9)]:{},_0x613e6=isPlainObject(_0x592f4b[_0xb83c6a(0xc1)])?_0x592f4b['dbtableConfig']:{};return{'id':_0x592f4b[_0xb83c6a(0xc2)]??_0x592f4b['id']??_0x5797ab[_0xb83c6a(0xb5)]??null,'code':_0x592f4b[_0xb83c6a(0xba)]??_0x592f4b[_0xb83c6a(0xd0)]??_0x5797ab['datasetCode']??_0x7078c8,'name':_0x592f4b['name']??_0x5797ab['datasetName']??null,'table':_0x613e6['tableName']??_0x5797ab[_0xb83c6a(0xe2)]??null,'db':_0x613e6['dbName']??_0x613e6['dbId']??null};}function deepClone(_0x462a92){const _0x35e453=a64_0x2282f9;if(_0x462a92===undefined)return _0x462a92;return JSON[_0x35e453(0xb6)](JSON[_0x35e453(0xed)](_0x462a92));}function deepEqual(_0x12da0b,_0x25f446){const _0x2dafdb=a64_0x2282f9;return JSON[_0x2dafdb(0xed)](_0x12da0b)===JSON[_0x2dafdb(0xed)](_0x25f446);}function isPlainObject(_0x13a1eb){const _0x11cd17=a64_0x2282f9;return Boolean(_0x13a1eb)&&typeof _0x13a1eb===_0x11cd17(0xc9)&&!Array[_0x11cd17(0xf2)](_0x13a1eb);}function trim(_0x48cc92){const _0x9cda3f=a64_0x2282f9,_0xc96a75=String(_0x48cc92||'')[_0x9cda3f(0xc7)]();return _0xc96a75;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x56b673=a65_0x523e;(function(_0x437854,_0xba305f){const _0x5d9642=a65_0x523e,_0x8db4af=_0x437854();while(!![]){try{const _0x13833c=parseInt(_0x5d9642(0x1de))/0x1*(-parseInt(_0x5d9642(0x1bf))/0x2)+-parseInt(_0x5d9642(0x1eb))/0x3*(parseInt(_0x5d9642(0x1fc))/0x4)+-parseInt(_0x5d9642(0x1b5))/0x5+-parseInt(_0x5d9642(0x1f7))/0x6*(parseInt(_0x5d9642(0x1b3))/0x7)+parseInt(_0x5d9642(0x1cf))/0x8+-parseInt(_0x5d9642(0x1ca))/0x9*(-parseInt(_0x5d9642(0x1fd))/0xa)+parseInt(_0x5d9642(0x1f9))/0xb;if(_0x13833c===_0xba305f)break;else _0x8db4af['push'](_0x8db4af['shift']());}catch(_0x5255ea){_0x8db4af['push'](_0x8db4af['shift']());}}}(a65_0x316a,0xcc193));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',a65_0x56b673(0x1cc),'description',a65_0x56b673(0x202),a65_0x56b673(0x1f4),a65_0x56b673(0x1df),a65_0x56b673(0x1f3),a65_0x56b673(0x1c5),a65_0x56b673(0x1dc)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a65_0x56b673(0x201),a65_0x56b673(0x1f8),a65_0x56b673(0x1e4),'dbTypeScale',a65_0x56b673(0x1cd),a65_0x56b673(0x1e9),a65_0x56b673(0x1c7),a65_0x56b673(0x1b1),a65_0x56b673(0x1f5),a65_0x56b673(0x1fa)]);export function parseJsonObjectFlag(_0x422231,_0x3f7e00){const _0x1b7c7c=a65_0x56b673;if(!_0x422231)return undefined;let _0x5af98c;try{_0x5af98c=JSON[_0x1b7c7c(0x1db)](_0x422231);}catch(_0x53f539){const _0x2c35dd=_0x53f539 instanceof Error?_0x53f539[_0x1b7c7c(0x1b4)]:String(_0x53f539);throw CliErrors['validation'](_0x3f7e00+_0x1b7c7c(0x1d1)+_0x2c35dd);}if(!isPlainObject(_0x5af98c)||Array['isArray'](_0x5af98c))throw CliErrors[_0x1b7c7c(0x1e1)](_0x3f7e00+'\x20must\x20be\x20a\x20JSON\x20object');return _0x5af98c;}export function validatePatchKeys(_0x34b305){const _0x1433b4=a65_0x56b673,_0x57d583=Object['keys'](_0x34b305);if(_0x57d583[_0x1433b4(0x1e5)]===0x0)throw CliErrors[_0x1433b4(0x1e1)]('--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key');for(const _0x8bb3da of _0x57d583){if(FORBIDDEN_FIELD_KEYS[_0x1433b4(0x1c2)](_0x8bb3da))throw CliErrors['validation']('Forbidden\x20patch\x20key:\x20'+_0x8bb3da);if(!MUTABLE_FIELD_KEYS[_0x1433b4(0x1c2)](_0x8bb3da))throw CliErrors[_0x1433b4(0x1e1)]('Unsupported\x20patch\x20key:\x20'+_0x8bb3da,'Allowed\x20keys:\x20'+Array[_0x1433b4(0x1c1)](MUTABLE_FIELD_KEYS)[_0x1433b4(0x1f1)](',\x20'));}}export function applyFieldPatch(_0x257bf4,_0x17e9d7){const _0x444db4=a65_0x56b673;validatePatchKeys(_0x17e9d7);const _0x47a597=deepClone(_0x257bf4),_0x4c20a2=new Set();for(const [_0x1a95a0,_0xf191b7]of Object[_0x444db4(0x1bb)](_0x17e9d7)){const _0x8932b0=_0x47a597[_0x1a95a0],_0x10f680=mergePatchValue(_0x8932b0,_0xf191b7);!deepEqual(_0x8932b0,_0x10f680)&&(_0x47a597[_0x1a95a0]=_0x10f680,_0x4c20a2[_0x444db4(0x1b9)](_0x1a95a0),collectChangedPaths(_0x1a95a0,_0x8932b0,_0x10f680,_0x4c20a2));}return{'after':_0x47a597,'changedPaths':Array['from'](_0x4c20a2)[_0x444db4(0x1ea)](),'changed':_0x4c20a2[_0x444db4(0x1bd)]>0x0};}export function assertExpectation(_0x4338df,_0x1134df){const _0x574720=a65_0x56b673;if(!_0x1134df)return;for(const [_0xf4d4ba,_0x7580d2]of Object[_0x574720(0x1bb)](_0x1134df)){const _0x4d9ee5=_0x4338df[_0xf4d4ba];if(!deepEqual(_0x4d9ee5,_0x7580d2))throw CliErrors['validation'](_0x574720(0x1d2)+_0xf4d4ba,_0x574720(0x1ce)+JSON['stringify'](_0x7580d2)+_0x574720(0x1da)+JSON[_0x574720(0x1cb)](_0x4d9ee5));}}function a65_0x523e(_0x32e986,_0x5ceb41){_0x32e986=_0x32e986-0x1b1;const _0x316a4b=a65_0x316a();let _0x523efd=_0x316a4b[_0x32e986];return _0x523efd;}export async function buildDatasetFieldUpdateResult({appCode:_0x1ab942,input:_0x536d91,dryRun:_0x542dd9}){const _0x5d2459=a65_0x56b673;validateInput(_0x536d91);const _0x5472d4=await getDatasetDetail(_0x536d91[_0x5d2459(0x201)]),_0x48fe89=readFieldArray(_0x5472d4),_0x1b0a5e=_0x48fe89[_0x5d2459(0x1e6)](_0x136d17=>_0x136d17?.[_0x5d2459(0x1e0)]===_0x536d91[_0x5d2459(0x1c9)]);if(_0x1b0a5e<0x0)throw CliErrors[_0x5d2459(0x1e1)](_0x5d2459(0x1b2)+_0x536d91[_0x5d2459(0x1c9)]);const _0x1ae293=deepClone(_0x48fe89[_0x1b0a5e]);assertExpectation(_0x1ae293,_0x536d91[_0x5d2459(0x1d4)]);const {after:_0x2fcbb7,changedPaths:_0xbaba10,changed:_0x3e8bfe}=applyFieldPatch(_0x1ae293,_0x536d91[_0x5d2459(0x1d3)]),_0x340642=summarizeDataset(_0x5472d4,_0x536d91[_0x5d2459(0x201)]);return _0x3e8bfe&&!_0x542dd9&&(_0x48fe89[_0x1b0a5e]=_0x2fcbb7,await updateDrivenData(_0x5472d4)),{'ok':!![],'data':{'appCode':_0x1ab942,'selector':{'code':_0x536d91[_0x5d2459(0x201)]},'dataset':_0x340642,'field':{'id':_0x1ae293['id']??null,'name':_0x1ae293['name']},'dryRun':_0x542dd9,'changed':_0x3e8bfe,'changedPaths':_0xbaba10,'before':_0x1ae293,'after':_0x2fcbb7,'submitted':_0x3e8bfe&&!_0x542dd9},'message':_0x3e8bfe?_0x542dd9?'Dry-run:\x20dataset\x20field\x20'+_0x536d91['field']+_0x5d2459(0x1ed)+_0xbaba10[_0x5d2459(0x1f1)](',\x20')+')':_0x5d2459(0x1bc)+_0x536d91[_0x5d2459(0x1c9)]+'\x20('+_0xbaba10[_0x5d2459(0x1f1)](',\x20')+')':_0x5d2459(0x1d9)+_0x536d91['field']};}export const datasetFieldUpdate={'service':a65_0x56b673(0x1d8),'command':'field-update','description':a65_0x56b673(0x1d6),'risk':a65_0x56b673(0x1c4),'flags':[CODE_FLAG,{'name':a65_0x56b673(0x1c9),'type':a65_0x56b673(0x1be),'required':!![],'description':a65_0x56b673(0x1c3)},{'name':'patch-json','type':'string','required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a65_0x56b673(0x1c6),'type':a65_0x56b673(0x1be),'required':![],'description':a65_0x56b673(0x1fe)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21baa8){validateInput(readFieldUpdateInput(_0x21baa8));},async 'dryRun'(_0x20c08c){const _0xb9bafe=a65_0x56b673,_0x20f238=await buildDatasetFieldUpdateResult({'appCode':_0x20c08c[_0xb9bafe(0x1d0)],'input':readFieldUpdateInput(_0x20c08c),'dryRun':!![]});return{'method':_0xb9bafe(0x1e2),'url':'/smartapi/dataset/update-driven-data','body':_0x20f238[_0xb9bafe(0x1e3)],'description':_0x20f238[_0xb9bafe(0x1b4)]};},async 'execute'(_0xfbd119){const _0x21729f=a65_0x56b673;return buildDatasetFieldUpdateResult({'appCode':_0xfbd119[_0x21729f(0x1d0)],'input':readFieldUpdateInput(_0xfbd119),'dryRun':![]});}};function readFieldUpdateInput(_0x4891fa){const _0x27bd36=a65_0x56b673,_0x124b20=trim(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x201))),_0x4daeac=emptyToUndefined(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x1c9))),_0x41191d=parseJsonObjectFlag(_0x4891fa[_0x27bd36(0x1b6)](_0x27bd36(0x1b8)),_0x27bd36(0x1ff)),_0x4c82cb=parseJsonObjectFlag(_0x4891fa[_0x27bd36(0x1b6)]('expect-json'),_0x27bd36(0x1d5));return{'code':_0x124b20,'field':_0x4daeac||'','patch':_0x41191d||{},'expect':_0x4c82cb};}function validateInput(_0x4e61a0){const _0x28838c=a65_0x56b673;if(!_0x4e61a0[_0x28838c(0x201)])throw CliErrors[_0x28838c(0x1e1)](_0x28838c(0x1d7));if(!_0x4e61a0[_0x28838c(0x1c9)])throw CliErrors[_0x28838c(0x1e1)](_0x28838c(0x1f6));validatePatchKeys(_0x4e61a0['patch']);}function readFieldArray(_0x202731){const _0x501aaf=a65_0x56b673;if(Array['isArray'](_0x202731[_0x501aaf(0x1fb)]))return _0x202731['fields'];if(Array['isArray'](_0x202731[_0x501aaf(0x1e7)]))return _0x202731[_0x501aaf(0x1e7)];throw CliErrors['validation'](_0x501aaf(0x1b7));}function summarizeDataset(_0x552205,_0x33b344){const _0x25ee99=a65_0x56b673,_0x4ac56f=isPlainObject(_0x552205[_0x25ee99(0x1d8)])?_0x552205[_0x25ee99(0x1d8)]:{},_0x143f06=isPlainObject(_0x552205[_0x25ee99(0x1c0)])?_0x552205[_0x25ee99(0x1c0)]:{};return{'id':_0x552205[_0x25ee99(0x1ee)]??_0x552205['id']??_0x4ac56f[_0x25ee99(0x1f0)]??null,'code':_0x552205[_0x25ee99(0x1f2)]??_0x552205[_0x25ee99(0x201)]??_0x4ac56f[_0x25ee99(0x1dd)]??_0x33b344,'name':_0x552205['name']??_0x4ac56f[_0x25ee99(0x1c8)]??null,'table':_0x143f06[_0x25ee99(0x1e9)]??_0x4ac56f[_0x25ee99(0x1e9)]??null,'db':_0x143f06[_0x25ee99(0x1ec)]??_0x143f06[_0x25ee99(0x1ef)]??null};}function a65_0x316a(){const _0x45a4a1=['dbType','38033446pHptYw','systemRetain','fields','780XYAWRZ','6134090zqdNdO','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','--patch-json','trim','code','options','pkField','Field\x20not\x20found:\x20','380023bpgZav','message','1833025ogjlnm','str','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','patch-json','add','keys','entries','Updated\x20dataset\x20field\x20','size','string','3267042lUnAPd','dbtableConfig','from','has','Exact\x20raw\x20fields[].name\x20to\x20patch','write','chartRole','expect-json','deleted','datasetName','field','9wXieSB','stringify','displayName','dbFieldName','Expected\x20','930816xXKiYE','appCode','\x20must\x20be\x20valid\x20JSON\x20object:\x20','Expectation\x20mismatch\x20at\x20','patch','expect','--expect-json','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','--code\x20is\x20required','dataset','No\x20changes\x20for\x20dataset\x20field\x20',',\x20actual\x20','parse','deprecated','datasetCode','1HOUaHr','datetimeFormat','name','validation','POST','data','dbTypeLen','length','findIndex','properties','object','tableName','sort','19953wkGCLx','dbName','\x20would\x20change\x20(','modelId','dbId','datasetId','join','modelCode','defaultAggregation','required','autoIncrement','--field\x20is\x20required','6OaDVyc'];a65_0x316a=function(){return _0x45a4a1;};return a65_0x316a();}function mergePatchValue(_0x1c5af8,_0x4e88e2){if(isPlainObject(_0x1c5af8)&&isPlainObject(_0x4e88e2))return deepMerge(_0x1c5af8,_0x4e88e2);return deepClone(_0x4e88e2);}function deepMerge(_0x233255,_0x360473){const _0x2856ce=a65_0x56b673,_0x381819=deepClone(_0x233255);for(const [_0x381d4b,_0x33239c]of Object[_0x2856ce(0x1bb)](_0x360473)){_0x381819[_0x381d4b]=isPlainObject(_0x381819[_0x381d4b])&&isPlainObject(_0x33239c)?deepMerge(_0x381819[_0x381d4b],_0x33239c):deepClone(_0x33239c);}return _0x381819;}function collectChangedPaths(_0x1563e2,_0x3e2c5a,_0x4b92df,_0x396297){const _0x1499db=a65_0x56b673;if(!isPlainObject(_0x3e2c5a)||!isPlainObject(_0x4b92df))return;const _0x475145=new Set([...Object['keys'](_0x3e2c5a),...Object[_0x1499db(0x1ba)](_0x4b92df)]);for(const _0xda5854 of _0x475145){const _0x1e8b06=_0x3e2c5a[_0xda5854],_0x3cda49=_0x4b92df[_0xda5854];!deepEqual(_0x1e8b06,_0x3cda49)&&_0x396297['add'](_0x1563e2+'.'+_0xda5854);}}function deepClone(_0x18ce43){const _0x5ba6dc=a65_0x56b673;if(_0x18ce43===undefined)return _0x18ce43;return JSON[_0x5ba6dc(0x1db)](JSON[_0x5ba6dc(0x1cb)](_0x18ce43));}function deepEqual(_0x3e3c88,_0x5d3a03){const _0x921188=a65_0x56b673;return JSON[_0x921188(0x1cb)](_0x3e3c88)===JSON[_0x921188(0x1cb)](_0x5d3a03);}function isPlainObject(_0x1b342e){const _0x39dbc9=a65_0x56b673;return Boolean(_0x1b342e)&&typeof _0x1b342e===_0x39dbc9(0x1e8)&&!Array['isArray'](_0x1b342e);}function emptyToUndefined(_0x5aa4cc){const _0x49ae00=a65_0x56b673,_0x38b91e=String(_0x5aa4cc||'')[_0x49ae00(0x200)]();return _0x38b91e||undefined;}function trim(_0x52927d){return String(_0x52927d||'')['trim']();}
|
|
1
|
+
function a65_0x23fd(){const _0x53ccce=['Expectation\x20mismatch\x20at\x20','isArray','\x20would\x20change\x20(','data','116695luWoQz','keys','expect-json','/smartapi/dataset/update-driven-data','3833648raNYaj','sort','from','code','8596521GQedJL','datasetCode','datasetName','tableName','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','Field\x20not\x20found:\x20','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','properties','displayName','string','message','dbTypeScale','defaultAggregation','Allowed\x20keys:\x20','--expect-json','expect','trim','appCode','chartRole','dbTypeLen','field-update','dbFieldName','stringify','add','has','name','required','entries','datasetId','pkField','dbType','description','869536BtAzuB','write','autoIncrement','datetimeFormat','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field','modelCode','findIndex','536160VzmrkY','dbName','1572erMUkj','str','Forbidden\x20patch\x20key:\x20','patch','Unsupported\x20patch\x20key:\x20','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','\x20must\x20be\x20valid\x20JSON\x20object:\x20','join','4YvKuux','size','doType','Expected\x20','5537VBwQvk','options','validation','patch-json','systemRetain','--code\x20is\x20required','fields','No\x20changes\x20for\x20dataset\x20field\x20','parse','693470ycgPFB','deprecated','dataset','dbtableConfig','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','POST','--field\x20is\x20required'];a65_0x23fd=function(){return _0x53ccce;};return a65_0x23fd();}function a65_0x1af6(_0x735a53,_0x5c7af0){_0x735a53=_0x735a53-0xfd;const _0x23fd50=a65_0x23fd();let _0x1af690=_0x23fd50[_0x735a53];return _0x1af690;}const a65_0x3a8fc2=a65_0x1af6;(function(_0x8573f8,_0x4a4205){const _0x5dac16=a65_0x1af6,_0x2668d7=_0x8573f8();while(!![]){try{const _0xc2c928=-parseInt(_0x5dac16(0x13a))/0x1+parseInt(_0x5dac16(0x122))/0x2*(-parseInt(_0x5dac16(0x118))/0x3)+parseInt(_0x5dac16(0x110))/0x4+-parseInt(_0x5dac16(0x12f))/0x5+-parseInt(_0x5dac16(0x11a))/0x6*(-parseInt(_0x5dac16(0x126))/0x7)+-parseInt(_0x5dac16(0x13e))/0x8+parseInt(_0x5dac16(0x142))/0x9;if(_0xc2c928===_0x4a4205)break;else _0x2668d7['push'](_0x2668d7['shift']());}catch(_0x4ace0b){_0x2668d7['push'](_0x2668d7['shift']());}}}(a65_0x23fd,0x46410));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_0x3a8fc2(0x124),a65_0x3a8fc2(0x14a),a65_0x3a8fc2(0x10f),a65_0x3a8fc2(0x127),a65_0x3a8fc2(0x10a),a65_0x3a8fc2(0x113),a65_0x3a8fc2(0x14e),a65_0x3a8fc2(0x102),a65_0x3a8fc2(0x130)]),FORBIDDEN_FIELD_KEYS=new Set(['id','name',a65_0x3a8fc2(0x141),a65_0x3a8fc2(0x10e),a65_0x3a8fc2(0x103),a65_0x3a8fc2(0x14d),a65_0x3a8fc2(0x105),a65_0x3a8fc2(0x145),'deleted',a65_0x3a8fc2(0x10d),a65_0x3a8fc2(0x112),a65_0x3a8fc2(0x12a)]);export function parseJsonObjectFlag(_0x4edfa9,_0x401bf4){const _0x5a8444=a65_0x3a8fc2;if(!_0x4edfa9)return undefined;let _0xe96e48;try{_0xe96e48=JSON[_0x5a8444(0x12e)](_0x4edfa9);}catch(_0x54161e){const _0x1f3b54=_0x54161e instanceof Error?_0x54161e[_0x5a8444(0x14c)]:String(_0x54161e);throw CliErrors[_0x5a8444(0x128)](_0x401bf4+_0x5a8444(0x120)+_0x1f3b54);}if(!isPlainObject(_0xe96e48)||Array[_0x5a8444(0x137)](_0xe96e48))throw CliErrors[_0x5a8444(0x128)](_0x401bf4+'\x20must\x20be\x20a\x20JSON\x20object');return _0xe96e48;}export function validatePatchKeys(_0x42969a){const _0x3f251c=a65_0x3a8fc2,_0x4393fe=Object[_0x3f251c(0x13b)](_0x42969a);if(_0x4393fe['length']===0x0)throw CliErrors['validation'](_0x3f251c(0x11f));for(const _0x26554d of _0x4393fe){if(FORBIDDEN_FIELD_KEYS['has'](_0x26554d))throw CliErrors['validation'](_0x3f251c(0x11c)+_0x26554d);if(!MUTABLE_FIELD_KEYS[_0x3f251c(0x108)](_0x26554d))throw CliErrors[_0x3f251c(0x128)](_0x3f251c(0x11e)+_0x26554d,_0x3f251c(0xfd)+Array[_0x3f251c(0x140)](MUTABLE_FIELD_KEYS)[_0x3f251c(0x121)](',\x20'));}}export function applyFieldPatch(_0x58ed2a,_0x2c6542){const _0x5eee0b=a65_0x3a8fc2;validatePatchKeys(_0x2c6542);const _0x11633d=deepClone(_0x58ed2a),_0x36d78a=new Set();for(const [_0x363739,_0x293478]of Object[_0x5eee0b(0x10b)](_0x2c6542)){const _0x5b12b9=_0x11633d[_0x363739],_0x11defe=mergePatchValue(_0x5b12b9,_0x293478);!deepEqual(_0x5b12b9,_0x11defe)&&(_0x11633d[_0x363739]=_0x11defe,_0x36d78a[_0x5eee0b(0x107)](_0x363739),collectChangedPaths(_0x363739,_0x5b12b9,_0x11defe,_0x36d78a));}return{'after':_0x11633d,'changedPaths':Array[_0x5eee0b(0x140)](_0x36d78a)[_0x5eee0b(0x13f)](),'changed':_0x36d78a[_0x5eee0b(0x123)]>0x0};}export function assertExpectation(_0x1e0dd5,_0x1f511b){const _0x3dce80=a65_0x3a8fc2;if(!_0x1f511b)return;for(const [_0xc5005a,_0x41ad75]of Object[_0x3dce80(0x10b)](_0x1f511b)){const _0x2cdfb1=_0x1e0dd5[_0xc5005a];if(!deepEqual(_0x2cdfb1,_0x41ad75))throw CliErrors[_0x3dce80(0x128)](_0x3dce80(0x136)+_0xc5005a,_0x3dce80(0x125)+JSON[_0x3dce80(0x106)](_0x41ad75)+',\x20actual\x20'+JSON[_0x3dce80(0x106)](_0x2cdfb1));}}export async function buildDatasetFieldUpdateResult({appCode:_0x4111a6,input:_0x2f2213,dryRun:_0x28cad6}){const _0x28ddef=a65_0x3a8fc2;validateInput(_0x2f2213);const _0x23123c=await getDatasetDetail(_0x2f2213[_0x28ddef(0x141)]),_0x25f1e3=readFieldArray(_0x23123c),_0x44680c=_0x25f1e3[_0x28ddef(0x117)](_0x1acf9f=>_0x1acf9f?.['name']===_0x2f2213[_0x28ddef(0x115)]);if(_0x44680c<0x0)throw CliErrors[_0x28ddef(0x128)](_0x28ddef(0x147)+_0x2f2213[_0x28ddef(0x115)]);const _0x4d2adb=deepClone(_0x25f1e3[_0x44680c]);assertExpectation(_0x4d2adb,_0x2f2213[_0x28ddef(0xff)]);const {after:_0x58734f,changedPaths:_0x196e5a,changed:_0x556b6d}=applyFieldPatch(_0x4d2adb,_0x2f2213[_0x28ddef(0x11d)]),_0x24e834=summarizeDataset(_0x23123c,_0x2f2213[_0x28ddef(0x141)]);return _0x556b6d&&!_0x28cad6&&(_0x25f1e3[_0x44680c]=_0x58734f,await updateDrivenData(_0x23123c)),{'ok':!![],'data':{'appCode':_0x4111a6,'selector':{'code':_0x2f2213[_0x28ddef(0x141)]},'dataset':_0x24e834,'field':{'id':_0x4d2adb['id']??null,'name':_0x4d2adb[_0x28ddef(0x109)]},'dryRun':_0x28cad6,'changed':_0x556b6d,'changedPaths':_0x196e5a,'before':_0x4d2adb,'after':_0x58734f,'submitted':_0x556b6d&&!_0x28cad6},'message':_0x556b6d?_0x28cad6?'Dry-run:\x20dataset\x20field\x20'+_0x2f2213['field']+_0x28ddef(0x138)+_0x196e5a['join'](',\x20')+')':'Updated\x20dataset\x20field\x20'+_0x2f2213[_0x28ddef(0x115)]+'\x20('+_0x196e5a[_0x28ddef(0x121)](',\x20')+')':_0x28ddef(0x12d)+_0x2f2213[_0x28ddef(0x115)]};}export const datasetFieldUpdate={'service':a65_0x3a8fc2(0x131),'command':a65_0x3a8fc2(0x104),'description':a65_0x3a8fc2(0x148),'risk':a65_0x3a8fc2(0x111),'flags':[CODE_FLAG,{'name':'field','type':a65_0x3a8fc2(0x14b),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a65_0x3a8fc2(0x129),'type':a65_0x3a8fc2(0x14b),'required':!![],'description':a65_0x3a8fc2(0x133)},{'name':a65_0x3a8fc2(0x13c),'type':a65_0x3a8fc2(0x14b),'required':![],'description':a65_0x3a8fc2(0x146)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x58748b){validateInput(readFieldUpdateInput(_0x58748b));},async 'dryRun'(_0x56aea1){const _0x37daa6=a65_0x3a8fc2,_0x4f9791=await buildDatasetFieldUpdateResult({'appCode':_0x56aea1[_0x37daa6(0x101)],'input':readFieldUpdateInput(_0x56aea1),'dryRun':!![]});return{'method':_0x37daa6(0x134),'url':_0x37daa6(0x13d),'body':_0x4f9791[_0x37daa6(0x139)],'description':_0x4f9791[_0x37daa6(0x14c)]};},async 'execute'(_0x55f9da){return buildDatasetFieldUpdateResult({'appCode':_0x55f9da['appCode'],'input':readFieldUpdateInput(_0x55f9da),'dryRun':![]});}};function readFieldUpdateInput(_0x24aad7){const _0x4d1f36=a65_0x3a8fc2,_0x348868=trim(_0x24aad7[_0x4d1f36(0x11b)](_0x4d1f36(0x141))),_0xc5d2a8=emptyToUndefined(_0x24aad7['str'](_0x4d1f36(0x115))),_0x533267=parseJsonObjectFlag(_0x24aad7[_0x4d1f36(0x11b)](_0x4d1f36(0x129)),'--patch-json'),_0x122c53=parseJsonObjectFlag(_0x24aad7['str'](_0x4d1f36(0x13c)),_0x4d1f36(0xfe));return{'code':_0x348868,'field':_0xc5d2a8||'','patch':_0x533267||{},'expect':_0x122c53};}function validateInput(_0x2a6546){const _0x42bbd6=a65_0x3a8fc2;if(!_0x2a6546['code'])throw CliErrors[_0x42bbd6(0x128)](_0x42bbd6(0x12b));if(!_0x2a6546[_0x42bbd6(0x115)])throw CliErrors['validation'](_0x42bbd6(0x135));validatePatchKeys(_0x2a6546[_0x42bbd6(0x11d)]);}function readFieldArray(_0x24a8b4){const _0x4f536d=a65_0x3a8fc2;if(Array[_0x4f536d(0x137)](_0x24a8b4[_0x4f536d(0x12c)]))return _0x24a8b4[_0x4f536d(0x12c)];if(Array[_0x4f536d(0x137)](_0x24a8b4['properties']))return _0x24a8b4[_0x4f536d(0x149)];throw CliErrors[_0x4f536d(0x128)](_0x4f536d(0x114));}function summarizeDataset(_0x8efe0,_0x271a6e){const _0x2be37c=a65_0x3a8fc2,_0x169d78=isPlainObject(_0x8efe0[_0x2be37c(0x131)])?_0x8efe0[_0x2be37c(0x131)]:{},_0x4d7e05=isPlainObject(_0x8efe0[_0x2be37c(0x132)])?_0x8efe0[_0x2be37c(0x132)]:{};return{'id':_0x8efe0['modelId']??_0x8efe0['id']??_0x169d78[_0x2be37c(0x10c)]??null,'code':_0x8efe0[_0x2be37c(0x116)]??_0x8efe0[_0x2be37c(0x141)]??_0x169d78[_0x2be37c(0x143)]??_0x271a6e,'name':_0x8efe0[_0x2be37c(0x109)]??_0x169d78[_0x2be37c(0x144)]??null,'table':_0x4d7e05[_0x2be37c(0x145)]??_0x169d78[_0x2be37c(0x145)]??null,'db':_0x4d7e05[_0x2be37c(0x119)]??_0x4d7e05['dbId']??null};}function mergePatchValue(_0x34a9bf,_0xd09914){if(isPlainObject(_0x34a9bf)&&isPlainObject(_0xd09914))return deepMerge(_0x34a9bf,_0xd09914);return deepClone(_0xd09914);}function deepMerge(_0x6bb1c1,_0xf0fc3){const _0x876753=deepClone(_0x6bb1c1);for(const [_0x4f0aa4,_0x13575c]of Object['entries'](_0xf0fc3)){_0x876753[_0x4f0aa4]=isPlainObject(_0x876753[_0x4f0aa4])&&isPlainObject(_0x13575c)?deepMerge(_0x876753[_0x4f0aa4],_0x13575c):deepClone(_0x13575c);}return _0x876753;}function collectChangedPaths(_0x389e78,_0x537cac,_0x1b4882,_0x8ee87){const _0x3377b8=a65_0x3a8fc2;if(!isPlainObject(_0x537cac)||!isPlainObject(_0x1b4882))return;const _0x38af53=new Set([...Object['keys'](_0x537cac),...Object[_0x3377b8(0x13b)](_0x1b4882)]);for(const _0x5c1051 of _0x38af53){const _0x46136e=_0x537cac[_0x5c1051],_0x415e34=_0x1b4882[_0x5c1051];!deepEqual(_0x46136e,_0x415e34)&&_0x8ee87[_0x3377b8(0x107)](_0x389e78+'.'+_0x5c1051);}}function deepClone(_0x54a954){const _0x4b5d3d=a65_0x3a8fc2;if(_0x54a954===undefined)return _0x54a954;return JSON[_0x4b5d3d(0x12e)](JSON[_0x4b5d3d(0x106)](_0x54a954));}function deepEqual(_0x94b1a3,_0x154436){const _0x5a1dbf=a65_0x3a8fc2;return JSON[_0x5a1dbf(0x106)](_0x94b1a3)===JSON[_0x5a1dbf(0x106)](_0x154436);}function isPlainObject(_0x512c46){const _0x55a362=a65_0x3a8fc2;return Boolean(_0x512c46)&&typeof _0x512c46==='object'&&!Array[_0x55a362(0x137)](_0x512c46);}function emptyToUndefined(_0x547346){const _0xbf0674=a65_0x3a8fc2,_0x56bb3a=String(_0x547346||'')[_0xbf0674(0x100)]();return _0x56bb3a||undefined;}function trim(_0x5311b7){return String(_0x5311b7||'')['trim']();}
|