@rdfx/git 0.0.35 → 0.0.37
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
|
-
|
|
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,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@rdfx/
|
|
4
|
-
"@rdfx/
|
|
3
|
+
"@rdfx/data-factory": "0.0.37",
|
|
4
|
+
"@rdfx/fs": "0.0.37",
|
|
5
|
+
"@rdfx/graph-store": "0.0.37",
|
|
6
|
+
"@rdfjs/types": "~2.0.1",
|
|
5
7
|
"isomorphic-git": "~1.38.3",
|
|
8
|
+
"purify-ts": "~2.1.4",
|
|
6
9
|
"ts-log": "~3.0.2",
|
|
7
10
|
"typescript-memoize": "~1.1.1"
|
|
8
11
|
},
|
|
@@ -23,12 +26,12 @@
|
|
|
23
26
|
"scripts": {
|
|
24
27
|
"build": "tsc -b",
|
|
25
28
|
"clean": "rimraf dist",
|
|
26
|
-
"depcheck": "depcheck .",
|
|
29
|
+
"depcheck": "depcheck --ignores=\"@tsconfig/*,vitest,vitest-fetch-mock\" .",
|
|
27
30
|
"dev": "tsc -w --preserveWatchOutput",
|
|
28
31
|
"dev:tests": "tsc -p __tests__ -w --preserveWatchOutput",
|
|
29
32
|
"test": "cd ../.. && vitest run /Users/minor/projects/rdfx/packages/git/__tests__"
|
|
30
33
|
},
|
|
31
34
|
"type": "module",
|
|
32
35
|
"types": "./dist/index.d.ts",
|
|
33
|
-
"version": "0.0.
|
|
36
|
+
"version": "0.0.37"
|
|
34
37
|
}
|