quidproquo-actionprocessor-node 0.0.219 → 0.0.220
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.
|
@@ -26,12 +26,10 @@ const transformResponse = (payload, response) => {
|
|
|
26
26
|
if (payload.responseType === 'binary') {
|
|
27
27
|
const headers = response.headers || {};
|
|
28
28
|
const mimeType = headers['content-type'] || 'application/octet-stream';
|
|
29
|
-
const filename = ((_b = (_a = headers['content-disposition']) === null || _a === void 0 ? void 0 : _a.match(/filename="([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1]) ||
|
|
30
|
-
`file.${(0, mime_types_1.extension)(mimeType)}`;
|
|
29
|
+
const filename = ((_b = (_a = headers['content-disposition']) === null || _a === void 0 ? void 0 : _a.match(/filename="([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1]) || `file.${(0, mime_types_1.extension)(mimeType)}`;
|
|
31
30
|
return Object.assign(Object.assign({}, response), { data: {
|
|
32
31
|
base64Data: Buffer.from(response.data).toString('base64'),
|
|
33
32
|
mimetype: mimeType,
|
|
34
|
-
// TODO: We could get a filename from Content-Disposition header
|
|
35
33
|
filename,
|
|
36
34
|
} });
|
|
37
35
|
}
|
|
@@ -11,14 +11,12 @@ const transformResponse = (payload, response) => {
|
|
|
11
11
|
if (payload.responseType === 'binary') {
|
|
12
12
|
const headers = response.headers || {};
|
|
13
13
|
const mimeType = headers['content-type'] || 'application/octet-stream';
|
|
14
|
-
const filename = headers['content-disposition']?.match(/filename="([^"]+)"/)?.[1] ||
|
|
15
|
-
`file.${extension(mimeType)}`;
|
|
14
|
+
const filename = headers['content-disposition']?.match(/filename="([^"]+)"/)?.[1] || `file.${extension(mimeType)}`;
|
|
16
15
|
return {
|
|
17
16
|
...response,
|
|
18
17
|
data: {
|
|
19
18
|
base64Data: Buffer.from(response.data).toString('base64'),
|
|
20
19
|
mimetype: mimeType,
|
|
21
|
-
// TODO: We could get a filename from Content-Disposition header
|
|
22
20
|
filename,
|
|
23
21
|
},
|
|
24
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-actionprocessor-node",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.220",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@anthropic-ai/sdk": "^0.19.1",
|
|
33
33
|
"axios": "^1.2.1",
|
|
34
34
|
"mime-types": "^2.1.35",
|
|
35
|
-
"quidproquo-core": "0.0.
|
|
35
|
+
"quidproquo-core": "0.0.220",
|
|
36
36
|
"uuid": "^9.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/mime-types": "^2.1.1",
|
|
40
40
|
"@types/uuid": "^9.0.0",
|
|
41
|
-
"quidproquo-tsconfig": "0.0.
|
|
41
|
+
"quidproquo-tsconfig": "0.0.220",
|
|
42
42
|
"typescript": "^4.9.3"
|
|
43
43
|
}
|
|
44
44
|
}
|