From 822fe3db9e58a6eebd5db25fb064ecf525aa6656 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 25 Dec 2022 09:13:45 +0100 Subject: [PATCH] Small fixes --- Dockerfile | 2 +- shlink-web-client.d.ts | 7 +++++++ src/service-worker.ts | 4 ++-- src/utils/helpers/csvjson.ts | 1 - 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06636e83..61f29c6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG VERSION="latest" ENV VERSION ${VERSION} RUN cd /shlink-web-client && npm ci --force && npm run build -FROM nginx:1.21-alpine +FROM nginx:1.23-alpine LABEL maintainer="Alejandro Celaya " RUN rm -r /usr/share/nginx/html && rm /etc/nginx/conf.d/default.conf COPY config/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/shlink-web-client.d.ts b/shlink-web-client.d.ts index 1a746c6e..bb455b3c 100644 --- a/shlink-web-client.d.ts +++ b/shlink-web-client.d.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line max-classes-per-file declare module 'event-source-polyfill' { declare class EventSourcePolyfill { public onmessage?: ({ data }: { data: string }) => void; @@ -7,4 +8,10 @@ declare module 'event-source-polyfill' { } } +declare module '@json2csv/plainjs' { + export class Parser { + parse: (data: T[]) => string; + } +} + declare module '*.png' diff --git a/src/service-worker.ts b/src/service-worker.ts index 98024f60..0a2dc7cb 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -17,7 +17,7 @@ declare const self: ServiceWorkerGlobalScope; clientsClaim(); -// Precache all of the assets generated by your build process. +// Precache all the assets generated by your build process. // Their URLs are injected into the manifest variable below. // This variable must be present somewhere in your service worker file, // even if you decide not to use precaching. See https://cra.link/PWA @@ -49,7 +49,7 @@ registerRoute( // Return true to signal that we want to use the handler. return true; }, - createHandlerBoundToURL('/index.html') + createHandlerBoundToURL('/index.html') // TODO Add prefix ); // An example runtime caching route for requests that aren't handled by the diff --git a/src/utils/helpers/csvjson.ts b/src/utils/helpers/csvjson.ts index f55f41e3..8fe34feb 100644 --- a/src/utils/helpers/csvjson.ts +++ b/src/utils/helpers/csvjson.ts @@ -1,5 +1,4 @@ import csv from 'csvtojson'; -// @ts-expect-error gfgf import { Parser } from '@json2csv/plainjs'; export const csvToJson = (csvContent: string) => new Promise((resolve) => {