netlify-cli 13.1.3 → 13.1.5
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
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.5",
|
|
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.5",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@fastify/static": "^6.6.0",
|
|
14
14
|
"@netlify/build": "^29.6.7",
|
|
15
15
|
"@netlify/config": "^20.3.5",
|
|
16
|
-
"@netlify/edge-bundler": "^8.
|
|
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",
|
|
@@ -2114,6 +2114,46 @@
|
|
|
2114
2114
|
"node": "^14.16.0 || >=16.0.0"
|
|
2115
2115
|
}
|
|
2116
2116
|
},
|
|
2117
|
+
"node_modules/@netlify/build/node_modules/@netlify/edge-bundler": {
|
|
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
|
+
"dependencies": {
|
|
2122
|
+
"@import-maps/resolve": "^1.0.1",
|
|
2123
|
+
"ajv": "^8.11.2",
|
|
2124
|
+
"ajv-errors": "^3.0.0",
|
|
2125
|
+
"better-ajv-errors": "^1.2.0",
|
|
2126
|
+
"common-path-prefix": "^3.0.0",
|
|
2127
|
+
"del": "^7.0.0",
|
|
2128
|
+
"env-paths": "^3.0.0",
|
|
2129
|
+
"execa": "^6.0.0",
|
|
2130
|
+
"find-up": "^6.3.0",
|
|
2131
|
+
"get-port": "^6.1.2",
|
|
2132
|
+
"glob-to-regexp": "^0.4.1",
|
|
2133
|
+
"is-path-inside": "^4.0.0",
|
|
2134
|
+
"jsonc-parser": "^3.2.0",
|
|
2135
|
+
"node-fetch": "^3.1.1",
|
|
2136
|
+
"node-stream-zip": "^1.15.0",
|
|
2137
|
+
"p-retry": "^5.1.1",
|
|
2138
|
+
"p-wait-for": "^4.1.0",
|
|
2139
|
+
"path-key": "^4.0.0",
|
|
2140
|
+
"regexp-tree": "^0.1.24",
|
|
2141
|
+
"semver": "^7.3.5",
|
|
2142
|
+
"tmp-promise": "^3.0.3",
|
|
2143
|
+
"uuid": "^9.0.0"
|
|
2144
|
+
},
|
|
2145
|
+
"engines": {
|
|
2146
|
+
"node": "^14.16.0 || >=16.0.0"
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
"node_modules/@netlify/build/node_modules/@netlify/edge-bundler/node_modules/uuid": {
|
|
2150
|
+
"version": "9.0.0",
|
|
2151
|
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
|
2152
|
+
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
|
|
2153
|
+
"bin": {
|
|
2154
|
+
"uuid": "dist/bin/uuid"
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2117
2157
|
"node_modules/@netlify/build/node_modules/@sindresorhus/is": {
|
|
2118
2158
|
"version": "5.3.0",
|
|
2119
2159
|
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
|
|
@@ -2136,6 +2176,29 @@
|
|
|
2136
2176
|
"node": ">=14.16"
|
|
2137
2177
|
}
|
|
2138
2178
|
},
|
|
2179
|
+
"node_modules/@netlify/build/node_modules/ajv": {
|
|
2180
|
+
"version": "8.12.0",
|
|
2181
|
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
|
2182
|
+
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
|
|
2183
|
+
"dependencies": {
|
|
2184
|
+
"fast-deep-equal": "^3.1.1",
|
|
2185
|
+
"json-schema-traverse": "^1.0.0",
|
|
2186
|
+
"require-from-string": "^2.0.2",
|
|
2187
|
+
"uri-js": "^4.2.2"
|
|
2188
|
+
},
|
|
2189
|
+
"funding": {
|
|
2190
|
+
"type": "github",
|
|
2191
|
+
"url": "https://github.com/sponsors/epoberezkin"
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
"node_modules/@netlify/build/node_modules/ajv-errors": {
|
|
2195
|
+
"version": "3.0.0",
|
|
2196
|
+
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz",
|
|
2197
|
+
"integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
|
|
2198
|
+
"peerDependencies": {
|
|
2199
|
+
"ajv": "^8.0.1"
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2139
2202
|
"node_modules/@netlify/build/node_modules/cacheable-lookup": {
|
|
2140
2203
|
"version": "7.0.0",
|
|
2141
2204
|
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
|
|
@@ -2161,11 +2224,43 @@
|
|
|
2161
2224
|
"node": ">=14.16"
|
|
2162
2225
|
}
|
|
2163
2226
|
},
|
|
2227
|
+
"node_modules/@netlify/build/node_modules/del": {
|
|
2228
|
+
"version": "7.0.0",
|
|
2229
|
+
"resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz",
|
|
2230
|
+
"integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==",
|
|
2231
|
+
"dependencies": {
|
|
2232
|
+
"globby": "^13.1.2",
|
|
2233
|
+
"graceful-fs": "^4.2.10",
|
|
2234
|
+
"is-glob": "^4.0.3",
|
|
2235
|
+
"is-path-cwd": "^3.0.0",
|
|
2236
|
+
"is-path-inside": "^4.0.0",
|
|
2237
|
+
"p-map": "^5.5.0",
|
|
2238
|
+
"rimraf": "^3.0.2",
|
|
2239
|
+
"slash": "^4.0.0"
|
|
2240
|
+
},
|
|
2241
|
+
"engines": {
|
|
2242
|
+
"node": ">=14.16"
|
|
2243
|
+
},
|
|
2244
|
+
"funding": {
|
|
2245
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2246
|
+
}
|
|
2247
|
+
},
|
|
2164
2248
|
"node_modules/@netlify/build/node_modules/emoji-regex": {
|
|
2165
2249
|
"version": "9.2.2",
|
|
2166
2250
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
|
2167
2251
|
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
|
2168
2252
|
},
|
|
2253
|
+
"node_modules/@netlify/build/node_modules/env-paths": {
|
|
2254
|
+
"version": "3.0.0",
|
|
2255
|
+
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz",
|
|
2256
|
+
"integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==",
|
|
2257
|
+
"engines": {
|
|
2258
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
2259
|
+
},
|
|
2260
|
+
"funding": {
|
|
2261
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2169
2264
|
"node_modules/@netlify/build/node_modules/escape-string-regexp": {
|
|
2170
2265
|
"version": "5.0.0",
|
|
2171
2266
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
|
@@ -2225,6 +2320,40 @@
|
|
|
2225
2320
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2226
2321
|
}
|
|
2227
2322
|
},
|
|
2323
|
+
"node_modules/@netlify/build/node_modules/get-port": {
|
|
2324
|
+
"version": "6.1.2",
|
|
2325
|
+
"resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz",
|
|
2326
|
+
"integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==",
|
|
2327
|
+
"engines": {
|
|
2328
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
2329
|
+
},
|
|
2330
|
+
"funding": {
|
|
2331
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2332
|
+
}
|
|
2333
|
+
},
|
|
2334
|
+
"node_modules/@netlify/build/node_modules/glob-to-regexp": {
|
|
2335
|
+
"version": "0.4.1",
|
|
2336
|
+
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
|
|
2337
|
+
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
|
|
2338
|
+
},
|
|
2339
|
+
"node_modules/@netlify/build/node_modules/globby": {
|
|
2340
|
+
"version": "13.1.3",
|
|
2341
|
+
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
|
|
2342
|
+
"integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
|
|
2343
|
+
"dependencies": {
|
|
2344
|
+
"dir-glob": "^3.0.1",
|
|
2345
|
+
"fast-glob": "^3.2.11",
|
|
2346
|
+
"ignore": "^5.2.0",
|
|
2347
|
+
"merge2": "^1.4.1",
|
|
2348
|
+
"slash": "^4.0.0"
|
|
2349
|
+
},
|
|
2350
|
+
"engines": {
|
|
2351
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
2352
|
+
},
|
|
2353
|
+
"funding": {
|
|
2354
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2228
2357
|
"node_modules/@netlify/build/node_modules/got": {
|
|
2229
2358
|
"version": "12.6.0",
|
|
2230
2359
|
"resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz",
|
|
@@ -2280,6 +2409,28 @@
|
|
|
2280
2409
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2281
2410
|
}
|
|
2282
2411
|
},
|
|
2412
|
+
"node_modules/@netlify/build/node_modules/is-path-cwd": {
|
|
2413
|
+
"version": "3.0.0",
|
|
2414
|
+
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz",
|
|
2415
|
+
"integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==",
|
|
2416
|
+
"engines": {
|
|
2417
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
2418
|
+
},
|
|
2419
|
+
"funding": {
|
|
2420
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
"node_modules/@netlify/build/node_modules/is-path-inside": {
|
|
2424
|
+
"version": "4.0.0",
|
|
2425
|
+
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz",
|
|
2426
|
+
"integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==",
|
|
2427
|
+
"engines": {
|
|
2428
|
+
"node": ">=12"
|
|
2429
|
+
},
|
|
2430
|
+
"funding": {
|
|
2431
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2283
2434
|
"node_modules/@netlify/build/node_modules/is-stream": {
|
|
2284
2435
|
"version": "3.0.0",
|
|
2285
2436
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
|
@@ -2291,6 +2442,11 @@
|
|
|
2291
2442
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2292
2443
|
}
|
|
2293
2444
|
},
|
|
2445
|
+
"node_modules/@netlify/build/node_modules/json-schema-traverse": {
|
|
2446
|
+
"version": "1.0.0",
|
|
2447
|
+
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
|
2448
|
+
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
2449
|
+
},
|
|
2294
2450
|
"node_modules/@netlify/build/node_modules/lowercase-keys": {
|
|
2295
2451
|
"version": "3.0.0",
|
|
2296
2452
|
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
|
|
@@ -2324,6 +2480,23 @@
|
|
|
2324
2480
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2325
2481
|
}
|
|
2326
2482
|
},
|
|
2483
|
+
"node_modules/@netlify/build/node_modules/node-fetch": {
|
|
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
|
+
"dependencies": {
|
|
2488
|
+
"data-uri-to-buffer": "^4.0.0",
|
|
2489
|
+
"fetch-blob": "^3.1.4",
|
|
2490
|
+
"formdata-polyfill": "^4.0.10"
|
|
2491
|
+
},
|
|
2492
|
+
"engines": {
|
|
2493
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
2494
|
+
},
|
|
2495
|
+
"funding": {
|
|
2496
|
+
"type": "opencollective",
|
|
2497
|
+
"url": "https://opencollective.com/node-fetch"
|
|
2498
|
+
}
|
|
2499
|
+
},
|
|
2327
2500
|
"node_modules/@netlify/build/node_modules/normalize-url": {
|
|
2328
2501
|
"version": "8.0.0",
|
|
2329
2502
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
|
|
@@ -2424,6 +2597,20 @@
|
|
|
2424
2597
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2425
2598
|
}
|
|
2426
2599
|
},
|
|
2600
|
+
"node_modules/@netlify/build/node_modules/p-wait-for": {
|
|
2601
|
+
"version": "4.1.0",
|
|
2602
|
+
"resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-4.1.0.tgz",
|
|
2603
|
+
"integrity": "sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw==",
|
|
2604
|
+
"dependencies": {
|
|
2605
|
+
"p-timeout": "^5.0.0"
|
|
2606
|
+
},
|
|
2607
|
+
"engines": {
|
|
2608
|
+
"node": ">=12"
|
|
2609
|
+
},
|
|
2610
|
+
"funding": {
|
|
2611
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2612
|
+
}
|
|
2613
|
+
},
|
|
2427
2614
|
"node_modules/@netlify/build/node_modules/parse-ms": {
|
|
2428
2615
|
"version": "3.0.0",
|
|
2429
2616
|
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
|
|
@@ -2540,6 +2727,17 @@
|
|
|
2540
2727
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2541
2728
|
}
|
|
2542
2729
|
},
|
|
2730
|
+
"node_modules/@netlify/build/node_modules/slash": {
|
|
2731
|
+
"version": "4.0.0",
|
|
2732
|
+
"resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
|
|
2733
|
+
"integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
|
|
2734
|
+
"engines": {
|
|
2735
|
+
"node": ">=12"
|
|
2736
|
+
},
|
|
2737
|
+
"funding": {
|
|
2738
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2739
|
+
}
|
|
2740
|
+
},
|
|
2543
2741
|
"node_modules/@netlify/build/node_modules/string-width": {
|
|
2544
2742
|
"version": "5.1.2",
|
|
2545
2743
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
|
@@ -3252,9 +3450,9 @@
|
|
|
3252
3450
|
}
|
|
3253
3451
|
},
|
|
3254
3452
|
"node_modules/@netlify/edge-bundler": {
|
|
3255
|
-
"version": "8.
|
|
3256
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.
|
|
3257
|
-
"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==",
|
|
3258
3456
|
"dependencies": {
|
|
3259
3457
|
"@import-maps/resolve": "^1.0.1",
|
|
3260
3458
|
"ajv": "^8.11.2",
|
|
@@ -3441,9 +3639,9 @@
|
|
|
3441
3639
|
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
3442
3640
|
},
|
|
3443
3641
|
"node_modules/@netlify/edge-bundler/node_modules/node-fetch": {
|
|
3444
|
-
"version": "3.3.
|
|
3445
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
3446
|
-
"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==",
|
|
3447
3645
|
"dependencies": {
|
|
3448
3646
|
"data-uri-to-buffer": "^4.0.0",
|
|
3449
3647
|
"fetch-blob": "^3.1.4",
|
|
@@ -25820,6 +26018,42 @@
|
|
|
25820
26018
|
"yargs": "^17.6.0"
|
|
25821
26019
|
},
|
|
25822
26020
|
"dependencies": {
|
|
26021
|
+
"@netlify/edge-bundler": {
|
|
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
|
+
"requires": {
|
|
26026
|
+
"@import-maps/resolve": "^1.0.1",
|
|
26027
|
+
"ajv": "^8.11.2",
|
|
26028
|
+
"ajv-errors": "^3.0.0",
|
|
26029
|
+
"better-ajv-errors": "^1.2.0",
|
|
26030
|
+
"common-path-prefix": "^3.0.0",
|
|
26031
|
+
"del": "^7.0.0",
|
|
26032
|
+
"env-paths": "^3.0.0",
|
|
26033
|
+
"execa": "^6.0.0",
|
|
26034
|
+
"find-up": "^6.3.0",
|
|
26035
|
+
"get-port": "^6.1.2",
|
|
26036
|
+
"glob-to-regexp": "^0.4.1",
|
|
26037
|
+
"is-path-inside": "^4.0.0",
|
|
26038
|
+
"jsonc-parser": "^3.2.0",
|
|
26039
|
+
"node-fetch": "^3.1.1",
|
|
26040
|
+
"node-stream-zip": "^1.15.0",
|
|
26041
|
+
"p-retry": "^5.1.1",
|
|
26042
|
+
"p-wait-for": "^4.1.0",
|
|
26043
|
+
"path-key": "^4.0.0",
|
|
26044
|
+
"regexp-tree": "^0.1.24",
|
|
26045
|
+
"semver": "^7.3.5",
|
|
26046
|
+
"tmp-promise": "^3.0.3",
|
|
26047
|
+
"uuid": "^9.0.0"
|
|
26048
|
+
},
|
|
26049
|
+
"dependencies": {
|
|
26050
|
+
"uuid": {
|
|
26051
|
+
"version": "9.0.0",
|
|
26052
|
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
|
26053
|
+
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg=="
|
|
26054
|
+
}
|
|
26055
|
+
}
|
|
26056
|
+
},
|
|
25823
26057
|
"@sindresorhus/is": {
|
|
25824
26058
|
"version": "5.3.0",
|
|
25825
26059
|
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
|
|
@@ -25833,6 +26067,23 @@
|
|
|
25833
26067
|
"defer-to-connect": "^2.0.1"
|
|
25834
26068
|
}
|
|
25835
26069
|
},
|
|
26070
|
+
"ajv": {
|
|
26071
|
+
"version": "8.12.0",
|
|
26072
|
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
|
26073
|
+
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
|
|
26074
|
+
"requires": {
|
|
26075
|
+
"fast-deep-equal": "^3.1.1",
|
|
26076
|
+
"json-schema-traverse": "^1.0.0",
|
|
26077
|
+
"require-from-string": "^2.0.2",
|
|
26078
|
+
"uri-js": "^4.2.2"
|
|
26079
|
+
}
|
|
26080
|
+
},
|
|
26081
|
+
"ajv-errors": {
|
|
26082
|
+
"version": "3.0.0",
|
|
26083
|
+
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz",
|
|
26084
|
+
"integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
|
|
26085
|
+
"requires": {}
|
|
26086
|
+
},
|
|
25836
26087
|
"cacheable-lookup": {
|
|
25837
26088
|
"version": "7.0.0",
|
|
25838
26089
|
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
|
|
@@ -25852,11 +26103,31 @@
|
|
|
25852
26103
|
"responselike": "^3.0.0"
|
|
25853
26104
|
}
|
|
25854
26105
|
},
|
|
26106
|
+
"del": {
|
|
26107
|
+
"version": "7.0.0",
|
|
26108
|
+
"resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz",
|
|
26109
|
+
"integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==",
|
|
26110
|
+
"requires": {
|
|
26111
|
+
"globby": "^13.1.2",
|
|
26112
|
+
"graceful-fs": "^4.2.10",
|
|
26113
|
+
"is-glob": "^4.0.3",
|
|
26114
|
+
"is-path-cwd": "^3.0.0",
|
|
26115
|
+
"is-path-inside": "^4.0.0",
|
|
26116
|
+
"p-map": "^5.5.0",
|
|
26117
|
+
"rimraf": "^3.0.2",
|
|
26118
|
+
"slash": "^4.0.0"
|
|
26119
|
+
}
|
|
26120
|
+
},
|
|
25855
26121
|
"emoji-regex": {
|
|
25856
26122
|
"version": "9.2.2",
|
|
25857
26123
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
|
25858
26124
|
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
|
25859
26125
|
},
|
|
26126
|
+
"env-paths": {
|
|
26127
|
+
"version": "3.0.0",
|
|
26128
|
+
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz",
|
|
26129
|
+
"integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A=="
|
|
26130
|
+
},
|
|
25860
26131
|
"escape-string-regexp": {
|
|
25861
26132
|
"version": "5.0.0",
|
|
25862
26133
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
|
@@ -25892,6 +26163,28 @@
|
|
|
25892
26163
|
"resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-3.0.0.tgz",
|
|
25893
26164
|
"integrity": "sha512-oQZM+QmVni8MsYzcq9lgTHD/qeLqaG8XaOPOW7dzuSafVxSUlH1+1ZDefj2OD9f2XsmG5lFl2Euc9NI4jgwFWg=="
|
|
25894
26165
|
},
|
|
26166
|
+
"get-port": {
|
|
26167
|
+
"version": "6.1.2",
|
|
26168
|
+
"resolved": "https://registry.npmjs.org/get-port/-/get-port-6.1.2.tgz",
|
|
26169
|
+
"integrity": "sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw=="
|
|
26170
|
+
},
|
|
26171
|
+
"glob-to-regexp": {
|
|
26172
|
+
"version": "0.4.1",
|
|
26173
|
+
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
|
|
26174
|
+
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
|
|
26175
|
+
},
|
|
26176
|
+
"globby": {
|
|
26177
|
+
"version": "13.1.3",
|
|
26178
|
+
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
|
|
26179
|
+
"integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
|
|
26180
|
+
"requires": {
|
|
26181
|
+
"dir-glob": "^3.0.1",
|
|
26182
|
+
"fast-glob": "^3.2.11",
|
|
26183
|
+
"ignore": "^5.2.0",
|
|
26184
|
+
"merge2": "^1.4.1",
|
|
26185
|
+
"slash": "^4.0.0"
|
|
26186
|
+
}
|
|
26187
|
+
},
|
|
25895
26188
|
"got": {
|
|
25896
26189
|
"version": "12.6.0",
|
|
25897
26190
|
"resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz",
|
|
@@ -25929,11 +26222,26 @@
|
|
|
25929
26222
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
|
|
25930
26223
|
"integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="
|
|
25931
26224
|
},
|
|
26225
|
+
"is-path-cwd": {
|
|
26226
|
+
"version": "3.0.0",
|
|
26227
|
+
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz",
|
|
26228
|
+
"integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA=="
|
|
26229
|
+
},
|
|
26230
|
+
"is-path-inside": {
|
|
26231
|
+
"version": "4.0.0",
|
|
26232
|
+
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz",
|
|
26233
|
+
"integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA=="
|
|
26234
|
+
},
|
|
25932
26235
|
"is-stream": {
|
|
25933
26236
|
"version": "3.0.0",
|
|
25934
26237
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
|
25935
26238
|
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA=="
|
|
25936
26239
|
},
|
|
26240
|
+
"json-schema-traverse": {
|
|
26241
|
+
"version": "1.0.0",
|
|
26242
|
+
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
|
26243
|
+
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
26244
|
+
},
|
|
25937
26245
|
"lowercase-keys": {
|
|
25938
26246
|
"version": "3.0.0",
|
|
25939
26247
|
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
|
|
@@ -25949,6 +26257,16 @@
|
|
|
25949
26257
|
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
|
|
25950
26258
|
"integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg=="
|
|
25951
26259
|
},
|
|
26260
|
+
"node-fetch": {
|
|
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
|
+
"requires": {
|
|
26265
|
+
"data-uri-to-buffer": "^4.0.0",
|
|
26266
|
+
"fetch-blob": "^3.1.4",
|
|
26267
|
+
"formdata-polyfill": "^4.0.10"
|
|
26268
|
+
}
|
|
26269
|
+
},
|
|
25952
26270
|
"normalize-url": {
|
|
25953
26271
|
"version": "8.0.0",
|
|
25954
26272
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
|
|
@@ -26004,6 +26322,14 @@
|
|
|
26004
26322
|
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
|
|
26005
26323
|
"integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew=="
|
|
26006
26324
|
},
|
|
26325
|
+
"p-wait-for": {
|
|
26326
|
+
"version": "4.1.0",
|
|
26327
|
+
"resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-4.1.0.tgz",
|
|
26328
|
+
"integrity": "sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw==",
|
|
26329
|
+
"requires": {
|
|
26330
|
+
"p-timeout": "^5.0.0"
|
|
26331
|
+
}
|
|
26332
|
+
},
|
|
26007
26333
|
"parse-ms": {
|
|
26008
26334
|
"version": "3.0.0",
|
|
26009
26335
|
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
|
|
@@ -26069,6 +26395,11 @@
|
|
|
26069
26395
|
"lowercase-keys": "^3.0.0"
|
|
26070
26396
|
}
|
|
26071
26397
|
},
|
|
26398
|
+
"slash": {
|
|
26399
|
+
"version": "4.0.0",
|
|
26400
|
+
"resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
|
|
26401
|
+
"integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew=="
|
|
26402
|
+
},
|
|
26072
26403
|
"string-width": {
|
|
26073
26404
|
"version": "5.1.2",
|
|
26074
26405
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
|
@@ -26558,9 +26889,9 @@
|
|
|
26558
26889
|
}
|
|
26559
26890
|
},
|
|
26560
26891
|
"@netlify/edge-bundler": {
|
|
26561
|
-
"version": "8.
|
|
26562
|
-
"resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.
|
|
26563
|
-
"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==",
|
|
26564
26895
|
"requires": {
|
|
26565
26896
|
"@import-maps/resolve": "^1.0.1",
|
|
26566
26897
|
"ajv": "^8.11.2",
|
|
@@ -26687,9 +27018,9 @@
|
|
|
26687
27018
|
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
|
26688
27019
|
},
|
|
26689
27020
|
"node-fetch": {
|
|
26690
|
-
"version": "3.3.
|
|
26691
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.
|
|
26692
|
-
"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==",
|
|
26693
27024
|
"requires": {
|
|
26694
27025
|
"data-uri-to-buffer": "^4.0.0",
|
|
26695
27026
|
"fetch-blob": "^3.1.4",
|
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.5",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@fastify/static": "^6.6.0",
|
|
79
79
|
"@netlify/build": "^29.6.7",
|
|
80
80
|
"@netlify/config": "^20.3.5",
|
|
81
|
-
"@netlify/edge-bundler": "^8.
|
|
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",
|
|
@@ -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
|
}
|