movelite 0.1.0
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/README.md +24 -0
- package/bin/movelite.js +35 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# movelite
|
|
2
|
+
|
|
3
|
+
Lightweight Move VM for local development — anvil-like experience for Movement L1.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g movelite
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The installer pulls a pre-compiled binary for your platform via optional dependencies. Supported:
|
|
12
|
+
|
|
13
|
+
- `darwin-arm64` (Apple Silicon)
|
|
14
|
+
- `darwin-x64` (Intel Mac)
|
|
15
|
+
- `linux-x64`
|
|
16
|
+
- `linux-arm64`
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
movelite start --port 8090
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See [github.com/gilbertsahumada/movelite](https://github.com/gilbertsahumada/movelite) for endpoints and integration with [movehat](https://www.npmjs.com/package/movehat).
|
package/bin/movelite.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require("child_process");
|
|
3
|
+
const { dirname, join } = require("path");
|
|
4
|
+
|
|
5
|
+
const PLATFORMS = {
|
|
6
|
+
"darwin-arm64": "movelite-darwin-arm64",
|
|
7
|
+
"darwin-x64": "movelite-darwin-x64",
|
|
8
|
+
"linux-x64": "movelite-linux-x64",
|
|
9
|
+
"linux-arm64": "movelite-linux-arm64",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const key = `${process.platform}-${process.arch}`;
|
|
13
|
+
const pkg = PLATFORMS[key];
|
|
14
|
+
|
|
15
|
+
if (!pkg) {
|
|
16
|
+
console.error(`movelite: unsupported platform ${key}`);
|
|
17
|
+
console.error(`Supported: ${Object.keys(PLATFORMS).join(", ")}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let binary;
|
|
22
|
+
try {
|
|
23
|
+
const pkgJson = require.resolve(`${pkg}/package.json`);
|
|
24
|
+
binary = join(dirname(pkgJson), "bin", "movelite");
|
|
25
|
+
} catch {
|
|
26
|
+
console.error(`movelite: missing platform package "${pkg}"`);
|
|
27
|
+
console.error(`Reinstall movelite or run: npm install ${pkg}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
32
|
+
child.on("exit", (code, signal) => {
|
|
33
|
+
if (signal) process.kill(process.pid, signal);
|
|
34
|
+
else process.exit(code ?? 1);
|
|
35
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "movelite",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Lightweight Move VM for local development — anvil-like experience for Movement L1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/gilbertsahumada/movelite.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"bin": {
|
|
11
|
+
"movelite": "bin/movelite.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin/"
|
|
15
|
+
],
|
|
16
|
+
"optionalDependencies": {
|
|
17
|
+
"movelite-darwin-arm64": "0.1.0",
|
|
18
|
+
"movelite-darwin-x64": "0.1.0",
|
|
19
|
+
"movelite-linux-x64": "0.1.0",
|
|
20
|
+
"movelite-linux-arm64": "0.1.0"
|
|
21
|
+
}
|
|
22
|
+
}
|