@faable/faable 1.3.8 → 1.3.9

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.
@@ -40,6 +40,15 @@ class ConfigurationHelper {
40
40
  return;
41
41
  }
42
42
  }
43
+ async checkPackageManager() {
44
+ if (fs.existsSync(path__default.join(process.cwd(), "package-lock.json"))) {
45
+ return "npm";
46
+ }
47
+ if (fs.existsSync(path__default.join(process.cwd(), "yarn.lock"))) {
48
+ return "yarn";
49
+ }
50
+ throw new Error("No package-lock.json or yarn.lock file found");
51
+ }
43
52
  async initializeGithubAction(force = false) {
44
53
  await this.demandConfig();
45
54
  // Already configured
@@ -59,6 +68,7 @@ class ConfigurationHelper {
59
68
  message: "Which app are you deploying",
60
69
  },
61
70
  ], { onCancel });
71
+ const manager = await this.checkPackageManager();
62
72
  const action = {
63
73
  name: "Deploy to Faable",
64
74
  on: {
@@ -82,7 +92,10 @@ class ConfigurationHelper {
82
92
  cache: "yarn",
83
93
  },
84
94
  },
85
- { run: "npm ci" },
95
+ ...(manager == "npm" && [{ run: "npm ci" }]),
96
+ ...(manager == "yarn" && [
97
+ { run: "yarn install --frozen-lockfile" },
98
+ ]),
86
99
  {
87
100
  name: "Deploy to Faable",
88
101
  run: `faable deploy ${app_name}`,
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "access": "public"
28
28
  },
29
29
  "homepage": "https://github.com/faablecloud/faable#readme",
30
- "version": "1.3.8"
30
+ "version": "1.3.9"
31
31
  }