@prisma/client-engine-runtime 7.2.0 → 7.3.0-dev.2
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.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/sql-commenter.d.ts +4 -1
- package/package.json +9 -5
package/dist/index.d.mts
CHANGED
|
@@ -17,6 +17,9 @@ import { Transaction } from '@prisma/driver-adapter-utils';
|
|
|
17
17
|
/**
|
|
18
18
|
* Applies SQL commenter plugins and returns the merged key-value pairs.
|
|
19
19
|
* Keys with undefined values are filtered out.
|
|
20
|
+
*
|
|
21
|
+
* Each plugin receives a deep clone of the context to prevent mutations
|
|
22
|
+
* that could affect other plugins.
|
|
20
23
|
*/
|
|
21
24
|
export declare function applySqlCommenters(plugins: SqlCommenterPlugin[], context: SqlCommenterContext): Record<string, string>;
|
|
22
25
|
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ import { Transaction } from '@prisma/driver-adapter-utils';
|
|
|
17
17
|
/**
|
|
18
18
|
* Applies SQL commenter plugins and returns the merged key-value pairs.
|
|
19
19
|
* Keys with undefined values are filtered out.
|
|
20
|
+
*
|
|
21
|
+
* Each plugin receives a deep clone of the context to prevent mutations
|
|
22
|
+
* that could affect other plugins.
|
|
20
23
|
*/
|
|
21
24
|
export declare function applySqlCommenters(plugins: SqlCommenterPlugin[], context: SqlCommenterContext): Record<string, string>;
|
|
22
25
|
|
package/dist/index.js
CHANGED
|
@@ -700,6 +700,7 @@ function normalizeDateTime(dt) {
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
// src/sql-commenter.ts
|
|
703
|
+
var import_klona = require("klona");
|
|
703
704
|
function formatSqlComment(tags) {
|
|
704
705
|
const entries = Object.entries(tags);
|
|
705
706
|
if (entries.length === 0) {
|
|
@@ -716,7 +717,7 @@ function formatSqlComment(tags) {
|
|
|
716
717
|
function applySqlCommenters(plugins, context) {
|
|
717
718
|
const merged = {};
|
|
718
719
|
for (const plugin of plugins) {
|
|
719
|
-
const tags = plugin(context);
|
|
720
|
+
const tags = plugin((0, import_klona.klona)(context));
|
|
720
721
|
for (const [key, value] of Object.entries(tags)) {
|
|
721
722
|
if (value !== void 0) {
|
|
722
723
|
merged[key] = value;
|
package/dist/index.mjs
CHANGED
|
@@ -649,6 +649,7 @@ function normalizeDateTime(dt) {
|
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
// src/sql-commenter.ts
|
|
652
|
+
import { klona } from "klona";
|
|
652
653
|
function formatSqlComment(tags) {
|
|
653
654
|
const entries = Object.entries(tags);
|
|
654
655
|
if (entries.length === 0) {
|
|
@@ -665,7 +666,7 @@ function formatSqlComment(tags) {
|
|
|
665
666
|
function applySqlCommenters(plugins, context) {
|
|
666
667
|
const merged = {};
|
|
667
668
|
for (const plugin of plugins) {
|
|
668
|
-
const tags = plugin(context);
|
|
669
|
+
const tags = plugin(klona(context));
|
|
669
670
|
for (const [key, value] of Object.entries(tags)) {
|
|
670
671
|
if (value !== void 0) {
|
|
671
672
|
merged[key] = value;
|
package/dist/sql-commenter.d.ts
CHANGED
|
@@ -10,12 +10,15 @@ import type { SqlCommenterContext, SqlCommenterPlugin } from '@prisma/sqlcomment
|
|
|
10
10
|
* 5. Replace ' with \' in values (after URL encoding)
|
|
11
11
|
* 6. Wrap values in single quotes
|
|
12
12
|
* 7. Join key='value' pairs with commas
|
|
13
|
-
* 8. Wrap in
|
|
13
|
+
* 8. Wrap in a SQL comment
|
|
14
14
|
*/
|
|
15
15
|
export declare function formatSqlComment(tags: Record<string, string>): string;
|
|
16
16
|
/**
|
|
17
17
|
* Applies SQL commenter plugins and returns the merged key-value pairs.
|
|
18
18
|
* Keys with undefined values are filtered out.
|
|
19
|
+
*
|
|
20
|
+
* Each plugin receives a deep clone of the context to prevent mutations
|
|
21
|
+
* that could affect other plugins.
|
|
19
22
|
*/
|
|
20
23
|
export declare function applySqlCommenters(plugins: SqlCommenterPlugin[], context: SqlCommenterContext): Record<string, string>;
|
|
21
24
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-dev.2",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,17 +27,21 @@
|
|
|
27
27
|
"@bugsnag/cuid": "3.2.1",
|
|
28
28
|
"@opentelemetry/api": "1.9.0",
|
|
29
29
|
"@paralleldrive/cuid2": "2.2.2",
|
|
30
|
+
"klona": "2.0.6",
|
|
30
31
|
"nanoid": "5.1.5",
|
|
31
32
|
"ulid": "3.0.0",
|
|
32
33
|
"uuid": "11.1.0",
|
|
33
|
-
"@prisma/client-runtime-utils": "7.
|
|
34
|
-
"@prisma/debug": "7.
|
|
35
|
-
"@prisma/driver-adapter-utils": "7.
|
|
36
|
-
"@prisma/sqlcommenter": "7.
|
|
34
|
+
"@prisma/client-runtime-utils": "7.3.0-dev.2",
|
|
35
|
+
"@prisma/debug": "7.3.0-dev.2",
|
|
36
|
+
"@prisma/driver-adapter-utils": "7.3.0-dev.2",
|
|
37
|
+
"@prisma/sqlcommenter": "7.3.0-dev.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
40
|
+
"@codspeed/benchmark.js-plugin": "4.0.0",
|
|
41
|
+
"@types/benchmark": "2.1.5",
|
|
39
42
|
"@types/jest": "29.5.14",
|
|
40
43
|
"@types/node": "~20.19.24",
|
|
44
|
+
"benchmark": "2.1.4",
|
|
41
45
|
"jest": "29.7.0",
|
|
42
46
|
"jest-junit": "16.0.0"
|
|
43
47
|
},
|