@muze-nl/jsfs-solid 0.3.6 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muze-nl/jsfs-solid",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "author": "auke@muze.nl",
5
5
  "source": "src/SolidAdapter.js",
6
6
  "main": "src/SolidClient.js",
package/package.json~ CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muze-nl/jsfs-solid",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "author": "auke@muze.nl",
5
5
  "source": "src/SolidAdapter.js",
6
6
  "main": "src/SolidClient.js",
@@ -39,19 +39,20 @@ export default async function solidClient(webid, solidOptions) {
39
39
  const storage = oldm.many(profile.space$storage)
40
40
  .map(s => new jsfs.fs(new SolidAdapter(s, '/', options)))
41
41
 
42
- return metro.api(
43
- metro.client(metro.oidc.oidcmw(options), oldmmw(options)),
44
- {
45
- profile,
46
- issuer: profile.solid$oidcIssuer,
47
- inbox: profile.ldp$inbox,
48
- id: function() {
49
- return metro.oidc.idToken(this.issuer)
50
- },
51
- logout: async function() {
52
- throw new Error('not yet implemented')
53
- },
54
- ...storage
55
- }
56
- )
42
+ const client = metro.client(metro.oidc.oidcmw(options), oldmmw(options))
43
+ Object.assign(client, {
44
+ profile,
45
+ issuer: profile.solid$oidcIssuer,
46
+ inbox: profile.ldp$inbox,
47
+ id: function() {
48
+ return metro.oidc.idToken(this.issuer)
49
+ },
50
+ logout: async function() {
51
+ throw new Error('not yet implemented')
52
+ },
53
+ ...storage
54
+ })
55
+ client.id.bind(client)
56
+ client.logout.bind(client)
57
+ return client
57
58
  }