@ref0/git 0.10.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/queue.d.mts +5 -1
- package/dist/contracts/queue.mjs +1 -0
- 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/index-job.mjs +8 -6
- 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/advance.mjs +8 -4
- package/dist/queue/calls.mjs +21 -1
- package/dist/rest/blobs.d.mts +15 -15
- package/dist/rest/commits.d.mts +80 -80
- package/dist/rest/files.d.mts +103 -103
- package/dist/rest/forks.d.mts +39 -39
- package/dist/rest/layer.mjs +8 -1
- package/dist/rest/queue.d.mts +170 -170
- package/dist/rest/refs.d.mts +128 -128
- package/dist/rest/tokens.d.mts +187 -187
- package/dist/rest/trees.d.mts +41 -41
- 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.d.mts +12 -0
- 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/sync.d.mts +2 -1
- package/dist/sync.mjs +2 -1
- package/dist/topics/advance.mjs +10 -3
- package/package.json +3 -3
package/dist/rest/tokens.d.mts
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
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 TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"
|
|
5
|
-
|
|
6
|
-
}>>, Schema.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly subject: Schema.Struct<{
|
|
10
|
-
readonly id: Schema.String;
|
|
11
|
-
readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
|
|
12
|
-
readonly meta: Schema.optionalKey<Schema.Unknown>;
|
|
13
|
-
}>;
|
|
14
|
-
readonly key: Schema.optionalKey<Schema.String>;
|
|
15
|
-
}>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
16
|
-
readonly repo: Schema.String;
|
|
17
|
-
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
18
|
-
readonly id: Schema.String;
|
|
19
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
20
|
-
readonly expiresAt: Schema.Number;
|
|
21
|
-
readonly createdAt: Schema.Number;
|
|
22
|
-
readonly subject: Schema.Struct<{
|
|
23
|
-
readonly id: Schema.String;
|
|
24
|
-
}>;
|
|
25
|
-
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
26
|
-
readonly id: Schema.String;
|
|
27
|
-
}>>;
|
|
28
|
-
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
29
|
-
readonly secret: Schema.String;
|
|
30
|
-
}>, Schema.Struct<{
|
|
31
|
-
readonly prefix: Schema.String;
|
|
32
|
-
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
33
|
-
readonly id: Schema.String;
|
|
34
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
35
|
-
readonly expiresAt: Schema.Number;
|
|
36
|
-
readonly createdAt: Schema.Number;
|
|
37
|
-
readonly subject: Schema.Struct<{
|
|
38
|
-
readonly id: Schema.String;
|
|
39
|
-
}>;
|
|
40
|
-
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
41
|
-
readonly id: Schema.String;
|
|
42
|
-
}>>;
|
|
43
|
-
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
44
|
-
readonly secret: Schema.String;
|
|
45
|
-
}>]>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
4
|
+
declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
id: Schema.String;
|
|
6
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
|
+
key: Schema.optionalKey<Schema.String>;
|
|
8
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
46
9
|
readonly code: "ALREADY_EXISTS";
|
|
47
10
|
readonly message: string;
|
|
48
11
|
readonly hint?: string;
|
|
@@ -441,48 +404,43 @@ declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEn
|
|
|
441
404
|
}>, {
|
|
442
405
|
"ref0-code": Schema.String;
|
|
443
406
|
'www-authenticate': Schema.String;
|
|
444
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
readonly
|
|
452
|
-
readonly
|
|
453
|
-
}>;
|
|
454
|
-
readonly key: Schema.optionalKey<Schema.String>;
|
|
455
|
-
}>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
456
|
-
readonly repo: Schema.String;
|
|
457
|
-
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
458
|
-
readonly id: Schema.String;
|
|
459
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
460
|
-
readonly expiresAt: Schema.Number;
|
|
461
|
-
readonly createdAt: Schema.Number;
|
|
462
|
-
readonly subject: Schema.Struct<{
|
|
463
|
-
readonly id: Schema.String;
|
|
464
|
-
}>;
|
|
465
|
-
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
466
|
-
readonly id: Schema.String;
|
|
467
|
-
}>>;
|
|
468
|
-
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
469
|
-
readonly secret: Schema.String;
|
|
470
|
-
}>, Schema.Struct<{
|
|
471
|
-
readonly prefix: Schema.String;
|
|
472
|
-
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
473
|
-
readonly id: Schema.String;
|
|
474
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
475
|
-
readonly expiresAt: Schema.Number;
|
|
476
|
-
readonly createdAt: Schema.Number;
|
|
477
|
-
readonly subject: Schema.Struct<{
|
|
407
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"listPrefix", "GET", "/tokens", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
408
|
+
after: Schema.optionalKey<Schema.String>;
|
|
409
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
410
|
+
prefix: Schema.String;
|
|
411
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["active", "expired", "revoked", "all"]>>;
|
|
412
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
413
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
414
|
+
readonly repo: Schema.String;
|
|
415
|
+
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
478
416
|
readonly id: Schema.String;
|
|
479
|
-
|
|
480
|
-
|
|
417
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
418
|
+
readonly expiresAt: Schema.Number;
|
|
419
|
+
readonly createdAt: Schema.Number;
|
|
420
|
+
readonly subject: Schema.Struct<{
|
|
421
|
+
readonly id: Schema.String;
|
|
422
|
+
}>;
|
|
423
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
424
|
+
readonly id: Schema.String;
|
|
425
|
+
}>>;
|
|
426
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
427
|
+
}>, Schema.Struct<{
|
|
428
|
+
readonly prefix: Schema.String;
|
|
429
|
+
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
481
430
|
readonly id: Schema.String;
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
431
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
432
|
+
readonly expiresAt: Schema.Number;
|
|
433
|
+
readonly createdAt: Schema.Number;
|
|
434
|
+
readonly subject: Schema.Struct<{
|
|
435
|
+
readonly id: Schema.String;
|
|
436
|
+
}>;
|
|
437
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
438
|
+
readonly id: Schema.String;
|
|
439
|
+
}>>;
|
|
440
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
441
|
+
}>]>>>;
|
|
442
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
443
|
+
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
486
444
|
readonly code: "ALREADY_EXISTS";
|
|
487
445
|
readonly message: string;
|
|
488
446
|
readonly hint?: string;
|
|
@@ -881,37 +839,44 @@ declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEn
|
|
|
881
839
|
}>, {
|
|
882
840
|
"ref0-code": Schema.String;
|
|
883
841
|
'www-authenticate': Schema.String;
|
|
884
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
885
|
-
|
|
886
|
-
}>>,
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
readonly
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
readonly id: Schema.String;
|
|
895
|
-
}>;
|
|
896
|
-
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
897
|
-
readonly id: Schema.String;
|
|
898
|
-
}>>;
|
|
899
|
-
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
900
|
-
}>, Schema.Struct<{
|
|
901
|
-
readonly prefix: Schema.String;
|
|
902
|
-
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
903
|
-
readonly id: Schema.String;
|
|
904
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
905
|
-
readonly expiresAt: Schema.Number;
|
|
906
|
-
readonly createdAt: Schema.Number;
|
|
907
|
-
readonly subject: Schema.Struct<{
|
|
842
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"listRepo", "GET", "/repos/:repo/-/tokens", Schema.toCodecStringTree<Schema.Struct<{
|
|
843
|
+
repo: Schema.String;
|
|
844
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
845
|
+
after: Schema.optionalKey<Schema.String>;
|
|
846
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
847
|
+
state: Schema.optionalKey<Schema.Literals<readonly ["active", "expired", "revoked", "all"]>>;
|
|
848
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
849
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
850
|
+
readonly repo: Schema.String;
|
|
851
|
+
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
908
852
|
readonly id: Schema.String;
|
|
909
|
-
|
|
910
|
-
|
|
853
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
854
|
+
readonly expiresAt: Schema.Number;
|
|
855
|
+
readonly createdAt: Schema.Number;
|
|
856
|
+
readonly subject: Schema.Struct<{
|
|
857
|
+
readonly id: Schema.String;
|
|
858
|
+
}>;
|
|
859
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
860
|
+
readonly id: Schema.String;
|
|
861
|
+
}>>;
|
|
862
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
863
|
+
}>, Schema.Struct<{
|
|
864
|
+
readonly prefix: Schema.String;
|
|
865
|
+
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
911
866
|
readonly id: Schema.String;
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
867
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
868
|
+
readonly expiresAt: Schema.Number;
|
|
869
|
+
readonly createdAt: Schema.Number;
|
|
870
|
+
readonly subject: Schema.Struct<{
|
|
871
|
+
readonly id: Schema.String;
|
|
872
|
+
}>;
|
|
873
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
874
|
+
readonly id: Schema.String;
|
|
875
|
+
}>>;
|
|
876
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
877
|
+
}>]>>>;
|
|
878
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
879
|
+
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
915
880
|
readonly code: "ALREADY_EXISTS";
|
|
916
881
|
readonly message: string;
|
|
917
882
|
readonly hint?: string;
|
|
@@ -1310,43 +1275,37 @@ declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEn
|
|
|
1310
1275
|
}>, {
|
|
1311
1276
|
"ref0-code": Schema.String;
|
|
1312
1277
|
'www-authenticate': Schema.String;
|
|
1313
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
readonly
|
|
1320
|
-
|
|
1321
|
-
|
|
1278
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/tokens/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
1279
|
+
id: Schema.String;
|
|
1280
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
1281
|
+
readonly repo: Schema.String;
|
|
1282
|
+
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
1283
|
+
readonly id: Schema.String;
|
|
1284
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
1285
|
+
readonly expiresAt: Schema.Number;
|
|
1286
|
+
readonly createdAt: Schema.Number;
|
|
1287
|
+
readonly subject: Schema.Struct<{
|
|
1322
1288
|
readonly id: Schema.String;
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
readonly createdAt: Schema.Number;
|
|
1326
|
-
readonly subject: Schema.Struct<{
|
|
1327
|
-
readonly id: Schema.String;
|
|
1328
|
-
}>;
|
|
1329
|
-
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
1330
|
-
readonly id: Schema.String;
|
|
1331
|
-
}>>;
|
|
1332
|
-
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
1333
|
-
}>, Schema.Struct<{
|
|
1334
|
-
readonly prefix: Schema.String;
|
|
1335
|
-
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
1289
|
+
}>;
|
|
1290
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
1336
1291
|
readonly id: Schema.String;
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1292
|
+
}>>;
|
|
1293
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
1294
|
+
}>, Schema.Struct<{
|
|
1295
|
+
readonly prefix: Schema.String;
|
|
1296
|
+
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
1297
|
+
readonly id: Schema.String;
|
|
1298
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
1299
|
+
readonly expiresAt: Schema.Number;
|
|
1300
|
+
readonly createdAt: Schema.Number;
|
|
1301
|
+
readonly subject: Schema.Struct<{
|
|
1302
|
+
readonly id: Schema.String;
|
|
1303
|
+
}>;
|
|
1304
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
1305
|
+
readonly id: Schema.String;
|
|
1306
|
+
}>>;
|
|
1307
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
1308
|
+
}>]>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1350
1309
|
readonly code: "ALREADY_EXISTS";
|
|
1351
1310
|
readonly message: string;
|
|
1352
1311
|
readonly hint?: string;
|
|
@@ -1745,44 +1704,48 @@ declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEn
|
|
|
1745
1704
|
}>, {
|
|
1746
1705
|
"ref0-code": Schema.String;
|
|
1747
1706
|
'www-authenticate': Schema.String;
|
|
1748
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1749
|
-
|
|
1750
|
-
}>>, Schema.
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1755
|
-
readonly items: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1756
|
-
readonly repo: Schema.String;
|
|
1757
|
-
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
1707
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"createPrefix", "POST", "/tokens", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
1708
|
+
prefix: Schema.String;
|
|
1709
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
1710
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
1711
|
+
readonly expiresAt: Schema.Number;
|
|
1712
|
+
readonly subject: Schema.Struct<{
|
|
1758
1713
|
readonly id: Schema.String;
|
|
1759
|
-
readonly
|
|
1760
|
-
readonly
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
1714
|
+
readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
|
|
1715
|
+
readonly meta: Schema.optionalKey<Schema.Unknown>;
|
|
1716
|
+
}>;
|
|
1717
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
1718
|
+
}>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
1719
|
+
readonly repo: Schema.String;
|
|
1720
|
+
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
1721
|
+
readonly id: Schema.String;
|
|
1722
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
1723
|
+
readonly expiresAt: Schema.Number;
|
|
1724
|
+
readonly createdAt: Schema.Number;
|
|
1725
|
+
readonly subject: Schema.Struct<{
|
|
1772
1726
|
readonly id: Schema.String;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
readonly
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
readonly
|
|
1785
|
-
|
|
1727
|
+
}>;
|
|
1728
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
1729
|
+
readonly id: Schema.String;
|
|
1730
|
+
}>>;
|
|
1731
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
1732
|
+
readonly secret: Schema.String;
|
|
1733
|
+
}>, Schema.Struct<{
|
|
1734
|
+
readonly prefix: Schema.String;
|
|
1735
|
+
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
1736
|
+
readonly id: Schema.String;
|
|
1737
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
1738
|
+
readonly expiresAt: Schema.Number;
|
|
1739
|
+
readonly createdAt: Schema.Number;
|
|
1740
|
+
readonly subject: Schema.Struct<{
|
|
1741
|
+
readonly id: Schema.String;
|
|
1742
|
+
}>;
|
|
1743
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
1744
|
+
readonly id: Schema.String;
|
|
1745
|
+
}>>;
|
|
1746
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
1747
|
+
readonly secret: Schema.String;
|
|
1748
|
+
}>]>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1786
1749
|
readonly code: "ALREADY_EXISTS";
|
|
1787
1750
|
readonly message: string;
|
|
1788
1751
|
readonly hint?: string;
|
|
@@ -2181,11 +2144,48 @@ declare const TokensApiGroup_base: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEn
|
|
|
2181
2144
|
}>, {
|
|
2182
2145
|
"ref0-code": Schema.String;
|
|
2183
2146
|
'www-authenticate': Schema.String;
|
|
2184
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
2185
|
-
|
|
2186
|
-
}>>, Schema.
|
|
2187
|
-
|
|
2188
|
-
|
|
2147
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"createRepo", "POST", "/repos/:repo/-/tokens", Schema.toCodecStringTree<Schema.Struct<{
|
|
2148
|
+
repo: Schema.String;
|
|
2149
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2150
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
2151
|
+
readonly expiresAt: Schema.Number;
|
|
2152
|
+
readonly subject: Schema.Struct<{
|
|
2153
|
+
readonly id: Schema.String;
|
|
2154
|
+
readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
|
|
2155
|
+
readonly meta: Schema.optionalKey<Schema.Unknown>;
|
|
2156
|
+
}>;
|
|
2157
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
2158
|
+
}>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
2159
|
+
readonly repo: Schema.String;
|
|
2160
|
+
readonly prefix: Schema.optionalKey<Schema.Never>;
|
|
2161
|
+
readonly id: Schema.String;
|
|
2162
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
2163
|
+
readonly expiresAt: Schema.Number;
|
|
2164
|
+
readonly createdAt: Schema.Number;
|
|
2165
|
+
readonly subject: Schema.Struct<{
|
|
2166
|
+
readonly id: Schema.String;
|
|
2167
|
+
}>;
|
|
2168
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
2169
|
+
readonly id: Schema.String;
|
|
2170
|
+
}>>;
|
|
2171
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
2172
|
+
readonly secret: Schema.String;
|
|
2173
|
+
}>, Schema.Struct<{
|
|
2174
|
+
readonly prefix: Schema.String;
|
|
2175
|
+
readonly repo: Schema.optionalKey<Schema.Never>;
|
|
2176
|
+
readonly id: Schema.String;
|
|
2177
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
2178
|
+
readonly expiresAt: Schema.Number;
|
|
2179
|
+
readonly createdAt: Schema.Number;
|
|
2180
|
+
readonly subject: Schema.Struct<{
|
|
2181
|
+
readonly id: Schema.String;
|
|
2182
|
+
}>;
|
|
2183
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
2184
|
+
readonly id: Schema.String;
|
|
2185
|
+
}>>;
|
|
2186
|
+
readonly revokedAt: Schema.optionalKey<Schema.Number>;
|
|
2187
|
+
readonly secret: Schema.String;
|
|
2188
|
+
}>]>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
2189
2189
|
readonly code: "ALREADY_EXISTS";
|
|
2190
2190
|
readonly message: string;
|
|
2191
2191
|
readonly hint?: string;
|
package/dist/rest/trees.d.mts
CHANGED
|
@@ -422,20 +422,41 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
422
422
|
}>, {
|
|
423
423
|
"ref0-code": Schema.String;
|
|
424
424
|
'www-authenticate': Schema.String;
|
|
425
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
425
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"diff", "POST", "/repos/:repo/-/trees/diff", Schema.toCodecStringTree<Schema.Struct<{
|
|
426
426
|
repo: Schema.String;
|
|
427
427
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
428
|
-
readonly
|
|
429
|
-
readonly
|
|
430
|
-
readonly
|
|
431
|
-
|
|
432
|
-
readonly
|
|
433
|
-
readonly
|
|
434
|
-
readonly
|
|
435
|
-
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>;
|
|
436
440
|
}>>;
|
|
437
441
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
438
|
-
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"]>>;
|
|
439
460
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
440
461
|
readonly code: "ALREADY_EXISTS";
|
|
441
462
|
readonly message: string;
|
|
@@ -835,41 +856,20 @@ declare const TreesApiGroup_base: HttpApiGroup.HttpApiGroup<"trees", HttpApiEndp
|
|
|
835
856
|
}>, {
|
|
836
857
|
"ref0-code": Schema.String;
|
|
837
858
|
'www-authenticate': Schema.String;
|
|
838
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
859
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/trees", Schema.toCodecStringTree<Schema.Struct<{
|
|
839
860
|
repo: Schema.String;
|
|
840
861
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
841
|
-
readonly
|
|
842
|
-
readonly
|
|
843
|
-
readonly
|
|
844
|
-
|
|
845
|
-
readonly
|
|
846
|
-
readonly
|
|
847
|
-
readonly
|
|
848
|
-
readonly
|
|
849
|
-
}>>;
|
|
850
|
-
readonly page: Schema.optionalKey<Schema.Struct<{
|
|
851
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
852
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
862
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
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>;
|
|
853
870
|
}>>;
|
|
854
871
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
855
|
-
readonly
|
|
856
|
-
status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
857
|
-
path: Schema.String;
|
|
858
|
-
from: Schema.optionalKey<Schema.String>;
|
|
859
|
-
similarity: Schema.optionalKey<Schema.Number>;
|
|
860
|
-
old: Schema.optionalKey<Schema.Struct<{
|
|
861
|
-
readonly mode: Schema.String;
|
|
862
|
-
readonly oid: Schema.String;
|
|
863
|
-
}>>;
|
|
864
|
-
new: Schema.optionalKey<Schema.Struct<{
|
|
865
|
-
readonly mode: Schema.String;
|
|
866
|
-
readonly oid: Schema.String;
|
|
867
|
-
}>>;
|
|
868
|
-
pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
869
|
-
fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
870
|
-
}>>>;
|
|
871
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
872
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
872
|
+
readonly oid: Schema.String;
|
|
873
873
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
874
874
|
readonly code: "ALREADY_EXISTS";
|
|
875
875
|
readonly message: 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 });
|