@logto/node 2.1.1 → 2.1.2

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 CHANGED
@@ -6,8 +6,6 @@
6
6
 
7
7
  The Logto Node.js SDK written in TypeScript. Check out our [docs](https://docs.logto.io/sdk/JavaScript/node/) for more information.
8
8
 
9
- We also provide [文档](https://docs.logto.io/zh-cn/sdk/JavaScript/node/) in Simplified Chinese.
10
-
11
9
  ## Installation
12
10
 
13
11
  ### Using npm
@@ -32,4 +32,8 @@ class LogtoClient extends client.default {
32
32
  }
33
33
  }
34
34
 
35
+ Object.defineProperty(exports, 'PersistKey', {
36
+ enumerable: true,
37
+ get: function () { return BaseClient.PersistKey; }
38
+ });
35
39
  exports.default = LogtoClient;
@@ -1,5 +1,6 @@
1
1
  import type { LogtoConfig, ClientAdapter } from '@logto/client';
2
2
  import BaseClient from '../src/client.js';
3
+ export { PersistKey } from '@logto/client';
3
4
  export default class LogtoClient extends BaseClient {
4
5
  constructor(config: LogtoConfig, adapter: Pick<ClientAdapter, 'navigate' | 'storage'>);
5
6
  }
package/lib/edge/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { createRequester } from '@logto/client';
2
+ export { PersistKey } from '@logto/client';
2
3
  import LogtoNodeBaseClient from '../src/client.js';
3
4
  import { generateCodeChallenge, generateCodeVerifier, generateState } from './generators.js';
4
5
 
@@ -2,7 +2,7 @@ import BaseClient from '@logto/client';
2
2
  import type { GetContextParameters, LogtoContext } from './types.js';
3
3
  export type { LogtoContext, GetContextParameters } from './types.js';
4
4
  export type { IdTokenClaims, LogtoErrorCode, LogtoConfig, LogtoClientErrorCode, Storage, StorageKey, InteractionMode, } from '@logto/client';
5
- export { LogtoError, OidcError, Prompt, LogtoRequestError, LogtoClientError, ReservedScope, UserScope, } from '@logto/client';
5
+ export { LogtoError, LogtoRequestError, LogtoClientError, OidcError, Prompt, ReservedScope, UserScope, } from '@logto/client';
6
6
  export default class LogtoNodeBaseClient extends BaseClient {
7
7
  getContext: ({ getAccessToken, resource, fetchUserInfo, }?: GetContextParameters) => Promise<LogtoContext>;
8
8
  }
package/lib/src/index.cjs CHANGED
@@ -52,6 +52,10 @@ Object.defineProperty(exports, 'OidcError', {
52
52
  enumerable: true,
53
53
  get: function () { return BaseClient.OidcError; }
54
54
  });
55
+ Object.defineProperty(exports, 'PersistKey', {
56
+ enumerable: true,
57
+ get: function () { return BaseClient.PersistKey; }
58
+ });
55
59
  Object.defineProperty(exports, 'Prompt', {
56
60
  enumerable: true,
57
61
  get: function () { return BaseClient.Prompt; }
@@ -2,7 +2,7 @@ import type { LogtoConfig, ClientAdapter } from '@logto/client';
2
2
  import BaseClient from './client.js';
3
3
  export type { LogtoContext, GetContextParameters } from './types.js';
4
4
  export type { IdTokenClaims, LogtoErrorCode, LogtoConfig, LogtoClientErrorCode, Storage, StorageKey, InteractionMode, } from '@logto/client';
5
- export { LogtoError, OidcError, Prompt, LogtoRequestError, LogtoClientError, ReservedScope, UserScope, } from '@logto/client';
5
+ export { LogtoError, LogtoRequestError, LogtoClientError, OidcError, Prompt, ReservedScope, UserScope, PersistKey, } from '@logto/client';
6
6
  export default class LogtoClient extends BaseClient {
7
7
  constructor(config: LogtoConfig, adapter: Pick<ClientAdapter, 'navigate' | 'storage'>);
8
8
  }
package/lib/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRequester } from '@logto/client';
2
- export { LogtoClientError, LogtoError, LogtoRequestError, OidcError, Prompt, ReservedScope, UserScope } from '@logto/client';
2
+ export { LogtoClientError, LogtoError, LogtoRequestError, OidcError, PersistKey, Prompt, ReservedScope, UserScope } from '@logto/client';
3
3
  import fetch from 'node-fetch';
4
4
  import LogtoNodeBaseClient from './client.js';
5
5
  import { generateCodeChallenge, generateCodeVerifier, generateState } from './utils/generators.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/node",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "main": "./lib/src/index.cjs",
6
6
  "module": "./lib/src/index.js",
@@ -27,24 +27,24 @@
27
27
  "directory": "packages/node"
28
28
  },
29
29
  "dependencies": {
30
- "@logto/client": "^2.1.0",
30
+ "@logto/client": "^2.2.3",
31
31
  "@silverhand/essentials": "^2.6.2",
32
32
  "js-base64": "^3.7.4",
33
33
  "node-fetch": "^2.6.7"
34
34
  },
35
35
  "devDependencies": {
36
- "@silverhand/eslint-config": "^3.0.1",
37
- "@silverhand/ts-config": "^3.0.0",
36
+ "@silverhand/eslint-config": "^4.0.1",
37
+ "@silverhand/ts-config": "^4.0.0",
38
38
  "@swc/core": "^1.3.7",
39
39
  "@swc/jest": "^0.2.24",
40
40
  "@types/jest": "^29.5.0",
41
41
  "@types/node": "^18.15.11",
42
- "eslint": "^8.38.0",
42
+ "eslint": "^8.44.0",
43
43
  "jest": "^29.5.0",
44
- "jest-location-mock": "^1.0.9",
44
+ "jest-location-mock": "^2.0.0",
45
45
  "jest-matcher-specific-error": "^1.0.0",
46
- "lint-staged": "^13.0.0",
47
- "prettier": "^2.8.7",
46
+ "lint-staged": "^14.0.0",
47
+ "prettier": "^3.0.0",
48
48
  "typescript": "^5.0.0"
49
49
  },
50
50
  "eslintConfig": {