@netlify/config 23.0.4 → 23.0.6

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,4 +1,3 @@
1
- import fetch from 'node-fetch';
2
1
  import { getEnvelope } from '../env/envelope.js';
3
2
  import { throwUserError } from '../error.js';
4
3
  import { EXTENSION_API_BASE_URL, EXTENSION_API_STAGING_BASE_URL, NETLIFY_API_BASE_URL, NETLIFY_API_STAGING_BASE_URL, } from '../integrations.js';
@@ -7,14 +7,71 @@ function getPackageJSON(directory) {
7
7
  return require('./package.json');
8
8
  }
9
9
  export async function handleAutoInstallExtensions({ featureFlags, siteId, accountId, token, cwd, accounts, integrations, offline, testOpts = {}, mode, extensionApiBaseUrl, }) {
10
- if (!featureFlags?.auto_install_required_extensions || !accountId || !siteId || !token || !cwd || offline) {
10
+ if (!featureFlags?.auto_install_required_extensions) {
11
11
  return integrations;
12
12
  }
13
- const account = accounts?.find((account) => account.id === accountId);
14
- if (!account) {
13
+ if (!accountId) {
14
+ console.error("Failed to auto install extension(s): Missing 'accountId'", {
15
+ accountId,
16
+ siteId,
17
+ cwd,
18
+ offline,
19
+ mode,
20
+ });
21
+ return integrations;
22
+ }
23
+ if (!siteId) {
24
+ console.error("Failed to auto install extension(s): Missing 'siteId'", {
25
+ accountId,
26
+ siteId,
27
+ cwd,
28
+ offline,
29
+ mode,
30
+ });
31
+ return integrations;
32
+ }
33
+ if (!token) {
34
+ console.error("Failed to auto install extension(s): Missing 'token'", {
35
+ accountId,
36
+ siteId,
37
+ cwd,
38
+ offline,
39
+ mode,
40
+ });
41
+ return integrations;
42
+ }
43
+ if (!cwd) {
44
+ console.error("Failed to auto install extension(s): Missing 'cwd'", {
45
+ accountId,
46
+ siteId,
47
+ cwd,
48
+ offline,
49
+ mode,
50
+ });
51
+ return integrations;
52
+ }
53
+ if (offline) {
54
+ console.error("Failed to auto install extension(s): Running as 'offline'", {
55
+ accountId,
56
+ siteId,
57
+ cwd,
58
+ offline,
59
+ mode,
60
+ });
15
61
  return integrations;
16
62
  }
17
63
  try {
64
+ const account = accounts?.find((account) => account.id === accountId);
65
+ if (!account) {
66
+ console.error(`Failed to auto install extension(s): Couldn't find 'account' with id '${accountId}'`, {
67
+ accountId,
68
+ siteId,
69
+ cwd,
70
+ offline,
71
+ mode,
72
+ });
73
+ return integrations;
74
+ }
18
75
  const packageJson = getPackageJSON(cwd);
19
76
  if (!packageJson?.dependencies ||
20
77
  typeof packageJson?.dependencies !== 'object' ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "23.0.4",
3
+ "version": "23.0.6",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -75,7 +75,6 @@
75
75
  "is-plain-obj": "^4.0.0",
76
76
  "js-yaml": "^4.0.0",
77
77
  "map-obj": "^5.0.0",
78
- "node-fetch": "^3.3.1",
79
78
  "omit.js": "^2.0.2",
80
79
  "p-locate": "^6.0.0",
81
80
  "path-type": "^6.0.0",
@@ -95,5 +94,5 @@
95
94
  "engines": {
96
95
  "node": ">=18.14.0"
97
96
  },
98
- "gitHead": "8eb0a2d3736eb5b24304fac146ae57ca6ef48a79"
97
+ "gitHead": "93e0ab6ebe274e7af29a979973fac1882f9046ea"
99
98
  }