@lovrabet/rabetbase-cli 2.4.6-beta.3 → 2.4.7-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/business-groups.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.d.ts +2 -0
- package/lib/commands/kb/search.js +1 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -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/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.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/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/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +16 -0
- 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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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
- package/skills/rabetbase/SKILL.md +4 -4
- package/skills/rabetbase/references/rabetbase-kb.md +13 -3
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x15a72e=a50_0x592b;(function(_0x975936,_0x4aba09){const _0x2e3d33=a50_0x592b,_0xeb27cf=_0x975936();while(!![]){try{const _0x1294c5=parseInt(_0x2e3d33(0x1cf))/0x1*(-parseInt(_0x2e3d33(0x1c3))/0x2)+-parseInt(_0x2e3d33(0x1c7))/0x3*(parseInt(_0x2e3d33(0x1cd))/0x4)+-parseInt(_0x2e3d33(0x1c4))/0x5+parseInt(_0x2e3d33(0x1cc))/0x6+-parseInt(_0x2e3d33(0x1bf))/0x7*(-parseInt(_0x2e3d33(0x1ce))/0x8)+parseInt(_0x2e3d33(0x1bd))/0x9+parseInt(_0x2e3d33(0x1bc))/0xa*(parseInt(_0x2e3d33(0x1bb))/0xb);if(_0x1294c5===_0x4aba09)break;else _0xeb27cf['push'](_0xeb27cf['shift']());}catch(_0x4e596e){_0xeb27cf['push'](_0xeb27cf['shift']());}}}(a50_0xdb39,0x63278));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a50_0x592b(_0x25f8b8,_0x4d2789){_0x25f8b8=_0x25f8b8-0x1bb;const _0xdb3903=a50_0xdb39();let _0x592bae=_0xdb3903[_0x25f8b8];return _0x592bae;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x908b19){const _0x453b7c=a50_0x592b,_0x41ac74=_0x908b19['str']('key');if(!_0x41ac74)throw CliErrors[_0x453b7c(0x1d0)](_0x453b7c(0x1c6),_0x453b7c(0x1c1)+CLI_BIN_NAME+_0x453b7c(0x1c9));const _0x7a5f14=readConfig(),_0x5176bd=_0x41ac74==='app'?'appcode':_0x41ac74,_0x495370=_0x7a5f14[_0x5176bd];if(_0x495370===undefined)throw CliErrors[_0x453b7c(0x1d0)](_0x453b7c(0x1c2)+_0x41ac74);return{'ok':!![],'data':typeof _0x495370===_0x453b7c(0x1be)?_0x495370:{[_0x5176bd]:_0x495370},'message':typeof _0x495370===_0x453b7c(0x1be)?undefined:String(_0x495370)};}function a50_0xdb39(){const _0x55c1a2=['Missing\x20key.','609597LfkKfd','config','\x20config\x20get\x20--key\x20<key>','get','read','195672WeraYv','8wXHfwW','50936azRuYh','174770DWkWzj','validation','572STSyLh','29380aIBXNe','6985575EvwbZd','object','287EIlupY','key','Usage:\x20','Key\x20not\x20found:\x20','2STgnEz','1176530VsDmNO','string'];a50_0xdb39=function(){return _0x55c1a2;};return a50_0xdb39();}export const configGetDefinition={'service':a50_0x15a72e(0x1c8),'command':a50_0x15a72e(0x1ca),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a50_0x15a72e(0x1cb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x15a72e(0x1c0),'type':a50_0x15a72e(0x1c5),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x74ced5,_0x585457){const _0x45d130=a51_0x5e63,_0x4e5fe4=_0x74ced5();while(!![]){try{const _0x4d711e=parseInt(_0x45d130(0x85))/0x1*(-parseInt(_0x45d130(0x81))/0x2)+parseInt(_0x45d130(0x7e))/0x3+parseInt(_0x45d130(0x7f))/0x4*(-parseInt(_0x45d130(0x82))/0x5)+parseInt(_0x45d130(0x80))/0x6*(-parseInt(_0x45d130(0x7a))/0x7)+parseInt(_0x45d130(0x83))/0x8*(parseInt(_0x45d130(0x84))/0x9)+parseInt(_0x45d130(0x7c))/0xa*(-parseInt(_0x45d130(0x7d))/0xb)+parseInt(_0x45d130(0x79))/0xc*(parseInt(_0x45d130(0x7b))/0xd);if(_0x4d711e===_0x585457)break;else _0x4e5fe4['push'](_0x4e5fe4['shift']());}catch(_0xe75a5f){_0x4e5fe4['push'](_0x4e5fe4['shift']());}}}(a51_0x537b,0xc3961));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a51_0x5e63(_0x2159a7,_0x468ee4){_0x2159a7=_0x2159a7-0x79;const _0x537b4c=a51_0x537b();let _0x5e6338=_0x537b4c[_0x2159a7];return _0x5e6338;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a51_0x537b(){const _0x31527d=['2676TwtpGE','7mCSNLw','88465YvsXgm','348550RTfwQH','77CTZrgD','1985775pgGCSF','1916WQLCqH','595002ciBFGk','11282muDkjU','9910zjZGVj','200SPBrsm','484929VGdiKU','254dHMUwq'];a51_0x537b=function(){return _0x31527d;};return a51_0x537b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x9c61(_0x1256af,_0x17ee28){_0x1256af=_0x1256af-0x131;const _0xb58ce5=a52_0xb58c();let _0x9c6153=_0xb58ce5[_0x1256af];return _0x9c6153;}const a52_0x510947=a52_0x9c61;(function(_0x16183d,_0x2febf2){const _0x41175=a52_0x9c61,_0x1027b0=_0x16183d();while(!![]){try{const _0x1d7345=-parseInt(_0x41175(0x138))/0x1*(parseInt(_0x41175(0x144))/0x2)+parseInt(_0x41175(0x143))/0x3+parseInt(_0x41175(0x135))/0x4*(-parseInt(_0x41175(0x131))/0x5)+parseInt(_0x41175(0x134))/0x6*(parseInt(_0x41175(0x13b))/0x7)+-parseInt(_0x41175(0x141))/0x8*(parseInt(_0x41175(0x13a))/0x9)+-parseInt(_0x41175(0x139))/0xa+-parseInt(_0x41175(0x132))/0xb*(-parseInt(_0x41175(0x142))/0xc);if(_0x1d7345===_0x2febf2)break;else _0x1027b0['push'](_0x1027b0['shift']());}catch(_0xfa5daf){_0x1027b0['push'](_0x1027b0['shift']());}}}(a52_0xb58c,0x63a89));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x5c6597){const _0xc5c3c6=a52_0x9c61,_0x41ec50=_0x5c6597[_0xc5c3c6(0x137)](_0xc5c3c6(0x13f))?readScopedConfig(_0xc5c3c6(0x13f)):readConfig();return{'ok':!![],'data':_0x41ec50};}export const configListDefinition={'service':a52_0x510947(0x140),'command':a52_0x510947(0x13c),'description':a52_0x510947(0x136),'risk':a52_0x510947(0x13d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x510947(0x13f),'type':a52_0x510947(0x13e),'description':a52_0x510947(0x133),'default':![]}],'execute':execute};function a52_0xb58c(){const _0x253d43=['global','config','172936Tuuivp','13956VLWbYf','449466LpJyGe','452BRyxYW','27410MgWEzj','19393rLPlJh','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','3294ftpNeZ','220uspgiW','List\x20all\x20config\x20values','bool','3547YtlVZU','4403650yGLoHR','135zZvevu','966SQVIZb','list','read','boolean'];a52_0xb58c=function(){return _0x253d43;};return a52_0xb58c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x2e8231=a53_0x227f;(function(_0x4e8cf1,_0x4bc590){const _0x1fca98=a53_0x227f,_0x20c092=_0x4e8cf1();while(!![]){try{const _0x231cea=-parseInt(_0x1fca98(0x11f))/0x1*(-parseInt(_0x1fca98(0x125))/0x2)+parseInt(_0x1fca98(0x128))/0x3*(-parseInt(_0x1fca98(0x111))/0x4)+parseInt(_0x1fca98(0x103))/0x5+-parseInt(_0x1fca98(0x10a))/0x6+-parseInt(_0x1fca98(0x105))/0x7*(-parseInt(_0x1fca98(0x110))/0x8)+-parseInt(_0x1fca98(0x123))/0x9*(-parseInt(_0x1fca98(0x10c))/0xa)+parseInt(_0x1fca98(0x11d))/0xb;if(_0x231cea===_0x4bc590)break;else _0x20c092['push'](_0x20c092['shift']());}catch(_0x11be87){_0x20c092['push'](_0x20c092['shift']());}}}(a53_0x5d06,0x68b45));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';function a53_0x227f(_0x439008,_0x1864cf){_0x439008=_0x439008-0x101;const _0x5d066c=a53_0x5d06();let _0x227f56=_0x5d066c[_0x439008];return _0x227f56;}function a53_0x5d06(){const _0x26e489=['app','\x22.\x20Allowed:\x20','6417862WFkulZ','length','7TmwvXH','Project','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','env','550611yzglcl','global','81622iVkpDq','config','keys','10278knkTvf','\x20set\x20to:\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','appcode','boolean','value','Settable\x20top-level\x20keys:\x20','Usage:\x20','string','Top-level\x20key\x20\x22','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','includes','bool','riskLevel','\x20appcode\x20set\x20to:\x20','validation','Missing\x20key.','2846800pVQlcp','locale','7cVBmUk','Set\x20a\x20config\x20value','Invalid\x20locale\x20value.','Config\x20value','`,\x20`','2951766XcQCBT','key','20GjGvAN','write','Missing\x20value.','\x20workspace\x20add\x20<name>\x20--appcode\x20','169688SnEuqY','772otEBQw','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','apps','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','str','set','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Global','\x22\x20is\x20not\x20settable.','join'];a53_0x5d06=function(){return _0x26e489;};return a53_0x5d06();}async function execute(_0x3a5173){const _0x2d8f66=a53_0x227f,_0xb09c9f=_0x3a5173['str'](_0x2d8f66(0x10b)),_0x4ade07=_0x3a5173[_0x2d8f66(0x115)](_0x2d8f66(0x12d));if(!_0xb09c9f)throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x102),_0x2d8f66(0x12f)+CLI_BIN_NAME+_0x2d8f66(0x12a));if(_0x4ade07===undefined||_0x4ade07==='')throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x10e),_0x2d8f66(0x12f)+CLI_BIN_NAME+_0x2d8f66(0x12a));if(_0x4ade07['length']>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0xb09c9f))throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x131)+_0xb09c9f+_0x2d8f66(0x119),_0x2d8f66(0x12e)+getTopLevelConfigKeySummary());if(_0xb09c9f===_0x2d8f66(0x135))throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x112));if(CONFIG_ENUM_VALUES[_0xb09c9f]&&!CONFIG_ENUM_VALUES[_0xb09c9f][_0x2d8f66(0x133)](_0x4ade07))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0xb09c9f+_0x2d8f66(0x11c)+CONFIG_ENUM_VALUES[_0xb09c9f][_0x2d8f66(0x11a)](',\x20'));if(_0xb09c9f===_0x2d8f66(0x104)&&!normalizeLocale(_0x4ade07))throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x107),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x1f053e={'global':_0x3a5173[_0x2d8f66(0x134)](_0x2d8f66(0x124))},_0x34cb74=resolveWriteScope(_0x1f053e),_0x4b1af9=readScopedConfig(_0x34cb74);let _0x2ead21=_0xb09c9f,_0x13c42d=_0x4ade07;_0xb09c9f==='app'&&(_0x2ead21='appcode',delete _0x4b1af9[_0x2d8f66(0x11b)]);_0xb09c9f===_0x2d8f66(0x104)&&(_0x13c42d=normalizeLocale(_0x4ade07));if(_0xb09c9f==='env'){_0x13c42d=normalizeEnv(_0x4ade07);if(!isProduction(_0x13c42d)&&!isDaily(_0x13c42d))throw CliErrors[_0x2d8f66(0x101)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x2d8f66(0x121));}if(_0xb09c9f===_0x2d8f66(0x12b)){const _0x847bd4=_0x4b1af9['apps']&&typeof _0x4b1af9[_0x2d8f66(0x113)]==='object'?Object[_0x2d8f66(0x127)](_0x4b1af9[_0x2d8f66(0x113)]):[];if(_0x847bd4[_0x2d8f66(0x11e)]>0x0)throw CliErrors[_0x2d8f66(0x101)](_0x2d8f66(0x117),'Use\x20`'+CLI_BIN_NAME+_0x2d8f66(0x10f)+_0x13c42d+_0x2d8f66(0x109)+CLI_BIN_NAME+_0x2d8f66(0x132));const _0x8b2c21=buildCanonicalProjectConfig({..._0x4b1af9},{'appCodes':[_0x13c42d],'env':typeof _0x4b1af9[_0x2d8f66(0x122)]===_0x2d8f66(0x130)?_0x4b1af9[_0x2d8f66(0x122)]:undefined});writeScopedConfig(_0x8b2c21,_0x34cb74);const _0x1be2c4=_0x34cb74===_0x2d8f66(0x124)?_0x2d8f66(0x118):_0x2d8f66(0x120);return{'ok':!![],'message':'✓\x20'+_0x1be2c4+_0x2d8f66(0x136)+_0x13c42d+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x4b1af9[_0x2ead21]=_0x13c42d,writeScopedConfig(_0x4b1af9,_0x34cb74);const _0x26d3d1=_0x34cb74===_0x2d8f66(0x124)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x26d3d1+'\x20'+_0x2ead21+_0x2d8f66(0x129)+_0x13c42d};}export const configSetDefinition={'service':a53_0x2e8231(0x126),'command':a53_0x2e8231(0x116),'description':a53_0x2e8231(0x106),'risk':a53_0x2e8231(0x10d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a53_0x2e8231(0x10b),'type':a53_0x2e8231(0x130),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a53_0x2e8231(0x130),'description':a53_0x2e8231(0x108),'required':!![]},{'name':'global','type':a53_0x2e8231(0x12c),'description':a53_0x2e8231(0x114),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4328c9,_0x30272e){var _0x28742b=a54_0x18ef,_0xcc2f32=_0x4328c9();while(!![]){try{var _0xa221ac=-parseInt(_0x28742b(0xa3))/0x1+-parseInt(_0x28742b(0x9e))/0x2+-parseInt(_0x28742b(0x9d))/0x3*(parseInt(_0x28742b(0x9f))/0x4)+-parseInt(_0x28742b(0xa0))/0x5+-parseInt(_0x28742b(0x9b))/0x6+parseInt(_0x28742b(0xa1))/0x7*(-parseInt(_0x28742b(0xa5))/0x8)+parseInt(_0x28742b(0xa2))/0x9*(parseInt(_0x28742b(0xa6))/0xa);if(_0xa221ac===_0x30272e)break;else _0xcc2f32['push'](_0xcc2f32['shift']());}catch(_0x4210c0){_0xcc2f32['push'](_0xcc2f32['shift']());}}}(a54_0x412d,0x4da42));import{CLI_BIN_NAME}from'../../constant/cli.js';function a54_0x412d(){var _0x11a60a=['\x20init`\x20first.','6AUktRw','1007162ABDPAx','1014872UCvncO','1742765CfBDny','1876wRBedv','18KQCIUb','452949gaVcFI','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','8744QFvQbK','12486260PmofhZ','project','validation','global','442746XLjkIX'];a54_0x412d=function(){return _0x11a60a;};return a54_0x412d();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a54_0x18ef(_0x12b616,_0x248720){_0x12b616=_0x12b616-0x9a;var _0x412da7=a54_0x412d();var _0x18efdf=_0x412da7[_0x12b616];return _0x18efdf;}export function resolveWriteScope(_0x46b5ca){var _0x568039=a54_0x18ef;if(_0x46b5ca[_0x568039(0x9a)])return _0x568039(0x9a);if(!isInProject())throw CliErrors[_0x568039(0xa8)](_0x568039(0xa4),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x568039(0x9c));return _0x568039(0xa7);}export function readScopedConfig(_0x40ca26){return readConfigFile(resolveWriteConfigPath(_0x40ca26));}export function writeScopedConfig(_0x1e9606,_0x440e79){writeConfigFile(resolveWriteConfigPath(_0x440e79),_0x1e9606);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0xb8ae(_0x1ca6f3,_0x3f7cdb){_0x1ca6f3=_0x1ca6f3-0x161;const _0x42ce1a=a55_0x42ce();let _0xb8ae35=_0x42ce1a[_0x1ca6f3];return _0xb8ae35;}const a55_0xe9f276=a55_0xb8ae;(function(_0x578f7c,_0x3d1a51){const _0x12c62b=a55_0xb8ae,_0x345956=_0x578f7c();while(!![]){try{const _0x2dc64b=parseInt(_0x12c62b(0x16f))/0x1+parseInt(_0x12c62b(0x169))/0x2*(parseInt(_0x12c62b(0x170))/0x3)+parseInt(_0x12c62b(0x16c))/0x4+parseInt(_0x12c62b(0x16a))/0x5*(-parseInt(_0x12c62b(0x167))/0x6)+-parseInt(_0x12c62b(0x162))/0x7*(-parseInt(_0x12c62b(0x168))/0x8)+-parseInt(_0x12c62b(0x164))/0x9*(-parseInt(_0x12c62b(0x161))/0xa)+-parseInt(_0x12c62b(0x16e))/0xb*(parseInt(_0x12c62b(0x166))/0xc);if(_0x2dc64b===_0x3d1a51)break;else _0x345956['push'](_0x345956['shift']());}catch(_0x19f0b8){_0x345956['push'](_0x345956['shift']());}}}(a55_0x42ce,0xe0021));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a55_0xe9f276(0x171),'operation':a55_0xe9f276(0x171),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':'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','helpExtra':[a55_0xe9f276(0x16d),a55_0xe9f276(0x16b),a55_0xe9f276(0x165),'\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)',a55_0xe9f276(0x163)]['join']('\x0a')});function a55_0x42ce(){const _0x498d7f=['\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]','34374852ffOMrZ','1978014HDZLQc','1944ubtiSW','651838ehOqtR','10WtMzKn','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','6902584UDkUNs','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','11DGBxuU','714674ppikGz','12vHYEEp','filter','10yhQrAC','2884OMxfSv','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','5376006LHWIUI'];a55_0x42ce=function(){return _0x498d7f;};return a55_0x42ce();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x4e8342=a56_0x5f57;(function(_0x55cc56,_0x2a772b){const _0x48fe2f=a56_0x5f57,_0x47789c=_0x55cc56();while(!![]){try{const _0x527210=parseInt(_0x48fe2f(0x1dc))/0x1+parseInt(_0x48fe2f(0x1d8))/0x2*(-parseInt(_0x48fe2f(0x1d9))/0x3)+-parseInt(_0x48fe2f(0x1d7))/0x4+parseInt(_0x48fe2f(0x1d6))/0x5*(-parseInt(_0x48fe2f(0x1da))/0x6)+parseInt(_0x48fe2f(0x1de))/0x7*(parseInt(_0x48fe2f(0x1d4))/0x8)+parseInt(_0x48fe2f(0x1dd))/0x9+parseInt(_0x48fe2f(0x1d3))/0xa*(parseInt(_0x48fe2f(0x1d2))/0xb);if(_0x527210===_0x2a772b)break;else _0x47789c['push'](_0x47789c['shift']());}catch(_0x3fe3c5){_0x47789c['push'](_0x47789c['shift']());}}}(a56_0x1ba2,0xb8198));function a56_0x1ba2(){const _0x3bb0d1=['Get\x20a\x20single\x20record\x20by\x20ID','5WZImym','3558080KIgUpo','36efquLa','30720rYgzrc','6160602nKbHeu','getOne','1327853IFdRds','13555557SpEJWs','4207ieyskn','66Cdzvfd','9380TrLydg','200BXMyQw'];a56_0x1ba2=function(){return _0x3bb0d1;};return a56_0x1ba2();}function a56_0x5f57(_0x321d7e,_0x28cb26){_0x321d7e=_0x321d7e-0x1d2;const _0x1ba288=a56_0x1ba2();let _0x5f571e=_0x1ba288[_0x321d7e];return _0x5f571e;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a56_0x4e8342(0x1db),'operation':a56_0x4e8342(0x1db),'description':a56_0x4e8342(0x1d5),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3575ef,_0x274879){const _0x3fa93c=a57_0x4114,_0x145ab6=_0x3575ef();while(!![]){try{const _0x377a31=-parseInt(_0x3fa93c(0x1aa))/0x1*(-parseInt(_0x3fa93c(0x1a4))/0x2)+-parseInt(_0x3fa93c(0x1a7))/0x3*(-parseInt(_0x3fa93c(0x1ac))/0x4)+parseInt(_0x3fa93c(0x1a2))/0x5*(-parseInt(_0x3fa93c(0x1a5))/0x6)+parseInt(_0x3fa93c(0x1a8))/0x7*(parseInt(_0x3fa93c(0x1a3))/0x8)+-parseInt(_0x3fa93c(0x1ab))/0x9*(parseInt(_0x3fa93c(0x1a9))/0xa)+-parseInt(_0x3fa93c(0x1a0))/0xb*(-parseInt(_0x3fa93c(0x1a1))/0xc)+parseInt(_0x3fa93c(0x1a6))/0xd;if(_0x377a31===_0x274879)break;else _0x145ab6['push'](_0x145ab6['shift']());}catch(_0x50890f){_0x145ab6['push'](_0x145ab6['shift']());}}}(a57_0xb442,0x398b0));import{dataFilter}from'../../commands/data/filter.js';function a57_0x4114(_0x33e9f4,_0x4e6b58){_0x33e9f4=_0x33e9f4-0x1a0;const _0xb44284=a57_0xb442();let _0x411429=_0xb44284[_0x33e9f4];return _0x411429;}import{dataGetOne}from'../../commands/data/getOne.js';function a57_0xb442(){const _0x3d8f75=['16395joItsG','7KydwOh','70cWmEEg','19003tNXPMg','552042xVBwjF','28yXMFms','850124rCHuQU','48FUBnUO','40SpFWsE','1661928QvfrOS','34gvCzcJ','279192ujrkFG','2068755IDOYPB'];a57_0xb442=function(){return _0x3d8f75;};return a57_0xb442();}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59224f,_0xdf2f15){const _0x46105c=a58_0x56c4,_0xeb8622=_0x59224f();while(!![]){try{const _0x484cb2=-parseInt(_0x46105c(0xc7))/0x1+-parseInt(_0x46105c(0xb5))/0x2*(parseInt(_0x46105c(0xaf))/0x3)+-parseInt(_0x46105c(0xc8))/0x4*(parseInt(_0x46105c(0xc1))/0x5)+parseInt(_0x46105c(0xbb))/0x6*(parseInt(_0x46105c(0xb4))/0x7)+parseInt(_0x46105c(0xb1))/0x8+-parseInt(_0x46105c(0xb2))/0x9*(-parseInt(_0x46105c(0xc6))/0xa)+-parseInt(_0x46105c(0xc3))/0xb;if(_0x484cb2===_0xdf2f15)break;else _0xeb8622['push'](_0xeb8622['shift']());}catch(_0x31503c){_0xeb8622['push'](_0xeb8622['shift']());}}}(a58_0x30d2,0x65a58));function a58_0x56c4(_0x42e6e3,_0x293071){_0x42e6e3=_0x42e6e3-0xaf;const _0x30d220=a58_0x30d2();let _0x56c4df=_0x30d220[_0x42e6e3];return _0x56c4df;}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a58_0x30d2(){const _0x544ae4=['3229989CBrsdL','13114ZPuCjp','paramsRequired','flagMissing','\x20completed\x20in\x20','params','read','6gGGxRQ','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','now','data','command','985FUuxQE','code','3705636qRiQAo','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','str','20OqYkdw','30963EuAAQa','14236FGUPoO','69UWTULH','paramsHint','6322992UuUEeU','1729422dUrGOS','helpExtra'];a58_0x30d2=function(){return _0x544ae4;};return a58_0x30d2();}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x217890){const _0x473ede=a58_0x56c4;if(!_0x217890)throw CliErrors[_0x473ede(0xb7)]('params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x223bf3=_0x217890['id'];if(_0x223bf3===undefined||_0x223bf3===null||_0x223bf3==='')throw CliErrors['validation'](_0x473ede(0xbc),_0x473ede(0xc4));}function parseCommandParams(_0x4cb54e){return parseJsonParams(_0x4cb54e)??{};}export function buildDataCommand(_0x2373a3){const _0x26100f=a58_0x56c4,_0x1bf240=_0x26100f(0xbd);return{'service':_0x26100f(0xbf),'command':_0x2373a3[_0x26100f(0xc0)],'description':_0x2373a3['description'],'risk':_0x26100f(0xba),'defaultOutputFormat':'compress','helpExtra':_0x2373a3[_0x26100f(0xb3)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':_0x1bf240},{'name':_0x26100f(0xb9),'type':'string','description':_0x2373a3['paramsHint']}],async 'validate'(_0x17bfad){const _0x156be8=_0x26100f,_0x58518c=_0x17bfad[_0x156be8(0xc5)]('params');if(_0x2373a3[_0x156be8(0xb6)]&&!_0x58518c)throw CliErrors['flagMissing'](_0x156be8(0xb9),_0x2373a3[_0x156be8(0xb0)]);const _0x5b07e2=parseJsonParams(_0x58518c);_0x2373a3['operation']==='getOne'&&assertGetOneId(_0x5b07e2);},async 'execute'(_0x550b6b){const _0x3f8381=_0x26100f,_0xfd6da9=parseCommandParams(_0x550b6b[_0x3f8381(0xc5)](_0x3f8381(0xb9))),_0x3cc80a=Date[_0x3f8381(0xbe)](),_0xfe3309=await executeDatasetDataOperation(_0x550b6b['appCode'],_0x550b6b[_0x3f8381(0xc5)](_0x3f8381(0xc2)),_0x2373a3['operation'],_0xfd6da9),_0x4fee1f=Date[_0x3f8381(0xbe)]()-_0x3cc80a;return{'ok':!![],'data':{'result':_0xfe3309,'elapsed':_0x4fee1f},'message':'data\x20'+_0x2373a3[_0x3f8381(0xc0)]+_0x3f8381(0xb8)+_0x4fee1f+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a59_0x3715(_0x432fbd,_0xba0d71){_0x432fbd=_0x432fbd-0x18f;const _0x2212a9=a59_0x2212();let _0x3715cf=_0x2212a9[_0x432fbd];return _0x3715cf;}const a59_0x366214=a59_0x3715;(function(_0xecc696,_0xf207dc){const _0x580627=a59_0x3715,_0x10bd14=_0xecc696();while(!![]){try{const _0x5834f8=parseInt(_0x580627(0x1b6))/0x1+parseInt(_0x580627(0x1ad))/0x2+-parseInt(_0x580627(0x18f))/0x3+-parseInt(_0x580627(0x1a3))/0x4+-parseInt(_0x580627(0x1c3))/0x5+-parseInt(_0x580627(0x19e))/0x6+parseInt(_0x580627(0x1a7))/0x7*(parseInt(_0x580627(0x1bc))/0x8);if(_0x5834f8===_0xf207dc)break;else _0x10bd14['push'](_0x10bd14['shift']());}catch(_0x2a340f){_0x10bd14['push'](_0x10bd14['shift']());}}}(a59_0x2212,0xc28ae));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a59_0x366214(0x1bb);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x150dfb,input:_0x3e0e9e,dryRun:_0x479643}){const _0x5d467e=a59_0x366214;validateInput(_0x3e0e9e);const _0x1e3f56=normalizeBusinessGroup(_0x3e0e9e[_0x5d467e(0x19c)]),_0x23730e=await getDatasetDetail(_0x3e0e9e[_0x5d467e(0x197)]),_0x357207=resolveBusinessGroupDataset(_0x23730e,_0x3e0e9e[_0x5d467e(0x197)]),_0x139e7d=loadCurrentBusinessGroup(_0x23730e,_0x357207);assertExpectedBusinessGroup(_0x139e7d,_0x3e0e9e[_0x5d467e(0x1bd)]);const _0x5787a2=buildBackendPayload(_0x150dfb,_0x357207,_0x1e3f56),_0x3c5e29=_0x139e7d!==_0x1e3f56;let _0x10fe62;if(_0x3c5e29&&!_0x479643){await updateErBusinessGroup(_0x5787a2);const _0x3d81de=await getDatasetDetail(_0x357207[_0x5d467e(0x197)]),_0x4d4515=resolveBusinessGroupDataset(_0x3d81de,_0x357207[_0x5d467e(0x197)]),_0x440217=loadCurrentBusinessGroup(_0x3d81de,_0x4d4515);if(_0x440217!==_0x1e3f56)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x5d467e(0x1ae)+JSON['stringify'](_0x1e3f56)+_0x5d467e(0x1a4)+JSON[_0x5d467e(0x1ab)](_0x440217)+'.');_0x10fe62={'verified':!![],'status':_0x5d467e(0x1aa),'afterReadback':{'businessGroup':_0x440217}};}else!_0x3c5e29&&(_0x10fe62={'verified':!![],'status':_0x5d467e(0x1b5),'afterReadback':{'businessGroup':_0x139e7d}});const _0x4315ce={'operation':'update','appCode':_0x150dfb,'selector':{'code':_0x357207['code']},'dataset':_0x357207,'before':{'businessGroup':_0x139e7d},'after':{'businessGroup':_0x1e3f56},'changed':_0x3c5e29,'dryRun':_0x479643,'submitted':_0x3c5e29&&!_0x479643,'backend':{'method':'POST','path':BACKEND_PATH,'payload':_0x5787a2},..._0x10fe62?{'verification':_0x10fe62}:{},'warnings':[]};return{'ok':!![],'data':_0x4315ce,'message':_0x3c5e29?_0x479643?_0x5d467e(0x1b1)+_0x357207[_0x5d467e(0x197)]:_0x5d467e(0x1af)+_0x357207['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x357207[_0x5d467e(0x197)]};}function a59_0x2212(){const _0x2f6dd3=['Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing','number','found','/smartapi/question/er-config/business-group/edit','32SigOvR','expectBusinessGroup','METADATA','dataset','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','isArray','object','4523650QBtZtu','extend','backend','Update\x20business\x20scenario\x20group','message','string','toUpperCase','appCode','2689608vBrANh','datasetCode','isFinite','data','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','source','trim','datasetId','code','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','modelId','DB_TABLE','hasOwnProperty','businessGroup','modelCode','5009034IxCvPU','name','length','sourceType','keys','5767056PjGzgq',',\x20actual\x20','validation','POST','7057183nxwGSY','business-group','--business-group\x20is\x20required','matched','stringify','payload','1084914OMJZQT','Expected\x20','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','business-group-update','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetName','str','expect-business-group','unchanged','299582OiSJJP','Expectation\x20mismatch\x20at\x20businessGroup'];a59_0x2212=function(){return _0x2f6dd3;};return a59_0x2212();}export const datasetBusinessGroupUpdate={'service':a59_0x366214(0x1bf),'command':a59_0x366214(0x1b0),'description':a59_0x366214(0x1c6),'risk':'write','flags':[CODE_FLAG,{'name':a59_0x366214(0x1a8),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20or\x20<domain>---<scenario>\x20when\x20needed\x20for\x20disambiguation\x20or\x20an\x20existing\x20hierarchy;\x20empty\x20string\x20clears\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a59_0x366214(0x1b8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24444c){validateInput(readBusinessGroupUpdateInput(_0x24444c));},async 'dryRun'(_0x34ed46){const _0x198590=a59_0x366214,_0x2150dd=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x34ed46[_0x198590(0x1ca)],'input':readBusinessGroupUpdateInput(_0x34ed46),'dryRun':!![]});return{'method':_0x198590(0x1a6),'url':BACKEND_PATH,'body':_0x2150dd[_0x198590(0x192)][_0x198590(0x1c5)][_0x198590(0x1ac)],'description':_0x2150dd[_0x198590(0x1c7)],..._0x2150dd['data']};},async 'execute'(_0x234f2a){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x234f2a['appCode'],'input':readBusinessGroupUpdateInput(_0x234f2a),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1ff1be){const _0xeffb33=a59_0x366214,_0x44ed5f=_0x1ff1be[_0xeffb33(0x1b3)](_0xeffb33(0x1b4));return{'code':trim(_0x1ff1be[_0xeffb33(0x1b3)]('code')),'businessGroup':_0x1ff1be[_0xeffb33(0x1b3)]('business-group'),'expectBusinessGroup':_0x44ed5f===undefined||_0x44ed5f===''?undefined:_0x44ed5f};}function validateInput(_0x1aa707){const _0x15d60d=a59_0x366214;if(!trim(_0x1aa707[_0x15d60d(0x197)]))throw CliErrors[_0x15d60d(0x1a5)]('--code\x20is\x20required');if(_0x1aa707[_0x15d60d(0x19c)]===undefined)throw CliErrors['validation'](_0x15d60d(0x1a9));}function resolveBusinessGroupDataset(_0x559165,_0x1a4db5){const _0x681961=a59_0x366214,_0x3b7922=asPlainObject(_0x559165[_0x681961(0x1bf)]),_0x44fb14=asPlainObject(_0x559165['dbtableConfig']),_0x5f54af=resolveSourceType(_0x559165,_0x3b7922,_0x44fb14),_0x141a6a=firstString(_0x559165[_0x681961(0x19d)],_0x559165[_0x681961(0x197)],_0x3b7922[_0x681961(0x190)],_0x1a4db5)||_0x1a4db5;return{'id':firstNumber(_0x559165[_0x681961(0x199)],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??firstString(_0x559165['modelId'],_0x559165['id'],_0x3b7922[_0x681961(0x196)])??null,'code':_0x141a6a,'name':firstString(_0x559165['name'],_0x3b7922[_0x681961(0x1b2)],_0x3b7922[_0x681961(0x19f)])||null,'sourceType':_0x5f54af};}function resolveSourceType(_0x435a47,_0x149471,_0x5e1874){const _0x2d556d=a59_0x366214,_0x187cfa=firstString(_0x435a47[_0x2d556d(0x194)],_0x435a47[_0x2d556d(0x1a1)],_0x149471['source'],_0x149471[_0x2d556d(0x1a1)])?.['trim']()[_0x2d556d(0x1c9)]();if(_0x187cfa===_0x2d556d(0x19a)||_0x187cfa===_0x2d556d(0x1be))return _0x187cfa;if(Object[_0x2d556d(0x1a2)](_0x5e1874)[_0x2d556d(0x1a0)]>0x0)return _0x2d556d(0x19a);throw CliErrors[_0x2d556d(0x1a5)](_0x2d556d(0x193));}function loadCurrentBusinessGroup(_0x393bfb,_0x487fa5){const _0x36eac4=a59_0x366214,_0x276025=readBusinessGroupFromDatasetDetail(_0x393bfb,_0x487fa5[_0x36eac4(0x1a1)]);if(_0x276025[_0x36eac4(0x1ba)])return normalizeBusinessGroup(_0x276025['value']);if(_0x487fa5[_0x36eac4(0x1a1)]==='METADATA')return'';throw CliErrors[_0x36eac4(0x1a5)](_0x36eac4(0x1c0),_0x36eac4(0x198));}function readBusinessGroupFromDatasetDetail(_0x2d3d55,_0x7b705c){const _0x13d6d0=a59_0x366214,_0x1acbbd=asPlainObject(_0x2d3d55['dataset']),_0x484f51=firstPresent(_0x2d3d55[_0x13d6d0(0x19c)]);if(_0x484f51[_0x13d6d0(0x1ba)])return _0x484f51;const _0x5d5e4d=firstPresent(_0x1acbbd['businessGroup']);if(_0x5d5e4d['found'])return _0x5d5e4d;if(_0x7b705c===_0x13d6d0(0x19a))return{'found':![]};const _0x33f984=readBusinessGroupFromExtend(_0x2d3d55[_0x13d6d0(0x1c4)]);if(_0x33f984[_0x13d6d0(0x1ba)])return _0x33f984;return readBusinessGroupFromExtend(_0x1acbbd[_0x13d6d0(0x1c4)]);}function readBusinessGroupFromExtend(_0x2e527f){const _0x172879=a59_0x366214;if(_0x2e527f===undefined||_0x2e527f===null||_0x2e527f==='')return{'found':![]};if(typeof _0x2e527f==='string')try{const _0x5d4499=JSON['parse'](_0x2e527f);return readBusinessGroupFromExtend(_0x5d4499);}catch{return{'found':![]};}const _0x4c6836=asPlainObject(_0x2e527f);if(Object['prototype'][_0x172879(0x19b)]['call'](_0x4c6836,_0x172879(0x19c)))return{'found':!![],'value':_0x4c6836['businessGroup']};return{'found':![]};}function firstPresent(..._0x5dd589){for(const _0xd0726e of _0x5dd589){if(_0xd0726e!==undefined&&_0xd0726e!==null)return{'found':!![],'value':_0xd0726e};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4ff81c,_0x720493){const _0x3538aa=a59_0x366214;if(_0x720493===undefined)return;const _0x486b64=normalizeBusinessGroup(_0x720493);if(_0x4ff81c!==_0x486b64)throw CliErrors[_0x3538aa(0x1a5)](_0x3538aa(0x1b7),_0x3538aa(0x1ae)+JSON[_0x3538aa(0x1ab)](_0x486b64)+',\x20actual\x20'+JSON[_0x3538aa(0x1ab)](_0x4ff81c));}function buildBackendPayload(_0x3369af,_0x17c1a7,_0xc248f6){const _0x5cad7b=a59_0x366214;return{'appCode':_0x3369af,'datasetCode':_0x17c1a7[_0x5cad7b(0x197)],'businessGroup':_0xc248f6};}function normalizeBusinessGroup(_0x250658){const _0x17800b=a59_0x366214;if(_0x250658===undefined||_0x250658===null)return'';return String(_0x250658)[_0x17800b(0x195)]();}function asPlainObject(_0x1a6e3f){const _0x6adcf4=a59_0x366214;if(!_0x1a6e3f||typeof _0x1a6e3f!==_0x6adcf4(0x1c2)||Array[_0x6adcf4(0x1c1)](_0x1a6e3f))return{};return _0x1a6e3f;}function firstString(..._0x43f217){const _0x4480ce=a59_0x366214;for(const _0x3bd00f of _0x43f217){if(typeof _0x3bd00f===_0x4480ce(0x1c8)&&_0x3bd00f[_0x4480ce(0x195)]())return _0x3bd00f[_0x4480ce(0x195)]();if(typeof _0x3bd00f===_0x4480ce(0x1b9)&&Number[_0x4480ce(0x191)](_0x3bd00f))return String(_0x3bd00f);}return undefined;}function firstNumber(..._0x1b3472){const _0x587226=a59_0x366214;for(const _0xb76f61 of _0x1b3472){if(typeof _0xb76f61==='number'&&Number[_0x587226(0x191)](_0xb76f61))return _0xb76f61;if(typeof _0xb76f61==='string'&&_0xb76f61[_0x587226(0x195)]()&&Number[_0x587226(0x191)](Number(_0xb76f61)))return Number(_0xb76f61);}return null;}function trim(_0x58b6fa){return String(_0x58b6fa||'')['trim']();}
|
|
1
|
+
const a59_0x218fa2=a59_0x35f2;(function(_0x214ac5,_0xbc3b5a){const _0x5e4c43=a59_0x35f2,_0x1c7d21=_0x214ac5();while(!![]){try{const _0xb8eda0=-parseInt(_0x5e4c43(0x135))/0x1*(parseInt(_0x5e4c43(0x130))/0x2)+parseInt(_0x5e4c43(0x120))/0x3+parseInt(_0x5e4c43(0x113))/0x4*(parseInt(_0x5e4c43(0x124))/0x5)+-parseInt(_0x5e4c43(0x12b))/0x6+-parseInt(_0x5e4c43(0x108))/0x7+parseInt(_0x5e4c43(0xfd))/0x8*(parseInt(_0x5e4c43(0x11f))/0x9)+parseInt(_0x5e4c43(0x132))/0xa;if(_0xb8eda0===_0xbc3b5a)break;else _0x1c7d21['push'](_0x1c7d21['shift']());}catch(_0x53caab){_0x1c7d21['push'](_0x1c7d21['shift']());}}}(a59_0x559d,0xa720f));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:_0x42e045,input:_0x5a947d,dryRun:_0x3498f3}){const _0x51c900=a59_0x35f2;validateInput(_0x5a947d);const _0x248fe3=normalizeBusinessGroup(_0x5a947d[_0x51c900(0x122)]),_0x37ec5b=await getDatasetDetail(_0x5a947d[_0x51c900(0x125)]),_0x2ad6d6=resolveBusinessGroupDataset(_0x37ec5b,_0x5a947d['code']),_0x2b7c0e=loadCurrentBusinessGroup(_0x37ec5b,_0x2ad6d6);assertExpectedBusinessGroup(_0x2b7c0e,_0x5a947d['expectBusinessGroup']);const _0x36ad98=buildBackendPayload(_0x42e045,_0x2ad6d6,_0x248fe3),_0x186cf4=_0x2b7c0e!==_0x248fe3;let _0x393453;if(_0x186cf4&&!_0x3498f3){await updateErBusinessGroup(_0x36ad98);const _0x411f01=await getDatasetDetail(_0x2ad6d6['code']),_0x307a75=resolveBusinessGroupDataset(_0x411f01,_0x2ad6d6[_0x51c900(0x125)]),_0x5eeda5=loadCurrentBusinessGroup(_0x411f01,_0x307a75);if(_0x5eeda5!==_0x248fe3)throw CliErrors['apiError']('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.',_0x51c900(0x126)+JSON[_0x51c900(0x112)](_0x248fe3)+',\x20actual\x20'+JSON[_0x51c900(0x112)](_0x5eeda5)+'.');_0x393453={'verified':!![],'status':_0x51c900(0x11c),'afterReadback':{'businessGroup':_0x5eeda5}};}else!_0x186cf4&&(_0x393453={'verified':!![],'status':_0x51c900(0x133),'afterReadback':{'businessGroup':_0x2b7c0e}});const _0x2df0d7={'operation':_0x51c900(0x10d),'appCode':_0x42e045,'selector':{'code':_0x2ad6d6['code']},'dataset':_0x2ad6d6,'before':{'businessGroup':_0x2b7c0e},'after':{'businessGroup':_0x248fe3},'changed':_0x186cf4,'dryRun':_0x3498f3,'submitted':_0x186cf4&&!_0x3498f3,'backend':{'method':_0x51c900(0xff),'path':BACKEND_PATH,'payload':_0x36ad98},..._0x393453?{'verification':_0x393453}:{},'warnings':[]};return{'ok':!![],'data':_0x2df0d7,'message':_0x186cf4?_0x3498f3?_0x51c900(0x12c)+_0x2ad6d6[_0x51c900(0x125)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x2ad6d6[_0x51c900(0x125)]:_0x51c900(0x11d)+_0x2ad6d6[_0x51c900(0x125)]};}export const datasetBusinessGroupUpdate={'service':a59_0x218fa2(0x106),'command':a59_0x218fa2(0xfe),'description':a59_0x218fa2(0x12e),'risk':a59_0x218fa2(0x103),'flags':[CODE_FLAG,{'name':a59_0x218fa2(0x100),'type':a59_0x218fa2(0x117),'required':!![],'description':a59_0x218fa2(0x10b)},{'name':a59_0x218fa2(0x11b),'type':a59_0x218fa2(0x117),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1cba5f){validateInput(readBusinessGroupUpdateInput(_0x1cba5f));},async 'dryRun'(_0x2a6317){const _0x2d0ae4=a59_0x218fa2,_0x3cf108=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2a6317[_0x2d0ae4(0x119)],'input':readBusinessGroupUpdateInput(_0x2a6317),'dryRun':!![]});return{'method':_0x2d0ae4(0xff),'url':BACKEND_PATH,'body':_0x3cf108[_0x2d0ae4(0xfa)][_0x2d0ae4(0x107)]['payload'],'description':_0x3cf108[_0x2d0ae4(0x121)],..._0x3cf108[_0x2d0ae4(0xfa)]};},async 'execute'(_0x32c2e3){const _0x135d0b=a59_0x218fa2;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x32c2e3[_0x135d0b(0x119)],'input':readBusinessGroupUpdateInput(_0x32c2e3),'dryRun':![]});}};function a59_0x559d(){const _0x23f9b8=['expect-business-group','matched','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','modelCode','5402610jCZpAP','2619585Ukqgby','message','businessGroup','length','35CJOrZg','code','Expected\x20','isFinite','parse','sourceType','object','3614052qhOIBW','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','source','Update\x20business\x20scenario\x20group','prototype','5290yhdckQ','name','16373150pJsXMS','unchanged','keys','237TWPExI','datasetId','data','extend','toUpperCase','8SnwJeM','business-group-update','POST','business-group','trim','found','write','modelId','validation','dataset','backend','9281475TwSrnq','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','isArray','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','str','update','--code\x20is\x20required','DB_TABLE','number',',\x20actual\x20','stringify','73652UEKgOu','METADATA','Expectation\x20mismatch\x20at\x20businessGroup','value','string','hasOwnProperty','appCode','--business-group\x20is\x20required'];a59_0x559d=function(){return _0x23f9b8;};return a59_0x559d();}function readBusinessGroupUpdateInput(_0x1559af){const _0x13d97a=a59_0x218fa2,_0x31e3ea=_0x1559af[_0x13d97a(0x10c)](_0x13d97a(0x11b));return{'code':trim(_0x1559af['str'](_0x13d97a(0x125))),'businessGroup':_0x1559af['str'](_0x13d97a(0x100)),'expectBusinessGroup':_0x31e3ea===undefined||_0x31e3ea===''?undefined:_0x31e3ea};}function validateInput(_0x3e7b87){const _0xb3e6e=a59_0x218fa2;if(!trim(_0x3e7b87['code']))throw CliErrors[_0xb3e6e(0x105)](_0xb3e6e(0x10e));if(_0x3e7b87['businessGroup']===undefined)throw CliErrors[_0xb3e6e(0x105)](_0xb3e6e(0x11a));}function resolveBusinessGroupDataset(_0x1ac4a1,_0x1ba937){const _0x583d3c=a59_0x218fa2,_0x37c1a2=asPlainObject(_0x1ac4a1[_0x583d3c(0x106)]),_0x1ffed6=asPlainObject(_0x1ac4a1['dbtableConfig']),_0x4850f5=resolveSourceType(_0x1ac4a1,_0x37c1a2,_0x1ffed6),_0x3c40fa=firstString(_0x1ac4a1[_0x583d3c(0x11e)],_0x1ac4a1['code'],_0x37c1a2['datasetCode'],_0x1ba937)||_0x1ba937;return{'id':firstNumber(_0x1ac4a1[_0x583d3c(0x104)],_0x1ac4a1['id'],_0x37c1a2[_0x583d3c(0xf9)])??firstString(_0x1ac4a1['modelId'],_0x1ac4a1['id'],_0x37c1a2[_0x583d3c(0xf9)])??null,'code':_0x3c40fa,'name':firstString(_0x1ac4a1[_0x583d3c(0x131)],_0x37c1a2['datasetName'],_0x37c1a2[_0x583d3c(0x131)])||null,'sourceType':_0x4850f5};}function resolveSourceType(_0x53b3d4,_0x38dcba,_0x555ba6){const _0x14a265=a59_0x218fa2,_0x441a08=firstString(_0x53b3d4['source'],_0x53b3d4[_0x14a265(0x129)],_0x38dcba[_0x14a265(0x12d)],_0x38dcba[_0x14a265(0x129)])?.[_0x14a265(0x101)]()[_0x14a265(0xfc)]();if(_0x441a08==='DB_TABLE'||_0x441a08==='METADATA')return _0x441a08;if(Object[_0x14a265(0x134)](_0x555ba6)[_0x14a265(0x123)]>0x0)return _0x14a265(0x10f);throw CliErrors[_0x14a265(0x105)](_0x14a265(0x109));}function loadCurrentBusinessGroup(_0xbb6145,_0x534503){const _0x530b04=a59_0x218fa2,_0x56ab55=readBusinessGroupFromDatasetDetail(_0xbb6145,_0x534503['sourceType']);if(_0x56ab55[_0x530b04(0x102)])return normalizeBusinessGroup(_0x56ab55[_0x530b04(0x116)]);if(_0x534503[_0x530b04(0x129)]===_0x530b04(0x114))return'';throw CliErrors[_0x530b04(0x105)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.');}function readBusinessGroupFromDatasetDetail(_0x24e854,_0x1bcbcf){const _0x37038f=a59_0x218fa2,_0x522ec5=asPlainObject(_0x24e854[_0x37038f(0x106)]),_0x5e1e6c=firstPresent(_0x24e854[_0x37038f(0x122)]);if(_0x5e1e6c[_0x37038f(0x102)])return _0x5e1e6c;const _0x157781=firstPresent(_0x522ec5[_0x37038f(0x122)]);if(_0x157781['found'])return _0x157781;if(_0x1bcbcf===_0x37038f(0x10f))return{'found':![]};const _0x5e5b9c=readBusinessGroupFromExtend(_0x24e854[_0x37038f(0xfb)]);if(_0x5e5b9c[_0x37038f(0x102)])return _0x5e5b9c;return readBusinessGroupFromExtend(_0x522ec5[_0x37038f(0xfb)]);}function readBusinessGroupFromExtend(_0x2d1031){const _0x2984eb=a59_0x218fa2;if(_0x2d1031===undefined||_0x2d1031===null||_0x2d1031==='')return{'found':![]};if(typeof _0x2d1031===_0x2984eb(0x117))try{const _0x100e98=JSON[_0x2984eb(0x128)](_0x2d1031);return readBusinessGroupFromExtend(_0x100e98);}catch{return{'found':![]};}const _0x32ed30=asPlainObject(_0x2d1031);if(Object[_0x2984eb(0x12f)][_0x2984eb(0x118)]['call'](_0x32ed30,'businessGroup'))return{'found':!![],'value':_0x32ed30[_0x2984eb(0x122)]};return{'found':![]};}function firstPresent(..._0x30c8e3){for(const _0x25ce35 of _0x30c8e3){if(_0x25ce35!==undefined&&_0x25ce35!==null)return{'found':!![],'value':_0x25ce35};}return{'found':![]};}function a59_0x35f2(_0x58c1f9,_0x2bc76c){_0x58c1f9=_0x58c1f9-0xf9;const _0x559d5f=a59_0x559d();let _0x35f209=_0x559d5f[_0x58c1f9];return _0x35f209;}function assertExpectedBusinessGroup(_0x112a1b,_0x28d5b1){const _0x5e15af=a59_0x218fa2;if(_0x28d5b1===undefined)return;const _0x11d9d1=normalizeBusinessGroup(_0x28d5b1);if(_0x112a1b!==_0x11d9d1)throw CliErrors[_0x5e15af(0x105)](_0x5e15af(0x115),'Expected\x20'+JSON[_0x5e15af(0x112)](_0x11d9d1)+_0x5e15af(0x111)+JSON[_0x5e15af(0x112)](_0x112a1b));}function buildBackendPayload(_0x1615cf,_0x11235,_0x131e6c){const _0x4af0fc=a59_0x218fa2;return{'appCode':_0x1615cf,'datasetCode':_0x11235[_0x4af0fc(0x125)],'businessGroup':_0x131e6c};}function normalizeBusinessGroup(_0x4a1cd6){const _0x25c3a3=a59_0x218fa2;if(_0x4a1cd6===undefined||_0x4a1cd6===null)return'';return String(_0x4a1cd6)[_0x25c3a3(0x101)]();}function asPlainObject(_0x2a032c){const _0xe5ba0f=a59_0x218fa2;if(!_0x2a032c||typeof _0x2a032c!==_0xe5ba0f(0x12a)||Array[_0xe5ba0f(0x10a)](_0x2a032c))return{};return _0x2a032c;}function firstString(..._0x30bad0){const _0xe09902=a59_0x218fa2;for(const _0x85bf22 of _0x30bad0){if(typeof _0x85bf22===_0xe09902(0x117)&&_0x85bf22['trim']())return _0x85bf22[_0xe09902(0x101)]();if(typeof _0x85bf22===_0xe09902(0x110)&&Number[_0xe09902(0x127)](_0x85bf22))return String(_0x85bf22);}return undefined;}function firstNumber(..._0x927fdd){const _0x4f5a0e=a59_0x218fa2;for(const _0x3bd1fd of _0x927fdd){if(typeof _0x3bd1fd===_0x4f5a0e(0x110)&&Number[_0x4f5a0e(0x127)](_0x3bd1fd))return _0x3bd1fd;if(typeof _0x3bd1fd==='string'&&_0x3bd1fd['trim']()&&Number[_0x4f5a0e(0x127)](Number(_0x3bd1fd)))return Number(_0x3bd1fd);}return null;}function trim(_0x20d9c8){const _0x2430b5=a59_0x218fa2;return String(_0x20d9c8||'')[_0x2430b5(0x101)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a60_0x4bffea=a60_0x4166;function a60_0x4166(_0x1f35a3,_0x53bb79){_0x1f35a3=_0x1f35a3-0x1f2;const _0x157fd0=a60_0x157f();let _0x416660=_0x157fd0[_0x1f35a3];return _0x416660;}(function(_0x13b722,_0x52ffa5){const _0x2dd83b=a60_0x4166,_0x45ea5c=_0x13b722();while(!![]){try{const _0x1d0b1b=parseInt(_0x2dd83b(0x1f6))/0x1+parseInt(_0x2dd83b(0x1f8))/0x2*(parseInt(_0x2dd83b(0x1f5))/0x3)+-parseInt(_0x2dd83b(0x1ff))/0x4+parseInt(_0x2dd83b(0x202))/0x5+-parseInt(_0x2dd83b(0x1fb))/0x6*(parseInt(_0x2dd83b(0x1fc))/0x7)+parseInt(_0x2dd83b(0x204))/0x8+-parseInt(_0x2dd83b(0x203))/0x9*(-parseInt(_0x2dd83b(0x1f3))/0xa);if(_0x1d0b1b===_0x52ffa5)break;else _0x45ea5c['push'](_0x45ea5c['shift']());}catch(_0x4e34aa){_0x45ea5c['push'](_0x45ea5c['shift']());}}}(a60_0x157f,0x875d0));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':a60_0x4bffea(0x1f4),'description':a60_0x4bffea(0x200),'risk':a60_0x4bffea(0x1fe),'flags':[{'name':a60_0x4bffea(0x201),'type':a60_0x4bffea(0x206),'required':!![],'description':a60_0x4bffea(0x1f7)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2dfd86){const _0x24353a=a60_0x4bffea,_0x14661d=_0x2dfd86[_0x24353a(0x1fa)]('dbid'),_0x5417c5=await getErBusinessGroupSummary(_0x2dfd86['appCode'],_0x14661d);return{'ok':!![],'data':{..._0x5417c5,'scope':_0x24353a(0x205)},'message':_0x24353a(0x1f9)+_0x5417c5['groups'][_0x24353a(0x1f2)]+_0x24353a(0x1fd)+_0x14661d};}};function a60_0x157f(){const _0x1d4cc8=['855088hLOgse','DB_TABLE','number','length','20iEDCjc','business-groups','146262fDeNpD','325558TfnGdQ','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','4OFuhOk','Found\x20','num','48NdeTTz','839692GzPCXR','\x20business\x20group(s)\x20for\x20database\x20connection\x20','read','803060DddQSj','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dbid','2163965MtZeuY','3384522tyWcVz'];a60_0x157f=function(){return _0x1d4cc8;};return a60_0x157f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x48e259=a61_0x42d9;(function(_0x4d461f,_0x15491c){const _0x1316a7=a61_0x42d9,_0x1ed0d1=_0x4d461f();while(!![]){try{const _0x58024b=-parseInt(_0x1316a7(0x153))/0x1+-parseInt(_0x1316a7(0x146))/0x2+parseInt(_0x1316a7(0x14f))/0x3+-parseInt(_0x1316a7(0x161))/0x4*(parseInt(_0x1316a7(0x14b))/0x5)+parseInt(_0x1316a7(0x164))/0x6*(parseInt(_0x1316a7(0x15c))/0x7)+-parseInt(_0x1316a7(0x150))/0x8+-parseInt(_0x1316a7(0x159))/0x9*(-parseInt(_0x1316a7(0x15a))/0xa);if(_0x58024b===_0x15491c)break;else _0x1ed0d1['push'](_0x1ed0d1['shift']());}catch(_0x39ef9d){_0x1ed0d1['push'](_0x1ed0d1['shift']());}}}(a61_0x4c29,0x89a4c));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a61_0x48e259(0x14c),'filter':a61_0x48e259(0x152),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a61_0x48e259(0x163);function valueToString(_0x1b974c){const _0x5705ea=a61_0x48e259;return _0x1b974c==null?'':String(_0x1b974c)[_0x5705ea(0x160)]();}function getDatasetCode(_0x9c19da){const _0x5c8992=a61_0x48e259;return valueToString(_0x9c19da[_0x5c8992(0x14a)]??_0x9c19da['modelCode']??_0x9c19da[_0x5c8992(0x158)]?.[_0x5c8992(0x165)]);}function getDatasetName(_0x2a6318){const _0x2b2ad7=a61_0x48e259;return valueToString(_0x2a6318[_0x2b2ad7(0x15f)]??_0x2a6318[_0x2b2ad7(0x158)]?.[_0x2b2ad7(0x14e)])||'unknown';}function a61_0x42d9(_0xe4b81a,_0x1aa362){_0xe4b81a=_0xe4b81a-0x144;const _0x4c2982=a61_0x4c29();let _0x42d904=_0x4c2982[_0xe4b81a];return _0x42d904;}function getDatasetSource(_0x58148d){const _0x31d240=a61_0x48e259;return valueToString(_0x58148d[_0x31d240(0x15e)]??_0x58148d['dataset']?.[_0x31d240(0x15b)])[_0x31d240(0x14d)]();}function getDbtableConfig(_0x4d2298){const _0x24b257=a61_0x48e259,_0x354e66=_0x4d2298[_0x24b257(0x168)]??_0x4d2298[_0x24b257(0x147)];return _0x354e66&&typeof _0x354e66==='object'?_0x354e66:{};}function a61_0x4c29(){const _0x33fc52=['230XFmHOr','sourceType','6075034BwAisz','tableName','source','name','trim','444ofTCeH','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','6lovAMj','datasetCode','METADATA','length','dbtableConfig','filter','\x20类型,没有可用于\x20','1073062dNfGQl','dbtable','join','SQL\x20schema\x20validation','code','33235VwABTE','lovrabet','toUpperCase','datasetName','1967163TnbtWW','674392NQCyUt','\x20是\x20','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','503691wCloZq','UNKNOWN','当前数据集\x20\x22','getOne','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dataset','353169KhvwAl'];a61_0x4c29=function(){return _0x33fc52;};return a61_0x4c29();}export function isDbTableBackedDataset(_0xf205cb){const _0x5464d4=a61_0x48e259,_0x5b2a72=getDatasetSource(_0xf205cb);if(_0x5b2a72===_0x5464d4(0x166))return![];const _0x2d2f3f=getDbtableConfig(_0xf205cb),_0x5d86a5=_0x2d2f3f['dbId']??_0x2d2f3f['id'],_0xc80e87=valueToString(_0x2d2f3f[_0x5464d4(0x15d)]??_0xf205cb[_0x5464d4(0x15d)]??_0xf205cb[_0x5464d4(0x158)]?.[_0x5464d4(0x15d)]);return _0x5d86a5!==undefined&&_0x5d86a5!==null&&_0xc80e87[_0x5464d4(0x167)]>0x0;}export function filterDbTableBackedDatasets(_0x45cbba){const _0x363371=a61_0x48e259;return _0x45cbba[_0x363371(0x144)](_0x29f1b7=>isDbTableBackedDataset(_0x29f1b7));}export function buildDbTableBackedRequirementMessage(_0x3a54ef,_0x3d7702=a61_0x48e259(0x149)){const _0x33f430=a61_0x48e259,_0x36d1c1=getDatasetSource(_0x3a54ef)||_0x33f430(0x154),_0x5a7240=getDatasetName(_0x3a54ef),_0x2471e5=getDatasetCode(_0x3a54ef),_0x1bc01f=_0x2471e5?'\x20('+_0x2471e5+')':'';return[_0x33f430(0x155)+_0x5a7240+'\x22'+_0x1bc01f+_0x33f430(0x151)+_0x36d1c1+_0x33f430(0x145)+_0x3d7702+'\x20的\x20DB_TABLE\x20数据源上下文。','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x33f430(0x162),_0x33f430(0x157)+RUNTIME_DATA_ACCESS_COMMANDS[_0x33f430(0x144)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x33f430(0x156)]+'。'][_0x33f430(0x148)]('\x20');}export function assertDatasetIsDbTableBacked(_0x3647c2,_0x43e676){if(!isDbTableBackedDataset(_0x3647c2))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x3647c2,_0x43e676));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x3efd68=a62_0x353d;(function(_0x5c8d10,_0x19670f){const _0x2449eb=a62_0x353d,_0x5ab7d3=_0x5c8d10();while(!![]){try{const _0x459da4=-parseInt(_0x2449eb(0x1a1))/0x1*(-parseInt(_0x2449eb(0x1a6))/0x2)+parseInt(_0x2449eb(0x1a7))/0x3*(parseInt(_0x2449eb(0x1b2))/0x4)+parseInt(_0x2449eb(0x1ae))/0x5*(parseInt(_0x2449eb(0x17f))/0x6)+-parseInt(_0x2449eb(0x199))/0x7+parseInt(_0x2449eb(0x1b8))/0x8*(-parseInt(_0x2449eb(0x19f))/0x9)+-parseInt(_0x2449eb(0x186))/0xa*(-parseInt(_0x2449eb(0x183))/0xb)+-parseInt(_0x2449eb(0x1bd))/0xc*(parseInt(_0x2449eb(0x182))/0xd);if(_0x459da4===_0x19670f)break;else _0x5ab7d3['push'](_0x5ab7d3['shift']());}catch(_0x8e4128){_0x5ab7d3['push'](_0x5ab7d3['shift']());}}}(a62_0x3a1e,0x87c21));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a62_0x353d(_0x4833e6,_0x3c5b6e){_0x4833e6=_0x4833e6-0x17a;const _0x3a1e18=a62_0x3a1e();let _0x353da7=_0x3a1e18[_0x4833e6];return _0x353da7;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a62_0x3efd68(0x1a8),'description':a62_0x3efd68(0x1b6)},DBID_FLAG={'name':'dbid','type':'number','description':a62_0x3efd68(0x195)},CONFIRM_FLAG={'name':'confirm','type':a62_0x3efd68(0x193),'description':a62_0x3efd68(0x1ac)},CASCADE_FLAG={'name':a62_0x3efd68(0x194),'type':a62_0x3efd68(0x193),'description':a62_0x3efd68(0x1af)},EXPECTED_COUNT_FLAG={'name':a62_0x3efd68(0x1ba),'type':a62_0x3efd68(0x1a8),'description':a62_0x3efd68(0x198)};export const datasetDelete={'service':'dataset','command':a62_0x3efd68(0x181),'description':a62_0x3efd68(0x18f),'risk':a62_0x3efd68(0x1ad),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x43f625){const _0x54596e=a62_0x3efd68,_0x325139=_0x43f625[_0x54596e(0x1a5)]('id'),_0x3ec64d=_0x43f625['str'](_0x54596e(0x1b1)),_0x4969c8=_0x43f625[_0x54596e(0x1a5)](_0x54596e(0x1b5)),_0x590890=[_0x325139>0x0,Boolean(_0x3ec64d),_0x4969c8>0x0][_0x54596e(0x1bf)](Boolean);if(_0x590890[_0x54596e(0x18c)]===0x0)throw CliErrors['validation']('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x590890[_0x54596e(0x18c)]>0x1)throw CliErrors['validation'](_0x54596e(0x1a2));},async 'dryRun'(_0x28d8c9){const _0x1a2e58=a62_0x3efd68,_0x4c9878=await resolveTargets(_0x28d8c9),_0x1943b6=_0x28d8c9['bool'](_0x1a2e58(0x194));return{'method':_0x1a2e58(0x196),'url':_0x1a2e58(0x189)+(_0x1943b6?_0x1a2e58(0x192):_0x1a2e58(0x19d)),'body':{'count':_0x4c9878[_0x1a2e58(0x18c)],'cascade':_0x1943b6,'datasets':_0x4c9878},'description':_0x1943b6?_0x1a2e58(0x17d)+_0x4c9878[_0x1a2e58(0x18c)]+_0x1a2e58(0x17e):_0x1a2e58(0x1b3)+_0x4c9878[_0x1a2e58(0x18c)]+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x54ec39){const _0xb61a18=a62_0x3efd68;if(!_0x54ec39[_0xb61a18(0x1a0)](_0xb61a18(0x1b0)))throw CliErrors[_0xb61a18(0x185)](_0xb61a18(0x19c),_0xb61a18(0x18b));const _0x365334=await resolveTargets(_0x54ec39),_0x4431=_0x54ec39[_0xb61a18(0x1a0)](_0xb61a18(0x194)),_0x1bc720=[],_0x4dd147=[];for(const _0x3dd1c7 of _0x365334){try{await deleteDataset(_0x3dd1c7['id'],_0x4431),_0x1bc720[_0xb61a18(0x188)](_0x3dd1c7);}catch(_0x2514b3){_0x4dd147[_0xb61a18(0x188)]({..._0x3dd1c7,'error':_0x2514b3 instanceof Error?_0x2514b3[_0xb61a18(0x1a4)]:String(_0x2514b3)});}}if(_0x4dd147[_0xb61a18(0x18c)]>0x0){const _0x2ddce9=buildPageRestoreCommands(_0x54ec39[_0xb61a18(0x1ab)],_0x4431?_0x1bc720:[]);return{'ok':![],'data':{'requested':_0x365334[_0xb61a18(0x18c)],'cascade':_0x4431,'deletedCount':_0x1bc720[_0xb61a18(0x18c)],'failedCount':_0x4dd147[_0xb61a18(0x18c)],'deleted':_0x1bc720,'failed':_0x4dd147,'pageRestoreCommands':_0x2ddce9},'message':_0xb61a18(0x1b9)+_0x1bc720['length']+'/'+_0x365334[_0xb61a18(0x18c)]+_0xb61a18(0x1b4)+_0x4dd147[_0xb61a18(0x18c)]+_0xb61a18(0x17b)};}return{'ok':!![],'data':{'requested':_0x365334[_0xb61a18(0x18c)],'cascade':_0x4431,'deletedCount':_0x1bc720[_0xb61a18(0x18c)],'deleted':_0x1bc720,'pageRestoreCommands':buildPageRestoreCommands(_0x54ec39[_0xb61a18(0x1ab)],_0x4431?_0x1bc720:[])},'message':'Deleted\x20'+_0x1bc720[_0xb61a18(0x18c)]+_0xb61a18(0x19a)};}};function a62_0x3a1e(){const _0x5980c4=['Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','message','num','337046MtpUxh','102ncaBCM','number','isInteger','deleted','appCode','Required\x20to\x20execute\x20dataset\x20deletion','high-risk-write','120XFXflD','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','confirm','code','53168zlwrhg','Would\x20safely\x20delete\x20','\x20dataset(s);\x20','dbid','Dataset\x20id','source','16VzVdsY','Deleted\x20','expected-count','relatedPageInfoList','relatedPages','5556KDFPcd','title','filter','type','\x20failed','add','Would\x20delete\x20','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','49626AvHaeM','dbId','delete','3367Irbleb','7659553rUGXUe','description','validation','10gankrN','Matched\x20','push','/smartapi/dataset/delete?cascade=','id=','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','length','dbid=','\x20--appcode\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','No\x20undeleted\x20dataset\x20found\x20for\x20','dbtableConfig','true','boolean','cascade','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','POST','isArray','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','3884132EzGVqE','\x20dataset(s)','object','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','false','name','2796597LYsHzK','bool','3RXDrSb'];a62_0x3a1e=function(){return _0x5980c4;};return a62_0x3a1e();}async function resolveTargets(_0x459eb4){const _0x4d5fb9=a62_0x3efd68,_0x2eba38=_0x459eb4['num']('id'),_0x5d9688=_0x459eb4['str'](_0x4d5fb9(0x1b1)),_0x3cc69d=_0x459eb4[_0x4d5fb9(0x1a5)]('dbid');let _0x53afd4;_0x5d9688?(_0x53afd4=await listDatasets(_0x459eb4['appCode'],{'code':_0x5d9688}),_0x53afd4=_0x53afd4[_0x4d5fb9(0x1bf)](_0x23ba53=>_0x23ba53[_0x4d5fb9(0x1b1)]===_0x5d9688)):(_0x53afd4=await listDatasets(_0x459eb4[_0x4d5fb9(0x1ab)]),_0x2eba38>0x0&&(_0x53afd4=_0x53afd4[_0x4d5fb9(0x1bf)](_0x10fb2f=>_0x10fb2f['id']===_0x2eba38)),_0x3cc69d>0x0&&(_0x53afd4=_0x53afd4[_0x4d5fb9(0x1bf)](_0x2c501a=>_0x2c501a[_0x4d5fb9(0x191)]?.[_0x4d5fb9(0x180)]===_0x3cc69d)));const _0x3be52a=[];for(const _0x1a41e8 of _0x53afd4){const _0x543d71=await getDatasetDetail(_0x1a41e8['code']),_0x5049e3=Array[_0x4d5fb9(0x197)](_0x543d71[_0x4d5fb9(0x1bb)])?_0x543d71[_0x4d5fb9(0x1bb)][_0x4d5fb9(0x1bf)](_0x3a8826=>_0x3a8826!=null&&typeof _0x3a8826===_0x4d5fb9(0x19b)&&_0x3a8826[_0x4d5fb9(0x1aa)]!==!![]):[];_0x3be52a['push'](normalizeTarget(_0x1a41e8,_0x5049e3));}if(_0x3be52a['length']===0x0){const _0x3e000=_0x5d9688||(_0x2eba38>0x0?_0x4d5fb9(0x18a)+_0x2eba38:_0x4d5fb9(0x18d)+_0x3cc69d);throw CliErrors[_0x4d5fb9(0x185)](_0x4d5fb9(0x190)+_0x3e000+'.');}const _0x201eea=_0x459eb4['num'](_0x4d5fb9(0x1ba));if(_0x201eea>0x0&&_0x3be52a[_0x4d5fb9(0x18c)]!==_0x201eea)throw CliErrors[_0x4d5fb9(0x185)](_0x4d5fb9(0x187)+_0x3be52a[_0x4d5fb9(0x18c)]+_0x4d5fb9(0x1a3)+_0x201eea+'.');return _0x3be52a;}function normalizeTarget(_0x4f7493,_0x3942d7){const _0x3d67d3=a62_0x3efd68,_0x45d28d=_0x4f7493['dbtableConfig']??{},_0x12906a=_0x3942d7['map'](_0x778fc6=>{const _0x309512=a62_0x353d;if(_0x778fc6==null||typeof _0x778fc6!==_0x309512(0x19b))return null;const _0x22dc17=_0x778fc6,_0x598650=Number(_0x22dc17['id']);if(!Number[_0x309512(0x1a9)](_0x598650)||_0x598650<=0x0)return null;const _0x517bca=_0x22dc17[_0x309512(0x1be)]??_0x22dc17['name'];return{'id':_0x598650,..._0x517bca?{'name':String(_0x517bca)}:{},..._0x22dc17[_0x309512(0x17a)]?{'type':String(_0x22dc17[_0x309512(0x17a)])}:{}};})[_0x3d67d3(0x1bf)](_0x3b1578=>_0x3b1578!==null);return{'id':_0x4f7493['id'],'code':_0x4f7493[_0x3d67d3(0x1b1)],'name':_0x4f7493[_0x3d67d3(0x19e)],'description':_0x4f7493[_0x3d67d3(0x184)],'source':_0x4f7493[_0x3d67d3(0x1b7)],'dbId':_0x45d28d[_0x3d67d3(0x180)],'dbName':_0x45d28d['dbName'],'tableName':_0x45d28d['tableName'],'relatedPageCount':_0x12906a['length'],'relatedPages':_0x12906a};}function buildPageRestoreCommands(_0x17a121,_0x4196a8){const _0x4c8325=a62_0x3efd68,_0x7c67c=new Set();for(const _0x2f4773 of _0x4196a8){for(const _0x28faa9 of _0x2f4773[_0x4c8325(0x1bc)])_0x7c67c[_0x4c8325(0x17c)](_0x28faa9['id']);}return[..._0x7c67c]['map'](_0x41ef06=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x41ef06+_0x4c8325(0x18e)+_0x17a121);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x2a0228=a63_0x4137;(function(_0x2211f7,_0x3981dc){const _0x394398=a63_0x4137,_0x11a524=_0x2211f7();while(!![]){try{const _0x4b2d66=parseInt(_0x394398(0x11d))/0x1+parseInt(_0x394398(0x11c))/0x2*(-parseInt(_0x394398(0x142))/0x3)+parseInt(_0x394398(0x125))/0x4+parseInt(_0x394398(0x150))/0x5+parseInt(_0x394398(0x11b))/0x6+-parseInt(_0x394398(0x12c))/0x7+parseInt(_0x394398(0x11e))/0x8;if(_0x4b2d66===_0x3981dc)break;else _0x11a524['push'](_0x11a524['shift']());}catch(_0x299215){_0x11a524['push'](_0x11a524['shift']());}}}(a63_0x1d55,0x40327));function a63_0x4137(_0x3a29b8,_0x1cf4f){_0x3a29b8=_0x3a29b8-0x118;const _0x1d55e3=a63_0x1d55();let _0x413721=_0x1d55e3[_0x3a29b8];return _0x413721;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x350b58){const _0x52c9db=a63_0x4137;if(_0x350b58[_0x52c9db(0x119)])return null;const _0x25b530=Boolean(_0x350b58[_0x52c9db(0x127)]!==undefined||_0x350b58[_0x52c9db(0x163)]!==undefined);let _0x758230={};if(!_0x25b530&&typeof _0x350b58[_0x52c9db(0x160)]===_0x52c9db(0x118))try{_0x758230=JSON[_0x52c9db(0x143)](_0x350b58[_0x52c9db(0x160)]);}catch{}const _0x2c9e49=_0x25b530?_0x350b58[_0x52c9db(0x133)]:_0x350b58[_0x52c9db(0x128)],_0x4b7507=_0x25b530?_0x350b58[_0x52c9db(0x127)]:_0x350b58[_0x52c9db(0x133)],_0x3ea6e7=_0x25b530?_0x350b58[_0x52c9db(0x163)]:_0x350b58['type']||_0x350b58[_0x52c9db(0x153)],_0x990519=_0x25b530?_0x350b58['pkField']===!![]:_0x758230[_0x52c9db(0x146)]===!![],_0xd2a021=_0x25b530?_0x350b58['required']===!![]:_0x758230['required']===!![],_0x41b5a2=_0x25b530?_0x350b58[_0x52c9db(0x144)]??null:_0x758230['options']??null,_0x5bcb78={'name':_0x2c9e49,'displayName':_0x4b7507||_0x2c9e49,'type':_0x3ea6e7,'dbType':_0x350b58[_0x52c9db(0x14a)],'pk':_0x990519,'required':_0xd2a021,'deprecated':_0x350b58[_0x52c9db(0x136)]===!![],'description':_0x350b58[_0x52c9db(0x151)]||undefined};return Array[_0x52c9db(0x15f)](_0x41b5a2)&&_0x41b5a2[_0x52c9db(0x130)]>0x0&&(_0x5bcb78[_0x52c9db(0x144)]=_0x41b5a2),_0x5bcb78;}function parseJsonMaybe(_0x436a6){const _0x4694fc=a63_0x4137;if(typeof _0x436a6!==_0x4694fc(0x118))return _0x436a6;try{return JSON[_0x4694fc(0x143)](_0x436a6);}catch{return _0x436a6;}}function a63_0x1d55(){const _0x5a51fb=['dataset','isArray','extend','labelField','trim','doType','relationId','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','sourceType','fields','string','deleted','path','2069418uznLrY','879022ZjxPsR','202606YEnSem','271416EUgtCJ','dblinkInfoDTO','updateTimeField','method','responseBody','read','creatorIdField','891556yQyJVK','source','displayName','code','str','allFieldNames','validateRules','836500ZSxNig','formatRules','main_sub','doVersion','length','beforeScriptId','host','name','bizRelationType','toField','deprecated','responseFields','modelCode','operations','requestBody','afterScriptId','modifierIdField','indexes','relations','requestFields','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','type','3LJeWFk','parse','options','modelId','pkField','dbName','logicField','toTableName','dbType','filter','relatedPageInfoList','dbId','map','allFields','88185lTcULR','description','toDatasetName','dataType','push','entries','modifierNameField','object','tableName','createTimeField','toFieldLabel','columnCodeListWithDeleted','properties','tableComment'];a63_0x1d55=function(){return _0x5a51fb;};return a63_0x1d55();}function normalizeOperationEntry(_0x569319,_0x498b00){const _0x3d0314=a63_0x4137;if(!_0x498b00||typeof _0x498b00!==_0x3d0314(0x157))return null;if(!_0x498b00[_0x3d0314(0x121)]||!_0x498b00['path'])return null;const _0xc5d174={'name':_0x569319,'method':_0x498b00[_0x3d0314(0x121)],'path':_0x498b00[_0x3d0314(0x11a)]};if(_0x498b00[_0x3d0314(0x132)])_0xc5d174['host']=_0x498b00['host'];if(_0x498b00[_0x3d0314(0x13a)]!=null){const _0x196402=parseJsonMaybe(_0x498b00['requestBody']);_0xc5d174[_0x3d0314(0x13a)]=_0x196402;}if(_0x498b00[_0x3d0314(0x122)]!=null){const _0x2f5259=parseJsonMaybe(_0x498b00[_0x3d0314(0x122)]);_0xc5d174[_0x3d0314(0x122)]=_0x2f5259;}if(_0x498b00[_0x3d0314(0x131)]!=null)_0xc5d174[_0x3d0314(0x131)]=_0x498b00['beforeScriptId'];if(_0x498b00['afterScriptId']!=null)_0xc5d174[_0x3d0314(0x13b)]=_0x498b00[_0x3d0314(0x13b)];if(Array[_0x3d0314(0x15f)](_0x498b00[_0x3d0314(0x13f)]))_0xc5d174[_0x3d0314(0x13f)]=_0x498b00[_0x3d0314(0x13f)];if(Array[_0x3d0314(0x15f)](_0x498b00['responseFields']))_0xc5d174['responseFields']=_0x498b00[_0x3d0314(0x137)];return _0xc5d174;}function summarizeDbtable(_0x2b4152){const _0x4c616a=a63_0x4137,_0x4a45e2={},_0x14166c=[_0x4c616a(0x14d),_0x4c616a(0x147),'tableName','datasetKey',_0x4c616a(0x146),_0x4c616a(0x14f),_0x4c616a(0x148),_0x4c616a(0x159),_0x4c616a(0x120),_0x4c616a(0x124),'creatorNameField',_0x4c616a(0x13c),_0x4c616a(0x156),_0x4c616a(0x161),_0x4c616a(0x11f)];for(const _0xd35697 of _0x14166c){if(_0x2b4152[_0xd35697]!==undefined)_0x4a45e2[_0xd35697]=_0x2b4152[_0xd35697];}return typeof _0x4a45e2['allFields']===_0x4c616a(0x118)&&_0x4a45e2[_0x4c616a(0x14f)]['length']>0x0&&(_0x4a45e2[_0x4c616a(0x12a)]=_0x4a45e2[_0x4c616a(0x14f)]['split'](',')['map'](_0x59f3c4=>_0x59f3c4[_0x4c616a(0x162)]())['filter'](Boolean)),_0x4a45e2;}function normalizeRelatedPages(_0x124722){const _0x2581e7=a63_0x4137;if(!Array[_0x2581e7(0x15f)](_0x124722))return[];return _0x124722[_0x2581e7(0x14b)](_0x4274bd=>_0x4274bd&&typeof _0x4274bd===_0x2581e7(0x157))[_0x2581e7(0x14e)](_0xce871f=>({'id':_0xce871f['id'],'type':_0xce871f[_0x2581e7(0x141)],'code':_0xce871f[_0x2581e7(0x128)],'title':_0xce871f['title'],'deleted':_0xce871f['deleted']===!![]}));}export const datasetDetail={'service':a63_0x2a0228(0x15e),'command':'detail','description':a63_0x2a0228(0x140),'risk':a63_0x2a0228(0x123),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a63_0x2a0228(0x165)}],async 'execute'(_0x347136){const _0x1c8c39=a63_0x2a0228,_0x3d4263=await getDatasetDetail(_0x347136[_0x1c8c39(0x129)](_0x1c8c39(0x128))),_0x3fe136=Array[_0x1c8c39(0x15f)](_0x3d4263[_0x1c8c39(0x167)])?_0x3d4263[_0x1c8c39(0x167)]:Array[_0x1c8c39(0x15f)](_0x3d4263[_0x1c8c39(0x15c)])?_0x3d4263[_0x1c8c39(0x15c)]:[],_0x33676a=_0x3fe136['map'](_0x188707=>normalizeField(_0x188707))[_0x1c8c39(0x14b)](_0x1b25ff=>_0x1b25ff!==null),_0x47cefd=_0x3d4263[_0x1c8c39(0x139)]??{},_0x490ed4=[];for(const [_0x49e2b0,_0x3a66a5]of Object[_0x1c8c39(0x155)](_0x47cefd)){const _0x306269=normalizeOperationEntry(_0x49e2b0,_0x3a66a5);if(_0x306269)_0x490ed4[_0x1c8c39(0x154)](_0x306269);}const _0x22e636=_0x3d4263['dbtableConfig']??{},_0x181379=_0x3d4263['dataset']??{},_0x3cc1ce=_0x22e636[_0x1c8c39(0x14d)]!=null?{'id':_0x22e636[_0x1c8c39(0x14d)],'name':_0x22e636[_0x1c8c39(0x147)]??null}:undefined;let _0x500c2d;return typeof _0x3d4263['extend']==='string'&&(_0x500c2d=parseJsonMaybe(_0x3d4263['extend'])),{'ok':!![],'data':{'id':_0x3d4263[_0x1c8c39(0x145)]??_0x3d4263['id'],'name':_0x3d4263['name'],'code':_0x3d4263[_0x1c8c39(0x138)]||_0x3d4263['code'],'doVersion':_0x3d4263[_0x1c8c39(0x12f)],'description':_0x3d4263[_0x1c8c39(0x151)]||_0x181379[_0x1c8c39(0x15d)]||undefined,'source':_0x3d4263[_0x1c8c39(0x126)]||_0x181379[_0x1c8c39(0x166)],'table':_0x22e636[_0x1c8c39(0x158)]||_0x181379[_0x1c8c39(0x158)],'datasetKey':_0x22e636['datasetKey'],'pk':_0x22e636[_0x1c8c39(0x146)],'db':_0x3cc1ce,'dbtable':summarizeDbtable(_0x22e636),'fields':_0x33676a,'operations':_0x490ed4,'indexes':Array[_0x1c8c39(0x15f)](_0x181379[_0x1c8c39(0x13d)])?_0x181379['indexes']:[],'relations':Array[_0x1c8c39(0x15f)](_0x3d4263['relations'])?_0x3d4263[_0x1c8c39(0x13e)][_0x1c8c39(0x14e)](_0x10db45=>({..._0x10db45[_0x1c8c39(0x164)]!=null?{'relationId':_0x10db45[_0x1c8c39(0x164)]}:{},'fromDataset':_0x3d4263[_0x1c8c39(0x133)],'fromCode':_0x3d4263[_0x1c8c39(0x138)]||_0x3d4263['code'],'fromTable':_0x22e636[_0x1c8c39(0x158)]||_0x181379['tableName'],'fromField':_0x10db45['fromField'],'toDataset':_0x10db45[_0x1c8c39(0x152)],'toCode':_0x10db45['toDatasetCode'],'toTable':_0x10db45[_0x1c8c39(0x149)],'toField':_0x10db45[_0x1c8c39(0x135)],'labelField':_0x10db45[_0x1c8c39(0x15a)]||undefined,'cardinality':_0x10db45['cardinality']||undefined,'bizRelationType':_0x10db45[_0x1c8c39(0x134)]===_0x1c8c39(0x12e)?_0x1c8c39(0x12e):null})):[],'relatedPages':normalizeRelatedPages(_0x3d4263[_0x1c8c39(0x14c)]),...Array[_0x1c8c39(0x15f)](_0x3d4263[_0x1c8c39(0x15b)])?{'columnCodeListWithDeleted':_0x3d4263[_0x1c8c39(0x15b)]}:{},'formatRules':Array[_0x1c8c39(0x15f)](_0x3d4263[_0x1c8c39(0x12d)])?_0x3d4263[_0x1c8c39(0x12d)]:[],'validateRules':Array[_0x1c8c39(0x15f)](_0x3d4263['validateRules'])?_0x3d4263[_0x1c8c39(0x12b)]:[],..._0x500c2d!==undefined?{'extend':_0x500c2d}:{},'stats':{'fieldCount':_0x33676a[_0x1c8c39(0x130)],'operationCount':_0x490ed4['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x59b2f9=a64_0x4037;(function(_0x2b05b4,_0x23ca44){const _0x527a34=a64_0x4037,_0x5c4699=_0x2b05b4();while(!![]){try{const _0x210261=-parseInt(_0x527a34(0x104))/0x1+parseInt(_0x527a34(0xe8))/0x2*(parseInt(_0x527a34(0xfe))/0x3)+parseInt(_0x527a34(0xe3))/0x4+-parseInt(_0x527a34(0x10a))/0x5*(parseInt(_0x527a34(0x112))/0x6)+parseInt(_0x527a34(0xf1))/0x7+parseInt(_0x527a34(0x103))/0x8*(-parseInt(_0x527a34(0xe6))/0x9)+-parseInt(_0x527a34(0xf0))/0xa;if(_0x210261===_0x23ca44)break;else _0x5c4699['push'](_0x5c4699['shift']());}catch(_0x3b7614){_0x5c4699['push'](_0x5c4699['shift']());}}}(a64_0x2c5e,0x662aa));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const MUTABLE_EXTEND_KEYS=new Set(),EXTEND_PATCH_REDIRECTS=new Map([['businessGroup',{'message':'dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update','hint':a64_0x59b2f9(0xe1)}]]);function a64_0x4037(_0x209e46,_0x5990ee){_0x209e46=_0x209e46-0xdf;const _0x2c5e02=a64_0x2c5e();let _0x403729=_0x2c5e02[_0x209e46];return _0x403729;}export function parseJsonObjectFlag(_0xce2758,_0x4f5043){const _0x9a4709=a64_0x59b2f9;if(!_0xce2758)return undefined;let _0x1780dc;try{_0x1780dc=JSON[_0x9a4709(0x10e)](_0xce2758);}catch(_0x146857){const _0x5dab18=_0x146857 instanceof Error?_0x146857[_0x9a4709(0x101)]:String(_0x146857);throw CliErrors[_0x9a4709(0x10c)](_0x4f5043+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x5dab18);}if(!isPlainObject(_0x1780dc)||Array[_0x9a4709(0x10b)](_0x1780dc))throw CliErrors['validation'](_0x4f5043+_0x9a4709(0x114));return _0x1780dc;}export function validateExtendPatchKeys(_0x7456d8){const _0x33528a=a64_0x59b2f9,_0x4ed429=Object[_0x33528a(0xfb)](_0x7456d8);if(_0x4ed429[_0x33528a(0xf7)]===0x0)throw CliErrors['validation'](_0x33528a(0xec));for(const _0x265db9 of _0x4ed429){const _0x8f6aaf=EXTEND_PATCH_REDIRECTS[_0x33528a(0x110)](_0x265db9);if(_0x8f6aaf)throw CliErrors[_0x33528a(0x10c)](_0x8f6aaf[_0x33528a(0x101)],_0x8f6aaf[_0x33528a(0xfc)]);if(!MUTABLE_EXTEND_KEYS[_0x33528a(0x117)](_0x265db9))throw CliErrors[_0x33528a(0x10c)](_0x33528a(0xfa)+_0x265db9,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x24388f=a64_0x59b2f9,_0xe847=Array[_0x24388f(0xe7)](MUTABLE_EXTEND_KEYS)[_0x24388f(0x105)]();return _0xe847[_0x24388f(0xf7)]>0x0?'Allowed\x20keys:\x20'+_0xe847[_0x24388f(0xe4)](',\x20'):_0x24388f(0xee);}export function applyExtendPatch(_0x297ec9,_0x1ae30a){const _0x4b5b4f=a64_0x59b2f9;validateExtendPatchKeys(_0x1ae30a);const _0x30f3b3=deepClone(_0x297ec9),_0x1d03f6=[];for(const [_0x2cd726,_0x5630c9]of Object[_0x4b5b4f(0x100)](_0x1ae30a)){const _0x28bb48=_0x30f3b3[_0x2cd726],_0x1c84de=deepClone(_0x5630c9);!deepEqual(_0x28bb48,_0x1c84de)&&(_0x30f3b3[_0x2cd726]=_0x1c84de,_0x1d03f6[_0x4b5b4f(0xeb)](_0x4b5b4f(0x119)+_0x2cd726));}return _0x1d03f6[_0x4b5b4f(0x105)](),{'after':_0x30f3b3,'changedPaths':_0x1d03f6,'changed':_0x1d03f6['length']>0x0};}export function assertExpectation(_0x54279f,_0x4da124){const _0x690ae=a64_0x59b2f9;if(!_0x4da124)return;for(const [_0x1ac07c,_0x2a42aa]of Object[_0x690ae(0x100)](_0x4da124)){const _0x2537cf=_0x54279f[_0x1ac07c];if(!deepEqual(_0x2537cf,_0x2a42aa))throw CliErrors[_0x690ae(0x10c)](_0x690ae(0x118)+_0x1ac07c,_0x690ae(0x111)+JSON[_0x690ae(0x107)](_0x2a42aa)+',\x20actual\x20'+JSON[_0x690ae(0x107)](_0x2537cf));}}export async function buildDatasetExtendUpdateResult({appCode:_0x11ae31,input:_0x13b44b,dryRun:_0x5aeb16}){const _0x2faa00=a64_0x59b2f9;validateInput(_0x13b44b);const _0x3f83ea=await getDatasetDetail(_0x13b44b[_0x2faa00(0x11a)]),_0x4bafd5=parseDatasetExtend(_0x3f83ea[_0x2faa00(0x116)]),_0x7a243f=deepClone(_0x4bafd5[_0x2faa00(0x106)]);assertExpectation(_0x7a243f,_0x13b44b['expect']);const {after:_0x5db069,changedPaths:_0x43f993,changed:_0x2a87f0}=applyExtendPatch(_0x7a243f,_0x13b44b[_0x2faa00(0x109)]),_0x2a8bcf=summarizeDataset(_0x3f83ea,_0x13b44b['code']);return _0x2a87f0&&!_0x5aeb16&&(_0x3f83ea[_0x2faa00(0x116)]=serializeDatasetExtend(_0x5db069,_0x4bafd5[_0x2faa00(0x102)]),await updateDrivenData(_0x3f83ea)),{'ok':!![],'data':{'appCode':_0x11ae31,'selector':{'code':_0x13b44b['code']},'dataset':_0x2a8bcf,'dryRun':_0x5aeb16,'changed':_0x2a87f0,'changedPaths':_0x43f993,'before':{'extend':_0x7a243f},'after':{'extend':_0x5db069},'submitted':_0x2a87f0&&!_0x5aeb16},'message':_0x2a87f0?_0x5aeb16?_0x2faa00(0xea)+_0x43f993[_0x2faa00(0xe4)](',\x20')+')':_0x2faa00(0x10f)+_0x43f993[_0x2faa00(0xe4)](',\x20')+')':'No\x20changes\x20for\x20dataset\x20extend'};}export const datasetExtendUpdate={'service':'dataset','command':'extend-update','description':a64_0x59b2f9(0x10d),'risk':'write','flags':[CODE_FLAG,{'name':a64_0x59b2f9(0xe9),'type':a64_0x59b2f9(0xf3),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a64_0x59b2f9(0xf9),'type':a64_0x59b2f9(0xf3),'required':![],'description':a64_0x59b2f9(0xe2)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x245acf){validateInput(readExtendUpdateInput(_0x245acf));},async 'dryRun'(_0x32efad){const _0x500355=a64_0x59b2f9,_0x25b6ff=await buildDatasetExtendUpdateResult({'appCode':_0x32efad['appCode'],'input':readExtendUpdateInput(_0x32efad),'dryRun':!![]});return{'method':_0x500355(0xf4),'url':_0x500355(0xdf),'body':_0x25b6ff['data'],'description':_0x25b6ff[_0x500355(0x101)]};},async 'execute'(_0x42bd42){return buildDatasetExtendUpdateResult({'appCode':_0x42bd42['appCode'],'input':readExtendUpdateInput(_0x42bd42),'dryRun':![]});}};function readExtendUpdateInput(_0x23f7ac){const _0x499947=a64_0x59b2f9,_0x316a20=trim(_0x23f7ac[_0x499947(0x115)]('code')),_0x24a66d=parseJsonObjectFlag(_0x23f7ac[_0x499947(0x115)]('patch-json'),'--patch-json'),_0x54017a=parseJsonObjectFlag(_0x23f7ac['str'](_0x499947(0xf9)),_0x499947(0xff));return{'code':_0x316a20,'patch':_0x24a66d||{},'expect':_0x54017a};}function validateInput(_0x5021fb){const _0x39db4d=a64_0x59b2f9;if(!_0x5021fb[_0x39db4d(0x11a)])throw CliErrors['validation'](_0x39db4d(0xef));validateExtendPatchKeys(_0x5021fb['patch']);}function parseDatasetExtend(_0x15d31e){const _0x2744a3=a64_0x59b2f9;if(typeof _0x15d31e===_0x2744a3(0xf3)){const _0x1a08c1=_0x15d31e[_0x2744a3(0xe0)]();if(!_0x1a08c1)return{'value':{},'shape':_0x2744a3(0xf3)};let _0x3f04da;try{_0x3f04da=JSON[_0x2744a3(0x10e)](_0x1a08c1);}catch(_0x364cbc){const _0x2aa81c=_0x364cbc instanceof Error?_0x364cbc[_0x2744a3(0x101)]:String(_0x364cbc);throw CliErrors[_0x2744a3(0x10c)]('Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x2aa81c);}if(!isPlainObject(_0x3f04da)||Array[_0x2744a3(0x10b)](_0x3f04da))throw CliErrors[_0x2744a3(0x10c)](_0x2744a3(0x11b));return{'value':_0x3f04da,'shape':_0x2744a3(0xf3)};}if(_0x15d31e===undefined||_0x15d31e===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x15d31e)||Array[_0x2744a3(0x10b)](_0x15d31e))throw CliErrors['validation'](_0x2744a3(0x11b));return{'value':_0x15d31e,'shape':'object'};}function serializeDatasetExtend(_0x497cb7,_0x36e568){const _0x341fa3=a64_0x59b2f9;return _0x36e568===_0x341fa3(0xf3)?JSON[_0x341fa3(0x107)](_0x497cb7):_0x497cb7;}function summarizeDataset(_0xf8b12,_0x4c799e){const _0x4de2fe=a64_0x59b2f9,_0x5e6121=isPlainObject(_0xf8b12[_0x4de2fe(0xf5)])?_0xf8b12[_0x4de2fe(0xf5)]:{},_0x322f75=isPlainObject(_0xf8b12[_0x4de2fe(0xf6)])?_0xf8b12[_0x4de2fe(0xf6)]:{};return{'id':_0xf8b12['modelId']??_0xf8b12['id']??_0x5e6121[_0x4de2fe(0xf8)]??null,'code':_0xf8b12[_0x4de2fe(0x113)]??_0xf8b12[_0x4de2fe(0x11a)]??_0x5e6121[_0x4de2fe(0xf2)]??_0x4c799e,'name':_0xf8b12[_0x4de2fe(0xe5)]??_0x5e6121[_0x4de2fe(0x11c)]??null,'table':_0x322f75[_0x4de2fe(0xfd)]??_0x5e6121['tableName']??null,'db':_0x322f75['dbName']??_0x322f75[_0x4de2fe(0xed)]??null};}function a64_0x2c5e(){const _0xcd2601=['Expectation\x20mismatch\x20at\x20extend.','extend.','code','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','datasetName','/smartapi/dataset/update-driven-data','trim','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','2344744AiGSor','join','name','270027bTGPFI','from','2HUfYVI','patch-json','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','push','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','dbId','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','--code\x20is\x20required','1654930tILfWK','2778860yMrbIq','datasetCode','string','POST','dataset','dbtableConfig','length','datasetId','expect-json','Unsupported\x20patch\x20key:\x20','keys','hint','tableName','1010535gPRIuE','--expect-json','entries','message','shape','104tGmEIe','296053xuNadK','sort','value','stringify','object','patch','17840eBFfKo','isArray','validation','Patch\x20dataset\x20top-level\x20extend\x20safely','parse','Updated\x20dataset\x20extend\x20(','get','Expected\x20','84MAPnAq','modelCode','\x20must\x20be\x20a\x20JSON\x20object','str','extend','has'];a64_0x2c5e=function(){return _0xcd2601;};return a64_0x2c5e();}function deepClone(_0x42fecf){const _0x511ebd=a64_0x59b2f9;if(_0x42fecf===undefined)return _0x42fecf;return JSON[_0x511ebd(0x10e)](JSON[_0x511ebd(0x107)](_0x42fecf));}function deepEqual(_0x54219a,_0x366e58){const _0xc74608=a64_0x59b2f9;return JSON['stringify'](_0x54219a)===JSON[_0xc74608(0x107)](_0x366e58);}function isPlainObject(_0x5c86e8){const _0x11bc02=a64_0x59b2f9;return Boolean(_0x5c86e8)&&typeof _0x5c86e8===_0x11bc02(0x108)&&!Array[_0x11bc02(0x10b)](_0x5c86e8);}function trim(_0x508fe2){const _0x152271=a64_0x59b2f9,_0xbcb071=String(_0x508fe2||'')[_0x152271(0xe0)]();return _0xbcb071;}
|