dce-reactkit 3.12.1-beta-cross-server.3 → 3.12.1-beta-cross-server.5

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.
@@ -1,4 +1,4 @@
1
- // Import crypto
1
+ // Import crypto lib
2
2
  import crypto from 'crypto';
3
3
 
4
4
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.12.1-beta-cross-server.3",
3
+ "version": "3.12.1-beta-cross-server.5",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -25,6 +25,8 @@
25
25
  },
26
26
  "homepage": "https://github.com/harvard-edtech/dce-reactkit#readme",
27
27
  "dependencies": {
28
+ "crypto-browserify": "^3.12.1",
29
+ "cryptr": "^6.3.0",
28
30
  "qs": "^6.x.x",
29
31
  "react-select": "^5.7.3"
30
32
  },
@@ -45,7 +45,8 @@ const getCryptoLib = async () => {
45
45
  // Ignore because this is assumed to be included with typescript
46
46
  // @ts-ignore
47
47
  try {
48
- const crypto = await import('crypto');
48
+ // @ts-ignore
49
+ const crypto = (await import('crypto-browserify') as any);
49
50
  return crypto;
50
51
  } catch (err) {
51
52
  throw new ErrorWithCode(