@netlify/build 29.47.5 → 29.48.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.
@@ -1,3 +1,4 @@
1
+ import type { SystemLogger } from '../plugins_core/types.js';
1
2
  import { OutputFlusher } from './output_flusher.js';
2
3
  export type Logs = BufferedLogs | StreamedLogs;
3
4
  export type BufferedLogs = {
@@ -37,5 +38,5 @@ export declare const reduceLogLines: (lines: any) => any;
37
38
  * Builds a function for logging data to the system logger (i.e. hidden from
38
39
  * the user-facing build logs)
39
40
  */
40
- export declare const getSystemLogger: (logs: BufferedLogs | undefined, debug: boolean, systemLogFile?: number) => (...args: any[]) => void;
41
+ export declare const getSystemLogger: (logs: BufferedLogs | undefined, debug: boolean, systemLogFile?: number) => SystemLogger;
41
42
  export declare const addOutputFlusher: (logs: Logs, outputFlusher: OutputFlusher) => Logs;
@@ -3,9 +3,9 @@ import { getDeployStore } from '@netlify/blobs';
3
3
  import pMap from 'p-map';
4
4
  import semver from 'semver';
5
5
  import { DEFAULT_API_HOST } from '../../core/normalize_flags.js';
6
- import { log, logError } from '../../log/logger.js';
6
+ import { logError } from '../../log/logger.js';
7
7
  import { getFileWithMetadata, getKeysToUpload, scanForBlobs } from '../../utils/blobs.js';
8
- const coreStep = async function ({ debug, logs, deployId, buildDir, quiet, packagePath, constants: { SITE_ID, NETLIFY_API_TOKEN, NETLIFY_API_HOST }, }) {
8
+ const coreStep = async function ({ logs, deployId, buildDir, packagePath, constants: { SITE_ID, NETLIFY_API_TOKEN, NETLIFY_API_HOST }, systemLog, }) {
9
9
  // This should never happen due to the condition check
10
10
  if (!deployId || !NETLIFY_API_TOKEN) {
11
11
  return {};
@@ -26,9 +26,7 @@ const coreStep = async function ({ debug, logs, deployId, buildDir, quiet, packa
26
26
  const blobs = await scanForBlobs(buildDir, packagePath);
27
27
  // We checked earlier, but let's be extra safe
28
28
  if (blobs === null) {
29
- if (!quiet) {
30
- log(logs, 'No blobs to upload to deploy store.');
31
- }
29
+ systemLog('No blobs to upload to deploy store.');
32
30
  return {};
33
31
  }
34
32
  // If using the deploy config API, configure the store to use the region that
@@ -39,19 +37,13 @@ const coreStep = async function ({ debug, logs, deployId, buildDir, quiet, packa
39
37
  const blobStore = getDeployStore(storeOpts);
40
38
  const keys = await getKeysToUpload(blobs.directory);
41
39
  if (keys.length === 0) {
42
- if (!quiet) {
43
- log(logs, 'No blobs to upload to deploy store.');
44
- }
40
+ systemLog('No blobs to upload to deploy store.');
45
41
  return {};
46
42
  }
47
- if (!quiet) {
48
- log(logs, `Uploading ${keys.length} blobs to deploy store...`);
49
- }
43
+ systemLog(`Uploading ${keys.length} blobs to deploy store`);
50
44
  try {
51
45
  await pMap(keys, async (key) => {
52
- if (debug && !quiet) {
53
- log(logs, `- Uploading blob ${key}`, { indent: true });
54
- }
46
+ systemLog(`Uploading blob ${key}`);
55
47
  const { data, metadata } = await getFileWithMetadata(blobs.directory, key);
56
48
  await blobStore.set(key, data, { metadata });
57
49
  }, { concurrency: 10 });
@@ -60,9 +52,7 @@ const coreStep = async function ({ debug, logs, deployId, buildDir, quiet, packa
60
52
  logError(logs, `Error uploading blobs to deploy store: ${err.message}`);
61
53
  throw new Error(`Failed while uploading blobs to deploy store`);
62
54
  }
63
- if (!quiet) {
64
- log(logs, `Done uploading blobs to deploy store.`);
65
- }
55
+ systemLog(`Done uploading blobs to deploy store.`);
66
56
  return {};
67
57
  };
68
58
  const deployAndBlobsPresent = async ({ deployId, buildDir, packagePath, constants: { NETLIFY_API_TOKEN }, }) => Boolean(NETLIFY_API_TOKEN && deployId && (await scanForBlobs(buildDir, packagePath)));
@@ -44,7 +44,8 @@ export declare const bundleFunctions: {
44
44
  };
45
45
  export declare const zipItAndShipIt: {
46
46
  zipFunctions(relativeSrcFolders: string | string[], destFolder: string, args_2?: import("@netlify/zip-it-and-ship-it").ZipFunctionsOptions | undefined): Promise<(Omit<import("packages/zip-it-and-ship-it/dist/function.js").FunctionArchive, "runtime"> & {
47
- routes?: import("packages/zip-it-and-ship-it/dist/utils/routes.js").Route[] | undefined;
47
+ routes?: import("@netlify/zip-it-and-ship-it").ExtendedRoute[] | undefined;
48
+ excludedRoutes?: import("@netlify/zip-it-and-ship-it").Route[] | undefined;
48
49
  runtime: import("@netlify/zip-it-and-ship-it").RuntimeName;
49
50
  schedule?: string | undefined;
50
51
  runtimeAPIVersion?: number | undefined;
@@ -19,7 +19,7 @@ export type CoreStepFunctionArgs = {
19
19
  quiet?: boolean;
20
20
  debug?: boolean;
21
21
  logs?: BufferedLogs;
22
- systemLog?: (message: unknown) => void;
22
+ systemLog: SystemLogger;
23
23
  edgeFunctionsBootstrapURL?: string;
24
24
  featureFlags?: Record<string, any>;
25
25
  netlifyConfig: NetlifyConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.47.5",
3
+ "version": "29.48.1",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -70,15 +70,15 @@
70
70
  "@bugsnag/js": "^7.0.0",
71
71
  "@netlify/blobs": "^7.3.0",
72
72
  "@netlify/cache-utils": "^5.1.5",
73
- "@netlify/config": "^20.15.2",
73
+ "@netlify/config": "^20.15.3",
74
74
  "@netlify/edge-bundler": "12.0.1",
75
75
  "@netlify/framework-info": "^9.8.13",
76
- "@netlify/functions-utils": "^5.2.66",
76
+ "@netlify/functions-utils": "^5.2.68",
77
77
  "@netlify/git-utils": "^5.1.1",
78
78
  "@netlify/opentelemetry-utils": "^1.2.1",
79
79
  "@netlify/plugins-list": "^6.80.0",
80
80
  "@netlify/run-utils": "^5.1.1",
81
- "@netlify/zip-it-and-ship-it": "9.35.1",
81
+ "@netlify/zip-it-and-ship-it": "9.37.0",
82
82
  "@sindresorhus/slugify": "^2.0.0",
83
83
  "ansi-escapes": "^6.0.0",
84
84
  "chalk": "^5.0.0",
@@ -165,5 +165,5 @@
165
165
  "engines": {
166
166
  "node": "^14.16.0 || >=16.0.0"
167
167
  },
168
- "gitHead": "e4464a74add778cb61ff06702ef3a43367a930c3"
168
+ "gitHead": "10e722ebad2755434933ef205672e290d810259b"
169
169
  }