@sprucelabs/heartwood-view-controllers 112.2.0 → 112.2.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/build/auth/Authenticator.d.ts +2 -7
- package/build/esm/auth/Authenticator.d.ts +2 -7
- package/build/esm/tests/StubStorage.d.ts +1 -1
- package/build/esm/types/heartwood.types.d.ts +5 -0
- package/build/tests/StubStorage.d.ts +1 -1
- package/build/types/heartwood.types.d.ts +5 -0
- package/package.json +13 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import { Person } from '@sprucelabs/spruce-core-schemas';
|
|
3
|
-
import { Authenticator, AuthenticatorEventName, AuthenticatorEventPayloads } from '../types/heartwood.types';
|
|
3
|
+
import { Authenticator, AuthenticatorEventName, AuthenticatorEventPayloads, Storage } from '../types/heartwood.types';
|
|
4
4
|
export default class AuthenticatorImpl implements Authenticator {
|
|
5
5
|
static Class?: new (storage: Storage) => Authenticator;
|
|
6
6
|
private static instance;
|
|
7
7
|
private static storage;
|
|
8
8
|
protected eventEmitter: EventEmitter;
|
|
9
9
|
protected storage: Storage;
|
|
10
|
-
|
|
10
|
+
protected constructor(storage: Storage);
|
|
11
11
|
static getInstance(): Authenticator;
|
|
12
12
|
static reset(): void;
|
|
13
13
|
static setStorage(storage: Storage | null): void;
|
|
@@ -18,8 +18,3 @@ export default class AuthenticatorImpl implements Authenticator {
|
|
|
18
18
|
clearSession(): void;
|
|
19
19
|
addEventListener<N extends AuthenticatorEventName>(name: N, cb: AuthenticatorEventPayloads[N]): void;
|
|
20
20
|
}
|
|
21
|
-
export interface Storage {
|
|
22
|
-
removeItem(key: string): void;
|
|
23
|
-
setItem(key: string, value: string): void;
|
|
24
|
-
getItem(key: string): string | null;
|
|
25
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import { Person } from '@sprucelabs/spruce-core-schemas';
|
|
3
|
-
import { Authenticator, AuthenticatorEventName, AuthenticatorEventPayloads } from '../types/heartwood.types';
|
|
3
|
+
import { Authenticator, AuthenticatorEventName, AuthenticatorEventPayloads, Storage } from '../types/heartwood.types';
|
|
4
4
|
export default class AuthenticatorImpl implements Authenticator {
|
|
5
5
|
static Class?: new (storage: Storage) => Authenticator;
|
|
6
6
|
private static instance;
|
|
7
7
|
private static storage;
|
|
8
8
|
protected eventEmitter: EventEmitter;
|
|
9
9
|
protected storage: Storage;
|
|
10
|
-
|
|
10
|
+
protected constructor(storage: Storage);
|
|
11
11
|
static getInstance(): Authenticator;
|
|
12
12
|
static reset(): void;
|
|
13
13
|
static setStorage(storage: Storage | null): void;
|
|
@@ -18,8 +18,3 @@ export default class AuthenticatorImpl implements Authenticator {
|
|
|
18
18
|
clearSession(): void;
|
|
19
19
|
addEventListener<N extends AuthenticatorEventName>(name: N, cb: AuthenticatorEventPayloads[N]): void;
|
|
20
20
|
}
|
|
21
|
-
export interface Storage {
|
|
22
|
-
removeItem(key: string): void;
|
|
23
|
-
setItem(key: string, value: string): void;
|
|
24
|
-
getItem(key: string): string | null;
|
|
25
|
-
}
|
|
@@ -57,6 +57,11 @@ export interface AuthenticatorEventPayloads {
|
|
|
57
57
|
'did-logout': DidLogoutPayload;
|
|
58
58
|
}
|
|
59
59
|
export type AuthenticatorEventName = keyof AuthenticatorEventPayloads;
|
|
60
|
+
export interface Storage {
|
|
61
|
+
removeItem(key: string): void;
|
|
62
|
+
setItem(key: string, value: string): void;
|
|
63
|
+
getItem(key: string): string | null;
|
|
64
|
+
}
|
|
60
65
|
export interface Authenticator {
|
|
61
66
|
getPerson(): Person | null;
|
|
62
67
|
setSessionToken(token: string, person: Person): void;
|
|
@@ -57,6 +57,11 @@ export interface AuthenticatorEventPayloads {
|
|
|
57
57
|
'did-logout': DidLogoutPayload;
|
|
58
58
|
}
|
|
59
59
|
export type AuthenticatorEventName = keyof AuthenticatorEventPayloads;
|
|
60
|
+
export interface Storage {
|
|
61
|
+
removeItem(key: string): void;
|
|
62
|
+
setItem(key: string, value: string): void;
|
|
63
|
+
getItem(key: string): string | null;
|
|
64
|
+
}
|
|
60
65
|
export interface Authenticator {
|
|
61
66
|
getPerson(): Person | null;
|
|
62
67
|
setSessionToken(token: string, person: Person): void;
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"description": "All the power of Heartwood in one, convenient package.",
|
|
16
|
-
"version": "112.2.
|
|
16
|
+
"version": "112.2.2",
|
|
17
17
|
"skill": {
|
|
18
18
|
"namespace": "HeartwoodViewControllers",
|
|
19
19
|
"commandOverrides": {
|
|
@@ -78,15 +78,15 @@
|
|
|
78
78
|
"@babel/preset-env": "^7.26.0",
|
|
79
79
|
"@babel/preset-typescript": "^7.26.0",
|
|
80
80
|
"@sprucelabs/calendar-utils": "^42.0.530",
|
|
81
|
-
"@sprucelabs/error": "^6.0.
|
|
82
|
-
"@sprucelabs/globby": "^2.0.
|
|
83
|
-
"@sprucelabs/mercury-core-events": "^25.0.
|
|
84
|
-
"@sprucelabs/mercury-types": "^47.0.
|
|
85
|
-
"@sprucelabs/schema": "^30.0.
|
|
86
|
-
"@sprucelabs/spruce-core-schemas": "^40.1.
|
|
87
|
-
"@sprucelabs/spruce-event-utils": "^40.1.
|
|
88
|
-
"@sprucelabs/spruce-skill-utils": "^31.0.
|
|
89
|
-
"@sprucelabs/test-utils": "^5.1.
|
|
81
|
+
"@sprucelabs/error": "^6.0.553",
|
|
82
|
+
"@sprucelabs/globby": "^2.0.501",
|
|
83
|
+
"@sprucelabs/mercury-core-events": "^25.0.81",
|
|
84
|
+
"@sprucelabs/mercury-types": "^47.0.626",
|
|
85
|
+
"@sprucelabs/schema": "^30.0.586",
|
|
86
|
+
"@sprucelabs/spruce-core-schemas": "^40.1.572",
|
|
87
|
+
"@sprucelabs/spruce-event-utils": "^40.1.351",
|
|
88
|
+
"@sprucelabs/spruce-skill-utils": "^31.0.651",
|
|
89
|
+
"@sprucelabs/test-utils": "^5.1.522",
|
|
90
90
|
"@swc/core": "1.2.103",
|
|
91
91
|
"babel-loader": "^9.2.1",
|
|
92
92
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"webpack": "5.70.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
|
103
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
|
102
|
+
"@sprucelabs/esm-postbuild": "^6.0.531",
|
|
103
|
+
"@sprucelabs/jest-json-reporter": "^8.0.555",
|
|
104
104
|
"@sprucelabs/mercury-client": "^42.0.634",
|
|
105
105
|
"@sprucelabs/mercury-event-emitter": "^42.0.634",
|
|
106
|
-
"@sprucelabs/resolve-path-aliases": "^2.0.
|
|
106
|
+
"@sprucelabs/resolve-path-aliases": "^2.0.522",
|
|
107
107
|
"@sprucelabs/semantic-release": "^5.0.2",
|
|
108
108
|
"@sprucelabs/test": "^9.0.63",
|
|
109
109
|
"@types/node": "^22.10.1",
|