@sveltejs/adapter-netlify 2.0.5 → 2.0.6
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.
- package/README.md +0 -2
- package/files/esm/shims.js +37 -29
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A SvelteKit adapter that creates a Netlify app.
|
|
4
4
|
|
|
5
|
-
If you're using [adapter-auto](https://kit.svelte.dev/docs/adapter-auto), you don't need to install this unless you need to specify Netlify-specific options, since it's already included.
|
|
6
|
-
|
|
7
5
|
## Docs
|
|
8
6
|
|
|
9
7
|
[Docs](https://kit.svelte.dev/docs/adapter-netlify)
|
package/files/esm/shims.js
CHANGED
|
@@ -307,6 +307,8 @@ const { Blob: Blob$2 } = require$$7;
|
|
|
307
307
|
const nodeUtil = require$$0;
|
|
308
308
|
const { stringify } = require$$8;
|
|
309
309
|
|
|
310
|
+
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v));
|
|
311
|
+
|
|
310
312
|
function nop$1 () {}
|
|
311
313
|
|
|
312
314
|
function isStream (obj) {
|
|
@@ -717,7 +719,10 @@ var util$g = {
|
|
|
717
719
|
validateHandler,
|
|
718
720
|
getSocketInfo,
|
|
719
721
|
isFormDataLike,
|
|
720
|
-
buildURL: buildURL$2
|
|
722
|
+
buildURL: buildURL$2,
|
|
723
|
+
nodeMajor,
|
|
724
|
+
nodeMinor,
|
|
725
|
+
nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13)
|
|
721
726
|
};
|
|
722
727
|
|
|
723
728
|
let fastNow = Date.now();
|
|
@@ -5135,6 +5140,7 @@ function requireDataURL () {
|
|
|
5135
5140
|
dataURLProcessor,
|
|
5136
5141
|
URLSerializer,
|
|
5137
5142
|
collectASequenceOfCodePoints,
|
|
5143
|
+
collectASequenceOfCodePointsFast,
|
|
5138
5144
|
stringPercentDecode,
|
|
5139
5145
|
parseMIMEType,
|
|
5140
5146
|
collectAnHTTPQuotedString,
|
|
@@ -6411,10 +6417,6 @@ const channels$1 = {};
|
|
|
6411
6417
|
|
|
6412
6418
|
let extractBody;
|
|
6413
6419
|
|
|
6414
|
-
const nodeVersion = process.versions.node.split('.');
|
|
6415
|
-
const nodeMajor = Number(nodeVersion[0]);
|
|
6416
|
-
const nodeMinor = Number(nodeVersion[1]);
|
|
6417
|
-
|
|
6418
6420
|
try {
|
|
6419
6421
|
const diagnosticsChannel = require('diagnostics_channel');
|
|
6420
6422
|
channels$1.create = diagnosticsChannel.channel('undici:request:create');
|
|
@@ -6549,7 +6551,7 @@ let Request$1 = class Request {
|
|
|
6549
6551
|
}
|
|
6550
6552
|
|
|
6551
6553
|
if (util$e.isFormDataLike(this.body)) {
|
|
6552
|
-
if (nodeMajor < 16 || (nodeMajor === 16 && nodeMinor < 8)) {
|
|
6554
|
+
if (util$e.nodeMajor < 16 || (util$e.nodeMajor === 16 && util$e.nodeMinor < 8)) {
|
|
6553
6555
|
throw new InvalidArgumentError$i('Form-Data bodies are only supported in node v16.8 and newer.')
|
|
6554
6556
|
}
|
|
6555
6557
|
|
|
@@ -7792,7 +7794,9 @@ let Client$4 = class Client extends DispatcherBase$3 {
|
|
|
7792
7794
|
connect,
|
|
7793
7795
|
maxRequestsPerClient,
|
|
7794
7796
|
localAddress,
|
|
7795
|
-
maxResponseSize
|
|
7797
|
+
maxResponseSize,
|
|
7798
|
+
autoSelectFamily,
|
|
7799
|
+
autoSelectFamilyAttemptTimeout
|
|
7796
7800
|
} = {}) {
|
|
7797
7801
|
super();
|
|
7798
7802
|
|
|
@@ -7868,12 +7872,20 @@ let Client$4 = class Client extends DispatcherBase$3 {
|
|
|
7868
7872
|
throw new InvalidArgumentError$e('maxResponseSize must be a positive number')
|
|
7869
7873
|
}
|
|
7870
7874
|
|
|
7875
|
+
if (
|
|
7876
|
+
autoSelectFamilyAttemptTimeout != null &&
|
|
7877
|
+
(!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)
|
|
7878
|
+
) {
|
|
7879
|
+
throw new InvalidArgumentError$e('autoSelectFamilyAttemptTimeout must be a positive number')
|
|
7880
|
+
}
|
|
7881
|
+
|
|
7871
7882
|
if (typeof connect !== 'function') {
|
|
7872
7883
|
connect = buildConnector$2({
|
|
7873
7884
|
...tls,
|
|
7874
7885
|
maxCachedSessions,
|
|
7875
7886
|
socketPath,
|
|
7876
7887
|
timeout: connectTimeout,
|
|
7888
|
+
...(util$b.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
|
|
7877
7889
|
...connect
|
|
7878
7890
|
});
|
|
7879
7891
|
}
|
|
@@ -7895,8 +7907,8 @@ let Client$4 = class Client extends DispatcherBase$3 {
|
|
|
7895
7907
|
this[kResuming] = 0; // 0, idle, 1, scheduled, 2 resuming
|
|
7896
7908
|
this[kNeedDrain$3] = 0; // 0, idle, 1, scheduled, 2 resuming
|
|
7897
7909
|
this[kHostHeader] = `host: ${this[kUrl$3].hostname}${this[kUrl$3].port ? `:${this[kUrl$3].port}` : ''}\r\n`;
|
|
7898
|
-
this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout :
|
|
7899
|
-
this[kHeadersTimeout] = headersTimeout != null ? headersTimeout :
|
|
7910
|
+
this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3;
|
|
7911
|
+
this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3;
|
|
7900
7912
|
this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength;
|
|
7901
7913
|
this[kMaxRedirections$1] = maxRedirections;
|
|
7902
7914
|
this[kMaxRequests] = maxRequestsPerClient;
|
|
@@ -9809,6 +9821,8 @@ let Pool$3 = class Pool extends PoolBase$1 {
|
|
|
9809
9821
|
tls,
|
|
9810
9822
|
maxCachedSessions,
|
|
9811
9823
|
socketPath,
|
|
9824
|
+
autoSelectFamily,
|
|
9825
|
+
autoSelectFamilyAttemptTimeout,
|
|
9812
9826
|
...options
|
|
9813
9827
|
} = {}) {
|
|
9814
9828
|
super();
|
|
@@ -9831,6 +9845,7 @@ let Pool$3 = class Pool extends PoolBase$1 {
|
|
|
9831
9845
|
maxCachedSessions,
|
|
9832
9846
|
socketPath,
|
|
9833
9847
|
timeout: connectTimeout == null ? 10e3 : connectTimeout,
|
|
9848
|
+
...(util$a.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
|
|
9834
9849
|
...connect
|
|
9835
9850
|
});
|
|
9836
9851
|
}
|
|
@@ -12698,6 +12713,7 @@ function requireHeaders () {
|
|
|
12698
12713
|
if (init instanceof HeadersList) {
|
|
12699
12714
|
this[kHeadersMap] = new Map(init[kHeadersMap]);
|
|
12700
12715
|
this[kHeadersSortedMap] = init[kHeadersSortedMap];
|
|
12716
|
+
this.cookies = init.cookies;
|
|
12701
12717
|
} else {
|
|
12702
12718
|
this[kHeadersMap] = new Map(init);
|
|
12703
12719
|
this[kHeadersSortedMap] = null;
|
|
@@ -14786,7 +14802,7 @@ function requireFetch () {
|
|
|
14786
14802
|
const { kHeadersList } = symbols$3;
|
|
14787
14803
|
const EE = require$$0$4;
|
|
14788
14804
|
const { Readable, pipeline } = require$$0$2;
|
|
14789
|
-
const { isErrored, isReadable } = util$g;
|
|
14805
|
+
const { isErrored, isReadable, nodeMajor, nodeMinor } = util$g;
|
|
14790
14806
|
const { dataURLProcessor, serializeAMimeType } = requireDataURL();
|
|
14791
14807
|
const { TransformStream } = require$$13;
|
|
14792
14808
|
const { getGlobalDispatcher } = global$2;
|
|
@@ -14797,10 +14813,6 @@ function requireFetch () {
|
|
|
14797
14813
|
let resolveObjectURL;
|
|
14798
14814
|
let ReadableStream = globalThis.ReadableStream;
|
|
14799
14815
|
|
|
14800
|
-
const nodeVersion = process.versions.node.split('.');
|
|
14801
|
-
const nodeMajor = Number(nodeVersion[0]);
|
|
14802
|
-
const nodeMinor = Number(nodeVersion[1]);
|
|
14803
|
-
|
|
14804
14816
|
class Fetch extends EE {
|
|
14805
14817
|
constructor (dispatcher) {
|
|
14806
14818
|
super();
|
|
@@ -18246,7 +18258,7 @@ function requireParse () {
|
|
|
18246
18258
|
|
|
18247
18259
|
const { maxNameValuePairSize, maxAttributeValueSize } = requireConstants$1();
|
|
18248
18260
|
const { isCTLExcludingHtab } = requireUtil$1();
|
|
18249
|
-
const {
|
|
18261
|
+
const { collectASequenceOfCodePointsFast } = requireDataURL();
|
|
18250
18262
|
const assert = require$$0$1;
|
|
18251
18263
|
|
|
18252
18264
|
/**
|
|
@@ -18276,7 +18288,7 @@ function requireParse () {
|
|
|
18276
18288
|
// (including the %x3B (";") in question).
|
|
18277
18289
|
const position = { position: 0 };
|
|
18278
18290
|
|
|
18279
|
-
nameValuePair =
|
|
18291
|
+
nameValuePair = collectASequenceOfCodePointsFast(';', header, position);
|
|
18280
18292
|
unparsedAttributes = header.slice(position.position);
|
|
18281
18293
|
} else {
|
|
18282
18294
|
// Otherwise:
|
|
@@ -18298,8 +18310,8 @@ function requireParse () {
|
|
|
18298
18310
|
// empty) value string consists of the characters after the first
|
|
18299
18311
|
// %x3D ("=") character.
|
|
18300
18312
|
const position = { position: 0 };
|
|
18301
|
-
name =
|
|
18302
|
-
|
|
18313
|
+
name = collectASequenceOfCodePointsFast(
|
|
18314
|
+
'=',
|
|
18303
18315
|
nameValuePair,
|
|
18304
18316
|
position
|
|
18305
18317
|
);
|
|
@@ -18350,8 +18362,8 @@ function requireParse () {
|
|
|
18350
18362
|
if (unparsedAttributes.includes(';')) {
|
|
18351
18363
|
// 1. Consume the characters of the unparsed-attributes up to, but
|
|
18352
18364
|
// not including, the first %x3B (";") character.
|
|
18353
|
-
cookieAv =
|
|
18354
|
-
|
|
18365
|
+
cookieAv = collectASequenceOfCodePointsFast(
|
|
18366
|
+
';',
|
|
18355
18367
|
unparsedAttributes,
|
|
18356
18368
|
{ position: 0 }
|
|
18357
18369
|
);
|
|
@@ -18378,8 +18390,8 @@ function requireParse () {
|
|
|
18378
18390
|
// character.
|
|
18379
18391
|
const position = { position: 0 };
|
|
18380
18392
|
|
|
18381
|
-
attributeName =
|
|
18382
|
-
|
|
18393
|
+
attributeName = collectASequenceOfCodePointsFast(
|
|
18394
|
+
'=',
|
|
18383
18395
|
cookieAv,
|
|
18384
18396
|
position
|
|
18385
18397
|
);
|
|
@@ -20693,10 +20705,6 @@ function requireUndici () {
|
|
|
20693
20705
|
const RedirectHandler = RedirectHandler_1;
|
|
20694
20706
|
const createRedirectInterceptor = redirectInterceptor;
|
|
20695
20707
|
|
|
20696
|
-
const nodeVersion = process.versions.node.split('.');
|
|
20697
|
-
const nodeMajor = Number(nodeVersion[0]);
|
|
20698
|
-
const nodeMinor = Number(nodeVersion[1]);
|
|
20699
|
-
|
|
20700
20708
|
let hasCrypto;
|
|
20701
20709
|
try {
|
|
20702
20710
|
require('crypto');
|
|
@@ -20773,7 +20781,7 @@ function requireUndici () {
|
|
|
20773
20781
|
undici.setGlobalDispatcher = setGlobalDispatcher;
|
|
20774
20782
|
undici.getGlobalDispatcher = getGlobalDispatcher;
|
|
20775
20783
|
|
|
20776
|
-
if (nodeMajor > 16 || (nodeMajor === 16 && nodeMinor >= 8)) {
|
|
20784
|
+
if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) {
|
|
20777
20785
|
let fetchImpl = null;
|
|
20778
20786
|
undici.fetch = async function fetch (resource) {
|
|
20779
20787
|
if (!fetchImpl) {
|
|
@@ -20800,7 +20808,7 @@ function requireUndici () {
|
|
|
20800
20808
|
undici.getGlobalOrigin = getGlobalOrigin;
|
|
20801
20809
|
}
|
|
20802
20810
|
|
|
20803
|
-
if (nodeMajor >= 16) {
|
|
20811
|
+
if (util.nodeMajor >= 16) {
|
|
20804
20812
|
const { deleteCookie, getCookies, getSetCookies, setCookie } = requireCookies();
|
|
20805
20813
|
|
|
20806
20814
|
undici.deleteCookie = deleteCookie;
|
|
@@ -20814,7 +20822,7 @@ function requireUndici () {
|
|
|
20814
20822
|
undici.serializeAMimeType = serializeAMimeType;
|
|
20815
20823
|
}
|
|
20816
20824
|
|
|
20817
|
-
if (nodeMajor >= 18 && hasCrypto) {
|
|
20825
|
+
if (util.nodeMajor >= 18 && hasCrypto) {
|
|
20818
20826
|
const { WebSocket } = requireWebsocket();
|
|
20819
20827
|
|
|
20820
20828
|
undici.WebSocket = WebSocket;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-netlify",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"rollup": "^3.7.0",
|
|
39
39
|
"typescript": "^4.9.4",
|
|
40
40
|
"uvu": "^0.5.6",
|
|
41
|
-
"@sveltejs/kit": "^1.
|
|
41
|
+
"@sveltejs/kit": "^1.11.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@sveltejs/kit": "^1.5.0"
|