netlify-cli 17.23.8 → 17.25.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.
@@ -1 +1 @@
1
- {"version":3,"file":"hash-fns.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy/hash-fns.ts"],"names":[],"mappings":"AAYA,OAAO,WAAW,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAoGlD,QAAA,MAAM,OAAO,YACF,WAAW,eACP,MAAM,EAAE,UACb;IACN,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,QAAQ,CAAA;IACzB,wBAAwB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,QAAQ,CAAA;IACtB,OAAO,EAAE,QAAQ,CAAA;IACjB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,QAAQ,CAAA;CACjB;;;;;;;;;;;;;;;;;;;oBAvFyC,OAAO;;;;;EA4LlD,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"hash-fns.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy/hash-fns.ts"],"names":[],"mappings":"AAYA,OAAO,WAAW,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAoGlD,QAAA,MAAM,OAAO,YACF,WAAW,eACP,MAAM,EAAE,UACb;IACN,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,QAAQ,CAAA;IACzB,wBAAwB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,QAAQ,CAAA;IACtB,OAAO,EAAE,QAAQ,CAAA;IACjB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,QAAQ,CAAA;CACjB;;;;;;;;;;;;;;;;;;;oBAvFyC,OAAO;;;;;EA8LlD,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -95,7 +95,7 @@ const hashFns = async (command, directories, config) => {
95
95
  statusCb,
96
96
  tmpDir,
97
97
  });
98
- const fileObjs = functionZips.map(({ buildData, displayName, generator, invocationMode, path: functionPath, priority, runtime, runtimeVersion, trafficRules, }) => ({
98
+ const fileObjs = functionZips.map(({ buildData, displayName, generator, invocationMode, path: functionPath, priority, runtime, runtimeVersion, trafficRules, timeout, }) => ({
99
99
  filepath: functionPath,
100
100
  root: tmpDir,
101
101
  relname: path.relative(tmpDir, functionPath),
@@ -108,6 +108,7 @@ const hashFns = async (command, directories, config) => {
108
108
  displayName,
109
109
  generator,
110
110
  invocationMode,
111
+ timeout,
111
112
  buildData,
112
113
  priority,
113
114
  trafficRules,
@@ -1 +1 @@
1
- {"version":3,"file":"upload-files.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy/upload-files.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,WAAW;;;;wBAuEhB,CAAA;AAuDD,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"upload-files.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy/upload-files.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,WAAW;;;;wBAwEhB,CAAA;AAuDD,eAAe,WAAW,CAAA"}
@@ -14,7 +14,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet
14
14
  });
15
15
  // @ts-expect-error TS(7006) FIXME: Parameter 'fileObj' implicitly has an 'any' type.
16
16
  const uploadFile = async (fileObj, index) => {
17
- const { assetType, body, filepath, invocationMode, normalizedPath, runtime } = fileObj;
17
+ const { assetType, body, filepath, invocationMode, normalizedPath, runtime, timeout } = fileObj;
18
18
  const readStreamCtor = () => body ?? fs.createReadStream(filepath);
19
19
  statusCb({
20
20
  type: 'upload',
@@ -38,6 +38,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet
38
38
  body: readStreamCtor,
39
39
  deployId,
40
40
  invocationMode,
41
+ timeout,
41
42
  name: encodeURI(normalizedPath),
42
43
  runtime,
43
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAkB/C,OAAO,EAAqB,cAAc,EAAE,MAAM,YAAY,CAAA;AAytB9D,eAAO,MAAM,WAAW,aAAuB,KAAK,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC,WAGpF,CAAA;AAID,eAAO,MAAM,UAAU;aAqBT,WAAW;cAAY,cAAc;0BAAwB,OAAO;2CAoGjF,CAAA"}
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAkB/C,OAAO,EAAqB,cAAc,EAAE,MAAM,YAAY,CAAA;AAytB9D,eAAO,MAAM,WAAW,aAAuB,KAAK,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC,WAGpF,CAAA;AAID,eAAO,MAAM,UAAU;aAqBT,WAAW;cAAY,cAAc;0BAAwB,OAAO;2CA2GjF,CAAA"}
@@ -520,7 +520,7 @@ siteInfo, }) {
520
520
  return proxy.web(req, res, options);
521
521
  },
522
522
  // @ts-expect-error TS(7006) FIXME: Parameter 'req' implicitly has an 'any' type.
523
- ws: (req, socket, head) => proxy.ws(req, socket, head),
523
+ ws: (req, socket, head, options) => proxy.ws(req, socket, head, options),
524
524
  };
525
525
  return handlers;
526
526
  };
@@ -661,8 +661,15 @@ export const startProxy = async function ({ accountId, addonsUrls, blobsContext,
661
661
  const primaryServer = settings.https
662
662
  ? https.createServer({ cert: settings.https.cert, key: settings.https.key }, onRequestWithOptions)
663
663
  : http.createServer(onRequestWithOptions);
664
- const onUpgrade = function onUpgrade(req, socket, head) {
665
- proxy.ws(req, socket, head);
664
+ const onUpgrade = async function onUpgrade(req, socket, head) {
665
+ const match = await rewriter(req);
666
+ if (match && !match.force404 && isExternal(match)) {
667
+ const reqUrl = reqToURL(req, req.url);
668
+ const dest = new URL(match.to, `${reqUrl.protocol}//${reqUrl.host}`);
669
+ const destURL = stripOrigin(dest);
670
+ return proxy.ws(req, socket, head, { target: dest.origin, changeOrigin: true, pathRewrite: () => destURL });
671
+ }
672
+ return proxy.ws(req, socket, head, {});
666
673
  };
667
674
  primaryServer.on('upgrade', onUpgrade);
668
675
  primaryServer.listen({ port: settings.port });
@@ -8,7 +8,7 @@ version = "0.1.0"
8
8
  [dependencies]
9
9
  aws_lambda_events = "0.15.0"
10
10
  http = "0.2.9"
11
- lambda_runtime = "0.7.3"
11
+ lambda_runtime = "0.11.0"
12
12
  log = "0.4.17"
13
13
  simple_logger = "1.16.0"
14
14
  tokio = "1.26.0"