pnpm 6.17.2 → 6.20.0

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 (41) hide show
  1. package/README.md +26 -24
  2. package/dist/node_modules/make-fetch-happen/{agent.js → lib/agent.js} +14 -29
  3. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +460 -0
  4. package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +10 -0
  5. package/dist/node_modules/make-fetch-happen/lib/cache/index.js +45 -0
  6. package/dist/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
  7. package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
  8. package/dist/node_modules/make-fetch-happen/lib/fetch.js +100 -0
  9. package/dist/node_modules/make-fetch-happen/lib/index.js +40 -0
  10. package/dist/node_modules/make-fetch-happen/lib/options.js +44 -0
  11. package/dist/node_modules/make-fetch-happen/lib/remote.js +102 -0
  12. package/dist/node_modules/make-fetch-happen/package.json +21 -17
  13. package/dist/node_modules/negotiator/LICENSE +24 -0
  14. package/dist/node_modules/negotiator/index.js +124 -0
  15. package/dist/node_modules/negotiator/lib/charset.js +169 -0
  16. package/dist/node_modules/negotiator/lib/encoding.js +184 -0
  17. package/dist/node_modules/negotiator/lib/language.js +179 -0
  18. package/dist/node_modules/negotiator/lib/mediaType.js +294 -0
  19. package/dist/node_modules/negotiator/package.json +42 -0
  20. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +1 -1
  21. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +16 -1
  22. package/dist/node_modules/node-gyp/gyp/setup.py +1 -1
  23. package/dist/node_modules/node-gyp/lib/configure.js +5 -97
  24. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +119 -0
  25. package/dist/node_modules/node-gyp/package.json +2 -2
  26. package/dist/node_modules/socks-proxy-agent/dist/agent.js +4 -3
  27. package/dist/node_modules/socks-proxy-agent/dist/agent.js.map +1 -1
  28. package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  29. package/dist/node_modules/socks-proxy-agent/package.json +20 -20
  30. package/dist/pnpm.cjs +13490 -13531
  31. package/dist/pnpmrc +2 -0
  32. package/dist/pnpx.cjs +6 -4
  33. package/package.json +34 -33
  34. package/dist/node_modules/make-fetch-happen/cache.js +0 -260
  35. package/dist/node_modules/make-fetch-happen/index.js +0 -457
  36. package/dist/node_modules/make-fetch-happen/utils/configure-options.js +0 -32
  37. package/dist/node_modules/make-fetch-happen/utils/initialize-cache.js +0 -26
  38. package/dist/node_modules/make-fetch-happen/utils/is-header-conditional.js +0 -17
  39. package/dist/node_modules/make-fetch-happen/utils/iterable-to-object.js +0 -9
  40. package/dist/node_modules/make-fetch-happen/utils/make-policy.js +0 -19
  41. package/dist/node_modules/make-fetch-happen/warning.js +0 -24
@@ -0,0 +1,124 @@
1
+ /*!
2
+ * negotiator
3
+ * Copyright(c) 2012 Federico Romero
4
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
5
+ * Copyright(c) 2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Cached loaded submodules.
13
+ * @private
14
+ */
15
+
16
+ var modules = Object.create(null);
17
+
18
+ /**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+ module.exports = Negotiator;
24
+ module.exports.Negotiator = Negotiator;
25
+
26
+ /**
27
+ * Create a Negotiator instance from a request.
28
+ * @param {object} request
29
+ * @public
30
+ */
31
+
32
+ function Negotiator(request) {
33
+ if (!(this instanceof Negotiator)) {
34
+ return new Negotiator(request);
35
+ }
36
+
37
+ this.request = request;
38
+ }
39
+
40
+ Negotiator.prototype.charset = function charset(available) {
41
+ var set = this.charsets(available);
42
+ return set && set[0];
43
+ };
44
+
45
+ Negotiator.prototype.charsets = function charsets(available) {
46
+ var preferredCharsets = loadModule('charset').preferredCharsets;
47
+ return preferredCharsets(this.request.headers['accept-charset'], available);
48
+ };
49
+
50
+ Negotiator.prototype.encoding = function encoding(available) {
51
+ var set = this.encodings(available);
52
+ return set && set[0];
53
+ };
54
+
55
+ Negotiator.prototype.encodings = function encodings(available) {
56
+ var preferredEncodings = loadModule('encoding').preferredEncodings;
57
+ return preferredEncodings(this.request.headers['accept-encoding'], available);
58
+ };
59
+
60
+ Negotiator.prototype.language = function language(available) {
61
+ var set = this.languages(available);
62
+ return set && set[0];
63
+ };
64
+
65
+ Negotiator.prototype.languages = function languages(available) {
66
+ var preferredLanguages = loadModule('language').preferredLanguages;
67
+ return preferredLanguages(this.request.headers['accept-language'], available);
68
+ };
69
+
70
+ Negotiator.prototype.mediaType = function mediaType(available) {
71
+ var set = this.mediaTypes(available);
72
+ return set && set[0];
73
+ };
74
+
75
+ Negotiator.prototype.mediaTypes = function mediaTypes(available) {
76
+ var preferredMediaTypes = loadModule('mediaType').preferredMediaTypes;
77
+ return preferredMediaTypes(this.request.headers.accept, available);
78
+ };
79
+
80
+ // Backwards compatibility
81
+ Negotiator.prototype.preferredCharset = Negotiator.prototype.charset;
82
+ Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets;
83
+ Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding;
84
+ Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings;
85
+ Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
86
+ Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
87
+ Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
88
+ Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
89
+
90
+ /**
91
+ * Load the given module.
92
+ * @private
93
+ */
94
+
95
+ function loadModule(moduleName) {
96
+ var module = modules[moduleName];
97
+
98
+ if (module !== undefined) {
99
+ return module;
100
+ }
101
+
102
+ // This uses a switch for static require analysis
103
+ switch (moduleName) {
104
+ case 'charset':
105
+ module = require('./lib/charset');
106
+ break;
107
+ case 'encoding':
108
+ module = require('./lib/encoding');
109
+ break;
110
+ case 'language':
111
+ module = require('./lib/language');
112
+ break;
113
+ case 'mediaType':
114
+ module = require('./lib/mediaType');
115
+ break;
116
+ default:
117
+ throw new Error('Cannot find module \'' + moduleName + '\'');
118
+ }
119
+
120
+ // Store to prevent invoking require()
121
+ modules[moduleName] = module;
122
+
123
+ return module;
124
+ }
@@ -0,0 +1,169 @@
1
+ /**
2
+ * negotiator
3
+ * Copyright(c) 2012 Isaac Z. Schlueter
4
+ * Copyright(c) 2014 Federico Romero
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+
16
+ module.exports = preferredCharsets;
17
+ module.exports.preferredCharsets = preferredCharsets;
18
+
19
+ /**
20
+ * Module variables.
21
+ * @private
22
+ */
23
+
24
+ var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
25
+
26
+ /**
27
+ * Parse the Accept-Charset header.
28
+ * @private
29
+ */
30
+
31
+ function parseAcceptCharset(accept) {
32
+ var accepts = accept.split(',');
33
+
34
+ for (var i = 0, j = 0; i < accepts.length; i++) {
35
+ var charset = parseCharset(accepts[i].trim(), i);
36
+
37
+ if (charset) {
38
+ accepts[j++] = charset;
39
+ }
40
+ }
41
+
42
+ // trim accepts
43
+ accepts.length = j;
44
+
45
+ return accepts;
46
+ }
47
+
48
+ /**
49
+ * Parse a charset from the Accept-Charset header.
50
+ * @private
51
+ */
52
+
53
+ function parseCharset(str, i) {
54
+ var match = simpleCharsetRegExp.exec(str);
55
+ if (!match) return null;
56
+
57
+ var charset = match[1];
58
+ var q = 1;
59
+ if (match[2]) {
60
+ var params = match[2].split(';')
61
+ for (var j = 0; j < params.length; j++) {
62
+ var p = params[j].trim().split('=');
63
+ if (p[0] === 'q') {
64
+ q = parseFloat(p[1]);
65
+ break;
66
+ }
67
+ }
68
+ }
69
+
70
+ return {
71
+ charset: charset,
72
+ q: q,
73
+ i: i
74
+ };
75
+ }
76
+
77
+ /**
78
+ * Get the priority of a charset.
79
+ * @private
80
+ */
81
+
82
+ function getCharsetPriority(charset, accepted, index) {
83
+ var priority = {o: -1, q: 0, s: 0};
84
+
85
+ for (var i = 0; i < accepted.length; i++) {
86
+ var spec = specify(charset, accepted[i], index);
87
+
88
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
89
+ priority = spec;
90
+ }
91
+ }
92
+
93
+ return priority;
94
+ }
95
+
96
+ /**
97
+ * Get the specificity of the charset.
98
+ * @private
99
+ */
100
+
101
+ function specify(charset, spec, index) {
102
+ var s = 0;
103
+ if(spec.charset.toLowerCase() === charset.toLowerCase()){
104
+ s |= 1;
105
+ } else if (spec.charset !== '*' ) {
106
+ return null
107
+ }
108
+
109
+ return {
110
+ i: index,
111
+ o: spec.i,
112
+ q: spec.q,
113
+ s: s
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Get the preferred charsets from an Accept-Charset header.
119
+ * @public
120
+ */
121
+
122
+ function preferredCharsets(accept, provided) {
123
+ // RFC 2616 sec 14.2: no header = *
124
+ var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || '');
125
+
126
+ if (!provided) {
127
+ // sorted list of all charsets
128
+ return accepts
129
+ .filter(isQuality)
130
+ .sort(compareSpecs)
131
+ .map(getFullCharset);
132
+ }
133
+
134
+ var priorities = provided.map(function getPriority(type, index) {
135
+ return getCharsetPriority(type, accepts, index);
136
+ });
137
+
138
+ // sorted list of accepted charsets
139
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) {
140
+ return provided[priorities.indexOf(priority)];
141
+ });
142
+ }
143
+
144
+ /**
145
+ * Compare two specs.
146
+ * @private
147
+ */
148
+
149
+ function compareSpecs(a, b) {
150
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
151
+ }
152
+
153
+ /**
154
+ * Get full charset string.
155
+ * @private
156
+ */
157
+
158
+ function getFullCharset(spec) {
159
+ return spec.charset;
160
+ }
161
+
162
+ /**
163
+ * Check if a spec has any quality.
164
+ * @private
165
+ */
166
+
167
+ function isQuality(spec) {
168
+ return spec.q > 0;
169
+ }
@@ -0,0 +1,184 @@
1
+ /**
2
+ * negotiator
3
+ * Copyright(c) 2012 Isaac Z. Schlueter
4
+ * Copyright(c) 2014 Federico Romero
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+
16
+ module.exports = preferredEncodings;
17
+ module.exports.preferredEncodings = preferredEncodings;
18
+
19
+ /**
20
+ * Module variables.
21
+ * @private
22
+ */
23
+
24
+ var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
25
+
26
+ /**
27
+ * Parse the Accept-Encoding header.
28
+ * @private
29
+ */
30
+
31
+ function parseAcceptEncoding(accept) {
32
+ var accepts = accept.split(',');
33
+ var hasIdentity = false;
34
+ var minQuality = 1;
35
+
36
+ for (var i = 0, j = 0; i < accepts.length; i++) {
37
+ var encoding = parseEncoding(accepts[i].trim(), i);
38
+
39
+ if (encoding) {
40
+ accepts[j++] = encoding;
41
+ hasIdentity = hasIdentity || specify('identity', encoding);
42
+ minQuality = Math.min(minQuality, encoding.q || 1);
43
+ }
44
+ }
45
+
46
+ if (!hasIdentity) {
47
+ /*
48
+ * If identity doesn't explicitly appear in the accept-encoding header,
49
+ * it's added to the list of acceptable encoding with the lowest q
50
+ */
51
+ accepts[j++] = {
52
+ encoding: 'identity',
53
+ q: minQuality,
54
+ i: i
55
+ };
56
+ }
57
+
58
+ // trim accepts
59
+ accepts.length = j;
60
+
61
+ return accepts;
62
+ }
63
+
64
+ /**
65
+ * Parse an encoding from the Accept-Encoding header.
66
+ * @private
67
+ */
68
+
69
+ function parseEncoding(str, i) {
70
+ var match = simpleEncodingRegExp.exec(str);
71
+ if (!match) return null;
72
+
73
+ var encoding = match[1];
74
+ var q = 1;
75
+ if (match[2]) {
76
+ var params = match[2].split(';');
77
+ for (var j = 0; j < params.length; j++) {
78
+ var p = params[j].trim().split('=');
79
+ if (p[0] === 'q') {
80
+ q = parseFloat(p[1]);
81
+ break;
82
+ }
83
+ }
84
+ }
85
+
86
+ return {
87
+ encoding: encoding,
88
+ q: q,
89
+ i: i
90
+ };
91
+ }
92
+
93
+ /**
94
+ * Get the priority of an encoding.
95
+ * @private
96
+ */
97
+
98
+ function getEncodingPriority(encoding, accepted, index) {
99
+ var priority = {o: -1, q: 0, s: 0};
100
+
101
+ for (var i = 0; i < accepted.length; i++) {
102
+ var spec = specify(encoding, accepted[i], index);
103
+
104
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
105
+ priority = spec;
106
+ }
107
+ }
108
+
109
+ return priority;
110
+ }
111
+
112
+ /**
113
+ * Get the specificity of the encoding.
114
+ * @private
115
+ */
116
+
117
+ function specify(encoding, spec, index) {
118
+ var s = 0;
119
+ if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
120
+ s |= 1;
121
+ } else if (spec.encoding !== '*' ) {
122
+ return null
123
+ }
124
+
125
+ return {
126
+ i: index,
127
+ o: spec.i,
128
+ q: spec.q,
129
+ s: s
130
+ }
131
+ };
132
+
133
+ /**
134
+ * Get the preferred encodings from an Accept-Encoding header.
135
+ * @public
136
+ */
137
+
138
+ function preferredEncodings(accept, provided) {
139
+ var accepts = parseAcceptEncoding(accept || '');
140
+
141
+ if (!provided) {
142
+ // sorted list of all encodings
143
+ return accepts
144
+ .filter(isQuality)
145
+ .sort(compareSpecs)
146
+ .map(getFullEncoding);
147
+ }
148
+
149
+ var priorities = provided.map(function getPriority(type, index) {
150
+ return getEncodingPriority(type, accepts, index);
151
+ });
152
+
153
+ // sorted list of accepted encodings
154
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
155
+ return provided[priorities.indexOf(priority)];
156
+ });
157
+ }
158
+
159
+ /**
160
+ * Compare two specs.
161
+ * @private
162
+ */
163
+
164
+ function compareSpecs(a, b) {
165
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
166
+ }
167
+
168
+ /**
169
+ * Get full encoding string.
170
+ * @private
171
+ */
172
+
173
+ function getFullEncoding(spec) {
174
+ return spec.encoding;
175
+ }
176
+
177
+ /**
178
+ * Check if a spec has any quality.
179
+ * @private
180
+ */
181
+
182
+ function isQuality(spec) {
183
+ return spec.q > 0;
184
+ }
@@ -0,0 +1,179 @@
1
+ /**
2
+ * negotiator
3
+ * Copyright(c) 2012 Isaac Z. Schlueter
4
+ * Copyright(c) 2014 Federico Romero
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+
16
+ module.exports = preferredLanguages;
17
+ module.exports.preferredLanguages = preferredLanguages;
18
+
19
+ /**
20
+ * Module variables.
21
+ * @private
22
+ */
23
+
24
+ var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
25
+
26
+ /**
27
+ * Parse the Accept-Language header.
28
+ * @private
29
+ */
30
+
31
+ function parseAcceptLanguage(accept) {
32
+ var accepts = accept.split(',');
33
+
34
+ for (var i = 0, j = 0; i < accepts.length; i++) {
35
+ var language = parseLanguage(accepts[i].trim(), i);
36
+
37
+ if (language) {
38
+ accepts[j++] = language;
39
+ }
40
+ }
41
+
42
+ // trim accepts
43
+ accepts.length = j;
44
+
45
+ return accepts;
46
+ }
47
+
48
+ /**
49
+ * Parse a language from the Accept-Language header.
50
+ * @private
51
+ */
52
+
53
+ function parseLanguage(str, i) {
54
+ var match = simpleLanguageRegExp.exec(str);
55
+ if (!match) return null;
56
+
57
+ var prefix = match[1],
58
+ suffix = match[2],
59
+ full = prefix;
60
+
61
+ if (suffix) full += "-" + suffix;
62
+
63
+ var q = 1;
64
+ if (match[3]) {
65
+ var params = match[3].split(';')
66
+ for (var j = 0; j < params.length; j++) {
67
+ var p = params[j].split('=');
68
+ if (p[0] === 'q') q = parseFloat(p[1]);
69
+ }
70
+ }
71
+
72
+ return {
73
+ prefix: prefix,
74
+ suffix: suffix,
75
+ q: q,
76
+ i: i,
77
+ full: full
78
+ };
79
+ }
80
+
81
+ /**
82
+ * Get the priority of a language.
83
+ * @private
84
+ */
85
+
86
+ function getLanguagePriority(language, accepted, index) {
87
+ var priority = {o: -1, q: 0, s: 0};
88
+
89
+ for (var i = 0; i < accepted.length; i++) {
90
+ var spec = specify(language, accepted[i], index);
91
+
92
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
93
+ priority = spec;
94
+ }
95
+ }
96
+
97
+ return priority;
98
+ }
99
+
100
+ /**
101
+ * Get the specificity of the language.
102
+ * @private
103
+ */
104
+
105
+ function specify(language, spec, index) {
106
+ var p = parseLanguage(language)
107
+ if (!p) return null;
108
+ var s = 0;
109
+ if(spec.full.toLowerCase() === p.full.toLowerCase()){
110
+ s |= 4;
111
+ } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
112
+ s |= 2;
113
+ } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
114
+ s |= 1;
115
+ } else if (spec.full !== '*' ) {
116
+ return null
117
+ }
118
+
119
+ return {
120
+ i: index,
121
+ o: spec.i,
122
+ q: spec.q,
123
+ s: s
124
+ }
125
+ };
126
+
127
+ /**
128
+ * Get the preferred languages from an Accept-Language header.
129
+ * @public
130
+ */
131
+
132
+ function preferredLanguages(accept, provided) {
133
+ // RFC 2616 sec 14.4: no header = *
134
+ var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
135
+
136
+ if (!provided) {
137
+ // sorted list of all languages
138
+ return accepts
139
+ .filter(isQuality)
140
+ .sort(compareSpecs)
141
+ .map(getFullLanguage);
142
+ }
143
+
144
+ var priorities = provided.map(function getPriority(type, index) {
145
+ return getLanguagePriority(type, accepts, index);
146
+ });
147
+
148
+ // sorted list of accepted languages
149
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
150
+ return provided[priorities.indexOf(priority)];
151
+ });
152
+ }
153
+
154
+ /**
155
+ * Compare two specs.
156
+ * @private
157
+ */
158
+
159
+ function compareSpecs(a, b) {
160
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
161
+ }
162
+
163
+ /**
164
+ * Get full language string.
165
+ * @private
166
+ */
167
+
168
+ function getFullLanguage(spec) {
169
+ return spec.full;
170
+ }
171
+
172
+ /**
173
+ * Check if a spec has any quality.
174
+ * @private
175
+ */
176
+
177
+ function isQuality(spec) {
178
+ return spec.q > 0;
179
+ }