@sphereon/oid4vci-client 0.19.1-fix.167 → 0.19.1-fix.183

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/index.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
9
  var __export = (target, all) => {
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
16
18
  }
17
19
  return to;
18
20
  };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
19
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
30
 
21
31
  // lib/index.ts
@@ -349,7 +359,7 @@ var createJwtBearerClientAssertion = /* @__PURE__ */ __name(async (request, opts
349
359
 
350
360
  // lib/functions/CredentialOfferCommons.ts
351
361
  var import_oid4vci_common7 = require("@sphereon/oid4vci-common");
352
- var import_cross_fetch = require("cross-fetch");
362
+ var import_cross_fetch = __toESM(require("cross-fetch"), 1);
353
363
  function isUriEncoded(str) {
354
364
  const pattern = /%[0-9A-F]{2}/i;
355
365
  return pattern.test(str);
@@ -359,7 +369,7 @@ async function handleCredentialOfferUri(uri) {
359
369
  const uriObj = (0, import_oid4vci_common7.getURIComponentsAsArray)(uri);
360
370
  const credentialOfferUri = decodeURIComponent(uriObj["credential_offer_uri"]);
361
371
  const decodedUri = isUriEncoded(credentialOfferUri) ? decodeURIComponent(credentialOfferUri) : credentialOfferUri;
362
- const response = await (0, import_cross_fetch.fetch)(decodedUri);
372
+ const response = await (0, import_cross_fetch.default)(decodedUri);
363
373
  if (!(response && response.status >= 200 && response.status < 400)) {
364
374
  return Promise.reject(Error(`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`));
365
375
  }