Skip to content

Commit 1f03f05

Browse files
Push master to prod (#52)
* Satisfy minimum requirements for full typescript project (#37) * Feature: satisfy minimum for full typescript * Feature: change report structure from array to object * Chore: jsdoc * Refactor: PR review suggestions * Refactor: type out simple reports * Refactor: rename variables * Refactor: more types for now some logic errors * Chore: docs * Fix: type -> interface * Chore: comments * Type refactor * Improve report to discord message * Make it optional * Improve discord message creation * renames * Record to index * Refactor: Add additional type safety, refactor structure and naming, jsdocs (#38) * Feature: satisfy minimum for full typescript * Feature: change report structure from array to object * Chore: jsdoc * Feature: add additional types, jsdocs * Remove unnecessary error typing * Feature: type some more * Chore: typo fix * Chore: rename chart func, jsdocs improvements * Feature: add docs, fix types * Feature: remove all implicit any types * Refactor: types to interfaces as default * Refactor: PR review suggestions * Refactor: type out simple reports * Refactor: rename variables * Refactor: more types for now some logic errors * Chore: docs * Fix: type -> interface * Chore: remove unnecessary async * Chore: remove unnecessary jsdoc * Chore: comments * Feature: table improvements * Refactor: naming * Type refactor * Improve report to discord message * Make it optional * Improve discord message creation * Some typing * jsdocs type * strict tsconfig + miho improvements * Move default value to inisde of function * Remove comments * missing types + comments * improve `loadCachedEvents` logic * remove rendundant satisfies * remove Array for [] * renames + types * makes quotes consistent * fix filter error * remove custom intersection impl * head has extra "" not needing extra "right" because of it * typo * move constants * Chore: Update easy to update packages (#47) * update easy to update packages * return axios whoops * Setup dotenv to work on wasp-bot (#48) * vault * vault 2 * spaces * Refactor: Improve Ignore files, rename example file (#50) * add comments * docker ignore update * update * test * typo * example docker ignroe changes * comments * update * update comments * Refactor discord bot logic into multiple files (#45) * split single file * awaits and types * unnecessary memeber * comments -> functions * name, structyure * functions * de-modularaize a bit * comment * login last * analytics * quote * type external quote * imports * handlers, remove role id from channel ids * refactors * server ids * refacotr * refactor 2 * update help * revert * Update src/discord/bot/analytics/daily-report.ts Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com> * naming * commands * fix regex dep * extract prefix instead * improve naming --------- Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com> * Cohort retention charts + POC of rendering charts on node and send them as attachment (#49) * chart work * better colors and visualization * logic cleanup * imports * new colors * updates * remove jsdocs extras * comments * refactor * docs * make return type work correctly * remove old discord bot file --------- Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
1 parent f593337 commit 1f03f05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3952
-1794
lines changed

.dockerignore

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
**/node_modules
2-
**/.env
32
**/wasp-analytics-cached-events.json
43
**/dist
5-
.husky/_/**/*
4+
5+
# Don't copy secrets.
6+
.env
7+
.env.*
8+
9+
# Ignore CICD files.
10+
.husky
11+
.github
612
fly.toml
13+
Dockerfile
14+
15+
# These are added only because dotenv-vault keeps adding them if it doesn't find them,
16+
# even though we don't need them. Remove them once dotenv-vault stops doing that.
17+
.env*
18+
!.env.project
19+
!.env.vault
20+
.flaskenv*
File renamed without changes.

.env.vault

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#/-------------------.env.vault---------------------/
2+
#/ cloud-agnostic vaulting standard /
3+
#/ [how it works](https://dotenv.org/env-vault) /
4+
#/--------------------------------------------------/
5+
6+
# ci
7+
DOTENV_VAULT_CI="DOYlcgMncZe9RUjVCZkKnHVL0YFjfrXzL/KC3VHyQiuDDbUCi/XyFKBm11as0vW0SZ/OPrZeyl3yjqzyYTX8Qe23cu5lAMkurPHEInI="
8+
DOTENV_VAULT_CI_VERSION=2
9+
10+
# staging
11+
DOTENV_VAULT_STAGING="IzjZR5w+4cGuJNVJU8CUR2CzcG++zICOQONt4xtXnYTWIPC6M8W60AQEs9rT3GjfbXi0CpbF2IYezvaiHEAbsyHU36zrZXbqmpG5/N0="
12+
DOTENV_VAULT_STAGING_VERSION=2
13+
14+
# production
15+
DOTENV_VAULT_PRODUCTION="i5LJba3ukFt0LzCqemQOjUTDPU4P+umPxKwwvbU0J3CPAUBLOctZDTF9kfFA0scyhc4HJdI4mU/M/YOXfbOY/+yZOgwrfW/9seQUzQY="
16+
DOTENV_VAULT_PRODUCTION_VERSION=2
17+
18+
# development
19+
DOTENV_VAULT_DEVELOPMENT="8AvUzeSxPSSSGV8EKG7w18kEWx2bkANE6plKcjmb+ZOXVVPaSxVNScHxg7U+nXE1xx5m5D+CEzTYYhWLcVJw6xr58ge91eyK5/HQdkzZ3luuZIWUIDgHobpCzz0LxWMLDg/OtZhNgoNc82k1pmdlbz8uZrNjV7QrU4Y7Gypfybtk6OQ44CtJmGRzaBJzcgTVLxf7CDqGyPKAF09co5BxmO2WlGfBdAQ="
20+
DOTENV_VAULT_DEVELOPMENT_VERSION=2
21+
22+
#/----------------settings/metadata-----------------/
23+
DOTENV_VAULT="vlt_5a995108dc3fb39b7d2801ed018ee78d2c1eefc270904821125cb056ca07ec8d"
24+
DOTENV_API_URL="https://vault.dotenv.org"
25+
DOTENV_CLI="npx dotenv-vault@latest"

.gitignore

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
node_modules/
2-
.env
3-
wasp-analytics-cached-events.json
42
dist/
53
.DS_STORE
4+
wasp-analytics-cached-events.json
5+
6+
# Ignore all dotenv files by default to prevent accidentally committing any secrets.
7+
# To include specific dotenv files, use the `!` operator or adjust these rules.
8+
.env
9+
.env.*
10+
11+
# Don't ignore example dotenv files.
12+
!.env.example
13+
!.env.*.example
14+
15+
# These are config files for dotenv-vault, so we don't want to ignore them.
16+
!.env.project
17+
!.env.vault
18+
19+
# These two we added only because dotenv-vault keeps adding them if it doesn't find them,
20+
# even though we don't need them. Remove them once dotenv-vault stops doing that.
21+
.env*
22+
.flaskenv*

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx lint-staged

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-slim AS builder
1+
FROM node:22-slim AS builder
22

33
WORKDIR /app
44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Wasp bot is a constantly running nodejs server that serves different purposes:
99

1010
### Prerequisites
1111

12-
Copy env.example to .env and fill it with your PostHog API key and Discord bot token.
12+
Copy .env.example to .env and fill it with your PostHog API key and Discord bot token.
1313

1414
Both are needed to run bot locally, but only PostHog API key is needed to run just analytics locally.
1515

0 commit comments

Comments
 (0)