nextjs-cms-kit 0.5.33 → 0.5.35

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.
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/lib/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAA;AA+D3C,QAAA,MAAM,OAAO,SAAgB,CAAA;AAoE7B,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/lib/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAA;AAsE3C,QAAA,MAAM,OAAO,SAAgB,CAAA;AA4E7B,eAAe,OAAO,CAAA"}
@@ -2,6 +2,7 @@ import { Command, Option } from 'commander';
2
2
  import chalk from 'chalk';
3
3
  import { existsSync, readFileSync } from 'fs';
4
4
  import { join } from 'path';
5
+ import { config } from 'dotenv';
5
6
  function isNextjsCmsApp() {
6
7
  const cwd = process.cwd();
7
8
  // Check for lz.config.ts file
@@ -29,7 +30,11 @@ function isNextjsCmsApp() {
29
30
  }
30
31
  function shouldSkipValidation() {
31
32
  const args = process.argv.slice(2); // Remove 'node' and script path
32
- return args.includes('-h') || args.includes('--help') || args.includes('-V') || args.includes('--version');
33
+ return (args.includes('-h') ||
34
+ args.includes('--help') ||
35
+ args.includes('-V') ||
36
+ args.includes('--version') ||
37
+ args.includes('-v'));
33
38
  }
34
39
  function validateNextjsCmsApp() {
35
40
  // Skip validation for help and version commands
@@ -49,6 +54,14 @@ function validateNextjsCmsApp() {
49
54
  // Validate that we're in a nextjs-cms app before proceeding
50
55
  validateNextjsCmsApp();
51
56
  const program = new Command();
57
+ // Load environment file based on dev flag
58
+ const isDev = process.argv.includes('-d') || process.argv.includes('--dev');
59
+ if (isDev) {
60
+ config({ path: '.env.development' });
61
+ }
62
+ else {
63
+ config();
64
+ }
52
65
  program
53
66
  .name('nextjs-cms-kit')
54
67
  .option('-d, --dev', 'use development environment file, use -d/--dev before any command to use the development environment file (e.g. nextjs-cms-kit -d setup)', false)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nextjs-cms-kit",
3
3
  "private": false,
4
- "version": "0.5.33",
4
+ "version": "0.5.35",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "nextjs-cms-kit": "./dist/index.js"
@@ -23,7 +23,7 @@
23
23
  "LICENSE"
24
24
  ],
25
25
  "dependencies": {
26
- "@clack/prompts": "^0.10.0",
26
+ "@clack/prompts": "^0.11.0",
27
27
  "bcrypt": "^6.0.0",
28
28
  "chalk": "^5.4.1",
29
29
  "commander": "^14.0.2",
@@ -32,7 +32,7 @@
32
32
  "mysql2": "^3.12.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "nextjs-cms": "0.5.33"
35
+ "nextjs-cms": "0.5.35"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/bcrypt": "^6.0.0",
@@ -41,9 +41,9 @@
41
41
  "prettier": "^3.3.3",
42
42
  "tsx": "^4.20.6",
43
43
  "typescript": "^5.9.2",
44
- "@lzcms/eslint-config": "0.3.0",
45
44
  "@lzcms/prettier-config": "0.1.0",
46
- "@lzcms/tsconfig": "0.1.0"
45
+ "@lzcms/tsconfig": "0.1.0",
46
+ "@lzcms/eslint-config": "0.3.0"
47
47
  },
48
48
  "prettier": "@lzcms/prettier-config",
49
49
  "scripts": {