@lovrabet/rabetbase-cli 2.5.1 → 2.5.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/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-restore.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/dataset/user-deleted-field-list.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/deployment/auto-sync.d.ts +3 -11
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.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/domain-routing-sync.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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/project-domain-routing.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/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +0 -2
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -2
- 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/kb-search-client.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/supported-flags.d.ts +2 -0
- package/lib/framework/supported-flags.js +1 -0
- package/lib/framework/types.d.ts +2 -4
- 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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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 +3 -3
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +16 -44
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/config/deployment-sync.d.ts +0 -10
- package/lib/config/deployment-sync.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42ca70,_0x49d9a8){const _0x5c8056=a49_0x125a,_0x5d5892=_0x42ca70();while(!![]){try{const _0x33e388=parseInt(_0x5c8056(0x198))/0x1+parseInt(_0x5c8056(0x19d))/0x2+parseInt(_0x5c8056(0x19c))/0x3+parseInt(_0x5c8056(0x197))/0x4*(parseInt(_0x5c8056(0x192))/0x5)+parseInt(_0x5c8056(0x199))/0x6*(-parseInt(_0x5c8056(0x193))/0x7)+-parseInt(_0x5c8056(0x18f))/0x8*(parseInt(_0x5c8056(0x18c))/0x9)+-parseInt(_0x5c8056(0x195))/0xa*(-parseInt(_0x5c8056(0x196))/0xb);if(_0x33e388===_0x49d9a8)break;else _0x5d5892['push'](_0x5d5892['shift']());}catch(_0x26ab9f){_0x5d5892['push'](_0x5d5892['shift']());}}}(a49_0x5343,0xe8423));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x125a(_0x5c27fa,_0x246b34){_0x5c27fa=_0x5c27fa-0x18b;const _0x534359=a49_0x5343();let _0x125af7=_0x534359[_0x5c27fa];return _0x125af7;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x108ef8){const _0x2acc7f=a49_0x125a;if(_0x108ef8>=BYTES_PER_MB){const _0x3d3f41=Math[_0x2acc7f(0x18b)](_0x108ef8/BYTES_PER_MB*0x64)/0x64;return _0x3d3f41[_0x2acc7f(0x19b)](0x2)+_0x2acc7f(0x191);}return _0x108ef8+'\x20B';}export function requireDevelopmentUploadFile(_0x30f18d,_0x511e9e){const _0x1b16e6=a49_0x125a,_0x5157d4=_0x30f18d[_0x1b16e6(0x190)]();if(!_0x5157d4)throw CliErrors[_0x1b16e6(0x18d)](_0x511e9e+'\x20path\x20is\x20required.');if(!existsSync(_0x5157d4))throw CliErrors['validation'](_0x1b16e6(0x194)+_0x5157d4);const _0x1cd72a=statSync(_0x5157d4);if(!_0x1cd72a[_0x1b16e6(0x19a)]())throw CliErrors[_0x1b16e6(0x18d)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5157d4);if(_0x1cd72a['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1b16e6(0x18d)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x5157d4+'\x20('+formatBytes(_0x1cd72a[_0x1b16e6(0x18e)])+')');return{'path':_0x5157d4,'size':_0x1cd72a[_0x1b16e6(0x18e)]};}function a49_0x5343(){const _0x55df7c=['24QbypMA','trim','\x20MB','27490rOdiyI','7bcuqBd','File\x20not\x20found:\x20','10rpxZAx','1084391hoKQrA','136xdmuaX','433110FcikVK','5630970dNRaTL','isFile','toFixed','1660359cQdZVl','3657568PDweju','ceil','3633102FVaNMs','validation','size'];a49_0x5343=function(){return _0x55df7c;};return a49_0x5343();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a50_0x5e3d(_0x2be469,_0x3d5434){_0x2be469=_0x2be469-0xaa;const _0x4b6fe1=a50_0x4b6f();let _0x5e3dcc=_0x4b6fe1[_0x2be469];return _0x5e3dcc;}(function(_0x54f1cc,_0x855ef2){const _0x3025da=a50_0x5e3d,_0x40bdb9=_0x54f1cc();while(!![]){try{const _0x20158f=parseInt(_0x3025da(0xaf))/0x1*(parseInt(_0x3025da(0xb6))/0x2)+parseInt(_0x3025da(0xb0))/0x3*(parseInt(_0x3025da(0xac))/0x4)+parseInt(_0x3025da(0xb7))/0x5+-parseInt(_0x3025da(0xb4))/0x6+-parseInt(_0x3025da(0xad))/0x7+-parseInt(_0x3025da(0xb1))/0x8+-parseInt(_0x3025da(0xab))/0x9*(parseInt(_0x3025da(0xaa))/0xa);if(_0x20158f===_0x855ef2)break;else _0x40bdb9['push'](_0x40bdb9['shift']());}catch(_0x4ac823){_0x40bdb9['push'](_0x40bdb9['shift']());}}}(a50_0x4b6f,0x5b050));export function validateAppcode(_0x4e1e14){const _0x24897c=a50_0x5e3d,_0x593e9e=_0x4e1e14[_0x24897c(0xb5)]();if(!_0x593e9e)return{'valid':![],'message':_0x24897c(0xb2)};if(_0x593e9e[_0x24897c(0xb3)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x24897c(0xae)](_0x593e9e))return{'valid':![],'message':_0x24897c(0xb8)};return{'valid':!![]};}function a50_0x4b6f(){const _0x2dd22d=['2010475oEHsBV','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','20CvVbDW','658017hyVbqx','4mGMnAc','201131qDyiSg','test','179365yivrBv','1017657oPVXrZ','5732568OKhQyL','App\x20Code\x20cannot\x20be\x20empty','length','90378JBQuct','trim','6xHsgQH'];a50_0x4b6f=function(){return _0x2dd22d;};return a50_0x4b6f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a51_0x43aa(_0x50e761,_0x46070c){_0x50e761=_0x50e761-0x1e3;const _0x55752b=a51_0x5575();let _0x43aa5e=_0x55752b[_0x50e761];return _0x43aa5e;}const a51_0x490651=a51_0x43aa;(function(_0x590733,_0x22ba8e){const _0x570ba2=a51_0x43aa,_0x14e57f=_0x590733();while(!![]){try{const _0x1f87c2=parseInt(_0x570ba2(0x1e6))/0x1+parseInt(_0x570ba2(0x1f4))/0x2*(parseInt(_0x570ba2(0x1f2))/0x3)+parseInt(_0x570ba2(0x1f3))/0x4+parseInt(_0x570ba2(0x1ec))/0x5+parseInt(_0x570ba2(0x204))/0x6*(parseInt(_0x570ba2(0x1e7))/0x7)+-parseInt(_0x570ba2(0x1f7))/0x8*(-parseInt(_0x570ba2(0x207))/0x9)+-parseInt(_0x570ba2(0x202))/0xa*(parseInt(_0x570ba2(0x206))/0xb);if(_0x1f87c2===_0x22ba8e)break;else _0x14e57f['push'](_0x14e57f['shift']());}catch(_0x12ba36){_0x14e57f['push'](_0x14e57f['shift']());}}}(a51_0x5575,0x42878));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x490651(0x1e3)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x490651(0x1fb),a51_0x490651(0x1f8)]);async function execute(_0x325ba1){const _0x3d7567=a51_0x490651,_0x3a9ef0=_0x325ba1['args'][0x0]?.[_0x3d7567(0x1e5)]();if(!_0x3a9ef0)throw CliErrors[_0x3d7567(0x1f9)](_0x3d7567(0x1f1),_0x3d7567(0x1f6)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x3a9ef0===_0x3d7567(0x201))throw CliErrors[_0x3d7567(0x1f9)](_0x3d7567(0x205));if(!isTopLevelConfigKey(_0x3a9ef0)&&!EXTRA_DELETABLE_KEYS[_0x3d7567(0x1e4)](_0x3a9ef0)&&!LEGACY_DELETABLE_KEYS[_0x3d7567(0x1e4)](_0x3a9ef0))throw CliErrors['validation'](_0x3d7567(0x1ea)+_0x3a9ef0+'\x22\x20is\x20not\x20deletable.','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x2793e7=resolveWriteScope({'global':_0x325ba1[_0x3d7567(0x1fc)](_0x3d7567(0x1ee))}),_0x1699b7=readScopedConfig(_0x2793e7),_0x35137a=Object[_0x3d7567(0x1fe)][_0x3d7567(0x1f5)][_0x3d7567(0x1ef)](_0x1699b7,_0x3a9ef0);_0x35137a&&(delete _0x1699b7[_0x3a9ef0],writeScopedConfig(_0x1699b7,_0x2793e7));const _0xdcf0b8=_0x2793e7===_0x3d7567(0x1ee)?_0x3d7567(0x1ff):_0x3d7567(0x1f0);return{'ok':!![],'message':_0x35137a?'✓\x20'+_0xdcf0b8+'\x20'+_0x3a9ef0+_0x3d7567(0x1eb):'✓\x20'+_0xdcf0b8+'\x20'+_0x3a9ef0+_0x3d7567(0x1fa),'data':{'key':_0x3a9ef0,'scope':_0x2793e7,'changed':_0x35137a}};}function a51_0x5575(){const _0x1c9564=['28890AgVsYm','inherit','has','trim','78952tCAtqX','1967YcNJIs','config','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Top-level\x20key\x20\x22','\x20deleted','1937015HsDleO','boolean','global','call','Project','Missing\x20key\x20argument.','9HytHHq','1500540YUsYEs','107726esrOOn','hasOwnProperty','Usage:\x20','408psispc','routing','validation','\x20already\x20absent','defaultApp','bool','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','prototype','Global','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','riskLevel','10covRPX','key','5532aeXXTJ','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','12687037xXZtPO'];a51_0x5575=function(){return _0x1c9564;};return a51_0x5575();}export const configDeleteDefinition={'service':a51_0x490651(0x1e8),'command':'delete','description':a51_0x490651(0x1e9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x490651(0x203),'description':a51_0x490651(0x1fd),'required':!![]}],'flags':[{'name':'global','type':a51_0x490651(0x1ed),'description':a51_0x490651(0x200),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x5979(_0x11099e,_0x7b1a3a){_0x11099e=_0x11099e-0x121;const _0x5da210=a52_0x5da2();let _0x5979bc=_0x5da210[_0x11099e];return _0x5979bc;}const a52_0x3fe3a1=a52_0x5979;(function(_0x5ce662,_0x3fea51){const _0x1d40fb=a52_0x5979,_0x191e13=_0x5ce662();while(!![]){try{const _0x182a87=-parseInt(_0x1d40fb(0x12e))/0x1*(-parseInt(_0x1d40fb(0x127))/0x2)+-parseInt(_0x1d40fb(0x125))/0x3*(-parseInt(_0x1d40fb(0x12b))/0x4)+parseInt(_0x1d40fb(0x12c))/0x5*(parseInt(_0x1d40fb(0x12f))/0x6)+-parseInt(_0x1d40fb(0x124))/0x7+parseInt(_0x1d40fb(0x137))/0x8*(parseInt(_0x1d40fb(0x128))/0x9)+parseInt(_0x1d40fb(0x131))/0xa*(-parseInt(_0x1d40fb(0x123))/0xb)+-parseInt(_0x1d40fb(0x13a))/0xc*(parseInt(_0x1d40fb(0x121))/0xd);if(_0x182a87===_0x3fea51)break;else _0x191e13['push'](_0x191e13['shift']());}catch(_0x376350){_0x191e13['push'](_0x191e13['shift']());}}}(a52_0x5da2,0xee96a));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a52_0x5da2(){const _0x18d848=['223598mTFqlt','5856iuAAfT','str','850eGnyLz','key','validation','\x20config\x20get\x20--key\x20<key>','config','Missing\x20key.','344OJzVHv','app','Get\x20a\x20config\x20value\x20by\x20key','48dpBKFU','3343886JPhuDA','string','6677XtLvUE','8421861clHllX','12udhDhr','appcode','8ezjZoB','374148ffczeS','object','Key\x20not\x20found:\x20','205068oQDQIR','1915zdKfuc','Usage:\x20'];a52_0x5da2=function(){return _0x18d848;};return a52_0x5da2();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x22408f){const _0x360b5a=a52_0x5979,_0x29f60d=_0x22408f[_0x360b5a(0x130)]('key');if(!_0x29f60d)throw CliErrors[_0x360b5a(0x133)](_0x360b5a(0x136),_0x360b5a(0x12d)+CLI_BIN_NAME+_0x360b5a(0x134));const _0x35b9b8=readConfig(),_0x321e3b=_0x29f60d===_0x360b5a(0x138)?_0x360b5a(0x126):_0x29f60d,_0x53add0=_0x35b9b8[_0x321e3b];if(_0x53add0===undefined)throw CliErrors[_0x360b5a(0x133)](_0x360b5a(0x12a)+_0x29f60d);return{'ok':!![],'data':typeof _0x53add0===_0x360b5a(0x129)?_0x53add0:{[_0x321e3b]:_0x53add0},'message':typeof _0x53add0==='object'?undefined:String(_0x53add0)};}export const configGetDefinition={'service':a52_0x3fe3a1(0x135),'command':'get','description':a52_0x3fe3a1(0x139),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x3fe3a1(0x132),'type':a52_0x3fe3a1(0x122),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4678ca,_0x4f699c){const _0xe0a53e=a53_0x8b1a,_0x41e8a5=_0x4678ca();while(!![]){try{const _0x317c85=parseInt(_0xe0a53e(0x1e9))/0x1+parseInt(_0xe0a53e(0x1ed))/0x2+parseInt(_0xe0a53e(0x1eb))/0x3+-parseInt(_0xe0a53e(0x1ec))/0x4+parseInt(_0xe0a53e(0x1ea))/0x5*(-parseInt(_0xe0a53e(0x1f1))/0x6)+-parseInt(_0xe0a53e(0x1ee))/0x7*(-parseInt(_0xe0a53e(0x1f0))/0x8)+-parseInt(_0xe0a53e(0x1ef))/0x9;if(_0x317c85===_0x4f699c)break;else _0x41e8a5['push'](_0x41e8a5['shift']());}catch(_0x59ee3){_0x41e8a5['push'](_0x41e8a5['shift']());}}}(a53_0x112b,0x36f2c));function a53_0x112b(){const _0x13f8ba=['468WTKmmV','6461wTCkZy','3030fnqDMR','468216yUXDNc','764992pxdAML','558378JJORhK','1729laltvw','1695015DgqmXG','6808wJlltL'];a53_0x112b=function(){return _0x13f8ba;};return a53_0x112b();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a53_0x8b1a(_0x2d6fb0,_0x35196f){_0x2d6fb0=_0x2d6fb0-0x1e9;const _0x112b92=a53_0x112b();let _0x8b1a72=_0x112b92[_0x2d6fb0];return _0x8b1a72;}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a54_0x10c9db=a54_0x3cd8;(function(_0x59a052,_0x30d790){const _0x505856=a54_0x3cd8,_0x163863=_0x59a052();while(!![]){try{const _0xae7b5a=-parseInt(_0x505856(0x84))/0x1+parseInt(_0x505856(0x77))/0x2+parseInt(_0x505856(0x79))/0x3*(-parseInt(_0x505856(0x9d))/0x4)+parseInt(_0x505856(0xa5))/0x5*(-parseInt(_0x505856(0x7d))/0x6)+parseInt(_0x505856(0x9a))/0x7*(-parseInt(_0x505856(0xa9))/0x8)+parseInt(_0x505856(0x9f))/0x9*(-parseInt(_0x505856(0x78))/0xa)+-parseInt(_0x505856(0x80))/0xb*(-parseInt(_0x505856(0xa0))/0xc);if(_0xae7b5a===_0x30d790)break;else _0x163863['push'](_0x163863['shift']());}catch(_0xac9f28){_0x163863['push'](_0x163863['shift']());}}}(a54_0x5296,0x979e9));import{select}from'@inquirer/prompts';function a54_0x5296(){const _0x2491f5=['Custom\x20User\x20HTTPS\x20origin','certificate-domain','Custom\x20certificate\x20service\x20HTTPS\x20origin','Custom\x20platform\x20API\x20HTTPS\x20origin','user-domain','626422wOSczj','3630MTPrZs','285PhjDso','api-domain','string','cancelled','6HtQWeV','name','domains','218911FkZguE','config','region','domain-config','918218wshZfX','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','nonInteractive','keys','project','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','mode','init','Custom\x20SkillHub\x20HTTPS\x20origin','routing','cdn','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','Select\x20Lovrabet\x20region','Custom\x20knowledge-base\x20HTTPS\x20origin','map','write','str','runtime-domain','ExitPromptError','Official\x20Lovrabet\x20region:\x20','global','assign','210UoIhfM','independent','Custom\x20Runtime\x20HTTPS\x20origin','36984bDtVVW','bool','21933tKRnKM','2328sMLUze','local-domain','Independent-deployment\x20Domain\x20JSON\x20file','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','join','1527515KMTtxu','certificateDomain','validation','Custom\x20local\x20callback\x20HTTPS\x20origin','151000scwDJb','enterprise-v1','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','label','official','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.'];a54_0x5296=function(){return _0x2491f5;};return a54_0x5296();}function a54_0x3cd8(_0x49eafd,_0x1023dc){_0x49eafd=_0x49eafd-0x71;const _0x5296b2=a54_0x5296();let _0x3cd899=_0x5296b2[_0x49eafd];return _0x3cd899;}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a54_0x10c9db(0x82),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x97)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x10c9db(0x83),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0xa2)},{'name':a54_0x10c9db(0x76),'type':'string','description':a54_0x10c9db(0x72)},{'name':a54_0x10c9db(0x7a),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x75)},{'name':a54_0x10c9db(0x95),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x9c)},{'name':'skill-domain','type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x8c)},{'name':'kb-domain','type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x91)},{'name':'app-domain','type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x85)},{'name':a54_0x10c9db(0xa1),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0xa8)},{'name':a54_0x10c9db(0x73),'type':a54_0x10c9db(0x7b),'description':a54_0x10c9db(0x74)}];async function resolveRegion(_0x545aa2){const _0x29c5c2=a54_0x10c9db,_0xedaabf=_0x545aa2[_0x29c5c2(0x94)]('region');if(_0xedaabf){if(!isEnabledLovrabetRegion(_0xedaabf))throw CliErrors[_0x29c5c2(0xa7)]('Region\x20\x22'+_0xedaabf+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x29c5c2(0xa4)](',\x20'));return _0xedaabf;}if(_0x545aa2[_0x29c5c2(0x86)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x29c5c2(0x90),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x29c5c2(0x92)](_0x217b30=>({'name':getOfficialRoutingProfile(_0x217b30)[_0x29c5c2(0xac)]+'\x20('+_0x217b30+')','value':_0x217b30}))});}catch(_0x58a97f){if(_0x58a97f?.[_0x29c5c2(0x7e)]===_0x29c5c2(0x96))throw CliErrors[_0x29c5c2(0x7c)]();throw _0x58a97f;}}export async function executeConfigInit(_0x342ded){const _0x259c3d=a54_0x10c9db,_0x38fc1c=resolveDomainConfigInput(_0x342ded),_0xb77e8d=_0x38fc1c[_0x259c3d(0x7f)],_0x3325b3=Object[_0x259c3d(0x87)](_0xb77e8d)['length']>0x0;if(_0x3325b3&&_0x342ded[_0x259c3d(0x94)](_0x259c3d(0x82)))throw CliErrors[_0x259c3d(0xa7)](_0x259c3d(0x71));if(!!_0xb77e8d['localDomain']!==!!_0xb77e8d[_0x259c3d(0xa6)])throw CliErrors[_0x259c3d(0xa7)](_0x259c3d(0xa3));const _0x55131e=_0x342ded[_0x259c3d(0x9e)](_0x259c3d(0x98))?_0x259c3d(0x98):_0x259c3d(0x88),_0x335a9f=readScopedConfig(_0x55131e);for(const _0x4c9842 of DOMAIN_CONFIG_FIELDS)delete _0x335a9f[_0x4c9842];for(const _0x3939db of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x335a9f[_0x3939db];delete _0x335a9f[_0x259c3d(0x8d)];let _0x2eda08=null;if(_0x3325b3)delete _0x335a9f['region'],_0x38fc1c[_0x259c3d(0x8a)]===_0x259c3d(0xaa)?_0x335a9f[_0x259c3d(0x8d)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x38fc1c['manifestDomains'],'cdn':_0x38fc1c['cdn']}:Object[_0x259c3d(0x99)](_0x335a9f,_0xb77e8d);else{_0x2eda08=await resolveRegion(_0x342ded);if(_0x2eda08===DEFAULT_LOVRABET_REGION)delete _0x335a9f[_0x259c3d(0x82)];else _0x335a9f['region']=_0x2eda08;}return writeScopedConfig(_0x335a9f,_0x55131e),{'ok':!![],'message':_0x3325b3?_0x259c3d(0xab)+Object[_0x259c3d(0x87)](_0x38fc1c[_0x259c3d(0x8a)]===_0x259c3d(0xaa)?_0x38fc1c['manifestDomains']:_0xb77e8d)['join'](',\x20')+'.':_0x259c3d(0x8f)+_0x2eda08+'.','data':{'mode':_0x3325b3?_0x259c3d(0x9b):_0x259c3d(0xad),'protocol':_0x38fc1c[_0x259c3d(0x8a)]===_0x259c3d(0xaa)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2eda08,'domains':_0xb77e8d,'cdn':_0x38fc1c['mode']===_0x259c3d(0xaa)?_0x38fc1c[_0x259c3d(0x8e)]:undefined}};}export const configInitDefinition={'service':a54_0x10c9db(0x81),'command':a54_0x10c9db(0x8b),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a54_0x10c9db(0x93),'confirmationDescription':a54_0x10c9db(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0x3d44(_0x407622,_0x4de3e2){_0x407622=_0x407622-0x80;const _0x31263c=a55_0x3126();let _0x3d447d=_0x31263c[_0x407622];return _0x3d447d;}const a55_0x32945b=a55_0x3d44;(function(_0x1cd34d,_0x2c083a){const _0x274d9b=a55_0x3d44,_0x57d3f4=_0x1cd34d();while(!![]){try{const _0xa7348d=parseInt(_0x274d9b(0x8e))/0x1*(-parseInt(_0x274d9b(0x8d))/0x2)+-parseInt(_0x274d9b(0x86))/0x3*(parseInt(_0x274d9b(0x84))/0x4)+-parseInt(_0x274d9b(0x89))/0x5+-parseInt(_0x274d9b(0x81))/0x6+-parseInt(_0x274d9b(0x8c))/0x7*(-parseInt(_0x274d9b(0x88))/0x8)+-parseInt(_0x274d9b(0x85))/0x9+parseInt(_0x274d9b(0x82))/0xa*(parseInt(_0x274d9b(0x83))/0xb);if(_0xa7348d===_0x2c083a)break;else _0x57d3f4['push'](_0x57d3f4['shift']());}catch(_0x13f795){_0x57d3f4['push'](_0x57d3f4['shift']());}}}(a55_0x3126,0x513b5));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x34b694){const _0x3f0a77=a55_0x3d44,_0x247574=_0x34b694['bool'](_0x3f0a77(0x8a))?readScopedConfig(_0x3f0a77(0x8a)):readConfig();return{'ok':!![],'data':_0x247574};}export const configListDefinition={'service':a55_0x32945b(0x8f),'command':a55_0x32945b(0x87),'description':a55_0x32945b(0x8b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x32945b(0x8a),'type':a55_0x32945b(0x80),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a55_0x3126(){const _0x379efa=['List\x20all\x20config\x20values','18487iumHED','2FvRaJZ','506458zqAQcu','config','boolean','3054774ACkrKu','2020gJEuwG','109307bFsgRE','236nthHYj','1634418KOpmpI','6792jqPObb','list','712FHFJhC','2894165dXmzff','global'];a55_0x3126=function(){return _0x379efa;};return a55_0x3126();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x189635=a56_0x56b6;(function(_0x857f33,_0x52ce6a){const _0x12660d=a56_0x56b6,_0x13f2e0=_0x857f33();while(!![]){try{const _0xb77102=parseInt(_0x12660d(0x129))/0x1+-parseInt(_0x12660d(0x14b))/0x2+parseInt(_0x12660d(0x12f))/0x3+-parseInt(_0x12660d(0x144))/0x4*(parseInt(_0x12660d(0x138))/0x5)+-parseInt(_0x12660d(0x125))/0x6+-parseInt(_0x12660d(0x145))/0x7+parseInt(_0x12660d(0x132))/0x8;if(_0xb77102===_0x52ce6a)break;else _0x13f2e0['push'](_0x13f2e0['shift']());}catch(_0x46c842){_0x13f2e0['push'](_0x13f2e0['shift']());}}}(a56_0x3211,0x3a7f0));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a56_0x3211(){const _0x5b1866=['value','keys','Usage:\x20','242189HlzAUf','str','env','\x20set\x20to:\x20','locale','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','1359189daGPIS','Settable\x20top-level\x20keys:\x20','config','4227216KZruXz','apps','Invalid\x20locale\x20value.','object','Project','Global','5RHUqug','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','string','Invalid\x20value\x20for\x20\x22','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Missing\x20key.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','key','includes','appcode','global','validation','1389004RCAzSO','980854okzHKg','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Top-level\x20key\x20\x22','app','bool','164526MijwDB','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x22\x20is\x20not\x20settable.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22.\x20Allowed:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','set','riskLevel','length','\x20appcode\x20set\x20to:\x20','`,\x20`','Use\x20`','2486508cPYFds'];a56_0x3211=function(){return _0x5b1866;};return a56_0x3211();}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x56b6(_0x28f5db,_0x2ebe0d){_0x28f5db=_0x28f5db-0x11e;const _0x32113d=a56_0x3211();let _0x56b6bc=_0x32113d[_0x28f5db];return _0x56b6bc;}async function execute(_0x331ca1){const _0x548f33=a56_0x56b6,_0x5886ed=_0x331ca1[_0x548f33(0x12a)]('key'),_0x4b6955=_0x331ca1[_0x548f33(0x12a)](_0x548f33(0x126));if(!_0x5886ed)throw CliErrors[_0x548f33(0x143)](_0x548f33(0x13d),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4b6955===undefined||_0x4b6955==='')throw CliErrors[_0x548f33(0x143)]('Missing\x20value.',_0x548f33(0x128)+CLI_BIN_NAME+_0x548f33(0x139));let _0x5618e4=_0x5886ed,_0x1ecec0=_0x4b6955;if(_0x4b6955['length']>0x1f4)throw CliErrors['validation'](_0x548f33(0x14e));if(_0x5886ed===_0x548f33(0x120))throw CliErrors[_0x548f33(0x143)](_0x548f33(0x146));if(!isTopLevelConfigKey(_0x5886ed))throw CliErrors['validation'](_0x548f33(0x148)+_0x5886ed+_0x548f33(0x14d),_0x548f33(0x130)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x5886ed]&&!CONFIG_ENUM_VALUES[_0x5886ed][_0x548f33(0x140)](_0x4b6955))throw CliErrors[_0x548f33(0x143)](_0x548f33(0x13b)+_0x5886ed+_0x548f33(0x14f)+CONFIG_ENUM_VALUES[_0x5886ed]['join'](',\x20'));if(_0x5886ed===_0x548f33(0x12d)&&!normalizeLocale(_0x4b6955))throw CliErrors[_0x548f33(0x143)](_0x548f33(0x134),_0x548f33(0x13e));DOMAIN_CONFIG_FIELDS['includes'](_0x5886ed)&&(_0x1ecec0=normalizeDomainOrigin(_0x5886ed,_0x4b6955));const _0x3d5c05={'global':_0x331ca1[_0x548f33(0x14a)]('global')},_0x1e55ed=resolveWriteScope(_0x3d5c05),_0xd86c5e=readScopedConfig(_0x1e55ed);_0x5886ed===_0x548f33(0x149)&&(_0x5618e4=_0x548f33(0x141),delete _0xd86c5e[_0x548f33(0x149)]);_0x5886ed===_0x548f33(0x12d)&&(_0x1ecec0=normalizeLocale(_0x4b6955));if(_0x5886ed===_0x548f33(0x12b)){_0x1ecec0=normalizeEnv(_0x4b6955);if(!isProduction(_0x1ecec0)&&!isDaily(_0x1ecec0))throw CliErrors[_0x548f33(0x143)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x548f33(0x11e));}if(_0x5886ed==='appcode'){const _0x1c8d62=_0xd86c5e['apps']&&typeof _0xd86c5e[_0x548f33(0x133)]===_0x548f33(0x135)?Object[_0x548f33(0x127)](_0xd86c5e['apps']):[];if(_0x1c8d62[_0x548f33(0x121)]>0x0)throw CliErrors['validation'](_0x548f33(0x13c),_0x548f33(0x124)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x1ecec0+_0x548f33(0x123)+CLI_BIN_NAME+_0x548f33(0x12e));const _0x4d57e7=buildCanonicalProjectConfig({..._0xd86c5e},{'appCodes':[_0x1ecec0],'env':typeof _0xd86c5e['env']===_0x548f33(0x13a)?_0xd86c5e[_0x548f33(0x12b)]:undefined});writeScopedConfig(_0x4d57e7,_0x1e55ed);const _0xda4304=_0x1e55ed===_0x548f33(0x142)?_0x548f33(0x137):_0x548f33(0x136);return{'ok':!![],'message':'✓\x20'+_0xda4304+_0x548f33(0x122)+_0x1ecec0+_0x548f33(0x147)};}_0xd86c5e[_0x5618e4]=_0x1ecec0,writeScopedConfig(_0xd86c5e,_0x1e55ed);const _0x461aeb=_0x1e55ed===_0x548f33(0x142)?_0x548f33(0x137):_0x548f33(0x136);return{'ok':!![],'message':'✓\x20'+_0x461aeb+'\x20'+_0x5618e4+_0x548f33(0x12c)+_0x1ecec0};}export const configSetDefinition={'service':a56_0x189635(0x131),'command':a56_0x189635(0x11f),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x189635(0x13f),'type':a56_0x189635(0x13a),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x189635(0x126),'type':a56_0x189635(0x13a),'description':'Config\x20value','required':!![]},{'name':'global','type':'boolean','description':a56_0x189635(0x14c),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x1856(){var _0x588d98=['36UgObTi','186746ovlFTz','411627ETEuep','project','730930WODCts','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','validation','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','global','12ywRXir','1344246yrujkS','351YOuSEx','89820rszvgK','1096992AtFxHb','622572vJhxFC'];a57_0x1856=function(){return _0x588d98;};return a57_0x1856();}(function(_0x498058,_0x5f25bf){var _0x4bc080=a57_0x39a9,_0x1d45ef=_0x498058();while(!![]){try{var _0x2d281f=parseInt(_0x4bc080(0x1d8))/0x1+parseInt(_0x4bc080(0x1e4))/0x2+parseInt(_0x4bc080(0x1db))/0x3*(-parseInt(_0x4bc080(0x1e3))/0x4)+-parseInt(_0x4bc080(0x1dd))/0x5+-parseInt(_0x4bc080(0x1d9))/0x6*(parseInt(_0x4bc080(0x1da))/0x7)+parseInt(_0x4bc080(0x1d7))/0x8+-parseInt(_0x4bc080(0x1e5))/0x9*(parseInt(_0x4bc080(0x1e6))/0xa);if(_0x2d281f===_0x5f25bf)break;else _0x1d45ef['push'](_0x1d45ef['shift']());}catch(_0x5a2f48){_0x1d45ef['push'](_0x1d45ef['shift']());}}}(a57_0x1856,0x58c78));function a57_0x39a9(_0x318e8e,_0x2e13b5){_0x318e8e=_0x318e8e-0x1d7;var _0x185625=a57_0x1856();var _0x39a937=_0x185625[_0x318e8e];return _0x39a937;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x2732b2){var _0x3d6b74=a57_0x39a9;if(_0x2732b2[_0x3d6b74(0x1e2)])return _0x3d6b74(0x1e2);if(!isInProject())throw CliErrors[_0x3d6b74(0x1df)](_0x3d6b74(0x1de),_0x3d6b74(0x1e0)+CLI_BIN_NAME+_0x3d6b74(0x1e1));return _0x3d6b74(0x1dc);}export function readScopedConfig(_0xf28f1e){return readConfigFile(resolveWriteConfigPath(_0xf28f1e));}export function writeScopedConfig(_0x29342a,_0xec4ab9){writeConfigFile(resolveWriteConfigPath(_0xec4ab9),_0x29342a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x2edd1a=a58_0x42a7;(function(_0x6db595,_0x32e30e){const _0x1c3887=a58_0x42a7,_0x51d467=_0x6db595();while(!![]){try{const _0x367a3c=parseInt(_0x1c3887(0x1d8))/0x1+-parseInt(_0x1c3887(0x211))/0x2+-parseInt(_0x1c3887(0x213))/0x3+-parseInt(_0x1c3887(0x1d7))/0x4*(parseInt(_0x1c3887(0x218))/0x5)+-parseInt(_0x1c3887(0x1d4))/0x6+-parseInt(_0x1c3887(0x1ec))/0x7*(-parseInt(_0x1c3887(0x1df))/0x8)+-parseInt(_0x1c3887(0x1fc))/0x9*(-parseInt(_0x1c3887(0x1f9))/0xa);if(_0x367a3c===_0x32e30e)break;else _0x51d467['push'](_0x51d467['shift']());}catch(_0x4bfb06){_0x51d467['push'](_0x51d467['shift']());}}}(a58_0x22c3,0x2b4db));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x2edd1a(0x1de),METADATA_BACKEND_PATH=a58_0x2edd1a(0x223),UNGROUPED_BUSINESS_GROUP=a58_0x2edd1a(0x1eb);function a58_0x22c3(){const _0x248439=['modelId','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','expect-business-group','trim','ungrouped','673666TVisxM','appCode','--code\x20is\x20required','tableName','str','backend','datasetCode','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','businessGroup','hasOwnProperty','value','stringify','Update\x20business\x20scenario\x20group','14030fQlMdz','object','dbLinkId','6507EdJrcG','metadata','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','keys','sourceType','write','dbTableSelector','found','path','datasetName','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','isFinite','apiError','datasetId','message','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','dataset','--business-group\x20is\x20required','modelCode','expectBusinessGroup','prototype','654008klbDIT','isArray','730059ZJVjrZ','string',',\x20actual\x20','call','source','1472825fdgKsM','name','POST','--business-group\x20must\x20not\x20be\x20blank','matched','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20','payload','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','METADATA','/smartapi/question/er-config/business-group/edit','kind','data','1859322erMiFj','number','toUpperCase','4Lkfqhv','241573eMFgIB','validation','db-table','extend','dbId','business-group','/smartapi/dblink/updateTableBusinessGroup','8KltVel','update','method','code','DB_TABLE','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','length','parse'];a58_0x22c3=function(){return _0x248439;};return a58_0x22c3();}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x9dd915,input:_0x130b40,dryRun:_0x29d152}){const _0xceb1f=a58_0x2edd1a;validateInput(_0x130b40);const _0x244f7f=normalizeBusinessGroupArgument(_0x130b40[_0xceb1f(0x1f4)]),_0x358baa=await getDatasetDetail(_0x130b40['code']),_0x2e769f=resolveBusinessGroupDataset(_0x358baa,_0x130b40['code']);assertBusinessGroupUpdateSupported(_0x2e769f,_0x244f7f);const _0x424819=loadCurrentBusinessGroup(_0x358baa,_0x2e769f);assertExpectedBusinessGroup(_0x424819,_0x130b40[_0xceb1f(0x20f)]);const _0x1411e6=buildBackendPlan(_0x9dd915,_0x2e769f,_0x244f7f),_0x36a67a=_0x424819!==_0x244f7f;let _0x578f95;if(_0x36a67a&&!_0x29d152){_0x1411e6[_0xceb1f(0x224)]===_0xceb1f(0x1da)?await updateDbTableBusinessGroup(_0x1411e6[_0xceb1f(0x220)]):await updateErBusinessGroup(_0x1411e6[_0xceb1f(0x220)]);const _0x25b614=await getDatasetDetail(_0x2e769f[_0xceb1f(0x1e2)]),_0x484926=resolveBusinessGroupDataset(_0x25b614,_0x2e769f[_0xceb1f(0x1e2)]),_0x3b52b7=loadCurrentBusinessGroup(_0x25b614,_0x484926);if(_0x3b52b7!==_0x244f7f)throw CliErrors[_0xceb1f(0x208)](_0xceb1f(0x21e),_0xceb1f(0x21f)+JSON[_0xceb1f(0x1f7)](displayBusinessGroup(_0x244f7f))+_0xceb1f(0x215)+JSON[_0xceb1f(0x1f7)](displayBusinessGroup(_0x3b52b7))+'.');_0x578f95={'verified':!![],'status':_0xceb1f(0x21c),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3b52b7)}};}else!_0x36a67a&&(_0x578f95={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x424819)}});const _0x185401={'operation':_0xceb1f(0x1e0),'appCode':_0x9dd915,'selector':{'code':_0x2e769f['code']},'dataset':{'id':_0x2e769f['id'],'code':_0x2e769f[_0xceb1f(0x1e2)],'name':_0x2e769f[_0xceb1f(0x219)],'sourceType':_0x2e769f[_0xceb1f(0x200)]},'before':{'businessGroup':displayBusinessGroup(_0x424819)},'after':{'businessGroup':displayBusinessGroup(_0x244f7f)},'changed':_0x36a67a,'dryRun':_0x29d152,'submitted':_0x36a67a&&!_0x29d152,'backend':{'method':_0x1411e6[_0xceb1f(0x1e1)],'path':_0x1411e6[_0xceb1f(0x204)],'payload':_0x1411e6[_0xceb1f(0x220)]},..._0x578f95?{'verification':_0x578f95}:{},'warnings':[]};return{'ok':!![],'data':_0x185401,'message':_0x36a67a?_0x29d152?_0xceb1f(0x1fe)+_0x2e769f[_0xceb1f(0x1e2)]:_0xceb1f(0x21d)+_0x2e769f[_0xceb1f(0x1e2)]:_0xceb1f(0x20b)+_0x2e769f['code']};}export const datasetBusinessGroupUpdate={'service':a58_0x2edd1a(0x20c),'command':'business-group-update','description':a58_0x2edd1a(0x1f8),'risk':a58_0x2edd1a(0x201),'flags':[CODE_FLAG,{'name':a58_0x2edd1a(0x1dd),'type':a58_0x2edd1a(0x214),'required':!![],'description':a58_0x2edd1a(0x1e8)},{'name':a58_0x2edd1a(0x1e9),'type':a58_0x2edd1a(0x214),'required':![],'description':a58_0x2edd1a(0x206)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x10ae8f){validateInput(readBusinessGroupUpdateInput(_0x10ae8f));},async 'dryRun'(_0x3d76d5){const _0xac0f5a=a58_0x2edd1a,_0x2a8bf9=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3d76d5[_0xac0f5a(0x1ed)],'input':readBusinessGroupUpdateInput(_0x3d76d5),'dryRun':!![]});return{'method':_0x2a8bf9[_0xac0f5a(0x1d3)]['backend']['method'],'url':_0x2a8bf9['data'][_0xac0f5a(0x1f1)][_0xac0f5a(0x204)],'body':_0x2a8bf9['data'][_0xac0f5a(0x1f1)][_0xac0f5a(0x220)],'description':_0x2a8bf9[_0xac0f5a(0x20a)],..._0x2a8bf9[_0xac0f5a(0x1d3)]};},async 'execute'(_0x456d78){const _0x1a51b5=a58_0x2edd1a;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x456d78[_0x1a51b5(0x1ed)],'input':readBusinessGroupUpdateInput(_0x456d78),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2e3dc3){const _0x3a5d66=a58_0x2edd1a,_0x30bb35=_0x2e3dc3[_0x3a5d66(0x1f0)](_0x3a5d66(0x1e9));return{'code':trim(_0x2e3dc3[_0x3a5d66(0x1f0)](_0x3a5d66(0x1e2))),'businessGroup':_0x2e3dc3['str'](_0x3a5d66(0x1dd)),'expectBusinessGroup':_0x30bb35===undefined||_0x30bb35===''?undefined:_0x30bb35};}function validateInput(_0x24f837){const _0x3aef4a=a58_0x2edd1a;if(!trim(_0x24f837[_0x3aef4a(0x1e2)]))throw CliErrors[_0x3aef4a(0x1d9)](_0x3aef4a(0x1ee));if(_0x24f837[_0x3aef4a(0x1f4)]===undefined)throw CliErrors['validation'](_0x3aef4a(0x20d));if(!trim(_0x24f837[_0x3aef4a(0x1f4)]))throw CliErrors[_0x3aef4a(0x1d9)](_0x3aef4a(0x21b));}function assertBusinessGroupUpdateSupported(_0x1ff37a,_0x1d00bf){const _0x207a4d=a58_0x2edd1a;if(_0x1ff37a[_0x207a4d(0x200)]==='DB_TABLE'&&!_0x1d00bf)throw CliErrors[_0x207a4d(0x1d9)](_0x207a4d(0x1f3));}function resolveBusinessGroupDataset(_0x4c099e,_0x32b9d3){const _0x27c64a=a58_0x2edd1a,_0xc36e67=asPlainObject(_0x4c099e[_0x27c64a(0x20c)]),_0x3690a6=asPlainObject(_0x4c099e['dbtableConfig']),_0x4f92ec=resolveSourceType(_0x4c099e,_0xc36e67,_0x3690a6),_0x45a0dd=firstString(_0x4c099e[_0x27c64a(0x20e)],_0x4c099e[_0x27c64a(0x1e2)],_0xc36e67[_0x27c64a(0x1f2)],_0x32b9d3)||_0x32b9d3;return{'id':firstNumber(_0x4c099e['modelId'],_0x4c099e['id'],_0xc36e67[_0x27c64a(0x209)])??firstString(_0x4c099e[_0x27c64a(0x1e7)],_0x4c099e['id'],_0xc36e67['datasetId'])??null,'code':_0x45a0dd,'name':firstString(_0x4c099e[_0x27c64a(0x219)],_0xc36e67[_0x27c64a(0x205)],_0xc36e67[_0x27c64a(0x219)])||null,'sourceType':_0x4f92ec,'dbTableSelector':_0x4f92ec===_0x27c64a(0x1e3)?{'dbLinkId':firstNumber(_0x3690a6[_0x27c64a(0x1dc)]),'tableName':firstString(_0x3690a6['tableName'])||null}:null};}function resolveSourceType(_0x390762,_0x2546fb,_0x14a1a1){const _0x361bcd=a58_0x2edd1a,_0x57b69b=firstString(_0x390762[_0x361bcd(0x217)],_0x390762[_0x361bcd(0x200)],_0x2546fb[_0x361bcd(0x217)],_0x2546fb[_0x361bcd(0x200)])?.[_0x361bcd(0x1ea)]()[_0x361bcd(0x1d6)]();if(_0x57b69b===_0x361bcd(0x1e3)||_0x57b69b===_0x361bcd(0x222))return _0x57b69b;if(Object[_0x361bcd(0x1ff)](_0x14a1a1)[_0x361bcd(0x1e5)]>0x0)return _0x361bcd(0x1e3);throw CliErrors[_0x361bcd(0x1d9)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x3a2647,_0x551c2e){const _0x58edc9=a58_0x2edd1a,_0x51d71b=readBusinessGroupFromDatasetDetail(_0x3a2647,_0x551c2e['sourceType']);if(_0x51d71b[_0x58edc9(0x203)])return normalizeBusinessGroup(_0x51d71b[_0x58edc9(0x1f6)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3aaebc,_0x360e8a){const _0x52fa4f=a58_0x2edd1a,_0x16457b=asPlainObject(_0x3aaebc[_0x52fa4f(0x20c)]),_0x194c5a=firstPresent(_0x3aaebc[_0x52fa4f(0x1f4)]);if(_0x194c5a['found'])return _0x194c5a;const _0x293b00=firstPresent(_0x16457b[_0x52fa4f(0x1f4)]);if(_0x293b00[_0x52fa4f(0x203)])return _0x293b00;if(_0x360e8a===_0x52fa4f(0x1e3))return{'found':![]};const _0x3d9ad4=readBusinessGroupFromExtend(_0x3aaebc[_0x52fa4f(0x1db)]);if(_0x3d9ad4[_0x52fa4f(0x203)])return _0x3d9ad4;return readBusinessGroupFromExtend(_0x16457b[_0x52fa4f(0x1db)]);}function readBusinessGroupFromExtend(_0x5c0afd){const _0x457606=a58_0x2edd1a;if(_0x5c0afd===undefined||_0x5c0afd===null||_0x5c0afd==='')return{'found':![]};if(typeof _0x5c0afd===_0x457606(0x214))try{const _0x5cc77f=JSON[_0x457606(0x1e6)](_0x5c0afd);return readBusinessGroupFromExtend(_0x5cc77f);}catch{return{'found':![]};}const _0x4eb3bb=asPlainObject(_0x5c0afd);if(Object[_0x457606(0x210)][_0x457606(0x1f5)][_0x457606(0x216)](_0x4eb3bb,'businessGroup'))return{'found':!![],'value':_0x4eb3bb['businessGroup']};return{'found':![]};}function firstPresent(..._0x2f7b88){for(const _0x41c3a8 of _0x2f7b88){if(_0x41c3a8!==undefined&&_0x41c3a8!==null)return{'found':!![],'value':_0x41c3a8};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3ccbd9,_0x48f120){const _0x43679e=a58_0x2edd1a;if(_0x48f120===undefined)return;const _0x53afa7=normalizeBusinessGroupArgument(_0x48f120);if(_0x3ccbd9!==_0x53afa7)throw CliErrors[_0x43679e(0x1d9)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON['stringify'](_0x53afa7)+_0x43679e(0x215)+JSON[_0x43679e(0x1f7)](_0x3ccbd9));}function buildBackendPlan(_0x4be4bd,_0x143c03,_0x35a2df){const _0x155daf=a58_0x2edd1a;if(_0x143c03[_0x155daf(0x200)]===_0x155daf(0x1e3)){if(!_0x143c03[_0x155daf(0x202)]||_0x143c03[_0x155daf(0x202)][_0x155daf(0x1fb)]===null||!_0x143c03[_0x155daf(0x202)][_0x155daf(0x1ef)])throw CliErrors[_0x155daf(0x1d9)](_0x155daf(0x221),_0x155daf(0x1e4));return{'kind':_0x155daf(0x1da),'method':_0x155daf(0x21a),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x143c03[_0x155daf(0x202)]['dbLinkId'],'tableName':_0x143c03[_0x155daf(0x202)]['tableName'],'businessGroup':_0x35a2df}};}return{'kind':_0x155daf(0x1fd),'method':_0x155daf(0x21a),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4be4bd,'datasetCode':_0x143c03['code'],'businessGroup':_0x35a2df}};}function normalizeBusinessGroup(_0xfbb491){const _0x43cc17=a58_0x2edd1a;if(_0xfbb491===undefined||_0xfbb491===null)return'';return String(_0xfbb491)[_0x43cc17(0x1ea)]();}function normalizeBusinessGroupArgument(_0x23f718){const _0x4b3487=normalizeBusinessGroup(_0x23f718);return _0x4b3487===UNGROUPED_BUSINESS_GROUP?'':_0x4b3487;}function displayBusinessGroup(_0x117d4a){return _0x117d4a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x494615){const _0x3db50b=a58_0x2edd1a;if(!_0x494615||typeof _0x494615!==_0x3db50b(0x1fa)||Array[_0x3db50b(0x212)](_0x494615))return{};return _0x494615;}function firstString(..._0x44b1a6){const _0x47d4a7=a58_0x2edd1a;for(const _0x18614f of _0x44b1a6){if(typeof _0x18614f===_0x47d4a7(0x214)&&_0x18614f['trim']())return _0x18614f[_0x47d4a7(0x1ea)]();if(typeof _0x18614f===_0x47d4a7(0x1d5)&&Number[_0x47d4a7(0x207)](_0x18614f))return String(_0x18614f);}return undefined;}function firstNumber(..._0x164ed6){const _0x3c6212=a58_0x2edd1a;for(const _0x146425 of _0x164ed6){if(typeof _0x146425==='number'&&Number[_0x3c6212(0x207)](_0x146425))return _0x146425;if(typeof _0x146425==='string'&&_0x146425['trim']()&&Number[_0x3c6212(0x207)](Number(_0x146425)))return Number(_0x146425);}return null;}function a58_0x42a7(_0x42ce3d,_0x49a8b8){_0x42ce3d=_0x42ce3d-0x1d3;const _0x22c36c=a58_0x22c3();let _0x42a744=_0x22c36c[_0x42ce3d];return _0x42a744;}function trim(_0x4056d3){return String(_0x4056d3||'')['trim']();}
|
|
1
|
+
const a58_0x454318=a58_0x589b;(function(_0x326a34,_0x316d12){const _0x141693=a58_0x589b,_0x4749d7=_0x326a34();while(!![]){try{const _0x1a2feb=parseInt(_0x141693(0x11c))/0x1+-parseInt(_0x141693(0xe0))/0x2*(-parseInt(_0x141693(0x105))/0x3)+parseInt(_0x141693(0x10f))/0x4*(parseInt(_0x141693(0xe7))/0x5)+parseInt(_0x141693(0xf4))/0x6*(parseInt(_0x141693(0xfa))/0x7)+-parseInt(_0x141693(0x112))/0x8+parseInt(_0x141693(0xff))/0x9*(parseInt(_0x141693(0xdd))/0xa)+parseInt(_0x141693(0xfc))/0xb*(-parseInt(_0x141693(0xe3))/0xc);if(_0x1a2feb===_0x316d12)break;else _0x4749d7['push'](_0x4749d7['shift']());}catch(_0x2fe4ea){_0x4749d7['push'](_0x4749d7['shift']());}}}(a58_0x45ab,0x1a011));function a58_0x589b(_0x38fdec,_0x4b4a4a){_0x38fdec=_0x38fdec-0xd2;const _0x45abaf=a58_0x45ab();let _0x589bb2=_0x45abaf[_0x38fdec];return _0x589bb2;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a58_0x45ab(){const _0x226051=['datasetId','db-table','data','33MRaXJD','object','METADATA','code','stringify','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','metadata','modelCode','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dbTableSelector','151284oJbMkD','toUpperCase','name','1676536SphjkQ',',\x20actual\x20','Expected\x20','--business-group\x20is\x20required','--business-group\x20must\x20not\x20be\x20blank','businessGroup','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Update\x20business\x20scenario\x20group','method','appCode','61997OZDhTC','string','ungrouped','value','matched','hasOwnProperty','expect-business-group','extend','source','business-group-update','datasetName','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','sourceType','986570VFDVtJ','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','--code\x20is\x20required','20062Dokbgx','tableName','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','32376OhZkGh','dataset','path','backend','10adocGx','POST','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','call','dbLinkId','str','modelId','DB_TABLE','payload','business-group','isFinite','validation','expectBusinessGroup','26394ulNvCY','/smartapi/dblink/updateTableBusinessGroup','found','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Expectation\x20mismatch\x20at\x20businessGroup','keys','63jrkwAt','dbtableConfig','286hRFCXA','apiError','trim','9CLfVZF','isArray','dbId'];a58_0x45ab=function(){return _0x226051;};return a58_0x45ab();}const DB_TABLE_BACKEND_PATH=a58_0x454318(0xf5),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x454318(0xd2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x53db66,input:_0x10a262,dryRun:_0x20e307}){const _0x1103e=a58_0x454318;validateInput(_0x10a262);const _0x14d38e=normalizeBusinessGroupArgument(_0x10a262[_0x1103e(0x117)]),_0x4db2f8=await getDatasetDetail(_0x10a262[_0x1103e(0x108)]),_0x56333b=resolveBusinessGroupDataset(_0x4db2f8,_0x10a262[_0x1103e(0x108)]);assertBusinessGroupUpdateSupported(_0x56333b,_0x14d38e);const _0x2df10d=loadCurrentBusinessGroup(_0x4db2f8,_0x56333b);assertExpectedBusinessGroup(_0x2df10d,_0x10a262[_0x1103e(0xf3)]);const _0x1164d0=buildBackendPlan(_0x53db66,_0x56333b,_0x14d38e),_0x4d813a=_0x2df10d!==_0x14d38e;let _0x5b1faa;if(_0x4d813a&&!_0x20e307){_0x1164d0['kind']==='db-table'?await updateDbTableBusinessGroup(_0x1164d0[_0x1103e(0xef)]):await updateErBusinessGroup(_0x1164d0[_0x1103e(0xef)]);const _0x11fe51=await getDatasetDetail(_0x56333b['code']),_0x4b520b=resolveBusinessGroupDataset(_0x11fe51,_0x56333b[_0x1103e(0x108)]),_0x3d7732=loadCurrentBusinessGroup(_0x11fe51,_0x4b520b);if(_0x3d7732!==_0x14d38e)throw CliErrors[_0x1103e(0xfd)](_0x1103e(0xe2),_0x1103e(0x114)+JSON['stringify'](displayBusinessGroup(_0x14d38e))+_0x1103e(0x113)+JSON[_0x1103e(0x109)](displayBusinessGroup(_0x3d7732))+'.');_0x5b1faa={'verified':!![],'status':_0x1103e(0xd4),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3d7732)}};}else!_0x4d813a&&(_0x5b1faa={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x2df10d)}});const _0x177a1d={'operation':'update','appCode':_0x53db66,'selector':{'code':_0x56333b[_0x1103e(0x108)]},'dataset':{'id':_0x56333b['id'],'code':_0x56333b[_0x1103e(0x108)],'name':_0x56333b[_0x1103e(0x111)],'sourceType':_0x56333b['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x2df10d)},'after':{'businessGroup':displayBusinessGroup(_0x14d38e)},'changed':_0x4d813a,'dryRun':_0x20e307,'submitted':_0x4d813a&&!_0x20e307,'backend':{'method':_0x1164d0[_0x1103e(0x11a)],'path':_0x1164d0[_0x1103e(0xe5)],'payload':_0x1164d0[_0x1103e(0xef)]},..._0x5b1faa?{'verification':_0x5b1faa}:{},'warnings':[]};return{'ok':!![],'data':_0x177a1d,'message':_0x4d813a?_0x20e307?'Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20'+_0x56333b['code']:_0x1103e(0xe9)+_0x56333b['code']:_0x1103e(0xf7)+_0x56333b[_0x1103e(0x108)]};}export const datasetBusinessGroupUpdate={'service':a58_0x454318(0xe4),'command':a58_0x454318(0xd9),'description':a58_0x454318(0x119),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x454318(0xf0),'type':'string','required':!![],'description':a58_0x454318(0x118)},{'name':a58_0x454318(0xd6),'type':a58_0x454318(0x11d),'required':![],'description':a58_0x454318(0x10a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1077a2){validateInput(readBusinessGroupUpdateInput(_0x1077a2));},async 'dryRun'(_0x3a4ef2){const _0x99336d=a58_0x454318,_0x260171=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3a4ef2[_0x99336d(0x11b)],'input':readBusinessGroupUpdateInput(_0x3a4ef2),'dryRun':!![]});return{'method':_0x260171[_0x99336d(0x104)][_0x99336d(0xe6)][_0x99336d(0x11a)],'url':_0x260171[_0x99336d(0x104)][_0x99336d(0xe6)][_0x99336d(0xe5)],'body':_0x260171[_0x99336d(0x104)]['backend'][_0x99336d(0xef)],'description':_0x260171['message'],..._0x260171[_0x99336d(0x104)]};},async 'execute'(_0x3c51b2){const _0x4a7e3c=a58_0x454318;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3c51b2[_0x4a7e3c(0x11b)],'input':readBusinessGroupUpdateInput(_0x3c51b2),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5e6dff){const _0x559b6c=a58_0x454318,_0x3e3e74=_0x5e6dff['str']('expect-business-group');return{'code':trim(_0x5e6dff[_0x559b6c(0xec)](_0x559b6c(0x108))),'businessGroup':_0x5e6dff[_0x559b6c(0xec)]('business-group'),'expectBusinessGroup':_0x3e3e74===undefined||_0x3e3e74===''?undefined:_0x3e3e74};}function validateInput(_0x3c2d51){const _0x4311e2=a58_0x454318;if(!trim(_0x3c2d51[_0x4311e2(0x108)]))throw CliErrors['validation'](_0x4311e2(0xdf));if(_0x3c2d51[_0x4311e2(0x117)]===undefined)throw CliErrors[_0x4311e2(0xf2)](_0x4311e2(0x115));if(!trim(_0x3c2d51[_0x4311e2(0x117)]))throw CliErrors[_0x4311e2(0xf2)](_0x4311e2(0x116));}function assertBusinessGroupUpdateSupported(_0xecea41,_0x55748c){const _0x3ef271=a58_0x454318;if(_0xecea41[_0x3ef271(0xdc)]===_0x3ef271(0xee)&&!_0x55748c)throw CliErrors[_0x3ef271(0xf2)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x441d9e,_0x3d5a98){const _0x21d2e7=a58_0x454318,_0x57f51e=asPlainObject(_0x441d9e['dataset']),_0x33f174=asPlainObject(_0x441d9e[_0x21d2e7(0xfb)]),_0x4de38b=resolveSourceType(_0x441d9e,_0x57f51e,_0x33f174),_0x2aacf1=firstString(_0x441d9e[_0x21d2e7(0x10c)],_0x441d9e[_0x21d2e7(0x108)],_0x57f51e['datasetCode'],_0x3d5a98)||_0x3d5a98;return{'id':firstNumber(_0x441d9e[_0x21d2e7(0xed)],_0x441d9e['id'],_0x57f51e[_0x21d2e7(0x102)])??firstString(_0x441d9e[_0x21d2e7(0xed)],_0x441d9e['id'],_0x57f51e[_0x21d2e7(0x102)])??null,'code':_0x2aacf1,'name':firstString(_0x441d9e[_0x21d2e7(0x111)],_0x57f51e[_0x21d2e7(0xda)],_0x57f51e[_0x21d2e7(0x111)])||null,'sourceType':_0x4de38b,'dbTableSelector':_0x4de38b===_0x21d2e7(0xee)?{'dbLinkId':firstNumber(_0x33f174[_0x21d2e7(0x101)]),'tableName':firstString(_0x33f174[_0x21d2e7(0xe1)])||null}:null};}function resolveSourceType(_0x35b0c0,_0x2fc670,_0x67439f){const _0xde0c52=a58_0x454318,_0x4cc520=firstString(_0x35b0c0[_0xde0c52(0xd8)],_0x35b0c0[_0xde0c52(0xdc)],_0x2fc670[_0xde0c52(0xd8)],_0x2fc670['sourceType'])?.[_0xde0c52(0xfe)]()[_0xde0c52(0x110)]();if(_0x4cc520==='DB_TABLE'||_0x4cc520===_0xde0c52(0x107))return _0x4cc520;if(Object[_0xde0c52(0xf9)](_0x67439f)['length']>0x0)return _0xde0c52(0xee);throw CliErrors[_0xde0c52(0xf2)](_0xde0c52(0xdb));}function loadCurrentBusinessGroup(_0x498b3a,_0x4b4b72){const _0x594e3d=a58_0x454318,_0x43fab8=readBusinessGroupFromDatasetDetail(_0x498b3a,_0x4b4b72[_0x594e3d(0xdc)]);if(_0x43fab8[_0x594e3d(0xf6)])return normalizeBusinessGroup(_0x43fab8[_0x594e3d(0xd3)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5b0b4e,_0x211f7f){const _0x32a098=a58_0x454318,_0x3eca52=asPlainObject(_0x5b0b4e[_0x32a098(0xe4)]),_0x21cba9=firstPresent(_0x5b0b4e['businessGroup']);if(_0x21cba9[_0x32a098(0xf6)])return _0x21cba9;const _0xa30f6b=firstPresent(_0x3eca52['businessGroup']);if(_0xa30f6b[_0x32a098(0xf6)])return _0xa30f6b;if(_0x211f7f===_0x32a098(0xee))return{'found':![]};const _0x4ab41d=readBusinessGroupFromExtend(_0x5b0b4e[_0x32a098(0xd7)]);if(_0x4ab41d[_0x32a098(0xf6)])return _0x4ab41d;return readBusinessGroupFromExtend(_0x3eca52[_0x32a098(0xd7)]);}function readBusinessGroupFromExtend(_0x1c3ecf){const _0x239651=a58_0x454318;if(_0x1c3ecf===undefined||_0x1c3ecf===null||_0x1c3ecf==='')return{'found':![]};if(typeof _0x1c3ecf===_0x239651(0x11d))try{const _0x233c1f=JSON['parse'](_0x1c3ecf);return readBusinessGroupFromExtend(_0x233c1f);}catch{return{'found':![]};}const _0x1ea734=asPlainObject(_0x1c3ecf);if(Object['prototype'][_0x239651(0xd5)][_0x239651(0xea)](_0x1ea734,_0x239651(0x117)))return{'found':!![],'value':_0x1ea734[_0x239651(0x117)]};return{'found':![]};}function firstPresent(..._0x120f1f){for(const _0x55047b of _0x120f1f){if(_0x55047b!==undefined&&_0x55047b!==null)return{'found':!![],'value':_0x55047b};}return{'found':![]};}function assertExpectedBusinessGroup(_0x46a487,_0x1a827f){const _0x1628ec=a58_0x454318;if(_0x1a827f===undefined)return;const _0x35bc24=normalizeBusinessGroupArgument(_0x1a827f);if(_0x46a487!==_0x35bc24)throw CliErrors[_0x1628ec(0xf2)](_0x1628ec(0xf8),_0x1628ec(0x114)+JSON['stringify'](_0x35bc24)+_0x1628ec(0x113)+JSON['stringify'](_0x46a487));}function buildBackendPlan(_0x2dd9ec,_0x19ad90,_0x16d946){const _0x400037=a58_0x454318;if(_0x19ad90[_0x400037(0xdc)]==='DB_TABLE'){if(!_0x19ad90[_0x400037(0x10e)]||_0x19ad90[_0x400037(0x10e)][_0x400037(0xeb)]===null||!_0x19ad90['dbTableSelector'][_0x400037(0xe1)])throw CliErrors[_0x400037(0xf2)](_0x400037(0x10d),_0x400037(0xde));return{'kind':_0x400037(0x103),'method':_0x400037(0xe8),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x19ad90[_0x400037(0x10e)]['dbLinkId'],'tableName':_0x19ad90['dbTableSelector'][_0x400037(0xe1)],'businessGroup':_0x16d946}};}return{'kind':_0x400037(0x10b),'method':_0x400037(0xe8),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x2dd9ec,'datasetCode':_0x19ad90[_0x400037(0x108)],'businessGroup':_0x16d946}};}function normalizeBusinessGroup(_0x506601){if(_0x506601===undefined||_0x506601===null)return'';return String(_0x506601)['trim']();}function normalizeBusinessGroupArgument(_0x2fa683){const _0x325e97=normalizeBusinessGroup(_0x2fa683);return _0x325e97===UNGROUPED_BUSINESS_GROUP?'':_0x325e97;}function displayBusinessGroup(_0x19ed3b){return _0x19ed3b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x5b6296){const _0x1e8e1b=a58_0x454318;if(!_0x5b6296||typeof _0x5b6296!==_0x1e8e1b(0x106)||Array[_0x1e8e1b(0x100)](_0x5b6296))return{};return _0x5b6296;}function firstString(..._0x74b6f7){const _0x2e8f18=a58_0x454318;for(const _0x29ac3b of _0x74b6f7){if(typeof _0x29ac3b===_0x2e8f18(0x11d)&&_0x29ac3b[_0x2e8f18(0xfe)]())return _0x29ac3b[_0x2e8f18(0xfe)]();if(typeof _0x29ac3b==='number'&&Number[_0x2e8f18(0xf1)](_0x29ac3b))return String(_0x29ac3b);}return undefined;}function firstNumber(..._0x10b73b){const _0x39b7f8=a58_0x454318;for(const _0x2d67a4 of _0x10b73b){if(typeof _0x2d67a4==='number'&&Number[_0x39b7f8(0xf1)](_0x2d67a4))return _0x2d67a4;if(typeof _0x2d67a4===_0x39b7f8(0x11d)&&_0x2d67a4[_0x39b7f8(0xfe)]()&&Number['isFinite'](Number(_0x2d67a4)))return Number(_0x2d67a4);}return null;}function trim(_0xb1d027){const _0x42c19f=a58_0x454318;return String(_0xb1d027||'')[_0x42c19f(0xfe)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a59_0x15f2c4=a59_0x5daf;(function(_0x4e901b,_0x19062e){const _0x1dc03b=a59_0x5daf,_0x5c5772=_0x4e901b();while(!![]){try{const _0x58e53a=-parseInt(_0x1dc03b(0x162))/0x1*(parseInt(_0x1dc03b(0x170))/0x2)+parseInt(_0x1dc03b(0x16c))/0x3*(parseInt(_0x1dc03b(0x171))/0x4)+parseInt(_0x1dc03b(0x15f))/0x5+parseInt(_0x1dc03b(0x161))/0x6+-parseInt(_0x1dc03b(0x168))/0x7*(-parseInt(_0x1dc03b(0x16b))/0x8)+parseInt(_0x1dc03b(0x163))/0x9+parseInt(_0x1dc03b(0x16d))/0xa*(-parseInt(_0x1dc03b(0x175))/0xb);if(_0x58e53a===_0x19062e)break;else _0x5c5772['push'](_0x5c5772['shift']());}catch(_0x12de23){_0x5c5772['push'](_0x5c5772['shift']());}}}(a59_0x25de,0x6cfc9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x5daf(_0x54cb87,_0x57cc90){_0x54cb87=_0x54cb87-0x15e;const _0x25de3c=a59_0x25de();let _0x5daf97=_0x25de3c[_0x54cb87];return _0x5daf97;}function a59_0x25de(){const _0x58615=['14128wjpumF','number','num','business-groups','33tuUkJC','map','appCode','businessGroup','505460smvoTs','DB_TABLE','1496310DJRndx','1UMwcJz','258291GdhFVz','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dbid','read','Found\x20','7YnjUId','ungrouped','trim','4399256RmOIKq','507HcbmIi','1173910bPTGwk','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','dataset','1454818aiczZK'];a59_0x25de=function(){return _0x58615;};return a59_0x25de();}export const datasetBusinessGroups={'service':a59_0x15f2c4(0x16f),'command':a59_0x15f2c4(0x174),'description':a59_0x15f2c4(0x16e),'risk':a59_0x15f2c4(0x166),'flags':[{'name':a59_0x15f2c4(0x165),'type':a59_0x15f2c4(0x172),'required':!![],'description':a59_0x15f2c4(0x164)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x44eded){const _0x41d3e9=a59_0x15f2c4,_0x56796a=_0x44eded[_0x41d3e9(0x173)](_0x41d3e9(0x165)),_0xd70b6=await getErBusinessGroupSummary(_0x44eded[_0x41d3e9(0x177)],_0x56796a),_0x2d9694=_0xd70b6['groups'][_0x41d3e9(0x176)](_0x572919=>({..._0x572919,'businessGroup':_0x572919[_0x41d3e9(0x15e)][_0x41d3e9(0x16a)]()||_0x41d3e9(0x169)}));return{'ok':!![],'data':{..._0xd70b6,'groups':_0x2d9694,'scope':_0x41d3e9(0x160)},'message':_0x41d3e9(0x167)+_0x2d9694['length']+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x56796a};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x1a237f=a60_0x4c6f;(function(_0x40a971,_0x116e9f){const _0x469797=a60_0x4c6f,_0x243e3b=_0x40a971();while(!![]){try{const _0x1a7782=parseInt(_0x469797(0x124))/0x1*(-parseInt(_0x469797(0x12c))/0x2)+parseInt(_0x469797(0x114))/0x3*(-parseInt(_0x469797(0x118))/0x4)+-parseInt(_0x469797(0x10b))/0x5+parseInt(_0x469797(0x113))/0x6+parseInt(_0x469797(0x117))/0x7+-parseInt(_0x469797(0x10d))/0x8+parseInt(_0x469797(0x120))/0x9*(parseInt(_0x469797(0x11d))/0xa);if(_0x1a7782===_0x116e9f)break;else _0x243e3b['push'](_0x243e3b['shift']());}catch(_0x2d01c9){_0x243e3b['push'](_0x243e3b['shift']());}}}(a60_0x4f7e,0xe6413));function a60_0x4c6f(_0x28812b,_0x51b5a6){_0x28812b=_0x28812b-0x108;const _0x4f7e87=a60_0x4f7e();let _0x4c6fee=_0x4f7e87[_0x28812b];return _0x4c6fee;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x1a237f(0x122),'filter':a60_0x1a237f(0x109),'getOne':a60_0x1a237f(0x11f)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x1a237f(0x11a);function valueToString(_0x4f6352){return _0x4f6352==null?'':String(_0x4f6352)['trim']();}function getDatasetCode(_0x185bf6){const _0x5e911c=a60_0x1a237f;return valueToString(_0x185bf6[_0x5e911c(0x108)]??_0x185bf6['modelCode']??_0x185bf6[_0x5e911c(0x129)]?.[_0x5e911c(0x12a)]);}function getDatasetName(_0x44995a){const _0x2fc9dc=a60_0x1a237f;return valueToString(_0x44995a[_0x2fc9dc(0x11c)]??_0x44995a[_0x2fc9dc(0x129)]?.[_0x2fc9dc(0x126)])||_0x2fc9dc(0x11b);}function getDatasetSource(_0x1909c){const _0x1278a0=a60_0x1a237f;return valueToString(_0x1909c[_0x1278a0(0x125)]??_0x1909c[_0x1278a0(0x129)]?.['sourceType'])[_0x1278a0(0x10e)]();}function getDbtableConfig(_0x29acdc){const _0x304999=a60_0x1a237f,_0xd42a38=_0x29acdc['dbtableConfig']??_0x29acdc[_0x304999(0x111)];return _0xd42a38&&typeof _0xd42a38===_0x304999(0x12d)?_0xd42a38:{};}export function isDbTableBackedDataset(_0x1de286){const _0x45a580=a60_0x1a237f,_0x3ff75a=getDatasetSource(_0x1de286);if(_0x3ff75a==='METADATA')return![];const _0x4e975e=getDbtableConfig(_0x1de286),_0xc5caaa=_0x4e975e[_0x45a580(0x12b)]??_0x4e975e['id'],_0x3d4354=valueToString(_0x4e975e[_0x45a580(0x112)]??_0x1de286[_0x45a580(0x112)]??_0x1de286[_0x45a580(0x129)]?.['tableName']);return _0xc5caaa!==undefined&&_0xc5caaa!==null&&_0x3d4354[_0x45a580(0x116)]>0x0;}function a60_0x4f7e(){const _0x967d10=['datasetCode','dbId','2RkWhnY','object','code','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','filter','2082710UrJNsg','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','6507960hSFhXL','toUpperCase','getOne','\x20is\x20','dbtable','tableName','2188362iXPKIr','471QgpeHu','UNKNOWN','length','362488qtvDba','45156FtQvJB','The\x20current\x20dataset\x20\x22','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','unknown','name','17037750UaAhkU','join','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','27FVAFSM','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','lovrabet','SQL\x20schema\x20validation','1582303tLIZBJ','source','datasetName','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','validation','dataset'];a60_0x4f7e=function(){return _0x967d10;};return a60_0x4f7e();}export function filterDbTableBackedDatasets(_0x1676d3){const _0x33c417=a60_0x1a237f;return _0x1676d3[_0x33c417(0x10a)](_0x115fec=>isDbTableBackedDataset(_0x115fec));}export function buildDbTableBackedRequirementMessage(_0x5e79f6,_0x2efb80=a60_0x1a237f(0x123)){const _0x4e43c1=a60_0x1a237f,_0x28484e=getDatasetSource(_0x5e79f6)||_0x4e43c1(0x115),_0x2ddd1e=getDatasetName(_0x5e79f6),_0x1705fa=getDatasetCode(_0x5e79f6),_0x2b2d18=_0x1705fa?'\x20('+_0x1705fa+')':'';return[_0x4e43c1(0x119)+_0x2ddd1e+'\x22'+_0x2b2d18+_0x4e43c1(0x110)+_0x28484e+_0x4e43c1(0x121)+_0x2efb80+'.',_0x4e43c1(0x127),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x4e43c1(0x10c)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x4e43c1(0x10f)]+'.'][_0x4e43c1(0x11e)]('\x20');}export function assertDatasetIsDbTableBacked(_0x42e662,_0x4c408a){const _0x3d6025=a60_0x1a237f;if(!isDbTableBackedDataset(_0x42e662))throw CliErrors[_0x3d6025(0x128)](buildDbTableBackedRequirementMessage(_0x42e662,_0x4c408a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x39f804=a61_0x1cb6;(function(_0x5ef687,_0x5784ae){const _0x27049d=a61_0x1cb6,_0x1f2ae9=_0x5ef687();while(!![]){try{const _0x138df4=-parseInt(_0x27049d(0x16d))/0x1*(-parseInt(_0x27049d(0x186))/0x2)+parseInt(_0x27049d(0x17f))/0x3*(-parseInt(_0x27049d(0x17c))/0x4)+parseInt(_0x27049d(0x165))/0x5+parseInt(_0x27049d(0x150))/0x6*(parseInt(_0x27049d(0x17b))/0x7)+-parseInt(_0x27049d(0x157))/0x8+-parseInt(_0x27049d(0x15e))/0x9+-parseInt(_0x27049d(0x18c))/0xa*(-parseInt(_0x27049d(0x169))/0xb);if(_0x138df4===_0x5784ae)break;else _0x1f2ae9['push'](_0x1f2ae9['shift']());}catch(_0x50c3c8){_0x1f2ae9['push'](_0x1f2ae9['shift']());}}}(a61_0x4e80,0xebee1));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x4e80(){const _0x28f9f5=['str','101545LQAUPV','type','add','/smartapi/dataset/delete?cascade=','22JVUxFz','deleted','length','No\x20undeleted\x20dataset\x20found\x20for\x20','1192738wsLgpO','Matched\x20','expected-count','true','isInteger','description','name','filter','number','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','dbName','\x20dataset(s);\x20','num','appCode','51709JsyIOO','98476nnwrTZ','dataset','rabetbase\x20page\x20restore\x20--id\x20','99mRYaAX','source','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','cascade','id=','dbid=','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','2oKtYyK','title','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','confirm','isArray','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','9570030YPMddf','bool','dbId','\x20--appcode\x20','high-risk-write','Required\x20to\x20execute\x20dataset\x20deletion','Deleted\x20','222MvJzFG','relatedPageInfoList','dbtableConfig','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','\x20dataset(s)','validation','false','12358896Nirrsc','push','Would\x20safely\x20delete\x20','object','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','dbid','690426HPpfTx','Would\x20delete\x20','code','delete','POST','boolean'];a61_0x4e80=function(){return _0x28f9f5;};return a61_0x4e80();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x39f804(0x175),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x39f804(0x15d),'type':a61_0x39f804(0x175),'description':a61_0x39f804(0x18b)},CONFIRM_FLAG={'name':'confirm','type':a61_0x39f804(0x163),'description':a61_0x39f804(0x14e)},CASCADE_FLAG={'name':'cascade','type':a61_0x39f804(0x163),'description':a61_0x39f804(0x153)},EXPECTED_COUNT_FLAG={'name':a61_0x39f804(0x16f),'type':a61_0x39f804(0x175),'description':a61_0x39f804(0x15c)};export const datasetDelete={'service':a61_0x39f804(0x17d),'command':a61_0x39f804(0x161),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a61_0x39f804(0x190),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1a90f5){const _0x2d61b7=a61_0x39f804,_0x1b2a76=_0x1a90f5[_0x2d61b7(0x179)]('id'),_0x212c04=_0x1a90f5[_0x2d61b7(0x164)]('code'),_0x1b005d=_0x1a90f5[_0x2d61b7(0x179)](_0x2d61b7(0x15d)),_0x509af3=[_0x1b2a76>0x0,Boolean(_0x212c04),_0x1b005d>0x0][_0x2d61b7(0x174)](Boolean);if(_0x509af3[_0x2d61b7(0x16b)]===0x0)throw CliErrors[_0x2d61b7(0x155)](_0x2d61b7(0x188));if(_0x509af3[_0x2d61b7(0x16b)]>0x1)throw CliErrors[_0x2d61b7(0x155)](_0x2d61b7(0x15b));},async 'dryRun'(_0x5d891b){const _0x3d898b=a61_0x39f804,_0x7d5df4=await resolveTargets(_0x5d891b),_0x136c78=_0x5d891b[_0x3d898b(0x18d)](_0x3d898b(0x182));return{'method':_0x3d898b(0x162),'url':_0x3d898b(0x168)+(_0x136c78?_0x3d898b(0x170):_0x3d898b(0x156)),'body':{'count':_0x7d5df4[_0x3d898b(0x16b)],'cascade':_0x136c78,'datasets':_0x7d5df4},'description':_0x136c78?_0x3d898b(0x15f)+_0x7d5df4[_0x3d898b(0x16b)]+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x3d898b(0x159)+_0x7d5df4['length']+_0x3d898b(0x181)};},async 'execute'(_0x15c6cc){const _0x31c7cb=a61_0x39f804;if(!_0x15c6cc[_0x31c7cb(0x18d)](_0x31c7cb(0x189)))throw CliErrors[_0x31c7cb(0x155)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x31c7cb(0x185));const _0x16e324=await resolveTargets(_0x15c6cc),_0x351d08=_0x15c6cc[_0x31c7cb(0x18d)](_0x31c7cb(0x182)),_0xc548cb=[],_0x1345b9=[];for(const _0x3e4a5a of _0x16e324){try{await deleteDataset(_0x3e4a5a['id'],_0x351d08),_0xc548cb[_0x31c7cb(0x158)](_0x3e4a5a);}catch(_0x5cbcab){_0x1345b9[_0x31c7cb(0x158)]({..._0x3e4a5a,'error':_0x5cbcab instanceof Error?_0x5cbcab['message']:String(_0x5cbcab)});}}if(_0x1345b9[_0x31c7cb(0x16b)]>0x0){const _0xa2116e=buildPageRestoreCommands(_0x15c6cc[_0x31c7cb(0x17a)],_0x351d08?_0xc548cb:[]);return{'ok':![],'data':{'requested':_0x16e324[_0x31c7cb(0x16b)],'cascade':_0x351d08,'deletedCount':_0xc548cb[_0x31c7cb(0x16b)],'failedCount':_0x1345b9[_0x31c7cb(0x16b)],'deleted':_0xc548cb,'failed':_0x1345b9,'pageRestoreCommands':_0xa2116e},'message':_0x31c7cb(0x14f)+_0xc548cb[_0x31c7cb(0x16b)]+'/'+_0x16e324['length']+_0x31c7cb(0x178)+_0x1345b9[_0x31c7cb(0x16b)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x16e324['length'],'cascade':_0x351d08,'deletedCount':_0xc548cb[_0x31c7cb(0x16b)],'deleted':_0xc548cb,'pageRestoreCommands':buildPageRestoreCommands(_0x15c6cc[_0x31c7cb(0x17a)],_0x351d08?_0xc548cb:[])},'message':_0x31c7cb(0x14f)+_0xc548cb[_0x31c7cb(0x16b)]+_0x31c7cb(0x154)};}};async function resolveTargets(_0x1c28c9){const _0xc9849a=a61_0x39f804,_0x17c0c3=_0x1c28c9['num']('id'),_0x5bb7a0=_0x1c28c9['str'](_0xc9849a(0x160)),_0x3ef2b0=_0x1c28c9[_0xc9849a(0x179)]('dbid');let _0x417e2f;_0x5bb7a0?(_0x417e2f=await listDatasets(_0x1c28c9['appCode'],{'code':_0x5bb7a0}),_0x417e2f=_0x417e2f[_0xc9849a(0x174)](_0x1f43e0=>_0x1f43e0['code']===_0x5bb7a0)):(_0x417e2f=await listDatasets(_0x1c28c9['appCode']),_0x17c0c3>0x0&&(_0x417e2f=_0x417e2f[_0xc9849a(0x174)](_0x5eaecc=>_0x5eaecc['id']===_0x17c0c3)),_0x3ef2b0>0x0&&(_0x417e2f=_0x417e2f['filter'](_0x1a9088=>_0x1a9088['dbtableConfig']?.[_0xc9849a(0x18e)]===_0x3ef2b0)));const _0x4b03f3=[];for(const _0x2dd457 of _0x417e2f){const _0x41cb69=await getDatasetDetail(_0x2dd457['code']),_0x2cf4fd=Array[_0xc9849a(0x18a)](_0x41cb69[_0xc9849a(0x151)])?_0x41cb69[_0xc9849a(0x151)]['filter'](_0x125576=>_0x125576!=null&&typeof _0x125576===_0xc9849a(0x15a)&&_0x125576[_0xc9849a(0x16a)]!==!![]):[];_0x4b03f3[_0xc9849a(0x158)](normalizeTarget(_0x2dd457,_0x2cf4fd));}if(_0x4b03f3[_0xc9849a(0x16b)]===0x0){const _0x54105f=_0x5bb7a0||(_0x17c0c3>0x0?_0xc9849a(0x183)+_0x17c0c3:_0xc9849a(0x184)+_0x3ef2b0);throw CliErrors[_0xc9849a(0x155)](_0xc9849a(0x16c)+_0x54105f+'.');}const _0xbcd3a3=_0x1c28c9[_0xc9849a(0x179)](_0xc9849a(0x16f));if(_0xbcd3a3>0x0&&_0x4b03f3[_0xc9849a(0x16b)]!==_0xbcd3a3)throw CliErrors[_0xc9849a(0x155)](_0xc9849a(0x16e)+_0x4b03f3[_0xc9849a(0x16b)]+_0xc9849a(0x176)+_0xbcd3a3+'.');return _0x4b03f3;}function a61_0x1cb6(_0x4ca817,_0x13461e){_0x4ca817=_0x4ca817-0x14e;const _0x4e806f=a61_0x4e80();let _0x1cb6cd=_0x4e806f[_0x4ca817];return _0x1cb6cd;}function normalizeTarget(_0x58c159,_0x1fef8d){const _0x564f5e=a61_0x39f804,_0x53dff3=_0x58c159[_0x564f5e(0x152)]??{},_0xc83676=_0x1fef8d['map'](_0x1b299c=>{const _0x4aa874=_0x564f5e;if(_0x1b299c==null||typeof _0x1b299c!=='object')return null;const _0x35369e=_0x1b299c,_0x4fd79e=Number(_0x35369e['id']);if(!Number[_0x4aa874(0x171)](_0x4fd79e)||_0x4fd79e<=0x0)return null;const _0x52242e=_0x35369e[_0x4aa874(0x187)]??_0x35369e['name'];return{'id':_0x4fd79e,..._0x52242e?{'name':String(_0x52242e)}:{},..._0x35369e[_0x4aa874(0x166)]?{'type':String(_0x35369e['type'])}:{}};})['filter'](_0x927e54=>_0x927e54!==null);return{'id':_0x58c159['id'],'code':_0x58c159[_0x564f5e(0x160)],'name':_0x58c159[_0x564f5e(0x173)],'description':_0x58c159[_0x564f5e(0x172)],'source':_0x58c159[_0x564f5e(0x180)],'dbId':_0x53dff3['dbId'],'dbName':_0x53dff3[_0x564f5e(0x177)],'tableName':_0x53dff3['tableName'],'relatedPageCount':_0xc83676['length'],'relatedPages':_0xc83676};}function buildPageRestoreCommands(_0x196acd,_0x38fcef){const _0x56297f=a61_0x39f804,_0x548409=new Set();for(const _0x1320a9 of _0x38fcef){for(const _0x576570 of _0x1320a9['relatedPages'])_0x548409[_0x56297f(0x167)](_0x576570['id']);}return[..._0x548409]['map'](_0x952e31=>_0x56297f(0x17e)+_0x952e31+_0x56297f(0x18f)+_0x196acd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x252a(_0x442e41,_0x46914d){_0x442e41=_0x442e41-0x83;const _0x60dbe6=a62_0x60db();let _0x252a8=_0x60dbe6[_0x442e41];return _0x252a8;}const a62_0x3efadf=a62_0x252a;(function(_0x535912,_0x4558e4){const _0x15caf5=a62_0x252a,_0x21a788=_0x535912();while(!![]){try{const _0x4a52d8=-parseInt(_0x15caf5(0xd5))/0x1*(parseInt(_0x15caf5(0x86))/0x2)+-parseInt(_0x15caf5(0xd2))/0x3*(-parseInt(_0x15caf5(0xb1))/0x4)+-parseInt(_0x15caf5(0xc1))/0x5*(parseInt(_0x15caf5(0x87))/0x6)+-parseInt(_0x15caf5(0xc2))/0x7+parseInt(_0x15caf5(0xae))/0x8+-parseInt(_0x15caf5(0xbf))/0x9+parseInt(_0x15caf5(0xb6))/0xa*(parseInt(_0x15caf5(0xd6))/0xb);if(_0x4a52d8===_0x4558e4)break;else _0x21a788['push'](_0x21a788['shift']());}catch(_0xf2ad2d){_0x21a788['push'](_0x21a788['shift']());}}}(a62_0x60db,0x2d03f));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a62_0x60db(){const _0x420462=['requestBody','creatorIdField','required','dbType','modelCode','toFieldLabel','code','method','3018879eGbZLH','source','135uefRwG','2263226pYWXFP','doType','validateRules','deleted','dbtableConfig','toTableName','parse','allFieldNames','tableName','dataType','sourceType','formatRules','string','displayName','relatedPageInfoList','modifierNameField','786zpnZMe','push','relations','321361qvUrlJ','2915fTDmLE','columnCodeListWithDeleted','updateTimeField','entries','isArray','2duUDSO','2358UAlRZa','options','afterScriptId','deprecated','creatorNameField','cardinality','dbName','dataset','allFields','length','responseBody','split','fromField','fields','host','createTimeField','datasetKey','description','toField','detail','requestFields','extend','dbId','trim','operations','responseFields','object','filter','dblinkInfoDTO','properties','beforeScriptId','alias','labelField','read','map','relationId','title','indexes','path','2786344YRnwlC','logicField','main_sub','2812wKwHwA','name','pkField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','toDatasetName','24250vEezYH'];a62_0x60db=function(){return _0x420462;};return a62_0x60db();}function normalizeField(_0x4f033f){const _0x179e06=a62_0x252a;if(_0x4f033f[_0x179e06(0xc5)])return null;const _0x14f2aa=Boolean(_0x4f033f[_0x179e06(0xcf)]!==undefined||_0x4f033f['doType']!==undefined);let _0x2ef85d={};if(!_0x14f2aa&&typeof _0x4f033f[_0x179e06(0x9c)]==='string')try{_0x2ef85d=JSON[_0x179e06(0xc8)](_0x4f033f[_0x179e06(0x9c)]);}catch{}const _0x3a1faf=_0x14f2aa?_0x4f033f['name']:_0x4f033f[_0x179e06(0xbd)],_0xa61054=_0x14f2aa?_0x4f033f[_0x179e06(0xcf)]:_0x4f033f[_0x179e06(0xb2)],_0x4ea2d6=_0x14f2aa?_0x4f033f[_0x179e06(0xc3)]:_0x4f033f['type']||_0x4f033f[_0x179e06(0xcb)],_0x3ad531=_0x14f2aa?_0x4f033f[_0x179e06(0xb3)]===!![]:_0x2ef85d['pkField']===!![],_0xe67058=_0x14f2aa?_0x4f033f[_0x179e06(0xb9)]===!![]:_0x2ef85d[_0x179e06(0xb9)]===!![],_0x2e9acb=_0x14f2aa?_0x4f033f[_0x179e06(0x88)]??null:_0x2ef85d[_0x179e06(0x88)]??null,_0x249f5c={'name':_0x3a1faf,'displayName':_0xa61054||_0x3a1faf,'type':_0x4ea2d6,'dbType':_0x4f033f[_0x179e06(0xba)],'pk':_0x3ad531,'required':_0xe67058,'deprecated':_0x4f033f[_0x179e06(0x8a)]===!![],'description':_0x4f033f[_0x179e06(0x98)]||undefined};return Array[_0x179e06(0x85)](_0x2e9acb)&&_0x2e9acb[_0x179e06(0x90)]>0x0&&(_0x249f5c['options']=_0x2e9acb),_0x249f5c;}function parseJsonMaybe(_0x14b4c3){const _0x4204c5=a62_0x252a;if(typeof _0x14b4c3!==_0x4204c5(0xce))return _0x14b4c3;try{return JSON[_0x4204c5(0xc8)](_0x14b4c3);}catch{return _0x14b4c3;}}function normalizeOperationEntry(_0x5dbb5a,_0x47e8f0){const _0x2d16de=a62_0x252a;if(!_0x47e8f0||typeof _0x47e8f0!==_0x2d16de(0xa1))return null;if(!_0x47e8f0[_0x2d16de(0xbe)]||!_0x47e8f0[_0x2d16de(0xad)])return null;const _0x122f35={'name':_0x5dbb5a,'method':_0x47e8f0[_0x2d16de(0xbe)],'path':_0x47e8f0[_0x2d16de(0xad)]};if(_0x47e8f0[_0x2d16de(0x95)])_0x122f35[_0x2d16de(0x95)]=_0x47e8f0[_0x2d16de(0x95)];if(_0x47e8f0[_0x2d16de(0xb7)]!=null){const _0x1a2e8f=parseJsonMaybe(_0x47e8f0[_0x2d16de(0xb7)]);_0x122f35[_0x2d16de(0xb7)]=_0x1a2e8f;}if(_0x47e8f0['responseBody']!=null){const _0x5b067a=parseJsonMaybe(_0x47e8f0['responseBody']);_0x122f35[_0x2d16de(0x91)]=_0x5b067a;}if(_0x47e8f0[_0x2d16de(0xa5)]!=null)_0x122f35[_0x2d16de(0xa5)]=_0x47e8f0[_0x2d16de(0xa5)];if(_0x47e8f0[_0x2d16de(0x89)]!=null)_0x122f35[_0x2d16de(0x89)]=_0x47e8f0[_0x2d16de(0x89)];if(Array[_0x2d16de(0x85)](_0x47e8f0[_0x2d16de(0x9b)]))_0x122f35['requestFields']=_0x47e8f0['requestFields'];if(Array['isArray'](_0x47e8f0[_0x2d16de(0xa0)]))_0x122f35[_0x2d16de(0xa0)]=_0x47e8f0[_0x2d16de(0xa0)];return _0x122f35;}function summarizeDbtable(_0x57e456){const _0x536b49=a62_0x252a,_0xb7a18b={},_0x4e1d9c=[_0x536b49(0x9d),_0x536b49(0x8d),'tableName',_0x536b49(0x97),_0x536b49(0xb3),'allFields',_0x536b49(0xaf),_0x536b49(0x96),_0x536b49(0x83),_0x536b49(0xb8),_0x536b49(0x8b),'modifierIdField',_0x536b49(0xd1),_0x536b49(0xa7),_0x536b49(0xa3)];for(const _0x425ac5 of _0x4e1d9c){if(_0x57e456[_0x425ac5]!==undefined)_0xb7a18b[_0x425ac5]=_0x57e456[_0x425ac5];}return typeof _0xb7a18b[_0x536b49(0x8f)]===_0x536b49(0xce)&&_0xb7a18b[_0x536b49(0x8f)][_0x536b49(0x90)]>0x0&&(_0xb7a18b[_0x536b49(0xc9)]=_0xb7a18b[_0x536b49(0x8f)][_0x536b49(0x92)](',')[_0x536b49(0xa9)](_0x57f4ed=>_0x57f4ed[_0x536b49(0x9e)]())[_0x536b49(0xa2)](Boolean)),_0xb7a18b;}function normalizeRelatedPages(_0x1f5849){const _0x4c8129=a62_0x252a;if(!Array[_0x4c8129(0x85)](_0x1f5849))return[];return _0x1f5849[_0x4c8129(0xa2)](_0xa758d5=>_0xa758d5&&typeof _0xa758d5===_0x4c8129(0xa1))['map'](_0x3b6684=>({'id':_0x3b6684['id'],'type':_0x3b6684['type'],'code':_0x3b6684[_0x4c8129(0xbd)],'title':_0x3b6684[_0x4c8129(0xab)],'deleted':_0x3b6684['deleted']===!![]}));}export const datasetDetail={'service':a62_0x3efadf(0x8e),'command':a62_0x3efadf(0x9a),'description':a62_0x3efadf(0xb4),'risk':a62_0x3efadf(0xa8),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x3efadf(0xa6),'type':a62_0x3efadf(0xce),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x5bd340){const _0x187150=a62_0x3efadf,_0x3f2698=await getDatasetDetail(_0x5bd340['str']('code')),_0x4287d1=Array[_0x187150(0x85)](_0x3f2698[_0x187150(0x94)])?_0x3f2698['fields']:Array[_0x187150(0x85)](_0x3f2698[_0x187150(0xa4)])?_0x3f2698[_0x187150(0xa4)]:[],_0x95f0b8=_0x4287d1[_0x187150(0xa9)](_0x10503f=>normalizeField(_0x10503f))[_0x187150(0xa2)](_0x3bc58e=>_0x3bc58e!==null),_0x139c6e=_0x3f2698[_0x187150(0x9f)]??{},_0x3bf99f=[];for(const [_0x1edbd8,_0x3bd822]of Object[_0x187150(0x84)](_0x139c6e)){const _0x58a9a1=normalizeOperationEntry(_0x1edbd8,_0x3bd822);if(_0x58a9a1)_0x3bf99f[_0x187150(0xd3)](_0x58a9a1);}const _0xeb65c8=_0x3f2698[_0x187150(0xc6)]??{},_0x37d335=_0x3f2698[_0x187150(0x8e)]??{},_0x598816=_0xeb65c8[_0x187150(0x9d)]!=null?{'id':_0xeb65c8[_0x187150(0x9d)],'name':_0xeb65c8[_0x187150(0x8d)]??null}:undefined;let _0x1cd9b6;return typeof _0x3f2698[_0x187150(0x9c)]===_0x187150(0xce)&&(_0x1cd9b6=parseJsonMaybe(_0x3f2698[_0x187150(0x9c)])),{'ok':!![],'data':{'id':_0x3f2698['modelId']??_0x3f2698['id'],'name':_0x3f2698[_0x187150(0xb2)],'code':_0x3f2698[_0x187150(0xbb)]||_0x3f2698[_0x187150(0xbd)],'doVersion':_0x3f2698['doVersion'],'description':_0x3f2698[_0x187150(0x98)]||_0x37d335['tableComment']||undefined,'source':_0x3f2698[_0x187150(0xc0)]||_0x37d335[_0x187150(0xcc)],'table':_0xeb65c8['tableName']||_0x37d335[_0x187150(0xca)],'datasetKey':_0xeb65c8[_0x187150(0x97)],'pk':_0xeb65c8[_0x187150(0xb3)],'db':_0x598816,'dbtable':summarizeDbtable(_0xeb65c8),'fields':_0x95f0b8,'operations':_0x3bf99f,'indexes':Array[_0x187150(0x85)](_0x37d335['indexes'])?_0x37d335[_0x187150(0xac)]:[],'relations':Array[_0x187150(0x85)](_0x3f2698[_0x187150(0xd4)])?_0x3f2698[_0x187150(0xd4)]['map'](_0x29daf2=>({..._0x29daf2[_0x187150(0xaa)]!=null?{'relationId':_0x29daf2[_0x187150(0xaa)]}:{},'fromDataset':_0x3f2698['name'],'fromCode':_0x3f2698[_0x187150(0xbb)]||_0x3f2698['code'],'fromTable':_0xeb65c8['tableName']||_0x37d335[_0x187150(0xca)],'fromField':_0x29daf2[_0x187150(0x93)],'toDataset':_0x29daf2[_0x187150(0xb5)],'toCode':_0x29daf2['toDatasetCode'],'toTable':_0x29daf2[_0x187150(0xc7)],'toField':_0x29daf2[_0x187150(0x99)],'labelField':_0x29daf2[_0x187150(0xbc)]||undefined,'cardinality':_0x29daf2[_0x187150(0x8c)]||undefined,'bizRelationType':_0x29daf2['bizRelationType']==='main_sub'?_0x187150(0xb0):null})):[],'relatedPages':normalizeRelatedPages(_0x3f2698[_0x187150(0xd0)]),...Array[_0x187150(0x85)](_0x3f2698['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x3f2698[_0x187150(0xd7)]}:{},'formatRules':Array[_0x187150(0x85)](_0x3f2698[_0x187150(0xcd)])?_0x3f2698[_0x187150(0xcd)]:[],'validateRules':Array['isArray'](_0x3f2698[_0x187150(0xc4)])?_0x3f2698[_0x187150(0xc4)]:[],..._0x1cd9b6!==undefined?{'extend':_0x1cd9b6}:{},'stats':{'fieldCount':_0x95f0b8[_0x187150(0x90)],'operationCount':_0x3bf99f[_0x187150(0x90)]}}};}};
|