@smart-cloud/publisher-exporter 1.1.83 → 1.1.85
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 +83 -0
- package/dist/browser-launch.js +1 -0
- package/dist/content-sync.js +15 -15
- package/dist/crawl.js +13 -13
- package/dist/deploy.js +6 -6
- package/dist/remote-worker.js +5 -5
- package/dist/rewrite-worker.js +2 -2
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -4,8 +4,91 @@
|
|
|
4
4
|
|
|
5
5
|
It is designed to run outside WordPress. The WordPress plugin only manages runtime config, queue state, and logs.
|
|
6
6
|
|
|
7
|
+
## Runtime asset declarations
|
|
8
|
+
|
|
9
|
+
Client components can declare assets before their JavaScript initializes. This
|
|
10
|
+
is especially useful for stylesheets loaded exclusively inside shadow roots.
|
|
11
|
+
An inert JSON script exposes dependencies without fetching them or applying
|
|
12
|
+
styles to the document:
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<script type="application/json" data-static-export-assets>
|
|
16
|
+
{"schemaVersion":1,"assets":["/assets/shadow-ui.css","/assets/ui.woff2"]}
|
|
17
|
+
</script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Local and delegated rendering read this declaration even when JavaScript is
|
|
21
|
+
disabled or the component has not mounted. URLs are resolved against the page
|
|
22
|
+
URL and pass the normal asset host/path policies. Assets enter the crawl
|
|
23
|
+
manifest and deployment plan through the same download pipeline as ordinary
|
|
24
|
+
HTML dependencies; CSS imports and fonts are discovered recursively. No
|
|
25
|
+
plugin names or customer-specific asset lists are required by the exporter.
|
|
26
|
+
|
|
27
|
+
WordPress producers should use `wp_json_encode` with `JSON_HEX_TAG`,
|
|
28
|
+
`JSON_HEX_AMP`, `JSON_HEX_APOS`, and `JSON_HEX_QUOT`, then emit the declaration
|
|
29
|
+
through `wp_print_inline_script_tag` with the attributes shown above. Do not
|
|
30
|
+
HTML-escape the JSON body: its JSON escapes are decoded by the crawler and
|
|
31
|
+
preserve the exact URL, including query separators. Keep declarations outside
|
|
32
|
+
client-owned mount containers so browser-runtime cleanup cannot remove them.
|
|
33
|
+
The published component still loads its styles into its own shadow root.
|
|
34
|
+
|
|
35
|
+
Multiple declarations are supported and deduplicated. Missing declarations do
|
|
36
|
+
not change ordinary discovery. Malformed declarations fail rendering instead
|
|
37
|
+
of silently dropping dependencies. Deploy the supporting exporter to both the
|
|
38
|
+
coordinator and delegated workers before relying on these declarations, purge
|
|
39
|
+
stale source page caches, and recrawl affected pages to update existing
|
|
40
|
+
manifests. The declaration does not require longer render readiness waits.
|
|
41
|
+
|
|
7
42
|
## Release notes
|
|
8
43
|
|
|
44
|
+
### 1.1.85
|
|
45
|
+
|
|
46
|
+
- Pin Playwright exactly to `1.63.0`, matching the delegated worker browser
|
|
47
|
+
image. Installing the published package into a fresh image can no longer
|
|
48
|
+
silently select a newer Playwright release with incompatible Chromium paths.
|
|
49
|
+
- Fail closed on unrecovered page/worker rendering errors in normal full and
|
|
50
|
+
incremental crawls, not only targeted content-sync or origin HTTP 5xx errors.
|
|
51
|
+
Stop scheduling new pages after a fatal render failure, drain in-flight
|
|
52
|
+
workers, retain the incomplete marker and refuse to create a deploy plan.
|
|
53
|
+
Partial DOM recovery remains diagnostic output, not a completed publication.
|
|
54
|
+
- Export the actual Lambda browser launch options for the container build
|
|
55
|
+
smoke test. The worker build checks the exporter dependency, installed
|
|
56
|
+
Playwright/core and base image version, then launches Chromium and renders
|
|
57
|
+
two isolated contexts before accepting the image.
|
|
58
|
+
- Preserve intentional HTTP 404/410 handling and successful incremental runs
|
|
59
|
+
that reuse all pages without rendering. A zero-render counter alone is not
|
|
60
|
+
considered a failure.
|
|
61
|
+
|
|
62
|
+
Upgrade both the coordinator and the shared Lambda worker stack to `1.1.85`,
|
|
63
|
+
using the updated worker Dockerfiles and their mandatory browser smoke gate.
|
|
64
|
+
The failed `1.1.84` runs may have left empty or incomplete crawl manifests;
|
|
65
|
+
after both upgrades, run a full publish on each affected source site. A new
|
|
66
|
+
Static Publisher WordPress plugin release is not required. Do not redeploy
|
|
67
|
+
the floating-Playwright `1.1.84` image or bypass the incomplete marker.
|
|
68
|
+
|
|
69
|
+
### 1.1.84
|
|
70
|
+
|
|
71
|
+
- Discover explicitly declared runtime assets from inert `application/json`
|
|
72
|
+
scripts marked `data-static-export-assets`, both in local crawls (including
|
|
73
|
+
JavaScript-disabled crawls) and delegated render workers. CSS and its imports
|
|
74
|
+
and fonts enter the ordinary asset manifest and deploy pipeline without
|
|
75
|
+
applying shadow-only styles to the document or extending readiness waits.
|
|
76
|
+
- Preserve exact URLs after JSON escaping, including query separators and
|
|
77
|
+
Unicode. Validate the declaration schema and retain the ordinary asset
|
|
78
|
+
host/path restrictions; malformed declarations fail rather than silently
|
|
79
|
+
losing dependencies.
|
|
80
|
+
- Replace `fast-glob` with native filesystem enumeration for crawl cleanup,
|
|
81
|
+
rewrite and deployment. Remove the vulnerable `fast-glob -> micromatch ->
|
|
82
|
+
braces` production dependency chain while retaining dotfiles and symlink
|
|
83
|
+
aliases and preventing traversal cycles.
|
|
84
|
+
|
|
85
|
+
Update the external coordinator and delegated worker image to `1.1.84` before
|
|
86
|
+
relying on producer declarations. Install the corresponding Flow, Gatey and AI
|
|
87
|
+
Kit plugin updates when released, purge stale source page caches, and recrawl
|
|
88
|
+
affected pages (or run a full publish) so existing manifests gain the missing
|
|
89
|
+
runtime assets. No Static Publisher WordPress plugin change or new CDK resource
|
|
90
|
+
is required for this feature. Existing ordinary asset discovery is unchanged.
|
|
91
|
+
|
|
9
92
|
### 1.1.82
|
|
10
93
|
|
|
11
94
|
- 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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return {headless:true,args:["--no-sandbox","--disable-setuid-sandbox","--no-zygote","--disable-gpu"],...e?{proxy:{server:e}}:{}}}export{n as remoteBrowserLaunchOptions};
|