@evolu/react-native 1.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/PlatformLive.d.ts +8 -0
- package/dist/PlatformLive.d.ts.map +1 -0
- package/dist/PlatformLive.js +58 -0
- package/dist/SqliteLive.d.ts +4 -0
- package/dist/SqliteLive.d.ts.map +1 -0
- package/dist/SqliteLive.js +22 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/package.json +68 -0
- package/src/PlatformLive.ts +92 -0
- package/src/SqliteLive.ts +29 -0
- package/src/index.ts +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Evolu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AppState, Bip39, FlushSync, Platform, SyncLock } from "@evolu/common";
|
|
2
|
+
import { Layer } from "effect";
|
|
3
|
+
export declare const PlatformLive: Layer.Layer<never, never, Platform>;
|
|
4
|
+
export declare const FlushSyncLive: Layer.Layer<never, never, FlushSync>;
|
|
5
|
+
export declare const SyncLockLive: Layer.Layer<never, never, SyncLock>;
|
|
6
|
+
export declare const AppStateLive: Layer.Layer<never, never, AppState>;
|
|
7
|
+
export declare const Bip39Live: Layer.Layer<never, never, Bip39>;
|
|
8
|
+
//# sourceMappingURL=PlatformLive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformLive.d.ts","sourceRoot":"","sources":["../src/PlatformLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EAGT,QAAQ,EACR,QAAQ,EACT,MAAM,eAAe,CAAC;AAQvB,OAAO,EAAoB,KAAK,EAAE,MAAM,QAAQ,CAAC;AAIjD,eAAO,MAAM,YAAY,qCAEvB,CAAC;AAEH,eAAO,MAAM,aAAa,sCAA+C,CAAC;AAE1E,eAAO,MAAM,YAAY,qCAiBxB,CAAC;AAEF,eAAO,MAAM,YAAY,qCAgCxB,CAAC;AAEF,eAAO,MAAM,SAAS,kCAYrB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AppState, Bip39, FlushSync, Platform, SyncLock, } from "@evolu/common";
|
|
2
|
+
import NetInfo from "@react-native-community/netinfo";
|
|
3
|
+
import { generateMnemonic, mnemonicToSeed, validateMnemonic, } from "@scure/bip39";
|
|
4
|
+
import { wordlist } from "@scure/bip39/wordlists/english";
|
|
5
|
+
import { Effect, Function, Layer } from "effect";
|
|
6
|
+
import { reloadAsync } from "expo-updates";
|
|
7
|
+
import { DevSettings, AppState as ReactNativeAppState } from "react-native";
|
|
8
|
+
export const PlatformLive = Layer.succeed(Platform, {
|
|
9
|
+
name: "react-native",
|
|
10
|
+
});
|
|
11
|
+
export const FlushSyncLive = Layer.succeed(FlushSync, Function.constVoid);
|
|
12
|
+
export const SyncLockLive = Layer.effect(SyncLock, Effect.sync(() => {
|
|
13
|
+
let hasLock = false;
|
|
14
|
+
const acquire = Effect.sync(() => {
|
|
15
|
+
if (hasLock)
|
|
16
|
+
return false;
|
|
17
|
+
hasLock = true;
|
|
18
|
+
return true;
|
|
19
|
+
});
|
|
20
|
+
const release = Effect.sync(() => {
|
|
21
|
+
hasLock = false;
|
|
22
|
+
});
|
|
23
|
+
return { acquire, release };
|
|
24
|
+
}));
|
|
25
|
+
export const AppStateLive = Layer.effect(AppState, Effect.sync(() => {
|
|
26
|
+
const onFocus = (callback) => {
|
|
27
|
+
let state = ReactNativeAppState.currentState;
|
|
28
|
+
ReactNativeAppState.addEventListener("change", (nextState) => {
|
|
29
|
+
if (state.match(/inactive|background/) && nextState === "active")
|
|
30
|
+
callback();
|
|
31
|
+
state = nextState;
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const onReconnect = (callback) => {
|
|
35
|
+
let state = null;
|
|
36
|
+
NetInfo.addEventListener((nextState) => {
|
|
37
|
+
if (state?.isInternetReachable === false &&
|
|
38
|
+
nextState.isConnected &&
|
|
39
|
+
nextState.isInternetReachable)
|
|
40
|
+
callback();
|
|
41
|
+
state = nextState;
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const reset = Effect.sync(() => {
|
|
45
|
+
if (process.env.NODE_ENV === "development")
|
|
46
|
+
DevSettings.reload();
|
|
47
|
+
else
|
|
48
|
+
void reloadAsync();
|
|
49
|
+
});
|
|
50
|
+
return AppState.of({ onFocus, onReconnect, reset });
|
|
51
|
+
}));
|
|
52
|
+
export const Bip39Live = Layer.succeed(Bip39, Bip39.of({
|
|
53
|
+
make: Effect.sync(() => generateMnemonic(wordlist, 128)),
|
|
54
|
+
toSeed: (mnemonic) => Effect.promise(() => mnemonicToSeed(mnemonic)),
|
|
55
|
+
parse: (mnemonic) => validateMnemonic(mnemonic, wordlist)
|
|
56
|
+
? Effect.succeed(mnemonic)
|
|
57
|
+
: Effect.fail({ _tag: "InvalidMnemonicError" }),
|
|
58
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqliteLive.d.ts","sourceRoot":"","sources":["../src/SqliteLive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0C,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AA2BvC,eAAO,MAAM,UAAU,mCAAkC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Sqlite, parseJsonResults, valuesToSqliteValues } from "@evolu/common";
|
|
2
|
+
import { Effect, Layer } from "effect";
|
|
3
|
+
import * as SQLite from "expo-sqlite";
|
|
4
|
+
const db = SQLite.openDatabase("evolu1.db");
|
|
5
|
+
const exec = (arg) => Effect.gen(function* (_) {
|
|
6
|
+
const isSqlString = typeof arg === "string";
|
|
7
|
+
const query = {
|
|
8
|
+
sql: isSqlString ? arg : arg.sql,
|
|
9
|
+
args: isSqlString ? [] : valuesToSqliteValues(arg.parameters),
|
|
10
|
+
};
|
|
11
|
+
const { rows, rowsAffected } = yield* _(Effect.promise(() => db
|
|
12
|
+
.execAsync([query], false)
|
|
13
|
+
.then((a) => a[0])
|
|
14
|
+
.then((result) => {
|
|
15
|
+
if ("error" in result)
|
|
16
|
+
throw result.error;
|
|
17
|
+
return result;
|
|
18
|
+
})));
|
|
19
|
+
parseJsonResults(rows);
|
|
20
|
+
return { rows, changes: rowsAffected };
|
|
21
|
+
});
|
|
22
|
+
export const SqliteLive = Layer.succeed(Sqlite, { exec });
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Id, NonEmptyString1000, Owner, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, cast, id, jsonArrayFrom, jsonObjectFrom, } from "@evolu/common";
|
|
2
|
+
export type { EvoluError, Mnemonic, OwnerId, SyncState } from "@evolu/common";
|
|
3
|
+
export declare const create: <From, To extends import("@evolu/common").Schema>(schema: import("@effect/schema/Schema").Schema<From, To>, config?: Partial<import("@evolu/common").Config> | undefined) => import("@evolu/common-react").ReactHooks<To>;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,IAAI,EACJ,EAAE,EACF,aAAa,EACb,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE9E,eAAO,MAAM,MAAM,2NAkBlB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DbWorkerLive, FetchLive, NanoIdLive, SecretBoxLive, SyncWorkerLive, } from "@evolu/common";
|
|
2
|
+
import { makeReactHooksForPlatform } from "@evolu/common-react";
|
|
3
|
+
import { Layer } from "effect";
|
|
4
|
+
import { AppStateLive, Bip39Live, FlushSyncLive, PlatformLive, SyncLockLive, } from "./PlatformLive.js";
|
|
5
|
+
import { SqliteLive } from "./SqliteLive.js";
|
|
6
|
+
// Public API. It must be copy-pasted to all Evolu UI libs because re-exporting
|
|
7
|
+
// from @evolu/common/Public is not working for some reason.
|
|
8
|
+
export { Id, NonEmptyString1000, Owner, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, cast, id, jsonArrayFrom, jsonObjectFrom, } from "@evolu/common";
|
|
9
|
+
export const create = makeReactHooksForPlatform(Layer.use(DbWorkerLive, Layer.mergeAll(SqliteLive, Bip39Live, NanoIdLive, Layer.use(SyncWorkerLive, Layer.mergeAll(SyncLockLive, FetchLive, SecretBoxLive)))), Layer.use(AppStateLive, PlatformLive), PlatformLive, Bip39Live, NanoIdLive, FlushSyncLive);
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evolu/react-native",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Evolu for React Native",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"evolu",
|
|
7
|
+
"react-native",
|
|
8
|
+
"react-hooks"
|
|
9
|
+
],
|
|
10
|
+
"author": "Daniel Steigerwald <daniel@steigerwald.cz>",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": "evoluhq/evolu",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/evoluhq/evolu/issues"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://evolu.dev",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"react-native": {
|
|
26
|
+
"./index.js": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/**",
|
|
30
|
+
"src/**",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"expo-updates": "^0.18.13"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"eslint": "^8.50.0",
|
|
38
|
+
"expo": "^49.0.11",
|
|
39
|
+
"expo-sqlite": "~11.6.0",
|
|
40
|
+
"react-native": "^0.72.5",
|
|
41
|
+
"typescript": "^5.2.2",
|
|
42
|
+
"vitest": "^0.34.5",
|
|
43
|
+
"@evolu/common": "1.0.0",
|
|
44
|
+
"@evolu/common-react": "1.0.0",
|
|
45
|
+
"@evolu/tsconfig": "0.0.2",
|
|
46
|
+
"eslint-config-evolu": "0.0.2"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@evolu/common-react": "^1.0.0",
|
|
50
|
+
"expo": "^49.0.11",
|
|
51
|
+
"expo-sqlite": "~11.6.0",
|
|
52
|
+
"react-native": "^0.72.4"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=18.16"
|
|
59
|
+
},
|
|
60
|
+
"sideEffects": false,
|
|
61
|
+
"scripts": {
|
|
62
|
+
"dev": "tsc --watch",
|
|
63
|
+
"build": "rm -rf dist && tsc",
|
|
64
|
+
"lint": "TIMING=1 eslint src --ext .ts,.tsx",
|
|
65
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
66
|
+
"format": "prettier --write \"src/*.{ts,tsx,md}\""
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppState,
|
|
3
|
+
Bip39,
|
|
4
|
+
FlushSync,
|
|
5
|
+
InvalidMnemonicError,
|
|
6
|
+
Mnemonic,
|
|
7
|
+
Platform,
|
|
8
|
+
SyncLock,
|
|
9
|
+
} from "@evolu/common";
|
|
10
|
+
import NetInfo, { NetInfoState } from "@react-native-community/netinfo";
|
|
11
|
+
import {
|
|
12
|
+
generateMnemonic,
|
|
13
|
+
mnemonicToSeed,
|
|
14
|
+
validateMnemonic,
|
|
15
|
+
} from "@scure/bip39";
|
|
16
|
+
import { wordlist } from "@scure/bip39/wordlists/english";
|
|
17
|
+
import { Effect, Function, Layer } from "effect";
|
|
18
|
+
import { reloadAsync } from "expo-updates";
|
|
19
|
+
import { DevSettings, AppState as ReactNativeAppState } from "react-native";
|
|
20
|
+
|
|
21
|
+
export const PlatformLive = Layer.succeed(Platform, {
|
|
22
|
+
name: "react-native",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const FlushSyncLive = Layer.succeed(FlushSync, Function.constVoid);
|
|
26
|
+
|
|
27
|
+
export const SyncLockLive = Layer.effect(
|
|
28
|
+
SyncLock,
|
|
29
|
+
Effect.sync(() => {
|
|
30
|
+
let hasLock = false;
|
|
31
|
+
|
|
32
|
+
const acquire: SyncLock["acquire"] = Effect.sync(() => {
|
|
33
|
+
if (hasLock) return false;
|
|
34
|
+
hasLock = true;
|
|
35
|
+
return true;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const release: SyncLock["release"] = Effect.sync(() => {
|
|
39
|
+
hasLock = false;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return { acquire, release };
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export const AppStateLive = Layer.effect(
|
|
47
|
+
AppState,
|
|
48
|
+
Effect.sync(() => {
|
|
49
|
+
const onFocus: AppState["onFocus"] = (callback) => {
|
|
50
|
+
let state = ReactNativeAppState.currentState;
|
|
51
|
+
ReactNativeAppState.addEventListener("change", (nextState): void => {
|
|
52
|
+
if (state.match(/inactive|background/) && nextState === "active")
|
|
53
|
+
callback();
|
|
54
|
+
state = nextState;
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const onReconnect: AppState["onReconnect"] = (callback) => {
|
|
59
|
+
let state: NetInfoState | null = null;
|
|
60
|
+
NetInfo.addEventListener((nextState) => {
|
|
61
|
+
if (
|
|
62
|
+
state?.isInternetReachable === false &&
|
|
63
|
+
nextState.isConnected &&
|
|
64
|
+
nextState.isInternetReachable
|
|
65
|
+
)
|
|
66
|
+
callback();
|
|
67
|
+
state = nextState;
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const reset: AppState["reset"] = Effect.sync(() => {
|
|
72
|
+
if (process.env.NODE_ENV === "development") DevSettings.reload();
|
|
73
|
+
else void reloadAsync();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return AppState.of({ onFocus, onReconnect, reset });
|
|
77
|
+
}),
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export const Bip39Live = Layer.succeed(
|
|
81
|
+
Bip39,
|
|
82
|
+
Bip39.of({
|
|
83
|
+
make: Effect.sync(() => generateMnemonic(wordlist, 128) as Mnemonic),
|
|
84
|
+
|
|
85
|
+
toSeed: (mnemonic) => Effect.promise(() => mnemonicToSeed(mnemonic)),
|
|
86
|
+
|
|
87
|
+
parse: (mnemonic) =>
|
|
88
|
+
validateMnemonic(mnemonic, wordlist)
|
|
89
|
+
? Effect.succeed(mnemonic as Mnemonic)
|
|
90
|
+
: Effect.fail<InvalidMnemonicError>({ _tag: "InvalidMnemonicError" }),
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Sqlite, parseJsonResults, valuesToSqliteValues } from "@evolu/common";
|
|
2
|
+
import { Effect, Layer } from "effect";
|
|
3
|
+
import * as SQLite from "expo-sqlite";
|
|
4
|
+
|
|
5
|
+
const db = SQLite.openDatabase("evolu1.db");
|
|
6
|
+
|
|
7
|
+
const exec: Sqlite["exec"] = (arg) =>
|
|
8
|
+
Effect.gen(function* (_) {
|
|
9
|
+
const isSqlString = typeof arg === "string";
|
|
10
|
+
const query: SQLite.Query = {
|
|
11
|
+
sql: isSqlString ? arg : arg.sql,
|
|
12
|
+
args: isSqlString ? [] : valuesToSqliteValues(arg.parameters),
|
|
13
|
+
};
|
|
14
|
+
const { rows, rowsAffected } = yield* _(
|
|
15
|
+
Effect.promise(() =>
|
|
16
|
+
db
|
|
17
|
+
.execAsync([query], false)
|
|
18
|
+
.then((a) => a[0])
|
|
19
|
+
.then((result) => {
|
|
20
|
+
if ("error" in result) throw result.error;
|
|
21
|
+
return result;
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
parseJsonResults(rows);
|
|
26
|
+
return { rows, changes: rowsAffected };
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const SqliteLive = Layer.succeed(Sqlite, { exec });
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DbWorkerLive,
|
|
3
|
+
FetchLive,
|
|
4
|
+
NanoIdLive,
|
|
5
|
+
SecretBoxLive,
|
|
6
|
+
SyncWorkerLive,
|
|
7
|
+
} from "@evolu/common";
|
|
8
|
+
import { makeReactHooksForPlatform } from "@evolu/common-react";
|
|
9
|
+
import { Layer } from "effect";
|
|
10
|
+
import {
|
|
11
|
+
AppStateLive,
|
|
12
|
+
Bip39Live,
|
|
13
|
+
FlushSyncLive,
|
|
14
|
+
PlatformLive,
|
|
15
|
+
SyncLockLive,
|
|
16
|
+
} from "./PlatformLive.js";
|
|
17
|
+
import { SqliteLive } from "./SqliteLive.js";
|
|
18
|
+
|
|
19
|
+
// Public API. It must be copy-pasted to all Evolu UI libs because re-exporting
|
|
20
|
+
// from @evolu/common/Public is not working for some reason.
|
|
21
|
+
export {
|
|
22
|
+
Id,
|
|
23
|
+
NonEmptyString1000,
|
|
24
|
+
Owner,
|
|
25
|
+
PositiveInt,
|
|
26
|
+
SqliteBoolean,
|
|
27
|
+
SqliteDate,
|
|
28
|
+
String,
|
|
29
|
+
String1000,
|
|
30
|
+
cast,
|
|
31
|
+
id,
|
|
32
|
+
jsonArrayFrom,
|
|
33
|
+
jsonObjectFrom,
|
|
34
|
+
} from "@evolu/common";
|
|
35
|
+
// Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
|
|
36
|
+
export type { EvoluError, Mnemonic, OwnerId, SyncState } from "@evolu/common";
|
|
37
|
+
|
|
38
|
+
export const create = makeReactHooksForPlatform(
|
|
39
|
+
Layer.use(
|
|
40
|
+
DbWorkerLive,
|
|
41
|
+
Layer.mergeAll(
|
|
42
|
+
SqliteLive,
|
|
43
|
+
Bip39Live,
|
|
44
|
+
NanoIdLive,
|
|
45
|
+
Layer.use(
|
|
46
|
+
SyncWorkerLive,
|
|
47
|
+
Layer.mergeAll(SyncLockLive, FetchLive, SecretBoxLive),
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
Layer.use(AppStateLive, PlatformLive),
|
|
52
|
+
PlatformLive,
|
|
53
|
+
Bip39Live,
|
|
54
|
+
NanoIdLive,
|
|
55
|
+
FlushSyncLive,
|
|
56
|
+
);
|