@breadstone/archipel-mcp 0.0.22 → 0.0.25
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 +32 -13
- package/data/guides/ai-text-generation.md +16 -24
- package/data/guides/caching.md +33 -0
- package/data/guides/email-delivery.md +27 -1
- package/data/guides/email-templates.md +49 -39
- package/data/guides/esigning-integration.md +11 -5
- package/data/guides/health-indicators.md +220 -0
- package/data/guides/index.md +2 -0
- package/data/guides/queue-infrastructure.md +329 -0
- package/data/guides/telemetry-and-observability.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsClientPort.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsHealthIndicator.md +78 -0
- package/data/packages/platform-analytics/api/Class.AppInsightsAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.DatadogAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.NoopAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.SentryAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/index.md +1 -0
- package/data/packages/platform-analytics/index.md +25 -1
- package/data/packages/platform-authentication/api/Class.AuthenticationHealthIndicator.md +68 -0
- package/data/packages/platform-authentication/api/Interface.IMfaSubjectUpdate.md +1 -1
- package/data/packages/platform-authentication/api/index.md +2 -1
- package/data/packages/platform-authentication/index.md +25 -1
- package/data/packages/platform-blob-storage/api/Class.BlobHealthIndicator.md +7 -7
- package/data/packages/platform-blob-storage/api/Class.BlobModule.md +2 -2
- package/data/packages/platform-blob-storage/api/Interface.IAwsS3BlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IAzureBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IBlobModuleOptions.md +5 -5
- package/data/packages/platform-blob-storage/api/Interface.ICustomBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/TypeAlias.IBlobProviderRegistration.md +1 -1
- package/data/packages/platform-blob-storage/api/index.md +1 -1
- package/data/packages/platform-blob-storage/index.md +19 -14
- package/data/packages/platform-caching/api/Class.MemoryLayeredCache.md +10 -10
- package/data/packages/platform-caching/api/Class.NoopCacheMetricsRecorder.md +6 -6
- package/data/packages/platform-caching/api/Class.RedisLayeredCache.md +13 -13
- package/data/packages/platform-caching/api/Interface.ILayeredCache.md +9 -9
- package/data/packages/platform-caching/api/Interface.ILayeredCacheOptions.md +6 -6
- package/data/packages/platform-caching/api/Variable.CACHE_DEFAULT_TTL_MS.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_MAX_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_STALE_WHILE_REVALIDATE.md +14 -0
- package/data/packages/platform-caching/api/Variable.PLATFORM_CACHING_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_KEY_PREFIX.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_TTL_SECONDS.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_URL.md +14 -0
- package/data/packages/platform-caching/api/index.md +13 -0
- package/data/packages/platform-caching/index.md +47 -1
- package/data/packages/platform-configuration/api/Function.createConfigKey.md +1 -1
- package/data/packages/platform-core/api/Class.HttpLoggerMiddleware.md +3 -3
- package/data/packages/platform-core/api/Function.maskSensitive.md +26 -0
- package/data/packages/platform-core/api/Function.maskSensitiveFields.md +26 -0
- package/data/packages/platform-core/api/index.md +2 -0
- package/data/packages/platform-core/index.md +11 -0
- package/data/packages/platform-database/api/Class.DatabaseHealthIndicator.md +8 -6
- package/data/packages/platform-database/api/Class.DatabaseModule.md +3 -3
- package/data/packages/platform-database/api/Class.RepositoryBase.md +20 -20
- package/data/packages/platform-database/api/Function.paginator.md +1 -1
- package/data/packages/platform-database/api/Interface.IDatabaseModuleConfig.md +3 -3
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.PaginateFunction.md +1 -1
- package/data/packages/platform-database/api/Variable.DATABASE_MODULE_CONFIG.md +1 -1
- package/data/packages/platform-database/index.md +17 -5
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +9 -5
- package/data/packages/platform-documents/index.md +1 -1
- package/data/packages/platform-esigning/api/Class.AdobeSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DocuSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DropboxSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +20 -0
- package/data/packages/platform-esigning/api/Class.EsigningHealthIndicator.md +78 -0
- package/data/packages/platform-esigning/api/Class.InternalEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/index.md +1 -0
- package/data/packages/platform-esigning/index.md +26 -2
- package/data/packages/platform-health/api/Class.HealthModule.md +42 -0
- package/data/packages/platform-health/api/Class.HealthOrchestrator.md +64 -0
- package/data/packages/platform-health/api/Interface.IHealthCheckResult.md +46 -0
- package/data/packages/platform-health/api/Interface.IHealthIndicator.md +41 -0
- package/data/packages/platform-health/api/Variable.HEALTH_INDICATORS_TOKEN.md +14 -0
- package/data/packages/platform-health/api/index.md +26 -0
- package/data/packages/platform-health/index.md +19 -8
- package/data/packages/platform-intelligence/api/Class.IntelligenceHealthIndicator.md +78 -0
- package/data/packages/platform-intelligence/api/index.md +1 -0
- package/data/packages/platform-intelligence/index.md +24 -1
- package/data/packages/platform-logging/api/Class.ContextLogger.md +152 -0
- package/data/packages/platform-logging/api/Class.LoggerModule.md +8 -2
- package/data/packages/platform-logging/api/Class.RequestContextStore.md +90 -0
- package/data/packages/platform-logging/api/Class.RequestIdMiddleware.md +68 -0
- package/data/packages/platform-logging/api/Interface.IRequestContext.md +34 -0
- package/data/packages/platform-logging/api/Variable.REQUEST_ID_HEADER.md +14 -0
- package/data/packages/platform-logging/api/index.md +11 -1
- package/data/packages/platform-logging/index.md +89 -7
- package/data/packages/platform-mailing/api/Class.MailHealthIndicator.md +5 -5
- package/data/packages/platform-mailing/api/Class.MailModule.md +28 -1
- package/data/packages/platform-mailing/api/Class.MailVerificationService.md +49 -16
- package/data/packages/platform-mailing/api/Class.SmtpConnectionVerifier.md +84 -0
- package/data/packages/platform-mailing/api/Interface.IMailModuleOptions.md +36 -0
- package/data/packages/platform-mailing/api/index.md +3 -1
- package/data/packages/platform-mailing/index.md +64 -8
- package/data/packages/platform-mapping/api/Class.MappingBuilder.md +110 -0
- package/data/packages/platform-mapping/api/Class.MappingError.md +56 -0
- package/data/packages/platform-mapping/api/Class.MappingModule.md +46 -0
- package/data/packages/platform-mapping/api/Class.MappingNotRegisteredError.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingProfileBase.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingService.md +284 -0
- package/data/packages/platform-mapping/api/Class.TypeMappingNotRegisteredError.md +53 -0
- package/data/packages/platform-mapping/api/Function.createMappingKey.md +39 -0
- package/data/packages/platform-mapping/api/Interface.IMappingBuilder.md +76 -0
- package/data/packages/platform-mapping/api/Interface.IMappingKey.md +58 -0
- package/data/packages/platform-mapping/api/Interface.IMappingProfile.md +32 -0
- package/data/packages/platform-mapping/api/TypeAlias.Constructor.md +28 -0
- package/data/packages/platform-mapping/api/index.md +38 -0
- package/data/packages/platform-mapping/index.md +1 -1
- package/data/packages/platform-mcp/api/Class.McpHealthIndicator.md +78 -0
- package/data/packages/platform-mcp/api/index.md +1 -0
- package/data/packages/platform-mcp/index.md +24 -1
- package/data/packages/platform-openapi/api/Function.SwaggerFeature.md +2 -2
- package/data/packages/platform-openapi/api/Function.getSwaggerFeatureMetadata.md +2 -2
- package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +24 -0
- package/data/packages/platform-payments/api/Class.MollieClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaddleClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaymentClientPort.md +20 -0
- package/data/packages/platform-payments/api/Class.PaymentHealthIndicator.md +78 -0
- package/data/packages/platform-payments/api/Class.StripeClient.md +28 -4
- package/data/packages/platform-payments/api/index.md +1 -0
- package/data/packages/platform-payments/index.md +26 -2
- package/data/packages/platform-queue/api/Class.AzureQueue.md +221 -0
- package/data/packages/platform-queue/api/Class.BullMqQueue.md +220 -0
- package/data/packages/platform-queue/api/Class.MemoryQueue.md +194 -0
- package/data/packages/platform-queue/api/Class.QueueError.md +51 -0
- package/data/packages/platform-queue/api/Class.QueueHealthIndicator.md +68 -0
- package/data/packages/platform-queue/api/Class.QueueJobNotFoundError.md +43 -0
- package/data/packages/platform-queue/api/Class.QueueJobStateError.md +48 -0
- package/data/packages/platform-queue/api/Class.QueueValidationError.md +43 -0
- package/data/packages/platform-queue/api/Interface.IAzureQueueOptions.md +48 -0
- package/data/packages/platform-queue/api/Interface.IBullMqQueueOptions.md +45 -0
- package/data/packages/platform-queue/api/Interface.IMemoryQueueOptions.md +32 -0
- package/data/packages/platform-queue/api/Interface.IQueue.md +173 -0
- package/data/packages/platform-queue/api/Interface.IQueueJob.md +139 -0
- package/data/packages/platform-queue/api/TypeAlias.QueueJobStatus.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONNECTION_STRING.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_RECEIVE_WAIT_MS.md +21 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_PREFIX.md +18 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_REDIS_URL.md +21 -0
- package/data/packages/platform-queue/api/Variable.PLATFORM_QUEUE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_JOB_STATUS.md +30 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_MAX_JOBS.md +21 -0
- package/data/packages/platform-queue/api/index.md +49 -0
- package/data/packages/platform-queue/index.md +168 -0
- package/data/packages/platform-resources/api/Class.BlobResourceStrategy.md +195 -0
- package/data/packages/platform-resources/api/Class.EmbeddedResourceStrategy.md +215 -0
- package/data/packages/platform-resources/api/Class.FileResourceStrategy.md +190 -0
- package/data/packages/platform-resources/api/Class.ResourceManager.md +477 -0
- package/data/packages/platform-resources/api/Class.ResourceModule.md +46 -0
- package/data/packages/platform-resources/api/Class.ResourceNotFoundError.md +60 -0
- package/data/packages/platform-resources/api/Interface.IBlobResourceStrategyConfig.md +28 -0
- package/data/packages/platform-resources/api/Interface.IBlobServiceAdapter.md +40 -0
- package/data/packages/platform-resources/api/Interface.IFileResourceStrategyConfig.md +72 -0
- package/data/packages/platform-resources/api/Interface.IResourceManagerConfig.md +89 -0
- package/data/packages/platform-resources/api/Interface.IResourceMetadata.md +94 -0
- package/data/packages/platform-resources/api/Interface.IResourceResult.md +34 -0
- package/data/packages/platform-resources/api/Interface.IResourceStrategy.md +134 -0
- package/data/packages/platform-resources/api/index.md +29 -0
- package/data/packages/platform-resources/index.md +1 -1
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +21 -3
- package/data/packages/platform-telemetry/api/Class.TelemetryHealthIndicator.md +78 -0
- package/data/packages/platform-telemetry/api/index.md +1 -0
- package/data/packages/platform-telemetry/index.md +25 -1
- package/data/patterns/config-pattern.md +5 -3
- package/package.json +2 -2
- package/src/tools/registerGetConfigPatternTool.js +1 -1
- package/src/tools/registerGetDtoPatternTool.js +1 -1
- package/src/tools/registerGetErrorHandlingPatternTool.js +1 -1
- package/src/tools/registerGetGuardPatternTool.js +1 -1
- package/src/tools/registerGetMappingPatternTool.js +1 -1
- package/src/tools/registerGetModulePatternTool.js +1 -1
- package/src/tools/registerGetQueryPatternTool.js +1 -1
- package/src/tools/registerGetRepositoryPatternTool.js +1 -1
- package/src/tools/registerGetTestingPatternTool.js +1 -1
|
@@ -35,7 +35,7 @@ is inherently asynchronous. Use the `*Async` variants instead.
|
|
|
35
35
|
new RedisLayeredCache<TKey, TValue>(loadFn, options): RedisLayeredCache<TKey, TValue>;
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
38
|
+
Defined in: [redis/RedisLayeredCache.ts:108](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L108)
|
|
39
39
|
|
|
40
40
|
Initializes a new instance of the RedisLayeredCache class.
|
|
41
41
|
|
|
@@ -58,9 +58,9 @@ Initializes a new instance of the RedisLayeredCache class.
|
|
|
58
58
|
get(key): TValue | undefined;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
61
|
+
Defined in: [redis/RedisLayeredCache.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L125)
|
|
62
62
|
|
|
63
|
-
Not supported
|
|
63
|
+
Not supported - Redis is inherently asynchronous.
|
|
64
64
|
|
|
65
65
|
#### Parameters
|
|
66
66
|
|
|
@@ -88,7 +88,7 @@ Always throws. Use [getAsync](#getasync) instead.
|
|
|
88
88
|
getAsync(key): Promise<TValue | undefined>;
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
91
|
+
Defined in: [redis/RedisLayeredCache.ts:130](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L130)
|
|
92
92
|
|
|
93
93
|
Retrieves a value from the cache asynchronously.
|
|
94
94
|
|
|
@@ -116,9 +116,9 @@ A promise resolving to the cached value or `undefined` on a miss.
|
|
|
116
116
|
invalidate(key): void;
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
119
|
+
Defined in: [redis/RedisLayeredCache.ts:209](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L209)
|
|
120
120
|
|
|
121
|
-
Not supported
|
|
121
|
+
Not supported - Redis is inherently asynchronous.
|
|
122
122
|
|
|
123
123
|
#### Parameters
|
|
124
124
|
|
|
@@ -146,7 +146,7 @@ Always throws. Use [invalidateAsync](#invalidateasync) instead.
|
|
|
146
146
|
invalidateAsync(key): Promise<void>;
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
149
|
+
Defined in: [redis/RedisLayeredCache.ts:216](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L216)
|
|
150
150
|
|
|
151
151
|
Invalidates a key in the cache asynchronously.
|
|
152
152
|
|
|
@@ -172,7 +172,7 @@ Invalidates a key in the cache asynchronously.
|
|
|
172
172
|
onModuleDestroy(): Promise<void>;
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
175
|
+
Defined in: [redis/RedisLayeredCache.ts:237](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L237)
|
|
176
176
|
|
|
177
177
|
Gracefully disconnects the Redis client when the NestJS module is destroyed.
|
|
178
178
|
|
|
@@ -194,9 +194,9 @@ OnModuleDestroy.onModuleDestroy
|
|
|
194
194
|
set(key, value): void;
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
197
|
+
Defined in: [redis/RedisLayeredCache.ts:183](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L183)
|
|
198
198
|
|
|
199
|
-
Not supported
|
|
199
|
+
Not supported - Redis is inherently asynchronous.
|
|
200
200
|
|
|
201
201
|
#### Parameters
|
|
202
202
|
|
|
@@ -225,7 +225,7 @@ Always throws. Use [setAsync](#setasync) instead.
|
|
|
225
225
|
setAsync(key, value): Promise<void>;
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
228
|
+
Defined in: [redis/RedisLayeredCache.ts:188](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L188)
|
|
229
229
|
|
|
230
230
|
Stores a value in the cache asynchronously.
|
|
231
231
|
|
|
@@ -252,7 +252,7 @@ Stores a value in the cache asynchronously.
|
|
|
252
252
|
stats(): ICacheStats;
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
255
|
+
Defined in: [redis/RedisLayeredCache.ts:225](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L225)
|
|
256
256
|
|
|
257
257
|
Returns current cache statistics.
|
|
258
258
|
|
|
@@ -274,7 +274,7 @@ The cache statistics snapshot.
|
|
|
274
274
|
warm(key): Promise<TValue | undefined>;
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
277
|
+
Defined in: [redis/RedisLayeredCache.ts:200](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L200)
|
|
278
278
|
|
|
279
279
|
Proactively warms the cache for a given key.
|
|
280
280
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: ILayeredCache\<TKey, TValue\>
|
|
7
7
|
|
|
8
|
-
Defined in: [ILayeredCache.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L15)
|
|
8
|
+
Defined in: [interfaces/ILayeredCache.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L15)
|
|
9
9
|
|
|
10
10
|
Generic layered cache contract supporting synchronous and asynchronous
|
|
11
11
|
access patterns with optional warm-up and statistics.
|
|
@@ -25,7 +25,7 @@ access patterns with optional warm-up and statistics.
|
|
|
25
25
|
get(key): TValue | undefined;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [ILayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L25)
|
|
28
|
+
Defined in: [interfaces/ILayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L25)
|
|
29
29
|
|
|
30
30
|
Retrieves a value from the cache synchronously.
|
|
31
31
|
|
|
@@ -49,7 +49,7 @@ The cached value or `undefined` on a miss.
|
|
|
49
49
|
getAsync(key): Promise<TValue | undefined>;
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Defined in: [ILayeredCache.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L34)
|
|
52
|
+
Defined in: [interfaces/ILayeredCache.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L34)
|
|
53
53
|
|
|
54
54
|
Retrieves a value from the cache asynchronously.
|
|
55
55
|
|
|
@@ -73,7 +73,7 @@ A promise resolving to the cached value or `undefined` on a miss.
|
|
|
73
73
|
invalidate(key): void;
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Defined in: [ILayeredCache.ts:69](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L69)
|
|
76
|
+
Defined in: [interfaces/ILayeredCache.ts:69](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L69)
|
|
77
77
|
|
|
78
78
|
Invalidates a key in the cache synchronously.
|
|
79
79
|
|
|
@@ -95,7 +95,7 @@ Invalidates a key in the cache synchronously.
|
|
|
95
95
|
invalidateAsync(key): Promise<void>;
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Defined in: [ILayeredCache.ts:77](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L77)
|
|
98
|
+
Defined in: [interfaces/ILayeredCache.ts:77](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L77)
|
|
99
99
|
|
|
100
100
|
Invalidates a key in the cache asynchronously.
|
|
101
101
|
|
|
@@ -117,7 +117,7 @@ Invalidates a key in the cache asynchronously.
|
|
|
117
117
|
set(key, value): void;
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Defined in: [ILayeredCache.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L43)
|
|
120
|
+
Defined in: [interfaces/ILayeredCache.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L43)
|
|
121
121
|
|
|
122
122
|
Stores a value in the cache synchronously.
|
|
123
123
|
|
|
@@ -140,7 +140,7 @@ Stores a value in the cache synchronously.
|
|
|
140
140
|
setAsync(key, value): Promise<void>;
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
Defined in: [ILayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L52)
|
|
143
|
+
Defined in: [interfaces/ILayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L52)
|
|
144
144
|
|
|
145
145
|
Stores a value in the cache asynchronously.
|
|
146
146
|
|
|
@@ -163,7 +163,7 @@ Stores a value in the cache asynchronously.
|
|
|
163
163
|
optional stats(): ICacheStats;
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
Defined in: [ILayeredCache.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L85)
|
|
166
|
+
Defined in: [interfaces/ILayeredCache.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L85)
|
|
167
167
|
|
|
168
168
|
Returns current cache statistics.
|
|
169
169
|
|
|
@@ -181,7 +181,7 @@ The cache statistics snapshot.
|
|
|
181
181
|
optional warm(key): Promise<TValue | undefined>;
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Defined in: [ILayeredCache.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L61)
|
|
184
|
+
Defined in: [interfaces/ILayeredCache.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L61)
|
|
185
185
|
|
|
186
186
|
Proactively warms the cache for a given key.
|
|
187
187
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: ILayeredCacheOptions
|
|
7
7
|
|
|
8
|
-
Defined in: [MemoryLayeredCache.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L16)
|
|
8
|
+
Defined in: [memory/MemoryLayeredCache.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L16)
|
|
9
9
|
|
|
10
10
|
Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache).
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache).
|
|
|
17
17
|
optional cacheName?: string;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Defined in: [MemoryLayeredCache.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L57)
|
|
20
|
+
Defined in: [memory/MemoryLayeredCache.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L57)
|
|
21
21
|
|
|
22
22
|
An optional name / label for the cache instance, used in metrics.
|
|
23
23
|
Defaults to `'memory'`.
|
|
@@ -30,7 +30,7 @@ Defaults to `'memory'`.
|
|
|
30
30
|
optional maxEntries?: number;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [MemoryLayeredCache.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L41)
|
|
33
|
+
Defined in: [memory/MemoryLayeredCache.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L41)
|
|
34
34
|
|
|
35
35
|
Maximum number of entries retained in the cache. Oldest entries are
|
|
36
36
|
evicted first (LRU). Defaults to infinite.
|
|
@@ -43,7 +43,7 @@ evicted first (LRU). Defaults to infinite.
|
|
|
43
43
|
optional metricsRecorder?: ICacheMetricsRecorder;
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Defined in: [MemoryLayeredCache.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L49)
|
|
46
|
+
Defined in: [memory/MemoryLayeredCache.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L49)
|
|
47
47
|
|
|
48
48
|
Optional metrics recorder forwarded cache operation statistics.
|
|
49
49
|
Falls back to [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) when omitted.
|
|
@@ -56,7 +56,7 @@ Falls back to [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) when om
|
|
|
56
56
|
optional staleWhileRevalidate?: boolean;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Defined in: [MemoryLayeredCache.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L33)
|
|
59
|
+
Defined in: [memory/MemoryLayeredCache.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L33)
|
|
60
60
|
|
|
61
61
|
When `true`, expired entries are served immediately while a background
|
|
62
62
|
refresh is triggered. Defaults to `false`.
|
|
@@ -69,7 +69,7 @@ refresh is triggered. Defaults to `false`.
|
|
|
69
69
|
optional ttlMs?: number;
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Defined in: [MemoryLayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L25)
|
|
72
|
+
Defined in: [memory/MemoryLayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L25)
|
|
73
73
|
|
|
74
74
|
Time to live in milliseconds. Entries older than this are considered expired.
|
|
75
75
|
Defaults to infinite (no expiration).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_DEFAULT\_TTL\_MS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_DEFAULT\_TTL\_MS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_DEFAULT_TTL_MS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L12)
|
|
13
|
+
|
|
14
|
+
Default cache TTL in milliseconds applied when no provider-specific TTL is configured.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_MAX\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_MAX\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_MAX_ENTRIES: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L15)
|
|
13
|
+
|
|
14
|
+
Maximum number of entries retained in an in-memory cache (LRU limit).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_STALE\_WHILE\_REVALIDATE'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_STALE\_WHILE\_REVALIDATE
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_STALE_WHILE_REVALIDATE: IConfigKey<boolean>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L18)
|
|
13
|
+
|
|
14
|
+
Whether expired entries are served while a background refresh is in progress.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: PLATFORM\_CACHING\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: PLATFORM\_CACHING\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const PLATFORM_CACHING_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L25)
|
|
13
|
+
|
|
14
|
+
All configuration entries required by `platform-caching`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L25)
|
|
13
|
+
|
|
14
|
+
Configuration entries required by the Redis caching provider.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_KEY\_PREFIX'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_KEY\_PREFIX
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_KEY_PREFIX: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L15)
|
|
13
|
+
|
|
14
|
+
Key prefix applied to all Redis keys managed by the cache instance.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_TTL\_SECONDS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_TTL\_SECONDS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_TTL_SECONDS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L18)
|
|
13
|
+
|
|
14
|
+
TTL in seconds applied to every stored Redis entry.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_URL'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_URL
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_URL: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L12)
|
|
13
|
+
|
|
14
|
+
Redis connection URL (e.g. `redis://localhost:6379`).
|
|
@@ -22,3 +22,16 @@ editUrl: false
|
|
|
22
22
|
| [ILayeredCache](Interface.ILayeredCache) | Generic layered cache contract supporting synchronous and asynchronous access patterns with optional warm-up and statistics. |
|
|
23
23
|
| [ILayeredCacheOptions](Interface.ILayeredCacheOptions) | Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache). |
|
|
24
24
|
| [IRedisLayeredCacheOptions](Interface.IRedisLayeredCacheOptions) | Configuration options for [RedisLayeredCache](Class.RedisLayeredCache). |
|
|
25
|
+
|
|
26
|
+
## Variables
|
|
27
|
+
|
|
28
|
+
| Variable | Description |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| [CACHE\_DEFAULT\_TTL\_MS](Variable.CACHE_DEFAULT_TTL_MS) | Default cache TTL in milliseconds applied when no provider-specific TTL is configured. |
|
|
31
|
+
| [CACHE\_MAX\_ENTRIES](Variable.CACHE_MAX_ENTRIES) | Maximum number of entries retained in an in-memory cache (LRU limit). |
|
|
32
|
+
| [CACHE\_STALE\_WHILE\_REVALIDATE](Variable.CACHE_STALE_WHILE_REVALIDATE) | Whether expired entries are served while a background refresh is in progress. |
|
|
33
|
+
| [PLATFORM\_CACHING\_CONFIG\_ENTRIES](Variable.PLATFORM_CACHING_CONFIG_ENTRIES) | All configuration entries required by `platform-caching`. |
|
|
34
|
+
| [REDIS\_CONFIG\_ENTRIES](Variable.REDIS_CONFIG_ENTRIES) | Configuration entries required by the Redis caching provider. |
|
|
35
|
+
| [REDIS\_KEY\_PREFIX](Variable.REDIS_KEY_PREFIX) | Key prefix applied to all Redis keys managed by the cache instance. |
|
|
36
|
+
| [REDIS\_TTL\_SECONDS](Variable.REDIS_TTL_SECONDS) | TTL in seconds applied to every stored Redis entry. |
|
|
37
|
+
| [REDIS\_URL](Variable.REDIS_URL) | Redis connection URL (e.g. `redis://localhost:6379`). |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: platform-caching
|
|
3
3
|
description: Layered caching with in-memory LRU and Redis-backed implementations, TTL, stale-while-revalidate, and metrics.
|
|
4
4
|
order: 15
|
|
5
|
-
tags: [caching, lru, redis, ttl, stale-while-revalidate, metrics]
|
|
5
|
+
tags: [caching, lru, redis, ttl, stale-while-revalidate, metrics, health]
|
|
6
6
|
package: '@breadstone/archipel-platform-caching'
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -84,6 +84,29 @@ Both implementations share this contract:
|
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
+
## Environment Variables
|
|
88
|
+
|
|
89
|
+
### Core (optional)
|
|
90
|
+
|
|
91
|
+
| Variable | Description | Default | Required |
|
|
92
|
+
| ------------------------------ | ------------------------------------------------------------ | ------- | -------- |
|
|
93
|
+
| `CACHE_DEFAULT_TTL_MS` | Default cache TTL in milliseconds | — | No |
|
|
94
|
+
| `CACHE_MAX_ENTRIES` | Maximum number of entries retained in an in-memory cache | — | No |
|
|
95
|
+
| `CACHE_STALE_WHILE_REVALIDATE` | Whether expired entries are served during background refresh | `false` | No |
|
|
96
|
+
|
|
97
|
+
### Redis
|
|
98
|
+
|
|
99
|
+
**Subpath:** `@breadstone/archipel-platform-caching/redis`
|
|
100
|
+
**SDK:** `ioredis` ≥ 5.0.0
|
|
101
|
+
|
|
102
|
+
| Variable | Description | Default | Required |
|
|
103
|
+
| ------------------- | ----------------------------------- | ------- | -------- |
|
|
104
|
+
| `REDIS_URL` | Redis connection URL | — | Yes |
|
|
105
|
+
| `REDIS_KEY_PREFIX` | Key prefix for all Redis cache keys | `''` | No |
|
|
106
|
+
| `REDIS_TTL_SECONDS` | TTL in seconds for Redis entries | — | No |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
87
110
|
## Metrics
|
|
88
111
|
|
|
89
112
|
Implement `ICacheMetricsRecorder` to forward cache statistics to your telemetry system:
|
|
@@ -114,6 +137,29 @@ When no recorder is provided, `NoopCacheMetricsRecorder` is used as a silent fal
|
|
|
114
137
|
|
|
115
138
|
---
|
|
116
139
|
|
|
140
|
+
## Health Check
|
|
141
|
+
|
|
142
|
+
The `CachingHealthIndicator` reports the caching subsystem as available. Import it from the `/health` subpath:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
import { CachingHealthIndicator } from '@breadstone/archipel-platform-caching/health';
|
|
146
|
+
import { HealthModule } from '@breadstone/archipel-platform-health';
|
|
147
|
+
|
|
148
|
+
@Module({
|
|
149
|
+
imports: [
|
|
150
|
+
CachingModule,
|
|
151
|
+
HealthModule.withIndicators([CachingHealthIndicator]),
|
|
152
|
+
],
|
|
153
|
+
})
|
|
154
|
+
export class AppModule {}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Key | Check | Dependencies |
|
|
158
|
+
| --- | ----- | ------------ |
|
|
159
|
+
| `caching` | Always reports `up` | None |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
117
163
|
## API Reference
|
|
118
164
|
|
|
119
165
|
See the full [API documentation](./api/) for all exported types and classes.
|
|
@@ -55,4 +55,4 @@ const enabled = configService.get(FEATURE_X_ENABLED); // typed as boolean
|
|
|
55
55
|
|
|
56
56
|
At runtime the returned object is minimal (just `{ key: string }`) so there is
|
|
57
57
|
virtually no overhead. The generic `TType` is only used by TypeScript for stronger
|
|
58
|
-
compile-time checking
|
|
58
|
+
compile-time checking - enabling you to avoid magic strings and untyped fetches.
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: HttpLoggerMiddleware
|
|
7
7
|
|
|
8
|
-
Defined in: [middlewares/HttpLoggerMiddleware.ts:
|
|
8
|
+
Defined in: [middlewares/HttpLoggerMiddleware.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/middlewares/HttpLoggerMiddleware.ts#L12)
|
|
9
9
|
|
|
10
10
|
## Implements
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ Defined in: [middlewares/HttpLoggerMiddleware.ts:50](https://github.com/RueDeRen
|
|
|
19
19
|
new HttpLoggerMiddleware(): HttpLoggerMiddleware;
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Defined in: [middlewares/HttpLoggerMiddleware.ts:
|
|
22
|
+
Defined in: [middlewares/HttpLoggerMiddleware.ts:26](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/middlewares/HttpLoggerMiddleware.ts#L26)
|
|
23
23
|
|
|
24
24
|
Constructs a new instance of the `HttpLoggerMiddleware` class.
|
|
25
25
|
|
|
@@ -38,7 +38,7 @@ use(
|
|
|
38
38
|
next): void;
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Defined in: [middlewares/HttpLoggerMiddleware.ts:
|
|
41
|
+
Defined in: [middlewares/HttpLoggerMiddleware.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/middlewares/HttpLoggerMiddleware.ts#L32)
|
|
42
42
|
|
|
43
43
|
#### Parameters
|
|
44
44
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Function: maskSensitive()'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Function: maskSensitive()
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
function maskSensitive(value): string;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [utils/MaskSensitiveUtils.ts:67](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/utils/MaskSensitiveUtils.ts#L67)
|
|
13
|
+
|
|
14
|
+
Serializes a value to a JSON string with sensitive keys masked.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type | Description |
|
|
19
|
+
| ------ | ------ | ------ |
|
|
20
|
+
| `value` | `unknown` | Arbitrary value to sanitize and serialize. |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`string`
|
|
25
|
+
|
|
26
|
+
A JSON string safe for logging.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Function: maskSensitiveFields()'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Function: maskSensitiveFields()
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
function maskSensitiveFields(value): unknown;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [utils/MaskSensitiveUtils.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/utils/MaskSensitiveUtils.ts#L35)
|
|
13
|
+
|
|
14
|
+
Recursively masks values of sensitive keys in a plain object for safe logging.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type | Description |
|
|
19
|
+
| ------ | ------ | ------ |
|
|
20
|
+
| `value` | `unknown` | Arbitrary value to sanitize (objects, arrays, primitives). |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`unknown`
|
|
25
|
+
|
|
26
|
+
A new value with sensitive fields replaced by `'***'`.
|
|
@@ -97,4 +97,6 @@ editUrl: false
|
|
|
97
97
|
| [createEventKey](Function.createEventKey) | Creates a branded event key for the [EventHub](Class.EventHub). |
|
|
98
98
|
| [env](Function.env) | Marker function for environment strings. |
|
|
99
99
|
| [getMimeTypeByFileNameOrExtension](Function.getMimeTypeByFileNameOrExtension) | Get MIME type by file name or extension. |
|
|
100
|
+
| [maskSensitive](Function.maskSensitive) | Serializes a value to a JSON string with sensitive keys masked. |
|
|
101
|
+
| [maskSensitiveFields](Function.maskSensitiveFields) | Recursively masks values of sensitive keys in a plain object for safe logging. |
|
|
100
102
|
| [Public](Function.Public) | The `Public` decorator. |
|
|
@@ -466,6 +466,14 @@ export class OrderService {
|
|
|
466
466
|
| `UserAvatarGeneratorService` | Generate deterministic avatars from user identifiers |
|
|
467
467
|
| `UsernameGeneratorService` | Generate random usernames from word lists |
|
|
468
468
|
| `SseHub` | Server-Sent Events hub — bounded to 10,000 event subjects |
|
|
469
|
+
| `maskSensitiveFields()` | Recursively masks sensitive keys (password, token, apikey, etc.) in objects for safe logging |
|
|
470
|
+
| `maskSensitive()` | Serializes a value to JSON with sensitive keys masked |
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## HTTP Logger Middleware
|
|
475
|
+
|
|
476
|
+
The `HttpLoggerMiddleware` logs incoming requests with automatic masking of sensitive data in query parameters, route params, and request bodies. Sensitive fields (passwords, tokens, API keys, emails, etc.) are replaced with `'***'` before logging.
|
|
469
477
|
|
|
470
478
|
---
|
|
471
479
|
|
|
@@ -489,3 +497,6 @@ export class OrderService {
|
|
|
489
497
|
| `ContentTemplateEngine` | Service | Template compilation |
|
|
490
498
|
| `MemoryLayeredCache` | Class | In-memory LRU cache |
|
|
491
499
|
| `RedisLayeredCache` | Class | Redis-backed cache |
|
|
500
|
+
| `maskSensitiveFields()` | Utility | Recursively masks sensitive keys in objects for safe logging |
|
|
501
|
+
| `maskSensitive()` | Utility | JSON-serializes values with sensitive keys masked |
|
|
502
|
+
| `HttpLoggerMiddleware` | Middleware | Request logging with automatic sensitive data masking |
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: DatabaseHealthIndicator
|
|
7
7
|
|
|
8
|
-
Defined in:
|
|
8
|
+
Defined in: health/DatabaseHealthIndicator.ts:16
|
|
9
9
|
|
|
10
10
|
Health indicator for database connectivity.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Health indicator for database connectivity.
|
|
|
21
21
|
new DatabaseHealthIndicator(prismaHealthIndicator, databaseService): DatabaseHealthIndicator;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in:
|
|
24
|
+
Defined in: health/DatabaseHealthIndicator.ts:26
|
|
25
25
|
|
|
26
26
|
#### Parameters
|
|
27
27
|
|
|
@@ -39,10 +39,10 @@ Defined in: [terminus/DatabaseHealthIndicator.ts:26](https://github.com/RueDeRen
|
|
|
39
39
|
### key
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
|
-
readonly key:
|
|
42
|
+
readonly key: string = 'database';
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in:
|
|
45
|
+
Defined in: health/DatabaseHealthIndicator.ts:35
|
|
46
46
|
|
|
47
47
|
Unique key identifying the indicator
|
|
48
48
|
|
|
@@ -60,14 +60,16 @@ IHealthIndicator.key
|
|
|
60
60
|
check(): Promise<HealthIndicatorResult<"database">>;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in:
|
|
63
|
+
Defined in: health/DatabaseHealthIndicator.ts:47
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Checks database connectivity via a Prisma ping.
|
|
66
66
|
|
|
67
67
|
#### Returns
|
|
68
68
|
|
|
69
69
|
`Promise`\<`HealthIndicatorResult`\<`"database"`\>\>
|
|
70
70
|
|
|
71
|
+
The health indicator result.
|
|
72
|
+
|
|
71
73
|
#### Implementation of
|
|
72
74
|
|
|
73
75
|
```ts
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: DatabaseModule
|
|
7
7
|
|
|
8
|
-
Defined in: [DatabaseModule.ts:
|
|
8
|
+
Defined in: [DatabaseModule.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/DatabaseModule.ts#L53)
|
|
9
9
|
|
|
10
10
|
## Constructors
|
|
11
11
|
|
|
@@ -27,7 +27,7 @@ new DatabaseModule(): DatabaseModule;
|
|
|
27
27
|
static forRoot(config?): DynamicModule;
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Defined in: [DatabaseModule.ts:
|
|
30
|
+
Defined in: [DatabaseModule.ts:62](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/DatabaseModule.ts#L62)
|
|
31
31
|
|
|
32
32
|
Registers the `DatabaseModule` with global middlewares.
|
|
33
33
|
|
|
@@ -51,7 +51,7 @@ A `DynamicModule` that can be imported globally
|
|
|
51
51
|
static register(config?): DynamicModule;
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Defined in: [DatabaseModule.ts:
|
|
54
|
+
Defined in: [DatabaseModule.ts:82](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-database/src/DatabaseModule.ts#L82)
|
|
55
55
|
|
|
56
56
|
Registers the `DatabaseModule` with dynamic middlewares.
|
|
57
57
|
|