Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
140 lines (108 loc) · 4.05 KB
/
Copy pathjustfile
File metadata and controls
140 lines (108 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
set quiet
# Purview-Dev website — cross-platform task runner.
# Requires: Bun (>= 1.4.2), Just (>= 1.30). All heavy lifting lives in Bun scripts.
set shell := ["sh", "-cu"]
set windows-shell := ["pwsh", "-NoProfile", "-Command"]
[private]
default:
just --list
# Install dependencies and install Git hooks.
install:
bun install
bunx lefthook install
# Install only the Git hooks.
install-hooks:
bunx lefthook install
# Cache-first so a recipe that runs after another sync does not re-fetch every
# release, package and documentation page a second time. `just validate` relies
# on this: its first sync is live on a fresh checkout and its build reuses it.
# Refresh docs mirrors and release data (cache-first).
data-sync:
bun run data:sync
# Refresh docs mirrors and release data (live mode).
[env("DATA_MODE", "live")]
live-data-sync:
bun run data:sync
# Start the dev server (runs data sync first so docs are available).
dev:
bun run data:sync
bun run dev
# Format all supported files and auto-fix lint issues.
format:
bun run format
bun run lint:fix
# Verify formatting without modifying files.
format-check:
bun run format:check
# Lint all files.
lint:
bun run lint
# Type-check the project (Astro check + strict TypeScript).
typecheck:
bun run data:sync
bun run typecheck
# Run the deterministic unit test suite.
test:
bun run test
# Assert the built output (llms files, sitemap, robots, no secrets).
test-dist:
bun run test:dist
# The data sync is cache-first: on a fresh checkout it fetches live, and
# otherwise it reuses the release cache and the docs mirror built from it, so a
# recipe that runs after another sync does not re-fetch everything a second
# time. Run `just live-data-sync` first when a build must use freshly fetched
# data.
# Produce a production build (dependency: data sync).
build: data-sync
bun run build
# Full CI validation chain used by the shared build pipeline (data sync → typecheck → build → checks).
ci-build:
bun run ci:build
# Preview the production build locally.
preview:
bun run preview
# Validate branding sources and generated public assets.
check-assets:
bun run check:assets
# Validate internal links across the built site.
check-links:
bun run check:links
# Validate generated data mirrors and caches are current and well-formed.
check-generated:
bun run check:generated
# Validate the project catalogue: docs resolution, stability, metadata, packages, use cases.
check-projects:
bun run check:projects
# Validate search-engine metadata in the built site (titles, canonicals, headings, structured data).
check-seo:
bun run check:seo
# Apply the guard's auto-fixes to the project records (dry run; pass --write to apply).
fix-projects *ARGS:
bun run fix:projects {{ARGS}}
# Validate the generated discovery artifacts (sitemaps, robots, llms, discover.json).
discovery-validate:
bun run discovery:validate
# Compare the upstream repositories and packages with what the deployed site was built from (ADR 0014).
upstream-check:
bun run upstream:state --compare https://purview.dev/_discovery/upstream.json
# Regenerate discovery artifacts in dist/ from the current caches (no full build).
discovery-manifest:
bun run discovery:manifest
# Notify IndexNow about changed URLs after a production deploy (pass --dry-run locally).
discovery-indexnow *ARGS:
bun run discovery:indexnow {{ARGS}}
# Write the IndexNow key verification file from the INDEXNOW_KEY secret/config.
discovery-key:
bun run discovery:key
# Refresh release data from live GitHub/NuGet sources.
fetch-releases:
bun run fetch:releases
# Rebuild committed test fixtures from live sources.
refresh-fixtures:
bun run refresh:fixtures
# Remove build output, caches, and generated mirrors.
clean:
bun run clean
# Authoritative validation: run everything needed to prove the site is safe to merge.
validate: format-check lint typecheck test check-assets check-projects build discovery-validate check-seo check-links check-generated test-dist
@echo "Validation passed."