Skip to content

Commit

Permalink
chore: convert to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnr committed Jul 26, 2024
1 parent 825c37b commit 3b76656
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/pglite-multiple/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PostgresConnection,
TlsOptionsCallback,
hashMd5Password,
} from '../../src';
} from 'pg-gateway';

const tls: TlsOptionsCallback = async ({ sniServerName }) => {
// Optionally serve different certs based on `sniServerName`
Expand Down
15 changes: 15 additions & 0 deletions examples/pglite-multiple/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "pglite-multiple-example",
"scripts": {
"dev": "tsx index.ts"
},
"dependencies": {
"pg-gateway": "*"
},
"devDependencies": {
"@electric-sql/pglite": "npm:@gregnr/[email protected]",
"@types/node": "^20.14.11",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
}
2 changes: 1 addition & 1 deletion examples/pglite/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PGlite } from '@electric-sql/pglite';
import net from 'node:net';
import { PostgresConnection, hashMd5Password } from '../../src';
import { PostgresConnection, hashMd5Password } from 'pg-gateway';

const db = new PGlite();

Expand Down
15 changes: 15 additions & 0 deletions examples/pglite/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "pglite-example",
"scripts": {
"dev": "tsx index.ts"
},
"dependencies": {
"pg-gateway": "*"
},
"devDependencies": {
"@electric-sql/pglite": "npm:@gregnr/[email protected]",
"@types/node": "^20.14.11",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
}
14 changes: 14 additions & 0 deletions examples/reverse-proxy-sni/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "reverse-proxy-sni-example",
"scripts": {
"dev": "tsx index.ts"
},
"dependencies": {
"pg-gateway": "*"
},
"devDependencies": {
"@types/node": "^20.14.11",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
}
66 changes: 61 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 6 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
{
"name": "pg-gateway",
"version": "0.2.3",
"description": "Postgres wire protocol for the server-side",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"private": true,
"scripts": {
"dev": "tsx examples/pglite/index.ts",
"clean": "rm -rf dist",
"build": "tsc -b",
"test": "echo \"Error: no test specified\" && exit 1",
"prepublishOnly": "npm run clean && npm run build"
"example": "npm run dev --workspace"
},
"dependencies": {
"pg-protocol": "^1.6.1"
},
"devDependencies": {
"@electric-sql/pglite": "npm:@gregnr/[email protected]",
"@types/node": "^20.14.11",
"pg": "^8.12.0",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
"workspaces": [
"packages/*",
"examples/*"
]
}
File renamed without changes.
28 changes: 28 additions & 0 deletions packages/pg-gateway/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "pg-gateway",
"version": "0.2.3",
"description": "Postgres wire protocol for the server-side",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"dev": "tsx examples/pglite/index.ts",
"clean": "rm -rf dist",
"build": "tsc -b",
"test": "echo \"Error: no test specified\" && exit 1",
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"pg-protocol": "^1.6.1"
},
"devDependencies": {
"@electric-sql/pglite": "npm:@gregnr/[email protected]",
"@types/node": "^20.14.11",
"pg": "^8.12.0",
"tsx": "^4.16.2",
"typescript": "^5.5.3"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3b76656

Please sign in to comment.