Installation

Install and configure the @beem/sdk package.

npm install @beem/sdk

Registry setup

The package is published to the GitLab Package Registry. Consuming projects need an .npmrc (committed to the repo) that points the @beem scope to the registry:

@beem:registry=https://gitlab.com/api/v4/projects/81526413/packages/npm/

Local authentication

Use your GitLab token via glab:

TOKEN=$(glab auth status --show-token 2>&1 | grep "Token found:" | sed 's/.*Token found: //')
npm config set "//gitlab.com/api/v4/projects/81526413/packages/npm/:_authToken" "$TOKEN"

This writes to your user-level ~/.npmrc (not the project .npmrc), so it won't be committed. One-time per machine.

Alternatively, with a GitLab personal access token (read_api scope):

npm config set "//gitlab.com/api/v4/projects/81526413/packages/npm/:_authToken" "glpat-xxxxxxxxxxxx"

GitLab CI

Append CI_JOB_TOKEN to .npmrc before install:

before_script:
  - echo "//gitlab.com/api/v4/projects/81526413/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
  - npm ci

The project that publishes @beem/sdk (beem-sdk-js) must allow the consuming project's CI jobs to access its package registry. In beem-sdk-jsSettings → CI/CD → Job token permissions, add the consuming project to the allowlist. Without this, npm ci will return 403 Forbidden.