@critical-path/client 0.19.0 → 0.20.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/CHANGELOG.md +31 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @critical-path/client
|
|
2
2
|
|
|
3
|
+
## 0.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a3fe03d]
|
|
8
|
+
- @critical-path/core@0.32.0
|
|
9
|
+
|
|
10
|
+
## 0.20.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 40e5958: Real S3 uploads and signed URLs, and server-chosen storage keys.
|
|
15
|
+
|
|
16
|
+
**@critical-path/core**
|
|
17
|
+
- **BREAKING:** `S3StorageAdapter` now takes your AWS SDK v3 `client`, `commands` (`PutObjectCommand`, `DeleteObjectCommand`, optional `GetObjectCommand`) and a `presign` function (`getSignedUrl` from `@aws-sdk/s3-request-presigner`). Uploads send real commands and propagate S3 errors; previously failures were swallowed and reported as success. Presigned uploads are actually signed and cover `Content-Type`. New `signedDownloads` for private buckets. The unused `accessKeyId`/`secretAccessKey`/`sessionToken`/`s3Client` options are removed.
|
|
18
|
+
- **BREAKING:** `FirebaseStorageAdapter` requires a `bucket`; it no longer silently uses an in-memory mock. It throws instead of returning a public URL when the bucket cannot sign uploads.
|
|
19
|
+
- **BREAKING:** `engine.getPresignedAttachmentUploadUrl({ projectId, filename, contentType?, expiresInSeconds? })` generates the storage key under `projects/<projectId>/`, instead of accepting a caller-chosen `storageKey`.
|
|
20
|
+
- Attachments created through an actor view must use a `storageKey` under their project's prefix, so callers cannot register (and then delete) other projects' files. Uploads through views are always stored under the project prefix.
|
|
21
|
+
- New `buildStorageKey` (validates path prefixes, crypto-random component) and `contentDispositionFor`. HTML, SVG and script uploads are stored as downloads.
|
|
22
|
+
|
|
23
|
+
**@critical-path/server**
|
|
24
|
+
- **BREAKING:** `POST /attachments/presign` takes `{ projectId, filename, contentType?, expiresInSeconds? }`. `POST /attachments/upload` no longer accepts `pathPrefix`.
|
|
25
|
+
|
|
26
|
+
**@critical-path/client**
|
|
27
|
+
- `getPresignedAttachmentUploadUrl` and `uploadAttachmentFile` use the updated request bodies.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [40e5958]
|
|
32
|
+
- @critical-path/core@0.31.0
|
|
33
|
+
|
|
3
34
|
## 0.19.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@critical-path/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Type-safe JavaScript/TypeScript client SDK for consuming Critical Path API endpoints",
|
|
5
5
|
"author": "Jack James",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@critical-path/core": "0.
|
|
24
|
+
"@critical-path/core": "0.32.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|
|
28
28
|
"typescript": "^5.7.0",
|
|
29
29
|
"vitest": "^3.0.0",
|
|
30
|
-
"@critical-path/server": "0.
|
|
30
|
+
"@critical-path/server": "0.23.1"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=24.0.0"
|