@breadstone/archipel-mcp 0.0.45 → 0.0.47
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/data/guides/ai-text-generation.md +2 -2
- package/data/guides/authentication-and-authorization.md +2 -2
- package/data/guides/blob-storage.md +3 -3
- package/data/guides/caching.md +2 -2
- package/data/guides/composition-context.md +462 -0
- package/data/guides/database-setup.md +4 -4
- package/data/guides/email-delivery.md +6 -6
- package/data/guides/index.md +1 -0
- package/data/guides/openapi-and-feature-discovery.md +1 -1
- package/data/guides/queue-infrastructure.md +4 -4
- package/data/guides/telemetry-and-observability.md +1 -1
- package/data/packages/platform-blob-storage/api/Class.BlobStorageStrategyBase.md +1 -0
- package/data/packages/platform-blob-storage/api/Class.EmptyBlobStorageStrategy.md +183 -0
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_ACCESS_KEY_ID.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_BUCKET.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_ENDPOINT.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_REGION.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.AWS_S3_SECRET_ACCESS_KEY.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.LOCAL_BLOB_BASE_PATH.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.LOCAL_BLOB_BUCKET.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.LOCAL_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-blob-storage/api/Variable.PLATFORM_BLOB_STORAGE_CONFIG_ENTRIES.md +1 -1
- package/data/packages/platform-blob-storage/api/index.md +1 -0
- package/data/packages/platform-blob-storage/index.md +21 -1
- package/data/packages/platform-bootstrap/api/Class.CompositionContext.md +226 -0
- package/data/packages/platform-bootstrap/api/Class.CompositionModule.md +56 -0
- package/data/packages/platform-bootstrap/api/Class.CompositionResolver.md +206 -0
- package/data/packages/platform-bootstrap/api/Class.PlatformApplicationBuilder.md +75 -8
- package/data/packages/platform-bootstrap/api/Function.createCompositionContext.md +56 -0
- package/data/packages/platform-bootstrap/api/Interface.ICompositionContext.md +179 -0
- package/data/packages/platform-bootstrap/api/Interface.ICreateCompositionContextOptions.md +54 -0
- package/data/packages/platform-bootstrap/api/Interface.ICreateWithCompositionOptions.md +128 -0
- package/data/packages/platform-bootstrap/api/Interface.IProviderDecision.md +36 -0
- package/data/packages/platform-bootstrap/api/TypeAlias.CompositionImport.md +20 -0
- package/data/packages/platform-bootstrap/api/TypeAlias.ProviderComposer.md +53 -0
- package/data/packages/platform-bootstrap/api/index.md +10 -0
- package/data/packages/platform-cryptography/api/Class.OtpService.md +6 -6
- package/data/packages/platform-cryptography/api/Variable.TOTP_EPOCH_TOLERANCE.md +1 -1
- package/data/packages/platform-feature-flags/index.md +103 -0
- package/data/packages/platform-mailing/api/Class.DeliveryStrategyBase.md +0 -1
- package/data/packages/platform-mailing/api/index.md +0 -1
- package/package.json +1 -1
- package/data/packages/platform-mailing/api/Class.LogDeliveryStrategy.md +0 -71
|
@@ -16,6 +16,7 @@ Serves as both the type contract and the NestJS DI token type reference.
|
|
|
16
16
|
- [`VercelBlobStorageStrategy`](Class.VercelBlobStorageStrategy)
|
|
17
17
|
- [`AzureBlobStorageStrategy`](Class.AzureBlobStorageStrategy)
|
|
18
18
|
- [`AwsS3BlobStorageStrategy`](Class.AwsS3BlobStorageStrategy)
|
|
19
|
+
- [`EmptyBlobStorageStrategy`](Class.EmptyBlobStorageStrategy)
|
|
19
20
|
- [`LocalBlobStorageStrategy`](Class.LocalBlobStorageStrategy)
|
|
20
21
|
|
|
21
22
|
## Constructors
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: EmptyBlobStorageStrategy'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: EmptyBlobStorageStrategy
|
|
7
|
+
|
|
8
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:15
|
|
9
|
+
|
|
10
|
+
Provides a blob storage strategy backed by the local filesystem.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- [`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new EmptyBlobStorageStrategy(): EmptyBlobStorageStrategy;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:29
|
|
25
|
+
|
|
26
|
+
Constructs a new instance of the `EmptyBlobStorageStrategy` class.
|
|
27
|
+
|
|
28
|
+
#### Returns
|
|
29
|
+
|
|
30
|
+
`EmptyBlobStorageStrategy`
|
|
31
|
+
|
|
32
|
+
#### Overrides
|
|
33
|
+
|
|
34
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`constructor`](Class.BlobStorageStrategyBase#constructor)
|
|
35
|
+
|
|
36
|
+
## Properties
|
|
37
|
+
|
|
38
|
+
### defaultBucket?
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
optional defaultBucket?: string = undefined;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:39
|
|
45
|
+
|
|
46
|
+
Gets the default bucket (container/directory) configured for the provider.
|
|
47
|
+
|
|
48
|
+
#### Overrides
|
|
49
|
+
|
|
50
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`defaultBucket`](Class.BlobStorageStrategyBase#defaultbucket)
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### providerId
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
readonly providerId: string = 'empty';
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:37
|
|
61
|
+
|
|
62
|
+
Gets the unique identifier for this storage provider.
|
|
63
|
+
|
|
64
|
+
#### Overrides
|
|
65
|
+
|
|
66
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`providerId`](Class.BlobStorageStrategyBase#providerid)
|
|
67
|
+
|
|
68
|
+
## Methods
|
|
69
|
+
|
|
70
|
+
### createSignedUrl()?
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
optional createSignedUrl(request): Promise<string>;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Defined in: [strategies/abstracts/BlobStorageStrategyBase.ts:79](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/abstracts/BlobStorageStrategyBase.ts#L79)
|
|
77
|
+
|
|
78
|
+
Creates a signed URL for the specified blob object.
|
|
79
|
+
Not all providers support this operation.
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Description |
|
|
84
|
+
| ------ | ------ | ------ |
|
|
85
|
+
| `request` | [`IBlobSignedUrlRequest`](Interface.IBlobSignedUrlRequest) | The request describing the object to link. |
|
|
86
|
+
|
|
87
|
+
#### Returns
|
|
88
|
+
|
|
89
|
+
`Promise`\<`string`\>
|
|
90
|
+
|
|
91
|
+
The generated signed URL.
|
|
92
|
+
|
|
93
|
+
#### Inherited from
|
|
94
|
+
|
|
95
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`createSignedUrl`](Class.BlobStorageStrategyBase#createsignedurl)
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
### deleteObject()
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
deleteObject(request): Promise<void>;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:93
|
|
106
|
+
|
|
107
|
+
Deletes a blob object from the storage backend.
|
|
108
|
+
|
|
109
|
+
#### Parameters
|
|
110
|
+
|
|
111
|
+
| Parameter | Type | Description |
|
|
112
|
+
| ------ | ------ | ------ |
|
|
113
|
+
| `request` | [`IBlobDeleteRequest`](Interface.IBlobDeleteRequest) | The delete request describing the object to remove. |
|
|
114
|
+
|
|
115
|
+
#### Returns
|
|
116
|
+
|
|
117
|
+
`Promise`\<`void`\>
|
|
118
|
+
|
|
119
|
+
#### Overrides
|
|
120
|
+
|
|
121
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`deleteObject`](Class.BlobStorageStrategyBase#deleteobject)
|
|
122
|
+
|
|
123
|
+
***
|
|
124
|
+
|
|
125
|
+
### downloadObject()
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
downloadObject<TData>(request): Promise<IBlobDownloadResult<TData>>;
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:75
|
|
132
|
+
|
|
133
|
+
Downloads a blob object from the storage backend.
|
|
134
|
+
|
|
135
|
+
#### Type Parameters
|
|
136
|
+
|
|
137
|
+
| Type Parameter |
|
|
138
|
+
| ------ |
|
|
139
|
+
| `TData` |
|
|
140
|
+
|
|
141
|
+
#### Parameters
|
|
142
|
+
|
|
143
|
+
| Parameter | Type | Description |
|
|
144
|
+
| ------ | ------ | ------ |
|
|
145
|
+
| `request` | [`IBlobDownloadRequest`](Interface.IBlobDownloadRequest) | The download request describing the object to download. |
|
|
146
|
+
|
|
147
|
+
#### Returns
|
|
148
|
+
|
|
149
|
+
`Promise`\<[`IBlobDownloadResult`](Interface.IBlobDownloadResult)\<`TData`\>\>
|
|
150
|
+
|
|
151
|
+
The download result including payload and metadata.
|
|
152
|
+
|
|
153
|
+
#### Overrides
|
|
154
|
+
|
|
155
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`downloadObject`](Class.BlobStorageStrategyBase#downloadobject)
|
|
156
|
+
|
|
157
|
+
***
|
|
158
|
+
|
|
159
|
+
### uploadObject()
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
uploadObject(request): Promise<IBlobUploadResult>;
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Defined in: strategies/empty/EmptyBlobStorageStrategy.ts:45
|
|
166
|
+
|
|
167
|
+
Uploads a blob object to the storage backend.
|
|
168
|
+
|
|
169
|
+
#### Parameters
|
|
170
|
+
|
|
171
|
+
| Parameter | Type | Description |
|
|
172
|
+
| ------ | ------ | ------ |
|
|
173
|
+
| `request` | [`IBlobUploadRequest`](Interface.IBlobUploadRequest) | The upload request describing the object to upload. |
|
|
174
|
+
|
|
175
|
+
#### Returns
|
|
176
|
+
|
|
177
|
+
`Promise`\<[`IBlobUploadResult`](Interface.IBlobUploadResult)\>
|
|
178
|
+
|
|
179
|
+
The resulting upload metadata.
|
|
180
|
+
|
|
181
|
+
#### Overrides
|
|
182
|
+
|
|
183
|
+
[`BlobStorageStrategyBase`](Class.BlobStorageStrategyBase).[`uploadObject`](Class.BlobStorageStrategyBase#uploadobject)
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_ACCESS_KEY_ID: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:26](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L26)
|
|
13
13
|
|
|
14
14
|
AWS S3 access key ID.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_BUCKET: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:19](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L19)
|
|
13
13
|
|
|
14
14
|
AWS S3 bucket name.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L47)
|
|
13
13
|
|
|
14
14
|
Configuration entries required by the AWS S3 blob storage strategy.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_ENDPOINT: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:40](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L40)
|
|
13
13
|
|
|
14
14
|
AWS S3 custom endpoint (for S3-compatible providers).
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_REGION: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L12)
|
|
13
13
|
|
|
14
14
|
AWS S3 region.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const AWS_S3_SECRET_ACCESS_KEY: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/aws-s3/env.ts:
|
|
12
|
+
Defined in: [strategies/aws-s3/env.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/aws-s3/env.ts#L33)
|
|
13
13
|
|
|
14
14
|
AWS S3 secret access key.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const LOCAL_BLOB_BASE_PATH: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/local/env.ts:
|
|
12
|
+
Defined in: [strategies/local/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/local/env.ts#L12)
|
|
13
13
|
|
|
14
14
|
Local blob storage base path.
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const LOCAL_BLOB_BUCKET: IConfigKey<string>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/local/env.ts:
|
|
12
|
+
Defined in: [strategies/local/env.ts:19](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/local/env.ts#L19)
|
|
13
13
|
|
|
14
14
|
Local blob storage bucket (subdirectory).
|
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const LOCAL_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [strategies/local/env.ts:
|
|
12
|
+
Defined in: [strategies/local/env.ts:26](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/strategies/local/env.ts#L26)
|
|
13
13
|
|
|
14
14
|
Configuration entries required by the local blob storage strategy.
|
package/data/packages/platform-blob-storage/api/Variable.PLATFORM_BLOB_STORAGE_CONFIG_ENTRIES.md
CHANGED
|
@@ -9,6 +9,6 @@ editUrl: false
|
|
|
9
9
|
const PLATFORM_BLOB_STORAGE_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [env.ts:
|
|
12
|
+
Defined in: [env.ts:21](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-blob-storage/src/env.ts#L21)
|
|
13
13
|
|
|
14
14
|
All configuration entries for `platform-blob-storage`. All keys are optional at the aggregate level.
|
|
@@ -17,6 +17,7 @@ editUrl: false
|
|
|
17
17
|
| [BlobService](Class.BlobService) | Provides a generic abstraction for blob storage operations independent of the underlying provider. |
|
|
18
18
|
| [BlobStorageStrategyBase](Class.BlobStorageStrategyBase) | Abstract base class for blob storage strategies. Every concrete provider (AWS S3, Azure, Vercel, Local, etc.) must extend this class. Serves as both the type contract and the NestJS DI token type reference. |
|
|
19
19
|
| [BlobVariantPersistencePort](Class.BlobVariantPersistencePort) | Abstract port for persisting blob variant metadata. Consuming projects must provide a concrete implementation and register it via `BlobModule.forRoot({ variantPersistence: MyAdapter })`. |
|
|
20
|
+
| [EmptyBlobStorageStrategy](Class.EmptyBlobStorageStrategy) | Provides a blob storage strategy backed by the local filesystem. |
|
|
20
21
|
| [LocalBlobStorageStrategy](Class.LocalBlobStorageStrategy) | Provides a blob storage strategy backed by the local filesystem. |
|
|
21
22
|
| [VercelBlobStorageStrategy](Class.VercelBlobStorageStrategy) | Provides a blob storage strategy backed by the Vercel Blob API. |
|
|
22
23
|
|
|
@@ -8,7 +8,7 @@ package: '@breadstone/archipel-platform-blob-storage'
|
|
|
8
8
|
|
|
9
9
|
# platform-blob-storage
|
|
10
10
|
|
|
11
|
-
Cloud file storage abstraction supporting pluggable strategies and optional metadata persistence via ports. Ships with Vercel Blob, Azure Blob Storage, AWS S3,
|
|
11
|
+
Cloud file storage abstraction supporting pluggable strategies and optional metadata persistence via ports. Ships with Vercel Blob, Azure Blob Storage, AWS S3, local filesystem, and an empty/mock strategy out of the box.
|
|
12
12
|
|
|
13
13
|
**Package:** `@breadstone/archipel-platform-blob-storage`
|
|
14
14
|
|
|
@@ -63,6 +63,7 @@ import { VercelBlobStorageStrategy, VERCEL_CONFIG_ENTRIES } from '@breadstone/ar
|
|
|
63
63
|
import { AzureBlobStorageStrategy, AZURE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-blob-storage/strategies/azure';
|
|
64
64
|
import { AwsS3BlobStorageStrategy, AWS_S3_CONFIG_ENTRIES } from '@breadstone/archipel-platform-blob-storage/strategies/aws-s3';
|
|
65
65
|
import { LocalBlobStorageStrategy, LOCAL_CONFIG_ENTRIES } from '@breadstone/archipel-platform-blob-storage/strategies/local';
|
|
66
|
+
import { EmptyBlobStorageStrategy } from '@breadstone/archipel-platform-blob-storage/strategies/empty';
|
|
66
67
|
|
|
67
68
|
// Vercel Blob
|
|
68
69
|
BlobModule.register({ storageStrategy: VercelBlobStorageStrategy, configEntries: VERCEL_CONFIG_ENTRIES });
|
|
@@ -76,6 +77,9 @@ BlobModule.register({ storageStrategy: AwsS3BlobStorageStrategy, configEntries:
|
|
|
76
77
|
// Local filesystem
|
|
77
78
|
BlobModule.register({ storageStrategy: LocalBlobStorageStrategy, configEntries: LOCAL_CONFIG_ENTRIES });
|
|
78
79
|
|
|
80
|
+
// Empty/mock strategy (for development and testing — logs operations, returns mock data)
|
|
81
|
+
BlobModule.register({ storageStrategy: EmptyBlobStorageStrategy });
|
|
82
|
+
|
|
79
83
|
// Custom strategy — extend BlobStorageStrategyBase
|
|
80
84
|
BlobModule.register({ storageStrategy: MyCustomStrategy });
|
|
81
85
|
```
|
|
@@ -307,6 +311,20 @@ BlobModule.register({
|
|
|
307
311
|
| `LOCAL_BLOB_BASE_PATH` | No | `./blob-data` | Base directory for local file storage |
|
|
308
312
|
| `LOCAL_BLOB_BUCKET` | No | `default` | Default bucket subdirectory |
|
|
309
313
|
|
|
314
|
+
### EmptyBlobStorageStrategy
|
|
315
|
+
|
|
316
|
+
A no-op storage strategy for development and testing. Logs all operations to the NestJS logger and returns mock results. No actual storage occurs.
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
import { EmptyBlobStorageStrategy } from '@breadstone/archipel-platform-blob-storage/strategies/empty';
|
|
320
|
+
|
|
321
|
+
BlobModule.register({
|
|
322
|
+
storageStrategy: EmptyBlobStorageStrategy,
|
|
323
|
+
});
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
No environment variables required.
|
|
327
|
+
|
|
310
328
|
### Custom Strategy
|
|
311
329
|
|
|
312
330
|
Extend `BlobStorageStrategyBase` for any other storage backend (GCS, MinIO, etc.):
|
|
@@ -375,6 +393,7 @@ Each strategy is tree-shakeable via sub-path imports:
|
|
|
375
393
|
| `@breadstone/archipel-platform-blob-storage/strategies/azure` | AzureBlobStorageStrategy, AZURE_CONFIG_ENTRIES |
|
|
376
394
|
| `@breadstone/archipel-platform-blob-storage/strategies/aws-s3` | AwsS3BlobStorageStrategy, AWS_S3_CONFIG_ENTRIES |
|
|
377
395
|
| `@breadstone/archipel-platform-blob-storage/strategies/local` | LocalBlobStorageStrategy, LOCAL_CONFIG_ENTRIES |
|
|
396
|
+
| `@breadstone/archipel-platform-blob-storage/strategies/empty` | EmptyBlobStorageStrategy (mock/logging) |
|
|
378
397
|
| `@breadstone/archipel-platform-blob-storage/health` | BlobHealthIndicator |
|
|
379
398
|
|
|
380
399
|
---
|
|
@@ -392,5 +411,6 @@ Each strategy is tree-shakeable via sub-path imports:
|
|
|
392
411
|
| `AzureBlobStorageStrategy` | Strategy | Azure Blob Storage implementation (sub-path) |
|
|
393
412
|
| `AwsS3BlobStorageStrategy` | Strategy | AWS S3 implementation (sub-path) |
|
|
394
413
|
| `LocalBlobStorageStrategy` | Strategy | Local filesystem implementation (sub-path) |
|
|
414
|
+
| `EmptyBlobStorageStrategy` | Strategy | Mock/logging implementation (sub-path) |
|
|
395
415
|
| `BlobHealthIndicator` | Health | Blob storage health check (`/health` subpath) |
|
|
396
416
|
| `BlobDownloadResponseTypes` | Constant | `'arraybuffer'` \| `'json'` \| `'stream'` \| `'text'` |
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: CompositionContext'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: CompositionContext
|
|
7
|
+
|
|
8
|
+
Defined in: composition/context/CompositionContext.ts:17
|
|
9
|
+
|
|
10
|
+
Default implementation of the composition context.
|
|
11
|
+
|
|
12
|
+
Wraps a temporary NestJS application context and provides convenient
|
|
13
|
+
access to configuration values during module composition.
|
|
14
|
+
|
|
15
|
+
## Implements
|
|
16
|
+
|
|
17
|
+
- [`ICompositionContext`](Interface.ICompositionContext)
|
|
18
|
+
|
|
19
|
+
## Constructors
|
|
20
|
+
|
|
21
|
+
### Constructor
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
new CompositionContext(context, config): CompositionContext;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Defined in: composition/context/CompositionContext.ts:35
|
|
28
|
+
|
|
29
|
+
Constructs a new composition context.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| ------ | ------ | ------ |
|
|
35
|
+
| `context` | `INestApplicationContext` | The temporary NestJS application context. |
|
|
36
|
+
| `config` | `ConfigService` | The configuration service instance. |
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`CompositionContext`
|
|
41
|
+
|
|
42
|
+
## Accessors
|
|
43
|
+
|
|
44
|
+
### config
|
|
45
|
+
|
|
46
|
+
#### Get Signature
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
get config(): ConfigService;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Defined in: composition/context/CompositionContext.ts:54
|
|
53
|
+
|
|
54
|
+
The Archipel configuration service.
|
|
55
|
+
|
|
56
|
+
Provides typed access to environment configuration values.
|
|
57
|
+
|
|
58
|
+
##### Returns
|
|
59
|
+
|
|
60
|
+
`ConfigService`
|
|
61
|
+
|
|
62
|
+
The Archipel configuration service.
|
|
63
|
+
|
|
64
|
+
Provides typed access to environment configuration values.
|
|
65
|
+
|
|
66
|
+
#### Implementation of
|
|
67
|
+
|
|
68
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`config`](Interface.ICompositionContext#config)
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### context
|
|
73
|
+
|
|
74
|
+
#### Get Signature
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
get context(): INestApplicationContext;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Defined in: composition/context/CompositionContext.ts:47
|
|
81
|
+
|
|
82
|
+
The temporary NestJS application context.
|
|
83
|
+
|
|
84
|
+
Used only for dependency injection resolution during composition.
|
|
85
|
+
Do not use this context for runtime services.
|
|
86
|
+
|
|
87
|
+
##### Returns
|
|
88
|
+
|
|
89
|
+
`INestApplicationContext`
|
|
90
|
+
|
|
91
|
+
The temporary NestJS application context.
|
|
92
|
+
|
|
93
|
+
Used only for dependency injection resolution during composition.
|
|
94
|
+
Do not use this context for runtime services.
|
|
95
|
+
|
|
96
|
+
#### Implementation of
|
|
97
|
+
|
|
98
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`context`](Interface.ICompositionContext#context)
|
|
99
|
+
|
|
100
|
+
## Methods
|
|
101
|
+
|
|
102
|
+
### close()
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
close(): Promise<void>;
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Defined in: composition/context/CompositionContext.ts:86
|
|
109
|
+
|
|
110
|
+
Closes the temporary composition context.
|
|
111
|
+
|
|
112
|
+
Must be called after the real application has been created to release
|
|
113
|
+
resources held by the composition context.
|
|
114
|
+
|
|
115
|
+
#### Returns
|
|
116
|
+
|
|
117
|
+
`Promise`\<`void`\>
|
|
118
|
+
|
|
119
|
+
A promise that resolves when the context is closed.
|
|
120
|
+
|
|
121
|
+
#### Implementation of
|
|
122
|
+
|
|
123
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`close`](Interface.ICompositionContext#close)
|
|
124
|
+
|
|
125
|
+
***
|
|
126
|
+
|
|
127
|
+
### getConfigValue()
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
getConfigValue<T>(key): T;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Defined in: composition/context/CompositionContext.ts:65
|
|
134
|
+
|
|
135
|
+
Reads a required configuration value.
|
|
136
|
+
|
|
137
|
+
#### Type Parameters
|
|
138
|
+
|
|
139
|
+
| Type Parameter | Description |
|
|
140
|
+
| ------ | ------ |
|
|
141
|
+
| `T` | The expected type of the configuration value. |
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Description |
|
|
146
|
+
| ------ | ------ | ------ |
|
|
147
|
+
| `key` | `IConfigKey`\<`T`\> | The typed configuration key. |
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`T`
|
|
152
|
+
|
|
153
|
+
The typed configuration value.
|
|
154
|
+
|
|
155
|
+
#### Implementation of
|
|
156
|
+
|
|
157
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`getConfigValue`](Interface.ICompositionContext#getconfigvalue)
|
|
158
|
+
|
|
159
|
+
***
|
|
160
|
+
|
|
161
|
+
### getService()
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
getService<T>(token): T;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Defined in: composition/context/CompositionContext.ts:79
|
|
168
|
+
|
|
169
|
+
Resolves a provider from the composition context.
|
|
170
|
+
|
|
171
|
+
#### Type Parameters
|
|
172
|
+
|
|
173
|
+
| Type Parameter | Description |
|
|
174
|
+
| ------ | ------ |
|
|
175
|
+
| `T` | The type of the provider. |
|
|
176
|
+
|
|
177
|
+
#### Parameters
|
|
178
|
+
|
|
179
|
+
| Parameter | Type | Description |
|
|
180
|
+
| ------ | ------ | ------ |
|
|
181
|
+
| `token` | (...`args`) => `T` | The provider token (class, string, or symbol). |
|
|
182
|
+
|
|
183
|
+
#### Returns
|
|
184
|
+
|
|
185
|
+
`T`
|
|
186
|
+
|
|
187
|
+
The resolved provider instance.
|
|
188
|
+
|
|
189
|
+
#### Implementation of
|
|
190
|
+
|
|
191
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`getService`](Interface.ICompositionContext#getservice)
|
|
192
|
+
|
|
193
|
+
***
|
|
194
|
+
|
|
195
|
+
### tryGetConfigValue()
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
tryGetConfigValue<T>(key, fallback): T;
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Defined in: composition/context/CompositionContext.ts:72
|
|
202
|
+
|
|
203
|
+
Reads an optional configuration value with a fallback.
|
|
204
|
+
|
|
205
|
+
#### Type Parameters
|
|
206
|
+
|
|
207
|
+
| Type Parameter | Description |
|
|
208
|
+
| ------ | ------ |
|
|
209
|
+
| `T` | The expected type of the configuration value. |
|
|
210
|
+
|
|
211
|
+
#### Parameters
|
|
212
|
+
|
|
213
|
+
| Parameter | Type | Description |
|
|
214
|
+
| ------ | ------ | ------ |
|
|
215
|
+
| `key` | `IConfigKey`\<`T`\> | The typed configuration key. |
|
|
216
|
+
| `fallback` | `T` | The fallback value when the key is absent. |
|
|
217
|
+
|
|
218
|
+
#### Returns
|
|
219
|
+
|
|
220
|
+
`T`
|
|
221
|
+
|
|
222
|
+
The typed configuration value or the fallback.
|
|
223
|
+
|
|
224
|
+
#### Implementation of
|
|
225
|
+
|
|
226
|
+
[`ICompositionContext`](Interface.ICompositionContext).[`tryGetConfigValue`](Interface.ICompositionContext#trygetconfigvalue)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: CompositionModule'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: CompositionModule
|
|
7
|
+
|
|
8
|
+
Defined in: composition/module/CompositionModule.ts:53
|
|
9
|
+
|
|
10
|
+
Minimal module providing configuration access for composition.
|
|
11
|
+
|
|
12
|
+
This module is used by [createCompositionContext](Function.createCompositionContext) to create a
|
|
13
|
+
lightweight NestJS application context for module composition decisions.
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
The composition module intentionally does **not** import heavy infrastructure
|
|
18
|
+
such as database, queues, cron, or external API clients. It only provides
|
|
19
|
+
configuration access.
|
|
20
|
+
|
|
21
|
+
To add custom composition services (e.g., a custom [CompositionResolver](Class.CompositionResolver)),
|
|
22
|
+
create a custom module extending this pattern and pass it to
|
|
23
|
+
[createCompositionContext](Function.createCompositionContext).
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// Custom composition module with application-specific resolver
|
|
29
|
+
@Module({
|
|
30
|
+
imports: [
|
|
31
|
+
ConfigModule.forRoot({
|
|
32
|
+
strategyFactory: () => new EnvironmentConfigStrategy()
|
|
33
|
+
})
|
|
34
|
+
],
|
|
35
|
+
providers: [AppCompositionResolver],
|
|
36
|
+
exports: [ConfigModule, AppCompositionResolver]
|
|
37
|
+
})
|
|
38
|
+
export class AppCompositionModule {}
|
|
39
|
+
|
|
40
|
+
// Usage
|
|
41
|
+
const context = await createCompositionContext({
|
|
42
|
+
module: AppCompositionModule
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Constructors
|
|
47
|
+
|
|
48
|
+
### Constructor
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
new CompositionModule(): CompositionModule;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Returns
|
|
55
|
+
|
|
56
|
+
`CompositionModule`
|