@netlify/build 29.8.0 → 29.9.1

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.
@@ -79,10 +79,12 @@ const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC
79
79
  logs,
80
80
  repositoryRoot,
81
81
  });
82
+ const metrics = getMetrics(internalFunctions, userFunctions);
82
83
  return {
83
84
  tags: {
84
85
  bundler: bundlers,
85
86
  },
87
+ metrics,
86
88
  };
87
89
  };
88
90
  // We run this core step if at least one of the functions directories (the
@@ -115,3 +117,19 @@ export const zipItAndShipIt = {
115
117
  return await zipFunctions(...args);
116
118
  },
117
119
  };
120
+ const getMetrics = (internalFunctions, userFunctions) => {
121
+ return [
122
+ {
123
+ type: 'increment',
124
+ name: 'buildbot.build.functions',
125
+ value: internalFunctions.length,
126
+ tags: { type: 'lambda:generated' },
127
+ },
128
+ {
129
+ type: 'increment',
130
+ name: 'buildbot.build.functions',
131
+ value: userFunctions.length,
132
+ tags: { type: 'lambda:user' },
133
+ },
134
+ ];
135
+ };
@@ -9,7 +9,7 @@ import { runStep } from './run_step.js';
9
9
  // Runs `onEnd` events at the end, whether an error was thrown or not.
10
10
  export const runSteps = async function ({ steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, }) {
11
11
  const { index: stepsCount, error: errorA, netlifyConfig: netlifyConfigC, statuses: statusesB, failedPlugins: failedPluginsA, timers: timersC, configMutations: configMutationsB, metrics: metricsC, } = await pReduce(steps, async ({ index, error, failedPlugins, envChanges, netlifyConfig: netlifyConfigA, configMutations, headersPath: headersPathA, redirectsPath: redirectsPathA, statuses, timers: timersA, metrics: metricsA, }, { event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, pluginPackageJson, loadedFrom, origin, condition, }) => {
12
- const { newIndex = index, newError = error, failedPlugin = [], newEnvChanges = {}, netlifyConfig: netlifyConfigB = netlifyConfigA, configMutations: configMutationsA = configMutations, headersPath: headersPathB = headersPathA, redirectsPath: redirectsPathB = redirectsPathA, newStatus, timers: timersB = timersA, metrics: metricsB = metricsA, } = await runStep({
12
+ const { newIndex = index, newError = error, failedPlugin = [], newEnvChanges = {}, netlifyConfig: netlifyConfigB = netlifyConfigA, configMutations: configMutationsA = configMutations, headersPath: headersPathB = headersPathA, redirectsPath: redirectsPathB = redirectsPathA, newStatus, timers: timersB = timersA, metrics: metricsB = [], } = await runStep({
13
13
  event,
14
14
  childProcess,
15
15
  packageName,
@@ -69,7 +69,7 @@ export const runSteps = async function ({ steps, buildbotServerSocket, events, c
69
69
  redirectsPath: redirectsPathB,
70
70
  statuses: statusesA,
71
71
  timers: timersB,
72
- metrics: metricsB,
72
+ metrics: [...metricsA, ...metricsB],
73
73
  };
74
74
  }, {
75
75
  index: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.8.0",
3
+ "version": "29.9.1",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -66,11 +66,11 @@
66
66
  "@bugsnag/js": "^7.0.0",
67
67
  "@netlify/cache-utils": "^5.1.3",
68
68
  "@netlify/config": "^20.3.7",
69
- "@netlify/edge-bundler": "8.13.0",
69
+ "@netlify/edge-bundler": "8.13.1",
70
70
  "@netlify/framework-info": "^9.8.5",
71
71
  "@netlify/functions-utils": "^5.2.1",
72
72
  "@netlify/git-utils": "^5.1.1",
73
- "@netlify/plugins-list": "^6.66.0",
73
+ "@netlify/plugins-list": "^6.68.0",
74
74
  "@netlify/run-utils": "^5.1.0",
75
75
  "@netlify/zip-it-and-ship-it": "8.9.0",
76
76
  "@sindresorhus/slugify": "^2.0.0",
@@ -113,7 +113,7 @@
113
113
  "terminal-link": "^3.0.0",
114
114
  "tmp-promise": "^3.0.2",
115
115
  "ts-node": "^10.6.0",
116
- "typescript": "^4.8.4",
116
+ "typescript": "^5.0.0",
117
117
  "uuid": "^8.0.0",
118
118
  "yargs": "^17.6.0"
119
119
  },
@@ -147,5 +147,5 @@
147
147
  "module": "commonjs"
148
148
  }
149
149
  },
150
- "gitHead": "693a17e7e5eea9a519c9fba30beaecf1f6ac515d"
150
+ "gitHead": "ad90f35f11b892a5017096d6f01d82e262247197"
151
151
  }