effector-storage 4.2.1 → 5.0.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 +87 -46
- package/async-storage/index.cjs +2 -0
- package/async-storage/index.cjs.d.ts +21 -0
- package/async-storage/index.cjs.map +1 -0
- package/async-storage/index.d.ts +21 -0
- package/async-storage/index.js +2 -0
- package/async-storage/index.js.flow +19 -0
- package/async-storage/index.js.map +1 -0
- package/{fp → async-storage}/package.json +0 -0
- package/index.cjs +1 -1
- package/index.cjs.d.ts +37 -17
- package/index.cjs.map +1 -1
- package/index.d.ts +37 -17
- package/index.js +1 -1
- package/index.js.flow +31 -17
- package/index.js.map +1 -1
- package/local/index.cjs +1 -1
- package/local/index.cjs.d.ts +76 -21
- package/local/index.cjs.map +1 -1
- package/local/index.d.ts +76 -21
- package/local/index.js +1 -1
- package/local/index.js.flow +84 -21
- package/local/index.js.map +1 -1
- package/memory/index.cjs +1 -1
- package/memory/index.cjs.d.ts +68 -18
- package/memory/index.cjs.map +1 -1
- package/memory/index.d.ts +68 -18
- package/memory/index.js +1 -1
- package/memory/index.js.flow +81 -18
- package/memory/index.js.map +1 -1
- package/nil/index.cjs +1 -1
- package/nil/index.cjs.d.ts +1 -1
- package/nil/index.cjs.map +1 -1
- package/nil/index.d.ts +1 -1
- package/nil/index.js +1 -1
- package/nil/index.js.flow +2 -2
- package/nil/index.js.map +1 -1
- package/package.json +21 -27
- package/query/index.cjs +1 -1
- package/query/index.cjs.d.ts +77 -25
- package/query/index.cjs.map +1 -1
- package/query/index.d.ts +77 -25
- package/query/index.js +1 -1
- package/query/index.js.flow +87 -27
- package/query/index.js.map +1 -1
- package/rn/async/index.cjs +2 -0
- package/rn/async/index.cjs.d.ts +89 -0
- package/rn/async/index.cjs.map +1 -0
- package/rn/async/index.d.ts +89 -0
- package/rn/async/index.js +2 -0
- package/rn/async/index.js.flow +98 -0
- package/rn/async/index.js.map +1 -0
- package/{local/fp → rn/async}/package.json +0 -0
- package/rn/encrypted/index.cjs +2 -0
- package/rn/encrypted/index.cjs.d.ts +89 -0
- package/rn/encrypted/index.cjs.map +1 -0
- package/rn/encrypted/index.d.ts +89 -0
- package/rn/encrypted/index.js +2 -0
- package/rn/encrypted/index.js.flow +98 -0
- package/rn/encrypted/index.js.map +1 -0
- package/{memory/fp → rn/encrypted}/package.json +0 -0
- package/session/index.cjs +1 -1
- package/session/index.cjs.d.ts +76 -21
- package/session/index.cjs.map +1 -1
- package/session/index.d.ts +76 -21
- package/session/index.js +1 -1
- package/session/index.js.flow +84 -21
- package/session/index.js.map +1 -1
- package/storage/index.cjs.map +1 -1
- package/storage/index.js.flow +1 -1
- package/storage/index.js.map +1 -1
- package/fp/index.cjs +0 -2
- package/fp/index.cjs.d.ts +0 -19
- package/fp/index.cjs.map +0 -1
- package/fp/index.d.ts +0 -19
- package/fp/index.js +0 -2
- package/fp/index.js.flow +0 -21
- package/fp/index.js.map +0 -1
- package/local/fp/index.cjs +0 -2
- package/local/fp/index.cjs.d.ts +0 -39
- package/local/fp/index.cjs.map +0 -1
- package/local/fp/index.d.ts +0 -39
- package/local/fp/index.js +0 -2
- package/local/fp/index.js.flow +0 -50
- package/local/fp/index.js.map +0 -1
- package/memory/fp/index.cjs +0 -2
- package/memory/fp/index.cjs.d.ts +0 -36
- package/memory/fp/index.cjs.map +0 -1
- package/memory/fp/index.d.ts +0 -36
- package/memory/fp/index.js +0 -2
- package/memory/fp/index.js.flow +0 -47
- package/memory/fp/index.js.map +0 -1
- package/query/fp/index.cjs +0 -2
- package/query/fp/index.cjs.d.ts +0 -45
- package/query/fp/index.cjs.map +0 -1
- package/query/fp/index.d.ts +0 -45
- package/query/fp/index.js +0 -2
- package/query/fp/index.js.flow +0 -60
- package/query/fp/index.js.map +0 -1
- package/query/fp/package.json +0 -7
- package/session/fp/index.cjs +0 -2
- package/session/fp/index.cjs.d.ts +0 -39
- package/session/fp/index.cjs.map +0 -1
- package/session/fp/index.d.ts +0 -39
- package/session/fp/index.js +0 -2
- package/session/fp/index.js.flow +0 -50
- package/session/fp/index.js.map +0 -1
- package/session/fp/package.json +0 -7
package/session/fp/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/session/fp/index.ts"],"sourcesContent":["import type { Unit, Store } from 'effector'\nimport type { Done, Fail, Finally } from '../..'\nimport { persist as parent } from '..'\n\nexport interface Config<State, Err = Error> {\n done?: Unit<Done<State>>\n fail?: Unit<Fail<Err>>\n finally?: Unit<Finally<State, Err>>\n pickup?: Unit<any>\n key?: string\n sync?: boolean // DEPRECATED\n serialize?: (value: any) => string\n deserialize?: (value: string) => any\n}\n\n/**\n * Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`\n */\n// FIXME: how to infer state backwards?\nexport function persist<Err = Error>(config: Config<any, Err> = {}) {\n return <State>(store: Store<State>): Store<State> => {\n parent(Object.assign({ store }, config))\n return store\n }\n}\n"],"names":["config","store","parent","Object","assign"],"mappings":"2DAmBO,SAA8BA,EAA2B,WAC/CC,IACbC,UAAOC,OAAOC,OAAO,CAAEH,MAAAA,GAASD,IACzBC"}
|
package/session/fp/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Unit, Store } from 'effector'
|
|
2
|
-
|
|
3
|
-
declare type Done<State> = {
|
|
4
|
-
key: string
|
|
5
|
-
operation: 'set' | 'get'
|
|
6
|
-
value: State
|
|
7
|
-
}
|
|
8
|
-
declare type Fail<Err> = {
|
|
9
|
-
key: string
|
|
10
|
-
operation: 'set' | 'get'
|
|
11
|
-
error: Err
|
|
12
|
-
value?: any
|
|
13
|
-
}
|
|
14
|
-
declare type Finally<State, Err> =
|
|
15
|
-
| (Done<State> & {
|
|
16
|
-
status: 'done'
|
|
17
|
-
})
|
|
18
|
-
| (Fail<Err> & {
|
|
19
|
-
status: 'fail'
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
interface Config<State, Err = Error> {
|
|
23
|
-
done?: Unit<Done<State>>
|
|
24
|
-
fail?: Unit<Fail<Err>>
|
|
25
|
-
finally?: Unit<Finally<State, Err>>
|
|
26
|
-
pickup?: Unit<any>
|
|
27
|
-
key?: string
|
|
28
|
-
sync?: boolean
|
|
29
|
-
serialize?: (value: any) => string
|
|
30
|
-
deserialize?: (value: string) => any
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`
|
|
34
|
-
*/
|
|
35
|
-
declare function persist<Err = Error>(
|
|
36
|
-
config?: Config<any, Err>
|
|
37
|
-
): <State>(store: Store<State>) => Store<State>
|
|
38
|
-
|
|
39
|
-
export { Config, persist }
|
package/session/fp/index.js
DELETED
package/session/fp/index.js.flow
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flowtype definitions for index
|
|
3
|
-
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.14.1
|
|
5
|
-
* @flow
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { Unit, Store } from 'effector'
|
|
9
|
-
declare type Done<State> = {
|
|
10
|
-
key: string,
|
|
11
|
-
operation: 'set' | 'get',
|
|
12
|
-
value: State,
|
|
13
|
-
...
|
|
14
|
-
}
|
|
15
|
-
declare type Fail<Err> = {
|
|
16
|
-
key: string,
|
|
17
|
-
operation: 'set' | 'get',
|
|
18
|
-
error: Err,
|
|
19
|
-
value?: any,
|
|
20
|
-
...
|
|
21
|
-
}
|
|
22
|
-
declare type Finally<State, Err> =
|
|
23
|
-
| {
|
|
24
|
-
...Done<State>,
|
|
25
|
-
...{
|
|
26
|
-
status: 'done',
|
|
27
|
-
...
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
| {
|
|
31
|
-
...Fail<Err>,
|
|
32
|
-
...{
|
|
33
|
-
status: 'fail',
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
declare interface Config<State, Err = Error> {
|
|
38
|
-
done?: Unit<Done<State>>;
|
|
39
|
-
fail?: Unit<Fail<Err>>;
|
|
40
|
-
finally?: Unit<Finally<State, Err>>;
|
|
41
|
-
pickup?: Unit<any>;
|
|
42
|
-
key?: string;
|
|
43
|
-
sync?: boolean;
|
|
44
|
-
serialize?: (value: any) => string;
|
|
45
|
-
deserialize?: (value: string) => any;
|
|
46
|
-
}
|
|
47
|
-
declare function persist<Err>(
|
|
48
|
-
config?: Config<any, Err>
|
|
49
|
-
): <State>(store: Store<State>) => Store<State>
|
|
50
|
-
declare export { Config, persist }
|
package/session/fp/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/session/fp/index.ts"],"sourcesContent":["import type { Unit, Store } from 'effector'\nimport type { Done, Fail, Finally } from '../..'\nimport { persist as parent } from '..'\n\nexport interface Config<State, Err = Error> {\n done?: Unit<Done<State>>\n fail?: Unit<Fail<Err>>\n finally?: Unit<Finally<State, Err>>\n pickup?: Unit<any>\n key?: string\n sync?: boolean // DEPRECATED\n serialize?: (value: any) => string\n deserialize?: (value: string) => any\n}\n\n/**\n * Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`\n */\n// FIXME: how to infer state backwards?\nexport function persist<Err = Error>(config: Config<any, Err> = {}) {\n return <State>(store: Store<State>): Store<State> => {\n parent(Object.assign({ store }, config))\n return store\n }\n}\n"],"names":["persist","config","store","parent","Object","assign"],"mappings":"sCAmBO,SAASA,EAAqBC,EAA2B,WAC/CC,IACbC,EAAOC,OAAOC,OAAO,CAAEH,MAAAA,GAASD,IACzBC"}
|