@logto/browser 2.1.1 → 2.2.0
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/README.md +0 -2
- package/lib/index.cjs +20 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
The Logto JavaScript Browser SDK written in TypeScript. Check out our [docs](https://docs.logto.io/JavaScript/browser/) for more information.
|
|
7
7
|
|
|
8
|
-
We also provide [文档](https://docs.logto.io/zh-cn/sdk/JavaScript/browser/) in Simplified Chinese.
|
|
9
|
-
|
|
10
8
|
## Installation
|
|
11
9
|
|
|
12
10
|
### Using npm
|
package/lib/index.cjs
CHANGED
|
@@ -55,10 +55,18 @@ Object.defineProperty(exports, 'OidcError', {
|
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () { return BaseClient.OidcError; }
|
|
57
57
|
});
|
|
58
|
+
Object.defineProperty(exports, 'PersistKey', {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return BaseClient.PersistKey; }
|
|
61
|
+
});
|
|
58
62
|
Object.defineProperty(exports, 'Prompt', {
|
|
59
63
|
enumerable: true,
|
|
60
64
|
get: function () { return BaseClient.Prompt; }
|
|
61
65
|
});
|
|
66
|
+
Object.defineProperty(exports, 'ReservedResource', {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return BaseClient.ReservedResource; }
|
|
69
|
+
});
|
|
62
70
|
Object.defineProperty(exports, 'ReservedScope', {
|
|
63
71
|
enumerable: true,
|
|
64
72
|
get: function () { return BaseClient.ReservedScope; }
|
|
@@ -67,10 +75,22 @@ Object.defineProperty(exports, 'UserScope', {
|
|
|
67
75
|
enumerable: true,
|
|
68
76
|
get: function () { return BaseClient.UserScope; }
|
|
69
77
|
});
|
|
78
|
+
Object.defineProperty(exports, 'buildOrganizationUrn', {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () { return BaseClient.buildOrganizationUrn; }
|
|
81
|
+
});
|
|
70
82
|
Object.defineProperty(exports, 'createRequester', {
|
|
71
83
|
enumerable: true,
|
|
72
84
|
get: function () { return BaseClient.createRequester; }
|
|
73
85
|
});
|
|
86
|
+
Object.defineProperty(exports, 'getOrganizationIdFromUrn', {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return BaseClient.getOrganizationIdFromUrn; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, 'organizationUrnPrefix', {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return BaseClient.organizationUrnPrefix; }
|
|
93
|
+
});
|
|
74
94
|
exports.generateCodeChallenge = generators.generateCodeChallenge;
|
|
75
95
|
exports.generateCodeVerifier = generators.generateCodeVerifier;
|
|
76
96
|
exports.generateState = generators.generateState;
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import BaseClient from '@logto/client';
|
|
|
3
3
|
export { createRequester, default as BaseClient } from '@logto/client';
|
|
4
4
|
export { generateCodeChallenge, generateCodeVerifier, generateState } from './utils/generators.js';
|
|
5
5
|
export type { IdTokenClaims, LogtoErrorCode, LogtoConfig, LogtoClientErrorCode, UserInfoResponse, InteractionMode, ClientAdapter, } from '@logto/client';
|
|
6
|
-
export { LogtoError,
|
|
6
|
+
export { LogtoError, LogtoRequestError, LogtoClientError, OidcError, Prompt, ReservedScope, ReservedResource, UserScope, organizationUrnPrefix, buildOrganizationUrn, getOrganizationIdFromUrn, PersistKey, } from '@logto/client';
|
|
7
7
|
export default class LogtoClient extends BaseClient {
|
|
8
8
|
/**
|
|
9
9
|
* @param config The configuration object for the client.
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import BaseClient, { createRequester } from '@logto/client';
|
|
2
|
-
export { default as BaseClient, LogtoClientError, LogtoError, LogtoRequestError, OidcError, Prompt, ReservedScope, UserScope, createRequester } from '@logto/client';
|
|
2
|
+
export { default as BaseClient, LogtoClientError, LogtoError, LogtoRequestError, OidcError, PersistKey, Prompt, ReservedResource, ReservedScope, UserScope, buildOrganizationUrn, createRequester, getOrganizationIdFromUrn, organizationUrnPrefix } from '@logto/client';
|
|
3
3
|
import { conditional } from '@silverhand/essentials';
|
|
4
4
|
import { CacheStorage } from './cache.js';
|
|
5
5
|
import { BrowserStorage } from './storage.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/browser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"directory": "packages/browser"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@logto/client": "^2.
|
|
24
|
+
"@logto/client": "^2.3.0",
|
|
25
25
|
"@silverhand/essentials": "^2.6.2",
|
|
26
26
|
"js-base64": "^3.7.4"
|
|
27
27
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"jest": "^29.5.0",
|
|
36
36
|
"jest-environment-jsdom": "^29.5.0",
|
|
37
37
|
"jest-matcher-specific-error": "^1.0.0",
|
|
38
|
-
"lint-staged": "^
|
|
38
|
+
"lint-staged": "^15.0.0",
|
|
39
39
|
"prettier": "^3.0.0",
|
|
40
40
|
"text-encoder": "^0.0.4",
|
|
41
41
|
"typescript": "^5.0.0"
|