k8s-deploy-helper 1.5.0 → 1.5.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/bin/cli.js CHANGED
@@ -8,7 +8,7 @@ const program = new Command();
8
8
  program
9
9
  .name('k8s-deploy')
10
10
  .description('Build and deploy apps to Kubernetes')
11
- .version('0.3.0');
11
+ .version('1.5.2');
12
12
 
13
13
  program
14
14
  .command('init')
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.2",
4
4
  "description": "CLI tool to build, push and deploy applications to Kubernetes",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,6 @@ FROM node:18-alpine
9
9
  WORKDIR /app
10
10
 
11
11
  COPY ${backendDir}/package*.json ./
12
- RUN npm install
13
12
 
14
13
  COPY ${backendDir} .
15
14
 
@@ -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
  }