@livestore/devtools-expo 0.4.0-dev.22 → 0.4.0-dev.24
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/.tsbuildinfo +1 -1
- package/dist/metro-config.cjs +2 -2
- package/dist/metro-config.cjs.map +1 -1
- package/dist/metro-config.d.cts.map +1 -1
- package/package.json +57 -17
- package/src/metro-config.cts +15 -9
- package/webui/index.html +14 -11
package/dist/metro-config.cjs
CHANGED
|
@@ -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 ||
|
|
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
|
|
@@ -43,7 +43,7 @@ const addLiveStoreDevtoolsMiddleware = (config, options) => {
|
|
|
43
43
|
};
|
|
44
44
|
const enhanceMiddleware = (metroMiddleware, server) => {
|
|
45
45
|
const enhancedMiddleware = previousEnhanceMiddleware(metroMiddleware, server);
|
|
46
|
-
return (req, res, next) => req.url?.startsWith('/_livestore')
|
|
46
|
+
return (req, res, next) => req.url?.startsWith('/_livestore') === true
|
|
47
47
|
? redirectMiddleware(req, res, () => enhancedMiddleware(req, res, next))
|
|
48
48
|
: enhancedMiddleware(req, res, next);
|
|
49
49
|
};
|
|
@@ -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,QAAQ,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"metro-config.cjs","sourceRoot":"","sources":["../src/metro-config.cts"],"names":[],"mappings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,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":"
|
|
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,31 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/devtools-expo",
|
|
3
|
-
"version": "0.4.0-dev.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"@livestore/utils": "0.4.0-dev.22"
|
|
9
|
-
},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"@types/node": "24.10.1",
|
|
12
|
-
"expo": "^54.0.12",
|
|
13
|
-
"vite": "7.2.4"
|
|
3
|
+
"version": "0.4.0-dev.24",
|
|
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
|
-
"
|
|
13
|
+
"expo-module.config.json",
|
|
14
|
+
"webui"
|
|
21
15
|
],
|
|
22
|
-
"
|
|
16
|
+
"type": "module",
|
|
17
|
+
"sideEffects": false,
|
|
23
18
|
"main": "./dist/index.cjs",
|
|
19
|
+
"types": "./dist/index.d.cts",
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@livestore/adapter-node": "^0.4.0-dev.24",
|
|
25
|
+
"@livestore/utils": "^0.4.0-dev.24"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "25.3.3",
|
|
29
|
+
"expo": "54.0.12",
|
|
30
|
+
"vite": "7.3.1"
|
|
31
|
+
},
|
|
24
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-dev.24",
|
|
49
|
+
"@opentelemetry/api": "^1.9.0",
|
|
50
|
+
"@opentelemetry/resources": "^2.2.0",
|
|
51
|
+
"@standard-schema/spec": "^1.1.0",
|
|
52
|
+
"effect": "^3.21.2",
|
|
25
53
|
"expo": "^54.0.12"
|
|
26
54
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
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
|
+
]
|
|
29
69
|
},
|
|
30
70
|
"scripts": {
|
|
31
71
|
"test": "echo No tests yet"
|
package/src/metro-config.cts
CHANGED
|
@@ -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, Layer } =
|
|
3
|
-
|
|
4
|
-
|
|
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', {
|
|
9
|
-
|
|
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 ||
|
|
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
|
|
@@ -72,7 +78,7 @@ const addLiveStoreDevtoolsMiddleware = (config: MutableDeep<MetroConfig>, option
|
|
|
72
78
|
const enhancedMiddleware = previousEnhanceMiddleware(metroMiddleware, server)
|
|
73
79
|
|
|
74
80
|
return (req, res, next) =>
|
|
75
|
-
req.url?.startsWith('/_livestore')
|
|
81
|
+
req.url?.startsWith('/_livestore') === true
|
|
76
82
|
? redirectMiddleware(req, res, () => enhancedMiddleware(req, res, next))
|
|
77
83
|
: enhancedMiddleware(req, res, next)
|
|
78
84
|
}
|
package/webui/index.html
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
<!
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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>
|
|
15
|
-
|
|
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>
|