@ref0/git 0.9.0 → 0.11.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/contracts/commits.d.mts +14 -2
- package/dist/contracts/commits.mjs +22 -3
- package/dist/contracts/queue.d.mts +5 -1
- package/dist/contracts/queue.mjs +1 -0
- package/dist/contracts/refs.mjs +3 -1
- package/dist/core/events/seen.mjs +5 -4
- package/dist/core/index-job.mjs +8 -6
- package/dist/core/job-view.mjs +20 -0
- package/dist/core/ref-view.mjs +1 -25
- package/dist/core/work.mjs +47 -4
- package/dist/engine/walk.mjs +51 -13
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lfs/upload-most.mjs +1 -1
- package/dist/queue/advance.mjs +8 -4
- package/dist/rest/commits.d.mts +253 -249
- package/dist/rest/files.d.mts +88 -88
- package/dist/rest/forks.d.mts +101 -101
- package/dist/rest/queue.d.mts +180 -180
- package/dist/rest/refs.d.mts +147 -147
- package/dist/rest/repos.d.mts +84 -84
- package/dist/rest/tags.d.mts +76 -76
- package/dist/rest/tokens.d.mts +144 -144
- package/dist/rest/topics.d.mts +112 -112
- package/dist/rest/trees.d.mts +77 -77
- package/dist/rest/work.d.mts +39 -39
- package/dist/sync/import.d.mts +12 -0
- package/dist/sync.d.mts +2 -1
- package/dist/sync.mjs +2 -1
- package/package.json +3 -3
package/dist/rest/topics.d.mts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
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<"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
readonly target: Schema.String;
|
|
8
|
-
readonly source: Schema.String;
|
|
9
|
-
readonly head: Schema.String;
|
|
10
|
-
readonly key: Schema.String;
|
|
11
|
-
readonly repo: Schema.String;
|
|
12
|
-
}>>;
|
|
13
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
4
|
+
declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/topics/:topic", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
topic: Schema.String;
|
|
6
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
14
7
|
readonly id: Schema.String;
|
|
15
8
|
readonly key: Schema.String;
|
|
16
9
|
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
@@ -451,7 +444,7 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
451
444
|
}>, {
|
|
452
445
|
"ref0-code": Schema.String;
|
|
453
446
|
'www-authenticate': Schema.String;
|
|
454
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
447
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"remove", "DELETE", "/topics/:topic", Schema.toCodecStringTree<Schema.Struct<{
|
|
455
448
|
topic: Schema.String;
|
|
456
449
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
457
450
|
readonly id: Schema.String;
|
|
@@ -894,55 +887,57 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
894
887
|
}>, {
|
|
895
888
|
"ref0-code": Schema.String;
|
|
896
889
|
'www-authenticate': Schema.String;
|
|
897
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
readonly id: Schema.String;
|
|
890
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"add", "POST", "/topics", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
891
|
+
readonly key: Schema.String;
|
|
892
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
893
|
+
readonly target: Schema.String;
|
|
894
|
+
readonly source: Schema.String;
|
|
895
|
+
readonly head: Schema.String;
|
|
904
896
|
readonly key: Schema.String;
|
|
905
|
-
readonly
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
readonly
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
readonly
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
readonly
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
readonly
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
897
|
+
readonly repo: Schema.String;
|
|
898
|
+
}>>;
|
|
899
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
900
|
+
readonly id: Schema.String;
|
|
901
|
+
readonly key: Schema.String;
|
|
902
|
+
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
903
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
904
|
+
readonly repo: Schema.String;
|
|
905
|
+
readonly target: Schema.String;
|
|
906
|
+
readonly entry: Schema.String;
|
|
907
|
+
readonly key: Schema.String;
|
|
908
|
+
readonly source: Schema.String;
|
|
909
|
+
readonly head: Schema.String;
|
|
910
|
+
}>>;
|
|
911
|
+
readonly pending: Schema.$Array<Schema.Struct<{
|
|
912
|
+
readonly repo: Schema.String;
|
|
913
|
+
readonly target: Schema.String;
|
|
914
|
+
readonly source: Schema.String;
|
|
915
|
+
readonly head: Schema.String;
|
|
916
|
+
readonly key: Schema.String;
|
|
917
|
+
}>>;
|
|
918
|
+
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
919
|
+
readonly repo: Schema.String;
|
|
920
|
+
readonly target: Schema.String;
|
|
921
|
+
readonly candidate: Schema.String;
|
|
922
|
+
readonly ref: Schema.String;
|
|
923
|
+
readonly commit: Schema.String;
|
|
924
|
+
}>>;
|
|
925
|
+
readonly waitingOn: Schema.optionalKey<Schema.Struct<{
|
|
926
|
+
readonly repo: Schema.String;
|
|
927
|
+
readonly target: Schema.String;
|
|
928
|
+
readonly topic: Schema.optionalKey<Schema.String>;
|
|
929
|
+
readonly hold: Schema.optionalKey<Schema.String>;
|
|
930
|
+
}>>;
|
|
931
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
932
|
+
readonly reason: Schema.Literals<readonly ["entry-failed", "reported", "cancelled", "refused", "host-error", "work-failed", "timeout", "report-timeout", "prepare-rejected"]>;
|
|
933
|
+
readonly repo: Schema.optionalKey<Schema.String>;
|
|
934
|
+
readonly entry: Schema.optionalKey<Schema.String>;
|
|
935
|
+
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
936
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
937
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
938
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
939
|
+
readonly hint: Schema.String;
|
|
940
|
+
}>>;
|
|
946
941
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
947
942
|
readonly code: "ALREADY_EXISTS";
|
|
948
943
|
readonly message: string;
|
|
@@ -1342,50 +1337,16 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
1342
1337
|
}>, {
|
|
1343
1338
|
"ref0-code": Schema.String;
|
|
1344
1339
|
'www-authenticate': Schema.String;
|
|
1345
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1340
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"report", "POST", "/topics/:topic/report", Schema.toCodecStringTree<Schema.Struct<{
|
|
1346
1341
|
topic: Schema.String;
|
|
1347
|
-
}>>, never,
|
|
1348
|
-
readonly
|
|
1349
|
-
readonly
|
|
1350
|
-
readonly
|
|
1351
|
-
readonly
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
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
|
-
}>>;
|
|
1342
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1343
|
+
readonly summary: Schema.optionalKey<Schema.String>;
|
|
1344
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
1345
|
+
readonly meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1346
|
+
readonly verdict: Schema.Literals<readonly ["pass", "fail", "cancel"]>;
|
|
1347
|
+
readonly candidates: Schema.$Array<Schema.String>;
|
|
1348
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1349
|
+
readonly repeat: Schema.Boolean;
|
|
1389
1350
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
1390
1351
|
readonly code: "ALREADY_EXISTS";
|
|
1391
1352
|
readonly message: string;
|
|
@@ -1785,16 +1746,55 @@ declare const TopicsApiGroup_base: HttpApiGroup.HttpApiGroup<"topics", HttpApiEn
|
|
|
1785
1746
|
}>, {
|
|
1786
1747
|
"ref0-code": Schema.String;
|
|
1787
1748
|
'www-authenticate': Schema.String;
|
|
1788
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
readonly
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1749
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/topics", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
1750
|
+
after: Schema.optionalKey<Schema.String>;
|
|
1751
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
1752
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>>;
|
|
1753
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1754
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
1755
|
+
readonly id: Schema.String;
|
|
1756
|
+
readonly key: Schema.String;
|
|
1757
|
+
readonly state: Schema.Literals<readonly ["reserving", "checking", "publishing", "failed", "merged", "removed"]>;
|
|
1758
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
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>;
|
|
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,20 +1,41 @@
|
|
|
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<"diff", "POST", "/repos/:repo/-/trees/diff", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
6
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
7
|
+
readonly base: Schema.String;
|
|
8
|
+
readonly head: Schema.String;
|
|
9
|
+
readonly renames: Schema.optionalKey<Schema.Boolean>;
|
|
10
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
11
|
+
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
12
|
+
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
13
|
+
readonly entries: Schema.optionalKey<Schema.Int>;
|
|
14
|
+
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
15
|
+
}>>;
|
|
16
|
+
readonly page: Schema.optionalKey<Schema.Struct<{
|
|
17
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
18
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
15
19
|
}>>;
|
|
16
20
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
17
|
-
readonly
|
|
21
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
22
|
+
status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
23
|
+
path: Schema.String;
|
|
24
|
+
from: Schema.optionalKey<Schema.String>;
|
|
25
|
+
similarity: Schema.optionalKey<Schema.Number>;
|
|
26
|
+
old: Schema.optionalKey<Schema.Struct<{
|
|
27
|
+
readonly mode: Schema.String;
|
|
28
|
+
readonly oid: Schema.String;
|
|
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>;
|
|
36
|
+
}>>>;
|
|
37
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
38
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
18
39
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
19
40
|
readonly code: "ALREADY_EXISTS";
|
|
20
41
|
readonly message: string;
|
|
@@ -414,41 +435,20 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
414
435
|
}>, {
|
|
415
436
|
"ref0-code": Schema.String;
|
|
416
437
|
'www-authenticate': Schema.String;
|
|
417
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
438
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/trees", Schema.toCodecStringTree<Schema.Struct<{
|
|
418
439
|
repo: Schema.String;
|
|
419
440
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
420
|
-
readonly
|
|
421
|
-
readonly
|
|
422
|
-
readonly
|
|
423
|
-
|
|
424
|
-
readonly
|
|
425
|
-
readonly
|
|
426
|
-
readonly
|
|
427
|
-
readonly
|
|
428
|
-
}>>;
|
|
429
|
-
readonly page: Schema.optionalKey<Schema.Struct<{
|
|
430
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
431
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
441
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
442
|
+
readonly base: Schema.optionalKey<Schema.String>;
|
|
443
|
+
readonly changes: Schema.$Array<Schema.Struct<{
|
|
444
|
+
readonly path: Schema.String;
|
|
445
|
+
readonly mode: Schema.optionalKey<Schema.String>;
|
|
446
|
+
readonly oid: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
447
|
+
readonly content: Schema.optionalKey<Schema.String>;
|
|
448
|
+
readonly contentBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
432
449
|
}>>;
|
|
433
450
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
434
|
-
readonly
|
|
435
|
-
status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
436
|
-
path: Schema.String;
|
|
437
|
-
from: Schema.optionalKey<Schema.String>;
|
|
438
|
-
similarity: Schema.optionalKey<Schema.Number>;
|
|
439
|
-
old: Schema.optionalKey<Schema.Struct<{
|
|
440
|
-
readonly mode: Schema.String;
|
|
441
|
-
readonly oid: Schema.String;
|
|
442
|
-
}>>;
|
|
443
|
-
new: Schema.optionalKey<Schema.Struct<{
|
|
444
|
-
readonly mode: Schema.String;
|
|
445
|
-
readonly oid: Schema.String;
|
|
446
|
-
}>>;
|
|
447
|
-
pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
448
|
-
fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
449
|
-
}>>>;
|
|
450
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
451
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
451
|
+
readonly oid: Schema.String;
|
|
452
452
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
453
453
|
readonly code: "ALREADY_EXISTS";
|
|
454
454
|
readonly message: string;
|
|
@@ -848,28 +848,22 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
848
848
|
}>, {
|
|
849
849
|
"ref0-code": Schema.String;
|
|
850
850
|
'www-authenticate': Schema.String;
|
|
851
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
851
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"merge", "POST", "/repos/:repo/-/trees/merge", Schema.toCodecStringTree<Schema.Struct<{
|
|
852
852
|
repo: Schema.String;
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
readonly type: Schema.Literals<readonly ["blob", "tree", "commit"]>;
|
|
868
|
-
readonly oid: Schema.String;
|
|
869
|
-
readonly size: Schema.optionalKey<Schema.Int>;
|
|
870
|
-
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
871
|
-
}>>>;
|
|
872
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
853
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
854
|
+
readonly base: Schema.optionalKey<Schema.String>;
|
|
855
|
+
readonly ours: Schema.String;
|
|
856
|
+
readonly theirs: Schema.String;
|
|
857
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
858
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
859
|
+
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
860
|
+
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
861
|
+
readonly entries: Schema.optionalKey<Schema.Int>;
|
|
862
|
+
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
863
|
+
}>>;
|
|
864
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
865
|
+
readonly tree: Schema.String;
|
|
866
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
873
867
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
874
868
|
readonly code: "ALREADY_EXISTS";
|
|
875
869
|
readonly message: string;
|
|
@@ -1269,22 +1263,28 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
1269
1263
|
}>, {
|
|
1270
1264
|
"ref0-code": Schema.String;
|
|
1271
1265
|
'www-authenticate': Schema.String;
|
|
1272
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1266
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/repos/:repo/-/trees/:oid", Schema.toCodecStringTree<Schema.Struct<{
|
|
1273
1267
|
repo: Schema.String;
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1268
|
+
oid: Schema.String;
|
|
1269
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1270
|
+
objects: Schema.optionalKey<Schema.Int>;
|
|
1271
|
+
bytes: Schema.optionalKey<Schema.Int>;
|
|
1272
|
+
entries: Schema.optionalKey<Schema.Int>;
|
|
1273
|
+
milliseconds: Schema.optionalKey<Schema.Int>;
|
|
1274
|
+
after: Schema.optionalKey<Schema.String>;
|
|
1275
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
1276
|
+
recursive: Schema.optionalKey<Schema.Boolean>;
|
|
1277
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1278
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
1279
|
+
readonly name: Schema.String;
|
|
1280
|
+
readonly path: Schema.String;
|
|
1281
|
+
readonly mode: Schema.String;
|
|
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>;
|
|
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,39 +1,13 @@
|
|
|
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<"discard", "POST", "/repos/:repo/-/work/discard", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
-
}>>, Schema.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>>, never,
|
|
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<{
|
|
6
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
7
|
+
readonly name: Schema.String;
|
|
8
|
+
readonly key: Schema.String;
|
|
9
|
+
readonly requestKey: Schema.optionalKey<Schema.String>;
|
|
10
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
37
11
|
readonly code: "ALREADY_EXISTS";
|
|
38
12
|
readonly message: string;
|
|
39
13
|
readonly hint?: string;
|
|
@@ -432,7 +406,7 @@ declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoi
|
|
|
432
406
|
}>, {
|
|
433
407
|
"ref0-code": Schema.String;
|
|
434
408
|
'www-authenticate': Schema.String;
|
|
435
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
409
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"retry", "POST", "/repos/:repo/-/work/retry", Schema.toCodecStringTree<Schema.Struct<{
|
|
436
410
|
repo: Schema.String;
|
|
437
411
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
438
412
|
readonly name: Schema.String;
|
|
@@ -837,13 +811,39 @@ declare const WorkApiGroup_base: HttpApiGroup.HttpApiGroup<"work", HttpApiEndpoi
|
|
|
837
811
|
}>, {
|
|
838
812
|
"ref0-code": Schema.String;
|
|
839
813
|
'www-authenticate': Schema.String;
|
|
840
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
814
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/repos/:repo/-/work", Schema.toCodecStringTree<Schema.Struct<{
|
|
841
815
|
repo: Schema.String;
|
|
842
|
-
}>>,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}>>, never,
|
|
816
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
817
|
+
after: Schema.optionalKey<Schema.String>;
|
|
818
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
819
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["waiting", "running", "failed"]>>;
|
|
820
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
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<{
|
|
847
847
|
readonly code: "ALREADY_EXISTS";
|
|
848
848
|
readonly message: string;
|
|
849
849
|
readonly hint?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GitError } from "../contracts/result.mjs";
|
|
2
|
+
import "../core/parts.mjs";
|
|
3
|
+
import "../contracts/authorize.mjs";
|
|
4
|
+
import "../contracts/sync.mjs";
|
|
5
|
+
import "./bound.mjs";
|
|
6
|
+
import "effect/Effect";
|
|
7
|
+
/**
|
|
8
|
+
* An importer who doesn't read every private pattern, refused for good (#2103): an import writes
|
|
9
|
+
* the repo's whole history, so who starts it sees the whole repo. `import` refuses one before it
|
|
10
|
+
* records anything, and each step asks again, as a view may narrow between them. Names no pattern.
|
|
11
|
+
*/
|
|
12
|
+
export declare const partialImporter: () => GitError;
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GitHubAppCredentials, ImportJobData, ImportPhase, ImportProgress, ImportState, ImportedMove, MirrorJobData, MirrorPause, MirrorState, ReportImportProgress, Sync, SyncCancelInput, SyncGitHubOptions, SyncImportInput, SyncLayerOptions, SyncMirrorInput, SyncMirrorsInput, SyncProvider, SyncPublishInput, SyncRemote, SyncRemoveMirrorInput, SyncSource, SyncTrigger, cancelImport, importRepo, importedPullRefs, mirror, mirrors, publishImported, removeMirror } from "./contracts/sync.mjs";
|
|
2
2
|
import { github, webhookBodyBytes } from "./sync/github.mjs";
|
|
3
|
+
import { partialImporter } from "./sync/import.mjs";
|
|
3
4
|
import { layer } from "./sync/layer.mjs";
|
|
4
5
|
import { smartHttp } from "./sync/smart-http.mjs";
|
|
5
|
-
export { type GitHubAppCredentials, type ImportJobData, type ImportPhase, type ImportProgress, type ImportState, type ImportedMove, type MirrorJobData, type MirrorPause, type MirrorState, type ReportImportProgress, Sync, type SyncCancelInput, type SyncGitHubOptions, type SyncImportInput, type SyncLayerOptions, type SyncMirrorInput, type SyncMirrorsInput, type SyncProvider, type SyncPublishInput, type SyncRemote, type SyncRemoveMirrorInput, type SyncSource, type SyncTrigger, cancelImport, github, importRepo as import, importedPullRefs, layer, mirror, mirrors, publishImported, removeMirror, smartHttp, webhookBodyBytes };
|
|
6
|
+
export { type GitHubAppCredentials, type ImportJobData, type ImportPhase, type ImportProgress, type ImportState, type ImportedMove, type MirrorJobData, type MirrorPause, type MirrorState, type ReportImportProgress, Sync, type SyncCancelInput, type SyncGitHubOptions, type SyncImportInput, type SyncLayerOptions, type SyncMirrorInput, type SyncMirrorsInput, type SyncProvider, type SyncPublishInput, type SyncRemote, type SyncRemoveMirrorInput, type SyncSource, type SyncTrigger, cancelImport, github, importRepo as import, importedPullRefs, layer, mirror, mirrors, partialImporter, publishImported, removeMirror, smartHttp, webhookBodyBytes };
|
package/dist/sync.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Sync, cancelImport, importRepo, importedPullRefs, mirror, mirrors, publishImported, removeMirror } from "./contracts/sync.mjs";
|
|
2
2
|
import { github, webhookBodyBytes } from "./sync/github.mjs";
|
|
3
|
+
import { partialImporter } from "./sync/import.mjs";
|
|
3
4
|
import { layer } from "./sync/layer.mjs";
|
|
4
5
|
import { smartHttp } from "./sync/smart-http.mjs";
|
|
5
|
-
export { Sync, cancelImport, github, importRepo as import, importedPullRefs, layer, mirror, mirrors, publishImported, removeMirror, smartHttp, webhookBodyBytes };
|
|
6
|
+
export { Sync, cancelImport, github, importRepo as import, importedPullRefs, layer, mirror, mirrors, partialImporter, publishImported, removeMirror, smartHttp, webhookBodyBytes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ref0/git",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Git hosting as a library: a server, a client and their merges",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@ref0/infra": "0.
|
|
65
|
+
"@ref0/infra": "0.11.0",
|
|
66
66
|
"pako": "2.1.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@effect/vitest": "4.1.7",
|
|
70
|
-
"@ref0/xdiff-wasm": "0.
|
|
70
|
+
"@ref0/xdiff-wasm": "0.11.0",
|
|
71
71
|
"effect": "4.1.7",
|
|
72
72
|
"vite-plus": "1.8.0",
|
|
73
73
|
"vitest": "5.1.1"
|