netlify-cli 16.4.1 → 16.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "16.4.1",
3
+ "version": "16.5.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "16.4.1",
9
+ "version": "16.5.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -15,7 +15,7 @@
15
15
  "@netlify/build": "29.21.1",
16
16
  "@netlify/build-info": "7.8.0",
17
17
  "@netlify/config": "20.9.0",
18
- "@netlify/edge-bundler": "8.19.1",
18
+ "@netlify/edge-bundler": "9.1.0",
19
19
  "@netlify/local-functions-proxy": "1.1.1",
20
20
  "@netlify/serverless-functions-api": "1.7.3",
21
21
  "@netlify/zip-it-and-ship-it": "9.18.1",
@@ -2068,9 +2068,9 @@
2068
2068
  }
2069
2069
  },
2070
2070
  "node_modules/@netlify/edge-bundler": {
2071
- "version": "8.19.1",
2072
- "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.1.tgz",
2073
- "integrity": "sha512-Erj0+dfRFMQjV3R+FX9NtCV35t6qU91rWKtsuawLzS6tAHLvrR8sOmyFxt5Neg4VPjAstYg1ik16lDak2LhQww==",
2071
+ "version": "9.1.0",
2072
+ "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-9.1.0.tgz",
2073
+ "integrity": "sha512-st05JP+QkNbsvlKelM2KL0nceGD3so86fA9oml47AmemSVvqYlGY0iHRdLGgufqpHfrA4QbQY22IGOP9tZxrXg==",
2074
2074
  "dependencies": {
2075
2075
  "@import-maps/resolve": "^1.0.1",
2076
2076
  "ajv": "^8.11.2",
@@ -2078,6 +2078,7 @@
2078
2078
  "better-ajv-errors": "^1.2.0",
2079
2079
  "common-path-prefix": "^3.0.0",
2080
2080
  "env-paths": "^3.0.0",
2081
+ "esbuild": "0.19.2",
2081
2082
  "execa": "^6.0.0",
2082
2083
  "find-up": "^6.3.0",
2083
2084
  "get-port": "^6.1.2",
@@ -2098,6 +2099,336 @@
2098
2099
  "node": "^14.16.0 || >=16.0.0"
2099
2100
  }
2100
2101
  },
2102
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/android-arm": {
2103
+ "version": "0.19.2",
2104
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz",
2105
+ "integrity": "sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q==",
2106
+ "cpu": [
2107
+ "arm"
2108
+ ],
2109
+ "optional": true,
2110
+ "os": [
2111
+ "android"
2112
+ ],
2113
+ "engines": {
2114
+ "node": ">=12"
2115
+ }
2116
+ },
2117
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/android-arm64": {
2118
+ "version": "0.19.2",
2119
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.2.tgz",
2120
+ "integrity": "sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw==",
2121
+ "cpu": [
2122
+ "arm64"
2123
+ ],
2124
+ "optional": true,
2125
+ "os": [
2126
+ "android"
2127
+ ],
2128
+ "engines": {
2129
+ "node": ">=12"
2130
+ }
2131
+ },
2132
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/android-x64": {
2133
+ "version": "0.19.2",
2134
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.2.tgz",
2135
+ "integrity": "sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w==",
2136
+ "cpu": [
2137
+ "x64"
2138
+ ],
2139
+ "optional": true,
2140
+ "os": [
2141
+ "android"
2142
+ ],
2143
+ "engines": {
2144
+ "node": ">=12"
2145
+ }
2146
+ },
2147
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/darwin-arm64": {
2148
+ "version": "0.19.2",
2149
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.2.tgz",
2150
+ "integrity": "sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA==",
2151
+ "cpu": [
2152
+ "arm64"
2153
+ ],
2154
+ "optional": true,
2155
+ "os": [
2156
+ "darwin"
2157
+ ],
2158
+ "engines": {
2159
+ "node": ">=12"
2160
+ }
2161
+ },
2162
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/darwin-x64": {
2163
+ "version": "0.19.2",
2164
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.2.tgz",
2165
+ "integrity": "sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw==",
2166
+ "cpu": [
2167
+ "x64"
2168
+ ],
2169
+ "optional": true,
2170
+ "os": [
2171
+ "darwin"
2172
+ ],
2173
+ "engines": {
2174
+ "node": ">=12"
2175
+ }
2176
+ },
2177
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/freebsd-arm64": {
2178
+ "version": "0.19.2",
2179
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.2.tgz",
2180
+ "integrity": "sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ==",
2181
+ "cpu": [
2182
+ "arm64"
2183
+ ],
2184
+ "optional": true,
2185
+ "os": [
2186
+ "freebsd"
2187
+ ],
2188
+ "engines": {
2189
+ "node": ">=12"
2190
+ }
2191
+ },
2192
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/freebsd-x64": {
2193
+ "version": "0.19.2",
2194
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.2.tgz",
2195
+ "integrity": "sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw==",
2196
+ "cpu": [
2197
+ "x64"
2198
+ ],
2199
+ "optional": true,
2200
+ "os": [
2201
+ "freebsd"
2202
+ ],
2203
+ "engines": {
2204
+ "node": ">=12"
2205
+ }
2206
+ },
2207
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-arm": {
2208
+ "version": "0.19.2",
2209
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.2.tgz",
2210
+ "integrity": "sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg==",
2211
+ "cpu": [
2212
+ "arm"
2213
+ ],
2214
+ "optional": true,
2215
+ "os": [
2216
+ "linux"
2217
+ ],
2218
+ "engines": {
2219
+ "node": ">=12"
2220
+ }
2221
+ },
2222
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-arm64": {
2223
+ "version": "0.19.2",
2224
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.2.tgz",
2225
+ "integrity": "sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg==",
2226
+ "cpu": [
2227
+ "arm64"
2228
+ ],
2229
+ "optional": true,
2230
+ "os": [
2231
+ "linux"
2232
+ ],
2233
+ "engines": {
2234
+ "node": ">=12"
2235
+ }
2236
+ },
2237
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-ia32": {
2238
+ "version": "0.19.2",
2239
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.2.tgz",
2240
+ "integrity": "sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ==",
2241
+ "cpu": [
2242
+ "ia32"
2243
+ ],
2244
+ "optional": true,
2245
+ "os": [
2246
+ "linux"
2247
+ ],
2248
+ "engines": {
2249
+ "node": ">=12"
2250
+ }
2251
+ },
2252
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-loong64": {
2253
+ "version": "0.19.2",
2254
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.2.tgz",
2255
+ "integrity": "sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw==",
2256
+ "cpu": [
2257
+ "loong64"
2258
+ ],
2259
+ "optional": true,
2260
+ "os": [
2261
+ "linux"
2262
+ ],
2263
+ "engines": {
2264
+ "node": ">=12"
2265
+ }
2266
+ },
2267
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-mips64el": {
2268
+ "version": "0.19.2",
2269
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.2.tgz",
2270
+ "integrity": "sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg==",
2271
+ "cpu": [
2272
+ "mips64el"
2273
+ ],
2274
+ "optional": true,
2275
+ "os": [
2276
+ "linux"
2277
+ ],
2278
+ "engines": {
2279
+ "node": ">=12"
2280
+ }
2281
+ },
2282
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-ppc64": {
2283
+ "version": "0.19.2",
2284
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.2.tgz",
2285
+ "integrity": "sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw==",
2286
+ "cpu": [
2287
+ "ppc64"
2288
+ ],
2289
+ "optional": true,
2290
+ "os": [
2291
+ "linux"
2292
+ ],
2293
+ "engines": {
2294
+ "node": ">=12"
2295
+ }
2296
+ },
2297
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-riscv64": {
2298
+ "version": "0.19.2",
2299
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.2.tgz",
2300
+ "integrity": "sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw==",
2301
+ "cpu": [
2302
+ "riscv64"
2303
+ ],
2304
+ "optional": true,
2305
+ "os": [
2306
+ "linux"
2307
+ ],
2308
+ "engines": {
2309
+ "node": ">=12"
2310
+ }
2311
+ },
2312
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-s390x": {
2313
+ "version": "0.19.2",
2314
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.2.tgz",
2315
+ "integrity": "sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g==",
2316
+ "cpu": [
2317
+ "s390x"
2318
+ ],
2319
+ "optional": true,
2320
+ "os": [
2321
+ "linux"
2322
+ ],
2323
+ "engines": {
2324
+ "node": ">=12"
2325
+ }
2326
+ },
2327
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/linux-x64": {
2328
+ "version": "0.19.2",
2329
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.2.tgz",
2330
+ "integrity": "sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ==",
2331
+ "cpu": [
2332
+ "x64"
2333
+ ],
2334
+ "optional": true,
2335
+ "os": [
2336
+ "linux"
2337
+ ],
2338
+ "engines": {
2339
+ "node": ">=12"
2340
+ }
2341
+ },
2342
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/netbsd-x64": {
2343
+ "version": "0.19.2",
2344
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.2.tgz",
2345
+ "integrity": "sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ==",
2346
+ "cpu": [
2347
+ "x64"
2348
+ ],
2349
+ "optional": true,
2350
+ "os": [
2351
+ "netbsd"
2352
+ ],
2353
+ "engines": {
2354
+ "node": ">=12"
2355
+ }
2356
+ },
2357
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/openbsd-x64": {
2358
+ "version": "0.19.2",
2359
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.2.tgz",
2360
+ "integrity": "sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw==",
2361
+ "cpu": [
2362
+ "x64"
2363
+ ],
2364
+ "optional": true,
2365
+ "os": [
2366
+ "openbsd"
2367
+ ],
2368
+ "engines": {
2369
+ "node": ">=12"
2370
+ }
2371
+ },
2372
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/sunos-x64": {
2373
+ "version": "0.19.2",
2374
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.2.tgz",
2375
+ "integrity": "sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw==",
2376
+ "cpu": [
2377
+ "x64"
2378
+ ],
2379
+ "optional": true,
2380
+ "os": [
2381
+ "sunos"
2382
+ ],
2383
+ "engines": {
2384
+ "node": ">=12"
2385
+ }
2386
+ },
2387
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/win32-arm64": {
2388
+ "version": "0.19.2",
2389
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.2.tgz",
2390
+ "integrity": "sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg==",
2391
+ "cpu": [
2392
+ "arm64"
2393
+ ],
2394
+ "optional": true,
2395
+ "os": [
2396
+ "win32"
2397
+ ],
2398
+ "engines": {
2399
+ "node": ">=12"
2400
+ }
2401
+ },
2402
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/win32-ia32": {
2403
+ "version": "0.19.2",
2404
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.2.tgz",
2405
+ "integrity": "sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA==",
2406
+ "cpu": [
2407
+ "ia32"
2408
+ ],
2409
+ "optional": true,
2410
+ "os": [
2411
+ "win32"
2412
+ ],
2413
+ "engines": {
2414
+ "node": ">=12"
2415
+ }
2416
+ },
2417
+ "node_modules/@netlify/edge-bundler/node_modules/@esbuild/win32-x64": {
2418
+ "version": "0.19.2",
2419
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.2.tgz",
2420
+ "integrity": "sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw==",
2421
+ "cpu": [
2422
+ "x64"
2423
+ ],
2424
+ "optional": true,
2425
+ "os": [
2426
+ "win32"
2427
+ ],
2428
+ "engines": {
2429
+ "node": ">=12"
2430
+ }
2431
+ },
2101
2432
  "node_modules/@netlify/edge-bundler/node_modules/ajv": {
2102
2433
  "version": "8.12.0",
2103
2434
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
@@ -2121,6 +2452,42 @@
2121
2452
  "ajv": "^8.0.1"
2122
2453
  }
2123
2454
  },
2455
+ "node_modules/@netlify/edge-bundler/node_modules/esbuild": {
2456
+ "version": "0.19.2",
2457
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz",
2458
+ "integrity": "sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg==",
2459
+ "hasInstallScript": true,
2460
+ "bin": {
2461
+ "esbuild": "bin/esbuild"
2462
+ },
2463
+ "engines": {
2464
+ "node": ">=12"
2465
+ },
2466
+ "optionalDependencies": {
2467
+ "@esbuild/android-arm": "0.19.2",
2468
+ "@esbuild/android-arm64": "0.19.2",
2469
+ "@esbuild/android-x64": "0.19.2",
2470
+ "@esbuild/darwin-arm64": "0.19.2",
2471
+ "@esbuild/darwin-x64": "0.19.2",
2472
+ "@esbuild/freebsd-arm64": "0.19.2",
2473
+ "@esbuild/freebsd-x64": "0.19.2",
2474
+ "@esbuild/linux-arm": "0.19.2",
2475
+ "@esbuild/linux-arm64": "0.19.2",
2476
+ "@esbuild/linux-ia32": "0.19.2",
2477
+ "@esbuild/linux-loong64": "0.19.2",
2478
+ "@esbuild/linux-mips64el": "0.19.2",
2479
+ "@esbuild/linux-ppc64": "0.19.2",
2480
+ "@esbuild/linux-riscv64": "0.19.2",
2481
+ "@esbuild/linux-s390x": "0.19.2",
2482
+ "@esbuild/linux-x64": "0.19.2",
2483
+ "@esbuild/netbsd-x64": "0.19.2",
2484
+ "@esbuild/openbsd-x64": "0.19.2",
2485
+ "@esbuild/sunos-x64": "0.19.2",
2486
+ "@esbuild/win32-arm64": "0.19.2",
2487
+ "@esbuild/win32-ia32": "0.19.2",
2488
+ "@esbuild/win32-x64": "0.19.2"
2489
+ }
2490
+ },
2124
2491
  "node_modules/@netlify/edge-bundler/node_modules/execa": {
2125
2492
  "version": "6.1.0",
2126
2493
  "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz",
@@ -3385,9 +3752,9 @@
3385
3752
  }
3386
3753
  },
3387
3754
  "node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
3388
- "version": "18.0.0",
3389
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
3390
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
3755
+ "version": "18.1.1",
3756
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
3757
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
3391
3758
  },
3392
3759
  "node_modules/@octokit/core/node_modules/@octokit/types": {
3393
3760
  "version": "9.3.2",
@@ -3444,9 +3811,9 @@
3444
3811
  }
3445
3812
  },
3446
3813
  "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
3447
- "version": "18.0.0",
3448
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
3449
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
3814
+ "version": "18.1.1",
3815
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
3816
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
3450
3817
  },
3451
3818
  "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
3452
3819
  "version": "9.3.2",
@@ -3480,9 +3847,9 @@
3480
3847
  }
3481
3848
  },
3482
3849
  "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
3483
- "version": "18.0.0",
3484
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
3485
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
3850
+ "version": "18.1.1",
3851
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
3852
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
3486
3853
  },
3487
3854
  "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
3488
3855
  "version": "9.3.2",
@@ -17217,9 +17584,9 @@
17217
17584
  }
17218
17585
  },
17219
17586
  "@netlify/edge-bundler": {
17220
- "version": "8.19.1",
17221
- "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.19.1.tgz",
17222
- "integrity": "sha512-Erj0+dfRFMQjV3R+FX9NtCV35t6qU91rWKtsuawLzS6tAHLvrR8sOmyFxt5Neg4VPjAstYg1ik16lDak2LhQww==",
17587
+ "version": "9.1.0",
17588
+ "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-9.1.0.tgz",
17589
+ "integrity": "sha512-st05JP+QkNbsvlKelM2KL0nceGD3so86fA9oml47AmemSVvqYlGY0iHRdLGgufqpHfrA4QbQY22IGOP9tZxrXg==",
17223
17590
  "requires": {
17224
17591
  "@import-maps/resolve": "^1.0.1",
17225
17592
  "ajv": "^8.11.2",
@@ -17227,6 +17594,7 @@
17227
17594
  "better-ajv-errors": "^1.2.0",
17228
17595
  "common-path-prefix": "^3.0.0",
17229
17596
  "env-paths": "^3.0.0",
17597
+ "esbuild": "0.19.2",
17230
17598
  "execa": "^6.0.0",
17231
17599
  "find-up": "^6.3.0",
17232
17600
  "get-port": "^6.1.2",
@@ -17244,6 +17612,138 @@
17244
17612
  "uuid": "^9.0.0"
17245
17613
  },
17246
17614
  "dependencies": {
17615
+ "@esbuild/android-arm": {
17616
+ "version": "0.19.2",
17617
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz",
17618
+ "integrity": "sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q==",
17619
+ "optional": true
17620
+ },
17621
+ "@esbuild/android-arm64": {
17622
+ "version": "0.19.2",
17623
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.2.tgz",
17624
+ "integrity": "sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw==",
17625
+ "optional": true
17626
+ },
17627
+ "@esbuild/android-x64": {
17628
+ "version": "0.19.2",
17629
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.2.tgz",
17630
+ "integrity": "sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w==",
17631
+ "optional": true
17632
+ },
17633
+ "@esbuild/darwin-arm64": {
17634
+ "version": "0.19.2",
17635
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.2.tgz",
17636
+ "integrity": "sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA==",
17637
+ "optional": true
17638
+ },
17639
+ "@esbuild/darwin-x64": {
17640
+ "version": "0.19.2",
17641
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.2.tgz",
17642
+ "integrity": "sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw==",
17643
+ "optional": true
17644
+ },
17645
+ "@esbuild/freebsd-arm64": {
17646
+ "version": "0.19.2",
17647
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.2.tgz",
17648
+ "integrity": "sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ==",
17649
+ "optional": true
17650
+ },
17651
+ "@esbuild/freebsd-x64": {
17652
+ "version": "0.19.2",
17653
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.2.tgz",
17654
+ "integrity": "sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw==",
17655
+ "optional": true
17656
+ },
17657
+ "@esbuild/linux-arm": {
17658
+ "version": "0.19.2",
17659
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.2.tgz",
17660
+ "integrity": "sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg==",
17661
+ "optional": true
17662
+ },
17663
+ "@esbuild/linux-arm64": {
17664
+ "version": "0.19.2",
17665
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.2.tgz",
17666
+ "integrity": "sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg==",
17667
+ "optional": true
17668
+ },
17669
+ "@esbuild/linux-ia32": {
17670
+ "version": "0.19.2",
17671
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.2.tgz",
17672
+ "integrity": "sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ==",
17673
+ "optional": true
17674
+ },
17675
+ "@esbuild/linux-loong64": {
17676
+ "version": "0.19.2",
17677
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.2.tgz",
17678
+ "integrity": "sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw==",
17679
+ "optional": true
17680
+ },
17681
+ "@esbuild/linux-mips64el": {
17682
+ "version": "0.19.2",
17683
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.2.tgz",
17684
+ "integrity": "sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg==",
17685
+ "optional": true
17686
+ },
17687
+ "@esbuild/linux-ppc64": {
17688
+ "version": "0.19.2",
17689
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.2.tgz",
17690
+ "integrity": "sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw==",
17691
+ "optional": true
17692
+ },
17693
+ "@esbuild/linux-riscv64": {
17694
+ "version": "0.19.2",
17695
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.2.tgz",
17696
+ "integrity": "sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw==",
17697
+ "optional": true
17698
+ },
17699
+ "@esbuild/linux-s390x": {
17700
+ "version": "0.19.2",
17701
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.2.tgz",
17702
+ "integrity": "sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g==",
17703
+ "optional": true
17704
+ },
17705
+ "@esbuild/linux-x64": {
17706
+ "version": "0.19.2",
17707
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.2.tgz",
17708
+ "integrity": "sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ==",
17709
+ "optional": true
17710
+ },
17711
+ "@esbuild/netbsd-x64": {
17712
+ "version": "0.19.2",
17713
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.2.tgz",
17714
+ "integrity": "sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ==",
17715
+ "optional": true
17716
+ },
17717
+ "@esbuild/openbsd-x64": {
17718
+ "version": "0.19.2",
17719
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.2.tgz",
17720
+ "integrity": "sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw==",
17721
+ "optional": true
17722
+ },
17723
+ "@esbuild/sunos-x64": {
17724
+ "version": "0.19.2",
17725
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.2.tgz",
17726
+ "integrity": "sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw==",
17727
+ "optional": true
17728
+ },
17729
+ "@esbuild/win32-arm64": {
17730
+ "version": "0.19.2",
17731
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.2.tgz",
17732
+ "integrity": "sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg==",
17733
+ "optional": true
17734
+ },
17735
+ "@esbuild/win32-ia32": {
17736
+ "version": "0.19.2",
17737
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.2.tgz",
17738
+ "integrity": "sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA==",
17739
+ "optional": true
17740
+ },
17741
+ "@esbuild/win32-x64": {
17742
+ "version": "0.19.2",
17743
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.2.tgz",
17744
+ "integrity": "sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw==",
17745
+ "optional": true
17746
+ },
17247
17747
  "ajv": {
17248
17748
  "version": "8.12.0",
17249
17749
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
@@ -17261,6 +17761,35 @@
17261
17761
  "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
17262
17762
  "requires": {}
17263
17763
  },
17764
+ "esbuild": {
17765
+ "version": "0.19.2",
17766
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz",
17767
+ "integrity": "sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg==",
17768
+ "requires": {
17769
+ "@esbuild/android-arm": "0.19.2",
17770
+ "@esbuild/android-arm64": "0.19.2",
17771
+ "@esbuild/android-x64": "0.19.2",
17772
+ "@esbuild/darwin-arm64": "0.19.2",
17773
+ "@esbuild/darwin-x64": "0.19.2",
17774
+ "@esbuild/freebsd-arm64": "0.19.2",
17775
+ "@esbuild/freebsd-x64": "0.19.2",
17776
+ "@esbuild/linux-arm": "0.19.2",
17777
+ "@esbuild/linux-arm64": "0.19.2",
17778
+ "@esbuild/linux-ia32": "0.19.2",
17779
+ "@esbuild/linux-loong64": "0.19.2",
17780
+ "@esbuild/linux-mips64el": "0.19.2",
17781
+ "@esbuild/linux-ppc64": "0.19.2",
17782
+ "@esbuild/linux-riscv64": "0.19.2",
17783
+ "@esbuild/linux-s390x": "0.19.2",
17784
+ "@esbuild/linux-x64": "0.19.2",
17785
+ "@esbuild/netbsd-x64": "0.19.2",
17786
+ "@esbuild/openbsd-x64": "0.19.2",
17787
+ "@esbuild/sunos-x64": "0.19.2",
17788
+ "@esbuild/win32-arm64": "0.19.2",
17789
+ "@esbuild/win32-ia32": "0.19.2",
17790
+ "@esbuild/win32-x64": "0.19.2"
17791
+ }
17792
+ },
17264
17793
  "execa": {
17265
17794
  "version": "6.1.0",
17266
17795
  "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz",
@@ -17987,9 +18516,9 @@
17987
18516
  },
17988
18517
  "dependencies": {
17989
18518
  "@octokit/openapi-types": {
17990
- "version": "18.0.0",
17991
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
17992
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
18519
+ "version": "18.1.1",
18520
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
18521
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
17993
18522
  },
17994
18523
  "@octokit/types": {
17995
18524
  "version": "9.3.2",
@@ -18036,9 +18565,9 @@
18036
18565
  },
18037
18566
  "dependencies": {
18038
18567
  "@octokit/openapi-types": {
18039
- "version": "18.0.0",
18040
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
18041
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
18568
+ "version": "18.1.1",
18569
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
18570
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
18042
18571
  },
18043
18572
  "@octokit/types": {
18044
18573
  "version": "9.3.2",
@@ -18066,9 +18595,9 @@
18066
18595
  },
18067
18596
  "dependencies": {
18068
18597
  "@octokit/openapi-types": {
18069
- "version": "18.0.0",
18070
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
18071
- "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
18598
+ "version": "18.1.1",
18599
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
18600
+ "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
18072
18601
  },
18073
18602
  "@octokit/types": {
18074
18603
  "version": "9.3.2",
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.1",
4
+ "version": "16.5.0",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
@@ -47,7 +47,7 @@
47
47
  "@netlify/build": "29.21.1",
48
48
  "@netlify/build-info": "7.8.0",
49
49
  "@netlify/config": "20.9.0",
50
- "@netlify/edge-bundler": "8.19.1",
50
+ "@netlify/edge-bundler": "9.1.0",
51
51
  "@netlify/local-functions-proxy": "1.1.1",
52
52
  "@netlify/serverless-functions-api": "1.7.3",
53
53
  "@netlify/zip-it-and-ship-it": "9.18.1",
@@ -2,8 +2,10 @@
2
2
  import { join } from 'path'
3
3
 
4
4
  import { startFunctionsServer } from '../../lib/functions/server.mjs'
5
+ import { printBanner } from '../../utils/banner.mjs'
5
6
  import { acquirePort, getDotEnvVariables, getSiteInformation, injectEnvVariables } from '../../utils/dev.mjs'
6
7
  import { getFunctionsDir } from '../../utils/functions/index.mjs'
8
+ import { getProxyUrl } from '../../utils/proxy.mjs'
7
9
 
8
10
  const DEFAULT_PORT = 9999
9
11
 
@@ -55,6 +57,9 @@ const functionsServe = async (options, command) => {
55
57
  state,
56
58
  accountId,
57
59
  })
60
+
61
+ const url = getProxyUrl({ port: functionsPort })
62
+ printBanner({ url })
58
63
  }
59
64
 
60
65
  /**
package/src/lib/build.mjs CHANGED
@@ -45,12 +45,22 @@ export const getBuildOptions = ({
45
45
  cwd,
46
46
  featureFlags: {
47
47
  ...edgeFunctionsFeatureFlags,
48
- ...cachedConfig.siteInfo.feature_flags,
48
+ ...getFeatureFlagsFromSiteInfo(cachedConfig.siteInfo),
49
49
  functionsBundlingManifest: true,
50
50
  },
51
51
  edgeFunctionsBootstrapURL: getBootstrapURL(),
52
52
  })
53
53
 
54
+ /**
55
+ * @param {*} siteInfo
56
+ * @returns {Record<string, any>}
57
+ */
58
+ const getFeatureFlagsFromSiteInfo = (siteInfo) => ({
59
+ ...siteInfo.feature_flags,
60
+ // see https://github.com/netlify/pod-dev-foundations/issues/581#issuecomment-1731022753
61
+ zisi_golang_use_al2: siteInfo.featureFlags?.cli_golang_use_al2,
62
+ })
63
+
54
64
  /**
55
65
  * run the build command
56
66
  * @param {BuildConfig} options
@@ -1,5 +1,5 @@
1
1
  import { env } from 'process'
2
2
 
3
- const latestBootstrapURL = 'https://64f73321fdd56900083fa618--edge.netlify.com/bootstrap/index-combined.ts'
3
+ const latestBootstrapURL = 'https://650bfd807b21ed000893e25c--edge.netlify.com/bootstrap/index-combined.ts'
4
4
 
5
5
  export const getBootstrapURL = () => env.NETLIFY_EDGE_BOOTSTRAP || latestBootstrapURL
@@ -1,6 +1,7 @@
1
1
  export const DIST_IMPORT_MAP_PATH = 'edge-functions-import-map.json'
2
2
  export const INTERNAL_EDGE_FUNCTIONS_FOLDER = 'edge-functions'
3
3
  export const EDGE_FUNCTIONS_FOLDER = 'edge-functions-dist'
4
+ export const EDGE_FUNCTIONS_SERVE_FOLDER = 'edge-functions-serve'
4
5
  export const PUBLIC_URL_PATH = '.netlify/internal/edge-functions'
5
6
 
6
7
  // Feature flags related to Edge Functions that should be passed along to
@@ -1,19 +1,20 @@
1
1
  // @ts-check
2
2
  import { Buffer } from 'buffer'
3
- import { join, relative } from 'path'
4
- import { env } from 'process'
3
+ import { rm } from 'fs/promises'
4
+ import { join, relative, resolve } from 'path'
5
5
 
6
6
  // eslint-disable-next-line import/no-namespace
7
7
  import * as bundler from '@netlify/edge-bundler'
8
8
  import getAvailablePort from 'get-port'
9
9
 
10
10
  import { NETLIFYDEVERR, NETLIFYDEVWARN, chalk, error as printError, log } from '../../utils/command-helpers.mjs'
11
+ import { isFeatureFlagEnabled } from '../../utils/feature-flags.mjs'
11
12
  import { getGeoLocation } from '../geo-location.mjs'
12
13
  import { getPathInProject } from '../settings.mjs'
13
14
  import { startSpinner, stopSpinner } from '../spinner.mjs'
14
15
 
15
16
  import { getBootstrapURL } from './bootstrap.mjs'
16
- import { DIST_IMPORT_MAP_PATH } from './consts.mjs'
17
+ import { DIST_IMPORT_MAP_PATH, EDGE_FUNCTIONS_SERVE_FOLDER } from './consts.mjs'
17
18
  import { headers, getFeatureFlagsHeader, getInvocationMetadataHeader } from './headers.mjs'
18
19
  import { getInternalFunctions } from './internal.mjs'
19
20
  import { EdgeFunctionsRegistry } from './registry.mjs'
@@ -108,6 +109,10 @@ export const initializeProxy = async ({
108
109
  } = await getInternalFunctions(projectDir)
109
110
  const userFunctionsPath = config.build.edge_functions
110
111
  const isolatePort = await getAvailablePort()
112
+ const buildFeatureFlags = {
113
+ edge_functions_npm_modules: isFeatureFlagEnabled('edge_functions_npm_modules', siteInfo),
114
+ }
115
+ const runtimeFeatureFlags = ['edge_functions_bootstrap_failure_mode']
111
116
 
112
117
  // Initializes the server, bootstrapping the Deno CLI and downloading it from
113
118
  // the network if needed. We don't want to wait for that to be completed, or
@@ -115,8 +120,10 @@ export const initializeProxy = async ({
115
120
  const server = prepareServer({
116
121
  config,
117
122
  configPath,
123
+ debug,
118
124
  directory: userFunctionsPath,
119
125
  env: configEnv,
126
+ featureFlags: buildFeatureFlags,
120
127
  getUpdatedConfig,
121
128
  importMaps: [importMap].filter(Boolean),
122
129
  inspectSettings,
@@ -168,10 +175,8 @@ export const initializeProxy = async ({
168
175
  return
169
176
  }
170
177
 
171
- const featureFlags = ['edge_functions_bootstrap_failure_mode']
172
-
173
178
  req[headersSymbol] = {
174
- [headers.FeatureFlags]: getFeatureFlagsHeader(featureFlags),
179
+ [headers.FeatureFlags]: getFeatureFlagsHeader(runtimeFeatureFlags),
175
180
  [headers.ForwardedProtocol]: settings.https ? 'https:' : 'http:',
176
181
  [headers.Functions]: functionNames.join(','),
177
182
  [headers.InvocationMetadata]: getInvocationMetadataHeader(invocationMetadata),
@@ -194,8 +199,10 @@ export const isEdgeFunctionsRequest = (req) => req[headersSymbol] !== undefined
194
199
  const prepareServer = async ({
195
200
  config,
196
201
  configPath,
202
+ debug,
197
203
  directory,
198
204
  env: configEnv,
205
+ featureFlags,
199
206
  getUpdatedConfig,
200
207
  importMaps,
201
208
  inspectSettings,
@@ -209,11 +216,17 @@ const prepareServer = async ({
209
216
 
210
217
  try {
211
218
  const distImportMapPath = getPathInProject([DIST_IMPORT_MAP_PATH])
219
+ const servePath = resolve(projectDir, getPathInProject([EDGE_FUNCTIONS_SERVE_FOLDER]))
220
+
221
+ await rm(servePath, { force: true, recursive: true })
222
+
212
223
  const runIsolate = await bundler.serve({
213
224
  ...getDownloadUpdateFunctions(),
225
+ basePath: projectDir,
214
226
  bootstrapURL: getBootstrapURL(),
215
- debug: env.NETLIFY_DENO_DEBUG === 'true',
227
+ debug,
216
228
  distImportMapPath: join(projectDir, distImportMapPath),
229
+ featureFlags,
217
230
  formatExportTypeError: (name) =>
218
231
  `${NETLIFYDEVERR} ${chalk.red('Failed')} to load Edge Function ${chalk.yellow(
219
232
  name,
@@ -223,11 +236,13 @@ const prepareServer = async ({
223
236
  importMapPaths,
224
237
  inspectSettings,
225
238
  port,
239
+ servePath,
226
240
  })
227
241
  const registry = new EdgeFunctionsRegistry({
228
242
  bundler,
229
243
  config,
230
244
  configPath,
245
+ debug,
231
246
  directories: [directory].filter(Boolean),
232
247
  env: configEnv,
233
248
  getUpdatedConfig,
@@ -235,6 +250,7 @@ const prepareServer = async ({
235
250
  internalFunctions,
236
251
  projectDir,
237
252
  runIsolate,
253
+ servePath,
238
254
  })
239
255
 
240
256
  return registry
@@ -1,7 +1,15 @@
1
1
  // @ts-check
2
2
  import { fileURLToPath } from 'url'
3
3
 
4
- import { NETLIFYDEVERR, NETLIFYDEVLOG, chalk, log, warn, watchDebounced } from '../../utils/command-helpers.mjs'
4
+ import {
5
+ NETLIFYDEVERR,
6
+ NETLIFYDEVLOG,
7
+ NETLIFYDEVWARN,
8
+ chalk,
9
+ log,
10
+ warn,
11
+ watchDebounced,
12
+ } from '../../utils/command-helpers.mjs'
5
13
 
6
14
  /** @typedef {import('@netlify/edge-bundler').Declaration} Declaration */
7
15
  /** @typedef {import('@netlify/edge-bundler').EdgeFunction} EdgeFunction */
@@ -17,6 +25,9 @@ export class EdgeFunctionsRegistry {
17
25
  /** @type {string} */
18
26
  #configPath
19
27
 
28
+ /** @type {boolean} */
29
+ #debug
30
+
20
31
  /** @type {string[]} */
21
32
  #directories
22
33
 
@@ -29,6 +40,9 @@ export class EdgeFunctionsRegistry {
29
40
  /** @type {RunIsolate} */
30
41
  #runIsolate
31
42
 
43
+ /** @type {boolean} */
44
+ #hasShownNPMWarning = false
45
+
32
46
  /** @type {Error | null} */
33
47
  #buildError = null
34
48
 
@@ -47,9 +61,6 @@ export class EdgeFunctionsRegistry {
47
61
  /** @type {Record<string, string>} */
48
62
  #env
49
63
 
50
- /** @type {import('chokidar').FSWatcher} */
51
- #configWatcher
52
-
53
64
  /** @type {Map<string, import('chokidar').FSWatcher>} */
54
65
  #directoryWatchers = new Map()
55
66
 
@@ -68,11 +79,15 @@ export class EdgeFunctionsRegistry {
68
79
  /** @type {Promise<void>} */
69
80
  #initialScan
70
81
 
82
+ /** @type {string} */
83
+ #servePath
84
+
71
85
  /**
72
86
  * @param {Object} opts
73
87
  * @param {import('@netlify/edge-bundler')} opts.bundler
74
88
  * @param {object} opts.config
75
89
  * @param {string} opts.configPath
90
+ * @param {boolean} opts.debug
76
91
  * @param {string[]} opts.directories
77
92
  * @param {Record<string, { sources: string[], value: string}>} opts.env
78
93
  * @param {() => Promise<object>} opts.getUpdatedConfig
@@ -80,11 +95,13 @@ export class EdgeFunctionsRegistry {
80
95
  * @param {Declaration[]} opts.internalFunctions
81
96
  * @param {string} opts.projectDir
82
97
  * @param {RunIsolate} opts.runIsolate
98
+ * @param {string} opts.servePath
83
99
  */
84
100
  constructor({
85
101
  bundler,
86
102
  config,
87
103
  configPath,
104
+ debug,
88
105
  directories,
89
106
  env,
90
107
  getUpdatedConfig,
@@ -92,13 +109,16 @@ export class EdgeFunctionsRegistry {
92
109
  internalFunctions,
93
110
  projectDir,
94
111
  runIsolate,
112
+ servePath,
95
113
  }) {
96
114
  this.#bundler = bundler
97
115
  this.#configPath = configPath
116
+ this.#debug = debug
98
117
  this.#directories = directories
99
118
  this.#internalDirectories = internalDirectories
100
119
  this.#getUpdatedConfig = getUpdatedConfig
101
120
  this.#runIsolate = runIsolate
121
+ this.#servePath = servePath
102
122
 
103
123
  this.#declarationsFromDeployConfig = internalFunctions
104
124
  this.#declarationsFromTOML = EdgeFunctionsRegistry.#getDeclarationsFromTOML(config)
@@ -147,10 +167,23 @@ export class EdgeFunctionsRegistry {
147
167
  */
148
168
  async #build() {
149
169
  try {
150
- const { functionsConfig, graph, success } = await this.#runIsolate(this.#functions, this.#env, {
170
+ const {
171
+ features = {},
172
+ functionsConfig,
173
+ graph,
174
+ success,
175
+ } = await this.#runIsolate(this.#functions, this.#env, {
151
176
  getFunctionsConfig: true,
152
177
  })
153
178
 
179
+ if (features.npmModules && !this.#hasShownNPMWarning) {
180
+ log(
181
+ `${NETLIFYDEVWARN} Support for npm modules in edge functions is an experimental feature. To learn more about the current state of this capability or to report a problem, refer to https://ntl.fyi/edge-functions-npm.`,
182
+ )
183
+
184
+ this.#hasShownNPMWarning = true
185
+ }
186
+
154
187
  if (!success) {
155
188
  throw new Error('Build error')
156
189
  }
@@ -256,7 +289,9 @@ export class EdgeFunctionsRegistry {
256
289
  return
257
290
  }
258
291
 
259
- log(`${NETLIFYDEVLOG} ${chalk.magenta('Reloading')} edge functions...`)
292
+ const reason = this.#debug ? ` because ${chalk.underline(path)} has changed` : ''
293
+
294
+ log(`${NETLIFYDEVLOG} ${chalk.magenta('Reloading')} edge functions${reason}...`)
260
295
 
261
296
  try {
262
297
  await this.#build()
@@ -490,7 +525,7 @@ export class EdgeFunctionsRegistry {
490
525
  if (this.#configPath) {
491
526
  // Creating a watcher for the config file. When it changes, we update the
492
527
  // declarations and see if we need to register or unregister any functions.
493
- this.#configWatcher = await watchDebounced(this.#configPath, {
528
+ await watchDebounced(this.#configPath, {
494
529
  onChange: async () => {
495
530
  const newConfig = await this.#getUpdatedConfig()
496
531
 
@@ -513,7 +548,9 @@ export class EdgeFunctionsRegistry {
513
548
  * @returns {Promise<void>}
514
549
  */
515
550
  async #setupWatcherForDirectory(directory) {
551
+ const ignored = [`${this.#servePath}/**`]
516
552
  const watcher = await watchDebounced(directory, {
553
+ ignored,
517
554
  onAdd: () => this.#checkForAddedOrDeletedFunctions(),
518
555
  onChange: (path) => this.#handleFileChange(path),
519
556
  onUnlink: () => this.#checkForAddedOrDeletedFunctions(),
@@ -227,12 +227,17 @@ const DEBOUNCE_WAIT = 100
227
227
  * @param {string | string[]} target
228
228
  * @param {Object} opts
229
229
  * @param {number} [opts.depth]
230
+ * @param {Array<string|RegExp>} [opts.ignored]
230
231
  * @param {() => any} [opts.onAdd]
231
232
  * @param {() => any} [opts.onChange]
232
233
  * @param {() => any} [opts.onUnlink]
233
234
  */
234
- export const watchDebounced = async (target, { depth, onAdd = () => {}, onChange = () => {}, onUnlink = () => {} }) => {
235
- const watcher = chokidar.watch(target, { depth, ignored: /node_modules/, ignoreInitial: true })
235
+ export const watchDebounced = async (
236
+ target,
237
+ { depth, ignored = [], onAdd = () => {}, onChange = () => {}, onUnlink = () => {} },
238
+ ) => {
239
+ const baseIgnores = [/\/(node_modules|.git)\//]
240
+ const watcher = chokidar.watch(target, { depth, ignored: [...baseIgnores, ...ignored], ignoreInitial: true })
236
241
 
237
242
  await once(watcher, 'ready')
238
243
 
@@ -106,24 +106,29 @@ const hashFns = async (
106
106
  statusCb,
107
107
  tmpDir,
108
108
  })
109
- const fileObjs = functionZips.map(({ displayName, generator, invocationMode, path: functionPath, runtime }) => ({
110
- filepath: functionPath,
111
- root: tmpDir,
112
- relname: path.relative(tmpDir, functionPath),
113
- basename: path.basename(functionPath),
114
- extname: path.extname(functionPath),
115
- type: 'file',
116
- assetType: 'function',
117
- normalizedPath: path.basename(functionPath, path.extname(functionPath)),
118
- runtime,
119
- displayName,
120
- generator,
121
- invocationMode,
122
- }))
109
+ const fileObjs = functionZips.map(
110
+ ({ displayName, generator, invocationMode, path: functionPath, runtime, runtimeVersion }) => ({
111
+ filepath: functionPath,
112
+ root: tmpDir,
113
+ relname: path.relative(tmpDir, functionPath),
114
+ basename: path.basename(functionPath),
115
+ extname: path.extname(functionPath),
116
+ type: 'file',
117
+ assetType: 'function',
118
+ normalizedPath: path.basename(functionPath, path.extname(functionPath)),
119
+ runtime: runtimeVersion ?? runtime,
120
+ displayName,
121
+ generator,
122
+ invocationMode,
123
+ }),
124
+ )
123
125
  const fnConfig = functionZips
124
- .filter((func) => Boolean(func.displayName || func.generator))
126
+ .filter((func) => Boolean(func.displayName || func.generator || func.routes))
125
127
  .reduce(
126
- (funcs, curr) => ({ ...funcs, [curr.name]: { display_name: curr.displayName, generator: curr.generator } }),
128
+ (funcs, curr) => ({
129
+ ...funcs,
130
+ [curr.name]: { display_name: curr.displayName, generator: curr.generator, routes: curr.routes },
131
+ }),
127
132
  {},
128
133
  )
129
134
  const functionSchedules = functionZips
@@ -658,7 +658,7 @@ const onRequest = async (
658
658
  }
659
659
 
660
660
  /**
661
- * @param {import('./types.js').ServerSettings} settings
661
+ * @param {Pick<import('./types.js').ServerSettings, "https" | "port">} settings
662
662
  * @returns
663
663
  */
664
664
  export const getProxyUrl = function (settings) {