@socketsecurity/cli-with-sentry 0.14.59 → 0.14.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.
@@ -14,7 +14,6 @@ var os$3 = require('node:os');
14
14
  var path$1 = require('node:path');
15
15
  var colors = _socketInterop(require('yoctocolors-cjs'));
16
16
  var process$2 = require('node:process');
17
- var fastContentTypeParse = _socketInterop(require('fast-content-type-parse'));
18
17
  var require$$0$1 = require('node:util');
19
18
  var require$$0 = require('node:url');
20
19
  var node_buffer = require('node:buffer');
@@ -761,6 +760,92 @@ function withDefaults$2(oldDefaults, newDefaults) {
761
760
  // pkg/dist-src/index.js
762
761
  var endpoint = withDefaults$2(null, DEFAULTS);
763
762
 
763
+ const NullObject = function NullObject() {};
764
+ NullObject.prototype = Object.create(null);
765
+
766
+ /**
767
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
768
+ *
769
+ * parameter = token "=" ( token / quoted-string )
770
+ * token = 1*tchar
771
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
772
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
773
+ * / DIGIT / ALPHA
774
+ * ; any VCHAR, except delimiters
775
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
776
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
777
+ * obs-text = %x80-FF
778
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
779
+ */
780
+ const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
781
+
782
+ /**
783
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
784
+ *
785
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
786
+ * obs-text = %x80-FF
787
+ */
788
+ const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
789
+
790
+ /**
791
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
792
+ *
793
+ * media-type = type "/" subtype
794
+ * type = token
795
+ * subtype = token
796
+ */
797
+ const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
798
+
799
+ // default ContentType to prevent repeated object creation
800
+ const defaultContentType = {
801
+ type: '',
802
+ parameters: new NullObject()
803
+ };
804
+ Object.freeze(defaultContentType.parameters);
805
+ Object.freeze(defaultContentType);
806
+ function safeParse(header) {
807
+ if (typeof header !== 'string') {
808
+ return defaultContentType;
809
+ }
810
+ let index = header.indexOf(';');
811
+ const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
812
+ if (mediaTypeRE.test(type) === false) {
813
+ return defaultContentType;
814
+ }
815
+ const result = {
816
+ type: type.toLowerCase(),
817
+ parameters: new NullObject()
818
+ };
819
+
820
+ // parse parameters
821
+ if (index === -1) {
822
+ return result;
823
+ }
824
+ let key;
825
+ let match;
826
+ let value;
827
+ paramRE.lastIndex = index;
828
+ while (match = paramRE.exec(header)) {
829
+ if (match.index !== index) {
830
+ return defaultContentType;
831
+ }
832
+ index += match[0].length;
833
+ key = match[1].toLowerCase();
834
+ value = match[2];
835
+ if (value[0] === '"') {
836
+ // remove quotes and escapes
837
+ value = value.slice(1, value.length - 1);
838
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
839
+ }
840
+ result.parameters[key] = value;
841
+ }
842
+ if (index !== header.length) {
843
+ return defaultContentType;
844
+ }
845
+ return result;
846
+ }
847
+ var safeParse_1 = safeParse;
848
+
764
849
  class RequestError extends Error {
765
850
  name;
766
851
  /**
@@ -913,7 +998,7 @@ async function getResponseData(response) {
913
998
  if (!contentType) {
914
999
  return response.text().catch(() => "");
915
1000
  }
916
- const mimetype = fastContentTypeParse.safeParse(contentType);
1001
+ const mimetype = safeParse_1(contentType);
917
1002
  if (isJSONResponse(mimetype)) {
918
1003
  let text = "";
919
1004
  try {
@@ -999,7 +1084,7 @@ var GraphqlResponseError = class extends Error {
999
1084
  };
1000
1085
 
1001
1086
  // pkg/dist-src/graphql.js
1002
- var NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
1087
+ var NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType", "operationName"];
1003
1088
  var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
1004
1089
  var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
1005
1090
  function graphql(request2, query, options) {
@@ -1363,7 +1448,7 @@ function paginateRest(octokit) {
1363
1448
  }
1364
1449
  paginateRest.VERSION = VERSION$2;
1365
1450
 
1366
- const VERSION$1 = "13.3.0";
1451
+ const VERSION$1 = "13.3.1";
1367
1452
 
1368
1453
  const Endpoints = {
1369
1454
  actions: {
@@ -11470,5 +11555,5 @@ exports.Octokit = Octokit;
11470
11555
  exports.meow = meow;
11471
11556
  exports.open = open;
11472
11557
  exports.updater = updater;
11473
- //# debugId=8afd3b8e-263e-4fb7-8f11-9494e3fe4fb7
11558
+ //# debugId=31a37726-e85b-4a7a-b5c9-d3a6b8977483
11474
11559
  //# sourceMappingURL=vendor.js.map