@lovrabet/rabetbase-cli 2.5.2-beta.1 → 2.5.2-beta.2
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.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.d.ts +2 -0
- package/lib/commands/deployment/sync-all.js +1 -0
- package/lib/commands/deployment/sync-jobs.d.ts +2 -0
- package/lib/commands/deployment/sync-jobs.js +1 -0
- package/lib/commands/deployment/sync-status.d.ts +2 -0
- package/lib/commands/deployment/sync-status.js +1 -0
- 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/instant-api-policy/current.d.ts +2 -0
- package/lib/commands/instant-api-policy/current.js +1 -0
- package/lib/commands/instant-api-policy/index.d.ts +2 -0
- package/lib/commands/instant-api-policy/index.js +1 -0
- package/lib/commands/instant-api-policy/init.d.ts +2 -0
- package/lib/commands/instant-api-policy/init.js +1 -0
- package/lib/commands/instant-api-policy/publish.d.ts +2 -0
- package/lib/commands/instant-api-policy/publish.js +1 -0
- package/lib/commands/instant-api-policy/pull.d.ts +2 -0
- package/lib/commands/instant-api-policy/pull.js +1 -0
- package/lib/commands/instant-api-policy/revision.d.ts +2 -0
- package/lib/commands/instant-api-policy/revision.js +1 -0
- package/lib/commands/instant-api-policy/revisions.d.ts +2 -0
- package/lib/commands/instant-api-policy/revisions.js +1 -0
- package/lib/commands/instant-api-policy/rollback.d.ts +2 -0
- package/lib/commands/instant-api-policy/rollback.js +1 -0
- package/lib/commands/instant-api-policy/shared.d.ts +82 -0
- package/lib/commands/instant-api-policy/shared.js +1 -0
- package/lib/commands/instant-api-policy/validate.d.ts +2 -0
- package/lib/commands/instant-api-policy/validate.js +1 -0
- 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.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 +113 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.d.ts +23 -0
- package/lib/core/instant-api-policy/config.js +1 -0
- 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.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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 +11 -5
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +41 -5
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +92 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c47d5,_0x7a3d2a){const _0xe8aef1=a49_0x38fe,_0x512709=_0x1c47d5();while(!![]){try{const _0x399ec0=parseInt(_0xe8aef1(0xfc))/0x1*(-parseInt(_0xe8aef1(0xf5))/0x2)+-parseInt(_0xe8aef1(0xfa))/0x3*(-parseInt(_0xe8aef1(0xf9))/0x4)+parseInt(_0xe8aef1(0xf6))/0x5+-parseInt(_0xe8aef1(0xf7))/0x6+parseInt(_0xe8aef1(0xf4))/0x7+parseInt(_0xe8aef1(0xef))/0x8+-parseInt(_0xe8aef1(0xf2))/0x9;if(_0x399ec0===_0x7a3d2a)break;else _0x512709['push'](_0x512709['shift']());}catch(_0x404615){_0x512709['push'](_0x512709['shift']());}}}(a49_0x322b,0xecd51));function a49_0x38fe(_0x123f3d,_0x206738){_0x123f3d=_0x123f3d-0xec;const _0x322ba0=a49_0x322b();let _0x38fe8c=_0x322ba0[_0x123f3d];return _0x38fe8c;}import{existsSync,statSync}from'node:fs';function a49_0x322b(){const _0x30ba75=['14856456aFcagp','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20path\x20is\x20required.','1641114AyohUa','toFixed','5260920jaMVbE','38imtIwl','3035285qyIWNn','11535102oJHRCQ','\x20MB','1884dVbXTZ','6009eroCIA','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','57061GIMsYv','validation','isFile','File\x20not\x20found:\x20','trim','size'];a49_0x322b=function(){return _0x30ba75;};return a49_0x322b();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0xb131e6){const _0x5523c5=a49_0x38fe;if(_0xb131e6>=BYTES_PER_MB){const _0x297911=Math['ceil'](_0xb131e6/BYTES_PER_MB*0x64)/0x64;return _0x297911[_0x5523c5(0xf3)](0x2)+_0x5523c5(0xf8);}return _0xb131e6+'\x20B';}export function requireDevelopmentUploadFile(_0x4f4ce0,_0x29188e){const _0x2384cf=a49_0x38fe,_0x3a53fa=_0x4f4ce0[_0x2384cf(0xed)]();if(!_0x3a53fa)throw CliErrors[_0x2384cf(0xfd)](_0x29188e+_0x2384cf(0xf1));if(!existsSync(_0x3a53fa))throw CliErrors[_0x2384cf(0xfd)](_0x2384cf(0xec)+_0x3a53fa);const _0xabc733=statSync(_0x3a53fa);if(!_0xabc733[_0x2384cf(0xfe)]())throw CliErrors['validation'](_0x2384cf(0xf0)+_0x3a53fa);if(_0xabc733[_0x2384cf(0xee)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2384cf(0xfd)](_0x2384cf(0xfb)+_0x3a53fa+'\x20('+formatBytes(_0xabc733[_0x2384cf(0xee)])+')');return{'path':_0x3a53fa,'size':_0xabc733[_0x2384cf(0xee)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c680d,_0x384d47){const _0x1a9a1c=a50_0x4840,_0x5aa8c0=_0x5c680d();while(!![]){try{const _0x19c0ac=parseInt(_0x1a9a1c(0xd6))/0x1*(-parseInt(_0x1a9a1c(0xe2))/0x2)+parseInt(_0x1a9a1c(0xe1))/0x3+-parseInt(_0x1a9a1c(0xde))/0x4*(-parseInt(_0x1a9a1c(0xd4))/0x5)+parseInt(_0x1a9a1c(0xe0))/0x6*(parseInt(_0x1a9a1c(0xd9))/0x7)+-parseInt(_0x1a9a1c(0xd8))/0x8+-parseInt(_0x1a9a1c(0xdd))/0x9*(parseInt(_0x1a9a1c(0xda))/0xa)+-parseInt(_0x1a9a1c(0xd7))/0xb*(-parseInt(_0x1a9a1c(0xdc))/0xc);if(_0x19c0ac===_0x384d47)break;else _0x5aa8c0['push'](_0x5aa8c0['shift']());}catch(_0x1bc939){_0x5aa8c0['push'](_0x5aa8c0['shift']());}}}(a50_0x1c56,0x6ea25));function a50_0x1c56(){const _0x5252c6=['140463RfxONn','4cNYowO','App\x20Code\x20cannot\x20exceed\x20100\x20characters','24NCoxtK','2438712lkAYCF','24iaBZfs','2442455MKGVPW','App\x20Code\x20cannot\x20be\x20empty','30562HZpxNr','11dLZsIK','6335432crtJUu','257789hlbZXq','580TVveGa','test','12819996pcBslw'];a50_0x1c56=function(){return _0x5252c6;};return a50_0x1c56();}function a50_0x4840(_0x546f22,_0x113eef){_0x546f22=_0x546f22-0xd4;const _0x1c562c=a50_0x1c56();let _0x48401c=_0x1c562c[_0x546f22];return _0x48401c;}export function validateAppcode(_0x1f65bc){const _0x78ddd=a50_0x4840,_0x36de99=_0x1f65bc['trim']();if(!_0x36de99)return{'valid':![],'message':_0x78ddd(0xd5)};if(_0x36de99['length']>0x64)return{'valid':![],'message':_0x78ddd(0xdf)};if(!/^[A-Za-z0-9_-]+$/[_0x78ddd(0xdb)](_0x36de99))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a51_0x295905=a51_0x5b35;function a51_0x50c9(){const _0x384782=['4834207NOEUFi','args','trim','Usage:\x20','16HNsUSf','call','boolean','key','riskLevel','delete','573080GnIRfm','\x20already\x20absent','20MyjWdl','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','prototype','Top-level\x20key\x20\x22','Project','442338HwjfLo','has','399318jJIkgX','30FIogyp','2592801NHmDqg','Global','55RDHova','defaultApp','\x20config\x20delete\x20<key>\x20[--global]','validation','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','\x22\x20is\x20not\x20deletable.','global','69620zAAiWt','335148CSXkuu'];a51_0x50c9=function(){return _0x384782;};return a51_0x50c9();}(function(_0x309ff7,_0x16276a){const _0x1f4baf=a51_0x5b35,_0x46d50f=_0x309ff7();while(!![]){try{const _0x383cd8=parseInt(_0x1f4baf(0x115))/0x1*(parseInt(_0x1f4baf(0x101))/0x2)+-parseInt(_0x1f4baf(0x109))/0x3+-parseInt(_0x1f4baf(0x116))/0x4+-parseInt(_0x1f4baf(0x10a))/0x5*(-parseInt(_0x1f4baf(0x107))/0x6)+-parseInt(_0x1f4baf(0x117))/0x7+-parseInt(_0x1f4baf(0x11b))/0x8*(-parseInt(_0x1f4baf(0x10b))/0x9)+parseInt(_0x1f4baf(0x121))/0xa*(-parseInt(_0x1f4baf(0x10d))/0xb);if(_0x383cd8===_0x16276a)break;else _0x46d50f['push'](_0x46d50f['shift']());}catch(_0xdb775b){_0x46d50f['push'](_0x46d50f['shift']());}}}(a51_0x50c9,0x7f1ea));function a51_0x5b35(_0x575a2c,_0x5bd8de){_0x575a2c=_0x575a2c-0x100;const _0x50c93=a51_0x50c9();let _0x5b3563=_0x50c93[_0x575a2c];return _0x5b3563;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a51_0x295905(0x10e),'routing']);async function execute(_0x432ce0){const _0x35babd=a51_0x295905,_0x59b6c1=_0x432ce0[_0x35babd(0x118)][0x0]?.[_0x35babd(0x119)]();if(!_0x59b6c1)throw CliErrors[_0x35babd(0x110)]('Missing\x20key\x20argument.',_0x35babd(0x11a)+CLI_BIN_NAME+_0x35babd(0x10f));if(_0x59b6c1===_0x35babd(0x11f))throw CliErrors['validation'](_0x35babd(0x111));if(!isTopLevelConfigKey(_0x59b6c1)&&!EXTRA_DELETABLE_KEYS[_0x35babd(0x108)](_0x59b6c1)&&!LEGACY_DELETABLE_KEYS[_0x35babd(0x108)](_0x59b6c1))throw CliErrors[_0x35babd(0x110)](_0x35babd(0x105)+_0x59b6c1+_0x35babd(0x113),_0x35babd(0x103));const _0x311d00=resolveWriteScope({'global':_0x432ce0['bool']('global')}),_0xa99a05=readScopedConfig(_0x311d00),_0x42e1d2=Object[_0x35babd(0x104)]['hasOwnProperty'][_0x35babd(0x11c)](_0xa99a05,_0x59b6c1);_0x42e1d2&&(delete _0xa99a05[_0x59b6c1],writeScopedConfig(_0xa99a05,_0x311d00));const _0x5c750b=_0x311d00==='global'?_0x35babd(0x10c):_0x35babd(0x106);return{'ok':!![],'message':_0x42e1d2?'✓\x20'+_0x5c750b+'\x20'+_0x59b6c1+'\x20deleted':'✓\x20'+_0x5c750b+'\x20'+_0x59b6c1+_0x35babd(0x100),'data':{'key':_0x59b6c1,'scope':_0x311d00,'changed':_0x42e1d2}};}export const configDeleteDefinition={'service':'config','command':a51_0x295905(0x120),'description':a51_0x295905(0x112),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x295905(0x11e),'description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a51_0x295905(0x114),'type':a51_0x295905(0x11d),'description':a51_0x295905(0x102),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a52_0x7f5afc=a52_0xade3;(function(_0x2f3a35,_0x2becdf){const _0x28cb09=a52_0xade3,_0x56ea51=_0x2f3a35();while(!![]){try{const _0x479894=-parseInt(_0x28cb09(0x1a3))/0x1+parseInt(_0x28cb09(0x194))/0x2+parseInt(_0x28cb09(0x1a2))/0x3*(parseInt(_0x28cb09(0x1a7))/0x4)+parseInt(_0x28cb09(0x195))/0x5+-parseInt(_0x28cb09(0x1a8))/0x6*(parseInt(_0x28cb09(0x199))/0x7)+-parseInt(_0x28cb09(0x193))/0x8*(-parseInt(_0x28cb09(0x1a1))/0x9)+parseInt(_0x28cb09(0x19f))/0xa*(-parseInt(_0x28cb09(0x19c))/0xb);if(_0x479894===_0x2becdf)break;else _0x56ea51['push'](_0x56ea51['shift']());}catch(_0x2e36aa){_0x56ea51['push'](_0x56ea51['shift']());}}}(a52_0x2ccc,0xe30c8));import{CliErrors}from'../../errors.js';function a52_0xade3(_0x115f56,_0x4bed93){_0x115f56=_0x115f56-0x193;const _0x2ccced=a52_0x2ccc();let _0xade306=_0x2ccced[_0x115f56];return _0xade306;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a52_0x2ccc(){const _0x23bffc=['appcode','config','109896QwToap','6uAnyrZ','key','8CNdSfq','2504954BtjEMD','2179865kphFVF','object','validation','string','5178439xYXfxL','get','Key\x20not\x20found:\x20','24415358nRYrGx','\x20config\x20get\x20--key\x20<key>','Usage:\x20','10WzqPWA','app','14697153FskvfC','153CnkXol','833294LJIpoz','Missing\x20key.'];a52_0x2ccc=function(){return _0x23bffc;};return a52_0x2ccc();}async function execute(_0xa0e8b0){const _0x5f941f=a52_0xade3,_0xb7e9b1=_0xa0e8b0['str']('key');if(!_0xb7e9b1)throw CliErrors[_0x5f941f(0x197)](_0x5f941f(0x1a4),_0x5f941f(0x19e)+CLI_BIN_NAME+_0x5f941f(0x19d));const _0x59eb2a=readConfig(),_0x3c3757=_0xb7e9b1===_0x5f941f(0x1a0)?_0x5f941f(0x1a5):_0xb7e9b1,_0x21e9f5=_0x59eb2a[_0x3c3757];if(_0x21e9f5===undefined)throw CliErrors[_0x5f941f(0x197)](_0x5f941f(0x19b)+_0xb7e9b1);return{'ok':!![],'data':typeof _0x21e9f5===_0x5f941f(0x196)?_0x21e9f5:{[_0x3c3757]:_0x21e9f5},'message':typeof _0x21e9f5===_0x5f941f(0x196)?undefined:String(_0x21e9f5)};}export const configGetDefinition={'service':a52_0x7f5afc(0x1a6),'command':a52_0x7f5afc(0x19a),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x7f5afc(0x1a9),'type':a52_0x7f5afc(0x198),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53042e,_0x237430){const _0x248d19=a53_0x4181,_0x2037be=_0x53042e();while(!![]){try{const _0x52d373=-parseInt(_0x248d19(0xb0))/0x1+parseInt(_0x248d19(0xb2))/0x2*(parseInt(_0x248d19(0xae))/0x3)+parseInt(_0x248d19(0xb3))/0x4*(parseInt(_0x248d19(0xb7))/0x5)+parseInt(_0x248d19(0xb8))/0x6+-parseInt(_0x248d19(0xaf))/0x7*(-parseInt(_0x248d19(0xb4))/0x8)+-parseInt(_0x248d19(0xb1))/0x9*(parseInt(_0x248d19(0xb6))/0xa)+-parseInt(_0x248d19(0xb5))/0xb;if(_0x52d373===_0x237430)break;else _0x2037be['push'](_0x2037be['shift']());}catch(_0x383ef8){_0x2037be['push'](_0x2037be['shift']());}}}(a53_0x2923,0xd4dc8));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';function a53_0x4181(_0x2f0f0e,_0x159065){_0x2f0f0e=_0x2f0f0e-0xae;const _0x292360=a53_0x2923();let _0x4181f0=_0x292360[_0x2f0f0e];return _0x4181f0;}import{configInitDefinition}from'../../commands/config/init.js';function a53_0x2923(){const _0x173ba9=['570476dntjXv','5832EdTVNQ','12115796hmpjfc','3200HVTHtE','15JnWMoU','2702478HQhCcB','45JBscAT','10514KNyloo','601077Inghds','1980mcHzht','89542ttMrsC'];a53_0x2923=function(){return _0x173ba9;};return a53_0x2923();}export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a54_0x9517(){const _0x1e26af=['name','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Custom\x20local\x20callback\x20HTTPS\x20origin','region','runtime-domain','user-domain','config','40940kIjLZK','validation','app-domain','Region\x20\x22','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Independent-deployment\x20Domain\x20JSON\x20file','255784RCNSvY','routing','Custom\x20certificate\x20service\x20HTTPS\x20origin','474BlWqPv','8KrwCif','manifestDomains','84725bWCJIz','local-domain','certificateDomain','3047PLhMdd','cdn','string','official','keys','project','450HAxFKQ','ExitPromptError','Custom\x20User\x20HTTPS\x20origin','write','1389jfoMSq','enterprise-v1','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','certificate-domain','join','Custom\x20SkillHub\x20HTTPS\x20origin','global','api-domain','init','skill-domain','length','7084899pghZdi','Select\x20Lovrabet\x20region','str','domains','\x22\x20is\x20not\x20currently\x20available.','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','nonInteractive','3840907wGhtbZ','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','localDomain','assign','domain-config','Available\x20regions:\x20','mode','kb-domain','label','Custom\x20platform\x20API\x20HTTPS\x20origin','3266385WnRRxw','independent','bool'];a54_0x9517=function(){return _0x1e26af;};return a54_0x9517();}const a54_0x56d57d=a54_0x1b9e;(function(_0x37bf38,_0x2f348d){const _0x41eb39=a54_0x1b9e,_0x4582bb=_0x37bf38();while(!![]){try{const _0x247221=parseInt(_0x41eb39(0x96))/0x1*(-parseInt(_0x41eb39(0x86))/0x2)+-parseInt(_0x41eb39(0xb2))/0x3+parseInt(_0x41eb39(0x83))/0x4+-parseInt(_0x41eb39(0x89))/0x5*(-parseInt(_0x41eb39(0x92))/0x6)+parseInt(_0x41eb39(0xa8))/0x7+-parseInt(_0x41eb39(0x87))/0x8*(parseInt(_0x41eb39(0xa1))/0x9)+-parseInt(_0x41eb39(0x7d))/0xa*(-parseInt(_0x41eb39(0x8c))/0xb);if(_0x247221===_0x2f348d)break;else _0x4582bb['push'](_0x4582bb['shift']());}catch(_0x370301){_0x4582bb['push'](_0x4582bb['shift']());}}}(a54_0x9517,0xc6549));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a54_0x1b9e(_0x5b4c87,_0x5e705a){_0x5b4c87=_0x5b4c87-0x77;const _0x95174f=a54_0x9517();let _0x1b9e5a=_0x95174f[_0x5b4c87];return _0x1b9e5a;}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_0x56d57d(0x79),'type':a54_0x56d57d(0x8e),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x56d57d(0xac),'type':a54_0x56d57d(0x8e),'description':a54_0x56d57d(0x82)},{'name':a54_0x56d57d(0x7b),'type':a54_0x56d57d(0x8e),'description':a54_0x56d57d(0x94)},{'name':a54_0x56d57d(0x9d),'type':'string','description':a54_0x56d57d(0xb1)},{'name':a54_0x56d57d(0x7a),'type':a54_0x56d57d(0x8e),'description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a54_0x56d57d(0x9f),'type':a54_0x56d57d(0x8e),'description':a54_0x56d57d(0x9b)},{'name':a54_0x56d57d(0xaf),'type':a54_0x56d57d(0x8e),'description':'Custom\x20knowledge-base\x20HTTPS\x20origin'},{'name':a54_0x56d57d(0x7f),'type':a54_0x56d57d(0x8e),'description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a54_0x56d57d(0x8a),'type':a54_0x56d57d(0x8e),'description':a54_0x56d57d(0x78)},{'name':a54_0x56d57d(0x99),'type':a54_0x56d57d(0x8e),'description':a54_0x56d57d(0x85)}];async function resolveRegion(_0x25e273){const _0x22935f=a54_0x56d57d,_0xd6ab9=_0x25e273[_0x22935f(0xa3)]('region');if(_0xd6ab9){if(!isEnabledLovrabetRegion(_0xd6ab9))throw CliErrors[_0x22935f(0x7e)](_0x22935f(0x80)+_0xd6ab9+_0x22935f(0xa5),_0x22935f(0xad)+ENABLED_LOVRABET_REGION_VALUES[_0x22935f(0x9a)](',\x20'));return _0xd6ab9;}if(_0x25e273[_0x22935f(0xa7)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x22935f(0xa2),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x26471c=>({'name':getOfficialRoutingProfile(_0x26471c)[_0x22935f(0xb0)]+'\x20('+_0x26471c+')','value':_0x26471c}))});}catch(_0x5daa8b){if(_0x5daa8b?.[_0x22935f(0xb5)]===_0x22935f(0x93))throw CliErrors['cancelled']();throw _0x5daa8b;}}export async function executeConfigInit(_0x345a74){const _0x47b44c=a54_0x56d57d,_0x1a455f=resolveDomainConfigInput(_0x345a74),_0x54efd4=_0x1a455f[_0x47b44c(0xa4)],_0x2850ec=Object[_0x47b44c(0x90)](_0x54efd4)[_0x47b44c(0xa0)]>0x0;if(_0x2850ec&&_0x345a74[_0x47b44c(0xa3)](_0x47b44c(0x79)))throw CliErrors[_0x47b44c(0x7e)](_0x47b44c(0x77));if(!!_0x54efd4[_0x47b44c(0xaa)]!==!!_0x54efd4[_0x47b44c(0x8b)])throw CliErrors['validation'](_0x47b44c(0xa6));const _0x3a5f73=_0x345a74[_0x47b44c(0xb4)](_0x47b44c(0x9c))?_0x47b44c(0x9c):_0x47b44c(0x91),_0x5572ae=readScopedConfig(_0x3a5f73);for(const _0x184c04 of DOMAIN_CONFIG_FIELDS)delete _0x5572ae[_0x184c04];for(const _0x1da9c8 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x5572ae[_0x1da9c8];delete _0x5572ae['routing'];let _0x2215df=null;if(_0x2850ec)delete _0x5572ae[_0x47b44c(0x79)],_0x1a455f[_0x47b44c(0xae)]===_0x47b44c(0x97)?_0x5572ae[_0x47b44c(0x84)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x1a455f['manifestDomains'],'cdn':_0x1a455f[_0x47b44c(0x8d)]}:Object[_0x47b44c(0xab)](_0x5572ae,_0x54efd4);else{_0x2215df=await resolveRegion(_0x345a74);if(_0x2215df===DEFAULT_LOVRABET_REGION)delete _0x5572ae[_0x47b44c(0x79)];else _0x5572ae[_0x47b44c(0x79)]=_0x2215df;}return writeScopedConfig(_0x5572ae,_0x3a5f73),{'ok':!![],'message':_0x2850ec?_0x47b44c(0xa9)+Object[_0x47b44c(0x90)](_0x1a455f[_0x47b44c(0xae)]===_0x47b44c(0x97)?_0x1a455f[_0x47b44c(0x88)]:_0x54efd4)[_0x47b44c(0x9a)](',\x20')+'.':_0x47b44c(0x98)+_0x2215df+'.','data':{'mode':_0x2850ec?_0x47b44c(0xb3):_0x47b44c(0x8f),'protocol':_0x1a455f[_0x47b44c(0xae)]===_0x47b44c(0x97)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2215df,'domains':_0x54efd4,'cdn':_0x1a455f[_0x47b44c(0xae)]===_0x47b44c(0x97)?_0x1a455f['cdn']:undefined}};}export const configInitDefinition={'service':a54_0x56d57d(0x7c),'command':a54_0x56d57d(0x9e),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a54_0x56d57d(0x95),'confirmationDescription':a54_0x56d57d(0x81),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a55_0x3984(){const _0x2892cc=['473352HpmsnJ','global','4638vnCMKV','117vuGBUN','List\x20all\x20config\x20values','boolean','2770156uDNWwr','9514869hIZQPK','38680660PofELu','1zUvoZw','5021612shMWOV','1964679YNowxI','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','4015fzqGpF'];a55_0x3984=function(){return _0x2892cc;};return a55_0x3984();}const a55_0x44c0d1=a55_0x5a1e;function a55_0x5a1e(_0x45c7c2,_0x157928){_0x45c7c2=_0x45c7c2-0x145;const _0x398473=a55_0x3984();let _0x5a1e68=_0x398473[_0x45c7c2];return _0x5a1e68;}(function(_0x4ccdd1,_0x59b2c3){const _0x30e97a=a55_0x5a1e,_0xf9c224=_0x4ccdd1();while(!![]){try{const _0x3530dc=-parseInt(_0x30e97a(0x14e))/0x1*(-parseInt(_0x30e97a(0x14b))/0x2)+parseInt(_0x30e97a(0x150))/0x3+parseInt(_0x30e97a(0x14f))/0x4+-parseInt(_0x30e97a(0x152))/0x5*(parseInt(_0x30e97a(0x147))/0x6)+parseInt(_0x30e97a(0x14c))/0x7+parseInt(_0x30e97a(0x145))/0x8*(parseInt(_0x30e97a(0x148))/0x9)+-parseInt(_0x30e97a(0x14d))/0xa;if(_0x3530dc===_0x59b2c3)break;else _0xf9c224['push'](_0xf9c224['shift']());}catch(_0x2e0428){_0xf9c224['push'](_0xf9c224['shift']());}}}(a55_0x3984,0xe448d));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x5b7aeb){const _0x29c7c4=a55_0x5a1e,_0x23fd83=_0x5b7aeb['bool'](_0x29c7c4(0x146))?readScopedConfig(_0x29c7c4(0x146)):readConfig();return{'ok':!![],'data':_0x23fd83};}export const configListDefinition={'service':'config','command':'list','description':a55_0x44c0d1(0x149),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x44c0d1(0x146),'type':a55_0x44c0d1(0x14a),'description':a55_0x44c0d1(0x151),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x3a5745=a56_0x9f66;(function(_0x791655,_0x59adaf){const _0xd45b9b=a56_0x9f66,_0x4a7e0b=_0x791655();while(!![]){try{const _0x5133b0=parseInt(_0xd45b9b(0x14c))/0x1*(parseInt(_0xd45b9b(0x15a))/0x2)+-parseInt(_0xd45b9b(0x150))/0x3+-parseInt(_0xd45b9b(0x15f))/0x4*(-parseInt(_0xd45b9b(0x154))/0x5)+-parseInt(_0xd45b9b(0x15c))/0x6*(parseInt(_0xd45b9b(0x142))/0x7)+parseInt(_0xd45b9b(0x159))/0x8+-parseInt(_0xd45b9b(0x148))/0x9*(-parseInt(_0xd45b9b(0x136))/0xa)+parseInt(_0xd45b9b(0x13a))/0xb*(parseInt(_0xd45b9b(0x161))/0xc);if(_0x5133b0===_0x59adaf)break;else _0x4a7e0b['push'](_0x4a7e0b['shift']());}catch(_0x1c78c9){_0x4a7e0b['push'](_0x4a7e0b['shift']());}}}(a56_0x454b,0xee2e4));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a56_0x9f66(_0x486fe0,_0x6c4b2c){_0x486fe0=_0x486fe0-0x134;const _0x454b79=a56_0x454b();let _0x9f6626=_0x454b79[_0x486fe0];return _0x9f6626;}function a56_0x454b(){const _0x288cd6=['3685CtdbuP','string','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Usage:\x20','env','6538840wDnlUZ','4664fupVpc','app','24lGzUQt','\x20workspace\x20add\x20<name>\x20--appcode\x20','write','3916vyQiUF','global','546540KLJlwX','boolean','validation','`,\x20`','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','keys','Invalid\x20locale\x20value.','384250bqdyYr','apps','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','value','11HuqvTH','join','\x22\x20is\x20not\x20settable.','Use\x20`','\x20appcode\x20set\x20to:\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','object','\x20set\x20to:\x20','1916327QxOOpl','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','config','includes','key','riskLevel','9CHNmSJ','locale','Invalid\x20value\x20for\x20\x22','\x22.\x20Allowed:\x20','382mvDbtL','Settable\x20top-level\x20keys:\x20','Missing\x20key.','length','1329120scfogK','Global','set','str'];a56_0x454b=function(){return _0x288cd6;};return a56_0x454b();}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0xce0c8){const _0x198e9e=a56_0x9f66,_0x12451c=_0xce0c8[_0x198e9e(0x153)](_0x198e9e(0x146)),_0x60b8a7=_0xce0c8[_0x198e9e(0x153)]('value');if(!_0x12451c)throw CliErrors['validation'](_0x198e9e(0x14e),_0x198e9e(0x157)+CLI_BIN_NAME+_0x198e9e(0x165));if(_0x60b8a7===undefined||_0x60b8a7==='')throw CliErrors[_0x198e9e(0x163)]('Missing\x20value.',_0x198e9e(0x157)+CLI_BIN_NAME+_0x198e9e(0x165));let _0x4ad003=_0x12451c,_0x5bbf4a=_0x60b8a7;if(_0x60b8a7[_0x198e9e(0x14f)]>0x1f4)throw CliErrors[_0x198e9e(0x163)](_0x198e9e(0x143));if(_0x12451c===_0x198e9e(0x147))throw CliErrors[_0x198e9e(0x163)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x12451c))throw CliErrors[_0x198e9e(0x163)]('Top-level\x20key\x20\x22'+_0x12451c+_0x198e9e(0x13c),_0x198e9e(0x14d)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x12451c]&&!CONFIG_ENUM_VALUES[_0x12451c]['includes'](_0x60b8a7))throw CliErrors[_0x198e9e(0x163)](_0x198e9e(0x14a)+_0x12451c+_0x198e9e(0x14b)+CONFIG_ENUM_VALUES[_0x12451c][_0x198e9e(0x13b)](',\x20'));if(_0x12451c==='locale'&&!normalizeLocale(_0x60b8a7))throw CliErrors['validation'](_0x198e9e(0x135),_0x198e9e(0x138));DOMAIN_CONFIG_FIELDS[_0x198e9e(0x145)](_0x12451c)&&(_0x5bbf4a=normalizeDomainOrigin(_0x12451c,_0x60b8a7));const _0x2a9eb5={'global':_0xce0c8['bool'](_0x198e9e(0x160))},_0x3369a8=resolveWriteScope(_0x2a9eb5),_0x16d05f=readScopedConfig(_0x3369a8);_0x12451c===_0x198e9e(0x15b)&&(_0x4ad003='appcode',delete _0x16d05f[_0x198e9e(0x15b)]);_0x12451c===_0x198e9e(0x149)&&(_0x5bbf4a=normalizeLocale(_0x60b8a7));if(_0x12451c==='env'){_0x5bbf4a=normalizeEnv(_0x60b8a7);if(!isProduction(_0x5bbf4a)&&!isDaily(_0x5bbf4a))throw CliErrors[_0x198e9e(0x163)](_0x198e9e(0x13f),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x12451c==='appcode'){const _0x1b4807=_0x16d05f[_0x198e9e(0x137)]&&typeof _0x16d05f[_0x198e9e(0x137)]===_0x198e9e(0x140)?Object[_0x198e9e(0x134)](_0x16d05f[_0x198e9e(0x137)]):[];if(_0x1b4807[_0x198e9e(0x14f)]>0x0)throw CliErrors[_0x198e9e(0x163)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x198e9e(0x13d)+CLI_BIN_NAME+_0x198e9e(0x15d)+_0x5bbf4a+_0x198e9e(0x164)+CLI_BIN_NAME+_0x198e9e(0x156));const _0x6e6779=buildCanonicalProjectConfig({..._0x16d05f},{'appCodes':[_0x5bbf4a],'env':typeof _0x16d05f[_0x198e9e(0x158)]===_0x198e9e(0x155)?_0x16d05f['env']:undefined});writeScopedConfig(_0x6e6779,_0x3369a8);const _0x3f3a3c=_0x3369a8==='global'?_0x198e9e(0x151):'Project';return{'ok':!![],'message':'✓\x20'+_0x3f3a3c+_0x198e9e(0x13e)+_0x5bbf4a+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x16d05f[_0x4ad003]=_0x5bbf4a,writeScopedConfig(_0x16d05f,_0x3369a8);const _0x57f825=_0x3369a8===_0x198e9e(0x160)?_0x198e9e(0x151):'Project';return{'ok':!![],'message':'✓\x20'+_0x57f825+'\x20'+_0x4ad003+_0x198e9e(0x141)+_0x5bbf4a};}export const configSetDefinition={'service':a56_0x3a5745(0x144),'command':a56_0x3a5745(0x152),'description':'Set\x20a\x20config\x20value','risk':a56_0x3a5745(0x15e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x3a5745(0x139),'type':a56_0x3a5745(0x155),'description':'Config\x20value','required':!![]},{'name':a56_0x3a5745(0x160),'type':a56_0x3a5745(0x162),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x25bfb0,_0x191ad1){var _0x30f082=a57_0x28af,_0x5f3212=_0x25bfb0();while(!![]){try{var _0x1e2d5e=parseInt(_0x30f082(0x1e6))/0x1+-parseInt(_0x30f082(0x1ed))/0x2*(parseInt(_0x30f082(0x1f0))/0x3)+-parseInt(_0x30f082(0x1e5))/0x4+parseInt(_0x30f082(0x1f1))/0x5*(parseInt(_0x30f082(0x1e7))/0x6)+parseInt(_0x30f082(0x1eb))/0x7*(-parseInt(_0x30f082(0x1ef))/0x8)+-parseInt(_0x30f082(0x1e8))/0x9+parseInt(_0x30f082(0x1ea))/0xa;if(_0x1e2d5e===_0x191ad1)break;else _0x5f3212['push'](_0x5f3212['shift']());}catch(_0x1e6d68){_0x5f3212['push'](_0x5f3212['shift']());}}}(a57_0xed12,0x5b6e8));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};function a57_0x28af(_0x35cebb,_0x5ced6e){_0x35cebb=_0x35cebb-0x1e3;var _0xed129f=a57_0xed12();var _0x28af4f=_0xed129f[_0x35cebb];return _0x28af4f;}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a57_0xed12(){var _0x30e1ea=['2322144kLYRWq','global','9960940NaGOFr','91uQTDqz','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','640086kkgTBW','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','162736KvmdDS','6QzWHeN','2653315OrSMMl','project','validation','2440316aFwOUj','620374egdSXD','6DhhNxo'];a57_0xed12=function(){return _0x30e1ea;};return a57_0xed12();}export function resolveWriteScope(_0x2b7d16){var _0x4ddb7c=a57_0x28af;if(_0x2b7d16[_0x4ddb7c(0x1e9)])return _0x4ddb7c(0x1e9);if(!isInProject())throw CliErrors[_0x4ddb7c(0x1e4)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x4ddb7c(0x1ec)+CLI_BIN_NAME+_0x4ddb7c(0x1ee));return _0x4ddb7c(0x1e3);}export function readScopedConfig(_0x399371){return readConfigFile(resolveWriteConfigPath(_0x399371));}export function writeScopedConfig(_0x262f65,_0x2e1dae){writeConfigFile(resolveWriteConfigPath(_0x2e1dae),_0x262f65);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a58_0x42a453=a58_0x1fbd;(function(_0x44b305,_0x1602e0){const _0x90d79f=a58_0x1fbd,_0x330c71=_0x44b305();while(!![]){try{const _0x3d4a2b=parseInt(_0x90d79f(0x151))/0x1*(-parseInt(_0x90d79f(0x180))/0x2)+parseInt(_0x90d79f(0x190))/0x3*(-parseInt(_0x90d79f(0x17b))/0x4)+parseInt(_0x90d79f(0x17a))/0x5+parseInt(_0x90d79f(0x18d))/0x6+-parseInt(_0x90d79f(0x173))/0x7*(-parseInt(_0x90d79f(0x169))/0x8)+parseInt(_0x90d79f(0x165))/0x9*(-parseInt(_0x90d79f(0x178))/0xa)+parseInt(_0x90d79f(0x175))/0xb;if(_0x3d4a2b===_0x1602e0)break;else _0x330c71['push'](_0x330c71['shift']());}catch(_0x42176){_0x330c71['push'](_0x330c71['shift']());}}}(a58_0xb7bc,0xda470));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='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a58_0x42a453(0x166),UNGROUPED_BUSINESS_GROUP=a58_0x42a453(0x181);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x509bbf,input:_0x13ac5b,dryRun:_0x475c09}){const _0x1d0693=a58_0x42a453;validateInput(_0x13ac5b);const _0x5c4d1d=normalizeBusinessGroupArgument(_0x13ac5b[_0x1d0693(0x17d)]),_0x16595f=await getDatasetDetail(_0x13ac5b[_0x1d0693(0x192)]),_0x4ba17e=resolveBusinessGroupDataset(_0x16595f,_0x13ac5b[_0x1d0693(0x192)]);assertBusinessGroupUpdateSupported(_0x4ba17e,_0x5c4d1d);const _0x112f00=loadCurrentBusinessGroup(_0x16595f,_0x4ba17e);assertExpectedBusinessGroup(_0x112f00,_0x13ac5b[_0x1d0693(0x15d)]);const _0x2d3b31=buildBackendPlan(_0x509bbf,_0x4ba17e,_0x5c4d1d),_0x168107=_0x112f00!==_0x5c4d1d;let _0xf0a65a;if(_0x168107&&!_0x475c09){_0x2d3b31[_0x1d0693(0x155)]===_0x1d0693(0x17e)?await updateDbTableBusinessGroup(_0x2d3b31[_0x1d0693(0x177)]):await updateErBusinessGroup(_0x2d3b31[_0x1d0693(0x177)]);const _0x4438a1=await getDatasetDetail(_0x4ba17e['code']),_0x1a2242=resolveBusinessGroupDataset(_0x4438a1,_0x4ba17e['code']),_0x59d2c9=loadCurrentBusinessGroup(_0x4438a1,_0x1a2242);if(_0x59d2c9!==_0x5c4d1d)throw CliErrors[_0x1d0693(0x152)](_0x1d0693(0x183),_0x1d0693(0x158)+JSON[_0x1d0693(0x14a)](displayBusinessGroup(_0x5c4d1d))+',\x20actual\x20'+JSON[_0x1d0693(0x14a)](displayBusinessGroup(_0x59d2c9))+'.');_0xf0a65a={'verified':!![],'status':_0x1d0693(0x16e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x59d2c9)}};}else!_0x168107&&(_0xf0a65a={'verified':!![],'status':_0x1d0693(0x148),'afterReadback':{'businessGroup':displayBusinessGroup(_0x112f00)}});const _0x288a86={'operation':_0x1d0693(0x14f),'appCode':_0x509bbf,'selector':{'code':_0x4ba17e[_0x1d0693(0x192)]},'dataset':{'id':_0x4ba17e['id'],'code':_0x4ba17e[_0x1d0693(0x192)],'name':_0x4ba17e['name'],'sourceType':_0x4ba17e[_0x1d0693(0x14b)]},'before':{'businessGroup':displayBusinessGroup(_0x112f00)},'after':{'businessGroup':displayBusinessGroup(_0x5c4d1d)},'changed':_0x168107,'dryRun':_0x475c09,'submitted':_0x168107&&!_0x475c09,'backend':{'method':_0x2d3b31['method'],'path':_0x2d3b31[_0x1d0693(0x170)],'payload':_0x2d3b31[_0x1d0693(0x177)]},..._0xf0a65a?{'verification':_0xf0a65a}:{},'warnings':[]};return{'ok':!![],'data':_0x288a86,'message':_0x168107?_0x475c09?_0x1d0693(0x18b)+_0x4ba17e[_0x1d0693(0x192)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x4ba17e[_0x1d0693(0x192)]:_0x1d0693(0x159)+_0x4ba17e[_0x1d0693(0x192)]};}export const datasetBusinessGroupUpdate={'service':a58_0x42a453(0x16b),'command':'business-group-update','description':'Update\x20business\x20scenario\x20group','risk':a58_0x42a453(0x168),'flags':[CODE_FLAG,{'name':a58_0x42a453(0x154),'type':a58_0x42a453(0x147),'required':!![],'description':a58_0x42a453(0x182)},{'name':a58_0x42a453(0x15c),'type':a58_0x42a453(0x147),'required':![],'description':a58_0x42a453(0x15f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d4b94){validateInput(readBusinessGroupUpdateInput(_0x3d4b94));},async 'dryRun'(_0x657df2){const _0x20ce91=a58_0x42a453,_0x961eff=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x657df2['appCode'],'input':readBusinessGroupUpdateInput(_0x657df2),'dryRun':!![]});return{'method':_0x961eff[_0x20ce91(0x14e)]['backend'][_0x20ce91(0x16c)],'url':_0x961eff[_0x20ce91(0x14e)][_0x20ce91(0x163)][_0x20ce91(0x170)],'body':_0x961eff['data']['backend'][_0x20ce91(0x177)],'description':_0x961eff[_0x20ce91(0x193)],..._0x961eff[_0x20ce91(0x14e)]};},async 'execute'(_0x1af9fc){const _0xbc7a27=a58_0x42a453;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1af9fc[_0xbc7a27(0x185)],'input':readBusinessGroupUpdateInput(_0x1af9fc),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x5beb1d){const _0xeceeb8=a58_0x42a453,_0x3216ec=_0x5beb1d[_0xeceeb8(0x188)]('expect-business-group');return{'code':trim(_0x5beb1d[_0xeceeb8(0x188)](_0xeceeb8(0x192))),'businessGroup':_0x5beb1d[_0xeceeb8(0x188)]('business-group'),'expectBusinessGroup':_0x3216ec===undefined||_0x3216ec===''?undefined:_0x3216ec};}function validateInput(_0x59fb7d){const _0x4a3c78=a58_0x42a453;if(!trim(_0x59fb7d[_0x4a3c78(0x192)]))throw CliErrors['validation']('--code\x20is\x20required');if(_0x59fb7d[_0x4a3c78(0x17d)]===undefined)throw CliErrors['validation']('--business-group\x20is\x20required');if(!trim(_0x59fb7d[_0x4a3c78(0x17d)]))throw CliErrors[_0x4a3c78(0x18c)](_0x4a3c78(0x172));}function assertBusinessGroupUpdateSupported(_0x26915d,_0x170efe){const _0x19d9f1=a58_0x42a453;if(_0x26915d[_0x19d9f1(0x14b)]==='DB_TABLE'&&!_0x170efe)throw CliErrors['validation'](_0x19d9f1(0x191));}function resolveBusinessGroupDataset(_0x2c7eca,_0x9822b1){const _0x5d4f7b=a58_0x42a453,_0x43ba72=asPlainObject(_0x2c7eca[_0x5d4f7b(0x16b)]),_0x5c57eb=asPlainObject(_0x2c7eca[_0x5d4f7b(0x14d)]),_0x53908d=resolveSourceType(_0x2c7eca,_0x43ba72,_0x5c57eb),_0x47b5eb=firstString(_0x2c7eca[_0x5d4f7b(0x14c)],_0x2c7eca[_0x5d4f7b(0x192)],_0x43ba72[_0x5d4f7b(0x157)],_0x9822b1)||_0x9822b1;return{'id':firstNumber(_0x2c7eca[_0x5d4f7b(0x164)],_0x2c7eca['id'],_0x43ba72[_0x5d4f7b(0x189)])??firstString(_0x2c7eca[_0x5d4f7b(0x164)],_0x2c7eca['id'],_0x43ba72[_0x5d4f7b(0x189)])??null,'code':_0x47b5eb,'name':firstString(_0x2c7eca[_0x5d4f7b(0x194)],_0x43ba72[_0x5d4f7b(0x160)],_0x43ba72[_0x5d4f7b(0x194)])||null,'sourceType':_0x53908d,'dbTableSelector':_0x53908d==='DB_TABLE'?{'dbLinkId':firstNumber(_0x5c57eb['dbId']),'tableName':firstString(_0x5c57eb[_0x5d4f7b(0x18e)])||null}:null};}function resolveSourceType(_0x168442,_0xb7774d,_0x27d9b0){const _0x5b9f89=a58_0x42a453,_0x37ab91=firstString(_0x168442[_0x5b9f89(0x174)],_0x168442[_0x5b9f89(0x14b)],_0xb7774d['source'],_0xb7774d[_0x5b9f89(0x14b)])?.[_0x5b9f89(0x18f)]()['toUpperCase']();if(_0x37ab91===_0x5b9f89(0x153)||_0x37ab91===_0x5b9f89(0x167))return _0x37ab91;if(Object[_0x5b9f89(0x15a)](_0x27d9b0)[_0x5b9f89(0x179)]>0x0)return _0x5b9f89(0x153);throw CliErrors['validation'](_0x5b9f89(0x149));}function loadCurrentBusinessGroup(_0x15db27,_0x2f7fc1){const _0x52e660=a58_0x42a453,_0x3911c9=readBusinessGroupFromDatasetDetail(_0x15db27,_0x2f7fc1[_0x52e660(0x14b)]);if(_0x3911c9[_0x52e660(0x156)])return normalizeBusinessGroup(_0x3911c9[_0x52e660(0x184)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5e86b0,_0x111452){const _0xe6269c=a58_0x42a453,_0x394a1d=asPlainObject(_0x5e86b0[_0xe6269c(0x16b)]),_0x44da7e=firstPresent(_0x5e86b0[_0xe6269c(0x17d)]);if(_0x44da7e[_0xe6269c(0x156)])return _0x44da7e;const _0x209f3d=firstPresent(_0x394a1d['businessGroup']);if(_0x209f3d[_0xe6269c(0x156)])return _0x209f3d;if(_0x111452==='DB_TABLE')return{'found':![]};const _0xbec6c2=readBusinessGroupFromExtend(_0x5e86b0[_0xe6269c(0x15e)]);if(_0xbec6c2[_0xe6269c(0x156)])return _0xbec6c2;return readBusinessGroupFromExtend(_0x394a1d[_0xe6269c(0x15e)]);}function readBusinessGroupFromExtend(_0x4ea1f9){const _0x5a80c1=a58_0x42a453;if(_0x4ea1f9===undefined||_0x4ea1f9===null||_0x4ea1f9==='')return{'found':![]};if(typeof _0x4ea1f9===_0x5a80c1(0x147))try{const _0x15facc=JSON[_0x5a80c1(0x16d)](_0x4ea1f9);return readBusinessGroupFromExtend(_0x15facc);}catch{return{'found':![]};}const _0x50366e=asPlainObject(_0x4ea1f9);if(Object[_0x5a80c1(0x17f)][_0x5a80c1(0x176)][_0x5a80c1(0x187)](_0x50366e,_0x5a80c1(0x17d)))return{'found':!![],'value':_0x50366e[_0x5a80c1(0x17d)]};return{'found':![]};}function firstPresent(..._0x4a7ecf){for(const _0x4b0b19 of _0x4a7ecf){if(_0x4b0b19!==undefined&&_0x4b0b19!==null)return{'found':!![],'value':_0x4b0b19};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3d0017,_0x6cbf2c){const _0x292b8d=a58_0x42a453;if(_0x6cbf2c===undefined)return;const _0x2e1036=normalizeBusinessGroupArgument(_0x6cbf2c);if(_0x3d0017!==_0x2e1036)throw CliErrors[_0x292b8d(0x18c)](_0x292b8d(0x186),_0x292b8d(0x158)+JSON[_0x292b8d(0x14a)](_0x2e1036)+_0x292b8d(0x18a)+JSON[_0x292b8d(0x14a)](_0x3d0017));}function buildBackendPlan(_0x808ce9,_0x1febe5,_0x2023fb){const _0x2825d1=a58_0x42a453;if(_0x1febe5['sourceType']===_0x2825d1(0x153)){if(!_0x1febe5['dbTableSelector']||_0x1febe5['dbTableSelector'][_0x2825d1(0x15b)]===null||!_0x1febe5[_0x2825d1(0x150)]['tableName'])throw CliErrors[_0x2825d1(0x18c)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x2825d1(0x162));return{'kind':_0x2825d1(0x17e),'method':_0x2825d1(0x161),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x1febe5[_0x2825d1(0x150)][_0x2825d1(0x15b)],'tableName':_0x1febe5[_0x2825d1(0x150)][_0x2825d1(0x18e)],'businessGroup':_0x2023fb}};}return{'kind':_0x2825d1(0x17c),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x808ce9,'datasetCode':_0x1febe5['code'],'businessGroup':_0x2023fb}};}function normalizeBusinessGroup(_0x2a4c41){const _0x58c133=a58_0x42a453;if(_0x2a4c41===undefined||_0x2a4c41===null)return'';return String(_0x2a4c41)[_0x58c133(0x18f)]();}function normalizeBusinessGroupArgument(_0x15a807){const _0x2f0a11=normalizeBusinessGroup(_0x15a807);return _0x2f0a11===UNGROUPED_BUSINESS_GROUP?'':_0x2f0a11;}function a58_0x1fbd(_0x5b6b96,_0x37e744){_0x5b6b96=_0x5b6b96-0x147;const _0xb7bc16=a58_0xb7bc();let _0x1fbd8d=_0xb7bc16[_0x5b6b96];return _0x1fbd8d;}function displayBusinessGroup(_0x43d81e){return _0x43d81e||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x3e2bfe){const _0x13a1ea=a58_0x42a453;if(!_0x3e2bfe||typeof _0x3e2bfe!==_0x13a1ea(0x171)||Array['isArray'](_0x3e2bfe))return{};return _0x3e2bfe;}function firstString(..._0x135bf6){const _0x4286f5=a58_0x42a453;for(const _0x46ec1a of _0x135bf6){if(typeof _0x46ec1a===_0x4286f5(0x147)&&_0x46ec1a[_0x4286f5(0x18f)]())return _0x46ec1a['trim']();if(typeof _0x46ec1a==='number'&&Number[_0x4286f5(0x16a)](_0x46ec1a))return String(_0x46ec1a);}return undefined;}function firstNumber(..._0x4c61d8){const _0x60e2db=a58_0x42a453;for(const _0x47b3ad of _0x4c61d8){if(typeof _0x47b3ad===_0x60e2db(0x16f)&&Number[_0x60e2db(0x16a)](_0x47b3ad))return _0x47b3ad;if(typeof _0x47b3ad===_0x60e2db(0x147)&&_0x47b3ad[_0x60e2db(0x18f)]()&&Number[_0x60e2db(0x16a)](Number(_0x47b3ad)))return Number(_0x47b3ad);}return null;}function a58_0xb7bc(){const _0x55a53c=['7586610DaAsrt','tableName','trim','9FbvdCF','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','code','message','name','string','unchanged','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','stringify','sourceType','modelCode','dbtableConfig','data','update','dbTableSelector','52356hCuMKO','apiError','DB_TABLE','business-group','kind','found','datasetCode','Expected\x20','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','keys','dbLinkId','expect-business-group','expectBusinessGroup','extend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','datasetName','POST','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','backend','modelId','549INxeQO','/smartapi/question/er-config/business-group/edit','METADATA','write','320104fBkzNQ','isFinite','dataset','method','parse','matched','number','path','object','--business-group\x20must\x20not\x20be\x20blank','259rbIryM','source','5991029zuxEnu','hasOwnProperty','payload','13240KUBrvI','length','2724455CNfvig','1439352ILFkOA','metadata','businessGroup','db-table','prototype','68zgzGFP','ungrouped','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','value','appCode','Expectation\x20mismatch\x20at\x20businessGroup','call','str','datasetId',',\x20actual\x20','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','validation'];a58_0xb7bc=function(){return _0x55a53c;};return a58_0xb7bc();}function trim(_0x39bedb){const _0x3d4a62=a58_0x42a453;return String(_0x39bedb||'')[_0x3d4a62(0x18f)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0xf4a8a1=a59_0x1b10;(function(_0x402fd5,_0xc9b426){const _0x31a68a=a59_0x1b10,_0x18f4e4=_0x402fd5();while(!![]){try{const _0x2f2e67=parseInt(_0x31a68a(0x1aa))/0x1*(-parseInt(_0x31a68a(0x1a4))/0x2)+-parseInt(_0x31a68a(0x1ae))/0x3+parseInt(_0x31a68a(0x1b7))/0x4+-parseInt(_0x31a68a(0x1b3))/0x5*(parseInt(_0x31a68a(0x1b2))/0x6)+-parseInt(_0x31a68a(0x1ac))/0x7+parseInt(_0x31a68a(0x1b1))/0x8*(parseInt(_0x31a68a(0x1ad))/0x9)+parseInt(_0x31a68a(0x1b0))/0xa;if(_0x2f2e67===_0xc9b426)break;else _0x18f4e4['push'](_0x18f4e4['shift']());}catch(_0x21d0b8){_0x18f4e4['push'](_0x18f4e4['shift']());}}}(a59_0x189d,0x6fae6));function a59_0x189d(){const _0x3daa2d=['num','groups','2007660MzWrlG','business-groups','number','106072iJIyMw','length','ungrouped','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','trim','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','1aypPpp','appCode','458346IuHmFx','2411181JFRxmg','1925052PxFKRq','businessGroup','5476770POybpc','16pQAMpR','12hLOUMI','919415lTEsvu','dbid'];a59_0x189d=function(){return _0x3daa2d;};return a59_0x189d();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0x1b10(_0x2315ef,_0x244147){_0x2315ef=_0x2315ef-0x1a2;const _0x189d7c=a59_0x189d();let _0x1b10db=_0x189d7c[_0x2315ef];return _0x1b10db;}import{getErBusinessGroupSummary}from'../../core/api-client.js';export const datasetBusinessGroups={'service':'dataset','command':a59_0xf4a8a1(0x1a2),'description':a59_0xf4a8a1(0x1a9),'risk':'read','flags':[{'name':a59_0xf4a8a1(0x1b4),'type':a59_0xf4a8a1(0x1a3),'required':!![],'description':a59_0xf4a8a1(0x1a7)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x489cf5){const _0x515ad9=a59_0xf4a8a1,_0x1b5ff4=_0x489cf5[_0x515ad9(0x1b5)]('dbid'),_0x51dc99=await getErBusinessGroupSummary(_0x489cf5[_0x515ad9(0x1ab)],_0x1b5ff4),_0x5dfc42=_0x51dc99[_0x515ad9(0x1b6)]['map'](_0x11e697=>({..._0x11e697,'businessGroup':_0x11e697[_0x515ad9(0x1af)][_0x515ad9(0x1a8)]()||_0x515ad9(0x1a6)}));return{'ok':!![],'data':{..._0x51dc99,'groups':_0x5dfc42,'scope':'DB_TABLE'},'message':'Found\x20'+_0x5dfc42[_0x515ad9(0x1a5)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x1b5ff4};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a60_0x5e32(_0x433ff1,_0x474db0){_0x433ff1=_0x433ff1-0x171;const _0x4d312f=a60_0x4d31();let _0x5e3259=_0x4d312f[_0x433ff1];return _0x5e3259;}function a60_0x4d31(){const _0x21cee1=['75950WYRuIz','datasetCode','113302gsxMRu','603394NkdyUc','3873368DOBQdx','code','\x20is\x20','UNKNOWN','join','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','length','trim','METADATA','validation','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','unknown','1721395jKESJF','dbtable','datasetName','dbId','18LugePV','source','tableName','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','527436qQrgjF','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','sourceType','dataset','667458dpyuXt','lovrabet','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','12Sjbzqq','object','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','name','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','filter','The\x20current\x20dataset\x20\x22'];a60_0x4d31=function(){return _0x21cee1;};return a60_0x4d31();}const a60_0x2cd97c=a60_0x5e32;(function(_0x3b645a,_0x248d88){const _0x48fb20=a60_0x5e32,_0x5c9a6e=_0x3b645a();while(!![]){try{const _0x24e2e3=-parseInt(_0x48fb20(0x18e))/0x1+parseInt(_0x48fb20(0x18b))/0x2+parseInt(_0x48fb20(0x181))/0x3+parseInt(_0x48fb20(0x17d))/0x4+-parseInt(_0x48fb20(0x175))/0x5+parseInt(_0x48fb20(0x184))/0x6*(-parseInt(_0x48fb20(0x18d))/0x7)+parseInt(_0x48fb20(0x18f))/0x8*(parseInt(_0x48fb20(0x179))/0x9);if(_0x24e2e3===_0x248d88)break;else _0x5c9a6e['push'](_0x5c9a6e['shift']());}catch(_0x3a1480){_0x5c9a6e['push'](_0x5c9a6e['shift']());}}}(a60_0x4d31,0x5cec9));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x2cd97c(0x182),'filter':a60_0x2cd97c(0x183),'getOne':a60_0x2cd97c(0x194)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x2cd97c(0x17c);function valueToString(_0x50c19e){const _0x3fe5ac=a60_0x2cd97c;return _0x50c19e==null?'':String(_0x50c19e)[_0x3fe5ac(0x196)]();}function getDatasetCode(_0x300ae5){const _0x119274=a60_0x2cd97c;return valueToString(_0x300ae5[_0x119274(0x190)]??_0x300ae5['modelCode']??_0x300ae5['dataset']?.[_0x119274(0x18c)]);}function getDatasetName(_0x3dc0b1){const _0x1a3687=a60_0x2cd97c;return valueToString(_0x3dc0b1[_0x1a3687(0x187)]??_0x3dc0b1[_0x1a3687(0x180)]?.[_0x1a3687(0x177)])||_0x1a3687(0x174);}function getDatasetSource(_0x4fba06){const _0x346afd=a60_0x2cd97c;return valueToString(_0x4fba06[_0x346afd(0x17a)]??_0x4fba06[_0x346afd(0x180)]?.[_0x346afd(0x17f)])['toUpperCase']();}function getDbtableConfig(_0x3be39e){const _0x319b5b=a60_0x2cd97c,_0xf54903=_0x3be39e['dbtableConfig']??_0x3be39e[_0x319b5b(0x176)];return _0xf54903&&typeof _0xf54903===_0x319b5b(0x185)?_0xf54903:{};}export function isDbTableBackedDataset(_0x5c38ae){const _0x58e642=a60_0x2cd97c,_0x38163b=getDatasetSource(_0x5c38ae);if(_0x38163b===_0x58e642(0x171))return![];const _0x438e9e=getDbtableConfig(_0x5c38ae),_0x462daf=_0x438e9e[_0x58e642(0x178)]??_0x438e9e['id'],_0x14dc10=valueToString(_0x438e9e[_0x58e642(0x17b)]??_0x5c38ae[_0x58e642(0x17b)]??_0x5c38ae[_0x58e642(0x180)]?.[_0x58e642(0x17b)]);return _0x462daf!==undefined&&_0x462daf!==null&&_0x14dc10[_0x58e642(0x195)]>0x0;}export function filterDbTableBackedDatasets(_0x529f4b){const _0x3ceb84=a60_0x2cd97c;return _0x529f4b[_0x3ceb84(0x189)](_0x43ccf6=>isDbTableBackedDataset(_0x43ccf6));}export function buildDbTableBackedRequirementMessage(_0x4c0a83,_0x46db7f='SQL\x20schema\x20validation'){const _0x3ff954=a60_0x2cd97c,_0xcbf055=getDatasetSource(_0x4c0a83)||_0x3ff954(0x192),_0x4ab659=getDatasetName(_0x4c0a83),_0x2a42ee=getDatasetCode(_0x4c0a83),_0x434f2f=_0x2a42ee?'\x20('+_0x2a42ee+')':'';return[_0x3ff954(0x18a)+_0x4ab659+'\x22'+_0x434f2f+_0x3ff954(0x191)+_0xcbf055+_0x3ff954(0x186)+_0x46db7f+'.',_0x3ff954(0x173),_0x3ff954(0x17e),_0x3ff954(0x188)+RUNTIME_DATA_ACCESS_COMMANDS[_0x3ff954(0x189)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.'][_0x3ff954(0x193)]('\x20');}export function assertDatasetIsDbTableBacked(_0x13e304,_0x203e3f){const _0x761351=a60_0x2cd97c;if(!isDbTableBackedDataset(_0x13e304))throw CliErrors[_0x761351(0x172)](buildDbTableBackedRequirementMessage(_0x13e304,_0x203e3f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a61_0x41bf(_0x252de6,_0x5def15){_0x252de6=_0x252de6-0x192;const _0x20735b=a61_0x2073();let _0x41bfe6=_0x20735b[_0x252de6];return _0x41bfe6;}const a61_0x218c1d=a61_0x41bf;function a61_0x2073(){const _0x1e44fb=['dbid','isArray','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','\x20failed','confirm','1426125fLgrfx','5139710BLEvRk','Matched\x20','dbtableConfig','cascade','push','code','object','\x20dataset(s)','validation','relatedPageInfoList','expected-count','type','description','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','dataset','Would\x20delete\x20','1654135mYwTYM','map','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','9SkuBDP','length','3018930waEwdN','delete','dbId','true','\x20--appcode\x20','num','relatedPages','Deleted\x20','message','No\x20undeleted\x20dataset\x20found\x20for\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','appCode','6624840dVMNDQ','deleted','boolean','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20dataset(s);\x20','add','24qXkLRj','number','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','8kdbetX','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','425738htOxSN','1892620sZTuNA','false','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','filter','dbName','Dataset\x20id','bool','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','name'];a61_0x2073=function(){return _0x1e44fb;};return a61_0x2073();}(function(_0x334d94,_0x3d0f14){const _0x5ecdbc=a61_0x41bf,_0x119372=_0x334d94();while(!![]){try{const _0x30f767=parseInt(_0x5ecdbc(0x19a))/0x1+parseInt(_0x5ecdbc(0x19b))/0x2+-parseInt(_0x5ecdbc(0x1a9))/0x3*(-parseInt(_0x5ecdbc(0x198))/0x4)+-parseInt(_0x5ecdbc(0x1cc))/0x5+-parseInt(_0x5ecdbc(0x1c0))/0x6+parseInt(_0x5ecdbc(0x1bb))/0x7*(parseInt(_0x5ecdbc(0x195))/0x8)+-parseInt(_0x5ecdbc(0x1be))/0x9*(parseInt(_0x5ecdbc(0x1aa))/0xa);if(_0x30f767===_0x3d0f14)break;else _0x119372['push'](_0x119372['shift']());}catch(_0x1d2ec4){_0x119372['push'](_0x119372['shift']());}}}(a61_0x2073,0xa85d3));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x218c1d(0x196),'description':a61_0x218c1d(0x1a0)},DBID_FLAG={'name':'dbid','type':a61_0x218c1d(0x196),'description':a61_0x218c1d(0x197)},CONFIRM_FLAG={'name':a61_0x218c1d(0x1a8),'type':a61_0x218c1d(0x1ce),'description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':a61_0x218c1d(0x1ad),'type':a61_0x218c1d(0x1ce),'description':a61_0x218c1d(0x1bd)},EXPECTED_COUNT_FLAG={'name':a61_0x218c1d(0x1b4),'type':a61_0x218c1d(0x196),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':a61_0x218c1d(0x1b9),'command':a61_0x218c1d(0x1c1),'description':a61_0x218c1d(0x1b7),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x39f8e2){const _0x139466=a61_0x218c1d,_0x3f0487=_0x39f8e2[_0x139466(0x1c5)]('id'),_0x5e3d78=_0x39f8e2['str'](_0x139466(0x1af)),_0x41f4a3=_0x39f8e2[_0x139466(0x1c5)](_0x139466(0x1a4)),_0x212aab=[_0x3f0487>0x0,Boolean(_0x5e3d78),_0x41f4a3>0x0][_0x139466(0x19e)](Boolean);if(_0x212aab['length']===0x0)throw CliErrors[_0x139466(0x1b2)](_0x139466(0x192));if(_0x212aab['length']>0x1)throw CliErrors[_0x139466(0x1b2)](_0x139466(0x19d));},async 'dryRun'(_0x2fb4a5){const _0x3e1044=a61_0x218c1d,_0xe0389d=await resolveTargets(_0x2fb4a5),_0x1f582d=_0x2fb4a5[_0x3e1044(0x1a1)]('cascade');return{'method':'POST','url':'/smartapi/dataset/delete?cascade='+(_0x1f582d?_0x3e1044(0x1c3):_0x3e1044(0x19c)),'body':{'count':_0xe0389d[_0x3e1044(0x1bf)],'cascade':_0x1f582d,'datasets':_0xe0389d},'description':_0x1f582d?_0x3e1044(0x1ba)+_0xe0389d['length']+_0x3e1044(0x1a6):'Would\x20safely\x20delete\x20'+_0xe0389d[_0x3e1044(0x1bf)]+_0x3e1044(0x1a2)};},async 'execute'(_0x143f36){const _0x4b559e=a61_0x218c1d;if(!_0x143f36['bool'](_0x4b559e(0x1a8)))throw CliErrors[_0x4b559e(0x1b2)](_0x4b559e(0x1ca),_0x4b559e(0x1b8));const _0x4bc070=await resolveTargets(_0x143f36),_0x8a379=_0x143f36['bool'](_0x4b559e(0x1ad)),_0x5afc49=[],_0x4ac689=[];for(const _0x1be3c3 of _0x4bc070){try{await deleteDataset(_0x1be3c3['id'],_0x8a379),_0x5afc49[_0x4b559e(0x1ae)](_0x1be3c3);}catch(_0x1adda5){_0x4ac689[_0x4b559e(0x1ae)]({..._0x1be3c3,'error':_0x1adda5 instanceof Error?_0x1adda5[_0x4b559e(0x1c8)]:String(_0x1adda5)});}}if(_0x4ac689['length']>0x0){const _0x441a89=buildPageRestoreCommands(_0x143f36['appCode'],_0x8a379?_0x5afc49:[]);return{'ok':![],'data':{'requested':_0x4bc070['length'],'cascade':_0x8a379,'deletedCount':_0x5afc49['length'],'failedCount':_0x4ac689[_0x4b559e(0x1bf)],'deleted':_0x5afc49,'failed':_0x4ac689,'pageRestoreCommands':_0x441a89},'message':_0x4b559e(0x1c7)+_0x5afc49[_0x4b559e(0x1bf)]+'/'+_0x4bc070['length']+_0x4b559e(0x193)+_0x4ac689['length']+_0x4b559e(0x1a7)};}return{'ok':!![],'data':{'requested':_0x4bc070[_0x4b559e(0x1bf)],'cascade':_0x8a379,'deletedCount':_0x5afc49[_0x4b559e(0x1bf)],'deleted':_0x5afc49,'pageRestoreCommands':buildPageRestoreCommands(_0x143f36[_0x4b559e(0x1cb)],_0x8a379?_0x5afc49:[])},'message':_0x4b559e(0x1c7)+_0x5afc49[_0x4b559e(0x1bf)]+_0x4b559e(0x1b1)};}};async function resolveTargets(_0x45b2fc){const _0x5cc38a=a61_0x218c1d,_0x29be02=_0x45b2fc[_0x5cc38a(0x1c5)]('id'),_0x2756f3=_0x45b2fc['str'](_0x5cc38a(0x1af)),_0x19ba90=_0x45b2fc['num']('dbid');let _0x34c32b;_0x2756f3?(_0x34c32b=await listDatasets(_0x45b2fc[_0x5cc38a(0x1cb)],{'code':_0x2756f3}),_0x34c32b=_0x34c32b['filter'](_0x22aa1f=>_0x22aa1f[_0x5cc38a(0x1af)]===_0x2756f3)):(_0x34c32b=await listDatasets(_0x45b2fc[_0x5cc38a(0x1cb)]),_0x29be02>0x0&&(_0x34c32b=_0x34c32b[_0x5cc38a(0x19e)](_0x4a8c80=>_0x4a8c80['id']===_0x29be02)),_0x19ba90>0x0&&(_0x34c32b=_0x34c32b[_0x5cc38a(0x19e)](_0x5cc999=>_0x5cc999[_0x5cc38a(0x1ac)]?.[_0x5cc38a(0x1c2)]===_0x19ba90)));const _0x28d6c=[];for(const _0x26f149 of _0x34c32b){const _0x2f4211=await getDatasetDetail(_0x26f149['code']),_0x39927a=Array[_0x5cc38a(0x1a5)](_0x2f4211[_0x5cc38a(0x1b3)])?_0x2f4211[_0x5cc38a(0x1b3)][_0x5cc38a(0x19e)](_0x2e9909=>_0x2e9909!=null&&typeof _0x2e9909===_0x5cc38a(0x1b0)&&_0x2e9909[_0x5cc38a(0x1cd)]!==!![]):[];_0x28d6c['push'](normalizeTarget(_0x26f149,_0x39927a));}if(_0x28d6c['length']===0x0){const _0x5e7d27=_0x2756f3||(_0x29be02>0x0?'id='+_0x29be02:'dbid='+_0x19ba90);throw CliErrors[_0x5cc38a(0x1b2)](_0x5cc38a(0x1c9)+_0x5e7d27+'.');}const _0x52c3ae=_0x45b2fc[_0x5cc38a(0x1c5)](_0x5cc38a(0x1b4));if(_0x52c3ae>0x0&&_0x28d6c[_0x5cc38a(0x1bf)]!==_0x52c3ae)throw CliErrors[_0x5cc38a(0x1b2)](_0x5cc38a(0x1ab)+_0x28d6c[_0x5cc38a(0x1bf)]+_0x5cc38a(0x199)+_0x52c3ae+'.');return _0x28d6c;}function normalizeTarget(_0x15d32c,_0x5d2e40){const _0x1a52c1=a61_0x218c1d,_0x36e1ca=_0x15d32c['dbtableConfig']??{},_0x3e6101=_0x5d2e40[_0x1a52c1(0x1bc)](_0x1536f4=>{const _0x42d9cd=_0x1a52c1;if(_0x1536f4==null||typeof _0x1536f4!=='object')return null;const _0x388f4a=_0x1536f4,_0x5e4fe3=Number(_0x388f4a['id']);if(!Number['isInteger'](_0x5e4fe3)||_0x5e4fe3<=0x0)return null;const _0x9556dc=_0x388f4a['title']??_0x388f4a[_0x42d9cd(0x1a3)];return{'id':_0x5e4fe3,..._0x9556dc?{'name':String(_0x9556dc)}:{},..._0x388f4a['type']?{'type':String(_0x388f4a[_0x42d9cd(0x1b5)])}:{}};})[_0x1a52c1(0x19e)](_0x281f2a=>_0x281f2a!==null);return{'id':_0x15d32c['id'],'code':_0x15d32c[_0x1a52c1(0x1af)],'name':_0x15d32c[_0x1a52c1(0x1a3)],'description':_0x15d32c[_0x1a52c1(0x1b6)],'source':_0x15d32c['source'],'dbId':_0x36e1ca[_0x1a52c1(0x1c2)],'dbName':_0x36e1ca[_0x1a52c1(0x19f)],'tableName':_0x36e1ca['tableName'],'relatedPageCount':_0x3e6101[_0x1a52c1(0x1bf)],'relatedPages':_0x3e6101};}function buildPageRestoreCommands(_0x156147,_0x22d15a){const _0x2bdd4e=a61_0x218c1d,_0x119e97=new Set();for(const _0x57400f of _0x22d15a){for(const _0x35cef9 of _0x57400f[_0x2bdd4e(0x1c6)])_0x119e97[_0x2bdd4e(0x194)](_0x35cef9['id']);}return[..._0x119e97][_0x2bdd4e(0x1bc)](_0x5895a1=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x5895a1+_0x2bdd4e(0x1c4)+_0x156147);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x53bccb=a62_0x7ac0;(function(_0x5058d6,_0x4a5858){const _0x50e9b6=a62_0x7ac0,_0x45fa36=_0x5058d6();while(!![]){try{const _0x319616=-parseInt(_0x50e9b6(0xc8))/0x1*(-parseInt(_0x50e9b6(0xea))/0x2)+parseInt(_0x50e9b6(0x107))/0x3*(parseInt(_0x50e9b6(0xf2))/0x4)+-parseInt(_0x50e9b6(0xd5))/0x5+-parseInt(_0x50e9b6(0x10e))/0x6+parseInt(_0x50e9b6(0x109))/0x7+parseInt(_0x50e9b6(0xeb))/0x8*(-parseInt(_0x50e9b6(0xd3))/0x9)+parseInt(_0x50e9b6(0x10a))/0xa;if(_0x319616===_0x4a5858)break;else _0x45fa36['push'](_0x45fa36['shift']());}catch(_0x26c019){_0x45fa36['push'](_0x45fa36['shift']());}}}(a62_0x5917,0xb2bbc));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x17d135){const _0x385ecf=a62_0x7ac0;if(_0x17d135[_0x385ecf(0xf1)])return null;const _0x7a2994=Boolean(_0x17d135[_0x385ecf(0xf6)]!==undefined||_0x17d135[_0x385ecf(0xd2)]!==undefined);let _0x31fe4b={};if(!_0x7a2994&&typeof _0x17d135[_0x385ecf(0xfa)]==='string')try{_0x31fe4b=JSON['parse'](_0x17d135[_0x385ecf(0xfa)]);}catch{}const _0x48aacf=_0x7a2994?_0x17d135[_0x385ecf(0x10b)]:_0x17d135[_0x385ecf(0xcf)],_0x13eab1=_0x7a2994?_0x17d135['displayName']:_0x17d135['name'],_0x4cc3a7=_0x7a2994?_0x17d135[_0x385ecf(0xd2)]:_0x17d135['type']||_0x17d135['dataType'],_0x55f52a=_0x7a2994?_0x17d135[_0x385ecf(0xe1)]===!![]:_0x31fe4b['pkField']===!![],_0x3cc583=_0x7a2994?_0x17d135['required']===!![]:_0x31fe4b[_0x385ecf(0x106)]===!![],_0x510faf=_0x7a2994?_0x17d135[_0x385ecf(0xfd)]??null:_0x31fe4b['options']??null,_0x4466bd={'name':_0x48aacf,'displayName':_0x13eab1||_0x48aacf,'type':_0x4cc3a7,'dbType':_0x17d135['dbType'],'pk':_0x55f52a,'required':_0x3cc583,'deprecated':_0x17d135[_0x385ecf(0x103)]===!![],'description':_0x17d135['description']||undefined};return Array[_0x385ecf(0xf0)](_0x510faf)&&_0x510faf[_0x385ecf(0xdb)]>0x0&&(_0x4466bd[_0x385ecf(0xfd)]=_0x510faf),_0x4466bd;}function a62_0x7ac0(_0x16b59a,_0x2e88d0){_0x16b59a=_0x16b59a-0xc6;const _0x591774=a62_0x5917();let _0x7ac0f4=_0x591774[_0x16b59a];return _0x7ac0f4;}function parseJsonMaybe(_0x12b818){const _0x50a422=a62_0x7ac0;if(typeof _0x12b818!==_0x50a422(0xe0))return _0x12b818;try{return JSON['parse'](_0x12b818);}catch{return _0x12b818;}}function normalizeOperationEntry(_0x37d5c8,_0x5f6f87){const _0x290dde=a62_0x7ac0;if(!_0x5f6f87||typeof _0x5f6f87!==_0x290dde(0x10f))return null;if(!_0x5f6f87[_0x290dde(0xcc)]||!_0x5f6f87[_0x290dde(0xcd)])return null;const _0x516f73={'name':_0x37d5c8,'method':_0x5f6f87[_0x290dde(0xcc)],'path':_0x5f6f87[_0x290dde(0xcd)]};if(_0x5f6f87[_0x290dde(0xfb)])_0x516f73[_0x290dde(0xfb)]=_0x5f6f87[_0x290dde(0xfb)];if(_0x5f6f87['requestBody']!=null){const _0x37a74b=parseJsonMaybe(_0x5f6f87[_0x290dde(0xf4)]);_0x516f73[_0x290dde(0xf4)]=_0x37a74b;}if(_0x5f6f87[_0x290dde(0xee)]!=null){const _0x366968=parseJsonMaybe(_0x5f6f87[_0x290dde(0xee)]);_0x516f73[_0x290dde(0xee)]=_0x366968;}if(_0x5f6f87[_0x290dde(0xf5)]!=null)_0x516f73[_0x290dde(0xf5)]=_0x5f6f87[_0x290dde(0xf5)];if(_0x5f6f87['afterScriptId']!=null)_0x516f73['afterScriptId']=_0x5f6f87[_0x290dde(0xe3)];if(Array[_0x290dde(0xf0)](_0x5f6f87[_0x290dde(0x100)]))_0x516f73[_0x290dde(0x100)]=_0x5f6f87[_0x290dde(0x100)];if(Array[_0x290dde(0xf0)](_0x5f6f87[_0x290dde(0xde)]))_0x516f73['responseFields']=_0x5f6f87[_0x290dde(0xde)];return _0x516f73;}function summarizeDbtable(_0x437d7b){const _0x2e94cb=a62_0x7ac0,_0x4ab442={},_0x23e2a8=[_0x2e94cb(0xce),_0x2e94cb(0xd6),_0x2e94cb(0xe4),_0x2e94cb(0xe2),'pkField',_0x2e94cb(0xef),'logicField',_0x2e94cb(0xc9),'updateTimeField',_0x2e94cb(0xdf),_0x2e94cb(0xe5),_0x2e94cb(0x10c),'modifierNameField','labelField',_0x2e94cb(0xc6)];for(const _0x2c3eaa of _0x23e2a8){if(_0x437d7b[_0x2c3eaa]!==undefined)_0x4ab442[_0x2c3eaa]=_0x437d7b[_0x2c3eaa];}return typeof _0x4ab442['allFields']==='string'&&_0x4ab442[_0x2e94cb(0xef)][_0x2e94cb(0xdb)]>0x0&&(_0x4ab442['allFieldNames']=_0x4ab442['allFields'][_0x2e94cb(0xda)](',')['map'](_0x470958=>_0x470958['trim']())[_0x2e94cb(0x104)](Boolean)),_0x4ab442;}function a62_0x5917(){const _0x3aaf2a=['method','path','dbId','code','str','properties','doType','45rayjLc','toField','2646490WZfQGs','dbName','source','columnCodeListWithDeleted','toFieldLabel','split','length','map','modelCode','responseFields','creatorIdField','string','pkField','datasetKey','afterScriptId','tableName','creatorNameField','validateRules','read','formatRules','dataset','409548KMBRsL','1693112jlxCAB','relatedPageInfoList','fields','responseBody','allFields','isArray','deleted','8MqecbP','modelId','requestBody','beforeScriptId','displayName','title','main_sub','operations','extend','host','doVersion','options','entries','toDatasetName','requestFields','sourceType','description','deprecated','filter','push','required','1691832jAlzuD','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','5968599bbTNNC','6957360WjmXFz','name','modifierIdField','alias','5826108RWRBZr','object','type','dblinkInfoDTO','indexes','3ZzkMjc','createTimeField','relationId','relations'];a62_0x5917=function(){return _0x3aaf2a;};return a62_0x5917();}function normalizeRelatedPages(_0x45c609){const _0x432a54=a62_0x7ac0;if(!Array[_0x432a54(0xf0)](_0x45c609))return[];return _0x45c609[_0x432a54(0x104)](_0x1558c7=>_0x1558c7&&typeof _0x1558c7===_0x432a54(0x10f))[_0x432a54(0xdc)](_0x9f6a5f=>({'id':_0x9f6a5f['id'],'type':_0x9f6a5f[_0x432a54(0x110)],'code':_0x9f6a5f[_0x432a54(0xcf)],'title':_0x9f6a5f[_0x432a54(0xf7)],'deleted':_0x9f6a5f[_0x432a54(0xf1)]===!![]}));}export const datasetDetail={'service':a62_0x53bccb(0xe9),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x53bccb(0xe7),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x53bccb(0x10d),'type':a62_0x53bccb(0xe0),'description':a62_0x53bccb(0x108)}],async 'execute'(_0x547421){const _0x3950f3=a62_0x53bccb,_0x1854bf=await getDatasetDetail(_0x547421[_0x3950f3(0xd0)]('code')),_0x58ec70=Array['isArray'](_0x1854bf[_0x3950f3(0xed)])?_0x1854bf['fields']:Array[_0x3950f3(0xf0)](_0x1854bf[_0x3950f3(0xd1)])?_0x1854bf['properties']:[],_0x72d388=_0x58ec70[_0x3950f3(0xdc)](_0x120b6c=>normalizeField(_0x120b6c))['filter'](_0x4bec96=>_0x4bec96!==null),_0x4f830d=_0x1854bf[_0x3950f3(0xf9)]??{},_0x47c317=[];for(const [_0x465794,_0x24c289]of Object[_0x3950f3(0xfe)](_0x4f830d)){const _0x584dcc=normalizeOperationEntry(_0x465794,_0x24c289);if(_0x584dcc)_0x47c317[_0x3950f3(0x105)](_0x584dcc);}const _0x1775f4=_0x1854bf['dbtableConfig']??{},_0x49baf7=_0x1854bf['dataset']??{},_0x586ce8=_0x1775f4[_0x3950f3(0xce)]!=null?{'id':_0x1775f4[_0x3950f3(0xce)],'name':_0x1775f4['dbName']??null}:undefined;let _0x399bc8;return typeof _0x1854bf['extend']===_0x3950f3(0xe0)&&(_0x399bc8=parseJsonMaybe(_0x1854bf[_0x3950f3(0xfa)])),{'ok':!![],'data':{'id':_0x1854bf[_0x3950f3(0xf3)]??_0x1854bf['id'],'name':_0x1854bf['name'],'code':_0x1854bf[_0x3950f3(0xdd)]||_0x1854bf['code'],'doVersion':_0x1854bf[_0x3950f3(0xfc)],'description':_0x1854bf[_0x3950f3(0x102)]||_0x49baf7['tableComment']||undefined,'source':_0x1854bf[_0x3950f3(0xd7)]||_0x49baf7[_0x3950f3(0x101)],'table':_0x1775f4[_0x3950f3(0xe4)]||_0x49baf7[_0x3950f3(0xe4)],'datasetKey':_0x1775f4[_0x3950f3(0xe2)],'pk':_0x1775f4['pkField'],'db':_0x586ce8,'dbtable':summarizeDbtable(_0x1775f4),'fields':_0x72d388,'operations':_0x47c317,'indexes':Array[_0x3950f3(0xf0)](_0x49baf7[_0x3950f3(0xc7)])?_0x49baf7['indexes']:[],'relations':Array[_0x3950f3(0xf0)](_0x1854bf[_0x3950f3(0xcb)])?_0x1854bf['relations'][_0x3950f3(0xdc)](_0x30109d=>({..._0x30109d[_0x3950f3(0xca)]!=null?{'relationId':_0x30109d['relationId']}:{},'fromDataset':_0x1854bf['name'],'fromCode':_0x1854bf[_0x3950f3(0xdd)]||_0x1854bf[_0x3950f3(0xcf)],'fromTable':_0x1775f4[_0x3950f3(0xe4)]||_0x49baf7[_0x3950f3(0xe4)],'fromField':_0x30109d['fromField'],'toDataset':_0x30109d[_0x3950f3(0xff)],'toCode':_0x30109d['toDatasetCode'],'toTable':_0x30109d['toTableName'],'toField':_0x30109d[_0x3950f3(0xd4)],'labelField':_0x30109d[_0x3950f3(0xd9)]||undefined,'cardinality':_0x30109d['cardinality']||undefined,'bizRelationType':_0x30109d['bizRelationType']===_0x3950f3(0xf8)?_0x3950f3(0xf8):null})):[],'relatedPages':normalizeRelatedPages(_0x1854bf[_0x3950f3(0xec)]),...Array[_0x3950f3(0xf0)](_0x1854bf[_0x3950f3(0xd8)])?{'columnCodeListWithDeleted':_0x1854bf[_0x3950f3(0xd8)]}:{},'formatRules':Array[_0x3950f3(0xf0)](_0x1854bf['formatRules'])?_0x1854bf[_0x3950f3(0xe8)]:[],'validateRules':Array[_0x3950f3(0xf0)](_0x1854bf[_0x3950f3(0xe6)])?_0x1854bf['validateRules']:[],..._0x399bc8!==undefined?{'extend':_0x399bc8}:{},'stats':{'fieldCount':_0x72d388[_0x3950f3(0xdb)],'operationCount':_0x47c317[_0x3950f3(0xdb)]}}};}};
|