@evolu/react-native 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { AppState, Bip39, FlushSync, PlatformName, SyncLock } from "@evolu/common";
2
- import { Layer } from "effect";
2
+ import * as Layer from "effect/Layer";
3
3
  export declare const PlatformNameLive: Layer.Layer<never, never, PlatformName>;
4
4
  export declare const FlushSyncLive: Layer.Layer<never, never, FlushSync>;
5
5
  export declare const SyncLockLive: Layer.Layer<never, never, SyncLock>;
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformLive.d.ts","sourceRoot":"","sources":["../src/PlatformLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EAGT,YAAY,EACZ,QAAQ,EACT,MAAM,eAAe,CAAC;AAQvB,OAAO,EAAoB,KAAK,EAAE,MAAM,QAAQ,CAAC;AAIjD,eAAO,MAAM,gBAAgB,yCAA8C,CAAC;AAE5E,eAAO,MAAM,aAAa,sCAA+C,CAAC;AAE1E,eAAO,MAAM,YAAY,qCAexB,CAAC;AAEF,eAAO,MAAM,YAAY,qCA4BxB,CAAC;AAEF,eAAO,MAAM,SAAS,kCAYrB,CAAC"}
1
+ {"version":3,"file":"PlatformLive.d.ts","sourceRoot":"","sources":["../src/PlatformLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EAGT,YAAY,EACZ,QAAQ,EACT,MAAM,eAAe,CAAC;AAUvB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,eAAO,MAAM,gBAAgB,yCAA8C,CAAC;AAE5E,eAAO,MAAM,aAAa,sCAA+C,CAAC;AAE1E,eAAO,MAAM,YAAY,qCAexB,CAAC;AAEF,eAAO,MAAM,YAAY,qCA4BxB,CAAC;AAEF,eAAO,MAAM,SAAS,kCAYrB,CAAC"}
@@ -2,7 +2,9 @@ import { AppState, Bip39, FlushSync, PlatformName, SyncLock, } from "@evolu/comm
2
2
  import NetInfo from "@react-native-community/netinfo";
3
3
  import { generateMnemonic, mnemonicToSeed, validateMnemonic, } from "@scure/bip39";
4
4
  import { wordlist } from "@scure/bip39/wordlists/english";
5
- import { Effect, Function, Layer } from "effect";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Function from "effect/Function";
7
+ import * as Layer from "effect/Layer";
6
8
  import { reloadAsync } from "expo-updates";
7
9
  import { DevSettings, AppState as ReactNativeAppState } from "react-native";
8
10
  export const PlatformNameLive = Layer.succeed(PlatformName, "react-native");
@@ -1,4 +1,4 @@
1
1
  import { Sqlite } from "@evolu/common";
2
- import { Layer } from "effect";
2
+ import * as Layer from "effect/Layer";
3
3
  export declare const SqliteLive: Layer.Layer<never, never, Sqlite>;
4
4
  //# sourceMappingURL=SqliteLive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SqliteLive.d.ts","sourceRoot":"","sources":["../src/SqliteLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAIP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AA2BvC,eAAO,MAAM,UAAU,mCAAkC,CAAC"}
1
+ {"version":3,"file":"SqliteLive.d.ts","sourceRoot":"","sources":["../src/SqliteLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAIP,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AA2BtC,eAAO,MAAM,UAAU,mCAAkC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Sqlite, ensureSqliteQuery, maybeParseJson, valuesToSqliteValues, } from "@evolu/common";
2
- import { Effect, Layer } from "effect";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
3
4
  import * as SQLite from "expo-sqlite";
4
5
  const db = SQLite.openDatabase("evolu1.db");
5
6
  const exec = (arg) => Effect.gen(function* (_) {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Config, Evolu, InvalidMnemonicError, Mnemonic } from "@evolu/common";
2
- import { Effect } from "effect";
3
- export { Id, NonEmptyString1000, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, canUseDom, cast, id, table, database, } from "@evolu/common";
4
- export type { EvoluError, InvalidMnemonicError, Mnemonic, Owner, OwnerId, SyncState, Timestamp, TimestampError, UnexpectedError, } from "@evolu/common";
2
+ import * as Effect from "effect/Effect";
3
+ export { Id, NonEmptyString1000, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, canUseDom, cast, database, id, table, } from "@evolu/common";
4
+ export type { EvoluError, ExtractRow, InvalidMnemonicError, Mnemonic, Owner, OwnerId, QueryResult, SyncState, Timestamp, TimestampError, UnexpectedError, NotNull, } from "@evolu/common";
5
5
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
6
6
  export * from "@evolu/common-react";
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,KAAK,EAGL,oBAAoB,EACpB,QAAQ,EAKT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAS,MAAM,QAAQ,CAAC;AAavC,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,EAAE,EACF,KAAK,EACL,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,qBAAqB,CAAC;AAWpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,WAAW,wKAAmC,CAAC;AAE5D,0CAA0C;AAC1C,eAAO,MAAM,aAAa,EAAE,CAC1B,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,QAAQ,CAGjD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,KAAK,EAGL,oBAAoB,EACpB,QAAQ,EAKT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAcxC,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,EAAE,EACF,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,cAAc,qBAAqB,CAAC;AAWpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,WAAW,wKAAmC,CAAC;AAE5D,0CAA0C;AAC1C,eAAO,MAAM,aAAa,EAAE,CAC1B,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,QAAQ,CAGjD,CAAC"}
package/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { Bip39, DbWorkerLive, EvoluCommonLive, FetchLive, NanoIdLive, SecretBoxLive, SyncWorkerLive, makeCreateEvolu, } from "@evolu/common";
2
- import { Effect, Layer } from "effect";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
3
4
  import { AppStateLive, Bip39Live, FlushSyncLive, SyncLockLive, } from "./PlatformLive.js";
4
5
  import { SqliteLive } from "./SqliteLive.js";
5
6
  // export * from "@evolu/common/public"
6
7
  // https://github.com/facebook/metro/issues/1128
7
8
  // So we have to export manually.
8
9
  // TODO: Recheck after RN 0.73 release.
9
- export { Id, NonEmptyString1000, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, canUseDom, cast, id, table, database, } from "@evolu/common";
10
+ export { Id, NonEmptyString1000, PositiveInt, SqliteBoolean, SqliteDate, String, String1000, canUseDom, cast, database, id, table, } from "@evolu/common";
10
11
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
11
12
  export * from "@evolu/common-react";
12
13
  /** Evolu for native platform. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/react-native",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Evolu for React Native",
5
5
  "keywords": [
6
6
  "evolu",
@@ -34,19 +34,19 @@
34
34
  "expo-updates": "^0.18.17"
35
35
  },
36
36
  "devDependencies": {
37
- "eslint": "^8.54.0",
37
+ "eslint": "^8.56.0",
38
38
  "expo": "^49.0.21",
39
39
  "expo-sqlite": "~11.3.3",
40
40
  "react-native": "0.72.6",
41
41
  "typescript": "^5.3.3",
42
- "vitest": "^1.0.4",
43
- "@evolu/common": "3.0.0",
44
- "@evolu/common-react": "4.0.0",
42
+ "vitest": "^1.1.0",
43
+ "@evolu/common": "3.0.8",
44
+ "@evolu/common-react": "4.0.2",
45
45
  "@evolu/tsconfig": "0.0.2",
46
46
  "eslint-config-evolu": "1.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@evolu/common-react": "^4.0.0",
49
+ "@evolu/common-react": "^4.0.2",
50
50
  "expo": "^49.0.20",
51
51
  "expo-sqlite": "~11.3.3",
52
52
  "react-native": "^0.72.4"
@@ -14,7 +14,9 @@ import {
14
14
  validateMnemonic,
15
15
  } from "@scure/bip39";
16
16
  import { wordlist } from "@scure/bip39/wordlists/english";
17
- import { Effect, Function, Layer } from "effect";
17
+ import * as Effect from "effect/Effect";
18
+ import * as Function from "effect/Function";
19
+ import * as Layer from "effect/Layer";
18
20
  import { reloadAsync } from "expo-updates";
19
21
  import { DevSettings, AppState as ReactNativeAppState } from "react-native";
20
22
 
package/src/SqliteLive.ts CHANGED
@@ -4,7 +4,8 @@ import {
4
4
  maybeParseJson,
5
5
  valuesToSqliteValues,
6
6
  } from "@evolu/common";
7
- import { Effect, Layer } from "effect";
7
+ import * as Effect from "effect/Effect";
8
+ import * as Layer from "effect/Layer";
8
9
  import * as SQLite from "expo-sqlite";
9
10
 
10
11
  const db = SQLite.openDatabase("evolu1.db");
package/src/index.ts CHANGED
@@ -12,7 +12,8 @@ import {
12
12
  SyncWorkerLive,
13
13
  makeCreateEvolu,
14
14
  } from "@evolu/common";
15
- import { Effect, Layer } from "effect";
15
+ import * as Effect from "effect/Effect";
16
+ import * as Layer from "effect/Layer";
16
17
  import {
17
18
  AppStateLive,
18
19
  Bip39Live,
@@ -35,20 +36,23 @@ export {
35
36
  String1000,
36
37
  canUseDom,
37
38
  cast,
39
+ database,
38
40
  id,
39
41
  table,
40
- database,
41
42
  } from "@evolu/common";
42
43
  export type {
43
44
  EvoluError,
45
+ ExtractRow,
44
46
  InvalidMnemonicError,
45
47
  Mnemonic,
46
48
  Owner,
47
49
  OwnerId,
50
+ QueryResult,
48
51
  SyncState,
49
52
  Timestamp,
50
53
  TimestampError,
51
54
  UnexpectedError,
55
+ NotNull,
52
56
  } from "@evolu/common";
53
57
  export { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
54
58