diff --git a/.dockerignore b/.dockerignore index 37aa81b..cb5267f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .git -.yarn +.nodemon +dev dist old node_modules @@ -12,9 +13,5 @@ scripts .node-version docker-compose.yml Dockerfile -Dockerfile.cache dprint.json -eslint.config.mjs -nodemon-js.json -nodemon-swc.json -nodemon.json +eslint.config.mjs \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0f59df2..b4f7e41 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ .vscode/ -.yarn/ node_modules/* .env dist/ -data/ dev/ \ No newline at end of file diff --git a/.nodemon/debug.json b/.nodemon/debug.json new file mode 100644 index 0000000..695feff --- /dev/null +++ b/.nodemon/debug.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json.schemastore.org/nodemon.json", + "restartable": "rs", + "ignore": [ + "node_modules" + ], + "verbose": true, + "env": { + "NODE_ENV": "dev", + "TYPESCRIPT": "true" + }, + "ext": "ts", + "exec": "tsx --inspect-brk" +} diff --git a/nodemon-js.json b/.nodemon/js.json similarity index 100% rename from nodemon-js.json rename to .nodemon/js.json diff --git a/nodemon-swc.json b/.nodemon/swc.json similarity index 100% rename from nodemon-swc.json rename to .nodemon/swc.json diff --git a/nodemon.json b/.nodemon/ts.json similarity index 100% rename from nodemon.json rename to .nodemon/ts.json diff --git a/package.json b/package.json index c911e51..82efae1 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,10 @@ "start": "node dist/index.js", "build": "swc src -d dist --strip-leading-paths", "watch": "swc src -d dist --strip-leading-paths --watch", - "dev": "nodemon --config nodemon-swc.json", - "dev:ts": "nodemon --config nodemon.json src/index.ts", - "dev:js": "nodemon --config nodemon-js.json dist/index.js", + "dev": "nodemon --config .nodemon/swc.json", + "dev:ts": "nodemon --config .nodemon/ts.json src/index.ts", + "dev:ts:inspect": "nodemon --config .nodemon/debug.json src/index.ts", + "dev:js": "nodemon --config .nodemon/js.json dist/index.js", "format": "dprint fmt \"**/*.ts\"", "check": "pnpm tscheck && pnpm lint", "tscheck": "tsc && echo \"TypeScript check passed!\"", diff --git a/src/utils/Illegitimate.ts b/src/utils/Illegitimate.ts index 0695984..f591675 100644 --- a/src/utils/Illegitimate.ts +++ b/src/utils/Illegitimate.ts @@ -17,7 +17,7 @@ let sequelize: Sequelize if (process.env.NODE_ENV === "dev") { sequelize = new Sequelize({ dialect: "sqlite", - storage: "data/db.sqlite" + storage: "dev/db.sqlite" }) } else { sequelize = new Sequelize(env.prod.postgresURI, { dialect: "postgres" }) @@ -75,11 +75,11 @@ class Illegitimate { } private loadMethods() { - String.prototype.removeIndents = function(this: string) { + String.prototype.removeIndents = function (this: string) { return this.replace(/^ */gm, "") } - String.prototype.capitalizeFirstLetter = function(this: string) { + String.prototype.capitalizeFirstLetter = function (this: string) { return this[0].toUpperCase() + this.slice(1).toLowerCase() } }