@redocly/realm 0.134.0-next.2 → 0.134.0-next.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/CHANGELOG.md +31 -0
- package/dist/cli/eject/ejectComponent.d.ts +1 -1
- package/dist/cli/eject/ejectTheme.d.ts +1 -1
- package/dist/cli/eject/themeOperations.d.ts +2 -2
- package/dist/cli/telemetry/index.d.ts +1 -1
- package/dist/client/ErrorBoundary.d.ts +1 -1
- package/dist/client/TestProvider.d.ts +1 -1
- package/dist/client/app/CircularProgress.d.ts +1 -1
- package/dist/client/app/ConditionalLink.d.ts +2 -2
- package/dist/client/app/Link.js +1 -1
- package/dist/client/app/Sidebar/useSidebarItems.d.ts +2 -2
- package/dist/client/app/hooks/catalog/useCatalogFilter.d.ts +12 -12
- package/dist/client/app/hooks/catalog/useCatalogSort.d.ts +2 -2
- package/dist/client/app/hooks/catalog/useFetchCatalogEntities.d.ts +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntitiesRelations.d.ts +2 -2
- package/dist/client/app/hooks/catalog/useFetchCatalogEntityRevisions.d.ts +1 -1
- package/dist/client/app/hooks/catalog/useSearchTracker.d.ts +1 -1
- package/dist/client/app/hooks/products/useProducts.d.ts +3 -3
- package/dist/client/app/l10n/index.d.ts +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/get-operation/get-operation.d.ts +1 -1
- package/dist/client/app/markdoc/custom-components/styled.elements.d.ts +2 -4
- package/dist/client/app/pages/DevLogin/DevLoginForm.d.ts +1 -1
- package/dist/client/app/pages/DevLogin/styled.d.ts +3 -3
- package/dist/client/app/useGlobalData.d.ts +1 -1
- package/dist/client/app/utils/getBlocksHeight.d.ts +5 -14
- package/dist/client/app/utils/getBlocksHeight.js +1 -1
- package/dist/client/app/utils/loadAndNavigate.d.ts +1 -1
- package/dist/client/app/utils/syncScrollWithEditor.js +1 -1
- package/dist/client/browser-entry.d.ts +0 -1
- package/dist/client/browser-entry.js +3 -3
- package/dist/client/constants/ai-search.d.ts +7 -7
- package/dist/client/providers/page-data/hooks.d.ts +3 -3
- package/dist/client/templates/asyncapi-docs/helpers.d.ts +4 -181
- package/dist/client/templates/asyncapi-docs/helpers.js +1 -1
- package/dist/client/templates/openapi-docs/helpers.d.ts +1 -1
- package/dist/client/templates/openapi-docs/helpers.js +2 -2
- package/dist/client/templates/openapi-docs/mock-server-config.d.ts +3 -3
- package/dist/client/templates/openapi-docs/template.d.ts +1 -1
- package/dist/client/types/sidebar.d.ts +4 -4
- package/dist/constants/common.d.ts +66 -66
- package/dist/markdoc/helpers/normalize-custom-tags.d.ts +2 -0
- package/dist/markdoc/helpers/normalize-custom-tags.js +1 -0
- package/dist/markdoc/nodes/index.d.ts +6 -6
- package/dist/markdoc/tags/index.d.ts +2 -48
- package/dist/server/api-routes/helpers/read-stream-with-size-limit.d.ts +1 -1
- package/dist/server/api-routes/run-api-routes-worker.d.ts +1 -1
- package/dist/server/config/env-config.d.ts +17 -17
- package/dist/server/config/env-schema.d.ts +46 -46
- package/dist/server/config/env-schemas/auth.d.ts +4 -4
- package/dist/server/config/env-schemas/catalog.d.ts +2 -2
- package/dist/server/config/env-schemas/environment-detection.d.ts +8 -8
- package/dist/server/config/env-schemas/feature-flags.d.ts +10 -10
- package/dist/server/config/env-schemas/search.d.ts +3 -3
- package/dist/server/config/env-schemas/server-config.d.ts +2 -2
- package/dist/server/fs/content-fs.d.ts +1 -1
- package/dist/server/node-bundle-entry.js +1 -1
- package/dist/server/persistence/cache/mappers/create-cache-db-record.d.ts +1 -1
- package/dist/server/persistence/cache/repositories/cache-repository.js +1 -1
- package/dist/server/persistence/file-hashes/mappers/create-file-hash-db-record.d.ts +1 -1
- package/dist/server/persistence/file-hashes/repositories/file-hashes-repository.js +1 -1
- package/dist/server/persistence/kv/mappers/create-kv-db-record.d.ts +1 -1
- package/dist/server/persistence/kv/repositories/kv-repository.d.ts +1 -1
- package/dist/server/persistence/kv/repositories/kv-repository.js +2 -2
- package/dist/server/persistence/kv/services/kv-service.d.ts +3 -2
- package/dist/server/persistence/kv/services/kv-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +7 -6
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-db-record.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-relation-db-record-from-file-schema.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/field-transformations.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/remote-publish-lock-service.d.ts +3 -3
- package/dist/server/plugins/catalog-entities/database/repositories/bffEntities/bff-entities-read-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.d.ts +1 -4
- package/dist/server/plugins/catalog-entities/database/repositories/catalog-entities-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/filters-repository.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-read-repository.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-read-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entityAttributes/entity-attributes-write-repository.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/relations/relations-read-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/utils.d.ts +4 -4
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/extensions/extractors/fs-entities-extractor.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.d.ts +78 -78
- package/dist/server/plugins/catalog-entities/schemas/dto-schemas.d.ts +28 -28
- package/dist/server/plugins/catalog-entities/utils/get-not-accessible-catalog-resources.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/utils/is-predefined-catalog-type.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/utils/openapi-component-content-extractor.d.ts +1 -1
- package/dist/server/plugins/config-parser/normalize-redirect-sources.d.ts +1 -1
- package/dist/server/plugins/default-theme/resolve-products-config.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/index.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/App.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeyItem.d.ts +62 -4
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeyProductStatus.js +2 -2
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeySecret.js +2 -2
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeys.d.ts +8 -2
- package/dist/server/plugins/dev-onboarding/template/components/ApiLogItem.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/CharacterCounter.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/Container.d.ts +14 -2
- package/dist/server/plugins/dev-onboarding/template/components/DialogStyledComponents.d.ts +31 -11
- package/dist/server/plugins/dev-onboarding/template/components/MenuItemButton.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/Paper.d.ts +15 -3
- package/dist/server/plugins/dev-onboarding/template/components/PopupMenuUl.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/RevokeAPIKey.d.ts +2 -2
- package/dist/server/plugins/dev-onboarding/template/components/RevokeAPIKey.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/RollAPIKey.d.ts +2 -2
- package/dist/server/plugins/dev-onboarding/template/components/RollAPIKey.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/ShadowButton.d.ts +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/ShadowButton.js +2 -2
- package/dist/server/plugins/dev-onboarding/template/components/StatusBadge.d.ts +1 -3
- package/dist/server/plugins/dev-onboarding/template/components/useSortableData.d.ts +2 -2
- package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.js +1 -1
- package/dist/server/plugins/graphql-docs/constants.d.ts +1 -1
- package/dist/server/plugins/graphql-docs/search/ai/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +36 -18
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/markdown/search/get-ai-search-documents.d.ts +1 -1
- package/dist/server/plugins/markdown/search/nodes/tag-node.d.ts +1 -1
- package/dist/server/plugins/markdown/utils/resolve-markdown-template.d.ts +1 -1
- package/dist/server/plugins/mcp/constants.d.ts +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/index.d.ts +8 -8
- package/dist/server/plugins/mcp/docs-mcp/tools/utils.d.ts +1 -1
- package/dist/server/plugins/mcp/docs-mcp/utils.d.ts +2 -2
- package/dist/server/plugins/mcp/servers/docs-server.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/compute-scorecard.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/get-scorecard-config.d.ts +63 -63
- package/dist/server/plugins/scorecard-classic/index.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/lint.d.ts +3 -3
- package/dist/server/plugins/scorecard-classic/template/Gauge.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/template/components.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/template/index.styles.d.ts +61 -33
- package/dist/server/plugins/scorecard-classic/template/useData.d.ts +58 -58
- package/dist/server/plugins/scorecard-classic/template/utils.d.ts +1 -1
- package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.d.ts +4 -0
- package/dist/server/plugins/scorecards/database/repositories/scorecards-config-repository.js +1 -1
- package/dist/server/plugins/scorecards/database/scorecards-config-service.d.ts +4 -4
- package/dist/server/plugins/scorecards/database/scorecards-config-service.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.d.ts +1 -1
- package/dist/server/plugins/search/engines/search-engine.d.ts +1 -1
- package/dist/server/plugins/search/llmstxt/index.d.ts +1 -1
- package/dist/server/plugins/sidebars/index.d.ts +1 -1
- package/dist/server/providers/database/base-service.d.ts +25 -0
- package/dist/server/providers/database/base-service.js +1 -0
- package/dist/server/providers/database/database-path-generator.d.ts +2 -2
- package/dist/server/providers/database/database-preconnect-service.js +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/cache-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/entities-attributes-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/entities-relations-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/entities-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/file-hashes-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/kv-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-config-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-evaluation-runs-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-level-results-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-levels-rules-results-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-results-table.d.ts +1 -1
- package/dist/server/providers/database/databases/sqlite-db/schemas/scorecards-rule-results-table.d.ts +1 -1
- package/dist/server/providers/database/instance-cache-resolver.d.ts +19 -0
- package/dist/server/providers/database/instance-cache-resolver.js +1 -0
- package/dist/server/providers/database/pagination/constants.d.ts +2 -2
- package/dist/server/providers/database/utils/storage-limit-validator.d.ts +1 -1
- package/dist/server/ssr/render.js +1 -1
- package/dist/server/ssr/server-side-props/get-default-static-props.d.ts +9 -9
- package/dist/server/ssr/server-side-props/get-server-props-from-user-handler.d.ts +1 -1
- package/dist/server/ssr/server-side-props/prepare-context-variables.d.ts +1 -1
- package/dist/server/ssr/template.d.ts +1 -1
- package/dist/server/store.d.ts +2 -2
- package/dist/server/tools/notifiers/reporter.d.ts +12 -12
- package/dist/server/utils/envs/env-boolean-string.d.ts +3 -3
- package/dist/server/utils/is-realm-or-reef.d.ts +2 -0
- package/dist/server/utils/is-realm-or-reef.js +1 -0
- package/dist/server/utils/product.d.ts +1 -1
- package/dist/server/utils/rbac.d.ts +33 -33
- package/dist/server/web-server/auth.d.ts +2 -2
- package/dist/server/web-server/dev-server.js +1 -1
- package/dist/server/web-server/middleware/catalogAuthMiddleware.d.ts +1 -1
- package/dist/server/web-server/routes/catalog/helpers/create-entity-relation-update-schema.d.ts +12 -12
- package/dist/server/web-server/routes/catalog/helpers/create-entity-schema.d.ts +1967 -1967
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.d.ts +357 -357
- package/dist/server/web-server/routes/catalog/helpers/has-access-to-entity.d.ts +1 -1
- package/dist/server/web-server/routes/catalog/helpers/upsert-pages-stats.d.ts +1 -1
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entities-relations.d.ts +7 -7
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation-update-data.d.ts +7 -7
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation.d.ts +7 -7
- package/dist/server/web-server/routes/feedback.d.ts +1 -1
- package/dist/server/web-server/routes/helpers/process-redirects.d.ts +1 -1
- package/dist/server/web-server/utils/prepare-list-response.d.ts +1 -1
- package/dist/server/web-server/utils.d.ts +2 -2
- package/dist/utils/should-forward-prop.d.ts +9 -0
- package/dist/utils/should-forward-prop.js +1 -0
- package/package.json +12 -11
- package/dist/server/plugins/catalog-entities/utils/has-options-changed.d.ts +0 -2
- package/dist/server/plugins/catalog-entities/utils/has-options-changed.js +0 -1
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import type { EnvConfig } from './env-schema.js';
|
|
2
2
|
export type { EnvConfig };
|
|
3
3
|
declare function loadEnvConfig(): {
|
|
4
|
-
isProductionEnv: boolean;
|
|
5
|
-
isPreviewEnv: boolean;
|
|
6
|
-
isReunite: boolean;
|
|
7
|
-
isBuildMode: boolean;
|
|
8
|
-
isDevelopMode: boolean;
|
|
9
|
-
isRuntimeMode: boolean;
|
|
10
|
-
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
11
|
-
REDOCLY_ENV: "development" | "production" | "preview";
|
|
12
|
-
SEARCH_DEV_DEBUG: boolean;
|
|
13
4
|
NODE_ENV?: "development" | "production" | undefined;
|
|
5
|
+
REDOCLY_ENV: "development" | "preview" | "production";
|
|
6
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
14
7
|
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
15
8
|
CI?: boolean | undefined;
|
|
16
9
|
PORT?: number | undefined;
|
|
@@ -61,6 +54,7 @@ declare function loadEnvConfig(): {
|
|
|
61
54
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
62
55
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
63
56
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
57
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
64
58
|
TYPESENSE_API_URL?: string | undefined;
|
|
65
59
|
TYPESENSE_API_KEY?: string | undefined;
|
|
66
60
|
MAIN_API_URL?: string | undefined;
|
|
@@ -75,21 +69,20 @@ declare function loadEnvConfig(): {
|
|
|
75
69
|
OTEL_TRACES_URL?: string | undefined;
|
|
76
70
|
REQUEST_ID?: string | undefined;
|
|
77
71
|
SITE_URL?: string | undefined;
|
|
78
|
-
};
|
|
79
|
-
export type EnvConfigWithDerived = ReturnType<typeof loadEnvConfig> & {
|
|
80
|
-
[K: string]: never;
|
|
81
|
-
};
|
|
82
|
-
export declare const envConfig: {
|
|
83
72
|
isProductionEnv: boolean;
|
|
84
73
|
isPreviewEnv: boolean;
|
|
85
74
|
isReunite: boolean;
|
|
86
75
|
isBuildMode: boolean;
|
|
87
76
|
isDevelopMode: boolean;
|
|
88
77
|
isRuntimeMode: boolean;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
};
|
|
79
|
+
export type EnvConfigWithDerived = ReturnType<typeof loadEnvConfig> & {
|
|
80
|
+
[K: string]: never;
|
|
81
|
+
};
|
|
82
|
+
export declare const envConfig: {
|
|
92
83
|
NODE_ENV?: "development" | "production" | undefined;
|
|
84
|
+
REDOCLY_ENV: "development" | "preview" | "production";
|
|
85
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
93
86
|
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
94
87
|
CI?: boolean | undefined;
|
|
95
88
|
PORT?: number | undefined;
|
|
@@ -140,6 +133,7 @@ export declare const envConfig: {
|
|
|
140
133
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
141
134
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
142
135
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
136
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
143
137
|
TYPESENSE_API_URL?: string | undefined;
|
|
144
138
|
TYPESENSE_API_KEY?: string | undefined;
|
|
145
139
|
MAIN_API_URL?: string | undefined;
|
|
@@ -154,6 +148,12 @@ export declare const envConfig: {
|
|
|
154
148
|
OTEL_TRACES_URL?: string | undefined;
|
|
155
149
|
REQUEST_ID?: string | undefined;
|
|
156
150
|
SITE_URL?: string | undefined;
|
|
151
|
+
isProductionEnv: boolean;
|
|
152
|
+
isPreviewEnv: boolean;
|
|
153
|
+
isReunite: boolean;
|
|
154
|
+
isBuildMode: boolean;
|
|
155
|
+
isDevelopMode: boolean;
|
|
156
|
+
isRuntimeMode: boolean;
|
|
157
157
|
};
|
|
158
158
|
/**
|
|
159
159
|
* Re-parses environment variables from `process.env` into {@link envConfig}.
|
|
@@ -3,8 +3,8 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3
3
|
NODE_ENV: z.ZodOptional<z.ZodEnum<["development", "production"]>>;
|
|
4
4
|
REDOCLY_ENV: z.ZodDefault<z.ZodEnum<["production", "preview", "development"]>>;
|
|
5
5
|
REDOCLY_EXECUTION_MODE: z.ZodDefault<z.ZodEnum<["build", "develop", "runtime"]>>;
|
|
6
|
-
REDOCLY_INTERNAL_DEV: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
7
|
-
CI: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">, z.ZodLiteral<"1">]>>, boolean | undefined, "1" | "
|
|
6
|
+
REDOCLY_INTERNAL_DEV: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
7
|
+
CI: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">, z.ZodLiteral<"1">]>>, boolean | undefined, "1" | "false" | "true" | undefined>;
|
|
8
8
|
} & {
|
|
9
9
|
PORT: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
REDOCLY_LOG_FORMAT: z.ZodOptional<z.ZodString>;
|
|
@@ -16,7 +16,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
16
16
|
REDOCLY_PORTAL_VERSION: z.ZodOptional<z.ZodString>;
|
|
17
17
|
REDOCLY_TELEMETRY: z.ZodOptional<z.ZodString>;
|
|
18
18
|
REDOCLY_TELEMETRY_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
19
|
-
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
19
|
+
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
20
20
|
WEB_SERVER_IDLE_TIMEOUT: z.ZodOptional<z.ZodString>;
|
|
21
21
|
REDOCLY_PROBLEMS_OUTPUT_FILE: z.ZodOptional<z.ZodString>;
|
|
22
22
|
REDOCLY_METADATA_OUTPUT_FOLDER: z.ZodOptional<z.ZodString>;
|
|
@@ -39,27 +39,27 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
39
39
|
OIDC_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
40
40
|
OIDC_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
41
41
|
OIDC_ISSUER_URL: z.ZodOptional<z.ZodString>;
|
|
42
|
-
LOCALHOST_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
42
|
+
LOCALHOST_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
43
43
|
REDOCLY_OAUTH_USE_INTROSPECT: z.ZodOptional<z.ZodString>;
|
|
44
|
-
REDOCLY_ENFORCE_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
44
|
+
REDOCLY_ENFORCE_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
45
45
|
REDOCLY_ENFORCE_RESIDENCY: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
46
46
|
} & {
|
|
47
47
|
REDOCLY_SSR_RENDER_MODE: z.ZodOptional<z.ZodEnum<["worker", "main"]>>;
|
|
48
48
|
REDOCLY_SSR_WORKERS_MIN: z.ZodOptional<z.ZodNumber>;
|
|
49
49
|
REDOCLY_SSR_WORKERS_MAX: z.ZodOptional<z.ZodNumber>;
|
|
50
50
|
} & {
|
|
51
|
-
NEW_CATALOG_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
52
|
-
NEW_SCORECARDS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
51
|
+
NEW_CATALOG_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
52
|
+
NEW_SCORECARDS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
53
53
|
ENABLE_COMMENTS: z.ZodOptional<z.ZodString>;
|
|
54
|
-
REDOCLY_EXP_DISABLE_MD_VALIDATION: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
55
|
-
ENABLE_SOURCE_MAPS: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
54
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
55
|
+
ENABLE_SOURCE_MAPS: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
56
56
|
PLAN_GATES: z.ZodOptional<z.ZodString>;
|
|
57
|
-
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
57
|
+
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
58
58
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
59
59
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
60
60
|
} & {
|
|
61
61
|
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
62
|
-
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "
|
|
62
|
+
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "false" | "true" | undefined>;
|
|
63
63
|
TYPESENSE_API_URL: z.ZodOptional<z.ZodString>;
|
|
64
64
|
TYPESENSE_API_KEY: z.ZodOptional<z.ZodString>;
|
|
65
65
|
} & {
|
|
@@ -72,7 +72,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
72
72
|
SQLD_REMOTE_DATABASE_URL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"NO_SQLD_DEPLOYMENT_YET">]>>;
|
|
73
73
|
SQLD_REMOTE_DATABASE_AUTH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
74
74
|
} & {
|
|
75
|
-
FORCE_CATALOG_CACHE_REVALIDATE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
75
|
+
FORCE_CATALOG_CACHE_REVALIDATE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
76
76
|
} & {
|
|
77
77
|
SCORECARDS_POLLING_INTERVAL_MS: z.ZodOptional<z.ZodString>;
|
|
78
78
|
} & {
|
|
@@ -81,10 +81,9 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
81
81
|
} & {
|
|
82
82
|
SITE_URL: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
85
|
-
REDOCLY_ENV: "development" | "production" | "preview";
|
|
86
|
-
SEARCH_DEV_DEBUG: boolean;
|
|
87
84
|
NODE_ENV?: "development" | "production" | undefined;
|
|
85
|
+
REDOCLY_ENV: "development" | "preview" | "production";
|
|
86
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
88
87
|
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
89
88
|
CI?: boolean | undefined;
|
|
90
89
|
PORT?: number | undefined;
|
|
@@ -135,6 +134,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
135
134
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
136
135
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
137
136
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
137
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
138
138
|
TYPESENSE_API_URL?: string | undefined;
|
|
139
139
|
TYPESENSE_API_KEY?: string | undefined;
|
|
140
140
|
MAIN_API_URL?: string | undefined;
|
|
@@ -150,11 +150,11 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
150
150
|
REQUEST_ID?: string | undefined;
|
|
151
151
|
SITE_URL?: string | undefined;
|
|
152
152
|
}, {
|
|
153
|
-
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
154
153
|
NODE_ENV?: "development" | "production" | undefined;
|
|
155
|
-
REDOCLY_ENV?: "development" | "
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
REDOCLY_ENV?: "development" | "preview" | "production" | undefined;
|
|
155
|
+
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
156
|
+
REDOCLY_INTERNAL_DEV?: "false" | "true" | undefined;
|
|
157
|
+
CI?: "1" | "false" | "true" | undefined;
|
|
158
158
|
PORT?: number | undefined;
|
|
159
159
|
REDOCLY_LOG_FORMAT?: string | undefined;
|
|
160
160
|
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
@@ -165,7 +165,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
165
165
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
166
166
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
167
167
|
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
168
|
-
TELEMETRY_DEV_DEBUG?: "
|
|
168
|
+
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
169
169
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
170
170
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
171
171
|
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
@@ -186,24 +186,24 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
186
186
|
OIDC_CLIENT_ID?: string | undefined;
|
|
187
187
|
OIDC_CLIENT_SECRET?: string | undefined;
|
|
188
188
|
OIDC_ISSUER_URL?: string | undefined;
|
|
189
|
-
LOCALHOST_LOGIN?: "
|
|
189
|
+
LOCALHOST_LOGIN?: "false" | "true" | undefined;
|
|
190
190
|
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
191
|
-
REDOCLY_ENFORCE_LOGIN?: "
|
|
191
|
+
REDOCLY_ENFORCE_LOGIN?: "false" | "true" | undefined;
|
|
192
192
|
REDOCLY_ENFORCE_RESIDENCY?: string | undefined;
|
|
193
193
|
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
194
194
|
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
195
195
|
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
196
|
-
NEW_CATALOG_ENABLED?: "
|
|
197
|
-
NEW_SCORECARDS_ENABLED?: "
|
|
196
|
+
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
197
|
+
NEW_SCORECARDS_ENABLED?: "false" | "true" | undefined;
|
|
198
198
|
ENABLE_COMMENTS?: string | undefined;
|
|
199
|
-
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "
|
|
200
|
-
ENABLE_SOURCE_MAPS?: "
|
|
199
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "false" | "true" | undefined;
|
|
200
|
+
ENABLE_SOURCE_MAPS?: "false" | "true" | undefined;
|
|
201
201
|
PLAN_GATES?: string | undefined;
|
|
202
|
-
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "
|
|
202
|
+
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
203
203
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
204
204
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
205
205
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
206
|
-
SEARCH_DEV_DEBUG?: "
|
|
206
|
+
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
207
207
|
TYPESENSE_API_URL?: string | undefined;
|
|
208
208
|
TYPESENSE_API_KEY?: string | undefined;
|
|
209
209
|
MAIN_API_URL?: string | undefined;
|
|
@@ -213,16 +213,15 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
213
213
|
REDOCLY_CORS_ORIGINS?: string | undefined;
|
|
214
214
|
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
215
215
|
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
216
|
-
FORCE_CATALOG_CACHE_REVALIDATE?: "
|
|
216
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: "false" | "true" | undefined;
|
|
217
217
|
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
218
218
|
OTEL_TRACES_URL?: string | undefined;
|
|
219
219
|
REQUEST_ID?: string | undefined;
|
|
220
220
|
SITE_URL?: string | undefined;
|
|
221
221
|
}>, {
|
|
222
|
-
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
223
|
-
REDOCLY_ENV: "development" | "production" | "preview";
|
|
224
|
-
SEARCH_DEV_DEBUG: boolean;
|
|
225
222
|
NODE_ENV?: "development" | "production" | undefined;
|
|
223
|
+
REDOCLY_ENV: "development" | "preview" | "production";
|
|
224
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
226
225
|
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
227
226
|
CI?: boolean | undefined;
|
|
228
227
|
PORT?: number | undefined;
|
|
@@ -273,6 +272,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
273
272
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
274
273
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
275
274
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
275
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
276
276
|
TYPESENSE_API_URL?: string | undefined;
|
|
277
277
|
TYPESENSE_API_KEY?: string | undefined;
|
|
278
278
|
MAIN_API_URL?: string | undefined;
|
|
@@ -288,11 +288,11 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
288
288
|
REQUEST_ID?: string | undefined;
|
|
289
289
|
SITE_URL?: string | undefined;
|
|
290
290
|
}, {
|
|
291
|
-
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
292
291
|
NODE_ENV?: "development" | "production" | undefined;
|
|
293
|
-
REDOCLY_ENV?: "development" | "
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
REDOCLY_ENV?: "development" | "preview" | "production" | undefined;
|
|
293
|
+
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
294
|
+
REDOCLY_INTERNAL_DEV?: "false" | "true" | undefined;
|
|
295
|
+
CI?: "1" | "false" | "true" | undefined;
|
|
296
296
|
PORT?: number | undefined;
|
|
297
297
|
REDOCLY_LOG_FORMAT?: string | undefined;
|
|
298
298
|
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
@@ -303,7 +303,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
303
303
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
304
304
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
305
305
|
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
306
|
-
TELEMETRY_DEV_DEBUG?: "
|
|
306
|
+
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
307
307
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
308
308
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
309
309
|
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
@@ -324,24 +324,24 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
324
324
|
OIDC_CLIENT_ID?: string | undefined;
|
|
325
325
|
OIDC_CLIENT_SECRET?: string | undefined;
|
|
326
326
|
OIDC_ISSUER_URL?: string | undefined;
|
|
327
|
-
LOCALHOST_LOGIN?: "
|
|
327
|
+
LOCALHOST_LOGIN?: "false" | "true" | undefined;
|
|
328
328
|
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
329
|
-
REDOCLY_ENFORCE_LOGIN?: "
|
|
329
|
+
REDOCLY_ENFORCE_LOGIN?: "false" | "true" | undefined;
|
|
330
330
|
REDOCLY_ENFORCE_RESIDENCY?: string | undefined;
|
|
331
331
|
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
332
332
|
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
333
333
|
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
334
|
-
NEW_CATALOG_ENABLED?: "
|
|
335
|
-
NEW_SCORECARDS_ENABLED?: "
|
|
334
|
+
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
335
|
+
NEW_SCORECARDS_ENABLED?: "false" | "true" | undefined;
|
|
336
336
|
ENABLE_COMMENTS?: string | undefined;
|
|
337
|
-
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "
|
|
338
|
-
ENABLE_SOURCE_MAPS?: "
|
|
337
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "false" | "true" | undefined;
|
|
338
|
+
ENABLE_SOURCE_MAPS?: "false" | "true" | undefined;
|
|
339
339
|
PLAN_GATES?: string | undefined;
|
|
340
|
-
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "
|
|
340
|
+
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
341
341
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
342
342
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
343
343
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
344
|
-
SEARCH_DEV_DEBUG?: "
|
|
344
|
+
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
345
345
|
TYPESENSE_API_URL?: string | undefined;
|
|
346
346
|
TYPESENSE_API_KEY?: string | undefined;
|
|
347
347
|
MAIN_API_URL?: string | undefined;
|
|
@@ -351,7 +351,7 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
351
351
|
REDOCLY_CORS_ORIGINS?: string | undefined;
|
|
352
352
|
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
353
353
|
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
354
|
-
FORCE_CATALOG_CACHE_REVALIDATE?: "
|
|
354
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: "false" | "true" | undefined;
|
|
355
355
|
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
356
356
|
OTEL_TRACES_URL?: string | undefined;
|
|
357
357
|
REQUEST_ID?: string | undefined;
|
|
@@ -12,9 +12,9 @@ export declare const authSchema: z.ZodObject<{
|
|
|
12
12
|
OIDC_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
13
13
|
OIDC_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
14
14
|
OIDC_ISSUER_URL: z.ZodOptional<z.ZodString>;
|
|
15
|
-
LOCALHOST_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
15
|
+
LOCALHOST_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
16
16
|
REDOCLY_OAUTH_USE_INTROSPECT: z.ZodOptional<z.ZodString>;
|
|
17
|
-
REDOCLY_ENFORCE_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
17
|
+
REDOCLY_ENFORCE_LOGIN: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
18
18
|
REDOCLY_ENFORCE_RESIDENCY: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
JWT_SECRET_KEY?: string | undefined;
|
|
@@ -40,9 +40,9 @@ export declare const authSchema: z.ZodObject<{
|
|
|
40
40
|
OIDC_CLIENT_ID?: string | undefined;
|
|
41
41
|
OIDC_CLIENT_SECRET?: string | undefined;
|
|
42
42
|
OIDC_ISSUER_URL?: string | undefined;
|
|
43
|
-
LOCALHOST_LOGIN?: "
|
|
43
|
+
LOCALHOST_LOGIN?: "false" | "true" | undefined;
|
|
44
44
|
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
45
|
-
REDOCLY_ENFORCE_LOGIN?: "
|
|
45
|
+
REDOCLY_ENFORCE_LOGIN?: "false" | "true" | undefined;
|
|
46
46
|
REDOCLY_ENFORCE_RESIDENCY?: string | undefined;
|
|
47
47
|
}>;
|
|
48
48
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -3,10 +3,10 @@ import { z } from 'zod';
|
|
|
3
3
|
* Schema for catalog configuration variables.
|
|
4
4
|
*/
|
|
5
5
|
export declare const catalogSchema: z.ZodObject<{
|
|
6
|
-
FORCE_CATALOG_CACHE_REVALIDATE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
6
|
+
FORCE_CATALOG_CACHE_REVALIDATE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
FORCE_CATALOG_CACHE_REVALIDATE?: boolean | undefined;
|
|
9
9
|
}, {
|
|
10
|
-
FORCE_CATALOG_CACHE_REVALIDATE?: "
|
|
10
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: "false" | "true" | undefined;
|
|
11
11
|
}>;
|
|
12
12
|
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -6,19 +6,19 @@ export declare const environmentDetectionSchema: z.ZodObject<{
|
|
|
6
6
|
NODE_ENV: z.ZodOptional<z.ZodEnum<["development", "production"]>>;
|
|
7
7
|
REDOCLY_ENV: z.ZodDefault<z.ZodEnum<["production", "preview", "development"]>>;
|
|
8
8
|
REDOCLY_EXECUTION_MODE: z.ZodDefault<z.ZodEnum<["build", "develop", "runtime"]>>;
|
|
9
|
-
REDOCLY_INTERNAL_DEV: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
10
|
-
CI: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">, z.ZodLiteral<"1">]>>, boolean | undefined, "1" | "
|
|
9
|
+
REDOCLY_INTERNAL_DEV: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
10
|
+
CI: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"true">, z.ZodLiteral<"false">, z.ZodLiteral<"1">]>>, boolean | undefined, "1" | "false" | "true" | undefined>;
|
|
11
11
|
}, "strict", z.ZodTypeAny, {
|
|
12
|
-
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
13
|
-
REDOCLY_ENV: "development" | "production" | "preview";
|
|
14
12
|
NODE_ENV?: "development" | "production" | undefined;
|
|
13
|
+
REDOCLY_ENV: "development" | "preview" | "production";
|
|
14
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
15
15
|
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
16
16
|
CI?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
|
-
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
19
18
|
NODE_ENV?: "development" | "production" | undefined;
|
|
20
|
-
REDOCLY_ENV?: "development" | "
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
REDOCLY_ENV?: "development" | "preview" | "production" | undefined;
|
|
20
|
+
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
21
|
+
REDOCLY_INTERNAL_DEV?: "false" | "true" | undefined;
|
|
22
|
+
CI?: "1" | "false" | "true" | undefined;
|
|
23
23
|
}>;
|
|
24
24
|
//# sourceMappingURL=environment-detection.d.ts.map
|
|
@@ -3,14 +3,14 @@ import { z } from 'zod';
|
|
|
3
3
|
* Schema for feature flags.
|
|
4
4
|
*/
|
|
5
5
|
export declare const featureFlagsSchema: z.ZodObject<{
|
|
6
|
-
NEW_CATALOG_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
7
|
-
NEW_SCORECARDS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
6
|
+
NEW_CATALOG_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
7
|
+
NEW_SCORECARDS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
8
8
|
ENABLE_COMMENTS: z.ZodOptional<z.ZodString>;
|
|
9
|
-
REDOCLY_EXP_DISABLE_MD_VALIDATION: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
10
|
-
ENABLE_SOURCE_MAPS: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
9
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
10
|
+
ENABLE_SOURCE_MAPS: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
11
11
|
PLAN_GATES: z.ZodOptional<z.ZodString>;
|
|
12
12
|
/** Experimental: append agent feedback instructions to llms.txt Markdown chunks. */
|
|
13
|
-
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
13
|
+
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
14
14
|
/** Optional POST URL for the agent feedback footer; defaults to `{seo.siteUrl|REDOCLY_PUBLIC_URL}/api/agent-feedback`, or `/api/agent-feedback` on the same origin. */
|
|
15
15
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
16
16
|
/** (Optional) API endpoint for the agent feedback endpoint;**/
|
|
@@ -26,13 +26,13 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
26
26
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
27
27
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
NEW_CATALOG_ENABLED?: "
|
|
30
|
-
NEW_SCORECARDS_ENABLED?: "
|
|
29
|
+
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
30
|
+
NEW_SCORECARDS_ENABLED?: "false" | "true" | undefined;
|
|
31
31
|
ENABLE_COMMENTS?: string | undefined;
|
|
32
|
-
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "
|
|
33
|
-
ENABLE_SOURCE_MAPS?: "
|
|
32
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION?: "false" | "true" | undefined;
|
|
33
|
+
ENABLE_SOURCE_MAPS?: "false" | "true" | undefined;
|
|
34
34
|
PLAN_GATES?: string | undefined;
|
|
35
|
-
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "
|
|
35
|
+
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
36
36
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
37
37
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
38
38
|
}>;
|
|
@@ -4,17 +4,17 @@ import { z } from 'zod';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const searchSchema: z.ZodObject<{
|
|
6
6
|
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
7
|
-
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "
|
|
7
|
+
SEARCH_DEV_DEBUG: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "false" | "true" | undefined>;
|
|
8
8
|
TYPESENSE_API_URL: z.ZodOptional<z.ZodString>;
|
|
9
9
|
TYPESENSE_API_KEY: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
SEARCH_DEV_DEBUG: boolean;
|
|
12
11
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
12
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
13
13
|
TYPESENSE_API_URL?: string | undefined;
|
|
14
14
|
TYPESENSE_API_KEY?: string | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
17
|
-
SEARCH_DEV_DEBUG?: "
|
|
17
|
+
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
18
18
|
TYPESENSE_API_URL?: string | undefined;
|
|
19
19
|
TYPESENSE_API_KEY?: string | undefined;
|
|
20
20
|
}>;
|
|
@@ -13,7 +13,7 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
13
13
|
REDOCLY_PORTAL_VERSION: z.ZodOptional<z.ZodString>;
|
|
14
14
|
REDOCLY_TELEMETRY: z.ZodOptional<z.ZodString>;
|
|
15
15
|
REDOCLY_TELEMETRY_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
16
|
-
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "
|
|
16
|
+
TELEMETRY_DEV_DEBUG: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
17
17
|
WEB_SERVER_IDLE_TIMEOUT: z.ZodOptional<z.ZodString>;
|
|
18
18
|
REDOCLY_PROBLEMS_OUTPUT_FILE: z.ZodOptional<z.ZodString>;
|
|
19
19
|
REDOCLY_METADATA_OUTPUT_FOLDER: z.ZodOptional<z.ZodString>;
|
|
@@ -43,7 +43,7 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
43
43
|
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
44
44
|
REDOCLY_TELEMETRY?: string | undefined;
|
|
45
45
|
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
46
|
-
TELEMETRY_DEV_DEBUG?: "
|
|
46
|
+
TELEMETRY_DEV_DEBUG?: "false" | "true" | undefined;
|
|
47
47
|
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
48
48
|
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
49
49
|
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
@@ -11,11 +11,11 @@ export declare class ContentFs extends Fs {
|
|
|
11
11
|
get localeFolders(): string[];
|
|
12
12
|
get localizationFolder(): string | undefined;
|
|
13
13
|
getFileInfo(relativePath: string): FileInfo | {
|
|
14
|
+
hash: string | undefined;
|
|
14
15
|
relativePath: string;
|
|
15
16
|
realRelativePath: string;
|
|
16
17
|
dirname: string;
|
|
17
18
|
isVirtual: boolean;
|
|
18
|
-
hash: string | undefined;
|
|
19
19
|
} | undefined;
|
|
20
20
|
exists(file: string): boolean;
|
|
21
21
|
read(file: string, encoding?: BufferEncoding): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolve as n,dirname as f}from"node:path";import{fileURLToPath as l}from"node:url";import{readFile as u}from"fs/promises";import{createReadStream as d}from"fs";import{envConfig as v}from"./config/env-config.js";import{telemetry as g}from"./telemetry/index.js";import{createRouter as S}from"./web-server/router.js";import{installProdRoutes as
|
|
1
|
+
import{resolve as n,dirname as f}from"node:path";import{fileURLToPath as l}from"node:url";import{readFile as u}from"fs/promises";import{createReadStream as d}from"fs";import{envConfig as v}from"./config/env-config.js";import{telemetry as g}from"./telemetry/index.js";import{createRouter as S}from"./web-server/router.js";import{installProdRoutes as R}from"./web-server/routes/index.js";import{Store as w}from"./store.js";import{loadEnvVariables as x}from"./utils/envs/load-env-variables.js";import{startHttpServer as D}from"./web-server/http.js";import{readStaticData as P}from"./utils/static-data.js";import{startIdleTimeout as E}from"./web-server/middleware/idleTimeoutMiddleware.js";import{reporter as y}from"./tools/notifiers/reporter.js";import{logger as b}from"./tools/notifiers/logger.js";import{EntitlementsProvider as h}from"./entitlements/entitlements-provider.js";import{DatabasePreconnectService as I}from"./providers/database/database-preconnect-service.js";import{KvService as O}from"./persistence/kv/services/kv-service.js";import{runScorecardsWorker as N}from"./plugins/scorecards/workers/run-scorecards-worker.js";import{isScorecardsEnabled as T}from"./utils/is-scorecards-enabled.js";import{isRealmOrReef as k}from"./utils/is-realm-or-reef.js";import{renderPage as or}from"./ssr/index.js";const A=new URL(import.meta.url),F=A.searchParams.get("only-exports")==="true";if(!F){let p=function(){const r=process.argv.findIndex(i=>i==="--port"||i==="-p");if(r===-1)return null;const t=process.argv[r+1];if(t.startsWith("-"))return null;const o=parseInt(t,10);return isNaN(o)?null:o};const e=f(l(import.meta.url));await x(e);const s=JSON.parse(await u(n(e,"./store.json"),"utf-8")),m=w.fromJson(s,{outdir:n(e,"../client"),serverOutDir:e,serverMode:!0,contentDir:""});if(await h.instance().init({ignoreTokenExpiration:!0}),k()){await I.init(e);const r=await O.getInstance({baseDbDir:e});setInterval(()=>{r.clearExpired().catch(t=>{b.error("Failed to clear expired KV entries",t)})},300*1e3)}c(m).catch(r=>{console.error(r)});async function c(r){g.initialize();const t=await S();R(t,r,{readStaticAsset:async a=>d(a),resolveRouteData:async a=>P(a.slug,r.outdir)}),y.printErrors();const o=p(),i=v.PORT;return await D(t,o??i??4e3),E(),T(r.config)&&N(r.serverOutDir,r.config.scorecards),t}}export{or as renderPage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DatabaseCacheDto } from '../../../providers/database/databases/sqlite-db/schemas/cache-table.js';
|
|
2
|
-
export declare function createCacheDbRecord({ key, value, namespace, ttlInSeconds
|
|
2
|
+
export declare function createCacheDbRecord({ key, value, namespace, ttlInSeconds }: {
|
|
3
3
|
key: string;
|
|
4
4
|
value: Record<string, unknown> | unknown[];
|
|
5
5
|
namespace: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{and as
|
|
1
|
+
import{and as i,eq as a}from"drizzle-orm";import{isTtlExpired as m}from"../../../utils/is-ttl-expired.js";import{logger as n}from"../../../tools/notifiers/logger.js";import{cacheTable as r}from"../../../providers/database/databases/sqlite-db/schemas/cache-table.js";import{createDatabaseRepositoryInstance as d,InstanceCacheResolver as h}from"../../../providers/database/instance-cache-resolver.js";import{createCacheDbRecord as u}from"../mappers/create-cache-db-record.js";import{createCacheReadModel as p}from"../mappers/create-cache-read-model.js";class l{static#t=new h(e=>d(e,"cache",l));#e;constructor(e){this.#e=e.client}static async getInstance(e){return l.#t.get(e)}async get(e,t){const c=[a(r.key,e)];t&&c.push(a(r.namespace,t));const o=await this.#e.client.select().from(r).where(i(...c)).get();if(!o)return null;const s=p(o);return m(s.ttlInSeconds,s.createdAt)?(await this.delete(e,t),null):s}async set(e){try{const t=u(e);return await this.#e.client.insert(r).values(t).onConflictDoUpdate({target:[r.key],set:{value:t.value,namespace:t.namespace,ttl:t.ttl,updatedAt:t.updatedAt}}),t.key}catch(t){return n.error("Error setting cache: "+t.message),null}}async delete(e,t){try{return await this.#e.client.delete(r).where(i(a(r.key,e),a(r.namespace,t))),!0}catch(c){return n.error("Error deleting cache: "+c.message),!1}}async deleteByNamespace(e){try{return await this.#e.client.delete(r).where(a(r.namespace,e)),!0}catch(t){return n.error("Error deleting cache by namespace: "+t.message),!1}}async clearAll(){try{return await this.#e.client.delete(r),!0}catch(e){return n.error("Error clearing all cache: "+e.message),!1}}}export{l as CacheRepository};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FileType, FileHashStatus } from '../types.js';
|
|
2
2
|
import type { DatabaseFileHashDto } from '../../../providers/database/databases/sqlite-db/schemas/file-hashes-table.js';
|
|
3
|
-
export declare function createFileHashDbRecord({ id, fileType, filePath, hash, status
|
|
3
|
+
export declare function createFileHashDbRecord({ id, fileType, filePath, hash, status }: {
|
|
4
4
|
id?: string;
|
|
5
5
|
fileType: FileType;
|
|
6
6
|
filePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{BaseRepository as a}from"../../../providers/database/base-repository.js";import{createDatabaseRepositoryInstance as r,InstanceCacheResolver as i}from"../../../providers/database/instance-cache-resolver.js";import{FileHashesWriteRepository as n}from"./file-hashes-write-repository.js";import{FileHashesReadRepository as l}from"./file-hashes-read-repository.js";class t extends a{static#s=new i(e=>r(e,"file hashes",t));#e;#t;constructor(e){super(e),this.#e=new l(this.databaseClient),this.#t=new n(this.databaseClient)}static async getInstance(e){return t.#s.get(e)}async getByPath(e){return this.#e.getByPath(e)}async getAllOutdated(e){return this.#e.getAllOutdated(e)}async getAllByFileType(e){return this.#e.getAllByFileType(e)}async upsertFileHash(e){return await this.#t.upsertFileHash(e)}async updateFileHashesStatus(e,s){return this.#t.updateFileHashes(e,s)}async deleteFileHashes(e){return this.#t.deleteFileHashes(e)}}export{t as FileHashesRepository};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { KvValue, KvKey } from '@redocly/config';
|
|
2
2
|
import type { DatabaseKvDbInsertSchema } from '../../../providers/database/databases/sqlite-db/schemas/kv-table.js';
|
|
3
3
|
export declare const KV_KEY_SEPARATOR = "\u0001";
|
|
4
|
-
export declare function createKvDbRecord({ key, value, ttlInSeconds
|
|
4
|
+
export declare function createKvDbRecord({ key, value, ttlInSeconds }: {
|
|
5
5
|
key: KvKey;
|
|
6
6
|
value: KvValue;
|
|
7
7
|
ttlInSeconds?: number;
|
|
@@ -5,7 +5,7 @@ export declare const KV_KEY_END_BOUNDARY = "\u0002";
|
|
|
5
5
|
export declare class KvRepository extends BaseRepository {
|
|
6
6
|
#private;
|
|
7
7
|
constructor(dbConnection: DatabaseConnection);
|
|
8
|
-
static
|
|
8
|
+
static create(options: RepositoryInstanceOptions): Promise<KvRepository>;
|
|
9
9
|
sync(): Promise<void>;
|
|
10
10
|
get<T extends KvValue = KvValue>(key: KvKey): Promise<T | null>;
|
|
11
11
|
getMany<T extends KvValue = KvValue>(keys: KvKey[]): Promise<(KvListEntry<T> | null)[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{eq as
|
|
2
|
-
All changes and data will only persist locally and will not be synced remotely.`),this.#
|
|
1
|
+
import{eq as b,and as m,gte as l,gt as B,lt as g,asc as S,desc as R,or as f,isNull as K,sql as o,inArray as L,count as M}from"drizzle-orm";import{logger as C}from"../../../tools/notifiers/logger.js";import{kvTable as e}from"../../../providers/database/databases/sqlite-db/schemas/kv-table.js";import{BaseRepository as N}from"../../../providers/database/base-repository.js";import{createDatabaseRepositoryInstance as T}from"../../../providers/database/instance-cache-resolver.js";import{createKvValue as $}from"../mappers/create-kv-value.js";import{createKvDbRecord as D,encodeKvKey as c}from"../mappers/create-kv-db-record.js";import{decodeCursor as k}from"../helpers/decode-cursor.js";import{encodeCursor as I}from"../helpers/encode-cursor.js";import{createKvListEntry as x}from"../mappers/create-kv-list-entry.js";const O="";class v extends N{#e=!1;constructor(t){super(t)}static create(t){return T(t,"kv",v)}async sync(){if(this.isNonRemoteDatabaseMode()){this.#e||(C.warn(`KV database is currently operating in local mode: not connected to the remote database.
|
|
2
|
+
All changes and data will only persist locally and will not be synced remotely.`),this.#e=!0);return}await this.databaseClient.sync()}async get(t){const n=c(t),r=await this.databaseClient.client.select().from(e).where(m(b(e.encodedKey,n),f(K(e.expiresAt),l(o`datetime(${e.expiresAt})`,o`datetime('now')`)))).get();return r?$(r):null}async getMany(t){if(t.length===0)return[];const n=t.map(d=>c(d)),r=f(K(e.expiresAt),l(o`datetime(${e.expiresAt})`,o`datetime('now')`)),a=await this.databaseClient.client.select().from(e).where(m(L(e.encodedKey,n),r)).all(),s=new Map(a.map(d=>[d.encodedKey,d]));return t.map((d,p)=>{const w=n[p],y=s.get(w);return y?x(y):null})}async list(t,n){const r=n?.limit??100,a=n?.reverse??!1,s=[],d=f(K(e.expiresAt),l(o`datetime(${e.expiresAt})`,o`datetime('now')`));if(s.push(d),"prefix"in t){const i=c(t.prefix),u="start"in t?c(t.start):i,E="end"in t?c(t.end):i+O;s.push(l(e.encodedKey,u)),s.push(g(e.encodedKey,E))}else if("start"in t&&"end"in t){const i=c(t.start),u=c(t.end);s.push(l(e.encodedKey,i)),s.push(g(e.encodedKey,u))}if(n?.cursor){const i=k(n.cursor),u=a?g(e.encodedKey,i):B(e.encodedKey,i);s.push(u)}const p=this.databaseClient.client.select().from(e),w=s.length>0?p.where(m(...s)):p,y=this.databaseClient.client.select({count:M()}).from(e),A=(await(s.length>0?y.where(m(...s)):y).get())?.count??0,h=await w.orderBy(a?R(e.encodedKey):S(e.encodedKey)).limit(r).all();return{items:h.map(i=>x(i)),total:A,cursor:A>h.length?I(h[h.length-1]?.encodedKey):null}}async set(t,n,r){const a=D({key:t,value:n,ttlInSeconds:r?.ttlInSeconds});return await this.databaseClient.client.insert(e).values(a).onConflictDoUpdate({target:[e.encodedKey],set:{value:a.value,expiresAt:a.expiresAt,updatedAt:a.updatedAt}}),x(a)}async delete(t){const n=c(t);await this.databaseClient.client.delete(e).where(b(e.encodedKey,n))}async clearExpired(){await this.databaseClient.client.delete(e).where(g(o`datetime(${e.expiresAt})`,o`datetime('now')`))}async transaction(t){return this.databaseClient.transactionsManager.transaction(async()=>t({get:async r=>this.get(r),getMany:async r=>this.getMany(r),set:async(r,a,s)=>this.set(r,a,s),delete:async r=>this.delete(r)}))}async getTotalStoredEntryBytes(){try{return await this.getTableSizeInBytes("kv")}catch(t){return C.error("Error getting total kv stored entry bytes",t),0}}async getStoredEntrySizeByEncodedKey(t){try{const n=f(K(e.expiresAt),l(o`datetime(${e.expiresAt})`,o`datetime('now')`)),r=await this.databaseClient.client.select({bytes:o`COALESCE(LENGTH(CAST(${e.encodedKey} AS BLOB)) + LENGTH(CAST(${e.value} AS BLOB)), 0)`}).from(e).where(m(b(e.encodedKey,t),n)).get();return Number(r?.bytes??0)}catch(n){return C.error("Error getting kv entry size by encoded key",n),0}}}export{O as KV_KEY_END_BOUNDARY,v as KvRepository};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { KvValue, KvKey, KvListEntry, KvSetOptions, KvListOptions, KvListResponse, KvListSelector, KvTransaction } from '@redocly/config';
|
|
2
2
|
import type { ServiceInstanceOptions } from '../../../providers/database/types.js';
|
|
3
|
+
import { BaseService } from '../../../providers/database/base-service.js';
|
|
3
4
|
import { KvRepository } from '../repositories/kv-repository.js';
|
|
4
|
-
export declare class KvService {
|
|
5
|
+
export declare class KvService extends BaseService<KvRepository> {
|
|
5
6
|
#private;
|
|
6
|
-
constructor(repository: KvRepository
|
|
7
|
+
constructor(repository: KvRepository, options?: ServiceInstanceOptions);
|
|
7
8
|
static getInstance(options: ServiceInstanceOptions): Promise<KvService>;
|
|
8
9
|
/**
|
|
9
10
|
* Get a kv entry by key
|