-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 7ade88e
Showing
23 changed files
with
4,333 additions
and
0 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,3 @@ | ||
FROM faasjs/vscode | ||
|
||
# Add custom commands |
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,32 @@ | ||
{ | ||
"name": "typed-pg-dev", | ||
"dockerComposeFile": "docker-compose.yaml", | ||
"service": "app", | ||
"workspaceFolder": "/root/app", | ||
"remoteUser": "root", | ||
"mounts": [ | ||
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind,consistency=cached", | ||
"source=node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh" | ||
}, | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"biomejs.biome" | ||
] | ||
}, | ||
"codespaces": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh" | ||
}, | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"biomejs.biome" | ||
] | ||
} | ||
}, | ||
"waitFor": "onCreateCommand" | ||
} |
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,20 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
command: sleep infinity | ||
tty: true | ||
volumes: | ||
- ..:/root/app:delegated | ||
- ~/.zsh_history:/root/.zsh_history:delegated | ||
depends_on: | ||
- pg | ||
pg: | ||
image: postgres:alpine | ||
environment: | ||
POSTGRES_USER: development | ||
POSTGRES_DB: development | ||
POSTGRES_HOST_AUTH_METHOD: trust |
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,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "devcontainers" | ||
directory: / | ||
schedule: | ||
interval: "daily" |
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,56 @@ | ||
name: Publish devel version | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Unit Test | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
paths: | ||
- src/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish_npm: | ||
if: github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: 22 | ||
- name: Install | ||
run: | | ||
npm install | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Publish | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} | ||
npm run publish:devel | ||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
- name: Add tag | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const readFileSync = require('fs').readFileSync; | ||
const join = require('path').join; | ||
const packageJson = JSON.parse(readFileSync(join('packages', 'types', 'package.json'), 'utf8')); | ||
const version = packageJson.version; | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/tags/v' + version, | ||
sha: context.sha | ||
}) |
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,42 @@ | ||
name: Unit Test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/** | ||
- .github/workflows/unit-test.yml | ||
pull_request: | ||
paths: | ||
- src/** | ||
|
||
jobs: | ||
unit-test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:alpine | ||
env: | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: 22 | ||
- name: Install | ||
run: | | ||
npm install | ||
- name: Run Tests | ||
run: npm run ci | ||
env: | ||
PG_CONNECTION: postgresql://postgres:postgres@localhost:5432 | ||
- uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOVTOKEN }} |
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,2 @@ | ||
node_modules | ||
dist |
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,32 @@ | ||
{ | ||
"editor.detectIndentation": false, | ||
"editor.tabSize": 2, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
}, | ||
"editor.quickSuggestions": { | ||
"strings": "on" | ||
}, | ||
"editor.wordWrap": "on", | ||
"editor.formatOnSave": true, | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true, | ||
"files.trimTrailingWhitespace": true, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.inlayHints.parameterNames.enabled": "all", | ||
"cSpell.words": [ | ||
"Antd", | ||
"astro", | ||
"astrojs", | ||
"faas", | ||
"faasjs", | ||
"promakerhub", | ||
"querant's", | ||
"querants", | ||
"Supa", | ||
"supabase", | ||
"tarotjourney", | ||
"vitest", | ||
"zfben" | ||
] | ||
} |
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,21 @@ | ||
# typed-pg | ||
|
||
**This package is still in development and not yet ready for production use.** | ||
|
||
A type-safe PostgreSQL query builder for TypeScript with a fluent API. | ||
|
||
## Features | ||
|
||
- 🎯 Full TypeScript support | ||
- 🔒 Type-safe queries | ||
- ⚡ Built on top of the high-performance `postgres.js` package | ||
- 🔗 Fluent chainable API | ||
- 🛡️ SQL injection prevention | ||
- 📦 Transaction support | ||
- 🎨 Clean and intuitive API | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install typed-pg | ||
``` |
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,3 @@ | ||
{ | ||
"extends": ["@faasjs/lint/biome"] | ||
} |
Oops, something went wrong.