From a884c6f300823119bfe787c56bbe945037761bd2 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Thu, 29 Aug 2024 12:22:41 +0200 Subject: [PATCH] feat: :sparkles: set type to module and remove cross-env from payload scripts --- package.json | 9 ++-- payload-types.ts | 127 +++++++++++++++++++++++++++++++++++++++++++++++ yarn.lock | 124 ++++++++++++++++++++++----------------------- 3 files changed, 194 insertions(+), 66 deletions(-) create mode 100644 payload-types.ts diff --git a/package.json b/package.json index e7faf9b..ff83f3f 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,13 @@ "name": "localbites-landing-page", "version": "0.1.0", "private": true, + "type": "module", "scripts": { "prepare": "panda codegen", "dev": "next dev --turbo", - "generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", - "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", - "payload": "cross-env NODE_OPTIONS=--no-deprecation payload", + "generate:importmap": "payload generate:importmap", + "generate:types": "payload generate:types", + "payload": "payload", "build": "next build", "start": "next start", "lint": "next lint", @@ -21,7 +22,7 @@ "@payloadcms/translations": "^3.0.0-beta.94", "graphql": "^16.9.0", "lucide-react": "^0.436.0", - "next": "15.0.0-canary.132", + "next": "^15.0.0-canary.134", "next-international": "^1.2.4", "payload": "^3.0.0-beta.94", "react": "19.0.0-rc-eb3ad065-20240822", diff --git a/payload-types.ts b/payload-types.ts new file mode 100644 index 0000000..ecfef0c --- /dev/null +++ b/payload-types.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * This file was automatically generated by Payload. + * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config, + * and re-run `payload generate:types` to regenerate this file. + */ + +export interface Config { + auth: { + users: UserAuthOperations; + }; + collections: { + users: User; + media: Media; + 'payload-preferences': PayloadPreference; + 'payload-migrations': PayloadMigration; + }; + db: { + defaultIDType: string; + }; + globals: {}; + locale: null; + user: User & { + collection: 'users'; + }; +} +export interface UserAuthOperations { + forgotPassword: { + email: string; + password: string; + }; + login: { + email: string; + password: string; + }; + registerFirstUser: { + email: string; + password: string; + }; + unlock: { + email: string; + password: string; + }; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "users". + */ +export interface User { + id: string; + updatedAt: string; + createdAt: string; + email: string; + resetPasswordToken?: string | null; + resetPasswordExpiration?: string | null; + salt?: string | null; + hash?: string | null; + loginAttempts?: number | null; + lockUntil?: string | null; + password?: string | null; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "media". + */ +export interface Media { + id: string; + alt?: string | null; + updatedAt: string; + createdAt: string; + url?: string | null; + thumbnailURL?: string | null; + filename?: string | null; + mimeType?: string | null; + filesize?: number | null; + width?: number | null; + height?: number | null; + focalX?: number | null; + focalY?: number | null; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "payload-preferences". + */ +export interface PayloadPreference { + id: string; + user: { + relationTo: 'users'; + value: string | User; + }; + key?: string | null; + value?: + | { + [k: string]: unknown; + } + | unknown[] + | string + | number + | boolean + | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "payload-migrations". + */ +export interface PayloadMigration { + id: string; + name?: string | null; + batch?: number | null; + updatedAt: string; + createdAt: string; +} +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "auth". + */ +export interface Auth { + [k: string]: unknown; +} + + +declare module 'payload' { + export interface GeneratedTypes extends Config {} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9178456..bbcced1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1580,10 +1580,10 @@ dependencies: sparse-bitfield "^3.0.3" -"@next/env@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/env/-/env-15.0.0-canary.132.tgz#dd1596099bede0a07ed8e49afe4e80d672b618d6" - integrity sha512-LiiDwp0+VWngu3KFcZI/cEyLNEmwpRBJf2jiZJadaJdwQEggiWsageYeZZioAHzqN5aoiBprqquKcbAslBgFbw== +"@next/env@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/env/-/env-15.0.0-canary.134.tgz#2a00bd6eb0afcc4195e8585413c5611d3952558d" + integrity sha512-EfKmizmy7YFPcJeBrYTt8dQbnUdM8SInWOtEyn1qGynf6rwoqp7lMlz2s1p4L6bfRs8B5kqj5Y8XzM5itE3sAA== "@next/env@^15.0.0-canary.104": version "15.0.0-rc.0" @@ -1597,50 +1597,50 @@ dependencies: fast-glob "3.3.1" -"@next/swc-darwin-arm64@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-canary.132.tgz#90e0bcef5cad8d7ace8f3cb629ffb770d3d08bd6" - integrity sha512-XsaK6Xl5Zt1CnDt+mDbs3c8YQKQuNiKT+92dKeVNjy3WthgEm/VeqzGIIz0+kvDKSSm25rX8T2tiM0VbCdXodQ== - -"@next/swc-darwin-x64@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-canary.132.tgz#54efb35fbfd319b19d23021d429515ebde390fe0" - integrity sha512-rTzeDjh57LOA56RqP71g9nqz32LOFPha2ZI7qS2i1dbVl4msAiWBCWnAX6yV6jykx/35wxgU1WK88AWDV/lclw== - -"@next/swc-linux-arm64-gnu@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-canary.132.tgz#e18e5f1fe0490576970b509ae621825f8bae88de" - integrity sha512-kxYNpuDtaz0LIBEORIh5tHhgdM2kLhzrWavZ1EmpUyBRbReLfjFXbBVlUq5C3uWnWjUCyGcpEtyoX7pMDjH0Og== - -"@next/swc-linux-arm64-musl@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-canary.132.tgz#5a4afea79fe748c0896cc8362bb8f5e00c2e1ba8" - integrity sha512-iGgEknY0mAbybACDIvZujdt72d2a5k6YxpUJ1ieYnx9VohXrIqr3idfaC6bMoWyQ7R/17n7D6MwxV2WrXrx1pQ== - -"@next/swc-linux-x64-gnu@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-canary.132.tgz#595892fe29d63a2b7c4e3550b890b4fc942355d8" - integrity sha512-t0IRcCybvUW+4EMF1BSu2sz4yoPREUDfL5U8XviOII8C9mC9Mqr7C3V6UTtK7qEqqE8uZ646jUzLRLSq/dFu/Q== - -"@next/swc-linux-x64-musl@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-canary.132.tgz#29519d1a0afddfdbccf0057ca5a304b8f78246c7" - integrity sha512-TEN6F1usz7n2w86qMMOCiqk5Fj1B5Gq1f9ymubC40V+pWSfA77tqR8aUG97HrrGZuAifXQyaqK+9yVAIQX81gQ== - -"@next/swc-win32-arm64-msvc@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-canary.132.tgz#f41f5fe9b7096df5f4996f73a802a877fce5d973" - integrity sha512-VBMglYngxTbQQGgHcg7KASoT4EZhGsEKXlZIjiU0a2PxT7tgMCLlgOlcuUy9sqN67jezRQGNqqcU4W+K+krDMA== - -"@next/swc-win32-ia32-msvc@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-canary.132.tgz#d394d954799c27f0018c5ae2e3f8d757713768d9" - integrity sha512-XNfYnhHWmOVu37aLVpMDRYxBNU46mSymapNyD7uy+C3QN7k3ZXPxy9Qb+OJkDx/SlfHBfSi0Ncp1cw6ptiD++A== - -"@next/swc-win32-x64-msvc@15.0.0-canary.132": - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-canary.132.tgz#0beb83b912a708febee94924e7f09235de07cd6e" - integrity sha512-uUyW1CAUYawCnpNVSHJyS37xBSi/hlhi5i4yFJ/K1bj31d7m/xQogrAfMybO6+tIqBKOkzva+oprkfFyrlWC/w== +"@next/swc-darwin-arm64@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-canary.134.tgz#6f78db9ff3792b622210c41a6d16619aade138fc" + integrity sha512-jUnNZtuZZpoCO5t6xnbrrWa3ZJafpeDRAZbtFo+g5cTC+toMZTW7Zu+E4j5na1SYLfaOEEbZJ017q9qxZoWLiQ== + +"@next/swc-darwin-x64@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-canary.134.tgz#dffdddf125e00069e1c7d4bb56c2f74140631840" + integrity sha512-vQxFt/PAJkkgq0k4YtlysP1jxAHtTHvEtCLvebRQvxURlVO1BVZAHPmbrnPZ9qt0vYzkKmQ6tCI03aHEdD7F7w== + +"@next/swc-linux-arm64-gnu@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-canary.134.tgz#76b8974b17bc6773d69e2cc98e146ff0e18879b7" + integrity sha512-1HPDXP87lETfkLUxYUfYhybpTZ64Z62NArkeSG9VrlI4ON8dwCTfIWQ9XqK3qnIgkzgAwkvaX9OYF3S6v3F4RA== + +"@next/swc-linux-arm64-musl@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-canary.134.tgz#2229d87832498d63df222a60c2f7310e057fd258" + integrity sha512-6Jpr3KD9qc/27er07/kAWuMn+GeO+mn7X7OcOrpw+Rr3uN1/IBxcdaG+b5W62G1Safhr3YC0m1ic6Syhj+mtUA== + +"@next/swc-linux-x64-gnu@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-canary.134.tgz#16ffb0f7fef4cf69e8668ee2eec6e31d5fb7070e" + integrity sha512-oNV8mlBQIvgr+3DVlslMh2sYVirN6v14ecTwr/q0FvJiB5atyIx0tBfU9mpguibcswaqjYOk2H8ZupRO7l3TAA== + +"@next/swc-linux-x64-musl@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-canary.134.tgz#085dd8dec3b3d58a481c50ff8d3311fb2f9c68bc" + integrity sha512-rdChZZlC84EhmFhdMLXTqpVGD8BJVw34/tuKp/BlJIwXr9ubgvmhWDwe9EQZ0OJ6qnTJJwWICk66SZufRhue2w== + +"@next/swc-win32-arm64-msvc@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-canary.134.tgz#aad909b6173f321f7f8c118f2c34e05db3ee3dd6" + integrity sha512-wx245GKxIyY63ZTt5fd7bMcgBgRBsttYbvAqA+n0hV9BtyHFifd7mMG7O8QiUlBo1xiADt0iZIoOE4tdwnQ2KA== + +"@next/swc-win32-ia32-msvc@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-canary.134.tgz#92379ea646b4464f8f834fec785537227bc1c1d5" + integrity sha512-0mz4KajqtrnxufGxk0VK3xepXm305uaRYbWPlRvfXbOA1jqMuCRjpvxcEoSlXgG/PXwMFFHfXBDQBClY4rv37A== + +"@next/swc-win32-x64-msvc@15.0.0-canary.134": + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-canary.134.tgz#e9a65069d34db5e8d45b20b56f251a6327c47284" + integrity sha512-fRfsT9u6xbUQsvVhzHmTbdpVtGSH1xMAePOdQo5f+jE/VlK48wsY+bxi0xI4MS9RCucPgd9bziq8xM12D6i9bg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -6435,12 +6435,12 @@ next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -next@15.0.0-canary.132: - version "15.0.0-canary.132" - resolved "https://registry.yarnpkg.com/next/-/next-15.0.0-canary.132.tgz#e6b15bde51e28bb4afd4c3a79a0b1364741f9d7b" - integrity sha512-bem2cDB95PABbIcOVwBm8ysk4WLmZRf+EViF7Rx0LYufEswyTsBW8/vO+sUeFh9Ors7c+nnLP6yp+fSSXLShgw== +next@^15.0.0-canary.134: + version "15.0.0-canary.134" + resolved "https://registry.yarnpkg.com/next/-/next-15.0.0-canary.134.tgz#9d8932eda352ed3cbf1298c35b2688b09b632df3" + integrity sha512-R+Xh+djtCT/14rdZ0+afypzZTSNiDEoCrEpdf5DY/8rVUpl/9WPhlhN3M1/43PSZ3eF6eIW4xw/IJepwnK7qkg== dependencies: - "@next/env" "15.0.0-canary.132" + "@next/env" "15.0.0-canary.134" "@swc/counter" "0.1.3" "@swc/helpers" "0.5.12" busboy "1.6.0" @@ -6449,15 +6449,15 @@ next@15.0.0-canary.132: postcss "8.4.31" styled-jsx "5.1.6" optionalDependencies: - "@next/swc-darwin-arm64" "15.0.0-canary.132" - "@next/swc-darwin-x64" "15.0.0-canary.132" - "@next/swc-linux-arm64-gnu" "15.0.0-canary.132" - "@next/swc-linux-arm64-musl" "15.0.0-canary.132" - "@next/swc-linux-x64-gnu" "15.0.0-canary.132" - "@next/swc-linux-x64-musl" "15.0.0-canary.132" - "@next/swc-win32-arm64-msvc" "15.0.0-canary.132" - "@next/swc-win32-ia32-msvc" "15.0.0-canary.132" - "@next/swc-win32-x64-msvc" "15.0.0-canary.132" + "@next/swc-darwin-arm64" "15.0.0-canary.134" + "@next/swc-darwin-x64" "15.0.0-canary.134" + "@next/swc-linux-arm64-gnu" "15.0.0-canary.134" + "@next/swc-linux-arm64-musl" "15.0.0-canary.134" + "@next/swc-linux-x64-gnu" "15.0.0-canary.134" + "@next/swc-linux-x64-musl" "15.0.0-canary.134" + "@next/swc-win32-arm64-msvc" "15.0.0-canary.134" + "@next/swc-win32-ia32-msvc" "15.0.0-canary.134" + "@next/swc-win32-x64-msvc" "15.0.0-canary.134" sharp "^0.33.4" node-eval@^2.0.0: