@chillicream/nitro 16.0.0-p.10.1
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 +5 -0
- package/cli.js +58 -0
- package/linux-arm64/nitro +0 -0
- package/linux-musl-x64/nitro +0 -0
- package/linux-x64/nitro +0 -0
- package/osx-arm64/nitro +0 -0
- package/osx-x64/nitro +0 -0
- package/package.json +46 -0
- package/win-x64/nitro.exe +0 -0
- package/win-x86/nitro.exe +0 -0
package/README.md
ADDED
package/cli.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
import { join, dirname } from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import { spawn } from "child_process";
|
|
7
|
+
import { family, GLIBC, MUSL } from "detect-libc";
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
async function resolveBinary() {
|
|
12
|
+
const { platform, arch } = process;
|
|
13
|
+
|
|
14
|
+
const binaries = {
|
|
15
|
+
darwin: {
|
|
16
|
+
x64: "osx-x64/nitro",
|
|
17
|
+
arm64: "osx-arm64/nitro",
|
|
18
|
+
},
|
|
19
|
+
win32: {
|
|
20
|
+
x64: "win-x64/nitro.exe",
|
|
21
|
+
ia32: "win-x86/nitro.exe",
|
|
22
|
+
arm64: "win-arm64/nitro.exe",
|
|
23
|
+
},
|
|
24
|
+
linux: {
|
|
25
|
+
x64: async () => {
|
|
26
|
+
const libc = await family();
|
|
27
|
+
|
|
28
|
+
if (libc === GLIBC) {
|
|
29
|
+
return "linux-x64/nitro";
|
|
30
|
+
} else if (libc === MUSL) {
|
|
31
|
+
return "linux-musl-x64/nitro";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return null;
|
|
35
|
+
},
|
|
36
|
+
arm64: "linux-arm64/nitro",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const binary = binaries[platform]?.[arch];
|
|
41
|
+
if (!binary) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const binaryPath = typeof binary === "function" ? await binary() : binary;
|
|
46
|
+
return binaryPath ? join(__dirname, binaryPath) : null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const bin = await resolveBinary();
|
|
50
|
+
const input = process.argv.slice(2);
|
|
51
|
+
|
|
52
|
+
if (bin !== null) {
|
|
53
|
+
spawn(bin, input, { stdio: "inherit" }).on("exit", process.exit);
|
|
54
|
+
} else {
|
|
55
|
+
throw new Error(
|
|
56
|
+
`Platform "${process.platform} (${process.arch})" not supported.`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
Binary file
|
|
Binary file
|
package/linux-x64/nitro
ADDED
|
Binary file
|
package/osx-arm64/nitro
ADDED
|
Binary file
|
package/osx-x64/nitro
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chillicream/nitro",
|
|
3
|
+
"version": "16.0.0-p.10.1",
|
|
4
|
+
"description": "Nitro CLI",
|
|
5
|
+
"homepage": "https://chillicream.com",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+chttps://github.com/ChilliCream/graphql-platform.git",
|
|
9
|
+
"directory": "src/Nitro/CommandLine/src/chillicream-nitro"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ChilliCream/graphql-platform/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"nitro",
|
|
16
|
+
"fusion",
|
|
17
|
+
"graphql"
|
|
18
|
+
],
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "ChilliCream",
|
|
21
|
+
"url": "https://chillicream.com",
|
|
22
|
+
"email": "info@chillicream.com"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"funding": {
|
|
26
|
+
"type": "opencollective",
|
|
27
|
+
"url": "https://opencollective.com/chillicream"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"bin": "cli.js",
|
|
31
|
+
"files": [
|
|
32
|
+
"cli.js",
|
|
33
|
+
"linux-x64/",
|
|
34
|
+
"linux-musl-x64/",
|
|
35
|
+
"linux-arm64/",
|
|
36
|
+
"osx-x64/",
|
|
37
|
+
"osx-arm64/",
|
|
38
|
+
"win-x64/",
|
|
39
|
+
"win-x86/",
|
|
40
|
+
"win-arm64/"
|
|
41
|
+
],
|
|
42
|
+
"packageManager": "yarn@4.9.4",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"detect-libc": "^2.0.4"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
Binary file
|
|
Binary file
|