@smi-digital/create-smi-app 2.11.0 → 2.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smi-digital/create-smi-app",
3
- "version": "2.11.0",
3
+ "version": "2.11.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -11,7 +11,13 @@ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev l
11
11
  WORKDIR /opt/
12
12
  COPY package.json package-lock.json* ./
13
13
  RUN npm install -g node-gyp
14
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install
14
+ # `npm ci` for a deterministic install from the lockfile. The --os/--libc/--cpu
15
+ # flags force npm to install sharp's prebuilt musl binary (@img/sharp-linuxmusl-x64,
16
+ # already pinned in the lockfile). Without them, npm skips it when the lockfile was
17
+ # generated on another OS and sharp falls back to a failing source build. This is
18
+ # sharp's documented workaround for npm bug #4828. Flags target linux x64 deploys;
19
+ # change --cpu=arm64 for arm builds.
20
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --os=linux --libc=musl --cpu=x64
15
21
  ENV PATH=/opt/node_modules/.bin:$PATH
16
22
 
17
23
  WORKDIR /opt/app
@@ -27,7 +33,8 @@ ENV NODE_ENV=${NODE_ENV}
27
33
  WORKDIR /opt/
28
34
  COPY package.json package-lock.json* ./
29
35
  RUN npm install -g node-gyp
30
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install --omit=dev
36
+ # Deterministic prod install from the lockfile; same sharp/musl flags as builder.
37
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev --os=linux --libc=musl --cpu=x64
31
38
  ENV PATH=/opt/node_modules/.bin:$PATH
32
39
 
33
40
  WORKDIR /opt/app