@muze-nl/jsfs-solid 0.4.0 → 0.4.1
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 +34 -26
- package/dist/browser.js.map +3 -3
- package/dist/browser.min.js +3 -3
- package/dist/browser.min.js.map +3 -3
- package/package.json +8 -2
- package/src/SolidClient.js +18 -17
- package/package.full.json +0 -37
- package/package.json~ +0 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muze-nl/jsfs-solid",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"author": "auke@muze.nl",
|
|
5
5
|
"source": "src/SolidAdapter.js",
|
|
6
6
|
"main": "src/SolidClient.js",
|
|
@@ -23,9 +23,15 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@muze-nl/jaqt": "^0.10.6",
|
|
25
25
|
"@muze-nl/jsfs": "^0.3.5",
|
|
26
|
-
"@muze-nl/metro": "^0.6.
|
|
26
|
+
"@muze-nl/metro": "^0.6.21",
|
|
27
27
|
"@muze-nl/metro-oidc": "^0.6.0",
|
|
28
28
|
"@muze-nl/metro-oldm": "^0.3.4",
|
|
29
29
|
"@muze-nl/oldm": "^0.5.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@eslint/js": "^9.39.2",
|
|
33
|
+
"esbuild": "^0.25.0",
|
|
34
|
+
"eslint": "^9.39.2",
|
|
35
|
+
"globals": "^16.5.0"
|
|
30
36
|
}
|
|
31
37
|
}
|
package/src/SolidClient.js
CHANGED
|
@@ -35,24 +35,25 @@ export default async function solidClient(webid, solidOptions) {
|
|
|
35
35
|
if (!profile || !profile.solid$oidcIssuer) { //FIXME: don't assume $ as the separator
|
|
36
36
|
throw new Error('solidClient: '+webid+' did not return valid solid profile')
|
|
37
37
|
}
|
|
38
|
-
options.issuer
|
|
38
|
+
if (!options.issuer) { // in case you access someone elses profile and pods with your own webid/issuer
|
|
39
|
+
options.issuer = oldm.one(profile.solid$oidcIssuer)?.id
|
|
40
|
+
}
|
|
39
41
|
const storage = oldm.many(profile.space$storage)
|
|
40
42
|
.map(s => new jsfs.fs(new SolidAdapter(s.id, '/', options)))
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return client
|
|
44
|
+
return metro.api(
|
|
45
|
+
metro.client(metro.oidc.oidcmw(options), oldmmw(options)),
|
|
46
|
+
{
|
|
47
|
+
profile,
|
|
48
|
+
issuer: oldm.one(profile.solid$oidcIssuer)?.id,
|
|
49
|
+
inbox: oldm.one(profile.ldp$inbox)?.id,
|
|
50
|
+
id: function() {
|
|
51
|
+
return metro.oidc.idToken(this.issuer)
|
|
52
|
+
},
|
|
53
|
+
logout: async function() {
|
|
54
|
+
throw new Error('not yet implemented')
|
|
55
|
+
},
|
|
56
|
+
storage
|
|
57
|
+
}
|
|
58
|
+
)
|
|
58
59
|
}
|
package/package.full.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@muze-nl/jsfs-solid",
|
|
3
|
-
"version": "0.3.3",
|
|
4
|
-
"author": "auke@muze.nl",
|
|
5
|
-
"source": "src/SolidAdapter.js",
|
|
6
|
-
"main": "src/SolidClient.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.39.2",
|
|
10
|
-
"esbuild": "^0.25.0",
|
|
11
|
-
"eslint": "^9.39.2",
|
|
12
|
-
"globals": "^16.5.0"
|
|
13
|
-
},
|
|
14
|
-
"description": "A filesystem adapter for JSFS that can read/write Solid Storage PODs",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
|
-
"build-dev": "esbuild --bundle src/browser.js --outfile=dist/browser.js --sourcemap;",
|
|
18
|
-
"build": "esbuild --bundle src/browser.js --outfile=dist/browser.min.js --minify --sourcemap;"
|
|
19
|
-
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/muze-nl/jsfs-solid.git"
|
|
23
|
-
},
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"bugs": {
|
|
26
|
-
"url": "https://github.com/muze-nl/jsfs-solid/issues"
|
|
27
|
-
},
|
|
28
|
-
"homepage": "https://github.com/muze-nl/jsfs-solid#readme",
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@muze-nl/jaqt": "^0.10.6",
|
|
31
|
-
"@muze-nl/jsfs": "^0.3.4",
|
|
32
|
-
"@muze-nl/metro": "^0.6.20",
|
|
33
|
-
"@muze-nl/metro-oidc": "^0.6.0",
|
|
34
|
-
"@muze-nl/metro-oldm": "^0.3.2",
|
|
35
|
-
"@muze-nl/oldm": "^0.5.1"
|
|
36
|
-
}
|
|
37
|
-
}
|
package/package.json~
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@muze-nl/jsfs-solid",
|
|
3
|
-
"version": "0.3.9",
|
|
4
|
-
"author": "auke@muze.nl",
|
|
5
|
-
"source": "src/SolidAdapter.js",
|
|
6
|
-
"main": "src/SolidClient.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"description": "A filesystem adapter for JSFS that can read/write Solid Storage PODs",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"build-dev": "esbuild --bundle src/browser.js --outfile=dist/browser.js --sourcemap;",
|
|
12
|
-
"build": "esbuild --bundle src/browser.js --outfile=dist/browser.min.js --minify --sourcemap;"
|
|
13
|
-
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/muze-nl/jsfs-solid.git"
|
|
17
|
-
},
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/muze-nl/jsfs-solid/issues"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/muze-nl/jsfs-solid#readme",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@muze-nl/jaqt": "^0.10.6",
|
|
25
|
-
"@muze-nl/jsfs": "^0.3.5",
|
|
26
|
-
"@muze-nl/metro": "^0.6.20",
|
|
27
|
-
"@muze-nl/metro-oidc": "^0.6.0",
|
|
28
|
-
"@muze-nl/metro-oldm": "^0.3.4",
|
|
29
|
-
"@muze-nl/oldm": "^0.5.2"
|
|
30
|
-
}
|
|
31
|
-
}
|