@dynamic-labs/utils 4.6.0 → 4.6.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ ### [4.6.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.0...v4.6.1) (2025-02-11)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * do not show undefined subdomains ([#8060](https://github.com/dynamic-labs/dynamic-auth/issues/8060)) ([ec7ca3d](https://github.com/dynamic-labs/dynamic-auth/commit/ec7ca3d1284422f54f3a1275e1983d50912bcc34))
8
+ * ensure project settings is present on is-cookie-enabled ([#8057](https://github.com/dynamic-labs/dynamic-auth/issues/8057)) ([81c6495](https://github.com/dynamic-labs/dynamic-auth/commit/81c64957031633c00c9e5ecaf304269605202abb))
9
+ * prevent user profile widget from automatically opening when linking a new wallet ([#8020](https://github.com/dynamic-labs/dynamic-auth/issues/8020)) ([4f05ac9](https://github.com/dynamic-labs/dynamic-auth/commit/4f05ac9fdc5a2fc415567dff1b33ddffd0478804))
10
+ * project settings loading and cookie setting check ([#8056](https://github.com/dynamic-labs/dynamic-auth/issues/8056)) ([457a298](https://github.com/dynamic-labs/dynamic-auth/commit/457a298ff11387ca858f85fb19d6c421e02fcc88))
11
+
2
12
  ## [4.6.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.5.3...v4.6.0) (2025-02-10)
3
13
 
4
14
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.6.0";
6
+ var version = "4.6.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.6.0";
2
+ var version = "4.6.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.615",
21
+ "@dynamic-labs/sdk-api-core": "0.0.622",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.6.0",
24
- "@dynamic-labs/logger": "4.6.0",
25
- "@dynamic-labs/types": "4.6.0",
23
+ "@dynamic-labs/assert-package-version": "4.6.1",
24
+ "@dynamic-labs/logger": "4.6.1",
25
+ "@dynamic-labs/types": "4.6.1",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ /**
7
+ * Type guard assertion function that throws an error if the condition is false.
8
+ * @param value The condition to check
9
+ * @param message The error message to display if assertion fails
10
+ * @throws {Error} If the assertion condition is false
11
+ */
12
+ // eslint-disable-next-line prefer-arrow/prefer-arrow-functions
13
+ function assertDefined(value, message) {
14
+ if (!value) {
15
+ throw new Error(message);
16
+ }
17
+ }
18
+
19
+ exports.assertDefined = assertDefined;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Type guard assertion function that throws an error if the condition is false.
3
+ * @param value The condition to check
4
+ * @param message The error message to display if assertion fails
5
+ * @throws {Error} If the assertion condition is false
6
+ */
7
+ export declare function assertDefined<T>(value: T | null | undefined, message: string): asserts value is T;
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ /**
3
+ * Type guard assertion function that throws an error if the condition is false.
4
+ * @param value The condition to check
5
+ * @param message The error message to display if assertion fails
6
+ * @throws {Error} If the assertion condition is false
7
+ */
8
+ // eslint-disable-next-line prefer-arrow/prefer-arrow-functions
9
+ function assertDefined(value, message) {
10
+ if (!value) {
11
+ throw new Error(message);
12
+ }
13
+ }
14
+
15
+ export { assertDefined };
@@ -0,0 +1 @@
1
+ export { assertDefined } from './assertDefined';
package/src/index.cjs CHANGED
@@ -78,6 +78,7 @@ var encryptMessage = require('./encryption/encryptMessage/encryptMessage.cjs');
78
78
  var isEncryptedMessage = require('./encryption/isEncryptedMessage/isEncryptedMessage.cjs');
79
79
  var uint8ArrayToBase64 = require('./uint8ArrayToBase64/uint8ArrayToBase64.cjs');
80
80
  var formatVersion = require('./formatVersion/formatVersion.cjs');
81
+ var assertDefined = require('./assertDefined/assertDefined.cjs');
81
82
  var cloneObjectWithOverrides = require('./cloneObjectWithOverrides/cloneObjectWithOverrides.cjs');
82
83
  var get = require('./get/get.cjs');
83
84
  var hexToString = require('./hexToString/hexToString.cjs');
@@ -192,6 +193,7 @@ exports.isEncryptedMessage = isEncryptedMessage.isEncryptedMessage;
192
193
  exports.uint8ArrayFromBase64 = uint8ArrayToBase64.uint8ArrayFromBase64;
193
194
  exports.uint8ArrayToBase64 = uint8ArrayToBase64.uint8ArrayToBase64;
194
195
  exports.formatVersion = formatVersion.formatVersion;
196
+ exports.assertDefined = assertDefined.assertDefined;
195
197
  exports.cloneObjectWithOverrides = cloneObjectWithOverrides.cloneObjectWithOverrides;
196
198
  exports.get = get.get;
197
199
  exports.hexToString = hexToString.hexToString;
package/src/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export * from './wrapMethodWithCallback';
28
28
  export * from './encryption';
29
29
  export * from './uint8ArrayToBase64';
30
30
  export * from './formatVersion';
31
+ export * from './assertDefined';
31
32
  export { cloneObjectWithOverrides } from './cloneObjectWithOverrides';
32
33
  export { get } from './get';
33
34
  export { hexToString } from './hexToString';
package/src/index.js CHANGED
@@ -74,6 +74,7 @@ export { encryptMessage } from './encryption/encryptMessage/encryptMessage.js';
74
74
  export { isEncryptedMessage } from './encryption/isEncryptedMessage/isEncryptedMessage.js';
75
75
  export { uint8ArrayFromBase64, uint8ArrayToBase64 } from './uint8ArrayToBase64/uint8ArrayToBase64.js';
76
76
  export { formatVersion } from './formatVersion/formatVersion.js';
77
+ export { assertDefined } from './assertDefined/assertDefined.js';
77
78
  export { cloneObjectWithOverrides } from './cloneObjectWithOverrides/cloneObjectWithOverrides.js';
78
79
  export { get } from './get/get.js';
79
80
  export { hexToString } from './hexToString/hexToString.js';