@pod-os/core 0.17.1-rc.624a4a0.0 → 0.17.1-rc.6bd4b35.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/{chunk-VGZLO2LW.js → chunk-3LTXZPFZ.js} +14 -14
- package/dist/{dist-UG2BEWCW.js → dist-4BQLT63G.js} +1 -1
- package/dist/index.js +229 -113
- package/lib/index.js +603 -487
- package/package.json +10 -10
- package/types/Store.d.ts +16 -10
- package/types/index.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pod-os/core",
|
|
3
|
-
"version": "0.17.1-rc.
|
|
3
|
+
"version": "0.17.1-rc.6bd4b35.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"author": "Angelo Veltens",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/preset-env": "^7.
|
|
29
|
+
"@babel/preset-env": "^7.28.3",
|
|
30
30
|
"@babel/preset-typescript": "^7.27.1",
|
|
31
|
-
"@eslint/js": "^9.
|
|
32
|
-
"@types/jest": "^
|
|
31
|
+
"@eslint/js": "^9.34.0",
|
|
32
|
+
"@types/jest": "^30.0.0",
|
|
33
33
|
"@types/jest-when": "^3.5.5",
|
|
34
34
|
"@types/sparqljs": "^3.1.12",
|
|
35
|
-
"esbuild": "^0.25.
|
|
36
|
-
"eslint": "^9.
|
|
37
|
-
"jest": "^
|
|
35
|
+
"esbuild": "^0.25.9",
|
|
36
|
+
"eslint": "^9.34.0",
|
|
37
|
+
"jest": "^30.1.2",
|
|
38
38
|
"jest-when": "^3.7.0",
|
|
39
39
|
"npm-run-all": "^4.1.5",
|
|
40
40
|
"prettier": "^3.6.2",
|
|
41
41
|
"rimraf": "^6.0.1",
|
|
42
42
|
"sparqljs": "^3.7.3",
|
|
43
|
-
"typescript": "5.
|
|
44
|
-
"typescript-eslint": "^8.
|
|
43
|
+
"typescript": "5.9.2",
|
|
44
|
+
"typescript-eslint": "^8.41.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@solid-data-modules/contacts-rdflib": "^0.7.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/lunr": "^2.3.7",
|
|
50
50
|
"buffer": "^6.0.3",
|
|
51
51
|
"lunr": "^2.3.9",
|
|
52
|
-
"rdf-namespaces": "^1.
|
|
52
|
+
"rdf-namespaces": "^1.16.0",
|
|
53
53
|
"rdflib": "^2.2.37",
|
|
54
54
|
"rxjs": "^7.8.2",
|
|
55
55
|
"slugify": "^1.6.6",
|
package/types/Store.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndexedFormula } from "rdflib";
|
|
2
2
|
import { PodOsSession } from "./authentication";
|
|
3
3
|
import { Thing } from "./thing";
|
|
4
|
-
import { UpdateOperation } from "@solid-data-modules/rdflib-utils";
|
|
4
|
+
import { ModuleConfig, UpdateOperation } from "@solid-data-modules/rdflib-utils";
|
|
5
5
|
import { OfflineCache, OnlineStatus } from "./offline-cache";
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The internalStore contains all data that is known locally.
|
|
8
8
|
* It can be used to fetch additional data from the web and also update data and sync it back to editable resources.
|
|
9
9
|
*/
|
|
10
10
|
export declare class Store {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(session: PodOsSession, offlineCache?: OfflineCache, onlineStatus?: OnlineStatus);
|
|
11
|
+
private readonly internalStore;
|
|
12
|
+
private readonly fetcher;
|
|
13
|
+
private readonly updater;
|
|
14
|
+
constructor(session: PodOsSession, offlineCache?: OfflineCache, onlineStatus?: OnlineStatus, internalStore?: IndexedFormula);
|
|
15
15
|
/**
|
|
16
|
-
* Fetch data for the given URI to the
|
|
16
|
+
* Fetch data for the given URI to the internalStore
|
|
17
17
|
* @param uri
|
|
18
18
|
*/
|
|
19
19
|
fetch(uri: string): Promise<Response>;
|
|
20
20
|
/**
|
|
21
|
-
* Fetch all the given URIs in parallel and put the data to the
|
|
21
|
+
* Fetch all the given URIs in parallel and put the data to the internalStore
|
|
22
22
|
* @param uris
|
|
23
23
|
*/
|
|
24
24
|
fetchAll(uris: string[]): Promise<PromiseSettledResult<Response>[]>;
|
|
25
25
|
/**
|
|
26
|
-
* Retrieve the thing identified by the given URI from the
|
|
26
|
+
* Retrieve the thing identified by the given URI from the internalStore
|
|
27
27
|
* @param uri
|
|
28
28
|
*/
|
|
29
29
|
get(uri: string): Thing;
|
|
@@ -36,4 +36,10 @@ export declare class Store {
|
|
|
36
36
|
addPropertyValue(thing: Thing, property: string, value: string): Promise<void>;
|
|
37
37
|
addNewThing(uri: string, name: string, type: string): Promise<void>;
|
|
38
38
|
executeUpdate(operation: UpdateOperation): Promise<void>;
|
|
39
|
+
flagAuthorizationMetadata(): void;
|
|
40
|
+
loadModule<T>(module: PodOsModule<T>): T;
|
|
39
41
|
}
|
|
42
|
+
interface PodOsModule<T> {
|
|
43
|
+
readonly default: new (config: ModuleConfig) => T;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Term } from "./terms";
|
|
|
9
9
|
import { Thing } from "./thing";
|
|
10
10
|
import { UriService } from "./uri/UriService";
|
|
11
11
|
import { OfflineCache, OnlineStatus } from "./offline-cache";
|
|
12
|
+
import { IndexedFormula } from "rdflib";
|
|
12
13
|
export * from "./authentication";
|
|
13
14
|
export * from "./files";
|
|
14
15
|
export * from "./thing";
|
|
@@ -22,6 +23,7 @@ export interface PodOsConfiguration {
|
|
|
22
23
|
offlineCache?: OfflineCache;
|
|
23
24
|
onlineStatus?: OnlineStatus;
|
|
24
25
|
session?: PodOsSession;
|
|
26
|
+
internalStore?: IndexedFormula;
|
|
25
27
|
}
|
|
26
28
|
export declare class PodOS {
|
|
27
29
|
private readonly session;
|
|
@@ -30,7 +32,7 @@ export declare class PodOS {
|
|
|
30
32
|
private readonly fileFetcher;
|
|
31
33
|
private readonly searchGateway;
|
|
32
34
|
private readonly offlineCache;
|
|
33
|
-
constructor({ session, offlineCache, onlineStatus, }?: PodOsConfiguration);
|
|
35
|
+
constructor({ session, offlineCache, onlineStatus, internalStore, }?: PodOsConfiguration);
|
|
34
36
|
private flagAuthorizationMetaDataOnSessionChange;
|
|
35
37
|
fetch(uri: string): Promise<Response>;
|
|
36
38
|
fetchAll(uris: string[]): Promise<PromiseSettledResult<Response>[]>;
|