spm-meta 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.
Files changed (3) hide show
  1. package/bin/spm.exe +0 -0
  2. package/bin/spm.js +27 -0
  3. package/package.json +32 -0
package/bin/spm.exe ADDED
Binary file
package/bin/spm.js ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ // Determine OS & Binary name
8
+ const isWindows = process.platform === 'win32';
9
+ const binaryName = isWindows ? 'spm.exe' : 'spm';
10
+
11
+ // Path pointing to the pre-compiled binary
12
+ // In production NPM packages, we typically ship the binary inside a 'bin/' folder next to this script
13
+ const binaryPath = path.join(__dirname, binaryName);
14
+
15
+ if (!fs.existsSync(binaryPath)) {
16
+ console.error(`Error: SPM native binary not found at: ${binaryPath}`);
17
+ console.error('Please make sure the package was installed correctly for your platform.');
18
+ process.exit(1);
19
+ }
20
+
21
+ // Forward all command-line arguments to the compiled Rust binary
22
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
23
+ stdio: 'inherit',
24
+ shell: false
25
+ });
26
+
27
+ process.exit(result.status ?? 0);
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "spm-meta",
3
+ "version": "0.1.0",
4
+ "description": "Soft Package Manager - Universal cross-platform metapackage manager",
5
+ "main": "bin/spm.js",
6
+ "bin": {
7
+ "spm": "bin/spm.js"
8
+ },
9
+ "files": [
10
+ "bin/"
11
+ ],
12
+ "engines": {
13
+ "node": ">=14"
14
+ },
15
+ "keywords": [
16
+ "package-manager",
17
+ "cli",
18
+ "spm",
19
+ "scoop",
20
+ "winget",
21
+ "choco",
22
+ "apt",
23
+ "pacman"
24
+ ],
25
+ "author": "SPM Maintainers",
26
+ "license": "MIT",
27
+ "dependencies": {},
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/shell-windon/spm.git"
31
+ }
32
+ }