@ts-safeql/shared
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -8,2 +8,3 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const postgres_1 = require("postgres"); | ||
class DatabaseInitializationError extends Error { | ||
@@ -147,2 +148,18 @@ constructor(message) { | ||
} | ||
static to(query, error) { | ||
if (error instanceof postgres_1.PostgresError) { | ||
return PostgresError.of({ | ||
queryText: query, | ||
message: error.message, | ||
line: error.line, | ||
position: error.position, | ||
}); | ||
} | ||
return PostgresError.of({ | ||
queryText: query, | ||
message: `${error}`, | ||
line: "1", | ||
position: "1", | ||
}); | ||
} | ||
toJSON() { | ||
@@ -149,0 +166,0 @@ return { |
@@ -17,4 +17,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./common"), exports); | ||
__exportStar(require("./errors"), exports); | ||
__exportStar(require("./common"), exports); | ||
__exportStar(require("./parsedQuery"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ts-safeql/shared", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "lib/index.js", | ||
@@ -20,2 +20,5 @@ "types": "src/index.ts", | ||
}, | ||
"dependencies": { | ||
"postgres": "github:porsager/postgres" | ||
}, | ||
"scripts": { | ||
@@ -22,0 +25,0 @@ "build": "tsc", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18403
10
277
1
1