From a72ceaccd1c20c7ee8b147d6b75b460bf409d427 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Mon, 10 Feb 2025 20:30:22 -0800 Subject: [PATCH] feat: initial prototype --- .gitea/workflows/ci.yml | 38 + .gitignore | 6 + .npmignore | 9 + .vscode/settings.json | 6 + README.md | 16 +- eslint.config.js | 5 + package.json | 32 + pnpm-lock.yaml | 3990 +++++++++++++++++++++++++++++++++++++++ src/index.ts | 74 + src/types/level.ts | 12 + tsconfig.json | 8 + 11 files changed, 4183 insertions(+), 13 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .vscode/settings.json create mode 100644 eslint.config.js create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 src/index.ts create mode 100644 src/types/level.ts create mode 100644 tsconfig.json diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..7307b13 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,38 @@ +name: Node.js CI +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + name: Lint and Test + + steps: + - name: Checkout Source Files + uses: actions/checkout@v4 + + - name: Use Node.js v22 + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Install Dependencies + run: pnpm install + + - name: Lint Source Files + run: pnpm run lint + + - name: Verify Build + run: pnpm run build + + - name: Run Tests + run: pnpm run test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9836508 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules +prod +coverage + +# Ignore packed files so that npm pack can be run locally +*.tgz \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..cea3b09 --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +/.gitea/ +/.vscode/ +eslint.config.js +.gitattributes +.gitignore +/src/ + +# Ignore packed files so that npm pack can be run locally +*.tgz \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2beb504 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.validate": ["typescript"] +} diff --git a/README.md b/README.md index 47a840e..51e2f37 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,10 @@ -# New Repository Template +# Logger -This template contains all of our basic files for a new GitHub repository. There is also a handy workflow that will create an issue on a new repository made from this template, with a checklist for the steps we usually take in setting up a new repository. - -If you're starting a Node.JS project with TypeScript, we have a [specific template](https://github.com/naomi-lgbt/nodejs-typescript-template) for that purpose. - -## Readme - -Delete all of the above text (including this line), and uncomment the below text to use our standard readme template. - -