netlify-cli 13.1.2 → 13.1.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.
- package/npm-shrinkwrap.json +93 -93
- package/package.json +6 -6
- package/src/functions-templates/go/hello-world/go.mod +1 -1
- package/src/functions-templates/javascript/token-hider/package-lock.json +6 -6
- package/src/functions-templates/rust/hello-world/Cargo.toml +1 -1
- package/src/lib/edge-functions/bootstrap.mjs +5 -0
- package/src/lib/edge-functions/proxy.mjs +3 -1
- package/src/lib/edge-functions/registry.mjs +36 -107
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.4",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "13.1.
|
|
9
|
+
"version": "13.1.4",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@fastify/static": "^6.6.0",
|
|
14
|
-
"@netlify/build": "^29.6.
|
|
15
|
-
"@netlify/config": "^20.3.
|
|
16
|
-
"@netlify/edge-bundler": "^8.
|
|
14
|
+
"@netlify/build": "^29.6.7",
|
|
15
|
+
"@netlify/config": "^20.3.5",
|
|
16
|
+
"@netlify/edge-bundler": "^8.12.1",
|
|
17
17
|
"@netlify/framework-info": "^9.8.5",
|
|
18
18
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
19
19
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"minimist": "^1.2.5",
|
|
81
81
|
"multiparty": "^4.2.1",
|
|
82
82
|
"netlify": "^13.1.2",
|
|
83
|
-
"netlify-headers-parser": "^7.1.
|
|
83
|
+
"netlify-headers-parser": "^7.1.2",
|
|
84
84
|
"netlify-onegraph-internal": "0.10.1",
|
|
85
|
-
"netlify-redirect-parser": "^14.1.
|
|
85
|
+
"netlify-redirect-parser": "^14.1.2",
|
|
86
86
|
"netlify-redirector": "^0.4.0",
|
|
87
87
|
"node-fetch": "^2.6.0",
|
|
88
88
|
"node-version-alias": "^2.0.0",
|
|
@@ -2049,17 +2049,17 @@
|
|
|
2049
2049
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
2050
2050
|
},
|
|
2051
2051
|
"node_modules/@netlify/build": {
|
|
2052
|
-
"version": "29.6.
|
|
2053
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.6.
|
|
2054
|
-
"integrity": "sha512-
|
|
2052
|
+
"version": "29.6.7",
|
|
2053
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.6.7.tgz",
|
|
2054
|
+
"integrity": "sha512-mkqH5JM0IrpQ+j64qJ+3zlQs3LIb4F/TmTsoZp5sGWq4Ntj2NsHy1IVuTEWqkM0dpbO2q/7DRcLQmbT1qG/2vg==",
|
|
2055
2055
|
"dependencies": {
|
|
2056
2056
|
"@bugsnag/js": "^7.0.0",
|
|
2057
|
-
"@netlify/cache-utils": "^5.1.
|
|
2058
|
-
"@netlify/config": "^20.3.
|
|
2059
|
-
"@netlify/edge-bundler": "8.11.
|
|
2057
|
+
"@netlify/cache-utils": "^5.1.3",
|
|
2058
|
+
"@netlify/config": "^20.3.5",
|
|
2059
|
+
"@netlify/edge-bundler": "8.11.1",
|
|
2060
2060
|
"@netlify/framework-info": "^9.8.5",
|
|
2061
|
-
"@netlify/functions-utils": "^5.2.
|
|
2062
|
-
"@netlify/git-utils": "^5.1.
|
|
2061
|
+
"@netlify/functions-utils": "^5.2.1",
|
|
2062
|
+
"@netlify/git-utils": "^5.1.1",
|
|
2063
2063
|
"@netlify/plugins-list": "^6.66.0",
|
|
2064
2064
|
"@netlify/run-utils": "^5.1.0",
|
|
2065
2065
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
@@ -2115,9 +2115,9 @@
|
|
|
2115
2115
|
}
|
|
2116
2116
|
},
|
|
2117
2117
|
"node_modules/@netlify/build/node_modules/@netlify/edge-bundler": {
|
|
2118
|
-
"version": "8.11.
|
|
2119
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.11.
|
|
2120
|
-
"integrity": "sha512-
|
|
2118
|
+
"version": "8.11.1",
|
|
2119
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.11.1.tgz",
|
|
2120
|
+
"integrity": "sha512-pj3myy714qX0OuPwtRTfBgaQ2fZwj5qkpACyeXtrsVcaHRNnE0l7cymfZ0fS0a/xkINj9fcyTEtZBahDuuLT2g==",
|
|
2121
2121
|
"dependencies": {
|
|
2122
2122
|
"@import-maps/resolve": "^1.0.1",
|
|
2123
2123
|
"ajv": "^8.11.2",
|
|
@@ -2481,9 +2481,9 @@
|
|
|
2481
2481
|
}
|
|
2482
2482
|
},
|
|
2483
2483
|
"node_modules/@netlify/build/node_modules/node-fetch": {
|
|
2484
|
-
"version": "3.3.
|
|
2485
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
2486
|
-
"integrity": "sha512-
|
|
2484
|
+
"version": "3.3.1",
|
|
2485
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
|
|
2486
|
+
"integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
|
|
2487
2487
|
"dependencies": {
|
|
2488
2488
|
"data-uri-to-buffer": "^4.0.0",
|
|
2489
2489
|
"fetch-blob": "^3.1.4",
|
|
@@ -2811,9 +2811,9 @@
|
|
|
2811
2811
|
}
|
|
2812
2812
|
},
|
|
2813
2813
|
"node_modules/@netlify/cache-utils": {
|
|
2814
|
-
"version": "5.1.
|
|
2815
|
-
"resolved": "https://registry.npmjs.org/@netlify/cache-utils/-/cache-utils-5.1.
|
|
2816
|
-
"integrity": "sha512-
|
|
2814
|
+
"version": "5.1.3",
|
|
2815
|
+
"resolved": "https://registry.npmjs.org/@netlify/cache-utils/-/cache-utils-5.1.3.tgz",
|
|
2816
|
+
"integrity": "sha512-G5ToAGVhaK8gtd8MjMKdsBI37bjboKzlfYrgsrclvlcEj8KaM+7l5KBgI8eyJxhB5gYC1dwK3yY+cjLorTXcJQ==",
|
|
2817
2817
|
"dependencies": {
|
|
2818
2818
|
"cpy": "^8.1.0",
|
|
2819
2819
|
"del": "^6.0.0",
|
|
@@ -3189,9 +3189,9 @@
|
|
|
3189
3189
|
}
|
|
3190
3190
|
},
|
|
3191
3191
|
"node_modules/@netlify/config": {
|
|
3192
|
-
"version": "20.3.
|
|
3193
|
-
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.3.
|
|
3194
|
-
"integrity": "sha512-
|
|
3192
|
+
"version": "20.3.5",
|
|
3193
|
+
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.3.5.tgz",
|
|
3194
|
+
"integrity": "sha512-M+4vk0557qAxrdJbeZB+H7wJUspAufa1h3kRTXT5ohfEXAOyIrB3c0gi+7dMQjJTnBVNDVuqsKlz3RUTXOxQvg==",
|
|
3195
3195
|
"dependencies": {
|
|
3196
3196
|
"chalk": "^5.0.0",
|
|
3197
3197
|
"cron-parser": "^4.1.0",
|
|
@@ -3207,8 +3207,8 @@
|
|
|
3207
3207
|
"js-yaml": "^4.0.0",
|
|
3208
3208
|
"map-obj": "^5.0.0",
|
|
3209
3209
|
"netlify": "^13.1.2",
|
|
3210
|
-
"netlify-headers-parser": "^7.1.
|
|
3211
|
-
"netlify-redirect-parser": "^14.1.
|
|
3210
|
+
"netlify-headers-parser": "^7.1.2",
|
|
3211
|
+
"netlify-redirect-parser": "^14.1.2",
|
|
3212
3212
|
"omit.js": "^2.0.2",
|
|
3213
3213
|
"p-locate": "^6.0.0",
|
|
3214
3214
|
"path-type": "^5.0.0",
|
|
@@ -3450,9 +3450,9 @@
|
|
|
3450
3450
|
}
|
|
3451
3451
|
},
|
|
3452
3452
|
"node_modules/@netlify/edge-bundler": {
|
|
3453
|
-
"version": "8.
|
|
3454
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.
|
|
3455
|
-
"integrity": "sha512-
|
|
3453
|
+
"version": "8.12.1",
|
|
3454
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.12.1.tgz",
|
|
3455
|
+
"integrity": "sha512-3L8BoWHZ9R11ID2DqMy3QkLhBrhnvGERaZ76WCt63Vtv3WcEK/91WTSxq3q9n+rMta3oKNEYVnMOOmgZBU3Zdg==",
|
|
3456
3456
|
"dependencies": {
|
|
3457
3457
|
"@import-maps/resolve": "^1.0.1",
|
|
3458
3458
|
"ajv": "^8.11.2",
|
|
@@ -3639,9 +3639,9 @@
|
|
|
3639
3639
|
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
3640
3640
|
},
|
|
3641
3641
|
"node_modules/@netlify/edge-bundler/node_modules/node-fetch": {
|
|
3642
|
-
"version": "3.3.
|
|
3643
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
3644
|
-
"integrity": "sha512-
|
|
3642
|
+
"version": "3.3.1",
|
|
3643
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
|
|
3644
|
+
"integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
|
|
3645
3645
|
"dependencies": {
|
|
3646
3646
|
"data-uri-to-buffer": "^4.0.0",
|
|
3647
3647
|
"fetch-blob": "^3.1.4",
|
|
@@ -4356,9 +4356,9 @@
|
|
|
4356
4356
|
}
|
|
4357
4357
|
},
|
|
4358
4358
|
"node_modules/@netlify/functions-utils": {
|
|
4359
|
-
"version": "5.2.
|
|
4360
|
-
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.
|
|
4361
|
-
"integrity": "sha512-
|
|
4359
|
+
"version": "5.2.1",
|
|
4360
|
+
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.1.tgz",
|
|
4361
|
+
"integrity": "sha512-36MQAgAky5GOdPO0+qxbnSTeJYPvWsaDAOg8zdyAHaDKZkWKoEihNFY9VXCtdN/kW3u9vlDzeDG0wRHLxuzBTg==",
|
|
4362
4362
|
"dependencies": {
|
|
4363
4363
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
4364
4364
|
"cpy": "^8.1.0",
|
|
@@ -4699,9 +4699,9 @@
|
|
|
4699
4699
|
}
|
|
4700
4700
|
},
|
|
4701
4701
|
"node_modules/@netlify/git-utils": {
|
|
4702
|
-
"version": "5.1.
|
|
4703
|
-
"resolved": "https://registry.npmjs.org/@netlify/git-utils/-/git-utils-5.1.
|
|
4704
|
-
"integrity": "sha512
|
|
4702
|
+
"version": "5.1.1",
|
|
4703
|
+
"resolved": "https://registry.npmjs.org/@netlify/git-utils/-/git-utils-5.1.1.tgz",
|
|
4704
|
+
"integrity": "sha512-oyHieuTZH3rKTmg7EKpGEGa28IFxta2oXuVwpPJI/FJAtBje3UE+yko0eDjNufgm3AyGa8G77trUxgBhInAYuw==",
|
|
4705
4705
|
"dependencies": {
|
|
4706
4706
|
"execa": "^6.0.0",
|
|
4707
4707
|
"map-obj": "^5.0.0",
|
|
@@ -9926,9 +9926,9 @@
|
|
|
9926
9926
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="
|
|
9927
9927
|
},
|
|
9928
9928
|
"node_modules/cron-parser": {
|
|
9929
|
-
"version": "4.
|
|
9930
|
-
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.
|
|
9931
|
-
"integrity": "sha512-
|
|
9929
|
+
"version": "4.8.1",
|
|
9930
|
+
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.8.1.tgz",
|
|
9931
|
+
"integrity": "sha512-jbokKWGcyU4gl6jAfX97E1gDpY12DJ1cLJZmoDzaAln/shZ+S3KBFBuA2Q6WeUN4gJf/8klnV1EfvhA2lK5IRQ==",
|
|
9932
9932
|
"dependencies": {
|
|
9933
9933
|
"luxon": "^3.2.1"
|
|
9934
9934
|
},
|
|
@@ -17748,9 +17748,9 @@
|
|
|
17748
17748
|
}
|
|
17749
17749
|
},
|
|
17750
17750
|
"node_modules/netlify-headers-parser": {
|
|
17751
|
-
"version": "7.1.
|
|
17752
|
-
"resolved": "https://registry.npmjs.org/netlify-headers-parser/-/netlify-headers-parser-7.1.
|
|
17753
|
-
"integrity": "sha512-
|
|
17751
|
+
"version": "7.1.2",
|
|
17752
|
+
"resolved": "https://registry.npmjs.org/netlify-headers-parser/-/netlify-headers-parser-7.1.2.tgz",
|
|
17753
|
+
"integrity": "sha512-DfoboA8PrcLXMan3jIVyLsQtKS+nepKDx6WwZKk5EQDMr2AJoBPCtSHTOLuABzkde1UXdOITf3snmcAmzlNLqw==",
|
|
17754
17754
|
"dependencies": {
|
|
17755
17755
|
"escape-string-regexp": "^5.0.0",
|
|
17756
17756
|
"fast-safe-stringify": "^2.0.7",
|
|
@@ -17813,9 +17813,9 @@
|
|
|
17813
17813
|
}
|
|
17814
17814
|
},
|
|
17815
17815
|
"node_modules/netlify-redirect-parser": {
|
|
17816
|
-
"version": "14.1.
|
|
17817
|
-
"resolved": "https://registry.npmjs.org/netlify-redirect-parser/-/netlify-redirect-parser-14.1.
|
|
17818
|
-
"integrity": "sha512-
|
|
17816
|
+
"version": "14.1.2",
|
|
17817
|
+
"resolved": "https://registry.npmjs.org/netlify-redirect-parser/-/netlify-redirect-parser-14.1.2.tgz",
|
|
17818
|
+
"integrity": "sha512-o60UH53BdypS3Z8frk/vQjscwHxRFGAxZJ3XAFCK3mPURnIlQAseiprvnuGphbbaM1zMzWa/Y4wKf0rloz7dyA==",
|
|
17819
17819
|
"dependencies": {
|
|
17820
17820
|
"fast-safe-stringify": "^2.1.1",
|
|
17821
17821
|
"filter-obj": "^3.0.0",
|
|
@@ -25959,17 +25959,17 @@
|
|
|
25959
25959
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
25960
25960
|
},
|
|
25961
25961
|
"@netlify/build": {
|
|
25962
|
-
"version": "29.6.
|
|
25963
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.6.
|
|
25964
|
-
"integrity": "sha512-
|
|
25962
|
+
"version": "29.6.7",
|
|
25963
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.6.7.tgz",
|
|
25964
|
+
"integrity": "sha512-mkqH5JM0IrpQ+j64qJ+3zlQs3LIb4F/TmTsoZp5sGWq4Ntj2NsHy1IVuTEWqkM0dpbO2q/7DRcLQmbT1qG/2vg==",
|
|
25965
25965
|
"requires": {
|
|
25966
25966
|
"@bugsnag/js": "^7.0.0",
|
|
25967
|
-
"@netlify/cache-utils": "^5.1.
|
|
25968
|
-
"@netlify/config": "^20.3.
|
|
25969
|
-
"@netlify/edge-bundler": "8.11.
|
|
25967
|
+
"@netlify/cache-utils": "^5.1.3",
|
|
25968
|
+
"@netlify/config": "^20.3.5",
|
|
25969
|
+
"@netlify/edge-bundler": "8.11.1",
|
|
25970
25970
|
"@netlify/framework-info": "^9.8.5",
|
|
25971
|
-
"@netlify/functions-utils": "^5.2.
|
|
25972
|
-
"@netlify/git-utils": "^5.1.
|
|
25971
|
+
"@netlify/functions-utils": "^5.2.1",
|
|
25972
|
+
"@netlify/git-utils": "^5.1.1",
|
|
25973
25973
|
"@netlify/plugins-list": "^6.66.0",
|
|
25974
25974
|
"@netlify/run-utils": "^5.1.0",
|
|
25975
25975
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
@@ -26019,9 +26019,9 @@
|
|
|
26019
26019
|
},
|
|
26020
26020
|
"dependencies": {
|
|
26021
26021
|
"@netlify/edge-bundler": {
|
|
26022
|
-
"version": "8.11.
|
|
26023
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.11.
|
|
26024
|
-
"integrity": "sha512-
|
|
26022
|
+
"version": "8.11.1",
|
|
26023
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.11.1.tgz",
|
|
26024
|
+
"integrity": "sha512-pj3myy714qX0OuPwtRTfBgaQ2fZwj5qkpACyeXtrsVcaHRNnE0l7cymfZ0fS0a/xkINj9fcyTEtZBahDuuLT2g==",
|
|
26025
26025
|
"requires": {
|
|
26026
26026
|
"@import-maps/resolve": "^1.0.1",
|
|
26027
26027
|
"ajv": "^8.11.2",
|
|
@@ -26258,9 +26258,9 @@
|
|
|
26258
26258
|
"integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg=="
|
|
26259
26259
|
},
|
|
26260
26260
|
"node-fetch": {
|
|
26261
|
-
"version": "3.3.
|
|
26262
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
26263
|
-
"integrity": "sha512-
|
|
26261
|
+
"version": "3.3.1",
|
|
26262
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
|
|
26263
|
+
"integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
|
|
26264
26264
|
"requires": {
|
|
26265
26265
|
"data-uri-to-buffer": "^4.0.0",
|
|
26266
26266
|
"fetch-blob": "^3.1.4",
|
|
@@ -26442,9 +26442,9 @@
|
|
|
26442
26442
|
}
|
|
26443
26443
|
},
|
|
26444
26444
|
"@netlify/cache-utils": {
|
|
26445
|
-
"version": "5.1.
|
|
26446
|
-
"resolved": "https://registry.npmjs.org/@netlify/cache-utils/-/cache-utils-5.1.
|
|
26447
|
-
"integrity": "sha512-
|
|
26445
|
+
"version": "5.1.3",
|
|
26446
|
+
"resolved": "https://registry.npmjs.org/@netlify/cache-utils/-/cache-utils-5.1.3.tgz",
|
|
26447
|
+
"integrity": "sha512-G5ToAGVhaK8gtd8MjMKdsBI37bjboKzlfYrgsrclvlcEj8KaM+7l5KBgI8eyJxhB5gYC1dwK3yY+cjLorTXcJQ==",
|
|
26448
26448
|
"requires": {
|
|
26449
26449
|
"cpy": "^8.1.0",
|
|
26450
26450
|
"del": "^6.0.0",
|
|
@@ -26737,9 +26737,9 @@
|
|
|
26737
26737
|
}
|
|
26738
26738
|
},
|
|
26739
26739
|
"@netlify/config": {
|
|
26740
|
-
"version": "20.3.
|
|
26741
|
-
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.3.
|
|
26742
|
-
"integrity": "sha512-
|
|
26740
|
+
"version": "20.3.5",
|
|
26741
|
+
"resolved": "https://registry.npmjs.org/@netlify/config/-/config-20.3.5.tgz",
|
|
26742
|
+
"integrity": "sha512-M+4vk0557qAxrdJbeZB+H7wJUspAufa1h3kRTXT5ohfEXAOyIrB3c0gi+7dMQjJTnBVNDVuqsKlz3RUTXOxQvg==",
|
|
26743
26743
|
"requires": {
|
|
26744
26744
|
"chalk": "^5.0.0",
|
|
26745
26745
|
"cron-parser": "^4.1.0",
|
|
@@ -26755,8 +26755,8 @@
|
|
|
26755
26755
|
"js-yaml": "^4.0.0",
|
|
26756
26756
|
"map-obj": "^5.0.0",
|
|
26757
26757
|
"netlify": "^13.1.2",
|
|
26758
|
-
"netlify-headers-parser": "^7.1.
|
|
26759
|
-
"netlify-redirect-parser": "^14.1.
|
|
26758
|
+
"netlify-headers-parser": "^7.1.2",
|
|
26759
|
+
"netlify-redirect-parser": "^14.1.2",
|
|
26760
26760
|
"omit.js": "^2.0.2",
|
|
26761
26761
|
"p-locate": "^6.0.0",
|
|
26762
26762
|
"path-type": "^5.0.0",
|
|
@@ -26889,9 +26889,9 @@
|
|
|
26889
26889
|
}
|
|
26890
26890
|
},
|
|
26891
26891
|
"@netlify/edge-bundler": {
|
|
26892
|
-
"version": "8.
|
|
26893
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.
|
|
26894
|
-
"integrity": "sha512-
|
|
26892
|
+
"version": "8.12.1",
|
|
26893
|
+
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.12.1.tgz",
|
|
26894
|
+
"integrity": "sha512-3L8BoWHZ9R11ID2DqMy3QkLhBrhnvGERaZ76WCt63Vtv3WcEK/91WTSxq3q9n+rMta3oKNEYVnMOOmgZBU3Zdg==",
|
|
26895
26895
|
"requires": {
|
|
26896
26896
|
"@import-maps/resolve": "^1.0.1",
|
|
26897
26897
|
"ajv": "^8.11.2",
|
|
@@ -27018,9 +27018,9 @@
|
|
|
27018
27018
|
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
27019
27019
|
},
|
|
27020
27020
|
"node-fetch": {
|
|
27021
|
-
"version": "3.3.
|
|
27022
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
27023
|
-
"integrity": "sha512-
|
|
27021
|
+
"version": "3.3.1",
|
|
27022
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
|
|
27023
|
+
"integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
|
|
27024
27024
|
"requires": {
|
|
27025
27025
|
"data-uri-to-buffer": "^4.0.0",
|
|
27026
27026
|
"fetch-blob": "^3.1.4",
|
|
@@ -27409,9 +27409,9 @@
|
|
|
27409
27409
|
}
|
|
27410
27410
|
},
|
|
27411
27411
|
"@netlify/functions-utils": {
|
|
27412
|
-
"version": "5.2.
|
|
27413
|
-
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.
|
|
27414
|
-
"integrity": "sha512-
|
|
27412
|
+
"version": "5.2.1",
|
|
27413
|
+
"resolved": "https://registry.npmjs.org/@netlify/functions-utils/-/functions-utils-5.2.1.tgz",
|
|
27414
|
+
"integrity": "sha512-36MQAgAky5GOdPO0+qxbnSTeJYPvWsaDAOg8zdyAHaDKZkWKoEihNFY9VXCtdN/kW3u9vlDzeDG0wRHLxuzBTg==",
|
|
27415
27415
|
"requires": {
|
|
27416
27416
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
27417
27417
|
"cpy": "^8.1.0",
|
|
@@ -27679,9 +27679,9 @@
|
|
|
27679
27679
|
}
|
|
27680
27680
|
},
|
|
27681
27681
|
"@netlify/git-utils": {
|
|
27682
|
-
"version": "5.1.
|
|
27683
|
-
"resolved": "https://registry.npmjs.org/@netlify/git-utils/-/git-utils-5.1.
|
|
27684
|
-
"integrity": "sha512
|
|
27682
|
+
"version": "5.1.1",
|
|
27683
|
+
"resolved": "https://registry.npmjs.org/@netlify/git-utils/-/git-utils-5.1.1.tgz",
|
|
27684
|
+
"integrity": "sha512-oyHieuTZH3rKTmg7EKpGEGa28IFxta2oXuVwpPJI/FJAtBje3UE+yko0eDjNufgm3AyGa8G77trUxgBhInAYuw==",
|
|
27685
27685
|
"requires": {
|
|
27686
27686
|
"execa": "^6.0.0",
|
|
27687
27687
|
"map-obj": "^5.0.0",
|
|
@@ -31561,9 +31561,9 @@
|
|
|
31561
31561
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="
|
|
31562
31562
|
},
|
|
31563
31563
|
"cron-parser": {
|
|
31564
|
-
"version": "4.
|
|
31565
|
-
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.
|
|
31566
|
-
"integrity": "sha512-
|
|
31564
|
+
"version": "4.8.1",
|
|
31565
|
+
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.8.1.tgz",
|
|
31566
|
+
"integrity": "sha512-jbokKWGcyU4gl6jAfX97E1gDpY12DJ1cLJZmoDzaAln/shZ+S3KBFBuA2Q6WeUN4gJf/8klnV1EfvhA2lK5IRQ==",
|
|
31567
31567
|
"requires": {
|
|
31568
31568
|
"luxon": "^3.2.1"
|
|
31569
31569
|
}
|
|
@@ -37450,9 +37450,9 @@
|
|
|
37450
37450
|
}
|
|
37451
37451
|
},
|
|
37452
37452
|
"netlify-headers-parser": {
|
|
37453
|
-
"version": "7.1.
|
|
37454
|
-
"resolved": "https://registry.npmjs.org/netlify-headers-parser/-/netlify-headers-parser-7.1.
|
|
37455
|
-
"integrity": "sha512-
|
|
37453
|
+
"version": "7.1.2",
|
|
37454
|
+
"resolved": "https://registry.npmjs.org/netlify-headers-parser/-/netlify-headers-parser-7.1.2.tgz",
|
|
37455
|
+
"integrity": "sha512-DfoboA8PrcLXMan3jIVyLsQtKS+nepKDx6WwZKk5EQDMr2AJoBPCtSHTOLuABzkde1UXdOITf3snmcAmzlNLqw==",
|
|
37456
37456
|
"requires": {
|
|
37457
37457
|
"escape-string-regexp": "^5.0.0",
|
|
37458
37458
|
"fast-safe-stringify": "^2.0.7",
|
|
@@ -37498,9 +37498,9 @@
|
|
|
37498
37498
|
}
|
|
37499
37499
|
},
|
|
37500
37500
|
"netlify-redirect-parser": {
|
|
37501
|
-
"version": "14.1.
|
|
37502
|
-
"resolved": "https://registry.npmjs.org/netlify-redirect-parser/-/netlify-redirect-parser-14.1.
|
|
37503
|
-
"integrity": "sha512-
|
|
37501
|
+
"version": "14.1.2",
|
|
37502
|
+
"resolved": "https://registry.npmjs.org/netlify-redirect-parser/-/netlify-redirect-parser-14.1.2.tgz",
|
|
37503
|
+
"integrity": "sha512-o60UH53BdypS3Z8frk/vQjscwHxRFGAxZJ3XAFCK3mPURnIlQAseiprvnuGphbbaM1zMzWa/Y4wKf0rloz7dyA==",
|
|
37504
37504
|
"requires": {
|
|
37505
37505
|
"fast-safe-stringify": "^2.1.1",
|
|
37506
37506
|
"filter-obj": "^3.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": "13.1.
|
|
4
|
+
"version": "13.1.4",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@fastify/static": "^6.6.0",
|
|
79
|
-
"@netlify/build": "^29.6.
|
|
80
|
-
"@netlify/config": "^20.3.
|
|
81
|
-
"@netlify/edge-bundler": "^8.
|
|
79
|
+
"@netlify/build": "^29.6.7",
|
|
80
|
+
"@netlify/config": "^20.3.5",
|
|
81
|
+
"@netlify/edge-bundler": "^8.12.1",
|
|
82
82
|
"@netlify/framework-info": "^9.8.5",
|
|
83
83
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
84
84
|
"@netlify/zip-it-and-ship-it": "^8.9.0",
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
"minimist": "^1.2.5",
|
|
146
146
|
"multiparty": "^4.2.1",
|
|
147
147
|
"netlify": "^13.1.2",
|
|
148
|
-
"netlify-headers-parser": "^7.1.
|
|
148
|
+
"netlify-headers-parser": "^7.1.2",
|
|
149
149
|
"netlify-onegraph-internal": "0.10.1",
|
|
150
|
-
"netlify-redirect-parser": "^14.1.
|
|
150
|
+
"netlify-redirect-parser": "^14.1.2",
|
|
151
151
|
"netlify-redirector": "^0.4.0",
|
|
152
152
|
"node-fetch": "^2.6.0",
|
|
153
153
|
"node-version-alias": "^2.0.0",
|
|
@@ -164,9 +164,9 @@
|
|
|
164
164
|
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
|
165
165
|
},
|
|
166
166
|
"node_modules/qs": {
|
|
167
|
-
"version": "6.11.
|
|
168
|
-
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.
|
|
169
|
-
"integrity": "sha512-
|
|
167
|
+
"version": "6.11.1",
|
|
168
|
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz",
|
|
169
|
+
"integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==",
|
|
170
170
|
"dependencies": {
|
|
171
171
|
"side-channel": "^1.0.4"
|
|
172
172
|
},
|
|
@@ -296,9 +296,9 @@
|
|
|
296
296
|
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
|
297
297
|
},
|
|
298
298
|
"qs": {
|
|
299
|
-
"version": "6.11.
|
|
300
|
-
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.
|
|
301
|
-
"integrity": "sha512-
|
|
299
|
+
"version": "6.11.1",
|
|
300
|
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz",
|
|
301
|
+
"integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==",
|
|
302
302
|
"requires": {
|
|
303
303
|
"side-channel": "^1.0.4"
|
|
304
304
|
}
|
|
@@ -10,6 +10,7 @@ import { getGeoLocation } from '../geo-location.mjs'
|
|
|
10
10
|
import { getPathInProject } from '../settings.mjs'
|
|
11
11
|
import { startSpinner, stopSpinner } from '../spinner.mjs'
|
|
12
12
|
|
|
13
|
+
import { getBootstrapURL } from './bootstrap.mjs'
|
|
13
14
|
import { DIST_IMPORT_MAP_PATH } from './consts.mjs'
|
|
14
15
|
import headers from './headers.mjs'
|
|
15
16
|
import { getInternalFunctions } from './internal.mjs'
|
|
@@ -108,7 +109,7 @@ export const initializeProxy = async ({
|
|
|
108
109
|
await registry.initialize()
|
|
109
110
|
|
|
110
111
|
const url = new URL(req.url, `http://${LOCAL_HOST}:${mainPort}`)
|
|
111
|
-
const { functionNames, orphanedDeclarations } =
|
|
112
|
+
const { functionNames, orphanedDeclarations } = registry.matchURLPath(url.pathname)
|
|
112
113
|
|
|
113
114
|
// If the request matches a config declaration for an Edge Function without
|
|
114
115
|
// a matching function file, we warn the user.
|
|
@@ -165,6 +166,7 @@ const prepareServer = async ({
|
|
|
165
166
|
const distImportMapPath = getPathInProject([DIST_IMPORT_MAP_PATH])
|
|
166
167
|
const runIsolate = await bundler.serve({
|
|
167
168
|
...getDownloadUpdateFunctions(),
|
|
169
|
+
bootstrapURL: getBootstrapURL(),
|
|
168
170
|
debug: env.NETLIFY_DENO_DEBUG === 'true',
|
|
169
171
|
distImportMapPath,
|
|
170
172
|
formatExportTypeError: (name) =>
|
|
@@ -3,40 +3,9 @@ import { fileURLToPath } from 'url'
|
|
|
3
3
|
|
|
4
4
|
import { NETLIFYDEVERR, NETLIFYDEVLOG, chalk, log, warn, watchDebounced } from '../../utils/command-helpers.mjs'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
* @type {object}
|
|
10
|
-
* @property {string} [cache]
|
|
11
|
-
* @property {string} function
|
|
12
|
-
* @property {string | string[]} [path]
|
|
13
|
-
* @property {string | string[]} [excludedPath]
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @typedef EdgeFunction
|
|
18
|
-
* @type {object}
|
|
19
|
-
* @property {string} name
|
|
20
|
-
* @property {string} path
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @typedef EdgeFunctionDeclarationWithPath
|
|
25
|
-
* @type {object}
|
|
26
|
-
* @property {string} function
|
|
27
|
-
* @property {string} path
|
|
28
|
-
* @property {string=} name
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @typedef EdgeFunctionDeclarationWithPattern
|
|
33
|
-
* @type {object}
|
|
34
|
-
* @property {string} function
|
|
35
|
-
* @property {string} pattern
|
|
36
|
-
* @property {string=} name
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/** @typedef {(EdgeFunctionDeclarationWithPath | EdgeFunctionDeclarationWithPattern)} EdgeFunctionDeclaration */
|
|
6
|
+
/** @typedef {import('@netlify/edge-bundler').Declaration} Declaration */
|
|
7
|
+
/** @typedef {import('@netlify/edge-bundler').EdgeFunction} EdgeFunction */
|
|
8
|
+
/** @typedef {import('@netlify/edge-bundler').FunctionConfig} FunctionConfig */
|
|
40
9
|
/** @typedef {Awaited<ReturnType<typeof import('@netlify/edge-bundler').serve>>} RunIsolate */
|
|
41
10
|
|
|
42
11
|
export class EdgeFunctionsRegistry {
|
|
@@ -48,7 +17,7 @@ export class EdgeFunctionsRegistry {
|
|
|
48
17
|
* @param {string[]} opts.directories
|
|
49
18
|
* @param {Record<string, string>} opts.env
|
|
50
19
|
* @param {() => Promise<object>} opts.getUpdatedConfig
|
|
51
|
-
* @param {
|
|
20
|
+
* @param {Declaration[]} opts.internalFunctions
|
|
52
21
|
* @param {string} opts.projectDir
|
|
53
22
|
* @param {RunIsolate} opts.runIsolate
|
|
54
23
|
*/
|
|
@@ -80,11 +49,6 @@ export class EdgeFunctionsRegistry {
|
|
|
80
49
|
*/
|
|
81
50
|
this.getUpdatedConfig = getUpdatedConfig
|
|
82
51
|
|
|
83
|
-
/**
|
|
84
|
-
* @type {EdgeFunction[]}
|
|
85
|
-
*/
|
|
86
|
-
this.internalFunctions = internalFunctions
|
|
87
|
-
|
|
88
52
|
/**
|
|
89
53
|
* @type {RunIsolate}
|
|
90
54
|
*/
|
|
@@ -96,14 +60,19 @@ export class EdgeFunctionsRegistry {
|
|
|
96
60
|
this.buildError = null
|
|
97
61
|
|
|
98
62
|
/**
|
|
99
|
-
* @type {
|
|
63
|
+
* @type {Declaration[]}
|
|
100
64
|
*/
|
|
101
|
-
this.
|
|
65
|
+
this.declarationsFromDeployConfig = internalFunctions
|
|
102
66
|
|
|
103
67
|
/**
|
|
104
|
-
* @type {
|
|
68
|
+
* @type {Record<string, FunctionConfig>}
|
|
105
69
|
*/
|
|
106
|
-
this.declarationsFromSource =
|
|
70
|
+
this.declarationsFromSource = {}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @type {Declaration[]}
|
|
74
|
+
*/
|
|
75
|
+
this.declarationsFromTOML = EdgeFunctionsRegistry.getDeclarationsFromTOML(config)
|
|
107
76
|
|
|
108
77
|
/**
|
|
109
78
|
* @type {Record<string, string>}
|
|
@@ -152,7 +121,10 @@ export class EdgeFunctionsRegistry {
|
|
|
152
121
|
}
|
|
153
122
|
|
|
154
123
|
this.buildError = null
|
|
155
|
-
this.declarationsFromSource = functions.
|
|
124
|
+
this.declarationsFromSource = functions.reduce(
|
|
125
|
+
(acc, func, index) => ({ ...acc, [func.name]: functionsConfig[index] }),
|
|
126
|
+
{},
|
|
127
|
+
)
|
|
156
128
|
|
|
157
129
|
this.processGraph(graph)
|
|
158
130
|
} catch (error) {
|
|
@@ -169,14 +141,7 @@ export class EdgeFunctionsRegistry {
|
|
|
169
141
|
(existingFunc) => func.name === existingFunc.name && func.path === existingFunc.path,
|
|
170
142
|
)
|
|
171
143
|
|
|
172
|
-
|
|
173
|
-
return
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const hasDeclaration = this.declarationsFromConfig.some((declaration) => declaration.function === func.name)
|
|
177
|
-
|
|
178
|
-
// We only load the function if there's a config declaration for it.
|
|
179
|
-
return hasDeclaration
|
|
144
|
+
return !functionExists
|
|
180
145
|
})
|
|
181
146
|
const deletedFunctions = this.functions.filter((existingFunc) => {
|
|
182
147
|
const functionExists = functionsFound.some(
|
|
@@ -207,14 +172,10 @@ export class EdgeFunctionsRegistry {
|
|
|
207
172
|
}
|
|
208
173
|
}
|
|
209
174
|
|
|
210
|
-
|
|
211
|
-
const { edge_functions:
|
|
212
|
-
|
|
213
|
-
// The order is important, since we want to run user-defined functions
|
|
214
|
-
// before internal functions.
|
|
215
|
-
const declarations = [...userFunctions, ...this.internalFunctions]
|
|
175
|
+
static getDeclarationsFromTOML(config) {
|
|
176
|
+
const { edge_functions: edgeFunctions = [] } = config
|
|
216
177
|
|
|
217
|
-
return
|
|
178
|
+
return edgeFunctions
|
|
218
179
|
}
|
|
219
180
|
|
|
220
181
|
static getEnvironmentVariables(envConfig) {
|
|
@@ -296,10 +257,15 @@ export class EdgeFunctionsRegistry {
|
|
|
296
257
|
/**
|
|
297
258
|
* @param {string} urlPath
|
|
298
259
|
*/
|
|
299
|
-
|
|
300
|
-
const declarations = this.mergeDeclarations(
|
|
260
|
+
matchURLPath(urlPath) {
|
|
261
|
+
const declarations = this.bundler.mergeDeclarations(
|
|
262
|
+
this.declarationsFromTOML,
|
|
263
|
+
this.declarationsFromSource,
|
|
264
|
+
this.declarationsFromDeployConfig,
|
|
265
|
+
)
|
|
301
266
|
const manifest = this.bundler.generateManifest({
|
|
302
267
|
declarations,
|
|
268
|
+
functionConfig: this.declarationsFromSource,
|
|
303
269
|
functions: this.functions,
|
|
304
270
|
})
|
|
305
271
|
const routes = [...manifest.routes, ...manifest.post_cache_routes].map((route) => ({
|
|
@@ -315,7 +281,7 @@ export class EdgeFunctionsRegistry {
|
|
|
315
281
|
return !isExcluded
|
|
316
282
|
})
|
|
317
283
|
.map((route) => route.function)
|
|
318
|
-
const orphanedDeclarations =
|
|
284
|
+
const orphanedDeclarations = this.matchURLPathAgainstOrphanedDeclarations(urlPath)
|
|
319
285
|
|
|
320
286
|
return { functionNames, orphanedDeclarations }
|
|
321
287
|
}
|
|
@@ -326,9 +292,10 @@ export class EdgeFunctionsRegistry {
|
|
|
326
292
|
// a config declaration exists without a matching function file. To do that
|
|
327
293
|
// we compute a list of functions from the declarations (the `path` doesn't
|
|
328
294
|
// really matter).
|
|
329
|
-
const functions = this.
|
|
295
|
+
const functions = this.declarationsFromTOML.map((declaration) => ({ name: declaration.function, path: '' }))
|
|
330
296
|
const manifest = this.bundler.generateManifest({
|
|
331
|
-
declarations: this.
|
|
297
|
+
declarations: this.declarationsFromTOML,
|
|
298
|
+
functionConfig: this.declarationsFromSource,
|
|
332
299
|
functions,
|
|
333
300
|
})
|
|
334
301
|
|
|
@@ -352,46 +319,6 @@ export class EdgeFunctionsRegistry {
|
|
|
352
319
|
return functionNames
|
|
353
320
|
}
|
|
354
321
|
|
|
355
|
-
// Merges declarations coming from the config and from the function sources.
|
|
356
|
-
mergeDeclarations() {
|
|
357
|
-
const declarations = [...this.declarationsFromConfig]
|
|
358
|
-
|
|
359
|
-
this.declarationsFromSource.forEach((declarationFromSource) => {
|
|
360
|
-
const { path: pathOrPaths, ...configProps } = declarationFromSource
|
|
361
|
-
|
|
362
|
-
// Find any declarations in the config for the function.
|
|
363
|
-
const indexes = declarations
|
|
364
|
-
.filter(({ function: func }) => func === declarationFromSource.function)
|
|
365
|
-
.map((_, index) => index)
|
|
366
|
-
|
|
367
|
-
// If the in-source declaration doesn't have a path, add its properties
|
|
368
|
-
// to any existing declarations for the function.
|
|
369
|
-
if (pathOrPaths === undefined) {
|
|
370
|
-
indexes.forEach((index) => {
|
|
371
|
-
declarations[index] = { ...declarations[index], ...configProps }
|
|
372
|
-
})
|
|
373
|
-
} else {
|
|
374
|
-
// The in-source declaration has a path, and those take precedence.
|
|
375
|
-
// Discard any config declarations first.
|
|
376
|
-
indexes.forEach((index) => {
|
|
377
|
-
declarations.splice(index, 1)
|
|
378
|
-
})
|
|
379
|
-
|
|
380
|
-
// The path may be an array or a string, so let's normalize that first.
|
|
381
|
-
const paths = Array.isArray(pathOrPaths) ? pathOrPaths : [pathOrPaths]
|
|
382
|
-
|
|
383
|
-
// Create a new declaration for each path.
|
|
384
|
-
paths.forEach((path) => {
|
|
385
|
-
declarations.push({ ...configProps, path })
|
|
386
|
-
})
|
|
387
|
-
}
|
|
388
|
-
})
|
|
389
|
-
|
|
390
|
-
const filteredDeclarations = declarations.filter((declaration) => 'path' in declaration || 'pattern' in declaration)
|
|
391
|
-
|
|
392
|
-
return filteredDeclarations
|
|
393
|
-
}
|
|
394
|
-
|
|
395
322
|
processGraph(graph) {
|
|
396
323
|
if (!graph) {
|
|
397
324
|
warn('Could not process edge functions dependency graph. Live reload will not be available.')
|
|
@@ -462,7 +389,7 @@ export class EdgeFunctionsRegistry {
|
|
|
462
389
|
onChange: async () => {
|
|
463
390
|
const newConfig = await this.getUpdatedConfig()
|
|
464
391
|
|
|
465
|
-
this.
|
|
392
|
+
this.declarationsFromTOML = EdgeFunctionsRegistry.getDeclarationsFromTOML(newConfig)
|
|
466
393
|
|
|
467
394
|
await this.checkForAddedOrDeletedFunctions()
|
|
468
395
|
},
|
|
@@ -486,6 +413,8 @@ export class EdgeFunctionsRegistry {
|
|
|
486
413
|
}
|
|
487
414
|
|
|
488
415
|
findDisplayName(func) {
|
|
489
|
-
|
|
416
|
+
const declarations = [...this.declarationsFromTOML, ...this.declarationsFromDeployConfig]
|
|
417
|
+
|
|
418
|
+
return declarations.find((declaration) => declaration.function === func)?.name
|
|
490
419
|
}
|
|
491
420
|
}
|