@prisma/engines 7.3.0-integration-prisma6-fix-cloudflare-engine.3 → 7.3.0-integration-engines-7-3-0-12-parameterization-844f54891f0a80ec1820fc26cf513002357e4245.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/index.d.ts +1 -12
- package/dist/index.js +4 -49
- package/dist/scripts/localinstall.js +0 -5
- package/dist/scripts/postinstall.js +12 -55
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import type { BinaryPaths } from '@prisma/fetch-engine';
|
|
2
|
-
import { BinaryType as BinaryType_2 } from '@prisma/fetch-engine';
|
|
3
2
|
import type { DownloadOptions } from '@prisma/fetch-engine';
|
|
4
3
|
import { enginesVersion } from '@prisma/engines-version';
|
|
5
4
|
|
|
6
|
-
export declare const DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE = BinaryType.QueryEngineLibrary;
|
|
7
|
-
|
|
8
5
|
export { enginesVersion }
|
|
9
6
|
|
|
10
|
-
export declare function ensureNeededBinariesExist({
|
|
7
|
+
export declare function ensureNeededBinariesExist({ download }: EnsureSomeBinariesExistInput): Promise<void>;
|
|
11
8
|
|
|
12
9
|
declare type EnsureSomeBinariesExistInput = {
|
|
13
|
-
clientEngineType: 'library' | 'binary' | 'client';
|
|
14
|
-
hasMigrateAdapterInConfig: boolean;
|
|
15
10
|
download: (options: DownloadOptions) => Promise<BinaryPaths>;
|
|
16
11
|
};
|
|
17
12
|
|
|
18
|
-
/**
|
|
19
|
-
* Checks if the env override `PRISMA_CLI_QUERY_ENGINE_TYPE` is set to `library` or `binary`
|
|
20
|
-
* Otherwise returns the default
|
|
21
|
-
*/
|
|
22
|
-
export declare function getCliQueryEngineBinaryType(clientEngineType?: string | undefined): BinaryType_2;
|
|
23
|
-
|
|
24
13
|
export declare function getEnginesPath(): string;
|
|
25
14
|
|
|
26
15
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -30,10 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE: () => DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE,
|
|
34
33
|
enginesVersion: () => import_engines_version2.enginesVersion,
|
|
35
34
|
ensureNeededBinariesExist: () => ensureNeededBinariesExist,
|
|
36
|
-
getCliQueryEngineBinaryType: () => getCliQueryEngineBinaryType,
|
|
37
35
|
getEnginesPath: () => getEnginesPath
|
|
38
36
|
});
|
|
39
37
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -46,28 +44,11 @@ var debug = (0, import_debug.Debug)("prisma:engines");
|
|
|
46
44
|
function getEnginesPath() {
|
|
47
45
|
return import_path.default.join(__dirname, "../");
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
function getCliQueryEngineBinaryType(clientEngineType = process.env.PRISMA_CLI_QUERY_ENGINE_TYPE) {
|
|
51
|
-
if (clientEngineType === "binary") {
|
|
52
|
-
return import_fetch_engine.BinaryType.QueryEngineBinary;
|
|
53
|
-
}
|
|
54
|
-
return DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE;
|
|
55
|
-
}
|
|
56
|
-
async function ensureNeededBinariesExist({
|
|
57
|
-
clientEngineType,
|
|
58
|
-
download,
|
|
59
|
-
hasMigrateAdapterInConfig
|
|
60
|
-
}) {
|
|
47
|
+
async function ensureNeededBinariesExist({ download }) {
|
|
61
48
|
const binaryDir = import_path.default.join(__dirname, "../");
|
|
62
|
-
const binaries = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
const usesQueryCompiler = clientEngineType === "client";
|
|
67
|
-
if (!usesQueryCompiler) {
|
|
68
|
-
const cliQueryEngineBinaryType = getCliQueryEngineBinaryType(clientEngineType);
|
|
69
|
-
binaries[cliQueryEngineBinaryType] = binaryDir;
|
|
70
|
-
}
|
|
49
|
+
const binaries = {
|
|
50
|
+
[import_fetch_engine.BinaryType.SchemaEngineBinary]: binaryDir
|
|
51
|
+
};
|
|
71
52
|
debug(`binaries to download ${Object.keys(binaries).join(", ")}`);
|
|
72
53
|
const binaryTargets = process.env.PRISMA_CLI_BINARY_TARGETS ? process.env.PRISMA_CLI_BINARY_TARGETS.split(",") : void 0;
|
|
73
54
|
await download({
|
|
@@ -78,35 +59,9 @@ async function ensureNeededBinariesExist({
|
|
|
78
59
|
binaryTargets
|
|
79
60
|
});
|
|
80
61
|
}
|
|
81
|
-
import_path.default.join(__dirname, "../query-engine-darwin");
|
|
82
|
-
import_path.default.join(__dirname, "../query-engine-darwin-arm64");
|
|
83
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-1.0.x");
|
|
84
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-1.1.x");
|
|
85
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-3.0.x");
|
|
86
|
-
import_path.default.join(__dirname, "../query-engine-linux-static-x64");
|
|
87
|
-
import_path.default.join(__dirname, "../query-engine-linux-static-arm64");
|
|
88
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-1.0.x");
|
|
89
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-1.1.x");
|
|
90
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-3.0.x");
|
|
91
|
-
import_path.default.join(__dirname, "../libquery_engine-darwin.dylib.node");
|
|
92
|
-
import_path.default.join(__dirname, "../libquery_engine-darwin-arm64.dylib.node");
|
|
93
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-1.0.x.so.node");
|
|
94
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-1.1.x.so.node");
|
|
95
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-3.0.x.so.node");
|
|
96
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.0.x.so.node");
|
|
97
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.1.x.so.node");
|
|
98
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-3.0.x.so.node");
|
|
99
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-musl.so.node");
|
|
100
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-musl-openssl-3.0.x.so.node");
|
|
101
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-1.0.x.so.node");
|
|
102
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-1.1.x.so.node");
|
|
103
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-3.0.x.so.node");
|
|
104
|
-
import_path.default.join(__dirname, "../query_engine-windows.dll.node");
|
|
105
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
106
63
|
0 && (module.exports = {
|
|
107
|
-
DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE,
|
|
108
64
|
enginesVersion,
|
|
109
65
|
ensureNeededBinariesExist,
|
|
110
|
-
getCliQueryEngineBinaryType,
|
|
111
66
|
getEnginesPath
|
|
112
67
|
});
|
|
@@ -2001,8 +2001,6 @@ async function main() {
|
|
|
2001
2001
|
const branch = import_package.enginesOverride?.["branch"];
|
|
2002
2002
|
let folder = import_package.enginesOverride?.["folder"];
|
|
2003
2003
|
const engineCachePaths = {
|
|
2004
|
-
[import_fetch_engine.BinaryType.QueryEngineBinary]: import_path.default.join(cacheDir, import_fetch_engine.BinaryType.QueryEngineBinary),
|
|
2005
|
-
[import_fetch_engine.BinaryType.QueryEngineLibrary]: import_path.default.join(cacheDir, import_fetch_engine.BinaryType.QueryEngineLibrary),
|
|
2006
2004
|
[import_fetch_engine.BinaryType.SchemaEngineBinary]: import_path.default.join(cacheDir, import_fetch_engine.BinaryType.SchemaEngineBinary)
|
|
2007
2005
|
};
|
|
2008
2006
|
if (branch !== void 0) {
|
|
@@ -2030,11 +2028,8 @@ async function main() {
|
|
|
2030
2028
|
}
|
|
2031
2029
|
if (folder !== void 0) {
|
|
2032
2030
|
folder = import_path.default.isAbsolute(folder) ? folder : import_path.default.join(baseDir, folder);
|
|
2033
|
-
const libExt = binaryTarget.includes("windows") ? ".dll" : binaryTarget.includes("darwin") ? ".dylib" : ".so";
|
|
2034
2031
|
const binExt = binaryTarget.includes("windows") ? ".exe" : "";
|
|
2035
2032
|
const engineOutputPaths = {
|
|
2036
|
-
[import_fetch_engine.BinaryType.QueryEngineLibrary]: import_path.default.join(folder, "libquery_engine".concat(libExt)),
|
|
2037
|
-
[import_fetch_engine.BinaryType.QueryEngineBinary]: import_path.default.join(folder, import_fetch_engine.BinaryType.QueryEngineBinary.concat(binExt)),
|
|
2038
2033
|
[import_fetch_engine.BinaryType.SchemaEngineBinary]: import_path.default.join(folder, import_fetch_engine.BinaryType.SchemaEngineBinary.concat(binExt))
|
|
2039
2034
|
};
|
|
2040
2035
|
for (const [binaryType, outputPath] of Object.entries(engineOutputPaths)) {
|
|
@@ -23,77 +23,34 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
));
|
|
24
24
|
|
|
25
25
|
// src/scripts/postinstall.ts
|
|
26
|
-
var
|
|
27
|
-
var import_engines_version3 = require("@prisma/engines-version");
|
|
28
|
-
var import_fetch_engine2 = require("@prisma/fetch-engine");
|
|
29
|
-
var import_fs = __toESM(require("fs"));
|
|
30
|
-
var import_path2 = __toESM(require("path"));
|
|
31
|
-
|
|
32
|
-
// src/index.ts
|
|
33
|
-
var import_debug = require("@prisma/debug");
|
|
26
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
|
34
27
|
var import_engines_version = require("@prisma/engines-version");
|
|
35
28
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
29
|
+
var import_fs = __toESM(require("fs"));
|
|
36
30
|
var import_path = __toESM(require("path"));
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
function getCliQueryEngineBinaryType(clientEngineType = process.env.PRISMA_CLI_QUERY_ENGINE_TYPE) {
|
|
41
|
-
if (clientEngineType === "binary") {
|
|
42
|
-
return import_fetch_engine.BinaryType.QueryEngineBinary;
|
|
43
|
-
}
|
|
44
|
-
return DEFAULT_CLI_QUERY_ENGINE_BINARY_TYPE;
|
|
45
|
-
}
|
|
46
|
-
import_path.default.join(__dirname, "../query-engine-darwin");
|
|
47
|
-
import_path.default.join(__dirname, "../query-engine-darwin-arm64");
|
|
48
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-1.0.x");
|
|
49
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-1.1.x");
|
|
50
|
-
import_path.default.join(__dirname, "../query-engine-debian-openssl-3.0.x");
|
|
51
|
-
import_path.default.join(__dirname, "../query-engine-linux-static-x64");
|
|
52
|
-
import_path.default.join(__dirname, "../query-engine-linux-static-arm64");
|
|
53
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-1.0.x");
|
|
54
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-1.1.x");
|
|
55
|
-
import_path.default.join(__dirname, "../query-engine-rhel-openssl-3.0.x");
|
|
56
|
-
import_path.default.join(__dirname, "../libquery_engine-darwin.dylib.node");
|
|
57
|
-
import_path.default.join(__dirname, "../libquery_engine-darwin-arm64.dylib.node");
|
|
58
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-1.0.x.so.node");
|
|
59
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-1.1.x.so.node");
|
|
60
|
-
import_path.default.join(__dirname, "../libquery_engine-debian-openssl-3.0.x.so.node");
|
|
61
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.0.x.so.node");
|
|
62
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-1.1.x.so.node");
|
|
63
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-arm64-openssl-3.0.x.so.node");
|
|
64
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-musl.so.node");
|
|
65
|
-
import_path.default.join(__dirname, "../libquery_engine-linux-musl-openssl-3.0.x.so.node");
|
|
66
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-1.0.x.so.node");
|
|
67
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-1.1.x.so.node");
|
|
68
|
-
import_path.default.join(__dirname, "../libquery_engine-rhel-openssl-3.0.x.so.node");
|
|
69
|
-
import_path.default.join(__dirname, "../query_engine-windows.dll.node");
|
|
70
|
-
|
|
71
|
-
// src/scripts/postinstall.ts
|
|
72
|
-
var debug2 = (0, import_debug2.default)("prisma:download");
|
|
73
|
-
var baseDir = import_path2.default.join(__dirname, "../../");
|
|
74
|
-
var lockFile = import_path2.default.join(baseDir, "download-lock");
|
|
31
|
+
var debug = (0, import_debug.default)("prisma:download");
|
|
32
|
+
var baseDir = import_path.default.join(__dirname, "../../");
|
|
33
|
+
var lockFile = import_path.default.join(baseDir, "download-lock");
|
|
75
34
|
var createdLockFile = false;
|
|
76
35
|
async function main() {
|
|
77
36
|
if (import_fs.default.existsSync(lockFile) && parseInt(import_fs.default.readFileSync(lockFile, "utf-8"), 10) > Date.now() - 2e4) {
|
|
78
|
-
|
|
37
|
+
debug(`Lock file already exists, so we're skipping the download of the prisma binaries`);
|
|
79
38
|
} else {
|
|
80
39
|
createLockFile();
|
|
81
40
|
let binaryTargets;
|
|
82
41
|
if (process.env.PRISMA_CLI_BINARY_TARGETS) {
|
|
83
42
|
binaryTargets = process.env.PRISMA_CLI_BINARY_TARGETS.split(",");
|
|
84
43
|
}
|
|
85
|
-
const cliQueryEngineBinaryType = getCliQueryEngineBinaryType();
|
|
86
44
|
const binaries = {
|
|
87
|
-
[
|
|
88
|
-
[import_fetch_engine2.BinaryType.SchemaEngineBinary]: baseDir
|
|
45
|
+
[import_fetch_engine.BinaryType.SchemaEngineBinary]: baseDir
|
|
89
46
|
};
|
|
90
|
-
await (0,
|
|
47
|
+
await (0, import_fetch_engine.download)({
|
|
91
48
|
binaries,
|
|
92
|
-
version:
|
|
49
|
+
version: import_engines_version.enginesVersion,
|
|
93
50
|
showProgress: true,
|
|
94
51
|
failSilent: true,
|
|
95
52
|
binaryTargets
|
|
96
|
-
}).catch((e) =>
|
|
53
|
+
}).catch((e) => debug(e));
|
|
97
54
|
cleanupLockFile();
|
|
98
55
|
}
|
|
99
56
|
}
|
|
@@ -108,11 +65,11 @@ function cleanupLockFile() {
|
|
|
108
65
|
import_fs.default.unlinkSync(lockFile);
|
|
109
66
|
}
|
|
110
67
|
} catch (e) {
|
|
111
|
-
|
|
68
|
+
debug(e);
|
|
112
69
|
}
|
|
113
70
|
}
|
|
114
71
|
}
|
|
115
|
-
main().catch((e) =>
|
|
72
|
+
main().catch((e) => debug(e));
|
|
116
73
|
process.on("beforeExit", () => {
|
|
117
74
|
cleanupLockFile();
|
|
118
75
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/engines",
|
|
3
|
-
"version": "7.3.0-integration-
|
|
3
|
+
"version": "7.3.0-integration-engines-7-3-0-12-parameterization-844f54891f0a80ec1820fc26cf513002357e4245.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,16 +15,16 @@
|
|
|
15
15
|
"@swc/core": "1.11.5",
|
|
16
16
|
"@swc/jest": "0.2.37",
|
|
17
17
|
"@types/jest": "29.5.14",
|
|
18
|
-
"@types/node": "
|
|
18
|
+
"@types/node": "~20.19.24",
|
|
19
19
|
"execa": "5.1.1",
|
|
20
20
|
"typescript": "5.4.5",
|
|
21
21
|
"vitest": "3.2.4"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@prisma/engines-version": "7.
|
|
25
|
-
"@prisma/fetch-engine": "7.3.0-integration-
|
|
26
|
-
"@prisma/
|
|
27
|
-
"@prisma/
|
|
24
|
+
"@prisma/engines-version": "7.3.0-12.parameterization-844f54891f0a80ec1820fc26cf513002357e4245",
|
|
25
|
+
"@prisma/fetch-engine": "7.3.0-integration-engines-7-3-0-12-parameterization-844f54891f0a80ec1820fc26cf513002357e4245.1",
|
|
26
|
+
"@prisma/debug": "7.3.0-integration-engines-7-3-0-12-parameterization-844f54891f0a80ec1820fc26cf513002357e4245.1",
|
|
27
|
+
"@prisma/get-platform": "7.3.0-integration-engines-7-3-0-12-parameterization-844f54891f0a80ec1820fc26cf513002357e4245.1"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|