@fuzdev/fuz_gitops 0.57.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.
Files changed (190) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/ModulesDetail.svelte +180 -0
  4. package/dist/ModulesDetail.svelte.d.ts +10 -0
  5. package/dist/ModulesDetail.svelte.d.ts.map +1 -0
  6. package/dist/ModulesNav.svelte +43 -0
  7. package/dist/ModulesNav.svelte.d.ts +11 -0
  8. package/dist/ModulesNav.svelte.d.ts.map +1 -0
  9. package/dist/ModulesPage.svelte +50 -0
  10. package/dist/ModulesPage.svelte.d.ts +9 -0
  11. package/dist/ModulesPage.svelte.d.ts.map +1 -0
  12. package/dist/PageFooter.svelte +15 -0
  13. package/dist/PageFooter.svelte.d.ts +19 -0
  14. package/dist/PageFooter.svelte.d.ts.map +1 -0
  15. package/dist/PageHeader.svelte +35 -0
  16. package/dist/PageHeader.svelte.d.ts +19 -0
  17. package/dist/PageHeader.svelte.d.ts.map +1 -0
  18. package/dist/PullRequestsDetail.svelte +53 -0
  19. package/dist/PullRequestsDetail.svelte.d.ts +10 -0
  20. package/dist/PullRequestsDetail.svelte.d.ts.map +1 -0
  21. package/dist/PullRequestsPage.svelte +47 -0
  22. package/dist/PullRequestsPage.svelte.d.ts +11 -0
  23. package/dist/PullRequestsPage.svelte.d.ts.map +1 -0
  24. package/dist/ReposTable.svelte +189 -0
  25. package/dist/ReposTable.svelte.d.ts +9 -0
  26. package/dist/ReposTable.svelte.d.ts.map +1 -0
  27. package/dist/ReposTree.svelte +88 -0
  28. package/dist/ReposTree.svelte.d.ts +11 -0
  29. package/dist/ReposTree.svelte.d.ts.map +1 -0
  30. package/dist/ReposTreeNav.svelte +55 -0
  31. package/dist/ReposTreeNav.svelte.d.ts +11 -0
  32. package/dist/ReposTreeNav.svelte.d.ts.map +1 -0
  33. package/dist/TablePage.svelte +46 -0
  34. package/dist/TablePage.svelte.d.ts +9 -0
  35. package/dist/TablePage.svelte.d.ts.map +1 -0
  36. package/dist/TreeItemPage.svelte +75 -0
  37. package/dist/TreeItemPage.svelte.d.ts +10 -0
  38. package/dist/TreeItemPage.svelte.d.ts.map +1 -0
  39. package/dist/TreePage.svelte +64 -0
  40. package/dist/TreePage.svelte.d.ts +9 -0
  41. package/dist/TreePage.svelte.d.ts.map +1 -0
  42. package/dist/changeset_generator.d.ts +38 -0
  43. package/dist/changeset_generator.d.ts.map +1 -0
  44. package/dist/changeset_generator.js +110 -0
  45. package/dist/changeset_reader.d.ts +75 -0
  46. package/dist/changeset_reader.d.ts.map +1 -0
  47. package/dist/changeset_reader.js +167 -0
  48. package/dist/constants.d.ts +9 -0
  49. package/dist/constants.d.ts.map +1 -0
  50. package/dist/constants.js +8 -0
  51. package/dist/dependency_graph.d.ts +120 -0
  52. package/dist/dependency_graph.d.ts.map +1 -0
  53. package/dist/dependency_graph.js +341 -0
  54. package/dist/dependency_updater.d.ts +46 -0
  55. package/dist/dependency_updater.d.ts.map +1 -0
  56. package/dist/dependency_updater.js +213 -0
  57. package/dist/fetch_repo_data.d.ts +19 -0
  58. package/dist/fetch_repo_data.d.ts.map +1 -0
  59. package/dist/fetch_repo_data.js +49 -0
  60. package/dist/fs_fetch_value_cache.d.ts +24 -0
  61. package/dist/fs_fetch_value_cache.d.ts.map +1 -0
  62. package/dist/fs_fetch_value_cache.js +61 -0
  63. package/dist/git_operations.d.ts +54 -0
  64. package/dist/git_operations.d.ts.map +1 -0
  65. package/dist/git_operations.js +144 -0
  66. package/dist/github.d.ts +91 -0
  67. package/dist/github.d.ts.map +1 -0
  68. package/dist/github.js +94 -0
  69. package/dist/github_helpers.d.ts +10 -0
  70. package/dist/github_helpers.d.ts.map +1 -0
  71. package/dist/github_helpers.js +13 -0
  72. package/dist/gitops_analyze.task.d.ts +17 -0
  73. package/dist/gitops_analyze.task.d.ts.map +1 -0
  74. package/dist/gitops_analyze.task.js +188 -0
  75. package/dist/gitops_config.d.ts +56 -0
  76. package/dist/gitops_config.d.ts.map +1 -0
  77. package/dist/gitops_config.js +63 -0
  78. package/dist/gitops_plan.task.d.ts +28 -0
  79. package/dist/gitops_plan.task.d.ts.map +1 -0
  80. package/dist/gitops_plan.task.js +217 -0
  81. package/dist/gitops_publish.task.d.ts +29 -0
  82. package/dist/gitops_publish.task.d.ts.map +1 -0
  83. package/dist/gitops_publish.task.js +178 -0
  84. package/dist/gitops_sync.task.d.ts +18 -0
  85. package/dist/gitops_sync.task.d.ts.map +1 -0
  86. package/dist/gitops_sync.task.js +95 -0
  87. package/dist/gitops_task_helpers.d.ts +63 -0
  88. package/dist/gitops_task_helpers.d.ts.map +1 -0
  89. package/dist/gitops_task_helpers.js +84 -0
  90. package/dist/gitops_validate.task.d.ts +12 -0
  91. package/dist/gitops_validate.task.d.ts.map +1 -0
  92. package/dist/gitops_validate.task.js +210 -0
  93. package/dist/graph_validation.d.ts +39 -0
  94. package/dist/graph_validation.d.ts.map +1 -0
  95. package/dist/graph_validation.js +79 -0
  96. package/dist/local_repo.d.ts +84 -0
  97. package/dist/local_repo.d.ts.map +1 -0
  98. package/dist/local_repo.js +213 -0
  99. package/dist/log_helpers.d.ts +43 -0
  100. package/dist/log_helpers.d.ts.map +1 -0
  101. package/dist/log_helpers.js +98 -0
  102. package/dist/multi_repo_publisher.d.ts +34 -0
  103. package/dist/multi_repo_publisher.d.ts.map +1 -0
  104. package/dist/multi_repo_publisher.js +364 -0
  105. package/dist/npm_install_helpers.d.ts +23 -0
  106. package/dist/npm_install_helpers.d.ts.map +1 -0
  107. package/dist/npm_install_helpers.js +60 -0
  108. package/dist/npm_registry.d.ts +46 -0
  109. package/dist/npm_registry.d.ts.map +1 -0
  110. package/dist/npm_registry.js +96 -0
  111. package/dist/operations.d.ts +409 -0
  112. package/dist/operations.d.ts.map +1 -0
  113. package/dist/operations.js +34 -0
  114. package/dist/operations_defaults.d.ts +19 -0
  115. package/dist/operations_defaults.d.ts.map +1 -0
  116. package/dist/operations_defaults.js +279 -0
  117. package/dist/output_helpers.d.ts +27 -0
  118. package/dist/output_helpers.d.ts.map +1 -0
  119. package/dist/output_helpers.js +39 -0
  120. package/dist/paths.d.ts +11 -0
  121. package/dist/paths.d.ts.map +1 -0
  122. package/dist/paths.js +10 -0
  123. package/dist/preflight_checks.d.ts +47 -0
  124. package/dist/preflight_checks.d.ts.map +1 -0
  125. package/dist/preflight_checks.js +181 -0
  126. package/dist/publishing_plan.d.ts +100 -0
  127. package/dist/publishing_plan.d.ts.map +1 -0
  128. package/dist/publishing_plan.js +353 -0
  129. package/dist/publishing_plan_helpers.d.ts +30 -0
  130. package/dist/publishing_plan_helpers.d.ts.map +1 -0
  131. package/dist/publishing_plan_helpers.js +112 -0
  132. package/dist/publishing_plan_logging.d.ts +18 -0
  133. package/dist/publishing_plan_logging.d.ts.map +1 -0
  134. package/dist/publishing_plan_logging.js +342 -0
  135. package/dist/repo.svelte.d.ts +52 -0
  136. package/dist/repo.svelte.d.ts.map +1 -0
  137. package/dist/repo.svelte.js +70 -0
  138. package/dist/repo_ops.d.ts +57 -0
  139. package/dist/repo_ops.d.ts.map +1 -0
  140. package/dist/repo_ops.js +167 -0
  141. package/dist/resolved_gitops_config.d.ts +9 -0
  142. package/dist/resolved_gitops_config.d.ts.map +1 -0
  143. package/dist/resolved_gitops_config.js +12 -0
  144. package/dist/semver.d.ts +24 -0
  145. package/dist/semver.d.ts.map +1 -0
  146. package/dist/semver.js +140 -0
  147. package/dist/serialization_types.d.ts +57 -0
  148. package/dist/serialization_types.d.ts.map +1 -0
  149. package/dist/serialization_types.js +40 -0
  150. package/dist/version_utils.d.ts +48 -0
  151. package/dist/version_utils.d.ts.map +1 -0
  152. package/dist/version_utils.js +125 -0
  153. package/package.json +107 -0
  154. package/src/lib/changeset_generator.ts +162 -0
  155. package/src/lib/changeset_reader.ts +218 -0
  156. package/src/lib/constants.ts +8 -0
  157. package/src/lib/dependency_graph.ts +423 -0
  158. package/src/lib/dependency_updater.ts +297 -0
  159. package/src/lib/fetch_repo_data.ts +64 -0
  160. package/src/lib/fs_fetch_value_cache.ts +75 -0
  161. package/src/lib/git_operations.ts +208 -0
  162. package/src/lib/github.ts +128 -0
  163. package/src/lib/github_helpers.ts +31 -0
  164. package/src/lib/gitops_analyze.task.ts +261 -0
  165. package/src/lib/gitops_config.ts +123 -0
  166. package/src/lib/gitops_plan.task.ts +272 -0
  167. package/src/lib/gitops_publish.task.ts +227 -0
  168. package/src/lib/gitops_sync.task.ts +109 -0
  169. package/src/lib/gitops_task_helpers.ts +126 -0
  170. package/src/lib/gitops_validate.task.ts +248 -0
  171. package/src/lib/graph_validation.ts +109 -0
  172. package/src/lib/local_repo.ts +359 -0
  173. package/src/lib/log_helpers.ts +147 -0
  174. package/src/lib/multi_repo_publisher.ts +464 -0
  175. package/src/lib/npm_install_helpers.ts +85 -0
  176. package/src/lib/npm_registry.ts +143 -0
  177. package/src/lib/operations.ts +334 -0
  178. package/src/lib/operations_defaults.ts +335 -0
  179. package/src/lib/output_helpers.ts +64 -0
  180. package/src/lib/paths.ts +11 -0
  181. package/src/lib/preflight_checks.ts +269 -0
  182. package/src/lib/publishing_plan.ts +531 -0
  183. package/src/lib/publishing_plan_helpers.ts +145 -0
  184. package/src/lib/publishing_plan_logging.ts +470 -0
  185. package/src/lib/repo.svelte.ts +95 -0
  186. package/src/lib/repo_ops.ts +213 -0
  187. package/src/lib/resolved_gitops_config.ts +27 -0
  188. package/src/lib/semver.ts +166 -0
  189. package/src/lib/serialization_types.ts +90 -0
  190. package/src/lib/version_utils.ts +150 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Ryan Atkinson <mail@ryanatkn.com> <https://ryanatkn.com/>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # fuz_gitops
2
+
3
+ [<img src="/static/logo.svg" alt="a friendly blue spider facing you" align="right" width="192" height="192">](https://gitops.fuz.dev/)
4
+
5
+ > a tool for managing many repos 🪄 [gitops.fuz.dev](https://gitops.fuz.dev/)
6
+
7
+ fuz_gitops is alternative to the monorepo pattern that more loosely couples repos:
8
+
9
+ - enables automations across repos without requiring them to be in the same monorepo
10
+ - allows each repo to be managed from multiple fuz_gitops projects
11
+ - runs automations locally on your machine, giving you full control and visibility
12
+ (big tradeoffs in both directions compared to GitHub actions)
13
+
14
+ With fuz_gitops you can:
15
+
16
+ - dynamically compose repos
17
+ - fetch metadata about collections of repos and import it as typesafe JSON (using
18
+ [Gro's public package patterns](https://github.com/ryanatkn/gro/blob/main/src/docs/gro_plugin_sveltekit_app.md#well_known_package_json))
19
+ - publish a generated docs website for your collections of repos
20
+ - import its components to view and interact with repo collection metadata
21
+ - publish metadata about your collections of repos to the web for other users and tools
22
+ - publish multiple interdependent packages in dependency order with automatic dependency updates
23
+
24
+ ## Usage
25
+
26
+ ```bash
27
+ npm i -D @fuzdev/fuz_gitops
28
+ ```
29
+
30
+ - configure [`gitops.config.ts`](/gitops.config.ts)
31
+ - fuz_gitops calls the GitHub API using the environment variable `SECRET_GITHUB_API_TOKEN` for authorization,
32
+ which is a [classic GitHub token](https://github.com/settings/tokens)
33
+ (with "public access" for public repos, no options selected)
34
+ or a [fine-grainted GitHub token (beta)](https://github.com/settings/tokens?type=beta)
35
+ (with `"Public Repositories (read-only)"` selected)
36
+ in either `process.env`, a project-local `.env`, or the parent directory at `../.env`
37
+ (currently optional to read public repos, but it's recommended regardless,
38
+ and you'll need to select options to support private repos)
39
+ - re-export the gitops tasks by creating files in `$lib/`:
40
+
41
+ ```ts
42
+ // gitops_sync.task.ts
43
+ export * from '@fuzdev/fuz_gitops/gitops_sync.task.js';
44
+
45
+ // gitops_analyze.task.ts
46
+ export * from '@fuzdev/fuz_gitops/gitops_analyze.task.js';
47
+
48
+ // gitops_plan.task.ts
49
+ export * from '@fuzdev/fuz_gitops/gitops_plan.task.js';
50
+
51
+ // gitops_publish.task.ts
52
+ export * from '@fuzdev/fuz_gitops/gitops_publish.task.js';
53
+
54
+ // gitops_validate.task.ts
55
+ export * from '@fuzdev/fuz_gitops/gitops_validate.task.js';
56
+ ```
57
+
58
+ - run `gro gitops_sync` to sync repos and update the local data
59
+
60
+ ## Architecture
61
+
62
+ ```
63
+ gitops.config.ts → local repos → GitHub API → repos.ts → UI components
64
+ ```
65
+
66
+ - **Operations pattern**: Dependency injection for all side effects (git, npm, fs)
67
+ - **Fixture testing**: Generated git repos for isolated tests
68
+ - **Changeset-driven**: Automatic version bumps and dependency updates
69
+
70
+ See [CLAUDE.md](CLAUDE.md#architecture) for detailed documentation.
71
+
72
+ ## Quick Start
73
+
74
+ ### Syncing repo metadata
75
+
76
+ ```bash
77
+ gro gitops_sync # sync repos and generate UI data
78
+ gro gitops_sync --download # clone missing repos first
79
+ ```
80
+
81
+ ### Diagnostic commands (read-only)
82
+
83
+ ```bash
84
+ gro gitops_validate # run all validation checks (analyze + plan + dry run)
85
+ gro gitops_analyze # analyze dependency graph and detect cycles
86
+ gro gitops_plan # generate publishing plan showing version changes and cascades
87
+ gro gitops_publish --dry_run # simulate publishing without side effects
88
+ ```
89
+
90
+ ### Publishing packages
91
+
92
+ ```bash
93
+ gro gitops_publish # publish all repos with changesets (interactive y/n prompt)
94
+ gro gitops_publish --no-plan # skip plan confirmation
95
+ ```
96
+
97
+ **Note:** If publishing fails, simply re-run the same command. Already-published packages are automatically skipped (changesets consumed), failed packages retried naturally.
98
+
99
+ **Documentation:**
100
+
101
+ - [CLAUDE.md](CLAUDE.md) - Architecture, commands, testing patterns
102
+ - [docs/publishing.md](docs/publishing.md) - Publishing workflows, changeset
103
+ semantics, examples
104
+ - [docs/troubleshooting.md](docs/troubleshooting.md) - Common errors and
105
+ debugging tips
106
+
107
+ Getting started as a dev? Start with [Gro](https://github.com/grogarden/gro)
108
+ and the [Fuz template](https://github.com/fuz-dev/fuz_template).
109
+
110
+ TODO
111
+
112
+ - figure out better automation than manually running `gro gitops_sync`
113
+ - show the rate limit info
114
+ - think about how fuz_gitops could use both GitHub Actions and
115
+ [Forgejo Actions](https://forgejo.org/docs/v1.20/user/actions/)
116
+
117
+ ## License [🐦](https://wikipedia.org/wiki/Free_and_open-source_software)
118
+
119
+ [MIT](LICENSE)
@@ -0,0 +1,180 @@
1
+ <script lang="ts">
2
+ import {ensure_end} from '@fuzdev/fuz_util/string.js';
3
+ import {resolve} from '$app/paths';
4
+ import type {Snippet} from 'svelte';
5
+
6
+ import ModulesNav from './ModulesNav.svelte';
7
+ import type {Repo} from './repo.svelte.js';
8
+
9
+ interface Props {
10
+ repos: Array<Repo>; // TODO normalized version with cached primitives?
11
+ nav_footer?: Snippet;
12
+ }
13
+
14
+ const {repos, nav_footer}: Props = $props();
15
+
16
+ // TODO add sorting options
17
+
18
+ // TODO show other data (bytes and lines of code per module?)
19
+
20
+ // Get modules from each repo's source_json
21
+ const repos_modules = $derived(
22
+ repos
23
+ .filter((repo): repo is Repo & {source_json: {modules: Array<unknown>}} =>
24
+ Boolean(repo.source_json.modules?.length),
25
+ )
26
+ .map((repo) => ({
27
+ repo,
28
+ modules: repo.source_json.modules,
29
+ })),
30
+ );
31
+
32
+ // TODO add favicon (from library? gro?)
33
+ </script>
34
+
35
+ <div class="modules_detail">
36
+ <div class="nav_wrapper">
37
+ <section>
38
+ <ModulesNav {repos_modules} />
39
+ </section>
40
+ {@render nav_footer?.()}
41
+ </div>
42
+ <ul class="width_upto_md box unstyled">
43
+ {#each repos_modules as repo_modules (repo_modules)}
44
+ {@const {repo, modules} = repo_modules}
45
+ <li class="repo_module">
46
+ <header class="width_100 position_relative">
47
+ <a href="#{repo.name}" id={repo.name} class="subtitle">🔗</a>
48
+ <a href={resolve(`/tree/${repo.repo_name}`)}>{repo.name}</a>
49
+ </header>
50
+ <ul class="modules panel unstyled">
51
+ {#each modules as repo_module (repo_module)}
52
+ {@const {path, declarations} = repo_module}
53
+ <li
54
+ class="module"
55
+ class:ts={path.endsWith('.ts')}
56
+ class:svelte={path.endsWith('.svelte')}
57
+ class:css={path.endsWith('.css')}
58
+ class:json={path.endsWith('.json')}
59
+ >
60
+ <div class="module_file">
61
+ {#if repo.repo_url}
62
+ <div class="chip row">
63
+ <!-- TODO this is a hack that could be fixed by adding an optional `base: './'` that defaults to './src/lib/' -->
64
+ <!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
65
+ href="{ensure_end(repo.repo_url, '/')}blob/main/{path === 'package.json'
66
+ ? ''
67
+ : 'src/lib/'}{path}">{path}</a
68
+ >
69
+ </div>
70
+ {:else}
71
+ <span class="chip">{path}</span>
72
+ {/if}
73
+ </div>
74
+ {#if declarations?.length}
75
+ <ul class="declarations unstyled">
76
+ {#each declarations as { name, kind } (name)}
77
+ {#if name !== 'default'}
78
+ <li class="declaration chip {kind}_declaration">
79
+ {name}
80
+ </li>
81
+ {/if}
82
+ {/each}
83
+ </ul>
84
+ {/if}
85
+ </li>
86
+ {/each}
87
+ </ul>
88
+ </li>
89
+ {/each}
90
+ </ul>
91
+ </div>
92
+
93
+ <!-- TODO better rendering, also show author, etc -->
94
+
95
+ <style>
96
+ .modules_detail {
97
+ position: relative;
98
+ padding: var(--space_lg);
99
+ display: flex;
100
+ flex-direction: row;
101
+ align-items: flex-start;
102
+ width: 100%;
103
+ gap: var(--space_xl);
104
+ }
105
+ .subtitle {
106
+ position: absolute;
107
+ right: 0;
108
+ top: 0;
109
+ text-align: right;
110
+ }
111
+ .repo_module {
112
+ width: 100%;
113
+ display: flex;
114
+ flex-direction: column;
115
+ margin-bottom: var(--space_xl5);
116
+ }
117
+ .repo_module > header {
118
+ display: flex;
119
+ padding: var(--space_xs) var(--space_md);
120
+ font-size: var(--font_size_lg);
121
+ position: sticky;
122
+ top: 0;
123
+ background-color: var(--bg);
124
+ }
125
+ .modules {
126
+ padding: var(--space_sm);
127
+ }
128
+ .module {
129
+ margin-bottom: var(--space_lg);
130
+ --link_color: var(--text_color_3);
131
+ }
132
+ .module_file {
133
+ margin-bottom: var(--space_xs);
134
+ }
135
+ .ts {
136
+ --link_color: var(--color_a_5);
137
+ }
138
+ .svelte {
139
+ --link_color: var(--color_e_5);
140
+ }
141
+ .css {
142
+ --link_color: var(--color_b_5);
143
+ }
144
+ .json {
145
+ --link_color: var(--color_f_5);
146
+ }
147
+ /* TODO extract */
148
+ .declarations {
149
+ display: flex;
150
+ flex: 1;
151
+ flex-direction: row;
152
+ flex-wrap: wrap;
153
+ align-items: flex-start;
154
+ gap: var(--space_xs);
155
+ padding-left: var(--space_xs);
156
+ }
157
+ .declaration {
158
+ font-family: var(--font_family_mono);
159
+ font-size: var(--font_size_sm);
160
+ }
161
+ .variable_declaration {
162
+ color: var(--color_d_5);
163
+ }
164
+ .function_declaration {
165
+ color: var(--color_c_5);
166
+ }
167
+ .type_declaration {
168
+ color: var(--color_g_5);
169
+ }
170
+ .class_declaration {
171
+ color: var(--color_f_5);
172
+ }
173
+ /* TODO extract */
174
+ .nav_wrapper {
175
+ position: sticky;
176
+ top: var(--space_xl);
177
+ display: flex;
178
+ flex-direction: column;
179
+ }
180
+ </style>
@@ -0,0 +1,10 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { Repo } from './repo.svelte.js';
3
+ interface Props {
4
+ repos: Array<Repo>;
5
+ nav_footer?: Snippet;
6
+ }
7
+ declare const ModulesDetail: import("svelte").Component<Props, {}, "">;
8
+ type ModulesDetail = ReturnType<typeof ModulesDetail>;
9
+ export default ModulesDetail;
10
+ //# sourceMappingURL=ModulesDetail.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModulesDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAGpC,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAG1C,UAAU,KAAK;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAuFF,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -0,0 +1,43 @@
1
+ <script lang="ts">
2
+ import {page} from '$app/state';
3
+
4
+ import type {Repo} from './repo.svelte.js';
5
+
6
+ // TODO add highlighting of the items that are onscreen
7
+
8
+ interface Props {
9
+ repos_modules: Array<{
10
+ repo: Repo;
11
+ modules: Array<unknown>;
12
+ }>;
13
+ }
14
+
15
+ const {repos_modules}: Props = $props();
16
+
17
+ // TODO add favicon (from library? gro?)
18
+ </script>
19
+
20
+ <nav class="modules_nav">
21
+ <h6>packages</h6>
22
+ <ul class="unstyled">
23
+ {#each repos_modules as pkg_modules (pkg_modules)}
24
+ <li role="none">
25
+ <a href="#{pkg_modules.repo.name}" class:selected={pkg_modules.repo.name === page.url.hash}
26
+ >{pkg_modules.repo.name}</a
27
+ >
28
+ </li>
29
+ {/each}
30
+ </ul>
31
+ </nav>
32
+
33
+ <style>
34
+ .modules_nav {
35
+ width: 100%;
36
+ }
37
+ h6 {
38
+ padding-bottom: var(--space_sm);
39
+ }
40
+ h6:not(:first-child) {
41
+ margin-top: var(--space_xl);
42
+ }
43
+ </style>
@@ -0,0 +1,11 @@
1
+ import type { Repo } from './repo.svelte.js';
2
+ interface Props {
3
+ repos_modules: Array<{
4
+ repo: Repo;
5
+ modules: Array<unknown>;
6
+ }>;
7
+ }
8
+ declare const ModulesNav: import("svelte").Component<Props, {}, "">;
9
+ type ModulesNav = ReturnType<typeof ModulesNav>;
10
+ export default ModulesNav;
11
+ //# sourceMappingURL=ModulesNav.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModulesNav.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesNav.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAK1C,UAAU,KAAK;IACd,aAAa,EAAE,KAAK,CAAC;QACpB,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KACxB,CAAC,CAAC;CACH;AA2BF,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -0,0 +1,50 @@
1
+ <script lang="ts">
2
+ import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
3
+
4
+ import PageFooter from './PageFooter.svelte';
5
+ import PageHeader from './PageHeader.svelte';
6
+ import ModulesDetail from './ModulesDetail.svelte';
7
+ import type {Repo} from './repo.svelte.js';
8
+
9
+ interface Props {
10
+ repo: Repo;
11
+ repos: Array<Repo>;
12
+ }
13
+
14
+ const {repo, repos}: Props = $props();
15
+ </script>
16
+
17
+ <svelte:head>
18
+ <title>modules {repo.package_json.glyph} {repo.package_json.name}</title>
19
+ </svelte:head>
20
+
21
+ <main class="box width_100">
22
+ <div class="p_lg">
23
+ <PageHeader {repo} />
24
+ </div>
25
+ <section>
26
+ <ModulesDetail {repos}>
27
+ {#snippet nav_footer()}
28
+ <nav class="row">
29
+ <Breadcrumb>{repo.package_json.glyph}</Breadcrumb>
30
+ </nav>
31
+ {/snippet}
32
+ </ModulesDetail>
33
+ </section>
34
+ <section class="box mb_xl7">
35
+ <PageFooter />
36
+ </section>
37
+ </main>
38
+
39
+ <style>
40
+ section {
41
+ width: 100%;
42
+ margin-bottom: var(--space_xl4);
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ justify-content: center;
46
+ }
47
+ section:first-child {
48
+ margin-top: var(--space_xl4);
49
+ }
50
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { Repo } from './repo.svelte.js';
2
+ interface Props {
3
+ repo: Repo;
4
+ repos: Array<Repo>;
5
+ }
6
+ declare const ModulesPage: import("svelte").Component<Props, {}, "">;
7
+ type ModulesPage = ReturnType<typeof ModulesPage>;
8
+ export default ModulesPage;
9
+ //# sourceMappingURL=ModulesPage.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModulesPage.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/ModulesPage.svelte"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAG1C,UAAU,KAAK;IACd,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAuCF,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -0,0 +1,15 @@
1
+ <script lang="ts">
2
+ import DocsFooter from '@fuzdev/fuz_ui/DocsFooter.svelte';
3
+ import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
4
+ import {library_context} from '@fuzdev/fuz_ui/library.svelte.js';
5
+
6
+ const library = library_context.get();
7
+ </script>
8
+
9
+ <section class="box mb_xl7">
10
+ <DocsFooter {library}>
11
+ <nav class="mb_xl5">
12
+ <Breadcrumb>{library.package_json.glyph}</Breadcrumb>
13
+ </nav>
14
+ </DocsFooter>
15
+ </section>
@@ -0,0 +1,19 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const PageFooter: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type PageFooter = InstanceType<typeof PageFooter>;
18
+ export default PageFooter;
19
+ //# sourceMappingURL=PageFooter.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageFooter.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageFooter.svelte"],"names":[],"mappings":"AAyBA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,UAAU;;kBAA+E,CAAC;AAC9E,KAAK,UAAU,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAe,UAAU,CAAC"}
@@ -0,0 +1,35 @@
1
+ <script lang="ts">
2
+ import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
3
+ import Breadcrumb from '@fuzdev/fuz_ui/Breadcrumb.svelte';
4
+ import type {Snippet} from 'svelte';
5
+ import type {SvelteHTMLElements} from 'svelte/elements';
6
+
7
+ interface Props {
8
+ repo: {package_json: PackageJson} | {url: string; package_json: null};
9
+ nav_attrs?: SvelteHTMLElements['nav'];
10
+ attrs?: SvelteHTMLElements['header'];
11
+ nav?: Snippet;
12
+ children?: Snippet;
13
+ }
14
+
15
+ const {repo, nav_attrs, attrs, nav, children}: Props = $props();
16
+ </script>
17
+
18
+ <header {...attrs}>
19
+ {@render children?.()}
20
+ {#if nav}
21
+ {@render nav()}
22
+ {:else}
23
+ <nav {...nav_attrs}><Breadcrumb>{repo.package_json?.glyph}</Breadcrumb></nav>
24
+ {/if}
25
+ </header>
26
+
27
+ <style>
28
+ header {
29
+ --font_size: var(--font_size_xl);
30
+ }
31
+ nav {
32
+ display: flex;
33
+ justify-content: center;
34
+ }
35
+ </style>
@@ -0,0 +1,19 @@
1
+ import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
2
+ import type { Snippet } from 'svelte';
3
+ import type { SvelteHTMLElements } from 'svelte/elements';
4
+ interface Props {
5
+ repo: {
6
+ package_json: PackageJson;
7
+ } | {
8
+ url: string;
9
+ package_json: null;
10
+ };
11
+ nav_attrs?: SvelteHTMLElements['nav'];
12
+ attrs?: SvelteHTMLElements['header'];
13
+ nav?: Snippet;
14
+ children?: Snippet;
15
+ }
16
+ declare const PageHeader: import("svelte").Component<Props, {}, "">;
17
+ type PageHeader = ReturnType<typeof PageHeader>;
18
+ export default PageHeader;
19
+ //# sourceMappingURL=PageHeader.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PageHeader.svelte"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGvD,UAAU,KAAK;IACd,IAAI,EAAE;QAAC,YAAY,EAAE,WAAW,CAAA;KAAC,GAAG;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,IAAI,CAAA;KAAC,CAAC;IACtE,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;AAwBF,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -0,0 +1,53 @@
1
+ <script lang="ts">
2
+ import {resolve} from '$app/paths';
3
+
4
+ import {to_pull_requests, type FilterPullRequest} from './github_helpers.js';
5
+ import type {Repo} from './repo.svelte.js';
6
+
7
+ interface Props {
8
+ repos: Array<Repo>;
9
+ filter_pull_request?: FilterPullRequest | undefined;
10
+ }
11
+
12
+ const {repos, filter_pull_request}: Props = $props();
13
+
14
+ const pull_requests = $derived(to_pull_requests(repos, filter_pull_request));
15
+ </script>
16
+
17
+ <div class="width_upto_md">
18
+ <section class="panel p_sm">
19
+ <table>
20
+ <thead><tr><th>repo</th><th>number</th><th>title</th></tr></thead>
21
+ <tbody>
22
+ {#each pull_requests as pull_request (pull_request.pull_request.number)}
23
+ <tr>
24
+ <td
25
+ ><a href={resolve(`/tree/${pull_request.repo.repo_name}`)}
26
+ >{pull_request.repo
27
+ .repo_name}{#if pull_request.repo.package_json.glyph}&nbsp;{pull_request.repo
28
+ .package_json.glyph}{/if}</a
29
+ ></td
30
+ >
31
+ <td
32
+ ><!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
33
+ href="{pull_request.repo.repo_url}/pull/{pull_request.pull_request.number}"
34
+ title={pull_request.pull_request.title}>#{pull_request.pull_request.number}</a
35
+ ></td
36
+ >
37
+ <td><div>{pull_request.pull_request.title}</div></td>
38
+ </tr>
39
+ {/each}
40
+ </tbody>
41
+ </table>
42
+ </section>
43
+ </div>
44
+
45
+ <style>
46
+ th,
47
+ td {
48
+ padding: 0 var(--space_md);
49
+ }
50
+ section {
51
+ margin-bottom: var(--space_xl5);
52
+ }
53
+ </style>
@@ -0,0 +1,10 @@
1
+ import { type FilterPullRequest } from './github_helpers.js';
2
+ import type { Repo } from './repo.svelte.js';
3
+ interface Props {
4
+ repos: Array<Repo>;
5
+ filter_pull_request?: FilterPullRequest | undefined;
6
+ }
7
+ declare const PullRequestsDetail: import("svelte").Component<Props, {}, "">;
8
+ type PullRequestsDetail = ReturnType<typeof PullRequestsDetail>;
9
+ export default PullRequestsDetail;
10
+ //# sourceMappingURL=PullRequestsDetail.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PullRequestsDetail.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/PullRequestsDetail.svelte"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAG1C,UAAU,KAAK;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACpD;AAoCF,QAAA,MAAM,kBAAkB,2CAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,47 @@
1
+ <script module lang="ts">
2
+ // TODO is this the new required pattern?
3
+ export interface Props {
4
+ repo: Repo;
5
+ repos: Array<Repo>;
6
+ filter_pull_request?: FilterPullRequest | undefined;
7
+ }
8
+ </script>
9
+
10
+ <script lang="ts">
11
+ import PageFooter from './PageFooter.svelte';
12
+ import PageHeader from './PageHeader.svelte';
13
+ import PullRequestsDetail from './PullRequestsDetail.svelte';
14
+ import type {FilterPullRequest} from './github_helpers.js';
15
+ import type {Repo} from './repo.svelte.js';
16
+
17
+ const {repo, repos, filter_pull_request}: Props = $props();
18
+ </script>
19
+
20
+ <svelte:head>
21
+ <title>pull requests {repo.package_json.glyph} {repo.package_json.name}</title>
22
+ </svelte:head>
23
+
24
+ <main class="box width_100">
25
+ <div class="p_lg">
26
+ <PageHeader {repo} />
27
+ </div>
28
+ <section>
29
+ <PullRequestsDetail {repos} {filter_pull_request} />
30
+ </section>
31
+ <section class="box mb_xl7">
32
+ <PageFooter />
33
+ </section>
34
+ </main>
35
+
36
+ <style>
37
+ section {
38
+ width: 100%;
39
+ margin-bottom: var(--space_xl4);
40
+ display: flex;
41
+ flex-wrap: wrap;
42
+ justify-content: center;
43
+ }
44
+ section:first-child {
45
+ margin-top: var(--space_xl4);
46
+ }
47
+ </style>