9 lines
1.7 KiB
Markdown
9 lines
1.7 KiB
Markdown
* The project uses the official s3 client, not the minio client.
|
|
* **All methods throw by default** (strict mode): - Put operations: `fastPut`, `fastPutStream` throw when file exists and overwrite is false - Get operations: `getBucketByName`, `getFile`, `getSubDirectoryByName` throw when not found
|
|
* **Use exists() methods to check before getting**: `bucketExists`, `fileExists`, `directoryExists`, `fastExists`
|
|
* **No *Strict methods**: All removed (fastPutStrict, getBucketByNameStrict, getFileStrict, getSubDirectoryByNameStrict)
|
|
* metadata is handled though the MetaData class. Important!
|
|
* **BucketWatcher** - Polling-based S3 change watcher (`bucket.createWatcher()`). Detects add/modify/delete via ETag/Size/LastModified comparison. Supports RxJS Observable pattern (`changeSubject`) and EventEmitter pattern (`on('change')`). Options: `prefix`, `pollIntervalMs`, `bufferTimeMs`, `includeInitial`, `pageSize`.
|
|
* **@git.zone/tsbuild pin**: tsbuild is pinned to `~4.3.0` because tsbuild 4.4.0 brings TypeScript 6.0.2 which has a regression where `@types/node` is not auto-discovered when files are passed programmatically via `createProgram` (which tsbuild does internally). This causes "Cannot find name 'Buffer'", "Cannot find name 'node:path'", etc. errors throughout the codebase. Workarounds would require either modifying tsconfig to add `"types": ["node"]` or staying on tsbuild 4.3.x. We chose to pin tsbuild.
|
|
* **Test assertions**: Use `@git.zone/tstest/tapbundle` for `tap` and `expect`. Note that smartexpect's `toEqual` does NOT support `expect.any()` matchers (only `toMatchObject` does, and only at the top level). For testing nested objects with type matchers, use `toHaveProperty` + `toBeTypeofNumber/String/Boolean` separately.
|