From 52909f3eba178cf4773ffaac4bb34ec022a92a0d Mon Sep 17 00:00:00 2001 From: David Barroso Date: Thu, 14 Sep 2023 13:16:43 +0200 Subject: [PATCH] feat: upgrade to nodejs18 (#23) --- Dockerfile | 4 +- flake.lock | 77 ++++++++++++++++++++ flake.nix | 101 +++++++++++++++++++++++++++ package.json | 9 +-- pnpm-lock.yaml | 186 ++++++++++++++++++++++++++----------------------- server.ts | 9 ++- 6 files changed, 289 insertions(+), 97 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/Dockerfile b/Dockerfile index ed8f5f4..46f794d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM node:16-alpine +FROM node:18-alpine # * Same version as in Watchtower -ARG EXPRESS_VERSION=4.18.1 +ARG EXPRESS_VERSION=4.18.2 ENV EXPRESS_VERSION $EXPRESS_VERSION # * path to the server files diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..48dca85 --- /dev/null +++ b/flake.lock @@ -0,0 +1,77 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-filter": { + "locked": { + "lastModified": 1694434370, + "narHash": "sha256-7yfdTR4mCvWZ39Q6HUcsa18tr0mg+fJZSaHE/63rwoo=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "d6381c442f79f2f1fdfde00521c3d15d6c21218e", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1694593561, + "narHash": "sha256-WSaIQZ5s9N9bDFkEMTw6P9eaZ9bv39ZhsiW12GtTNM0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1697b7d480449b01111e352021f46e5879e47643", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nix-filter": "nix-filter", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..73cda8a --- /dev/null +++ b/flake.nix @@ -0,0 +1,101 @@ +{ + description = "Nhost Functions"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-filter.url = "github:numtide/nix-filter"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, nix-filter }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ + (final: prev: { + nodejs = prev.nodejs-18_x; + }) + ]; + + pkgs = import nixpkgs { + inherit overlays system; + }; + + nix-src = nix-filter.lib.filter { + root = ./.; + include = [ + (nix-filter.lib.matchExt "nix") + ]; + }; + + node_modules = pkgs.stdenv.mkDerivation { + inherit version; + + pname = "node_modules"; + + nativeBuildInputs = with pkgs; [ + nodePackages.pnpm + ]; + + src = nix-filter.lib.filter { + root = ./.; + include = [ + ./package.json + ./pnpm-lock.yaml + ]; + }; + + + buildPhase = '' + pnpm install + ''; + + installPhase = '' + mkdir -p $out + cp -r node_modules $out + ''; + }; + + + name = "functions"; + version = "0.0.0-dev"; + + buildInputs = with pkgs;[ + nodejs + ]; + nativeBuildInputs = with pkgs; [ + nodePackages.pnpm + ]; + in + { + checks = { + nixpkgs-fmt = pkgs.runCommand "check-nixpkgs-fmt" + { + nativeBuildInputs = with pkgs; + [ + nixpkgs-fmt + ]; + } + '' + mkdir $out + nixpkgs-fmt --check ${nix-src} + ''; + + }; + + devShells = flake-utils.lib.flattenTree rec { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + nixpkgs-fmt + gnumake + ] ++ buildInputs ++ nativeBuildInputs; + + shellHook = '' + export PATH=${node_modules}/node_modules/.bin:$PATH + rm -rf node_modules + ln -sf ${node_modules}/node_modules/ node_modules + ''; + }; + }; + } + ); +} diff --git a/package.json b/package.json index a6d30c1..69e1e18 100644 --- a/package.json +++ b/package.json @@ -22,16 +22,17 @@ "homepage": "https://github.com/nhost/functions#readme", "devDependencies": { "@antfu/ni": "^0.17.2", - "@swc-node/register": "^1.6.5", + "@swc-node/register": "^1.6.7", + "@swc/core": "^1.3.84", "@types/express": "^4.17.17", "@types/glob": "^7.2.0", - "@types/morgan": "^1.9.4", - "@types/node": "^18.16.14", + "@types/morgan": "^1.9.5", + "@types/node": "^18.17.15", "express": "4.18.1", "glob": "^8.1.0", "morgan": "^1.10.0", "nodemon": "^2.0.22", - "pnpm": "^7.32.4", + "pnpm": "^7.33.6", "typescript": "^4.9.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 854bb27..09b334a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,8 +5,11 @@ devDependencies: specifier: ^0.17.2 version: 0.17.2 '@swc-node/register': - specifier: ^1.6.5 - version: 1.6.5(@swc/core@1.3.59)(typescript@4.9.5) + specifier: ^1.6.7 + version: 1.6.7(@swc/core@1.3.84)(typescript@4.9.5) + '@swc/core': + specifier: ^1.3.84 + version: 1.3.84 '@types/express': specifier: ^4.17.17 version: 4.17.17 @@ -14,11 +17,11 @@ devDependencies: specifier: ^7.2.0 version: 7.2.0 '@types/morgan': - specifier: ^1.9.4 - version: 1.9.4 + specifier: ^1.9.5 + version: 1.9.5 '@types/node': - specifier: ^18.16.14 - version: 18.16.14 + specifier: ^18.17.15 + version: 18.17.15 express: specifier: 4.18.1 version: 4.18.1 @@ -32,8 +35,8 @@ devDependencies: specifier: ^2.0.22 version: 2.0.22 pnpm: - specifier: ^7.32.4 - version: 7.32.4 + specifier: ^7.33.6 + version: 7.33.6 typescript: specifier: ^4.9.5 version: 4.9.5 @@ -45,28 +48,28 @@ packages: hasBin: true dev: true - /@swc-node/core@1.10.3(@swc/core@1.3.59): - resolution: {integrity: sha512-8rpv1DXzsQjN/C8ZXuaTSmJ4M/lRr6geUlbOQ861DLC+sKWcEEvxRjK9cXQ28GserHuEcFDA3wlF9rD1YD0x+Q==} + /@swc-node/core@1.10.5(@swc/core@1.3.84): + resolution: {integrity: sha512-G+Me0sTApMy6WY9mT0TluFxdO633P1GWMllbT3LWeJlknqQxJo8dAQcV0Uc0+rvBVXt7rRo/BMUZNJp88qarzg==} engines: {node: '>= 10'} peerDependencies: '@swc/core': '>= 1.3' dependencies: - '@swc/core': 1.3.59 + '@swc/core': 1.3.84 dev: true - /@swc-node/register@1.6.5(@swc/core@1.3.59)(typescript@4.9.5): - resolution: {integrity: sha512-yMxXlzthI0aMadYYKDhx7xvtjljB1qoD8Tv0djqSJ1ttTkoDxg6MhG5A5pIahiUT2neVrkWb9lCavoUwXAe/zQ==} + /@swc-node/register@1.6.7(@swc/core@1.3.84)(typescript@4.9.5): + resolution: {integrity: sha512-+Tccbb4+fN8vYx88fdEGFbsCSnF0zBxbVhZkYkFAbVI7h6zVIgA3Jmlok4ZM+q+1KxzPN7AOfhQVuFOYBzZBeA==} peerDependencies: '@swc/core': '>= 1.3' typescript: '>= 4.3' dependencies: - '@swc-node/core': 1.10.3(@swc/core@1.3.59) + '@swc-node/core': 1.10.5(@swc/core@1.3.84) '@swc-node/sourcemap-support': 0.3.0 - '@swc/core': 1.3.59 + '@swc/core': 1.3.84 colorette: 2.0.20 debug: 4.3.4 - pirates: 4.0.5 - tslib: 2.5.2 + pirates: 4.0.6 + tslib: 2.6.2 typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -76,11 +79,11 @@ packages: resolution: {integrity: sha512-gqBJSmJMWomZFxlppaKea7NeAqFrDrrS0RMt24No92M3nJWcyI9YKGEQKl+EyJqZ5gh6w1s0cTklMHMzRwA1NA==} dependencies: source-map-support: 0.5.21 - tslib: 2.5.2 + tslib: 2.6.2 dev: true - /@swc/core-darwin-arm64@1.3.59: - resolution: {integrity: sha512-AnqWFBgEKHP0jb4iZqx7eVQT9/rX45+DE4Ox7GpwCahUKxxrsDLyXzKhwLwQuAjUvtu5JcSB77szKpPGDM49fQ==} + /@swc/core-darwin-arm64@1.3.84: + resolution: {integrity: sha512-mqK0buOo+toF2HoJ/gWj2ApZbvbIiNq3mMwSTHCYJHlQFQfoTWnl9aaD5GSO4wfNFVYfEZ1R259o5uv5NlVtoA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -88,8 +91,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.3.59: - resolution: {integrity: sha512-iqDs+yii9mOsmpJez82SEi4d4prWDRlapHxKnDVJ0x1AqRo41vIq8t3fujrvCHYU5VQgOYGh4ooXQpaP2H3B2A==} + /@swc/core-darwin-x64@1.3.84: + resolution: {integrity: sha512-cyuQZz62C43EDZqtnptUTlfDvAjgG3qu139m5zsfIK6ltXA5inKFbDWV3a/M5c18dFzA2Xh21Q46XZezmtQ9Tg==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -97,8 +100,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.59: - resolution: {integrity: sha512-PB0PP+SgkCSd/kYmltnPiGv42cOSaih1OjXCEjxvNwUFEmWqluW6uGdWaNiR1LoYMxhcHZTc336jL2+O3l6p0Q==} + /@swc/core-linux-arm-gnueabihf@1.3.84: + resolution: {integrity: sha512-dmt/ECQrp3ZPWnK27p4E4xRIRHOoJhgGvxC5t5YaWzN20KcxE9ykEY2oLGSoeceM/A+4D11aRYGwF/EM7yOkvA==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -106,8 +109,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.59: - resolution: {integrity: sha512-Ol/JPszWZ+OZ44FOdJe35TfJ1ckG4pYaisZJ4E7PzfwfVe2ygX85C5WWR4e5L0Y1zFvzpcI7gdyC2wzcXk4Cig==} + /@swc/core-linux-arm64-gnu@1.3.84: + resolution: {integrity: sha512-PgVfrI3NVg2z/oeg3GWLb9rFLMqidbdPwVH5nRyHVP2RX/BWP6qfnYfG+gJv4qrKzIldb9TyCGH7y8VWctKLxw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -115,8 +118,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.59: - resolution: {integrity: sha512-PtTTtGbj9GiY5gJdoSFL2A0vL6BRaS1haAhp6g3hZvLDkTTg+rJURmzwBMMjaQlnGC62x/lLf6MoszHG/05//Q==} + /@swc/core-linux-arm64-musl@1.3.84: + resolution: {integrity: sha512-hcuEa8/vin4Ns0P+FpcDHQ4f3jmhgGKQhqw0w+TovPSVTIXr+nrFQ2AGhs9nAxS6tSQ77C53Eb5YRpK8ToFo1A==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -124,8 +127,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu@1.3.59: - resolution: {integrity: sha512-XBW9AGi0YsIN76IfesnDSBn/5sjR69J75KUNte8sH6seYlHJ0/kblqUMbUcfr0CiGoJadbzAZeKZZmfN7EsHpg==} + /@swc/core-linux-x64-gnu@1.3.84: + resolution: {integrity: sha512-IvyimSbwGdu21jBBEqR1Up8Jhvl8kIAf1k3e5Oy8oRfgojdUfmW1EIwgGdoUeyQ1VHlfquiWaRGfsnHQUKl35g==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -133,8 +136,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl@1.3.59: - resolution: {integrity: sha512-Cy5E939SdWPQ34cg6UABNO0RyEe0FuWqzZ/GLKtK11Ir4fjttVlucZiY59uQNyUVUc8T2qE0VBFCyD/zYGuHtg==} + /@swc/core-linux-x64-musl@1.3.84: + resolution: {integrity: sha512-hdgVU/O5ufDCe+p5RtCjU7PRNwd0WM+eWJS+GNY4QWL6O8y2VLM+i4+6YzwSUjeBk0xd+1YElMxbqz7r5tSZhw==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -142,8 +145,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc@1.3.59: - resolution: {integrity: sha512-z5ZJxizRvRoSAaevRIi3YjQh74OFWEIhonSDWNdqDL7RbjEivcatYcG7OikH6s+rtPhOcwNm3PbGV2Prcgh/gg==} + /@swc/core-win32-arm64-msvc@1.3.84: + resolution: {integrity: sha512-rzH6k2BF0BFOFhUTD+bh0oCiUCZjFfDfoZoYNN/CM0qbtjAcFH21hzMh/EH8ZaXq8k/iQmUNNa5MPNPZ4SOMNw==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -151,8 +154,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.3.59: - resolution: {integrity: sha512-vxpsn+hrKAhi5YusQfB/JXUJJVX40rIRE/L49ilBEqdbH8Khkoego6AD+2vWqTdJcUHo1WiAIAEZ0rTsjyorLQ==} + /@swc/core-win32-ia32-msvc@1.3.84: + resolution: {integrity: sha512-Y+Dk7VLLVwwsAzoDmjkNW/sTmSPl9PGr4Mj1nhc5A2NNxZ+hz4SxFMclacDI03SC5ikK8Qh6WOoE/+nwUDa3uA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -160,8 +163,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.3.59: - resolution: {integrity: sha512-Ris/cJbURylcLwqz4RZUUBCEGsuaIHOJsvf69W5pGKHKBryVoOTNhBKpo3Km2hoAi5qFQ/ou0trAT4hBsVPZvQ==} + /@swc/core-win32-x64-msvc@1.3.84: + resolution: {integrity: sha512-WmpaosqCWMX7DArLdU8AJcj96hy0PKlYh1DaMVikSrrDHbJm2dZ8rd27IK3qUB8DgPkrDYHmLAKNZ+z3gWXgRQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -169,8 +172,8 @@ packages: dev: true optional: true - /@swc/core@1.3.59: - resolution: {integrity: sha512-ZBw31zd2E5SXiodwGvjQdx5ZC90b2uyX/i2LeMMs8LKfXD86pfOfQac+JVrnyEKDhASXj9icgsF9NXBhaMr3Kw==} + /@swc/core@1.3.84: + resolution: {integrity: sha512-UPKUiDwG7HOdPfOb1VFeEJ76JDgU2w80JLewzx6tb0fk9TIjhr9yxKBzPbzc/QpjGHDu5iaEuNeZcu27u4j63g==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -178,37 +181,43 @@ packages: peerDependenciesMeta: '@swc/helpers': optional: true + dependencies: + '@swc/types': 0.1.4 optionalDependencies: - '@swc/core-darwin-arm64': 1.3.59 - '@swc/core-darwin-x64': 1.3.59 - '@swc/core-linux-arm-gnueabihf': 1.3.59 - '@swc/core-linux-arm64-gnu': 1.3.59 - '@swc/core-linux-arm64-musl': 1.3.59 - '@swc/core-linux-x64-gnu': 1.3.59 - '@swc/core-linux-x64-musl': 1.3.59 - '@swc/core-win32-arm64-msvc': 1.3.59 - '@swc/core-win32-ia32-msvc': 1.3.59 - '@swc/core-win32-x64-msvc': 1.3.59 + '@swc/core-darwin-arm64': 1.3.84 + '@swc/core-darwin-x64': 1.3.84 + '@swc/core-linux-arm-gnueabihf': 1.3.84 + '@swc/core-linux-arm64-gnu': 1.3.84 + '@swc/core-linux-arm64-musl': 1.3.84 + '@swc/core-linux-x64-gnu': 1.3.84 + '@swc/core-linux-x64-musl': 1.3.84 + '@swc/core-win32-arm64-msvc': 1.3.84 + '@swc/core-win32-ia32-msvc': 1.3.84 + '@swc/core-win32-x64-msvc': 1.3.84 + dev: true + + /@swc/types@0.1.4: + resolution: {integrity: sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==} dev: true /@types/body-parser@1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: - '@types/connect': 3.4.35 - '@types/node': 18.16.14 + '@types/connect': 3.4.36 + '@types/node': 18.17.15 dev: true - /@types/connect@3.4.35: - resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} + /@types/connect@3.4.36: + resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.17.15 dev: true - /@types/express-serve-static-core@4.17.35: - resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} + /@types/express-serve-static-core@4.17.36: + resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: - '@types/node': 18.16.14 - '@types/qs': 6.9.7 + '@types/node': 18.17.15 + '@types/qs': 6.9.8 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 dev: true @@ -217,16 +226,20 @@ packages: resolution: {integrity: sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==} dependencies: '@types/body-parser': 1.19.2 - '@types/express-serve-static-core': 4.17.35 - '@types/qs': 6.9.7 - '@types/serve-static': 1.15.1 + '@types/express-serve-static-core': 4.17.36 + '@types/qs': 6.9.8 + '@types/serve-static': 1.15.2 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.14 + '@types/node': 18.17.15 + dev: true + + /@types/http-errors@2.0.1: + resolution: {integrity: sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==} dev: true /@types/mime@1.3.2: @@ -241,18 +254,18 @@ packages: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true - /@types/morgan@1.9.4: - resolution: {integrity: sha512-cXoc4k+6+YAllH3ZHmx4hf7La1dzUk6keTR4bF4b4Sc0mZxU/zK4wO7l+ZzezXm/jkYj/qC+uYGZrarZdIVvyQ==} + /@types/morgan@1.9.5: + resolution: {integrity: sha512-5TgfIWm0lcTGnbCZExwc19dCOMOMmAiiBZQj8Ko3NRxsVDgRxf+AEGRQTqNVA5Yh2xfdWp4clbAEMbYP+jkOqg==} dependencies: - '@types/node': 18.16.14 + '@types/node': 18.17.15 dev: true - /@types/node@18.16.14: - resolution: {integrity: sha512-+ImzUB3mw2c5ISJUq0punjDilUQ5GnUim0ZRvchHIWJmOC0G+p0kzhXBqj6cDjK0QdPFwzrHWgrJp3RPvCG5qg==} + /@types/node@18.17.15: + resolution: {integrity: sha512-2yrWpBk32tvV/JAd3HNHWuZn/VDN1P+72hWirHnvsvTGSqbANi+kSeuQR9yAHnbvaBvHDsoTdXV0Fe+iRtHLKA==} dev: true - /@types/qs@6.9.7: - resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} + /@types/qs@6.9.8: + resolution: {integrity: sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==} dev: true /@types/range-parser@1.2.4: @@ -263,14 +276,15 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 18.16.14 + '@types/node': 18.17.15 dev: true - /@types/serve-static@1.15.1: - resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} + /@types/serve-static@1.15.2: + resolution: {integrity: sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==} dependencies: + '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 18.16.14 + '@types/node': 18.17.15 dev: true /abbrev@1.1.1: @@ -381,7 +395,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /colorette@2.0.20: @@ -551,8 +565,8 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -760,7 +774,7 @@ packages: ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 5.7.1 + semver: 5.7.2 simple-update-notifier: 1.1.0 supports-color: 5.5.0 touch: 3.1.0 @@ -822,13 +836,13 @@ packages: engines: {node: '>=8.6'} dev: true - /pirates@4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} dev: true - /pnpm@7.32.4: - resolution: {integrity: sha512-glcBY+mMH/Fek+fCIEFt2H6uPqwEj+QG4P1ZjHVc1aRYnf1jzULB36zYBcuBfQdT18fxc51BoVmm8yIKNcCGJw==} + /pnpm@7.33.6: + resolution: {integrity: sha512-kOJ/04BH8YWD8zQveEzD8Yf01MqsievB//rhjc17Ld52eKC/I3SBvLj36OZhNfo0gDhW5OssRCzggv+rXZ0kHw==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -886,8 +900,8 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: true @@ -991,8 +1005,8 @@ packages: nopt: 1.0.10 dev: true - /tslib@2.5.2: - resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true /type-is@1.6.18: diff --git a/server.ts b/server.ts index 346dc91..eed3748 100644 --- a/server.ts +++ b/server.ts @@ -1,8 +1,7 @@ -import path from 'path' - -import express from 'express' -import morgan from 'morgan' -import glob from 'glob' +const path = require('path') +const express = require('express') +const morgan = require('morgan') +const glob = require('glob') const PORT = 3000