nextjs-cms-kit 0.5.17 → 0.5.19
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/README.md +2 -2
- package/dist/commands/db-config.js +1 -1
- package/dist/commands/setup.js +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/db-config-setup.js +7 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ nextjs-cms-kit [command] [options]
|
|
|
34
34
|
|
|
35
35
|
### `setup`
|
|
36
36
|
|
|
37
|
-
Complete
|
|
37
|
+
Complete nextjs-cms setup wizard. This is the recommended way to set up a new CMS project.
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
nextjs-cms-kit setup
|
|
@@ -54,7 +54,7 @@ nextjs-cms-kit setup --dev # Use development environment
|
|
|
54
54
|
|
|
55
55
|
### `db-config`
|
|
56
56
|
|
|
57
|
-
Initialize or update
|
|
57
|
+
Initialize or update nextjs-cms database configuration.
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
nextjs-cms-kit db-config
|
|
@@ -4,7 +4,7 @@ import { dbConfigSetup } from '../lib/db-config-setup.js';
|
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
6
6
|
export const dbConfigCommand = new Command('db-config')
|
|
7
|
-
.description('Initialize
|
|
7
|
+
.description('Initialize nextjs-cms database configuration')
|
|
8
8
|
.action(async () => {
|
|
9
9
|
try {
|
|
10
10
|
await dbConfigSetup({ dev: dbConfigCommand.parent?.opts().dev ? true : false });
|
package/dist/commands/setup.js
CHANGED
|
@@ -5,7 +5,7 @@ import { setMasterAdmin } from '../lib/set-master-admin.js';
|
|
|
5
5
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import { dbConfigSetup } from '../lib/db-config-setup.js';
|
|
8
|
-
export const setupCommand = new Command('setup').description('Complete
|
|
8
|
+
export const setupCommand = new Command('setup').description('Complete nextjs-cms setup').action(async () => {
|
|
9
9
|
const s = spinner();
|
|
10
10
|
console.log(chalk.hex('#E8DCFF').bold(setupCommand.parent?.name()));
|
|
11
11
|
console.log(setupCommand.parent?.version());
|
|
@@ -18,7 +18,7 @@ export const setupCommand = new Command('setup').description('Complete LZCMS set
|
|
|
18
18
|
console.log(chalk.gray('--------------------------'));
|
|
19
19
|
console.log(chalk.gray(`.......................................................`));
|
|
20
20
|
console.log();
|
|
21
|
-
intro('Setting up
|
|
21
|
+
intro('Setting up nextjs-cms... 🚀');
|
|
22
22
|
try {
|
|
23
23
|
note('Configuring database...');
|
|
24
24
|
await dbConfigSetup({ dev: setupCommand.parent?.opts().dev ? true : false });
|
|
@@ -47,7 +47,7 @@ export const setupCommand = new Command('setup').description('Complete LZCMS set
|
|
|
47
47
|
note('Setting up master admin...');
|
|
48
48
|
await setMasterAdmin();
|
|
49
49
|
note('Master admin configured');
|
|
50
|
-
outro('
|
|
50
|
+
outro('nextjs-cms setup completed successfully! 🎉');
|
|
51
51
|
}
|
|
52
52
|
catch (error) {
|
|
53
53
|
s.stop('Setup failed');
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import { fixMasterAdminCommand } from './commands/fix-master-admin.js';
|
|
|
10
10
|
import { updateSectionsCommand } from './commands/update-sections.js';
|
|
11
11
|
const program = new Command();
|
|
12
12
|
program
|
|
13
|
-
.name('
|
|
14
|
-
.description(chalk.green('
|
|
13
|
+
.name('nextjs-cms-kit')
|
|
14
|
+
.description(chalk.green('nextjs-cms CLI toolkit for managing your nextjs-cms application'))
|
|
15
15
|
.version('0.4.0')
|
|
16
16
|
.option('-d, --dev', 'Use development environment file')
|
|
17
17
|
.action(() => {
|
|
@@ -30,7 +30,7 @@ program.addCommand(updateSectionsCommand);
|
|
|
30
30
|
// Handle unknown commands
|
|
31
31
|
program.on('command:*', (operands) => {
|
|
32
32
|
console.error(chalk.red(`Unknown command: ${operands[0]}`));
|
|
33
|
-
console.log(chalk.gray('Run
|
|
33
|
+
console.log(chalk.gray('Run nextjs-cms-kit --help to see available commands'));
|
|
34
34
|
process.exit(1);
|
|
35
35
|
});
|
|
36
36
|
// Parse arguments
|
|
@@ -28,7 +28,7 @@ function isValidPort(value) {
|
|
|
28
28
|
}
|
|
29
29
|
export async function dbConfigSetup(options) {
|
|
30
30
|
const { dev = false } = options;
|
|
31
|
-
intro(`Welcome to
|
|
31
|
+
intro(`Welcome to nextjs-cms! Let's set up the database...`);
|
|
32
32
|
/**
|
|
33
33
|
* Step 1: Ask for connection credentials
|
|
34
34
|
*/
|
|
@@ -43,7 +43,7 @@ export async function dbConfigSetup(options) {
|
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
if (isCancel(dbHost)) {
|
|
46
|
-
outro(`
|
|
46
|
+
outro(`nextjs-cms init cancelled by user.`);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const dbPort = await text({
|
|
@@ -57,7 +57,7 @@ export async function dbConfigSetup(options) {
|
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
59
|
if (isCancel(dbPort)) {
|
|
60
|
-
outro(`
|
|
60
|
+
outro(`nextjs-cms init cancelled by user.`);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
const dbUser = await text({
|
|
@@ -68,7 +68,7 @@ export async function dbConfigSetup(options) {
|
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
70
|
if (isCancel(dbUser)) {
|
|
71
|
-
outro(`
|
|
71
|
+
outro(`nextjs-cms init cancelled by user.`);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const dbPassword = await text({
|
|
@@ -79,7 +79,7 @@ export async function dbConfigSetup(options) {
|
|
|
79
79
|
},
|
|
80
80
|
});
|
|
81
81
|
if (isCancel(dbPassword)) {
|
|
82
|
-
outro(`
|
|
82
|
+
outro(`nextjs-cms init cancelled by user.`);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -116,7 +116,7 @@ export async function dbConfigSetup(options) {
|
|
|
116
116
|
},
|
|
117
117
|
});
|
|
118
118
|
if (isCancel(dbName)) {
|
|
119
|
-
outro(`
|
|
119
|
+
outro(`nextjs-cms init cancelled by user.`);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
@@ -181,7 +181,7 @@ DB_PASSWORD='${dbPassword}'
|
|
|
181
181
|
else {
|
|
182
182
|
console.warn('⚠️ Environment variables written to file but could not be reloaded in current process');
|
|
183
183
|
}
|
|
184
|
-
outro(`✓ Database setup completed successfully
|
|
184
|
+
outro(`✓ Database setup completed successfully!`);
|
|
185
185
|
}
|
|
186
186
|
catch (error) {
|
|
187
187
|
s.stop('✗ Database setup failed!');
|
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.19",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nextjs-cms-kit": "./dist/index.js"
|
|
7
7
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"glob": "^11.0.3",
|
|
28
28
|
"mysql2": "^3.12.0",
|
|
29
29
|
"zod": "4.1.12",
|
|
30
|
-
"nextjs-cms": "0.5.
|
|
30
|
+
"nextjs-cms": "0.5.19"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/bcrypt": "^6.0.0",
|