From 58bed952a70bef338d3c9f9e8fb0ee826e4d3d1c Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Mon, 10 Feb 2025 18:10:23 -0800 Subject: [PATCH] feat: initial product prototype (#1) ### Explanation _No response_ ### Issue _No response_ ### Attestations - [x] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [x] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [x] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [x] I have pinned the dependencies to a specific patch version. ### Style - [x] I have run the linter and resolved any errors. - [x] My pull request uses an appropriate title, matching the conventional commit standards. - [x] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning Major - My pull request introduces a breaking change. Reviewed-on: https://git.nhcarrigan.com/nhcarrigan/cordelia-taryne/pulls/1 Co-authored-by: Naomi Carrigan Co-committed-by: Naomi Carrigan --- .gitea/workflows/ci.yml | 38 + .gitignore | 3 + .vscode/settings.json | 6 + README.md | 16 +- eslint.config.js | 5 + package.json | 29 + pnpm-lock.yaml | 4843 +++++++++++++++++++++++++++++++++++++ prod.env | 2 + src/commands/about.ts | 24 + src/commands/alt.ts | 30 + src/commands/eval.ts | 31 + src/commands/mood.ts | 31 + src/commands/proofread.ts | 31 + src/commands/query.ts | 31 + src/commands/summarise.ts | 31 + src/config/personality.ts | 12 + src/index.ts | 49 + src/modules/about.ts | 68 + src/modules/alt.ts | 112 + src/modules/evaluate.ts | 43 + src/modules/mood.ts | 44 + src/modules/proofread.ts | 44 + src/modules/query.ts | 44 + src/modules/summarise.ts | 44 + src/server/serve.ts | 71 + src/utils/ai.ts | 15 + src/utils/isSubscribed.ts | 40 + src/utils/logHandler.ts | 31 + tsconfig.json | 8 + 29 files changed, 5763 insertions(+), 13 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitignore 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 prod.env create mode 100644 src/commands/about.ts create mode 100644 src/commands/alt.ts create mode 100644 src/commands/eval.ts create mode 100644 src/commands/mood.ts create mode 100644 src/commands/proofread.ts create mode 100644 src/commands/query.ts create mode 100644 src/commands/summarise.ts create mode 100644 src/config/personality.ts create mode 100644 src/index.ts create mode 100644 src/modules/about.ts create mode 100644 src/modules/alt.ts create mode 100644 src/modules/evaluate.ts create mode 100644 src/modules/mood.ts create mode 100644 src/modules/proofread.ts create mode 100644 src/modules/query.ts create mode 100644 src/modules/summarise.ts create mode 100644 src/server/serve.ts create mode 100644 src/utils/ai.ts create mode 100644 src/utils/isSubscribed.ts create mode 100644 src/utils/logHandler.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..c7628a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +prod +coverage 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..397883f 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,10 @@ -# New Repository Template +# Cordelia Taryne -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. - -