@ref0/git 0.11.0 → 0.12.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/dist/access/private-refs.mjs +5 -4
- package/dist/contracts/forks.d.mts +3 -2
- package/dist/contracts/git.d.mts +23 -5
- package/dist/contracts/result.d.mts +7 -5
- package/dist/contracts/result.mjs +7 -5
- package/dist/contracts/sync.d.mts +11 -0
- package/dist/core/access.d.mts +1 -0
- package/dist/core/access.mjs +10 -11
- package/dist/core/asked.mjs +30 -0
- package/dist/core/events/deliver.d.mts +1 -0
- package/dist/core/events/deliver.mjs +5 -1
- package/dist/core/forks.mjs +39 -13
- package/dist/core/imports.mjs +9 -4
- package/dist/core/objects/reading.mjs +17 -9
- package/dist/core/parts.d.mts +2 -1
- package/dist/core/push.mjs +11 -8
- package/dist/core/refs.mjs +6 -3
- package/dist/core/registered-rows.d.mts +1 -0
- package/dist/core/registered-rows.mjs +7 -5
- package/dist/core/repack.mjs +5 -3
- package/dist/core/saved-caller-views.d.mts +18 -0
- package/dist/core/saved-caller-views.mjs +17 -4
- package/dist/core/saved-callers-public.d.mts +3 -3
- package/dist/core/saved-callers-public.mjs +3 -2
- package/dist/core/saved-callers.d.mts +7 -0
- package/dist/extend.d.mts +2 -1
- package/dist/extend.mjs +2 -1
- package/dist/http/push-uploads.mjs +6 -3
- package/dist/lfs/locks.mjs +14 -9
- package/dist/lfs/objects.mjs +27 -20
- package/dist/queue/calls.mjs +21 -1
- package/dist/rest/blobs.d.mts +15 -15
- package/dist/rest/commits.d.mts +191 -191
- package/dist/rest/files.d.mts +70 -70
- package/dist/rest/forks.d.mts +72 -72
- package/dist/rest/layer.mjs +8 -1
- package/dist/rest/queue.d.mts +212 -212
- package/dist/rest/refs.d.mts +148 -148
- package/dist/rest/repos.d.mts +47 -47
- package/dist/rest/tags.d.mts +76 -76
- package/dist/rest/tokens.d.mts +101 -101
- package/dist/rest/topics.d.mts +112 -112
- package/dist/rest/trees.d.mts +73 -73
- package/dist/rest/work.d.mts +39 -39
- package/dist/server/git-namespace.d.mts +3 -3
- package/dist/server/server.mjs +6 -4
- package/dist/storage/memory-budget.mjs +128 -6
- package/dist/storage/merge-cut.mjs +5 -4
- package/dist/storage/pack-reads.mjs +239 -27
- package/dist/storage/prune-seen.mjs +11 -6
- package/dist/storage/prune-walk.mjs +168 -68
- package/dist/storage/quarantine.mjs +2 -0
- package/dist/store/repo-record.d.mts +25 -0
- package/dist/store/repo-record.mjs +55 -1
- package/dist/sync/github.mjs +10 -1
- package/dist/sync/import.mjs +3 -2
- package/dist/sync/mirror.mjs +24 -17
- package/dist/sync/said.mjs +204 -0
- package/dist/sync/step.mjs +8 -8
- package/dist/sync/tries.mjs +34 -18
- package/dist/topics/advance.mjs +10 -3
- package/package.json +3 -3
package/dist/rest/topics.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GitCallerMiddleware, GitRestServices } from "./caller.mjs";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
4
|
-
declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/topics/:topic", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
topic: Schema.String;
|
|
6
6
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
7
7
|
readonly id: Schema.String;
|
|
@@ -444,50 +444,55 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
444
444
|
}>, {
|
|
445
445
|
"ref0-code": Schema.String;
|
|
446
446
|
'www-authenticate': Schema.String;
|
|
447
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
readonly
|
|
453
|
-
|
|
454
|
-
readonly repo: Schema.String;
|
|
455
|
-
readonly target: Schema.String;
|
|
456
|
-
readonly entry: Schema.String;
|
|
457
|
-
readonly key: Schema.String;
|
|
458
|
-
readonly source: Schema.String;
|
|
459
|
-
readonly head: Schema.String;
|
|
460
|
-
}>>;
|
|
461
|
-
readonly pending: Schema.$Array<Schema.Struct<{
|
|
462
|
-
readonly repo: Schema.String;
|
|
463
|
-
readonly target: Schema.String;
|
|
464
|
-
readonly source: Schema.String;
|
|
465
|
-
readonly head: Schema.String;
|
|
447
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/topics", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
448
|
+
after: Schema.optionalKey<Schema.String>;
|
|
449
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
450
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>>;
|
|
451
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
452
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
453
|
+
readonly id: Schema.String;
|
|
466
454
|
readonly key: Schema.String;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
readonly
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
readonly
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
455
|
+
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
456
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
457
|
+
readonly repo: Schema.String;
|
|
458
|
+
readonly target: Schema.String;
|
|
459
|
+
readonly entry: Schema.String;
|
|
460
|
+
readonly key: Schema.String;
|
|
461
|
+
readonly source: Schema.String;
|
|
462
|
+
readonly head: Schema.String;
|
|
463
|
+
}>>;
|
|
464
|
+
readonly pending: Schema.$Array<Schema.Struct<{
|
|
465
|
+
readonly repo: Schema.String;
|
|
466
|
+
readonly target: Schema.String;
|
|
467
|
+
readonly source: Schema.String;
|
|
468
|
+
readonly head: Schema.String;
|
|
469
|
+
readonly key: Schema.String;
|
|
470
|
+
}>>;
|
|
471
|
+
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
472
|
+
readonly repo: Schema.String;
|
|
473
|
+
readonly target: Schema.String;
|
|
474
|
+
readonly candidate: Schema.String;
|
|
475
|
+
readonly ref: Schema.String;
|
|
476
|
+
readonly commit: Schema.String;
|
|
477
|
+
}>>;
|
|
478
|
+
readonly waitingOn: Schema.optionalKey<Schema.Struct<{
|
|
479
|
+
readonly repo: Schema.String;
|
|
480
|
+
readonly target: Schema.String;
|
|
481
|
+
readonly topic: Schema.optionalKey<Schema.String>;
|
|
482
|
+
readonly hold: Schema.optionalKey<Schema.String>;
|
|
483
|
+
}>>;
|
|
484
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
485
|
+
readonly reason: Schema.Literals<readonly ["entry-failed", "reported", "cancelled", "refused", "host-error", "work-failed", "timeout", "report-timeout", "prepare-rejected"]>;
|
|
486
|
+
readonly repo: Schema.optionalKey<Schema.String>;
|
|
487
|
+
readonly entry: Schema.optionalKey<Schema.String>;
|
|
488
|
+
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
489
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
490
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
491
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
492
|
+
readonly hint: Schema.String;
|
|
493
|
+
}>>;
|
|
494
|
+
}>>>;
|
|
495
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
491
496
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
492
497
|
readonly code: "ALREADY_EXISTS";
|
|
493
498
|
readonly message: string;
|
|
@@ -887,16 +892,9 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
887
892
|
}>, {
|
|
888
893
|
"ref0-code": Schema.String;
|
|
889
894
|
'www-authenticate': Schema.String;
|
|
890
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
readonly target: Schema.String;
|
|
894
|
-
readonly source: Schema.String;
|
|
895
|
-
readonly head: Schema.String;
|
|
896
|
-
readonly key: Schema.String;
|
|
897
|
-
readonly repo: Schema.String;
|
|
898
|
-
}>>;
|
|
899
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
895
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/topics/:topic", Schema.toCodecStringTree<Schema.Struct<{
|
|
896
|
+
topic: Schema.String;
|
|
897
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
900
898
|
readonly id: Schema.String;
|
|
901
899
|
readonly key: Schema.String;
|
|
902
900
|
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
@@ -1337,16 +1335,57 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
1337
1335
|
}>, {
|
|
1338
1336
|
"ref0-code": Schema.String;
|
|
1339
1337
|
'www-authenticate': Schema.String;
|
|
1340
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1338
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"add", "POST", "/topics", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1339
|
+
readonly key: Schema.String;
|
|
1340
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
1341
|
+
readonly target: Schema.String;
|
|
1342
|
+
readonly source: Schema.String;
|
|
1343
|
+
readonly head: Schema.String;
|
|
1344
|
+
readonly key: Schema.String;
|
|
1345
|
+
readonly repo: Schema.String;
|
|
1346
|
+
}>>;
|
|
1348
1347
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1349
|
-
readonly
|
|
1348
|
+
readonly id: Schema.String;
|
|
1349
|
+
readonly key: Schema.String;
|
|
1350
|
+
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
1351
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
1352
|
+
readonly repo: Schema.String;
|
|
1353
|
+
readonly target: Schema.String;
|
|
1354
|
+
readonly entry: Schema.String;
|
|
1355
|
+
readonly key: Schema.String;
|
|
1356
|
+
readonly source: Schema.String;
|
|
1357
|
+
readonly head: Schema.String;
|
|
1358
|
+
}>>;
|
|
1359
|
+
readonly pending: Schema.$Array<Schema.Struct<{
|
|
1360
|
+
readonly repo: Schema.String;
|
|
1361
|
+
readonly target: Schema.String;
|
|
1362
|
+
readonly source: Schema.String;
|
|
1363
|
+
readonly head: Schema.String;
|
|
1364
|
+
readonly key: Schema.String;
|
|
1365
|
+
}>>;
|
|
1366
|
+
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
1367
|
+
readonly repo: Schema.String;
|
|
1368
|
+
readonly target: Schema.String;
|
|
1369
|
+
readonly candidate: Schema.String;
|
|
1370
|
+
readonly ref: Schema.String;
|
|
1371
|
+
readonly commit: Schema.String;
|
|
1372
|
+
}>>;
|
|
1373
|
+
readonly waitingOn: Schema.optionalKey<Schema.Struct<{
|
|
1374
|
+
readonly repo: Schema.String;
|
|
1375
|
+
readonly target: Schema.String;
|
|
1376
|
+
readonly topic: Schema.optionalKey<Schema.String>;
|
|
1377
|
+
readonly hold: Schema.optionalKey<Schema.String>;
|
|
1378
|
+
}>>;
|
|
1379
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
1380
|
+
readonly reason: Schema.Literals<readonly ["entry-failed", "reported", "cancelled", "refused", "host-error", "work-failed", "timeout", "report-timeout", "prepare-rejected"]>;
|
|
1381
|
+
readonly repo: Schema.optionalKey<Schema.String>;
|
|
1382
|
+
readonly entry: Schema.optionalKey<Schema.String>;
|
|
1383
|
+
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
1384
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
1385
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
1386
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
1387
|
+
readonly hint: Schema.String;
|
|
1388
|
+
}>>;
|
|
1350
1389
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
1351
1390
|
readonly code: "ALREADY_EXISTS";
|
|
1352
1391
|
readonly message: string;
|
|
@@ -1746,55 +1785,16 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
1746
1785
|
}>, {
|
|
1747
1786
|
"ref0-code": Schema.String;
|
|
1748
1787
|
'www-authenticate': Schema.String;
|
|
1749
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
readonly
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
readonly repo: Schema.String;
|
|
1760
|
-
readonly target: Schema.String;
|
|
1761
|
-
readonly entry: Schema.String;
|
|
1762
|
-
readonly key: Schema.String;
|
|
1763
|
-
readonly source: Schema.String;
|
|
1764
|
-
readonly head: Schema.String;
|
|
1765
|
-
}>>;
|
|
1766
|
-
readonly pending: Schema.$Array<Schema.Struct<{
|
|
1767
|
-
readonly repo: Schema.String;
|
|
1768
|
-
readonly target: Schema.String;
|
|
1769
|
-
readonly source: Schema.String;
|
|
1770
|
-
readonly head: Schema.String;
|
|
1771
|
-
readonly key: Schema.String;
|
|
1772
|
-
}>>;
|
|
1773
|
-
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
1774
|
-
readonly repo: Schema.String;
|
|
1775
|
-
readonly target: Schema.String;
|
|
1776
|
-
readonly candidate: Schema.String;
|
|
1777
|
-
readonly ref: Schema.String;
|
|
1778
|
-
readonly commit: Schema.String;
|
|
1779
|
-
}>>;
|
|
1780
|
-
readonly waitingOn: Schema.optionalKey<Schema.Struct<{
|
|
1781
|
-
readonly repo: Schema.String;
|
|
1782
|
-
readonly target: Schema.String;
|
|
1783
|
-
readonly topic: Schema.optionalKey<Schema.String>;
|
|
1784
|
-
readonly hold: Schema.optionalKey<Schema.String>;
|
|
1785
|
-
}>>;
|
|
1786
|
-
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
1787
|
-
readonly reason: Schema.Literals<readonly ["entry-failed", "reported", "cancelled", "refused", "host-error", "work-failed", "timeout", "report-timeout", "prepare-rejected"]>;
|
|
1788
|
-
readonly repo: Schema.optionalKey<Schema.String>;
|
|
1789
|
-
readonly entry: Schema.optionalKey<Schema.String>;
|
|
1790
|
-
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
1791
|
-
readonly summary: Schema.optionalKey<Schema.String>;
|
|
1792
|
-
readonly url: Schema.optionalKey<Schema.String>;
|
|
1793
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
1794
|
-
readonly hint: Schema.String;
|
|
1795
|
-
}>>;
|
|
1796
|
-
}>>>;
|
|
1797
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
1788
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"report", "POST", "/topics/:topic/report", Schema.toCodecStringTree<Schema.Struct<{
|
|
1789
|
+
topic: Schema.String;
|
|
1790
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1791
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
1792
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
1793
|
+
readonly meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1794
|
+
readonly verdict: Schema.Literals<readonly ["pass", "fail", "cancel"]>;
|
|
1795
|
+
readonly candidates: Schema.$Array<Schema.String>;
|
|
1796
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1797
|
+
readonly repeat: Schema.Boolean;
|
|
1798
1798
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
1799
1799
|
readonly code: "ALREADY_EXISTS";
|
|
1800
1800
|
readonly message: string;
|
package/dist/rest/trees.d.mts
CHANGED
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
import { GitCallerMiddleware, GitRestServices } from "./caller.mjs";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
|
-
declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/repos/:repo/-/trees/:oid", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly page: Schema.optionalKey<Schema.Struct<{
|
|
17
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
18
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
19
|
-
}>>;
|
|
20
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6
|
+
oid: Schema.String;
|
|
7
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
8
|
+
objects: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
bytes: Schema.optionalKey<Schema.Int>;
|
|
10
|
+
entries: Schema.optionalKey<Schema.Int>;
|
|
11
|
+
milliseconds: Schema.optionalKey<Schema.Int>;
|
|
12
|
+
after: Schema.optionalKey<Schema.String>;
|
|
13
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
14
|
+
recursive: Schema.optionalKey<Schema.Boolean>;
|
|
15
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
21
16
|
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
22
|
-
|
|
23
|
-
path: Schema.String;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}>>;
|
|
30
|
-
new: Schema.optionalKey<Schema.Struct<{
|
|
31
|
-
readonly mode: Schema.String;
|
|
32
|
-
readonly oid: Schema.String;
|
|
33
|
-
}>>;
|
|
34
|
-
pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
35
|
-
fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
17
|
+
readonly name: Schema.String;
|
|
18
|
+
readonly path: Schema.String;
|
|
19
|
+
readonly mode: Schema.String;
|
|
20
|
+
readonly type: Schema.Literals<readonly ["blob", "tree", "commit"]>;
|
|
21
|
+
readonly oid: Schema.String;
|
|
22
|
+
readonly size: Schema.optionalKey<Schema.Int>;
|
|
23
|
+
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
36
24
|
}>>>;
|
|
37
25
|
readonly next: Schema.optionalKey<Schema.String>;
|
|
38
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
39
26
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
40
27
|
readonly code: "ALREADY_EXISTS";
|
|
41
28
|
readonly message: string;
|
|
@@ -435,20 +422,41 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
435
422
|
}>, {
|
|
436
423
|
"ref0-code": Schema.String;
|
|
437
424
|
'www-authenticate': Schema.String;
|
|
438
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
425
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"diff", "POST", "/repos/:repo/-/trees/diff", Schema.toCodecStringTree<Schema.Struct<{
|
|
439
426
|
repo: Schema.String;
|
|
440
427
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
441
|
-
readonly
|
|
442
|
-
readonly
|
|
443
|
-
readonly
|
|
444
|
-
|
|
445
|
-
readonly
|
|
446
|
-
readonly
|
|
447
|
-
readonly
|
|
448
|
-
readonly
|
|
428
|
+
readonly base: Schema.String;
|
|
429
|
+
readonly head: Schema.String;
|
|
430
|
+
readonly renames: Schema.optionalKey<Schema.Boolean>;
|
|
431
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
432
|
+
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
433
|
+
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
434
|
+
readonly entries: Schema.optionalKey<Schema.Int>;
|
|
435
|
+
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
436
|
+
}>>;
|
|
437
|
+
readonly page: Schema.optionalKey<Schema.Struct<{
|
|
438
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
439
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
449
440
|
}>>;
|
|
450
441
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
451
|
-
readonly
|
|
442
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
443
|
+
status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
444
|
+
path: Schema.String;
|
|
445
|
+
from: Schema.optionalKey<Schema.String>;
|
|
446
|
+
similarity: Schema.optionalKey<Schema.Number>;
|
|
447
|
+
old: Schema.optionalKey<Schema.Struct<{
|
|
448
|
+
readonly mode: Schema.String;
|
|
449
|
+
readonly oid: Schema.String;
|
|
450
|
+
}>>;
|
|
451
|
+
new: Schema.optionalKey<Schema.Struct<{
|
|
452
|
+
readonly mode: Schema.String;
|
|
453
|
+
readonly oid: Schema.String;
|
|
454
|
+
}>>;
|
|
455
|
+
pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
456
|
+
fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
457
|
+
}>>>;
|
|
458
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
459
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
452
460
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
453
461
|
readonly code: "ALREADY_EXISTS";
|
|
454
462
|
readonly message: string;
|
|
@@ -848,22 +856,20 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
848
856
|
}>, {
|
|
849
857
|
"ref0-code": Schema.String;
|
|
850
858
|
'www-authenticate': Schema.String;
|
|
851
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
859
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/trees", Schema.toCodecStringTree<Schema.Struct<{
|
|
852
860
|
repo: Schema.String;
|
|
853
861
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
854
|
-
readonly base: Schema.optionalKey<Schema.String>;
|
|
855
|
-
readonly ours: Schema.String;
|
|
856
|
-
readonly theirs: Schema.String;
|
|
857
862
|
readonly key: Schema.optionalKey<Schema.String>;
|
|
858
|
-
readonly
|
|
859
|
-
|
|
860
|
-
readonly
|
|
861
|
-
readonly
|
|
862
|
-
readonly
|
|
863
|
+
readonly base: Schema.optionalKey<Schema.String>;
|
|
864
|
+
readonly changes: Schema.$Array<Schema.Struct<{
|
|
865
|
+
readonly path: Schema.String;
|
|
866
|
+
readonly mode: Schema.optionalKey<Schema.String>;
|
|
867
|
+
readonly oid: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
868
|
+
readonly content: Schema.optionalKey<Schema.String>;
|
|
869
|
+
readonly contentBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
863
870
|
}>>;
|
|
864
871
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
865
|
-
readonly
|
|
866
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
872
|
+
readonly oid: Schema.String;
|
|
867
873
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
868
874
|
readonly code: "ALREADY_EXISTS";
|
|
869
875
|
readonly message: string;
|
|
@@ -1263,28 +1269,22 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
1263
1269
|
}>, {
|
|
1264
1270
|
"ref0-code": Schema.String;
|
|
1265
1271
|
'www-authenticate': Schema.String;
|
|
1266
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1272
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"merge", "POST", "/repos/:repo/-/trees/merge", Schema.toCodecStringTree<Schema.Struct<{
|
|
1267
1273
|
repo: Schema.String;
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
readonly type: Schema.Literals<readonly ["blob", "tree", "commit"]>;
|
|
1283
|
-
readonly oid: Schema.String;
|
|
1284
|
-
readonly size: Schema.optionalKey<Schema.Int>;
|
|
1285
|
-
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
1286
|
-
}>>>;
|
|
1287
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
1274
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1275
|
+
readonly base: Schema.optionalKey<Schema.String>;
|
|
1276
|
+
readonly ours: Schema.String;
|
|
1277
|
+
readonly theirs: Schema.String;
|
|
1278
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
1279
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
1280
|
+
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
1281
|
+
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
1282
|
+
readonly entries: Schema.optionalKey<Schema.Int>;
|
|
1283
|
+
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
1284
|
+
}>>;
|
|
1285
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1286
|
+
readonly tree: Schema.String;
|
|
1287
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
1288
1288
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1289
1289
|
readonly code: "ALREADY_EXISTS";
|
|
1290
1290
|
readonly message: string;
|
package/dist/rest/work.d.mts
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
import { GitCallerMiddleware, GitRestServices } from "./caller.mjs";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
|
-
declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/repos/:repo/-/work", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
-
}>>,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>>, never,
|
|
6
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
|
+
after: Schema.optionalKey<Schema.String>;
|
|
8
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["waiting", "running", "failed"]>>;
|
|
10
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
11
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
12
|
+
readonly scope: Schema.String;
|
|
13
|
+
readonly name: Schema.String;
|
|
14
|
+
readonly key: Schema.String;
|
|
15
|
+
readonly data: Schema.Unknown;
|
|
16
|
+
readonly due: Schema.Number;
|
|
17
|
+
readonly attempt: Schema.Number;
|
|
18
|
+
readonly trace: Schema.optionalKey<Schema.String>;
|
|
19
|
+
readonly firstTry: Schema.optionalKey<Schema.Number>;
|
|
20
|
+
readonly claim: Schema.optionalKey<Schema.Number>;
|
|
21
|
+
readonly state: Schema.Literals<readonly ["waiting", "running", "failed"]>;
|
|
22
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
23
|
+
readonly failedAt: Schema.optionalKey<Schema.Number>;
|
|
24
|
+
readonly progress: Schema.optionalKey<Schema.Struct<{
|
|
25
|
+
readonly phase: Schema.String;
|
|
26
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
27
|
+
readonly unit: Schema.Literals<readonly ["bytes", "objects", "entries", "packs"]>;
|
|
28
|
+
readonly completed: Schema.Number;
|
|
29
|
+
readonly total: Schema.optionalKey<Schema.Number>;
|
|
30
|
+
}>>;
|
|
31
|
+
readonly attempt: Schema.Number;
|
|
32
|
+
readonly at: Schema.Number;
|
|
33
|
+
}>>;
|
|
34
|
+
}>>>;
|
|
35
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
36
|
+
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
11
37
|
readonly code: "ALREADY_EXISTS";
|
|
12
38
|
readonly message: string;
|
|
13
39
|
readonly hint?: string;
|
|
@@ -406,7 +432,7 @@ declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoi
|
|
|
406
432
|
}>, {
|
|
407
433
|
"ref0-code": Schema.String;
|
|
408
434
|
'www-authenticate': Schema.String;
|
|
409
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
435
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"discard", "POST", "/repos/:repo/-/work/discard", Schema.toCodecStringTree<Schema.Struct<{
|
|
410
436
|
repo: Schema.String;
|
|
411
437
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
412
438
|
readonly name: Schema.String;
|
|
@@ -811,39 +837,13 @@ declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoi
|
|
|
811
837
|
}>, {
|
|
812
838
|
"ref0-code": Schema.String;
|
|
813
839
|
'www-authenticate': Schema.String;
|
|
814
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
840
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"retry", "POST", "/repos/:repo/-/work/retry", Schema.toCodecStringTree<Schema.Struct<{
|
|
815
841
|
repo: Schema.String;
|
|
816
|
-
}>>, Schema.
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
}>>, never,
|
|
821
|
-
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
822
|
-
readonly scope: Schema.String;
|
|
823
|
-
readonly name: Schema.String;
|
|
824
|
-
readonly key: Schema.String;
|
|
825
|
-
readonly data: Schema.Unknown;
|
|
826
|
-
readonly due: Schema.Number;
|
|
827
|
-
readonly attempt: Schema.Number;
|
|
828
|
-
readonly trace: Schema.optionalKey<Schema.String>;
|
|
829
|
-
readonly firstTry: Schema.optionalKey<Schema.Number>;
|
|
830
|
-
readonly claim: Schema.optionalKey<Schema.Number>;
|
|
831
|
-
readonly state: Schema.Literals<readonly ["waiting", "running", "failed"]>;
|
|
832
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
833
|
-
readonly failedAt: Schema.optionalKey<Schema.Number>;
|
|
834
|
-
readonly progress: Schema.optionalKey<Schema.Struct<{
|
|
835
|
-
readonly phase: Schema.String;
|
|
836
|
-
readonly measures: Schema.$Array<Schema.Struct<{
|
|
837
|
-
readonly unit: Schema.Literals<readonly ["bytes", "objects", "entries", "packs"]>;
|
|
838
|
-
readonly completed: Schema.Number;
|
|
839
|
-
readonly total: Schema.optionalKey<Schema.Number>;
|
|
840
|
-
}>>;
|
|
841
|
-
readonly attempt: Schema.Number;
|
|
842
|
-
readonly at: Schema.Number;
|
|
843
|
-
}>>;
|
|
844
|
-
}>>>;
|
|
845
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
846
|
-
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
842
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
843
|
+
readonly name: Schema.String;
|
|
844
|
+
readonly key: Schema.String;
|
|
845
|
+
readonly requestKey: Schema.optionalKey<Schema.String>;
|
|
846
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
847
847
|
readonly code: "ALREADY_EXISTS";
|
|
848
848
|
readonly message: string;
|
|
849
849
|
readonly hint?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Git, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, checkFetch, handle, host, identify, isHost, register, route } from "../contracts/git.mjs";
|
|
1
|
+
import { AskedRepo, Git, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, checkFetch, handle, host, identify, isHost, register, route } from "../contracts/git.mjs";
|
|
2
2
|
import { CoreServices, GitOptions, GitServices, addDelivery, layer, layerUploads } from "./git-layer.mjs";
|
|
3
3
|
import { toFetch } from "./edge.mjs";
|
|
4
4
|
declare namespace git_namespace_d_exports {
|
|
5
|
-
export { CoreServices, Git, GitOptions, GitServices, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, addDelivery, checkFetch, handle, host, identify, isHost, layer, layerUploads, register, route, toFetch };
|
|
5
|
+
export { AskedRepo, CoreServices, Git, GitOptions, GitServices, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, addDelivery, checkFetch, handle, host, identify, isHost, layer, layerUploads, register, route, toFetch };
|
|
6
6
|
}
|
|
7
|
-
export { CoreServices, Git, GitOptions, GitServices, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, addDelivery, checkFetch, git_namespace_d_exports, handle, host, identify, isHost, layer, layerUploads, register, route, toFetch };
|
|
7
|
+
export { AskedRepo, CoreServices, Git, GitOptions, GitServices, Hook, Purge, PurgeStep, PushCheck, PushCheckAnswer, PushCheckInput, RefOwner, RefRefusal, RegisterInput, RegisteredRows, RegisteredSnapshot, RegisteredWrites, Registration, Route, RouteMethod, RouteRequest, Upkeep, UpkeepStep, addDelivery, checkFetch, git_namespace_d_exports, handle, host, identify, isHost, layer, layerUploads, register, route, toFetch };
|
package/dist/server/server.mjs
CHANGED
|
@@ -71,7 +71,7 @@ import { gitJob, jobLimitsOf, jobsWithin } from "../store/job-try.mjs";
|
|
|
71
71
|
import { exitOn, noCall, syncIn, uncounted } from "../store/crossing.mjs";
|
|
72
72
|
import { pruneFloor } from "../storage/rows.mjs";
|
|
73
73
|
import { queueJobs } from "../queue/advance.mjs";
|
|
74
|
-
import { queueCalls } from "../queue/calls.mjs";
|
|
74
|
+
import { entryAdderOf, queueCalls } from "../queue/calls.mjs";
|
|
75
75
|
import { QueueBase, QueueInternals, queueKeysOf, queueOptions } from "../queue/host.mjs";
|
|
76
76
|
import { queuePush } from "../queue/push-option.mjs";
|
|
77
77
|
import { buildMillisecondsOf } from "../queue/limits.mjs";
|
|
@@ -213,7 +213,8 @@ const wireServer = (options, wiring) => {
|
|
|
213
213
|
const { registry } = extensions;
|
|
214
214
|
const events = deliveryLog({
|
|
215
215
|
store,
|
|
216
|
-
now
|
|
216
|
+
now,
|
|
217
|
+
fetchLimits
|
|
217
218
|
});
|
|
218
219
|
registry.bindDeliveries((registered) => events.fill(registered));
|
|
219
220
|
const onFailure = workFailed(events, now);
|
|
@@ -272,7 +273,8 @@ const wireServer = (options, wiring) => {
|
|
|
272
273
|
registry.bindRows({
|
|
273
274
|
store,
|
|
274
275
|
fences,
|
|
275
|
-
repackJobRow: repackRow
|
|
276
|
+
repackJobRow: repackRow,
|
|
277
|
+
fetchLimits
|
|
276
278
|
});
|
|
277
279
|
const parts = {
|
|
278
280
|
store,
|
|
@@ -421,7 +423,7 @@ const wireServer = (options, wiring) => {
|
|
|
421
423
|
needs,
|
|
422
424
|
pushRefsMost: pushRefLimitOf(refIndex),
|
|
423
425
|
through: wiring.through
|
|
424
|
-
}), Context.add(SavedCallers, savedCallersOf(needs)), Context.add(LfsBase, lfsBase), Context.add(UploadsBase, uploadsBase), Context.add(TopicsBase, topicsBase), Context.add(TokensBase, tokensBase));
|
|
426
|
+
}), Context.add(SavedCallers, savedCallersOf(needs, entryAdderOf)), Context.add(LfsBase, lfsBase), Context.add(UploadsBase, uploadsBase), Context.add(TopicsBase, topicsBase), Context.add(TokensBase, tokensBase));
|
|
425
427
|
const queuedServices = queueHost === void 0 ? decided : decided.pipe(Context.add(QueueInternals, queueHost), Context.add(MergeQueue, queueService(queueHost)));
|
|
426
428
|
const withTokens = tokensHeld.calls === void 0 ? queuedServices : Context.add(queuedServices, Tokens, tokensHeld.calls);
|
|
427
429
|
const streamed = Context.add(withTokens, EventStreams, { feed: streams.feed });
|