@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 CHANGED
@@ -10538,11 +10538,11 @@
10538
10538
  let response2 = await options.client.post(options.registration_endpoint, {
10539
10539
  body: options.client_info
10540
10540
  });
10541
- let info2 = response2.data;
10542
- if (!info2.client_id || !info2.client_secret) {
10541
+ let info = response2.data;
10542
+ if (!info.client_id || !info.client_secret) {
10543
10543
  throw everything_default.metroError("metro.oidc: Error: dynamic registration of client failed, no client_id or client_secret returned", response2);
10544
10544
  }
10545
- options.client_info = Object.assign(options.client_info, info2);
10545
+ options.client_info = Object.assign(options.client_info, info);
10546
10546
  return options.client_info;
10547
10547
  }
10548
10548
 
@@ -15403,18 +15403,18 @@
15403
15403
  };
15404
15404
  const options = Object.assign({}, defaults, solidOptions);
15405
15405
  for (const prefix2 in defaults.prefixes) {
15406
- if (!info.prefixes[prefix2]) {
15407
- info.prefixes[prefix2] = defaults.prefixes[prefix2];
15406
+ if (!options.prefixes[prefix2]) {
15407
+ options.prefixes[prefix2] = defaults.prefixes[prefix2];
15408
15408
  }
15409
15409
  }
15410
- const profile = await metro.client().with(oldmmw(info), getdatamw()).get(webid)?.primary;
15410
+ const profile = await metro.client().with(oldmmw(options), getdatamw()).get(webid)?.primary;
15411
15411
  if (!profile || !profile.solid$oidcIssuer) {
15412
15412
  throw new Error("solidClient: " + webid + " did not return valid solid profile");
15413
15413
  }
15414
- info.issuer = profile.solid$oidcIssuer;
15415
- const storage = oldm.many(profile.space$storage).map((s) => new jsfs.fs(new SolidAdapter(s, "/", info)));
15414
+ options.issuer = profile.solid$oidcIssuer;
15415
+ const storage = oldm.many(profile.space$storage).map((s) => new jsfs.fs(new SolidAdapter(s, "/", options)));
15416
15416
  return metro.api(
15417
- metro.client(oidcmw(info), oldmmw(info)),
15417
+ metro.client(oidcmw(options), oldmmw(options)),
15418
15418
  {
15419
15419
  profile,
15420
15420
  issuer: profile.solid$oidcIssuer,