k8s-deploy-helper 1.5.0 → 1.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k8s-deploy-helper",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "CLI tool to build, push and deploy applications to Kubernetes",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,16 +1,26 @@
1
1
  import fs from 'fs';
2
2
 
3
3
  export function checkRequiredFiles() {
4
+ const dockerfileExists =
5
+ fs.existsSync('Dockerfile') ||
6
+ fs.existsSync('Dockerfile.backend');
7
+
8
+ const configExists = fs.existsSync('k8s.config.json');
9
+
4
10
  const missing = [];
5
11
 
6
- if (!fs.existsSync('Dockerfile')) missing.push('Dockerfile');
7
- if (!fs.existsSync('k8s.config.json')) missing.push('k8s.config.json');
12
+ if (!dockerfileExists) {
13
+ missing.push('Dockerfile or Dockerfile.backend');
14
+ }
15
+
16
+ if (!configExists) {
17
+ missing.push('k8s.config.json');
18
+ }
8
19
 
9
- if (missing.length) {
20
+ if (missing.length > 0) {
10
21
  console.error('\nāŒ Missing required files:');
11
- missing.forEach(f => console.error(` - ${f}`));
12
-
13
- console.error('\nšŸ‘‰ Run: k8s-deploy init');
22
+ missing.forEach(file => console.error(` - ${file}`));
23
+ console.error('\nšŸ‘‰ Run: k8s-deploy init\n');
14
24
  process.exit(1);
15
25
  }
16
26
  }