@jayfong/x-request 2.16.3 → 2.16.4

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": "@jayfong/x-request",
3
- "version": "2.16.3",
3
+ "version": "2.16.4",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "form-data": "^4.0.0",
17
- "formstream": "^1.2.0",
17
+ "formstream": "^1.3.1",
18
18
  "got": "^11.8.2",
19
19
  "proxy-agent": "^6.2.2",
20
20
  "tough-cookie": "^4.1.3",
@@ -1 +0,0 @@
1
- "use strict";
package/lib/typings.d.ts DELETED
@@ -1,49 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- declare module 'formstream' {
4
- import { Stream, Readable } from 'stream';
5
- class FormStream extends Stream {
6
- /**
7
- * Add a normal field to the form.
8
- *
9
- * @param name Name of field
10
- * @param value Value of field
11
- */
12
- field(name: string, value: string): this;
13
- /**
14
- * Add a local file to be uploaded to the form.
15
- *
16
- * @param name Name of file field
17
- * @param filepath Local path of the file to be uploaded
18
- * @param filename Name of the file (will be the base name of filepath if empty)
19
- * @param filesize Size of the file (will not generate Content-Length header if not specified)
20
- */
21
- file(name: string, filepath: string, filename?: string, filesize?: number): this;
22
- /**
23
- * Add a buffer as a file to upload.
24
- *
25
- * @param name Name of field
26
- * @param buffer The buffer to be uploaded
27
- * @param filename The file name that tells the remote server
28
- * @param contentType Content-Type (aka. MIME Type) of content (will be infered with filename if empty)
29
- */
30
- buffer(name: string, buffer: Buffer, filename: string, contentType?: string): this;
31
- /**
32
- * Add a readable stream as a file to upload. Event 'error' will be emitted if an error occured.
33
- *
34
- * @param name Name of field
35
- * @param stream A readable stream to be piped
36
- * @param filename The file name that tells the remote server
37
- * @param contentType Content-Type (aka. MIME Type) of content (will be infered with filename if empty)
38
- * @param size Size of the stream (will not generate Content-Length header if not specified)
39
- */
40
- stream(name: string, stream: Readable, filename: string, contentType?: string, size?: number): this;
41
- /**
42
- * Get headers for the request.
43
- *
44
- * @param additionalHeaders Additional headers
45
- */
46
- headers(additionalHeaders?: Record<string, any>): Record<string, any>;
47
- }
48
- export = FormStream;
49
- }
package/lib/typings.js DELETED
File without changes