@prisma/generator-helper 7.2.0 → 7.3.0-integration-prisma6-fix-cloudflare-engine.1
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/GeneratorProcess.js +4 -3
- package/dist/byline.d.ts +4 -0
- package/dist/byline.js +28 -0
- package/dist/chunk-EOPVK4AE.js +125 -0
- package/dist/{chunk-AWUR6KKS.js → chunk-IH6S2YZX.js} +6 -20
- package/dist/{chunk-UMIHM3GW.js → chunk-MXZE5TCU.js} +9 -22
- package/dist/generatorHandler.js +3 -2
- package/dist/index.js +6 -5
- package/package.json +7 -7
package/dist/GeneratorProcess.js
CHANGED
|
@@ -18,10 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var GeneratorProcess_exports = {};
|
|
20
20
|
__export(GeneratorProcess_exports, {
|
|
21
|
-
GeneratorError: () =>
|
|
22
|
-
GeneratorProcess: () =>
|
|
21
|
+
GeneratorError: () => import_chunk_MXZE5TCU.GeneratorError,
|
|
22
|
+
GeneratorProcess: () => import_chunk_MXZE5TCU.GeneratorProcess
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(GeneratorProcess_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_MXZE5TCU = require("./chunk-MXZE5TCU.js");
|
|
26
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
26
27
|
var import_chunk_KEYE2GFS = require("./chunk-KEYE2GFS.js");
|
|
27
28
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
package/dist/byline.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export default function byline(readStream: any, options?: any): any;
|
|
2
|
+
export declare function createStream(readStream: any, options: any): any;
|
|
3
|
+
export declare function createLineStream(readStream: any, options: any): any;
|
|
4
|
+
export declare function LineStream(this: any, options: any): void;
|
package/dist/byline.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var byline_exports = {};
|
|
20
|
+
__export(byline_exports, {
|
|
21
|
+
LineStream: () => import_chunk_EOPVK4AE.LineStream,
|
|
22
|
+
createLineStream: () => import_chunk_EOPVK4AE.createLineStream,
|
|
23
|
+
createStream: () => import_chunk_EOPVK4AE.createStream,
|
|
24
|
+
default: () => import_chunk_EOPVK4AE.byline
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(byline_exports);
|
|
27
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
28
|
+
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_EOPVK4AE_exports = {};
|
|
30
|
+
__export(chunk_EOPVK4AE_exports, {
|
|
31
|
+
LineStream: () => LineStream,
|
|
32
|
+
byline: () => byline,
|
|
33
|
+
createLineStream: () => createLineStream,
|
|
34
|
+
createStream: () => createStream
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(chunk_EOPVK4AE_exports);
|
|
37
|
+
var import_stream = __toESM(require("stream"));
|
|
38
|
+
var import_util = __toESM(require("util"));
|
|
39
|
+
function byline(readStream, options) {
|
|
40
|
+
return createStream(readStream, options);
|
|
41
|
+
}
|
|
42
|
+
function createStream(readStream, options) {
|
|
43
|
+
if (readStream) {
|
|
44
|
+
return createLineStream(readStream, options);
|
|
45
|
+
} else {
|
|
46
|
+
return new LineStream(options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function createLineStream(readStream, options) {
|
|
50
|
+
if (!readStream) {
|
|
51
|
+
throw new Error("expected readStream");
|
|
52
|
+
}
|
|
53
|
+
if (!readStream.readable) {
|
|
54
|
+
throw new Error("readStream must be readable");
|
|
55
|
+
}
|
|
56
|
+
const ls = new LineStream(options);
|
|
57
|
+
readStream.pipe(ls);
|
|
58
|
+
return ls;
|
|
59
|
+
}
|
|
60
|
+
function LineStream(options) {
|
|
61
|
+
import_stream.default.Transform.call(this, options);
|
|
62
|
+
options = options || {};
|
|
63
|
+
this._readableState.objectMode = true;
|
|
64
|
+
this._lineBuffer = [];
|
|
65
|
+
this._keepEmptyLines = options.keepEmptyLines || false;
|
|
66
|
+
this._lastChunkEndedWithCR = false;
|
|
67
|
+
this.on("pipe", function(src) {
|
|
68
|
+
if (!this.encoding) {
|
|
69
|
+
if (src instanceof import_stream.default.Readable) {
|
|
70
|
+
this.encoding = src._readableState.encoding;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
import_util.default.inherits(LineStream, import_stream.default.Transform);
|
|
76
|
+
LineStream.prototype._transform = function(chunk, encoding, done) {
|
|
77
|
+
encoding = encoding || "utf8";
|
|
78
|
+
if (Buffer.isBuffer(chunk)) {
|
|
79
|
+
if (encoding == "buffer") {
|
|
80
|
+
chunk = chunk.toString();
|
|
81
|
+
encoding = "utf8";
|
|
82
|
+
} else {
|
|
83
|
+
chunk = chunk.toString(encoding);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
this._chunkEncoding = encoding;
|
|
87
|
+
const lines = chunk.split(/\r\n|\r|\n/g);
|
|
88
|
+
if (this._lastChunkEndedWithCR && chunk[0] == "\n") {
|
|
89
|
+
lines.shift();
|
|
90
|
+
}
|
|
91
|
+
if (this._lineBuffer.length > 0) {
|
|
92
|
+
this._lineBuffer[this._lineBuffer.length - 1] += lines[0];
|
|
93
|
+
lines.shift();
|
|
94
|
+
}
|
|
95
|
+
this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r";
|
|
96
|
+
this._lineBuffer = this._lineBuffer.concat(lines);
|
|
97
|
+
this._pushBuffer(encoding, 1, done);
|
|
98
|
+
};
|
|
99
|
+
LineStream.prototype._pushBuffer = function(encoding, keep, done) {
|
|
100
|
+
while (this._lineBuffer.length > keep) {
|
|
101
|
+
const line = this._lineBuffer.shift();
|
|
102
|
+
if (this._keepEmptyLines || line.length > 0) {
|
|
103
|
+
if (!this.push(this._reencode(line, encoding))) {
|
|
104
|
+
const self = this;
|
|
105
|
+
setImmediate(function() {
|
|
106
|
+
self._pushBuffer(encoding, keep, done);
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
done();
|
|
113
|
+
};
|
|
114
|
+
LineStream.prototype._flush = function(done) {
|
|
115
|
+
this._pushBuffer(this._chunkEncoding, 0, done);
|
|
116
|
+
};
|
|
117
|
+
LineStream.prototype._reencode = function(line, chunkEncoding) {
|
|
118
|
+
if (this.encoding && this.encoding != chunkEncoding) {
|
|
119
|
+
return Buffer.from(line, chunkEncoding).toString(this.encoding);
|
|
120
|
+
} else if (this.encoding) {
|
|
121
|
+
return line;
|
|
122
|
+
} else {
|
|
123
|
+
return Buffer.from(line, chunkEncoding);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,28 +15,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
19
|
+
var chunk_IH6S2YZX_exports = {};
|
|
20
|
+
__export(chunk_IH6S2YZX_exports, {
|
|
31
21
|
generatorHandler: () => generatorHandler
|
|
32
22
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_IH6S2YZX_exports);
|
|
24
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
35
25
|
function generatorHandler(handler) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
crlfDelay: Infinity
|
|
39
|
-
});
|
|
40
|
-
stdinInterface.on("line", async (line) => {
|
|
41
|
-
const json = JSON.parse(line);
|
|
26
|
+
(0, import_chunk_EOPVK4AE.byline)(process.stdin).on("data", async (line) => {
|
|
27
|
+
const json = JSON.parse(String(line));
|
|
42
28
|
if (json.method === "generate" && json.params) {
|
|
43
29
|
try {
|
|
44
30
|
const result = await handler.onGenerate(json.params);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,25 +15,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
19
|
+
var chunk_MXZE5TCU_exports = {};
|
|
20
|
+
__export(chunk_MXZE5TCU_exports, {
|
|
31
21
|
GeneratorError: () => GeneratorError,
|
|
32
22
|
GeneratorProcess: () => GeneratorProcess
|
|
33
23
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_MXZE5TCU_exports);
|
|
25
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
35
26
|
var import_chunk_KEYE2GFS = require("./chunk-KEYE2GFS.js");
|
|
36
27
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
|
37
28
|
var import_node_child_process = require("node:child_process");
|
|
38
|
-
var import_node_readline = __toESM(require("node:readline"));
|
|
39
29
|
var import_debug = require("@prisma/debug");
|
|
40
30
|
var require_windows = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
41
31
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
|
|
@@ -643,17 +633,14 @@ ${this.errorLogs}`
|
|
|
643
633
|
}
|
|
644
634
|
this.rejectAllHandlers(error);
|
|
645
635
|
});
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
crlfDelay: Infinity
|
|
649
|
-
});
|
|
650
|
-
stderrInterface.on("line", (line) => {
|
|
636
|
+
(0, import_chunk_EOPVK4AE.byline)(this.child.stderr).on("data", (line) => {
|
|
637
|
+
const response = String(line);
|
|
651
638
|
let data;
|
|
652
639
|
try {
|
|
653
|
-
data = JSON.parse(
|
|
640
|
+
data = JSON.parse(response);
|
|
654
641
|
} catch (e) {
|
|
655
|
-
this.errorLogs +=
|
|
656
|
-
debug(
|
|
642
|
+
this.errorLogs += response + "\n";
|
|
643
|
+
debug(response);
|
|
657
644
|
}
|
|
658
645
|
if (data) {
|
|
659
646
|
this.handleResponse(data);
|
package/dist/generatorHandler.js
CHANGED
|
@@ -18,8 +18,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var generatorHandler_exports = {};
|
|
20
20
|
__export(generatorHandler_exports, {
|
|
21
|
-
generatorHandler: () =>
|
|
21
|
+
generatorHandler: () => import_chunk_IH6S2YZX.generatorHandler
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(generatorHandler_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_IH6S2YZX = require("./chunk-IH6S2YZX.js");
|
|
25
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
25
26
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
package/dist/index.js
CHANGED
|
@@ -18,12 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
|
-
GeneratorError: () =>
|
|
22
|
-
GeneratorProcess: () =>
|
|
23
|
-
generatorHandler: () =>
|
|
21
|
+
GeneratorError: () => import_chunk_MXZE5TCU.GeneratorError,
|
|
22
|
+
GeneratorProcess: () => import_chunk_MXZE5TCU.GeneratorProcess,
|
|
23
|
+
generatorHandler: () => import_chunk_IH6S2YZX.generatorHandler
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_MXZE5TCU = require("./chunk-MXZE5TCU.js");
|
|
27
|
+
var import_chunk_IH6S2YZX = require("./chunk-IH6S2YZX.js");
|
|
28
|
+
var import_chunk_EOPVK4AE = require("./chunk-EOPVK4AE.js");
|
|
28
29
|
var import_chunk_KEYE2GFS = require("./chunk-KEYE2GFS.js");
|
|
29
30
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/generator-helper",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-integration-prisma6-fix-cloudflare-engine.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"homepage": "https://www.prisma.io",
|
|
16
16
|
"bugs": "https://github.com/prisma/prisma/issues",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@prisma/debug": "7.
|
|
19
|
-
"@prisma/
|
|
20
|
-
"@prisma/
|
|
18
|
+
"@prisma/debug": "7.3.0-integration-prisma6-fix-cloudflare-engine.1",
|
|
19
|
+
"@prisma/generator": "7.3.0-integration-prisma6-fix-cloudflare-engine.1",
|
|
20
|
+
"@prisma/dmmf": "7.3.0-integration-prisma6-fix-cloudflare-engine.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@swc-node/register": "1.10.9",
|
|
24
24
|
"@types/cross-spawn": "6.0.6",
|
|
25
|
-
"@types/node": "
|
|
25
|
+
"@types/node": "18.19.76",
|
|
26
|
+
"typescript": "5.4.5",
|
|
26
27
|
"cross-spawn": "7.0.6",
|
|
27
|
-
"kleur": "4.1.5"
|
|
28
|
-
"typescript": "5.4.5"
|
|
28
|
+
"kleur": "4.1.5"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"README.md",
|