@livestore/devtools-expo 0.4.0-dev.9 → 0.4.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/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // eslint-disable-next-line unicorn/prefer-module, @typescript-eslint/no-require-imports
4
+ // biome-ignore lint/correctness/useImportExtensions: TypeScript's rewriteRelativeImportExtensions doesn't rewrite require() calls, so we need to use the output extension directly
4
5
  module.exports = require('./metro-config.cjs');
5
6
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";;AAAA,wFAAwF;AACxF,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";;AAAA,wFAAwF;AACxF,mLAAmL;AACnL,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AAGA,mBAAmB,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AAIA,mBAAmB,oBAAoB,CAAA"}
@@ -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 } = require('@livestore/utils/effect');
4
+ const { Effect, Logger, LogLevel, Layer } = 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
  /**
@@ -9,7 +9,7 @@ const { PlatformNode } = require('@livestore/utils/node');
9
9
  */
10
10
  const addLiveStoreDevtoolsMiddleware = (config, options) => {
11
11
  // NOTE in CI we want to skip this
12
- if (process.env.CI || !process.stdout.isTTY) {
12
+ if (process.env.CI !== undefined || process.stdout.isTTY === false) {
13
13
  return;
14
14
  }
15
15
  const host = options.host ?? '0.0.0.0'; // Defaulting to a hostname that can be reached from the device
@@ -18,12 +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
22
  startDevtoolsServer({
22
23
  clientSessionInfo: undefined,
23
24
  schemaPath: options.schemaPath,
24
25
  host,
25
26
  port,
26
- }).pipe(Effect.provide(PlatformNode.NodeHttpClient.layer), Effect.provide(Logger.prettyWithThread('@livestore/devtools-expo:metro-config')), Logger.withMinimumLogLevel(LogLevel.Debug), Effect.tapCauseLogPretty, Effect.runPromise);
27
+ }).pipe(Effect.provide(layer), Logger.withMinimumLogLevel(LogLevel.Debug), Effect.tapCauseLogPretty, Effect.runPromise);
27
28
  })
28
29
  .catch((error) => {
29
30
  console.error(error);
@@ -42,7 +43,7 @@ const addLiveStoreDevtoolsMiddleware = (config, options) => {
42
43
  };
43
44
  const enhanceMiddleware = (metroMiddleware, server) => {
44
45
  const enhancedMiddleware = previousEnhanceMiddleware(metroMiddleware, server);
45
- return (req, res, next) => req.url?.startsWith('/_livestore')
46
+ return (req, res, next) => req.url?.startsWith('/_livestore') === true
46
47
  ? redirectMiddleware(req, res, () => enhancedMiddleware(req, res, next))
47
48
  : enhancedMiddleware(req, res, next);
48
49
  };
@@ -1 +1 @@
1
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,CAAC,CAAC,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"metro-config.d.cts","sourceRoot":"","sources":["../src/metro-config.cts"],"names":[],"mappings":"AAWA,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,SA0DzF,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":"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"}
package/package.json CHANGED
@@ -1,32 +1,72 @@
1
1
  {
2
2
  "name": "@livestore/devtools-expo",
3
- "version": "0.4.0-dev.9",
4
- "sideEffects": false,
5
- "types": "./dist/index.d.cts",
6
- "dependencies": {
7
- "@livestore/adapter-node": "0.4.0-dev.9",
8
- "@livestore/utils": "0.4.0-dev.9"
9
- },
10
- "devDependencies": {
11
- "@types/node": "24.5.2",
12
- "expo": "^54.0.10",
13
- "vite": "7.1.7"
3
+ "version": "0.4.0",
4
+ "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/livestorejs/livestore.git"
14
8
  },
15
9
  "files": [
10
+ "dist",
16
11
  "package.json",
17
- "expo-module.config.json",
18
- "webui",
19
12
  "src",
20
- "dist"
13
+ "expo-module.config.json",
14
+ "webui"
21
15
  ],
22
- "license": "Apache-2.0",
16
+ "type": "module",
17
+ "sideEffects": false,
23
18
  "main": "./dist/index.cjs",
24
- "peerDependencies": {
25
- "expo": "^54.0.10"
26
- },
19
+ "types": "./dist/index.d.cts",
27
20
  "publishConfig": {
28
21
  "access": "public"
29
22
  },
23
+ "dependencies": {
24
+ "@livestore/adapter-node": "^0.4.0",
25
+ "@livestore/utils": "^0.4.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "25.3.3",
29
+ "expo": "54.0.12",
30
+ "vite": "7.3.1"
31
+ },
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",
49
+ "@opentelemetry/api": "^1.9.0",
50
+ "@opentelemetry/resources": "^2.2.0",
51
+ "@standard-schema/spec": "^1.1.0",
52
+ "effect": "^3.21.2",
53
+ "expo": "^54.0.12"
54
+ },
55
+ "$genie": {
56
+ "source": "package.json.genie.ts",
57
+ "warning": "DO NOT EDIT - changes will be overwritten",
58
+ "workspaceClosureDirs": [
59
+ "packages/@livestore/adapter-node",
60
+ "packages/@livestore/common",
61
+ "packages/@livestore/common-cf",
62
+ "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"
68
+ ]
69
+ },
30
70
  "scripts": {
31
71
  "test": "echo No tests yet"
32
72
  }
package/src/index.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  // eslint-disable-next-line unicorn/prefer-module, @typescript-eslint/no-require-imports
2
+ // biome-ignore lint/correctness/useImportExtensions: TypeScript's rewriteRelativeImportExtensions doesn't rewrite require() calls, so we need to use the output extension directly
2
3
  module.exports = require('./metro-config.cjs')
3
4
 
4
5
  export type * from './metro-config.cts'
@@ -1,13 +1,19 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
2
- const { Effect, Logger, LogLevel } =
3
- require('@livestore/utils/effect') as typeof import('@livestore/utils/effect', { with: {
4
- 'resolution-mode': 'import',
5
- }})
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
+ )
6
10
 
7
11
  // eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module, @typescript-eslint/consistent-type-imports
8
- const { PlatformNode } = require('@livestore/utils/node') as typeof import('@livestore/utils/node', { with: {
9
- 'resolution-mode': 'import',
10
- }})
12
+ const { PlatformNode } = require('@livestore/utils/node') as typeof import('@livestore/utils/node', {
13
+ with: {
14
+ 'resolution-mode': 'import',
15
+ },
16
+ })
11
17
 
12
18
  import type { MetroConfig } from 'expo/metro-config'
13
19
 
@@ -18,7 +24,7 @@ import type { Middleware, Options } from './types.ts'
18
24
  */
19
25
  const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, options: Options) => {
20
26
  // NOTE in CI we want to skip this
21
- if (process.env.CI || !process.stdout.isTTY) {
27
+ if (process.env.CI !== undefined || process.stdout.isTTY === false) {
22
28
  return
23
29
  }
24
30
  const host = options.host ?? '0.0.0.0' // Defaulting to a hostname that can be reached from the device
@@ -29,14 +35,18 @@ const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, option
29
35
 
30
36
  import('@livestore/adapter-node/devtools')
31
37
  .then(async ({ startDevtoolsServer }) => {
38
+ const layer = Layer.mergeAll(
39
+ PlatformNode.NodeHttpClient.layer,
40
+ Logger.prettyWithThread('@livestore/devtools-expo:metro-config'),
41
+ )
42
+
32
43
  startDevtoolsServer({
33
44
  clientSessionInfo: undefined,
34
45
  schemaPath: options.schemaPath,
35
46
  host,
36
47
  port,
37
48
  }).pipe(
38
- Effect.provide(PlatformNode.NodeHttpClient.layer),
39
- Effect.provide(Logger.prettyWithThread('@livestore/devtools-expo:metro-config')),
49
+ Effect.provide(layer),
40
50
  Logger.withMinimumLogLevel(LogLevel.Debug),
41
51
  Effect.tapCauseLogPretty,
42
52
  Effect.runPromise,
@@ -68,7 +78,7 @@ const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, option
68
78
  const enhancedMiddleware = previousEnhanceMiddleware(metroMiddleware, server)
69
79
 
70
80
  return (req, res, next) =>
71
- req.url?.startsWith('/_livestore')
81
+ req.url?.startsWith('/_livestore') === true
72
82
  ? redirectMiddleware(req, res, () => enhancedMiddleware(req, res, next))
73
83
  : enhancedMiddleware(req, res, next)
74
84
  }
package/webui/index.html CHANGED
@@ -1,16 +1,19 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>LiveStore DevTools Redirect</title>
7
7
  <script>
8
- const currentUrl = new URL(window.location.href);
9
- const redirectUrl = `http://localhost:${currentUrl.port}/_livestore/node?autoconnect`;
10
- window.location.href = redirectUrl;
8
+ const currentUrl = new URL(window.location.href)
9
+ const redirectUrl = `http://localhost:${currentUrl.port}/_livestore/node?autoconnect`
10
+ window.location.href = redirectUrl
11
11
  </script>
12
- </head>
13
- <body>
14
- <p>If you are not redirected, <a href="javascript:void(0);" onclick="window.location.href=redirectUrl">click here</a>.</p>
15
- </body>
12
+ </head>
13
+ <body>
14
+ <p>
15
+ If you are not redirected,
16
+ <a href="javascript:void(0);" onclick="window.location.href = redirectUrl">click here</a>.
17
+ </p>
18
+ </body>
16
19
  </html>