@muze-nl/jsfs-solid 0.3.2 → 0.3.3
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/browser.js +9 -9
- package/dist/browser.js.map +3 -3
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +2 -2
- package/package.json +1 -1
- package/package.json~ +1 -1
- package/src/SolidClient.js +6 -6
package/package.json
CHANGED
package/package.json~
CHANGED
package/src/SolidClient.js
CHANGED
|
@@ -26,20 +26,20 @@ export default async function solidClient(webid, solidOptions) {
|
|
|
26
26
|
}
|
|
27
27
|
const options = Object.assign({}, defaults, solidOptions)
|
|
28
28
|
for (const prefix in defaults.prefixes) {
|
|
29
|
-
if (!
|
|
30
|
-
|
|
29
|
+
if (!options.prefixes[prefix]) {
|
|
30
|
+
options.prefixes[prefix] = defaults.prefixes[prefix]
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
const profile = await metro.client().with(oldmmw(
|
|
33
|
+
const profile = await metro.client().with(oldmmw(options), getdatamw()).get(webid)?.primary
|
|
34
34
|
if (!profile || !profile.solid$oidcIssuer) { //FIXME: don't assume $ as the separator
|
|
35
35
|
throw new Error('solidClient: '+webid+' did not return valid solid profile')
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
options.issuer = profile.solid$oidcIssuer
|
|
38
38
|
const storage = oldm.many(profile.space$storage)
|
|
39
|
-
.map(s => new jsfs.fs(new SolidAdapter(s, '/',
|
|
39
|
+
.map(s => new jsfs.fs(new SolidAdapter(s, '/', options)))
|
|
40
40
|
|
|
41
41
|
return metro.api(
|
|
42
|
-
metro.client(oidcmw(
|
|
42
|
+
metro.client(oidcmw(options), oldmmw(options)),
|
|
43
43
|
{
|
|
44
44
|
profile,
|
|
45
45
|
issuer: profile.solid$oidcIssuer,
|