@smart-cloud/publisher-exporter 1.0.0 → 1.0.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/README.md +29 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,11 +54,38 @@ Example:
|
|
|
54
54
|
```bash
|
|
55
55
|
publisher-exporter queue-runner \
|
|
56
56
|
--runtime-dir /var/www/site/wp-content/uploads/smartcloud-static-publisher/runtime \
|
|
57
|
-
--exporter-dir /usr/local/lib/node_modules/@smart-cloud/publisher-exporter \
|
|
58
57
|
--max-jobs 1
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
Direct CLI invocation from cron is the recommended setup.
|
|
61
|
+
|
|
62
|
+
Same-host Linux cron example:
|
|
63
|
+
|
|
64
|
+
```cron
|
|
65
|
+
SHELL=/bin/bash
|
|
66
|
+
HOME=/home/<runner-user>
|
|
67
|
+
PATH=/home/<runner-user>/.nvm/versions/node/v24.15.0/bin:/usr/bin:/bin
|
|
68
|
+
PLAYWRIGHT_BROWSERS_PATH=/var/lib/playwright-browsers
|
|
69
|
+
RUNTIME_PATH=/var/www/site/wp-content/uploads/smartcloud-static-publisher/runtime
|
|
70
|
+
LOG_PATH=/var/www/site/wp-content/uploads/smartcloud-static-publisher/logs
|
|
71
|
+
|
|
72
|
+
* * * * * /usr/bin/flock -n /tmp/static-publisher.cron.lock publisher-exporter queue-runner --runtime-dir "$RUNTIME_PATH" --max-jobs 1 >> "$LOG_PATH/queue-runner-cron.log" 2>&1
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If WordPress and the runner are on different machines but share the same mounted publisher storage, keep `outputDir` and `logDir` storage-relative in WordPress admin and point cron at the crawler host's local mount path:
|
|
76
|
+
|
|
77
|
+
```cron
|
|
78
|
+
SHELL=/bin/bash
|
|
79
|
+
HOME=/home/<runner-user>
|
|
80
|
+
PATH=/home/<runner-user>/.nvm/versions/node/v24.15.0/bin:/usr/bin:/bin
|
|
81
|
+
PLAYWRIGHT_BROWSERS_PATH=/var/lib/playwright-browsers
|
|
82
|
+
RUNTIME_PATH=/mnt/site/runtime
|
|
83
|
+
LOG_PATH=/mnt/site/logs
|
|
84
|
+
|
|
85
|
+
* * * * * /usr/bin/flock -n /tmp/static-publisher.cron.lock publisher-exporter queue-runner --runtime-dir "$RUNTIME_PATH" --max-jobs 1 >> "$LOG_PATH/queue-runner-cron.log" 2>&1
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If you want a stable user-local launcher that survives Node version changes under NVM, prefer a tiny `~/bin/publisher-exporter` wrapper over a plain symlink to `~/.nvm/versions/node/vX.Y.Z/bin/publisher-exporter`. The plain symlink will break after upgrades.
|
|
62
89
|
|
|
63
90
|
After each finished, failed, or stopped job, queue-runner copies the exporter-generated working logs into `"<logDir>/archive/<timestamp-command-jobId-status>/"` and includes a `job.json` summary plus the latest `current-progress.json` snapshot when available. The live root log files remain the current working set and may be overwritten by the next job.
|
|
64
91
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-cloud/publisher-exporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Headless Playwright static publisher for WordPress/Elementor sites with sitemap-only page discovery, strict asset capture, escaped URL rewrite, structured logs, and targeted retry modes.",
|