diff --git a/dockerfiles/Dockerfile.node b/dockerfiles/Dockerfile.node index 7ebc84a11b..fefd5d3f34 100644 --- a/dockerfiles/Dockerfile.node +++ b/dockerfiles/Dockerfile.node @@ -19,6 +19,7 @@ RUN npm run build RUN npm pack --verbose packages/core/ RUN npm pack --verbose packages/node/ +RUN npm pack --verbose packages/path-normalizer/ RUN npm pack --verbose packages/plugin-express/ RUN npm pack --verbose packages/plugin-koa/ RUN npm pack --verbose packages/plugin-restify/ diff --git a/package-lock.json b/package-lock.json index f3ba5beede..f656df16d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2494,6 +2494,10 @@ "resolved": "packages/node", "link": true }, + "node_modules/@bugsnag/path-normalizer": { + "resolved": "packages/path-normalizer", + "link": true + }, "node_modules/@bugsnag/plugin-angular": { "resolved": "packages/plugin-angular", "link": true @@ -45093,6 +45097,7 @@ "@bugsnag/delivery-electron": "^8.4.0", "@bugsnag/electron-filestore": "^8.0.0", "@bugsnag/electron-network-status": "^8.4.0", + "@bugsnag/path-normalizer": "^8.4.0", "@bugsnag/plugin-console-breadcrumbs": "^8.4.0", "@bugsnag/plugin-electron-app": "^8.4.0", "@bugsnag/plugin-electron-app-breadcrumbs": "^8.4.0", @@ -45200,6 +45205,53 @@ "@types/node": "^18.19.74" } }, + "packages/path-normalizer": { + "name": "@bugsnag/path-normalizer", + "version": "8.4.0", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-commonjs": "^28.0.2", + "@rollup/plugin-node-resolve": "^16.0.0", + "@rollup/plugin-typescript": "^12.1.2", + "rollup": "^4.24.0", + "typescript": "^5.7.2" + } + }, + "packages/path-normalizer/node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz", + "integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "packages/path-normalizer/node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "packages/plugin-angular": { "name": "@bugsnag/plugin-angular", "version": "8.4.0", @@ -48984,12 +49036,11 @@ "name": "@bugsnag/plugin-electron-preload-error", "version": "8.4.0", "license": "MIT", + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" + }, "devDependencies": { - "@bugsnag/core": "^8.4.0", "@bugsnag/electron-test-helpers": "^8.4.0" - }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" } }, "packages/plugin-electron-process-info": { @@ -49196,11 +49247,8 @@ "name": "@bugsnag/plugin-node-in-project", "version": "8.4.0", "license": "MIT", - "devDependencies": { - "@bugsnag/core": "^8.4.0" - }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" } }, "packages/plugin-node-surrounding-code": { @@ -49431,11 +49479,8 @@ "name": "@bugsnag/plugin-strip-project-root", "version": "8.4.0", "license": "MIT", - "devDependencies": { - "@bugsnag/core": "^8.4.0" - }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" } }, "packages/plugin-strip-query-string": { @@ -52099,6 +52144,7 @@ "@bugsnag/delivery-electron": "^8.4.0", "@bugsnag/electron-filestore": "^8.0.0", "@bugsnag/electron-network-status": "^8.4.0", + "@bugsnag/path-normalizer": "^8.4.0", "@bugsnag/plugin-console-breadcrumbs": "^8.4.0", "@bugsnag/plugin-electron-app": "^8.4.0", "@bugsnag/plugin-electron-app-breadcrumbs": "^8.4.0", @@ -52182,6 +52228,37 @@ "stack-generator": "^2.0.3" } }, + "@bugsnag/path-normalizer": { + "version": "file:packages/path-normalizer", + "requires": { + "@rollup/plugin-commonjs": "^28.0.2", + "@rollup/plugin-node-resolve": "^16.0.0", + "@rollup/plugin-typescript": "^12.1.2", + "rollup": "^4.24.0", + "typescript": "^5.7.2" + }, + "dependencies": { + "@rollup/plugin-node-resolve": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz", + "integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + } + }, + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true + } + } + }, "@bugsnag/plugin-angular": { "version": "file:packages/plugin-angular", "requires": { @@ -54528,8 +54605,8 @@ "@bugsnag/plugin-electron-preload-error": { "version": "file:packages/plugin-electron-preload-error", "requires": { - "@bugsnag/core": "^8.4.0", - "@bugsnag/electron-test-helpers": "^8.4.0" + "@bugsnag/electron-test-helpers": "^8.4.0", + "@bugsnag/path-normalizer": "^8.4.0" } }, "@bugsnag/plugin-electron-process-info": { @@ -54649,7 +54726,7 @@ "@bugsnag/plugin-node-in-project": { "version": "file:packages/plugin-node-in-project", "requires": { - "@bugsnag/core": "^8.4.0" + "@bugsnag/path-normalizer": "^8.4.0" } }, "@bugsnag/plugin-node-surrounding-code": { @@ -54773,7 +54850,7 @@ "@bugsnag/plugin-strip-project-root": { "version": "file:packages/plugin-strip-project-root", "requires": { - "@bugsnag/core": "^8.4.0" + "@bugsnag/path-normalizer": "^8.4.0" } }, "@bugsnag/plugin-strip-query-string": { diff --git a/packages/core/package.json b/packages/core/package.json index 59c1a89766..dc6ad016e6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,8 +10,7 @@ "default": "./dist/index.cjs" }, "./lib/es-utils/assign": "./src/lib/es-utils/assign.js", - "./lib/es-utils/includes": "./src/lib/es-utils/includes.js", - "./lib/path-normalizer": "./src/lib/path-normalizer.js" + "./lib/es-utils/includes": "./src/lib/es-utils/includes.js" }, "description": "Core classes and utilities for Bugsnag notifiers", "homepage": "https://www.bugsnag.com/", diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 1f281b4b4a..e71d74836a 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -12,7 +12,7 @@ export { default as extractObject } from './lib/extract-object' export { default as intRange } from './lib/validators/int-range' export { default as isError } from './lib/iserror' export { default as listOfFunctions } from './lib/validators/list-of-functions' -export { default as runCallbacks } from "./lib/callback-runner"; +export { default as runCallbacks } from './lib/callback-runner' export { default as runSyncCallbacks } from './lib/sync-callback-runner' export { default as stringWithLength } from './lib/validators/string-with-length' diff --git a/packages/electron/package.json b/packages/electron/package.json index 06184aeccc..c2a772a2d3 100644 --- a/packages/electron/package.json +++ b/packages/electron/package.json @@ -25,6 +25,7 @@ "@bugsnag/delivery-electron": "^8.4.0", "@bugsnag/electron-filestore": "^8.0.0", "@bugsnag/electron-network-status": "^8.4.0", + "@bugsnag/path-normalizer": "^8.4.0", "@bugsnag/plugin-console-breadcrumbs": "^8.4.0", "@bugsnag/plugin-electron-app": "^8.4.0", "@bugsnag/plugin-electron-app-breadcrumbs": "^8.4.0", diff --git a/packages/electron/src/client/main.js b/packages/electron/src/client/main.js index 01c78376f9..39229656cf 100644 --- a/packages/electron/src/client/main.js +++ b/packages/electron/src/client/main.js @@ -29,7 +29,7 @@ const createMainClient = (opts) => { // Normalise the project root upfront so renderers have a fully resolved path // The renderers can't do this themselves as they cannot access the 'path' module if (opts.projectRoot) { - const normalizePath = require('@bugsnag/core/lib/path-normalizer') + const normalizePath = require('@bugsnag/path-normalizer') opts.projectRoot = normalizePath(opts.projectRoot) } diff --git a/packages/electron/src/config/main.js b/packages/electron/src/config/main.js index 45f96a2c51..7cbcd56942 100644 --- a/packages/electron/src/config/main.js +++ b/packages/electron/src/config/main.js @@ -2,7 +2,7 @@ const { schema } = require('./common') const { listOfFunctions, stringWithLength } = require('@bugsnag/core') const { inspect } = require('util') const { app } = require('electron') -const normalizePath = require('@bugsnag/core/lib/path-normalizer') +const normalizePath = require('@bugsnag/path-normalizer') module.exports.schema = { ...schema, diff --git a/packages/path-normalizer/LICENSE.txt b/packages/path-normalizer/LICENSE.txt new file mode 100644 index 0000000000..3596c5b072 --- /dev/null +++ b/packages/path-normalizer/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Bugsnag + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/path-normalizer/README.md b/packages/path-normalizer/README.md new file mode 100644 index 0000000000..2f4fc79bc0 --- /dev/null +++ b/packages/path-normalizer/README.md @@ -0,0 +1,23 @@ +# @bugsnag/path-normalizer + +A utility for normalizing file paths by making them absolute and adding trailing slashes for directories. + +## Installation + +```bash +npm install @bugsnag/path-normalizer +``` + +## Usage + +```javascript +const normalizePath = require('@bugsnag/path-normalizer') + +// Normalize a path +const normalizedPath = normalizePath('./some/relative/path') +// Returns: '/absolute/path/to/some/relative/path/' +``` + +## License + +MIT diff --git a/packages/path-normalizer/package.json b/packages/path-normalizer/package.json new file mode 100644 index 0000000000..89cdc8eb74 --- /dev/null +++ b/packages/path-normalizer/package.json @@ -0,0 +1,38 @@ +{ + "name": "@bugsnag/path-normalizer", + "version": "8.4.0", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "default": "./dist/index.js" + } + }, + "description": "Path normalization utility for Bugsnag", + "homepage": "https://www.bugsnag.com/", + "repository": { + "type": "git", + "url": "git@github.com:bugsnag/bugsnag-js.git" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "rollup --config rollup.config.js", + "test:types": "tsc -p tsconfig.json" + }, + "author": "Bugsnag", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-commonjs": "^28.0.2", + "@rollup/plugin-node-resolve": "^16.0.0", + "@rollup/plugin-typescript": "^12.1.2", + "rollup": "^4.24.0", + "typescript": "^5.7.2" + } +} diff --git a/packages/path-normalizer/rollup.config.js b/packages/path-normalizer/rollup.config.js new file mode 100644 index 0000000000..05d336978d --- /dev/null +++ b/packages/path-normalizer/rollup.config.js @@ -0,0 +1,47 @@ +/* eslint-env node */ +/* global require, module */ +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const commonjs = require('@rollup/plugin-commonjs') +const typescript = require('@rollup/plugin-typescript') + +module.exports = [ + // CommonJS build + { + input: 'src/index.ts', + output: { + file: 'dist/index.js', + format: 'cjs', + exports: 'default' + }, + plugins: [ + nodeResolve({ + preferBuiltins: true + }), + commonjs(), + typescript({ + declaration: true, + declarationDir: 'dist', + rootDir: 'src' + }) + ], + external: ['path'] + }, + // ES Module build + { + input: 'src/index.ts', + output: { + file: 'dist/index.mjs', + format: 'es' + }, + plugins: [ + nodeResolve({ + preferBuiltins: true + }), + commonjs(), + typescript({ + declaration: false + }) + ], + external: ['path'] + } +] diff --git a/packages/core/src/lib/path-normalizer.js b/packages/path-normalizer/src/index.ts similarity index 55% rename from packages/core/src/lib/path-normalizer.js rename to packages/path-normalizer/src/index.ts index fc5c75bf41..592c74c106 100644 --- a/packages/core/src/lib/path-normalizer.js +++ b/packages/path-normalizer/src/index.ts @@ -1,5 +1,7 @@ -const { join, resolve } = require('path') +import { join, resolve } from 'path' // normalise a path to a directory, adding a trailing slash if it doesn't already // have one and resolve it to make it absolute (e.g. get rid of any ".."s) -module.exports = p => join(resolve(p), '/') +const normalizePath = (p: string) => join(resolve(p), '/') + +export default normalizePath diff --git a/packages/path-normalizer/tsconfig.json b/packages/path-normalizer/tsconfig.json new file mode 100644 index 0000000000..918896fa6f --- /dev/null +++ b/packages/path-normalizer/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "include": ["."], + "compilerOptions": { + "lib": ["es2017"], + "types": ["node"] + } +} diff --git a/packages/plugin-electron-preload-error/package.json b/packages/plugin-electron-preload-error/package.json index ddf44e43a5..ef8a2501f0 100644 --- a/packages/plugin-electron-preload-error/package.json +++ b/packages/plugin-electron-preload-error/package.json @@ -15,11 +15,10 @@ "preload-error.js" ], "devDependencies": { - "@bugsnag/core": "^8.4.0", "@bugsnag/electron-test-helpers": "^8.4.0" }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" }, "author": "Bugsnag", "license": "MIT" diff --git a/packages/plugin-electron-preload-error/preload-error.js b/packages/plugin-electron-preload-error/preload-error.js index a39aaf63db..f8027824f8 100644 --- a/packages/plugin-electron-preload-error/preload-error.js +++ b/packages/plugin-electron-preload-error/preload-error.js @@ -1,4 +1,4 @@ -const normalizePath = require('@bugsnag/core/lib/path-normalizer') +const normalizePath = require('@bugsnag/path-normalizer') const handledState = { severity: 'error', diff --git a/packages/plugin-node-in-project/in-project.js b/packages/plugin-node-in-project/in-project.js index d9012bde7a..f056ea5b2f 100644 --- a/packages/plugin-node-in-project/in-project.js +++ b/packages/plugin-node-in-project/in-project.js @@ -1,4 +1,4 @@ -const normalizePath = require('@bugsnag/core/lib/path-normalizer') +const normalizePath = require('@bugsnag/path-normalizer') module.exports = { load: client => client.addOnError(event => { diff --git a/packages/plugin-node-in-project/package.json b/packages/plugin-node-in-project/package.json index 865a7af0fe..717c9de9a9 100644 --- a/packages/plugin-node-in-project/package.json +++ b/packages/plugin-node-in-project/package.json @@ -17,10 +17,7 @@ "scripts": {}, "author": "Bugsnag", "license": "MIT", - "devDependencies": { - "@bugsnag/core": "^8.4.0" - }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" } } diff --git a/packages/plugin-strip-project-root/package.json b/packages/plugin-strip-project-root/package.json index d1db090fe8..4c8b68b64c 100644 --- a/packages/plugin-strip-project-root/package.json +++ b/packages/plugin-strip-project-root/package.json @@ -16,10 +16,7 @@ ], "author": "Bugsnag", "license": "MIT", - "devDependencies": { - "@bugsnag/core": "^8.4.0" - }, - "peerDependencies": { - "@bugsnag/core": "^8.0.0" + "dependencies": { + "@bugsnag/path-normalizer": "^8.4.0" } } diff --git a/packages/plugin-strip-project-root/strip-project-root.js b/packages/plugin-strip-project-root/strip-project-root.js index b9515b8975..edc0671d11 100644 --- a/packages/plugin-strip-project-root/strip-project-root.js +++ b/packages/plugin-strip-project-root/strip-project-root.js @@ -1,4 +1,4 @@ -const normalizePath = require('@bugsnag/core/lib/path-normalizer') +const normalizePath = require('@bugsnag/path-normalizer') module.exports = { load: client => client.addOnError(event => { diff --git a/test/aws-lambda/features/fixtures/hono-app/app/package.json b/test/aws-lambda/features/fixtures/hono-app/app/package.json index 4ce62b5cbe..02d96c8f89 100644 --- a/test/aws-lambda/features/fixtures/hono-app/app/package.json +++ b/test/aws-lambda/features/fixtures/hono-app/app/package.json @@ -8,6 +8,7 @@ "@bugsnag/in-flight": "bugsnag-in-flight.tgz", "@bugsnag/js": "bugsnag-js.tgz", "@bugsnag/node": "bugsnag-node.tgz", + "@bugsnag/path-normalizer": "bugsnag-path-normalizer.tgz", "@bugsnag/plugin-app-duration": "bugsnag-plugin-app-duration.tgz", "@bugsnag/plugin-aws-lambda": "bugsnag-plugin-aws-lambda.tgz", "@bugsnag/plugin-contextualize": "bugsnag-plugin-contextualize.tgz", diff --git a/test/aws-lambda/features/fixtures/serverless-express-app/app/package.json b/test/aws-lambda/features/fixtures/serverless-express-app/app/package.json index 77b6671142..686a7e5458 100644 --- a/test/aws-lambda/features/fixtures/serverless-express-app/app/package.json +++ b/test/aws-lambda/features/fixtures/serverless-express-app/app/package.json @@ -10,6 +10,7 @@ "@bugsnag/in-flight": "bugsnag-in-flight.tgz", "@bugsnag/js": "bugsnag-js.tgz", "@bugsnag/node": "bugsnag-node.tgz", + "@bugsnag/path-normalizer": "bugsnag-path-normalizer.tgz", "@bugsnag/plugin-app-duration": "bugsnag-plugin-app-duration.tgz", "@bugsnag/plugin-aws-lambda": "bugsnag-plugin-aws-lambda.tgz", "@bugsnag/plugin-contextualize": "bugsnag-plugin-contextualize.tgz", diff --git a/test/aws-lambda/features/fixtures/simple-app/async/package.json b/test/aws-lambda/features/fixtures/simple-app/async/package.json index a5c32db16e..012ed4d7f7 100644 --- a/test/aws-lambda/features/fixtures/simple-app/async/package.json +++ b/test/aws-lambda/features/fixtures/simple-app/async/package.json @@ -8,6 +8,7 @@ "@bugsnag/in-flight": "bugsnag-in-flight.tgz", "@bugsnag/js": "bugsnag-js.tgz", "@bugsnag/node": "bugsnag-node.tgz", + "@bugsnag/path-normalizer": "bugsnag-path-normalizer.tgz", "@bugsnag/plugin-app-duration": "bugsnag-plugin-app-duration.tgz", "@bugsnag/plugin-aws-lambda": "bugsnag-plugin-aws-lambda.tgz", "@bugsnag/plugin-contextualize": "bugsnag-plugin-contextualize.tgz", diff --git a/test/aws-lambda/features/fixtures/simple-app/callback/package.json b/test/aws-lambda/features/fixtures/simple-app/callback/package.json index a5c32db16e..012ed4d7f7 100644 --- a/test/aws-lambda/features/fixtures/simple-app/callback/package.json +++ b/test/aws-lambda/features/fixtures/simple-app/callback/package.json @@ -8,6 +8,7 @@ "@bugsnag/in-flight": "bugsnag-in-flight.tgz", "@bugsnag/js": "bugsnag-js.tgz", "@bugsnag/node": "bugsnag-node.tgz", + "@bugsnag/path-normalizer": "bugsnag-path-normalizer.tgz", "@bugsnag/plugin-app-duration": "bugsnag-plugin-app-duration.tgz", "@bugsnag/plugin-aws-lambda": "bugsnag-plugin-aws-lambda.tgz", "@bugsnag/plugin-contextualize": "bugsnag-plugin-contextualize.tgz", diff --git a/test/aws-lambda/features/scripts/build-fixtures b/test/aws-lambda/features/scripts/build-fixtures index f23e64e577..4ee0f9686c 100755 --- a/test/aws-lambda/features/scripts/build-fixtures +++ b/test/aws-lambda/features/scripts/build-fixtures @@ -20,6 +20,7 @@ BUGSNAG_PACKAGES = [ "in-flight", "js", "node", + "path-normalizer", "plugin-app-duration", "plugin-aws-lambda", "plugin-contextualize", diff --git a/test/node/features/fixtures/hono/Dockerfile b/test/node/features/fixtures/hono/Dockerfile index 7f1642beca..52436436b6 100644 --- a/test/node/features/fixtures/hono/Dockerfile +++ b/test/node/features/fixtures/hono/Dockerfile @@ -8,7 +8,7 @@ RUN npm install COPY . ./ -RUN npm install --no-package-lock --no-save bugsnag-core*.tgz bugsnag-node*.tgz bugsnag-plugin-hono*.tgz +RUN npm install --no-package-lock --no-save bugsnag-core*.tgz bugsnag-node*.tgz bugsnag-path-normalizer*.tgz bugsnag-plugin-hono*.tgz ENV NODE_ENV production CMD node scenarios/app