diff options
| -rwxr-xr-x | .gitignore | 7 | ||||
| -rw-r--r-- | package.json | 7 | ||||
| -rw-r--r-- | pnpm-lock.yaml | 9 | ||||
| -rw-r--r-- | src/activitypub.js (renamed from activitypub.js) | 0 | ||||
| -rwxr-xr-x | src/app.js (renamed from app.js) | 2 | ||||
| -rw-r--r-- | src/config/api-example.js (renamed from config/api-example.js) | 0 | ||||
| -rw-r--r-- | src/config/database-docker.js (renamed from config/database-docker.js) | 0 | ||||
| -rw-r--r-- | src/config/database-example.js (renamed from config/database-example.js) | 0 | ||||
| -rw-r--r-- | src/config/domain-example.js (renamed from config/domain-example.js) | 0 | ||||
| -rw-r--r-- | src/config/gathio.service (renamed from config/gathio.service) | 0 | ||||
| -rw-r--r-- | src/helpers.js (renamed from helpers.js) | 0 | ||||
| -rwxr-xr-x | src/models/Event.js (renamed from models/Event.js) | 0 | ||||
| -rwxr-xr-x | src/models/EventGroup.js (renamed from models/EventGroup.js) | 0 | ||||
| -rwxr-xr-x | src/models/Log.js (renamed from models/Log.js) | 0 | ||||
| -rwxr-xr-x | src/routes.js (renamed from routes.js) | 0 | ||||
| -rwxr-xr-x | src/start.js (renamed from start.js) | 2 | ||||
| -rw-r--r-- | tsconfig.json | 22 | 
17 files changed, 42 insertions, 7 deletions
@@ -2,9 +2,10 @@  # gathio custom -config/api.js -config/database.js -config/domain.js +dist +src/config/api.js +src/config/database.js +src/config/domain.js  public/events/*  !public/events/.gitkeep diff --git a/package.json b/package.json index a5c41b5..0a3d018 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@    "description": "",    "main": "index.js",    "scripts": { -    "start": "nodemon ./start.js" +    "build": "tsc", +    "start": "node dist/start.js", +    "dev": "nodemon -e ts,js --watch src --exec \"pnpm run build ; pnpm run start\""    },    "engines": {      "node": ">=16.16.0" @@ -39,6 +41,7 @@    },    "devDependencies": {      "eslint": "^8.40.0", -    "nodemon": "^2.0.22" +    "nodemon": "^2.0.22", +    "typescript": "^5.0.4"    }  } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 484ba4f..972ab1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ devDependencies:    nodemon:      specifier: ^2.0.22      version: 2.0.22 +  typescript: +    specifier: ^5.0.4 +    version: 5.0.4  packages: @@ -2772,6 +2775,12 @@ packages:        mime-types: 2.1.35      dev: false +  /typescript@5.0.4: +    resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} +    engines: {node: '>=12.20'} +    hasBin: true +    dev: true +    /uglify-js@3.17.4:      resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}      engines: {node: '>=0.8.0'} diff --git a/activitypub.js b/src/activitypub.js index 442f03c..442f03c 100644 --- a/activitypub.js +++ b/src/activitypub.js @@ -16,7 +16,7 @@ const app = express();  // View engine // -hbsInstance = hbs.create({ +const hbsInstance = hbs.create({      defaultLayout: 'main',      partialsDir: ['views/partials/'],      layoutsDir: 'views/layouts/', diff --git a/config/api-example.js b/src/config/api-example.js index 9202f0a..9202f0a 100644 --- a/config/api-example.js +++ b/src/config/api-example.js diff --git a/config/database-docker.js b/src/config/database-docker.js index 7847097..7847097 100644 --- a/config/database-docker.js +++ b/src/config/database-docker.js diff --git a/config/database-example.js b/src/config/database-example.js index 4aa4c4d..4aa4c4d 100644 --- a/config/database-example.js +++ b/src/config/database-example.js diff --git a/config/domain-example.js b/src/config/domain-example.js index 19c797a..19c797a 100644 --- a/config/domain-example.js +++ b/src/config/domain-example.js diff --git a/config/gathio.service b/src/config/gathio.service index 447d44f..447d44f 100644 --- a/config/gathio.service +++ b/src/config/gathio.service diff --git a/helpers.js b/src/helpers.js index bf95e27..bf95e27 100644 --- a/helpers.js +++ b/src/helpers.js diff --git a/models/Event.js b/src/models/Event.js index d800077..d800077 100755 --- a/models/Event.js +++ b/src/models/Event.js diff --git a/models/EventGroup.js b/src/models/EventGroup.js index c70ef95..c70ef95 100755 --- a/models/EventGroup.js +++ b/src/models/EventGroup.js diff --git a/models/Log.js b/src/models/Log.js index 95a3ab3..95a3ab3 100755 --- a/models/Log.js +++ b/src/models/Log.js diff --git a/routes.js b/src/routes.js index c9867e3..c9867e3 100755 --- a/routes.js +++ b/src/routes.js @@ -23,7 +23,7 @@ require('./models/Event');  require('./models/Log');  require('./models/EventGroup'); -const app = require('./app'); +const app = require('./app.js');  global.appRoot = path.resolve(__dirname); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9d7b7ab --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ +  "compilerOptions": { +    "target": "ES2020", +    "module": "ES2020", +    "allowJs": true, +    "checkJs": true, +    "removeComments": true, +    "resolveJsonModule": true, +    "typeRoots": ["./node_modules/@types"], +    "sourceMap": true, +    "outDir": "dist", +    "strict": true, +    "baseUrl": ".", +    "forceConsistentCasingInFileNames": true, +    "esModuleInterop": true, +    "experimentalDecorators": true, +    "emitDecoratorMetadata": true, +    "moduleResolution": "nodenext", +    "skipLibCheck": true, +  }, +  "include": ["src/**/*"], +}
\ No newline at end of file  | 
