fortepiano 0.1.7 → 0.1.9
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/CHANGELOG.md +18 -0
- package/Http.d.ts +1 -1
- package/README.md +1 -1
- package/esm/Http.js +37 -0
- package/lib/Http.d.ts +1 -1
- package/lib/Http.js +37 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.9](https://github.com/facile-it/fortepiano/compare/v0.1.8...v0.1.9) - 2024-05-14
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- Fix CVE-2022-25883.
|
|
12
|
+
|
|
13
|
+
## [0.1.8](https://github.com/facile-it/fortepiano/compare/v0.1.7...v0.1.8) - 2023-07-10
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Complete the list of `Http` errors.
|
|
18
|
+
|
|
19
|
+
### Security
|
|
20
|
+
|
|
21
|
+
- Fix CVE-2022-46175.
|
|
22
|
+
- Fix CVE-2022-25881.
|
|
23
|
+
- Fix CVE-2023-26136.
|
|
24
|
+
|
|
7
25
|
## [0.1.7](https://github.com/facile-it/fortepiano/compare/v0.1.6...v0.1.7) - 2023-01-02
|
|
8
26
|
|
|
9
27
|
### Added
|
package/Http.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const HttpResponseC: <C extends t.Mixed>(codec: C) => t.TypeC<{
|
|
|
50
50
|
headers: t.ReadonlyC<t.RecordC<t.StringC, t.UnionC<[t.StringC, t.ReadonlyArrayC<t.StringC>]>>>;
|
|
51
51
|
body: C;
|
|
52
52
|
}>;
|
|
53
|
-
export declare const HttpErrorC: <A extends "BadRequest" | "Unauthorized" | "Forbidden" | "NotFound" | "UnprocessableEntity">(type?: A | undefined) => t.Type<HttpError, HttpError, unknown>;
|
|
53
|
+
export declare const HttpErrorC: <A extends "BadRequest" | "Unauthorized" | "PaymentRequired" | "Forbidden" | "NotFound" | "MethodNotAllowed" | "NotAcceptable" | "ProxyAuthenticationRequired" | "RequestTimeout" | "Conflict" | "Gone" | "LengthRequired" | "PreconditionFailed" | "PayloadTooLarge" | "RequestUriTooLong" | "UnsupportedMediaType" | "RequestedRangeNotSatisfiable" | "ExpectationFailed" | "ImATeapot" | "MisdirectedRequest" | "UnprocessableEntity" | "Locked" | "FailedDependency" | "UpgradeRequired" | "PreconditionRequired" | "TooManyRequests" | "RequestHeaderFieldsTooLarge" | "ConnectionClosedWithoutResponse" | "UnavailableForLegalReasons" | "ClientClosedRequest" | "InternalServerError" | "NotImplemented" | "BadGateway" | "ServiceUnavailable" | "GatewayTimeout" | "HttpVersionNotSupported" | "VariantAlsoNegotiates" | "InsufficientStorage" | "LoopDetected" | "NotExtended" | "NetworkAuthenticationRequired" | "NetworkConnectTimeoutError">(type?: A | undefined) => t.Type<HttpError, HttpError, unknown>;
|
|
54
54
|
export declare const json: (http: Http) => Http;
|
|
55
55
|
export declare const buffer: (http: Http) => Http;
|
|
56
56
|
export declare const cache: (cache: $C.Cache) => (http: Http) => Http;
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ See the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.
|
|
|
49
49
|
|
|
50
50
|
- [Davide Caruso](https://github.com/davidecaruso)
|
|
51
51
|
- [Pier Roberto Lucisano](https://github.com/pierroberto)
|
|
52
|
-
- [Alberto Villa](https://github.com/
|
|
52
|
+
- [Alberto Villa](https://github.com/xzhayon)
|
|
53
53
|
|
|
54
54
|
## License
|
|
55
55
|
|
package/esm/Http.js
CHANGED
|
@@ -15,9 +15,46 @@ import * as $T from './Type';
|
|
|
15
15
|
const ERRORS = {
|
|
16
16
|
BadRequest: 400,
|
|
17
17
|
Unauthorized: 401,
|
|
18
|
+
PaymentRequired: 402,
|
|
18
19
|
Forbidden: 403,
|
|
19
20
|
NotFound: 404,
|
|
21
|
+
MethodNotAllowed: 405,
|
|
22
|
+
NotAcceptable: 406,
|
|
23
|
+
ProxyAuthenticationRequired: 407,
|
|
24
|
+
RequestTimeout: 408,
|
|
25
|
+
Conflict: 409,
|
|
26
|
+
Gone: 410,
|
|
27
|
+
LengthRequired: 411,
|
|
28
|
+
PreconditionFailed: 412,
|
|
29
|
+
PayloadTooLarge: 413,
|
|
30
|
+
RequestUriTooLong: 414,
|
|
31
|
+
UnsupportedMediaType: 415,
|
|
32
|
+
RequestedRangeNotSatisfiable: 416,
|
|
33
|
+
ExpectationFailed: 417,
|
|
34
|
+
ImATeapot: 418,
|
|
35
|
+
MisdirectedRequest: 421,
|
|
20
36
|
UnprocessableEntity: 422,
|
|
37
|
+
Locked: 423,
|
|
38
|
+
FailedDependency: 424,
|
|
39
|
+
UpgradeRequired: 426,
|
|
40
|
+
PreconditionRequired: 428,
|
|
41
|
+
TooManyRequests: 429,
|
|
42
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
43
|
+
ConnectionClosedWithoutResponse: 444,
|
|
44
|
+
UnavailableForLegalReasons: 451,
|
|
45
|
+
ClientClosedRequest: 499,
|
|
46
|
+
InternalServerError: 500,
|
|
47
|
+
NotImplemented: 501,
|
|
48
|
+
BadGateway: 502,
|
|
49
|
+
ServiceUnavailable: 503,
|
|
50
|
+
GatewayTimeout: 504,
|
|
51
|
+
HttpVersionNotSupported: 505,
|
|
52
|
+
VariantAlsoNegotiates: 506,
|
|
53
|
+
InsufficientStorage: 507,
|
|
54
|
+
LoopDetected: 508,
|
|
55
|
+
NotExtended: 510,
|
|
56
|
+
NetworkAuthenticationRequired: 511,
|
|
57
|
+
NetworkConnectTimeoutError: 599,
|
|
21
58
|
};
|
|
22
59
|
export class HttpError extends Error {
|
|
23
60
|
constructor(response, message) {
|
package/lib/Http.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const HttpResponseC: <C extends t.Mixed>(codec: C) => t.TypeC<{
|
|
|
50
50
|
headers: t.ReadonlyC<t.RecordC<t.StringC, t.UnionC<[t.StringC, t.ReadonlyArrayC<t.StringC>]>>>;
|
|
51
51
|
body: C;
|
|
52
52
|
}>;
|
|
53
|
-
export declare const HttpErrorC: <A extends "BadRequest" | "Unauthorized" | "Forbidden" | "NotFound" | "UnprocessableEntity">(type?: A | undefined) => t.Type<HttpError, HttpError, unknown>;
|
|
53
|
+
export declare const HttpErrorC: <A extends "BadRequest" | "Unauthorized" | "PaymentRequired" | "Forbidden" | "NotFound" | "MethodNotAllowed" | "NotAcceptable" | "ProxyAuthenticationRequired" | "RequestTimeout" | "Conflict" | "Gone" | "LengthRequired" | "PreconditionFailed" | "PayloadTooLarge" | "RequestUriTooLong" | "UnsupportedMediaType" | "RequestedRangeNotSatisfiable" | "ExpectationFailed" | "ImATeapot" | "MisdirectedRequest" | "UnprocessableEntity" | "Locked" | "FailedDependency" | "UpgradeRequired" | "PreconditionRequired" | "TooManyRequests" | "RequestHeaderFieldsTooLarge" | "ConnectionClosedWithoutResponse" | "UnavailableForLegalReasons" | "ClientClosedRequest" | "InternalServerError" | "NotImplemented" | "BadGateway" | "ServiceUnavailable" | "GatewayTimeout" | "HttpVersionNotSupported" | "VariantAlsoNegotiates" | "InsufficientStorage" | "LoopDetected" | "NotExtended" | "NetworkAuthenticationRequired" | "NetworkConnectTimeoutError">(type?: A | undefined) => t.Type<HttpError, HttpError, unknown>;
|
|
54
54
|
export declare const json: (http: Http) => Http;
|
|
55
55
|
export declare const buffer: (http: Http) => Http;
|
|
56
56
|
export declare const cache: (cache: $C.Cache) => (http: Http) => Http;
|
package/lib/Http.js
CHANGED
|
@@ -42,9 +42,46 @@ const $T = __importStar(require("./Type"));
|
|
|
42
42
|
const ERRORS = {
|
|
43
43
|
BadRequest: 400,
|
|
44
44
|
Unauthorized: 401,
|
|
45
|
+
PaymentRequired: 402,
|
|
45
46
|
Forbidden: 403,
|
|
46
47
|
NotFound: 404,
|
|
48
|
+
MethodNotAllowed: 405,
|
|
49
|
+
NotAcceptable: 406,
|
|
50
|
+
ProxyAuthenticationRequired: 407,
|
|
51
|
+
RequestTimeout: 408,
|
|
52
|
+
Conflict: 409,
|
|
53
|
+
Gone: 410,
|
|
54
|
+
LengthRequired: 411,
|
|
55
|
+
PreconditionFailed: 412,
|
|
56
|
+
PayloadTooLarge: 413,
|
|
57
|
+
RequestUriTooLong: 414,
|
|
58
|
+
UnsupportedMediaType: 415,
|
|
59
|
+
RequestedRangeNotSatisfiable: 416,
|
|
60
|
+
ExpectationFailed: 417,
|
|
61
|
+
ImATeapot: 418,
|
|
62
|
+
MisdirectedRequest: 421,
|
|
47
63
|
UnprocessableEntity: 422,
|
|
64
|
+
Locked: 423,
|
|
65
|
+
FailedDependency: 424,
|
|
66
|
+
UpgradeRequired: 426,
|
|
67
|
+
PreconditionRequired: 428,
|
|
68
|
+
TooManyRequests: 429,
|
|
69
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
70
|
+
ConnectionClosedWithoutResponse: 444,
|
|
71
|
+
UnavailableForLegalReasons: 451,
|
|
72
|
+
ClientClosedRequest: 499,
|
|
73
|
+
InternalServerError: 500,
|
|
74
|
+
NotImplemented: 501,
|
|
75
|
+
BadGateway: 502,
|
|
76
|
+
ServiceUnavailable: 503,
|
|
77
|
+
GatewayTimeout: 504,
|
|
78
|
+
HttpVersionNotSupported: 505,
|
|
79
|
+
VariantAlsoNegotiates: 506,
|
|
80
|
+
InsufficientStorage: 507,
|
|
81
|
+
LoopDetected: 508,
|
|
82
|
+
NotExtended: 510,
|
|
83
|
+
NetworkAuthenticationRequired: 511,
|
|
84
|
+
NetworkConnectTimeoutError: 599,
|
|
48
85
|
};
|
|
49
86
|
class HttpError extends Error {
|
|
50
87
|
constructor(response, message) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fortepiano",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Playing actual music over fp-ts notes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@types/node-fetch": "^2.5.12",
|
|
46
46
|
"@types/redis": "^2.0.0",
|
|
47
47
|
"@types/redis-mock": "^0.17.0",
|
|
48
|
-
"axios": "^0.
|
|
48
|
+
"axios": "^0.28.0",
|
|
49
49
|
"eslint": "^8.16.0",
|
|
50
50
|
"eslint-config-facile": "^0.5.0",
|
|
51
51
|
"fp-ts": "^2.0.0",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"redis": "^3.0.0",
|
|
63
63
|
"redis-mock": "^0.56.3",
|
|
64
64
|
"ts-jest": "^26.5.6",
|
|
65
|
-
"ts-node": "^9.
|
|
65
|
+
"ts-node": "^10.9.2",
|
|
66
66
|
"typescript": "^4.6.4"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@slynova/flydrive": "^1.0.0",
|
|
70
70
|
"@types/memcached": "^2.0.0",
|
|
71
71
|
"@types/redis": "^2.0.0",
|
|
72
|
-
"axios": "^0.21.2",
|
|
72
|
+
"axios": "^0.21.2 || ^0.28.0",
|
|
73
73
|
"fp-ts": "^2.0.0",
|
|
74
74
|
"got": "^11.0.0",
|
|
75
75
|
"io-ts": "^2.0.0",
|