@goosyai/goosy 1.0.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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/goosy.js ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("node:child_process");
4
+ const { chmodSync, existsSync } = require("node:fs");
5
+ const { join } = require("node:path");
6
+
7
+ const platform = { win32: "windows", darwin: "darwin", linux: "linux" }[process.platform];
8
+ const arch = { x64: "amd64", arm64: "arm64" }[process.arch];
9
+ if (!platform || !arch) {
10
+ console.error(`Goosy does not support ${process.platform}/${process.arch}.`);
11
+ process.exit(1);
12
+ }
13
+ const target = `${platform}-${arch}`;
14
+ const binaryName = platform === "windows" ? `goosy-${target}.exe` : `goosy-${target}`;
15
+ const binary = join(__dirname, binaryName);
16
+
17
+ if (!existsSync(binary)) {
18
+ console.error(`Goosy does not provide a binary for ${target}.`);
19
+ console.error("Supported targets: Linux, macOS, and Windows on amd64 or arm64.");
20
+ process.exit(1);
21
+ }
22
+
23
+ if (platform !== "windows") {
24
+ try { chmodSync(binary, 0o755); } catch (_) { /* package files may be read-only */ }
25
+ }
26
+
27
+ const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
28
+ child.on("error", (err) => {
29
+ console.error(`Unable to start Goosy: ${err.message}`);
30
+ process.exit(1);
31
+ });
32
+ child.on("exit", (code, signal) => {
33
+ if (signal) {
34
+ process.kill(process.pid, signal);
35
+ } else {
36
+ process.exit(code ?? 1);
37
+ }
38
+ });
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@goosyai/goosy",
3
+ "version": "1.0.0",
4
+ "description": "AI-powered security scanning and patching CLI",
5
+ "bin": {
6
+ "goosy": "bin/goosy.js"
7
+ },
8
+ "files": [
9
+ "bin"
10
+ ],
11
+ "engines": {
12
+ "node": ">=18"
13
+ },
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/Goosyai/GOOSY-Cli.git"
18
+ }
19
+ }