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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
echo "
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
echo "tag
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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 }}
|
package/DEVELOPER_GUIDE.md
CHANGED
|
@@ -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 (
|
|
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
|
|
262
|
-
| ---------------------------- |
|
|
263
|
-
| Version contains `-dev` | `npm publish --
|
|
264
|
-
| Version has no `-dev` suffix | `npm publish --
|
|
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 (
|
|
284
|
+
# 🔐 CI/CD Authentication (Granular Access Token)
|
|
285
285
|
|
|
286
|
-
As of npm's 2025 policy changes, classic automation tokens (`
|
|
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
|
|
294
|
+
The first-time setup must be done once per package:
|
|
295
295
|
|
|
296
|
-
1. Log in to [npmjs.com](https://www.npmjs.com)
|
|
297
|
-
2.
|
|
298
|
-
|
|
299
|
-
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
|
|
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
|
|
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
|
|
314
|
+
## If publish fails
|
|
310
315
|
|
|
311
|
-
|
|
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
|
-
|
|
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
|
-
|
|
254
|
+
</>
|
|
253
255
|
);
|
|
254
256
|
}
|
|
255
257
|
export default function GlobalHeader(props) {
|