@syncmatters/script-api 1.0.26 → 1.0.28
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.
|
@@ -15,6 +15,8 @@ export interface Privates {
|
|
|
15
15
|
deleteOnClose: boolean;
|
|
16
16
|
stream: fs.ReadStream | null;
|
|
17
17
|
closed: boolean;
|
|
18
|
+
/** temp files written by formDataValue(encoding); removed on close */
|
|
19
|
+
transcoded?: string[];
|
|
18
20
|
}
|
|
19
21
|
type Unlink = (path: string, callback: (err: NodeJS.ErrnoException | null) => void) => void;
|
|
20
22
|
/**
|
|
@@ -69,6 +69,14 @@ export interface HttpClientOptions {
|
|
|
69
69
|
*/
|
|
70
70
|
redactKeys?: RedactorOptions;
|
|
71
71
|
canRetry?: HttpCanRetry;
|
|
72
|
+
/**
|
|
73
|
+
* The undici API used to make calls. `"request"` (the default) uses `Dispatcher.request`, which
|
|
74
|
+
* avoids the overhead of the WHATWG fetch layer while keeping fetch's behaviour (default
|
|
75
|
+
* headers, response decompression, redirect following, error messages). `"fetch"` uses
|
|
76
|
+
* `undici.fetch` and is kept as a fallback. When omitted, the `SM_HTTP_CLIENT_TRANSPORT`
|
|
77
|
+
* environment variable (`"fetch"` or `"request"`, read once at load) selects it.
|
|
78
|
+
*/
|
|
79
|
+
transport?: "request" | "fetch";
|
|
72
80
|
onError?: (err: HttpError, method: HttpMethod, url: string, httpCode: number, reqJson?: unknown) => void;
|
|
73
81
|
}
|
|
74
82
|
export interface HttpClient {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": "TypeScript type definitions for the SyncMatters script API (types only - scripts execute on the SyncMatters platform)",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"author": "SyncMatters",
|
|
30
30
|
"homepage": "https://syncmatters.com",
|
|
31
|
-
"typesContentHash": "
|
|
31
|
+
"typesContentHash": "65571529e07eb24c545c835d7fae7c6930797856ef2a0833242e6f5e0bb847ba",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "*"
|
|
34
34
|
}
|