@prisma/orm-framework 8.0.0-rc.4-dev.7 → 8.0.0-rc.4-dev.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/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
- package/dist/utils.d.mts +2 -1
- package/dist/utils.mjs +2 -1
- package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
- package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
- package/package.json +16 -15
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region ../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.d.mts
|
|
2
|
+
//#region src/suppress-idle-connection-errors.d.ts
|
|
3
|
+
interface ErrorEventSource {
|
|
4
|
+
on(event: 'error', listener: (err: Error) => void): unknown;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Connection libraries emit 'error' on a pool or client when an idle
|
|
8
|
+
* connection drops (database restart, pooler timeout, network blip). With no
|
|
9
|
+
* listener Node treats that as an uncaught exception and kills the process.
|
|
10
|
+
* Connect and query failures still reject their own promises, so nothing real
|
|
11
|
+
* is masked. A pool discards the dead connection and hands the next query a
|
|
12
|
+
* fresh one; a single client stays unusable and its later operations reject.
|
|
13
|
+
* Idempotent per emitter: repeated calls attach one listener.
|
|
14
|
+
*/
|
|
15
|
+
declare function suppressIdleConnectionErrors<T extends ErrorEventSource>(target: T): T;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { suppressIdleConnectionErrors as t };
|
|
18
|
+
//# sourceMappingURL=suppress-idle-connection-errors-CKrTbp5P.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress-idle-connection-errors-CKrTbp5P.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.d.mts"],"mappings":";;UACU;EACR,GAAG,gBAAgB,WAAW,KAAK;;;;;;;;;;;iBAWpB,6BAA6B,UAAU,kBAAkB,QAAQ,IAAI"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region ../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.mjs
|
|
2
|
+
const suppressed = /* @__PURE__ */ new WeakSet();
|
|
3
|
+
/**
|
|
4
|
+
* Connection libraries emit 'error' on a pool or client when an idle
|
|
5
|
+
* connection drops (database restart, pooler timeout, network blip). With no
|
|
6
|
+
* listener Node treats that as an uncaught exception and kills the process.
|
|
7
|
+
* Connect and query failures still reject their own promises, so nothing real
|
|
8
|
+
* is masked. A pool discards the dead connection and hands the next query a
|
|
9
|
+
* fresh one; a single client stays unusable and its later operations reject.
|
|
10
|
+
* Idempotent per emitter: repeated calls attach one listener.
|
|
11
|
+
*/
|
|
12
|
+
function suppressIdleConnectionErrors(target) {
|
|
13
|
+
if (!suppressed.has(target)) {
|
|
14
|
+
suppressed.add(target);
|
|
15
|
+
target.on("error", () => {});
|
|
16
|
+
}
|
|
17
|
+
return target;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { suppressIdleConnectionErrors as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=suppress-idle-connection-errors-DzApeUb3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress-idle-connection-errors-DzApeUb3.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.mjs"],"sourcesContent":["//#region src/suppress-idle-connection-errors.ts\nconst suppressed = /* @__PURE__ */ new WeakSet();\n/**\n* Connection libraries emit 'error' on a pool or client when an idle\n* connection drops (database restart, pooler timeout, network blip). With no\n* listener Node treats that as an uncaught exception and kills the process.\n* Connect and query failures still reject their own promises, so nothing real\n* is masked. A pool discards the dead connection and hands the next query a\n* fresh one; a single client stays unusable and its later operations reject.\n* Idempotent per emitter: repeated calls attach one listener.\n*/\nfunction suppressIdleConnectionErrors(target) {\n\tif (!suppressed.has(target)) {\n\t\tsuppressed.add(target);\n\t\ttarget.on(\"error\", () => {});\n\t}\n\treturn target;\n}\n//#endregion\nexport { suppressIdleConnectionErrors };\n\n//# sourceMappingURL=suppress-idle-connection-errors.mjs.map"],"mappings":";AACA,MAAM,6BAA6B,IAAI,QAAQ;;;;;;;;;;AAU/C,SAAS,6BAA6B,QAAQ;CAC7C,IAAI,CAAC,WAAW,IAAI,MAAM,GAAG;EAC5B,WAAW,IAAI,MAAM;EACrB,OAAO,GAAG,eAAe,CAAC,CAAC;CAC5B;CACA,OAAO;AACR"}
|
package/dist/utils.d.mts
CHANGED
|
@@ -13,4 +13,5 @@ import { n as assertNever, r as isInternalError, t as InternalError } from "./in
|
|
|
13
13
|
import { t as isThenable } from "./promise-DHJWZv49.mjs";
|
|
14
14
|
import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
|
|
15
15
|
import { t as SimplifyDeep } from "./simplify-deep-Dw9I_ZUl.mjs";
|
|
16
|
-
|
|
16
|
+
import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-CKrTbp5P.mjs";
|
|
17
|
+
export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NextAction, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError, suppressIdleConnectionErrors };
|
package/dist/utils.mjs
CHANGED
|
@@ -10,4 +10,5 @@ import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
|
|
|
10
10
|
import { t as isThenable } from "./promise-D8meygPf.mjs";
|
|
11
11
|
import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
|
|
12
12
|
import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
|
|
13
|
-
|
|
13
|
+
import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-DzApeUb3.mjs";
|
|
14
|
+
export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError, suppressIdleConnectionErrors };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.4-dev.
|
|
3
|
+
"version": "8.0.0-rc.4-dev.9",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"uniku": "^0.5.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "8.0.0-rc.4-dev.
|
|
19
|
-
"@internal/contract": "8.0.0-rc.4-dev.
|
|
20
|
-
"@internal/contract-authoring": "8.0.0-rc.4-dev.
|
|
21
|
-
"@internal/errors": "8.0.0-rc.4-dev.
|
|
22
|
-
"@internal/framework-components": "8.0.0-rc.4-dev.
|
|
23
|
-
"@internal/ids": "8.0.0-rc.4-dev.
|
|
24
|
-
"@internal/operations": "8.0.0-rc.4-dev.
|
|
25
|
-
"@internal/psl-parser": "8.0.0-rc.4-dev.
|
|
26
|
-
"@internal/psl-printer": "8.0.0-rc.4-dev.
|
|
27
|
-
"@internal/ts-render": "8.0.0-rc.4-dev.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.4-dev.
|
|
29
|
-
"@internal/publish-surface": "8.0.0-rc.4-dev.
|
|
30
|
-
"@repo/tsdown": "8.0.0-rc.4-dev.
|
|
31
|
-
"@internal/utils": "8.0.0-rc.4-dev.
|
|
18
|
+
"@internal/config": "8.0.0-rc.4-dev.9",
|
|
19
|
+
"@internal/contract": "8.0.0-rc.4-dev.9",
|
|
20
|
+
"@internal/contract-authoring": "8.0.0-rc.4-dev.9",
|
|
21
|
+
"@internal/errors": "8.0.0-rc.4-dev.9",
|
|
22
|
+
"@internal/framework-components": "8.0.0-rc.4-dev.9",
|
|
23
|
+
"@internal/ids": "8.0.0-rc.4-dev.9",
|
|
24
|
+
"@internal/operations": "8.0.0-rc.4-dev.9",
|
|
25
|
+
"@internal/psl-parser": "8.0.0-rc.4-dev.9",
|
|
26
|
+
"@internal/psl-printer": "8.0.0-rc.4-dev.9",
|
|
27
|
+
"@internal/ts-render": "8.0.0-rc.4-dev.9",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.4-dev.9",
|
|
29
|
+
"@internal/publish-surface": "8.0.0-rc.4-dev.9",
|
|
30
|
+
"@repo/tsdown": "8.0.0-rc.4-dev.9",
|
|
31
|
+
"@internal/utils": "8.0.0-rc.4-dev.9",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "4.1.10"
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"./utils/result": "./dist/utils__result.mjs",
|
|
98
98
|
"./utils/simplify-deep": "./dist/utils__simplify-deep.mjs",
|
|
99
99
|
"./utils/structured-error": "./dist/utils__structured-error.mjs",
|
|
100
|
+
"./utils/suppress-idle-connection-errors": "./dist/utils__suppress-idle-connection-errors.mjs",
|
|
100
101
|
"./utils/types": "./dist/utils__types.mjs",
|
|
101
102
|
"./package.json": "./package.json"
|
|
102
103
|
},
|