@lovrabet/rabetbase-cli 2.5.2-beta.3 → 2.5.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.d.ts +0 -8
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.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.d.ts +4 -0
- 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.d.ts +5 -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 +0 -26
- 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.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.d.ts +43 -0
- 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 +2 -1
- package/skills/rabetbase/SKILL.md +5 -5
- package/skills/rabetbase/guides/custom-page-workflow.md +35 -17
- package/skills/rabetbase/guides/page-development-workflow.md +1 -1
- package/skills/rabetbase/knowledge/components.md +292 -0
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +74 -4
- package/skills/rabetbase/knowledge/custom-page/page-templates.md +68 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +21 -9
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-update.md +13 -9
- package/skills/rabetbase/references/rabetbase-project-create.md +5 -2
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +2 -2
- package/skills/rabetbase/references/rabetbase-run.md +1 -0
- package/skills/rabetbase.manifest.json +5 -4
- package/templates/README.md +10 -4
- package/templates/custom-pages/blank.json +5 -0
- package/templates/custom-pages/dashboard.json +5 -0
- package/templates/custom-pages/onepage.json +5 -0
- package/templates/generate-api/api.ts.tpl +1 -1
- package/lib/commands/page/custom/template.d.ts +0 -8
- package/lib/commands/page/custom/template.js +0 -1
- package/skills/rabetbase/knowledge/custom-page/components.md +0 -225
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x31898d=a48_0x254e;function a48_0x254e(_0x385357,_0xf61e92){_0x385357=_0x385357-0x129;const _0x8e3b1b=a48_0x8e3b();let _0x254eb4=_0x8e3b1b[_0x385357];return _0x254eb4;}(function(_0x51985f,_0x378c49){const _0xa8df9e=a48_0x254e,_0x1cab9b=_0x51985f();while(!![]){try{const _0x51961d=parseInt(_0xa8df9e(0x13d))/0x1*(-parseInt(_0xa8df9e(0x136))/0x2)+parseInt(_0xa8df9e(0x144))/0x3*(parseInt(_0xa8df9e(0x145))/0x4)+parseInt(_0xa8df9e(0x129))/0x5*(-parseInt(_0xa8df9e(0x13e))/0x6)+parseInt(_0xa8df9e(0x12e))/0x7+-parseInt(_0xa8df9e(0x12f))/0x8+-parseInt(_0xa8df9e(0x13c))/0x9*(-parseInt(_0xa8df9e(0x134))/0xa)+parseInt(_0xa8df9e(0x130))/0xb*(parseInt(_0xa8df9e(0x142))/0xc);if(_0x51961d===_0x378c49)break;else _0x1cab9b['push'](_0x1cab9b['shift']());}catch(_0x163855){_0x1cab9b['push'](_0x1cab9b['shift']());}}}(a48_0x8e3b,0x8b288));export const GLOBAL_SCOPE_FLAG={'name':a48_0x31898d(0x13b),'type':a48_0x31898d(0x131),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x31898d(0x141)};export const CODE_FLAG={'name':a48_0x31898d(0x13a),'type':a48_0x31898d(0x139),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x31898d(0x132),'description':a48_0x31898d(0x12d)};function a48_0x8e3b(){const _0x4a3809=['MYSQL','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','2313773PEJGje','2641696nMzgVw','1004344dPiDnj','boolean','datasetcode','POSTGRESQL','146210BGhVZs','sqlcode','10054JnQynp','Database\x20product\x20type','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','string','code','global','396CPvZdS','59anCanK','215538PrJpbY','App\x20code\x20(e.g.\x20app-xxxxx)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','84pOFLTU','number','21EtaXHc','152196zPGNry','95YxiFfM','skip-connection-test','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'];a48_0x8e3b=function(){return _0x4a3809;};return a48_0x8e3b();}export const SQLCODE_FLAG={'name':a48_0x31898d(0x135),'type':a48_0x31898d(0x139),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x31898d(0x12b)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x31898d(0x139),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x31898d(0x13f)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x31898d(0x143),'required':!![],'description':a48_0x31898d(0x138)};export const DB_TYPE_FLAG={'name':'dbtype','type':a48_0x31898d(0x139),'required':!![],'description':a48_0x31898d(0x137),'enum':[a48_0x31898d(0x12c),a48_0x31898d(0x133)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x31898d(0x12a),'type':a48_0x31898d(0x131),'description':a48_0x31898d(0x140)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x572b96,_0x5eafff){const _0x4fd8c1=a49_0x4003,_0x8f47b1=_0x572b96();while(!![]){try{const _0x3afb9b=parseInt(_0x4fd8c1(0x1b2))/0x1*(parseInt(_0x4fd8c1(0x1ae))/0x2)+-parseInt(_0x4fd8c1(0x1b0))/0x3*(-parseInt(_0x4fd8c1(0x1ba))/0x4)+-parseInt(_0x4fd8c1(0x1bb))/0x5*(-parseInt(_0x4fd8c1(0x1b3))/0x6)+parseInt(_0x4fd8c1(0x1b7))/0x7*(-parseInt(_0x4fd8c1(0x1b5))/0x8)+-parseInt(_0x4fd8c1(0x1bd))/0x9+parseInt(_0x4fd8c1(0x1bc))/0xa*(-parseInt(_0x4fd8c1(0x1bf))/0xb)+-parseInt(_0x4fd8c1(0x1b4))/0xc*(parseInt(_0x4fd8c1(0x1af))/0xd);if(_0x3afb9b===_0x5eafff)break;else _0x8f47b1['push'](_0x8f47b1['shift']());}catch(_0x17aa5d){_0x8f47b1['push'](_0x8f47b1['shift']());}}}(a49_0x5246,0x24d17));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x5246(){const _0x3dfdde=['819972cFnunu','size','1097063wMRCBa','\x20path\x20is\x20required.','102336KtuMtl','751231rpRuEJ','561840ifSiAi','isFile','5DXJdGP','1025898iHlLlJ','36JJJBur','396376pbvZVp','File\x20not\x20found:\x20','14ruWZHj','validation','toFixed','4KetNyp','5yKruKU','10vBnPDb'];a49_0x5246=function(){return _0x3dfdde;};return a49_0x5246();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3e1e78){const _0x4b6f79=a49_0x4003;if(_0x3e1e78>=BYTES_PER_MB){const _0x136443=Math['ceil'](_0x3e1e78/BYTES_PER_MB*0x64)/0x64;return _0x136443[_0x4b6f79(0x1b9)](0x2)+'\x20MB';}return _0x3e1e78+'\x20B';}function a49_0x4003(_0x24976a,_0xc6a867){_0x24976a=_0x24976a-0x1ad;const _0x52467a=a49_0x5246();let _0x400328=_0x52467a[_0x24976a];return _0x400328;}export function requireDevelopmentUploadFile(_0x4cba6d,_0x493977){const _0xb127c7=a49_0x4003,_0x4da943=_0x4cba6d['trim']();if(!_0x4da943)throw CliErrors[_0xb127c7(0x1b8)](_0x493977+_0xb127c7(0x1ad));if(!existsSync(_0x4da943))throw CliErrors[_0xb127c7(0x1b8)](_0xb127c7(0x1b6)+_0x4da943);const _0x175b4b=statSync(_0x4da943);if(!_0x175b4b[_0xb127c7(0x1b1)]())throw CliErrors[_0xb127c7(0x1b8)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4da943);if(_0x175b4b[_0xb127c7(0x1be)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x4da943+'\x20('+formatBytes(_0x175b4b[_0xb127c7(0x1be)])+')');return{'path':_0x4da943,'size':_0x175b4b[_0xb127c7(0x1be)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x4bd5(){const _0x28ef5e=['App\x20Code\x20cannot\x20be\x20empty','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','728320tCvceL','836312qfIXex','test','2189270YtehrS','2389059RXYpGP','15gAvtBr','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','403134zQsEeV','7FabMcQ','96qYfWxY','375701LpgvZR','33hKagoS','8883QTAzld'];a50_0x4bd5=function(){return _0x28ef5e;};return a50_0x4bd5();}(function(_0x16893a,_0x260b6f){const _0x4cb27d=a50_0x34b8,_0x453f4d=_0x16893a();while(!![]){try{const _0x2b75aa=-parseInt(_0x4cb27d(0x19d))/0x1+parseInt(_0x4cb27d(0x1a3))/0x2+parseInt(_0x4cb27d(0x19f))/0x3*(parseInt(_0x4cb27d(0x19c))/0x4)+-parseInt(_0x4cb27d(0x1a7))/0x5*(parseInt(_0x4cb27d(0x1aa))/0x6)+-parseInt(_0x4cb27d(0x19b))/0x7*(parseInt(_0x4cb27d(0x1a2))/0x8)+-parseInt(_0x4cb27d(0x1a6))/0x9+-parseInt(_0x4cb27d(0x1a5))/0xa*(-parseInt(_0x4cb27d(0x19e))/0xb);if(_0x2b75aa===_0x260b6f)break;else _0x453f4d['push'](_0x453f4d['shift']());}catch(_0x577bf2){_0x453f4d['push'](_0x453f4d['shift']());}}}(a50_0x4bd5,0x33d12));function a50_0x34b8(_0x1ef1e3,_0x3a1c76){_0x1ef1e3=_0x1ef1e3-0x19b;const _0x4bd588=a50_0x4bd5();let _0x34b8d5=_0x4bd588[_0x1ef1e3];return _0x34b8d5;}export function validateAppcode(_0x5ac78a){const _0x1c4920=a50_0x34b8,_0x33d7e6=_0x5ac78a[_0x1c4920(0x1a9)]();if(!_0x33d7e6)return{'valid':![],'message':_0x1c4920(0x1a0)};if(_0x33d7e6['length']>0x64)return{'valid':![],'message':_0x1c4920(0x1a8)};if(!/^[A-Za-z0-9_-]+$/[_0x1c4920(0x1a4)](_0x33d7e6))return{'valid':![],'message':_0x1c4920(0x1a1)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x517d1f=a51_0x15db;function a51_0x34b8(){const _0x36cd8f=['riskLevel','2233HvgaLL','inherit','boolean','1495064bzRebJ','708152oLxXLf','994077nPcixH','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','key','15MszCrw','Usage:\x20','27264kdCFRw','hasOwnProperty','config','prototype','Missing\x20key\x20argument.','trim','10TTCqkQ','global','2276388KUQqRx','write','\x22\x20is\x20not\x20deletable.','delete','5412DTLTKL','defaultApp','\x20deleted','validation','has','bool','\x20config\x20delete\x20<key>\x20[--global]','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','\x20already\x20absent','26210514BeiRfm','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','116BnqcCH','Top-level\x20key\x20\x22'];a51_0x34b8=function(){return _0x36cd8f;};return a51_0x34b8();}(function(_0x2b7f05,_0x45c21d){const _0x1693f9=a51_0x15db,_0xbe6c03=_0x2b7f05();while(!![]){try{const _0x3a778a=-parseInt(_0x1693f9(0x13c))/0x1*(parseInt(_0x1693f9(0x149))/0x2)+parseInt(_0x1693f9(0x151))/0x3+parseInt(_0x1693f9(0x142))/0x4*(-parseInt(_0x1693f9(0x147))/0x5)+parseInt(_0x1693f9(0x131))/0x6*(parseInt(_0x1693f9(0x13f))/0x7)+parseInt(_0x1693f9(0x143))/0x8+parseInt(_0x1693f9(0x144))/0x9*(parseInt(_0x1693f9(0x14f))/0xa)+parseInt(_0x1693f9(0x13a))/0xb;if(_0x3a778a===_0x45c21d)break;else _0xbe6c03['push'](_0xbe6c03['shift']());}catch(_0x5428f3){_0xbe6c03['push'](_0xbe6c03['shift']());}}}(a51_0x34b8,0xe1fe6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x517d1f(0x140)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x517d1f(0x132),'routing']);async function execute(_0x4f4d44){const _0x58c08a=a51_0x517d1f,_0x292333=_0x4f4d44['args'][0x0]?.[_0x58c08a(0x14e)]();if(!_0x292333)throw CliErrors[_0x58c08a(0x134)](_0x58c08a(0x14d),_0x58c08a(0x148)+CLI_BIN_NAME+_0x58c08a(0x137));if(_0x292333===_0x58c08a(0x13e))throw CliErrors[_0x58c08a(0x134)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x292333)&&!EXTRA_DELETABLE_KEYS[_0x58c08a(0x135)](_0x292333)&&!LEGACY_DELETABLE_KEYS['has'](_0x292333))throw CliErrors[_0x58c08a(0x134)](_0x58c08a(0x13d)+_0x292333+_0x58c08a(0x12f),_0x58c08a(0x13b));const _0x2c594a=resolveWriteScope({'global':_0x4f4d44[_0x58c08a(0x136)](_0x58c08a(0x150))}),_0x20ae4c=readScopedConfig(_0x2c594a),_0x4e9acd=Object[_0x58c08a(0x14c)][_0x58c08a(0x14a)]['call'](_0x20ae4c,_0x292333);_0x4e9acd&&(delete _0x20ae4c[_0x292333],writeScopedConfig(_0x20ae4c,_0x2c594a));const _0x1d8887=_0x2c594a===_0x58c08a(0x150)?'Global':'Project';return{'ok':!![],'message':_0x4e9acd?'✓\x20'+_0x1d8887+'\x20'+_0x292333+_0x58c08a(0x133):'✓\x20'+_0x1d8887+'\x20'+_0x292333+_0x58c08a(0x139),'data':{'key':_0x292333,'scope':_0x2c594a,'changed':_0x4e9acd}};}function a51_0x15db(_0x38c885,_0x464dc1){_0x38c885=_0x38c885-0x12e;const _0x34b8a9=a51_0x34b8();let _0x15db0e=_0x34b8a9[_0x38c885];return _0x15db0e;}export const configDeleteDefinition={'service':a51_0x517d1f(0x14b),'command':a51_0x517d1f(0x130),'description':a51_0x517d1f(0x145),'risk':a51_0x517d1f(0x12e),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x517d1f(0x146),'description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a51_0x517d1f(0x150),'type':a51_0x517d1f(0x141),'description':a51_0x517d1f(0x138),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x31b9(){const _0x2e8d54=['str','187714ABRAHq','507188mYoeTC','Key\x20not\x20found:\x20','appcode','Usage:\x20','Missing\x20key.','63CcxBfX','24116zYikVt','145OuQxJg','key','96nFQArp','11RCqTkg','object','Get\x20a\x20config\x20value\x20by\x20key','4314580eReupq','read','validation','459976qEuEYt','app','41111WpHsMs','520656XgCXcp'];a52_0x31b9=function(){return _0x2e8d54;};return a52_0x31b9();}function a52_0x4a92(_0x29cf11,_0x5612a8){_0x29cf11=_0x29cf11-0xcc;const _0x31b9a9=a52_0x31b9();let _0x4a92f8=_0x31b9a9[_0x29cf11];return _0x4a92f8;}const a52_0x21fdd5=a52_0x4a92;(function(_0x44c2a9,_0x3020c0){const _0x18c6f7=a52_0x4a92,_0x4335cf=_0x44c2a9();while(!![]){try{const _0x3d1a4a=parseInt(_0x18c6f7(0xd2))/0x1+-parseInt(_0x18c6f7(0xd3))/0x2+parseInt(_0x18c6f7(0xd0))/0x3+parseInt(_0x18c6f7(0xd9))/0x4*(parseInt(_0x18c6f7(0xda))/0x5)+parseInt(_0x18c6f7(0xdc))/0x6*(-parseInt(_0x18c6f7(0xcf))/0x7)+-parseInt(_0x18c6f7(0xcd))/0x8*(parseInt(_0x18c6f7(0xd8))/0x9)+-parseInt(_0x18c6f7(0xe0))/0xa*(-parseInt(_0x18c6f7(0xdd))/0xb);if(_0x3d1a4a===_0x3020c0)break;else _0x4335cf['push'](_0x4335cf['shift']());}catch(_0x5ed84c){_0x4335cf['push'](_0x4335cf['shift']());}}}(a52_0x31b9,0x351b4));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x4c1889){const _0x10f520=a52_0x4a92,_0x216245=_0x4c1889[_0x10f520(0xd1)](_0x10f520(0xdb));if(!_0x216245)throw CliErrors[_0x10f520(0xcc)](_0x10f520(0xd7),_0x10f520(0xd6)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x473d23=readConfig(),_0x323b14=_0x216245===_0x10f520(0xce)?_0x10f520(0xd5):_0x216245,_0x167803=_0x473d23[_0x323b14];if(_0x167803===undefined)throw CliErrors[_0x10f520(0xcc)](_0x10f520(0xd4)+_0x216245);return{'ok':!![],'data':typeof _0x167803===_0x10f520(0xde)?_0x167803:{[_0x323b14]:_0x167803},'message':typeof _0x167803==='object'?undefined:String(_0x167803)};}export const configGetDefinition={'service':'config','command':'get','description':a52_0x21fdd5(0xdf),'risk':a52_0x21fdd5(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x21fdd5(0xdb),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24ad7a,_0x2153fc){const _0x1db5b5=a53_0x4cac,_0x338798=_0x24ad7a();while(!![]){try{const _0x3f92c9=parseInt(_0x1db5b5(0xa8))/0x1*(parseInt(_0x1db5b5(0xab))/0x2)+-parseInt(_0x1db5b5(0xae))/0x3+parseInt(_0x1db5b5(0xb1))/0x4+-parseInt(_0x1db5b5(0xad))/0x5*(parseInt(_0x1db5b5(0xac))/0x6)+parseInt(_0x1db5b5(0xb3))/0x7*(-parseInt(_0x1db5b5(0xb0))/0x8)+parseInt(_0x1db5b5(0xaa))/0x9*(-parseInt(_0x1db5b5(0xb2))/0xa)+-parseInt(_0x1db5b5(0xa9))/0xb*(-parseInt(_0x1db5b5(0xaf))/0xc);if(_0x3f92c9===_0x2153fc)break;else _0x338798['push'](_0x338798['shift']());}catch(_0x1d768e){_0x338798['push'](_0x338798['shift']());}}}(a53_0x2e17,0xda2e1));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a53_0x2e17(){const _0x33e927=['4884676TRMgkx','1863910HGjkOg','5207146CvfLnm','478KilVnf','1024177VvyJnx','27twNyBV','6554UhGvyv','6VQUDZP','5611745stZlJI','2036703nXJiiK','156bDmkzE','8DunoWr'];a53_0x2e17=function(){return _0x33e927;};return a53_0x2e17();}function a53_0x4cac(_0x4395ac,_0x16cfea){_0x4395ac=_0x4395ac-0xa8;const _0x2e17ba=a53_0x2e17();let _0x4cac92=_0x2e17ba[_0x4395ac];return _0x4cac92;}import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x52a582=a54_0xf510;(function(_0x41ddc7,_0x251bc9){const _0x10de07=a54_0xf510,_0x355a15=_0x41ddc7();while(!![]){try{const _0x564df4=parseInt(_0x10de07(0x19b))/0x1*(parseInt(_0x10de07(0x1a3))/0x2)+-parseInt(_0x10de07(0x198))/0x3+parseInt(_0x10de07(0x18c))/0x4*(parseInt(_0x10de07(0x17f))/0x5)+-parseInt(_0x10de07(0x181))/0x6*(parseInt(_0x10de07(0x190))/0x7)+-parseInt(_0x10de07(0x19c))/0x8*(-parseInt(_0x10de07(0x1a7))/0x9)+parseInt(_0x10de07(0x184))/0xa*(-parseInt(_0x10de07(0x1aa))/0xb)+-parseInt(_0x10de07(0x1a6))/0xc*(-parseInt(_0x10de07(0x183))/0xd);if(_0x564df4===_0x251bc9)break;else _0x355a15['push'](_0x355a15['shift']());}catch(_0xa91389){_0x355a15['push'](_0x355a15['shift']());}}}(a54_0x44a8,0xa57ef));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a54_0xf510(_0x120205,_0x32258d){_0x120205=_0x120205-0x177;const _0x44a815=a54_0x44a8();let _0xf510c1=_0x44a815[_0x120205];return _0xf510c1;}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';function a54_0x44a8(){const _0x29ab23=['10QqniMx','routing','kb-domain','243564LTnSiL','9VLwlBA','skill-domain','Independent-deployment\x20Domain\x20JSON\x20file','5472940rbkbNh','label','length','assign','cdn','\x22\x20is\x20not\x20currently\x20available.','user-domain','map','validation','cancelled','localDomain','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Custom\x20Runtime\x20HTTPS\x20origin','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','4607445wjCdAv','runtime-domain','12OqlTpn','Custom\x20SkillHub\x20HTTPS\x20origin','195VvZLNq','10hHzJWa','nonInteractive','Custom\x20User\x20HTTPS\x20origin','manifestDomains','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','global','local-domain','official','4AZVXuC','Custom\x20certificate\x20service\x20HTTPS\x20origin','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','config','1131011JBHxwq','Custom\x20knowledge-base\x20HTTPS\x20origin','app-domain','Custom\x20platform\x20API\x20HTTPS\x20origin','certificateDomain','enterprise-v1','Official\x20Lovrabet\x20region:\x20','project','153903BRmZZZ','domains','join','60661jubtJu','164872fwRLUw','string','mode','keys','init','str','region'];a54_0x44a8=function(){return _0x29ab23;};return a54_0x44a8();}import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':'region','type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x196)+ENABLED_LOVRABET_REGION_VALUES[a54_0x52a582(0x19a)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x1a9)},{'name':a54_0x52a582(0x1b0),'type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x186)},{'name':'api-domain','type':'string','description':a54_0x52a582(0x193)},{'name':a54_0x52a582(0x180),'type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x17c)},{'name':a54_0x52a582(0x1a8),'type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x182)},{'name':a54_0x52a582(0x1a5),'type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x191)},{'name':a54_0x52a582(0x192),'type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x17e)},{'name':a54_0x52a582(0x18a),'type':a54_0x52a582(0x19d),'description':'Custom\x20local\x20callback\x20HTTPS\x20origin'},{'name':'certificate-domain','type':a54_0x52a582(0x19d),'description':a54_0x52a582(0x18d)}];async function resolveRegion(_0x429735){const _0x54e967=a54_0x52a582,_0x1d4a47=_0x429735[_0x54e967(0x1a1)](_0x54e967(0x1a2));if(_0x1d4a47){if(!isEnabledLovrabetRegion(_0x1d4a47))throw CliErrors[_0x54e967(0x178)]('Region\x20\x22'+_0x1d4a47+_0x54e967(0x1af),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x54e967(0x19a)](',\x20'));return _0x1d4a47;}if(_0x429735[_0x54e967(0x185)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x54e967(0x177)](_0x117f77=>({'name':getOfficialRoutingProfile(_0x117f77)[_0x54e967(0x1ab)]+'\x20('+_0x117f77+')','value':_0x117f77}))});}catch(_0x349253){if(_0x349253?.['name']==='ExitPromptError')throw CliErrors[_0x54e967(0x179)]();throw _0x349253;}}export async function executeConfigInit(_0x124538){const _0x26a4e2=a54_0x52a582,_0x8686fd=resolveDomainConfigInput(_0x124538),_0x2631cd=_0x8686fd[_0x26a4e2(0x199)],_0x49cfde=Object[_0x26a4e2(0x19f)](_0x2631cd)[_0x26a4e2(0x1ac)]>0x0;if(_0x49cfde&&_0x124538[_0x26a4e2(0x1a1)]('region'))throw CliErrors[_0x26a4e2(0x178)](_0x26a4e2(0x18e));if(!!_0x2631cd[_0x26a4e2(0x17a)]!==!!_0x2631cd[_0x26a4e2(0x194)])throw CliErrors[_0x26a4e2(0x178)](_0x26a4e2(0x17d));const _0x39cf66=_0x124538['bool'](_0x26a4e2(0x189))?_0x26a4e2(0x189):_0x26a4e2(0x197),_0x446ba5=readScopedConfig(_0x39cf66);for(const _0x3965e1 of DOMAIN_CONFIG_FIELDS)delete _0x446ba5[_0x3965e1];for(const _0x4eaed7 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x446ba5[_0x4eaed7];delete _0x446ba5[_0x26a4e2(0x1a4)];let _0x1b41d9=null;if(_0x49cfde)delete _0x446ba5[_0x26a4e2(0x1a2)],_0x8686fd['mode']===_0x26a4e2(0x195)?_0x446ba5[_0x26a4e2(0x1a4)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x8686fd[_0x26a4e2(0x187)],'cdn':_0x8686fd[_0x26a4e2(0x1ae)]}:Object[_0x26a4e2(0x1ad)](_0x446ba5,_0x2631cd);else{_0x1b41d9=await resolveRegion(_0x124538);if(_0x1b41d9===DEFAULT_LOVRABET_REGION)delete _0x446ba5[_0x26a4e2(0x1a2)];else _0x446ba5[_0x26a4e2(0x1a2)]=_0x1b41d9;}return writeScopedConfig(_0x446ba5,_0x39cf66),{'ok':!![],'message':_0x49cfde?_0x26a4e2(0x17b)+Object[_0x26a4e2(0x19f)](_0x8686fd[_0x26a4e2(0x19e)]===_0x26a4e2(0x195)?_0x8686fd[_0x26a4e2(0x187)]:_0x2631cd)[_0x26a4e2(0x19a)](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x1b41d9+'.','data':{'mode':_0x49cfde?'independent':_0x26a4e2(0x18b),'protocol':_0x8686fd['mode']==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x1b41d9,'domains':_0x2631cd,'cdn':_0x8686fd['mode']===_0x26a4e2(0x195)?_0x8686fd[_0x26a4e2(0x1ae)]:undefined}};}export const configInitDefinition={'service':a54_0x52a582(0x18f),'command':a54_0x52a582(0x1a0),'description':'Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a54_0x52a582(0x188),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a55_0x1752(){const _0x586618=['133288IXqySR','5298237fqtVFm','3720545bLcQOW','72qhuPEI','14300080HrWgiJ','config','3Svxemg','259366PXUBlh','bool','global','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','4267800OlbRda','boolean','4sFqZrZ','228494JynGba'];a55_0x1752=function(){return _0x586618;};return a55_0x1752();}const a55_0x481d5d=a55_0xb761;(function(_0x23260a,_0xef90b){const _0x307e65=a55_0xb761,_0xedc948=_0x23260a();while(!![]){try{const _0x8b01f9=-parseInt(_0x307e65(0xf9))/0x1+-parseInt(_0x307e65(0x100))/0x2*(parseInt(_0x307e65(0xff))/0x3)+parseInt(_0x307e65(0xf7))/0x4*(-parseInt(_0x307e65(0xfb))/0x5)+-parseInt(_0x307e65(0xf5))/0x6+parseInt(_0x307e65(0xf8))/0x7*(parseInt(_0x307e65(0xfc))/0x8)+parseInt(_0x307e65(0xfa))/0x9+parseInt(_0x307e65(0xfd))/0xa;if(_0x8b01f9===_0xef90b)break;else _0xedc948['push'](_0xedc948['shift']());}catch(_0x29a3d1){_0xedc948['push'](_0xedc948['shift']());}}}(a55_0x1752,0x910b3));import{readScopedConfig}from'../../commands/config/shared.js';function a55_0xb761(_0x3d15c2,_0xfce9c2){_0x3d15c2=_0x3d15c2-0xf5;const _0x17526d=a55_0x1752();let _0xb7610e=_0x17526d[_0x3d15c2];return _0xb7610e;}import{readConfig}from'../../utils/config.js';async function execute(_0x4fdfa2){const _0x1ad1b3=a55_0xb761,_0x2da661=_0x4fdfa2[_0x1ad1b3(0x101)](_0x1ad1b3(0x102))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2da661};}export const configListDefinition={'service':a55_0x481d5d(0xfe),'command':a55_0x481d5d(0x104),'description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x481d5d(0x102),'type':a55_0x481d5d(0xf6),'description':a55_0x481d5d(0x103),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x1037ae=a56_0x424f;(function(_0x2e320a,_0x194d9c){const _0x2b2fb4=a56_0x424f,_0xf0bf00=_0x2e320a();while(!![]){try{const _0x55a5a0=-parseInt(_0x2b2fb4(0xcd))/0x1+parseInt(_0x2b2fb4(0xe5))/0x2*(-parseInt(_0x2b2fb4(0xdf))/0x3)+-parseInt(_0x2b2fb4(0xd2))/0x4+-parseInt(_0x2b2fb4(0xb6))/0x5*(-parseInt(_0x2b2fb4(0xdd))/0x6)+-parseInt(_0x2b2fb4(0xc2))/0x7+parseInt(_0x2b2fb4(0xbc))/0x8+parseInt(_0x2b2fb4(0xe7))/0x9*(parseInt(_0x2b2fb4(0xe2))/0xa);if(_0x55a5a0===_0x194d9c)break;else _0xf0bf00['push'](_0xf0bf00['shift']());}catch(_0x3b3c8e){_0xf0bf00['push'](_0xf0bf00['shift']());}}}(a56_0x5e34,0xf1612));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x424f(_0x5e77ee,_0x3b0a7d){_0x5e77ee=_0x5e77ee-0xb2;const _0x5e342b=a56_0x5e34();let _0x424f19=_0x5e342b[_0x5e77ee];return _0x424f19;}async function execute(_0x410524){const _0x561555=a56_0x424f,_0x272a77=_0x410524['str'](_0x561555(0xb3)),_0xb900c6=_0x410524[_0x561555(0xe4)](_0x561555(0xda));if(!_0x272a77)throw CliErrors[_0x561555(0xe8)](_0x561555(0xe6),_0x561555(0xc3)+CLI_BIN_NAME+_0x561555(0xd4));if(_0xb900c6===undefined||_0xb900c6==='')throw CliErrors['validation'](_0x561555(0xc6),_0x561555(0xc3)+CLI_BIN_NAME+_0x561555(0xd4));let _0x4fb142=_0x272a77,_0xdb10ab=_0xb900c6;if(_0xb900c6[_0x561555(0xd8)]>0x1f4)throw CliErrors['validation'](_0x561555(0xd7));if(_0x272a77===_0x561555(0xb2))throw CliErrors['validation'](_0x561555(0xd1));if(!isTopLevelConfigKey(_0x272a77))throw CliErrors[_0x561555(0xe8)](_0x561555(0xb7)+_0x272a77+_0x561555(0xce),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x272a77]&&!CONFIG_ENUM_VALUES[_0x272a77][_0x561555(0xde)](_0xb900c6))throw CliErrors[_0x561555(0xe8)](_0x561555(0xcf)+_0x272a77+_0x561555(0xca)+CONFIG_ENUM_VALUES[_0x272a77][_0x561555(0xc0)](',\x20'));if(_0x272a77==='locale'&&!normalizeLocale(_0xb900c6))throw CliErrors[_0x561555(0xe8)]('Invalid\x20locale\x20value.',_0x561555(0xc4));DOMAIN_CONFIG_FIELDS['includes'](_0x272a77)&&(_0xdb10ab=normalizeDomainOrigin(_0x272a77,_0xb900c6));const _0x57f6c5={'global':_0x410524[_0x561555(0xba)](_0x561555(0xb5))},_0x4fef8a=resolveWriteScope(_0x57f6c5),_0x102b0f=readScopedConfig(_0x4fef8a);_0x272a77===_0x561555(0xbb)&&(_0x4fb142=_0x561555(0xc8),delete _0x102b0f[_0x561555(0xbb)]);_0x272a77===_0x561555(0xdb)&&(_0xdb10ab=normalizeLocale(_0xb900c6));if(_0x272a77===_0x561555(0xe1)){_0xdb10ab=normalizeEnv(_0xb900c6);if(!isProduction(_0xdb10ab)&&!isDaily(_0xdb10ab))throw CliErrors[_0x561555(0xe8)](_0x561555(0xcc),_0x561555(0xe9));}if(_0x272a77===_0x561555(0xc8)){const _0x4b8580=_0x102b0f[_0x561555(0xb4)]&&typeof _0x102b0f[_0x561555(0xb4)]===_0x561555(0xd6)?Object[_0x561555(0xc7)](_0x102b0f[_0x561555(0xb4)]):[];if(_0x4b8580[_0x561555(0xd8)]>0x0)throw CliErrors[_0x561555(0xe8)](_0x561555(0xc1),_0x561555(0xcb)+CLI_BIN_NAME+_0x561555(0xbe)+_0xdb10ab+_0x561555(0xdc)+CLI_BIN_NAME+_0x561555(0xb8));const _0x25cf6b=buildCanonicalProjectConfig({..._0x102b0f},{'appCodes':[_0xdb10ab],'env':typeof _0x102b0f[_0x561555(0xe1)]===_0x561555(0xd5)?_0x102b0f[_0x561555(0xe1)]:undefined});writeScopedConfig(_0x25cf6b,_0x4fef8a);const _0x564f81=_0x4fef8a===_0x561555(0xb5)?_0x561555(0xb9):_0x561555(0xc5);return{'ok':!![],'message':'✓\x20'+_0x564f81+'\x20appcode\x20set\x20to:\x20'+_0xdb10ab+_0x561555(0xe3)};}_0x102b0f[_0x4fb142]=_0xdb10ab,writeScopedConfig(_0x102b0f,_0x4fef8a);const _0x57a586=_0x4fef8a==='global'?_0x561555(0xb9):'Project';return{'ok':!![],'message':'✓\x20'+_0x57a586+'\x20'+_0x4fb142+_0x561555(0xbf)+_0xdb10ab};}function a56_0x5e34(){const _0x3804e8=['6195102kazKMH','includes','1443558liCwRC','Set\x20a\x20config\x20value','env','16149400jppKSE','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','str','2YlMqiP','Missing\x20key.','18RiFpCq','validation','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','riskLevel','key','apps','global','5mhChiE','Top-level\x20key\x20\x22','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Global','bool','app','1533264DkfsqX','config','\x20workspace\x20add\x20<name>\x20--appcode\x20','\x20set\x20to:\x20','join','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','4412506felrpm','Usage:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Project','Missing\x20value.','keys','appcode','boolean','\x22.\x20Allowed:\x20','Use\x20`','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','719905idQUgy','\x22\x20is\x20not\x20settable.','Invalid\x20value\x20for\x20\x22','write','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','6535664zepToc','Config\x20value','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','string','object','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','length','set','value','locale','`,\x20`'];a56_0x5e34=function(){return _0x3804e8;};return a56_0x5e34();}export const configSetDefinition={'service':a56_0x1037ae(0xbd),'command':a56_0x1037ae(0xd9),'description':a56_0x1037ae(0xe0),'risk':a56_0x1037ae(0xd0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x1037ae(0xb3),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a56_0x1037ae(0xd5),'description':a56_0x1037ae(0xd3),'required':!![]},{'name':a56_0x1037ae(0xb5),'type':a56_0x1037ae(0xc9),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x230f9f,_0xd1c717){var _0xe7cc4b=a57_0x1980,_0x3ac2b1=_0x230f9f();while(!![]){try{var _0x5ca958=parseInt(_0xe7cc4b(0xac))/0x1*(parseInt(_0xe7cc4b(0xb4))/0x2)+parseInt(_0xe7cc4b(0xb1))/0x3*(-parseInt(_0xe7cc4b(0xaf))/0x4)+-parseInt(_0xe7cc4b(0xb7))/0x5*(parseInt(_0xe7cc4b(0xb5))/0x6)+parseInt(_0xe7cc4b(0xb9))/0x7+-parseInt(_0xe7cc4b(0xb8))/0x8*(parseInt(_0xe7cc4b(0xb2))/0x9)+parseInt(_0xe7cc4b(0xb6))/0xa+parseInt(_0xe7cc4b(0xaa))/0xb;if(_0x5ca958===_0xd1c717)break;else _0x3ac2b1['push'](_0x3ac2b1['shift']());}catch(_0x5cfe30){_0x3ac2b1['push'](_0x3ac2b1['shift']());}}}(a57_0x4d3f,0xd3e4a));function a57_0x4d3f(){var _0x1b28d9=['\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','6349996HtRWez','project','3EtLDMw','572967NCnYmS','validation','2PtvvWf','166554mGzDdq','12710300QMDktM','15beFXNj','80rdWGKN','3704085cfgqoJ','11988724igdhTX','global','285251yvCkzQ'];a57_0x4d3f=function(){return _0x1b28d9;};return a57_0x4d3f();}function a57_0x1980(_0x763ee0,_0xd1f694){_0x763ee0=_0x763ee0-0xaa;var _0x4d3fb0=a57_0x4d3f();var _0x19806c=_0x4d3fb0[_0x763ee0];return _0x19806c;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x22c73c){var _0x396f0b=a57_0x1980;if(_0x22c73c[_0x396f0b(0xab)])return _0x396f0b(0xab);if(!isInProject())throw CliErrors[_0x396f0b(0xb3)](_0x396f0b(0xae),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x396f0b(0xad));return _0x396f0b(0xb0);}export function readScopedConfig(_0x45346e){return readConfigFile(resolveWriteConfigPath(_0x45346e));}export function writeScopedConfig(_0x37bc95,_0x1bdcae){writeConfigFile(resolveWriteConfigPath(_0x1bdcae),_0x37bc95);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x1aeca2=a58_0x405d;(function(_0x19fe7f,_0x1bebdb){const _0x290639=a58_0x405d,_0x4b9f9d=_0x19fe7f();while(!![]){try{const _0x2702fa=parseInt(_0x290639(0x146))/0x1+-parseInt(_0x290639(0x17b))/0x2+-parseInt(_0x290639(0x15e))/0x3+parseInt(_0x290639(0x17c))/0x4+-parseInt(_0x290639(0x158))/0x5+parseInt(_0x290639(0x157))/0x6+-parseInt(_0x290639(0x151))/0x7;if(_0x2702fa===_0x1bebdb)break;else _0x4b9f9d['push'](_0x4b9f9d['shift']());}catch(_0xee5870){_0x4b9f9d['push'](_0x4b9f9d['shift']());}}}(a58_0x243d,0xa740b));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_0x243d(){const _0x42d2d1=['method','datasetName','length','Expectation\x20mismatch\x20at\x20businessGroup','apiError','name','update','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','tableName','expect-business-group','source','matched','prototype','373694TBHvkW','4397272YTLSKL','datasetCode','keys','data','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dbtableConfig','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','--business-group\x20must\x20not\x20be\x20blank','backend','modelId','METADATA','sourceType','db-table','code','message','Expected\x20','write','value','path','businessGroup','646878ieYqFO','dbLinkId','business-group-update',',\x20actual\x20','appCode','dbId','expectBusinessGroup','ungrouped','POST','kind','business-group','4982194xWdBjH','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','dbTableSelector','--code\x20is\x20required','trim','extend','5760954tWRRnM','2057880RQejSR','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','/smartapi/question/er-config/business-group/edit','string','DB_TABLE','validation','2133369ciVaMP','isFinite','payload','object','stringify','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','parse','found','str','Update\x20business\x20scenario\x20group','modelCode','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','dataset','toUpperCase','datasetId'];a58_0x243d=function(){return _0x42d2d1;};return a58_0x243d();}const DB_TABLE_BACKEND_PATH='/smartapi/dblink/updateTableBusinessGroup',METADATA_BACKEND_PATH=a58_0x1aeca2(0x15a),UNGROUPED_BUSINESS_GROUP=a58_0x1aeca2(0x14d);function a58_0x405d(_0xd2d47a,_0x33249e){_0xd2d47a=_0xd2d47a-0x13c;const _0x243d7f=a58_0x243d();let _0x405da9=_0x243d7f[_0xd2d47a];return _0x405da9;}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x225a2d,input:_0x3f6e52,dryRun:_0x19f825}){const _0x2e84f6=a58_0x1aeca2;validateInput(_0x3f6e52);const _0x2fb426=normalizeBusinessGroupArgument(_0x3f6e52[_0x2e84f6(0x145)]),_0x3ac5a7=await getDatasetDetail(_0x3f6e52[_0x2e84f6(0x13f)]),_0x17d469=resolveBusinessGroupDataset(_0x3ac5a7,_0x3f6e52['code']);assertBusinessGroupUpdateSupported(_0x17d469,_0x2fb426);const _0x475016=loadCurrentBusinessGroup(_0x3ac5a7,_0x17d469);assertExpectedBusinessGroup(_0x475016,_0x3f6e52[_0x2e84f6(0x14c)]);const _0x2ca3e6=buildBackendPlan(_0x225a2d,_0x17d469,_0x2fb426),_0x4867b4=_0x475016!==_0x2fb426;let _0xfea397;if(_0x4867b4&&!_0x19f825){_0x2ca3e6[_0x2e84f6(0x14f)]===_0x2e84f6(0x13e)?await updateDbTableBusinessGroup(_0x2ca3e6[_0x2e84f6(0x160)]):await updateErBusinessGroup(_0x2ca3e6[_0x2e84f6(0x160)]);const _0x1230d3=await getDatasetDetail(_0x17d469[_0x2e84f6(0x13f)]),_0x1a8227=resolveBusinessGroupDataset(_0x1230d3,_0x17d469[_0x2e84f6(0x13f)]),_0x38665c=loadCurrentBusinessGroup(_0x1230d3,_0x1a8227);if(_0x38665c!==_0x2fb426)throw CliErrors[_0x2e84f6(0x171)](_0x2e84f6(0x163),'Expected\x20'+JSON[_0x2e84f6(0x162)](displayBusinessGroup(_0x2fb426))+_0x2e84f6(0x149)+JSON[_0x2e84f6(0x162)](displayBusinessGroup(_0x38665c))+'.');_0xfea397={'verified':!![],'status':_0x2e84f6(0x179),'afterReadback':{'businessGroup':displayBusinessGroup(_0x38665c)}};}else!_0x4867b4&&(_0xfea397={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x475016)}});const _0x3cdbfb={'operation':_0x2e84f6(0x173),'appCode':_0x225a2d,'selector':{'code':_0x17d469[_0x2e84f6(0x13f)]},'dataset':{'id':_0x17d469['id'],'code':_0x17d469[_0x2e84f6(0x13f)],'name':_0x17d469['name'],'sourceType':_0x17d469[_0x2e84f6(0x13d)]},'before':{'businessGroup':displayBusinessGroup(_0x475016)},'after':{'businessGroup':displayBusinessGroup(_0x2fb426)},'changed':_0x4867b4,'dryRun':_0x19f825,'submitted':_0x4867b4&&!_0x19f825,'backend':{'method':_0x2ca3e6['method'],'path':_0x2ca3e6[_0x2e84f6(0x144)],'payload':_0x2ca3e6[_0x2e84f6(0x160)]},..._0xfea397?{'verification':_0xfea397}:{},'warnings':[]};return{'ok':!![],'data':_0x3cdbfb,'message':_0x4867b4?_0x19f825?_0x2e84f6(0x174)+_0x17d469[_0x2e84f6(0x13f)]:_0x2e84f6(0x152)+_0x17d469['code']:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x17d469[_0x2e84f6(0x13f)]};}export const datasetBusinessGroupUpdate={'service':a58_0x1aeca2(0x16a),'command':a58_0x1aeca2(0x148),'description':a58_0x1aeca2(0x167),'risk':a58_0x1aeca2(0x142),'flags':[CODE_FLAG,{'name':a58_0x1aeca2(0x150),'type':a58_0x1aeca2(0x15b),'required':!![],'description':a58_0x1aeca2(0x175)},{'name':a58_0x1aeca2(0x177),'type':a58_0x1aeca2(0x15b),'required':![],'description':a58_0x1aeca2(0x180)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x394398){validateInput(readBusinessGroupUpdateInput(_0x394398));},async 'dryRun'(_0x56caee){const _0x4b1dab=a58_0x1aeca2,_0x4f44c7=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x56caee[_0x4b1dab(0x14a)],'input':readBusinessGroupUpdateInput(_0x56caee),'dryRun':!![]});return{'method':_0x4f44c7[_0x4b1dab(0x17f)][_0x4b1dab(0x185)][_0x4b1dab(0x16d)],'url':_0x4f44c7['data'][_0x4b1dab(0x185)]['path'],'body':_0x4f44c7['data'][_0x4b1dab(0x185)]['payload'],'description':_0x4f44c7[_0x4b1dab(0x140)],..._0x4f44c7[_0x4b1dab(0x17f)]};},async 'execute'(_0x1da9ee){const _0x3d0e06=a58_0x1aeca2;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1da9ee[_0x3d0e06(0x14a)],'input':readBusinessGroupUpdateInput(_0x1da9ee),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3b2890){const _0x4533=a58_0x1aeca2,_0x227f78=_0x3b2890[_0x4533(0x166)](_0x4533(0x177));return{'code':trim(_0x3b2890[_0x4533(0x166)](_0x4533(0x13f))),'businessGroup':_0x3b2890['str'](_0x4533(0x150)),'expectBusinessGroup':_0x227f78===undefined||_0x227f78===''?undefined:_0x227f78};}function validateInput(_0x528b0f){const _0xb371a1=a58_0x1aeca2;if(!trim(_0x528b0f[_0xb371a1(0x13f)]))throw CliErrors[_0xb371a1(0x15d)](_0xb371a1(0x154));if(_0x528b0f[_0xb371a1(0x145)]===undefined)throw CliErrors[_0xb371a1(0x15d)]('--business-group\x20is\x20required');if(!trim(_0x528b0f[_0xb371a1(0x145)]))throw CliErrors[_0xb371a1(0x15d)](_0xb371a1(0x184));}function assertBusinessGroupUpdateSupported(_0x5e6c79,_0x367b07){const _0x130879=a58_0x1aeca2;if(_0x5e6c79[_0x130879(0x13d)]===_0x130879(0x15c)&&!_0x367b07)throw CliErrors[_0x130879(0x15d)](_0x130879(0x183));}function resolveBusinessGroupDataset(_0x12b6e8,_0x5eb6a2){const _0x32bacf=a58_0x1aeca2,_0x1a3416=asPlainObject(_0x12b6e8[_0x32bacf(0x16a)]),_0x3888be=asPlainObject(_0x12b6e8[_0x32bacf(0x181)]),_0x14b40f=resolveSourceType(_0x12b6e8,_0x1a3416,_0x3888be),_0xd44d55=firstString(_0x12b6e8[_0x32bacf(0x168)],_0x12b6e8[_0x32bacf(0x13f)],_0x1a3416[_0x32bacf(0x17d)],_0x5eb6a2)||_0x5eb6a2;return{'id':firstNumber(_0x12b6e8['modelId'],_0x12b6e8['id'],_0x1a3416['datasetId'])??firstString(_0x12b6e8[_0x32bacf(0x186)],_0x12b6e8['id'],_0x1a3416[_0x32bacf(0x16c)])??null,'code':_0xd44d55,'name':firstString(_0x12b6e8[_0x32bacf(0x172)],_0x1a3416[_0x32bacf(0x16e)],_0x1a3416[_0x32bacf(0x172)])||null,'sourceType':_0x14b40f,'dbTableSelector':_0x14b40f==='DB_TABLE'?{'dbLinkId':firstNumber(_0x3888be[_0x32bacf(0x14b)]),'tableName':firstString(_0x3888be['tableName'])||null}:null};}function resolveSourceType(_0x2741df,_0x4c69cc,_0x559a03){const _0xeb85ec=a58_0x1aeca2,_0x48e24a=firstString(_0x2741df[_0xeb85ec(0x178)],_0x2741df['sourceType'],_0x4c69cc[_0xeb85ec(0x178)],_0x4c69cc[_0xeb85ec(0x13d)])?.['trim']()[_0xeb85ec(0x16b)]();if(_0x48e24a===_0xeb85ec(0x15c)||_0x48e24a===_0xeb85ec(0x13c))return _0x48e24a;if(Object[_0xeb85ec(0x17e)](_0x559a03)[_0xeb85ec(0x16f)]>0x0)return _0xeb85ec(0x15c);throw CliErrors['validation'](_0xeb85ec(0x159));}function loadCurrentBusinessGroup(_0xb457eb,_0x184910){const _0x307019=a58_0x1aeca2,_0x5a9bd9=readBusinessGroupFromDatasetDetail(_0xb457eb,_0x184910['sourceType']);if(_0x5a9bd9[_0x307019(0x165)])return normalizeBusinessGroup(_0x5a9bd9[_0x307019(0x143)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3bf210,_0x236bf8){const _0x40e9fe=a58_0x1aeca2,_0x4aa55f=asPlainObject(_0x3bf210[_0x40e9fe(0x16a)]),_0x3602e6=firstPresent(_0x3bf210[_0x40e9fe(0x145)]);if(_0x3602e6[_0x40e9fe(0x165)])return _0x3602e6;const _0x4c7218=firstPresent(_0x4aa55f[_0x40e9fe(0x145)]);if(_0x4c7218[_0x40e9fe(0x165)])return _0x4c7218;if(_0x236bf8===_0x40e9fe(0x15c))return{'found':![]};const _0x429d45=readBusinessGroupFromExtend(_0x3bf210[_0x40e9fe(0x156)]);if(_0x429d45['found'])return _0x429d45;return readBusinessGroupFromExtend(_0x4aa55f[_0x40e9fe(0x156)]);}function readBusinessGroupFromExtend(_0x551b84){const _0xdb6b4c=a58_0x1aeca2;if(_0x551b84===undefined||_0x551b84===null||_0x551b84==='')return{'found':![]};if(typeof _0x551b84==='string')try{const _0xb0f3f6=JSON[_0xdb6b4c(0x164)](_0x551b84);return readBusinessGroupFromExtend(_0xb0f3f6);}catch{return{'found':![]};}const _0x586b30=asPlainObject(_0x551b84);if(Object[_0xdb6b4c(0x17a)]['hasOwnProperty']['call'](_0x586b30,_0xdb6b4c(0x145)))return{'found':!![],'value':_0x586b30[_0xdb6b4c(0x145)]};return{'found':![]};}function firstPresent(..._0x156bbc){for(const _0x4a9ddf of _0x156bbc){if(_0x4a9ddf!==undefined&&_0x4a9ddf!==null)return{'found':!![],'value':_0x4a9ddf};}return{'found':![]};}function assertExpectedBusinessGroup(_0x531d66,_0x45ffc9){const _0x6e708b=a58_0x1aeca2;if(_0x45ffc9===undefined)return;const _0x40ab62=normalizeBusinessGroupArgument(_0x45ffc9);if(_0x531d66!==_0x40ab62)throw CliErrors[_0x6e708b(0x15d)](_0x6e708b(0x170),_0x6e708b(0x141)+JSON['stringify'](_0x40ab62)+_0x6e708b(0x149)+JSON[_0x6e708b(0x162)](_0x531d66));}function buildBackendPlan(_0x2daa31,_0x99b8ac,_0x12b87a){const _0x2d4e4b=a58_0x1aeca2;if(_0x99b8ac[_0x2d4e4b(0x13d)]===_0x2d4e4b(0x15c)){if(!_0x99b8ac[_0x2d4e4b(0x153)]||_0x99b8ac['dbTableSelector']['dbLinkId']===null||!_0x99b8ac[_0x2d4e4b(0x153)]['tableName'])throw CliErrors[_0x2d4e4b(0x15d)](_0x2d4e4b(0x169),_0x2d4e4b(0x182));return{'kind':_0x2d4e4b(0x13e),'method':_0x2d4e4b(0x14e),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x99b8ac[_0x2d4e4b(0x153)][_0x2d4e4b(0x147)],'tableName':_0x99b8ac[_0x2d4e4b(0x153)][_0x2d4e4b(0x176)],'businessGroup':_0x12b87a}};}return{'kind':'metadata','method':_0x2d4e4b(0x14e),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x2daa31,'datasetCode':_0x99b8ac['code'],'businessGroup':_0x12b87a}};}function normalizeBusinessGroup(_0x262460){const _0x517d8a=a58_0x1aeca2;if(_0x262460===undefined||_0x262460===null)return'';return String(_0x262460)[_0x517d8a(0x155)]();}function normalizeBusinessGroupArgument(_0x10e5f7){const _0x41f86b=normalizeBusinessGroup(_0x10e5f7);return _0x41f86b===UNGROUPED_BUSINESS_GROUP?'':_0x41f86b;}function displayBusinessGroup(_0x8cd28b){return _0x8cd28b||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x529eca){const _0x2eb34d=a58_0x1aeca2;if(!_0x529eca||typeof _0x529eca!==_0x2eb34d(0x161)||Array['isArray'](_0x529eca))return{};return _0x529eca;}function firstString(..._0x34876a){const _0x4c8bcf=a58_0x1aeca2;for(const _0x43d72a of _0x34876a){if(typeof _0x43d72a===_0x4c8bcf(0x15b)&&_0x43d72a[_0x4c8bcf(0x155)]())return _0x43d72a[_0x4c8bcf(0x155)]();if(typeof _0x43d72a==='number'&&Number[_0x4c8bcf(0x15f)](_0x43d72a))return String(_0x43d72a);}return undefined;}function firstNumber(..._0x3d17fb){const _0x58a819=a58_0x1aeca2;for(const _0x2fb17f of _0x3d17fb){if(typeof _0x2fb17f==='number'&&Number[_0x58a819(0x15f)](_0x2fb17f))return _0x2fb17f;if(typeof _0x2fb17f===_0x58a819(0x15b)&&_0x2fb17f['trim']()&&Number['isFinite'](Number(_0x2fb17f)))return Number(_0x2fb17f);}return null;}function trim(_0x21dcfb){const _0x4edab8=a58_0x1aeca2;return String(_0x21dcfb||'')[_0x4edab8(0x155)]();}
|
|
1
|
+
const a58_0x233fdf=a58_0x2212;function a58_0x2790(){const _0x5566f7=['DB_TABLE','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','business-group-update','modelId','datasetCode','business-group','write','object','expect-business-group','datasetId','keys','POST','METADATA','79725URIUlp','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','isArray','5427228DRmeLy','stringify','/smartapi/question/er-config/business-group/edit','2377424pBYHXi','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','source','apiError','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','appCode','extend','metadata','call','--business-group\x20must\x20not\x20be\x20blank',',\x20actual\x20','method','sourceType','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','code','436BnsZfj','backend','/smartapi/dblink/updateTableBusinessGroup','dbTableSelector','length','8668266jJtCYz','expectBusinessGroup','1915345lmeUwU','path','639AdewoW','string','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','matched','modelCode','prototype','128IYQwcE','dbtableConfig','data','--business-group\x20is\x20required','isFinite','value','validation','update','businessGroup','499863oOFbZE','ungrouped','payload','str','577580vVbDQO','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','dataset','db-table','trim','tableName','name','found','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','dbLinkId','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.'];a58_0x2790=function(){return _0x5566f7;};return a58_0x2790();}(function(_0x57dba3,_0x42975c){const _0x2bc0fa=a58_0x2212,_0x331e6e=_0x57dba3();while(!![]){try{const _0x3e9dea=parseInt(_0x2bc0fa(0x1dc))/0x1+-parseInt(_0x2bc0fa(0x1c6))/0x2+-parseInt(_0x2bc0fa(0x20d))/0x3+parseInt(_0x2bc0fa(0x1d5))/0x4*(-parseInt(_0x2bc0fa(0x20a))/0x5)+-parseInt(_0x2bc0fa(0x1da))/0x6+-parseInt(_0x2bc0fa(0x1ed))/0x7*(-parseInt(_0x2bc0fa(0x1e4))/0x8)+parseInt(_0x2bc0fa(0x1de))/0x9*(parseInt(_0x2bc0fa(0x1f1))/0xa);if(_0x3e9dea===_0x42975c)break;else _0x331e6e['push'](_0x331e6e['shift']());}catch(_0x4d0f52){_0x331e6e['push'](_0x331e6e['shift']());}}}(a58_0x2790,0xeed1b));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x233fdf(0x1d7),METADATA_BACKEND_PATH=a58_0x233fdf(0x1c5),UNGROUPED_BUSINESS_GROUP=a58_0x233fdf(0x1ee);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x498b67,input:_0x17ea63,dryRun:_0x5465c1}){const _0x4942a0=a58_0x233fdf;validateInput(_0x17ea63);const _0x296dba=normalizeBusinessGroupArgument(_0x17ea63['businessGroup']),_0x5472d8=await getDatasetDetail(_0x17ea63[_0x4942a0(0x1d4)]),_0x33e205=resolveBusinessGroupDataset(_0x5472d8,_0x17ea63[_0x4942a0(0x1d4)]);assertBusinessGroupUpdateSupported(_0x33e205,_0x296dba);const _0x7e1fbb=loadCurrentBusinessGroup(_0x5472d8,_0x33e205);assertExpectedBusinessGroup(_0x7e1fbb,_0x17ea63[_0x4942a0(0x1db)]);const _0xa87bd7=buildBackendPlan(_0x498b67,_0x33e205,_0x296dba),_0x2ec1a0=_0x7e1fbb!==_0x296dba;let _0x1100d0;if(_0x2ec1a0&&!_0x5465c1){_0xa87bd7['kind']==='db-table'?await updateDbTableBusinessGroup(_0xa87bd7[_0x4942a0(0x1ef)]):await updateErBusinessGroup(_0xa87bd7[_0x4942a0(0x1ef)]);const _0x29786a=await getDatasetDetail(_0x33e205[_0x4942a0(0x1d4)]),_0x2330e3=resolveBusinessGroupDataset(_0x29786a,_0x33e205[_0x4942a0(0x1d4)]),_0x5a08cc=loadCurrentBusinessGroup(_0x29786a,_0x2330e3);if(_0x5a08cc!==_0x296dba)throw CliErrors[_0x4942a0(0x1c9)](_0x4942a0(0x1f3),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x296dba))+_0x4942a0(0x1d0)+JSON[_0x4942a0(0x1c4)](displayBusinessGroup(_0x5a08cc))+'.');_0x1100d0={'verified':!![],'status':_0x4942a0(0x1e1),'afterReadback':{'businessGroup':displayBusinessGroup(_0x5a08cc)}};}else!_0x2ec1a0&&(_0x1100d0={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x7e1fbb)}});const _0x945eb4={'operation':_0x4942a0(0x1eb),'appCode':_0x498b67,'selector':{'code':_0x33e205[_0x4942a0(0x1d4)]},'dataset':{'id':_0x33e205['id'],'code':_0x33e205[_0x4942a0(0x1d4)],'name':_0x33e205[_0x4942a0(0x1f8)],'sourceType':_0x33e205['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x7e1fbb)},'after':{'businessGroup':displayBusinessGroup(_0x296dba)},'changed':_0x2ec1a0,'dryRun':_0x5465c1,'submitted':_0x2ec1a0&&!_0x5465c1,'backend':{'method':_0xa87bd7[_0x4942a0(0x1d1)],'path':_0xa87bd7[_0x4942a0(0x1dd)],'payload':_0xa87bd7['payload']},..._0x1100d0?{'verification':_0x1100d0}:{},'warnings':[]};return{'ok':!![],'data':_0x945eb4,'message':_0x2ec1a0?_0x5465c1?_0x4942a0(0x1e0)+_0x33e205['code']:_0x4942a0(0x1ca)+_0x33e205['code']:_0x4942a0(0x20b)+_0x33e205[_0x4942a0(0x1d4)]};}export const datasetBusinessGroupUpdate={'service':a58_0x233fdf(0x1f4),'command':a58_0x233fdf(0x1ff),'description':'Update\x20business\x20scenario\x20group','risk':a58_0x233fdf(0x203),'flags':[CODE_FLAG,{'name':'business-group','type':a58_0x233fdf(0x1df),'required':!![],'description':a58_0x233fdf(0x1c7)},{'name':a58_0x233fdf(0x205),'type':a58_0x233fdf(0x1df),'required':![],'description':a58_0x233fdf(0x1d3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x19c375){validateInput(readBusinessGroupUpdateInput(_0x19c375));},async 'dryRun'(_0x422307){const _0x3591dd=a58_0x233fdf,_0x537633=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x422307[_0x3591dd(0x1cb)],'input':readBusinessGroupUpdateInput(_0x422307),'dryRun':!![]});return{'method':_0x537633['data'][_0x3591dd(0x1d6)][_0x3591dd(0x1d1)],'url':_0x537633[_0x3591dd(0x1e6)]['backend']['path'],'body':_0x537633['data']['backend'][_0x3591dd(0x1ef)],'description':_0x537633['message'],..._0x537633['data']};},async 'execute'(_0x449873){const _0x4522c2=a58_0x233fdf;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x449873[_0x4522c2(0x1cb)],'input':readBusinessGroupUpdateInput(_0x449873),'dryRun':![]});}};function a58_0x2212(_0x2b4a91,_0x3fe08f){_0x2b4a91=_0x2b4a91-0x1c4;const _0x2790b9=a58_0x2790();let _0x2212ce=_0x2790b9[_0x2b4a91];return _0x2212ce;}function readBusinessGroupUpdateInput(_0x91f2bf){const _0x3c0c8d=a58_0x233fdf,_0x176555=_0x91f2bf[_0x3c0c8d(0x1f0)](_0x3c0c8d(0x205));return{'code':trim(_0x91f2bf[_0x3c0c8d(0x1f0)](_0x3c0c8d(0x1d4))),'businessGroup':_0x91f2bf[_0x3c0c8d(0x1f0)](_0x3c0c8d(0x202)),'expectBusinessGroup':_0x176555===undefined||_0x176555===''?undefined:_0x176555};}function validateInput(_0x5a4ff3){const _0xe07653=a58_0x233fdf;if(!trim(_0x5a4ff3[_0xe07653(0x1d4)]))throw CliErrors[_0xe07653(0x1ea)]('--code\x20is\x20required');if(_0x5a4ff3[_0xe07653(0x1ec)]===undefined)throw CliErrors[_0xe07653(0x1ea)](_0xe07653(0x1e7));if(!trim(_0x5a4ff3[_0xe07653(0x1ec)]))throw CliErrors[_0xe07653(0x1ea)](_0xe07653(0x1cf));}function assertBusinessGroupUpdateSupported(_0x2d2ba9,_0x347bd9){const _0x2fd1fb=a58_0x233fdf;if(_0x2d2ba9[_0x2fd1fb(0x1d2)]==='DB_TABLE'&&!_0x347bd9)throw CliErrors[_0x2fd1fb(0x1ea)](_0x2fd1fb(0x1f2));}function resolveBusinessGroupDataset(_0x922d40,_0x2288b0){const _0x270929=a58_0x233fdf,_0x4e0ecf=asPlainObject(_0x922d40[_0x270929(0x1f4)]),_0x57f57e=asPlainObject(_0x922d40[_0x270929(0x1e5)]),_0x1bd565=resolveSourceType(_0x922d40,_0x4e0ecf,_0x57f57e),_0x30b8fc=firstString(_0x922d40[_0x270929(0x1e2)],_0x922d40[_0x270929(0x1d4)],_0x4e0ecf[_0x270929(0x201)],_0x2288b0)||_0x2288b0;return{'id':firstNumber(_0x922d40[_0x270929(0x200)],_0x922d40['id'],_0x4e0ecf[_0x270929(0x206)])??firstString(_0x922d40[_0x270929(0x200)],_0x922d40['id'],_0x4e0ecf['datasetId'])??null,'code':_0x30b8fc,'name':firstString(_0x922d40[_0x270929(0x1f8)],_0x4e0ecf['datasetName'],_0x4e0ecf[_0x270929(0x1f8)])||null,'sourceType':_0x1bd565,'dbTableSelector':_0x1bd565===_0x270929(0x1fd)?{'dbLinkId':firstNumber(_0x57f57e['dbId']),'tableName':firstString(_0x57f57e[_0x270929(0x1f7)])||null}:null};}function resolveSourceType(_0x4a1110,_0x4de015,_0x105da6){const _0x159139=a58_0x233fdf,_0x4c9370=firstString(_0x4a1110[_0x159139(0x1c8)],_0x4a1110['sourceType'],_0x4de015[_0x159139(0x1c8)],_0x4de015[_0x159139(0x1d2)])?.[_0x159139(0x1f6)]()['toUpperCase']();if(_0x4c9370===_0x159139(0x1fd)||_0x4c9370===_0x159139(0x209))return _0x4c9370;if(Object[_0x159139(0x207)](_0x105da6)[_0x159139(0x1d9)]>0x0)return _0x159139(0x1fd);throw CliErrors[_0x159139(0x1ea)](_0x159139(0x1fc));}function loadCurrentBusinessGroup(_0x5b5850,_0x4342dc){const _0x2c9cc2=a58_0x233fdf,_0x26898c=readBusinessGroupFromDatasetDetail(_0x5b5850,_0x4342dc[_0x2c9cc2(0x1d2)]);if(_0x26898c[_0x2c9cc2(0x1f9)])return normalizeBusinessGroup(_0x26898c[_0x2c9cc2(0x1e9)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3b46e3,_0x41efd7){const _0x351e9f=a58_0x233fdf,_0x5cd996=asPlainObject(_0x3b46e3[_0x351e9f(0x1f4)]),_0x2ed10f=firstPresent(_0x3b46e3['businessGroup']);if(_0x2ed10f[_0x351e9f(0x1f9)])return _0x2ed10f;const _0xfc03fa=firstPresent(_0x5cd996['businessGroup']);if(_0xfc03fa[_0x351e9f(0x1f9)])return _0xfc03fa;if(_0x41efd7===_0x351e9f(0x1fd))return{'found':![]};const _0x41f756=readBusinessGroupFromExtend(_0x3b46e3[_0x351e9f(0x1cc)]);if(_0x41f756[_0x351e9f(0x1f9)])return _0x41f756;return readBusinessGroupFromExtend(_0x5cd996[_0x351e9f(0x1cc)]);}function readBusinessGroupFromExtend(_0x597d6d){const _0x487d50=a58_0x233fdf;if(_0x597d6d===undefined||_0x597d6d===null||_0x597d6d==='')return{'found':![]};if(typeof _0x597d6d===_0x487d50(0x1df))try{const _0x3faf3d=JSON['parse'](_0x597d6d);return readBusinessGroupFromExtend(_0x3faf3d);}catch{return{'found':![]};}const _0xba2b3a=asPlainObject(_0x597d6d);if(Object[_0x487d50(0x1e3)]['hasOwnProperty'][_0x487d50(0x1ce)](_0xba2b3a,_0x487d50(0x1ec)))return{'found':!![],'value':_0xba2b3a['businessGroup']};return{'found':![]};}function firstPresent(..._0x54012a){for(const _0x3c6c03 of _0x54012a){if(_0x3c6c03!==undefined&&_0x3c6c03!==null)return{'found':!![],'value':_0x3c6c03};}return{'found':![]};}function assertExpectedBusinessGroup(_0x307b74,_0x2aa97b){const _0x3efa0d=a58_0x233fdf;if(_0x2aa97b===undefined)return;const _0x145688=normalizeBusinessGroupArgument(_0x2aa97b);if(_0x307b74!==_0x145688)throw CliErrors[_0x3efa0d(0x1ea)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON[_0x3efa0d(0x1c4)](_0x145688)+',\x20actual\x20'+JSON['stringify'](_0x307b74));}function buildBackendPlan(_0x143fd6,_0xe0294e,_0x202a58){const _0x31715c=a58_0x233fdf;if(_0xe0294e[_0x31715c(0x1d2)]===_0x31715c(0x1fd)){if(!_0xe0294e[_0x31715c(0x1d8)]||_0xe0294e[_0x31715c(0x1d8)][_0x31715c(0x1fb)]===null||!_0xe0294e[_0x31715c(0x1d8)]['tableName'])throw CliErrors[_0x31715c(0x1ea)](_0x31715c(0x1fe),_0x31715c(0x1fa));return{'kind':_0x31715c(0x1f5),'method':_0x31715c(0x208),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0xe0294e[_0x31715c(0x1d8)][_0x31715c(0x1fb)],'tableName':_0xe0294e[_0x31715c(0x1d8)][_0x31715c(0x1f7)],'businessGroup':_0x202a58}};}return{'kind':_0x31715c(0x1cd),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x143fd6,'datasetCode':_0xe0294e[_0x31715c(0x1d4)],'businessGroup':_0x202a58}};}function normalizeBusinessGroup(_0x3d1ee5){const _0x541bce=a58_0x233fdf;if(_0x3d1ee5===undefined||_0x3d1ee5===null)return'';return String(_0x3d1ee5)[_0x541bce(0x1f6)]();}function normalizeBusinessGroupArgument(_0x41d285){const _0x1c2e17=normalizeBusinessGroup(_0x41d285);return _0x1c2e17===UNGROUPED_BUSINESS_GROUP?'':_0x1c2e17;}function displayBusinessGroup(_0x183df5){return _0x183df5||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x1dcfb6){const _0x52b110=a58_0x233fdf;if(!_0x1dcfb6||typeof _0x1dcfb6!==_0x52b110(0x204)||Array[_0x52b110(0x20c)](_0x1dcfb6))return{};return _0x1dcfb6;}function firstString(..._0x5232ce){const _0x26a552=a58_0x233fdf;for(const _0xfcb958 of _0x5232ce){if(typeof _0xfcb958===_0x26a552(0x1df)&&_0xfcb958[_0x26a552(0x1f6)]())return _0xfcb958['trim']();if(typeof _0xfcb958==='number'&&Number[_0x26a552(0x1e8)](_0xfcb958))return String(_0xfcb958);}return undefined;}function firstNumber(..._0x2f165f){const _0x2dee19=a58_0x233fdf;for(const _0x18818d of _0x2f165f){if(typeof _0x18818d==='number'&&Number[_0x2dee19(0x1e8)](_0x18818d))return _0x18818d;if(typeof _0x18818d==='string'&&_0x18818d[_0x2dee19(0x1f6)]()&&Number[_0x2dee19(0x1e8)](Number(_0x18818d)))return Number(_0x18818d);}return null;}function trim(_0x3f1786){const _0x15e554=a58_0x233fdf;return String(_0x3f1786||'')[_0x15e554(0x1f6)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x10259b=a59_0x5a37;function a59_0x224f(){const _0x3507ba=['280716AsilCg','3890JfoSUv','DB_TABLE','dataset','7byKyMV','Found\x20','11HuayHh','businessGroup','9713015ttUAMk','136fPgsLX','groups','business-groups','3685254tQlIpt','5BTqNij','appCode','number','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','31452YVXJQv','dbid','61846QGbMTl','ungrouped','read','8PZqpCF','\x20business\x20group(s)\x20for\x20database\x20connection\x20','num','7245QBbAbN','2246594cOOttp'];a59_0x224f=function(){return _0x3507ba;};return a59_0x224f();}(function(_0x4c59d6,_0x517534){const _0x3b0f93=a59_0x5a37,_0x5367b7=_0x4c59d6();while(!![]){try{const _0x4d87da=-parseInt(_0x3b0f93(0x1dd))/0x1*(-parseInt(_0x3b0f93(0x1d1))/0x2)+parseInt(_0x3b0f93(0x1cf))/0x3*(-parseInt(_0x3b0f93(0x1e2))/0x4)+parseInt(_0x3b0f93(0x1cb))/0x5*(parseInt(_0x3b0f93(0x1ca))/0x6)+parseInt(_0x3b0f93(0x1d8))/0x7*(parseInt(_0x3b0f93(0x1d4))/0x8)+parseInt(_0x3b0f93(0x1d7))/0x9*(parseInt(_0x3b0f93(0x1da))/0xa)+parseInt(_0x3b0f93(0x1df))/0xb*(parseInt(_0x3b0f93(0x1d9))/0xc)+-parseInt(_0x3b0f93(0x1e1))/0xd;if(_0x4d87da===_0x517534)break;else _0x5367b7['push'](_0x5367b7['shift']());}catch(_0x131846){_0x5367b7['push'](_0x5367b7['shift']());}}}(a59_0x224f,0x5de1b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x5a37(_0x3ccc31,_0x27baf2){_0x3ccc31=_0x3ccc31-0x1c9;const _0x224f20=a59_0x224f();let _0x5a37de=_0x224f20[_0x3ccc31];return _0x5a37de;}export const datasetBusinessGroups={'service':a59_0x10259b(0x1dc),'command':a59_0x10259b(0x1c9),'description':a59_0x10259b(0x1ce),'risk':a59_0x10259b(0x1d3),'flags':[{'name':a59_0x10259b(0x1d0),'type':a59_0x10259b(0x1cd),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4fa8b1){const _0x4eca21=a59_0x10259b,_0x48deb2=_0x4fa8b1[_0x4eca21(0x1d6)]('dbid'),_0x155dc2=await getErBusinessGroupSummary(_0x4fa8b1[_0x4eca21(0x1cc)],_0x48deb2),_0x3215d4=_0x155dc2[_0x4eca21(0x1e3)]['map'](_0x3b3497=>({..._0x3b3497,'businessGroup':_0x3b3497[_0x4eca21(0x1e0)]['trim']()||_0x4eca21(0x1d2)}));return{'ok':!![],'data':{..._0x155dc2,'groups':_0x3215d4,'scope':_0x4eca21(0x1db)},'message':_0x4eca21(0x1de)+_0x3215d4['length']+_0x4eca21(0x1d5)+_0x48deb2};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x5a8b45=a60_0x2191;(function(_0x1cc8d5,_0x10ae40){const _0x4b6093=a60_0x2191,_0x1d96ee=_0x1cc8d5();while(!![]){try{const _0x1f7b79=-parseInt(_0x4b6093(0xa1))/0x1*(-parseInt(_0x4b6093(0xa6))/0x2)+-parseInt(_0x4b6093(0x93))/0x3*(-parseInt(_0x4b6093(0x84))/0x4)+-parseInt(_0x4b6093(0x9e))/0x5*(-parseInt(_0x4b6093(0xab))/0x6)+-parseInt(_0x4b6093(0x8d))/0x7*(parseInt(_0x4b6093(0x9b))/0x8)+-parseInt(_0x4b6093(0xa8))/0x9+-parseInt(_0x4b6093(0xa5))/0xa+-parseInt(_0x4b6093(0x8e))/0xb*(-parseInt(_0x4b6093(0x99))/0xc);if(_0x1f7b79===_0x10ae40)break;else _0x1d96ee['push'](_0x1d96ee['shift']());}catch(_0x56f98f){_0x1d96ee['push'](_0x1d96ee['shift']());}}}(a60_0x5700,0xeba64));function a60_0x2191(_0x3f5947,_0x4bf7f1){_0x3f5947=_0x3f5947-0x82;const _0x570068=a60_0x5700();let _0x219172=_0x570068[_0x3f5947];return _0x219172;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x5a8b45(0x9c),'filter':a60_0x5a8b45(0x96),'getOne':a60_0x5a8b45(0x89)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x5a8b45(0x95);function valueToString(_0xcf5575){const _0x1b914e=a60_0x5a8b45;return _0xcf5575==null?'':String(_0xcf5575)[_0x1b914e(0x86)]();}function getDatasetCode(_0x46c6e5){const _0x249305=a60_0x5a8b45;return valueToString(_0x46c6e5['code']??_0x46c6e5[_0x249305(0x90)]??_0x46c6e5['dataset']?.[_0x249305(0x9a)]);}function a60_0x5700(){const _0x6c63bb=['source','17193336IVcuWv','datasetCode','15353512kyilGk','lovrabet','tableName','140fQGhEc','toUpperCase','SQL\x20schema\x20validation','1lGnioD','dbtableConfig','dataset','join','17540320nxBGMH','1655358cvYosQ','METADATA','3290886LziXgG','getOne','sourceType','60510AHcUzG','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','object','80DJonwn','datasetName','trim','validation','dbId','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','\x20is\x20','The\x20current\x20dataset\x20\x22','filter','7JUJsWQ','22ftymlC','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','modelCode','dbtable','UNKNOWN','154272lvOhib','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','name'];a60_0x5700=function(){return _0x6c63bb;};return a60_0x5700();}function getDatasetName(_0x2e295f){const _0x171a14=a60_0x5a8b45;return valueToString(_0x2e295f[_0x171a14(0x97)]??_0x2e295f[_0x171a14(0xa3)]?.[_0x171a14(0x85)])||'unknown';}function getDatasetSource(_0x9e6074){const _0x566a37=a60_0x5a8b45;return valueToString(_0x9e6074[_0x566a37(0x98)]??_0x9e6074[_0x566a37(0xa3)]?.[_0x566a37(0xaa)])[_0x566a37(0x9f)]();}function getDbtableConfig(_0x2b9963){const _0x2f67a2=a60_0x5a8b45,_0x285a3e=_0x2b9963[_0x2f67a2(0xa2)]??_0x2b9963[_0x2f67a2(0x91)];return _0x285a3e&&typeof _0x285a3e===_0x2f67a2(0x83)?_0x285a3e:{};}export function isDbTableBackedDataset(_0x57d847){const _0x15d5f9=a60_0x5a8b45,_0x12cef7=getDatasetSource(_0x57d847);if(_0x12cef7===_0x15d5f9(0xa7))return![];const _0x10550a=getDbtableConfig(_0x57d847),_0x522dc2=_0x10550a[_0x15d5f9(0x88)]??_0x10550a['id'],_0x2d04dd=valueToString(_0x10550a[_0x15d5f9(0x9d)]??_0x57d847['tableName']??_0x57d847[_0x15d5f9(0xa3)]?.['tableName']);return _0x522dc2!==undefined&&_0x522dc2!==null&&_0x2d04dd['length']>0x0;}export function filterDbTableBackedDatasets(_0x46d418){return _0x46d418['filter'](_0x1a5683=>isDbTableBackedDataset(_0x1a5683));}export function buildDbTableBackedRequirementMessage(_0x1ffa60,_0x504d3c=a60_0x5a8b45(0xa0)){const _0x1adbe9=a60_0x5a8b45,_0x22c1e7=getDatasetSource(_0x1ffa60)||_0x1adbe9(0x92),_0x2f9718=getDatasetName(_0x1ffa60),_0x1ae279=getDatasetCode(_0x1ffa60),_0x59b687=_0x1ae279?'\x20('+_0x1ae279+')':'';return[_0x1adbe9(0x8b)+_0x2f9718+'\x22'+_0x59b687+_0x1adbe9(0x8a)+_0x22c1e7+_0x1adbe9(0x82)+_0x504d3c+'.',_0x1adbe9(0x94),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x1adbe9(0x8f)+RUNTIME_DATA_ACCESS_COMMANDS[_0x1adbe9(0x8c)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x1adbe9(0xa9)]+'.'][_0x1adbe9(0xa4)]('\x20');}export function assertDatasetIsDbTableBacked(_0x3e434e,_0x1d35a6){const _0x17cf8f=a60_0x5a8b45;if(!isDbTableBackedDataset(_0x3e434e))throw CliErrors[_0x17cf8f(0x87)](buildDbTableBackedRequirementMessage(_0x3e434e,_0x1d35a6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x2f9140=a61_0x1253;(function(_0x16cc01,_0x2c85e4){const _0x48935e=a61_0x1253,_0x3a3cdf=_0x16cc01();while(!![]){try{const _0x4d03a0=parseInt(_0x48935e(0x1f7))/0x1*(parseInt(_0x48935e(0x211))/0x2)+parseInt(_0x48935e(0x21c))/0x3+-parseInt(_0x48935e(0x1f6))/0x4*(-parseInt(_0x48935e(0x225))/0x5)+-parseInt(_0x48935e(0x224))/0x6+parseInt(_0x48935e(0x221))/0x7+parseInt(_0x48935e(0x1ef))/0x8*(-parseInt(_0x48935e(0x20f))/0x9)+parseInt(_0x48935e(0x220))/0xa;if(_0x4d03a0===_0x2c85e4)break;else _0x3a3cdf['push'](_0x3a3cdf['shift']());}catch(_0x469534){_0x3a3cdf['push'](_0x3a3cdf['shift']());}}}(a61_0x441a,0x1b4d0));function a61_0x1253(_0x31bb58,_0x3bbae4){_0x31bb58=_0x31bb58-0x1ec;const _0x441a96=a61_0x441a();let _0x125382=_0x441a96[_0x31bb58];return _0x125382;}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_0x2f9140(0x204),'description':a61_0x2f9140(0x217)},DBID_FLAG={'name':a61_0x2f9140(0x1fb),'type':a61_0x2f9140(0x204),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':a61_0x2f9140(0x1f9),'type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},CASCADE_FLAG={'name':'cascade','type':a61_0x2f9140(0x21d),'description':a61_0x2f9140(0x226)},EXPECTED_COUNT_FLAG={'name':a61_0x2f9140(0x201),'type':'number','description':a61_0x2f9140(0x223)};export const datasetDelete={'service':a61_0x2f9140(0x1fd),'command':a61_0x2f9140(0x1f0),'description':a61_0x2f9140(0x21e),'risk':a61_0x2f9140(0x1fe),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54df87){const _0x161b88=a61_0x2f9140,_0x1257eb=_0x54df87[_0x161b88(0x214)]('id'),_0x19a010=_0x54df87['str'](_0x161b88(0x21b)),_0xc0b7d7=_0x54df87[_0x161b88(0x214)](_0x161b88(0x1fb)),_0x651055=[_0x1257eb>0x0,Boolean(_0x19a010),_0xc0b7d7>0x0]['filter'](Boolean);if(_0x651055[_0x161b88(0x1f5)]===0x0)throw CliErrors[_0x161b88(0x1fc)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x651055[_0x161b88(0x1f5)]>0x1)throw CliErrors['validation']('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x1e830d){const _0x4fd9a2=a61_0x2f9140,_0x43688f=await resolveTargets(_0x1e830d),_0x365277=_0x1e830d[_0x4fd9a2(0x216)](_0x4fd9a2(0x209));return{'method':_0x4fd9a2(0x1f2),'url':_0x4fd9a2(0x227)+(_0x365277?_0x4fd9a2(0x1ed):_0x4fd9a2(0x210)),'body':{'count':_0x43688f[_0x4fd9a2(0x1f5)],'cascade':_0x365277,'datasets':_0x43688f},'description':_0x365277?_0x4fd9a2(0x202)+_0x43688f[_0x4fd9a2(0x1f5)]+_0x4fd9a2(0x1ff):_0x4fd9a2(0x218)+_0x43688f[_0x4fd9a2(0x1f5)]+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x121c22){const _0x36e42e=a61_0x2f9140;if(!_0x121c22[_0x36e42e(0x216)]('confirm'))throw CliErrors[_0x36e42e(0x1fc)]('--confirm\x20is\x20required\x20to\x20delete\x20datasets.',_0x36e42e(0x200));const _0xf36198=await resolveTargets(_0x121c22),_0x5081ba=_0x121c22[_0x36e42e(0x216)](_0x36e42e(0x209)),_0x26fae5=[],_0xb051f5=[];for(const _0x2e1866 of _0xf36198){try{await deleteDataset(_0x2e1866['id'],_0x5081ba),_0x26fae5[_0x36e42e(0x20b)](_0x2e1866);}catch(_0x10e015){_0xb051f5['push']({..._0x2e1866,'error':_0x10e015 instanceof Error?_0x10e015[_0x36e42e(0x21a)]:String(_0x10e015)});}}if(_0xb051f5[_0x36e42e(0x1f5)]>0x0){const _0xe51f32=buildPageRestoreCommands(_0x121c22[_0x36e42e(0x222)],_0x5081ba?_0x26fae5:[]);return{'ok':![],'data':{'requested':_0xf36198[_0x36e42e(0x1f5)],'cascade':_0x5081ba,'deletedCount':_0x26fae5['length'],'failedCount':_0xb051f5[_0x36e42e(0x1f5)],'deleted':_0x26fae5,'failed':_0xb051f5,'pageRestoreCommands':_0xe51f32},'message':'Deleted\x20'+_0x26fae5[_0x36e42e(0x1f5)]+'/'+_0xf36198[_0x36e42e(0x1f5)]+'\x20dataset(s);\x20'+_0xb051f5[_0x36e42e(0x1f5)]+_0x36e42e(0x1f8)};}return{'ok':!![],'data':{'requested':_0xf36198[_0x36e42e(0x1f5)],'cascade':_0x5081ba,'deletedCount':_0x26fae5['length'],'deleted':_0x26fae5,'pageRestoreCommands':buildPageRestoreCommands(_0x121c22['appCode'],_0x5081ba?_0x26fae5:[])},'message':_0x36e42e(0x1ec)+_0x26fae5['length']+_0x36e42e(0x1f3)};}};function a61_0x441a(){const _0x59364b=['expected-count','Would\x20delete\x20','description','number','dbId','dbtableConfig','id=','rabetbase\x20page\x20restore\x20--id\x20','cascade','isArray','push','name','map','relatedPageInfoList','15264LTIrpy','false','466JbRSpi','No\x20undeleted\x20dataset\x20found\x20for\x20','source','num','tableName','bool','Dataset\x20id','Would\x20safely\x20delete\x20','filter','message','code','113592EimTIL','boolean','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Matched\x20','1076230rOJxDm','317275UsqoWp','appCode','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','497328FCcQtn','230hlhUPz','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','/smartapi/dataset/delete?cascade=','Deleted\x20','true','type','848AcQwMA','delete','relatedPages','POST','\x20dataset(s)','str','length','4180QCzdmE','582oMrGyM','\x20failed','confirm','object','dbid','validation','dataset','high-risk-write','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.'];a61_0x441a=function(){return _0x59364b;};return a61_0x441a();}async function resolveTargets(_0xd41daa){const _0x1d2f3b=a61_0x2f9140,_0x3f50fc=_0xd41daa[_0x1d2f3b(0x214)]('id'),_0xac38d3=_0xd41daa[_0x1d2f3b(0x1f4)](_0x1d2f3b(0x21b)),_0xa3ca8b=_0xd41daa[_0x1d2f3b(0x214)](_0x1d2f3b(0x1fb));let _0x505932;_0xac38d3?(_0x505932=await listDatasets(_0xd41daa[_0x1d2f3b(0x222)],{'code':_0xac38d3}),_0x505932=_0x505932['filter'](_0x5e031e=>_0x5e031e['code']===_0xac38d3)):(_0x505932=await listDatasets(_0xd41daa[_0x1d2f3b(0x222)]),_0x3f50fc>0x0&&(_0x505932=_0x505932[_0x1d2f3b(0x219)](_0x4d4254=>_0x4d4254['id']===_0x3f50fc)),_0xa3ca8b>0x0&&(_0x505932=_0x505932['filter'](_0x36d06c=>_0x36d06c['dbtableConfig']?.[_0x1d2f3b(0x205)]===_0xa3ca8b)));const _0x7d9b26=[];for(const _0x121473 of _0x505932){const _0x14415b=await getDatasetDetail(_0x121473['code']),_0x37405e=Array[_0x1d2f3b(0x20a)](_0x14415b[_0x1d2f3b(0x20e)])?_0x14415b['relatedPageInfoList'][_0x1d2f3b(0x219)](_0xfb17e8=>_0xfb17e8!=null&&typeof _0xfb17e8===_0x1d2f3b(0x1fa)&&_0xfb17e8['deleted']!==!![]):[];_0x7d9b26[_0x1d2f3b(0x20b)](normalizeTarget(_0x121473,_0x37405e));}if(_0x7d9b26[_0x1d2f3b(0x1f5)]===0x0){const _0x4eebb0=_0xac38d3||(_0x3f50fc>0x0?_0x1d2f3b(0x207)+_0x3f50fc:'dbid='+_0xa3ca8b);throw CliErrors[_0x1d2f3b(0x1fc)](_0x1d2f3b(0x212)+_0x4eebb0+'.');}const _0x41b2b9=_0xd41daa[_0x1d2f3b(0x214)](_0x1d2f3b(0x201));if(_0x41b2b9>0x0&&_0x7d9b26[_0x1d2f3b(0x1f5)]!==_0x41b2b9)throw CliErrors[_0x1d2f3b(0x1fc)](_0x1d2f3b(0x21f)+_0x7d9b26[_0x1d2f3b(0x1f5)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x41b2b9+'.');return _0x7d9b26;}function normalizeTarget(_0x499355,_0x5d65a3){const _0x2b1089=a61_0x2f9140,_0xa2ed37=_0x499355[_0x2b1089(0x206)]??{},_0x5afb74=_0x5d65a3[_0x2b1089(0x20d)](_0x66f5a8=>{const _0x3bf2db=_0x2b1089;if(_0x66f5a8==null||typeof _0x66f5a8!==_0x3bf2db(0x1fa))return null;const _0x5b4414=_0x66f5a8,_0x5e8ee4=Number(_0x5b4414['id']);if(!Number['isInteger'](_0x5e8ee4)||_0x5e8ee4<=0x0)return null;const _0x4e957b=_0x5b4414['title']??_0x5b4414['name'];return{'id':_0x5e8ee4,..._0x4e957b?{'name':String(_0x4e957b)}:{},..._0x5b4414[_0x3bf2db(0x1ee)]?{'type':String(_0x5b4414['type'])}:{}};})['filter'](_0x5b2e75=>_0x5b2e75!==null);return{'id':_0x499355['id'],'code':_0x499355['code'],'name':_0x499355[_0x2b1089(0x20c)],'description':_0x499355[_0x2b1089(0x203)],'source':_0x499355[_0x2b1089(0x213)],'dbId':_0xa2ed37[_0x2b1089(0x205)],'dbName':_0xa2ed37['dbName'],'tableName':_0xa2ed37[_0x2b1089(0x215)],'relatedPageCount':_0x5afb74['length'],'relatedPages':_0x5afb74};}function buildPageRestoreCommands(_0x45952e,_0x443bfe){const _0xfe0b93=a61_0x2f9140,_0x3c82f7=new Set();for(const _0xe74e02 of _0x443bfe){for(const _0x2ab313 of _0xe74e02[_0xfe0b93(0x1f1)])_0x3c82f7['add'](_0x2ab313['id']);}return[..._0x3c82f7][_0xfe0b93(0x20d)](_0x4089d0=>_0xfe0b93(0x208)+_0x4089d0+'\x20--appcode\x20'+_0x45952e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x24f94b=a62_0x1508;function a62_0x5437(){const _0x1d67bf=['2137520lkFhlV','2938929ymLJXZ','formatRules','dblinkInfoDTO','description','dataset','creatorIdField','afterScriptId','method','alias','47714zgJScZ','object','beforeScriptId','split','responseFields','indexes','labelField','toDatasetCode','options','creatorNameField','tableComment','length','2933670Kgiyyj','columnCodeListWithDeleted','relationId','relations','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','operations','createTimeField','7088706vdOaLP','modifierNameField','80303TQIKgB','toTableName','requestBody','map','modifierIdField','type','toFieldLabel','allFieldNames','fromField','path','requestFields','dbName','60vzOvNB','datasetKey','cardinality','deleted','push','filter','fields','properties','logicField','115svsGvl','str','validateRules','isArray','string','dbId','title','doVersion','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dbtableConfig','pkField','modelCode','name','host','extend','parse','allFields','code','displayName','dataType','tableName','modelId','doType','required','entries','50956gvyhKO','responseBody'];a62_0x5437=function(){return _0x1d67bf;};return a62_0x5437();}(function(_0xf0bd88,_0x5c692f){const _0x759538=a62_0x1508,_0x29aba8=_0xf0bd88();while(!![]){try{const _0x6fb618=parseInt(_0x759538(0x148))/0x1+-parseInt(_0x759538(0x133))/0x2*(-parseInt(_0x759538(0x154))/0x3)+parseInt(_0x759538(0x176))/0x4*(parseInt(_0x759538(0x15d))/0x5)+-parseInt(_0x759538(0x13f))/0x6+parseInt(_0x759538(0x12a))/0x7+parseInt(_0x759538(0x129))/0x8+-parseInt(_0x759538(0x146))/0x9;if(_0x6fb618===_0x5c692f)break;else _0x29aba8['push'](_0x29aba8['shift']());}catch(_0x1effea){_0x29aba8['push'](_0x29aba8['shift']());}}}(a62_0x5437,0x3fb22));function a62_0x1508(_0x39b213,_0x58412e){_0x39b213=_0x39b213-0x128;const _0x54378f=a62_0x5437();let _0x1508e6=_0x54378f[_0x39b213];return _0x1508e6;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3abb5b){const _0x1e80a1=a62_0x1508;if(_0x3abb5b[_0x1e80a1(0x157)])return null;const _0xc5881b=Boolean(_0x3abb5b[_0x1e80a1(0x16f)]!==undefined||_0x3abb5b['doType']!==undefined);let _0x2a1357={};if(!_0xc5881b&&typeof _0x3abb5b[_0x1e80a1(0x16b)]===_0x1e80a1(0x161))try{_0x2a1357=JSON[_0x1e80a1(0x16c)](_0x3abb5b[_0x1e80a1(0x16b)]);}catch{}const _0x273f8b=_0xc5881b?_0x3abb5b[_0x1e80a1(0x169)]:_0x3abb5b[_0x1e80a1(0x16e)],_0x3e8fbf=_0xc5881b?_0x3abb5b[_0x1e80a1(0x16f)]:_0x3abb5b['name'],_0x1adc02=_0xc5881b?_0x3abb5b[_0x1e80a1(0x173)]:_0x3abb5b[_0x1e80a1(0x14d)]||_0x3abb5b[_0x1e80a1(0x170)],_0x5da148=_0xc5881b?_0x3abb5b[_0x1e80a1(0x167)]===!![]:_0x2a1357[_0x1e80a1(0x167)]===!![],_0x35960d=_0xc5881b?_0x3abb5b[_0x1e80a1(0x174)]===!![]:_0x2a1357[_0x1e80a1(0x174)]===!![],_0x5b0fad=_0xc5881b?_0x3abb5b[_0x1e80a1(0x13b)]??null:_0x2a1357['options']??null,_0x2151a7={'name':_0x273f8b,'displayName':_0x3e8fbf||_0x273f8b,'type':_0x1adc02,'dbType':_0x3abb5b['dbType'],'pk':_0x5da148,'required':_0x35960d,'deprecated':_0x3abb5b['deprecated']===!![],'description':_0x3abb5b[_0x1e80a1(0x12d)]||undefined};return Array[_0x1e80a1(0x160)](_0x5b0fad)&&_0x5b0fad[_0x1e80a1(0x13e)]>0x0&&(_0x2151a7[_0x1e80a1(0x13b)]=_0x5b0fad),_0x2151a7;}function parseJsonMaybe(_0x3c148e){const _0xffc01=a62_0x1508;if(typeof _0x3c148e!==_0xffc01(0x161))return _0x3c148e;try{return JSON[_0xffc01(0x16c)](_0x3c148e);}catch{return _0x3c148e;}}function normalizeOperationEntry(_0x5d9db7,_0x1a08e2){const _0xf5431c=a62_0x1508;if(!_0x1a08e2||typeof _0x1a08e2!==_0xf5431c(0x134))return null;if(!_0x1a08e2[_0xf5431c(0x131)]||!_0x1a08e2[_0xf5431c(0x151)])return null;const _0x231f1f={'name':_0x5d9db7,'method':_0x1a08e2[_0xf5431c(0x131)],'path':_0x1a08e2[_0xf5431c(0x151)]};if(_0x1a08e2[_0xf5431c(0x16a)])_0x231f1f[_0xf5431c(0x16a)]=_0x1a08e2[_0xf5431c(0x16a)];if(_0x1a08e2[_0xf5431c(0x14a)]!=null){const _0x1aeac2=parseJsonMaybe(_0x1a08e2[_0xf5431c(0x14a)]);_0x231f1f[_0xf5431c(0x14a)]=_0x1aeac2;}if(_0x1a08e2[_0xf5431c(0x128)]!=null){const _0x2088ea=parseJsonMaybe(_0x1a08e2[_0xf5431c(0x128)]);_0x231f1f[_0xf5431c(0x128)]=_0x2088ea;}if(_0x1a08e2['beforeScriptId']!=null)_0x231f1f[_0xf5431c(0x135)]=_0x1a08e2[_0xf5431c(0x135)];if(_0x1a08e2[_0xf5431c(0x130)]!=null)_0x231f1f[_0xf5431c(0x130)]=_0x1a08e2['afterScriptId'];if(Array[_0xf5431c(0x160)](_0x1a08e2['requestFields']))_0x231f1f[_0xf5431c(0x152)]=_0x1a08e2[_0xf5431c(0x152)];if(Array['isArray'](_0x1a08e2['responseFields']))_0x231f1f[_0xf5431c(0x137)]=_0x1a08e2[_0xf5431c(0x137)];return _0x231f1f;}function summarizeDbtable(_0x323776){const _0x45770c=a62_0x1508,_0x167bd6={},_0xec9350=[_0x45770c(0x162),_0x45770c(0x153),_0x45770c(0x171),_0x45770c(0x155),_0x45770c(0x167),'allFields',_0x45770c(0x15c),_0x45770c(0x145),'updateTimeField',_0x45770c(0x12f),_0x45770c(0x13c),_0x45770c(0x14c),_0x45770c(0x147),_0x45770c(0x139),_0x45770c(0x12c)];for(const _0x2cf529 of _0xec9350){if(_0x323776[_0x2cf529]!==undefined)_0x167bd6[_0x2cf529]=_0x323776[_0x2cf529];}return typeof _0x167bd6['allFields']===_0x45770c(0x161)&&_0x167bd6[_0x45770c(0x16d)][_0x45770c(0x13e)]>0x0&&(_0x167bd6[_0x45770c(0x14f)]=_0x167bd6[_0x45770c(0x16d)][_0x45770c(0x136)](',')[_0x45770c(0x14b)](_0x2f1556=>_0x2f1556['trim']())[_0x45770c(0x159)](Boolean)),_0x167bd6;}function normalizeRelatedPages(_0x32c532){const _0x7ea59b=a62_0x1508;if(!Array[_0x7ea59b(0x160)](_0x32c532))return[];return _0x32c532[_0x7ea59b(0x159)](_0x58b34a=>_0x58b34a&&typeof _0x58b34a===_0x7ea59b(0x134))['map'](_0x868c75=>({'id':_0x868c75['id'],'type':_0x868c75['type'],'code':_0x868c75[_0x7ea59b(0x16e)],'title':_0x868c75[_0x7ea59b(0x163)],'deleted':_0x868c75[_0x7ea59b(0x157)]===!![]}));}export const datasetDetail={'service':a62_0x24f94b(0x12e),'command':'detail','description':a62_0x24f94b(0x165),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x24f94b(0x132),'type':a62_0x24f94b(0x161),'description':a62_0x24f94b(0x143)}],async 'execute'(_0x29a568){const _0x3c752e=a62_0x24f94b,_0x738906=await getDatasetDetail(_0x29a568[_0x3c752e(0x15e)]('code')),_0x1d070d=Array[_0x3c752e(0x160)](_0x738906[_0x3c752e(0x15a)])?_0x738906[_0x3c752e(0x15a)]:Array['isArray'](_0x738906[_0x3c752e(0x15b)])?_0x738906[_0x3c752e(0x15b)]:[],_0x2a4df0=_0x1d070d['map'](_0x15c45e=>normalizeField(_0x15c45e))['filter'](_0xbcdadb=>_0xbcdadb!==null),_0x49471d=_0x738906[_0x3c752e(0x144)]??{},_0x580904=[];for(const [_0x307c14,_0x53a2ad]of Object[_0x3c752e(0x175)](_0x49471d)){const _0x14a6c3=normalizeOperationEntry(_0x307c14,_0x53a2ad);if(_0x14a6c3)_0x580904[_0x3c752e(0x158)](_0x14a6c3);}const _0xd611b0=_0x738906[_0x3c752e(0x166)]??{},_0x25aa97=_0x738906[_0x3c752e(0x12e)]??{},_0x3bf4a8=_0xd611b0['dbId']!=null?{'id':_0xd611b0[_0x3c752e(0x162)],'name':_0xd611b0[_0x3c752e(0x153)]??null}:undefined;let _0x217863;return typeof _0x738906[_0x3c752e(0x16b)]===_0x3c752e(0x161)&&(_0x217863=parseJsonMaybe(_0x738906['extend'])),{'ok':!![],'data':{'id':_0x738906[_0x3c752e(0x172)]??_0x738906['id'],'name':_0x738906[_0x3c752e(0x169)],'code':_0x738906[_0x3c752e(0x168)]||_0x738906[_0x3c752e(0x16e)],'doVersion':_0x738906[_0x3c752e(0x164)],'description':_0x738906[_0x3c752e(0x12d)]||_0x25aa97[_0x3c752e(0x13d)]||undefined,'source':_0x738906['source']||_0x25aa97['sourceType'],'table':_0xd611b0['tableName']||_0x25aa97[_0x3c752e(0x171)],'datasetKey':_0xd611b0['datasetKey'],'pk':_0xd611b0['pkField'],'db':_0x3bf4a8,'dbtable':summarizeDbtable(_0xd611b0),'fields':_0x2a4df0,'operations':_0x580904,'indexes':Array[_0x3c752e(0x160)](_0x25aa97[_0x3c752e(0x138)])?_0x25aa97['indexes']:[],'relations':Array[_0x3c752e(0x160)](_0x738906[_0x3c752e(0x142)])?_0x738906[_0x3c752e(0x142)]['map'](_0x151b13=>({..._0x151b13[_0x3c752e(0x141)]!=null?{'relationId':_0x151b13['relationId']}:{},'fromDataset':_0x738906[_0x3c752e(0x169)],'fromCode':_0x738906[_0x3c752e(0x168)]||_0x738906[_0x3c752e(0x16e)],'fromTable':_0xd611b0[_0x3c752e(0x171)]||_0x25aa97[_0x3c752e(0x171)],'fromField':_0x151b13[_0x3c752e(0x150)],'toDataset':_0x151b13['toDatasetName'],'toCode':_0x151b13[_0x3c752e(0x13a)],'toTable':_0x151b13[_0x3c752e(0x149)],'toField':_0x151b13['toField'],'labelField':_0x151b13[_0x3c752e(0x14e)]||undefined,'cardinality':_0x151b13[_0x3c752e(0x156)]||undefined,'bizRelationType':_0x151b13['bizRelationType']==='main_sub'?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x738906['relatedPageInfoList']),...Array['isArray'](_0x738906[_0x3c752e(0x140)])?{'columnCodeListWithDeleted':_0x738906[_0x3c752e(0x140)]}:{},'formatRules':Array[_0x3c752e(0x160)](_0x738906[_0x3c752e(0x12b)])?_0x738906[_0x3c752e(0x12b)]:[],'validateRules':Array[_0x3c752e(0x160)](_0x738906[_0x3c752e(0x15f)])?_0x738906[_0x3c752e(0x15f)]:[],..._0x217863!==undefined?{'extend':_0x217863}:{},'stats':{'fieldCount':_0x2a4df0[_0x3c752e(0x13e)],'operationCount':_0x580904['length']}}};}};
|