netlify-cli 9.0.2 → 9.1.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.
package/README.md CHANGED
@@ -159,6 +159,7 @@ Manage netlify functions
159
159
 
160
160
  | Subcommand | description |
161
161
  |:--------------------------- |:-----|
162
+ | [`graph:config:write`](/docs/commands/graph.md#graphconfigwrite) | Write a .graphqlrc.json file to the current directory for use with local tooling (e.g. the graphql extension for vscode) |
162
163
  | [`graph:edit`](/docs/commands/graph.md#graphedit) | Launch the browser to edit your local graph functions from Netlify |
163
164
  | [`graph:handler`](/docs/commands/graph.md#graphhandler) | Generate a handler for a Graph operation given its name. See `graph:operations` for a list of operations. |
164
165
  | [`graph:library`](/docs/commands/graph.md#graphlibrary) | Generate the Graph function library |
package/bin/run CHANGED
@@ -25,5 +25,10 @@ if (require.main === module) {
25
25
  const program = createMainCommand()
26
26
 
27
27
  // eslint-disable-next-line promise/prefer-await-to-then
28
- program.parseAsync(process.argv).catch((error_) => program.onEnd(error_))
28
+ program
29
+ .parseAsync(process.argv)
30
+ .then(() => {
31
+ program.onEnd()
32
+ })
33
+ .catch((error_) => program.onEnd(error_))
29
34
  }
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "9.0.2",
3
+ "version": "9.1.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "9.0.2",
9
+ "version": "9.1.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^26.2.5",
13
+ "@netlify/build": "^26.2.6",
14
14
  "@netlify/config": "^17.0.7",
15
15
  "@netlify/framework-info": "^9.0.0",
16
16
  "@netlify/local-functions-proxy": "^1.1.1",
17
17
  "@netlify/plugin-edge-handlers": "^3.0.6",
18
18
  "@netlify/plugins-list": "^6.9.0",
19
19
  "@netlify/routing-local-proxy": "^0.34.1",
20
- "@netlify/zip-it-and-ship-it": "^5.7.2",
20
+ "@netlify/zip-it-and-ship-it": "^5.7.4",
21
21
  "@octokit/rest": "^18.0.0",
22
22
  "@sindresorhus/slugify": "^1.1.0",
23
23
  "ansi-escapes": "^5.0.0",
@@ -82,7 +82,7 @@
82
82
  "multiparty": "^4.2.1",
83
83
  "netlify": "^11.0.0",
84
84
  "netlify-headers-parser": "^6.0.1",
85
- "netlify-onegraph-internal": "0.0.32",
85
+ "netlify-onegraph-internal": "0.0.37",
86
86
  "netlify-redirect-parser": "^13.0.2",
87
87
  "netlify-redirector": "^0.2.1",
88
88
  "node-fetch": "^2.6.0",
@@ -2342,9 +2342,9 @@
2342
2342
  }
2343
2343
  },
2344
2344
  "node_modules/@netlify/build": {
2345
- "version": "26.2.5",
2346
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.5.tgz",
2347
- "integrity": "sha512-xhXfxVT8aXwIiR262yOtZWltMP1QZhTdC0o5NzjPCbX861j2ksgIJ0GerHIMlje7a5XFt3aBdUe4i7iGpLKFuw==",
2345
+ "version": "26.2.6",
2346
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.6.tgz",
2347
+ "integrity": "sha512-cJkf2uNqhf8F1v7CyAqvzkL0tlt+PBA81vSomjryIxwZjx/LYVUzRH+EY61vFRBtT1foxMi9YuRiR7Nhcb8XWw==",
2348
2348
  "dependencies": {
2349
2349
  "@bugsnag/js": "^7.0.0",
2350
2350
  "@netlify/cache-utils": "^4.0.0",
@@ -2354,7 +2354,7 @@
2354
2354
  "@netlify/plugin-edge-handlers": "^3.0.6",
2355
2355
  "@netlify/plugins-list": "^6.9.0",
2356
2356
  "@netlify/run-utils": "^4.0.0",
2357
- "@netlify/zip-it-and-ship-it": "5.7.2",
2357
+ "@netlify/zip-it-and-ship-it": "5.7.4",
2358
2358
  "@sindresorhus/slugify": "^1.1.0",
2359
2359
  "@types/node": "^16.0.0",
2360
2360
  "ansi-escapes": "^4.3.2",
@@ -2407,6 +2407,299 @@
2407
2407
  "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
2408
2408
  }
2409
2409
  },
2410
+ "node_modules/@netlify/build/node_modules/@babel/parser": {
2411
+ "version": "7.16.8",
2412
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz",
2413
+ "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==",
2414
+ "bin": {
2415
+ "parser": "bin/babel-parser.js"
2416
+ },
2417
+ "engines": {
2418
+ "node": ">=6.0.0"
2419
+ }
2420
+ },
2421
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it": {
2422
+ "version": "5.7.2",
2423
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.2.tgz",
2424
+ "integrity": "sha512-R101cnVDAyWCL3L4pb1+aI9F0KV5k95Q/zvonyhi0ulDRm8OpzJjpMCCdZWuG0K5w5che7ww66YDWguSuS0/Og==",
2425
+ "dependencies": {
2426
+ "@babel/parser": "7.16.8",
2427
+ "@netlify/esbuild": "^0.13.6",
2428
+ "@vercel/nft": "^0.17.0",
2429
+ "archiver": "^5.3.0",
2430
+ "common-path-prefix": "^3.0.0",
2431
+ "cp-file": "^9.0.0",
2432
+ "del": "^6.0.0",
2433
+ "elf-cam": "^0.1.1",
2434
+ "end-of-stream": "^1.4.4",
2435
+ "es-module-lexer": "^0.9.0",
2436
+ "execa": "^5.0.0",
2437
+ "filter-obj": "^2.0.1",
2438
+ "find-up": "^5.0.0",
2439
+ "glob": "^7.1.6",
2440
+ "is-builtin-module": "^3.1.0",
2441
+ "junk": "^3.1.0",
2442
+ "locate-path": "^6.0.0",
2443
+ "merge-options": "^3.0.4",
2444
+ "minimatch": "^3.0.4",
2445
+ "p-map": "^4.0.0",
2446
+ "path-exists": "^4.0.0",
2447
+ "pkg-dir": "^5.0.0",
2448
+ "precinct": "^8.2.0",
2449
+ "read-package-json-fast": "^2.0.2",
2450
+ "require-package-name": "^2.0.1",
2451
+ "resolve": "^2.0.0-next.1",
2452
+ "semver": "^7.0.0",
2453
+ "tmp-promise": "^3.0.2",
2454
+ "toml": "^3.0.0",
2455
+ "typescript": "^4.6.0-beta",
2456
+ "unixify": "^1.0.0",
2457
+ "yargs": "^16.0.0"
2458
+ },
2459
+ "bin": {
2460
+ "zip-it-and-ship-it": "dist/bin.js"
2461
+ },
2462
+ "engines": {
2463
+ "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
2464
+ }
2465
+ },
2466
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/aggregate-error": {
2467
+ "version": "3.1.0",
2468
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
2469
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
2470
+ "dependencies": {
2471
+ "clean-stack": "^2.0.0",
2472
+ "indent-string": "^4.0.0"
2473
+ },
2474
+ "engines": {
2475
+ "node": ">=8"
2476
+ }
2477
+ },
2478
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/clean-stack": {
2479
+ "version": "2.2.0",
2480
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
2481
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
2482
+ "engines": {
2483
+ "node": ">=6"
2484
+ }
2485
+ },
2486
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/execa": {
2487
+ "version": "5.1.1",
2488
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
2489
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
2490
+ "dependencies": {
2491
+ "cross-spawn": "^7.0.3",
2492
+ "get-stream": "^6.0.0",
2493
+ "human-signals": "^2.1.0",
2494
+ "is-stream": "^2.0.0",
2495
+ "merge-stream": "^2.0.0",
2496
+ "npm-run-path": "^4.0.1",
2497
+ "onetime": "^5.1.2",
2498
+ "signal-exit": "^3.0.3",
2499
+ "strip-final-newline": "^2.0.0"
2500
+ },
2501
+ "engines": {
2502
+ "node": ">=10"
2503
+ },
2504
+ "funding": {
2505
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
2506
+ }
2507
+ },
2508
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/filter-obj": {
2509
+ "version": "2.0.2",
2510
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz",
2511
+ "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==",
2512
+ "engines": {
2513
+ "node": ">=8"
2514
+ }
2515
+ },
2516
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/find-up": {
2517
+ "version": "5.0.0",
2518
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
2519
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
2520
+ "dependencies": {
2521
+ "locate-path": "^6.0.0",
2522
+ "path-exists": "^4.0.0"
2523
+ },
2524
+ "engines": {
2525
+ "node": ">=10"
2526
+ },
2527
+ "funding": {
2528
+ "url": "https://github.com/sponsors/sindresorhus"
2529
+ }
2530
+ },
2531
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/human-signals": {
2532
+ "version": "2.1.0",
2533
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
2534
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
2535
+ "engines": {
2536
+ "node": ">=10.17.0"
2537
+ }
2538
+ },
2539
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/is-stream": {
2540
+ "version": "2.0.1",
2541
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
2542
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
2543
+ "engines": {
2544
+ "node": ">=8"
2545
+ },
2546
+ "funding": {
2547
+ "url": "https://github.com/sponsors/sindresorhus"
2548
+ }
2549
+ },
2550
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/locate-path": {
2551
+ "version": "6.0.0",
2552
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
2553
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
2554
+ "dependencies": {
2555
+ "p-locate": "^5.0.0"
2556
+ },
2557
+ "engines": {
2558
+ "node": ">=10"
2559
+ },
2560
+ "funding": {
2561
+ "url": "https://github.com/sponsors/sindresorhus"
2562
+ }
2563
+ },
2564
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/mimic-fn": {
2565
+ "version": "2.1.0",
2566
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
2567
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
2568
+ "engines": {
2569
+ "node": ">=6"
2570
+ }
2571
+ },
2572
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/npm-run-path": {
2573
+ "version": "4.0.1",
2574
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
2575
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
2576
+ "dependencies": {
2577
+ "path-key": "^3.0.0"
2578
+ },
2579
+ "engines": {
2580
+ "node": ">=8"
2581
+ }
2582
+ },
2583
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/onetime": {
2584
+ "version": "5.1.2",
2585
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
2586
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
2587
+ "dependencies": {
2588
+ "mimic-fn": "^2.1.0"
2589
+ },
2590
+ "engines": {
2591
+ "node": ">=6"
2592
+ },
2593
+ "funding": {
2594
+ "url": "https://github.com/sponsors/sindresorhus"
2595
+ }
2596
+ },
2597
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/p-limit": {
2598
+ "version": "3.1.0",
2599
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
2600
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
2601
+ "dependencies": {
2602
+ "yocto-queue": "^0.1.0"
2603
+ },
2604
+ "engines": {
2605
+ "node": ">=10"
2606
+ },
2607
+ "funding": {
2608
+ "url": "https://github.com/sponsors/sindresorhus"
2609
+ }
2610
+ },
2611
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/p-locate": {
2612
+ "version": "5.0.0",
2613
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
2614
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
2615
+ "dependencies": {
2616
+ "p-limit": "^3.0.2"
2617
+ },
2618
+ "engines": {
2619
+ "node": ">=10"
2620
+ },
2621
+ "funding": {
2622
+ "url": "https://github.com/sponsors/sindresorhus"
2623
+ }
2624
+ },
2625
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/p-map": {
2626
+ "version": "4.0.0",
2627
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
2628
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
2629
+ "dependencies": {
2630
+ "aggregate-error": "^3.0.0"
2631
+ },
2632
+ "engines": {
2633
+ "node": ">=10"
2634
+ },
2635
+ "funding": {
2636
+ "url": "https://github.com/sponsors/sindresorhus"
2637
+ }
2638
+ },
2639
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/path-exists": {
2640
+ "version": "4.0.0",
2641
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
2642
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
2643
+ "engines": {
2644
+ "node": ">=8"
2645
+ }
2646
+ },
2647
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/path-key": {
2648
+ "version": "3.1.1",
2649
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
2650
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
2651
+ "engines": {
2652
+ "node": ">=8"
2653
+ }
2654
+ },
2655
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/strip-final-newline": {
2656
+ "version": "2.0.0",
2657
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
2658
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
2659
+ "engines": {
2660
+ "node": ">=6"
2661
+ }
2662
+ },
2663
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/typescript": {
2664
+ "version": "4.6.0-dev.20220208",
2665
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.0-dev.20220208.tgz",
2666
+ "integrity": "sha512-2yfS4UYfkLnpVkjs2IEl7T++ojqdPiV5S/akYv1trTf50TZHmGnyhF5Umo2iLWZEuSDmBCe2K52x5qzBXDi+mQ==",
2667
+ "bin": {
2668
+ "tsc": "bin/tsc",
2669
+ "tsserver": "bin/tsserver"
2670
+ },
2671
+ "engines": {
2672
+ "node": ">=4.2.0"
2673
+ }
2674
+ },
2675
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/yargs": {
2676
+ "version": "16.2.0",
2677
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
2678
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
2679
+ "dependencies": {
2680
+ "cliui": "^7.0.2",
2681
+ "escalade": "^3.1.1",
2682
+ "get-caller-file": "^2.0.5",
2683
+ "require-directory": "^2.1.1",
2684
+ "string-width": "^4.2.0",
2685
+ "y18n": "^5.0.5",
2686
+ "yargs-parser": "^20.2.2"
2687
+ },
2688
+ "engines": {
2689
+ "node": ">=10"
2690
+ }
2691
+ },
2692
+ "node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/node_modules/yocto-queue": {
2693
+ "version": "0.1.0",
2694
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
2695
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
2696
+ "engines": {
2697
+ "node": ">=10"
2698
+ },
2699
+ "funding": {
2700
+ "url": "https://github.com/sponsors/sindresorhus"
2701
+ }
2702
+ },
2410
2703
  "node_modules/@netlify/build/node_modules/@sindresorhus/is": {
2411
2704
  "version": "2.1.1",
2412
2705
  "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
@@ -2843,9 +3136,9 @@
2843
3136
  }
2844
3137
  },
2845
3138
  "node_modules/@netlify/build/node_modules/read-pkg-up/node_modules/type-fest": {
2846
- "version": "2.11.1",
2847
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.1.tgz",
2848
- "integrity": "sha512-fPcV5KLAqFfmhHobtAUwEpbpfYhVF7wSLVgbG/7mIGe/Pete7ky/bPAPRkzbWdrj0/EkswFAAR2feJCgigkUKg==",
3139
+ "version": "2.11.2",
3140
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.2.tgz",
3141
+ "integrity": "sha512-reW2Y2Mpn0QNA/5fvtm5doROLwDPu2zOm5RtY7xQQS05Q7xgC8MOZ3yPNaP9m/s/sNjjFQtHo7VCNqYW2iI+Ig==",
2849
3142
  "engines": {
2850
3143
  "node": ">=12.20"
2851
3144
  },
@@ -2854,9 +3147,9 @@
2854
3147
  }
2855
3148
  },
2856
3149
  "node_modules/@netlify/build/node_modules/read-pkg/node_modules/type-fest": {
2857
- "version": "2.11.1",
2858
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.1.tgz",
2859
- "integrity": "sha512-fPcV5KLAqFfmhHobtAUwEpbpfYhVF7wSLVgbG/7mIGe/Pete7ky/bPAPRkzbWdrj0/EkswFAAR2feJCgigkUKg==",
3150
+ "version": "2.11.2",
3151
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.2.tgz",
3152
+ "integrity": "sha512-reW2Y2Mpn0QNA/5fvtm5doROLwDPu2zOm5RtY7xQQS05Q7xgC8MOZ3yPNaP9m/s/sNjjFQtHo7VCNqYW2iI+Ig==",
2860
3153
  "engines": {
2861
3154
  "node": ">=12.20"
2862
3155
  },
@@ -3803,9 +4096,9 @@
3803
4096
  }
3804
4097
  },
3805
4098
  "node_modules/@netlify/zip-it-and-ship-it": {
3806
- "version": "5.7.2",
3807
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.2.tgz",
3808
- "integrity": "sha512-R101cnVDAyWCL3L4pb1+aI9F0KV5k95Q/zvonyhi0ulDRm8OpzJjpMCCdZWuG0K5w5che7ww66YDWguSuS0/Og==",
4099
+ "version": "5.7.4",
4100
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.4.tgz",
4101
+ "integrity": "sha512-HMPf4pX561H5d59h8Y20Qjzo+5BbFkvpnTSWnzdSjQR85dhT8CVKeX9NdLKoKHG82+M75ErfOCY5Db7VsgKAWA==",
3809
4102
  "dependencies": {
3810
4103
  "@babel/parser": "7.16.8",
3811
4104
  "@netlify/esbuild": "^0.13.6",
@@ -16265,9 +16558,9 @@
16265
16558
  }
16266
16559
  },
16267
16560
  "node_modules/netlify-onegraph-internal": {
16268
- "version": "0.0.32",
16269
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.0.32.tgz",
16270
- "integrity": "sha512-coV53I8OWqsv6pF5+e7nnIh9wbFcitkdbptsRyhuToJvzbJPvf9F0Ym47bsO6kfnj2iXDZEnT44O5i0gaBmcMQ==",
16561
+ "version": "0.0.37",
16562
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.0.37.tgz",
16563
+ "integrity": "sha512-EjcLO4jafn2mKVval6hns7wdqT28c7rHJyOzYTUa5ViU+L4eF6CweA4jjH36rmsFxNJchQBpzR2zl/KY4auOKg==",
16271
16564
  "dependencies": {
16272
16565
  "graphql": "16.0.0",
16273
16566
  "node-fetch": "^2.6.0",
@@ -25021,9 +25314,9 @@
25021
25314
  }
25022
25315
  },
25023
25316
  "@netlify/build": {
25024
- "version": "26.2.5",
25025
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.5.tgz",
25026
- "integrity": "sha512-xhXfxVT8aXwIiR262yOtZWltMP1QZhTdC0o5NzjPCbX861j2ksgIJ0GerHIMlje7a5XFt3aBdUe4i7iGpLKFuw==",
25317
+ "version": "26.2.6",
25318
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-26.2.6.tgz",
25319
+ "integrity": "sha512-cJkf2uNqhf8F1v7CyAqvzkL0tlt+PBA81vSomjryIxwZjx/LYVUzRH+EY61vFRBtT1foxMi9YuRiR7Nhcb8XWw==",
25027
25320
  "requires": {
25028
25321
  "@bugsnag/js": "^7.0.0",
25029
25322
  "@netlify/cache-utils": "^4.0.0",
@@ -25033,7 +25326,7 @@
25033
25326
  "@netlify/plugin-edge-handlers": "^3.0.6",
25034
25327
  "@netlify/plugins-list": "^6.9.0",
25035
25328
  "@netlify/run-utils": "^4.0.0",
25036
- "@netlify/zip-it-and-ship-it": "5.7.2",
25329
+ "@netlify/zip-it-and-ship-it": "5.7.4",
25037
25330
  "@sindresorhus/slugify": "^1.1.0",
25038
25331
  "@types/node": "^16.0.0",
25039
25332
  "ansi-escapes": "^4.3.2",
@@ -25080,6 +25373,198 @@
25080
25373
  "yargs": "^17.3.1"
25081
25374
  },
25082
25375
  "dependencies": {
25376
+ "@babel/parser": {
25377
+ "version": "7.16.8",
25378
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz",
25379
+ "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw=="
25380
+ },
25381
+ "@netlify/zip-it-and-ship-it": {
25382
+ "version": "5.7.2",
25383
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.2.tgz",
25384
+ "integrity": "sha512-R101cnVDAyWCL3L4pb1+aI9F0KV5k95Q/zvonyhi0ulDRm8OpzJjpMCCdZWuG0K5w5che7ww66YDWguSuS0/Og==",
25385
+ "requires": {
25386
+ "@babel/parser": "7.16.8",
25387
+ "@netlify/esbuild": "^0.13.6",
25388
+ "@vercel/nft": "^0.17.0",
25389
+ "archiver": "^5.3.0",
25390
+ "common-path-prefix": "^3.0.0",
25391
+ "cp-file": "^9.0.0",
25392
+ "del": "^6.0.0",
25393
+ "elf-cam": "^0.1.1",
25394
+ "end-of-stream": "^1.4.4",
25395
+ "es-module-lexer": "^0.9.0",
25396
+ "execa": "^5.0.0",
25397
+ "filter-obj": "^2.0.1",
25398
+ "find-up": "^5.0.0",
25399
+ "glob": "^7.1.6",
25400
+ "is-builtin-module": "^3.1.0",
25401
+ "junk": "^3.1.0",
25402
+ "locate-path": "^6.0.0",
25403
+ "merge-options": "^3.0.4",
25404
+ "minimatch": "^3.0.4",
25405
+ "p-map": "^4.0.0",
25406
+ "path-exists": "^4.0.0",
25407
+ "pkg-dir": "^5.0.0",
25408
+ "precinct": "^8.2.0",
25409
+ "read-package-json-fast": "^2.0.2",
25410
+ "require-package-name": "^2.0.1",
25411
+ "resolve": "^2.0.0-next.1",
25412
+ "semver": "^7.0.0",
25413
+ "tmp-promise": "^3.0.2",
25414
+ "toml": "^3.0.0",
25415
+ "typescript": "^4.6.0-beta",
25416
+ "unixify": "^1.0.0",
25417
+ "yargs": "^16.0.0"
25418
+ },
25419
+ "dependencies": {
25420
+ "aggregate-error": {
25421
+ "version": "3.1.0",
25422
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
25423
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
25424
+ "requires": {
25425
+ "clean-stack": "^2.0.0",
25426
+ "indent-string": "^4.0.0"
25427
+ }
25428
+ },
25429
+ "clean-stack": {
25430
+ "version": "2.2.0",
25431
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
25432
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="
25433
+ },
25434
+ "execa": {
25435
+ "version": "5.1.1",
25436
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
25437
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
25438
+ "requires": {
25439
+ "cross-spawn": "^7.0.3",
25440
+ "get-stream": "^6.0.0",
25441
+ "human-signals": "^2.1.0",
25442
+ "is-stream": "^2.0.0",
25443
+ "merge-stream": "^2.0.0",
25444
+ "npm-run-path": "^4.0.1",
25445
+ "onetime": "^5.1.2",
25446
+ "signal-exit": "^3.0.3",
25447
+ "strip-final-newline": "^2.0.0"
25448
+ }
25449
+ },
25450
+ "filter-obj": {
25451
+ "version": "2.0.2",
25452
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz",
25453
+ "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg=="
25454
+ },
25455
+ "find-up": {
25456
+ "version": "5.0.0",
25457
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
25458
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
25459
+ "requires": {
25460
+ "locate-path": "^6.0.0",
25461
+ "path-exists": "^4.0.0"
25462
+ }
25463
+ },
25464
+ "human-signals": {
25465
+ "version": "2.1.0",
25466
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
25467
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
25468
+ },
25469
+ "is-stream": {
25470
+ "version": "2.0.1",
25471
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
25472
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="
25473
+ },
25474
+ "locate-path": {
25475
+ "version": "6.0.0",
25476
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
25477
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
25478
+ "requires": {
25479
+ "p-locate": "^5.0.0"
25480
+ }
25481
+ },
25482
+ "mimic-fn": {
25483
+ "version": "2.1.0",
25484
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
25485
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
25486
+ },
25487
+ "npm-run-path": {
25488
+ "version": "4.0.1",
25489
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
25490
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
25491
+ "requires": {
25492
+ "path-key": "^3.0.0"
25493
+ }
25494
+ },
25495
+ "onetime": {
25496
+ "version": "5.1.2",
25497
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
25498
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
25499
+ "requires": {
25500
+ "mimic-fn": "^2.1.0"
25501
+ }
25502
+ },
25503
+ "p-limit": {
25504
+ "version": "3.1.0",
25505
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
25506
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
25507
+ "requires": {
25508
+ "yocto-queue": "^0.1.0"
25509
+ }
25510
+ },
25511
+ "p-locate": {
25512
+ "version": "5.0.0",
25513
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
25514
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
25515
+ "requires": {
25516
+ "p-limit": "^3.0.2"
25517
+ }
25518
+ },
25519
+ "p-map": {
25520
+ "version": "4.0.0",
25521
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
25522
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
25523
+ "requires": {
25524
+ "aggregate-error": "^3.0.0"
25525
+ }
25526
+ },
25527
+ "path-exists": {
25528
+ "version": "4.0.0",
25529
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
25530
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
25531
+ },
25532
+ "path-key": {
25533
+ "version": "3.1.1",
25534
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
25535
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
25536
+ },
25537
+ "strip-final-newline": {
25538
+ "version": "2.0.0",
25539
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
25540
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="
25541
+ },
25542
+ "typescript": {
25543
+ "version": "4.6.0-dev.20220208",
25544
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.0-dev.20220208.tgz",
25545
+ "integrity": "sha512-2yfS4UYfkLnpVkjs2IEl7T++ojqdPiV5S/akYv1trTf50TZHmGnyhF5Umo2iLWZEuSDmBCe2K52x5qzBXDi+mQ=="
25546
+ },
25547
+ "yargs": {
25548
+ "version": "16.2.0",
25549
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
25550
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
25551
+ "requires": {
25552
+ "cliui": "^7.0.2",
25553
+ "escalade": "^3.1.1",
25554
+ "get-caller-file": "^2.0.5",
25555
+ "require-directory": "^2.1.1",
25556
+ "string-width": "^4.2.0",
25557
+ "y18n": "^5.0.5",
25558
+ "yargs-parser": "^20.2.2"
25559
+ }
25560
+ },
25561
+ "yocto-queue": {
25562
+ "version": "0.1.0",
25563
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
25564
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
25565
+ }
25566
+ }
25567
+ },
25083
25568
  "@sindresorhus/is": {
25084
25569
  "version": "2.1.1",
25085
25570
  "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
@@ -25324,9 +25809,9 @@
25324
25809
  },
25325
25810
  "dependencies": {
25326
25811
  "type-fest": {
25327
- "version": "2.11.1",
25328
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.1.tgz",
25329
- "integrity": "sha512-fPcV5KLAqFfmhHobtAUwEpbpfYhVF7wSLVgbG/7mIGe/Pete7ky/bPAPRkzbWdrj0/EkswFAAR2feJCgigkUKg=="
25812
+ "version": "2.11.2",
25813
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.2.tgz",
25814
+ "integrity": "sha512-reW2Y2Mpn0QNA/5fvtm5doROLwDPu2zOm5RtY7xQQS05Q7xgC8MOZ3yPNaP9m/s/sNjjFQtHo7VCNqYW2iI+Ig=="
25330
25815
  }
25331
25816
  }
25332
25817
  },
@@ -25341,9 +25826,9 @@
25341
25826
  },
25342
25827
  "dependencies": {
25343
25828
  "type-fest": {
25344
- "version": "2.11.1",
25345
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.1.tgz",
25346
- "integrity": "sha512-fPcV5KLAqFfmhHobtAUwEpbpfYhVF7wSLVgbG/7mIGe/Pete7ky/bPAPRkzbWdrj0/EkswFAAR2feJCgigkUKg=="
25829
+ "version": "2.11.2",
25830
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.11.2.tgz",
25831
+ "integrity": "sha512-reW2Y2Mpn0QNA/5fvtm5doROLwDPu2zOm5RtY7xQQS05Q7xgC8MOZ3yPNaP9m/s/sNjjFQtHo7VCNqYW2iI+Ig=="
25347
25832
  }
25348
25833
  }
25349
25834
  },
@@ -25933,9 +26418,9 @@
25933
26418
  }
25934
26419
  },
25935
26420
  "@netlify/zip-it-and-ship-it": {
25936
- "version": "5.7.2",
25937
- "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.2.tgz",
25938
- "integrity": "sha512-R101cnVDAyWCL3L4pb1+aI9F0KV5k95Q/zvonyhi0ulDRm8OpzJjpMCCdZWuG0K5w5che7ww66YDWguSuS0/Og==",
26421
+ "version": "5.7.4",
26422
+ "resolved": "https://registry.npmjs.org/@netlify/zip-it-and-ship-it/-/zip-it-and-ship-it-5.7.4.tgz",
26423
+ "integrity": "sha512-HMPf4pX561H5d59h8Y20Qjzo+5BbFkvpnTSWnzdSjQR85dhT8CVKeX9NdLKoKHG82+M75ErfOCY5Db7VsgKAWA==",
25939
26424
  "requires": {
25940
26425
  "@babel/parser": "7.16.8",
25941
26426
  "@netlify/esbuild": "^0.13.6",
@@ -35476,9 +35961,9 @@
35476
35961
  }
35477
35962
  },
35478
35963
  "netlify-onegraph-internal": {
35479
- "version": "0.0.32",
35480
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.0.32.tgz",
35481
- "integrity": "sha512-coV53I8OWqsv6pF5+e7nnIh9wbFcitkdbptsRyhuToJvzbJPvf9F0Ym47bsO6kfnj2iXDZEnT44O5i0gaBmcMQ==",
35964
+ "version": "0.0.37",
35965
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.0.37.tgz",
35966
+ "integrity": "sha512-EjcLO4jafn2mKVval6hns7wdqT28c7rHJyOzYTUa5ViU+L4eF6CweA4jjH36rmsFxNJchQBpzR2zl/KY4auOKg==",
35482
35967
  "requires": {
35483
35968
  "graphql": "16.0.0",
35484
35969
  "node-fetch": "^2.6.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": "9.0.2",
4
+ "version": "9.1.0",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "Abraham Schilling <AbrahamSchilling@gmail.com> (https://gitlab.com/n4bb12)",
@@ -164,6 +164,7 @@
164
164
  "url": "https://github.com/netlify/cli/issues"
165
165
  },
166
166
  "scripts": {
167
+ "snap": "ava --verbose -u tests/integration/**/*graph*.test.js",
167
168
  "prepare": "husky install node_modules/@netlify/eslint-config-node/.husky/",
168
169
  "start": "node ./bin/run",
169
170
  "test": "run-s format test:dev",
@@ -195,17 +196,17 @@
195
196
  },
196
197
  "config": {
197
198
  "eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,html}\" \"*.{mjs,cjs,js,md,html}\" \".*.{mjs,cjs,js,md,html}\"",
198
- "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!.github/**/*.md\""
199
+ "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!site/package-lock.json\" \"!.github/**/*.md\""
199
200
  },
200
201
  "dependencies": {
201
- "@netlify/build": "^26.2.5",
202
+ "@netlify/build": "^26.2.6",
202
203
  "@netlify/config": "^17.0.7",
203
204
  "@netlify/framework-info": "^9.0.0",
204
205
  "@netlify/local-functions-proxy": "^1.1.1",
205
206
  "@netlify/plugin-edge-handlers": "^3.0.6",
206
207
  "@netlify/plugins-list": "^6.9.0",
207
208
  "@netlify/routing-local-proxy": "^0.34.1",
208
- "@netlify/zip-it-and-ship-it": "^5.7.2",
209
+ "@netlify/zip-it-and-ship-it": "^5.7.4",
209
210
  "@octokit/rest": "^18.0.0",
210
211
  "@sindresorhus/slugify": "^1.1.0",
211
212
  "ansi-escapes": "^5.0.0",
@@ -270,7 +271,7 @@
270
271
  "multiparty": "^4.2.1",
271
272
  "netlify": "^11.0.0",
272
273
  "netlify-headers-parser": "^6.0.1",
273
- "netlify-onegraph-internal": "0.0.32",
274
+ "netlify-onegraph-internal": "0.0.37",
274
275
  "netlify-redirect-parser": "^13.0.2",
275
276
  "netlify-redirector": "^0.2.1",
276
277
  "node-fetch": "^2.6.0",
@@ -300,13 +300,14 @@ class BaseCommand extends Command {
300
300
  const duration = getDuration(startTime)
301
301
  const status = error_ === undefined ? 'success' : 'error'
302
302
 
303
- debug(`${this.name()}:onEnd`)(`Status: ${status}`)
304
- debug(`${this.name()}:onEnd`)(`Duration: ${duration}ms`)
303
+ const command = Array.isArray(this.args) ? this.args[0] : this.name()
304
+
305
+ debug(`${this.name()}:onEnd`)(`Command: ${command}. Status: ${status}. Duration: ${duration}ms`)
305
306
 
306
307
  try {
307
308
  await track('command', {
308
309
  ...payload,
309
- command: this.name(),
310
+ command,
310
311
  duration,
311
312
  status,
312
313
  })
@@ -0,0 +1,55 @@
1
+ // @ts-check
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+
5
+ const { getNetlifyGraphConfig } = require('../../lib/one-graph/cli-netlify-graph')
6
+ const { NETLIFYDEVERR, chalk, error } = require('../../utils')
7
+
8
+ /**
9
+ * Creates the `netlify graph:config:write` command
10
+ * @param {import('commander').OptionValues} options
11
+ * @param {import('../base-command').BaseCommand} command
12
+ * @returns
13
+ */
14
+ const graphConfigWrite = async (options, command) => {
15
+ const { site } = command.netlify
16
+
17
+ if (!site.id) {
18
+ error(
19
+ `${NETLIFYDEVERR} Warning: no siteId defined, unable to start Netlify Graph. To enable, run ${chalk.yellow(
20
+ 'netlify init',
21
+ )} or ${chalk.yellow('netlify link')}`,
22
+ )
23
+ }
24
+
25
+ const netlifyGraphConfig = await getNetlifyGraphConfig({ command, options })
26
+
27
+ const schemaPath = netlifyGraphConfig.graphQLSchemaFilename.join('/')
28
+
29
+ // Support tools that looks for the schema under different keys
30
+ const graphQLConfig = {
31
+ schema: [schemaPath],
32
+ schemaPath: [schemaPath],
33
+ }
34
+
35
+ const filePath = path.resolve(...netlifyGraphConfig.graphQLConfigJsonFilename)
36
+
37
+ fs.writeFileSync(filePath, JSON.stringify(graphQLConfig, null, 2))
38
+ }
39
+
40
+ /**
41
+ * Creates the `netlify graph:config:write` command
42
+ * @param {import('../base-command').BaseCommand} program
43
+ * @returns
44
+ */
45
+ const createGraphConfigWriteCommand = (program) =>
46
+ program
47
+ .command('graph:config:write')
48
+ .description(
49
+ 'Write a .graphqlrc.json file to the current directory for use with local tooling (e.g. the graphql extension for vscode)',
50
+ )
51
+ .action(async (options, command) => {
52
+ await graphConfigWrite(options, command)
53
+ })
54
+
55
+ module.exports = { createGraphConfigWriteCommand }
@@ -1,4 +1,5 @@
1
1
  // @ts-check
2
+ const { createGraphConfigWriteCommand } = require('./graph-config-write')
2
3
  const { createGraphEditCommand } = require('./graph-edit')
3
4
  const { createGraphHandlerCommand } = require('./graph-handler')
4
5
  const { createGraphLibraryCommand } = require('./graph-library')
@@ -20,6 +21,7 @@ const graph = (options, command) => {
20
21
  * @returns
21
22
  */
22
23
  const createGraphCommand = (program) => {
24
+ createGraphConfigWriteCommand(program)
23
25
  createGraphEditCommand(program)
24
26
  createGraphHandlerCommand(program)
25
27
  createGraphLibraryCommand(program)
@@ -38,6 +38,8 @@ const shouldBase64Encode = function (contentType) {
38
38
  return true
39
39
  }
40
40
 
41
+ const [contentTypeSegment] = contentType.split(';')
42
+ contentType = contentTypeSegment
41
43
  contentType = contentType.toLowerCase()
42
44
 
43
45
  if (contentType.startsWith('text/')) {
@@ -16,6 +16,7 @@ const { watchDebounced } = require('../functions/watcher')
16
16
  const {
17
17
  generateFunctionsFile,
18
18
  generateHandlerByOperationId,
19
+ normalizeOperationsDoc,
19
20
  readGraphQLOperationsSourceFile,
20
21
  writeGraphQLOperationsSourceFile,
21
22
  writeGraphQLSchemaFile,
@@ -231,7 +232,8 @@ const updateGraphQLOperationsFileFromPersistedDoc = async (input) => {
231
232
  return
232
233
  }
233
234
 
234
- const doc = persistedDoc.query
235
+ // Sorts the operations stably, prepends the @netlify directive, etc.
236
+ const doc = normalizeOperationsDoc(persistedDoc.query)
235
237
 
236
238
  writeGraphQLOperationsSourceFile(netlifyGraphConfig, doc)
237
239
  regenerateFunctionsFileFromOperationsFile({ netlifyGraphConfig, schema })
@@ -3,7 +3,7 @@ const fs = require('fs')
3
3
  const path = require('path')
4
4
  const process = require('process')
5
5
 
6
- const { GraphQL, InternalConsole, NetlifyGraph } = require('netlify-onegraph-internal')
6
+ const { GraphQL, GraphQLHelpers, InternalConsole, NetlifyGraph } = require('netlify-onegraph-internal')
7
7
 
8
8
  const { detectServerSettings, error, execa, getFunctionsDir, log, warn } = require('../../utils')
9
9
 
@@ -202,6 +202,10 @@ const getNetlifyGraphConfig = async ({ command, options, settings }) => {
202
202
  (userSpecifiedConfig.graphQLOperationsSourceFilename &&
203
203
  userSpecifiedConfig.graphQLOperationsSourceFilename.split(path.sep)) ||
204
204
  defaultFrameworkConfig.graphQLOperationsSourceFilename
205
+ const graphQLConfigJsonFilename =
206
+ (userSpecifiedConfig.graphQLConfigJsonFilename && userSpecifiedConfig.graphQLConfigJsonFilename.split(path.sep)) ||
207
+ defaultFrameworkConfig.graphQLConfigJsonFilename ||
208
+ baseConfig.graphQLConfigJsonFilename
205
209
  const graphQLSchemaFilename =
206
210
  (userSpecifiedConfig.graphQLSchemaFilename && userSpecifiedConfig.graphQLSchemaFilename.split(path.sep)) ||
207
211
  defaultFrameworkConfig.graphQLSchemaFilename
@@ -229,6 +233,7 @@ const getNetlifyGraphConfig = async ({ command, options, settings }) => {
229
233
  netlifyGraphTypeDefinitionsFilename,
230
234
  graphQLOperationsSourceFilename,
231
235
  graphQLSchemaFilename,
236
+ graphQLConfigJsonFilename,
232
237
  netlifyGraphRequirePath,
233
238
  framework,
234
239
  language,
@@ -505,6 +510,7 @@ module.exports = {
505
510
  getGraphEditUrlBySiteId,
506
511
  getGraphEditUrlBySiteName,
507
512
  getNetlifyGraphConfig,
513
+ normalizeOperationsDoc: GraphQLHelpers.normalizeOperationsDoc,
508
514
  parse,
509
515
  readGraphQLOperationsSourceFile,
510
516
  readGraphQLSchemaFile,