@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 +13 -9
- package/dist/browser/chunks/api.js +1 -1
- package/dist/browser/chunks/core.js +1 -1
- package/dist/browser/chunks/renderers.js +1 -1
- package/dist/browser/chunks/scanner.js +1 -1
- package/dist/browser/chunks/security.js +1 -1
- package/dist/browser/embed-sdk.js +1 -1
- package/dist/esm/chunks/api.js +1 -1
- package/dist/esm/chunks/core.js +1 -1
- package/dist/esm/chunks/renderers.js +1 -1
- package/dist/esm/chunks/scanner.js +1 -1
- package/dist/esm/chunks/security.js +1 -1
- package/dist/esm/embed-sdk.js +1 -1
- package/dist/esm/types/core/advanced-security-manager.d.ts +3 -0
- package/dist/esm/types/core/widget-manager.d.ts +8 -43
- package/dist/esm/types/utils/hydrate-published-host.d.ts +7 -4
- package/dist/umd/embed-bootstrap.js +1 -1
- package/dist/umd/embed-sdk.js +1 -1
- package/package.json +1 -1
- package/dist/esm/types/core/realtime-manager.d.ts +0 -286
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
|
-
|
|
166
|
+
A release goes out from a laptop. On a clean `main`:
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|