ref0-git 0.14.0 → 0.25.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/app/apps/github/generated/git-rest.ts +170 -3
- package/app/apps/github/generated/routeTree.gen.ts +42 -21
- package/app/apps/github/src/clients/host-calls.ts +59 -34
- package/app/apps/github/src/components/states/states.tsx +1 -19
- package/app/apps/github/src/components/view-tabs.tsx +6 -2
- package/app/apps/github/src/context/context.ts +7 -4
- package/app/apps/github/src/context/host.ts +72 -36
- package/app/apps/github/src/issues/issue-list.tsx +11 -3
- package/app/apps/github/src/issues/issues.ts +11 -8
- package/app/apps/github/src/lists/across-list.tsx +358 -0
- package/app/apps/github/src/lists/across.ts +239 -0
- package/app/apps/github/src/names/owners.ts +3 -1
- package/app/apps/github/src/palette/targets.ts +3 -2
- package/app/apps/github/src/policy.ts +23 -30
- package/app/apps/github/src/private-repos.ts +24 -24
- package/app/apps/github/src/pulls/pulls.ts +2 -1
- package/app/apps/github/src/routes/-nav.tsx +40 -12
- package/app/apps/github/src/routes/issues.tsx +15 -0
- package/app/apps/github/src/routes/orgs/$owner/-org-list.ts +31 -0
- package/app/apps/github/src/routes/orgs/$owner/issues.tsx +10 -3
- package/app/apps/github/src/routes/orgs/$owner/pulls.tsx +10 -3
- package/app/apps/github/src/routes/pulls.tsx +15 -0
- package/app/apps/github/src/seed/seed.ts +104 -52
- package/app/apps/github/src/server.ts +17 -7
- package/app/apps/github/src/signin/approval.ts +24 -16
- package/app/apps/github/src/signin/attempts.ts +1 -1
- package/app/apps/github/src/signin/auth.ts +27 -19
- package/app/apps/github/src/signin/device-prompt.ts +1 -2
- package/app/apps/github/src/signin/revoke.ts +9 -17
- package/app/apps/github/src/signin/unborn.ts +33 -20
- package/app/pnpm-workspace.yaml +2 -2
- package/dist/cli/setup.mjs +3 -3
- package/dist/cli/sign-in.mjs +2 -3
- package/dist/init/app.mjs +5 -4
- package/dist/init/cloudflare.mjs +14 -8
- package/dist/init/create.mjs +1 -1
- package/dist/init/git-module.mjs +13 -5
- package/dist/init/metadata.mjs +1 -1
- package/dist/init/node.mjs +1 -1
- package/dist/init/stores.mjs +1 -1
- package/dist/init/template.mjs +3 -0
- package/dist/init/templates.mjs +34 -21
- package/dist/init/versions.mjs +1 -1
- package/package.json +5 -5
- package/app/apps/github/src/routes/orgs/$owner/releases.tsx +0 -8
|
@@ -357,6 +357,23 @@ export interface paths {
|
|
|
357
357
|
patch?: never;
|
|
358
358
|
trace?: never;
|
|
359
359
|
};
|
|
360
|
+
"/repos/{repo}/-/blobs/get-many": {
|
|
361
|
+
parameters: {
|
|
362
|
+
query?: never;
|
|
363
|
+
header?: never;
|
|
364
|
+
path?: never;
|
|
365
|
+
cookie?: never;
|
|
366
|
+
};
|
|
367
|
+
get?: never;
|
|
368
|
+
put?: never;
|
|
369
|
+
/** @description Blobs by their IDs, 1 to 1,024, read a batch of whole objects at a time, each blob's bytes as base64: `blobs` then `left` is `oids`, in the order asked, a duplicate answered at each of its places. `left` is the tail past what the call holds at once, the `bytes` limit when it's set, or past 8 MiB as JSON: read it again, or a blob at a time from the blob route. A first blob past 8 MiB alone is the head of `left`, with `blobs` empty. An ID the repo lacks fails the call `NOT_FOUND`, and one that isn't a blob `INVALID_ARGUMENT`. */
|
|
370
|
+
post: operations["blobs.getMany"];
|
|
371
|
+
delete?: never;
|
|
372
|
+
options?: never;
|
|
373
|
+
head?: never;
|
|
374
|
+
patch?: never;
|
|
375
|
+
trace?: never;
|
|
376
|
+
};
|
|
360
377
|
"/repos/{repo}/-/blobs": {
|
|
361
378
|
parameters: {
|
|
362
379
|
query?: never;
|
|
@@ -917,8 +934,9 @@ export interface components {
|
|
|
917
934
|
hint?: string;
|
|
918
935
|
context?: {
|
|
919
936
|
id?: string;
|
|
920
|
-
reason?: ("busy" | "packs-awaiting-repack" | "awaiting-index" | "may-have-saved" | "too-many-writes" | "starting") | string;
|
|
937
|
+
reason?: ("busy" | "packs-awaiting-repack" | "batches-awaiting-upkeep" | "awaiting-index" | "may-have-saved" | "too-many-writes" | "starting") | string;
|
|
921
938
|
packs?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
939
|
+
batches?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
922
940
|
most?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
923
941
|
retryAfter?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
924
942
|
} & {
|
|
@@ -942,10 +960,12 @@ export interface components {
|
|
|
942
960
|
message: string;
|
|
943
961
|
hint?: string;
|
|
944
962
|
context?: {
|
|
945
|
-
reason?: ("too-large" | "rate-limited" | "walk-limit" | "diff-limit" | "object-too-large" | "repo-too-large" | "delta-too-large" | "response-too-large" | "too-many-pointers" | "fetch-plan-too-large" | "too-many-store-calls" | "call-budget" | "events-undelivered" | "events-waiting" | "name-churn" | "queue-full" | "queue-targets-full" | "too-many-gitmodules-and-gitattributes" | "prune-walk-too-large" | "job-step-calls" | "job-step-yielded") | string;
|
|
963
|
+
reason?: ("too-large" | "rate-limited" | "walk-limit" | "diff-limit" | "object-too-large" | "repo-too-large" | "delta-too-large" | "response-too-large" | "too-many-pointers" | "fetch-plan-too-large" | "too-many-store-calls" | "call-budget" | "events-undelivered" | "events-waiting" | "name-churn" | "queue-full" | "queue-targets-full" | "too-many-gitmodules-and-gitattributes" | "prune-walk-too-large" | "job-step-calls" | "job-step-yielded" | "fork-chunks-past-budget" | "delta-chain-too-deep") | string;
|
|
946
964
|
indexBytes?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
947
965
|
pushBytes?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
948
966
|
most?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
967
|
+
needed?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
968
|
+
allowed?: number | ("Infinity" | "-Infinity" | "NaN");
|
|
949
969
|
} & {
|
|
950
970
|
[key: string]: string | number | ("Infinity" | "-Infinity" | "NaN") | boolean | string[] | null;
|
|
951
971
|
};
|
|
@@ -998,7 +1018,7 @@ export interface components {
|
|
|
998
1018
|
message: string;
|
|
999
1019
|
hint?: string;
|
|
1000
1020
|
context?: {
|
|
1001
|
-
reason?: ("no-queue" | "no-sync" | "no-topics" | "ambiguous") | string;
|
|
1021
|
+
reason?: ("no-queue" | "no-sync" | "no-topics" | "ambiguous" | "past-roots") | string;
|
|
1002
1022
|
target?: string;
|
|
1003
1023
|
} & {
|
|
1004
1024
|
[key: string]: string | number | ("Infinity" | "-Infinity" | "NaN") | boolean | string[] | null;
|
|
@@ -1391,6 +1411,16 @@ export interface components {
|
|
|
1391
1411
|
CreatedObject: {
|
|
1392
1412
|
oid: string;
|
|
1393
1413
|
};
|
|
1414
|
+
BlobsRead: {
|
|
1415
|
+
blobs: components["schemas"]["BlobContent"][];
|
|
1416
|
+
left: string[];
|
|
1417
|
+
};
|
|
1418
|
+
BlobContent: {
|
|
1419
|
+
oid: string;
|
|
1420
|
+
size: number;
|
|
1421
|
+
/** Format: byte */
|
|
1422
|
+
content: string;
|
|
1423
|
+
};
|
|
1394
1424
|
Me: {
|
|
1395
1425
|
actor: {
|
|
1396
1426
|
id: string;
|
|
@@ -5432,6 +5462,141 @@ export interface operations {
|
|
|
5432
5462
|
};
|
|
5433
5463
|
};
|
|
5434
5464
|
};
|
|
5465
|
+
"blobs.getMany": {
|
|
5466
|
+
parameters: {
|
|
5467
|
+
query?: never;
|
|
5468
|
+
header?: never;
|
|
5469
|
+
path: {
|
|
5470
|
+
repo: string;
|
|
5471
|
+
};
|
|
5472
|
+
cookie?: never;
|
|
5473
|
+
};
|
|
5474
|
+
requestBody: {
|
|
5475
|
+
content: {
|
|
5476
|
+
"application/json": {
|
|
5477
|
+
oids: string[];
|
|
5478
|
+
limits?: {
|
|
5479
|
+
objects?: number;
|
|
5480
|
+
bytes?: number;
|
|
5481
|
+
entries?: number;
|
|
5482
|
+
milliseconds?: number;
|
|
5483
|
+
};
|
|
5484
|
+
};
|
|
5485
|
+
};
|
|
5486
|
+
};
|
|
5487
|
+
responses: {
|
|
5488
|
+
/** @description BlobsRead */
|
|
5489
|
+
200: {
|
|
5490
|
+
headers: {
|
|
5491
|
+
[name: string]: unknown;
|
|
5492
|
+
};
|
|
5493
|
+
content: {
|
|
5494
|
+
"application/json": components["schemas"]["BlobsRead"];
|
|
5495
|
+
};
|
|
5496
|
+
};
|
|
5497
|
+
/** @description GitError.INVALID_ARGUMENT */
|
|
5498
|
+
400: {
|
|
5499
|
+
headers: {
|
|
5500
|
+
"ref0-code": string;
|
|
5501
|
+
[name: string]: unknown;
|
|
5502
|
+
};
|
|
5503
|
+
content: {
|
|
5504
|
+
"application/json": components["schemas"]["GitError.INVALID_ARGUMENT"];
|
|
5505
|
+
};
|
|
5506
|
+
};
|
|
5507
|
+
/** @description GitError.UNAUTHENTICATED */
|
|
5508
|
+
401: {
|
|
5509
|
+
headers: {
|
|
5510
|
+
"ref0-code": string;
|
|
5511
|
+
"www-authenticate": string;
|
|
5512
|
+
[name: string]: unknown;
|
|
5513
|
+
};
|
|
5514
|
+
content: {
|
|
5515
|
+
"application/json": components["schemas"]["GitError.UNAUTHENTICATED"];
|
|
5516
|
+
};
|
|
5517
|
+
};
|
|
5518
|
+
/** @description GitError.NOT_ALLOWED */
|
|
5519
|
+
403: {
|
|
5520
|
+
headers: {
|
|
5521
|
+
"ref0-code": string;
|
|
5522
|
+
[name: string]: unknown;
|
|
5523
|
+
};
|
|
5524
|
+
content: {
|
|
5525
|
+
"application/json": components["schemas"]["GitError.NOT_ALLOWED"];
|
|
5526
|
+
};
|
|
5527
|
+
};
|
|
5528
|
+
/** @description GitError.NOT_FOUND */
|
|
5529
|
+
404: {
|
|
5530
|
+
headers: {
|
|
5531
|
+
"ref0-code": string;
|
|
5532
|
+
[name: string]: unknown;
|
|
5533
|
+
};
|
|
5534
|
+
content: {
|
|
5535
|
+
"application/json": components["schemas"]["GitError.NOT_FOUND"];
|
|
5536
|
+
};
|
|
5537
|
+
};
|
|
5538
|
+
/** @description GitError.ALREADY_EXISTS | GitError.FAILED_PRECONDITION */
|
|
5539
|
+
409: {
|
|
5540
|
+
headers: {
|
|
5541
|
+
"ref0-code": string;
|
|
5542
|
+
[name: string]: unknown;
|
|
5543
|
+
};
|
|
5544
|
+
content: {
|
|
5545
|
+
"application/json": components["schemas"]["GitError.ALREADY_EXISTS"] | components["schemas"]["GitError.FAILED_PRECONDITION"];
|
|
5546
|
+
};
|
|
5547
|
+
};
|
|
5548
|
+
/** @description GitError.RESOURCE_EXHAUSTED */
|
|
5549
|
+
413: {
|
|
5550
|
+
headers: {
|
|
5551
|
+
"ref0-code": string;
|
|
5552
|
+
[name: string]: unknown;
|
|
5553
|
+
};
|
|
5554
|
+
content: {
|
|
5555
|
+
"application/json": components["schemas"]["GitError.RESOURCE_EXHAUSTED"];
|
|
5556
|
+
};
|
|
5557
|
+
};
|
|
5558
|
+
/** @description GitError.RESOURCE_EXHAUSTED.rate-limited */
|
|
5559
|
+
429: {
|
|
5560
|
+
headers: {
|
|
5561
|
+
"ref0-code": string;
|
|
5562
|
+
[name: string]: unknown;
|
|
5563
|
+
};
|
|
5564
|
+
content: {
|
|
5565
|
+
"application/json": components["schemas"]["GitError.RESOURCE_EXHAUSTED.rate-limited"];
|
|
5566
|
+
};
|
|
5567
|
+
};
|
|
5568
|
+
/** @description GitError.DATA_LOSS | GitError.INTERNAL */
|
|
5569
|
+
500: {
|
|
5570
|
+
headers: {
|
|
5571
|
+
"ref0-code": string;
|
|
5572
|
+
[name: string]: unknown;
|
|
5573
|
+
};
|
|
5574
|
+
content: {
|
|
5575
|
+
"application/json": components["schemas"]["GitError.DATA_LOSS"] | components["schemas"]["GitError.INTERNAL"];
|
|
5576
|
+
};
|
|
5577
|
+
};
|
|
5578
|
+
/** @description GitError.UNAVAILABLE */
|
|
5579
|
+
503: {
|
|
5580
|
+
headers: {
|
|
5581
|
+
"ref0-code": string;
|
|
5582
|
+
[name: string]: unknown;
|
|
5583
|
+
};
|
|
5584
|
+
content: {
|
|
5585
|
+
"application/json": components["schemas"]["GitError.UNAVAILABLE"];
|
|
5586
|
+
};
|
|
5587
|
+
};
|
|
5588
|
+
/** @description GitError.DEADLINE_EXCEEDED */
|
|
5589
|
+
504: {
|
|
5590
|
+
headers: {
|
|
5591
|
+
"ref0-code": string;
|
|
5592
|
+
[name: string]: unknown;
|
|
5593
|
+
};
|
|
5594
|
+
content: {
|
|
5595
|
+
"application/json": components["schemas"]["GitError.DEADLINE_EXCEEDED"];
|
|
5596
|
+
};
|
|
5597
|
+
};
|
|
5598
|
+
};
|
|
5599
|
+
};
|
|
5435
5600
|
"blobs.create": {
|
|
5436
5601
|
parameters: {
|
|
5437
5602
|
query?: {
|
|
@@ -7495,6 +7660,8 @@ export interface operations {
|
|
|
7495
7660
|
content: {
|
|
7496
7661
|
"application/json": {
|
|
7497
7662
|
object: string;
|
|
7663
|
+
/** @enum {string} */
|
|
7664
|
+
type?: "commit" | "tree" | "blob";
|
|
7498
7665
|
tag: string;
|
|
7499
7666
|
tagger: components["schemas"]["Signature"];
|
|
7500
7667
|
message: string;
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
import { Route as rootRouteImport } from './../src/routes/__root.tsx'
|
|
12
12
|
import { Route as IndexRouteImport } from './../src/routes/index.tsx'
|
|
13
13
|
import { Route as FileIconsDotsvgRouteImport } from './../src/routes/file-icons[.]svg.ts'
|
|
14
|
+
import { Route as IssuesRouteImport } from './../src/routes/issues.tsx'
|
|
14
15
|
import { Route as LoginRouteImport } from './../src/routes/login.tsx'
|
|
15
16
|
import { Route as NewRouteImport } from './../src/routes/new.tsx'
|
|
16
17
|
import { Route as NotificationsRouteImport } from './../src/routes/notifications.tsx'
|
|
18
|
+
import { Route as PullsRouteImport } from './../src/routes/pulls.tsx'
|
|
17
19
|
import { Route as SettingsRouteImport } from './../src/routes/settings.tsx'
|
|
18
20
|
import { Route as SignupRouteImport } from './../src/routes/signup.tsx'
|
|
19
21
|
import { Route as OwnerIndexRouteImport } from './../src/routes/$owner/index.tsx'
|
|
@@ -35,7 +37,6 @@ import { Route as IconsOwnerIndexRouteImport } from './../src/routes/icons/$owne
|
|
|
35
37
|
import { Route as IconsOwnerRepoRouteImport } from './../src/routes/icons/$owner/$repo.tsx'
|
|
36
38
|
import { Route as OrgsOwnerIssuesRouteImport } from './../src/routes/orgs/$owner/issues.tsx'
|
|
37
39
|
import { Route as OrgsOwnerPullsRouteImport } from './../src/routes/orgs/$owner/pulls.tsx'
|
|
38
|
-
import { Route as OrgsOwnerReleasesRouteImport } from './../src/routes/orgs/$owner/releases.tsx'
|
|
39
40
|
import { Route as OrgsOwnerSettingsRouteImport } from './../src/routes/orgs/$owner/settings.tsx'
|
|
40
41
|
import { Route as OrgsOwnerTokensRouteImport } from './../src/routes/orgs/$owner/tokens.tsx'
|
|
41
42
|
import { Route as OwnerRepoReleasesTagsRouteImport } from './../src/routes/$owner/$repo/_releases/tags.tsx'
|
|
@@ -75,6 +76,11 @@ const FileIconsDotsvgRoute = FileIconsDotsvgRouteImport.update({
|
|
|
75
76
|
path: '/file-icons.svg',
|
|
76
77
|
getParentRoute: () => rootRouteImport,
|
|
77
78
|
} as any)
|
|
79
|
+
const IssuesRoute = IssuesRouteImport.update({
|
|
80
|
+
id: '/issues',
|
|
81
|
+
path: '/issues',
|
|
82
|
+
getParentRoute: () => rootRouteImport,
|
|
83
|
+
} as any)
|
|
78
84
|
const LoginRoute = LoginRouteImport.update({
|
|
79
85
|
id: '/login',
|
|
80
86
|
path: '/login',
|
|
@@ -90,6 +96,11 @@ const NotificationsRoute = NotificationsRouteImport.update({
|
|
|
90
96
|
path: '/notifications',
|
|
91
97
|
getParentRoute: () => rootRouteImport,
|
|
92
98
|
} as any)
|
|
99
|
+
const PullsRoute = PullsRouteImport.update({
|
|
100
|
+
id: '/pulls',
|
|
101
|
+
path: '/pulls',
|
|
102
|
+
getParentRoute: () => rootRouteImport,
|
|
103
|
+
} as any)
|
|
93
104
|
const SettingsRoute = SettingsRouteImport.update({
|
|
94
105
|
id: '/settings',
|
|
95
106
|
path: '/settings',
|
|
@@ -193,11 +204,6 @@ const OrgsOwnerPullsRoute = OrgsOwnerPullsRouteImport.update({
|
|
|
193
204
|
path: '/pulls',
|
|
194
205
|
getParentRoute: () => OrgsOwnerRouteRoute,
|
|
195
206
|
} as any)
|
|
196
|
-
const OrgsOwnerReleasesRoute = OrgsOwnerReleasesRouteImport.update({
|
|
197
|
-
id: '/releases',
|
|
198
|
-
path: '/releases',
|
|
199
|
-
getParentRoute: () => OrgsOwnerRouteRoute,
|
|
200
|
-
} as any)
|
|
201
207
|
const OrgsOwnerSettingsRoute = OrgsOwnerSettingsRouteImport.update({
|
|
202
208
|
id: '/settings',
|
|
203
209
|
path: '/settings',
|
|
@@ -352,9 +358,11 @@ const OwnerRepoSettingsHooksNewRoute =
|
|
|
352
358
|
export interface FileRoutesByFullPath {
|
|
353
359
|
'/': typeof IndexRoute
|
|
354
360
|
'/file-icons.svg': typeof FileIconsDotsvgRoute
|
|
361
|
+
'/issues': typeof IssuesRoute
|
|
355
362
|
'/login': typeof LoginRoute
|
|
356
363
|
'/new': typeof NewRoute
|
|
357
364
|
'/notifications': typeof NotificationsRoute
|
|
365
|
+
'/pulls': typeof PullsRoute
|
|
358
366
|
'/settings': typeof SettingsRoute
|
|
359
367
|
'/signup': typeof SignupRoute
|
|
360
368
|
'/$owner/$repo': typeof OwnerRepoRouteRouteWithChildren
|
|
@@ -372,7 +380,6 @@ export interface FileRoutesByFullPath {
|
|
|
372
380
|
'/icons/$owner/$repo': typeof IconsOwnerRepoRoute
|
|
373
381
|
'/orgs/$owner/issues': typeof OrgsOwnerIssuesRoute
|
|
374
382
|
'/orgs/$owner/pulls': typeof OrgsOwnerPullsRoute
|
|
375
|
-
'/orgs/$owner/releases': typeof OrgsOwnerReleasesRoute
|
|
376
383
|
'/orgs/$owner/settings': typeof OrgsOwnerSettingsRoute
|
|
377
384
|
'/orgs/$owner/tokens': typeof OrgsOwnerTokensRoute
|
|
378
385
|
'/$owner/$repo/': typeof OwnerRepoIndexRoute
|
|
@@ -407,9 +414,11 @@ export interface FileRoutesByFullPath {
|
|
|
407
414
|
export interface FileRoutesByTo {
|
|
408
415
|
'/': typeof IndexRoute
|
|
409
416
|
'/file-icons.svg': typeof FileIconsDotsvgRoute
|
|
417
|
+
'/issues': typeof IssuesRoute
|
|
410
418
|
'/login': typeof LoginRoute
|
|
411
419
|
'/new': typeof NewRoute
|
|
412
420
|
'/notifications': typeof NotificationsRoute
|
|
421
|
+
'/pulls': typeof PullsRoute
|
|
413
422
|
'/settings': typeof SettingsRoute
|
|
414
423
|
'/signup': typeof SignupRoute
|
|
415
424
|
'/orgs/$owner': typeof OrgsOwnerRouteRouteWithChildren
|
|
@@ -426,7 +435,6 @@ export interface FileRoutesByTo {
|
|
|
426
435
|
'/icons/$owner/$repo': typeof IconsOwnerRepoRoute
|
|
427
436
|
'/orgs/$owner/issues': typeof OrgsOwnerIssuesRoute
|
|
428
437
|
'/orgs/$owner/pulls': typeof OrgsOwnerPullsRoute
|
|
429
|
-
'/orgs/$owner/releases': typeof OrgsOwnerReleasesRoute
|
|
430
438
|
'/orgs/$owner/settings': typeof OrgsOwnerSettingsRoute
|
|
431
439
|
'/orgs/$owner/tokens': typeof OrgsOwnerTokensRoute
|
|
432
440
|
'/icons/$owner': typeof IconsOwnerIndexRoute
|
|
@@ -460,9 +468,11 @@ export interface FileRoutesById {
|
|
|
460
468
|
__root__: typeof rootRouteImport
|
|
461
469
|
'/': typeof IndexRoute
|
|
462
470
|
'/file-icons.svg': typeof FileIconsDotsvgRoute
|
|
471
|
+
'/issues': typeof IssuesRoute
|
|
463
472
|
'/login': typeof LoginRoute
|
|
464
473
|
'/new': typeof NewRoute
|
|
465
474
|
'/notifications': typeof NotificationsRoute
|
|
475
|
+
'/pulls': typeof PullsRoute
|
|
466
476
|
'/settings': typeof SettingsRoute
|
|
467
477
|
'/signup': typeof SignupRoute
|
|
468
478
|
'/$owner/$repo': typeof OwnerRepoRouteRouteWithChildren
|
|
@@ -482,7 +492,6 @@ export interface FileRoutesById {
|
|
|
482
492
|
'/icons/$owner/$repo': typeof IconsOwnerRepoRoute
|
|
483
493
|
'/orgs/$owner/issues': typeof OrgsOwnerIssuesRoute
|
|
484
494
|
'/orgs/$owner/pulls': typeof OrgsOwnerPullsRoute
|
|
485
|
-
'/orgs/$owner/releases': typeof OrgsOwnerReleasesRoute
|
|
486
495
|
'/orgs/$owner/settings': typeof OrgsOwnerSettingsRoute
|
|
487
496
|
'/orgs/$owner/tokens': typeof OrgsOwnerTokensRoute
|
|
488
497
|
'/$owner/$repo/': typeof OwnerRepoIndexRoute
|
|
@@ -519,9 +528,11 @@ export interface FileRouteTypes {
|
|
|
519
528
|
fullPaths:
|
|
520
529
|
| '/'
|
|
521
530
|
| '/file-icons.svg'
|
|
531
|
+
| '/issues'
|
|
522
532
|
| '/login'
|
|
523
533
|
| '/new'
|
|
524
534
|
| '/notifications'
|
|
535
|
+
| '/pulls'
|
|
525
536
|
| '/settings'
|
|
526
537
|
| '/signup'
|
|
527
538
|
| '/$owner/$repo'
|
|
@@ -539,7 +550,6 @@ export interface FileRouteTypes {
|
|
|
539
550
|
| '/icons/$owner/$repo'
|
|
540
551
|
| '/orgs/$owner/issues'
|
|
541
552
|
| '/orgs/$owner/pulls'
|
|
542
|
-
| '/orgs/$owner/releases'
|
|
543
553
|
| '/orgs/$owner/settings'
|
|
544
554
|
| '/orgs/$owner/tokens'
|
|
545
555
|
| '/$owner/$repo/'
|
|
@@ -574,9 +584,11 @@ export interface FileRouteTypes {
|
|
|
574
584
|
to:
|
|
575
585
|
| '/'
|
|
576
586
|
| '/file-icons.svg'
|
|
587
|
+
| '/issues'
|
|
577
588
|
| '/login'
|
|
578
589
|
| '/new'
|
|
579
590
|
| '/notifications'
|
|
591
|
+
| '/pulls'
|
|
580
592
|
| '/settings'
|
|
581
593
|
| '/signup'
|
|
582
594
|
| '/orgs/$owner'
|
|
@@ -593,7 +605,6 @@ export interface FileRouteTypes {
|
|
|
593
605
|
| '/icons/$owner/$repo'
|
|
594
606
|
| '/orgs/$owner/issues'
|
|
595
607
|
| '/orgs/$owner/pulls'
|
|
596
|
-
| '/orgs/$owner/releases'
|
|
597
608
|
| '/orgs/$owner/settings'
|
|
598
609
|
| '/orgs/$owner/tokens'
|
|
599
610
|
| '/icons/$owner'
|
|
@@ -626,9 +637,11 @@ export interface FileRouteTypes {
|
|
|
626
637
|
| '__root__'
|
|
627
638
|
| '/'
|
|
628
639
|
| '/file-icons.svg'
|
|
640
|
+
| '/issues'
|
|
629
641
|
| '/login'
|
|
630
642
|
| '/new'
|
|
631
643
|
| '/notifications'
|
|
644
|
+
| '/pulls'
|
|
632
645
|
| '/settings'
|
|
633
646
|
| '/signup'
|
|
634
647
|
| '/$owner/$repo'
|
|
@@ -648,7 +661,6 @@ export interface FileRouteTypes {
|
|
|
648
661
|
| '/icons/$owner/$repo'
|
|
649
662
|
| '/orgs/$owner/issues'
|
|
650
663
|
| '/orgs/$owner/pulls'
|
|
651
|
-
| '/orgs/$owner/releases'
|
|
652
664
|
| '/orgs/$owner/settings'
|
|
653
665
|
| '/orgs/$owner/tokens'
|
|
654
666
|
| '/$owner/$repo/'
|
|
@@ -684,9 +696,11 @@ export interface FileRouteTypes {
|
|
|
684
696
|
export interface RootRouteChildren {
|
|
685
697
|
IndexRoute: typeof IndexRoute
|
|
686
698
|
FileIconsDotsvgRoute: typeof FileIconsDotsvgRoute
|
|
699
|
+
IssuesRoute: typeof IssuesRoute
|
|
687
700
|
LoginRoute: typeof LoginRoute
|
|
688
701
|
NewRoute: typeof NewRoute
|
|
689
702
|
NotificationsRoute: typeof NotificationsRoute
|
|
703
|
+
PullsRoute: typeof PullsRoute
|
|
690
704
|
SettingsRoute: typeof SettingsRoute
|
|
691
705
|
SignupRoute: typeof SignupRoute
|
|
692
706
|
OwnerRepoRouteRoute: typeof OwnerRepoRouteRouteWithChildren
|
|
@@ -717,6 +731,13 @@ declare module '@tanstack/react-router' {
|
|
|
717
731
|
preLoaderRoute: typeof FileIconsDotsvgRouteImport
|
|
718
732
|
parentRoute: typeof rootRouteImport
|
|
719
733
|
}
|
|
734
|
+
'/issues': {
|
|
735
|
+
id: '/issues'
|
|
736
|
+
path: '/issues'
|
|
737
|
+
fullPath: '/issues'
|
|
738
|
+
preLoaderRoute: typeof IssuesRouteImport
|
|
739
|
+
parentRoute: typeof rootRouteImport
|
|
740
|
+
}
|
|
720
741
|
'/login': {
|
|
721
742
|
id: '/login'
|
|
722
743
|
path: '/login'
|
|
@@ -738,6 +759,13 @@ declare module '@tanstack/react-router' {
|
|
|
738
759
|
preLoaderRoute: typeof NotificationsRouteImport
|
|
739
760
|
parentRoute: typeof rootRouteImport
|
|
740
761
|
}
|
|
762
|
+
'/pulls': {
|
|
763
|
+
id: '/pulls'
|
|
764
|
+
path: '/pulls'
|
|
765
|
+
fullPath: '/pulls'
|
|
766
|
+
preLoaderRoute: typeof PullsRouteImport
|
|
767
|
+
parentRoute: typeof rootRouteImport
|
|
768
|
+
}
|
|
741
769
|
'/settings': {
|
|
742
770
|
id: '/settings'
|
|
743
771
|
path: '/settings'
|
|
@@ -885,13 +913,6 @@ declare module '@tanstack/react-router' {
|
|
|
885
913
|
preLoaderRoute: typeof OrgsOwnerPullsRouteImport
|
|
886
914
|
parentRoute: typeof OrgsOwnerRouteRoute
|
|
887
915
|
}
|
|
888
|
-
'/orgs/$owner/releases': {
|
|
889
|
-
id: '/orgs/$owner/releases'
|
|
890
|
-
path: '/releases'
|
|
891
|
-
fullPath: '/orgs/$owner/releases'
|
|
892
|
-
preLoaderRoute: typeof OrgsOwnerReleasesRouteImport
|
|
893
|
-
parentRoute: typeof OrgsOwnerRouteRoute
|
|
894
|
-
}
|
|
895
916
|
'/orgs/$owner/settings': {
|
|
896
917
|
id: '/orgs/$owner/settings'
|
|
897
918
|
path: '/settings'
|
|
@@ -1213,7 +1234,6 @@ const OwnerRepoRouteRouteWithChildren = OwnerRepoRouteRoute._addFileChildren(
|
|
|
1213
1234
|
interface OrgsOwnerRouteRouteChildren {
|
|
1214
1235
|
OrgsOwnerIssuesRoute: typeof OrgsOwnerIssuesRoute
|
|
1215
1236
|
OrgsOwnerPullsRoute: typeof OrgsOwnerPullsRoute
|
|
1216
|
-
OrgsOwnerReleasesRoute: typeof OrgsOwnerReleasesRoute
|
|
1217
1237
|
OrgsOwnerSettingsRoute: typeof OrgsOwnerSettingsRoute
|
|
1218
1238
|
OrgsOwnerTokensRoute: typeof OrgsOwnerTokensRoute
|
|
1219
1239
|
}
|
|
@@ -1221,7 +1241,6 @@ interface OrgsOwnerRouteRouteChildren {
|
|
|
1221
1241
|
const OrgsOwnerRouteRouteChildren: OrgsOwnerRouteRouteChildren = {
|
|
1222
1242
|
OrgsOwnerIssuesRoute: OrgsOwnerIssuesRoute,
|
|
1223
1243
|
OrgsOwnerPullsRoute: OrgsOwnerPullsRoute,
|
|
1224
|
-
OrgsOwnerReleasesRoute: OrgsOwnerReleasesRoute,
|
|
1225
1244
|
OrgsOwnerSettingsRoute: OrgsOwnerSettingsRoute,
|
|
1226
1245
|
OrgsOwnerTokensRoute: OrgsOwnerTokensRoute,
|
|
1227
1246
|
}
|
|
@@ -1233,9 +1252,11 @@ const OrgsOwnerRouteRouteWithChildren = OrgsOwnerRouteRoute._addFileChildren(
|
|
|
1233
1252
|
const rootRouteChildren: RootRouteChildren = {
|
|
1234
1253
|
IndexRoute: IndexRoute,
|
|
1235
1254
|
FileIconsDotsvgRoute: FileIconsDotsvgRoute,
|
|
1255
|
+
IssuesRoute: IssuesRoute,
|
|
1236
1256
|
LoginRoute: LoginRoute,
|
|
1237
1257
|
NewRoute: NewRoute,
|
|
1238
1258
|
NotificationsRoute: NotificationsRoute,
|
|
1259
|
+
PullsRoute: PullsRoute,
|
|
1239
1260
|
SettingsRoute: SettingsRoute,
|
|
1240
1261
|
SignupRoute: SignupRoute,
|
|
1241
1262
|
OwnerRepoRouteRoute: OwnerRepoRouteRouteWithChildren,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createServerFn } from '@tanstack/react-start';
|
|
2
2
|
import { getRequest } from '@tanstack/react-start/server';
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
|
+
import * as Result from 'effect/Result';
|
|
4
5
|
import * as Schema from 'effect/Schema';
|
|
5
6
|
|
|
6
7
|
import type { TokenRecord as GitTokenRecord, TokenTarget } from '@ref0/git';
|
|
@@ -9,7 +10,6 @@ import type { AppContext, HostGit } from '../context/context.ts';
|
|
|
9
10
|
import { admin } from '../names/owners.ts';
|
|
10
11
|
import { hostSessionFor, hostSessionHeader } from '../signin/host-session.ts';
|
|
11
12
|
import { orgTokenView } from '../signin/orgs.ts';
|
|
12
|
-
import { atMost } from './at-most.ts';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The writes no Git token reaches, which the app makes as its signed-in person under the host's
|
|
@@ -180,27 +180,59 @@ const segment = encodeURIComponent;
|
|
|
180
180
|
const repoPath = (owner: string, repo: string) =>
|
|
181
181
|
`/api/v3/repos/${segment(owner)}/${segment(repo)}`;
|
|
182
182
|
|
|
183
|
-
/**
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
/**
|
|
184
|
+
* A token place's list as host code reads it, `rows` at most, and whether more followed: `undefined`
|
|
185
|
+
* for a place Git doesn't hold, such as a repo deleted since its name was read.
|
|
186
|
+
*/
|
|
187
|
+
const listed = Effect.fnUntraced(
|
|
188
|
+
function* (tokens: TokenLists, target: TokenTarget, rows: number) {
|
|
189
|
+
const items: GitTokenRecord[] = [];
|
|
190
|
+
let after: string | undefined;
|
|
191
|
+
|
|
192
|
+
while (items.length < rows) {
|
|
193
|
+
const limit = Math.min(tokensEach, rows - items.length);
|
|
194
|
+
const page = yield* tokens.list(target, {
|
|
195
|
+
state: 'all',
|
|
196
|
+
page: after === undefined ? { limit } : { limit, after },
|
|
197
|
+
});
|
|
187
198
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const page = await tokens.list(target, {
|
|
191
|
-
state: 'all',
|
|
192
|
-
page: after === undefined ? { limit } : { limit, after },
|
|
193
|
-
});
|
|
194
|
-
if (page.kind !== 'success') return page;
|
|
199
|
+
items.push(...page.items);
|
|
200
|
+
after = page.next;
|
|
195
201
|
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
if (after === undefined) return { items, more: false };
|
|
203
|
+
}
|
|
198
204
|
|
|
199
|
-
|
|
200
|
-
}
|
|
205
|
+
return { items, more: true };
|
|
206
|
+
},
|
|
207
|
+
Effect.catchIf(
|
|
208
|
+
(error) => error.code === 'NOT_FOUND',
|
|
209
|
+
() => Effect.succeed(undefined),
|
|
210
|
+
),
|
|
211
|
+
);
|
|
201
212
|
|
|
202
|
-
|
|
203
|
-
|
|
213
|
+
/**
|
|
214
|
+
* The lists of `targets`, the place's own and each of its repos', `listsAtOnce` at a time, and
|
|
215
|
+
* whether Git held repos past `repos`' page. It fails when Git couldn't answer one of them.
|
|
216
|
+
*/
|
|
217
|
+
const tokenLists = (
|
|
218
|
+
git: HostGit,
|
|
219
|
+
tokens: TokenLists,
|
|
220
|
+
prefix: string,
|
|
221
|
+
repo: string | undefined,
|
|
222
|
+
rows: number,
|
|
223
|
+
) =>
|
|
224
|
+
Effect.gen(function* () {
|
|
225
|
+
const repos =
|
|
226
|
+
repo === undefined
|
|
227
|
+
? yield* git.repos.list({ actor: admin, prefix, page: { limit: tokenRepos } })
|
|
228
|
+
: { items: [`${prefix}${repo}`] };
|
|
229
|
+
const targets: TokenTarget[] = [{ prefix }, ...repos.items];
|
|
230
|
+
const lists = yield* Effect.forEach(targets, (target) => listed(tokens, target, rows), {
|
|
231
|
+
concurrency: listsAtOnce,
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
return { lists, more: 'next' in repos && repos.next !== undefined };
|
|
235
|
+
});
|
|
204
236
|
|
|
205
237
|
/** Git couldn't answer one of a list's reads, so the list isn't whole: 503, never a short list. */
|
|
206
238
|
const listUnavailable = () => refusal(503, "Git couldn't list the tokens: try again");
|
|
@@ -227,26 +259,19 @@ const tokensOf = async (
|
|
|
227
259
|
const tokens = context.git.tokens;
|
|
228
260
|
if (view === undefined || tokens === undefined) return missing;
|
|
229
261
|
|
|
230
|
-
const prefix = `${place.owner}/`;
|
|
231
|
-
const repos =
|
|
232
|
-
place.repo === undefined
|
|
233
|
-
? await context.git.repos.list({ actor: admin, prefix, page: { limit: tokenRepos } })
|
|
234
|
-
: { kind: 'success' as const, value: { items: [`${prefix}${place.repo}`] } };
|
|
235
|
-
if (repos.kind !== 'success') return listUnavailable();
|
|
236
|
-
|
|
237
262
|
const rows = view === 'member' ? memberRowsEach : tokensEach;
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if (
|
|
263
|
+
const read = await Effect.runPromise(
|
|
264
|
+
Effect.result(tokenLists(context.git, tokens, `${place.owner}/`, place.repo, rows)),
|
|
265
|
+
);
|
|
266
|
+
if (Result.isFailure(read)) return listUnavailable();
|
|
242
267
|
|
|
243
268
|
// A repo deleted since its name was read holds no tokens, but the one asked for is missing.
|
|
244
|
-
|
|
269
|
+
const { lists } = read.success;
|
|
270
|
+
if (place.repo !== undefined && lists[1] === undefined) return missing;
|
|
245
271
|
|
|
246
|
-
const
|
|
247
|
-
const every =
|
|
248
|
-
const more =
|
|
249
|
-
('next' in repos.value && repos.value.next !== undefined) || read.some((list) => list.more);
|
|
272
|
+
const found = lists.flatMap((list) => (list === undefined ? [] : [list]));
|
|
273
|
+
const every = found.flatMap((list) => list.items).map((token) => tokenRecord(token));
|
|
274
|
+
const more = read.success.more || found.some((list) => list.more);
|
|
250
275
|
|
|
251
276
|
const all = view === 'all';
|
|
252
277
|
const answer: TokenListing = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FolderSearchIcon,
|
|
1
|
+
import { FolderSearchIcon, LockIcon, LogInIcon } from 'lucide-react';
|
|
2
2
|
import { useEffect, useState, type ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Alert, AlertDescription } from '../ui/alert.tsx';
|
|
@@ -85,24 +85,6 @@ export function LoadFailed({ message }: { readonly message: string }) {
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* An org's list across its repos, such as its issues, which waits on one read across them: the
|
|
90
|
-
* page never reads each repo's list in turn.
|
|
91
|
-
*/
|
|
92
|
-
export function AcrossRepos({ what }: { readonly what: string }) {
|
|
93
|
-
return (
|
|
94
|
-
<Empty className="border">
|
|
95
|
-
<EmptyHeader>
|
|
96
|
-
<EmptyMedia variant="icon">
|
|
97
|
-
<LayersIcon />
|
|
98
|
-
</EmptyMedia>
|
|
99
|
-
<EmptyTitle>Lists across repositories are coming</EmptyTitle>
|
|
100
|
-
<EmptyDescription>For now, pick a repository above to see its {what}.</EmptyDescription>
|
|
101
|
-
</EmptyHeader>
|
|
102
|
-
</Empty>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
88
|
/** How long a load runs before its skeleton shows: a quicker one shows no skeleton at all. */
|
|
107
89
|
export const skeletonAfterMs = 200;
|
|
108
90
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
import { TabsList, TabsTrigger } from './ui/tabs.tsx';
|
|
4
4
|
|
|
@@ -8,6 +8,8 @@ export interface View {
|
|
|
8
8
|
readonly label: string;
|
|
9
9
|
/** The link to the view's own page, as a Markdown file's code is at `?plain=1`. */
|
|
10
10
|
readonly link?: ReactElement;
|
|
11
|
+
/** What follows its name, such as a list's count. */
|
|
12
|
+
readonly end?: ReactNode;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -26,14 +28,16 @@ export function ViewTabs({
|
|
|
26
28
|
}) {
|
|
27
29
|
return (
|
|
28
30
|
<TabsList aria-label={label}>
|
|
29
|
-
{views.map(({ value, label: name, link }) =>
|
|
31
|
+
{views.map(({ value, label: name, link, end }) =>
|
|
30
32
|
link === undefined ? (
|
|
31
33
|
<TabsTrigger key={value} value={value}>
|
|
32
34
|
{name}
|
|
35
|
+
{end}
|
|
33
36
|
</TabsTrigger>
|
|
34
37
|
) : (
|
|
35
38
|
<TabsTrigger key={value} value={value} nativeButton={false} render={link}>
|
|
36
39
|
{name}
|
|
40
|
+
{end}
|
|
37
41
|
</TabsTrigger>
|
|
38
42
|
),
|
|
39
43
|
)}
|