1.7 KiB
1.7 KiB
- The project uses the official s3 client, not the minio client.
- All methods throw by default (strict mode): - Put operations:
fastPut,fastPutStreamthrow when file exists and overwrite is false - Get operations:getBucketByName,getFile,getSubDirectoryByNamethrow 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.0because tsbuild 4.4.0 brings TypeScript 6.0.2 which has a regression where@types/nodeis not auto-discovered when files are passed programmatically viacreateProgram(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/tapbundlefortapandexpect. Note that smartexpect'stoEqualdoes NOT supportexpect.any()matchers (onlytoMatchObjectdoes, and only at the top level). For testing nested objects with type matchers, usetoHaveProperty+toBeTypeofNumber/String/Booleanseparately.