mobbdev 0.0.60 → 0.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +15 -1
  2. package/package.json +3 -1
package/dist/index.mjs CHANGED
@@ -202,6 +202,7 @@ async function getGitInfo(srcDirPath) {
202
202
  // src/features/analysis/graphql/gql.ts
203
203
  import Debug3 from "debug";
204
204
  import { GraphQLClient } from "graphql-request";
205
+ import { v4 as uuidv4 } from "uuid";
205
206
 
206
207
  // src/features/analysis/graphql/mutations.ts
207
208
  import { gql } from "graphql-request";
@@ -443,7 +444,20 @@ var GQLClient = class {
443
444
  const { apiKey } = args;
444
445
  debug3(`init with apiKey ${apiKey}`);
445
446
  this._client = new GraphQLClient(API_URL, {
446
- headers: { [API_KEY_HEADER_NAME]: apiKey || "" }
447
+ headers: { [API_KEY_HEADER_NAME]: apiKey || "" },
448
+ requestMiddleware: (request) => {
449
+ const requestId = uuidv4();
450
+ debug3(
451
+ `sending API request with id: ${requestId} and with request: ${request.body}`
452
+ );
453
+ return {
454
+ ...request,
455
+ headers: {
456
+ ...request.headers,
457
+ "x-hasura-request-id": requestId
458
+ }
459
+ };
460
+ }
447
461
  });
448
462
  }
449
463
  async getUserInfo() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "https://github.com/mobb-dev/bugsy",
6
6
  "main": "dist/index.js",
@@ -49,6 +49,7 @@
49
49
  "supports-color": "9.4.0",
50
50
  "tar": "6.2.0",
51
51
  "tmp": "0.2.1",
52
+ "uuid": "9.0.0",
52
53
  "yargs": "17.7.2",
53
54
  "zod": "3.22.3"
54
55
  },
@@ -63,6 +64,7 @@
63
64
  "@types/semver": "7.5.0",
64
65
  "@types/tar": "^6.1.6",
65
66
  "@types/tmp": "0.2.3",
67
+ "@types/uuid": "9.0.1",
66
68
  "@types/yargs": "17.0.24",
67
69
  "@typescript-eslint/eslint-plugin": "5.44.0",
68
70
  "@typescript-eslint/parser": "5.44.0",