netlify-cli 16.2.0 → 16.3.1
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 -12
- package/npm-shrinkwrap.json +257 -51
- package/package.json +6 -6
- package/src/commands/lm/lm-info.mjs +1 -1
- package/src/commands/lm/lm-install.mjs +1 -1
- package/src/commands/lm/lm-setup.mjs +1 -1
- package/src/commands/lm/lm.mjs +4 -2
- package/src/lib/edge-functions/bootstrap.mjs +1 -1
- package/src/lib/edge-functions/headers.mjs +3 -0
- package/src/lib/edge-functions/proxy.mjs +6 -10
- package/src/lib/edge-functions/registry.mjs +6 -1
- package/src/lib/functions/netlify-function.mjs +12 -4
- package/src/lib/functions/registry.mjs +4 -4
- package/src/lib/functions/server.mjs +5 -2
- package/src/utils/headers.mjs +1 -0
- package/src/utils/proxy.mjs +9 -5
package/README.md
CHANGED
|
@@ -29,7 +29,6 @@ See the [CLI command line reference](https://cli.netlify.com/commands/) to get s
|
|
|
29
29
|
- [functions](#functions)
|
|
30
30
|
- [init](#init)
|
|
31
31
|
- [link](#link)
|
|
32
|
-
- [lm](#lm)
|
|
33
32
|
- [login](#login)
|
|
34
33
|
- [open](#open)
|
|
35
34
|
- [recipes](#recipes)
|
|
@@ -170,17 +169,6 @@ Configure continuous deployment for a new or existing site. To create a new site
|
|
|
170
169
|
|
|
171
170
|
Link a local repo or project folder to an existing site on Netlify
|
|
172
171
|
|
|
173
|
-
### [lm](/docs/commands/lm.md)
|
|
174
|
-
|
|
175
|
-
Handle Netlify Large Media operations
|
|
176
|
-
|
|
177
|
-
| Subcommand | description |
|
|
178
|
-
|:--------------------------- |:-----|
|
|
179
|
-
| [`lm:info`](/docs/commands/lm.md#lminfo) | Show large media requirements information. |
|
|
180
|
-
| [`lm:install`](/docs/commands/lm.md#lminstall) | Configures your computer to use Netlify Large Media |
|
|
181
|
-
| [`lm:setup`](/docs/commands/lm.md#lmsetup) | Configures your site to use Netlify Large Media |
|
|
182
|
-
|
|
183
|
-
|
|
184
172
|
### [login](/docs/commands/login.md)
|
|
185
173
|
|
|
186
174
|
Login to your Netlify account
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "16.
|
|
9
|
+
"version": "16.3.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@bugsnag/js": "7.20.2",
|
|
14
14
|
"@fastify/static": "6.10.2",
|
|
15
|
-
"@netlify/build": "29.20.
|
|
16
|
-
"@netlify/build-info": "7.
|
|
17
|
-
"@netlify/config": "20.8.
|
|
18
|
-
"@netlify/edge-bundler": "8.19.
|
|
15
|
+
"@netlify/build": "29.20.13",
|
|
16
|
+
"@netlify/build-info": "7.8.0",
|
|
17
|
+
"@netlify/config": "20.8.1",
|
|
18
|
+
"@netlify/edge-bundler": "8.19.1",
|
|
19
19
|
"@netlify/local-functions-proxy": "1.1.1",
|
|
20
20
|
"@netlify/serverless-functions-api": "1.7.3",
|
|
21
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
21
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
22
22
|
"@octokit/rest": "19.0.13",
|
|
23
23
|
"ansi-escapes": "6.2.0",
|
|
24
24
|
"ansi-styles": "6.2.1",
|
|
@@ -781,21 +781,21 @@
|
|
|
781
781
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
782
782
|
},
|
|
783
783
|
"node_modules/@netlify/build": {
|
|
784
|
-
"version": "29.20.
|
|
785
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.
|
|
786
|
-
"integrity": "sha512-
|
|
784
|
+
"version": "29.20.13",
|
|
785
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.13.tgz",
|
|
786
|
+
"integrity": "sha512-FcRPb56MWG+H3eI0kcb0H8vlz2N89sl22OmVW5kZifzXalc76kSDMmqOzwHBSe2ChBUZApmYwqY3QVB/h5sL1g==",
|
|
787
787
|
"dependencies": {
|
|
788
788
|
"@bugsnag/js": "^7.0.0",
|
|
789
789
|
"@honeycombio/opentelemetry-node": "^0.4.0",
|
|
790
790
|
"@netlify/cache-utils": "^5.1.5",
|
|
791
|
-
"@netlify/config": "^20.8.
|
|
791
|
+
"@netlify/config": "^20.8.1",
|
|
792
792
|
"@netlify/edge-bundler": "8.19.0",
|
|
793
793
|
"@netlify/framework-info": "^9.8.10",
|
|
794
|
-
"@netlify/functions-utils": "^5.2.
|
|
794
|
+
"@netlify/functions-utils": "^5.2.27",
|
|
795
795
|
"@netlify/git-utils": "^5.1.1",
|
|
796
796
|
"@netlify/plugins-list": "^6.71.0",
|
|
797
797
|
"@netlify/run-utils": "^5.1.1",
|
|
798
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
798
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
799
799
|
"@opentelemetry/api": "^1.4.1",
|
|
800
800
|
"@sindresorhus/slugify": "^2.0.0",
|
|
801
801
|
"ansi-escapes": "^6.0.0",
|
|
@@ -849,9 +849,9 @@
|
|
|
849
849
|
}
|
|
850
850
|
},
|
|
851
851
|
"node_modules/@netlify/build-info": {
|
|
852
|
-
"version": "7.
|
|
853
|
-
"resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.
|
|
854
|
-
"integrity": "sha512-
|
|
852
|
+
"version": "7.8.0",
|
|
853
|
+
"resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.8.0.tgz",
|
|
854
|
+
"integrity": "sha512-4UnAaQUXoxMfs6KAMKPx8Pa5WwdGDcgIliyQpKhc4Xq3A2dgH+Uam9kS4aq5+4ZeHS9/eT1BKLKZPUOOF5ZQZg==",
|
|
855
855
|
"dependencies": {
|
|
856
856
|
"@bugsnag/js": "^7.20.0",
|
|
857
857
|
"dot-prop": "^7.2.0",
|
|
@@ -928,6 +928,37 @@
|
|
|
928
928
|
"node": ">= 14"
|
|
929
929
|
}
|
|
930
930
|
},
|
|
931
|
+
"node_modules/@netlify/build/node_modules/@netlify/edge-bundler": {
|
|
932
|
+
"version": "8.19.0",
|
|
933
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.0.tgz",
|
|
934
|
+
"integrity": "sha512-blIZHLXlEXcjpAhd2TJ+Rw7H+WhNXSBfmFfRHn2pyzNiAbQa71eU0eNUE2+Nw58DGfvUC0unerbTlN2gd3iVdA==",
|
|
935
|
+
"dependencies": {
|
|
936
|
+
"@import-maps/resolve": "^1.0.1",
|
|
937
|
+
"ajv": "^8.11.2",
|
|
938
|
+
"ajv-errors": "^3.0.0",
|
|
939
|
+
"better-ajv-errors": "^1.2.0",
|
|
940
|
+
"common-path-prefix": "^3.0.0",
|
|
941
|
+
"env-paths": "^3.0.0",
|
|
942
|
+
"execa": "^6.0.0",
|
|
943
|
+
"find-up": "^6.3.0",
|
|
944
|
+
"get-port": "^6.1.2",
|
|
945
|
+
"is-path-inside": "^4.0.0",
|
|
946
|
+
"jsonc-parser": "^3.2.0",
|
|
947
|
+
"node-fetch": "^3.1.1",
|
|
948
|
+
"node-stream-zip": "^1.15.0",
|
|
949
|
+
"p-retry": "^5.1.1",
|
|
950
|
+
"p-wait-for": "^4.1.0",
|
|
951
|
+
"path-key": "^4.0.0",
|
|
952
|
+
"regexp-tree": "^0.1.24",
|
|
953
|
+
"semver": "^7.3.8",
|
|
954
|
+
"tmp-promise": "^3.0.3",
|
|
955
|
+
"urlpattern-polyfill": "8.0.2",
|
|
956
|
+
"uuid": "^9.0.0"
|
|
957
|
+
},
|
|
958
|
+
"engines": {
|
|
959
|
+
"node": "^14.16.0 || >=16.0.0"
|
|
960
|
+
}
|
|
961
|
+
},
|
|
931
962
|
"node_modules/@netlify/build/node_modules/@sindresorhus/is": {
|
|
932
963
|
"version": "5.6.0",
|
|
933
964
|
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz",
|
|
@@ -950,6 +981,29 @@
|
|
|
950
981
|
"node": ">=14.16"
|
|
951
982
|
}
|
|
952
983
|
},
|
|
984
|
+
"node_modules/@netlify/build/node_modules/ajv": {
|
|
985
|
+
"version": "8.12.0",
|
|
986
|
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
|
987
|
+
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
|
|
988
|
+
"dependencies": {
|
|
989
|
+
"fast-deep-equal": "^3.1.1",
|
|
990
|
+
"json-schema-traverse": "^1.0.0",
|
|
991
|
+
"require-from-string": "^2.0.2",
|
|
992
|
+
"uri-js": "^4.2.2"
|
|
993
|
+
},
|
|
994
|
+
"funding": {
|
|
995
|
+
"type": "github",
|
|
996
|
+
"url": "https://github.com/sponsors/epoberezkin"
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
"node_modules/@netlify/build/node_modules/ajv-errors": {
|
|
1000
|
+
"version": "3.0.0",
|
|
1001
|
+
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz",
|
|
1002
|
+
"integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
|
|
1003
|
+
"peerDependencies": {
|
|
1004
|
+
"ajv": "^8.0.1"
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
953
1007
|
"node_modules/@netlify/build/node_modules/cacheable-lookup": {
|
|
954
1008
|
"version": "7.0.0",
|
|
955
1009
|
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
|
|
@@ -1028,6 +1082,17 @@
|
|
|
1028
1082
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1029
1083
|
}
|
|
1030
1084
|
},
|
|
1085
|
+
"node_modules/@netlify/build/node_modules/get-port": {
|
|
1086
|
+
"version": "6.1.2",
|
|
1087
|
+
"resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz",
|
|
1088
|
+
"integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==",
|
|
1089
|
+
"engines": {
|
|
1090
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
1091
|
+
},
|
|
1092
|
+
"funding": {
|
|
1093
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1031
1096
|
"node_modules/@netlify/build/node_modules/got": {
|
|
1032
1097
|
"version": "12.6.1",
|
|
1033
1098
|
"resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz",
|
|
@@ -1083,6 +1148,22 @@
|
|
|
1083
1148
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1084
1149
|
}
|
|
1085
1150
|
},
|
|
1151
|
+
"node_modules/@netlify/build/node_modules/is-path-inside": {
|
|
1152
|
+
"version": "4.0.0",
|
|
1153
|
+
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz",
|
|
1154
|
+
"integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==",
|
|
1155
|
+
"engines": {
|
|
1156
|
+
"node": ">=12"
|
|
1157
|
+
},
|
|
1158
|
+
"funding": {
|
|
1159
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
"node_modules/@netlify/build/node_modules/json-schema-traverse": {
|
|
1163
|
+
"version": "1.0.0",
|
|
1164
|
+
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
|
1165
|
+
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
1166
|
+
},
|
|
1086
1167
|
"node_modules/@netlify/build/node_modules/lowercase-keys": {
|
|
1087
1168
|
"version": "3.0.0",
|
|
1088
1169
|
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
|
|
@@ -1116,6 +1197,23 @@
|
|
|
1116
1197
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1117
1198
|
}
|
|
1118
1199
|
},
|
|
1200
|
+
"node_modules/@netlify/build/node_modules/node-fetch": {
|
|
1201
|
+
"version": "3.3.2",
|
|
1202
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
|
1203
|
+
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
|
1204
|
+
"dependencies": {
|
|
1205
|
+
"data-uri-to-buffer": "^4.0.0",
|
|
1206
|
+
"fetch-blob": "^3.1.4",
|
|
1207
|
+
"formdata-polyfill": "^4.0.10"
|
|
1208
|
+
},
|
|
1209
|
+
"engines": {
|
|
1210
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
1211
|
+
},
|
|
1212
|
+
"funding": {
|
|
1213
|
+
"type": "opencollective",
|
|
1214
|
+
"url": "https://opencollective.com/node-fetch"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1119
1217
|
"node_modules/@netlify/build/node_modules/normalize-url": {
|
|
1120
1218
|
"version": "8.0.0",
|
|
1121
1219
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
|
|
@@ -1191,6 +1289,31 @@
|
|
|
1191
1289
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1192
1290
|
}
|
|
1193
1291
|
},
|
|
1292
|
+
"node_modules/@netlify/build/node_modules/p-timeout": {
|
|
1293
|
+
"version": "5.1.0",
|
|
1294
|
+
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
|
|
1295
|
+
"integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
|
|
1296
|
+
"engines": {
|
|
1297
|
+
"node": ">=12"
|
|
1298
|
+
},
|
|
1299
|
+
"funding": {
|
|
1300
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
"node_modules/@netlify/build/node_modules/p-wait-for": {
|
|
1304
|
+
"version": "4.1.0",
|
|
1305
|
+
"resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-4.1.0.tgz",
|
|
1306
|
+
"integrity": "sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw==",
|
|
1307
|
+
"dependencies": {
|
|
1308
|
+
"p-timeout": "^5.0.0"
|
|
1309
|
+
},
|
|
1310
|
+
"engines": {
|
|
1311
|
+
"node": ">=12"
|
|
1312
|
+
},
|
|
1313
|
+
"funding": {
|
|
1314
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1194
1317
|
"node_modules/@netlify/build/node_modules/parse-ms": {
|
|
1195
1318
|
"version": "3.0.0",
|
|
1196
1319
|
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
|
|
@@ -1357,9 +1480,9 @@
|
|
|
1357
1480
|
}
|
|
1358
1481
|
},
|
|
1359
1482
|
"node_modules/@netlify/config": {
|
|
1360
|
-
"version": "20.8.
|
|
1361
|
-
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.8.
|
|
1362
|
-
"integrity": "sha512-
|
|
1483
|
+
"version": "20.8.1",
|
|
1484
|
+
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.8.1.tgz",
|
|
1485
|
+
"integrity": "sha512-GpkR8Z8UHCftATIILGoCXPW1nPzrSK85O85d29pQXqv5KO2sAx5glgZQtEgKJnE7JWzMy+h6qjRD9hi0Mvw3Nw==",
|
|
1363
1486
|
"dependencies": {
|
|
1364
1487
|
"chalk": "^5.0.0",
|
|
1365
1488
|
"cron-parser": "^4.1.0",
|
|
@@ -1578,9 +1701,9 @@
|
|
|
1578
1701
|
}
|
|
1579
1702
|
},
|
|
1580
1703
|
"node_modules/@netlify/edge-bundler": {
|
|
1581
|
-
"version": "8.19.
|
|
1582
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.
|
|
1583
|
-
"integrity": "sha512-
|
|
1704
|
+
"version": "8.19.1",
|
|
1705
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.1.tgz",
|
|
1706
|
+
"integrity": "sha512-Erj0+dfRFMQjV3R+FX9NtCV35t6qU91rWKtsuawLzS6tAHLvrR8sOmyFxt5Neg4VPjAstYg1ik16lDak2LhQww==",
|
|
1584
1707
|
"dependencies": {
|
|
1585
1708
|
"@import-maps/resolve": "^1.0.1",
|
|
1586
1709
|
"ajv": "^8.11.2",
|
|
@@ -1849,11 +1972,11 @@
|
|
|
1849
1972
|
}
|
|
1850
1973
|
},
|
|
1851
1974
|
"node_modules/@netlify/functions-utils": {
|
|
1852
|
-
"version": "5.2.
|
|
1853
|
-
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.
|
|
1854
|
-
"integrity": "sha512-
|
|
1975
|
+
"version": "5.2.27",
|
|
1976
|
+
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.27.tgz",
|
|
1977
|
+
"integrity": "sha512-AQvA5GKO0n8VrxH7TS5fFvooJOG49eCxvfT0G6dtnmUVcNnqXAeTcaUhKQaY3p6BDmArHIWnZWxqCLi1cUxUAg==",
|
|
1855
1978
|
"dependencies": {
|
|
1856
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
1979
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
1857
1980
|
"cpy": "^9.0.0",
|
|
1858
1981
|
"path-exists": "^5.0.0"
|
|
1859
1982
|
},
|
|
@@ -2285,9 +2408,9 @@
|
|
|
2285
2408
|
}
|
|
2286
2409
|
},
|
|
2287
2410
|
"node_modules/@netlify/zip-it-and-ship-it": {
|
|
2288
|
-
"version": "9.17.
|
|
2289
|
-
"resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.17.
|
|
2290
|
-
"integrity": "sha512-
|
|
2411
|
+
"version": "9.17.3",
|
|
2412
|
+
"resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.17.3.tgz",
|
|
2413
|
+
"integrity": "sha512-QjWygS6dR5WKLFoo+k9YeX9CbkBNHfjHyt3u86wB+n0pvzpSudMbH6SLCXsoSmBIFpdAIWZ5aWZ3S0Fvy8bEvg==",
|
|
2291
2414
|
"dependencies": {
|
|
2292
2415
|
"@babel/parser": "^7.22.5",
|
|
2293
2416
|
"@netlify/binary-info": "^1.0.0",
|
|
@@ -15303,21 +15426,21 @@
|
|
|
15303
15426
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
15304
15427
|
},
|
|
15305
15428
|
"@netlify/build": {
|
|
15306
|
-
"version": "29.20.
|
|
15307
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.
|
|
15308
|
-
"integrity": "sha512-
|
|
15429
|
+
"version": "29.20.13",
|
|
15430
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.13.tgz",
|
|
15431
|
+
"integrity": "sha512-FcRPb56MWG+H3eI0kcb0H8vlz2N89sl22OmVW5kZifzXalc76kSDMmqOzwHBSe2ChBUZApmYwqY3QVB/h5sL1g==",
|
|
15309
15432
|
"requires": {
|
|
15310
15433
|
"@bugsnag/js": "^7.0.0",
|
|
15311
15434
|
"@honeycombio/opentelemetry-node": "^0.4.0",
|
|
15312
15435
|
"@netlify/cache-utils": "^5.1.5",
|
|
15313
|
-
"@netlify/config": "^20.8.
|
|
15436
|
+
"@netlify/config": "^20.8.1",
|
|
15314
15437
|
"@netlify/edge-bundler": "8.19.0",
|
|
15315
15438
|
"@netlify/framework-info": "^9.8.10",
|
|
15316
|
-
"@netlify/functions-utils": "^5.2.
|
|
15439
|
+
"@netlify/functions-utils": "^5.2.27",
|
|
15317
15440
|
"@netlify/git-utils": "^5.1.1",
|
|
15318
15441
|
"@netlify/plugins-list": "^6.71.0",
|
|
15319
15442
|
"@netlify/run-utils": "^5.1.1",
|
|
15320
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
15443
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
15321
15444
|
"@opentelemetry/api": "^1.4.1",
|
|
15322
15445
|
"@sindresorhus/slugify": "^2.0.0",
|
|
15323
15446
|
"ansi-escapes": "^6.0.0",
|
|
@@ -15364,6 +15487,34 @@
|
|
|
15364
15487
|
"yargs": "^17.6.0"
|
|
15365
15488
|
},
|
|
15366
15489
|
"dependencies": {
|
|
15490
|
+
"@netlify/edge-bundler": {
|
|
15491
|
+
"version": "8.19.0",
|
|
15492
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.0.tgz",
|
|
15493
|
+
"integrity": "sha512-blIZHLXlEXcjpAhd2TJ+Rw7H+WhNXSBfmFfRHn2pyzNiAbQa71eU0eNUE2+Nw58DGfvUC0unerbTlN2gd3iVdA==",
|
|
15494
|
+
"requires": {
|
|
15495
|
+
"@import-maps/resolve": "^1.0.1",
|
|
15496
|
+
"ajv": "^8.11.2",
|
|
15497
|
+
"ajv-errors": "^3.0.0",
|
|
15498
|
+
"better-ajv-errors": "^1.2.0",
|
|
15499
|
+
"common-path-prefix": "^3.0.0",
|
|
15500
|
+
"env-paths": "^3.0.0",
|
|
15501
|
+
"execa": "^6.0.0",
|
|
15502
|
+
"find-up": "^6.3.0",
|
|
15503
|
+
"get-port": "^6.1.2",
|
|
15504
|
+
"is-path-inside": "^4.0.0",
|
|
15505
|
+
"jsonc-parser": "^3.2.0",
|
|
15506
|
+
"node-fetch": "^3.1.1",
|
|
15507
|
+
"node-stream-zip": "^1.15.0",
|
|
15508
|
+
"p-retry": "^5.1.1",
|
|
15509
|
+
"p-wait-for": "^4.1.0",
|
|
15510
|
+
"path-key": "^4.0.0",
|
|
15511
|
+
"regexp-tree": "^0.1.24",
|
|
15512
|
+
"semver": "^7.3.8",
|
|
15513
|
+
"tmp-promise": "^3.0.3",
|
|
15514
|
+
"urlpattern-polyfill": "8.0.2",
|
|
15515
|
+
"uuid": "^9.0.0"
|
|
15516
|
+
}
|
|
15517
|
+
},
|
|
15367
15518
|
"@sindresorhus/is": {
|
|
15368
15519
|
"version": "5.6.0",
|
|
15369
15520
|
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz",
|
|
@@ -15377,6 +15528,23 @@
|
|
|
15377
15528
|
"defer-to-connect": "^2.0.1"
|
|
15378
15529
|
}
|
|
15379
15530
|
},
|
|
15531
|
+
"ajv": {
|
|
15532
|
+
"version": "8.12.0",
|
|
15533
|
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
|
15534
|
+
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
|
|
15535
|
+
"requires": {
|
|
15536
|
+
"fast-deep-equal": "^3.1.1",
|
|
15537
|
+
"json-schema-traverse": "^1.0.0",
|
|
15538
|
+
"require-from-string": "^2.0.2",
|
|
15539
|
+
"uri-js": "^4.2.2"
|
|
15540
|
+
}
|
|
15541
|
+
},
|
|
15542
|
+
"ajv-errors": {
|
|
15543
|
+
"version": "3.0.0",
|
|
15544
|
+
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz",
|
|
15545
|
+
"integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
|
|
15546
|
+
"requires": {}
|
|
15547
|
+
},
|
|
15380
15548
|
"cacheable-lookup": {
|
|
15381
15549
|
"version": "7.0.0",
|
|
15382
15550
|
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
|
|
@@ -15431,6 +15599,11 @@
|
|
|
15431
15599
|
"is-unicode-supported": "^1.2.0"
|
|
15432
15600
|
}
|
|
15433
15601
|
},
|
|
15602
|
+
"get-port": {
|
|
15603
|
+
"version": "6.1.2",
|
|
15604
|
+
"resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz",
|
|
15605
|
+
"integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw=="
|
|
15606
|
+
},
|
|
15434
15607
|
"got": {
|
|
15435
15608
|
"version": "12.6.1",
|
|
15436
15609
|
"resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz",
|
|
@@ -15468,6 +15641,16 @@
|
|
|
15468
15641
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
|
|
15469
15642
|
"integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="
|
|
15470
15643
|
},
|
|
15644
|
+
"is-path-inside": {
|
|
15645
|
+
"version": "4.0.0",
|
|
15646
|
+
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz",
|
|
15647
|
+
"integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA=="
|
|
15648
|
+
},
|
|
15649
|
+
"json-schema-traverse": {
|
|
15650
|
+
"version": "1.0.0",
|
|
15651
|
+
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
|
15652
|
+
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
15653
|
+
},
|
|
15471
15654
|
"lowercase-keys": {
|
|
15472
15655
|
"version": "3.0.0",
|
|
15473
15656
|
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
|
|
@@ -15483,6 +15666,16 @@
|
|
|
15483
15666
|
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
|
|
15484
15667
|
"integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg=="
|
|
15485
15668
|
},
|
|
15669
|
+
"node-fetch": {
|
|
15670
|
+
"version": "3.3.2",
|
|
15671
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
|
15672
|
+
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
|
15673
|
+
"requires": {
|
|
15674
|
+
"data-uri-to-buffer": "^4.0.0",
|
|
15675
|
+
"fetch-blob": "^3.1.4",
|
|
15676
|
+
"formdata-polyfill": "^4.0.10"
|
|
15677
|
+
}
|
|
15678
|
+
},
|
|
15486
15679
|
"normalize-url": {
|
|
15487
15680
|
"version": "8.0.0",
|
|
15488
15681
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
|
|
@@ -15525,6 +15718,19 @@
|
|
|
15525
15718
|
"p-limit": "^4.0.0"
|
|
15526
15719
|
}
|
|
15527
15720
|
},
|
|
15721
|
+
"p-timeout": {
|
|
15722
|
+
"version": "5.1.0",
|
|
15723
|
+
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
|
|
15724
|
+
"integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew=="
|
|
15725
|
+
},
|
|
15726
|
+
"p-wait-for": {
|
|
15727
|
+
"version": "4.1.0",
|
|
15728
|
+
"resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-4.1.0.tgz",
|
|
15729
|
+
"integrity": "sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw==",
|
|
15730
|
+
"requires": {
|
|
15731
|
+
"p-timeout": "^5.0.0"
|
|
15732
|
+
}
|
|
15733
|
+
},
|
|
15528
15734
|
"parse-ms": {
|
|
15529
15735
|
"version": "3.0.0",
|
|
15530
15736
|
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
|
|
@@ -15587,9 +15793,9 @@
|
|
|
15587
15793
|
}
|
|
15588
15794
|
},
|
|
15589
15795
|
"@netlify/build-info": {
|
|
15590
|
-
"version": "7.
|
|
15591
|
-
"resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.
|
|
15592
|
-
"integrity": "sha512-
|
|
15796
|
+
"version": "7.8.0",
|
|
15797
|
+
"resolved": "https://registry.npmjs.org/@netlify/build-info/-/build-info-7.8.0.tgz",
|
|
15798
|
+
"integrity": "sha512-4UnAaQUXoxMfs6KAMKPx8Pa5WwdGDcgIliyQpKhc4Xq3A2dgH+Uam9kS4aq5+4ZeHS9/eT1BKLKZPUOOF5ZQZg==",
|
|
15593
15799
|
"requires": {
|
|
15594
15800
|
"@bugsnag/js": "^7.20.0",
|
|
15595
15801
|
"dot-prop": "^7.2.0",
|
|
@@ -15681,9 +15887,9 @@
|
|
|
15681
15887
|
}
|
|
15682
15888
|
},
|
|
15683
15889
|
"@netlify/config": {
|
|
15684
|
-
"version": "20.8.
|
|
15685
|
-
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.8.
|
|
15686
|
-
"integrity": "sha512-
|
|
15890
|
+
"version": "20.8.1",
|
|
15891
|
+
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.8.1.tgz",
|
|
15892
|
+
"integrity": "sha512-GpkR8Z8UHCftATIILGoCXPW1nPzrSK85O85d29pQXqv5KO2sAx5glgZQtEgKJnE7JWzMy+h6qjRD9hi0Mvw3Nw==",
|
|
15687
15893
|
"requires": {
|
|
15688
15894
|
"chalk": "^5.0.0",
|
|
15689
15895
|
"cron-parser": "^4.1.0",
|
|
@@ -15816,9 +16022,9 @@
|
|
|
15816
16022
|
}
|
|
15817
16023
|
},
|
|
15818
16024
|
"@netlify/edge-bundler": {
|
|
15819
|
-
"version": "8.19.
|
|
15820
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.
|
|
15821
|
-
"integrity": "sha512-
|
|
16025
|
+
"version": "8.19.1",
|
|
16026
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.1.tgz",
|
|
16027
|
+
"integrity": "sha512-Erj0+dfRFMQjV3R+FX9NtCV35t6qU91rWKtsuawLzS6tAHLvrR8sOmyFxt5Neg4VPjAstYg1ik16lDak2LhQww==",
|
|
15822
16028
|
"requires": {
|
|
15823
16029
|
"@import-maps/resolve": "^1.0.1",
|
|
15824
16030
|
"ajv": "^8.11.2",
|
|
@@ -15999,11 +16205,11 @@
|
|
|
15999
16205
|
}
|
|
16000
16206
|
},
|
|
16001
16207
|
"@netlify/functions-utils": {
|
|
16002
|
-
"version": "5.2.
|
|
16003
|
-
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.
|
|
16004
|
-
"integrity": "sha512-
|
|
16208
|
+
"version": "5.2.27",
|
|
16209
|
+
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.27.tgz",
|
|
16210
|
+
"integrity": "sha512-AQvA5GKO0n8VrxH7TS5fFvooJOG49eCxvfT0G6dtnmUVcNnqXAeTcaUhKQaY3p6BDmArHIWnZWxqCLi1cUxUAg==",
|
|
16005
16211
|
"requires": {
|
|
16006
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
16212
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
16007
16213
|
"cpy": "^9.0.0",
|
|
16008
16214
|
"path-exists": "^5.0.0"
|
|
16009
16215
|
},
|
|
@@ -16249,9 +16455,9 @@
|
|
|
16249
16455
|
}
|
|
16250
16456
|
},
|
|
16251
16457
|
"@netlify/zip-it-and-ship-it": {
|
|
16252
|
-
"version": "9.17.
|
|
16253
|
-
"resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.17.
|
|
16254
|
-
"integrity": "sha512-
|
|
16458
|
+
"version": "9.17.3",
|
|
16459
|
+
"resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-9.17.3.tgz",
|
|
16460
|
+
"integrity": "sha512-QjWygS6dR5WKLFoo+k9YeX9CbkBNHfjHyt3u86wB+n0pvzpSudMbH6SLCXsoSmBIFpdAIWZ5aWZ3S0Fvy8bEvg==",
|
|
16255
16461
|
"requires": {
|
|
16256
16462
|
"@babel/parser": "^7.22.5",
|
|
16257
16463
|
"@netlify/binary-info": "^1.0.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "16.
|
|
4
|
+
"version": "16.3.1",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@bugsnag/js": "7.20.2",
|
|
46
46
|
"@fastify/static": "6.10.2",
|
|
47
|
-
"@netlify/build": "29.20.
|
|
48
|
-
"@netlify/build-info": "7.
|
|
49
|
-
"@netlify/config": "20.8.
|
|
50
|
-
"@netlify/edge-bundler": "8.19.
|
|
47
|
+
"@netlify/build": "29.20.13",
|
|
48
|
+
"@netlify/build-info": "7.8.0",
|
|
49
|
+
"@netlify/config": "20.8.1",
|
|
50
|
+
"@netlify/edge-bundler": "8.19.1",
|
|
51
51
|
"@netlify/local-functions-proxy": "1.1.1",
|
|
52
52
|
"@netlify/serverless-functions-api": "1.7.3",
|
|
53
|
-
"@netlify/zip-it-and-ship-it": "9.17.
|
|
53
|
+
"@netlify/zip-it-and-ship-it": "9.17.3",
|
|
54
54
|
"@octokit/rest": "19.0.13",
|
|
55
55
|
"ansi-escapes": "6.2.0",
|
|
56
56
|
"ansi-styles": "6.2.1",
|
|
@@ -37,4 +37,4 @@ const lmInfo = async () => {
|
|
|
37
37
|
* @returns
|
|
38
38
|
*/
|
|
39
39
|
export const createLmInfoCommand = (program) =>
|
|
40
|
-
program.command('lm:info').description('Show large media requirements information.').action(lmInfo)
|
|
40
|
+
program.command('lm:info', { hidden: true }).description('Show large media requirements information.').action(lmInfo)
|
|
@@ -20,7 +20,7 @@ const lmInstall = async ({ force }) => {
|
|
|
20
20
|
*/
|
|
21
21
|
export const createLmInstallCommand = (program) =>
|
|
22
22
|
program
|
|
23
|
-
.command('lm:install')
|
|
23
|
+
.command('lm:install', { hidden: true })
|
|
24
24
|
.alias('lm:init')
|
|
25
25
|
.description(
|
|
26
26
|
`Configures your computer to use Netlify Large Media
|
|
@@ -97,7 +97,7 @@ const lmSetup = async (options, command) => {
|
|
|
97
97
|
*/
|
|
98
98
|
export const createLmSetupCommand = (program) =>
|
|
99
99
|
program
|
|
100
|
-
.command('lm:setup')
|
|
100
|
+
.command('lm:setup', { hidden: true })
|
|
101
101
|
.description('Configures your site to use Netlify Large Media')
|
|
102
102
|
.option('-s, --skip-install', 'Skip the credentials helper installation check')
|
|
103
103
|
.option('-f, --force-install', 'Force the credentials helper installation')
|
package/src/commands/lm/lm.mjs
CHANGED
|
@@ -25,8 +25,10 @@ export const createLmCommand = (program) => {
|
|
|
25
25
|
createLmUninstallCommand(program)
|
|
26
26
|
|
|
27
27
|
program
|
|
28
|
-
.command('lm')
|
|
29
|
-
.description(
|
|
28
|
+
.command('lm', { hidden: true })
|
|
29
|
+
.description(
|
|
30
|
+
'[Deprecated and will be removed from future versions] Handle Netlify Large Media operations\nThe lm command will help you manage large media for a site',
|
|
31
|
+
)
|
|
30
32
|
.addExamples(['netlify lm:info', 'netlify lm:install', 'netlify lm:setup'])
|
|
31
33
|
.action(lm)
|
|
32
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { env } from 'process'
|
|
2
2
|
|
|
3
|
-
const latestBootstrapURL = 'https://
|
|
3
|
+
const latestBootstrapURL = 'https://64f73321fdd56900083fa618--edge.netlify.com/bootstrap/index-combined.ts'
|
|
4
4
|
|
|
5
5
|
export const getBootstrapURL = () => env.NETLIFY_EDGE_BOOTSTRAP || latestBootstrapURL
|
|
@@ -5,10 +5,13 @@ export const headers = {
|
|
|
5
5
|
DeployID: 'x-nf-deploy-id',
|
|
6
6
|
FeatureFlags: 'x-nf-feature-flags',
|
|
7
7
|
ForwardedHost: 'x-forwarded-host',
|
|
8
|
+
ForwardedProtocol: 'x-forwarded-proto',
|
|
8
9
|
Functions: 'x-nf-edge-functions',
|
|
9
10
|
InvocationMetadata: 'x-nf-edge-functions-metadata',
|
|
10
11
|
Geo: 'x-nf-geo',
|
|
11
12
|
Passthrough: 'x-nf-passthrough',
|
|
13
|
+
PassthroughHost: 'x-nf-passthrough-host',
|
|
14
|
+
PassthroughProtocol: 'x-nf-passthrough-proto',
|
|
12
15
|
IP: 'x-nf-client-connection-ip',
|
|
13
16
|
Site: 'X-NF-Site-Info',
|
|
14
17
|
DebugLogging: 'x-nf-debug-logging',
|
|
@@ -78,6 +78,7 @@ export const createAccountInfoHeader = (accountInfo = {}) => {
|
|
|
78
78
|
* @param {boolean=} config.offline
|
|
79
79
|
* @param {*} config.passthroughPort
|
|
80
80
|
* @param {*} config.projectDir
|
|
81
|
+
* @param {*} config.settings
|
|
81
82
|
* @param {*} config.siteInfo
|
|
82
83
|
* @param {*} config.state
|
|
83
84
|
* @returns
|
|
@@ -96,6 +97,7 @@ export const initializeProxy = async ({
|
|
|
96
97
|
offline,
|
|
97
98
|
passthroughPort,
|
|
98
99
|
projectDir,
|
|
100
|
+
settings,
|
|
99
101
|
siteInfo,
|
|
100
102
|
state,
|
|
101
103
|
}) => {
|
|
@@ -146,7 +148,7 @@ export const initializeProxy = async ({
|
|
|
146
148
|
await registry.initialize()
|
|
147
149
|
|
|
148
150
|
const url = new URL(req.url, `http://${LOCAL_HOST}:${mainPort}`)
|
|
149
|
-
const { functionNames, invocationMetadata, orphanedDeclarations } = registry.matchURLPath(url.pathname)
|
|
151
|
+
const { functionNames, invocationMetadata, orphanedDeclarations } = registry.matchURLPath(url.pathname, req.method)
|
|
150
152
|
|
|
151
153
|
// If the request matches a config declaration for an Edge Function without
|
|
152
154
|
// a matching function file, we warn the user.
|
|
@@ -167,28 +169,22 @@ export const initializeProxy = async ({
|
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
const featureFlags = ['edge_functions_bootstrap_failure_mode']
|
|
170
|
-
const forwardedHost = `localhost:${passthroughPort}`
|
|
171
172
|
|
|
172
173
|
req[headersSymbol] = {
|
|
173
174
|
[headers.FeatureFlags]: getFeatureFlagsHeader(featureFlags),
|
|
174
|
-
[headers.
|
|
175
|
+
[headers.ForwardedProtocol]: settings.https ? 'https:' : 'http:',
|
|
175
176
|
[headers.Functions]: functionNames.join(','),
|
|
176
177
|
[headers.InvocationMetadata]: getInvocationMetadataHeader(invocationMetadata),
|
|
177
178
|
[headers.IP]: LOCAL_HOST,
|
|
178
179
|
[headers.Passthrough]: 'passthrough',
|
|
180
|
+
[headers.PassthroughHost]: `localhost:${passthroughPort}`,
|
|
181
|
+
[headers.PassthroughProtocol]: 'http:',
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
if (debug) {
|
|
182
185
|
req[headersSymbol][headers.DebugLogging] = '1'
|
|
183
186
|
}
|
|
184
187
|
|
|
185
|
-
// If we're using a different port for passthrough requests, which is the
|
|
186
|
-
// case when the CLI is running on HTTPS, use it on the Host header so
|
|
187
|
-
// that the request URL inside the edge function is something accessible.
|
|
188
|
-
if (mainPort !== passthroughPort) {
|
|
189
|
-
req[headersSymbol].host = forwardedHost
|
|
190
|
-
}
|
|
191
|
-
|
|
192
188
|
return `http://${LOCAL_HOST}:${isolatePort}`
|
|
193
189
|
}
|
|
194
190
|
}
|
|
@@ -302,8 +302,9 @@ export class EdgeFunctionsRegistry {
|
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
* @param {string} urlPath
|
|
305
|
+
* @param {string} method
|
|
305
306
|
*/
|
|
306
|
-
matchURLPath(urlPath) {
|
|
307
|
+
matchURLPath(urlPath, method) {
|
|
307
308
|
const declarations = this.#bundler.mergeDeclarations(
|
|
308
309
|
this.#declarationsFromTOML,
|
|
309
310
|
this.#userFunctionConfigs,
|
|
@@ -330,6 +331,10 @@ export class EdgeFunctionsRegistry {
|
|
|
330
331
|
const routeIndexes = []
|
|
331
332
|
|
|
332
333
|
routes.forEach((route, index) => {
|
|
334
|
+
if (route.methods && route.methods.length !== 0 && !route.methods.includes(method)) {
|
|
335
|
+
return
|
|
336
|
+
}
|
|
337
|
+
|
|
333
338
|
if (!route.pattern.test(urlPath)) {
|
|
334
339
|
return
|
|
335
340
|
}
|
|
@@ -158,12 +158,22 @@ export default class NetlifyFunction {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Matches all routes agains the incoming request. If a match is found, then the matched route is returned.
|
|
163
|
+
* @param {string} rawPath
|
|
164
|
+
* @param {string} method
|
|
165
|
+
* @returns matched route
|
|
166
|
+
*/
|
|
167
|
+
async matchURLPath(rawPath, method) {
|
|
162
168
|
await this.buildQueue
|
|
163
169
|
|
|
164
170
|
const path = (rawPath.endsWith('/') ? rawPath.slice(0, -1) : rawPath).toLowerCase()
|
|
165
171
|
const { routes = [] } = this.buildData
|
|
166
|
-
|
|
172
|
+
return routes.find(({ expression, literal, methods }) => {
|
|
173
|
+
if (methods.length !== 0 && !methods.includes(method)) {
|
|
174
|
+
return false
|
|
175
|
+
}
|
|
176
|
+
|
|
167
177
|
if (literal !== undefined) {
|
|
168
178
|
return path === literal
|
|
169
179
|
}
|
|
@@ -176,8 +186,6 @@ export default class NetlifyFunction {
|
|
|
176
186
|
|
|
177
187
|
return false
|
|
178
188
|
})
|
|
179
|
-
|
|
180
|
-
return isMatch
|
|
181
189
|
}
|
|
182
190
|
|
|
183
191
|
get url() {
|
|
@@ -122,12 +122,12 @@ export class FunctionsRegistry {
|
|
|
122
122
|
return this.functions.get(name)
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
async getFunctionForURLPath(urlPath) {
|
|
125
|
+
async getFunctionForURLPath(urlPath, method) {
|
|
126
126
|
for (const func of this.functions.values()) {
|
|
127
|
-
const
|
|
127
|
+
const route = await func.matchURLPath(urlPath, method)
|
|
128
128
|
|
|
129
|
-
if (
|
|
130
|
-
return func
|
|
129
|
+
if (route) {
|
|
130
|
+
return { func, route }
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -7,7 +7,7 @@ import jwtDecode from 'jwt-decode'
|
|
|
7
7
|
|
|
8
8
|
import { NETLIFYDEVERR, NETLIFYDEVLOG, error as errorExit, log } from '../../utils/command-helpers.mjs'
|
|
9
9
|
import { CLOCKWORK_USERAGENT, getFunctionsDistPath, getInternalFunctionsDir } from '../../utils/functions/index.mjs'
|
|
10
|
-
import { NFFunctionName } from '../../utils/headers.mjs'
|
|
10
|
+
import { NFFunctionName, NFFunctionRoute } from '../../utils/headers.mjs'
|
|
11
11
|
import { headers as efHeaders } from '../edge-functions/headers.mjs'
|
|
12
12
|
import { getGeoLocation } from '../geo-location.mjs'
|
|
13
13
|
|
|
@@ -56,11 +56,13 @@ export const createHandler = function (options) {
|
|
|
56
56
|
const { functionsRegistry } = options
|
|
57
57
|
|
|
58
58
|
return async function handler(request, response) {
|
|
59
|
-
// If
|
|
59
|
+
// If these headers are set, it means we've already matched a function and we
|
|
60
60
|
// can just grab its name directly. We delete the header from the request
|
|
61
61
|
// because we don't want to expose it to user code.
|
|
62
62
|
let functionName = request.header(NFFunctionName)
|
|
63
63
|
delete request.headers[NFFunctionName]
|
|
64
|
+
const functionRoute = request.header(NFFunctionRoute)
|
|
65
|
+
delete request.headers[NFFunctionRoute]
|
|
64
66
|
|
|
65
67
|
// If we didn't match a function with a custom route, let's try to match
|
|
66
68
|
// using the fixed URL format.
|
|
@@ -148,6 +150,7 @@ export const createHandler = function (options) {
|
|
|
148
150
|
isBase64Encoded,
|
|
149
151
|
rawUrl,
|
|
150
152
|
rawQuery,
|
|
153
|
+
route: functionRoute,
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
const clientContext = buildClientContext(request.headers) || {}
|
package/src/utils/headers.mjs
CHANGED
package/src/utils/proxy.mjs
CHANGED
|
@@ -31,7 +31,7 @@ import renderErrorTemplate from '../lib/render-error-template.mjs'
|
|
|
31
31
|
|
|
32
32
|
import { NETLIFYDEVLOG, NETLIFYDEVWARN, log, chalk } from './command-helpers.mjs'
|
|
33
33
|
import createStreamPromise from './create-stream-promise.mjs'
|
|
34
|
-
import { headersForPath, parseHeaders, NFFunctionName, NFRequestID } from './headers.mjs'
|
|
34
|
+
import { headersForPath, parseHeaders, NFFunctionName, NFRequestID, NFFunctionRoute } from './headers.mjs'
|
|
35
35
|
import { generateRequestID } from './request-id.mjs'
|
|
36
36
|
import { createRewriter, onChanges } from './rules-proxy.mjs'
|
|
37
37
|
import { signRedirect } from './sign-redirect.mjs'
|
|
@@ -328,7 +328,8 @@ const serveRedirect = async function ({ env, functionsRegistry, match, options,
|
|
|
328
328
|
return proxy.web(req, res, { target: options.functionsServer })
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
const functionWithCustomRoute =
|
|
331
|
+
const functionWithCustomRoute =
|
|
332
|
+
functionsRegistry && (await functionsRegistry.getFunctionForURLPath(destURL, req.method))
|
|
332
333
|
const destStaticFile = await getStatic(dest.pathname, options.publicFolder)
|
|
333
334
|
let statusValue
|
|
334
335
|
if (
|
|
@@ -342,7 +343,9 @@ const serveRedirect = async function ({ env, functionsRegistry, match, options,
|
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
if (isFunction(options.functionsPort, req.url) || functionWithCustomRoute) {
|
|
345
|
-
const functionHeaders = functionWithCustomRoute
|
|
346
|
+
const functionHeaders = functionWithCustomRoute
|
|
347
|
+
? { [NFFunctionName]: functionWithCustomRoute.func.name, [NFFunctionRoute]: functionWithCustomRoute.route }
|
|
348
|
+
: {}
|
|
346
349
|
const url = reqToURL(req, originalURL)
|
|
347
350
|
req.headers['x-netlify-original-pathname'] = url.pathname
|
|
348
351
|
req.headers['x-netlify-original-search'] = url.search
|
|
@@ -600,12 +603,12 @@ const onRequest = async (
|
|
|
600
603
|
}
|
|
601
604
|
|
|
602
605
|
// Does the request match a function on a custom URL path?
|
|
603
|
-
const functionMatch = functionsRegistry ? await functionsRegistry.getFunctionForURLPath(req.url) : null
|
|
606
|
+
const functionMatch = functionsRegistry ? await functionsRegistry.getFunctionForURLPath(req.url, req.method) : null
|
|
604
607
|
|
|
605
608
|
if (functionMatch) {
|
|
606
609
|
// Setting an internal header with the function name so that we don't
|
|
607
610
|
// have to match the URL again in the functions server.
|
|
608
|
-
const headers = { [NFFunctionName]: functionMatch.name }
|
|
611
|
+
const headers = { [NFFunctionName]: functionMatch.func.name, [NFFunctionRoute]: functionMatch.route.pattern }
|
|
609
612
|
|
|
610
613
|
return proxy.web(req, res, { headers, target: functionsServer })
|
|
611
614
|
}
|
|
@@ -695,6 +698,7 @@ export const startProxy = async function ({
|
|
|
695
698
|
mainPort: settings.port,
|
|
696
699
|
offline,
|
|
697
700
|
passthroughPort: secondaryServerPort || settings.port,
|
|
701
|
+
settings,
|
|
698
702
|
projectDir,
|
|
699
703
|
siteInfo,
|
|
700
704
|
accountId,
|