@preventive/triage 1.0.0-alpha.30 → 1.0.0-alpha.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preventive/triage",
3
- "version": "1.0.0-alpha.30",
3
+ "version": "1.0.0-alpha.31",
4
4
  "description": "Client & relay server for triaging of automated reports",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": {
@@ -265,8 +265,8 @@
265
265
  "dependencies": {
266
266
  "@exodus/stasis": "1.0.0-beta.5",
267
267
  "@exodus/stasis-core": "1.0.0-beta.5",
268
- "@preventive/report": "1.0.0-alpha.4",
269
- "@preventive/upstream": "1.0.0-alpha.4",
268
+ "@preventive/report": "1.0.0-alpha.5",
269
+ "@preventive/upstream": "1.0.0-alpha.7",
270
270
  "ws": "^8.20.1"
271
271
  },
272
272
  "peerDependencies": {
@@ -44,6 +44,7 @@ export type VercelBlobSdk = {
44
44
  access: 'private' | 'public'
45
45
  token?: string
46
46
  useCache?: boolean
47
+ headers?: Record<string, string>
47
48
  abortSignal?: AbortSignal
48
49
  },
49
50
  ) => Promise<{
@@ -16,7 +16,10 @@ export async function openVercelObjectStorage(token: string, sdk?: VercelBlobSdk
16
16
  },
17
17
  async open(key, signal) {
18
18
  try {
19
- const result = await blobs.get(path(key), { token, access: 'private', useCache: false, ...(signal ? { abortSignal: signal } : {}) })
19
+ // Read the stored representation: transport compression can weaken its
20
+ // ETag, which cannot satisfy ifMatch, and changes the advertised size.
21
+ const result = await blobs.get(path(key), { token, access: 'private', useCache: false,
22
+ headers: { 'accept-encoding': 'identity' }, ...(signal ? { abortSignal: signal } : {}) })
20
23
  if (!result) return null
21
24
  if (result.statusCode !== 200 || !result.stream || !result.blob.etag) {
22
25
  await result.stream?.cancel()