@pd4castr/cli 0.0.6 → 0.0.7

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/dist/index.js +7 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -798,16 +798,18 @@ async function runModelContainer(dockerImage, webserverPort, ctx) {
798
798
  const outputEnv = `OUTPUT_URL=${webserverURL}/output`;
799
799
  const envs = [...inputEnvs, outputEnv];
800
800
  try {
801
+ const extraRunArgs = [];
802
+ if (env.isWSL) {
803
+ const ip = getWSLMachineIP();
804
+ extraRunArgs.push("--add-host", `${DOCKER_HOSTNAME_WSL}:${ip}`);
805
+ }
801
806
  const args = [
802
807
  "run",
803
808
  "--rm",
809
+ ...extraRunArgs,
804
810
  ...envs.flatMap((env2) => ["--env", env2]),
805
811
  dockerImage
806
812
  ];
807
- if (env.isWSL) {
808
- const ip = getWSLMachineIP();
809
- args.push("--add-host", `${DOCKER_HOSTNAME_WSL}:${ip}`);
810
- }
811
813
  await execa4("docker", args, {
812
814
  cwd: ctx.projectRoot,
813
815
  stdio: "pipe"
@@ -1296,7 +1298,7 @@ import { Command } from "commander";
1296
1298
  // package.json
1297
1299
  var package_default = {
1298
1300
  name: "@pd4castr/cli",
1299
- version: "0.0.6",
1301
+ version: "0.0.7",
1300
1302
  description: "CLI tool for creating, testing, and publishing pd4castr models",
1301
1303
  main: "dist/index.js",
1302
1304
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pd4castr/cli",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "CLI tool for creating, testing, and publishing pd4castr models",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",