@solidrt/cli 0.0.1-exp.8 → 0.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidrt/cli",
3
- "version": "0.0.1-exp.8",
3
+ "version": "0.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Antoine van Wel",
6
6
  "type": "module",
@@ -15,18 +15,16 @@
15
15
  "dependencies": {
16
16
  "@babel/core": "^7.28.5",
17
17
  "@babel/preset-typescript": "^7.28.5",
18
- "babel-preset-solid": "2.0.0-beta.7",
18
+ "babel-preset-solid": "2.0.0-beta.13",
19
19
  "qrcode-generator": "^2.0.4"
20
20
  },
21
21
  "optionalDependencies": {
22
- "@solidrt/darwin-arm64": "0.0.1-exp.8",
23
- "@solidrt/linux-x64-gnu": "0.0.1-exp.8",
24
- "@solidrt/win32-x64-msvc": "0.0.1-exp.8"
22
+ "@solidrt/darwin-arm64": "0.0.1",
23
+ "@solidrt/linux-x64-gnu": "0.0.1",
24
+ "@solidrt/win32-x64-msvc": "0.0.1"
25
25
  },
26
26
  "peerDependencies": {
27
- "@solidjs/signals": "2.0.0-beta.7",
28
- "@solidjs/universal": "2.0.0-beta.7",
29
- "@solidrt/core": "0.0.1-exp.8",
27
+ "@solidrt/core": "0.0.1",
30
28
  "typescript": "^5"
31
29
  },
32
30
  "devDependencies": {
package/src/repl.ts CHANGED
@@ -3,10 +3,13 @@ import { resolve, dirname } from "path"
3
3
  import { readdirSync } from "node:fs"
4
4
  import { state, print, printErr, broadcastStop, shutdown } from "./util"
5
5
  import { bundle } from "./build"
6
- import { startWatcher } from "./watcher"
6
+ import { startWatcher, stopWatcher } from "./watcher"
7
7
 
8
8
  function cmdStop(args: string) {
9
9
  if (!args) {
10
+ stopWatcher()
11
+ state.currentCode = null
12
+ state.source = undefined
10
13
  broadcastStop()
11
14
  print("[cli] Sent stop to all clients")
12
15
  return
package/src/util.ts CHANGED
@@ -11,7 +11,7 @@ export let state = {
11
11
  source: undefined as string | undefined,
12
12
  sourceDir: process.cwd(),
13
13
  child: null as ReturnType<typeof Bun.spawn> | null,
14
- server: null as BunServer<unknown> | null,
14
+ server: null as BunServer<undefined> | null,
15
15
  serverUrl: null as string | null,
16
16
  rl: null as ReadlineInterface | null,
17
17
  }
package/src/watcher.ts CHANGED
@@ -5,6 +5,13 @@ import { bundle } from "./build"
5
5
 
6
6
  let currentWatcher: ReturnType<typeof watch> | null = null
7
7
 
8
+ export function stopWatcher() {
9
+ if (currentWatcher) {
10
+ currentWatcher.close()
11
+ currentWatcher = null
12
+ }
13
+ }
14
+
8
15
  export function startWatcher() {
9
16
  if (!state.source) return
10
17
  let watchDir = dirname(resolve(state.source))