@fuzdev/fuz_gitops 0.78.0 → 0.79.0
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/README.md +91 -17
- package/dist/ModulesDetail.svelte +22 -27
- package/dist/ModulesDetail.svelte.d.ts.map +1 -1
- package/dist/ModulesNav.svelte +8 -5
- package/dist/ModulesNav.svelte.d.ts.map +1 -1
- package/dist/ModulesPage.svelte +3 -5
- package/dist/ModulesPage.svelte.d.ts.map +1 -1
- package/dist/PageFooter.svelte +2 -2
- package/dist/PageHeader.svelte +6 -6
- package/dist/PageHeader.svelte.d.ts +0 -3
- package/dist/PageHeader.svelte.d.ts.map +1 -1
- package/dist/PullRequestsDetail.svelte +29 -20
- package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
- package/dist/PullRequestsPage.svelte +4 -6
- package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
- package/dist/ReposTable.svelte +43 -55
- package/dist/ReposTable.svelte.d.ts.map +1 -1
- package/dist/ReposTree.svelte +9 -21
- package/dist/ReposTree.svelte.d.ts.map +1 -1
- package/dist/ReposTreeNav.svelte +9 -12
- package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
- package/dist/TablePage.svelte +3 -5
- package/dist/TablePage.svelte.d.ts.map +1 -1
- package/dist/TreeItemPage.svelte +3 -5
- package/dist/TreeItemPage.svelte.d.ts.map +1 -1
- package/dist/TreePage.svelte +3 -5
- package/dist/TreePage.svelte.d.ts.map +1 -1
- package/dist/changeset_generator.d.ts.map +1 -1
- package/dist/changeset_generator.js +2 -2
- package/dist/changeset_reader.d.ts.map +1 -1
- package/dist/changeset_reader.js +3 -3
- package/dist/ci_reconcile.d.ts +6 -10
- package/dist/ci_reconcile.d.ts.map +1 -1
- package/dist/ci_reconcile.js +6 -8
- package/dist/dependency_graph.d.ts +26 -49
- package/dist/dependency_graph.d.ts.map +1 -1
- package/dist/dependency_graph.js +40 -83
- package/dist/dependency_updater.d.ts +1 -1
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +14 -9
- package/dist/fetch_repo_data.d.ts +34 -8
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +44 -22
- package/dist/fs_fetch_value_cache.d.ts +1 -1
- package/dist/fs_fetch_value_cache.d.ts.map +1 -1
- package/dist/fs_fetch_value_cache.js +3 -3
- package/dist/git_operations.d.ts +6 -49
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +13 -126
- package/dist/github.d.ts +17 -2
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +17 -8
- package/dist/github_helpers.d.ts.map +1 -1
- package/dist/github_helpers.js +3 -11
- package/dist/gitops_analyze.task.d.ts +24 -2
- package/dist/gitops_analyze.task.d.ts.map +1 -1
- package/dist/gitops_analyze.task.js +47 -34
- package/dist/gitops_config.d.ts +34 -79
- package/dist/gitops_config.d.ts.map +1 -1
- package/dist/gitops_config.js +76 -53
- package/dist/gitops_constants.d.ts +6 -4
- package/dist/gitops_constants.d.ts.map +1 -1
- package/dist/gitops_constants.js +6 -4
- package/dist/gitops_plan.task.d.ts +29 -3
- package/dist/gitops_plan.task.d.ts.map +1 -1
- package/dist/gitops_plan.task.js +83 -61
- package/dist/gitops_publish.task.d.ts +62 -2
- package/dist/gitops_publish.task.d.ts.map +1 -1
- package/dist/gitops_publish.task.js +193 -105
- package/dist/gitops_run.task.d.ts +74 -0
- package/dist/gitops_run.task.d.ts.map +1 -1
- package/dist/gitops_run.task.js +176 -162
- package/dist/gitops_sync.task.d.ts +65 -3
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +163 -37
- package/dist/gitops_task_helpers.d.ts +86 -59
- package/dist/gitops_task_helpers.d.ts.map +1 -1
- package/dist/gitops_task_helpers.js +120 -79
- package/dist/gitops_validate.task.d.ts +1 -2
- package/dist/gitops_validate.task.d.ts.map +1 -1
- package/dist/gitops_validate.task.js +25 -32
- package/dist/graph_validation.d.ts +16 -27
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +24 -65
- package/dist/local_repo.d.ts +50 -62
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +83 -196
- package/dist/log_helpers.d.ts +8 -8
- package/dist/log_helpers.d.ts.map +1 -1
- package/dist/multi_repo_publisher.d.ts +10 -0
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +125 -61
- package/dist/npm_registry.d.ts +23 -19
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +21 -48
- package/dist/operations.d.ts +75 -180
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +15 -7
- package/dist/operations_defaults.d.ts +17 -2
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +111 -128
- package/dist/output_helpers.d.ts +36 -0
- package/dist/output_helpers.d.ts.map +1 -1
- package/dist/output_helpers.js +37 -3
- package/dist/preflight_checks.d.ts +20 -27
- package/dist/preflight_checks.d.ts.map +1 -1
- package/dist/preflight_checks.js +37 -126
- package/dist/publish_gate.d.ts.map +1 -1
- package/dist/publish_steps.d.ts +2 -4
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +4 -8
- package/dist/publishing_event.d.ts +2 -8
- package/dist/publishing_event.d.ts.map +1 -1
- package/dist/publishing_event.js +20 -17
- package/dist/publishing_event_handler.d.ts +10 -8
- package/dist/publishing_event_handler.d.ts.map +1 -1
- package/dist/publishing_event_handler.js +19 -17
- package/dist/publishing_plan.d.ts +16 -1
- package/dist/publishing_plan.d.ts.map +1 -1
- package/dist/publishing_plan.js +332 -254
- package/dist/publishing_plan_helpers.d.ts.map +1 -1
- package/dist/publishing_plan_helpers.js +3 -3
- package/dist/publishing_plan_logging.d.ts +1 -1
- package/dist/publishing_plan_logging.d.ts.map +1 -1
- package/dist/publishing_plan_logging.js +22 -15
- package/dist/repo.svelte.d.ts +7 -0
- package/dist/repo.svelte.d.ts.map +1 -1
- package/dist/repo.svelte.js +3 -0
- package/dist/repo_readiness.d.ts +210 -0
- package/dist/repo_readiness.d.ts.map +1 -0
- package/dist/repo_readiness.js +516 -0
- package/dist/repos_status.d.ts +3340 -0
- package/dist/repos_status.d.ts.map +1 -0
- package/dist/repos_status.js +555 -0
- package/dist/repos_status_load.d.ts +65 -0
- package/dist/repos_status_load.d.ts.map +1 -0
- package/dist/repos_status_load.js +131 -0
- package/dist/version_utils.js +1 -1
- package/package.json +15 -34
- package/src/lib/cargo_toml.ts +3 -3
- package/src/lib/changeset_generator.ts +19 -19
- package/src/lib/changeset_reader.ts +18 -18
- package/src/lib/ci_reconcile.ts +12 -16
- package/src/lib/dependency_graph.ts +61 -113
- package/src/lib/dependency_updater.ts +36 -30
- package/src/lib/fetch_repo_data.ts +71 -34
- package/src/lib/fs_fetch_value_cache.ts +15 -11
- package/src/lib/git_operations.ts +22 -194
- package/src/lib/github.ts +33 -21
- package/src/lib/github_helpers.ts +9 -16
- package/src/lib/gitops_analyze.task.ts +104 -66
- package/src/lib/gitops_config.ts +90 -139
- package/src/lib/gitops_constants.ts +6 -4
- package/src/lib/gitops_plan.task.ts +128 -76
- package/src/lib/gitops_publish.task.ts +280 -144
- package/src/lib/gitops_run.task.ts +265 -193
- package/src/lib/gitops_sync.task.ts +236 -52
- package/src/lib/gitops_task_helpers.ts +170 -114
- package/src/lib/gitops_validate.task.ts +44 -54
- package/src/lib/graph_validation.ts +28 -89
- package/src/lib/local_repo.ts +128 -335
- package/src/lib/log_helpers.ts +18 -28
- package/src/lib/multi_repo_publisher.ts +192 -110
- package/src/lib/npm_registry.ts +42 -67
- package/src/lib/operations.ts +99 -160
- package/src/lib/operations_defaults.ts +157 -201
- package/src/lib/output_helpers.ts +58 -6
- package/src/lib/preflight_checks.ts +52 -188
- package/src/lib/publish_gate.ts +7 -9
- package/src/lib/publish_steps.ts +27 -25
- package/src/lib/publishing_event.ts +26 -23
- package/src/lib/publishing_event_handler.ts +24 -22
- package/src/lib/publishing_plan.ts +474 -310
- package/src/lib/publishing_plan_helpers.ts +16 -12
- package/src/lib/publishing_plan_logging.ts +53 -44
- package/src/lib/repo.svelte.ts +16 -8
- package/src/lib/repo_readiness.ts +647 -0
- package/src/lib/repos_status.ts +671 -0
- package/src/lib/repos_status_load.ts +173 -0
- package/src/lib/version_utils.ts +3 -3
- package/dist/config_reconcile.d.ts +0 -46
- package/dist/config_reconcile.d.ts.map +0 -1
- package/dist/config_reconcile.js +0 -60
- package/dist/paths.d.ts +0 -7
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -6
- package/dist/repo_ops.d.ts +0 -59
- package/dist/repo_ops.d.ts.map +0 -1
- package/dist/repo_ops.js +0 -170
- package/dist/resolved_gitops_config.d.ts +0 -9
- package/dist/resolved_gitops_config.d.ts.map +0 -1
- package/dist/resolved_gitops_config.js +0 -12
- package/src/lib/config_reconcile.ts +0 -94
- package/src/lib/paths.ts +0 -6
- package/src/lib/repo_ops.ts +0 -216
- package/src/lib/resolved_gitops_config.ts +0 -27
package/README.md
CHANGED
|
@@ -21,17 +21,50 @@ With fuz_gitops you can:
|
|
|
21
21
|
- publish metadata about your collections of repos to the web for other users and tools
|
|
22
22
|
- publish multiple interdependent packages in dependency order with automatic dependency updates
|
|
23
23
|
|
|
24
|
+
## Scope
|
|
25
|
+
|
|
26
|
+
fuz_gitops runs **deterministic, config-driven operations over a declared set
|
|
27
|
+
of repos** — no LLM in the loop, and the repo set comes from a declared list
|
|
28
|
+
(a `repos.toml` registry, and a `gitops.config.ts` naming a subset of its keys). Publishing is its flagship capability, not its whole
|
|
29
|
+
identity. The Rust `repos` tool in this repo (`crates/fuz_repos`) reports
|
|
30
|
+
every declared repo's git state (`repos status`), syncs them (`repos sync`),
|
|
31
|
+
and is the gateway agents push through (`repos push`); the package is
|
|
32
|
+
renaming to `fuz_repos`.
|
|
33
|
+
|
|
34
|
+
Deliberately out of scope: single-repo build work (that's [gro](https://github.com/fuzdev/gro)),
|
|
35
|
+
work whose resolution differs per repo and needs judgment, machine and server
|
|
36
|
+
state, and **secrets** — fuz_gitops never stores, transports, or reads secret
|
|
37
|
+
material as data, including env-file contents. Its own GitHub API token
|
|
38
|
+
(noted below) is the one credential it uses, to authenticate itself.
|
|
39
|
+
|
|
40
|
+
See [CLAUDE.md](CLAUDE.md#scope-and-boundaries) for the capability tiers, what
|
|
41
|
+
`repos` never does, and the TS/Rust split.
|
|
42
|
+
|
|
24
43
|
## Usage
|
|
25
44
|
|
|
26
45
|
```bash
|
|
27
46
|
npm i -D @fuzdev/fuz_gitops
|
|
28
47
|
```
|
|
29
48
|
|
|
30
|
-
-
|
|
49
|
+
- install the `repos` binary, which the tasks read repo state from — it isn't in the npm
|
|
50
|
+
package: in a checkout of this repo, `cargo install --path crates/fuz_repos --locked`
|
|
51
|
+
- configure [`gitops.config.ts`](/gitops.config.ts) as a list of `repos.toml` registry keys —
|
|
52
|
+
each repo's dir, URL, branch, visibility, and CI come from the registry:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import type { GitopsConfig } from '@fuzdev/fuz_gitops/gitops_config.ts';
|
|
56
|
+
|
|
57
|
+
const config: GitopsConfig = { repos: ['fuz_util', 'gro', 'fuz_ui'] };
|
|
58
|
+
|
|
59
|
+
export default config;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The tasks find the registry the way `repos` does, walking up from the cwd, or take
|
|
63
|
+
`--registry <path>`; a repo the registry has but the disk lacks is cloned by `repos sync <key>`.
|
|
31
64
|
- fuz_gitops calls the GitHub API using the environment variable `SECRET_GITHUB_API_TOKEN` for authorization,
|
|
32
65
|
which is a [classic GitHub token](https://github.com/settings/tokens)
|
|
33
66
|
(with "public access" for public repos, no options selected)
|
|
34
|
-
or a [fine-
|
|
67
|
+
or a [fine-grained GitHub token (beta)](https://github.com/settings/tokens?type=beta)
|
|
35
68
|
(with `"Public Repositories (read-only)"` selected)
|
|
36
69
|
in either `process.env`, a project-local `.env`, or the parent directory at `../.env`
|
|
37
70
|
(currently optional to read public repos, but it's recommended regardless,
|
|
@@ -53,18 +86,21 @@ npm i -D @fuzdev/fuz_gitops
|
|
|
53
86
|
|
|
54
87
|
// gitops_validate.task.ts
|
|
55
88
|
export * from '@fuzdev/fuz_gitops/gitops_validate.task.ts';
|
|
89
|
+
|
|
90
|
+
// gitops_run.task.ts
|
|
91
|
+
export * from '@fuzdev/fuz_gitops/gitops_run.task.ts';
|
|
56
92
|
```
|
|
57
93
|
|
|
58
|
-
- run `gro gitops_sync` to
|
|
94
|
+
- run `gro gitops_sync` to generate the dashboard's data from the repos
|
|
59
95
|
|
|
60
96
|
## Architecture
|
|
61
97
|
|
|
62
98
|
```
|
|
63
|
-
gitops.config.ts → local repos → GitHub API → repos.ts → UI components
|
|
99
|
+
gitops.config.ts (registry keys) → repos status --json → local repos → GitHub API → repos.ts → UI components
|
|
64
100
|
```
|
|
65
101
|
|
|
66
|
-
- **Operations pattern**: Dependency injection for all side effects (git, npm, fs)
|
|
67
|
-
- **Fixture testing**:
|
|
102
|
+
- **Operations pattern**: Dependency injection for all side effects (git, npm, fs, `repos`)
|
|
103
|
+
- **Fixture testing**: In-memory fixture repos with expected publishing outcomes
|
|
68
104
|
- **Changeset-driven**: Automatic version bumps and dependency updates
|
|
69
105
|
|
|
70
106
|
See [CLAUDE.md](CLAUDE.md#architecture) for detailed documentation.
|
|
@@ -84,39 +120,72 @@ gro gitops_run "git status" --format json # JSON output for scripting
|
|
|
84
120
|
- Parallel execution with configurable concurrency (default: 5)
|
|
85
121
|
- Continue-on-error behavior (shows all results)
|
|
86
122
|
- Structured output formats (text or JSON)
|
|
87
|
-
- Uses lightweight repo path resolution
|
|
123
|
+
- Uses lightweight repo path resolution through `repos status`; a
|
|
124
|
+
configured repo that's missing fails the run, naming it
|
|
88
125
|
|
|
89
|
-
###
|
|
126
|
+
### Generating the dashboard's data
|
|
90
127
|
|
|
91
128
|
```bash
|
|
92
|
-
gro gitops_sync #
|
|
93
|
-
gro gitops_sync --
|
|
129
|
+
gro gitops_sync # fetch, check each repo, then write repos.json + repos.ts
|
|
130
|
+
gro gitops_sync --check # the readiness report alone: no fetch, no token, nothing written
|
|
131
|
+
gro gitops_sync --allow_dirty # read repos off their branch, dirty, or mid-operation as they sit, warning instead
|
|
94
132
|
```
|
|
95
133
|
|
|
134
|
+
It reads each repo as it sits and never moves one (`repos sync` does), so it
|
|
135
|
+
refuses a repo off its registry branch, dirty, or mid-operation — the site
|
|
136
|
+
would show that tree's modules beside origin's CI — and warns on one behind
|
|
137
|
+
origin or missing its `node_modules`.
|
|
138
|
+
|
|
96
139
|
### Diagnostic commands (read-only)
|
|
97
140
|
|
|
98
141
|
```bash
|
|
99
|
-
gro gitops_validate # run all validation checks (analyze + plan + dry run)
|
|
142
|
+
gro gitops_validate # run all validation checks (analyze + plan + dry run + CI reconcile)
|
|
100
143
|
gro gitops_analyze # analyze dependency graph and detect cycles
|
|
101
144
|
gro gitops_plan # generate publishing plan showing version changes and cascades
|
|
102
|
-
gro gitops_publish # simulate publishing
|
|
145
|
+
gro gitops_publish # simulate publishing, writing nothing in git (dry run default)
|
|
103
146
|
gro gitops_publish --preview # show the ordered side-effects a --wetrun would perform
|
|
104
147
|
```
|
|
105
148
|
|
|
106
149
|
These read each repo's working tree exactly as it sits on disk — no branch
|
|
107
150
|
switching, pulling, or installing — so they're safe to run with feature
|
|
108
|
-
branches checked out and uncommitted changes.
|
|
109
|
-
(
|
|
110
|
-
`
|
|
151
|
+
branches checked out and uncommitted changes. Each prints the repos that
|
|
152
|
+
aren't at rest (off their registry branch, dirty, mid-rebase, or not in sync
|
|
153
|
+
with origin as of the last fetch); run `repos sync` first to read them at
|
|
154
|
+
rest.
|
|
111
155
|
|
|
112
156
|
### Publishing packages
|
|
113
157
|
|
|
114
158
|
```bash
|
|
115
|
-
gro gitops_publish --wetrun #
|
|
159
|
+
gro gitops_publish --wetrun # publish every package the plan publishes, in dependency order
|
|
116
160
|
gro gitops_publish --wetrun --no-plan # skip plan confirmation
|
|
117
161
|
```
|
|
118
162
|
|
|
119
|
-
|
|
163
|
+
Before it shows the plan for confirmation, a real publish fetches every npm repo
|
|
164
|
+
(`repos status --fetch`) and refuses unless each is on its registry branch,
|
|
165
|
+
clean, idle, and in sync with origin or ahead of it, with no other live
|
|
166
|
+
session in its checkout — naming each problem and its fix. It moves nothing to
|
|
167
|
+
get there, and re-checks each repo the same way right before publishing it.
|
|
168
|
+
|
|
169
|
+
**Note:** If publishing fails, simply re-run the same command.
|
|
170
|
+
Already-published packages are automatically skipped (changesets consumed),
|
|
171
|
+
failed packages retried naturally (see
|
|
172
|
+
[docs/publishing.md](docs/publishing.md#readiness) for what the run leaves
|
|
173
|
+
unpushed).
|
|
174
|
+
|
|
175
|
+
### The `repos` tool
|
|
176
|
+
|
|
177
|
+
A Rust CLI over the repos a `repos.toml` registry declares. It moves refs it
|
|
178
|
+
didn't author — fetch, fast-forward, clone, push — and never commits, rebases,
|
|
179
|
+
merges anything but a fast-forward, force-pushes, or pushes tags. It needs git
|
|
180
|
+
2.44 or newer, and Linux for its detection of live Claude Code sessions.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
cargo install --path crates/fuz_repos --locked # install the `repos` binary
|
|
184
|
+
repos status # git state of every entry, from local refs
|
|
185
|
+
repos status --fetch # fetch from origin first (remote-tracking refs only)
|
|
186
|
+
repos sync # fetch, then fast-forward, push, and clone what's safe
|
|
187
|
+
repos push # push the branch checked out here, as a fast-forward
|
|
188
|
+
```
|
|
120
189
|
|
|
121
190
|
**Documentation:**
|
|
122
191
|
|
|
@@ -125,6 +194,7 @@ gro gitops_publish --wetrun --no-plan # skip plan confirmation
|
|
|
125
194
|
semantics, examples
|
|
126
195
|
- ./docs/troubleshooting.md - Common errors and
|
|
127
196
|
debugging tips
|
|
197
|
+
- ./docs/repos.md - The `repos` command reference
|
|
128
198
|
|
|
129
199
|
Getting started as a dev? Start with [Gro](https://github.com/fuzdev/gro)
|
|
130
200
|
and the [Fuz template](https://github.com/fuzdev/fuz_template).
|
|
@@ -136,6 +206,10 @@ TODO
|
|
|
136
206
|
- think about how fuz_gitops could use both GitHub Actions and
|
|
137
207
|
[Forgejo Actions](https://forgejo.org/docs/v1.20/user/actions/)
|
|
138
208
|
|
|
209
|
+
## Contributing
|
|
210
|
+
|
|
211
|
+
[fuz.dev/contributing](https://www.fuz.dev/contributing)
|
|
212
|
+
|
|
139
213
|
## License [🐦](https://wikipedia.org/wiki/Free_and_open-source_software)
|
|
140
214
|
|
|
141
215
|
[MIT](LICENSE)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {ensure_end} from '@fuzdev/fuz_util/string.ts';
|
|
3
|
-
import {resolve} from '$app/paths';
|
|
4
|
-
import type {Snippet} from 'svelte';
|
|
2
|
+
import { ensure_end } from '@fuzdev/fuz_util/string.ts';
|
|
3
|
+
import { resolve } from '$app/paths';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
5
|
|
|
6
6
|
import ModulesNav from './ModulesNav.svelte';
|
|
7
|
-
import type {Repo} from './repo.svelte.js';
|
|
7
|
+
import type { Repo } from './repo.svelte.js';
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
repos,
|
|
11
|
-
nav_footer
|
|
11
|
+
nav_footer
|
|
12
12
|
}: {
|
|
13
13
|
repos: Array<Repo>; // TODO normalized version with cached primitives?
|
|
14
14
|
nav_footer?: Snippet;
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
|
|
21
21
|
// Get modules from each repo's source_json
|
|
22
22
|
const repos_modules = $derived(
|
|
23
|
-
repos
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.map((repo) => ({
|
|
28
|
-
repo,
|
|
29
|
-
modules: repo.source_json.modules,
|
|
30
|
-
})),
|
|
23
|
+
repos.flatMap((repo) => {
|
|
24
|
+
const { modules } = repo.source_json;
|
|
25
|
+
return modules?.length ? [{ repo, modules }] : [];
|
|
26
|
+
})
|
|
31
27
|
);
|
|
32
28
|
|
|
29
|
+
// TODO this is a hack that could be fixed by adding an optional `base: './'` that defaults to './src/lib/'
|
|
30
|
+
const to_module_url = (repo: Repo, path: string): string =>
|
|
31
|
+
`${ensure_end(repo.repo_url, '/')}blob/${repo.branch}/${path === 'package.json' ? '' : 'src/lib/'}${path}`;
|
|
32
|
+
|
|
33
33
|
// TODO add favicon (from library? gro?)
|
|
34
34
|
</script>
|
|
35
35
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
<ul class="width_atmost_md box unstyled">
|
|
44
44
|
{#each repos_modules as repo_modules (repo_modules)}
|
|
45
|
-
{@const {repo, modules} = repo_modules}
|
|
45
|
+
{@const { repo, modules } = repo_modules}
|
|
46
46
|
<li class="repo-module">
|
|
47
47
|
<header class="width:100% position:relative">
|
|
48
48
|
<a href="#{repo.name}" id={repo.name} class="subtitle">🔗</a>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</header>
|
|
51
51
|
<ul class="modules panel unstyled">
|
|
52
52
|
{#each modules as repo_module (repo_module)}
|
|
53
|
-
{@const {path, declarations} = repo_module}
|
|
53
|
+
{@const { path, declarations } = repo_module}
|
|
54
54
|
<li
|
|
55
55
|
class="module"
|
|
56
56
|
class:ts={path.endsWith('.ts')}
|
|
@@ -59,18 +59,13 @@
|
|
|
59
59
|
class:json={path.endsWith('.json')}
|
|
60
60
|
>
|
|
61
61
|
<div class="module-file">
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
</div>
|
|
71
|
-
{:else}
|
|
72
|
-
<span class="chip">{path}</span>
|
|
73
|
-
{/if}
|
|
62
|
+
<div class="chip row">
|
|
63
|
+
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
|
|
64
|
+
href={to_module_url(repo, path)}
|
|
65
|
+
>
|
|
66
|
+
{path}
|
|
67
|
+
</a>
|
|
68
|
+
</div>
|
|
74
69
|
</div>
|
|
75
70
|
{#if declarations?.length}
|
|
76
71
|
<ul class="declarations unstyled">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ModulesDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,gBAAgB,GAAI;IACxB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAoFH,QAAA,MAAM,aAAa,sDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/dist/ModulesNav.svelte
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {page} from '$app/state';
|
|
2
|
+
import { page } from '$app/state';
|
|
3
3
|
|
|
4
|
-
import type {Repo} from './repo.svelte.js';
|
|
4
|
+
import type { Repo } from './repo.svelte.js';
|
|
5
5
|
|
|
6
6
|
// TODO add highlighting of the items that are onscreen
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
|
-
repos_modules
|
|
9
|
+
repos_modules
|
|
10
10
|
}: {
|
|
11
11
|
repos_modules: Array<{
|
|
12
12
|
repo: Repo;
|
|
@@ -22,9 +22,12 @@
|
|
|
22
22
|
<ul class="unstyled">
|
|
23
23
|
{#each repos_modules as pkg_modules (pkg_modules)}
|
|
24
24
|
<li role="none">
|
|
25
|
-
<a
|
|
26
|
-
|
|
25
|
+
<a
|
|
26
|
+
href="#{pkg_modules.repo.name}"
|
|
27
|
+
class:selected={`#${pkg_modules.repo.name}` === page.url.hash}
|
|
27
28
|
>
|
|
29
|
+
{pkg_modules.repo.name}
|
|
30
|
+
</a>
|
|
28
31
|
</li>
|
|
29
32
|
{/each}
|
|
30
33
|
</ul>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesNav.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ModulesNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesNav.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,gBAAgB,GAAI;IACxB,aAAa,EAAE,KAAK,CAAC;QACpB,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KACxB,CAAC,CAAC;CACH,CAAC;AAgCH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/ModulesPage.svelte
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import PageFooter from './PageFooter.svelte';
|
|
5
5
|
import PageHeader from './PageHeader.svelte';
|
|
6
6
|
import ModulesDetail from './ModulesDetail.svelte';
|
|
7
|
-
import type {Repo} from './repo.svelte.js';
|
|
7
|
+
import type { Repo } from './repo.svelte.js';
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
repo,
|
|
11
|
-
repos
|
|
11
|
+
repos
|
|
12
12
|
}: {
|
|
13
13
|
repo: Repo;
|
|
14
14
|
repos: Array<Repo>;
|
|
@@ -32,9 +32,7 @@
|
|
|
32
32
|
{/snippet}
|
|
33
33
|
</ModulesDetail>
|
|
34
34
|
</section>
|
|
35
|
-
<
|
|
36
|
-
<PageFooter />
|
|
37
|
-
</section>
|
|
35
|
+
<PageFooter />
|
|
38
36
|
</main>
|
|
39
37
|
|
|
40
38
|
<style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesPage.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesPage.svelte"],"names":[],"mappings":"AAQA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ModulesPage.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesPage.svelte"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB,CAAC;AAuCH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
package/dist/PageFooter.svelte
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import DocsFooter from '@fuzdev/fuz_ui/DocsFooter.svelte';
|
|
3
|
-
import {site_context} from '@fuzdev/fuz_ui/site.svelte.ts';
|
|
4
|
-
import {FUZ_DEV_URL} from '@fuzdev/fuz_ui/constants.ts';
|
|
3
|
+
import { site_context } from '@fuzdev/fuz_ui/site.svelte.ts';
|
|
4
|
+
import { FUZ_DEV_URL } from '@fuzdev/fuz_ui/constants.ts';
|
|
5
5
|
import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
|
|
6
6
|
|
|
7
7
|
const site = site_context.get();
|
package/dist/PageHeader.svelte
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {PkgJson} from '@fuzdev/fuz_util/pkg_json.ts';
|
|
2
|
+
import type { PkgJson } from '@fuzdev/fuz_util/pkg_json.ts';
|
|
3
3
|
import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
|
|
4
|
-
import type {Snippet} from 'svelte';
|
|
5
|
-
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
repo,
|
|
9
9
|
nav_attrs,
|
|
10
10
|
attrs,
|
|
11
11
|
nav,
|
|
12
|
-
children
|
|
12
|
+
children
|
|
13
13
|
}: {
|
|
14
|
-
repo: {pkg_json: PkgJson
|
|
14
|
+
repo: { pkg_json: PkgJson };
|
|
15
15
|
nav_attrs?: SvelteHTMLElements['nav'];
|
|
16
16
|
attrs?: SvelteHTMLElements['header'];
|
|
17
17
|
nav?: Snippet;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
{#if nav}
|
|
25
25
|
{@render nav()}
|
|
26
26
|
{:else}
|
|
27
|
-
<nav {...nav_attrs}><Breadcrumb>{repo.pkg_json
|
|
27
|
+
<nav {...nav_attrs}><Breadcrumb>{repo.pkg_json.glyph}</Breadcrumb></nav>
|
|
28
28
|
{/if}
|
|
29
29
|
</header>
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageHeader.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PageHeader.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageHeader.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA6BH,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {resolve} from '$app/paths';
|
|
2
|
+
import { resolve } from '$app/paths';
|
|
3
3
|
|
|
4
|
-
import {to_pull_requests, type FilterPullRequest} from './github_helpers.js';
|
|
5
|
-
import type {Repo} from './repo.svelte.js';
|
|
4
|
+
import { to_pull_requests, to_pull_url, type FilterPullRequest } from './github_helpers.js';
|
|
5
|
+
import type { Repo } from './repo.svelte.js';
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
repos,
|
|
9
|
-
filter_pull_request
|
|
9
|
+
filter_pull_request
|
|
10
10
|
}: {
|
|
11
11
|
repos: Array<Repo>;
|
|
12
12
|
filter_pull_request?: FilterPullRequest | undefined;
|
|
@@ -18,24 +18,33 @@
|
|
|
18
18
|
<div class="width_atmost_md">
|
|
19
19
|
<section class="panel p_sm">
|
|
20
20
|
<table>
|
|
21
|
-
<thead
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th>repo</th>
|
|
24
|
+
<th>number</th>
|
|
25
|
+
<th>title</th>
|
|
26
|
+
</tr>
|
|
27
|
+
</thead>
|
|
22
28
|
<tbody>
|
|
23
|
-
|
|
29
|
+
<!-- PR numbers repeat across repos, so the key pairs them with the repo -->
|
|
30
|
+
{#each pull_requests as { repo, pull_request } (`${repo.name}#${pull_request.number}`)}
|
|
24
31
|
<tr>
|
|
25
|
-
<td
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
>
|
|
32
|
-
<td
|
|
33
|
-
|
|
34
|
-
href=
|
|
35
|
-
title={pull_request.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
<td>
|
|
33
|
+
<a href={resolve(`/tree/${repo.repo_name}`)}>
|
|
34
|
+
{repo.repo_name}{#if repo.package_json.glyph}
|
|
35
|
+
{repo.package_json.glyph}
|
|
36
|
+
{/if}
|
|
37
|
+
</a>
|
|
38
|
+
</td>
|
|
39
|
+
<td>
|
|
40
|
+
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
|
|
41
|
+
href={to_pull_url(repo.repo_url, pull_request)}
|
|
42
|
+
title={pull_request.title}
|
|
43
|
+
>
|
|
44
|
+
#{pull_request.number}
|
|
45
|
+
</a>
|
|
46
|
+
</td>
|
|
47
|
+
<td><div>{pull_request.title}</div></td>
|
|
39
48
|
</tr>
|
|
40
49
|
{/each}
|
|
41
50
|
</tbody>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestsDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PullRequestsDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"PullRequestsDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PullRequestsDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,EAAiC,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,gBAAgB,GAAI;IACxB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACpD,CAAC;AAoDH,QAAA,MAAM,kBAAkB,sDAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import PageFooter from './PageFooter.svelte';
|
|
3
3
|
import PageHeader from './PageHeader.svelte';
|
|
4
4
|
import PullRequestsDetail from './PullRequestsDetail.svelte';
|
|
5
|
-
import type {FilterPullRequest} from './github_helpers.js';
|
|
6
|
-
import type {Repo} from './repo.svelte.js';
|
|
5
|
+
import type { FilterPullRequest } from './github_helpers.js';
|
|
6
|
+
import type { Repo } from './repo.svelte.js';
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
repo,
|
|
10
10
|
repos,
|
|
11
|
-
filter_pull_request
|
|
11
|
+
filter_pull_request
|
|
12
12
|
}: {
|
|
13
13
|
repo: Repo;
|
|
14
14
|
repos: Array<Repo>;
|
|
@@ -27,9 +27,7 @@
|
|
|
27
27
|
<section>
|
|
28
28
|
<PullRequestsDetail {repos} {filter_pull_request} />
|
|
29
29
|
</section>
|
|
30
|
-
<
|
|
31
|
-
<PageFooter />
|
|
32
|
-
</section>
|
|
30
|
+
<PageFooter />
|
|
33
31
|
</main>
|
|
34
32
|
|
|
35
33
|
<style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestsPage.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PullRequestsPage.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PullRequestsPage.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PullRequestsPage.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE5C,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACpD,CAAC;AAiCH,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|