@biffo/cli 0.41.14 → 0.41.16

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.
@@ -190,14 +190,47 @@ jobs:
190
190
  # would give "s3://bucket//", whose keys all begin with a literal
191
191
  # slash and match no request CloudFront ever forwards.
192
192
  DEST="s3://${SITE_BUCKET_NAME}/${PATH_PREFIX:+${PATH_PREFIX}/}"
193
+ # Three passes, split by mutability and content type — kept in lockstep
194
+ # with the core portal's deploy-app.yml (issue #275, ported in #351).
195
+ #
196
+ # Next's App Router emits its RSC flight payloads as *.txt. Left in the
197
+ # first pass they get two wrong properties that break every client-side
198
+ # navigation — and, across the portal↔sibling SSO boundary, strand a
199
+ # returning user on /index.txt showing raw serialised React (#351):
200
+ #
201
+ # - `aws s3 sync` guesses content type from the extension, so they
202
+ # serve as text/plain rather than text/x-component. The router does
203
+ # not recognise that as an RSC response and falls back to a hard MPA
204
+ # navigation TO THE URL IT WAS FETCHING — landing the browser on the
205
+ # .txt payload. Typing the URL works, because a full page load never
206
+ # fetches the payload.
207
+ #
208
+ # - they get cached immutable for a year, but they change on every
209
+ # deploy exactly like the HTML does.
210
+ #
211
+ # Hashed assets under _next/static are genuinely immutable and keep the
212
+ # long cache; HTML and RSC payloads must not.
193
213
  aws s3 sync apps/frontend/out/ "$DEST" \
194
214
  --delete \
195
215
  --cache-control "public, max-age=31536000, immutable" \
196
- --exclude "*.html"
216
+ --exclude "*.html" \
217
+ --exclude "*.txt"
218
+ # `--include` only re-includes from an excluded set; on its own it is a
219
+ # no-op, since everything is included by default. Without the explicit
220
+ # `--exclude "*"` this pass would upload the .txt payloads too — as
221
+ # text/plain — and the pass below, being a sync, would then skip them
222
+ # as unchanged and the wrong content type would survive.
197
223
  aws s3 sync apps/frontend/out/ "$DEST" \
198
224
  --delete \
199
225
  --cache-control "no-cache" \
226
+ --exclude "*" \
200
227
  --include "*.html"
228
+ aws s3 sync apps/frontend/out/ "$DEST" \
229
+ --delete \
230
+ --cache-control "no-cache" \
231
+ --content-type "text/x-component" \
232
+ --exclude "*" \
233
+ --include "*.txt"
201
234
  - name: Invalidate the core project's CloudFront path
202
235
  if: vars.PARENT_CLOUDFRONT_DISTRIBUTION_ID != ''
203
236
  env:
package/core.version CHANGED
@@ -1 +1 @@
1
- 0.41.14
1
+ 0.41.16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.41.14",
3
+ "version": "0.41.16",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",