@coffre/conformance 0.1.0 → 0.1.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/main.js +2 -1
- package/package.json +4 -3
- package/src/database.ts +2 -1
package/dist/main.js
CHANGED
|
@@ -8,6 +8,7 @@ import { existsSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
|
8
8
|
import { tmpdir } from "node:os";
|
|
9
9
|
import { DatabaseSync } from "node:sqlite";
|
|
10
10
|
import pg from "pg";
|
|
11
|
+
import { postgresConnection } from "@coffre/db/connect";
|
|
11
12
|
//#region ../client/dist/index.js
|
|
12
13
|
/** The API's error shape, `{ error, message }`, with the HTTP status. */
|
|
13
14
|
const COFFRE_ERROR = Symbol.for("@coffre/client:CoffreError");
|
|
@@ -793,7 +794,7 @@ function sameKeys(value, keys) {
|
|
|
793
794
|
//#endregion
|
|
794
795
|
//#region src/database.ts
|
|
795
796
|
async function postgres(url) {
|
|
796
|
-
const client = new pg.Client(url);
|
|
797
|
+
const client = new pg.Client(postgresConnection(url));
|
|
797
798
|
await client.connect();
|
|
798
799
|
return {
|
|
799
800
|
engine: "postgres",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffre/conformance",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Checks a coffre deployment from outside: what it must never do, whatever code it runs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"jose": "6.2.3",
|
|
33
|
-
"pg": "8.16.3"
|
|
33
|
+
"pg": "8.16.3",
|
|
34
|
+
"@coffre/db": "0.1.1"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@types/node": "26.1.1",
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
"oauth4webapi": "3.8.8",
|
|
39
40
|
"tsdown": "0.23.0",
|
|
40
41
|
"typescript": "5.9.3",
|
|
41
|
-
"@coffre/client": "0.1.
|
|
42
|
+
"@coffre/client": "0.1.1"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"build": "tsdown",
|
package/src/database.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { DatabaseSync } from 'node:sqlite';
|
|
5
5
|
|
|
6
6
|
import pg from 'pg';
|
|
7
|
+
import { postgresConnection } from '@coffre/db/connect';
|
|
7
8
|
|
|
8
9
|
export type Sql = {
|
|
9
10
|
readonly engine: 'postgres' | 'sqlite';
|
|
@@ -15,7 +16,7 @@ export type Sql = {
|
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export async function postgres(url: string): Promise<Sql> {
|
|
18
|
-
const client = new pg.Client(url);
|
|
19
|
+
const client = new pg.Client(postgresConnection(url));
|
|
19
20
|
await client.connect();
|
|
20
21
|
return {
|
|
21
22
|
engine: 'postgres',
|