Skip to main content
The @westyx-nexus/sdk-nodejs 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

Pin to a specific version:

Requirements

  • Node.js 22 or newer. Node 22 is the oldest line still receiving security patches - Maintenance LTS until 2027-04-30 - which is what makes it the floor. Every release of all four packages is tested on Node 22, 24 (Maintenance LTS) and 26 (Active LTS). The SDK also relies on JSON.parse source-text access for exact config numbers, which Node has had since 22.0.
  • TypeScript 5.0 or newer. The declarations ship in the package and are compiled against TypeScript 5.0, 5.9, 6.0 and 7.0 on every release.

Importing

The package ships an ES module build and a CommonJS build, each with its own type declarations, so both import and require work:

Verifying connectivity

Before writing any code, confirm your endpoint and API key work with a plain curl:
A valid response returns a JSON snapshot with your configs, secrets, and flags. An HTTP 401 means the key is wrong; HTTP 404 means the slug is wrong. To watch the live SSE stream:
You should see event:resync arrive within a second. Press Ctrl+C to stop.

Troubleshooting

  • Could not resolve '@westyx-nexus/sdk-nodejs' - your .npmrc is not picked up. Confirm it’s at the project root next to package.json, and check npm config get registry @westyx-nexus.
  • 404 Not Found for another @westyx-nexus package - the .npmrc names a single SDK’s project registry. Use the group URL above, which serves every @westyx-nexus package.