@agnostack/verifyd 1.0.14-beta.2 → 1.0.14-beta.4

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 (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/lib/utils/rawbody.d.ts.map +1 -1
  3. package/dist/lib/utils/rawbody.js +2 -3
  4. package/dist/lib/utils/rawbody.js.map +1 -1
  5. package/dist/umd/lib/index.js +2 -366
  6. package/dist/umd/lib/index.js.map +1 -1
  7. package/dist/umd/lib/lib/utils/rawbody.d.ts.map +1 -1
  8. package/package.json +4 -5
  9. package/node_modules/bytes/History.md +0 -97
  10. package/node_modules/bytes/LICENSE +0 -23
  11. package/node_modules/bytes/Readme.md +0 -152
  12. package/node_modules/bytes/index.js +0 -170
  13. package/node_modules/bytes/package.json +0 -42
  14. package/node_modules/depd/History.md +0 -103
  15. package/node_modules/depd/LICENSE +0 -22
  16. package/node_modules/depd/Readme.md +0 -280
  17. package/node_modules/depd/index.js +0 -538
  18. package/node_modules/depd/lib/browser/index.js +0 -77
  19. package/node_modules/depd/package.json +0 -45
  20. package/node_modules/http-errors/HISTORY.md +0 -180
  21. package/node_modules/http-errors/LICENSE +0 -23
  22. package/node_modules/http-errors/README.md +0 -169
  23. package/node_modules/http-errors/index.js +0 -289
  24. package/node_modules/http-errors/package.json +0 -50
  25. package/node_modules/iconv-lite/Changelog.md +0 -162
  26. package/node_modules/iconv-lite/LICENSE +0 -21
  27. package/node_modules/iconv-lite/README.md +0 -156
  28. package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
  29. package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
  30. package/node_modules/iconv-lite/encodings/index.js +0 -22
  31. package/node_modules/iconv-lite/encodings/internal.js +0 -188
  32. package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  33. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  34. package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
  35. package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  36. package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  37. package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  38. package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  39. package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  40. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  41. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
  42. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  43. package/node_modules/iconv-lite/encodings/utf16.js +0 -177
  44. package/node_modules/iconv-lite/encodings/utf7.js +0 -290
  45. package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  46. package/node_modules/iconv-lite/lib/extend-node.js +0 -217
  47. package/node_modules/iconv-lite/lib/index.d.ts +0 -24
  48. package/node_modules/iconv-lite/lib/index.js +0 -153
  49. package/node_modules/iconv-lite/lib/streams.js +0 -121
  50. package/node_modules/iconv-lite/package.json +0 -46
  51. package/node_modules/inherits/LICENSE +0 -16
  52. package/node_modules/inherits/README.md +0 -42
  53. package/node_modules/inherits/inherits.js +0 -9
  54. package/node_modules/inherits/inherits_browser.js +0 -27
  55. package/node_modules/inherits/package.json +0 -29
  56. package/node_modules/raw-body/HISTORY.md +0 -308
  57. package/node_modules/raw-body/LICENSE +0 -22
  58. package/node_modules/raw-body/README.md +0 -223
  59. package/node_modules/raw-body/SECURITY.md +0 -24
  60. package/node_modules/raw-body/index.d.ts +0 -87
  61. package/node_modules/raw-body/index.js +0 -336
  62. package/node_modules/raw-body/package.json +0 -49
  63. package/node_modules/safer-buffer/LICENSE +0 -21
  64. package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  65. package/node_modules/safer-buffer/Readme.md +0 -156
  66. package/node_modules/safer-buffer/dangerous.js +0 -58
  67. package/node_modules/safer-buffer/package.json +0 -34
  68. package/node_modules/safer-buffer/safer.js +0 -77
  69. package/node_modules/safer-buffer/tests.js +0 -406
  70. package/node_modules/setprototypeof/LICENSE +0 -13
  71. package/node_modules/setprototypeof/README.md +0 -31
  72. package/node_modules/setprototypeof/index.d.ts +0 -2
  73. package/node_modules/setprototypeof/index.js +0 -17
  74. package/node_modules/setprototypeof/package.json +0 -38
  75. package/node_modules/setprototypeof/test/index.js +0 -24
  76. package/node_modules/statuses/HISTORY.md +0 -82
  77. package/node_modules/statuses/LICENSE +0 -23
  78. package/node_modules/statuses/README.md +0 -136
  79. package/node_modules/statuses/codes.json +0 -65
  80. package/node_modules/statuses/index.js +0 -146
  81. package/node_modules/statuses/package.json +0 -49
  82. package/node_modules/toidentifier/HISTORY.md +0 -9
  83. package/node_modules/toidentifier/LICENSE +0 -21
  84. package/node_modules/toidentifier/README.md +0 -61
  85. package/node_modules/toidentifier/index.js +0 -32
  86. package/node_modules/toidentifier/package.json +0 -38
  87. package/node_modules/unpipe/HISTORY.md +0 -4
  88. package/node_modules/unpipe/LICENSE +0 -22
  89. package/node_modules/unpipe/README.md +0 -43
  90. package/node_modules/unpipe/index.js +0 -69
  91. package/node_modules/unpipe/package.json +0 -27
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.0.14-beta.4](https://github.com/agnostack/verifyd/compare/v1.0.14-beta.3...v1.0.14-beta.4) (2023-12-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * wip ([ca6e9ed](https://github.com/agnostack/verifyd/commit/ca6e9ed722a9cb25c9289beb5d20d4dd4cd0573a))
7
+
8
+ ## [1.0.14-beta.3](https://github.com/agnostack/verifyd/compare/v1.0.14-beta.2...v1.0.14-beta.3) (2023-12-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * wip ([2b84556](https://github.com/agnostack/verifyd/commit/2b845565a8fc1a45a877a05c10eda503dcd26081))
14
+
1
15
  ## [1.0.14-beta.2](https://github.com/agnostack/verifyd/compare/v1.0.14-beta.1...v1.0.14-beta.2) (2023-12-11)
2
16
 
3
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"rawbody.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/rawbody.js"],"names":[],"mappings":"AAiBO,sDAON"}
1
+ {"version":3,"file":"rawbody.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/rawbody.js"],"names":[],"mappings":"AAgBO,sDAON"}
@@ -34,14 +34,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.ensureRawBody = void 0;
36
36
  const getChunkedRawBody = (req) => __awaiter(void 0, void 0, void 0, function* () {
37
- console.log(`>>> > getChunkedRawBody > req?.rawBody:`, { rawBody: req === null || req === void 0 ? void 0 : req.rawBody });
38
37
  if (req === null || req === void 0 ? void 0 : req.rawBody) {
39
38
  return req.rawBody;
40
39
  }
41
40
  // TODO: move to req.text() after next 13.5: https://github.com/vercel/next.js/discussions/13405
42
41
  try {
43
- const getRawBody = (yield Promise.resolve().then(() => __importStar(require('raw-body')))).default;
44
- return getRawBody(req);
42
+ const _getRawBody = (yield Promise.resolve().then(() => __importStar(require('raw-body')))).default;
43
+ return _getRawBody(req);
45
44
  }
46
45
  catch (error) {
47
46
  console.error(`Failed to import 'raw-body', please ensure the dependency is installed`);
@@ -1 +1 @@
1
- {"version":3,"file":"rawbody.js","sourceRoot":"","sources":["../../../src/lib/utils/rawbody.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,CAAO,GAAG,EAAE,EAAE;IACtC,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,EAAE,OAAO,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,EAAE,CAAC,CAAA;IACjF,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,EAAE;QAChB,OAAO,GAAG,CAAC,OAAO,CAAA;KACnB;IAED,gGAAgG;IAChG,IAAI;QACF,MAAM,UAAU,GAAG,CAAC,wDAAa,UAAU,GAAC,CAAC,CAAC,OAAO,CAAA;QACrD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAA;KACvB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAA;QACvF,MAAM,KAAK,CAAA;KACZ;AACH,CAAC,CAAA,CAAA;AAED,yEAAyE;AAClE,MAAM,aAAa,GAAG,CAAO,GAAG,EAAE,EAAE;IAAC,OAAA,CAC1C,iBAAiB,CAAC,GAAG,CAAC;SACnB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACvC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;QAChE,MAAM,KAAK,CAAA;IACf,CAAC,CAAC,CACH,CAAA;EAAA,CAAA;AAPY,QAAA,aAAa,iBAOzB"}
1
+ {"version":3,"file":"rawbody.js","sourceRoot":"","sources":["../../../src/lib/utils/rawbody.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,CAAO,GAAG,EAAE,EAAE;IACtC,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,EAAE;QAChB,OAAO,GAAG,CAAC,OAAO,CAAA;KACnB;IAED,gGAAgG;IAChG,IAAI;QACF,MAAM,WAAW,GAAG,CAAC,wDAAa,UAAU,GAAC,CAAC,CAAC,OAAO,CAAA;QACtD,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;KACxB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAA;QACvF,MAAM,KAAK,CAAA;KACZ;AACH,CAAC,CAAA,CAAA;AAED,yEAAyE;AAClE,MAAM,aAAa,GAAG,CAAO,GAAG,EAAE,EAAE;IAAC,OAAA,CAC1C,iBAAiB,CAAC,GAAG,CAAC;SACnB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACvC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;QAChE,MAAM,KAAK,CAAA;IACf,CAAC,CAAC,CACH,CAAA;EAAA,CAAA;AAPY,QAAA,aAAa,iBAOzB"}
@@ -1,27 +1,3 @@
1
- /**
2
- * MIT License
3
- *
4
- * Copyright (c) 2021-present agnoStack, Inc. and Adam Grohs
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
1
  (function (global, factory) {
26
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
27
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -698,15 +674,14 @@
698
674
  }
699
675
 
700
676
  const getChunkedRawBody = async (req) => {
701
- console.log(`>>> > getChunkedRawBody > req?.rawBody:`, { rawBody: req?.rawBody });
702
677
  if (req?.rawBody) {
703
678
  return req.rawBody
704
679
  }
705
680
 
706
681
  // TODO: move to req.text() after next 13.5: https://github.com/vercel/next.js/discussions/13405
707
682
  try {
708
- const getRawBody = (await Promise.resolve().then(function () { return index; })).default;
709
- return getRawBody(req)
683
+ const _getRawBody = (await import('raw-body')).default;
684
+ return _getRawBody(req)
710
685
  } catch (error) {
711
686
  console.error(`Failed to import 'raw-body', please ensure the dependency is installed`);
712
687
  throw error
@@ -828,345 +803,6 @@
828
803
  }
829
804
  };
830
805
 
831
- /*!
832
- * raw-body
833
- * Copyright(c) 2013-2014 Jonathan Ong
834
- * Copyright(c) 2014-2022 Douglas Christopher Wilson
835
- * MIT Licensed
836
- */
837
-
838
- /**
839
- * Module dependencies.
840
- * @private
841
- */
842
-
843
- var asyncHooks = tryRequireAsyncHooks();
844
- var bytes = require('bytes');
845
- var createError = require('http-errors');
846
- var iconv = require('iconv-lite');
847
- var unpipe = require('unpipe');
848
-
849
- /**
850
- * Module exports.
851
- * @public
852
- */
853
-
854
- module.exports = getRawBody;
855
-
856
- /**
857
- * Module variables.
858
- * @private
859
- */
860
-
861
- var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /;
862
-
863
- /**
864
- * Get the decoder for a given encoding.
865
- *
866
- * @param {string} encoding
867
- * @private
868
- */
869
-
870
- function getDecoder (encoding) {
871
- if (!encoding) return null
872
-
873
- try {
874
- return iconv.getDecoder(encoding)
875
- } catch (e) {
876
- // error getting decoder
877
- if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e
878
-
879
- // the encoding was not found
880
- throw createError(415, 'specified encoding unsupported', {
881
- encoding: encoding,
882
- type: 'encoding.unsupported'
883
- })
884
- }
885
- }
886
-
887
- /**
888
- * Get the raw body of a stream (typically HTTP).
889
- *
890
- * @param {object} stream
891
- * @param {object|string|function} [options]
892
- * @param {function} [callback]
893
- * @public
894
- */
895
-
896
- function getRawBody (stream, options, callback) {
897
- var done = callback;
898
- var opts = options || {};
899
-
900
- // light validation
901
- if (stream === undefined) {
902
- throw new TypeError('argument stream is required')
903
- } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') {
904
- throw new TypeError('argument stream must be a stream')
905
- }
906
-
907
- if (options === true || typeof options === 'string') {
908
- // short cut for encoding
909
- opts = {
910
- encoding: options
911
- };
912
- }
913
-
914
- if (typeof options === 'function') {
915
- done = options;
916
- opts = {};
917
- }
918
-
919
- // validate callback is a function, if provided
920
- if (done !== undefined && typeof done !== 'function') {
921
- throw new TypeError('argument callback must be a function')
922
- }
923
-
924
- // require the callback without promises
925
- if (!done && !global.Promise) {
926
- throw new TypeError('argument callback is required')
927
- }
928
-
929
- // get encoding
930
- var encoding = opts.encoding !== true
931
- ? opts.encoding
932
- : 'utf-8';
933
-
934
- // convert the limit to an integer
935
- var limit = bytes.parse(opts.limit);
936
-
937
- // convert the expected length to an integer
938
- var length = opts.length != null && !isNaN(opts.length)
939
- ? parseInt(opts.length, 10)
940
- : null;
941
-
942
- if (done) {
943
- // classic callback style
944
- return readStream(stream, encoding, length, limit, wrap(done))
945
- }
946
-
947
- return new Promise(function executor (resolve, reject) {
948
- readStream(stream, encoding, length, limit, function onRead (err, buf) {
949
- if (err) return reject(err)
950
- resolve(buf);
951
- });
952
- })
953
- }
954
-
955
- /**
956
- * Halt a stream.
957
- *
958
- * @param {Object} stream
959
- * @private
960
- */
961
-
962
- function halt (stream) {
963
- // unpipe everything from the stream
964
- unpipe(stream);
965
-
966
- // pause stream
967
- if (typeof stream.pause === 'function') {
968
- stream.pause();
969
- }
970
- }
971
-
972
- /**
973
- * Read the data from the stream.
974
- *
975
- * @param {object} stream
976
- * @param {string} encoding
977
- * @param {number} length
978
- * @param {number} limit
979
- * @param {function} callback
980
- * @public
981
- */
982
-
983
- function readStream (stream, encoding, length, limit, callback) {
984
- var complete = false;
985
- var sync = true;
986
-
987
- // check the length and limit options.
988
- // note: we intentionally leave the stream paused,
989
- // so users should handle the stream themselves.
990
- if (limit !== null && length !== null && length > limit) {
991
- return done(createError(413, 'request entity too large', {
992
- expected: length,
993
- length: length,
994
- limit: limit,
995
- type: 'entity.too.large'
996
- }))
997
- }
998
-
999
- // streams1: assert request encoding is buffer.
1000
- // streams2+: assert the stream encoding is buffer.
1001
- // stream._decoder: streams1
1002
- // state.encoding: streams2
1003
- // state.decoder: streams2, specifically < 0.10.6
1004
- var state = stream._readableState;
1005
- if (stream._decoder || (state && (state.encoding || state.decoder))) {
1006
- // developer error
1007
- return done(createError(500, 'stream encoding should not be set', {
1008
- type: 'stream.encoding.set'
1009
- }))
1010
- }
1011
-
1012
- if (typeof stream.readable !== 'undefined' && !stream.readable) {
1013
- return done(createError(500, 'stream is not readable', {
1014
- type: 'stream.not.readable'
1015
- }))
1016
- }
1017
-
1018
- var received = 0;
1019
- var decoder;
1020
-
1021
- try {
1022
- decoder = getDecoder(encoding);
1023
- } catch (err) {
1024
- return done(err)
1025
- }
1026
-
1027
- var buffer = decoder
1028
- ? ''
1029
- : [];
1030
-
1031
- // attach listeners
1032
- stream.on('aborted', onAborted);
1033
- stream.on('close', cleanup);
1034
- stream.on('data', onData);
1035
- stream.on('end', onEnd);
1036
- stream.on('error', onEnd);
1037
-
1038
- // mark sync section complete
1039
- sync = false;
1040
-
1041
- function done () {
1042
- var args = new Array(arguments.length);
1043
-
1044
- // copy arguments
1045
- for (var i = 0; i < args.length; i++) {
1046
- args[i] = arguments[i];
1047
- }
1048
-
1049
- // mark complete
1050
- complete = true;
1051
-
1052
- if (sync) {
1053
- process.nextTick(invokeCallback);
1054
- } else {
1055
- invokeCallback();
1056
- }
1057
-
1058
- function invokeCallback () {
1059
- cleanup();
1060
-
1061
- if (args[0]) {
1062
- // halt the stream on error
1063
- halt(stream);
1064
- }
1065
-
1066
- callback.apply(null, args);
1067
- }
1068
- }
1069
-
1070
- function onAborted () {
1071
- if (complete) return
1072
-
1073
- done(createError(400, 'request aborted', {
1074
- code: 'ECONNABORTED',
1075
- expected: length,
1076
- length: length,
1077
- received: received,
1078
- type: 'request.aborted'
1079
- }));
1080
- }
1081
-
1082
- function onData (chunk) {
1083
- if (complete) return
1084
-
1085
- received += chunk.length;
1086
-
1087
- if (limit !== null && received > limit) {
1088
- done(createError(413, 'request entity too large', {
1089
- limit: limit,
1090
- received: received,
1091
- type: 'entity.too.large'
1092
- }));
1093
- } else if (decoder) {
1094
- buffer += decoder.write(chunk);
1095
- } else {
1096
- buffer.push(chunk);
1097
- }
1098
- }
1099
-
1100
- function onEnd (err) {
1101
- if (complete) return
1102
- if (err) return done(err)
1103
-
1104
- if (length !== null && received !== length) {
1105
- done(createError(400, 'request size did not match content length', {
1106
- expected: length,
1107
- length: length,
1108
- received: received,
1109
- type: 'request.size.invalid'
1110
- }));
1111
- } else {
1112
- var string = decoder
1113
- ? buffer + (decoder.end() || '')
1114
- : Buffer.concat(buffer);
1115
- done(null, string);
1116
- }
1117
- }
1118
-
1119
- function cleanup () {
1120
- buffer = null;
1121
-
1122
- stream.removeListener('aborted', onAborted);
1123
- stream.removeListener('data', onData);
1124
- stream.removeListener('end', onEnd);
1125
- stream.removeListener('error', onEnd);
1126
- stream.removeListener('close', cleanup);
1127
- }
1128
- }
1129
-
1130
- /**
1131
- * Try to require async_hooks
1132
- * @private
1133
- */
1134
-
1135
- function tryRequireAsyncHooks () {
1136
- try {
1137
- return require('async_hooks')
1138
- } catch (e) {
1139
- return {}
1140
- }
1141
- }
1142
-
1143
- /**
1144
- * Wrap function with async resource, if possible.
1145
- * AsyncResource.bind static method backported.
1146
- * @private
1147
- */
1148
-
1149
- function wrap (fn) {
1150
- var res;
1151
-
1152
- // create anonymous resource
1153
- if (asyncHooks.AsyncResource) {
1154
- res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn');
1155
- }
1156
-
1157
- // incompatible node.js
1158
- if (!res || !res.runInAsyncScope) {
1159
- return fn
1160
- }
1161
-
1162
- // return bound function
1163
- return res.runInAsyncScope.bind(res, fn, null)
1164
- }
1165
-
1166
- var index = /*#__PURE__*/Object.freeze({
1167
- __proto__: null
1168
- });
1169
-
1170
806
  exports.CONTENT_TYPES = CONTENT_TYPES;
1171
807
  exports.HEADER_CONTENT_TYPE = HEADER_CONTENT_TYPE;
1172
808
  exports.VerificationError = VerificationError;