effector-storage 4.4.0 → 5.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.
Files changed (94) hide show
  1. package/README.md +46 -53
  2. package/async-storage/index.cjs +2 -0
  3. package/async-storage/index.cjs.d.ts +21 -0
  4. package/async-storage/index.cjs.map +1 -0
  5. package/async-storage/index.d.ts +21 -0
  6. package/async-storage/index.js +2 -0
  7. package/async-storage/index.js.flow +19 -0
  8. package/async-storage/index.js.map +1 -0
  9. package/{fp → async-storage}/package.json +0 -0
  10. package/index.cjs +1 -1
  11. package/index.cjs.map +1 -1
  12. package/index.js +1 -1
  13. package/index.js.flow +1 -1
  14. package/index.js.map +1 -1
  15. package/local/index.cjs +1 -1
  16. package/local/index.cjs.map +1 -1
  17. package/local/index.js +1 -1
  18. package/local/index.js.flow +1 -1
  19. package/local/index.js.map +1 -1
  20. package/memory/index.cjs +1 -1
  21. package/memory/index.cjs.map +1 -1
  22. package/memory/index.js +1 -1
  23. package/memory/index.js.flow +1 -1
  24. package/memory/index.js.map +1 -1
  25. package/nil/index.cjs.map +1 -1
  26. package/nil/index.js.flow +1 -1
  27. package/nil/index.js.map +1 -1
  28. package/package.json +20 -26
  29. package/query/index.cjs +1 -1
  30. package/query/index.cjs.map +1 -1
  31. package/query/index.js +1 -1
  32. package/query/index.js.flow +1 -1
  33. package/query/index.js.map +1 -1
  34. package/rn/async/index.cjs +2 -0
  35. package/rn/async/index.cjs.d.ts +89 -0
  36. package/rn/async/index.cjs.map +1 -0
  37. package/rn/async/index.d.ts +89 -0
  38. package/rn/async/index.js +2 -0
  39. package/rn/async/index.js.flow +98 -0
  40. package/rn/async/index.js.map +1 -0
  41. package/{local/fp → rn/async}/package.json +0 -0
  42. package/rn/encrypted/index.cjs +2 -0
  43. package/rn/encrypted/index.cjs.d.ts +89 -0
  44. package/rn/encrypted/index.cjs.map +1 -0
  45. package/rn/encrypted/index.d.ts +89 -0
  46. package/rn/encrypted/index.js +2 -0
  47. package/rn/encrypted/index.js.flow +98 -0
  48. package/rn/encrypted/index.js.map +1 -0
  49. package/{memory/fp → rn/encrypted}/package.json +0 -0
  50. package/session/index.cjs +1 -1
  51. package/session/index.cjs.map +1 -1
  52. package/session/index.js +1 -1
  53. package/session/index.js.flow +1 -1
  54. package/session/index.js.map +1 -1
  55. package/storage/index.cjs.map +1 -1
  56. package/storage/index.js.flow +1 -1
  57. package/storage/index.js.map +1 -1
  58. package/fp/index.cjs +0 -2
  59. package/fp/index.cjs.d.ts +0 -55
  60. package/fp/index.cjs.map +0 -1
  61. package/fp/index.d.ts +0 -55
  62. package/fp/index.js +0 -2
  63. package/fp/index.js.flow +0 -76
  64. package/fp/index.js.map +0 -1
  65. package/local/fp/index.cjs +0 -2
  66. package/local/fp/index.cjs.d.ts +0 -46
  67. package/local/fp/index.cjs.map +0 -1
  68. package/local/fp/index.d.ts +0 -46
  69. package/local/fp/index.js +0 -2
  70. package/local/fp/index.js.flow +0 -63
  71. package/local/fp/index.js.map +0 -1
  72. package/memory/fp/index.cjs +0 -2
  73. package/memory/fp/index.cjs.d.ts +0 -43
  74. package/memory/fp/index.cjs.map +0 -1
  75. package/memory/fp/index.d.ts +0 -43
  76. package/memory/fp/index.js +0 -2
  77. package/memory/fp/index.js.flow +0 -64
  78. package/memory/fp/index.js.map +0 -1
  79. package/query/fp/index.cjs +0 -2
  80. package/query/fp/index.cjs.d.ts +0 -57
  81. package/query/fp/index.cjs.map +0 -1
  82. package/query/fp/index.d.ts +0 -57
  83. package/query/fp/index.js +0 -2
  84. package/query/fp/index.js.flow +0 -67
  85. package/query/fp/index.js.map +0 -1
  86. package/query/fp/package.json +0 -7
  87. package/session/fp/index.cjs +0 -2
  88. package/session/fp/index.cjs.d.ts +0 -46
  89. package/session/fp/index.cjs.map +0 -1
  90. package/session/fp/index.d.ts +0 -46
  91. package/session/fp/index.js +0 -2
  92. package/session/fp/index.js.flow +0 -63
  93. package/session/fp/index.js.map +0 -1
  94. package/session/fp/package.json +0 -7
package/fp/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../src/fp-helper.ts","../../src/fp/index.ts"],"sourcesContent":["import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n","import type { ConfigAdapter, ConfigCommon } from '../types'\nimport { persist as parent } from '..'\nimport { fp } from '../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends ConfigAdapter,\n ConfigCommon<State, Err> {}\n\n/**\n * `persist` with curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n"],"names":["persist","config","console","error","store","fp","parent"],"mappings":"sCAaO,ICOMA,EDNFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,ICCUC,CAAqBC"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=(e=>r=>(console.error("/fp is deprecated, use regular form instead"),s=>(e({store:s,...r}),s)))(require("../index.cjs").persist);exports.persist=e;
2
- //# sourceMappingURL=index.cjs.map
@@ -1,46 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
5
-
6
- declare type Done<State> = {
7
- key: string
8
- keyPrefix: string
9
- operation: 'set' | 'get'
10
- value: State
11
- }
12
- declare type Fail<Err> = {
13
- key: string
14
- keyPrefix: string
15
- operation: 'set' | 'get'
16
- error: Err
17
- value?: any
18
- }
19
- declare type Finally<State, Err> =
20
- | (Done<State> & {
21
- status: 'done'
22
- })
23
- | (Fail<Err> & {
24
- status: 'fail'
25
- })
26
- interface ConfigCommon<State, Err = Error> {
27
- clock?: Unit<any>
28
- done?: Unit<Done<State>>
29
- fail?: Unit<Fail<Err>>
30
- finally?: Unit<Finally<State, Err>>
31
- pickup?: Unit<any>
32
- key?: string
33
- keyPrefix?: string
34
- }
35
-
36
- interface ConfigStore<State, Err = Error>
37
- extends AdapterConfig,
38
- ConfigCommon<State, Err> {}
39
- /**
40
- * Partially applied `persist` with predefined `localStorage` adapter and curried `store`
41
- */
42
- declare const persist: (
43
- config?: ConfigStore<any, Error> | undefined
44
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
45
-
46
- export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/local/fp/index.ts","../../../src/fp-helper.ts"],"sourcesContent":["import type { AdapterConfig } from '..'\nimport type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends AdapterConfig,\n ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `localStorage` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n","import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n"],"names":["persist","config","console","error","store","fp"],"mappings":"iBAqBaA,ECPFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,IDEUC"}
@@ -1,46 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
5
-
6
- declare type Done<State> = {
7
- key: string
8
- keyPrefix: string
9
- operation: 'set' | 'get'
10
- value: State
11
- }
12
- declare type Fail<Err> = {
13
- key: string
14
- keyPrefix: string
15
- operation: 'set' | 'get'
16
- error: Err
17
- value?: any
18
- }
19
- declare type Finally<State, Err> =
20
- | (Done<State> & {
21
- status: 'done'
22
- })
23
- | (Fail<Err> & {
24
- status: 'fail'
25
- })
26
- interface ConfigCommon<State, Err = Error> {
27
- clock?: Unit<any>
28
- done?: Unit<Done<State>>
29
- fail?: Unit<Fail<Err>>
30
- finally?: Unit<Finally<State, Err>>
31
- pickup?: Unit<any>
32
- key?: string
33
- keyPrefix?: string
34
- }
35
-
36
- interface ConfigStore<State, Err = Error>
37
- extends AdapterConfig,
38
- ConfigCommon<State, Err> {}
39
- /**
40
- * Partially applied `persist` with predefined `localStorage` adapter and curried `store`
41
- */
42
- declare const persist: (
43
- config?: ConfigStore<any, Error> | undefined
44
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
45
-
46
- export { ConfigStore, persist }
package/local/fp/index.js DELETED
@@ -1,2 +0,0 @@
1
- import{persist as r}from"../index.js";var e=(r=>e=>(console.error("/fp is deprecated, use regular form instead"),s=>(r({store:s,...e}),s)))(r);export{e as persist};
2
- //# sourceMappingURL=index.js.map
@@ -1,63 +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 * as effector from 'effector'
9
- import { Unit } from 'effector'
10
- import { AdapterConfig } from '..'
11
- declare export {
12
- ConfigPersist,
13
- Done,
14
- Fail,
15
- Finally,
16
- Persist,
17
- StorageAdapter,
18
- } from '..'
19
- declare type Done<State> = {
20
- key: string,
21
- keyPrefix: string,
22
- operation: 'set' | 'get',
23
- value: State,
24
- ...
25
- }
26
- declare type Fail<Err> = {
27
- key: string,
28
- keyPrefix: string,
29
- operation: 'set' | 'get',
30
- error: Err,
31
- value?: any,
32
- ...
33
- }
34
- declare type Finally<State, Err> =
35
- | {
36
- ...Done<State>,
37
- ...{
38
- status: 'done',
39
- ...
40
- },
41
- }
42
- | {
43
- ...Fail<Err>,
44
- ...{
45
- status: 'fail',
46
- ...
47
- },
48
- }
49
- declare interface ConfigCommon<State, Err = Error> {
50
- clock?: Unit<any>;
51
- done?: Unit<Done<State>>;
52
- fail?: Unit<Fail<Err>>;
53
- finally?: Unit<Finally<State, Err>>;
54
- pickup?: Unit<any>;
55
- key?: string;
56
- keyPrefix?: string;
57
- }
58
- declare type ConfigStore<State, Err = Error> = { ... } & AdapterConfig &
59
- ConfigCommon<State, Err>
60
- declare var persist: (
61
- config?: ConfigStore<any, Error> | void
62
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
63
- declare export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/fp-helper.ts","../../../src/local/fp/index.ts"],"sourcesContent":["import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n","import type { AdapterConfig } from '..'\nimport type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends AdapterConfig,\n ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `localStorage` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n"],"names":["persist","config","console","error","store","fp","parent"],"mappings":"sCAaO,ICQMA,EDPFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,ICEUC,CAAqBC"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=(e=>r=>(console.error("/fp is deprecated, use regular form instead"),s=>(e({store:s,...r}),s)))(require("../index.cjs").persist);exports.persist=e;
2
- //# sourceMappingURL=index.cjs.map
@@ -1,43 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
4
-
5
- declare type Done<State> = {
6
- key: string
7
- keyPrefix: string
8
- operation: 'set' | 'get'
9
- value: State
10
- }
11
- declare type Fail<Err> = {
12
- key: string
13
- keyPrefix: string
14
- operation: 'set' | 'get'
15
- error: Err
16
- value?: any
17
- }
18
- declare type Finally<State, Err> =
19
- | (Done<State> & {
20
- status: 'done'
21
- })
22
- | (Fail<Err> & {
23
- status: 'fail'
24
- })
25
- interface ConfigCommon<State, Err = Error> {
26
- clock?: Unit<any>
27
- done?: Unit<Done<State>>
28
- fail?: Unit<Fail<Err>>
29
- finally?: Unit<Finally<State, Err>>
30
- pickup?: Unit<any>
31
- key?: string
32
- keyPrefix?: string
33
- }
34
-
35
- interface ConfigStore<State, Err = Error> extends ConfigCommon<State, Err> {}
36
- /**
37
- * Partially applied `persist` with predefined `memory` adapter and curried `store`
38
- */
39
- declare const persist: (
40
- config?: ConfigStore<any, Error> | undefined
41
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
42
-
43
- export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/memory/fp/index.ts","../../../src/fp-helper.ts"],"sourcesContent":["import type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `memory` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n","import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n"],"names":["persist","config","console","error","store","fp"],"mappings":"iBAmBaA,ECLFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,IDAUC"}
@@ -1,43 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
4
-
5
- declare type Done<State> = {
6
- key: string
7
- keyPrefix: string
8
- operation: 'set' | 'get'
9
- value: State
10
- }
11
- declare type Fail<Err> = {
12
- key: string
13
- keyPrefix: string
14
- operation: 'set' | 'get'
15
- error: Err
16
- value?: any
17
- }
18
- declare type Finally<State, Err> =
19
- | (Done<State> & {
20
- status: 'done'
21
- })
22
- | (Fail<Err> & {
23
- status: 'fail'
24
- })
25
- interface ConfigCommon<State, Err = Error> {
26
- clock?: Unit<any>
27
- done?: Unit<Done<State>>
28
- fail?: Unit<Fail<Err>>
29
- finally?: Unit<Finally<State, Err>>
30
- pickup?: Unit<any>
31
- key?: string
32
- keyPrefix?: string
33
- }
34
-
35
- interface ConfigStore<State, Err = Error> extends ConfigCommon<State, Err> {}
36
- /**
37
- * Partially applied `persist` with predefined `memory` adapter and curried `store`
38
- */
39
- declare const persist: (
40
- config?: ConfigStore<any, Error> | undefined
41
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
42
-
43
- export { ConfigStore, persist }
@@ -1,2 +0,0 @@
1
- import{persist as r}from"../index.js";var e=(r=>e=>(console.error("/fp is deprecated, use regular form instead"),s=>(r({store:s,...e}),s)))(r);export{e as persist};
2
- //# sourceMappingURL=index.js.map
@@ -1,64 +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 * as effector from 'effector'
9
- import { Unit } from 'effector'
10
- declare export {
11
- ConfigPersist,
12
- Done,
13
- Fail,
14
- Finally,
15
- Persist,
16
- StorageAdapter,
17
- } from '..'
18
- declare type Done<State> = {
19
- key: string,
20
- keyPrefix: string,
21
- operation: 'set' | 'get',
22
- value: State,
23
- ...
24
- }
25
- declare type Fail<Err> = {
26
- key: string,
27
- keyPrefix: string,
28
- operation: 'set' | 'get',
29
- error: Err,
30
- value?: any,
31
- ...
32
- }
33
- declare type Finally<State, Err> =
34
- | {
35
- ...Done<State>,
36
- ...{
37
- status: 'done',
38
- ...
39
- },
40
- }
41
- | {
42
- ...Fail<Err>,
43
- ...{
44
- status: 'fail',
45
- ...
46
- },
47
- }
48
- declare interface ConfigCommon<State, Err = Error> {
49
- clock?: Unit<any>;
50
- done?: Unit<Done<State>>;
51
- fail?: Unit<Fail<Err>>;
52
- finally?: Unit<Finally<State, Err>>;
53
- pickup?: Unit<any>;
54
- key?: string;
55
- keyPrefix?: string;
56
- }
57
- declare type ConfigStore<State, Err = Error> = { ... } & ConfigCommon<
58
- State,
59
- Err
60
- >
61
- declare var persist: (
62
- config?: ConfigStore<any, Error> | void
63
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
64
- declare export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/fp-helper.ts","../../../src/memory/fp/index.ts"],"sourcesContent":["import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n","import type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `memory` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n"],"names":["persist","config","console","error","store","fp","parent"],"mappings":"sCAaO,ICMMA,EDLFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,ICAUC,CAAqBC"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("../index.cjs"),t=(e=>t=>(console.error("/fp is deprecated, use regular form instead"),s=>(e({store:s,...t}),s)))(e.persist);exports.locationAssign=e.locationAssign,exports.locationReplace=e.locationReplace,exports.pushState=e.pushState,exports.replaceState=e.replaceState,exports.persist=t;
2
- //# sourceMappingURL=index.cjs.map
@@ -1,57 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export {
5
- ConfigPersist,
6
- Done,
7
- Fail,
8
- Finally,
9
- Persist,
10
- StorageAdapter,
11
- locationAssign,
12
- locationReplace,
13
- pushState,
14
- replaceState,
15
- } from '..'
16
-
17
- declare type Done<State> = {
18
- key: string
19
- keyPrefix: string
20
- operation: 'set' | 'get'
21
- value: State
22
- }
23
- declare type Fail<Err> = {
24
- key: string
25
- keyPrefix: string
26
- operation: 'set' | 'get'
27
- error: Err
28
- value?: any
29
- }
30
- declare type Finally<State, Err> =
31
- | (Done<State> & {
32
- status: 'done'
33
- })
34
- | (Fail<Err> & {
35
- status: 'fail'
36
- })
37
- interface ConfigCommon<State, Err = Error> {
38
- clock?: Unit<any>
39
- done?: Unit<Done<State>>
40
- fail?: Unit<Fail<Err>>
41
- finally?: Unit<Finally<State, Err>>
42
- pickup?: Unit<any>
43
- key?: string
44
- keyPrefix?: string
45
- }
46
-
47
- interface ConfigStore<State, Err = Error>
48
- extends AdapterConfig,
49
- ConfigCommon<State, Err> {}
50
- /**
51
- * Partially applied `persist` with predefined `localStorage` adapter and curried `store`
52
- */
53
- declare const persist: (
54
- config?: ConfigStore<any, Error> | undefined
55
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
56
-
57
- export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/query/fp/index.ts","../../../src/fp-helper.ts"],"sourcesContent":["import type { AdapterConfig } from '..'\nimport type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport { pushState, replaceState, locationAssign, locationReplace } from '..'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends AdapterConfig,\n ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `localStorage` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n","import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n"],"names":["persist","config","console","error","store","fp","parent"],"mappings":"2CAuBaA,ECTFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,IDIUC,CAAqBC"}
@@ -1,57 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export {
5
- ConfigPersist,
6
- Done,
7
- Fail,
8
- Finally,
9
- Persist,
10
- StorageAdapter,
11
- locationAssign,
12
- locationReplace,
13
- pushState,
14
- replaceState,
15
- } from '..'
16
-
17
- declare type Done<State> = {
18
- key: string
19
- keyPrefix: string
20
- operation: 'set' | 'get'
21
- value: State
22
- }
23
- declare type Fail<Err> = {
24
- key: string
25
- keyPrefix: string
26
- operation: 'set' | 'get'
27
- error: Err
28
- value?: any
29
- }
30
- declare type Finally<State, Err> =
31
- | (Done<State> & {
32
- status: 'done'
33
- })
34
- | (Fail<Err> & {
35
- status: 'fail'
36
- })
37
- interface ConfigCommon<State, Err = Error> {
38
- clock?: Unit<any>
39
- done?: Unit<Done<State>>
40
- fail?: Unit<Fail<Err>>
41
- finally?: Unit<Finally<State, Err>>
42
- pickup?: Unit<any>
43
- key?: string
44
- keyPrefix?: string
45
- }
46
-
47
- interface ConfigStore<State, Err = Error>
48
- extends AdapterConfig,
49
- ConfigCommon<State, Err> {}
50
- /**
51
- * Partially applied `persist` with predefined `localStorage` adapter and curried `store`
52
- */
53
- declare const persist: (
54
- config?: ConfigStore<any, Error> | undefined
55
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
56
-
57
- export { ConfigStore, persist }
package/query/fp/index.js DELETED
@@ -1,2 +0,0 @@
1
- import{persist as e}from"../index.js";export{locationAssign,locationReplace,pushState,replaceState}from"..";var r=(e=>r=>(console.error("/fp is deprecated, use regular form instead"),o=>(e({store:o,...r}),o)))(e);export{r as persist};
2
- //# sourceMappingURL=index.js.map
@@ -1,67 +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 * as effector from 'effector'
9
- import { Unit } from 'effector'
10
- import { AdapterConfig } from '..'
11
- declare export {
12
- ConfigPersist,
13
- Done,
14
- Fail,
15
- Finally,
16
- Persist,
17
- StorageAdapter,
18
- locationAssign,
19
- locationReplace,
20
- pushState,
21
- replaceState,
22
- } from '..'
23
- declare type Done<State> = {
24
- key: string,
25
- keyPrefix: string,
26
- operation: 'set' | 'get',
27
- value: State,
28
- ...
29
- }
30
- declare type Fail<Err> = {
31
- key: string,
32
- keyPrefix: string,
33
- operation: 'set' | 'get',
34
- error: Err,
35
- value?: any,
36
- ...
37
- }
38
- declare type Finally<State, Err> =
39
- | {
40
- ...Done<State>,
41
- ...{
42
- status: 'done',
43
- ...
44
- },
45
- }
46
- | {
47
- ...Fail<Err>,
48
- ...{
49
- status: 'fail',
50
- ...
51
- },
52
- }
53
- declare interface ConfigCommon<State, Err = Error> {
54
- clock?: Unit<any>;
55
- done?: Unit<Done<State>>;
56
- fail?: Unit<Fail<Err>>;
57
- finally?: Unit<Finally<State, Err>>;
58
- pickup?: Unit<any>;
59
- key?: string;
60
- keyPrefix?: string;
61
- }
62
- declare type ConfigStore<State, Err = Error> = { ... } & AdapterConfig &
63
- ConfigCommon<State, Err>
64
- declare var persist: (
65
- config?: ConfigStore<any, Error> | void
66
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
67
- declare export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/fp-helper.ts","../../../src/query/fp/index.ts"],"sourcesContent":["import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n","import type { AdapterConfig } from '..'\nimport type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport { pushState, replaceState, locationAssign, locationReplace } from '..'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends AdapterConfig,\n ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `localStorage` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n"],"names":["persist","config","console","error","store","fp","parent"],"mappings":"4GAaO,ICUMA,EDTFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,ICIUC,CAAqBC"}
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "index.cjs",
4
- "module": "index.js",
5
- "react-native": "index.js",
6
- "types": "index.d.ts"
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";var e=(e=>r=>(console.error("/fp is deprecated, use regular form instead"),s=>(e({store:s,...r}),s)))(require("../index.cjs").persist);exports.persist=e;
2
- //# sourceMappingURL=index.cjs.map
@@ -1,46 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
5
-
6
- declare type Done<State> = {
7
- key: string
8
- keyPrefix: string
9
- operation: 'set' | 'get'
10
- value: State
11
- }
12
- declare type Fail<Err> = {
13
- key: string
14
- keyPrefix: string
15
- operation: 'set' | 'get'
16
- error: Err
17
- value?: any
18
- }
19
- declare type Finally<State, Err> =
20
- | (Done<State> & {
21
- status: 'done'
22
- })
23
- | (Fail<Err> & {
24
- status: 'fail'
25
- })
26
- interface ConfigCommon<State, Err = Error> {
27
- clock?: Unit<any>
28
- done?: Unit<Done<State>>
29
- fail?: Unit<Fail<Err>>
30
- finally?: Unit<Finally<State, Err>>
31
- pickup?: Unit<any>
32
- key?: string
33
- keyPrefix?: string
34
- }
35
-
36
- interface ConfigStore<State, Err = Error>
37
- extends AdapterConfig,
38
- ConfigCommon<State, Err> {}
39
- /**
40
- * Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`
41
- */
42
- declare const persist: (
43
- config?: ConfigStore<any, Error> | undefined
44
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
45
-
46
- export { ConfigStore, persist }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/session/fp/index.ts","../../../src/fp-helper.ts"],"sourcesContent":["import type { AdapterConfig } from '..'\nimport type { ConfigCommon } from '../../types'\nimport { persist as parent } from '..'\nimport { fp } from '../../fp-helper'\n\nexport type {\n ConfigPersist,\n Done,\n Fail,\n Finally,\n Persist,\n StorageAdapter,\n} from '..'\n\nexport interface ConfigStore<State, Err = Error>\n extends AdapterConfig,\n ConfigCommon<State, Err> {}\n\n/**\n * Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`\n */\nexport const persist = fp<ConfigStore<any>>(parent)\n","import type { Store, Subscription } from 'effector'\n\ntype LikePersist = {\n (config: any): Subscription\n}\n\ntype Curried = {\n <State>(store: Store<State>): Store<State>\n}\n\n/**\n * Helper to make any `persist` function like functional\n */\nexport const fp =\n <Config>(persist: LikePersist) =>\n (config?: Config): Curried => {\n console.error(`/fp is deprecated, use regular form instead`)\n return <State>(store: Store<State>): Store<State> => {\n persist({ store, ...config })\n return store\n }\n }\n"],"names":["persist","config","console","error","store","fp"],"mappings":"iBAqBaA,ECPFA,CAAAA,GACRC,IACCC,QAAQC,MAAO,+CACAC,IACbJ,EAAQ,CAAEI,MAAAA,KAAUH,IACbG,IDEUC"}
@@ -1,46 +0,0 @@
1
- import * as effector from 'effector'
2
- import { Unit } from 'effector'
3
- import { AdapterConfig } from '..'
4
- export { ConfigPersist, Done, Fail, Finally, Persist, StorageAdapter } from '..'
5
-
6
- declare type Done<State> = {
7
- key: string
8
- keyPrefix: string
9
- operation: 'set' | 'get'
10
- value: State
11
- }
12
- declare type Fail<Err> = {
13
- key: string
14
- keyPrefix: string
15
- operation: 'set' | 'get'
16
- error: Err
17
- value?: any
18
- }
19
- declare type Finally<State, Err> =
20
- | (Done<State> & {
21
- status: 'done'
22
- })
23
- | (Fail<Err> & {
24
- status: 'fail'
25
- })
26
- interface ConfigCommon<State, Err = Error> {
27
- clock?: Unit<any>
28
- done?: Unit<Done<State>>
29
- fail?: Unit<Fail<Err>>
30
- finally?: Unit<Finally<State, Err>>
31
- pickup?: Unit<any>
32
- key?: string
33
- keyPrefix?: string
34
- }
35
-
36
- interface ConfigStore<State, Err = Error>
37
- extends AdapterConfig,
38
- ConfigCommon<State, Err> {}
39
- /**
40
- * Partially applied `persist` with predefined `sessionStorage` adapter and curried `store`
41
- */
42
- declare const persist: (
43
- config?: ConfigStore<any, Error> | undefined
44
- ) => <State>(store: effector.Store<State>) => effector.Store<State>
45
-
46
- export { ConfigStore, persist }