@muze-nl/jsfs-solid 0.3.1 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muze-nl/jsfs-solid",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
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.0",
3
+ "version": "0.3.2",
4
4
  "author": "auke@muze.nl",
5
5
  "source": "src/SolidAdapter.js",
6
6
  "main": "src/SolidClient.js",
@@ -14,8 +14,8 @@
14
14
  "description": "A filesystem adapter for JSFS that can read/write Solid Storage PODs",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1",
17
- "build-dev": "esbuild --bundle src/SolidClient.js --outfile=dist/browser.js --sourcemap;",
18
- "build": "esbuild --bundle src/SolidClient.js --outfile=dist/browser.min.js --minify --sourcemap;"
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
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -21,25 +21,25 @@ export default async function solidClient(webid, solidOptions) {
21
21
  'vcard': 'http://www.w3.org/2006/vcard/ns#',
22
22
  'foaf': 'http://xmlns.com/foaf/0.1/'
23
23
  },
24
- parser: n3Parser,
25
- writer: n3Writer
24
+ parser: oldm.n3Parser,
25
+ writer: oldm.n3Writer
26
26
  }
27
27
  const options = Object.assign({}, defaults, solidOptions)
28
28
  for (const prefix in defaults.prefixes) {
29
- if (!info.prefixes[prefix]) {
30
- info.prefixes[prefix] = defaults.prefixes[prefix]
29
+ if (!options.prefixes[prefix]) {
30
+ options.prefixes[prefix] = defaults.prefixes[prefix]
31
31
  }
32
32
  }
33
- const profile = await metro.client().with(oldmmw(info), getdatamw()).get(webid)?.primary
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
- info.issuer = profile.solid$oidcIssuer
37
+ options.issuer = profile.solid$oidcIssuer
38
38
  const storage = oldm.many(profile.space$storage)
39
- .map(s => new jsfs.fs(new SolidAdapter(s, '/', info)))
39
+ .map(s => new jsfs.fs(new SolidAdapter(s, '/', options)))
40
40
 
41
41
  return metro.api(
42
- metro.client(oidcmw(info), oldmmw(info)),
42
+ metro.client(oidcmw(options), oldmmw(options)),
43
43
  {
44
44
  profile,
45
45
  issuer: profile.solid$oidcIssuer,