Skip to content

Commit e863002

Browse files
committed
Node 22
1 parent dae8d1c commit e863002

6 files changed

Lines changed: 13195 additions & 4 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [18.x, 20.x, 22.x]
16+
node-version: [22.x]
1717
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1818

1919
steps:

.taylored/share.taylored

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,50 @@ index 37a2552..850825f 100644
6565
@if (documentsButton) {
6666
<button aria-label="Archive the current document" mat-icon-button color="primary"
6767
(click)="documentsEmiter(idea);">
68+
diff --git a/web/src/app/card-idea/card-idea.component.ts b/web/src/app/card-idea/card-idea.component.ts
69+
index 1d60a6f..1c45524 100644
70+
--- a/web/src/app/card-idea/card-idea.component.ts
71+
+++ b/web/src/app/card-idea/card-idea.component.ts
72+
@@ -32,6 +32,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
73+
import { MatTooltipModule } from '@angular/material/tooltip';
74+
75+
// Third-party Libraries
76+
+import { io, Socket as SocketIoClientSocket } from 'socket.io-client';
77+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
78+
79+
// Application-specific Services and Models
80+
@@ -156,6 +157,7 @@ export class CardIdeaComponent implements OnInit, OnChanges, OnDestroy {
81+
_addIdeaButtonActive = signal(false);
82+
83+
/** Private instance of the Socket.IO client for real-time communication (e.g., sharing). */
84+
+ private socket: SocketIoClientSocket;
85+
private destroyRef = inject(DestroyRef);
86+
87+
/**
88+
@@ -172,6 +174,9 @@ export class CardIdeaComponent implements OnInit, OnChanges, OnDestroy {
89+
private genkitService: GenkitService,
90+
private languageService: LanguageService,
91+
) {
92+
+ this.socket = io(environment.socketAddr, {
93+
+ transports: ['websocket']
94+
+ });
95+
}
96+
97+
/**
98+
@@ -273,6 +278,7 @@ export class CardIdeaComponent implements OnInit, OnChanges, OnDestroy {
99+
100+
if (cardIdea && cardIdea.text) {
101+
const payload = { text: cardIdea.text };
102+
+ this.socket.emit('idea', payload);
103+
} else {
104+
console.warn('No text to share.');
105+
}
106+
@@ -542,5 +548,8 @@ export class CardIdeaComponent implements OnInit, OnChanges, OnDestroy {
107+
* Disconnects the Socket.IO client to prevent memory leaks and lingering connections.
108+
*/
109+
ngOnDestroy(): void {
110+
+ if (this.socket) {
111+
+ this.socket.disconnect();
112+
+ }
113+
}
114+
}

genkit/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM node:22-alpine
22

33
WORKDIR /app
44

socket.io/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM node:22-alpine
22

33
WORKDIR /app
44

web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-alpine AS build-stage
1+
FROM node:22-alpine AS build-stage
22

33
WORKDIR /app
44

0 commit comments

Comments
 (0)