Skip to content

Commit ebe3d64

Browse files
committed
fix: update pkg to build esm
1 parent 7cd6c28 commit ebe3d64

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: "16"
19+
node-version: '16'
2020

2121
- run: |
2222
npm clean-install
@@ -32,3 +32,9 @@ jobs:
3232
- uses: actionsx/prettier@v2
3333
with:
3434
args: --check "{src,test}/**/*.ts"
35+
36+
start:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- run: docker build . -t pgmeta
40+
- run: docker run --rm -it pgmeta node dist/server/app.js gen types typescript

.pkg.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"postgres-meta": "dist/server/app.js"
55
},
66
"pkg": {
7+
"outputPath": "bin",
78
"assets": ["dist/**/*.sql"],
89
"scripts": ["node_modules/pg-format/lib/reserved.js"]
910
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"gen:types:typescript": "ts-node-dev --quiet src/server/app.ts gen types typescript",
2525
"start": "NODE_ENV=production node dist/server/app.js",
2626
"dev": "trap 'npm run db:clean' INT && run-s db:clean db:run && NODE_ENV=development ts-node-dev src/server/app.ts | pino-pretty --colorize",
27-
"pkg": "run-s clean build:server && pkg --out-path dist .pkg.config.json",
27+
"pkg": "run-s clean build && pkg .pkg.config.json",
2828
"test": "run-s db:clean db:run test:run db:clean",
2929
"db:clean": "cd test/db && docker-compose down",
3030
"db:run": "cd test/db && docker-compose up --detach && sleep 5",

0 commit comments

Comments
 (0)