@netlify/config 20.6.2 → 20.6.3

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.
@@ -11,11 +11,16 @@ import { ERROR_CALL_TO_ACTION } from '../log/messages.js';
11
11
  // but local builds should still work regardless.
12
12
  export const getSiteInfo = async function ({ api, siteId, mode, siteFeatureFlagPrefix, featureFlags = {}, testOpts = {}, }) {
13
13
  const { env: testEnv = true } = testOpts;
14
+ const fetchIntegrations = featureFlags.buildbot_fetch_integrations;
14
15
  if (api === undefined || mode === 'buildbot' || !testEnv) {
15
16
  const siteInfo = siteId === undefined ? {} : { id: siteId };
16
- return { siteInfo, accounts: [], addons: [] };
17
+ let integrations = [];
18
+ if (fetchIntegrations && api !== undefined && !testEnv) {
19
+ // we still want to fetch integrations within buildbot
20
+ integrations = await getIntegrations({ api, ownerType: 'site', ownerId: siteId, testOpts });
21
+ }
22
+ return { siteInfo, accounts: [], addons: [], integrations };
17
23
  }
18
- const fetchIntegrations = featureFlags.buildbot_fetch_integrations;
19
24
  const promises = [getSite(api, siteId, siteFeatureFlagPrefix), getAccounts(api), getAddons(api, siteId)];
20
25
  if (fetchIntegrations) {
21
26
  promises.push(getIntegrations({ api, ownerType: 'site', ownerId: siteId, testOpts }));
@@ -25,7 +30,7 @@ export const getSiteInfo = async function ({ api, siteId, mode, siteFeatureFlagP
25
30
  const envelope = await getEnvelope({ api, accountId: siteInfo.account_slug, siteId });
26
31
  siteInfo.build_settings.env = envelope;
27
32
  }
28
- return { siteInfo, accounts, addons, integrations: integrations };
33
+ return { siteInfo, accounts, addons, integrations };
29
34
  };
30
35
  const getSite = async function (api, siteId, siteFeatureFlagPrefix = null) {
31
36
  if (siteId === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "20.6.2",
3
+ "version": "20.6.3",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -94,5 +94,5 @@
94
94
  "engines": {
95
95
  "node": "^14.16.0 || >=16.0.0"
96
96
  },
97
- "gitHead": "487f1b282fed53beeb3ea17db151a741535ba8fc"
97
+ "gitHead": "28f104de3b83def70a633289c72c70c9c7360ce0"
98
98
  }