@farsight-cda/farsight-deployer 0.0.0-dev.95f41396aeff

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,52 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+
5
+ const platformPackageMap = {
6
+ "linux-x64": {
7
+ packageName: "@farsight-cda/farsight-deployer-linux-x64",
8
+ binaryPath: "bin/Farsight.Deployer"
9
+ }
10
+ };
11
+
12
+ function getPackageForHost() {
13
+ const key = `${process.platform}-${process.arch}`;
14
+ return platformPackageMap[key] ?? null;
15
+ }
16
+
17
+ function resolveHostBinaryPath() {
18
+ const match = getPackageForHost();
19
+ if (!match) {
20
+ const supported = Object.keys(platformPackageMap).join(", ");
21
+ throw new Error(`Unsupported platform '${process.platform}-${process.arch}'. Supported: ${supported}.`);
22
+ }
23
+
24
+ try {
25
+ return require.resolve(`${match.packageName}/${match.binaryPath}`);
26
+ } catch {
27
+ throw new Error(
28
+ `Missing platform binary package '${match.packageName}'. Reinstall with 'npm i -g @farsight-cda/farsight-deployer'.`
29
+ );
30
+ }
31
+ }
32
+
33
+ function run() {
34
+ const binaryPath = resolveHostBinaryPath();
35
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
36
+ stdio: "inherit"
37
+ });
38
+
39
+ if (result.error) {
40
+ throw result.error;
41
+ }
42
+
43
+ process.exit(result.status ?? 1);
44
+ }
45
+
46
+ try {
47
+ run();
48
+ } catch (error) {
49
+ const message = error instanceof Error ? error.message : String(error);
50
+ console.error(`farsight-deployer launcher error: ${message}`);
51
+ process.exit(1);
52
+ }
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@farsight-cda/farsight-deployer",
3
+ "version": "0.0.0-dev.95f41396aeff",
4
+ "description": "Linux self-contained launcher package for the Farsight.Deployer CLI.",
5
+ "license": "MIT",
6
+ "os": [
7
+ "linux"
8
+ ],
9
+ "cpu": [
10
+ "x64"
11
+ ],
12
+ "bin": {
13
+ "farsight-deployer": "bin/farsight-deployer.js"
14
+ },
15
+ "files": [
16
+ "bin/"
17
+ ],
18
+ "optionalDependencies": {
19
+ "@farsight-cda/farsight-deployer-linux-x64": "0.0.0-dev.95f41396aeff"
20
+ },
21
+ "engines": {
22
+ "node": ">=18"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ }
27
+ }