@widgetic/embed-sdk 2.0.16 → 2.0.17

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
@@ -163,25 +163,29 @@ Here the sibling is `api-sdk`. `npm run i` reinstalls `node_modules` and links t
163
163
 
164
164
  ## Publishing
165
165
 
166
- GitLab CI on `main` publishes this package and then replaces `https://cdn.widgetic.com/sdks/browser/embed-sdk.js`. The npm job is a Trusted Publisher (`NPM_ID_TOKEN`). It does not use a long-lived token.
166
+ A release goes out from a laptop. On a clean `main`:
167
167
 
168
- 1. Bump `version` in `package.json`.
169
- 2. Commit and push `main`.
170
- 3. The `publish` job runs `npm publish` when that version is not already on npm, then uploads `dist/umd/embed-sdk.js` to the CDN and purges the cached copies.
168
+ ```bash
169
+ npm whoami # the npm account that publishes
170
+ npm run publish:cdn:dry-run -- --skip-build --env-file .env.cdn # changes nothing; proves the CDN settings
171
+ npm run publish-to-npm
172
+ ```
173
+
174
+ `publish-to-npm` merges what is on `origin/main`, raises the patch version, builds, runs `check:no-secrets`, publishes to npm, replaces `https://cdn.widgetic.com/sdks/browser/embed-sdk.js` and purges the cached copies, commits `chore: publish <version>` with the rebuilt `dist/`, tags `v<version>` and pushes the commit and the tag. `.env.cdn` is git-ignored and holds six settings: `CLOUDFLARE_PUBLIC_ENDPOINT`, `R2_WIDGETS_NAME`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`, `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ZONE_ID`. The last two are what let the upload purge the cached file.
171
175
 
172
- The CDN upload needs six CI/CD variables on this project, protected, environment scope `cdn`: `CLOUDFLARE_PUBLIC_ENDPOINT`, `R2_WIDGETS_NAME`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`, `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ZONE_ID`. The last two are what let the job purge the cached file.
176
+ GitLab CI on `main` is written to do the same (an npm Trusted Publisher, `NPM_ID_TOKEN`, no long-lived token; the six settings as CI/CD variables, protected, environment scope `cdn`), but it does not release this package today. No pipeline on this project has succeeded since 10 October 2026, the latest ones fail within a second with a 0-byte log, and a push to `main` publishes nothing. The usual cause is `ci_quota_exceeded`; the group's remaining minutes are at [Usage quotas](https://gitlab.com/groups/widgeticai/-/usage_quotas), on the pipelines tab. Two things to check before relying on CI again: `package.json` points `@widgetic/api-sdk` at `file:../api-sdk`, a sibling that a CI clone of this project alone does not contain, and the `publish` job uploads the CDN file on every matching push, even when that version is already on npm.
173
177
 
174
- When the GitLab job fails with `ci_quota_exceeded`, publish from a laptop. That does not use CI minutes. The group's remaining minutes are at [Usage quotas](https://gitlab.com/groups/widgeticai/-/usage_quotas), on the pipelines tab.
178
+ The same release by hand, when the script cannot be used (the dry run first, as above):
175
179
 
176
180
  ```bash
177
181
  npm ci
178
182
  npm run build
179
183
  npm publish --access public
180
- npm run publish:cdn:dry-run -- --env-file .env
181
- npm run publish:cdn -- --purge --allow-dirty --env-file .env
184
+ npm run publish:cdn:dry-run -- --env-file .env.cdn
185
+ npm run publish:cdn -- --purge --allow-dirty --env-file .env.cdn
182
186
  ```
183
187
 
184
- `npm publish` needs the token in `~/.npmrc`. Do not commit that file. The R2 settings named above have to be in that `.env`, or already in the environment. The dry run changes nothing. The upload stops when the built `dist/` differs from the committed one, so the laptop command passes `--allow-dirty`. The last command asks you to type `publish`, uploads the file, and purges the cache. Check `npm view @widgetic/embed-sdk version` and the `last-modified` header of `https://cdn.widgetic.com/sdks/browser/embed-sdk.js`. What the upload checks, and how to roll back, is in `__docs/05-advanced/06-publishing-to-cdn.md`.
188
+ `npm publish` needs the token in `~/.npmrc`. Do not commit that file. The six settings named above have to be in `.env.cdn`, or already in the environment; never commit it either (`.env.*` is git-ignored). The dry run changes nothing. The upload stops when the built `dist/` differs from the committed one, so the laptop command passes `--allow-dirty`. The last command asks you to type `publish`, uploads the file, and purges the cache. Check `npm view @widgetic/embed-sdk version` and the `last-modified` header of `https://cdn.widgetic.com/sdks/browser/embed-sdk.js`. What the upload checks, and how to roll back, is in `__docs/05-advanced/06-publishing-to-cdn.md`.
185
189
 
186
190
  ## License
187
191