@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
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: FileResourceStrategy'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: FileResourceStrategy
|
|
7
|
+
|
|
8
|
+
Defined in: [strategies/FileResourceStrategy.ts:56](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L56)
|
|
9
|
+
|
|
10
|
+
Strategy for loading resources from the local file system.
|
|
11
|
+
|
|
12
|
+
## Implements
|
|
13
|
+
|
|
14
|
+
- [`IResourceStrategy`](Interface.IResourceStrategy)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new FileResourceStrategy(config): FileResourceStrategy;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [strategies/FileResourceStrategy.ts:66](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L66)
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
| Parameter | Type |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| `config` | [`IFileResourceStrategyConfig`](Interface.IFileResourceStrategyConfig) |
|
|
31
|
+
|
|
32
|
+
#### Returns
|
|
33
|
+
|
|
34
|
+
`FileResourceStrategy`
|
|
35
|
+
|
|
36
|
+
## Accessors
|
|
37
|
+
|
|
38
|
+
### name
|
|
39
|
+
|
|
40
|
+
#### Get Signature
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
get name(): string;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Defined in: [strategies/FileResourceStrategy.ts:78](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L78)
|
|
47
|
+
|
|
48
|
+
The unique name of this strategy.
|
|
49
|
+
|
|
50
|
+
##### Returns
|
|
51
|
+
|
|
52
|
+
`string`
|
|
53
|
+
|
|
54
|
+
The unique name of this strategy.
|
|
55
|
+
|
|
56
|
+
#### Implementation of
|
|
57
|
+
|
|
58
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`name`](Interface.IResourceStrategy#name)
|
|
59
|
+
|
|
60
|
+
## Methods
|
|
61
|
+
|
|
62
|
+
### exists()
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
exists(key): boolean;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Defined in: [strategies/FileResourceStrategy.ts:117](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L117)
|
|
69
|
+
|
|
70
|
+
Checks if a resource exists without loading it.
|
|
71
|
+
|
|
72
|
+
#### Parameters
|
|
73
|
+
|
|
74
|
+
| Parameter | Type | Description |
|
|
75
|
+
| ------ | ------ | ------ |
|
|
76
|
+
| `key` | `string` | The resource key/identifier |
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`boolean`
|
|
81
|
+
|
|
82
|
+
True if the resource exists
|
|
83
|
+
|
|
84
|
+
#### Implementation of
|
|
85
|
+
|
|
86
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`exists`](Interface.IResourceStrategy#exists)
|
|
87
|
+
|
|
88
|
+
***
|
|
89
|
+
|
|
90
|
+
### existsAsync()
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
existsAsync(key): Promise<boolean>;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Defined in: [strategies/FileResourceStrategy.ts:121](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L121)
|
|
97
|
+
|
|
98
|
+
Checks if a resource exists without loading it (asynchronous).
|
|
99
|
+
|
|
100
|
+
#### Parameters
|
|
101
|
+
|
|
102
|
+
| Parameter | Type | Description |
|
|
103
|
+
| ------ | ------ | ------ |
|
|
104
|
+
| `key` | `string` | The resource key/identifier |
|
|
105
|
+
|
|
106
|
+
#### Returns
|
|
107
|
+
|
|
108
|
+
`Promise`\<`boolean`\>
|
|
109
|
+
|
|
110
|
+
Promise resolving to true if the resource exists
|
|
111
|
+
|
|
112
|
+
#### Implementation of
|
|
113
|
+
|
|
114
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`existsAsync`](Interface.IResourceStrategy#existsasync)
|
|
115
|
+
|
|
116
|
+
***
|
|
117
|
+
|
|
118
|
+
### load()
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
load(key): IResourceResult | undefined;
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Defined in: [strategies/FileResourceStrategy.ts:86](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L86)
|
|
125
|
+
|
|
126
|
+
Loads a resource by its key.
|
|
127
|
+
|
|
128
|
+
#### Parameters
|
|
129
|
+
|
|
130
|
+
| Parameter | Type | Description |
|
|
131
|
+
| ------ | ------ | ------ |
|
|
132
|
+
| `key` | `string` | The resource key/identifier |
|
|
133
|
+
|
|
134
|
+
#### Returns
|
|
135
|
+
|
|
136
|
+
[`IResourceResult`](Interface.IResourceResult) \| `undefined`
|
|
137
|
+
|
|
138
|
+
The resource result or undefined if not found
|
|
139
|
+
|
|
140
|
+
#### Implementation of
|
|
141
|
+
|
|
142
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`load`](Interface.IResourceStrategy#load)
|
|
143
|
+
|
|
144
|
+
***
|
|
145
|
+
|
|
146
|
+
### loadAsync()
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
loadAsync(key): Promise<IResourceResult | undefined>;
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Defined in: [strategies/FileResourceStrategy.ts:113](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L113)
|
|
153
|
+
|
|
154
|
+
Loads a resource by its key (asynchronous).
|
|
155
|
+
|
|
156
|
+
#### Parameters
|
|
157
|
+
|
|
158
|
+
| Parameter | Type | Description |
|
|
159
|
+
| ------ | ------ | ------ |
|
|
160
|
+
| `key` | `string` | The resource key/identifier |
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
`Promise`\<[`IResourceResult`](Interface.IResourceResult) \| `undefined`\>
|
|
165
|
+
|
|
166
|
+
Promise resolving to the resource result or undefined if not found
|
|
167
|
+
|
|
168
|
+
#### Implementation of
|
|
169
|
+
|
|
170
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`loadAsync`](Interface.IResourceStrategy#loadasync)
|
|
171
|
+
|
|
172
|
+
***
|
|
173
|
+
|
|
174
|
+
### whatDoIHave()
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
whatDoIHave(): void;
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Defined in: [strategies/FileResourceStrategy.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/FileResourceStrategy.ts#L125)
|
|
181
|
+
|
|
182
|
+
List all files and folders in the base paths for debugging purposes.
|
|
183
|
+
|
|
184
|
+
#### Returns
|
|
185
|
+
|
|
186
|
+
`void`
|
|
187
|
+
|
|
188
|
+
#### Implementation of
|
|
189
|
+
|
|
190
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`whatDoIHave`](Interface.IResourceStrategy#whatdoihave)
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: ResourceManager'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: ResourceManager
|
|
7
|
+
|
|
8
|
+
Defined in: [ResourceManager.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L74)
|
|
9
|
+
|
|
10
|
+
Central manager for loading resources from various sources.
|
|
11
|
+
Supports multiple strategies (file, blob, embedded) with caching.
|
|
12
|
+
|
|
13
|
+
## Implements
|
|
14
|
+
|
|
15
|
+
- `IResourceManager`
|
|
16
|
+
|
|
17
|
+
## Constructors
|
|
18
|
+
|
|
19
|
+
### Constructor
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
new ResourceManager(config): ResourceManager;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Defined in: [ResourceManager.ts:92](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L92)
|
|
26
|
+
|
|
27
|
+
Constructs a new instance of the `ResourceManager` class.
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| ------ | ------ |
|
|
33
|
+
| `config` | [`IResourceManagerConfig`](Interface.IResourceManagerConfig) |
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`ResourceManager`
|
|
38
|
+
|
|
39
|
+
## Methods
|
|
40
|
+
|
|
41
|
+
### exists()
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
exists(key): boolean;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Defined in: [ResourceManager.ts:246](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L246)
|
|
48
|
+
|
|
49
|
+
#### Parameters
|
|
50
|
+
|
|
51
|
+
| Parameter | Type |
|
|
52
|
+
| ------ | ------ |
|
|
53
|
+
| `key` | `string` |
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`boolean`
|
|
58
|
+
|
|
59
|
+
#### Implementation of
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
IResourceManager.exists
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### existsAsync()
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
existsAsync(key): Promise<boolean>;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Defined in: [ResourceManager.ts:255](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L255)
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type |
|
|
78
|
+
| ------ | ------ |
|
|
79
|
+
| `key` | `string` |
|
|
80
|
+
|
|
81
|
+
#### Returns
|
|
82
|
+
|
|
83
|
+
`Promise`\<`boolean`\>
|
|
84
|
+
|
|
85
|
+
#### Implementation of
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
IResourceManager.existsAsync
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### invalidate()
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
invalidate(key): void;
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Defined in: [ResourceManager.ts:264](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L264)
|
|
100
|
+
|
|
101
|
+
#### Parameters
|
|
102
|
+
|
|
103
|
+
| Parameter | Type |
|
|
104
|
+
| ------ | ------ |
|
|
105
|
+
| `key` | `string` |
|
|
106
|
+
|
|
107
|
+
#### Returns
|
|
108
|
+
|
|
109
|
+
`void`
|
|
110
|
+
|
|
111
|
+
#### Implementation of
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
IResourceManager.invalidate
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
***
|
|
118
|
+
|
|
119
|
+
### invalidateAsync()
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
invalidateAsync(key): Promise<void>;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Defined in: [ResourceManager.ts:271](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L271)
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
| Parameter | Type |
|
|
130
|
+
| ------ | ------ |
|
|
131
|
+
| `key` | `string` |
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`Promise`\<`void`\>
|
|
136
|
+
|
|
137
|
+
#### Implementation of
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
IResourceManager.invalidateAsync
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### load()
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
load(key): IResourceResult;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Defined in: [ResourceManager.ts:107](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L107)
|
|
152
|
+
|
|
153
|
+
#### Parameters
|
|
154
|
+
|
|
155
|
+
| Parameter | Type |
|
|
156
|
+
| ------ | ------ |
|
|
157
|
+
| `key` | `string` |
|
|
158
|
+
|
|
159
|
+
#### Returns
|
|
160
|
+
|
|
161
|
+
[`IResourceResult`](Interface.IResourceResult)
|
|
162
|
+
|
|
163
|
+
#### Implementation of
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
IResourceManager.load
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
***
|
|
170
|
+
|
|
171
|
+
### loadAsBuffer()
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
loadAsBuffer(key): Buffer;
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Defined in: [ResourceManager.ts:220](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L220)
|
|
178
|
+
|
|
179
|
+
#### Parameters
|
|
180
|
+
|
|
181
|
+
| Parameter | Type |
|
|
182
|
+
| ------ | ------ |
|
|
183
|
+
| `key` | `string` |
|
|
184
|
+
|
|
185
|
+
#### Returns
|
|
186
|
+
|
|
187
|
+
`Buffer`
|
|
188
|
+
|
|
189
|
+
#### Implementation of
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
IResourceManager.loadAsBuffer
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
***
|
|
196
|
+
|
|
197
|
+
### loadAsBufferAsync()
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
loadAsBufferAsync(key): Promise<Buffer<ArrayBufferLike>>;
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Defined in: [ResourceManager.ts:233](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L233)
|
|
204
|
+
|
|
205
|
+
#### Parameters
|
|
206
|
+
|
|
207
|
+
| Parameter | Type |
|
|
208
|
+
| ------ | ------ |
|
|
209
|
+
| `key` | `string` |
|
|
210
|
+
|
|
211
|
+
#### Returns
|
|
212
|
+
|
|
213
|
+
`Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
|
|
214
|
+
|
|
215
|
+
#### Implementation of
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
IResourceManager.loadAsBufferAsync
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
***
|
|
222
|
+
|
|
223
|
+
### loadAsString()
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
loadAsString(key, encoding?): string;
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Defined in: [ResourceManager.ts:185](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L185)
|
|
230
|
+
|
|
231
|
+
#### Parameters
|
|
232
|
+
|
|
233
|
+
| Parameter | Type | Default value |
|
|
234
|
+
| ------ | ------ | ------ |
|
|
235
|
+
| `key` | `string` | `undefined` |
|
|
236
|
+
| `encoding` | `BufferEncoding` | `'utf-8'` |
|
|
237
|
+
|
|
238
|
+
#### Returns
|
|
239
|
+
|
|
240
|
+
`string`
|
|
241
|
+
|
|
242
|
+
#### Implementation of
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
IResourceManager.loadAsString
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
***
|
|
249
|
+
|
|
250
|
+
### loadAsStringAsync()
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
loadAsStringAsync(key, encoding?): Promise<string>;
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Defined in: [ResourceManager.ts:201](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L201)
|
|
257
|
+
|
|
258
|
+
#### Parameters
|
|
259
|
+
|
|
260
|
+
| Parameter | Type | Default value |
|
|
261
|
+
| ------ | ------ | ------ |
|
|
262
|
+
| `key` | `string` | `undefined` |
|
|
263
|
+
| `encoding` | `BufferEncoding` | `'utf-8'` |
|
|
264
|
+
|
|
265
|
+
#### Returns
|
|
266
|
+
|
|
267
|
+
`Promise`\<`string`\>
|
|
268
|
+
|
|
269
|
+
#### Implementation of
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
IResourceManager.loadAsStringAsync
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
***
|
|
276
|
+
|
|
277
|
+
### loadAsync()
|
|
278
|
+
|
|
279
|
+
```ts
|
|
280
|
+
loadAsync(key): Promise<IResourceResult>;
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Defined in: [ResourceManager.ts:138](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L138)
|
|
284
|
+
|
|
285
|
+
#### Parameters
|
|
286
|
+
|
|
287
|
+
| Parameter | Type |
|
|
288
|
+
| ------ | ------ |
|
|
289
|
+
| `key` | `string` |
|
|
290
|
+
|
|
291
|
+
#### Returns
|
|
292
|
+
|
|
293
|
+
`Promise`\<[`IResourceResult`](Interface.IResourceResult)\>
|
|
294
|
+
|
|
295
|
+
#### Implementation of
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
IResourceManager.loadAsync
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
***
|
|
302
|
+
|
|
303
|
+
### tryLoad()
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
tryLoad(key): IResourceResult | undefined;
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Defined in: [ResourceManager.ts:115](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L115)
|
|
310
|
+
|
|
311
|
+
#### Parameters
|
|
312
|
+
|
|
313
|
+
| Parameter | Type |
|
|
314
|
+
| ------ | ------ |
|
|
315
|
+
| `key` | `string` |
|
|
316
|
+
|
|
317
|
+
#### Returns
|
|
318
|
+
|
|
319
|
+
[`IResourceResult`](Interface.IResourceResult) \| `undefined`
|
|
320
|
+
|
|
321
|
+
#### Implementation of
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
IResourceManager.tryLoad
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
***
|
|
328
|
+
|
|
329
|
+
### tryLoadAsBuffer()
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
tryLoadAsBuffer(key): Buffer<ArrayBufferLike> | undefined;
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Defined in: [ResourceManager.ts:228](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L228)
|
|
336
|
+
|
|
337
|
+
#### Parameters
|
|
338
|
+
|
|
339
|
+
| Parameter | Type |
|
|
340
|
+
| ------ | ------ |
|
|
341
|
+
| `key` | `string` |
|
|
342
|
+
|
|
343
|
+
#### Returns
|
|
344
|
+
|
|
345
|
+
`Buffer`\<`ArrayBufferLike`\> \| `undefined`
|
|
346
|
+
|
|
347
|
+
#### Implementation of
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
IResourceManager.tryLoadAsBuffer
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
***
|
|
354
|
+
|
|
355
|
+
### tryLoadAsBufferAsync()
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
tryLoadAsBufferAsync(key): Promise<Buffer<ArrayBufferLike> | undefined>;
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Defined in: [ResourceManager.ts:241](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L241)
|
|
362
|
+
|
|
363
|
+
#### Parameters
|
|
364
|
+
|
|
365
|
+
| Parameter | Type |
|
|
366
|
+
| ------ | ------ |
|
|
367
|
+
| `key` | `string` |
|
|
368
|
+
|
|
369
|
+
#### Returns
|
|
370
|
+
|
|
371
|
+
`Promise`\<`Buffer`\<`ArrayBufferLike`\> \| `undefined`\>
|
|
372
|
+
|
|
373
|
+
#### Implementation of
|
|
374
|
+
|
|
375
|
+
```ts
|
|
376
|
+
IResourceManager.tryLoadAsBufferAsync
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
***
|
|
380
|
+
|
|
381
|
+
### tryLoadAsString()
|
|
382
|
+
|
|
383
|
+
```ts
|
|
384
|
+
tryLoadAsString(key, encoding?): string | undefined;
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Defined in: [ResourceManager.ts:193](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L193)
|
|
388
|
+
|
|
389
|
+
#### Parameters
|
|
390
|
+
|
|
391
|
+
| Parameter | Type | Default value |
|
|
392
|
+
| ------ | ------ | ------ |
|
|
393
|
+
| `key` | `string` | `undefined` |
|
|
394
|
+
| `encoding` | `BufferEncoding` | `'utf-8'` |
|
|
395
|
+
|
|
396
|
+
#### Returns
|
|
397
|
+
|
|
398
|
+
`string` \| `undefined`
|
|
399
|
+
|
|
400
|
+
#### Implementation of
|
|
401
|
+
|
|
402
|
+
```ts
|
|
403
|
+
IResourceManager.tryLoadAsString
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
***
|
|
407
|
+
|
|
408
|
+
### tryLoadAsStringAsync()
|
|
409
|
+
|
|
410
|
+
```ts
|
|
411
|
+
tryLoadAsStringAsync(key, encoding?): Promise<string | undefined>;
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
Defined in: [ResourceManager.ts:209](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L209)
|
|
415
|
+
|
|
416
|
+
#### Parameters
|
|
417
|
+
|
|
418
|
+
| Parameter | Type | Default value |
|
|
419
|
+
| ------ | ------ | ------ |
|
|
420
|
+
| `key` | `string` | `undefined` |
|
|
421
|
+
| `encoding` | `BufferEncoding` | `'utf-8'` |
|
|
422
|
+
|
|
423
|
+
#### Returns
|
|
424
|
+
|
|
425
|
+
`Promise`\<`string` \| `undefined`\>
|
|
426
|
+
|
|
427
|
+
#### Implementation of
|
|
428
|
+
|
|
429
|
+
```ts
|
|
430
|
+
IResourceManager.tryLoadAsStringAsync
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
***
|
|
434
|
+
|
|
435
|
+
### tryLoadAsync()
|
|
436
|
+
|
|
437
|
+
```ts
|
|
438
|
+
tryLoadAsync(key): Promise<IResourceResult | undefined>;
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Defined in: [ResourceManager.ts:146](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L146)
|
|
442
|
+
|
|
443
|
+
#### Parameters
|
|
444
|
+
|
|
445
|
+
| Parameter | Type |
|
|
446
|
+
| ------ | ------ |
|
|
447
|
+
| `key` | `string` |
|
|
448
|
+
|
|
449
|
+
#### Returns
|
|
450
|
+
|
|
451
|
+
`Promise`\<[`IResourceResult`](Interface.IResourceResult) \| `undefined`\>
|
|
452
|
+
|
|
453
|
+
#### Implementation of
|
|
454
|
+
|
|
455
|
+
```ts
|
|
456
|
+
IResourceManager.tryLoadAsync
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
***
|
|
460
|
+
|
|
461
|
+
### whatDoIHave()
|
|
462
|
+
|
|
463
|
+
```ts
|
|
464
|
+
whatDoIHave(): void;
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Defined in: [ResourceManager.ts:278](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceManager.ts#L278)
|
|
468
|
+
|
|
469
|
+
#### Returns
|
|
470
|
+
|
|
471
|
+
`void`
|
|
472
|
+
|
|
473
|
+
#### Implementation of
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
IResourceManager.whatDoIHave
|
|
477
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: ResourceModule'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: ResourceModule
|
|
7
|
+
|
|
8
|
+
Defined in: [ResourceModule.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceModule.ts#L15)
|
|
9
|
+
|
|
10
|
+
Module providing the ResourceManager.
|
|
11
|
+
|
|
12
|
+
## Constructors
|
|
13
|
+
|
|
14
|
+
### Constructor
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
new ResourceModule(): ResourceModule;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Returns
|
|
21
|
+
|
|
22
|
+
`ResourceModule`
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
### forRoot()
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
static forRoot(config): DynamicModule;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Defined in: [ResourceModule.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/ResourceModule.ts#L25)
|
|
33
|
+
|
|
34
|
+
Registers the ResourceManager with the provided configuration.
|
|
35
|
+
|
|
36
|
+
#### Parameters
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| ------ | ------ | ------ |
|
|
40
|
+
| `config` | [`IResourceManagerConfig`](Interface.IResourceManagerConfig) | The resource manager configuration |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`DynamicModule`
|
|
45
|
+
|
|
46
|
+
A dynamic module
|