fullvision 0.1.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.
Files changed (2) hide show
  1. package/bin/fullvision +40 -0
  2. package/package.json +21 -0
package/bin/fullvision ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execFileSync } = require("child_process");
5
+ const path = require("path");
6
+ const os = require("os");
7
+
8
+ const PLATFORMS = {
9
+ "darwin-arm64": "@fullvision/darwin-arm64",
10
+ "darwin-x64": "@fullvision/darwin-x64",
11
+ "linux-x64": "@fullvision/linux-x64",
12
+ "win32-x64": "@fullvision/win32-x64",
13
+ };
14
+
15
+ const key = `${os.platform()}-${os.arch()}`;
16
+ const pkg = PLATFORMS[key];
17
+
18
+ if (!pkg) {
19
+ console.error(`Unsupported platform: ${key}`);
20
+ console.error(`Supported: ${Object.keys(PLATFORMS).join(", ")}`);
21
+ process.exit(1);
22
+ }
23
+
24
+ let binPath;
25
+ try {
26
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
27
+ const ext = os.platform() === "win32" ? ".exe" : "";
28
+ binPath = path.join(pkgDir, "bin", `fullvision${ext}`);
29
+ } catch {
30
+ console.error(`Could not find package ${pkg}.`);
31
+ console.error(`Try reinstalling: npm install -g fullvision`);
32
+ process.exit(1);
33
+ }
34
+
35
+ try {
36
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
37
+ } catch (e) {
38
+ if (e.status !== undefined) process.exit(e.status);
39
+ throw e;
40
+ }
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "fullvision",
3
+ "version": "0.1.0",
4
+ "description": "CLI to query your Stripe analytics data",
5
+ "bin": {
6
+ "fullvision": "bin/fullvision"
7
+ },
8
+ "optionalDependencies": {
9
+ "@fullvision/darwin-arm64": "0.1.0",
10
+ "@fullvision/darwin-x64": "0.1.0",
11
+ "@fullvision/linux-x64": "0.1.0",
12
+ "@fullvision/win32-x64": "0.1.0"
13
+ },
14
+ "files": ["bin/fullvision"],
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/fullvision/cli"
19
+ },
20
+ "keywords": ["stripe", "analytics", "cli", "fullvision"]
21
+ }