-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
903fca6
commit f104258
Showing
22 changed files
with
34 additions
and
1,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: examples | ||
on: [push] | ||
jobs: | ||
examples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: sqlc-dev/setup-sqlc@v4 | ||
with: | ||
sqlc-version: '1.24.0' | ||
- uses: sqlc-dev/setup-node@v4 | ||
- uses: sqlc-dev/setup-bun@v4 | ||
- run: bun run src/main.ts | ||
working-directory: examples/bun-postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
run: examples/plugin.wasm examples/sqlc.yaml | ||
cd examples && sqlc-dev generate | ||
.PHONY: generate | ||
|
||
src/gen/plugin/codegen_pb.ts: buf.gen.yaml | ||
buf generate --template buf.gen.yaml buf.build/sqlc/sqlc --path plugin/ | ||
generate: examples/plugin.wasm examples/sqlc.yaml | ||
cd examples && sqlc-dev generate | ||
|
||
# https://github.com/bytecodealliance/javy/releases/tag/v1.2.0 | ||
examples/plugin.wasm: out.js | ||
./javy compile out.js -o examples/plugin.wasm | ||
|
||
out.js: src/app.ts $(wildcard src/drivers/*.ts) src/gen/plugin/codegen_pb.ts | ||
npx tsc --noEmit | ||
npx esbuild --bundle src/app.ts --tree-shaking=true --format=esm --target=es2020 --outfile=out.js | ||
npx esbuild --bundle src/app.ts --tree-shaking=true --format=esm --target=es2020 --outfile=out.js | ||
|
||
src/gen/plugin/codegen_pb.ts: buf.gen.yaml | ||
buf generate --template buf.gen.yaml buf.build/sqlc/sqlc --path plugin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
src/cloud | ||
node_modules | ||
*.js | ||
*.wasm | ||
*.js |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.