@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.10-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/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/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
|
-
(function(
|
|
1
|
+
function a52_0x3357(){const _0x2d5e74=['15411SYAceB','5909xZVIwc','6OnkIns','4536931VOnlVd','72PmjDNo','33NuehNO','45wpMiju','130MnouyN','3427884ekDlqn','7266328OeANHz','79330CONHkg','3334120VgffCC'];a52_0x3357=function(){return _0x2d5e74;};return a52_0x3357();}(function(_0x306ea7,_0x175035){const _0x3fd030=a52_0x213b,_0x588aea=_0x306ea7();while(!![]){try{const _0x87d624=parseInt(_0x3fd030(0x147))/0x1*(parseInt(_0x3fd030(0x14d))/0x2)+-parseInt(_0x3fd030(0x146))/0x3*(-parseInt(_0x3fd030(0x14a))/0x4)+-parseInt(_0x3fd030(0x145))/0x5+parseInt(_0x3fd030(0x148))/0x6*(parseInt(_0x3fd030(0x149))/0x7)+parseInt(_0x3fd030(0x143))/0x8+-parseInt(_0x3fd030(0x14c))/0x9*(parseInt(_0x3fd030(0x144))/0xa)+-parseInt(_0x3fd030(0x14b))/0xb*(parseInt(_0x3fd030(0x142))/0xc);if(_0x87d624===_0x175035)break;else _0x588aea['push'](_0x588aea['shift']());}catch(_0xfe4598){_0x588aea['push'](_0x588aea['shift']());}}}(a52_0x3357,0x72a0b));function a52_0x213b(_0x3930d3,_0x1e321c){_0x3930d3=_0x3930d3-0x142;const _0x3357aa=a52_0x3357();let _0x213ba2=_0x3357aa[_0x3930d3];return _0x213ba2;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x1eaafa=a53_0x496a;(function(_0x34825d,_0x2d5146){const _0x35105c=a53_0x496a,_0x34386c=_0x34825d();while(!![]){try{const _0x10ed73=-parseInt(_0x35105c(0x196))/0x1*(-parseInt(_0x35105c(0x194))/0x2)+-parseInt(_0x35105c(0x18e))/0x3+-parseInt(_0x35105c(0x18d))/0x4*(-parseInt(_0x35105c(0x191))/0x5)+parseInt(_0x35105c(0x18a))/0x6*(parseInt(_0x35105c(0x189))/0x7)+-parseInt(_0x35105c(0x195))/0x8+parseInt(_0x35105c(0x193))/0x9+parseInt(_0x35105c(0x198))/0xa;if(_0x10ed73===_0x2d5146)break;else _0x34386c['push'](_0x34386c['shift']());}catch(_0x4724a1){_0x34386c['push'](_0x34386c['shift']());}}}(a53_0x54ab,0x7ea6a));import{readScopedConfig}from'../../commands/config/shared.js';function a53_0x54ab(){const _0x5692f5=['1HCYvkc','global','999040udKVCx','7BvJspZ','41946CsAEQj','list','config','644xSPlHm','756831HwyxPS','bool','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','14555oMOfQa','read','3041217GAnsSt','1011914pKAuKD','5187176sLmmKY'];a53_0x54ab=function(){return _0x5692f5;};return a53_0x54ab();}import{readConfig}from'../../utils/config.js';async function execute(_0x2ce4cf){const _0x47d760=a53_0x496a,_0x5d5515=_0x2ce4cf[_0x47d760(0x18f)](_0x47d760(0x197))?readScopedConfig(_0x47d760(0x197)):readConfig();return{'ok':!![],'data':_0x5d5515};}function a53_0x496a(_0x393b82,_0x4bb663){_0x393b82=_0x393b82-0x189;const _0x54abe6=a53_0x54ab();let _0x496a5c=_0x54abe6[_0x393b82];return _0x496a5c;}export const configListDefinition={'service':a53_0x1eaafa(0x18c),'command':a53_0x1eaafa(0x18b),'description':'List\x20all\x20config\x20values','risk':a53_0x1eaafa(0x192),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x1eaafa(0x197),'type':'boolean','description':a53_0x1eaafa(0x190),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a54_0xcca46d=a54_0x21f4;(function(_0x3e73cc,_0x3cf2b5){const _0x3b5b2d=a54_0x21f4,_0x2887ac=_0x3e73cc();while(!![]){try{const _0x2d8f26=-parseInt(_0x3b5b2d(0x1e4))/0x1+-parseInt(_0x3b5b2d(0x1fa))/0x2+parseInt(_0x3b5b2d(0x1da))/0x3*(-parseInt(_0x3b5b2d(0x1d3))/0x4)+parseInt(_0x3b5b2d(0x1e6))/0x5+-parseInt(_0x3b5b2d(0x206))/0x6*(parseInt(_0x3b5b2d(0x1f5))/0x7)+-parseInt(_0x3b5b2d(0x1f0))/0x8+parseInt(_0x3b5b2d(0x1de))/0x9;if(_0x2d8f26===_0x3cf2b5)break;else _0x2887ac['push'](_0x2887ac['shift']());}catch(_0xeefb67){_0x2887ac['push'](_0x2887ac['shift']());}}}(a54_0x2ed2,0x8e8e2));function a54_0x21f4(_0x4adc19,_0x52e706){_0x4adc19=_0x4adc19-0x1d3;const _0x2ed226=a54_0x2ed2();let _0x21f45b=_0x2ed226[_0x4adc19];return _0x21f45b;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x177bf3){const _0x1a27dc=a54_0x21f4,_0x566850=_0x177bf3[_0x1a27dc(0x1f7)](_0x1a27dc(0x1f6)),_0x5c5963=_0x177bf3[_0x1a27dc(0x1f7)](_0x1a27dc(0x1e3));if(!_0x566850)throw CliErrors[_0x1a27dc(0x1d7)](_0x1a27dc(0x1fe),_0x1a27dc(0x1e1)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x5c5963===undefined||_0x5c5963==='')throw CliErrors['validation'](_0x1a27dc(0x1d8),_0x1a27dc(0x1e1)+CLI_BIN_NAME+_0x1a27dc(0x207));if(_0x5c5963[_0x1a27dc(0x1dd)]>0x1f4)throw CliErrors[_0x1a27dc(0x1d7)](_0x1a27dc(0x1ec));if(!isTopLevelConfigKey(_0x566850))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x566850+_0x1a27dc(0x1d4),_0x1a27dc(0x203)+getTopLevelConfigKeySummary());if(_0x566850===_0x1a27dc(0x1fb))throw CliErrors['validation'](_0x1a27dc(0x202));if(CONFIG_ENUM_VALUES[_0x566850]&&!CONFIG_ENUM_VALUES[_0x566850][_0x1a27dc(0x1df)](_0x5c5963))throw CliErrors[_0x1a27dc(0x1d7)]('Invalid\x20value\x20for\x20\x22'+_0x566850+_0x1a27dc(0x1f3)+CONFIG_ENUM_VALUES[_0x566850][_0x1a27dc(0x1ef)](',\x20'));if(_0x566850==='locale'&&!normalizeLocale(_0x5c5963))throw CliErrors[_0x1a27dc(0x1d7)](_0x1a27dc(0x1e7),_0x1a27dc(0x1e5));const _0x2f8310={'global':_0x177bf3['bool'](_0x1a27dc(0x1f9))},_0x3b63c1=resolveWriteScope(_0x2f8310),_0x4ab50c=readScopedConfig(_0x3b63c1);let _0x9a2840=_0x566850,_0x269ebb=_0x5c5963;_0x566850===_0x1a27dc(0x1ff)&&(_0x9a2840='appcode',delete _0x4ab50c[_0x1a27dc(0x1ff)]);_0x566850===_0x1a27dc(0x201)&&(_0x269ebb=normalizeLocale(_0x5c5963));if(_0x566850===_0x1a27dc(0x1dc)){_0x269ebb=normalizeEnv(_0x5c5963);if(!isProduction(_0x269ebb)&&!isDaily(_0x269ebb))throw CliErrors[_0x1a27dc(0x1d7)](_0x1a27dc(0x1fc),_0x1a27dc(0x205));}if(_0x566850===_0x1a27dc(0x1d5)){const _0x3ec88f=_0x4ab50c[_0x1a27dc(0x1ed)]&&typeof _0x4ab50c[_0x1a27dc(0x1ed)]===_0x1a27dc(0x200)?Object[_0x1a27dc(0x1f1)](_0x4ab50c[_0x1a27dc(0x1ed)]):[];if(_0x3ec88f['length']>0x0)throw CliErrors[_0x1a27dc(0x1d7)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x1a27dc(0x1d6)+CLI_BIN_NAME+_0x1a27dc(0x1eb)+_0x269ebb+_0x1a27dc(0x1e0)+CLI_BIN_NAME+_0x1a27dc(0x1f2));const _0x45f935=buildCanonicalProjectConfig({..._0x4ab50c},{'appCodes':[_0x269ebb],'env':typeof _0x4ab50c['env']===_0x1a27dc(0x1ea)?_0x4ab50c['env']:undefined});writeScopedConfig(_0x45f935,_0x3b63c1);const _0x120371=_0x3b63c1===_0x1a27dc(0x1f9)?_0x1a27dc(0x1f8):_0x1a27dc(0x1d9);return{'ok':!![],'message':'✓\x20'+_0x120371+_0x1a27dc(0x1db)+_0x269ebb+_0x1a27dc(0x1e9)};}_0x4ab50c[_0x9a2840]=_0x269ebb,writeScopedConfig(_0x4ab50c,_0x3b63c1);const _0x112581=_0x3b63c1===_0x1a27dc(0x1f9)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x112581+'\x20'+_0x9a2840+_0x1a27dc(0x1e2)+_0x269ebb};}function a54_0x2ed2(){const _0x31e9c5=['appcode','Use\x20`','validation','Missing\x20value.','Project','543qUQcBu','\x20appcode\x20set\x20to:\x20','env','length','34347726ACUTGV','includes','`,\x20`','Usage:\x20','\x20set\x20to:\x20','value','810100BQorrQ','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2915820kVsBET','Invalid\x20locale\x20value.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','string','\x20app\x20add\x20<name>\x20--appcode\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','apps','Config\x20value','join','9170840OOfZZx','keys','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','\x22.\x20Allowed:\x20','Set\x20a\x20config\x20value','7UHfjME','key','str','Global','global','910118VLfVYQ','riskLevel','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','config','Missing\x20key.','app','object','locale','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Settable\x20top-level\x20keys:\x20','set','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','5159346wkiJiO','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','12028yfGEjt','\x22\x20is\x20not\x20settable.'];a54_0x2ed2=function(){return _0x31e9c5;};return a54_0x2ed2();}export const configSetDefinition={'service':a54_0xcca46d(0x1fd),'command':a54_0xcca46d(0x204),'description':a54_0xcca46d(0x1f4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a54_0xcca46d(0x1e3),'type':'string','description':a54_0xcca46d(0x1ee),'required':!![]},{'name':'global','type':'boolean','description':a54_0xcca46d(0x1e8),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f3538,_0x2cb993){var _0xa35404=a55_0x1f74,_0x42026c=_0x4f3538();while(!![]){try{var _0x78d337=-parseInt(_0xa35404(0x17c))/0x1+-parseInt(_0xa35404(0x17d))/0x2*(parseInt(_0xa35404(0x183))/0x3)+parseInt(_0xa35404(0x17e))/0x4+parseInt(_0xa35404(0x17b))/0x5*(parseInt(_0xa35404(0x187))/0x6)+parseInt(_0xa35404(0x185))/0x7+parseInt(_0xa35404(0x17f))/0x8+-parseInt(_0xa35404(0x181))/0x9;if(_0x78d337===_0x2cb993)break;else _0x42026c['push'](_0x42026c['shift']());}catch(_0x4751c1){_0x42026c['push'](_0x42026c['shift']());}}}(a55_0x5f4d,0x55145));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a55_0x1f74(_0x29546d,_0x41f6be){_0x29546d=_0x29546d-0x17b;var _0x5f4d07=a55_0x5f4d();var _0x1f747b=_0x5f4d07[_0x29546d];return _0x1f747b;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x4a28ef){var _0x23d9e0=a55_0x1f74;if(_0x4a28ef[_0x23d9e0(0x184)])return _0x23d9e0(0x184);if(!isInProject())throw CliErrors[_0x23d9e0(0x182)](_0x23d9e0(0x180),_0x23d9e0(0x186)+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}function a55_0x5f4d(){var _0x139b88=['127746OvJhWd','120omYZjD','148256Rvgudj','2QkBWTD','645128EZIsus','2711480KHLqCk','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','9009486kModrd','validation','222561nKxrCr','global','3925467uNmzKG','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a55_0x5f4d=function(){return _0x139b88;};return a55_0x5f4d();}export function readScopedConfig(_0x1e47a7){return readConfigFile(resolveWriteConfigPath(_0x1e47a7));}export function writeScopedConfig(_0x2ff0f1,_0xed6fcc){writeConfigFile(resolveWriteConfigPath(_0xed6fcc),_0x2ff0f1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x52e764=a56_0x4056;(function(_0x50bd74,_0x218a2e){const _0x1d7093=a56_0x4056,_0x4ca7d7=_0x50bd74();while(!![]){try{const _0x201508=parseInt(_0x1d7093(0x1a6))/0x1*(parseInt(_0x1d7093(0x1ad))/0x2)+-parseInt(_0x1d7093(0x1a3))/0x3+parseInt(_0x1d7093(0x1a7))/0x4*(-parseInt(_0x1d7093(0x1a5))/0x5)+-parseInt(_0x1d7093(0x1ac))/0x6*(parseInt(_0x1d7093(0x1a2))/0x7)+parseInt(_0x1d7093(0x1a8))/0x8+parseInt(_0x1d7093(0x1ab))/0x9*(-parseInt(_0x1d7093(0x19d))/0xa)+-parseInt(_0x1d7093(0x1a0))/0xb*(-parseInt(_0x1d7093(0x19f))/0xc);if(_0x201508===_0x218a2e)break;else _0x4ca7d7['push'](_0x4ca7d7['shift']());}catch(_0x373d68){_0x4ca7d7['push'](_0x4ca7d7['shift']());}}}(a56_0x3e7c,0x7e092));function a56_0x3e7c(){const _0x53868b=['11XXdrpY','\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]','959esiLTM','771870DgllWf','filter','140rRIBfl','129615XhBDaK','98948cDyMjH','314144mJJcnh','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','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','549oLvvpP','6648cCryxv','2nfqDGD','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','96370UfvrqJ','join','24443256RrWHDn'];a56_0x3e7c=function(){return _0x53868b;};return a56_0x3e7c();}import{buildDataCommand}from'../../commands/data/shared.js';function a56_0x4056(_0x4095b5,_0x5f1664){_0x4095b5=_0x4095b5-0x19c;const _0x3e7cbb=a56_0x3e7c();let _0x4056ca=_0x3e7cbb[_0x4095b5];return _0x4056ca;}export const dataFilter=buildDataCommand({'command':a56_0x52e764(0x1a4),'operation':a56_0x52e764(0x1a4),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a56_0x52e764(0x1aa),'helpExtra':[a56_0x52e764(0x19c),a56_0x52e764(0x1a9),a56_0x52e764(0x1a1),'\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}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'][a56_0x52e764(0x19e)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x2e1f9e=a57_0x2553;function a57_0x2553(_0x4ca9b2,_0x40eb8a){_0x4ca9b2=_0x4ca9b2-0xb7;const _0x29f4f3=a57_0x29f4();let _0x255368=_0x29f4f3[_0x4ca9b2];return _0x255368;}(function(_0x3582f5,_0x30a496){const _0x4736e3=a57_0x2553,_0x317d63=_0x3582f5();while(!![]){try{const _0x106970=-parseInt(_0x4736e3(0xbd))/0x1+parseInt(_0x4736e3(0xba))/0x2+-parseInt(_0x4736e3(0xc3))/0x3*(parseInt(_0x4736e3(0xb8))/0x4)+parseInt(_0x4736e3(0xb9))/0x5*(-parseInt(_0x4736e3(0xb7))/0x6)+-parseInt(_0x4736e3(0xc1))/0x7*(parseInt(_0x4736e3(0xc0))/0x8)+-parseInt(_0x4736e3(0xbc))/0x9*(parseInt(_0x4736e3(0xbf))/0xa)+-parseInt(_0x4736e3(0xbe))/0xb*(-parseInt(_0x4736e3(0xc4))/0xc);if(_0x106970===_0x30a496)break;else _0x317d63['push'](_0x317d63['shift']());}catch(_0x2a102b){_0x317d63['push'](_0x317d63['shift']());}}}(a57_0x29f4,0x5d7cd));import{buildDataCommand}from'../../commands/data/shared.js';function a57_0x29f4(){const _0x405f0d=['2963213XGLrsv','10XoKlIG','273032rQkTWn','77XTKKZj','Get\x20a\x20single\x20record\x20by\x20ID','12dhVfXA','108aMgFFk','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','6FENMKp','763696SpjnZl','2322325QXMcUT','679970dnXIkK','getOne','3821085ogRpaz','353362IjRvbE'];a57_0x29f4=function(){return _0x405f0d;};return a57_0x29f4();}export const dataGetOne=buildDataCommand({'command':a57_0x2e1f9e(0xbb),'operation':a57_0x2e1f9e(0xbb),'description':a57_0x2e1f9e(0xc2),'paramsRequired':!![],'paramsHint':a57_0x2e1f9e(0xc5)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x3345(_0x2c6abc,_0x1d2559){_0x2c6abc=_0x2c6abc-0x1dd;const _0x201e37=a58_0x201e();let _0x3345af=_0x201e37[_0x2c6abc];return _0x3345af;}function a58_0x201e(){const _0x337b61=['790040Uxilsx','24EPBcTY','7124AkgKiv','4349564NBSZfK','7mRgzJI','449dbgDzV','3574285dbmcEH','2821hknsMC','3LpqJCa','50XGzIzO','3424473FGVpwc','7636422aeVKTq','20748qOyOEH'];a58_0x201e=function(){return _0x337b61;};return a58_0x201e();}(function(_0x554165,_0x47f16c){const _0x49513f=a58_0x3345,_0x29f537=_0x554165();while(!![]){try{const _0x464fbf=-parseInt(_0x49513f(0x1e3))/0x1*(parseInt(_0x49513f(0x1e0))/0x2)+-parseInt(_0x49513f(0x1e6))/0x3*(parseInt(_0x49513f(0x1e1))/0x4)+-parseInt(_0x49513f(0x1de))/0x5+parseInt(_0x49513f(0x1e9))/0x6*(parseInt(_0x49513f(0x1e2))/0x7)+parseInt(_0x49513f(0x1df))/0x8*(parseInt(_0x49513f(0x1e8))/0x9)+-parseInt(_0x49513f(0x1e7))/0xa*(-parseInt(_0x49513f(0x1e4))/0xb)+-parseInt(_0x49513f(0x1dd))/0xc*(parseInt(_0x49513f(0x1e5))/0xd);if(_0x464fbf===_0x47f16c)break;else _0x29f537['push'](_0x29f537['shift']());}catch(_0x10c6ea){_0x29f537['push'](_0x29f537['shift']());}}}(a58_0x201e,0xc7f1d));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(_0x35a876,_0x1c93a7){const _0x1c9df6=a59_0x4d6e,_0x26f831=_0x35a876();while(!![]){try{const _0x194f80=-parseInt(_0x1c9df6(0x1cc))/0x1*(parseInt(_0x1c9df6(0x1bd))/0x2)+-parseInt(_0x1c9df6(0x1c1))/0x3+-parseInt(_0x1c9df6(0x1bb))/0x4+parseInt(_0x1c9df6(0x1be))/0x5+-parseInt(_0x1c9df6(0x1c8))/0x6+parseInt(_0x1c9df6(0x1ce))/0x7+-parseInt(_0x1c9df6(0x1b7))/0x8*(-parseInt(_0x1c9df6(0x1cd))/0x9);if(_0x194f80===_0x1c93a7)break;else _0x26f831['push'](_0x26f831['shift']());}catch(_0x366eaf){_0x26f831['push'](_0x26f831['shift']());}}}(a59_0x240d,0x8727f));import{executeDatasetDataOperation}from'../../core/api-client.js';function a59_0x4d6e(_0x1d09dc,_0x17b95e){_0x1d09dc=_0x1d09dc-0x1b1;const _0x240d50=a59_0x240d();let _0x4d6ed5=_0x240d50[_0x1d09dc];return _0x4d6ed5;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a59_0x240d(){const _0x39e518=['Example:\x20--params\x20\x27{\x22id\x22:123}\x27','description','data\x20','2VNqbSt','5706927MCHQDx','6122095vFpblZ','paramsHint','helpExtra','paramsRequired','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','getOne','code','operation','compress','24tMAqjF','alias','data','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','1727300KUxTXw','str','249714RXStqP','2813535gePcDx','command','params','3031221fjqxWB','validation','\x20completed\x20in\x20','now','flagMissing','read','string','6564336fOQMRe'];a59_0x240d=function(){return _0x39e518;};return a59_0x240d();}function assertGetOneId(_0x4d7a62){const _0x17b01b=a59_0x4d6e;if(!_0x4d7a62)throw CliErrors['flagMissing'](_0x17b01b(0x1c0),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0xe8fcc3=_0x4d7a62['id'];if(_0xe8fcc3===undefined||_0xe8fcc3===null||_0xe8fcc3==='')throw CliErrors[_0x17b01b(0x1c2)](_0x17b01b(0x1b2),_0x17b01b(0x1c9));}function parseCommandParams(_0x5a1b44){return parseJsonParams(_0x5a1b44)??{};}export function buildDataCommand(_0x5140e2){const _0x58cb6b=a59_0x4d6e,_0x463750=_0x58cb6b(0x1ba);return{'service':_0x58cb6b(0x1b9),'command':_0x5140e2['command'],'description':_0x5140e2[_0x58cb6b(0x1ca)],'risk':_0x58cb6b(0x1c6),'defaultOutputFormat':_0x58cb6b(0x1b6),'helpExtra':_0x5140e2[_0x58cb6b(0x1d0)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x58cb6b(0x1b8),'type':'string','description':_0x463750},{'name':_0x58cb6b(0x1c0),'type':_0x58cb6b(0x1c7),'description':_0x5140e2['paramsHint']}],async 'validate'(_0x3edf00){const _0x30712e=_0x58cb6b,_0x5c00e9=_0x3edf00[_0x30712e(0x1bc)](_0x30712e(0x1c0));if(_0x5140e2[_0x30712e(0x1b1)]&&!_0x5c00e9)throw CliErrors[_0x30712e(0x1c5)](_0x30712e(0x1c0),_0x5140e2[_0x30712e(0x1cf)]);const _0x1445da=parseJsonParams(_0x5c00e9);_0x5140e2['operation']===_0x30712e(0x1b3)&&assertGetOneId(_0x1445da);},async 'execute'(_0x23fe75){const _0x368fdf=_0x58cb6b,_0x5629a0=parseCommandParams(_0x23fe75[_0x368fdf(0x1bc)](_0x368fdf(0x1c0))),_0x480100=Date[_0x368fdf(0x1c4)](),_0x283a3b=await executeDatasetDataOperation(_0x23fe75['appCode'],_0x23fe75[_0x368fdf(0x1bc)](_0x368fdf(0x1b4)),_0x5140e2[_0x368fdf(0x1b5)],_0x5629a0),_0x156d2a=Date[_0x368fdf(0x1c4)]()-_0x480100;return{'ok':!![],'data':{'result':_0x283a3b,'elapsed':_0x156d2a},'message':_0x368fdf(0x1cb)+_0x5140e2[_0x368fdf(0x1bf)]+_0x368fdf(0x1c3)+_0x156d2a+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a60_0xd48ba7=a60_0xc8a1;(function(_0x14f66b,_0x3e29c2){const _0x5cbc93=a60_0xc8a1,_0x21872b=_0x14f66b();while(!![]){try{const _0x5f49b6=parseInt(_0x5cbc93(0x175))/0x1*(parseInt(_0x5cbc93(0x172))/0x2)+-parseInt(_0x5cbc93(0x16d))/0x3+parseInt(_0x5cbc93(0x156))/0x4+parseInt(_0x5cbc93(0x16c))/0x5+parseInt(_0x5cbc93(0x176))/0x6*(parseInt(_0x5cbc93(0x17d))/0x7)+-parseInt(_0x5cbc93(0x184))/0x8*(parseInt(_0x5cbc93(0x169))/0x9)+-parseInt(_0x5cbc93(0x15c))/0xa*(parseInt(_0x5cbc93(0x17e))/0xb);if(_0x5f49b6===_0x3e29c2)break;else _0x21872b['push'](_0x21872b['shift']());}catch(_0xeaf63a){_0x21872b['push'](_0x21872b['shift']());}}}(a60_0xc17e,0xa179a));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a60_0xc17e(){const _0x3a4fe1=['7tsrtrW','32505979YvKRPd','sourceType','length','Update\x20business\x20model\x20group','modelCode','update','32AEUXID','matched','name','write','METADATA','Updated\x20business\x20model\x20group\x20for\x20dataset\x20','Expected\x20','appCode','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','POST','validation','DB_TABLE','datasetId','3338140iqPBNz','businessGroup','prototype','isArray','isFinite','Expectation\x20mismatch\x20at\x20businessGroup','10gEMgEQ','extend','call','expect-business-group','dataset',',\x20actual\x20','str','modelId','business-group','string','code','source','Dry-run:\x20business\x20model\x20group\x20would\x20change\x20for\x20dataset\x20','2187459VDDHcN','trim','apiError','5987815WWWMwo','65019XRXHkN','number','data','No\x20changes\x20for\x20business\x20model\x20group\x20on\x20dataset\x20','datasetName','237086wPfItv','Business\x20model\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','11ZdhxnK','7645782OERjRX','found','backend','stringify','Expected\x20current\x20business\x20model\x20group;\x20mismatch\x20aborts\x20without\x20writing','datasetCode','dbtableConfig'];a60_0xc17e=function(){return _0x3a4fe1;};return a60_0xc17e();}import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0xca922d,input:_0x5da46d,dryRun:_0x13863f}){const _0x30d030=a60_0xc8a1;validateInput(_0x5da46d);const _0x1f7ad7=normalizeBusinessGroup(_0x5da46d['businessGroup']),_0x1e75bd=await getDatasetDetail(_0x5da46d['code']),_0x4d2101=resolveBusinessGroupDataset(_0x1e75bd,_0x5da46d[_0x30d030(0x166)]),_0x4cc435=loadCurrentBusinessGroup(_0x1e75bd,_0x4d2101);assertExpectedBusinessGroup(_0x4cc435,_0x5da46d['expectBusinessGroup']);const _0x3f7ca9=buildBackendPayload(_0xca922d,_0x4d2101,_0x1f7ad7),_0x16ef66=_0x4cc435!==_0x1f7ad7;let _0x4bbb8a;if(_0x16ef66&&!_0x13863f){await updateErBusinessGroup(_0x3f7ca9);const _0x5633e8=await getDatasetDetail(_0x4d2101['code']),_0x26d8b2=resolveBusinessGroupDataset(_0x5633e8,_0x4d2101[_0x30d030(0x166)]),_0x33c934=loadCurrentBusinessGroup(_0x5633e8,_0x26d8b2);if(_0x33c934!==_0x1f7ad7)throw CliErrors[_0x30d030(0x16b)](_0x30d030(0x173),_0x30d030(0x14f)+JSON[_0x30d030(0x179)](_0x1f7ad7)+',\x20actual\x20'+JSON[_0x30d030(0x179)](_0x33c934)+'.');_0x4bbb8a={'verified':!![],'status':_0x30d030(0x185),'afterReadback':{'businessGroup':_0x33c934}};}else!_0x16ef66&&(_0x4bbb8a={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x4cc435}});const _0x5c1250={'operation':_0x30d030(0x183),'appCode':_0xca922d,'selector':{'code':_0x4d2101[_0x30d030(0x166)]},'dataset':_0x4d2101,'before':{'businessGroup':_0x4cc435},'after':{'businessGroup':_0x1f7ad7},'changed':_0x16ef66,'dryRun':_0x13863f,'submitted':_0x16ef66&&!_0x13863f,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x3f7ca9},..._0x4bbb8a?{'verification':_0x4bbb8a}:{},'warnings':[]};return{'ok':!![],'data':_0x5c1250,'message':_0x16ef66?_0x13863f?_0x30d030(0x168)+_0x4d2101[_0x30d030(0x166)]:_0x30d030(0x189)+_0x4d2101[_0x30d030(0x166)]:_0x30d030(0x170)+_0x4d2101[_0x30d030(0x166)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':'business-group-update','description':a60_0xd48ba7(0x181),'risk':a60_0xd48ba7(0x187),'flags':[CODE_FLAG,{'name':a60_0xd48ba7(0x164),'type':a60_0xd48ba7(0x165),'required':!![],'description':'New\x20business\x20model\x20group\x20value;\x20empty\x20string\x20clears\x20it'},{'name':a60_0xd48ba7(0x15f),'type':'string','required':![],'description':a60_0xd48ba7(0x17a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x15a171){validateInput(readBusinessGroupUpdateInput(_0x15a171));},async 'dryRun'(_0x3199a6){const _0x2629ff=a60_0xd48ba7,_0x2cec67=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3199a6[_0x2629ff(0x150)],'input':readBusinessGroupUpdateInput(_0x3199a6),'dryRun':!![]});return{'method':_0x2629ff(0x152),'url':BACKEND_PATH,'body':_0x2cec67[_0x2629ff(0x16f)][_0x2629ff(0x178)]['payload'],'description':_0x2cec67['message'],..._0x2cec67[_0x2629ff(0x16f)]};},async 'execute'(_0x77b1cc){const _0x3ccc39=a60_0xd48ba7;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x77b1cc[_0x3ccc39(0x150)],'input':readBusinessGroupUpdateInput(_0x77b1cc),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4f8380){const _0x1ef6c7=a60_0xd48ba7,_0x50abdb=_0x4f8380[_0x1ef6c7(0x162)](_0x1ef6c7(0x15f));return{'code':trim(_0x4f8380[_0x1ef6c7(0x162)]('code')),'businessGroup':_0x4f8380['str'](_0x1ef6c7(0x164)),'expectBusinessGroup':_0x50abdb===undefined||_0x50abdb===''?undefined:_0x50abdb};}function validateInput(_0x5b67b6){const _0x1430bc=a60_0xd48ba7;if(!trim(_0x5b67b6[_0x1430bc(0x166)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x5b67b6[_0x1430bc(0x157)]===undefined)throw CliErrors[_0x1430bc(0x153)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x36dbca,_0x56f943){const _0x3874c8=a60_0xd48ba7,_0x5cb091=asPlainObject(_0x36dbca[_0x3874c8(0x160)]),_0x8d7454=asPlainObject(_0x36dbca[_0x3874c8(0x17c)]),_0x2dd4b7=resolveSourceType(_0x36dbca,_0x5cb091,_0x8d7454),_0x2b9be5=firstString(_0x36dbca[_0x3874c8(0x182)],_0x36dbca[_0x3874c8(0x166)],_0x5cb091[_0x3874c8(0x17b)],_0x56f943)||_0x56f943;return{'id':firstNumber(_0x36dbca[_0x3874c8(0x163)],_0x36dbca['id'],_0x5cb091[_0x3874c8(0x155)])??firstString(_0x36dbca['modelId'],_0x36dbca['id'],_0x5cb091[_0x3874c8(0x155)])??null,'code':_0x2b9be5,'name':firstString(_0x36dbca['name'],_0x5cb091[_0x3874c8(0x171)],_0x5cb091[_0x3874c8(0x186)])||null,'sourceType':_0x2dd4b7};}function resolveSourceType(_0x4445d0,_0x4d76ca,_0x37397f){const _0x3fcab2=a60_0xd48ba7,_0x337c06=firstString(_0x4445d0[_0x3fcab2(0x167)],_0x4445d0[_0x3fcab2(0x17f)],_0x4d76ca['source'],_0x4d76ca['sourceType'])?.[_0x3fcab2(0x16a)]()['toUpperCase']();if(_0x337c06===_0x3fcab2(0x154)||_0x337c06===_0x3fcab2(0x188))return _0x337c06;if(Object['keys'](_0x37397f)[_0x3fcab2(0x180)]>0x0)return _0x3fcab2(0x154);throw CliErrors[_0x3fcab2(0x153)](_0x3fcab2(0x174));}function loadCurrentBusinessGroup(_0x10dbf4,_0x502232){const _0x4fae4a=a60_0xd48ba7,_0x35a95a=readBusinessGroupFromDatasetDetail(_0x10dbf4,_0x502232['sourceType']);if(_0x35a95a[_0x4fae4a(0x177)])return normalizeBusinessGroup(_0x35a95a['value']);if(_0x502232[_0x4fae4a(0x17f)]===_0x4fae4a(0x188))return'';throw CliErrors[_0x4fae4a(0x153)](_0x4fae4a(0x151),'Business\x20model\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x2502c5,_0x48b1a0){const _0x5a0c67=a60_0xd48ba7,_0x3216ce=asPlainObject(_0x2502c5['dataset']),_0x5d9231=firstPresent(_0x2502c5[_0x5a0c67(0x157)]);if(_0x5d9231['found'])return _0x5d9231;const _0x5251ff=firstPresent(_0x3216ce[_0x5a0c67(0x157)]);if(_0x5251ff['found'])return _0x5251ff;if(_0x48b1a0===_0x5a0c67(0x154))return{'found':![]};const _0x433e2b=readBusinessGroupFromExtend(_0x2502c5[_0x5a0c67(0x15d)]);if(_0x433e2b['found'])return _0x433e2b;return readBusinessGroupFromExtend(_0x3216ce[_0x5a0c67(0x15d)]);}function readBusinessGroupFromExtend(_0x394720){const _0x3b8059=a60_0xd48ba7;if(_0x394720===undefined||_0x394720===null||_0x394720==='')return{'found':![]};if(typeof _0x394720===_0x3b8059(0x165))try{const _0x10cd0d=JSON['parse'](_0x394720);return readBusinessGroupFromExtend(_0x10cd0d);}catch{return{'found':![]};}const _0xa90bac=asPlainObject(_0x394720);if(Object[_0x3b8059(0x158)]['hasOwnProperty'][_0x3b8059(0x15e)](_0xa90bac,_0x3b8059(0x157)))return{'found':!![],'value':_0xa90bac[_0x3b8059(0x157)]};return{'found':![]};}function firstPresent(..._0x4bd69e){for(const _0x3c2a00 of _0x4bd69e){if(_0x3c2a00!==undefined&&_0x3c2a00!==null)return{'found':!![],'value':_0x3c2a00};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4e33f4,_0x596619){const _0xb88d1f=a60_0xd48ba7;if(_0x596619===undefined)return;const _0x1083fb=normalizeBusinessGroup(_0x596619);if(_0x4e33f4!==_0x1083fb)throw CliErrors[_0xb88d1f(0x153)](_0xb88d1f(0x15b),_0xb88d1f(0x14f)+JSON['stringify'](_0x1083fb)+_0xb88d1f(0x161)+JSON[_0xb88d1f(0x179)](_0x4e33f4));}function buildBackendPayload(_0x46f91f,_0xb143f2,_0x105c72){const _0x87711f=a60_0xd48ba7;return{'appCode':_0x46f91f,'datasetCode':_0xb143f2[_0x87711f(0x166)],'businessGroup':_0x105c72};}function normalizeBusinessGroup(_0x72ed7f){if(_0x72ed7f===undefined||_0x72ed7f===null)return'';return String(_0x72ed7f)['trim']();}function a60_0xc8a1(_0x3b168f,_0x4bad43){_0x3b168f=_0x3b168f-0x14f;const _0xc17e2c=a60_0xc17e();let _0xc8a13d=_0xc17e2c[_0x3b168f];return _0xc8a13d;}function asPlainObject(_0x1999c3){const _0xa664cc=a60_0xd48ba7;if(!_0x1999c3||typeof _0x1999c3!=='object'||Array[_0xa664cc(0x159)](_0x1999c3))return{};return _0x1999c3;}function firstString(..._0x553de7){const _0x3854b4=a60_0xd48ba7;for(const _0x2ecfd6 of _0x553de7){if(typeof _0x2ecfd6===_0x3854b4(0x165)&&_0x2ecfd6['trim']())return _0x2ecfd6[_0x3854b4(0x16a)]();if(typeof _0x2ecfd6===_0x3854b4(0x16e)&&Number[_0x3854b4(0x15a)](_0x2ecfd6))return String(_0x2ecfd6);}return undefined;}function firstNumber(..._0x6fb921){const _0xf577f5=a60_0xd48ba7;for(const _0x53570c of _0x6fb921){if(typeof _0x53570c===_0xf577f5(0x16e)&&Number[_0xf577f5(0x15a)](_0x53570c))return _0x53570c;if(typeof _0x53570c===_0xf577f5(0x165)&&_0x53570c[_0xf577f5(0x16a)]()&&Number[_0xf577f5(0x15a)](Number(_0x53570c)))return Number(_0x53570c);}return null;}function trim(_0x5a8636){const _0x159d2a=a60_0xd48ba7;return String(_0x5a8636||'')[_0x159d2a(0x16a)]();}
|
|
1
|
+
function a60_0x5870(){const _0x5547c7=['1889iWFZtk','update','businessGroup','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','backend','isArray','keys','expectBusinessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','prototype','24eruFkx','expect-business-group','61358UDTayS','value','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','isFinite','dataset','30PCljik','source','message','parse','DB_TABLE','sourceType','Update\x20business\x20scenario\x20group','validation',',\x20actual\x20','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','str','dbtableConfig','business-group','object','Expectation\x20mismatch\x20at\x20businessGroup','POST','datasetCode','197724VptoEC','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','492OVvSGo','number','data','modelCode','130dPDeMt','4506229XalwOU','datasetId','modelId','matched','string','unchanged','length','payload','stringify','hasOwnProperty','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','1460vVhekG','METADATA','found','appCode','1506KHSPGI','15jNLRNx','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','trim','extend','name','2260899gYqAsx','code','Expected\x20','43784gzgtFF','write','--code\x20is\x20required'];a60_0x5870=function(){return _0x5547c7;};return a60_0x5870();}const a60_0x5e7192=a60_0x203f;(function(_0x1e6dab,_0x4f0148){const _0x9c7bbc=a60_0x203f,_0x384345=_0x1e6dab();while(!![]){try{const _0x3e5fdf=-parseInt(_0x9c7bbc(0x175))/0x1*(-parseInt(_0x9c7bbc(0x159))/0x2)+-parseInt(_0x9c7bbc(0x16a))/0x3*(-parseInt(_0x9c7bbc(0x197))/0x4)+parseInt(_0x9c7bbc(0x165))/0x5*(parseInt(_0x9c7bbc(0x169))/0x6)+-parseInt(_0x9c7bbc(0x15a))/0x7+-parseInt(_0x9c7bbc(0x17f))/0x8*(-parseInt(_0x9c7bbc(0x16f))/0x9)+parseInt(_0x9c7bbc(0x186))/0xa*(parseInt(_0x9c7bbc(0x181))/0xb)+-parseInt(_0x9c7bbc(0x199))/0xc*(parseInt(_0x9c7bbc(0x172))/0xd);if(_0x3e5fdf===_0x4f0148)break;else _0x384345['push'](_0x384345['shift']());}catch(_0x37b086){_0x384345['push'](_0x384345['shift']());}}}(a60_0x5870,0x69694));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='/smartapi/question/er-config/business-group/edit';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x106f17,input:_0x4a5a3d,dryRun:_0xd22f00}){const _0x1253ea=a60_0x203f;validateInput(_0x4a5a3d);const _0x2b7421=normalizeBusinessGroup(_0x4a5a3d[_0x1253ea(0x177)]),_0x28f7e0=await getDatasetDetail(_0x4a5a3d[_0x1253ea(0x170)]),_0x18823a=resolveBusinessGroupDataset(_0x28f7e0,_0x4a5a3d[_0x1253ea(0x170)]),_0x47f25b=loadCurrentBusinessGroup(_0x28f7e0,_0x18823a);assertExpectedBusinessGroup(_0x47f25b,_0x4a5a3d[_0x1253ea(0x17c)]);const _0x32a5d4=buildBackendPayload(_0x106f17,_0x18823a,_0x2b7421),_0x525221=_0x47f25b!==_0x2b7421;let _0x1eb580;if(_0x525221&&!_0xd22f00){await updateErBusinessGroup(_0x32a5d4);const _0x1727be=await getDatasetDetail(_0x18823a[_0x1253ea(0x170)]),_0x54dbfd=resolveBusinessGroupDataset(_0x1727be,_0x18823a['code']),_0x2eabfe=loadCurrentBusinessGroup(_0x1727be,_0x54dbfd);if(_0x2eabfe!==_0x2b7421)throw CliErrors['apiError'](_0x1253ea(0x17d),'Expected\x20'+JSON['stringify'](_0x2b7421)+_0x1253ea(0x18e)+JSON[_0x1253ea(0x162)](_0x2eabfe)+'.');_0x1eb580={'verified':!![],'status':_0x1253ea(0x15d),'afterReadback':{'businessGroup':_0x2eabfe}};}else!_0x525221&&(_0x1eb580={'verified':!![],'status':_0x1253ea(0x15f),'afterReadback':{'businessGroup':_0x47f25b}});const _0x25c9f8={'operation':_0x1253ea(0x176),'appCode':_0x106f17,'selector':{'code':_0x18823a[_0x1253ea(0x170)]},'dataset':_0x18823a,'before':{'businessGroup':_0x47f25b},'after':{'businessGroup':_0x2b7421},'changed':_0x525221,'dryRun':_0xd22f00,'submitted':_0x525221&&!_0xd22f00,'backend':{'method':_0x1253ea(0x195),'path':BACKEND_PATH,'payload':_0x32a5d4},..._0x1eb580?{'verification':_0x1eb580}:{},'warnings':[]};return{'ok':!![],'data':_0x25c9f8,'message':_0x525221?_0xd22f00?_0x1253ea(0x183)+_0x18823a[_0x1253ea(0x170)]:_0x1253ea(0x16b)+_0x18823a['code']:_0x1253ea(0x164)+_0x18823a[_0x1253ea(0x170)]};}export const datasetBusinessGroupUpdate={'service':a60_0x5e7192(0x185),'command':'business-group-update','description':a60_0x5e7192(0x18c),'risk':a60_0x5e7192(0x173),'flags':[CODE_FLAG,{'name':a60_0x5e7192(0x192),'type':a60_0x5e7192(0x15e),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':a60_0x5e7192(0x15e),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x48c87c){validateInput(readBusinessGroupUpdateInput(_0x48c87c));},async 'dryRun'(_0x49dee6){const _0x17249b=a60_0x5e7192,_0x113d4e=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x49dee6[_0x17249b(0x168)],'input':readBusinessGroupUpdateInput(_0x49dee6),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x113d4e[_0x17249b(0x19b)][_0x17249b(0x179)][_0x17249b(0x161)],'description':_0x113d4e[_0x17249b(0x188)],..._0x113d4e['data']};},async 'execute'(_0x45b1d6){const _0x240dfd=a60_0x5e7192;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x45b1d6[_0x240dfd(0x168)],'input':readBusinessGroupUpdateInput(_0x45b1d6),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x393a2b){const _0x175239=a60_0x5e7192,_0x531d69=_0x393a2b[_0x175239(0x190)](_0x175239(0x180));return{'code':trim(_0x393a2b[_0x175239(0x190)](_0x175239(0x170))),'businessGroup':_0x393a2b[_0x175239(0x190)](_0x175239(0x192)),'expectBusinessGroup':_0x531d69===undefined||_0x531d69===''?undefined:_0x531d69};}function validateInput(_0xae0db8){const _0x3692b8=a60_0x5e7192;if(!trim(_0xae0db8['code']))throw CliErrors['validation'](_0x3692b8(0x174));if(_0xae0db8[_0x3692b8(0x177)]===undefined)throw CliErrors[_0x3692b8(0x18d)]('--business-group\x20is\x20required');}function resolveBusinessGroupDataset(_0x3596e5,_0xa77b83){const _0x26d082=a60_0x5e7192,_0x53d0cd=asPlainObject(_0x3596e5[_0x26d082(0x185)]),_0xd5e9dd=asPlainObject(_0x3596e5[_0x26d082(0x191)]),_0x52d59c=resolveSourceType(_0x3596e5,_0x53d0cd,_0xd5e9dd),_0x3cd56f=firstString(_0x3596e5[_0x26d082(0x158)],_0x3596e5['code'],_0x53d0cd[_0x26d082(0x196)],_0xa77b83)||_0xa77b83;return{'id':firstNumber(_0x3596e5[_0x26d082(0x15c)],_0x3596e5['id'],_0x53d0cd['datasetId'])??firstString(_0x3596e5[_0x26d082(0x15c)],_0x3596e5['id'],_0x53d0cd[_0x26d082(0x15b)])??null,'code':_0x3cd56f,'name':firstString(_0x3596e5[_0x26d082(0x16e)],_0x53d0cd['datasetName'],_0x53d0cd[_0x26d082(0x16e)])||null,'sourceType':_0x52d59c};}function resolveSourceType(_0x2c40aa,_0x268612,_0x46d9c0){const _0x11382e=a60_0x5e7192,_0x1fb4b1=firstString(_0x2c40aa['source'],_0x2c40aa[_0x11382e(0x18b)],_0x268612[_0x11382e(0x187)],_0x268612[_0x11382e(0x18b)])?.[_0x11382e(0x16c)]()['toUpperCase']();if(_0x1fb4b1===_0x11382e(0x18a)||_0x1fb4b1===_0x11382e(0x166))return _0x1fb4b1;if(Object[_0x11382e(0x17b)](_0x46d9c0)[_0x11382e(0x160)]>0x0)return _0x11382e(0x18a);throw CliErrors[_0x11382e(0x18d)](_0x11382e(0x178));}function loadCurrentBusinessGroup(_0x458dbe,_0x3d5d94){const _0xbeced3=a60_0x5e7192,_0x10c17e=readBusinessGroupFromDatasetDetail(_0x458dbe,_0x3d5d94[_0xbeced3(0x18b)]);if(_0x10c17e[_0xbeced3(0x167)])return normalizeBusinessGroup(_0x10c17e[_0xbeced3(0x182)]);if(_0x3d5d94[_0xbeced3(0x18b)]===_0xbeced3(0x166))return'';throw CliErrors[_0xbeced3(0x18d)](_0xbeced3(0x198),_0xbeced3(0x18f));}function readBusinessGroupFromDatasetDetail(_0x170337,_0x12623a){const _0x27dd2a=a60_0x5e7192,_0x121616=asPlainObject(_0x170337[_0x27dd2a(0x185)]),_0xc68065=firstPresent(_0x170337[_0x27dd2a(0x177)]);if(_0xc68065['found'])return _0xc68065;const _0x4c1653=firstPresent(_0x121616[_0x27dd2a(0x177)]);if(_0x4c1653['found'])return _0x4c1653;if(_0x12623a===_0x27dd2a(0x18a))return{'found':![]};const _0x1abc8b=readBusinessGroupFromExtend(_0x170337[_0x27dd2a(0x16d)]);if(_0x1abc8b[_0x27dd2a(0x167)])return _0x1abc8b;return readBusinessGroupFromExtend(_0x121616[_0x27dd2a(0x16d)]);}function readBusinessGroupFromExtend(_0x574652){const _0x19bb4a=a60_0x5e7192;if(_0x574652===undefined||_0x574652===null||_0x574652==='')return{'found':![]};if(typeof _0x574652==='string')try{const _0x3b44c8=JSON[_0x19bb4a(0x189)](_0x574652);return readBusinessGroupFromExtend(_0x3b44c8);}catch{return{'found':![]};}const _0x442eee=asPlainObject(_0x574652);if(Object[_0x19bb4a(0x17e)][_0x19bb4a(0x163)]['call'](_0x442eee,_0x19bb4a(0x177)))return{'found':!![],'value':_0x442eee[_0x19bb4a(0x177)]};return{'found':![]};}function firstPresent(..._0x5d4e0c){for(const _0x89fefa of _0x5d4e0c){if(_0x89fefa!==undefined&&_0x89fefa!==null)return{'found':!![],'value':_0x89fefa};}return{'found':![]};}function assertExpectedBusinessGroup(_0x513a44,_0x375fc8){const _0x40bf1e=a60_0x5e7192;if(_0x375fc8===undefined)return;const _0x2c4ea7=normalizeBusinessGroup(_0x375fc8);if(_0x513a44!==_0x2c4ea7)throw CliErrors[_0x40bf1e(0x18d)](_0x40bf1e(0x194),_0x40bf1e(0x171)+JSON['stringify'](_0x2c4ea7)+_0x40bf1e(0x18e)+JSON[_0x40bf1e(0x162)](_0x513a44));}function buildBackendPayload(_0x42acd9,_0x4ed5c5,_0x41f55a){return{'appCode':_0x42acd9,'datasetCode':_0x4ed5c5['code'],'businessGroup':_0x41f55a};}function normalizeBusinessGroup(_0x42134e){const _0x341a52=a60_0x5e7192;if(_0x42134e===undefined||_0x42134e===null)return'';return String(_0x42134e)[_0x341a52(0x16c)]();}function asPlainObject(_0x360650){const _0x5832fc=a60_0x5e7192;if(!_0x360650||typeof _0x360650!==_0x5832fc(0x193)||Array[_0x5832fc(0x17a)](_0x360650))return{};return _0x360650;}function a60_0x203f(_0x27e77b,_0x16d2d1){_0x27e77b=_0x27e77b-0x158;const _0x58706c=a60_0x5870();let _0x203f71=_0x58706c[_0x27e77b];return _0x203f71;}function firstString(..._0x5a97c5){const _0xdc3f73=a60_0x5e7192;for(const _0x346108 of _0x5a97c5){if(typeof _0x346108===_0xdc3f73(0x15e)&&_0x346108[_0xdc3f73(0x16c)]())return _0x346108[_0xdc3f73(0x16c)]();if(typeof _0x346108===_0xdc3f73(0x19a)&&Number['isFinite'](_0x346108))return String(_0x346108);}return undefined;}function firstNumber(..._0x1c5539){const _0x1bde8f=a60_0x5e7192;for(const _0x26aab6 of _0x1c5539){if(typeof _0x26aab6===_0x1bde8f(0x19a)&&Number['isFinite'](_0x26aab6))return _0x26aab6;if(typeof _0x26aab6==='string'&&_0x26aab6[_0x1bde8f(0x16c)]()&&Number[_0x1bde8f(0x184)](Number(_0x26aab6)))return Number(_0x26aab6);}return null;}function trim(_0x4452bb){const _0x59bacb=a60_0x5e7192;return String(_0x4452bb||'')[_0x59bacb(0x16c)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a61_0x567a85=a61_0x5426;(function(_0x1e52fe,_0x1b43ea){const _0x4588fc=a61_0x5426,_0x5187fb=_0x1e52fe();while(!![]){try{const _0x1d6fc5=parseInt(_0x4588fc(0x13c))/0x1+-parseInt(_0x4588fc(0x141))/0x2*(parseInt(_0x4588fc(0x150))/0x3)+parseInt(_0x4588fc(0x14c))/0x4*(-parseInt(_0x4588fc(0x13d))/0x5)+-parseInt(_0x4588fc(0x12f))/0x6+-parseInt(_0x4588fc(0x130))/0x7+-parseInt(_0x4588fc(0x13a))/0x8*(-parseInt(_0x4588fc(0x133))/0x9)+parseInt(_0x4588fc(0x14b))/0xa*(parseInt(_0x4588fc(0x14f))/0xb);if(_0x1d6fc5===_0x1b43ea)break;else _0x5187fb['push'](_0x5187fb['shift']());}catch(_0x3f30e7){_0x5187fb['push'](_0x5187fb['shift']());}}}(a61_0x412e,0x38871));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x567a85(0x151),'filter':a61_0x567a85(0x134),'getOne':a61_0x567a85(0x14a)};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x567a85(0x149);function valueToString(_0x12ec23){const _0x1c82ae=a61_0x567a85;return _0x12ec23==null?'':String(_0x12ec23)[_0x1c82ae(0x144)]();}function getDatasetCode(_0x360fee){const _0x53c815=a61_0x567a85;return valueToString(_0x360fee[_0x53c815(0x139)]??_0x360fee[_0x53c815(0x13f)]??_0x360fee[_0x53c815(0x138)]?.[_0x53c815(0x14d)]);}function getDatasetName(_0x358d25){const _0x3f99e4=a61_0x567a85;return valueToString(_0x358d25[_0x3f99e4(0x154)]??_0x358d25['dataset']?.[_0x3f99e4(0x152)])||_0x3f99e4(0x12c);}function getDatasetSource(_0xe3222f){const _0xb72e99=a61_0x567a85;return valueToString(_0xe3222f[_0xb72e99(0x14e)]??_0xe3222f[_0xb72e99(0x138)]?.[_0xb72e99(0x140)])[_0xb72e99(0x155)]();}function getDbtableConfig(_0x301ba5){const _0x492bc3=a61_0x567a85,_0x3d73ad=_0x301ba5[_0x492bc3(0x147)]??_0x301ba5[_0x492bc3(0x136)];return _0x3d73ad&&typeof _0x3d73ad===_0x492bc3(0x145)?_0x3d73ad:{};}function a61_0x5426(_0xa7affa,_0x5771b9){_0xa7affa=_0xa7affa-0x12b;const _0x412eeb=a61_0x412e();let _0x542682=_0x412eeb[_0xa7affa];return _0x542682;}export function isDbTableBackedDataset(_0x31cb05){const _0x435af2=a61_0x567a85,_0x3818d5=getDatasetSource(_0x31cb05);if(_0x3818d5===_0x435af2(0x12d))return![];const _0x342c25=getDbtableConfig(_0x31cb05),_0x1987d3=_0x342c25[_0x435af2(0x13b)]??_0x342c25['id'],_0xec9e76=valueToString(_0x342c25[_0x435af2(0x131)]??_0x31cb05['tableName']??_0x31cb05[_0x435af2(0x138)]?.[_0x435af2(0x131)]);return _0x1987d3!==undefined&&_0x1987d3!==null&&_0xec9e76[_0x435af2(0x137)]>0x0;}export function filterDbTableBackedDatasets(_0x18738f){return _0x18738f['filter'](_0x5094eb=>isDbTableBackedDataset(_0x5094eb));}export function buildDbTableBackedRequirementMessage(_0x496ebe,_0xb805bd=a61_0x567a85(0x146)){const _0x5dc166=a61_0x567a85,_0x409f10=getDatasetSource(_0x496ebe)||_0x5dc166(0x142),_0x20cf10=getDatasetName(_0x496ebe),_0x3b4d1f=getDatasetCode(_0x496ebe),_0x34241e=_0x3b4d1f?'\x20('+_0x3b4d1f+')':'';return[_0x5dc166(0x135)+_0x20cf10+'\x22'+_0x34241e+'\x20是\x20'+_0x409f10+_0x5dc166(0x12e)+_0xb805bd+_0x5dc166(0x132),_0x5dc166(0x148),_0x5dc166(0x156),_0x5dc166(0x143)+RUNTIME_DATA_ACCESS_COMMANDS[_0x5dc166(0x12b)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x5dc166(0x153)]+'。']['join']('\x20');}function a61_0x412e(){const _0x2d6d38=['source','264ppXcct','18729NhqriX','lovrabet','datasetName','getOne','name','toUpperCase','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','filter','unknown','METADATA','\x20类型,没有可用于\x20','1087800mrXgVQ','2976295ngAeFt','tableName','\x20的\x20DB_TABLE\x20数据源上下文。','117612aUWIOy','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','当前数据集\x20\x22','dbtable','length','dataset','code','96Cjjuau','dbId','38108OYcldx','15DCOsLM','validation','modelCode','sourceType','38Sihurj','UNKNOWN','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','trim','object','SQL\x20schema\x20validation','dbtableConfig','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','349880JkSGRK','103996ApKLvI','datasetCode'];a61_0x412e=function(){return _0x2d6d38;};return a61_0x412e();}export function assertDatasetIsDbTableBacked(_0x5718b9,_0x2ff0fd){const _0x4ed47a=a61_0x567a85;if(!isDbTableBackedDataset(_0x5718b9))throw CliErrors[_0x4ed47a(0x13e)](buildDbTableBackedRequirementMessage(_0x5718b9,_0x2ff0fd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x107c0d=a62_0x561d;(function(_0x585d9d,_0x425bd5){const _0x13f284=a62_0x561d,_0x4911b8=_0x585d9d();while(!![]){try{const _0x1866ef=-parseInt(_0x13f284(0x97))/0x1+-parseInt(_0x13f284(0x7a))/0x2+parseInt(_0x13f284(0xa9))/0x3*(-parseInt(_0x13f284(0x93))/0x4)+-parseInt(_0x13f284(0x96))/0x5*(parseInt(_0x13f284(0x8c))/0x6)+-parseInt(_0x13f284(0x98))/0x7*(-parseInt(_0x13f284(0x9a))/0x8)+-parseInt(_0x13f284(0x87))/0x9+-parseInt(_0x13f284(0x7e))/0xa*(-parseInt(_0x13f284(0x82))/0xb);if(_0x1866ef===_0x425bd5)break;else _0x4911b8['push'](_0x4911b8['shift']());}catch(_0x337218){_0x4911b8['push'](_0x4911b8['shift']());}}}(a62_0x464f,0xb60bd));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x107c0d(0x86),'description':'Dataset\x20id'},DBID_FLAG={'name':a62_0x107c0d(0x9b),'type':'number','description':a62_0x107c0d(0x76)},CONFIRM_FLAG={'name':a62_0x107c0d(0x9f),'type':a62_0x107c0d(0xa1),'description':a62_0x107c0d(0x80)},EXPECTED_COUNT_FLAG={'name':a62_0x107c0d(0x8f),'type':a62_0x107c0d(0x86),'description':a62_0x107c0d(0x8d)};export const datasetDelete={'service':a62_0x107c0d(0xa2),'command':a62_0x107c0d(0x83),'description':a62_0x107c0d(0x8b),'risk':a62_0x107c0d(0x7c),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4dbead){const _0x509ff0=a62_0x107c0d,_0xa70c04=_0x4dbead[_0x509ff0(0x91)]('id'),_0x57d2de=_0x4dbead[_0x509ff0(0xab)](_0x509ff0(0x8a)),_0x20a81d=_0x4dbead[_0x509ff0(0x91)](_0x509ff0(0x9b)),_0x55a3f8=[_0xa70c04>0x0,Boolean(_0x57d2de),_0x20a81d>0x0][_0x509ff0(0xa5)](Boolean);if(_0x55a3f8[_0x509ff0(0xa7)]===0x0)throw CliErrors[_0x509ff0(0x81)](_0x509ff0(0x92));if(_0x55a3f8[_0x509ff0(0xa7)]>0x1)throw CliErrors[_0x509ff0(0x81)](_0x509ff0(0x78));},async 'dryRun'(_0x5edc5e){const _0x1e65c7=a62_0x107c0d,_0x330845=await resolveTargets(_0x5edc5e);return{'method':_0x1e65c7(0x9c),'url':_0x1e65c7(0x85),'body':{'appCode':_0x5edc5e[_0x1e65c7(0xa4)],'count':_0x330845[_0x1e65c7(0xa7)],'datasets':_0x330845},'description':_0x1e65c7(0x89)+_0x330845['length']+_0x1e65c7(0x8e)};},async 'execute'(_0x5d3dde){const _0x4cb22e=a62_0x107c0d;if(!_0x5d3dde[_0x4cb22e(0x7f)](_0x4cb22e(0x9f)))throw CliErrors[_0x4cb22e(0x81)](_0x4cb22e(0x84),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x1173b9=await resolveTargets(_0x5d3dde),_0x580410=[],_0x12299b=[];for(const _0x3f7088 of _0x1173b9){try{await deleteDataset(_0x5d3dde[_0x4cb22e(0xa4)],_0x3f7088['id']),_0x580410[_0x4cb22e(0xa0)](_0x3f7088);}catch(_0x2dcf4c){_0x12299b[_0x4cb22e(0xa0)]({..._0x3f7088,'error':_0x2dcf4c instanceof Error?_0x2dcf4c['message']:String(_0x2dcf4c)});}}if(_0x12299b[_0x4cb22e(0xa7)]>0x0)return{'ok':![],'data':{'requested':_0x1173b9[_0x4cb22e(0xa7)],'deletedCount':_0x580410['length'],'failedCount':_0x12299b[_0x4cb22e(0xa7)],'deleted':_0x580410,'failed':_0x12299b},'message':_0x4cb22e(0xa6)+_0x580410[_0x4cb22e(0xa7)]+'/'+_0x1173b9[_0x4cb22e(0xa7)]+_0x4cb22e(0x95)+_0x12299b['length']+_0x4cb22e(0x9d)};return{'ok':!![],'data':{'requested':_0x1173b9[_0x4cb22e(0xa7)],'deletedCount':_0x580410[_0x4cb22e(0xa7)],'deleted':_0x580410},'message':_0x4cb22e(0xa6)+_0x580410[_0x4cb22e(0xa7)]+_0x4cb22e(0x77)};}};function a62_0x561d(_0x40f568,_0xc9e4a){_0x40f568=_0x40f568-0x76;const _0x464f84=a62_0x464f();let _0x561d25=_0x464f84[_0x40f568];return _0x561d25;}function a62_0x464f(){const _0x17f8ea=['Deleted\x20','length','description','1203039uZhhIf','dbid=','str','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','\x20dataset(s)','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbName','653360ofnPFj','dbtableConfig','high-risk-write','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','10MKorZY','bool','Required\x20to\x20execute\x20dataset\x20deletion','validation','48831981URoYba','delete','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','/smartapi/dataset/delete-dataset','number','13269231mQYjPz','Matched\x20','Would\x20delete\x20','code','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','60348HmPNTo','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','expected-count','relationPages','num','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','12PnczyF','No\x20undeleted\x20dataset\x20found\x20for\x20','\x20dataset(s);\x20','290nZyYxz','1067683KflFiy','1449XCpSto','dbId','37160cHiZkR','dbid','POST','\x20failed','isArray','confirm','push','boolean','dataset','tableName','appCode','filter'];a62_0x464f=function(){return _0x17f8ea;};return a62_0x464f();}async function resolveTargets(_0x19471b){const _0x588e28=a62_0x107c0d,_0x2f0219=_0x19471b[_0x588e28(0x91)]('id'),_0x3aeb1f=_0x19471b[_0x588e28(0xab)](_0x588e28(0x8a)),_0x57edfa=_0x19471b[_0x588e28(0x91)](_0x588e28(0x9b));let _0x44a8b2;_0x3aeb1f?(_0x44a8b2=await listDatasets(_0x19471b['appCode'],{'code':_0x3aeb1f}),_0x44a8b2=_0x44a8b2[_0x588e28(0xa5)](_0x285e6d=>_0x285e6d[_0x588e28(0x8a)]===_0x3aeb1f)):(_0x44a8b2=await listDatasets(_0x19471b[_0x588e28(0xa4)]),_0x2f0219>0x0&&(_0x44a8b2=_0x44a8b2[_0x588e28(0xa5)](_0x28b184=>_0x28b184['id']===_0x2f0219)),_0x57edfa>0x0&&(_0x44a8b2=_0x44a8b2[_0x588e28(0xa5)](_0xbd2813=>_0xbd2813[_0x588e28(0x7b)]?.[_0x588e28(0x99)]===_0x57edfa)));const _0x11c20a=_0x44a8b2['map'](normalizeTarget);if(_0x11c20a[_0x588e28(0xa7)]===0x0){const _0x34b662=_0x3aeb1f||(_0x2f0219>0x0?'id='+_0x2f0219:_0x588e28(0xaa)+_0x57edfa);throw CliErrors[_0x588e28(0x81)](_0x588e28(0x94)+_0x34b662+'.');}const _0x590653=_0x19471b[_0x588e28(0x91)](_0x588e28(0x8f));if(_0x590653>0x0&&_0x11c20a['length']!==_0x590653)throw CliErrors[_0x588e28(0x81)](_0x588e28(0x88)+_0x11c20a[_0x588e28(0xa7)]+_0x588e28(0x7d)+_0x590653+'.');return _0x11c20a;}function normalizeTarget(_0x212fe0){const _0x13c162=a62_0x107c0d,_0x4bc197=_0x212fe0[_0x13c162(0x7b)]??{};return{'id':_0x212fe0['id'],'code':_0x212fe0[_0x13c162(0x8a)],'name':_0x212fe0['name'],'description':_0x212fe0[_0x13c162(0xa8)],'source':_0x212fe0['source'],'dbId':_0x4bc197[_0x13c162(0x99)],'dbName':_0x4bc197[_0x13c162(0x79)],'tableName':_0x4bc197[_0x13c162(0xa3)],'relatedPageCount':Array[_0x13c162(0x9e)](_0x212fe0[_0x13c162(0x90)])?_0x212fe0[_0x13c162(0x90)][_0x13c162(0xa7)]:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x89493f=a63_0x4bee;(function(_0x3463c2,_0x570944){const _0xba8bbf=a63_0x4bee,_0x535ae5=_0x3463c2();while(!![]){try{const _0x1e7b84=-parseInt(_0xba8bbf(0xb2))/0x1*(-parseInt(_0xba8bbf(0xbc))/0x2)+parseInt(_0xba8bbf(0xab))/0x3+parseInt(_0xba8bbf(0xd9))/0x4*(-parseInt(_0xba8bbf(0xef))/0x5)+parseInt(_0xba8bbf(0xf6))/0x6+-parseInt(_0xba8bbf(0xc0))/0x7+-parseInt(_0xba8bbf(0xdf))/0x8*(parseInt(_0xba8bbf(0xa7))/0x9)+parseInt(_0xba8bbf(0xd1))/0xa;if(_0x1e7b84===_0x570944)break;else _0x535ae5['push'](_0x535ae5['shift']());}catch(_0x50d59a){_0x535ae5['push'](_0x535ae5['shift']());}}}(a63_0x215f,0xdaea5));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a63_0x215f(){const _0x558ae=['bizRelationType','read','dbId','operations','columnCodeListWithDeleted','responseFields','requestFields','toDatasetName','allFields','deleted','relations','entries','method','toFieldLabel','5584415LYqJws','extend','pkField','modifierNameField','name','dbName','creatorIdField','8179158yhgRau','split','modifierIdField','relatedPageInfoList','afterScriptId','responseBody','requestBody','detail','108cAKMKk','toTableName','creatorNameField','relationId','826974GwMnIp','code','dbType','title','options','str','push','61417jAnJeg','toDatasetCode','isArray','toField','modelId','labelField','dbtableConfig','validateRules','map','dataset','28CHHReX','tableName','updateTimeField','doType','5875268OunIoR','fromField','object','cardinality','formatRules','parse','dataType','displayName','filter','createTimeField','allFieldNames','beforeScriptId','properties','length','required','dblinkInfoDTO','path','4008510hytXfm','string','description','source','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','datasetKey','main_sub','tableComment','4sHLwAK','host','sourceType','trim','modelCode','fields','31104YysCME','logicField'];a63_0x215f=function(){return _0x558ae;};return a63_0x215f();}function normalizeField(_0xe418ef){const _0x16dc0a=a63_0x4bee;if(_0xe418ef['deleted'])return null;const _0x40069c=Boolean(_0xe418ef[_0x16dc0a(0xc7)]!==undefined||_0xe418ef[_0x16dc0a(0xbf)]!==undefined);let _0x19bc05={};if(!_0x40069c&&typeof _0xe418ef[_0x16dc0a(0xf0)]===_0x16dc0a(0xd2))try{_0x19bc05=JSON[_0x16dc0a(0xc5)](_0xe418ef[_0x16dc0a(0xf0)]);}catch{}const _0x38ac9d=_0x40069c?_0xe418ef['name']:_0xe418ef[_0x16dc0a(0xac)],_0x26c5c0=_0x40069c?_0xe418ef[_0x16dc0a(0xc7)]:_0xe418ef[_0x16dc0a(0xf3)],_0x4ec8f2=_0x40069c?_0xe418ef[_0x16dc0a(0xbf)]:_0xe418ef['type']||_0xe418ef[_0x16dc0a(0xc6)],_0x44a81d=_0x40069c?_0xe418ef[_0x16dc0a(0xf1)]===!![]:_0x19bc05[_0x16dc0a(0xf1)]===!![],_0x2a8e0f=_0x40069c?_0xe418ef[_0x16dc0a(0xce)]===!![]:_0x19bc05[_0x16dc0a(0xce)]===!![],_0x344c16=_0x40069c?_0xe418ef['options']??null:_0x19bc05['options']??null,_0x2e649c={'name':_0x38ac9d,'displayName':_0x26c5c0||_0x38ac9d,'type':_0x4ec8f2,'dbType':_0xe418ef[_0x16dc0a(0xad)],'pk':_0x44a81d,'required':_0x2a8e0f,'deprecated':_0xe418ef['deprecated']===!![],'description':_0xe418ef['description']||undefined};return Array[_0x16dc0a(0xb4)](_0x344c16)&&_0x344c16['length']>0x0&&(_0x2e649c[_0x16dc0a(0xaf)]=_0x344c16),_0x2e649c;}function parseJsonMaybe(_0x145cff){const _0x6f92f2=a63_0x4bee;if(typeof _0x145cff!==_0x6f92f2(0xd2))return _0x145cff;try{return JSON[_0x6f92f2(0xc5)](_0x145cff);}catch{return _0x145cff;}}function a63_0x4bee(_0xc3bbf9,_0x935bc2){_0xc3bbf9=_0xc3bbf9-0xa4;const _0x215f26=a63_0x215f();let _0x4bee24=_0x215f26[_0xc3bbf9];return _0x4bee24;}function normalizeOperationEntry(_0x59b27d,_0x499006){const _0x436824=a63_0x4bee;if(!_0x499006||typeof _0x499006!==_0x436824(0xc2))return null;if(!_0x499006[_0x436824(0xed)]||!_0x499006[_0x436824(0xd0)])return null;const _0x1dad07={'name':_0x59b27d,'method':_0x499006[_0x436824(0xed)],'path':_0x499006[_0x436824(0xd0)]};if(_0x499006['host'])_0x1dad07[_0x436824(0xda)]=_0x499006[_0x436824(0xda)];if(_0x499006[_0x436824(0xa5)]!=null){const _0x70dd1c=parseJsonMaybe(_0x499006['requestBody']);_0x1dad07[_0x436824(0xa5)]=_0x70dd1c;}if(_0x499006[_0x436824(0xa4)]!=null){const _0x4acaf3=parseJsonMaybe(_0x499006[_0x436824(0xa4)]);_0x1dad07[_0x436824(0xa4)]=_0x4acaf3;}if(_0x499006['beforeScriptId']!=null)_0x1dad07['beforeScriptId']=_0x499006[_0x436824(0xcb)];if(_0x499006[_0x436824(0xfa)]!=null)_0x1dad07[_0x436824(0xfa)]=_0x499006[_0x436824(0xfa)];if(Array[_0x436824(0xb4)](_0x499006['requestFields']))_0x1dad07[_0x436824(0xe7)]=_0x499006[_0x436824(0xe7)];if(Array[_0x436824(0xb4)](_0x499006['responseFields']))_0x1dad07[_0x436824(0xe6)]=_0x499006[_0x436824(0xe6)];return _0x1dad07;}function summarizeDbtable(_0x2eea8e){const _0x4a33b4=a63_0x4bee,_0x6acdc1={},_0x11ad30=['dbId',_0x4a33b4(0xf4),_0x4a33b4(0xbd),_0x4a33b4(0xd6),_0x4a33b4(0xf1),'allFields',_0x4a33b4(0xe0),_0x4a33b4(0xc9),_0x4a33b4(0xbe),_0x4a33b4(0xf5),_0x4a33b4(0xa9),_0x4a33b4(0xf8),_0x4a33b4(0xf2),_0x4a33b4(0xb7),_0x4a33b4(0xcf)];for(const _0x15f8f4 of _0x11ad30){if(_0x2eea8e[_0x15f8f4]!==undefined)_0x6acdc1[_0x15f8f4]=_0x2eea8e[_0x15f8f4];}return typeof _0x6acdc1[_0x4a33b4(0xe9)]===_0x4a33b4(0xd2)&&_0x6acdc1[_0x4a33b4(0xe9)][_0x4a33b4(0xcd)]>0x0&&(_0x6acdc1[_0x4a33b4(0xca)]=_0x6acdc1[_0x4a33b4(0xe9)][_0x4a33b4(0xf7)](',')[_0x4a33b4(0xba)](_0x230da4=>_0x230da4[_0x4a33b4(0xdc)]())[_0x4a33b4(0xc8)](Boolean)),_0x6acdc1;}function normalizeRelatedPages(_0x3bba52){const _0x104f50=a63_0x4bee;if(!Array['isArray'](_0x3bba52))return[];return _0x3bba52[_0x104f50(0xc8)](_0x3bb449=>_0x3bb449&&typeof _0x3bb449===_0x104f50(0xc2))[_0x104f50(0xba)](_0x34ee17=>({'id':_0x34ee17['id'],'type':_0x34ee17['type'],'code':_0x34ee17[_0x104f50(0xac)],'title':_0x34ee17[_0x104f50(0xae)],'deleted':_0x34ee17[_0x104f50(0xea)]===!![]}));}export const datasetDetail={'service':a63_0x89493f(0xbb),'command':a63_0x89493f(0xa6),'description':a63_0x89493f(0xd5),'risk':a63_0x89493f(0xe2),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':a63_0x89493f(0xd2),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x1db84b){const _0x122f11=a63_0x89493f,_0x3345f4=await getDatasetDetail(_0x1db84b[_0x122f11(0xb0)](_0x122f11(0xac))),_0x2b07e4=Array[_0x122f11(0xb4)](_0x3345f4[_0x122f11(0xde)])?_0x3345f4['fields']:Array[_0x122f11(0xb4)](_0x3345f4[_0x122f11(0xcc)])?_0x3345f4['properties']:[],_0x440a9b=_0x2b07e4['map'](_0x3d5d4f=>normalizeField(_0x3d5d4f))['filter'](_0x2cdd05=>_0x2cdd05!==null),_0x16443e=_0x3345f4[_0x122f11(0xe4)]??{},_0x414f26=[];for(const [_0x2b4709,_0x1ab001]of Object[_0x122f11(0xec)](_0x16443e)){const _0x187e53=normalizeOperationEntry(_0x2b4709,_0x1ab001);if(_0x187e53)_0x414f26[_0x122f11(0xb1)](_0x187e53);}const _0x14f28c=_0x3345f4[_0x122f11(0xb8)]??{},_0x4ba32a=_0x3345f4[_0x122f11(0xbb)]??{},_0x5d828e=_0x14f28c[_0x122f11(0xe3)]!=null?{'id':_0x14f28c[_0x122f11(0xe3)],'name':_0x14f28c['dbName']??null}:undefined;let _0x154be3;return typeof _0x3345f4['extend']===_0x122f11(0xd2)&&(_0x154be3=parseJsonMaybe(_0x3345f4[_0x122f11(0xf0)])),{'ok':!![],'data':{'id':_0x3345f4[_0x122f11(0xb6)]??_0x3345f4['id'],'name':_0x3345f4[_0x122f11(0xf3)],'code':_0x3345f4['modelCode']||_0x3345f4[_0x122f11(0xac)],'doVersion':_0x3345f4['doVersion'],'description':_0x3345f4[_0x122f11(0xd3)]||_0x4ba32a[_0x122f11(0xd8)]||undefined,'source':_0x3345f4[_0x122f11(0xd4)]||_0x4ba32a[_0x122f11(0xdb)],'table':_0x14f28c[_0x122f11(0xbd)]||_0x4ba32a[_0x122f11(0xbd)],'datasetKey':_0x14f28c['datasetKey'],'pk':_0x14f28c[_0x122f11(0xf1)],'db':_0x5d828e,'dbtable':summarizeDbtable(_0x14f28c),'fields':_0x440a9b,'operations':_0x414f26,'indexes':Array[_0x122f11(0xb4)](_0x4ba32a['indexes'])?_0x4ba32a['indexes']:[],'relations':Array[_0x122f11(0xb4)](_0x3345f4[_0x122f11(0xeb)])?_0x3345f4[_0x122f11(0xeb)][_0x122f11(0xba)](_0x429bc8=>({..._0x429bc8[_0x122f11(0xaa)]!=null?{'relationId':_0x429bc8[_0x122f11(0xaa)]}:{},'fromDataset':_0x3345f4[_0x122f11(0xf3)],'fromCode':_0x3345f4[_0x122f11(0xdd)]||_0x3345f4[_0x122f11(0xac)],'fromTable':_0x14f28c[_0x122f11(0xbd)]||_0x4ba32a['tableName'],'fromField':_0x429bc8[_0x122f11(0xc1)],'toDataset':_0x429bc8[_0x122f11(0xe8)],'toCode':_0x429bc8[_0x122f11(0xb3)],'toTable':_0x429bc8[_0x122f11(0xa8)],'toField':_0x429bc8[_0x122f11(0xb5)],'labelField':_0x429bc8[_0x122f11(0xee)]||undefined,'cardinality':_0x429bc8[_0x122f11(0xc3)]||undefined,'bizRelationType':_0x429bc8[_0x122f11(0xe1)]==='main_sub'?_0x122f11(0xd7):null})):[],'relatedPages':normalizeRelatedPages(_0x3345f4[_0x122f11(0xf9)]),...Array[_0x122f11(0xb4)](_0x3345f4[_0x122f11(0xe5)])?{'columnCodeListWithDeleted':_0x3345f4['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x122f11(0xb4)](_0x3345f4['formatRules'])?_0x3345f4[_0x122f11(0xc4)]:[],'validateRules':Array[_0x122f11(0xb4)](_0x3345f4[_0x122f11(0xb9)])?_0x3345f4[_0x122f11(0xb9)]:[],..._0x154be3!==undefined?{'extend':_0x154be3}:{},'stats':{'fieldCount':_0x440a9b[_0x122f11(0xcd)],'operationCount':_0x414f26[_0x122f11(0xcd)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x534712=a64_0x32ee;(function(_0x75a6b6,_0x51c14c){const _0x5772d6=a64_0x32ee,_0x14d7ed=_0x75a6b6();while(!![]){try{const _0x1cec08=parseInt(_0x5772d6(0x189))/0x1+parseInt(_0x5772d6(0x173))/0x2+parseInt(_0x5772d6(0x18c))/0x3+parseInt(_0x5772d6(0x19c))/0x4*(parseInt(_0x5772d6(0x176))/0x5)+-parseInt(_0x5772d6(0x19b))/0x6+-parseInt(_0x5772d6(0x182))/0x7*(parseInt(_0x5772d6(0x181))/0x8)+-parseInt(_0x5772d6(0x19a))/0x9*(parseInt(_0x5772d6(0x19e))/0xa);if(_0x1cec08===_0x51c14c)break;else _0x14d7ed['push'](_0x14d7ed['shift']());}catch(_0x14dec0){_0x14d7ed['push'](_0x14d7ed['shift']());}}}(a64_0x2a5d,0x86165));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a64_0x32ee(_0x3dade4,_0x23a160){_0x3dade4=_0x3dade4-0x166;const _0x2a5dc8=a64_0x2a5d();let _0x32eec0=_0x2a5dc8[_0x3dade4];return _0x32eec0;}import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':a64_0x534712(0x178),'hint':a64_0x534712(0x166)}]]);export function parseJsonObjectFlag(_0x59f45f,_0x2c706c){const _0x2a5f04=a64_0x534712;if(!_0x59f45f)return undefined;let _0x3cc7da;try{_0x3cc7da=JSON[_0x2a5f04(0x1a6)](_0x59f45f);}catch(_0x4bc501){const _0x4c138f=_0x4bc501 instanceof Error?_0x4bc501[_0x2a5f04(0x168)]:String(_0x4bc501);throw CliErrors[_0x2a5f04(0x16c)](_0x2c706c+_0x2a5f04(0x18f)+_0x4c138f);}if(!isPlainObject(_0x3cc7da)||Array[_0x2a5f04(0x191)](_0x3cc7da))throw CliErrors[_0x2a5f04(0x16c)](_0x2c706c+'\x20must\x20be\x20a\x20JSON\x20object');return _0x3cc7da;}export function validateExtendPatchKeys(_0x2dc6f8){const _0x15ec6a=a64_0x534712,_0x5342ba=Object['keys'](_0x2dc6f8);if(_0x5342ba[_0x15ec6a(0x16a)]===0x0)throw CliErrors[_0x15ec6a(0x16c)](_0x15ec6a(0x19d));for(const _0x1cd0db of _0x5342ba){const _0x491c01=EXTEND_PATCH_REDIRECTS['get'](_0x1cd0db);if(_0x491c01)throw CliErrors[_0x15ec6a(0x16c)](_0x491c01['message'],_0x491c01[_0x15ec6a(0x180)]);if(!MUTABLE_EXTEND_KEYS['has'](_0x1cd0db))throw CliErrors[_0x15ec6a(0x16c)](_0x15ec6a(0x1a5)+_0x1cd0db,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x4ceee4=a64_0x534712,_0x155d2b=Array[_0x4ceee4(0x198)](MUTABLE_EXTEND_KEYS)[_0x4ceee4(0x18e)]();return _0x155d2b[_0x4ceee4(0x16a)]>0x0?_0x4ceee4(0x196)+_0x155d2b[_0x4ceee4(0x193)](',\x20'):_0x4ceee4(0x18a);}export function applyExtendPatch(_0xac6e6b,_0x331ccb){const _0x3ec599=a64_0x534712;validateExtendPatchKeys(_0x331ccb);const _0x47f28a=deepClone(_0xac6e6b),_0x534574=[];for(const [_0x5e0b33,_0x760b75]of Object[_0x3ec599(0x19f)](_0x331ccb)){const _0x40d75e=_0x47f28a[_0x5e0b33],_0xb39399=deepClone(_0x760b75);!deepEqual(_0x40d75e,_0xb39399)&&(_0x47f28a[_0x5e0b33]=_0xb39399,_0x534574[_0x3ec599(0x174)](_0x3ec599(0x195)+_0x5e0b33));}return _0x534574[_0x3ec599(0x18e)](),{'after':_0x47f28a,'changedPaths':_0x534574,'changed':_0x534574[_0x3ec599(0x16a)]>0x0};}export function assertExpectation(_0x543760,_0x34a7e8){const _0x273c58=a64_0x534712;if(!_0x34a7e8)return;for(const [_0x32b33f,_0x41f3d3]of Object[_0x273c58(0x19f)](_0x34a7e8)){const _0x426b60=_0x543760[_0x32b33f];if(!deepEqual(_0x426b60,_0x41f3d3))throw CliErrors[_0x273c58(0x16c)](_0x273c58(0x17e)+_0x32b33f,'Expected\x20'+JSON[_0x273c58(0x179)](_0x41f3d3)+',\x20actual\x20'+JSON[_0x273c58(0x179)](_0x426b60));}}export async function buildDatasetExtendUpdateResult({appCode:_0x215d9e,input:_0x52c48d,dryRun:_0x5b02a5}){const _0x3268fb=a64_0x534712;validateInput(_0x52c48d);const _0x172706=await getDatasetDetail(_0x52c48d[_0x3268fb(0x16e)]),_0x349234=parseDatasetExtend(_0x172706['extend']),_0x2bea21=deepClone(_0x349234[_0x3268fb(0x1a1)]);assertExpectation(_0x2bea21,_0x52c48d[_0x3268fb(0x190)]);const {after:_0x3f3a08,changedPaths:_0xc90dc1,changed:_0x2393d2}=applyExtendPatch(_0x2bea21,_0x52c48d[_0x3268fb(0x17b)]),_0x1c7f7e=summarizeDataset(_0x172706,_0x52c48d['code']);return _0x2393d2&&!_0x5b02a5&&(_0x172706[_0x3268fb(0x194)]=serializeDatasetExtend(_0x3f3a08,_0x349234['shape']),await updateDrivenData(_0x172706)),{'ok':!![],'data':{'appCode':_0x215d9e,'selector':{'code':_0x52c48d[_0x3268fb(0x16e)]},'dataset':_0x1c7f7e,'dryRun':_0x5b02a5,'changed':_0x2393d2,'changedPaths':_0xc90dc1,'before':{'extend':_0x2bea21},'after':{'extend':_0x3f3a08},'submitted':_0x2393d2&&!_0x5b02a5},'message':_0x2393d2?_0x5b02a5?_0x3268fb(0x184)+_0xc90dc1[_0x3268fb(0x193)](',\x20')+')':_0x3268fb(0x171)+_0xc90dc1['join'](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':'dataset','command':a64_0x534712(0x192),'description':a64_0x534712(0x170),'risk':a64_0x534712(0x188),'flags':[CODE_FLAG,{'name':a64_0x534712(0x17d),'type':a64_0x534712(0x172),'required':!![],'description':a64_0x534712(0x183)},{'name':'expect-json','type':a64_0x534712(0x172),'required':![],'description':a64_0x534712(0x18d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3319e2){validateInput(readExtendUpdateInput(_0x3319e2));},async 'dryRun'(_0x3a5ac3){const _0x6caf9e=a64_0x534712,_0x26c1b8=await buildDatasetExtendUpdateResult({'appCode':_0x3a5ac3['appCode'],'input':readExtendUpdateInput(_0x3a5ac3),'dryRun':!![]});return{'method':_0x6caf9e(0x16f),'url':_0x6caf9e(0x197),'body':_0x26c1b8[_0x6caf9e(0x1a2)],'description':_0x26c1b8['message']};},async 'execute'(_0x1f1b53){const _0x436e0b=a64_0x534712;return buildDatasetExtendUpdateResult({'appCode':_0x1f1b53[_0x436e0b(0x175)],'input':readExtendUpdateInput(_0x1f1b53),'dryRun':![]});}};function readExtendUpdateInput(_0x4205fe){const _0x4a0f14=a64_0x534712,_0x4ad4d1=trim(_0x4205fe['str'](_0x4a0f14(0x16e))),_0x4d3244=parseJsonObjectFlag(_0x4205fe['str'](_0x4a0f14(0x17d)),_0x4a0f14(0x177)),_0x241667=parseJsonObjectFlag(_0x4205fe[_0x4a0f14(0x186)](_0x4a0f14(0x17f)),'--expect-json');return{'code':_0x4ad4d1,'patch':_0x4d3244||{},'expect':_0x241667};}function validateInput(_0x5866e0){const _0x43bce2=a64_0x534712;if(!_0x5866e0[_0x43bce2(0x16e)])throw CliErrors[_0x43bce2(0x16c)](_0x43bce2(0x17c));validateExtendPatchKeys(_0x5866e0[_0x43bce2(0x17b)]);}function parseDatasetExtend(_0x55e04e){const _0x166073=a64_0x534712;if(typeof _0x55e04e===_0x166073(0x172)){const _0x31c2f1=_0x55e04e['trim']();if(!_0x31c2f1)return{'value':{},'shape':'string'};let _0x24747e;try{_0x24747e=JSON[_0x166073(0x1a6)](_0x31c2f1);}catch(_0x520def){const _0x1c0b8e=_0x520def instanceof Error?_0x520def[_0x166073(0x168)]:String(_0x520def);throw CliErrors['validation'](_0x166073(0x1a3)+_0x1c0b8e);}if(!isPlainObject(_0x24747e)||Array[_0x166073(0x191)](_0x24747e))throw CliErrors[_0x166073(0x16c)](_0x166073(0x1a0));return{'value':_0x24747e,'shape':_0x166073(0x172)};}if(_0x55e04e===undefined||_0x55e04e===null)return{'value':{},'shape':_0x166073(0x172)};if(!isPlainObject(_0x55e04e)||Array[_0x166073(0x191)](_0x55e04e))throw CliErrors[_0x166073(0x16c)](_0x166073(0x1a0));return{'value':_0x55e04e,'shape':'object'};}function serializeDatasetExtend(_0x396fee,_0x353edf){return _0x353edf==='string'?JSON['stringify'](_0x396fee):_0x396fee;}function summarizeDataset(_0x556a7e,_0x29d38b){const _0x456141=a64_0x534712,_0x19cb7d=isPlainObject(_0x556a7e[_0x456141(0x169)])?_0x556a7e[_0x456141(0x169)]:{},_0x1222c8=isPlainObject(_0x556a7e[_0x456141(0x18b)])?_0x556a7e[_0x456141(0x18b)]:{};return{'id':_0x556a7e[_0x456141(0x1a4)]??_0x556a7e['id']??_0x19cb7d[_0x456141(0x16b)]??null,'code':_0x556a7e[_0x456141(0x17a)]??_0x556a7e[_0x456141(0x16e)]??_0x19cb7d[_0x456141(0x199)]??_0x29d38b,'name':_0x556a7e[_0x456141(0x185)]??_0x19cb7d[_0x456141(0x187)]??null,'table':_0x1222c8[_0x456141(0x16d)]??_0x19cb7d['tableName']??null,'db':_0x1222c8['dbName']??_0x1222c8['dbId']??null};}function a64_0x2a5d(){const _0x5b2a8c=['tableName','code','POST','Patch\x20dataset\x20top-level\x20extend\x20safely','Updated\x20dataset\x20extend\x20(','string','1538482KRcBdo','push','appCode','685DORYwm','--patch-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','stringify','modelCode','patch','--code\x20is\x20required','patch-json','Expectation\x20mismatch\x20at\x20extend.','expect-json','hint','8488ybebKt','4445mhrjLC','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','name','str','datasetName','write','958681hyhwqa','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','dbtableConfig','578667dWgSoz','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','sort','\x20must\x20be\x20valid\x20JSON\x20object:\x20','expect','isArray','extend-update','join','extend','extend.','Allowed\x20keys:\x20','/smartapi/dataset/update-driven-data','from','datasetCode','18zgYUHb','5410224AGvHqi','27740TXbEfQ','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','3731230FyNIPl','entries','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','value','data','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','modelId','Unsupported\x20patch\x20key:\x20','parse','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','object','message','dataset','length','datasetId','validation'];a64_0x2a5d=function(){return _0x5b2a8c;};return a64_0x2a5d();}function deepClone(_0x510446){const _0x1f34df=a64_0x534712;if(_0x510446===undefined)return _0x510446;return JSON[_0x1f34df(0x1a6)](JSON['stringify'](_0x510446));}function deepEqual(_0x524545,_0x55336c){const _0x9e89a1=a64_0x534712;return JSON[_0x9e89a1(0x179)](_0x524545)===JSON[_0x9e89a1(0x179)](_0x55336c);}function isPlainObject(_0x1d8681){const _0x528bf8=a64_0x534712;return Boolean(_0x1d8681)&&typeof _0x1d8681===_0x528bf8(0x167)&&!Array['isArray'](_0x1d8681);}function trim(_0x133559){const _0x3b9a16=String(_0x133559||'')['trim']();return _0x3b9a16;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x5dfe2e=a65_0x5e77;(function(_0x4734ec,_0x5c9e67){const _0x556057=a65_0x5e77,_0x158542=_0x4734ec();while(!![]){try{const _0x56657e=-parseInt(_0x556057(0x139))/0x1+parseInt(_0x556057(0x13e))/0x2+-parseInt(_0x556057(0x10d))/0x3+parseInt(_0x556057(0x10e))/0x4*(-parseInt(_0x556057(0x127))/0x5)+-parseInt(_0x556057(0x118))/0x6+parseInt(_0x556057(0x132))/0x7+parseInt(_0x556057(0x14a))/0x8;if(_0x56657e===_0x5c9e67)break;else _0x158542['push'](_0x158542['shift']());}catch(_0x4799e0){_0x158542['push'](_0x158542['shift']());}}}(a65_0x4c91,0x6f462));function a65_0x5e77(_0xbc63d0,_0x4f140c){_0xbc63d0=_0xbc63d0-0x105;const _0x4c9192=a65_0x4c91();let _0x5e77e6=_0x4c9192[_0xbc63d0];return _0x5e77e6;}import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const MUTABLE_FIELD_KEYS=new Set([a65_0x5dfe2e(0x14c),'displayName',a65_0x5dfe2e(0x14e),a65_0x5dfe2e(0x124),a65_0x5dfe2e(0x106),'datetimeFormat',a65_0x5dfe2e(0x107),a65_0x5dfe2e(0x12e),a65_0x5dfe2e(0x138)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x5dfe2e(0x14f),'code','dbType','dbTypeLen','dbTypeScale','dbFieldName',a65_0x5dfe2e(0x128),a65_0x5dfe2e(0x150),a65_0x5dfe2e(0x10a),a65_0x5dfe2e(0x140),a65_0x5dfe2e(0x152)]);function a65_0x4c91(){const _0x3e5300=['Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','pkField','has','field','2485287NzdnpZ','391484jedkWZ','size','datasetName','\x20would\x20change\x20(','trim','POST','join','/smartapi/dataset/update-driven-data','findIndex','--field\x20is\x20required','2440146KHOeUL','modelId','code','Expectation\x20mismatch\x20at\x20','datasetId','expect-json','from','properties','--expect-json','--code\x20is\x20required','patch','Field\x20not\x20found:\x20','options','Updated\x20dataset\x20field\x20','message','40bTmdaW','tableName','fields','string','Expected\x20','Allowed\x20keys:\x20','entries','chartRole','object','--patch-json','data','17227XNZhbo','parse','validation','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','length','stringify','deprecated','583879tDuwwl','Exact\x20raw\x20fields[].name\x20to\x20patch','str','expect','dataset','1599506NPbxzv','dbtableConfig','autoIncrement','write','keys','\x20must\x20be\x20valid\x20JSON\x20object:\x20','isArray','appCode','No\x20changes\x20for\x20dataset\x20field\x20','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','field-update','modelCode','18044248gBGbeu','dbName','doType','Forbidden\x20patch\x20key:\x20','description','name','deleted','add','systemRetain','patch-json','JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing','required','defaultAggregation','Dry-run:\x20dataset\x20field\x20'];a65_0x4c91=function(){return _0x3e5300;};return a65_0x4c91();}export function parseJsonObjectFlag(_0x59e863,_0x40a9d6){const _0x47de23=a65_0x5dfe2e;if(!_0x59e863)return undefined;let _0xc3a651;try{_0xc3a651=JSON[_0x47de23(0x133)](_0x59e863);}catch(_0x1a5225){const _0x17b3bb=_0x1a5225 instanceof Error?_0x1a5225[_0x47de23(0x126)]:String(_0x1a5225);throw CliErrors[_0x47de23(0x134)](_0x40a9d6+_0x47de23(0x143)+_0x17b3bb);}if(!isPlainObject(_0xc3a651)||Array[_0x47de23(0x144)](_0xc3a651))throw CliErrors[_0x47de23(0x134)](_0x40a9d6+'\x20must\x20be\x20a\x20JSON\x20object');return _0xc3a651;}export function validatePatchKeys(_0x2ef81d){const _0x1c534e=a65_0x5dfe2e,_0x3260f0=Object[_0x1c534e(0x142)](_0x2ef81d);if(_0x3260f0[_0x1c534e(0x136)]===0x0)throw CliErrors['validation'](_0x1c534e(0x135));for(const _0x74af21 of _0x3260f0){if(FORBIDDEN_FIELD_KEYS[_0x1c534e(0x10b)](_0x74af21))throw CliErrors[_0x1c534e(0x134)](_0x1c534e(0x14d)+_0x74af21);if(!MUTABLE_FIELD_KEYS[_0x1c534e(0x10b)](_0x74af21))throw CliErrors['validation']('Unsupported\x20patch\x20key:\x20'+_0x74af21,_0x1c534e(0x12c)+Array[_0x1c534e(0x11e)](MUTABLE_FIELD_KEYS)[_0x1c534e(0x114)](',\x20'));}}export function applyFieldPatch(_0x261db7,_0x3d36d5){const _0x2d7e53=a65_0x5dfe2e;validatePatchKeys(_0x3d36d5);const _0x527fa8=deepClone(_0x261db7),_0x13f7ee=new Set();for(const [_0x35c08c,_0x58bff4]of Object['entries'](_0x3d36d5)){const _0x3ff468=_0x527fa8[_0x35c08c],_0x2c2d5b=mergePatchValue(_0x3ff468,_0x58bff4);!deepEqual(_0x3ff468,_0x2c2d5b)&&(_0x527fa8[_0x35c08c]=_0x2c2d5b,_0x13f7ee[_0x2d7e53(0x151)](_0x35c08c),collectChangedPaths(_0x35c08c,_0x3ff468,_0x2c2d5b,_0x13f7ee));}return{'after':_0x527fa8,'changedPaths':Array[_0x2d7e53(0x11e)](_0x13f7ee)['sort'](),'changed':_0x13f7ee[_0x2d7e53(0x10f)]>0x0};}export function assertExpectation(_0x3ae9b7,_0x2c424e){const _0x13cec6=a65_0x5dfe2e;if(!_0x2c424e)return;for(const [_0x376607,_0x3ce3c1]of Object[_0x13cec6(0x12d)](_0x2c424e)){const _0x1c581e=_0x3ae9b7[_0x376607];if(!deepEqual(_0x1c581e,_0x3ce3c1))throw CliErrors[_0x13cec6(0x134)](_0x13cec6(0x11b)+_0x376607,_0x13cec6(0x12b)+JSON[_0x13cec6(0x137)](_0x3ce3c1)+',\x20actual\x20'+JSON[_0x13cec6(0x137)](_0x1c581e));}}export async function buildDatasetFieldUpdateResult({appCode:_0x5c993c,input:_0x452335,dryRun:_0x16fde2}){const _0x33ff6f=a65_0x5dfe2e;validateInput(_0x452335);const _0xf2151=await getDatasetDetail(_0x452335[_0x33ff6f(0x11a)]),_0x22db3c=readFieldArray(_0xf2151),_0x1ad299=_0x22db3c[_0x33ff6f(0x116)](_0x2d7747=>_0x2d7747?.[_0x33ff6f(0x14f)]===_0x452335['field']);if(_0x1ad299<0x0)throw CliErrors['validation'](_0x33ff6f(0x123)+_0x452335['field']);const _0x4afc01=deepClone(_0x22db3c[_0x1ad299]);assertExpectation(_0x4afc01,_0x452335[_0x33ff6f(0x13c)]);const {after:_0x14cb67,changedPaths:_0x1df220,changed:_0x40d924}=applyFieldPatch(_0x4afc01,_0x452335['patch']),_0x418fee=summarizeDataset(_0xf2151,_0x452335['code']);return _0x40d924&&!_0x16fde2&&(_0x22db3c[_0x1ad299]=_0x14cb67,await updateDrivenData(_0xf2151)),{'ok':!![],'data':{'appCode':_0x5c993c,'selector':{'code':_0x452335['code']},'dataset':_0x418fee,'field':{'id':_0x4afc01['id']??null,'name':_0x4afc01[_0x33ff6f(0x14f)]},'dryRun':_0x16fde2,'changed':_0x40d924,'changedPaths':_0x1df220,'before':_0x4afc01,'after':_0x14cb67,'submitted':_0x40d924&&!_0x16fde2},'message':_0x40d924?_0x16fde2?_0x33ff6f(0x108)+_0x452335[_0x33ff6f(0x10c)]+_0x33ff6f(0x111)+_0x1df220['join'](',\x20')+')':_0x33ff6f(0x125)+_0x452335['field']+'\x20('+_0x1df220['join'](',\x20')+')':_0x33ff6f(0x146)+_0x452335[_0x33ff6f(0x10c)]};}export const datasetFieldUpdate={'service':a65_0x5dfe2e(0x13d),'command':a65_0x5dfe2e(0x148),'description':a65_0x5dfe2e(0x109),'risk':a65_0x5dfe2e(0x141),'flags':[CODE_FLAG,{'name':'field','type':a65_0x5dfe2e(0x12a),'required':!![],'description':a65_0x5dfe2e(0x13a)},{'name':a65_0x5dfe2e(0x153),'type':'string','required':!![],'description':'JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated'},{'name':a65_0x5dfe2e(0x11d),'type':a65_0x5dfe2e(0x12a),'required':![],'description':a65_0x5dfe2e(0x105)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29300d){validateInput(readFieldUpdateInput(_0x29300d));},async 'dryRun'(_0x234277){const _0x2f5092=a65_0x5dfe2e,_0x5d3b14=await buildDatasetFieldUpdateResult({'appCode':_0x234277[_0x2f5092(0x145)],'input':readFieldUpdateInput(_0x234277),'dryRun':!![]});return{'method':_0x2f5092(0x113),'url':_0x2f5092(0x115),'body':_0x5d3b14[_0x2f5092(0x131)],'description':_0x5d3b14['message']};},async 'execute'(_0x41b953){const _0x2898d2=a65_0x5dfe2e;return buildDatasetFieldUpdateResult({'appCode':_0x41b953[_0x2898d2(0x145)],'input':readFieldUpdateInput(_0x41b953),'dryRun':![]});}};function readFieldUpdateInput(_0x4056f5){const _0x4f0e13=a65_0x5dfe2e,_0xf8e8d6=trim(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x11a))),_0x2e6684=emptyToUndefined(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x10c))),_0x3c8308=parseJsonObjectFlag(_0x4056f5[_0x4f0e13(0x13b)](_0x4f0e13(0x153)),_0x4f0e13(0x130)),_0x2f95cd=parseJsonObjectFlag(_0x4056f5['str'](_0x4f0e13(0x11d)),_0x4f0e13(0x120));return{'code':_0xf8e8d6,'field':_0x2e6684||'','patch':_0x3c8308||{},'expect':_0x2f95cd};}function validateInput(_0x4295d7){const _0x1de812=a65_0x5dfe2e;if(!_0x4295d7['code'])throw CliErrors[_0x1de812(0x134)](_0x1de812(0x121));if(!_0x4295d7[_0x1de812(0x10c)])throw CliErrors[_0x1de812(0x134)](_0x1de812(0x117));validatePatchKeys(_0x4295d7[_0x1de812(0x122)]);}function readFieldArray(_0x2a5e91){const _0x2da875=a65_0x5dfe2e;if(Array[_0x2da875(0x144)](_0x2a5e91['fields']))return _0x2a5e91[_0x2da875(0x129)];if(Array[_0x2da875(0x144)](_0x2a5e91[_0x2da875(0x11f)]))return _0x2a5e91[_0x2da875(0x11f)];throw CliErrors['validation'](_0x2da875(0x147));}function summarizeDataset(_0x39180b,_0x4c9d08){const _0x4063a7=a65_0x5dfe2e,_0x10c803=isPlainObject(_0x39180b[_0x4063a7(0x13d)])?_0x39180b[_0x4063a7(0x13d)]:{},_0x5b3c05=isPlainObject(_0x39180b[_0x4063a7(0x13f)])?_0x39180b['dbtableConfig']:{};return{'id':_0x39180b[_0x4063a7(0x119)]??_0x39180b['id']??_0x10c803[_0x4063a7(0x11c)]??null,'code':_0x39180b[_0x4063a7(0x149)]??_0x39180b['code']??_0x10c803['datasetCode']??_0x4c9d08,'name':_0x39180b[_0x4063a7(0x14f)]??_0x10c803[_0x4063a7(0x110)]??null,'table':_0x5b3c05[_0x4063a7(0x128)]??_0x10c803[_0x4063a7(0x128)]??null,'db':_0x5b3c05[_0x4063a7(0x14b)]??_0x5b3c05['dbId']??null};}function mergePatchValue(_0x33bfe9,_0x26b8f8){if(isPlainObject(_0x33bfe9)&&isPlainObject(_0x26b8f8))return deepMerge(_0x33bfe9,_0x26b8f8);return deepClone(_0x26b8f8);}function deepMerge(_0x1e0ea,_0x342983){const _0x319ff8=deepClone(_0x1e0ea);for(const [_0x2e4a6b,_0x427506]of Object['entries'](_0x342983)){_0x319ff8[_0x2e4a6b]=isPlainObject(_0x319ff8[_0x2e4a6b])&&isPlainObject(_0x427506)?deepMerge(_0x319ff8[_0x2e4a6b],_0x427506):deepClone(_0x427506);}return _0x319ff8;}function collectChangedPaths(_0x13be8a,_0x5e265d,_0x5b672d,_0x1b351b){const _0x48d217=a65_0x5dfe2e;if(!isPlainObject(_0x5e265d)||!isPlainObject(_0x5b672d))return;const _0x28c449=new Set([...Object[_0x48d217(0x142)](_0x5e265d),...Object[_0x48d217(0x142)](_0x5b672d)]);for(const _0x5f526a of _0x28c449){const _0xac1808=_0x5e265d[_0x5f526a],_0x357f27=_0x5b672d[_0x5f526a];!deepEqual(_0xac1808,_0x357f27)&&_0x1b351b[_0x48d217(0x151)](_0x13be8a+'.'+_0x5f526a);}}function deepClone(_0x4c682d){const _0x3d0c06=a65_0x5dfe2e;if(_0x4c682d===undefined)return _0x4c682d;return JSON[_0x3d0c06(0x133)](JSON[_0x3d0c06(0x137)](_0x4c682d));}function deepEqual(_0x23cc50,_0x27fd01){const _0x310d93=a65_0x5dfe2e;return JSON[_0x310d93(0x137)](_0x23cc50)===JSON[_0x310d93(0x137)](_0x27fd01);}function isPlainObject(_0x396a15){const _0x23399a=a65_0x5dfe2e;return Boolean(_0x396a15)&&typeof _0x396a15===_0x23399a(0x12f)&&!Array['isArray'](_0x396a15);}function emptyToUndefined(_0x423be0){const _0x281209=String(_0x423be0||'')['trim']();return _0x281209||undefined;}function trim(_0x22046a){const _0x12da08=a65_0x5dfe2e;return String(_0x22046a||'')[_0x12da08(0x112)]();}
|
|
1
|
+
const a65_0x46b2d1=a65_0x31d7;(function(_0x2b78da,_0xea9bd6){const _0x4232b4=a65_0x31d7,_0xc89591=_0x2b78da();while(!![]){try{const _0x32cb8a=parseInt(_0x4232b4(0x15d))/0x1+-parseInt(_0x4232b4(0x157))/0x2*(-parseInt(_0x4232b4(0x16a))/0x3)+-parseInt(_0x4232b4(0x16b))/0x4+parseInt(_0x4232b4(0x183))/0x5+-parseInt(_0x4232b4(0x162))/0x6+-parseInt(_0x4232b4(0x19c))/0x7*(-parseInt(_0x4232b4(0x166))/0x8)+-parseInt(_0x4232b4(0x197))/0x9*(-parseInt(_0x4232b4(0x185))/0xa);if(_0x32cb8a===_0xea9bd6)break;else _0xc89591['push'](_0xc89591['shift']());}catch(_0x53efac){_0xc89591['push'](_0xc89591['shift']());}}}(a65_0x4760,0xbd8c6));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_0x46b2d1(0x18f),a65_0x46b2d1(0x16d),a65_0x46b2d1(0x19f),a65_0x46b2d1(0x173),a65_0x46b2d1(0x15b),a65_0x46b2d1(0x171),a65_0x46b2d1(0x194),'chartRole',a65_0x46b2d1(0x17b)]),FORBIDDEN_FIELD_KEYS=new Set(['id',a65_0x46b2d1(0x16e),a65_0x46b2d1(0x15e),'dbType','dbTypeLen','dbTypeScale',a65_0x46b2d1(0x156),'tableName','deleted',a65_0x46b2d1(0x17c),a65_0x46b2d1(0x195),'systemRetain']);export function parseJsonObjectFlag(_0x11a7fe,_0x4b21c1){const _0x44a45a=a65_0x46b2d1;if(!_0x11a7fe)return undefined;let _0x287d68;try{_0x287d68=JSON[_0x44a45a(0x187)](_0x11a7fe);}catch(_0x2a1ccb){const _0x4ac79b=_0x2a1ccb instanceof Error?_0x2a1ccb['message']:String(_0x2a1ccb);throw CliErrors[_0x44a45a(0x189)](_0x4b21c1+_0x44a45a(0x196)+_0x4ac79b);}if(!isPlainObject(_0x287d68)||Array['isArray'](_0x287d68))throw CliErrors[_0x44a45a(0x189)](_0x4b21c1+_0x44a45a(0x181));return _0x287d68;}export function validatePatchKeys(_0x2418e7){const _0x456ba1=a65_0x46b2d1,_0xb69455=Object['keys'](_0x2418e7);if(_0xb69455[_0x456ba1(0x180)]===0x0)throw CliErrors[_0x456ba1(0x189)](_0x456ba1(0x172));for(const _0x1f7e04 of _0xb69455){if(FORBIDDEN_FIELD_KEYS[_0x456ba1(0x174)](_0x1f7e04))throw CliErrors['validation'](_0x456ba1(0x155)+_0x1f7e04);if(!MUTABLE_FIELD_KEYS[_0x456ba1(0x174)](_0x1f7e04))throw CliErrors[_0x456ba1(0x189)](_0x456ba1(0x178)+_0x1f7e04,_0x456ba1(0x19a)+Array['from'](MUTABLE_FIELD_KEYS)[_0x456ba1(0x163)](',\x20'));}}export function applyFieldPatch(_0x5504b8,_0x3acde7){const _0x5eebd5=a65_0x46b2d1;validatePatchKeys(_0x3acde7);const _0x1c19e3=deepClone(_0x5504b8),_0x49eec3=new Set();for(const [_0x14e508,_0x4ab74a]of Object[_0x5eebd5(0x17a)](_0x3acde7)){const _0x5c2e7a=_0x1c19e3[_0x14e508],_0x25c3d7=mergePatchValue(_0x5c2e7a,_0x4ab74a);!deepEqual(_0x5c2e7a,_0x25c3d7)&&(_0x1c19e3[_0x14e508]=_0x25c3d7,_0x49eec3[_0x5eebd5(0x170)](_0x14e508),collectChangedPaths(_0x14e508,_0x5c2e7a,_0x25c3d7,_0x49eec3));}return{'after':_0x1c19e3,'changedPaths':Array['from'](_0x49eec3)['sort'](),'changed':_0x49eec3[_0x5eebd5(0x193)]>0x0};}export function assertExpectation(_0x3123ce,_0x172e32){const _0x368abe=a65_0x46b2d1;if(!_0x172e32)return;for(const [_0xcc565,_0x402de5]of Object[_0x368abe(0x17a)](_0x172e32)){const _0x360fde=_0x3123ce[_0xcc565];if(!deepEqual(_0x360fde,_0x402de5))throw CliErrors['validation'](_0x368abe(0x168)+_0xcc565,_0x368abe(0x167)+JSON[_0x368abe(0x186)](_0x402de5)+_0x368abe(0x19b)+JSON['stringify'](_0x360fde));}}export async function buildDatasetFieldUpdateResult({appCode:_0x7d7db1,input:_0x40a2ad,dryRun:_0x1d6896}){const _0x534e5c=a65_0x46b2d1;validateInput(_0x40a2ad);const _0x468008=await getDatasetDetail(_0x40a2ad[_0x534e5c(0x15e)]),_0x112d81=readFieldArray(_0x468008),_0x209b41=_0x112d81[_0x534e5c(0x15c)](_0x595b81=>_0x595b81?.['name']===_0x40a2ad[_0x534e5c(0x182)]);if(_0x209b41<0x0)throw CliErrors[_0x534e5c(0x189)](_0x534e5c(0x19d)+_0x40a2ad['field']);const _0x2f1c96=deepClone(_0x112d81[_0x209b41]);assertExpectation(_0x2f1c96,_0x40a2ad[_0x534e5c(0x160)]);const {after:_0x548dbb,changedPaths:_0x4a94ce,changed:_0x1d3763}=applyFieldPatch(_0x2f1c96,_0x40a2ad[_0x534e5c(0x17f)]),_0x50d4df=summarizeDataset(_0x468008,_0x40a2ad['code']);return _0x1d3763&&!_0x1d6896&&(_0x112d81[_0x209b41]=_0x548dbb,await updateDrivenData(_0x468008)),{'ok':!![],'data':{'appCode':_0x7d7db1,'selector':{'code':_0x40a2ad[_0x534e5c(0x15e)]},'dataset':_0x50d4df,'field':{'id':_0x2f1c96['id']??null,'name':_0x2f1c96[_0x534e5c(0x16e)]},'dryRun':_0x1d6896,'changed':_0x1d3763,'changedPaths':_0x4a94ce,'before':_0x2f1c96,'after':_0x548dbb,'submitted':_0x1d3763&&!_0x1d6896},'message':_0x1d3763?_0x1d6896?_0x534e5c(0x179)+_0x40a2ad[_0x534e5c(0x182)]+_0x534e5c(0x19e)+_0x4a94ce[_0x534e5c(0x163)](',\x20')+')':_0x534e5c(0x190)+_0x40a2ad[_0x534e5c(0x182)]+'\x20('+_0x4a94ce[_0x534e5c(0x163)](',\x20')+')':_0x534e5c(0x16f)+_0x40a2ad[_0x534e5c(0x182)]};}export const datasetFieldUpdate={'service':a65_0x46b2d1(0x1a0),'command':'field-update','description':a65_0x46b2d1(0x16c),'risk':a65_0x46b2d1(0x188),'flags':[CODE_FLAG,{'name':a65_0x46b2d1(0x182),'type':a65_0x46b2d1(0x158),'required':!![],'description':'Exact\x20raw\x20fields[].name\x20to\x20patch'},{'name':a65_0x46b2d1(0x17e),'type':a65_0x46b2d1(0x158),'required':!![],'description':a65_0x46b2d1(0x184)},{'name':'expect-json','type':a65_0x46b2d1(0x158),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20field\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4d805e){validateInput(readFieldUpdateInput(_0x4d805e));},async 'dryRun'(_0x45c949){const _0x1b7873=a65_0x46b2d1,_0x4cd98a=await buildDatasetFieldUpdateResult({'appCode':_0x45c949['appCode'],'input':readFieldUpdateInput(_0x45c949),'dryRun':!![]});return{'method':_0x1b7873(0x15a),'url':_0x1b7873(0x191),'body':_0x4cd98a[_0x1b7873(0x18b)],'description':_0x4cd98a[_0x1b7873(0x18a)]};},async 'execute'(_0x5280aa){return buildDatasetFieldUpdateResult({'appCode':_0x5280aa['appCode'],'input':readFieldUpdateInput(_0x5280aa),'dryRun':![]});}};function readFieldUpdateInput(_0xb4a717){const _0x1a5ee2=a65_0x46b2d1,_0x44f253=trim(_0xb4a717[_0x1a5ee2(0x176)](_0x1a5ee2(0x15e))),_0x3a2fb8=emptyToUndefined(_0xb4a717[_0x1a5ee2(0x176)]('field')),_0x3bd57a=parseJsonObjectFlag(_0xb4a717[_0x1a5ee2(0x176)](_0x1a5ee2(0x17e)),'--patch-json'),_0x28fb87=parseJsonObjectFlag(_0xb4a717[_0x1a5ee2(0x176)](_0x1a5ee2(0x177)),_0x1a5ee2(0x15f));return{'code':_0x44f253,'field':_0x3a2fb8||'','patch':_0x3bd57a||{},'expect':_0x28fb87};}function validateInput(_0x2001ad){const _0x1a1ea4=a65_0x46b2d1;if(!_0x2001ad[_0x1a1ea4(0x15e)])throw CliErrors['validation']('--code\x20is\x20required');if(!_0x2001ad[_0x1a1ea4(0x182)])throw CliErrors[_0x1a1ea4(0x189)](_0x1a1ea4(0x161));validatePatchKeys(_0x2001ad['patch']);}function readFieldArray(_0x1b4fe6){const _0x287f8c=a65_0x46b2d1;if(Array[_0x287f8c(0x1a1)](_0x1b4fe6[_0x287f8c(0x17d)]))return _0x1b4fe6['fields'];if(Array[_0x287f8c(0x1a1)](_0x1b4fe6[_0x287f8c(0x175)]))return _0x1b4fe6[_0x287f8c(0x175)];throw CliErrors[_0x287f8c(0x189)](_0x287f8c(0x159));}function summarizeDataset(_0x56eb5f,_0xcb5e4b){const _0x447ddf=a65_0x46b2d1,_0x47b0bc=isPlainObject(_0x56eb5f[_0x447ddf(0x1a0)])?_0x56eb5f[_0x447ddf(0x1a0)]:{},_0x48b2d2=isPlainObject(_0x56eb5f[_0x447ddf(0x169)])?_0x56eb5f['dbtableConfig']:{};return{'id':_0x56eb5f[_0x447ddf(0x165)]??_0x56eb5f['id']??_0x47b0bc['datasetId']??null,'code':_0x56eb5f[_0x447ddf(0x18e)]??_0x56eb5f[_0x447ddf(0x15e)]??_0x47b0bc['datasetCode']??_0xcb5e4b,'name':_0x56eb5f[_0x447ddf(0x16e)]??_0x47b0bc['datasetName']??null,'table':_0x48b2d2[_0x447ddf(0x192)]??_0x47b0bc[_0x447ddf(0x192)]??null,'db':_0x48b2d2[_0x447ddf(0x18c)]??_0x48b2d2[_0x447ddf(0x18d)]??null};}function mergePatchValue(_0xf215ab,_0x1c51d5){if(isPlainObject(_0xf215ab)&&isPlainObject(_0x1c51d5))return deepMerge(_0xf215ab,_0x1c51d5);return deepClone(_0x1c51d5);}function deepMerge(_0x176174,_0x282b9e){const _0x198bf8=deepClone(_0x176174);for(const [_0x238d47,_0x5117bc]of Object['entries'](_0x282b9e)){_0x198bf8[_0x238d47]=isPlainObject(_0x198bf8[_0x238d47])&&isPlainObject(_0x5117bc)?deepMerge(_0x198bf8[_0x238d47],_0x5117bc):deepClone(_0x5117bc);}return _0x198bf8;}function collectChangedPaths(_0x33641a,_0x5a8175,_0x229d06,_0x389c4d){const _0x2fafad=a65_0x46b2d1;if(!isPlainObject(_0x5a8175)||!isPlainObject(_0x229d06))return;const _0x45899e=new Set([...Object['keys'](_0x5a8175),...Object[_0x2fafad(0x198)](_0x229d06)]);for(const _0x1b177c of _0x45899e){const _0x2fc3bc=_0x5a8175[_0x1b177c],_0x1ea9f2=_0x229d06[_0x1b177c];!deepEqual(_0x2fc3bc,_0x1ea9f2)&&_0x389c4d['add'](_0x33641a+'.'+_0x1b177c);}}function deepClone(_0x1be943){const _0x4f1a59=a65_0x46b2d1;if(_0x1be943===undefined)return _0x1be943;return JSON[_0x4f1a59(0x187)](JSON['stringify'](_0x1be943));}function deepEqual(_0x175d24,_0x53e1bc){const _0x3e3ce8=a65_0x46b2d1;return JSON['stringify'](_0x175d24)===JSON[_0x3e3ce8(0x186)](_0x53e1bc);}function isPlainObject(_0xc31eeb){const _0xc558da=a65_0x46b2d1;return Boolean(_0xc31eeb)&&typeof _0xc31eeb===_0xc558da(0x164)&&!Array[_0xc558da(0x1a1)](_0xc31eeb);}function emptyToUndefined(_0x43d695){const _0x30d74d=String(_0x43d695||'')['trim']();return _0x30d74d||undefined;}function trim(_0x107a19){const _0x1b6dae=a65_0x46b2d1;return String(_0x107a19||'')[_0x1b6dae(0x199)]();}function a65_0x31d7(_0x402e83,_0x5e6263){_0x402e83=_0x402e83-0x155;const _0x4760f8=a65_0x4760();let _0x31d76e=_0x4760f8[_0x402e83];return _0x31d76e;}function a65_0x4760(){const _0x5dd299=['dbId','modelCode','doType','Updated\x20dataset\x20field\x20','/smartapi/dataset/update-driven-data','tableName','size','defaultAggregation','autoIncrement','\x20must\x20be\x20valid\x20JSON\x20object:\x20','472617vxNNcr','keys','trim','Allowed\x20keys:\x20',',\x20actual\x20','1589zyIjgK','Field\x20not\x20found:\x20','\x20would\x20change\x20(','description','dataset','isArray','Forbidden\x20patch\x20key:\x20','dbFieldName','11204OhDXep','string','Driven\x20data\x20does\x20not\x20contain\x20fields[]\x20or\x20properties[]','POST','required','findIndex','692880XFEgpM','code','--expect-json','expect','--field\x20is\x20required','8095140vWQHtE','join','object','modelId','472Anjgsj','Expected\x20','Expectation\x20mismatch\x20at\x20','dbtableConfig','507svVzcK','4796776bxnIaD','Patch\x20one\x20raw\x20dataset\x20fields[]\x20field\x20object\x20safely','displayName','name','No\x20changes\x20for\x20dataset\x20field\x20','add','datetimeFormat','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','options','has','properties','str','expect-json','Unsupported\x20patch\x20key:\x20','Dry-run:\x20dataset\x20field\x20','entries','deprecated','pkField','fields','patch-json','patch','length','\x20must\x20be\x20a\x20JSON\x20object','field','4945470XYsQCZ','JSON\x20object\x20patch;\x20allowed\x20keys:\x20doType/displayName/description/options/required/datetimeFormat/defaultAggregation/chartRole/deprecated','130gKEtlt','stringify','parse','write','validation','message','data','dbName'];a65_0x4760=function(){return _0x5dd299;};return a65_0x4760();}
|