@engramresearch/srun 0.1.1 → 0.1.3
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 +33 -1
- package/npm/bin/darwin-arm64/srun +0 -0
- package/npm/bin/linux-x64/srun +0 -0
- package/npm/bin/win32-x64/srun.exe +0 -0
- package/npm/srun.js +21 -14
- package/package.json +5 -6
- package/Cargo.lock +0 -632
- package/Cargo.toml +0 -19
- package/src/cli.rs +0 -135
- package/src/detect.rs +0 -232
- package/src/exec.rs +0 -80
- package/src/lib.rs +0 -10
- package/src/main.rs +0 -13
- package/src/manifest.rs +0 -81
- package/src/model.rs +0 -262
- package/src/resolve.rs +0 -269
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ After publishing:
|
|
|
34
34
|
npm install -g @engramresearch/srun
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
The npm package includes prebuilt binaries for supported platforms. Rust/Cargo is only required when building from source.
|
|
38
38
|
|
|
39
39
|
Or run during development:
|
|
40
40
|
|
|
@@ -139,8 +139,40 @@ srun dev --verbose --dry-run
|
|
|
139
139
|
|
|
140
140
|
Shows detection and resolution phases before printing the command.
|
|
141
141
|
|
|
142
|
+
## Release process
|
|
143
|
+
|
|
144
|
+
Releases are published by GitHub Actions from version tags.
|
|
145
|
+
|
|
146
|
+
1. Update the version in `package.json` and `Cargo.toml`.
|
|
147
|
+
2. Run:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm run release:check
|
|
151
|
+
cargo fmt -- --check
|
|
152
|
+
cargo check
|
|
153
|
+
cargo test
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
3. Commit, push, and create a tag:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git tag v0.1.3
|
|
160
|
+
git push origin main v0.1.3
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The workflow builds platform binaries, packages them into the single root npm package, then publishes `@engramresearch/srun`.
|
|
164
|
+
|
|
165
|
+
Required GitHub secret:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
NPM_TOKEN
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Use an npm automation/granular token that can publish under `@engramresearch` and bypass 2FA for CI.
|
|
172
|
+
|
|
142
173
|
## Current limitations
|
|
143
174
|
|
|
175
|
+
- Prebuilt npm binaries currently target Windows x64, Linux x64, and macOS arm64.
|
|
144
176
|
- Monorepo scopes such as `srun dev web` are detected as a future extension but not fully implemented yet.
|
|
145
177
|
- Interactive fallback for custom scripts is not implemented; `srun` reports candidates instead of guessing.
|
|
146
178
|
- Colors and shell integration are intentionally omitted from the MVP.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/npm/srun.js
CHANGED
|
@@ -4,23 +4,30 @@ const { existsSync } = require("node:fs");
|
|
|
4
4
|
const { join, resolve } = require("node:path");
|
|
5
5
|
|
|
6
6
|
const root = resolve(__dirname, "..");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (result.error) {
|
|
17
|
-
console.error(`srun: failed to build Rust binary: ${result.error.message}`);
|
|
18
|
-
process.exit(1);
|
|
7
|
+
const binaryName = process.platform === "win32" ? "srun.exe" : "srun";
|
|
8
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
9
|
+
const packagedBinary = join(__dirname, "bin", platformKey, binaryName);
|
|
10
|
+
const localDevBinary = join(root, "target", "release", binaryName);
|
|
11
|
+
|
|
12
|
+
function resolveBinary() {
|
|
13
|
+
if (existsSync(packagedBinary)) {
|
|
14
|
+
return packagedBinary;
|
|
19
15
|
}
|
|
20
16
|
|
|
21
|
-
if (
|
|
22
|
-
|
|
17
|
+
if (existsSync(localDevBinary)) {
|
|
18
|
+
return localDevBinary;
|
|
23
19
|
}
|
|
20
|
+
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const binary = resolveBinary();
|
|
25
|
+
|
|
26
|
+
if (!binary) {
|
|
27
|
+
console.error(`srun: no bundled binary found for ${platformKey}.`);
|
|
28
|
+
console.error("srun: supported npm platforms are win32-x64, linux-x64, and darwin-arm64.");
|
|
29
|
+
console.error("srun: if you are developing locally, run `cargo build --release` first.");
|
|
30
|
+
process.exit(1);
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
const result = spawnSync(binary, process.argv.slice(2), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engramresearch/srun",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Universal Smart Project Runner",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -12,13 +12,12 @@
|
|
|
12
12
|
"build": "cargo build",
|
|
13
13
|
"test": "cargo test",
|
|
14
14
|
"lint": "cargo clippy",
|
|
15
|
-
"format": "cargo fmt"
|
|
15
|
+
"format": "cargo fmt",
|
|
16
|
+
"release:check": "node npm/check-release.js"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"src",
|
|
21
|
-
"npm",
|
|
19
|
+
"npm/srun.js",
|
|
20
|
+
"npm/bin",
|
|
22
21
|
"README.md",
|
|
23
22
|
"LICENSE"
|
|
24
23
|
],
|