@netlify/build 27.14.0 → 27.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "27.14.0",
3
+ "version": "27.15.0",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./src/core/main.js",
@@ -36,7 +36,7 @@ const isNotCorePlugin = function ({ origin }) {
36
36
 
37
37
  const isRuntime = function ({ packageName }) {
38
38
  // Make this a bit more robust in the future
39
- return ['@netlify/next-runtime'].includes(packageName)
39
+ return ['@netlify/next-runtime', '@netlify/plugin-nextjs'].includes(packageName)
40
40
  }
41
41
 
42
42
  const getPluginDescription = function (
@@ -1,10 +1,12 @@
1
1
  import { promises as fs } from 'fs'
2
2
  import { dirname, join, resolve } from 'path'
3
+ import { env } from 'process'
3
4
 
4
5
  import { bundle, find } from '@netlify/edge-bundler'
5
6
  import { pathExists } from 'path-exists'
6
7
 
7
8
  import { logFunctionsToBundle } from '../../log/messages/core_steps.js'
9
+ import { getUtils } from '../../plugins/child/utils.js'
8
10
 
9
11
  import { tagBundlingError } from './lib/error.js'
10
12
  import { parseManifest } from './lib/internal_manifest.js'
@@ -15,26 +17,20 @@ const DENO_CLI_CACHE_DIRECTORY = '.netlify/plugins/deno-cli'
15
17
  const IMPORT_MAP_FILENAME = 'edge-functions-import-map.json'
16
18
 
17
19
  // eslint-disable-next-line complexity, max-statements
18
- const coreStep = async function ({
19
- buildDir,
20
- constants: {
20
+ const coreStep = async function ({ buildDir, constants, debug, systemLog, featureFlags, logs, netlifyConfig }) {
21
+ const {
21
22
  EDGE_FUNCTIONS_DIST: distDirectory,
22
23
  EDGE_FUNCTIONS_SRC: srcDirectory,
23
24
  INTERNAL_EDGE_FUNCTIONS_SRC: internalSrcDirectory,
24
25
  IS_LOCAL: isRunningLocally,
25
- },
26
- debug,
27
- systemLog,
28
- featureFlags,
29
- logs,
30
- netlifyConfig,
31
- }) {
26
+ } = constants
32
27
  const { edge_functions: configDeclarations = [] } = netlifyConfig
33
28
  const distPath = resolve(buildDir, distDirectory)
34
29
  const internalSrcPath = resolve(buildDir, internalSrcDirectory)
35
30
  const distImportMapPath = join(dirname(internalSrcPath), IMPORT_MAP_FILENAME)
36
31
  const srcPath = srcDirectory ? resolve(buildDir, srcDirectory) : undefined
37
32
  const sourcePaths = [internalSrcPath, srcPath].filter(Boolean)
33
+ const utils = getUtils({ event: 'onBuild', constants, runState: {} })
38
34
 
39
35
  logFunctions({ internalSrcDirectory, internalSrcPath, logs, srcDirectory, srcPath })
40
36
 
@@ -69,6 +65,12 @@ const coreStep = async function ({
69
65
 
70
66
  await validateEdgeFunctionsManifest({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory } })
71
67
 
68
+ if (!isRunningLocally) {
69
+ const logsLink = `https://app.netlify.com/sites/${env.SITE_NAME}/edge-functions?scope=deployid:${env.DEPLOY_ID}`
70
+ const summaryText = `${declarations.length} edge functions deployed. [Watch Logs](${logsLink})`
71
+ utils.status.show({ summary: summaryText, title: 'Edge Functions' })
72
+ }
73
+
72
74
  return {}
73
75
  }
74
76