@lynshen/cli 0.0.0-stage → 0.8.8

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.
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+
5
+ const packageByPlatform = {
6
+ "linux:x64": "@lynshen/cli-linux-x64",
7
+ "win32:x64": "@lynshen/cli-win32-x64",
8
+ "darwin:arm64": "@lynshen/cli-darwin-arm64",
9
+ "darwin:x64": "@lynshen/cli-darwin-x64"
10
+ };
11
+
12
+ const selector = `${process.platform}:${process.arch}`;
13
+ const packageName = packageByPlatform[selector];
14
+
15
+ if (!packageName) {
16
+ console.error(`Unsupported platform: ${selector}`);
17
+ console.error("Install a release from GitHub Releases for this platform.");
18
+ process.exit(1);
19
+ }
20
+
21
+ const executableName = process.platform === "win32" ? "lynshen.exe" : "lynshen";
22
+
23
+ let executablePath;
24
+ try {
25
+ executablePath = require.resolve(`${packageName}/bin/${executableName}`);
26
+ } catch (error) {
27
+ console.error(`Missing native package ${packageName}.`);
28
+ console.error("Reinstall the package or use a GitHub Release artifact directly.");
29
+ process.exit(1);
30
+ }
31
+
32
+ const result = spawnSync(executablePath, process.argv.slice(2), {
33
+ stdio: "inherit"
34
+ });
35
+
36
+ if (result.error) {
37
+ console.error(result.error.message);
38
+ process.exit(1);
39
+ }
40
+
41
+ if (typeof result.status === "number") {
42
+ process.exit(result.status);
43
+ }
44
+
45
+ process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@lynshen/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.8",
4
+ "description": "LynShen native CLI",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/LynShen-Team/Aogiri-CLI.git",
9
+ "directory": "npm/cli"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "bin": {
15
+ "lynshen": "bin/lynshen.cjs"
16
+ },
17
+ "files": [
18
+ "bin/lynshen.cjs",
19
+ "NOTICE",
20
+ "THIRD-PARTY-NOTICES.txt"
21
+ ],
22
+ "optionalDependencies": {
23
+ "@lynshen/cli-linux-x64": "0.8.8",
24
+ "@lynshen/cli-win32-x64": "0.8.8",
25
+ "@lynshen/cli-darwin-arm64": "0.8.8",
26
+ "@lynshen/cli-darwin-x64": "0.8.8"
27
+ },
28
+ "engines": {
29
+ "node": ">=18"
30
+ }
31
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.