@solidrt/cli 0.0.1 → 0.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.
- package/package.json +5 -5
- package/src/build.ts +1 -1
- package/src/bun-plugin-solid.ts +2 -19
- package/src/server.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidrt/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Antoine van Wel",
|
|
6
6
|
"type": "module",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"qrcode-generator": "^2.0.4"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"@solidrt/darwin-arm64": "0.0.
|
|
23
|
-
"@solidrt/linux-x64-gnu": "0.0.
|
|
24
|
-
"@solidrt/win32-x64-msvc": "0.0.
|
|
22
|
+
"@solidrt/darwin-arm64": "0.0.2",
|
|
23
|
+
"@solidrt/linux-x64-gnu": "0.0.2",
|
|
24
|
+
"@solidrt/win32-x64-msvc": "0.0.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@solidrt/core": "0.0.
|
|
27
|
+
"@solidrt/core": "0.0.2",
|
|
28
28
|
"typescript": "^5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/src/build.ts
CHANGED
|
@@ -48,7 +48,7 @@ export async function bundleTo(outfile: string) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
async function compileJs(jsCode: string, outfile: string) {
|
|
51
|
-
let compiler = requireBinary("
|
|
51
|
+
let compiler = requireBinary("fluxc")
|
|
52
52
|
let proc = Bun.spawn([compiler], {
|
|
53
53
|
stdin: new Blob([jsCode]),
|
|
54
54
|
stdout: "pipe",
|
package/src/bun-plugin-solid.ts
CHANGED
|
@@ -2,11 +2,8 @@ import { transformAsync } from "@babel/core"
|
|
|
2
2
|
import ts from "@babel/preset-typescript"
|
|
3
3
|
import solid from "babel-preset-solid"
|
|
4
4
|
import { type BunPlugin } from "bun"
|
|
5
|
-
import { resolve } from "path"
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export function solidPlugin(opts: { devBase?: string } = {}): BunPlugin {
|
|
6
|
+
export function solidPlugin(): BunPlugin {
|
|
10
7
|
return {
|
|
11
8
|
name: "bun-plugin-solid",
|
|
12
9
|
setup: (build) => {
|
|
@@ -19,20 +16,6 @@ export function solidPlugin(opts: { devBase?: string } = {}): BunPlugin {
|
|
|
19
16
|
})
|
|
20
17
|
return { contents: transforms?.code ?? "", loader: "js" }
|
|
21
18
|
})
|
|
22
|
-
|
|
23
|
-
// // -- dev-mode qjs:io rewrite ----------------------------------
|
|
24
|
-
// // In dev, user code's `import * as io from "qjs:io"` is redirected
|
|
25
|
-
// // to a wrapper that proxies non-http targets through the dev
|
|
26
|
-
// // server. The wrapper itself imports `qjs:io` -- that one import
|
|
27
|
-
// // is short-circuited to `external` to break the cycle.
|
|
28
|
-
// if (opts.devBase) {
|
|
29
|
-
// build.onResolve({ filter: /^qjs:io$/ }, (args) => {
|
|
30
|
-
// if (args.importer === ioDevPath) {
|
|
31
|
-
// return { path: "qjs:io", external: true }
|
|
32
|
-
// }
|
|
33
|
-
// return { path: ioDevPath }
|
|
34
|
-
// })
|
|
35
|
-
// }
|
|
36
19
|
},
|
|
37
20
|
}
|
|
38
|
-
}
|
|
21
|
+
}
|
package/src/server.ts
CHANGED
|
@@ -44,10 +44,10 @@ export function startServer() {
|
|
|
44
44
|
}),
|
|
45
45
|
)
|
|
46
46
|
entries.sort((a, b) => a.name.localeCompare(b.name))
|
|
47
|
-
return Response.json(entries)
|
|
47
|
+
return Response.json(entries, { headers: { "X-SRT-Type": "directory" } })
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
return new Response(Bun.file(filePath))
|
|
50
|
+
return new Response(Bun.file(filePath), { headers: { "X-SRT-Type": "file" } })
|
|
51
51
|
},
|
|
52
52
|
websocket: {
|
|
53
53
|
open(ws) {
|