s3-test-server 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +78 -51
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -110,32 +110,38 @@ All options are optional. `new S3TestServer()` starts an HTTP server on
110
110
 
111
111
  ### Server
112
112
 
113
- | Option | Type | Default | Description |
114
- | -------------- | ------------------ | ------------- | ------------------------------------------------- |
115
- | `address` | `string` | `'localhost'` | Hostname or IP to bind to. |
116
- | `port` | `number` | `4568` | Port to listen on. Use `0` for an ephemeral port. |
117
- | `key` / `cert` | `string \| Buffer` | none | TLS key and certificate. Provide both for HTTPS. |
118
- | `silent` | `boolean` | `false` | Suppress log output. |
113
+ - `address` (string, default `'localhost'`): hostname or IP to bind to.
114
+ - `port` (number, default `4568`): port to listen on. Use `0` for an
115
+ ephemeral port.
116
+ - `key`, `cert` (string | Buffer): TLS key and certificate. Provide both to
117
+ serve HTTPS.
118
+ - `silent` (boolean, default `false`): suppress log output.
119
119
 
120
120
  ### Storage
121
121
 
122
- | Option | Type | Default | Description |
123
- | ------------------ | ----------------------- | -------- | ------------------------------------------------------------------------------------------ |
124
- | `directory` | `string` | temp dir | Where buckets and objects are stored. Data persists across restarts. |
125
- | `resetOnStart` | `boolean` | `false` | Clear the data directory on every start, so a persistent `directory` begins empty. |
126
- | `resetOnClose` | `boolean` | `false` | Delete all bucket data when `close()` is called. |
127
- | `configureBuckets` | `BucketConfiguration[]` | `[]` | Buckets to create at startup, each with optional raw XML configs (CORS, website, tagging). |
122
+ - `directory` (string, default: a temporary directory): where buckets and
123
+ objects are stored. Data persists across restarts.
124
+ - `resetOnStart` (boolean, default `false`): clear the data directory on
125
+ every start, so a persistent `directory` begins empty.
126
+ - `resetOnClose` (boolean, default `false`): delete all bucket data when
127
+ `close()` is called.
128
+ - `configureBuckets` (array, default `[]`): buckets to create at startup,
129
+ each `{ name, configs }` with optional raw XML configs (CORS, website,
130
+ tagging).
128
131
 
129
132
  ### Credentials and addressing
130
133
 
131
- | Option | Type | Default | Description |
132
- | --------------------------- | --------- | ----------------- | --------------------------------------------------------------------------------------- |
133
- | `accessKeyId` | `string` | `'S3TEST'` | Access key clients must sign with. |
134
- | `secretAccessKey` | `string` | `'S3TEST'` | Matching secret key. |
135
- | `region` | `string` | `'us-east-1'` | Region reported in responses and event records. |
136
- | `vhostBuckets` | `boolean` | `true` | Virtual-host-style addressing (`bucket.localhost`, `bucket.s3.<region>.amazonaws.com`). |
137
- | `serviceEndpoint` | `string` | `'amazonaws.com'` | Root domain recognized for virtual-host-style access. |
138
- | `allowMismatchedSignatures` | `boolean` | `false` | Accept well-formed but incorrect signatures. |
134
+ - `accessKeyId` (string, default `'S3TEST'`): access key clients must sign
135
+ with.
136
+ - `secretAccessKey` (string, default `'S3TEST'`): matching secret key.
137
+ - `region` (string, default `'us-east-1'`): region reported in responses and
138
+ event records.
139
+ - `vhostBuckets` (boolean, default `true`): virtual-host-style addressing
140
+ (`bucket.localhost`, `bucket.s3.<region>.amazonaws.com`).
141
+ - `serviceEndpoint` (string, default `'amazonaws.com'`): root domain
142
+ recognized for virtual-host-style access.
143
+ - `allowMismatchedSignatures` (boolean, default `false`): accept well-formed
144
+ but incorrect signatures.
139
145
 
140
146
  Anonymous (unsigned) requests are accepted, as on a public bucket, which is
141
147
  handy for plain `fetch`/`curl` in tests. Signed requests are verified against
@@ -143,37 +149,58 @@ handy for plain `fetch`/`curl` in tests. Signed requests are verified against
143
149
 
144
150
  ## Supported operations
145
151
 
146
- **Service / buckets**: ListBuckets, Create/Delete/HeadBucket,
147
- GetBucketLocation, ListObjects (v1), ListObjectsV2, ListObjectVersions
148
- (unversioned mapping), Get/Put/DeleteBucketCors, Get/Put/DeleteBucketWebsite,
149
- Get/Put/DeleteBucketTagging, GetBucketVersioning, GetBucketEncryption,
150
- GetBucketNotification/RequestPayment/Logging/Accelerate, ACLs (dummy),
151
- ListMultipartUploads.
152
-
153
- **Objects**: Put/Get/Head/DeleteObject, DeleteObjects, CopyObject
154
- (COPY/REPLACE directives, copy conditions), POST form uploads
155
- (`multipart/form-data`, `${filename}` substitution, `success_action_*`),
156
- Get/Put/DeleteObjectTagging, GetObjectAttributes, object ACLs (dummy),
157
- Range requests, conditional reads (`If-Match`, `If-None-Match`,
158
- `If-(Un)Modified-Since`) and **conditional writes** (`If-None-Match: *`,
159
- `If-Match`), `response-*` header overrides, `Content-MD5` and
160
- `x-amz-checksum-*` validation (headers or `aws-chunked` trailers).
161
-
162
- **Multipart**: Create/Abort/CompleteMultipartUpload, UploadPart,
163
- UploadPartCopy (with `x-amz-copy-source-range`), ListParts, correct
164
- multipart ETags (`md5-of-md5s-N`), composite and full-object checksums.
165
-
166
- **Static website hosting**: index/error documents, folder redirects,
167
- `x-amz-website-redirect-location`, `RedirectAllRequestsTo`; served for
168
- anonymous GET/HEAD requests on buckets with a website configuration.
169
-
170
- **CORS**: preflight (`OPTIONS`) evaluation and response headers, driven by
171
- the bucket's CORS configuration.
172
-
173
- Not implemented: bucket versioning (`PutBucketVersioning` with `Enabled`
174
- returns `NotImplemented`), object locking, lifecycle execution, bucket
175
- policies/IAM. Per-chunk signatures inside `aws-chunked` bodies are not
176
- re-verified (the seed signature is).
152
+ ### Service and buckets
153
+
154
+ - ListBuckets, CreateBucket, DeleteBucket, HeadBucket, GetBucketLocation
155
+ - ListObjects (v1), ListObjectsV2, ListObjectVersions (unversioned mapping)
156
+ - ListMultipartUploads
157
+ - Get/Put/DeleteBucketCors, Get/Put/DeleteBucketWebsite,
158
+ Get/Put/DeleteBucketTagging
159
+ - GetBucketVersioning, GetBucketEncryption, GetBucketNotification,
160
+ GetBucketRequestPayment, GetBucketLogging, GetBucketAccelerate
161
+ - Bucket ACLs (dummy responses)
162
+
163
+ ### Objects
164
+
165
+ - PutObject, GetObject, HeadObject, DeleteObject, DeleteObjects
166
+ - CopyObject with COPY/REPLACE directives and copy conditions
167
+ - POST form uploads: `multipart/form-data`, `${filename}` substitution,
168
+ `success_action_*`
169
+ - Get/Put/DeleteObjectTagging, GetObjectAttributes, object ACLs (dummy)
170
+ - Range requests (`206 Partial Content`)
171
+ - Conditional reads: `If-Match`, `If-None-Match`, `If-(Un)Modified-Since`
172
+ - Conditional writes: `If-None-Match: *`, `If-Match`
173
+ - `response-*` header overrides on GET
174
+ - Integrity validation: `Content-MD5` and `x-amz-checksum-*`
175
+ (CRC32, CRC32C, CRC64NVME, SHA1, SHA256), from headers or `aws-chunked`
176
+ trailers
177
+
178
+ ### Multipart uploads
179
+
180
+ - CreateMultipartUpload, UploadPart, UploadPartCopy (with
181
+ `x-amz-copy-source-range`), CompleteMultipartUpload, AbortMultipartUpload,
182
+ ListParts
183
+ - Correct multipart ETags (`md5-of-md5s-N`)
184
+ - Composite and full-object checksums
185
+
186
+ ### Static website hosting
187
+
188
+ - Index and error documents, folder redirects
189
+ - `x-amz-website-redirect-location` and `RedirectAllRequestsTo`
190
+ - Served for anonymous GET/HEAD requests on buckets with a website
191
+ configuration
192
+
193
+ ### CORS
194
+
195
+ - Preflight (`OPTIONS`) evaluation and response headers, driven by the
196
+ bucket's CORS configuration
197
+
198
+ ### Not implemented
199
+
200
+ - Bucket versioning (`PutBucketVersioning` with `Enabled` returns
201
+ `NotImplemented`), object locking, lifecycle execution, bucket policies/IAM
202
+ - Per-chunk signatures inside `aws-chunked` bodies are not re-verified (the
203
+ seed signature is)
177
204
 
178
205
  ## Events
179
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s3-test-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A modern, lightweight Amazon S3 emulator for local development and testing. Compatible with AWS SDK v2 and v3, Signature V2/V4, path-style and virtual-host-style addressing, streaming (aws-chunked) uploads and flexible checksums.",
5
5
  "license": "MIT",
6
6
  "author": "Israel Alagbe <israelalagbe53@gmail.com>",