@rotorsoft/act-http 1.10.23 → 1.11.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/.tsbuildinfo +1 -1
- package/dist/@types/api/errors.d.ts +6 -1
- package/dist/@types/api/errors.d.ts.map +1 -1
- package/dist/@types/sse/broadcast.d.ts +2 -3
- package/dist/@types/sse/broadcast.d.ts.map +1 -1
- package/dist/api/index.cjs +3 -0
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.js +2 -2
- package/dist/{chunk-ZQGGGU4E.js → chunk-IIRUQWVH.js} +8 -4
- package/dist/chunk-IIRUQWVH.js.map +1 -0
- package/dist/{chunk-H545LMMV.js → chunk-YDHQXVDD.js} +2 -2
- package/dist/hono/index.cjs +3 -0
- package/dist/hono/index.cjs.map +1 -1
- package/dist/hono/index.js +4 -4
- package/dist/sse/index.cjs +1 -13
- package/dist/sse/index.cjs.map +1 -1
- package/dist/sse/index.js +1 -3
- package/dist/sse/index.js.map +1 -1
- package/dist/trpc/index.cjs +3 -0
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +4 -4
- package/package.json +4 -4
- package/dist/chunk-ZQGGGU4E.js.map +0 -1
- /package/dist/{chunk-H545LMMV.js.map → chunk-YDHQXVDD.js.map} +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* error parsers.
|
|
6
6
|
*
|
|
7
7
|
* - `error` — the framework error name (`"ValidationError"`,
|
|
8
|
-
* `"
|
|
8
|
+
* `"PreconditionError"`, …). Stable identifier, safe to switch on.
|
|
9
9
|
* - `detail` — the framework's message text. Human-readable; not
|
|
10
10
|
* parsed by clients.
|
|
11
11
|
* - `code` — a machine-readable status code from {@link ERROR_MAP}
|
|
@@ -38,6 +38,11 @@ export declare const ERROR_MAP: {
|
|
|
38
38
|
readonly status: 422;
|
|
39
39
|
readonly code: "VALIDATION";
|
|
40
40
|
};
|
|
41
|
+
readonly PreconditionError: {
|
|
42
|
+
readonly status: 409;
|
|
43
|
+
readonly code: "PRECONDITION";
|
|
44
|
+
};
|
|
45
|
+
/** @deprecated Thrown only by the deprecated `.given` rules. Removed in 2.0. */
|
|
41
46
|
readonly InvariantError: {
|
|
42
47
|
readonly status: 409;
|
|
43
48
|
readonly code: "INVARIANT";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/api/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/api/errors.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;iBACD,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,YAAY;;;iBAC7B,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,cAAc;;IACtD,gFAAgF;;iBAC9D,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,WAAW;;;iBAC5B,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,aAAa;;;iBAC/B,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,eAAe;;;iBAClC,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,eAAe;;CACP,CAAC;AAenD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAuB3E"}
|
|
@@ -30,9 +30,8 @@ export declare class BroadcastChannel<S extends BroadcastState = BroadcastState>
|
|
|
30
30
|
/**
|
|
31
31
|
* Called when a subscriber callback throws. The frame is still delivered
|
|
32
32
|
* to every other subscriber and the publish still returns normally — a
|
|
33
|
-
* bad consumer must not break the publisher
|
|
34
|
-
*
|
|
35
|
-
* routes framework logs.
|
|
33
|
+
* bad consumer must not break the publisher. Defaults to `console.error`;
|
|
34
|
+
* pass your logger here to route it with the rest of your logs.
|
|
36
35
|
*/
|
|
37
36
|
onSubscriberError?: (error: unknown, streamId: string) => void;
|
|
38
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast.d.ts","sourceRoot":"","sources":["../../../src/sse/broadcast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"broadcast.d.ts","sourceRoot":"","sources":["../../../src/sse/broadcast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AA4KpB,qBAAa,gBAAgB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACrE,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB,CAA6C;IACxE,OAAO,CAAC,eAAe,CAA6B;IAEpD,YAAY,OAAO,CAAC,EAAE;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;;;;;;;;;WAcG;QACH,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC3C;;;;;WAKG;QACH,iBAAiB,CAAC,EAAE,CAAC,KAA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HANGED
|
@@ -37,6 +37,8 @@ module.exports = __toCommonJS(api_exports);
|
|
|
37
37
|
var import_act = require("@rotorsoft/act");
|
|
38
38
|
var ERROR_MAP = {
|
|
39
39
|
ValidationError: { status: 422, code: "VALIDATION" },
|
|
40
|
+
PreconditionError: { status: 409, code: "PRECONDITION" },
|
|
41
|
+
/** @deprecated Thrown only by the deprecated `.given` rules. Removed in 2.0. */
|
|
40
42
|
InvariantError: { status: 409, code: "INVARIANT" },
|
|
41
43
|
ConcurrencyError: { status: 412, code: "CONCURRENCY" },
|
|
42
44
|
StreamClosedError: { status: 410, code: "STREAM_CLOSED" },
|
|
@@ -44,6 +46,7 @@ var ERROR_MAP = {
|
|
|
44
46
|
};
|
|
45
47
|
var lookup_known = (err) => {
|
|
46
48
|
if (err instanceof import_act.ValidationError) return { name: "ValidationError" };
|
|
49
|
+
if (err instanceof import_act.PreconditionError) return { name: "PreconditionError" };
|
|
47
50
|
if (err instanceof import_act.InvariantError) return { name: "InvariantError" };
|
|
48
51
|
if (err instanceof import_act.ConcurrencyError) return { name: "ConcurrencyError" };
|
|
49
52
|
if (err instanceof import_act.StreamClosedError) return { name: "StreamClosedError" };
|