@corca-org/ceal-host 1.0.5 → 1.0.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.
Files changed (2) hide show
  1. package/bin/launch.js +10 -1
  2. package/package.json +5 -5
package/bin/launch.js CHANGED
@@ -22,10 +22,19 @@ export function launch(input) {
22
22
  }
23
23
  const executableName = process.platform === "win32" ? `${input.binaryName}.exe` : input.binaryName;
24
24
  const launcherPath = process.env.CEAL_LAUNCHER_PATH ?? process.argv[1] ?? null;
25
+ let companionEnvironment = {};
26
+ if (input.companion) {
27
+ try {
28
+ const root = dirname(require.resolve(`${input.companion.packageName}/package.json`));
29
+ companionEnvironment[input.companion.env] = join(root, input.companion.entry);
30
+ } catch {
31
+ return refuse(input.product, `required package ${input.companion.packageName} is unavailable.`);
32
+ }
33
+ }
25
34
  const child = spawn(join(packageRoot, "bin", executableName), process.argv.slice(2), {
26
35
  stdio: "inherit",
27
36
  windowsHide: process.platform === "win32" ? false : undefined,
28
- env: { ...process.env, ...(launcherPath === null ? {} : { CEAL_LAUNCHER_PATH: launcherPath }) },
37
+ env: { ...process.env, ...companionEnvironment, ...(launcherPath === null ? {} : { CEAL_LAUNCHER_PATH: launcherPath }) },
29
38
  });
30
39
  child.once("error", (error) => {
31
40
  process.stderr.write(`${input.product}: could not start the platform binary: ${error.message}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corca-org/ceal-host",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "The Ceal Host lifecycle client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,10 +11,10 @@
11
11
  "ceal-host": "bin/ceal-host.js"
12
12
  },
13
13
  "optionalDependencies": {
14
- "@corca-org/ceal-host-linux-x64": "1.0.5",
15
- "@corca-org/ceal-host-linux-arm64": "1.0.5",
16
- "@corca-org/ceal-host-darwin-arm64": "1.0.5",
17
- "@corca-org/ceal-host-win32-x64": "1.0.5"
14
+ "@corca-org/ceal-host-linux-x64": "1.0.8",
15
+ "@corca-org/ceal-host-linux-arm64": "1.0.8",
16
+ "@corca-org/ceal-host-darwin-arm64": "1.0.8",
17
+ "@corca-org/ceal-host-win32-x64": "1.0.8"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",