@spunto/build 0.17.0 → 0.17.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spunto/build",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Spunto's shared Build engine — the devcontainer image protocol and VS Code extension registry clients, with no database, no HTTP framework and no UI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1132,10 +1132,15 @@ export function buildSetupScript(params: SetupScriptParams): { script: string }
1132
1132
  // `project.dind` makes DinD available without the docker-in-docker feature (baked into the base
1133
1133
  // image, see images/worker-base) — treat it like the feature for entrypoint start + docker wait.
1134
1134
  const hasDinDFeature = (project.features?.some((f) => f.id === "docker-in-docker") ?? false) || !!project.dind
1135
+ // `_MP_EP_STARTED` tells the every-start block of the same run (buildWorkerScript inlines both in
1136
+ // one shell) not to start them a second time: the docker-in-docker feature's entrypoint doesn't
1137
+ // check for a running daemon, and a second dockerd fails on the volume store lock — after having
1138
+ // replaced the first one's socket, leaving Docker unreachable for postStart and everything after.
1135
1139
  if (project.postCreateCommand && ((project.features && project.features.length > 0) || project.dind)) {
1136
1140
  push(
1137
1141
  "",
1138
1142
  "if [ -f " + FEATURE_ENTRYPOINTS_FILE + " ]; then",
1143
+ " _MP_EP_STARTED=1",
1139
1144
  ' echo "--- Starting feature entrypoints for postCreate ---"',
1140
1145
  " while IFS= read -r _ep; do",
1141
1146
  ' if [ -f "$_ep" ]; then',
@@ -1299,9 +1304,11 @@ export function buildStartScript(params: StartScriptParams): { script: string; h
1299
1304
  }
1300
1305
 
1301
1306
  // ── 2. Feature entrypoints ────────────────────────────────────────────────
1307
+ // Skipped when the first-start setup of this same run already started them for postCreate
1308
+ // (`_MP_EP_STARTED`, see buildSetupScript §6).
1302
1309
  push(
1303
1310
  "",
1304
- "if [ -f " + FEATURE_ENTRYPOINTS_FILE + " ]; then",
1311
+ "if [ -f " + FEATURE_ENTRYPOINTS_FILE + " ] && [ -z \"${_MP_EP_STARTED:-}\" ]; then",
1305
1312
  ' echo "--- Starting feature entrypoints ---"',
1306
1313
  " while IFS= read -r _ep; do",
1307
1314
  ' if [ -f "$_ep" ]; then',