@smart-cloud/publisher-exporter 1.1.80 → 1.1.82

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/README.md CHANGED
@@ -6,6 +6,24 @@ It is designed to run outside WordPress. The WordPress plugin only manages runti
6
6
 
7
7
  ## Release notes
8
8
 
9
+ ### 1.1.82
10
+
11
+ - Buffer cross-account S3 upload streams into 64 KiB chunks before the AWS SDK applies streaming checksums. This prevents real HTML and asset bodies from failing with `Only the last chunk is allowed to have a size less than 8192 bytes` while preserving bounded streaming instead of loading complete objects into Lambda memory.
12
+ - Keep deploy-only recovery on the existing remote export manifest: after updating delegated workers, rerun only the deploy job to copy the already rendered and rewritten workspace objects without another crawl.
13
+ - Make relative URL rewriting atomic and repeatable. Overlapping absolute, root-relative, escaped, and protocol-relative rules no longer rewrite output produced by an earlier rule or add another `../` prefix when a file passes through more than one rewrite phase.
14
+ - Remove nested browser-runtime DOM before serializing rendered pages, not only top-level runtime roots. Authored placeholders and bootstrap scripts remain, so React, Mantine, Stripe, and similar client integrations initialize exactly once on the published page instead of duplicating pre-rendered controls.
15
+
16
+ Upgrade the orchestrator and delegated workers to `1.1.82`. A WordPress plugin update is not required. A deploy-only retry is sufficient for the cross-account S3 upload failure; sites affected by malformed relative URLs or serialized runtime UI need a full publish so every affected HTML page is rewritten or rendered from its authored source.
17
+
18
+ ### 1.1.81
19
+
20
+ - Let the base deployment target and each named deployment profile select an optional AWS shared-config profile for local S3 deployment and CloudFront invalidation. One-time credentials attached to a queued job still take precedence, and only the profile name is stored in Publisher configuration.
21
+ - Let `remote-workers.json` independently select a host AWS profile when the coordinator must reach a worker stack through a named identity. This worker-plane profile is separate from the active deployment target profile.
22
+ - Allow an explicitly allowlisted delegated deploy target to assume a target-account role with an optional external ID. The worker reads the source workspace with its execution role and streams the object to S3 with target-role credentials, so neither identity needs access to both buckets.
23
+ - Validate profile names, target role ARNs, and external IDs before creating AWS clients, while keeping target role details out of generated site runtime configuration.
24
+
25
+ Upgrade the external coordinator, redeploy the Lambda worker stack with the cross-account target allowlist, and reinstall its generated `remote-workers.json` before selecting that target. Sites using only same-account ambient credentials retain their existing behavior.
26
+
9
27
  ### 1.1.80
10
28
 
11
29
  - Remove client-created top-level provider, portal, and overlay roots before serializing rendered HTML, including roots mounted through a bundled direct `react-dom/client` import that is not observable through `window.ReactDOM`.
@@ -260,6 +278,21 @@ Archived files are gzip-compressed per file and listed in `job.json`. WordPress
260
278
 
261
279
  Prune old archive directories with `publisher-exporter prune-logs --runtime-dir /srv/site/runtime --older-than-days 30`. Add that command to daily cron or another retention scheduler that matches your log policy.
262
280
 
281
+ ## AWS credential profiles
282
+
283
+ The base deployment target and each named deployment target may set an optional
284
+ `awsProfile`. Local S3 deploy and CloudFront invalidation resolve that profile
285
+ from the queue-runner user's standard AWS shared config. Store only the profile
286
+ name in publisher configuration; never store access keys there. Explicit
287
+ temporary credentials attached to a queued job take precedence over the named
288
+ profile.
289
+
290
+ This setting is deliberately host-local. A delegated Lambda deploy cannot read
291
+ the WordPress VM's AWS profiles. Its CDK target uses either the deploy worker
292
+ execution role or an allowlisted cross-account target role. CloudFront
293
+ invalidation still runs on the coordinator and therefore uses the selected
294
+ host profile when one is configured.
295
+
263
296
  ## Optional Lambda workers
264
297
 
265
298
  The exporter includes protocol-v1 building blocks for delegating bounded
@@ -274,6 +307,12 @@ Its deploy script emits a `remote-workers.json` containing the
274
307
  versioned Lambda alias ARNs, workspace bucket/prefix, region, and generated
275
308
  assumable role. The file contains no static AWS access keys.
276
309
 
310
+ When the worker stack itself is reached through a host named profile, the file
311
+ may also contain `awsProfile`. That profile selects credentials for Lambda,
312
+ workspace S3, and progress DynamoDB access and is independent of the deployment
313
+ target profile. Without it, the exporter assumes the generated `roleArn` from
314
+ ambient credentials as before.
315
+
277
316
  Install that output with owner-only permissions at
278
317
  `<site-runtime>/remote-workers.json`, then validate the role, aliases, and
279
318
  function runtimes: