@pod-os/core 0.21.1-rc.494c386.0 → 0.21.1-rc.64d536c.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/index.js CHANGED
@@ -4041,7 +4041,7 @@ var WebIdProfile = class extends Thing {
4041
4041
  };
4042
4042
 
4043
4043
  // src/search/SearchIndex.ts
4044
- var import_lunr = __toESM(require_lunr());
4044
+ var import_lunr = __toESM(require_lunr(), 1);
4045
4045
  var SearchIndex = class {
4046
4046
  constructor(labelIndexes) {
4047
4047
  this.labelIndexes = labelIndexes;
@@ -4339,6 +4339,12 @@ var Store = class {
4339
4339
  isOnline: onlineStatus.isOnline
4340
4340
  });
4341
4341
  this.updater = new UpdateManager(this.internalStore);
4342
+ this.additions$ = new Subject();
4343
+ this.removals$ = new Subject();
4344
+ this.internalStore.addDataCallback((quad) => this.additions$.next(quad));
4345
+ this.internalStore.addDataRemovalCallback(
4346
+ (quad) => this.removals$.next(quad)
4347
+ );
4342
4348
  }
4343
4349
  /**
4344
4350
  * Fetch data for the given URI to the internalStore
@@ -25739,7 +25745,7 @@ function listKnownTerms() {
25739
25745
  }
25740
25746
 
25741
25747
  // src/uri/UriService.ts
25742
- var import_slugify = __toESM(require_slugify());
25748
+ var import_slugify = __toESM(require_slugify(), 1);
25743
25749
  var UriService = class {
25744
25750
  // We expect to use the store for calculating the uris for things
25745
25751
  // e.g. looking up locations in type index
package/lib/index.js CHANGED
@@ -37012,7 +37012,7 @@ _:patch
37012
37012
  };
37013
37013
 
37014
37014
  // src/search/SearchIndex.ts
37015
- var import_lunr = __toESM(require_lunr());
37015
+ var import_lunr = __toESM(require_lunr(), 1);
37016
37016
  var SearchIndex = class {
37017
37017
  constructor(labelIndexes) {
37018
37018
  this.labelIndexes = labelIndexes;
@@ -37324,6 +37324,12 @@ _:patch
37324
37324
  isOnline: onlineStatus.isOnline
37325
37325
  });
37326
37326
  this.updater = new UpdateManager(this.internalStore);
37327
+ this.additions$ = new Subject();
37328
+ this.removals$ = new Subject();
37329
+ this.internalStore.addDataCallback((quad3) => this.additions$.next(quad3));
37330
+ this.internalStore.addDataRemovalCallback(
37331
+ (quad3) => this.removals$.next(quad3)
37332
+ );
37327
37333
  }
37328
37334
  /**
37329
37335
  * Fetch data for the given URI to the internalStore
@@ -58724,7 +58730,7 @@ _:patch
58724
58730
  }
58725
58731
 
58726
58732
  // src/uri/UriService.ts
58727
- var import_slugify = __toESM(require_slugify());
58733
+ var import_slugify = __toESM(require_slugify(), 1);
58728
58734
  var UriService = class {
58729
58735
  // We expect to use the store for calculating the uris for things
58730
58736
  // e.g. looking up locations in type index
package/package.json CHANGED
@@ -1,13 +1,25 @@
1
1
  {
2
2
  "name": "@pod-os/core",
3
- "version": "0.21.1-rc.494c386.0",
3
+ "description": "Core module of PodOS",
4
+ "version": "0.21.1-rc.64d536c.0",
5
+ "type": "module",
4
6
  "main": "./dist/index.js",
5
7
  "types": "./types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./types/index.d.ts",
12
+ "require": "./lib/index.js"
13
+ }
14
+ },
6
15
  "files": [
7
16
  "lib/",
8
17
  "dist/",
9
18
  "types/"
10
19
  ],
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ },
11
23
  "scripts": {
12
24
  "test": "jest",
13
25
  "test:watch": "jest --watch",
@@ -60,9 +72,6 @@
60
72
  "slugify": "^1.6.6",
61
73
  "url": "^0.11.4"
62
74
  },
63
- "directories": {
64
- "lib": "lib"
65
- },
66
75
  "repository": {
67
76
  "type": "git",
68
77
  "url": "git+https://github.com/pod-os/pod-os.git"
@@ -70,6 +79,5 @@
70
79
  "bugs": {
71
80
  "url": "https://github.com/pod-os/pod-os/issues"
72
81
  },
73
- "homepage": "https://github.com/pod-os/pod-os#readme",
74
- "description": ""
82
+ "homepage": "https://github.com/pod-os/pod-os#readme"
75
83
  }
package/types/Store.d.ts CHANGED
@@ -3,14 +3,18 @@ import { PodOsSession } from "./authentication";
3
3
  import { Thing } from "./thing";
4
4
  import { ModuleConfig, UpdateOperation } from "@solid-data-modules/rdflib-utils";
5
5
  import { OfflineCache, OnlineStatus } from "./offline-cache";
6
+ import { Subject } from "rxjs";
7
+ import { Quad } from "rdflib/lib/tf-types";
6
8
  /**
7
- * The internalStore contains all data that is known locally.
9
+ * The Store contains all data that is known locally.
8
10
  * It can be used to fetch additional data from the web and also update data and sync it back to editable resources.
9
11
  */
10
12
  export declare class Store {
11
13
  private readonly internalStore;
12
14
  private readonly fetcher;
13
15
  private readonly updater;
16
+ additions$: Subject<Quad>;
17
+ removals$: Subject<Quad>;
14
18
  constructor(session: PodOsSession, offlineCache?: OfflineCache, onlineStatus?: OnlineStatus, internalStore?: IndexedFormula);
15
19
  /**
16
20
  * Fetch data for the given URI to the internalStore