@a_team/prisma 3.1.1-win → 3.1.2-linux
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/README.md +19 -2
- package/dist/client/edge.js +6 -5
- package/dist/client/index-browser.js +2 -1
- package/dist/client/index.d.ts +614 -33
- package/dist/client/index.js +8 -7
- package/dist/client/{query_engine-windows.dll.node → libquery_engine-linux-musl-openssl-3.0.x.so.node} +0 -0
- package/dist/client/package.json +1 -1
- package/dist/client/schema.prisma +13 -0
- package/dist/client/wasm.js +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"optionalDependencies": {
|
|
14
14
|
"@a_team/prisma-win": "npm:@a_team/prisma@X.Y.Z-win",
|
|
15
15
|
"@a_team/prisma-macos": "npm:@a_team/prisma@X.Y.Z-macos",
|
|
16
|
-
"@a_team/prisma-linux": "npm:@a_team/prisma@X.Y.Z-linux"
|
|
16
|
+
"@a_team/prisma-linux": "npm:@a_team/prisma@X.Y.Z-linux",
|
|
17
|
+
"@a_team/prisma-linux-debian": "npm:@a_team/prisma@X.Y.Z-linux-debian"
|
|
17
18
|
}
|
|
18
19
|
```
|
|
19
20
|
|
|
@@ -23,6 +24,17 @@
|
|
|
23
24
|
const fs = require('fs');
|
|
24
25
|
const path = require('path');
|
|
25
26
|
|
|
27
|
+
const getLinuxDistribution = () => {
|
|
28
|
+
try {
|
|
29
|
+
const osRelease = fs.readFileSync('/etc/os-release', 'utf-8');
|
|
30
|
+
const match = osRelease.match(/^ID=(.+)$/m);
|
|
31
|
+
return match ? match[1].replace(/"/g, '') : 'unknown';
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error('Failed to detect Linux distribution:', error.message);
|
|
34
|
+
return 'unknown';
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
26
38
|
const getPlatformPackage = () => {
|
|
27
39
|
switch (process.platform) {
|
|
28
40
|
case 'darwin':
|
|
@@ -30,6 +42,12 @@ const getPlatformPackage = () => {
|
|
|
30
42
|
case 'win32':
|
|
31
43
|
return '@a_team/prisma-win';
|
|
32
44
|
default:
|
|
45
|
+
const linuxDistro = getLinuxDistribution();
|
|
46
|
+
|
|
47
|
+
if (linuxDistro === 'debian') {
|
|
48
|
+
return '@a_team/prisma-linux-debian';
|
|
49
|
+
}
|
|
50
|
+
|
|
33
51
|
return '@a_team/prisma-linux';
|
|
34
52
|
}
|
|
35
53
|
};
|
|
@@ -50,7 +68,6 @@ if (fs.existsSync(sourcePath)) {
|
|
|
50
68
|
console.error(`Platform-specific package ${platformPackage} not found`);
|
|
51
69
|
process.exit(1);
|
|
52
70
|
}
|
|
53
|
-
|
|
54
71
|
```
|
|
55
72
|
|
|
56
73
|
- The script above will link the required OS dependency as the main one.
|