@payloadcms/db-postgres 0.1.0-beta.18 → 0.1.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +2 -2
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1 -2
- package/dist/migrate.d.ts.map +1 -1
- package/dist/migrate.js +3 -9
- package/dist/migrateDown.d.ts.map +1 -1
- package/dist/migrateDown.js +7 -7
- package/dist/migrateFresh.d.ts.map +1 -1
- package/dist/migrateFresh.js +3 -3
- package/dist/migrateRefresh.d.ts.map +1 -1
- package/dist/migrateRefresh.js +9 -14
- package/dist/migrateReset.d.ts.map +1 -1
- package/dist/migrateReset.js +10 -8
- package/dist/schema/build.d.ts +3 -3
- package/dist/schema/build.d.ts.map +1 -1
- package/dist/schema/build.js +5 -4
- package/dist/schema/traverseFields.d.ts +2 -3
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +4 -18
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +51 -5
- package/dist/utilities/parseError.d.ts +5 -0
- package/dist/utilities/parseError.d.ts.map +1 -0
- package/dist/utilities/parseError.js +24 -0
- package/package.json +3 -3
- package/src/index.ts +1 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "parseError", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return parseError;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _pg = require("pg");
|
12
|
+
const parseError = (err, msg)=>{
|
13
|
+
let formattedMsg = `${msg}`;
|
14
|
+
if (err instanceof Error) {
|
15
|
+
formattedMsg += ` ${err.message}.`;
|
16
|
+
if (err instanceof _pg.DatabaseError) {
|
17
|
+
msg += `: ${err.message}`;
|
18
|
+
if (err.hint) msg += ` ${err.hint}.`;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return formattedMsg;
|
22
|
+
};
|
23
|
+
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvcGFyc2VFcnJvci50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEYXRhYmFzZUVycm9yIH0gZnJvbSAncGcnXG5cbi8qKlxuICogRm9ybWF0IGVycm9yIG1lc3NhZ2Ugd2l0aCBoaW50IGlmIGF2YWlsYWJsZVxuICovXG5leHBvcnQgY29uc3QgcGFyc2VFcnJvciA9IChlcnI6IHVua25vd24sIG1zZzogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgbGV0IGZvcm1hdHRlZE1zZyA9IGAke21zZ31gXG4gIGlmIChlcnIgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgIGZvcm1hdHRlZE1zZyArPSBgICR7ZXJyLm1lc3NhZ2V9LmBcbiAgICBpZiAoZXJyIGluc3RhbmNlb2YgRGF0YWJhc2VFcnJvcikge1xuICAgICAgbXNnICs9IGA6ICR7ZXJyLm1lc3NhZ2V9YFxuICAgICAgaWYgKGVyci5oaW50KSBtc2cgKz0gYCAke2Vyci5oaW50fS5gXG4gICAgfVxuICB9XG4gIHJldHVybiBmb3JtYXR0ZWRNc2dcbn1cbiJdLCJuYW1lcyI6WyJwYXJzZUVycm9yIiwiZXJyIiwibXNnIiwiZm9ybWF0dGVkTXNnIiwiRXJyb3IiLCJtZXNzYWdlIiwiRGF0YWJhc2VFcnJvciIsImhpbnQiXSwibWFwcGluZ3MiOiI7Ozs7K0JBS2FBOzs7ZUFBQUE7OztvQkFMaUI7QUFLdkIsTUFBTUEsYUFBYSxDQUFDQyxLQUFjQztJQUN2QyxJQUFJQyxlQUFlLENBQUMsRUFBRUQsSUFBSSxDQUFDO0lBQzNCLElBQUlELGVBQWVHLE9BQU87UUFDeEJELGdCQUFnQixDQUFDLENBQUMsRUFBRUYsSUFBSUksT0FBTyxDQUFDLENBQUMsQ0FBQztRQUNsQyxJQUFJSixlQUFlSyxpQkFBYSxFQUFFO1lBQ2hDSixPQUFPLENBQUMsRUFBRSxFQUFFRCxJQUFJSSxPQUFPLENBQUMsQ0FBQztZQUN6QixJQUFJSixJQUFJTSxJQUFJLEVBQUVMLE9BQU8sQ0FBQyxDQUFDLEVBQUVELElBQUlNLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDdEM7SUFDRjtJQUNBLE9BQU9KO0FBQ1QifQ==
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "0.1.0-beta.
|
3
|
+
"version": "0.1.0-beta.20",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"repository": "https://github.com/payloadcms/payload",
|
6
6
|
"license": "MIT",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/pg": "8.10.2",
|
26
26
|
"@types/to-snake-case": "1.0.0",
|
27
|
-
"
|
28
|
-
"
|
27
|
+
"payload": "2.0.0-beta.30",
|
28
|
+
"@payloadcms/eslint-config": "0.0.1"
|
29
29
|
},
|
30
30
|
"peerDependencies": {
|
31
31
|
"better-sqlite3": "^8.5.0"
|