Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix(api): import 'dotenv/config'; #209

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
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
Loading