fortepiano 0.1.7 → 0.1.8

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 CHANGED
@@ -4,6 +4,16 @@ 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.8](https://github.com/facile-it/fortepiano/compare/v0.1.7...v0.1.8) - 2023-07-10
8
+
9
+ ### Added
10
+
11
+ - Complete the list of `Http` errors.
12
+
13
+ ### Security
14
+
15
+ - Fix CVE-2023-26136.
16
+
7
17
  ## [0.1.7](https://github.com/facile-it/fortepiano/compare/v0.1.6...v0.1.7) - 2023-01-02
8
18
 
9
19
  ### 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/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.7",
3
+ "version": "0.1.8",
4
4
  "description": "Playing actual music over fp-ts notes",
5
5
  "keywords": [
6
6
  "typescript",