nextjs-cms 0.9.9 → 0.9.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/api/index.d.ts +3 -3
- package/dist/api/lib/serverActions.d.ts +3 -3
- package/dist/api/root.d.ts +6 -6
- package/dist/api/routers/navigation.d.ts +3 -3
- package/dist/core/sections/category.d.ts +6 -6
- package/dist/core/sections/hasItems.d.ts +6 -6
- package/dist/core/sections/section.d.ts +4 -4
- package/dist/core/sections/simple.d.ts +6 -6
- package/dist/utils/date-bounds.d.ts.map +1 -1
- package/dist/utils/date-bounds.js +5 -3
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-bounds.d.ts","sourceRoot":"","sources":["../../src/utils/date-bounds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-bounds.d.ts","sourceRoot":"","sources":["../../src/utils/date-bounds.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,eAAO,MAAM,eAAe,uDAAwC,CAAA;AAEpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAC5D,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,KAAK,CAAA;AACrD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAA;AAE/D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAMzF;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAW7G;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAM/G;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,CAU9E"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
+
import utc from 'dayjs/plugin/utc.js';
|
|
2
3
|
import * as z from 'zod';
|
|
4
|
+
dayjs.extend(utc);
|
|
3
5
|
export const dateBoundSchema = z.union([z.date(), z.literal('now')]);
|
|
4
6
|
export function resolveDateBoundValue(value) {
|
|
5
7
|
if (value === undefined) {
|
|
@@ -26,11 +28,11 @@ export function serializeDateBoundValue(value) {
|
|
|
26
28
|
export function formatDateForField(date, format) {
|
|
27
29
|
switch (format) {
|
|
28
30
|
case 'timestamp':
|
|
29
|
-
return dayjs(date).format('YYYY-MM-DD HH:mm:ss.SSS');
|
|
31
|
+
return dayjs.utc(date).format('YYYY-MM-DD HH:mm:ss.SSS');
|
|
30
32
|
case 'datetime':
|
|
31
|
-
return dayjs(date).format('YYYY-MM-DD HH:mm:ss');
|
|
33
|
+
return dayjs.utc(date).format('YYYY-MM-DD HH:mm:ss');
|
|
32
34
|
case 'date':
|
|
33
35
|
default:
|
|
34
|
-
return dayjs(date).format('YYYY-MM-DD');
|
|
36
|
+
return dayjs.utc(date).format('YYYY-MM-DD');
|
|
35
37
|
}
|
|
36
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -210,8 +210,8 @@
|
|
|
210
210
|
"tsx": "^4.20.6",
|
|
211
211
|
"typescript": "^5.9.2",
|
|
212
212
|
"@lzcms/eslint-config": "0.3.0",
|
|
213
|
-
"@lzcms/
|
|
214
|
-
"@lzcms/
|
|
213
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
214
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
215
215
|
},
|
|
216
216
|
"license": "MIT",
|
|
217
217
|
"keywords": [
|