@pod-os/core 0.12.1-fef97c9.0 → 0.13.1-0b8a8a5.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-7VQUARYZ.js → chunk-XBA7NYKJ.js} +344 -1
- package/dist/{dist-F3EUFQHU.js → dist-5TZZFAHE.js} +2 -344
- package/dist/index.js +159 -85
- package/lib/index.js +176 -97
- package/package.json +13 -12
- package/types/Store.d.ts +2 -0
- package/types/index.d.ts +7 -1
- package/types/namespaces/index.d.ts +1 -0
- package/types/search/addToLabelIndex.d.ts +4 -0
- package/types/search/addToLabelIndex.spec.d.ts +1 -0
- package/types/thing/Thing.d.ts +2 -0
- package/types/thing/index.d.ts +1 -0
- package/types/thing/labelFromUri.d.ts +5 -0
- package/types/thing/labelFromUri.spec.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Namespace,
|
|
2
3
|
UpdateManager,
|
|
3
4
|
fetcher,
|
|
4
5
|
graph,
|
|
@@ -7,8 +8,9 @@ import {
|
|
|
7
8
|
isNamedNode,
|
|
8
9
|
lit,
|
|
9
10
|
namedNode,
|
|
11
|
+
require_short_unique_id,
|
|
10
12
|
st
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XBA7NYKJ.js";
|
|
12
14
|
import {
|
|
13
15
|
__commonJS,
|
|
14
16
|
__export,
|
|
@@ -10177,125 +10179,118 @@ var decode = (input2) => {
|
|
|
10177
10179
|
|
|
10178
10180
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/jose/dist/browser/util/errors.js
|
|
10179
10181
|
var JOSEError = class extends Error {
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
}
|
|
10183
|
-
constructor(message4) {
|
|
10184
|
-
super(message4);
|
|
10182
|
+
constructor(message4, options) {
|
|
10183
|
+
super(message4, options);
|
|
10185
10184
|
this.code = "ERR_JOSE_GENERIC";
|
|
10186
10185
|
this.name = this.constructor.name;
|
|
10187
10186
|
Error.captureStackTrace?.(this, this.constructor);
|
|
10188
10187
|
}
|
|
10189
10188
|
};
|
|
10189
|
+
JOSEError.code = "ERR_JOSE_GENERIC";
|
|
10190
10190
|
var JWTClaimValidationFailed = class extends JOSEError {
|
|
10191
|
-
static get code() {
|
|
10192
|
-
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
10193
|
-
}
|
|
10194
10191
|
constructor(message4, payload4, claim2 = "unspecified", reason2 = "unspecified") {
|
|
10195
|
-
super(message4);
|
|
10192
|
+
super(message4, { cause: { claim: claim2, reason: reason2, payload: payload4 } });
|
|
10196
10193
|
this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
10197
10194
|
this.claim = claim2;
|
|
10198
10195
|
this.reason = reason2;
|
|
10199
10196
|
this.payload = payload4;
|
|
10200
10197
|
}
|
|
10201
10198
|
};
|
|
10199
|
+
JWTClaimValidationFailed.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
10202
10200
|
var JWTExpired = class extends JOSEError {
|
|
10203
|
-
static get code() {
|
|
10204
|
-
return "ERR_JWT_EXPIRED";
|
|
10205
|
-
}
|
|
10206
10201
|
constructor(message4, payload4, claim2 = "unspecified", reason2 = "unspecified") {
|
|
10207
|
-
super(message4);
|
|
10202
|
+
super(message4, { cause: { claim: claim2, reason: reason2, payload: payload4 } });
|
|
10208
10203
|
this.code = "ERR_JWT_EXPIRED";
|
|
10209
10204
|
this.claim = claim2;
|
|
10210
10205
|
this.reason = reason2;
|
|
10211
10206
|
this.payload = payload4;
|
|
10212
10207
|
}
|
|
10213
10208
|
};
|
|
10209
|
+
JWTExpired.code = "ERR_JWT_EXPIRED";
|
|
10214
10210
|
var JOSEAlgNotAllowed = class extends JOSEError {
|
|
10215
10211
|
constructor() {
|
|
10216
10212
|
super(...arguments);
|
|
10217
10213
|
this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
10218
10214
|
}
|
|
10219
|
-
static get code() {
|
|
10220
|
-
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
10221
|
-
}
|
|
10222
10215
|
};
|
|
10216
|
+
JOSEAlgNotAllowed.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
10223
10217
|
var JOSENotSupported = class extends JOSEError {
|
|
10224
10218
|
constructor() {
|
|
10225
10219
|
super(...arguments);
|
|
10226
10220
|
this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
10227
10221
|
}
|
|
10228
|
-
|
|
10229
|
-
|
|
10222
|
+
};
|
|
10223
|
+
JOSENotSupported.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
10224
|
+
var JWEDecryptionFailed = class extends JOSEError {
|
|
10225
|
+
constructor(message4 = "decryption operation failed", options) {
|
|
10226
|
+
super(message4, options);
|
|
10227
|
+
this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
10230
10228
|
}
|
|
10231
10229
|
};
|
|
10230
|
+
JWEDecryptionFailed.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
10231
|
+
var JWEInvalid = class extends JOSEError {
|
|
10232
|
+
constructor() {
|
|
10233
|
+
super(...arguments);
|
|
10234
|
+
this.code = "ERR_JWE_INVALID";
|
|
10235
|
+
}
|
|
10236
|
+
};
|
|
10237
|
+
JWEInvalid.code = "ERR_JWE_INVALID";
|
|
10232
10238
|
var JWSInvalid = class extends JOSEError {
|
|
10233
10239
|
constructor() {
|
|
10234
10240
|
super(...arguments);
|
|
10235
10241
|
this.code = "ERR_JWS_INVALID";
|
|
10236
10242
|
}
|
|
10237
|
-
static get code() {
|
|
10238
|
-
return "ERR_JWS_INVALID";
|
|
10239
|
-
}
|
|
10240
10243
|
};
|
|
10244
|
+
JWSInvalid.code = "ERR_JWS_INVALID";
|
|
10241
10245
|
var JWTInvalid = class extends JOSEError {
|
|
10242
10246
|
constructor() {
|
|
10243
10247
|
super(...arguments);
|
|
10244
10248
|
this.code = "ERR_JWT_INVALID";
|
|
10245
10249
|
}
|
|
10246
|
-
|
|
10247
|
-
|
|
10250
|
+
};
|
|
10251
|
+
JWTInvalid.code = "ERR_JWT_INVALID";
|
|
10252
|
+
var JWKInvalid = class extends JOSEError {
|
|
10253
|
+
constructor() {
|
|
10254
|
+
super(...arguments);
|
|
10255
|
+
this.code = "ERR_JWK_INVALID";
|
|
10248
10256
|
}
|
|
10249
10257
|
};
|
|
10258
|
+
JWKInvalid.code = "ERR_JWK_INVALID";
|
|
10250
10259
|
var JWKSInvalid = class extends JOSEError {
|
|
10251
10260
|
constructor() {
|
|
10252
10261
|
super(...arguments);
|
|
10253
10262
|
this.code = "ERR_JWKS_INVALID";
|
|
10254
10263
|
}
|
|
10255
|
-
static get code() {
|
|
10256
|
-
return "ERR_JWKS_INVALID";
|
|
10257
|
-
}
|
|
10258
10264
|
};
|
|
10265
|
+
JWKSInvalid.code = "ERR_JWKS_INVALID";
|
|
10259
10266
|
var JWKSNoMatchingKey = class extends JOSEError {
|
|
10260
|
-
constructor() {
|
|
10261
|
-
super(
|
|
10267
|
+
constructor(message4 = "no applicable key found in the JSON Web Key Set", options) {
|
|
10268
|
+
super(message4, options);
|
|
10262
10269
|
this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
10263
|
-
this.message = "no applicable key found in the JSON Web Key Set";
|
|
10264
|
-
}
|
|
10265
|
-
static get code() {
|
|
10266
|
-
return "ERR_JWKS_NO_MATCHING_KEY";
|
|
10267
10270
|
}
|
|
10268
10271
|
};
|
|
10272
|
+
JWKSNoMatchingKey.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
10269
10273
|
var JWKSMultipleMatchingKeys = class extends JOSEError {
|
|
10270
|
-
constructor() {
|
|
10271
|
-
super(
|
|
10274
|
+
constructor(message4 = "multiple matching keys found in the JSON Web Key Set", options) {
|
|
10275
|
+
super(message4, options);
|
|
10272
10276
|
this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
10273
|
-
this.message = "multiple matching keys found in the JSON Web Key Set";
|
|
10274
|
-
}
|
|
10275
|
-
static get code() {
|
|
10276
|
-
return "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
10277
10277
|
}
|
|
10278
10278
|
};
|
|
10279
|
+
JWKSMultipleMatchingKeys.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
10279
10280
|
var JWKSTimeout = class extends JOSEError {
|
|
10280
|
-
constructor() {
|
|
10281
|
-
super(
|
|
10281
|
+
constructor(message4 = "request timed out", options) {
|
|
10282
|
+
super(message4, options);
|
|
10282
10283
|
this.code = "ERR_JWKS_TIMEOUT";
|
|
10283
|
-
this.message = "request timed out";
|
|
10284
|
-
}
|
|
10285
|
-
static get code() {
|
|
10286
|
-
return "ERR_JWKS_TIMEOUT";
|
|
10287
10284
|
}
|
|
10288
10285
|
};
|
|
10286
|
+
JWKSTimeout.code = "ERR_JWKS_TIMEOUT";
|
|
10289
10287
|
var JWSSignatureVerificationFailed = class extends JOSEError {
|
|
10290
|
-
constructor() {
|
|
10291
|
-
super(
|
|
10288
|
+
constructor(message4 = "signature verification failed", options) {
|
|
10289
|
+
super(message4, options);
|
|
10292
10290
|
this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
10293
|
-
this.message = "signature verification failed";
|
|
10294
|
-
}
|
|
10295
|
-
static get code() {
|
|
10296
|
-
return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
10297
10291
|
}
|
|
10298
10292
|
};
|
|
10293
|
+
JWSSignatureVerificationFailed.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
10299
10294
|
|
|
10300
10295
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/jose/dist/browser/lib/crypto_key.js
|
|
10301
10296
|
function unusable(name7, prop = "algorithm.name") {
|
|
@@ -11525,7 +11520,7 @@ function isCloudflareWorkers() {
|
|
|
11525
11520
|
var USER_AGENT;
|
|
11526
11521
|
if (typeof navigator === "undefined" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) {
|
|
11527
11522
|
const NAME = "jose";
|
|
11528
|
-
const VERSION = "v5.9.
|
|
11523
|
+
const VERSION = "v5.9.6";
|
|
11529
11524
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
11530
11525
|
}
|
|
11531
11526
|
var jwksCache = Symbol();
|
|
@@ -11746,10 +11741,9 @@ async function generateKeyPair2(alg, options) {
|
|
|
11746
11741
|
|
|
11747
11742
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/uuid/dist/esm-browser/stringify.js
|
|
11748
11743
|
var byteToHex = [];
|
|
11749
|
-
for (i = 0; i < 256; ++i) {
|
|
11744
|
+
for (let i = 0; i < 256; ++i) {
|
|
11750
11745
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
11751
11746
|
}
|
|
11752
|
-
var i;
|
|
11753
11747
|
function unsafeStringify(arr, offset3 = 0) {
|
|
11754
11748
|
return (byteToHex[arr[offset3 + 0]] + byteToHex[arr[offset3 + 1]] + byteToHex[arr[offset3 + 2]] + byteToHex[arr[offset3 + 3]] + "-" + byteToHex[arr[offset3 + 4]] + byteToHex[arr[offset3 + 5]] + "-" + byteToHex[arr[offset3 + 6]] + byteToHex[arr[offset3 + 7]] + "-" + byteToHex[arr[offset3 + 8]] + byteToHex[arr[offset3 + 9]] + "-" + byteToHex[arr[offset3 + 10]] + byteToHex[arr[offset3 + 11]] + byteToHex[arr[offset3 + 12]] + byteToHex[arr[offset3 + 13]] + byteToHex[arr[offset3 + 14]] + byteToHex[arr[offset3 + 15]]).toLowerCase();
|
|
11755
11749
|
}
|
|
@@ -11759,19 +11753,17 @@ var getRandomValues;
|
|
|
11759
11753
|
var rnds8 = new Uint8Array(16);
|
|
11760
11754
|
function rng() {
|
|
11761
11755
|
if (!getRandomValues) {
|
|
11762
|
-
|
|
11763
|
-
if (!getRandomValues) {
|
|
11756
|
+
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
11764
11757
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
11765
11758
|
}
|
|
11759
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
11766
11760
|
}
|
|
11767
11761
|
return getRandomValues(rnds8);
|
|
11768
11762
|
}
|
|
11769
11763
|
|
|
11770
11764
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/uuid/dist/esm-browser/native.js
|
|
11771
11765
|
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
11772
|
-
var native_default = {
|
|
11773
|
-
randomUUID
|
|
11774
|
-
};
|
|
11766
|
+
var native_default = { randomUUID };
|
|
11775
11767
|
|
|
11776
11768
|
// ../node_modules/@inrupt/solid-client-authn-core/node_modules/uuid/dist/esm-browser/v4.js
|
|
11777
11769
|
function v4(options, buf, offset3) {
|
|
@@ -11779,12 +11771,12 @@ function v4(options, buf, offset3) {
|
|
|
11779
11771
|
return native_default.randomUUID();
|
|
11780
11772
|
}
|
|
11781
11773
|
options = options || {};
|
|
11782
|
-
|
|
11774
|
+
const rnds = options.random || (options.rng || rng)();
|
|
11783
11775
|
rnds[6] = rnds[6] & 15 | 64;
|
|
11784
11776
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11785
11777
|
if (buf) {
|
|
11786
11778
|
offset3 = offset3 || 0;
|
|
11787
|
-
for (
|
|
11779
|
+
for (let i = 0; i < 16; ++i) {
|
|
11788
11780
|
buf[offset3 + i] = rnds[i];
|
|
11789
11781
|
}
|
|
11790
11782
|
return buf;
|
|
@@ -12467,10 +12459,9 @@ async function buildAuthenticatedFetch(accessToken, options) {
|
|
|
12467
12459
|
|
|
12468
12460
|
// ../node_modules/@inrupt/solid-client-authn-browser/node_modules/uuid/dist/esm-browser/stringify.js
|
|
12469
12461
|
var byteToHex2 = [];
|
|
12470
|
-
for (i = 0; i < 256; ++i) {
|
|
12462
|
+
for (let i = 0; i < 256; ++i) {
|
|
12471
12463
|
byteToHex2.push((i + 256).toString(16).slice(1));
|
|
12472
12464
|
}
|
|
12473
|
-
var i;
|
|
12474
12465
|
function unsafeStringify2(arr, offset3 = 0) {
|
|
12475
12466
|
return (byteToHex2[arr[offset3 + 0]] + byteToHex2[arr[offset3 + 1]] + byteToHex2[arr[offset3 + 2]] + byteToHex2[arr[offset3 + 3]] + "-" + byteToHex2[arr[offset3 + 4]] + byteToHex2[arr[offset3 + 5]] + "-" + byteToHex2[arr[offset3 + 6]] + byteToHex2[arr[offset3 + 7]] + "-" + byteToHex2[arr[offset3 + 8]] + byteToHex2[arr[offset3 + 9]] + "-" + byteToHex2[arr[offset3 + 10]] + byteToHex2[arr[offset3 + 11]] + byteToHex2[arr[offset3 + 12]] + byteToHex2[arr[offset3 + 13]] + byteToHex2[arr[offset3 + 14]] + byteToHex2[arr[offset3 + 15]]).toLowerCase();
|
|
12476
12467
|
}
|
|
@@ -12480,19 +12471,17 @@ var getRandomValues2;
|
|
|
12480
12471
|
var rnds82 = new Uint8Array(16);
|
|
12481
12472
|
function rng2() {
|
|
12482
12473
|
if (!getRandomValues2) {
|
|
12483
|
-
|
|
12484
|
-
if (!getRandomValues2) {
|
|
12474
|
+
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
12485
12475
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
12486
12476
|
}
|
|
12477
|
+
getRandomValues2 = crypto.getRandomValues.bind(crypto);
|
|
12487
12478
|
}
|
|
12488
12479
|
return getRandomValues2(rnds82);
|
|
12489
12480
|
}
|
|
12490
12481
|
|
|
12491
12482
|
// ../node_modules/@inrupt/solid-client-authn-browser/node_modules/uuid/dist/esm-browser/native.js
|
|
12492
12483
|
var randomUUID2 = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
12493
|
-
var native_default2 = {
|
|
12494
|
-
randomUUID: randomUUID2
|
|
12495
|
-
};
|
|
12484
|
+
var native_default2 = { randomUUID: randomUUID2 };
|
|
12496
12485
|
|
|
12497
12486
|
// ../node_modules/@inrupt/solid-client-authn-browser/node_modules/uuid/dist/esm-browser/v4.js
|
|
12498
12487
|
function v42(options, buf, offset3) {
|
|
@@ -12500,12 +12489,12 @@ function v42(options, buf, offset3) {
|
|
|
12500
12489
|
return native_default2.randomUUID();
|
|
12501
12490
|
}
|
|
12502
12491
|
options = options || {};
|
|
12503
|
-
|
|
12492
|
+
const rnds = options.random || (options.rng || rng2)();
|
|
12504
12493
|
rnds[6] = rnds[6] & 15 | 64;
|
|
12505
12494
|
rnds[8] = rnds[8] & 63 | 128;
|
|
12506
12495
|
if (buf) {
|
|
12507
12496
|
offset3 = offset3 || 0;
|
|
12508
|
-
for (
|
|
12497
|
+
for (let i = 0; i < 16; ++i) {
|
|
12509
12498
|
buf[offset3 + i] = rnds[i];
|
|
12510
12499
|
}
|
|
12511
12500
|
return buf;
|
|
@@ -13600,7 +13589,7 @@ var FileFetcher = class {
|
|
|
13600
13589
|
|
|
13601
13590
|
// src/modules/contacts.ts
|
|
13602
13591
|
async function loadContactsModule(store) {
|
|
13603
|
-
const module2 = await import("./dist-
|
|
13592
|
+
const module2 = await import("./dist-5TZZFAHE.js");
|
|
13604
13593
|
return new module2.default({
|
|
13605
13594
|
store: store.graph,
|
|
13606
13595
|
fetcher: store.fetcher,
|
|
@@ -13642,6 +13631,30 @@ function labelForType(typeUri) {
|
|
|
13642
13631
|
}
|
|
13643
13632
|
}
|
|
13644
13633
|
|
|
13634
|
+
// src/thing/labelFromUri.ts
|
|
13635
|
+
function labelFromUri(uri6) {
|
|
13636
|
+
const url7 = new URL(uri6);
|
|
13637
|
+
if (isTooGeneric(url7.hash)) {
|
|
13638
|
+
return (getFilename(url7) || url7.host + url7.pathname) + url7.hash;
|
|
13639
|
+
}
|
|
13640
|
+
return labelFromFragment(url7.hash) || getFilename(url7) || url7.host;
|
|
13641
|
+
}
|
|
13642
|
+
function labelFromFragment(fragment) {
|
|
13643
|
+
return fragment ? fragment.split("#")[1] : null;
|
|
13644
|
+
}
|
|
13645
|
+
function isTooGeneric(fragment) {
|
|
13646
|
+
const genericFragments = ["#it", "#this", "#me", "#i"];
|
|
13647
|
+
return genericFragments.includes(fragment);
|
|
13648
|
+
}
|
|
13649
|
+
function getFilename(url7) {
|
|
13650
|
+
if (url7.pathname.endsWith("/")) {
|
|
13651
|
+
const containerName = url7.pathname.split("/").at(-2);
|
|
13652
|
+
return containerName ? containerName + "/" : null;
|
|
13653
|
+
} else {
|
|
13654
|
+
return url7.pathname.split("/").pop();
|
|
13655
|
+
}
|
|
13656
|
+
}
|
|
13657
|
+
|
|
13645
13658
|
// src/thing/Thing.ts
|
|
13646
13659
|
var Thing = class {
|
|
13647
13660
|
constructor(uri6, store, editable = false) {
|
|
@@ -13663,13 +13676,17 @@ var Thing = class {
|
|
|
13663
13676
|
"http://schema.org/caption",
|
|
13664
13677
|
"https://schema.org/caption"
|
|
13665
13678
|
);
|
|
13666
|
-
|
|
13679
|
+
if (value6) {
|
|
13680
|
+
return value6;
|
|
13681
|
+
}
|
|
13682
|
+
return labelFromUri(this.uri);
|
|
13667
13683
|
}
|
|
13668
13684
|
literals() {
|
|
13669
13685
|
const statements = this.store.statementsMatching(namedNode(this.uri));
|
|
13670
13686
|
const values = statements.filter((it) => isLiteral(it.object)).reduce(accumulateValues, {});
|
|
13671
13687
|
return Object.keys(values).map((predicate2) => ({
|
|
13672
13688
|
predicate: predicate2,
|
|
13689
|
+
label: labelFromUri(predicate2),
|
|
13673
13690
|
values: values[predicate2]
|
|
13674
13691
|
}));
|
|
13675
13692
|
}
|
|
@@ -13678,6 +13695,7 @@ var Thing = class {
|
|
|
13678
13695
|
const values = statements.filter((it) => isNamedNode(it.object) && !isRdfType(it.predicate)).reduce(accumulateValues, {});
|
|
13679
13696
|
return Object.keys(values).map((predicate2) => ({
|
|
13680
13697
|
predicate: predicate2,
|
|
13698
|
+
label: labelFromUri(predicate2),
|
|
13681
13699
|
uris: values[predicate2]
|
|
13682
13700
|
}));
|
|
13683
13701
|
}
|
|
@@ -13690,6 +13708,7 @@ var Thing = class {
|
|
|
13690
13708
|
const values = statements.reduce(accumulateSubjects, {});
|
|
13691
13709
|
return Object.keys(values).map((predicate2) => ({
|
|
13692
13710
|
predicate: predicate2,
|
|
13711
|
+
label: labelFromUri(predicate2),
|
|
13693
13712
|
uris: values[predicate2]
|
|
13694
13713
|
}));
|
|
13695
13714
|
}
|
|
@@ -13908,6 +13927,48 @@ var LabelIndex = class extends RdfDocument {
|
|
|
13908
13927
|
}
|
|
13909
13928
|
};
|
|
13910
13929
|
|
|
13930
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/web-operations/executeUpdate.js
|
|
13931
|
+
async function executeUpdate(fetcher2, updater, operation3) {
|
|
13932
|
+
await updater.updateMany(operation3.deletions, operation3.insertions);
|
|
13933
|
+
operation3.filesToCreate.map((file2) => {
|
|
13934
|
+
createEmptyTurtleFile(fetcher2, file2.url);
|
|
13935
|
+
});
|
|
13936
|
+
}
|
|
13937
|
+
function createEmptyTurtleFile(fetcher2, url7) {
|
|
13938
|
+
return fetcher2.webOperation("PUT", url7, {
|
|
13939
|
+
contentType: "text/turtle"
|
|
13940
|
+
});
|
|
13941
|
+
}
|
|
13942
|
+
|
|
13943
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/namespaces/index.js
|
|
13944
|
+
var rdf = Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
|
|
13945
|
+
var solid = Namespace("http://www.w3.org/ns/solid/terms#");
|
|
13946
|
+
var pim = Namespace("http://www.w3.org/ns/pim/space#");
|
|
13947
|
+
var ldp = Namespace("http://www.w3.org/ns/ldp#");
|
|
13948
|
+
|
|
13949
|
+
// node_modules/@solid-data-modules/rdflib-utils/dist/identifier/generate-id.js
|
|
13950
|
+
var import_short_unique_id = __toESM(require_short_unique_id(), 1);
|
|
13951
|
+
var uid = new import_short_unique_id.default({ length: 10 });
|
|
13952
|
+
|
|
13953
|
+
// src/namespaces/index.ts
|
|
13954
|
+
var rdfs = Namespace("http://www.w3.org/2000/01/rdf-schema#");
|
|
13955
|
+
|
|
13956
|
+
// src/search/addToLabelIndex.ts
|
|
13957
|
+
var addToLabelIndex = (thing, labelIndex) => {
|
|
13958
|
+
return {
|
|
13959
|
+
deletions: [],
|
|
13960
|
+
filesToCreate: [],
|
|
13961
|
+
insertions: [
|
|
13962
|
+
st(
|
|
13963
|
+
namedNode(thing.uri),
|
|
13964
|
+
rdfs("label"),
|
|
13965
|
+
lit(thing.label()),
|
|
13966
|
+
namedNode(labelIndex.uri)
|
|
13967
|
+
)
|
|
13968
|
+
]
|
|
13969
|
+
};
|
|
13970
|
+
};
|
|
13971
|
+
|
|
13911
13972
|
// src/Store.ts
|
|
13912
13973
|
var Store = class {
|
|
13913
13974
|
constructor(session4) {
|
|
@@ -13992,6 +14053,10 @@ var Store = class {
|
|
|
13992
14053
|
}
|
|
13993
14054
|
);
|
|
13994
14055
|
}
|
|
14056
|
+
async addToLabelIndex(thing, labelIndex) {
|
|
14057
|
+
const operation3 = addToLabelIndex(thing, labelIndex);
|
|
14058
|
+
await executeUpdate(this.fetcher, this.updater, operation3);
|
|
14059
|
+
}
|
|
13995
14060
|
};
|
|
13996
14061
|
|
|
13997
14062
|
// ../node_modules/rdf-namespaces/dist/index.es.js
|
|
@@ -14008,21 +14073,21 @@ __export(index_es_exports, {
|
|
|
14008
14073
|
foaf: () => foaf,
|
|
14009
14074
|
http: () => http,
|
|
14010
14075
|
hydra: () => hydra,
|
|
14011
|
-
ldp: () =>
|
|
14076
|
+
ldp: () => ldp2,
|
|
14012
14077
|
link: () => link3,
|
|
14013
14078
|
log: () => log,
|
|
14014
14079
|
meeting: () => meeting,
|
|
14015
14080
|
owl: () => owl,
|
|
14016
14081
|
qu: () => qu,
|
|
14017
|
-
rdf: () =>
|
|
14018
|
-
rdfs: () =>
|
|
14082
|
+
rdf: () => rdf2,
|
|
14083
|
+
rdfs: () => rdfs2,
|
|
14019
14084
|
sched: () => sched,
|
|
14020
14085
|
schema: () => schema,
|
|
14021
14086
|
schema_https: () => schema_https,
|
|
14022
14087
|
sec: () => sec,
|
|
14023
14088
|
sioc: () => sioc,
|
|
14024
14089
|
skos: () => skos,
|
|
14025
|
-
solid: () =>
|
|
14090
|
+
solid: () => solid2,
|
|
14026
14091
|
space: () => space,
|
|
14027
14092
|
tab: () => tab,
|
|
14028
14093
|
tabont: () => tabont,
|
|
@@ -14375,7 +14440,7 @@ var recurrenceId = "http://www.w3.org/2002/12/cal/ical#recurrenceId";
|
|
|
14375
14440
|
var DomainOf_rrule = "http://www.w3.org/2002/12/cal/ical#DomainOf_rrule";
|
|
14376
14441
|
var relatedTo = "http://www.w3.org/2002/12/cal/ical#relatedTo";
|
|
14377
14442
|
var url2 = "http://www.w3.org/2002/12/cal/ical#url";
|
|
14378
|
-
var
|
|
14443
|
+
var uid2 = "http://www.w3.org/2002/12/cal/ical#uid";
|
|
14379
14444
|
var exdate = "http://www.w3.org/2002/12/cal/ical#exdate";
|
|
14380
14445
|
var exrule = "http://www.w3.org/2002/12/cal/ical#exrule";
|
|
14381
14446
|
var Value_RECUR = "http://www.w3.org/2002/12/cal/ical#Value_RECUR";
|
|
@@ -14435,7 +14500,7 @@ var calImport = /* @__PURE__ */ Object.freeze({
|
|
|
14435
14500
|
DomainOf_rrule,
|
|
14436
14501
|
relatedTo,
|
|
14437
14502
|
url: url2,
|
|
14438
|
-
uid,
|
|
14503
|
+
uid: uid2,
|
|
14439
14504
|
exdate,
|
|
14440
14505
|
exrule,
|
|
14441
14506
|
Value_RECUR,
|
|
@@ -16863,7 +16928,7 @@ var _containedItemQuantity = "http://hl7.org/fhir/_containedItemQuantity";
|
|
|
16863
16928
|
var _daysSupply = "http://hl7.org/fhir/_daysSupply";
|
|
16864
16929
|
var reportingVendor = "http://hl7.org/fhir/reportingVendor";
|
|
16865
16930
|
var current = "http://hl7.org/fhir/current";
|
|
16866
|
-
var
|
|
16931
|
+
var uid3 = "http://hl7.org/fhir/uid";
|
|
16867
16932
|
var order = "http://hl7.org/fhir/order";
|
|
16868
16933
|
var priorPrescription = "http://hl7.org/fhir/priorPrescription";
|
|
16869
16934
|
var distanceFromLandmark = "http://hl7.org/fhir/distanceFromLandmark";
|
|
@@ -21096,7 +21161,7 @@ var fhirImport = /* @__PURE__ */ Object.freeze({
|
|
|
21096
21161
|
_daysSupply,
|
|
21097
21162
|
reportingVendor,
|
|
21098
21163
|
current,
|
|
21099
|
-
uid:
|
|
21164
|
+
uid: uid3,
|
|
21100
21165
|
order,
|
|
21101
21166
|
priorPrescription,
|
|
21102
21167
|
distanceFromLandmark,
|
|
@@ -34257,22 +34322,22 @@ var fhir = fhirImport;
|
|
|
34257
34322
|
var foaf = foafImport;
|
|
34258
34323
|
var http = httpImport;
|
|
34259
34324
|
var hydra = hydraImport;
|
|
34260
|
-
var
|
|
34325
|
+
var ldp2 = ldpImport;
|
|
34261
34326
|
var link3 = linkImport;
|
|
34262
34327
|
var log = logImport;
|
|
34263
34328
|
var meeting = meetingImport;
|
|
34264
34329
|
var owl = owlImport;
|
|
34265
34330
|
var qu = quImport;
|
|
34266
34331
|
var trip3 = tripImport;
|
|
34267
|
-
var
|
|
34268
|
-
var
|
|
34332
|
+
var rdf2 = rdfImport;
|
|
34333
|
+
var rdfs2 = rdfsImport;
|
|
34269
34334
|
var sched = schedImport;
|
|
34270
34335
|
var schema = schemaImport;
|
|
34271
34336
|
var schema_https = schema_httpsImport;
|
|
34272
34337
|
var sec = secImport;
|
|
34273
34338
|
var sioc = siocImport;
|
|
34274
34339
|
var skos = skosImport;
|
|
34275
|
-
var
|
|
34340
|
+
var solid2 = solidImport;
|
|
34276
34341
|
var space = spaceImport;
|
|
34277
34342
|
var tab = tabImport;
|
|
34278
34343
|
var tabont = tabontImport;
|
|
@@ -34445,6 +34510,14 @@ var PodOS = class {
|
|
|
34445
34510
|
loadContactsModule() {
|
|
34446
34511
|
return loadContactsModule(this.store);
|
|
34447
34512
|
}
|
|
34513
|
+
/**
|
|
34514
|
+
* Adds a label of the given thing to the label index, so that it can be found after the search index has been rebuilt
|
|
34515
|
+
* @param thing - The thing to index
|
|
34516
|
+
* @param labelIndex - The index to update
|
|
34517
|
+
*/
|
|
34518
|
+
async addToLabelIndex(thing, labelIndex) {
|
|
34519
|
+
await this.store.addToLabelIndex(thing, labelIndex);
|
|
34520
|
+
}
|
|
34448
34521
|
};
|
|
34449
34522
|
export {
|
|
34450
34523
|
BinaryFile,
|
|
@@ -34457,7 +34530,8 @@ export {
|
|
|
34457
34530
|
RdfDocument,
|
|
34458
34531
|
SearchIndex,
|
|
34459
34532
|
Thing,
|
|
34460
|
-
WebIdProfile
|
|
34533
|
+
WebIdProfile,
|
|
34534
|
+
labelFromUri
|
|
34461
34535
|
};
|
|
34462
34536
|
/*! Bundled license information:
|
|
34463
34537
|
|