@sylphx/cli 0.21.2 → 0.22.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/bin/run.js +3 -5
- package/binaries/linux-x64/sylphx +0 -0
- package/install.js +2 -4
- package/lib/get-binary.js +4 -11
- package/lib/index.js +3 -11
- package/lib/platform.js +1 -9
- package/package.json +62 -62
package/bin/run.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict'
|
|
3
|
-
|
|
4
2
|
/**
|
|
5
3
|
* Thin npm bin shim for the Rust `sylphx` binary.
|
|
6
4
|
* Does not reimplement CLI logic — only resolves and execs the native binary.
|
|
7
5
|
*/
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { spawn } from 'node:child_process'
|
|
8
|
+
import { getBinaryPath } from '../lib/get-binary.js'
|
|
11
9
|
|
|
12
10
|
function main() {
|
|
13
11
|
let binary
|
|
14
12
|
try {
|
|
15
13
|
binary = getBinaryPath()
|
|
16
14
|
} catch (err) {
|
|
17
|
-
console.error(err
|
|
15
|
+
console.error(err?.message ? err.message : String(err))
|
|
18
16
|
process.exit(1)
|
|
19
17
|
}
|
|
20
18
|
|
|
Binary file
|
package/install.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* postinstall: soft-check that the platform optionalDependency landed.
|
|
5
3
|
* Never hard-fails install on optional-missing (npm already soft-fails optionals);
|
|
6
4
|
* prints a clear warning so operators see cargo fallback immediately.
|
|
7
5
|
*/
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { getBinaryPath } from './lib/get-binary.js'
|
|
8
|
+
import { platformKey, platformPackageName } from './lib/platform.js'
|
|
11
9
|
|
|
12
10
|
function main() {
|
|
13
11
|
// Skip in CI pack / offline contexts that set this intentionally
|
package/lib/get-binary.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const path = require('node:path')
|
|
5
|
-
const { platformPackageName, knownPlatforms, platformKey, normalizeArch } = require('./platform')
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { knownPlatforms, normalizeArch, platformKey, platformPackageName } from './platform.js'
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Resolve the absolute path to the native `sylphx` binary.
|
|
@@ -102,9 +100,4 @@ function missingBinaryError(detail) {
|
|
|
102
100
|
return err
|
|
103
101
|
}
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
getBinaryPath,
|
|
107
|
-
binaryFileName,
|
|
108
|
-
vendorDirName,
|
|
109
|
-
missingBinaryError,
|
|
110
|
-
}
|
|
103
|
+
export { getBinaryPath, binaryFileName, vendorDirName, missingBinaryError }
|
package/lib/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { binaryFileName, getBinaryPath } from './get-binary.js'
|
|
2
|
+
import { knownPlatforms, platformKey, platformPackageName } from './platform.js'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
const { platformPackageName, platformKey, knownPlatforms } = require('./platform')
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
getBinaryPath,
|
|
8
|
-
binaryFileName,
|
|
9
|
-
platformPackageName,
|
|
10
|
-
platformKey,
|
|
11
|
-
knownPlatforms,
|
|
12
|
-
}
|
|
4
|
+
export { getBinaryPath, binaryFileName, platformPackageName, platformKey, knownPlatforms }
|
package/lib/platform.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Map host (os, cpu) → optional platform package name.
|
|
5
3
|
* Same pattern as esbuild / @swc / turbo: one meta package + optional native pkgs.
|
|
@@ -31,10 +29,4 @@ function knownPlatforms() {
|
|
|
31
29
|
return Object.keys(PLATFORM_PACKAGES)
|
|
32
30
|
}
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
PLATFORM_PACKAGES,
|
|
36
|
-
platformKey,
|
|
37
|
-
platformPackageName,
|
|
38
|
-
knownPlatforms,
|
|
39
|
-
normalizeArch,
|
|
40
|
-
}
|
|
32
|
+
export { PLATFORM_PACKAGES, platformKey, platformPackageName, knownPlatforms, normalizeArch }
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
2
|
+
"name": "@sylphx/cli",
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"description": "Sylphx Platform CLI \u2014 npm install channel for the Rust `sylphx` binary (same SSOT as crates.io sylphx-cli).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://sylphx.com",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/SylphxAI/platform.git",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/SylphxAI/platform/issues"
|
|
14
|
+
},
|
|
15
|
+
"author": "Sylphx",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"bin": {
|
|
18
|
+
"sylphx": "bin/run.js"
|
|
19
|
+
},
|
|
20
|
+
"main": "lib/index.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"binaries",
|
|
24
|
+
"lib",
|
|
25
|
+
"install.js",
|
|
26
|
+
"README.md",
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "node ./scripts/verify-package.js",
|
|
32
|
+
"test": "node ./scripts/verify-package.js",
|
|
33
|
+
"typecheck": "node ./scripts/verify-package.js",
|
|
34
|
+
"prepack": "node ./scripts/verify-package.js",
|
|
35
|
+
"postinstall": "node ./install.js"
|
|
36
|
+
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@sylphx/cli-linux-x64": "0.22.0",
|
|
39
|
+
"@sylphx/cli-linux-arm64": "0.22.0",
|
|
40
|
+
"@sylphx/cli-darwin-x64": "0.22.0",
|
|
41
|
+
"@sylphx/cli-darwin-arm64": "0.22.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"sylphx",
|
|
48
|
+
"cli",
|
|
49
|
+
"paas",
|
|
50
|
+
"deploy",
|
|
51
|
+
"platform",
|
|
52
|
+
"rust",
|
|
53
|
+
"binary"
|
|
54
|
+
],
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"sylphx": {
|
|
59
|
+
"channel": "rust-native",
|
|
60
|
+
"crate": "sylphx-cli",
|
|
61
|
+
"crateVersion": "0.2.2",
|
|
62
|
+
"binaryName": "sylphx"
|
|
63
|
+
}
|
|
64
64
|
}
|