Skip to content

Commit

Permalink
Merge pull request #209 from drackp2m/dev
Browse files Browse the repository at this point in the history
🐛 fix(api): import 'dotenv/config';
  • Loading branch information
drackp2m authored Nov 13, 2024
2 parents c8de193 + be378f6 commit bb0375a
Show file tree
Hide file tree
Showing 6 changed files with 951 additions and 493 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11'
node-version: '23.1'
cache: 'npm'

- name: Install dependencies
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11'
node-version: '23.1'
cache: 'npm'

- name: Install dependencies
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11'
node-version: '23.1'
cache: 'npm'

- name: Install dependencies
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22.11-alpine3.20 AS base
FROM node:23.1-alpine3.20 AS base

RUN apk add --no-cache build-base python3

Expand All @@ -22,9 +22,13 @@ FROM base AS deps

USER node

COPY package.json package-lock* ./
# COPY package.json package-lock.json* ./

RUN npm ci
# RUN npm ci

COPY package.json ./

RUN npm i --omit=optional



Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/shared/environment/env.validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { ApiProtocol } from './api-protocol.type';
import { JwtAlgorithm } from './jwt-algorithm.type';
import { NodeEnv } from './node-env.type';

import 'dotenv/config';

class EnvironmentVariables {
@IsString()
@IsNotEmpty()
Expand Down
21 changes: 21 additions & 0 deletions apps/app/src/app/layout/main/main.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@ export default class MainLayout implements OnInit {

async serviceWorkerCheckUpdates(): Promise<void> {
if (this.swUpdate.isEnabled) {
this.swUpdate.versionUpdates.subscribe({
next: (version) => {
switch (version.type) {
case 'VERSION_DETECTED':
alert('New version detected');
break;
case 'VERSION_READY':
if (confirm('New version of the app is ready. Do you want to reload?')) {
this.swUpdate.activateUpdate().then(() => {
if (confirm('New version installed. Do you want to reload?')) {
location.reload();
}
});
}
break;
case 'VERSION_INSTALLATION_FAILED':
alert('Failed to install new version');
break;
}
},
});
const haveUpdates = await this.swUpdate.checkForUpdate();

console.log({ haveUpdates });
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default [
prev: '*',
},
],
'no-empty': 'warn',
'no-duplicate-imports': 'warn',
'no-multiple-empty-lines': [
'warn',
Expand Down
Loading

0 comments on commit bb0375a

Please sign in to comment.