@vesk/vesk-cli 0.1.1 → 0.2.8
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/cli.js +15559 -8161
- package/package.json +9 -14
- package/bin/haul.js +0 -49
- package/dist/sidecar.js +0 -9358
package/package.json
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesk/vesk-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
|
|
6
6
|
"bin": {
|
|
7
|
-
"vesk": "./dist/cli.js"
|
|
8
|
-
"haul": "./bin/haul.js"
|
|
7
|
+
"vesk": "./dist/cli.js"
|
|
9
8
|
},
|
|
10
9
|
"main": "./dist/cli.js",
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"@vesk/adapter": "^0.
|
|
13
|
-
"@vesk/compiler": "^0.
|
|
14
|
-
"@vesk/plugin-tailwind": "^0.
|
|
15
|
-
"@vesk/runtime": "^0.
|
|
16
|
-
"esbuild": "^0.25.0",
|
|
11
|
+
"@vesk/adapter": "^0.2.8",
|
|
12
|
+
"@vesk/compiler": "^0.2.8",
|
|
13
|
+
"@vesk/plugin-tailwind": "^0.2.8",
|
|
14
|
+
"@vesk/runtime": "^0.2.8",
|
|
17
15
|
"esrap": "^2.3.0",
|
|
18
|
-
"sharp": "^0.35.3",
|
|
19
16
|
"typescript": "^5.8.0",
|
|
20
17
|
"ws": "^8.18.0",
|
|
21
18
|
"zimmerframe": "^1.1.0"
|
|
@@ -46,10 +43,8 @@
|
|
|
46
43
|
"README.md"
|
|
47
44
|
],
|
|
48
45
|
"optionalDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"@vesk/haul-linux-x64": "^0.1.1",
|
|
53
|
-
"@vesk/haul-win32-x64": "^0.1.1"
|
|
46
|
+
"esbuild": "^0.25.0",
|
|
47
|
+
"esbuild-wasm": "^0.25.0",
|
|
48
|
+
"sharp": "^0.35.3"
|
|
54
49
|
}
|
|
55
50
|
}
|
package/bin/haul.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from 'node:child_process';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import { createRequire } from 'node:module';
|
|
5
|
-
import { dirname, join, resolve } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
|
|
8
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const projectRequire = createRequire(resolve(process.cwd(), 'package.json'));
|
|
10
|
-
|
|
11
|
-
const PLATFORM_BIN = {
|
|
12
|
-
'linux-x64': '@vesk/haul-linux-x64',
|
|
13
|
-
'linux-arm64': '@vesk/haul-linux-arm64',
|
|
14
|
-
'darwin-x64': '@vesk/haul-darwin-x64',
|
|
15
|
-
'darwin-arm64': '@vesk/haul-darwin-arm64',
|
|
16
|
-
'win32-x64': '@vesk/haul-win32-x64',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const key = `${process.platform}-${process.arch}`;
|
|
20
|
-
const pkgName = PLATFORM_BIN[key];
|
|
21
|
-
if (!pkgName) {
|
|
22
|
-
console.error(`[vesk haul] unsupported platform: ${key}`);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let binPath;
|
|
27
|
-
try {
|
|
28
|
-
const binFile = `bin/haul${process.platform === 'win32' ? '.exe' : ''}`;
|
|
29
|
-
binPath = projectRequire.resolve(`${pkgName}/${binFile}`);
|
|
30
|
-
} catch {
|
|
31
|
-
console.error(
|
|
32
|
-
`[vesk haul] ${pkgName} is not installed — haul ships as a platform binary.\n` +
|
|
33
|
-
` Run \`npm install\` again, or install the matching binary for your platform:\n` +
|
|
34
|
-
` npm install ${pkgName}@$(node -p "require('vesk/package.json').version")`,
|
|
35
|
-
);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const env = { ...process.env };
|
|
40
|
-
const sidecar = join(__dirname, '..', 'dist', 'sidecar.js');
|
|
41
|
-
if (existsSync(sidecar)) env.VESK_SIDECAR = sidecar;
|
|
42
|
-
else delete env.VESK_SIDECAR;
|
|
43
|
-
|
|
44
|
-
const result = spawnSync(binPath, process.argv.slice(2), {
|
|
45
|
-
stdio: 'inherit',
|
|
46
|
-
env,
|
|
47
|
-
cwd: process.cwd(),
|
|
48
|
-
});
|
|
49
|
-
process.exit(result.status ?? 1);
|