diff --git a/packages/mergebot/package.json b/packages/mergebot/package.json index 1d952778f4..8a421523b1 100644 --- a/packages/mergebot/package.json +++ b/packages/mergebot/package.json @@ -28,6 +28,7 @@ "fast-json-patch": "^3.1.1", "graphql": "15.8.0", "prettyjson": "^1.2.5", + "source-map-support": "^0.5.21", "yargs": "^17.7.2" }, "devDependencies": { @@ -35,6 +36,7 @@ "@octokit/webhooks-types": "^7.5.1", "@types/node": "^18.19.33", "@types/prettyjson": "^0.0.33", + "@types/source-map-support": "^0.5.10", "@types/yargs": "^17.0.32", "apollo": "^2.34.0", "azure-functions-core-tools": "^4.0.5700", @@ -59,7 +61,7 @@ "prestart": "pnpm run build", "prepublishOnly": "pnpm run build", "build": "tsc -b", - "bundle": "rimraf dist && esbuild --bundle --platform=node --format=cjs --target=node18 --external:@azure/functions-core --outfile=dist/functions/index.js src/functions/index.ts", + "bundle": "rimraf dist && esbuild --bundle --platform=node --format=cjs --target=node18 --external:@azure/functions-core --outfile=dist/functions/index.js --sourcemap src/functions/index.ts", "watch": "tsc --watch", "graphql-schema": "apollo client:codegen schema --target typescript --globalTypesFile=src/queries/schema/graphql-global-types.ts", "create-fixture": "pnpm run build && node dist/commands/create-fixture.js", diff --git a/packages/mergebot/src/functions/index.ts b/packages/mergebot/src/functions/index.ts index 39a94309b0..0c2c517701 100644 --- a/packages/mergebot/src/functions/index.ts +++ b/packages/mergebot/src/functions/index.ts @@ -1,3 +1,4 @@ +import "source-map-support/register"; import "./api"; import "./discussions-trigger"; import "./httpTrigger"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 624e622b59..50088b2ecd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -321,6 +321,9 @@ importers: prettyjson: specifier: ^1.2.5 version: 1.2.5 + source-map-support: + specifier: ^0.5.21 + version: 0.5.21 yargs: specifier: ^17.7.2 version: 17.7.2 @@ -337,6 +340,9 @@ importers: '@types/prettyjson': specifier: ^0.0.33 version: 0.0.33 + '@types/source-map-support': + specifier: ^0.5.10 + version: 0.5.10 '@types/yargs': specifier: ^17.0.32 version: 17.0.32 @@ -2394,6 +2400,7 @@ packages: /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + requiresBuild: true /@pnpm/constants@7.1.1: resolution: {integrity: sha512-31pZqMtjwV+Vaq7MaPrT1EoDFSYwye3dp6BiHIGRJmVThCQwySRKM7hCvqqI94epNkqFAAYoWrNynWoRYosGdw==} @@ -2819,6 +2826,12 @@ packages: /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} + /@types/source-map-support@0.5.10: + resolution: {integrity: sha512-tgVP2H469x9zq34Z0m/fgPewGhg/MLClalNOiPIzQlXrSS2YrKu/xCdSCKnEDwkFha51VKEKB6A9wW26/ZNwzA==} + dependencies: + source-map: 0.6.1 + dev: true + /@types/ssri@7.1.4: resolution: {integrity: sha512-K2Ys8+BVrgGFY0cVwf55rIS4fa2ZN+4Y/w2h4BnYIf8kvUdmdKT6l6VUpC3uL9HKG8I8EkD5CXIgRUXHOLHcLw==} dependencies: @@ -10134,6 +10147,7 @@ packages: /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + requiresBuild: true dependencies: defaults: 1.0.4 dev: true