Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsnir committed May 25, 2022
0 parents commit 9b4b0a1
Show file tree
Hide file tree
Showing 30 changed files with 12,157 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# /node_modules/* in the project root is ignored by default
# build artefacts
dist/*
coverage/*
# data definition files
**/*.d.ts
# 3rd party libs
/src/public/
# custom definition files
/src/types/
54 changes: 54 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended"],
"plugins": ["import"],
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"no-console": ["error"],
"semi": ["warn", "always"],
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
],
"no-redeclare": "off",
"import/newline-after-import": ["error", { "count": 1 }],
"import/first": "error",
"import/order": [
"error",
{
"alphabetize": { "order": "asc", "caseInsensitive": true },
"groups": ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always"
}
],
"import/no-duplicates": "error",
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-inferrable-types": [
"warn",
{
"ignoreParameters": true
}
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "off"
}
}
38 changes: 38 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Node.js

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: |
npm ci
- run: |
npm pack
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: |
npm ci
- run: |
npm run test
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: |
npm ci
- run: |
npm audit
- run: |
npx license-checker --onlyAllow 'MIT;BSD-3-Clause;BSD-2-Clause;Apache-2.0;ISC;Python-2.0;0BSD;CC-BY-4.0'
106 changes: 106 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
*.map

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
23 changes: 23 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tasks:
- init: |
npm install -g npm
npm install
command: |
npm install -g npm eslint prettier
gitConfig:
alias.co: checkout
alias.ci: commit
alias.amend: 'commit --amend --reset-author --no-edit'
core.autocrlf: input
core.whitespace: blank-at-eol,blank-at-eof,indent-with-tab
pull.rebase: 'false'

vscode:
extensions:
- dbaeumer.vscode-eslint
- esbenp.prettier-vscode
- eamodio.gitlens
- eg2.vscode-npm-script
- bpruitt-goddard.mermaid-markdown-syntax-highlighting
- bierner.markdown-mermaid
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "all",
"printWidth": 120
}
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"eg2.vscode-npm-script",
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
"bierner.markdown-mermaid"
]
}
49 changes: 49 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "typescript"],
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.formatOnSave": false
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/coverage": true
},
"typescript.referencesCodeLens.enabled": true,
"appService.zipIgnorePattern": [".vscode{,/**}"],
"appService.deploySubpath": "",
"sqltools.connections": [
{
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"driver": "PostgreSQL",
"name": "local",
"database": "postgres",
"username": "gitpod",
"password": ""
}
],
"typescript.preferences.importModuleSpecifier": "relative",
"gitlens.showWhatsNewAfterUpgrades": false,
"gitlens.showWelcomeOnInstall": false,
"gitlens.plusFeatures.enabled": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.workingDirectories": [{ "directory": "js", "changeProcessCWD": true }]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 inScreen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SunBear

A changelog is available in the [GitHub releases page](https://github.com/inscreen/sunbear/releases).

Currently only supports Postgres, and TypeORM with Postgres. Additional SQL databases and ORMs are planned.

Documentation and examples will be added as the library matures.

**Warning**: Generally in Postgres, avoid table and column names with uppercase letters. There are workarounds, none are implemented in this library at this time.
Loading

0 comments on commit 9b4b0a1

Please sign in to comment.