@westyx-nexus/sdk-angular package is hosted on the GitLab npm Package Registry. It is public - no token is required to install.
1. Configure npm to look at the registry
Add (or merge) the following to your project’s.npmrc:
Commit the
.npmrc to source control. It contains no credentials - every developer on the team automatically picks up the right registry.2. Install the package
Requirements
- Angular 17.0 or newer (standalone or NgModule-based projects both supported)
- TypeScript 5.4 or newer (transitively via Angular 17)
- A modern browser environment with
fetch+ReadableStreamsupport (all evergreen browsers) - Server-side rendering (SSR): fully supported - stream setup is automatically skipped in non-browser environments
Use a public API key
The SDK enforces this via:- A branded TypeScript type (
PublicApiKey) - gives you a compile-time hint when you pass an unwrapped string - A runtime guard in the SDK constructor - throws a descriptive error before any network call
- A backend reject - the
/streamendpoint returns400 Bad Requestfor secret keys
assertPublicKey().
Verifying connectivity
Before writing any code, confirm your endpoint and API key work with a plaincurl:
configs and flags (browser SDKs use public keys - secrets are never included). An HTTP 401 means the key is wrong; HTTP 404 means the slug is wrong.
Troubleshooting
Could not resolve '@westyx-nexus/sdk-angular'- your.npmrcis not picked up. Confirm it’s at the project root next topackage.json, and checknpm config get registry @westyx-nexus.401 Unauthorizedwhen runningnpm install- the registry might be configured with an old path that’s no longer valid. Switch to the numeric-ID variant above.Browser SDKs require a public keyat runtime - replace yourwxs_...key with awxp_...key from the same service in the Westyx Nexus admin UI.
