@typescriptprime/securereq 1.1.0 → 1.2.0
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/dist/index.js +241 -4414
- package/dist/index.js.map +1 -7
- package/dist/{types/type.d.ts → type.d.ts} +1 -0
- package/dist/type.js +2 -0
- package/dist/type.js.map +1 -0
- package/dist/utils.js +11 -0
- package/dist/utils.js.map +1 -0
- package/package.json +11 -11
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/utils.d.ts → utils.d.ts} +0 -0
|
@@ -9,6 +9,7 @@ export interface HTTPSRequestOptions<E extends ExpectedAsKey = ExpectedAsKey> {
|
|
|
9
9
|
TLS?: TLSOptions;
|
|
10
10
|
HttpHeaders?: Record<string, string>;
|
|
11
11
|
HttpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
12
|
+
Payload?: string | ArrayBuffer | Uint8Array;
|
|
12
13
|
ExpectedAs?: E;
|
|
13
14
|
}
|
|
14
15
|
export interface HTTPSResponse<T extends unknown | string | ArrayBuffer> {
|
package/dist/type.js
ADDED
package/dist/type.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../sources/type.ts"],"names":[],"mappings":""}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function ConcatArrayBuffers(Buffers) {
|
|
2
|
+
const TotalLength = Buffers.reduce((Sum, Block) => Sum + Block.byteLength, 0);
|
|
3
|
+
const Result = new Uint8Array(TotalLength);
|
|
4
|
+
let Offset = 0;
|
|
5
|
+
for (const Buffer of Buffers) {
|
|
6
|
+
Result.set(new Uint8Array(Buffer), Offset);
|
|
7
|
+
Offset += Buffer.byteLength;
|
|
8
|
+
}
|
|
9
|
+
return Result.buffer;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../sources/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,OAAsB;IACvD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IAE7E,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;IAC1C,IAAI,MAAM,GAAG,CAAC,CAAA;IAEd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;QAC1C,MAAM,IAAI,MAAM,CAAC,UAAU,CAAA;IAC7B,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAA;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescriptprime/securereq",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "SecureReq is a lightweight utility for making secure HTTP requests, implemented in TypeScript",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"https",
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
"tls"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build
|
|
15
|
-
"
|
|
16
|
-
"build": "npm run build:esbuild && npm run build:tsc",
|
|
17
|
-
"lint": "eslint . --ext .ts",
|
|
14
|
+
"build": "tsc -p sources/tsconfig.json",
|
|
15
|
+
"lint": "eslint",
|
|
18
16
|
"test": "ava"
|
|
19
17
|
},
|
|
20
18
|
"exports": {
|
|
@@ -23,6 +21,7 @@
|
|
|
23
21
|
"types": "./dist/types/index.d.ts"
|
|
24
22
|
}
|
|
25
23
|
},
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
26
25
|
"files": [
|
|
27
26
|
"dist/**/*",
|
|
28
27
|
"LICENSE",
|
|
@@ -53,15 +52,16 @@
|
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@ava/typescript": "^6.0.0",
|
|
56
|
-
"@types/node": "^24.
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
55
|
+
"@types/node": "^24.11.0",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
57
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
58
|
+
"ava": "^7.0.0",
|
|
59
|
+
"eslint": "^10.0.2",
|
|
60
60
|
"tsx": "^4.21.0",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
|
-
"typescript-eslint": "^8.
|
|
62
|
+
"typescript-eslint": "^8.56.1"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"zod": "^4.3.
|
|
65
|
+
"zod": "^4.3.6"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
File without changes
|
|
File without changes
|