diff --git a/package-lock.json b/package-lock.json index efd7b888..3e7eefb8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "join-images": "1.1.5", "koa": "2.15.3", "koa-body": "6.0.1", - "koa-router": "12.0.1", + "koa-router": "13.0.1", "pg": "8.13.0", "promisify-child-process": "4.1.2", "sharp": "0.33.5", @@ -5747,18 +5747,16 @@ } }, "node_modules/koa-router": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/koa-router/-/koa-router-12.0.1.tgz", - "integrity": "sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/koa-router/-/koa-router-13.0.1.tgz", + "integrity": "sha512-4/sijXdSxocIe2wv7RFFSxvo2ic1pDzPSmy11yCGztng1hx408qfw1wVmN3aqhQaU7U6nJ039JKC8ObE73Ohgw==", "dependencies": { - "debug": "^4.3.4", "http-errors": "^2.0.0", "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.2.1" + "path-to-regexp": "^8.1.0" }, "engines": { - "node": ">= 12" + "node": ">= 18" } }, "node_modules/koa-router/node_modules/http-errors": { @@ -5935,14 +5933,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -6473,9 +6463,12 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "engines": { + "node": ">=16" + } }, "node_modules/path-type": { "version": "4.0.0", diff --git a/package.json b/package.json index 0192b16a..c036bf40 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "join-images": "1.1.5", "koa": "2.15.3", "koa-body": "6.0.1", - "koa-router": "12.0.1", + "koa-router": "13.0.1", "pg": "8.13.0", "promisify-child-process": "4.1.2", "sharp": "0.33.5", diff --git a/src/index.ts b/src/index.ts index 1c2f2510..2561348f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -162,9 +162,9 @@ router.post( ); if (DEV) { - router.get(`${siteConfig.staticUrl}/:filename*`, serveStaticResource); - router.get(`/shared/:filename*`, serveStaticSharedResource); - router.get(`/src/frontend/:filename*`, serveViewJs); + router.get(`${siteConfig.staticUrl}/*filename`, serveStaticResource); + router.get(`/shared/*filename`, serveStaticSharedResource); + router.get(`/src/frontend/*filename`, serveViewJs); router.get( `${siteConfig.reportsUrl}/:change/figure-html/:filename`, serveReport