@freestyle-sh/with-dev-server 0.1.1 → 0.1.2

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
@@ -1,6 +1,6 @@
1
1
  import { VmSpec, VmWithInstance, VmWith } from 'freestyle-sandboxes';
2
2
 
3
- declare const createSnapshotSpec: (templateRepo: string) => VmSpec;
3
+ declare const createSnapshotSpec: (templateRepo: string, workdir: string) => VmSpec;
4
4
  declare class VmDevServerInstance extends VmWithInstance {
5
5
  options: {
6
6
  workdir: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VmNodeJs } from '@freestyle-sh/with-nodejs';
2
2
  import { VmSpec, VmWithInstance, VmWith } from 'freestyle-sandboxes';
3
3
 
4
- const createSnapshotSpec = (templateRepo) => {
4
+ const createSnapshotSpec = (templateRepo, workdir) => {
5
5
  const newSpec = new VmSpec({
6
6
  with: {
7
7
  nodejs: new VmNodeJs({})
@@ -20,14 +20,14 @@ const createSnapshotSpec = (templateRepo) => {
20
20
  name: "npm-install",
21
21
  bash: "npm install",
22
22
  mode: "oneshot",
23
- workdir: "/repo"
23
+ workdir
24
24
  },
25
25
  {
26
26
  name: "npm-dev",
27
27
  bash: "npm run dev",
28
28
  after: ["npm-install"],
29
29
  requires: ["npm-install"],
30
- workdir: "/repo"
30
+ workdir
31
31
  },
32
32
  {
33
33
  name: "curl-test",
@@ -41,7 +41,7 @@ done'
41
41
  mode: "oneshot",
42
42
  after: ["npm-dev"],
43
43
  requires: ["npm-dev"],
44
- workdir: "/repo",
44
+ workdir,
45
45
  timeoutSec: 10
46
46
  }
47
47
  ]
@@ -151,7 +151,7 @@ class VmDevServer extends VmWith {
151
151
  if (this.templateRepo) {
152
152
  const composed = this.composeSpecs(
153
153
  spec,
154
- createSnapshotSpec(this.templateRepo)
154
+ createSnapshotSpec(this.templateRepo, this.workdir)
155
155
  );
156
156
  return composed;
157
157
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@freestyle-sh/with-dev-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "freestyle-sandboxes": "^0.1.24",
7
- "@freestyle-sh/with-nodejs": "^0.2.3"
7
+ "@freestyle-sh/with-nodejs": "^0.2.4"
8
8
  },
9
9
  "type": "module",
10
10
  "main": "./dist/index.js",