@sylphx/cli 0.19.3 → 0.20.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/CHANGELOG.md +15 -814
- package/README.md +41 -445
- package/bin/run.js +41 -0
- package/install.js +37 -0
- package/lib/get-binary.js +98 -0
- package/lib/index.js +12 -0
- package/lib/platform.js +40 -0
- package/package.json +62 -73
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -48572
- package/dist/main.js.map +0 -1
package/lib/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { getBinaryPath, binaryFileName } = require('./get-binary')
|
|
4
|
+
const { platformPackageName, platformKey, knownPlatforms } = require('./platform')
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
getBinaryPath,
|
|
8
|
+
binaryFileName,
|
|
9
|
+
platformPackageName,
|
|
10
|
+
platformKey,
|
|
11
|
+
knownPlatforms,
|
|
12
|
+
}
|
package/lib/platform.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Map host (os, cpu) → optional platform package name.
|
|
5
|
+
* Same pattern as esbuild / @swc / turbo: one meta package + optional native pkgs.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const PLATFORM_PACKAGES = {
|
|
9
|
+
'linux x64': '@sylphx/cli-linux-x64',
|
|
10
|
+
'linux arm64': '@sylphx/cli-linux-arm64',
|
|
11
|
+
'darwin x64': '@sylphx/cli-darwin-x64',
|
|
12
|
+
'darwin arm64': '@sylphx/cli-darwin-arm64',
|
|
13
|
+
'win32 x64': '@sylphx/cli-win32-x64',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function normalizeArch(arch) {
|
|
17
|
+
if (arch === 'x64' || arch === 'amd64') return 'x64'
|
|
18
|
+
if (arch === 'arm64' || arch === 'aarch64') return 'arm64'
|
|
19
|
+
return arch
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function platformKey(platform = process.platform, arch = process.arch) {
|
|
23
|
+
return `${platform} ${normalizeArch(arch)}`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function platformPackageName(platform = process.platform, arch = process.arch) {
|
|
27
|
+
return PLATFORM_PACKAGES[platformKey(platform, arch)] || null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function knownPlatforms() {
|
|
31
|
+
return Object.keys(PLATFORM_PACKAGES)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = {
|
|
35
|
+
PLATFORM_PACKAGES,
|
|
36
|
+
platformKey,
|
|
37
|
+
platformPackageName,
|
|
38
|
+
knownPlatforms,
|
|
39
|
+
normalizeArch,
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,75 +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
|
-
|
|
64
|
-
"ora": "^8.1.0"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@sylphx/contract": "0.23.0",
|
|
68
|
-
"@sylphx/management": "0.15.3",
|
|
69
|
-
"@types/bun": "1.3.14",
|
|
70
|
-
"@types/eventsource": "^1.1.15",
|
|
71
|
-
"@types/node": "^22.0.0",
|
|
72
|
-
"tsup": "^8.3.0",
|
|
73
|
-
"typescript": "^5.9.3"
|
|
74
|
-
}
|
|
2
|
+
"name": "@sylphx/cli",
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"description": "Sylphx Platform CLI — npm install channel for the Rust `sylphx` binary (same SSOT as crates.io sylphx-cli).",
|
|
5
|
+
"type": "commonjs",
|
|
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
|
+
"lib",
|
|
24
|
+
"install.js",
|
|
25
|
+
"README.md",
|
|
26
|
+
"CHANGELOG.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "node ./scripts/verify-package.js",
|
|
31
|
+
"test": "node ./scripts/verify-package.js",
|
|
32
|
+
"typecheck": "node ./scripts/verify-package.js",
|
|
33
|
+
"prepack": "node ./scripts/verify-package.js",
|
|
34
|
+
"postinstall": "node ./install.js"
|
|
35
|
+
},
|
|
36
|
+
"optionalDependencies": {
|
|
37
|
+
"@sylphx/cli-linux-x64": "0.20.0",
|
|
38
|
+
"@sylphx/cli-linux-arm64": "0.20.0",
|
|
39
|
+
"@sylphx/cli-darwin-x64": "0.20.0",
|
|
40
|
+
"@sylphx/cli-darwin-arm64": "0.20.0",
|
|
41
|
+
"@sylphx/cli-win32-x64": "0.20.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.1.1",
|
|
62
|
+
"binaryName": "sylphx"
|
|
63
|
+
}
|
|
75
64
|
}
|
package/dist/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|