Skip to content
Merged

Dev #135

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@v2
with:
repository: HSLdevcom/transitlog-server
ref: dev

- name: Build Server and publish Docker image
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: hsldevcom/transitlog-server
username: ${{ secrets.TRANSITLOG_DOCKERHUB_USER }}
password: ${{ secrets.TRANSITLOG_DOCKERHUB_TOKEN }}
tags: dev
tags: dev
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-alpine
FROM node:20-alpine

RUN apk --no-cache add curl

Expand All @@ -9,9 +9,8 @@ RUN mkdir -p ${WORK}
WORKDIR ${WORK}

# Install app dependencies
COPY yarn.lock ${WORK}
COPY package.json ${WORK}
RUN yarn
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Bundle app source
COPY . ${WORK}
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "TS_NODE_FILES=true NODE_ICU_DATA=\\\"node_modules/full-icu\\\" ts-node-dev --max-old-space-size=4096 --no-notify --respawn --inspect -r dotenv/config --files src/server.ts",
"start:build": "TS_NODE_FILES=true NODE_ICU_DATA=\"node_modules/full-icu\" ts-node-dev --no-notify --respawn --inspect -r dotenv/config --files dist/server.js",
"start:production": "NODE_ICU_DATA=\"node_modules/full-icu\" node -r dotenv/config dist/server.js",
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"codegen": "graphql-codegen --config codegen.yml",
"codestyle": "prettier \"src/**/*.{ts,js,json}\" --write",
"test": "node scripts/test.js",
Expand Down Expand Up @@ -57,7 +57,7 @@
"express": "^4.17.1",
"express-rate-limit": "5.5.1",
"express-react-views": "^0.11.0",
"express-session": "^1.17.2",
"express-session": "^1.19.0",
"fs-extra": "^8.0.1",
"full-icu": "^1.3.0",
"fuse.js": "^3.4.4",
Expand Down Expand Up @@ -104,5 +104,8 @@
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1"
},
"resolutions": {
"@types/minimatch": "5.1.2"
}
}
13 changes: 13 additions & 0 deletions src/types/express-session.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'express-session'

declare module 'express-session' {
interface SessionData {
accessToken?: string
expiresAt?: number
refreshToken?: string
email?: string
_test?: boolean
groups?: string[]
userId?: string
}
}
12 changes: 12 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["node"]
},
"exclude": [
"node_modules",
"dist",
"**/*.test.ts",
"**/*.spec.ts"
]
}
8 changes: 5 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
"resolveJsonModule": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": false,
"jsx": "react",
"outDir": "dist"
"outDir": "dist",
"types": ["node", "jest"],
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": [
"node_modules",
"dist",
Expand All @@ -33,4 +35,4 @@
".run",
"jest.config.js"
]
}
}
Loading
Loading