kiss-for-react 1.1.0 → 2.0.1
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 +699 -156
- package/lib/cjs/ClassPersistor.js +177 -112
- package/lib/cjs/Esserializer/DeserializationOptions.js +4 -4
- package/lib/cjs/Esserializer/SerializeOptions.js +4 -4
- package/lib/cjs/Esserializer/builtins.js +258 -0
- package/lib/cjs/Esserializer/constant.js +39 -131
- package/lib/cjs/Esserializer/deserializer.js +293 -313
- package/lib/cjs/Esserializer/general.js +91 -39
- package/lib/cjs/Esserializer/index.js +47 -43
- package/lib/cjs/Esserializer/serializer.js +168 -133
- package/lib/cjs/Evt.js +132 -0
- package/lib/cjs/Hooks.js +1474 -969
- package/lib/cjs/KissAction.js +4762 -1333
- package/lib/cjs/LoadPages.js +336 -0
- package/lib/cjs/Persistor.js +189 -120
- package/lib/cjs/ProcessPersistence.js +579 -262
- package/lib/cjs/Store.js +4342 -1534
- package/lib/cjs/StoreException.js +162 -75
- package/lib/cjs/StoreProvider.js +166 -0
- package/lib/cjs/UserException.js +212 -218
- package/lib/cjs/Wait.js +309 -309
- package/lib/cjs/index.js +69 -42
- package/lib/cjs/server.js +54 -0
- package/lib/cjs/types/ClassPersistor.d.ts +143 -112
- package/lib/cjs/types/ClassPersistor.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/DeserializationOptions.d.ts +13 -6
- package/lib/cjs/types/Esserializer/DeserializationOptions.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/SerializeOptions.d.ts +11 -5
- package/lib/cjs/types/Esserializer/SerializeOptions.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/builtins.d.ts +36 -0
- package/lib/cjs/types/Esserializer/builtins.d.ts.map +1 -0
- package/lib/cjs/types/Esserializer/constant.d.ts +25 -49
- package/lib/cjs/types/Esserializer/constant.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/deserializer.d.ts +27 -17
- package/lib/cjs/types/Esserializer/deserializer.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/general.d.ts +28 -4
- package/lib/cjs/types/Esserializer/general.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/index.d.ts +33 -29
- package/lib/cjs/types/Esserializer/index.d.ts.map +1 -1
- package/lib/cjs/types/Esserializer/serializer.d.ts +14 -3
- package/lib/cjs/types/Esserializer/serializer.d.ts.map +1 -1
- package/lib/cjs/types/Evt.d.ts +124 -0
- package/lib/cjs/types/Evt.d.ts.map +1 -0
- package/lib/cjs/types/Hooks.d.ts +1174 -837
- package/lib/cjs/types/Hooks.d.ts.map +1 -1
- package/lib/cjs/types/KissAction.d.ts +5257 -1398
- package/lib/cjs/types/KissAction.d.ts.map +1 -1
- package/lib/cjs/types/LoadPages.d.ts +287 -0
- package/lib/cjs/types/LoadPages.d.ts.map +1 -0
- package/lib/cjs/types/Persistor.d.ts +187 -118
- package/lib/cjs/types/Persistor.d.ts.map +1 -1
- package/lib/cjs/types/ProcessPersistence.d.ts +197 -99
- package/lib/cjs/types/ProcessPersistence.d.ts.map +1 -1
- package/lib/cjs/types/Store.d.ts +2266 -1042
- package/lib/cjs/types/Store.d.ts.map +1 -1
- package/lib/cjs/types/StoreException.d.ts +97 -28
- package/lib/cjs/types/StoreException.d.ts.map +1 -1
- package/lib/cjs/types/StoreProvider.d.ts +95 -0
- package/lib/cjs/types/StoreProvider.d.ts.map +1 -0
- package/lib/cjs/types/UserException.d.ts +178 -169
- package/lib/cjs/types/UserException.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +12 -9
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/server.d.ts +12 -0
- package/lib/cjs/types/server.d.ts.map +1 -0
- package/lib/cjs/types/utils.d.ts +15 -1
- package/lib/cjs/types/utils.d.ts.map +1 -1
- package/lib/cjs/utils.js +45 -7
- package/lib/esm/ClassPersistor.mjs +177 -0
- package/lib/esm/Esserializer/{DeserializationOptions.js → DeserializationOptions.mjs} +3 -3
- package/lib/esm/Esserializer/{SerializeOptions.js → SerializeOptions.mjs} +3 -3
- package/lib/esm/Esserializer/builtins.mjs +254 -0
- package/lib/esm/Esserializer/constant.mjs +28 -0
- package/lib/esm/Esserializer/deserializer.mjs +288 -0
- package/lib/esm/Esserializer/general.mjs +81 -0
- package/lib/esm/Esserializer/index.mjs +43 -0
- package/lib/esm/Esserializer/serializer.mjs +164 -0
- package/lib/esm/Evt.mjs +151 -0
- package/lib/esm/Hooks.mjs +1448 -0
- package/lib/esm/KissAction.mjs +4816 -0
- package/lib/esm/LoadPages.mjs +340 -0
- package/lib/esm/Persistor.mjs +180 -0
- package/lib/esm/ProcessPersistence.mjs +581 -0
- package/lib/esm/Store.mjs +4464 -0
- package/lib/esm/StoreException.mjs +153 -0
- package/lib/esm/StoreProvider.mjs +162 -0
- package/lib/esm/{UserException.js → UserException.mjs} +240 -246
- package/lib/esm/{Wait.js → Wait.mjs} +309 -309
- package/lib/esm/index.mjs +12 -9
- package/lib/esm/server.mjs +23 -0
- package/lib/esm/types/ClassPersistor.d.ts +143 -112
- package/lib/esm/types/ClassPersistor.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/DeserializationOptions.d.ts +13 -6
- package/lib/esm/types/Esserializer/DeserializationOptions.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/SerializeOptions.d.ts +11 -5
- package/lib/esm/types/Esserializer/SerializeOptions.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/builtins.d.ts +36 -0
- package/lib/esm/types/Esserializer/builtins.d.ts.map +1 -0
- package/lib/esm/types/Esserializer/constant.d.ts +25 -49
- package/lib/esm/types/Esserializer/constant.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/deserializer.d.ts +27 -17
- package/lib/esm/types/Esserializer/deserializer.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/general.d.ts +28 -4
- package/lib/esm/types/Esserializer/general.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/index.d.ts +33 -29
- package/lib/esm/types/Esserializer/index.d.ts.map +1 -1
- package/lib/esm/types/Esserializer/serializer.d.ts +14 -3
- package/lib/esm/types/Esserializer/serializer.d.ts.map +1 -1
- package/lib/esm/types/Evt.d.ts +124 -0
- package/lib/esm/types/Evt.d.ts.map +1 -0
- package/lib/esm/types/Hooks.d.ts +1174 -837
- package/lib/esm/types/Hooks.d.ts.map +1 -1
- package/lib/esm/types/KissAction.d.ts +5257 -1398
- package/lib/esm/types/KissAction.d.ts.map +1 -1
- package/lib/esm/types/LoadPages.d.ts +287 -0
- package/lib/esm/types/LoadPages.d.ts.map +1 -0
- package/lib/esm/types/Persistor.d.ts +187 -118
- package/lib/esm/types/Persistor.d.ts.map +1 -1
- package/lib/esm/types/ProcessPersistence.d.ts +197 -99
- package/lib/esm/types/ProcessPersistence.d.ts.map +1 -1
- package/lib/esm/types/Store.d.ts +2266 -1042
- package/lib/esm/types/Store.d.ts.map +1 -1
- package/lib/esm/types/StoreException.d.ts +97 -28
- package/lib/esm/types/StoreException.d.ts.map +1 -1
- package/lib/esm/types/StoreProvider.d.ts +95 -0
- package/lib/esm/types/StoreProvider.d.ts.map +1 -0
- package/lib/esm/types/UserException.d.ts +178 -169
- package/lib/esm/types/UserException.d.ts.map +1 -1
- package/lib/esm/types/index.d.ts +12 -9
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/server.d.ts +12 -0
- package/lib/esm/types/server.d.ts.map +1 -0
- package/lib/esm/types/utils.d.ts +15 -1
- package/lib/esm/types/utils.d.ts.map +1 -1
- package/lib/esm/utils.mjs +38 -0
- package/package.json +54 -30
- package/lib/cjs/UnmodifiableSetView.js +0 -53
- package/lib/cjs/types/UnmodifiableSetView.d.ts +0 -24
- package/lib/cjs/types/UnmodifiableSetView.d.ts.map +0 -1
- package/lib/esm/ClassPersistor.js +0 -112
- package/lib/esm/Esserializer/constant.js +0 -81
- package/lib/esm/Esserializer/deserializer.js +0 -307
- package/lib/esm/Esserializer/general.js +0 -34
- package/lib/esm/Esserializer/index.js +0 -39
- package/lib/esm/Esserializer/serializer.js +0 -130
- package/lib/esm/Hooks.js +0 -955
- package/lib/esm/KissAction.js +0 -1459
- package/lib/esm/Persistor.js +0 -113
- package/lib/esm/ProcessPersistence.js +0 -262
- package/lib/esm/Store.js +0 -1606
- package/lib/esm/StoreException.js +0 -69
- package/lib/esm/UnmodifiableSetView.js +0 -50
- package/lib/esm/types/UnmodifiableSetView.d.ts +0 -24
- package/lib/esm/types/UnmodifiableSetView.d.ts.map +0 -1
- package/lib/esm/utils.js +0 -3
|
@@ -1,119 +1,188 @@
|
|
|
1
|
-
import { KissAction } from './KissAction';
|
|
2
|
-
/**
|
|
3
|
-
* Use it like this:
|
|
4
|
-
*
|
|
5
|
-
* ```ts
|
|
6
|
-
* const
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export declare abstract class Persistor<St> {
|
|
25
|
-
/**
|
|
26
|
-
* Function `readState` should read/load the saved state from the persistence.
|
|
27
|
-
* It will be called only once per run, when the app starts, during the store creation.
|
|
28
|
-
*
|
|
29
|
-
* - If the state is not yet saved (first app run), `readState` should return `null`.
|
|
30
|
-
*
|
|
31
|
-
* - If the saved state is valid, `readState` should return the saved state.
|
|
32
|
-
*
|
|
33
|
-
* - If the saved state is corrupted but can be fixed, `readState` should save the fixed
|
|
34
|
-
* state and then return it.
|
|
35
|
-
*
|
|
36
|
-
* - If the saved state is corrupted and cannot be fixed, or some other serious error occurs
|
|
37
|
-
* while reading the state, `readState` should thrown an error, with an appropriate error
|
|
38
|
-
* message.
|
|
39
|
-
*
|
|
40
|
-
* Note: If an error is thrown by `readState`, Kiss will log it with `Store.log()
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
1
|
+
import { KissAction } from './KissAction';
|
|
2
|
+
/**
|
|
3
|
+
* Use it like this:
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* const store = createStore<AppState>({
|
|
7
|
+
* initialState: AppState.initialState(),
|
|
8
|
+
* persistor: new MyPersistor(),
|
|
9
|
+
* });
|
|
10
|
+
*
|
|
11
|
+
* await store.ready();
|
|
12
|
+
* store.dispatch(new InitAppAction());
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Do NOT read the state yourself before creating the store. When the store is created,
|
|
16
|
+
* Kiss calls `readState` once. If there is a saved state, it replaces the initial state in the
|
|
17
|
+
* store. If there is none, Kiss calls `saveInitialState` with the initial state.
|
|
18
|
+
*
|
|
19
|
+
* Until the persisted state is loaded, the store state is the `initialState`, which your UI can
|
|
20
|
+
* use while loading. Changes made to the state before `store.ready()` resolves may be
|
|
21
|
+
* overwritten by the persisted state, so wait for it before dispatching the actions that
|
|
22
|
+
* start your app.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class Persistor<St> {
|
|
25
|
+
/**
|
|
26
|
+
* Function `readState` should read/load the saved state from the persistence.
|
|
27
|
+
* It will be called only once per run, when the app starts, during the store creation.
|
|
28
|
+
*
|
|
29
|
+
* - If the state is not yet saved (first app run), `readState` should return `null`.
|
|
30
|
+
*
|
|
31
|
+
* - If the saved state is valid, `readState` should return the saved state.
|
|
32
|
+
*
|
|
33
|
+
* - If the saved state is corrupted but can be fixed, `readState` should save the fixed
|
|
34
|
+
* state and then return it.
|
|
35
|
+
*
|
|
36
|
+
* - If the saved state is corrupted and cannot be fixed, or some other serious error occurs
|
|
37
|
+
* while reading the state, `readState` should thrown an error, with an appropriate error
|
|
38
|
+
* message.
|
|
39
|
+
*
|
|
40
|
+
* Note: If an error is thrown by `readState`, Kiss will log it with `Store.log()`, and give
|
|
41
|
+
* it to the store's `errorObserver` (with a `null` action). The saved state is then
|
|
42
|
+
* deleted, and the initial-state is saved instead.
|
|
43
|
+
*
|
|
44
|
+
* If you prefer to fix the problem yourself, but still let the user know about it, you
|
|
45
|
+
* can report an error with `addError` instead of throwing. For example:
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* async readState(): Promise<AppState | null> {
|
|
49
|
+
* try {
|
|
50
|
+
* return await this.read();
|
|
51
|
+
* } catch (error) {
|
|
52
|
+
* await this.deleteState();
|
|
53
|
+
* this.addError(new UserException('Could not read your data, so it was reset.'));
|
|
54
|
+
* return null;
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
abstract readState(): Promise<St | null>;
|
|
60
|
+
/**
|
|
61
|
+
* Function `deleteState` should delete/remove the saved state from the persistence.
|
|
62
|
+
*/
|
|
63
|
+
abstract deleteState(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Function `persistDifference` should save the new state to the persistence,
|
|
66
|
+
* and return a `Promise` that completes only after it is persisted.
|
|
67
|
+
*
|
|
68
|
+
* This new state is provided to the function as a parameter called `newState`.
|
|
69
|
+
* For simpler apps where your state is small, you can simply persist the whole `newState`
|
|
70
|
+
* every time.
|
|
71
|
+
*
|
|
72
|
+
* But for larger apps, you may compare it with the last persisted state, and persist only
|
|
73
|
+
* the difference between them. The last persisted state is provided to the function as a
|
|
74
|
+
* parameter called `lastPersistedState`. It may be `null` if there is no persisted state
|
|
75
|
+
* yet (first app run).
|
|
76
|
+
*
|
|
77
|
+
* If this method throws an error, it will first be processed by `wrapError`, and then
|
|
78
|
+
* given to the store's `errorObserver` (with a `null` action). If the resulting error is
|
|
79
|
+
* a `UserException`, it is shown to the user. If it's another error, it's thrown as an
|
|
80
|
+
* unhandled promise rejection. If it's `null`, it's swallowed. Also, `newState` will NOT be considered persisted,
|
|
81
|
+
* so the next call will receive the same `lastPersistedState`. Note the save is not retried
|
|
82
|
+
* by itself: it will be tried again the next time the state changes. Throwing synchronously,
|
|
83
|
+
* instead of returning a rejected `Promise`, is handled the same way.
|
|
84
|
+
*
|
|
85
|
+
* @param lastPersistedState The last state that was persisted. It may be null.
|
|
86
|
+
* @param newState The new state to be persisted.
|
|
87
|
+
*/
|
|
88
|
+
abstract persistDifference(lastPersistedState: St | null, newState: St): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Function `saveInitialState` should save the given `state` to the persistence,
|
|
91
|
+
* replacing any previous state that was saved.
|
|
92
|
+
*
|
|
93
|
+
* The default implementation calls `persistDifference` with a `null` last persisted state.
|
|
94
|
+
*
|
|
95
|
+
* If this method throws, nothing is considered persisted, so the next call to
|
|
96
|
+
* `persistDifference` will receive a `null` last persisted state.
|
|
97
|
+
*/
|
|
98
|
+
saveInitialState(state: St): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* The default throttle is 2 seconds (2000 milliseconds).
|
|
101
|
+
* Return `null` to turn off the throttle.
|
|
102
|
+
*/
|
|
103
|
+
get throttle(): number | null;
|
|
104
|
+
/**
|
|
105
|
+
* If any error is thrown by `persistDifference`, you have the chance to further process
|
|
106
|
+
* it by using `wrapError`. Usually this is used to wrap the error inside another that
|
|
107
|
+
* better describes the failure. For example, you could turn a storage error into a
|
|
108
|
+
* `UserException`, so that it's shown to the user:
|
|
109
|
+
*
|
|
110
|
+
* ```ts
|
|
111
|
+
* wrapError(error: any) {
|
|
112
|
+
* return (error instanceof StorageError)
|
|
113
|
+
* ? new UserException('Could not save your data.', { hardCause: error })
|
|
114
|
+
* : error;
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* To ignore the error, return `null`. Note the state that failed to save is still NOT
|
|
119
|
+
* considered persisted.
|
|
120
|
+
*
|
|
121
|
+
* If instead of RETURNING an error you THROW an error inside `wrapError`, Kiss will use
|
|
122
|
+
* the thrown error instead of the original error. But it's recommended that you return it.
|
|
123
|
+
*/
|
|
124
|
+
wrapError(error: any): any;
|
|
125
|
+
private readonly _errors;
|
|
126
|
+
/**
|
|
127
|
+
* Reports an error without throwing it. The error will be given to the store's
|
|
128
|
+
* `errorObserver` (with a `null` action), and if it's a `UserException`, it will be shown
|
|
129
|
+
* to the user. Other errors are thrown as unhandled promise rejections. Errors added here don't go through `wrapError`.
|
|
130
|
+
*
|
|
131
|
+
* This is useful in `readState`, `deleteState` and `saveInitialState`, when you can fix
|
|
132
|
+
* the problem yourself, but still want to let the user know about it.
|
|
133
|
+
*/
|
|
134
|
+
addError(error: any): void;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the first error added with `addError`, and removes it.
|
|
137
|
+
* Returns `null` if there are no errors. Used by Kiss.
|
|
138
|
+
*/
|
|
139
|
+
getAndRemoveFirstError(): any;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A decorator to print persistor information to the console.
|
|
143
|
+
* Use it like this:
|
|
144
|
+
*
|
|
145
|
+
* ```ts
|
|
146
|
+
* const store = createStore<AppState>({
|
|
147
|
+
* ...otherOptions,
|
|
148
|
+
* persistor: new PersistorPrinterDecorator<AppState>(persistor),
|
|
149
|
+
* });
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare class PersistorPrinterDecorator<St> extends Persistor<St> {
|
|
153
|
+
private _persistor;
|
|
154
|
+
constructor(persistor: Persistor<St>);
|
|
155
|
+
readState(): Promise<St | null>;
|
|
156
|
+
deleteState(): Promise<void>;
|
|
157
|
+
persistDifference(lastPersistedState: St | null, newState: St): Promise<void>;
|
|
158
|
+
saveInitialState(state: St): Promise<void>;
|
|
159
|
+
get throttle(): number | null;
|
|
160
|
+
wrapError(error: any): any;
|
|
161
|
+
addError(error: any): void;
|
|
162
|
+
getAndRemoveFirstError(): any;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* A dummy persistor.
|
|
166
|
+
*/
|
|
167
|
+
export declare class PersistorDummy<St> extends Persistor<St | null> {
|
|
168
|
+
readState(): Promise<St | null>;
|
|
169
|
+
deleteState(): Promise<void>;
|
|
170
|
+
persistDifference(_lastPersistedState: St | null, _newState: St): Promise<void>;
|
|
171
|
+
saveInitialState(_state: St | null): Promise<void>;
|
|
172
|
+
get throttle(): number | null;
|
|
173
|
+
}
|
|
174
|
+
export declare class PersistException extends Error {
|
|
175
|
+
constructor(message: string);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* An action that can be dispatched to force the Persistor to persist the state immediately,
|
|
179
|
+
* ignoring the throttle period. It does not change the state.
|
|
180
|
+
*
|
|
181
|
+
* If the Persistor is currently persisting the state, the state is persisted as soon as it
|
|
182
|
+
* finishes (still ignoring the throttle). It does nothing if the state is already persisted,
|
|
183
|
+
* or if the Persistor is paused.
|
|
184
|
+
*/
|
|
185
|
+
export declare class PersistAction<St> extends KissAction<St> {
|
|
186
|
+
reduce(): null;
|
|
187
|
+
}
|
|
119
188
|
//# sourceMappingURL=Persistor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Persistor.d.ts","sourceRoot":"","sources":["../../../src/Persistor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Persistor.d.ts","sourceRoot":"","sources":["../../../src/Persistor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8BAAsB,SAAS,CAAC,EAAE;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,CAAC,SAAS,IAAI,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,iBAAiB,CACxB,kBAAkB,EAAE,EAAE,GAAG,IAAI,EAC7B,QAAQ,EAAE,EAAE,GACX,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C;;;OAGG;IACH,IAAI,QAAQ,IAAI,MAAM,GAAG,IAAI,CAE5B;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAI1B,OAAO,CAAC,QAAQ,CAA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C7B,OAAO,EAAE,MAAM;CAU5B;AAED;;;;;;;GAOG;AACH,qBAAa,aAAa,CAAC,EAAE,CAAE,SAAQ,UAAU,CAAC,EAAE,CAAC;IACnD,MAAM,IAAI,IAAI;CAGf"}
|
|
@@ -1,100 +1,198 @@
|
|
|
1
|
-
import { Persistor } from "./Persistor";
|
|
2
|
-
import { KissAction } from "./KissAction";
|
|
3
|
-
import { Store } from "./Store";
|
|
4
|
-
export declare class ProcessPersistence<St> {
|
|
5
|
-
persistor: Persistor<St>;
|
|
6
|
-
lastPersistedState: St | null;
|
|
7
|
-
newestState: St | null;
|
|
8
|
-
isPersisting: boolean;
|
|
9
|
-
isANewStateAvailable: boolean;
|
|
10
|
-
lastPersistTime: Date;
|
|
11
|
-
timer?: ReturnType<typeof setTimeout>;
|
|
12
|
-
isPaused: boolean;
|
|
13
|
-
isInit: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* `
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* new
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
import { Persistor } from "./Persistor";
|
|
2
|
+
import { KissAction } from "./KissAction";
|
|
3
|
+
import { Store } from "./Store";
|
|
4
|
+
export declare class ProcessPersistence<St> {
|
|
5
|
+
persistor: Persistor<St>;
|
|
6
|
+
lastPersistedState: St | null;
|
|
7
|
+
newestState: St | null;
|
|
8
|
+
isPersisting: boolean;
|
|
9
|
+
isANewStateAvailable: boolean;
|
|
10
|
+
lastPersistTime: Date;
|
|
11
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
12
|
+
isPaused: boolean;
|
|
13
|
+
isInit: boolean;
|
|
14
|
+
isReady: boolean;
|
|
15
|
+
isApplyingReadState: boolean;
|
|
16
|
+
onReady: (() => void) | null;
|
|
17
|
+
private readonly _ready;
|
|
18
|
+
private _resolveReady;
|
|
19
|
+
private _persistingWaiters;
|
|
20
|
+
private _isPersistActionWaiting;
|
|
21
|
+
private _logOutsRunning;
|
|
22
|
+
private _logOutWaiters;
|
|
23
|
+
/**
|
|
24
|
+
* Called with the persistence errors: the errors thrown by `Persistor.persistDifference`
|
|
25
|
+
* (after `Persistor.wrapError`, and only if it didn't return `null`), the errors thrown
|
|
26
|
+
* while reading the persisted state, and the errors added with `Persistor.addError`.
|
|
27
|
+
* The `originalError` is the error before `Persistor.wrapError` (or the same error, if it
|
|
28
|
+
* didn't go through `wrapError`). If not set, the errors are logged with `Store.log()`.
|
|
29
|
+
* The `observeOnly` is true when the error is also thrown to the caller (by `logOut`), so it
|
|
30
|
+
* should only be observed (given to the `errorObserver`), and not thrown again.
|
|
31
|
+
*/
|
|
32
|
+
onError: ((error: any, originalError: any, observeOnly: boolean) => void) | null;
|
|
33
|
+
constructor(persistor: Persistor<St>, lastPersistedState: St | null);
|
|
34
|
+
/**
|
|
35
|
+
* Resolves when the persisted state has been read (or failed to read) at startup.
|
|
36
|
+
* Never rejects.
|
|
37
|
+
*/
|
|
38
|
+
ready(): Promise<void>;
|
|
39
|
+
readInitialState(store: Store<St>, initialState: St): Promise<void>;
|
|
40
|
+
private _readInitialState;
|
|
41
|
+
private log;
|
|
42
|
+
/**
|
|
43
|
+
* Gives the error to `onError`, or logs it if `onError` is not set.
|
|
44
|
+
*/
|
|
45
|
+
private reportError;
|
|
46
|
+
/**
|
|
47
|
+
* Reports the errors added with `Persistor.addError`, removing them from the persistor.
|
|
48
|
+
*/
|
|
49
|
+
processAddedErrors(): void;
|
|
50
|
+
get throttle(): number;
|
|
51
|
+
/**
|
|
52
|
+
* Same as `Persistor.saveInitialState` but will remember the `initialState` as the
|
|
53
|
+
* `lastPersistedState`. If a save is running, waits for it to finish first, so that it can't
|
|
54
|
+
* overwrite the `initialState` later.
|
|
55
|
+
*/
|
|
56
|
+
saveInitialState(initialState: St): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Same as `Persistor.readState` but will remember the read state as the `lastPersistedState`.
|
|
59
|
+
* If a save is running, waits for it to finish first, so that it reads the saved state, and
|
|
60
|
+
* so that the save can't change the `lastPersistedState` later.
|
|
61
|
+
*/
|
|
62
|
+
readState(): Promise<St | null>;
|
|
63
|
+
/**
|
|
64
|
+
* Same as `Persistor.deleteState` but will clear the `lastPersistedState`.
|
|
65
|
+
* If a save is running, waits for it to finish first, so that it can't put the deleted
|
|
66
|
+
* state back later.
|
|
67
|
+
*/
|
|
68
|
+
deleteState(): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Runs the `operation` when no other persistence operation is running, so that they don't
|
|
71
|
+
* overlap. While it runs, state changes are not saved. They are saved when it finishes, if
|
|
72
|
+
* necessary.
|
|
73
|
+
*/
|
|
74
|
+
private _runAlone;
|
|
75
|
+
private _startOperation;
|
|
76
|
+
/**
|
|
77
|
+
* Called when a persistence operation finishes (even if it failed). If the state may have
|
|
78
|
+
* changed while it was running, persists it if necessary.
|
|
79
|
+
*/
|
|
80
|
+
private _finishOperation;
|
|
81
|
+
/**
|
|
82
|
+
* Call `logOut()` when you want to delete the persisted state, and return the store
|
|
83
|
+
* state to the given initial-state. That's usually necessary when the user logs out
|
|
84
|
+
* of your app, or the user deletes its account, so that another user may log in,
|
|
85
|
+
* or start a new sign-up process.
|
|
86
|
+
*
|
|
87
|
+
* Note: If you know about any timers or async processes that you may have started,
|
|
88
|
+
* you should stop/cancel them all before calling this method.
|
|
89
|
+
*
|
|
90
|
+
* You may opt to:
|
|
91
|
+
*
|
|
92
|
+
* - Wait for `throttle` milliseconds to make sure all async processes that the app may
|
|
93
|
+
* have started have time to finish. The default `throttle` is 3000 milliseconds (3 seconds).
|
|
94
|
+
*
|
|
95
|
+
* - Wait for all actions currently running to finish, but wait at most `actionsThrottle`
|
|
96
|
+
* milliseconds. If the actions are not finished by then, the state will be deleted anyway.
|
|
97
|
+
* The default `actionsThrottle` is 6000 milliseconds (6 seconds).
|
|
98
|
+
*
|
|
99
|
+
* The result of the actions dispatched before logOut is discarded, and so are the actions
|
|
100
|
+
* they dispatch after it.
|
|
101
|
+
*
|
|
102
|
+
* Same as `store.logOut`. See it for more details.
|
|
103
|
+
*/
|
|
104
|
+
logOut({ store, initialState, throttle, actionsThrottle, }: {
|
|
105
|
+
store: Store<St>;
|
|
106
|
+
initialState: St;
|
|
107
|
+
throttle?: number;
|
|
108
|
+
actionsThrottle?: number;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Resolves when no `logOut` is running anymore.
|
|
112
|
+
* Only call it while `_logOutsRunning` is more than zero.
|
|
113
|
+
*/
|
|
114
|
+
private _waitForLogOut;
|
|
115
|
+
/**
|
|
116
|
+
* 1) If we're still persisting the last time, don't persist no matter what.
|
|
117
|
+
* Instead, check again when it finishes.
|
|
118
|
+
* 2) If action is of type `UpdateStateAction` with `ifPersists` false,
|
|
119
|
+
* don't persist, but consider the state as persisted (if no earlier change is waiting to
|
|
120
|
+
* be saved). This is done even while the persistor is paused.
|
|
121
|
+
* 3) If throttle period is done (or if action is PersistAction), persist.
|
|
122
|
+
* 4) If throttle period is NOT done, create a timer to persist as soon as it finishes.
|
|
123
|
+
*
|
|
124
|
+
* Return true if the persist process started.
|
|
125
|
+
* Return false if persistence was postponed.
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
process(action: KissAction<St> | null, newState: St): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Same as `process`, but if `ignoreThrottle` is true, the throttle is ignored,
|
|
131
|
+
* as if the action were a `PersistAction`.
|
|
132
|
+
*/
|
|
133
|
+
private _process;
|
|
134
|
+
private _cancelTimer;
|
|
135
|
+
/**
|
|
136
|
+
* Resolves when the persistence process currently running finishes.
|
|
137
|
+
* Only call it while `isPersisting` is true.
|
|
138
|
+
*
|
|
139
|
+
* Note we use the `isPersisting` flag, and don't keep the promise of the running process.
|
|
140
|
+
* When `persistDifference` throws synchronously, instead of returning a rejected promise,
|
|
141
|
+
* `_persist` finishes before it even returns its promise. A kept promise would then never be
|
|
142
|
+
* cleared, and waiting for it in a loop would freeze the app.
|
|
143
|
+
*/
|
|
144
|
+
private _waitForPersisting;
|
|
145
|
+
/**
|
|
146
|
+
* Returns the error (after `Persistor.wrapError`) if the save failed, or `null` if it
|
|
147
|
+
* succeeded, or if `wrapError` swallowed the error. If `observeOnly` is true, the error is
|
|
148
|
+
* only observed, since the caller throws it.
|
|
149
|
+
*/
|
|
150
|
+
private _persist;
|
|
151
|
+
/**
|
|
152
|
+
* Pause the `Persistor` temporarily.
|
|
153
|
+
*
|
|
154
|
+
* When `pause` is called, the Persistor will not start a new persistence process, until method
|
|
155
|
+
* `resume` is called. This will not affect the current persistence process, if one is currently
|
|
156
|
+
* running.
|
|
157
|
+
*
|
|
158
|
+
* Note: A persistence process starts when the `persistDifference` method is called, and
|
|
159
|
+
* finishes when the promise returned by that method completes.
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
pause(): void;
|
|
163
|
+
/**
|
|
164
|
+
* For Kiss internal use only. Called by `store.dispose()`. Pauses the persistor, and cancels
|
|
165
|
+
* the pending save (a state change waiting for the throttle). A save that is already running
|
|
166
|
+
* still finishes.
|
|
167
|
+
*/
|
|
168
|
+
dispose(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Persists the current state (if it's not yet persisted), then pauses the `Persistor`
|
|
171
|
+
* temporarily.
|
|
172
|
+
*
|
|
173
|
+
*
|
|
174
|
+
* When `persistAndPause` is called while the persisted state is still being read, while a
|
|
175
|
+
* `logOut` is running, or while a persistence process is running, it waits for them to
|
|
176
|
+
* finish. Note logOut persists its initial-state, and the state before it is never persisted. Then, if the current state is
|
|
177
|
+
* not yet persisted, it immediately starts a new persistence process (ignoring `throttle`).
|
|
178
|
+
* The returned promise completes when the current state is persisted.
|
|
179
|
+
*
|
|
180
|
+
* If the save fails, the returned promise still resolves. It never rejects. This is on
|
|
181
|
+
* purpose, not a bug: this method is usually called when the app is shutting down or going to
|
|
182
|
+
* the background, and then the app can't recover from a failed save anyway. The error is not
|
|
183
|
+
* lost: it's reported (see `onError`) before the promise resolves, so it can be logged.
|
|
184
|
+
*
|
|
185
|
+
* Then, the Persistor will not start another persistence process, until method `resume` is
|
|
186
|
+
* called.
|
|
187
|
+
*
|
|
188
|
+
* Note: A persistence process starts when the `persistDifference` method is called, and
|
|
189
|
+
* finishes when the promise returned by that method completes.
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
persistAndPause(): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* Resumes persistence by the `Persistor`, after calling `pause` or `persistAndPause`.
|
|
195
|
+
*/
|
|
196
|
+
resume(): void;
|
|
197
|
+
}
|
|
100
198
|
//# sourceMappingURL=ProcessPersistence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessPersistence.d.ts","sourceRoot":"","sources":["../../../src/ProcessPersistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ProcessPersistence.d.ts","sourceRoot":"","sources":["../../../src/ProcessPersistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,qBAAa,kBAAkB,CAAC,EAAE;IAChC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;IACzB,kBAAkB,EAAE,EAAE,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,EAAE,GAAG,IAAI,CAAC;IACvB,YAAY,UAAS;IACrB,oBAAoB,UAAS;IAC7B,eAAe,EAAE,IAAI,CAAc;IACnC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACtC,QAAQ,UAAS;IACjB,MAAM,UAAS;IAEf,OAAO,UAAS;IAGhB,mBAAmB,UAAS;IAG5B,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,aAAa,CAAc;IAEnC,OAAO,CAAC,kBAAkB,CAAsB;IAGhD,OAAO,CAAC,uBAAuB,CA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