@accurix/centrinfo-widget 4.0.0 → 5.0.0

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
@@ -209,6 +209,28 @@ Canonical v1 CDN URL:
209
209
  https://cdn.accurixtech.com/centrinfo/js/sdk-centrinfo-widget-v1.0.0/centrinfo-widget.js
210
210
  ```
211
211
 
212
+ ### Publishing CDN assets
213
+
214
+ `publish:cdn` uploads `dist/cdn/*` to R2 under a version-scoped path and then
215
+ verifies three things: the object read back from R2, the origin response (with a
216
+ cache-busting query string), and the canonical URL customers load. Objects go
217
+ out as `public, max-age=31536000, immutable`, so **prefer publishing a new
218
+ version over overwriting a released one** — `--force` replaces bytes that
219
+ browsers and the edge may hold for a year.
220
+
221
+ Required environment: `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_TOKEN`,
222
+ `CLOUDFLARE_R2_BUCKET`, and `CENTRINFO_CDN_DRY_RUN=false` (the script dry-runs
223
+ unless this is exactly `false`).
224
+
225
+ Optional environment:
226
+
227
+ | Variable | Effect |
228
+ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
229
+ | `CLOUDFLARE_ZONE_ID` | Purges the canonical URL after a forced overwrite. Without it, an overwrite fails verification once the edge holds the old bytes. |
230
+ | `CLOUDFLARE_CACHE_PURGE_TOKEN` | Token used for the purge when `CLOUDFLARE_API_TOKEN` lacks the Cache Purge permission. |
231
+ | `CENTRINFO_WIDGET_CDN_BASE_URL` | Overrides `https://cdn.accurixtech.com`. |
232
+ | `CENTRINFO_CDN_VERIFY_ATTEMPTS` / `CENTRINFO_CDN_VERIFY_DELAY_MS` | Verification retry budget (defaults: 18 attempts, 5s apart). |
233
+
212
234
  ## Status
213
235
 
214
236
  v1 in progress — chat, streaming (SSE), citations, suggested-reply chips,