just-git 1.5.11 → 1.5.13
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/README.md +2 -2
- package/dist/{hooks-CimfP56a.d.ts → hooks-B50z7ycn.d.ts} +9 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +365 -365
- package/dist/repo/index.d.ts +3 -3
- package/dist/repo/index.js +12 -12
- package/dist/server/index.d.ts +76 -3
- package/dist/server/index.js +89 -63
- package/dist/{writing-CEP3N60d.d.ts → writing-BYrXF-yM.d.ts} +2 -2
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ObjectId,
|
|
2
|
-
import {
|
|
1
|
+
import { i as ObjectId, X as RawObject, Y as Ref, g as GitRepo, a0 as Rejection, N as NetworkPolicy } from '../hooks-B50z7ycn.js';
|
|
2
|
+
import { C as CommitOptions, a as CommitResult } from '../writing-BYrXF-yM.js';
|
|
3
3
|
|
|
4
4
|
/** Shallow boundary delta: what to add/remove from `.git/shallow`. */
|
|
5
5
|
interface ShallowUpdate {
|
|
@@ -1259,4 +1259,77 @@ declare class PgStorage implements Storage {
|
|
|
1259
1259
|
listForks(repoId: string): Promise<string[]>;
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
|
|
1262
|
+
/** Minimal cursor interface matching Cloudflare's `SqlStorageCursor`. */
|
|
1263
|
+
interface DOSqlCursor {
|
|
1264
|
+
next(): {
|
|
1265
|
+
done?: false;
|
|
1266
|
+
value: any;
|
|
1267
|
+
} | {
|
|
1268
|
+
done: true;
|
|
1269
|
+
value?: undefined;
|
|
1270
|
+
};
|
|
1271
|
+
toArray(): any[];
|
|
1272
|
+
}
|
|
1273
|
+
/** Minimal interface matching the `SqlStorage` property of `DurableObjectStorage`. */
|
|
1274
|
+
interface DOSqlApi {
|
|
1275
|
+
exec(query: string, ...bindings: any[]): DOSqlCursor;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Minimal interface matching Cloudflare's `DurableObjectStorage` for
|
|
1279
|
+
* SQLite-backed Durable Objects.
|
|
1280
|
+
*
|
|
1281
|
+
* Only the `sql` and `transactionSync` properties are required.
|
|
1282
|
+
* Pass `ctx.storage` from your Durable Object constructor.
|
|
1283
|
+
*/
|
|
1284
|
+
interface DurableObjectStorageSql {
|
|
1285
|
+
sql: DOSqlApi;
|
|
1286
|
+
transactionSync<T>(closure: () => T): T;
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* SQLite-backed storage for Cloudflare Durable Objects.
|
|
1290
|
+
*
|
|
1291
|
+
* Uses the DO SQLite API (`ctx.storage.sql`) for queries and
|
|
1292
|
+
* `ctx.storage.transactionSync()` for atomic ref updates.
|
|
1293
|
+
*
|
|
1294
|
+
* ```ts
|
|
1295
|
+
* import { DurableObject } from "cloudflare:workers";
|
|
1296
|
+
*
|
|
1297
|
+
* export class GitRepoDO extends DurableObject {
|
|
1298
|
+
* private storage;
|
|
1299
|
+
*
|
|
1300
|
+
* constructor(ctx: DurableObjectState, env: Env) {
|
|
1301
|
+
* super(ctx, env);
|
|
1302
|
+
* this.storage = new DurableObjectSqliteStorage(ctx.storage);
|
|
1303
|
+
* }
|
|
1304
|
+
* }
|
|
1305
|
+
* ```
|
|
1306
|
+
*/
|
|
1307
|
+
declare class DurableObjectSqliteStorage implements Storage {
|
|
1308
|
+
private storage;
|
|
1309
|
+
private sql;
|
|
1310
|
+
constructor(storage: DurableObjectStorageSql);
|
|
1311
|
+
hasRepo(repoId: string): boolean;
|
|
1312
|
+
insertRepo(repoId: string): void;
|
|
1313
|
+
deleteRepo(repoId: string): void;
|
|
1314
|
+
getObject(repoId: string, hash: string): RawObject | null;
|
|
1315
|
+
putObject(repoId: string, hash: string, type: string, content: Uint8Array): void;
|
|
1316
|
+
putObjects(repoId: string, objects: ReadonlyArray<{
|
|
1317
|
+
hash: string;
|
|
1318
|
+
type: string;
|
|
1319
|
+
content: Uint8Array;
|
|
1320
|
+
}>): void;
|
|
1321
|
+
hasObject(repoId: string, hash: string): boolean;
|
|
1322
|
+
findObjectsByPrefix(repoId: string, prefix: string): string[];
|
|
1323
|
+
listObjectHashes(repoId: string): string[];
|
|
1324
|
+
deleteObjects(repoId: string, hashes: ReadonlyArray<string>): number;
|
|
1325
|
+
getRef(repoId: string, name: string): Ref | null;
|
|
1326
|
+
putRef(repoId: string, name: string, ref: Ref): void;
|
|
1327
|
+
removeRef(repoId: string, name: string): void;
|
|
1328
|
+
listRefs(repoId: string, prefix?: string): RawRefEntry[];
|
|
1329
|
+
atomicRefUpdate<T>(repoId: string, fn: (ops: RefOps) => T): T;
|
|
1330
|
+
forkRepo(sourceId: string, targetId: string): void;
|
|
1331
|
+
getForkParent(repoId: string): string | null;
|
|
1332
|
+
listForks(repoId: string): string[];
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
export { type AdvertiseRefsEvent, type AdvertiseResult, type ApplyReceivePackOptions, type Auth, type AuthProvider, type BetterSqlite3Database, BetterSqlite3Storage, type BunSqliteDatabase, BunSqliteStorage, type CreateRepoOptions, DurableObjectSqliteStorage, type DurableObjectStorageSql, type GcOptions, type GcResult, GitRepo, type GitServer, type GitServerConfig, type MaybeAsync, MemoryStorage, type NodeHttpRequest, type NodeHttpResponse, type PgPool, PgStorage, type PostReceiveEvent, type PreReceiveEvent, type PushCommand, RawObject, type RawRefEntry, type ReceivePackResult, Ref, type RefAdvertisement, type RefOps, type RefResult, type RefUpdate, type RefUpdateCreate, type RefUpdateDelete, type RefUpdateModify, type RefUpdateRequest, type RefUpdateResult, Rejection, type ServerHooks, type ServerPolicy, type SshChannel, type SshSessionInfo, type Storage, type UpdateEvent, type V2CommandRequest, type V2FetchRequest, type V2FetchResponseOptions, type V2LsRefsRef, advertiseRefsWithHooks, applyCasRefUpdates, applyReceivePack, buildRefAdvertisementBytes, buildRefListBytes, buildRefListPktLines, buildV2CapabilityAdvertisement, buildV2CapabilityAdvertisementBytes, buildV2FetchResponse, buildV2LsRefsResponse, collectRefs, composeHooks, createServer, handleLsRefs, handleUploadPack, handleV2Fetch, ingestReceivePack, ingestReceivePackFromStream, parseV2CommandRequest, parseV2FetchArgs, resolveRefUpdates };
|