nextjs-cms 0.9.30 → 0.9.32

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.
Files changed (96) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +279 -279
  3. package/dist/api/actions/pages.d.ts +3 -3
  4. package/dist/api/client.d.ts +30 -0
  5. package/dist/api/client.d.ts.map +1 -0
  6. package/dist/api/client.js +82 -0
  7. package/dist/api/index.d.ts +1 -974
  8. package/dist/api/index.d.ts.map +1 -1
  9. package/dist/api/index.js +0 -13
  10. package/dist/api/lib/serverActions.d.ts +13 -49
  11. package/dist/api/lib/serverActions.d.ts.map +1 -1
  12. package/dist/api/lib/serverActions.js +103 -31
  13. package/dist/api/root.d.ts +18 -1916
  14. package/dist/api/root.d.ts.map +1 -1
  15. package/dist/api/root.js +18 -83
  16. package/dist/api/routers/config.d.ts.map +1 -1
  17. package/dist/api/routers/gallery.d.ts +1 -0
  18. package/dist/api/routers/gallery.d.ts.map +1 -1
  19. package/dist/api/routers/gallery.js +36 -8
  20. package/dist/api/routers/hasItemsSection.d.ts +5 -30
  21. package/dist/api/routers/hasItemsSection.d.ts.map +1 -1
  22. package/dist/api/routers/navigation.d.ts +3 -3
  23. package/dist/api/routers/simpleSection.d.ts +3 -15
  24. package/dist/api/routers/simpleSection.d.ts.map +1 -1
  25. package/dist/api/server.d.ts +2748 -0
  26. package/dist/api/server.d.ts.map +1 -0
  27. package/dist/api/server.js +100 -0
  28. package/dist/api/trpc/error-logging.d.ts +14 -0
  29. package/dist/api/trpc/error-logging.d.ts.map +1 -0
  30. package/dist/api/trpc/error-logging.js +75 -0
  31. package/dist/api/trpc/root.d.ts +3 -3
  32. package/dist/api/trpc/root.d.ts.map +1 -1
  33. package/dist/api/trpc/routers/config.d.ts.map +1 -1
  34. package/dist/api/trpc/routers/hasItemsSection.d.ts.map +1 -1
  35. package/dist/api/trpc/routers/navigation.d.ts +3 -3
  36. package/dist/api/trpc/routers/simpleSection.d.ts.map +1 -1
  37. package/dist/api/trpc/server.d.ts +9 -9
  38. package/dist/api/trpc/server.d.ts.map +1 -1
  39. package/dist/api/utils/async-caller-proxy.d.ts +2 -0
  40. package/dist/api/utils/async-caller-proxy.d.ts.map +1 -0
  41. package/dist/api/utils/async-caller-proxy.js +36 -0
  42. package/dist/api/utils/lazy-caller-proxy.d.ts +2 -0
  43. package/dist/api/utils/lazy-caller-proxy.d.ts.map +1 -0
  44. package/dist/api/utils/lazy-caller-proxy.js +36 -0
  45. package/dist/api/utils/router-types.d.ts +7 -0
  46. package/dist/api/utils/router-types.d.ts.map +1 -0
  47. package/dist/api/utils/router-types.js +0 -0
  48. package/dist/auth/trpc.d.ts +1 -1
  49. package/dist/auth/trpc.d.ts.map +1 -1
  50. package/dist/auth/trpc.js +0 -1
  51. package/dist/cli/lib/db-config.js +10 -10
  52. package/dist/cli/lib/update-sections.d.ts.map +1 -1
  53. package/dist/cli/lib/update-sections.js +29 -24
  54. package/dist/core/config/config-loader.d.ts +2 -2
  55. package/dist/core/db/table-checker/MysqlTable.js +10 -10
  56. package/dist/core/factories/section-factory-with-esbuild.js +9 -9
  57. package/dist/core/factories/section-factory-with-jiti.js +9 -9
  58. package/dist/core/sections/category.d.ts +2 -2
  59. package/dist/core/sections/hasItems.d.ts +2 -2
  60. package/dist/core/sections/section.d.ts +2 -2
  61. package/dist/core/sections/simple.d.ts +2 -2
  62. package/dist/plugins/loader.d.ts +3 -1
  63. package/dist/plugins/loader.d.ts.map +1 -1
  64. package/dist/plugins/loader.js +28 -6
  65. package/dist/plugins/manifest.d.ts +28 -0
  66. package/dist/plugins/manifest.d.ts.map +1 -0
  67. package/dist/plugins/manifest.js +83 -0
  68. package/dist/plugins/registry.d.ts +22 -0
  69. package/dist/plugins/registry.d.ts.map +1 -0
  70. package/dist/plugins/registry.js +25 -0
  71. package/dist/translations/base/en.d.ts +6 -0
  72. package/dist/translations/base/en.d.ts.map +1 -1
  73. package/dist/translations/base/en.js +6 -0
  74. package/dist/translations/client.d.ts +76 -4
  75. package/dist/translations/client.d.ts.map +1 -1
  76. package/dist/translations/server.d.ts +76 -4
  77. package/dist/translations/server.d.ts.map +1 -1
  78. package/dist/utils/log.d.ts +18 -0
  79. package/dist/utils/log.d.ts.map +1 -0
  80. package/dist/utils/log.js +28 -0
  81. package/package.json +1 -1
  82. package/dist/core/fields/dateRange.d.ts +0 -115
  83. package/dist/core/fields/dateRange.d.ts.map +0 -1
  84. package/dist/core/fields/dateRange.js +0 -149
  85. package/dist/translations/locale-cookie.d.ts +0 -24
  86. package/dist/translations/locale-cookie.d.ts.map +0 -1
  87. package/dist/translations/locale-cookie.js +0 -44
  88. package/dist/translations/locale-utils.d.ts +0 -8
  89. package/dist/translations/locale-utils.d.ts.map +0 -1
  90. package/dist/translations/locale-utils.js +0 -11
  91. package/dist/translations/localization.d.ts +0 -40
  92. package/dist/translations/localization.d.ts.map +0 -1
  93. package/dist/translations/localization.js +0 -48
  94. package/dist/validators/dateRange.d.ts +0 -11
  95. package/dist/validators/dateRange.d.ts.map +0 -1
  96. package/dist/validators/dateRange.js +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/api/trpc/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAUjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEvF,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,YAAY;IAC/D,OAAO,CAAC,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAA;IAC3C,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAA+1nB,CAAC;;;;;+BAA0E,CAAC;;;;;;+BAAgH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAt4/B,CAAC;;;;;+BAAuE,CAAC;;;;;;+BAA6G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAtFl4B,OAAO,CAAC,SAAS,CAAC;EAqFvD"}
@@ -0,0 +1,2 @@
1
+ export declare function createAsyncCallerProxy<TCaller>(getCaller: () => Promise<TCaller>): TCaller;
2
+ //# sourceMappingURL=async-caller-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-caller-proxy.d.ts","sourceRoot":"","sources":["../../../src/api/utils/async-caller-proxy.ts"],"names":[],"mappings":"AAWA,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAyB1F"}
@@ -0,0 +1,36 @@
1
+ const resolveCallerPath = (root, path) => {
2
+ let current = root;
3
+ for (const key of path) {
4
+ if (!current || (typeof current !== 'object' && typeof current !== 'function')) {
5
+ return undefined;
6
+ }
7
+ current = current[key];
8
+ }
9
+ return current;
10
+ };
11
+ export function createAsyncCallerProxy(getCaller) {
12
+ const callProcedure = async (path, args) => {
13
+ const caller = await getCaller();
14
+ const proc = resolveCallerPath(caller, path);
15
+ if (typeof proc !== 'function') {
16
+ throw new Error(`tRPC procedure not found: ${path.join('.')}`);
17
+ }
18
+ return proc(...args);
19
+ };
20
+ const createCallerProxy = (path = []) => {
21
+ const proxyTarget = (...args) => callProcedure(path, args);
22
+ return new Proxy(proxyTarget, {
23
+ get(_target, prop) {
24
+ if (prop === 'then')
25
+ return undefined;
26
+ if (typeof prop !== 'string')
27
+ return undefined;
28
+ return createCallerProxy([...path, prop]);
29
+ },
30
+ apply(_target, _thisArg, args) {
31
+ return callProcedure(path, args);
32
+ },
33
+ });
34
+ };
35
+ return createCallerProxy();
36
+ }
@@ -0,0 +1,2 @@
1
+ export declare function createLazyCallerProxy<TCaller>(getCaller: () => Promise<TCaller>): TCaller;
2
+ //# sourceMappingURL=lazy-caller-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy-caller-proxy.d.ts","sourceRoot":"","sources":["../../../src/api/utils/lazy-caller-proxy.ts"],"names":[],"mappings":"AAWA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAyBzF"}
@@ -0,0 +1,36 @@
1
+ const resolveCallerPath = (root, path) => {
2
+ let current = root;
3
+ for (const key of path) {
4
+ if (!current || (typeof current !== 'object' && typeof current !== 'function')) {
5
+ return undefined;
6
+ }
7
+ current = current[key];
8
+ }
9
+ return current;
10
+ };
11
+ export function createLazyCallerProxy(getCaller) {
12
+ const callProcedure = async (path, args) => {
13
+ const caller = await getCaller();
14
+ const proc = resolveCallerPath(caller, path);
15
+ if (typeof proc !== 'function') {
16
+ throw new Error(`tRPC procedure not found: ${path.join('.')}`);
17
+ }
18
+ return proc(...args);
19
+ };
20
+ const createCallerProxy = (path = []) => {
21
+ const proxyTarget = (...args) => callProcedure(path, args);
22
+ return new Proxy(proxyTarget, {
23
+ get(_target, prop) {
24
+ if (prop === 'then')
25
+ return undefined;
26
+ if (typeof prop !== 'string')
27
+ return undefined;
28
+ return createCallerProxy([...path, prop]);
29
+ },
30
+ apply(_target, _thisArg, args) {
31
+ return callProcedure(path, args);
32
+ },
33
+ });
34
+ };
35
+ return createCallerProxy();
36
+ }
@@ -0,0 +1,7 @@
1
+ import type { AnyRouter } from '@trpc/server';
2
+ import type { CoreRouters } from '../root.js';
3
+ export type RouterRecord = Record<string, AnyRouter>;
4
+ export type NonConflictingRouterRecord<TUser extends RouterRecord> = Extract<keyof TUser, keyof CoreRouters> extends never ? TUser : {
5
+ [K in keyof TUser]: K extends keyof CoreRouters ? never : TUser[K];
6
+ };
7
+ //# sourceMappingURL=router-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router-types.d.ts","sourceRoot":"","sources":["../../../src/api/utils/router-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAEpD,MAAM,MAAM,0BAA0B,CAAC,KAAK,SAAS,YAAY,IAC7D,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,WAAW,CAAC,SAAS,KAAK,GAC/C,KAAK,GACL;KACK,CAAC,IAAI,MAAM,KAAK,GAAG,CAAC,SAAS,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;CACrE,CAAA"}
File without changes
@@ -2,5 +2,5 @@ import type { TRPCLink } from '@trpc/client';
2
2
  /**
3
3
  * tRPC link that refreshes the token if it's expired
4
4
  */
5
- export declare const refreshTokenLink: () => TRPCLink</*AppRouter*/ any>;
5
+ export declare const refreshTokenLink: () => TRPCLink<any>;
6
6
  //# sourceMappingURL=trpc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trpc.d.ts","sourceRoot":"","sources":["../../src/auth/trpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAM5C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,QAAQ,CAAC,aAAa,CAAC,GAAG,CA6E7D,CAAA"}
1
+ {"version":3,"file":"trpc.d.ts","sourceRoot":"","sources":["../../src/auth/trpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,QAAQ,CAAC,GAAG,CA6E/C,CAAA"}
package/dist/auth/trpc.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { observable } from '@trpc/server/observable';
2
- // import type { AppRouter } from '../api'
3
2
  import { logout, refreshSession } from './react.js';
4
3
  /**
5
4
  * tRPC link that refreshes the token if it's expired
@@ -140,16 +140,16 @@ export async function dbConfigSetup(options) {
140
140
  /**
141
141
  * Prepare new environment variables block
142
142
  */
143
- const newEnvBlock = `
144
-
145
- ####
146
- # generated by the init script
147
- ####
148
- DB_HOST=${dbHost}
149
- DB_PORT=${dbPort}
150
- DB_NAME=${dbName}
151
- DB_USER=${dbUser}
152
- DB_PASSWORD='${dbPassword}'
143
+ const newEnvBlock = `
144
+
145
+ ####
146
+ # generated by the init script
147
+ ####
148
+ DB_HOST=${dbHost}
149
+ DB_PORT=${dbPort}
150
+ DB_NAME=${dbName}
151
+ DB_USER=${dbUser}
152
+ DB_PASSWORD='${dbPassword}'
153
153
  `;
154
154
  /**
155
155
  * Append the new credentials to the .env file
@@ -1 +1 @@
1
- {"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/update-sections.ts"],"names":[],"mappings":"AAm3EA,wBAAsB,cAAc,CAAC,SAAS,UAAQ,iBAoBrD"}
1
+ {"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/update-sections.ts"],"names":[],"mappings":"AAw3EA,wBAAsB,cAAc,CAAC,SAAS,UAAQ,iBAoBrD"}
@@ -192,7 +192,12 @@ function generateFieldSQL(input) {
192
192
  else if (!input.defaultValue) {
193
193
  fieldSQL += ' DEFAULT NULL';
194
194
  }
195
- if (input.defaultValue !== null && input.defaultValue !== undefined) {
195
+ if (input.defaultValue !== null && input.defaultValue !== undefined && input.required) {
196
+ // Only add sql default when the field is required,
197
+ // to allow null values in non-required fields
198
+ // with defaultValue prop set.
199
+ // Example: Admin cleared the defaultValue of
200
+ // non-required field and submits.
196
201
  fieldSQL += ` DEFAULT '${input.defaultValue}'`;
197
202
  }
198
203
  return fieldSQL;
@@ -384,17 +389,17 @@ function buildLocaleFieldConfig() {
384
389
  });
385
390
  }
386
391
  async function createEditorPhotosTable(localized) {
387
- await db.execute(sql `
388
- CREATE TABLE IF NOT EXISTS \`editor_photos\` (
389
- \`photo\` VARCHAR(100) NOT NULL PRIMARY KEY,
390
- \`section\` VARCHAR(100) NOT NULL,
391
- \`item_id\` VARCHAR(50) NOT NULL,
392
- \`field\` VARCHAR(100) NOT NULL,
393
- \`meta\` LONGTEXT,
394
- ${localized ? sql `\`locale\` VARCHAR(10) NOT NULL,` : sql ``}
395
- \`linked\` BOOLEAN DEFAULT false,
396
- \`created_at\` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
397
- )
392
+ await db.execute(sql `
393
+ CREATE TABLE IF NOT EXISTS \`editor_photos\` (
394
+ \`photo\` VARCHAR(100) NOT NULL PRIMARY KEY,
395
+ \`section\` VARCHAR(100) NOT NULL,
396
+ \`item_id\` VARCHAR(50) NOT NULL,
397
+ \`field\` VARCHAR(100) NOT NULL,
398
+ \`meta\` LONGTEXT,
399
+ ${localized ? sql `\`locale\` VARCHAR(10) NOT NULL,` : sql ``}
400
+ \`linked\` BOOLEAN DEFAULT false,
401
+ \`created_at\` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
402
+ )
398
403
  `);
399
404
  }
400
405
  async function ensureEditorPhotosLocaleColumn(defaultLocaleCode, knownColumns) {
@@ -988,22 +993,22 @@ const main = async (s) => {
988
993
  * Let's see if the table `__nextjs_cms_tables` exists in the database.
989
994
  * If it doesn't, we'll create it using the same schema as `NextJsCmsTablesTable`.
990
995
  */
991
- await db.execute(sql `
992
- CREATE TABLE IF NOT EXISTS __nextjs_cms_tables (
993
- name VARCHAR(100) NOT NULL PRIMARY KEY,
994
- section VARCHAR(200),
995
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
996
- )
996
+ await db.execute(sql `
997
+ CREATE TABLE IF NOT EXISTS __nextjs_cms_tables (
998
+ name VARCHAR(100) NOT NULL PRIMARY KEY,
999
+ section VARCHAR(200),
1000
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
1001
+ )
997
1002
  `);
998
1003
  /**
999
1004
  * Persistent key/value store for CMS-level state that must survive config removal.
1000
1005
  */
1001
- await db.execute(sql `
1002
- CREATE TABLE IF NOT EXISTS __nextjs_cms_config (
1003
- \`key\` VARCHAR(100) NOT NULL PRIMARY KEY,
1004
- \`value\` LONGTEXT,
1005
- updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
1006
- )
1006
+ await db.execute(sql `
1007
+ CREATE TABLE IF NOT EXISTS __nextjs_cms_config (
1008
+ \`key\` VARCHAR(100) NOT NULL PRIMARY KEY,
1009
+ \`value\` LONGTEXT,
1010
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
1011
+ )
1007
1012
  `);
1008
1013
  await db.execute(sql `ALTER TABLE \`__nextjs_cms_config\` MODIFY COLUMN \`value\` LONGTEXT`);
1009
1014
  /**