nextjs-cms-kit 0.5.9 → 0.5.11
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/commands/db-config.js +1 -1
- package/dist/commands/fix-master-admin.js +1 -1
- package/dist/commands/set-master-admin.js +1 -1
- package/dist/commands/setup.js +3 -3
- package/dist/commands/update-sections.js +2 -2
- package/dist/index.js +5 -5
- package/dist/lib/db-config-setup.js +1 -1
- package/dist/lib/fix-master-admin.js +1 -1
- package/dist/lib/set-master-admin.js +1 -1
- package/dist/lib/update-sections.js +3 -3
- package/package.json +4 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
// import { intro, outro } from '@clack/prompts'
|
|
3
|
-
import { dbConfigSetup } from '../lib/db-config-setup';
|
|
3
|
+
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')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { fixMasterAdmin } from '../lib/fix-master-admin';
|
|
2
|
+
import { fixMasterAdmin } from '../lib/fix-master-admin.js';
|
|
3
3
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
export const fixMasterAdminCommand = new Command('fix-master-admin')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { setMasterAdmin } from '../lib/set-master-admin';
|
|
2
|
+
import { setMasterAdmin } from '../lib/set-master-admin.js';
|
|
3
3
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
export const setMasterAdminCommand = new Command('set-master-admin')
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { note, intro, outro, spinner } from '@clack/prompts';
|
|
3
3
|
import { spawn } from 'child_process';
|
|
4
|
-
import { setMasterAdmin } from '../lib/set-master-admin';
|
|
4
|
+
import { setMasterAdmin } from '../lib/set-master-admin.js';
|
|
5
5
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
|
-
import { dbConfigSetup } from '../lib/db-config-setup';
|
|
7
|
+
import { dbConfigSetup } from '../lib/db-config-setup.js';
|
|
8
8
|
export const setupCommand = new Command('setup').description('Complete LZCMS setup').action(async () => {
|
|
9
9
|
const s = spinner();
|
|
10
10
|
console.log(chalk.hex('#E8DCFF').bold(setupCommand.parent?.name()));
|
|
@@ -25,7 +25,7 @@ export const setupCommand = new Command('setup').description('Complete LZCMS set
|
|
|
25
25
|
note('Generating database schema...');
|
|
26
26
|
// Use spawn to properly handle streams and prevent hanging
|
|
27
27
|
await new Promise((resolve, reject) => {
|
|
28
|
-
const child = spawn('pnpm', ['drizzle-kit', 'push --force', '--config=drizzle.config.
|
|
28
|
+
const child = spawn('pnpm', ['drizzle-kit', 'push --force', '--config=drizzle.config.js'], {
|
|
29
29
|
cwd: process.cwd(),
|
|
30
30
|
env: { ...process.env },
|
|
31
31
|
stdio: 'inherit', // Inherit stdio to prevent hanging and show output directly
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { updateSections } from '../lib/update-sections';
|
|
3
|
-
import { fixMasterAdminPrivileges } from '../lib/actions';
|
|
2
|
+
import { updateSections } from '../lib/update-sections.js';
|
|
3
|
+
import { fixMasterAdminPrivileges } from '../lib/actions.js';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { dbConnectionClose } from 'nextjs-cms/db/client';
|
|
6
6
|
export const updateSectionsCommand = new Command('update-sections')
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { Command } from 'commander';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
// import { intro, outro } from '@clack/prompts'
|
|
5
5
|
// Import command modules
|
|
6
|
-
import { dbConfigCommand } from './commands/db-config';
|
|
7
|
-
import { setupCommand } from './commands/setup';
|
|
8
|
-
import { setMasterAdminCommand } from './commands/set-master-admin';
|
|
9
|
-
import { fixMasterAdminCommand } from './commands/fix-master-admin';
|
|
10
|
-
import { updateSectionsCommand } from './commands/update-sections';
|
|
6
|
+
import { dbConfigCommand } from './commands/db-config.js';
|
|
7
|
+
import { setupCommand } from './commands/setup.js';
|
|
8
|
+
import { setMasterAdminCommand } from './commands/set-master-admin.js';
|
|
9
|
+
import { fixMasterAdminCommand } from './commands/fix-master-admin.js';
|
|
10
|
+
import { updateSectionsCommand } from './commands/update-sections.js';
|
|
11
11
|
const program = new Command();
|
|
12
12
|
program
|
|
13
13
|
.name('lzcms-kit')
|
|
@@ -3,7 +3,7 @@ import { intro, isCancel, outro, text, spinner, note } from '@clack/prompts';
|
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { cwd } from 'process';
|
|
6
|
-
import { reloadAndUpdateEnvironmentVariables } from './reload-env';
|
|
6
|
+
import { reloadAndUpdateEnvironmentVariables } from './reload-env.js';
|
|
7
7
|
/**
|
|
8
8
|
* Removes specific environment variables from the .env file content
|
|
9
9
|
* Removes both the generated comment block and the individual variable lines
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { intro, outro } from '@clack/prompts';
|
|
2
|
-
import { fixMasterAdminPrivileges } from './actions';
|
|
2
|
+
import { fixMasterAdminPrivileges } from './actions.js';
|
|
3
3
|
export async function fixMasterAdmin() {
|
|
4
4
|
intro(`Looking up sections...`);
|
|
5
5
|
await fixMasterAdminPrivileges();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as p from '@clack/prompts';
|
|
2
|
-
import { fixMasterAdminPrivileges, getMasterAdmin, setMaterAdmin } from './actions';
|
|
2
|
+
import { fixMasterAdminPrivileges, getMasterAdmin, setMaterAdmin } from './actions.js';
|
|
3
3
|
export async function setMasterAdmin() {
|
|
4
4
|
p.intro(`Setting up master admin...`);
|
|
5
5
|
/**
|
|
@@ -10,8 +10,8 @@ import { FileField } from 'nextjs-cms/core/fields';
|
|
|
10
10
|
import chalk from 'chalk';
|
|
11
11
|
import { intro, select, spinner, log } from '@clack/prompts';
|
|
12
12
|
import { MysqlTableChecker } from 'nextjs-cms/core/db';
|
|
13
|
-
import { generateDrizzleSchema } from './schema-generator';
|
|
14
|
-
import { addTableKeys } from './add-table-keys';
|
|
13
|
+
import { generateDrizzleSchema } from './schema-generator.js';
|
|
14
|
+
import { addTableKeys } from './add-table-keys.js';
|
|
15
15
|
function generateFieldSQL(input) {
|
|
16
16
|
let fieldSQL = `\`${input.name}\` `;
|
|
17
17
|
/**
|
|
@@ -503,7 +503,7 @@ const main = async (s) => {
|
|
|
503
503
|
*/
|
|
504
504
|
console.log(chalk.white(`Removing existing schema file...`));
|
|
505
505
|
s.start();
|
|
506
|
-
const schemaFilePath = './dynamic-schemas/schema.
|
|
506
|
+
const schemaFilePath = './dynamic-schemas/schema.js';
|
|
507
507
|
try {
|
|
508
508
|
if (fs.existsSync(schemaFilePath)) {
|
|
509
509
|
fs.unlinkSync(schemaFilePath);
|
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.11",
|
|
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.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/bcrypt": "^6.0.0",
|
|
@@ -38,16 +38,15 @@
|
|
|
38
38
|
"tsup": "^8.3.6",
|
|
39
39
|
"tsx": "^4.20.6",
|
|
40
40
|
"typescript": "^5.9.2",
|
|
41
|
-
"@lzcms/eslint-config": "0.3.0",
|
|
42
41
|
"@lzcms/prettier-config": "0.1.0",
|
|
42
|
+
"@lzcms/eslint-config": "0.3.0",
|
|
43
43
|
"@lzcms/tsconfig": "0.1.0"
|
|
44
44
|
},
|
|
45
45
|
"prettier": "@lzcms/prettier-config",
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "tsc
|
|
47
|
+
"build": "tsc",
|
|
48
48
|
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
|
49
49
|
"dev": "tsc",
|
|
50
|
-
"fix-imports": "tsx scripts/fix-imports.ts",
|
|
51
50
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
|
52
51
|
"lint": "eslint",
|
|
53
52
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|