@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/blobs.d.mts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
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 BlobsApiGroup_base: HttpApiGroup.HttpApiGroup<"blobs", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const BlobsApiGroup_base: HttpApiGroup.HttpApiGroup<"blobs", HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/repos/:repo/-/blobs/:oid", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
+
oid: Schema.String;
|
|
6
7
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
|
|
8
|
+
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
10
|
+
readonly entries: Schema.optionalKey<Schema.Int>;
|
|
11
|
+
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
12
|
+
}>>, never, never, HttpApiSchema.WithHeaders<HttpApiSchema.StreamUint8Array, Schema.toCodecStringTree<Schema.Struct<{
|
|
13
|
+
etag: Schema.String;
|
|
14
|
+
'content-length': Schema.NumberFromString;
|
|
15
|
+
}>>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
11
16
|
readonly code: "ALREADY_EXISTS";
|
|
12
17
|
readonly message: string;
|
|
13
18
|
readonly hint?: string;
|
|
@@ -406,18 +411,13 @@ declare const BlobsApiGroup_base: HttpApiGroup.HttpApiGroup<"blobs", HttpApiEndp
|
|
|
406
411
|
}>, {
|
|
407
412
|
"ref0-code": Schema.String;
|
|
408
413
|
'www-authenticate': Schema.String;
|
|
409
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
414
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/blobs", Schema.toCodecStringTree<Schema.Struct<{
|
|
410
415
|
repo: Schema.String;
|
|
411
|
-
oid: Schema.String;
|
|
412
416
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
readonly
|
|
416
|
-
|
|
417
|
-
}>>, never, never, HttpApiSchema.WithHeaders<HttpApiSchema.StreamUint8Array, Schema.toCodecStringTree<Schema.Struct<{
|
|
418
|
-
etag: Schema.String;
|
|
419
|
-
'content-length': Schema.NumberFromString;
|
|
420
|
-
}>>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
417
|
+
key: Schema.optionalKey<Schema.String>;
|
|
418
|
+
}>>, HttpApiSchema.StreamUint8Array, never, Schema.toCodecJson<Schema.Struct<{
|
|
419
|
+
readonly oid: Schema.String;
|
|
420
|
+
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
421
421
|
readonly code: "ALREADY_EXISTS";
|
|
422
422
|
readonly message: string;
|
|
423
423
|
readonly hint?: string;
|
package/dist/rest/commits.d.mts
CHANGED
|
@@ -1312,20 +1312,10 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
1312
1312
|
}>, {
|
|
1313
1313
|
"ref0-code": Schema.String;
|
|
1314
1314
|
'www-authenticate': Schema.String;
|
|
1315
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1315
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"mergeBase", "POST", "/repos/:repo/-/commits/merge-base", Schema.toCodecStringTree<Schema.Struct<{
|
|
1316
1316
|
repo: Schema.String;
|
|
1317
1317
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1318
|
-
readonly
|
|
1319
|
-
readonly head: Schema.String;
|
|
1320
|
-
readonly renames: Schema.optionalKey<Schema.Boolean>;
|
|
1321
|
-
readonly commits: Schema.optionalKey<Schema.Struct<{
|
|
1322
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
1323
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
1324
|
-
}>>;
|
|
1325
|
-
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
1326
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
1327
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
1328
|
-
}>>;
|
|
1318
|
+
readonly commits: Schema.$Array<Schema.String>;
|
|
1329
1319
|
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
1330
1320
|
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
1331
1321
|
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
@@ -1333,58 +1323,7 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
1333
1323
|
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
1334
1324
|
}>>;
|
|
1335
1325
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1336
|
-
readonly
|
|
1337
|
-
readonly head: Schema.String;
|
|
1338
|
-
readonly mergeBase: Schema.optionalKey<Schema.String>;
|
|
1339
|
-
readonly ahead: Schema.Int;
|
|
1340
|
-
readonly behind: Schema.Int;
|
|
1341
|
-
readonly commits: Schema.Struct<{
|
|
1342
|
-
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
1343
|
-
readonly oid: Schema.String;
|
|
1344
|
-
readonly tree: Schema.String;
|
|
1345
|
-
readonly parents: Schema.$Array<Schema.String>;
|
|
1346
|
-
readonly author: Schema.Struct<{
|
|
1347
|
-
readonly name: Schema.String;
|
|
1348
|
-
readonly email: Schema.String;
|
|
1349
|
-
readonly at: Schema.Number;
|
|
1350
|
-
readonly offset: Schema.Int;
|
|
1351
|
-
}>;
|
|
1352
|
-
readonly committer: Schema.Struct<{
|
|
1353
|
-
readonly name: Schema.String;
|
|
1354
|
-
readonly email: Schema.String;
|
|
1355
|
-
readonly at: Schema.Number;
|
|
1356
|
-
readonly offset: Schema.Int;
|
|
1357
|
-
}>;
|
|
1358
|
-
readonly subject: Schema.String;
|
|
1359
|
-
readonly message: Schema.String;
|
|
1360
|
-
readonly signature: Schema.optionalKey<Schema.String>;
|
|
1361
|
-
}>>>;
|
|
1362
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
1363
|
-
}>;
|
|
1364
|
-
readonly files: Schema.Struct<{
|
|
1365
|
-
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
1366
|
-
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
1367
|
-
readonly path: Schema.String;
|
|
1368
|
-
readonly from: Schema.optionalKey<Schema.String>;
|
|
1369
|
-
readonly similarity: Schema.optionalKey<Schema.Number>;
|
|
1370
|
-
readonly old: Schema.optionalKey<Schema.Struct<{
|
|
1371
|
-
readonly mode: Schema.String;
|
|
1372
|
-
readonly oid: Schema.String;
|
|
1373
|
-
}>>;
|
|
1374
|
-
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
1375
|
-
readonly mode: Schema.String;
|
|
1376
|
-
readonly oid: Schema.String;
|
|
1377
|
-
}>>;
|
|
1378
|
-
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
1379
|
-
readonly fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
1380
|
-
readonly lines: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1381
|
-
readonly added: Schema.Int;
|
|
1382
|
-
readonly deleted: Schema.Int;
|
|
1383
|
-
}>, Schema.Literal<"binary">]>>;
|
|
1384
|
-
}>>>;
|
|
1385
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
1386
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
1387
|
-
}>;
|
|
1326
|
+
readonly bases: Schema.$Array<Schema.String>;
|
|
1388
1327
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1389
1328
|
readonly code: "ALREADY_EXISTS";
|
|
1390
1329
|
readonly message: string;
|
|
@@ -2218,10 +2157,20 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
2218
2157
|
}>, {
|
|
2219
2158
|
"ref0-code": Schema.String;
|
|
2220
2159
|
'www-authenticate': Schema.String;
|
|
2221
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
2160
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"compare", "POST", "/repos/:repo/-/commits/compare", Schema.toCodecStringTree<Schema.Struct<{
|
|
2222
2161
|
repo: Schema.String;
|
|
2223
2162
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2224
|
-
readonly
|
|
2163
|
+
readonly base: Schema.String;
|
|
2164
|
+
readonly head: Schema.String;
|
|
2165
|
+
readonly renames: Schema.optionalKey<Schema.Boolean>;
|
|
2166
|
+
readonly commits: Schema.optionalKey<Schema.Struct<{
|
|
2167
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
2168
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
2169
|
+
}>>;
|
|
2170
|
+
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
2171
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
2172
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
2173
|
+
}>>;
|
|
2225
2174
|
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
2226
2175
|
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
2227
2176
|
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
@@ -2229,7 +2178,58 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
2229
2178
|
readonly milliseconds: Schema.optionalKey<Schema.Int>;
|
|
2230
2179
|
}>>;
|
|
2231
2180
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2232
|
-
readonly
|
|
2181
|
+
readonly base: Schema.String;
|
|
2182
|
+
readonly head: Schema.String;
|
|
2183
|
+
readonly mergeBase: Schema.optionalKey<Schema.String>;
|
|
2184
|
+
readonly ahead: Schema.Int;
|
|
2185
|
+
readonly behind: Schema.Int;
|
|
2186
|
+
readonly commits: Schema.Struct<{
|
|
2187
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
2188
|
+
readonly oid: Schema.String;
|
|
2189
|
+
readonly tree: Schema.String;
|
|
2190
|
+
readonly parents: Schema.$Array<Schema.String>;
|
|
2191
|
+
readonly author: Schema.Struct<{
|
|
2192
|
+
readonly name: Schema.String;
|
|
2193
|
+
readonly email: Schema.String;
|
|
2194
|
+
readonly at: Schema.Number;
|
|
2195
|
+
readonly offset: Schema.Int;
|
|
2196
|
+
}>;
|
|
2197
|
+
readonly committer: Schema.Struct<{
|
|
2198
|
+
readonly name: Schema.String;
|
|
2199
|
+
readonly email: Schema.String;
|
|
2200
|
+
readonly at: Schema.Number;
|
|
2201
|
+
readonly offset: Schema.Int;
|
|
2202
|
+
}>;
|
|
2203
|
+
readonly subject: Schema.String;
|
|
2204
|
+
readonly message: Schema.String;
|
|
2205
|
+
readonly signature: Schema.optionalKey<Schema.String>;
|
|
2206
|
+
}>>>;
|
|
2207
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
2208
|
+
}>;
|
|
2209
|
+
readonly files: Schema.Struct<{
|
|
2210
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
2211
|
+
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
2212
|
+
readonly path: Schema.String;
|
|
2213
|
+
readonly from: Schema.optionalKey<Schema.String>;
|
|
2214
|
+
readonly similarity: Schema.optionalKey<Schema.Number>;
|
|
2215
|
+
readonly old: Schema.optionalKey<Schema.Struct<{
|
|
2216
|
+
readonly mode: Schema.String;
|
|
2217
|
+
readonly oid: Schema.String;
|
|
2218
|
+
}>>;
|
|
2219
|
+
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
2220
|
+
readonly mode: Schema.String;
|
|
2221
|
+
readonly oid: Schema.String;
|
|
2222
|
+
}>>;
|
|
2223
|
+
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
2224
|
+
readonly fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
2225
|
+
readonly lines: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
2226
|
+
readonly added: Schema.Int;
|
|
2227
|
+
readonly deleted: Schema.Int;
|
|
2228
|
+
}>, Schema.Literal<"binary">]>>;
|
|
2229
|
+
}>>>;
|
|
2230
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
2231
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
2232
|
+
}>;
|
|
2233
2233
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
2234
2234
|
readonly code: "ALREADY_EXISTS";
|
|
2235
2235
|
readonly message: string;
|
|
@@ -2629,9 +2629,16 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
2629
2629
|
}>, {
|
|
2630
2630
|
"ref0-code": Schema.String;
|
|
2631
2631
|
'www-authenticate': Schema.String;
|
|
2632
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
2632
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"revert", "POST", "/repos/:repo/-/commits/revert", Schema.toCodecStringTree<Schema.Struct<{
|
|
2633
2633
|
repo: Schema.String;
|
|
2634
2634
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2635
|
+
readonly message: Schema.String;
|
|
2636
|
+
readonly author: Schema.Struct<{
|
|
2637
|
+
readonly name: Schema.String;
|
|
2638
|
+
readonly email: Schema.String;
|
|
2639
|
+
readonly at: Schema.Number;
|
|
2640
|
+
readonly offset: Schema.Int;
|
|
2641
|
+
}>;
|
|
2635
2642
|
readonly commit: Schema.String;
|
|
2636
2643
|
readonly onto: Schema.String;
|
|
2637
2644
|
readonly committer: Schema.optionalKey<Schema.Struct<{
|
|
@@ -2640,10 +2647,6 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
2640
2647
|
readonly at: Schema.Number;
|
|
2641
2648
|
readonly offset: Schema.Int;
|
|
2642
2649
|
}>>;
|
|
2643
|
-
readonly ref: Schema.optionalKey<Schema.Struct<{
|
|
2644
|
-
readonly name: Schema.String;
|
|
2645
|
-
readonly from: Schema.NullOr<Schema.String>;
|
|
2646
|
-
}>>;
|
|
2647
2650
|
readonly key: Schema.optionalKey<Schema.String>;
|
|
2648
2651
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2649
2652
|
readonly oid: Schema.String;
|
|
@@ -3063,16 +3066,9 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
3063
3066
|
}>, {
|
|
3064
3067
|
"ref0-code": Schema.String;
|
|
3065
3068
|
'www-authenticate': Schema.String;
|
|
3066
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
3069
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"pick", "POST", "/repos/:repo/-/commits/pick", Schema.toCodecStringTree<Schema.Struct<{
|
|
3067
3070
|
repo: Schema.String;
|
|
3068
3071
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3069
|
-
readonly message: Schema.String;
|
|
3070
|
-
readonly author: Schema.Struct<{
|
|
3071
|
-
readonly name: Schema.String;
|
|
3072
|
-
readonly email: Schema.String;
|
|
3073
|
-
readonly at: Schema.Number;
|
|
3074
|
-
readonly offset: Schema.Int;
|
|
3075
|
-
}>;
|
|
3076
3072
|
readonly commit: Schema.String;
|
|
3077
3073
|
readonly onto: Schema.String;
|
|
3078
3074
|
readonly committer: Schema.optionalKey<Schema.Struct<{
|
|
@@ -3081,6 +3077,10 @@ declare const CommitsApiGroup_base: HttpApiGroup.HttpApiGroup<"commits", HttpApi
|
|
|
3081
3077
|
readonly at: Schema.Number;
|
|
3082
3078
|
readonly offset: Schema.Int;
|
|
3083
3079
|
}>>;
|
|
3080
|
+
readonly ref: Schema.optionalKey<Schema.Struct<{
|
|
3081
|
+
readonly name: Schema.String;
|
|
3082
|
+
readonly from: Schema.NullOr<Schema.String>;
|
|
3083
|
+
}>>;
|
|
3084
3084
|
readonly key: Schema.optionalKey<Schema.String>;
|
|
3085
3085
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3086
3086
|
readonly oid: Schema.String;
|
package/dist/rest/files.d.mts
CHANGED
|
@@ -1,79 +1,29 @@
|
|
|
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 FilesApiGroup_base: HttpApiGroup.HttpApiGroup<"files", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const FilesApiGroup_base: HttpApiGroup.HttpApiGroup<"files", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/repos/:repo/-/files", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
-
}>>,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly after: Schema.optionalKey<Schema.String>;
|
|
20
|
-
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
21
|
-
}>>;
|
|
22
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
23
|
-
readonly items: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
24
|
-
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
25
|
-
readonly path: Schema.String;
|
|
26
|
-
readonly from: Schema.optionalKey<Schema.String>;
|
|
27
|
-
readonly similarity: Schema.optionalKey<Schema.Number>;
|
|
28
|
-
readonly old: Schema.optionalKey<Schema.Struct<{
|
|
29
|
-
readonly mode: Schema.String;
|
|
30
|
-
readonly oid: Schema.String;
|
|
31
|
-
}>>;
|
|
32
|
-
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
33
|
-
readonly mode: Schema.String;
|
|
34
|
-
readonly oid: Schema.String;
|
|
35
|
-
}>>;
|
|
36
|
-
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
37
|
-
readonly fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
38
|
-
readonly lines: Schema.Union<readonly [Schema.Struct<{
|
|
39
|
-
readonly added: Schema.Int;
|
|
40
|
-
readonly deleted: Schema.Int;
|
|
41
|
-
}>, Schema.Literal<"binary">]>;
|
|
42
|
-
readonly patch: Schema.String;
|
|
43
|
-
}>, Schema.Struct<{
|
|
44
|
-
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
6
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
|
+
objects: Schema.optionalKey<Schema.Int>;
|
|
8
|
+
bytes: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
entries: Schema.optionalKey<Schema.Int>;
|
|
10
|
+
milliseconds: Schema.optionalKey<Schema.Int>;
|
|
11
|
+
after: Schema.optionalKey<Schema.String>;
|
|
12
|
+
limit: Schema.optionalKey<Schema.Int>;
|
|
13
|
+
ref: Schema.String;
|
|
14
|
+
path: Schema.optionalKey<Schema.String>;
|
|
15
|
+
recursive: Schema.optionalKey<Schema.Boolean>;
|
|
16
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
17
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
18
|
+
readonly name: Schema.String;
|
|
45
19
|
readonly path: Schema.String;
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
|
|
50
|
-
readonly oid: Schema.String;
|
|
51
|
-
}>>;
|
|
52
|
-
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
53
|
-
readonly mode: Schema.String;
|
|
54
|
-
readonly oid: Schema.String;
|
|
55
|
-
}>>;
|
|
20
|
+
readonly mode: Schema.String;
|
|
21
|
+
readonly type: Schema.Literals<readonly ["blob", "tree", "commit"]>;
|
|
22
|
+
readonly oid: Schema.String;
|
|
23
|
+
readonly size: Schema.optionalKey<Schema.Int>;
|
|
56
24
|
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
57
|
-
|
|
58
|
-
readonly lines: Schema.Union<readonly [Schema.Struct<{
|
|
59
|
-
readonly added: Schema.Int;
|
|
60
|
-
readonly deleted: Schema.Int;
|
|
61
|
-
}>, Schema.Literal<"binary">]>;
|
|
62
|
-
readonly hunks: Schema.$Array<Schema.Struct<{
|
|
63
|
-
readonly oldStart: Schema.Int;
|
|
64
|
-
readonly oldLines: Schema.Int;
|
|
65
|
-
readonly newStart: Schema.Int;
|
|
66
|
-
readonly newLines: Schema.Int;
|
|
67
|
-
readonly context: Schema.String;
|
|
68
|
-
readonly lines: Schema.$Array<Schema.Struct<{
|
|
69
|
-
readonly kind: Schema.Literals<readonly ["context", "add", "delete"]>;
|
|
70
|
-
readonly text: Schema.String;
|
|
71
|
-
readonly noNewline: Schema.optionalKey<Schema.Literal<true>>;
|
|
72
|
-
}>>;
|
|
73
|
-
}>>;
|
|
74
|
-
}>]>>>;
|
|
25
|
+
}>>>;
|
|
75
26
|
readonly next: Schema.optionalKey<Schema.String>;
|
|
76
|
-
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
77
27
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
78
28
|
readonly code: "ALREADY_EXISTS";
|
|
79
29
|
readonly message: string;
|
|
@@ -473,29 +423,33 @@ declare const FilesApiGroup_base: HttpApiGroup.HttpApiGroup<"files", HttpApiEndp
|
|
|
473
423
|
}>, {
|
|
474
424
|
"ref0-code": Schema.String;
|
|
475
425
|
'www-authenticate': Schema.String;
|
|
476
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
426
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"read", "POST", "/repos/:repo/-/files/read", Schema.toCodecStringTree<Schema.Struct<{
|
|
477
427
|
repo: Schema.String;
|
|
478
|
-
}>>, Schema.
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
readonly
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
428
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
429
|
+
readonly ref: Schema.String;
|
|
430
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
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>;
|
|
440
|
+
}>>;
|
|
441
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
442
|
+
readonly files: Schema.Struct<{
|
|
443
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
444
|
+
readonly path: Schema.String;
|
|
445
|
+
readonly oid: Schema.String;
|
|
446
|
+
readonly mode: Schema.String;
|
|
447
|
+
readonly size: Schema.Int;
|
|
448
|
+
readonly content: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
449
|
+
}>>>;
|
|
450
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
451
|
+
}>;
|
|
452
|
+
readonly missing: Schema.$Array<Schema.String>;
|
|
499
453
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
500
454
|
readonly code: "ALREADY_EXISTS";
|
|
501
455
|
readonly message: string;
|
|
@@ -895,11 +849,14 @@ declare const FilesApiGroup_base: HttpApiGroup.HttpApiGroup<"files", HttpApiEndp
|
|
|
895
849
|
}>, {
|
|
896
850
|
"ref0-code": Schema.String;
|
|
897
851
|
'www-authenticate': Schema.String;
|
|
898
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
852
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"diff", "POST", "/repos/:repo/-/files/diff", Schema.toCodecStringTree<Schema.Struct<{
|
|
899
853
|
repo: Schema.String;
|
|
900
854
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
901
|
-
readonly
|
|
902
|
-
readonly
|
|
855
|
+
readonly base: Schema.String;
|
|
856
|
+
readonly head: Schema.String;
|
|
857
|
+
readonly renames: Schema.optionalKey<Schema.Boolean>;
|
|
858
|
+
readonly paths: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
859
|
+
readonly format: Schema.optionalKey<Schema.Literals<readonly ["patch", "hunks"]>>;
|
|
903
860
|
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
904
861
|
readonly objects: Schema.optionalKey<Schema.Int>;
|
|
905
862
|
readonly bytes: Schema.optionalKey<Schema.Int>;
|
|
@@ -911,17 +868,60 @@ declare const FilesApiGroup_base: HttpApiGroup.HttpApiGroup<"files", HttpApiEndp
|
|
|
911
868
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
912
869
|
}>>;
|
|
913
870
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
914
|
-
readonly
|
|
915
|
-
readonly
|
|
916
|
-
|
|
871
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
872
|
+
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
873
|
+
readonly path: Schema.String;
|
|
874
|
+
readonly from: Schema.optionalKey<Schema.String>;
|
|
875
|
+
readonly similarity: Schema.optionalKey<Schema.Number>;
|
|
876
|
+
readonly old: Schema.optionalKey<Schema.Struct<{
|
|
877
|
+
readonly mode: Schema.String;
|
|
917
878
|
readonly oid: Schema.String;
|
|
879
|
+
}>>;
|
|
880
|
+
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
918
881
|
readonly mode: Schema.String;
|
|
919
|
-
readonly
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
readonly
|
|
923
|
-
|
|
924
|
-
|
|
882
|
+
readonly oid: Schema.String;
|
|
883
|
+
}>>;
|
|
884
|
+
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
885
|
+
readonly fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
886
|
+
readonly lines: Schema.Union<readonly [Schema.Struct<{
|
|
887
|
+
readonly added: Schema.Int;
|
|
888
|
+
readonly deleted: Schema.Int;
|
|
889
|
+
}>, Schema.Literal<"binary">]>;
|
|
890
|
+
readonly patch: Schema.String;
|
|
891
|
+
}>, Schema.Struct<{
|
|
892
|
+
readonly status: Schema.Literals<readonly ["A", "D", "M", "R", "T"]>;
|
|
893
|
+
readonly path: Schema.String;
|
|
894
|
+
readonly from: Schema.optionalKey<Schema.String>;
|
|
895
|
+
readonly similarity: Schema.optionalKey<Schema.Number>;
|
|
896
|
+
readonly old: Schema.optionalKey<Schema.Struct<{
|
|
897
|
+
readonly mode: Schema.String;
|
|
898
|
+
readonly oid: Schema.String;
|
|
899
|
+
}>>;
|
|
900
|
+
readonly new: Schema.optionalKey<Schema.Struct<{
|
|
901
|
+
readonly mode: Schema.String;
|
|
902
|
+
readonly oid: Schema.String;
|
|
903
|
+
}>>;
|
|
904
|
+
readonly pathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
905
|
+
readonly fromPathBytes: Schema.optionalKey<Schema.Uint8ArrayFromBase64>;
|
|
906
|
+
readonly lines: Schema.Union<readonly [Schema.Struct<{
|
|
907
|
+
readonly added: Schema.Int;
|
|
908
|
+
readonly deleted: Schema.Int;
|
|
909
|
+
}>, Schema.Literal<"binary">]>;
|
|
910
|
+
readonly hunks: Schema.$Array<Schema.Struct<{
|
|
911
|
+
readonly oldStart: Schema.Int;
|
|
912
|
+
readonly oldLines: Schema.Int;
|
|
913
|
+
readonly newStart: Schema.Int;
|
|
914
|
+
readonly newLines: Schema.Int;
|
|
915
|
+
readonly context: Schema.String;
|
|
916
|
+
readonly lines: Schema.$Array<Schema.Struct<{
|
|
917
|
+
readonly kind: Schema.Literals<readonly ["context", "add", "delete"]>;
|
|
918
|
+
readonly text: Schema.String;
|
|
919
|
+
readonly noNewline: Schema.optionalKey<Schema.Literal<true>>;
|
|
920
|
+
}>>;
|
|
921
|
+
}>>;
|
|
922
|
+
}>]>>>;
|
|
923
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
924
|
+
readonly renamesSkipped: Schema.optionalKey<Schema.Literals<readonly ["rename-limit", "memory-limit"]>>;
|
|
925
925
|
}>>, Schema.toCodecJson<import("effect/http-api/HttpApiSchema").encodeToWithHeaders<Schema.Codec<{
|
|
926
926
|
readonly code: "ALREADY_EXISTS";
|
|
927
927
|
readonly message: string;
|
package/dist/rest/forks.d.mts
CHANGED
|
@@ -862,37 +862,14 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
862
862
|
}>, {
|
|
863
863
|
"ref0-code": Schema.String;
|
|
864
864
|
'www-authenticate': Schema.String;
|
|
865
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
865
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"fetch", "POST", "/repos/:repo/-/forks/fetch", Schema.toCodecStringTree<Schema.Struct<{
|
|
866
866
|
repo: Schema.String;
|
|
867
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
868
|
-
readonly
|
|
869
|
-
readonly
|
|
870
|
-
readonly
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
874
|
-
readonly public: Schema.Boolean;
|
|
875
|
-
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
876
|
-
readonly stats: Schema.Struct<{
|
|
877
|
-
readonly repo: Schema.String;
|
|
878
|
-
readonly refs: Schema.Number;
|
|
879
|
-
readonly packs: Schema.optionalKey<Schema.Number>;
|
|
880
|
-
readonly packBytes: Schema.optionalKey<Schema.Number>;
|
|
881
|
-
readonly ownBytes: Schema.optionalKey<Schema.Number>;
|
|
882
|
-
readonly pushedAt: Schema.optionalKey<Schema.Number>;
|
|
883
|
-
readonly maintainedAt: Schema.optionalKey<Schema.Number>;
|
|
884
|
-
}>;
|
|
885
|
-
readonly work: Schema.optionalKey<Schema.Struct<{
|
|
886
|
-
readonly waiting: Schema.Number;
|
|
887
|
-
readonly oldestDue: Schema.optionalKey<Schema.Number>;
|
|
888
|
-
readonly failed: Schema.Number;
|
|
889
|
-
readonly oldestFailed: Schema.optionalKey<Schema.Number>;
|
|
890
|
-
readonly index: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
891
|
-
readonly state: Schema.Literal<"refused">;
|
|
892
|
-
readonly retryAt: Schema.Number;
|
|
893
|
-
}>, Schema.Struct<{
|
|
894
|
-
readonly state: Schema.Literal<"too-large">;
|
|
895
|
-
}>]>>;
|
|
867
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
868
|
+
readonly source: Schema.String;
|
|
869
|
+
readonly head: Schema.optionalKey<Schema.String>;
|
|
870
|
+
readonly tips: Schema.$Array<Schema.Struct<{
|
|
871
|
+
readonly name: Schema.String;
|
|
872
|
+
readonly oid: Schema.String;
|
|
896
873
|
}>>;
|
|
897
874
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
898
875
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1293,14 +1270,35 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1293
1270
|
}>, {
|
|
1294
1271
|
"ref0-code": Schema.String;
|
|
1295
1272
|
'www-authenticate': Schema.String;
|
|
1296
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1273
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"sync", "POST", "/repos/:repo/-/forks/sync", Schema.toCodecStringTree<Schema.Struct<{
|
|
1297
1274
|
repo: Schema.String;
|
|
1298
|
-
}>>, never,
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
readonly
|
|
1302
|
-
|
|
1303
|
-
|
|
1275
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1276
|
+
key: Schema.optionalKey<Schema.String>;
|
|
1277
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1278
|
+
readonly name: Schema.String;
|
|
1279
|
+
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
1280
|
+
readonly public: Schema.Boolean;
|
|
1281
|
+
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
1282
|
+
readonly stats: Schema.Struct<{
|
|
1283
|
+
readonly repo: Schema.String;
|
|
1284
|
+
readonly refs: Schema.Number;
|
|
1285
|
+
readonly packs: Schema.optionalKey<Schema.Number>;
|
|
1286
|
+
readonly packBytes: Schema.optionalKey<Schema.Number>;
|
|
1287
|
+
readonly ownBytes: Schema.optionalKey<Schema.Number>;
|
|
1288
|
+
readonly pushedAt: Schema.optionalKey<Schema.Number>;
|
|
1289
|
+
readonly maintainedAt: Schema.optionalKey<Schema.Number>;
|
|
1290
|
+
}>;
|
|
1291
|
+
readonly work: Schema.optionalKey<Schema.Struct<{
|
|
1292
|
+
readonly waiting: Schema.Number;
|
|
1293
|
+
readonly oldestDue: Schema.optionalKey<Schema.Number>;
|
|
1294
|
+
readonly failed: Schema.Number;
|
|
1295
|
+
readonly oldestFailed: Schema.optionalKey<Schema.Number>;
|
|
1296
|
+
readonly index: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1297
|
+
readonly state: Schema.Literal<"refused">;
|
|
1298
|
+
readonly retryAt: Schema.Number;
|
|
1299
|
+
}>, Schema.Struct<{
|
|
1300
|
+
readonly state: Schema.Literal<"too-large">;
|
|
1301
|
+
}>]>>;
|
|
1304
1302
|
}>>;
|
|
1305
1303
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1306
1304
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1701,10 +1699,12 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1701
1699
|
}>, {
|
|
1702
1700
|
"ref0-code": Schema.String;
|
|
1703
1701
|
'www-authenticate': Schema.String;
|
|
1704
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1702
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/forks", Schema.toCodecStringTree<Schema.Struct<{
|
|
1705
1703
|
repo: Schema.String;
|
|
1706
1704
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1707
|
-
|
|
1705
|
+
readonly holder: Schema.String;
|
|
1706
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
1707
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
1708
1708
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1709
1709
|
readonly name: Schema.String;
|
|
1710
1710
|
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
package/dist/rest/layer.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { register } from "../contracts/git.mjs";
|
|
3
|
+
import { MergeParts, mergePartsOption } from "../core/merge-parts.mjs";
|
|
3
4
|
import { ServerSeam } from "../core/seam.mjs";
|
|
4
5
|
import { GitRestServices } from "./caller.mjs";
|
|
5
6
|
import { notFound, restApp } from "./handler.mjs";
|
|
6
7
|
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Option from "effect/Option";
|
|
7
9
|
import * as Context from "effect/Context";
|
|
8
10
|
import * as Layer from "effect/Layer";
|
|
9
11
|
// src/rest/layer.ts
|
|
@@ -24,8 +26,9 @@ const restRoots = [
|
|
|
24
26
|
const layer = () => Layer.effectDiscard(Effect.gen(function* () {
|
|
25
27
|
const built = yield* (yield* ServerSeam).parts;
|
|
26
28
|
const rest = yield* register({ name: "rest" });
|
|
29
|
+
const merges = yield* mergePartsOption;
|
|
27
30
|
const { basePath, identify, callsFor, tokensOn, authorize, listen, renamedTo } = built;
|
|
28
|
-
const
|
|
31
|
+
const own = Context.make(GitRestServices, {
|
|
29
32
|
basePath,
|
|
30
33
|
identify,
|
|
31
34
|
callsFor,
|
|
@@ -33,6 +36,10 @@ const layer = () => Layer.effectDiscard(Effect.gen(function* () {
|
|
|
33
36
|
authorize,
|
|
34
37
|
listen
|
|
35
38
|
});
|
|
39
|
+
const services = Option.match(merges, {
|
|
40
|
+
onNone: () => own,
|
|
41
|
+
onSome: (parts) => Context.add(own, MergeParts, parts)
|
|
42
|
+
});
|
|
36
43
|
const renamedFor = (request, repo) => Effect.flatMap(identify(request), (caller) => renamedTo(caller, repo));
|
|
37
44
|
const { owned } = yield* Effect.acquireRelease(Effect.sync(() => restApp({
|
|
38
45
|
basePath,
|