From: Jérôme Benoit Date: Sun, 5 Nov 2023 21:59:15 +0000 (+0100) Subject: build(simulator): use node.js builtin source maps support X-Git-Tag: v1.2.24~50 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d60bc09d75ff6f28f19ad185b86d2120b4407da2;p=e-mobility-charging-stations-simulator.git build(simulator): use node.js builtin source maps support Signed-off-by: Jérôme Benoit --- diff --git a/docker/start.sh b/docker/start.sh index a244fcaf..a47dc385 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,4 +1,4 @@ #!/usr/bin/env sh -node -r source-map-support/register dist/start.js & +node --enable-source-maps dist/start.js & node webui/start.js diff --git a/manifest-cf-template.yml b/manifest-cf-template.yml index f4723694..8804ef1d 100644 --- a/manifest-cf-template.yml +++ b/manifest-cf-template.yml @@ -9,9 +9,7 @@ applications: routes: - route: e-mobility-charging-stations-simulator.cfapps.sap.hana.ondemand.com health-check-type: process - # debug deployed app development build - # command: node -r source-map-support/register dist/start.js command: node dist/start.js env: # OPTIMIZE_MEMORY: true - NODE_OPTIONS: --stack-trace-limit=1024 --max-old-space-size=768 + NODE_OPTIONS: --enable-source-maps --stack-trace-limit=1024 --max-old-space-size=768 diff --git a/package.json b/package.json index b5e79c96..42d00538 100644 --- a/package.json +++ b/package.json @@ -56,14 +56,14 @@ "preinstall": "node skip-preinstall.js || npx --yes only-allow pnpm", "prepare": "node prepare.js", "build-requirements": "node --no-warnings build-requirements.js", - "start": "pnpm build && cross-env NODE_ENV=production node dist/start.js", - "start:dev": "pnpm build:dev && cross-env NODE_ENV=development node -r source-map-support/register dist/start.js", - "start:dev:debug": "pnpm build:dev && cross-env NODE_ENV=development node -r source-map-support/register --inspect dist/start.js", - "start:prof": "cross-env NODE_ENV=production node -r source-map-support/register --prof dist/start.js", - "start:doctorprof": "cross-env NODE_ENV=production clinic doctor -- node -r source-map-support/register dist/start.js", - "start:flameprof": "cross-env NODE_ENV=production clinic flame -- node -r source-map-support/register dist/start.js", - "start:bubbleprof": "cross-env NODE_ENV=production clinic bubbleprof -- node -r source-map-support/register dist/start.js", - "start:heapprofiler": "cross-env NODE_ENV=production clinic heapprofiler -- node -r source-map-support/register dist/start.js", + "start": "pnpm build && cross-env NODE_ENV=production node --enable-source-maps dist/start.js", + "start:dev": "pnpm build:dev && cross-env NODE_ENV=development node --enable-source-maps dist/start.js", + "start:dev:debug": "pnpm build:dev && cross-env NODE_ENV=development node --enable-source-maps --inspect dist/start.js", + "start:prof": "cross-env NODE_ENV=production node --enable-source-maps --prof dist/start.js", + "start:doctorprof": "cross-env NODE_ENV=production clinic doctor -- node --enable-source-maps dist/start.js", + "start:flameprof": "cross-env NODE_ENV=production clinic flame -- node --enable-source-maps dist/start.js", + "start:bubbleprof": "cross-env NODE_ENV=production clinic bubbleprof -- node --enable-source-maps dist/start.js", + "start:heapprofiler": "cross-env NODE_ENV=production clinic heapprofiler -- node --enable-source-maps dist/start.js", "esbuild": "pnpm build-requirements && node bundle.js", "build": "pnpm esbuild", "build:cf": "pnpm clean:node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm esbuild", @@ -107,7 +107,6 @@ "mnemonist": "^0.39.5", "mongodb": "^6.2.0", "poolifier": "^3.0.5", - "source-map-support": "^0.5.21", "tar": "^6.2.0", "tslib": "^2.6.2", "winston": "^3.11.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33cd776f..3d7fef65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,9 +59,6 @@ dependencies: poolifier: specifier: ^3.0.5 version: 3.0.5 - source-map-support: - specifier: ^0.5.21 - version: 0.5.21 tar: specifier: ^6.2.0 version: 6.2.0 @@ -2655,6 +2652,7 @@ packages: /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} @@ -8697,6 +8695,7 @@ packages: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 + dev: true /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} @@ -8706,6 +8705,7 @@ packages: /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + dev: true /sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}