nextjs-cms-kit 0.5.36 → 0.5.38
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.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import dotenv from 'dotenv';
|
|
2
3
|
import program from './lib/program.js';
|
|
4
|
+
// Parse command line arguments first
|
|
3
5
|
program.parse(process.argv);
|
|
6
|
+
// Now load environment file based on parsed dev flag
|
|
7
|
+
if (Boolean(program.opts().dev) === true) {
|
|
8
|
+
console.log('🔧 Using development environment file...');
|
|
9
|
+
dotenv.config({ path: '.env.development' });
|
|
10
|
+
process.env.NODE_ENV = 'development';
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
dotenv.config();
|
|
14
|
+
process.env.NODE_ENV = 'production';
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../src/lib/update-sections.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../src/lib/update-sections.ts"],"names":[],"mappings":"AA+iCA,wBAAsB,cAAc,CAAC,SAAS,UAAQ,iBAmBrD"}
|
|
@@ -13,7 +13,6 @@ import { intro, select, spinner, log } from '@clack/prompts';
|
|
|
13
13
|
import { MysqlTableChecker } from 'nextjs-cms/core/db';
|
|
14
14
|
import { generateDrizzleSchema } from './schema-generator.js';
|
|
15
15
|
import { addTableKeys } from './add-table-keys.js';
|
|
16
|
-
import { config } from 'dotenv';
|
|
17
16
|
function generateFieldSQL(input) {
|
|
18
17
|
let fieldSQL = `\`${input.name}\` `;
|
|
19
18
|
/**
|
|
@@ -897,15 +896,9 @@ export async function updateSections(useDevEnv = false) {
|
|
|
897
896
|
try {
|
|
898
897
|
// s.start()
|
|
899
898
|
// Set environment file if dev mode
|
|
900
|
-
// Load environment file based on dev flag
|
|
901
899
|
if (useDevEnv) {
|
|
902
|
-
config({ path: '.env.development' });
|
|
903
900
|
process.env.NODE_ENV = 'development';
|
|
904
901
|
}
|
|
905
|
-
else {
|
|
906
|
-
config();
|
|
907
|
-
process.env.NODE_ENV = 'production';
|
|
908
|
-
}
|
|
909
902
|
// Run the main update logic
|
|
910
903
|
await main(s);
|
|
911
904
|
s.stop('Sections updated successfully');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.38",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"nextjs-cms-kit": "./dist/index.js"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"mysql2": "^3.12.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"nextjs-cms": "0.5.
|
|
35
|
+
"nextjs-cms": "0.5.38"
|
|
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/
|
|
44
|
+
"@lzcms/prettier-config": "0.1.0",
|
|
45
45
|
"@lzcms/tsconfig": "0.1.0",
|
|
46
|
-
"@lzcms/
|
|
46
|
+
"@lzcms/eslint-config": "0.3.0"
|
|
47
47
|
},
|
|
48
48
|
"prettier": "@lzcms/prettier-config",
|
|
49
49
|
"scripts": {
|