@dynamic-labs/utils 3.0.0-alpha.47 → 3.0.0-alpha.48
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 +9 -0
- package/package.json +3 -3
- package/src/services/PlatformService/PlatformService.cjs +25 -1
- package/src/services/PlatformService/PlatformService.d.ts +23 -0
- package/src/services/PlatformService/PlatformService.js +25 -1
- package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.cjs +1 -0
- package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.js +1 -0
- package/src/services/PlatformService/types.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.48](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.47...v3.0.0-alpha.48) (2024-08-21)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* collect user data to work when no wallet is selected ([#6670](https://github.com/dynamic-labs/DynamicAuth/issues/6670)) ([b86aae8](https://github.com/dynamic-labs/DynamicAuth/commit/b86aae8e7ceb35793f792941a34cabd19b9e65d4))
|
|
8
|
+
* disable cookie when running on native mobile ([#6668](https://github.com/dynamic-labs/DynamicAuth/issues/6668)) ([e52a3d9](https://github.com/dynamic-labs/DynamicAuth/commit/e52a3d94a9028e36525be2e80a9f0916efad4320))
|
|
9
|
+
* prevent external auth blocking pending user requirements views ([#6669](https://github.com/dynamic-labs/DynamicAuth/issues/6669)) ([848356c](https://github.com/dynamic-labs/DynamicAuth/commit/848356c57e730a8516c642da84274a236e026f40))
|
|
10
|
+
|
|
2
11
|
## [3.0.0-alpha.47](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.46...v3.0.0-alpha.47) (2024-08-21)
|
|
3
12
|
|
|
4
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.48",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@dynamic-labs/sdk-api-core": "0.0.519",
|
|
30
30
|
"tldts": "6.0.16",
|
|
31
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
31
|
+
"@dynamic-labs/logger": "3.0.0-alpha.48",
|
|
32
|
+
"@dynamic-labs/types": "3.0.0-alpha.48",
|
|
33
33
|
"buffer": "6.0.3",
|
|
34
34
|
"stream": "0.0.2"
|
|
35
35
|
},
|
|
@@ -17,19 +17,43 @@ class PlatformService {
|
|
|
17
17
|
static set implementation(implementation) {
|
|
18
18
|
_tslib.__classPrivateFieldSet(_a, _a, implementation, "f", _PlatformService_implementation);
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Indicates if the current platform is a native mobile app
|
|
22
|
+
* like react-native or flutter.
|
|
23
|
+
*/
|
|
24
|
+
static get isNativeMobile() {
|
|
25
|
+
return _a.implementation.isNativeMobile;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Gets the origin of the current location.
|
|
29
|
+
*
|
|
30
|
+
* @example window.location.origin
|
|
31
|
+
*/
|
|
20
32
|
static get getOrigin() {
|
|
21
33
|
return _a.implementation.getOrigin;
|
|
22
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets the host of the current location.
|
|
37
|
+
*
|
|
38
|
+
* @example window.location.host
|
|
39
|
+
*/
|
|
23
40
|
static get getHost() {
|
|
24
41
|
return _a.implementation.getHost;
|
|
25
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets the hostname of the current location.
|
|
45
|
+
*
|
|
46
|
+
* @example window.location.hostname
|
|
47
|
+
*/
|
|
26
48
|
static get getHostname() {
|
|
27
49
|
return _a.implementation.getHostname;
|
|
28
50
|
}
|
|
29
51
|
static get getTLD() {
|
|
30
52
|
return _a.implementation.getTLD;
|
|
31
53
|
}
|
|
32
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Opens a URL. If possible, should avoid new windows.
|
|
56
|
+
*/
|
|
33
57
|
static get openURL() {
|
|
34
58
|
return _a.implementation.openURL;
|
|
35
59
|
}
|
|
@@ -3,9 +3,32 @@ export declare class PlatformService {
|
|
|
3
3
|
#private;
|
|
4
4
|
static get implementation(): IPlatformService;
|
|
5
5
|
static set implementation(implementation: IPlatformService);
|
|
6
|
+
/**
|
|
7
|
+
* Indicates if the current platform is a native mobile app
|
|
8
|
+
* like react-native or flutter.
|
|
9
|
+
*/
|
|
10
|
+
static get isNativeMobile(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Gets the origin of the current location.
|
|
13
|
+
*
|
|
14
|
+
* @example window.location.origin
|
|
15
|
+
*/
|
|
6
16
|
static get getOrigin(): () => string;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the host of the current location.
|
|
19
|
+
*
|
|
20
|
+
* @example window.location.host
|
|
21
|
+
*/
|
|
7
22
|
static get getHost(): () => string;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the hostname of the current location.
|
|
25
|
+
*
|
|
26
|
+
* @example window.location.hostname
|
|
27
|
+
*/
|
|
8
28
|
static get getHostname(): () => string;
|
|
9
29
|
static get getTLD(): () => string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Opens a URL. If possible, should avoid new windows.
|
|
32
|
+
*/
|
|
10
33
|
static get openURL(): (url: string) => Promise<void>;
|
|
11
34
|
}
|
|
@@ -13,19 +13,43 @@ class PlatformService {
|
|
|
13
13
|
static set implementation(implementation) {
|
|
14
14
|
__classPrivateFieldSet(_a, _a, implementation, "f", _PlatformService_implementation);
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Indicates if the current platform is a native mobile app
|
|
18
|
+
* like react-native or flutter.
|
|
19
|
+
*/
|
|
20
|
+
static get isNativeMobile() {
|
|
21
|
+
return _a.implementation.isNativeMobile;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Gets the origin of the current location.
|
|
25
|
+
*
|
|
26
|
+
* @example window.location.origin
|
|
27
|
+
*/
|
|
16
28
|
static get getOrigin() {
|
|
17
29
|
return _a.implementation.getOrigin;
|
|
18
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets the host of the current location.
|
|
33
|
+
*
|
|
34
|
+
* @example window.location.host
|
|
35
|
+
*/
|
|
19
36
|
static get getHost() {
|
|
20
37
|
return _a.implementation.getHost;
|
|
21
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets the hostname of the current location.
|
|
41
|
+
*
|
|
42
|
+
* @example window.location.hostname
|
|
43
|
+
*/
|
|
22
44
|
static get getHostname() {
|
|
23
45
|
return _a.implementation.getHostname;
|
|
24
46
|
}
|
|
25
47
|
static get getTLD() {
|
|
26
48
|
return _a.implementation.getTLD;
|
|
27
49
|
}
|
|
28
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Opens a URL. If possible, should avoid new windows.
|
|
52
|
+
*/
|
|
29
53
|
static get openURL() {
|
|
30
54
|
return _a.implementation.openURL;
|
|
31
55
|
}
|