@livestore/devtools-expo 0.4.0 → 0.5.0-dev.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
4
- const { Effect, Logger, LogLevel, Layer } = require('@livestore/utils/effect');
4
+ const { Effect, Logger, Layer, References } = require('@livestore/utils/effect');
5
5
  // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
6
6
  const { PlatformNode } = require('@livestore/utils/node');
7
7
  /**
@@ -18,13 +18,13 @@ const addLiveStoreDevtoolsMiddleware = (config, options) => {
18
18
  process.env.EXPO_PUBLIC_LIVESTORE_DEVTOOLS_URL = `ws://${host}:${port}`;
19
19
  import('@livestore/adapter-node/devtools')
20
20
  .then(async ({ startDevtoolsServer }) => {
21
- const layer = Layer.mergeAll(PlatformNode.NodeHttpClient.layer, Logger.prettyWithThread('@livestore/devtools-expo:metro-config'));
21
+ const layer = Layer.mergeAll(PlatformNode.NodeHttpClient.layerUndici, Logger.layer([Logger.consolePretty()]));
22
22
  startDevtoolsServer({
23
23
  clientSessionInfo: undefined,
24
24
  schemaPath: options.schemaPath,
25
25
  host,
26
26
  port,
27
- }).pipe(Effect.provide(layer), Logger.withMinimumLogLevel(LogLevel.Debug), Effect.tapCauseLogPretty, Effect.runPromise);
27
+ }).pipe(Effect.provide(layer), Effect.provideService(References.MinimumLogLevel, 'Debug'), Effect.tapCauseLogPretty, Effect.runPromise);
28
28
  })
29
29
  .catch((error) => {
30
30
  console.error(error);
@@ -1 +1 @@
1
- {"version":3,"file":"metro-config.cjs","sourceRoot":"","sources":["../src/metro-config.cts"],"names":[],"mappings":";;AAAA,oIAAoI;AACpI,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE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AC,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YACxE,CAAC,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAA;IAED,MAAM,CAAC,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;AACrD,CAAC,CAAA;AAOD,iDAAiD;AACjD,MAAM,CAAC,OAAO,GAAG;IACf,8BAA8B;CAC/B,CAAA"}
@@ -8,6 +8,6 @@ declare const addLiveStoreDevtoolsMiddleware: (config: MutableDeep<MetroConfig>,
8
8
  type MutableDeep<T> = {
9
9
  -readonly [P in keyof T]: MutableDeep<T[P]>;
10
10
  };
11
- export type { addLiveStoreDevtoolsMiddleware };
12
11
  export type { Options } from './types.ts';
12
+ export type { addLiveStoreDevtoolsMiddleware };
13
13
  //# sourceMappingURL=metro-config.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metro-config.d.cts","sourceRoot":"","sources":["../src/metro-config.cts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,YAAY,CAAA;AAErD;;GAEG;AACH,QAAA,MAAM,8BAA8B,GAAI,QAAQ,WAAW,CAAC,WAAW,CAAC,EAAE,SAAS,OAAO,SA8DzF,CAAA;AAED,0CAA0C;AAC1C,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAA;AAOD,YAAY,EAAE,8BAA8B,EAAE,CAAA;AAC9C,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"metro-config.d.cts","sourceRoot":"","sources":["../src/metro-config.cts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,YAAY,CAAA;AAQrD;;GAEG;AACH,QAAA,MAAM,8BAA8B,GAAI,QAAQ,WAAW,CAAC,WAAW,CAAC,EAAE,SAAS,OAAO,SA8DzF,CAAA;AAED,0CAA0C;AAC1C,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAA;AAOD,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,YAAY,EAAE,8BAA8B,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@livestore/devtools-expo",
3
- "version": "0.4.0",
3
+ "version": "0.5.0-dev.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/livestorejs/livestore.git"
7
+ "url": "git+https://github.com/livestorejs/livestore-contrib.git"
8
8
  },
9
9
  "files": [
10
10
  "dist",
@@ -21,8 +21,8 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@livestore/adapter-node": "^0.4.0",
25
- "@livestore/utils": "^0.4.0"
24
+ "@livestore/adapter-node": "0.5.0-dev.0",
25
+ "@livestore/utils": "0.5.0-dev.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "25.3.3",
@@ -30,26 +30,17 @@
30
30
  "vite": "7.3.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@effect/ai": "^0.35.0",
34
- "@effect/cli": "^0.75.1",
35
- "@effect/cluster": "^0.58.2",
36
- "@effect/experimental": "^0.60.0",
37
- "@effect/opentelemetry": "^0.63.0",
38
- "@effect/platform": "^0.96.1",
39
- "@effect/platform-browser": "^0.76.0",
40
- "@effect/platform-bun": "^0.89.0",
41
- "@effect/platform-node": "^0.106.0",
42
- "@effect/printer": "^0.49.0",
43
- "@effect/printer-ansi": "^0.49.0",
44
- "@effect/rpc": "^0.75.1",
45
- "@effect/sql": "^0.51.1",
46
- "@effect/typeclass": "^0.40.0",
47
- "@effect/vitest": "^0.29.0",
48
- "@livestore/devtools-vite": "^0.4.0",
33
+ "@effect/opentelemetry": "^4.0.0-rc.111",
34
+ "@effect/platform-browser": "^4.0.0-rc.111",
35
+ "@effect/platform-bun": "^4.0.0-rc.111",
36
+ "@effect/platform-node": "^4.0.0-rc.111",
37
+ "@effect/platform-node-shared": "^4.0.0-rc.111",
38
+ "@effect/vitest": "^4.0.0-rc.111",
39
+ "@livestore/devtools-vite": "0.5.0-dev.0",
49
40
  "@opentelemetry/api": "^1.9.0",
50
41
  "@opentelemetry/resources": "^2.2.0",
51
42
  "@standard-schema/spec": "^1.1.0",
52
- "effect": "^3.21.2",
43
+ "effect": "^4.0.0-rc.111",
53
44
  "expo": "^54.0.12"
54
45
  },
55
46
  "$genie": {
@@ -57,14 +48,14 @@
57
48
  "warning": "DO NOT EDIT - changes will be overwritten",
58
49
  "workspaceClosureDirs": [
59
50
  "packages/@livestore/adapter-node",
60
- "packages/@livestore/common",
61
- "packages/@livestore/common-cf",
62
51
  "packages/@livestore/devtools-expo",
63
- "packages/@livestore/sqlite-wasm",
64
- "packages/@livestore/utils",
65
- "packages/@livestore/utils-dev",
66
- "packages/@livestore/wa-sqlite",
67
- "packages/@livestore/webmesh"
52
+ "repos/livestore/packages/@livestore/common",
53
+ "repos/livestore/packages/@livestore/common-cf",
54
+ "repos/livestore/packages/@livestore/sqlite-wasm",
55
+ "repos/livestore/packages/@livestore/utils",
56
+ "repos/livestore/packages/@livestore/utils-dev",
57
+ "repos/livestore/packages/@livestore/wa-sqlite",
58
+ "repos/livestore/packages/@livestore/webmesh"
68
59
  ]
69
60
  },
70
61
  "scripts": {
@@ -1,24 +1,15 @@
1
- // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
2
- const { Effect, Logger, LogLevel, Layer } = require('@livestore/utils/effect') as typeof import(
3
- '@livestore/utils/effect',
4
- {
5
- with: {
6
- 'resolution-mode': 'import',
7
- },
8
- }
9
- )
10
-
11
- // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
12
- const { PlatformNode } = require('@livestore/utils/node') as typeof import('@livestore/utils/node', {
13
- with: {
14
- 'resolution-mode': 'import',
15
- },
16
- })
17
-
1
+ import type * as EffectModule from '@livestore/utils/effect' with { 'resolution-mode': 'import' }
2
+ import type * as PlatformNodeModule from '@livestore/utils/node' with { 'resolution-mode': 'import' }
18
3
  import type { MetroConfig } from 'expo/metro-config'
19
4
 
20
5
  import type { Middleware, Options } from './types.ts'
21
6
 
7
+ // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
8
+ const { Effect, Logger, Layer, References } = require('@livestore/utils/effect') as typeof EffectModule
9
+
10
+ // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
11
+ const { PlatformNode } = require('@livestore/utils/node') as typeof PlatformNodeModule
12
+
22
13
  /**
23
14
  * Patches the Metro config to add a middleware via `config.server.enhanceMiddleware`.
24
15
  */
@@ -36,8 +27,8 @@ const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, option
36
27
  import('@livestore/adapter-node/devtools')
37
28
  .then(async ({ startDevtoolsServer }) => {
38
29
  const layer = Layer.mergeAll(
39
- PlatformNode.NodeHttpClient.layer,
40
- Logger.prettyWithThread('@livestore/devtools-expo:metro-config'),
30
+ PlatformNode.NodeHttpClient.layerUndici,
31
+ Logger.layer([Logger.consolePretty()]),
41
32
  )
42
33
 
43
34
  startDevtoolsServer({
@@ -47,7 +38,7 @@ const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, option
47
38
  port,
48
39
  }).pipe(
49
40
  Effect.provide(layer),
50
- Logger.withMinimumLogLevel(LogLevel.Debug),
41
+ Effect.provideService(References.MinimumLogLevel, 'Debug'),
51
42
  Effect.tapCauseLogPretty,
52
43
  Effect.runPromise,
53
44
  )
@@ -96,5 +87,5 @@ module.exports = {
96
87
  addLiveStoreDevtoolsMiddleware,
97
88
  }
98
89
 
99
- export type { addLiveStoreDevtoolsMiddleware }
100
90
  export type { Options } from './types.ts'
91
+ export type { addLiveStoreDevtoolsMiddleware }