nextjs-cms 0.5.21 → 0.5.23

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.
@@ -3,7 +3,7 @@ import { db } from '../../db/client.js';
3
3
  import { AdminsTable } from '../../db/schema.js';
4
4
  import { eq } from 'drizzle-orm';
5
5
  import * as z from 'zod';
6
- import bcrypt from 'bcrypt';
6
+ import bcrypt from 'bcryptjs';
7
7
  import { TRPCError } from '@trpc/server';
8
8
  export const accountSettings = router({
9
9
  get: privateProcedure.query(async ({ ctx }) => {
@@ -5,7 +5,7 @@ import { db } from '../../db/client.js';
5
5
  import { AdminPrivilegesTable, AdminsTable } from '../../db/schema.js';
6
6
  import { eq } from 'drizzle-orm';
7
7
  import { TRPCError } from '@trpc/server';
8
- import bcrypt from 'bcrypt';
8
+ import bcrypt from 'bcryptjs';
9
9
  import { customAlphabet } from 'nanoid';
10
10
  import getString from '../../translations/index.js';
11
11
  import path from 'path';
@@ -1,7 +1,7 @@
1
1
  import { db } from '../../db/client.js';
2
2
  import { AccessTokensTable, AdminsTable } from '../../db/schema.js';
3
3
  import { and, eq } from 'drizzle-orm';
4
- import bcrypt from 'bcrypt';
4
+ import bcrypt from 'bcryptjs';
5
5
  import { decodeRefreshToken, encodeJWT, encodeRefreshToken } from '../jwt.js';
6
6
  import { cookies } from 'next/headers';
7
7
  export const authRefresh = async (refreshToken) => {
@@ -10,7 +10,7 @@ import { db } from '../../db/client.js';
10
10
  import { AdminPrivilegesTable } from '../../db/schema.js';
11
11
  import { getCMSConfig } from '../config/index.js';
12
12
  const cmsConfig = getCMSConfig();
13
- const hotMarkerFile = resolve(process.cwd(), 'components/form/helpers/_section-hot-reload.ts');
13
+ const hotMarkerFile = resolve(process.cwd(), 'components/form/helpers/_section-hot-reload.js');
14
14
  // Create a require function that works in ES modules
15
15
  const safeRequire = createRequire(import.meta.url);
16
16
  /**
@@ -122,10 +122,10 @@ export class SectionFactory {
122
122
  `export const sectionSchemaLastUpdated = ${Date.now()}\n`;
123
123
  try {
124
124
  fs.writeFileSync(hotMarkerFile, content, 'utf8');
125
- log('Bumped _section-hot-reload.ts to trigger Next Fast Refresh');
125
+ log('Bumped _section-hot-reload.js to trigger Next Fast Refresh');
126
126
  }
127
127
  catch (err) {
128
- console.error('Failed to bump _section-hot-reload.ts:', err);
128
+ console.error('Failed to bump _section-hot-reload.js:', err);
129
129
  }
130
130
  }
131
131
  // ---------- PUBLIC API ----------
@@ -1,6 +1,6 @@
1
1
  import { Field, baseFieldConfigSchema } from './field.js';
2
2
  import { entityKind } from '../helpers/index.js';
3
- import bcrypt from 'bcrypt';
3
+ import bcrypt from 'bcryptjs';
4
4
  import * as z from 'zod';
5
5
  const passwordValidationTypeSchema = z.strictObject({
6
6
  regex: z.custom().describe('The regex pattern for validation'),
@@ -346,8 +346,8 @@ declare const selectFieldConfigSchema: z.ZodIntersection<z.ZodUnion<readonly [z.
346
346
  }, z.core.$strict>]>, z.ZodObject<{
347
347
  type: z.ZodLiteral<"select">;
348
348
  optionsType: z.ZodEnum<{
349
- db: "db";
350
349
  section: "section";
350
+ db: "db";
351
351
  static: "static";
352
352
  }>;
353
353
  build: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodCustom<SelectField, SelectField>>;
@@ -117,10 +117,7 @@ declare const optionsSchema: z.ZodObject<{
117
117
  */
118
118
  allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
119
119
  fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
120
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
121
120
  name: z.ZodString;
122
- order: z.ZodNumber;
123
- readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
124
121
  db: z.ZodObject<{
125
122
  table: z.ZodString;
126
123
  identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
@@ -144,6 +141,9 @@ declare const optionsSchema: z.ZodObject<{
144
141
  name: z.ZodOptional<z.ZodString>;
145
142
  }, z.core.$strict>>>;
146
143
  }, z.core.$strict>;
144
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
145
+ order: z.ZodNumber;
146
+ readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
147
147
  icon: z.ZodOptional<z.ZodString>;
148
148
  gallery: z.ZodOptional<z.ZodObject<{
149
149
  db: z.ZodObject<{
@@ -214,10 +214,7 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
214
214
  * @default false
215
215
  */
216
216
  allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
217
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
218
217
  name: z.ZodString;
219
- order: z.ZodNumber;
220
- readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
221
218
  db: z.ZodObject<{
222
219
  table: z.ZodString;
223
220
  identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
@@ -241,6 +238,9 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
241
238
  name: z.ZodOptional<z.ZodString>;
242
239
  }, z.core.$strict>>>;
243
240
  }, z.core.$strict>;
241
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
242
+ order: z.ZodNumber;
243
+ readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
244
244
  icon: z.ZodOptional<z.ZodString>;
245
245
  gallery: z.ZodOptional<z.ZodObject<{
246
246
  db: z.ZodObject<{
@@ -355,10 +355,7 @@ declare const optionsSchema: z.ZodObject<{
355
355
  }>>;
356
356
  generateQR: z.ZodOptional<z.ZodBoolean>;
357
357
  fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
358
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
359
358
  name: z.ZodString;
360
- order: z.ZodNumber;
361
- readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
362
359
  db: z.ZodObject<{
363
360
  table: z.ZodString;
364
361
  identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
@@ -382,6 +379,9 @@ declare const optionsSchema: z.ZodObject<{
382
379
  name: z.ZodOptional<z.ZodString>;
383
380
  }, z.core.$strict>>>;
384
381
  }, z.core.$strict>;
382
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
383
+ order: z.ZodNumber;
384
+ readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
385
385
  icon: z.ZodOptional<z.ZodString>;
386
386
  gallery: z.ZodOptional<z.ZodObject<{
387
387
  db: z.ZodObject<{
@@ -569,10 +569,7 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
569
569
  adminGenerated?: boolean | "readonly" | undefined;
570
570
  }>>;
571
571
  generateQR: z.ZodOptional<z.ZodBoolean>;
572
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
573
572
  name: z.ZodString;
574
- order: z.ZodNumber;
575
- readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
576
573
  db: z.ZodObject<{
577
574
  table: z.ZodString;
578
575
  identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
@@ -596,6 +593,9 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
596
593
  name: z.ZodOptional<z.ZodString>;
597
594
  }, z.core.$strict>>>;
598
595
  }, z.core.$strict>;
596
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
597
+ order: z.ZodNumber;
598
+ readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
599
599
  icon: z.ZodOptional<z.ZodString>;
600
600
  gallery: z.ZodOptional<z.ZodObject<{
601
601
  db: z.ZodObject<{
@@ -62,10 +62,7 @@ export declare const baseSectionOptionsSchema: z.ZodObject<{
62
62
  */
63
63
  export declare const baseHelperFunctionOptionsSchema: z.ZodObject<{
64
64
  fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
65
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<Variant, Variant>>>;
66
65
  name: z.ZodString;
67
- order: z.ZodNumber;
68
- readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
69
66
  db: z.ZodObject<{
70
67
  table: z.ZodString;
71
68
  identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
@@ -89,6 +86,9 @@ export declare const baseHelperFunctionOptionsSchema: z.ZodObject<{
89
86
  name: z.ZodOptional<z.ZodString>;
90
87
  }, z.core.$strict>>>;
91
88
  }, z.core.$strict>;
89
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<Variant, Variant>>>;
90
+ order: z.ZodNumber;
91
+ readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
92
92
  icon: z.ZodOptional<z.ZodString>;
93
93
  gallery: z.ZodOptional<z.ZodObject<{
94
94
  db: z.ZodObject<{
@@ -22,8 +22,8 @@ declare const optionsSchema: z.ZodObject<{
22
22
  table: z.ZodString;
23
23
  }, z.core.$strict>;
24
24
  fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
25
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
26
25
  name: z.ZodString;
26
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
27
27
  order: z.ZodNumber;
28
28
  readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
29
29
  icon: z.ZodOptional<z.ZodString>;
@@ -53,8 +53,8 @@ declare const simpleSectionConfigSchema: z.ZodObject<{
53
53
  db: z.ZodObject<{
54
54
  table: z.ZodString;
55
55
  }, z.core.$strict>;
56
- variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
57
56
  name: z.ZodString;
57
+ variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
58
58
  order: z.ZodNumber;
59
59
  readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
60
60
  icon: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextjs-cms",
3
- "version": "0.5.21",
3
+ "version": "0.5.23",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -110,7 +110,7 @@
110
110
  "@t3-oss/env-nextjs": "^0.13.8",
111
111
  "@trpc/server": "^11.4.2",
112
112
  "axios": "^1.8.4",
113
- "bcrypt": "^6.0.0",
113
+ "bcryptjs": "^3.0.3",
114
114
  "chalk": "^5.4.1",
115
115
  "chokidar": "3.6.0",
116
116
  "commander": "^14.0.2",
@@ -125,22 +125,22 @@
125
125
  "jsonwebtoken": "^9.0.2",
126
126
  "lodash-es": "^4.17.21",
127
127
  "mysql2": "^3.12.0",
128
- "next": "^15.5.5",
129
- "next-intl": "^4.1.0",
130
128
  "nodemailer": "^7.0.3",
131
129
  "react": "19.0.0",
132
130
  "react-dom": "19.0.0",
131
+ "sharp": "^0.34.5",
133
132
  "superjson": "^2.2.2",
133
+ "through2": "^4.0.2",
134
134
  "zod": "4.1.12",
135
135
  "zod-i18n-map": "^2.27.0"
136
136
  },
137
137
  "devDependencies": {
138
- "@types/bcrypt": "^6.0.0",
139
138
  "@types/jsonwebtoken": "^9.0.9",
140
139
  "@types/lodash-es": "^4.17.12",
141
140
  "@types/nodemailer": "^6.4.17",
142
141
  "@types/react": "~19.0.0",
143
142
  "@types/react-dom": "^19.0.0",
143
+ "@types/through2": "^2.0.41",
144
144
  "date-fns": "^4.1.0",
145
145
  "dotenv-cli": "^7.4.4",
146
146
  "drizzle-kit": "^0.31.5",
@@ -150,11 +150,11 @@
150
150
  "prettier": "^3.3.3",
151
151
  "recast": "^0.23.11",
152
152
  "tsup": "^8.3.6",
153
- "tsx": "^4.20.6",
154
- "typescript": "^5.9.2",
153
+ "tsx": "^4.21.0",
154
+ "typescript": "^5.9.3",
155
+ "@lzcms/prettier-config": "0.1.0",
155
156
  "@lzcms/eslint-config": "0.3.0",
156
- "@lzcms/tsconfig": "0.1.0",
157
- "@lzcms/prettier-config": "0.1.0"
157
+ "@lzcms/tsconfig": "0.1.0"
158
158
  },
159
159
  "license": "MIT",
160
160
  "keywords": [
@@ -171,7 +171,7 @@
171
171
  "scripts": {
172
172
  "build": "tsc",
173
173
  "dev": "tsc",
174
- "clean": "git clean -xdf .cache .turbo dist node_modules",
174
+ "clean": "git clean -xdf .cache .turbo dist node_modules tsconfig.tsbuildinfo",
175
175
  "typecheck": "tsc --noEmit"
176
176
  }
177
177
  }