@saltcorn/postgres 1.0.0-beta.10 → 1.0.0-beta.13
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/package.json +4 -3
- package/postgres.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/postgres",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
4
4
|
"description": "Postgres structures for Saltcorn, open-source no-code platform",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"scripts": {
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"main": "index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@saltcorn/db-common": "1.0.0-beta.
|
|
15
|
+
"@saltcorn/db-common": "1.0.0-beta.13",
|
|
16
16
|
"pg": "^8.2.1",
|
|
17
|
-
"pg-copy-streams": "^5.1.1"
|
|
17
|
+
"pg-copy-streams": "^5.1.1",
|
|
18
|
+
"replacestream": "4.0.3"
|
|
18
19
|
},
|
|
19
20
|
"repository": "github:saltcorn/saltcorn",
|
|
20
21
|
"publishConfig": {
|
package/postgres.js
CHANGED
|
@@ -9,7 +9,7 @@ const copyStreams = require("pg-copy-streams");
|
|
|
9
9
|
const { promisify } = require("util");
|
|
10
10
|
const { pipeline } = require("stream/promises");
|
|
11
11
|
const { Transform } = require("stream");
|
|
12
|
-
|
|
12
|
+
const replace = require("replacestream");
|
|
13
13
|
const {
|
|
14
14
|
sqlsanitize,
|
|
15
15
|
mkWhere,
|
|
@@ -418,7 +418,7 @@ const copyToJson = async (fileStream, tableName, client) => {
|
|
|
418
418
|
sql_log(sql);
|
|
419
419
|
const stream = (client || pool).query(copyStreams.to(sql));
|
|
420
420
|
|
|
421
|
-
return await pipeline(stream, fileStream);
|
|
421
|
+
return await pipeline(stream, replace("\\\\", "\\"), fileStream);
|
|
422
422
|
};
|
|
423
423
|
|
|
424
424
|
const slugify = (s) =>
|