cdk-nextjs 0.7.0 → 0.7.2

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.
@@ -209,6 +209,16 @@ export declare class NextjsBuild extends Construct {
209
209
  * function that cannot serve it) is this, several steps downstream.
210
210
  */
211
211
  private resolveDeploymentRoots;
212
+ /**
213
+ * `next build` traces native addons from the machine it runs on, and only
214
+ * `sharp` is swapped for the target. Anything else built for another platform
215
+ * fails with MODULE_NOT_FOUND or ERR_DLOPEN_FAILED on the first request that
216
+ * loads it, so say which package at synth. A warning, not an error: some
217
+ * addons are optional (`ws`'s `bufferutil`, `fsevents`) and fall back to JS.
218
+ *
219
+ * Only the OS and CPU are checked: glibc and musl builds share a header.
220
+ */
221
+ private warnOnForeignNativeBinaries;
212
222
  /**
213
223
  * Lambda enforces 250 MB unzipped at CloudFormation time, which is minutes
214
224
  * into a deploy and reports only a size. Splitting exists to stay under that
@@ -414,6 +424,21 @@ export declare function sharpBinaryDir(root: string): string;
414
424
  * monorepo.
415
425
  */
416
426
  export declare function listTree(root: string): Dirent[];
427
+ /**
428
+ * The platform a native addon was compiled for, read from its header:
429
+ * `linux-<arch>`, `darwin` or `win32`, or `undefined` for a file that is none
430
+ * of those.
431
+ */
432
+ export declare function nativeBinaryPlatform(file: string): string | undefined;
433
+ /**
434
+ * The packages under `root` that have `.node` addons but none built for
435
+ * `target`, so they'd fail to load there. Returned as `root`-relative paths.
436
+ *
437
+ * A package with addons for several platforms is fine as long as one of them
438
+ * is `target`: packages like `bufferutil` bundle a `darwin` and a
439
+ * `linux-x64` addon and load whichever matches the machine.
440
+ */
441
+ export declare function findForeignNativePackages(root: string, target: string): string[];
417
442
  /**
418
443
  * Write {@link PUBLIC_FILES_FILE_NAME} into a deployment root's runtime
419
444
  * directory: every file under `publicDir`, listed the way the runtime would