Small fixes

This commit is contained in:
Alejandro Celaya 2022-12-25 09:13:45 +01:00
parent 408ec82a10
commit 822fe3db9e
4 changed files with 10 additions and 4 deletions

View file

@ -4,7 +4,7 @@ ARG VERSION="latest"
ENV VERSION ${VERSION} ENV VERSION ${VERSION}
RUN cd /shlink-web-client && npm ci --force && npm run build 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 <alejandro@alejandrocelaya.com>" LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
RUN rm -r /usr/share/nginx/html && rm /etc/nginx/conf.d/default.conf 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 COPY config/docker/nginx.conf /etc/nginx/conf.d/default.conf

View file

@ -1,3 +1,4 @@
// eslint-disable-next-line max-classes-per-file
declare module 'event-source-polyfill' { declare module 'event-source-polyfill' {
declare class EventSourcePolyfill { declare class EventSourcePolyfill {
public onmessage?: ({ data }: { data: string }) => void; public onmessage?: ({ data }: { data: string }) => void;
@ -7,4 +8,10 @@ declare module 'event-source-polyfill' {
} }
} }
declare module '@json2csv/plainjs' {
export class Parser {
parse: <T>(data: T[]) => string;
}
}
declare module '*.png' declare module '*.png'

View file

@ -17,7 +17,7 @@ declare const self: ServiceWorkerGlobalScope;
clientsClaim(); 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. // Their URLs are injected into the manifest variable below.
// This variable must be present somewhere in your service worker file, // This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA // 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 to signal that we want to use the handler.
return true; return true;
}, },
createHandlerBoundToURL('/index.html') createHandlerBoundToURL('/index.html') // TODO Add prefix
); );
// An example runtime caching route for requests that aren't handled by the // An example runtime caching route for requests that aren't handled by the

View file

@ -1,5 +1,4 @@
import csv from 'csvtojson'; import csv from 'csvtojson';
// @ts-expect-error gfgf
import { Parser } from '@json2csv/plainjs'; import { Parser } from '@json2csv/plainjs';
export const csvToJson = <T>(csvContent: string) => new Promise<T[]>((resolve) => { export const csvToJson = <T>(csvContent: string) => new Promise<T[]>((resolve) => {