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.
- package/README.md +78 -51
- 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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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.
|
|
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>",
|