@lovrabet/rabetbase-cli 2.5.13 → 2.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -17
- package/lib/api/api-doc.js +3 -1
- package/lib/api/api-group.js +3 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +8 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +2 -1
- package/lib/api/model-registry-file.js +11 -1
- package/lib/api/model-registry-scaffold.js +2 -1
- package/lib/api/model-source.js +3 -1
- package/lib/auth/auth-server-ui.js +2 -1
- package/lib/auth/auth-server.js +5 -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 +3 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +5 -1
- package/lib/commands/api/generate.js +4 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +2 -1
- package/lib/commands/api/pull.js +10 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +5 -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 +4 -1
- package/lib/commands/app-config/delete.js +2 -1
- package/lib/commands/app-config/get.js +2 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +2 -1
- package/lib/commands/app-config/set.js +3 -1
- package/lib/commands/app-config/shared.d.ts +9 -2
- package/lib/commands/app-config/shared.js +6 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +11 -1
- package/lib/commands/bff/delete.js +6 -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/logs.js +4 -1
- package/lib/commands/bff/pull.js +22 -1
- package/lib/commands/bff/push.js +16 -1
- package/lib/commands/bff/status.js +3 -1
- package/lib/commands/cli-skill/index.js +2 -1
- package/lib/commands/cli-update.js +7 -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 +4 -1
- package/lib/commands/common/app-selector.js +4 -1
- package/lib/commands/common/async-task.js +2 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +3 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +2 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +5 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +4 -1
- package/lib/commands/config/shared.js +2 -1
- package/lib/commands/dataset/batch-design.js +9 -1
- package/lib/commands/dataset/business-group-update.js +10 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +3 -1
- package/lib/commands/dataset/cross-relation-create.js +2 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +2 -1
- package/lib/commands/dataset/cross-relation-shared.js +10 -1
- package/lib/commands/dataset/cross-relation-update.js +2 -1
- package/lib/commands/dataset/delete.js +6 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +5 -1
- package/lib/commands/dataset/extend-update.js +7 -1
- package/lib/commands/dataset/field-restore.js +7 -1
- package/lib/commands/dataset/field-update.js +7 -1
- package/lib/commands/dataset/generate.js +19 -1
- package/lib/commands/dataset/index.js +3 -1
- package/lib/commands/dataset/list.js +2 -1
- package/lib/commands/dataset/operations.js +2 -1
- package/lib/commands/dataset/relation-audit.js +7 -1
- package/lib/commands/dataset/relation-create.js +3 -1
- package/lib/commands/dataset/relation-delete.js +3 -1
- package/lib/commands/dataset/relation-shared.js +21 -1
- package/lib/commands/dataset/relation-update.js +4 -1
- package/lib/commands/dataset/relations.js +7 -1
- package/lib/commands/dataset/rename.js +4 -1
- package/lib/commands/dataset/restore.js +7 -1
- package/lib/commands/dataset/user-deleted-field-list.js +3 -1
- package/lib/commands/db/analysis-batching.js +3 -1
- package/lib/commands/db/analyze-batch-plan.js +2 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +3 -1
- package/lib/commands/db/analyze-status.js +6 -1
- package/lib/commands/db/create.js +4 -1
- package/lib/commands/db/cross-db-analysis-shared.js +3 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +2 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +3 -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 +2 -1
- package/lib/commands/db/diff.js +3 -1
- package/lib/commands/db/index.js +2 -1
- package/lib/commands/db/list.js +2 -1
- package/lib/commands/db/shared.js +3 -1
- package/lib/commands/db/table-diff-shared.js +2 -1
- package/lib/commands/db/tables.js +2 -1
- package/lib/commands/db/test.js +2 -1
- package/lib/commands/db/update.js +4 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +3 -1
- package/lib/commands/deployment/sync-jobs.js +2 -1
- package/lib/commands/deployment/sync-status.js +2 -1
- package/lib/commands/doctor.js +12 -1
- package/lib/commands/file/index.js +3 -1
- package/lib/commands/flow/create.js +2 -1
- package/lib/commands/flow/detail.js +3 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +2 -1
- package/lib/commands/flow/page-list.js +2 -1
- package/lib/commands/flow/publish.js +2 -1
- package/lib/commands/flow/runtime-resources-shared.js +3 -1
- package/lib/commands/flow/runtime-role-list.js +2 -1
- package/lib/commands/flow/runtime-role-user-list.js +2 -1
- package/lib/commands/flow/runtime-user-search.js +2 -1
- package/lib/commands/flow/shared.js +6 -1
- package/lib/commands/flow/update.js +4 -1
- package/lib/commands/flow/validate.js +2 -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 +2 -1
- package/lib/commands/instant-api-policy/publish.js +5 -1
- package/lib/commands/instant-api-policy/pull.js +2 -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 +5 -1
- package/lib/commands/instant-api-policy/shared.js +5 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +2 -1
- package/lib/commands/issue/report.js +5 -1
- package/lib/commands/kb/create.js +5 -1
- package/lib/commands/kb/delete.js +5 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/import-api.d.ts +3 -0
- package/lib/commands/kb/import-api.js +1 -0
- package/lib/commands/kb/import-resume.d.ts +2 -0
- package/lib/commands/kb/import-resume.js +2 -0
- package/lib/commands/kb/import-shared.d.ts +69 -0
- package/lib/commands/kb/import-shared.js +9 -0
- package/lib/commands/kb/import-status.d.ts +2 -0
- package/lib/commands/kb/import-status.js +1 -0
- package/lib/commands/kb/import.d.ts +2 -0
- package/lib/commands/kb/import.js +3 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +3 -1
- package/lib/commands/kb/shared.js +9 -1
- package/lib/commands/kb/update.js +7 -1
- package/lib/commands/logs/index.js +2 -1
- package/lib/commands/menu/asset-update.js +8 -1
- package/lib/commands/menu/delete.js +15 -1
- package/lib/commands/menu/external-link-create.js +16 -1
- package/lib/commands/menu/external-link-update.js +10 -1
- package/lib/commands/menu/group-create.js +8 -1
- package/lib/commands/menu/group-update.js +6 -1
- package/lib/commands/menu/index.js +2 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +6 -1
- package/lib/commands/menu/regroup-start.js +11 -1
- package/lib/commands/menu/rename.js +9 -1
- package/lib/commands/menu/shared/compare-table.js +2 -1
- package/lib/commands/menu/shared/delete-plan.js +13 -1
- package/lib/commands/menu/shared/facts.js +5 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +4 -1
- package/lib/commands/menu/shared/local-pages.js +5 -1
- package/lib/commands/menu/shared/logic.js +3 -1
- package/lib/commands/menu/shared/mutations.js +9 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +4 -1
- package/lib/commands/menu/shared/subapp-assets.js +4 -1
- package/lib/commands/menu/shared/sync-core.js +7 -1
- package/lib/commands/menu/shared/types.js +1 -1
- package/lib/commands/menu/shared/update-core.js +8 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +7 -1
- package/lib/commands/menu/sync.js +7 -1
- package/lib/commands/menu/visibility-update.js +13 -1
- package/lib/commands/metric/contract.d.ts +8 -0
- package/lib/commands/metric/contract.js +5 -0
- package/lib/commands/metric/definition.d.ts +43 -0
- package/lib/commands/metric/definition.js +4 -0
- package/lib/commands/metric/delete.d.ts +2 -0
- package/lib/commands/metric/delete.js +3 -0
- package/lib/commands/metric/detail.d.ts +2 -0
- package/lib/commands/metric/detail.js +1 -0
- package/lib/commands/metric/example.d.ts +2 -0
- package/lib/commands/metric/example.js +1 -0
- package/lib/commands/metric/index.d.ts +2 -0
- package/lib/commands/metric/index.js +1 -0
- package/lib/commands/metric/list.d.ts +2 -0
- package/lib/commands/metric/list.js +2 -0
- package/lib/commands/metric/publication-diff.d.ts +8 -0
- package/lib/commands/metric/publication-diff.js +1 -0
- package/lib/commands/metric/publish.d.ts +2 -0
- package/lib/commands/metric/publish.js +4 -0
- package/lib/commands/metric/schema.d.ts +2 -0
- package/lib/commands/metric/schema.js +1 -0
- package/lib/commands/metric/shared.d.ts +14 -0
- package/lib/commands/metric/shared.js +2 -0
- package/lib/commands/metric/validate.d.ts +2 -0
- package/lib/commands/metric/validate.js +1 -0
- package/lib/commands/notification/config-create.js +4 -1
- package/lib/commands/notification/config-delete.js +4 -1
- package/lib/commands/notification/config-list.js +2 -1
- package/lib/commands/notification/config-update.js +4 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +18 -1
- package/lib/commands/ocr/index.js +4 -1
- package/lib/commands/page/create.js +6 -1
- package/lib/commands/page/custom/detail.js +2 -1
- package/lib/commands/page/custom/list.js +2 -1
- package/lib/commands/page/custom/publish.js +3 -1
- package/lib/commands/page/custom/shared.js +3 -1
- package/lib/commands/page/custom/syntax.js +2 -1
- package/lib/commands/page/custom/update.js +3 -1
- package/lib/commands/page/data-list-status.js +2 -1
- package/lib/commands/page/generate-start.js +5 -1
- package/lib/commands/page/generate-status.js +4 -1
- package/lib/commands/page/index.js +2 -1
- package/lib/commands/page/pull.js +6 -1
- package/lib/commands/page/push.js +11 -1
- package/lib/commands/page/relation-audit.js +15 -1
- package/lib/commands/page/restore.js +5 -1
- package/lib/commands/page/shared.js +16 -1
- package/lib/commands/page/sync.js +2 -1
- package/lib/commands/project/api-architecture-upgrade.js +11 -1
- package/lib/commands/project/create/enhanced-guided-create.js +2 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +13 -1
- package/lib/commands/project/create/materialize-project-template.js +12 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +5 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +2 -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 +4 -1
- package/lib/commands/project/upgrade.js +7 -1
- package/lib/commands/registry.js +10 -1
- package/lib/commands/role/delete.js +2 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +2 -1
- package/lib/commands/role/shared.js +8 -1
- package/lib/commands/role/update.js +3 -1
- package/lib/commands/role/user-add.js +2 -1
- package/lib/commands/role/user-remove.js +2 -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 +7 -1
- package/lib/commands/rule/shared.js +4 -1
- package/lib/commands/run/index.js +5 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +7 -1
- package/lib/commands/sql/delete.js +4 -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 +2 -1
- package/lib/commands/sql/pull.js +10 -1
- package/lib/commands/sql/push.js +9 -1
- package/lib/commands/sql/shared.js +5 -1
- package/lib/commands/sql/status.js +3 -1
- package/lib/commands/sql/validate.js +5 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +2 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +2 -1
- package/lib/commands/tenant/shared.js +2 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +2 -1
- package/lib/commands/user-account/feishu-bind.js +2 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +7 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +8 -1
- package/lib/config/project-domain-routing.js +3 -1
- package/lib/config/region-config.js +2 -1
- package/lib/config/schema.js +7 -1
- package/lib/constant/cdn.js +2 -1
- package/lib/constant/cli.js +8 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +4 -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 +7 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +7 -1
- package/lib/context.js +9 -1
- package/lib/core/alias-resolver.js +5 -1
- package/lib/core/api-client.d.ts +14 -7
- package/lib/core/api-client.js +69 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +6 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +9 -1
- package/lib/core/bff/lock.js +2 -1
- package/lib/core/bff/types.js +1 -1
- package/lib/core/bff/utils.js +3 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +2 -1
- package/lib/core/flow-config.js +49 -1
- package/lib/core/instant-api-policy/config.js +7 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.d.ts +11 -0
- package/lib/core/kb-management-client.js +4 -1
- package/lib/core/kb-search-client.js +3 -1
- package/lib/core/page/file-system.js +2 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +2 -1
- package/lib/core/page/lr-smart-jsx.js +4 -1
- package/lib/core/page/types.js +1 -1
- package/lib/core/sql-index-auditor.js +14 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +3 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +2 -1
- package/lib/core/sql-sync/types.js +1 -1
- package/lib/core/sql-sync/utils.js +2 -1
- package/lib/core/sql-validator.js +15 -1
- package/lib/errors.js +3 -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 +2 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +2 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +2 -1
- package/lib/framework/runner.js +9 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +2 -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 +3 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.js +2 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +4 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +2 -1
- package/lib/runtime/types.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +2 -1
- package/lib/services/dataset-design/commands.js +14 -1
- package/lib/services/dataset-design/contract.js +8 -1
- package/lib/skills/builtin-skill.js +8 -1
- package/lib/skills/install-updated-skill.d.ts +8 -0
- package/lib/skills/install-updated-skill.js +3 -0
- package/lib/skills/local-skills-installer.d.ts +2 -0
- package/lib/skills/local-skills-installer.js +1 -0
- package/lib/skills/main.js +2 -1
- package/lib/skills/npx-skills-add.d.ts +6 -6
- package/lib/skills/npx-skills-add.js +5 -1
- package/lib/skills/skill-presence.d.ts +1 -30
- package/lib/skills/skill-presence.js +2 -1
- package/lib/telemetry/cli-command-trace.js +2 -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/types/index.js +1 -1
- package/lib/utils/ai_config.js +3 -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 +5 -1
- package/lib/utils/cli-version-check.js +4 -1
- package/lib/utils/cli-version-policy.js +3 -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 +3 -1
- package/lib/utils/http-client.js +2 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +3 -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 +5 -1
- package/lib/utils/update-notice.js +3 -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 +10 -7
- package/skills/rabetbase/SKILL.md +11 -7
- package/skills/rabetbase/guides/backend-function.md +3 -1
- package/skills/rabetbase/guides/data-api-guidelines.md +1 -1
- package/skills/rabetbase/guides/frontend-development.md +1 -0
- package/skills/rabetbase/guides/metric-development.md +185 -0
- package/skills/rabetbase/references/rabetbase-app-config.md +4 -3
- package/skills/rabetbase/references/rabetbase-cli-skill-install.md +5 -5
- package/skills/rabetbase/references/rabetbase-dataset-design.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +16 -0
- package/skills/rabetbase/references/rabetbase-metric.md +119 -0
- package/skills/rabetbase/references/rabetbase-update.md +7 -5
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/references/workflow.md +1 -1
- package/skills/rabetbase-metrics-generation/SKILL.md +22 -0
- package/skills/rabetbase-metrics-generation/references/verification.md +19 -0
- package/skills/rabetbase-metrics-generation/references/workflow.md +41 -0
- package/skills/rabetbase-metrics-generation/templates/statistics-delivery.md +11 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/references/generation.md +1 -1
- package/skills/rabetbase.manifest.json +5 -3
- package/templates/metrics/definition.json +78 -0
- package/templates/metrics/metric-definition.schema.json +136 -0
- package/lib/postinstall.d.ts +0 -3
- package/lib/postinstall.js +0 -1
- package/scripts/postinstall.mjs +0 -24
- package/templates/README.md +0 -130
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import{DEFAULT_CONFIG_VALUES}from"../constant/defaults.js";import{isDaily,normalizeEnv}from"../constant/env.js";import{normalizeLegacyOutputFormat,riskLevelOrder}from"../framework/types.js";import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from"../constant/region.js";import{selectConfiguredRegion}from"../config/region-config.js";function stringConfigValue(value){return typeof value==="string"&&value.trim()?value.trim():undefined}function appProfiles(config){return config.apps&&typeof config.apps==="object"?config.apps:{}}function resolveDefaultAppName(config){const defaultApp=stringConfigValue(config.defaultApp);if(defaultApp)return defaultApp;const names=Object.keys(appProfiles(config));return names.length===1?names[0]:undefined}function resolveTopLevelAppCode(config){return stringConfigValue(config.appcode)||stringConfigValue(config.app)}function normalizeRiskCeiling(value){if(value===undefined||value===null)return undefined
|
|
2
|
+
;if(value==="read"||value==="write"||value==="high-risk-write"){return value}return"read"}function resolveRiskCeiling(...values){let resolved;for(const value of values){const candidate=normalizeRiskCeiling(value);if(candidate&&(!resolved||riskLevelOrder(candidate)<riskLevelOrder(resolved))){resolved=candidate}}return resolved??DEFAULT_CONFIG_VALUES.riskLevel}export function resolveAppConfig({raw:raw,flags:flags,layers:layers,readEnv:readEnv}){const projectConfig=layers?.projectConfig??{};const globalConfig=layers?.globalConfig??{};const hasProjectConfig=!!layers?.projectPath||Object.keys(projectConfig).length>0;const canUseGlobalAppConfig=!hasProjectConfig;const projectDefaultApp=hasProjectConfig?resolveDefaultAppName(projectConfig):undefined;const globalDefaultApp=canUseGlobalAppConfig?resolveDefaultAppName(globalConfig):undefined;const flagApp=stringConfigValue(flags.app);const envApp=readEnv("APP");const apps={};if(raw.apps&&typeof raw.apps==="object"){
|
|
3
|
+
for(const[name,profile]of Object.entries(raw.apps)){if(profile&&typeof profile==="object"&&profile.appcode){apps[name]=profile}}}const defaultApp=projectDefaultApp||globalDefaultApp||resolveDefaultAppName(raw);const isMultiApp=Object.keys(apps).length>0;const baseCurrentApp=flagApp||projectDefaultApp||envApp||globalDefaultApp||defaultApp||undefined;const explicitAppCode=stringConfigValue(flags.appcode);const matchedAppEntries=explicitAppCode?Object.entries(apps).filter(([,profile])=>profile?.appcode===explicitAppCode):[];const flagAppEntry=flagApp&&apps[flagApp]?.appcode===explicitAppCode?[flagApp,apps[flagApp]]:undefined;const matchedAppEntry=flagAppEntry??(matchedAppEntries.length===1?matchedAppEntries[0]:undefined);const matchedAppName=matchedAppEntry?.[0];const matchedAppProfile=matchedAppEntry?.[1];const currentApp=explicitAppCode?matchedAppName:baseCurrentApp;let activeProfile=currentApp&&apps[currentApp]?apps[currentApp]:undefined;if(explicitAppCode&&matchedAppProfile){
|
|
4
|
+
activeProfile=matchedAppProfile}const profileForResolution=explicitAppCode?matchedAppProfile??activeProfile:activeProfile;const envAppIsActive=!flagApp&&!projectDefaultApp&&envApp&¤tApp===envApp;const explicitAppName=flagApp||(envAppIsActive?envApp:undefined)||(explicitAppCode?matchedAppName:undefined);const selectedProfileAppCode=profileForResolution?.appcode;const projectTopLevelAppCode=hasProjectConfig?resolveTopLevelAppCode(projectConfig):undefined;const globalTopLevelAppCode=canUseGlobalAppConfig?resolveTopLevelAppCode(globalConfig):undefined;const selectedProfileBeforeEnv=flagApp||projectDefaultApp?selectedProfileAppCode:undefined;const selectedProfileAfterEnv=!flagApp&&!projectDefaultApp?selectedProfileAppCode:undefined;const appCode=explicitAppCode||selectedProfileBeforeEnv||projectTopLevelAppCode||selectedProfileAfterEnv||globalTopLevelAppCode||undefined;const projectTopLevelEnv=hasProjectConfig?stringConfigValue(projectConfig.env):undefined
|
|
5
|
+
;const globalTopLevelEnv=canUseGlobalAppConfig?stringConfigValue(globalConfig.env):undefined;const resolvedEnv=flags.env||profileForResolution?.env||projectTopLevelEnv||readEnv("ENV")||globalTopLevelEnv||raw.env||DEFAULT_CONFIG_VALUES.env;const locale=profileForResolution?.locale||raw.locale||DEFAULT_CONFIG_VALUES.locale;const cookie=readEnv("COOKIE")||profileForResolution?.cookie||raw.cookie||undefined;const accessKey=readEnv("ACCESS_KEY")||profileForResolution?.accessKey||raw.accessKey||undefined;const rawFormat=flags.format||readEnv("FORMAT")||profileForResolution?.format||raw.format;const format=normalizeLegacyOutputFormat(rawFormat);const rawPageSize=readEnv("PAGE_SIZE")||profileForResolution?.pageSize||raw.pageSize;const pageSize=rawPageSize?Number(rawPageSize)||undefined:undefined;const configuredCeilings=layers?[layers.globalConfig.riskLevel,layers.projectConfig.riskLevel]:[raw.riskLevel]
|
|
6
|
+
;const configuredRiskLevel=resolveRiskCeiling(...configuredCeilings,profileForResolution?.riskLevel);const riskLevel=resolveRiskCeiling(configuredRiskLevel,readEnv("RISK_LEVEL"));const verboseVal=readEnv("VERBOSE");const verbose=verboseVal==="1"||verboseVal==="true";const apiDir=profileForResolution?.apiDir||raw.apiDir||DEFAULT_CONFIG_VALUES.apiDir;const selectedRegion=selectConfiguredRegion({appRegion:profileForResolution?.region,projectRegion:hasProjectConfig?projectConfig.region:undefined,globalRegion:hasProjectConfig||canUseGlobalAppConfig?globalConfig.region:undefined,mergedRegion:raw.region});const region=normalizeLovrabetRegion(selectedRegion.value)??DEFAULT_LOVRABET_REGION;const configEnv=isDaily(normalizeEnv(String(resolvedEnv)))?"daily":"production";return{appCode:typeof appCode==="string"&&appCode.trim()?appCode.trim():undefined,region:region,regionConfiguredValue:selectedRegion.value,regionSource:selectedRegion.source,env:configEnv,locale:locale,cookie:cookie,
|
|
7
|
+
accessKey:accessKey,format:format,pageSize:pageSize,riskLevel:riskLevel,verbose:verbose,apiDir:apiDir,apps:apps,defaultApp:defaultApp,currentApp:isMultiApp?currentApp:undefined,explicitAppName:explicitAppName}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{getIsSessionValid}from"../auth/is-session-valid.js";import{CliErrors}from"../errors.js";export async function buildAuth(config){const{getCookie:getCookie}=await(import("../auth/get-cookie.js"));const cookie=config.cookie||getCookie();const isLoggedIn=cookie?await getIsSessionValid():false;return{cookie:cookie,isLoggedIn:isLoggedIn,async getOrLogin(){if(cookie&&isLoggedIn)return cookie;throw CliErrors.authRequired()}}}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from"node:fs";import{dirname,parse,resolve}from"node:path";import{homedir}from"node:os";import{CLI_BIN_NAME}from"../constant/cli.js";import{normalizeConfigForWrite}from"../config/schema.js";export const NEW_CONFIG_NAME=".rabetbase.json";export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map;export function resolveConfigPath(base){for(const name of CONFIG_NAMES){const p=resolve(base,name);if(existsSync(p))return p}return undefined}export function findProjectRootDirectory(startDir=process.cwd()){let dir=resolve(startDir);const{root:root}=parse(dir);const home=homedir();while(true){if(resolveConfigPath(dir)){if(dir===home)break;return dir}if(dir===root||dir===home)break;const parent=dirname(dir);if(parent===dir)break;dir=parent}return resolve(startDir)}export function getProjectConfigPath(){return resolveConfigPath(process.cwd())}export function getGlobalConfigPath(){
|
|
2
|
+
return resolveConfigPath(homedir())}export function isInProject(){return!!getProjectConfigPath()}export function inspectCliConfigJsonFile(filePath){if(!existsSync(filePath))return{status:"missing"};try{const raw=readFileSync(filePath,{encoding:"utf8"});if(!raw?.trim())return{status:"empty"};const data=JSON.parse(raw);return{status:"ok",data:data}}catch(err){return{status:"error",message:err instanceof Error?err.message:String(err)}}}function parseCliConfigJsonFile(filePath,onParseError,scopeLabel){const r=inspectCliConfigJsonFile(filePath);if(r.status==="missing"||r.status==="empty")return{};if(r.status==="ok")return r.data;if(onParseError==="warn"&&scopeLabel){console.error(`${CLI_BIN_NAME}: ${scopeLabel} config file ignored (invalid JSON or unreadable): ${filePath}\n ${r.message}`)}return{}}function normalizeLegacyConfigShape(input){if(!input||typeof input!=="object")return{config:{},migrated:false};const config={...input};const apps=config.apps&&typeof config.apps==="object"?{
|
|
3
|
+
...config.apps}:{};const appCount=Object.keys(apps).length;const legacyAppcode=config.appcode||config.app;let migrated=false;if(legacyAppcode&&appCount===0){const appName=typeof config.defaultApp==="string"&&config.defaultApp.trim()?config.defaultApp:String(legacyAppcode).trim();apps[appName]={appcode:String(legacyAppcode).trim(),...config.env!=null?{env:config.env}:{},...config.apiDir!=null?{apiDir:config.apiDir}:{},...config.cookie!=null?{cookie:config.cookie}:{},...config.accessKey!=null?{accessKey:config.accessKey}:{},...config.format!=null?{format:config.format}:{},...config.pageSize!=null?{pageSize:config.pageSize}:{},...config.riskLevel!=null?{riskLevel:config.riskLevel}:{},...config.locale!=null?{locale:config.locale}:{}};config.apps=apps;delete config.defaultApp;migrated=true}if("appcode"in config||"app"in config){delete config.appcode;delete config.app;migrated=true}return{config:config,migrated:migrated}}function writeNormalizedConfigIfNeeded(filePath,config){
|
|
4
|
+
const serialized=JSON.stringify(normalizeConfigForWrite(config),null,2)+"\n";if(normalizedWriteCache.get(filePath)===serialized)return;writeConfigFile(filePath,config);normalizedWriteCache.set(filePath,serialized)}function parseAndNormalizeConfig(filePath,mode,sourceLabel){const parsed=parseCliConfigJsonFile(filePath,mode,sourceLabel);const normalized=normalizeLegacyConfigShape(parsed);if(normalized.migrated){try{writeNormalizedConfigIfNeeded(filePath,normalized.config)}catch{}}return normalized.config}export function loadRawConfigLayers(projectRoot){let globalConfig={};let projectConfig={};const globalPath=resolveConfigPath(homedir());if(globalPath){globalConfig=parseAndNormalizeConfig(globalPath,"warn","Global")}const base=projectRoot??findProjectRootDirectory();const projectPath=resolveConfigPath(base);if(projectPath){projectConfig=parseAndNormalizeConfig(projectPath,"warn","Project")}return{globalPath:globalPath,projectPath:projectPath,globalConfig:globalConfig,
|
|
5
|
+
projectConfig:projectConfig}}const INHERIT_WHITELIST=["cookie","accessKey","locale","format","riskLevel","pageSize","region","routing","userDomain","apiDomain","runtimeDomain","skillDomain","kbDomain","kbServiceDomain","appDomain","localDomain","certificateDomain"];export function mergeRawConfigLayers(layers){const{globalConfig:globalConfig,projectConfig:projectConfig}=layers;const hasProject=!!layers.projectPath||Object.keys(projectConfig).length>0;if(!hasProject)return mergeGlobalOnly(globalConfig);return mergeProjectFirst(globalConfig,projectConfig)}function mergeGlobalOnly(globalConfig){const config={...globalConfig};delete config.inherit;const globalApps=globalConfig.apps&&typeof globalConfig.apps==="object"?globalConfig.apps:{};if(Object.keys(globalApps).length>0)config.apps=globalApps;if(globalConfig.defaultApp)config.defaultApp=globalConfig.defaultApp;return config}function mergeProjectFirst(globalConfig,projectConfig){const config={...projectConfig};delete config.inherit
|
|
6
|
+
;for(const field of INHERIT_WHITELIST){if(!(field in config)&&field in globalConfig){config[field]=globalConfig[field]}}const projectApps=projectConfig.apps&&typeof projectConfig.apps==="object"?projectConfig.apps:{};if(Object.keys(projectApps).length>0){config.apps=projectApps}else{delete config.apps}if("defaultApp"in projectConfig){config.defaultApp=projectConfig.defaultApp}else{delete config.defaultApp}return config}export function readRawConfigWithLayers(projectRoot){const layers=loadRawConfigLayers(projectRoot);return{config:mergeRawConfigLayers(layers),layers:layers}}export function readRawConfig(projectRoot){return mergeRawConfigLayers(loadRawConfigLayers(projectRoot))}export function readConfigFile(filePath){return parseAndNormalizeConfig(filePath,"silent")}export function writeConfigFile(filePath,data){const dir=dirname(filePath);if(!existsSync(dir)){mkdirSync(dir,{recursive:true})}const tempPath=`${filePath}.tmp`;try{const persisted=normalizeConfigForWrite(data)
|
|
7
|
+
;writeFileSync(tempPath,JSON.stringify(persisted,null,2)+"\n",{encoding:"utf8",mode:384});renameSync(tempPath,filePath)}catch(err){try{unlinkSync(tempPath)}catch{}throw err}}export function resolveWriteConfigPath(scope){const base=scope==="project"?process.cwd():homedir();const existing=resolveConfigPath(base);return existing??resolve(base,NEW_CONFIG_NAME)}
|
package/lib/context.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
const a286_0x3d138f=a286_0x4f3d;(function(_0x5ec47b,_0x5cf523){const _0x3a6456=a286_0x4f3d,_0x2acfa6=_0x5ec47b();while(!![]){try{const _0x4a787a=-parseInt(_0x3a6456(0x1b1))/0x1+parseInt(_0x3a6456(0x188))/0x2+-parseInt(_0x3a6456(0x1b6))/0x3*(-parseInt(_0x3a6456(0x1c6))/0x4)+-parseInt(_0x3a6456(0x1af))/0x5*(-parseInt(_0x3a6456(0x1cd))/0x6)+parseInt(_0x3a6456(0x1bf))/0x7+parseInt(_0x3a6456(0x1cc))/0x8*(parseInt(_0x3a6456(0x1a7))/0x9)+-parseInt(_0x3a6456(0x19d))/0xa;if(_0x4a787a===_0x5cf523)break;else _0x2acfa6['push'](_0x2acfa6['shift']());}catch(_0x30ddc7){_0x2acfa6['push'](_0x2acfa6['shift']());}}}(a286_0x17a1,0xd58de));import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';function a286_0x4f3d(_0x3b7d7f,_0x4db4e9){_0x3b7d7f=_0x3b7d7f-0x185;const _0x17a188=a286_0x17a1();let _0x4f3d62=_0x17a188[_0x3b7d7f];return _0x4f3d62;}import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x5933ae){return process.env[`RABETBASE_${_0x5933ae}`]||process.env[`LOVRABET_${_0x5933ae}`]||undefined;}function optionalString(_0x3e22f3){const _0x33b9f8=a286_0x4f3d;return typeof _0x3e22f3===_0x33b9f8(0x1c4)&&_0x3e22f3[_0x33b9f8(0x1b7)]()?_0x3e22f3[_0x33b9f8(0x1b7)]():undefined;}export function isRoutingRecoveryService(_0xcad1a7){const _0x5bcbc0=a286_0x4f3d;return _0xcad1a7==='config'||_0xcad1a7===_0x5bcbc0(0x1bc);}export async function createContext(_0x27b596){const _0x4f78ff=a286_0x4f3d,{config:_0x17eccf,layers:_0x34c8a1}=readRawConfigWithLayers(),_0x1835c0=buildConfig(_0x17eccf,_0x27b596,_0x34c8a1);await initGlobalEnvironment(_0x1835c0);const {getUserDomain:_0x1ab99d,getApiDomain:_0x4b398b}=await import('./constant/domain.js'),_0x3ae79b={'apiDomain':_0x4b398b(),'userDomain':_0x1ab99d()},_0x4dd7ee=await buildAuth(_0x1835c0);logger[_0x4f78ff(0x1c5)](process[_0x4f78ff(0x1a2)]());const _0x2b106e=(CLI_BIN_NAME+'\x20'+process[_0x4f78ff(0x1c9)][_0x4f78ff(0x191)](0x2)[_0x4f78ff(0x1aa)]('\x20'))[_0x4f78ff(0x1b7)]();logger['setRawCommand'](_0x2b106e);const {isNonInteractive:_0x2690cb}=await import(_0x4f78ff(0x1cf)),_0x96b060=_0x2690cb(_0x27b596);return{'config':_0x1835c0,'auth':_0x4dd7ee,'logger':logger,'env':_0x3ae79b,'nonInteractive':_0x96b060};}export function buildConfigFromFlags(_0x2d255a){const {config:_0x1d9f88,layers:_0x30164a}=readRawConfigWithLayers();return buildConfig(_0x1d9f88,_0x2d255a,_0x30164a);}export async function initGlobalEnvironment(_0x4e485d){const _0x434038=a286_0x4f3d,_0x4f1bb5=_0x4e485d[_0x434038(0x18a)]===_0x434038(0x1be)&&_0x4e485d[_0x434038(0x1ba)]?_0x434038(0x197)+_0x4e485d['currentApp']+'\x22':_0x4e485d['regionSource']===_0x434038(0x196)?_0x434038(0x1b0):_0x4e485d[_0x434038(0x18a)]===_0x434038(0x18d)?_0x434038(0x185):_0x434038(0x19a);await initConfiguredEnvironment({'raw':_0x4e485d['raw'],'configuredRegion':_0x4e485d[_0x434038(0x1a0)]??_0x4e485d[_0x434038(0x19b)]?.[_0x434038(0x187)]??_0x4e485d[_0x434038(0x187)],'regionLocation':_0x4f1bb5,'targetEnv':_0x4e485d[_0x434038(0x1c8)]});}async function initConfiguredEnvironment(_0x10851d){const _0x749d07=a286_0x4f3d,_0x705a6e=resolveConfiguredRegion(_0x10851d[_0x749d07(0x1d0)],_0x10851d[_0x749d07(0x194)]),_0x124c76=resolveEnterpriseRoutingManifest(_0x10851d['raw']?.[_0x749d07(0x1ce)]),_0x8d2942={'region':_0x705a6e,'apiDomain':_0x124c76?_0x124c76['domains'][_0x749d07(0x1a3)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1a3)]),'userDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x19c)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x19c)]),'runtimeDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x190)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x190)]),'skillDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x1a9)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1a9)])||optionalString(_0x10851d['raw']?.[_0x749d07(0x1a4)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.['agentDomain'])||optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x198)]),'kbDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)]['kbDomain']:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1c3)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1c1)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.['platformDomain']),'kbServiceDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x186)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x186)]),'appDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x18b)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x18b)]),'localDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)]['localDomain']:optionalString(_0x10851d[_0x749d07(0x19b)]?.['localDomain']),'certificateDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x1b2)]:optionalString(_0x10851d['raw']?.[_0x749d07(0x1b2)]),'cdn':_0x124c76?.['cdn'],'allowOfficialKbServiceDefault':!(_0x124c76!==undefined||[_0x749d07(0x1a3),'userDomain',_0x749d07(0x190),_0x749d07(0x1a9),_0x749d07(0x1a4),_0x749d07(0x1c3),'kbServiceDomain',_0x749d07(0x1c1),_0x749d07(0x198),_0x749d07(0x18b),_0x749d07(0x1a6),_0x749d07(0x1b2)]['some'](_0x30c828=>Object[_0x749d07(0x19e)][_0x749d07(0x19f)][_0x749d07(0x1ae)](_0x10851d[_0x749d07(0x19b)]??{},_0x30c828)))},{initEnv:_0x428208}=await import(_0x749d07(0x1b4)),{initDomains:_0x1faaa3}=await import(_0x749d07(0x18e));_0x428208(_0x10851d['targetEnv']),_0x1faaa3(_0x8d2942);}export async function initMultiAppEnvironment(_0x53b4da){const _0x52c7ab=a286_0x4f3d;await initConfiguredEnvironment({'raw':_0x53b4da[_0x52c7ab(0x18f)],'configuredRegion':_0x53b4da[_0x52c7ab(0x187)],'regionLocation':'app\x20profile\x20\x22'+_0x53b4da[_0x52c7ab(0x1d1)]+'\x22','targetEnv':_0x53b4da[_0x52c7ab(0x1c8)]===_0x52c7ab(0x18c)?_0x52c7ab(0x18c):_0x52c7ab(0x1a8)});}function a286_0x17a1(){const _0x5b5f49=['apps','kbDomain','string','setLogPath','54916AcUZoQ','keys','env','argv','source','appcode','24oAjfcH','30oLKgqJ','routing','./utils/is-non-interactive.js','configuredRegion','name','global\x20Rabetbase\x20configuration','kbServiceDomain','region','514818tguXfq','cookie','regionSource','appDomain','daily','global','./constant/domain.js','routingConfig','runtimeDomain','slice','globalConfig','defaultApp','regionLocation','entries','project','app\x20profile\x20\x22','platformDomain','map','Rabetbase\x20configuration','raw','userDomain','21703510qtgWzJ','prototype','hasOwnProperty','regionConfiguredValue','length','cwd','apiDomain','skillHubDomain','domains','localDomain','2923173JfCgCh','production','skillDomain','join','filter','object','apiDir','call','1714120Frmwwu','project\x20Rabetbase\x20configuration','766082EExFPB','certificateDomain','filePath','./constant/env.js','apiGroup','141RPJQLQ','trim','https://g.lovrabet.com/dist/lovrabet-skill','replace','currentApp','projectConfig','doctor','template_base_url','app','1539776farGdF','merged','agentDomain'];a286_0x17a1=function(){return _0x5b5f49;};return a286_0x17a1();}export function getConfigAppCode(_0x483a78){const _0x4e38d8=a286_0x4f3d,_0x1e924e=readRawConfig(_0x483a78);if(_0x1e924e['apps']&&typeof _0x1e924e['apps']===_0x4e38d8(0x1ac)){const _0x2e9982=_0x1e924e[_0x4e38d8(0x193)];if(_0x2e9982)return _0x1e924e[_0x4e38d8(0x1c2)][_0x2e9982]?.[_0x4e38d8(0x1cb)]?String(_0x1e924e[_0x4e38d8(0x1c2)][_0x2e9982][_0x4e38d8(0x1cb)])[_0x4e38d8(0x1b7)]():undefined;const _0x89a748=Object['values'](_0x1e924e[_0x4e38d8(0x1c2)]);if(_0x89a748['length']===0x1&&_0x89a748[0x0]?.[_0x4e38d8(0x1cb)])return String(_0x89a748[0x0]['appcode'])[_0x4e38d8(0x1b7)]();}const _0x1186f0=_0x1e924e[_0x4e38d8(0x1cb)]||_0x1e924e[_0x4e38d8(0x1be)];if(typeof _0x1186f0!==_0x4e38d8(0x1c4)||_0x1186f0[_0x4e38d8(0x1b7)]()==='')return undefined;return _0x1186f0[_0x4e38d8(0x1b7)]();}const CONNECTION_ROUTING_KEYS=[a286_0x3d138f(0x1ce),a286_0x3d138f(0x1a3),'userDomain',a286_0x3d138f(0x190),a286_0x3d138f(0x1a9),a286_0x3d138f(0x1a4),a286_0x3d138f(0x1c3),a286_0x3d138f(0x186),a286_0x3d138f(0x1c1),'platformDomain',a286_0x3d138f(0x18b),a286_0x3d138f(0x1a6),a286_0x3d138f(0x1b2)];function withAppProfileRouting(_0x2065bd,_0x4ade16){const _0x312ec2=a286_0x3d138f;if(!_0x4ade16||_0x4ade16[_0x312ec2(0x186)]===undefined)return _0x2065bd;return{..._0x2065bd,'kbServiceDomain':_0x4ade16[_0x312ec2(0x186)]};}function pickConnectionRoutingConfig(_0x3a2e4b,_0x23b9fa){const _0x3d3d53={'region':_0x23b9fa};for(const _0x2dacb9 of CONNECTION_ROUTING_KEYS){if(_0x3a2e4b[_0x2dacb9]!==undefined)_0x3d3d53[_0x2dacb9]=_0x3a2e4b[_0x2dacb9];}return _0x3d3d53;}export function getMultiAppConfigs(_0x1fc28c='project',_0x5f4482){const _0x289f9d=a286_0x3d138f,_0x1bd6e7=loadRawConfigLayers(_0x5f4482);let _0x49b1ca,_0x5cdc10;const _0x4cf499=mergeRawConfigLayers(_0x1bd6e7),_0x51c658=_0x1bd6e7[_0x289f9d(0x192)][_0x289f9d(0x1c2)]&&typeof _0x1bd6e7['globalConfig'][_0x289f9d(0x1c2)]===_0x289f9d(0x1ac)?_0x1bd6e7[_0x289f9d(0x192)][_0x289f9d(0x1c2)]:{},_0x43e6a4=_0x1bd6e7['projectConfig'][_0x289f9d(0x1c2)]&&typeof _0x1bd6e7['projectConfig'][_0x289f9d(0x1c2)]===_0x289f9d(0x1ac)?_0x1bd6e7[_0x289f9d(0x1bb)]['apps']:{};_0x1fc28c===_0x289f9d(0x1c0)?(_0x49b1ca={..._0x51c658,..._0x43e6a4},_0x5cdc10=_0x4cf499[_0x289f9d(0x193)]):(_0x49b1ca=_0x1bd6e7[_0x289f9d(0x1bb)][_0x289f9d(0x1c2)],_0x5cdc10=_0x1bd6e7['projectConfig'][_0x289f9d(0x193)]);!_0x5cdc10&&_0x49b1ca&&typeof _0x49b1ca===_0x289f9d(0x1ac)&&Object[_0x289f9d(0x1c7)](_0x49b1ca)['length']===0x1&&(_0x5cdc10=Object[_0x289f9d(0x1c7)](_0x49b1ca)[0x0]);if(!_0x49b1ca||typeof _0x49b1ca!==_0x289f9d(0x1ac)||Object['keys'](_0x49b1ca)[_0x289f9d(0x1a1)]===0x0)return null;return Object[_0x289f9d(0x195)](_0x49b1ca)[_0x289f9d(0x199)](([_0x8060eb,_0x26bb97])=>{const _0x5cffb8=_0x289f9d,_0x4fdc4d=_0x1fc28c===_0x5cffb8(0x196)||Object[_0x5cffb8(0x19e)][_0x5cffb8(0x19f)][_0x5cffb8(0x1ae)](_0x43e6a4,_0x8060eb),_0x82279d=withAppProfileRouting(_0x4fdc4d?_0x4cf499:_0x1bd6e7[_0x5cffb8(0x192)],_0x26bb97),_0x4b4cf9=resolveEffectiveRegion({'appRegion':_0x26bb97?.[_0x5cffb8(0x187)],'projectRegion':_0x4fdc4d?_0x1bd6e7['projectConfig'][_0x5cffb8(0x187)]:undefined,'globalRegion':_0x1bd6e7[_0x5cffb8(0x192)]['region'],'mergedRegion':_0x82279d['region'],'appName':_0x8060eb});return{'name':_0x8060eb,'appcode':_0x26bb97?.[_0x5cffb8(0x1cb)]||'','apiGroup':optionalString(_0x26bb97?.[_0x5cffb8(0x1b5)]),'isDefault':_0x8060eb===_0x5cdc10,'region':_0x4b4cf9[_0x5cffb8(0x187)],'regionSource':_0x4b4cf9[_0x5cffb8(0x1ca)],'env':_0x26bb97?.[_0x5cffb8(0x1c8)],'apiDir':optionalString(_0x26bb97?.[_0x5cffb8(0x1ad)])||optionalString(_0x82279d[_0x5cffb8(0x1ad)]),'cookie':_0x26bb97?.[_0x5cffb8(0x189)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x82279d,_0x4b4cf9[_0x5cffb8(0x187)])};})[_0x289f9d(0x1ab)](_0x506a74=>_0x506a74[_0x289f9d(0x1cb)]);}export function getTemplateBaseUrl(_0x450109){const _0x3d049f=a286_0x3d138f,_0x23bf0e=readRawConfig(_0x450109);if(_0x23bf0e[_0x3d049f(0x1bd)]&&typeof _0x23bf0e['template_base_url']===_0x3d049f(0x1c4))return _0x23bf0e[_0x3d049f(0x1bd)][_0x3d049f(0x1b9)](/\/$/,'');return _0x3d049f(0x1b8);}function buildConfig(_0x1087d6,_0x896d20,_0x38edb2){const _0x572164=a286_0x3d138f,_0x4223e5=resolveAppConfig({'raw':_0x1087d6,'flags':_0x896d20,'layers':_0x38edb2,'readEnv':env}),_0x164106=_0x4223e5[_0x572164(0x1ba)]?_0x4223e5[_0x572164(0x1c2)][_0x4223e5['currentApp']]:undefined;return{..._0x4223e5,'raw':withAppProfileRouting(_0x1087d6,_0x164106)};}export function resolveApiFilePath(_0xf8da8,_0x322c4d,_0x342429){const _0x378439=a286_0x3d138f;return resolveApiModelSource(_0xf8da8,_0x322c4d,_0x342429)[_0x378439(0x1b3)];}
|
|
1
|
+
import{CLI_BIN_NAME}from"./constant/cli.js";import{buildAuth}from"./context/auth-resolver.js";import{resolveAppConfig}from"./context/app-resolver.js";import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from"./context/config-loader.js";import{resolveConfiguredRegion,resolveEffectiveRegion}from"./config/region-config.js";import{resolveEnterpriseRoutingManifest}from"./config/domain-config.js";import{logger}from"./utils/logger.js";import{resolveApiModelSource}from"./api/model-source.js"
|
|
2
|
+
;export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(name){return process.env[`RABETBASE_${name}`]||process.env[`LOVRABET_${name}`]||undefined}function optionalString(value){return typeof value==="string"&&value.trim()?value.trim():undefined}export function isRoutingRecoveryService(service){return service==="config"||service==="doctor"}export async function createContext(flags){const{config:rawConfig,layers:layers}=readRawConfigWithLayers();const config=buildConfig(rawConfig,flags,layers);await initGlobalEnvironment(config);const{getUserDomain:getUserDomain,getApiDomain:getApiDomain}=await(import("./constant/domain.js"));const envInfo={apiDomain:getApiDomain(),userDomain:getUserDomain()};const auth=await buildAuth(config)
|
|
3
|
+
;logger.setLogPath(process.cwd());const rawCommand=`${CLI_BIN_NAME} ${process.argv.slice(2).join(" ")}`.trim();logger.setRawCommand(rawCommand);const{isNonInteractive:isNonInteractive}=await(import("./utils/is-non-interactive.js"));const nonInteractive=isNonInteractive(flags);return{config:config,auth:auth,logger:logger,env:envInfo,nonInteractive:nonInteractive}}export function buildConfigFromFlags(flags){const{config:config,layers:layers}=readRawConfigWithLayers();return buildConfig(config,flags,layers)}export async function initGlobalEnvironment(config){const regionLocation=config.regionSource==="app"&&config.currentApp?`app profile "${config.currentApp}"`:config.regionSource==="project"?"project Rabetbase configuration":config.regionSource==="global"?"global Rabetbase configuration":"Rabetbase configuration";await initConfiguredEnvironment({raw:config.raw,configuredRegion:config.regionConfiguredValue??config.raw?.region??config.region,regionLocation:regionLocation,
|
|
4
|
+
targetEnv:config.env})}async function initConfiguredEnvironment(options){const region=resolveConfiguredRegion(options.configuredRegion,options.regionLocation);const enterprise=resolveEnterpriseRoutingManifest(options.raw?.routing);const domains={region:region,apiDomain:enterprise?enterprise.domains.apiDomain:optionalString(options.raw?.apiDomain),userDomain:enterprise?enterprise.domains.userDomain:optionalString(options.raw?.userDomain),runtimeDomain:enterprise?enterprise.domains.runtimeDomain:optionalString(options.raw?.runtimeDomain),skillDomain:enterprise?enterprise.domains.skillDomain:optionalString(options.raw?.skillDomain)||optionalString(options.raw?.skillHubDomain)||optionalString(options.raw?.agentDomain)||optionalString(options.raw?.platformDomain),kbDomain:enterprise?enterprise.domains.kbDomain:optionalString(options.raw?.kbDomain)||optionalString(options.raw?.agentDomain)||optionalString(options.raw?.platformDomain),
|
|
5
|
+
kbServiceDomain:enterprise?enterprise.domains.kbServiceDomain:optionalString(options.raw?.kbServiceDomain),appDomain:enterprise?enterprise.domains.appDomain:optionalString(options.raw?.appDomain),localDomain:enterprise?enterprise.domains.localDomain:optionalString(options.raw?.localDomain),certificateDomain:enterprise?enterprise.domains.certificateDomain:optionalString(options.raw?.certificateDomain),cdn:enterprise?.cdn,allowOfficialKbServiceDefault:!(enterprise!==undefined||["apiDomain","userDomain","runtimeDomain","skillDomain","skillHubDomain","kbDomain","kbServiceDomain","agentDomain","platformDomain","appDomain","localDomain","certificateDomain"].some(key=>Object.prototype.hasOwnProperty.call(options.raw??{},key)))};const{initEnv:initEnv}=await(import("./constant/env.js"));const{initDomains:initDomains}=await(import("./constant/domain.js"));initEnv(options.targetEnv);initDomains(domains)}export async function initMultiAppEnvironment(app){await initConfiguredEnvironment({
|
|
6
|
+
raw:app.routingConfig,configuredRegion:app.region,regionLocation:`app profile "${app.name}"`,targetEnv:app.env==="daily"?"daily":"production"})}export function getConfigAppCode(projectRoot){const config=readRawConfig(projectRoot);if(config.apps&&typeof config.apps==="object"){const defaultApp=config.defaultApp;if(defaultApp){return config.apps[defaultApp]?.appcode?String(config.apps[defaultApp].appcode).trim():undefined}const entries=Object.values(config.apps);if(entries.length===1&&entries[0]?.appcode){return String(entries[0].appcode).trim()}}const appCode=config.appcode||config.app;if(typeof appCode!=="string"||appCode.trim()===""){return undefined}return appCode.trim()}const CONNECTION_ROUTING_KEYS=["routing","apiDomain","userDomain","runtimeDomain","skillDomain","skillHubDomain","kbDomain","kbServiceDomain","agentDomain","platformDomain","appDomain","localDomain","certificateDomain"];function withAppProfileRouting(config,profile){
|
|
7
|
+
if(!profile||profile.kbServiceDomain===undefined)return config;return{...config,kbServiceDomain:profile.kbServiceDomain}}function pickConnectionRoutingConfig(config,region){const routingConfig={region:region};for(const key of CONNECTION_ROUTING_KEYS){if(config[key]!==undefined)routingConfig[key]=config[key]}return routingConfig}export function getMultiAppConfigs(scope="project",projectRoot){const layers=loadRawConfigLayers(projectRoot);let apps;let defaultApp;const mergedConfig=mergeRawConfigLayers(layers);const globalApps=layers.globalConfig.apps&&typeof layers.globalConfig.apps==="object"?layers.globalConfig.apps:{};const projectApps=layers.projectConfig.apps&&typeof layers.projectConfig.apps==="object"?layers.projectConfig.apps:{};if(scope==="merged"){apps={...globalApps,...projectApps};defaultApp=mergedConfig.defaultApp}else{apps=layers.projectConfig.apps;defaultApp=layers.projectConfig.defaultApp}if(!defaultApp&&apps&&typeof apps==="object"&&Object.keys(apps).length===1){
|
|
8
|
+
defaultApp=Object.keys(apps)[0]}if(!apps||typeof apps!=="object"||Object.keys(apps).length===0){return null}return Object.entries(apps).map(([name,profile])=>{const isProjectApp=scope==="project"||Object.prototype.hasOwnProperty.call(projectApps,name);const routingConfig=withAppProfileRouting(isProjectApp?mergedConfig:layers.globalConfig,profile);const resolvedRegion=resolveEffectiveRegion({appRegion:profile?.region,projectRegion:isProjectApp?layers.projectConfig.region:undefined,globalRegion:layers.globalConfig.region,mergedRegion:routingConfig.region,appName:name});return{name:name,appcode:profile?.appcode||"",apiGroup:optionalString(profile?.apiGroup),isDefault:name===defaultApp,region:resolvedRegion.region,regionSource:resolvedRegion.source,env:profile?.env,apiDir:optionalString(profile?.apiDir)||optionalString(routingConfig.apiDir),cookie:profile?.cookie||undefined,routingConfig:pickConnectionRoutingConfig(routingConfig,resolvedRegion.region)}}).filter(app=>app.appcode)}
|
|
9
|
+
export function getTemplateBaseUrl(projectRoot){const config=readRawConfig(projectRoot);if(config.template_base_url&&typeof config.template_base_url==="string"){return config.template_base_url.replace(/\/$/,"")}return"https://g.lovrabet.com/dist/lovrabet-skill"}function buildConfig(raw,flags,layers){const resolved=resolveAppConfig({raw:raw,flags:flags,layers:layers,readEnv:env});const profile=resolved.currentApp?resolved.apps[resolved.currentApp]:undefined;return{...resolved,raw:withAppProfileRouting(raw,profile)}}export function resolveApiFilePath(apiDir,appCode,selectedAppName){return resolveApiModelSource(apiDir,appCode,selectedAppName).filePath}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import{existsSync,readFileSync,realpathSync,statSync}from"node:fs";import{dirname,extname,isAbsolute,relative,resolve}from"node:path";import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from"../api/model-registry-file.js";import{parseLegacyApiModels}from"../api/legacy-api-file.js";import{findProjectRootDirectory}from"../context/config-loader.js";const cache=new Map;const MAX_LOCAL_REEXPORT_DEPTH=8;const SOURCE_FILE_EXTENSIONS=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];const LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g;const SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={".js":[".ts",".tsx"],".jsx":[".tsx"],".mjs":[".mts"],".cjs":[".cts"]};function parseApiFile(content){return parseLegacyApiModels(content).flatMap(model=>model.alias?[{alias:model.alias,datasetCode:model.datasetCode,tableName:model.tableName,name:model.name}]:[])}function isWithinRoot(root,candidate){const path=relative(root,candidate)
|
|
2
|
+
;return path===""||!path.startsWith("..")&&!isAbsolute(path)}function resolveExistingFile(path){if(!existsSync(path))return undefined;try{return statSync(path).isFile()?realpathSync(path):undefined}catch{return undefined}}function reexportCandidatePaths(requestedPath){const requestedExtension=extname(requestedPath);if(!requestedExtension){return[...SOURCE_FILE_EXTENSIONS.map(extension=>`${requestedPath}${extension}`),...SOURCE_FILE_EXTENSIONS.map(extension=>resolve(requestedPath,`index${extension}`))]}const sourceExtensions=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[requestedExtension];if(!sourceExtensions)return[requestedPath];const sourcePath=requestedPath.slice(0,-requestedExtension.length);return[...sourceExtensions.map(extension=>`${sourcePath}${extension}`),requestedPath]}function resolveLocalReexport(importingFile,specifier,projectRoot){if(!specifier.startsWith("./")&&!specifier.startsWith("../"))return undefined;const requestedPath=resolve(dirname(importingFile),specifier)
|
|
3
|
+
;if(!isWithinRoot(projectRoot,requestedPath))return undefined;for(const candidate of reexportCandidatePaths(requestedPath)){const resolvedFile=resolveExistingFile(candidate);if(resolvedFile&&isWithinRoot(projectRoot,resolvedFile))return resolvedFile}return undefined}function parseApiFileTree(apiFilePath,projectRoot,minimumDepthByFile,depth){const resolvedFile=resolveExistingFile(apiFilePath);if(!resolvedFile)return[];const previousDepth=minimumDepthByFile.get(resolvedFile);if(previousDepth!==undefined&&previousDepth<=depth)return[];minimumDepthByFile.set(resolvedFile,depth);const content=readFileSync(resolvedFile,"utf-8");const entries=parseApiFile(content);if(depth>=MAX_LOCAL_REEXPORT_DEPTH)return entries;const localReexportRe=new RegExp(LOCAL_REEXPORT_RE.source,LOCAL_REEXPORT_RE.flags);let match;while((match=localReexportRe.exec(content))!==null){const importedFile=resolveLocalReexport(resolvedFile,match[1],projectRoot);if(importedFile){
|
|
4
|
+
entries.push(...parseApiFileTree(importedFile,projectRoot,minimumDepthByFile,depth+1))}}return entries}function aliasProjectRoot(apiFilePath){const root=findProjectRootDirectory(dirname(apiFilePath));try{return realpathSync(root)}catch{return root}}function uniqueAliasEntries(entries){const seen=new Set;return entries.filter(entry=>{const key=JSON.stringify(entry);if(seen.has(key))return false;seen.add(key);return true})}export function loadAliasMap(apiDir,appCode,resolvedFilePath,profileName){const apiFilePath=resolve(resolvedFilePath??resolve(process.cwd(),apiDir,"api.ts"));const cacheKey=profileName?`${apiFilePath}#${profileName}`:apiFilePath;if(cache.has(cacheKey))return cache.get(cacheKey);if(!existsSync(apiFilePath)){cache.set(cacheKey,[]);return[]}try{if(apiFilePath.endsWith(MODEL_REGISTRY_FILE_NAME)){const registry=readModelRegistry(apiFilePath);const effectiveProfile=profileName??registry?.defaultProfile
|
|
5
|
+
;const models=effectiveProfile&®istry?getProfileModels(registry,effectiveProfile):[];const entries=uniqueAliasEntries(models.flatMap(model=>model.alias?[{alias:model.alias,datasetCode:model.datasetCode,tableName:model.tableName,name:model.name}]:[]));cache.set(cacheKey,entries);return entries}const entries=uniqueAliasEntries(parseApiFileTree(apiFilePath,aliasProjectRoot(apiFilePath),new Map,0));cache.set(cacheKey,entries);return entries}catch{cache.set(cacheKey,[]);return[]}}export function resolveAlias(apiDir,alias,appCode,resolvedFilePath,profileName){if(!alias)return undefined;const entries=loadAliasMap(apiDir,appCode,resolvedFilePath,profileName);const matchingCodes=new Set(entries.filter(entry=>entry.alias===alias).map(entry=>entry.datasetCode));return matchingCodes.size===1?[...matchingCodes][0]:undefined}export function listAliases(apiDir,appCode,resolvedFilePath,profileName){return loadAliasMap(apiDir,appCode,resolvedFilePath,profileName)}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -1268,35 +1268,42 @@ export declare function updateNotificationChannelConfig(input: NotificationChann
|
|
|
1268
1268
|
}): Promise<void>;
|
|
1269
1269
|
export declare function deleteNotificationChannelConfig(id: number, appCode: string): Promise<void>;
|
|
1270
1270
|
export interface AppConfigItem {
|
|
1271
|
-
id?: number;
|
|
1271
|
+
id?: number | string;
|
|
1272
1272
|
appCode: string;
|
|
1273
1273
|
key: string;
|
|
1274
1274
|
value?: string | null;
|
|
1275
1275
|
tags?: string | null;
|
|
1276
|
+
description?: string | null;
|
|
1276
1277
|
encrypted?: number | null;
|
|
1277
|
-
operatorId?: number | null;
|
|
1278
|
-
|
|
1279
|
-
|
|
1278
|
+
operatorId?: number | string | null;
|
|
1279
|
+
operatorUsername?: string | null;
|
|
1280
|
+
operatorNickname?: string | null;
|
|
1281
|
+
gmtCreate?: number | null;
|
|
1282
|
+
gmtModified?: number | null;
|
|
1280
1283
|
}
|
|
1281
1284
|
export interface AppConfigWriteInput {
|
|
1282
|
-
id?: number;
|
|
1285
|
+
id?: number | string;
|
|
1283
1286
|
appCode: string;
|
|
1284
1287
|
key: string;
|
|
1285
1288
|
value: string;
|
|
1286
1289
|
tags?: string;
|
|
1290
|
+
description?: string;
|
|
1287
1291
|
}
|
|
1288
1292
|
export declare function listAppConfigs(appCode: string, filters?: {
|
|
1289
1293
|
key?: string;
|
|
1290
1294
|
tags?: string;
|
|
1295
|
+
keyword?: string;
|
|
1291
1296
|
}): Promise<AppConfigItem[]>;
|
|
1292
1297
|
export declare function getAppConfigByKey(appCode: string, key: string): Promise<AppConfigItem | null>;
|
|
1298
|
+
/** Read an assembled metric through app-config with development Cookie. */
|
|
1299
|
+
export declare function getMetricDetail(appCode: string, name: string): Promise<unknown>;
|
|
1293
1300
|
export declare function createAppConfig(input: AppConfigWriteInput): Promise<unknown>;
|
|
1294
1301
|
export declare function updateAppConfig(input: AppConfigWriteInput & {
|
|
1295
|
-
id: number;
|
|
1302
|
+
id: number | string;
|
|
1296
1303
|
}): Promise<void>;
|
|
1297
1304
|
export declare function deleteAppConfig(params: {
|
|
1298
1305
|
appCode: string;
|
|
1299
|
-
id: number;
|
|
1306
|
+
id: number | string;
|
|
1300
1307
|
}): Promise<void>;
|
|
1301
1308
|
export declare function listDbLinks(appCode: string, options?: {
|
|
1302
1309
|
currentPage?: number;
|