ui-soxo-bootstrap-core 2.6.32-dev.7 → 2.6.32-dev.8

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.
@@ -1,59 +1,40 @@
1
- name: Node.js Package
2
-
3
- on:
4
- release:
5
- types: [created]
6
-
7
- jobs:
8
- publish-npm:
9
- runs-on: ubuntu-latest
10
- permissions:
11
- contents: read
12
- id-token: write
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: 20
18
- registry-url: https://registry.npmjs.org/
19
- - run: npm install -g npm@latest
20
- - run: npm install
21
-
22
- - name: Determine npm dist-tag
23
- id: dist_tag
24
- shell: bash
25
- run: |
26
- VERSION=$(node -p "require('./package.json').version")
27
- echo "package.json version: $VERSION"
28
- echo "release tag: ${GITHUB_REF_NAME}"
29
- if [[ "v${VERSION}" != "${GITHUB_REF_NAME}" ]]; then
30
- echo "::error::Release tag '${GITHUB_REF_NAME}' does not match package.json version 'v${VERSION}'."
31
- echo "::error::Bump the version with 'npm version' and re-create the release."
32
- exit 1
33
- fi
34
- if [[ "$VERSION" == *-dev* ]]; then
35
- echo "tag=dev" >> "$GITHUB_OUTPUT"
36
- echo "Will publish with dist-tag: dev"
37
- else
38
- echo "tag=latest" >> "$GITHUB_OUTPUT"
39
- echo "Will publish with dist-tag: latest"
40
- fi
41
-
42
- - name: Diagnose npm + OIDC environment
43
- shell: bash
44
- run: |
45
- echo "--- versions ---"
46
- node --version
47
- npm --version
48
- echo "--- OIDC env presence (must both be 'yes' for trusted publishing) ---"
49
- echo "ACTIONS_ID_TOKEN_REQUEST_URL set: ${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}"
50
- echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN set: ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+yes}"
51
- echo "--- effective .npmrc (user) ---"
52
- cat ~/.npmrc 2>/dev/null || echo "(none)"
53
- echo "--- effective .npmrc (project) ---"
54
- cat .npmrc 2>/dev/null || echo "(none)"
55
- echo "--- npm config (auth-related) ---"
56
- npm config get registry
57
- npm config get //registry.npmjs.org/:_authToken || true
58
-
59
- - run: npm publish --provenance --access public --tag ${{ steps.dist_tag.outputs.tag }} --loglevel=verbose
1
+ name: Node.js Package
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ publish-npm:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-node@v4
13
+ with:
14
+ node-version: 20
15
+ registry-url: https://registry.npmjs.org/
16
+ - run: npm install
17
+
18
+ - name: Determine npm dist-tag
19
+ id: dist_tag
20
+ shell: bash
21
+ run: |
22
+ VERSION=$(node -p "require('./package.json').version")
23
+ echo "package.json version: $VERSION"
24
+ echo "release tag: ${GITHUB_REF_NAME}"
25
+ if [[ "v${VERSION}" != "${GITHUB_REF_NAME}" ]]; then
26
+ echo "::error::Release tag '${GITHUB_REF_NAME}' does not match package.json version 'v${VERSION}'."
27
+ echo "::error::Bump the version with 'npm version' and re-create the release."
28
+ exit 1
29
+ fi
30
+ if [[ "$VERSION" == *-dev* ]]; then
31
+ echo "tag=dev" >> "$GITHUB_OUTPUT"
32
+ echo "Will publish with dist-tag: dev"
33
+ else
34
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
35
+ echo "Will publish with dist-tag: latest"
36
+ fi
37
+
38
+ - run: npm publish --access public --tag ${{ steps.dist_tag.outputs.tag }}
39
+ env:
40
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -17,7 +17,7 @@ Incorrect versioning or incorrect tags will break the publish pipeline — follo
17
17
  - Publishing via GitHub Release UI
18
18
  - How GitHub Action Detects Release Type
19
19
  - Summary Table
20
- - CI/CD Authentication (Trusted Publishing)
20
+ - CI/CD Authentication (Granular Access Token)
21
21
  - Common Mistakes & Fixes
22
22
 
23
23
  ---
@@ -258,10 +258,10 @@ npm publish --tag dev
258
258
 
259
259
  The workflow reads the `version` field from `package.json` at publish time:
260
260
 
261
- | Condition | Command | Result |
262
- | ---------------------------- | ------------------------------------------------------- | ---------------------------------- |
263
- | Version contains `-dev` | `npm publish --provenance --access public --tag dev` | Publishes to the `dev` dist-tag |
264
- | Version has no `-dev` suffix | `npm publish --provenance --access public --tag latest` | Publishes to the `latest` dist-tag |
261
+ | Condition | Command | Result |
262
+ | ---------------------------- | ------------------------------------------ | ---------------------------------- |
263
+ | Version contains `-dev` | `npm publish --access public --tag dev` | Publishes to the `dev` dist-tag |
264
+ | Version has no `-dev` suffix | `npm publish --access public --tag latest` | Publishes to the `latest` dist-tag |
265
265
 
266
266
  The workflow also enforces that the GitHub release tag matches `v<version>` from `package.json` and fails the run immediately if they diverge — this prevents the most common publish failure described below.
267
267
 
@@ -281,9 +281,9 @@ The workflow also enforces that the GitHub release tag matches `v<version>` from
281
281
 
282
282
  ---
283
283
 
284
- # 🔐 CI/CD Authentication (Trusted Publishing)
284
+ # 🔐 CI/CD Authentication (Granular Access Token)
285
285
 
286
- As of npm's 2025 policy changes, classic automation tokens (`NPM_TOKEN`) are deprecated. This repo now authenticates to npm via **OIDC Trusted Publishing** — GitHub Actions exchanges a short-lived OIDC token for a publish token at run time, so **no secret is stored in the repository**.
286
+ As of npm's 2025 policy changes, **classic automation tokens** (`npm_xxx` legacy tokens) are deprecated. This repo authenticates to npm using a **Granular Access Token (GAT)** — npm's current recommended token type for CI/CD. The token is stored as a GitHub repository secret named `NPM_TOKEN`.
287
287
 
288
288
  ## What this means for developers
289
289
 
@@ -291,24 +291,34 @@ Nothing. You still follow the same flow: `npm version` → push tag → create G
291
291
 
292
292
  ## What this means for maintainers
293
293
 
294
- The first-time setup on npmjs.com must be done once per package:
294
+ The first-time setup must be done once per package:
295
295
 
296
- 1. Log in to [npmjs.com](https://www.npmjs.com) open the package (`ui-soxo-bootstrap-core`) → **Settings**.
297
- 2. Under **Trusted Publisher**, click **Add trusted publisher** and fill in:
298
- - Publisher: **GitHub Actions**
299
- - Organization or user: `soxo-tech`
300
- - Repository: `bootstrap-core`
301
- - Workflow filename: `npm-publish.yml`
302
- - Environment name: *(leave blank)*
303
- 3. Save. Any old `NPM_TOKEN` repository secret can be removed.
296
+ 1. Log in to [npmjs.com](https://www.npmjs.com) as a user with publish rights to `ui-soxo-bootstrap-core`.
297
+ 2. Top-right avatar → **Access Tokens** **Generate New Token** **Granular Access Token**.
298
+ 3. Configure the token:
299
+ - **Name**: `ui-soxo-bootstrap-core CI publish`
300
+ - **Expiration**: 1 year (set a calendar reminder to rotate)
301
+ - **Packages and scopes**: Select **Only select packages and scopes** → choose `ui-soxo-bootstrap-core` → permission **Read and write**
302
+ - **IP allowlist**: leave blank (GitHub Actions runner IPs rotate)
303
+ 4. Generate and **copy the token immediately** npm only shows it once.
304
+ 5. In GitHub: repo **Settings** → **Secrets and variables** → **Actions** → **New repository secret**:
305
+ - Name: `NPM_TOKEN`
306
+ - Secret: paste the token from step 4
307
+
308
+ When the token expires, repeat steps 2–5 and replace the `NPM_TOKEN` secret.
304
309
 
305
310
  ## Runtime requirements
306
311
 
307
- The workflow runs on Node 20 and upgrades npm to the latest CLI (`npm install -g npm@latest`) because OIDC trusted publishing requires **npm 11.5.1**. The `--provenance` flag attaches a verifiable build attestation to every published version, visible on the npmjs.com package page.
312
+ The workflow runs on Node 20. The token is passed to `npm publish` via the `NODE_AUTH_TOKEN` environment variable, which `actions/setup-node` wires into `~/.npmrc` automatically when `registry-url` is set.
308
313
 
309
- ## If publish fails with `403 Forbidden` or `ENEEDAUTH`
314
+ ## If publish fails
310
315
 
311
- The trusted publisher config on npmjs.com no longer matches the workflow. Check that org, repo, and workflow filename match exactly — including case.
316
+ | Symptom | Likely cause | Fix |
317
+ | --- | --- | --- |
318
+ | `404 Not Found - PUT https://registry.npmjs.org/...` with no auth-related notices | `NPM_TOKEN` secret is missing, expired, or revoked | Re-create the GAT (steps 2–5) and re-publish |
319
+ | `403 Forbidden` | The GAT exists but doesn't have write access to this package | Recreate the token with **Read and write** on `ui-soxo-bootstrap-core` |
320
+ | `EOTP` / `ENEEDOTP` | The npm user enforces 2FA on writes and the token isn't allowed to bypass it | Recreate as a GAT (GATs bypass 2FA for their selected packages by design) |
321
+ | `Tag does not match package.json version` (workflow error) | Release tag and `package.json` version diverge | Always bump with `npm version` — never tag manually |
312
322
 
313
323
  ---
314
324
 
@@ -79,6 +79,7 @@ function GlobalHeaderContent({ loading, appSettings, children, isConnected, hist
79
79
  }, []);
80
80
  useEffect(() => {}, [state.theme]);
81
81
  return (
82
+ <>
82
83
  <div
83
84
  className={`global-header ${process.env.REACT_APP_THEME} ${isConnected && !kiosk ? 'connected' : ''}`}
84
85
  style={{
@@ -236,7 +237,8 @@ function GlobalHeaderContent({ loading, appSettings, children, isConnected, hist
236
237
  </div>
237
238
  {/* Right Section of the Component Loader Ends */}
238
239
  </div>
239
- {licAlert && licenseData && (
240
+ </div>
241
+ {licAlert && licenseData && (
240
242
  <div
241
243
  style={{
242
244
  top: 0,
@@ -249,7 +251,7 @@ function GlobalHeaderContent({ loading, appSettings, children, isConnected, hist
249
251
  <LicenseAlert data={licenseData} />
250
252
  </div>
251
253
  )}
252
- </div>
254
+ </>
253
255
  );
254
256
  }
255
257
  export default function GlobalHeader(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.6.32-dev.7",
3
+ "version": "2.6.32-dev.8",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"