You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement Phase 6.3 - FS5 Media Extensions with comprehensive test suite
Core Implementation:
- Add media-extensions.ts with putImage, getThumbnail, getImageMetadata, createImageGallery
- Add media-types.ts with TypeScript interfaces for media operations
- Fix TypeScript 5.8 Blob constructor compatibility in progressive/loader.ts
Testing:
- Add unit tests (test/fs/media-extensions.test.ts) with mocked FS5 operations
- Add integration tests (test/fs/media-extensions.integration.test.ts) marked as skip for CI
- Add standalone real S5 portal test (test/integration/test-media-real.js)
• 14 tests organized into 4 logical groups
• 100% pass rate with real S5 portal
• Sequential execution with registry propagation delays
• Portal registration and identity management
Improvements:
- Resolve registry conflicts with concurrency: 1 for reliable S5 operations
- Add 5+ second delays for registry propagation
- Support thumbnail generation, metadata extraction, and gallery creation
- Integrate with existing FS5 path-based API
All tests pass.
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,6 +183,24 @@ This test validates:
183
183
- Error handling modes
184
184
- Metadata preservation
185
185
186
+
### 5. Media Extensions Test (Phase 6.3)
187
+
188
+
Tests FS5 media integration (putImage, getThumbnail, getImageMetadata, createImageGallery) with real S5 instance:
189
+
190
+
```bash
191
+
node test/integration/test-media-real.js
192
+
```
193
+
194
+
This test validates:
195
+
- Image upload with automatic thumbnail generation
196
+
- Metadata extraction (format, dimensions)
197
+
- Thumbnail retrieval (pre-generated and on-demand)
198
+
- Gallery creation with manifest.json
199
+
- Directory integration with media operations
200
+
- Path-based API (no CID exposure)
201
+
202
+
Expected output: 10/10 tests passing
203
+
186
204
### Important Notes
187
205
188
206
-**Use Fresh Identities**: The new deterministic key derivation system requires fresh identities. Old accounts created with the previous system won't work.
timestamp: 1705432100000, // Milliseconds since epoch
268
-
hash: "..."// File hash
267
+
timestamp: 1705432100000// Milliseconds since epoch
268
+
// Note: Content hashes (CIDs) are not exposed in the path-based API
269
+
// Files are identified by their paths, abstracting away content addressing
269
270
}
270
271
```
271
272
@@ -1594,6 +1595,239 @@ async function extractColorPalette(imagePath: string) {
1594
1595
}
1595
1596
```
1596
1597
1598
+
1599
+
## FS5 Media Extensions (Phase 6.3)
1600
+
1601
+
The FS5 class provides integrated media operations that combine file system functionality with image processing capabilities. These methods use path-based identifiers consistent with FS5's design philosophy.
1602
+
1603
+
### putImage()
1604
+
1605
+
Upload an image with automatic metadata extraction and thumbnail generation.
1606
+
1607
+
```typescript
1608
+
asyncputImage(
1609
+
path: string,
1610
+
blob: Blob,
1611
+
options?:PutImageOptions
1612
+
): Promise<ImageReference>
1613
+
```
1614
+
1615
+
#### Parameters
1616
+
1617
+
-**path** (string): File system path where the image will be stored
0 commit comments