starlight-mega-menu 1.0.2 → 1.0.4
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.
- package/.github/dependabot.yml +40 -0
- package/.github/workflows/release.yml +2 -2
- package/.pre-commit-config.yaml +91 -0
- package/CLAUDE.md +254 -8
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
updates:
|
|
4
|
+
# --- GitHub Actions ---
|
|
5
|
+
- package-ecosystem: "github-actions"
|
|
6
|
+
directory: "/"
|
|
7
|
+
schedule:
|
|
8
|
+
interval: "weekly"
|
|
9
|
+
day: "monday"
|
|
10
|
+
commit-message:
|
|
11
|
+
prefix: "chore(deps):"
|
|
12
|
+
labels:
|
|
13
|
+
- "dependencies"
|
|
14
|
+
assignees:
|
|
15
|
+
- "robinmordasiewicz"
|
|
16
|
+
open-pull-requests-limit: 10
|
|
17
|
+
groups:
|
|
18
|
+
actions-minor-patch:
|
|
19
|
+
update-types:
|
|
20
|
+
- "minor"
|
|
21
|
+
- "patch"
|
|
22
|
+
|
|
23
|
+
# --- npm ---
|
|
24
|
+
- package-ecosystem: "npm"
|
|
25
|
+
directory: "/"
|
|
26
|
+
schedule:
|
|
27
|
+
interval: "weekly"
|
|
28
|
+
day: "monday"
|
|
29
|
+
commit-message:
|
|
30
|
+
prefix: "chore(deps):"
|
|
31
|
+
labels:
|
|
32
|
+
- "dependencies"
|
|
33
|
+
assignees:
|
|
34
|
+
- "robinmordasiewicz"
|
|
35
|
+
open-pull-requests-limit: 10
|
|
36
|
+
groups:
|
|
37
|
+
npm-minor-patch:
|
|
38
|
+
update-types:
|
|
39
|
+
- "minor"
|
|
40
|
+
- "patch"
|
|
@@ -27,12 +27,12 @@ jobs:
|
|
|
27
27
|
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'chore(release):')"
|
|
28
28
|
steps:
|
|
29
29
|
- name: Checkout
|
|
30
|
-
uses: actions/checkout@
|
|
30
|
+
uses: actions/checkout@v6
|
|
31
31
|
with:
|
|
32
32
|
fetch-depth: 0
|
|
33
33
|
|
|
34
34
|
- name: Setup Node.js
|
|
35
|
-
uses: actions/setup-node@
|
|
35
|
+
uses: actions/setup-node@v6
|
|
36
36
|
with:
|
|
37
37
|
node-version: 'lts/*'
|
|
38
38
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
# =============================================================================
|
|
3
|
+
# GOVERNANCE CHECKS (fail-fast)
|
|
4
|
+
#
|
|
5
|
+
# These run FIRST. Direct commits to main are forbidden — all changes must
|
|
6
|
+
# go through a pull request linked to a GitHub issue. If this hook fails:
|
|
7
|
+
#
|
|
8
|
+
# 1. Create a GitHub issue describing the change
|
|
9
|
+
# 2. Create a feature branch: git checkout -b feat/<issue>-description
|
|
10
|
+
# 3. Commit to the feature branch, then open a PR with "Closes #<issue>"
|
|
11
|
+
#
|
|
12
|
+
# See CONTRIBUTING.md for the full workflow.
|
|
13
|
+
# =============================================================================
|
|
14
|
+
repos:
|
|
15
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
16
|
+
rev: v6.0.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: no-commit-to-branch
|
|
19
|
+
name: "GOVERNANCE: never commit directly to main"
|
|
20
|
+
args: ["--branch", "main"]
|
|
21
|
+
|
|
22
|
+
# ===========================================================================
|
|
23
|
+
# Repository-specific hooks (escape hatch)
|
|
24
|
+
#
|
|
25
|
+
# Runs scripts/pre-commit-local.sh if present and executable. Repos use
|
|
26
|
+
# this for language-specific checks (ruff, eslint, tsc, etc.) that do not
|
|
27
|
+
# belong in the universal config.
|
|
28
|
+
# ===========================================================================
|
|
29
|
+
- repo: local
|
|
30
|
+
hooks:
|
|
31
|
+
- id: local-hooks
|
|
32
|
+
name: Repository-specific hooks
|
|
33
|
+
entry: bash -c 'if [ -x scripts/pre-commit-local.sh ]; then scripts/pre-commit-local.sh; fi'
|
|
34
|
+
language: system
|
|
35
|
+
always_run: true
|
|
36
|
+
pass_filenames: false
|
|
37
|
+
|
|
38
|
+
# ===========================================================================
|
|
39
|
+
# File hygiene
|
|
40
|
+
# ===========================================================================
|
|
41
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
42
|
+
rev: v6.0.0
|
|
43
|
+
hooks:
|
|
44
|
+
- id: trailing-whitespace
|
|
45
|
+
- id: end-of-file-fixer
|
|
46
|
+
- id: mixed-line-ending
|
|
47
|
+
args: ["--fix=lf"]
|
|
48
|
+
- id: check-yaml
|
|
49
|
+
args: ["--allow-multiple-documents"]
|
|
50
|
+
- id: check-json
|
|
51
|
+
- id: check-added-large-files
|
|
52
|
+
args: ["--maxkb=1024"]
|
|
53
|
+
- id: check-merge-conflict
|
|
54
|
+
- id: detect-private-key
|
|
55
|
+
|
|
56
|
+
# ===========================================================================
|
|
57
|
+
# Security
|
|
58
|
+
# ===========================================================================
|
|
59
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
60
|
+
rev: v8.30.0
|
|
61
|
+
hooks:
|
|
62
|
+
- id: gitleaks
|
|
63
|
+
|
|
64
|
+
# ===========================================================================
|
|
65
|
+
# Linting
|
|
66
|
+
# ===========================================================================
|
|
67
|
+
- repo: https://github.com/adrienverge/yamllint
|
|
68
|
+
rev: v1.38.0
|
|
69
|
+
hooks:
|
|
70
|
+
- id: yamllint
|
|
71
|
+
|
|
72
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
73
|
+
rev: v0.47.0
|
|
74
|
+
hooks:
|
|
75
|
+
- id: markdownlint
|
|
76
|
+
args: ["--fix"]
|
|
77
|
+
|
|
78
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
79
|
+
rev: v0.11.0.1
|
|
80
|
+
hooks:
|
|
81
|
+
- id: shellcheck
|
|
82
|
+
|
|
83
|
+
- repo: https://github.com/rhysd/actionlint
|
|
84
|
+
rev: v1.7.10
|
|
85
|
+
hooks:
|
|
86
|
+
- id: actionlint
|
|
87
|
+
|
|
88
|
+
ci:
|
|
89
|
+
autofix_prs: true
|
|
90
|
+
autoupdate_schedule: weekly
|
|
91
|
+
skip: [local-hooks, gitleaks]
|
package/CLAUDE.md
CHANGED
|
@@ -2,17 +2,102 @@
|
|
|
2
2
|
|
|
3
3
|
## Repository Workflow
|
|
4
4
|
|
|
5
|
-
This repo enforces a strict governance workflow.
|
|
5
|
+
This repo enforces a strict governance workflow.
|
|
6
|
+
**DO NOT STOP after creating a PR** — the task is
|
|
7
|
+
not complete until the PR is merged, all post-merge
|
|
8
|
+
workflows succeed, and local branches are cleaned.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
2. **Create a feature branch** from `main` — never commit to `main` directly
|
|
9
|
-
3. **Open a PR** that links to the issue using `Closes #N`
|
|
10
|
-
4. **CI must pass** — the "Check linked issues" check blocks PRs without a linked issue
|
|
11
|
-
5. **Merge** — squash merge preferred, branch auto-deletes after merge
|
|
10
|
+
### Making Changes (Steps 1-5)
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
1. **Create a GitHub issue** before making any
|
|
13
|
+
changes
|
|
14
|
+
2. **Create a feature branch** from `main` — never
|
|
15
|
+
commit to `main` directly
|
|
16
|
+
3. **Commit changes** with conventional format
|
|
17
|
+
(`feat:`, `fix:`, `docs:`) and push to remote
|
|
18
|
+
4. **Open a PR** that links to the issue using
|
|
19
|
+
`Closes #N` — fill out the PR template completely
|
|
20
|
+
5. **Fix any CI failures** — monitor checks with
|
|
21
|
+
`gh pr checks <NUMBER>`, fix locally, push to
|
|
22
|
+
trigger re-runs
|
|
14
23
|
|
|
15
|
-
|
|
24
|
+
### Waiting for Auto-Merge (Step 6)
|
|
25
|
+
|
|
26
|
+
6. **Wait for auto-merge** — PRs merge automatically
|
|
27
|
+
(squash) once all CI checks pass. Poll until the
|
|
28
|
+
PR state is `MERGED`:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
gh pr view <NUMBER> --json state --jq '.state'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If the PR is not merging, check for issues:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
gh pr view <NUMBER> --json mergeable,mergeStateStatus
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Post-Merge Monitoring (Steps 7-8)
|
|
41
|
+
|
|
42
|
+
7. **Monitor post-merge workflows** — merging to
|
|
43
|
+
`main` triggers additional workflows (docs
|
|
44
|
+
builds, governance sync, etc.). Discover and
|
|
45
|
+
watch them:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
git checkout main && git pull origin main
|
|
49
|
+
MERGE_SHA=$(git rev-parse HEAD)
|
|
50
|
+
sleep 10
|
|
51
|
+
gh run list --branch main --commit $MERGE_SHA
|
|
52
|
+
gh run watch <RUN-ID> --exit-status
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
8. **Iterate on failures** — if any workflow fails:
|
|
56
|
+
- View logs: `gh run view <RUN-ID> --log-failed`
|
|
57
|
+
- Analyze the root cause
|
|
58
|
+
- Fix the code locally
|
|
59
|
+
- Create a new issue, branch, and PR with the fix
|
|
60
|
+
- Return to Step 5 and repeat until all workflows
|
|
61
|
+
pass
|
|
62
|
+
- For pre-existing failures unrelated to your
|
|
63
|
+
changes: create a GitHub issue (per CI
|
|
64
|
+
Monitoring rules below) and continue
|
|
65
|
+
|
|
66
|
+
### Cleanup (Steps 9-10)
|
|
67
|
+
|
|
68
|
+
9. **Clean up branches** — only after all workflows
|
|
69
|
+
succeed. Delete your feature branch and any other
|
|
70
|
+
stale local branches already merged to `main`:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
git branch -d <branch-name>
|
|
74
|
+
git branch --merged main | grep -v '^\*\|main' | xargs -r git branch -d
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
10. **Verify completion** — confirm clean state:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
git status
|
|
81
|
+
git branch
|
|
82
|
+
gh run list --branch main --limit 5
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Task Completion Criteria
|
|
86
|
+
|
|
87
|
+
A task is **not complete** until ALL of the
|
|
88
|
+
following are true:
|
|
89
|
+
|
|
90
|
+
- GitHub issue created and linked to PR
|
|
91
|
+
- PR merged to `main` via auto-merge
|
|
92
|
+
- All workflows triggered by the merge completed
|
|
93
|
+
successfully
|
|
94
|
+
- Local feature branch deleted
|
|
95
|
+
- No stale merged branches remain locally
|
|
96
|
+
- Current branch is `main` with clean working tree
|
|
97
|
+
|
|
98
|
+
If any post-merge workflow fails due to your
|
|
99
|
+
changes, fix and resubmit. Do not clean up branches
|
|
100
|
+
until all workflows are green.
|
|
16
101
|
|
|
17
102
|
## Branch Naming
|
|
18
103
|
|
|
@@ -29,6 +114,167 @@ Use the format `<prefix>/<issue-number>-short-description`:
|
|
|
29
114
|
- Every PR must link to an issue
|
|
30
115
|
- Fill out the PR template completely
|
|
31
116
|
- Follow conventional commit messages (`feat:`, `fix:`, `docs:`)
|
|
117
|
+
- Never consider a task complete until post-merge workflows pass
|
|
118
|
+
- Always delete local feature branches after successful merge
|
|
119
|
+
- Always clean up stale merged branches and workspace clutter when noticed
|
|
120
|
+
|
|
121
|
+
## CI Monitoring and Problem Reporting
|
|
122
|
+
|
|
123
|
+
When monitoring CI workflows, **never ignore
|
|
124
|
+
failures** — even pre-existing or unrelated ones.
|
|
125
|
+
You are authorized to create GitHub issues without
|
|
126
|
+
asking for confirmation. This is a standing
|
|
127
|
+
instruction, not a suggestion.
|
|
128
|
+
|
|
129
|
+
For every problem observed:
|
|
130
|
+
|
|
131
|
+
1. **Immediately create a GitHub issue** — do not
|
|
132
|
+
ask whether to create it, just create it
|
|
133
|
+
- Use a clear, descriptive title
|
|
134
|
+
- Include the workflow run URL or relevant logs
|
|
135
|
+
- Note it was discovered during CI monitoring
|
|
136
|
+
- Apply the `bug` label
|
|
137
|
+
2. **Continue with your primary task** — issue
|
|
138
|
+
creation must not block your current work
|
|
139
|
+
3. **Report to the user** what issues you created
|
|
140
|
+
|
|
141
|
+
Do not ask "Want me to create an issue?" — the
|
|
142
|
+
answer is always yes. See a problem, file an issue,
|
|
143
|
+
move on.
|
|
144
|
+
|
|
145
|
+
## Workspace Hygiene
|
|
146
|
+
|
|
147
|
+
Apply the same proactive approach as CI monitoring
|
|
148
|
+
to local workspace cleanliness. Do not ignore
|
|
149
|
+
problems just because they predate your current
|
|
150
|
+
task.
|
|
151
|
+
|
|
152
|
+
When you notice stale local branches, leftover
|
|
153
|
+
files, or other workspace issues:
|
|
154
|
+
|
|
155
|
+
1. **Fix it immediately** — delete merged branches,
|
|
156
|
+
remove temp files, clean up artifacts
|
|
157
|
+
2. **Report what you cleaned** — tell the user what
|
|
158
|
+
housekeeping you performed
|
|
159
|
+
3. **Do not skip cleanup because "it's not my
|
|
160
|
+
task"** — a clean workspace is everyone's
|
|
161
|
+
responsibility
|
|
162
|
+
|
|
163
|
+
Stale branch cleanup command:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
git branch --merged main | grep -v '^\*\|main' | xargs -r git branch -d
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Documentation Pipeline
|
|
170
|
+
|
|
171
|
+
All repos publish docs to GitHub Pages using a
|
|
172
|
+
shared pipeline:
|
|
173
|
+
|
|
174
|
+
| Repo | Role |
|
|
175
|
+
| ---- | ---- |
|
|
176
|
+
| `f5xc-docs-theme` | Astro/Starlight config, CSS, logos, layout |
|
|
177
|
+
| `f5xc-docs-builder` | Dockerfile, npm deps, build scripts |
|
|
178
|
+
| `f5xc-template` | CI workflow, governance files |
|
|
179
|
+
|
|
180
|
+
Content repos only need a `docs/` directory — the
|
|
181
|
+
build container and workflow handle everything else.
|
|
182
|
+
CI builds trigger when files in `docs/` change on
|
|
183
|
+
`main`.
|
|
184
|
+
|
|
185
|
+
### Where to make changes
|
|
186
|
+
|
|
187
|
+
- **Site appearance, navigation, or Astro config** —
|
|
188
|
+
change `f5xc-docs-theme` (owns
|
|
189
|
+
`astro.config.mjs`, `content.config.ts`,
|
|
190
|
+
CSS, and logos)
|
|
191
|
+
- **Build process, Docker image, or npm deps** —
|
|
192
|
+
change `f5xc-docs-builder` (owns the
|
|
193
|
+
Dockerfile and dependency set)
|
|
194
|
+
- **CI workflow or governance files** —
|
|
195
|
+
change `f5xc-template`
|
|
196
|
+
- **Page content and images** —
|
|
197
|
+
change the `docs/` directory in the content
|
|
198
|
+
repo itself
|
|
199
|
+
- **Never** add `astro.config.mjs`,
|
|
200
|
+
`package.json`, or build config to a content
|
|
201
|
+
repo — the pipeline provides these
|
|
202
|
+
|
|
203
|
+
## Content Authoring
|
|
204
|
+
|
|
205
|
+
### Structure
|
|
206
|
+
|
|
207
|
+
- Place `.md` or `.mdx` files in the `docs/`
|
|
208
|
+
directory
|
|
209
|
+
- `docs/index.mdx` is required — include YAML
|
|
210
|
+
frontmatter with at least a `title:` field
|
|
211
|
+
- Static assets (images, diagrams) go in
|
|
212
|
+
subdirectories like `docs/images/` — folders
|
|
213
|
+
with no `.md`/`.mdx` files are auto-mounted
|
|
214
|
+
as public assets
|
|
215
|
+
- Reference assets with root-relative paths:
|
|
216
|
+
``
|
|
217
|
+
|
|
218
|
+
### MDX Rules
|
|
219
|
+
|
|
220
|
+
- Bare `<` is treated as a JSX tag — use `<`
|
|
221
|
+
or wrap in backtick inline code
|
|
222
|
+
- `{` and `}` are JSX expressions — use `\{`
|
|
223
|
+
and `\}` or wrap in backtick inline code
|
|
224
|
+
- Never use curly braces in `.mdx` filenames
|
|
225
|
+
|
|
226
|
+
### Local Preview
|
|
227
|
+
|
|
228
|
+
Run the live dev server (restart to pick up
|
|
229
|
+
changes):
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
docker run --rm -it \
|
|
233
|
+
-v "$(pwd)/docs:/content/docs" \
|
|
234
|
+
-p 4321:4321 \
|
|
235
|
+
--entrypoint sh \
|
|
236
|
+
ghcr.io/robinmordasiewicz/f5xc-docs-builder:latest \
|
|
237
|
+
-c '
|
|
238
|
+
npm install --legacy-peer-deps && \
|
|
239
|
+
npm update --legacy-peer-deps && \
|
|
240
|
+
cp /app/node_modules/f5xc-docs-theme/astro.config.mjs \
|
|
241
|
+
/app/astro.config.mjs && \
|
|
242
|
+
cp /app/node_modules/f5xc-docs-theme/src/content.config.ts \
|
|
243
|
+
/app/src/content.config.ts && \
|
|
244
|
+
cp -r /content/docs/* /app/src/content/docs/ && \
|
|
245
|
+
DOCS_TITLE=$(grep -m1 "^title:" /app/src/content/docs/index.mdx \
|
|
246
|
+
| sed "s/title: *[\"]*//;s/[\"]*$//") \
|
|
247
|
+
npx astro dev --host
|
|
248
|
+
'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Open `http://localhost:4321`. File changes on the
|
|
252
|
+
host require restarting the container.
|
|
253
|
+
|
|
254
|
+
If your `docs/` directory contains static asset
|
|
255
|
+
subdirectories (images, diagrams — folders with
|
|
256
|
+
no `.md`/`.mdx` files), add a volume mount for
|
|
257
|
+
each one so they are served as public assets:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
-v "$(pwd)/docs/images:/app/public/images:ro"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
For a full production build:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
docker run --rm \
|
|
267
|
+
-v "$(pwd)/docs:/content/docs:ro" \
|
|
268
|
+
-v "$(pwd)/output:/output" \
|
|
269
|
+
-e GITHUB_REPOSITORY="<owner>/<repo>" \
|
|
270
|
+
ghcr.io/robinmordasiewicz/f5xc-docs-builder:latest
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Serve with `npx serve output/ -l 8080` and open
|
|
274
|
+
`http://localhost:8080/<repo>/`.
|
|
275
|
+
|
|
276
|
+
Full content authoring guide:
|
|
277
|
+
<https://robinmordasiewicz.github.io/f5xc-docs-builder/06-content-authors/>
|
|
32
278
|
|
|
33
279
|
## Reference
|
|
34
280
|
|