@pod-os/core 0.34.0-rc.aff4dc6.0 → 0.34.0-rc.b310d8a.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 +24 -25
- package/lib/index.js +24 -25
- package/package.json +3 -3
- package/types/Store.d.ts +1 -1
- package/types/index.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -18462,7 +18462,8 @@ var Mime = class {
|
|
|
18462
18462
|
getAllExtensions(type5) {
|
|
18463
18463
|
if (typeof type5 !== "string")
|
|
18464
18464
|
return null;
|
|
18465
|
-
|
|
18465
|
+
type5 = type5.split(";")[0].trim().toLowerCase();
|
|
18466
|
+
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5) ?? null;
|
|
18466
18467
|
}
|
|
18467
18468
|
_freeze() {
|
|
18468
18469
|
this.define = () => {
|
|
@@ -31115,30 +31116,28 @@ var Store = class {
|
|
|
31115
31116
|
return docUrl;
|
|
31116
31117
|
}
|
|
31117
31118
|
async addNewThing(uri6, name9, type5) {
|
|
31118
|
-
|
|
31119
|
-
|
|
31120
|
-
|
|
31121
|
-
|
|
31122
|
-
|
|
31123
|
-
|
|
31124
|
-
|
|
31125
|
-
|
|
31126
|
-
|
|
31127
|
-
|
|
31128
|
-
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
)
|
|
31133
|
-
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
}
|
|
31141
|
-
);
|
|
31119
|
+
const typeInsertion = type5 ? [
|
|
31120
|
+
st(
|
|
31121
|
+
namedNode2(uri6),
|
|
31122
|
+
namedNode2("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
31123
|
+
namedNode2(type5),
|
|
31124
|
+
namedNode2(uri6).doc()
|
|
31125
|
+
)
|
|
31126
|
+
] : [];
|
|
31127
|
+
const insertions = [
|
|
31128
|
+
...typeInsertion,
|
|
31129
|
+
st(
|
|
31130
|
+
namedNode2(uri6),
|
|
31131
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
31132
|
+
lit(name9),
|
|
31133
|
+
namedNode2(uri6).doc()
|
|
31134
|
+
)
|
|
31135
|
+
];
|
|
31136
|
+
await this.updater.update([], insertions, void 0, false, {
|
|
31137
|
+
// explicitly omit credentials due to
|
|
31138
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
31139
|
+
credentials: "omit"
|
|
31140
|
+
});
|
|
31142
31141
|
}
|
|
31143
31142
|
async executeUpdate(operation3) {
|
|
31144
31143
|
await executeUpdate(this.fetcher, this.updater, operation3);
|
package/lib/index.js
CHANGED
|
@@ -26904,7 +26904,8 @@ var PodOS = (() => {
|
|
|
26904
26904
|
getAllExtensions(type5) {
|
|
26905
26905
|
if (typeof type5 !== "string")
|
|
26906
26906
|
return null;
|
|
26907
|
-
|
|
26907
|
+
type5 = type5.split(";")[0].trim().toLowerCase();
|
|
26908
|
+
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5) ?? null;
|
|
26908
26909
|
}
|
|
26909
26910
|
_freeze() {
|
|
26910
26911
|
this.define = () => {
|
|
@@ -39557,30 +39558,28 @@ _:patch
|
|
|
39557
39558
|
return docUrl;
|
|
39558
39559
|
}
|
|
39559
39560
|
async addNewThing(uri6, name9, type5) {
|
|
39560
|
-
|
|
39561
|
-
|
|
39562
|
-
|
|
39563
|
-
|
|
39564
|
-
|
|
39565
|
-
|
|
39566
|
-
|
|
39567
|
-
|
|
39568
|
-
|
|
39569
|
-
|
|
39570
|
-
|
|
39571
|
-
|
|
39572
|
-
|
|
39573
|
-
|
|
39574
|
-
)
|
|
39575
|
-
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
}
|
|
39583
|
-
);
|
|
39561
|
+
const typeInsertion = type5 ? [
|
|
39562
|
+
st(
|
|
39563
|
+
namedNode2(uri6),
|
|
39564
|
+
namedNode2("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
39565
|
+
namedNode2(type5),
|
|
39566
|
+
namedNode2(uri6).doc()
|
|
39567
|
+
)
|
|
39568
|
+
] : [];
|
|
39569
|
+
const insertions = [
|
|
39570
|
+
...typeInsertion,
|
|
39571
|
+
st(
|
|
39572
|
+
namedNode2(uri6),
|
|
39573
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
39574
|
+
lit(name9),
|
|
39575
|
+
namedNode2(uri6).doc()
|
|
39576
|
+
)
|
|
39577
|
+
];
|
|
39578
|
+
await this.updater.update([], insertions, void 0, false, {
|
|
39579
|
+
// explicitly omit credentials due to
|
|
39580
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
39581
|
+
credentials: "omit"
|
|
39582
|
+
});
|
|
39584
39583
|
}
|
|
39585
39584
|
async executeUpdate(operation3) {
|
|
39586
39585
|
await executeUpdate(this.fetcher, this.updater, operation3);
|
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.34.0-rc.
|
|
4
|
+
"version": "0.34.0-rc.b310d8a.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"rimraf": "^6.1.3",
|
|
54
54
|
"sparqljs": "^3.7.4",
|
|
55
55
|
"typedoc": "^0.28.20",
|
|
56
|
-
"typedoc-plugin-markdown": "^4.
|
|
56
|
+
"typedoc-plugin-markdown": "^4.14.0",
|
|
57
57
|
"typescript": "^6.0.3",
|
|
58
58
|
"typescript-eslint": "^8.71.0",
|
|
59
59
|
"vitest": "^4.1.11",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@types/lunr": "^2.3.7",
|
|
65
65
|
"buffer": "^6.0.3",
|
|
66
66
|
"lunr": "^2.3.9",
|
|
67
|
-
"mime": "^4.1.
|
|
67
|
+
"mime": "^4.1.1",
|
|
68
68
|
"neverthrow": "^8.2.0",
|
|
69
69
|
"rdf-namespaces": "^1.17.0",
|
|
70
70
|
"rdflib": "2.4.1",
|
package/types/Store.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare class Store {
|
|
|
59
59
|
*/
|
|
60
60
|
addRelation(thing: Thing, property: string, uri: string): Promise<void>;
|
|
61
61
|
private determineDocumentToUpdate;
|
|
62
|
-
addNewThing(uri: string, name: string, type
|
|
62
|
+
addNewThing(uri: string, name: string, type?: string): Promise<void>;
|
|
63
63
|
executeUpdate(operation: UpdateOperation): Promise<void>;
|
|
64
64
|
flagAuthorizationMetadata(): void;
|
|
65
65
|
loadModule<T>(module: PodOsModule<T>): T;
|
package/types/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare class PodOS {
|
|
|
84
84
|
*/
|
|
85
85
|
addRelation(thing: Thing, property: string, value: string): Promise<void>;
|
|
86
86
|
listKnownTerms(): Term[];
|
|
87
|
-
addNewThing(uri: string, name: string, type
|
|
87
|
+
addNewThing(uri: string, name: string, type?: string): Promise<void>;
|
|
88
88
|
proposeUriForNewThing(referenceUri: string, name: string): string;
|
|
89
89
|
/**
|
|
90
90
|
* returns a behavior subject that can be used to observe changes in the session state
|