@pod-os/core 0.30.0-rc.4453840.0 → 0.30.0-rc.68feb28.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
@@ -28363,6 +28363,9 @@ var Thing = class {
28363
28363
  var LdpContainer = class extends Thing {
28364
28364
  constructor(uri6, store, editable = false) {
28365
28365
  super(uri6, store, editable);
28366
+ this.uri = uri6;
28367
+ this.store = store;
28368
+ this.editable = editable;
28366
28369
  }
28367
28370
  /**
28368
28371
  * Resources that the LDP Container contains
@@ -28500,6 +28503,8 @@ var WebIdProfile = class extends Thing {
28500
28503
  constructor(webId, store, editable = false) {
28501
28504
  super(webId, store, editable);
28502
28505
  this.webId = webId;
28506
+ this.store = store;
28507
+ this.editable = editable;
28503
28508
  this.profileQuery = this.store.profileQuery(this.webId);
28504
28509
  }
28505
28510
  /**
@@ -28640,6 +28645,9 @@ var SearchIndex = class {
28640
28645
  var RdfDocument = class extends Thing {
28641
28646
  constructor(uri6, store, editable = false) {
28642
28647
  super(uri6, store, editable);
28648
+ this.uri = uri6;
28649
+ this.store = store;
28650
+ this.editable = editable;
28643
28651
  }
28644
28652
  subjects() {
28645
28653
  const matches = this.store.statementsMatching(
@@ -28661,6 +28669,9 @@ var RdfDocument = class extends Thing {
28661
28669
  var LabelIndex = class extends RdfDocument {
28662
28670
  constructor(uri6, store, editable = false) {
28663
28671
  super(uri6, store, editable);
28672
+ this.uri = uri6;
28673
+ this.store = store;
28674
+ this.editable = editable;
28664
28675
  }
28665
28676
  /**
28666
28677
  * Returns the URIs and labels for all the things listed in the document.
@@ -50501,6 +50512,8 @@ function listKnownTerms() {
50501
50512
  // src/uri/UriService.ts
50502
50513
  var import_slugify = __toESM(require_slugify(), 1);
50503
50514
  var UriService = class {
50515
+ // We expect to use the store for calculating the uris for things
50516
+ // e.g. looking up locations in type index
50504
50517
  constructor(store) {
50505
50518
  this.store = store;
50506
50519
  }
@@ -50725,6 +50738,9 @@ var AnonymousSession = class {
50725
50738
  var TypeIndex2 = class extends Thing {
50726
50739
  constructor(uri6, store, editable = false) {
50727
50740
  super(uri6, store, editable);
50741
+ this.uri = uri6;
50742
+ this.store = store;
50743
+ this.editable = editable;
50728
50744
  }
50729
50745
  listAll() {
50730
50746
  const forClassStatements = this.store.statementsMatching(
package/lib/index.js CHANGED
@@ -36800,6 +36800,9 @@ _:patch
36800
36800
  var LdpContainer = class extends Thing {
36801
36801
  constructor(uri6, store, editable = false) {
36802
36802
  super(uri6, store, editable);
36803
+ this.uri = uri6;
36804
+ this.store = store;
36805
+ this.editable = editable;
36803
36806
  }
36804
36807
  /**
36805
36808
  * Resources that the LDP Container contains
@@ -36937,6 +36940,8 @@ _:patch
36937
36940
  constructor(webId, store, editable = false) {
36938
36941
  super(webId, store, editable);
36939
36942
  this.webId = webId;
36943
+ this.store = store;
36944
+ this.editable = editable;
36940
36945
  this.profileQuery = this.store.profileQuery(this.webId);
36941
36946
  }
36942
36947
  /**
@@ -37077,6 +37082,9 @@ _:patch
37077
37082
  var RdfDocument = class extends Thing {
37078
37083
  constructor(uri6, store, editable = false) {
37079
37084
  super(uri6, store, editable);
37085
+ this.uri = uri6;
37086
+ this.store = store;
37087
+ this.editable = editable;
37080
37088
  }
37081
37089
  subjects() {
37082
37090
  const matches = this.store.statementsMatching(
@@ -37098,6 +37106,9 @@ _:patch
37098
37106
  var LabelIndex = class extends RdfDocument {
37099
37107
  constructor(uri6, store, editable = false) {
37100
37108
  super(uri6, store, editable);
37109
+ this.uri = uri6;
37110
+ this.store = store;
37111
+ this.editable = editable;
37101
37112
  }
37102
37113
  /**
37103
37114
  * Returns the URIs and labels for all the things listed in the document.
@@ -58938,6 +58949,8 @@ _:patch
58938
58949
  // src/uri/UriService.ts
58939
58950
  var import_slugify = __toESM(require_slugify(), 1);
58940
58951
  var UriService = class {
58952
+ // We expect to use the store for calculating the uris for things
58953
+ // e.g. looking up locations in type index
58941
58954
  constructor(store) {
58942
58955
  this.store = store;
58943
58956
  }
@@ -59162,6 +59175,9 @@ _:patch
59162
59175
  var TypeIndex2 = class extends Thing {
59163
59176
  constructor(uri6, store, editable = false) {
59164
59177
  super(uri6, store, editable);
59178
+ this.uri = uri6;
59179
+ this.store = store;
59180
+ this.editable = editable;
59165
59181
  }
59166
59182
  listAll() {
59167
59183
  const forClassStatements = this.store.statementsMatching(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pod-os/core",
3
3
  "description": "Core module of PodOS",
4
- "version": "0.30.0-rc.4453840.0",
4
+ "version": "0.30.0-rc.68feb28.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./types/index.d.ts",
package/types/Store.d.ts CHANGED
@@ -10,11 +10,11 @@ import { BlankNode, Quad, Quad_Graph, Quad_Object, Quad_Predicate, Quad_Subject,
10
10
  * It can be used to fetch additional data from the web and also update data and sync it back to editable resources.
11
11
  */
12
12
  export declare class Store {
13
+ private readonly internalStore;
13
14
  private readonly fetcher;
14
15
  private readonly updater;
15
16
  additions$: Subject<Quad>;
16
17
  removals$: Subject<Quad>;
17
- private readonly internalStore;
18
18
  constructor(session: PodOsSession, offlineCache?: OfflineCache, onlineStatus?: OnlineStatus, internalStore?: IndexedFormula);
19
19
  /**
20
20
  * Fetch data for the given URI to the internalStore
@@ -7,7 +7,7 @@ import { ResultAsync } from "neverthrow";
7
7
  * Handles HTTP operations for files, like fetching and updating file contents.
8
8
  */
9
9
  export declare class FileFetcher {
10
- private readonly session;
10
+ private session;
11
11
  constructor(session: PodOsSession);
12
12
  /**
13
13
  * Fetch the contents of the given file
@@ -1,6 +1,6 @@
1
1
  export declare class HttpStatus {
2
2
  readonly code: number;
3
- readonly text?: string;
4
- constructor(code: number, text?: string);
3
+ readonly text?: string | undefined;
4
+ constructor(code: number, text?: string | undefined);
5
5
  toString(): string;
6
6
  }
@@ -6,6 +6,9 @@ export interface ContainerContent {
6
6
  name: string;
7
7
  }
8
8
  export declare class LdpContainer extends Thing {
9
+ readonly uri: string;
10
+ readonly store: Store;
11
+ readonly editable: boolean;
9
12
  constructor(uri: string, store: Store, editable?: boolean);
10
13
  /**
11
14
  * Resources that the LDP Container contains
@@ -4,8 +4,10 @@ import { Store } from "../Store";
4
4
  * Allows finding things related to the WebID and their profile document
5
5
  */
6
6
  export declare class WebIdProfile extends Thing {
7
- private readonly profileQuery;
8
7
  readonly webId: string;
8
+ readonly store: Store;
9
+ readonly editable: boolean;
10
+ private profileQuery;
9
11
  constructor(webId: string, store: Store, editable?: boolean);
10
12
  /**
11
13
  * Returns the URI of the preferences document
@@ -4,6 +4,9 @@ export interface Subject {
4
4
  uri: string;
5
5
  }
6
6
  export declare class RdfDocument extends Thing {
7
+ readonly uri: string;
8
+ readonly store: Store;
9
+ readonly editable: boolean;
7
10
  constructor(uri: string, store: Store, editable?: boolean);
8
11
  subjects(): {
9
12
  uri: string;
@@ -5,6 +5,9 @@ import { Store } from "../Store";
5
5
  * https://github.com/pod-os/PodOS/blob/main/docs/features/full-text-search.md
6
6
  */
7
7
  export declare class LabelIndex extends RdfDocument {
8
+ readonly uri: string;
9
+ readonly store: Store;
10
+ readonly editable: boolean;
8
11
  constructor(uri: string, store: Store, editable?: boolean);
9
12
  /**
10
13
  * Returns the URIs and labels for all the things listed in the document.
@@ -4,7 +4,7 @@ import { LabelIndex } from "./LabelIndex";
4
4
  import { Thing } from "../thing";
5
5
  import { SearchIndex } from "./SearchIndex";
6
6
  export declare class SearchGateway {
7
- private readonly store;
7
+ private store;
8
8
  constructor(store: Store);
9
9
  /**
10
10
  * Fetch the private label index for the given profile and build a search index from it
@@ -4,8 +4,8 @@ import { Index } from "lunr";
4
4
  * A fast, in-memory search index based on data from label indexes. Both labels and URIs are indexed.
5
5
  */
6
6
  export declare class SearchIndex {
7
+ private labelIndexes;
7
8
  private index;
8
- private readonly labelIndexes;
9
9
  constructor(labelIndexes: LabelIndex[]);
10
10
  /**
11
11
  * Recreates the search index with the current data from all label indexes
@@ -25,7 +25,11 @@ export declare class Thing {
25
25
  * Whether the Thing can be edited according to its access control settings
26
26
  */
27
27
  readonly editable: boolean;
28
- constructor(uri: string, store: Store, editable?: boolean);
28
+ constructor(uri: string, store: Store,
29
+ /**
30
+ * Whether the Thing can be edited according to its access control settings
31
+ */
32
+ editable?: boolean);
29
33
  /**
30
34
  * Returns a human-readable label for this thing. Tries to match common RDF terms
31
35
  * used for labels, such as `rdfs:label`, `schema:name` and others.
@@ -6,6 +6,9 @@ import { Store } from "../Store";
6
6
  * @since 0.24.0
7
7
  */
8
8
  export declare class TypeIndex extends Thing {
9
+ readonly uri: string;
10
+ readonly store: Store;
11
+ readonly editable: boolean;
9
12
  constructor(uri: string, store: Store, editable?: boolean);
10
13
  listAll(): TypeRegistration[];
11
14
  }