@rdfx/git 0.0.35 → 0.0.36

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.
@@ -1,4 +1,4 @@
1
- import type { Stream } from "@rdfjs/types";
1
+ import type { DatasetCore, Stream } from "@rdfjs/types";
2
2
  import { type FileSystem, type RdfDirectoryGraphStore, type RdfFileGraphStore } from "@rdfx/fs";
3
3
  import type { GraphIdentifier, VersionedGraphStore } from "@rdfx/graph-store";
4
4
  import * as git from "isomorphic-git";
@@ -21,7 +21,6 @@ export declare abstract class AbstractVersionedRdfFileGraphStore implements Vers
21
21
  get(identifier: GraphIdentifier, options?: {
22
22
  readonly version?: string;
23
23
  }): Promise<Either<Error, Maybe<Stream>>>;
24
- protected abstract getVersion(identifier: GraphIdentifier, version: string): Promise<Either<Error, Maybe<Stream>>>;
25
24
  head(identifier: GraphIdentifier, options?: {
26
25
  readonly version?: string;
27
26
  }): Promise<Either<Error, boolean>>;
@@ -33,11 +32,13 @@ export declare abstract class AbstractVersionedRdfFileGraphStore implements Vers
33
32
  put(quads: Stream): Promise<Either<Error, {
34
33
  readonly version: string;
35
34
  }>>;
35
+ unionDataset(): Promise<Either<Error, DatasetCore>>;
36
36
  protected abstract delegate(options?: {
37
37
  fileSystem?: FileSystem;
38
38
  }): RdfDirectoryGraphStore | RdfFileGraphStore;
39
- private mutate;
39
+ protected abstract getVersion(identifier: GraphIdentifier, version: string): Promise<Either<Error, Maybe<Stream>>>;
40
40
  protected gitRelativeFilePath(path: string): string;
41
+ private mutate;
41
42
  }
42
43
  type GitParameters = {
43
44
  readonly author?: Parameters<typeof git.commit>[0]["author"];
@@ -54,6 +54,12 @@ export class AbstractVersionedRdfFileGraphStore {
54
54
  async put(quads) {
55
55
  return this.mutate((delegate) => delegate.put(quads));
56
56
  }
57
+ async unionDataset() {
58
+ return this.delegate().unionDataset();
59
+ }
60
+ gitRelativeFilePath(path) {
61
+ return relative(this.gitParameters.dir, path);
62
+ }
57
63
  async mutate(mutator) {
58
64
  return EitherAsync(async ({ liftEither }) => {
59
65
  const addedFilePaths = [];
@@ -146,8 +152,5 @@ export class AbstractVersionedRdfFileGraphStore {
146
152
  return { version: objectId };
147
153
  });
148
154
  }
149
- gitRelativeFilePath(path) {
150
- return relative(this.gitParameters.dir, path);
151
- }
152
155
  }
153
156
  //# sourceMappingURL=AbstractVersionedRdfFileGraphStore.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@rdfx/fs": "0.0.35",
4
- "@rdfx/graph-store": "0.0.35",
3
+ "@rdfx/fs": "0.0.36",
4
+ "@rdfx/graph-store": "0.0.36",
5
5
  "isomorphic-git": "~1.38.3",
6
6
  "ts-log": "~3.0.2",
7
7
  "typescript-memoize": "~1.1.1"
@@ -30,5 +30,5 @@
30
30
  },
31
31
  "type": "module",
32
32
  "types": "./dist/index.d.ts",
33
- "version": "0.0.35"
33
+ "version": "0.0.36"
34
34
  }