@satori-sh/cli 0.0.33 → 0.0.34
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/bin/satori.js +19 -0
- package/package.json +3 -2
package/bin/satori.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
|
|
6
|
+
const modulePath = fileURLToPath(import.meta.url);
|
|
7
|
+
const distPath = join(dirname(modulePath), '..', 'dist', 'index.js');
|
|
8
|
+
|
|
9
|
+
const bunCheck = spawnSync('bun', ['--version'], { stdio: 'ignore' });
|
|
10
|
+
if (bunCheck.status !== 0) {
|
|
11
|
+
console.error('Bun is required to run this CLI. Install Bun from https://bun.sh.');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const result = spawnSync('bun', [distPath, ...process.argv.slice(2)], {
|
|
16
|
+
stdio: 'inherit',
|
|
17
|
+
env: process.env
|
|
18
|
+
});
|
|
19
|
+
process.exit(result.status ?? 0);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satori-sh/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"description": "CLI tool for Satori memory server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"satori": "./
|
|
8
|
+
"satori": "./bin/satori.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "bun run build.ts",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"lint": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
+
"bin",
|
|
17
18
|
"dist",
|
|
18
19
|
"README.md",
|
|
19
20
|
"logo.txt",
|