@freestyle-sh/with-dev-server 0.1.7 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ type DevServerOptions = {
12
12
  installServiceName(): string;
13
13
  };
14
14
  devCommandPty?: VmPtySessionLike;
15
+ env?: Record<string, string>;
15
16
  };
16
17
  type DevServerResolvedOptions = {
17
18
  templateRepo?: string;
@@ -24,6 +25,7 @@ type DevServerResolvedOptions = {
24
25
  installServiceName(): string;
25
26
  };
26
27
  devCommandPty?: VmPtySessionLike;
28
+ env?: Record<string, string>;
27
29
  };
28
30
  declare const createSnapshotSpec: (options: DevServerResolvedOptions) => VmSpec;
29
31
  declare class VmDevServerInstance extends VmWithInstance {
package/dist/index.js CHANGED
@@ -19,18 +19,21 @@ const createSnapshotSpec = (options) => {
19
19
  services: [
20
20
  {
21
21
  name: "dev-server-install",
22
- bash: options.installCommand,
22
+ bash: `set -e
23
+ ${options.installCommand}`,
23
24
  mode: "oneshot",
24
25
  workdir: options.workdir,
25
26
  after: [options.runtime.installServiceName()],
26
- requires: [options.runtime.installServiceName()]
27
+ requires: [options.runtime.installServiceName()],
28
+ env: options.env
27
29
  },
28
30
  {
29
31
  name: "dev-server",
30
32
  bash: resolvedDevCommand,
31
33
  after: ["dev-server-install"],
32
34
  requires: ["dev-server-install"],
33
- workdir: options.workdir
35
+ workdir: options.workdir,
36
+ env: options.env
34
37
  },
35
38
  {
36
39
  name: "dev-server-health",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freestyle-sh/with-dev-server",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "freestyle-sandboxes": "^0.1.28",