@lovrabet/rabetbase-cli 2.5.0-beta.4 → 2.5.0-beta.6
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/README.md +28 -0
- 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/api/generate-sdk-config-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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/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/table-diff-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/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.js +1 -1
- 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/domain-config.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/region.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.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/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 +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5bdfbd,_0xbff43a){const _0x40bfdf=a49_0x191e,_0x1a0d40=_0x5bdfbd();while(!![]){try{const _0x22dfaa=-parseInt(_0x40bfdf(0x71))/0x1+parseInt(_0x40bfdf(0x6f))/0x2+parseInt(_0x40bfdf(0x73))/0x3*(-parseInt(_0x40bfdf(0x70))/0x4)+-parseInt(_0x40bfdf(0x77))/0x5*(parseInt(_0x40bfdf(0x76))/0x6)+parseInt(_0x40bfdf(0x72))/0x7+parseInt(_0x40bfdf(0x7a))/0x8+-parseInt(_0x40bfdf(0x7c))/0x9;if(_0x22dfaa===_0xbff43a)break;else _0x1a0d40['push'](_0x1a0d40['shift']());}catch(_0x488d87){_0x1a0d40['push'](_0x1a0d40['shift']());}}}(a49_0xdf7a,0x887c7));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0xdf7a(){const _0x305861=['\x20MB','File\x20not\x20found:\x20','6419240lWmzIS','File\x20is\x20not\x20a\x20regular\x20file:\x20','152595jkocjM','ceil','toFixed','trim','validation','1271710KtAJPj','4MixQOH','46901AAwHMc','387198eaVYFo','103434eojmmy','size','isFile','5017158PAykcH','5vVMJBF'];a49_0xdf7a=function(){return _0x305861;};return a49_0xdf7a();}const BYTES_PER_MB=0x400*0x400;function a49_0x191e(_0x22f946,_0x266a4e){_0x22f946=_0x22f946-0x6f;const _0xdf7a47=a49_0xdf7a();let _0x191ec6=_0xdf7a47[_0x22f946];return _0x191ec6;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x21635e){const _0x5d7f5a=a49_0x191e;if(_0x21635e>=BYTES_PER_MB){const _0x38b6cb=Math[_0x5d7f5a(0x7d)](_0x21635e/BYTES_PER_MB*0x64)/0x64;return _0x38b6cb[_0x5d7f5a(0x7e)](0x2)+_0x5d7f5a(0x78);}return _0x21635e+'\x20B';}export function requireDevelopmentUploadFile(_0x391609,_0x46ae73){const _0xed411d=a49_0x191e,_0x2bc46c=_0x391609[_0xed411d(0x7f)]();if(!_0x2bc46c)throw CliErrors[_0xed411d(0x80)](_0x46ae73+'\x20path\x20is\x20required.');if(!existsSync(_0x2bc46c))throw CliErrors[_0xed411d(0x80)](_0xed411d(0x79)+_0x2bc46c);const _0x21a6f1=statSync(_0x2bc46c);if(!_0x21a6f1[_0xed411d(0x75)]())throw CliErrors[_0xed411d(0x80)](_0xed411d(0x7b)+_0x2bc46c);if(_0x21a6f1[_0xed411d(0x74)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2bc46c+'\x20('+formatBytes(_0x21a6f1[_0xed411d(0x74)])+')');return{'path':_0x2bc46c,'size':_0x21a6f1[_0xed411d(0x74)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x29a1(){const _0x56c50a=['10GAhzXs','3230890AQdqMD','App\x20Code\x20cannot\x20be\x20empty','95607diWYVi','79203qFxHLR','trim','149926eiqMmT','51061bctjpa','30kNsEOQ','App\x20Code\x20cannot\x20exceed\x20100\x20characters','10LnOEHy','535796lbVAkY','618368eoDKgj'];a50_0x29a1=function(){return _0x56c50a;};return a50_0x29a1();}function a50_0x3aca(_0x3321ed,_0x1d65f7){_0x3321ed=_0x3321ed-0xcb;const _0x29a1ae=a50_0x29a1();let _0x3acab1=_0x29a1ae[_0x3321ed];return _0x3acab1;}(function(_0x409c4c,_0x20dbc5){const _0x5d37ce=a50_0x3aca,_0x23e89a=_0x409c4c();while(!![]){try{const _0x41a8e1=-parseInt(_0x5d37ce(0xd3))/0x1*(parseInt(_0x5d37ce(0xcc))/0x2)+-parseInt(_0x5d37ce(0xd0))/0x3+parseInt(_0x5d37ce(0xd7))/0x4*(parseInt(_0x5d37ce(0xd6))/0x5)+-parseInt(_0x5d37ce(0xd4))/0x6*(parseInt(_0x5d37ce(0xd2))/0x7)+-parseInt(_0x5d37ce(0xcb))/0x8+parseInt(_0x5d37ce(0xcf))/0x9+parseInt(_0x5d37ce(0xcd))/0xa;if(_0x41a8e1===_0x20dbc5)break;else _0x23e89a['push'](_0x23e89a['shift']());}catch(_0x51f227){_0x23e89a['push'](_0x23e89a['shift']());}}}(a50_0x29a1,0x2115e));export function validateAppcode(_0x8888a7){const _0x2bedf8=a50_0x3aca,_0x17d355=_0x8888a7[_0x2bedf8(0xd1)]();if(!_0x17d355)return{'valid':![],'message':_0x2bedf8(0xce)};if(_0x17d355['length']>0x64)return{'valid':![],'message':_0x2bedf8(0xd5)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x17d355))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x83cc2f=a51_0x382c;(function(_0x2150e9,_0x45171b){const _0x297c9b=a51_0x382c,_0x405603=_0x2150e9();while(!![]){try{const _0x122770=parseInt(_0x297c9b(0x1be))/0x1+parseInt(_0x297c9b(0x1b0))/0x2+-parseInt(_0x297c9b(0x1bc))/0x3*(-parseInt(_0x297c9b(0x19f))/0x4)+parseInt(_0x297c9b(0x1bf))/0x5+-parseInt(_0x297c9b(0x1b9))/0x6+parseInt(_0x297c9b(0x1a0))/0x7+-parseInt(_0x297c9b(0x1a9))/0x8*(parseInt(_0x297c9b(0x1a2))/0x9);if(_0x122770===_0x45171b)break;else _0x405603['push'](_0x405603['shift']());}catch(_0xbd62e7){_0x405603['push'](_0x405603['shift']());}}}(a51_0x2924,0x696d1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x2924(){const _0x1b43fe=['prototype','194134BKNwmV','606165FQxyKD','hasOwnProperty','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Missing\x20key\x20argument.','549548GNmSRc','5941131dNdhoj','Top-level\x20key\x20\x22','2196HoPfho','Global','global','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','has','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Project','35168xEbCXi','boolean','defaultApp','delete','\x20already\x20absent','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x20deleted','886908ZBMUvc','call','riskLevel','validation','key','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','bool','\x20config\x20delete\x20<key>\x20[--global]','trim','1442952mGneAN','config','write','3dgEHva'];a51_0x2924=function(){return _0x1b43fe;};return a51_0x2924();}const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a51_0x83cc2f(0x1ab)]);function a51_0x382c(_0x53f340,_0x5932f5){_0x53f340=_0x53f340-0x19f;const _0x2924ef=a51_0x2924();let _0x382c89=_0x2924ef[_0x53f340];return _0x382c89;}async function execute(_0x4dc945){const _0x16366c=a51_0x83cc2f,_0x31b787=_0x4dc945['args'][0x0]?.[_0x16366c(0x1b8)]();if(!_0x31b787)throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1c2),'Usage:\x20'+CLI_BIN_NAME+_0x16366c(0x1b7));if(_0x31b787===_0x16366c(0x1b2))throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1b5));if(!isTopLevelConfigKey(_0x31b787)&&!EXTRA_DELETABLE_KEYS['has'](_0x31b787)&&!LEGACY_DELETABLE_KEYS[_0x16366c(0x1a6)](_0x31b787))throw CliErrors[_0x16366c(0x1b3)](_0x16366c(0x1a1)+_0x31b787+'\x22\x20is\x20not\x20deletable.',_0x16366c(0x1ae));const _0x33af1f=resolveWriteScope({'global':_0x4dc945[_0x16366c(0x1b6)](_0x16366c(0x1a4))}),_0x25674a=readScopedConfig(_0x33af1f),_0x2f8ff4=Object[_0x16366c(0x1bd)][_0x16366c(0x1c0)][_0x16366c(0x1b1)](_0x25674a,_0x31b787);_0x2f8ff4&&(delete _0x25674a[_0x31b787],writeScopedConfig(_0x25674a,_0x33af1f));const _0x4946b9=_0x33af1f===_0x16366c(0x1a4)?_0x16366c(0x1a3):_0x16366c(0x1a8);return{'ok':!![],'message':_0x2f8ff4?'✓\x20'+_0x4946b9+'\x20'+_0x31b787+_0x16366c(0x1af):'✓\x20'+_0x4946b9+'\x20'+_0x31b787+_0x16366c(0x1ad),'data':{'key':_0x31b787,'scope':_0x33af1f,'changed':_0x2f8ff4}};}export const configDeleteDefinition={'service':a51_0x83cc2f(0x1ba),'command':a51_0x83cc2f(0x1ac),'description':a51_0x83cc2f(0x1a7),'risk':a51_0x83cc2f(0x1bb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x83cc2f(0x1b4),'description':a51_0x83cc2f(0x1c1),'required':!![]}],'flags':[{'name':a51_0x83cc2f(0x1a4),'type':a51_0x83cc2f(0x1aa),'description':a51_0x83cc2f(0x1a5),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x1ab480=a52_0x4632;(function(_0x264444,_0x37b353){const _0x3c10e9=a52_0x4632,_0x47bd97=_0x264444();while(!![]){try{const _0x3b1295=-parseInt(_0x3c10e9(0xab))/0x1+parseInt(_0x3c10e9(0xae))/0x2+parseInt(_0x3c10e9(0xa3))/0x3+-parseInt(_0x3c10e9(0xaf))/0x4*(-parseInt(_0x3c10e9(0xb0))/0x5)+-parseInt(_0x3c10e9(0xa7))/0x6+-parseInt(_0x3c10e9(0xaa))/0x7+parseInt(_0x3c10e9(0xb4))/0x8;if(_0x3b1295===_0x37b353)break;else _0x47bd97['push'](_0x47bd97['shift']());}catch(_0x37baf7){_0x47bd97['push'](_0x47bd97['shift']());}}}(a52_0x3c6f,0x1f00d));function a52_0x3c6f(){const _0x480fda=['Get\x20a\x20config\x20value\x20by\x20key','Key\x20not\x20found:\x20','73507nBrSix','200882fzrXBT','key','\x20config\x20get\x20--key\x20<key>','320064qMAjMx','4wBvdyq','707030NGfvHB','Usage:\x20','appcode','string','1928864ZMIoXb','validation','str','135165RALqBM','object','Missing\x20key.','read','1495374UhkGxg'];a52_0x3c6f=function(){return _0x480fda;};return a52_0x3c6f();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a52_0x4632(_0x5e9af5,_0x45155d){_0x5e9af5=_0x5e9af5-0xa2;const _0x3c6f3d=a52_0x3c6f();let _0x4632b6=_0x3c6f3d[_0x5e9af5];return _0x4632b6;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2c82d7){const _0x1b5449=a52_0x4632,_0x4af50d=_0x2c82d7[_0x1b5449(0xa2)](_0x1b5449(0xac));if(!_0x4af50d)throw CliErrors[_0x1b5449(0xb5)](_0x1b5449(0xa5),_0x1b5449(0xb1)+CLI_BIN_NAME+_0x1b5449(0xad));const _0x55ae36=readConfig(),_0x1316a4=_0x4af50d==='app'?_0x1b5449(0xb2):_0x4af50d,_0x5ae7e2=_0x55ae36[_0x1316a4];if(_0x5ae7e2===undefined)throw CliErrors['validation'](_0x1b5449(0xa9)+_0x4af50d);return{'ok':!![],'data':typeof _0x5ae7e2===_0x1b5449(0xa4)?_0x5ae7e2:{[_0x1316a4]:_0x5ae7e2},'message':typeof _0x5ae7e2==='object'?undefined:String(_0x5ae7e2)};}export const configGetDefinition={'service':'config','command':'get','description':a52_0x1ab480(0xa8),'risk':a52_0x1ab480(0xa6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x1ab480(0xac),'type':a52_0x1ab480(0xb3),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x44fd(_0x238dab,_0x42af51){_0x238dab=_0x238dab-0x1e7;const _0x528058=a53_0x5280();let _0x44fdb2=_0x528058[_0x238dab];return _0x44fdb2;}(function(_0x3d0afd,_0x4d879b){const _0x279a79=a53_0x44fd,_0x5bd800=_0x3d0afd();while(!![]){try{const _0x50e2f6=parseInt(_0x279a79(0x1e8))/0x1*(parseInt(_0x279a79(0x1e9))/0x2)+-parseInt(_0x279a79(0x1eb))/0x3+-parseInt(_0x279a79(0x1ea))/0x4+parseInt(_0x279a79(0x1ed))/0x5*(-parseInt(_0x279a79(0x1ee))/0x6)+parseInt(_0x279a79(0x1ef))/0x7+parseInt(_0x279a79(0x1ec))/0x8*(-parseInt(_0x279a79(0x1e7))/0x9)+-parseInt(_0x279a79(0x1f0))/0xa*(-parseInt(_0x279a79(0x1f1))/0xb);if(_0x50e2f6===_0x4d879b)break;else _0x5bd800['push'](_0x5bd800['shift']());}catch(_0x58c20a){_0x5bd800['push'](_0x5bd800['shift']());}}}(a53_0x5280,0x7965b));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a53_0x5280(){const _0x305de5=['205560mXKWlk','2629697MEkUOH','9260CCOJOp','27742DGHIOq','293580zndUmu','16VvSVga','1180TpWEWc','543692vTPHAl','2596851tGmLEC','224dyAzuB','45ZMLttZ'];a53_0x5280=function(){return _0x305de5;};return a53_0x5280();}import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a54_0x44c6de=a54_0xce89;(function(_0x58f0a6,_0x1b6810){const _0xad4015=a54_0xce89,_0x17a487=_0x58f0a6();while(!![]){try{const _0x4f96f1=parseInt(_0xad4015(0x11a))/0x1+-parseInt(_0xad4015(0x134))/0x2*(parseInt(_0xad4015(0x12b))/0x3)+parseInt(_0xad4015(0x118))/0x4+parseInt(_0xad4015(0x12a))/0x5+-parseInt(_0xad4015(0x115))/0x6+parseInt(_0xad4015(0x11c))/0x7+-parseInt(_0xad4015(0x129))/0x8;if(_0x4f96f1===_0x1b6810)break;else _0x17a487['push'](_0x17a487['shift']());}catch(_0xb95d08){_0x17a487['push'](_0x17a487['shift']());}}}(a54_0x1b10,0x39c9d));function a54_0x1b10(){const _0x39024d=['global','1353912VrpDWe','Custom\x20SkillHub\x20HTTPS\x20origin','Custom\x20User\x20HTTPS\x20origin','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','Independent-deployment\x20Domain\x20JSON\x20file','Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','runtime-domain','region','Custom\x20knowledge-base\x20HTTPS\x20origin','Indonesia\x20(id)','join','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','str','2354400PDKPCs','1986490IHkxLG','699WSydle','Mainland\x20China\x20(cn)','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','validation','assign','domain-config','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','string','\x22\x20is\x20not\x20currently\x20available.','216btFLgU','Custom\x20platform\x20API\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','api-domain','Region\x20\x22','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','init','config','length','skill-domain','ExitPromptError','keys','1741578auNOIm','Available\x20regions:\x20','app-domain','534924rAXrME','name','121983iuKtNV'];a54_0x1b10=function(){return _0x39024d;};return a54_0x1b10();}import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';export const configInitFlags=[{'name':a54_0x44c6de(0x123),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x11f),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x44c6de(0x130),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x120)},{'name':'user-domain','type':'string','description':a54_0x44c6de(0x11e)},{'name':a54_0x44c6de(0x137),'type':'string','description':a54_0x44c6de(0x135)},{'name':a54_0x44c6de(0x122),'type':'string','description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a54_0x44c6de(0x112),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x11d)},{'name':'kb-domain','type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x124)},{'name':a54_0x44c6de(0x117),'type':a54_0x44c6de(0x132),'description':a54_0x44c6de(0x139)}];function a54_0xce89(_0x2a9b70,_0x4ced19){_0x2a9b70=_0x2a9b70-0x110;const _0x1b100f=a54_0x1b10();let _0xce89d3=_0x1b100f[_0x2a9b70];return _0xce89d3;}async function resolveRegion(_0xf3540e){const _0xa815c8=a54_0x44c6de,_0x210a4f=_0xf3540e['str'](_0xa815c8(0x123));if(_0x210a4f){if(!isEnabledLovrabetRegion(_0x210a4f))throw CliErrors[_0xa815c8(0x12e)](_0xa815c8(0x138)+_0x210a4f+_0xa815c8(0x133),_0xa815c8(0x116)+ENABLED_LOVRABET_REGION_VALUES[_0xa815c8(0x126)](',\x20'));return _0x210a4f;}if(_0xf3540e['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xa815c8(0x136),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0xa815c8(0x12c),'value':'cn'},{'name':_0xa815c8(0x125),'value':'id'}]});}catch(_0x149aa7){if(_0x149aa7?.[_0xa815c8(0x119)]===_0xa815c8(0x113))throw CliErrors['cancelled']();throw _0x149aa7;}}export async function executeConfigInit(_0xfac475){const _0xdeca92=a54_0x44c6de,_0x57c2f1=resolveDomainFlags(_0xfac475),_0x391e5b=Object[_0xdeca92(0x114)](_0x57c2f1)[_0xdeca92(0x111)]>0x0;if(_0x391e5b&&_0xfac475[_0xdeca92(0x128)](_0xdeca92(0x123)))throw CliErrors[_0xdeca92(0x12e)](_0xdeca92(0x12d));const _0x50de3e=readScopedConfig(_0xdeca92(0x11b));for(const _0x478884 of DOMAIN_CONFIG_FIELDS)delete _0x50de3e[_0x478884];for(const _0x46bdd5 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x50de3e[_0x46bdd5];let _0x2b3f4e=null;if(_0x391e5b)delete _0x50de3e[_0xdeca92(0x123)],Object[_0xdeca92(0x12f)](_0x50de3e,_0x57c2f1);else{_0x2b3f4e=await resolveRegion(_0xfac475);if(_0x2b3f4e===DEFAULT_LOVRABET_REGION)delete _0x50de3e[_0xdeca92(0x123)];else _0x50de3e[_0xdeca92(0x123)]=_0x2b3f4e;}return writeScopedConfig(_0x50de3e,_0xdeca92(0x11b)),{'ok':!![],'message':_0x391e5b?_0xdeca92(0x127)+Object[_0xdeca92(0x114)](_0x57c2f1)[_0xdeca92(0x126)](',\x20')+'.':_0xdeca92(0x131)+_0x2b3f4e+'.','data':{'mode':_0x391e5b?'independent':'official','region':_0x2b3f4e,'domains':_0x57c2f1}};}export const configInitDefinition={'service':a54_0x44c6de(0x110),'command':a54_0x44c6de(0x13a),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a54_0x44c6de(0x121),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x1be9a6=a55_0xc79c;(function(_0x378a14,_0x105b33){const _0x567a7c=a55_0xc79c,_0x499f66=_0x378a14();while(!![]){try{const _0x2727d3=parseInt(_0x567a7c(0x1db))/0x1*(-parseInt(_0x567a7c(0x1cf))/0x2)+parseInt(_0x567a7c(0x1d4))/0x3*(-parseInt(_0x567a7c(0x1cd))/0x4)+-parseInt(_0x567a7c(0x1d5))/0x5*(parseInt(_0x567a7c(0x1d8))/0x6)+-parseInt(_0x567a7c(0x1d1))/0x7*(parseInt(_0x567a7c(0x1de))/0x8)+-parseInt(_0x567a7c(0x1da))/0x9*(parseInt(_0x567a7c(0x1d3))/0xa)+-parseInt(_0x567a7c(0x1d2))/0xb+-parseInt(_0x567a7c(0x1cc))/0xc*(-parseInt(_0x567a7c(0x1d6))/0xd);if(_0x2727d3===_0x105b33)break;else _0x499f66['push'](_0x499f66['shift']());}catch(_0x27e3d5){_0x499f66['push'](_0x499f66['shift']());}}}(a55_0x62cf,0xc857e));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x52633e){const _0x2a20f1=a55_0xc79c,_0x2df35b=_0x52633e['bool'](_0x2a20f1(0x1d7))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2df35b};}function a55_0x62cf(){const _0x43fb25=['72lJqJLq','5127844WaNJXD','config','5290bxpDcV','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','7jyhdnr','12308021QfrzmZ','15552430vmXSzJ','3DbhIfS','4792265grOMAH','15793531EAKOAv','global','6yszoEV','read','9tuzWYp','529ZjpmdZ','List\x20all\x20config\x20values','boolean','1239544qpWPnX','list'];a55_0x62cf=function(){return _0x43fb25;};return a55_0x62cf();}function a55_0xc79c(_0x2f65dd,_0x47af32){_0x2f65dd=_0x2f65dd-0x1cb;const _0x62cf23=a55_0x62cf();let _0xc79c41=_0x62cf23[_0x2f65dd];return _0xc79c41;}export const configListDefinition={'service':a55_0x1be9a6(0x1ce),'command':a55_0x1be9a6(0x1cb),'description':a55_0x1be9a6(0x1dc),'risk':a55_0x1be9a6(0x1d9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x1be9a6(0x1d7),'type':a55_0x1be9a6(0x1dd),'description':a55_0x1be9a6(0x1d0),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x11ebff=a56_0x30dd;(function(_0x1aad0b,_0x2cc187){const _0xc54157=a56_0x30dd,_0x2150ea=_0x1aad0b();while(!![]){try{const _0x43b735=-parseInt(_0xc54157(0x1fa))/0x1*(-parseInt(_0xc54157(0x1de))/0x2)+parseInt(_0xc54157(0x1ff))/0x3*(-parseInt(_0xc54157(0x1ed))/0x4)+parseInt(_0xc54157(0x1ea))/0x5*(parseInt(_0xc54157(0x1cf))/0x6)+-parseInt(_0xc54157(0x1da))/0x7+parseInt(_0xc54157(0x1dd))/0x8*(-parseInt(_0xc54157(0x1e0))/0x9)+parseInt(_0xc54157(0x1d4))/0xa+-parseInt(_0xc54157(0x1cd))/0xb*(-parseInt(_0xc54157(0x1e6))/0xc);if(_0x43b735===_0x2cc187)break;else _0x2150ea['push'](_0x2150ea['shift']());}catch(_0x5e20b9){_0x2150ea['push'](_0x2150ea['shift']());}}}(a56_0xc1f2,0xb9390));import{CliErrors}from'../../errors.js';function a56_0x30dd(_0x56574f,_0x1a12b5){_0x56574f=_0x56574f-0x1ca;const _0xc1f204=a56_0xc1f2();let _0x30dd05=_0xc1f204[_0x56574f];return _0x30dd05;}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';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x1be4dd){const _0x181f81=a56_0x30dd,_0xcaaa1e=_0x1be4dd[_0x181f81(0x1f4)](_0x181f81(0x1cb)),_0x1fd420=_0x1be4dd[_0x181f81(0x1f4)](_0x181f81(0x1d6));if(!_0xcaaa1e)throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x200),_0x181f81(0x1d3)+CLI_BIN_NAME+_0x181f81(0x1f9));if(_0x1fd420===undefined||_0x1fd420==='')throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1f5),_0x181f81(0x1d3)+CLI_BIN_NAME+_0x181f81(0x1f9));let _0x1a28ea=_0xcaaa1e,_0x13e53f=_0x1fd420;if(_0x1fd420[_0x181f81(0x1cc)]>0x1f4)throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1fe));if(_0xcaaa1e===_0x181f81(0x1e7))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1d8));if(!isTopLevelConfigKey(_0xcaaa1e))throw CliErrors[_0x181f81(0x1f0)]('Top-level\x20key\x20\x22'+_0xcaaa1e+_0x181f81(0x1f2),_0x181f81(0x1e9)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0xcaaa1e]&&!CONFIG_ENUM_VALUES[_0xcaaa1e][_0x181f81(0x1d5)](_0x1fd420))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1dc)+_0xcaaa1e+_0x181f81(0x1fc)+CONFIG_ENUM_VALUES[_0xcaaa1e][_0x181f81(0x1f6)](',\x20'));if(_0xcaaa1e===_0x181f81(0x1e3)&&!normalizeLocale(_0x1fd420))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1ef),_0x181f81(0x1e4));DOMAIN_CONFIG_FIELDS['includes'](_0xcaaa1e)&&(_0x13e53f=normalizeDomainOrigin(_0xcaaa1e,_0x1fd420));const _0x5d7a72={'global':_0x1be4dd[_0x181f81(0x1d1)](_0x181f81(0x1df))},_0x178229=resolveWriteScope(_0x5d7a72),_0x7129ac=readScopedConfig(_0x178229);_0xcaaa1e==='app'&&(_0x1a28ea='appcode',delete _0x7129ac[_0x181f81(0x1fd)]);_0xcaaa1e===_0x181f81(0x1e3)&&(_0x13e53f=normalizeLocale(_0x1fd420));if(_0xcaaa1e===_0x181f81(0x1f3)){_0x13e53f=normalizeEnv(_0x1fd420);if(!isProduction(_0x13e53f)&&!isDaily(_0x13e53f))throw CliErrors[_0x181f81(0x1f0)](_0x181f81(0x1d7),_0x181f81(0x1d0));}if(_0xcaaa1e===_0x181f81(0x1e2)){const _0x333012=_0x7129ac[_0x181f81(0x1ce)]&&typeof _0x7129ac[_0x181f81(0x1ce)]===_0x181f81(0x1d2)?Object[_0x181f81(0x1e1)](_0x7129ac[_0x181f81(0x1ce)]):[];if(_0x333012[_0x181f81(0x1cc)]>0x0)throw CliErrors[_0x181f81(0x1f0)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x181f81(0x1e5)+CLI_BIN_NAME+_0x181f81(0x1fb)+_0x13e53f+'`,\x20`'+CLI_BIN_NAME+_0x181f81(0x1db));const _0x4cd434=buildCanonicalProjectConfig({..._0x7129ac},{'appCodes':[_0x13e53f],'env':typeof _0x7129ac[_0x181f81(0x1f3)]===_0x181f81(0x1f1)?_0x7129ac[_0x181f81(0x1f3)]:undefined});writeScopedConfig(_0x4cd434,_0x178229);const _0x30d1fe=_0x178229===_0x181f81(0x1df)?_0x181f81(0x1ee):'Project';return{'ok':!![],'message':'✓\x20'+_0x30d1fe+_0x181f81(0x1ec)+_0x13e53f+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x7129ac[_0x1a28ea]=_0x13e53f,writeScopedConfig(_0x7129ac,_0x178229);const _0x4438dc=_0x178229===_0x181f81(0x1df)?'Global':_0x181f81(0x1e8);return{'ok':!![],'message':'✓\x20'+_0x4438dc+'\x20'+_0x1a28ea+_0x181f81(0x1f7)+_0x13e53f};}export const configSetDefinition={'service':'config','command':a56_0x11ebff(0x1ca),'description':a56_0x11ebff(0x1d9),'risk':a56_0x11ebff(0x1eb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a56_0x11ebff(0x1f1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a56_0x11ebff(0x1f8),'required':!![]},{'name':a56_0x11ebff(0x1df),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a56_0xc1f2(){const _0x14447d=['length','21711481PnjdHT','apps','615918uUKaTE','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','bool','object','Usage:\x20','8158530LbnhHQ','includes','value','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Set\x20a\x20config\x20value','10461899bJgHRz','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Invalid\x20value\x20for\x20\x22','5690624phcIpH','8nLqTqC','global','18CnKegS','keys','appcode','locale','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Use\x20`','24BbcOMF','riskLevel','Project','Settable\x20top-level\x20keys:\x20','15GaQvfM','write','\x20appcode\x20set\x20to:\x20','5044iIgXEf','Global','Invalid\x20locale\x20value.','validation','string','\x22\x20is\x20not\x20settable.','env','str','Missing\x20value.','join','\x20set\x20to:\x20','Config\x20value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','10833KjGcnk','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x22.\x20Allowed:\x20','app','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','3423vpuAdP','Missing\x20key.','set','key'];a56_0xc1f2=function(){return _0x14447d;};return a56_0xc1f2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c02ec,_0x17c073){var _0x4d18e8=a57_0x4cb6,_0x43dd88=_0x3c02ec();while(!![]){try{var _0x39ec42=-parseInt(_0x4d18e8(0xf2))/0x1+parseInt(_0x4d18e8(0xf1))/0x2*(parseInt(_0x4d18e8(0xef))/0x3)+parseInt(_0x4d18e8(0xf0))/0x4*(-parseInt(_0x4d18e8(0xed))/0x5)+-parseInt(_0x4d18e8(0xf6))/0x6+parseInt(_0x4d18e8(0xf5))/0x7*(-parseInt(_0x4d18e8(0xee))/0x8)+parseInt(_0x4d18e8(0xeb))/0x9+parseInt(_0x4d18e8(0xec))/0xa;if(_0x39ec42===_0x17c073)break;else _0x43dd88['push'](_0x43dd88['shift']());}catch(_0x5cffd9){_0x43dd88['push'](_0x43dd88['shift']());}}}(a57_0x4c8d,0xa2a6a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a57_0x4cb6(_0x3beaca,_0x1ba338){_0x3beaca=_0x3beaca-0xe9;var _0x4c8dff=a57_0x4c8d();var _0x4cb6a2=_0x4c8dff[_0x3beaca];return _0x4cb6a2;}import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0xd83626){var _0x2d8f05=a57_0x4cb6;if(_0xd83626[_0x2d8f05(0xf3)])return _0x2d8f05(0xf3);if(!isInProject())throw CliErrors[_0x2d8f05(0xea)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x2d8f05(0xf4)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x2d8f05(0xe9);}export function readScopedConfig(_0x114be2){return readConfigFile(resolveWriteConfigPath(_0x114be2));}function a57_0x4c8d(){var _0x4c7a39=['48gtSvrT','407373GOcCIp','770444nsLWlU','14tpRVmA','1205322sxpdxc','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1462706CyNTPY','2561070OHhZXi','project','validation','11505267RuXiAq','19010660azqhNj','15adQpui'];a57_0x4c8d=function(){return _0x4c7a39;};return a57_0x4c8d();}export function writeScopedConfig(_0x3ec76a,_0x55378e){writeConfigFile(resolveWriteConfigPath(_0x55378e),_0x3ec76a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x31d537=a58_0x1c50;(function(_0x1f1d89,_0x108e9e){const _0x223249=a58_0x1c50,_0x1990cb=_0x1f1d89();while(!![]){try{const _0x142733=parseInt(_0x223249(0x69))/0x1*(parseInt(_0x223249(0x68))/0x2)+-parseInt(_0x223249(0x86))/0x3+parseInt(_0x223249(0xa1))/0x4+parseInt(_0x223249(0x6a))/0x5*(parseInt(_0x223249(0x96))/0x6)+-parseInt(_0x223249(0x85))/0x7*(-parseInt(_0x223249(0x8e))/0x8)+-parseInt(_0x223249(0x80))/0x9+-parseInt(_0x223249(0xa2))/0xa;if(_0x142733===_0x108e9e)break;else _0x1990cb['push'](_0x1990cb['shift']());}catch(_0x3c82ab){_0x1990cb['push'](_0x1990cb['shift']());}}}(a58_0x12a2,0xd8f66));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',UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x55bdf2,input:_0x4b32a8,dryRun:_0xbb5951}){const _0x2e6d09=a58_0x1c50;validateInput(_0x4b32a8);const _0x7da147=normalizeBusinessGroupArgument(_0x4b32a8['businessGroup']),_0x736a52=await getDatasetDetail(_0x4b32a8[_0x2e6d09(0x79)]),_0x16da19=resolveBusinessGroupDataset(_0x736a52,_0x4b32a8[_0x2e6d09(0x79)]),_0x3a4f20=loadCurrentBusinessGroup(_0x736a52,_0x16da19);assertExpectedBusinessGroup(_0x3a4f20,_0x4b32a8['expectBusinessGroup']);const _0x2f021e=buildBackendPayload(_0x55bdf2,_0x16da19,_0x7da147),_0x11c902=_0x3a4f20!==_0x7da147;let _0x247b90;if(_0x11c902&&!_0xbb5951){await updateErBusinessGroup(_0x2f021e);const _0x2777cc=await getDatasetDetail(_0x16da19['code']),_0x4ef18f=resolveBusinessGroupDataset(_0x2777cc,_0x16da19[_0x2e6d09(0x79)]),_0x467121=loadCurrentBusinessGroup(_0x2777cc,_0x4ef18f);if(_0x467121!==_0x7da147)throw CliErrors[_0x2e6d09(0x6f)](_0x2e6d09(0x90),_0x2e6d09(0xa4)+JSON[_0x2e6d09(0x6b)](_0x7da147)+',\x20actual\x20'+JSON[_0x2e6d09(0x6b)](_0x467121)+'.');_0x247b90={'verified':!![],'status':_0x2e6d09(0x7c),'afterReadback':{'businessGroup':_0x467121}};}else!_0x11c902&&(_0x247b90={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x3a4f20}});const _0x37e1aa={'operation':_0x2e6d09(0x93),'appCode':_0x55bdf2,'selector':{'code':_0x16da19[_0x2e6d09(0x79)]},'dataset':_0x16da19,'before':{'businessGroup':_0x3a4f20},'after':{'businessGroup':_0x7da147},'changed':_0x11c902,'dryRun':_0xbb5951,'submitted':_0x11c902&&!_0xbb5951,'backend':{'method':_0x2e6d09(0x9e),'path':BACKEND_PATH,'payload':_0x2f021e},..._0x247b90?{'verification':_0x247b90}:{},'warnings':[]};return{'ok':!![],'data':_0x37e1aa,'message':_0x11c902?_0xbb5951?_0x2e6d09(0x87)+_0x16da19[_0x2e6d09(0x79)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x16da19[_0x2e6d09(0x79)]:_0x2e6d09(0xa0)+_0x16da19['code']};}function a58_0x1c50(_0x1c0feb,_0x280921){_0x1c0feb=_0x1c0feb-0x66;const _0x12a2a2=a58_0x12a2();let _0x1c50c0=_0x12a2a2[_0x1c0feb];return _0x1c50c0;}function a58_0x12a2(){const _0x5253bb=['--business-group\x20is\x20required','number','str','source','found','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','POST','write','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','5543936FdCVqb','13506570VRbPSN','extend','Expected\x20','businessGroup','--code\x20is\x20required','datasetCode','429266xUoIhQ','1XHcuop','6921675oCTWfg','stringify','isArray','isFinite','dataset','apiError','object','call','parse','backend','validation','keys','modelId','message','dbtableConfig','code','METADATA','business-group-update','matched','appCode','prototype','string','1227411KMfzHH','trim','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','toUpperCase','value','2185162SiEQUT','2764212JNCzGA','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetId','sourceType','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','modelCode','payload','hasOwnProperty','8txpmbF','expect-business-group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','name','data','update','DB_TABLE','Expectation\x20mismatch\x20at\x20businessGroup','6PsPsxw','Update\x20business\x20scenario\x20group'];a58_0x12a2=function(){return _0x5253bb;};return a58_0x12a2();}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x31d537(0x7b),'description':a58_0x31d537(0x97),'risk':a58_0x31d537(0x9f),'flags':[CODE_FLAG,{'name':'business-group','type':a58_0x31d537(0x7f),'required':!![],'description':a58_0x31d537(0x9d)},{'name':a58_0x31d537(0x8f),'type':a58_0x31d537(0x7f),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a4264){validateInput(readBusinessGroupUpdateInput(_0x3a4264));},async 'dryRun'(_0x1a0ba8){const _0x3d5170=a58_0x31d537,_0x51f374=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1a0ba8[_0x3d5170(0x7d)],'input':readBusinessGroupUpdateInput(_0x1a0ba8),'dryRun':!![]});return{'method':_0x3d5170(0x9e),'url':BACKEND_PATH,'body':_0x51f374[_0x3d5170(0x92)][_0x3d5170(0x73)][_0x3d5170(0x8c)],'description':_0x51f374[_0x3d5170(0x77)],..._0x51f374[_0x3d5170(0x92)]};},async 'execute'(_0x1d9c83){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1d9c83['appCode'],'input':readBusinessGroupUpdateInput(_0x1d9c83),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2f8ae7){const _0x5cf16d=a58_0x31d537,_0xf2db01=_0x2f8ae7[_0x5cf16d(0x9a)](_0x5cf16d(0x8f));return{'code':trim(_0x2f8ae7[_0x5cf16d(0x9a)]('code')),'businessGroup':_0x2f8ae7[_0x5cf16d(0x9a)]('business-group'),'expectBusinessGroup':_0xf2db01===undefined||_0xf2db01===''?undefined:_0xf2db01};}function validateInput(_0x2ef43f){const _0x1fb0e2=a58_0x31d537;if(!trim(_0x2ef43f[_0x1fb0e2(0x79)]))throw CliErrors[_0x1fb0e2(0x74)](_0x1fb0e2(0x66));if(_0x2ef43f[_0x1fb0e2(0xa5)]===undefined)throw CliErrors[_0x1fb0e2(0x74)](_0x1fb0e2(0x98));}function resolveBusinessGroupDataset(_0x21275d,_0x3d3303){const _0x88b78d=a58_0x31d537,_0x9e18fb=asPlainObject(_0x21275d[_0x88b78d(0x6e)]),_0x4e98fc=asPlainObject(_0x21275d[_0x88b78d(0x78)]),_0x2a4212=resolveSourceType(_0x21275d,_0x9e18fb,_0x4e98fc),_0x1dee90=firstString(_0x21275d[_0x88b78d(0x8b)],_0x21275d[_0x88b78d(0x79)],_0x9e18fb[_0x88b78d(0x67)],_0x3d3303)||_0x3d3303;return{'id':firstNumber(_0x21275d[_0x88b78d(0x76)],_0x21275d['id'],_0x9e18fb['datasetId'])??firstString(_0x21275d[_0x88b78d(0x76)],_0x21275d['id'],_0x9e18fb[_0x88b78d(0x88)])??null,'code':_0x1dee90,'name':firstString(_0x21275d[_0x88b78d(0x91)],_0x9e18fb['datasetName'],_0x9e18fb['name'])||null,'sourceType':_0x2a4212};}function resolveSourceType(_0x347aa4,_0x3277ce,_0x16d07c){const _0x18c5fd=a58_0x31d537,_0x4c58af=firstString(_0x347aa4[_0x18c5fd(0x9b)],_0x347aa4[_0x18c5fd(0x89)],_0x3277ce[_0x18c5fd(0x9b)],_0x3277ce[_0x18c5fd(0x89)])?.['trim']()[_0x18c5fd(0x83)]();if(_0x4c58af===_0x18c5fd(0x94)||_0x4c58af===_0x18c5fd(0x7a))return _0x4c58af;if(Object[_0x18c5fd(0x75)](_0x16d07c)['length']>0x0)return _0x18c5fd(0x94);throw CliErrors[_0x18c5fd(0x74)](_0x18c5fd(0x82));}function loadCurrentBusinessGroup(_0x146dfe,_0x2469f0){const _0x48ee5a=a58_0x31d537,_0x207aad=readBusinessGroupFromDatasetDetail(_0x146dfe,_0x2469f0[_0x48ee5a(0x89)]);if(_0x207aad[_0x48ee5a(0x9c)])return normalizeBusinessGroup(_0x207aad[_0x48ee5a(0x84)]);if(_0x2469f0[_0x48ee5a(0x89)]===_0x48ee5a(0x7a))return'';throw CliErrors[_0x48ee5a(0x74)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x48ee5a(0x8a));}function readBusinessGroupFromDatasetDetail(_0x2e2f5a,_0x1744b5){const _0x113544=a58_0x31d537,_0x29c20d=asPlainObject(_0x2e2f5a[_0x113544(0x6e)]),_0x39b07a=firstPresent(_0x2e2f5a[_0x113544(0xa5)]);if(_0x39b07a[_0x113544(0x9c)])return _0x39b07a;const _0x128d9b=firstPresent(_0x29c20d[_0x113544(0xa5)]);if(_0x128d9b[_0x113544(0x9c)])return _0x128d9b;if(_0x1744b5===_0x113544(0x94))return{'found':![]};const _0xa26b82=readBusinessGroupFromExtend(_0x2e2f5a[_0x113544(0xa3)]);if(_0xa26b82[_0x113544(0x9c)])return _0xa26b82;return readBusinessGroupFromExtend(_0x29c20d[_0x113544(0xa3)]);}function readBusinessGroupFromExtend(_0x4ceb5f){const _0x5beba4=a58_0x31d537;if(_0x4ceb5f===undefined||_0x4ceb5f===null||_0x4ceb5f==='')return{'found':![]};if(typeof _0x4ceb5f==='string')try{const _0x7faa2f=JSON[_0x5beba4(0x72)](_0x4ceb5f);return readBusinessGroupFromExtend(_0x7faa2f);}catch{return{'found':![]};}const _0x23d41f=asPlainObject(_0x4ceb5f);if(Object[_0x5beba4(0x7e)][_0x5beba4(0x8d)][_0x5beba4(0x71)](_0x23d41f,_0x5beba4(0xa5)))return{'found':!![],'value':_0x23d41f[_0x5beba4(0xa5)]};return{'found':![]};}function firstPresent(..._0x119513){for(const _0x3f415a of _0x119513){if(_0x3f415a!==undefined&&_0x3f415a!==null)return{'found':!![],'value':_0x3f415a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4e42e2,_0x4c72ec){const _0x2f4105=a58_0x31d537;if(_0x4c72ec===undefined)return;const _0x4584d9=normalizeBusinessGroupArgument(_0x4c72ec);if(_0x4e42e2!==_0x4584d9)throw CliErrors[_0x2f4105(0x74)](_0x2f4105(0x95),_0x2f4105(0xa4)+JSON[_0x2f4105(0x6b)](_0x4584d9)+',\x20actual\x20'+JSON[_0x2f4105(0x6b)](_0x4e42e2));}function buildBackendPayload(_0x2f61b3,_0x33c6bd,_0x5e5ae6){const _0x49af49=a58_0x31d537;return{'appCode':_0x2f61b3,'datasetCode':_0x33c6bd[_0x49af49(0x79)],'businessGroup':_0x5e5ae6};}function normalizeBusinessGroup(_0x17d763){const _0x2678cd=a58_0x31d537;if(_0x17d763===undefined||_0x17d763===null)return'';return String(_0x17d763)[_0x2678cd(0x81)]();}function normalizeBusinessGroupArgument(_0x46a47b){const _0xc814a6=normalizeBusinessGroup(_0x46a47b);return _0xc814a6===UNGROUPED_BUSINESS_GROUP?'':_0xc814a6;}function asPlainObject(_0x46f655){const _0x2ec22e=a58_0x31d537;if(!_0x46f655||typeof _0x46f655!==_0x2ec22e(0x70)||Array[_0x2ec22e(0x6c)](_0x46f655))return{};return _0x46f655;}function firstString(..._0x5253fe){const _0x2ce427=a58_0x31d537;for(const _0x4e0c60 of _0x5253fe){if(typeof _0x4e0c60===_0x2ce427(0x7f)&&_0x4e0c60[_0x2ce427(0x81)]())return _0x4e0c60[_0x2ce427(0x81)]();if(typeof _0x4e0c60===_0x2ce427(0x99)&&Number[_0x2ce427(0x6d)](_0x4e0c60))return String(_0x4e0c60);}return undefined;}function firstNumber(..._0x151c50){const _0x47b113=a58_0x31d537;for(const _0x577122 of _0x151c50){if(typeof _0x577122===_0x47b113(0x99)&&Number['isFinite'](_0x577122))return _0x577122;if(typeof _0x577122===_0x47b113(0x7f)&&_0x577122[_0x47b113(0x81)]()&&Number['isFinite'](Number(_0x577122)))return Number(_0x577122);}return null;}function trim(_0x47a3eb){const _0x54e9d8=a58_0x31d537;return String(_0x47a3eb||'')[_0x54e9d8(0x81)]();}
|
|
1
|
+
const a58_0x5037e3=a58_0x1365;(function(_0x5e9705,_0x52db56){const _0x3310e9=a58_0x1365,_0x22561b=_0x5e9705();while(!![]){try{const _0x39b31f=-parseInt(_0x3310e9(0x124))/0x1+-parseInt(_0x3310e9(0x11e))/0x2*(-parseInt(_0x3310e9(0x130))/0x3)+-parseInt(_0x3310e9(0x132))/0x4*(parseInt(_0x3310e9(0x112))/0x5)+-parseInt(_0x3310e9(0x13b))/0x6+-parseInt(_0x3310e9(0x10a))/0x7*(-parseInt(_0x3310e9(0x13e))/0x8)+-parseInt(_0x3310e9(0x108))/0x9*(parseInt(_0x3310e9(0x144))/0xa)+parseInt(_0x3310e9(0x12d))/0xb;if(_0x39b31f===_0x52db56)break;else _0x22561b['push'](_0x22561b['shift']());}catch(_0x46a77b){_0x22561b['push'](_0x22561b['shift']());}}}(a58_0xec65,0xe96a6));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',UNGROUPED_BUSINESS_GROUP=a58_0x5037e3(0x12a);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3ad518,input:_0x35df20,dryRun:_0x515c54}){const _0x56dbee=a58_0x5037e3;validateInput(_0x35df20);const _0xa973a4=normalizeBusinessGroupArgument(_0x35df20[_0x56dbee(0x123)]),_0x35edad=await getDatasetDetail(_0x35df20['code']),_0x19f0d4=resolveBusinessGroupDataset(_0x35edad,_0x35df20[_0x56dbee(0x145)]),_0x55d5cc=loadCurrentBusinessGroup(_0x35edad,_0x19f0d4);assertExpectedBusinessGroup(_0x55d5cc,_0x35df20[_0x56dbee(0x117)]);const _0x100b85=buildBackendPayload(_0x3ad518,_0x19f0d4,_0xa973a4),_0x1fdb66=_0x55d5cc!==_0xa973a4;let _0x365946;if(_0x1fdb66&&!_0x515c54){await updateErBusinessGroup(_0x100b85);const _0x25e166=await getDatasetDetail(_0x19f0d4[_0x56dbee(0x145)]),_0x38a5ae=resolveBusinessGroupDataset(_0x25e166,_0x19f0d4[_0x56dbee(0x145)]),_0x345cc4=loadCurrentBusinessGroup(_0x25e166,_0x38a5ae);if(_0x345cc4!==_0xa973a4)throw CliErrors[_0x56dbee(0x107)](_0x56dbee(0x136),_0x56dbee(0x131)+JSON['stringify'](_0xa973a4)+_0x56dbee(0x10f)+JSON[_0x56dbee(0x11d)](_0x345cc4)+'.');_0x365946={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x345cc4}};}else!_0x1fdb66&&(_0x365946={'verified':!![],'status':_0x56dbee(0x110),'afterReadback':{'businessGroup':_0x55d5cc}});const _0x56afb6={'operation':_0x56dbee(0x12b),'appCode':_0x3ad518,'selector':{'code':_0x19f0d4['code']},'dataset':_0x19f0d4,'before':{'businessGroup':_0x55d5cc},'after':{'businessGroup':_0xa973a4},'changed':_0x1fdb66,'dryRun':_0x515c54,'submitted':_0x1fdb66&&!_0x515c54,'backend':{'method':_0x56dbee(0x125),'path':BACKEND_PATH,'payload':_0x100b85},..._0x365946?{'verification':_0x365946}:{},'warnings':[]};return{'ok':!![],'data':_0x56afb6,'message':_0x1fdb66?_0x515c54?_0x56dbee(0x11b)+_0x19f0d4['code']:_0x56dbee(0x11f)+_0x19f0d4[_0x56dbee(0x145)]:_0x56dbee(0x122)+_0x19f0d4[_0x56dbee(0x145)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x5037e3(0x116),'description':a58_0x5037e3(0x138),'risk':a58_0x5037e3(0x135),'flags':[CODE_FLAG,{'name':a58_0x5037e3(0x106),'type':a58_0x5037e3(0x10c),'required':!![],'description':a58_0x5037e3(0x133)},{'name':a58_0x5037e3(0x13f),'type':'string','required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x471e84){validateInput(readBusinessGroupUpdateInput(_0x471e84));},async 'dryRun'(_0x54831d){const _0x4aeacd=a58_0x5037e3,_0x4cc780=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x54831d['appCode'],'input':readBusinessGroupUpdateInput(_0x54831d),'dryRun':!![]});return{'method':_0x4aeacd(0x125),'url':BACKEND_PATH,'body':_0x4cc780[_0x4aeacd(0x12e)][_0x4aeacd(0x12c)][_0x4aeacd(0x119)],'description':_0x4cc780[_0x4aeacd(0x13c)],..._0x4cc780[_0x4aeacd(0x12e)]};},async 'execute'(_0x24d037){const _0x44cb52=a58_0x5037e3;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x24d037[_0x44cb52(0x118)],'input':readBusinessGroupUpdateInput(_0x24d037),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2b7054){const _0x3379d5=a58_0x5037e3,_0xb5520c=_0x2b7054[_0x3379d5(0x129)]('expect-business-group');return{'code':trim(_0x2b7054['str']('code')),'businessGroup':_0x2b7054[_0x3379d5(0x129)](_0x3379d5(0x106)),'expectBusinessGroup':_0xb5520c===undefined||_0xb5520c===''?undefined:_0xb5520c};}function validateInput(_0x4c90cd){const _0x5c7a7d=a58_0x5037e3;if(!trim(_0x4c90cd[_0x5c7a7d(0x145)]))throw CliErrors[_0x5c7a7d(0x139)](_0x5c7a7d(0x109));if(_0x4c90cd[_0x5c7a7d(0x123)]===undefined)throw CliErrors[_0x5c7a7d(0x139)](_0x5c7a7d(0x10b));}function resolveBusinessGroupDataset(_0x5aadaf,_0x5b8073){const _0x2cfeea=a58_0x5037e3,_0x4a8409=asPlainObject(_0x5aadaf[_0x2cfeea(0x128)]),_0x14bfe0=asPlainObject(_0x5aadaf[_0x2cfeea(0x143)]),_0x36e05b=resolveSourceType(_0x5aadaf,_0x4a8409,_0x14bfe0),_0x38d10b=firstString(_0x5aadaf[_0x2cfeea(0x10d)],_0x5aadaf[_0x2cfeea(0x145)],_0x4a8409[_0x2cfeea(0x120)],_0x5b8073)||_0x5b8073;return{'id':firstNumber(_0x5aadaf['modelId'],_0x5aadaf['id'],_0x4a8409[_0x2cfeea(0x113)])??firstString(_0x5aadaf[_0x2cfeea(0x13d)],_0x5aadaf['id'],_0x4a8409[_0x2cfeea(0x113)])??null,'code':_0x38d10b,'name':firstString(_0x5aadaf[_0x2cfeea(0x105)],_0x4a8409['datasetName'],_0x4a8409[_0x2cfeea(0x105)])||null,'sourceType':_0x36e05b};}function resolveSourceType(_0x5741b7,_0x3d7ea6,_0x4f8411){const _0x23b926=a58_0x5037e3,_0x353c95=firstString(_0x5741b7[_0x23b926(0x11c)],_0x5741b7[_0x23b926(0x134)],_0x3d7ea6['source'],_0x3d7ea6[_0x23b926(0x134)])?.['trim']()[_0x23b926(0x126)]();if(_0x353c95===_0x23b926(0x142)||_0x353c95==='METADATA')return _0x353c95;if(Object['keys'](_0x4f8411)[_0x23b926(0x141)]>0x0)return _0x23b926(0x142);throw CliErrors[_0x23b926(0x139)](_0x23b926(0x127));}function loadCurrentBusinessGroup(_0x5b480f,_0x475f4a){const _0x27c6d5=a58_0x5037e3,_0x515340=readBusinessGroupFromDatasetDetail(_0x5b480f,_0x475f4a[_0x27c6d5(0x134)]);if(_0x515340[_0x27c6d5(0x11a)])return normalizeBusinessGroup(_0x515340['value']);if(_0x475f4a[_0x27c6d5(0x134)]==='METADATA')return'';throw CliErrors[_0x27c6d5(0x139)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x27c6d5(0x140));}function readBusinessGroupFromDatasetDetail(_0xf9d65c,_0x35be9e){const _0x146fbb=a58_0x5037e3,_0x347baf=asPlainObject(_0xf9d65c[_0x146fbb(0x128)]),_0x229caa=firstPresent(_0xf9d65c[_0x146fbb(0x123)]);if(_0x229caa['found'])return _0x229caa;const _0x559446=firstPresent(_0x347baf[_0x146fbb(0x123)]);if(_0x559446['found'])return _0x559446;if(_0x35be9e===_0x146fbb(0x142))return{'found':![]};const _0x15be73=readBusinessGroupFromExtend(_0xf9d65c[_0x146fbb(0x111)]);if(_0x15be73[_0x146fbb(0x11a)])return _0x15be73;return readBusinessGroupFromExtend(_0x347baf[_0x146fbb(0x111)]);}function readBusinessGroupFromExtend(_0x2d8ab9){const _0x18f1c1=a58_0x5037e3;if(_0x2d8ab9===undefined||_0x2d8ab9===null||_0x2d8ab9==='')return{'found':![]};if(typeof _0x2d8ab9===_0x18f1c1(0x10c))try{const _0x1ff8f7=JSON[_0x18f1c1(0x121)](_0x2d8ab9);return readBusinessGroupFromExtend(_0x1ff8f7);}catch{return{'found':![]};}const _0x47849a=asPlainObject(_0x2d8ab9);if(Object[_0x18f1c1(0x137)]['hasOwnProperty'][_0x18f1c1(0x115)](_0x47849a,_0x18f1c1(0x123)))return{'found':!![],'value':_0x47849a[_0x18f1c1(0x123)]};return{'found':![]};}function firstPresent(..._0x8a9d5d){for(const _0x1b445d of _0x8a9d5d){if(_0x1b445d!==undefined&&_0x1b445d!==null)return{'found':!![],'value':_0x1b445d};}return{'found':![]};}function assertExpectedBusinessGroup(_0x484d2d,_0x4ba7be){const _0x5207e7=a58_0x5037e3;if(_0x4ba7be===undefined)return;const _0x5c576b=normalizeBusinessGroupArgument(_0x4ba7be);if(_0x484d2d!==_0x5c576b)throw CliErrors[_0x5207e7(0x139)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x5207e7(0x11d)](_0x5c576b)+_0x5207e7(0x10f)+JSON[_0x5207e7(0x11d)](_0x484d2d));}function buildBackendPayload(_0x5b6a16,_0x2e218a,_0x42f4e3){return{'appCode':_0x5b6a16,'datasetCode':_0x2e218a['code'],'businessGroup':_0x42f4e3};}function normalizeBusinessGroup(_0x2ef1ed){const _0x58ea12=a58_0x5037e3;if(_0x2ef1ed===undefined||_0x2ef1ed===null)return'';return String(_0x2ef1ed)[_0x58ea12(0x114)]();}function a58_0xec65(){const _0xa63ad7=['expect-business-group','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','length','DB_TABLE','dbtableConfig','2480MDydVO','code','name','business-group','apiError','63000zyEBeP','--code\x20is\x20required','1473941fjICym','--business-group\x20is\x20required','string','modelCode','isFinite',',\x20actual\x20','unchanged','extend','410855bzgxFE','datasetId','trim','call','business-group-update','expectBusinessGroup','appCode','payload','found','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','source','stringify','22SylIxW','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','datasetCode','parse','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','businessGroup','1591016ayJQTa','POST','toUpperCase','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','dataset','str','ungrouped','update','backend','49043896ZQaGVd','data','object','142221QqxHRy','Expected\x20','28jsEnbz','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','sourceType','write','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','prototype','Update\x20business\x20scenario\x20group','validation','number','3257136ZWgAXs','message','modelId','16TllCtR'];a58_0xec65=function(){return _0xa63ad7;};return a58_0xec65();}function normalizeBusinessGroupArgument(_0x52ce58){const _0x9557c8=normalizeBusinessGroup(_0x52ce58);return _0x9557c8===UNGROUPED_BUSINESS_GROUP?'':_0x9557c8;}function a58_0x1365(_0x1f3b85,_0x29d997){_0x1f3b85=_0x1f3b85-0x105;const _0xec659=a58_0xec65();let _0x13658d=_0xec659[_0x1f3b85];return _0x13658d;}function asPlainObject(_0x273bad){const _0x501c3=a58_0x5037e3;if(!_0x273bad||typeof _0x273bad!==_0x501c3(0x12f)||Array['isArray'](_0x273bad))return{};return _0x273bad;}function firstString(..._0x11f338){const _0x4337e8=a58_0x5037e3;for(const _0x3bb2d7 of _0x11f338){if(typeof _0x3bb2d7===_0x4337e8(0x10c)&&_0x3bb2d7[_0x4337e8(0x114)]())return _0x3bb2d7[_0x4337e8(0x114)]();if(typeof _0x3bb2d7===_0x4337e8(0x13a)&&Number[_0x4337e8(0x10e)](_0x3bb2d7))return String(_0x3bb2d7);}return undefined;}function firstNumber(..._0x1206d1){const _0x110f00=a58_0x5037e3;for(const _0x21a97e of _0x1206d1){if(typeof _0x21a97e===_0x110f00(0x13a)&&Number[_0x110f00(0x10e)](_0x21a97e))return _0x21a97e;if(typeof _0x21a97e===_0x110f00(0x10c)&&_0x21a97e[_0x110f00(0x114)]()&&Number[_0x110f00(0x10e)](Number(_0x21a97e)))return Number(_0x21a97e);}return null;}function trim(_0x5e4681){return String(_0x5e4681||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x4c4a22=a59_0x20c3;function a59_0x20c3(_0x585e11,_0x4273e5){_0x585e11=_0x585e11-0x1ea;const _0x8c4c60=a59_0x8c4c();let _0x20c3c8=_0x8c4c60[_0x585e11];return _0x20c3c8;}(function(_0x219e0e,_0x1d4446){const _0x31ae17=a59_0x20c3,_0x306c45=_0x219e0e();while(!![]){try{const _0x4a8810=parseInt(_0x31ae17(0x1eb))/0x1*(-parseInt(_0x31ae17(0x1f6))/0x2)+parseInt(_0x31ae17(0x1ef))/0x3*(-parseInt(_0x31ae17(0x1ff))/0x4)+parseInt(_0x31ae17(0x1fb))/0x5+parseInt(_0x31ae17(0x1ed))/0x6+parseInt(_0x31ae17(0x1f2))/0x7+-parseInt(_0x31ae17(0x1ec))/0x8*(parseInt(_0x31ae17(0x1f1))/0x9)+-parseInt(_0x31ae17(0x1fa))/0xa*(-parseInt(_0x31ae17(0x1f7))/0xb);if(_0x4a8810===_0x1d4446)break;else _0x306c45['push'](_0x306c45['shift']());}catch(_0x5a6272){_0x306c45['push'](_0x306c45['shift']());}}}(a59_0x8c4c,0xf405a));function a59_0x8c4c(){const _0x35454f=['370ydkhLF','934590DlhZnr','DB_TABLE','business-groups','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','116pigVYq','appCode','dbid','22rreeQN','6321688bOCAuA','2643840WKpBKM','number','79632KvBPoX','length','9gBbVxX','5323752NzjwDS','read','Found\x20','groups','157120AfoPCH','862081TuIrOJ','dataset','num'];a59_0x8c4c=function(){return _0x35454f;};return a59_0x8c4c();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':a59_0x4c4a22(0x1f8),'command':a59_0x4c4a22(0x1fd),'description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':a59_0x4c4a22(0x1f3),'flags':[{'name':a59_0x4c4a22(0x1ea),'type':a59_0x4c4a22(0x1ee),'required':!![],'description':a59_0x4c4a22(0x1fe)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2994dc){const _0x565ac3=a59_0x4c4a22,_0x5297e6=_0x2994dc[_0x565ac3(0x1f9)](_0x565ac3(0x1ea)),_0x38a625=await getErBusinessGroupSummary(_0x2994dc[_0x565ac3(0x200)],_0x5297e6);return{'ok':!![],'data':{..._0x38a625,'scope':_0x565ac3(0x1fc)},'message':_0x565ac3(0x1f4)+_0x38a625[_0x565ac3(0x1f5)][_0x565ac3(0x1f0)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x5297e6};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a60_0xc503(){const _0x13c1d3=['5419376eAQtUU','6645335cDfOKw','join','source','trim','filter','496825evYmmx','dataset','149gouDve','name','8913848vUgUTY','2545197Fyeekh','getOne','lovrabet','tableName','17258WUQCaJ','\x20is\x20','object','datasetCode','2138679UJgzFG','toUpperCase','sourceType','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','102ISymai','SQL\x20schema\x20validation','170ulaNGE','dbId','The\x20current\x20dataset\x20\x22'];a60_0xc503=function(){return _0x13c1d3;};return a60_0xc503();}const a60_0x147809=a60_0x122d;(function(_0x1f1567,_0x5b166f){const _0x5c138e=a60_0x122d,_0x100a8a=_0x1f1567();while(!![]){try{const _0x473687=-parseInt(_0x5c138e(0xed))/0x1*(-parseInt(_0x5c138e(0xf4))/0x2)+parseInt(_0x5c138e(0xf0))/0x3+parseInt(_0x5c138e(0xe5))/0x4+parseInt(_0x5c138e(0xe6))/0x5+parseInt(_0x5c138e(0xfc))/0x6*(-parseInt(_0x5c138e(0xeb))/0x7)+parseInt(_0x5c138e(0xef))/0x8+-parseInt(_0x5c138e(0xf8))/0x9*(parseInt(_0x5c138e(0xfe))/0xa);if(_0x473687===_0x5b166f)break;else _0x100a8a['push'](_0x100a8a['shift']());}catch(_0x306f38){_0x100a8a['push'](_0x100a8a['shift']());}}}(a60_0xc503,0xa7788));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x147809(0xf2),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','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='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x358751){const _0x5bcd96=a60_0x147809;return _0x358751==null?'':String(_0x358751)[_0x5bcd96(0xe9)]();}function getDatasetCode(_0x38491d){const _0x37f172=a60_0x147809;return valueToString(_0x38491d['code']??_0x38491d['modelCode']??_0x38491d[_0x37f172(0xec)]?.[_0x37f172(0xf7)]);}function getDatasetName(_0x1e08d4){const _0x3ce019=a60_0x147809;return valueToString(_0x1e08d4[_0x3ce019(0xee)]??_0x1e08d4['dataset']?.['datasetName'])||'unknown';}function getDatasetSource(_0x26f005){const _0x2b0909=a60_0x147809;return valueToString(_0x26f005[_0x2b0909(0xe8)]??_0x26f005['dataset']?.[_0x2b0909(0xfa)])[_0x2b0909(0xf9)]();}function getDbtableConfig(_0x26b676){const _0x10439a=a60_0x147809,_0x2ca597=_0x26b676['dbtableConfig']??_0x26b676['dbtable'];return _0x2ca597&&typeof _0x2ca597===_0x10439a(0xf6)?_0x2ca597:{};}function a60_0x122d(_0x2dd2a7,_0x4fdf0e){_0x2dd2a7=_0x2dd2a7-0xe4;const _0xc5034f=a60_0xc503();let _0x122d50=_0xc5034f[_0x2dd2a7];return _0x122d50;}export function isDbTableBackedDataset(_0x37da95){const _0x53b1f6=a60_0x147809,_0x583a5d=getDatasetSource(_0x37da95);if(_0x583a5d==='METADATA')return![];const _0x23191f=getDbtableConfig(_0x37da95),_0x4b00c6=_0x23191f[_0x53b1f6(0xff)]??_0x23191f['id'],_0x3e3bf4=valueToString(_0x23191f[_0x53b1f6(0xf3)]??_0x37da95[_0x53b1f6(0xf3)]??_0x37da95[_0x53b1f6(0xec)]?.[_0x53b1f6(0xf3)]);return _0x4b00c6!==undefined&&_0x4b00c6!==null&&_0x3e3bf4['length']>0x0;}export function filterDbTableBackedDatasets(_0x4d6973){const _0x504844=a60_0x147809;return _0x4d6973[_0x504844(0xea)](_0x9f1bf7=>isDbTableBackedDataset(_0x9f1bf7));}export function buildDbTableBackedRequirementMessage(_0x403f87,_0x416361=a60_0x147809(0xfd)){const _0x13c42c=a60_0x147809,_0x2ed33c=getDatasetSource(_0x403f87)||'UNKNOWN',_0x4fc032=getDatasetName(_0x403f87),_0x252ee2=getDatasetCode(_0x403f87),_0x29e704=_0x252ee2?'\x20('+_0x252ee2+')':'';return[_0x13c42c(0xe4)+_0x4fc032+'\x22'+_0x29e704+_0x13c42c(0xf5)+_0x2ed33c+_0x13c42c(0xfb)+_0x416361+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x13c42c(0xea)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x13c42c(0xf1)]+'.'][_0x13c42c(0xe7)]('\x20');}export function assertDatasetIsDbTableBacked(_0x59fd25,_0x3a911a){if(!isDbTableBackedDataset(_0x59fd25))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x59fd25,_0x3a911a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x26430c=a61_0x4a63;(function(_0x35160d,_0x791563){const _0x28eeeb=a61_0x4a63,_0x85c4d8=_0x35160d();while(!![]){try{const _0x463003=-parseInt(_0x28eeeb(0xd0))/0x1+parseInt(_0x28eeeb(0xb6))/0x2+-parseInt(_0x28eeeb(0xd5))/0x3+parseInt(_0x28eeeb(0xa5))/0x4*(-parseInt(_0x28eeeb(0xc5))/0x5)+-parseInt(_0x28eeeb(0xd2))/0x6*(-parseInt(_0x28eeeb(0xc6))/0x7)+-parseInt(_0x28eeeb(0xc2))/0x8+-parseInt(_0x28eeeb(0xe5))/0x9*(-parseInt(_0x28eeeb(0xaf))/0xa);if(_0x463003===_0x791563)break;else _0x85c4d8['push'](_0x85c4d8['shift']());}catch(_0x661f90){_0x85c4d8['push'](_0x85c4d8['shift']());}}}(a61_0x58d7,0xa364e));import{deleteDataset,getDatasetDetail,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':a61_0x26430c(0xd6),'description':a61_0x26430c(0xd3)},DBID_FLAG={'name':a61_0x26430c(0xdc),'type':a61_0x26430c(0xd6),'description':a61_0x26430c(0xad)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':a61_0x26430c(0xe2)},CASCADE_FLAG={'name':a61_0x26430c(0xd7),'type':a61_0x26430c(0xc0),'description':a61_0x26430c(0xae)},EXPECTED_COUNT_FLAG={'name':a61_0x26430c(0xc7),'type':'number','description':a61_0x26430c(0xdf)};export const datasetDelete={'service':'dataset','command':'delete','description':a61_0x26430c(0xc3),'risk':a61_0x26430c(0xe4),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2cd6c4){const _0x22bff0=a61_0x26430c,_0x565a61=_0x2cd6c4[_0x22bff0(0xbb)]('id'),_0x1f537d=_0x2cd6c4['str'](_0x22bff0(0xba)),_0x15f81a=_0x2cd6c4[_0x22bff0(0xbb)](_0x22bff0(0xdc)),_0x3aaa36=[_0x565a61>0x0,Boolean(_0x1f537d),_0x15f81a>0x0]['filter'](Boolean);if(_0x3aaa36[_0x22bff0(0xc1)]===0x0)throw CliErrors[_0x22bff0(0xaa)](_0x22bff0(0xcc));if(_0x3aaa36[_0x22bff0(0xc1)]>0x1)throw CliErrors[_0x22bff0(0xaa)](_0x22bff0(0xbc));},async 'dryRun'(_0x18a4ea){const _0xf2e17a=a61_0x26430c,_0x22fb95=await resolveTargets(_0x18a4ea),_0x1d082c=_0x18a4ea[_0xf2e17a(0xca)](_0xf2e17a(0xd7));return{'method':_0xf2e17a(0xdd),'url':_0xf2e17a(0xb3)+(_0x1d082c?_0xf2e17a(0xcf):_0xf2e17a(0xbf)),'body':{'count':_0x22fb95['length'],'cascade':_0x1d082c,'datasets':_0x22fb95},'description':_0x1d082c?_0xf2e17a(0xd9)+_0x22fb95[_0xf2e17a(0xc1)]+_0xf2e17a(0xd1):'Would\x20safely\x20delete\x20'+_0x22fb95[_0xf2e17a(0xc1)]+_0xf2e17a(0xe0)};},async 'execute'(_0x4d1d85){const _0x5bd9c5=a61_0x26430c;if(!_0x4d1d85[_0x5bd9c5(0xca)](_0x5bd9c5(0xb9)))throw CliErrors[_0x5bd9c5(0xaa)](_0x5bd9c5(0xdb),_0x5bd9c5(0xd4));const _0x38a11b=await resolveTargets(_0x4d1d85),_0x568992=_0x4d1d85[_0x5bd9c5(0xca)]('cascade'),_0x2ca144=[],_0x5de9dd=[];for(const _0x48a037 of _0x38a11b){try{await deleteDataset(_0x48a037['id'],_0x568992),_0x2ca144[_0x5bd9c5(0xb1)](_0x48a037);}catch(_0x38ce8a){_0x5de9dd['push']({..._0x48a037,'error':_0x38ce8a instanceof Error?_0x38ce8a['message']:String(_0x38ce8a)});}}if(_0x5de9dd[_0x5bd9c5(0xc1)]>0x0){const _0x211fcd=buildPageRestoreCommands(_0x4d1d85[_0x5bd9c5(0xb0)],_0x568992?_0x2ca144:[]);return{'ok':![],'data':{'requested':_0x38a11b[_0x5bd9c5(0xc1)],'cascade':_0x568992,'deletedCount':_0x2ca144['length'],'failedCount':_0x5de9dd[_0x5bd9c5(0xc1)],'deleted':_0x2ca144,'failed':_0x5de9dd,'pageRestoreCommands':_0x211fcd},'message':_0x5bd9c5(0xab)+_0x2ca144[_0x5bd9c5(0xc1)]+'/'+_0x38a11b[_0x5bd9c5(0xc1)]+_0x5bd9c5(0xa8)+_0x5de9dd[_0x5bd9c5(0xc1)]+_0x5bd9c5(0xb4)};}return{'ok':!![],'data':{'requested':_0x38a11b[_0x5bd9c5(0xc1)],'cascade':_0x568992,'deletedCount':_0x2ca144[_0x5bd9c5(0xc1)],'deleted':_0x2ca144,'pageRestoreCommands':buildPageRestoreCommands(_0x4d1d85['appCode'],_0x568992?_0x2ca144:[])},'message':'Deleted\x20'+_0x2ca144[_0x5bd9c5(0xc1)]+'\x20dataset(s)'};}};function a61_0x4a63(_0x5f3547,_0x2c0465){_0x5f3547=_0x5f3547-0xa5;const _0x58d79d=a61_0x58d7();let _0x4a630f=_0x58d79d[_0x5f3547];return _0x4a630f;}async function resolveTargets(_0x10c6e0){const _0x4ef4b6=a61_0x26430c,_0x16a700=_0x10c6e0[_0x4ef4b6(0xbb)]('id'),_0xea9acd=_0x10c6e0['str'](_0x4ef4b6(0xba)),_0x26afde=_0x10c6e0[_0x4ef4b6(0xbb)](_0x4ef4b6(0xdc));let _0x391a38;_0xea9acd?(_0x391a38=await listDatasets(_0x10c6e0[_0x4ef4b6(0xb0)],{'code':_0xea9acd}),_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x54cca2=>_0x54cca2[_0x4ef4b6(0xba)]===_0xea9acd)):(_0x391a38=await listDatasets(_0x10c6e0['appCode']),_0x16a700>0x0&&(_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x47ac3d=>_0x47ac3d['id']===_0x16a700)),_0x26afde>0x0&&(_0x391a38=_0x391a38[_0x4ef4b6(0xc8)](_0x5c1af4=>_0x5c1af4[_0x4ef4b6(0xe1)]?.[_0x4ef4b6(0xcb)]===_0x26afde)));const _0x4e142=[];for(const _0x3127f1 of _0x391a38){const _0x2a9db9=await getDatasetDetail(_0x3127f1[_0x4ef4b6(0xba)]),_0x48b273=Array[_0x4ef4b6(0xc9)](_0x2a9db9[_0x4ef4b6(0xa6)])?_0x2a9db9[_0x4ef4b6(0xa6)][_0x4ef4b6(0xc8)](_0x4ded80=>_0x4ded80!=null&&typeof _0x4ded80==='object'&&_0x4ded80[_0x4ef4b6(0xa9)]!==!![]):[];_0x4e142['push'](normalizeTarget(_0x3127f1,_0x48b273));}if(_0x4e142[_0x4ef4b6(0xc1)]===0x0){const _0x11db74=_0xea9acd||(_0x16a700>0x0?_0x4ef4b6(0xcd)+_0x16a700:_0x4ef4b6(0xac)+_0x26afde);throw CliErrors[_0x4ef4b6(0xaa)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x11db74+'.');}const _0x3c5d51=_0x10c6e0[_0x4ef4b6(0xbb)](_0x4ef4b6(0xc7));if(_0x3c5d51>0x0&&_0x4e142[_0x4ef4b6(0xc1)]!==_0x3c5d51)throw CliErrors[_0x4ef4b6(0xaa)](_0x4ef4b6(0xda)+_0x4e142[_0x4ef4b6(0xc1)]+_0x4ef4b6(0xc4)+_0x3c5d51+'.');return _0x4e142;}function a61_0x58d7(){const _0x3de706=['Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','dbtableConfig','Required\x20to\x20execute\x20dataset\x20deletion','description','high-risk-write','5747787pQXkzS','500DfcaqN','relatedPageInfoList','isInteger','\x20dataset(s);\x20','deleted','validation','Deleted\x20','dbid=','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','20aTSqoa','appCode','push','type','/smartapi/dataset/delete?cascade=','\x20failed','title','898132mApRue','relatedPages','add','confirm','code','num','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','name','map','false','boolean','length','1281320saBkCK','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','15885mpgILM','7657013enWzRz','expected-count','filter','isArray','bool','dbId','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','id=','dbName','true','467864biFEep','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','6lcAmAH','Dataset\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','3377385vUArgG','number','cascade','object','Would\x20delete\x20','Matched\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','dbid','POST','source'];a61_0x58d7=function(){return _0x3de706;};return a61_0x58d7();}function normalizeTarget(_0x3761e3,_0x51d7af){const _0x3ab5df=a61_0x26430c,_0x56c83a=_0x3761e3[_0x3ab5df(0xe1)]??{},_0x307c1a=_0x51d7af[_0x3ab5df(0xbe)](_0x2d840d=>{const _0x13c303=_0x3ab5df;if(_0x2d840d==null||typeof _0x2d840d!==_0x13c303(0xd8))return null;const _0x41ee48=_0x2d840d,_0x2205d4=Number(_0x41ee48['id']);if(!Number[_0x13c303(0xa7)](_0x2205d4)||_0x2205d4<=0x0)return null;const _0x149755=_0x41ee48[_0x13c303(0xb5)]??_0x41ee48[_0x13c303(0xbd)];return{'id':_0x2205d4,..._0x149755?{'name':String(_0x149755)}:{},..._0x41ee48['type']?{'type':String(_0x41ee48[_0x13c303(0xb2)])}:{}};})[_0x3ab5df(0xc8)](_0x32b624=>_0x32b624!==null);return{'id':_0x3761e3['id'],'code':_0x3761e3['code'],'name':_0x3761e3[_0x3ab5df(0xbd)],'description':_0x3761e3[_0x3ab5df(0xe3)],'source':_0x3761e3[_0x3ab5df(0xde)],'dbId':_0x56c83a[_0x3ab5df(0xcb)],'dbName':_0x56c83a[_0x3ab5df(0xce)],'tableName':_0x56c83a['tableName'],'relatedPageCount':_0x307c1a[_0x3ab5df(0xc1)],'relatedPages':_0x307c1a};}function buildPageRestoreCommands(_0x20f886,_0x36606b){const _0x5d12a9=a61_0x26430c,_0x26253b=new Set();for(const _0x3fe19b of _0x36606b){for(const _0x129e70 of _0x3fe19b[_0x5d12a9(0xb7)])_0x26253b[_0x5d12a9(0xb8)](_0x129e70['id']);}return[..._0x26253b]['map'](_0xd7fd40=>'rabetbase\x20page\x20restore\x20--id\x20'+_0xd7fd40+'\x20--appcode\x20'+_0x20f886);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x3799d7=a62_0x4112;function a62_0x253f(){const _0x24f185=['object','responseBody','dblinkInfoDTO','labelField','alias','fields','dbType','indexes','tableName','columnCodeListWithDeleted','toDatasetName','length','toDatasetCode','cardinality','2411838eXKacm','formatRules','2383758QjyaXF','allFieldNames','allFields','responseFields','dbId','requestBody','20aoKwDe','main_sub','dbtableConfig','afterScriptId','requestFields','path','creatorNameField','tableComment','updateTimeField','155244wLirLD','method','displayName','modifierIdField','modifierNameField','isArray','relatedPageInfoList','relationId','relations','options','read','name','modelId','creatorIdField','datasetKey','filter','pkField','code','7726nTBfWW','logicField','deleted','trim','bizRelationType','modelCode','type','fromField','doType','doVersion','sourceType','push','2376330iXNRyA','extend','entries','required','str','toFieldLabel','beforeScriptId','description','parse','118TQOpMX','map','validateRules','dbName','string','deprecated','source','3476634DxfHWw','197400zTaHCn'];a62_0x253f=function(){return _0x24f185;};return a62_0x253f();}(function(_0x2ad19e,_0x358d27){const _0x1b91ad=a62_0x4112,_0x54e8ea=_0x2ad19e();while(!![]){try{const _0x1a019f=parseInt(_0x1b91ad(0xb4))/0x1*(parseInt(_0x1b91ad(0x7a))/0x2)+-parseInt(_0x1b91ad(0xa2))/0x3*(parseInt(_0x1b91ad(0x99))/0x4)+parseInt(_0x1b91ad(0xc0))/0x5+parseInt(_0x1b91ad(0x93))/0x6+-parseInt(_0x1b91ad(0x81))/0x7+-parseInt(_0x1b91ad(0x82))/0x8+-parseInt(_0x1b91ad(0x91))/0x9;if(_0x1a019f===_0x358d27)break;else _0x54e8ea['push'](_0x54e8ea['shift']());}catch(_0x36b9bc){_0x54e8ea['push'](_0x54e8ea['shift']());}}}(a62_0x253f,0x4470e));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x20777e){const _0x1d3d68=a62_0x4112;if(_0x20777e[_0x1d3d68(0xb6)])return null;const _0xf30840=Boolean(_0x20777e[_0x1d3d68(0xa4)]!==undefined||_0x20777e[_0x1d3d68(0xbc)]!==undefined);let _0x5d6326={};if(!_0xf30840&&typeof _0x20777e[_0x1d3d68(0xc1)]==='string')try{_0x5d6326=JSON[_0x1d3d68(0x79)](_0x20777e[_0x1d3d68(0xc1)]);}catch{}const _0x11c58d=_0xf30840?_0x20777e[_0x1d3d68(0xad)]:_0x20777e[_0x1d3d68(0xb3)],_0x18e1fd=_0xf30840?_0x20777e['displayName']:_0x20777e[_0x1d3d68(0xad)],_0x5597d6=_0xf30840?_0x20777e[_0x1d3d68(0xbc)]:_0x20777e[_0x1d3d68(0xba)]||_0x20777e['dataType'],_0x41c0c1=_0xf30840?_0x20777e['pkField']===!![]:_0x5d6326['pkField']===!![],_0x505152=_0xf30840?_0x20777e[_0x1d3d68(0xc3)]===!![]:_0x5d6326[_0x1d3d68(0xc3)]===!![],_0x4a9e1c=_0xf30840?_0x20777e[_0x1d3d68(0xab)]??null:_0x5d6326[_0x1d3d68(0xab)]??null,_0x336ebb={'name':_0x11c58d,'displayName':_0x18e1fd||_0x11c58d,'type':_0x5597d6,'dbType':_0x20777e[_0x1d3d68(0x89)],'pk':_0x41c0c1,'required':_0x505152,'deprecated':_0x20777e[_0x1d3d68(0x7f)]===!![],'description':_0x20777e['description']||undefined};return Array[_0x1d3d68(0xa7)](_0x4a9e1c)&&_0x4a9e1c[_0x1d3d68(0x8e)]>0x0&&(_0x336ebb[_0x1d3d68(0xab)]=_0x4a9e1c),_0x336ebb;}function parseJsonMaybe(_0xf85d8f){const _0x5e1755=a62_0x4112;if(typeof _0xf85d8f!==_0x5e1755(0x7e))return _0xf85d8f;try{return JSON[_0x5e1755(0x79)](_0xf85d8f);}catch{return _0xf85d8f;}}function a62_0x4112(_0x1bf98b,_0x44ec3a){_0x1bf98b=_0x1bf98b-0x77;const _0x253fea=a62_0x253f();let _0x411248=_0x253fea[_0x1bf98b];return _0x411248;}function normalizeOperationEntry(_0x121a8e,_0x3799a0){const _0x188177=a62_0x4112;if(!_0x3799a0||typeof _0x3799a0!==_0x188177(0x83))return null;if(!_0x3799a0['method']||!_0x3799a0[_0x188177(0x9e)])return null;const _0x413a63={'name':_0x121a8e,'method':_0x3799a0[_0x188177(0xa3)],'path':_0x3799a0['path']};if(_0x3799a0['host'])_0x413a63['host']=_0x3799a0['host'];if(_0x3799a0[_0x188177(0x98)]!=null){const _0x36aa18=parseJsonMaybe(_0x3799a0[_0x188177(0x98)]);_0x413a63[_0x188177(0x98)]=_0x36aa18;}if(_0x3799a0[_0x188177(0x84)]!=null){const _0x2a124a=parseJsonMaybe(_0x3799a0[_0x188177(0x84)]);_0x413a63[_0x188177(0x84)]=_0x2a124a;}if(_0x3799a0[_0x188177(0x77)]!=null)_0x413a63[_0x188177(0x77)]=_0x3799a0[_0x188177(0x77)];if(_0x3799a0['afterScriptId']!=null)_0x413a63[_0x188177(0x9c)]=_0x3799a0['afterScriptId'];if(Array['isArray'](_0x3799a0['requestFields']))_0x413a63[_0x188177(0x9d)]=_0x3799a0[_0x188177(0x9d)];if(Array[_0x188177(0xa7)](_0x3799a0['responseFields']))_0x413a63[_0x188177(0x96)]=_0x3799a0['responseFields'];return _0x413a63;}function summarizeDbtable(_0x14c60e){const _0x1ba6a4=a62_0x4112,_0x4c3aa0={},_0x16c924=['dbId','dbName',_0x1ba6a4(0x8b),_0x1ba6a4(0xb0),_0x1ba6a4(0xb2),_0x1ba6a4(0x95),_0x1ba6a4(0xb5),'createTimeField',_0x1ba6a4(0xa1),_0x1ba6a4(0xaf),_0x1ba6a4(0x9f),_0x1ba6a4(0xa5),_0x1ba6a4(0xa6),_0x1ba6a4(0x86),_0x1ba6a4(0x85)];for(const _0xd16d77 of _0x16c924){if(_0x14c60e[_0xd16d77]!==undefined)_0x4c3aa0[_0xd16d77]=_0x14c60e[_0xd16d77];}return typeof _0x4c3aa0[_0x1ba6a4(0x95)]==='string'&&_0x4c3aa0[_0x1ba6a4(0x95)][_0x1ba6a4(0x8e)]>0x0&&(_0x4c3aa0[_0x1ba6a4(0x94)]=_0x4c3aa0[_0x1ba6a4(0x95)]['split'](',')[_0x1ba6a4(0x7b)](_0x158f25=>_0x158f25[_0x1ba6a4(0xb7)]())[_0x1ba6a4(0xb1)](Boolean)),_0x4c3aa0;}function normalizeRelatedPages(_0x56716a){const _0x342072=a62_0x4112;if(!Array[_0x342072(0xa7)](_0x56716a))return[];return _0x56716a['filter'](_0x4ce9ee=>_0x4ce9ee&&typeof _0x4ce9ee===_0x342072(0x83))[_0x342072(0x7b)](_0x38cd25=>({'id':_0x38cd25['id'],'type':_0x38cd25[_0x342072(0xba)],'code':_0x38cd25[_0x342072(0xb3)],'title':_0x38cd25['title'],'deleted':_0x38cd25[_0x342072(0xb6)]===!![]}));}export const datasetDetail={'service':'dataset','command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x3799d7(0xac),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x3799d7(0x87),'type':a62_0x3799d7(0x7e),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x591d7f){const _0x4df78d=a62_0x3799d7,_0xb854f1=await getDatasetDetail(_0x591d7f[_0x4df78d(0xc4)](_0x4df78d(0xb3))),_0xd90999=Array['isArray'](_0xb854f1[_0x4df78d(0x88)])?_0xb854f1[_0x4df78d(0x88)]:Array[_0x4df78d(0xa7)](_0xb854f1['properties'])?_0xb854f1['properties']:[],_0x2d8c99=_0xd90999[_0x4df78d(0x7b)](_0x321aa1=>normalizeField(_0x321aa1))[_0x4df78d(0xb1)](_0x5c8563=>_0x5c8563!==null),_0x3421f0=_0xb854f1['operations']??{},_0x57b79e=[];for(const [_0x25ea21,_0x1487ee]of Object[_0x4df78d(0xc2)](_0x3421f0)){const _0x5e3559=normalizeOperationEntry(_0x25ea21,_0x1487ee);if(_0x5e3559)_0x57b79e[_0x4df78d(0xbf)](_0x5e3559);}const _0x128d7c=_0xb854f1[_0x4df78d(0x9b)]??{},_0x1eb5bb=_0xb854f1['dataset']??{},_0x426af0=_0x128d7c[_0x4df78d(0x97)]!=null?{'id':_0x128d7c[_0x4df78d(0x97)],'name':_0x128d7c[_0x4df78d(0x7d)]??null}:undefined;let _0x23f5af;return typeof _0xb854f1[_0x4df78d(0xc1)]===_0x4df78d(0x7e)&&(_0x23f5af=parseJsonMaybe(_0xb854f1[_0x4df78d(0xc1)])),{'ok':!![],'data':{'id':_0xb854f1[_0x4df78d(0xae)]??_0xb854f1['id'],'name':_0xb854f1[_0x4df78d(0xad)],'code':_0xb854f1[_0x4df78d(0xb9)]||_0xb854f1[_0x4df78d(0xb3)],'doVersion':_0xb854f1[_0x4df78d(0xbd)],'description':_0xb854f1[_0x4df78d(0x78)]||_0x1eb5bb[_0x4df78d(0xa0)]||undefined,'source':_0xb854f1[_0x4df78d(0x80)]||_0x1eb5bb[_0x4df78d(0xbe)],'table':_0x128d7c[_0x4df78d(0x8b)]||_0x1eb5bb[_0x4df78d(0x8b)],'datasetKey':_0x128d7c['datasetKey'],'pk':_0x128d7c[_0x4df78d(0xb2)],'db':_0x426af0,'dbtable':summarizeDbtable(_0x128d7c),'fields':_0x2d8c99,'operations':_0x57b79e,'indexes':Array[_0x4df78d(0xa7)](_0x1eb5bb['indexes'])?_0x1eb5bb[_0x4df78d(0x8a)]:[],'relations':Array[_0x4df78d(0xa7)](_0xb854f1['relations'])?_0xb854f1[_0x4df78d(0xaa)][_0x4df78d(0x7b)](_0x26e605=>({..._0x26e605[_0x4df78d(0xa9)]!=null?{'relationId':_0x26e605[_0x4df78d(0xa9)]}:{},'fromDataset':_0xb854f1[_0x4df78d(0xad)],'fromCode':_0xb854f1[_0x4df78d(0xb9)]||_0xb854f1[_0x4df78d(0xb3)],'fromTable':_0x128d7c['tableName']||_0x1eb5bb['tableName'],'fromField':_0x26e605[_0x4df78d(0xbb)],'toDataset':_0x26e605[_0x4df78d(0x8d)],'toCode':_0x26e605[_0x4df78d(0x8f)],'toTable':_0x26e605['toTableName'],'toField':_0x26e605['toField'],'labelField':_0x26e605[_0x4df78d(0xc5)]||undefined,'cardinality':_0x26e605[_0x4df78d(0x90)]||undefined,'bizRelationType':_0x26e605[_0x4df78d(0xb8)]===_0x4df78d(0x9a)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0xb854f1[_0x4df78d(0xa8)]),...Array['isArray'](_0xb854f1[_0x4df78d(0x8c)])?{'columnCodeListWithDeleted':_0xb854f1[_0x4df78d(0x8c)]}:{},'formatRules':Array[_0x4df78d(0xa7)](_0xb854f1['formatRules'])?_0xb854f1[_0x4df78d(0x92)]:[],'validateRules':Array[_0x4df78d(0xa7)](_0xb854f1[_0x4df78d(0x7c)])?_0xb854f1['validateRules']:[],..._0x23f5af!==undefined?{'extend':_0x23f5af}:{},'stats':{'fieldCount':_0x2d8c99['length'],'operationCount':_0x57b79e[_0x4df78d(0x8e)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a63_0xc1636d=a63_0x3c00;(function(_0x3540da,_0x55e647){const _0x42771a=a63_0x3c00,_0x4980ca=_0x3540da();while(!![]){try{const _0x2cf734=parseInt(_0x42771a(0x142))/0x1*(-parseInt(_0x42771a(0x111))/0x2)+parseInt(_0x42771a(0x12d))/0x3+parseInt(_0x42771a(0x10c))/0x4*(-parseInt(_0x42771a(0x140))/0x5)+parseInt(_0x42771a(0x145))/0x6*(-parseInt(_0x42771a(0x137))/0x7)+parseInt(_0x42771a(0x143))/0x8+parseInt(_0x42771a(0x10d))/0x9+parseInt(_0x42771a(0x132))/0xa*(parseInt(_0x42771a(0x11a))/0xb);if(_0x2cf734===_0x55e647)break;else _0x4980ca['push'](_0x4980ca['shift']());}catch(_0x13fe79){_0x4980ca['push'](_0x4980ca['shift']());}}}(a63_0x30bc,0x5d03b));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':a63_0xc1636d(0x13c),'hint':a63_0xc1636d(0x11f)}]]);export function parseJsonObjectFlag(_0x5e26a3,_0x4f1790){const _0x7058c3=a63_0xc1636d;if(!_0x5e26a3)return undefined;let _0xe421a8;try{_0xe421a8=JSON[_0x7058c3(0x127)](_0x5e26a3);}catch(_0x3c7dc6){const _0xbb5368=_0x3c7dc6 instanceof Error?_0x3c7dc6[_0x7058c3(0x13b)]:String(_0x3c7dc6);throw CliErrors[_0x7058c3(0x119)](_0x4f1790+_0x7058c3(0x14b)+_0xbb5368);}if(!isPlainObject(_0xe421a8)||Array['isArray'](_0xe421a8))throw CliErrors['validation'](_0x4f1790+'\x20must\x20be\x20a\x20JSON\x20object');return _0xe421a8;}export function validateExtendPatchKeys(_0x43ebd9){const _0x24b046=a63_0xc1636d,_0x5b5c54=Object[_0x24b046(0x139)](_0x43ebd9);if(_0x5b5c54[_0x24b046(0x128)]===0x0)throw CliErrors[_0x24b046(0x119)](_0x24b046(0x14d));for(const _0x1e065b of _0x5b5c54){const _0x173d2a=EXTEND_PATCH_REDIRECTS[_0x24b046(0x149)](_0x1e065b);if(_0x173d2a)throw CliErrors[_0x24b046(0x119)](_0x173d2a[_0x24b046(0x13b)],_0x173d2a[_0x24b046(0x144)]);if(!MUTABLE_EXTEND_KEYS[_0x24b046(0x12f)](_0x1e065b))throw CliErrors[_0x24b046(0x119)](_0x24b046(0x11c)+_0x1e065b,describeMutableExtendKeys());}}function describeMutableExtendKeys(){const _0x281aa6=a63_0xc1636d,_0xa4d97=Array[_0x281aa6(0x12a)](MUTABLE_EXTEND_KEYS)[_0x281aa6(0x125)]();return _0xa4d97[_0x281aa6(0x128)]>0x0?_0x281aa6(0x136)+_0xa4d97[_0x281aa6(0x14f)](',\x20'):_0x281aa6(0x11e);}export function applyExtendPatch(_0x51988d,_0x35969e){const _0x101d85=a63_0xc1636d;validateExtendPatchKeys(_0x35969e);const _0x248316=deepClone(_0x51988d),_0x105b32=[];for(const [_0x489e89,_0x21d26b]of Object[_0x101d85(0x115)](_0x35969e)){const _0x4cefab=_0x248316[_0x489e89],_0x1990e6=deepClone(_0x21d26b);!deepEqual(_0x4cefab,_0x1990e6)&&(_0x248316[_0x489e89]=_0x1990e6,_0x105b32[_0x101d85(0x13d)](_0x101d85(0x131)+_0x489e89));}return _0x105b32[_0x101d85(0x125)](),{'after':_0x248316,'changedPaths':_0x105b32,'changed':_0x105b32[_0x101d85(0x128)]>0x0};}export function assertExpectation(_0x3329a2,_0x27c216){const _0x57a534=a63_0xc1636d;if(!_0x27c216)return;for(const [_0x6416c0,_0x40bd21]of Object[_0x57a534(0x115)](_0x27c216)){const _0x15bf71=_0x3329a2[_0x6416c0];if(!deepEqual(_0x15bf71,_0x40bd21))throw CliErrors[_0x57a534(0x119)](_0x57a534(0x14e)+_0x6416c0,_0x57a534(0x110)+JSON['stringify'](_0x40bd21)+_0x57a534(0x13f)+JSON[_0x57a534(0x129)](_0x15bf71));}}export async function buildDatasetExtendUpdateResult({appCode:_0x3af22d,input:_0x44829a,dryRun:_0x1a8d99}){const _0x18d9f7=a63_0xc1636d;validateInput(_0x44829a);const _0x2f20b1=await getDatasetDetail(_0x44829a['code']),_0x58ed5a=parseDatasetExtend(_0x2f20b1['extend']),_0x481333=deepClone(_0x58ed5a[_0x18d9f7(0x13e)]);assertExpectation(_0x481333,_0x44829a[_0x18d9f7(0x14a)]);const {after:_0x21a00a,changedPaths:_0xf938c2,changed:_0x266343}=applyExtendPatch(_0x481333,_0x44829a[_0x18d9f7(0x148)]),_0x4ddc2e=summarizeDataset(_0x2f20b1,_0x44829a['code']);return _0x266343&&!_0x1a8d99&&(_0x2f20b1[_0x18d9f7(0x147)]=serializeDatasetExtend(_0x21a00a,_0x58ed5a['shape']),await updateDrivenData(_0x2f20b1)),{'ok':!![],'data':{'appCode':_0x3af22d,'selector':{'code':_0x44829a[_0x18d9f7(0x114)]},'dataset':_0x4ddc2e,'dryRun':_0x1a8d99,'changed':_0x266343,'changedPaths':_0xf938c2,'before':{'extend':_0x481333},'after':{'extend':_0x21a00a},'submitted':_0x266343&&!_0x1a8d99},'message':_0x266343?_0x1a8d99?_0x18d9f7(0x123)+_0xf938c2['join'](',\x20')+')':_0x18d9f7(0x116)+_0xf938c2[_0x18d9f7(0x14f)](',\x20')+')':_0x18d9f7(0x11d)};}export const datasetExtendUpdate={'service':'dataset','command':a63_0xc1636d(0x10e),'description':a63_0xc1636d(0x117),'risk':a63_0xc1636d(0x122),'flags':[CODE_FLAG,{'name':a63_0xc1636d(0x12b),'type':a63_0xc1636d(0x126),'required':!![],'description':a63_0xc1636d(0x150)},{'name':'expect-json','type':a63_0xc1636d(0x126),'required':![],'description':'JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x35762c){validateInput(readExtendUpdateInput(_0x35762c));},async 'dryRun'(_0xc94065){const _0x47ff30=a63_0xc1636d,_0x3f7208=await buildDatasetExtendUpdateResult({'appCode':_0xc94065[_0x47ff30(0x12e)],'input':readExtendUpdateInput(_0xc94065),'dryRun':!![]});return{'method':_0x47ff30(0x118),'url':'/smartapi/dataset/update-driven-data','body':_0x3f7208['data'],'description':_0x3f7208['message']};},async 'execute'(_0xf61a2){const _0x5ee942=a63_0xc1636d;return buildDatasetExtendUpdateResult({'appCode':_0xf61a2[_0x5ee942(0x12e)],'input':readExtendUpdateInput(_0xf61a2),'dryRun':![]});}};function a63_0x30bc(){const _0x538e15=['push','value',',\x20actual\x20','2043750XydSNj','--code\x20is\x20required','7757laNiCU','5214560vkorNM','hint','1471716pPlGjC','dbName','extend','patch','get','expect','\x20must\x20be\x20valid\x20JSON\x20object:\x20','--expect-json','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','Expectation\x20mismatch\x20at\x20extend.','join','JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty','4uPUyWD','3342573klPcuP','extend-update','trim','Expected\x20','136bZqWRe','dataset','isArray','code','entries','Updated\x20dataset\x20extend\x20(','Patch\x20dataset\x20top-level\x20extend\x20safely','POST','validation','52118VUAvMT','modelId','Unsupported\x20patch\x20key:\x20','No\x20changes\x20for\x20dataset\x20extend','No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','expect-json','str','write','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','dbtableConfig','sort','string','parse','length','stringify','from','patch-json','dbId','608652DFiyJp','appCode','has','modelCode','extend.','710FJEVWR','datasetCode','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','datasetId','Allowed\x20keys:\x20','7brhGYz','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','keys','tableName','message','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update'];a63_0x30bc=function(){return _0x538e15;};return a63_0x30bc();}function readExtendUpdateInput(_0x13aefc){const _0x4874bc=a63_0xc1636d,_0x52dc88=trim(_0x13aefc[_0x4874bc(0x121)](_0x4874bc(0x114))),_0x4b179e=parseJsonObjectFlag(_0x13aefc[_0x4874bc(0x121)](_0x4874bc(0x12b)),'--patch-json'),_0x5ba8de=parseJsonObjectFlag(_0x13aefc[_0x4874bc(0x121)](_0x4874bc(0x120)),_0x4874bc(0x14c));return{'code':_0x52dc88,'patch':_0x4b179e||{},'expect':_0x5ba8de};}function validateInput(_0x5a4a50){const _0x5421ed=a63_0xc1636d;if(!_0x5a4a50['code'])throw CliErrors[_0x5421ed(0x119)](_0x5421ed(0x141));validateExtendPatchKeys(_0x5a4a50[_0x5421ed(0x148)]);}function parseDatasetExtend(_0x51b994){const _0x49b5bd=a63_0xc1636d;if(typeof _0x51b994==='string'){const _0x3f81c3=_0x51b994[_0x49b5bd(0x10f)]();if(!_0x3f81c3)return{'value':{},'shape':'string'};let _0x2fc91e;try{_0x2fc91e=JSON[_0x49b5bd(0x127)](_0x3f81c3);}catch(_0x4bfc89){const _0x7eca17=_0x4bfc89 instanceof Error?_0x4bfc89['message']:String(_0x4bfc89);throw CliErrors[_0x49b5bd(0x119)](_0x49b5bd(0x134)+_0x7eca17);}if(!isPlainObject(_0x2fc91e)||Array[_0x49b5bd(0x113)](_0x2fc91e))throw CliErrors['validation']('Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object');return{'value':_0x2fc91e,'shape':_0x49b5bd(0x126)};}if(_0x51b994===undefined||_0x51b994===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x51b994)||Array[_0x49b5bd(0x113)](_0x51b994))throw CliErrors[_0x49b5bd(0x119)](_0x49b5bd(0x138));return{'value':_0x51b994,'shape':'object'};}function serializeDatasetExtend(_0x1d4706,_0x39f06d){const _0x2da5cb=a63_0xc1636d;return _0x39f06d===_0x2da5cb(0x126)?JSON[_0x2da5cb(0x129)](_0x1d4706):_0x1d4706;}function summarizeDataset(_0x202321,_0x35e74f){const _0x84c21b=a63_0xc1636d,_0x1f4562=isPlainObject(_0x202321['dataset'])?_0x202321[_0x84c21b(0x112)]:{},_0x1a9e1b=isPlainObject(_0x202321[_0x84c21b(0x124)])?_0x202321['dbtableConfig']:{};return{'id':_0x202321[_0x84c21b(0x11b)]??_0x202321['id']??_0x1f4562[_0x84c21b(0x135)]??null,'code':_0x202321[_0x84c21b(0x130)]??_0x202321[_0x84c21b(0x114)]??_0x1f4562[_0x84c21b(0x133)]??_0x35e74f,'name':_0x202321['name']??_0x1f4562['datasetName']??null,'table':_0x1a9e1b[_0x84c21b(0x13a)]??_0x1f4562[_0x84c21b(0x13a)]??null,'db':_0x1a9e1b[_0x84c21b(0x146)]??_0x1a9e1b[_0x84c21b(0x12c)]??null};}function a63_0x3c00(_0x3b6466,_0x1d06c7){_0x3b6466=_0x3b6466-0x10c;const _0x30bc67=a63_0x30bc();let _0x3c0016=_0x30bc67[_0x3b6466];return _0x3c0016;}function deepClone(_0x18e99e){const _0x2c9926=a63_0xc1636d;if(_0x18e99e===undefined)return _0x18e99e;return JSON['parse'](JSON[_0x2c9926(0x129)](_0x18e99e));}function deepEqual(_0x3fb8ad,_0x21c3fd){const _0x9bccf2=a63_0xc1636d;return JSON[_0x9bccf2(0x129)](_0x3fb8ad)===JSON[_0x9bccf2(0x129)](_0x21c3fd);}function isPlainObject(_0x2c9d36){const _0x23ed15=a63_0xc1636d;return Boolean(_0x2c9d36)&&typeof _0x2c9d36==='object'&&!Array[_0x23ed15(0x113)](_0x2c9d36);}function trim(_0x453c12){const _0xc5cfd7=String(_0x453c12||'')['trim']();return _0xc5cfd7;}
|
|
1
|
+
const a63_0x182bb8=a63_0xa0f5;(function(_0x7d7d8c,_0x127d6c){const _0x4bd7d6=a63_0xa0f5,_0x30d026=_0x7d7d8c();while(!![]){try{const _0x4d38d3=parseInt(_0x4bd7d6(0xe5))/0x1+parseInt(_0x4bd7d6(0xef))/0x2+-parseInt(_0x4bd7d6(0xb7))/0x3*(parseInt(_0x4bd7d6(0xe9))/0x4)+parseInt(_0x4bd7d6(0xe6))/0x5+parseInt(_0x4bd7d6(0xf0))/0x6+-parseInt(_0x4bd7d6(0xed))/0x7+parseInt(_0x4bd7d6(0xc0))/0x8;if(_0x4d38d3===_0x127d6c)break;else _0x30d026['push'](_0x30d026['shift']());}catch(_0xcaa948){_0x30d026['push'](_0x30d026['shift']());}}}(a63_0x36f8,0x78605));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([[a63_0x182bb8(0xdc),{'message':a63_0x182bb8(0xd4),'hint':a63_0x182bb8(0xe7)}]]);export function parseJsonObjectFlag(_0x1068d2,_0x40c3de){const _0x214bca=a63_0x182bb8;if(!_0x1068d2)return undefined;let _0x4e9044;try{_0x4e9044=JSON[_0x214bca(0xe3)](_0x1068d2);}catch(_0x21f7da){const _0x421cab=_0x21f7da instanceof Error?_0x21f7da[_0x214bca(0xca)]:String(_0x21f7da);throw CliErrors[_0x214bca(0xb9)](_0x40c3de+'\x20must\x20be\x20valid\x20JSON\x20object:\x20'+_0x421cab);}if(!isPlainObject(_0x4e9044)||Array['isArray'](_0x4e9044))throw CliErrors['validation'](_0x40c3de+_0x214bca(0xda));return _0x4e9044;}export function validateExtendPatchKeys(_0x2e7541){const _0x4c2088=a63_0x182bb8,_0x55a9a7=Object['keys'](_0x2e7541);if(_0x55a9a7['length']===0x0)throw CliErrors[_0x4c2088(0xb9)](_0x4c2088(0xc7));for(const _0x561ea0 of _0x55a9a7){const _0x27fb63=EXTEND_PATCH_REDIRECTS['get'](_0x561ea0);if(_0x27fb63)throw CliErrors['validation'](_0x27fb63[_0x4c2088(0xca)],_0x27fb63[_0x4c2088(0xf1)]);if(!MUTABLE_EXTEND_KEYS[_0x4c2088(0xc8)](_0x561ea0))throw CliErrors[_0x4c2088(0xb9)](_0x4c2088(0xf6)+_0x561ea0,describeMutableExtendKeys());}}function a63_0xa0f5(_0x50f04f,_0x5a1827){_0x50f04f=_0x50f04f-0xb6;const _0x36f89f=a63_0x36f8();let _0xa0f569=_0x36f89f[_0x50f04f];return _0xa0f569;}function describeMutableExtendKeys(){const _0x49d47d=a63_0x182bb8,_0x5bb662=Array['from'](MUTABLE_EXTEND_KEYS)[_0x49d47d(0xe8)]();return _0x5bb662[_0x49d47d(0xcb)]>0x0?_0x49d47d(0xc5)+_0x5bb662[_0x49d47d(0xf2)](',\x20'):_0x49d47d(0xd5);}export function applyExtendPatch(_0x2f0cb5,_0x34200f){const _0x4b57e7=a63_0x182bb8;validateExtendPatchKeys(_0x34200f);const _0x2d21cb=deepClone(_0x2f0cb5),_0x234a3a=[];for(const [_0x5e1492,_0x4ce12f]of Object[_0x4b57e7(0xcf)](_0x34200f)){const _0x399d1b=_0x2d21cb[_0x5e1492],_0x49aa11=deepClone(_0x4ce12f);!deepEqual(_0x399d1b,_0x49aa11)&&(_0x2d21cb[_0x5e1492]=_0x49aa11,_0x234a3a[_0x4b57e7(0xd6)](_0x4b57e7(0xdd)+_0x5e1492));}return _0x234a3a[_0x4b57e7(0xe8)](),{'after':_0x2d21cb,'changedPaths':_0x234a3a,'changed':_0x234a3a[_0x4b57e7(0xcb)]>0x0};}export function assertExpectation(_0x1b076d,_0x3eec44){const _0x21e501=a63_0x182bb8;if(!_0x3eec44)return;for(const [_0x5ca86f,_0x1be4af]of Object['entries'](_0x3eec44)){const _0x546ff6=_0x1b076d[_0x5ca86f];if(!deepEqual(_0x546ff6,_0x1be4af))throw CliErrors['validation']('Expectation\x20mismatch\x20at\x20extend.'+_0x5ca86f,_0x21e501(0xeb)+JSON[_0x21e501(0xd1)](_0x1be4af)+',\x20actual\x20'+JSON[_0x21e501(0xd1)](_0x546ff6));}}export async function buildDatasetExtendUpdateResult({appCode:_0x1b289c,input:_0x57604c,dryRun:_0x2886a0}){const _0x466310=a63_0x182bb8;validateInput(_0x57604c);const _0x66e2ea=await getDatasetDetail(_0x57604c[_0x466310(0xbd)]),_0x4dddc8=parseDatasetExtend(_0x66e2ea['extend']),_0x3ea0be=deepClone(_0x4dddc8[_0x466310(0xde)]);assertExpectation(_0x3ea0be,_0x57604c[_0x466310(0xc1)]);const {after:_0x3f8a70,changedPaths:_0x552e08,changed:_0x1bbd6b}=applyExtendPatch(_0x3ea0be,_0x57604c[_0x466310(0xbf)]),_0x54255f=summarizeDataset(_0x66e2ea,_0x57604c[_0x466310(0xbd)]);return _0x1bbd6b&&!_0x2886a0&&(_0x66e2ea[_0x466310(0xe1)]=serializeDatasetExtend(_0x3f8a70,_0x4dddc8[_0x466310(0xe4)]),await updateDrivenData(_0x66e2ea)),{'ok':!![],'data':{'appCode':_0x1b289c,'selector':{'code':_0x57604c[_0x466310(0xbd)]},'dataset':_0x54255f,'dryRun':_0x2886a0,'changed':_0x1bbd6b,'changedPaths':_0x552e08,'before':{'extend':_0x3ea0be},'after':{'extend':_0x3f8a70},'submitted':_0x1bbd6b&&!_0x2886a0},'message':_0x1bbd6b?_0x2886a0?_0x466310(0xba)+_0x552e08[_0x466310(0xf2)](',\x20')+')':_0x466310(0xbe)+_0x552e08[_0x466310(0xf2)](',\x20')+')':_0x466310(0xb6)};}export const datasetExtendUpdate={'service':a63_0x182bb8(0xea),'command':a63_0x182bb8(0xf3),'description':'Patch\x20dataset\x20top-level\x20extend\x20safely','risk':a63_0x182bb8(0xd2),'flags':[CODE_FLAG,{'name':a63_0x182bb8(0xd3),'type':a63_0x182bb8(0xbc),'required':!![],'description':'JSON\x20object\x20patch\x20for\x20dataset\x20top-level\x20extend;\x20current\x20allowlist\x20is\x20empty'},{'name':a63_0x182bb8(0xc6),'type':a63_0x182bb8(0xbc),'required':![],'description':a63_0x182bb8(0xdf)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xa4b424){validateInput(readExtendUpdateInput(_0xa4b424));},async 'dryRun'(_0x5b7e72){const _0x74057c=a63_0x182bb8,_0x453a8a=await buildDatasetExtendUpdateResult({'appCode':_0x5b7e72[_0x74057c(0xcc)],'input':readExtendUpdateInput(_0x5b7e72),'dryRun':!![]});return{'method':_0x74057c(0xe2),'url':_0x74057c(0xd9),'body':_0x453a8a['data'],'description':_0x453a8a[_0x74057c(0xca)]};},async 'execute'(_0x1c6bfa){const _0x3330bb=a63_0x182bb8;return buildDatasetExtendUpdateResult({'appCode':_0x1c6bfa[_0x3330bb(0xcc)],'input':readExtendUpdateInput(_0x1c6bfa),'dryRun':![]});}};function readExtendUpdateInput(_0x1ded3b){const _0x4f9569=a63_0x182bb8,_0x401d74=trim(_0x1ded3b[_0x4f9569(0xe0)](_0x4f9569(0xbd))),_0x2d800b=parseJsonObjectFlag(_0x1ded3b['str']('patch-json'),_0x4f9569(0xd8)),_0x387819=parseJsonObjectFlag(_0x1ded3b['str'](_0x4f9569(0xc6)),_0x4f9569(0xc2));return{'code':_0x401d74,'patch':_0x2d800b||{},'expect':_0x387819};}function validateInput(_0x28c220){const _0x50324=a63_0x182bb8;if(!_0x28c220[_0x50324(0xbd)])throw CliErrors[_0x50324(0xb9)]('--code\x20is\x20required');validateExtendPatchKeys(_0x28c220[_0x50324(0xbf)]);}function parseDatasetExtend(_0x49c21d){const _0x3b55da=a63_0x182bb8;if(typeof _0x49c21d===_0x3b55da(0xbc)){const _0x11c9b6=_0x49c21d['trim']();if(!_0x11c9b6)return{'value':{},'shape':_0x3b55da(0xbc)};let _0x37c9c5;try{_0x37c9c5=JSON[_0x3b55da(0xe3)](_0x11c9b6);}catch(_0x3410e1){const _0x22a4f5=_0x3410e1 instanceof Error?_0x3410e1[_0x3b55da(0xca)]:String(_0x3410e1);throw CliErrors[_0x3b55da(0xb9)](_0x3b55da(0xd7)+_0x22a4f5);}if(!isPlainObject(_0x37c9c5)||Array['isArray'](_0x37c9c5))throw CliErrors[_0x3b55da(0xb9)](_0x3b55da(0xcd));return{'value':_0x37c9c5,'shape':_0x3b55da(0xbc)};}if(_0x49c21d===undefined||_0x49c21d===null)return{'value':{},'shape':'string'};if(!isPlainObject(_0x49c21d)||Array[_0x3b55da(0xc4)](_0x49c21d))throw CliErrors[_0x3b55da(0xb9)](_0x3b55da(0xcd));return{'value':_0x49c21d,'shape':_0x3b55da(0xf5)};}function serializeDatasetExtend(_0x369a86,_0x5ebb45){const _0x2c8182=a63_0x182bb8;return _0x5ebb45===_0x2c8182(0xbc)?JSON[_0x2c8182(0xd1)](_0x369a86):_0x369a86;}function summarizeDataset(_0x53b160,_0xa75c0e){const _0x3328e2=a63_0x182bb8,_0x3259e7=isPlainObject(_0x53b160[_0x3328e2(0xea)])?_0x53b160['dataset']:{},_0x3d6a89=isPlainObject(_0x53b160[_0x3328e2(0xc3)])?_0x53b160[_0x3328e2(0xc3)]:{};return{'id':_0x53b160[_0x3328e2(0xd0)]??_0x53b160['id']??_0x3259e7[_0x3328e2(0xdb)]??null,'code':_0x53b160[_0x3328e2(0xf4)]??_0x53b160['code']??_0x3259e7[_0x3328e2(0xc9)]??_0xa75c0e,'name':_0x53b160[_0x3328e2(0xb8)]??_0x3259e7[_0x3328e2(0xce)]??null,'table':_0x3d6a89[_0x3328e2(0xec)]??_0x3259e7['tableName']??null,'db':_0x3d6a89[_0x3328e2(0xee)]??_0x3d6a89[_0x3328e2(0xbb)]??null};}function deepClone(_0xc8af0e){const _0x4f665c=a63_0x182bb8;if(_0xc8af0e===undefined)return _0xc8af0e;return JSON[_0x4f665c(0xe3)](JSON[_0x4f665c(0xd1)](_0xc8af0e));}function a63_0x36f8(){const _0x4329ba=['No\x20dataset\x20extend\x20patch\x20keys\x20are\x20currently\x20supported.','push','Dataset\x20extend\x20must\x20be\x20valid\x20JSON\x20object:\x20','--patch-json','/smartapi/dataset/update-driven-data','\x20must\x20be\x20a\x20JSON\x20object','datasetId','businessGroup','extend.','value','JSON\x20object\x20of\x20expected\x20current\x20extend\x20values;\x20mismatch\x20aborts\x20without\x20writing','str','extend','POST','parse','shape','164022yiTkHj','3069465JWXIfG','Use\x20`rabetbase\x20dataset\x20business-group-update`\x20to\x20update\x20business\x20model\x20groups.','sort','32FVnGpb','dataset','Expected\x20','tableName','6462533yBKxOC','dbName','230796SrLaeN','3740760EVsILA','hint','join','extend-update','modelCode','object','Unsupported\x20patch\x20key:\x20','No\x20changes\x20for\x20dataset\x20extend','245352UfnqcX','name','validation','Dry-run:\x20dataset\x20extend\x20would\x20change\x20(','dbId','string','code','Updated\x20dataset\x20extend\x20(','patch','4430232gEGzek','expect','--expect-json','dbtableConfig','isArray','Allowed\x20keys:\x20','expect-json','--patch-json\x20must\x20contain\x20at\x20least\x20one\x20key','has','datasetCode','message','length','appCode','Dataset\x20extend\x20must\x20be\x20a\x20JSON\x20object','datasetName','entries','modelId','stringify','write','patch-json','dataset\x20extend-update\x20does\x20not\x20support\x20businessGroup;\x20use\x20dataset\x20business-group-update'];a63_0x36f8=function(){return _0x4329ba;};return a63_0x36f8();}function deepEqual(_0x3bd7d7,_0x1eddc5){const _0x285daa=a63_0x182bb8;return JSON[_0x285daa(0xd1)](_0x3bd7d7)===JSON[_0x285daa(0xd1)](_0x1eddc5);}function isPlainObject(_0x5eaae0){const _0x3b8487=a63_0x182bb8;return Boolean(_0x5eaae0)&&typeof _0x5eaae0===_0x3b8487(0xf5)&&!Array['isArray'](_0x5eaae0);}function trim(_0x85fae7){const _0x1bdabb=String(_0x85fae7||'')['trim']();return _0x1bdabb;}
|