@logto/remix 2.0.1 → 2.1.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/lib/framework/mocks.d.ts
CHANGED
|
@@ -6,17 +6,17 @@ export declare const getContext: jest.Mock<Promise<{
|
|
|
6
6
|
}>, []>;
|
|
7
7
|
export declare const storage: import("../infrastructure/logto/create-storage.js").LogtoStorage;
|
|
8
8
|
export declare const handleSignIn: jest.Mock<Promise<{
|
|
9
|
-
session: Session
|
|
9
|
+
session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
|
10
10
|
navigateToUrl: string;
|
|
11
11
|
}>, []>;
|
|
12
12
|
export declare const handleSignInCallback: jest.Mock<Promise<{
|
|
13
|
-
session: Session
|
|
13
|
+
session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
|
14
14
|
}>, []>;
|
|
15
15
|
export declare const handleSignOut: jest.Mock<Promise<{
|
|
16
16
|
navigateToUrl: string;
|
|
17
17
|
}>, []>;
|
|
18
18
|
export declare const createLogtoAdapter: CreateLogtoAdapter;
|
|
19
|
-
export declare const commitSession: jest.Mock<Promise<string>, [session: Session]>;
|
|
19
|
+
export declare const commitSession: jest.Mock<Promise<string>, [session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>]>;
|
|
20
20
|
export declare const destroySession: jest.Mock<any, any>;
|
|
21
21
|
export declare const getSession: jest.Mock<any, any>;
|
|
22
22
|
export declare const sessionStorage: SessionStorage;
|
package/lib/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var index$2 = require('./infrastructure/logto/index.cjs');
|
|
4
4
|
var index$1 = require('./useCases/getContext/index.cjs');
|
|
5
5
|
var index = require('./useCases/handleAuthRoutes/index.cjs');
|
|
6
|
+
var LogtoClient = require('@logto/node');
|
|
6
7
|
|
|
7
8
|
const makeLogtoRemix = (config, deps) => {
|
|
8
9
|
const { sessionStorage } = deps;
|
|
@@ -21,4 +22,48 @@ const makeLogtoRemix = (config, deps) => {
|
|
|
21
22
|
});
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
Object.defineProperty(exports, 'LogtoClientError', {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return LogtoClient.LogtoClientError; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, 'LogtoError', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return LogtoClient.LogtoError; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, 'LogtoRequestError', {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return LogtoClient.LogtoRequestError; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, 'OidcError', {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return LogtoClient.OidcError; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, 'PersistKey', {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return LogtoClient.PersistKey; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, 'Prompt', {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return LogtoClient.Prompt; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, 'ReservedScope', {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return LogtoClient.ReservedScope; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, 'UserScope', {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return LogtoClient.UserScope; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, 'buildOrganizationUrn', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return LogtoClient.buildOrganizationUrn; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, 'getOrganizationIdFromUrn', {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return LogtoClient.getOrganizationIdFromUrn; }
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, 'organizationUrnPrefix', {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return LogtoClient.organizationUrnPrefix; }
|
|
68
|
+
});
|
|
24
69
|
exports.makeLogtoRemix = makeLogtoRemix;
|
package/lib/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export declare const makeLogtoRemix: (config: Config, deps: {
|
|
|
23
23
|
getContext: (dto: GetContextParameters) => (request: Request) => Promise<import("@logto/node").LogtoContext>;
|
|
24
24
|
}>;
|
|
25
25
|
export { type LogtoContext } from '@logto/node';
|
|
26
|
+
export { LogtoError, LogtoRequestError, LogtoClientError, OidcError, Prompt, ReservedScope, UserScope, organizationUrnPrefix, buildOrganizationUrn, getOrganizationIdFromUrn, PersistKey, } from '@logto/node';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { makeLogtoAdapter } from './infrastructure/logto/index.js';
|
|
2
2
|
import { makeGetContext } from './useCases/getContext/index.js';
|
|
3
3
|
import { makeHandleAuthRoutes } from './useCases/handleAuthRoutes/index.js';
|
|
4
|
+
export { LogtoClientError, LogtoError, LogtoRequestError, OidcError, PersistKey, Prompt, ReservedScope, UserScope, buildOrganizationUrn, getOrganizationIdFromUrn, organizationUrnPrefix } from '@logto/node';
|
|
4
5
|
|
|
5
6
|
const makeLogtoRemix = (config, deps) => {
|
|
6
7
|
const { sessionStorage } = deps;
|
|
@@ -3,7 +3,7 @@ import type { Session } from '@remix-run/node';
|
|
|
3
3
|
declare class LogtoStorage implements Storage<StorageKey> {
|
|
4
4
|
private readonly properties;
|
|
5
5
|
static readonly fromSession: (session: Session) => LogtoStorage;
|
|
6
|
-
readonly session: Session
|
|
6
|
+
readonly session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
|
7
7
|
private constructor();
|
|
8
8
|
readonly setItem: (key: StorageKey, value: string) => Promise<void>;
|
|
9
9
|
readonly getItem: (key: StorageKey) => Promise<string | null>;
|
|
@@ -5,13 +5,13 @@ export declare const makeLogtoAdapter: (config: MakeLogtoAdapterConfiguration) =
|
|
|
5
5
|
handleSignIn: (request: {
|
|
6
6
|
readonly redirectUri: string;
|
|
7
7
|
}) => Promise<{
|
|
8
|
-
readonly session: Session
|
|
8
|
+
readonly session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
|
9
9
|
readonly navigateToUrl: string;
|
|
10
10
|
}>;
|
|
11
11
|
handleSignInCallback: (request: {
|
|
12
12
|
callbackUri: string;
|
|
13
13
|
}) => Promise<{
|
|
14
|
-
readonly session: Session
|
|
14
|
+
readonly session: Session<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
|
15
15
|
}>;
|
|
16
16
|
handleSignOut: (request: {
|
|
17
17
|
readonly redirectUri: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/remix",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -21,26 +21,26 @@
|
|
|
21
21
|
"directory": "packages/remix"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@logto/node": "^2.
|
|
24
|
+
"@logto/node": "^2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@commitlint/cli": "^
|
|
28
|
-
"@commitlint/config-conventional": "^
|
|
29
|
-
"@remix-run/node": "^
|
|
30
|
-
"@silverhand/eslint-config": "^
|
|
31
|
-
"@silverhand/ts-config": "^
|
|
32
|
-
"@silverhand/ts-config-react": "^
|
|
27
|
+
"@commitlint/cli": "^18.0.0",
|
|
28
|
+
"@commitlint/config-conventional": "^18.0.0",
|
|
29
|
+
"@remix-run/node": "^2.0.0",
|
|
30
|
+
"@silverhand/eslint-config": "^4.0.1",
|
|
31
|
+
"@silverhand/ts-config": "^4.0.0",
|
|
32
|
+
"@silverhand/ts-config-react": "^4.0.0",
|
|
33
33
|
"@swc/core": "^1.3.50",
|
|
34
34
|
"@swc/jest": "^0.2.24",
|
|
35
35
|
"@tsconfig/recommended": "^1.0.1",
|
|
36
36
|
"@types/jest": "^29.1.2",
|
|
37
37
|
"@types/node": "^18.8.3",
|
|
38
|
-
"eslint": "^8.
|
|
38
|
+
"eslint": "^8.44.0",
|
|
39
39
|
"jest": "^29.5.0",
|
|
40
|
-
"jest-location-mock": "^
|
|
40
|
+
"jest-location-mock": "^2.0.0",
|
|
41
41
|
"jest-matcher-specific-error": "^1.0.0",
|
|
42
|
-
"lint-staged": "^
|
|
43
|
-
"prettier": "^
|
|
42
|
+
"lint-staged": "^15.0.0",
|
|
43
|
+
"prettier": "^3.0.0",
|
|
44
44
|
"react": "^18.0.2",
|
|
45
45
|
"react-dom": "^18.0.2",
|
|
46
46
|
"typescript": "^5.0.0"
|