@simplewebauthn/server 8.0.0 → 8.0.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.
@@ -13,7 +13,7 @@ export async function getWebCrypto() {
13
13
  */
14
14
  // @ts-ignore: We'll handle any errors...
15
15
  // dnt-shim-ignore
16
- const _crypto = await require('node:crypto');
16
+ const _crypto = await import('crypto');
17
17
  webCrypto = _crypto.webcrypto;
18
18
  }
19
19
  catch (_err) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "module": "./esm/index.js",
3
3
  "main": "./script/index.js",
4
4
  "name": "@simplewebauthn/server",
5
- "version": "8.0.0",
5
+ "version": "8.0.1",
6
6
  "description": "SimpleWebAuthn for Servers",
7
7
  "license": "MIT",
8
8
  "author": "Matthew Miller <matthew@millerti.me>",
@@ -60,5 +60,13 @@
60
60
  "cbor-x": "^1.5.2",
61
61
  "cross-fetch": "^4.0.0",
62
62
  "debug": "^4.3.4"
63
+ },
64
+ "devDependencies": {
65
+ "@types/node": "^18.11.9",
66
+ "picocolors": "^1.0.0",
67
+ "@deno/shim-deno-test": "~0.4.0"
68
+ },
69
+ "scripts": {
70
+ "test": "node test_runner.js"
63
71
  }
64
72
  }
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.getWebCrypto = void 0;
4
27
  let webCrypto = undefined;
@@ -16,7 +39,7 @@ async function getWebCrypto() {
16
39
  */
17
40
  // @ts-ignore: We'll handle any errors...
18
41
  // dnt-shim-ignore
19
- const _crypto = await require('node:crypto');
42
+ const _crypto = await Promise.resolve().then(() => __importStar(require('crypto')));
20
43
  webCrypto = _crypto.webcrypto;
21
44
  }
22
45
  catch (_err) {